aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-10-04 18:14:59 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-10-04 18:14:59 +0000
commit2e17e448deed073f8614bb555a8ef20c57291c2a (patch)
tree533007e53d3584d0887b0f639d0e673b1e15ea7a
parentMove trunk/phpBB to old_trunk/phpBB (diff)
downloadphpbb-2e17e448deed073f8614bb555a8ef20c57291c2a.tar.gz
phpbb-2e17e448deed073f8614bb555a8ef20c57291c2a.tar.bz2
phpbb-2e17e448deed073f8614bb555a8ef20c57291c2a.zip
Copy 3.0.x branch to trunk
git-svn-id: file:///svn/phpbb/trunk@10211 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/.htaccess9
-rw-r--r--phpBB/adm/images/arrow_down.gifbin0 -> 113 bytes
-rw-r--r--phpBB/adm/images/arrow_left.gifbin0 -> 111 bytes
-rw-r--r--phpBB/adm/images/arrow_right.gifbin0 -> 111 bytes
-rw-r--r--phpBB/adm/images/arrow_up.gifbin0 -> 113 bytes
-rw-r--r--phpBB/adm/images/bg_button.gifbin0 -> 182 bytes
-rw-r--r--phpBB/adm/images/bg_hash1.gifbin0 -> 48 bytes
-rw-r--r--phpBB/adm/images/bg_hash2.gifbin0 -> 48 bytes
-rw-r--r--phpBB/adm/images/bg_hash3.gifbin0 -> 48 bytes
-rw-r--r--phpBB/adm/images/bg_hash4.gifbin0 -> 48 bytes
-rw-r--r--phpBB/adm/images/bg_header.gifbin0 -> 416 bytes
-rw-r--r--phpBB/adm/images/bg_header.jpgbin0 -> 385 bytes
-rw-r--r--phpBB/adm/images/bg_tabs1.gifbin0 -> 2325 bytes
-rw-r--r--phpBB/adm/images/bg_tabs2.gifbin0 -> 541 bytes
-rw-r--r--phpBB/adm/images/bg_tabs_alt1.gifbin0 -> 1520 bytes
-rw-r--r--phpBB/adm/images/bg_tabs_alt2.gifbin0 -> 420 bytes
-rw-r--r--phpBB/adm/images/cellpic3.gifbin0 -> 826 bytes
-rw-r--r--phpBB/adm/images/corners_left.gifbin0 -> 796 bytes
-rw-r--r--phpBB/adm/images/corners_left2.gifbin0 -> 55 bytes
-rw-r--r--phpBB/adm/images/corners_right.gifbin0 -> 175 bytes
-rw-r--r--phpBB/adm/images/corners_right2.gifbin0 -> 56 bytes
-rw-r--r--phpBB/adm/images/file_conflict.gifbin0 -> 344 bytes
-rw-r--r--phpBB/adm/images/file_modified.gifbin0 -> 358 bytes
-rw-r--r--phpBB/adm/images/file_new.gifbin0 -> 229 bytes
-rw-r--r--phpBB/adm/images/file_new_conflict.gifbin0 -> 357 bytes
-rw-r--r--phpBB/adm/images/file_not_modified.gifbin0 -> 570 bytes
-rw-r--r--phpBB/adm/images/file_up_to_date.gifbin0 -> 357 bytes
-rw-r--r--phpBB/adm/images/gradient2b.gifbin0 -> 192 bytes
-rw-r--r--phpBB/adm/images/icon_delete.gifbin0 -> 255 bytes
-rw-r--r--phpBB/adm/images/icon_delete_disabled.gifbin0 -> 249 bytes
-rw-r--r--phpBB/adm/images/icon_down.gifbin0 -> 239 bytes
-rw-r--r--phpBB/adm/images/icon_down_disabled.gifbin0 -> 166 bytes
-rw-r--r--phpBB/adm/images/icon_edit.gifbin0 -> 242 bytes
-rw-r--r--phpBB/adm/images/icon_edit_disabled.gifbin0 -> 239 bytes
-rw-r--r--phpBB/adm/images/icon_folder.gifbin0 -> 688 bytes
-rw-r--r--phpBB/adm/images/icon_folder_link.gifbin0 -> 734 bytes
-rw-r--r--phpBB/adm/images/icon_folder_lock.gifbin0 -> 707 bytes
-rw-r--r--phpBB/adm/images/icon_subfolder.gifbin0 -> 751 bytes
-rw-r--r--phpBB/adm/images/icon_sync.gifbin0 -> 251 bytes
-rw-r--r--phpBB/adm/images/icon_sync_disabled.gifbin0 -> 246 bytes
-rw-r--r--phpBB/adm/images/icon_trace.gifbin0 -> 307 bytes
-rw-r--r--phpBB/adm/images/icon_up.gifbin0 -> 240 bytes
-rw-r--r--phpBB/adm/images/icon_up_disabled.gifbin0 -> 168 bytes
-rw-r--r--phpBB/adm/images/innerbox_bg.gifbin0 -> 1980 bytes
-rw-r--r--phpBB/adm/images/no_avatar.gifbin0 -> 474 bytes
-rw-r--r--phpBB/adm/images/no_image.pngbin0 -> 401 bytes
-rw-r--r--phpBB/adm/images/phpbb_logo.gifbin0 -> 3883 bytes
-rw-r--r--phpBB/adm/images/progress_bar.gifbin0 -> 1353 bytes
-rw-r--r--phpBB/adm/images/spacer.gifbin0 -> 807 bytes
-rw-r--r--phpBB/adm/images/toggle.gifbin0 -> 788 bytes
-rw-r--r--phpBB/adm/index.php607
-rw-r--r--phpBB/adm/style/acp_attachments.html376
-rw-r--r--phpBB/adm/style/acp_ban.html124
-rw-r--r--phpBB/adm/style/acp_bbcodes.html124
-rw-r--r--phpBB/adm/style/acp_board.html49
-rw-r--r--phpBB/adm/style/acp_bots.html102
-rw-r--r--phpBB/adm/style/acp_captcha.html67
-rw-r--r--phpBB/adm/style/acp_database.html98
-rw-r--r--phpBB/adm/style/acp_disallow.html45
-rw-r--r--phpBB/adm/style/acp_email.html54
-rw-r--r--phpBB/adm/style/acp_forums.html505
-rw-r--r--phpBB/adm/style/acp_forums_copy_perm.html22
-rw-r--r--phpBB/adm/style/acp_groups.html358
-rw-r--r--phpBB/adm/style/acp_icons.html268
-rw-r--r--phpBB/adm/style/acp_inactive.html77
-rw-r--r--phpBB/adm/style/acp_jabber.html65
-rw-r--r--phpBB/adm/style/acp_language.html255
-rw-r--r--phpBB/adm/style/acp_logs.html93
-rw-r--r--phpBB/adm/style/acp_main.html249
-rw-r--r--phpBB/adm/style/acp_modules.html212
-rw-r--r--phpBB/adm/style/acp_permission_roles.html202
-rw-r--r--phpBB/adm/style/acp_permissions.html357
-rw-r--r--phpBB/adm/style/acp_php_info.html13
-rw-r--r--phpBB/adm/style/acp_profile.html236
-rw-r--r--phpBB/adm/style/acp_prune_forums.html108
-rw-r--r--phpBB/adm/style/acp_prune_users.html59
-rw-r--r--phpBB/adm/style/acp_ranks.html98
-rw-r--r--phpBB/adm/style/acp_reasons.html127
-rw-r--r--phpBB/adm/style/acp_search.html157
-rw-r--r--phpBB/adm/style/acp_send_statistics.html71
-rw-r--r--phpBB/adm/style/acp_styles.html521
-rw-r--r--phpBB/adm/style/acp_update.html46
-rw-r--r--phpBB/adm/style/acp_users.html234
-rw-r--r--phpBB/adm/style/acp_users_avatar.html78
-rw-r--r--phpBB/adm/style/acp_users_feedback.html76
-rw-r--r--phpBB/adm/style/acp_users_overview.html144
-rw-r--r--phpBB/adm/style/acp_users_prefs.html158
-rw-r--r--phpBB/adm/style/acp_users_profile.html66
-rw-r--r--phpBB/adm/style/acp_users_signature.html117
-rw-r--r--phpBB/adm/style/acp_users_warnings.html36
-rw-r--r--phpBB/adm/style/acp_words.html77
-rw-r--r--phpBB/adm/style/admin.css1655
-rw-r--r--phpBB/adm/style/captcha_default_acp_demo.html4
-rw-r--r--phpBB/adm/style/captcha_gd_acp.html74
-rw-r--r--phpBB/adm/style/captcha_qa_acp.html92
-rw-r--r--phpBB/adm/style/captcha_qa_acp_demo.html7
-rw-r--r--phpBB/adm/style/captcha_recaptcha.html33
-rw-r--r--phpBB/adm/style/captcha_recaptcha_acp.html50
-rw-r--r--phpBB/adm/style/colour_swatch.html78
-rw-r--r--phpBB/adm/style/confirm_body.html20
-rw-r--r--phpBB/adm/style/confirm_body_prune.html30
-rw-r--r--phpBB/adm/style/custom_profile_fields.html32
-rw-r--r--phpBB/adm/style/editor.js398
-rw-r--r--phpBB/adm/style/install_convert.html134
-rw-r--r--phpBB/adm/style/install_error.html8
-rw-r--r--phpBB/adm/style/install_footer.html27
-rw-r--r--phpBB/adm/style/install_header.html81
-rw-r--r--phpBB/adm/style/install_install.html77
-rw-r--r--phpBB/adm/style/install_main.html6
-rw-r--r--phpBB/adm/style/install_update.html475
-rw-r--r--phpBB/adm/style/install_update_diff.html262
-rw-r--r--phpBB/adm/style/message_body.html8
-rw-r--r--phpBB/adm/style/overall_footer.html35
-rw-r--r--phpBB/adm/style/overall_header.html221
-rw-r--r--phpBB/adm/style/permission_forum_copy.html40
-rw-r--r--phpBB/adm/style/permission_mask.html139
-rw-r--r--phpBB/adm/style/permission_roles_mask.html38
-rw-r--r--phpBB/adm/style/permission_trace.html58
-rw-r--r--phpBB/adm/style/permissions.js359
-rw-r--r--phpBB/adm/style/progress_bar.html40
-rw-r--r--phpBB/adm/style/simple_body.html8
-rw-r--r--phpBB/adm/style/simple_footer.html31
-rw-r--r--phpBB/adm/style/simple_header.html112
-rw-r--r--phpBB/adm/style/tooltip.js251
-rw-r--r--phpBB/adm/style/viewsource.html21
-rw-r--r--phpBB/adm/swatch.php53
-rw-r--r--phpBB/cache/.htaccess4
-rw-r--r--phpBB/cache/index.htm10
-rw-r--r--phpBB/common.php227
-rw-r--r--phpBB/config.php0
-rw-r--r--phpBB/cron.php287
-rw-r--r--phpBB/develop/add_permissions.php417
-rw-r--r--phpBB/develop/adjust_avatars.php147
-rw-r--r--phpBB/develop/adjust_bbcodes.php174
-rw-r--r--phpBB/develop/adjust_magic_urls.php126
-rw-r--r--phpBB/develop/adjust_sizes.php132
-rw-r--r--phpBB/develop/adjust_smilies.php130
-rw-r--r--phpBB/develop/adjust_uids.php129
-rw-r--r--phpBB/develop/adjust_usernames.php52
-rw-r--r--phpBB/develop/benchmark.php462
-rw-r--r--phpBB/develop/calc_email_hash.php76
-rw-r--r--phpBB/develop/change_smiley_ref.php62
-rwxr-xr-xphpBB/develop/collect_cache_stats.sh3
-rw-r--r--phpBB/develop/create_schema_files.php2048
-rw-r--r--phpBB/develop/create_variable_overview.php547
-rw-r--r--phpBB/develop/fill.php190
-rwxr-xr-xphpBB/develop/fix_files.sh29
-rw-r--r--phpBB/develop/generate_utf_casefold.php156
-rw-r--r--phpBB/develop/generate_utf_confusables.php240
-rw-r--r--phpBB/develop/generate_utf_tables.php572
-rw-r--r--phpBB/develop/lang_duplicates.php140
-rw-r--r--phpBB/develop/merge_attachment_tables.php80
-rw-r--r--phpBB/develop/merge_post_tables.php209
-rw-r--r--phpBB/develop/mysql_upgrader.php1400
-rw-r--r--phpBB/develop/nuke-db.php58
-rw-r--r--phpBB/develop/regex.php83
-rw-r--r--phpBB/develop/repair_bots.php151
-rw-r--r--phpBB/develop/search_fill.php129
-rw-r--r--phpBB/develop/unicode_testing.php120
-rw-r--r--phpBB/develop/update_email_hash.php57
-rw-r--r--phpBB/develop/utf_normalizer_test.php391
-rw-r--r--phpBB/docs/AUTHORS76
-rw-r--r--phpBB/docs/CHANGELOG.html1126
-rw-r--r--phpBB/docs/COPYING281
-rw-r--r--phpBB/docs/FAQ.html352
-rw-r--r--phpBB/docs/INSTALL.html448
-rw-r--r--phpBB/docs/README.html363
-rw-r--r--phpBB/docs/auth_api.html253
-rw-r--r--phpBB/docs/bg_header.gifbin0 -> 690 bytes
-rw-r--r--phpBB/docs/coding-guidelines.html2498
-rw-r--r--phpBB/docs/corners_left.gifbin0 -> 55 bytes
-rw-r--r--phpBB/docs/corners_left.pngbin0 -> 195 bytes
-rw-r--r--phpBB/docs/corners_right.gifbin0 -> 56 bytes
-rw-r--r--phpBB/docs/corners_right.pngbin0 -> 201 bytes
-rw-r--r--phpBB/docs/hook_system.html887
-rw-r--r--phpBB/docs/site_logo.gifbin0 -> 3430 bytes
-rw-r--r--phpBB/docs/stylesheet.css352
-rw-r--r--phpBB/download/file.php706
-rw-r--r--phpBB/download/index.htm10
-rw-r--r--phpBB/faq.php89
-rw-r--r--phpBB/feed.php1064
-rw-r--r--phpBB/files/.htaccess4
-rw-r--r--phpBB/files/index.htm10
-rw-r--r--phpBB/images/avatars/gallery/index.htm10
-rw-r--r--phpBB/images/avatars/index.htm10
-rw-r--r--phpBB/images/avatars/upload/.htaccess4
-rw-r--r--phpBB/images/avatars/upload/index.htm10
-rw-r--r--phpBB/images/icons/index.htm10
-rw-r--r--phpBB/images/icons/misc/fire.gifbin0 -> 278 bytes
-rw-r--r--phpBB/images/icons/misc/heart.gifbin0 -> 284 bytes
-rw-r--r--phpBB/images/icons/misc/index.htm10
-rw-r--r--phpBB/images/icons/misc/radioactive.gifbin0 -> 300 bytes
-rw-r--r--phpBB/images/icons/misc/star.gifbin0 -> 267 bytes
-rw-r--r--phpBB/images/icons/misc/thinking.gifbin0 -> 284 bytes
-rw-r--r--phpBB/images/icons/smile/alert.gifbin0 -> 271 bytes
-rw-r--r--phpBB/images/icons/smile/index.htm10
-rw-r--r--phpBB/images/icons/smile/info.gifbin0 -> 294 bytes
-rw-r--r--phpBB/images/icons/smile/mrgreen.gifbin0 -> 297 bytes
-rw-r--r--phpBB/images/icons/smile/question.gifbin0 -> 296 bytes
-rw-r--r--phpBB/images/icons/smile/redface.gifbin0 -> 2463 bytes
-rw-r--r--phpBB/images/index.htm10
-rw-r--r--phpBB/images/ranks/index.htm10
-rw-r--r--phpBB/images/smilies/icon_arrow.gifbin0 -> 407 bytes
-rw-r--r--phpBB/images/smilies/icon_cool.gifbin0 -> 408 bytes
-rw-r--r--phpBB/images/smilies/icon_cry.gifbin0 -> 1664 bytes
-rw-r--r--phpBB/images/smilies/icon_e_biggrin.gifbin0 -> 627 bytes
-rw-r--r--phpBB/images/smilies/icon_e_confused.gifbin0 -> 628 bytes
-rw-r--r--phpBB/images/smilies/icon_e_geek.gifbin0 -> 623 bytes
-rw-r--r--phpBB/images/smilies/icon_e_sad.gifbin0 -> 628 bytes
-rw-r--r--phpBB/images/smilies/icon_e_smile.gifbin0 -> 630 bytes
-rw-r--r--phpBB/images/smilies/icon_e_surprised.gifbin0 -> 415 bytes
-rw-r--r--phpBB/images/smilies/icon_e_ugeek.gifbin0 -> 631 bytes
-rw-r--r--phpBB/images/smilies/icon_e_wink.gifbin0 -> 630 bytes
-rw-r--r--phpBB/images/smilies/icon_eek.gifbin0 -> 619 bytes
-rw-r--r--phpBB/images/smilies/icon_evil.gifbin0 -> 648 bytes
-rw-r--r--phpBB/images/smilies/icon_exclaim.gifbin0 -> 632 bytes
-rw-r--r--phpBB/images/smilies/icon_idea.gifbin0 -> 411 bytes
-rw-r--r--phpBB/images/smilies/icon_lol.gifbin0 -> 707 bytes
-rw-r--r--phpBB/images/smilies/icon_mad.gifbin0 -> 646 bytes
-rw-r--r--phpBB/images/smilies/icon_mrgreen.gifbin0 -> 608 bytes
-rw-r--r--phpBB/images/smilies/icon_neutral.gifbin0 -> 621 bytes
-rw-r--r--phpBB/images/smilies/icon_question.gifbin0 -> 643 bytes
-rw-r--r--phpBB/images/smilies/icon_razz.gifbin0 -> 645 bytes
-rw-r--r--phpBB/images/smilies/icon_redface.gifbin0 -> 2990 bytes
-rw-r--r--phpBB/images/smilies/icon_rolleyes.gifbin0 -> 1153 bytes
-rw-r--r--phpBB/images/smilies/icon_twisted.gifbin0 -> 636 bytes
-rw-r--r--phpBB/images/spacer.gifbin0 -> 807 bytes
-rw-r--r--phpBB/images/upload_icons/avi.gifbin0 -> 271 bytes
-rw-r--r--phpBB/images/upload_icons/bmp.gifbin0 -> 279 bytes
-rw-r--r--phpBB/images/upload_icons/doc.gifbin0 -> 940 bytes
-rw-r--r--phpBB/images/upload_icons/exe.gifbin0 -> 1096 bytes
-rw-r--r--phpBB/images/upload_icons/flash.gifbin0 -> 254 bytes
-rw-r--r--phpBB/images/upload_icons/gif.gifbin0 -> 189 bytes
-rw-r--r--phpBB/images/upload_icons/html.gifbin0 -> 183 bytes
-rw-r--r--phpBB/images/upload_icons/jpg.gifbin0 -> 188 bytes
-rw-r--r--phpBB/images/upload_icons/mid.gifbin0 -> 141 bytes
-rw-r--r--phpBB/images/upload_icons/mov.gifbin0 -> 271 bytes
-rw-r--r--phpBB/images/upload_icons/mp3.gifbin0 -> 253 bytes
-rw-r--r--phpBB/images/upload_icons/mpg.gifbin0 -> 271 bytes
-rw-r--r--phpBB/images/upload_icons/netscape.gifbin0 -> 214 bytes
-rw-r--r--phpBB/images/upload_icons/pdf.gifbin0 -> 370 bytes
-rw-r--r--phpBB/images/upload_icons/ppt.gifbin0 -> 867 bytes
-rw-r--r--phpBB/images/upload_icons/rar.gifbin0 -> 976 bytes
-rw-r--r--phpBB/images/upload_icons/txt.gifbin0 -> 138 bytes
-rw-r--r--phpBB/images/upload_icons/wav.gifbin0 -> 162 bytes
-rw-r--r--phpBB/images/upload_icons/xls.gifbin0 -> 941 bytes
-rw-r--r--phpBB/images/upload_icons/zip.gifbin0 -> 155 bytes
-rw-r--r--phpBB/includes/acm/acm_apc.php84
-rw-r--r--phpBB/includes/acm/acm_eaccelerator.php120
-rw-r--r--phpBB/includes/acm/acm_file.php720
-rw-r--r--phpBB/includes/acm/acm_memcache.php124
-rw-r--r--phpBB/includes/acm/acm_memory.php426
-rw-r--r--phpBB/includes/acm/acm_null.php156
-rw-r--r--phpBB/includes/acm/acm_xcache.php121
-rw-r--r--phpBB/includes/acp/acp_attachments.php1452
-rw-r--r--phpBB/includes/acp/acp_ban.php252
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php443
-rw-r--r--phpBB/includes/acp/acp_board.php957
-rw-r--r--phpBB/includes/acp/acp_bots.php418
-rw-r--r--phpBB/includes/acp/acp_captcha.php147
-rw-r--r--phpBB/includes/acp/acp_database.php2348
-rw-r--r--phpBB/includes/acp/acp_disallow.php108
-rw-r--r--phpBB/includes/acp/acp_email.php262
-rw-r--r--phpBB/includes/acp/acp_forums.php1947
-rw-r--r--phpBB/includes/acp/acp_groups.php789
-rw-r--r--phpBB/includes/acp/acp_icons.php946
-rw-r--r--phpBB/includes/acp/acp_inactive.php306
-rw-r--r--phpBB/includes/acp/acp_jabber.php131
-rw-r--r--phpBB/includes/acp/acp_language.php1453
-rw-r--r--phpBB/includes/acp/acp_logs.php176
-rw-r--r--phpBB/includes/acp/acp_main.php609
-rw-r--r--phpBB/includes/acp/acp_modules.php1065
-rw-r--r--phpBB/includes/acp/acp_permission_roles.php571
-rw-r--r--phpBB/includes/acp/acp_permissions.php1315
-rw-r--r--phpBB/includes/acp/acp_php_info.php84
-rw-r--r--phpBB/includes/acp/acp_profile.php1617
-rw-r--r--phpBB/includes/acp/acp_prune.php466
-rw-r--r--phpBB/includes/acp/acp_ranks.php240
-rw-r--r--phpBB/includes/acp/acp_reasons.php374
-rw-r--r--phpBB/includes/acp/acp_search.php629
-rw-r--r--phpBB/includes/acp/acp_send_statistics.php90
-rw-r--r--phpBB/includes/acp/acp_styles.php3768
-rw-r--r--phpBB/includes/acp/acp_update.php83
-rw-r--r--phpBB/includes/acp/acp_users.php2358
-rw-r--r--phpBB/includes/acp/acp_words.php187
-rw-r--r--phpBB/includes/acp/auth.php1285
-rw-r--r--phpBB/includes/acp/info/acp_attachments.php40
-rw-r--r--phpBB/includes/acp/info/acp_ban.php39
-rw-r--r--phpBB/includes/acp/info/acp_bbcodes.php37
-rw-r--r--phpBB/includes/acp/info/acp_board.php52
-rw-r--r--phpBB/includes/acp/info/acp_bots.php38
-rw-r--r--phpBB/includes/acp/info/acp_captcha.php38
-rw-r--r--phpBB/includes/acp/info/acp_database.php38
-rw-r--r--phpBB/includes/acp/info/acp_disallow.php38
-rw-r--r--phpBB/includes/acp/info/acp_email.php38
-rw-r--r--phpBB/includes/acp/info/acp_forums.php37
-rw-r--r--phpBB/includes/acp/info/acp_groups.php37
-rw-r--r--phpBB/includes/acp/info/acp_icons.php38
-rw-r--r--phpBB/includes/acp/info/acp_inactive.php37
-rw-r--r--phpBB/includes/acp/info/acp_jabber.php36
-rw-r--r--phpBB/includes/acp/info/acp_language.php37
-rw-r--r--phpBB/includes/acp/info/acp_logs.php40
-rw-r--r--phpBB/includes/acp/info/acp_main.php37
-rw-r--r--phpBB/includes/acp/info/acp_modules.php39
-rw-r--r--phpBB/includes/acp/info/acp_permission_roles.php40
-rw-r--r--phpBB/includes/acp/info/acp_permissions.php54
-rw-r--r--phpBB/includes/acp/info/acp_php_info.php37
-rw-r--r--phpBB/includes/acp/info/acp_profile.php37
-rw-r--r--phpBB/includes/acp/info/acp_prune.php38
-rw-r--r--phpBB/includes/acp/info/acp_ranks.php37
-rw-r--r--phpBB/includes/acp/info/acp_reasons.php37
-rw-r--r--phpBB/includes/acp/info/acp_search.php38
-rw-r--r--phpBB/includes/acp/info/acp_send_statistics.php37
-rw-r--r--phpBB/includes/acp/info/acp_styles.php40
-rw-r--r--phpBB/includes/acp/info/acp_update.php37
-rw-r--r--phpBB/includes/acp/info/acp_users.php47
-rw-r--r--phpBB/includes/acp/info/acp_words.php37
-rw-r--r--phpBB/includes/auth.php1046
-rw-r--r--phpBB/includes/auth/auth_apache.php249
-rw-r--r--phpBB/includes/auth/auth_db.php198
-rw-r--r--phpBB/includes/auth/auth_ldap.php349
-rw-r--r--phpBB/includes/auth/index.htm10
-rw-r--r--phpBB/includes/bbcode.php602
-rw-r--r--phpBB/includes/cache.php444
-rw-r--r--phpBB/includes/captcha/captcha_factory.php100
-rw-r--r--phpBB/includes/captcha/captcha_gd.php2640
-rw-r--r--phpBB/includes/captcha/captcha_gd_wave.php845
-rw-r--r--phpBB/includes/captcha/captcha_non_gd.php392
-rw-r--r--phpBB/includes/captcha/plugins/captcha_abstract.php375
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php165
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php83
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php72
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php945
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php336
-rw-r--r--phpBB/includes/constants.php270
-rw-r--r--phpBB/includes/db/db_tools.php2032
-rw-r--r--phpBB/includes/db/dbal.php887
-rw-r--r--phpBB/includes/db/firebird.php512
-rw-r--r--phpBB/includes/db/index.htm10
-rw-r--r--phpBB/includes/db/mssql.php449
-rw-r--r--phpBB/includes/db/mssql_odbc.php426
-rw-r--r--phpBB/includes/db/mysql.php491
-rw-r--r--phpBB/includes/db/mysqli.php468
-rw-r--r--phpBB/includes/db/oracle.php752
-rw-r--r--phpBB/includes/db/postgres.php440
-rw-r--r--phpBB/includes/db/sqlite.php334
-rw-r--r--phpBB/includes/diff/diff.php1148
-rw-r--r--phpBB/includes/diff/engine.php554
-rw-r--r--phpBB/includes/diff/renderer.php860
-rw-r--r--phpBB/includes/functions.php4367
-rw-r--r--phpBB/includes/functions_admin.php3303
-rw-r--r--phpBB/includes/functions_compress.php723
-rw-r--r--phpBB/includes/functions_content.php1357
-rw-r--r--phpBB/includes/functions_convert.php2454
-rw-r--r--phpBB/includes/functions_display.php1277
-rw-r--r--phpBB/includes/functions_install.php540
-rw-r--r--phpBB/includes/functions_jabber.php872
-rw-r--r--phpBB/includes/functions_messenger.php1558
-rw-r--r--phpBB/includes/functions_module.php883
-rw-r--r--phpBB/includes/functions_posting.php2614
-rw-r--r--phpBB/includes/functions_privmsgs.php1981
-rw-r--r--phpBB/includes/functions_profile_fields.php1143
-rw-r--r--phpBB/includes/functions_template.php814
-rw-r--r--phpBB/includes/functions_transfer.php873
-rw-r--r--phpBB/includes/functions_upload.php988
-rw-r--r--phpBB/includes/functions_user.php3582
-rw-r--r--phpBB/includes/hooks/index.php250
-rw-r--r--phpBB/includes/index.htm10
-rw-r--r--phpBB/includes/mcp/info/mcp_ban.php39
-rw-r--r--phpBB/includes/mcp/info/mcp_logs.php39
-rw-r--r--phpBB/includes/mcp/info/mcp_main.php40
-rw-r--r--phpBB/includes/mcp/info/mcp_notes.php38
-rw-r--r--phpBB/includes/mcp/info/mcp_pm_reports.php39
-rw-r--r--phpBB/includes/mcp/info/mcp_queue.php39
-rw-r--r--phpBB/includes/mcp/info/mcp_reports.php39
-rw-r--r--phpBB/includes/mcp/info/mcp_warn.php40
-rw-r--r--phpBB/includes/mcp/mcp_ban.php219
-rw-r--r--phpBB/includes/mcp/mcp_forum.php447
-rw-r--r--phpBB/includes/mcp/mcp_front.php380
-rw-r--r--phpBB/includes/mcp/mcp_logs.php218
-rw-r--r--phpBB/includes/mcp/mcp_main.php1282
-rw-r--r--phpBB/includes/mcp/mcp_notes.php251
-rw-r--r--phpBB/includes/mcp/mcp_pm_reports.php323
-rw-r--r--phpBB/includes/mcp/mcp_post.php501
-rw-r--r--phpBB/includes/mcp/mcp_queue.php992
-rw-r--r--phpBB/includes/mcp/mcp_reports.php726
-rw-r--r--phpBB/includes/mcp/mcp_topic.php635
-rw-r--r--phpBB/includes/mcp/mcp_warn.php511
-rw-r--r--phpBB/includes/message_parser.php1685
-rw-r--r--phpBB/includes/questionnaire/questionnaire.php471
-rw-r--r--phpBB/includes/search/fulltext_mysql.php932
-rw-r--r--phpBB/includes/search/fulltext_native.php1742
-rw-r--r--phpBB/includes/search/index.htm10
-rw-r--r--phpBB/includes/search/search.php320
-rw-r--r--phpBB/includes/session.php2342
-rw-r--r--phpBB/includes/template.php668
-rw-r--r--phpBB/includes/ucp/info/ucp_attachments.php37
-rw-r--r--phpBB/includes/ucp/info/ucp_groups.php38
-rw-r--r--phpBB/includes/ucp/info/ucp_main.php40
-rw-r--r--phpBB/includes/ucp/info/ucp_pm.php40
-rw-r--r--phpBB/includes/ucp/info/ucp_prefs.php39
-rw-r--r--phpBB/includes/ucp/info/ucp_profile.php40
-rw-r--r--phpBB/includes/ucp/info/ucp_zebra.php38
-rw-r--r--phpBB/includes/ucp/ucp_activate.php143
-rw-r--r--phpBB/includes/ucp/ucp_attachments.php201
-rw-r--r--phpBB/includes/ucp/ucp_confirm.php50
-rw-r--r--phpBB/includes/ucp/ucp_groups.php1117
-rw-r--r--phpBB/includes/ucp/ucp_main.php835
-rw-r--r--phpBB/includes/ucp/ucp_pm.php416
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php1290
-rw-r--r--phpBB/includes/ucp/ucp_pm_options.php836
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php509
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php320
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php357
-rw-r--r--phpBB/includes/ucp/ucp_profile.php649
-rw-r--r--phpBB/includes/ucp/ucp_register.php503
-rw-r--r--phpBB/includes/ucp/ucp_remind.php125
-rw-r--r--phpBB/includes/ucp/ucp_resend.php170
-rw-r--r--phpBB/includes/ucp/ucp_zebra.php257
-rw-r--r--phpBB/includes/utf/data/case_fold_c.php1
-rw-r--r--phpBB/includes/utf/data/case_fold_f.php1
-rw-r--r--phpBB/includes/utf/data/case_fold_s.php1
-rw-r--r--phpBB/includes/utf/data/confusables.php1
-rw-r--r--phpBB/includes/utf/data/recode_basic.php1543
-rw-r--r--phpBB/includes/utf/data/recode_cjk.php45179
-rw-r--r--phpBB/includes/utf/data/search_indexer_0.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_1.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_19.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_2.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_20.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_21.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_26.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_3.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_31.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_32.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_33.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_36.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_4.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_448.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_5.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_58.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_6.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_64.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_84.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_9.php1
-rw-r--r--phpBB/includes/utf/data/search_indexer_95.php1
-rw-r--r--phpBB/includes/utf/data/utf_canonical_comp.php2
-rw-r--r--phpBB/includes/utf/data/utf_canonical_decomp.php2
-rw-r--r--phpBB/includes/utf/data/utf_compatibility_decomp.php2
-rw-r--r--phpBB/includes/utf/data/utf_nfc_qc.php2
-rw-r--r--phpBB/includes/utf/data/utf_nfkc_qc.php2
-rw-r--r--phpBB/includes/utf/data/utf_normalizer_common.php4
-rw-r--r--phpBB/includes/utf/utf_normalizer.php1516
-rw-r--r--phpBB/includes/utf/utf_tools.php1995
-rw-r--r--phpBB/index.php139
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php935
-rw-r--r--phpBB/install/convertors/functions_phpbb20.php1867
-rw-r--r--phpBB/install/data/confusables.php650
-rw-r--r--phpBB/install/data/new_normalizer.php196
-rw-r--r--phpBB/install/database_update.php3387
-rw-r--r--phpBB/install/index.php808
-rw-r--r--phpBB/install/install_convert.php2114
-rw-r--r--phpBB/install/install_install.php2243
-rw-r--r--phpBB/install/install_main.php78
-rw-r--r--phpBB/install/install_update.php1705
-rw-r--r--phpBB/install/phpinfo.php5
-rw-r--r--phpBB/install/schemas/firebird_schema.sql1453
-rw-r--r--phpBB/install/schemas/index.htm10
-rw-r--r--phpBB/install/schemas/mssql_schema.sql1740
-rw-r--r--phpBB/install/schemas/mysql_40_schema.sql1016
-rw-r--r--phpBB/install/schemas/mysql_41_schema.sql1016
-rw-r--r--phpBB/install/schemas/oracle_schema.sql1898
-rw-r--r--phpBB/install/schemas/postgres_schema.sql1291
-rw-r--r--phpBB/install/schemas/schema_data.sql829
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql985
-rw-r--r--phpBB/language/en/acp/attachments.php164
-rw-r--r--phpBB/language/en/acp/ban.php82
-rw-r--r--phpBB/language/en/acp/board.php532
-rw-r--r--phpBB/language/en/acp/bots.php73
-rw-r--r--phpBB/language/en/acp/common.php741
-rw-r--r--phpBB/language/en/acp/database.php76
-rw-r--r--phpBB/language/en/acp/email.php67
-rw-r--r--phpBB/language/en/acp/forums.php160
-rw-r--r--phpBB/language/en/acp/groups.php132
-rw-r--r--phpBB/language/en/acp/index.htm10
-rw-r--r--phpBB/language/en/acp/language.php102
-rw-r--r--phpBB/language/en/acp/modules.php84
-rw-r--r--phpBB/language/en/acp/permissions.php289
-rw-r--r--phpBB/language/en/acp/permissions_phpbb.php241
-rw-r--r--phpBB/language/en/acp/posting.php276
-rw-r--r--phpBB/language/en/acp/profile.php156
-rw-r--r--phpBB/language/en/acp/prune.php91
-rw-r--r--phpBB/language/en/acp/search.php107
-rw-r--r--phpBB/language/en/acp/styles.php434
-rw-r--r--phpBB/language/en/acp/users.php141
-rw-r--r--phpBB/language/en/captcha_qa.php63
-rw-r--r--phpBB/language/en/captcha_recaptcha.php52
-rw-r--r--phpBB/language/en/common.php866
-rw-r--r--phpBB/language/en/email/admin_activate.txt14
-rw-r--r--phpBB/language/en/email/admin_send_email.txt14
-rw-r--r--phpBB/language/en/email/admin_welcome_activated.txt7
-rw-r--r--phpBB/language/en/email/admin_welcome_inactive.txt19
-rw-r--r--phpBB/language/en/email/coppa_resend_inactive.txt42
-rw-r--r--phpBB/language/en/email/coppa_welcome_inactive.txt42
-rw-r--r--phpBB/language/en/email/email_notify.txt17
-rw-r--r--phpBB/language/en/email/forum_notify.txt19
-rw-r--r--phpBB/language/en/email/group_added.txt11
-rw-r--r--phpBB/language/en/email/group_approved.txt10
-rw-r--r--phpBB/language/en/email/group_request.txt10
-rw-r--r--phpBB/language/en/email/index.htm10
-rw-r--r--phpBB/language/en/email/installed.txt19
-rw-r--r--phpBB/language/en/email/newtopic_notify.txt13
-rw-r--r--phpBB/language/en/email/pm_report_closed.txt8
-rw-r--r--phpBB/language/en/email/pm_report_deleted.txt8
-rw-r--r--phpBB/language/en/email/post_approved.txt14
-rw-r--r--phpBB/language/en/email/post_disapproved.txt12
-rw-r--r--phpBB/language/en/email/privmsg_notify.txt15
-rw-r--r--phpBB/language/en/email/profile_send_email.txt13
-rw-r--r--phpBB/language/en/email/profile_send_im.txt13
-rw-r--r--phpBB/language/en/email/report_closed.txt8
-rw-r--r--phpBB/language/en/email/report_deleted.txt8
-rw-r--r--phpBB/language/en/email/topic_approved.txt11
-rw-r--r--phpBB/language/en/email/topic_disapproved.txt12
-rw-r--r--phpBB/language/en/email/topic_notify.txt20
-rw-r--r--phpBB/language/en/email/user_activate.txt9
-rw-r--r--phpBB/language/en/email/user_activate_inactive.txt7
-rw-r--r--phpBB/language/en/email/user_activate_passwd.txt17
-rw-r--r--phpBB/language/en/email/user_reactivate_account.txt19
-rw-r--r--phpBB/language/en/email/user_remind_inactive.txt11
-rw-r--r--phpBB/language/en/email/user_resend_inactive.txt20
-rw-r--r--phpBB/language/en/email/user_welcome.txt17
-rw-r--r--phpBB/language/en/email/user_welcome_inactive.txt21
-rw-r--r--phpBB/language/en/groups.php96
-rw-r--r--phpBB/language/en/help_bbcode.php116
-rw-r--r--phpBB/language/en/help_faq.php344
-rw-r--r--phpBB/language/en/index.htm10
-rw-r--r--phpBB/language/en/install.php635
-rw-r--r--phpBB/language/en/iso.txt3
-rw-r--r--phpBB/language/en/mcp.php402
-rw-r--r--phpBB/language/en/memberlist.php150
-rw-r--r--phpBB/language/en/mods/index.htm0
-rw-r--r--phpBB/language/en/posting.php225
-rw-r--r--phpBB/language/en/search.php104
-rw-r--r--phpBB/language/en/search_ignore_words.php272
-rw-r--r--phpBB/language/en/search_synonyms.php191
-rw-r--r--phpBB/language/en/ucp.php555
-rw-r--r--phpBB/language/en/viewforum.php66
-rw-r--r--phpBB/language/en/viewtopic.php117
-rw-r--r--phpBB/language/index.htm10
-rw-r--r--phpBB/mcp.php915
-rw-r--r--phpBB/memberlist.php1681
-rw-r--r--phpBB/posting.php1592
-rw-r--r--phpBB/report.php238
-rw-r--r--phpBB/search.php1192
-rw-r--r--phpBB/store/.htaccess4
-rw-r--r--phpBB/store/index.htm10
-rw-r--r--phpBB/style.php293
-rw-r--r--phpBB/styles/prosilver/imageset/announce_read.gifbin0 -> 754 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/announce_read_locked.gifbin0 -> 738 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/announce_read_locked_mine.gifbin0 -> 753 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/announce_read_mine.gifbin0 -> 750 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/announce_unread.gifbin0 -> 756 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/announce_unread_locked.gifbin0 -> 745 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/announce_unread_locked_mine.gifbin0 -> 755 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/announce_unread_mine.gifbin0 -> 791 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/button_pm_forward.gifbin0 -> 2168 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/button_pm_new.gifbin0 -> 2005 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/button_pm_reply.gifbin0 -> 2126 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/button_topic_locked.gifbin0 -> 1923 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/button_topic_new.gifbin0 -> 2737 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/button_topic_reply.gifbin0 -> 2135 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/icon_contact_pm.gifbin0 -> 677 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/icon_post_edit.gifbin0 -> 853 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/icon_post_quote.gifbin0 -> 1109 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/icon_user_online.gifbin0 -> 423 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/imageset.cfg35
-rw-r--r--phpBB/styles/prosilver/imageset/en/index.htm0
-rw-r--r--phpBB/styles/prosilver/imageset/forum_link.gifbin0 -> 734 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/forum_read.gifbin0 -> 688 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/forum_read_locked.gifbin0 -> 707 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/forum_read_subforum.gifbin0 -> 751 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/forum_unread.gifbin0 -> 693 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/forum_unread_locked.gifbin0 -> 677 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/forum_unread_subforum.gifbin0 -> 751 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_back_top.gifbin0 -> 204 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_contact_aim.gifbin0 -> 546 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_contact_email.gifbin0 -> 523 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_contact_icq.gifbin0 -> 562 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_contact_jabber.gifbin0 -> 1014 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_contact_msnm.gifbin0 -> 588 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_contact_www.gifbin0 -> 590 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_contact_yahoo.gifbin0 -> 541 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_offline.gifbin0 -> 384 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_online.gifbin0 -> 393 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_post_delete.gifbin0 -> 528 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_post_info.gifbin0 -> 501 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_post_report.gifbin0 -> 474 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_post_target.gifbin0 -> 186 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_post_target_unread.gifbin0 -> 151 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_rate_bad.gifbin0 -> 465 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_rate_good.gifbin0 -> 462 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_topic_attach.gifbin0 -> 144 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_topic_latest.gifbin0 -> 186 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_topic_newest.gifbin0 -> 155 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_topic_reported.gifbin0 -> 246 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_topic_unapproved.gifbin0 -> 253 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/icon_user_warn.gifbin0 -> 481 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/imageset.cfg116
-rw-r--r--phpBB/styles/prosilver/imageset/index.htm0
-rw-r--r--phpBB/styles/prosilver/imageset/site_logo.gifbin0 -> 3430 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/sticky_read.gifbin0 -> 651 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/sticky_read_locked.gifbin0 -> 646 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/sticky_read_locked_mine.gifbin0 -> 662 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/sticky_read_mine.gifbin0 -> 659 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/sticky_unread.gifbin0 -> 648 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/sticky_unread_locked.gifbin0 -> 626 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/sticky_unread_locked_mine.gifbin0 -> 682 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/sticky_unread_mine.gifbin0 -> 669 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/subforum_read.gifbin0 -> 124 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/subforum_unread.gifbin0 -> 124 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/topic_moved.gifbin0 -> 693 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/topic_read.gifbin0 -> 679 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/topic_read_hot.gifbin0 -> 1469 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/topic_read_hot_mine.gifbin0 -> 1519 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/topic_read_locked.gifbin0 -> 748 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/topic_read_locked_mine.gifbin0 -> 749 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/topic_read_mine.gifbin0 -> 695 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/topic_unread.gifbin0 -> 678 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/topic_unread_hot.gifbin0 -> 1431 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/topic_unread_hot_mine.gifbin0 -> 1364 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/topic_unread_locked.gifbin0 -> 745 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/topic_unread_locked_mine.gifbin0 -> 764 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/topic_unread_mine.gifbin0 -> 704 bytes
-rw-r--r--phpBB/styles/prosilver/style.cfg22
-rw-r--r--phpBB/styles/prosilver/template/attachment.html122
-rw-r--r--phpBB/styles/prosilver/template/bbcode.html40
-rw-r--r--phpBB/styles/prosilver/template/captcha_default.html24
-rw-r--r--phpBB/styles/prosilver/template/captcha_qa.html21
-rw-r--r--phpBB/styles/prosilver/template/captcha_recaptcha.html49
-rw-r--r--phpBB/styles/prosilver/template/confirm_body.html20
-rw-r--r--phpBB/styles/prosilver/template/custom_profile_fields.html31
-rw-r--r--phpBB/styles/prosilver/template/drafts.html44
-rw-r--r--phpBB/styles/prosilver/template/editor.js449
-rw-r--r--phpBB/styles/prosilver/template/faq_body.html52
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js403
-rw-r--r--phpBB/styles/prosilver/template/forumlist_body.html68
-rw-r--r--phpBB/styles/prosilver/template/index.htm0
-rw-r--r--phpBB/styles/prosilver/template/index_body.html47
-rw-r--r--phpBB/styles/prosilver/template/jumpbox.html33
-rw-r--r--phpBB/styles/prosilver/template/login_body.html64
-rw-r--r--phpBB/styles/prosilver/template/login_forum.html35
-rw-r--r--phpBB/styles/prosilver/template/mcp_approve.html53
-rw-r--r--phpBB/styles/prosilver/template/mcp_ban.html128
-rw-r--r--phpBB/styles/prosilver/template/mcp_footer.html9
-rw-r--r--phpBB/styles/prosilver/template/mcp_forum.html111
-rw-r--r--phpBB/styles/prosilver/template/mcp_front.html184
-rw-r--r--phpBB/styles/prosilver/template/mcp_header.html67
-rw-r--r--phpBB/styles/prosilver/template/mcp_logs.html90
-rw-r--r--phpBB/styles/prosilver/template/mcp_message.html8
-rw-r--r--phpBB/styles/prosilver/template/mcp_move.html36
-rw-r--r--phpBB/styles/prosilver/template/mcp_notes_front.html28
-rw-r--r--phpBB/styles/prosilver/template/mcp_notes_user.html125
-rw-r--r--phpBB/styles/prosilver/template/mcp_post.html297
-rw-r--r--phpBB/styles/prosilver/template/mcp_queue.html96
-rw-r--r--phpBB/styles/prosilver/template/mcp_reports.html98
-rw-r--r--phpBB/styles/prosilver/template/mcp_topic.html170
-rw-r--r--phpBB/styles/prosilver/template/mcp_viewlogs.html53
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_front.html97
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_list.html66
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_post.html74
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_user.html58
-rw-r--r--phpBB/styles/prosilver/template/mcp_whois.html16
-rw-r--r--phpBB/styles/prosilver/template/memberlist_body.html184
-rw-r--r--phpBB/styles/prosilver/template/memberlist_email.html65
-rw-r--r--phpBB/styles/prosilver/template/memberlist_im.html158
-rw-r--r--phpBB/styles/prosilver/template/memberlist_leaders.html76
-rw-r--r--phpBB/styles/prosilver/template/memberlist_search.html124
-rw-r--r--phpBB/styles/prosilver/template/memberlist_view.html116
-rw-r--r--phpBB/styles/prosilver/template/message_body.html11
-rw-r--r--phpBB/styles/prosilver/template/overall_footer.html48
-rw-r--r--phpBB/styles/prosilver/template/overall_header.html184
-rw-r--r--phpBB/styles/prosilver/template/posting_attach_body.html21
-rw-r--r--phpBB/styles/prosilver/template/posting_body.html6
-rw-r--r--phpBB/styles/prosilver/template/posting_buttons.html108
-rw-r--r--phpBB/styles/prosilver/template/posting_editor.html266
-rw-r--r--phpBB/styles/prosilver/template/posting_layout.html90
-rw-r--r--phpBB/styles/prosilver/template/posting_pm_layout.html35
-rw-r--r--phpBB/styles/prosilver/template/posting_poll_body.html56
-rw-r--r--phpBB/styles/prosilver/template/posting_preview.html47
-rw-r--r--phpBB/styles/prosilver/template/posting_review.html35
-rw-r--r--phpBB/styles/prosilver/template/posting_smilies.html23
-rw-r--r--phpBB/styles/prosilver/template/posting_topic_review.html59
-rw-r--r--phpBB/styles/prosilver/template/quickreply_editor.html79
-rw-r--r--phpBB/styles/prosilver/template/report_body.html51
-rw-r--r--phpBB/styles/prosilver/template/search_body.html122
-rw-r--r--phpBB/styles/prosilver/template/search_results.html160
-rw-r--r--phpBB/styles/prosilver/template/simple_footer.html20
-rw-r--r--phpBB/styles/prosilver/template/simple_header.html72
-rw-r--r--phpBB/styles/prosilver/template/styleswitcher.js193
-rw-r--r--phpBB/styles/prosilver/template/template.cfg25
-rw-r--r--phpBB/styles/prosilver/template/ucp_agreement.html73
-rw-r--r--phpBB/styles/prosilver/template/ucp_attachments.html78
-rw-r--r--phpBB/styles/prosilver/template/ucp_avatar_options.html70
-rw-r--r--phpBB/styles/prosilver/template/ucp_footer.html15
-rw-r--r--phpBB/styles/prosilver/template/ucp_groups_manage.html232
-rw-r--r--phpBB/styles/prosilver/template/ucp_groups_membership.html164
-rw-r--r--phpBB/styles/prosilver/template/ucp_header.html101
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_bookmarks.html75
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_drafts.html73
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_front.html45
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_subscribed.html92
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_history.html32
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_message_footer.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_message_header.html35
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_options.html131
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_popup.html25
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewfolder.html130
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage.html111
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html130
-rw-r--r--phpBB/styles/prosilver/template/ucp_prefs_personal.html144
-rw-r--r--phpBB/styles/prosilver/template/ucp_prefs_post.html51
-rw-r--r--phpBB/styles/prosilver/template/ucp_prefs_view.html94
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_avatar.html19
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_profile_info.html79
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_reg_details.html63
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_signature.html51
-rw-r--r--phpBB/styles/prosilver/template/ucp_register.html113
-rw-r--r--phpBB/styles/prosilver/template/ucp_remind.html32
-rw-r--r--phpBB/styles/prosilver/template/ucp_resend.html32
-rw-r--r--phpBB/styles/prosilver/template/ucp_zebra_foes.html41
-rw-r--r--phpBB/styles/prosilver/template/ucp_zebra_friends.html41
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html218
-rw-r--r--phpBB/styles/prosilver/template/viewonline_body.html57
-rw-r--r--phpBB/styles/prosilver/template/viewonline_whois.html16
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html275
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_print.html63
-rw-r--r--phpBB/styles/prosilver/theme/bidi.css750
-rw-r--r--phpBB/styles/prosilver/theme/buttons.css169
-rw-r--r--phpBB/styles/prosilver/theme/colours.css1018
-rw-r--r--phpBB/styles/prosilver/theme/common.css632
-rw-r--r--phpBB/styles/prosilver/theme/content.css772
-rw-r--r--phpBB/styles/prosilver/theme/cp.css452
-rw-r--r--phpBB/styles/prosilver/theme/forms.css384
-rw-r--r--phpBB/styles/prosilver/theme/images/arrow_down.gifbin0 -> 113 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/arrow_left.gifbin0 -> 111 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/arrow_right.gifbin0 -> 111 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/arrow_up.gifbin0 -> 113 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/bg_button.gifbin0 -> 182 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/bg_header.gifbin0 -> 690 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/bg_list.gifbin0 -> 664 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/bg_menu.gifbin0 -> 354 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/bg_menu_rtl.gifbin0 -> 345 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/bg_tabs1.gifbin0 -> 1520 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/bg_tabs2.gifbin0 -> 420 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/corners_left.gifbin0 -> 55 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/corners_left.pngbin0 -> 195 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/corners_left2.gifbin0 -> 112 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/corners_right.gifbin0 -> 56 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/corners_right.pngbin0 -> 201 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/corners_right2.gifbin0 -> 111 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/created_by.jpgbin0 -> 52977 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/feed.gifbin0 -> 1089 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/gradient.gifbin0 -> 549 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_bookmark.gifbin0 -> 218 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_bump.gifbin0 -> 148 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_faq.gifbin0 -> 255 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_fontsize.gifbin0 -> 559 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_home.gifbin0 -> 306 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_logout.gifbin0 -> 219 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_members.gifbin0 -> 264 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_pages.gifbin0 -> 167 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_print.gifbin0 -> 424 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_register.gifbin0 -> 231 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_search.gifbin0 -> 334 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_sendemail.gifbin0 -> 531 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_subscribe.gifbin0 -> 216 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_textbox_search.gifbin0 -> 335 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_ucp.gifbin0 -> 254 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_unsubscribe.gifbin0 -> 214 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/index.htm0
-rw-r--r--phpBB/styles/prosilver/theme/images/no_avatar.gifbin0 -> 474 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/quote.gifbin0 -> 153 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/quote_rtl.gifbin0 -> 154 bytes
-rw-r--r--phpBB/styles/prosilver/theme/index.htm0
-rw-r--r--phpBB/styles/prosilver/theme/large.css3
-rw-r--r--phpBB/styles/prosilver/theme/links.css213
-rw-r--r--phpBB/styles/prosilver/theme/medium.css3
-rw-r--r--phpBB/styles/prosilver/theme/normal.css3
-rw-r--r--phpBB/styles/prosilver/theme/print.css142
-rw-r--r--phpBB/styles/prosilver/theme/stylesheet.css19
-rw-r--r--phpBB/styles/prosilver/theme/theme.cfg35
-rw-r--r--phpBB/styles/prosilver/theme/tweaks.css92
-rw-r--r--phpBB/styles/subsilver2/imageset/announce_read.gifbin0 -> 307 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/announce_read_locked.gifbin0 -> 304 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/announce_read_locked_mine.gifbin0 -> 324 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/announce_read_mine.gifbin0 -> 328 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/announce_unread.gifbin0 -> 289 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/announce_unread_locked.gifbin0 -> 292 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/announce_unread_locked_mine.gifbin0 -> 308 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/announce_unread_mine.gifbin0 -> 305 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/button_pm_new.gifbin0 -> 1135 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/button_pm_reply.gifbin0 -> 1667 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/button_topic_locked.gifbin0 -> 1101 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/button_topic_new.gifbin0 -> 1164 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/button_topic_reply.gifbin0 -> 1234 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_contact_aim.gifbin0 -> 580 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_contact_email.gifbin0 -> 659 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_contact_icq.gifbin0 -> 574 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_contact_jabber.gifbin0 -> 674 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_contact_msnm.gifbin0 -> 622 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_contact_pm.gifbin0 -> 706 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_contact_www.gifbin0 -> 604 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_contact_yahoo.gifbin0 -> 663 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_post_delete.gifbin0 -> 314 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_post_edit.gifbin0 -> 662 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_post_info.gifbin0 -> 305 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_post_quote.gifbin0 -> 666 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_post_report.gifbin0 -> 308 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_user_offline.gifbin0 -> 547 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_user_online.gifbin0 -> 520 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_user_profile.gifbin0 -> 667 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_user_search.gifbin0 -> 608 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_user_warn.gifbin0 -> 673 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/imageset.cfg47
-rw-r--r--phpBB/styles/subsilver2/imageset/forum_link.gifbin0 -> 714 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/forum_read.gifbin0 -> 677 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/forum_read_locked.gifbin0 -> 673 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/forum_read_subforum.gifbin0 -> 705 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/forum_unread.gifbin0 -> 663 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/forum_unread_locked.gifbin0 -> 660 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/forum_unread_subforum.gifbin0 -> 688 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/icon_post_target.gifbin0 -> 122 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/icon_post_target_unread.gifbin0 -> 122 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/icon_topic_attach.gifbin0 -> 217 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/icon_topic_latest.gifbin0 -> 135 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/icon_topic_newest.gifbin0 -> 133 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/icon_topic_reported.gifbin0 -> 462 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/icon_topic_unapproved.gifbin0 -> 334 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/imageset.cfg100
-rw-r--r--phpBB/styles/subsilver2/imageset/poll_center.gifbin0 -> 92 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/poll_left.gifbin0 -> 113 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/poll_right.gifbin0 -> 113 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/site_logo.gifbin0 -> 7151 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/sticky_read.gifbin0 -> 344 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/sticky_read_locked.gifbin0 -> 338 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/sticky_read_locked_mine.gifbin0 -> 336 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/sticky_read_mine.gifbin0 -> 352 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/sticky_unread.gifbin0 -> 325 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/sticky_unread_locked.gifbin0 -> 324 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/sticky_unread_locked_mine.gifbin0 -> 336 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/sticky_unread_mine.gifbin0 -> 339 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/topic_moved.gifbin0 -> 660 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/topic_read.gifbin0 -> 344 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/topic_read_hot.gifbin0 -> 1902 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/topic_read_hot_mine.gifbin0 -> 1903 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/topic_read_locked.gifbin0 -> 333 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/topic_read_locked_mine.gifbin0 -> 337 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/topic_read_mine.gifbin0 -> 350 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/topic_unread.gifbin0 -> 336 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/topic_unread_hot.gifbin0 -> 1888 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/topic_unread_hot_mine.gifbin0 -> 1895 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/topic_unread_locked.gifbin0 -> 459 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/topic_unread_locked_mine.gifbin0 -> 334 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/topic_unread_mine.gifbin0 -> 350 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/upload_bar.gifbin0 -> 12892 bytes
-rw-r--r--phpBB/styles/subsilver2/style.cfg22
-rw-r--r--phpBB/styles/subsilver2/template/attachment.html121
-rw-r--r--phpBB/styles/subsilver2/template/bbcode.html69
-rw-r--r--phpBB/styles/subsilver2/template/breadcrumbs.html8
-rw-r--r--phpBB/styles/subsilver2/template/captcha_default.html15
-rw-r--r--phpBB/styles/subsilver2/template/captcha_qa.html8
-rw-r--r--phpBB/styles/subsilver2/template/captcha_recaptcha.html35
-rw-r--r--phpBB/styles/subsilver2/template/confirm_body.html28
-rw-r--r--phpBB/styles/subsilver2/template/custom_profile_fields.html31
-rw-r--r--phpBB/styles/subsilver2/template/editor.js401
-rw-r--r--phpBB/styles/subsilver2/template/faq_body.html63
-rw-r--r--phpBB/styles/subsilver2/template/forumlist_body.html74
-rw-r--r--phpBB/styles/subsilver2/template/index.htm16
-rw-r--r--phpBB/styles/subsilver2/template/index_body.html102
-rw-r--r--phpBB/styles/subsilver2/template/jumpbox.html19
-rw-r--r--phpBB/styles/subsilver2/template/login_body.html91
-rw-r--r--phpBB/styles/subsilver2/template/login_forum.html47
-rw-r--r--phpBB/styles/subsilver2/template/mcp_approve.html49
-rw-r--r--phpBB/styles/subsilver2/template/mcp_ban.html109
-rw-r--r--phpBB/styles/subsilver2/template/mcp_footer.html27
-rw-r--r--phpBB/styles/subsilver2/template/mcp_forum.html89
-rw-r--r--phpBB/styles/subsilver2/template/mcp_front.html155
-rw-r--r--phpBB/styles/subsilver2/template/mcp_header.html79
-rw-r--r--phpBB/styles/subsilver2/template/mcp_jumpbox.html18
-rw-r--r--phpBB/styles/subsilver2/template/mcp_logs.html46
-rw-r--r--phpBB/styles/subsilver2/template/mcp_message.html14
-rw-r--r--phpBB/styles/subsilver2/template/mcp_move.html43
-rw-r--r--phpBB/styles/subsilver2/template/mcp_notes_front.html22
-rw-r--r--phpBB/styles/subsilver2/template/mcp_notes_user.html125
-rw-r--r--phpBB/styles/subsilver2/template/mcp_post.html206
-rw-r--r--phpBB/styles/subsilver2/template/mcp_queue.html46
-rw-r--r--phpBB/styles/subsilver2/template/mcp_reports.html67
-rw-r--r--phpBB/styles/subsilver2/template/mcp_topic.html151
-rw-r--r--phpBB/styles/subsilver2/template/mcp_viewlogs.html52
-rw-r--r--phpBB/styles/subsilver2/template/mcp_warn_front.html74
-rw-r--r--phpBB/styles/subsilver2/template/mcp_warn_list.html43
-rw-r--r--phpBB/styles/subsilver2/template/mcp_warn_post.html62
-rw-r--r--phpBB/styles/subsilver2/template/mcp_warn_user.html75
-rw-r--r--phpBB/styles/subsilver2/template/mcp_whois.html15
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_body.html116
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_email.html73
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_group.html17
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_im.html139
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_leaders.html71
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_search.html143
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_view.html207
-rw-r--r--phpBB/styles/subsilver2/template/message_body.html16
-rw-r--r--phpBB/styles/subsilver2/template/overall_footer.html23
-rw-r--r--phpBB/styles/subsilver2/template/overall_header.html213
-rw-r--r--phpBB/styles/subsilver2/template/pagination.html1
-rw-r--r--phpBB/styles/subsilver2/template/posting_attach_body.html83
-rw-r--r--phpBB/styles/subsilver2/template/posting_body.html413
-rw-r--r--phpBB/styles/subsilver2/template/posting_buttons.html87
-rw-r--r--phpBB/styles/subsilver2/template/posting_poll_body.html36
-rw-r--r--phpBB/styles/subsilver2/template/posting_preview.html70
-rw-r--r--phpBB/styles/subsilver2/template/posting_progress_bar.html44
-rw-r--r--phpBB/styles/subsilver2/template/posting_review.html99
-rw-r--r--phpBB/styles/subsilver2/template/posting_smilies.html25
-rw-r--r--phpBB/styles/subsilver2/template/posting_topic_review.html98
-rw-r--r--phpBB/styles/subsilver2/template/quickreply_editor.html27
-rw-r--r--phpBB/styles/subsilver2/template/report_body.html41
-rw-r--r--phpBB/styles/subsilver2/template/search_body.html78
-rw-r--r--phpBB/styles/subsilver2/template/search_results.html146
-rw-r--r--phpBB/styles/subsilver2/template/searchbox.html1
-rw-r--r--phpBB/styles/subsilver2/template/simple_footer.html20
-rw-r--r--phpBB/styles/subsilver2/template/simple_header.html22
-rw-r--r--phpBB/styles/subsilver2/template/template.cfg23
-rw-r--r--phpBB/styles/subsilver2/template/ucp_agreement.html84
-rw-r--r--phpBB/styles/subsilver2/template/ucp_attachments.html58
-rw-r--r--phpBB/styles/subsilver2/template/ucp_footer.html13
-rw-r--r--phpBB/styles/subsilver2/template/ucp_groups_manage.html257
-rw-r--r--phpBB/styles/subsilver2/template/ucp_groups_membership.html93
-rw-r--r--phpBB/styles/subsilver2/template/ucp_header.html163
-rw-r--r--phpBB/styles/subsilver2/template/ucp_main_bookmarks.html77
-rw-r--r--phpBB/styles/subsilver2/template/ucp_main_drafts.html101
-rw-r--r--phpBB/styles/subsilver2/template/ucp_main_front.html72
-rw-r--r--phpBB/styles/subsilver2/template/ucp_main_subscribed.html84
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_history.html68
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_message_footer.html46
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_message_header.html34
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_options.html192
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_popup.html37
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html128
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html124
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html131
-rw-r--r--phpBB/styles/subsilver2/template/ucp_prefs_personal.html98
-rw-r--r--phpBB/styles/subsilver2/template/ucp_prefs_post.html33
-rw-r--r--phpBB/styles/subsilver2/template/ucp_prefs_view.html73
-rw-r--r--phpBB/styles/subsilver2/template/ucp_profile_avatar.html87
-rw-r--r--phpBB/styles/subsilver2/template/ucp_profile_profile_info.html72
-rw-r--r--phpBB/styles/subsilver2/template/ucp_profile_reg_details.html53
-rw-r--r--phpBB/styles/subsilver2/template/ucp_profile_signature.html110
-rw-r--r--phpBB/styles/subsilver2/template/ucp_register.html101
-rw-r--r--phpBB/styles/subsilver2/template/ucp_remind.html28
-rw-r--r--phpBB/styles/subsilver2/template/ucp_resend.html29
-rw-r--r--phpBB/styles/subsilver2/template/ucp_zebra_foes.html28
-rw-r--r--phpBB/styles/subsilver2/template/ucp_zebra_friends.html28
-rw-r--r--phpBB/styles/subsilver2/template/viewforum_body.html329
-rw-r--r--phpBB/styles/subsilver2/template/viewonline_body.html57
-rw-r--r--phpBB/styles/subsilver2/template/viewonline_whois.html12
-rw-r--r--phpBB/styles/subsilver2/template/viewtopic_body.html364
-rw-r--r--phpBB/styles/subsilver2/template/viewtopic_print.html145
-rw-r--r--phpBB/styles/subsilver2/theme/images/background.gifbin0 -> 666 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/cellpic.gifbin0 -> 722 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/cellpic1.gifbin0 -> 246 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/cellpic2.jpgbin0 -> 480 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/cellpic2_rtl.jpgbin0 -> 601 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/cellpic3.gifbin0 -> 257 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/created_by.jpgbin0 -> 15319 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_mini_faq.gifbin0 -> 219 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_mini_groups.gifbin0 -> 222 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_mini_login.gifbin0 -> 233 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_mini_members.gifbin0 -> 223 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_mini_message.gifbin0 -> 232 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_mini_profile.gifbin0 -> 238 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_mini_register.gifbin0 -> 224 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_mini_search.gifbin0 -> 238 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/index.htm16
-rw-r--r--phpBB/styles/subsilver2/theme/images/no_avatar.gifbin0 -> 474 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/spacer.gifbin0 -> 43 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/whosonline.gifbin0 -> 929 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/stylesheet.css663
-rw-r--r--phpBB/styles/subsilver2/theme/theme.cfg35
-rw-r--r--phpBB/ucp.php349
-rw-r--r--phpBB/viewforum.php703
-rw-r--r--phpBB/viewonline.php445
-rw-r--r--phpBB/viewtopic.php1739
992 files changed, 245793 insertions, 0 deletions
diff --git a/phpBB/.htaccess b/phpBB/.htaccess
new file mode 100644
index 0000000000..41fb129175
--- /dev/null
+++ b/phpBB/.htaccess
@@ -0,0 +1,9 @@
+<Files "config.php">
+Order Allow,Deny
+Deny from All
+</Files>
+
+<Files "common.php">
+Order Allow,Deny
+Deny from All
+</Files>
diff --git a/phpBB/adm/images/arrow_down.gif b/phpBB/adm/images/arrow_down.gif
new file mode 100644
index 0000000000..e45c365ecc
--- /dev/null
+++ b/phpBB/adm/images/arrow_down.gif
Binary files differ
diff --git a/phpBB/adm/images/arrow_left.gif b/phpBB/adm/images/arrow_left.gif
new file mode 100644
index 0000000000..076a5596f1
--- /dev/null
+++ b/phpBB/adm/images/arrow_left.gif
Binary files differ
diff --git a/phpBB/adm/images/arrow_right.gif b/phpBB/adm/images/arrow_right.gif
new file mode 100644
index 0000000000..c5827a401f
--- /dev/null
+++ b/phpBB/adm/images/arrow_right.gif
Binary files differ
diff --git a/phpBB/adm/images/arrow_up.gif b/phpBB/adm/images/arrow_up.gif
new file mode 100644
index 0000000000..38b5a62c17
--- /dev/null
+++ b/phpBB/adm/images/arrow_up.gif
Binary files differ
diff --git a/phpBB/adm/images/bg_button.gif b/phpBB/adm/images/bg_button.gif
new file mode 100644
index 0000000000..03172ff5c6
--- /dev/null
+++ b/phpBB/adm/images/bg_button.gif
Binary files differ
diff --git a/phpBB/adm/images/bg_hash1.gif b/phpBB/adm/images/bg_hash1.gif
new file mode 100644
index 0000000000..61163679a8
--- /dev/null
+++ b/phpBB/adm/images/bg_hash1.gif
Binary files differ
diff --git a/phpBB/adm/images/bg_hash2.gif b/phpBB/adm/images/bg_hash2.gif
new file mode 100644
index 0000000000..d31840361c
--- /dev/null
+++ b/phpBB/adm/images/bg_hash2.gif
Binary files differ
diff --git a/phpBB/adm/images/bg_hash3.gif b/phpBB/adm/images/bg_hash3.gif
new file mode 100644
index 0000000000..40bc7e1b5c
--- /dev/null
+++ b/phpBB/adm/images/bg_hash3.gif
Binary files differ
diff --git a/phpBB/adm/images/bg_hash4.gif b/phpBB/adm/images/bg_hash4.gif
new file mode 100644
index 0000000000..54e7f0019f
--- /dev/null
+++ b/phpBB/adm/images/bg_hash4.gif
Binary files differ
diff --git a/phpBB/adm/images/bg_header.gif b/phpBB/adm/images/bg_header.gif
new file mode 100644
index 0000000000..b95bf3ba95
--- /dev/null
+++ b/phpBB/adm/images/bg_header.gif
Binary files differ
diff --git a/phpBB/adm/images/bg_header.jpg b/phpBB/adm/images/bg_header.jpg
new file mode 100644
index 0000000000..5ecec5360b
--- /dev/null
+++ b/phpBB/adm/images/bg_header.jpg
Binary files differ
diff --git a/phpBB/adm/images/bg_tabs1.gif b/phpBB/adm/images/bg_tabs1.gif
new file mode 100644
index 0000000000..d129365661
--- /dev/null
+++ b/phpBB/adm/images/bg_tabs1.gif
Binary files differ
diff --git a/phpBB/adm/images/bg_tabs2.gif b/phpBB/adm/images/bg_tabs2.gif
new file mode 100644
index 0000000000..0aace9b6db
--- /dev/null
+++ b/phpBB/adm/images/bg_tabs2.gif
Binary files differ
diff --git a/phpBB/adm/images/bg_tabs_alt1.gif b/phpBB/adm/images/bg_tabs_alt1.gif
new file mode 100644
index 0000000000..335a72c711
--- /dev/null
+++ b/phpBB/adm/images/bg_tabs_alt1.gif
Binary files differ
diff --git a/phpBB/adm/images/bg_tabs_alt2.gif b/phpBB/adm/images/bg_tabs_alt2.gif
new file mode 100644
index 0000000000..a2142d5432
--- /dev/null
+++ b/phpBB/adm/images/bg_tabs_alt2.gif
Binary files differ
diff --git a/phpBB/adm/images/cellpic3.gif b/phpBB/adm/images/cellpic3.gif
new file mode 100644
index 0000000000..be46fc6fcc
--- /dev/null
+++ b/phpBB/adm/images/cellpic3.gif
Binary files differ
diff --git a/phpBB/adm/images/corners_left.gif b/phpBB/adm/images/corners_left.gif
new file mode 100644
index 0000000000..bacd276495
--- /dev/null
+++ b/phpBB/adm/images/corners_left.gif
Binary files differ
diff --git a/phpBB/adm/images/corners_left2.gif b/phpBB/adm/images/corners_left2.gif
new file mode 100644
index 0000000000..206e50368d
--- /dev/null
+++ b/phpBB/adm/images/corners_left2.gif
Binary files differ
diff --git a/phpBB/adm/images/corners_right.gif b/phpBB/adm/images/corners_right.gif
new file mode 100644
index 0000000000..bcb5bd7d14
--- /dev/null
+++ b/phpBB/adm/images/corners_right.gif
Binary files differ
diff --git a/phpBB/adm/images/corners_right2.gif b/phpBB/adm/images/corners_right2.gif
new file mode 100644
index 0000000000..0ba66d50b2
--- /dev/null
+++ b/phpBB/adm/images/corners_right2.gif
Binary files differ
diff --git a/phpBB/adm/images/file_conflict.gif b/phpBB/adm/images/file_conflict.gif
new file mode 100644
index 0000000000..4458c4ff23
--- /dev/null
+++ b/phpBB/adm/images/file_conflict.gif
Binary files differ
diff --git a/phpBB/adm/images/file_modified.gif b/phpBB/adm/images/file_modified.gif
new file mode 100644
index 0000000000..17e8f976c3
--- /dev/null
+++ b/phpBB/adm/images/file_modified.gif
Binary files differ
diff --git a/phpBB/adm/images/file_new.gif b/phpBB/adm/images/file_new.gif
new file mode 100644
index 0000000000..d0ec75876d
--- /dev/null
+++ b/phpBB/adm/images/file_new.gif
Binary files differ
diff --git a/phpBB/adm/images/file_new_conflict.gif b/phpBB/adm/images/file_new_conflict.gif
new file mode 100644
index 0000000000..84efde4faa
--- /dev/null
+++ b/phpBB/adm/images/file_new_conflict.gif
Binary files differ
diff --git a/phpBB/adm/images/file_not_modified.gif b/phpBB/adm/images/file_not_modified.gif
new file mode 100644
index 0000000000..8f9b3d3839
--- /dev/null
+++ b/phpBB/adm/images/file_not_modified.gif
Binary files differ
diff --git a/phpBB/adm/images/file_up_to_date.gif b/phpBB/adm/images/file_up_to_date.gif
new file mode 100644
index 0000000000..c372342646
--- /dev/null
+++ b/phpBB/adm/images/file_up_to_date.gif
Binary files differ
diff --git a/phpBB/adm/images/gradient2b.gif b/phpBB/adm/images/gradient2b.gif
new file mode 100644
index 0000000000..a8107659e2
--- /dev/null
+++ b/phpBB/adm/images/gradient2b.gif
Binary files differ
diff --git a/phpBB/adm/images/icon_delete.gif b/phpBB/adm/images/icon_delete.gif
new file mode 100644
index 0000000000..57962d5172
--- /dev/null
+++ b/phpBB/adm/images/icon_delete.gif
Binary files differ
diff --git a/phpBB/adm/images/icon_delete_disabled.gif b/phpBB/adm/images/icon_delete_disabled.gif
new file mode 100644
index 0000000000..da55bbbe44
--- /dev/null
+++ b/phpBB/adm/images/icon_delete_disabled.gif
Binary files differ
diff --git a/phpBB/adm/images/icon_down.gif b/phpBB/adm/images/icon_down.gif
new file mode 100644
index 0000000000..793db26cde
--- /dev/null
+++ b/phpBB/adm/images/icon_down.gif
Binary files differ
diff --git a/phpBB/adm/images/icon_down_disabled.gif b/phpBB/adm/images/icon_down_disabled.gif
new file mode 100644
index 0000000000..3ba36975b4
--- /dev/null
+++ b/phpBB/adm/images/icon_down_disabled.gif
Binary files differ
diff --git a/phpBB/adm/images/icon_edit.gif b/phpBB/adm/images/icon_edit.gif
new file mode 100644
index 0000000000..c95cf98eb9
--- /dev/null
+++ b/phpBB/adm/images/icon_edit.gif
Binary files differ
diff --git a/phpBB/adm/images/icon_edit_disabled.gif b/phpBB/adm/images/icon_edit_disabled.gif
new file mode 100644
index 0000000000..ac96b0e6dc
--- /dev/null
+++ b/phpBB/adm/images/icon_edit_disabled.gif
Binary files differ
diff --git a/phpBB/adm/images/icon_folder.gif b/phpBB/adm/images/icon_folder.gif
new file mode 100644
index 0000000000..82ceee0784
--- /dev/null
+++ b/phpBB/adm/images/icon_folder.gif
Binary files differ
diff --git a/phpBB/adm/images/icon_folder_link.gif b/phpBB/adm/images/icon_folder_link.gif
new file mode 100644
index 0000000000..01fb1c4e1e
--- /dev/null
+++ b/phpBB/adm/images/icon_folder_link.gif
Binary files differ
diff --git a/phpBB/adm/images/icon_folder_lock.gif b/phpBB/adm/images/icon_folder_lock.gif
new file mode 100644
index 0000000000..450bf28c3c
--- /dev/null
+++ b/phpBB/adm/images/icon_folder_lock.gif
Binary files differ
diff --git a/phpBB/adm/images/icon_subfolder.gif b/phpBB/adm/images/icon_subfolder.gif
new file mode 100644
index 0000000000..5e97bc94ce
--- /dev/null
+++ b/phpBB/adm/images/icon_subfolder.gif
Binary files differ
diff --git a/phpBB/adm/images/icon_sync.gif b/phpBB/adm/images/icon_sync.gif
new file mode 100644
index 0000000000..16223dfd9a
--- /dev/null
+++ b/phpBB/adm/images/icon_sync.gif
Binary files differ
diff --git a/phpBB/adm/images/icon_sync_disabled.gif b/phpBB/adm/images/icon_sync_disabled.gif
new file mode 100644
index 0000000000..39985045c8
--- /dev/null
+++ b/phpBB/adm/images/icon_sync_disabled.gif
Binary files differ
diff --git a/phpBB/adm/images/icon_trace.gif b/phpBB/adm/images/icon_trace.gif
new file mode 100644
index 0000000000..5c622e9a9d
--- /dev/null
+++ b/phpBB/adm/images/icon_trace.gif
Binary files differ
diff --git a/phpBB/adm/images/icon_up.gif b/phpBB/adm/images/icon_up.gif
new file mode 100644
index 0000000000..7daa95c07e
--- /dev/null
+++ b/phpBB/adm/images/icon_up.gif
Binary files differ
diff --git a/phpBB/adm/images/icon_up_disabled.gif b/phpBB/adm/images/icon_up_disabled.gif
new file mode 100644
index 0000000000..2797192574
--- /dev/null
+++ b/phpBB/adm/images/icon_up_disabled.gif
Binary files differ
diff --git a/phpBB/adm/images/innerbox_bg.gif b/phpBB/adm/images/innerbox_bg.gif
new file mode 100644
index 0000000000..460526f0ba
--- /dev/null
+++ b/phpBB/adm/images/innerbox_bg.gif
Binary files differ
diff --git a/phpBB/adm/images/no_avatar.gif b/phpBB/adm/images/no_avatar.gif
new file mode 100644
index 0000000000..80539c8c71
--- /dev/null
+++ b/phpBB/adm/images/no_avatar.gif
Binary files differ
diff --git a/phpBB/adm/images/no_image.png b/phpBB/adm/images/no_image.png
new file mode 100644
index 0000000000..1061ee3b8f
--- /dev/null
+++ b/phpBB/adm/images/no_image.png
Binary files differ
diff --git a/phpBB/adm/images/phpbb_logo.gif b/phpBB/adm/images/phpbb_logo.gif
new file mode 100644
index 0000000000..239993182b
--- /dev/null
+++ b/phpBB/adm/images/phpbb_logo.gif
Binary files differ
diff --git a/phpBB/adm/images/progress_bar.gif b/phpBB/adm/images/progress_bar.gif
new file mode 100644
index 0000000000..1ae265152c
--- /dev/null
+++ b/phpBB/adm/images/progress_bar.gif
Binary files differ
diff --git a/phpBB/adm/images/spacer.gif b/phpBB/adm/images/spacer.gif
new file mode 100644
index 0000000000..cd29009a65
--- /dev/null
+++ b/phpBB/adm/images/spacer.gif
Binary files differ
diff --git a/phpBB/adm/images/toggle.gif b/phpBB/adm/images/toggle.gif
new file mode 100644
index 0000000000..8af6861bd1
--- /dev/null
+++ b/phpBB/adm/images/toggle.gif
Binary files differ
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php
new file mode 100644
index 0000000000..26f934f6bf
--- /dev/null
+++ b/phpBB/adm/index.php
@@ -0,0 +1,607 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+*/
+define('IN_PHPBB', true);
+define('ADMIN_START', true);
+define('NEED_SID', true);
+
+// Include files
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+require($phpbb_root_path . 'common.' . $phpEx);
+require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+require($phpbb_root_path . 'includes/functions_module.' . $phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup('acp/common');
+// End session management
+
+// Have they authenticated (again) as an admin for this session?
+if (!isset($user->data['session_admin']) || !$user->data['session_admin'])
+{
+ login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false);
+}
+
+// Is user any type of admin? No, then stop here, each script needs to
+// check specific permissions but this is a catchall
+if (!$auth->acl_get('a_'))
+{
+ trigger_error('NO_ADMIN');
+}
+
+// We define the admin variables now, because the user is now able to use the admin related features...
+define('IN_ADMIN', true);
+$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : './';
+
+// Some oft used variables
+$safe_mode = (@ini_get('safe_mode') == '1' || strtolower(@ini_get('safe_mode')) === 'on') ? true : false;
+$file_uploads = (@ini_get('file_uploads') == '1' || strtolower(@ini_get('file_uploads')) === 'on') ? true : false;
+$module_id = request_var('i', '');
+$mode = request_var('mode', '');
+
+// Set custom template for admin area
+$template->set_custom_template($phpbb_admin_path . 'style', 'admin');
+$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
+
+// the acp template is never stored in the database
+$user->theme['template_storedb'] = false;
+
+// Instantiate new module
+$module = new p_master();
+
+// Instantiate module system and generate list of available modules
+$module->list_modules('acp');
+
+// Select the active module
+$module->set_active($module_id, $mode);
+
+// Assign data to the template engine for the list of modules
+// We do this before loading the active module for correct menu display in trigger_error
+$module->assign_tpl_vars(append_sid("{$phpbb_admin_path}index.$phpEx"));
+
+// Load and execute the relevant module
+$module->load_active();
+
+// Generate the page
+adm_page_header($module->get_page_title());
+
+$template->set_filenames(array(
+ 'body' => $module->get_tpl_name(),
+));
+
+adm_page_footer();
+
+/**
+* Header for acp pages
+*/
+function adm_page_header($page_title)
+{
+ global $config, $db, $user, $template;
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID, $_SID;
+
+ if (defined('HEADER_INC'))
+ {
+ return;
+ }
+
+ define('HEADER_INC', true);
+
+ // gzip_compression
+ if ($config['gzip_compress'])
+ {
+ if (@extension_loaded('zlib') && !headers_sent())
+ {
+ ob_start('ob_gzhandler');
+ }
+ }
+
+ $template->assign_vars(array(
+ 'PAGE_TITLE' => $page_title,
+ 'USERNAME' => $user->data['username'],
+
+ 'SID' => $SID,
+ '_SID' => $_SID,
+ 'SESSION_ID' => $user->session_id,
+ 'ROOT_PATH' => $phpbb_admin_path,
+
+ 'U_LOGOUT' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout'),
+ 'U_ADM_LOGOUT' => append_sid("{$phpbb_admin_path}index.$phpEx", 'action=admlogout'),
+ 'U_ADM_INDEX' => append_sid("{$phpbb_admin_path}index.$phpEx"),
+ 'U_INDEX' => append_sid("{$phpbb_root_path}index.$phpEx"),
+
+ 'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
+ 'T_SMILIES_PATH' => "{$phpbb_root_path}{$config['smilies_path']}/",
+ 'T_AVATAR_PATH' => "{$phpbb_root_path}{$config['avatar_path']}/",
+ 'T_AVATAR_GALLERY_PATH' => "{$phpbb_root_path}{$config['avatar_gallery_path']}/",
+ 'T_ICONS_PATH' => "{$phpbb_root_path}{$config['icons_path']}/",
+ 'T_RANKS_PATH' => "{$phpbb_root_path}{$config['ranks_path']}/",
+ 'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/",
+
+ 'ICON_MOVE_UP' => '<img src="' . $phpbb_admin_path . 'images/icon_up.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
+ 'ICON_MOVE_UP_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_up_disabled.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
+ 'ICON_MOVE_DOWN' => '<img src="' . $phpbb_admin_path . 'images/icon_down.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
+ 'ICON_MOVE_DOWN_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_down_disabled.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
+ 'ICON_EDIT' => '<img src="' . $phpbb_admin_path . 'images/icon_edit.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
+ 'ICON_EDIT_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_edit_disabled.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
+ 'ICON_DELETE' => '<img src="' . $phpbb_admin_path . 'images/icon_delete.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
+ 'ICON_DELETE_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_delete_disabled.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
+ 'ICON_SYNC' => '<img src="' . $phpbb_admin_path . 'images/icon_sync.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
+ 'ICON_SYNC_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_sync_disabled.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
+
+ 'S_USER_LANG' => $user->lang['USER_LANG'],
+ 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
+ 'S_CONTENT_ENCODING' => 'UTF-8',
+ 'S_CONTENT_FLOW_BEGIN' => ($user->lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
+ 'S_CONTENT_FLOW_END' => ($user->lang['DIRECTION'] == 'ltr') ? 'right' : 'left',
+ ));
+
+ // application/xhtml+xml not used because of IE
+ header('Content-type: text/html; charset=UTF-8');
+
+ header('Cache-Control: private, no-cache="set-cookie"');
+ header('Expires: 0');
+ header('Pragma: no-cache');
+
+ return;
+}
+
+/**
+* Page footer for acp pages
+*/
+function adm_page_footer($copyright_html = true)
+{
+ global $db, $config, $template, $user, $auth, $cache;
+ global $starttime, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ // Output page creation time
+ if (defined('DEBUG'))
+ {
+ $mtime = explode(' ', microtime());
+ $totaltime = $mtime[0] + $mtime[1] - $starttime;
+
+ if (!empty($_REQUEST['explain']) && $auth->acl_get('a_') && defined('DEBUG_EXTRA') && method_exists($db, 'sql_report'))
+ {
+ $db->sql_report('display');
+ }
+
+ $debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress']) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime);
+
+ if ($auth->acl_get('a_') && defined('DEBUG_EXTRA'))
+ {
+ if (function_exists('memory_get_usage'))
+ {
+ if ($memory_usage = memory_get_usage())
+ {
+ global $base_memory_usage;
+ $memory_usage -= $base_memory_usage;
+ $memory_usage = get_formatted_filesize($memory_usage);
+
+ $debug_output .= ' | Memory Usage: ' . $memory_usage;
+ }
+ }
+
+ $debug_output .= ' | <a href="' . build_url() . '&amp;explain=1">Explain</a>';
+ }
+ }
+
+ $template->assign_vars(array(
+ 'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '',
+ 'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
+ 'S_COPYRIGHT_HTML' => $copyright_html,
+ 'VERSION' => $config['version'])
+ );
+
+ $template->display('body');
+
+ garbage_collection();
+ exit_handler();
+}
+
+/**
+* Generate back link for acp pages
+*/
+function adm_back_link($u_action)
+{
+ global $user;
+ return '<br /><br /><a href="' . $u_action . '">&laquo; ' . $user->lang['BACK_TO_PREV'] . '</a>';
+}
+
+/**
+* Build select field options in acp pages
+*/
+function build_select($option_ary, $option_default = false)
+{
+ global $user;
+
+ $html = '';
+ foreach ($option_ary as $value => $title)
+ {
+ $selected = ($option_default !== false && $value == $option_default) ? ' selected="selected"' : '';
+ $html .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$title] . '</option>';
+ }
+
+ return $html;
+}
+
+/**
+* Build radio fields in acp pages
+*/
+function h_radio($name, &$input_ary, $input_default = false, $id = false, $key = false)
+{
+ global $user;
+
+ $html = '';
+ $id_assigned = false;
+ foreach ($input_ary as $value => $title)
+ {
+ $selected = ($input_default !== false && $value == $input_default) ? ' checked="checked"' : '';
+ $html .= '<label><input type="radio" name="' . $name . '"' . (($id && !$id_assigned) ? ' id="' . $id . '"' : '') . ' value="' . $value . '"' . $selected . (($key) ? ' accesskey="' . $key . '"' : '') . ' class="radio" /> ' . $user->lang[$title] . '</label>';
+ $id_assigned = true;
+ }
+
+ return $html;
+}
+
+/**
+* Build configuration template for acp configuration pages
+*/
+function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
+{
+ global $user, $module;
+
+ $tpl = '';
+ $name = 'config[' . $config_key . ']';
+
+ // Make sure there is no notice printed out for non-existent config options (we simply set them)
+ if (!isset($new[$config_key]))
+ {
+ $new[$config_key] = '';
+ }
+
+ switch ($tpl_type[0])
+ {
+ case 'text':
+ case 'password':
+ $size = (int) $tpl_type[1];
+ $maxlength = (int) $tpl_type[2];
+
+ $tpl = '<input id="' . $key . '" type="' . $tpl_type[0] . '"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="' . $name . '" value="' . $new[$config_key] . '" />';
+ break;
+
+ case 'dimension':
+ $size = (int) $tpl_type[1];
+ $maxlength = (int) $tpl_type[2];
+
+ $tpl = '<input id="' . $key . '" type="text"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="config[' . $config_key . '_width]" value="' . $new[$config_key . '_width'] . '" /> x <input type="text"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="config[' . $config_key . '_height]" value="' . $new[$config_key . '_height'] . '" />';
+ break;
+
+ case 'textarea':
+ $rows = (int) $tpl_type[1];
+ $cols = (int) $tpl_type[2];
+
+ $tpl = '<textarea id="' . $key . '" name="' . $name . '" rows="' . $rows . '" cols="' . $cols . '">' . $new[$config_key] . '</textarea>';
+ break;
+
+ case 'radio':
+ $key_yes = ($new[$config_key]) ? ' checked="checked"' : '';
+ $key_no = (!$new[$config_key]) ? ' checked="checked"' : '';
+
+ $tpl_type_cond = explode('_', $tpl_type[1]);
+ $type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true;
+
+ $tpl_no = '<label><input type="radio" name="' . $name . '" value="0"' . $key_no . ' class="radio" /> ' . (($type_no) ? $user->lang['NO'] : $user->lang['DISABLED']) . '</label>';
+ $tpl_yes = '<label><input type="radio" id="' . $key . '" name="' . $name . '" value="1"' . $key_yes . ' class="radio" /> ' . (($type_no) ? $user->lang['YES'] : $user->lang['ENABLED']) . '</label>';
+
+ $tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . $tpl_no : $tpl_no . $tpl_yes;
+ break;
+
+ case 'select':
+ case 'custom':
+
+ $return = '';
+
+ if (isset($vars['method']))
+ {
+ $call = array($module->module, $vars['method']);
+ }
+ else if (isset($vars['function']))
+ {
+ $call = $vars['function'];
+ }
+ else
+ {
+ break;
+ }
+
+ if (isset($vars['params']))
+ {
+ $args = array();
+ foreach ($vars['params'] as $value)
+ {
+ switch ($value)
+ {
+ case '{CONFIG_VALUE}':
+ $value = $new[$config_key];
+ break;
+
+ case '{KEY}':
+ $value = $key;
+ break;
+ }
+
+ $args[] = $value;
+ }
+ }
+ else
+ {
+ $args = array($new[$config_key], $key);
+ }
+
+ $return = call_user_func_array($call, $args);
+
+ if ($tpl_type[0] == 'select')
+ {
+ $tpl = '<select id="' . $key . '" name="' . $name . '">' . $return . '</select>';
+ }
+ else
+ {
+ $tpl = $return;
+ }
+
+ break;
+
+ default:
+ break;
+ }
+
+ if (isset($vars['append']))
+ {
+ $tpl .= $vars['append'];
+ }
+
+ return $tpl;
+}
+
+/**
+* Going through a config array and validate values, writing errors to $error. The validation method accepts parameters separated by ':' for string and int.
+* The first parameter defines the type to be used, the second the lower bound and the third the upper bound. Only the type is required.
+*/
+function validate_config_vars($config_vars, &$cfg_array, &$error)
+{
+ global $phpbb_root_path, $user;
+ $type = 0;
+ $min = 1;
+ $max = 2;
+
+ foreach ($config_vars as $config_name => $config_definition)
+ {
+ if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
+ {
+ continue;
+ }
+
+ if (!isset($config_definition['validate']))
+ {
+ continue;
+ }
+
+ $validator = explode(':', $config_definition['validate']);
+
+ // Validate a bit. ;) (0 = type, 1 = min, 2= max)
+ switch ($validator[$type])
+ {
+ case 'string':
+ $length = strlen($cfg_array[$config_name]);
+
+ // the column is a VARCHAR
+ $validator[$max] = (isset($validator[$max])) ? min(255, $validator[$max]) : 255;
+
+ if (isset($validator[$min]) && $length < $validator[$min])
+ {
+ $error[] = sprintf($user->lang['SETTING_TOO_SHORT'], $user->lang[$config_definition['lang']], $validator[$min]);
+ }
+ else if (isset($validator[$max]) && $length > $validator[2])
+ {
+ $error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$config_definition['lang']], $validator[$max]);
+ }
+ break;
+
+ case 'bool':
+ $cfg_array[$config_name] = ($cfg_array[$config_name]) ? 1 : 0;
+ break;
+
+ case 'int':
+ $cfg_array[$config_name] = (int) $cfg_array[$config_name];
+
+ if (isset($validator[$min]) && $cfg_array[$config_name] < $validator[$min])
+ {
+ $error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$config_definition['lang']], $validator[$min]);
+ }
+ else if (isset($validator[$max]) && $cfg_array[$config_name] > $validator[$max])
+ {
+ $error[] = sprintf($user->lang['SETTING_TOO_BIG'], $user->lang[$config_definition['lang']], $validator[$max]);
+ }
+ break;
+
+ // Absolute path
+ case 'script_path':
+ if (!$cfg_array[$config_name])
+ {
+ break;
+ }
+
+ $destination = str_replace('\\', '/', $cfg_array[$config_name]);
+
+ if ($destination !== '/')
+ {
+ // Adjust destination path (no trailing slash)
+ if (substr($destination, -1, 1) == '/')
+ {
+ $destination = substr($destination, 0, -1);
+ }
+
+ $destination = str_replace(array('../', './'), '', $destination);
+
+ if ($destination[0] != '/')
+ {
+ $destination = '/' . $destination;
+ }
+ }
+
+ $cfg_array[$config_name] = trim($destination);
+
+ break;
+
+ // Absolute path
+ case 'lang':
+ if (!$cfg_array[$config_name])
+ {
+ break;
+ }
+
+ $cfg_array[$config_name] = basename($cfg_array[$config_name]);
+
+ if (!file_exists($phpbb_root_path . 'language/' . $cfg_array[$config_name] . '/'))
+ {
+ $error[] = $user->lang['WRONG_DATA_LANG'];
+ }
+ break;
+
+ // Relative path (appended $phpbb_root_path)
+ case 'rpath':
+ case 'rwpath':
+ if (!$cfg_array[$config_name])
+ {
+ break;
+ }
+
+ $destination = $cfg_array[$config_name];
+
+ // Adjust destination path (no trailing slash)
+ if (substr($destination, -1, 1) == '/' || substr($destination, -1, 1) == '\\')
+ {
+ $destination = substr($destination, 0, -1);
+ }
+
+ $destination = str_replace(array('../', '..\\', './', '.\\'), '', $destination);
+ if ($destination && ($destination[0] == '/' || $destination[0] == "\\"))
+ {
+ $destination = '';
+ }
+
+ $cfg_array[$config_name] = trim($destination);
+
+ // Path being relative (still prefixed by phpbb_root_path), but with the ability to escape the root dir...
+ case 'path':
+ case 'wpath':
+
+ if (!$cfg_array[$config_name])
+ {
+ break;
+ }
+
+ $cfg_array[$config_name] = trim($cfg_array[$config_name]);
+
+ // Make sure no NUL byte is present...
+ if (strpos($cfg_array[$config_name], "\0") !== false || strpos($cfg_array[$config_name], '%00') !== false)
+ {
+ $cfg_array[$config_name] = '';
+ break;
+ }
+
+ if (!file_exists($phpbb_root_path . $cfg_array[$config_name]))
+ {
+ $error[] = sprintf($user->lang['DIRECTORY_DOES_NOT_EXIST'], $cfg_array[$config_name]);
+ }
+
+ if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !is_dir($phpbb_root_path . $cfg_array[$config_name]))
+ {
+ $error[] = sprintf($user->lang['DIRECTORY_NOT_DIR'], $cfg_array[$config_name]);
+ }
+
+ // Check if the path is writable
+ if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath')
+ {
+ if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !@is_writable($phpbb_root_path . $cfg_array[$config_name]))
+ {
+ $error[] = sprintf($user->lang['DIRECTORY_NOT_WRITABLE'], $cfg_array[$config_name]);
+ }
+ }
+
+ break;
+ }
+ }
+
+ return;
+}
+
+/**
+* Checks whatever or not a variable is OK for use in the Database
+* param mixed $value_ary An array of the form array(array('lang' => ..., 'value' => ..., 'column_type' =>))'
+* param mixed $error The error array
+*/
+function validate_range($value_ary, &$error)
+{
+ global $user;
+
+ $column_types = array(
+ 'BOOL' => array('php_type' => 'int', 'min' => 0, 'max' => 1),
+ 'USINT' => array('php_type' => 'int', 'min' => 0, 'max' => 65535),
+ 'UINT' => array('php_type' => 'int', 'min' => 0, 'max' => (int) 0x7fffffff),
+ 'INT' => array('php_type' => 'int', 'min' => (int) 0x80000000, 'max' => (int) 0x7fffffff),
+ 'TINT' => array('php_type' => 'int', 'min' => -128, 'max' => 127),
+
+ 'VCHAR' => array('php_type' => 'string', 'min' => 0, 'max' => 255),
+ );
+ foreach ($value_ary as $value)
+ {
+ $column = explode(':', $value['column_type']);
+ $max = $min = 0;
+ $type = 0;
+ if (!isset($column_types[$column[0]]))
+ {
+ continue;
+ }
+ else
+ {
+ $type = $column_types[$column[0]];
+ }
+
+ switch ($type['php_type'])
+ {
+ case 'string' :
+ $max = (isset($column[1])) ? min($column[1],$type['max']) : $type['max'];
+ if (strlen($value['value']) > $max)
+ {
+ $error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$value['lang']], $max);
+ }
+ break;
+
+ case 'int':
+ $min = (isset($column[1])) ? max($column[1],$type['min']) : $type['min'];
+ $max = (isset($column[2])) ? min($column[2],$type['max']) : $type['max'];
+ if ($value['value'] < $min)
+ {
+ $error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$value['lang']], $min);
+ }
+ else if ($value['value'] > $max)
+ {
+ $error[] = sprintf($user->lang['SETTING_TOO_BIG'], $user->lang[$value['lang']], $max);
+ }
+ break;
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html
new file mode 100644
index 0000000000..9573c34248
--- /dev/null
+++ b/phpBB/adm/style/acp_attachments.html
@@ -0,0 +1,376 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF U_BACK -->
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+<!-- ENDIF -->
+
+<h1>{L_TITLE}</h1>
+
+<p>{L_TITLE_EXPLAIN}</p>
+
+<!-- IF S_WARNING -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{WARNING_MSG}</p>
+ </div>
+<!-- ENDIF -->
+
+<!-- IF S_NOTIFY -->
+ <div class="successbox">
+ <h3>{L_NOTIFY}</h3>
+ <p>{NOTIFY_MSG}</p>
+ </div>
+<!-- ENDIF -->
+
+<!-- IF S_UPLOADING_FILES -->
+ <h2>{L_UPLOADING_FILES}</h2>
+
+ <!-- BEGIN upload -->
+ :: {upload.FILE_INFO}<br />
+ <!-- IF upload.S_DENIED --><span class="error">{upload.DENIED}</span><!-- ELSEIF upload.ERROR_MSG --><span class="error">{upload.ERROR_MSG}</span><!-- ELSE --><span class="success">{L_SUCCESSFULLY_UPLOADED}</span><!-- ENDIF -->
+ <br /><br />
+ <!-- END upload -->
+
+<!-- ENDIF -->
+
+<!-- IF S_ATTACHMENT_SETTINGS -->
+
+ <!-- IF not S_THUMBNAIL_SUPPORT -->
+ <div class="errorbox">
+ <p>{L_NO_THUMBNAIL_SUPPORT}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="attachsettings" method="post" action="{U_ACTION}">
+ <!-- BEGIN options -->
+ <!-- IF options.S_LEGEND -->
+ <!-- IF not options.S_FIRST_ROW -->
+ </fieldset>
+ <!-- ENDIF -->
+ <fieldset>
+ <legend>{options.LEGEND}</legend>
+ <!-- ELSE -->
+
+ <dl>
+ <dt><label for="{options.KEY}">{options.TITLE}:</label><!-- IF options.S_EXPLAIN --><br /><span>{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dd>{options.CONTENT}</dd>
+ </dl>
+
+ <!-- ENDIF -->
+ <!-- END options -->
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <legend>{L_SUBMIT}</legend>
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </fieldset>
+
+ <!-- IF not S_SECURE_DOWNLOADS -->
+ <div class="errorbox">
+ <p>{L_SECURE_DOWNLOAD_NOTICE}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <fieldset>
+ <legend>{L_SECURE_TITLE}</legend>
+ <p>{L_DOWNLOAD_ADD_IPS_EXPLAIN}</p>
+ <dl>
+ <dt><label for="ip_hostname">{L_IP_HOSTNAME}:</label></dt>
+ <dd><textarea id="ip_hostname" cols="40" rows="3" name="ips"></textarea></dd>
+ </dl>
+ <dl>
+ <dt><label for="exclude">{L_IP_EXCLUDE}:</label><br /><span>{L_EXCLUDE_ENTERED_IP}</span></dt>
+ <dd><label><input type="radio" id="exclude" name="ipexclude" value="1" class="radio" /> {L_YES}</label>
+ <label><input type="radio" name="ipexclude" value="0" checked="checked" class="radio" /> {L_NO}</label></dd>
+ </dl>
+
+ <p class="quick">
+ <input class="button1" type="submit" id="securesubmit" name="securesubmit" value="{L_SUBMIT}" />
+ </p>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_REMOVE_IPS}</legend>
+ <!-- IF S_DEFINED_IPS -->
+ <p>{L_DOWNLOAD_REMOVE_IPS_EXPLAIN}</p>
+ <dl>
+ <dt><label for="remove_ip_hostname">{L_IP_HOSTNAME}:</label></dt>
+ <dd><select name="unip[]" id="remove_ip_hostname" multiple="multiple" size="10">{DEFINED_IPS}</select></dd>
+ </dl>
+
+ <p class="quick">
+ <input class="button1" type="submit" id="unsecuresubmit" name="unsecuresubmit" value="{L_SUBMIT}" />
+ </p>
+ </fieldset>
+
+ <!-- ELSE -->
+ <p>{L_NO_IPS_DEFINED}</p>
+ <!-- ENDIF -->
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ELSEIF S_EXTENSION_GROUPS -->
+
+ <!-- IF S_EDIT_GROUP -->
+ <script type="text/javascript" defer="defer">
+ // <![CDATA[
+ function update_image(newimage)
+ {
+ if (newimage == 'no_image')
+ {
+ document.getElementById('image_upload_icon').src = "{PHPBB_ROOT_PATH}images/spacer.gif";
+ }
+ else
+ {
+ document.getElementById('image_upload_icon').src = "{PHPBB_ROOT_PATH}{IMG_PATH}/" + newimage;
+ }
+ }
+
+ function show_extensions(elem)
+ {
+ var str = '';
+
+ for (i = 0; i < elem.length; i++)
+ {
+ var element = elem.options[i];
+ if (element.selected)
+ {
+ if (str)
+ {
+ str = str + ', ';
+ }
+
+ str = str + element.innerHTML;
+ }
+ }
+
+ if (document.all)
+ {
+ document.all.ext.innerText = str;
+ }
+ else if (document.getElementById('ext').textContent)
+ {
+ document.getElementById('ext').textContent = str;
+ }
+ else if (document.getElementById('ext').firstChild.nodeValue)
+ {
+ document.getElementById('ext').firstChild.nodeValue = str;
+ }
+ }
+
+ // ]]>
+ </script>
+
+ <form id="extgroups" method="post" action="{U_ACTION}">
+ <fieldset>
+ <input type="hidden" name="action" value="{ACTION}" />
+ <input type="hidden" name="g" value="{GROUP_ID}" />
+
+ <legend>{L_LEGEND}</legend>
+ <dl>
+ <dt><label for="group_name">{L_GROUP_NAME}:</label></dt>
+ <dd><input type="text" id="group_name" size="20" maxlength="100" name="group_name" value="{GROUP_NAME}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="category">{L_SPECIAL_CATEGORY}:</label><br /><span>{L_SPECIAL_CATEGORY_EXPLAIN}</span></dt>
+ <dd>{S_CATEGORY_SELECT}</dd>
+ </dl>
+ <dl>
+ <dt><label for="allowed">{L_ALLOWED}:</label></dt>
+ <dd><input type="checkbox" class="radio" id="allowed" name="allow_group" value="1"<!-- IF ALLOW_GROUP --> checked="checked"<!-- ENDIF --> /></dd>
+ </dl>
+ <dl>
+ <dt><label for="allow_in_pm">{L_ALLOW_IN_PM}:</label></dt>
+ <dd><input type="checkbox" class="radio" id="allow_in_pm" name="allow_in_pm" value="1"<!-- IF ALLOW_IN_PM --> checked="checked"<!-- ENDIF --> /></dd>
+ </dl>
+ <dl>
+ <dt><label for="upload_icon">{L_UPLOAD_ICON}:</label></dt>
+ <dd><select name="upload_icon" id="upload_icon" onchange="update_image(this.options[selectedIndex].value);">
+ <option value="no_image"<!-- IF S_NO_IMAGE --> selected="selected"<!-- ENDIF -->>{L_NO_IMAGE}</option>{S_FILENAME_LIST}
+ </select></dd>
+ <dd>&nbsp;<img <!-- IF S_NO_IMAGE -->src="{PHPBB_ROOT_PATH}images/spacer.gif"<!-- ELSE -->src="{UPLOAD_ICON_SRC}"<!-- ENDIF --> id="image_upload_icon" alt="" title="" />&nbsp;</dd>
+ </dl>
+ <dl>
+ <dt><label for="extgroup_filesize">{L_MAX_EXTGROUP_FILESIZE}:</label></dt>
+ <dd><input type="text" id="extgroup_filesize" size="3" maxlength="15" name="max_filesize" value="{EXTGROUP_FILESIZE}" /> <select name="size_select">{S_EXT_GROUP_SIZE_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="assigned_extensions">{L_ASSIGNED_EXTENSIONS}:</label></dt>
+ <dd><div id="ext">{ASSIGNED_EXTENSIONS}</div> <span>[<a href="{U_EXTENSIONS}">{L_GO_TO_EXTENSIONS}</a> ]</span></dd>
+ <dd><select name="extensions[]" id="assigned_extensions" class="narrow" onchange="show_extensions(this);" multiple="multiple" size="8">{S_EXTENSION_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="allowed_forums">{L_ALLOWED_FORUMS}:</label><br /><span>{L_ALLOWED_FORUMS_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" id="allowed_forums" class="radio" name="forum_select" value="0"<!-- IF not S_FORUM_IDS --> checked="checked"<!-- ENDIF --> /> {L_ALLOW_ALL_FORUMS}</label>
+ <label><input type="radio" class="radio" name="forum_select" value="1"<!-- IF S_FORUM_IDS --> checked="checked"<!-- ENDIF --> /> {L_ALLOW_SELECTED_FORUMS}</label></dd>
+ <dd><select name="allowed_forums[]" multiple="multiple" size="8">{S_FORUM_ID_OPTIONS}</select></dd>
+ </dl>
+
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+
+ </form>
+ <!-- ELSE -->
+
+ <form id="extgroups" method="post" action="{U_ACTION}">
+ <fieldset class="tabulated">
+ <legend>{L_TITLE}</legend>
+
+ <table cellspacing="1">
+ <col class="row1" /><col class="row1" /><col class="row2" />
+ <thead>
+ <tr>
+ <th>{L_EXTENSION_GROUP}</th>
+ <th>{L_SPECIAL_CATEGORY}</th>
+ <th>{L_OPTIONS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN groups -->
+ <!-- IF groups.S_ADD_SPACER and not groups.S_FIRST_ROW -->
+ <tr>
+ <td class="spacer" colspan="3">&nbsp;</td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td><strong>{groups.GROUP_NAME}</strong>
+ <!-- IF groups.S_GROUP_ALLOWED and not groups.S_ALLOWED_IN_PM --><br /><span>&raquo; {L_NOT_ALLOWED_IN_PM}</span>
+ <!-- ELSEIF groups.S_ALLOWED_IN_PM and not groups.S_GROUP_ALLOWED --><br /><span>&raquo; {L_ONLY_ALLOWED_IN_PM}</span>
+ <!-- ELSEIF not groups.S_GROUP_ALLOWED and not groups.S_ALLOWED_IN_PM --><br /><span>&raquo; {L_NOT_ALLOWED_IN_PM_POST}</span>
+ <!-- ELSE --><br /><span>&raquo; {L_ALLOWED_IN_PM_POST}</span><!-- ENDIF -->
+ </td>
+ <td>{groups.CATEGORY}</td>
+ <td align="center" valign="middle" style="white-space: nowrap;">&nbsp;<a href="{groups.U_EDIT}">{ICON_EDIT}</a>&nbsp;&nbsp;<a href="{groups.U_DELETE}">{ICON_DELETE}</a>&nbsp;</td>
+ </tr>
+ <!-- END groups -->
+ </tbody>
+ </table>
+ <p class="quick">
+ {L_CREATE_GROUP}: <input type="text" name="group_name" maxlength="30" />
+ <input class="button2" name="add" type="submit" value="{L_SUBMIT}" />
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+ <!-- ENDIF -->
+
+<!-- ELSEIF S_EXTENSIONS -->
+
+ <form id="add_ext" method="post" action="{U_ACTION}">
+ <fieldset>
+ <legend>{L_ADD_EXTENSION}</legend>
+ <dl>
+ <dt><label for="add_extension">{L_EXTENSION}</label></dt>
+ <dd><input type="text" id="add_extension" size="20" maxlength="100" name="add_extension" value="{ADD_EXTENSION}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="extension_group">{L_EXTENSION_GROUP}</label></dt>
+ <dd>{GROUP_SELECT_OPTIONS}</dd>
+ </dl>
+
+ <p class="quick">
+ <input type="submit" id="add_extension_check" name="add_extension_check" class="button2" value="{L_SUBMIT}" />
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+ <br />
+
+ <form id="change_ext" method="post" action="{U_ACTION}">
+
+ <fieldset class="tabulated">
+ <legend>{L_TITLE}</legend>
+
+ <table cellspacing="1">
+ <col class="row1" /><col class="row1" /><col class="row2" />
+ <thead>
+ <tr>
+ <th>{L_EXTENSION}</th>
+ <th>{L_EXTENSION_GROUP}</th>
+ <th>{L_DELETE}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN extensions -->
+ <!-- IF extensions.S_SPACER -->
+ <tr>
+ <td class="spacer" colspan="3">&nbsp;</td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td><strong>{extensions.EXTENSION}</strong></td>
+ <td>{extensions.GROUP_OPTIONS}</td>
+ <td><input type="checkbox" class="radio" name="extension_id_list[]" value="{extensions.EXTENSION_ID}" /><input type="hidden" name="extension_change_list[]" value="{extensions.EXTENSION_ID}" /></td>
+ </tr>
+ <!-- END extensions -->
+ </tbody>
+ </table>
+
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ELSEIF S_ORPHAN -->
+
+ <form id="orphan" method="post" action="{U_ACTION}">
+
+ <fieldset class="tabulated">
+ <legend>{L_TITLE}</legend>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_FILENAME}</th>
+ <th>{L_FILEDATE}</th>
+ <th>{L_FILESIZE}</th>
+ <th>{L_ATTACH_POST_ID}</th>
+ <th>{L_ATTACH_TO_POST}</th>
+ <th>{L_DELETE}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN orphan -->
+ <!-- IF orphan.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td><a href="{orphan.U_FILE}">{orphan.REAL_FILENAME}</a></td>
+ <td>{orphan.FILETIME}</td>
+ <td>{orphan.FILESIZE}</td>
+ <td><strong>{L_ATTACH_ID}: </strong><input type="text" name="post_id[{orphan.ATTACH_ID}]" size="7" maxlength="10" value="{orphan.POST_ID}" /></td>
+ <td><input type="checkbox" class="radio" name="add[{orphan.ATTACH_ID}]" /></td>
+ <td><input type="checkbox" class="radio" name="delete[{orphan.ATTACH_ID}]" /></td>
+ </tr>
+ <!-- END orphan -->
+ <tr class="row4">
+ <td colspan="4">&nbsp;</td>
+ <td class="small"><a href="#" onclick="marklist('orphan', 'add', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('orphan', 'add', false); return false;">{L_UNMARK_ALL}</a></td>
+ <td class="small"><a href="#" onclick="marklist('orphan', 'delete', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('orphan', 'delete', false); return false;">{L_UNMARK_ALL}</a></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <br />
+
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html
new file mode 100644
index 0000000000..bc326345b0
--- /dev/null
+++ b/phpBB/adm/style/acp_ban.html
@@ -0,0 +1,124 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<p>{L_ACP_BAN_EXPLAIN}</p>
+
+<h1>{L_TITLE}</h1>
+
+<p>{L_EXPLAIN}</p>
+
+<script type="text/javascript">
+// <![CDATA[
+
+ var ban_length = new Array();
+ ban_length[-1] = '';
+ <!-- BEGIN ban_length -->
+ ban_length['{ban_length.BAN_ID}'] = '{ban_length.A_LENGTH}';
+ <!-- END ban_length -->
+
+ var ban_reason = new Array();
+ ban_reason[-1] = '';
+ <!-- BEGIN ban_reason -->
+ ban_reason['{ban_reason.BAN_ID}'] = '{ban_reason.A_REASON}';
+ <!-- END ban_reason -->
+
+ var ban_give_reason = new Array();
+ ban_give_reason[-1] = '';
+ <!-- BEGIN ban_give_reason -->
+ ban_give_reason['{ban_give_reason.BAN_ID}'] = '{ban_give_reason.A_REASON}';
+ <!-- END ban_give_reason -->
+
+ function display_details(option)
+ {
+ document.getElementById('acp_unban').unbangivereason.value = ban_give_reason[option];
+ document.getElementById('acp_unban').unbanreason.value = ban_reason[option];
+ document.getElementById('acp_unban').unbanlength.value = ban_length[option];
+ }
+
+// ]]>
+</script>
+
+<form id="acp_ban" method="post" action="{U_ACTION}">
+
+<fieldset>
+ <legend>{L_TITLE}</legend>
+<dl>
+ <dt><label for="ban">{L_BAN_CELL}:</label></dt>
+ <dd><textarea name="ban" cols="40" rows="3" id="ban"></textarea></dd>
+ <!-- IF S_USERNAME_BAN --><dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd><!-- ENDIF -->
+</dl>
+<dl>
+ <dt><label for="banlength">{L_BAN_LENGTH}:</label></dt>
+ <dd><label for="banlength"><select name="banlength" id="banlength" onchange="if(this.value==-1){document.getElementById('banlengthother').style.display = 'block';}else{document.getElementById('banlengthother').style.display='none';}">{S_BAN_END_OPTIONS}</select></label></dd>
+ <dd id="banlengthother" style="display: none;"><label><input type="text" name="banlengthother" class="inputbox" /><br /><span>{L_YEAR_MONTH_DAY}</span></label></dd>
+</dl>
+<dl>
+ <dt><label for="banexclude">{L_BAN_EXCLUDE}:</label><br /><span>{L_BAN_EXCLUDE_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" name="banexclude" value="1" class="radio" /> {L_YES}</label>
+ <label><input type="radio" name="banexclude" id="banexclude" value="0" checked="checked" class="radio" /> {L_NO}</label></dd>
+</dl>
+<dl>
+ <dt><label for="banreason">{L_BAN_REASON}:</label></dt>
+ <dd><input name="banreason" type="text" class="text medium" maxlength="255" id="banreason" /></dd>
+</dl>
+<dl>
+ <dt><label for="bangivereason">{L_BAN_GIVE_REASON}:</label></dt>
+ <dd><input name="bangivereason" type="text" class="text medium" maxlength="255" id="bangivereason" /></dd>
+</dl>
+
+<p class="submit-buttons">
+ <input class="button1" type="submit" id="bansubmit" name="bansubmit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="banreset" name="banreset" value="{L_RESET}" />
+</p>
+{S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<br /><br />
+
+<h1>{L_UNBAN_TITLE}</h1>
+
+<p>{L_UNBAN_EXPLAIN}</p>
+
+<form id="acp_unban" method="post" action="{U_ACTION}">
+
+<fieldset>
+ <legend>{L_UNBAN_TITLE}</legend>
+
+<!-- IF S_BANNED_OPTIONS -->
+ <dl>
+ <dt><label for="unban">{L_BAN_CELL}:</label></dt>
+ <dd><select id="unban" name="unban[]" multiple="multiple" size="10" style="width: 50%" onchange="if (this.selectedIndex > -1) display_details(this.options[this.selectedIndex].value); else display_details(-1);">{BANNED_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="unbanlength">{L_BAN_LENGTH}:</label></dt>
+ <dd><input style="border: 0;" type="text" class="text full" disabled="disabled" name="unbanlength" id="unbanlength" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="unbanreason">{L_BAN_REASON}:</label></dt>
+ <dd><textarea style="border: 0;" class="text full" disabled="disabled" name="unbanreason" id="unbanreason" rows="5" cols="80">&nbsp;</textarea></dd>
+ </dl>
+ <dl>
+ <dt><label for="unbangivereason">{L_BAN_GIVE_REASON}:</label></dt>
+ <dd><textarea style="border: 0;" class="text full" disabled="disabled" name="unbangivereason" id="unbangivereason" rows="5" cols="80">&nbsp;</textarea></dd>
+ </dl>
+
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="unbansubmit" name="unbansubmit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="unbanreset" name="unbanreset" value="{L_RESET}" />
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+
+<!-- ELSE -->
+
+ <p>{L_NO_BAN_CELL}</p>
+ {S_FORM_TOKEN}
+</fieldset>
+
+<!-- ENDIF -->
+
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/acp_bbcodes.html b/phpBB/adm/style/acp_bbcodes.html
new file mode 100644
index 0000000000..c81c198fd5
--- /dev/null
+++ b/phpBB/adm/style/acp_bbcodes.html
@@ -0,0 +1,124 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT_BBCODE -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_ACP_BBCODES}</h1>
+
+ <p>{L_ACP_BBCODES_EXPLAIN}</p>
+
+ <form id="acp_bbcodes" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_BBCODE_USAGE}</legend>
+ <p>{L_BBCODE_USAGE_EXPLAIN}</p>
+ <dl>
+ <dt><label for="bbcode_match">{L_EXAMPLES}</label><br /><br /><span>{L_BBCODE_USAGE_EXAMPLE}</span></dt>
+ <dd><textarea id="bbcode_match" name="bbcode_match" cols="60" rows="5">{BBCODE_MATCH}</textarea></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_HTML_REPLACEMENT}</legend>
+ <p>{L_HTML_REPLACEMENT_EXPLAIN}</p>
+ <dl>
+ <dt><label for="bbcode_tpl">{L_EXAMPLES}</label><br /><br /><span>{L_HTML_REPLACEMENT_EXAMPLE}</span></dt>
+ <dd><textarea id="bbcode_tpl" name="bbcode_tpl" cols="60" rows="8">{BBCODE_TPL}</textarea></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_BBCODE_HELPLINE}</legend>
+ <p>{L_BBCODE_HELPLINE_EXPLAIN}</p>
+ <dl>
+ <dt><label for="bbcode_helpline">{L_BBCODE_HELPLINE_TEXT}</label></dt>
+ <dd><input type="text" id="bbcode_helpline" name="bbcode_helpline" size="60" maxlength="255" value="{BBCODE_HELPLINE}" /></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_SETTINGS}</legend>
+ <dl>
+ <dt><label for="display_on_posting">{L_DISPLAY_ON_POSTING}</label></dt>
+ <dd><input type="checkbox" class="radio" name="display_on_posting" id="display_on_posting" value="1"<!-- IF DISPLAY_ON_POSTING --> checked="checked"<!-- ENDIF --> /></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <legend>{L_SUBMIT}</legend>
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+
+ <br />
+
+ <table cellspacing="1" id="down">
+ <thead>
+ <tr>
+ <th colspan="2">{L_TOKENS}</th>
+ </tr>
+ <tr>
+ <td class="row3" colspan="2">{L_TOKENS_EXPLAIN}</td>
+ </tr>
+ <tr>
+ <th>{L_TOKEN}</th>
+ <th>{L_TOKEN_DEFINITION}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN token -->
+ <tr valign="top">
+ <td class="row1">{token.TOKEN}</td>
+ <td class="row2">{token.EXPLAIN}</td>
+ </tr>
+ <!-- END token -->
+ </tbody>
+ </table>
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_ACP_BBCODES}</h1>
+
+ <p>{L_ACP_BBCODES_EXPLAIN}</p>
+
+ <form id="acp_bbcodes" method="post" action="{U_ACTION}">
+ <fieldset class="tabulated">
+ <legend>{L_ACP_BBCODES}</legend>
+
+ <table cellspacing="1" id="down">
+ <thead>
+ <tr>
+ <th>{L_BBCODE_TAG}</th>
+ <th>{L_ACTION}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN bbcodes -->
+ <!-- IF bbcodes.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="text-align: center;">{bbcodes.BBCODE_TAG}</td>
+ <td style="text-align: right; width: 40px;"><a href="{bbcodes.U_EDIT}">{ICON_EDIT}</a> <a href="{bbcodes.U_DELETE}">{ICON_DELETE}</a></td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr class="row3">
+ <td colspan="2">{L_ACP_NO_ITEMS}</td>
+ </tr>
+ <!-- END bbcodes -->
+ </tbody>
+ </table>
+
+ <p class="quick">
+ <input class="button2" name="submit" type="submit" value="{L_ADD_BBCODE}" />
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_board.html b/phpBB/adm/style/acp_board.html
new file mode 100644
index 0000000000..bb16204801
--- /dev/null
+++ b/phpBB/adm/style/acp_board.html
@@ -0,0 +1,49 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_TITLE}</h1>
+
+<p>{L_TITLE_EXPLAIN}</p>
+
+<!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+<!-- ENDIF -->
+
+<form id="acp_board" method="post" action="{U_ACTION}">
+
+<!-- BEGIN options -->
+ <!-- IF options.S_LEGEND -->
+ <!-- IF not options.S_FIRST_ROW -->
+ </fieldset>
+ <!-- ENDIF -->
+ <fieldset>
+ <legend>{options.LEGEND}</legend>
+ <!-- ELSE -->
+
+ <dl>
+ <dt><label for="{options.KEY}">{options.TITLE}:</label><!-- IF options.S_EXPLAIN --><br /><span>{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dd>{options.CONTENT}</dd>
+ </dl>
+
+ <!-- ENDIF -->
+<!-- END options -->
+
+<!-- IF S_AUTH -->
+ <!-- BEGIN auth_tpl -->
+ {auth_tpl.TPL}
+ <!-- END auth_tpl -->
+<!-- ENDIF -->
+
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </p>
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_bots.html b/phpBB/adm/style/acp_bots.html
new file mode 100644
index 0000000000..7783356574
--- /dev/null
+++ b/phpBB/adm/style/acp_bots.html
@@ -0,0 +1,102 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT_BOT -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_BOT_EDIT_EXPLAIN}</p>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="acp_bots" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_TITLE}</legend>
+ <dl>
+ <dt><label for="bot_name">{L_BOT_NAME}:</label><br /><span>{L_BOT_NAME_EXPLAIN}</span></dt>
+ <dd><input name="bot_name" type="text" id="bot_name" value="{BOT_NAME}" maxlength="255" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="bot_style">{L_BOT_STYLE}:</label><br /><span>{L_BOT_STYLE_EXPLAIN}</span></dt>
+ <dd><select id="bot_style" name="bot_style">{S_STYLE_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="bot_lang">{L_BOT_LANG}:</label><br /><span>{L_BOT_LANG_EXPLAIN}</span></dt>
+ <dd><select id="bot_lang" name="bot_lang">{S_LANG_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="bot_active">{L_BOT_ACTIVE}:</label></dt>
+ <dd><select id="bot_active" name="bot_active">{S_ACTIVE_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="bot_agent">{L_BOT_AGENT}:</label><br /><span>{L_BOT_AGENT_EXPLAIN}</span></dt>
+ <dd><input name="bot_agent" type="text" id="bot_agent" value="{BOT_AGENT}" maxlength="255" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="bot_ip">{L_BOT_IP}:</label><br /><span>{L_BOT_IP_EXPLAIN}</span></dt>
+ <dd><input name="bot_ip" type="text" id="bot_ip" value="{BOT_IP}" maxlength="255" /></dd>
+ </dl>
+
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ {S_FORM_TOKEN}
+ </p>
+ </fieldset>
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_BOTS}</h1>
+
+ <p>{L_BOTS_EXPLAIN}</p>
+
+ <form id="acp_bots" method="post" action="{U_ACTION}">
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_BOT_NAME}</th>
+ <th>{L_BOT_LAST_VISIT}</th>
+ <th colspan="3">{L_OPTIONS}</th>
+ <th>{L_MARK}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN bots -->
+ <!-- IF bots.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="width: 50%;">{bots.BOT_NAME}</td>
+ <td style="width: 15%; white-space: nowrap;" align="center">&nbsp;{bots.LAST_VISIT}&nbsp;</td>
+ <td style="text-align: center;">&nbsp;<a href="{bots.U_ACTIVATE_DEACTIVATE}">{bots.L_ACTIVATE_DEACTIVATE}</a>&nbsp;</td>
+ <td style="text-align: center;">&nbsp;<a href="{bots.U_EDIT}">{L_EDIT}</a>&nbsp;</td>
+ <td style="text-align: center;">&nbsp;<a href="{bots.U_DELETE}">{L_DELETE}</a>&nbsp;</td>
+ <td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{bots.BOT_ID}" /></td>
+ </tr>
+ <!-- END bots -->
+ </tbody>
+ </table>
+
+ <fieldset class="quick" style="float: {S_CONTENT_FLOW_BEGIN};">
+ <input class="button2" name="add" type="submit" value="{L_BOT_ADD}" />
+ </fieldset>
+
+ <fieldset class="quick" style="float: {S_CONTENT_FLOW_END};">
+ <select name="action">{S_BOT_OPTIONS}</select>
+ <input class="button2" name="submit" type="submit" value="{L_SUBMIT}" />
+ <p class="small"><a href="#" onclick="marklist('acp_bots', 'mark', true);">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('acp_bots', 'mark', false);">{L_UNMARK_ALL}</a></p>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_captcha.html b/phpBB/adm/style/acp_captcha.html
new file mode 100644
index 0000000000..d31527b64d
--- /dev/null
+++ b/phpBB/adm/style/acp_captcha.html
@@ -0,0 +1,67 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_ACP_VC_SETTINGS}</h1>
+
+<p>{L_ACP_VC_SETTINGS_EXPLAIN}</p>
+
+
+<form id="acp_captcha" method="post" action="{U_ACTION}">
+
+<fieldset>
+<legend>{L_GENERAL_OPTIONS}</legend>
+
+<dl>
+ <dt><label for="enable_confirm">{L_VISUAL_CONFIRM_REG}:</label><br /><span>{L_VISUAL_CONFIRM_REG_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" id="enable_confirm" name="enable_confirm" value="1"<!-- IF REG_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
+ <label><input type="radio" class="radio" name="enable_confirm" value="0"<!-- IF not REG_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
+</dl>
+<dl>
+ <dt><label for="max_reg_attempts">{L_REG_LIMIT}:</label><br /><span>{L_REG_LIMIT_EXPLAIN}</span></dt>
+ <dd><input id="max_reg_attempts" type="text" size="4" maxlength="4" name="max_reg_attempts" value="{REG_LIMIT}" /></dd>
+</dl>
+<dl>
+ <dt><label for="enable_post_confirm">{L_VISUAL_CONFIRM_POST}:</label><br /><span>{L_VISUAL_CONFIRM_POST_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" id="enable_post_confirm" name="enable_post_confirm" value="1"<!-- IF POST_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
+ <label><input type="radio" class="radio" name="enable_post_confirm" value="0"<!-- IF not POST_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
+</dl>
+<dl>
+ <dt><label for="confirm_refresh">{L_VISUAL_CONFIRM_REFRESH}:</label><br /><span>{L_VISUAL_CONFIRM_REFRESH_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" id="confirm_refresh" name="confirm_refresh" value="1"<!-- IF CONFIRM_REFRESH --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
+ <label><input type="radio" class="radio" name="confirm_refresh" value="0"<!-- IF not CONFIRM_REFRESH --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
+</dl>
+</fieldset>
+
+<fieldset>
+<legend>{L_AVAILABLE_CAPTCHAS}</legend>
+<dl>
+ <dt><label for="captcha_select">{L_CAPTCHA_SELECT}:</label><br /><span>{L_CAPTCHA_SELECT_EXPLAIN}</span></dt>
+ <dd><select id="captcha_select" name="select_captcha" onchange="(document.getElementById('acp_captcha')).submit()" >{CAPTCHA_SELECT}</select></dd>
+</dl>
+ <!-- IF S_CAPTCHA_HAS_CONFIG -->
+<dl>
+ <dt><label for="configure">{L_CAPTCHA_CONFIGURE}:</label><br /><span>{L_CAPTCHA_CONFIGURE_EXPLAIN}</span></dt>
+ <dd><input class="button2" type="submit" id="configure" name="configure" value="{L_CONFIGURE}" /></dd>
+</dl>
+<!-- ENDIF -->
+</fieldset>
+
+<!-- IF CAPTCHA_PREVIEW_TPL -->
+<fieldset>
+ <legend>{L_PREVIEW}</legend>
+<!-- INCLUDE {CAPTCHA_PREVIEW_TPL} -->
+</fieldset>
+<!-- ENDIF -->
+
+<fieldset>
+ <legend>{L_ACP_SUBMIT_CHANGES}</legend>
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="main_submit" name="main_submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="form_reset" name="reset" value="{L_RESET}" />&nbsp;
+ </p>
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_database.html b/phpBB/adm/style/acp_database.html
new file mode 100644
index 0000000000..de02ac6dbe
--- /dev/null
+++ b/phpBB/adm/style/acp_database.html
@@ -0,0 +1,98 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF MODE eq 'restore' -->
+ <h1>{L_ACP_RESTORE}</h1>
+
+ <p>{L_ACP_RESTORE_EXPLAIN}</p>
+
+ <!-- IF .files -->
+ <form id="acp_backup" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_RESTORE_OPTIONS}</legend>
+ <dl>
+ <dt><label for="file">{L_SELECT_FILE}:</label></dt>
+ <dd><select id="file" name="file" size="10"><!-- BEGIN files --><option value="{files.FILE}"<!-- IF files.S_LAST_ROW --> selected="selected"<!-- ENDIF -->>{files.NAME}</option><!-- END files --></select></dd>
+ </dl>
+
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_START_RESTORE}" />&nbsp;
+ <input class="button2" type="submit" id="delete" name="delete" value="{L_DELETE_BACKUP}" />&nbsp;
+ <input class="button2" type="submit" id="download" name="download" value="{L_DOWNLOAD_BACKUP}" />
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+ <!-- ELSE -->
+ <div class="errorbox">
+ <p>{L_ACP_NO_ITEMS}</p>
+ </div>
+ <!-- ENDIF -->
+
+<!-- ELSE -->
+ <h1>{L_ACP_BACKUP}</h1>
+
+ <p>{L_ACP_BACKUP_EXPLAIN}</p>
+
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function selector(bool)
+ {
+ var table = document.getElementById('table');
+
+ for (var i = 0; i < table.options.length; i++)
+ {
+ table.options[i].selected = bool;
+ }
+ }
+
+ // ]]>
+ </script>
+
+ <form id="acp_backup" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_BACKUP_OPTIONS}</legend>
+ <dl>
+ <dt><label for="type">{L_BACKUP_TYPE}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="type" value="full" id="type" checked="checked" /> {L_FULL_BACKUP}</label>
+ <label><input type="radio" name="type" class="radio" value="structure" /> {L_STRUCTURE_ONLY}</label>
+ <label><input type="radio" class="radio" name="type" value="data" /> {L_DATA_ONLY}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="method">{L_FILE_TYPE}:</label></dt>
+ <dd><!-- BEGIN methods -->
+ <label><input name="method"<!-- IF methods.S_FIRST_ROW --> id="method" checked="checked"<!-- ENDIF --> type="radio" class="radio" value="{methods.TYPE}" /> {methods.TYPE}</label>
+ <!-- END methods --></dd>
+ </dl>
+ <dl>
+ <dt><label for="where">{L_ACTION}:</label></dt>
+ <dd>
+ <label><input id="where" type="radio" class="radio" name="where" value="store" checked="checked" /> {L_STORE_LOCAL}</label>
+ <label><input type="radio" class="radio" name="where" value="download" /> {L_DOWNLOAD}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="table">{L_TABLE_SELECT}:</label></dt>
+ <dd><select id="table" name="table[]" size="10" multiple="multiple">
+ <!-- BEGIN tables -->
+ <option value="{tables.TABLE}">{tables.TABLE}</option>
+ <!-- END tables -->
+ </select></dd>
+ <dd><a href="#" onclick="selector(true); return false;">{L_SELECT_ALL}</a> :: <a href="#" onclick="selector(false); return false;">{L_DESELECT_ALL}</a></dd>
+ </dl>
+
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_disallow.html b/phpBB/adm/style/acp_disallow.html
new file mode 100644
index 0000000000..b68d3ab3c0
--- /dev/null
+++ b/phpBB/adm/style/acp_disallow.html
@@ -0,0 +1,45 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_ACP_DISALLOW_USERNAMES}</h1>
+
+<p>{L_ACP_DISALLOW_EXPLAIN}</p>
+
+<form id="acp_disallow" method="post" action="{U_ACTION}">
+
+<fieldset>
+ <legend>{L_ADD_DISALLOW_TITLE}</legend>
+<dl>
+ <dt><label for="user">{L_USERNAME}:</label><br /><span>{L_ADD_DISALLOW_EXPLAIN}</span></dt>
+ <dd><input id="user" type="text" class="text medium" maxlength="255" name="disallowed_user" /></dd>
+</dl>
+
+<p class="quick">
+ <input class="button1" type="submit" name="disallow" value="{L_SUBMIT}" />
+</p>
+</fieldset>
+
+<h1>{L_DELETE_DISALLOW_TITLE}</h1>
+
+<p>{L_DELETE_DISALLOW_EXPLAIN}</p>
+
+<fieldset>
+ <legend>{L_DELETE_DISALLOW_TITLE}</legend>
+<!-- IF S_DISALLOWED_NAMES -->
+ <dl>
+ <dt><label for="disallowed">{L_USERNAME}:</label></dt>
+ <dd><select name="disallowed_id" id="disallowed">{S_DISALLOWED_NAMES}</select></dd>
+ </dl>
+
+ <p class="quick">
+ <input class="button1" type="submit" name="allow" value="{L_SUBMIT}" />
+ </p>
+<!-- ELSE -->
+ <p>{L_NO_DISALLOWED}</p>
+<!-- ENDIF -->
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_email.html b/phpBB/adm/style/acp_email.html
new file mode 100644
index 0000000000..885809ffe2
--- /dev/null
+++ b/phpBB/adm/style/acp_email.html
@@ -0,0 +1,54 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_ACP_MASS_EMAIL}</h1>
+
+<p>{L_ACP_MASS_EMAIL_EXPLAIN}</p>
+
+<!-- IF S_WARNING -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{WARNING_MSG}</p>
+ </div>
+<!-- ENDIF -->
+
+<form id="acp_email" method="post" action="{U_ACTION}">
+
+<fieldset>
+ <legend>{L_COMPOSE}</legend>
+<dl>
+ <dt><label for="group">{L_SEND_TO_GROUP}:</label></dt>
+ <dd><select id="group" name="g">{S_GROUP_OPTIONS}</select></dd>
+</dl>
+<dl>
+ <dt><label for="usernames">{L_SEND_TO_USERS}:</label><br /><span>{L_SEND_TO_USERS_EXPLAIN}</span></dt>
+ <dd><textarea name="usernames" id="usernames" rows="5" cols="40">{USERNAMES}</textarea></dd>
+ <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
+</dl>
+<dl>
+ <dt><label for="subject">{L_SUBJECT}:</label></dt>
+ <dd><input name="subject" type="text" id="subject" value="{SUBJECT}" /></dd>
+</dl>
+<dl>
+ <dt><label for="message">{L_MASS_MESSAGE}:</label><br /><span>{L_MASS_MESSAGE_EXPLAIN}</span></dt>
+ <dd><textarea id="message" name="message" rows="10" cols="60">{MESSAGE}</textarea></dd>
+</dl>
+<dl>
+ <dt><label for="priority">{L_MAIL_PRIORITY}:</label></dt>
+ <dd><select id="priority" name="mail_priority_flag">{S_PRIORITY_OPTIONS}</select></dd>
+</dl>
+<dl>
+ <dt><label for="send">{L_SEND_IMMEDIATELY}:</label></dt>
+ <dd><input id="send" type="checkbox" class="radio" name="send_immediately" checked="checked" /></dd>
+</dl>
+
+<p class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SEND_EMAIL}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+</p>
+{S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
new file mode 100644
index 0000000000..937a288cb2
--- /dev/null
+++ b/phpBB/adm/style/acp_forums.html
@@ -0,0 +1,505 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT_FORUM -->
+
+ <script type="text/javascript">
+ // <![CDATA[
+ /**
+ * Handle displaying/hiding several options based on the forum type
+ */
+ function display_options(value)
+ {
+ <!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
+ if (value == {FORUM_POST})
+ {
+ dE('type_actions', -1);
+ }
+ else
+ {
+ dE('type_actions', 1);
+ }
+ <!-- ENDIF -->
+
+ <!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS -->
+ if (value == {FORUM_LINK})
+ {
+ dE('cat_to_link_actions', 1);
+ }
+ else
+ {
+ dE('cat_to_link_actions', -1);
+ }
+ <!-- ENDIF -->
+
+ if (value == {FORUM_POST})
+ {
+ dE('forum_post_options', 1);
+ dE('forum_link_options', -1);
+ dE('forum_rules_options', 1);
+ dE('forum_cat_options', -1);
+ }
+ else if (value == {FORUM_LINK})
+ {
+ dE('forum_post_options', -1);
+ dE('forum_link_options', 1);
+ dE('forum_rules_options', -1);
+ dE('forum_cat_options', -1);
+ }
+ else if (value == {FORUM_CAT})
+ {
+ dE('forum_post_options', -1);
+ dE('forum_link_options', -1);
+ dE('forum_rules_options', 1);
+ dE('forum_cat_options', 1);
+ }
+ }
+
+ /**
+ * Init the wanted display functionality if javascript is enabled.
+ * If javascript is not available, the user is still able to properly administrate.
+ */
+ onload = function()
+ {
+ <!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
+ <!-- IF S_FORUM_POST -->
+ dE('type_actions', -1);
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+
+ <!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS -->
+ <!-- IF S_FORUM_CAT -->
+ dE('cat_to_link_actions', -1);
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+
+ <!-- IF not S_FORUM_POST -->
+ dE('forum_post_options', -1);
+ <!-- ENDIF -->
+
+ <!-- IF not S_FORUM_CAT -->
+ dE('forum_cat_options', -1);
+ <!-- ENDIF -->
+
+ <!-- IF not S_FORUM_LINK -->
+ dE('forum_link_options', -1);
+ <!-- ENDIF -->
+
+ <!-- IF S_FORUM_LINK -->
+ dE('forum_rules_options', -1);
+ <!-- ENDIF -->
+ }
+
+ // ]]>
+ </script>
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE} <!-- IF FORUM_NAME -->:: {FORUM_NAME}<!-- ENDIF --></h1>
+
+ <p>{L_FORUM_EDIT_EXPLAIN}</p>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="forumedit" method="post" action="{U_EDIT_ACTION}">
+
+ <fieldset>
+ <legend>{L_FORUM_SETTINGS}</legend>
+ <dl>
+ <dt><label for="forum_type">{L_FORUM_TYPE}:</label></dt>
+ <dd><select id="forum_type" name="forum_type" onchange="display_options(this.options[this.selectedIndex].value);">{S_FORUM_TYPE_OPTIONS}</select></dd>
+ </dl>
+ <!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
+ <div id="type_actions">
+ <dl>
+ <dt><label for="type_action">{L_DECIDE_MOVE_DELETE_CONTENT}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="type_action" value="delete"<!-- IF not S_MOVE_FORUM_OPTIONS --> checked="checked" id="type_action"<!-- ENDIF --> /> {L_DELETE_ALL_POSTS}</label></dd>
+ <!-- IF S_MOVE_FORUM_OPTIONS --><dd><label><input type="radio" class="radio" name="type_action" id="type_action" value="move" checked="checked" /> {L_MOVE_POSTS_TO}</label> <select name="to_forum_id">{S_MOVE_FORUM_OPTIONS}</select></dd><!-- ENDIF -->
+ </dl>
+ </div>
+ <!-- ENDIF -->
+ <!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS -->
+ <div id="cat_to_link_actions">
+ <dl>
+ <dt><label for="action_subforums">{L_DECIDE_MOVE_DELETE_SUBFORUMS}:</label></dt>
+ <!-- IF S_FORUMS_LIST -->
+ <dd><label><input type="radio" class="radio" id="action_subforums" name="action_subforums" value="move" checked="checked" /> {L_MOVE_SUBFORUMS_TO}</label> <select name="subforums_to_id">{S_FORUMS_LIST}</select></dd>
+ <!-- ELSE -->
+ <dd><label><input type="radio" class="radio" id="action_subforums" name="action_subforums" value="delete" checked="checked" /> {L_DELETE_SUBFORUMS}</label></dd>
+ <!-- ENDIF -->
+ </dl>
+ </div>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="parent">{L_FORUM_PARENT}:</label></dt>
+ <dd><select id="parent" name="forum_parent_id"><option value="0"<!-- IF not S_FORUM_PARENT_ID --> selected="selected"<!-- ENDIF -->>{L_NO_PARENT}</option>{S_PARENT_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="forum_name">{L_FORUM_NAME}:</label></dt>
+ <dd><input class="text medium" type="text" id="forum_name" name="forum_name" value="{FORUM_NAME}" maxlength="255" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="forum_desc">{L_FORUM_DESC}:</label><br /><span>{L_FORUM_DESC_EXPLAIN}</span></dt>
+ <dd><textarea id="forum_desc" name="forum_desc" rows="5" cols="45">{FORUM_DESC}</textarea></dd>
+ <dd><label><input type="checkbox" class="radio" name="desc_parse_bbcode"<!-- IF S_DESC_BBCODE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_BBCODE}</label>
+ <label><input type="checkbox" class="radio" name="desc_parse_smilies"<!-- IF S_DESC_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES}</label>
+ <label><input type="checkbox" class="radio" name="desc_parse_urls"<!-- IF S_DESC_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="forum_image">{L_FORUM_IMAGE}:</label><br /><span>{L_FORUM_IMAGE_EXPLAIN}</span></dt>
+ <dd><input class="text medium" type="text" id="forum_image" name="forum_image" value="{FORUM_IMAGE}" maxlength="255" /></dd>
+ <!-- IF FORUM_IMAGE_SRC -->
+ <dd><img src="{FORUM_IMAGE_SRC}" alt="{L_FORUM_IMAGE}" /></dd>
+ <!-- ENDIF -->
+ </dl>
+ <dl>
+ <dt><label for="forum_password">{L_FORUM_PASSWORD}:</label><br /><span>{L_FORUM_PASSWORD_EXPLAIN}</span></dt>
+ <dd><input type="password" id="forum_password" name="forum_password" value="<!-- IF S_FORUM_PASSWORD_SET -->&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;<!-- ENDIF -->" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="forum_password_confirm">{L_FORUM_PASSWORD_CONFIRM}:</label><br /><span>{L_FORUM_PASSWORD_CONFIRM_EXPLAIN}</span></dt>
+ <dd><input type="password" id="forum_password_confirm" name="forum_password_confirm" value="<!-- IF S_FORUM_PASSWORD_SET -->&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;<!-- ENDIF -->" /></dd>
+ </dl>
+ <!-- IF S_FORUM_PASSWORD_SET -->
+ <dl>
+ <dt><label for="forum_password_unset">{L_FORUM_PASSWORD_UNSET}:</label><br /><span>{L_FORUM_PASSWORD_UNSET_EXPLAIN}</span></dt>
+ <dd><input id="forum_password_unset" name="forum_password_unset" type="checkbox" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="forum_style">{L_FORUM_STYLE}:</label></dt>
+ <dd><select id="forum_style" name="forum_style"><option value="0">{L_DEFAULT_STYLE}</option>{S_STYLES_OPTIONS}</select></dd>
+ </dl>
+ <!-- IF S_CAN_COPY_PERMISSIONS -->
+ <dl>
+ <dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
+ <dd><select id="forum_perm_from" name="forum_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_FORUM_OPTIONS}</select></dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+
+ <div id="forum_cat_options">
+ <fieldset>
+ <legend>{L_GENERAL_FORUM_SETTINGS}</legend>
+ <dl>
+ <dt><label for="display_active">{L_DISPLAY_ACTIVE_TOPICS}:</label><br /><span>{L_DISPLAY_ACTIVE_TOPICS_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="display_active" value="1"<!-- IF S_DISPLAY_ACTIVE_TOPICS --> id="display_active" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="display_active" value="0"<!-- IF not S_DISPLAY_ACTIVE_TOPICS --> id="display_active" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ </fieldset>
+ </div>
+
+ <div id="forum_post_options">
+ <fieldset>
+ <legend>{L_GENERAL_FORUM_SETTINGS}</legend>
+ <dl>
+ <dt><label for="forum_status">{L_FORUM_STATUS}:</label></dt>
+ <dd><select id="forum_status" name="forum_status">{S_STATUS_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="display_subforum_list">{L_LIST_SUBFORUMS}:</label><br /><span>{L_LIST_SUBFORUMS_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="display_subforum_list" value="1"<!-- IF S_DISPLAY_SUBFORUM_LIST --> id="display_subforum_list" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="display_subforum_list" value="0"<!-- IF not S_DISPLAY_SUBFORUM_LIST --> id="display_subforum_list" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="display_on_index">{L_LIST_INDEX}:</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="display_on_index" value="1"<!-- IF S_DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="display_on_index" value="0"<!-- IF not S_DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="enable_post_review">{L_ENABLE_POST_REVIEW}:</label><br /><span>{L_ENABLE_POST_REVIEW_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="enable_post_review" value="1"<!-- IF S_ENABLE_POST_REVIEW --> id="enable_post_review" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="enable_post_review" value="0"<!-- IF not S_ENABLE_POST_REVIEW --> id="enable_post_review" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="enable_quick_reply">{L_ENABLE_QUICK_REPLY}:</label><br /><span>{L_ENABLE_QUICK_REPLY_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="enable_quick_reply" value="1"<!-- IF S_ENABLE_QUICK_REPLY --> id="enable_quick_reply" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="enable_quick_reply" value="0"<!-- IF not S_ENABLE_QUICK_REPLY --> id="enable_quick_reply" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="enable_indexing">{L_ENABLE_INDEXING}:</label><br /><span>{L_ENABLE_INDEXING_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="enable_indexing" value="1"<!-- IF S_ENABLE_INDEXING --> id="enable_indexing" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="enable_indexing" value="0"<!-- IF not S_ENABLE_INDEXING --> id="enable_indexing" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="enable_icons">{L_ENABLE_TOPIC_ICONS}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="enable_icons" value="1"<!-- IF S_TOPIC_ICONS --> id="enable_icons" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="enable_icons" value="0"<!-- IF not S_TOPIC_ICONS --> id="enable_icons" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="display_recent">{L_ENABLE_RECENT}:</label><br /><span>{L_ENABLE_RECENT_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="display_recent" value="1"<!-- IF S_DISPLAY_ACTIVE_TOPICS --> id="display_recent" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="display_recent" value="0"<!-- IF not S_DISPLAY_ACTIVE_TOPICS --> id="display_recent" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="topics_per_page">{L_FORUM_TOPICS_PAGE}:</label><br /><span>{L_FORUM_TOPICS_PAGE_EXPLAIN}</span></dt>
+ <dd><input type="text" id="topics_per_page" name="topics_per_page" value="{TOPICS_PER_PAGE}" size="4" maxlength="4" /></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_FORUM_PRUNE_SETTINGS}</legend>
+ <dl>
+ <dt><label for="enable_prune">{L_FORUM_AUTO_PRUNE}:</label><br /><span>{L_FORUM_AUTO_PRUNE_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="enable_prune" value="1"<!-- IF S_PRUNE_ENABLE --> id="enable_prune" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="enable_prune" value="0"<!-- IF not S_PRUNE_ENABLE --> id="enable_prune" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="prune_freq">{L_AUTO_PRUNE_FREQ}:</label><br /><span>{L_AUTO_PRUNE_FREQ_EXPLAIN}</span></dt>
+ <dd><input type="text" id="prune_freq" name="prune_freq" value="{PRUNE_FREQ}" maxlength="4" size="4" /> {L_DAYS}</dd>
+ </dl>
+ <dl>
+ <dt><label for="prune_days">{L_AUTO_PRUNE_DAYS}:</label><br /><span>{L_AUTO_PRUNE_DAYS_EXPLAIN}</span></dt>
+ <dd><input type="text" id="prune_days" name="prune_days" value="{PRUNE_DAYS}" maxlength="4" size="4" /> {L_DAYS}</dd>
+ </dl>
+ <dl>
+ <dt><label for="prune_viewed">{L_AUTO_PRUNE_VIEWED}:</label><br /><span>{L_AUTO_PRUNE_VIEWED_EXPLAIN}</span></dt>
+ <dd><input type="text" id="prune_viewed" name="prune_viewed" value="{PRUNE_VIEWED}" maxlength="4" size="4" /> {L_DAYS}</dd>
+ </dl>
+ <dl>
+ <dt><label for="prune_old_polls">{L_PRUNE_OLD_POLLS}:</label><br /><span>{L_PRUNE_OLD_POLLS_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="prune_old_polls" value="1"<!-- IF S_PRUNE_OLD_POLLS --> id="prune_old_polls" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="prune_old_polls" value="0"<!-- IF not S_PRUNE_OLD_POLLS --> id="prune_old_polls" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="prune_announce">{L_PRUNE_ANNOUNCEMENTS}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="prune_announce" value="1"<!-- IF S_PRUNE_ANNOUNCE --> id="prune_announce" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="prune_announce" value="0"<!-- IF not S_PRUNE_ANNOUNCE --> id="prune_announce" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="prune_sticky">{L_PRUNE_STICKY}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="prune_sticky" value="1"<!-- IF S_PRUNE_STICKY --> id="prune_sticky" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="prune_sticky" value="0"<!-- IF not S_PRUNE_STICKY --> id="prune_sticky" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ </fieldset>
+ </div>
+
+ <div id="forum_link_options">
+ <fieldset>
+ <legend>{L_GENERAL_FORUM_SETTINGS}</legend>
+ <dl>
+ <dt><label for="link_display_on_index">{L_LIST_INDEX}:</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="link_display_on_index" value="1"<!-- IF S_DISPLAY_ON_INDEX --> id="link_display_on_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="link_display_on_index" value="0"<!-- IF not S_DISPLAY_ON_INDEX --> id="link_display_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="forum_link">{L_FORUM_LINK}:</label><br /><span>{L_FORUM_LINK_EXPLAIN}</span></dt>
+ <dd><input class="text medium" type="text" id="forum_link" name="forum_link" value="{FORUM_DATA_LINK}" maxlength="255" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="forum_link_track">{L_FORUM_LINK_TRACK}:</label><br /><span>{L_FORUM_LINK_TRACK_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="forum_link_track" value="1"<!-- IF S_FORUM_LINK_TRACK --> id="forum_link_track" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="forum_link_track" value="0"<!-- IF not S_FORUM_LINK_TRACK --> id="forum_link_track" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ </fieldset>
+ </div>
+
+ <div id="forum_rules_options">
+ <fieldset>
+ <legend>{L_FORUM_RULES}</legend>
+ <dl>
+ <dt><label for="forum_rules_link">{L_FORUM_RULES_LINK}:</label><br /><span>{L_FORUM_RULES_LINK_EXPLAIN}</span></dt>
+ <dd><input class="text medium" type="text" id="forum_rules_link" name="forum_rules_link" value="{FORUM_RULES_LINK}" maxlength="255" /></dd>
+ </dl>
+ <!-- IF FORUM_RULES_PREVIEW -->
+ <dl>
+ <dt><label>{L_FORUM_RULES_PREVIEW}:</label></dt>
+ <dd>{FORUM_RULES_PREVIEW}</dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="forum_rules">{L_FORUM_RULES}:</label><br /><span>{L_FORUM_RULES_EXPLAIN}</span></dt>
+ <dd><textarea id="forum_rules" name="forum_rules" rows="4" cols="70">{FORUM_RULES_PLAIN}</textarea></dd>
+ <dd><label><input type="checkbox" class="radio" name="rules_parse_bbcode"<!-- IF S_BBCODE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_BBCODE}</label>
+ <label><input type="checkbox" class="radio" name="rules_parse_smilies"<!-- IF S_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES}</label>
+ <label><input type="checkbox" class="radio" name="rules_parse_urls"<!-- IF S_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS}</label></dd>
+ </dl>
+ </fieldset>
+ </div>
+
+ <fieldset class="submit-buttons">
+ <legend>{L_SUBMIT}</legend>
+ <input class="button1" type="submit" id="submit" name="update" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ELSEIF S_DELETE_FORUM -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_FORUM_DELETE}</h1>
+
+ <p>{L_FORUM_DELETE_EXPLAIN}</p>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="acp_forum" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_FORUM_DELETE}</legend>
+ <dl>
+ <dt><label>{L_FORUM_NAME}:</label></dt>
+ <dd><strong>{FORUM_NAME}</strong></dd>
+ </dl>
+ <!-- IF S_FORUM_POST -->
+ <dl>
+ <dt><label for="delete_action">{L_ACTION}:</label></dt>
+ <dd><label><input type="radio" class="radio" id="delete_action" name="action_posts" value="delete" checked="checked" /> {L_DELETE_ALL_POSTS}</label></dd>
+ <!-- IF S_MOVE_FORUM_OPTIONS -->
+ <dd><label><input type="radio" class="radio" name="action_posts" value="move" /> {L_MOVE_POSTS_TO}</label> <select name="posts_to_id">{S_MOVE_FORUM_OPTIONS}</select></dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF S_HAS_SUBFORUMS -->
+ <dl>
+ <dt><label for="sub_delete_action">{L_ACTION}:</label></dt>
+ <dd><label><input type="radio" class="radio" id="sub_delete_action" name="action_subforums" value="delete" checked="checked" /> {L_DELETE_SUBFORUMS}</label></dd>
+ <!-- IF S_FORUMS_LIST -->
+ <dd><label><input type="radio" class="radio" name="action_subforums" value="move" /> {L_MOVE_SUBFORUMS_TO}</label> <select name="subforums_to_id">{S_FORUMS_LIST}</select></dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- ENDIF -->
+
+ <p class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ELSEIF S_CONTINUE_SYNC -->
+
+ <script type="text/javascript">
+ // <![CDATA[
+ var close_waitscreen = 0;
+ // no scrollbars...
+ popup('{UA_PROGRESS_BAR}', 400, 240, '_sync');
+ // ]]>
+ </script>
+
+ <h1>{L_FORUM_ADMIN}</h1>
+
+ <p>{L_FORUM_ADMIN_EXPLAIN}</p>
+
+ <p>{L_PROGRESS_EXPLAIN}</p>
+
+<!-- ELSE -->
+
+ <script type="text/javascript">
+ // <![CDATA[
+ /**
+ * Popup search progress bar
+ */
+ function popup_progress_bar()
+ {
+ var close_waitscreen = 0;
+ // no scrollbars...
+ popup('{UA_PROGRESS_BAR}', 400, 240, '_sync');
+ }
+ // ]]>
+ </script>
+
+ <h1>{L_FORUM_ADMIN}</h1>
+
+ <p>{L_FORUM_ADMIN_EXPLAIN}</p>
+
+ <!-- IF ERROR_MSG -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF S_RESYNCED -->
+ <script type="text/javascript">
+ // <![CDATA[
+ var close_waitscreen = 1;
+ // ]]>
+ </script>
+
+ <div class="successbox">
+ <h3>{L_NOTIFY}</h3>
+ <p>{L_FORUM_RESYNCED}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <p><strong>{NAVIGATION}<!-- IF S_NO_FORUMS --> [<a href="{U_EDIT}">{L_EDIT}</a> | <a href="{U_DELETE}">{L_DELETE}</a><!-- IF not S_LINK --> | <a href="{U_SYNC}">{L_RESYNC}</a><!-- ENDIF --->]<!-- ENDIF --></strong></p>
+
+ <!-- IF .forums -->
+ <table cellspacing="1">
+ <col class="row1" /><col class="row1" /><col class="row2" />
+ <tbody>
+ <!-- BEGIN forums -->
+ <tr>
+ <td style="width: 5%; text-align: center;">{forums.FOLDER_IMAGE}</td>
+ <td>
+ <!-- IF forums.FORUM_IMAGE --><div style="float: {S_CONTENT_FLOW_BEGIN}; margin-right: 5px;">{forums.FORUM_IMAGE}</div><!-- ENDIF -->
+ <strong><!-- IF forums.S_FORUM_LINK -->{forums.FORUM_NAME}<!-- ELSE --><a href="{forums.U_FORUM}">{forums.FORUM_NAME}</a><!-- ENDIF --></strong>
+ <!-- IF forums.FORUM_DESCRIPTION --><br /><span>{forums.FORUM_DESCRIPTION}</span><!-- ENDIF -->
+ <!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}: <strong>{forums.FORUM_TOPICS}</strong> / {L_POSTS}: <strong>{forums.FORUM_POSTS}</strong></span><!-- ENDIF -->
+ </td>
+ <td style="vertical-align: top; width: 100px; text-align: right; white-space: nowrap;">
+ <!-- IF forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
+ {ICON_MOVE_UP_DISABLED}
+ <a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
+ <!-- ELSEIF not forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
+ <a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a>
+ <a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
+ <!-- ELSEIF forums.S_LAST_ROW && not forums.S_FIRST_ROW -->
+ <a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a>
+ {ICON_MOVE_DOWN_DISABLED}
+ <!-- ELSE -->
+ {ICON_MOVE_UP_DISABLED}
+ {ICON_MOVE_DOWN_DISABLED}
+ <!-- ENDIF -->
+ <a href="{forums.U_EDIT}">{ICON_EDIT}</a>
+ <!-- IF not forums.S_FORUM_LINK -->
+ <a href="{forums.U_SYNC}" onclick="popup_progress_bar();">{ICON_SYNC}</a>
+ <!-- ELSE -->
+ {ICON_SYNC_DISABLED}
+ <!-- ENDIF -->
+ <a href="{forums.U_DELETE}">{ICON_DELETE}</a>
+ </td>
+ </tr>
+ <!-- END forums -->
+ </tbody>
+ </table>
+ <!-- ENDIF -->
+
+ <form id="fselect" method="post" action="{U_SEL_ACTION}">
+
+ <fieldset class="quick">
+ {L_SELECT_FORUM}: <select name="parent_id" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{FORUM_BOX}</select>
+
+ <input class="button2" type="submit" value="{L_GO}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+ <form id="forums" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick">
+ <input type="hidden" name="action" value="add" />
+
+ <input type="text" name="forum_name" value="" maxlength="255" />
+ <input class="button2" name="addforum" type="submit" value="{L_CREATE_FORUM}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_forums_copy_perm.html b/phpBB/adm/style/acp_forums_copy_perm.html
new file mode 100644
index 0000000000..acec3c1967
--- /dev/null
+++ b/phpBB/adm/style/acp_forums_copy_perm.html
@@ -0,0 +1,22 @@
+<!-- INCLUDE overall_header.html -->
+
+<h1>{L_COPY_PERMISSIONS}</h1>
+
+<p>{L_COPY_PERMISSIONS_EXPLAIN}</p>
+<p>{L_ACL_LINK}</p>
+
+<form id="confirm" method="post" action="{S_COPY_ACTION}">
+
+<fieldset>
+ <dl>
+ <dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
+ <dd><select id="forum_perm_from" name="forum_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_FORUM_OPTIONS}</select></dd>
+ </dl>
+ <div style="text-align: center;">{S_FORM_TOKEN}{S_HIDDEN_FIELDS}
+ <input type="submit" name="update" value="{L_CONTINUE}" class="button2" />&nbsp;
+ </div>
+</fieldset>
+
+</form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html
new file mode 100644
index 0000000000..a513e69a8a
--- /dev/null
+++ b/phpBB/adm/style/acp_groups.html
@@ -0,0 +1,358 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_ACP_GROUPS_MANAGE}</h1>
+
+ <p>{L_GROUP_EDIT_EXPLAIN}</p>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="settings" method="post" action="{U_ACTION}"<!-- IF S_CAN_UPLOAD --> enctype="multipart/form-data"<!-- ENDIF -->>
+
+ <fieldset>
+ <legend>{L_GROUP_DETAILS}</legend>
+ <dl>
+ <dt><label<!-- IF not S_SPECIAL_GROUP --> for="group_name"<!-- ENDIF -->>{L_GROUP_NAME}:</label></dt>
+ <dd><!-- IF S_SPECIAL_GROUP --><strong>{GROUP_NAME}</strong><!-- ENDIF --><input name="group_name" type="<!-- IF S_SPECIAL_GROUP -->hidden<!-- ELSE -->text<!-- ENDIF -->" id="group_name" value="{GROUP_INTERNAL_NAME}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="group_desc">{L_GROUP_DESC}:</label></dt>
+ <dd><textarea id="group_desc" name="group_desc" rows="5" cols="45">{GROUP_DESC}</textarea></dd>
+ <dd><label><input type="checkbox" class="radio" name="desc_parse_bbcode"<!-- IF S_DESC_BBCODE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_BBCODE}</label>
+ <label><input type="checkbox" class="radio" name="desc_parse_smilies"<!-- IF S_DESC_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES}</label>
+ <label><input type="checkbox" class="radio" name="desc_parse_urls"<!-- IF S_DESC_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS}</label></dd>
+ </dl>
+ <!-- IF not S_SPECIAL_GROUP -->
+ <dl>
+ <dt><label for="group_type">{L_GROUP_TYPE}:</label><br /><span>{L_GROUP_TYPE_EXPLAIN}</span></dt>
+ <dd>
+ <label><input name="group_type" type="radio" class="radio" id="group_type" value="{GROUP_TYPE_FREE}"{GROUP_FREE} /> {L_GROUP_OPEN}</label>
+ <label><input name="group_type" type="radio" class="radio" value="{GROUP_TYPE_OPEN}"{GROUP_OPEN} /> {L_GROUP_REQUEST}</label>
+ <label><input name="group_type" type="radio" class="radio" value="{GROUP_TYPE_CLOSED}"{GROUP_CLOSED} /> {L_GROUP_CLOSED}</label>
+ <label><input name="group_type" type="radio" class="radio" value="{GROUP_TYPE_HIDDEN}"{GROUP_HIDDEN} /> {L_GROUP_HIDDEN}</label>
+ </dd>
+ </dl>
+ <!-- ELSE -->
+ <input name="group_type" type="hidden" value="{GROUP_TYPE_SPECIAL}" />
+ <!-- ENDIF -->
+
+ <!-- IF S_ADD_GROUP and S_GROUP_PERM -->
+ <dl>
+ <dt><label for="group_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
+ <dd><select id="group_perm_from" name="group_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_GROUP_OPTIONS}</select></dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_GROUP_OPTIONS_SAVE}</legend>
+ <!-- IF S_USER_FOUNDER -->
+ <dl>
+ <dt><label for="group_founder_manage">{L_GROUP_FOUNDER_MANAGE}:</label><br /><span>{L_GROUP_FOUNDER_MANAGE_EXPLAIN}</span></dt>
+ <dd><input name="group_founder_manage" type="checkbox" value="1" class="radio" id="group_founder_manage"{GROUP_FOUNDER_MANAGE} /></dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="group_skip_auth">{L_GROUP_SKIP_AUTH}:</label><br /><span>{L_GROUP_SKIP_AUTH_EXPLAIN}</span></dt>
+ <dd><input name="group_skip_auth" type="checkbox" value="1" class="radio" id="group_skip_auth"{GROUP_SKIP_AUTH} /></dd>
+ </dl>
+ <dl>
+ <dt><label for="group_legend">{L_GROUP_LEGEND}:</label></dt>
+ <dd><input name="group_legend" type="checkbox" value="1" class="radio" id="group_legend"{GROUP_LEGEND} /></dd>
+ </dl>
+ <dl>
+ <dt><label for="group_receive_pm">{L_GROUP_RECEIVE_PM}:</label><br /><span>{L_GROUP_RECEIVE_PM_EXPLAIN}</span></dt>
+ <dd><input name="group_receive_pm" type="checkbox" value="1" class="radio" id="group_receive_pm"{GROUP_RECEIVE_PM} /></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_GROUP_SETTINGS_SAVE}</legend>
+ <dl>
+ <dt><label for="group_message_limit">{L_GROUP_MESSAGE_LIMIT}:</label><br /><span>{L_GROUP_MESSAGE_LIMIT_EXPLAIN}</span></dt>
+ <dd><input name="group_message_limit" type="text" id="group_message_limit" maxlength="4" size="4" value="{GROUP_MESSAGE_LIMIT}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="group_max_recipients">{L_GROUP_MAX_RECIPIENTS}:</label><br /><span>{L_GROUP_MAX_RECIPIENTS_EXPLAIN}</span></dt>
+ <dd><input name="group_max_recipients" type="text" id="group_max_recipients" maxlength="10" size="4" value="{GROUP_MAX_RECIPIENTS}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="group_colour">{L_GROUP_COLOR}:</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></dt>
+ <dd><input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" /><!-- IF GROUP_COLOUR -->&nbsp;<span style="background-color: #{GROUP_COLOUR}">&nbsp; &nbsp;</span><!-- ENDIF -->&nbsp;&nbsp;<span>[ <a href="{U_SWATCH}" onclick="popup(this.href, 636, 150, '_swatch'); return false">{L_COLOUR_SWATCH}</a> ]</span></dd>
+ </dl>
+ <dl>
+ <dt><label for="group_rank">{L_GROUP_RANK}:</label></dt>
+ <dd><select name="group_rank" id="group_rank">{S_RANK_OPTIONS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_GROUP_AVATAR}</legend>
+ <dl>
+ <dt><label>{L_CURRENT_IMAGE}:</label><br /><span>{L_AVATAR_EXPLAIN}</span></dt>
+ <dd>{AVATAR_IMAGE}</dd>
+ <dd><label><input type="checkbox" class="radio" name="delete" /> {L_DELETE_AVATAR}</label></dd>
+ </dl>
+ <!-- IF not S_IN_AVATAR_GALLERY -->
+ <!-- IF S_CAN_UPLOAD -->
+ <dl>
+ <dt><label for="uploadfile">{L_UPLOAD_AVATAR_FILE}:</label></dt>
+ <dd><input type="file" id="uploadfile" name="uploadfile" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="uploadurl">{L_UPLOAD_AVATAR_URL}:</label><br /><span>{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></dt>
+ <dd><input name="uploadurl" type="text" id="uploadurl" value="" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="remotelink">{L_LINK_REMOTE_AVATAR}:</label><br /><span>{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></dt>
+ <dd><input name="remotelink" type="text" id="remotelink" value="" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="width">{L_LINK_REMOTE_SIZE}:</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></dt>
+ <dd><input name="width" type="text" id="width" size="3" value="{AVATAR_WIDTH}" /> <span>px X </span> <input type="text" name="height" size="3" value="{AVATAR_HEIGHT}" /> <span>px</span></dd>
+ </dl>
+ <!-- IF S_DISPLAY_GALLERY -->
+ <dl>
+ <dt><label>{L_AVATAR_GALLERY}:</label></dt>
+ <dd><input class="button2" type="submit" name="display_gallery" value="{L_DISPLAY_GALLERY}" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- ELSE -->
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_AVATAR_GALLERY}</legend>
+ <dl>
+ <dt><label for="category">{L_AVATAR_CATEGORY}:</label></dt>
+ <dd><select name="category" id="category">{S_CAT_OPTIONS}</select>&nbsp;<input class="button2" type="submit" value="{L_GO}" name="display_gallery" /></dd>
+ </dl>
+ <dl>
+ <table cellspacing="1">
+ <!-- BEGIN avatar_row -->
+ <tr>
+ <!-- BEGIN avatar_column -->
+ <td class="row1" style="text-align: center;"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" alt="{avatar_row.avatar_column.AVATAR_NAME}" title="{avatar_row.avatar_column.AVATAR_NAME}" /></td>
+ <!-- END avatar_column -->
+ </tr>
+ <tr>
+ <!-- BEGIN avatar_option_column -->
+ <td class="row2" style="text-align: center;"><input type="radio" class="radio" name="avatar_select" value="{avatar_row.avatar_option_column.S_OPTIONS_AVATAR}" /></td>
+ <!-- END avatar_option_column -->
+ </tr>
+ <!-- END avatar_row -->
+ </table>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick" style="margin-top: -15px;">
+ <input class="button2" type="submit" name="cancel" value="{L_CANCEL}" />
+ </fieldset>
+
+ <!-- ENDIF -->
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <legend>{L_SUBMIT}</legend>
+ <input class="button1" type="submit" id="submit" name="update" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ELSEIF S_LIST -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_GROUP_MEMBERS} :: {GROUP_NAME}</h1>
+
+ <p>{L_GROUP_MEMBERS_EXPLAIN}</p>
+
+ <form id="list" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick">
+ <a href="{U_DEFAULT_ALL}">&raquo; {L_MAKE_DEFAULT_FOR_ALL}</a>
+ </fieldset>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_USERNAME}</th>
+ <th>{L_GROUP_DEFAULT}</th>
+ <th>{L_JOINED}</th>
+ <th>{L_POSTS}</th>
+ <th>{L_MARK}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="row3" colspan="5"><strong>{L_GROUP_LEAD}</strong></td>
+ </tr>
+ <!-- BEGIN leader -->
+ <!-- IF leader.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td><!-- IF leader.USERNAME_COLOUR --><a href="{leader.U_USER_EDIT}" style="color: #{leader.USERNAME_COLOUR};" class="username-coloured">{leader.USERNAME}</a><!-- ELSE --><a href="{leader.U_USER_EDIT}">{leader.USERNAME}</a><!-- ENDIF --></td>
+ <td style="text-align: center;"><!-- IF leader.S_GROUP_DEFAULT -->{L_YES}<!-- ELSE -->{L_NO}<!-- ENDIF --></td>
+ <td style="text-align: center;">{leader.JOINED}</td>
+ <td style="text-align: center;">{leader.USER_POSTS}</td>
+ <td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{leader.USER_ID}" /></td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="5" style="text-align: center;">{L_GROUPS_NO_MODS}</td>
+ </tr>
+ <!-- END leader -->
+ <tr>
+ <td class="row3" colspan="5"><strong>{L_GROUP_APPROVED}</strong></td>
+ </tr>
+ <!-- BEGIN member -->
+ <!-- IF member.S_PENDING -->
+ <tr>
+ <td class="row3" colspan="5"><strong>{L_GROUP_PENDING}</strong></td>
+ </tr>
+ <!-- ELSE -->
+ <!-- IF member.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td><!-- IF member.USERNAME_COLOUR --><a href="{member.U_USER_EDIT}" style="color: #{member.USERNAME_COLOUR};" class="username-coloured">{member.USERNAME}</a><!-- ELSE --><a href="{member.U_USER_EDIT}">{member.USERNAME}</a><!-- ENDIF --></td>
+ <td style="text-align: center;"><!-- IF member.S_GROUP_DEFAULT -->{L_YES}<!-- ELSE -->{L_NO}<!-- ENDIF --></td>
+ <td style="text-align: center;">{member.JOINED}</td>
+ <td style="text-align: center;">{member.USER_POSTS}</td>
+ <td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{member.USER_ID}" /></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="5" style="text-align: center;">{L_GROUPS_NO_MEMBERS}</td>
+ </tr>
+ <!-- END member -->
+ </tbody>
+ </table>
+ <!-- IF PAGINATION -->
+ <div class="pagination">
+ <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
+ </div>
+ <!-- ENDIF -->
+
+ <fieldset class="quick">
+ <select name="action"><option class="sep" value="">{L_SELECT_OPTION}</option>{S_ACTION_OPTIONS}</select>
+ <input class="button2" type="submit" name="update" value="{L_SUBMIT}" />
+ <p class="small"><a href="#" onclick="marklist('list', 'mark', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('list', 'mark', false); return false;">{L_UNMARK_ALL}</a></p>
+ </fieldset>
+
+ <h1>{L_ADD_USERS}</h1>
+
+ <p>{L_ADD_USERS_EXPLAIN}</p>
+
+ <fieldset>
+ <legend>{L_ADD_USERS}</legend>
+ <dl>
+ <dt><label for="leader">{L_USER_GROUP_LEADER}:</label></dt>
+ <dd><label><input name="leader" type="radio" class="radio" value="1" /> {L_YES}</label>
+ <label><input name="leader" type="radio" class="radio" id="leader" value="0" checked="checked" /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="default">{L_USER_GROUP_DEFAULT}:</label><br /><span>{L_USER_GROUP_DEFAULT_EXPLAIN}</span></dt>
+ <dd><label><input name="default" type="radio" class="radio" value="1" /> {L_YES}</label>
+ <label><input name="default" type="radio" class="radio" id="default" value="0" checked="checked" /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="usernames">{L_USERNAME}:</label><br /><span>{L_USERNAMES_EXPLAIN}</span></dt>
+ <dd><textarea id="usernames" name="usernames" cols="40" rows="5"></textarea></dd>
+ <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
+ </dl>
+
+ <p class="quick">
+ <input class="button2" type="submit" name="addusers" value="{L_SUBMIT}" />
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_ACP_GROUPS_MANAGE}</h1>
+
+ <p>{L_ACP_GROUPS_MANAGE_EXPLAIN}</p>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <h1>{L_USER_DEF_GROUPS}</h1>
+
+ <p>{L_USER_DEF_GROUPS_EXPLAIN}</p>
+
+ <form id="acp_groups" method="post" action="{U_ACTION}">
+
+ <table cellspacing="1">
+ <col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
+ <thead>
+ <tr>
+ <th style="width: 50%">{L_GROUP}</th>
+ <th>{L_TOTAL_MEMBERS}</th>
+ <th colspan="2">{L_OPTIONS}</th>
+ <th>{L_ACTION}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN groups -->
+ <!-- IF groups.S_SPECIAL -->
+ <!-- IF groups.S_FIRST_ROW -->
+ <tr>
+ <td colspan="5" class="row3">{L_NO_GROUPS_CREATED}</td>
+ </tr>
+ <!-- ENDIF -->
+ </tbody>
+ </table>
+
+ <fieldset class="quick">
+ <!-- IF S_GROUP_ADD -->
+ {L_CREATE_GROUP}: <input type="text" name="group_name" value="" /> <input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
+ <input type="hidden" name="add" value="1" />
+ <!-- ENDIF -->
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+ <h1>{L_SPECIAL_GROUPS}</h1>
+
+ <p>{L_SPECIAL_GROUPS_EXPLAIN}</p>
+
+ <table cellspacing="1">
+ <col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
+ <thead>
+ <tr>
+ <th style="width: 50%">{L_GROUP}</th>
+ <th>{L_TOTAL_MEMBERS}</th>
+ <th colspan="2">{L_OPTIONS}</th>
+ <th>{L_ACTION}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- ELSE -->
+ <tr>
+ <td><strong>{groups.GROUP_NAME}</strong></td>
+ <td style="text-align: center;">{groups.TOTAL_MEMBERS}</td>
+ <td style="text-align: center;"><a href="{groups.U_EDIT}">{L_SETTINGS}</a></td>
+ <td style="text-align: center;"><a href="{groups.U_LIST}">{L_MEMBERS}</a></td>
+ <td style="text-align: center;"><!-- IF not groups.S_GROUP_SPECIAL and groups.U_DELETE --><a href="{groups.U_DELETE}">{L_DELETE}</a><!-- ELSE -->{L_DELETE}<!-- ENDIF --></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- END groups -->
+ </tbody>
+ </table>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html
new file mode 100644
index 0000000000..10166fec35
--- /dev/null
+++ b/phpBB/adm/style/acp_icons.html
@@ -0,0 +1,268 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT -->
+
+ <script type="text/javascript" defer="defer">
+ // <![CDATA[
+ <!-- IF S_ADD_CODE -->
+
+ var smiley = Array();
+ <!-- BEGIN smile -->
+ smiley['{smile.SMILEY_URL}'] = Array();
+ smiley['{smile.SMILEY_URL}']['code'] = '{smile.CODE}';
+ smiley['{smile.SMILEY_URL}']['emotion'] = '{smile.EMOTION}';
+ smiley['{smile.SMILEY_URL}']['width'] = {smile.WIDTH};
+ smiley['{smile.SMILEY_URL}']['height'] = {smile.HEIGHT};
+ smiley['{smile.SMILEY_URL}']['order'] = {smile.ORDER};
+ <!-- END smile -->
+
+ function update_image(newimage)
+ {
+ var use_element = smiley[newimage];
+
+ document.getElementById('add_image_src').src = '{PHPBB_ROOT_PATH}{IMG_PATH}/' + encodeURI(newimage);
+ document.getElementById('add_code').value = use_element['code'];
+ document.getElementById('add_emotion').value = use_element['emotion'];
+ document.getElementById('add_width').value = use_element['width'];
+ document.getElementById('add_height').value = use_element['height'];
+
+ element = document.getElementById('add_order');
+ for (var i = 0; i < element.length; i++)
+ {
+ if (element.options[i].value == use_element['order'])
+ {
+ document.getElementById('add_order').options.selectedIndex = i;
+ }
+ }
+ }
+
+ <!-- ENDIF -->
+
+
+ function toggle_select(icon, display, select)
+ {
+ var disp = document.getElementById('order_disp_' + select);
+ var nodisp = document.getElementById('order_no_disp_' + select);
+ disp.disabled = !display;
+ nodisp.disabled = display;
+ if (display)
+ {
+ document.getElementById('order_' + select).selectedIndex = 0;
+ nodisp.className = 'disabled-options';
+ disp.className = '';
+ }
+ else
+ {
+ document.getElementById('order_' + select).selectedIndex = {S_ORDER_LIST_DISPLAY_COUNT};
+ disp.className = 'disabled-options';
+ nodisp.className = '';
+ }
+ }
+ // ]]>
+ </script>
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_EXPLAIN}</p>
+
+ <form id="acp_icons" method="post" action="{U_ACTION}">
+
+ <fieldset class="tabulated">
+ <legend>{L_TITLE}</legend>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th colspan="{COLSPAN}">{L_CONFIG}</th>
+ </tr>
+ <!-- IF .items or S_ADD_CODE -->
+ <tr class="row3">
+ <td>{L_URL}</td>
+ <td>{L_LOCATION}</td>
+ <!-- IF S_SMILIES -->
+ <td>{L_SMILIES_CODE}</td>
+ <td>{L_SMILIES_EMOTION}</td>
+ <!-- ENDIF -->
+ <td>{L_WIDTH}</td>
+ <td>{L_HEIGHT}</td>
+ <td>{L_DISPLAY_ON_POSTING}</td>
+ <!-- IF ID or S_ADD -->
+ <td>{L_ORDER}</td>
+ <!-- ENDIF -->
+ <!-- IF S_ADD -->
+ <td>{L_ADD}</td>
+ <!-- ENDIF -->
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN items -->
+ <!-- IF items.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td style="text-align: center;"><img src="{items.IMG_SRC}" alt="" title="" /><input type="hidden" name="image[{items.IMG}]" value="1" /></td>
+ <td style="vertical-align: top;">[{items.IMG}]</td>
+ <!-- IF S_SMILIES -->
+ <td><input class="text post" type="text" name="code[{items.IMG}]" value="{items.CODE}" size="10" maxlength="50" /></td>
+ <td><input class="text post" type="text" name="emotion[{items.IMG}]" value="{items.EMOTION}" size="10" maxlength="50" /></td>
+ <!-- ENDIF -->
+ <td><input class="text post" type="text" size="3" name="width[{items.IMG}]" value="{items.WIDTH}" /></td>
+ <td><input class="text post" type="text" size="3" name="height[{items.IMG}]" value="{items.HEIGHT}" /></td>
+ <td>
+ <input type="checkbox" class="radio" name="display_on_posting[{items.IMG}]"{items.POSTING_CHECKED} onclick="toggle_select('{items.A_IMG}', this.checked, '{items.S_ROW_COUNT}');"/>
+ <!-- IF items.S_ID -->
+ <input type="hidden" name="id[{items.IMG}]" value="{items.ID}" />
+ <!-- ENDIF -->
+ </td>
+ <!-- IF ID or S_ADD -->
+ <td><select id="order_{items.S_ROW_COUNT}" name="order[{items.IMG}]">
+ <optgroup id="order_disp_{items.S_ROW_COUNT}" label="{L_DISPLAY_POSTING}" <!-- IF not items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_DISPLAY}</optgroup>
+ <optgroup id="order_no_disp_{items.S_ROW_COUNT}" label="{L_DISPLAY_POSTING_NO}" <!-- IF items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_UNDISPLAY}</optgroup>
+ </select></td>
+ <!-- ENDIF -->
+ <!-- IF S_ADD -->
+ <td><input type="checkbox" class="radio" name="add_img[{items.IMG}]" value="1" /></td>
+ <!-- ENDIF -->
+ </tr>
+ <!-- END items -->
+ <!-- IF S_ADD_CODE -->
+ <tr>
+ <th colspan="{COLSPAN}">{L_ADD_SMILEY_CODE}</th>
+ </tr>
+ <tr class="row1">
+ <td style="text-align: center;"><select name="add_image" id="add_image" onchange="update_image(this.options[selectedIndex].value);">{S_IMG_OPTIONS}</select></td>
+ <td style="vertical-align: top;"><img src="{IMG_SRC}" id="add_image_src" alt="" title="" /></td>
+ <td><input class="text post" type="text" name="add_code" id="add_code" value="{CODE}" size="10" maxlength="50" /></td>
+ <td><input class="text post" type="text" name="add_emotion" id="add_emotion" value="{EMOTION}" size="10" maxlength="50" /></td>
+ <td><input class="text post" type="text" size="3" name="add_width" id="add_width" value="{WIDTH}" /></td>
+ <td><input class="text post" type="text" size="3" name="add_height" id="add_height" value="{HEIGHT}" /></td>
+ <td><input type="checkbox" class="radio" name="add_display_on_posting" checked="checked" onclick="toggle_select('add', this.checked, 'add_order');"/></td>
+ <td><select id="add_order" name="add_order">
+ <optgroup id="order_disp[add]" label="{L_DISPLAY_POSTING}">{S_ADD_ORDER_LIST_DISPLAY}</optgroup>
+ <optgroup id="order_no_disp[add]" label="{L_DISPLAY_POSTING_NO}" disabled="disabled" class="disabled-options" >{S_ADD_ORDER_LIST_UNDISPLAY}</optgroup>
+ </select></td>
+ <td><input type="checkbox" class="radio" name="add_additional_code" value="1" /></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- ELSE -->
+ <tr class="row3">
+ <td colspan="{COLSPAN}">{L_NO_ICONS}</td>
+ </tr>
+ <!-- ENDIF -->
+ </tbody>
+ </table>
+
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ELSEIF S_CHOOSE_PAK -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_EXPLAIN}</p>
+
+ <form id="acp_icons" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_IMPORT}</legend>
+
+ <!-- IF not S_PAK_OPTIONS -->
+ <p>{L_NO_PAK_OPTIONS}</p>
+
+ <!-- ELSE -->
+ <dl>
+ <dt><label for="pak">{L_SELECT_PACKAGE}</label></dt>
+ <dd><select id="pak" name="pak">{S_PAK_OPTIONS}</select></dd>
+ </dl>
+ <dt><label for="current">{L_CURRENT}</label><br /><span>{L_CURRENT_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" id="current" name="current" value="keep" checked="checked" /> {L_KEEP_ALL}</label>
+ <label><input type="radio" class="radio" name="current" value="replace" /> {L_REPLACE_MATCHES}</label>
+ <label><input type="radio" class="radio" name="current" value="delete" /> {L_DELETE_ALL}</label></dd>
+ </dl>
+
+ <p class="quick">
+ <input class="button1" type="submit" id="import" name="import" value="{L_IMPORT_SUBMIT}" />
+ </p>
+ <!-- ENDIF -->
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_EXPLAIN}</p>
+
+ <!-- IF NOTICE -->
+ <div class="successbox">
+ <h3>{L_NOTIFY}</h3>
+ <p>{NOTICE}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="acp_icons" method="post" action="{U_ACTION}">
+
+ <div style="text-align: right;"><a href="{U_IMPORT}">{L_IMPORT}</a> | <a href="{U_EXPORT}">{L_EXPORT}</a></div>
+
+ <fieldset class="tabulated">
+
+ <legend>{L_TITLE}</legend>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_TITLE}</th>
+ <!-- IF S_SMILIES -->
+ <th>{L_CODE}</th>
+ <th>{L_EMOTION}</th>
+ <!-- ENDIF -->
+ <th>{L_OPTIONS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN items -->
+ <!-- IF items.S_SPACER -->
+ <tr>
+ <td class="row3" colspan="{COLSPAN}" style="text-align: center;">{L_NOT_DISPLAYED}</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF items.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="width: 85%; text-align: center;"><img src="{items.IMG_SRC}" width="{items.WIDTH}" height="{items.HEIGHT}" alt="{items.ALT_TEXT}" title="{items.ALT_TEXT}" /></td>
+ <!-- IF S_SMILIES -->
+ <td style="text-align: center;">{items.CODE}</td>
+ <td style="text-align: center;">{items.EMOTION}</td>
+ <!-- ENDIF -->
+ <td style="text-align: right; white-space: nowrap;">
+ <!-- IF items.S_FIRST_ROW and not PREVIOUS_PAGE -->{ICON_MOVE_UP_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_UP}">{ICON_MOVE_UP}</a><!-- ENDIF -->&nbsp;
+ <!-- IF items.S_LAST_ROW and not NEXT_PAGE -->{ICON_MOVE_DOWN_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a><!-- ENDIF -->
+ &nbsp;<a href="{items.U_EDIT}">{ICON_EDIT}</a> <a href="{items.U_DELETE}">{ICON_DELETE}</a>
+ </td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr class="row3">
+ <td colspan="{COLSPAN}">{L_ACP_NO_ITEMS}</td>
+ </tr>
+ <!-- END items -->
+ </tbody>
+ </table>
+ <div>{PAGINATION}</div>
+ <p class="quick">
+ <input class="button2" name="add" type="submit" value="{L_ICON_ADD}" />&nbsp; &nbsp;<input class="button2" type="submit" name="edit" value="{L_ICON_EDIT}" />
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_inactive.html b/phpBB/adm/style/acp_inactive.html
new file mode 100644
index 0000000000..3b20043dd9
--- /dev/null
+++ b/phpBB/adm/style/acp_inactive.html
@@ -0,0 +1,77 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h2>{L_INACTIVE_USERS}</h2>
+
+<p>{L_INACTIVE_USERS_EXPLAIN}</p>
+
+<form id="inactive" method="post" action="{U_ACTION}">
+
+<div class="clearfix"></div>
+
+<!-- IF PAGINATION -->
+<div class="pagination">
+ <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
+</div>
+<!-- ENDIF -->
+
+<table cellspacing="1">
+<thead>
+<tr>
+ <th>{L_USERNAME}</th>
+ <th>{L_JOINED}</th>
+ <th>{L_INACTIVE_DATE}</th>
+ <th>{L_LAST_VISIT}</th>
+ <th>{L_INACTIVE_REASON}</th>
+ <th>{L_MARK}</th>
+</tr>
+</thead>
+<tbody>
+<!-- BEGIN inactive -->
+ <!-- IF inactive.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td style="vertical-align: top;">
+ {inactive.USERNAME_FULL}
+ <!-- IF inactive.POSTS --><br />{L_POSTS}: <strong>{inactive.POSTS}</strong> [<a href="{inactive.U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a>]<!-- ENDIF -->
+ </td>
+ <td style="vertical-align: top;">{inactive.JOINED}</td>
+ <td style="vertical-align: top;">{inactive.INACTIVE_DATE}</td>
+ <td style="vertical-align: top;">{inactive.LAST_VISIT}</td>
+ <td style="vertical-align: top;">
+ {inactive.REASON}
+ <!-- IF inactive.REMINDED --><br />{inactive.REMINDED_EXPLAIN}<!-- ENDIF -->
+ </td>
+ <td>&nbsp;<input type="checkbox" class="radio" name="mark[]" value="{inactive.USER_ID}" />&nbsp;</td>
+ </tr>
+<!-- BEGINELSE -->
+ <tr>
+ <td colspan="6" style="text-align: center;">{L_NO_INACTIVE_USERS}</td>
+ </tr>
+<!-- END inactive -->
+</tbody>
+</table>
+
+<fieldset class="display-options">
+ {L_DISPLAY_LOG}: &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}<!-- IF PAGINATION -->&nbsp;Users per page: <input class="inputbox autowidth" type="text" name="users_per_page" id="users_per_page" size="3" value="{USERS_PER_PAGE}" /><!-- ENDIF -->
+ <input class="button2" type="submit" value="{L_GO}" name="sort" />
+</fieldset>
+
+<hr />
+
+<!-- IF PAGINATION -->
+ <div class="pagination">
+ <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
+ </div>
+<!-- ENDIF -->
+
+<fieldset class="quick">
+ <select name="action">{S_INACTIVE_OPTIONS}</select>
+ <input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
+ <p class="small"><a href="#" onclick="marklist('inactive', 'mark', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('inactive', 'mark', false); return false;">{L_UNMARK_ALL}</a></p>
+ {S_FORM_TOKEN}
+</fieldset>
+
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/acp_jabber.html b/phpBB/adm/style/acp_jabber.html
new file mode 100644
index 0000000000..2cc715493a
--- /dev/null
+++ b/phpBB/adm/style/acp_jabber.html
@@ -0,0 +1,65 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_ACP_JABBER_SETTINGS}</h1>
+
+<p>{L_ACP_JABBER_SETTINGS_EXPLAIN}</p>
+
+<!-- IF S_WARNING -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{WARNING_MSG}</p>
+ </div>
+<!-- ENDIF -->
+
+<form id="acp_jabber" method="post" action="{U_ACTION}">
+
+<fieldset>
+ <legend>{L_ACP_JABBER_SETTINGS}</legend>
+<!-- IF S_GTALK_NOTE -->
+ <p>{L_JAB_GTALK_NOTE}</p>
+<!-- ENDIF -->
+<dl>
+ <dt><label for="jab_enable">{L_JAB_ENABLE}:</label><br /><span>{L_JAB_ENABLE_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" id="jab_enable" name="jab_enable" value="1"<!-- IF JAB_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
+ <label><input type="radio" class="radio" name="jab_enable" value="0"<!-- IF not JAB_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
+</dl>
+<dl>
+ <dt><label for="jab_host">{L_JAB_SERVER}:</label><br /><span>{L_JAB_SERVER_EXPLAIN}</span></dt>
+ <dd><input type="text" id="jab_host" name="jab_host" value="{JAB_HOST}" /></dd>
+</dl>
+<dl>
+ <dt><label for="jab_port">{L_JAB_PORT}:</label><br /><span>{L_JAB_PORT_EXPLAIN}</span></dt>
+ <dd><input type="text" id="jab_port" name="jab_port" value="{JAB_PORT}" maxlength="5" size="5" /></dd>
+</dl>
+<dl>
+ <dt><label for="jab_username">{L_JAB_USERNAME}:</label><br /><span>{L_JAB_USERNAME_EXPLAIN}</span></dt>
+ <dd><input type="text" id="jab_username" name="jab_username" value="{JAB_USERNAME}" /></dd>
+</dl>
+<dl>
+ <dt><label for="jab_password">{L_JAB_PASSWORD}:</label></dt>
+ <dd><input type="password" id="jab_password" name="jab_password" value="{JAB_PASSWORD}" /></dd>
+</dl>
+<!-- IF S_CAN_USE_SSL -->
+<dl>
+ <dt><label for="jab_use_ssl">{L_JAB_USE_SSL}:</label><br /><span>{L_JAB_USE_SSL_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" id="jab_use_ssl" name="jab_use_ssl" value="1"<!-- IF JAB_USE_SSL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="jab_use_ssl" value="0"<!-- IF not JAB_USE_SSL --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+</dl>
+<!-- ENDIF -->
+<dl>
+ <dt><label for="jab_package_size">{L_JAB_PACKAGE_SIZE}:</label><br /><span>{L_JAB_PACKAGE_SIZE_EXPLAIN}</span></dt>
+ <dd><input type="text" id="jab_package_size" name="jab_package_size" value="{JAB_PACKAGE_SIZE}" maxlength="5" size="5" /></dd>
+</dl>
+
+</fieldset>
+
+<fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_language.html b/phpBB/adm/style/acp_language.html
new file mode 100644
index 0000000000..95ac1d5852
--- /dev/null
+++ b/phpBB/adm/style/acp_language.html
@@ -0,0 +1,255 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_SELECT_METHOD -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_SELECT_DOWNLOAD_FORMAT}</h1>
+
+ <form id="selectmethod" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_DOWNLOAD_AS}</legend>
+ <dl>
+ <dt><label for="use_method">{L_DOWNLOAD_AS}:</label></dt>
+ <dd>{RADIO_BUTTONS}</dd>
+ </dl>
+
+ <p class="quick">
+ <input type="submit" class="button2" value="{L_DOWNLOAD}" name="download" />
+ </p>
+ </fieldset>
+
+ </form>
+
+<!-- ELSEIF S_DETAILS -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_LANGUAGE_PACK_DETAILS}</h1>
+
+ <form id="details" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{LANG_LOCAL_NAME}</legend>
+ <dl>
+ <dt><label for="lang_english_name">{L_LANG_ENGLISH_NAME}:</label></dt>
+ <dd><input type="text" id="lang_english_name" name="lang_english_name" value="{LANG_ENGLISH_NAME}" maxlength="100" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="lang_local_name">{L_LANG_LOCAL_NAME}:</label></dt>
+ <dd><input type="text" id="lang_local_name" name="lang_local_name" value="{LANG_LOCAL_NAME}" maxlength="255" /></dd>
+ </dl>
+ <dl>
+ <dt><label>{L_LANG_ISO_CODE}:</label></dt>
+ <dd><strong>{LANG_ISO}</strong></dd>
+ </dl>
+ <dl>
+ <dt><label for="lang_author">{L_LANG_AUTHOR}:</label></dt>
+ <dd><input type="text" id="lang_author" name="lang_author" value="{LANG_AUTHOR}" maxlength="255" /></dd>
+ </dl>
+
+ <p class="quick" style="margin-top: -15px;">
+ <input type="submit" name="update_details" class="button2" value="{L_SUBMIT}" />
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+ <br /><br />
+
+ <!-- IF S_MISSING_FILES -->
+ <div class="errorbox">
+ <h3>{L_MISSING_FILES}</h3>
+ <p>{MISSING_FILES}</p>
+ </div>
+ <br /><br />
+ <!-- ENDIF -->
+
+ <!-- IF S_MISSING_VARS -->
+ <h1>{L_MISSING_LANG_VARIABLES}</h1>
+
+ <p>{L_MISSING_VARS_EXPLAIN}</p>
+
+ <form id="missing" method="post" action="{U_MISSING_ACTION}">
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_LANGUAGE_KEY}</th>
+ <th>{L_LANGUAGE_VARIABLE}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN missing -->
+ <tr class="row4">
+ <td><strong>{missing.FILE}</strong></td>
+ <td style="text-align: right;"><input type="submit" name="missing_file[{missing.KEY}]" value="{L_SELECT}" class="button2" /></td>
+ </tr>
+ {missing.TPL}
+ <!-- END missing -->
+ </tbody>
+ </table>
+ <div>{S_FORM_TOKEN}</div>
+ </form>
+
+ <br /><br />
+ <!-- ENDIF -->
+
+ <a name="entries"></a>
+
+ <h1>{L_LANGUAGE_ENTRIES}</h1>
+
+ <p>{L_LANGUAGE_ENTRIES_EXPLAIN}</p>
+
+ <form id="lang_entries" method="post" action="{U_ENTRY_ACTION}">
+
+ <!-- IF S_FROM_STORE -->
+ <fieldset class="quick" style="float: {S_CONTENT_FLOW_BEGIN};">
+ <input type="submit" name="remove_store" value="{L_REMOVE_FROM_STORAGE_FOLDER}" class="button2" />
+ </fieldset>
+ <!-- ENDIF -->
+
+ <fieldset class="quick" style="float: {S_CONTENT_FLOW_END};">
+ <select name="language_file">{S_LANG_OPTIONS}</select>&nbsp;<input type="submit" class="button2" name="change" value="{L_SELECT}" />
+ </fieldset>
+
+ <p>&nbsp;<br />&nbsp;</p>
+
+
+ <!--[if lt IE 8]>
+ <style type="text/css">
+ /* <![CDATA[ */
+ input.langvalue, textarea.langvalue {
+ width: 450px;
+ }
+ /* ]]> */
+ </style>
+ <![endif]-->
+
+ <table cellspacing="1">
+ <thead>
+ <!-- IF S_EMAIL_FILE -->
+ <tr>
+ <th colspan="2">{L_FILE_CONTENTS}</th>
+ </tr>
+ <!-- ELSE -->
+ <tr>
+ <th>{L_LANGUAGE_KEY}</th>
+ <th>{L_LANGUAGE_VARIABLE}</th>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td rowspan="2" class="row3"><strong>{PRINT_MESSAGE}<!-- IF S_FROM_STORE --><br /><span style="color: red;">{L_FILE_FROM_STORAGE}</span><!-- ENDIF --></strong></td>
+ <td class="row3" style="text-align: right;"><input type="submit" name="download_file" class="button2" value="{L_SUBMIT_AND_DOWNLOAD}" />&nbsp;&nbsp;<input type="submit" name="submit_file" class="button2" value="{L_SUBMIT}" /></td>
+ </tr>
+ <tr>
+ <td class="row3" style="text-align: right;">
+ <!-- IF ALLOW_UPLOAD -->&nbsp;&nbsp;{L_UPLOAD_METHOD}:&nbsp;<!-- BEGIN buttons--><input type="radio" class="radio"<!-- IF buttons.S_FIRST_ROW --> id="method" checked="checked"<!-- ENDIF --> value="{buttons.VALUE}" name="method" />&nbsp;{buttons.VALUE}&nbsp;<!-- END buttons --><input type="submit" name="upload_file" class="button2" value="{L_SUBMIT_AND_UPLOAD}" /><!-- ENDIF --></td>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- IF S_EMAIL_FILE -->
+ <tr>
+ <td class="row2" colspan="2" style="text-align: center;"><textarea name="entry" id="entry" cols="80" rows="20">{LANG}</textarea></td>
+ </tr>
+ <!-- ELSE -->
+ {TPL}
+ <!-- ENDIF -->
+ <tr>
+ <td class="row3" colspan="3" style="text-align: right;">{S_FORM_TOKEN}<input type="submit" name="download_file" class="button2" value="{L_SUBMIT_AND_DOWNLOAD}" />&nbsp;&nbsp;<input type="submit" name="submit_file" class="button2" value="{L_SUBMIT}" /></td>
+ </tr>
+ </tbody>
+ </table>
+ </form>
+
+<!-- ELSEIF S_UPLOAD -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_UPLOAD_SETTINGS}</h1>
+
+ <form id="upload" method="post" action="{U_ACTION}">
+
+ <!-- IF S_CONNECTION_SUCCESS -->
+ <div class="successbox">
+ <p>{L_CONNECTION_SUCCESS}</p>
+ </div>
+ <!-- ELSEIF S_CONNECTION_FAILED -->
+ <div class="errorbox">
+ <p>{L_CONNECTION_FAILED}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <fieldset>
+ <legend>{L_UPLOAD_SETTINGS}</legend>
+ <dl>
+ <dt><label>{L_UPLOAD_METHOD}:</label></dt>
+ <dd><strong>{NAME}</strong></dd>
+ </dl>
+ <!-- BEGIN data -->
+ <dl>
+ <dt><label for="{data.DATA}">{data.NAME}:</label><br /><span>{data.EXPLAIN}</span></dt>
+ <dd><input type="<!-- IF data.DATA == 'password' -->password<!-- ELSE -->text<!-- ENDIF -->" id="{data.DATA}" name="{data.DATA}" value="{data.DEFAULT}" /></dd>
+ </dl>
+ <!-- END data -->
+ </fieldset>
+
+ <fieldset class="quick">
+ {HIDDEN}
+ {S_FORM_TOKEN}
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ <input class="button1" type="submit" name="test_connection" value="{L_TEST_CONNECTION}" />
+ </fieldset>
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_ACP_LANGUAGE_PACKS}</h1>
+
+ <p>{L_ACP_LANGUAGE_PACKS_EXPLAIN}</p>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_LANGUAGE_PACK_NAME}</th>
+ <th>{L_LANGUAGE_PACK_LOCALNAME}</th>
+ <th>{L_LANGUAGE_PACK_ISO}</th>
+ <th>{L_LANGUAGE_PACK_USED_BY}</th>
+ <th>{L_OPTIONS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="row3" colspan="5"><strong>{L_INSTALLED_LANGUAGE_PACKS}</strong></td>
+ </tr>
+ <!-- BEGIN lang -->
+ <!-- IF lang.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td><a href="{lang.U_DETAILS}">{lang.ENGLISH_NAME}</a> {lang.TAG}</td>
+ <td>{lang.LOCAL_NAME}</td>
+ <td style="text-align: center;"><strong>{lang.ISO}</strong></td>
+ <td style="text-align: center;">{lang.USED_BY}</td>
+ <td style="text-align: center;">&nbsp;<a href="{lang.U_DOWNLOAD}">{L_DOWNLOAD}</a>&nbsp;|&nbsp;<a href="{lang.U_DELETE}">{L_DELETE}</a></td>
+ </tr>
+ <!-- END lang -->
+ <!-- IF .notinst -->
+ <tr>
+ <td class="row3" colspan="5"><strong>{L_UNINSTALLED_LANGUAGE_PACKS}</strong></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- BEGIN notinst -->
+ <!-- IF notinst.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td>{notinst.NAME}</td>
+ <td>{notinst.LOCAL_NAME}</td>
+ <td style="text-align: center;"><strong>{notinst.ISO}</strong></td>
+ <td colspan="2" style="text-align: center;"><a href="{notinst.U_INSTALL}">{L_INSTALL}</a></td>
+ </tr>
+ <!-- END notinst -->
+ </tbody>
+ </table>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html
new file mode 100644
index 0000000000..f2fa5dbc26
--- /dev/null
+++ b/phpBB/adm/style/acp_logs.html
@@ -0,0 +1,93 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_TITLE}</h1>
+
+<p>{L_EXPLAIN}</p>
+
+<form id="list" method="post" action="{U_ACTION}">
+
+<fieldset class="display-options" style="float: left">
+ {L_SEARCH_KEYWORDS}: <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
+</fieldset>
+
+<!-- IF PAGINATION -->
+<div class="pagination" style="float: right; margin: 15px 0 2px 0">
+ <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
+</div>
+<!-- ENDIF -->
+
+<div class="clearfix">&nbsp;</div>
+<div><br style="clear: both;" /></div>
+
+<!-- IF .log -->
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_USERNAME}</th>
+ <th>{L_IP}</th>
+ <th>{L_TIME}</th>
+ <th>{L_ACTION}</th>
+ <!-- IF S_CLEARLOGS -->
+ <th>{L_MARK}</th>
+ <!-- ENDIF -->
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN log -->
+ <!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td>
+ {log.USERNAME}
+ <!-- IF log.REPORTEE_USERNAME -->
+ <br />&raquo; {log.REPORTEE_USERNAME}
+ <!-- ENDIF -->
+ </td>
+ <td style="text-align: center;">{log.IP}</td>
+ <td style="text-align: center;">{log.DATE}</td>
+ <td>{log.ACTION}<!-- IF log.DATA --><br /><span>{log.DATA}</span><!-- ENDIF --></td>
+ <!-- IF S_CLEARLOGS -->
+ <td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{log.ID}" /></td>
+ <!-- ENDIF -->
+ </tr>
+ <!-- END log -->
+ </tbody>
+ </table>
+
+<!-- IF PAGINATION -->
+ <div class="pagination">
+ <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
+ </div>
+<!-- ENDIF -->
+
+<!-- ELSE -->
+ <div class="errorbox">
+ <p>{L_NO_ENTRIES}</p>
+ </div>
+<!-- ENDIF -->
+
+<fieldset class="display-options">
+ {L_DISPLAY_LOG}: &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}
+ <input class="button2" type="submit" value="{L_GO}" name="sort" />
+ {S_FORM_TOKEN}
+</fieldset>
+<hr />
+
+<!-- IF S_SHOW_FORUMS -->
+ <fieldset class="quick">
+ {L_SELECT_FORUM}: <select name="f" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{S_FORUM_BOX}</select>
+ <input class="button2" type="submit" value="{L_GO}" />
+ </fieldset>
+<!-- ENDIF -->
+
+<!-- IF .log and S_CLEARLOGS -->
+ <fieldset class="quick">
+ <input class="button2" type="submit" name="delall" value="{L_DELETE_ALL}" />&nbsp;
+ <input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" /><br />
+ <p class="small"><a href="#" onclick="marklist('list', 'mark', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('list', 'mark', false); return false;">{L_UNMARK_ALL}</a></p>
+ </fieldset>
+<!-- ENDIF -->
+
+</form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html
new file mode 100644
index 0000000000..46d65df7a2
--- /dev/null
+++ b/phpBB/adm/style/acp_main.html
@@ -0,0 +1,249 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_RESTORE_PERMISSIONS -->
+
+ <h1>{L_PERMISSIONS_TRANSFERRED}</h1>
+
+ <p>{L_PERMISSIONS_TRANSFERRED_EXPLAIN}</p>
+
+<!-- ELSE -->
+
+ <h1>{L_WELCOME_PHPBB}</h1>
+
+ <p>{L_ADMIN_INTRO}</p>
+
+ <!-- IF S_VERSIONCHECK_FAIL -->
+ <div class="errorbox notice">
+ <p>{L_VERSIONCHECK_FAIL}</p>
+ <p><a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a> &middot; <a href="{U_VERSIONCHECK}">{L_MORE_INFORMATION}</a></p>
+ </div>
+ <!-- ELSEIF not S_VERSION_UP_TO_DATE -->
+ <div class="errorbox">
+ <p>{L_VERSION_NOT_UP_TO_DATE_TITLE}</p>
+ <p><a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a> &middot; <a href="{U_VERSIONCHECK}">{L_MORE_INFORMATION}</a></p>
+ </div>
+ <!-- ENDIF -->
+
+
+ <!-- IF S_REMOVE_INSTALL -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{L_REMOVE_INSTALL}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF S_WRITABLE_CONFIG -->
+ <div class="errorbox notice">
+ <p>{L_WRITABLE_CONFIG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <table cellspacing="1">
+ <caption>{L_FORUM_STATS}</caption>
+ <col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
+ <thead>
+ <tr>
+ <th>{L_STATISTIC}</th>
+ <th>{L_VALUE}</th>
+ <th>{L_STATISTIC}</th>
+ <th>{L_VALUE}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{L_NUMBER_POSTS}: </td>
+ <td><strong>{TOTAL_POSTS}</strong></td>
+ <td>{L_POSTS_PER_DAY}: </td>
+ <td><strong>{POSTS_PER_DAY}</strong></td>
+ </tr>
+ <tr>
+ <td>{L_NUMBER_TOPICS}: </td>
+ <td><strong>{TOTAL_TOPICS}</strong></td>
+ <td>{L_TOPICS_PER_DAY}: </td>
+ <td><strong>{TOPICS_PER_DAY}</strong></td>
+ </tr>
+ <tr>
+ <td>{L_NUMBER_USERS}: </td>
+ <td><strong>{TOTAL_USERS}</strong></td>
+ <td>{L_USERS_PER_DAY}: </td>
+ <td><strong>{USERS_PER_DAY}</strong></td>
+ </tr>
+ <tr>
+ <td>{L_NUMBER_FILES}: </td>
+ <td><strong>{TOTAL_FILES}</strong></td>
+ <td>{L_FILES_PER_DAY}: </td>
+ <td><strong>{FILES_PER_DAY}</strong></td>
+ </tr>
+
+
+ <tr>
+ <td>{L_BOARD_STARTED}: </td>
+ <td><strong>{START_DATE}</strong></td>
+ <td>{L_AVATAR_DIR_SIZE}: </td>
+ <td><strong>{AVATAR_DIR_SIZE}</strong></td>
+ </tr>
+ <tr>
+ <td>{L_DATABASE_SIZE}: </td>
+ <td><strong>{DBSIZE}</strong></td>
+ <td>{L_UPLOAD_DIR_SIZE}: </td>
+ <td><strong>{UPLOAD_DIR_SIZE}</strong></td>
+ </tr>
+ <tr>
+ <td>{L_DATABASE_SERVER_INFO}: </td>
+ <td><strong>{DATABASE_INFO}</strong></td>
+ <td>{L_GZIP_COMPRESSION}: </td>
+ <td><strong>{GZIP_COMPRESSION}</strong></td>
+ </tr>
+ <tr>
+ <td>{L_BOARD_VERSION}: </td>
+ <td>
+ <strong><a href="{U_VERSIONCHECK}" <!-- IF S_VERSION_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF --> title="{L_MORE_INFORMATION}">{BOARD_VERSION}</a></strong> [&nbsp;<a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a>&nbsp;]
+ </td>
+ <!-- IF S_TOTAL_ORPHAN -->
+ <td>{L_NUMBER_ORPHAN}: </td>
+ <td><strong>{TOTAL_ORPHAN}</strong></td>
+ <!-- ELSE -->
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <!-- ENDIF -->
+ </tr>
+ </tbody>
+ </table>
+
+ <!-- IF S_ACTION_OPTIONS -->
+ <fieldset>
+ <legend>{L_STATISTIC_RESYNC_OPTIONS}</legend>
+
+ <form id="action_online_form" method="post" action="{U_ACTION}">
+ <dl>
+ <dt><label for="action_online">{L_RESET_ONLINE}</label><br /><span>&nbsp;</span></dt>
+ <dd><input type="hidden" name="action" value="online" /><input class="button2" type="submit" id="action_online" name="action_online" value="{L_RUN}" /></dd>
+ </dl>
+ </form>
+
+ <form id="action_date_form" method="post" action="{U_ACTION}">
+ <dl>
+ <dt><label for="action_date">{L_RESET_DATE}</label><br /><span>&nbsp;</span></dt>
+ <dd><input type="hidden" name="action" value="date" /><input class="button2" type="submit" id="action_date" name="action_date" value="{L_RUN}" /></dd>
+ </dl>
+ </form>
+
+ <form id="action_stats_form" method="post" action="{U_ACTION}">
+ <dl>
+ <dt><label for="action_stats">{L_RESYNC_STATS}</label><br /><span>{L_RESYNC_STATS_EXPLAIN}</span></dt>
+ <dd><input type="hidden" name="action" value="stats" /><input class="button2" type="submit" id="action_stats" name="action_stats" value="{L_RUN}" /></dd>
+ </dl>
+ </form>
+
+ <form id="action_user_form" method="post" action="{U_ACTION}">
+ <dl>
+ <dt><label for="action_user">{L_RESYNC_POSTCOUNTS}</label><br /><span>{L_RESYNC_POSTCOUNTS_EXPLAIN}</span></dt>
+ <dd><input type="hidden" name="action" value="user" /><input class="button2" type="submit" id="action_user" name="action_user" value="{L_RUN}" /></dd>
+ </dl>
+ </form>
+
+ <form id="action_db_track_form" method="post" action="{U_ACTION}">
+ <dl>
+ <dt><label for="action_db_track">{L_RESYNC_POST_MARKING}</label><br /><span>{L_RESYNC_POST_MARKING_EXPLAIN}</span></dt>
+ <dd><input type="hidden" name="action" value="db_track" /><input class="button2" type="submit" id="action_db_track" name="action_db_track" value="{L_RUN}" /></dd>
+ </dl>
+ </form>
+
+ <!-- IF S_FOUNDER -->
+ <form id="action_purge_sessions_form" method="post" action="{U_ACTION}">
+ <dl>
+ <dt><label for="action_purge_sessions">{L_PURGE_SESSIONS}</label><br /><span>{L_PURGE_SESSIONS_EXPLAIN}</span></dt>
+ <dd><input type="hidden" name="action" value="purge_sessions" /><input class="button2" type="submit" id="action_purge_sessions" name="action_purge_sessions" value="{L_RUN}" /></dd>
+ </dl>
+ </form>
+ <form id="action_purge_cache_form" method="post" action="{U_ACTION}">
+ <dl>
+ <dt><label for="action_purge_cache">{L_PURGE_CACHE}</label><br /><span>{L_PURGE_CACHE_EXPLAIN}</span></dt>
+ <dd><input type="hidden" name="action" value="purge_cache" /><input class="button2" type="submit" id="action_purge_cache" name="action_purge_cache" value="{L_RUN}" /></dd>
+ </dl>
+ </form>
+ <!-- ENDIF -->
+ </fieldset>
+ <!-- ENDIF -->
+
+ <!-- IF .log -->
+ <h2>{L_ADMIN_LOG}</h2>
+
+ <p>{L_ADMIN_LOG_INDEX_EXPLAIN}</p>
+
+ <div style="text-align: right;"><a href="{U_ADMIN_LOG}">&raquo; {L_VIEW_ADMIN_LOG}</a></div>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_USERNAME}</th>
+ <th>{L_IP}</th>
+ <th>{L_TIME}</th>
+ <th>{L_ACTION}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN log -->
+ <!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td>{log.USERNAME}</td>
+ <td style="text-align: center;">{log.IP}</td>
+ <td style="text-align: center;">{log.DATE}</td>
+ <td>{log.ACTION}</td>
+ </tr>
+ <!-- END log -->
+ </tbody>
+ </table>
+
+ <br />
+
+ <!-- ENDIF -->
+
+ <!-- IF S_INACTIVE_USERS -->
+ <h2>{L_INACTIVE_USERS}</h2>
+
+ <p>{L_INACTIVE_USERS_EXPLAIN_INDEX}</p>
+
+ <div style="text-align: right;"><a href="{U_INACTIVE_USERS}">&raquo; {L_VIEW_INACTIVE_USERS}</a></div>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_USERNAME}</th>
+ <th>{L_JOINED}</th>
+ <th>{L_INACTIVE_DATE}</th>
+ <th>{L_LAST_VISIT}</th>
+ <th>{L_INACTIVE_REASON}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN inactive -->
+ <!-- IF inactive.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td style="vertical-align: top;">
+ {inactive.USERNAME_FULL}
+ <!-- IF inactive.POSTS --><br />{L_POSTS}: <strong>{inactive.POSTS}</strong> [<a href="{inactive.U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a>]<!-- ENDIF -->
+ </td>
+ <td style="vertical-align: top;">{inactive.JOINED}</td>
+ <td style="vertical-align: top;">{inactive.INACTIVE_DATE}</td>
+ <td style="vertical-align: top;">{inactive.LAST_VISIT}</td>
+ <td style="vertical-align: top;">
+ {inactive.REASON}
+ <!-- IF inactive.REMINDED --><br />{inactive.REMINDED_EXPLAIN}<!-- ENDIF -->
+ </td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td colspan="5" style="text-align: center;">{L_NO_INACTIVE_USERS}</td>
+ </tr>
+ <!-- END inactive -->
+ </tbody>
+ </table>
+
+ <!-- ENDIF -->
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html
new file mode 100644
index 0000000000..5396e78557
--- /dev/null
+++ b/phpBB/adm/style/acp_modules.html
@@ -0,0 +1,212 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT_MODULE -->
+
+ <script type="text/javascript">
+ // <![CDATA[
+ function display_options(value)
+ {
+ if (value == 'category')
+ {
+ dE('modoptions', -1);
+ }
+ else
+ {
+ dE('modoptions', 1);
+ }
+ }
+
+ function display_modes(value)
+ {
+ // Find the old select tag
+ var item = document.getElementById('module_mode');
+
+ // Create the new select tag
+ var new_node = document.createElement('select');
+ new_node.setAttribute('id', 'module_mode');
+ new_node.setAttribute('name', 'module_mode');
+
+ // Substitute it for the old one
+ item.parentNode.replaceChild(new_node, item);
+
+ // Reset the variable
+ item = document.getElementById('module_mode');
+
+ var j = 0;
+<!-- BEGIN m_names -->
+
+ if (value == '{m_names.A_NAME}')
+ {
+ <!-- BEGIN modes -->
+ item.options[j] = new Option('{m_names.modes.A_VALUE}');
+ item.options[j].value = '{m_names.modes.A_OPTION}';
+ j++;
+ <!-- END modes -->
+ }
+<!-- END m_names -->
+
+ // select first item
+ item.options[0].selected = true;
+ }
+
+ // ]]>
+ </script>
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE} :: {MODULENAME}</h1>
+
+ <p>{L_EDIT_MODULE_EXPLAIN}</p>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="moduleedit" method="post" action="{U_EDIT_ACTION}">
+
+ <fieldset>
+ <legend>{L_GENERAL_OPTIONS}</legend>
+ <dl>
+ <dt><label for="module_langname">{L_MODULE_LANGNAME}:</label><br />
+ <span>{L_MODULE_LANGNAME_EXPLAIN}</span></dt>
+ <dd><input name="module_langname" type="text" class="text medium" id="module_langname" value="{MODULE_LANGNAME}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="module_type">{L_MODULE_TYPE}:</label></dt>
+ <dd><select name="module_type" id="module_type" onchange="display_options(this.value);"><option value="category"<!-- IF S_IS_CAT --> selected="selected"<!-- ENDIF -->>{L_CATEGORY}</option><option value="module"<!-- IF not S_IS_CAT --> selected="selected"<!-- ENDIF -->>{L_MODULE}</option></select></dd>
+ </dl>
+ <dl>
+ <dt><label for="parent_id">{L_PARENT}:</label></dt>
+ <dd><select name="module_parent_id" id="parent_id">{S_CAT_OPTIONS}</select></dd>
+ </dl>
+ <hr />
+ <dl>
+ <dt><label for="module_enabled">{L_MODULE_ENABLED}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="module_enabled" id="module_enabled" value="1"<!-- IF MODULE_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="module_enabled" value="0"<!-- IF not MODULE_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <div id="modoptions"<!-- IF S_IS_CAT --> style="display: none;"<!-- ENDIF -->>
+ <dl>
+ <dt><label for="module_display">{L_MODULE_DISPLAYED}:</label><br /><span>{L_MODULE_DISPLAYED_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="module_display" id="module_display" value="1"<!-- IF MODULE_DISPLAY --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="module_display" value="0"<!-- IF not MODULE_DISPLAY --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="module_basename">{L_CHOOSE_MODULE}:</label><br />
+ <span>{L_CHOOSE_MODULE_EXPLAIN}</span></dt>
+ <dd><select name="module_basename" id="module_basename" onchange="display_modes(this.value);">{S_MODULE_NAMES}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="module_mode">{L_CHOOSE_MODE}:</label><br />
+ <span>{L_CHOOSE_MODE_EXPLAIN}</span></dt>
+ <dd><select name="module_mode" id="module_mode">{S_MODULE_MODES}</select></dd>
+ </dl>
+ </div>
+
+ <p class="submit-buttons">
+ <input type="hidden" name="action" value="{ACTION}" />
+ <input type="hidden" name="m" value="{MODULE_ID}" />
+
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_ACP_MODULE_MANAGEMENT}</h1>
+
+ <p>{L_ACP_MODULE_MANAGEMENT_EXPLAIN}</p>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <table cellspacing="1">
+ <tbody>
+ <tr>
+ <td class="row3">{NAVIGATION}<!-- IF S_NO_MODULES --> [<a href="{U_EDIT}">{L_EDIT}</a> | <a href="{U_DELETE}">{L_DELETE}</a> | <!-- IF MODULE_ENABLED --><a href="{U_DISABLE}">{L_DISABLE}</a><!-- ELSE --><a href="{U_ENABLE}">{L_ENABLE}</a><!-- ENDIF -->]<!-- ENDIF --></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <!-- IF .modules -->
+ <table cellspacing="1">
+ <col class="row1" /><col class="row1" /><col class="row2" /><col class="row2" />
+ <tbody>
+ <!-- BEGIN modules -->
+ <tr>
+ <td style="width: 5%; text-align: center;">{modules.MODULE_IMAGE}</td>
+ <td><a href="{modules.U_MODULE}">{modules.MODULE_TITLE}</a><!-- IF not modules.MODULE_DISPLAYED --> <span class="small">[{L_HIDDEN_MODULE}]</span><!-- ENDIF --></td>
+ <td style="width: 15%; white-space: nowrap; text-align: center; vertical-align: middle;">&nbsp;<!-- IF modules.MODULE_ENABLED --><a href="{modules.U_DISABLE}">{L_DISABLE}</a><!-- ELSE --><a href="{modules.U_ENABLE}">{L_ENABLE}</a><!-- ENDIF -->&nbsp;</td>
+ <td style="width:90px; white-space: nowrap; text-align: right; vertical-align: middle;">
+ <!-- IF modules.S_FIRST_ROW && not modules.S_LAST_ROW -->
+ {ICON_MOVE_UP_DISABLED}
+ <a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
+ <!-- ELSEIF not modules.S_FIRST_ROW && not modules.S_LAST_ROW-->
+ <a href="{modules.U_MOVE_UP}">{ICON_MOVE_UP}</a>
+ <a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
+ <!-- ELSEIF modules.S_LAST_ROW && not modules.S_FIRST_ROW -->
+ <a href="{modules.U_MOVE_UP}">{ICON_MOVE_UP}</a>
+ {ICON_MOVE_DOWN_DISABLED}
+ <!-- ELSE -->
+ {ICON_MOVE_UP_DISABLED}
+ {ICON_MOVE_DOWN_DISABLED}
+ <!-- ENDIF -->
+ <a href="{modules.U_EDIT}">{ICON_EDIT}</a>
+ <a href="{modules.U_DELETE}">{ICON_DELETE}</a>
+ </td>
+ </tr>
+ <!-- END modules -->
+ </tbody>
+ </table>
+ <!-- ENDIF -->
+
+ <div class="clearfix">&nbsp;</div>
+
+ <form id="quick" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick" style="float: {S_CONTENT_FLOW_END};">
+ <input type="hidden" name="action" value="quickadd" />
+
+ <select name="quick_install">{S_INSTALL_OPTIONS}</select>
+ <input class="button2" name="quickadd" type="submit" value="{L_ADD_MODULE}" />
+ </fieldset>
+
+ </form>
+
+ <form id="module" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick" style="float: {S_CONTENT_FLOW_BEGIN};">
+ <input type="hidden" name="action" value="add" />
+ <input type="hidden" name="module_parent_id" value="{PARENT_ID}" />
+
+ <input type="text" name="module_langname" maxlength="255" />
+ <input class="button2" name="addmodule" type="submit" value="{L_CREATE_MODULE}" />
+ </fieldset>
+
+ </form>
+
+ <div class="clearfix">&nbsp;</div><br style="clear: both;" />
+
+ <form id="mselect" method="post" action="{U_SEL_ACTION}">
+ <fieldset class="quick">
+ {L_SELECT_MODULE}: <select name="parent_id" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{MODULE_BOX}</select>
+
+ <input class="button2" type="submit" value="{L_GO}" />
+ </fieldset>
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_permission_roles.html b/phpBB/adm/style/acp_permission_roles.html
new file mode 100644
index 0000000000..220e7dafbe
--- /dev/null
+++ b/phpBB/adm/style/acp_permission_roles.html
@@ -0,0 +1,202 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT -->
+
+ <script type="text/javascript">
+ // <![CDATA[
+ var active_pmask = '0';
+ var active_fmask = '0';
+ var active_cat = '0';
+
+ var id = '000';
+
+ var role_options = new Array();
+
+ <!-- IF S_ROLE_JS_ARRAY -->
+ {S_ROLE_JS_ARRAY}
+ <!-- ENDIF -->
+ // ]]>
+ </script>
+
+ <script type="text/javascript" src="style/permissions.js"></script>
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_EXPLAIN}</p>
+
+ <br />
+ <a href="#acl">&raquo; {L_SET_ROLE_PERMISSIONS}</a>
+
+ <form id="acp_roles" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_ROLE_DETAILS}</legend>
+ <dl>
+ <dt><label for="role_name">{L_ROLE_NAME}:</label></dt>
+ <dd><input name="role_name" type="text" id="role_name" value="{ROLE_NAME}" maxlength="255" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="role_description">{L_ROLE_DESCRIPTION}:</label><br /><span>{L_ROLE_DESCRIPTION_EXPLAIN}</span></dt>
+ <dd><textarea id="role_description" name="role_description" rows="3" cols="45">{ROLE_DESCRIPTION}</textarea></dd>
+ </dl>
+
+ <p class="quick">
+ <input type="submit" class="button1" name="submit" value="{L_SUBMIT}" />
+ {S_FORM_TOKEN}
+ </p>
+ </fieldset>
+
+ <!-- IF S_DISPLAY_ROLE_MASK -->
+
+ <h1>{L_ROLE_ASSIGNED_TO}</h1>
+
+ <!-- INCLUDE permission_roles_mask.html -->
+
+ <!-- ENDIF -->
+
+ <p>
+
+ <a name="acl"></a>
+
+ <a href="#maincontent">&raquo; {L_BACK_TO_TOP}</a><br />
+ <br /><br />
+
+ </p>
+
+ <h1>{L_ACL_TYPE}</h1>
+
+ <fieldset class="perm nolegend">
+
+ <div id="advanced00">
+ <div class="permissions-category">
+ <ul>
+ <!-- BEGIN auth -->
+ <!-- IF auth.S_YES -->
+ <li class="permissions-preset-yes<!-- IF auth.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab00{auth.S_ROW_COUNT}">
+ <!-- ELSEIF auth.S_NEVER -->
+ <li class="permissions-preset-never<!-- IF auth.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab00{auth.S_ROW_COUNT}">
+ <!-- ELSEIF auth.S_NO -->
+ <li class="permissions-preset-no<!-- IF auth.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab00{auth.S_ROW_COUNT}">
+ <!-- ELSE -->
+ <li class="permissions-preset-custom<!-- IF auth.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab00{auth.S_ROW_COUNT}">
+ <!-- ENDIF -->
+ <a href="#" onclick="swap_options('0','0','{auth.S_ROW_COUNT}'); return false;"><span class="tabbg"><span class="colour"></span>{auth.CAT_NAME}</span></a></li>
+ <!-- END auth -->
+ </ul>
+ </div>
+ <!-- BEGIN auth -->
+ <div class="permissions-panel" id="options00{auth.S_ROW_COUNT}"<!-- IF auth.S_FIRST_ROW --><!-- ELSE --> style="display: none;"<!-- ENDIF -->>
+ <span class="corners-top"><span></span></span>
+ <div class="tablewrap">
+ <table id="table00{auth.S_ROW_COUNT}" cellspacing="1">
+ <colgroup>
+ <col class="permissions-name" />
+ <col class="permissions-yes" />
+ <col class="permissions-no" />
+ <col class="permissions-never" />
+ </colgroup>
+ <thead>
+ <tr>
+ <th class="name" scope="col"><strong>{L_ACL_SETTING}</strong></th>
+ <th class="value permissions-yes" scope="col"><a href="#" onclick="mark_options('options00{auth.S_ROW_COUNT}', 'y'); set_colours('00{auth.S_ROW_COUNT}', false, 'yes'); return false;">{L_ACL_YES}</a></th>
+ <th class="value permissions-no" scope="col"><a href="#" onclick="mark_options('options00{auth.S_ROW_COUNT}', 'u'); set_colours('00{auth.S_ROW_COUNT}', false, 'no'); return false;">{L_ACL_NO}</a></th>
+ <th class="value permissions-never" scope="col"><a href="#" onclick="mark_options('options00{auth.S_ROW_COUNT}', 'n'); set_colours('00{auth.S_ROW_COUNT}', false, 'never'); return false;">{L_ACL_NEVER}</a></th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN mask -->
+ <!-- IF auth.mask.S_ROW_COUNT is even --><tr class="row4"><!-- ELSE --><tr class="row3"><!-- ENDIF -->
+ <th class="permissions-name<!-- IF auth.mask.S_ROW_COUNT is even --> row4<!-- ELSE --> row3<!-- ENDIF -->">{auth.mask.PERMISSION}</th>
+
+ <td class="permissions-yes"><label for="setting_{auth.mask.FIELD_NAME}_y"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting_{auth.mask.FIELD_NAME}_y" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_YES --> checked="checked"<!-- ENDIF --> value="1" /></label></td>
+ <td class="permissions-no"><label for="setting_{auth.mask.FIELD_NAME}_u"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting_{auth.mask.FIELD_NAME}_u" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_NO --> checked="checked"<!-- ENDIF --> value="-1" /></label></td>
+ <td class="permissions-never"><label for="setting_{auth.mask.FIELD_NAME}_n"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting_{auth.mask.FIELD_NAME}_n" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_NEVER --> checked="checked"<!-- ENDIF --> value="0" /></label></td>
+ </tr>
+ <!-- END mask -->
+ </tbody>
+ </table>
+ </div>
+ <span class="corners-bottom"><span></span></span>
+ </div>
+ <!-- END auth -->
+ </div>
+
+ </fieldset>
+
+ <fieldset class="quick">
+ <input type="submit" class="button1" name="submit" value="{L_SUBMIT}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+ <a href="#maincontent">&raquo; {L_BACK_TO_TOP}</a><br />
+ <br />
+
+<!-- ELSE -->
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_EXPLAIN}</p>
+
+ <form id="acp_roles" method="post" action="{U_ACTION}">
+
+ <table cellspacing="1">
+ <col class="col2" /><col class="col2" /><col class="col1" /><col class="col2" /><col class="col2" />
+ <thead>
+ <tr>
+ <th>{L_ROLE_NAME}</th>
+ <th colspan="2">{L_OPTIONS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN roles -->
+ <tr>
+ <td style="vertical-align: top;"><strong>{roles.ROLE_NAME}</strong>
+ <!-- IF roles.ROLE_DESCRIPTION --><br /><span>{roles.ROLE_DESCRIPTION}</span><!-- ENDIF -->
+ </td>
+ <td style="width: 30%; text-align: center; vertical-align: top; white-space: nowrap;"><!-- IF roles.U_DISPLAY_ITEMS --><a href="{roles.U_DISPLAY_ITEMS}">{L_VIEW_ASSIGNED_ITEMS}</a><!-- ELSE -->{L_VIEW_ASSIGNED_ITEMS}<!-- ENDIF --></td>
+ <td style="width: 80px; text-align: right; vertical-align: top; white-space: nowrap;">
+ <!-- IF roles.S_FIRST_ROW && not roles.S_LAST_ROW -->
+ {ICON_MOVE_UP_DISABLED}
+ <a href="{roles.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
+ <!-- ELSEIF not roles.S_FIRST_ROW && not roles.S_LAST_ROW-->
+ <a href="{roles.U_MOVE_UP}">{ICON_MOVE_UP}</a>
+ <a href="{roles.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
+ <!-- ELSEIF roles.S_LAST_ROW && not roles.S_FIRST_ROW -->
+ <a href="{roles.U_MOVE_UP}">{ICON_MOVE_UP}</a>
+ {ICON_MOVE_DOWN_DISABLED}
+ <!-- ELSE -->
+ {ICON_MOVE_UP_DISABLED}
+ {ICON_MOVE_DOWN_DISABLED}
+ <!-- ENDIF -->
+ <a href="{roles.U_EDIT}" title="{L_EDIT_ROLE}">{ICON_EDIT}</a>
+ <a href="{roles.U_REMOVE}" title="{L_REMOVE_ROLE}">{ICON_DELETE}</a>
+ </td>
+ </tr>
+ <!-- END roles -->
+ </tbody>
+ </table>
+
+ <fieldset class="quick">
+ {L_CREATE_ROLE}: <input type="text" name="role_name" value="" maxlength="255" /><!-- IF S_ROLE_OPTIONS --> <select name="options_from"><option value="0" selected="selected">{L_CREATE_ROLE_FROM}</option>{S_ROLE_OPTIONS}</select><!-- ENDIF --> <input class="button2" type="submit" name="add" value="{L_SUBMIT}" /><br />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+ <!-- IF S_DISPLAY_ROLE_MASK -->
+
+ <a name="assigned_to"></a>
+
+ <h1>{L_ROLE_ASSIGNED_TO}</h1>
+
+ <!-- INCLUDE permission_roles_mask.html -->
+
+ <!-- ENDIF -->
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/acp_permissions.html b/phpBB/adm/style/acp_permissions.html
new file mode 100644
index 0000000000..63583093b0
--- /dev/null
+++ b/phpBB/adm/style/acp_permissions.html
@@ -0,0 +1,357 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_INTRO -->
+
+ <h1>{L_ACP_PERMISSIONS}</h1>
+
+ {L_ACP_PERMISSIONS_EXPLAIN}
+
+<!-- ENDIF -->
+
+<!-- IF S_SELECT_VICTIM -->
+
+ <!-- IF U_BACK --><a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a><!-- ENDIF -->
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_EXPLAIN}</p>
+
+ <!-- IF S_FORUM_NAMES -->
+ <p><strong>{L_FORUMS}:</strong> {FORUM_NAMES}</p>
+ <!-- ENDIF -->
+
+ <!-- IF S_SELECT_FORUM -->
+
+ <form id="select_victim" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_LOOK_UP_FORUM}</legend>
+ <!-- IF S_FORUM_MULTIPLE --><p>{L_LOOK_UP_FORUMS_EXPLAIN}</p><!-- ENDIF -->
+ <dl>
+ <dt><label for="forum">{L_LOOK_UP_FORUM}:</label></dt>
+ <dd><select id="forum" name="forum_id[]"<!-- IF S_FORUM_MULTIPLE --> multiple="multiple"<!-- ENDIF --> size="10">{S_FORUM_OPTIONS}</select></dd>
+ <!-- IF S_FORUM_ALL --><dd><label><input type="checkbox" class="radio" name="all_forums" value="1" /> {L_ALL_FORUMS}</label></dd><!-- ENDIF -->
+ </dl>
+
+ <p class="quick">
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
+ </p>
+
+ </fieldset>
+ </form>
+
+ <!-- IF S_FORUM_MULTIPLE -->
+
+ <form id="select_subforum" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_LOOK_UP_FORUM}</legend>
+ <p>{L_SELECT_FORUM_SUBFORUM_EXPLAIN}</p>
+ <dl>
+ <dt><label for="sforum">{L_LOOK_UP_FORUM}:</label></dt>
+ <dd><select id="sforum" name="subforum_id">{S_SUBFORUM_OPTIONS}</select></dd>
+ </dl>
+
+ <p class="quick">
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
+ </p>
+
+ </fieldset>
+ </form>
+
+ <!-- ENDIF -->
+
+ <!-- ELSEIF S_SELECT_USER and S_CAN_SELECT_USER -->
+
+ <form id="select_victim" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_LOOK_UP_USER}</legend>
+ <dl>
+ <dt><label for="username">{L_FIND_USERNAME}:</label></dt>
+ <dd><input class="text medium" type="text" id="username" name="username[]" /></dd>
+ <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
+ <dd class="full" style="text-align: left;"><label><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
+ </dl>
+
+ <p class="quick">
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
+ </p>
+ </fieldset>
+ </form>
+
+ <!-- ELSEIF S_SELECT_GROUP and S_CAN_SELECT_GROUP -->
+
+ <form id="select_victim" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_LOOK_UP_GROUP}</legend>
+ <dl>
+ <dt><label for="group">{L_LOOK_UP_GROUP}:</label></dt>
+ <dd><select name="group_id[]" id="group">{S_GROUP_OPTIONS}</select></dd>
+ </dl>
+
+ <p class="quick">
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
+ </p>
+
+ </fieldset>
+ </form>
+
+ <!-- ELSEIF S_SELECT_USERGROUP -->
+
+ <div style="float: {S_CONTENT_FLOW_BEGIN}; width: 48%;">
+
+ <!-- IF S_CAN_SELECT_USER -->
+
+ <h1>{L_USERS}</h1>
+
+ <form id="users" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_MANAGE_USERS}</legend>
+ <dl>
+ <dd class="full"><select style="width: 100%;" name="user_id[]" multiple="multiple" size="5">{S_DEFINED_USER_OPTIONS}</select></dd>
+ <!-- IF S_ALLOW_ALL_SELECT --><dd class="full" style="text-align: right;"><label><input type="checkbox" class="radio" name="all_users" value="1" /> {L_ALL_USERS}</label></dd><!-- ENDIF -->
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ <input type="submit" class="button2" name="action[delete]" value="{L_REMOVE_PERMISSIONS}" style="width: 46% !important;" /> &nbsp; <input class="button1" type="submit" name="submit_edit_options" value="{L_EDIT_PERMISSIONS}" style="width: 46% !important;" />
+ </fieldset>
+ </form>
+
+ <form id="add_user" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_ADD_USERS}</legend>
+ <p>{L_USERNAMES_EXPLAIN}</p>
+ <dl>
+ <dd class="full"><textarea id="username" name="usernames" rows="5" cols="5" style="width: 100%; height: 60px;"></textarea></dd>
+ <dd class="full" style="text-align: left;"><div style="float: {S_CONTENT_FLOW_END};">[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</div><label><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ <input class="button1" type="submit" name="submit_add_options" value="{L_ADD_PERMISSIONS}" />
+ </fieldset>
+ </form>
+
+ <!-- ENDIF -->
+
+ </div>
+
+ <div style="float: {S_CONTENT_FLOW_END}; width: 48%">
+
+ <!-- IF S_CAN_SELECT_GROUP -->
+
+ <h1>{L_USERGROUPS}</h1>
+
+ <form id="groups" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_MANAGE_GROUPS}</legend>
+ <dl>
+ <dd class="full"><select style="width: 100%;" name="group_id[]" multiple="multiple" size="5">{S_DEFINED_GROUP_OPTIONS}</select></dd>
+ <!-- IF S_ALLOW_ALL_SELECT --><dd class="full" style="text-align: right;"><label><input type="checkbox" class="radio" name="all_groups" value="1" /> {L_ALL_GROUPS}</label></dd><!-- ENDIF -->
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ <input class="button2" type="submit" name="action[delete]" value="{L_REMOVE_PERMISSIONS}" style="width: 46% !important;" /> &nbsp; <input class="button1" type="submit" name="submit_edit_options" value="{L_EDIT_PERMISSIONS}" style="width: 46% !important;" />
+ </fieldset>
+ </form>
+
+ <form id="add_groups" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_ADD_GROUPS}</legend>
+ <dl>
+ <dd class="full"><select name="group_id[]" style="width: 100%; height: 107px;" multiple="multiple">{S_ADD_GROUP_OPTIONS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ <input type="submit" class="button1" name="submit_add_options" value="{L_ADD_PERMISSIONS}" />
+ </fieldset>
+ </form>
+
+ <!-- ENDIF -->
+
+ </div>
+
+ <!-- ELSEIF S_SELECT_USERGROUP_VIEW -->
+
+ <div style="float: {S_CONTENT_FLOW_BEGIN}; width: 48%;">
+
+ <h1>{L_USERS}</h1>
+
+ <form id="users" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_MANAGE_USERS}</legend>
+ <dl>
+ <dd class="full"><select style="width: 100%;" name="user_id[]" multiple="multiple" size="5">{S_DEFINED_USER_OPTIONS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ <input class="button1" type="submit" name="submit" value="{L_VIEW_PERMISSIONS}" />
+ </fieldset>
+ </form>
+
+ <form id="add_user" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_LOOK_UP_USER}</legend>
+ <dl>
+ <dt><label for="username">{L_FIND_USERNAME}:</label></dt>
+ <dd><input type="text" id="username" name="username[]" /></dd>
+ <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
+ <dd class="full" style="text-align: left;"><label><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ <input type="submit" name="submit" value="{L_VIEW_PERMISSIONS}" class="button1" />
+ </fieldset>
+ </form>
+
+ </div>
+
+ <div style="float: {S_CONTENT_FLOW_END}; width: 48%">
+
+ <h1>{L_USERGROUPS}</h1>
+
+ <form id="groups" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_MANAGE_GROUPS}</legend>
+ <dl>
+ <dd class="full"><select style="width: 100%;" name="group_id[]" multiple="multiple" size="5">{S_DEFINED_GROUP_OPTIONS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ <input class="button1" type="submit" name="submit" value="{L_VIEW_PERMISSIONS}" />
+ </fieldset>
+ </form>
+
+ <form id="group" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_LOOK_UP_GROUP}</legend>
+ <dl>
+ <dt><label for="group_select">{L_LOOK_UP_GROUP}:</label></dt>
+ <dd><select name="group_id[]" id="group_select">{S_ADD_GROUP_OPTIONS}</select></dd>
+ <dd>&nbsp;</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ <input type="submit" name="submit" value="{L_VIEW_PERMISSIONS}" class="button1" />
+ </fieldset>
+ </form>
+
+ </div>
+
+ <!-- ENDIF -->
+
+<!-- ENDIF -->
+
+<!-- IF S_VIEWING_PERMISSIONS -->
+
+ <h1>{L_ACL_VIEW}</h1>
+
+ <p>{L_ACL_VIEW_EXPLAIN}</p>
+
+ <fieldset class="quick">
+ <strong>&raquo; {L_PERMISSION_TYPE}</strong>
+ </fieldset>
+
+ <!-- INCLUDE permission_mask.html -->
+
+<!-- ENDIF -->
+
+<!-- IF S_SETTING_PERMISSIONS -->
+
+ <h1>{L_ACL_SET}</h1>
+
+ <p>{L_ACL_SET_EXPLAIN}</p>
+
+ <br />
+
+ <fieldset class="quick" style="float: {S_CONTENT_FLOW_END};">
+ <strong>&raquo; {L_PERMISSION_TYPE}</strong>
+ </fieldset>
+
+ <!-- IF S_PERMISSION_DROPDOWN -->
+ <form id="pselect" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick" style="float: {S_CONTENT_FLOW_BEGIN};">
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ {L_SELECT_TYPE}: <select name="type">{S_PERMISSION_DROPDOWN}</select>
+
+ <input class="button2" type="submit" name="submit" value="{L_GO}" />
+ </fieldset>
+ </form>
+ <!-- ENDIF -->
+
+ <br /><br />
+
+ <!-- include tooltip file -->
+ <script type="text/javascript" src="style/tooltip.js"></script>
+ <script type="text/javascript">
+ // <![CDATA[
+ window.onload = function(){enable_tooltips_select('set-permissions', '{LA_ROLE_DESCRIPTION}', 'role')};
+ // ]]>
+ </script>
+
+ <form id="set-permissions" method="post" action="{U_ACTION}">
+
+ {S_HIDDEN_FIELDS}
+
+ <!-- INCLUDE permission_mask.html -->
+
+ <br /><br />
+
+ <fieldset class="quick" style="float: {S_CONTENT_FLOW_END};">
+ <input class="button1" type="submit" name="action[apply_all_permissions]" value="{L_APPLY_ALL_PERMISSIONS}" />
+ <input class="button2" type="button" name="cancel" value="{L_RESET}" onclick="document.forms['set-permissions'].reset(); init_colours(active_pmask + active_fmask);" />
+ {S_FORM_TOKEN}
+ </fieldset>
+
+ <br /><br />
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/acp_php_info.html b/phpBB/adm/style/acp_php_info.html
new file mode 100644
index 0000000000..de065c4896
--- /dev/null
+++ b/phpBB/adm/style/acp_php_info.html
@@ -0,0 +1,13 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_ACP_PHP_INFO}</h1>
+
+<p>{L_ACP_PHP_INFO_EXPLAIN}</p>
+
+<div class="phpinfo">
+ {PHPINFO}
+</div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html
new file mode 100644
index 0000000000..85d37568c2
--- /dev/null
+++ b/phpBB/adm/style/acp_profile.html
@@ -0,0 +1,236 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_EXPLAIN}</p>
+
+ <!-- IF ERROR_MSG -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="add_profile_field" method="post" action="{U_ACTION}">
+
+ <!-- IF S_STEP_ONE -->
+
+ <fieldset>
+ <legend>{L_TITLE}</legend>
+ <dl>
+ <dt><label>{L_FIELD_TYPE}:</label><br /><span>{L_FIELD_TYPE_EXPLAIN}</span></dt>
+ <dd><strong>{FIELD_TYPE}</strong></dd>
+ </dl>
+ <!-- IF S_EDIT_MODE -->
+ <dl>
+ <dt><label>{L_FIELD_IDENT}:</label><br /><span>{L_FIELD_IDENT_EXPLAIN}</span></dt>
+ <dd><input type="hidden" name="field_ident" value="{FIELD_IDENT}" /><strong>{FIELD_IDENT}</strong></dd>
+ </dl>
+ <!-- ELSE -->
+ <dl>
+ <dt><label for="field_ident">{L_FIELD_IDENT}:</label><br /><span>{L_FIELD_IDENT_EXPLAIN}</span></dt>
+ <dd><input class="text medium" type="text" id="field_ident" name="field_ident" value="{FIELD_IDENT}" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="field_no_view">{L_DISPLAY_PROFILE_FIELD}:</label><br /><span>{L_DISPLAY_PROFILE_FIELD_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" id="field_no_view" name="field_no_view" value="0"<!-- IF not S_FIELD_NO_VIEW --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="field_no_view" value="1"<!-- IF S_FIELD_NO_VIEW --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_VISIBILITY_OPTION}</legend>
+ <dl>
+ <dt><label for="field_show_profile">{L_DISPLAY_AT_PROFILE}:</label><br /><span>{L_DISPLAY_AT_PROFILE_EXPLAIN}</span></dt>
+ <dd><input type="checkbox" class="radio" id="field_show_profile" name="field_show_profile" value="1"<!-- IF S_SHOW_PROFILE --> checked="checked"<!-- ENDIF --> /></dd>
+ </dl>
+ <dl>
+ <dt><label for="field_show_on_reg">{L_DISPLAY_AT_REGISTER}:</label><br /><span>{L_DISPLAY_AT_REGISTER_EXPLAIN}</span></dt>
+ <dd><input type="checkbox" class="radio" id="field_show_on_reg" name="field_show_on_reg" value="1"<!-- IF S_SHOW_ON_REG --> checked="checked"<!-- ENDIF --> /></dd>
+ </dl>
+ <dl>
+ <dt><label for="field_show_on_vt">{L_DISPLAY_ON_VT}:</label><br /><span>{L_DISPLAY_ON_VT_EXPLAIN}</span></dt>
+ <dd><input type="checkbox" class="radio" id="field_show_on_vt" name="field_show_on_vt" value="1"<!-- IF S_SHOW_ON_VT --> checked="checked"<!-- ENDIF --> /></dd>
+ </dl>
+ <dl>
+ <dt><label for="field_required">{L_REQUIRED_FIELD}:</label><br /><span>{L_REQUIRED_FIELD_EXPLAIN}</span></dt>
+ <dd><input type="checkbox" class="radio" id="field_required" name="field_required" value="1"<!-- IF S_FIELD_REQUIRED --> checked="checked"<!-- ENDIF --> /></dd>
+ </dl>
+ <dl>
+ <dt><label for="field_hide">{L_HIDE_PROFILE_FIELD}:</label><br /><span>{L_HIDE_PROFILE_FIELD_EXPLAIN}</span></dt>
+ <dd><input type="checkbox" class="radio" id="field_hide" name="field_hide" value="1"<!-- IF S_FIELD_HIDE --> checked="checked"<!-- ENDIF --> /></dd>
+ </dl>
+ </fieldset>
+
+ <!-- IF S_EDIT_MODE -->
+ <fieldset class="quick">
+ <input class="button1" type="submit" name="save" value="{L_SAVE}" />
+ </fieldset>
+ <!-- ENDIF -->
+
+ <fieldset>
+ <legend>{L_LANG_SPECIFIC}</legend>
+ <dl>
+ <dt><label for="lang_name">{L_USER_FIELD_NAME}:</label></dt>
+ <dd><input class="text medium" type="text" id="lang_name" name="lang_name" value="{LANG_NAME}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="lang_explain">{L_FIELD_DESCRIPTION}:</label><br /><span>{L_FIELD_DESCRIPTION_EXPLAIN}</span></dt>
+ <dd><textarea id="lang_explain" name="lang_explain" rows="3" cols="80">{LANG_EXPLAIN}</textarea></dd>
+ </dl>
+ <!-- IF S_TEXT or S_STRING -->
+ <dl>
+ <dt><label for="lang_default_value">{L_DEFAULT_VALUE}:</label><br /><span>{L_DEFAULT_VALUE_EXPLAIN}</span></dt>
+ <dd><!-- IF S_STRING --><input class="text medium" type="text" id="lang_default_value" name="lang_default_value" value="{LANG_DEFAULT_VALUE}" /><!-- ELSE --><textarea id="lang_default_value" name="lang_default_value" rows="5" cols="80">{LANG_DEFAULT_VALUE}</textarea><!-- ENDIF --></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF S_BOOL or S_DROPDOWN -->
+ <dl>
+ <dt><label for="lang_options">{L_ENTRIES}:</label>
+ <!-- IF S_EDIT_MODE and S_DROPDOWN -->
+ <br /><span>{L_EDIT_DROPDOWN_LANG_EXPLAIN}</span>
+ <!-- ELSE -->
+ <br /><span>{L_LANG_OPTIONS_EXPLAIN}</span>
+ <!-- ENDIF -->
+ </dt>
+ <!-- IF S_DROPDOWN -->
+ <dd><textarea id="lang_options" name="lang_options" rows="5" cols="80">{LANG_OPTIONS}</textarea></dd>
+ <!-- ELSE -->
+ <dd><input class="medium" id="lang_options" name="lang_options[0]" value="{FIRST_LANG_OPTION}" /> {L_FIRST_OPTION}</dd>
+ <dd><input class="medium" name="lang_options[1]" value="{SECOND_LANG_OPTION}" /> {L_SECOND_OPTION}</dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+
+ <fieldset class="quick">
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ <input class="button1" type="submit" name="next" value="{L_PROFILE_TYPE_OPTIONS}" />
+ </fieldset>
+
+ <!-- ELSEIF S_STEP_TWO -->
+
+ <fieldset>
+ <legend>{L_TITLE}</legend>
+ <!-- BEGIN option -->
+ <dl>
+ <dt><label>{option.TITLE}:</label><!-- IF option.EXPLAIN --><br /><span>{option.EXPLAIN}</span><!-- ENDIF --></dt>
+ <dd>{option.FIELD}</dd>
+ </dl>
+ <!-- END option -->
+ </fieldset>
+
+ <fieldset class="quick" style="float: {S_CONTENT_FLOW_BEGIN};">
+ <input class="button1" type="submit" name="prev" value="{L_PROFILE_BASIC_OPTIONS}" />
+ </fieldset>
+
+ <fieldset class="quick" style="float: {S_CONTENT_FLOW_END};">
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ <input class="button1" type="submit" name="next" value="{L_NEXT_STEP}" />
+ </fieldset>
+
+ <!-- ELSEIF S_STEP_THREE -->
+
+ <!-- BEGIN options -->
+ <fieldset>
+ <legend>{options.LANGUAGE}</legend>
+ <!-- BEGIN field -->
+ <dl>
+ <dt><label>{options.field.L_TITLE}:</label><!-- IF options.field.L_EXPLAIN --><br /><span>{options.field.L_EXPLAIN}</span><!-- ENDIF --></dt>
+ {options.field.FIELD}
+ </dl>
+ <!-- END field -->
+ </fieldset>
+ <!-- END options -->
+
+ <fieldset class="quick" style="float: {S_CONTENT_FLOW_BEGIN};">
+ <input class="button1" type="submit" name="prev" value="{L_PROFILE_TYPE_OPTIONS}" />
+ </fieldset>
+
+ <fieldset class="quick" style="float: {S_CONTENT_FLOW_END};">
+ {S_HIDDEN_FIELDS}
+ <input class="button1" type="submit" name="save" value="{L_SAVE}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+
+ <!-- ENDIF -->
+
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_ACP_CUSTOM_PROFILE_FIELDS}</h1>
+
+ <!-- IF S_NEED_EDIT -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{L_CUSTOM_FIELDS_NOT_TRANSLATED}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_FIELD_IDENT}</th>
+ <th>{L_FIELD_TYPE}</th>
+ <th colspan="2">{L_OPTIONS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN fields -->
+ <!-- IF fields.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td>{fields.FIELD_IDENT}</td>
+ <td>{fields.FIELD_TYPE}</td>
+ <td style="text-align: center;"><a href="{fields.U_ACTIVATE_DEACTIVATE}">{fields.L_ACTIVATE_DEACTIVATE}</a><!-- IF fields.S_NEED_EDIT --> | <a href="{fields.U_TRANSLATE}" style="color: red;">{L_TRANSLATE}</a><!-- ENDIF --></td>
+
+ <td style="width: 80px; text-align: right; white-space: nowrap;">
+ <!-- IF fields.S_FIRST_ROW && not fields.S_LAST_ROW -->
+ {ICON_MOVE_UP_DISABLED}
+ <a href="{fields.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
+ <!-- ELSEIF not fields.S_FIRST_ROW && not fields.S_LAST_ROW-->
+ <a href="{fields.U_MOVE_UP}">{ICON_MOVE_UP}</a>
+ <a href="{fields.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
+ <!-- ELSEIF fields.S_LAST_ROW && not fields.S_FIRST_ROW -->
+ <a href="{fields.U_MOVE_UP}">{ICON_MOVE_UP}</a>
+ {ICON_MOVE_DOWN_DISABLED}
+ <!-- ENDIF -->
+ <!-- IF not fields.S_NEED_EDIT -->
+ <a href="{fields.U_EDIT}">{ICON_EDIT}</a>
+ <!-- ELSE -->
+ {ICON_EDIT_DISABLED}
+ <!-- ENDIF -->
+ <a href="{fields.U_DELETE}">{ICON_DELETE}</a>
+ </td>
+
+ </tr>
+ <!-- BEGINELSE -->
+ <tr class="row3">
+ <td colspan="4">{L_ACP_NO_ITEMS}</td>
+ </tr>
+ <!-- END fields -->
+ </tbody>
+ </table>
+
+ <form id="profile_fields" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick">
+ <input class="text small" type="text" name="field_ident" /> <select name="field_type">{S_TYPE_OPTIONS}</select>
+ <input class="button1" type="submit" name="submit" value="{L_CREATE_NEW_FIELD}" />
+ <input type="hidden" name="create" value="1" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_prune_forums.html b/phpBB/adm/style/acp_prune_forums.html
new file mode 100644
index 0000000000..069d2c91c3
--- /dev/null
+++ b/phpBB/adm/style/acp_prune_forums.html
@@ -0,0 +1,108 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_PRUNED -->
+
+ <h1>{L_FORUM_PRUNE}</h1>
+
+ <p>{L_PRUNE_SUCCESS}</p>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_FORUM}</th>
+ <th>{L_TOPICS_PRUNED}</th>
+ <th>{L_POSTS_PRUNED}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN pruned -->
+ <!-- IF pruned.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="text-align: center;">{pruned.FORUM_NAME}</td>
+ <td style="text-align: center;">{pruned.NUM_TOPICS}</td>
+ <td style="text-align: center;">{pruned.NUM_POSTS}</td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td colspan="3" class="row3" style="text-align: center;">{L_NO_PRUNE}</td>
+ </tr>
+ <!-- END pruned -->
+ </tbody>
+ </table>
+
+<!-- ELSEIF S_SELECT_FORUM -->
+
+ <h1>{L_ACP_PRUNE_FORUMS}</h1>
+
+ <p>{L_ACP_PRUNE_FORUMS_EXPLAIN}</p>
+
+ <form id="acp_prune" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_SELECT_FORUM}</legend>
+ <p>{L_LOOK_UP_FORUMS_EXPLAIN}</p>
+ <dl>
+ <dt><label for="forum">{L_LOOK_UP_FORUM}:</label></dt>
+ <dd><select id="forum" name="f[]" multiple="multiple" size="10">{S_FORUM_OPTIONS}</select></dd>
+ <dd><label><input type="checkbox" class="radio" name="all_forums" value="1" /> {L_ALL_FORUMS}</label></dd>
+ </dl>
+
+ <p class="quick">
+ <input class="button1" type="submit" value="{L_LOOK_UP_FORUM}" />
+ </p>
+ </fieldset>
+
+ </form>
+
+<!-- ELSE -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_ACP_PRUNE_FORUMS}</h1>
+
+ <p>{L_ACP_PRUNE_FORUMS_EXPLAIN}</p>
+
+ <h2>{L_FORUM}</h2>
+
+ <p>{L_SELECTED_FORUMS}: {FORUM_LIST}</p>
+
+ <form id="acp_prune" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_FORUM_PRUNE}</legend>
+ <dl>
+ <dt><label for="prune_days">{L_PRUNE_NOT_POSTED}:</label></dt>
+ <dd><input type="text" id="prune_days" name="prune_days" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="prune_vieweddays">{L_PRUNE_NOT_VIEWED}:</label></dt>
+ <dd><input type="text" id="prune_vieweddays" name="prune_vieweddays" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="polls">{L_PRUNE_OLD_POLLS}:</label><br /><span>{L_PRUNE_OLD_POLLS_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="prune_old_polls" value="1" /> {L_YES}</label>
+ <label><input type="radio" class="radio" id="polls" name="prune_old_polls" value="0" checked="checked" /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="announce">{L_PRUNE_ANNOUNCEMENTS}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="prune_announce" value="1" /> {L_YES}</label>
+ <label><input type="radio" class="radio" id="announce" name="prune_announce" value="0" checked="checked" /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="sticky">{L_PRUNE_STICKY}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="prune_sticky" value="1" /> {L_YES}</label>
+ <label><input type="radio" class="radio" id="sticky" name="prune_sticky" value="0" checked="checked" /> {L_NO}</label></dd>
+ </dl>
+
+ <p class="quick">
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
+ </p>
+ </fieldset>
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_prune_users.html b/phpBB/adm/style/acp_prune_users.html
new file mode 100644
index 0000000000..0f2b23dcef
--- /dev/null
+++ b/phpBB/adm/style/acp_prune_users.html
@@ -0,0 +1,59 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_ACP_PRUNE_USERS}</h1>
+
+<p>{L_ACP_PRUNE_USERS_EXPLAIN}</p>
+
+<form id="acp_prune" method="post" action="{U_ACTION}">
+
+<fieldset>
+ <legend>{L_ACP_PRUNE_USERS}</legend>
+<dl>
+ <dt><label for="username">{L_USERNAME}:</label></dt>
+ <dd><input type="text" id="username" name="username" /></dd>
+</dl>
+<dl>
+ <dt><label for="email">{L_EMAIL}:</label></dt>
+ <dd><input type="text" id="email" name="email" /></dd>
+</dl>
+<dl>
+ <dt><label for="joined">{L_JOINED}:</label><br /><span>{L_JOINED_EXPLAIN}</span></dt>
+ <dd><select name="joined_select">{S_JOINED_OPTIONS}</select> <input type="text" id="joined" name="joined" /></dd>
+</dl>
+<dl>
+ <dt><label for="active">{L_LAST_ACTIVE}:</label><br /><span>{L_LAST_ACTIVE_EXPLAIN}</span></dt>
+ <dd><select name="active_select">{S_ACTIVE_OPTIONS}</select> <input type="text" id="active" name="active" /></dd>
+</dl>
+<dl>
+ <dt><label for="count">{L_POSTS}:</label></dt>
+ <dd><select name="count_select">{S_COUNT_OPTIONS}</select> <input type="text" id="count" name="count" /></dd>
+</dl>
+<dl>
+ <dt><label for="users">{L_ACP_PRUNE_USERS}:</label><br /><span>{L_SELECT_USERS_EXPLAIN}</span></dt>
+ <dd><textarea id="users" name="users" cols="40" rows="5"></textarea></dd>
+ <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
+</dl>
+<dl>
+ <dt><label for="deleteposts">{L_DELETE_USER_POSTS}:</label><br /><span>{L_DELETE_USER_POSTS_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="deleteposts" value="1" /> {L_YES}</label>
+ <label><input type="radio" class="radio" id="deleteposts" name="deleteposts" value="0" checked="checked" /> {L_NO}</label></dd>
+</dl>
+<dl>
+ <dt><label for="deactivate">{L_DEACTIVATE_DELETE}:</label><br /><span>{L_DEACTIVATE_DELETE_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="action" value="delete" /> {L_DELETE_USERS}</label>
+ <label><input type="radio" class="radio" id="deactivate" name="action" value="deactivate" checked="checked" /> {L_DEACTIVATE}</label></dd>
+</dl>
+
+<p class="submit-buttons">
+ <input type="hidden" name="prune" value="1" />
+
+ <input class="button1" type="submit" id="update" name="update" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ {S_FORM_TOKEN}
+</p>
+</fieldset>
+</form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html
new file mode 100644
index 0000000000..9306e30269
--- /dev/null
+++ b/phpBB/adm/style/acp_ranks.html
@@ -0,0 +1,98 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <script type="text/javascript">
+ // <![CDATA[
+ function update_image(newimage)
+ {
+ document.getElementById('image').src = (newimage) ? "{RANKS_PATH}/" + encodeURI(newimage) : "./images/spacer.gif";
+ }
+
+ // ]]>
+ </script>
+
+ <h1>{L_ACP_MANAGE_RANKS}</h1>
+
+ <p>{L_ACP_RANKS_EXPLAIN}</p>
+
+ <form id="acp_ranks" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_ACP_RANKS}</legend>
+ <dl>
+ <dt><label for="title">{L_RANK_TITLE}:</label></dt>
+ <dd><input name="title" type="text" id="title" value="{RANK_TITLE}" maxlength="255" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="rank_image">{L_RANK_IMAGE}:</label></dt>
+ <dd><select name="rank_image" id="rank_image" onchange="update_image(this.options[selectedIndex].value);">{S_FILENAME_LIST}</select></dd>
+ <dd><img src="{RANK_IMAGE}" id="image" alt="" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="special_rank">{L_RANK_SPECIAL}:</label></dt>
+ <dd><label><input onchange="dE('posts', -1)" type="radio" class="radio" name="special_rank" value="1" id="special_rank"<!-- IF S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> />{L_YES}</label>
+ <label><input onchange="dE('posts', 1)" type="radio" class="radio" name="special_rank" value="0"<!-- IF not S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <!-- IF S_SPECIAL_RANK --><div id="posts" style="display: none;"><!-- ELSE --><div id="posts"><!-- ENDIF -->
+ <dl>
+ <dt><label for="min_posts">{L_RANK_MINIMUM}:</label></dt>
+ <dd><input name="min_posts" type="text" id="min_posts" maxlength="10" value="{MIN_POSTS}" /></dd>
+ </dl>
+ </div>
+
+ <p class="submit-buttons">
+ <input type="hidden" name="action" value="save" />
+
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ {S_FORM_TOKEN}
+ </p>
+ </fieldset>
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_ACP_MANAGE_RANKS}</h1>
+
+ <p>{L_ACP_RANKS_EXPLAIN}</p>
+
+ <form id="acp_ranks" method="post" action="{U_ACTION}">
+ <fieldset class="tabulated">
+ <legend>{L_ACP_MANAGE_RANKS}</legend>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_RANK_IMAGE}</th>
+ <th>{L_RANK_TITLE}</th>
+ <th>{L_RANK_MINIMUM}</th>
+ <th>{L_ACTION}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN ranks -->
+ <!-- IF ranks.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="text-align: center;"><!-- IF ranks.S_RANK_IMAGE --><img src="{ranks.RANK_IMAGE}" alt="{ranks.RANK_TITLE}" title="{ranks.RANK_TITLE}" /><!-- ELSE -->&nbsp; - &nbsp;<!-- ENDIF --></td>
+ <td style="text-align: center;">{ranks.RANK_TITLE}</td>
+ <td style="text-align: center;"><!-- IF ranks.S_SPECIAL_RANK -->&nbsp; - &nbsp;<!-- ELSE -->{ranks.MIN_POSTS}<!-- ENDIF --></td>
+ <td style="text-align: center;"><a href="{ranks.U_EDIT}">{ICON_EDIT}</a> <a href="{ranks.U_DELETE}">{ICON_DELETE}</a></td>
+ </tr>
+ <!-- END ranks -->
+ </tbody>
+ </table>
+
+ <p class="quick">
+ <input class="button2" name="add" type="submit" value="{L_ADD_RANK}" />
+ {S_FORM_TOKEN}
+ </p>
+ </fieldset>
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_reasons.html b/phpBB/adm/style/acp_reasons.html
new file mode 100644
index 0000000000..23fcfbdeb8
--- /dev/null
+++ b/phpBB/adm/style/acp_reasons.html
@@ -0,0 +1,127 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT_REASON -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_REASON_EDIT_EXPLAIN}</p>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF not S_TRANSLATED -->
+ <h3>{L_AVAILABLE_TITLES}</h3>
+
+ <p>{S_AVAILABLE_TITLES}</p>
+ <!-- ENDIF -->
+
+ <form id="acp_reasons" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_TITLE}</legend>
+ <p><!-- IF S_TRANSLATED -->{L_IS_TRANSLATED_EXPLAIN}<!-- ELSE -->{L_IS_NOT_TRANSLATED_EXPLAIN}<!-- ENDIF --></p>
+ <dl>
+ <dt><label for="reason_title">{L_REASON_TITLE}:</label></dt>
+ <dd><input name="reason_title" type="text" id="reason_title" value="{REASON_TITLE}" maxlength="255" /></dd>
+ </dl>
+ <!-- IF S_TRANSLATED -->
+ <dl>
+ <dt>{L_REASON_TITLE_TRANSLATED}</dt>
+ <dd>{TRANSLATED_TITLE}</dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="reason_description">{L_REASON_DESCRIPTION}:</label></dt>
+ <dd><textarea name="reason_description" id="reason_description" rows="8" cols="80">{REASON_DESCRIPTION}</textarea></dd>
+ </dl>
+ <!-- IF S_TRANSLATED -->
+ <dl>
+ <dt>{L_REASON_DESC_TRANSLATED}</dt>
+ <dd>{TRANSLATED_DESCRIPTION}</dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ {S_FORM_TOKEN}
+ </p>
+ </fieldset>
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_ACP_REASONS}</h1>
+
+ <p>{L_ACP_REASONS_EXPLAIN}</p>
+
+ <form id="reasons" method="post" action="{U_ACTION}">
+ <fieldset class="tabulated">
+ <legend>{L_ACP_REASONS}</legend>
+
+ <!-- IF .reasons -->
+ <table cellspacing="1">
+ <col class="row1" /><col class="row1" /><col class="row2" />
+ <thead>
+ <tr>
+ <th>{L_REASON}</th>
+ <th>{L_USED_IN_REPORTS}</th>
+ <th>{L_OPTIONS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN reasons -->
+ <tr>
+ <td>
+ <i style="float: {S_CONTENT_FLOW_END}; font-size: .9em;"><!-- IF reasons.S_TRANSLATED -->{L_IS_TRANSLATED}<!-- ELSE -->{L_IS_NOT_TRANSLATED}<!-- ENDIF --></i>
+ <strong>{reasons.REASON_TITLE}<!-- IF reasons.S_OTHER_REASON --> *<!-- ENDIF --></strong>
+ <br /><span>{reasons.REASON_DESCRIPTION}</span>
+ </td>
+ <td style="width: 100px;">{reasons.REASON_COUNT}</td>
+ <td style="width: 80px; text-align: right; white-space: nowrap;">
+ <!-- IF reasons.S_FIRST_ROW && not reasons.S_LAST_ROW -->
+ {ICON_MOVE_UP_DISABLED}
+ <a href="{reasons.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
+ <!-- ELSEIF not reasons.S_FIRST_ROW && not reasons.S_LAST_ROW-->
+ <a href="{reasons.U_MOVE_UP}">{ICON_MOVE_UP}</a>
+ <a href="{reasons.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
+ <!-- ELSEIF reasons.S_LAST_ROW && not reasons.S_FIRST_ROW -->
+ <a href="{reasons.U_MOVE_UP}">{ICON_MOVE_UP}</a>
+ {ICON_MOVE_DOWN_DISABLED}
+ <!-- ENDIF -->
+ <a href="{reasons.U_EDIT}">{ICON_EDIT}</a>
+ <!-- IF reasons.U_DELETE -->
+ <a href="{reasons.U_DELETE}">{ICON_DELETE}</a>
+ <!-- ELSE -->
+ {ICON_DELETE_DISABLED}
+ <!-- ENDIF -->
+ </td>
+ </tr>
+ <!-- END reasons -->
+ </tbody>
+ </table>
+
+ <!-- ENDIF -->
+
+ <p class="quick">
+ <input type="hidden" name="action" value="add" />
+
+ <input type="text" name="reason_title" />
+ <input class="button2" name="addreason" type="submit" value="{L_ADD_NEW_REASON}" />
+ {S_FORM_TOKEN}
+ </p>
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_search.html b/phpBB/adm/style/acp_search.html
new file mode 100644
index 0000000000..5fd7a23d97
--- /dev/null
+++ b/phpBB/adm/style/acp_search.html
@@ -0,0 +1,157 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_SETTINGS -->
+ <h1>{L_ACP_SEARCH_SETTINGS}</h1>
+
+ <p>{L_ACP_SEARCH_SETTINGS_EXPLAIN}</p>
+
+ <form id="acp_search" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_GENERAL_SEARCH_SETTINGS}</legend>
+ <dl>
+ <dt><label for="load_search">{L_YES_SEARCH}:</label><br /><span>{L_YES_SEARCH_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" id="load_search" name="config[load_search]" value="1"<!-- IF S_YES_SEARCH --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="config[load_search]" value="0"<!-- IF not S_YES_SEARCH --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="search_interval">{L_SEARCH_INTERVAL}:</label><br /><span>{L_SEARCH_INTERVAL_EXPLAIN}</span></dt>
+ <dd><input id="search_interval" type="text" size="4" maxlength="4" name="config[search_interval]" value="{SEARCH_INTERVAL}" /> {L_SECONDS}</dd>
+ </dl>
+ <dl>
+ <dt><label for="search_anonymous_interval">{L_SEARCH_GUEST_INTERVAL}:</label><br /><span>{L_SEARCH_GUEST_INTERVAL_EXPLAIN}</span></dt>
+ <dd><input id="search_anonymous_interval" type="text" size="4" maxlength="4" name="config[search_anonymous_interval]" value="{SEARCH_GUEST_INTERVAL}" /> {L_SECONDS}</dd>
+ </dl>
+ <dl>
+ <dt><label for="limit_search_load">{L_LIMIT_SEARCH_LOAD}:</label><br /><span>{L_LIMIT_SEARCH_LOAD_EXPLAIN}</span></dt>
+ <dd><input id="limit_search_load" type="text" size="4" maxlength="4" name="config[limit_search_load]" value="{LIMIT_SEARCH_LOAD}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="min_search_author_chars">{L_MIN_SEARCH_AUTHOR_CHARS}:</label><br /><span>{L_MIN_SEARCH_AUTHOR_CHARS_EXPLAIN}</span></dt>
+ <dd><input id="min_search_author_chars" type="text" size="4" maxlength="4" name="config[min_search_author_chars]" value="{MIN_SEARCH_AUTHOR_CHARS}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="max_num_search_keywords">{L_MAX_NUM_SEARCH_KEYWORDS}:</label><br /><span>{L_MAX_NUM_SEARCH_KEYWORDS_EXPLAIN}</span></dt>
+ <dd><input id="max_num_search_keywords" type="text" size="4" maxlength="4" name="config[max_num_search_keywords]" value="{MAX_NUM_SEARCH_KEYWORDS}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="search_store_results">{L_SEARCH_STORE_RESULTS}:</label><br /><span>{L_SEARCH_STORE_RESULTS_EXPLAIN}</span></dt>
+ <dd><input id="search_store_results" type="text" size="4" maxlength="6" name="config[search_store_results]" value="{SEARCH_STORE_RESULTS}" /> {L_SECONDS}</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_SEARCH_TYPE}</legend>
+ <dl>
+ <dt><label for="search_type">{L_SEARCH_TYPE}:</label><br /><span>{L_SEARCH_TYPE_EXPLAIN}</span></dt>
+ <dd><select id="search_type" name="config[search_type]">{S_SEARCH_TYPES}</select></dd>
+ </dl>
+ </fieldset>
+
+ <!-- BEGIN backend -->
+
+ <fieldset>
+ <legend>{backend.NAME}</legend>
+ {backend.SETTINGS}
+ </fieldset>
+
+ <!-- END backend -->
+
+ <fieldset class="submit-buttons">
+ <legend>{L_SUBMIT}</legend>
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ELSEIF S_INDEX -->
+
+ <script type="text/javascript">
+ // <![CDATA[
+ /**
+ * Popup search progress bar
+ */
+ function popup_progress_bar(progress_type)
+ {
+ close_waitscreen = 0;
+ // no scrollbars
+ popup('{UA_PROGRESS_BAR}&amp;type=' + progress_type, 400, 240, '_index');
+ }
+ // ]]>
+ </script>
+
+ <h1>{L_ACP_SEARCH_INDEX}</h1>
+
+ <!-- IF S_CONTINUE_INDEXING -->
+ <p>{L_CONTINUE_EXPLAIN}</p>
+
+ <form id="acp_search_continue" method="post" action="{U_CONTINUE_INDEXING}">
+ <fieldset class="submit-buttons">
+ <legend>{L_SUBMIT}</legend>
+ <input class="button1" type="submit" id="continue" name="continue" value="{L_CONTINUE}" onclick="popup_progress_bar('{S_CONTINUE_INDEXING}');" />&nbsp;
+ <input class="button2" type="submit" id="cancel" name="cancel" value="{L_CANCEL}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+ <!-- ELSE -->
+
+ <p>{L_ACP_SEARCH_INDEX_EXPLAIN}</p>
+
+ <!-- BEGIN backend -->
+
+ <!-- IF backend.S_STATS -->
+
+ <form id="acp_search_index_{backend.NAME}" method="post" action="{U_ACTION}">
+
+ <fieldset class="tabulated">
+
+ {backend.S_HIDDEN_FIELDS}
+
+ <legend>{L_INDEX_STATS}: {backend.L_NAME} <!-- IF backend.S_ACTIVE -->({L_ACTIVE}) <!-- ENDIF --></legend>
+
+ <table cellspacing="1">
+ <caption>{backend.L_NAME} <!-- IF backend.S_ACTIVE -->({L_ACTIVE}) <!-- ENDIF --></caption>
+ <col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
+ <thead>
+ <tr>
+ <th>{L_STATISTIC}</th>
+ <th>{L_VALUE}</th>
+ <th>{L_STATISTIC}</th>
+ <th>{L_VALUE}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN data -->
+ <tr>
+ <td>{backend.data.STATISTIC_1}:</td>
+ <td>{backend.data.VALUE_1}</td>
+ <td>{backend.data.STATISTIC_2}<!-- IF backend.data.STATISTIC_2 -->:<!-- ENDIF --></td>
+ <td>{backend.data.VALUE_2}</td>
+ </tr>
+ <!-- END data -->
+ </tbody>
+ </table>
+
+ <!-- ENDIF -->
+
+ <p class="quick">
+ <!-- IF backend.S_INDEXED -->
+ <input class="button2" type="submit" name="action[delete]" value="{L_DELETE_INDEX}" onclick="popup_progress_bar('delete');" />
+ <!-- ELSE -->
+ <input class="button2" type="submit" name="action[create]" value="{L_CREATE_INDEX}" onclick="popup_progress_bar('create');" />
+ <!-- ENDIF -->
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+
+ </form>
+ <!-- END backend -->
+
+ <!-- ENDIF -->
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_send_statistics.html b/phpBB/adm/style/acp_send_statistics.html
new file mode 100644
index 0000000000..2a9b61f314
--- /dev/null
+++ b/phpBB/adm/style/acp_send_statistics.html
@@ -0,0 +1,71 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_SEND_STATISTICS}</h1>
+
+<p>{L_EXPLAIN_SEND_STATISTICS}</p>
+
+<script type="text/javascript">
+//<![CDATA[
+var iframect = 0;
+
+function iframe_updated()
+{
+ if (iframect++ == 0)
+ {
+ return;
+ }
+
+ dE('questionnaire-form', -1);
+ dE('questionnaire-thanks', 1);
+}
+//]]>
+</script>
+
+<iframe onload="iframe_updated();" name="questionaire_result" style="display: none;"></iframe>
+
+<form action="{U_COLLECT_STATS}" method="post" target="questionaire_result" id="questionnaire-form">
+
+ <p><a href="{U_ACP_MAIN}">{L_DONT_SEND_STATISTICS}</a></p>
+
+ <p>{L_EXPLAIN_SHOW_STATISTICS}</p>
+
+ <p id="show-button"><input type="button" class="button2" onclick="dE('configlist', 1); dE('show-button', -1);" value="{L_SHOW_STATISTICS}" /></p>
+
+ <div id="configlist">
+ <input type="button" class="button2" onclick="dE('show-button', 1); dE('configlist', -1);" value="{L_HIDE_STATISTICS}" />
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SEND_STATISTICS}" />
+ </p>
+
+ <!-- BEGIN providers -->
+ <fieldset>
+ <legend>{providers.NAME}</legend>
+ <!-- BEGIN values -->
+ <dl>
+ <dt>{providers.values.KEY}</dt>
+ <dd>{providers.values.VALUE}</dd>
+ </dl>
+ <!-- END values -->
+ </fieldset>
+ <!-- END providers -->
+ </div>
+ <p class="submit-buttons">
+ <input type="hidden" name="systemdata" value="{RAW_DATA}" />
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SEND_STATISTICS}" />
+ </p>
+</form>
+
+<div id="questionnaire-thanks" class="successbox">
+ <p><strong>{L_THANKS_SEND_STATISTICS}</strong><br /><br /><a href="{U_ACP_MAIN}">&laquo; {L_GO_ACP_MAIN}</a></p>
+</div>
+
+<script type="text/javascript">
+//<![CDATA[
+ dE('configlist', -1);
+ dE('questionnaire-thanks', -1);
+//]]>
+</script>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html
new file mode 100644
index 0000000000..5bde4008ad
--- /dev/null
+++ b/phpBB/adm/style/acp_styles.html
@@ -0,0 +1,521 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_DELETE -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_EXPLAIN}</p>
+
+ <form id="acp_styles" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_TITLE}</legend>
+ <dl>
+ <dt><label>{L_NAME}:</label></dt>
+ <dd><strong>{NAME}</strong></dd>
+ </dl>
+ <dl>
+ <dt><label for="new_id">{L_REPLACE}:</label><br /><span>{L_REPLACE_EXPLAIN}</span></dt>
+ <dd><select id="new_id" name="new_id">{S_REPLACE_OPTIONS}</select></dd>
+ </dl>
+
+ <p class="quick">
+ <input class="button1" type="submit" name="update" value="{L_DELETE}" />
+ {S_FORM_TOKEN}
+ </p>
+ </fieldset>
+ </form>
+
+<!-- ELSEIF S_EDIT_IMAGESET -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_EXPLAIN}</p>
+
+ <!-- IF SUCCESS -->
+ <div class="successbox">
+ <p>{L_IMAGESET_UPDATED}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF ERROR -->
+ <div class="errorbox">
+ <p>{L_NO_IMAGE}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <script type="text/javascript" defer="defer">
+ // <![CDATA[
+ function update_image(newimage)
+ {
+ document.getElementById('newimg').src = (newimage) ? '../styles/{A_PATH}/imageset/' + encodeURI(newimage) : 'images/no_image.png';
+ }
+ // ]]>
+ </script>
+ <script type="text/javascript">
+ // <![CDATA[
+ /**
+ * Handle displaying/hiding the dimension fields
+ */
+ function display_options(value)
+ {
+ if (value == 0)
+ {
+ dE('img_dimensions', -1);
+ }
+ else
+ {
+ dE('img_dimensions', 1);
+ }
+ }
+
+ /**
+ * Init the wanted display functionality if javascript is enabled.
+ * If javascript is not available, the user is still able to properly administrate.
+ */
+ onload = function()
+ {
+ <!-- IF not IMAGE_SIZE -->
+ dE('img_dimensions', -1);
+ <!-- ENDIF -->
+ }
+ // ]]>
+ </script>
+
+ <form method="post" action="{U_ACTION}">
+
+ <fieldset class="quick" style="text-align: left;">
+ <legend>{L_SELECT_IMAGE}</legend>
+ {L_SELECT_IMAGE}: <select name="imgname" onchange="this.form.submit();">
+ <!-- BEGIN category -->
+ <option class="sep" value="" disabled="disabled">{category.NAME}</option>
+ <!-- BEGIN images --><option value="{category.images.VALUE}"<!-- IF category.images.SELECTED--> selected="selected"<!-- ENDIF -->>&nbsp;&nbsp;&nbsp;&nbsp;{category.images.TEXT}</option>
+ <!-- END images -->
+ <!-- END category -->
+ </select>&nbsp; <input class="button1" type="submit" value="{L_SELECT}" tabindex="100" />
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_EDIT_IMAGESET}</legend>
+ <dl>
+ <dt><label>{L_CURRENT_IMAGE}:</label></dt>
+ <dd><img src="<!-- IF IMAGE_REQUEST -->{IMAGE_REQUEST}<!-- ELSE -->images/no_image.png<!-- ENDIF -->" alt="" /></dd>
+ </dl>
+ <dl>
+ <dt><label>{L_SELECTED_IMAGE}:</label></dt>
+ <dd><img src="{IMG_SRC}" id="newimg" alt="" /></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_IMAGE}</legend>
+ <dl>
+ <dt><label for="imgpath">{L_IMAGE}:</label></dt>
+ <dd><select id="imgpath" name="imgpath" onchange="update_image(this.options[selectedIndex].value);"><option value=""<!-- IF not IMAGE_SELECT--> selected="selected"<!-- ENDIF -->>{L_NO_IMAGE}</option>
+ <!-- BEGIN imagesetlist -->
+ <option class="sep" value=""><!-- IF imagesetlist.TYPE -->{L_LOCALISED_IMAGES}<!-- ELSE -->{L_GLOBAL_IMAGES}<!-- ENDIF --></option>
+ <!-- BEGIN images -->
+ <option value="{imagesetlist.images.VALUE}"<!-- IF imagesetlist.images.SELECTED--> selected="selected"<!-- ENDIF -->>{imagesetlist.images.TEXT}</option>
+ <!-- END images -->
+ <!-- END imagesetlist -->
+ </select>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="imgsize">{L_INCLUDE_DIMENSIONS}:</label><br /><span>{L_DIMENSIONS_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="imgsize" id="imgsize" onclick="display_options(1);" value="1"<!-- IF IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="imgsize" onclick="display_options(0);" value="0"<!-- IF not IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <div id="img_dimensions">
+ <dl>
+ <dt><label for="imgwidth">{L_IMAGE_WIDTH}:</label><br /><span>{L_AUTOMATIC_EXPLAIN}</span></dt>
+ <dd><input id="imgwidth" type="text" name="imgwidth" value="{IMAGE_SIZE}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="imgheight">{L_IMAGE_HEIGHT}:</label><br /><span>{L_AUTOMATIC_EXPLAIN}</span></dt>
+ <dd><input id="imgheight" type="text" name="imgheight" value="{IMAGE_HEIGHT}" /></dd>
+ </dl>
+ </div>
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <legend>{L_SUBMIT}</legend>
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="button2" type="reset" value="{L_RESET}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ELSEIF S_EDIT_TEMPLATE or S_EDIT_THEME -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_EDIT}</h1>
+
+ <p>{L_EDIT_EXPLAIN}</p>
+
+ <p>{L_SELECTED}: <strong>{SELECTED_TEMPLATE}</strong></p>
+
+ <form id="acp_styles" method="post" action="{U_ACTION}">
+
+ <!-- IF S_EDIT_TEMPLATE or (S_EDIT_THEME and not S_THEME_IN_DB) -->
+ <fieldset>
+ <legend>{L_SELECT}</legend>
+ <dl>
+ <dt><label for="template_file">{L_FILE}:</label></dt>
+ <dd><select id="template_file" name="template_file" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_TEMPLATES}</select> <input class="button2" type="submit" value="{L_SELECT}" /></dd>
+ </dl>
+ {S_FORM_TOKEN}
+ </fieldset>
+ <!-- ENDIF -->
+ </form>
+
+ <!-- IF TEMPLATE_FILE or (S_EDIT_THEME and S_THEME_IN_DB) -->
+ <script type="text/javascript" defer="defer">
+ // <![CDATA[
+
+ function change_editor_height(height)
+ {
+ height = Number(height);
+
+ if (isNaN(height))
+ {
+ return;
+ }
+
+ editor = document.getElementById('template_data');
+ editor.rows = Math.max(5, Math.min(height, 999));
+
+ append_text_rows('acp_styles', height);
+ append_text_rows('acp_template', height);
+ }
+
+ function append_text_rows(form_name, value)
+ {
+ value = Number(value);
+
+ if (isNaN(value))
+ {
+ return;
+ }
+
+ url = document.getElementById(form_name).action;
+
+ // Make sure &amp; is actually... &
+ url = url.replace(/&amp;/g, '&');
+
+ var_start = url.indexOf('&text_rows=');
+ if (var_start == -1)
+ {
+ document.getElementById(form_name).action = url + "&text_rows=" + value;
+ }
+ else
+ {
+ url_start = url.substring(0, var_start + 1);
+ var_end = url.substring(var_start + 1).indexOf('&');
+ if (var_end == -1)
+ {
+ document.getElementById(form_name).action = url_start + "text_rows=" + value;
+ }
+ else
+ {
+ document.getElementById(form_name).action = url_start + url.substring(var_end + var_start + 2) + "&text_rows=" + value;
+ }
+ }
+ }
+
+ // ]]>
+ </script>
+
+ <form id="acp_template" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_EDITOR}</legend>
+ <!-- IF S_EDIT_TEMPLATE or (S_EDIT_THEME and not S_THEME_IN_DB) -->
+ <dl>
+ <dt><label>{L_SELECTED_FILE}:</label></dt>
+ <dd>{TEMPLATE_FILE}</dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="text_rows">{L_EDITOR_HEIGHT}:</label></dt>
+ <dd><input id="text_rows" type="text" maxlength="3" value="{TEXT_ROWS}" /> <input class="button2" type="button" name="update" onclick="change_editor_height(this.form.text_rows.value);" value="{L_UPDATE}" /></dd>
+ </dl>
+ <textarea id="template_data" name="template_data" style="font-family:'Courier New', monospace;font-size:9pt;line-height:125%;width:100%;" cols="80" rows="{TEXT_ROWS}">{TEMPLATE_DATA}</textarea>
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <legend>{L_SUBMIT}</legend>
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ <input class="button1" id="save" type="submit" name="save" value="{L_SUBMIT}" />
+ </fieldset>
+ </form>
+ <!-- ENDIF -->
+
+<!-- ELSEIF S_CACHE -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_TEMPLATE_CACHE}</h1>
+
+ <p>{L_TEMPLATE_CACHE_EXPLAIN}</p>
+
+ <form id="acp_styles" method="post" action="{U_ACTION}">
+ <fieldset class="tabulated">
+ <legend>{L_TEMPLATE_CACHE}</legend>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_CACHE_FILENAME}</th>
+ <th>{L_CACHE_FILESIZE}</th>
+ <th>{L_CACHE_CACHED}</th>
+ <th>{L_CACHE_MODIFIED}</th>
+ <th>{L_MARK}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN file -->
+ <!-- IF file.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td><a href="{file.U_VIEWSOURCE}" onclick="popup(this.href, 750, 550, '_source'); return false;">{file.FILENAME_PATH}</a></td>
+ <td>{file.FILESIZE}</td>
+ <td>{file.CACHED}</td>
+ <td>{file.MODIFIED}</td>
+ <td><input type="checkbox" class="radio" name="delete[]" value="{file.FILENAME}" /></td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr class="row1">
+ <td colspan="5">{L_TEMPLATE_CACHE_EMPTY}</td>
+ </tr>
+ <!-- END file -->
+ </tbody>
+ </table>
+
+ <p class="quick">
+ <span class="small"><a href="#" onclick="marklist('acp_styles', 'delete', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('acp_styles', 'delete', false); return false;">{L_UNMARK_ALL}</a></span><br />
+ {S_FORM_TOKEN}
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_DELETE_MARKED}" />
+ </p>
+ </fieldset>
+ </form>
+
+<!-- ELSEIF S_EXPORT -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_EXPLAIN}</p>
+
+ <!-- IF S_ERROR_MSG -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="acp_styles" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_TITLE}</legend>
+ <dl>
+ <dt><label>{L_NAME}:</label></dt>
+ <dd><strong>{NAME}</strong></dd>
+ </dl>
+ <!-- IF S_STYLE -->
+ <dl>
+ <dt><label for="inc_template">{L_INCLUDE_TEMPLATE}:</label></dt>
+ <dd><label><input type="radio" class="radio" id="inc_template" name="inc_template" value="1" checked="checked" /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="inc_template" value="0" /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="inc_theme">{L_INCLUDE_THEME}:</label></dt>
+ <dd><label><input type="radio" class="radio" id="inc_theme" name="inc_theme" value="1" checked="checked" /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="inc_theme" value="0" /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="inc_imageset">{L_INCLUDE_IMAGESET}:</label></dt>
+ <dd><label><input type="radio" class="radio" id="inc_imageset" name="inc_imageset" value="1" checked="checked" /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="inc_imageset" value="0" /> {L_NO}</label></dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="store">{L_DOWNLOAD_STORE}:</label><br /><span>{L_DOWNLOAD_STORE_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" id="store" name="store" value="1" checked="checked" /> {L_EXPORT_STORE}</label>
+ <label><input type="radio" class="radio" name="store" value="0" /> {L_EXPORT_DOWNLOAD}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="format">{L_ARCHIVE_FORMAT}:</label></dt>
+ <dd>{FORMAT_BUTTONS}</dd>
+ </dl>
+
+ <p class="quick">
+ {S_FORM_TOKEN}
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ </p>
+ </fieldset>
+
+
+ </form>
+
+<!-- ELSEIF S_FRONTEND -->
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_EXPLAIN}</p>
+
+ <!-- IF S_STYLE --> <!-- DEFINE $COLSPAN = 5 --> <!-- ELSE --> <!-- DEFINE $COLSPAN = 4 --> <!-- ENDIF -->
+
+ <table cellspacing="1">
+ <col class="row1" /><!-- IF S_STYLE --><col class="row1" /><!-- ENDIF --><col class="row2" /><col class="row2" />
+ <thead>
+ <tr>
+ <th>{L_NAME}</th>
+ <!-- IF S_STYLE --><th>{L_STYLE_USED_BY}</th><!-- ENDIF -->
+ <th>{L_OPTIONS}</th>
+ <th>{L_ACTIONS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="row3" colspan="{$COLSPAN}"><strong>{L_INSTALLED}</strong></td>
+ </tr>
+ <!-- BEGIN installed -->
+ <tr>
+ <td><strong>{installed.NAME}</strong><!-- IF installed.S_DEFAULT_STYLE --> *<!-- ENDIF --></td>
+ <!-- IF S_STYLE -->
+ <td style="text-align: center;">{installed.STYLE_COUNT}</td>
+ <!-- ENDIF -->
+ <td style="text-align: center;">
+ {installed.S_OPTIONS}
+ </td>
+ <td style="text-align: center;">
+ <!-- IF S_STYLE -->
+ <a href="{installed.U_STYLE_ACT_DEACT}">{installed.L_STYLE_ACT_DEACT}</a> |
+ <!-- ENDIF -->
+ {installed.S_ACTIONS}
+ <!-- IF S_STYLE -->
+ | <a href="{installed.U_PREVIEW}">{L_PREVIEW}</a>
+ <!-- ENDIF -->
+ </td>
+ </tr>
+ <!-- END installed -->
+ <tr>
+ <td class="row3" colspan="{$COLSPAN}"><strong>{L_UNINSTALLED}</strong></td>
+ </tr>
+ <!-- IF not .uninstalled -->
+ <tr>
+ <td class="row1" colspan="{$COLSPAN}" style="text-align: center;">{L_NO_UNINSTALLED}</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- BEGIN uninstalled -->
+ <tr>
+ <td<!-- IF S_STYLE --> colspan="2"<!-- ENDIF -->><strong>{uninstalled.NAME}</strong><br /><span>{L_COPYRIGHT}: {uninstalled.COPYRIGHT}</span></td>
+ <td style="text-align: center;" colspan="2"><a href="{uninstalled.U_INSTALL}">{L_INSTALL}</a></td>
+ </tr>
+ <!-- END uninstalled -->
+ </tbody>
+ </table>
+
+ <!-- IF S_STYLE -->
+ <form id="acp_styles" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick">
+ <legend>{L_CREATE}</legend>
+ {L_CREATE}: <input type="text" name="name" value="" /> {L_FROM} <select name="basis">{S_BASIS_OPTIONS}</select> <input class="button2" type="submit" name="add" value="{L_SUBMIT}" />
+ </fieldset>
+
+ </form>
+ <!-- ENDIF -->
+
+<!-- ELSEIF S_DETAILS -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_TITLE}</h1>
+
+ <p>{L_EXPLAIN}</p>
+
+ <!-- IF S_ERROR_MSG -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="acp_styles" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_TITLE}</legend>
+ <dl>
+ <dt><label for="name">{L_NAME}:</label></dt>
+ <dd><!-- IF S_INSTALL --><strong id="name">{NAME}</strong><!-- ELSE --><input type="text" id="name" name="name" value="{NAME}" /><!-- ENDIF --></dd>
+ </dl>
+ <dl>
+ <dt><label for="copyright">{L_COPYRIGHT}:</label></dt>
+ <dd><!-- IF S_INSTALL --><strong id="copyright">{COPYRIGHT}</strong><!-- ELSE --><input type="text" id="copyright" name="copyright" value="{COPYRIGHT}" /><!-- ENDIF --></dd>
+ </dl>
+ <!-- IF S_SUPERTEMPLATE -->
+ <dl>
+ <dt><label for="inheriting">{L_INHERITING_FROM}:</label></dt>
+ <dd><strong id="inheriting">{S_SUPERTEMPLATE}</strong></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF S_STYLE and not S_BASIS -->
+ <dl>
+ <dt><label for="template_id">{L_STYLE_TEMPLATE}:</label></dt>
+ <dd><!-- IF S_INSTALL --><strong id="template_id">{TEMPLATE_NAME}</strong><!-- ELSE --><select id="template_id" name="template_id">{S_TEMPLATE_OPTIONS}</select><!-- ENDIF --></dd>
+ </dl>
+ <dl>
+ <dt><label for="theme_id">{L_STYLE_THEME}:</label></dt>
+ <dd><!-- IF S_INSTALL --><strong id="theme_id">{THEME_NAME}</strong><!-- ELSE --><select id="theme_id" name="theme_id">{S_THEME_OPTIONS}</select><!-- ENDIF --></dd>
+ </dl>
+ <dl>
+ <dt><label for="imageset_id">{L_STYLE_IMAGESET}:</label></dt>
+ <dd><!-- IF S_INSTALL --><strong id="imageset_id">{IMAGESET_NAME}</strong><!-- ELSE --><select id="imageset_id" name="imageset_id">{S_IMAGESET_OPTIONS}</select><!-- ENDIF --></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF (S_TEMPLATE or S_THEME) and (S_LOCATION or not S_INSTALL) -->
+ <dl>
+ <dt><label for="store_db">{L_LOCATION}:</label><br /><span><!-- IF S_STORE_DB_DISABLED -->{L_LOCATION_DISABLED_EXPLAIN}<!-- ELSE -->{L_LOCATION_EXPLAIN}<!-- ENDIF --></span></dt>
+ <dd><label><input type="radio" class="radio" name="store_db" value="0"<!-- IF not S_STORE_DB --> id="store_db" checked="checked"<!-- ENDIF --> <!-- IF S_STORE_DB_DISABLED -->disabled="disabled" <!-- ENDIF --> />{L_STORE_FILESYSTEM}</label>
+ <label><input type="radio" class="radio" name="store_db" value="1"<!-- IF S_STORE_DB --> id="store_db" checked="checked"<!-- ENDIF --> <!-- IF S_STORE_DB_DISABLED -->disabled="disabled" <!-- ENDIF -->/> {L_STORE_DATABASE}</label></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF S_STYLE -->
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_OPTIONS}</legend>
+ <dl>
+ <dt><label for="style_active">{L_STYLE_ACTIVE}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="style_active" value="1"<!-- IF S_STYLE_ACTIVE --> id="style_active" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="style_active" value="0"<!-- IF not S_STYLE_ACTIVE --> id="style_active" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <!-- IF not S_STYLE_DEFAULT -->
+ <dl>
+ <dt><label for="style_default">{L_STYLE_DEFAULT}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="style_default" value="1" /> {L_YES}</label>
+ <label><input type="radio" class="radio" id="style_default" name="style_default" value="0" checked="checked" /> {L_NO}</label></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <legend>{L_SUBMIT}</legend>
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_update.html b/phpBB/adm/style/acp_update.html
new file mode 100644
index 0000000000..34d4f6934e
--- /dev/null
+++ b/phpBB/adm/style/acp_update.html
@@ -0,0 +1,46 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_VERSION_CHECK -->
+
+ <h1>{L_VERSION_CHECK}</h1>
+
+ <p>{L_VERSION_CHECK_EXPLAIN}</p>
+
+ <!-- IF S_UP_TO_DATE and S_UP_TO_DATE_AUTO -->
+ <div class="successbox">
+ <p>{L_VERSION_UP_TO_DATE_ACP} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
+ </div>
+ <!-- ELSE -->
+ <div class="errorbox">
+ <p>{L_VERSION_NOT_UP_TO_DATE_ACP} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
+ </div>
+ <!-- ENDIF -->
+
+ <fieldset>
+ <legend></legend>
+ <dl>
+ <dt><label>{L_CURRENT_VERSION}</label></dt>
+ <dd><strong><!-- IF S_UP_TO_DATE and not S_UP_TO_DATE_AUTO -->{AUTO_VERSION}<!-- ELSE -->{CURRENT_VERSION}<!-- ENDIF --></strong></dd>
+ </dl>
+ <dl>
+ <dt><label>{L_LATEST_VERSION}</label></dt>
+ <dd><strong>{LATEST_VERSION}</strong></dd>
+ </dl>
+ </fieldset>
+
+ <!-- IF S_UP_TO_DATE and not S_UP_TO_DATE_AUTO -->
+ {L_UPDATE_INSTRUCTIONS_INCOMPLETE}
+ <br /><br />
+ {UPDATE_INSTRUCTIONS}
+ <br /><br />
+ <!-- ENDIF -->
+ <!-- IF not S_UP_TO_DATE -->
+ {UPDATE_INSTRUCTIONS}
+ <br /><br />
+ <!-- ENDIF -->
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html
new file mode 100644
index 0000000000..e266654649
--- /dev/null
+++ b/phpBB/adm/style/acp_users.html
@@ -0,0 +1,234 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_SELECT_USER -->
+
+ <h1>{L_USER_ADMIN}</h1>
+
+ <p>{L_USER_ADMIN_EXPLAIN}</p>
+
+ <form id="select_user" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_SELECT_USER}</legend>
+ <dl>
+ <dt><label for="username">{L_FIND_USERNAME}:</label></dt>
+ <dd><input class="text medium" type="text" id="username" name="username" /></dd>
+ <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
+ <dd class="full" style="text-align: left;"><label><input type="checkbox" class="radio" id="anonymous" name="u" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
+ </dl>
+
+ <p class="quick">
+ <input type="submit" name="submituser" value="{L_SUBMIT}" class="button1" />
+ </p>
+ </fieldset>
+
+ </form>
+
+<!-- ELSEIF S_SELECT_FORUM -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_USER_ADMIN}</h1>
+
+ <p>{L_USER_ADMIN_EXPLAIN}</p>
+
+ <form id="select_forum" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_USER_ADMIN_MOVE_POSTS}</legend>
+ <dl>
+ <dt><label for="new_forum">{L_USER_ADMIN_MOVE_POSTS}</label><br /><span>{L_MOVE_POSTS_EXPLAIN}</span></dt>
+ <dd><select id="new_forum" name="new_f">{S_FORUM_OPTIONS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ <input type="submit" name="update" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ELSE -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_USER_ADMIN} :: {MANAGED_USERNAME}</h1>
+
+ <p>{L_USER_ADMIN_EXPLAIN}</p>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="mode_select" method="post" action="{U_MODE_SELECT}">
+
+ <fieldset class="quick">
+ {L_SELECT_FORM}: <select name="mode" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_FORM_OPTIONS}</select> <input class="button2" type="submit" value="{L_GO}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ENDIF -->
+
+<!-- IF S_OVERVIEW -->
+
+<!-- INCLUDE acp_users_overview.html -->
+
+<!-- ELSEIF S_FEEDBACK -->
+
+<!-- INCLUDE acp_users_feedback.html -->
+
+<!-- ELSEIF S_WARNINGS -->
+
+<!-- INCLUDE acp_users_warnings.html -->
+
+<!-- ELSEIF S_PROFILE -->
+
+<!-- INCLUDE acp_users_profile.html -->
+
+<!-- ELSEIF S_PREFS -->
+
+<!-- INCLUDE acp_users_prefs.html -->
+
+<!-- ELSEIF S_AVATAR -->
+
+<!-- INCLUDE acp_users_avatar.html -->
+
+<!-- ELSEIF S_RANK -->
+
+ <form id="user_prefs" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_ACP_USER_RANK}</legend>
+ <dl>
+ <dt><label for="user_rank">{L_USER_RANK}:</label></dt>
+ <dd><select name="user_rank" id="user_rank">{S_RANK_OPTIONS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ELSEIF S_SIGNATURE -->
+
+<!-- INCLUDE acp_users_signature.html -->
+
+<!-- ELSEIF S_GROUPS -->
+
+ <form id="user_groups" method="post" action="{U_ACTION}">
+
+ <table cellspacing="1">
+ <tbody>
+ <!-- BEGIN group -->
+ <!-- IF group.S_NEW_GROUP_TYPE -->
+ <tr>
+ <td class="row3" colspan="4"><strong>{group.GROUP_TYPE}</strong></td>
+ </tr>
+ <!-- ELSE -->
+ <!-- IF group.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td><a href="{group.U_EDIT_GROUP}">{group.GROUP_NAME}</a></td>
+ <td><!-- IF group.S_IS_MEMBER --><!-- IF group.S_NO_DEFAULT --><a href="{group.U_DEFAULT}">{L_GROUP_DEFAULT}</a><!-- ELSE --><strong>{L_GROUP_DEFAULT}</strong><!-- ENDIF --><!-- ELSEIF not group.S_IS_MEMBER and group.U_APPROVE --><a href="{group.U_APPROVE}">{L_GROUP_APPROVE}</a><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
+ <td><!-- IF group.S_IS_MEMBER and not group.S_SPECIAL_GROUP --><a href="{group.U_DEMOTE_PROMOTE}">{group.L_DEMOTE_PROMOTE}</a><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
+ <td><a href="{group.U_DELETE}">{L_GROUP_DELETE}</a></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- END group -->
+ </tbody>
+ </table>
+
+ <!-- IF S_GROUP_OPTIONS -->
+ <fieldset class="quick">
+ {L_USER_GROUP_ADD}: <select name="g">{S_GROUP_OPTIONS}</select> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ <!-- ENDIF -->
+ </form>
+
+<!-- ELSEIF S_ATTACHMENTS -->
+
+ <form id="user_attachments" method="post" action="{U_ACTION}">
+
+
+ <!-- IF PAGINATION -->
+ <div class="pagination">
+ <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF .attach -->
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_FILENAME}</th>
+ <th>{L_POST_TIME}</th>
+ <th>{L_FILESIZE}</th>
+ <th>{L_DOWNLOADS}</th>
+ <th>{L_MARK}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN attach -->
+ <!-- IF attach.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td><a href="{attach.U_DOWNLOAD}">{attach.REAL_FILENAME}</a><br /><span class="small"><!-- IF attach.S_IN_MESSAGE --><strong>{L_PM}: </strong><!-- ELSE --><strong>{L_POST}: </strong><!-- ENDIF --><a href="{attach.U_VIEW_TOPIC}">{attach.TOPIC_TITLE}</a></span></td>
+ <td style="text-align: center">{attach.POST_TIME}</td>
+ <td style="text-align: center">{attach.SIZE}</td>
+ <td style="text-align: center">{attach.DOWNLOAD_COUNT}</td>
+ <td style="text-align: center"><input type="checkbox" class="radio" name="mark[]" value="{attach.ATTACH_ID}" /></td>
+ </tr>
+ <!-- END attach -->
+ </tbody>
+ </table>
+ <!-- ELSE -->
+ <div class="errorbox">
+ <p>{L_USER_NO_ATTACHMENTS}</p>
+ </div>
+ <!-- ENDIF -->
+ <fieldset class="display-options">
+ {L_SORT_BY}: <select name="sk">{S_SORT_KEY}</select> <select name="sd">{S_SORT_DIR}</select>
+ <input class="button2" type="submit" value="{L_GO}" name="sort" />
+ </fieldset>
+ <hr />
+ <!-- IF PAGINATION -->
+ <div class="pagination">
+ <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
+ </div>
+ <!-- ENDIF -->
+
+ <fieldset class="quick">
+ <input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />
+ <p class="small"><a href="#" onclick="marklist('user_attachments', 'mark', true);">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('user_attachments', 'mark', false);">{L_UNMARK_ALL}</a></p>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ELSEIF S_PERMISSIONS -->
+
+ <div style="float: {S_CONTENT_FLOW_END};">
+ <a href="{U_USER_PERMISSIONS}">&raquo; {L_SET_USERS_PERMISSIONS}</a><br />
+ <a href="{U_USER_FORUM_PERMISSIONS}">&raquo; {L_SET_USERS_FORUM_PERMISSIONS}</a>
+ </div>
+
+ <form id="select_forum" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick" style="text-align: left;">
+ {L_SELECT_FORUM}: <select name="f">{S_FORUM_OPTIONS}</select>
+ <input class="button2" type="submit" value="{L_GO}" name="select" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+ <div class="clearfix">&nbsp;</div>
+
+ <!-- INCLUDE permission_mask.html -->
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_users_avatar.html b/phpBB/adm/style/acp_users_avatar.html
new file mode 100644
index 0000000000..deed41e16e
--- /dev/null
+++ b/phpBB/adm/style/acp_users_avatar.html
@@ -0,0 +1,78 @@
+ <form id="avatar_settings" method="post" action="{U_ACTION}"<!-- IF S_CAN_UPLOAD --> enctype="multipart/form-data"<!-- ENDIF -->>
+
+ <fieldset>
+ <legend>{L_ACP_USER_AVATAR}</legend>
+ <dl>
+ <dt><label>{L_CURRENT_IMAGE}:</label><br /><span>{L_AVATAR_EXPLAIN}</span></dt>
+ <dd>{AVATAR_IMAGE}</dd>
+ <dd><label><input type="checkbox" class="radio" name="delete" /> {L_DELETE_AVATAR}</label></dd>
+ </dl>
+ <!-- IF not S_IN_AVATAR_GALLERY -->
+ <!-- IF S_UPLOAD_FILE -->
+ <dl>
+ <dt><label for="uploadfile">{L_UPLOAD_AVATAR_FILE}:</label></dt>
+ <dd><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_MAX_FILESIZE}" /><input type="file" id="uploadfile" name="uploadfile" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF S_REMOTE_UPLOAD -->
+ <dl>
+ <dt><label for="uploadurl">{L_UPLOAD_AVATAR_URL}:</label><br /><span>{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></dt>
+ <dd><input name="uploadurl" type="text" id="uploadurl" value="" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF S_ALLOW_REMOTE -->
+ <dl>
+ <dt><label for="remotelink">{L_LINK_REMOTE_AVATAR}:</label><br /><span>{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></dt>
+ <dd><input name="remotelink" type="text" id="remotelink" value="" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="width">{L_LINK_REMOTE_SIZE}:</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></dt>
+ <dd><input name="width" type="text" id="width" size="3" value="{USER_AVATAR_WIDTH}" /> <span>px X </span> <input type="text" name="height" size="3" value="{USER_AVATAR_HEIGHT}" /> <span>px</span></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF S_DISPLAY_GALLERY -->
+ <dl>
+ <dt><label>{L_AVATAR_GALLERY}:</label></dt>
+ <dd><input class="button2" type="submit" name="display_gallery" value="{L_DISPLAY_GALLERY}" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- ELSE -->
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_AVATAR_GALLERY}</legend>
+ <dl>
+ <dt><label for="category">{L_AVATAR_CATEGORY}:</label></dt>
+ <dd><select name="category" id="category">{S_CAT_OPTIONS}</select>&nbsp;<input class="button2" type="submit" value="{L_GO}" name="display_gallery" /></dd>
+ </dl>
+ <dl>
+ <table cellspacing="1">
+ <!-- BEGIN avatar_row -->
+ <tr>
+ <!-- BEGIN avatar_column -->
+ <td class="row1" style="text-align: center;"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" alt="{avatar_row.avatar_column.AVATAR_NAME}" title="{avatar_row.avatar_column.AVATAR_NAME}" /></td>
+ <!-- END avatar_column -->
+ </tr>
+ <tr>
+ <!-- BEGIN avatar_option_column -->
+ <td class="row2" style="text-align: center;"><input type="radio" class="radio" name="avatar_select" value="{avatar_row.avatar_option_column.S_OPTIONS_AVATAR}" /></td>
+ <!-- END avatar_option_column -->
+ </tr>
+ <!-- END avatar_row -->
+ </table>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick" style="margin-top: -15px;">
+ <input class="button2" type="submit" name="cancel" value="{L_CANCEL}" />
+ </fieldset>
+
+ <!-- ENDIF -->
+ </fieldset>
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+
+ </form> \ No newline at end of file
diff --git a/phpBB/adm/style/acp_users_feedback.html b/phpBB/adm/style/acp_users_feedback.html
new file mode 100644
index 0000000000..e11a8e6ec1
--- /dev/null
+++ b/phpBB/adm/style/acp_users_feedback.html
@@ -0,0 +1,76 @@
+ <form id="list" method="post" action="{U_ACTION}">
+
+ <!-- IF PAGINATION -->
+ <div class="pagination">
+ <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF .log -->
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_REPORT_BY}</th>
+ <th>{L_IP}</th>
+ <th>{L_TIME}</th>
+ <th>{L_FEEDBACK}</th>
+ <th>{L_MARK}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN log -->
+ <!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td>{log.USERNAME}</td>
+ <td style="text-align: center;">{log.IP}</td>
+ <td style="text-align: center;">{log.DATE}</td>
+ <td>
+ {log.ACTION}
+ <!-- IF log.DATA --><br />&#187; <span class="gensmall">[ {log.DATA} ]</span><!-- ENDIF -->
+ </td>
+ <td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{log.ID}" /></td>
+ </tr>
+ <!-- END log -->
+ </tbody>
+ </table>
+ <!-- ELSE -->
+ <div class="errorbox">
+ <p>{L_NO_ENTRIES}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <fieldset class="display-options">
+ {L_DISPLAY_LOG}: &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}
+ <input class="button2" type="submit" value="{L_GO}" name="sort" />
+ </fieldset>
+ <hr />
+ <!-- IF PAGINATION -->
+ <div class="pagination">
+ <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF S_CLEARLOGS -->
+ <fieldset class="quick">
+ <input class="button2" type="submit" name="delall" value="{L_DELETE_ALL}" />&nbsp;
+ <input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />
+ <p class="small"><a href="#" onclick="marklist('list', 'mark', true);">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('list', 'mark', false);">{L_UNMARK_ALL}</a></p>
+ </fieldset>
+ <!-- ENDIF -->
+
+ <h1>{L_ADD_FEEDBACK}</h1>
+
+ <p>{L_ADD_FEEDBACK_EXPLAIN}</p>
+
+ <fieldset>
+ <legend>{L_ACP_USER_FEEDBACK}</legend>
+ <dl>
+ <dd class="full"><textarea name="message" id="message" rows="10" cols="76"></textarea></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ </fieldset>
+ {S_FORM_TOKEN}
+ </form> \ No newline at end of file
diff --git a/phpBB/adm/style/acp_users_overview.html b/phpBB/adm/style/acp_users_overview.html
new file mode 100644
index 0000000000..e3eff369cc
--- /dev/null
+++ b/phpBB/adm/style/acp_users_overview.html
@@ -0,0 +1,144 @@
+<form id="user_overview" method="post" action="{U_ACTION}">
+
+<fieldset>
+ <legend>{L_ACP_USER_OVERVIEW}</legend>
+<dl>
+ <dt><label for="user">{L_USERNAME}:</label><br /><span>{L_NAME_CHARS_EXPLAIN}</span></dt>
+ <dd><input type="text" id="user" name="user" value="{USER}" /></dd>
+ <!-- IF U_SWITCH_PERMISSIONS --><dd>[ <a href="{U_SWITCH_PERMISSIONS}">{L_USE_PERMISSIONS}</a> ]</dd><!-- ENDIF -->
+</dl>
+<!-- IF S_USER_INACTIVE -->
+<dl>
+ <dt><label>{L_USER_IS_INACTIVE}:</label></dt>
+ <dd><strong>{USER_INACTIVE_REASON}</strong></dd>
+</dl>
+<!-- ENDIF -->
+<dl>
+ <dt><label>{L_REGISTERED}:</label></dt>
+ <dd><strong>{USER_REGISTERED}</strong></dd>
+</dl>
+<!-- IF S_USER_IP -->
+<dl>
+ <dt><label>{L_REGISTERED_IP}:</label></dt>
+ <dd><a href="{U_SHOW_IP}">{REGISTERED_IP}</a></dd>
+ <dd>[ <a href="{U_WHOIS}" onclick="popup(this.href, 700, 500, '_whois'); return false;">{L_WHOIS}</a> ]</dd>
+</dl>
+<!-- ENDIF -->
+<dl>
+ <dt><label>{L_LAST_ACTIVE}:</label></dt>
+ <dd><strong>{USER_LASTACTIVE}</strong></dd>
+</dl>
+<dl>
+ <dt><label>{L_POSTS}:</label></dt>
+ <dd><strong>{USER_POSTS}</strong><!-- IF POSTS_IN_QUEUE and U_MCP_QUEUE --> (<a href="{U_MCP_QUEUE}">{L_POSTS_IN_QUEUE}</a>)<!-- ELSEIF POSTS_IN_QUEUE --> ({L_POSTS_IN_QUEUE})<!-- ENDIF --></dd>
+</dl>
+<dl>
+ <dt><label>{L_WARNINGS}:</label></dt>
+ <dd><strong>{USER_WARNINGS}</strong></dd>
+</dl>
+<dl>
+ <dt><label for="user_founder">{L_FOUNDER}:</label><br /><span>{L_FOUNDER_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="user_founder" value="1"<!-- IF S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="user_founder" value="0"<!-- IF not S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> /> {L_NO}</label></dd>
+</dl>
+<dl>
+ <dt><label for="user_email">{L_EMAIL}:</label></dt>
+ <dd><input class="text medium" type="text" id="user_email" name="user_email" value="{USER_EMAIL}" /></dd>
+</dl>
+<dl>
+ <dt><label for="email_confirm">{L_CONFIRM_EMAIL}:</label><br /><span>{L_CONFIRM_EMAIL_EXPLAIN}</span></dt>
+ <dd><input class="text medium" type="text" id="email_confirm" name="email_confirm" value="" /></dd>
+</dl>
+<dl>
+ <dt><label for="new_password">{L_NEW_PASSWORD}:</label><br /><span>{L_CHANGE_PASSWORD_EXPLAIN}</span></dt>
+ <dd><input type="password" id="new_password" name="new_password" value="" /></dd>
+</dl>
+<dl>
+ <dt><label for="password_confirm">{L_CONFIRM_PASSWORD}:</label><br /><span>{L_CONFIRM_PASSWORD_EXPLAIN}</span></dt>
+ <dd><input type="password" id="password_confirm" name="password_confirm" value="" /></dd>
+</dl>
+
+<p class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ <input type="hidden" name="action" value="" />
+ {S_FORM_TOKEN}
+</p>
+
+</fieldset>
+</form>
+
+<!-- IF not S_USER_FOUNDER or S_FOUNDER -->
+
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function display_reason(option)
+ {
+ if (option != 'banuser' && option != 'banemail' && option != 'banip')
+ {
+ dE('reasons', -1);
+ return;
+ }
+
+ dE('reasons', 1);
+
+ element = document.getElementById('user_quick_tools').ban_reason;
+
+ if (element.value && element.value != '{LA_USER_ADMIN_BAN_NAME_REASON}' && element.value != '{LA_USER_ADMIN_BAN_EMAIL_REASON}' && element.value != '{LA_USER_ADMIN_BAN_IP_REASON}')
+ {
+ return;
+ }
+
+ if (option == 'banuser')
+ {
+ element.value = '{LA_USER_ADMIN_BAN_NAME_REASON}';
+ }
+ else if (option == 'banemail')
+ {
+ element.value = '{LA_USER_ADMIN_BAN_EMAIL_REASON}';
+ }
+ else if (option == 'banip')
+ {
+ element.value = '{LA_USER_ADMIN_BAN_IP_REASON}';
+ }
+ }
+
+ // ]]>
+ </script>
+
+ <form id="user_quick_tools" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_USER_TOOLS}</legend>
+ <dl>
+ <dt><label for="quicktools">{L_QUICK_TOOLS}:</label></dt>
+ <dd><select id="quicktools" name="action" onchange="display_reason(this.options[this.selectedIndex].value);">{S_ACTION_OPTIONS}</select></dd>
+ </dl>
+ <div style="display: none;" id="reasons">
+ <dl>
+ <dt><label for="ban_reason">{L_BAN_REASON}:</label></dt>
+ <dd><input name="ban_reason" type="text" class="text medium" maxlength="3000" id="ban_reason" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="ban_give_reason">{L_BAN_GIVE_REASON}:</label></dt>
+ <dd><input name="ban_give_reason" type="text" class="text medium" maxlength="3000" id="ban_give_reason" /></dd>
+ </dl>
+ </div>
+ <!-- IF not S_OWN_ACCOUNT -->
+ <dl>
+ <dt><label for="delete_user">{L_DELETE_USER}:</label><br /><span>{L_DELETE_USER_EXPLAIN}</span></dt>
+ <dd><input type="checkbox" class="radio" name="delete" value="1" /></dd>
+ <dd><select id="delete_user" name="delete_type"><option value="retain">{L_RETAIN_POSTS}</option><option value="remove">{L_DELETE_POSTS}</option></select></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <p class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ {S_FORM_TOKEN}
+ </p>
+
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_users_prefs.html b/phpBB/adm/style/acp_users_prefs.html
new file mode 100644
index 0000000000..07a9bc5c78
--- /dev/null
+++ b/phpBB/adm/style/acp_users_prefs.html
@@ -0,0 +1,158 @@
+<script type="text/javascript">
+// <![CDATA[
+ var default_dateformat = '{A_DEFAULT_DATEFORMAT}';
+// ]]>
+</script>
+
+ <form id="user_prefs" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_UCP_PREFS_PERSONAL}</legend>
+ <dl>
+ <dt><label for="viewemail">{L_SHOW_EMAIL}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="viewemail" value="1"<!-- IF VIEW_EMAIL --> id="viewemail" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="viewemail" value="0"<!-- IF not VIEW_EMAIL --> id="viewemail" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="massemail">{L_ADMIN_EMAIL}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="massemail" value="1"<!-- IF MASS_EMAIL --> id="massemail" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="massemail" value="0"<!-- IF not MASS_EMAIL --> id="massemail" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="allowpm">{L_ALLOW_PM}:</label><br /><span>{L_ALLOW_PM_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="allowpm" value="1"<!-- IF ALLOW_PM --> id="allowpm" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="allowpm" value="0"<!-- IF not ALLOW_PM --> id="allowpm" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="hideonline">{L_HIDE_ONLINE}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="hideonline" value="1"<!-- IF HIDE_ONLINE --> id="hideonline" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="hideonline" value="0"<!-- IF not HIDE_ONLINE --> id="hideonline" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="notifymethod">{L_NOTIFY_METHOD}:</label><br /><span>{L_NOTIFY_METHOD_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="notifymethod" value="0"<!-- IF NOTIFY_EMAIL --> id="notifymethod" checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_EMAIL}</label>
+ <label><input type="radio" class="radio" name="notifymethod" value="1"<!-- IF NOTIFY_IM --> id="notifymethod" checked="checked"<!-- ENDIF --><!-- IF S_JABBER_DISABLED --> disabled="disabled"<!-- ENDIF --> /> {L_NOTIFY_METHOD_IM}</label>
+ <label><input type="radio" class="radio" name="notifymethod" value="2"<!-- IF NOTIFY_BOTH --> id="notifymethod" checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_BOTH}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="notifypm">{L_NOTIFY_ON_PM}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="notifypm" value="1"<!-- IF NOTIFY_PM --> id="notifypm" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="notifypm" value="0"<!-- IF not NOTIFY_PM --> id="notifypm" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="popuppm">{L_POPUP_ON_PM}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="popuppm" value="1"<!-- IF POPUP_PM --> id="popuppm" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="popuppm" value="0"<!-- IF not POPUP_PM --> id="popuppm" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="lang">{L_BOARD_LANGUAGE}:</label></dt>
+ <dd><select id="lang" name="lang">{S_LANG_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="style">{L_BOARD_STYLE}:</label></dt>
+ <dd><select id="style" name="style">{S_STYLE_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="tz">{L_BOARD_TIMEZONE}:</label></dt>
+ <dd><select id="tz" name="tz" style="width: 100%;">{S_TZ_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="dst">{L_BOARD_DST}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="dst" value="1"<!-- IF DST --> id="dst" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="dst" value="0"<!-- IF not DST --> id="dst" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="dateoptions">{L_BOARD_DATE_FORMAT}:</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt>
+ <dd><select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">{S_DATEFORMAT_OPTIONS}</select></dd>
+ <dd><div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" /></div></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_UCP_PREFS_POST}</legend>
+ <dl>
+ <dt><label for="bbcode">{L_DEFAULT_BBCODE}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="bbcode" value="1"<!-- IF BBCODE --> id="bbcode" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="bbcode" value="0"<!-- IF not BBCODE --> id="bbcode" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="smilies">{L_DEFAULT_SMILIES}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="smilies" value="1"<!-- IF SMILIES --> id="smilies" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="smilies" value="0"<!-- IF not SMILIES --> id="smilies" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="sig">{L_DEFAULT_ADD_SIG}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="sig" value="1"<!-- IF ATTACH_SIG --> id="sig" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="sig" value="0"<!-- IF not ATTACH_SIG --> id="sig" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="notify">{L_DEFAULT_NOTIFY}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="notify" value="1"<!-- IF NOTIFY --> id="notify" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="notify" value="0"<!-- IF not NOTIFY --> id="notify" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_UCP_PREFS_VIEW}</legend>
+ <dl>
+ <dt><label for="view_images">{L_VIEW_IMAGES}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="view_images" value="1"<!-- IF VIEW_IMAGES --> id="view_images" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="view_images" value="0"<!-- IF not VIEW_IMAGES --> id="view_images" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="view_flash">{L_VIEW_FLASH}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="view_flash" value="1"<!-- IF VIEW_FLASH --> id="view_flash" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="view_flash" value="0"<!-- IF not VIEW_FLASH --> id="view_flash" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="view_smilies">{L_VIEW_SMILIES}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="view_smilies" value="1"<!-- IF VIEW_SMILIES --> id="view_smilies" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="view_smilies" value="0"<!-- IF not VIEW_SMILIES --> id="view_smilies" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="view_sigs">{L_VIEW_SIGS}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="view_sigs" value="1"<!-- IF VIEW_SIGS --> id="view_sigs" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="view_sigs" value="0"<!-- IF not VIEW_SIGS --> id="view_sigss" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="view_avatars">{L_VIEW_AVATARS}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="view_avatars" value="1"<!-- IF VIEW_AVATARS --> id="view_avatars" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="view_avatars" value="0"<!-- IF not VIEW_AVATARS --> id="view_avatars" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="view_wordcensor">{L_DISABLE_CENSORS}:</label></dt>
+ <dd><label><input type="radio" class="radio" name="view_wordcensor" value="1"<!-- IF VIEW_WORDCENSOR --> id="view_wordcensor" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="view_wordcensor" value="0"<!-- IF not VIEW_WORDCENSOR --> id="view_wordcensor" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+ <dl>
+ <dt><label>{L_VIEW_TOPICS_DAYS}:</label></dt>
+ <dd>{S_TOPIC_SORT_DAYS}</dd>
+ </dl>
+ <dl>
+ <dt><label>{L_VIEW_TOPICS_KEY}:</label></dt>
+ <dd>{S_TOPIC_SORT_KEY}</dd>
+ </dl>
+ <dl>
+ <dt><label>{L_VIEW_TOPICS_DIR}:</label></dt>
+ <dd>{S_TOPIC_SORT_DIR}</dd>
+ </dl>
+ <dl>
+ <dt><label>{L_VIEW_POSTS_DAYS}:</label></dt>
+ <dd>{S_POST_SORT_DAYS}</dd>
+ </dl>
+ <dl>
+ <dt><label>{L_VIEW_POSTS_KEY}:</label></dt>
+ <dd>{S_POST_SORT_KEY}</dd>
+ </dl>
+ <dl>
+ <dt><label>{L_VIEW_POSTS_DIR}:</label></dt>
+ <dd>{S_POST_SORT_DIR}</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+
+ </form> \ No newline at end of file
diff --git a/phpBB/adm/style/acp_users_profile.html b/phpBB/adm/style/acp_users_profile.html
new file mode 100644
index 0000000000..0d1c6f8e46
--- /dev/null
+++ b/phpBB/adm/style/acp_users_profile.html
@@ -0,0 +1,66 @@
+ <form id="user_profile" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_USER_PROFILE}</legend>
+ <dl>
+ <dt><label for="icq">{L_UCP_ICQ}:</label></dt>
+ <dd><input type="text" id="icq" name="icq" value="{ICQ}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="aim">{L_UCP_AIM}:</label></dt>
+ <dd><input type="text" id="aim" name="aim" value="{AIM}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="msn">{L_UCP_MSNM}:</label></dt>
+ <dd><input type="text" id="msn" name="msn" value="{MSN}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="yim">{L_UCP_YIM}:</label></dt>
+ <dd><input type="text" id="yim" name="yim" value="{YIM}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="jabber">{L_UCP_JABBER}:</label></dt>
+ <dd><input type="text" id="jabber" name="jabber" value="{JABBER}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="website">{L_WEBSITE}:</label></dt>
+ <dd><input type="text" id="website" name="website" value="{WEBSITE}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="location">{L_LOCATION}:</label></dt>
+ <dd><input type="text" id="location" name="location" value="{LOCATION}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="occupation">{L_OCCUPATION}:</label></dt>
+ <dd><textarea id="occupation" name="occupation" rows="3" cols="30">{OCCUPATION}</textarea></dd>
+ </dl>
+ <dl>
+ <dt><label for="interests">{L_INTERESTS}:</label></dt>
+ <dd><textarea id="interests" name="interests" rows="3" cols="30">{INTERESTS}</textarea></dd>
+ </dl>
+ <dl>
+ <dt><label for="birthday">{L_BIRTHDAY}:</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
+ <dd>{L_DAY}: <select id="birthday" name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> {L_MONTH}: <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> {L_YEAR}: <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <!-- IF .profile_fields -->
+ <fieldset>
+ <legend>{L_USER_CUSTOM_PROFILE_FIELDS}</legend>
+ <!-- BEGIN profile_fields -->
+ <dl>
+ <dt><label<!-- IF profile_fields.FIELD_ID --> for="{profile_fields.FIELD_ID}"<!-- ENDIF -->>{profile_fields.LANG_NAME}:</label><!-- IF profile_fields.LANG_EXPLAIN --><br /><span>{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dd>{profile_fields.FIELD}</dd>
+ <!-- IF profile_fields.ERROR -->
+ <dd><span class="small" style="color: red;">{profile_fields.ERROR}</span></dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- END profile_fields -->
+ </fieldset>
+ <!-- ENDIF -->
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form> \ No newline at end of file
diff --git a/phpBB/adm/style/acp_users_signature.html b/phpBB/adm/style/acp_users_signature.html
new file mode 100644
index 0000000000..0ea5328c3c
--- /dev/null
+++ b/phpBB/adm/style/acp_users_signature.html
@@ -0,0 +1,117 @@
+<script type="text/javascript">
+// <![CDATA[
+
+ var form_name = 'user_signature';
+ var text_name = 'signature';
+
+ // Define the bbCode tags
+ var bbcode = new Array();
+ var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
+ var imageTag = false;
+
+ // Helpline messages
+ var help_line = {
+ b: '{LA_BBCODE_B_HELP}',
+ i: '{LA_BBCODE_I_HELP}',
+ u: '{LA_BBCODE_U_HELP}',
+ q: '{LA_BBCODE_Q_HELP}',
+ c: '{LA_BBCODE_C_HELP}',
+ l: '{LA_BBCODE_L_HELP}',
+ o: '{LA_BBCODE_O_HELP}',
+ p: '{LA_BBCODE_P_HELP}',
+ w: '{LA_BBCODE_W_HELP}',
+ s: '{LA_BBCODE_S_HELP}',
+ f: '{LA_BBCODE_F_HELP}',
+ e: '{LA_BBCODE_E_HELP}',
+ d: '{LA_BBCODE_D_HELP}',
+ t: '{LA_BBCODE_T_HELP}',
+ tip: '{L_STYLES_TIP}'
+ <!-- BEGIN custom_tags -->
+ ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}'
+ <!-- END custom_tags -->
+ }
+
+// ]]>
+</script>
+<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
+
+<form id="user_signature" method="post" action="{U_ACTION}">
+
+ <!-- IF SIGNATURE_PREVIEW -->
+ <fieldset>
+ <legend>{L_ADMIN_SIG_PREVIEW}</legend>
+ <p>{SIGNATURE_PREVIEW}</p>
+ </fieldset>
+ <!-- ENDIF -->
+
+ <fieldset>
+ <legend>{L_SIGNATURE}</legend>
+ <p>{L_SIGNATURE_EXPLAIN}</p>
+
+ <div id="format-buttons">
+ <input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" />
+ <input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" />
+ <input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" />
+ <input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" />
+ <input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" />
+ <input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" />
+ <input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" />
+ <input type="button" class="button2" accesskey="t" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" />
+ <!-- IF S_BBCODE_IMG -->
+ <input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" />
+ <!-- ENDIF -->
+ <!-- IF S_LINKS_ALLOWED -->
+ <input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" />
+ <!-- ENDIF -->
+ <!-- IF S_BBCODE_FLASH -->
+ <input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" />
+ <!-- ENDIF -->
+
+ {L_FONT_SIZE}: <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_FONT_SIZE}" onmouseover="helpline('f')" onmouseout="helpline('tip')">
+ <option value="50">{L_FONT_TINY}</option>
+ <option value="85">{L_FONT_SMALL}</option>
+ <option value="100" selected="selected">{L_FONT_NORMAL}</option>
+ <option value="150">{L_FONT_LARGE}</option>
+ <option value="200">{L_FONT_HUGE}</option>
+ </select>
+ <!-- IF .custom_tags -->
+ <br /><br />
+ <!-- BEGIN custom_tags -->
+ <input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' --> onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')"<!-- ENDIF --> />
+ <!-- END custom_tags -->
+ <!-- ENDIF -->
+
+ </div>
+
+ <p><input type="text" class="text full" style="border: 0; background: none;" name="helpbox" value="{L_STYLES_TIP}" /></p>
+
+ <dl>
+ <dt style="width: 90px;">
+ <script type="text/javascript">
+ // <![CDATA[
+ colorPalette('v', 12, 10);
+ // ]]>
+ </script>
+ </dt>
+ <dd style="margin-left: 90px;"><textarea name="signature" rows="10" cols="60" style="width: 95%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();">{SIGNATURE}</textarea></dd>
+ <dd style="margin-left: 90px; margin-top: 5px;">
+ <!-- IF S_BBCODE_ALLOWED -->
+ <label><input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE}</label>
+ <!-- ENDIF -->
+ <!-- IF S_SMILIES_ALLOWED -->
+ <label><input type="checkbox" class="radio" name="disable_smilies"{S_SMILIES_CHECKED} /> {L_DISABLE_SMILIES}</label>
+ <!-- ENDIF -->
+ <!-- IF S_LINKS_ALLOWED -->
+ <label><input type="checkbox" class="radio" name="disable_magic_url"{S_MAGIC_URL_CHECKED} /> {L_DISABLE_MAGIC_URL}</label>
+ <!-- ENDIF -->
+ </dd>
+ <dd style="margin-left: 90px; margin-top: 10px;"><strong>{L_OPTIONS}: </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="submit" name="preview" value="{L_PREVIEW}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+</form> \ No newline at end of file
diff --git a/phpBB/adm/style/acp_users_warnings.html b/phpBB/adm/style/acp_users_warnings.html
new file mode 100644
index 0000000000..d27f3800fc
--- /dev/null
+++ b/phpBB/adm/style/acp_users_warnings.html
@@ -0,0 +1,36 @@
+ <form id="list" method="post" action="{U_ACTION}">
+
+ <!-- IF .warn -->
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_REPORT_BY}</th>
+ <th>{L_TIME}</th>
+ <th>{L_FEEDBACK}</th>
+ <th>{L_MARK}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN warn -->
+ <!-- IF warn.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td>{warn.USERNAME}</td>
+ <td style="text-align: center; nowrap: nowrap;">{warn.DATE}</td>
+ <td>{warn.ACTION}</td>
+ <td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{warn.ID}" /></td>
+ </tr>
+ <!-- END warn -->
+ </tbody>
+ </table>
+ <!-- ELSE -->
+ <div class="errorbox">
+ <p>{L_NO_WARNINGS}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <fieldset class="quick">
+ <input class="button2" type="submit" name="delall" value="{L_DELETE_ALL}" />&nbsp;
+ <input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />
+ <p class="small"><a href="#" onclick="marklist('list', 'mark', true);">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('list', 'mark', false);">{L_UNMARK_ALL}</a></p>
+ </fieldset>
+ {S_FORM_TOKEN}
+ </form>
diff --git a/phpBB/adm/style/acp_words.html b/phpBB/adm/style/acp_words.html
new file mode 100644
index 0000000000..3fa4cfc91c
--- /dev/null
+++ b/phpBB/adm/style/acp_words.html
@@ -0,0 +1,77 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<!-- IF S_EDIT_WORD -->
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_ACP_WORDS}</h1>
+
+ <p>{L_ACP_WORDS_EXPLAIN}</p>
+
+ <form id="acp_words" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_EDIT_WORD}</legend>
+ <dl>
+ <dt><label for="word">{L_WORD}</label></dt>
+ <dd><input id="word" type="text" name="word" value="{WORD}" maxlength="255" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="replacement">{L_REPLACEMENT}</label></dt>
+ <dd><input id="replacement" type="text" name="replacement" value="{REPLACEMENT}" maxlength="255" /></dd>
+ </dl>
+ {S_HIDDEN_FIELDS}
+
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="save" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ {S_FORM_TOKEN}
+ </p>
+ </fieldset>
+ </form>
+
+<!-- ELSE -->
+
+ <h1>{L_ACP_WORDS}</h1>
+
+ <p>{L_ACP_WORDS_EXPLAIN}</p>
+
+ <form id="acp_words" method="post" action="{U_ACTION}">
+
+ <fieldset class="tabulated">
+ <legend>{L_ACP_WORDS}</legend>
+ <p class="quick">
+ {S_HIDDEN_FIELDS}
+ <input class="button2" name="add" type="submit" value="{L_ADD_WORD}" />
+ </p>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>{L_WORD}</th>
+ <th>{L_REPLACEMENT}</th>
+ <th>{L_ACTION}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN words -->
+ <!-- IF words.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="text-align: center;">{words.WORD}</td>
+ <td style="text-align: center;">{words.REPLACEMENT}</td>
+ <td>&nbsp;<a href="{words.U_EDIT}">{ICON_EDIT}</a>&nbsp;&nbsp;<a href="{words.U_DELETE}">{ICON_DELETE}</a>&nbsp;</td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr class="row3">
+ <td colspan="3">{L_ACP_NO_ITEMS}</td>
+ </tr>
+ <!-- END words -->
+ </tbody>
+ </table>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
new file mode 100644
index 0000000000..5f1f01c0a9
--- /dev/null
+++ b/phpBB/adm/style/admin.css
@@ -0,0 +1,1655 @@
+/* phpBB 3.0 Admin Style Sheet
+ ------------------------------------------------------------------------
+ Original author: subBlue ( http://www.subblue.com/ )
+ Copyright 2007 phpBB Group ( http://www.phpbb.com/ )
+ ------------------------------------------------------------------------
+*/
+
+/* General markup styles
+---------------------------------------- */
+* {
+ /* Reset browsers default margin, padding and font sizes */
+ margin: 0;
+ padding: 0;
+ font-size: 100%;
+}
+
+body, div, p, th, td, li, dd {
+ font-size: x-small;
+ voice-family: "\"}\"";
+ voice-family: inherit;
+ font-size: small
+}
+
+html>body, html>div, html>p, html>th, html>td, html>li, html>dd {
+ font-size: small
+}
+
+html {
+ color: #536482;
+ background: #DBD7D1;
+ /* Always show a scrollbar for short pages - stops the jump when the scrollbar appears. non-ie browsers */
+ height: 100%;
+ margin-bottom: 1px;
+}
+
+body {
+ /* Text-Sizing with ems: http://www.clagnut.com/blog/348/ */
+ font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
+ color: #536482;
+ background: #DBD7D1;
+ font-size: 62.5%; /* This sets the default font size to be equivalent to 10px */
+ margin: 10px 15px;
+}
+
+img {
+ border: 0;
+}
+
+h1 {
+ font-family: "Trebuchet MS", Helvetica, sans-serif;
+ font-size: 1.70em;
+ font-weight: normal;
+ color: #333333;
+}
+
+h2, caption {
+ font-family: "Trebuchet MS", Helvetica, sans-serif;
+ font-size: 1.40em;
+ font-weight: normal;
+ color: #115098;
+ text-align: left;
+ margin-top: 25px;
+}
+
+.rtl h2, .rtl caption {
+ text-align: right;
+}
+
+h3, h4 {
+ font-family: "Trebuchet MS", Helvetica, sans-serif;
+ font-size: 1.20em;
+ text-decoration: none;
+ line-height: 1.20em;
+ margin-top: 25px;
+}
+
+p {
+ margin-bottom: 0.7em;
+ line-height: 1.40em;
+ font-size: 0.90em;
+}
+
+ul {
+ list-style: disc;
+ margin: 0 0 1em 2em;
+}
+
+.rtl ul {
+ margin: 0 2em 1em 0;
+}
+
+hr {
+ border: 0 none;
+ border-top: 1px dashed #999999;
+ margin-bottom: 5px;
+ padding-bottom: 5px;
+ height: 1px;
+}
+
+.small {
+ font-size: 0.85em;
+}
+
+/* General links */
+a:link, a:visited {
+ color: #105289;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #BC2A4D;
+ text-decoration: underline;
+}
+
+a:active {
+ color: #368AD2;
+ text-decoration: none;
+}
+
+.install-body p a {
+ font-weight: bold;
+}
+
+/* List items */
+ul, ol {
+ list-style-position: inside;
+ margin-left: 1em;
+}
+
+li {
+ display: list-item;
+ list-style-type: inherit;
+}
+
+/* Main blocks
+---------------------------------------- */
+#wrap {
+ padding: 0 0 15px 0;
+ min-width: 615px;
+}
+
+#page-header {
+ clear: both;
+ text-align: right;
+ background: url("../images/phpbb_logo.gif") top left no-repeat;
+ height: 49px;
+ font-size: 0.85em;
+ margin-bottom: 10px;
+}
+
+.rtl #page-header {
+ text-align: left;
+ background: url("../images/phpbb_logo.gif") top right no-repeat;
+}
+
+#page-header h1 {
+ color: #767676;
+ font-family: "Trebuchet MS",Helvetica,sans-serif;
+ font-size: 1.70em;
+ padding-top: 10px;
+}
+
+#page-header p {
+ font-size: 1.00em;
+}
+
+#page-header p#skip {
+ display: none;
+}
+
+#page-body {
+ clear: both;
+ min-width: 700px;
+}
+
+#page-footer {
+ clear: both;
+ font-size: 0.75em;
+ text-align: center;
+}
+
+#content {
+ padding: 30px 10px 10px;
+ position: relative;
+}
+
+#content h1 {
+ color: #115098;
+ line-height: 1.2em;
+ margin-bottom: 0;
+}
+
+#main {
+ float: left;
+ width: 76%;
+ margin: 0 0 0 3%;
+ min-height: 350px;
+}
+
+.rtl #main {
+ float: right;
+ margin: 0 3% 0 0;
+}
+
+* html #main {
+ height: 350px;
+}
+
+#page-body.simple-page-body {
+ padding: 0;
+ padding-right: 10px;
+ min-width: 0;
+}
+
+/* Tabbed menu
+ Based on: http://www.alistapart.com/articles/slidingdoors2/
+----------------------------------------*/
+#tabs {
+ line-height: normal;
+ margin: 0 0 -6px 7px;
+ min-width: 600px;
+}
+
+.rtl #tabs {
+ margin: 0 7px -6px 0;
+}
+
+#tabs ul {
+ margin:0;
+ padding: 0;
+ list-style: none;
+}
+
+#tabs li {
+ display: inline;
+ margin: 0;
+ padding: 0;
+ font-size: 0.85em;
+ font-weight: bold;
+}
+
+#tabs a {
+ float: left;
+ background:url("../images/bg_tabs1.gif") no-repeat 0% -34px;
+ margin: 0 1px 0 0;
+ padding: 0 0 0 7px;
+ text-decoration: none;
+ position: relative;
+}
+
+.rtl #tabs a {
+ float: right;
+}
+
+#tabs a span {
+ float: left;
+ display: block;
+ background: url("../images/bg_tabs2.gif") no-repeat 100% -34px;
+ padding: 7px 10px 4px 4px;
+ color: #767676;
+ white-space: nowrap;
+ font-family: Arial, Helvetica, sans-serif;
+ text-transform: uppercase;
+ font-weight: bold;
+}
+
+.rtl #tabs a span {
+ float: right;
+}
+
+/* Commented Backslash Hack hides rule from IE5-Mac \*/
+#tabs a span, .rtl #tabs a span { float:none;}
+/* End hack */
+
+#tabs a:hover span {
+ color: #BC2A4D;
+}
+
+#tabs #activetab a {
+ background-position: 0 0;
+ border-bottom: 1px solid #DCDEE2;
+}
+
+#tabs #activetab a span {
+ background-position: 100% 0;
+ padding-bottom: 5px;
+ color: #23649F;
+}
+
+#tabs a:hover {
+ background-position: 0 -69px;
+}
+
+#tabs a:hover span {
+ background-position: 100% -69px;
+}
+
+#tabs #activetab a:hover span {
+ color: #115098;
+}
+
+
+/* Main Panel
+---------------------------------------- */
+#acp {
+ margin: 4px 0;
+ padding: 3px 1px;
+ min-width: 550px;
+ background-color: #FFFFFF;
+ border: 1px #999999 solid;
+}
+
+.panel {
+ background: #F3F3F3 url("../images/innerbox_bg.gif") repeat-x top;
+ padding: 0;
+}
+
+span.corners-top, span.corners-bottom,
+span.corners-top span, span.corners-bottom span {
+ font-size: 1px;
+ line-height: 1px;
+ display: block;
+ height: 5px;
+ background-repeat: no-repeat;
+}
+
+span.corners-top {
+ background-image: url("../images/corners_left.gif");
+ background-position: 0 0;
+ margin: -4px -2px 0;
+}
+
+span.corners-top span {
+ background-image: url("../images/corners_right.gif");
+ background-position: 100% 0;
+}
+
+span.corners-bottom {
+ background-image: url("../images/corners_left.gif");
+ background-position: 0 100%;
+ margin: 0 -2px -4px;
+ clear: both;
+}
+
+span.corners-bottom span {
+ background-image: url("../images/corners_right.gif");
+ background-position: 100% 100%;
+}
+
+/* WinIE tweaks \*/
+* html span.corners-top, * html span.corners-bottom { background-image: url("../images/corners_left.gif"); }
+* html span.corners-top span, * html span.corners-bottom span { background-image: url("../images/corners_right.gif"); }
+/* End tweaks */
+
+/* Sub-navigation Menu
+---------------------------------------- */
+
+/* Toggle */
+#toggle {
+ padding: 5px;
+ width: 5%;
+ height: 100px;
+ position: absolute;
+ left: 15%;
+ top: 28px;
+ margin-left: 2px;
+}
+
+.rtl #toggle {
+ left: 75%;
+ margin-right: 0;
+ margin-left: 6px;
+}
+
+#toggle-handle {
+ display: block;
+ width: 18px;
+ height: 19px;
+ float: right;
+ background-image: url(../images/toggle.gif);
+}
+
+.rtl #toggle-handle {
+ background-image: url(../images/toggle.gif);
+ background-position: 100% 50%;
+}
+
+/* Menu */
+#menu {
+ float: left;
+ width: 20%;
+ font-size: 1.00em;
+ padding: 0;
+ border-right: 1px solid #CCCFD3;
+}
+
+.rtl #menu {
+ float: right;
+ border: none;
+ border-left: 1px solid #CCCFD3;
+}
+
+#menu p {
+ font-size: 0.85em;
+}
+
+#menu ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+
+/* Default list state */
+#menu li {
+ padding: 0;
+ margin: 0;
+ font-size: 0.85em;
+ font-weight: bold;
+ display: inline;
+}
+
+/* Link styles for the sub-section links */
+#menu li span {
+ display: block;
+ padding: 3px 3px 3px 8px;
+ margin: 1px 0;
+ text-decoration: none;
+ font-weight: normal;
+ color: #138ECB;
+}
+
+.rtl #menu li span {
+ padding: 3px 8px 3px 3px;
+}
+
+#menu li a:hover, #menu li a:hover span {
+ text-decoration: none;
+ background-color: #FFFFFF;
+ color: #BC2A4D;
+}
+
+#menu li a:active, #menu li a:active span {
+ color: #F632A0;
+}
+
+#menu li#activemenu a span {
+ text-decoration: none;
+ font-weight: bold;
+ color: #1180B7;
+ background: transparent url("../images/arrow_right.gif") 0% 50% no-repeat;
+}
+
+.rtl #menu li#activemenu a span {
+ background: transparent url("../images/arrow_left.gif") 100% 50% no-repeat;
+}
+
+#menu li#activemenu a:hover span, #menu li#activemenu span {
+ text-decoration: none;
+ font-weight: bold;
+ color: #BC2A4D;
+ background: #FFFFFF url("../images/arrow_right.gif") 1% 50% no-repeat;
+}
+
+.rtl #menu li#activemenu a:hover span, .rtl #menu li#activemenu span {
+ background: #FFFFFF url("../images/arrow_left.gif") 99% 50% no-repeat;
+}
+
+#menu li a:active, #menu li a:active span, #menu li#activemenu a:active span {
+ color: #F632A0;
+}
+
+#menu li span.completed {
+ text-decoration: none;
+ padding: 3px 3px 3px 12px;
+ background: url("../images/arrow_down.gif") 1% 50% no-repeat;
+}
+
+.rtl #menu li span.completed {
+ text-decoration: none;
+ padding: 3px 12px 3px 3px;
+ background: url("../images/arrow_down.gif") 99% 50% no-repeat;
+}
+
+#menu li.header {
+ font-family: Tahoma, Helvetica, sans-serif;
+ display: block;
+ font-weight: bold;
+ color: #115098;
+ border-bottom: 1px solid #327AA5;
+ padding: 4px 0 2px;
+ margin-top: 15px;
+ text-transform: uppercase;
+ font-size: 0.75em;
+}
+
+/* Table styles
+---------------------------------------- */
+
+table {
+ width: 100%;
+ border: 1px solid #CCCFD3;
+ background-color: #FFFFFF;
+ padding: 1px;
+}
+
+th {
+ padding: 3px 4px;
+ color: #FFFFFF;
+ background: #70AED3 url("../images/gradient2b.gif") bottom left repeat-x;
+ border-top: 1px solid #6DACD2;
+ border-bottom: 1px solid #327AA5;
+ text-align: left;
+ font-size: 0.75em;
+ text-transform: uppercase;
+}
+
+td {
+ text-align: left;
+ font-size: 0.85em;
+ padding: 4px;
+ line-height: 1.20em;
+}
+
+.rtl th, .rtl td {
+ text-align: right;
+}
+
+table.type2 {
+ border: none;
+ background: none;
+ padding: 0;
+}
+
+table.type2 th {
+ background: none;
+ border-top: none;
+ text-align: center;
+ color: #115098;
+ padding: 2px 0;
+}
+
+table.type2 td {
+ padding: 0;
+ font-size: 1em;
+}
+
+table.type2 td.name {
+ padding: 2px;
+ vertical-align: middle;
+}
+
+table.type3 {
+ float: right;
+ width: 300px;
+ border: none;
+ background-color: transparent;
+ padding: 0;
+}
+
+.rtl table.type3 {
+ float: left;
+}
+
+table.type3 thead th {
+ background-color: transparent;
+ border-top: none;
+ text-align: center;
+ color: #115098;
+ padding: 0 3px;
+ font-size: 0.85em;
+ font-weight: normal;
+ text-transform: none;
+}
+
+table.type3 tbody th {
+ border-top: none;
+ text-align: left;
+ text-transform: none;
+ padding: 0;
+ border: none;
+ font-size: 0.90em;
+ font-weight: normal;
+ width: 100%;
+}
+
+.rtl table.type3 tbody th {
+ text-align: right;
+}
+
+table.type3 td {
+ text-align: center;
+ padding: 1px;
+}
+
+th.name {
+ text-align: left;
+ width: auto;
+}
+
+.rtl th.name {
+ text-align: right;
+}
+
+td.name {
+ text-align: left;
+ font-weight: bold;
+}
+
+.rtl td.name {
+ text-align: right;
+}
+
+.entry {
+ text-align: left;
+ font-weight: normal;
+}
+
+.rtl .entry {
+ text-align: right;
+}
+
+.row1 { background-color: #F9F9F9; }
+.row2 { background-color: #DCEBFE; }
+.row3 { background-color: #DBDFE2; }
+.row4 { background-color: #E4E8EB; }
+.col1 { background-color: #DCEBFE; }
+.col2 { background-color: #F9F9F9; }
+
+.spacer {
+ background-color: #DBDFE2;
+ height: 1px;
+ line-height: 1px;
+}
+
+/* General form styles
+----------------------------------------*/
+fieldset {
+ margin: 15px 0;
+ padding: 10px;
+ border-top: 1px solid #D7D7D7;
+ border-right: 1px solid #CCCCCC;
+ border-bottom: 1px solid #CCCCCC;
+ border-left: 1px solid #D7D7D7;
+ background-color: #FFFFFF;
+ position: relative;
+}
+
+.rtl fieldset {
+ border-top: 1px solid #D7D7D7;
+ border-right: 1px solid #D7D7D7;
+ border-bottom: 1px solid #CCCCCC;
+ border-left: 1px solid #CCCCCC;
+}
+
+* html fieldset {
+ padding: 0 10px 5px 10px;
+}
+
+fieldset p {
+ font-size: 0.85em;
+}
+
+legend {
+ padding: 1px 0;
+ font-family: Tahoma,arial,Verdana,Sans-serif;
+ font-size: .9em;
+ font-weight: bold;
+ color: #115098;
+ margin-top: -.4em;
+ position: relative;
+ text-transform: none;
+ line-height: 1.2em;
+ top: 0;
+ vertical-align: middle;
+}
+
+/* Hide from macIE \*/
+legend { top: -1.2em; }
+/* end */
+
+* html legend {
+ margin: 0 0 -10px -7px;
+ line-height: 1em;
+ font-size: .85em;
+}
+
+/* Holly hack, .rtl comes after html */
+* html .rtl legend {
+ margin: 0;
+ margin-right: -7px;
+}
+
+input, textarea {
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ font-size: 0.90em;
+ font-weight: normal;
+ cursor: text;
+ vertical-align: middle;
+ padding: 2px;
+ color: #111111;
+ border-left: 1px solid #AFAEAA;
+ border-top: 1px solid #AFAEAA;
+ border-right: 1px solid #D5D5C8;
+ border-bottom: 1px solid #D5D5C8;
+ background-color: #E3DFD8;
+}
+
+.rtl input, .rtl textarea {
+ border-left: 1px solid #D5D5C8;
+ border-top: 1px solid #AFAEAA;
+ border-right: 1px solid #AFAEAA;
+ border-bottom: 1px solid #D5D5C8;
+}
+
+input:hover, textarea:hover {
+ border-left: 1px solid #AFAEAA;
+ border-top: 1px solid #AFAEAA;
+ border-right: 1px solid #AFAEAA;
+ border-bottom: 1px solid #AFAEAA;
+ background-color: #E9E9E2;
+}
+
+input.langvalue, textarea.langvalue {
+ width: 90%;
+}
+
+optgroup, select {
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ font-size: 0.85em;
+ font-weight: normal;
+ font-style: normal;
+ cursor: pointer;
+ vertical-align: middle;
+ width: auto;
+ color: #000;
+}
+
+optgroup {
+ font-size: 1.00em;
+ font-weight: bold;
+}
+
+optgroup.disabled-options {
+ display: none;
+ background-color: gray;
+}
+
+option {
+ padding: 0 1em 0 0;
+ color: #000;
+}
+
+option.disabled-option {
+ color: graytext;
+}
+
+.rtl option {
+ padding: 0 0 0 1em;
+}
+
+.sep {
+ font-weight: bold;
+}
+
+.username-coloured {
+ font-weight: bold;
+}
+
+textarea {
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ font-size: 0.85em;
+ width: 60%;
+ padding: 2px;
+}
+
+label {
+ cursor: pointer;
+ font-size: 0.85em;
+ padding: 0 5px 0 0;
+}
+
+.rtl label {
+ padding: 0 0 0 5px;
+}
+
+label input {
+ font-size: 1.00em;
+ vertical-align: middle;
+}
+
+label img {
+ vertical-align: middle;
+}
+
+fieldset.quick, p.quick {
+ margin: 0 0 5px;
+ padding: 5px 0 0;
+ border: none;
+ background-color: transparent;
+ text-align: right;
+}
+
+.rtl fieldset.quick, .rtl p.quick {
+ text-align: left;
+}
+
+fieldset.quick legend {
+ display: none;
+}
+
+fieldset.tabulated {
+ background: none;
+ margin: 0;
+ padding: 0;
+ padding-top: 5px;
+ border: 0;
+}
+
+fieldset.tabulated legend {
+ display: none;
+}
+
+fieldset.nobg {
+ margin: 15px 0 0 0;
+ padding: 0;
+ border: none;
+ background-color: transparent;
+}
+
+fieldset.display-options {
+ margin: 15px 0 2px 0;
+ padding: 0 0 4px 0;
+ border: none;
+ background-color: transparent;
+ text-align: center;
+ font-size: 0.75em;
+}
+
+fieldset.display-options select, fieldset.display-options input, fieldset.display-options label {
+ font-size: 1.00em;
+ vertical-align: middle;
+}
+
+select option.disabled {
+ background-color: #bbb;
+ color: #fff;
+}
+
+/* Special case inputs */
+select#board_timezone,
+select#full_folder_action {
+ width: 95%;
+}
+
+/* Definition list layout for forms
+ Other general def. list properties defined in prosilver_main.css
+---------------------------------------- */
+dl {
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ font-size: 1.00em;
+}
+
+dt {
+ float: left;
+ width: auto;
+}
+
+.rtl dt {
+ float: right;
+}
+
+dd { color: #666666;}
+dd + dd { padding-top: 5px;}
+dt span { padding: 0 5px 0 0;}
+.rtl dt span { padding: 0 0 0 5px;}
+
+dt .explain { font-style: italic;}
+
+dt label {
+ font-size: 1.00em;
+ text-align: left;
+ font-weight: bold;
+ color: #4A5A73;
+}
+
+.rtl dt label {
+ text-align: right;
+}
+
+dd label {
+ font-size: 1.00em;
+ white-space: nowrap;
+ margin: 0 10px 0 0;
+ color: #4A5A73;
+}
+
+.rtl dd label {
+ margin: 0 0 0 10px;
+}
+
+html>body dd label input { vertical-align: text-bottom;} /* Tweak for Moz to align checkboxes/radio buttons nicely */
+
+dd input {
+ font-size: 1.00em;
+ max-width: 100%;
+}
+
+dd select {
+ font-size: 100%;
+ width: auto;
+ max-width: 100%;
+}
+
+dd textarea {
+ font-size: 0.90em;
+ width: 90%;
+}
+
+dd select {
+ width: auto;
+ font-size: 1.00em;
+}
+
+fieldset dl {
+ margin-bottom: 10px;
+ font-size: 0.85em;
+}
+
+fieldset dt {
+ width: 45%;
+ text-align: left;
+ border: none;
+ border-right: 1px solid #CCCCCC;
+ padding-top: 3px;
+}
+
+.rtl fieldset dt {
+ text-align: right;
+ border: none;
+ border-left: 1px solid #CCCCCC;
+}
+
+fieldset dd {
+ margin: 0 0 0 45%;
+ padding: 0 0 0 5px;
+ border: none;
+ border-left: 1px solid #CCCCCC;
+ vertical-align: top;
+ font-size: 1.00em;
+}
+
+.rtl fieldset dd {
+ margin: 0 45% 0 0;
+ padding: 0 5px 0 0;
+ border: none;
+ border-right: 1px solid #CCCCCC;
+}
+
+dd.full, .rtl dd.full {
+ margin: 0;
+ border: 0;
+ padding: 0;
+ padding-top: 3px;
+ text-align: center;
+ width: 95%;
+}
+
+/* Hover highlights for form rows */
+fieldset dl:hover dt, fieldset dl:hover dd {
+ border-color: #666666;
+}
+
+fieldset dl:hover dt label {
+ color: #000000;
+}
+
+fieldset dl dd label:hover {
+ color: #BC2A4D;
+}
+
+input:focus, textarea:focus {
+ border: 1px solid #BC2A4D;
+ background-color: #E9E9E2;
+ color: #BC2A4D;
+}
+
+/* Submit button fieldset or paragraph
+---------------------------------------- */
+fieldset.submit-buttons {
+ text-align: center;
+ border: none;
+ background-color: transparent;
+ margin: 0;
+ padding: 4px;
+ margin-top: -1px;
+}
+
+p.submit-buttons {
+ text-align: center;
+ margin: 0;
+ padding: 4px;
+ margin-top: 10px;
+}
+
+fieldset.submit-buttons input, p.submit-buttons input {
+ padding: 3px 2px;
+}
+
+fieldset.submit-buttons legend {
+ display: none;
+}
+
+/* Input field styles
+---------------------------------------- */
+
+input.radio, input.permissions-checkbox {
+ width: auto !important;
+ background-color: transparent;
+ border: none;
+ cursor: default;
+}
+
+input.full,
+textarea.full {
+ width: 99%;
+}
+
+* html input.full, * html textarea.full { width: 95%;}
+input.medium { width: 50%;}
+input.narrow { width: 25%;}
+input.tiny { width: 10%;}
+input.autowidth { width: auto !important;}
+.box2 .inputbox { background-color: #E9E9E9;}
+
+/* Form button styles
+---------------------------------------- */
+a.button1, input.button1, input.button3,
+a.button2, input.button2 {
+ width: auto !important;
+ padding: 1px 3px 0 3px;
+ font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
+ color: #000;
+ font-size: 0.85em;
+ background: #EFEFEF url("../images/bg_button.gif") repeat-x top;
+ cursor: pointer;
+}
+
+a.button1, input.button1 {
+ font-weight: bold;
+ border: 1px solid #666666;
+}
+
+/* Alternative button */
+a.button2, input.button2 {
+ border: 1px solid #666666;
+}
+
+/* <a> button in the style of the form buttons */
+a.button1, a.button1:link, a.button1:visited, a.button1:active,
+a.button2, a.button2:link, a.button2:visited, a.button2:active {
+ text-decoration: none;
+ color: #000000;
+ padding: 4px 8px;
+}
+
+/* Hover states */
+a.button1:hover, input.button1:hover,
+a.button2:hover, input.button2:hover {
+ border: 1px solid #BC2A4D;
+ background: #EFEFEF url("../images/bg_button.gif") repeat bottom;
+ color: #BC2A4D;
+}
+
+input.disabled {
+ font-weight: normal;
+ color: #666666;
+}
+
+/* Pagination
+---------------------------------------- */
+.pagination {
+ height: 1%; /* IE tweak (holly hack) */
+ width: auto;
+ text-align: right;
+ margin-top: 5px;
+ font-size: 0.85em;
+ padding-bottom: 2px;
+}
+
+.rtl .pagination {
+ text-align: left;
+}
+
+.pagination strong,
+.pagination b {
+ font-weight: normal;
+}
+
+.pagination span.page-sep {
+ display:none;
+}
+
+.pagination span strong {
+ padding: 0 2px;
+ margin: 0 2px;
+ font-weight: normal;
+ font-size: 0.85em;
+ color: #FFFFFF;
+ background: #4692BF;
+ border: 1px solid #4692BF;
+}
+
+.pagination span a, .pagination span a:link, .pagination span a:visited, .pagination span a:active {
+ font-weight: normal;
+ font-size: 0.85em;
+ text-decoration: none;
+ color: #5C758C;
+ margin: 0 2px;
+ padding: 0 2px;
+ background: #ECEDEE;
+ border: 1px solid #B4BAC0;
+}
+
+.pagination span a:hover {
+ border-color: #368AD2;
+ background: #368AD2;
+ color: #FFFFFF;
+ text-decoration: none;
+}
+
+.pagination img {
+ vertical-align: middle;
+}
+
+
+/* Action Highlighting
+---------------------------------------- */
+.successbox, .errorbox {
+ padding: 8px;
+ margin: 10px 0;
+ color: #FFFFFF;
+ text-align: center;
+}
+
+.success {
+ color: #228822;
+}
+
+.error {
+ color: #BC2A4D;
+}
+
+.successbox {
+ background-color: #228822;
+}
+
+.errorbox {
+ background-color: #BC2A4D;
+}
+
+* html .errorbox, * html .successbox { height: 1%; } /* Pixel shift fix for IE */
+
+.successbox h3, .errorbox h3 {
+ color: #FFFFFF;
+ margin: 0 0 0.5em;
+ font-size: 1.10em;
+ font-family: "Lucida Grande",Verdana,Helvetica,Arial,sans-serif;
+}
+
+.successbox p, .errorbox p {
+ color: #FFFFFF;
+ font-size: 0.85em;
+ margin-bottom: 0;
+}
+
+.errorbox a:link, .errorbox a:active, .errorbox a:visited,
+.successbox a:link, .successbox a:active, .successbox a:visited {
+ color: #DBD7D1;
+ text-decoration: underline;
+ font-weight: bold;
+}
+
+.errorbox a:hover, .successbox a:hover {
+ color: #FFFFFF;
+ text-decoration: none;
+ font-weight: bold;
+}
+
+.notice {
+ background-color: #62A5CC;
+}
+
+/* Special cases for the error page */
+#errorpage #page-header a {
+ font-weight: bold;
+ line-height: 6em;
+}
+
+#errorpage #content {
+ padding-top: 10px;
+}
+
+#errorpage #content h1 {
+ color: #DF075C;
+}
+
+#errorpage #content h2 {
+ margin-top: 20px;
+ margin-bottom: 5px;
+ border-bottom: 1px solid #CCCCCC;
+ padding-bottom: 5px;
+ color: #333333;
+}
+
+/* Tooltip for permission roles */
+.tooltip {
+ width: 200px;
+ color: #000;
+ text-align: center;
+ border: 1px solid #AAA;
+}
+
+.tooltip span.top {
+ background: #EFEFEF;
+ font-weight: bold;
+ padding: 2px;
+}
+
+.tooltip span.bottom {
+ padding: 5px;
+ color: #000000;
+ background: #FFFFFF;
+}
+
+/*
+ Format Buttons for signature editor
+*/
+#format-buttons {
+ margin: 15px 0 2px 0;
+}
+
+#format-buttons input, #format-buttons select {
+ vertical-align: middle;
+}
+
+/* Nice method for clearing floated blocks without having to insert any extra markup
+ From http://www.positioniseverything.net/easyclearing.html
+.clearfix:after, #tabs:after, .row:after, #content:after, fieldset dl:after, #page-body:after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}*/
+
+.clearfix, #tabs, .row, #content, fieldset dl, #page-body {
+ height: 1%;
+ overflow: hidden;
+}
+
+/* Syntax Highlighting
+---------------------------------------- */
+.sourcenum {
+ color: gray;
+ font-family: Monaco, 'Courier New', monospace;
+ font-size: 1.25em;
+ font-weight: bold;
+ line-height: 1.20em;
+ text-align: right;
+ padding: 0;
+}
+
+.rtl .sourcenum {
+ text-align: left;
+}
+
+.source {
+ font-family: Monaco, 'Courier New', monospace;
+ font-size: 1.25em;
+ line-height: 1.20em;
+ padding: 0;
+}
+
+.syntaxbg {
+ color: #FFFFFF;
+}
+
+.syntaxcomment {
+ color: #FF8000;
+}
+
+.syntaxdefault {
+ color: #0000BB;
+}
+
+.syntaxhtml {
+ color: #000000;
+}
+
+.syntaxkeyword {
+ color: #007700;
+}
+
+.syntaxstring {
+ color: #DD0000;
+}
+
+/* Permission interface
+---------------------------------------- */
+
+fieldset.permissions legend {
+ text-transform: none;
+}
+
+fieldset.permissions legend input{
+ height: 1.1em;
+}
+
+/* Permission sections */
+fieldset.permissions .permissions-simple {
+ text-align: left;
+ padding-top: 3px;
+}
+
+.rtl fieldset.permissions .permissions-simple {
+ text-align: right;
+}
+
+fieldset.permissions .permissions-advanced {
+ padding: 10px 0 0 5px;
+ vertical-align: top;
+ clear: right;
+}
+
+.rtl fieldset.permissions .permissions-advanced {
+ padding: 10px 5px 0 0;
+ clear: left;
+}
+
+fieldset.permissions .permissions-switch {
+ float: right;
+}
+
+.rtl fieldset.permissions .permissions-switch {
+ float: left;
+}
+
+fieldset.permissions .padding {
+}
+
+.permissions-switch {
+ margin-top: -6px;
+ font-size: .9em;
+}
+
+.permissions-switch a {
+ text-decoration: underline;
+}
+
+.permissions-reset {
+ padding-bottom: 10px;
+}
+
+.permissions-reset a {
+ font-size: .85em;
+}
+
+/* Tabbed menu */
+.permissions-category {
+ line-height: normal;
+ margin: 0 0 -1px 7px;
+ min-width: 570px;
+ font-size: 0.85em;
+}
+
+.rtl .permissions-category {
+ margin: 0 7px -1px 0;
+}
+
+.permissions-category ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+.permissions-category li {
+ display: inline;
+ margin: 0;
+ padding: 0;
+ font-size: 1em;
+ font-weight: bold;
+}
+
+.permissions-category a {
+ float: left;
+ background: url("../images/bg_tabs_alt1.gif") no-repeat 0% -35px;
+ margin: 0 1px 0 0;
+ padding: 0 0 0 6px;
+ text-decoration: none;
+ position: relative;
+}
+
+.rtl .permissions-category a {
+ float: right;
+}
+
+.permissions-category a span.tabbg {
+ float: left;
+ display: block;
+ background: url("../images/bg_tabs_alt2.gif") no-repeat 100% -35px;
+ padding: 7px 12px 6px 6px;
+ color: #536482;
+ white-space: nowrap;
+}
+
+.rtl .permissions-category a span.tabbg {
+ float: right;
+}
+
+/* Commented Backslash Hack hides rule from IE5-Mac \*/
+.permissions-category a span.tabbg, .rtl .permissions-category a span.tabbg { float: none;}
+/* End hack */
+
+.permissions-category a:hover span.tabbg {
+ color: #DD6900;
+}
+
+.permissions-category .activetab a {
+ background-position: 0 0;
+}
+
+.permissions-category .activetab a span.tabbg {
+ background-position: 100% 0;
+ padding-bottom: 7px;
+ color: #333333;
+}
+
+.permissions-category a:hover {
+ background-position: 0 -70px;
+}
+
+.permissions-category a:hover span.tabbg {
+ background-position: 100% -70px;
+}
+
+.permissions-category .activetab a:hover span.tabbg {
+ color: #333333;
+ background-position: 100% 0;
+}
+
+.permissions-category .activetab a:hover {
+ background-position: 0 0;
+}
+
+.permissions-category a span.colour {
+ border: 1px solid #536482;
+ display: block;
+ float: left;
+ width: 10px;
+ height: 10px;
+ margin: 0 5px 0 0;
+}
+
+/* Most browsers will have to live with a left aligned icon in RTL mode, as (currently) only Firefox 3.0 Alpha 3 renders it correctly without destroying it
+.rtl .permissions-category a span.colour {
+ float: right;
+ margin: 0 0 0 5px;
+}
+*/
+
+.permissions-category .activetab span.colour {
+ border-color: #333333;
+}
+
+.permissions-category a:hover span.colour {
+ border-color: #DD6900;
+}
+
+.permissions-category .activetab a:hover span.colour {
+ border-color: #333333;
+}
+
+/* Permission preset colours */
+.permissions-preset-yes span.colour,
+.yes {
+ background-color: #86F786;
+}
+
+.permissions-preset-custom span.colour {
+ background-color: #B2BBDD;
+}
+
+.permissions-preset-never span.colour {
+ background-color: #DD0000;
+}
+
+.permissions-preset-no span.colour,
+.never {
+ background-color: #EFB0B2;
+}
+
+/* Permission panel
+---------------------------------------- */
+.permissions-panel {
+ float: left;
+ background-color: #CADCEB;
+ width: 100%;
+}
+
+.rtl .permissions-panel {
+ float: right;
+}
+
+.permissions-panel span.corners-top {
+ background-image: url("../images/corners_left2.gif");
+}
+
+.permissions-panel span.corners-top span {
+ background-image: url("../images/corners_right2.gif");
+}
+
+.permissions-panel span.corners-bottom {
+ background-image: url("../images/corners_left2.gif");
+}
+
+.permissions-panel span.corners-bottom span {
+ background-image: url("../images/corners_right2.gif");
+}
+
+.permissions-panel span.corners-top, .permissions-panel span.corners-bottom,
+.permissions-panel span.corners-top span, .permissions-panel span.corners-bottom span {
+ font-size: 1px;
+ line-height: 1px;
+ display: block;
+ height: 5px;
+ background-repeat: no-repeat;
+}
+
+.permissions-panel span.corners-top {
+ background-image: url("../images/corners_left2.gif");
+ background-position: 0 0;
+ margin: 0 0;
+}
+
+.permissions-panel span.corners-top span {
+ background-image: url("../images/corners_right2.gif");
+ background-position: 100% 0;
+}
+
+.permissions-panel span.corners-bottom {
+ background-image: url("../images/corners_left2.gif");
+ background-position: 0 100%;
+ margin: 0 0;
+ clear: both;
+}
+
+.permissions-panel span.corners-bottom span {
+ background-image: url("../images/corners_right2.gif");
+ background-position: 100% 100%;
+}
+
+/* Permission table
+---------------------------------------- */
+.permissions-panel .tablewrap {
+ margin: 0 10px;
+}
+
+.permissions-panel table {
+ width: 100%;
+}
+
+.permissions-panel th {
+ text-transform: none;
+}
+
+.permissions-panel th.value {
+ text-align: center;
+}
+
+.permissions-panel th.name {
+ text-align: left;
+ width: auto;
+ text-transform: none;
+}
+
+.rtl .permissions-panel th.name {
+ text-align: right;
+}
+
+.permissions-panel th.permissions-name {
+ border: none;
+ color: #536482;
+ font-weight: normal;
+}
+
+.permissions-panel th.permissions-name a.trace {
+ display: inline;
+}
+
+.permissions-panel th.row3 {
+ background-image: none;
+ background-color: #D1D7DC;
+ color: #536482;
+ border: none;
+}
+
+.permissions-panel th.row4 {
+ background-image: none;
+ background-color: #E4E8EB;
+ color: #536482;
+ border: none;
+}
+
+.permissions-panel th a:link, .permissions-panel th a:hover, .permissions-panel th a:visited {
+ display: block;
+ color: #FFFFFF;
+ text-decoration: underline;
+}
+
+.permissions-panel td.permissions-yes label:hover {
+ background-color: #86F786;
+}
+
+.permissions-panel td.permissions-no label:hover {
+ background-color: #EFB0B2;
+}
+
+.permissions-panel td.permissions-never label:hover {
+ background-color: #DD0000;
+}
+
+.permissions-panel td {
+ padding: 0;
+ text-align: center;
+ width: 10%;
+}
+
+.permissions-panel td label {
+ display: block;
+ margin: 0;
+ padding: 0;
+}
+
+/* Classes for additional tasks
+---------------------------------------- */
+
+.phpinfo {
+ overflow: auto;
+ width: 99%;
+ direction: ltr;
+}
+
+.phpinfo td, .phpinfo th, .phpinfo h2, .phpinfo h1 {
+ text-align: left;
+}
diff --git a/phpBB/adm/style/captcha_default_acp_demo.html b/phpBB/adm/style/captcha_default_acp_demo.html
new file mode 100644
index 0000000000..0b1434f7e0
--- /dev/null
+++ b/phpBB/adm/style/captcha_default_acp_demo.html
@@ -0,0 +1,4 @@
+<dl>
+ <dt><label for="captcha_preview">{L_PREVIEW}:</label><br /><span>{L_CAPTCHA_PREVIEW_EXPLAIN}</span></dt>
+ <dd><img src="{CONFIRM_IMAGE}" alt="{L_PREVIEW}" width="360" height="96" id="captcha_preview" /></dd>
+</dl>
diff --git a/phpBB/adm/style/captcha_gd_acp.html b/phpBB/adm/style/captcha_gd_acp.html
new file mode 100644
index 0000000000..d0bb758cfe
--- /dev/null
+++ b/phpBB/adm/style/captcha_gd_acp.html
@@ -0,0 +1,74 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+ <a href="{U_ACTION}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+<h1>{L_ACP_VC_SETTINGS}</h1>
+
+<p>{L_ACP_VC_SETTINGS_EXPLAIN}</p>
+
+
+<form id="acp_captcha" method="post" action="{U_ACTION}">
+
+<fieldset>
+<legend>{L_GENERAL_OPTIONS}</legend>
+
+<dl>
+ <dt><label for="captcha_gd_foreground_noise">{L_CAPTCHA_GD_FOREGROUND_NOISE}:</label><br /><span>{L_CAPTCHA_GD_FOREGROUND_NOISE_EXPLAIN}</span></dt>
+ <dd><label><input id="captcha_gd_foreground_noise" name="captcha_gd_foreground_noise" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_FOREGROUND_NOISE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input name="captcha_gd_foreground_noise" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD_FOREGROUND_NOISE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+</dl>
+<dl>
+ <dt><label for="captcha_gd_x_grid">{L_CAPTCHA_GD_X_GRID}:</label><br /><span>{L_CAPTCHA_GD_X_GRID_EXPLAIN}</span></dt>
+ <dd><input id="captcha_gd_x_grid" name="captcha_gd_x_grid" value="{CAPTCHA_GD_X_GRID}" type="text" /></dd>
+</dl>
+<dl>
+ <dt><label for="captcha_gd_y_grid">{L_CAPTCHA_GD_Y_GRID}:</label><br /><span>{L_CAPTCHA_GD_Y_GRID_EXPLAIN}</span></dt>
+ <dd><input id="captcha_gd_y_grid" name="captcha_gd_y_grid" value="{CAPTCHA_GD_Y_GRID}" type="text" /></dd>
+</dl>
+<dl>
+ <dt><label for="captcha_gd_wave">{L_CAPTCHA_GD_WAVE}:</label><br /><span>{L_CAPTCHA_GD_WAVE_EXPLAIN}</span></dt>
+ <dd><label><input id="captcha_gd_wave" name="captcha_gd_wave" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_WAVE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input name="captcha_gd_wave" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD_WAVE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+</dd>
+</dl>
+<dl>
+ <dt><label for="captcha_gd_3d_noise">{L_CAPTCHA_GD_3D_NOISE}:</label><br /><span>{L_CAPTCHA_GD_3D_NOISE_EXPLAIN}</span></dt>
+ <dd><label><input id="captcha_gd_3d_noise" name="captcha_gd_3d_noise" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_3D_NOISE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input name="captcha_gd_3d_noise" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD_3D_NOISE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+</dd>
+</dl>
+<dl>
+ <dt><label for="captcha_gd_fonts">{L_CAPTCHA_GD_FONTS}:</label><br /><span>{L_CAPTCHA_GD_FONTS_EXPLAIN}</span></dt>
+ <dd><label><input id="captcha_gd_fonts" name="captcha_gd_fonts" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_FONTS == 1 --> checked="checked"<!-- ENDIF --> /> {L_CAPTCHA_FONT_DEFAULT}</label>
+ <label><input name="captcha_gd_fonts" value="2" class="radio" type="radio"<!-- IF CAPTCHA_GD_FONTS == 2 --> checked="checked"<!-- ENDIF --> /> {L_CAPTCHA_FONT_NEW}</label>
+ <label><input name="captcha_gd_fonts" value="3" class="radio" type="radio"<!-- IF CAPTCHA_GD_FONTS == 3 --> checked="checked"<!-- ENDIF --> /> {L_CAPTCHA_FONT_LOWER}</label>
+
+</dd>
+</dl>
+
+</fieldset>
+<fieldset>
+ <legend>{L_PREVIEW}</legend>
+ <!-- IF CAPTCHA_PREVIEW -->
+ <!-- INCLUDE {CAPTCHA_PREVIEW} -->
+ <!-- ENDIF -->
+
+</fieldset>
+
+<fieldset>
+ <legend>{L_ACP_SUBMIT_CHANGES}</legend>
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />&nbsp;
+ <input class="button2" type="submit" id="preview" name="preview" value="{L_PREVIEW}" />&nbsp;
+ </p>
+
+ <input type="hidden" name="select_captcha" value="{CAPTCHA_NAME}" />
+ <input type="hidden" name="configure" value="1" />
+
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/captcha_qa_acp.html b/phpBB/adm/style/captcha_qa_acp.html
new file mode 100644
index 0000000000..e0fc6fc67e
--- /dev/null
+++ b/phpBB/adm/style/captcha_qa_acp.html
@@ -0,0 +1,92 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+
+ <a href="<!-- IF U_LIST -->{U_LIST}<!-- ELSE -->{U_ACTION}<!-- ENDIF -->" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_QUESTIONS}</h1>
+
+ <p>{L_QUESTIONS_EXPLAIN}</p>
+<!-- IF S_LIST -->
+ <form id="captcha_qa" method="post" action="{U_ACTION}">
+
+ <fieldset class="tabulated">
+ <legend>{L_QUESTIONS}</legend>
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th colspan="3">{L_QUESTIONS}</th>
+ </tr>
+ <tr class="row3">
+ <td style="text-align: center;">{L_QUESTION_TEXT}</td>
+ <td style="width: 5%; text-align: center;">{L_QUESTION_LANG}</td>
+ <td style="vertical-align: top; width: 50px; text-align: center; white-space: nowrap;">{L_ACTION}</td>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN questions -->
+
+ <!-- IF questions.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td style="text-align: left;">{questions.QUESTION_TEXT}</td>
+ <td style="text-align: center;">{questions.QUESTION_LANG}</td>
+ <td style="text-align: center;"><a href="{questions.U_EDIT}">{ICON_EDIT}</a>&nbsp;<a href="{questions.U_DELETE}">{ICON_DELETE}</a></td>
+ </tr>
+ <!-- END questions -->
+ </tbody>
+ </table>
+ <fieldset class="quick">
+ <input class="button1" type="submit" name="add" value="{L_ADD}" />
+ <input type="hidden" name="action" value="add" />
+ <input type="hidden" name="configure" value="1" />
+ <input type="hidden" name="select_captcha" value="{CLASS}" />
+
+ {S_FORM_TOKEN}
+ </fieldset>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+<!-- ELSE -->
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{L_QA_ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+ <form id="captcha_qa" method="post" action="{U_ACTION}">
+ <fieldset>
+ <legend>{L_EDIT_QUESTION}</legend>
+ <dl>
+ <dt><label for="strict">{L_QUESTION_STRICT}:</label><br /><span>{L_QUESTION_STRICT_EXPLAIN}</span></dt>
+ <dd><label><input type="radio" class="radio" name="strict" value="1"<!-- IF STRICT --> id="strict" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="strict" value="0"<!-- IF not STRICT --> id="strict" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ </dl>
+
+ <dl>
+ <dt><label for="lang_iso">{L_QUESTION_LANG}</label><br /><span>{L_QUESTION_LANG_EXPLAIN}</span></dt>
+ <dd><select id="lang_iso" name="lang_iso"><!-- BEGIN langs --><option value="{langs.ISO}" <!-- IF langs.ISO == LANG_ISO --> selected="selected" <!-- ENDIF -->>{langs.NAME}</option><!-- END langs --></select></dd>
+ </dl>
+ <dl>
+ <dt><label for="question_text">{L_QUESTION_TEXT}</label><br /><span>{L_QUESTION_TEXT_EXPLAIN}</span></dt>
+ <dd><input id="question_text" maxlength="255" size="60" name="question_text" type="text" value="{QUESTION_TEXT}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="answers">{L_QUESTION_ANSWERS}</label><br /><span>{L_ANSWERS_EXPLAIN}</span></dt>
+ <dd><textarea id="answers" style="word-wrap: normal; overflow-x: scroll;" name="answers" rows="15" cols="800" >{ANSWERS}</textarea></dd>
+ </dl>
+ </fieldset>
+ <fieldset class="quick">
+ <input class="button1" type="submit" name="submit" value="{L_SUBMIT}" />
+ <input type="hidden" name="question_id" value="{QUESTION_ID}" />
+ <input type="hidden" name="action" value="add" />
+ <input type="hidden" name="configure" value="1" />
+ <input type="hidden" name="select_captcha" value="{CLASS}" />
+
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/captcha_qa_acp_demo.html b/phpBB/adm/style/captcha_qa_acp_demo.html
new file mode 100644
index 0000000000..57bed8af53
--- /dev/null
+++ b/phpBB/adm/style/captcha_qa_acp_demo.html
@@ -0,0 +1,7 @@
+<dl>
+ <dt><label for="answer">{L_CONFIRM_QUESTION}:</label><br /><span>{L_CONFIRM_QUESTION_EXPLAIN}</span></dt>
+
+ <dd>
+ <input type="text" tabindex="10" name="answer" id="answer" size="45" class="inputbox autowidth" title="{L_ANSWER}" />
+ </dd>
+</dl>
diff --git a/phpBB/adm/style/captcha_recaptcha.html b/phpBB/adm/style/captcha_recaptcha.html
new file mode 100644
index 0000000000..e4fa5dd426
--- /dev/null
+++ b/phpBB/adm/style/captcha_recaptcha.html
@@ -0,0 +1,33 @@
+<!-- IF S_RECAPTCHA_AVAILABLE -->
+ <dl>
+ <dd>
+ <script type="text/javascript">
+ // <![CDATA[
+ var RecaptchaOptions = {
+ lang : '{L_RECAPTCHA_LANG}',
+ };
+ // ]]>
+ </script>
+ <script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}"></script>
+ <script type="text/javascript">
+ // <![CDATA[
+ <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
+ document.getElementById('recaptcha_table').style.direction = 'ltr';
+ <!-- ENDIF -->
+ // ]]>
+ </script>
+
+
+ <noscript>
+ <div>
+ <object data="{RECAPTCHA_SERVER}/noscript?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" type="text/html" height="300" width="500"></object><br />
+ <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
+ <input type="hidden" name="recaptcha_response_field" value="manual_challenge" />
+ </div>
+ </noscript>
+
+ </dd>
+ </dl>
+<!-- ELSE -->
+{L_RECAPTCHA_NOT_AVAILABLE}
+<!-- ENDIF -->
diff --git a/phpBB/adm/style/captcha_recaptcha_acp.html b/phpBB/adm/style/captcha_recaptcha_acp.html
new file mode 100644
index 0000000000..5b97cff984
--- /dev/null
+++ b/phpBB/adm/style/captcha_recaptcha_acp.html
@@ -0,0 +1,50 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+<h1>{L_ACP_VC_SETTINGS}</h1>
+
+<p>{L_ACP_VC_SETTINGS_EXPLAIN}</p>
+
+
+<form id="acp_captcha" method="post" action="{U_ACTION}">
+
+<fieldset>
+<legend>{L_GENERAL_OPTIONS}</legend>
+
+<dl>
+ <dt><label for="recaptcha_pubkey">{L_RECAPTCHA_PUBLIC}:</label><br /><span>{L_RECAPTCHA_PUBLIC_EXPLAIN}</span></dt>
+ <dd><input id="recaptcha_pubkey" name="recaptcha_pubkey" value="{RECAPTCHA_PUBKEY}" size="50" type="text" /></dd>
+</dl>
+<dl>
+ <dt><label for="recaptcha_privkey">{L_RECAPTCHA_PRIVATE}:</label><br /><span>{L_RECAPTCHA_PRIVATE_EXPLAIN}</span></dt>
+ <dd><input id="recaptcha_privkey" name="recaptcha_privkey" value="{RECAPTCHA_PRIVKEY}" size="50" type="text" /></dd>
+</dl>
+
+
+</fieldset>
+<fieldset>
+ <legend>{L_PREVIEW}</legend>
+<!-- IF PREVIEW -->
+ <div class="successbox">
+ <h3>{L_WARNING}</h3>
+ <p>{L_CAPTCHA_PREVIEW_MSG}</p>
+ </div>
+<!-- ENDIF -->
+<!-- INCLUDE {CAPTCHA_PREVIEW} -->
+</fieldset>
+
+<fieldset>
+ <legend>{L_ACP_SUBMIT_CHANGES}</legend>
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />&nbsp;
+ </p>
+ <input type="hidden" name="select_captcha" value="{CAPTCHA_NAME}" />
+ <input type="hidden" name="configure" value="1" />
+
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/colour_swatch.html b/phpBB/adm/style/colour_swatch.html
new file mode 100644
index 0000000000..c9e89980d8
--- /dev/null
+++ b/phpBB/adm/style/colour_swatch.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<meta http-equiv="Content-Language" content="{S_USER_LANG}" />
+<meta http-equiv="imagetoolbar" content="no" />
+<title>{L_COLOUR_SWATCH}</title>
+
+<style type="text/css">
+/* <![CDATA[ */
+ body {
+ background-color: #404040;
+ color: #fff;
+ }
+
+ td {
+ border: solid 1px #333;
+ }
+
+ .over {
+ border-color: white;
+ }
+
+ .out {
+ border-color: #333333;
+ }
+
+ img {
+ border: 0;
+ }
+/* ]]> */
+</style>
+</head>
+
+<body>
+
+<script type="text/javascript">
+// <![CDATA[
+ var r = 0, g = 0, b = 0;
+
+ var numberList = new Array(6);
+ numberList[0] = '00';
+ numberList[1] = '33';
+ numberList[2] = '66';
+ numberList[3] = '99';
+ numberList[4] = 'CC';
+ numberList[5] = 'FF';
+
+ document.writeln('<table cellspacing="0" cellpadding="0" border="0">');
+
+ for (r = 0; r < 6; r++)
+ {
+ document.writeln('<tr>');
+
+ for (g = 0; g < 6; g++)
+ {
+ for (b = 0; b < 6; b++)
+ {
+ color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
+ document.write('<td style="background-color: #' + color + ';" onmouseover="this.className=\'over\'" onmouseout="this.className=\'out\'">');
+ document.write('<a href="#" onclick="cell(\'' + color + '\'); return false;"><img src="{T_IMAGES_PATH}spacer.gif" width="15" height="12" alt="#' + color + '" title="#' + color + '" \/><\/a>');
+ document.writeln('<\/td>');
+ }
+ }
+ document.writeln('<\/tr>');
+ }
+ document.writeln('<\/table>');
+
+ function cell(color)
+ {
+ opener.document.forms["{OPENER}"].{NAME}.value = color;
+ }
+// ]]>
+</script>
+
+</body>
+</html> \ No newline at end of file
diff --git a/phpBB/adm/style/confirm_body.html b/phpBB/adm/style/confirm_body.html
new file mode 100644
index 0000000000..2fbb1a60d7
--- /dev/null
+++ b/phpBB/adm/style/confirm_body.html
@@ -0,0 +1,20 @@
+<!-- INCLUDE overall_header.html -->
+
+<form id="confirm" method="post" action="{S_CONFIRM_ACTION}">
+
+<fieldset>
+ <h1>{MESSAGE_TITLE}</h1>
+ <p>{MESSAGE_TEXT}</p>
+
+ {S_HIDDEN_FIELDS}
+
+ <div style="text-align: center;">
+ <input type="submit" name="confirm" value="{L_YES}" class="button2" />&nbsp;
+ <input type="submit" name="cancel" value="{L_NO}" class="button2" />
+ </div>
+
+</fieldset>
+
+</form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/confirm_body_prune.html b/phpBB/adm/style/confirm_body_prune.html
new file mode 100644
index 0000000000..9481386231
--- /dev/null
+++ b/phpBB/adm/style/confirm_body_prune.html
@@ -0,0 +1,30 @@
+<!-- INCLUDE overall_header.html -->
+
+<form id="confirm" method="post" action="{S_CONFIRM_ACTION}">
+
+<fieldset>
+ <h1>{MESSAGE_TITLE}</h1>
+ <p>{MESSAGE_TEXT}</p>
+
+ {S_HIDDEN_FIELDS}
+
+ <div style="text-align: center;">
+ <input type="submit" name="confirm" value="{L_YES}" class="button2" />&nbsp;
+ <input type="submit" name="cancel" value="{L_NO}" class="button2" />
+ </div>
+
+ <h2>{L_PRUNE_USERS_LIST}</h2>
+ <!-- IF S_DEACTIVATE --><p>{L_PRUNE_USERS_LIST_DEACTIVATE}</p><!-- ELSE --><p>{L_PRUNE_USERS_LIST_DELETE}</p><!-- ENDIF -->
+
+ <br />
+ <!-- BEGIN users -->
+ &raquo; <a href="{users.U_PROFILE}">{users.USERNAME}</a><!-- IF users.U_USER_ADMIN --> [<a href="{users.U_USER_ADMIN}">{L_USER_ADMIN}</a>]<!-- ENDIF --><br />
+ <!-- END users -->
+
+ <br /><br />
+
+</fieldset>
+
+</form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/custom_profile_fields.html b/phpBB/adm/style/custom_profile_fields.html
new file mode 100644
index 0000000000..351397d3c7
--- /dev/null
+++ b/phpBB/adm/style/custom_profile_fields.html
@@ -0,0 +1,32 @@
+
+<!-- BEGIN dropdown -->
+ <select name="{dropdown.FIELD_IDENT}" id="{dropdown.FIELD_IDENT}">
+ <!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options -->
+ </select>
+<!-- END dropdown -->
+
+<!-- BEGIN text -->
+ <textarea name="{text.FIELD_IDENT}" id="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}">{text.FIELD_VALUE}</textarea>
+<!-- END text -->
+
+<!-- BEGIN string -->
+ <input type="text" name="{string.FIELD_IDENT}" id="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
+<!-- END string -->
+
+<!-- BEGIN bool -->
+ <!-- IF bool.FIELD_LENGTH eq 1 -->
+ <!-- BEGIN options --><label for="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}"><input type="radio" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /> {bool.options.VALUE}</label> <!-- END options -->
+ <!-- ELSE -->
+ <input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}" value="1"<!-- IF bool.FIELD_VALUE --> checked="checked"<!-- ENDIF --> />
+ <!-- ENDIF -->
+<!-- END bool -->
+
+<!-- BEGIN int -->
+ <input type="text" name="{int.FIELD_IDENT}" id="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" />
+<!-- END int -->
+
+<!-- BEGIN date -->
+ <span>{L_DAY}:</span> <select name="{date.FIELD_IDENT}_day" id="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select>
+ <span>{L_MONTH}:</span> <select name="{date.FIELD_IDENT}_month" id="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select>
+ <span>{L_YEAR}:</span> <select name="{date.FIELD_IDENT}_year" id="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select>
+<!-- END date -->
diff --git a/phpBB/adm/style/editor.js b/phpBB/adm/style/editor.js
new file mode 100644
index 0000000000..cd4e75f51f
--- /dev/null
+++ b/phpBB/adm/style/editor.js
@@ -0,0 +1,398 @@
+/**
+* bbCode control by subBlue design [ www.subBlue.com ]
+* Includes unixsafe colour palette selector by SHS`
+*/
+
+// Startup variables
+var imageTag = false;
+var theSelection = false;
+
+// Check for Browser & Platform for PC & IE specific bits
+// More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
+var clientPC = navigator.userAgent.toLowerCase(); // Get client info
+var clientVer = parseInt(navigator.appVersion); // Get browser version
+
+var is_ie = ((clientPC.indexOf('msie') != -1) && (clientPC.indexOf('opera') == -1));
+var is_win = ((clientPC.indexOf('win') != -1) || (clientPC.indexOf('16bit') != -1));
+
+var baseHeight;
+
+/**
+* Shows the help messages in the helpline window
+*/
+function helpline(help)
+{
+ document.forms[form_name].helpbox.value = help_line[help];
+}
+
+/**
+* Fix a bug involving the TextRange object. From
+* http://www.frostjedi.com/terra/scripts/demo/caretBug.html
+*/
+function initInsertions()
+{
+ var doc;
+ if(document.forms[form_name])
+ {
+ doc = document;
+ }
+ else
+ {
+ doc = opener.document;
+ }
+
+ var textarea = doc.forms[form_name].elements[text_name];
+ if (is_ie && typeof(baseHeight) != 'number')
+ {
+ textarea.focus();
+ baseHeight = doc.selection.createRange().duplicate().boundingHeight;
+ // document.body.focus();
+ }
+}
+
+/**
+* bbstyle
+*/
+function bbstyle(bbnumber)
+{
+ if (bbnumber != -1)
+ {
+ bbfontstyle(bbtags[bbnumber], bbtags[bbnumber+1]);
+ }
+ else
+ {
+ insert_text('[*]');
+ document.forms[form_name].elements[text_name].focus();
+ }
+}
+
+/**
+* Apply bbcodes
+*/
+function bbfontstyle(bbopen, bbclose)
+{
+ theSelection = false;
+
+ var textarea = document.forms[form_name].elements[text_name];
+
+ textarea.focus();
+
+ if ((clientVer >= 4) && is_ie && is_win)
+ {
+ // Get text selection
+ theSelection = document.selection.createRange().text;
+
+ if (theSelection)
+ {
+ // Add tags around selection
+ document.selection.createRange().text = bbopen + theSelection + bbclose;
+ document.forms[form_name].elements[text_name].focus();
+ theSelection = '';
+ return;
+ }
+ }
+ else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0))
+ {
+ mozWrap(document.forms[form_name].elements[text_name], bbopen, bbclose);
+ document.forms[form_name].elements[text_name].focus();
+ theSelection = '';
+ return;
+ }
+
+ //The new position for the cursor after adding the bbcode
+ var caret_pos = getCaretPosition(textarea).start;
+ var new_pos = caret_pos + bbopen.length;
+
+ // Open tag
+ insert_text(bbopen + bbclose);
+
+ // Center the cursor when we don't have a selection
+ // Gecko and proper browsers
+ if (!isNaN(textarea.selectionStart))
+ {
+ textarea.selectionStart = new_pos;
+ textarea.selectionEnd = new_pos;
+ }
+ // IE
+ else if (document.selection)
+ {
+ var range = textarea.createTextRange();
+ range.move("character", new_pos);
+ range.select();
+ storeCaret(textarea);
+ }
+
+ textarea.focus();
+ return;
+}
+
+/**
+* Insert text at position
+*/
+function insert_text(text, spaces, popup)
+{
+ var textarea;
+
+ if (!popup)
+ {
+ textarea = document.forms[form_name].elements[text_name];
+ }
+ else
+ {
+ textarea = opener.document.forms[form_name].elements[text_name];
+ }
+
+ if (spaces)
+ {
+ text = ' ' + text + ' ';
+ }
+
+ if (!isNaN(textarea.selectionStart))
+ {
+ var sel_start = textarea.selectionStart;
+ var sel_end = textarea.selectionEnd;
+
+ mozWrap(textarea, text, '')
+ textarea.selectionStart = sel_start + text.length;
+ textarea.selectionEnd = sel_end + text.length;
+ }
+
+ else if (textarea.createTextRange && textarea.caretPos)
+ {
+ if (baseHeight != textarea.caretPos.boundingHeight)
+ {
+ textarea.focus();
+ storeCaret(textarea);
+ }
+ var caret_pos = textarea.caretPos;
+ caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text;
+
+ }
+ else
+ {
+ textarea.value = textarea.value + text;
+ }
+
+ if (!popup)
+ {
+ textarea.focus();
+ }
+
+}
+
+/**
+* Add inline attachment at position
+*/
+function attach_inline(index, filename)
+{
+ insert_text('[attachment=' + index + ']' + filename + '[/attachment]');
+ document.forms[form_name].elements[text_name].focus();
+}
+
+/**
+* Add quote text to message
+*/
+function addquote(post_id, username)
+{
+ var message_name = 'message_' + post_id;
+ var theSelection = '';
+ var divarea = false;
+
+ if (document.all)
+ {
+ divarea = document.all[message_name];
+ }
+ else
+ {
+ divarea = document.getElementById(message_name);
+ }
+
+ // Get text selection - not only the post content :(
+ if (window.getSelection)
+ {
+ theSelection = window.getSelection().toString();
+ }
+ else if (document.getSelection)
+ {
+ theSelection = document.getSelection();
+ }
+ else if (document.selection)
+ {
+ theSelection = document.selection.createRange().text;
+ }
+
+ if (theSelection == '' || typeof theSelection == 'undefined' || theSelection == null)
+ {
+ if (divarea.innerHTML)
+ {
+ theSelection = divarea.innerHTML.replace(/<br>/ig, '\n');
+ theSelection = theSelection.replace(/<br\/>/ig, '\n');
+ theSelection = theSelection.replace(/&lt\;/ig, '<');
+ theSelection = theSelection.replace(/&gt\;/ig, '>');
+ theSelection = theSelection.replace(/&amp\;/ig, '&');
+ }
+ else if (document.all)
+ {
+ theSelection = divarea.innerText;
+ }
+ else if (divarea.textContent)
+ {
+ theSelection = divarea.textContent;
+ }
+ else if (divarea.firstChild.nodeValue)
+ {
+ theSelection = divarea.firstChild.nodeValue;
+ }
+ }
+
+ if (theSelection)
+ {
+ insert_text('[quote="' + username + '"]' + theSelection + '[/quote]');
+ }
+
+ return;
+}
+
+/**
+* From http://www.massless.org/mozedit/
+*/
+function mozWrap(txtarea, open, close)
+{
+ var selLength = (typeof(txtarea.textLength) == 'undefined') ? txtarea.value.length : txtarea.textLength;
+ var selStart = txtarea.selectionStart;
+ var selEnd = txtarea.selectionEnd;
+ var scrollTop = txtarea.scrollTop;
+
+ if (selEnd == 1 || selEnd == 2)
+ {
+ selEnd = selLength;
+ }
+
+ var s1 = (txtarea.value).substring(0,selStart);
+ var s2 = (txtarea.value).substring(selStart, selEnd)
+ var s3 = (txtarea.value).substring(selEnd, selLength);
+
+ txtarea.value = s1 + open + s2 + close + s3;
+ txtarea.selectionStart = selEnd + open.length + close.length;
+ txtarea.selectionEnd = txtarea.selectionStart;
+ txtarea.focus();
+ txtarea.scrollTop = scrollTop;
+
+ return;
+}
+
+/**
+* Insert at Caret position. Code from
+* http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
+*/
+function storeCaret(textEl)
+{
+ if (textEl.createTextRange)
+ {
+ textEl.caretPos = document.selection.createRange().duplicate();
+ }
+}
+
+/**
+* Color pallette
+*/
+function colorPalette(dir, width, height)
+{
+ var r = 0, g = 0, b = 0;
+ var numberList = new Array(6);
+ var color = '';
+
+ numberList[0] = '00';
+ numberList[1] = '40';
+ numberList[2] = '80';
+ numberList[3] = 'BF';
+ numberList[4] = 'FF';
+
+ document.writeln('<table class="type2">');
+
+ for (r = 0; r < 5; r++)
+ {
+ if (dir == 'h')
+ {
+ document.writeln('<tr>');
+ }
+
+ for (g = 0; g < 5; g++)
+ {
+ if (dir == 'v')
+ {
+ document.writeln('<tr>');
+ }
+
+ for (b = 0; b < 5; b++)
+ {
+ color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
+ document.write('<td bgcolor="#' + color + '">');
+ document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;" onmouseover="helpline(\'s\');" onmouseout="helpline(\'tip\');"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
+ document.writeln('</td>');
+ }
+
+ if (dir == 'v')
+ {
+ document.writeln('</tr>');
+ }
+ }
+
+ if (dir == 'h')
+ {
+ document.writeln('</tr>');
+ }
+ }
+ document.writeln('</table>');
+}
+
+
+/**
+* Caret Position object
+*/
+function caretPosition()
+{
+ var start = null;
+ var end = null;
+}
+
+
+/**
+* Get the caret position in an textarea
+*/
+function getCaretPosition(txtarea)
+{
+ var caretPos = new caretPosition();
+
+ // simple Gecko/Opera way
+ if (txtarea.selectionStart || txtarea.selectionStart == 0)
+ {
+ caretPos.start = txtarea.selectionStart;
+ caretPos.end = txtarea.selectionEnd;
+ }
+ // dirty and slow IE way
+ else if (document.selection)
+ {
+ // get current selection
+ var range = document.selection.createRange();
+
+ // a new selection of the whole textarea
+ var range_all = document.body.createTextRange();
+ range_all.moveToElementText(txtarea);
+
+ // calculate selection start point by moving beginning of range_all to beginning of range
+ var sel_start;
+ for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++)
+ {
+ range_all.moveStart('character', 1);
+ }
+
+ txtarea.sel_start = sel_start;
+
+ // we ignore the end value for IE, this is already dirty enough and we don't need it
+ caretPos.start = txtarea.sel_start;
+ caretPos.end = txtarea.sel_start;
+ }
+
+ return caretPos;
+} \ No newline at end of file
diff --git a/phpBB/adm/style/install_convert.html b/phpBB/adm/style/install_convert.html
new file mode 100644
index 0000000000..783e89d6bf
--- /dev/null
+++ b/phpBB/adm/style/install_convert.html
@@ -0,0 +1,134 @@
+<!-- INCLUDE install_header.html -->
+
+<!-- IF S_NOT_INSTALLED -->
+
+ <h1>{TITLE}</h1>
+
+ <p>{BODY}</p>
+
+<!-- ELSE -->
+
+ <form id="install_convert" method="post" action="{U_ACTION}">
+
+ <h1>{TITLE}</h1>
+
+ <p>{BODY}</p>
+
+ <!-- IF S_ERROR_BOX -->
+ <div class="errorbox">
+ <h3>{ERROR_TITLE}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF S_LIST -->
+ <table cellspacing="1">
+ <caption>{L_AVAILABLE_CONVERTORS}</caption>
+ <col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
+ <thead>
+ <tr>
+ <th>{L_SOFTWARE}</th>
+ <th>{L_VERSION}</th>
+ <th>{L_AUTHOR}</th>
+ <th>{L_OPTIONS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- IF .convertors -->
+ <!-- BEGIN convertors -->
+ <tr>
+ <td>{convertors.SOFTWARE}</td>
+ <td>{convertors.VERSION}</td>
+ <td>{convertors.AUTHOR}</td>
+ <td><a href="{convertors.U_CONVERT}">{L_CONVERT}</a></td>
+ </tr>
+ <!-- END convertors -->
+ <!-- ELSE -->
+ <tr>
+ <td>{L_NO_CONVERTORS}</td>
+ <td>-</td>
+ <td>-</td>
+ <td>-</td>
+ </tr>
+ <!-- ENDIF -->
+ </tbody>
+ </table>
+ <!-- ENDIF -->
+
+ <!-- IF S_CONTINUE -->
+ </form>
+
+ <fieldset class="submit-buttons">
+ <form method="post" action="{U_NEW_ACTION}">
+ <input class="button1" type="submit" name="submit_new" value="{L_NEW}" />
+ </form>
+ <br />
+ <form method="post" action="{U_CONTINUE_ACTION}">
+ <input class="button1" type="submit" name="submit_cont" value="{L_CONTINUE}" />
+ </form>
+ </fieldset>
+
+ <form method="post" action="{U_ACTION}">
+ <!-- ENDIF -->
+
+ <!-- IF .checks -->
+ <fieldset>
+
+ <!-- BEGIN checks -->
+ <!-- IF checks.S_LEGEND -->
+ <!-- IF not checks.S_FIRST_ROW -->
+ </fieldset>
+
+ <fieldset>
+ <!-- ENDIF -->
+ <legend>{checks.LEGEND}</legend>
+ <!-- IF checks.LEGEND_EXPLAIN --><p>{checks.LEGEND_EXPLAIN}</p><!-- ENDIF -->
+ <!-- ELSE -->
+
+ <dl>
+ <dt><label>{checks.TITLE}:</label><!-- IF checks.S_EXPLAIN --><br /><span class="explain">{checks.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dd>{checks.RESULT}</dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- END checks -->
+
+ </fieldset>
+ <!-- ENDIF -->
+
+ <!-- IF .options -->
+ <fieldset>
+
+ <!-- BEGIN options -->
+ <!-- IF options.S_LEGEND -->
+ <!-- IF not options.S_FIRST_ROW -->
+ </fieldset>
+
+ <fieldset>
+ <!-- ENDIF -->
+ <legend>{options.LEGEND}</legend>
+ <!-- ELSE -->
+
+ <dl>
+ <dt><label for="{options.KEY}">{options.TITLE}:</label><!-- IF options.S_EXPLAIN --><br /><span class="explain">{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dd>{options.CONTENT}</dd>
+ </dl>
+
+ <!-- ENDIF -->
+ <!-- END options -->
+
+ </fieldset>
+ <!-- ENDIF -->
+
+ <!-- IF L_SUBMIT -->
+ <!-- IF L_MESSAGE --><p>{L_MESSAGE}</p><!-- ENDIF -->
+
+ <fieldset class="submit-buttons">
+ {S_HIDDEN}
+ <!-- IF L_SUBMIT --><input class="button1<!-- IF S_REFRESH --> disabled<!-- ENDIF -->" type="submit" id="submit" <!-- IF S_REFRESH -->disabled="disabled" <!-- ELSE --> onclick="this.className = 'button1 disabled';" onsubmit="this.disabled = 'disabled';" <!-- ENDIF -->name="submit" value="{L_SUBMIT}" /><!-- ENDIF -->
+ </fieldset>
+ <!-- ENDIF -->
+
+ </form>
+<!-- ENDIF -->
+
+<!-- INCLUDE install_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/install_error.html b/phpBB/adm/style/install_error.html
new file mode 100644
index 0000000000..ad53433207
--- /dev/null
+++ b/phpBB/adm/style/install_error.html
@@ -0,0 +1,8 @@
+<!-- INCLUDE install_header.html -->
+
+<div class="errorbox">
+ <h3>{MESSAGE_TITLE}</h3>
+ <p>{MESSAGE_TEXT}</p>
+</div>
+
+<!-- INCLUDE install_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/install_footer.html b/phpBB/adm/style/install_footer.html
new file mode 100644
index 0000000000..4df43eaaa0
--- /dev/null
+++ b/phpBB/adm/style/install_footer.html
@@ -0,0 +1,27 @@
+
+ </div>
+ </div>
+ <span class="corners-bottom"><span></span></span>
+ <div class="clear"></div>
+ </div>
+ </div>
+ </div>
+
+ <!--
+ We request you retain the full copyright notice below including the link to www.phpbb.com.
+ This not only gives respect to the large amount of time given freely by the developers
+ but also helps build interest, traffic and use of phpBB. If you (honestly) cannot retain
+ the full copyright we ask you at least leave in place the "Powered by phpBB" line, with
+ "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our
+ forums may be affected.
+
+ The phpBB Group : 2006
+ // -->
+
+ <div id="page-footer">
+ Powered by phpBB &copy; 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>
+ </div>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/phpBB/adm/style/install_header.html b/phpBB/adm/style/install_header.html
new file mode 100644
index 0000000000..fbb6a7b409
--- /dev/null
+++ b/phpBB/adm/style/install_header.html
@@ -0,0 +1,81 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<meta http-equiv="Content-Language" content="{S_USER_LANG}" />
+<meta http-equiv="imagetoolbar" content="no" />
+<!-- IF META -->{META}<!-- ENDIF -->
+<title>{PAGE_TITLE}</title>
+
+<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+
+<script type="text/javascript">
+// <![CDATA[
+
+/**
+* Set display of page element
+* s[-1,0,1] = hide,toggle display,show
+*/
+function dE(n, s, type)
+{
+ if (!type)
+ {
+ type = 'block';
+ }
+
+ var e = document.getElementById(n);
+ if (!s)
+ {
+ s = (e.style.display == '' || e.style.display == 'block') ? -1 : 1;
+ }
+ e.style.display = (s == 1) ? type : 'none';
+}
+
+// ]]>
+</script>
+
+</head>
+
+<body class="{S_CONTENT_DIRECTION}">
+<div id="wrap">
+ <div id="page-header">
+ <h1>{L_INSTALL_PANEL}</h1>
+ <p id="skip"><a href="#acp">{L_SKIP}</a></p>
+ <!-- IF S_LANG_SELECT -->
+ <form method="post" action="">
+ <fieldset class="nobg">
+ <label for="language">{L_SELECT_LANG}:</label>
+ {S_LANG_SELECT}
+ <input class="button1" type="submit" id="change_lang" name="change_lang" value="{L_CHANGE}" />
+ </fieldset>
+ </form>
+ <!-- ENDIF -->
+ </div>
+
+ <div id="page-body">
+ <div id="tabs">
+ <ul>
+ <!-- BEGIN t_block1 -->
+ <li<!-- IF t_block1.S_SELECTED --> id="activetab"<!-- ENDIF -->><a href="{t_block1.U_TITLE}"><span>{t_block1.L_TITLE}</span></a></li>
+ <!-- END t_block1 -->
+ </ul>
+ </div>
+
+ <div id="acp">
+ <div class="panel">
+ <span class="corners-top"><span></span></span>
+ <div id="content">
+ <div id="menu">
+ <ul>
+ <!-- BEGIN l_block1 -->
+ <li<!-- IF l_block1.S_SELECTED --> id="activemenu"<!-- ENDIF -->><a href="{l_block1.U_TITLE}"><span>{l_block1.L_TITLE}</span></a></li>
+ <!-- END l_block1 -->
+ <!-- BEGIN l_block2 -->
+ <li<!-- IF l_block2.S_SELECTED --> id="activemenu"<!-- ENDIF -->><span<!-- IF l_block2.S_COMPLETE --> class="completed"<!-- ENDIF -->>{l_block2.L_TITLE}</span></li>
+ <!-- END l_block2 -->
+ </ul>
+ </div>
+
+ <div id="main" class="install-body">
diff --git a/phpBB/adm/style/install_install.html b/phpBB/adm/style/install_install.html
new file mode 100644
index 0000000000..79006fba69
--- /dev/null
+++ b/phpBB/adm/style/install_install.html
@@ -0,0 +1,77 @@
+<!-- INCLUDE install_header.html -->
+
+<form id="install_install" method="post" action="{U_ACTION}" onsubmit="submit.disabled = 'disabled';">
+
+<!-- IF TITLE --><h1>{TITLE}</h1><!-- ENDIF -->
+<!-- IF BODY --><p>{BODY}</p><!-- ENDIF -->
+
+<!-- IF .checks -->
+ <fieldset>
+
+ <!-- BEGIN checks -->
+ <!-- IF checks.S_LEGEND -->
+ <!-- IF not checks.S_FIRST_ROW -->
+ </fieldset>
+
+ <fieldset>
+ <!-- ENDIF -->
+ <legend>{checks.LEGEND}</legend>
+ <!-- IF checks.LEGEND_EXPLAIN --><p>{checks.LEGEND_EXPLAIN}</p><!-- ENDIF -->
+ <!-- ELSE -->
+
+ <dl>
+ <dt>{checks.TITLE}:<!-- IF checks.S_EXPLAIN --><br /><span class="explain">{checks.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dd>{checks.RESULT}</dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- END checks -->
+
+ </fieldset>
+<!-- ENDIF -->
+
+<!-- IF .options -->
+ <fieldset>
+
+ <!-- BEGIN options -->
+ <!-- IF options.S_LEGEND -->
+ <!-- IF not options.S_FIRST_ROW -->
+ </fieldset>
+
+ <fieldset>
+ <!-- ENDIF -->
+ <legend>{options.LEGEND}</legend>
+ <!-- ELSE -->
+
+ <dl>
+ <dt><label for="{options.KEY}">{options.TITLE}:</label><!-- IF options.S_EXPLAIN --><br /><span class="explain">{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dd>{options.CONTENT}</dd>
+ </dl>
+
+ <!-- ENDIF -->
+ <!-- END options -->
+
+ </fieldset>
+<!-- ENDIF -->
+
+<!-- IF S_SHOW_DOWNLOAD -->
+ <h1>{L_DL_CONFIG}</h1>
+ <p>{L_DL_CONFIG_EXPLAIN}</p>
+
+ <fieldset class="submit-buttons">
+ <legend>{L_DL_CONFIG}</legend>
+ {S_HIDDEN}
+ <input class="button1" type="submit" id="dlconfig" name="dlconfig" value="{L_DL_DOWNLOAD}" />&nbsp;<input class="button1" type="submit" id="dldone" name="dldone" value="{L_DL_DONE}" />
+ </fieldset>
+<!-- ENDIF -->
+
+<!-- IF L_SUBMIT -->
+ <fieldset class="submit-buttons">
+ <legend>{L_SUBMIT}</legend>
+ {S_HIDDEN}
+ <!-- IF L_SUBMIT --><input class="button1" type="submit" id="submit" onclick="this.className = 'button1 disabled';" name="submit" value="{L_SUBMIT}" /><!-- ENDIF -->
+ </fieldset>
+<!-- ENDIF -->
+
+</form>
+
+<!-- INCLUDE install_footer.html -->
diff --git a/phpBB/adm/style/install_main.html b/phpBB/adm/style/install_main.html
new file mode 100644
index 0000000000..2c318bfd65
--- /dev/null
+++ b/phpBB/adm/style/install_main.html
@@ -0,0 +1,6 @@
+<!-- INCLUDE install_header.html -->
+
+ <h1>{TITLE}</h1>
+ <p>{BODY}</p>
+
+<!-- INCLUDE install_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/install_update.html b/phpBB/adm/style/install_update.html
new file mode 100644
index 0000000000..4b89537acb
--- /dev/null
+++ b/phpBB/adm/style/install_update.html
@@ -0,0 +1,475 @@
+<!-- INCLUDE install_header.html -->
+
+<script type="text/javascript">
+// <![CDATA[
+ function popup(url, width, height, name)
+ {
+ if (!name)
+ {
+ name = '_popup';
+ }
+
+ window.open(url.replace(/&amp;/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes, width=' + width);
+ return false;
+ }
+
+ function diff_popup(url)
+ {
+ popup(url, 950, 600, '_diff');
+ return false;
+ }
+// ]]>
+</script>
+
+<!-- IF S_ERROR -->
+ <div class="errorbox" style="margin-top: 0;">
+ <h3>{L_NOTICE}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+<!-- ENDIF -->
+
+<!-- IF S_IN_PROGRESS -->
+
+ <div class="successbox" style="margin-top: 0;">
+ <h3>{L_IN_PROGRESS}</h3>
+ <p>{L_IN_PROGRESS_EXPLAIN}</p>
+ </div>
+
+<!-- ELSEIF S_INTRO -->
+
+ <!-- IF S_WARNING -->
+ <div class="successbox" style="margin-top: 0;">
+ <h3>{L_NOTICE}</h3>
+ <p>{WARNING_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <form id="install_update" method="post" action="{U_ACTION}">
+
+ <h1>{L_UPDATE_INSTALLATION}</h1>
+ <p>{L_UPDATE_INSTALLATION_EXPLAIN}</p>
+
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" name="submit" value="{L_NEXT_STEP}" />
+ </fieldset>
+
+ </form>
+
+<!-- ELSEIF S_UPLOAD_SUCCESS -->
+
+ <form id="install_update" method="post" action="{U_ACTION}">
+
+ <h1>{L_UPDATE_SUCCESS}</h1>
+ <p>{L_UPDATE_SUCCESS_EXPLAIN}</p>
+
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" name="check_again" value="{L_CONTINUE_UPDATE}" />
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- IF S_VERSION_CHECK -->
+
+ <h1>{L_VERSION_CHECK}</h1>
+
+ <p>{L_VERSION_CHECK_EXPLAIN}</p>
+
+ <!-- IF S_UP_TO_DATE -->
+ <div class="successbox">
+ <p>{L_VERSION_UP_TO_DATE}</p>
+ </div>
+ <!-- ELSE -->
+ <div class="errorbox">
+ <p>{L_VERSION_NOT_UP_TO_DATE}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <fieldset>
+ <legend></legend>
+ <dl>
+ <dt><label>{L_CURRENT_VERSION}</label></dt>
+ <dd><strong>{CURRENT_VERSION}</strong></dd>
+ </dl>
+ <dl>
+ <dt><label>{L_LATEST_VERSION}</label></dt>
+ <dd><strong>{LATEST_VERSION}</strong></dd>
+ </dl>
+ <!-- IF PACKAGE_VERSION and not S_UP_TO_DATE -->
+ <dl>
+ <dt><label>{L_PACKAGE_UPDATES_TO}</label></dt>
+ <dd><strong>{PACKAGE_VERSION}</strong></dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+
+ <!-- IF not S_UP_TO_DATE -->
+
+ <form id="install_dbupdate" method="post" action="{U_DB_UPDATE_ACTION}">
+
+ <fieldset class="submit-buttons">
+ <p>{L_UPDATE_DATABASE_EXPLAIN}</p>
+ <input class="button1" type="submit" name="db_update" value="{L_UPDATE_DATABASE}" />
+ </fieldset>
+
+ </form>
+
+ <!-- ELSE -->
+ <form id="install_update" method="post" action="{U_ACTION}">
+
+ <fieldset class="submit-buttons">
+ <p>{L_CHECK_FILES_UP_TO_DATE}</p>
+ <input class="button1" type="submit" name="submit" value="{L_CHECK_FILES}" />
+ </fieldset>
+
+ </form>
+ <!-- ENDIF -->
+
+<!-- ELSEIF S_DB_UPDATE -->
+
+ <!-- IF not S_DB_UPDATE_FINISHED -->
+
+ <h1>{L_PERFORM_DATABASE_UPDATE}</h1>
+
+ <p>
+ {L_PERFORM_DATABASE_UPDATE_EXPLAIN}<br />
+ </p>
+
+ <br /><br />
+
+ <form id="install_dbupdate" method="post" action="{U_DB_UPDATE_ACTION}">
+
+ <fieldset class="submit-buttons">
+ <a href="{U_DB_UPDATE}" class="button1">{L_RUN_DATABASE_SCRIPT}</a>
+
+ <!-- input class="button1" type="submit" name="db_update" value="{L_CHECK_UPDATE_DATABASE}" / -->
+ </fieldset>
+
+ </form>
+
+ <!-- ELSE -->
+
+ <h1>{L_UPDATE_DB_SUCCESS}</h1>
+
+ <br /><br />
+
+ <form id="install_update" method="post" action="{U_ACTION}">
+
+ <fieldset class="submit-buttons">
+ <p>{L_CHECK_FILES_EXPLAIN}</p>
+ <input class="button1" type="submit" name="submit" value="{L_CHECK_FILES}" />
+ </fieldset>
+
+ </form>
+
+ <!-- ENDIF -->
+
+<!-- ELSEIF S_FILE_CHECK -->
+
+ <!-- IF S_ALL_UP_TO_DATE -->
+
+ <div class="successbox">
+ <h3>{L_UPDATE_SUCCESS}</h3>
+ <p>{L_ALL_FILES_UP_TO_DATE}</p>
+ </div>
+
+ <!-- ELSE -->
+ <h1>{L_COLLECTED_INFORMATION}</h1>
+
+ <p>{L_COLLECTED_INFORMATION_EXPLAIN}</p>
+
+ <!-- IF S_NO_UPDATE_FILES -->
+ <div class="errorbox">
+ <h3>{L_NO_UPDATE_FILES}</h3>
+
+ <p>{L_NO_UPDATE_FILES_EXPLAIN}</p><br />
+
+ <strong>{NO_UPDATE_FILES}</strong>
+
+ </div>
+ <!-- ENDIF -->
+
+ <form id="install_update" method="post" action="{U_UPDATE_ACTION}">
+
+ <!-- IF .up_to_date -->
+ <h2>{L_FILES_UP_TO_DATE}</h2>
+ <p>{L_FILES_UP_TO_DATE_EXPLAIN}</p>
+
+ <fieldset>
+ <legend><img src="{T_IMAGE_PATH}file_up_to_date.gif" alt="{L_STATUS_UP_TO_DATE}" /></legend>
+ <!-- BEGIN up_to_date -->
+ <dl>
+ <dd class="full" style="text-align: left;"><strong>{up_to_date.FILENAME}</strong></dd>
+ </dl>
+ <!-- END up_to_date -->
+ </fieldset>
+
+ <!-- ENDIF -->
+
+ <!-- IF .new -->
+ <h2>{L_FILES_NEW}</h2>
+ <p>{L_FILES_NEW_EXPLAIN}</p>
+
+ <fieldset>
+ <legend><img src="{T_IMAGE_PATH}file_new.gif" alt="{L_STATUS_NEW}" /></legend>
+ <!-- BEGIN new -->
+ <dl>
+ <dt style="width: 60%;"><strong><!-- IF new.DIR_PART -->{new.DIR_PART}<br /><!-- ENDIF -->{new.FILE_PART}</strong>
+ <!-- IF new.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{new.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ </dt>
+ <dd style="margin-left: 60%;">
+ <!-- IF not new.S_BINARY -->[<a href="{new.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{new.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
+ </dd>
+ <!-- IF new.S_CUSTOM -->
+ <dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{new.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- END new -->
+ </fieldset>
+
+ <!-- ENDIF -->
+
+ <!-- IF .not_modified -->
+ <h2>{L_FILES_NOT_MODIFIED}</h2>
+ <div style="float: {S_CONTENT_FLOW_END};">&raquo; <a href="#" onclick="dE('not_modified', 0); return false;">{L_TOGGLE_DISPLAY}</a></div>
+ <p>{L_FILES_NOT_MODIFIED_EXPLAIN}</p>
+
+ <fieldset id="not_modified" style="display: none;">
+ <legend><img src="{T_IMAGE_PATH}file_not_modified.gif" alt="{L_STATUS_NOT_MODIFIED}" /></legend>
+ <!-- BEGIN not_modified -->
+ <dl>
+ <dt style="width: 60%;"><strong><!-- IF not_modified.DIR_PART -->{not_modified.DIR_PART}<br /><!-- ENDIF -->{not_modified.FILE_PART}</strong>
+ <!-- IF not_modified.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{not_modified.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ </dt>
+ <dd style="margin-left: 60%;"><!-- IF not not_modified.S_BINARY -->[<a href="{not_modified.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{not_modified.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
+ <!-- IF not_modified.S_CUSTOM -->
+ <dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{not_modified.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- END not_modified -->
+ </fieldset>
+
+ <!-- ENDIF -->
+
+ <!-- IF .modified -->
+ <h2>{L_FILES_MODIFIED}</h2>
+ <p>{L_FILES_MODIFIED_EXPLAIN}</p>
+
+ <!-- BEGIN modified -->
+ <fieldset>
+ <legend><img src="{T_IMAGE_PATH}file_modified.gif" alt="{L_STATUS_MODIFIED}" /></legend>
+ <dl>
+ <dt style="width: 60%;"><strong><!-- IF modified.DIR_PART -->{modified.DIR_PART}<br /><!-- ENDIF -->{modified.FILE_PART}</strong>
+ <!-- IF modified.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{modified.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ </dt>
+ <dd style="margin-left: 60%;">&nbsp;</dd>
+ <!-- IF modified.S_CUSTOM -->
+ <dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{modified.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <!-- ENDIF -->
+ </dl>
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{modified.FILENAME}]" value="0" checked="checked" /> {L_MERGE_MODIFICATIONS_OPTION}</label></dt>
+ <dd style="margin-left: 60%;"><!-- IF not modified.S_BINARY -->[<a href="{modified.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{modified.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
+ </dl>
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{modified.FILENAME}]" value="1" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
+ <dd style="margin-left: 60%;"><!-- IF not modified.S_BINARY -->[<a href="{modified.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
+ </dl>
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{modified.FILENAME}]" value="2" /> {L_MERGE_NO_MERGE_MOD_OPTION}</label></dt>
+ <dd style="margin-left: 60%;"><!-- IF not modified.S_BINARY -->[<a href="{modified.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
+ </dl>
+ </fieldset>
+ <!-- END modified -->
+
+ <!-- ENDIF -->
+
+ <!-- IF .new_conflict -->
+ <h2>{L_FILES_NEW_CONFLICT}</h2>
+ <p>{L_FILES_NEW_CONFLICT_EXPLAIN}</p>
+
+ <fieldset>
+ <legend><img src="{T_IMAGE_PATH}file_new_conflict.gif" alt="{L_STATUS_NEW_CONFLICT}" /></legend>
+ <!-- BEGIN new_conflict -->
+ <dl>
+ <dt style="width: 60%;"><strong><!-- IF new_conflict.DIR_PART -->{new_conflict.DIR_PART}<br /><!-- ENDIF -->{new_conflict.FILE_PART}</strong>
+ <!-- IF new_conflict.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{new_conflict.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ </dt>
+ <dd style="margin-left: 60%;">
+ <!-- IF not new_conflict.S_BINARY -->[<a href="{new_conflict.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{new_conflict.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
+ </dd>
+ <!-- IF new_conflict.S_CUSTOM -->
+ <dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{new_conflict.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- END new_conflict -->
+ </fieldset>
+
+ <!-- ENDIF -->
+
+ <!-- IF .conflict -->
+ <h2>{L_FILES_CONFLICT}</h2>
+ <p>{L_FILES_CONFLICT_EXPLAIN}</p>
+
+ <!-- BEGIN conflict -->
+ <fieldset>
+ <legend><img src="{T_IMAGE_PATH}file_conflict.gif" alt="{L_STATUS_CONFLICT}" /></legend>
+ <dl>
+ <dt style="width: 60%;"><strong><!-- IF conflict.DIR_PART -->{conflict.DIR_PART}<br /><!-- ENDIF -->{conflict.FILE_PART}</strong>
+ <!-- IF conflict.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{conflict.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ <!-- IF conflict.NUM_CONFLICTS --><br /><span>{L_NUM_CONFLICTS}: {conflict.NUM_CONFLICTS}</span><!-- ENDIF -->
+ </dt>
+ <dd style="margin-left: 60%;">
+ <!-- IF not conflict.S_BINARY -->[<a href="{conflict.U_SHOW_DIFF}">{L_DOWNLOAD_CONFLICTS}</a>]<br />{L_DOWNLOAD_CONFLICTS_EXPLAIN}
+ <!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
+ </dd>
+ <!-- IF conflict.S_CUSTOM -->
+ <dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{conflict.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- IF conflict.S_BINARY -->
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="1" checked="checked" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
+ <dd style="margin-left: 60%;">&nbsp;</dd>
+ </dl>
+ <!-- ELSE -->
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="3" checked="checked" /> {L_MERGE_NEW_FILE_OPTION}</label></dt>
+ <dd style="margin-left: 60%;">[<a href="{conflict.U_VIEW_NEW_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_MODIFIED}</a>]</dd>
+ </dl>
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="4" /> {L_MERGE_MOD_FILE_OPTION}</label></dt>
+ <dd style="margin-left: 60%;">[<a href="{conflict.U_VIEW_MOD_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_MODIFIED}</a>]</dd>
+ </dl>
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="1" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
+ <dd style="margin-left: 60%;">[<a href="{conflict.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
+ </dl>
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="2" /> {L_MERGE_NO_MERGE_MOD_OPTION}</label></dt>
+ <dd style="margin-left: 60%;">[<a href="{conflict.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+ <!-- END conflict -->
+
+ <!-- ENDIF -->
+
+ <br />
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" name="check_again" value="{L_CHECK_FILES_AGAIN}" />
+ </fieldset>
+
+ <br />
+
+ <h1>{L_UPDATE_METHOD}</h1>
+
+ <p>{L_UPDATE_METHOD_EXPLAIN}</p>
+
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" name="ftp_upload" value="{L_FTP_UPDATE_METHOD}" />&nbsp; &nbsp;<input class="button1" type="submit" name="download" value="{L_DOWNLOAD_UPDATE_METHOD_BUTTON}" />
+ </fieldset>
+
+ </form>
+
+ <!-- ENDIF -->
+
+<!-- ELSEIF S_DOWNLOAD_FILES -->
+
+ <h1>{L_DOWNLOAD_UPDATE_METHOD}</h1>
+
+ <p>{L_DOWNLOAD_UPDATE_METHOD_EXPLAIN}</p>
+
+ <form id="install_update" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_SELECT_DOWNLOAD_FORMAT}</legend>
+ <dl>
+ <dt><label for="use_method">{L_DOWNLOAD_AS}:</label></dt>
+ <dd>{RADIO_BUTTONS}</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}
+ <input type="submit" class="button2" value="{L_CONTINUE_UPDATE}" name="check_again" />&nbsp; &nbsp;<input type="submit" class="button1" value="{L_DOWNLOAD}" name="download" />
+ </fieldset>
+
+ </form>
+
+ <br /><br />
+
+ <p>{L_MAPPING_FILE_STRUCTURE}</p>
+
+ <table cellspacing="1">
+ <col class="row1" /><col class="row2" /><col class="row1" />
+ <thead>
+ <tr>
+ <th style="width: 49%">{L_ARCHIVE_FILE}</th>
+ <th style="width: 2%">&nbsp;</th>
+ <th style="width: 49%">{L_DESTINATION}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN location -->
+ <tr>
+ <td>{location.SOURCE}</td>
+ <td><strong>&raquo;</strong></td>
+ <td>{location.DESTINATION}</td>
+ </tr>
+ <!-- END location -->
+ </tbody>
+ </table>
+
+<!-- ELSEIF S_FTP_UPLOAD -->
+
+ <h1>{L_SELECT_FTP_SETTINGS}</h1>
+
+ <form id="install_update" method="post" action="{U_ACTION}">
+
+ <!-- IF S_CONNECTION_SUCCESS -->
+ <div class="successbox">
+ <p>{L_CONNECTION_SUCCESS}</p>
+ </div>
+ <!-- ELSEIF S_CONNECTION_FAILED -->
+ <div class="successbox">
+ <p>{L_TRY_DOWNLOAD_METHOD}</p>
+
+ <fieldset class="quick">
+ <input class="button1" type="submit" name="download" value="{L_TRY_DOWNLOAD_METHOD_BUTTON}" />
+ </fieldset>
+ </div>
+
+ <div class="errorbox">
+ <p>{L_CONNECTION_FAILED}<br />{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <fieldset>
+ <legend>{L_FTP_SETTINGS}</legend>
+ <dl>
+ <dt><label>{L_UPLOAD_METHOD}:</label></dt>
+ <dd><strong>{UPLOAD_METHOD}</strong></dd>
+ </dl>
+ <!-- BEGIN data -->
+ <dl>
+ <dt><label for="{data.DATA}">{data.NAME}:</label><br /><span>{data.EXPLAIN}</span></dt>
+ <dd><input type="<!-- IF data.DATA == 'password' -->password<!-- ELSE -->text<!-- ENDIF -->" id="{data.DATA}" name="{data.DATA}" value="{data.DEFAULT}" /></dd>
+ </dl>
+ <!-- END data -->
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}
+ <input class="button2" type="submit" name="check_again" value="{L_BACK}" />
+ <input class="button1" type="submit" name="test_connection" value="{L_TEST_CONNECTION}" />
+ <input class="button1" type="submit" name="submit" value="{L_UPDATE_FILES}" />
+ </fieldset>
+
+ </form>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE install_footer.html -->
diff --git a/phpBB/adm/style/install_update_diff.html b/phpBB/adm/style/install_update_diff.html
new file mode 100644
index 0000000000..b65a014312
--- /dev/null
+++ b/phpBB/adm/style/install_update_diff.html
@@ -0,0 +1,262 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<meta http-equiv="Content-Language" content="{S_USER_LANG}" />
+<meta http-equiv="imagetoolbar" content="no" />
+<!-- IF META -->{META}<!-- ENDIF -->
+<title>{PAGE_TITLE}</title>
+
+<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+
+<script type="text/javascript">
+// <![CDATA[
+function resize_panel()
+{
+ var block = document.getElementById('codepanel');
+ var height;
+
+ if (window.innerHeight)
+ {
+ height = window.innerHeight - 150;
+ block.style.height = height + 'px';
+ }
+ else
+ {
+ //whatever IE needs to do this
+ }
+}
+
+window.onresize = resize_panel;
+
+// ]]>
+</script>
+
+<style type="text/css">
+/* <![CDATA[ */
+
+#main {
+ font-size: 1em;
+ line-height: 0.7em;
+ margin: 0;
+ padding: 0;
+ width: 99%;
+}
+
+#diff_content {
+ padding: 30px 10px 10px;
+}
+
+<!-- IF DIFF_MODE neq 'side_by_side' and DIFF_MODE neq 'raw' -->
+div#codepanel {
+ width: 100%;
+}
+<!-- ELSE -->
+div#codepanel {
+ background-color: #eee;
+}
+<!-- ENDIF -->
+
+<!-- IF DIFF_MODE neq 'unified' and DIFF_MODE neq 'side_by_side' -->
+div#diff_content pre {
+ overflow: auto;
+ height: 414px;
+ width: 100% !important;
+}
+<!-- ENDIF -->
+
+<!-- IF not S_DIFF_NEW_FILE -->
+/**
+* Unified Diff
+*/
+.file {
+ line-height: .7em;
+ overflow: auto;
+ height: 414px;
+}
+
+.diff {
+ margin: 0;
+}
+
+.added {
+ background-color: #dfd;
+}
+
+.removed {
+ background-color: #fdd;
+}
+
+.info {
+ color: #888;
+}
+
+.context {
+ background-color: #eee;
+}
+
+/**
+* Inline Diff
+*/
+.ins {
+ background-color: #dfd;
+ text-decoration: underline;
+}
+
+.del {
+ background-color: #fdd;
+ text-decoration: line-through;
+}
+
+/**
+* Column Diff
+*/
+table.hrdiff {
+ margin: 0 0 8px 5px;
+ width: 100%;
+ overflow: hidden;
+ border-bottom: 1px solid #999;
+ table-layout: fixed;
+}
+
+table.hrdiff th {
+ text-align: left;
+ width: 50%;
+ color: #333;
+ font-family: Verdana,Helvetica,sans-serif;
+ font-size: 11px;
+ border-bottom: 1px solid #999;
+ background: transparent;
+}
+
+table.hrdiff thead th {
+ font-weight: bold;
+ font-size: 110%;
+ padding: 2px;
+}
+
+table.hrdiff tr:first-child th {
+ border-top: none;
+}
+
+table.hrdiff tbody th {
+ padding: 2em 1px 1px 1px;
+ font-size: 80%;
+ border-top: 1px solid #999;
+}
+
+table.hrdiff tbody td.old {
+ border-left: 1px solid #999;
+ border-right: 1px solid #999;
+}
+table.hrdiff tbody td.new {
+ border-right: 1px solid #999;
+}
+
+table.hrdiff td pre {
+ overflow: auto;
+ display: block;
+ width: 100%;
+ overflow: auto;
+ display: block;
+}
+
+table.hrdiff .unmodified {
+ background: #fff;
+}
+
+table.hrdiff .added {
+ background: #9f9;
+}
+
+table.hrdiff .added_empty {
+ background: #cfc;
+}
+
+table.hrdiff .modified {
+ background: #fd9;
+}
+
+table.hrdiff .removed {
+ background: #f99;
+}
+
+table.hrdiff .removed_empty {
+ background: #fcc;
+}
+
+table.hrdiff caption {
+ caption-side: top;
+ text-align: left;
+ margin: 0 0 8px 5px;
+ font-size: 90%;
+ font-weight: bold;
+ padding: 5px;
+}
+
+table.hrdiff caption span {
+ height: 10px;
+ width: 10px;
+ line-height: 10px;
+ letter-spacing: 10px;
+ border: 1px solid #000;
+ margin-left: 0.5em;
+ vertical-align: baseline;
+}
+
+<!-- ENDIF -->
+
+/* ]]> */
+</style>
+
+</head>
+
+<!-- IF DIFF_MODE neq 'side_by_side' and DIFF_MODE neq 'raw' -->
+<body onload="resize_panel();">
+<!-- ELSE -->
+<body>
+<!-- ENDIF -->
+
+<div id="wrap">
+ <div id="page-header">
+<!-- IF S_DIFF_NEW_FILE -->
+
+ <h1>{L_VIEWING_FILE_CONTENTS}</h1>
+<!-- ELSE -->
+ <h1>{L_VIEWING_FILE_DIFF}</h1>
+<!-- ENDIF -->
+<!-- IF not S_DIFF_NEW_FILE -->
+ <p id="skip"><a href="#acp">{L_SKIP}</a></p>
+ <form method="post" action="">
+ <fieldset class="quick">
+ <label for="diff_mode">{L_SELECT_DIFF_MODE}:</label>
+ <select name="diff_mode" id="diff_mode">{S_DIFF_MODE_OPTIONS}</select>
+
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_CHANGE}" />
+ </fieldset>
+ </form>
+<!-- ENDIF -->
+<!-- IF S_DIFF_CONFLICT_FILE -->
+ <div style="float: {S_CONTENT_FLOW_BEGIN};"><strong>{L_NUM_CONFLICTS}: {NUM_CONFLICTS}</strong></div>
+ <br style="clear: both;" />
+<!-- ENDIF -->
+ </div>
+
+ <div id="page-body">
+ <div id="acp">
+ <div class="panel" id="codepanel">
+ <span class="corners-top"><span></span></span>
+ <div id="diff_content">
+ <div id="main">
+ {DIFF_CONTENT}
+ </div>
+ </div>
+ <span class="corners-bottom"><span></span></span>
+ </div>
+ </div>
+ </div>
+
+
+<!-- INCLUDE simple_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/message_body.html b/phpBB/adm/style/message_body.html
new file mode 100644
index 0000000000..5d907e911c
--- /dev/null
+++ b/phpBB/adm/style/message_body.html
@@ -0,0 +1,8 @@
+<!-- INCLUDE overall_header.html -->
+
+<div <!-- IF S_USER_NOTICE -->class="successbox"<!-- ELSE -->class="errorbox"<!-- ENDIF -->>
+ <h3>{MESSAGE_TITLE}</h3>
+ <p>{MESSAGE_TEXT}</p>
+</div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html
new file mode 100644
index 0000000000..8af299ad57
--- /dev/null
+++ b/phpBB/adm/style/overall_footer.html
@@ -0,0 +1,35 @@
+
+ </div>
+ </div>
+ <span class="corners-bottom"><span></span></span>
+ <div class="clear"></div>
+ </div>
+ </div>
+ </div>
+
+ <!--
+ We request you retain the full copyright notice below including the link to www.phpbb.com.
+ This not only gives respect to the large amount of time given freely by the developers
+ but also helps build interest, traffic and use of phpBB. If you (honestly) cannot retain
+ the full copyright we ask you at least leave in place the "Powered by phpBB" line, with
+ "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our
+ forums may be affected.
+
+ The phpBB Group : 2006
+ // -->
+
+ <div id="page-footer">
+ <!-- IF S_COPYRIGHT_HTML -->
+ Powered by phpBB &copy; 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>
+ <!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
+ <!-- ENDIF -->
+
+ <!-- IF DEBUG_OUTPUT -->
+ <!-- IF S_COPYRIGHT_HTML --><br /><!-- ENDIF -->
+ {DEBUG_OUTPUT}
+ <!-- ENDIF -->
+ </div>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html
new file mode 100644
index 0000000000..a376884507
--- /dev/null
+++ b/phpBB/adm/style/overall_header.html
@@ -0,0 +1,221 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<meta http-equiv="Content-Language" content="{S_USER_LANG}" />
+<meta http-equiv="imagetoolbar" content="no" />
+<!-- IF META -->{META}<!-- ENDIF -->
+<title>{PAGE_TITLE}</title>
+
+<link href="style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+
+<script type="text/javascript">
+// <![CDATA[
+var jump_page = '{LA_JUMP_PAGE}:';
+var on_page = '{ON_PAGE}';
+var per_page = '{PER_PAGE}';
+var base_url = '{A_BASE_URL}';
+
+var menu_state = 'shown';
+
+
+/**
+* Jump to page
+*/
+function jumpto()
+{
+ var page = prompt(jump_page, on_page);
+
+ if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
+ {
+ if (base_url.indexOf('?') == -1)
+ {
+ document.location.href = base_url + '?start=' + ((page - 1) * per_page);
+ }
+ else
+ {
+ document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + ((page - 1) * per_page);
+ }
+ }
+}
+
+/**
+* Set display of page element
+* s[-1,0,1] = hide,toggle display,show
+*/
+function dE(n, s, type)
+{
+ if (!type)
+ {
+ type = 'block';
+ }
+
+ var e = document.getElementById(n);
+ if (!s)
+ {
+ s = (e.style.display == '') ? -1 : 1;
+ }
+ e.style.display = (s == 1) ? type : 'none';
+}
+
+/**
+* Mark/unmark checkboxes
+* id = ID of parent container, name = name prefix, state = state [true/false]
+*/
+function marklist(id, name, state)
+{
+ var parent = document.getElementById(id);
+ if (!parent)
+ {
+ eval('parent = document.' + id);
+ }
+
+ if (!parent)
+ {
+ return;
+ }
+
+ var rb = parent.getElementsByTagName('input');
+
+ for (var r = 0; r < rb.length; r++)
+ {
+ if (rb[r].name.substr(0, name.length) == name)
+ {
+ rb[r].checked = state;
+ }
+ }
+}
+
+/**
+* Find a member
+*/
+function find_username(url)
+{
+ popup(url, 760, 570, '_usersearch');
+ return false;
+}
+
+/**
+* Window popup
+*/
+function popup(url, width, height, name)
+{
+ if (!name)
+ {
+ name = '_popup';
+ }
+
+ window.open(url.replace(/&amp;/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes, width=' + width);
+ return false;
+}
+
+/**
+* Hiding/Showing the side menu
+*/
+function switch_menu()
+{
+ var menu = document.getElementById('menu');
+ var main = document.getElementById('main');
+ var toggle = document.getElementById('toggle');
+ var handle = document.getElementById('toggle-handle');
+
+ switch (menu_state)
+ {
+ // hide
+ case 'shown':
+ main.style.width = '93%';
+ menu_state = 'hidden';
+ menu.style.display = 'none';
+ toggle.style.width = '20px';
+ handle.style.backgroundImage = 'url(images/toggle.gif)';
+ handle.style.backgroundRepeat = 'no-repeat';
+
+ <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
+ handle.style.backgroundPosition = '0% 50%';
+ toggle.style.left = '96%';
+ <!-- ELSE -->
+ handle.style.backgroundPosition = '100% 50%';
+ toggle.style.left = '0';
+ <!-- ENDIF -->
+ break;
+
+ // show
+ case 'hidden':
+ main.style.width = '76%';
+ menu_state = 'shown';
+ menu.style.display = 'block';
+ toggle.style.width = '5%';
+ handle.style.backgroundImage = 'url(images/toggle.gif)';
+ handle.style.backgroundRepeat = 'no-repeat';
+
+ <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
+ handle.style.backgroundPosition = '100% 50%';
+ toggle.style.left = '75%';
+ <!-- ELSE -->
+ handle.style.backgroundPosition = '0% 50%';
+ toggle.style.left = '15%';
+ <!-- ENDIF -->
+ break;
+ }
+}
+
+// ]]>
+</script>
+</head>
+
+<body class="{S_CONTENT_DIRECTION}">
+
+<div id="wrap">
+ <div id="page-header">
+ <h1>{L_ADMIN_PANEL}</h1>
+ <p><a href="{U_ADM_INDEX}">{L_ADMIN_INDEX}</a> &bull; <a href="{U_INDEX}">{L_FORUM_INDEX}</a></p>
+ <p id="skip"><a href="#acp">{L_SKIP}</a></p>
+ </div>
+
+ <div id="page-body">
+ <div id="tabs">
+ <ul>
+ <!-- BEGIN t_block1 -->
+ <li<!-- IF t_block1.S_SELECTED --> id="activetab"<!-- ENDIF -->><a href="{t_block1.U_TITLE}"><span>{t_block1.L_TITLE}</span></a></li>
+ <!-- END t_block1 -->
+ </ul>
+ </div>
+
+ <div id="acp">
+ <div class="panel">
+ <span class="corners-top"><span></span></span>
+ <div id="content">
+ <!-- IF not S_USER_NOTICE -->
+ <div id="toggle">
+ <a id="toggle-handle" accesskey="m" title="{L_MENU_TOGGLE}" onclick="switch_menu(); return false;" href="#"></a></div>
+ <!-- ENDIF -->
+ <div id="menu">
+ <p>{L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [&nbsp;<a href="{U_LOGOUT}">{L_LOGOUT}</a>&nbsp;][&nbsp;<a href="{U_ADM_LOGOUT}">{L_ADM_LOGOUT}</a>&nbsp;]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
+ <ul>
+ <!-- DEFINE $LI_USED = 0 -->
+ <!-- BEGIN l_block1 -->
+ <!-- IF l_block1.S_SELECTED -->
+
+ <!-- BEGIN l_block2 -->
+ <!-- IF .l_block1.l_block2.l_block3 -->
+ <li class="header">{l_block1.l_block2.L_TITLE}</li>
+ <!-- DEFINE $LI_USED = 1 -->
+ <!-- ENDIF -->
+
+ <!-- BEGIN l_block3 -->
+ <li<!-- IF l_block1.l_block2.l_block3.S_SELECTED --> id="activemenu"<!-- ENDIF -->><a href="{l_block1.l_block2.l_block3.U_TITLE}"><span>{l_block1.l_block2.l_block3.L_TITLE}</span></a></li>
+ <!-- DEFINE $LI_USED = 1 -->
+ <!-- END l_block3 -->
+ <!-- END l_block2 -->
+
+ <!-- ENDIF -->
+ <!-- END l_block1 -->
+ <!-- IF not $LI_USED -->
+ <li></li>
+ <!-- ENDIF -->
+ </ul>
+ </div>
+
+ <div id="main">
diff --git a/phpBB/adm/style/permission_forum_copy.html b/phpBB/adm/style/permission_forum_copy.html
new file mode 100644
index 0000000000..c919310035
--- /dev/null
+++ b/phpBB/adm/style/permission_forum_copy.html
@@ -0,0 +1,40 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="maincontent"></a>
+
+ <h1>{L_ACP_FORUM_PERMISSIONS_COPY}</h1>
+
+ {L_ACP_FORUM_PERMISSIONS_COPY_EXPLAIN}
+
+ <form id="forum_perm_copy" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_LOOK_UP_FORUM}</legend>
+
+ <dl>
+ <dt><label for="src_forum">{L_COPY_PERMISSIONS_FROM}:</label><br /><span>{L_COPY_PERMISSIONS_FORUM_FROM_EXPLAIN}</span></dt>
+ <dd><select id="src_forum" name="src_forum_id"><option value="0">{L_SELECT_FORUM}</option><option value="-1">------------------</option>{S_FORUM_OPTIONS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset>
+ <legend>{L_LOOK_UP_FORUM}</legend>
+ <p>{L_LOOK_UP_FORUMS_EXPLAIN}</p>
+
+ <dl>
+ <dt><label for="dest_forums">{L_COPY_PERMISSIONS_TO}:</label><br /><span>{L_COPY_PERMISSIONS_FORUM_TO_EXPLAIN}</span></dt>
+ <dd><select id="dest_forums" name="dest_forum_ids[]" multiple="multiple" size="10">{S_FORUM_OPTIONS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <legend>{L_SUBMIT}</legend>
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ </fieldset>
+
+ </form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html
new file mode 100644
index 0000000000..fb4d3ef143
--- /dev/null
+++ b/phpBB/adm/style/permission_mask.html
@@ -0,0 +1,139 @@
+
+<script type="text/javascript">
+// <![CDATA[
+ var active_pmask = '0';
+ var active_fmask = '0';
+ var active_cat = '0';
+
+ var id = '000';
+
+ var role_options = new Array();
+
+ <!-- IF S_ROLE_JS_ARRAY -->
+ {S_ROLE_JS_ARRAY}
+ <!-- ENDIF -->
+// ]]>
+</script>
+<script type="text/javascript" src="style/permissions.js"></script>
+
+<!-- BEGIN p_mask -->
+<div class="clearfix"></div>
+<h3>{p_mask.NAME}<!-- IF p_mask.S_LOCAL --> <span class="small"> [{p_mask.L_ACL_TYPE}]</span><!-- ENDIF --></h3>
+
+<!-- BEGIN f_mask -->
+<div class="clearfix"></div>
+<fieldset class="permissions" id="perm{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}">
+ <legend id="legend{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}">
+ <!-- IF not p_mask.S_VIEW -->
+ <input type="checkbox" style="display: none;" class="permissions-checkbox" name="inherit[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" id="checkbox{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" value="1" onclick="toggle_opacity('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}')" />
+ <!-- ELSE -->
+ <!-- ENDIF -->
+ <!-- IF p_mask.f_mask.PADDING --><span class="padding">{p_mask.f_mask.PADDING}{p_mask.f_mask.PADDING}</span><!-- ENDIF -->{p_mask.f_mask.NAME}
+ </legend>
+ <!-- IF not p_mask.S_VIEW -->
+ <div class="permissions-switch">
+ <div class="permissions-reset">
+ <a href="#" onclick="mark_options('perm{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'y'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); init_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); return false;">{L_ALL_YES}</a> &middot; <a href="#" onclick="mark_options('perm{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'u'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); init_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); return false;">{L_ALL_NO}</a> &middot; <a href="#" onclick="mark_options('perm{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'n'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); init_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); return false;">{L_ALL_NEVER}</a>
+ </div>
+ <a href="#" onclick="swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '0', true); return false;">{L_ADVANCED_PERMISSIONS}</a><!-- IF not p_mask.S_VIEW and p_mask.f_mask.S_CUSTOM --> *<!-- ENDIF -->
+ </div>
+ <dl class="permissions-simple">
+ <dt style="width: 20%"><label for="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}">{L_ROLE}:</label></dt>
+ <!-- IF p_mask.f_mask.S_ROLE_OPTIONS -->
+ <dd style="margin-left: 20%"><select id="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" name="role[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" onchange="set_role_settings(this.options[selectedIndex].value, 'advanced{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); init_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}')">{p_mask.f_mask.S_ROLE_OPTIONS}</select></dd>
+ <!-- ELSE -->
+ <dd>{L_NO_ROLE_AVAILABLE}</dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- BEGIN category -->
+ <!-- IF p_mask.f_mask.category.S_FIRST_ROW -->
+ <!-- IF not p_mask.S_VIEW -->
+ <div class="permissions-advanced" id="advanced{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" style="display: none;">
+ <!-- ELSE -->
+ <div class="permissions-advanced" id="advanced{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}">
+ <!-- ENDIF -->
+
+ <div class="permissions-category">
+ <ul>
+ <!-- ENDIF -->
+
+ <!-- IF p_mask.f_mask.category.S_YES -->
+ <li class="permissions-preset-yes<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}">
+ <!-- ELSEIF p_mask.f_mask.category.S_NEVER -->
+ <li class="permissions-preset-never<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}">
+ <!-- ELSEIF p_mask.f_mask.category.S_NO -->
+ <li class="permissions-preset-no<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}">
+ <!-- ELSE -->
+ <li class="permissions-preset-custom<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}">
+ <!-- ENDIF -->
+ <a href="#" onclick="swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '{p_mask.f_mask.category.S_ROW_COUNT}', false<!-- IF p_mask.S_VIEW -->, true<!-- ENDIF -->); return false;"><span class="tabbg"><span class="colour"></span>{p_mask.f_mask.category.CAT_NAME}</span></a></li>
+ <!-- END category -->
+ </ul>
+ </div>
+
+ <!-- BEGIN category -->
+ <div class="permissions-panel" id="options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}" <!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --><!-- ELSE --> style="display: none;"<!-- ENDIF -->>
+ <span class="corners-top"><span></span></span>
+ <div class="tablewrap">
+ <table id="table{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}" cellspacing="1">
+ <colgroup>
+ <col class="permissions-name" />
+ <col class="permissions-yes" />
+ <col class="permissions-no" />
+ <!-- IF not p_mask.S_VIEW -->
+ <col class="permissions-never" />
+ <!-- ENDIF -->
+ </colgroup>
+ <thead>
+ <tr>
+ <th class="name" scope="col"><strong>{L_ACL_SETTING}</strong></th>
+ <!-- IF p_mask.S_VIEW -->
+ <th class="value" scope="col">{L_ACL_YES}</th>
+ <th class="value" scope="col">{L_ACL_NEVER}</th>
+ <!-- ELSE -->
+ <th class="value permissions-yes" scope="col"><a href="#" onclick="mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'y'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); set_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', false, 'yes'); return false;">{L_ACL_YES}</a></th>
+ <th class="value permissions-no" scope="col"><a href="#" onclick="mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'u'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); set_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', false, 'no'); return false;">{L_ACL_NO}</a></th>
+ <th class="value permissions-never" scope="col"><a href="#" onclick="mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'n'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); set_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', false, 'never'); return false;">{L_ACL_NEVER}</a></th>
+ <!-- ENDIF -->
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN mask -->
+ <!-- IF p_mask.f_mask.category.mask.S_ROW_COUNT is even --><tr class="row4"><!-- ELSE --><tr class="row3"><!-- ENDIF -->
+ <th class="permissions-name<!-- IF p_mask.f_mask.category.mask.S_ROW_COUNT is even --> row4<!-- ELSE --> row3<!-- ENDIF -->"><!-- IF p_mask.f_mask.category.mask.U_TRACE --><a href="{p_mask.f_mask.category.mask.U_TRACE}" class="trace" onclick="popup(this.href, 750, 515, '_trace'); return false;" title="{L_TRACE_SETTING}"><img src="images/icon_trace.gif" alt="{L_TRACE_SETTING}" /></a> <!-- ENDIF -->{p_mask.f_mask.category.mask.PERMISSION}</th>
+ <!-- IF p_mask.S_VIEW -->
+ <td<!-- IF p_mask.f_mask.category.mask.S_YES --> class="yes"<!-- ENDIF -->>&nbsp;</td>
+ <td<!-- IF p_mask.f_mask.category.mask.S_NEVER --> class="never"<!-- ENDIF -->></td>
+ <!-- ELSE -->
+ <td class="permissions-yes"><label for="{p_mask.f_mask.category.mask.S_FIELD_NAME}_y"><input onclick="reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); set_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', false)" id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_y" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" class="radio" type="radio"<!-- IF p_mask.f_mask.category.mask.S_YES --> checked="checked"<!-- ENDIF --> value="1" /></label></td>
+ <td class="permissions-no"><label for="{p_mask.f_mask.category.mask.S_FIELD_NAME}_u"><input onclick="reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); set_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', false)" id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_u" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" class="radio" type="radio"<!-- IF p_mask.f_mask.category.mask.S_NO --> checked="checked"<!-- ENDIF --> value="-1" /></label></td>
+ <td class="permissions-never"><label for="{p_mask.f_mask.category.mask.S_FIELD_NAME}_n"><input onclick="reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); set_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', false)" id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_n" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" class="radio" type="radio"<!-- IF p_mask.f_mask.category.mask.S_NEVER --> checked="checked"<!-- ENDIF --> value="0" /></label></td>
+ <!-- ENDIF -->
+ </tr>
+ <!-- END mask -->
+ </tbody>
+ </table>
+ </div>
+
+ <!-- IF not p_mask.S_VIEW -->
+ <fieldset class="quick" style="margin-right: 11px;">
+ <p class="small">{L_APPLY_PERMISSIONS_EXPLAIN}</p>
+ <input class="button1" type="submit" name="psubmit[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" value="{L_APPLY_PERMISSIONS}" />
+ <!-- IF .p_mask.f_mask gt 1 or .p_mask gt 1 -->
+ <p class="small"><a href="#" onclick="reset_opacity(0, '{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="reset_opacity(1, '{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); return false;">{L_UNMARK_ALL}</a></p>
+ <!-- ENDIF -->
+ </fieldset>
+
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span>
+ </div>
+ <!-- END category -->
+ <div class="clearfix"></div>
+ </div>
+</fieldset>
+<!-- END f_mask -->
+
+<!-- END p_mask -->
diff --git a/phpBB/adm/style/permission_roles_mask.html b/phpBB/adm/style/permission_roles_mask.html
new file mode 100644
index 0000000000..e88c5fd2ba
--- /dev/null
+++ b/phpBB/adm/style/permission_roles_mask.html
@@ -0,0 +1,38 @@
+
+<!-- BEGIN role_mask -->
+
+ <table cellspacing="1">
+ <caption><!-- IF role_mask.FORUM_ID -->{L_FORUM}: <!-- ENDIF -->{role_mask.NAME}</caption>
+ <tbody>
+ <tr>
+ <th>{L_USERS}</th>
+ </tr>
+ <tr>
+ <td class="row1">
+ <!-- BEGIN users -->
+ <a href="{role_mask.users.U_PROFILE}">{role_mask.users.USERNAME}</a><!-- IF not role_mask.users.S_LAST_ROW --> :: <!-- ENDIF -->
+ <!-- BEGINELSE -->
+ {L_USERS_NOT_ASSIGNED}
+ <!-- END users -->
+ </td>
+ </tr>
+ <tr>
+ <th>{L_GROUPS}</th>
+ </tr>
+ <tr>
+ <td class="row2">
+ <!-- BEGIN groups -->
+ <a href="{role_mask.groups.U_PROFILE}">{role_mask.groups.GROUP_NAME}</a><!-- IF not role_mask.groups.S_LAST_ROW --> :: <!-- ENDIF -->
+ <!-- BEGINELSE -->
+ {L_GROUPS_NOT_ASSIGNED}
+ <!-- END users -->
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+<!-- BEGINELSE -->
+
+ <p>{L_ROLE_NOT_ASSIGNED}</p>
+
+<!-- END role_mask --> \ No newline at end of file
diff --git a/phpBB/adm/style/permission_trace.html b/phpBB/adm/style/permission_trace.html
new file mode 100644
index 0000000000..186bb28b67
--- /dev/null
+++ b/phpBB/adm/style/permission_trace.html
@@ -0,0 +1,58 @@
+<!-- INCLUDE simple_header.html -->
+
+<div style="background-color: #fff; padding: 10px; margin-top: 10px;" class="permissions">
+
+ <!-- IF U_BACK --><a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a><!-- ENDIF -->
+
+ <h3>{L_TRACE_FOR}: {PERMISSION_USERNAME} / <!-- IF FORUM_NAME -->{FORUM_NAME} / <!-- ENDIF -->{PERMISSION} </h3>
+
+ <br />
+
+ <table cellspacing="1" class="type1">
+ <thead>
+ <tr>
+ <th>{L_TRACE_WHO}</th>
+ <th style="width: 50px;">{L_ACL_SETTING}</th>
+ <th style="width: 50px;">{L_TRACE_TOTAL}</th>
+ <th>{L_INFORMATION}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN trace -->
+ <!-- IF trace.S_ROW_COUNT is even --><tr class="row4"><!-- ELSE --><tr class="row3"><!-- ENDIF -->
+ <td style="white-space: nowrap;"><strong>{trace.WHO}</strong></td>
+
+ <!-- IF trace.S_SETTING_NEVER -->
+ <td class="never">{L_ACL_NEVER}</td>
+ <!-- ELSEIF trace.S_SETTING_YES -->
+ <td class="yes">{L_ACL_YES}</td>
+ <!-- ELSE -->
+ <td class="no">{L_ACL_NO}</td>
+ <!-- ENDIF -->
+
+ <!-- IF trace.S_TOTAL_NEVER -->
+ <td class="never">{L_ACL_NEVER}</td>
+ <!-- ELSEIF trace.S_TOTAL_YES -->
+ <td class="yes">{L_ACL_YES}</td>
+ <!-- ELSE -->
+ <td class="no">{L_ACL_NO}</td>
+ <!-- ENDIF -->
+
+ <td>{trace.INFORMATION}</td>
+ </tr>
+ <!-- END trace -->
+ <tr class="row2">
+ <td style="white-space: nowrap;"><strong>{L_TRACE_RESULT}</strong></td>
+ <td colspan="2" style="text-align: center;" class="<!-- IF S_RESULT_NEVER -->never<!-- ELSEIF S_RESULT_YES -->yes<!-- ELSE -->no<!-- ENDIF -->">
+ <!-- IF S_RESULT_NEVER -->{L_ACL_NEVER}<!-- ELSEIF S_RESULT_YES -->{L_ACL_YES}<!-- ELSE -->{L_ACL_NO}<!-- ENDIF -->
+ </td>
+ <td>{L_RESULTING_PERMISSION}</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <br />
+
+</div>
+
+<!-- INCLUDE simple_footer.html -->
diff --git a/phpBB/adm/style/permissions.js b/phpBB/adm/style/permissions.js
new file mode 100644
index 0000000000..adc8995c23
--- /dev/null
+++ b/phpBB/adm/style/permissions.js
@@ -0,0 +1,359 @@
+/**
+* Hide and show all checkboxes
+* status = true (show boxes), false (hide boxes)
+*/
+function display_checkboxes(status)
+{
+ var form = document.getElementById('set-permissions');
+ var cb = document.getElementsByTagName('input');
+ var display;
+
+ //show
+ if (status)
+ {
+ display = 'inline';
+ }
+ //hide
+ else
+ {
+ display = 'none';
+ }
+
+ for (var i = 0; i < cb.length; i++ )
+ {
+ if (cb[i].className == 'permissions-checkbox')
+ {
+ cb[i].style.display = display;
+ }
+
+ }
+
+}
+
+
+/**
+* Change opacity of element
+* e = element
+* value = 0 (hidden) till 10 (fully visible)
+*/
+function set_opacity(e, value) {
+ e.style.opacity = value/10;
+
+ //IE opacity currently turned off, because of its astronomical stupidity
+ //e.style.filter = 'alpha(opacity=' + value*10 + ')';
+}
+
+/**
+* Reset the opacity and checkboxes
+* block_id = id of the element that needs to be toggled
+*/
+function toggle_opacity(block_id) {
+ var cb = document.getElementById('checkbox' + block_id);
+ var fs = document.getElementById('perm' + block_id);
+
+ if (cb.checked)
+ {
+ set_opacity(fs, 5);
+ }
+ else
+ {
+ set_opacity(fs, 10);
+ }
+}
+
+/**
+* Reset the opacity and checkboxes
+* value = 0 (checked) and 1 (unchecked)
+* except_id = id of the element not to hide
+*/
+function reset_opacity(status, except_id) {
+ var perm = document.getElementById('set-permissions');
+ var fs = perm.getElementsByTagName('fieldset');
+ var opacity = 5;
+
+ if (status)
+ {
+ opacity = 10;
+ }
+
+ for (var i = 0; i < fs.length; i++ )
+ {
+ if (fs[i].className != 'quick')
+ {
+ set_opacity(fs[i], opacity);
+ }
+ }
+
+ if (typeof(except_id) != 'undefined')
+ {
+ set_opacity(document.getElementById('perm' + except_id), 10);
+ }
+
+ //reset checkboxes too
+ marklist('set-permissions', 'inherit', !status);
+}
+
+
+/**
+* Check whether we have a full radiobutton row of true
+* index = offset for the row of inputs (0 == first row, 1 == second, 2 == third),
+* rb = array of radiobuttons
+*/
+function get_radio_status(index, rb)
+{
+ for (var i = index; i < rb.length; i = i + 3 )
+ {
+ if (rb[i].checked != true)
+ {
+ if (i > index)
+ {
+ //at least one is true, but not all (custom)
+ return 2;
+ }
+ //first one is not true
+ return 0;
+ }
+ }
+
+ // all radiobuttons true
+ return 1;
+}
+
+/**
+* Set tab colours
+* id = panel the tab needs to be set for,
+* init = initialising on open,
+* quick = If no calculation needed, this contains the colour
+*/
+function set_colours(id, init, quick)
+{
+ var table = document.getElementById('table' + id);
+ var tab = document.getElementById('tab' + id);
+
+ if (typeof(quick) != 'undefined')
+ {
+ tab.className = 'permissions-preset-' + quick + ' activetab';
+ return;
+ }
+
+ var rb = table.getElementsByTagName('input');
+ var colour = 'custom';
+
+ var status = get_radio_status(0, rb);
+
+ if (status == 1)
+ {
+ colour = 'yes';
+ }
+ else if (status == 0)
+ {
+ // We move on to No
+ status = get_radio_status(1, rb);
+
+ if (status == 1)
+ {
+ colour = 'no';
+ }
+ else if (status == 0)
+ {
+ // We move on to Never
+ status = get_radio_status(2, rb);
+
+ if (status == 1)
+ {
+ colour = 'never';
+ }
+ }
+ }
+
+ if (init)
+ {
+ tab.className = 'permissions-preset-' + colour;
+ }
+ else
+ {
+ tab.className = 'permissions-preset-' + colour + ' activetab';
+ }
+}
+
+/**
+* Initialise advanced tab colours on first load
+* block_id = block that is opened
+*/
+function init_colours(block_id)
+{
+ var block = document.getElementById('advanced' + block_id);
+ var panels = block.getElementsByTagName('div');
+ var tab = document.getElementById('tab' + id);
+
+ for (var i = 0; i < panels.length; i++)
+ {
+ if(panels[i].className == 'permissions-panel')
+ {
+ set_colours(panels[i].id.replace(/options/, ''), true);
+ }
+ }
+
+ tab.className = tab.className + ' activetab';
+}
+
+/**
+* Show/hide option panels
+* value = suffix for ID to show
+* adv = we are opening advanced permissions
+* view = called from view permissions
+*/
+function swap_options(pmask, fmask, cat, adv, view)
+{
+ id = pmask + fmask + cat;
+ active_option = active_pmask + active_fmask + active_cat;
+
+ var old_tab = document.getElementById('tab' + active_option);
+ var new_tab = document.getElementById('tab' + id);
+ var adv_block = document.getElementById('advanced' + pmask + fmask);
+
+ if (adv_block.style.display == 'block' && adv == true)
+ {
+ dE('advanced' + pmask + fmask, -1);
+ reset_opacity(1);
+ display_checkboxes(false);
+ return;
+ }
+
+ // no need to set anything if we are clicking on the same tab again
+ if (new_tab == old_tab && !adv)
+ {
+ return;
+ }
+
+ // init colours
+ if (adv && (pmask + fmask) != (active_pmask + active_fmask))
+ {
+ init_colours(pmask + fmask);
+ display_checkboxes(true);
+ reset_opacity(1);
+ }
+ else if (adv)
+ {
+ //Checkbox might have been clicked, but we need full visibility
+ display_checkboxes(true);
+ reset_opacity(1);
+ }
+
+ // set active tab
+ old_tab.className = old_tab.className.replace(/\ activetab/g, '');
+ new_tab.className = new_tab.className + ' activetab';
+
+ if (id == active_option && adv != true)
+ {
+ return;
+ }
+
+ dE('options' + active_option, -1);
+
+ //hiding and showing the checkbox
+ if (document.getElementById('checkbox' + active_pmask + active_fmask))
+ {
+ dE('checkbox' + pmask + fmask, -1);
+
+ if ((pmask + fmask) != (active_pmask + active_fmask))
+ {
+ document.getElementById('checkbox' + active_pmask + active_fmask).style.display = 'inline';
+ }
+ }
+
+ if (!view)
+ {
+ dE('advanced' + active_pmask + active_fmask, -1);
+ }
+
+ if (!view)
+ {
+ dE('advanced' + pmask + fmask, 1);
+ }
+ dE('options' + id, 1);
+
+ active_pmask = pmask;
+ active_fmask = fmask;
+ active_cat = cat;
+}
+
+/**
+* Mark all radio buttons in one panel
+* id = table ID container, s = status ['y'/'u'/'n']
+*/
+function mark_options(id, s)
+{
+ var t = document.getElementById(id);
+
+ if (!t)
+ {
+ return;
+ }
+
+ var rb = t.getElementsByTagName('input');
+
+ for (var r = 0; r < rb.length; r++)
+ {
+ if (rb[r].id.substr(rb[r].id.length-1) == s)
+ {
+ rb[r].checked = true;
+ }
+ }
+}
+
+function mark_one_option(id, field_name, s)
+{
+ var t = document.getElementById(id);
+
+ if (!t)
+ {
+ return;
+ }
+
+ var rb = t.getElementsByTagName('input');
+
+ for (var r = 0; r < rb.length; r++)
+ {
+ if (rb[r].id.substr(rb[r].id.length-field_name.length-3, field_name.length) == field_name && rb[r].id.substr(rb[r].id.length-1) == s)
+ {
+ rb[r].checked = true;
+ }
+ }
+}
+
+/**
+* Reset role dropdown field to Select role... if an option gets changed
+*/
+function reset_role(id)
+{
+ var t = document.getElementById(id);
+
+ if (!t)
+ {
+ return;
+ }
+
+ t.options[0].selected = true;
+}
+
+/**
+* Load role and set options accordingly
+*/
+function set_role_settings(role_id, target_id)
+{
+ settings = role_options[role_id];
+
+ if (!settings)
+ {
+ return;
+ }
+
+ // Mark all options to no (unset) first...
+ mark_options(target_id, 'u');
+
+ for (var r in settings)
+ {
+ mark_one_option(target_id, r, (settings[r] == 1) ? 'y' : 'n');
+ }
+}
diff --git a/phpBB/adm/style/progress_bar.html b/phpBB/adm/style/progress_bar.html
new file mode 100644
index 0000000000..00e1e5e885
--- /dev/null
+++ b/phpBB/adm/style/progress_bar.html
@@ -0,0 +1,40 @@
+<!-- INCLUDE simple_header.html -->
+
+<script type="text/javascript">
+// <![CDATA[
+ /**
+ * Close previously opened popup
+ */
+ function close_popup()
+ {
+ if (opener != null)
+ {
+ if (opener.close_waitscreen != null)
+ {
+ if (opener.close_waitscreen == 1)
+ {
+ opener.close_waitscreen = 0;
+ self.close();
+ return 0;
+ }
+ }
+ }
+ setTimeout("close_popup()", 1000);
+ return 0;
+ }
+// ]]>
+</script>
+
+<div class="successbox">
+ <h3>{L_PROGRESS}</h3>
+ <img src="images/progress_bar.gif" alt="{L_PROGRESS}" />
+ <p>{L_PROGRESS_EXPLAIN}</p>
+</div>
+
+<script type="text/javascript">
+// <![CDATA[
+ close_popup();
+// ]]>
+</script>
+
+<!-- INCLUDE simple_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/simple_body.html b/phpBB/adm/style/simple_body.html
new file mode 100644
index 0000000000..0b1e11b9a2
--- /dev/null
+++ b/phpBB/adm/style/simple_body.html
@@ -0,0 +1,8 @@
+<!-- INCLUDE simple_header.html -->
+
+<div class="successbox">
+ <h3>{MESSAGE_TITLE}</h3>
+ <p>{MESSAGE_TEXT}</p>
+</div>
+
+<!-- INCLUDE simple_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html
new file mode 100644
index 0000000000..65cf724c2f
--- /dev/null
+++ b/phpBB/adm/style/simple_footer.html
@@ -0,0 +1,31 @@
+ <div style="text-align: {S_CONTENT_FLOW_END};"><a href="#" onclick="self.close(); return false;">{L_CLOSE_WINDOW}</a></div>
+ <br /><br />
+</div>
+
+<!--
+ We request you retain the full copyright notice below including the link to www.phpbb.com.
+ This not only gives respect to the large amount of time given freely by the developers
+ but also helps build interest, traffic and use of phpBB. If you (honestly) cannot retain
+ the full copyright we ask you at least leave in place the "Powered by phpBB" line, with
+ "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our
+ forums may be affected.
+
+ The phpBB Group : 2006
+// -->
+
+<div id="page-footer">
+
+ <!-- IF S_COPYRIGHT_HTML -->
+ <br />Powered by phpBB &copy; 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>
+ <!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
+ <!-- ENDIF -->
+
+ <!-- IF DEBUG_OUTPUT -->
+ <!-- IF S_COPYRIGHT_HTML --><br /><br /><!-- ENDIF -->
+ {DEBUG_OUTPUT}
+ <!-- ENDIF -->
+
+</div>
+
+</body>
+</html>
diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html
new file mode 100644
index 0000000000..2339b70a93
--- /dev/null
+++ b/phpBB/adm/style/simple_header.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<meta http-equiv="Content-Language" content="{S_USER_LANG}" />
+<meta http-equiv="imagetoolbar" content="no" />
+<!-- IF META -->{META}<!-- ENDIF -->
+<title>{PAGE_TITLE}</title>
+
+<link href="style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+
+<script type="text/javascript">
+// <![CDATA[
+var jump_page = '{LA_JUMP_PAGE}:';
+var on_page = '{ON_PAGE}';
+var per_page = '{PER_PAGE}';
+var base_url = '{A_BASE_URL}';
+
+/**
+* Window popup
+*/
+function popup(url, width, height, name)
+{
+ if (!name)
+ {
+ name = '_popup';
+ }
+
+ window.open(url.replace(/&amp;/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes, width=' + width);
+ return false;
+}
+
+/**
+* Jump to page
+*/
+function jumpto()
+{
+ var page = prompt(jump_page, on_page);
+
+ if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
+ {
+ if (base_url.indexOf('?') == -1)
+ {
+ document.location.href = base_url + '?start=' + ((page - 1) * per_page);
+ }
+ else
+ {
+ document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + ((page - 1) * per_page);
+ }
+ }
+}
+
+/**
+* Set display of page element
+* s[-1,0,1] = hide,toggle display,show
+*/
+function dE(n, s, type)
+{
+ if (!type)
+ {
+ type = 'block';
+ }
+
+ var e = document.getElementById(n);
+ if (!s)
+ {
+ s = (e.style.display == '') ? -1 : 1;
+ }
+ e.style.display = (s == 1) ? type : 'none';
+}
+
+/**
+* Mark/unmark checkboxes
+* id = ID of parent container, name = name prefix, state = state [true/false]
+*/
+function marklist(id, name, state)
+{
+ var parent = document.getElementById(id);
+ if (!parent)
+ {
+ return;
+ }
+
+ var rb = parent.getElementsByTagName('input');
+
+ for (var r = 0; r < rb.length; r++)
+ {
+ if (rb[r].name.substr(0, name.length) == name)
+ {
+ rb[r].checked = state;
+ }
+ }
+}
+
+/**
+* Find a member
+*/
+function find_username(url)
+{
+ popup(url, 760, 570, '_usersearch');
+ return false;
+}
+
+// ]]>
+</script>
+</head>
+
+<body class="{S_CONTENT_DIRECTION}">
+
+<div id="page-body" class="simple-page-body">
diff --git a/phpBB/adm/style/tooltip.js b/phpBB/adm/style/tooltip.js
new file mode 100644
index 0000000000..20610b52fe
--- /dev/null
+++ b/phpBB/adm/style/tooltip.js
@@ -0,0 +1,251 @@
+/*
+javascript for Bubble Tooltips by Alessandro Fulciniti
+- http://pro.html.it - http://web-graphics.com
+obtained from: http://web-graphics.com/mtarchive/001717.php
+
+phpBB Development Team:
+ - modified to adhere to our coding guidelines
+ - integration into our design
+ - added ability to perform tooltips on select elements
+ - further adjustements
+*/
+
+var head_text, tooltip_mode;
+
+/**
+* Enable tooltip replacements for links
+*/
+function enable_tooltips_link(id, headline, sub_id)
+{
+ var links, i, hold;
+
+ head_text = headline;
+
+ if (!document.getElementById || !document.getElementsByTagName)
+ {
+ return;
+ }
+
+ hold = document.createElement('span');
+ hold.id = '_tooltip_container';
+ hold.setAttribute('id', '_tooltip_container');
+ hold.style.position = 'absolute';
+
+ document.getElementsByTagName('body')[0].appendChild(hold);
+
+ if (id == null)
+ {
+ links = document.getElementsByTagName('a');
+ }
+ else
+ {
+ links = document.getElementById(id).getElementsByTagName('a');
+ }
+
+ for (i = 0; i < links.length; i++)
+ {
+ if (sub_id)
+ {
+ if (links[i].id.substr(0, sub_id.length) == sub_id)
+ {
+ prepare(links[i]);
+ }
+ }
+ else
+ {
+ prepare(links[i]);
+ }
+ }
+
+ tooltip_mode = 'link';
+}
+
+/**
+* Enable tooltip replacements for selects
+*/
+function enable_tooltips_select(id, headline, sub_id)
+{
+ var links, i, hold;
+
+ head_text = headline;
+
+ if (!document.getElementById || !document.getElementsByTagName)
+ {
+ return;
+ }
+
+ hold = document.createElement('span');
+ hold.id = '_tooltip_container';
+ hold.setAttribute('id', '_tooltip_container');
+ hold.style.position = 'absolute';
+
+ document.getElementsByTagName('body')[0].appendChild(hold);
+
+ if (id == null)
+ {
+ links = document.getElementsByTagName('option');
+ }
+ else
+ {
+ links = document.getElementById(id).getElementsByTagName('option');
+ }
+
+ for (i = 0; i < links.length; i++)
+ {
+ if (sub_id)
+ {
+ if (links[i].parentNode.id.substr(0, sub_id.length) == sub_id)
+ {
+ prepare(links[i]);
+ }
+ }
+ else
+ {
+ prepare(links[i]);
+ }
+ }
+
+ tooltip_mode = 'select';
+}
+
+/**
+* Prepare elements to replace
+*/
+function prepare(element)
+{
+ var tooltip, text, desc, title;
+
+ text = element.getAttribute('title');
+
+ if (text == null || text.length == 0)
+ {
+ return;
+ }
+
+ element.removeAttribute('title');
+ tooltip = create_element('span', 'tooltip');
+
+ title = create_element('span', 'top');
+ title.appendChild(document.createTextNode(head_text));
+ tooltip.appendChild(title);
+
+ desc = create_element('span', 'bottom');
+ desc.innerHTML = text;
+ tooltip.appendChild(desc);
+
+ set_opacity(tooltip);
+
+ element.tooltip = tooltip;
+ element.onmouseover = show_tooltip;
+ element.onmouseout = hide_tooltip;
+
+ if (tooltip_mode == 'link')
+ {
+ element.onmousemove = locate;
+ }
+}
+
+/**
+* Show tooltip
+*/
+function show_tooltip(e)
+{
+ document.getElementById('_tooltip_container').appendChild(this.tooltip);
+ locate(this);
+}
+
+/**
+* Hide tooltip
+*/
+function hide_tooltip(e)
+{
+ var d = document.getElementById('_tooltip_container');
+ if (d.childNodes.length > 0)
+ {
+ d.removeChild(d.firstChild);
+ }
+}
+
+/**
+* Set opacity on tooltip element
+*/
+function set_opacity(element)
+{
+ element.style.filter = 'alpha(opacity:95)';
+ element.style.KHTMLOpacity = '0.95';
+ element.style.MozOpacity = '0.95';
+ element.style.opacity = '0.95';
+}
+
+/**
+* Create new element
+*/
+function create_element(tag, c)
+{
+ var x = document.createElement(tag);
+ x.className = c;
+ x.style.display = 'block';
+ return x;
+}
+
+/**
+* Correct positioning of tooltip container
+*/
+function locate(e)
+{
+ var posx = 0;
+ var posy = 0;
+
+ e = e.parentNode;
+
+ if (e.offsetParent)
+ {
+ for (var posx = 0, posy = 0; e.offsetParent; e = e.offsetParent)
+ {
+ posx += e.offsetLeft;
+ posy += e.offsetTop;
+ }
+ }
+ else
+ {
+ posx = e.offsetLeft;
+ posy = e.offsetTop;
+ }
+
+ if (tooltip_mode == 'link')
+ {
+ document.getElementById('_tooltip_container').style.top=(posy+20) + 'px';
+ document.getElementById('_tooltip_container').style.left=(posx-20) + 'px';
+ }
+ else
+ {
+ document.getElementById('_tooltip_container').style.top=(posy+30) + 'px';
+ document.getElementById('_tooltip_container').style.left=(posx-205) + 'px';
+ }
+
+/*
+ if (e == null)
+ {
+ e = window.event;
+ }
+
+ if (e.pageX || e.pageY)
+ {
+ posx = e.pageX;
+ posy = e.pageY;
+ }
+ else if (e.clientX || e.clientY)
+ {
+ if (document.documentElement.scrollTop)
+ {
+ posx = e.clientX+document.documentElement.scrollLeft;
+ posy = e.clientY+document.documentElement.scrollTop;
+ }
+ else
+ {
+ posx = e.clientX+document.body.scrollLeft;
+ posy = e.clientY+document.body.scrollTop;
+ }
+ }
+*/
+}
diff --git a/phpBB/adm/style/viewsource.html b/phpBB/adm/style/viewsource.html
new file mode 100644
index 0000000000..f127c9626f
--- /dev/null
+++ b/phpBB/adm/style/viewsource.html
@@ -0,0 +1,21 @@
+<!-- INCLUDE simple_header.html -->
+<div id="acp" style="padding: 0;">
+<div class="panel" style="padding: 10px;">
+<div style="overflow: auto;">
+ <h1>{FILENAME}</h1>
+
+ <table class="type2">
+ <tbody>
+ <!-- BEGIN source -->
+ <tr valign="top">
+ <td class="sourcenum">{source.LINENUM}&nbsp;&nbsp;</td>
+ <td class="source">{source.LINE}</td>
+ </tr>
+ <!-- END source -->
+ </tbody>
+ </table>
+
+</div>
+</div>
+</div>
+<!-- INCLUDE simple_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/swatch.php b/phpBB/adm/swatch.php
new file mode 100644
index 0000000000..e372c16b9b
--- /dev/null
+++ b/phpBB/adm/swatch.php
@@ -0,0 +1,53 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+define('IN_PHPBB', true);
+define('ADMIN_START', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+
+// Start session management
+$user->session_begin(false);
+$auth->acl($user->data);
+$user->setup();
+
+// Set custom template for admin area
+$template->set_custom_template($phpbb_root_path . 'adm/style', 'admin');
+
+$template->set_filenames(array(
+ 'body' => 'colour_swatch.html')
+);
+
+$form = request_var('form', '');
+$name = request_var('name', '');
+
+// We validate form and name here, only id/class allowed
+$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
+$name = (!preg_match('/^[a-z0-9_-]+$/i', $name)) ? '' : $name;
+
+$template->assign_vars(array(
+ 'OPENER' => $form,
+ 'NAME' => $name,
+ 'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
+
+ 'S_USER_LANG' => $user->lang['USER_LANG'],
+ 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
+ 'S_CONTENT_ENCODING' => 'UTF-8',
+));
+
+$template->display('body');
+
+garbage_collection();
+
+?> \ No newline at end of file
diff --git a/phpBB/cache/.htaccess b/phpBB/cache/.htaccess
new file mode 100644
index 0000000000..aa5afc1640
--- /dev/null
+++ b/phpBB/cache/.htaccess
@@ -0,0 +1,4 @@
+<Files *>
+ Order Allow,Deny
+ Deny from All
+</Files> \ No newline at end of file
diff --git a/phpBB/cache/index.htm b/phpBB/cache/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/cache/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/common.php b/phpBB/common.php
new file mode 100644
index 0000000000..c4a3160102
--- /dev/null
+++ b/phpBB/common.php
@@ -0,0 +1,227 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+* Minimum Requirement: PHP 4.3.3
+*/
+
+/**
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+$starttime = explode(' ', microtime());
+$starttime = $starttime[1] + $starttime[0];
+
+// Report all errors, except notices
+error_reporting(E_ALL ^ E_NOTICE);
+
+/*
+* Remove variables created by register_globals from the global scope
+* Thanks to Matt Kavanagh
+*/
+function deregister_globals()
+{
+ $not_unset = array(
+ 'GLOBALS' => true,
+ '_GET' => true,
+ '_POST' => true,
+ '_COOKIE' => true,
+ '_REQUEST' => true,
+ '_SERVER' => true,
+ '_SESSION' => true,
+ '_ENV' => true,
+ '_FILES' => true,
+ 'phpEx' => true,
+ 'phpbb_root_path' => true
+ );
+
+ // Not only will array_merge and array_keys give a warning if
+ // a parameter is not an array, array_merge will actually fail.
+ // So we check if _SESSION has been initialised.
+ if (!isset($_SESSION) || !is_array($_SESSION))
+ {
+ $_SESSION = array();
+ }
+
+ // Merge all into one extremely huge array; unset this later
+ $input = array_merge(
+ array_keys($_GET),
+ array_keys($_POST),
+ array_keys($_COOKIE),
+ array_keys($_SERVER),
+ array_keys($_SESSION),
+ array_keys($_ENV),
+ array_keys($_FILES)
+ );
+
+ foreach ($input as $varname)
+ {
+ if (isset($not_unset[$varname]))
+ {
+ // Hacking attempt. No point in continuing unless it's a COOKIE
+ if ($varname !== 'GLOBALS' || isset($_GET['GLOBALS']) || isset($_POST['GLOBALS']) || isset($_SERVER['GLOBALS']) || isset($_SESSION['GLOBALS']) || isset($_ENV['GLOBALS']) || isset($_FILES['GLOBALS']))
+ {
+ exit;
+ }
+ else
+ {
+ $cookie = &$_COOKIE;
+ while (isset($cookie['GLOBALS']))
+ {
+ foreach ($cookie['GLOBALS'] as $registered_var => $value)
+ {
+ if (!isset($not_unset[$registered_var]))
+ {
+ unset($GLOBALS[$registered_var]);
+ }
+ }
+ $cookie = &$cookie['GLOBALS'];
+ }
+ }
+ }
+
+ unset($GLOBALS[$varname]);
+ }
+
+ unset($input);
+}
+
+// If we are on PHP >= 6.0.0 we do not need some code
+if (version_compare(PHP_VERSION, '6.0.0-dev', '>='))
+{
+ /**
+ * @ignore
+ */
+ define('STRIP', false);
+}
+else
+{
+ @set_magic_quotes_runtime(0);
+
+ // Be paranoid with passed vars
+ if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on' || !function_exists('ini_get'))
+ {
+ deregister_globals();
+ }
+
+ define('STRIP', (get_magic_quotes_gpc()) ? true : false);
+}
+
+if (defined('IN_CRON'))
+{
+ $phpbb_root_path = dirname(__FILE__) . DIRECTORY_SEPARATOR;
+}
+
+if (!file_exists($phpbb_root_path . 'config.' . $phpEx))
+{
+ die("<p>The config.$phpEx file could not be found.</p><p><a href=\"{$phpbb_root_path}install/index.$phpEx\">Click here to install phpBB</a></p>");
+}
+
+require($phpbb_root_path . 'config.' . $phpEx);
+
+if (!defined('PHPBB_INSTALLED'))
+{
+ // Redirect the user to the installer
+ // We have to generate a full HTTP/1.1 header here since we can't guarantee to have any of the information
+ // available as used by the redirect function
+ $server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
+ $server_port = (!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT');
+ $secure = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 1 : 0;
+
+ $script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
+ if (!$script_name)
+ {
+ $script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
+ }
+
+ // Replace any number of consecutive backslashes and/or slashes with a single slash
+ // (could happen on some proxy setups and/or Windows servers)
+ $script_path = trim(dirname($script_name)) . '/install/index.' . $phpEx;
+ $script_path = preg_replace('#[\\\\/]{2,}#', '/', $script_path);
+
+ $url = (($secure) ? 'https://' : 'http://') . $server_name;
+
+ if ($server_port && (($secure && $server_port <> 443) || (!$secure && $server_port <> 80)))
+ {
+ // HTTP HOST can carry a port number...
+ if (strpos($server_name, ':') === false)
+ {
+ $url .= ':' . $server_port;
+ }
+ }
+
+ $url .= $script_path;
+ header('Location: ' . $url);
+ exit;
+}
+
+if (defined('DEBUG_EXTRA'))
+{
+ $base_memory_usage = 0;
+ if (function_exists('memory_get_usage'))
+ {
+ $base_memory_usage = memory_get_usage();
+ }
+}
+
+// Load Extensions
+if (!empty($load_extensions))
+{
+ $load_extensions = explode(',', $load_extensions);
+
+ foreach ($load_extensions as $extension)
+ {
+ @dl(trim($extension));
+ }
+}
+
+// Include files
+require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx);
+require($phpbb_root_path . 'includes/cache.' . $phpEx);
+require($phpbb_root_path . 'includes/template.' . $phpEx);
+require($phpbb_root_path . 'includes/session.' . $phpEx);
+require($phpbb_root_path . 'includes/auth.' . $phpEx);
+
+require($phpbb_root_path . 'includes/functions.' . $phpEx);
+require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
+
+require($phpbb_root_path . 'includes/constants.' . $phpEx);
+require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
+require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
+
+// Set PHP error handler to ours
+set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
+
+// Instantiate some basic classes
+$user = new user();
+$auth = new auth();
+$template = new template();
+$cache = new cache();
+$db = new $sql_db();
+
+// Connect to DB
+$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, defined('PHPBB_DB_NEW_LINK') ? PHPBB_DB_NEW_LINK : false);
+
+// We do not need this any longer, unset for safety purposes
+unset($dbpasswd);
+
+// Grab global variables, re-cache if necessary
+$config = $cache->obtain_config();
+
+// Add own hook handler
+require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
+$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
+
+foreach ($cache->obtain_hooks() as $hook)
+{
+ @include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/config.php b/phpBB/config.php
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/phpBB/config.php
diff --git a/phpBB/cron.php b/phpBB/cron.php
new file mode 100644
index 0000000000..3993a149b5
--- /dev/null
+++ b/phpBB/cron.php
@@ -0,0 +1,287 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+*/
+define('IN_PHPBB', true);
+define('IN_CRON', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+
+// Do not update users last page entry
+$user->session_begin(false);
+$auth->acl($user->data);
+
+$cron_type = request_var('cron_type', '');
+$use_shutdown_function = (@function_exists('register_shutdown_function')) ? true : false;
+
+// Output transparent gif
+header('Cache-Control: no-cache');
+header('Content-type: image/gif');
+header('Content-length: 43');
+
+echo base64_decode('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
+
+// test without flush ;)
+// flush();
+
+//
+if (!isset($config['cron_lock']))
+{
+ set_config('cron_lock', '0', true);
+}
+
+// make sure cron doesn't run multiple times in parallel
+if ($config['cron_lock'])
+{
+ // if the other process is running more than an hour already we have to assume it
+ // aborted without cleaning the lock
+ $time = explode(' ', $config['cron_lock']);
+ $time = $time[0];
+
+ if ($time + 3600 >= time())
+ {
+ exit;
+ }
+}
+
+define('CRON_ID', time() . ' ' . unique_id());
+
+$sql = 'UPDATE ' . CONFIG_TABLE . "
+ SET config_value = '" . $db->sql_escape(CRON_ID) . "'
+ WHERE config_name = 'cron_lock' AND config_value = '" . $db->sql_escape($config['cron_lock']) . "'";
+$db->sql_query($sql);
+
+// another cron process altered the table between script start and UPDATE query so exit
+if ($db->sql_affectedrows() != 1)
+{
+ exit;
+}
+
+/**
+* Run cron-like action
+* Real cron-based layer will be introduced in 3.2
+*/
+switch ($cron_type)
+{
+ case 'queue':
+
+ if (time() - $config['queue_interval'] <= $config['last_queue_run'] || !file_exists($phpbb_root_path . 'cache/queue.' . $phpEx))
+ {
+ break;
+ }
+
+ // A user reported using the mail() function while using shutdown does not work. We do not want to risk that.
+ if ($use_shutdown_function && !$config['smtp_delivery'])
+ {
+ $use_shutdown_function = false;
+ }
+
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ $queue = new queue();
+
+ if ($use_shutdown_function)
+ {
+ register_shutdown_function(array(&$queue, 'process'));
+ }
+ else
+ {
+ $queue->process();
+ }
+
+ break;
+
+ case 'tidy_cache':
+
+ if (time() - $config['cache_gc'] <= $config['cache_last_gc'] || !method_exists($cache, 'tidy'))
+ {
+ break;
+ }
+
+ if ($use_shutdown_function)
+ {
+ register_shutdown_function(array(&$cache, 'tidy'));
+ }
+ else
+ {
+ $cache->tidy();
+ }
+
+ break;
+
+ case 'tidy_search':
+
+ // Select the search method
+ $search_type = basename($config['search_type']);
+
+ if (time() - $config['search_gc'] <= $config['search_last_gc'] || !file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
+ {
+ break;
+ }
+
+ include_once("{$phpbb_root_path}includes/search/$search_type.$phpEx");
+
+ // We do some additional checks in the module to ensure it can actually be utilised
+ $error = false;
+ $search = new $search_type($error);
+
+ if ($error)
+ {
+ break;
+ }
+
+ if ($use_shutdown_function)
+ {
+ register_shutdown_function(array(&$search, 'tidy'));
+ }
+ else
+ {
+ $search->tidy();
+ }
+
+ break;
+
+ case 'tidy_warnings':
+
+ if (time() - $config['warnings_gc'] <= $config['warnings_last_gc'])
+ {
+ break;
+ }
+
+ include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+
+ if ($use_shutdown_function)
+ {
+ register_shutdown_function('tidy_warnings');
+ }
+ else
+ {
+ tidy_warnings();
+ }
+
+ break;
+
+ case 'tidy_database':
+
+ if (time() - $config['database_gc'] <= $config['database_last_gc'])
+ {
+ break;
+ }
+
+ include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+
+ if ($use_shutdown_function)
+ {
+ register_shutdown_function('tidy_database');
+ }
+ else
+ {
+ tidy_database();
+ }
+
+ break;
+
+ case 'tidy_sessions':
+
+ if (time() - $config['session_gc'] <= $config['session_last_gc'])
+ {
+ break;
+ }
+
+ if ($use_shutdown_function)
+ {
+ register_shutdown_function(array(&$user, 'session_gc'));
+ }
+ else
+ {
+ $user->session_gc();
+ }
+
+ break;
+
+ case 'prune_forum':
+
+ $forum_id = request_var('f', 0);
+
+ $sql = 'SELECT forum_id, prune_next, enable_prune, prune_days, prune_viewed, forum_flags, prune_freq
+ FROM ' . FORUMS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ break;
+ }
+
+ // Do the forum Prune thang
+ if ($row['prune_next'] < time() && $row['enable_prune'])
+ {
+ include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+
+ if ($row['prune_days'])
+ {
+ if ($use_shutdown_function)
+ {
+ register_shutdown_function('auto_prune', $row['forum_id'], 'posted', $row['forum_flags'], $row['prune_days'], $row['prune_freq']);
+ }
+ else
+ {
+ auto_prune($row['forum_id'], 'posted', $row['forum_flags'], $row['prune_days'], $row['prune_freq']);
+ }
+ }
+
+ if ($row['prune_viewed'])
+ {
+ if ($use_shutdown_function)
+ {
+ register_shutdown_function('auto_prune', $row['forum_id'], 'viewed', $row['forum_flags'], $row['prune_viewed'], $row['prune_freq']);
+ }
+ else
+ {
+ auto_prune($row['forum_id'], 'viewed', $row['forum_flags'], $row['prune_viewed'], $row['prune_freq']);
+ }
+ }
+ }
+
+ break;
+}
+
+// Unloading cache and closing db after having done the dirty work.
+if ($use_shutdown_function)
+{
+ register_shutdown_function('unlock_cron');
+ register_shutdown_function('garbage_collection');
+}
+else
+{
+ unlock_cron();
+ garbage_collection();
+}
+
+exit;
+
+
+/**
+* Unlock cron script
+*/
+function unlock_cron()
+{
+ global $db;
+
+ $sql = 'UPDATE ' . CONFIG_TABLE . "
+ SET config_value = '0'
+ WHERE config_name = 'cron_lock' AND config_value = '" . $db->sql_escape(CRON_ID) . "'";
+ $db->sql_query($sql);
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/add_permissions.php b/phpBB/develop/add_permissions.php
new file mode 100644
index 0000000000..035c23f49c
--- /dev/null
+++ b/phpBB/develop/add_permissions.php
@@ -0,0 +1,417 @@
+<?php
+// -------------------------------------------------------------
+//
+// $Id$
+//
+// FILENAME : add_permissions.php
+// STARTED : Sat Nov 06, 2004
+// COPYRIGHT : © 2004 phpBB Group
+// WWW : http://www.phpbb.com/
+// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
+//
+// -------------------------------------------------------------
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+
+// This script adds missing permissions
+$db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
+
+define('IN_PHPBB', 1);
+define('ANONYMOUS', 1);
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+$phpbb_root_path='./../';
+include($phpbb_root_path . 'config.'.$phpEx);
+require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx);
+require($phpbb_root_path . 'includes/db/' . $dbms . '.'.$phpEx);
+include($phpbb_root_path . 'includes/functions.'.$phpEx);
+
+define('ACL_NEVER', 0);
+define('ACL_YES', 1);
+define('ACL_NO', -1);
+
+define('ACL_GROUPS_TABLE', $table_prefix.'acl_groups');
+define('ACL_OPTIONS_TABLE', $table_prefix.'acl_options');
+define('ACL_USERS_TABLE', $table_prefix.'acl_users');
+define('GROUPS_TABLE', $table_prefix.'groups');
+define('USERS_TABLE', $table_prefix.'users');
+
+$cache = new acm();
+$db = new sql_db();
+
+// Connect to DB
+$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
+
+// auth => is_local, is_global
+$f_permissions = array(
+ 'f_' => array(1, 0),
+ 'f_list' => array(1, 0),
+ 'f_read' => array(1, 0),
+ 'f_post' => array(1, 0),
+ 'f_reply' => array(1, 0),
+ 'f_edit' => array(1, 0),
+ 'f_user_lock' => array(1, 0),
+ 'f_delete' => array(1, 0),
+ 'f_bump' => array(1, 0),
+ 'f_poll' => array(1, 0),
+ 'f_vote' => array(1, 0),
+ 'f_votechg' => array(1, 0),
+ 'f_announce'=> array(1, 0),
+ 'f_sticky' => array(1, 0),
+ 'f_attach' => array(1, 0),
+ 'f_download'=> array(1, 0),
+ 'f_icons' => array(1, 0),
+ 'f_bbcode' => array(1, 0),
+ 'f_smilies' => array(1, 0),
+ 'f_img' => array(1, 0),
+ 'f_flash' => array(1, 0),
+ 'f_sigs' => array(1, 0),
+ 'f_search' => array(1, 0),
+ 'f_email' => array(1, 0),
+ 'f_print' => array(1, 0),
+ 'f_ignoreflood' => array(1, 0),
+ 'f_postcount' => array(1, 0),
+ 'f_noapprove'=> array(1, 0),
+ 'f_report' => array(1, 0),
+ 'f_subscribe' => array(1, 0),
+);
+
+$m_permissions = array(
+ 'm_' => array(1, 1),
+ 'm_edit' => array(1, 1),
+ 'm_delete' => array(1, 1),
+ 'm_move' => array(1, 1),
+ 'm_lock' => array(1, 1),
+ 'm_split' => array(1, 1),
+ 'm_merge' => array(1, 1),
+ 'm_approve' => array(1, 1),
+ 'm_unrate' => array(1, 1),
+ 'm_auth' => array(1, 1),
+ 'm_ip' => array(1, 1),
+ 'm_info' => array(1, 1),
+);
+
+$a_permissions = array(
+ 'a_' => array(0, 1),
+ 'a_server' => array(0, 1),
+ 'a_board' => array(0, 1),
+ 'a_clearlogs' => array(0, 1),
+ 'a_words' => array(0, 1),
+ 'a_icons' => array(0, 1),
+ 'a_bbcode' => array(0, 1),
+ 'a_attach' => array(0, 1),
+ 'a_email' => array(0, 1),
+ 'a_styles' => array(0, 1),
+ 'a_user' => array(0, 1),
+ 'a_useradd' => array(0, 1),
+ 'a_userdel' => array(0, 1),
+ 'a_ranks' => array(0, 1),
+ 'a_ban' => array(0, 1),
+ 'a_names' => array(0, 1),
+ 'a_group' => array(0, 1),
+ 'a_groupadd'=> array(0, 1),
+ 'a_groupdel'=> array(0, 1),
+ 'a_forum' => array(0, 1),
+ 'a_forumadd'=> array(0, 1),
+ 'a_forumdel'=> array(0, 1),
+ 'a_prune' => array(0, 1),
+ 'a_auth' => array(0, 1),
+ 'a_authmods'=> array(0, 1),
+ 'a_authadmins' => array(0, 1),
+ 'a_authusers' => array(0, 1),
+ 'a_authgroups' => array(0, 1),
+ 'a_authdeps'=> array(0, 1),
+ 'a_backup' => array(0, 1),
+ 'a_restore' => array(0, 1),
+ 'a_search' => array(0, 1),
+ 'a_events' => array(0, 1),
+ 'a_cron' => array(0, 1),
+);
+
+$u_permissions = array(
+ 'u_' => array(0, 1),
+ 'u_sendemail' => array(0, 1),
+ 'u_readpm' => array(0, 1),
+ 'u_sendpm' => array(0, 1),
+ 'u_sendim' => array(0, 1),
+ 'u_hideonline' => array(0, 1),
+ 'u_viewonline' => array(0, 1),
+ 'u_viewprofile' => array(0, 1),
+ 'u_chgavatar' => array(0, 1),
+ 'u_chggrp' => array(0, 1),
+ 'u_chgemail' => array(0, 1),
+ 'u_chgname' => array(0, 1),
+ 'u_chgpasswd' => array(0, 1),
+ 'u_chgcensors' => array(0, 1),
+ 'u_search' => array(0, 1),
+ 'u_savedrafts' => array(0, 1),
+ 'u_download' => array(0, 1),
+ 'u_attach' => array(0, 1),
+ 'u_sig' => array(0, 1),
+ 'u_pm_attach' => array(0, 1),
+ 'u_pm_bbcode' => array(0, 1),
+ 'u_pm_smilies' => array(0, 1),
+ 'u_pm_download' => array(0, 1),
+ 'u_pm_edit' => array(0, 1),
+ 'u_pm_printpm' => array(0, 1),
+ 'u_pm_emailpm' => array(0, 1),
+ 'u_pm_forward' => array(0, 1),
+ 'u_pm_delete' => array(0, 1),
+ 'u_pm_img' => array(0, 1),
+ 'u_pm_flash' => array(0, 1),
+);
+
+echo "<p><b>Determining existing permissions</b></p>\n";
+
+$sql = 'SELECT auth_option_id, auth_option FROM ' . ACL_OPTIONS_TABLE;
+$result = $db->sql_query($sql);
+
+$remove_auth_options = array();
+while ($row = $db->sql_fetchrow($result))
+{
+ if (!in_array($row['auth_option'], array_keys(${substr($row['auth_option'], 0, 2) . 'permissions'})))
+ {
+ $remove_auth_options[$row['auth_option']] = $row['auth_option_id'];
+ }
+ unset(${substr($row['auth_option'], 0, 2) . 'permissions'}[$row['auth_option']]);
+}
+$db->sql_freeresult($result);
+
+if (sizeof($remove_auth_options))
+{
+ $db->sql_query('DELETE FROM ' . ACL_USERS_TABLE . ' WHERE auth_option_id IN (' . implode(', ', $remove_auth_options) . ')');
+ $db->sql_query('DELETE FROM ' . ACL_GROUPS_TABLE . ' WHERE auth_option_id IN (' . implode(', ', $remove_auth_options) . ')');
+ $db->sql_query('DELETE FROM ' . ACL_OPTIONS_TABLE . ' WHERE auth_option_id IN (' . implode(', ', $remove_auth_options) . ')');
+
+ echo '<p><b>Removed the following auth options... [<i>' . implode(', ', array_keys($remove_auth_options)) . "</i>]</b></p>\n\n";
+}
+
+$prefixes = array('f_', 'a_', 'm_', 'u_');
+
+foreach ($prefixes as $prefix)
+{
+ $var = $prefix . 'permissions';
+ if (sizeof($$var))
+ {
+ foreach ($$var as $auth_option => $l_ary)
+ {
+ $sql_ary = array(
+ 'auth_option' => $auth_option,
+ 'is_local' => $l_ary[0],
+ 'is_global' => $l_ary[1]
+ );
+
+ $db->sql_query('INSERT INTO ' . ACL_OPTIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+
+ echo "<p><b>Adding $auth_option...</b></p>\n";
+
+ mass_auth('group', 0, 'guests', $auth_option, ACL_NEVER);
+ mass_auth('group', 0, 'inactive', $auth_option, ACL_NEVER);
+ mass_auth('group', 0, 'inactive_coppa', $auth_option, ACL_NEVER);
+ mass_auth('group', 0, 'registered_coppa', $auth_option, ACL_NEVER);
+ mass_auth('group', 0, 'registered', $auth_option, (($prefix != 'm_' && $prefix != 'a_') ? ACL_YES : ACL_NEVER));
+ mass_auth('group', 0, 'global_moderators', $auth_option, (($prefix != 'a_') ? ACL_YES : ACL_NEVER));
+ mass_auth('group', 0, 'administrators', $auth_option, ACL_YES);
+ mass_auth('group', 0, 'bots', $auth_option, (($prefix != 'm_' && $prefix != 'a_') ? ACL_YES : ACL_NEVER));
+ }
+ }
+}
+
+$sql = 'UPDATE ' . USERS_TABLE . " SET user_permissions = ''";
+$db->sql_query($sql);
+
+$cache->destroy('_acl_options');
+
+echo "<p><b>Done</b></p>\n";
+
+/*
+ $ug_type = user|group
+ $forum_id = forum ids (array|int|0) -> 0 == all forums
+ $ug_id = [int] user_id|group_id : [string] usergroup name
+ $acl_list = [string] acl entry : [array] acl entries
+ $setting = ACL_YES|ACL_NEVER|ACL_NO
+*/
+function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
+{
+ global $db;
+ static $acl_option_ids, $group_ids;
+
+ if ($ug_type == 'group' && is_string($ug_id))
+ {
+ if (!isset($group_ids[$ug_id]))
+ {
+ $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . "
+ WHERE group_name = '" . strtoupper($ug_id) . "'";
+ $result = $db->sql_query_limit($sql, 1);
+ $id = (int) $db->sql_fetchfield('group_id', 0, $result);
+ $db->sql_freeresult($result);
+
+ if (!$id)
+ {
+ return;
+ }
+
+ $group_ids[$ug_id] = $id;
+ }
+
+ $ug_id = (int) $group_ids[$ug_id];
+ }
+
+ // Build correct parameters
+ $auth = array();
+
+ if (!is_array($acl_list))
+ {
+ $auth = array($acl_list => $setting);
+ }
+ else
+ {
+ foreach ($acl_list as $auth_option)
+ {
+ $auth[$auth_option] = $setting;
+ }
+ }
+ unset($acl_list);
+
+ if (!is_array($forum_id))
+ {
+ $forum_id = array($forum_id);
+ }
+
+ // Set any flags as required
+ foreach ($auth as $auth_option => $acl_setting)
+ {
+ $flag = substr($auth_option, 0, strpos($auth_option, '_') + 1);
+ if (empty($auth[$flag]))
+ {
+ $auth[$flag] = $acl_setting;
+ }
+ }
+
+ if (!is_array($acl_option_ids) || empty($acl_option_ids))
+ {
+ $sql = 'SELECT auth_option_id, auth_option
+ FROM ' . ACL_OPTIONS_TABLE;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $acl_option_ids[$row['auth_option']] = $row['auth_option_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ $sql_forum = 'AND a.forum_id IN (' . implode(', ', array_map('intval', $forum_id)) . ')';
+
+ $sql = ($ug_type == 'user') ? 'SELECT o.auth_option_id, o.auth_option, a.forum_id, a.auth_setting FROM ' . ACL_USERS_TABLE . ' a, ' . ACL_OPTIONS_TABLE . " o WHERE a.auth_option_id = o.auth_option_id $sql_forum AND a.user_id = $ug_id" : 'SELECT o.auth_option_id, o.auth_option, a.forum_id, a.auth_setting FROM ' . ACL_GROUPS_TABLE . ' a, ' . ACL_OPTIONS_TABLE . " o WHERE a.auth_option_id = o.auth_option_id $sql_forum AND a.group_id = $ug_id";
+ $result = $db->sql_query($sql);
+
+ $cur_auth = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $cur_auth[$row['forum_id']][$row['auth_option_id']] = $row['auth_setting'];
+ }
+ $db->sql_freeresult($result);
+
+ $table = ($ug_type == 'user') ? ACL_USERS_TABLE : ACL_GROUPS_TABLE;
+ $id_field = $ug_type . '_id';
+
+ $sql_ary = array();
+ foreach ($forum_id as $forum)
+ {
+ foreach ($auth as $auth_option => $setting)
+ {
+ $auth_option_id = $acl_option_ids[$auth_option];
+
+ if (!$auth_option_id)
+ {
+ continue;
+ }
+
+ switch ($setting)
+ {
+ case ACL_NO:
+ if (isset($cur_auth[$forum][$auth_option_id]))
+ {
+ $sql_ary['delete'][] = "DELETE FROM $table
+ WHERE forum_id = $forum
+ AND auth_option_id = $auth_option_id
+ AND $id_field = $ug_id";
+ }
+ break;
+
+ default:
+ if (!isset($cur_auth[$forum][$auth_option_id]))
+ {
+ $sql_ary['insert'][] = "$ug_id, $forum, $auth_option_id, $setting";
+ }
+ else if ($cur_auth[$forum][$auth_option_id] != $setting)
+ {
+ $sql_ary['update'][] = "UPDATE " . $table . "
+ SET auth_setting = $setting
+ WHERE $id_field = $ug_id
+ AND forum_id = $forum
+ AND auth_option_id = $auth_option_id";
+ }
+ }
+ }
+ }
+ unset($cur_auth);
+
+ $sql = '';
+ foreach ($sql_ary as $sql_type => $sql_subary)
+ {
+ switch ($sql_type)
+ {
+ case 'insert':
+ switch ($db->sql_layer)
+ {
+ case 'mysql':
+ case 'mysql4':
+ $sql = 'VALUES ' . implode(', ', preg_replace('#^(.*?)$#', '(\1)', $sql_subary));
+ break;
+
+ case 'mssql':
+ case 'sqlite':
+ $sql = implode(' UNION ALL ', preg_replace('#^(.*?)$#', 'SELECT \1', $sql_subary));
+ break;
+
+ default:
+ foreach ($sql_subary as $sql)
+ {
+ $sql = "INSERT INTO $table ($id_field, forum_id, auth_option_id, auth_setting) VALUES ($sql)";
+ $result = $db->sql_query($sql);
+ $sql = '';
+ }
+ }
+
+ if ($sql != '')
+ {
+ $sql = "INSERT INTO $table ($id_field, forum_id, auth_option_id, auth_setting) $sql";
+ $result = $db->sql_query($sql);
+ }
+ break;
+
+ case 'update':
+ case 'delete':
+ foreach ($sql_subary as $sql)
+ {
+ $result = $db->sql_query($sql);
+ $sql = '';
+ }
+ break;
+ }
+ unset($sql_ary[$sql_type]);
+ }
+ unset($sql_ary);
+
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/adjust_avatars.php b/phpBB/develop/adjust_avatars.php
new file mode 100644
index 0000000000..81599e694b
--- /dev/null
+++ b/phpBB/develop/adjust_avatars.php
@@ -0,0 +1,147 @@
+<?php
+/**
+* Corrects avatar filenames to match the new avatar delivery method.
+*
+* You should make a backup from your users table and the avatar directory in case something goes wrong
+*/
+die("Please read the first lines of this script for instructions on how to enable it");
+
+set_time_limit(0);
+
+define('IN_PHPBB', true);
+$phpbb_root_path = './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.'.$phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup();
+
+$echos = 0;
+
+if (!isset($config['avatar_salt']))
+{
+ $cache->purge();
+ if (!isset($config['avatar_salt']))
+ {
+ die('database not up to date');
+ }
+ die('database not up to date');
+}
+
+// let's start with the users using a group_avatar.
+$sql = 'SELECT group_id, group_avatar
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_avatar_type = ' . AVATAR_UPLOAD;
+
+// We'll skip these, so remember them
+$group_avatars = array();
+
+echo '<br /> Updating groups' . "\n";
+
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $new_avatar_name = adjust_avatar($row['group_avatar'], 'g' . $row['group_id']);
+ $group_avatars[] = $new_avatar_name;
+
+ // failure is probably due to the avatar name already being adjusted
+ if ($new_avatar_name !== false)
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_avatar = '" . $db->sql_escape($new_avatar_name) . "'
+ WHERE user_avatar = '" . $db->sql_escape($row['group_avatar']) . "'
+ AND user_avatar_type = " . AVATAR_UPLOAD;
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . GROUPS_TABLE . "
+ SET group_avatar = '" . $db->sql_escape($new_avatar_name) . "'
+ WHERE group_id = {$row['group_id']}";
+ $db->sql_query($sql);
+ }
+ else
+ {
+ echo '<br /> Failed updating group ' . $row['group_id'] . "\n";
+ }
+
+ if ($echos > 200)
+ {
+ echo '<br />' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+}
+$db->sql_freeresult($result);
+
+$sql = 'SELECT user_id, username, user_avatar, user_avatar_type
+ FROM ' . USERS_TABLE . '
+ WHERE user_avatar_type = ' . AVATAR_UPLOAD . '
+ AND ' . $db->sql_in_set('user_avatar', $group_avatars, true, true);
+$result = $db->sql_query($sql);
+
+echo '<br /> Updating users' . "\n";
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $new_avatar_name = adjust_avatar($row['user_avatar'], $row['user_id']);
+
+ // failure is probably due to the avatar name already being adjusted
+ if ($new_avatar_name !== false)
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_avatar = '" . $db->sql_escape($new_avatar_name) . "'
+ WHERE user_id = {$row['user_id']}";
+ $db->sql_query($sql);
+ }
+ else
+ {
+ // nuke this avatar
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_avatar = '', user_avatar_type = 0
+ WHERE user_id = {$row['user_id']}";
+ $db->sql_query($sql);
+ echo '<br /> Failed updating user ' . $row['user_id'] . "\n";
+ }
+
+ if ($echos > 200)
+ {
+ echo '<br />' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+}
+
+$db->sql_freeresult($result);
+
+echo 'FINISHED';
+
+// Done
+$db->sql_close();
+
+function adjust_avatar($old_name, $midfix)
+{
+ global $config, $phpbb_root_path;
+
+ $avatar_path = $phpbb_root_path . $config['avatar_path'];
+ $extension = strtolower(substr(strrchr($old_name, '.'), 1));
+ $new_name = $config['avatar_salt'] . '_' . $midfix . '.' . $extension;
+
+ if (@file_exists($avatar_path . '/' . $old_name) && @is_writable($avatar_path . '/' . $old_name) && @is_writable($avatar_path . '/' . $new_name))
+ {
+ @rename($avatar_path . '/' . $old_name, $avatar_path . '/' . $new_name);
+ return $midfix . '.' . $extension;
+ }
+ return false;
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/adjust_bbcodes.php b/phpBB/develop/adjust_bbcodes.php
new file mode 100644
index 0000000000..f06f0112ab
--- /dev/null
+++ b/phpBB/develop/adjust_bbcodes.php
@@ -0,0 +1,174 @@
+<?php
+/**
+* Only adjust bitfields, do not rewrite text...
+* All new parsings have the img, flash and quote modes set to true
+*
+* You should make a backup from your users, posts and privmsgs table in case something goes wrong
+* Forum descriptions and rules need to be re-submitted manually.
+*/
+die("Please read the first lines of this script for instructions on how to enable it");
+
+set_time_limit(0);
+
+define('IN_PHPBB', true);
+$phpbb_root_path = './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.'.$phpEx);
+include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup();
+
+$echos = 0;
+
+// Adjust user signatures
+$message_parser = new parse_message();
+$message_parser->mode = 'sig';
+$message_parser->bbcode_init();
+
+$sql = 'SELECT user_id, user_sig, user_sig_bbcode_uid, user_sig_bbcode_bitfield
+ FROM ' . USERS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ // Convert bbcodes back to their normal form
+ if ($row['user_sig_bbcode_uid'] && $row['user_sig'])
+ {
+ decode_message($row['user_sig'], $row['user_sig_bbcode_uid']);
+
+ $message_parser->message = $row['user_sig'];
+
+ $message_parser->prepare_bbcodes();
+ $message_parser->parse_bbcode();
+
+ $bitfield = $message_parser->bbcode_bitfield;
+
+ $sql = 'UPDATE ' . USERS_TABLE . " SET user_sig_bbcode_bitfield = '" . $db->sql_escape($bitfield) . "'
+ WHERE user_id = " . $row['user_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo '<br />' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+ else
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . " SET user_sig_bbcode_bitfield = ''
+ WHERE user_id = " . $row['user_id'];
+ $db->sql_query($sql);
+ }
+}
+$db->sql_freeresult($result);
+
+
+// Now adjust posts
+
+$message_parser = new parse_message();
+$message_parser->mode = 'post';
+$message_parser->bbcode_init();
+
+// Update posts
+$sql = 'SELECT post_id, post_text, bbcode_uid, enable_bbcode, enable_smilies, enable_sig
+ FROM ' . POSTS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ // Convert bbcodes back to their normal form
+ if ($row['enable_bbcode'])
+ {
+ decode_message($row['post_text'], $row['bbcode_uid']);
+
+ $message_parser->message = $row['post_text'];
+
+ $message_parser->prepare_bbcodes();
+ $message_parser->parse_bbcode();
+
+ $bitfield = $message_parser->bbcode_bitfield;
+
+ $sql = 'UPDATE ' . POSTS_TABLE . " SET bbcode_bitfield = '" . $db->sql_escape($bitfield) . "'
+ WHERE post_id = " . $row['post_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo '<br />' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+ else
+ {
+ $sql = 'UPDATE ' . POSTS_TABLE . " SET bbcode_bitfield = ''
+ WHERE post_id = " . $row['post_id'];
+ $db->sql_query($sql);
+ }
+}
+$db->sql_freeresult($result);
+
+// Now to the private messages
+$message_parser = new parse_message();
+$message_parser->mode = 'post';
+$message_parser->bbcode_init();
+
+// Update pms
+$sql = 'SELECT msg_id, message_text, bbcode_uid, enable_bbcode
+ FROM ' . PRIVMSGS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ // Convert bbcodes back to their normal form
+ if ($row['enable_bbcode'])
+ {
+ decode_message($row['message_text'], $row['bbcode_uid']);
+
+ $message_parser->message = $row['message_text'];
+
+ $message_parser->prepare_bbcodes();
+ $message_parser->parse_bbcode();
+
+ $bitfield = $message_parser->bbcode_bitfield;
+
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET bbcode_bitfield = '" . $db->sql_escape($bitfield) . "'
+ WHERE msg_id = " . $row['msg_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo '<br />' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+ else
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET bbcode_bitfield = ''
+ WHERE msg_id = " . $row['msg_id'];
+ $db->sql_query($sql);
+ }
+}
+$db->sql_freeresult($result);
+
+// Done
+$db->sql_close();
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/adjust_magic_urls.php b/phpBB/develop/adjust_magic_urls.php
new file mode 100644
index 0000000000..1430a47a12
--- /dev/null
+++ b/phpBB/develop/adjust_magic_urls.php
@@ -0,0 +1,126 @@
+<?php
+/**
+* Adds class="postlink" to magic urls
+*
+* You should make a backup from your users, posts and privmsgs table in case something goes wrong
+* Forum descriptions and rules need to be re-submitted manually.
+*/
+die("Please read the first lines of this script for instructions on how to enable it");
+
+set_time_limit(0);
+
+define('IN_PHPBB', true);
+$phpbb_root_path = './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.'.$phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup();
+
+$echos = 0;
+
+$replace = array(
+ '<!-- l --><a href="',
+ '<!-- m --><a href="',
+ '<!-- w --><a href="',
+);
+$with = array(
+ '<!-- l --><a class="postlink-local" href="',
+ '<!-- m --><a class="postlink" href="',
+ '<!-- w --><a class="postlink" href="',
+);
+
+// Adjust user signatures
+$sql = 'SELECT user_id, user_sig
+ FROM ' . USERS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $new_content = str_replace($replace, $with, $row['user_sig']);
+
+ if ($new_content != $row['user_sig'])
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . " SET user_sig = '" . $db->sql_escape($new_content) . "'
+ WHERE user_id = " . $row['user_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo '<br />' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+}
+$db->sql_freeresult($result);
+
+
+// Now adjust posts
+$sql = 'SELECT post_id, post_text
+ FROM ' . POSTS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $new_content = str_replace($replace, $with, $row['post_text']);
+
+ if ($row['post_text'] != $new_content)
+ {
+ $sql = 'UPDATE ' . POSTS_TABLE . " SET post_text = '" . $db->sql_escape($new_content) . "'
+ WHERE post_id = " . $row['post_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo '<br />' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+}
+$db->sql_freeresult($result);
+
+// Now to the private messages
+$sql = 'SELECT msg_id, message_text
+ FROM ' . PRIVMSGS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $new_content = str_replace($replace, $with, $row['message_text']);
+
+ if ($row['message_text'] != $new_content)
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET bbcode_bitfield = '" . $db->sql_escape($new_content) . "'
+ WHERE msg_id = " . $row['msg_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo '<br />' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+}
+$db->sql_freeresult($result);
+
+// Done
+$db->sql_close();
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/adjust_sizes.php b/phpBB/develop/adjust_sizes.php
new file mode 100644
index 0000000000..7d72813056
--- /dev/null
+++ b/phpBB/develop/adjust_sizes.php
@@ -0,0 +1,132 @@
+<?php
+/**
+* Only adjust the [size] bbcode tag from pc to percent.
+*
+* You should make a backup from your users, posts and privmsgs table in case something goes wrong
+* Forum descriptions and rules need to be re-submitted manually if they use the [size] tag.
+*
+* Since we limit the match to the sizes from 0 to 29 no newly applied sizes should be affected...
+*/
+die("Please read the first lines of this script for instructions on how to enable it");
+
+set_time_limit(0);
+@ini_set('memory_limit', '128M');
+
+define('IN_PHPBB', true);
+$phpbb_root_path = './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.'.$phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup();
+
+$echos = 0;
+
+function replace_size($matches)
+{
+ return '[size=' . ceil(100.0 * (((double) $matches[1])/12.0)) . ':' . $matches[2] . ']';
+}
+
+// Adjust user signatures
+$sql = 'SELECT user_id, user_sig, user_sig_bbcode_uid
+ FROM ' . USERS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $bbcode_uid = $row['user_sig_bbcode_uid'];
+
+ // Only if a bbcode uid is present, the signature present and a size tag used...
+ if ($bbcode_uid && $row['user_sig'] && strpos($row['user_sig'], '[size=') !== false)
+ {
+ $row['user_sig'] = preg_replace_callback('/\[size=(\d*):(' . $bbcode_uid . ')\]/', 'replace_size', $row['user_sig']);
+
+ $sql = 'UPDATE ' . USERS_TABLE . " SET user_sig = '" . $db->sql_escape($row['user_sig']) . "'
+ WHERE user_id = " . $row['user_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo '<br />' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+}
+$db->sql_freeresult($result);
+
+
+// Now adjust posts
+$sql = 'SELECT post_id, post_text, bbcode_uid, enable_bbcode
+ FROM ' . POSTS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $bbcode_uid = $row['bbcode_uid'];
+
+ // Only if a bbcode uid is present, bbcode enabled and a size tag used...
+ if ($row['enable_bbcode'] && $bbcode_uid && strpos($row['post_text'], '[size=') !== false)
+ {
+ $row['post_text'] = preg_replace_callback('/\[size=(\d*):' . $bbcode_uid . '\]/', 'replace_size', $row['post_text']);
+
+ $sql = 'UPDATE ' . POSTS_TABLE . " SET post_text = '" . $db->sql_escape($row['post_text']) . "'
+ WHERE post_id = " . $row['post_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo '<br />' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+}
+$db->sql_freeresult($result);
+
+// Now to the private messages
+$sql = 'SELECT msg_id, message_text, bbcode_uid, enable_bbcode
+ FROM ' . PRIVMSGS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $bbcode_uid = $row['bbcode_uid'];
+
+ // Only if a bbcode uid is present, bbcode enabled and a size tag used...
+ if ($row['enable_bbcode'] && $bbcode_uid && strpos($row['message_text'], '[size=') !== false)
+ {
+ $row['message_text'] = preg_replace_callback('/\[size=(\d*):' . $bbcode_uid . '\]/', 'replace_size', $row['message_text']);
+
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET message_text = '" . $db->sql_escape($row['message_text']) . "'
+ WHERE msg_id = " . $row['msg_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo '<br />' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+}
+$db->sql_freeresult($result);
+
+// Done
+$db->sql_close();
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/adjust_smilies.php b/phpBB/develop/adjust_smilies.php
new file mode 100644
index 0000000000..774c8834f6
--- /dev/null
+++ b/phpBB/develop/adjust_smilies.php
@@ -0,0 +1,130 @@
+<?php
+/**
+* Updates smilies that were changed to the new ones
+*/
+die("Please read the first lines of this script for instructions on how to enable it");
+
+set_time_limit(0);
+
+define('IN_PHPBB', true);
+$phpbb_root_path = './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.'.$phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup();
+
+$echos = 0;
+
+$replace = array(
+ '<img src="{SMILIES_PATH}/icon_biggrin.gif',
+ '<img src="{SMILIES_PATH}/icon_confused.gif',
+ '<img src="{SMILIES_PATH}/icon_sad.gif',
+ '<img src="{SMILIES_PATH}/icon_smile.gif',
+ '<img src="{SMILIES_PATH}/icon_surprised.gif',
+ '<img src="{SMILIES_PATH}/icon_wink.gif',
+);
+
+$with = array(
+ '<img src="{SMILIES_PATH}/icon_e_biggrin.gif',
+ '<img src="{SMILIES_PATH}/icon_e_confused.gif',
+ '<img src="{SMILIES_PATH}/icon_e_sad.gif',
+ '<img src="{SMILIES_PATH}/icon_e_smile.gif',
+ '<img src="{SMILIES_PATH}/icon_e_surprised.gif',
+ '<img src="{SMILIES_PATH}/icon_e_wink.gif',
+);
+
+// Adjust user signatures
+$sql = 'SELECT user_id, user_sig
+ FROM ' . USERS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $new_content = str_replace($replace, $with, $row['user_sig']);
+
+ if ($new_content != $row['user_sig'])
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . " SET user_sig = '" . $db->sql_escape($new_content) . "'
+ WHERE user_id = " . $row['user_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo '<br />' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+}
+$db->sql_freeresult($result);
+
+
+// Now adjust posts
+$sql = 'SELECT post_id, post_text
+ FROM ' . POSTS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $new_content = str_replace($replace, $with, $row['post_text']);
+
+ if ($row['post_text'] != $new_content)
+ {
+ $sql = 'UPDATE ' . POSTS_TABLE . " SET post_text = '" . $db->sql_escape($new_content) . "'
+ WHERE post_id = " . $row['post_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo '<br />' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+}
+$db->sql_freeresult($result);
+
+// Now to the private messages
+$sql = 'SELECT msg_id, message_text
+ FROM ' . PRIVMSGS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $new_content = str_replace($replace, $with, $row['message_text']);
+
+ if ($row['message_text'] != $new_content)
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET bbcode_bitfield = '" . $db->sql_escape($new_content) . "'
+ WHERE msg_id = " . $row['msg_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo '<br />' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+}
+$db->sql_freeresult($result);
+
+// Done
+$db->sql_close();
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/adjust_uids.php b/phpBB/develop/adjust_uids.php
new file mode 100644
index 0000000000..d301f3cadb
--- /dev/null
+++ b/phpBB/develop/adjust_uids.php
@@ -0,0 +1,129 @@
+<?php
+/**
+* Repair bbcodes converted with RC6
+*
+* You should make a backup from your users, posts and privmsgs table in case something goes wrong
+* Forum descriptions and rules need to be re-submitted manually
+*
+*/
+die("Please read the first lines of this script for instructions on how to enable it");
+
+set_time_limit(0);
+@ini_set('memory_limit', '512M');
+
+define('IN_PHPBB', true);
+$phpbb_root_path = './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.'.$phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup();
+
+$echos = 0;
+
+
+// Adjust user signatures
+$sql = 'SELECT user_id, user_sig, user_sig_bbcode_uid
+ FROM ' . USERS_TABLE . '
+ ORDER BY user_id ASC';
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $bbcode_uid = $row['user_sig_bbcode_uid'];
+
+ // Only if a bbcode uid is present, the signature present and a size tag used...
+ if (!empty($bbcode_uid) && strpos($row['user_sig'], $bbcode_uid) === false)
+ {
+ $row['user_sig'] = preg_replace('/\:[0-9a-z]{8}\]/', ":$bbcode_uid]", $row['user_sig']);
+
+ $sql = 'UPDATE ' . USERS_TABLE . " SET user_sig = '" . $db->sql_escape($row['user_sig']) . "'
+ WHERE user_id = " . $row['user_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo '<br />User: ' . "{$row['user_id']}\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+}
+$db->sql_freeresult($result);
+
+
+// Now adjust posts
+$sql = 'SELECT post_id, post_text, bbcode_uid, enable_bbcode
+ FROM ' . POSTS_TABLE . '
+ ORDER BY post_id ASC';
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $bbcode_uid = $row['bbcode_uid'];
+
+ // Only if a bbcode uid is present, bbcode enabled and a size tag used...
+ if ($row['enable_bbcode'] && !empty($bbcode_uid) && strpos($row['post_text'], $bbcode_uid) === false)
+ {
+ $row['post_text'] = preg_replace('/\:[0-9a-z]{8}\]/', ":$bbcode_uid]", $row['post_text']);
+
+ $sql = 'UPDATE ' . POSTS_TABLE . " SET post_text = '" . $db->sql_escape($row['post_text']) . "'
+ WHERE post_id = " . $row['post_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo '<br />Post: ' . "{$row['post_id']} \n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+}
+$db->sql_freeresult($result);
+
+// Now to the private messages
+$sql = 'SELECT msg_id, message_text, bbcode_uid, enable_bbcode
+ FROM ' . PRIVMSGS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $bbcode_uid = $row['bbcode_uid'];
+
+ // Only if a bbcode uid is present, bbcode enabled and a size tag used...
+ if ($row['enable_bbcode'] && !empty($bbcode_uid) && strpos($row['message_text'], $bbcode_uid) === false)
+ {
+ $row['message_text'] = preg_replace('/\:[0-9a-z]{8}\]/', ":$bbcode_uid]", $row['message_text']);
+
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET message_text = '" . $db->sql_escape($row['message_text']) . "'
+ WHERE msg_id = " . $row['msg_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo '<br />' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+}
+$db->sql_freeresult($result);
+
+// Done
+$db->sql_close();
+echo 'done';
+?> \ No newline at end of file
diff --git a/phpBB/develop/adjust_usernames.php b/phpBB/develop/adjust_usernames.php
new file mode 100644
index 0000000000..1afa77af16
--- /dev/null
+++ b/phpBB/develop/adjust_usernames.php
@@ -0,0 +1,52 @@
+<?php
+/**
+* Adjust username_clean column.
+*
+* You should make a backup from your users table in case something goes wrong
+*/
+die("Please read the first lines of this script for instructions on how to enable it");
+
+set_time_limit(0);
+
+define('IN_PHPBB', true);
+$phpbb_root_path = './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.'.$phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup();
+
+$echos = 0;
+
+$sql = 'SELECT user_id, username
+ FROM ' . USERS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET username_clean = '" . $db->sql_escape(utf8_clean_string($row['username'])) . "'
+ WHERE user_id = " . $row['user_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo '<br />' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+}
+$db->sql_freeresult($result);
+
+echo 'FINISHED';
+
+// Done
+$db->sql_close();
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php
new file mode 100644
index 0000000000..5bbe6f53be
--- /dev/null
+++ b/phpBB/develop/benchmark.php
@@ -0,0 +1,462 @@
+<?php
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+//
+// Do not change anything below this line.
+//
+
+
+$phpbb_root_path = "../";
+include($phpbb_root_path . 'extension.inc');
+include($phpbb_root_path . 'common.'.$phpEx);
+include($phpbb_root_path . 'includes/post.'.$phpEx);
+include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
+
+srand ((double) microtime() * 1000000);
+set_time_limit(240*60);
+
+// Here's the text we stick in posts..
+$bigass_text = '
+phpBB BBCode test suite v0.0.2
+auto-linkification:
+http://something.com
+www.something.com
+nate@phpbb.com
+http://something.com/foo.php?this=that&theother=some%20encoded%20string is a link.
+[code]
+Simple code block with some <html> <tags>.
+[/code]
+[b]bolded[/b], [i]italic[/i]
+[email]james@totalgeek.org[/email]
+[url=http://www.totalgeek.org]totalgeek.org[/url]
+[url]www.totalgeek.org[/url]
+[list]
+[*] This is the first bulleted item.
+[*] This is the second bulleted item.
+[/list]
+[list=A]
+[*] This is the first bulleted item.
+[*] This is the second bulleted item.
+[/list]
+[quote]
+And a quote!
+[/quote]
+';
+
+
+// The script expects the ID's in the tables to sequential (1,2,3,4,5),
+// so no holes please (1,4,5,8)...
+$nr_of_users = nrof(USERS_TABLE);
+$nr_of_cats = nrof(CATEGORIES_TABLE);
+$nr_of_forums = nrof(FORUMS_TABLE);
+$nr_of_posts = nrof(POSTS_TABLE);
+
+$u = $users;
+
+$starttime = microtime();
+
+$usercreationcount = 0;
+while($users > 0)
+{
+
+ $name = "testuser_" . substr(md5(uniqid(rand())), 0, 10);
+ if (make_user($name))
+ {
+ $usercreationcount++;
+ $users--;
+ }
+ if (($usercreationcount % 500) == 0)
+ {
+ echo "status: $usercreationcount <br>\n";
+ flush();
+ }
+
+}
+
+if ($posts > 0)
+{
+ filldb($posts);
+}
+
+$endtime = microtime();
+
+if ($submit="" || !isset($submit))
+{
+ ?>
+Hello, welcome to this little phpBB Benchmarking script :)<p>
+
+At the moment there are:<br>
+
+<table>
+<tr><td align="right"><?php echo $nr_of_users?></td><td>Users</td></tr>
+<tr><td align="right"><?php echo $nr_of_forums?></td><td>Forums</td></tr>
+<tr><td align="right"><?php echo $nr_of_posts?></td><td>Posts</td></tr>
+</table>
+<p>
+What do you want to create?<p>
+
+<form method="get" action="<?php echo $PHP_SELF?>">
+<input type="text" name="users" size="3"> Users<br>
+<input type="text" name="posts" size="3"> Posts/topics (optional: post size in <input type="text" name="size" size="3"> bytes)<br>
+<input type="submit" name="submit">
+</form>
+
+ <?php
+}
+else
+{
+
+ list ($starttime_msec,$starttime_sec) = explode(" ",$starttime);
+ list ($endtime_msec,$endtime_sec) = explode(" ",$endtime);
+ $timetaken_sec = ($endtime_sec+$endtime_msec) - ($starttime_sec+$starttime_msec);
+ print "<B>TIME TAKEN : ".$timetaken_sec."s</B><BR>\n";
+
+ print "<p>\n<a href=\"$PHP_SELF\">Back to the overview page</a>\n";
+}
+
+
+function filldb($newposts)
+{
+ global $nr_of_forums;
+ global $nr_of_users;
+
+ $forum_topic_counts = array();
+
+ for ($i = 1; $i <= $nr_of_forums; $i++)
+ {
+ $forum_topic_counts[$i] = get_topic_count($i);
+ }
+
+ for($i = 0; $i < $newposts; $i++)
+ {
+ $userid = rand(2, $nr_of_users - 1);
+ $forum = rand(1,$nr_of_forums);
+
+ if ((rand(0,30) < 1) || ($forum_topic_count[$forum] == 0))
+ {
+ // create a new topic 1 in 30 times (or when there are none);
+ $topic = make_topic($userid, "Testing topic $i", $forum);
+ $forum_topic_count[$forum]++;
+ }
+ else
+ {
+ // Otherwise create a reply(posting) somewhere.
+ $topic = get_smallest_topic($forum);
+ create_posting($userid, $topic, $forum, "reply");
+ }
+
+ if (($i % 1000) == 0)
+ {
+ echo "status: $i <br>";
+ flush();
+ }
+
+ }
+}
+
+
+function get_smallest_topic($forum_id)
+{
+ global $db;
+
+ $sql = "SELECT topic_id
+ FROM " . TOPICS_TABLE . "
+ WHERE (forum_id = $forum_id)
+ ORDER BY topic_replies ASC LIMIT 1";
+ if($result = $db->sql_query($sql))
+ {
+ $row = $db->sql_fetchrow($result);
+ $topic_id = $row['topic_id'];
+
+ unset($result);
+ unset($row);
+ return $topic_id;
+ }
+ else
+ {
+ message_die(GENERAL_ERROR, "Couldn't get smallest topic.", "", __LINE__, __FILE__, $sql);
+ }
+
+}
+
+
+function get_topic_count($forum_id)
+{
+ global $db;
+
+ $sql = "SELECT forum_topics
+ FROM " . FORUMS_TABLE . "
+ WHERE (forum_id = $forum_id)";
+ if($result = $db->sql_query($sql))
+ {
+ $row = $db->sql_fetchrow($result);
+ $topic_count = $row['forum_topics'];
+
+ unset($result);
+ unset($row);
+ return $topic_count;
+ }
+ else
+ {
+ message_die(GENERAL_ERROR, "Couldn't get topic count.", "", __LINE__, __FILE__, $sql);
+ }
+
+}
+
+
+function make_topic($user_id, $subject, $forum_id)
+{
+ global $db;
+ $topic_type = POST_NORMAL;
+ $topic_vote = 0;
+ $current_time = time();
+
+ $sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote)
+ VALUES ('$subject', $user_id, $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)";
+
+ if( $result = $db->sql_query($sql, BEGIN_TRANSACTION) )
+ {
+ $new_topic_id = $db->sql_nextid();
+ }
+ else
+ {
+ message_die(GENERAL_ERROR, "Error inserting data into topics table", "", __LINE__, __FILE__, $sql);
+ }
+
+ create_posting($user_id, $new_topic_id, $forum_id);
+
+ return $new_topic_id;
+}
+
+
+
+function create_posting($userid, $topic_id, $forum, $mode='newtopic')
+{
+ $message = generatepost();
+
+ return make_post($topic_id, $forum, $userid, "", $message, $mode);
+
+}
+
+
+
+function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $mode='newtopic')
+{
+ global $db;
+ $current_time = time();
+ $user_ip = "ac100202";
+ $bbcode_on = 1;
+ $html_on = 1;
+ $smilies_on = 1;
+ $attach_sig = 1;
+ $bbcode_uid = make_bbcode_uid();
+
+ $post_subject = 'random subject';
+
+ $post_message = prepare_message($text, $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
+
+ $sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, attach_id, icon_id, post_username, post_time, poster_ip, post_approved, bbcode_uid, enable_bbcode, enable_html, enable_smilies, enable_sig, post_subject, post_text)
+ VALUES ($new_topic_id, $forum_id, $user_id, 0, 0, '$post_username', $current_time, '$user_ip', 1, '$bbcode_uid', $bbcode_on, $html_on, $smilies_on, $attach_sig, '$post_subject', '$post_message')";
+ $result = $db->sql_query($sql);
+
+ if ($result)
+ {
+ $new_post_id = $db->sql_nextid();
+
+ $sql = "UPDATE " . TOPICS_TABLE . "
+ SET topic_last_post_id = $new_post_id";
+ if($mode == "reply")
+ {
+ $sql .= ", topic_replies = topic_replies + 1 ";
+ }
+ $sql .= " WHERE topic_id = $new_topic_id";
+
+ if($db->sql_query($sql))
+ {
+ $sql = "UPDATE " . FORUMS_TABLE . "
+ SET forum_last_post_id = $new_post_id, forum_posts = forum_posts + 1";
+ if($mode == "newtopic")
+ {
+ $sql .= ", forum_topics = forum_topics + 1";
+ }
+ $sql .= " WHERE forum_id = $forum_id";
+
+ if($db->sql_query($sql))
+ {
+ $sql = "UPDATE " . USERS_TABLE . "
+ SET user_posts = user_posts + 1
+ WHERE user_id = " . $user_id;
+
+ if($db->sql_query($sql, END_TRANSACTION))
+ {
+ // SUCCESS.
+ return true;
+ }
+ else
+ {
+ message_die(GENERAL_ERROR, "Error updating users table", "", __LINE__, __FILE__, $sql);
+ }
+ }
+ else
+ {
+ message_die(GENERAL_ERROR, "Error updating forums table", "", __LINE__, __FILE__, $sql);
+ }
+ }
+ else
+ {
+ // Rollback
+ if($db->sql_layer == "mysql")
+ {
+ $sql = "DELETE FROM " . POSTS_TABLE . "
+ WHERE post_id = $new_post_id";
+ $db->sql_query($sql);
+ }
+ message_die(GENERAL_ERROR, "Error updating topics table", "", __LINE__, __FILE__, $sql);
+ }
+ }
+ else
+ {
+ message_die(GENERAL_ERROR, "Error inserting data into posts table", "", __LINE__, __FILE__, $sql);
+ }
+}
+
+
+function generatepost($size=850)
+{
+ global $bigass_text;
+ // Returns a string with a length between $size and $size*0.2
+ $size = rand(0.2*$size, $size);
+
+ $textsize = strlen($bigass_text);
+ $currentsize = 0;
+ // Add whole $text multiple times
+ while($currentsize < $size && $size-$currentsize <= $textsize)
+ {
+ $message .= $bigass_text;
+ $currentsize += $textsize;
+ }
+ // Add the remainder number of chars and return it.
+ $message .= substr($bigass_text, 0, $size-$currentsize);
+
+ return (addslashes($message));
+}
+
+
+function nrof($table)
+{
+ global $db;
+ $sql = "SELECT count(*) AS counted FROM $table";
+ $result = $db->sql_query($sql);
+ $topics = $db->sql_fetchrow($result);
+ return $topics[counted];
+}
+
+
+function make_user($username)
+{
+ global $db, $board_config;
+
+ $password = md5("benchpass");
+ $email = "nobody@localhost";
+ $icq = "12345678";
+ $website = "http://www.phpbb.com";
+ $occupation = "phpBB tester";
+ $location = "phpBB world hq";
+ $interests = "Eating, sleeping, living, and breathing phpBB";
+ $signature = "$username: phpBB tester.";
+ $signature_bbcode_uid = "";
+ $avatar_filename = "";
+ $viewemail = 0;
+ $aim = 0;
+ $yim = 0;
+ $msn = 0;
+ $attachsig = 1;
+ $allowsmilies = 1;
+ $allowhtml = 1;
+ $allowbbcode = 1;
+ $allowviewonline = 1;
+ $notifyreply = 0;
+ $notifypm = 0;
+ $user_timezone = $board_config['board_timezone'];
+ $user_dateformat = $board_config['default_dateformat'];
+ $user_lang = $board_config['default_lang'];
+ $user_style = $board_config['default_style'];
+
+
+ $sql = "SELECT MAX(user_id) AS total
+ FROM " . USERS_TABLE;
+ if($result = $db->sql_query($sql))
+ {
+ $row = $db->sql_fetchrow($result);
+ $new_user_id = $row['total'] + 1;
+
+ unset($result);
+ unset($row);
+ }
+ else
+ {
+ message_die(GENERAL_ERROR, "Couldn't obtained next user_id information.", "", __LINE__, __FILE__, $sql);
+ }
+
+ $sql = "SELECT MAX(group_id) AS total
+ FROM " . GROUPS_TABLE;
+ if($result = $db->sql_query($sql))
+ {
+ $row = $db->sql_fetchrow($result);
+ $new_group_id = $row['total'] + 1;
+
+ unset($result);
+ unset($row);
+ }
+ else
+ {
+ message_die(GENERAL_ERROR, "Couldn't obtained next user_id information.", "", __LINE__, __FILE__, $sql);
+ }
+
+
+ $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
+ VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$icq', '$website', '$occupation', '$location', '$interests', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, ";
+
+
+ $sql .= "1, '')";
+
+ if($result = $db->sql_query($sql, BEGIN_TRANSACTION))
+ {
+ $sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_name, group_description, group_single_user, group_moderator)
+ VALUES ($new_group_id, '', 'Personal User', 1, 0)";
+ if($result = $db->sql_query($sql))
+ {
+ $sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending)
+ VALUES ($new_user_id, $new_group_id, 0)";
+ if($result = $db->sql_query($sql, END_TRANSACTION))
+ {
+
+ // SUCCESS.
+ return true;
+ }
+ else
+ {
+ message_die(GENERAL_ERROR, "Couldn't insert data into user_group table", "", __LINE__, __FILE__, $sql);
+ }
+ }
+ else
+ {
+ message_die(GENERAL_ERROR, "Couldn't insert data into groups table", "", __LINE__, __FILE__, $sql);
+ }
+ }
+ else
+ {
+ message_die(GENERAL_ERROR, "Couldn't insert data into users table", "", __LINE__, __FILE__, $sql);
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/calc_email_hash.php b/phpBB/develop/calc_email_hash.php
new file mode 100644
index 0000000000..a67b0f52a3
--- /dev/null
+++ b/phpBB/develop/calc_email_hash.php
@@ -0,0 +1,76 @@
+<?php
+// -------------------------------------------------------------
+//
+// $Id$
+//
+// FILENAME : calc_email_hash.php
+// STARTED : Tue Feb 03, 2004
+// COPYRIGHT : © 2004 phpBB Group
+// WWW : http://www.phpbb.com/
+// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
+//
+// -------------------------------------------------------------
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+@set_time_limit(300);
+
+$db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
+
+define('IN_PHPBB', 1);
+define('ANONYMOUS', 1);
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+$phpbb_root_path='./../';
+include($phpbb_root_path . 'config.'.$phpEx);
+require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx);
+require($phpbb_root_path . 'includes/db/' . $dbms . '.'.$phpEx);
+include($phpbb_root_path . 'includes/functions.'.$phpEx);
+
+$cache = new acm();
+$db = new sql_db();
+
+// Connect to DB
+$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
+
+$start = 0;
+do
+{
+ // Batch query for group members, call group_user_del
+ $sql = "SELECT user_id, user_email
+ FROM {$table_prefix}users
+ LIMIT $start, 100";
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ do
+ {
+ $sql = "UPDATE {$table_prefix}users
+ SET user_email_hash = " . (crc32(strtolower($row['user_email'])) . strlen($row['user_email'])) . '
+ WHERE user_id = ' . $row['user_id'];
+ $db->sql_query($sql);
+
+ $start++;
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ echo "<br />Batch -> $start\n";
+ flush();
+ }
+ else
+ {
+ $start = 0;
+ }
+ $db->sql_freeresult($result);
+}
+while ($start);
+
+echo "<p><b>Done</b></p>\n";
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/change_smiley_ref.php b/phpBB/develop/change_smiley_ref.php
new file mode 100644
index 0000000000..db65dd52d4
--- /dev/null
+++ b/phpBB/develop/change_smiley_ref.php
@@ -0,0 +1,62 @@
+<?php
+/***************************************************************************
+ * merge_clean_posts.php
+ * -------------------
+ * begin : Tuesday, February 25, 2003
+ * copyright : (C) 2003 The phpBB Group
+ * email : support@phpbb.com
+ *
+ * $Id$
+ *
+ ***************************************************************************/
+
+/***************************************************************************
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ ***************************************************************************/
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+@set_time_limit(2400);
+
+// This script adds missing permissions
+$db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
+
+define('IN_PHPBB', 1);
+define('ANONYMOUS', 1);
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+$phpbb_root_path='./../';
+include($phpbb_root_path . 'config.'.$phpEx);
+require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx);
+require($phpbb_root_path . 'includes/db/' . $dbms . '.'.$phpEx);
+include($phpbb_root_path . 'includes/functions.'.$phpEx);
+
+$cache = new acm();
+$db = new $sql_db();
+
+// Connect to DB
+$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
+
+$sql = "SELECT post_id, post_text FROM {$table_prefix}posts WHERE post_text LIKE '%{SMILE_PATH}%'";
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $db->sql_query("UPDATE {$table_prefix}posts SET post_text = '" . $db->sql_escape(str_replace('{SMILE_PATH}', '{SMILIES_PATH}', $row['post_text'])) . "' WHERE post_id = " . $row['post_id']);
+}
+$db->sql_freeresult($result);
+
+echo "<p><b>Done</b></p>\n";
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/collect_cache_stats.sh b/phpBB/develop/collect_cache_stats.sh
new file mode 100755
index 0000000000..5bb31c5173
--- /dev/null
+++ b/phpBB/develop/collect_cache_stats.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+DIR=$(dirname "$0")/../cache;
+cat "$DIR/sql_*.php" | grep '/* SELECT' | sed 's,/\* ,,;s, \*/,,' | sort
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
new file mode 100644
index 0000000000..b9017937c8
--- /dev/null
+++ b/phpBB/develop/create_schema_files.php
@@ -0,0 +1,2048 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+* This file creates new schema files for every database.
+* The filenames will be prefixed with an underscore to not overwrite the current schema files.
+*
+* If you overwrite the original schema files please make sure you save the file with UNIX linefeeds.
+*/
+
+die("Please read the first lines of this script for instructions on how to enable it");
+
+@set_time_limit(0);
+
+$schema_path = './../install/schemas/';
+
+if (!is_writable($schema_path))
+{
+ die('Schema path not writable');
+}
+
+$schema_data = get_schema_struct();
+$dbms_type_map = array(
+ 'mysql_41' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'mediumint(8) UNSIGNED',
+ 'UINT:' => 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'smallint(4) UNSIGNED',
+ 'BOOL' => 'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'text',
+ 'XSTEXT_UNI'=> 'varchar(100)',
+ 'STEXT' => 'text',
+ 'STEXT_UNI' => 'varchar(255)',
+ 'TEXT' => 'text',
+ 'TEXT_UNI' => 'text',
+ 'MTEXT' => 'mediumtext',
+ 'MTEXT_UNI' => 'mediumtext',
+ 'TIMESTAMP' => 'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar(255)',
+ 'VARBINARY' => 'varbinary(255)',
+ ),
+
+ 'mysql_40' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'mediumint(8) UNSIGNED',
+ 'UINT:' => 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'smallint(4) UNSIGNED',
+ 'BOOL' => 'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varbinary(255)',
+ 'VCHAR:' => 'varbinary(%d)',
+ 'CHAR:' => 'binary(%d)',
+ 'XSTEXT' => 'blob',
+ 'XSTEXT_UNI'=> 'blob',
+ 'STEXT' => 'blob',
+ 'STEXT_UNI' => 'blob',
+ 'TEXT' => 'blob',
+ 'TEXT_UNI' => 'blob',
+ 'MTEXT' => 'mediumblob',
+ 'MTEXT_UNI' => 'mediumblob',
+ 'TIMESTAMP' => 'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'blob',
+ 'VCHAR_UNI:'=> array('varbinary(%d)', 'limit' => array('mult', 3, 255, 'blob')),
+ 'VCHAR_CI' => 'blob',
+ 'VARBINARY' => 'varbinary(255)',
+ ),
+
+ 'firebird' => array(
+ 'INT:' => 'INTEGER',
+ 'BINT' => 'DOUBLE PRECISION',
+ 'UINT' => 'INTEGER',
+ 'UINT:' => 'INTEGER',
+ 'TINT:' => 'INTEGER',
+ 'USINT' => 'INTEGER',
+ 'BOOL' => 'INTEGER',
+ 'VCHAR' => 'VARCHAR(255) CHARACTER SET NONE',
+ 'VCHAR:' => 'VARCHAR(%d) CHARACTER SET NONE',
+ 'CHAR:' => 'CHAR(%d) CHARACTER SET NONE',
+ 'XSTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
+ 'STEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
+ 'TEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
+ 'MTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
+ 'XSTEXT_UNI'=> 'VARCHAR(100) CHARACTER SET UTF8',
+ 'STEXT_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
+ 'TEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
+ 'MTEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
+ 'TIMESTAMP' => 'INTEGER',
+ 'DECIMAL' => 'DOUBLE PRECISION',
+ 'DECIMAL:' => 'DOUBLE PRECISION',
+ 'PDECIMAL' => 'DOUBLE PRECISION',
+ 'PDECIMAL:' => 'DOUBLE PRECISION',
+ 'VCHAR_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
+ 'VCHAR_UNI:'=> 'VARCHAR(%d) CHARACTER SET UTF8',
+ 'VCHAR_CI' => 'VARCHAR(255) CHARACTER SET UTF8',
+ 'VARBINARY' => 'CHAR(255) CHARACTER SET NONE',
+ ),
+
+ 'mssql' => array(
+ 'INT:' => '[int]',
+ 'BINT' => '[float]',
+ 'UINT' => '[int]',
+ 'UINT:' => '[int]',
+ 'TINT:' => '[int]',
+ 'USINT' => '[int]',
+ 'BOOL' => '[int]',
+ 'VCHAR' => '[varchar] (255)',
+ 'VCHAR:' => '[varchar] (%d)',
+ 'CHAR:' => '[char] (%d)',
+ 'XSTEXT' => '[varchar] (1000)',
+ 'STEXT' => '[varchar] (3000)',
+ 'TEXT' => '[varchar] (8000)',
+ 'MTEXT' => '[text]',
+ 'XSTEXT_UNI'=> '[varchar] (100)',
+ 'STEXT_UNI' => '[varchar] (255)',
+ 'TEXT_UNI' => '[varchar] (4000)',
+ 'MTEXT_UNI' => '[text]',
+ 'TIMESTAMP' => '[int]',
+ 'DECIMAL' => '[float]',
+ 'DECIMAL:' => '[float]',
+ 'PDECIMAL' => '[float]',
+ 'PDECIMAL:' => '[float]',
+ 'VCHAR_UNI' => '[varchar] (255)',
+ 'VCHAR_UNI:'=> '[varchar] (%d)',
+ 'VCHAR_CI' => '[varchar] (255)',
+ 'VARBINARY' => '[varchar] (255)',
+ ),
+
+ 'oracle' => array(
+ 'INT:' => 'number(%d)',
+ 'BINT' => 'number(20)',
+ 'UINT' => 'number(8)',
+ 'UINT:' => 'number(%d)',
+ 'TINT:' => 'number(%d)',
+ 'USINT' => 'number(4)',
+ 'BOOL' => 'number(1)',
+ 'VCHAR' => 'varchar2(255)',
+ 'VCHAR:' => 'varchar2(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'varchar2(1000)',
+ 'STEXT' => 'varchar2(3000)',
+ 'TEXT' => 'clob',
+ 'MTEXT' => 'clob',
+ 'XSTEXT_UNI'=> 'varchar2(300)',
+ 'STEXT_UNI' => 'varchar2(765)',
+ 'TEXT_UNI' => 'clob',
+ 'MTEXT_UNI' => 'clob',
+ 'TIMESTAMP' => 'number(11)',
+ 'DECIMAL' => 'number(5, 2)',
+ 'DECIMAL:' => 'number(%d, 2)',
+ 'PDECIMAL' => 'number(6, 3)',
+ 'PDECIMAL:' => 'number(%d, 3)',
+ 'VCHAR_UNI' => 'varchar2(765)',
+ 'VCHAR_UNI:'=> array('varchar2(%d)', 'limit' => array('mult', 3, 765, 'clob')),
+ 'VCHAR_CI' => 'varchar2(255)',
+ 'VARBINARY' => 'raw(255)',
+ ),
+
+ 'sqlite' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'INTEGER UNSIGNED', //'mediumint(8) UNSIGNED',
+ 'UINT:' => 'INTEGER UNSIGNED', // 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'INTEGER UNSIGNED', //'mediumint(4) UNSIGNED',
+ 'BOOL' => 'INTEGER UNSIGNED', //'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'text(65535)',
+ 'STEXT' => 'text(65535)',
+ 'TEXT' => 'text(65535)',
+ 'MTEXT' => 'mediumtext(16777215)',
+ 'XSTEXT_UNI'=> 'text(65535)',
+ 'STEXT_UNI' => 'text(65535)',
+ 'TEXT_UNI' => 'text(65535)',
+ 'MTEXT_UNI' => 'mediumtext(16777215)',
+ 'TIMESTAMP' => 'INTEGER UNSIGNED', //'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar(255)',
+ 'VARBINARY' => 'blob',
+ ),
+
+ 'postgres' => array(
+ 'INT:' => 'INT4',
+ 'BINT' => 'INT8',
+ 'UINT' => 'INT4', // unsigned
+ 'UINT:' => 'INT4', // unsigned
+ 'USINT' => 'INT2', // unsigned
+ 'BOOL' => 'INT2', // unsigned
+ 'TINT:' => 'INT2',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'varchar(1000)',
+ 'STEXT' => 'varchar(3000)',
+ 'TEXT' => 'varchar(8000)',
+ 'MTEXT' => 'TEXT',
+ 'XSTEXT_UNI'=> 'varchar(100)',
+ 'STEXT_UNI' => 'varchar(255)',
+ 'TEXT_UNI' => 'varchar(4000)',
+ 'MTEXT_UNI' => 'TEXT',
+ 'TIMESTAMP' => 'INT4', // unsigned
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar_ci',
+ 'VARBINARY' => 'bytea',
+ ),
+);
+
+// A list of types being unsigned for better reference in some db's
+$unsigned_types = array('UINT', 'UINT:', 'USINT', 'BOOL', 'TIMESTAMP');
+$supported_dbms = array('firebird', 'mssql', 'mysql_40', 'mysql_41', 'oracle', 'postgres', 'sqlite');
+
+foreach ($supported_dbms as $dbms)
+{
+ $fp = fopen($schema_path . '_' . $dbms . '_schema.sql', 'wt');
+
+ $line = '';
+
+ // Write Header
+ switch ($dbms)
+ {
+ case 'mysql_40':
+ case 'mysql_41':
+ $line = "#\n# \$I" . "d: $\n#\n\n";
+ break;
+
+ case 'firebird':
+ $line = "#\n# \$I" . "d: $\n#\n\n";
+ $line .= custom_data('firebird') . "\n";
+ break;
+
+ case 'sqlite':
+ $line = "#\n# \$I" . "d: $\n#\n\n";
+ $line .= "BEGIN TRANSACTION;\n\n";
+ break;
+
+ case 'mssql':
+ $line = "/*\n\n \$I" . "d: $\n\n*/\n\n";
+ $line .= "BEGIN TRANSACTION\nGO\n\n";
+ break;
+
+ case 'oracle':
+ $line = "/*\n\n \$I" . "d: $\n\n*/\n\n";
+ $line .= custom_data('oracle') . "\n";
+ break;
+
+ case 'postgres':
+ $line = "/*\n\n \$I" . "d: $\n\n*/\n\n";
+ $line .= "BEGIN;\n\n";
+ $line .= custom_data('postgres') . "\n";
+ break;
+ }
+
+ fwrite($fp, $line);
+
+ foreach ($schema_data as $table_name => $table_data)
+ {
+ // Write comment about table
+ switch ($dbms)
+ {
+ case 'mysql_40':
+ case 'mysql_41':
+ case 'firebird':
+ case 'sqlite':
+ fwrite($fp, "# Table: '{$table_name}'\n");
+ break;
+
+ case 'mssql':
+ case 'oracle':
+ case 'postgres':
+ fwrite($fp, "/*\n\tTable: '{$table_name}'\n*/\n");
+ break;
+ }
+
+ // Create Table statement
+ $generator = $textimage = false;
+ $line = '';
+
+ switch ($dbms)
+ {
+ case 'mysql_40':
+ case 'mysql_41':
+ case 'firebird':
+ case 'oracle':
+ case 'sqlite':
+ case 'postgres':
+ $line = "CREATE TABLE {$table_name} (\n";
+ break;
+
+ case 'mssql':
+ $line = "CREATE TABLE [{$table_name}] (\n";
+ break;
+ }
+
+ // Table specific so we don't get overlap
+ $modded_array = array();
+
+ // Write columns one by one...
+ foreach ($table_data['COLUMNS'] as $column_name => $column_data)
+ {
+ // Get type
+ if (strpos($column_data[0], ':') !== false)
+ {
+ list($orig_column_type, $column_length) = explode(':', $column_data[0]);
+ if (!is_array($dbms_type_map[$dbms][$orig_column_type . ':']))
+ {
+ $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'], $column_length);
+ }
+ else
+ {
+ if (isset($dbms_type_map[$dbms][$orig_column_type . ':']['rule']))
+ {
+ switch ($dbms_type_map[$dbms][$orig_column_type . ':']['rule'][0])
+ {
+ case 'div':
+ $column_length /= $dbms_type_map[$dbms][$orig_column_type . ':']['rule'][1];
+ $column_length = ceil($column_length);
+ $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'][0], $column_length);
+ break;
+ }
+ }
+
+ if (isset($dbms_type_map[$dbms][$orig_column_type . ':']['limit']))
+ {
+ switch ($dbms_type_map[$dbms][$orig_column_type . ':']['limit'][0])
+ {
+ case 'mult':
+ $column_length *= $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][1];
+ if ($column_length > $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][2])
+ {
+ $column_type = $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][3];
+ $modded_array[$column_name] = $column_type;
+ }
+ else
+ {
+ $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'][0], $column_length);
+ }
+ break;
+ }
+ }
+ }
+ $orig_column_type .= ':';
+ }
+ else
+ {
+ $orig_column_type = $column_data[0];
+ $column_type = $dbms_type_map[$dbms][$column_data[0]];
+ if ($column_type == 'text' || $column_type == 'blob')
+ {
+ $modded_array[$column_name] = $column_type;
+ }
+ }
+
+ // Adjust default value if db-dependant specified
+ if (is_array($column_data[1]))
+ {
+ $column_data[1] = (isset($column_data[1][$dbms])) ? $column_data[1][$dbms] : $column_data[1]['default'];
+ }
+
+ switch ($dbms)
+ {
+ case 'mysql_40':
+ case 'mysql_41':
+ $line .= "\t{$column_name} {$column_type} ";
+
+ // For hexadecimal values do not use single quotes
+ if (!is_null($column_data[1]) && substr($column_type, -4) !== 'text' && substr($column_type, -4) !== 'blob')
+ {
+ $line .= (strpos($column_data[1], '0x') === 0) ? "DEFAULT {$column_data[1]} " : "DEFAULT '{$column_data[1]}' ";
+ }
+ $line .= 'NOT NULL';
+
+ if (isset($column_data[2]))
+ {
+ if ($column_data[2] == 'auto_increment')
+ {
+ $line .= ' auto_increment';
+ }
+ else if ($dbms === 'mysql_41' && $column_data[2] == 'true_sort')
+ {
+ $line .= ' COLLATE utf8_unicode_ci';
+ }
+ }
+
+ $line .= ",\n";
+ break;
+
+ case 'sqlite':
+ if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
+ {
+ $line .= "\t{$column_name} INTEGER PRIMARY KEY ";
+ $generator = $column_name;
+ }
+ else
+ {
+ $line .= "\t{$column_name} {$column_type} ";
+ }
+
+ $line .= 'NOT NULL ';
+ $line .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}'" : '';
+ $line .= ",\n";
+ break;
+
+ case 'firebird':
+ $line .= "\t{$column_name} {$column_type} ";
+
+ if (!is_null($column_data[1]))
+ {
+ $line .= 'DEFAULT ' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ' ';
+ }
+
+ $line .= 'NOT NULL';
+
+ // This is a UNICODE column and thus should be given it's fair share
+ if (preg_match('/^X?STEXT_UNI|VCHAR_(CI|UNI:?)/', $column_data[0]))
+ {
+ $line .= ' COLLATE UNICODE';
+ }
+
+ $line .= ",\n";
+
+ if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
+ {
+ $generator = $column_name;
+ }
+ break;
+
+ case 'mssql':
+ if ($column_type == '[text]')
+ {
+ $textimage = true;
+ }
+
+ $line .= "\t[{$column_name}] {$column_type} ";
+
+ if (!is_null($column_data[1]))
+ {
+ // For hexadecimal values do not use single quotes
+ if (strpos($column_data[1], '0x') === 0)
+ {
+ $line .= 'DEFAULT (' . $column_data[1] . ') ';
+ }
+ else
+ {
+ $line .= 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') ';
+ }
+ }
+
+ if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
+ {
+ $line .= 'IDENTITY (1, 1) ';
+ }
+
+ $line .= 'NOT NULL';
+ $line .= " ,\n";
+ break;
+
+ case 'oracle':
+ $line .= "\t{$column_name} {$column_type} ";
+ $line .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}' " : '';
+
+ // In Oracle empty strings ('') are treated as NULL.
+ // Therefore in oracle we allow NULL's for all DEFAULT '' entries
+ $line .= ($column_data[1] === '') ? ",\n" : "NOT NULL,\n";
+
+ if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
+ {
+ $generator = $column_name;
+ }
+ break;
+
+ case 'postgres':
+ $line .= "\t{$column_name} {$column_type} ";
+
+ if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
+ {
+ $line .= "DEFAULT nextval('{$table_name}_seq'),\n";
+
+ // Make sure the sequence will be created before creating the table
+ $line = "CREATE SEQUENCE {$table_name}_seq;\n\n" . $line;
+ }
+ else
+ {
+ $line .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}' " : '';
+ $line .= "NOT NULL";
+
+ // Unsigned? Then add a CHECK contraint
+ if (in_array($orig_column_type, $unsigned_types))
+ {
+ $line .= " CHECK ({$column_name} >= 0)";
+ }
+
+ $line .= ",\n";
+ }
+ break;
+ }
+ }
+
+ switch ($dbms)
+ {
+ case 'firebird':
+ // Remove last line delimiter...
+ $line = substr($line, 0, -2);
+ $line .= "\n);;\n\n";
+ break;
+
+ case 'mssql':
+ $line = substr($line, 0, -2);
+ $line .= "\n) ON [PRIMARY]" . (($textimage) ? ' TEXTIMAGE_ON [PRIMARY]' : '') . "\n";
+ $line .= "GO\n\n";
+ break;
+ }
+
+ // Write primary key
+ if (isset($table_data['PRIMARY_KEY']))
+ {
+ if (!is_array($table_data['PRIMARY_KEY']))
+ {
+ $table_data['PRIMARY_KEY'] = array($table_data['PRIMARY_KEY']);
+ }
+
+ switch ($dbms)
+ {
+ case 'mysql_40':
+ case 'mysql_41':
+ case 'postgres':
+ $line .= "\tPRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . "),\n";
+ break;
+
+ case 'firebird':
+ $line .= "ALTER TABLE {$table_name} ADD PRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . ");;\n\n";
+ break;
+
+ case 'sqlite':
+ if ($generator === false || !in_array($generator, $table_data['PRIMARY_KEY']))
+ {
+ $line .= "\tPRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . "),\n";
+ }
+ break;
+
+ case 'mssql':
+ $line .= "ALTER TABLE [{$table_name}] WITH NOCHECK ADD \n";
+ $line .= "\tCONSTRAINT [PK_{$table_name}] PRIMARY KEY CLUSTERED \n";
+ $line .= "\t(\n";
+ $line .= "\t\t[" . implode("],\n\t\t[", $table_data['PRIMARY_KEY']) . "]\n";
+ $line .= "\t) ON [PRIMARY] \n";
+ $line .= "GO\n\n";
+ break;
+
+ case 'oracle':
+ $line .= "\tCONSTRAINT pk_{$table_name} PRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . "),\n";
+ break;
+ }
+ }
+
+ switch ($dbms)
+ {
+ case 'oracle':
+ // UNIQUE contrains to be added?
+ if (isset($table_data['KEYS']))
+ {
+ foreach ($table_data['KEYS'] as $key_name => $key_data)
+ {
+ if (!is_array($key_data[1]))
+ {
+ $key_data[1] = array($key_data[1]);
+ }
+
+ if ($key_data[0] == 'UNIQUE')
+ {
+ $line .= "\tCONSTRAINT u_phpbb_{$key_name} UNIQUE (" . implode(', ', $key_data[1]) . "),\n";
+ }
+ }
+ }
+
+ // Remove last line delimiter...
+ $line = substr($line, 0, -2);
+ $line .= "\n)\n/\n\n";
+ break;
+
+ case 'postgres':
+ // Remove last line delimiter...
+ $line = substr($line, 0, -2);
+ $line .= "\n);\n\n";
+ break;
+
+ case 'sqlite':
+ // Remove last line delimiter...
+ $line = substr($line, 0, -2);
+ $line .= "\n);\n\n";
+ break;
+ }
+
+ // Write Keys
+ if (isset($table_data['KEYS']))
+ {
+ foreach ($table_data['KEYS'] as $key_name => $key_data)
+ {
+ if (!is_array($key_data[1]))
+ {
+ $key_data[1] = array($key_data[1]);
+ }
+
+ switch ($dbms)
+ {
+ case 'mysql_40':
+ case 'mysql_41':
+ $line .= ($key_data[0] == 'INDEX') ? "\tKEY" : '';
+ $line .= ($key_data[0] == 'UNIQUE') ? "\tUNIQUE" : '';
+ foreach ($key_data[1] as $key => $col_name)
+ {
+ if (isset($modded_array[$col_name]))
+ {
+ switch ($modded_array[$col_name])
+ {
+ case 'text':
+ case 'blob':
+ $key_data[1][$key] = $col_name . '(255)';
+ break;
+ }
+ }
+ }
+ $line .= ' ' . $key_name . ' (' . implode(', ', $key_data[1]) . "),\n";
+ break;
+
+ case 'firebird':
+ $line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
+ $line .= ($key_data[0] == 'UNIQUE') ? 'CREATE UNIQUE INDEX' : '';
+
+ $line .= ' ' . $table_name . '_' . $key_name . ' ON ' . $table_name . '(' . implode(', ', $key_data[1]) . ");;\n";
+ break;
+
+ case 'mssql':
+ $line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
+ $line .= ($key_data[0] == 'UNIQUE') ? 'CREATE UNIQUE INDEX' : '';
+ $line .= " [{$key_name}] ON [{$table_name}]([" . implode('], [', $key_data[1]) . "]) ON [PRIMARY]\n";
+ $line .= "GO\n\n";
+ break;
+
+ case 'oracle':
+ if ($key_data[0] == 'UNIQUE')
+ {
+ continue;
+ }
+
+ $line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
+
+ $line .= " {$table_name}_{$key_name} ON {$table_name} (" . implode(', ', $key_data[1]) . ")\n";
+ $line .= "/\n";
+ break;
+
+ case 'sqlite':
+ $line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
+ $line .= ($key_data[0] == 'UNIQUE') ? 'CREATE UNIQUE INDEX' : '';
+
+ $line .= " {$table_name}_{$key_name} ON {$table_name} (" . implode(', ', $key_data[1]) . ");\n";
+ break;
+
+ case 'postgres':
+ $line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
+ $line .= ($key_data[0] == 'UNIQUE') ? 'CREATE UNIQUE INDEX' : '';
+
+ $line .= " {$table_name}_{$key_name} ON {$table_name} (" . implode(', ', $key_data[1]) . ");\n";
+ break;
+ }
+ }
+ }
+
+ switch ($dbms)
+ {
+ case 'mysql_40':
+ // Remove last line delimiter...
+ $line = substr($line, 0, -2);
+ $line .= "\n);\n\n";
+ break;
+
+ case 'mysql_41':
+ // Remove last line delimiter...
+ $line = substr($line, 0, -2);
+ $line .= "\n) CHARACTER SET `utf8` COLLATE `utf8_bin`;\n\n";
+ break;
+
+ // Create Generator
+ case 'firebird':
+ if ($generator !== false)
+ {
+ $line .= "\nCREATE GENERATOR {$table_name}_gen;;\n";
+ $line .= 'SET GENERATOR ' . $table_name . "_gen TO 0;;\n\n";
+
+ $line .= 'CREATE TRIGGER t_' . $table_name . ' FOR ' . $table_name . "\n";
+ $line .= "BEFORE INSERT\nAS\nBEGIN\n";
+ $line .= "\tNEW.{$generator} = GEN_ID({$table_name}_gen, 1);\nEND;;\n\n";
+ }
+ break;
+
+ case 'oracle':
+ if ($generator !== false)
+ {
+ $line .= "\nCREATE SEQUENCE {$table_name}_seq\n/\n\n";
+
+ $line .= "CREATE OR REPLACE TRIGGER t_{$table_name}\n";
+ $line .= "BEFORE INSERT ON {$table_name}\n";
+ $line .= "FOR EACH ROW WHEN (\n";
+ $line .= "\tnew.{$generator} IS NULL OR new.{$generator} = 0\n";
+ $line .= ")\nBEGIN\n";
+ $line .= "\tSELECT {$table_name}_seq.nextval\n";
+ $line .= "\tINTO :new.{$generator}\n";
+ $line .= "\tFROM dual;\nEND;\n/\n\n";
+ }
+ break;
+ }
+
+ fwrite($fp, $line . "\n");
+ }
+
+ $line = '';
+
+ // Write custom function at the end for some db's
+ switch ($dbms)
+ {
+ case 'mssql':
+ $line = "\nCOMMIT\nGO\n\n";
+ break;
+
+ case 'sqlite':
+ $line = "\nCOMMIT;";
+ break;
+
+ case 'postgres':
+ $line = "\nCOMMIT;";
+ break;
+ }
+
+ fwrite($fp, $line);
+ fclose($fp);
+}
+
+
+/**
+* Define the basic structure
+* The format:
+* array('{TABLE_NAME}' => {TABLE_DATA})
+* {TABLE_DATA}:
+* COLUMNS = array({column_name} = array({column_type}, {default}, {auto_increment}))
+* PRIMARY_KEY = {column_name(s)}
+* KEYS = array({key_name} = array({key_type}, {column_name(s)})),
+*
+* Column Types:
+* INT:x => SIGNED int(x)
+* BINT => BIGINT
+* UINT => mediumint(8) UNSIGNED
+* UINT:x => int(x) UNSIGNED
+* TINT:x => tinyint(x)
+* USINT => smallint(4) UNSIGNED (for _order columns)
+* BOOL => tinyint(1) UNSIGNED
+* VCHAR => varchar(255)
+* CHAR:x => char(x)
+* XSTEXT_UNI => text for storing 100 characters (topic_title for example)
+* STEXT_UNI => text for storing 255 characters (normal input field with a max of 255 single-byte chars) - same as VCHAR_UNI
+* TEXT_UNI => text for storing 3000 characters (short text, descriptions, comments, etc.)
+* MTEXT_UNI => mediumtext (post text, large text)
+* VCHAR:x => varchar(x)
+* TIMESTAMP => int(11) UNSIGNED
+* DECIMAL => decimal number (5,2)
+* DECIMAL: => decimal number (x,2)
+* PDECIMAL => precision decimal number (6,3)
+* PDECIMAL: => precision decimal number (x,3)
+* VCHAR_UNI => varchar(255) BINARY
+* VCHAR_CI => varchar_ci for postgresql, others VCHAR
+*/
+function get_schema_struct()
+{
+ $schema_data = array();
+
+ $schema_data['phpbb_attachments'] = array(
+ 'COLUMNS' => array(
+ 'attach_id' => array('UINT', NULL, 'auto_increment'),
+ 'post_msg_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ 'in_message' => array('BOOL', 0),
+ 'poster_id' => array('UINT', 0),
+ 'is_orphan' => array('BOOL', 1),
+ 'physical_filename' => array('VCHAR', ''),
+ 'real_filename' => array('VCHAR', ''),
+ 'download_count' => array('UINT', 0),
+ 'attach_comment' => array('TEXT_UNI', ''),
+ 'extension' => array('VCHAR:100', ''),
+ 'mimetype' => array('VCHAR:100', ''),
+ 'filesize' => array('UINT:20', 0),
+ 'filetime' => array('TIMESTAMP', 0),
+ 'thumbnail' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'attach_id',
+ 'KEYS' => array(
+ 'filetime' => array('INDEX', 'filetime'),
+ 'post_msg_id' => array('INDEX', 'post_msg_id'),
+ 'topic_id' => array('INDEX', 'topic_id'),
+ 'poster_id' => array('INDEX', 'poster_id'),
+ 'is_orphan' => array('INDEX', 'is_orphan'),
+ ),
+ );
+
+ $schema_data['phpbb_acl_groups'] = array(
+ 'COLUMNS' => array(
+ 'group_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'auth_option_id' => array('UINT', 0),
+ 'auth_role_id' => array('UINT', 0),
+ 'auth_setting' => array('TINT:2', 0),
+ ),
+ 'KEYS' => array(
+ 'group_id' => array('INDEX', 'group_id'),
+ 'auth_opt_id' => array('INDEX', 'auth_option_id'),
+ 'auth_role_id' => array('INDEX', 'auth_role_id'),
+ ),
+ );
+
+ $schema_data['phpbb_acl_options'] = array(
+ 'COLUMNS' => array(
+ 'auth_option_id' => array('UINT', NULL, 'auto_increment'),
+ 'auth_option' => array('VCHAR:50', ''),
+ 'is_global' => array('BOOL', 0),
+ 'is_local' => array('BOOL', 0),
+ 'founder_only' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'auth_option_id',
+ 'KEYS' => array(
+ 'auth_option' => array('UNIQUE', 'auth_option'),
+ ),
+ );
+
+ $schema_data['phpbb_acl_roles'] = array(
+ 'COLUMNS' => array(
+ 'role_id' => array('UINT', NULL, 'auto_increment'),
+ 'role_name' => array('VCHAR_UNI', ''),
+ 'role_description' => array('TEXT_UNI', ''),
+ 'role_type' => array('VCHAR:10', ''),
+ 'role_order' => array('USINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'role_id',
+ 'KEYS' => array(
+ 'role_type' => array('INDEX', 'role_type'),
+ 'role_order' => array('INDEX', 'role_order'),
+ ),
+ );
+
+ $schema_data['phpbb_acl_roles_data'] = array(
+ 'COLUMNS' => array(
+ 'role_id' => array('UINT', 0),
+ 'auth_option_id' => array('UINT', 0),
+ 'auth_setting' => array('TINT:2', 0),
+ ),
+ 'PRIMARY_KEY' => array('role_id', 'auth_option_id'),
+ 'KEYS' => array(
+ 'ath_op_id' => array('INDEX', 'auth_option_id'),
+ ),
+ );
+
+ $schema_data['phpbb_acl_users'] = array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'auth_option_id' => array('UINT', 0),
+ 'auth_role_id' => array('UINT', 0),
+ 'auth_setting' => array('TINT:2', 0),
+ ),
+ 'KEYS' => array(
+ 'user_id' => array('INDEX', 'user_id'),
+ 'auth_option_id' => array('INDEX', 'auth_option_id'),
+ 'auth_role_id' => array('INDEX', 'auth_role_id'),
+ ),
+ );
+
+ $schema_data['phpbb_banlist'] = array(
+ 'COLUMNS' => array(
+ 'ban_id' => array('UINT', NULL, 'auto_increment'),
+ 'ban_userid' => array('UINT', 0),
+ 'ban_ip' => array('VCHAR:40', ''),
+ 'ban_email' => array('VCHAR_UNI:100', ''),
+ 'ban_start' => array('TIMESTAMP', 0),
+ 'ban_end' => array('TIMESTAMP', 0),
+ 'ban_exclude' => array('BOOL', 0),
+ 'ban_reason' => array('VCHAR_UNI', ''),
+ 'ban_give_reason' => array('VCHAR_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'ban_id',
+ 'KEYS' => array(
+ 'ban_end' => array('INDEX', 'ban_end'),
+ 'ban_user' => array('INDEX', array('ban_userid', 'ban_exclude')),
+ 'ban_email' => array('INDEX', array('ban_email', 'ban_exclude')),
+ 'ban_ip' => array('INDEX', array('ban_ip', 'ban_exclude')),
+ ),
+ );
+
+ $schema_data['phpbb_bbcodes'] = array(
+ 'COLUMNS' => array(
+ 'bbcode_id' => array('TINT:3', 0),
+ 'bbcode_tag' => array('VCHAR:16', ''),
+ 'bbcode_helpline' => array('VCHAR_UNI', ''),
+ 'display_on_posting' => array('BOOL', 0),
+ 'bbcode_match' => array('TEXT_UNI', ''),
+ 'bbcode_tpl' => array('MTEXT_UNI', ''),
+ 'first_pass_match' => array('MTEXT_UNI', ''),
+ 'first_pass_replace' => array('MTEXT_UNI', ''),
+ 'second_pass_match' => array('MTEXT_UNI', ''),
+ 'second_pass_replace' => array('MTEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'bbcode_id',
+ 'KEYS' => array(
+ 'display_on_post' => array('INDEX', 'display_on_posting'),
+ ),
+ );
+
+ $schema_data['phpbb_bookmarks'] = array(
+ 'COLUMNS' => array(
+ 'topic_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => array('topic_id', 'user_id'),
+ );
+
+ $schema_data['phpbb_bots'] = array(
+ 'COLUMNS' => array(
+ 'bot_id' => array('UINT', NULL, 'auto_increment'),
+ 'bot_active' => array('BOOL', 1),
+ 'bot_name' => array('STEXT_UNI', ''),
+ 'user_id' => array('UINT', 0),
+ 'bot_agent' => array('VCHAR', ''),
+ 'bot_ip' => array('VCHAR', ''),
+ ),
+ 'PRIMARY_KEY' => 'bot_id',
+ 'KEYS' => array(
+ 'bot_active' => array('INDEX', 'bot_active'),
+ ),
+ );
+
+ $schema_data['phpbb_config'] = array(
+ 'COLUMNS' => array(
+ 'config_name' => array('VCHAR', ''),
+ 'config_value' => array('VCHAR_UNI', ''),
+ 'is_dynamic' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'config_name',
+ 'KEYS' => array(
+ 'is_dynamic' => array('INDEX', 'is_dynamic'),
+ ),
+ );
+
+ $schema_data['phpbb_confirm'] = array(
+ 'COLUMNS' => array(
+ 'confirm_id' => array('CHAR:32', ''),
+ 'session_id' => array('CHAR:32', ''),
+ 'confirm_type' => array('TINT:3', 0),
+ 'code' => array('VCHAR:8', ''),
+ 'seed' => array('UINT:10', 0),
+ 'attempts' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => array('session_id', 'confirm_id'),
+ 'KEYS' => array(
+ 'confirm_type' => array('INDEX', 'confirm_type'),
+ ),
+ );
+
+ $schema_data['phpbb_disallow'] = array(
+ 'COLUMNS' => array(
+ 'disallow_id' => array('UINT', NULL, 'auto_increment'),
+ 'disallow_username' => array('VCHAR_UNI:255', ''),
+ ),
+ 'PRIMARY_KEY' => 'disallow_id',
+ );
+
+ $schema_data['phpbb_drafts'] = array(
+ 'COLUMNS' => array(
+ 'draft_id' => array('UINT', NULL, 'auto_increment'),
+ 'user_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'save_time' => array('TIMESTAMP', 0),
+ 'draft_subject' => array('STEXT_UNI', ''),
+ 'draft_message' => array('MTEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'draft_id',
+ 'KEYS' => array(
+ 'save_time' => array('INDEX', 'save_time'),
+ ),
+ );
+
+ $schema_data['phpbb_extensions'] = array(
+ 'COLUMNS' => array(
+ 'extension_id' => array('UINT', NULL, 'auto_increment'),
+ 'group_id' => array('UINT', 0),
+ 'extension' => array('VCHAR:100', ''),
+ ),
+ 'PRIMARY_KEY' => 'extension_id',
+ );
+
+ $schema_data['phpbb_extension_groups'] = array(
+ 'COLUMNS' => array(
+ 'group_id' => array('UINT', NULL, 'auto_increment'),
+ 'group_name' => array('VCHAR_UNI', ''),
+ 'cat_id' => array('TINT:2', 0),
+ 'allow_group' => array('BOOL', 0),
+ 'download_mode' => array('BOOL', 1),
+ 'upload_icon' => array('VCHAR', ''),
+ 'max_filesize' => array('UINT:20', 0),
+ 'allowed_forums' => array('TEXT', ''),
+ 'allow_in_pm' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'group_id',
+ );
+
+ $schema_data['phpbb_forums'] = array(
+ 'COLUMNS' => array(
+ 'forum_id' => array('UINT', NULL, 'auto_increment'),
+ 'parent_id' => array('UINT', 0),
+ 'left_id' => array('UINT', 0),
+ 'right_id' => array('UINT', 0),
+ 'forum_parents' => array('MTEXT', ''),
+ 'forum_name' => array('STEXT_UNI', ''),
+ 'forum_desc' => array('TEXT_UNI', ''),
+ 'forum_desc_bitfield' => array('VCHAR:255', ''),
+ 'forum_desc_options' => array('UINT:11', 7),
+ 'forum_desc_uid' => array('VCHAR:8', ''),
+ 'forum_link' => array('VCHAR_UNI', ''),
+ 'forum_password' => array('VCHAR_UNI:40', ''),
+ 'forum_style' => array('UINT', 0),
+ 'forum_image' => array('VCHAR', ''),
+ 'forum_rules' => array('TEXT_UNI', ''),
+ 'forum_rules_link' => array('VCHAR_UNI', ''),
+ 'forum_rules_bitfield' => array('VCHAR:255', ''),
+ 'forum_rules_options' => array('UINT:11', 7),
+ 'forum_rules_uid' => array('VCHAR:8', ''),
+ 'forum_topics_per_page' => array('TINT:4', 0),
+ 'forum_type' => array('TINT:4', 0),
+ 'forum_status' => array('TINT:4', 0),
+ 'forum_posts' => array('UINT', 0),
+ 'forum_topics' => array('UINT', 0),
+ 'forum_topics_real' => array('UINT', 0),
+ 'forum_last_post_id' => array('UINT', 0),
+ 'forum_last_poster_id' => array('UINT', 0),
+ 'forum_last_post_subject' => array('STEXT_UNI', ''),
+ 'forum_last_post_time' => array('TIMESTAMP', 0),
+ 'forum_last_poster_name'=> array('VCHAR_UNI', ''),
+ 'forum_last_poster_colour'=> array('VCHAR:6', ''),
+ 'forum_flags' => array('TINT:4', 32),
+ 'forum_options' => array('UINT:20', 0),
+ 'display_subforum_list' => array('BOOL', 1),
+ 'display_on_index' => array('BOOL', 1),
+ 'enable_indexing' => array('BOOL', 1),
+ 'enable_icons' => array('BOOL', 1),
+ 'enable_prune' => array('BOOL', 0),
+ 'prune_next' => array('TIMESTAMP', 0),
+ 'prune_days' => array('UINT', 0),
+ 'prune_viewed' => array('UINT', 0),
+ 'prune_freq' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'forum_id',
+ 'KEYS' => array(
+ 'left_right_id' => array('INDEX', array('left_id', 'right_id')),
+ 'forum_lastpost_id' => array('INDEX', 'forum_last_post_id'),
+ ),
+ );
+
+ $schema_data['phpbb_forums_access'] = array(
+ 'COLUMNS' => array(
+ 'forum_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'session_id' => array('CHAR:32', ''),
+ ),
+ 'PRIMARY_KEY' => array('forum_id', 'user_id', 'session_id'),
+ );
+
+ $schema_data['phpbb_forums_track'] = array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'mark_time' => array('TIMESTAMP', 0),
+ ),
+ 'PRIMARY_KEY' => array('user_id', 'forum_id'),
+ );
+
+ $schema_data['phpbb_forums_watch'] = array(
+ 'COLUMNS' => array(
+ 'forum_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'notify_status' => array('BOOL', 0),
+ ),
+ 'KEYS' => array(
+ 'forum_id' => array('INDEX', 'forum_id'),
+ 'user_id' => array('INDEX', 'user_id'),
+ 'notify_stat' => array('INDEX', 'notify_status'),
+ ),
+ );
+
+ $schema_data['phpbb_groups'] = array(
+ 'COLUMNS' => array(
+ 'group_id' => array('UINT', NULL, 'auto_increment'),
+ 'group_type' => array('TINT:4', 1),
+ 'group_founder_manage' => array('BOOL', 0),
+ 'group_skip_auth' => array('BOOL', 0),
+ 'group_name' => array('VCHAR_CI', ''),
+ 'group_desc' => array('TEXT_UNI', ''),
+ 'group_desc_bitfield' => array('VCHAR:255', ''),
+ 'group_desc_options' => array('UINT:11', 7),
+ 'group_desc_uid' => array('VCHAR:8', ''),
+ 'group_display' => array('BOOL', 0),
+ 'group_avatar' => array('VCHAR', ''),
+ 'group_avatar_type' => array('TINT:2', 0),
+ 'group_avatar_width' => array('USINT', 0),
+ 'group_avatar_height' => array('USINT', 0),
+ 'group_rank' => array('UINT', 0),
+ 'group_colour' => array('VCHAR:6', ''),
+ 'group_sig_chars' => array('UINT', 0),
+ 'group_receive_pm' => array('BOOL', 0),
+ 'group_message_limit' => array('UINT', 0),
+ 'group_max_recipients' => array('UINT', 0),
+ 'group_legend' => array('BOOL', 1),
+ ),
+ 'PRIMARY_KEY' => 'group_id',
+ 'KEYS' => array(
+ 'group_legend_name' => array('INDEX', array('group_legend', 'group_name')),
+ ),
+ );
+
+ $schema_data['phpbb_icons'] = array(
+ 'COLUMNS' => array(
+ 'icons_id' => array('UINT', NULL, 'auto_increment'),
+ 'icons_url' => array('VCHAR', ''),
+ 'icons_width' => array('TINT:4', 0),
+ 'icons_height' => array('TINT:4', 0),
+ 'icons_order' => array('UINT', 0),
+ 'display_on_posting' => array('BOOL', 1),
+ ),
+ 'PRIMARY_KEY' => 'icons_id',
+ 'KEYS' => array(
+ 'display_on_posting' => array('INDEX', 'display_on_posting'),
+ ),
+ );
+
+ $schema_data['phpbb_lang'] = array(
+ 'COLUMNS' => array(
+ 'lang_id' => array('TINT:4', NULL, 'auto_increment'),
+ 'lang_iso' => array('VCHAR:30', ''),
+ 'lang_dir' => array('VCHAR:30', ''),
+ 'lang_english_name' => array('VCHAR_UNI:100', ''),
+ 'lang_local_name' => array('VCHAR_UNI:255', ''),
+ 'lang_author' => array('VCHAR_UNI:255', ''),
+ ),
+ 'PRIMARY_KEY' => 'lang_id',
+ 'KEYS' => array(
+ 'lang_iso' => array('INDEX', 'lang_iso'),
+ ),
+ );
+
+ $schema_data['phpbb_log'] = array(
+ 'COLUMNS' => array(
+ 'log_id' => array('UINT', NULL, 'auto_increment'),
+ 'log_type' => array('TINT:4', 0),
+ 'user_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ 'reportee_id' => array('UINT', 0),
+ 'log_ip' => array('VCHAR:40', ''),
+ 'log_time' => array('TIMESTAMP', 0),
+ 'log_operation' => array('TEXT_UNI', ''),
+ 'log_data' => array('MTEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'log_id',
+ 'KEYS' => array(
+ 'log_type' => array('INDEX', 'log_type'),
+ 'log_time' => array('INDEX', 'log_time'),
+ 'forum_id' => array('INDEX', 'forum_id'),
+ 'topic_id' => array('INDEX', 'topic_id'),
+ 'reportee_id' => array('INDEX', 'reportee_id'),
+ 'user_id' => array('INDEX', 'user_id'),
+ ),
+ );
+
+ $schema_data['phpbb_moderator_cache'] = array(
+ 'COLUMNS' => array(
+ 'forum_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'username' => array('VCHAR_UNI:255', ''),
+ 'group_id' => array('UINT', 0),
+ 'group_name' => array('VCHAR_UNI', ''),
+ 'display_on_index' => array('BOOL', 1),
+ ),
+ 'KEYS' => array(
+ 'disp_idx' => array('INDEX', 'display_on_index'),
+ 'forum_id' => array('INDEX', 'forum_id'),
+ ),
+ );
+
+ $schema_data['phpbb_modules'] = array(
+ 'COLUMNS' => array(
+ 'module_id' => array('UINT', NULL, 'auto_increment'),
+ 'module_enabled' => array('BOOL', 1),
+ 'module_display' => array('BOOL', 1),
+ 'module_basename' => array('VCHAR', ''),
+ 'module_class' => array('VCHAR:10', ''),
+ 'parent_id' => array('UINT', 0),
+ 'left_id' => array('UINT', 0),
+ 'right_id' => array('UINT', 0),
+ 'module_langname' => array('VCHAR', ''),
+ 'module_mode' => array('VCHAR', ''),
+ 'module_auth' => array('VCHAR', ''),
+ ),
+ 'PRIMARY_KEY' => 'module_id',
+ 'KEYS' => array(
+ 'left_right_id' => array('INDEX', array('left_id', 'right_id')),
+ 'module_enabled' => array('INDEX', 'module_enabled'),
+ 'class_left_id' => array('INDEX', array('module_class', 'left_id')),
+ ),
+ );
+
+ $schema_data['phpbb_poll_options'] = array(
+ 'COLUMNS' => array(
+ 'poll_option_id' => array('TINT:4', 0),
+ 'topic_id' => array('UINT', 0),
+ 'poll_option_text' => array('TEXT_UNI', ''),
+ 'poll_option_total' => array('UINT', 0),
+ ),
+ 'KEYS' => array(
+ 'poll_opt_id' => array('INDEX', 'poll_option_id'),
+ 'topic_id' => array('INDEX', 'topic_id'),
+ ),
+ );
+
+ $schema_data['phpbb_poll_votes'] = array(
+ 'COLUMNS' => array(
+ 'topic_id' => array('UINT', 0),
+ 'poll_option_id' => array('TINT:4', 0),
+ 'vote_user_id' => array('UINT', 0),
+ 'vote_user_ip' => array('VCHAR:40', ''),
+ ),
+ 'KEYS' => array(
+ 'topic_id' => array('INDEX', 'topic_id'),
+ 'vote_user_id' => array('INDEX', 'vote_user_id'),
+ 'vote_user_ip' => array('INDEX', 'vote_user_ip'),
+ ),
+ );
+
+ $schema_data['phpbb_posts'] = array(
+ 'COLUMNS' => array(
+ 'post_id' => array('UINT', NULL, 'auto_increment'),
+ 'topic_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'poster_id' => array('UINT', 0),
+ 'icon_id' => array('UINT', 0),
+ 'poster_ip' => array('VCHAR:40', ''),
+ 'post_time' => array('TIMESTAMP', 0),
+ 'post_approved' => array('BOOL', 1),
+ 'post_reported' => array('BOOL', 0),
+ 'enable_bbcode' => array('BOOL', 1),
+ 'enable_smilies' => array('BOOL', 1),
+ 'enable_magic_url' => array('BOOL', 1),
+ 'enable_sig' => array('BOOL', 1),
+ 'post_username' => array('VCHAR_UNI:255', ''),
+ 'post_subject' => array('STEXT_UNI', '', 'true_sort'),
+ 'post_text' => array('MTEXT_UNI', ''),
+ 'post_checksum' => array('VCHAR:32', ''),
+ 'post_attachment' => array('BOOL', 0),
+ 'bbcode_bitfield' => array('VCHAR:255', ''),
+ 'bbcode_uid' => array('VCHAR:8', ''),
+ 'post_postcount' => array('BOOL', 1),
+ 'post_edit_time' => array('TIMESTAMP', 0),
+ 'post_edit_reason' => array('STEXT_UNI', ''),
+ 'post_edit_user' => array('UINT', 0),
+ 'post_edit_count' => array('USINT', 0),
+ 'post_edit_locked' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'post_id',
+ 'KEYS' => array(
+ 'forum_id' => array('INDEX', 'forum_id'),
+ 'topic_id' => array('INDEX', 'topic_id'),
+ 'poster_ip' => array('INDEX', 'poster_ip'),
+ 'poster_id' => array('INDEX', 'poster_id'),
+ 'post_approved' => array('INDEX', 'post_approved'),
+ 'post_username' => array('INDEX', 'post_username'),
+ 'tid_post_time' => array('INDEX', array('topic_id', 'post_time')),
+ ),
+ );
+
+ $schema_data['phpbb_privmsgs'] = array(
+ 'COLUMNS' => array(
+ 'msg_id' => array('UINT', NULL, 'auto_increment'),
+ 'root_level' => array('UINT', 0),
+ 'author_id' => array('UINT', 0),
+ 'icon_id' => array('UINT', 0),
+ 'author_ip' => array('VCHAR:40', ''),
+ 'message_time' => array('TIMESTAMP', 0),
+ 'enable_bbcode' => array('BOOL', 1),
+ 'enable_smilies' => array('BOOL', 1),
+ 'enable_magic_url' => array('BOOL', 1),
+ 'enable_sig' => array('BOOL', 1),
+ 'message_subject' => array('STEXT_UNI', ''),
+ 'message_text' => array('MTEXT_UNI', ''),
+ 'message_edit_reason' => array('STEXT_UNI', ''),
+ 'message_edit_user' => array('UINT', 0),
+ 'message_attachment' => array('BOOL', 0),
+ 'bbcode_bitfield' => array('VCHAR:255', ''),
+ 'bbcode_uid' => array('VCHAR:8', ''),
+ 'message_edit_time' => array('TIMESTAMP', 0),
+ 'message_edit_count' => array('USINT', 0),
+ 'to_address' => array('TEXT_UNI', ''),
+ 'bcc_address' => array('TEXT_UNI', ''),
+ 'message_reported' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'msg_id',
+ 'KEYS' => array(
+ 'author_ip' => array('INDEX', 'author_ip'),
+ 'message_time' => array('INDEX', 'message_time'),
+ 'author_id' => array('INDEX', 'author_id'),
+ 'root_level' => array('INDEX', 'root_level'),
+ ),
+ );
+
+ $schema_data['phpbb_privmsgs_folder'] = array(
+ 'COLUMNS' => array(
+ 'folder_id' => array('UINT', NULL, 'auto_increment'),
+ 'user_id' => array('UINT', 0),
+ 'folder_name' => array('VCHAR_UNI', ''),
+ 'pm_count' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'folder_id',
+ 'KEYS' => array(
+ 'user_id' => array('INDEX', 'user_id'),
+ ),
+ );
+
+ $schema_data['phpbb_privmsgs_rules'] = array(
+ 'COLUMNS' => array(
+ 'rule_id' => array('UINT', NULL, 'auto_increment'),
+ 'user_id' => array('UINT', 0),
+ 'rule_check' => array('UINT', 0),
+ 'rule_connection' => array('UINT', 0),
+ 'rule_string' => array('VCHAR_UNI', ''),
+ 'rule_user_id' => array('UINT', 0),
+ 'rule_group_id' => array('UINT', 0),
+ 'rule_action' => array('UINT', 0),
+ 'rule_folder_id' => array('INT:11', 0),
+ ),
+ 'PRIMARY_KEY' => 'rule_id',
+ 'KEYS' => array(
+ 'user_id' => array('INDEX', 'user_id'),
+ ),
+ );
+
+ $schema_data['phpbb_privmsgs_to'] = array(
+ 'COLUMNS' => array(
+ 'msg_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'author_id' => array('UINT', 0),
+ 'pm_deleted' => array('BOOL', 0),
+ 'pm_new' => array('BOOL', 1),
+ 'pm_unread' => array('BOOL', 1),
+ 'pm_replied' => array('BOOL', 0),
+ 'pm_marked' => array('BOOL', 0),
+ 'pm_forwarded' => array('BOOL', 0),
+ 'folder_id' => array('INT:11', 0),
+ ),
+ 'KEYS' => array(
+ 'msg_id' => array('INDEX', 'msg_id'),
+ 'author_id' => array('INDEX', 'author_id'),
+ 'usr_flder_id' => array('INDEX', array('user_id', 'folder_id')),
+ ),
+ );
+
+ $schema_data['phpbb_profile_fields'] = array(
+ 'COLUMNS' => array(
+ 'field_id' => array('UINT', NULL, 'auto_increment'),
+ 'field_name' => array('VCHAR_UNI', ''),
+ 'field_type' => array('TINT:4', 0),
+ 'field_ident' => array('VCHAR:20', ''),
+ 'field_length' => array('VCHAR:20', ''),
+ 'field_minlen' => array('VCHAR', ''),
+ 'field_maxlen' => array('VCHAR', ''),
+ 'field_novalue' => array('VCHAR_UNI', ''),
+ 'field_default_value' => array('VCHAR_UNI', ''),
+ 'field_validation' => array('VCHAR_UNI:20', ''),
+ 'field_required' => array('BOOL', 0),
+ 'field_show_on_reg' => array('BOOL', 0),
+ 'field_show_on_vt' => array('BOOL', 0),
+ 'field_show_profile' => array('BOOL', 0),
+ 'field_hide' => array('BOOL', 0),
+ 'field_no_view' => array('BOOL', 0),
+ 'field_active' => array('BOOL', 0),
+ 'field_order' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'field_id',
+ 'KEYS' => array(
+ 'fld_type' => array('INDEX', 'field_type'),
+ 'fld_ordr' => array('INDEX', 'field_order'),
+ ),
+ );
+
+ $schema_data['phpbb_profile_fields_data'] = array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'user_id',
+ );
+
+ $schema_data['phpbb_profile_fields_lang'] = array(
+ 'COLUMNS' => array(
+ 'field_id' => array('UINT', 0),
+ 'lang_id' => array('UINT', 0),
+ 'option_id' => array('UINT', 0),
+ 'field_type' => array('TINT:4', 0),
+ 'lang_value' => array('VCHAR_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => array('field_id', 'lang_id', 'option_id'),
+ );
+
+ $schema_data['phpbb_profile_lang'] = array(
+ 'COLUMNS' => array(
+ 'field_id' => array('UINT', 0),
+ 'lang_id' => array('UINT', 0),
+ 'lang_name' => array('VCHAR_UNI', ''),
+ 'lang_explain' => array('TEXT_UNI', ''),
+ 'lang_default_value' => array('VCHAR_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => array('field_id', 'lang_id'),
+ );
+
+ $schema_data['phpbb_ranks'] = array(
+ 'COLUMNS' => array(
+ 'rank_id' => array('UINT', NULL, 'auto_increment'),
+ 'rank_title' => array('VCHAR_UNI', ''),
+ 'rank_min' => array('UINT', 0),
+ 'rank_special' => array('BOOL', 0),
+ 'rank_image' => array('VCHAR', ''),
+ ),
+ 'PRIMARY_KEY' => 'rank_id',
+ );
+
+ $schema_data['phpbb_reports'] = array(
+ 'COLUMNS' => array(
+ 'report_id' => array('UINT', NULL, 'auto_increment'),
+ 'reason_id' => array('USINT', 0),
+ 'post_id' => array('UINT', 0),
+ 'pm_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'user_notify' => array('BOOL', 0),
+ 'report_closed' => array('BOOL', 0),
+ 'report_time' => array('TIMESTAMP', 0),
+ 'report_text' => array('MTEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'report_id',
+ 'KEYS' => array(
+ 'post_id' => array('INDEX', 'post_id'),
+ 'pm_id' => array('INDEX', 'pm_id'),
+ ),
+ );
+
+ $schema_data['phpbb_reports_reasons'] = array(
+ 'COLUMNS' => array(
+ 'reason_id' => array('USINT', NULL, 'auto_increment'),
+ 'reason_title' => array('VCHAR_UNI', ''),
+ 'reason_description' => array('MTEXT_UNI', ''),
+ 'reason_order' => array('USINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'reason_id',
+ );
+
+ $schema_data['phpbb_search_results'] = array(
+ 'COLUMNS' => array(
+ 'search_key' => array('VCHAR:32', ''),
+ 'search_time' => array('TIMESTAMP', 0),
+ 'search_keywords' => array('MTEXT_UNI', ''),
+ 'search_authors' => array('MTEXT', ''),
+ ),
+ 'PRIMARY_KEY' => 'search_key',
+ );
+
+ $schema_data['phpbb_search_wordlist'] = array(
+ 'COLUMNS' => array(
+ 'word_id' => array('UINT', NULL, 'auto_increment'),
+ 'word_text' => array('VCHAR_UNI', ''),
+ 'word_common' => array('BOOL', 0),
+ 'word_count' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'word_id',
+ 'KEYS' => array(
+ 'wrd_txt' => array('UNIQUE', 'word_text'),
+ 'wrd_cnt' => array('INDEX', 'word_count'),
+ ),
+ );
+
+ $schema_data['phpbb_search_wordmatch'] = array(
+ 'COLUMNS' => array(
+ 'post_id' => array('UINT', 0),
+ 'word_id' => array('UINT', 0),
+ 'title_match' => array('BOOL', 0),
+ ),
+ 'KEYS' => array(
+ 'unq_mtch' => array('UNIQUE', array('word_id', 'post_id', 'title_match')),
+ 'word_id' => array('INDEX', 'word_id'),
+ 'post_id' => array('INDEX', 'post_id'),
+ ),
+ );
+
+ $schema_data['phpbb_sessions'] = array(
+ 'COLUMNS' => array(
+ 'session_id' => array('CHAR:32', ''),
+ 'session_user_id' => array('UINT', 0),
+ 'session_forum_id' => array('UINT', 0),
+ 'session_last_visit' => array('TIMESTAMP', 0),
+ 'session_start' => array('TIMESTAMP', 0),
+ 'session_time' => array('TIMESTAMP', 0),
+ 'session_ip' => array('VCHAR:40', ''),
+ 'session_browser' => array('VCHAR:150', ''),
+ 'session_forwarded_for' => array('VCHAR:255', ''),
+ 'session_page' => array('VCHAR_UNI', ''),
+ 'session_viewonline' => array('BOOL', 1),
+ 'session_autologin' => array('BOOL', 0),
+ 'session_admin' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'session_id',
+ 'KEYS' => array(
+ 'session_time' => array('INDEX', 'session_time'),
+ 'session_user_id' => array('INDEX', 'session_user_id'),
+ 'session_fid' => array('INDEX', 'session_forum_id'),
+ ),
+ );
+
+ $schema_data['phpbb_sessions_keys'] = array(
+ 'COLUMNS' => array(
+ 'key_id' => array('CHAR:32', ''),
+ 'user_id' => array('UINT', 0),
+ 'last_ip' => array('VCHAR:40', ''),
+ 'last_login' => array('TIMESTAMP', 0),
+ ),
+ 'PRIMARY_KEY' => array('key_id', 'user_id'),
+ 'KEYS' => array(
+ 'last_login' => array('INDEX', 'last_login'),
+ ),
+ );
+
+ $schema_data['phpbb_sitelist'] = array(
+ 'COLUMNS' => array(
+ 'site_id' => array('UINT', NULL, 'auto_increment'),
+ 'site_ip' => array('VCHAR:40', ''),
+ 'site_hostname' => array('VCHAR', ''),
+ 'ip_exclude' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'site_id',
+ );
+
+ $schema_data['phpbb_smilies'] = array(
+ 'COLUMNS' => array(
+ 'smiley_id' => array('UINT', NULL, 'auto_increment'),
+ // We may want to set 'code' to VCHAR:50 or check if unicode support is possible... at the moment only ASCII characters are allowed.
+ 'code' => array('VCHAR_UNI:50', ''),
+ 'emotion' => array('VCHAR_UNI:50', ''),
+ 'smiley_url' => array('VCHAR:50', ''),
+ 'smiley_width' => array('USINT', 0),
+ 'smiley_height' => array('USINT', 0),
+ 'smiley_order' => array('UINT', 0),
+ 'display_on_posting'=> array('BOOL', 1),
+ ),
+ 'PRIMARY_KEY' => 'smiley_id',
+ 'KEYS' => array(
+ 'display_on_post' => array('INDEX', 'display_on_posting'),
+ ),
+ );
+
+ $schema_data['phpbb_styles'] = array(
+ 'COLUMNS' => array(
+ 'style_id' => array('UINT', NULL, 'auto_increment'),
+ 'style_name' => array('VCHAR_UNI:255', ''),
+ 'style_copyright' => array('VCHAR_UNI', ''),
+ 'style_active' => array('BOOL', 1),
+ 'template_id' => array('UINT', 0),
+ 'theme_id' => array('UINT', 0),
+ 'imageset_id' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'style_id',
+ 'KEYS' => array(
+ 'style_name' => array('UNIQUE', 'style_name'),
+ 'template_id' => array('INDEX', 'template_id'),
+ 'theme_id' => array('INDEX', 'theme_id'),
+ 'imageset_id' => array('INDEX', 'imageset_id'),
+ ),
+ );
+
+ $schema_data['phpbb_styles_template'] = array(
+ 'COLUMNS' => array(
+ 'template_id' => array('UINT', NULL, 'auto_increment'),
+ 'template_name' => array('VCHAR_UNI:255', ''),
+ 'template_copyright' => array('VCHAR_UNI', ''),
+ 'template_path' => array('VCHAR:100', ''),
+ 'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
+ 'template_storedb' => array('BOOL', 0),
+ 'template_inherits_id' => array('UINT:4', 0),
+ 'template_inherit_path' => array('VCHAR', ''),
+ ),
+ 'PRIMARY_KEY' => 'template_id',
+ 'KEYS' => array(
+ 'tmplte_nm' => array('UNIQUE', 'template_name'),
+ ),
+ );
+
+ $schema_data['phpbb_styles_template_data'] = array(
+ 'COLUMNS' => array(
+ 'template_id' => array('UINT', 0),
+ 'template_filename' => array('VCHAR:100', ''),
+ 'template_included' => array('TEXT', ''),
+ 'template_mtime' => array('TIMESTAMP', 0),
+ 'template_data' => array('MTEXT_UNI', ''),
+ ),
+ 'KEYS' => array(
+ 'tid' => array('INDEX', 'template_id'),
+ 'tfn' => array('INDEX', 'template_filename'),
+ ),
+ );
+
+ $schema_data['phpbb_styles_theme'] = array(
+ 'COLUMNS' => array(
+ 'theme_id' => array('UINT', NULL, 'auto_increment'),
+ 'theme_name' => array('VCHAR_UNI:255', ''),
+ 'theme_copyright' => array('VCHAR_UNI', ''),
+ 'theme_path' => array('VCHAR:100', ''),
+ 'theme_storedb' => array('BOOL', 0),
+ 'theme_mtime' => array('TIMESTAMP', 0),
+ 'theme_data' => array('MTEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'theme_id',
+ 'KEYS' => array(
+ 'theme_name' => array('UNIQUE', 'theme_name'),
+ ),
+ );
+
+ $schema_data['phpbb_styles_imageset'] = array(
+ 'COLUMNS' => array(
+ 'imageset_id' => array('UINT', NULL, 'auto_increment'),
+ 'imageset_name' => array('VCHAR_UNI:255', ''),
+ 'imageset_copyright' => array('VCHAR_UNI', ''),
+ 'imageset_path' => array('VCHAR:100', ''),
+ ),
+ 'PRIMARY_KEY' => 'imageset_id',
+ 'KEYS' => array(
+ 'imgset_nm' => array('UNIQUE', 'imageset_name'),
+ ),
+ );
+
+ $schema_data['phpbb_styles_imageset_data'] = array(
+ 'COLUMNS' => array(
+ 'image_id' => array('UINT', NULL, 'auto_increment'),
+ 'image_name' => array('VCHAR:200', ''),
+ 'image_filename' => array('VCHAR:200', ''),
+ 'image_lang' => array('VCHAR:30', ''),
+ 'image_height' => array('USINT', 0),
+ 'image_width' => array('USINT', 0),
+ 'imageset_id' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'image_id',
+ 'KEYS' => array(
+ 'i_d' => array('INDEX', 'imageset_id'),
+ ),
+ );
+
+ $schema_data['phpbb_topics'] = array(
+ 'COLUMNS' => array(
+ 'topic_id' => array('UINT', NULL, 'auto_increment'),
+ 'forum_id' => array('UINT', 0),
+ 'icon_id' => array('UINT', 0),
+ 'topic_attachment' => array('BOOL', 0),
+ 'topic_approved' => array('BOOL', 1),
+ 'topic_reported' => array('BOOL', 0),
+ 'topic_title' => array('STEXT_UNI', '', 'true_sort'),
+ 'topic_poster' => array('UINT', 0),
+ 'topic_time' => array('TIMESTAMP', 0),
+ 'topic_time_limit' => array('TIMESTAMP', 0),
+ 'topic_views' => array('UINT', 0),
+ 'topic_replies' => array('UINT', 0),
+ 'topic_replies_real' => array('UINT', 0),
+ 'topic_status' => array('TINT:3', 0),
+ 'topic_type' => array('TINT:3', 0),
+ 'topic_first_post_id' => array('UINT', 0),
+ 'topic_first_poster_name' => array('VCHAR_UNI', ''),
+ 'topic_first_poster_colour' => array('VCHAR:6', ''),
+ 'topic_last_post_id' => array('UINT', 0),
+ 'topic_last_poster_id' => array('UINT', 0),
+ 'topic_last_poster_name' => array('VCHAR_UNI', ''),
+ 'topic_last_poster_colour' => array('VCHAR:6', ''),
+ 'topic_last_post_subject' => array('STEXT_UNI', ''),
+ 'topic_last_post_time' => array('TIMESTAMP', 0),
+ 'topic_last_view_time' => array('TIMESTAMP', 0),
+ 'topic_moved_id' => array('UINT', 0),
+ 'topic_bumped' => array('BOOL', 0),
+ 'topic_bumper' => array('UINT', 0),
+ 'poll_title' => array('STEXT_UNI', ''),
+ 'poll_start' => array('TIMESTAMP', 0),
+ 'poll_length' => array('TIMESTAMP', 0),
+ 'poll_max_options' => array('TINT:4', 1),
+ 'poll_last_vote' => array('TIMESTAMP', 0),
+ 'poll_vote_change' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'topic_id',
+ 'KEYS' => array(
+ 'forum_id' => array('INDEX', 'forum_id'),
+ 'forum_id_type' => array('INDEX', array('forum_id', 'topic_type')),
+ 'last_post_time' => array('INDEX', 'topic_last_post_time'),
+ 'topic_approved' => array('INDEX', 'topic_approved'),
+ 'forum_appr_last' => array('INDEX', array('forum_id', 'topic_approved', 'topic_last_post_id')),
+ 'fid_time_moved' => array('INDEX', array('forum_id', 'topic_last_post_time', 'topic_moved_id')),
+ ),
+ );
+
+ $schema_data['phpbb_topics_track'] = array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'mark_time' => array('TIMESTAMP', 0),
+ ),
+ 'PRIMARY_KEY' => array('user_id', 'topic_id'),
+ 'KEYS' => array(
+ 'forum_id' => array('INDEX', 'forum_id'),
+ ),
+ );
+
+ $schema_data['phpbb_topics_posted'] = array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ 'topic_posted' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => array('user_id', 'topic_id'),
+ );
+
+ $schema_data['phpbb_topics_watch'] = array(
+ 'COLUMNS' => array(
+ 'topic_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'notify_status' => array('BOOL', 0),
+ ),
+ 'KEYS' => array(
+ 'topic_id' => array('INDEX', 'topic_id'),
+ 'user_id' => array('INDEX', 'user_id'),
+ 'notify_stat' => array('INDEX', 'notify_status'),
+ ),
+ );
+
+ $schema_data['phpbb_user_group'] = array(
+ 'COLUMNS' => array(
+ 'group_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'group_leader' => array('BOOL', 0),
+ 'user_pending' => array('BOOL', 1),
+ ),
+ 'KEYS' => array(
+ 'group_id' => array('INDEX', 'group_id'),
+ 'user_id' => array('INDEX', 'user_id'),
+ 'group_leader' => array('INDEX', 'group_leader'),
+ ),
+ );
+
+ $schema_data['phpbb_users'] = array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', NULL, 'auto_increment'),
+ 'user_type' => array('TINT:2', 0),
+ 'group_id' => array('UINT', 3),
+ 'user_permissions' => array('MTEXT', ''),
+ 'user_perm_from' => array('UINT', 0),
+ 'user_ip' => array('VCHAR:40', ''),
+ 'user_regdate' => array('TIMESTAMP', 0),
+ 'username' => array('VCHAR_CI', ''),
+ 'username_clean' => array('VCHAR_CI', ''),
+ 'user_password' => array('VCHAR_UNI:40', ''),
+ 'user_passchg' => array('TIMESTAMP', 0),
+ 'user_pass_convert' => array('BOOL', 0),
+ 'user_email' => array('VCHAR_UNI:100', ''),
+ 'user_email_hash' => array('BINT', 0),
+ 'user_birthday' => array('VCHAR:10', ''),
+ 'user_lastvisit' => array('TIMESTAMP', 0),
+ 'user_lastmark' => array('TIMESTAMP', 0),
+ 'user_lastpost_time' => array('TIMESTAMP', 0),
+ 'user_lastpage' => array('VCHAR_UNI:200', ''),
+ 'user_last_confirm_key' => array('VCHAR:10', ''),
+ 'user_last_search' => array('TIMESTAMP', 0),
+ 'user_warnings' => array('TINT:4', 0),
+ 'user_last_warning' => array('TIMESTAMP', 0),
+ 'user_login_attempts' => array('TINT:4', 0),
+ 'user_inactive_reason' => array('TINT:2', 0),
+ 'user_inactive_time' => array('TIMESTAMP', 0),
+ 'user_posts' => array('UINT', 0),
+ 'user_lang' => array('VCHAR:30', ''),
+ 'user_timezone' => array('DECIMAL', 0),
+ 'user_dst' => array('BOOL', 0),
+ 'user_dateformat' => array('VCHAR_UNI:30', 'd M Y H:i'),
+ 'user_style' => array('UINT', 0),
+ 'user_rank' => array('UINT', 0),
+ 'user_colour' => array('VCHAR:6', ''),
+ 'user_new_privmsg' => array('INT:4', 0),
+ 'user_unread_privmsg' => array('INT:4', 0),
+ 'user_last_privmsg' => array('TIMESTAMP', 0),
+ 'user_message_rules' => array('BOOL', 0),
+ 'user_full_folder' => array('INT:11', -3),
+ 'user_emailtime' => array('TIMESTAMP', 0),
+ 'user_topic_show_days' => array('USINT', 0),
+ 'user_topic_sortby_type' => array('VCHAR:1', 't'),
+ 'user_topic_sortby_dir' => array('VCHAR:1', 'd'),
+ 'user_post_show_days' => array('USINT', 0),
+ 'user_post_sortby_type' => array('VCHAR:1', 't'),
+ 'user_post_sortby_dir' => array('VCHAR:1', 'a'),
+ 'user_notify' => array('BOOL', 0),
+ 'user_notify_pm' => array('BOOL', 1),
+ 'user_notify_type' => array('TINT:4', 0),
+ 'user_allow_pm' => array('BOOL', 1),
+ 'user_allow_viewonline' => array('BOOL', 1),
+ 'user_allow_viewemail' => array('BOOL', 1),
+ 'user_allow_massemail' => array('BOOL', 1),
+ 'user_options' => array('UINT:11', 230271),
+ 'user_avatar' => array('VCHAR', ''),
+ 'user_avatar_type' => array('TINT:2', 0),
+ 'user_avatar_width' => array('USINT', 0),
+ 'user_avatar_height' => array('USINT', 0),
+ 'user_sig' => array('MTEXT_UNI', ''),
+ 'user_sig_bbcode_uid' => array('VCHAR:8', ''),
+ 'user_sig_bbcode_bitfield' => array('VCHAR:255', ''),
+ 'user_from' => array('VCHAR_UNI:100', ''),
+ 'user_icq' => array('VCHAR:15', ''),
+ 'user_aim' => array('VCHAR_UNI', ''),
+ 'user_yim' => array('VCHAR_UNI', ''),
+ 'user_msnm' => array('VCHAR_UNI', ''),
+ 'user_jabber' => array('VCHAR_UNI', ''),
+ 'user_website' => array('VCHAR_UNI:200', ''),
+ 'user_occ' => array('TEXT_UNI', ''),
+ 'user_interests' => array('TEXT_UNI', ''),
+ 'user_actkey' => array('VCHAR:32', ''),
+ 'user_newpasswd' => array('VCHAR_UNI:40', ''),
+ 'user_form_salt' => array('VCHAR_UNI:32', ''),
+ 'user_new' => array('BOOL', 1),
+ 'user_reminded' => array('TINT:4', 0),
+ 'user_reminded_time' => array('TIMESTAMP', 0),
+ ),
+ 'PRIMARY_KEY' => 'user_id',
+ 'KEYS' => array(
+ 'user_birthday' => array('INDEX', 'user_birthday'),
+ 'user_email_hash' => array('INDEX', 'user_email_hash'),
+ 'user_type' => array('INDEX', 'user_type'),
+ 'username_clean' => array('UNIQUE', 'username_clean'),
+ ),
+ );
+
+ $schema_data['phpbb_warnings'] = array(
+ 'COLUMNS' => array(
+ 'warning_id' => array('UINT', NULL, 'auto_increment'),
+ 'user_id' => array('UINT', 0),
+ 'post_id' => array('UINT', 0),
+ 'log_id' => array('UINT', 0),
+ 'warning_time' => array('TIMESTAMP', 0),
+ ),
+ 'PRIMARY_KEY' => 'warning_id',
+ );
+
+ $schema_data['phpbb_words'] = array(
+ 'COLUMNS' => array(
+ 'word_id' => array('UINT', NULL, 'auto_increment'),
+ 'word' => array('VCHAR_UNI', ''),
+ 'replacement' => array('VCHAR_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'word_id',
+ );
+
+ $schema_data['phpbb_zebra'] = array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ 'zebra_id' => array('UINT', 0),
+ 'friend' => array('BOOL', 0),
+ 'foe' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => array('user_id', 'zebra_id'),
+ );
+
+ return $schema_data;
+}
+
+
+/**
+* Data put into the header for various dbms
+*/
+function custom_data($dbms)
+{
+ switch ($dbms)
+ {
+ case 'oracle':
+ return <<<EOF
+/*
+ This first section is optional, however its probably the best method
+ of running phpBB on Oracle. If you already have a tablespace and user created
+ for phpBB you can leave this section commented out!
+
+ The first set of statements create a phpBB tablespace and a phpBB user,
+ make sure you change the password of the phpBB user before you run this script!!
+*/
+
+/*
+CREATE TABLESPACE "PHPBB"
+ LOGGING
+ DATAFILE 'E:\ORACLE\ORADATA\LOCAL\PHPBB.ora'
+ SIZE 10M
+ AUTOEXTEND ON NEXT 10M
+ MAXSIZE 100M;
+
+CREATE USER "PHPBB"
+ PROFILE "DEFAULT"
+ IDENTIFIED BY "phpbb_password"
+ DEFAULT TABLESPACE "PHPBB"
+ QUOTA UNLIMITED ON "PHPBB"
+ ACCOUNT UNLOCK;
+
+GRANT ANALYZE ANY TO "PHPBB";
+GRANT CREATE SEQUENCE TO "PHPBB";
+GRANT CREATE SESSION TO "PHPBB";
+GRANT CREATE TABLE TO "PHPBB";
+GRANT CREATE TRIGGER TO "PHPBB";
+GRANT CREATE VIEW TO "PHPBB";
+GRANT "CONNECT" TO "PHPBB";
+
+COMMIT;
+DISCONNECT;
+
+CONNECT phpbb/phpbb_password;
+*/
+EOF;
+
+ break;
+
+ case 'postgres':
+ return <<<EOF
+/*
+ Domain definition
+*/
+CREATE DOMAIN varchar_ci AS varchar(255) NOT NULL DEFAULT ''::character varying;
+
+/*
+ Operation Functions
+*/
+CREATE FUNCTION _varchar_ci_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) = LOWER($2)' LANGUAGE SQL STRICT;
+CREATE FUNCTION _varchar_ci_not_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) != LOWER($2)' LANGUAGE SQL STRICT;
+CREATE FUNCTION _varchar_ci_less_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) < LOWER($2)' LANGUAGE SQL STRICT;
+CREATE FUNCTION _varchar_ci_less_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) <= LOWER($2)' LANGUAGE SQL STRICT;
+CREATE FUNCTION _varchar_ci_greater_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) > LOWER($2)' LANGUAGE SQL STRICT;
+CREATE FUNCTION _varchar_ci_greater_equals(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) >= LOWER($2)' LANGUAGE SQL STRICT;
+
+/*
+ Operators
+*/
+CREATE OPERATOR <(
+ PROCEDURE = _varchar_ci_less_than,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = >,
+ NEGATOR = >=,
+ RESTRICT = scalarltsel,
+ JOIN = scalarltjoinsel);
+
+CREATE OPERATOR <=(
+ PROCEDURE = _varchar_ci_less_equal,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = >=,
+ NEGATOR = >,
+ RESTRICT = scalarltsel,
+ JOIN = scalarltjoinsel);
+
+CREATE OPERATOR >(
+ PROCEDURE = _varchar_ci_greater_than,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = <,
+ NEGATOR = <=,
+ RESTRICT = scalargtsel,
+ JOIN = scalargtjoinsel);
+
+CREATE OPERATOR >=(
+ PROCEDURE = _varchar_ci_greater_equals,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = <=,
+ NEGATOR = <,
+ RESTRICT = scalargtsel,
+ JOIN = scalargtjoinsel);
+
+CREATE OPERATOR <>(
+ PROCEDURE = _varchar_ci_not_equal,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = <>,
+ NEGATOR = =,
+ RESTRICT = neqsel,
+ JOIN = neqjoinsel);
+
+CREATE OPERATOR =(
+ PROCEDURE = _varchar_ci_equal,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = =,
+ NEGATOR = <>,
+ RESTRICT = eqsel,
+ JOIN = eqjoinsel,
+ HASHES,
+ MERGES,
+ SORT1= <);
+
+EOF;
+ break;
+ }
+
+ return '';
+}
+
+echo 'done';
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/create_variable_overview.php b/phpBB/develop/create_variable_overview.php
new file mode 100644
index 0000000000..3782f53e4c
--- /dev/null
+++ b/phpBB/develop/create_variable_overview.php
@@ -0,0 +1,547 @@
+<?php
+// -------------------------------------------------------------
+//
+// $Id$
+//
+// FILENAME : create_variable_overview.php
+// STARTED : Fri Aug 15 2003
+// COPYRIGHT : © 2003 phpBB Group
+// WWW : http://www.phpbb.com/
+// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
+//
+// -------------------------------------------------------------
+
+/*
+ This script generates an index of some template vars and their use within the templates.
+ It writes down all language variables used by various templates.
+*/
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+$directory = '../styles/subSilver/template/';
+$ext = 'html';
+$store_dir = '../store/';
+
+$phpfiles_directories = array('../', '../includes/', '../includes/acm/', '../includes/auth/', '../includes/mcp/', '../includes/ucp/');
+// Template Files beginning with this names are merged together
+$merge = array('gcp', 'login', 'mcp', 'memberlist', 'posting', 'ucp');
+
+if (!is_writable($store_dir))
+{
+ die("Directory $store_dir is not writable!");
+}
+
+$contents = implode('', file('../adm/subSilver.css', filesize('../adm/subSilver.css')));
+$fp = fopen($store_dir . 'subSilver.css', 'w');
+fwrite($fp, $contents);
+fclose($fp);
+
+$html_skeleton = '
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<link rel="stylesheet" href="subSilver.css" type="text/css">
+<style type="text/css">
+<!--
+th { background-image: url(\'cellpic3.gif\') }
+td.cat { background-image: url(\'cellpic1.gif\') }
+//-->
+</style>
+<title>{FILENAME}</title>
+</head>
+<body>
+
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td><img src="header_left.jpg" width="200" height="60" alt="phpBB Logo" title="phpBB Logo" border="0"/></td>
+ <td width="100%" background="header_bg.jpg" height="60" align="right" nowrap="nowrap"><span class="maintitle">File {FILENAME}</span> &nbsp; &nbsp; &nbsp;</td>
+ </tr>
+</table>
+
+<table width="95%" cellspacing="0" cellpadding="0" border="0" align="center">
+ <tr>
+ <td><br clear="all" />
+
+';
+$html_skeleton .= '<br><a href="./index.html" class="gen">Back to Contents</a><br><br>';
+$html_skeleton .= '<br><a href="#lang" class="gen">Language Variables</a> :: <a href="#includes" class="gen">Includes</a> :: <a href="#cond" class="gen">Conditionals</a><br><a href="#remain" class="gen">Remaining Vars</a> :: <a href="#usedby" class="gen">phpBB File Usage</a> :: <a href="#ref" class="gen">References</a>';
+$html_skeleton .= '<br><br><a name="lang"></a><b>Language Variables</b><br><br>{LANGUAGE_VARIABLES}';
+$html_skeleton .= '<br><br><a name="includes"></a><b>Included Files</b><br><br>{INCLUDES}';
+$html_skeleton .= '<br><br><a name="cond"></a><b>Used Conditionals</b><br><br>{CONDITIONALS}';
+$html_skeleton .= '<br><br><a name="remain"></a><b>Remaining Vars used</b><br><br>{REMAINING_VARS}';
+$html_skeleton .= '<br><br><a name="usedby"></a><b>This Template File is used by the following phpBB Files</b><br><br>{USED_BY}';
+$html_skeleton .= '<br><br><a name="ref"></a><b>References: </b>{SEE_FILES}';
+
+//$html_skeleton .= "</body>\n</html>\n";
+
+$html_skeleton .= '
+<br><br>
+<div class="copyright" align="center">Powered by phpBB 2.2 &copy; <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB Group</a>, 2003</div>
+
+ <br clear="all" /></td>
+ </tr>
+</table>
+
+</body>
+</html>
+';
+
+// Open Language File
+include('../language/en/lang_main.php');
+include('../language/en/lang_admin.php');
+
+$files_to_parse = $php_files = array();
+
+$dhandler = opendir($directory);
+if (!$dhandler)
+{
+ die("Unable to open $directory");
+}
+
+$num = 0;
+while ($file = readdir($dhandler))
+{
+ if (is_file($directory . $file) && preg_match('#\.' . $ext . '$#i', $file))
+ {
+ $files_to_parse[$num]['filename'] = $directory . $file;
+ $files_to_parse[$num]['single_filename'] = $file;
+ $files_to_parse[$num]['destfile'] = str_replace(".{$ext}", '', $file) . '_' . $num . '.html';
+ $file_to_destfile[$file] = $files_to_parse[$num]['destfile'];
+ $num++;
+ }
+}
+closedir($dhandler);
+
+$num = 0;
+foreach ($phpfiles_directories as $directory)
+{
+ $dhandler = opendir($directory);
+ if (!$dhandler)
+ {
+ die("Unable to open $directory");
+ }
+
+ while ($file = readdir($dhandler))
+ {
+ if (is_file($directory . $file) && preg_match('#\.php$#i', $file))
+ {
+ $php_files[$num]['filename'] = $directory . $file;
+ $php_files[$num]['single_filename'] = $file;
+ $num++;
+ }
+ }
+ closedir($dhandler);
+}
+
+$php_files_includes = $lang_references = array();
+
+//$php_files_includes['viewtopic_attach_body.html'][0] = filename
+
+echo '<br>Parsing PHP Files';
+
+// Parse PHP Files and get our filenames
+foreach ($php_files as $file_num => $data)
+{
+ echo '.';
+ flush();
+ $contents = implode('', file($data['filename'], filesize($data['filename'])));
+
+ $html_files = array();
+ preg_match_all('#([a-zA-Z0-9\-_]*?)\.' . $ext . '#s', $contents, $html_files);
+ $html_files = array_unique($html_files[1]);
+
+ foreach ($html_files as $html_file)
+ {
+ $html_file = trim($html_file);
+ if ($html_file != '')
+ {
+ $php_files_includes[$html_file . '.' . $ext][] = $data['filename'];
+ }
+ }
+}
+
+echo '<br>Parsing HTML Files';
+foreach ($files_to_parse as $file_num => $data)
+{
+ echo '.';
+ flush();
+ $contents = implode('', file($data['filename'], filesize($data['filename'])));
+
+ // Language Variables -> [0]:tpl [1]:lang
+ $lang_vars = array();
+ preg_match_all('#{L_([a-z0-9\-_]*?)\}#is', $contents, $lang_vars);
+ $contents = preg_replace('#{L_([a-z0-9\-_]*?)\}#is', '', $contents);
+ $lang_vars[0] = array_unique($lang_vars[0]);
+ $lang_vars[1] = array_unique($lang_vars[1]);
+
+ // Includes
+ $includes = array();
+ preg_match_all('#<!-- INCLUDE ([a-zA-Z0-9\_\-\+\.]+?) -->#s', $contents, $includes);
+ $contents = preg_replace('#<!-- INCLUDE ([a-zA-Z0-9\_\-\+\.]+?) -->#', '', $contents);
+ $includes = $includes[1];
+ $includes = array_unique($includes);
+
+ // IF Conditions
+ $switches = array();
+ preg_match_all('#<!-- [IF]|[ELSEIF] ([a-zA-Z0-9\-_\.]+?) (.*?)?[ ]?-->#', $contents, $switches);
+ $contents = preg_replace('#<!-- [IF]|[ELSEIF] ([a-zA-Z0-9\-_]) (.*?)?[ ]?-->#s', '', $contents);
+ $switches[0] = array_unique($switches[1]); // No resorting please
+ $switches[1] = $switches[2];
+ unset($switches[2]);
+
+ // Remaining Vars
+ $remaining_vars = array();
+ preg_match_all('#{([a-z0-9\-_\.]*?)\}#is', $contents, $remaining_vars);
+ $contents = preg_replace('#{([a-z0-9\-_]*?)\}#is', '', $contents);
+ $remaining_vars = array_unique($remaining_vars[1]);
+ sort($remaining_vars, SORT_STRING);
+
+ // Now build the filename specific site
+ $fp = fopen($store_dir . $data['destfile'], 'w');
+ $html_data = $html_skeleton;
+
+ $html_data = str_replace('{FILENAME}', $data['single_filename'], $html_data);
+
+ // Write up the Language Variables
+ if (count($lang_vars[0]))
+ {
+ $lang_data = '<ul>';
+ for ($num = 0; $num <= count($lang_vars[0]); $num++)
+ {
+ $var = $lang_vars[0][$num];
+ if ($var != '')
+ {
+ $_var = str_replace(array('{', '}'), array('', ''), $var);
+ $lang_references[$_var][] = $data['single_filename'];
+ $lang_data .= '<li>' . $var . '<br>' . "\n" . ((isset($lang[$_var])) ? htmlspecialchars(str_replace("\\'", "'", $lang[$_var])) : '<span style="color:red">No Language Variable available</span>') . '<br></li><br>' . "\n";
+ }
+ }
+ $lang_data .= '</ul>';
+ }
+ else
+ {
+ $lang_data = '<b>NONE</b><br>' . "\n";
+ }
+
+ $html_data = str_replace('{LANGUAGE_VARIABLES}', $lang_data, $html_data);
+
+ // Write up the Includes
+ echo '.';
+ flush();
+ if (count($includes))
+ {
+ $includes_data = '<ul>';
+ $see_files = '';
+ for ($num = 0; $num <= count($includes); $num++)
+ {
+ $var = $includes[$num];
+ if ($var != '')
+ {
+ $includes_data .= '<li><a href="./' . $file_to_destfile[$var] . '" class="gen">' . $var . '</a></li><br>' . "\n";
+ $see_files .= ($see_files != '') ? ' :: ' : '';
+ $see_files .= '<a href="./' . $file_to_destfile[$var] . '" class="gen">' . $var . '</a>';
+ }
+ }
+ $includes_data .= '</ul>';
+ }
+ else
+ {
+ $includes_data = '<b>NONE</b><br>' . "\n";
+ $see_files = '<b>NONE</b>';
+ }
+
+ $html_data = str_replace('{INCLUDES}', $includes_data, $html_data);
+ $html_data = str_replace('{SEE_FILES}', $see_files, $html_data);
+
+ // Write up Conditionals
+ echo '.';
+ flush();
+ if (count($switches[0]))
+ {
+ $conditionals = '<ul>';
+ for ($num = 0; $num <= count($switches[0]); $num++)
+ {
+ $var = trim($switches[0][$num]);
+ if ($var != '')
+ {
+ if ($var == 'not')
+ {
+ $conditionals .= '<li>' . trim($switches[1][$num]) . '<br><b>Negation</b><br>' . "\n";
+ $block_var = explode('.', trim($switches[1][$num]));
+ unset($block_var[0]);
+ }
+ else
+ {
+ $conditionals .= '<li>' . $var . ((trim($switches[1][$num]) != '') ? '<br>' . "\n" . '<i>Compared with</i> -&gt; <b>' . trim($switches[1][$num]) . '</b>' : '') . '<br>' . "\n";
+ $block_var = explode('.', $var);
+ unset($block_var[count($block_var)-1]);
+ }
+
+ if (count($block_var))
+ {
+ for ($_num = count($block_var)-1; $_num >= 0; $_num--)
+ {
+ $conditionals .= ($_num == count($block_var)-1) ? '<i>Element of Block</i> -&gt; <b>' . $block_var[$_num] . '</b><br>' . "\n" : '<i>...which is an element of</i> -&gt; <b>' . $block_var[$_num] . '</b><br>' . "\n";
+ }
+ }
+ $conditionals .= '<br></li>' . "\n";
+ }
+ }
+ $conditionals .= '</ul>';
+ }
+ else
+ {
+ $conditionals = '<b>NONE</b><br>' . "\n";
+ }
+
+ $html_data = str_replace('{CONDITIONALS}', $conditionals, $html_data);
+
+ // Write up Remaining Vars
+ echo '.';
+ flush();
+ if (count($remaining_vars))
+ {
+ $remaining = '<ul>';
+ for ($num = 0; $num <= count($remaining_vars); $num++)
+ {
+ $var = trim($remaining_vars[$num]);
+ if ($var != '')
+ {
+ $remaining .= '<li>' . $var . '<br>' . "\n";
+ $block_var = explode('.', $var);
+ unset($block_var[count($block_var)-1]);
+
+ if (count($block_var))
+ {
+ for ($_num = count($block_var)-1; $_num >= 0; $_num--)
+ {
+ $remaining .= ($_num == count($block_var)-1) ? '<i>Element of Block</i> -&gt; <b>' . $block_var[$_num] . '</b><br>' . "\n" : '<i>...which is an element of</i> -&gt; <b>' . $block_var[$_num] . '</b><br>' . "\n";
+ }
+ }
+ $remaining .= '<br></li>' . "\n";
+ }
+ }
+ $remaining .= '</ul>';
+ }
+ else
+ {
+ $remaining = '<b>NONE</b><br>' . "\n";
+ }
+
+ $html_data = str_replace('{REMAINING_VARS}', $remaining, $html_data);
+
+ if (isset($php_files_includes[$data['single_filename']]) && count($php_files_includes[$data['single_filename']]))
+ {
+ $usedby = '<ul>';
+ foreach ($php_files_includes[$data['single_filename']] as $php_filename)
+ {
+ $usedby .= '<li>' . str_replace('../', '', $php_filename) . '</li>';
+ }
+ $usedby .= '</ul>';
+ }
+ else
+ {
+ $usedby = '<b>NONE</b><br>' . "\n";
+ }
+
+ $html_data = str_replace('{USED_BY}', $usedby, $html_data);
+
+ fwrite($fp, $html_data);
+ fclose($fp);
+}
+
+echo '<br>Store Files';
+
+$fp = fopen($store_dir . 'index.html', 'w');
+
+$html_data = '
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<link rel="stylesheet" href="subSilver.css" type="text/css">
+<style type="text/css">
+<!--
+th { background-image: url(\'cellpic3.gif\') }
+td.cat { background-image: url(\'cellpic1.gif\') }
+//-->
+</style>
+<title>Contents</title>
+</head>
+<body>
+
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td><img src="header_left.jpg" width="200" height="60" alt="phpBB Logo" title="phpBB Logo" border="0"/></td>
+ <td width="100%" background="header_bg.jpg" height="60" align="right" nowrap="nowrap"><span class="maintitle">Available Template Files</span> &nbsp; &nbsp; &nbsp;</td>
+ </tr>
+</table>
+
+<table width="95%" cellspacing="0" cellpadding="0" border="0" align="center">
+ <tr>
+ <td><br clear="all" />
+<br>This Style Document is 100% auto-generated... no human interaction included. :D<br>
+<h2>phpBB 2.2 Template</h2>
+<br>
+<ol>
+';
+
+sort($files_to_parse);
+foreach ($files_to_parse as $file_num => $data)
+{
+ echo '.';
+ flush();
+ $var = $data['single_filename'];
+ $html_data .= '<li><a href="./' . $file_to_destfile[$var] . '" class="gen">' . $var . '</a></li><br>' . "\n";
+}
+
+$html_data .= '<br><li><a href="./lang_index.html" class="gen">Appendix A: Language Variable Index</a></li><br>';
+
+$html_data .= '
+</ol><br><br>
+<div class="copyright" align="center">Powered by phpBB 2.2 &copy; <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB Group</a>, 2003</div>
+
+ <br clear="all" /></td>
+ </tr>
+</table>
+
+</body>
+</html>
+';
+
+fwrite($fp, $html_data);
+fclose($fp);
+
+// Not only write down all language files, place them into a specific array, named by the template file
+// All Language vars assigned to more than one template will be placed into a common file
+$entry = array();
+$common_fp = fopen($store_dir . 'lang_common.php', 'w');
+fwrite($common_fp, "<?php\n\n \$lang = array(\n");
+
+$fp = fopen($store_dir . 'lang_index.html', 'w');
+
+$html_data = '
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<link rel="stylesheet" href="subSilver.css" type="text/css">
+<style type="text/css">
+<!--
+th { background-image: url(\'cellpic3.gif\') }
+td.cat { background-image: url(\'cellpic1.gif\') }
+//-->
+</style>
+<title>Appendix A :: Language Variable Index</title>
+</head>
+<body>
+
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td><img src="header_left.jpg" width="200" height="60" alt="phpBB Logo" title="phpBB Logo" border="0"/></td>
+ <td width="100%" background="header_bg.jpg" height="60" align="right" nowrap="nowrap"><span class="maintitle">Language Variable Index</span> &nbsp; &nbsp; &nbsp;</td>
+ </tr>
+</table>
+
+<table width="95%" cellspacing="0" cellpadding="0" border="0" align="center">
+ <tr>
+ <td><br clear="all" />
+<br><a href="./index.html" class="gen">Back to Contents</a><br><br>
+<br>
+';
+
+echo '<br>Write Language Files';
+
+asort($lang_references);
+ksort($lang_references);
+$_index = '';
+$old_char = '';
+foreach ($lang_references as $lang_var => $filenames)
+{
+ $var = preg_replace('#^L_(.*?)#', '\1', $lang_var);
+ $char = $var{0};
+ if ($old_char != $char)
+ {
+ $old_char = $char;
+ $_index .= ($_index != '') ? ' :: ' : '';
+ $_index .= '<a href="#' . $char . '" class="gen"><b>' . $char . '</b></a>';
+ }
+}
+
+$html_data .= $_index . '<br><br><br>';
+$old_char = '';
+foreach ($lang_references as $lang_var => $filenames)
+{
+ echo '.';
+ flush();
+ $var = preg_replace('#^L_(.*?)#', '\1', $lang_var);
+ $char = $var{0};
+ if ($old_char != $char)
+ {
+ $old_char = $char;
+ $html_data .= '<br><hr><br><a name="' . $char . '"></a><h2>Letter ' . $char . '</h2><br><br>';
+ }
+
+ $html_data .= '<b>' . $lang_var . '</b><ul>';
+
+ if (sizeof($filenames) != 1)
+ {
+ fwrite($common_fp, (($entry['common']) ? ",\n" : '') . "\t'$var' => '" . $lang[$var] . "'");
+ $entry['common'] = true;
+ }
+ else if (sizeof($filenames) == 1)
+ {
+ // Merge logical - hardcoded
+ $fname = (preg_match('#^(' . implode('|', $merge) . ')#', $filenames[0], $match)) ? $match[0] . '.php' : str_replace($ext, 'php', $filenames[0]);
+
+ if (!$lang_fp[$fname])
+ {
+ $lang_fp[$fname] = fopen($store_dir . 'lang_' . $fname, 'w');
+ fwrite($lang_fp[$fname], "<?php\n\n\$lang = array(\n");
+ $entry[$fname] = false;
+ }
+ fwrite($lang_fp[$fname], (($entry[$fname]) ? ",\n" : '') . "\t'$var' => '" . $lang[$var] . "'");
+ $entry[$fname] = true;
+ }
+
+ foreach ($filenames as $f_name)
+ {
+ $var = trim($f_name);
+ $html_data .= '<li><a href="./' . $file_to_destfile[$var] . '" class="gen">' . $var . '</a></li><br>' . "\n";
+ }
+ $html_data .= '</ul><br><br>';
+}
+
+fwrite($common_fp, ")\n);\n?>");
+fclose($common_fp);
+
+foreach ($lang_fp as $filepointer)
+{
+ fwrite($filepointer, ")\n);\n?>");
+ fclose($filepointer);
+}
+
+$html_data .= '
+<br><br>
+<div class="copyright" align="center">Powered by phpBB 2.2 &copy; <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB Group</a>, 2003</div>
+
+ <br clear="all" /></td>
+ </tr>
+</table>
+
+</body>
+</html>
+';
+
+fwrite($fp, $html_data);
+fclose($fp);
+
+echo '<br>Finished!';
+flush();
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/fill.php b/phpBB/develop/fill.php
new file mode 100644
index 0000000000..336e510d06
--- /dev/null
+++ b/phpBB/develop/fill.php
@@ -0,0 +1,190 @@
+<?php
+// -------------------------------------------------------------
+//
+// $Id$
+//
+// FILENAME : fill.php
+// STARTED : Mon Sep 15, 2003
+// COPYRIGHT : © 2001, 2003 phpBB Group
+// WWW : http://www.phpbb.com/
+// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
+//
+// -------------------------------------------------------------
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+
+define('IN_PHPBB', true);
+$phpbb_root_path = './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.'.$phpEx);
+include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
+
+set_time_limit(0);
+header('Expires: 0');
+ignore_user_abort(true);
+
+// number of topics to create
+$num_topics = 10000;
+
+// number of topics to be generated per call
+$batch_size = 2000;
+
+// max number of posts per topic
+$posts_per_topic = 500;
+
+
+// general vars
+$mode = (isset($_REQUEST['mode'])) ? $_REQUEST['mode'] : 'generate';
+$start = (isset($_REQUEST['start'])) ? intval($_REQUEST['start']) : 0;
+
+switch ($mode)
+{
+ case 'generate':
+ $user_ids = $forum_ids = $topic_rows = array();
+
+ $sql = 'SELECT user_id FROM ' . USERS_TABLE . ' WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ') OR user_id = ' . ANONYMOUS;
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $user_ids[] = $row['user_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . ' WHERE forum_type = ' . FORUM_POST;
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_ids[$row['forum_id']] = $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (!$start)
+ {
+ $db->sql_query('TRUNCATE TABLE ' . POSTS_TABLE);
+ $db->sql_query('TRUNCATE TABLE ' . TOPICS_TABLE);
+// $db->sql_query('TRUNCATE TABLE ' . TOPICS_TABLE . '_prefetch');
+ }
+
+ $db->sql_query('LOCK TABLES ' . POSTS_TABLE . ' WRITE, ' . TOPICS_TABLE . ' WRITE');
+
+ for ($topic_id = $start + 1; $topic_id < min($start + $batch_size, $num_topics + 1); ++$topic_id)
+ {
+ $forum_id = array_rand($forum_ids);
+
+ if (count($topic_rows) == 10)
+ {
+ $sql = 'INSERT IGNORE INTO ' . TOPICS_TABLE . " (topic_id, forum_id, topic_title, topic_reported)
+ VALUES " . implode(', ', $topic_rows);
+ $db->sql_query($sql);
+
+ $topic_rows = array();
+ }
+
+ $topic_rows[] = "($topic_id, $forum_id, '$forum_id-$topic_id', " . (($topic_id % 34) ? '0' : '1') . ')';
+
+ $sql = 'INSERT IGNORE INTO ' . POSTS_TABLE . ' (topic_id, forum_id, poster_id, post_subject, post_text, post_username, post_approved, post_time, post_reported)
+ VALUES ';
+
+ $rows = array();
+ $post_time = mt_rand(0, time());
+
+ $num_posts = $posts_per_topic; //mt_rand(1, $posts_per_topic);
+ for ($i = 0; $i < $num_posts; ++$i)
+ {
+ $poster_id = $user_ids[array_rand($user_ids)];
+ $poster_name = ($poster_id == ANONYMOUS) ? rndm_username() : '';
+ $rows[] = "($topic_id, $forum_id, $poster_id, '$forum_id-$topic_id-$i', '$forum_id-$topic_id-$i', '$poster_name', " . (mt_rand(0, 12) ? '1' : '0') . ', ' . ($post_time + $i * 60) . ', ' . (mt_rand(0, 32) ? '0' : '1') . ')';
+ }
+
+ $db->sql_query($sql . implode(', ', $rows));
+ }
+
+ if (count($topic_rows))
+ {
+ $sql = 'INSERT IGNORE INTO ' . TOPICS_TABLE . " (topic_id, forum_id, topic_title, topic_reported)
+ VALUES " . implode(', ', $topic_rows);
+ $db->sql_query($sql);
+ }
+
+ $db->sql_query('UNLOCK TABLES');
+
+ if ($topic_id >= $num_topics)
+ {
+ echo '<meta http-equiv="refresh" content="10; url=fill.' . $phpEx . '?mode=sync&amp;' . time() . '">And now for something completely different...';
+
+ $db->sql_query('ANALYZE TABLES ' . TOPICS_TABLE . ', ' . POSTS_TABLE);
+ flush();
+ }
+ else
+ {
+ echo '<meta http-equiv="refresh" content="10; url=fill.' . $phpEx . '?start=' . $topic_id . '&amp;' . time() . '">To the next page... (' . $topic_id . '/' . $num_topics . ')';
+ flush();
+ }
+ break;
+
+ case 'sync':
+/* error_reporting(E_ALL);
+ $sync_all = TRUE;
+
+ if ($sync_all)
+ {
+ $s = explode(' ', microtime());
+ sync('topic', '', '', TRUE, FALSE);
+// sync('forum');
+ $e = explode(' ', microtime());
+
+ echo '<pre><b>' . ($e[0] + $e[1] - $s[0] - $s[1]) . '</b></pre>';
+ echo '<a href="fill.' . $phpEx . '">Here we go again</a>';
+ }
+ else
+ {
+ $batch_size = $batch_size * 10;
+ $end = $start + $batch_size;
+
+ $s = explode(' ', microtime());
+ sync('topic', 'range', "topic_id BETWEEN $start AND $end", TRUE, FALSE);
+ $e = explode(' ', microtime());
+
+ echo '<pre>Time taken: <b>' . ($e[0] + $e[1] - $s[0] - $s[1]) . '</b></pre>';
+
+ if ($end < $num_topics)
+ {
+ $start += $batch_size;
+ echo '<meta http-equiv="refresh" content="0; url=fill.' . $phpEx . "?mode=sync&amp;start=$start&amp;" . time() . "\">And now for something completely different... ($start/$num_topics)";
+ }
+ else
+ {
+ echo '<a href="fill.' . $phpEx . '">Here we go again</a>';
+ }
+ }
+
+ if (isset($_GET['explain']))
+ {
+ trigger_error('Done');
+ }
+ */
+}
+
+$db->sql_close();
+
+function rndm_username()
+{
+ static $usernames;
+
+ if (!isset($usernames))
+ {
+ $usernames = get_defined_functions();
+ $usernames = $usernames['internal'];
+ }
+
+ return $usernames[array_rand($usernames)];
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/fix_files.sh b/phpBB/develop/fix_files.sh
new file mode 100755
index 0000000000..782418f504
--- /dev/null
+++ b/phpBB/develop/fix_files.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+#
+# Remove all those annoying ^M characters that Winblows editor's like to add
+# from all files in the current directory and all subdirectories.
+#
+# Written by: Jonathan Haase.
+#
+# UPDATE: 7/31/2001: fix so that it doesn't touch things in the images directory
+#
+# UPDATE: 12/15/2003: Fix so that it doesn't touch any "non-text" files
+#
+
+find . > FILELIST.$$
+grep -sv FILELIST FILELIST.$$ > FILELIST2.$$
+grep -sv $(basename $0) FILELIST2.$$ > FILELIST.$$
+grep -sv "^\.$" FILELIST.$$ > FILELIST2.$$
+file -f FILELIST2.$$ |grep text | sed -e 's/^\([^\:]*\)\:.*$/\1/' > FILELIST
+file -f FILELIST2.$$ |grep -sv text | sed -e 's/^\([^\:]*\)\:.*$/Not Modifying file: \1/'
+rm FILELIST2.$$
+rm FILELIST.$$
+
+for i in $(cat FILELIST); do
+ if [ -f $i ]; then
+ sed -e s/
+//g $i > $i.tmp
+ mv $i.tmp $i
+ fi
+done
+rm FILELIST
diff --git a/phpBB/develop/generate_utf_casefold.php b/phpBB/develop/generate_utf_casefold.php
new file mode 100644
index 0000000000..89c4aec01a
--- /dev/null
+++ b/phpBB/develop/generate_utf_casefold.php
@@ -0,0 +1,156 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+if (php_sapi_name() != 'cli')
+{
+ die("This program must be run from the command line.\n");
+}
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+set_time_limit(0);
+
+define('IN_PHPBB', true);
+$phpbb_root_path = '../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+
+echo "Checking for required files\n";
+download('http://unicode.org/Public/UNIDATA/CaseFolding.txt');
+echo "\n";
+
+
+/**
+* Load the CaseFolding table
+*/
+echo "Loading CaseFolding\n";
+$unidata = file_get_contents('CaseFolding.txt');
+
+
+function utf8_chr($cp)
+{
+ if ($cp > 0xFFFF)
+ {
+ return chr(0xF0 | ($cp >> 18)) . chr(0x80 | (($cp >> 12) & 0x3F)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else if ($cp > 0x7FF)
+ {
+ return chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else if ($cp > 0x7F)
+ {
+ return chr(0xC0 | ($cp >> 6)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else
+ {
+ return chr($cp);
+ }
+}
+
+preg_match_all('/^([0-9A-F]+); ([CFS]); ([0-9A-F]+(?: [0-9A-F]+)*);/im', $unidata, $array, PREG_SET_ORDER);
+
+$uniarray = array();
+
+foreach ($array as $value)
+{
+ $uniarray[$value[2]][utf8_chr(hexdec((string)$value[1]))] = implode(array_map('utf8_chr', array_map('hexdec', explode(' ', $value[3]))));
+}
+
+foreach ($uniarray as $idx => $contents)
+{
+ echo "Writing to case_fold_$idx.$phpEx\n";
+ $fp = fopen($phpbb_root_path . 'includes/utf/data/case_fold_' . strtolower($idx) . '.' . $phpEx, 'wb');
+ fwrite($fp, '<?php return ' . my_var_export($contents) . ';');
+ fclose($fp);
+}
+
+/**
+* Return a parsable string representation of a variable
+*
+* This is function is limited to array/strings/integers
+*
+* @param mixed $var Variable
+* @return string PHP code representing the variable
+*/
+function my_var_export($var)
+{
+ if (is_array($var))
+ {
+ $lines = array();
+
+ foreach ($var as $k => $v)
+ {
+ $lines[] = my_var_export($k) . '=>' . my_var_export($v);
+ }
+
+ return 'array(' . implode(',', $lines) . ')';
+ }
+ else if (is_string($var))
+ {
+ return "'" . str_replace(array('\\', "'"), array('\\\\', "\\'"), $var) . "'";
+ }
+ else
+ {
+ return $var;
+ }
+}
+
+/**
+* Download a file to the develop/ dir
+*
+* @param string $url URL of the file to download
+* @return void
+*/
+function download($url)
+{
+ global $phpbb_root_path;
+
+ if (file_exists($phpbb_root_path . 'develop/' . basename($url)))
+ {
+ return;
+ }
+
+ echo 'Downloading from ', $url, ' ';
+
+ if (!$fpr = fopen($url, 'rb'))
+ {
+ die("Can't download from $url\nPlease download it yourself and put it in the develop/ dir, kthxbai");
+ }
+
+ if (!$fpw = fopen($phpbb_root_path . 'develop/' . basename($url), 'wb'))
+ {
+ die("Can't open develop/" . basename($url) . " for output... please check your permissions or something");
+ }
+
+ $i = 0;
+ $chunk = 32768;
+ $done = '';
+
+ while (!feof($fpr))
+ {
+ $i += fwrite($fpw, fread($fpr, $chunk));
+ echo str_repeat("\x08", strlen($done));
+
+ $done = ($i >> 10) . ' KiB';
+ echo $done;
+ }
+ fclose($fpr);
+ fclose($fpw);
+
+ echo "\n";
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/generate_utf_confusables.php b/phpBB/develop/generate_utf_confusables.php
new file mode 100644
index 0000000000..f79471afc6
--- /dev/null
+++ b/phpBB/develop/generate_utf_confusables.php
@@ -0,0 +1,240 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+if (php_sapi_name() != 'cli')
+{
+ die("This program must be run from the command line.\n");
+}
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+set_time_limit(0);
+
+define('IN_PHPBB', true);
+$phpbb_root_path = '../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+
+echo "Checking for required files\n";
+download('http://unicode.org/reports/tr39/data/confusables.txt');
+download('http://unicode.org/Public/UNIDATA/CaseFolding.txt');
+echo "\n";
+
+
+/**
+* Load the confusables table
+*/
+echo "Loading confusables\n";
+$unidata = file_get_contents('confusables.txt');
+
+/**
+* Load the CaseFolding table
+*/
+echo "Loading CaseFolding\n";
+$casefolds = file_get_contents('CaseFolding.txt');
+
+
+function utf8_chr($cp)
+{
+ if ($cp > 0xFFFF)
+ {
+ return chr(0xF0 | ($cp >> 18)) . chr(0x80 | (($cp >> 12) & 0x3F)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else if ($cp > 0x7FF)
+ {
+ return chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else if ($cp > 0x7F)
+ {
+ return chr(0xC0 | ($cp >> 6)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else
+ {
+ return chr($cp);
+ }
+}
+
+preg_match_all('/^([0-9A-F]+) ;\s((?:[0-9A-F]+ )*);.*?$/im', $unidata, $array, PREG_SET_ORDER);
+preg_match_all('/^([0-9A-F]+); ([CFS]); ([0-9A-F]+(?: [0-9A-F]+)*);/im', $casefolds, $casefold_array);
+
+// some that we defined ourselves
+$uniarray = array(
+ "\xC2\xA1" => "\x69", // EXCLAMATION MARK, INVERTED => LATIN SMALL LETTER I
+ "\xC7\x83" => "\x21", // LATIN LETTER RETROFLEX CLICK => EXCLAMATION MARK
+ "\xCE\xB1" => "\x61", // GREEK SMALL LETTER ALPHA => LATIN SMALL LETTER A
+ "\xE1\x9A\x80" => "\x20", // OGHAM SPACE MARK
+
+ "\xC2\xAD" => '', // HYPHEN, SOFT => empty string
+ "\xDB\x9D" => '', // ARABIC END OF AYAH
+ "\xDC\x8F" => '', // SYRIAC ABBREVIATION MARK
+ "\xE1\xA0\x86" => '', // MONGOLIAN TODO SOFT HYPHEN
+ "\xE1\xA0\x8E" => '', // MONGOLIAN VOWEL SEPARATOR
+ "\xE2\x80\x8B" => '', // ZERO WIDTH SPACE
+ "\xE2\x80\x8C" => '', // ZERO WIDTH NON-JOINER
+ "\xE2\x80\x8D" => '', // ZERO WIDTH JOINER
+ "\xE2\x80\xA8" => '', // LINE SEPARATOR
+ "\xE2\x80\xA9" => '', // PARAGRAPH SEPARATOR
+ "\xE2\x81\xA0" => '', // WORD JOINER
+ "\xE2\x81\xA1" => '', // FUNCTION APPLICATION
+ "\xE2\x81\xA2" => '', // INVISIBLE TIMES
+ "\xE2\x81\xA3" => '', // INVISIBLE SEPARATOR
+ "\xE2\x81\xAA" => '', // [CONTROL CHARACTERS]
+ "\xE2\x81\xAB" => '', // [CONTROL CHARACTERS]
+ "\xE2\x81\xAC" => '', // [CONTROL CHARACTERS]
+ "\xE2\x81\xAD" => '', // [CONTROL CHARACTERS]
+ "\xE2\x81\xAE" => '', // [CONTROL CHARACTERS]
+ "\xE2\x81\xAF" => '', // [CONTROL CHARACTERS]
+ "\xEF\xBB\xBF" => '', // ZERO WIDTH NO-BREAK SPACE
+ "\xEF\xBF\xB9" => '', // [CONTROL CHARACTERS]
+ "\xEF\xBF\xBA" => '', // [CONTROL CHARACTERS]
+ "\xEF\xBF\xBB" => '', // [CONTROL CHARACTERS]
+ "\xEF\xBF\xBC" => '', // [CONTROL CHARACTERS]
+ "\xF0\x9D\x85\xB3" => '', // [MUSICAL CONTROL CHARACTERS]
+ "\xF0\x9D\x85\xB4" => '', // [MUSICAL CONTROL CHARACTERS]
+ "\xF0\x9D\x85\xB5" => '', // [MUSICAL CONTROL CHARACTERS]
+ "\xF0\x9D\x85\xB6" => '', // [MUSICAL CONTROL CHARACTERS]
+ "\xF0\x9D\x85\xB7" => '', // [MUSICAL CONTROL CHARACTERS]
+ "\xF0\x9D\x85\xB8" => '', // [MUSICAL CONTROL CHARACTERS]
+ "\xF0\x9D\x85\xB9" => '', // [MUSICAL CONTROL CHARACTERS]
+ "\xF0\x9D\x85\xBA" => '', // [MUSICAL CONTROL CHARACTERS]
+);
+
+$copy = $uniarray;
+
+foreach ($array as $value)
+{
+ $temp_hold = implode(array_map('utf8_chr', array_map('hexdec', explode(' ', trim($value[2])))));
+
+ if (isset($copy[utf8_chr(hexdec((string)$value[1]))]))
+ {
+ $num = '';
+ $string = utf8_chr(hexdec((string)$value[1]));
+ for ($i = 0; $i < strlen($string); $i++)
+ {
+ $num .= '\x' . str_pad(base_convert(ord($string[$i]), 10, 16), 2, '0', STR_PAD_LEFT);
+ }
+ echo $num . "\n";
+ if ($uniarray[$string] != $temp_hold)
+ {
+ echo " --> $string\n";
+ echo " --> " . $temp_hold . "\n";
+ }
+ }
+
+ // do some tests for things that transform into something with the number one
+ if (strpos($temp_hold, utf8_chr(0x0031)) !== false)
+ {
+ // any kind of letter L?
+ if (strpos($value[0], 'LETTER L') !== false || strpos($value[0], 'IOTA') !== false || strpos($value[0], 'SMALL L ') !== false || preg_match('/SMALL LIGATURE [^L]*L /', $value[0]))
+ {
+ // replace all of the mappings that transform some sort of letter l to number one instead to some sort of letter l to latin small letter l
+ $temp_hold = str_replace(utf8_chr(0x0031), utf8_chr(0x006C), $temp_hold);
+ }
+ }
+
+ // uppercased chars that were folded do not exist in this universe,
+ // no amount of normalization could ever "trick" this into not working
+ if (in_array($value[1], $casefold_array[1]))
+ {
+ continue;
+ }
+
+ $uniarray[utf8_chr(hexdec((string)$value[1]))] = $temp_hold;
+}
+
+echo "Writing to confusables.$phpEx\n";
+
+$fp = fopen($phpbb_root_path . 'includes/utf/data/confusables.' . $phpEx, 'wb');
+fwrite($fp, '<?php return ' . my_var_export($uniarray) . ';');
+fclose($fp);
+
+/**
+* Return a parsable string representation of a variable
+*
+* This is function is limited to array/strings/integers
+*
+* @param mixed $var Variable
+* @return string PHP code representing the variable
+*/
+function my_var_export($var)
+{
+ if (is_array($var))
+ {
+ $lines = array();
+
+ foreach ($var as $k => $v)
+ {
+ $lines[] = my_var_export($k) . '=>' . my_var_export($v);
+ }
+
+ return 'array(' . implode(',', $lines) . ')';
+ }
+ else if (is_string($var))
+ {
+ return "'" . str_replace(array('\\', "'"), array('\\\\', "\\'"), $var) . "'";
+ }
+ else
+ {
+ return $var;
+ }
+}
+
+/**
+* Download a file to the develop/ dir
+*
+* @param string $url URL of the file to download
+* @return void
+*/
+function download($url)
+{
+ global $phpbb_root_path;
+
+ if (file_exists($phpbb_root_path . 'develop/' . basename($url)))
+ {
+ return;
+ }
+
+ echo 'Downloading from ', $url, ' ';
+
+ if (!$fpr = fopen($url, 'rb'))
+ {
+ die("Can't download from $url\nPlease download it yourself and put it in the develop/ dir, kthxbai");
+ }
+
+ if (!$fpw = fopen($phpbb_root_path . 'develop/' . basename($url), 'wb'))
+ {
+ die("Can't open develop/" . basename($url) . " for output... please check your permissions or something");
+ }
+
+ $i = 0;
+ $chunk = 32768;
+ $done = '';
+
+ while (!feof($fpr))
+ {
+ $i += fwrite($fpw, fread($fpr, $chunk));
+ echo str_repeat("\x08", strlen($done));
+
+ $done = ($i >> 10) . ' KiB';
+ echo $done;
+ }
+ fclose($fpr);
+ fclose($fpw);
+
+ echo "\n";
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/generate_utf_tables.php b/phpBB/develop/generate_utf_tables.php
new file mode 100644
index 0000000000..3d5188163d
--- /dev/null
+++ b/phpBB/develop/generate_utf_tables.php
@@ -0,0 +1,572 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+if (php_sapi_name() != 'cli')
+{
+ die("This program must be run from the command line.\n");
+}
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+set_time_limit(0);
+
+define('IN_PHPBB', true);
+$phpbb_root_path = '../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+
+echo "Checking for required files\n";
+download('http://www.unicode.org/Public/UNIDATA/CompositionExclusions.txt');
+download('http://www.unicode.org/Public/UNIDATA/DerivedNormalizationProps.txt');
+download('http://www.unicode.org/Public/UNIDATA/UnicodeData.txt');
+echo "\n";
+
+require_once($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
+$file_contents = array();
+
+/**
+* Generate some Hangul/Jamo stuff
+*/
+echo "\nGenerating Hangul and Jamo tables\n";
+for ($i = 0; $i < UNICODE_HANGUL_LCOUNT; ++$i)
+{
+ $utf_char = cp_to_utf(UNICODE_HANGUL_LBASE + $i);
+ $file_contents['utf_normalizer_common']['utf_jamo_index'][$utf_char] = $i * UNICODE_HANGUL_VCOUNT * UNICODE_HANGUL_TCOUNT + UNICODE_HANGUL_SBASE;
+ $file_contents['utf_normalizer_common']['utf_jamo_type'][$utf_char] = UNICODE_JAMO_L;
+}
+
+for ($i = 0; $i < UNICODE_HANGUL_VCOUNT; ++$i)
+{
+ $utf_char = cp_to_utf(UNICODE_HANGUL_VBASE + $i);
+ $file_contents['utf_normalizer_common']['utf_jamo_index'][$utf_char] = $i * UNICODE_HANGUL_TCOUNT;
+ $file_contents['utf_normalizer_common']['utf_jamo_type'][$utf_char] = UNICODE_JAMO_V;
+}
+
+for ($i = 0; $i < UNICODE_HANGUL_TCOUNT; ++$i)
+{
+ $utf_char = cp_to_utf(UNICODE_HANGUL_TBASE + $i);
+ $file_contents['utf_normalizer_common']['utf_jamo_index'][$utf_char] = $i;
+ $file_contents['utf_normalizer_common']['utf_jamo_type'][$utf_char] = UNICODE_JAMO_T;
+}
+
+/**
+* Load the CompositionExclusions table
+*/
+echo "Loading CompositionExclusion\n";
+$fp = fopen('CompositionExclusions.txt', 'rt');
+
+$exclude = array();
+while (!feof($fp))
+{
+ $line = fgets($fp, 1024);
+
+ if (!strpos(' 0123456789ABCDEFabcdef', $line[0]))
+ {
+ continue;
+ }
+
+ $cp = strtok($line, ' ');
+
+ if ($pos = strpos($cp, '..'))
+ {
+ $start = hexdec(substr($cp, 0, $pos));
+ $end = hexdec(substr($cp, $pos + 2));
+
+ for ($i = $start; $i < $end; ++$i)
+ {
+ $exclude[$i] = 1;
+ }
+ }
+ else
+ {
+ $exclude[hexdec($cp)] = 1;
+ }
+}
+fclose($fp);
+
+/**
+* Load QuickCheck tables
+*/
+echo "Generating QuickCheck tables\n";
+$fp = fopen('DerivedNormalizationProps.txt', 'rt');
+
+while (!feof($fp))
+{
+ $line = fgets($fp, 1024);
+
+ if (!strpos(' 0123456789ABCDEFabcdef', $line[0]))
+ {
+ continue;
+ }
+
+ $p = array_map('trim', explode(';', strtok($line, '#')));
+
+ /**
+ * Capture only NFC_QC, NFKC_QC
+ */
+ if (!preg_match('#^NFK?C_QC$#', $p[1]))
+ {
+ continue;
+ }
+
+ if ($pos = strpos($p[0], '..'))
+ {
+ $start = hexdec(substr($p[0], 0, $pos));
+ $end = hexdec(substr($p[0], $pos + 2));
+ }
+ else
+ {
+ $start = $end = hexdec($p[0]);
+ }
+
+ if ($start >= UTF8_HANGUL_FIRST && $end <= UTF8_HANGUL_LAST)
+ {
+ /**
+ * We do not store Hangul syllables in the array
+ */
+ continue;
+ }
+
+ if ($p[2] == 'M')
+ {
+ $val = UNICODE_QC_MAYBE;
+ }
+ else
+ {
+ $val = UNICODE_QC_NO;
+ }
+
+ if ($p[1] == 'NFKC_QC')
+ {
+ $file = 'utf_nfkc_qc';
+ }
+ else
+ {
+ $file = 'utf_nfc_qc';
+ }
+
+ for ($i = $start; $i <= $end; ++$i)
+ {
+ /**
+ * The vars have the same name as the file: $utf_nfc_qc is in utf_nfc_qc.php
+ */
+ $file_contents[$file][$file][cp_to_utf($i)] = $val;
+ }
+}
+fclose($fp);
+
+/**
+* Do mappings
+*/
+echo "Loading Unicode decomposition mappings\n";
+$fp = fopen($phpbb_root_path . 'develop/UnicodeData.txt', 'rt');
+
+$map = array();
+while (!feof($fp))
+{
+ $p = explode(';', fgets($fp, 1024));
+ $cp = hexdec($p[0]);
+
+ if (!empty($p[3]))
+ {
+ /**
+ * Store combining class > 0
+ */
+ $file_contents['utf_normalizer_common']['utf_combining_class'][cp_to_utf($cp)] = (int) $p[3];
+ }
+
+ if (!isset($p[5]) || !preg_match_all('#[0-9A-F]+#', strip_tags($p[5]), $m))
+ {
+ continue;
+ }
+
+ if (strpos($p[5], '>'))
+ {
+ $map['NFKD'][$cp] = implode(' ', array_map('hexdec', $m[0]));
+ }
+ else
+ {
+ $map['NFD'][$cp] = $map['NFKD'][$cp] = implode(' ', array_map('hexdec', $m[0]));
+ }
+}
+fclose($fp);
+
+/**
+* Build the canonical composition table
+*/
+echo "Generating the Canonical Composition table\n";
+foreach ($map['NFD'] as $cp => $decomp_seq)
+{
+ if (!strpos($decomp_seq, ' ') || isset($exclude[$cp]))
+ {
+ /**
+ * Singletons are excluded from canonical composition
+ */
+ continue;
+ }
+
+ $utf_seq = implode('', array_map('cp_to_utf', explode(' ', $decomp_seq)));
+
+ if (!isset($file_contents['utf_canonical_comp']['utf_canonical_comp'][$utf_seq]))
+ {
+ $file_contents['utf_canonical_comp']['utf_canonical_comp'][$utf_seq] = cp_to_utf($cp);
+ }
+}
+
+/**
+* Decompose the NF[K]D mappings recursively and prepare the file contents
+*/
+echo "Generating the Canonical and Compatibility Decomposition tables\n\n";
+foreach ($map as $type => $decomp_map)
+{
+ foreach ($decomp_map as $cp => $decomp_seq)
+ {
+ $decomp_map[$cp] = decompose($decomp_map, $decomp_seq);
+ }
+ unset($decomp_seq);
+
+ if ($type == 'NFKD')
+ {
+ $file = 'utf_compatibility_decomp';
+ $var = 'utf_compatibility_decomp';
+ }
+ else
+ {
+ $file = 'utf_canonical_decomp';
+ $var = 'utf_canonical_decomp';
+ }
+
+ /**
+ * Generate the corresponding file
+ */
+ foreach ($decomp_map as $cp => $decomp_seq)
+ {
+ $file_contents[$file][$var][cp_to_utf($cp)] = implode('', array_map('cp_to_utf', explode(' ', $decomp_seq)));
+ }
+}
+
+/**
+* Generate and/or alter the files
+*/
+foreach ($file_contents as $file => $contents)
+{
+ /**
+ * Generate a new file
+ */
+ echo "Writing to $file.$phpEx\n";
+
+ if (!$fp = fopen($phpbb_root_path . 'includes/utf/data/' . $file . '.' . $phpEx, 'wb'))
+ {
+ trigger_error('Cannot open ' . $file . ' for write');
+ }
+
+ fwrite($fp, '<?php');
+ foreach ($contents as $var => $val)
+ {
+ fwrite($fp, "\n\$GLOBALS[" . my_var_export($var) . ']=' . my_var_export($val) . ";");
+ }
+ fclose($fp);
+}
+
+echo "\n*** UTF-8 normalization tables done\n\n";
+
+/**
+* Now we'll generate the files needed by the search indexer
+*/
+echo "Generating search indexer tables\n";
+
+$fp = fopen($phpbb_root_path . 'develop/UnicodeData.txt', 'rt');
+
+$map = array();
+while ($line = fgets($fp, 1024))
+{
+ /**
+ * The current line is split, $m[0] hold the codepoint in hexadecimal and
+ * all other fields numbered as in http://www.unicode.org/Public/UNIDATA/UCD.html#UnicodeData.txt
+ */
+ $m = explode(';', $line);
+
+ /**
+ * @var integer $cp Current char codepoint
+ * @var string $utf_char UTF-8 representation of current char
+ */
+ $cp = hexdec($m[0]);
+ $utf_char = cp_to_utf($cp);
+
+ /**
+ * $m[2] holds the "General Category" of the character
+ * @link http://www.unicode.org/Public/UNIDATA/UCD.html#General_Category_Values
+ */
+ switch ($m[2][0])
+ {
+ case 'L':
+ /**
+ * We allow all letters and map them to their lowercased counterpart on the fly
+ */
+ $map_to_hex = (isset($m[13][0])) ? $m[13] : $m[0];
+
+ if (preg_match('#^LATIN.*(?:LETTER|LIGATURE) ([A-Z]{2}(?![A-Z]))$#', $m[1], $capture))
+ {
+ /**
+ * Special hack for some latin ligatures. Using the name of a character
+ * is bad practice, but for now it works well enough.
+ *
+ * @todo Note that ligatures with combining marks such as U+01E2 are
+ * not supported at this time
+ */
+ $map[$cp] = strtolower($capture[1]);
+ }
+ else if (isset($m[13][0]))
+ {
+ /**
+ * If the letter has a lowercased form, use it
+ */
+ $map[$cp] = hex_to_utf($m[13]);
+ }
+ else
+ {
+ /**
+ * In all other cases, map the letter to itself
+ */
+ $map[$cp] = $utf_char;
+ }
+ break;
+
+ case 'M':
+ /**
+ * We allow all marks, they are mapped to themselves
+ */
+ $map[$cp] = $utf_char;
+ break;
+
+ case 'N':
+ /**
+ * We allow all numbers, but we map them to their numeric value whenever
+ * possible. The numeric value (field #8) is in ASCII already
+ *
+ * @todo Note that fractions such as U+00BD will be converted to something
+ * like "1/2", with a slash. However, "1/2" entered in ASCII is converted
+ * to "1 2". This will have to be fixed.
+ */
+ $map[$cp] = (isset($m[8][0])) ? $m[8] : $utf_char;
+ break;
+
+ default:
+ /**
+ * Everything else is ignored, skip to the next line
+ */
+ continue 2;
+ }
+}
+fclose($fp);
+
+/**
+* Add some cheating
+*/
+$cheats = array(
+ '00DF' => 'ss', # German sharp S
+ '00C5' => 'ae', # Capital A with diaeresis
+ '00E4' => 'ae', # Small A with diaeresis
+ '00D6' => 'oe', # Capital O with diaeresis
+ '00F6' => 'oe', # Small O with diaeresis
+ '00DC' => 'ue', # Capital U with diaeresis
+ '00FC' => 'ue', # Small U with diaeresis
+);
+
+/**
+* Add our "cheat replacements" to the map
+*/
+foreach ($cheats as $hex => $map_to)
+{
+ $map[hexdec($hex)] = $map_to;
+}
+
+/**
+* Split the map into smaller blocks
+*/
+$file_contents = array();
+foreach ($map as $cp => $map_to)
+{
+ $file_contents[$cp >> 11][cp_to_utf($cp)] = $map_to;
+}
+unset($map);
+
+foreach ($file_contents as $idx => $contents)
+{
+ echo "Writing to search_indexer_$idx.$phpEx\n";
+ $fp = fopen($phpbb_root_path . 'includes/utf/data/search_indexer_' . $idx . '.' . $phpEx, 'wb');
+ fwrite($fp, '<?php return ' . my_var_export($contents) . ';');
+ fclose($fp);
+}
+echo "\n*** Search indexer tables done\n\n";
+
+
+die("\nAll done!\n");
+
+
+////////////////////////////////////////////////////////////////////////////////
+// Internal functions //
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+* Decompose a sequence recusively
+*
+* @param array $decomp_map Decomposition mapping, passed by reference
+* @param string $decomp_seq Decomposition sequence as decimal codepoints separated with a space
+* @return string Decomposition sequence, fully decomposed
+*/
+function decompose(&$decomp_map, $decomp_seq)
+{
+ $ret = array();
+ foreach (explode(' ', $decomp_seq) as $cp)
+ {
+ if (isset($decomp_map[$cp]))
+ {
+ $ret[] = decompose($decomp_map, $decomp_map[$cp]);
+ }
+ else
+ {
+ $ret[] = $cp;
+ }
+ }
+
+ return implode(' ', $ret);
+}
+
+
+/**
+* Return a parsable string representation of a variable
+*
+* This is function is limited to array/strings/integers
+*
+* @param mixed $var Variable
+* @return string PHP code representing the variable
+*/
+function my_var_export($var)
+{
+ if (is_array($var))
+ {
+ $lines = array();
+
+ foreach ($var as $k => $v)
+ {
+ $lines[] = my_var_export($k) . '=>' . my_var_export($v);
+ }
+
+ return 'array(' . implode(',', $lines) . ')';
+ }
+ else if (is_string($var))
+ {
+ return "'" . str_replace(array('\\', "'"), array('\\\\', "\\'"), $var) . "'";
+ }
+ else
+ {
+ return $var;
+ }
+}
+
+/**
+* Download a file to the develop/ dir
+*
+* @param string $url URL of the file to download
+* @return void
+*/
+function download($url)
+{
+ global $phpbb_root_path;
+
+ if (file_exists($phpbb_root_path . 'develop/' . basename($url)))
+ {
+ return;
+ }
+
+ echo 'Downloading from ', $url, ' ';
+
+ if (!$fpr = fopen($url, 'rb'))
+ {
+ die("Can't download from $url\nPlease download it yourself and put it in the develop/ dir, kthxbai");
+ }
+
+ if (!$fpw = fopen($phpbb_root_path . 'develop/' . basename($url), 'wb'))
+ {
+ die("Can't open develop/" . basename($url) . " for output... please check your permissions or something");
+ }
+
+ $i = 0;
+ $chunk = 32768;
+ $done = '';
+
+ while (!feof($fpr))
+ {
+ $i += fwrite($fpw, fread($fpr, $chunk));
+ echo str_repeat("\x08", strlen($done));
+
+ $done = ($i >> 10) . ' KiB';
+ echo $done;
+ }
+ fclose($fpr);
+ fclose($fpw);
+
+ echo "\n";
+}
+
+/**
+* Convert a codepoint in hexadecimal to a UTF-8 char
+*
+* @param string $hex Codepoint, in hexadecimal
+* @return string UTF-8 char
+*/
+function hex_to_utf($hex)
+{
+ return cp_to_utf(hexdec($hex));
+}
+
+/**
+* Return a UTF string formed from a sequence of codepoints in hexadecimal
+*
+* @param string $seq Sequence of codepoints, separated with a space
+* @return string UTF-8 string
+*/
+function hexseq_to_utf($seq)
+{
+ return implode('', array_map('hex_to_utf', explode(' ', $seq)));
+}
+
+/**
+* Convert a codepoint to a UTF-8 char
+*
+* @param integer $cp Unicode codepoint
+* @return string UTF-8 string
+*/
+function cp_to_utf($cp)
+{
+ if ($cp > 0xFFFF)
+ {
+ return chr(0xF0 | ($cp >> 18)) . chr(0x80 | (($cp >> 12) & 0x3F)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else if ($cp > 0x7FF)
+ {
+ return chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else if ($cp > 0x7F)
+ {
+ return chr(0xC0 | ($cp >> 6)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else
+ {
+ return chr($cp);
+ }
+} \ No newline at end of file
diff --git a/phpBB/develop/lang_duplicates.php b/phpBB/develop/lang_duplicates.php
new file mode 100644
index 0000000000..5be48f69f0
--- /dev/null
+++ b/phpBB/develop/lang_duplicates.php
@@ -0,0 +1,140 @@
+<html>
+ <head>
+ <title>Duplicate Language Keys</title>
+ </head>
+ <body>
+<?php
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+// -------------------------------------------------------------
+//
+// $Id$
+//
+// @copyright (c) 2005 phpBB Group
+// @license http://opensource.org/licenses/gpl-license.php GNU Public License
+//
+// -------------------------------------------------------------
+// Thanks to arod-1
+
+define('IN_PHPBB', 1);
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+$phpbb_root_path='./../';
+include($phpbb_root_path . 'common.'.$phpEx);
+
+$mode = request_var('mode', '');
+
+$modules = find_modules($phpbb_root_path . 'language/en');
+
+$kkeys = $keys = array();
+$langdir = dirname(__FILE__);
+
+if (isset($lang))
+{
+ unset($lang);
+}
+
+foreach($modules as $module)
+{
+ require_once("$langdir$module");
+ if (isset($lang))
+ {
+ $kkeys[$module] = $lang;
+ $keys[] = $module;
+ unset($lang);
+ }
+}
+
+$equal = $case = $diff = 0;
+$output = array();
+
+while ($module = array_shift($keys))
+{
+ $keys_1 = array_keys($kkeys[$module]);
+
+ foreach ($keys as $other_module)
+ {
+ $keys_2 = array_keys($kkeys[$other_module]);
+
+ foreach(array_intersect($keys_1, $keys_2) as $dup)
+ {
+ if ($kkeys[$module][$dup] == $kkeys[$other_module][$dup])
+ {
+ $compare = "Equal";
+ $equal++;
+ }
+ else if (strcasecmp($kkeys[$module][$dup], $kkeys[$other_module][$dup]) == 0)
+ {
+ $compare = "Differ in case";
+ $case++;
+ }
+ else
+ {
+ $compare = "'{$kkeys[$module][$dup]}' - '{$kkeys[$other_module][$dup]}'";
+ $diff++;
+ }
+
+ $color = '';
+ if ((basename($module) == "common.$phpEx") || (basename($other_module) == "common.$phpEx"))
+ {
+ $color = ' style="color:#B00000;"';
+ }
+
+ switch ($mode)
+ {
+ case 'module':
+ $output[$module][] = "<tr$color><td>" . ((isset($output[$module])) ? '&nbsp;' : "<b>$module</b>" ) . "</td><td>$dup</td><td>$other_module</td><td>$compare</td></tr>";
+ break;
+
+ default:
+ $output[$dup][] = "<tr$color><td><b>$dup</b></td><td>$module</td><td>$other_module</td><td>$compare</td></tr>";
+ break;
+ }
+ }
+ }
+}//var_dump($output);
+
+echo "<p><a href=\"lang_duplicates.php\">By Key</a> <a href=\"lang_duplicates.php?mode=module\">By Module</a></p><p>Equal: <b>$equal</b>, Differ in case only: $case, differ in content: $diff</p>";
+switch ($mode)
+{
+ case 'module':
+ echo "<table cellpadding=\"4\"><tr><th>Key</th><th>First File</th><th>Second File</th><th>Difference</th></tr>";
+ foreach ($output as $module => $html)
+ {
+ echo implode('', $html);
+ }
+ break;
+
+ default:
+ ksort($output);
+ echo "<table cellpadding=\"4\"><tr><th>File</th><th>Key</th><th>Conflicting File</th><th>Difference</th></tr>";
+ foreach ($output as $dup)
+ {
+ echo implode('', $dup);
+ }
+ break;
+}
+
+echo "</table>";
+
+
+function find_modules($dirname)
+{
+ $list = glob("$dirname/*.php");
+
+ foreach(glob("$dirname/*", GLOB_ONLYDIR) as $name)
+ {
+ $list = array_merge($list, find_modules($name));
+ }
+ return $list;
+}
+
+?>
+ </body>
+</html> \ No newline at end of file
diff --git a/phpBB/develop/merge_attachment_tables.php b/phpBB/develop/merge_attachment_tables.php
new file mode 100644
index 0000000000..ae7fe57be4
--- /dev/null
+++ b/phpBB/develop/merge_attachment_tables.php
@@ -0,0 +1,80 @@
+<?php
+// -------------------------------------------------------------
+//
+// $Id$
+//
+// FILENAME : merge_attachment_tables.php
+// STARTED : Tue Nov 04, 2003
+// COPYRIGHT : © 2001, 2003 phpBB Group
+// WWW : http://www.phpbb.com/
+// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
+//
+// -------------------------------------------------------------
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+$db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
+
+define('IN_PHPBB', 1);
+define('ANONYMOUS', 1);
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+$phpbb_root_path='./../';
+include($phpbb_root_path . 'config.'.$phpEx);
+require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx);
+require($phpbb_root_path . 'includes/db/' . $dbms . '.'.$phpEx);
+include($phpbb_root_path . 'includes/functions.'.$phpEx);
+
+$cache = new acm();
+$db = new sql_db();
+
+// Connect to DB
+$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
+
+// Rename the attachments table...
+$sql = "RENAME TABLE {$table_prefix}attachments TO {$table_prefix}attach_temp";
+$db->sql_query($sql);
+
+$sql = "CREATE TABLE {$table_prefix}attachments
+ SELECT d.*, a.post_id, a.user_id_from as poster_id, p.topic_id
+ FROM {$table_prefix}attach_desc d, {$table_prefix}attach_temp a, {$table_prefix}posts p
+ WHERE a.attach_id = d.attach_id
+ AND a.post_id = p.post_id";
+$db->sql_query($sql);
+
+switch ($db->sql_layer)
+{
+ case 'mysql':
+ case 'mysql4':
+ $sql = 'ALTER TABLE ' . $table_prefix . 'attachments
+ ADD PRIMARY KEY (attach_id),
+ ADD INDEX filetime (filetime),
+ ADD INDEX post_id (post_id),
+ ADD INDEX poster_id (poster_id),
+ ADD INDEX physical_filename (physical_filename(10)),
+ ADD INDEX filesize (filesize),
+ ADD INDEX topic_id (topic_id),
+ MODIFY COLUMN attach_id mediumint(8) UNSIGNED NOT NULL auto_increment';
+ break;
+
+ case 'mssql':
+ case 'mssql-odbc':
+ case 'msaccess':
+ break;
+
+ case 'postgresql':
+ break;
+}
+$db->sql_query($sql);
+
+//$db->sql_query("DROP TABLE {$table_prefix}attach_temp");
+
+echo "<p><b>Done</b></p>\n";
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/merge_post_tables.php b/phpBB/develop/merge_post_tables.php
new file mode 100644
index 0000000000..3567a569c6
--- /dev/null
+++ b/phpBB/develop/merge_post_tables.php
@@ -0,0 +1,209 @@
+<?php
+/***************************************************************************
+ * merge_clean_posts.php
+ * -------------------
+ * begin : Tuesday, February 25, 2003
+ * copyright : (C) 2003 The phpBB Group
+ * email : support@phpbb.com
+ *
+ * $Id$
+ *
+ ***************************************************************************/
+
+/***************************************************************************
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ ***************************************************************************/
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+@set_time_limit(2400);
+
+$db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
+
+define('IN_PHPBB', 1);
+define('ANONYMOUS', 1);
+$phpbb_root_path='./../';
+include($phpbb_root_path . 'extension.inc');
+include($phpbb_root_path . 'config.'.$phpEx);
+include($phpbb_root_path . 'includes/functions.'.$phpEx);
+require($phpbb_root_path . 'includes/acm/cache_' . $acm_type . '.'.$phpEx);
+include($phpbb_root_path . 'db/' . $dbms . '.'.$phpEx);
+
+$cache = new acm();
+$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
+
+// Just Do it (tm)
+$sql = "RENAME TABLE {$table_prefix}posts TO {$table_prefix}posts_temp";
+$db->sql_query($sql);
+
+$sql = "CREATE TABLE {$table_prefix}posts
+ SELECT p.*, pt.post_subject, pt.post_text, pt.post_checksum, pt.bbcode_bitfield, pt.bbcode_uid
+ FROM {$table_prefix}posts_temp p, {$table_prefix}posts_text pt
+ WHERE pt.post_id = p.post_id";
+$db->sql_query($sql);
+
+switch ($db->sql_layer)
+{
+ case 'mysql':
+ case 'mysql4':
+ $sql = 'ALTER TABLE ' . $table_prefix . 'posts
+ ADD PRIMARY KEY (post_id),
+ ADD INDEX topic_id (topic_id),
+ ADD INDEX poster_ip (poster_ip),
+ ADD INDEX post_approved (post_approved),
+ MODIFY COLUMN post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ ADD COLUMN post_encoding varchar(11) DEFAULT \'iso-8859-15\' NOT NULL';
+ break;
+
+ case 'mssql':
+ case 'mssql-odbc':
+ case 'msaccess':
+ break;
+
+ case 'postgresql':
+ break;
+}
+$db->sql_query($sql);
+
+$sql = "UPDATE {$table_prefix}topics SET topic_poster = 1 WHERE topic_poster = 0 OR topic_poster IS NULL";
+$db->sql_query($sql);
+$sql = "UPDATE {$table_prefix}topics SET topic_last_poster_id = 1 WHERE topic_last_poster_id = 0 OR topic_last_poster_id IS NULL";
+$db->sql_query($sql);
+$sql = "UPDATE {$table_prefix}posts SET poster_id = 1 WHERE poster_id = 0 OR poster_id IS NULL";
+$db->sql_query($sql);
+$sql = "UPDATE {$table_prefix}users SET user_id = 1 WHERE user_id = 0";
+$db->sql_query($sql);
+
+$sql = "SELECT t.topic_id
+ FROM {$table_prefix}topics t
+ LEFT JOIN {$table_prefix}posts p ON p.topic_id = t.topic_id
+ WHERE p.topic_id IS NULL";
+$result = $db->sql_query($sql);
+
+if ($row = $db->sql_fetchrow($result))
+{
+ $del_sql = '';
+ do
+ {
+ $del_sql .= (($del_sql != '') ? ', ' : '') . $row['topic_id'];
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ $sql = "DELETE FROM {$table_prefix}topics
+ WHERE topic_id IN ($del_sql)";
+ $db->sql_query($sql);
+}
+$db->sql_freeresult($result);
+
+$del_sql = '';
+$sql = "SELECT topic_id, MIN(post_id) AS first_post_id, MAX(post_id) AS last_post_id, COUNT(post_id) AS total_posts
+ FROM {$table_prefix}posts
+ GROUP BY topic_id";
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $del_sql .= (($del_sql != '') ? ', ' : '') . $row['topic_id'];
+
+ $sql = "UPDATE {$table_prefix}topics
+ SET topic_first_post_id = " . $row['first_post_id'] . ", topic_last_post_id = " . $row['last_post_id'] . ", topic_replies = " . ($row['total_posts'] - 1) . "
+ WHERE topic_id = " . $row['topic_id'];
+ $db->sql_query($sql);
+}
+$db->sql_freeresult($result);
+
+$sql = "DELETE FROM {$table_prefix}topics WHERE topic_id NOT IN ($del_sql)";
+$db->sql_query($sql);
+
+$topic_count = $post_count = array();
+$sql = "SELECT forum_id, COUNT(topic_id) AS topics
+ FROM {$table_prefix}topics
+ GROUP BY forum_id";
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $topic_count[$row['forum_id']] = $row['topics'];
+}
+$db->sql_freeresult($result);
+
+$sql = "SELECT forum_id, COUNT(post_id) AS posts
+ FROM {$table_prefix}posts
+ GROUP BY forum_id";
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $post_count[$row['forum_id']] = $row['posts'];
+}
+$db->sql_freeresult($result);
+
+switch ($db->sql_layer)
+{
+ case 'oracle':
+ $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
+ FROM " . $table_prefix . "forums f, " . $table_prefix . "posts p, " . $table_prefix . "users u
+ WHERE p.post_id = f.forum_last_post_id(+)
+ AND u.user_id = p.poster_id(+)";
+ break;
+
+ default:
+ $sql = "SELECT f.forum_id, p.post_time, p.post_username, u.username, u.user_id
+ FROM ((" . $table_prefix . "forums f
+ LEFT JOIN " . $table_prefix . "posts p ON p.post_id = f.forum_last_post_id)
+ LEFT JOIN " . $table_prefix . "users u ON u.user_id = p.poster_id)";
+ break;
+}
+$result = $db->sql_query($sql);
+
+$sql_ary = array();
+while ($row = $db->sql_fetchrow($result))
+{
+ $forum_id = $row['forum_id'];
+
+ $sql_ary[] = "UPDATE " . $table_prefix . "forums
+ SET forum_last_poster_id = " . ((!empty($row['user_id']) && $row['user_id'] != ANONYMOUS) ? $row['user_id'] : ANONYMOUS) . ", forum_last_poster_name = '" . ((!empty($row['user_id']) && $row['user_id'] != ANONYMOUS) ? addslashes($row['username']) : addslashes($row['post_username'])) . "', forum_last_post_time = " . $row['post_time'] . ", forum_posts = " . (($post_count[$forum_id]) ? $post_count[$forum_id] : 0) . ", forum_topics = " . (($topic_count[$forum_id]) ? $topic_count[$forum_id] : 0) . "
+ WHERE forum_id = $forum_id";
+
+ $sql = "SELECT t.topic_id, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
+ FROM " . $table_prefix . "topics t, " . $table_prefix . "users u, " . $table_prefix . "posts p, " . $table_prefix . "posts p2, " . $table_prefix . "users u2
+ WHERE t.forum_id = $forum_id
+ AND u.user_id = t.topic_poster
+ AND p.post_id = t.topic_first_post_id
+ AND p2.post_id = t.topic_last_post_id
+ AND u2.user_id = p2.poster_id";
+ $result2 = $db->sql_query($sql);
+
+ while ($row2 = $db->sql_fetchrow($result2))
+ {
+ $sql_ary[] = "UPDATE " . $table_prefix . "topics
+ SET topic_poster = " . $row2['user_id'] . ", topic_first_poster_name = '" . ((!empty($row2['user_id']) && $row2['user_id'] != ANONYMOUS) ? addslashes($row2['username']) : addslashes($row2['post_username'])) . "', topic_last_poster_id = " . ((!empty($row2['id2']) && $row2['id2'] != ANONYMOUS) ? $row2['id2'] : ANONYMOUS) . ", topic_last_post_time = " . $row2['post_time'] . ", topic_last_poster_name = '" . ((!empty($row2['id2']) && $row2['id2'] != ANONYMOUS) ? addslashes($row2['user2']) : addslashes($row2['post_username2'])) . "'
+ WHERE topic_id = " . $row2['topic_id'];
+ }
+ $db->sql_freeresult($result2);
+
+ unset($row2);
+}
+$db->sql_freeresult($result);
+
+foreach ($sql_ary as $sql)
+{
+ $sql . "<br />";
+ $db->sql_query($sql);
+}
+
+echo "<p><b>Done</b></p>\n";
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/mysql_upgrader.php b/phpBB/develop/mysql_upgrader.php
new file mode 100644
index 0000000000..034c1c0c20
--- /dev/null
+++ b/phpBB/develop/mysql_upgrader.php
@@ -0,0 +1,1400 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+* This file creates SQL statements to upgrade phpBB on MySQL 3.x/4.0.x to 4.1.x/5.x
+*
+*/
+
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+define('IN_PHPBB', true);
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+
+$prefix = $table_prefix;
+
+$newline = "\n";
+
+if (PHP_SAPI !== 'cli')
+{
+ $newline = '<br>';
+}
+
+$sql = 'DESCRIBE ' . POSTS_TABLE . ' post_text';
+$result = $db->sql_query($sql);
+
+$row = $db->sql_fetchrow($result);
+
+$db->sql_freeresult($result);
+
+$mysql_indexer = $drop_index = false;
+
+if (strtolower($row['Type']) === 'mediumtext')
+{
+ $mysql_indexer = true;
+}
+
+if (strtolower($row['Key']) === 'mul')
+{
+ $drop_index = true;
+}
+
+echo "USE $dbname;$newline$newline";
+
+
+@set_time_limit(0);
+
+$schema_data = get_schema_struct();
+$dbms_type_map = array(
+ 'mysql_41' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'mediumint(8) UNSIGNED',
+ 'UINT:' => 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'smallint(4) UNSIGNED',
+ 'BOOL' => 'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'text',
+ 'XSTEXT_UNI'=> 'varchar(100)',
+ 'STEXT' => 'text',
+ 'STEXT_UNI' => 'varchar(255)',
+ 'TEXT' => 'text',
+ 'TEXT_UNI' => 'text',
+ 'MTEXT' => 'mediumtext',
+ 'MTEXT_UNI' => 'mediumtext',
+ 'TIMESTAMP' => 'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar(255)',
+ 'VARBINARY' => 'varbinary(255)',
+ ),
+
+ 'mysql_40' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'mediumint(8) UNSIGNED',
+ 'UINT:' => 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'smallint(4) UNSIGNED',
+ 'BOOL' => 'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varbinary(255)',
+ 'VCHAR:' => 'varbinary(%d)',
+ 'CHAR:' => 'binary(%d)',
+ 'XSTEXT' => 'blob',
+ 'XSTEXT_UNI'=> 'blob',
+ 'STEXT' => 'blob',
+ 'STEXT_UNI' => 'blob',
+ 'TEXT' => 'blob',
+ 'TEXT_UNI' => 'blob',
+ 'MTEXT' => 'mediumblob',
+ 'MTEXT_UNI' => 'mediumblob',
+ 'TIMESTAMP' => 'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'blob',
+ 'VCHAR_UNI:'=> array('varbinary(%d)', 'limit' => array('mult', 3, 255, 'blob')),
+ 'VCHAR_CI' => 'blob',
+ 'VARBINARY' => 'varbinary(255)',
+ ),
+);
+
+foreach ($schema_data as $table_name => $table_data)
+{
+ $table_name = str_replace('phpbb_', $prefix, $table_name);
+ // Write comment about table
+ echo "# Table: '{$table_name}'$newline";
+
+ // Create Table statement
+ $generator = $textimage = false;
+
+ // Do we need to DROP a fulltext index before we alter the table?
+ if ($table_name == ($prefix . 'posts') && $drop_index)
+ {
+ echo "ALTER TABLE {$table_name}{$newline}";
+ echo "DROP INDEX post_text,{$newline}DROP INDEX post_subject,{$newline}DROP INDEX post_content;{$newline}{$newline}";
+ }
+
+ $line = "ALTER TABLE {$table_name} $newline";
+
+ // Table specific so we don't get overlap
+ $modded_array = array();
+
+ // Write columns one by one...
+ foreach ($table_data['COLUMNS'] as $column_name => $column_data)
+ {
+ // Get type
+ if (strpos($column_data[0], ':') !== false)
+ {
+ list($orig_column_type, $column_length) = explode(':', $column_data[0]);
+ $column_type = sprintf($dbms_type_map['mysql_41'][$orig_column_type . ':'], $column_length);
+
+ if (isset($dbms_type_map['mysql_40'][$orig_column_type . ':']['limit'][0]))
+ {
+ switch ($dbms_type_map['mysql_40'][$orig_column_type . ':']['limit'][0])
+ {
+ case 'mult':
+ if (($column_length * $dbms_type_map['mysql_40'][$orig_column_type . ':']['limit'][1]) > $dbms_type_map['mysql_40'][$orig_column_type . ':']['limit'][2])
+ {
+ $modded_array[$column_name] = $column_type;
+ }
+ break;
+ }
+ }
+
+ $orig_column_type .= ':';
+ }
+ else
+ {
+ $orig_column_type = $column_data[0];
+ $other_column_type = $dbms_type_map['mysql_40'][$column_data[0]];
+ if ($other_column_type == 'text' || $other_column_type == 'blob')
+ {
+ $modded_array[$column_name] = $column_type;
+ }
+ $column_type = $dbms_type_map['mysql_41'][$column_data[0]];
+ }
+
+ // Adjust default value if db-dependant specified
+ if (is_array($column_data[1]))
+ {
+ $column_data[1] = (isset($column_data[1][$dbms])) ? $column_data[1][$dbms] : $column_data[1]['default'];
+ }
+
+ $line .= "\tMODIFY {$column_name} {$column_type} ";
+
+ // For hexadecimal values do not use single quotes
+ if (!is_null($column_data[1]) && substr($column_type, -4) !== 'text' && substr($column_type, -4) !== 'blob')
+ {
+ $line .= (strpos($column_data[1], '0x') === 0) ? "DEFAULT {$column_data[1]} " : "DEFAULT '{$column_data[1]}' ";
+ }
+ $line .= 'NOT NULL';
+
+ if (isset($column_data[2]))
+ {
+ if ($column_data[2] == 'auto_increment')
+ {
+ $line .= ' auto_increment';
+ }
+ else if ($column_data[2] == 'true_sort')
+ {
+ $line .= ' COLLATE utf8_unicode_ci';
+ }
+ else if ($column_data[2] == 'no_sort')
+ {
+ $line .= ' COLLATE utf8_bin';
+ }
+ }
+ else if (preg_match('/(?:var)?char|(?:medium)?text/i', $column_type))
+ {
+ $line .= ' COLLATE utf8_bin';
+ }
+
+ $line .= ",$newline";
+ }
+
+ // Write Keys
+ if (isset($table_data['KEYS']))
+ {
+ foreach ($table_data['KEYS'] as $key_name => $key_data)
+ {
+ $temp = '';
+ if (!is_array($key_data[1]))
+ {
+ $key_data[1] = array($key_data[1]);
+ }
+
+ $temp .= ($key_data[0] == 'INDEX') ? "\tADD KEY" : '';
+ $temp .= ($key_data[0] == 'UNIQUE') ? "\tADD UNIQUE" : '';
+ $repair = false;
+ foreach ($key_data[1] as $key => $col_name)
+ {
+ if (isset($modded_array[$col_name]))
+ {
+ $repair = true;
+ }
+ }
+ if ($repair)
+ {
+ $line .= "\tDROP INDEX " . $key_name . ",$newline";
+ $line .= $temp;
+ $line .= ' ' . $key_name . ' (' . implode(', ', $key_data[1]) . "),$newline";
+ }
+ }
+ }
+
+ //$line .= "\tCONVERT TO CHARACTER SET `utf8`$newline";
+ $line .= "\tDEFAULT CHARSET=utf8 COLLATE=utf8_bin;$newline$newline";
+
+ echo $line . "$newline";
+
+ // Do we now need to re-add the fulltext index? ;)
+ if ($table_name == ($prefix . 'posts') && $drop_index)
+ {
+ echo "ALTER TABLE $table_name ADD FULLTEXT (post_subject), ADD FULLTEXT (post_text), ADD FULLTEXT post_content (post_subject, post_text){$newline}";
+ }
+}
+
+/**
+* Define the basic structure
+* The format:
+* array('{TABLE_NAME}' => {TABLE_DATA})
+* {TABLE_DATA}:
+* COLUMNS = array({column_name} = array({column_type}, {default}, {auto_increment}))
+* PRIMARY_KEY = {column_name(s)}
+* KEYS = array({key_name} = array({key_type}, {column_name(s)})),
+*
+* Column Types:
+* INT:x => SIGNED int(x)
+* BINT => BIGINT
+* UINT => mediumint(8) UNSIGNED
+* UINT:x => int(x) UNSIGNED
+* TINT:x => tinyint(x)
+* USINT => smallint(4) UNSIGNED (for _order columns)
+* BOOL => tinyint(1) UNSIGNED
+* VCHAR => varchar(255)
+* CHAR:x => char(x)
+* XSTEXT_UNI => text for storing 100 characters (topic_title for example)
+* STEXT_UNI => text for storing 255 characters (normal input field with a max of 255 single-byte chars) - same as VCHAR_UNI
+* TEXT_UNI => text for storing 3000 characters (short text, descriptions, comments, etc.)
+* MTEXT_UNI => mediumtext (post text, large text)
+* VCHAR:x => varchar(x)
+* TIMESTAMP => int(11) UNSIGNED
+* DECIMAL => decimal number (5,2)
+* DECIMAL: => decimal number (x,2)
+* PDECIMAL => precision decimal number (6,3)
+* PDECIMAL: => precision decimal number (x,3)
+* VCHAR_UNI => varchar(255) BINARY
+* VCHAR_CI => varchar_ci for postgresql, others VCHAR
+*/
+function get_schema_struct()
+{
+ $schema_data = array();
+
+ $schema_data['phpbb_attachments'] = array(
+ 'COLUMNS' => array(
+ 'attach_id' => array('UINT', NULL, 'auto_increment'),
+ 'post_msg_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ 'in_message' => array('BOOL', 0),
+ 'poster_id' => array('UINT', 0),
+ 'is_orphan' => array('BOOL', 1),
+ 'physical_filename' => array('VCHAR', ''),
+ 'real_filename' => array('VCHAR', ''),
+ 'download_count' => array('UINT', 0),
+ 'attach_comment' => array('TEXT_UNI', ''),
+ 'extension' => array('VCHAR:100', ''),
+ 'mimetype' => array('VCHAR:100', ''),
+ 'filesize' => array('UINT:20', 0),
+ 'filetime' => array('TIMESTAMP', 0),
+ 'thumbnail' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'attach_id',
+ 'KEYS' => array(
+ 'filetime' => array('INDEX', 'filetime'),
+ 'post_msg_id' => array('INDEX', 'post_msg_id'),
+ 'topic_id' => array('INDEX', 'topic_id'),
+ 'poster_id' => array('INDEX', 'poster_id'),
+ 'is_orphan' => array('INDEX', 'is_orphan'),
+ ),
+ );
+
+ $schema_data['phpbb_acl_groups'] = array(
+ 'COLUMNS' => array(
+ 'group_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'auth_option_id' => array('UINT', 0),
+ 'auth_role_id' => array('UINT', 0),
+ 'auth_setting' => array('TINT:2', 0),
+ ),
+ 'KEYS' => array(
+ 'group_id' => array('INDEX', 'group_id'),
+ 'auth_opt_id' => array('INDEX', 'auth_option_id'),
+ 'auth_role_id' => array('INDEX', 'auth_role_id'),
+ ),
+ );
+
+ $schema_data['phpbb_acl_options'] = array(
+ 'COLUMNS' => array(
+ 'auth_option_id' => array('UINT', NULL, 'auto_increment'),
+ 'auth_option' => array('VCHAR:50', ''),
+ 'is_global' => array('BOOL', 0),
+ 'is_local' => array('BOOL', 0),
+ 'founder_only' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'auth_option_id',
+ 'KEYS' => array(
+ 'auth_option' => array('UNIQUE', 'auth_option'),
+ ),
+ );
+
+ $schema_data['phpbb_acl_roles'] = array(
+ 'COLUMNS' => array(
+ 'role_id' => array('UINT', NULL, 'auto_increment'),
+ 'role_name' => array('VCHAR_UNI', ''),
+ 'role_description' => array('TEXT_UNI', ''),
+ 'role_type' => array('VCHAR:10', ''),
+ 'role_order' => array('USINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'role_id',
+ 'KEYS' => array(
+ 'role_type' => array('INDEX', 'role_type'),
+ 'role_order' => array('INDEX', 'role_order'),
+ ),
+ );
+
+ $schema_data['phpbb_acl_roles_data'] = array(
+ 'COLUMNS' => array(
+ 'role_id' => array('UINT', 0),
+ 'auth_option_id' => array('UINT', 0),
+ 'auth_setting' => array('TINT:2', 0),
+ ),
+ 'PRIMARY_KEY' => array('role_id', 'auth_option_id'),
+ 'KEYS' => array(
+ 'ath_op_id' => array('INDEX', 'auth_option_id'),
+ ),
+ );
+
+ $schema_data['phpbb_acl_users'] = array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'auth_option_id' => array('UINT', 0),
+ 'auth_role_id' => array('UINT', 0),
+ 'auth_setting' => array('TINT:2', 0),
+ ),
+ 'KEYS' => array(
+ 'user_id' => array('INDEX', 'user_id'),
+ 'auth_option_id' => array('INDEX', 'auth_option_id'),
+ 'auth_role_id' => array('INDEX', 'auth_role_id'),
+ ),
+ );
+
+ $schema_data['phpbb_banlist'] = array(
+ 'COLUMNS' => array(
+ 'ban_id' => array('UINT', NULL, 'auto_increment'),
+ 'ban_userid' => array('UINT', 0),
+ 'ban_ip' => array('VCHAR:40', ''),
+ 'ban_email' => array('VCHAR_UNI:100', ''),
+ 'ban_start' => array('TIMESTAMP', 0),
+ 'ban_end' => array('TIMESTAMP', 0),
+ 'ban_exclude' => array('BOOL', 0),
+ 'ban_reason' => array('VCHAR_UNI', ''),
+ 'ban_give_reason' => array('VCHAR_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'ban_id',
+ 'KEYS' => array(
+ 'ban_end' => array('INDEX', 'ban_end'),
+ 'ban_user' => array('INDEX', array('ban_userid', 'ban_exclude')),
+ 'ban_email' => array('INDEX', array('ban_email', 'ban_exclude')),
+ 'ban_ip' => array('INDEX', array('ban_ip', 'ban_exclude')),
+ ),
+ );
+
+ $schema_data['phpbb_bbcodes'] = array(
+ 'COLUMNS' => array(
+ 'bbcode_id' => array('TINT:3', 0),
+ 'bbcode_tag' => array('VCHAR:16', ''),
+ 'bbcode_helpline' => array('VCHAR_UNI', ''),
+ 'display_on_posting' => array('BOOL', 0),
+ 'bbcode_match' => array('TEXT_UNI', ''),
+ 'bbcode_tpl' => array('MTEXT_UNI', ''),
+ 'first_pass_match' => array('MTEXT_UNI', ''),
+ 'first_pass_replace' => array('MTEXT_UNI', ''),
+ 'second_pass_match' => array('MTEXT_UNI', ''),
+ 'second_pass_replace' => array('MTEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'bbcode_id',
+ 'KEYS' => array(
+ 'display_on_post' => array('INDEX', 'display_on_posting'),
+ ),
+ );
+
+ $schema_data['phpbb_bookmarks'] = array(
+ 'COLUMNS' => array(
+ 'topic_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => array('topic_id', 'user_id'),
+ );
+
+ $schema_data['phpbb_bots'] = array(
+ 'COLUMNS' => array(
+ 'bot_id' => array('UINT', NULL, 'auto_increment'),
+ 'bot_active' => array('BOOL', 1),
+ 'bot_name' => array('STEXT_UNI', ''),
+ 'user_id' => array('UINT', 0),
+ 'bot_agent' => array('VCHAR', ''),
+ 'bot_ip' => array('VCHAR', ''),
+ ),
+ 'PRIMARY_KEY' => 'bot_id',
+ 'KEYS' => array(
+ 'bot_active' => array('INDEX', 'bot_active'),
+ ),
+ );
+
+ $schema_data['phpbb_config'] = array(
+ 'COLUMNS' => array(
+ 'config_name' => array('VCHAR', ''),
+ 'config_value' => array('VCHAR_UNI', ''),
+ 'is_dynamic' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'config_name',
+ 'KEYS' => array(
+ 'is_dynamic' => array('INDEX', 'is_dynamic'),
+ ),
+ );
+
+ $schema_data['phpbb_confirm'] = array(
+ 'COLUMNS' => array(
+ 'confirm_id' => array('CHAR:32', ''),
+ 'session_id' => array('CHAR:32', ''),
+ 'confirm_type' => array('TINT:3', 0),
+ 'code' => array('VCHAR:8', ''),
+ 'seed' => array('UINT:10', 0),
+ 'attempts' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => array('session_id', 'confirm_id'),
+ 'KEYS' => array(
+ 'confirm_type' => array('INDEX', 'confirm_type'),
+ ),
+ );
+
+ $schema_data['phpbb_disallow'] = array(
+ 'COLUMNS' => array(
+ 'disallow_id' => array('UINT', NULL, 'auto_increment'),
+ 'disallow_username' => array('VCHAR_UNI:255', ''),
+ ),
+ 'PRIMARY_KEY' => 'disallow_id',
+ );
+
+ $schema_data['phpbb_drafts'] = array(
+ 'COLUMNS' => array(
+ 'draft_id' => array('UINT', NULL, 'auto_increment'),
+ 'user_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'save_time' => array('TIMESTAMP', 0),
+ 'draft_subject' => array('STEXT_UNI', ''),
+ 'draft_message' => array('MTEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'draft_id',
+ 'KEYS' => array(
+ 'save_time' => array('INDEX', 'save_time'),
+ ),
+ );
+
+ $schema_data['phpbb_extensions'] = array(
+ 'COLUMNS' => array(
+ 'extension_id' => array('UINT', NULL, 'auto_increment'),
+ 'group_id' => array('UINT', 0),
+ 'extension' => array('VCHAR:100', ''),
+ ),
+ 'PRIMARY_KEY' => 'extension_id',
+ );
+
+ $schema_data['phpbb_extension_groups'] = array(
+ 'COLUMNS' => array(
+ 'group_id' => array('UINT', NULL, 'auto_increment'),
+ 'group_name' => array('VCHAR_UNI', ''),
+ 'cat_id' => array('TINT:2', 0),
+ 'allow_group' => array('BOOL', 0),
+ 'download_mode' => array('BOOL', 1),
+ 'upload_icon' => array('VCHAR', ''),
+ 'max_filesize' => array('UINT:20', 0),
+ 'allowed_forums' => array('TEXT', ''),
+ 'allow_in_pm' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'group_id',
+ );
+
+ $schema_data['phpbb_forums'] = array(
+ 'COLUMNS' => array(
+ 'forum_id' => array('UINT', NULL, 'auto_increment'),
+ 'parent_id' => array('UINT', 0),
+ 'left_id' => array('UINT', 0),
+ 'right_id' => array('UINT', 0),
+ 'forum_parents' => array('MTEXT', ''),
+ 'forum_name' => array('STEXT_UNI', ''),
+ 'forum_desc' => array('TEXT_UNI', ''),
+ 'forum_desc_bitfield' => array('VCHAR:255', ''),
+ 'forum_desc_options' => array('UINT:11', 7),
+ 'forum_desc_uid' => array('VCHAR:8', ''),
+ 'forum_link' => array('VCHAR_UNI', ''),
+ 'forum_password' => array('VCHAR_UNI:40', ''),
+ 'forum_style' => array('UINT', 0),
+ 'forum_image' => array('VCHAR', ''),
+ 'forum_rules' => array('TEXT_UNI', ''),
+ 'forum_rules_link' => array('VCHAR_UNI', ''),
+ 'forum_rules_bitfield' => array('VCHAR:255', ''),
+ 'forum_rules_options' => array('UINT:11', 7),
+ 'forum_rules_uid' => array('VCHAR:8', ''),
+ 'forum_topics_per_page' => array('TINT:4', 0),
+ 'forum_type' => array('TINT:4', 0),
+ 'forum_status' => array('TINT:4', 0),
+ 'forum_posts' => array('UINT', 0),
+ 'forum_topics' => array('UINT', 0),
+ 'forum_topics_real' => array('UINT', 0),
+ 'forum_last_post_id' => array('UINT', 0),
+ 'forum_last_poster_id' => array('UINT', 0),
+ 'forum_last_post_subject' => array('STEXT_UNI', ''),
+ 'forum_last_post_time' => array('TIMESTAMP', 0),
+ 'forum_last_poster_name'=> array('VCHAR_UNI', ''),
+ 'forum_last_poster_colour'=> array('VCHAR:6', ''),
+ 'forum_flags' => array('TINT:4', 32),
+ 'forum_options' => array('UINT:20', 0),
+ 'display_subforum_list' => array('BOOL', 1),
+ 'display_on_index' => array('BOOL', 1),
+ 'enable_indexing' => array('BOOL', 1),
+ 'enable_icons' => array('BOOL', 1),
+ 'enable_prune' => array('BOOL', 0),
+ 'prune_next' => array('TIMESTAMP', 0),
+ 'prune_days' => array('UINT', 0),
+ 'prune_viewed' => array('UINT', 0),
+ 'prune_freq' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'forum_id',
+ 'KEYS' => array(
+ 'left_right_id' => array('INDEX', array('left_id', 'right_id')),
+ 'forum_lastpost_id' => array('INDEX', 'forum_last_post_id'),
+ ),
+ );
+
+ $schema_data['phpbb_forums_access'] = array(
+ 'COLUMNS' => array(
+ 'forum_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'session_id' => array('CHAR:32', ''),
+ ),
+ 'PRIMARY_KEY' => array('forum_id', 'user_id', 'session_id'),
+ );
+
+ $schema_data['phpbb_forums_track'] = array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'mark_time' => array('TIMESTAMP', 0),
+ ),
+ 'PRIMARY_KEY' => array('user_id', 'forum_id'),
+ );
+
+ $schema_data['phpbb_forums_watch'] = array(
+ 'COLUMNS' => array(
+ 'forum_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'notify_status' => array('BOOL', 0),
+ ),
+ 'KEYS' => array(
+ 'forum_id' => array('INDEX', 'forum_id'),
+ 'user_id' => array('INDEX', 'user_id'),
+ 'notify_stat' => array('INDEX', 'notify_status'),
+ ),
+ );
+
+ $schema_data['phpbb_groups'] = array(
+ 'COLUMNS' => array(
+ 'group_id' => array('UINT', NULL, 'auto_increment'),
+ 'group_type' => array('TINT:4', 1),
+ 'group_founder_manage' => array('BOOL', 0),
+ 'group_skip_auth' => array('BOOL', 0),
+ 'group_name' => array('VCHAR_CI', ''),
+ 'group_desc' => array('TEXT_UNI', ''),
+ 'group_desc_bitfield' => array('VCHAR:255', ''),
+ 'group_desc_options' => array('UINT:11', 7),
+ 'group_desc_uid' => array('VCHAR:8', ''),
+ 'group_display' => array('BOOL', 0),
+ 'group_avatar' => array('VCHAR', ''),
+ 'group_avatar_type' => array('TINT:2', 0),
+ 'group_avatar_width' => array('USINT', 0),
+ 'group_avatar_height' => array('USINT', 0),
+ 'group_rank' => array('UINT', 0),
+ 'group_colour' => array('VCHAR:6', ''),
+ 'group_sig_chars' => array('UINT', 0),
+ 'group_receive_pm' => array('BOOL', 0),
+ 'group_message_limit' => array('UINT', 0),
+ 'group_max_recipients' => array('UINT', 0),
+ 'group_legend' => array('BOOL', 1),
+ ),
+ 'PRIMARY_KEY' => 'group_id',
+ 'KEYS' => array(
+ 'group_legend_name' => array('INDEX', array('group_legend', 'group_name')),
+ ),
+ );
+
+ $schema_data['phpbb_icons'] = array(
+ 'COLUMNS' => array(
+ 'icons_id' => array('UINT', NULL, 'auto_increment'),
+ 'icons_url' => array('VCHAR', ''),
+ 'icons_width' => array('TINT:4', 0),
+ 'icons_height' => array('TINT:4', 0),
+ 'icons_order' => array('UINT', 0),
+ 'display_on_posting' => array('BOOL', 1),
+ ),
+ 'PRIMARY_KEY' => 'icons_id',
+ 'KEYS' => array(
+ 'display_on_posting' => array('INDEX', 'display_on_posting'),
+ ),
+ );
+
+ $schema_data['phpbb_lang'] = array(
+ 'COLUMNS' => array(
+ 'lang_id' => array('TINT:4', NULL, 'auto_increment'),
+ 'lang_iso' => array('VCHAR:30', ''),
+ 'lang_dir' => array('VCHAR:30', ''),
+ 'lang_english_name' => array('VCHAR_UNI:100', ''),
+ 'lang_local_name' => array('VCHAR_UNI:255', ''),
+ 'lang_author' => array('VCHAR_UNI:255', ''),
+ ),
+ 'PRIMARY_KEY' => 'lang_id',
+ 'KEYS' => array(
+ 'lang_iso' => array('INDEX', 'lang_iso'),
+ ),
+ );
+
+ $schema_data['phpbb_log'] = array(
+ 'COLUMNS' => array(
+ 'log_id' => array('UINT', NULL, 'auto_increment'),
+ 'log_type' => array('TINT:4', 0),
+ 'user_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ 'reportee_id' => array('UINT', 0),
+ 'log_ip' => array('VCHAR:40', ''),
+ 'log_time' => array('TIMESTAMP', 0),
+ 'log_operation' => array('TEXT_UNI', ''),
+ 'log_data' => array('MTEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'log_id',
+ 'KEYS' => array(
+ 'log_type' => array('INDEX', 'log_type'),
+ 'log_time' => array('INDEX', 'log_time'),
+ 'forum_id' => array('INDEX', 'forum_id'),
+ 'topic_id' => array('INDEX', 'topic_id'),
+ 'reportee_id' => array('INDEX', 'reportee_id'),
+ 'user_id' => array('INDEX', 'user_id'),
+ ),
+ );
+
+ $schema_data['phpbb_moderator_cache'] = array(
+ 'COLUMNS' => array(
+ 'forum_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'username' => array('VCHAR_UNI:255', ''),
+ 'group_id' => array('UINT', 0),
+ 'group_name' => array('VCHAR_UNI', ''),
+ 'display_on_index' => array('BOOL', 1),
+ ),
+ 'KEYS' => array(
+ 'disp_idx' => array('INDEX', 'display_on_index'),
+ 'forum_id' => array('INDEX', 'forum_id'),
+ ),
+ );
+
+ $schema_data['phpbb_modules'] = array(
+ 'COLUMNS' => array(
+ 'module_id' => array('UINT', NULL, 'auto_increment'),
+ 'module_enabled' => array('BOOL', 1),
+ 'module_display' => array('BOOL', 1),
+ 'module_basename' => array('VCHAR', ''),
+ 'module_class' => array('VCHAR:10', ''),
+ 'parent_id' => array('UINT', 0),
+ 'left_id' => array('UINT', 0),
+ 'right_id' => array('UINT', 0),
+ 'module_langname' => array('VCHAR', ''),
+ 'module_mode' => array('VCHAR', ''),
+ 'module_auth' => array('VCHAR', ''),
+ ),
+ 'PRIMARY_KEY' => 'module_id',
+ 'KEYS' => array(
+ 'left_right_id' => array('INDEX', array('left_id', 'right_id')),
+ 'module_enabled' => array('INDEX', 'module_enabled'),
+ 'class_left_id' => array('INDEX', array('module_class', 'left_id')),
+ ),
+ );
+
+ $schema_data['phpbb_poll_options'] = array(
+ 'COLUMNS' => array(
+ 'poll_option_id' => array('TINT:4', 0),
+ 'topic_id' => array('UINT', 0),
+ 'poll_option_text' => array('TEXT_UNI', ''),
+ 'poll_option_total' => array('UINT', 0),
+ ),
+ 'KEYS' => array(
+ 'poll_opt_id' => array('INDEX', 'poll_option_id'),
+ 'topic_id' => array('INDEX', 'topic_id'),
+ ),
+ );
+
+ $schema_data['phpbb_poll_votes'] = array(
+ 'COLUMNS' => array(
+ 'topic_id' => array('UINT', 0),
+ 'poll_option_id' => array('TINT:4', 0),
+ 'vote_user_id' => array('UINT', 0),
+ 'vote_user_ip' => array('VCHAR:40', ''),
+ ),
+ 'KEYS' => array(
+ 'topic_id' => array('INDEX', 'topic_id'),
+ 'vote_user_id' => array('INDEX', 'vote_user_id'),
+ 'vote_user_ip' => array('INDEX', 'vote_user_ip'),
+ ),
+ );
+
+ $schema_data['phpbb_posts'] = array(
+ 'COLUMNS' => array(
+ 'post_id' => array('UINT', NULL, 'auto_increment'),
+ 'topic_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'poster_id' => array('UINT', 0),
+ 'icon_id' => array('UINT', 0),
+ 'poster_ip' => array('VCHAR:40', ''),
+ 'post_time' => array('TIMESTAMP', 0),
+ 'post_approved' => array('BOOL', 1),
+ 'post_reported' => array('BOOL', 0),
+ 'enable_bbcode' => array('BOOL', 1),
+ 'enable_smilies' => array('BOOL', 1),
+ 'enable_magic_url' => array('BOOL', 1),
+ 'enable_sig' => array('BOOL', 1),
+ 'post_username' => array('VCHAR_UNI:255', ''),
+ 'post_subject' => array('STEXT_UNI', '', 'true_sort'),
+ 'post_text' => array('MTEXT_UNI', ''),
+ 'post_checksum' => array('VCHAR:32', ''),
+ 'post_attachment' => array('BOOL', 0),
+ 'bbcode_bitfield' => array('VCHAR:255', ''),
+ 'bbcode_uid' => array('VCHAR:8', ''),
+ 'post_postcount' => array('BOOL', 1),
+ 'post_edit_time' => array('TIMESTAMP', 0),
+ 'post_edit_reason' => array('STEXT_UNI', ''),
+ 'post_edit_user' => array('UINT', 0),
+ 'post_edit_count' => array('USINT', 0),
+ 'post_edit_locked' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'post_id',
+ 'KEYS' => array(
+ 'forum_id' => array('INDEX', 'forum_id'),
+ 'topic_id' => array('INDEX', 'topic_id'),
+ 'poster_ip' => array('INDEX', 'poster_ip'),
+ 'poster_id' => array('INDEX', 'poster_id'),
+ 'post_approved' => array('INDEX', 'post_approved'),
+ 'tid_post_time' => array('INDEX', array('topic_id', 'post_time')),
+ ),
+ );
+
+ $schema_data['phpbb_privmsgs'] = array(
+ 'COLUMNS' => array(
+ 'msg_id' => array('UINT', NULL, 'auto_increment'),
+ 'root_level' => array('UINT', 0),
+ 'author_id' => array('UINT', 0),
+ 'icon_id' => array('UINT', 0),
+ 'author_ip' => array('VCHAR:40', ''),
+ 'message_time' => array('TIMESTAMP', 0),
+ 'enable_bbcode' => array('BOOL', 1),
+ 'enable_smilies' => array('BOOL', 1),
+ 'enable_magic_url' => array('BOOL', 1),
+ 'enable_sig' => array('BOOL', 1),
+ 'message_subject' => array('STEXT_UNI', ''),
+ 'message_text' => array('MTEXT_UNI', ''),
+ 'message_edit_reason' => array('STEXT_UNI', ''),
+ 'message_edit_user' => array('UINT', 0),
+ 'message_attachment' => array('BOOL', 0),
+ 'bbcode_bitfield' => array('VCHAR:255', ''),
+ 'bbcode_uid' => array('VCHAR:8', ''),
+ 'message_edit_time' => array('TIMESTAMP', 0),
+ 'message_edit_count' => array('USINT', 0),
+ 'to_address' => array('TEXT_UNI', ''),
+ 'bcc_address' => array('TEXT_UNI', ''),
+ 'message_reported' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'msg_id',
+ 'KEYS' => array(
+ 'author_ip' => array('INDEX', 'author_ip'),
+ 'message_time' => array('INDEX', 'message_time'),
+ 'author_id' => array('INDEX', 'author_id'),
+ 'root_level' => array('INDEX', 'root_level'),
+ ),
+ );
+
+ $schema_data['phpbb_privmsgs_folder'] = array(
+ 'COLUMNS' => array(
+ 'folder_id' => array('UINT', NULL, 'auto_increment'),
+ 'user_id' => array('UINT', 0),
+ 'folder_name' => array('VCHAR_UNI', ''),
+ 'pm_count' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'folder_id',
+ 'KEYS' => array(
+ 'user_id' => array('INDEX', 'user_id'),
+ ),
+ );
+
+ $schema_data['phpbb_privmsgs_rules'] = array(
+ 'COLUMNS' => array(
+ 'rule_id' => array('UINT', NULL, 'auto_increment'),
+ 'user_id' => array('UINT', 0),
+ 'rule_check' => array('UINT', 0),
+ 'rule_connection' => array('UINT', 0),
+ 'rule_string' => array('VCHAR_UNI', ''),
+ 'rule_user_id' => array('UINT', 0),
+ 'rule_group_id' => array('UINT', 0),
+ 'rule_action' => array('UINT', 0),
+ 'rule_folder_id' => array('INT:11', 0),
+ ),
+ 'PRIMARY_KEY' => 'rule_id',
+ 'KEYS' => array(
+ 'user_id' => array('INDEX', 'user_id'),
+ ),
+ );
+
+ $schema_data['phpbb_privmsgs_to'] = array(
+ 'COLUMNS' => array(
+ 'msg_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'author_id' => array('UINT', 0),
+ 'pm_deleted' => array('BOOL', 0),
+ 'pm_new' => array('BOOL', 1),
+ 'pm_unread' => array('BOOL', 1),
+ 'pm_replied' => array('BOOL', 0),
+ 'pm_marked' => array('BOOL', 0),
+ 'pm_forwarded' => array('BOOL', 0),
+ 'folder_id' => array('INT:11', 0),
+ ),
+ 'KEYS' => array(
+ 'msg_id' => array('INDEX', 'msg_id'),
+ 'author_id' => array('INDEX', 'author_id'),
+ 'usr_flder_id' => array('INDEX', array('user_id', 'folder_id')),
+ ),
+ );
+
+ $schema_data['phpbb_profile_fields'] = array(
+ 'COLUMNS' => array(
+ 'field_id' => array('UINT', NULL, 'auto_increment'),
+ 'field_name' => array('VCHAR_UNI', ''),
+ 'field_type' => array('TINT:4', 0),
+ 'field_ident' => array('VCHAR:20', ''),
+ 'field_length' => array('VCHAR:20', ''),
+ 'field_minlen' => array('VCHAR', ''),
+ 'field_maxlen' => array('VCHAR', ''),
+ 'field_novalue' => array('VCHAR_UNI', ''),
+ 'field_default_value' => array('VCHAR_UNI', ''),
+ 'field_validation' => array('VCHAR_UNI:20', ''),
+ 'field_required' => array('BOOL', 0),
+ 'field_show_on_reg' => array('BOOL', 0),
+ 'field_show_on_vt' => array('BOOL', 0),
+ 'field_show_profile' => array('BOOL', 0),
+ 'field_hide' => array('BOOL', 0),
+ 'field_no_view' => array('BOOL', 0),
+ 'field_active' => array('BOOL', 0),
+ 'field_order' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'field_id',
+ 'KEYS' => array(
+ 'fld_type' => array('INDEX', 'field_type'),
+ 'fld_ordr' => array('INDEX', 'field_order'),
+ ),
+ );
+
+ $schema_data['phpbb_profile_fields_data'] = array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'user_id',
+ );
+
+ $schema_data['phpbb_profile_fields_lang'] = array(
+ 'COLUMNS' => array(
+ 'field_id' => array('UINT', 0),
+ 'lang_id' => array('UINT', 0),
+ 'option_id' => array('UINT', 0),
+ 'field_type' => array('TINT:4', 0),
+ 'lang_value' => array('VCHAR_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => array('field_id', 'lang_id', 'option_id'),
+ );
+
+ $schema_data['phpbb_profile_lang'] = array(
+ 'COLUMNS' => array(
+ 'field_id' => array('UINT', 0),
+ 'lang_id' => array('UINT', 0),
+ 'lang_name' => array('VCHAR_UNI', ''),
+ 'lang_explain' => array('TEXT_UNI', ''),
+ 'lang_default_value' => array('VCHAR_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => array('field_id', 'lang_id'),
+ );
+
+ $schema_data['phpbb_ranks'] = array(
+ 'COLUMNS' => array(
+ 'rank_id' => array('UINT', NULL, 'auto_increment'),
+ 'rank_title' => array('VCHAR_UNI', ''),
+ 'rank_min' => array('UINT', 0),
+ 'rank_special' => array('BOOL', 0),
+ 'rank_image' => array('VCHAR', ''),
+ ),
+ 'PRIMARY_KEY' => 'rank_id',
+ );
+
+ $schema_data['phpbb_reports'] = array(
+ 'COLUMNS' => array(
+ 'report_id' => array('UINT', NULL, 'auto_increment'),
+ 'reason_id' => array('USINT', 0),
+ 'post_id' => array('UINT', 0),
+ 'pm_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'user_notify' => array('BOOL', 0),
+ 'report_closed' => array('BOOL', 0),
+ 'report_time' => array('TIMESTAMP', 0),
+ 'report_text' => array('MTEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'report_id',
+ 'KEYS' => array(
+ 'post_id' => array('INDEX', 'post_id'),
+ 'pm_id' => array('INDEX', 'pm_id'),
+ ),
+ );
+
+ $schema_data['phpbb_reports_reasons'] = array(
+ 'COLUMNS' => array(
+ 'reason_id' => array('USINT', NULL, 'auto_increment'),
+ 'reason_title' => array('VCHAR_UNI', ''),
+ 'reason_description' => array('MTEXT_UNI', ''),
+ 'reason_order' => array('USINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'reason_id',
+ );
+
+ $schema_data['phpbb_search_results'] = array(
+ 'COLUMNS' => array(
+ 'search_key' => array('VCHAR:32', ''),
+ 'search_time' => array('TIMESTAMP', 0),
+ 'search_keywords' => array('MTEXT_UNI', ''),
+ 'search_authors' => array('MTEXT', ''),
+ ),
+ 'PRIMARY_KEY' => 'search_key',
+ );
+
+ $schema_data['phpbb_search_wordlist'] = array(
+ 'COLUMNS' => array(
+ 'word_id' => array('UINT', NULL, 'auto_increment'),
+ 'word_text' => array('VCHAR_UNI', ''),
+ 'word_common' => array('BOOL', 0),
+ 'word_count' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'word_id',
+ 'KEYS' => array(
+ 'wrd_txt' => array('UNIQUE', 'word_text'),
+ 'wrd_cnt' => array('INDEX', 'word_count'),
+ ),
+ );
+
+ $schema_data['phpbb_search_wordmatch'] = array(
+ 'COLUMNS' => array(
+ 'post_id' => array('UINT', 0),
+ 'word_id' => array('UINT', 0),
+ 'title_match' => array('BOOL', 0),
+ ),
+ 'KEYS' => array(
+ 'unq_mtch' => array('UNIQUE', array('word_id', 'post_id', 'title_match')),
+ 'word_id' => array('INDEX', 'word_id'),
+ 'post_id' => array('INDEX', 'post_id'),
+ ),
+ );
+
+ $schema_data['phpbb_sessions'] = array(
+ 'COLUMNS' => array(
+ 'session_id' => array('CHAR:32', ''),
+ 'session_user_id' => array('UINT', 0),
+ 'session_forum_id' => array('UINT', 0),
+ 'session_last_visit' => array('TIMESTAMP', 0),
+ 'session_start' => array('TIMESTAMP', 0),
+ 'session_time' => array('TIMESTAMP', 0),
+ 'session_ip' => array('VCHAR:40', ''),
+ 'session_browser' => array('VCHAR:150', ''),
+ 'session_forwarded_for' => array('VCHAR:255', ''),
+ 'session_page' => array('VCHAR_UNI', ''),
+ 'session_viewonline' => array('BOOL', 1),
+ 'session_autologin' => array('BOOL', 0),
+ 'session_admin' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'session_id',
+ 'KEYS' => array(
+ 'session_time' => array('INDEX', 'session_time'),
+ 'session_user_id' => array('INDEX', 'session_user_id'),
+ 'session_fid' => array('INDEX', 'session_forum_id'),
+ ),
+ );
+
+ $schema_data['phpbb_sessions_keys'] = array(
+ 'COLUMNS' => array(
+ 'key_id' => array('CHAR:32', ''),
+ 'user_id' => array('UINT', 0),
+ 'last_ip' => array('VCHAR:40', ''),
+ 'last_login' => array('TIMESTAMP', 0),
+ ),
+ 'PRIMARY_KEY' => array('key_id', 'user_id'),
+ 'KEYS' => array(
+ 'last_login' => array('INDEX', 'last_login'),
+ ),
+ );
+
+ $schema_data['phpbb_sitelist'] = array(
+ 'COLUMNS' => array(
+ 'site_id' => array('UINT', NULL, 'auto_increment'),
+ 'site_ip' => array('VCHAR:40', ''),
+ 'site_hostname' => array('VCHAR', ''),
+ 'ip_exclude' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'site_id',
+ );
+
+ $schema_data['phpbb_smilies'] = array(
+ 'COLUMNS' => array(
+ 'smiley_id' => array('UINT', NULL, 'auto_increment'),
+ // We may want to set 'code' to VCHAR:50 or check if unicode support is possible... at the moment only ASCII characters are allowed.
+ 'code' => array('VCHAR_UNI:50', ''),
+ 'emotion' => array('VCHAR_UNI:50', ''),
+ 'smiley_url' => array('VCHAR:50', ''),
+ 'smiley_width' => array('USINT', 0),
+ 'smiley_height' => array('USINT', 0),
+ 'smiley_order' => array('UINT', 0),
+ 'display_on_posting'=> array('BOOL', 1),
+ ),
+ 'PRIMARY_KEY' => 'smiley_id',
+ 'KEYS' => array(
+ 'display_on_post' => array('INDEX', 'display_on_posting'),
+ ),
+ );
+
+ $schema_data['phpbb_styles'] = array(
+ 'COLUMNS' => array(
+ 'style_id' => array('UINT', NULL, 'auto_increment'),
+ 'style_name' => array('VCHAR_UNI:255', ''),
+ 'style_copyright' => array('VCHAR_UNI', ''),
+ 'style_active' => array('BOOL', 1),
+ 'template_id' => array('UINT', 0),
+ 'theme_id' => array('UINT', 0),
+ 'imageset_id' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'style_id',
+ 'KEYS' => array(
+ 'style_name' => array('UNIQUE', 'style_name'),
+ 'template_id' => array('INDEX', 'template_id'),
+ 'theme_id' => array('INDEX', 'theme_id'),
+ 'imageset_id' => array('INDEX', 'imageset_id'),
+ ),
+ );
+
+ $schema_data['phpbb_styles_template'] = array(
+ 'COLUMNS' => array(
+ 'template_id' => array('UINT', NULL, 'auto_increment'),
+ 'template_name' => array('VCHAR_UNI:255', ''),
+ 'template_copyright' => array('VCHAR_UNI', ''),
+ 'template_path' => array('VCHAR:100', ''),
+ 'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
+ 'template_storedb' => array('BOOL', 0),
+ 'template_inherits_id' => array('UINT:4', 0),
+ 'template_inherit_path' => array('VCHAR', ''),
+ ),
+ 'PRIMARY_KEY' => 'template_id',
+ 'KEYS' => array(
+ 'tmplte_nm' => array('UNIQUE', 'template_name'),
+ ),
+ );
+
+ $schema_data['phpbb_styles_template_data'] = array(
+ 'COLUMNS' => array(
+ 'template_id' => array('UINT', 0),
+ 'template_filename' => array('VCHAR:100', ''),
+ 'template_included' => array('TEXT', ''),
+ 'template_mtime' => array('TIMESTAMP', 0),
+ 'template_data' => array('MTEXT_UNI', ''),
+ ),
+ 'KEYS' => array(
+ 'tid' => array('INDEX', 'template_id'),
+ 'tfn' => array('INDEX', 'template_filename'),
+ ),
+ );
+
+ $schema_data['phpbb_styles_theme'] = array(
+ 'COLUMNS' => array(
+ 'theme_id' => array('UINT', NULL, 'auto_increment'),
+ 'theme_name' => array('VCHAR_UNI:255', ''),
+ 'theme_copyright' => array('VCHAR_UNI', ''),
+ 'theme_path' => array('VCHAR:100', ''),
+ 'theme_storedb' => array('BOOL', 0),
+ 'theme_mtime' => array('TIMESTAMP', 0),
+ 'theme_data' => array('MTEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'theme_id',
+ 'KEYS' => array(
+ 'theme_name' => array('UNIQUE', 'theme_name'),
+ ),
+ );
+
+ $schema_data['phpbb_styles_imageset'] = array(
+ 'COLUMNS' => array(
+ 'imageset_id' => array('UINT', NULL, 'auto_increment'),
+ 'imageset_name' => array('VCHAR_UNI:255', ''),
+ 'imageset_copyright' => array('VCHAR_UNI', ''),
+ 'imageset_path' => array('VCHAR:100', ''),
+ ),
+ 'PRIMARY_KEY' => 'imageset_id',
+ 'KEYS' => array(
+ 'imgset_nm' => array('UNIQUE', 'imageset_name'),
+ ),
+ );
+
+ $schema_data['phpbb_styles_imageset_data'] = array(
+ 'COLUMNS' => array(
+ 'image_id' => array('UINT', NULL, 'auto_increment'),
+ 'image_name' => array('VCHAR:200', ''),
+ 'image_filename' => array('VCHAR:200', ''),
+ 'image_lang' => array('VCHAR:30', ''),
+ 'image_height' => array('USINT', 0),
+ 'image_width' => array('USINT', 0),
+ 'imageset_id' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'image_id',
+ 'KEYS' => array(
+ 'i_d' => array('INDEX', 'imageset_id'),
+ ),
+ );
+
+ $schema_data['phpbb_topics'] = array(
+ 'COLUMNS' => array(
+ 'topic_id' => array('UINT', NULL, 'auto_increment'),
+ 'forum_id' => array('UINT', 0),
+ 'icon_id' => array('UINT', 0),
+ 'topic_attachment' => array('BOOL', 0),
+ 'topic_approved' => array('BOOL', 1),
+ 'topic_reported' => array('BOOL', 0),
+ 'topic_title' => array('STEXT_UNI', '', 'true_sort'),
+ 'topic_poster' => array('UINT', 0),
+ 'topic_time' => array('TIMESTAMP', 0),
+ 'topic_time_limit' => array('TIMESTAMP', 0),
+ 'topic_views' => array('UINT', 0),
+ 'topic_replies' => array('UINT', 0),
+ 'topic_replies_real' => array('UINT', 0),
+ 'topic_status' => array('TINT:3', 0),
+ 'topic_type' => array('TINT:3', 0),
+ 'topic_first_post_id' => array('UINT', 0),
+ 'topic_first_poster_name' => array('VCHAR_UNI', ''),
+ 'topic_first_poster_colour' => array('VCHAR:6', ''),
+ 'topic_last_post_id' => array('UINT', 0),
+ 'topic_last_poster_id' => array('UINT', 0),
+ 'topic_last_poster_name' => array('VCHAR_UNI', ''),
+ 'topic_last_poster_colour' => array('VCHAR:6', ''),
+ 'topic_last_post_subject' => array('STEXT_UNI', ''),
+ 'topic_last_post_time' => array('TIMESTAMP', 0),
+ 'topic_last_view_time' => array('TIMESTAMP', 0),
+ 'topic_moved_id' => array('UINT', 0),
+ 'topic_bumped' => array('BOOL', 0),
+ 'topic_bumper' => array('UINT', 0),
+ 'poll_title' => array('STEXT_UNI', ''),
+ 'poll_start' => array('TIMESTAMP', 0),
+ 'poll_length' => array('TIMESTAMP', 0),
+ 'poll_max_options' => array('TINT:4', 1),
+ 'poll_last_vote' => array('TIMESTAMP', 0),
+ 'poll_vote_change' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'topic_id',
+ 'KEYS' => array(
+ 'forum_id' => array('INDEX', 'forum_id'),
+ 'forum_id_type' => array('INDEX', array('forum_id', 'topic_type')),
+ 'last_post_time' => array('INDEX', 'topic_last_post_time'),
+ 'topic_approved' => array('INDEX', 'topic_approved'),
+ 'forum_appr_last' => array('INDEX', array('forum_id', 'topic_approved', 'topic_last_post_id')),
+ 'fid_time_moved' => array('INDEX', array('forum_id', 'topic_last_post_time', 'topic_moved_id')),
+ ),
+ );
+
+ $schema_data['phpbb_topics_track'] = array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'mark_time' => array('TIMESTAMP', 0),
+ ),
+ 'PRIMARY_KEY' => array('user_id', 'topic_id'),
+ 'KEYS' => array(
+ 'forum_id' => array('INDEX', 'forum_id'),
+ ),
+ );
+
+ $schema_data['phpbb_topics_posted'] = array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ 'topic_posted' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => array('user_id', 'topic_id'),
+ );
+
+ $schema_data['phpbb_topics_watch'] = array(
+ 'COLUMNS' => array(
+ 'topic_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'notify_status' => array('BOOL', 0),
+ ),
+ 'KEYS' => array(
+ 'topic_id' => array('INDEX', 'topic_id'),
+ 'user_id' => array('INDEX', 'user_id'),
+ 'notify_stat' => array('INDEX', 'notify_status'),
+ ),
+ );
+
+ $schema_data['phpbb_user_group'] = array(
+ 'COLUMNS' => array(
+ 'group_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'group_leader' => array('BOOL', 0),
+ 'user_pending' => array('BOOL', 1),
+ ),
+ 'KEYS' => array(
+ 'group_id' => array('INDEX', 'group_id'),
+ 'user_id' => array('INDEX', 'user_id'),
+ 'group_leader' => array('INDEX', 'group_leader'),
+ ),
+ );
+
+ $schema_data['phpbb_users'] = array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', NULL, 'auto_increment'),
+ 'user_type' => array('TINT:2', 0),
+ 'group_id' => array('UINT', 3),
+ 'user_permissions' => array('MTEXT', ''),
+ 'user_perm_from' => array('UINT', 0),
+ 'user_ip' => array('VCHAR:40', ''),
+ 'user_regdate' => array('TIMESTAMP', 0),
+ 'username' => array('VCHAR_CI', ''),
+ 'username_clean' => array('VCHAR_CI', ''),
+ 'user_password' => array('VCHAR_UNI:40', ''),
+ 'user_passchg' => array('TIMESTAMP', 0),
+ 'user_pass_convert' => array('BOOL', 0),
+ 'user_email' => array('VCHAR_UNI:100', ''),
+ 'user_email_hash' => array('BINT', 0),
+ 'user_birthday' => array('VCHAR:10', ''),
+ 'user_lastvisit' => array('TIMESTAMP', 0),
+ 'user_lastmark' => array('TIMESTAMP', 0),
+ 'user_lastpost_time' => array('TIMESTAMP', 0),
+ 'user_lastpage' => array('VCHAR_UNI:200', ''),
+ 'user_last_confirm_key' => array('VCHAR:10', ''),
+ 'user_last_search' => array('TIMESTAMP', 0),
+ 'user_warnings' => array('TINT:4', 0),
+ 'user_last_warning' => array('TIMESTAMP', 0),
+ 'user_login_attempts' => array('TINT:4', 0),
+ 'user_inactive_reason' => array('TINT:2', 0),
+ 'user_inactive_time' => array('TIMESTAMP', 0),
+ 'user_posts' => array('UINT', 0),
+ 'user_lang' => array('VCHAR:30', ''),
+ 'user_timezone' => array('DECIMAL', 0),
+ 'user_dst' => array('BOOL', 0),
+ 'user_dateformat' => array('VCHAR_UNI:30', 'd M Y H:i'),
+ 'user_style' => array('UINT', 0),
+ 'user_rank' => array('UINT', 0),
+ 'user_colour' => array('VCHAR:6', ''),
+ 'user_new_privmsg' => array('INT:4', 0),
+ 'user_unread_privmsg' => array('INT:4', 0),
+ 'user_last_privmsg' => array('TIMESTAMP', 0),
+ 'user_message_rules' => array('BOOL', 0),
+ 'user_full_folder' => array('INT:11', -3),
+ 'user_emailtime' => array('TIMESTAMP', 0),
+ 'user_topic_show_days' => array('USINT', 0),
+ 'user_topic_sortby_type' => array('VCHAR:1', 't'),
+ 'user_topic_sortby_dir' => array('VCHAR:1', 'd'),
+ 'user_post_show_days' => array('USINT', 0),
+ 'user_post_sortby_type' => array('VCHAR:1', 't'),
+ 'user_post_sortby_dir' => array('VCHAR:1', 'a'),
+ 'user_notify' => array('BOOL', 0),
+ 'user_notify_pm' => array('BOOL', 1),
+ 'user_notify_type' => array('TINT:4', 0),
+ 'user_allow_pm' => array('BOOL', 1),
+ 'user_allow_viewonline' => array('BOOL', 1),
+ 'user_allow_viewemail' => array('BOOL', 1),
+ 'user_allow_massemail' => array('BOOL', 1),
+ 'user_options' => array('UINT:11', 230271),
+ 'user_avatar' => array('VCHAR', ''),
+ 'user_avatar_type' => array('TINT:2', 0),
+ 'user_avatar_width' => array('USINT', 0),
+ 'user_avatar_height' => array('USINT', 0),
+ 'user_sig' => array('MTEXT_UNI', ''),
+ 'user_sig_bbcode_uid' => array('VCHAR:8', ''),
+ 'user_sig_bbcode_bitfield' => array('VCHAR:255', ''),
+ 'user_from' => array('VCHAR_UNI:100', ''),
+ 'user_icq' => array('VCHAR:15', ''),
+ 'user_aim' => array('VCHAR_UNI', ''),
+ 'user_yim' => array('VCHAR_UNI', ''),
+ 'user_msnm' => array('VCHAR_UNI', ''),
+ 'user_jabber' => array('VCHAR_UNI', ''),
+ 'user_website' => array('VCHAR_UNI:200', ''),
+ 'user_occ' => array('TEXT_UNI', ''),
+ 'user_interests' => array('TEXT_UNI', ''),
+ 'user_actkey' => array('VCHAR:32', ''),
+ 'user_newpasswd' => array('VCHAR_UNI:40', ''),
+ 'user_form_salt' => array('VCHAR_UNI:32', ''),
+ 'user_new' => array('BOOL', 1),
+ 'user_reminded' => array('TINT:4', 0),
+ 'user_reminded_time' => array('TIMESTAMP', 0),
+ ),
+ 'PRIMARY_KEY' => 'user_id',
+ 'KEYS' => array(
+ 'user_birthday' => array('INDEX', 'user_birthday'),
+ 'user_email_hash' => array('INDEX', 'user_email_hash'),
+ 'user_type' => array('INDEX', 'user_type'),
+ 'username_clean' => array('UNIQUE', 'username_clean'),
+ ),
+ );
+
+ $schema_data['phpbb_warnings'] = array(
+ 'COLUMNS' => array(
+ 'warning_id' => array('UINT', NULL, 'auto_increment'),
+ 'user_id' => array('UINT', 0),
+ 'post_id' => array('UINT', 0),
+ 'log_id' => array('UINT', 0),
+ 'warning_time' => array('TIMESTAMP', 0),
+ ),
+ 'PRIMARY_KEY' => 'warning_id',
+ );
+
+ $schema_data['phpbb_words'] = array(
+ 'COLUMNS' => array(
+ 'word_id' => array('UINT', NULL, 'auto_increment'),
+ 'word' => array('VCHAR_UNI', ''),
+ 'replacement' => array('VCHAR_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'word_id',
+ );
+
+ $schema_data['phpbb_zebra'] = array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ 'zebra_id' => array('UINT', 0),
+ 'friend' => array('BOOL', 0),
+ 'foe' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => array('user_id', 'zebra_id'),
+ );
+
+ return $schema_data;
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/nuke-db.php b/phpBB/develop/nuke-db.php
new file mode 100644
index 0000000000..d7329c3f56
--- /dev/null
+++ b/phpBB/develop/nuke-db.php
@@ -0,0 +1,58 @@
+<?php
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+//
+// Do not change anything below this line.
+//
+
+
+// Just a handy script to completely wipe out the contents of a
+// database.. Use with caution :)
+
+
+if(!isset($submit))
+{
+ ?>
+ <FORM ACTION="<?php echo $PHP_SELF?>" METHOD="post" >
+ <table>
+ <tr>
+ <td>DB host:</td>
+ <td><INPUT TYPE="text" name="dbhost" value="localhost"></td>
+ </tr><tr>
+ <td>DB name:</td>
+ <td><INPUT TYPE="text" name="dbname" value="phpBB"></td>
+ </tr><tr>
+ <td>DB username:</td>
+ <td><INPUT TYPE="text" name="dbuser" value="root"></td>
+ </tr><tr>
+ <td>DB password:</td>
+ <td><INPUT TYPE="password" name="dbpass"></td>
+ </tr></table>
+ <INPUT TYPE="submit" name="submit" value="Submit">
+ </FORM>
+ <?php
+}
+else
+{
+ mysql_connect($dbhost, $dbuser, $dbpass) || die(mysql_error());
+ mysql_select_db($dbname);
+
+ $result = mysql_query("SHOW TABLES");
+ while($row = mysql_fetch_row($result)){
+ $table = $row[0];
+ print "Going to drop $table...";
+ mysql_query("DROP TABLE $table") || die();
+ print "Done.<br>\n";
+ flush();
+ }
+}
+?>
+
diff --git a/phpBB/develop/regex.php b/phpBB/develop/regex.php
new file mode 100644
index 0000000000..4498204b4a
--- /dev/null
+++ b/phpBB/develop/regex.php
@@ -0,0 +1,83 @@
+<?php
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+
+// IP regular expressions
+
+$dec_octet = '(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])';
+$h16 = '[\dA-F]{1,4}';
+$ipv4 = "(?:$dec_octet\.){3}$dec_octet";
+$ls32 = "(?:$h16:$h16|$ipv4)";
+
+$ipv6_construct = array(
+ array(false, '', '{6}', $ls32),
+ array(false, '::', '{5}', $ls32),
+ array('', ':', '{4}', $ls32),
+ array('{1,2}', ':', '{3}', $ls32),
+ array('{1,3}', ':', '{2}', $ls32),
+ array('{1,4}', ':', '', $ls32),
+ array('{1,5}', ':', false, $ls32),
+ array('{1,6}', ':', false, $h16),
+ array('{1,7}', ':', false, '')
+);
+
+$ipv6 = '(?:';
+foreach ($ipv6_construct as $ip_type)
+{
+ $ipv6 .= '(?:';
+ if ($ip_type[0] !== false)
+ {
+ $ipv6 .= "(?:$h16:)" . $ip_type[0];
+ }
+ $ipv6 .= $ip_type[1];
+ if ($ip_type[2] !== false)
+ {
+ $ipv6 .= "(?:$h16:)" . $ip_type[2];
+ }
+ $ipv6 .= $ip_type[3] . ')|';
+}
+$ipv6 = substr($ipv6, 0, -1) . ')';
+
+echo 'IPv4: ' . $ipv4 . "<br />\nIPv6: " . $ipv6 . "<br />\n";
+
+// URL regular expressions
+
+$pct_encoded = "%[\dA-F]{2}";
+$unreserved = 'a-z0-9\-._~';
+$sub_delims = '!$&\'()*+,;=';
+$pchar = "(?:[$unreserved$sub_delims:@|]+|$pct_encoded)"; // rfc: no "|"
+
+$scheme = '[a-z][a-z\d+\-.]*';
+$reg_name = "(?:[$unreserved$sub_delims:@|]+|$pct_encoded)+"; // rfc: * instead of + and no "|" and no "@" and no ":" (included instead of userinfo)
+//$userinfo = "(?:(?:[$unreserved$sub_delims:]+|$pct_encoded))*";
+$ipv4_simple = '[0-9.]+';
+$ipv6_simple = '\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\]';
+$host = "(?:$reg_name|$ipv4_simple|$ipv6_simple)";
+$port = '\d*';
+//$authority = "(?:$userinfo@)?$host(?::$port)?";
+$authority = "$host(?::$port)?";
+$segment = "$pchar*";
+$path_abempty = "(?:/$segment)*";
+$hier_part = "/{2}$authority$path_abempty";
+$query = "(?:[$unreserved$sub_delims:@/?|]+|$pct_encoded)*"; // pchar | "/" | "?", rfc: no "|"
+$fragment = $query;
+
+$url = "$scheme:$hier_part(?:\?$query)?(?:\#$fragment)?";
+echo 'URL: ' . $url . "<br />\n";
+
+// no scheme, shortened authority, but host has to start with www.
+$www_url = "www\.$reg_name(?::$port)?$path_abempty(?:\?$query)?(?:\#$fragment)?";
+echo 'www.URL: ' . $www_url . "<br />\n";
+
+// no schema and no authority
+$relative_url = "$segment$path_abempty(?:\?$query)?(?:\#$fragment)?";
+echo 'relative URL: ' . $relative_url . "<br />\n";
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/repair_bots.php b/phpBB/develop/repair_bots.php
new file mode 100644
index 0000000000..c5aaa75d9b
--- /dev/null
+++ b/phpBB/develop/repair_bots.php
@@ -0,0 +1,151 @@
+<?php
+/**
+* Rebuild BOTS
+*
+* You should make a backup from your whole database. Things can and will go wrong.
+* This will only work if no BOTs were added.
+*
+*/
+die("Please read the first lines of this script for instructions on how to enable it");
+
+set_time_limit(0);
+
+define('IN_PHPBB', true);
+$phpbb_root_path = './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.'.$phpEx);
+include($phpbb_root_path . '/includes/functions_user.'.$phpEx);
+
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup();
+
+$bots = array(
+ 'AdsBot [Google]' => array('AdsBot-Google', ''),
+ 'Alexa [Bot]' => array('ia_archiver', ''),
+ 'Alta Vista [Bot]' => array('Scooter/', ''),
+ 'Ask Jeeves [Bot]' => array('Ask Jeeves', ''),
+ 'Baidu [Spider]' => array('Baiduspider+(', ''),
+ 'Exabot [Bot]' => array('Exabot/', ''),
+ 'FAST Enterprise [Crawler]' => array('FAST Enterprise Crawler', ''),
+ 'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''),
+ 'Francis [Bot]' => array('http://www.neomo.de/', ''),
+ 'Gigabot [Bot]' => array('Gigabot/', ''),
+ 'Google Adsense [Bot]' => array('Mediapartners-Google', ''),
+ 'Google Desktop' => array('Google Desktop', ''),
+ 'Google Feedfetcher' => array('Feedfetcher-Google', ''),
+ 'Google [Bot]' => array('Googlebot', ''),
+ 'Heise IT-Markt [Crawler]' => array('heise-IT-Markt-Crawler', ''),
+ 'Heritrix [Crawler]' => array('heritrix/1.', ''),
+ 'IBM Research [Bot]' => array('ibm.com/cs/crawler', ''),
+ 'ICCrawler - ICjobs' => array('ICCrawler - ICjobs', ''),
+ 'ichiro [Crawler]' => array('ichiro/2', ''),
+ 'Majestic-12 [Bot]' => array('MJ12bot/', ''),
+ 'Metager [Bot]' => array('MetagerBot/', ''),
+ 'MSN NewsBlogs' => array('msnbot-NewsBlogs/', ''),
+ 'MSN [Bot]' => array('msnbot/', ''),
+ 'MSNbot Media' => array('msnbot-media/', ''),
+ 'NG-Search [Bot]' => array('NG-Search/', ''),
+ 'Nutch [Bot]' => array('http://lucene.apache.org/nutch/', ''),
+ 'Nutch/CVS [Bot]' => array('NutchCVS/', ''),
+ 'OmniExplorer [Bot]' => array('OmniExplorer_Bot/', ''),
+ 'Online link [Validator]' => array('online link validator', ''),
+ 'psbot [Picsearch]' => array('psbot/0', ''),
+ 'Seekport [Bot]' => array('Seekbot/', ''),
+ 'Sensis [Crawler]' => array('Sensis Web Crawler', ''),
+ 'SEO Crawler' => array('SEO search Crawler/', ''),
+ 'Seoma [Crawler]' => array('Seoma [SEO Crawler]', ''),
+ 'SEOSearch [Crawler]' => array('SEOsearch/', ''),
+ 'Snappy [Bot]' => array('Snappy/1.1 ( http://www.urltrends.com/ )', ''),
+ 'Steeler [Crawler]' => array('http://www.tkl.iis.u-tokyo.ac.jp/~crawler/', ''),
+ 'Synoo [Bot]' => array('SynooBot/', ''),
+ 'Telekom [Bot]' => array('crawleradmin.t-info@telekom.de', ''),
+ 'TurnitinBot [Bot]' => array('TurnitinBot/', ''),
+ 'Voyager [Bot]' => array('voyager/1.0', ''),
+ 'W3 [Sitesearch]' => array('W3 SiteSearch Crawler', ''),
+ 'W3C [Linkcheck]' => array('W3C-checklink/', ''),
+ 'W3C [Validator]' => array('W3C_*Validator', ''),
+ 'WiseNut [Bot]' => array('http://www.WISEnutbot.com', ''),
+ 'YaCy [Bot]' => array('yacybot', ''),
+ 'Yahoo MMCrawler [Bot]' => array('Yahoo-MMCrawler/', ''),
+ 'Yahoo Slurp [Bot]' => array('Yahoo! DE Slurp', ''),
+ 'Yahoo [Bot]' => array('Yahoo! Slurp', ''),
+ 'YahooSeeker [Bot]' => array('YahooSeeker/', ''),
+);
+
+$bot_ids = array();
+user_get_id_name($bot_ids, array_keys($bots), USER_IGNORE);
+foreach($bot_ids as $bot)
+{
+ user_delete('remove', $bot);
+}
+// Done
+add_bots($bots);
+echo 'done';
+
+
+/**
+* Add the search bots into the database
+* This code should be used in execute_last if the source database did not have bots
+* If you are converting bots this function should not be called
+* @todo We might want to look at sharing the bot list between the install code and this code for consistency
+*/
+function add_bots($bots)
+{
+ global $db, $config;
+
+ $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
+ $result = $db->sql_query($sql);
+ $group_id = (int) $db->sql_fetchfield('group_id', false, $result);
+ $db->sql_freeresult($result);
+ $db->sql_query('TRUNCATE TABLE ' . BOTS_TABLE);
+
+ if (!$group_id)
+ {
+ add_default_groups();
+
+ $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
+ $result = $db->sql_query($sql);
+ $group_id = (int) $db->sql_fetchfield('group_id', false, $result);
+ $db->sql_freeresult($result);
+
+ }
+
+
+
+
+ foreach ($bots as $bot_name => $bot_ary)
+ {
+ $user_row = array(
+ 'user_type' => USER_IGNORE,
+ 'group_id' => $group_id,
+ 'username' => $bot_name,
+ 'user_regdate' => time(),
+ 'user_password' => '',
+ 'user_colour' => '9E8DA7',
+ 'user_email' => '',
+ 'user_lang' => $config['default_lang'],
+ 'user_style' => 1,
+ 'user_timezone' => 0,
+ 'user_allow_massemail' => 0,
+ );
+
+ $user_id = user_add($user_row);
+
+ if ($user_id)
+ {
+ $sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'bot_active' => 1,
+ 'bot_name' => $bot_name,
+ 'user_id' => $user_id,
+ 'bot_agent' => $bot_ary[0],
+ 'bot_ip' => $bot_ary[1])
+ );
+ $db->sql_query($sql);
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/search_fill.php b/phpBB/develop/search_fill.php
new file mode 100644
index 0000000000..371c8c74cc
--- /dev/null
+++ b/phpBB/develop/search_fill.php
@@ -0,0 +1,129 @@
+<?php
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+//
+// Do not change anything below this line.
+//
+set_time_limit(0);
+
+define('IN_PHPBB', true);
+$phpbb_root_path = '../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.'.$phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup();
+
+$search_type = $config['search_type'];
+
+if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
+{
+ trigger_error('NO_SUCH_SEARCH_MODULE');
+}
+
+require($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx);
+
+$error = false;
+$search = new $search_type($error);
+
+if ($error)
+{
+ trigger_error($error);
+}
+
+print "<html>\n<body>\n";
+
+//
+// Fetch a batch of posts_text entries
+//
+$sql = "SELECT COUNT(*) as total, MAX(post_id) as max_post_id
+ FROM ". POSTS_TABLE;
+if ( !($result = $db->sql_query($sql)) )
+{
+ $error = $db->sql_error();
+ die("Couldn't get maximum post ID :: " . $sql . " :: " . $error['message']);
+}
+
+$max_post_id = $db->sql_fetchrow($result);
+
+$totalposts = $max_post_id['total'];
+$max_post_id = $max_post_id['max_post_id'];
+
+$postcounter = (!isset($HTTP_GET_VARS['batchstart'])) ? 0 : $HTTP_GET_VARS['batchstart'];
+
+$batchsize = 200; // Process this many posts per loop
+$batchcount = 0;
+for(;$postcounter <= $max_post_id; $postcounter += $batchsize)
+{
+ $batchstart = $postcounter + 1;
+ $batchend = $postcounter + $batchsize;
+ $batchcount++;
+
+ $sql = "SELECT *
+ FROM " . POSTS_TABLE . "
+ WHERE post_id
+ BETWEEN $batchstart
+ AND $batchend";
+ if( !($result = $db->sql_query($sql)) )
+ {
+ $error = $db->sql_error();
+ die("Couldn't get post_text :: " . $sql . " :: " . $error['message']);
+ }
+
+ $rowset = $db->sql_fetchrowset($result);
+ $db->sql_freeresult($result);
+
+ $post_rows = sizeof($rowset);
+
+ if( $post_rows )
+ {
+
+ // $sql = "LOCK TABLES ".POST_TEXT_TABLE." WRITE";
+ // $result = $db->sql_query($sql);
+ print "\n<p>\n<a href='{$_SERVER['PHP_SELF']}?batchstart=$batchstart'>Restart from posting $batchstart</a><br>\n";
+
+ // For every post in the batch:
+ for($post_nr = 0; $post_nr < $post_rows; $post_nr++ )
+ {
+ print ".";
+ flush();
+
+ $post_id = $rowset[$post_nr]['post_id'];
+
+ $search->index('post', $rowset[$post_nr]['post_id'], $rowset[$post_nr]['post_text'], $rowset[$post_nr]['post_subject'], $rowset[$post_nr]['poster_id']);
+ }
+ // $sql = "UNLOCK TABLES";
+ // $result = $db->sql_query($sql);
+
+ }
+}
+
+print "<br>Removing common words (words that appear in more than 50% of the posts)<br>\n";
+flush();
+$search->tidy();
+print "Removed words that where too common.<br>";
+
+echo "<br>Done";
+
+?>
+
+</body>
+</html>
diff --git a/phpBB/develop/unicode_testing.php b/phpBB/develop/unicode_testing.php
new file mode 100644
index 0000000000..25a13d1325
--- /dev/null
+++ b/phpBB/develop/unicode_testing.php
@@ -0,0 +1,120 @@
+<?php
+//
+// This file provides some useful functions for debugging the unicode/UTF-8 library
+// It requires utf_tools.php to be loaded
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+if (!headers_sent())
+{
+ header('Content-type: text/html; charset=UTF-8');
+}
+
+/**
+ * Converts unicode escape sequences (\u0123) into UTF-8 characters
+ *
+ * @param string A unicode sequence
+ * @return string UTF-8 representation of the given unicode sequence
+ */
+function unicode_to_utf8($string)
+{
+ $utf8 = '';
+ $chars = array();
+ for ($i = 0; $i < strlen($string); $i++)
+ {
+ if (isset($string[$i + 5]) && substr($string, $i, 2) == '\\u' && ctype_xdigit(substr($string, $i + 2, 4)))
+ {
+ $utf8 .= utf8_from_unicode(array(base_convert(substr($string, $i + 2, 4), 16, 10)));
+ $i += 5;
+ }
+ else
+ {
+ $utf8 .= $string[$i];
+ }
+ }
+ return $utf8;
+}
+
+/**
+ * Takes an array of ints representing the Unicode characters and returns
+ * a UTF-8 string.
+ *
+ * @param array $array array of unicode code points representing a string
+ * @return string UTF-8 character string
+ */
+function utf8_from_unicode($array)
+{
+ $str = '';
+ foreach ($array as $value)
+ {
+ $str .= utf8_chr($value);
+ }
+ return $str;
+}
+
+/**
+* Converts a UTF-8 string to unicode code points
+*
+* @param string $text UTF-8 string
+* @return string Unicode code points
+*/
+function utf8_to_unicode($text)
+{
+ return preg_replace_callback(
+ '#[\\xC2-\\xF4][\\x80-\\xBF]?[\\x80-\\xBF]?[\\x80-\\xBF]#',
+ 'utf8_to_unicode_callback',
+ preg_replace_callback(
+ '#[\\x00-\\x7f]#',
+ 'utf8_to_unicode_callback',
+ $text
+ )
+ );
+}
+
+/**
+* Takes a UTF-8 char and replaces it with its unicode escape sequence. Attention, $m is an array
+*
+* @param array $m 0-based numerically indexed array passed by preg_replace_callback()
+* @return string A unicode escape sequence
+*/
+function utf8_to_unicode_callback($m)
+{
+ return '\u' . str_pad(base_convert(utf8_ord($m[0]), 10, 16), 4, '0', STR_PAD_LEFT) . '';
+}
+
+/**
+* A wrapper function for the normalizer which takes care of including the class if required and modifies the passed strings
+* to be in NFKC
+*
+* @param mixed $strings a string or an array of strings to normalize
+* @return mixed the normalized content, preserving array keys if array given.
+*/
+function utf8_normalize_nfkc($strings)
+{
+ if (empty($strings))
+ {
+ return $strings;
+ }
+
+ if (!class_exists('utf_normalizer'))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
+ }
+
+ if (!is_array($strings))
+ {
+ utf_normalizer::nfkc($strings);
+ }
+ else if (is_array($strings))
+ {
+ foreach ($strings as $key => $string)
+ {
+ utf_normalizer::nfkc($strings[$key]);
+ }
+ }
+
+ return $strings;
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/develop/update_email_hash.php b/phpBB/develop/update_email_hash.php
new file mode 100644
index 0000000000..80fd4bbc17
--- /dev/null
+++ b/phpBB/develop/update_email_hash.php
@@ -0,0 +1,57 @@
+<?php
+/**
+* Corrects user_email_hash values if DB moved from 32-bit system to 64-bit system or vice versa.
+* The CRC32 function in PHP generates different results for both systems.
+* @PHP dev team: no, a hexdec() applied to it does not solve the issue. And please document it.
+*
+*/
+die("Please read the first lines of this script for instructions on how to enable it");
+
+set_time_limit(0);
+
+define('IN_PHPBB', true);
+$phpbb_root_path = './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup();
+
+$start = request_var('start', 0);
+$num_items = 1000;
+
+echo '<br />Updating user email hashes' . "\n";
+
+$sql = 'SELECT user_id, user_email
+ FROM ' . USERS_TABLE . '
+ ORDER BY user_id ASC';
+$result = $db->sql_query($sql);
+
+$echos = 0;
+while ($row = $db->sql_fetchrow($result))
+{
+ $echos++;
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_email_hash = '" . $db->sql_escape(phpbb_email_hash($row['user_email'])) . "'
+ WHERE user_id = " . (int) $row['user_id'];
+ $db->sql_query($sql);
+
+ if ($echos == 200)
+ {
+ echo '<br />';
+ $echos = 0;
+ }
+
+ echo '.';
+ flush();
+}
+$db->sql_freeresult($result);
+
+echo 'FINISHED';
+
+// Done
+$db->sql_close();
+?> \ No newline at end of file
diff --git a/phpBB/develop/utf_normalizer_test.php b/phpBB/develop/utf_normalizer_test.php
new file mode 100644
index 0000000000..7705cd6851
--- /dev/null
+++ b/phpBB/develop/utf_normalizer_test.php
@@ -0,0 +1,391 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+if (php_sapi_name() != 'cli')
+{
+ die("This program must be run from the command line.\n");
+}
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+set_time_limit(0);
+error_reporting(E_ALL);
+
+define('IN_PHPBB', true);
+$phpbb_root_path = '../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+
+
+/**
+* Let's download some files we need
+*/
+download('http://www.unicode.org/Public/UNIDATA/NormalizationTest.txt');
+download('http://www.unicode.org/Public/UNIDATA/UnicodeData.txt');
+
+/**
+* Those are the tests we run
+*/
+$test_suite = array(
+ /**
+ * NFC
+ * c2 == NFC(c1) == NFC(c2) == NFC(c3)
+ * c4 == NFC(c4) == NFC(c5)
+ */
+ 'NFC' => array(
+ 'c2' => array('c1', 'c2', 'c3'),
+ 'c4' => array('c4', 'c5')
+ ),
+
+ /**
+ * NFD
+ * c3 == NFD(c1) == NFD(c2) == NFD(c3)
+ * c5 == NFD(c4) == NFD(c5)
+ */
+ 'NFD' => array(
+ 'c3' => array('c1', 'c2', 'c3'),
+ 'c5' => array('c4', 'c5')
+ ),
+
+ /**
+ * NFKC
+ * c4 == NFKC(c1) == NFKC(c2) == NFKC(c3) == NFKC(c4) == NFKC(c5)
+ */
+ 'NFKC' => array(
+ 'c4' => array('c1', 'c2', 'c3', 'c4', 'c5')
+ ),
+
+ /**
+ * NFKD
+ * c5 == NFKD(c1) == NFKD(c2) == NFKD(c3) == NFKD(c4) == NFKD(c5)
+ */
+ 'NFKD' => array(
+ 'c5' => array('c1', 'c2', 'c3', 'c4', 'c5')
+ )
+);
+
+require_once($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
+
+$i = $n = 0;
+$failed = false;
+$tested_chars = array();
+
+$fp = fopen($phpbb_root_path . 'develop/NormalizationTest.txt', 'rb');
+while (!feof($fp))
+{
+ $line = fgets($fp);
+ ++$n;
+
+ if ($line[0] == '@')
+ {
+ if ($i)
+ {
+ echo "done\n";
+ }
+
+ $i = 0;
+ echo "\n", substr($line, 1), "\n\n";
+ continue;
+ }
+
+ if (!strpos(' 0123456789ABCDEF', $line[0]))
+ {
+ continue;
+ }
+
+ if (++$i % 100 == 0)
+ {
+ echo $i, ' ';
+ }
+
+ list($c1, $c2, $c3, $c4, $c5) = explode(';', $line);
+
+ if (!strpos($c1, ' '))
+ {
+ /**
+ * We are currently testing a single character, we add it to the list of
+ * characters we have processed so that we can exclude it when testing
+ * for invariants
+ */
+ $tested_chars[$c1] = 1;
+ }
+
+ foreach ($test_suite as $form => $serie)
+ {
+ foreach ($serie as $expected => $tests)
+ {
+ $hex_expected = ${$expected};
+ $utf_expected = hexseq_to_utf($hex_expected);
+
+ foreach ($tests as $test)
+ {
+ $utf_result = $utf_expected;
+ call_user_func(array('utf_normalizer', $form), $utf_result);
+
+ if (strcmp($utf_expected, $utf_result))
+ {
+ $failed = true;
+ $hex_result = utf_to_hexseq($utf_result);
+
+ echo "\nFAILED $expected == $form($test) ($hex_expected != $hex_result)";
+ }
+ }
+ }
+
+ if ($failed)
+ {
+ die("\n\nFailed at line $n\n");
+ }
+ }
+}
+fclose($fp);
+
+/**
+* Test for invariants
+*/
+echo "\n\nTesting for invariants...\n\n";
+
+$fp = fopen($phpbb_root_path . 'develop/UnicodeData.txt', 'rt');
+
+$n = 0;
+while (!feof($fp))
+{
+ if (++$n % 100 == 0)
+ {
+ echo $n, ' ';
+ }
+
+ $line = fgets($fp, 1024);
+
+ if (!$pos = strpos($line, ';'))
+ {
+ continue;
+ }
+
+ $hex_tested = $hex_expected = substr($line, 0, $pos);
+
+ if (isset($tested_chars[$hex_tested]))
+ {
+ continue;
+ }
+
+ $utf_expected = hex_to_utf($hex_expected);
+
+ if ($utf_expected >= UTF8_SURROGATE_FIRST
+ && $utf_expected <= UTF8_SURROGATE_LAST)
+ {
+ /**
+ * Surrogates are illegal on their own, we expect the normalizer
+ * to return a replacement char
+ */
+ $utf_expected = UTF8_REPLACEMENT;
+ $hex_expected = utf_to_hexseq($utf_expected);
+ }
+
+ foreach (array('nfc', 'nfkc', 'nfd', 'nfkd') as $form)
+ {
+ $utf_result = $utf_expected;
+ utf_normalizer::$form($utf_result);
+ $hex_result = utf_to_hexseq($utf_result);
+// echo "$form($utf_expected) == $utf_result\n";
+
+ if (strcmp($utf_expected, $utf_result))
+ {
+ $failed = 1;
+
+ echo "\nFAILED $hex_expected == $form($hex_tested) ($hex_expected != $hex_result)";
+ }
+ }
+
+ if ($failed)
+ {
+ die("\n\nFailed at line $n\n");
+ }
+}
+fclose($fp);
+
+die("\n\nALL TESTS PASSED SUCCESSFULLY\n");
+
+/**
+* Download a file to the develop/ dir
+*
+* @param string $url URL of the file to download
+* @return void
+*/
+function download($url)
+{
+ global $phpbb_root_path;
+
+ if (file_exists($phpbb_root_path . 'develop/' . basename($url)))
+ {
+ return;
+ }
+
+ echo 'Downloading from ', $url, ' ';
+
+ if (!$fpr = fopen($url, 'rb'))
+ {
+ die("Can't download from $url\nPlease download it yourself and put it in the develop/ dir, kthxbai");
+ }
+
+ if (!$fpw = fopen($phpbb_root_path . 'develop/' . basename($url), 'wb'))
+ {
+ die("Can't open develop/" . basename($url) . " for output... please check your permissions or something");
+ }
+
+ $i = 0;
+ $chunk = 32768;
+ $done = '';
+
+ while (!feof($fpr))
+ {
+ $i += fwrite($fpw, fread($fpr, $chunk));
+ echo str_repeat("\x08", strlen($done));
+
+ $done = ($i >> 10) . ' KiB';
+ echo $done;
+ }
+ fclose($fpr);
+ fclose($fpw);
+
+ echo "\n";
+}
+
+/**
+* Convert a UTF string to a sequence of codepoints in hexadecimal
+*
+* @param string $utf UTF string
+* @return integer Unicode codepoints in hex
+*/
+function utf_to_hexseq($str)
+{
+ $pos = 0;
+ $len = strlen($str);
+ $ret = array();
+
+ while ($pos < $len)
+ {
+ $c = $str[$pos];
+ switch ($c & "\xF0")
+ {
+ case "\xC0":
+ case "\xD0":
+ $utf_char = substr($str, $pos, 2);
+ $pos += 2;
+ break;
+
+ case "\xE0":
+ $utf_char = substr($str, $pos, 3);
+ $pos += 3;
+ break;
+
+ case "\xF0":
+ $utf_char = substr($str, $pos, 4);
+ $pos += 4;
+ break;
+
+ default:
+ $utf_char = $c;
+ ++$pos;
+ }
+
+ $hex = dechex(utf_to_cp($utf_char));
+
+ if (!isset($hex[3]))
+ {
+ $hex = substr('000' . $hex, -4);
+ }
+
+ $ret[] = $hex;
+ }
+
+ return strtr(implode(' ', $ret), 'abcdef', 'ABCDEF');
+}
+
+/**
+* Convert a UTF-8 char to its codepoint
+*
+* @param string $utf_char UTF-8 char
+* @return integer Unicode codepoint
+*/
+function utf_to_cp($utf_char)
+{
+ switch (strlen($utf_char))
+ {
+ case 1:
+ return ord($utf_char);
+
+ case 2:
+ return ((ord($utf_char[0]) & 0x1F) << 6) | (ord($utf_char[1]) & 0x3F);
+
+ case 3:
+ return ((ord($utf_char[0]) & 0x0F) << 12) | ((ord($utf_char[1]) & 0x3F) << 6) | (ord($utf_char[2]) & 0x3F);
+
+ case 4:
+ return ((ord($utf_char[0]) & 0x07) << 18) | ((ord($utf_char[1]) & 0x3F) << 12) | ((ord($utf_char[2]) & 0x3F) << 6) | (ord($utf_char[3]) & 0x3F);
+
+ default:
+ die('UTF-8 chars can only be 1-4 bytes long');
+ }
+}
+
+/**
+* Return a UTF string formed from a sequence of codepoints in hexadecimal
+*
+* @param string $seq Sequence of codepoints, separated with a space
+* @return string UTF-8 string
+*/
+function hexseq_to_utf($seq)
+{
+ return implode('', array_map('hex_to_utf', explode(' ', $seq)));
+}
+
+/**
+* Convert a codepoint in hexadecimal to a UTF-8 char
+*
+* @param string $hex Codepoint, in hexadecimal
+* @return string UTF-8 char
+*/
+function hex_to_utf($hex)
+{
+ return cp_to_utf(hexdec($hex));
+}
+
+/**
+* Convert a codepoint to a UTF-8 char
+*
+* @param integer $cp Unicode codepoint
+* @return string UTF-8 string
+*/
+function cp_to_utf($cp)
+{
+ if ($cp > 0xFFFF)
+ {
+ return chr(0xF0 | ($cp >> 18)) . chr(0x80 | (($cp >> 12) & 0x3F)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else if ($cp > 0x7FF)
+ {
+ return chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else if ($cp > 0x7F)
+ {
+ return chr(0xC0 | ($cp >> 6)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else
+ {
+ return chr($cp);
+ }
+} \ No newline at end of file
diff --git a/phpBB/docs/AUTHORS b/phpBB/docs/AUTHORS
new file mode 100644
index 0000000000..63540ea8a0
--- /dev/null
+++ b/phpBB/docs/AUTHORS
@@ -0,0 +1,76 @@
+/**
+*
+* phpBB3 © Copyright 2000, 2002, 2005, 2007 phpBB Group
+* http://www.phpbb.com
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, version 2 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>.
+*
+*/
+
+Please see: http://www.phpbb.com/about/team/ for a list of all the people currently
+involved in phpBB.
+
+phpBB Lead Developer : Acyd Burn (Meik Sievertsen)
+
+phpBB Developers : APTX (Marek A. R.)
+ bantu (Andreas Fischer)
+ DavidMJ (David M.)
+ dhn (Dominik Dröscher)
+ kellanved (Henry Sudhof)
+ naderman (Nils Adermann)
+ Terrafrost (Jim Wigginton)
+ ToonArmy (Chris Smith)
+
+Contributions by : leviatan21 (Gabriel Vazquez)
+ nickvergessen (Joas Schilling)
+ Raimon (Raimon Meuldijk)
+ rxu (Ruslan Uzdenov)
+ Xore (Robert Hetzler)
+
+
+-- Previous Contributors --
+
+phpBB Project Manager : theFinn (James Atkinson) [Founder - 04/2007]
+ SHS` (Jonathan Stanley)
+
+phpBB Lead Developer : psoTFX (Paul S. Owen) [2001 - 09/2005]
+
+phpBB Developers : Ashe (Ludovic Arnaud) [10/2002 - 11/2003, 06/2006 - 10/2006]
+ BartVB (Bart van Bragt) [11/2000 - 03/2006]
+ GrahamJE (Graham Eames) [09/2005 - 11/2006]
+ Vic D'Elfant (Vic D'Elfant) [04/2007 - 04/2009]
+
+-- Copyrights --
+
+Visual Confirmation : Xore (Robert Hetzler)
+
+Original subSilver by subBlue Design, Tom Beddard, (c) 2001 phpBB Group
+prosilver by subBlue Design, Tom Beddard, (c) 2004 phpBB Group
+subsilver2 by subBlue Design, Tom Beddard, (c) 2004 phpBB Group
+
+phpBB3 contains code from the following applications:
+
+LGPL licenced:
+Smarty (c) 2001, 2002 by ispi of Lincoln, Inc, http://smarty.php.net/
+
+GPL licenced:
+phpMyAdmin (c) 2001,2003 phpMyAdmin Devel team, http://www.phpmyadmin.net/
+Jabber Class (c) 2006 Flyspray.org, http://www.flyspray.org/
+Chora (c) 2000-2006, The Horde Project. http://horde.org/chora/
+Horde Project (c) 2000-2006, The Horde Project. http://horde.org/
+
+PHP License, version 3.0:
+Pear (c) 2001-2004 PHP Group, http://pear.php.net
+
+Text_Diff-0.2.1 http://pear.php.net/package/Text_Diff
+
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
new file mode 100644
index 0000000000..756754ddeb
--- /dev/null
+++ b/phpBB/docs/CHANGELOG.html
@@ -0,0 +1,1126 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="content-language" content="en" />
+<meta http-equiv="imagetoolbar" content="no" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<meta name="copyright" content="2007 phpBB Group" />
+<meta name="keywords" content="" />
+<meta name="description" content="phpBB 3.0.x Changelog" />
+<title>phpBB3 &bull; Changelog</title>
+
+<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
+
+</head>
+
+<body id="phpbb" class="section-docs">
+
+<div id="wrap">
+ <a id="top" name="top" accesskey="t"></a>
+ <div id="page-header">
+ <div class="headerbar">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div id="doc-description">
+ <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
+ <h1>phpBB 3.0.x Changelog</h1>
+ <p style="display: none;"><a href="#start_here">Skip</a></p>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ </div>
+
+ <a name="start_here"></a>
+
+ <div id="page-body">
+
+<!-- BEGIN DOCUMENT -->
+
+<p>This is a non-exhaustive (but still near complete) changelog for phpBB 3.0.x including release candidate versions. Our thanks to all those people who've contributed bug reports and code fixes.</p>
+
+<h1>Changelog</h1>
+
+ <div class="paragraph menu">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<ol>
+ <li><a href="#changelog">Changelog</a>
+ <ol style="list-style-type: lower-roman;">
+ <li><a href="#v305">Changes since 3.0.5</a></li>
+ <li><a href="#v304">Changes since 3.0.4</a></li>
+ <li><a href="#v303">Changes since 3.0.3</a></li>
+ <li><a href="#v302">Changes since 3.0.2</a></li>
+ <li><a href="#v301">Changes since 3.0.1</a></li>
+ <li><a href="#v300">Changes since 3.0.0</a></li>
+ <li><a href="#v30rc8">Changes since RC-8</a></li>
+ <li><a href="#v30rc7">Changes since RC-7</a></li>
+ <li><a href="#v30rc6">Changes since RC-6</a></li>
+ <li><a href="#v30rc5">Changes since RC-5</a></li>
+ <li><a href="#v30rc4">Changes since RC-4</a></li>
+ <li><a href="#v30rc3">Changes since RC-3</a></li>
+ <li><a href="#v30rc2">Changes since RC-2</a></li>
+ <li><a href="#v30rc1">Changes since RC-1</a></li>
+ </ol>
+ </li>
+ <li><a href="#disclaimer">Copyright and disclaimer</a></li>
+</ol>
+
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+ <a name="changelog"></a><h2>1. Changelog</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+ <a name="v305"></a><h3>1.i. Changes since 3.0.5</h3>
+
+ <ul>
+ <li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li>
+ <li>[Fix] Sorting by author or subject on viewtopic now preserves the order. (Bug #44875)</li>
+ <li>[Fix] Correctly determine writable status of files on Windows operating system. (Bug #39035)</li>
+ <li>[Fix] Show report button in prosilver for guests who are allowed to report posts. (Bug #45695 - Patch by bantu)</li>
+ <li>[Fix] Correctly show private message history (Bug #46065 - Patch by bantu)</li>
+ <li>[Fix] Various XHTML mistakes in prosilver, subsilver2 and the ACP. (Bugs #25545 - Patch by bantu, #26315, #38555, #45505 - Patch by Raimon, #45785, #45865, #47085 - Patch by Raimon)</li>
+ <li>[Fix] Fix some ACP style issues (Bug #16109 - Patch by prototech)</li>
+ <li>[Fix] Move post bump information markup to the template. (Bug #34295 - Patch by bantu)</li>
+ <li>[Fix] Show error in the ACP when template folder is not readable. (Bug #45705 - Patch by bantu)</li>
+ <li>[Fix] Adjust viewonline filename regular expression to be less strict. (Bug #46215 - Patch by bantu)</li>
+ <li>[Fix] Correctly apply the can change vote permission again. Regression introduced in r9470. (Bug #45895)</li>
+ <li>[Fix] Also remove data from friend/foe table when deleting user. (Bug #45345 - Patch by nickvergessen)</li>
+ <li>[Fix] Correctly hide skiplink in prosilver right-to-left mode. (Bug #45765 - Patch by prototech and bantu)</li>
+ <li>[Fix] Fix dynamic config update routine error if firebird is used (Bug #46315)</li>
+ <li>[Fix] Allow friends/foes to be added and removed at the same time. (Bug #46255 - Patch by bantu)</li>
+ <li>[Fix] Only change topic/post icon if icons are enabled and user is allowed to. (Bug #46355 - Patch by bantu)</li>
+ <li>[Fix] Fix saving custom profile fields in ACP if Oracle is used. (Bug #46015)</li>
+ <li>[Fix] Make view_log() more resilient to corrupt serialized data. (Bug #46545)</li>
+ <li>[Fix] Show error if hostname lookup doesn't return a valid IP address when banning. (Bug #45585 - Patch by bantu)</li>
+ <li>[Fix] Fix incorrect layout when loading private message draft. (Bug #38435 - Patch by nickvergessen)</li>
+ <li>[Fix] Show proper error message when trying to add bots to friends/foes list. (Bug #40205 - Patch by nickvergessen)</li>
+ <li>[Fix] Fix Oracle database backup (Bug #46715)</li>
+ <li>[Fix] Update attachments table when deleting user and retaining his posts. (Bug #40245 - Patch by rxu)</li>
+ <li>[Fix] Correctly detect files in subfolders when viewing cached template files. (Bug #46145 - Patch by nickvergessen)</li>
+ <li>[Fix] Display user's Jabber address in popup when Jabber functionality is disabled (Bug #20775 - Patch by nickvergessen)</li>
+ <li>[Fix] Correctly exclude forums from active topics list. (Bug #19135 - Patch by nickvergessen)</li>
+ <li>[Fix] Do not display birthdays of banned users (Bug #20625 - Patch by nickvergessen)</li>
+ <li>[Fix] Fix function to recalculate Nested Sets (Bug #41555 - Patch by EXreaction)</li>
+ <li>[Fix] Display but also highlight already used rank images when creating new ranks. (Bug #22665 - Patch by nickvergessen)</li>
+ <li>[Fix] Correctly orientate quoted text image on RTL languages (Bug #33745 - Patch by nickvergessen)</li>
+ <li>[Fix] Do not display &quot;View user notes&quot; and &quot;Warn user&quot; links in user profile if corresponding MCP modules are disabled. (Bug #10519 - Patch by rxu)</li>
+ <li>[Fix] Show proper error message when trying to create a private messages folder with an empty name. (Bug #39875 - Patch by nickvergessen)</li>
+ <li>[Fix] No longer state that it is possible to manage group leaders from the UCP. (Bug #19945 - Patch by nickvergessen)</li>
+ <li>[Fix] Do not throw an error when PDO is a shared module and not loaded preventing SQLite from being loaded.</li>
+ <li>[Fix] Fix censoring of unicode words. (Bug #16555 - Patches by rxu)</li>
+ <li>[Fix] Display coloured usernames in ACP groups management screens</li>
+ <li>[Fix] Correctly describe founder permissions on trace-information (Bug #37235 - Patch by nickvergessen)</li>
+ <li>[Fix] Correct the width value for poll_center.gif omitted in imageset.cfg for subsilver2. (Bug #43005 - Patch by rxu)</li>
+ <li>[Fix] Correctly load complex language variable using acp_language (Bug #45735 - Patch by leviatan21)</li>
+ <li>[Fix] Fix reapply_sid() to correctly strip session id in certain circumstances (Bug #43125 - Patch by leviatan21)</li>
+ <li>[Fix] Correctly state why one language pack is marked with an asterisk in the ACP. (Bug #37565 - Patch by bantu)</li>
+ <li>[Fix] Correctly check if install directory is still present. (Bug #46965 - Patch by rxu)</li>
+ <li>[Fix] Correct banned user behaviour when &quot;force password change&quot; is enabled (Bug #47145 - Patch by nickvergessen and leviatan21)</li>
+ <li>[Fix] Correctly display ACP logs options, without permission to clear logs. (Bug #24155 - Patch by leviatan21)</li>
+ <li>[Fix] Display topic icons in MCP forum view again (only prosilver).</li>
+ <li>[Fix] Properly display post status messages in topic when post is reported and unapproved (Bug #44455 - Patch by leviatan21)</li>
+ <li>[Fix] Do not remove recipients when loading private message draft. (Bug #38395 - Patch by nickvergessen)</li>
+ <li>[Fix] Add author name to moderator log when deleting post/topic. (Bug #46225 - Patch by nickvergessen)</li>
+ <li>[Fix] Fix broken &quot;Report details&quot; link in the MCP. (Bug #46975 - Patch by nickvergessen)</li>
+ <li>[Fix] Resolve accesskey conflicts in prosilver. (Bug #44685 - Patch by bantu)</li>
+ <li>[Fix] Check if template file is empty before trying to read from it. (Bug #47345 - Patch by bantu)</li>
+ <li>[Fix] Correct descriptions of the permissions to use BBCode, smilies, images and flash to be more relevant. (Bug #36065 - Patch by rxu)</li>
+ <li>[Fix] Fix style issues in print mode. (Bug #26375 - Patch by leviatan21)</li>
+ <li>[Fix] Fix minor issue with L_QUOTE language string missing in several PM composing modes. (Bug #39625 - Patch by rxu)</li>
+ <li>[Fix] Also fetch posts of guests and deleted or deactivated users when searching for author names. (Bug #36565, #47765 - Patch by nickvergessen)</li>
+ <li>[Fix] Show end of ban in MCP and ACP when user is banned by duration. (Bug #47815 - Patch by Pyramide)</li>
+ <li>[Fix] Correctly count posts awaiting approval in the MCP. (Bug #47685 - Patch by nickvergessen)</li>
+ <li>[Fix] Display user's posts count in private message when it is equal to 0 (prosilver). (Bug #40155 - Patch by rxu)</li>
+ <li>[Fix] Only allow users to disable word censor if globally allowed. (Bug #47575 - Patch by 00mohgta7)</li>
+ <li>[Fix] Fix database updater and db tools to support multiple column changes/additions/removals with SQLite</li>
+ <li>[Fix] Correctly detect GZIP status in debug mode. (Bug #24075 - Patch by rxu)</li>
+ <li>[Fix] Posting smilies in view more smilies now work again in IE (Bug #46025 - Patch by leviatan21)</li>
+ <li>[Fix] Properly convert and show filesize information. (Bug #47775 - Patch by bantu)</li>
+ <li>[Fix] Add ability to prune users who never logged in. (Bug #44295 - Patch by rxu)</li>
+ <li>[Fix] Show smilies and images in topic print view. (Bug #47265 - Patch by nickvergessen)</li>
+ <li>[Fix] Force full date in private message print view. (Patch by nickvergessen)</li>
+ <li>[Fix] Fix &quot;Always show a scrollbar for short pages&quot; for IE8 and Firefox 3.5 (Bug #47865 - Patch by stokerpiller)</li>
+ <li>[Fix] Do not allow setting group as default group for pending users. (Bug #45675 - Patch by nickvergessen)</li>
+ <li>[Fix] Fail gracefully if store folder is not writable during update. (Bugs #46615, #46945)</li>
+ <li>[Fix] Hide profile-icon from viewtopic-page if user has no permissions (subsilver2 only) (Bug #37635 - Patch by leviatan21)</li>
+ <li>[Fix] Correct escaping/unescaping in the LDAP authentication plugin. (Bug #48175)</li>
+ <li>[Fix] Add hard limit for smilies.</li>
+ <li>[Fix] Remove redundant SQL query from ucp.php. (Bug #40305)</li>
+ <li>[Fix] Reorder frame order of animated subsilver2 topic icons to be useful when animation is disabled. (Bug #29385 - Patch by prototech)</li>
+ <li>[Fix] Ensure user errors are displayed regardless of PHP settings. (Bug #47505)</li>
+ <li>[Fix] Permit null values for non-required integer custom profile fields and ensure zero complies with the range limits. (Bug #40925)</li>
+ <li>[Fix] Allow changing forum from select box under certain circumstances. (Bug #37525)</li>
+ <li>[Fix] Display required fields notice on registration above the custom profile fields. (Bug #39665)</li>
+ <li>[Fix] Copy poll options properly when copying topic. (Bug #39065)</li>
+ <li>[Fix] Fix error with disapproval of topics having several queued posts only. (Bug #47705 - Patch by rxu)</li>
+ <li>[Fix] Preserve newlines in template files (one newline had been always dropped after a template variable due to PHP's handling of closing tags)</li>
+ <li>[Fix] Be less strict with FTP daemons when getting directory filelists. (Bug #46295)</li>
+ <li>[Fix] Fix set_custom_template for database-stored styles (Bug #40515 - Patch by nickvergessen)</li>
+ <li>[Fix] Banning an already banned user states to be successful, but has no effect (Bug #47825 - Patch by Pyramide)</li>
+ <li>[Fix] Do not add style-parameter to URL again, after admin re-authentification (Bug #18005 - Patch by leviatan21)</li>
+ <li>[Fix] Do not cut post-message in between HTML-Entities on search.php (Bug #31505 - Patch by leviatan21)</li>
+ <li>[Fix] Correctly set attachment flag for topics, posts and pms after deleting attachments (Bug #48265 - Patch by MarcoDM and nickvergessen)</li>
+ <li>[Fix] Display &quot;Locked&quot; button instead of &quot;Reply&quot; one for locked forum in viewtopic (prosilver). (Bug #38055 - Patch by Raimon)</li>
+ <li>[Fix] Correctly propagate umlauts over search result pages (Bug #33755)</li>
+ <li>[Fix] Preserve post options when refusing to save the post as a draft. (Bug #39115)</li>
+ <li>[Fix] Do not send private message back to sender if sender is in the same group the private message was sent to.</li>
+ <li>[Fix] Correctly add user to a group making it a default one. (Bug #48345 - Patch by rxu)</li>
+ <li>[Fix] Add log entry when copying forum permissions.</li>
+ <li>[Fix] Min/max characters per posts no longer affects poll options (Bug #47295 - Patch by nickvergessen)</li>
+ <li>[Fix] Correctly log action when users request to join a group (Bug #37585 - Patch by nickvergessen)</li>
+ <li>[Fix] Do not try to create thumbnails for images we cannot open properly. (Bug #48695)</li>
+ <li>[Fix] Apply locale-independent basename() to attachment filenames. New function added: utf8_basename(). (Bug #43335 - Patch by ocean=Yohsuke)</li>
+ <li>[Fix] Adjust build_url() to not prepend $phpbb_root_path if path returned from redirect() is an URL. This fixes redirect issues with some installations and bridges. (Bug #47535)</li>
+ <li>[Fix] Do not mark global announcements as read if all topics in a forum become read (Bug #15729).</li>
+ <li>[Fix] Fix general error while registration, through undefined variable $config in validate_referer (Bug #49035 - Patch by wjvriend)</li>
+ <li>[Fix] Correctly extract column default value when exporting PostgreSQL tables. (Bug #48955)</li>
+ <li>[Fix] Allow updater to work correctly with PHP filename extensions other than &quot;.php&quot;. (Bugs #15809, #49215)</li>
+ <li>[Fix] Update search index if only post subject changed. (Bug #49435)</li>
+ <li>[Fix] Fix who is online displaying incorrect data. (Bug #49485, thanks Brainy)</li>
+ <li>[Fix] Fixed incorrect &quot;topic does not exist&quot; when unapproved posts were visited without global moderator permissions. (Bug #47795)</li>
+ <li>[Fix] Prevent style switcher from blocking the tab key. (Bug #49335)</li>
+ <li>[Fix] Correctly redirect on MCP main page after posts approval/disapproval from it. (Bug #49625)</li>
+ <li>[Fix] Do not display topic approval status image for shadow topic if a user is not a moderator in the forum the topic has been moved to. (Bug #43295)</li>
+ <li>[Fix] Fix email problems on servers with PHP installations not accepting RFC-compliant subject string passed to the the mail()-function. (Bug #46725)</li>
+ <li>[Fix] Correctly orientate Control-Panel-Navigation background-image on RTL languages. (Bug #49945)</li>
+ <li>[Fix] Sort private messages by message time and not message id. (Bug #50015)</li>
+ <li>[Fix] Make sure only logs for existing users are displayed and user-specific logs removed on user deletion. (Bug #49855)</li>
+ <li>[Fix] Only show &quot;Add friend&quot; and &quot;Add foe&quot; links if the specific module is enabled. (Bug #50475)</li>
+ <li>[Fix] Correctly display list items in forum description in prosilver and administration. (Bug #48055 - Patch by leviatan21)</li>
+ <li>[Fix] Only embed cron.php if there is no cron lock present to reduce overhead. (Bug #45725 - Patch by TerryE)</li>
+ <li>[Fix] Add header gradient back into subsilver2 but keep site logo easily replaceable with smaller and bigger ones. (Bug #11142 - Patch by dark/Rain and Raimon)</li>
+ <li>[Fix] Send activation email when activating user from user settings. (Bug #43145)</li>
+ <li>[Fix] Do not show resend activation email link when using admin activation. (Bug #44375 - Patch by bbrunnrman)</li>
+ <li>[Fix] Do not display links to user/post search if search is disabled. (Bug #50685 - Patch by HardStyle)</li>
+ <li>[Fix] Fix icon alignment for forums with large descriptions in subsilver2. (Bug #50445)</li>
+ <li>[Fix] Correctly display underlined links placed in last line in viewtopic. (Bug #14811 - Patch by primehalo)</li>
+ <li>[Fix] Only check whether forum image exists if forum image is specified. (Bug #51905)</li>
+ <li>[Fix] Fixed database backup and restore with Oracle DBMS.</li>
+ <li>[Fix] Fixed database updater for changes to columns having default value in MSSQL (adding/dropping constraints)</li>
+ <li>[Change] Database updater now supports checking for existing/missing indexes.</li>
+ <li>[Change] submit_post() now accepts force_approved_state key passed to $data to indicate new posts being approved (true) or unapproved (false).</li>
+ <li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
+ <li>[Change] Template engine now permits to a limited extent variable includes.</li>
+ <li>[Change] Quote BBCode no longer requires the f_reply permission. (Bug #16079)</li>
+ <li>[Change] Banning/unbanning users now generates an entry in their user notes (Bug #21825 - Patch by nickvergessen)</li>
+ <li>[Change] Smilies no longer require the f_bbcode permission. (Bug #26545)</li>
+ <li>[Change] Ability to define column split in FAQ/BBCode help (Bug #31405)</li>
+ <li>[Change] Changed behaviour of group_create() function to support specifying additional group columns</li>
+ <li>[Change] Hide avatar when avatar-type is not allowed (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
+ <li>[Change] INCLUDEPHP not depending on phpbb_root_path (Bug #45805 - Patch by nickvergessen)</li>
+ <li>[Change] Ability to fetch moderators with get_moderators() even if load_moderators setting is off. (Bug #35955)</li>
+ <li>[Change] &quot;Post details&quot; links with image in MCP. (Bug #39845 - Patch by leviatan21)</li>
+ <li>[Change] PM history now only shows PMs of users you currently reply to. (Bug #39505 - Patch by nickvergessen)</li>
+ <li>[Change] Show quote button for own PMs in PM history. (Bug #37285 - Patch by nickvergessen)</li>
+ <li>[Change] Fetch requested cookie variables directly from cookie super global. (Bug #47785)</li>
+ <li>[Change] Add confirmation for deactivating styles (Bug #14304 - Patch by leviatan21)</li>
+ <li>[Change] Add confirmation for deactivating language packs (Patch by leviatan21)</li>
+ <li>[Change] Add confirm-box when deleting permissions (Bug #13673 - Patch by nickvergessen)</li>
+ <li>[Change] Add pagination for icons and smilies in the ACP and smilies in the smiley popup</li>
+ <li>[Change] Cache get_username_string() function calls on viewtopic.</li>
+ <li>[Change] Cache version check.</li>
+ <li>[Change] When creating a new forum without copying permissions, ask again.</li>
+ <li>[Change] Parse multiline url title for [url] BBCode tag. (Bug #1309)</li>
+ <li>[Change] Introduce new parameter to page_header() for forum specific who is online listings.</li>
+ <li>[Change] Lifted minimum requirement for Firebird DBMS from 2.0+ to 2.1+.</li>
+ <li>[Change] Unapproved topics can no longer be replied to (Bug #44005, #47675, #23605)</li>
+ <li>[Change] Require user to be registered and logged in to search for unread posts if topic read tracking is disabled for guests (Bug #49525)</li>
+ <li>[Change] Allow three-digit hex notation in Color BBcode. (Bug #39965 - Patch by m0rpha)</li>
+ <li>[Change] Simplified login_box() and redirection after login. S_LOGIN_ACTION can now be used on every page. (Bug #50285)</li>
+ <li>[Change] Do not take edit post time into account for determining permission to delete last post in topic. (Bug #48615)</li>
+ <li>[Change] Resize oversized Topic icons (Bug #44415)</li>
+ <li>[Change] Banned IPs are now sorted (Bug #43045 - Patch by DavidIQ)</li>
+ <li>[Change] phpBB updater now skips sole whitespace/tab changes while computing differences. This reduces the chance of conflicts tremendously.</li>
+ <li>[Change] phpBB updater now solves common conflicts on it's own. This further reduces the chance of conflicts.</li>
+ <li>[Feature] Add language selection on the registration terms page (Bug #15085 - Patch by leviatan21)</li>
+ <li>[Feature] Backported 3.2 captcha plugins.
+ <ul>
+ <li>Classic and GD CAPTCHA</li>
+ <li>reCaptcha (based on API from recaptcha.net by Mike Crawford and Ben Maurer)</li>
+ <li>Q&amp;A CAPTCHA</li>
+ <li>3D Wave (by Robert &quot;Xore&quot; Hetzler)</li>
+ </ul>
+ </li>
+ <li>[Feature] Introduced new ACM plugins:
+ <ul>
+ <li>null</li>
+ <li><a href="http://pecl.php.net/package/memcache">memcache</a></li>
+ <li><a href="http://pecl.php.net/package/APC">APC</a></li>
+ <li><a href="http://xcache.lighttpd.net/">XCache</a></li>
+ <li><a href="http://eaccelerator.net/">eAccelerator</a></li>
+ </ul>
+ </li>
+ <li>[Feature] ATOM Feeds (Idea and diversed from RSS Feed 2.0 MOD (Version 1.0.8/9) by leviatan21)</li>
+ <li>[Feature] New groups option to excempt group leaders from group permissions</li>
+ <li>[Feature] New &quot;Newly Registered Users&quot; group for assigning permissions to newly registered users. They will be removed from this group once they reach a defineable amount of posts.</li>
+ <li>[Feature] Ability to define if the &quot;Newly Registered Users&quot; group will be assigned as the default group to newly registered users.</li>
+ <li>[Feature] Add new option to disable avatars board-wide (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
+ <li>[Feature] Enhance obtain_users_online_string to be able to return user-lists for other session-items (Bug #31975 - Patch by nickvergessen)</li>
+ <li>[Feature] Add unapproved topic icon for moderators on forum list (Bug #46865 - Patch by nickvergessen)</li>
+ <li>[Feature] Ability to define minimum number of characters for posts/pms</li>
+ <li>[Feature] Store signature configuration options in database (Bug #45115 - Patch by rxu)</li>
+ <li>[Feature] Add bare-bones quick-reply editor to viewtopic.</li>
+ <li>[Feature] Detect when a post has been altered by someone else while editing. (Patch by bantu)</li>
+ <li>[Feature] Add unread posts quick search option (Bug #46765 - Patch by rxu)</li>
+ <li>[Feature] Add option to disable avatar uploads from remote locations. (Bug #45375 - Patch by nickvergessen)</li>
+ <li>[Feature] Ability to delete warnings and keep warnings permanently (Bug #43375 - Patch by nickvergessen)</li>
+ <li>[Feature] Ability to empty a user's outbox from the user ACP quick tools.</li>
+ <li>[Feature] Ability to search ACP / MCP logs</li>
+ <li>[Feature] Users can report PMs to moderators which are then visible in a new MCP module</li>
+ <li>[Feature] Parse email text files with the template engine.</li>
+ <li>[Feature] Use email-style quoting when bbcodes are disabled.</li>
+ <li>[Feature] Added new functionality to inactive users module:
+ <ul>
+ <li>Ability to set users per page.</li>
+ <li>Ability to sort by posts/number of reminders/last reminded date.</li>
+ <li>Show number of posts and ability to search posts.</li>
+ <li>Show number of reminders sent to user.</li>
+ <li>Show date of last reminder sent to user.</li>
+ </ul>
+ </li>
+ <li>[Feature] Display version check on ACP main page.</li>
+ <li>[Feature] Ability to copy permissions from one forum to several other forums.</li>
+ <li>[Feature] Ability to control the display of custom profile fields on viewtopic (Bug #48985).</li>
+ <li>[Feature] Fallback options for missing language files. (Bug #38575 - Patch by EXreaction)</li>
+ <li>[Feature] Separate PM Reply and PM Reply to all in prosilver.</li>
+ <li>[Feature] Place debug notices during captcha rendering in the error log - useful for debugging output already started errors.</li>
+ <li>[Feature] Ability to define constant PHPBB_USE_BOARD_URL_PATH to use board url for images/avatars/ranks/imageset...</li>
+ <li>[Feature] Added function to generate Email hash. (Bug #49195)</li>
+ <li>[Feature] Style authors are now able to define the default submit button used for form submission on ENTER keypress on forms using more than one. Prosilver uses this for the posting page(s) and registration screen.</li>
+ <li>[Feature] Ability to specify amount of time user is able to delete his last post in topic.</li>
+ <li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li>
+ </ul>
+ <a name="v304"></a><h3>1.ii. Changes since 3.0.4</h3>
+
+ <ul>
+ <li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li>
+ <li>[Fix] Posts incremented for multiple approval of the same topic (Bug #40495 - Patch by TerraFrost)</li>
+ <li>[Fix] Missing end &quot; in quote bb tag deletes text (Bug #40565 - Patch by TerraFrost)</li>
+ <li>[Fix] Friend/foe system displays posts made by foes while composing (Bug #40325 - Patch by TerraFrost and Highway of Life)</li>
+ <li>[Fix] Check forum_image whether it exists (Bug #39005 - Patch by TerraFrost)</li>
+ <li>[Fix] The sql query in acp_users.php lacks a condition (Bug #40275 - Patch by grimskies)</li>
+ <li>[Fix] Added missing read permission information for some phpbb_chmod() calls</li>
+ <li>[Fix] Correctly display future dates (Bug #38755)</li>
+ <li>[Fix] Fix guest/bot session problems with apache authentication plugin (Bug #41085)</li>
+ <li>[Fix] Whois now works reliably for RIRs other than APNIC and RIPE. (Bug #40085)</li>
+ <li>[Fix] Correctly convert Niels' Birthday MOD to the date format used in phpBB3. (Bug #32895)</li>
+ <li>[Fix] Changed the success message when requesting a new password to be more accurate. (Bug #41405)</li>
+ <li>[Fix] Add missing anti-abuse email headers to acp_inactive.php and ucp_resend.php.</li>
+ <li>[Fix] Only remind users in the correct inactive states depending on the board account activation level.</li>
+ <li>[Fix] Various XHTML mistakes in prosilver, subsilver2 and the ACP. (Bugs #41745, #42265 - Patch by nickvergessen, #38465, #43015, #46585 - Patch by Raimon)</li>
+ <li>[Fix] Log password changes via password reset function. (Bug #41365)</li>
+ <li>[Fix] Poll, negative durations generate error (Bug #41295 - Patch by TerraFrost)</li>
+ <li>[Fix] Visibility of custom field on registration is incorrectly controlled by setting &quot;display&quot; (Bug #41385 - Patch by Eelke and fade2gray)</li>
+ <li>[Fix] Smilies in username are misparsed on [quote=&quot;&quot;] (Bug #41955 - Patch by TerraFrost)</li>
+ <li>[Fix] Deleting all posts in a topic - bad redirect (Bug #41705 - Patch by TerraFrost)</li>
+ <li>[Fix] Deleted users still appear logged in (Bug #41985 - Patch by TerraFrost)</li>
+ <li>[Fix] Removed redundant code and unnecessary queries in forum management. (Bug #42265 - Patch by nickvergessen)</li>
+ <li>[Fix] Correct mbstring regular expression for the allowable username characters, only affects <code>USERNAME_LETTER_NUM_SPACERS</code>. (Bug #42325)</li>
+ <li>[Fix] Fix infinite loop in message handler if cache directory is not writable. (Bug #38675)</li>
+ <li>[Fix] While post is awaiting approval it can still be edited even though it can not be seen (Bug #41435 - Patch by TerraFrost)</li>
+ <li>[Fix] Fix imageset editing for retaining and correctly setting dimensions for images, as well as displaying correct settings for first page load.</li>
+ <li>[Fix] Use OS-specific line endings for mail headers. (related to Bug #42755)</li>
+ <li>[Fix] Hide font size options which are bigger than the allowed size in the editor. (Bug #42615 - Patch by nickvergessen)</li>
+ <li>[Fix] Better thumbnail quality with imagemagick. (Bug #42565)</li>
+ <li>[Fix] Fix download count increments for image attachments without corresponding thumbnails. (Bug #42505)</li>
+ <li>[Fix] Fix wrong bot ip check if bot ip was wrongly entered by admin. (Bug #42485)</li>
+ <li>[Fix] Fix javascript errors in simple header (prosilver) by adding forum_fn.js and the corresponding variables. (Bug #42135)</li>
+ <li>[Fix] Set connection encoding for MySQL versions 4.1.0 to 4.1.2. This may fix some conversion issues with special characters. (Bug #41805)</li>
+ <li>[Fix] Deleting private message attachments could delete post attachments. (Bug #42815)</li>
+ <li>[Fix] Do not suppress PHP notices/errors in language packs if DEBUG_EXTRA mode enabled. (Bug #41485)</li>
+ <li>[Fix] Flash files do not display anymore after update to flash player 10 (Bug #41315)</li>
+ <li>[Fix] Use FQDN for SMTP EHLO/HELO command. (Bug #41025)</li>
+ <li>[Fix] Mass Email works again for users with empty jabber address but notification set to 'both'. (Bug #39755)</li>
+ <li>[Fix] Fix race condition for updating post/topic/etc. counter. (Reported by BartVB)</li>
+ <li>[Fix] Fix duplicate creation of acl options in acl_add_options() under certain conditions. (Bug #38385, #40225)</li>
+ <li>[Fix] Cancel when replying to global announcement redirects to first forum - not to the current forum (Bug #41225 - Patch by TerraFrost)</li>
+ <li>[Fix] Cursor Jumps on New Topic in IE (Bug #42455 - Patch by TerraFrost)</li>
+ <li>[Fix] Add indicator to be used in code if session was created (user visits the site for the first time).</li>
+ <li>[Fix] Correctly count topic views for guests visiting the website the first time by entering the topic directly (Bug #43445)</li>
+ <li>[Fix] Fix bug in postgresql db layer for LIMIT ALL clauses (Reported by JRSweets)</li>
+ <li>[Fix] Sort backups by date, newest first (Bug #14818)</li>
+ <li>[Fix] Prevent incomplete backups stored if option &quot;store and download&quot; is selected and admin cancel download by removing the option. (Bug #20325)</li>
+ <li>[Fix] Enforce correct case for template variables</li>
+ <li>[Fix] Set topic_last_view_time on post/reply/edit to circumvent race conditions in auto prune and false removal of topics for manual forum prune (Bug #18055, #43515)</li>
+ <li>[Fix] Correctly split long subject lines according to the used RFC. This fixes extra spaces within long subjects. (Bug #43715)</li>
+ <li>[Fix] Fix skipping messages if using next/prev PM in history links. (Bug #22205)</li>
+ <li>[Fix] Messenger now also able to use a custom language path. (Bug #36545)</li>
+ <li>[Fix] PM Export uses ISO 8601 date now. (Bug #32645)</li>
+ <li>[Fix] Apply append_sid() to newest/latest post links in viewforum/search and UCP main module. (Bug #26815)</li>
+ <li>[Fix] Do not create thumbnail if thumbnail would've the same size as the original image. (Bug #30725)</li>
+ <li>[Fix] Ability to vote in poll is now required for the ability to change existing vote. (Bug #38925)</li>
+ <li>[Fix] Search for 'topic title only' and 'first post' should work again for non-mysql dbms. (Bug #40605)</li>
+ <li>[Fix] Make sure additional information for accessibility is always exposed to screen readers (Bug #44335 - Patch by MarcoZ)</li>
+ <li>[Fix] Approving a topic when some of the posts within that topic have already been approved (Bug #42585 - Patch by TerraFrost)</li>
+ <li>[Fix] Online status shown when post hidden (Bug #35505 - Patch by Raimon)</li>
+ <li>[Fix] memberlist.php display formating can be distorted by posting long URL for website (Bug #36675 - Patch by TerraFrost)</li>
+ <li>[Fix] Display the online status of hidden users to users with the u_viewonline permission when viewing PMs.</li>
+ <li>[Fix] &quot;Select all&quot; selects much too much in Opera (Bug #42885 - Patch by TerraFrost and ToonArmy)</li>
+ <li>[Fix] Correct calculation of source/target forum statistics if mass moving topics with global announcements (Bug #44545)</li>
+ <li>[Fix] Fix column handling in db updater, custom profile fields an db tools for firebird DBMS (Bug #44555)</li>
+ <li>[Fix] IE8 textarea issues (Bug #43305)</li>
+ <li>[Fix] Prevent accounts from being activated by users when admin activation is turned on and the correct activation key is known.</li>
+ <li>[Fix] Allow the installer to operate under PHP 5.3. (Bug #45255)</li>
+ <li>[Change] Default difference view is now 'inline' instead of 'side by side'</li>
+ <li>[Change] Added new option for merging differences to conflicting files in automatic updater</li>
+ <li>[Change] Add link to user profile in the MCP for user notes and warn user.</li>
+ <li>[Change] Add IN_PHPBB check to generated cache files. (Reported by bantu)</li>
+ <li>[Change] Add topic icons to prosilver UCP main and subscribed templates (Bug #42735 - Patch by Raimon)</li>
+ <li>[Change] Add unique key to ACL options table to prevent duplicate permission options. (Bug #41835)</li>
+ <li>[Change] Redirect to relevant MCP page of multi-page topic if accessing quickmod tools (Split option for example)</li>
+ <li>[Change] Performance improvements for native fulltext search (Patch by Paul)</li>
+ <li>[Change] Changed jumpto() JS function to be more fail-safe. (But #27635 - Patch by peterkclee)</li>
+ <li>[Feature] Added new options for visual confirmation.</li>
+ <li>[Feature] Allow download of conflicting file for later reference in automatic updater</li>
+ <li>[Feature] Allow translation of custom BBCode help messages. (Patch by bantu)</li>
+ <li>[Feature] db_tools now support create table and drop table.</li>
+ <li>[Feature] Database updater checks for incompatible db schema (MySQL 3.x/4.x against MySQL 4.1.x/5.x/6.x)</li>
+ <li>[Feature] New search option: Maximum number of words allowed to search for.</li>
+ <li>[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)</li>
+ </ul>
+
+ <a name="v303"></a><h3>1.iii. Changes since 3.0.3</h3>
+
+ <ul>
+ <li>[Fix] Allow mixed-case template directories to be inherited (Bug #36725)</li>
+ <li>[Fix] Regression bug from revision #8908 regarding log display in ACP</li>
+ <li>[Fix] Allow the UCP group management to work for groups with avatars. (Bug #37375)</li>
+ <li>[Fix] Fix header list build for replying oldest PM in PM history (Bug #37275)</li>
+ <li>[Fix] Do not display COPPA group in memberlist find member dialog if COPPA disabled (Bug #37175)</li>
+ <li>[Fix] Do not try to send jabber notifications if no jid entered (Bug #36775)</li>
+ <li>[Fix] Only display special ranks to guests; no longer display normal ranks for guests (Bug #36735)</li>
+ <li>[Fix] Properly treat punctuation marks after local urls (Bug #37055)</li>
+ <li>[Fix] Make searching for members by YIM address work in prosilver</li>
+ <li>[Fix] Tell users to recreate the search index after changing the common word threshold for fulltext_native (Bug #36345)</li>
+ <li>[Fix] Adjusted phpbb_chmod() to always set permissions for group bit.</li>
+ <li>[Fix] Do not increment users post count after post approval if post had been posted in a forum with no post count increasing set (Bug #37865)</li>
+ <li>[Fix] Extend vertical line for last post column if no posts in forum (Bug #37125)</li>
+ <li>[Fix] correctly update last topic/forum information if changing guest usernames through editing posts (Bug #38095)</li>
+ <li>[Fix] fix postcount resync for situations where low and high post ids are higher than step value, resulting in users having 0 posts. (Bug #38195)</li>
+ <li>[Fix] Use a left join for the topics table on search to avoid trouble with FROM syntax on some databases (Bug #37005)</li>
+ <li>[Fix] Do not show 'Forward' button if the user cannot send PM's</li>
+ <li>[Change] Alllow applications to set custom module inclusion path (idea by HoL)</li>
+ <li>[Change] Handle checking for duplicate usernames in chunks (Bug #17285 - Patch by A_Jelly_Doughnut)</li>
+ <li>[Change] Better handling and finer control for custom profile fields visibility options. (Patch by Highway of Life)</li>
+ <li>[Change] Performance increase for format_date() (Bug #37575 - Patch by BartVB)</li>
+ <li>[Change] Changed prosilver date separator from 'on' to '&raquo;'</li>
+ <li>[Change] Performance increase for get_username_string() (Bug #37545 - Patch by BartVB)</li>
+ <li>[Change] Slight performance increase for common parameter calls to append_sid() (Bug #37555 - Patch by BartVB)</li>
+ <li>[Feature] Added 'AGO' setting to relative date strings. For example: posted 14 minutes ago. (Patch by BartVB)</li>
+ <li>[Sec] Fixed an issue where deactivated accounts could be re-activated without the required privileges. (Reported by Jorick)</li>
+ <li>[Sec] Ask for forum password if post within passworded forum quoted in private message. (Reported by nickvergessen)</li>
+ </ul>
+
+ <a name="v302"></a><h3>1.iv. Changes since 3.0.2</h3>
+
+ <ul>
+ <li>[Fix] Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)</li>
+ <li>[Fix] Delete avatar files (Bug #29985).</li>
+ <li>[Fix] Preserve selection in the MCP. (Bug #31265).</li>
+ <li>[Fix] Added VST - Venezuela Standard Time (Bug #30545).</li>
+ <li>[Fix] Close DB connections in file.php.</li>
+ <li>[Fix] Correctly return results for nested cached queries (Bug #31445 - Patch by faw).</li>
+ <li>[Fix] Allow export of PM pages greater one. (#33155)</li>
+ <li>[Fix] Display coloured username of last poster in list of subscribed forums (prosilver).</li>
+ <li>[Fix] Added missing UCP language string <em>NO_AUTH_READ_HOLD_MESSAGE</em>.</li>
+ <li>[Fix] Do not jump back to page 1 when hiding member search in memberlist. (Bug #32515)</li>
+ <li>[Fix] Correctly limit input of the users location to 100 characters in the UCP and ACP. (Bug #32655)</li>
+ <li>[Fix] Sync reports when using the move all users posts tool in the ACP. (Bug #31165)</li>
+ <li>[Fix] Extra slash is included in the redirect url when redirecting to the forum root directory. (Bug #33605)</li>
+ <li>[Fix] Remove reported flag from shadow topics when closing reports. (Bug #19765)</li>
+ <li>[Fix] Do not show non indexed forums on the search page if they contain no subforums. (Bug #33125)</li>
+ <li>[Fix] Stop search bots incrementing topic views. (Bug #32675 - Patch by eviL&lt;3)</li>
+ <li>[Fix] Use correct link for post author search. (Bug #32595)</li>
+ <li>[Fix] Do not decrease topics counter when deleting shadow topics. (Bug #26495)</li>
+ <li>[Fix] Send localised disapproval reasons in the recipients local language. (Bug #31645)</li>
+ <li>[Fix] Language typos/fixes. (Bugs #27625, #30755, #34185, #32795)</li>
+ <li>[Fix] Added missing terms parameter to search pagination. (Bug #34085)</li>
+ <li>[Fix] Wrong table order in query obtaining posts if post id given.</li>
+ <li>[Fix] Do not display reported topic icon for shadow topics. (Bug #13970)</li>
+ <li>[Fix] Display popular topic based on posts within topic instead of replies within topic. (Bug #16099)</li>
+ <li>[Fix] Expand shown ban reason in unban screen to fully show long entries. (Bug #16234)</li>
+ <li>[Fix] Preserve alpha transparency for created thumbnails. (Bug #16575)</li>
+ <li>[Fix] Use correct port delimiter for MSSQL connections in windows. (Bug #16615)</li>
+ <li>[Fix] Do not allow setting forums parent to the forum itself. (Bug #18855)</li>
+ <li>[Fix] Display assigned rank/avatar for guests. (Bug #19155)</li>
+ <li>[Fix] Set secure cookie for style switcher if required. (Bug #19625)</li>
+ <li>[Fix] Fix native full text search on postgresql while using excluding keyword matches. (Bug #19195)</li>
+ <li>[Fix] Pass S_SEARCH_ACTION through append_sid() in search.php. (Bug #21585)</li>
+ <li>[Fix] Correctly delete message attachments. (Bug #23755)</li>
+ <li>[Fix] Correctly handle unread status of subforums (that are not shown on the index) of forums that are shown on the index. (Bug #14589)</li>
+ <li>[Fix] Stop users from deleting posts after the edit time has passed or they have been locked. (Bug #19115)</li>
+ <li>[Fix] Split posts target forum requires 'f_post' now instead of 'm_split'. (Bug #31015)</li>
+ <li>[Fix] Duplicate log messages for deleting a topic ('LOG_TOPIC_DELETED' has been deprecated in favour of 'LOG_DELETE_TOPIC').</li>
+ <li>[Fix] Use a distinct log message for shadow topic deletions to differentiate between normal topic deletions. (Bug #34635)</li>
+ <li>[Fix] Fix problems with styles using an underscore within the filename. (Bug #34315)</li>
+ <li>[Fix] Better return links when deleting topics through the MCP. (Bug #34655)</li>
+ <li>[Fix] Add quoting support to PM history when composing a reply. (Bug #34285)</li>
+ <li>[Fix] Use phpBB 3.1.x method for storing cached data to prevent PHP bug with our usage of var_export(). (Thanks to Techie-Micheal and HoL for pointing out possible problems)</li>
+ <li>[Fix] Check users pm preferences for pm's sent to groups. (Bug #33245)</li>
+ <li>[Fix] Do not allow password reminders if u_passchg permission is not given. (Bug #14806)</li>
+ <li>[Fix] Implemented strict check for cached user permissions and existing ACL options. This fix makes sure cached permissions are valid, even if they got already cached.</li>
+ <li>[Fix] Do not show link to user/group profiles if user has no permission to view the linked page and gets a denied message anyway. (Bug #15088)</li>
+ <li>[Fix] Do not display last post link and sort display options for search engines. (Bug #15088)</li>
+ <li>[Fix] Make sure users still get notifications if they set to only be notified by Jabber, but Jabber service disabled. (Bug #29715 - Patch by Paul)</li>
+ <li>[Fix] Don't show forum subscription link on categories. (Bug #34895)</li>
+ <li>[Fix] Display a message if no topics or forums are selected when unsubscribing. (Bug #34855)</li>
+ <li>[Fix] Mark/unmark all links in UCP now select/unselect both subscribed topics and forums.</li>
+ <li>[Fix] Increase board topic counter when splitting topics. (Bug #32125)</li>
+ <li>[Fix] Display profile icons when viewing a topic, or PM when only the jabber icon is to be visible. (Bug #34755)</li>
+ <li>[Fix] Do not send PMs with warnings if the user cannot read PMs or they are disabled. (Bug #30815)</li>
+ <li>[Fix] Correctly convert Niels' Birthday MOD to the date format used in phpBB3. (Bug #32895)</li>
+ <li>[Fix] Parse BBCode lists of type square, circle and disc. (Bug #35295)</li>
+ <li>[Fix] Round the displayed percentages in polls. (Bug #32375)</li>
+ <li>[Fix] Disable mass e-mail when e-mail is disabled. (Bug #27385)</li>
+ <li>[Fix] Display coloured poster username of queued posts displayed on the front of the MCP.</li>
+ <li>[Fix] Moderators can only see reports/queue/logs from forums they can actually read. (Bug #31085)</li>
+ <li>[Fix] Correctly display topic when start parameter is equal to the number of posts.</li>
+ <li>[Fix] Correctly display topic in MCP when start parameter is equal to or greater than the number of posts. (Bug #30525)</li>
+
+ <li>[Change] No longer allow the direct use of MULTI_INSERT in sql_build_array. sql_multi_insert() must be used.</li>
+ <li>[Change] Display warning in ACP if config.php file is left writable.</li>
+ <li>[Change] More restrictive chmod to new files being created. (phpbb_chmod() function mostly by faw)</li>
+ <li>[Change] Set headers to allow browsers to better cache attachments (Mylek pointed this out)</li>
+ <li>[Change] Hide parameters if they equal the default in viewforum/viewtopic (Bug #31185)</li>
+ <li>[Change] Various improvements to group listings (Bugs #32155, #32145, #32085, #26675, #26265)</li>
+ <li>[Change] Set headers for IE 8 in file.php</li>
+ <li>[Change] Do not count queued posts to user_posts.</li>
+ <li>[Change] Allow setting birth year to current year.</li>
+ <li>[Change] Do not use the topics posted table when performing an egosearch.</li>
+ <li>[Change] Log the forum name that topics are moved into.</li>
+ <li>[Change] Automatically add users/groups to the PM recipient list, if entered or selected.</li>
+ <li>[Change] Reply to PM now includes all previous recipients and not only the original sender.</li>
+ <li>[Change] Make topic selection for merge less confusing by removing unneeded controls. (Bug #21925)</li>
+ <li>[Change] MCP topic view checkboxes now default to unchecked.</li>
+ <li>[Change] Adjust language key <em>SPLIT_AFTER</em> to make the action clearer.</li>
+ <li>[Change] Add links to the post and forum when viewing a report from the MCP. (Bugs #33795, #33805)</li>
+ <li>[Change] Added CSRF protection to GET-only actions like marking forums.</li>
+ <li>[Change] Remove NUL-Bytes directly in request_var() for strings and within the custom DBAL sql_escape() functions (MSSQL, Firebird, Oracle) (reported by AdhostMikeSw)</li>
+
+ <li>[Feature] Allow limited inheritance for template sets.</li>
+ <li>[Feature] Allow hard disabling of the template editor.</li>
+ <li>[Feature] Allow setting custom language path through $user-&gt;set_custom_lang_path(). $user-&gt;lang_path now also do not include the user language, but only the path.</li>
+ <li>[Feature] Ability to define nullar/singular/plural language entries</li>
+ <li>[Feature] Ability to mimic sprintf() calls with $user-&gt;lang() with the ability to correctly assign nullar/singular/plural language entries.</li>
+ <li>[Feature] Added the possibility to force user posts put in queue if post count is lower than an admin defined value. Guest posting is not affected by this setting.</li>
+ <li>[Feature] Added 'max_recipients' setting for private messages. This setting allows admins to define the maximum number of recipients per private message with a board-wide setting and a group-specific setting.</li>
+ <li>[Feature] Added new permission setting for sending private messages to groups. Now there are two permissions to define sending private messages to multiple recipients and private messages to groups.</li>
+ <li>[Feature] Allow specific connection to different server for jabber functionality by providing a valid JID as username. This also allows the use of talk.google.com as jabber server with gmail.com JIDs. (Bug #14989)</li>
+
+ <li>[Sec Precaution] Stricter validation of the HTTP_HOST header (Thanks to Techie-Micheal et al for pointing out possible issues in derived code)</li>
+ </ul>
+
+ <a name="v301"></a><h3>1.v. Changes since 3.0.1</h3>
+
+ <ul>
+ <li>[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)</li>
+ <li>[Fix] Fixed blank style on setups having no username defined within config.php (Bug #25065)</li>
+ <li>[Fix] Made the compress_tar class tolerate archives that do not properly have their archived contents listed (Bug #14429 / thanks to JRSweets for his patch)</li>
+ <li>[Fix] Moved topics should not count towards the number of topics in a forum (Bug #14648 / thanks to Schumi for his patch)</li>
+ <li>[Fix] Properly check for invalid characters in MySQL DB prefixes during install (Bug #18775)</li>
+ <li>[Fix] Bring the PostgreSQL backup system back to working order (Bug #22385)</li>
+ <li>[Fix] Update correct theme for cached styles in style.php (Bug #25805)</li>
+ <li>[Fix] Also add PHPBB_INSTALLED check to download/file.php for inline avatar delivery</li>
+ <li>[Fix] Unable to login to some jabber server, reverted previous change (Bug #25095)</li>
+ <li>[Fix] Do not return BMP as valid image type for GD image manipulation (Bug #25925)</li>
+ <li>[Fix] Correctly determine safe mode for temp file creation in functions_upload.php (Bug #23525)</li>
+ <li>[Fix] Correctly sort by rank in memberlist (Bug #24435)</li>
+ <li>[Fix] Purge cache after database restore (Bug #24245)</li>
+ <li>[Fix] Correctly display subforum read/unread icons from RTL in FF3, Konqueror and Safari3+. (thanks arod-1 for the fix, related to Bug #14830)</li>
+ <li>[Fix] Added missing form token in acp (thanks NBBN).</li>
+ <li>[Fix] Do not remove whitespace in front of url containing the boards url and no relative path appended (Bug #27355)</li>
+ <li>[Fix] reset forum notifications in viewtopic (Bug #28025)</li>
+ <li>[Fix] corrected link for searching post author's other posts (Bug #26455)</li>
+ <li>[Fix] HTTP Authentication supports UTF-8 usernames now (Bug #21135)</li>
+ <li>[Fix] Topic searches by author no longer return invalid results (Bug #11777)</li>
+ <li>[Fix] Delete drafts and bookmarks when deleting an user. (#27585, thanks Schumi for the fix)</li>
+ <li>[Fix] Set last_post_subject for new topics. (#23945)</li>
+ <li>[Fix] Allow moving posts to invisible forums. (#27325)</li>
+ <li>[Fix] Don't allow promoting unapproved group members (#16124)</li>
+ <li>[Fix] Correctly fetch server name if using non-standard port (#27395)</li>
+ <li>[Fix] Regular expression for email matching in posts will no longer die on long words.</li>
+ <li>[Fix] Do not display ban message if direct call to cron. (thanks Dog Cow for reporting)</li>
+ <li>[Fix] Correctly display double-colon on special conditions within highlighted php source (Bug #26795)</li>
+ <li>[Fix] Increase storage capacity of titles/subjects due to specialchared content (Bug #25235)</li>
+ <li>[Fix] Catch invalid username wildcard ban (we do not support these) (Bug #29305)</li>
+ <li>[Fix] Fix (email)-domain checks for those having DNS prefixes set (Bug #29635)</li>
+ <li>[Change] Adjust truncate_string() to be able to adjust the maximum storage length.</li>
+ <li>[Change] Generalize load check (Bug #21255 / thanks to Xipher)</li>
+ <li>[Change] Make utf8_htmlspecialchars not pass its argument by reference (Bug #21885)</li>
+ <li>[Change] Sort the tables at the database table backup screen</li>
+ <li>[Change] For determining the maximum number of private messages in one box, use the biggest value from all groups the user is a member of (Bug #24665)</li>
+ <li>[Change] Show email ban reason on registration. Additionally allow custom errors properly returned if using validate_data(). (Bug #26885)</li>
+ <li>[Change] Don't allow redirects to different domains. (thanks nookieman)</li>
+ <li>[Feature] Added optional referer validation of POST requests as additional CSRF protection.</li>
+ <li>[Feature] Added optional stricter upload validation to avoid mime sniffing in addition to the safeguards provided by file.php. (thanks to Nicolas Grekas for compiling the list).</li>
+ <li>[Feature] Streamlined banning via the MCP by adding a ban link to the user profile. Also pre-fills ban fields as far as possible.</li>
+ <li>[Feature] Added ACP logout to reset an admin session.</li>
+ <li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li>
+ </ul>
+
+ <a name="v300"></a><h3>1.vi Changes since 3.0.0</h3>
+
+ <ul>
+ <li>[Change] Validate birthdays (Bug #15004)</li>
+ <li>[Fix] Allow correct avatar caching for CGI installations. (thanks wildbill)</li>
+ <li>[Fix] Fix disabling of word censor, now possible again</li>
+ <li>[Fix] Allow single quotes in db password to be stored within config.php in installer</li>
+ <li>[Fix] Correctly quote db password for re-display in installer (Bug #16695 / thanks to m313 for reporting too - #s17235)</li>
+ <li>[Fix] Correctly handle empty imageset entries (Bug #16865)</li>
+ <li>[Fix] Correctly check empty subjects/messages (Bug #17915)</li>
+ <li>[Change] Do not check usernames against word censor list. Disallowed usernames is already checked and word censor belong to posts. (Bug #17745)</li>
+ <li>[Fix] Additionally include non-postable forums for moderators forums shown within the teams list. (Bug #17265)</li>
+ <li>[Change] Sped up viewforum considerably (also goes towards mcp_forum)</li>
+ <li>[Fix] Do not split topic list for topics being promoted to announcements after been moved to another forum (Bug #18635)</li>
+ <li>[Fix] Allow editing usernames within database_update on username cleanup (Bug #18415)</li>
+ <li>[Fix] Fixing wrong sync() calls if moving all posts by a member in ACP (Bug #18385)</li>
+ <li>[Fix] Check entered imagemagick path for trailing slash (Bug #18205)</li>
+ <li>[Fix] Use proper title on index for new/unread posts (Bug #13101) - patch provided by Pyramide</li>
+ <li>[Fix] Allow calls to $user-&gt;set_cookie() define no cookie time for setting session cookies (Bug #18025)</li>
+ <li>[Fix] Stricter checks on smilie packs (Bug #19675)</li>
+ <li>[Fix] Gracefully return from cancelling pm drafts (Bug #19675)</li>
+ <li>[Fix] Possible login problems with IE7 if browser check is activated (Bug #20135)</li>
+ <li>[Fix] Fix possible database transaction errors if code returns on error and rollback happened (Bug #17025)</li>
+ <li>[Change] Allow numbers in permission names for modifications, as well as uppercase letters for the request_ part (Bug #20125)</li>
+ <li>[Fix] Use HTTP_HOST in favor of SERVER_NAME for determining server url for redirection and installation (Bug #19955)</li>
+ <li>[Fix] Removing s_watching_img from watch_topic_forum() function (Bug #20445)</li>
+ <li>[Fix] Changing order for post review if more than one post affected (Bug #15249)</li>
+ <li>[Fix] Language typos/fixes (Bug #20425, #15719, #15429, #14669, #13479, #20795, #21095, #21405, #21715, #21725, #21755, #21865, #15689)</li>
+ <li>[Fix] Style/Template fixes (Bug #20065, #19405, #19205, #15028, #14934, #14821, #14752, #14497, #13707, #14738, #19725)</li>
+ <li>[Fix] Tiny code fixes (Bug #20165, #20025, #19795, #14804)</li>
+ <li>[Fix] Prepend phpbb_root_path to ranks path for displaying ranks (Bug #19075)</li>
+ <li>[Fix] Allow forum notifications if topic notifications are disabled but forum notifications enabled (Bug #14765)</li>
+ <li>[Fix] Fixing realpath issues for provider returning the passed value instead of disabling it. This fixes issues with confirm boxes for those hosted on Network Solutions for example. (Bug #20435)</li>
+ <li>[Fix] Try to sort last active date on memberlist correctly at least on current page (Bug #18665)</li>
+ <li>[Fix] Handle generation of form tokens when maximum time is set to -1</li>
+ <li>[Fix] Correctly delete unapproved posts without deleting the topic (Bug #15120)</li>
+ <li>[Fix] Respect signature permissions in posting (Bug #16029)</li>
+ <li>[Fix] Users allowed to resign only from open and freely open groups (Bug #19355)</li>
+ <li>[Fix] Assign a last viewed date to converted topics (Bug #16565)</li>
+ <li>[Fix] Many minor and/or cosmetic fixes (Including, but not limited to: #21315, #18575, #18435, #21215)</li>
+ <li>[Feature] New option to hide the entire list of subforums on listforums</li>
+ <li>[Fix] Custom BBCode {EMAIL}-Token usage (Bug #21155)</li>
+ <li>[Fix] Do not rely on parameter returned by unlink() for verifying cache directory write permission (Bug #19565)</li>
+ <li>[Change] Use correct string for filesize (MiB instead of MB for example)</li>
+ <li>[Change] Remove left join for query used to retrieve already assigned users and groups within permission panel (Bug #20235)</li>
+ <li>[Fix] Correctly return sole whitespaces if used with BBCodes (Bug #19535)</li>
+ <li>[Fix] Quote bbcode parsing adding too much closing tags on special conditions (Bug #20735)</li>
+ <li>[Change] Added sanity checks to various ACP settings</li>
+ <li>[Change] Removed minimum form times</li>
+ <li>[Fix] Check topics_per_page value in acp_forums (Bug #15539)</li>
+ <li>[Fix] Custom profile fields with date type should be timezone independend (Bug #15003)</li>
+ <li>[Fix] Fixing some XHTML errors/warnings within the ACP (Bug #22875)</li>
+ <li>[Fix] Warnings if poll title/options exceed maximum characters per post (Bug #22865)</li>
+ <li>[Fix] Do not allow selecting non-authorized groups within memberlist by adjusting URL (Bug #22805 - patch provided by ToonArmy)</li>
+ <li>[Fix] Correctly specify &quot;close report action&quot; (Bug #22685)</li>
+ <li>[Fix] Display &quot;empty password error&quot; within the login box instead of issuing a general error (Bug #22525)</li>
+ <li>[Fix] Clean up who is online code in page_header (Bug #22715, thanks HighwayofLife)</li>
+ <li>[Fix] Pertain select single link on memberlist (Bug #23235 - patch provided by Schumi)</li>
+ <li>[Fix] Allow &amp; and | in local part of email addresses (Bug #22995)</li>
+ <li>[Fix] Do not error out if php_uname function disabled / Authenticating on SMTP Server (Bug #22235 - patch by HoL)</li>
+ <li>[Fix] Correctly obtain to be ignored users within topic/forum notification (Bug #21795 - patch provided by dr.death)</li>
+ <li>[Fix] Correctly update board statistics for attaching orphaned files to existing posts (Bug #20185)</li>
+ <li>[Fix] Do not detect the board URL as a link twice in posts (Bug #19215)</li>
+ <li>[Fix] Set correct error reporting in style.php to avoid blank pages after CSS changes (Bug #23885)</li>
+ <li>[Fix] If pruning users based on last activity, do not include users never logged in before (Bug #18105)</li>
+ <li>[Sec] Only allow searching by email address in memberlist for users having the a_user permission (reported by evil&lt;3)</li>
+ <li>[Sec] Limit private message attachments to be viewable only by the recipient(s)/sender (Report #s23535) - reported by AlleyKat</li>
+ <li>[Sec] Check for non-empty config.php within style.php (Report #s24575) - reported by bantu</li>
+ <li>[Fix] Find and display colliding usernames correctly when converting from one database to another (Bug #23925)</li>
+ </ul>
+
+ <a name="v30rc8"></a><h3>1.vii. Changes since 3.0.RC8</h3>
+
+ <ul>
+ <li>[Fix] Cleaned usernames contain only single spaces, so &quot;a_name&quot; and &quot;a__name&quot; are treated as the same name (Bug #15634)</li>
+ <li>[Fix] Check &quot;able to disable word censor&quot; option while applying word censor on text (Bug #15974)</li>
+ <li>[Fix] Rollback changes on failed transaction if returning on sql error is set</li>
+ <li>[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)</li>
+ </ul>
+
+ <a name="v30rc7"></a><h3>1.viii. Changes since 3.0.RC7</h3>
+
+ <ul>
+ <li>[Fix] Fixed MSSQL related bug in the update system</li>
+ <li>[Fix] Display &quot;Return to&quot; links on unwritable forums (Bug #14824)</li>
+ <li>[Fix] Mitigating different realpath() handling between PHP versions (fixing confirm box redirects)</li>
+ <li>[Fix] Fix signature editing - ability to remove signature (Bug #14820)</li>
+ <li>[Fix] Send correct activation key by forcing reactivation for inactive user (Bug #14819)</li>
+ <li>[Fix] Adding correct IP for private messages sent by issuing warnings (Bug #14781)</li>
+ <li>[Fix] Open private message notification (Bug #14773)</li>
+ <li>[Fix] Fixing false new private message indicator (Bug #14627)</li>
+ <li>[Fix] Let newly activated passwords work if users were converted (Bug #14787)</li>
+ <li>[Fix] Quote bbcode fixes. Letting parse quote=&quot;[&quot; and re-allowing whitelisted bbcodes within username portion (Bug #14770)</li>
+ <li>[Fix] Allow alternative text for styled buttons if images turned off, but CSS staying on</li>
+ <li>[Sec] Fix bbcode helpline display for custom bbcodes - this requires style changes for any custom style (Bug #14850)</li>
+ <li>[Fix] Correctly count announcements when filtering forums by date (Bug #14877)</li>
+ <li>[Fix] Allow charset names containing underscores or spaces</li>
+ <li>[Fix] Don't allow previous/next links for non-existing topics (Bug #15039)</li>
+ <li>[Change] Do not assign converted votes to the first option in a vote.</li>
+ <li>[Fix] Use correct RFC 2822 date format in emails (Bug #15042)</li>
+ <li>[Fix] Require founder status for some actions on founder-only groups (Bug #15119)</li>
+ <li>[Fix] Allow changing the &quot;now&quot; option of date CPFs (Bug #15111)</li>
+ <li>[Change] Some improvements to the caching of avatars</li>
+ <li>[Change] Set template recompilation to be disabled by default. All mod and style authors and all those who want to modify their styles should enabled it after installation.</li>
+ <li>[Change] Disable debug mode. All mod and style authors should enable DEBUG and DEBUG_EXTRA.</li>
+ <li>[Fix] Check error reporting level for all error level. This fixes a problem for hosts having manipulated the error handler. (Bug #14831)</li>
+ <li>[Feature] Constant PHPBB_DB_NEW_LINK introduced which can be used to force phpBB to create a new database connection instead of reusing an existing one if the dbms supports it (Bug #14927)</li>
+ <li>[Fix] Automatic URL parsing no longer allows dots in the schema but can parse URLs starting after a dot (Bug #15110)</li>
+ <li>[Fix] Dynamic width for birthday select boxes (Bug #15149)</li>
+ <li>[Fix] Recache Moderators when copying permissions. (Bug #15384)</li>
+ <li>[Fix] Propagate sort options in mcp_forums (Bug #15464)</li>
+ <li>[Change] Do not allow [size=0] bbcodes (font-size of 0)</li>
+ <li>[Fix] No duplication of active topics (Bug #15474)</li>
+ </ul>
+
+ <a name="v30rc6"></a><h3>1.ix. Changes since 3.0.RC6</h3>
+
+ <ul>
+ <li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
+ <li>[Fix] Fixed wrong bbcode handling for forum rules, forum descriptions and group descriptions</li>
+ <li>[Fix] Fixed faulty form tokens (Bug #14725, #14762 and #14755)</li>
+ <li>[Fix] Fixed bbcode uid generation in the phpBB2 converter (Bug #14722)</li>
+ <li>[Fix] Able to request new password (Bug #14743)</li>
+ </ul>
+
+ <a name="v30rc5"></a><h3>1.x. Changes since 3.0.RC5</h3>
+
+ <ul>
+ <li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
+ <li>[Feature] Constant PHPBB_ADMIN_PATH introduced, having the same purpose as PHPBB_ROOT_PATH, but for the ACP.</li>
+ <li>[Fix] Further fixing user profile view (please do not forget to update/refresh your template and style) (Bug #14230)</li>
+ <li>[Fix] Adjust google adsense bot information (Bug #14296)</li>
+ <li>[Fix] Fix horizontal scrollbar problem in IE6 (Bug #14228) - fix provided by Danny-dev</li>
+ <li>[Fix] Use correct size values in ACP user signature screen (Bug #13367)</li>
+ <li>[Fix] Attachment Place inline won't work with single quotes (Bug #14291)</li>
+ <li>[Fix] Unable to save email templates through ACP language page (Bug #14266)</li>
+ <li>[Fix] Correctly set user style for guest user (able to be changed within user management)</li>
+ <li>[Change] Moved note about dns_get_record function for using GTalk (Jabber) from Jabber log to Jabber ACP panel</li>
+ <li>[Fix] Do not use register_shutdown_function within cron.php if handling the queue and the mail function being used (Bug #14321)</li>
+ <li>[Fix] Fixing private message on-hold code if moving messages into folder based on rules (Bug #14309)</li>
+ <li>[Fix] Allow the merge selection screen to work (Bug #14363)</li>
+ <li>[Change] Require additional permissions for copying permission when editing forums </li>
+ <li>[Fix] Local magic URLs no longer get an additional trailing slash (Bug #14362)</li>
+ <li>[Fix] Do not let the cron script stale for one hour if register_shutdown_function is not able to be called (Bug #14436)</li>
+ <li>[Feature] Added /includes/db/db_tools.php file, which includes tools for handling cross-db actions such as altering columns, etc.</li>
+ <li>[Change] Reset the start parameter when the timeframe is changed in the mcp topic page (Ticket #14438)</li>
+ <li>[Change] Added Code for cleaning the confirm table to the session garbage collection</li>
+ <li>[Fix] Fixed token handling in jabber class for extremely spec-compliant XMPP server (Bug #14445)</li>
+ <li>[Fix] Disallowed galleries from using special characters (Bug #14466)</li>
+ <li>[Change] Listing the board url within the email text instead of appending it to the subject (Bug #14378)</li>
+ <li>[Fix] Always display the quote button as the most accessible one (this means edit is before quote in prosilver due to the way we lay out profiles)</li>
+ <li>[Fix] Use correct dimension (width x height) in ACP (Bug #14452)</li>
+ <li>[Fix] Only display PM history links if there are PM's to be displayed (Bug #14484)</li>
+ <li>[Feature] Added completely new hook system to allow better application/mod integration - see docs/hook_system.html</li>
+ <li>[Fix] Correctly delete excess poll options (Bug #14566)</li>
+ <li>[Fix] Allow names evaluating to false for poll options</li>
+ <li>[Change] use in-build functions for user online list (Bug #14596) - provided by rxu</li>
+ <li>[Fix] Fixing google cache display problems with Firefox (Bug #14472) - patch provided by Raimon</li>
+ <li>[Fix] Prevent topic unlocking if locked by someone else while posting (Bug #10307)</li>
+ <li>[Change] Allow years in future be selected for date custom profile field (Bug #14519)</li>
+ <li>[Fix] Don't display &quot;Avatars Disabled&quot; message on edit groups in UCP (Bug #14636)</li>
+ <li>[Change] Require confirm for deleting inactive users. (Bug #14641)</li>
+ <li>[Fix] Match custom BBCodes in the same way during first and second pass - patch provided by IBBoard (Bug #14268)</li>
+ <li>[Fix] Correct quote parsing if opening bracket before opening quote (Bug #14667)</li>
+ <li>[Fix] Clean post message for checking length to prevent posting empty messages</li>
+ <li>[Fix] Display jumpbox if needed for functionality (Bug #14702)</li>
+ <li>[Feature] Added an option to enforce that users spend a configurable amount of time on the terms page during registration</li>
+ <li>[Fix] Fixed copy permissions box in the ACP</li>
+ <li>[Fix] Enforce types for the user table during conversions</li>
+ <li>[Sec] Fixing possible XSS through compromised WHOIS server (#i63, #i64)</li>
+ <li>[Sec] Missing access control on whois in viewonline.php (#i51)</li>
+ <li>[Sec] Encoding some variables within user::page array correctly (to cope with browser not doing it correctly) to prevent XSS through functions re-using them (#i61)</li>
+ <li>[Sec] Fixed XSS through memberlist search feature (#i62)</li>
+ <li>[Sec] Fixed XSS through colour swatch (#i65)</li>
+ <li>[Sec] Fixed insecure attachment deletion (#i53)</li>
+ <li>[Sec] Only allow whitelisted protocols in meta_redirect/redirect (#i66)</li>
+ <li>[Sec] Check file names to be written in language management panel (#i52)</li>
+ <li>[Sec] Deregister globals if ini_get has been disabled (#i112)</li>
+ <li>[Sec] Added form tokens to most forms to enforce a lighter variant of CSRF protection (#i91 - #i96)</li>
+ <li>[Sec] Use new password hash method for forum passwords (#i43)</li>
+ <li>[Sec] Changed download file location to prevent flash crossdomain policies taking effect (#i8)</li>
+ <li>[Sec] Do not allow autocompletion for password on admin re-authentication (#i41)</li>
+ <li>[Sec] Made sure users are not completely locked out if they have a GLOBALS cookie (#i101)</li>
+ <li>[Sec] Use the secure hash to generate BBCODE_UIDs (#i71)</li>
+ <li>[Sec] Increase the length of BBCODE_UIDs (#i72)</li>
+ <li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
+ </ul>
+
+ <a name="v30rc4"></a><h3>1.xi. Changes since 3.0.RC4</h3>
+
+ <ul>
+ <li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
+ <li>[Fix] Allow MS SQL to properly connect when using the mssql driver and PHP is less than either 4.4.1 or 5.1 (Bug #13874)</li>
+ <li>[Fix] Ignore files containing HTML special chars in the filenames as gallery avatars (Bug #13906)</li>
+ <li>[Fix] Multiple PM recipients not separated (Bug #13876)</li>
+ <li>[Change] Split the select list for the smilie order to clarify which are feasible and which are not (Bug #13911)</li>
+ <li>[Fix] Convert empty homepage fields (Bug #13917)</li>
+ <li>[Fix] Use board default DST setting on creating new profiles (Bug #11563)</li>
+ <li>[Feature] New constant PHPBB_EMBEDDED can be used to let phpBB not call exit; if wrapped/embedded (We may re-check this constant on other code locations later too)</li>
+ <li>[Feature] append_sid() having a check for the function append_sid_phpbb_hook(). This function is called in favour of append_sid() with the exact same parameters if present.</li>
+ <li>[Fix] Only list enabled modes within the dropdown at user administration (Bug #13883) - patch provided by damnian</li>
+ <li>[Fix] Properly display ban reason if selecting banned entries within the ACP (Bug #13896)</li>
+ <li>[Fix] Properly parse SQL expressions for Oracle (Bug #13916)</li>
+ <li>[Fix] Added label bindings to the custom profile fields in the ACP (Bug #13936) - patch provided by damnian</li>
+ <li>[Change] Made group avatar/rank changes more intuitive</li>
+ <li>[Fix] Give more feedback in icon/smilie management (Bug #13295)</li>
+ <li>[Fix] Correctly set user::lang_id (Bug #14010)</li>
+ <li>[Fix] Properly display the smiley export screen (Bug #13968)</li>
+ <li>[Feature] Add "DECIMAL:", "PDECIMAL", and "PDECIMAL:" to the schema creation code (Bug #13999) - patch provided by poyntesm</li>
+ <li>[Fix] Don't show the notify checkbox in the approval queue if the only posts are written by ANONYMOUS (Bug #13973)</li>
+ <li>[Fix] Redirect to bots management page on edit/add (Bug #14073)</li>
+ <li>[Fix] Display locked icon in viewforum/prosilver if forum locked (Bug #14009)</li>
+ <li>[Feature] Display message history in compose PM screen</li>
+ <li>[Change] Do not force login on visiting topic/forum from notification emails (Bug #13818)</li>
+ <li>[Fix] Fixed cron_lock value for cron execution. This bug led to users having problems with the email queue and other cron related issues.</li>
+ <li>[Fix] Prevent white pages on php notices with gzip compression enabled (Bug #14096)</li>
+ <li>[Fix] Propagate the cleaned identifier for CFPs (Bug #14072)</li>
+ <li>[Fix] Do not display NO_TOPICS message if viewing non-postable category (Bug #13489)</li>
+ <li>[Fix] Let the theme immediately expire if changed from ACP for at least 30 minutes after change</li>
+ <li>[Fix] Do not append hilit= in search if highlighting term is empty (Bug #13910)</li>
+ <li>[Fix] Return to last page after voting in viewtopic instead of first page in topic (Bug #13976)</li>
+ <li>[Fix] If sending PM's to groups only include activated member (Bug #14040)</li>
+ <li>[Fix] Correctly wrap words in emails containing utf8 characters (Bug #14109)</li>
+ <li>[Change] For new posts or editing the first post topic titles have a maxlength of 60 characters. For any subsequent posts the length is extended to 64 to make room for the Re: part, but cutting at 60 characters. The maxlength need to be 64, else users using opera are unable to post (opera does not allow pre-filling a field with more characters than specified within the maxlength attribute)</li>
+ <li>[Fix] Disable gzip compression for cached stylesheet for Internet Explorer 6 or empty browser (IE6 is not able to properly display the compressed stylesheet) (Bug #14054)</li>
+ <li>[Fix] Header icons fixed in FF for RTL languages (Bug #14084)</li>
+ <li>[Change] Words in topic titles and post subjects are highlighted on the search results page and viewtopic too now (Bug #13383)</li>
+ <li>[Fix] Made sure strip_bbcode cannot get the idea that a smiley is a BBCode (Bug #14030)</li>
+ <li>[Change] Added a filter for user objects to LDAP configuration and improved explanations (Bug #12627)</li>
+ <li>[Fix] Display searchable subforums of invisible parents in advanced search forum selection (Bug #11395)</li>
+ <li>[Fix] Allow line breaks in custom BBCodes (Bug #10758)</li>
+ <li>[Fix] Ordered BBcode parsing functions in the same way everywhere where they are used</li>
+ <li>[Fix] Prevent {URL} token in custom BBCodes from make_clickable messing (Bug #14151)</li>
+ <li>[Sec] Added alternative tokens to custom BBCodes which are safe for CSS/Javascript and changed TEXT token to entitise opening and closing parantheses.</li>
+ <li>[Fix] Convert 2.0 moderator posting permissions (Bug #14105)</li>
+ <li>[Fix] Correctly apply PM box limit of 0 to custom folder (Bug #14154)</li>
+ <li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
+ </ul>
+
+ <a name="v30rc3"></a><h3>1.xii. Changes since 3.0.RC3</h3>
+
+ <ul>
+ <li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
+ <li>[Fix] Parse error in MCP ban (Bug #13109)</li>
+ <li>[Fix] Correctly hide online status in the profile (Bug #13059)</li>
+ <li>[Feature] Let the user choose how to update modified files (merging, using new file or using old file) within automatic updater</li>
+ <li>[Fix] An extra \ in an Oracle SQL regex was corrected (Bug #13151)</li>
+ <li>[Fix] Added a missing global to get_file() (Bug #13149)</li>
+ <li>[Fix] Hide autologin box when autologin is disabled (Bug #13093)</li>
+ <li>[Fix] Account for the forum id not being part of the request uri in prosilver (Bug #13121)</li>
+ <li>[Fix] Properly alter PostgreSQL tables</li>
+ <li>[Fix] Properly cache template files that were stored in the database (Bug #12675)</li>
+ <li>[Fix] Do not count the deletion of an unapproved topic as a decrease in normally viewable posts (Bug #13167)</li>
+ <li>[Fix] Allow column_exists() to return true if the column exists but no data is in the table</li>
+ <li>[Fix] Allow setting the smiley order via the select. Also allow to add smileys at the top. (Bug #13199)</li>
+ <li>[Fix] Fix php notice on sending jabber messages (Bug #13201)</li>
+ <li>[Fix] Make the window showing file differences a little wider (Bug #13157)</li>
+ <li>[Fix] Preserve preview style on search form (Bug #13205)</li>
+ <li>[Fix] Place attachment filename in new line in posting editor (Bug #9726)</li>
+ <li>[Fix] Don't allow caching to occur in the update sequence (Bug #13207)</li>
+ <li>[Fix] Enforce the max password length for automatically generated password created by the password sender (Bug #13181)</li>
+ <li>[Fix] Handle phpinfo() when expose_php is false (Bug #12777)</li>
+ <li>[Fix] Allow managing of forum roles without global users (Bug #13249)</li>
+ <li>[Change] Do not run cron script if board is disabled</li>
+ <li>[Fix] Correctly destroy sql cache for some query combinations (Bug #13237)</li>
+ <li>[Fix] Allow link forums being password protected (Bug #12967)</li>
+ <li>[Fix] Allow wrapping topic/post icons in posting editor (Bug #12843)</li>
+ <li>[Fix] Display L_RANK only once in template if rank title and image defined (Bug #13231)</li>
+ <li>[Fix] Make sure selected transfer method exists before calling (Bug #13265)</li>
+ <li>[Fix] Correctly escape language keys in language editor (Bug #13279)</li>
+ <li>[Fix] Correctly hide post/reply buttons if permissions are not given (related to Bug #12809)</li>
+ <li>[Fix] Remove orphan/wrong permission entries for non-existent forums - self-repairing permissions if conversions went &quot;crazy&quot;</li>
+ <li>[Feature] Allow &quot;older&quot; updates applied with the automatic updater. This allows people using it for updating, say, from 3.0.0 to 3.0.1 (with the correct package of course) and then from 3.0.1 to 3.0.2 if the latest version at this time is 3.0.2. These changes take effect beginning with RC4 or people replacing install/install_update.php manually prior doing the updates.</li>
+ <li>[Fix] Present correct error message if user tries to edit already read private message (Bug #13271)</li>
+ <li>[Fix] Also display board disabled notice for admins/mods if board got disabled due to exceeding the load limit (Bug #13267)</li>
+ <li>[Fix] Correctly deliver avatar if readfile function has been disabled (Bug #13309)</li>
+ <li>[Fix] Display php information page with the correct direction (Bug #12557)</li>
+ <li>[Fix] Increased the number of style objects (styles, templates, themes and imagesets) possible from 127 to 65535 for MySQL (Bug #13179)</li>
+ <li>[Fix] Although theoretically impossible in our code, removed the chance of trying to open a file that does not exist (Bug #13327)</li>
+ <li>[Fix] Although theoretically impossible in our code, changed the handling of non-existent language files (Bug #13329, #13331)</li>
+ <li>[Fix] Removed extra ampersand from ACP link (Bug #13315)</li>
+ <li>[Fix] used cleaned up version of given field identification for pre-filling a new custom profile field (Bug #13319)</li>
+ <li>[Fix] Correctly convert 2.0 website profile fields. (Bug #13379)</li>
+ <li>[Fix] Fixed the "Alphanumeric" and "Alphanumeric and spacers" username selection limitations (Bug #13391)</li>
+ <li>[Fix] Make sure filelist() is only returning array types (Bug #13385)</li>
+ <li>[Fix] Correctly mark forums read if using cookie based topic tracking (Bug #13245)</li>
+ <li>[Change] Put custom profile fields into top box and signature into separate box in members profile view (Bug #13357)</li>
+ <li>[Fix] Only show moderator log entries for forums the user is having moderation rights in (Bug #12481)</li>
+ <li>[Feature] Show resulting permission alone in trace window (Bug #10952) - thanks to dark/rain for the proposal</li>
+ <li>[Fix] Fixed bug in realpath replacement letting it actually work again</li>
+ <li>[Change] Try to be a bit more specific regarding global/local permission trace (Bug #11032)</li>
+ <li>[Fix] Fixed some strangeness in password validation due to mb_ereg()</li>
+ <li>[Fix] Subforums of a forum would overwrite the latest post information even if they did not contain the latest post (Bug #11931)</li>
+ <li>[Fix] Use global username display function on several places (Bug #11080, #11098) - patch by HoL</li>
+ <li>[Fix] Several viewonline fixes and feature changes. Also displaying the users browser in viewonline list to let the admin easier spot additional search bots, connected to a_user permission (Bug #11088) - patch and suggestions provided by HoL</li>
+ <li>[Change] u_viewprofile permission also affecting viewonline list now</li>
+ <li>[Fix] Do not display return to search link in prosilver if search is not allowed (Bug #11393)</li>
+ <li>[Fix] Use global url validation for img bbcode tag (Bug #11935)</li>
+ <li>[Fix] Added proper unicode support to style names (Bug #12165)</li>
+ <li>[Fix] Search result extract should not end in the middle of a multibyte character (Bug #11863)</li>
+ <li>[Fix] Missing localisation for an imageset no longer triggers a lot of &quot;imageset refreshed&quot; log messages (Bug #12027)</li>
+ <li>[Fix] Explain that themes which need parsing cannot be stored on the filesystem (Bug #11134)</li>
+ <li>[Fix] Normalize usernames</li>
+ <li>[Change] Improved utf8_clean_string with a more complete list of homographs and NFKC normalization</li>
+ <li>[Fix] Fixed error messages that ACP Database can give (Bug #13463)</li>
+ <li>[Fix] Fixed potential issues with databases that use tables names is uppercase</li>
+ <li>[Fix] Handle forum links/redirects within viewforum if no read permission given (to display login box or error message) (Bug #13467)</li>
+ <li>[Fix] Prevent changing postable forum having subforums to link forum without moving subforums out first</li>
+ <li>[Fix] Do not display version in admin template (Bug #13495)</li>
+ <li>[Fix] Allow manual specification of remote avatar dimensions if getimagesize is disabled (Bug #13531)</li>
+ <li>[Fix] Make viewonline use the session page's added forum parameter (Bug #13597)</li>
+ <li>[Fix] Correcting BBCode FAQ (Bug #11180)</li>
+ <li>[Fix] Make to/bcc line in view private message display consistent with other username displays in prosilver (Bug #11989)</li>
+ <li>[Fix] Send out activation email if admin activation is enabled and user activated through inactive users panel upon registration (Bug #12065)</li>
+ <li>[Change] Re-implemented All Yes/No/Never links in permission panels for easier changing all categories at once</li>
+ <li>[Change] Advanced permission link now &quot;marked&quot; if no role is assigned and custom permissions set. With this an admin can instantly see if the object is not set at all or having custom permissions, something you only saw if advanced permissions were viewed before.</li>
+ <li>[Fix] Change misleading custom BBCodes explanation, regarding tokens and useable template variables (Bug #12403, #5660)</li>
+ <li>[Feature] Ability to disable birthdays completely with new board features setting</li>
+ <li>[Fix] Fix disallowed username check (Bug #13511)</li>
+ <li>[Fix] Allow for unicode usernames to be pruned (Bug #13643)</li>
+ <li>[Fix] Do not copy forum permissions from self (Bug #13663)</li>
+ <li>[Fix] Allow for polls to work during preview (Bug #13657) - thanks to Thatbitextra</li>
+ <li>[Fix] Finer error conditions for sending IM messages (Bugs #13681, #13683)</li>
+ <li>[Fix] Add a confirmation for log deletion in the MCP (Bug #13693)</li>
+ <li>[Fix] Do not erase ranks and avatars when changing default groups (Bugs #13701, #13697)</li>
+ <li>[Fix] Limit author searches to firstpost, if selected (Bug #13579)</li>
+ <li>[Fix] Properly resync user post counts for users that have no posts (Bug #13581)</li>
+ <li>[Fix] Do not require space after , in smiley pak files (Bug #13647)</li>
+ <li>[Fix] Properly display the subscribe link in topic and forum display for Oracle (Bug #13583)</li>
+ <li>[Change] Add version number to ACP index (Bug #13703)</li>
+ <li>[Fix] Several fixes for custom profile fields on multi-lingual boards (Bugs #13763, #13527, #13525, #11515)</li>
+ <li>[Fix] Return to the mode previously selected after disaproving a post (Bug #13796)</li>
+ <li>[Fix] Cron now uses a locking variable to make sure it does not spawn too many webserver processes (Bug #12741)</li>
+ <li>[Fix] Cached stylesheet now supporting gzip compression</li>
+ <li>[Fix] Added link to inbox for deleted PMs (Bug #13813)</li>
+ <li>[Fix] Re-syncing the board stats also refreshes the newest user (Bug #13831)</li>
+ <li>[Feature] Ability to externally set $phpbb_root_path if wrapping phpBB3 by defining constant PHPBB_ROOT_PATH</li>
+ <li>[Fix] Implemented correct left/right floating within ACP in regard to RTL languages (Bug #13777)</li>
+ <li>[Fix] Fixing session problems when using MySQL strict mode in conjunction with very long browser agent string (Bug #13827)</li>
+ <li>[Fix] Disallow post/pm subjects entirely made up from non-printable chars and whitespaces (Bug #13800)</li>
+ <li>[Fix] Allow moving private messages from the sentbox (Bug #13791)</li>
+ <li>[Fix] Properly export localized imagesets</li>
+ <li>[Feature] Show the size of Firebird databases</li>
+ <li>[Fix] Show error when moving topic into a category via quickmod (Bug #11611)</li>
+ <li>[Fix] Allow Oracle to install on a database without specify the database name</li>
+
+ </ul>
+
+ <a name="v30rc2"></a><h3>1.xiii. Changes since 3.0.RC2</h3>
+
+ <ul>
+ <li>[Fix] Re-allow searching within the memberlist</li>
+ <li>[Fix] Force prune related values to integers during conversions</li>
+ <li>[Fix] Updater now detects successfully merged files having conflicts and user chose to merge with modifications (Bug #12685)</li>
+ <li>[Fix] Updater is no longer listing missing language entries and styles if these had been removed (Bug #12655)</li>
+ <li>[Fix] Correct approval of posts in global announcements (Bug #12699)</li>
+ <li>[Sec] Do not allow setup spiders/robots to post, even if permissions are given. We see no reason why this should be possible. (Thanks to Frank Rizzo for convincing us regarding this)</li>
+ <li>[Sec] Do not display the last active column within the memberlist if u_viewonline permission is not given (Bug #12797)</li>
+ <li>[Fix] Display custom profile field &quot;date&quot; based on users language (Bug #12787)</li>
+ <li>[Fix] Allow adding of help language files within subdirectories (Bug #12783)</li>
+ <li>[Fix] Correctly apply smileys on posting having # within their emotion code</li>
+ <li>[Fix] Correctly convert smileys having double quotes within their emotion code (Bug #12731)</li>
+ <li>[Fix] The converter now adds the protocol to user website profile fields missing it (Bug #12819)</li>
+ <li>[Fix] Correctly escape banned ip/email using wildcard for ban check (Bug #12815)</li>
+ <li>[Fix] Fixed some very nasty opera bugs (dropdown list bug, cpu spike bug) (Bug #12763, #11609)</li>
+ <li>[Fix] Font colour list having the correct height in IE (Bug #9571)</li>
+ <li>[Feature] Added mark/unmark all links to the bots page (Bug #12461)</li>
+ <li>[Fix] Introduced check on duplicate usernames during bot creation/edit (Bug #12461)</li>
+ <li>[Fix] Allow multibyte letters for smilie codes(Bug #12321)</li>
+ <li>[Fix] Correctly chmod created cache files (Bug #12859)</li>
+ <li>[Fix] Use our global expression for checking email syntax in memberlist (Bug #12827)</li>
+ <li>[Fix] Correctly retrieve/refresh templates stored in database if using subdirectories within template directory (Bug #12839)</li>
+ <li>[Fix] Correctly translate special group names in ucp_groups.php (Bug #12597)</li>
+ <li>[Fix] Search boxes not losing session id (changing method from get to post) (Bug #12643)</li>
+ <li>[Fix] Make sure the automatic update is also working for those having fsockopen disabled</li>
+ <li>[Fix] Simulate recache of theme data on automatic update finished page - recaching it if css data changed</li>
+ <li>[Feature] Allow dropping in custom &quot;info_[module class]_*.php&quot; files to language/*/mods directory for inclusion into the menu structure without the need to modify phpBB language files for menu placements</li>
+ <li>[Fix] Added login box to egosearch (Bug #12941)</li>
+ <li>[Fix] Deal with slashed quotes during quote bbcode conversion (Bug #12607)</li>
+ <li>[Fix] Minor language and style fixes (Bugs #12235, #12493, #11949)</li>
+ <li>[Feature] Added backlinks to mcp_report (Bug #12905)</li>
+ <li>[Fix] Only check usernames in guest posts upon edit (Bug #11349)</li>
+ <li>[Fix] Consider viewonline permission when viewing friends/foes (Bug #12955)</li>
+ <li>[Fix] Added proper unicode support to ban reasons (Bug #12947)</li>
+ <li>[Fix] The forum/topic sync code now recognizes other ways that the latest post in a topic can be expressed (Bug #12947) - patch provided by APTX</li>
+ <li>[Fix] Topic deletion via the user post deletion mechanism did not take into account statistics for forums that hold shadow topics (Bug #12981)</li>
+ <li>[Fix] Allow for negative and decimal numbers to be in transposed queries in the Oracle and Firebird DBAL (Bug #13033)</li>
+ <li>[Fix] Some jabber related bugs (Bug #12989, #11805, #11809)</li>
+ <li>[Fix] Added UTF-8 support for banning via the MCP (Bug #13013)</li>
+ <li>[Fix] Properly detect the script name in session::extract_current_page() if PHP_SELF is not defined (Bug #12705) - patch provided by ToonArmy</li>
+ <li>[Fix] Show role mask for global permission class under Permissions-&gt;Permission Roles (Bug #13057)</li>
+
+ </ul>
+
+ <a name="v30rc1"></a><h3>1.xiv. Changes since 3.0.RC1</h3>
+
+ <ul>
+ <li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
+ <li>[Fix] Tiny language and grammar changes</li>
+ <li>[Fix] Several style related fixes, mainly fixing cross-browser issues</li>
+ <li>[Fix] Several RTL fixes within prosilver</li>
+ <li>[Fix] MCP looses forum_id in some panels (Bug #11255)</li>
+ <li>[Fix] Moderation queue used unfriendly notification of no posts/topics (Bug #11291)</li>
+ <li>[Fix] Array in Oracle DBAL not always set (Bug #11475)</li>
+ <li>[Fix] Improper continue; in acp_styles.php (Bug #11523)</li>
+ <li>[Fix] Imageset editor more friendly (Bug #11511)</li>
+ <li>[Fix] Made Custom BBCode validation more strict (Bug #11335)</li>
+ <li>[Fix] Proper sync of data on topic copy (Bug #11335)</li>
+ <li>[Fix] Introduced ORDER BY clauses to converter queries (Bug #10697)</li>
+ <li>[Fix] Stopped bots from getting added to the registered users group during conversion (Bug #11283)</li>
+ <li>[Fix] Filled &quot;SMILIEYS_DISABLED&quot; template variable (Bug #11257)</li>
+ <li>[Fix] Properly escaped the delimiter in disallowed username comparisons (Bug #11339)</li>
+ <li>[Fix] Check global purge setting (Bug #11555)</li>
+ <li>[Fix] Improper magic url parsing applied to already parsed [url=] bbcode tag (Bug #11429)</li>
+ <li>[Fix] Renamed two indicies for Oracle support (Bug #11457)</li>
+ <li>[Fix] Added support for ISO-8859-8(-i) in the character set convertor (Bug #11265, #12039)</li>
+ <li>[Fix] Added support for Oracle's &quot;easy connect naming&quot;</li>
+ <li>[Fix] Let Mark/Unmark All work in Manage Drafts (Bug #11679)</li>
+ <li>[Fix] Display correct message if no attachments found in user administration (Bug #11629)</li>
+ <li>[Fix] Let the &quot;Delete all board cookies&quot; being displayed for guests too (only prosilver) (Bug #11603)</li>
+ <li>[Fix] Do not display view topic link in MCP while there is no link present (Bug #11573)</li>
+ <li>[Fix] MySQL now properly sorts by post_subject (Bug #11637)</li>
+ <li>[Fix] Introduced checks to stop negative postcounts (Bug #11561, #11421)</li>
+ <li>[Fix] Allow IP v4/v6 urls for remote avatars (Bug #11633)</li>
+ <li>[Fix] Delete avatar files automatically (Bug #11631)</li>
+ <li>[Fix] Automatically add selected columns to group by statements in the converter (Bug #11465)</li>
+ <li>[Fix] Allow posts without subjects to be clicked in the MCP (Bug #11483)</li>
+ <li>[Fix] Sync the forums that shadow topics reside in when the topic that they point to is deleted</li>
+ <li>[Fix] Do not use the gen_random_string function to create cookie names during install (Bug #11431)</li>
+ <li>[Fix] Send stylesheet in style.php even without a valid session id (Bug #11531)</li>
+ <li>[Fix] request_var should strictly return the requested number of dimensions</li>
+ <li>[Fix] Correct assignment of custom width to $user-&gt;img(); / Correctly display poll bars in subsilver2 (Bug #11301)</li>
+ <li>[Fix] Allow removing polls in prosilver</li>
+ <li>[Fix] Correct link to post in managing users attachments (Bug #11765)</li>
+ <li>[Fix] Reload confirm screen for selecting new forum for global topic type change if not postable forum is chosen (Bug #11711)</li>
+ <li>[Fix] Correctly show system default color for disabled options in Internet Explorer which does not support disabled option fields</li>
+ <li>[Fix] Update query for custom profiles in user management used wrong order for left/right delimiter (affecting mssql) (Bug #11781)</li>
+ <li>[Fix] Inconsistent display of more smileys link fixed (Bug #11801)</li>
+ <li>[Fix] Outbox messages are no always neither new nor unread post-conversion (Bug #11461)</li>
+ <li>[Feature] Replaced outdated jabber class with the one from the flyspray project</li>
+ <li>[Feature] The converter no longer relies on the smiley ID to decide if it should be displayed on the posting page</li>
+ <li>[Change] Limit maximum number of allowed characters in messages to 60.000 by default. Admins should increase their PHP time limits if they want to raise this tremedously.</li>
+ <li>[Change] Some changes to the conversion documentation</li>
+ <li>[Fix] Only use permissions from existing forums during the conversion (Bug #11417)</li>
+ <li>[Fix] Do not permit the decimal as a valid prefix character (Bug #11967)</li>
+ <li>[Fix] Account for the fact that the IM fields might hold non-IM information</li>
+ <li>[Fix] Make the queue function on post details</li>
+ <li>[Fix] Check if there are active styles left before deleting a style</li>
+ <li>[Fix] Correctly update styles after the deletion of an imageset.</li>
+ <li>[Fix] Replaced jabber validation to use the method used by the new jabber class (Bug #9822)</li>
+ <li>[Sec] Adding confirm boxes to UCP group actions (ToonArmy)</li>
+ <li>[Feature] Added the option to disable the flash bbcode globally (DelvarWorld)</li>
+ <li>[Sec] Changed the embedding of Flash (NeoThermic, DelvarWorld)</li>
+ <li>[Fix] Use the signature setting for PMs (Bug #12001)</li>
+ <li>[Fix] Made the DBMS selection use language variables (Bug #11969)</li>
+ <li>[Fix] Make sure that a folder is used when viewing messages to oneself (Bug #12105)</li>
+ <li>[Fix] Account for the fact that a board might have no visible Admins (Bug #12185)</li>
+ <li>[Fix] Change group ranks even if empty (Bug #12231)</li>
+ <li>[Fix] Correctly propagate variables across the custom profile field wizard (Bug #12237)</li>
+ <li>[Fix] Correctly move pm's into folders if more than one is received (Bug #12135)</li>
+ <li>[Fix] Corrected various bugs with CPF on multi-language boards (Bug #11803)</li>
+ <li>[Fix] Disable notify checkbox in posting editor when board email is disabled (Bug #12263)</li>
+ <li>[Fix] Removed maxlength from password/username fields (Bugs #12215, #11797)</li>
+ <li>[Fix] Use icon-unsubscribe in prosilver (Bug #12211)</li>
+ <li>[Fix] Seperated PREVIOUS/NEXT language vars for pagination and next/previous step (Bug #12197)</li>
+ <li>[Feature] append_sid() supporting anchor (Bug #11535) - patch provided by Schumi and ToonArmy</li>
+ <li>[Fix] Remember selected language while registering after submit (Bug #11435)</li>
+ <li>[Fix] UTF-8 support in theme and template editors (Bug #12251)</li>
+ <li>[Fix] Allow for posts per page in the MCP to change during topic selection (Bug #12067)</li>
+ <li>[Fix] Remove group avatars upon deletion from all profiles, not just the people having the group as default (Bug #12275, #12267)</li>
+ <li>[Fix] Allow for conversions to SQLite (Bug #12279) - patch provided by ToonArmy</li>
+ <li>[Fix] Apply colours to guests (Bug #12219)</li>
+ <li>[Fix] Set the Admin group as founder_manage during conversion (Bug #12287)</li>
+ <li>[Fix] Fixed a special quote BBCode case (Bug #12189)</li>
+ <li>[Fix] Correctly parse BBCodes in a post when a poll is being used (Bug #11833)</li>
+ <li>[Fix] Remember attached files on PM edit (Bug #12019)</li>
+ <li>[Fix] Correctly display poll ending on preview (Bug #12303)</li>
+ <li>[Feature] Display the success message on posting longer for posts awaiting approval (Bug #12053)</li>
+ <li>[Fix] Display maximum and entered number of characters for the &quot;maximum number of characters exceeded&quot; error messages (Bug #11981)</li>
+ <li>[Fix] Wrongly applied setting for allowing links in private messages (used the signature setting instead of the post setting) (Bug #11945)</li>
+ <li>[Fix] Unread flag for multipage topic wrongly set under some conditions (Bug #12127) - fix provided by asinshesq</li>
+ <li>[Fix] Able to delete posts within user prune panel (Bug #11849)</li>
+ <li>[Feature] Allow to specify dimensions of images manually on imageset config (Bug #11675)</li>
+ <li>[Fix] Correctly re-assign query result id after seeking rows (MSSQL/Firebird) (Bug #12369)</li>
+ <li>[Feature] Make effect of a changed hideonline permission instantaneous</li>
+ <li>[Fix] Do not overwrite larger memory values in the installer (Bug #12195)</li>
+ <li>[Fix] Order forums on role permission mask (Bug #12337)</li>
+ <li>[Fix] Show "no image" image when a non-selectable item was selected in the acp imageset editor - IE (Bug #12423)</li>
+ <li>[Fix] Update session information without new pageload (Bug #12393, Bug #12441)</li>
+ <li>[Fix] Let polls be edited correctly (Bug #12433)</li>
+ <li>[Fix] Overcome Oracle's inability to handle IN() clauses with over one thousand elements (Bug #12449)</li>
+ <li>[Fix] Simulate Firebird's affected rows mechanism for older versions of PHP</li>
+ <li>[Fix] Custom BBCodes properly handle lowercasing of parameterized tags (Bug #12377)</li>
+ <li>[Fix] Update the forum_id sequence for PostgreSQL during conversion (Bug #11927)</li>
+ <li>[Fix] Allow for multiple tags containing URL and LOCAL_URL tokens (Bug #12473)</li>
+ <li>[Fix] Properly display forum list in the MCP Queue (Bug #11313)</li>
+ <li>[Fix] Use the localised guest name for quotes (Bug #12483)</li>
+ <li>[Fix] Added post anchor to links in default warning message (Bug #12489)</li>
+ <li>[Fix] Allow 5 digits in editing time fields (Bug #12489)</li>
+ <li>[Fix] MS SQL DBAL drivers now write over extension limitations, they are too low for most installations (Bug #12415)</li>
+ <li>[Fix] Fix sorting by author on "unanswered posts" (Bug #12545)</li>
+ <li>[Fix] Allow searching for multibyte authors (Bug #11793)</li>
+ <li>[Fix] Writing directories/files with correct permissions using FTP for transfers on PHP4</li>
+ <li>[Fix] Oracle sequences during conversions are now corrected (Bug #12555)</li>
+ <li>[Fix] Allow users to continue after selecting "No" in the merge quickmod confirmation (Bug #12577)</li>
+ <li>[Fix] Correctly check permissions on the UCP subscription/bookmark pages (Bug #12595)</li>
+ <li>[Fix] Only convert non-orphaned PMs</li>
+ <li>[Fix] Fixed a few Postgres related errors (Bug #12587)</li>
+ <li>[Feature] New DBAL wrapper for LIKE expressions / sql_like_expression()</li>
+ <li>[Sec] Stricter validation of language entries. </li>
+
+ </ul>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="disclaimer"></a><h2>2. Copyright and disclaimer</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+<!-- END DOCUMENT -->
+
+ <div id="page-footer">
+ <div class="version">Note that a full list of fixed bugs can be found at the bug tracker (<a href="README.html#bugs">see section on bug reporting</a>)</div>
+ </div>
+</div></div>
+
+<div>
+ <a id="bottom" name="bottom" accesskey="z"></a>
+</div>
+
+</body>
+</html>
diff --git a/phpBB/docs/COPYING b/phpBB/docs/COPYING
new file mode 100644
index 0000000000..ce992b2ce7
--- /dev/null
+++ b/phpBB/docs/COPYING
@@ -0,0 +1,281 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
diff --git a/phpBB/docs/FAQ.html b/phpBB/docs/FAQ.html
new file mode 100644
index 0000000000..f91d4bc223
--- /dev/null
+++ b/phpBB/docs/FAQ.html
@@ -0,0 +1,352 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="content-language" content="en" />
+<meta http-equiv="imagetoolbar" content="no" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<meta name="copyright" content="2007 phpBB Group" />
+<meta name="keywords" content="" />
+<meta name="description" content="phpBB 3.0.x frequently asked questions" />
+<title>phpBB3 &bull; FAQ</title>
+
+<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
+
+</head>
+
+<body id="phpbb" class="section-docs">
+
+<div id="wrap">
+ <a id="top" name="top" accesskey="t"></a>
+ <div id="page-header">
+ <div class="headerbar">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div id="doc-description">
+ <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
+ <h1>phpBB 3.0.x FAQ</h1>
+ <p>phpBB 3.0.x frequently asked questions</p>
+ <p style="display: none;"><a href="#start_here">Skip</a></p>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ </div>
+
+ <a name="start_here"></a>
+
+ <div id="page-body">
+
+<!-- BEGIN DOCUMENT -->
+
+ <p>This is a very basic Frequently Asked Questions (FAQ) page which attempts to answer some of the more commonly asked questions. It is by no means exhaustive and should be used in combination with the 'built-in' User FAQ within phpBB3, the community forums and our IRC channel (see <a href="README.html">README</a> for details).</p>
+
+ <h1>FAQ</h1>
+
+ <div class="paragraph menu">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<!-- add entry about common UTF8 problems (for example wrong uploading, editing) -->
+<ul>
+ <li><a href="#install">I am finding phpBB too difficult to install. Will you do it for me?</a></li>
+ <li><a href="#legal">I am having problems with the admin at a certain board, help!</a></li>
+ <li><a href="#legal">A board has ripped off my graphics/software/etc., stop them!</a></li>
+ <li><a href="#legal">A board is dealing in warez/porn/etc., you need to prevent them doing this!</a></li>
+ <li><a href="#legal">I want to sue you because i think you host an illegal board!</a></li>
+ <li><a href="#viewonline">According to viewonline a user is doing/reading something they should not be able to!</a></li>
+ <li><a href="#mail">I keep getting Mail sending errors when I (or my users) post/send PM's/etc.!</a></li>
+ <li><a href="#mail_language">My users are complaining that emails are not in their selected language!</a></li>
+ <li><a href="#aol_browser">My AOL based users keep getting logged out!</a></li>
+ <li><a href="#avatars">I am unable to upload avatars from my computer, regardless of the settings.</a></li>
+ <li><a href="#gallery_avatars">I just cannot get gallery avatars to appear!</a></li>
+ <li><a href="#permissions">How do I use/set permissions?</a></li>
+ <li><a href="#login_issues">I (or my users) cannot stay logged in to the forum!</a></li>
+ <li><a href="#logout_issues">My users are complaining about being logged out too quickly!</a></li>
+ <li><a href="#not_answered">My question isn't answered here!</a></li>
+ <li><a href="#disclaimer">Copyright and disclaimer</a></li>
+</ul>
+
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+ <a name="install"></a><h2>I am finding phpBB too difficult to install. Will you do it for me?</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>Simple answer, no we will not. We are not being difficult when we say this we are actually trying to help you. phpBB has a reputation for being easy to install, that reputation is we believe well deserved. It is a simple process of unarchiving a single file, uploading the resulting directory/files to their intended location and entering some data in a web based form. The sequence of events, what to type where, etc. is covered in detail in the accompanying <a href="INSTALL.html">INSTALL.html</a> documentation. If you cannot install phpBB3 the chances are you will be unable to administer or update it.</p>
+
+<p>There are people, companies (unrelated to your hosting provider), etc. that will install your forum, either for free or for a payment. We do not recommend you make use of these offers. Unless the service is provided by your hosting company you will have to divulge passwords and other sensitive details. If you did not know how to use an ATM would you give a passer-by your bank card and PIN and ask them to show you what to do? No, probably not! The same applies to your hosting account details!</p>
+
+<p>We think a better solution is for you to carefully read the enclosed documentation, read through our knowledge base at <a href="http://www.phpbb.com/">www.phpbb.com</a> and if necessary ask for help on any thing you get stuck on. However, the decision is yours but please note we may not offer support if we believe you have had the board installed by a third party. In such cases you should direct your questions to that company or person/s.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="legal"></a><h2>I am having problems with the admin at a certain board, help!<br />
+A board has ripped off my graphics/software/etc., stop them!<br />
+A board is dealing in warez/porn/etc., you need to prevent them doing this!<br />
+I want to sue you because i think you host an illegal board!</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>We provide the software, we have absolutely nothing to do with any board that runs it (beyond phpbb.com of course!) and we also do not host any site. The GPL grants the user an unlimited right of use subject to their adherence of that licence. Therefore we cannot prevent, dictate, control or otherwise limit the use of phpBB software. So please do not contact us for such matters.</p>
+
+<p>If you have a problem with a given board please take it up with them, not us. We are not and cannot be held legally responsible for any third party use of this software (much like Microsoft et al cannot be held responsible for the use of Windows in illegal activities, etc.). Additionally we do <strong>not</strong> track the use of phpBB software in any way. So please do not ask us for details on a &quot;given&quot; board we will not be able to help you. If any law firms or lawyers out there send us writs, cease and desist orders, etc. for third party website use of this software we reserve the right to charge for time wasted dealing with such issues...</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="viewonline"></a><h2>According to viewonline a user is doing/reading something they should not be able to!</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>No, they probably are not. phpBB uses sessions to keep track of users as they move between pages. The session information tells us who this user is. Therefore in order to determine what a user can do on a page we first need the session details. Once this data is available we can check whether the user is permitted to do whatever it is they are trying to do. This can result in it appearing as if a user is reading a topic in a forum they should not be able to access. Or perhaps viewing private messages when they are only guests, etc. In practice the user is not doing these things, they are viewing a &quot;You are not permitted to do this&quot; type message. The session data has simply been updated before we were able to determine what the user could or could not do.</p>
+
+<p>Of course this only applies where permissions have been set correctly!</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="mail"></a><h2>I keep getting Mail sending errors when I (or my users) post/send PM's/etc.!</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>This error will occur if phpBB cannot send mail. phpBB can send email two ways; using the PHP <code>mail()</code> function or directly via SMTP. Some hosting providers limit the <code>mail()</code> function to prevent its use in spamming, others may rename it or limit its functionality. If the <code>mail()</code> function got renamed, you are able to enter the correct name within the administration control panel. In either case you may need to make use of SMTP. This requires that you have access to such a facility, e.g. your hosting provider may provide one (perhaps requiring specific written authorisation), etc. Please see <a href="http://www.phpbb.com/">www.phpbb.com</a> for additional help on this matter.</p>
+
+<p>If you do require SMTP services please do not ask (on our forums or elsewhere) for someone to provide you with one. Open relays are now things of the past thanks to the unthinking spammers out there. Therefore you are unlikely to find someone willing to offer you (free) services.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="mail_language"></a><h2>My users are complaining that emails are not in their selected language!</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>You must have deleted a language pack or the language pack is incomplete. phpBB will try to send emails in the users selected language. If it cannot find a suitable email template it will switch to the boards default language.</p>
+
+<!-- additional entry about encoded emails -->
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="aol_browser"></a><h2>My AOL based users keep getting logged out!</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>phpBB uses sessions to keep track of users as they browse the board. These sessions use a combination of a unique session id, the users IP and if specified the users browser and/or the users x-forwarded-for header to identify each user. We make use of all of this as an extra safe-guard to help prevent sessions being hijacked (by discovering the unique session id).</p>
+
+<p>Unfortunately this only works when the users IP is constant as they browse the board. For most users this will be the case. However certain providers route their users via a cluster of proxys. In some cases, particularly the AOL browser, this results in different IPs being forwarded as the user moves between pages. We take account of this by not checking the entire IP by default but only the first "three quads" (<samp>A.B.C</samp>). Again in most cases this will be fine. However again AOL uses IPs which can vary so much that checking only the first two quads results in a fairly static IP being available for session validation.</p>
+
+<p>If you are experiencing problems related to this you can set the Session IP validation parameter found in <code>Admin-&gt;General-&gt;Server Configuration-&gt;Security Settings</code> to <samp>A.B</samp>. Please note that reducing the IP validation length does potentially increase the risk of sessions being hijacked (this is something for you to consider, phpBB Group takes no responsibility should anything happen!). We suggest to at least additionally enable the browser validation.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="avatars"></a><h2>I am unable to upload avatars from my computer, regardless of the settings.</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>There are two possibilities here, the first is you have not created the directory you specified as the storage location for avatars, ie. as specified in the <code>Admin -&gt; General -&gt; Board Configuration -&gt; Avatar settings</code> section. If the directory does not exist uploadeable avatars are automatically disabled. You should create the required directory (ensuring it has global write access or other appropriate permissions to allow the webserver to write files to it).</p>
+
+<p>The second possibility is that your provider has disabled file_upload support. You should contact your provider and ask them if this is the case. There is not a lot you can do, there are still three other avatar settings left to choose from including uploading via an URL which will work fine.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="gallery_avatars"></a><h2>I just cannot get gallery avatars to appear!</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>phpBB categorises gallery avatars and it does this by reading through folders contained in the location you specified as being the gallery path. For example, if you set the gallery path to <samp>images/avatars/gallery</samp> phpBB will expect to find a series of folders within that path, e.g. <samp>images/avatars/gallery/moviestars</samp>, <samp>images/avatars/gallery/cartoons</samp>, <samp>images/avatars/gallery/misc</samp>, etc. Placing images directly in <samp>images/avatars/gallery/</samp> will result in nothing being listed in your gallery.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="permissions"></a><h2>How do I use/set permissions?</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>Please read the paragraph about permissions in our extensive <a href="http://www.phpbb.com/support/documentation/3.0/">online documentation</a>.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="login_issues"></a><h2>I (or my users) cannot stay logged in to the forum!</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>If you (or your users) are, after attempting a login, being returned to the index (or other page) without appearing to be logged in the most likely problem is incorrect cookie settings. phpBB uses cookies to store a session id and a small amount of user data. For this data to be stored correctly the cookie domain, name, path and secure settings must be correct. You can check this in <code>Admin-&gt;General-&gt;Server Configuration-&gt;Cookie Settings</code>. Typically the cookie domain can be left blank and the cookie path set to <samp>/</samp> (a single forward slash). Do <strong>not</strong> set the cookie as being secure unless your board is running over a secure sockets layer connection, ie. https://</p>
+
+<p>If you still have problems try setting the cookie domain to your full domain name, e.g. <samp>www.mysystem.tld</samp>, <samp>www.something.mydomain.tld</samp>. You <strong>must</strong> ensure the domain name contains at least two dots or browsers will be unlikely to recognise the cookie, e.g. <samp>.mydomain.com</samp>, <samp>mydomain.com</samp>. Do <strong>not</strong> add http:// or anything else to the domain name!</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="logout_issues"></a><h2>My users are complaining about being logged out too quickly!</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>You can increase the default length of sessions (ie. how long before a users session is considered 'dead') in <code>Admin-&gt;General-&gt;Server Configuration-&gt;Load Settings</code>. Set it to whatever value your users feel comfortable with, remember that security issues may affect your decision (ie. having too long a session may allow non-users to abuse your board should a user forget to logout or otherwise leave a current session on a public workstation).</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="not_answered"></a><h2>My question isn't answered here!</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>Please read our <a href="http://www.phpbb.com/support/documentation/3.0/">extensive user documentation</a> first, it may just explain what you want to know.</p>
+
+<p>Feel free to search our community forum for the information you require. <strong>PLEASE DO NOT</strong> post your question without having first used search, chances are someone has already asked and answered your question. You can find our board here:</p>
+
+<p><a href="http://www.phpbb.com">www.phpbb.com</a></p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="disclaimer"></a><h2>Copyright and disclaimer</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+<!-- END DOCUMENT -->
+
+ <div id="page-footer">
+ <div class="version">&nbsp;</div>
+ </div>
+</div></div>
+
+<div>
+ <a id="bottom" name="bottom" accesskey="z"></a>
+</div>
+
+</body>
+</html>
diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html
new file mode 100644
index 0000000000..c297abe267
--- /dev/null
+++ b/phpBB/docs/INSTALL.html
@@ -0,0 +1,448 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="content-language" content="en" />
+<meta http-equiv="imagetoolbar" content="no" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<meta name="copyright" content="2007 phpBB Group" />
+<meta name="keywords" content="" />
+<meta name="description" content="phpBB 3.0.x Installation, updating and conversion informations" />
+<title>phpBB3 &bull; Install</title>
+
+<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
+
+</head>
+
+<body id="phpbb" class="section-docs">
+
+<div id="wrap">
+ <a id="top" name="top" accesskey="t"></a>
+ <div id="page-header">
+ <div class="headerbar">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div id="doc-description">
+ <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
+ <h1>phpBB 3.0.x Install</h1>
+ <p>phpBB 3.0.x Installation, updating and conversion informations</p>
+ <p style="display: none;"><a href="#start_here">Skip</a></p>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ </div>
+
+ <a name="start_here"></a>
+
+ <div id="page-body">
+
+<!-- BEGIN DOCUMENT -->
+
+<p><strong>Please read this document completely before proceeding with installation, updating or converting.</strong></p>
+
+<p>This document will walk you through the basics on installing, updating and converting the forum software.</p>
+
+<p>A basic overview of running phpBB3 can be found in the accompanying <a href="README.html">README</a> file. Please ensure you read that document in addition to this! For more detailed information on using, installing, updating and converting phpBB3 you should read <a href="http://www.phpbb.com/support/documentation/3.0/">the documentation</a> available online.</p>
+
+<h1>Install</h1>
+
+ <div class="paragraph menu">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<ol>
+ <li><a href="#quickinstall">Quick install</a></li>
+ <li><a href="#require">Requirements</a></li>
+ <li><a href="#install">New installation</a></li>
+ <li><a href="#update">Updating from stable releases of phpBB 3.0.x</a>
+ <ol style="list-style-type: lower-roman;">
+ <li><a href="#update_full">Full package</a></li>
+ <li><a href="#update_files">Changed files only</a></li>
+ <li><a href="#update_patch">Patch file</a></li>
+ <li><a href="#update_auto">Automatic update package</a></li>
+ <li><a href="#update_all">All package types</a></li>
+ </ol>
+ </li>
+ <li><a href="#convert">Conversion from phpBB 2.0.x to phpBB 3.0.x</a>
+ <ol style="list-style-type: lower-roman;">
+ <li><a href="#prereq">Requirements before converting</a></li>
+ <li><a href="#conversion">Converting</a></li>
+ <li><a href="#postreq">Things to do after conversion</a></li>
+ <li><a href="#convprob">Common conversion problems</a></li>
+ </ol>
+ </li>
+ <li><a href="#postinstall">Important (security related) post-Install tasks for all installation methods</a>
+ <ol style="list-style-type: lower-roman;">
+ <li><a href="#avatars">Uploadable avatars</a></li>
+ </ol>
+ </li>
+ <li><a href="#disclaimer">Disclaimer</a></li>
+</ol>
+
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+ <a name="quickinstall"></a><h2>1. Quick install</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>If you have basic knowledge of using FTP and are sure your hosting service or server will run phpBB3 you can use these steps to quickly get started. For a more detailed explanation you should skip this and go to <a href="#require">section 2</a> below.</p>
+
+ <ol>
+ <li>Decompress the phpBB3 archive to a local directory on your system.</li>
+ <li>Upload all the files contained in this archive (retaining the directory structure) to a web accessible directory on your server or hosting account.</li>
+ <li>Change the permissions on config.php to be writable by all (666 or -rw-rw-rw- within your FTP Client)</li>
+ <li>Change the permissions on the following directories to be writable by all (777 or -rwxrwxrwx within your FTP Client):<br />
+ <code>store/</code>, <code>cache/</code>, <code>files/</code> and <code>images/avatars/upload/</code>.</li>
+ <li>Using your web browser visit the location you placed phpBB3 with the addition of install/index.php or pointing directly to install/, e.g. http://www.mydomain.com/phpBB3/install/, http://www.mydomain.com/forum/install/ etc.</li>
+ <li>Click the <em>INSTALL</em> tab, follow the steps and fill out all the requested information.</li>
+ <li>Change the permissions on config.php to be writable only by yourself (644 or -rw-r--r-- within your FTP Client)</li>
+ <li>phpBB3 should now be available, please <strong>MAKE SURE</strong> you read at least <a href="#postinstall">Section 6</a> below for important, security related post-installation instructions.</li>
+ </ol>
+
+ <p>If you experienced problems or do not know how to proceed with any of the steps above please read the rest of this document.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+ <a name="require"></a><h2>2. Requirements</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>phpBB3 has a few requirements which must be met before you are able to install and use it.</p>
+
+ <ul>
+ <li>A webserver or web hosting account running on any major Operating System with support for PHP</li>
+ <li>A SQL database system, <strong>one of</strong>:
+ <ul>
+ <li>MySQL 3.23 or above (MySQLi supported)</li>
+ <li>PostgreSQL 7.3+</li>
+ <li>SQLite 2.8.2+</li>
+ <li>Firebird 2.1+</li>
+ <li>MS SQL Server 2000 or above (directly or via ODBC)</li>
+ <li>Oracle</li>
+ </ul>
+ </li>
+ <li><strong>PHP 4.3.3+ (>=4.3.3, >4.4.x, >5.x.x, >6.0-dev (compatible))</strong> with support for the database you intend to use.</li>
+ <li>getimagesize() function need to be enabled.</li>
+ <li>These optional presence of the following modules within PHP will provide access to additional features, but they are not required.
+ <ul>
+ <li>zlib Compression support</li>
+ <li>Remote FTP support</li>
+ <li>XML support</li>
+ <li>Imagemagick support</li>
+ <li>GD Support</li>
+ </ul>
+ </li>
+ </ul>
+
+ <p>If your server or hosting account does not meet the requirements above we are afraid phpBB3 is not for you.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+ <a name="install"></a><h2>3. New installation</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>Installation of phpBB3 will vary according to your server and database. If you have <em>shell access</em> to your account (via telnet or ssh for example) you may want to upload the entire phpBB3 archive (in binary mode!) to a directory on your host and unarchive it there.</p>
+
+ <p>If you do not have shell access or do not wish to use it you will need to decompress the phpBB3 archive to a local directory on your system using your favourite compression program, e.g. winzip, rar, zip, etc. From there you must FTP <strong>ALL</strong> the files it contains (being sure to retain the directory structure and filenames) to your host. Please ensure that the cases of filenames are retained, do <strong>NOT</strong> force filenames to all lower or upper case doing so will cause errors later.</p>
+
+ <p>All .php, .inc, .sql, .cfg, .html and .txt files should be uploaded in <strong>ASCII</strong> mode, while all graphics should be uploaded in <strong>BINARY</strong> mode. If you are unfamiliar with what this means please refer to your FTP client documentation. In most cases this is all handled transparantly by your ftp client but if you encounter problems later you should be sure the files where uploaded correctly as described here.</p>
+
+ <p>phpBB3 comes supplied with english as its standard language. However a number of separate packs for different languages are available. If you are not a native english speaker you may wish to install one or more of these packages before continuing. The installation process below will allow you to select a default language from those available (you can of course change this default at a later stage). For more details of language packs, where to obtain them and how to install them please see the <a href="README.html#i18n">README</a>.</p>
+
+ <p>Once all the files have been uploaded to your site you should point your browser at this location with the addition of <code>install/</code>. For example if your domain name is <em>www.mydomain.tld</em> and you placed phpBB3 in a directory /phpBB3 off your web root you would enter <em>http://www.mydomain.tld/phpBB3/install/</em> or (alternatively) <em>http://www.mydomain.tld/phpBB3/install/index.php</em> into your browser. When you have done this you should see the phpBB3 Installation screen appear.</p>
+
+ <h4>Introduction:</h4>
+
+ <p>The installation screen gives you a short introduction into phpBB. It allows you to read the license phpBB3 is released under (General Public License) and provides information about how you can receive support. To start the installation, use the <em>Install</em> button.</p>
+
+ <h4>Requirements</h4>
+
+ <p>The first page you will see after starting the installation is the Requirements list. phpBB3 checks automatically whether everything that it needs to run properly is installed on your server. You need to have at least the minimum PHP version installed, and at least one database available to continue the installation. Also important, is that all shown folders are available and do have the correct permissions. Please see the description of each section to find out whether they are optional or required for phpBB3 to run. If everything is in order, you can continue the installation with <em>Start Install</em>.</p>
+
+ <h4>Database settings</h4>
+
+ <p>You now have to decide which database to use. See the <a href="#require">Requirements section</a> for information on which databases are supported. If you do not know your database settings, please contact your host and ask for them. You will not be able to continue without them. You need:</p>
+
+ <ul>
+ <li>The Database Type - the database you will be using.</li>
+ <li>The Database server hostname or DSN - the address of the database server.</li>
+ <li>The Database server port - the port of the database server (most of the time this is not needed).</li>
+ <li>The Database name - the name of the database on the server.</li>
+ <li>The Database username and Database password - the login data to access the database.</li>
+ </ul>
+
+ <div class="indent">
+ <p><strong>Note:</strong> if you are installing using SQLite, you should enter the full path to your database file in the DSN field and leave the username and password fields blank. For security reasons, you should make sure that the database file is not stored in a location accessible from the web.</p>
+ </div>
+
+ <p>You don't need to change the Prefix for tables in database setting, unless you plan on using multipe phpBB installations on one database. In this case you can use a different prefix for each installation to make it work.</p>
+
+ <p>After you entered your details, you can continue with the Proceed to next step button. Now phpBB3 will check whether the data you entered will lead to a successful database connection and whether tables with the same prefix already exist.</p>
+
+ <p>A <em>Could not connect to the database</em> error means that you didn't enter the database data correctly and it is not possible for phpBB to connect. Make sure that everything you entered is in order and try again. Again, if you are unsure about your database settings, please contact your host.</p>
+
+ <p>If you installed another version of phpBB before on the same database with the same prefix, phpBB will inform you and you just need to enter a different database prefix.</p>
+
+ <p>If you see the Successful Connection message, you can continue to the next step.</p>
+
+ <h4>Administrator details</h4>
+
+ <p>Now you have to create your administration user. This user will have full administration access and he/she will be the first user on your forum. All fields on this page are required. You can also set the default language of your forum on this page. In a vanilla phpBB3 installation we only include English. You can download further languages from <a href="http://www.phpbb.com/">www.phpbb.com</a>, and add them before installing or later.</p>
+
+ <h4>Configuration file</h4>
+
+ <p>In this step, phpBB will try to write the configuration file automatically. The forum needs the configuration to run properly. It contains all database settings, so without it, phpBB will not be able to access the database.</p>
+
+ <p>Usually writing the configuration file automatically works fine. But in some cases it can fail due to wrong file permissions, for instance. In this case, you need to upload the file manually. phpBB asks you to download the config.php file and tells you what to do with it. Please read the instructions carefully. After you have uploaded the file, use <em>Done</em> to get to the last step. If <em>Done</em> returns you to the same page as before, and does not return a success message, you did not upload the file correctly.</p>
+
+ <h4>Advanced settings</h4>
+
+ <p>The Advanced settings allow you to set some parameters of the board configuration. They are optional, and you can always change them later. So if you are not sure what these settings mean, proceed to the final step and finish the installation.</p>
+
+ <p>If the installation was successful, you can now use the Login button to visit the Administration Control Panel. Congratulations, you have installed phpBB3 successfully. But there is still work ahead!</p>
+
+ <p>If you are unable to get phpBB3 installed even after reading this guide, please look at the support section to find out where you can ask for further assistance.</p>
+
+ <p>At this point if you are converting from phpBB 2.0.x, you should refer to the <a href="#convert">conversion steps</a> for further information. If not, you should remove the install directory from your server as you will only be able to access the Administration Control Panel whilst it is present.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+ <a name="update"></a><h2>4. Updating from stable releases of phpBB 3.0.x</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>If you are currently using a stable release of phpBB3 updating to this version is straightforward. You would have downloaded one of four packages and your choice determines what you need to do. <strong>Please Note</strong>: That before updating we heavily recommend you do a <em>full backup of your database and existing phpBB3 files</em>! If you are unsure how to achieve this please ask your hosting provider for advice.</p>
+
+<p><strong>Please make sure you update your phpBB3 source files too, even if you run the <code>database_update.php</code> file.</strong></p>
+
+<a name="update_full"></a><h3>4.i. Full package</h3>
+
+ <p>The full package is normally meant for new installations only, but if you want to replace all source files this package comes in handy.</p>
+
+ <p>First you should make a copy of your existing <em>config.php</em> file, keep it in a safe place! Next delete all the existing phpBB3 files, you may want to leave your <code>files/</code> and <code>images/</code> directory in place. You can leave alternative styles in-place too. With this complete you can upload the new phpBB3 files (see <a href="#install">New installation</a> for details if necessary). Once complete copy back your saved <em>config.php</em>, replacing the new one. Another method is to just <strong>replace</strong> the existing files with the files from the full package - though make sure you do <strong>not</strong> overwrite your config.php file.</p>
+
+ <p>You should now run <code>install/database_update.php</code> which, depending on your previous version, will make a number of database changes. You may receive <em>FAILURES</em> during this procedure, they should not be a cause for concern unless you see an actual <em>ERROR</em>, in which case the script will stop (in this case you should seek help via our forums or bug tracker).</p>
+
+ <p>Once the install/database_update.php has completed you may proceed to the Administration Control Panel and check remove the install directory as advised.</p>
+
+<a name="update_files"></a><h3>4.ii. Changed files only</h3>
+
+ <p>This package is meant for those wanting to only replace changed files from a previous version to the latest version. This package normally contains the changed files from up to five previous versions.</p>
+
+ <p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.5</samp> you should select the phpBB-3.0.5_to_3.0.6.zip/tar.gz file.</p>
+
+ <p>The directory structure has been preserved enabling you (if you wish) to simply upload the contents of the archive to the appropriate location on your server, i.e. simply overwrite the existing files with the new versions. Do not forget that if you have installed any MODs these files will overwrite the originals possibly destroying them in the process. You will need to re-add MODs to any affected file before uploading.</p>
+
+ <p>As for the other update procedures you should run <b>install/database_update.php</b> after you have finished updating the files. This will update your database schema and increment the version number.</p>
+
+<a name="update_patch"></a><h3>4.iii. Patch file</h3>
+
+ <p>The patch file package is for those wanting to update through the patch application, and being comfortable with it.</p>
+
+ <p>The patch file is one solution for those with many Modifications (MODs) or other changes who do not want to re-add them back to all the changed files if they use the method explained above. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application but still want to use this update approach, we strongly recommend the <a href="#update_auto">Automatic update package</a> explained below. It is also the recommended update method.</p>
+
+ <p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is 3.0.5 you need the phpBB-3.0.5_to_3.0.6.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 &lt; [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
+
+ <p>If you do get failures you should look at using the <a href="#update_files">Changed files only</a> package to replace the files which failed to patch, please note that you will need to manually re-add any Modifications (MODs) to these particular files. Alternatively if you know how you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.</p>
+
+ <p>You should of course delete the patch file (or files) after use. As for the other update procedures you should run <code>install/database_update.php</code> after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number.</p>
+
+<a name="update_auto"></a><h3>4.iv. Automatic update package</h3>
+
+ <p>This update method is the recommended method for updating. This package allows detecting changed files automatically and merges changes if needed.</p>
+
+ <p>The automatic update package contains - contrary to the others - only the information required to update the previous release version to the latest available version. These packages are meant for use with the automatic update tool.</p>
+
+ <p>To perform the update, either follow the instructions from the <code>Administration Control Panel-&gt;System</code> Tab - this should point out that you are running an outdated version and will guide you through the update - or follow the instructions listed below.</p>
+
+ <ul>
+ <li>Go to the <a href="http://www.phpbb.com/downloads/">downloads page</a> and download the latest update package listed there, matching your current version.</li>
+ <li>Upload the archives contents to your phpBB installation - only the install folder is required. Upload the whole install folder, retaining the file structure.</li>
+ <li>After the install folder is present, phpBB3 will go offline automatically.</li>
+ <li>Point your browser to the install directory, for example <samp>http://www.example.com/phpBB3/install/</samp></li>
+ <li>Choose the "Update" Tab and follow the instructions</li>
+ </ul>
+
+ <p>&nbsp;</p>
+
+<a name="update_all"></a><h3>4.v. All package types</h3>
+
+ <p>If you have non-English language packs installed you may want to see if a new version has been made available. A number of missing strings may have been added which, though not essential, may be beneficial to users. Please note that at this time not all language packs have been updated so you should be prepared to periodically check for updates.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+ <a name="convert"></a><h2>5. Conversion from phpBB 2.0.x to phpBB 3.0.x</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>This paragraph explains the steps necessary to convert your existing phpBB2 installation to phpBB3.</p>
+
+<a name="prereq"></a><h3>5.i. Requirements before converting</h3>
+
+ <p>Before converting we heavily recommend you do a <em>full backup of your database and files</em>! If you are unsure how to achieve this please ask your hosting provider for advice. You basically need to follow the basic instructions given for <a href="#install">New installations</a>. Please <strong>do not</strong> overwrite any old files - install phpBB3 at a different location.</p>
+
+ <p>Once you made a backup of everything and also have a brand new phpBB3 installation, you can now begin the conversion.</p>
+
+ <p>Note that the conversion requires CREATE and DROP privileges for the phpBB3's database user account.</p>
+
+<a name="conversion"></a><h3>5.ii. Converting</h3>
+
+ <p>To begin the conversion visit the install folder of your phpBB3 installation (the same as you have done for installing). Now you will see a new tab <em>Convert</em>. Click this tab.</p>
+
+ <p>As with install the conversion is automated. Your previous 2.0.x database tables will not be changed as well as the original 2.0.x files remaining unaltered. The conversion is actually only filling your phpBB3 database tables and copying additional data over to your phpBB3 installation. This has the benefit that if something goes wrong you are able to either re-run the conversion or continue a conversion, while your old board is still accessible. We really recommend you disable your old installation while converting, else you may have inconsistent data after the conversion.</p>
+
+ <p>Please note that this conversion process may take quite some time and depending on your hosting provider this may result in it failing (due to web server or other timeout issues). If this is the case you should ask your provider if they are willing to allow the convert script to temporarily exceed their limits (be nice and they will probably be quite helpful).</p>
+
+ <p>Once completed your board should be immediately available. If you encountered errors you should report the problems to our bug tracker or seek help via our forums (see <a href="README.html">README</a> for details).</p>
+
+<a name="postreq"></a><h3>5.iii. Things to do after conversion</h3>
+
+ <p>After successful conversion there may be a few items you need to do - apart from checking if the installation is accessible and everything displayed correctly.</p>
+
+ <p>The first thing you may want to do is going to the administration control panel and checking every configuration item within the general tab. Thereafter you may want to adjust the forum descriptions/names if you entered HTML there. You also may want to access the other administrative sections, e.g. adjusting permissions, smilies, icons, ranks, etc.</p>
+
+ <p>Within the conversion the search index has not been created or transferred. This means after conversion you are not able to find any matches if you want to search for something. We recommend you rebuild your search index within <code>Admin -&gt; Maintenance -&gt; Database -&gt; Search Index</code>.</p>
+
+ <p>After verifying the settings in the ACP, you can delete the install directory to enable the board. The board will stay disabled until you do so.</p>
+
+ <p>Once you are pleased with your new installation you may want to give it the name of your old installation, changing the directory name. With phpBB3 this is possible without any problems - but you may still want to check your cookie settings within the administration panel, if the cookie path need to be adjusted prior to renaming.</p>
+
+<a name="convprob"></a><h3>5.iv. Common conversion problems</h3>
+
+ <p><strong>Broken non-latin characters</strong> The conversion script assumes that the database encoding in the source phpBB2 matches the encoding defined in the <code>lang_main.php</code> file of the default language pack of the source installation. Edit that file to match the database's encoding and re-start the conversion procedure.</p>
+
+ <p><strong>http 500 / white pages</strong> The conversion is a load-heavy procedure. Restrictions imposed by some server hosting providers can cause problems. The most common causes are: too low values for the php settings <code>memory_limit</code> and <code>max_execution_time</code>. Limits on the allowed CPU time are also a frequent cause for such errors, as are caps on the number of database queries allowed. If you cannot change such settings, then contact your hosting provider or run the conversion procedure on a different computer. The phpBB.com forums are also an excellent location to ask for support.</p>
+
+ <p><strong>Password conversion</strong> Due to the utf-8 based handling of passwords in phpBB3, it is not always possible to transfer all passwords. For passwords "lost in translation" the easiest workaround is to use the "forgotten password" function.</p>
+
+ <p><strong>Path to your former board</strong> The converter expects the relative path to your old board's files. So, - for instance - if the old board is located at <code>http://www.yourdomain.com/forum</code> and the phpBB3 installation is located at <code>http://www.yourdomain.com/phpBB3</code>, then the correct value would be <code>../forum</code>. Note that the webserver user must be able to access the source installation's files.</p>
+
+ <p><strong>Missing images</strong> If your default board language's language pack does not include all images, then some images might be missing in your installation. Always use a complete language pack as default language.</p>
+
+ <p><strong>Smilies</strong> During the conversion you might see warnings about image files where the copying failed. That can happen if the old board's smilies have the same file names as those on the new board. Copy those files manually after the conversion, if you want to continue using the old smilies.</p>
+
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+ <a name="postinstall"></a><h2>6. Important (security related) post-Install tasks for all installation methods</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>Once you have successfully installed phpBB3 you <strong>MUST</strong> ensure you remove the entire install/ directory. Leaving the install directory in place is a <em>very serious potential security issue</em> which may lead to deletion or alteration of files, etc. Please note that until this directory is removed, phpBB3 will not operate and a warning message will be displayed. Beyond this <strong>essential</strong> deletion, you may also wish to delete the docs/ directories if you wish.</p>
+
+ <p>With these directories deleted you should proceed to the administration panel. Depending on how the installation completed you may have been directed there automatically. If not, login as the administrator you specified during install/conversion and click the <strong>Administration Panel</strong> link at the bottom of any page. Ensure that details specified in <code>Admin -&gt; General</code> are correct!</p>
+
+<a name="avatars"></a><h3>6.i. Uploadable avatars</h3>
+
+ <p>phpBB3 supports several methods for allowing users to select their own <em>avatar</em> (an avatar is a small image generally unique to a user and displayed just below their username in posts).</p>
+
+ <p>Two of these options allow users to upload an avatar from their machine or a remote location (via a URL). If you wish to enable this function you should first ensure the correct paths for uploadeable avatars is set in <code>Admin -&gt; General -&gt; Board Configuration -&gt; Avatar settings</code>. By default this is <em>images/avatars/uploads</em> but you can set it to whatever you like, just ensure the configuration setting is updated. You must also ensure this directory can be written to by the webserver. Usually this means you have to alter its permissions to allow anyone to read and write to. Exactly how you should do this depends on your ftp client or server operating system.</p>
+
+ <p>On UNIX systems for example you set the directory to a+rwx (or ugo+rwx or even 777). This can be done from a command line on your server using chmod or via your FTP client (using the Change Permissions, chmod or other Permissions dialoge box, see your FTP clients documentation for help). Most FTP clients list permissions in the form of User (Read, Write, Execute), Group (Read, Write, Execute) and Other (Read, Write, Execute). You need to tick all of these boxes to set correct permissions.</p>
+
+ <p>On Windows system you need to ensure the directory is not write-protected and that it has global write permissions (see your servers documentation or contact your hosting provider if you are unsure on how to achieve this).</p>
+
+ <p>Please be aware that setting a directories permissions to global write access is a potential security issue. While it is unlikely that anything nasty will occur (such as all the avatars being deleted) there are always people out there to cause trouble. Therefore you should monitor this directory and if possible make regular backups.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="disclaimer"></a><h2>7. Copyright and disclaimer</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+<!-- END DOCUMENT -->
+
+ <div id="page-footer">
+ <div class="version">&nbsp;</div>
+ </div>
+</div></div>
+
+<div>
+ <a id="bottom" name="bottom" accesskey="z"></a>
+</div>
+
+</body>
+</html>
diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html
new file mode 100644
index 0000000000..3510bc448e
--- /dev/null
+++ b/phpBB/docs/README.html
@@ -0,0 +1,363 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="content-language" content="en" />
+<meta http-equiv="imagetoolbar" content="no" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<meta name="copyright" content="2007 phpBB Group" />
+<meta name="keywords" content="" />
+<meta name="description" content="phpBB 3.0.x Readme" />
+<title>phpBB3 &bull; Readme</title>
+
+<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
+
+</head>
+
+<body id="phpbb" class="section-docs">
+
+<div id="wrap">
+ <a id="top" name="top" accesskey="t"></a>
+ <div id="page-header">
+ <div class="headerbar">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div id="doc-description">
+ <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
+ <h1>phpBB 3.0.x Readme</h1>
+ <p style="display: none;"><a href="#start_here">Skip</a></p>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ </div>
+
+ <a name="start_here"></a>
+
+ <div id="page-body">
+
+<!-- BEGIN DOCUMENT -->
+
+ <p>Thank you for downloading phpBB3. This README will guide through the basics of installation and operation of phpBB3. Please ensure you read this and the accompanying documentation fully <strong>before</strong> proceeding with the installation.</p>
+
+ <h1>Readme</h1>
+
+ <div class="paragraph menu">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <ol>
+ <li><a href="#install">Installing phpBB3</a></li>
+ <li><a href="#run">Running phpBB3</a>
+ <ol style="list-style-type: lower-roman;">
+ <li><a href="#i18n">Internationalisation (i18n)</a></li>
+ <li><a href="#styles">Styles</a></li>
+ <li><a href="#mods">Modifications</a></li>
+ </ol>
+ </li>
+ <li><a href="#help">Getting help with phpBB3</a>
+ <ol style="list-style-type: lower-roman;">
+ <li><a href="#docs">Documentation</a></li>
+ <li><a href="#website">Community Forums</a></li>
+ <li><a href="#irc">Internet Relay Chat</a></li>
+ </ol>
+ </li>
+ <li><a href="#status">Status of this version</a></li>
+ <li><a href="#bugs">Reporting Bugs</a>
+ <ol style="list-style-type: lower-roman;">
+ <li><a href="#securitybugs">Security related bugs</a></li>
+ </ol>
+ </li>
+ <li><a href="#curbugs">Overview of current bug list</a></li>
+ <li><a href="#php">PHP compatibility issues</a></li>
+ <li><a href="#disclaimer">Disclaimer</a></li>
+ </ol>
+
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+ <a name="install"></a><h2>1. Installing phpBB3</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>Installation, update and conversion instructions can be found in the <a href="INSTALL.html">INSTALL</a> document contained in this distribution. If you are intending to convert from a previous phpBB 2.0.x installation we highly recommend you backup any existing data before proceeding!</p>
+
+ <p>Users of phpBB3 Beta versions cannot directly update.</p>
+
+ <p>Please note that we won't support the following installation types:</p>
+ <ul>
+ <li>Updates from phpBB3 Beta versions to phpBB3 RC1 and higher</li>
+ <li>Conversions from phpBB 2.0.x to phpBB3 Beta versions</li>
+ <li>phpBB3 Beta installations</li>
+ </ul>
+
+ <p>We give support for the following installation types:</p>
+
+ <ul>
+ <li>Updates from phpBB3 RC1 to the latest version</li>
+ <li>Conversions from phpBB 2.0.x to the latest version</li>
+ <li>New installations of phpBB3 - always only the latest released version</li>
+ </ul>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+ <a name="run"></a><h2>2. Running phpBB3</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>Once installed phpBB is easily managed by both admin and moderator control panels. If you need help or advice with phpBB please see <a href="#help">Section 3</a> below.</p>
+
+ <a name="i18n"></a><h3>2.i. Internationalisation (i18n)</h3>
+
+ <p>A number of language packs and style localisations are available. You can find them on our official download page:</p>
+
+ <p><a href="http://www.phpbb.com/downloads/">http://www.phpbb.com/downloads/</a></p>
+
+ <p>This is the <em>official</em> location for all supported language sets. If you download a package from a 3rd party site you do so with the understanding that we cannot offer support. So please, do not ask for help in these cases!</p>
+
+ <p>Installation of these packages is straightforward, simply download the required language pack and unarchive it into the <samp>languages/</samp> folder. Please ensure you retain the directory structure when doing this! Once uploaded go to the <code>Admin-&gt;System-&gt;Language Packs</code> and install the now appeared new language pack. To install the style imageset you should download the imageset for your language and unarchive the file/s into the relevant imageset directory (styles/prosilver/imageset or styles/subsilver2/imageset), again you must retain the directory structure. Once installed the imageset will become immediately available.</p>
+
+ <p>If your language is not available please visit our forums where you will find a topic listing translations currently available or in preparation. This topic also gives you information should you wish to volunteer to translate a language not currently listed.</p>
+
+ <a name="styles"></a><h3>2.ii. Styles</h3>
+
+ <p>Although phpBB Group are rather proud of the included styles we realise that it may not be to everyones tastes. Therefore phpBB3 allows styles to be switched with relative ease. Firstly you need to locate and download a style you like. We maintain such a site at</p>
+
+ <p><a href="http://www.phpbb.com/styles/">http://www.phpbb.com/styles/</a></p>
+
+ <p><strong>Please note</strong> that 3rd party styles downloaded for versions of phpBB2 will <strong>not</strong> work in phpBB3.</p>
+
+ <p>Once you have downloaded a style the usual next step is to unarchive (or upload the unarchived contents of) the package into your <samp>styles/</samp> directory. You then need to visit <code>Administration -&gt; Styles</code>, you should see the new style available, click install and it will become available for all your users.</p>
+
+ <p><strong>Please note</strong> that if you create your own style or modify existing ones, please remember to enable the &quot;Recompile stale style components&quot; setting within the <code>Admin-&gt;General-&gt;Load Settings</code> screen. This setting allows the cache to detect changes made to the style and automatically refresh it. If this setting is disabled, you will not see your changes taking effect.</p>
+
+ <a name="mods"></a><h3>2.iii. Modifications</h3>
+
+ <p>Although not officially supported by phpBB Group, phpBB has a thriving modification scene. These third party modifications to the standard phpBB extend its capabilities still further and can be found at:</p>
+
+ <p><a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a></p>
+
+ <p><strong>Please remember</strong> that any bugs or other issues that occur after you have added any modification should <strong>NOT</strong> be reported to the bug tracker (see below). First remove the modification and see if the problem is resolved.</p>
+
+ <p>Also remember that any modifications which modify the database in any way may render upgrading your forum to future versions more difficult unless we state otherwise. With all this said many users have and continue to utilise many of the mods already available with great success.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="help"></a><h2>3. Getting help with phpBB3</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>phpBB3 can seem a little daunting to new users in places, particularly with regard the permission system. The first thing you should do is check the <a href="FAQ.html">FAQ</a> which covers a few basic getting started questions. If you need additional help there are several places you should look.</p>
+
+ <a name="docs"></a><h3>3.i. phpBB3 Documentation</h3>
+
+ <p>A comprehensive documentation is now available online and can be accessed from the following location:</p>
+
+ <p><a href="http://www.phpbb.com/support/documentation/3.0/">http://www.phpbb.com/support/documentation/3.0/</a></p>
+
+ <p>This covers everything from installation through setting permissions and managing users.</p>
+
+ <a name="website"></a><h3>3.ii. Community Forums</h3>
+
+ <p>phpBB Group maintains a thriving community where a number of people have generously decided to donate their time to help support users. This site can be found at:</p>
+
+ <p><a href="http://www.phpbb.com/">http://www.phpbb.com/</a></p>
+
+ <p>If you do seek help via our forums please be sure to do a Search before posting. This may well save both you and us time and allow the developer, moderator and support groups to spend more time responding to people with unknown issues and problems. Please also remember that phpBB is an entirely volunteer effort, no one receives any compensation for the time they give, this includes moderators as well as developers. So please be respectful and mindful when awaiting responses.</p>
+
+ <a name="irc"></a><h3>3.iii Internet Relay Chat</h3>
+
+ <p>Another place you may find help is our IRC channel. This operates on the Freenode IRC network, <em>irc.freenode.net</em> and the channel is <em>#phpbb</em> and can be accessed by any good IRC client such as mIRC, XChat, etc. Again, please do not abuse this service and be respectful of other users.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="status"></a><h2>4. Status of this version</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>This is the third stable release of phpBB. The 3.0.x line is essentially feature frozen, with only point releases seeing fixes for bugs and security issues, though feature alterations and minor feature additions may be done if deemed absolutely required. Our next major release will be phpBB 3.2 and the planning phase has begun (the unstable development version is 3.1). Please do not post questions asking when 3.2 will be available, no release date has been set.</p>
+
+ <p>For those interested in the development of phpBB should keep an eye on the community forums to see how things are progressing:</p>
+
+ <p><a href="http://area51.phpbb.com/phpBB/">http://area51.phpbb.com/phpBB/</a></p>
+
+ <p>Please note that this forum should <strong>NOT</strong> be used to obtain support for or ask questions about phpBB 2.0.x or phpBB 3.0.x, the main community forums are the place for this. Any such posts will be locked and go unanswered.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="bugs"></a><h2>5. Reporting Bugs</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>The phpBB Group uses a bug tracking system to store, list and manage all reported bugs, it can be found at the location listed below. Please <strong>DO NOT</strong> post bug reports to our forums, they will be locked. In addition please <strong>DO NOT</strong> use the bug tracker for support requests. Posting such a request will only see you directed to the support forums (while taking time away from working on real bugs).</p>
+
+ <p><a href="http://www.phpbb.com/bugs/">http://www.phpbb.com/bugs/</a></p>
+
+ <p>While we very much appreciate receiving bug reports (the more reports the more stable phpBB will be) we ask you carry out a few steps before adding new entries:</p>
+
+ <ul>
+ <li>Firstly determine if your bug is reproduceable, how to determine this depends on the bug in question. Only if the bug is reproduceable it is likely to be a problem with phpBB3 (or in some way connected). If something cannot be reproduced it may turn out to have been your hosting provider working on something, a user doing something silly, etc. Bug reports for non-reproduceable events can slow down our attempts to fix real, reproduceable issues<br /><br /></li>
+ <li>Next please read or search through the existing bug reports to see if <em>your</em> bug (or one very similar to it) is already listed. If it is please add to that existing bug rather than creating a new duplicate entry (all this does is slow us down).<br /><br /></li>
+ <li>Check the forums (use search!) to see if people have discussed anything that sounds similar to what you are seeing. However, as noted above please <strong>DO NOT</strong> post your particular bug to the forum unless it's non-reproduceable or you are sure it's related to something you have done rather phpBB3<br /><br /></li>
+ <li>If no existing bug exists then please feel free to add it</li>
+ </ul>
+
+ <p>If you do post a new bug (i.e. one that isn't already listed in the bug tracker) firstly make sure you have logged in (your username and password are the same as for the community forums) then please include the following details:</p>
+
+ <ul>
+ <li>Your server type/version, e.g. Apache 1.3.28, IIS 4, Sambar, etc.</li>
+ <li>PHP version and mode of operation, e.g. PHP 5.1.1 as a module, PHP 4.4.4 running as CGI, etc.</li>
+ <li>DB type/version, e.g. MySQL 4.0.1, PostgreSQL 7.3.2, MSSQL Server 2000 SP1, etc.</li>
+ </ul>
+
+ <p>The relevant database type/version is listed within the administration control panel</p>
+
+ <p>Please also be as detailed as you can in your report, if possible list the steps required to duplicate the problem. If you have a fix which you are <strong>VERY SURE</strong> works (and is consistent with our <a href="coding-guidelines.html">coding guidelines</a>) and does not introduce further problems or incompatibilities please let us know. However only include it in the bug report if you really must, if we need it we'll ask you for it.</p>
+
+ <p>Once a bug has been submitted you will be emailed any follow up comments added to it. <strong>Please</strong> if you are requested to supply additional information, do so! It is frustrating for us to receive bug reports, ask for additional information but get nothing. In these cases we have a policy of closing the bug, which may leave a very real problem in place. Obviously we would rather not have this situation arise.</p>
+
+<a name="securitybugs"></a><h3>5.i. Security related bugs</h3>
+
+ <p>If you find a potential security related vulnerability in phpBB please <strong>DO NOT</strong> post it to the bug tracker, public forums, etc.! Doing so may allow unscrupulous users to take advantage of it before we have time to put a fix in place. All security related bugs should be sent to our security tracker:</p>
+
+ <p><a href="http://www.phpbb.com/security/">http://www.phpbb.com/security/</a></p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="curbugs"></a><h2>6. Overview of current bug list</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>This list is not complete but does represent those bugs which may effect users on a wider scale. Other bugs listed in the tracker have typically been shown to be limited to certain setups or methods of installation, updating and/or conversions.</p>
+
+ <ul>
+ <li>Conversions may fail to complete on large boards under some hosts</li>
+ <li>Updates may fail to complete on large update sets under some hosts</li>
+ <li>Smilies placed directly after bbcode tags will not get parsed. Smilies always need to be separated by spaces.</li>
+ </ul>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="php"></a><h2>7. PHP compatibility issues</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>phpBB is no longer supported on PHP3 due to several compatibility issues and we recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 4.3.3.</p>
+
+ <p>Please remember that running any application on a developmental version of PHP can lead to strange/unexpected results which may appear to be bugs in the application (which may not be true). Therefore we recommend you upgrade to the newest stable version of PHP before running phpBB3. If you are running a developmental version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
+
+ <p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MSSQL Server 2000, PostgreSQL 7.x, Oracle 8, SQLite and Firebird. Versions of PHP used range from 4.3.3 to 6.0.0-dev without problem. </p>
+
+<a name="phpsec"></a><h3>7.i. Notice on PHP security issues</h3>
+
+<p>Currently there are no known issues regarding PHP security.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="disclaimer"></a><h2>8. Copyright and disclaimer</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+<!-- END DOCUMENT -->
+
+ <div id="page-footer">
+ <div class="version">&nbsp;</div>
+ </div>
+</div></div>
+
+<div>
+ <a id="bottom" name="bottom" accesskey="z"></a>
+</div>
+
+</body>
+</html>
diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html
new file mode 100644
index 0000000000..c83aaadc2d
--- /dev/null
+++ b/phpBB/docs/auth_api.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="content-language" content="en" />
+<meta http-equiv="imagetoolbar" content="no" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<meta name="copyright" content="2007 phpBB Group" />
+<meta name="keywords" content="" />
+<meta name="description" content="This is an explanation of how to use the phpBB auth/acl API" />
+<title>phpBB3 &bull; Auth API</title>
+
+<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
+
+</head>
+
+<body id="phpbb" class="section-docs">
+
+<div id="wrap">
+ <a id="top" name="top" accesskey="t"></a>
+ <div id="page-header">
+ <div class="headerbar">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div id="doc-description">
+ <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
+ <h1>Auth API</h1>
+ <p>This is an explanation of how to use the phpBB auth/acl API</p>
+ <p style="display: none;"><a href="#start_here">Skip</a></p>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ </div>
+
+ <a name="start_here"></a>
+
+ <div id="page-body">
+
+<!-- BEGIN DOCUMENT -->
+
+ <p>This is an explanation of how to use the phpBB auth/acl API.</p>
+
+ <h1>Auth API</h1>
+
+ <div class="paragraph menu">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<ol>
+ <li><a href="#intro">Introduction</a></li>
+ <li><a href="#methods">Methods</a>
+ <ol style="list-style-type: lower-roman;">
+ <li><a href="#acl">acl</a></li>
+ <li><a href="#acl_get">acl_get</a></li>
+ <li><a href="#acl_gets">acl_gets</a></li>
+ <li><a href="#acl_getf">acl_getf</a></li>
+ <li><a href="#acl_getf_global">acl_getf_global</a></li>
+ <li><a href="#acl_cache">acl_cache</a></li>
+ </ol>
+ </li>
+ <li><a href="#admin_related">Admin related functions</a></li>
+ <li><a href="#disclaimer">Copyright and disclaimer</a></li>
+</ol>
+
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="intro"></a><h2>1. Introduction</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <h4>What is it?</h4>
+
+ <p>The <code>auth</code> class contains methods related to authorisation users to access various board functions, e.g. posting, viewing, replying, logging in (and out), etc. If you need to check whether a user can carry out a task or handle user login/logouts this class is required.</p>
+
+ <h4>Initialisation</h4>
+
+ <p>To use any methods contained with the <code>auth</code> class it first needs to be instantiated. This is best achieved early in the execution of the script in the following manner:</p>
+
+ <div class="codebox"><pre>
+$auth = new auth();
+ </pre></div>
+
+ <p>Once an instance of the class has been created you are free to call the various methods it contains. Please note that should you wish to use the <code>auth_admin</code> methods you will need to instantiate this separately but in the same way.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="methods"></a><h2>2. Methods</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>Following are the methods you are able to use.</p>
+
+ <a name="acl"></a><h3>2.i. acl</h3>
+
+ <p>The <code>acl</code> method is the initialisation routine for all the acl functions. If you intend calling any acl method you must first call this. The method takes as its one and only required parameter an associative array containing user information as stored in the database. This array must contain at least the following information; user_id, user_permissions and user_type. It is called in the following way:</p>
+
+ <div class="codebox"><pre>
+$auth-&gt;acl(<code>userdata</code>);
+ </pre></div>
+
+ <p>Where userdata is the array containing the aforementioned data.</p>
+
+ <a name="acl_get"></a><h3>2.ii. acl_get</h3>
+
+ <p>This method is the primary way of determining what a user can and cannot do for a given option globally or in a given forum. The method should be called in the following way:</p>
+
+ <div class="codebox"><pre>
+$result = $auth-&gt;acl_get(<code>option</code>[, <code>forum</code>]);
+ </pre></div>
+
+ <p>Where option is a string representing the required option, e.g. 'f_list', 'm_edit', 'a_adduser', etc. By adding a ! in front of the option, e.g. '!f_list' the result of this method will be negated. The optional forum term is the integer forum_id.</p>
+
+ <p>The method returns a positive integer when the user is allowed to carry out the option and a zero if denied or the other way around if the option is prefixed with an exclamation mark.</p>
+
+ <p>If you specify a forum and there is also a global setting for the specified option then this method will return a positive integer if one of them evaluates to a positive integer. An example would be the m_approve option which can be set per forum but also globally. If a user has the global option he will automatically have m_approve in every forum.</p>
+
+ <p>There are some special options or <em>flags</em> which are used as prefixes for other options, e.g. 'f_' or 'm_'. These flags will automatically be set to a positive integer if the user has one or more permissions with the given prefix. A local setting will result in the flag being set only locally (so it will require a forum id to retrieve). If a user has one or more global permissions with the prefix acl_get will return a positive integer regardless of the forum id.</p>
+
+ <a name="acl_gets"></a><h3>2.iii. acl_gets</h3>
+
+ <p>This method is funtionally similar to <code>acl_get</code> in that it returns information on whether a user can or cannot carry out a given task. The difference here is the ability to test several different options in one go. This may be useful for testing whether a user is a moderator or an admin in one call. Rather than having to call and check <code>acl_get</code> twice.</p>
+
+ <p>The method should be called thus:</p>
+
+ <div class="codebox"><pre>
+$result = $auth-&gt;acl_gets(<code>option1</code>[, <code>option2</code>, ..., <code>optionN</code>, <code>forum</code>]);
+ </pre></div>
+
+ <p>As with the <code>acl_get</code> method the options are strings representing the required permissions to check. The forum again is an integer representing a given forum_id.</p>
+
+ <p>The method will return a positive integer if <code>acl_get</code> for one of the options evaluates to a positive integer (combines permissions with OR).</p>
+
+ <a name="acl_getf"></a><h3>2.iv. acl_getf</h3>
+
+ <p>This method is used to find out in which forums a user is allowed to carry out an operation or to find out in which forums he is not allowed to carry out an operation. The method should be called in the following way:</p>
+
+ <div class="codebox"><pre>
+$result = $auth-&gt;acl_getf(<code>option</code>[, <code>clean</code>]);
+ </pre></div>
+
+ <p>Just like in the <code>acl_get</code> method the option is a string specifying the permission which has to be checked (negation using ! is allowed). The second parameter is a boolean. If it is set to false this method returns all forums with either zero or a positive integer. If it is set to true only those forums with a positive integer as the result will be returned.</p>
+
+ <p>The method returns an associative array of the form:</p>
+
+ <div class="codebox"><pre>
+array(<em>forum_id1</em> =&gt; array(<em>option</em> =&gt; <em>integer</em>), <em>forum_id2</em> =&gt; ...)
+ </pre></div>
+
+ <p>Where option is the option passed to the method and integer is either zero or a positive integer and the same <code>acl_get(option, forum_id)</code> would return.</p>
+
+ <a name="acl_getf_global"></a><h3>2.v. acl_getf_global</h3>
+
+ <p>This method is used to find out whether a user has a permission in at least one forum or globally. This method is similar to checking whether <code>acl_getf(option, true)</code> returned one or more forums but it's faster. It should be called in the following way:</p>
+
+ <div class="codebox"><pre>
+$result = acl_getf_global(<code>option</code>)
+ </pre></div>
+
+ <p>As with the previous methods option is a string specifying the permission which has to be checked.</p>
+
+ <p>This method returns either zero or a positive integer.</p>
+
+ <a name="acl_cache"></a><h3>2.vi. acl_cache</h3>
+
+ <p>This should be considered a private method and not be called externally. It handles the generation of the user_permissions data from the basic user and group authorisation data. When necessary this method is called automatically by <code>acl</code>.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="admin_related"></a><h2>3. Admin related functions</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>A number of additional methods are available related to <code>auth</code>. These handle more basic functions such as adding user and group permissions, new options and clearing the user cache. These methods are contained within a separate class, <code>auth_admin</code>. This can be found in <code>includes/acp/auth.php</code>.</p>
+
+ <p>To use any methods this class contains it first needs to be instantiated separately from <code>auth</code>. This is achieved in the same way as <code>auth</code>:</p>
+
+ <div class="codebox"><pre>
+$auth_admin = new auth_admin();
+ </pre></div>
+
+ <p>This instance gives you access to both the methods of this specific class and that of <code>auth</code>.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="disclaimer"></a><h2>4. Copyright and disclaimer</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+<!-- END DOCUMENT -->
+
+ <div id="page-footer">
+ <div class="version"> $Id$ </div>
+ </div>
+</div></div>
+
+<div>
+ <a id="bottom" name="bottom" accesskey="z"></a>
+</div>
+
+</body>
+</html>
diff --git a/phpBB/docs/bg_header.gif b/phpBB/docs/bg_header.gif
new file mode 100644
index 0000000000..351de9f46a
--- /dev/null
+++ b/phpBB/docs/bg_header.gif
Binary files differ
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
new file mode 100644
index 0000000000..8ac2e4e89d
--- /dev/null
+++ b/phpBB/docs/coding-guidelines.html
@@ -0,0 +1,2498 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="content-language" content="en" />
+<meta http-equiv="imagetoolbar" content="no" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<meta name="copyright" content="2007 phpBB Group" />
+<meta name="keywords" content="" />
+<meta name="description" content="Olympus coding guidelines document" />
+<title>phpBB3 &bull; Coding Guidelines</title>
+
+<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
+
+</head>
+
+<body id="phpbb" class="section-docs">
+
+<div id="wrap">
+ <a id="top" name="top" accesskey="t"></a>
+ <div id="page-header">
+ <div class="headerbar">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div id="doc-description">
+ <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
+ <h1>Coding Guidelines</h1>
+ <p>Olympus coding guidelines document</p>
+ <p style="display: none;"><a href="#start_here">Skip</a></p>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ </div>
+
+ <a name="start_here"></a>
+
+ <div id="page-body">
+
+<!-- BEGIN DOCUMENT -->
+
+<p>These are the phpBB Coding Guidelines for Olympus, all attempts should be made to follow them as closely as possible.</p>
+
+<h1>Coding Guidelines</h1>
+
+ <div class="paragraph menu">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<ol>
+ <li><a href="#defaults">Defaults</a>
+ <ol style="list-style-type: lower-roman;">
+ <li><a href="#editorsettings">Editor Settings</a></li>
+ <li><a href="#fileheader">File Header</a></li>
+ <li><a href="#locations">File Locations</a></li>
+ <li><a href="#constants">Special Constants</a></li>
+ </ol>
+ </li>
+ <li><a href="#code">Code Layout/Guidelines</a>
+ <ol style="list-style-type: lower-roman;">
+ <li><a href="#namingvars">Variable/Function Naming</a></li>
+ <li><a href="#codelayout">Code Layout</a></li>
+ <li><a href="#sql">SQL/SQL Layout</a></li>
+ <li><a href="#optimizing">Optimizations</a></li>
+ <li><a href="#general">General Guidelines</a></li>
+ </ol>
+ </li>
+ <li><a href="#styling">Styling</a></li>
+ <ol style="list-style-type: lower-roman;">
+ <li><a href="#cfgfiles">Style Config Files</a></li>
+ <li><a href="#genstyling">General Styling Rules</a></li>
+ </ol></li>
+ <li><a href="#templating">Templating</a>
+ <ol style="list-style-type: lower-roman;">
+ <li><a href="#templates">General Templating</a></li>
+ <li><a href="#inheritance">Template Inheritance</a></li>
+ </ol></li>
+ <li><a href="#charsets">Character Sets and Encodings</a></li>
+ <li><a href="#translation">Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</a>
+ <ol style="list-style-type: lower-roman;">
+ <li><a href="#standardisation">Standardisation</a></li>
+ <li><a href="#otherconsiderations">Other considerations</a></li>
+ <li><a href="#writingstyle">Writing Style</a></li>
+ </ol>
+ </li>
+ <li><a href="#vcs">VCS Guidelines</a>
+ <ol style="list-style-type: lower-roman;">
+ <li><a href="#repostruct">Repository structure</a></li>
+ <li><a href="#commitmessage">Commit messages</a></li>
+ </ol>
+ </li>
+ <li><a href="#changes">Guidelines Changelog</a></li>
+ <li><a href="#disclaimer">Copyright and disclaimer</a></li>
+</ol>
+
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="defaults"></a><h2>1. Defaults</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<a name="editorsettings"></a><h3>1.i. Editor Settings</h3>
+
+ <h4>Tabs vs Spaces:</h4>
+ <p>In order to make this as simple as possible, we will be using tabs, not spaces. We enforce 4 (four) spaces for one tab - therefore you need to set your tab width within your editor to 4 spaces. Make sure that when you <strong>save</strong> the file, it's saving tabs and not spaces. This way, we can each have the code be displayed the way we like it, without breaking the layout of the actual files.</p>
+ <p>Tabs in front of lines are no problem, but having them within the text can be a problem if you do not set it to the amount of spaces every one of us uses. Here is a short example of how it should look like:</p>
+
+ <div class="codebox"><pre>
+{TAB}$mode{TAB}{TAB}= request_var('mode', '');
+{TAB}$search_id{TAB}= request_var('search_id', '');
+ </pre></div>
+
+ <p>If entered with tabs (replace the {TAB}) both equal signs need to be on the same column.</p>
+
+ <h3>Linefeeds:</h3>
+ <p>Ensure that your editor is saving files in the UNIX (LF) line ending format. This means that lines are terminated with a newline, not with Windows Line endings (CR/LF combo) as they are on Win32 or Classic Mac (CR) Line endings. Any decent editor should be able to do this, but it might not always be the default setting. Know your editor. If you want advice for an editor for your Operating System, just ask one of the developers. Some of them do their editing on Win32.
+
+ <a name="fileheader"></a><h3>1.ii. File Header</h3>
+
+ <h4>Standard header for new files:</h4>
+ <p>This template of the header must be included at the start of all phpBB files: </p>
+
+ <div class="codebox"><pre>
+/**
+*
+* @package {PACKAGENAME}
+* @version &#36;Id: &#36;
+* @copyright (c) 2007 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+ </pre></div>
+
+ <p>Please see the <a href="#locations">File Locations section</a> for the correct package name.</p>
+
+ <h4>Files containing inline code:</h4>
+
+ <p>For those files you have to put an empty comment directly after the header to prevent the documentor assigning the header to the first code element found.</p>
+
+ <div class="codebox"><pre>
+/**
+* {HEADER}
+*/
+
+/**
+*/
+{CODE}
+ </pre></div>
+
+ <h4>Files containing only functions:</h4>
+
+ <p>Do not forget to comment the functions (especially the first function following the header). Each function should have at least a comment of what this function does. For more complex functions it is recommended to document the parameters too.</p>
+
+ <h4>Files containing only classes:</h4>
+
+ <p>Do not forget to comment the class. Classes need a separate @package definition, it is the same as the header package name. Apart from this special case the above statement for files containing only functions needs to be applied to classes and it's methods too.</p>
+
+ <h4>Code following the header but only functions/classes file:</h4>
+
+ <p>If this case is true, the best method to avoid documentation confusions is adding an ignore command, for example:</p>
+
+ <div class="codebox"><pre>
+/**
+* {HEADER}
+*/
+
+/**
+* @ignore
+*/
+Small code snipped, mostly one or two defines or an if statement
+
+/**
+* {DOCUMENTATION}
+*/
+class ...
+ </pre></div>
+
+ <a name="locations"></a><h3>1.iii. File Locations</h3>
+
+ <p>Functions used by more than one page should be placed in functions.php, functions specific to one page should be placed on that page (at the bottom) or within the relevant sections functions file. Some files in <code>/includes</code> are holding functions responsible for special sections, for example uploading files, displaying &quot;things&quot;, user related functions and so forth.</p>
+
+ <p>The following packages are defined, and related new features/functions should be placed within the mentioned files/locations, as well as specifying the correct package name. The package names are bold within this list:</p>
+
+ <ul>
+ <li><strong>phpBB3</strong><br />Core files and all files not assigned to a separate package</li>
+ <li><strong>acm</strong><br /><code>/includes/acm</code>, <code>/includes/cache.php</code><br />Cache System</li>
+ <li><strong>acp</strong><br /><code>/adm</code>, <code>/includes/acp</code>, <code>/includes/functions_admin.php</code><br />Administration Control Panel</li>
+ <li><strong>dbal</strong><br /><code>/includes/db</code><br />Database Abstraction Layer.<br />Base class is <code>dbal</code>
+ <ul>
+ <li><code>/includes/db/dbal.php</code><br />Base DBAL class, defining the overall framework</li>
+ <li><code>/includes/db/firebird.php</code><br />Firebird/Interbase Database Abstraction Layer</li>
+ <li><code>/includes/db/msssql.php</code><br />MSSQL Database Abstraction Layer</li>
+ <li><code>/includes/db/mssql_odbc.php</code><br />MSSQL ODBC Database Abstraction Layer for MSSQL</li>
+ <li><code>/includes/db/mysql.php</code><br />MySQL Database Abstraction Layer for MySQL 3.x/4.0.x/4.1.x/5.x
+ <li><code>/includes/db/mysqli.php</code><br />MySQLi Database Abstraction Layer</li>
+ <li><code>/includes/db/oracle.php</code><br />Oracle Database Abstraction Layer</li>
+ <li><code>/includes/db/postgres.php</code><br />PostgreSQL Database Abstraction Layer</li>
+ <li><code>/includes/db/sqlite.php</code><br />Sqlite Database Abstraction Layer</li>
+ </ul>
+ </li>
+ <li><strong>diff</strong><br /><code>/includes/diff</code><br />Diff Engine</li>
+ <li><strong>docs</strong><br /><code>/docs</code><br />phpBB Documentation</li>
+ <li><strong>images</strong><br /><code>/images</code><br />All global images not connected to styles</li>
+ <li><strong>install</strong><br /><code>/install</code><br />Installation System</li>
+ <li><strong>language</strong><br /><code>/language</code><br />All language files</li>
+ <li><strong>login</strong><br /><code>/includes/auth</code><br />Login Authentication Plugins</li>
+ <li><strong>VC</strong><br /><code>/includes/captcha</code><br />CAPTCHA</li>
+ <li><strong>mcp</strong><br /><code>mcp.php</code>, <code>/includes/mcp</code>, <code>report.php</code><br />Moderator Control Panel</li>
+ <li><strong>ucp</strong><br /><code>ucp.php</code>, <code>/includes/ucp</code><br />User Control Panel</li>
+ <li><strong>utf</strong><br /><code>/includes/utf</code><br />UTF8-related functions/classes</li>
+ <li><strong>search</strong><br /><code>/includes/search</code>, <code>search.php</code><br />Search System</li>
+ <li><strong>styles</strong><br /><code>/styles</code>, <code>style.php</code><br />phpBB Styles/Templates/Themes/Imagesets</li>
+ </ul>
+
+ <a name="constants"></a></h3>1.iv. Special Constants</h3>
+
+ <p>There are some special constants application developers are able to utilize to bend some of phpBB's internal functionality to suit their needs.</p>
+
+ <div class="codebox"><pre>
+PHPBB_MSG_HANDLER (overwrite message handler)
+PHPBB_DB_NEW_LINK (overwrite new_link parameter for sql_connect)
+PHPBB_ROOT_PATH (overwrite $phpbb_root_path)
+PHPBB_ADMIN_PATH (overwrite $phpbb_admin_path)
+PHPBB_USE_BOARD_URL_PATH (use generate_board_url() for image paths instead of $phpbb_root_path)
+PHPBB_DISABLE_ACP_EDITOR (disable ACP style editor for templates)
+PHPBB_DISABLE_CONFIG_CHECK (disable ACP config.php writeable check)
+
+PHPBB_ACM_MEMCACHE_PORT (overwrite memcached port, default is 11211)
+PHPBB_ACM_MEMCACHE_COMPRESS (overwrite memcached compress setting, default is disabled)
+PHPBB_ACM_MEMCACHE_HOST (overwrite memcached host name, default is localhost)
+
+PHPBB_QA (Set board to QA-Mode, which means the updater also checks for RC-releases)
+</pre></div>
+
+<h4>PHPBB_USE_BOARD_URL_PATH</h4>
+
+<p>If the <code>PHPBB_USE_BOARD_URL_PATH</code> constant is set to true, phpBB uses generate_board_url() (this will return the boards url with the script path included) on all instances where web-accessible images are loaded. The exact locations are:</p>
+
+<ul>
+ <li>/includes/session.php - user::img()</li>
+ <li>/includes/functions_content.php - smiley_text()</li>
+</ul>
+
+<p>Path locations for the following template variables are affected by this too:</p>
+
+<ul>
+ <li>{T_THEME_PATH} - styles/xxx/theme</li>
+ <li>{T_TEMPLATE_PATH} - styles/xxx/template</li>
+ <li>{T_SUPER_TEMPLATE_PATH} - styles/xxx/template</li>
+ <li>{T_IMAGESET_PATH} - styles/xxx/imageset</li>
+ <li>{T_IMAGESET_LANG_PATH} - styles/xxx/imageset/yy</li>
+ <li>{T_IMAGES_PATH} - images/</li>
+ <li>{T_SMILIES_PATH} - $config['smilies_path']/</li>
+ <li>{T_AVATAR_PATH} - $config['avatar_path']/</li>
+ <li>{T_AVATAR_GALLERY_PATH} - $config['avatar_gallery_path']/</li>
+ <li>{T_ICONS_PATH} - $config['icons_path']/</li>
+ <li>{T_RANKS_PATH} - $config['ranks_path']/</li>
+ <li>{T_UPLOAD_PATH} - $config['upload_path']/</li>
+ <li>{T_STYLESHEET_LINK} - styles/xxx/theme/stylesheet.css (or link to style.php if css is parsed dynamically)</li>
+ <li>New template variable {BOARD_URL} for the board url + script path.</li>
+</ul>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="code"></a><h2>2. Code Layout/Guidelines</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>Please note that these Guidelines applies to all php, html, javascript and css files.</p>
+
+ <a name="namingvars"></a><h3>2.i. Variable/Function Naming</h3>
+
+ <p>We will not be using any form of hungarian notation in our naming conventions. Many of us believe that hungarian naming is one of the primary code obfuscation techniques currently in use.</p>
+
+ <h4>Variable Names:</h4>
+ <p>Variable names should be in all lowercase, with words separated by an underscore, example:</p>
+
+ <div class="indent">
+ <p><code>$current_user</code> is right, but <code>$currentuser</code> and <code> $currentUser</code> are not.</p>
+ </div>
+
+ <p>Names should be descriptive, but concise. We don't want huge sentences as our variable names, but typing an extra couple of characters is always better than wondering what exactly a certain variable is for. </p>
+
+ <h4>Loop Indices:</h4>
+ <p>The <em>only</em> situation where a one-character variable name is allowed is when it's the index for some looping construct. In this case, the index of the outer loop should always be $i. If there's a loop inside that loop, its index should be $j, followed by $k, and so on. If the loop is being indexed by some already-existing variable with a meaningful name, this guideline does not apply, example:</p>
+
+ <div class="codebox"><pre>
+for ($i = 0; $i &lt; $outer_size; $i++)
+{
+ for ($j = 0; $j &lt; $inner_size; $j++)
+ {
+ foo($i, $j);
+ }
+}
+ </pre></div>
+
+ <h4>Function Names:</h4>
+ <p>Functions should also be named descriptively. We're not programming in C here, we don't want to write functions called things like "stristr()". Again, all lower-case names with words separated by a single underscore character. Function names should preferably have a verb in them somewhere. Good function names are <code>print_login_status()</code>, <code>get_user_data()</code>, etc. </p>
+
+ <h4>Function Arguments:</h4>
+ <p>Arguments are subject to the same guidelines as variable names. We don't want a bunch of functions like: <code>do_stuff($a, $b, $c)</code>. In most cases, we'd like to be able to tell how to use a function by just looking at its declaration. </p>
+
+ <h4>Summary:</h4>
+ <p>The basic philosophy here is to not hurt code clarity for the sake of laziness. This has to be balanced by a little bit of common sense, though; <code>print_login_status_for_a_given_user()</code> goes too far, for example -- that function would be better named <code>print_user_login_status()</code>, or just <code>print_login_status()</code>.</p>
+
+ <h4>Special Namings: </h4>
+ <p>For all emoticons use the term <code>smiley</code> in singular and <code>smilies</code> in plural.</p>
+
+ <a name="codelayout"></a><h3>2.ii. Code Layout</h3>
+
+ <h4>Always include the braces:</h4>
+ <p>This is another case of being too lazy to type 2 extra characters causing problems with code clarity. Even if the body of some construct is only one line long, do <em>not</em> drop the braces. Just don't, examples:</p>
+
+ <p class="bad">// These are all wrong. </p>
+
+ <div class="codebox"><pre>
+if (condition) do_stuff();
+
+if (condition)
+ do_stuff();
+
+while (condition)
+ do_stuff();
+
+for ($i = 0; $i &lt; size; $i++)
+ do_stuff($i);
+ </pre></div>
+
+ <p class="good">// These are all right. </p>
+ <div class="codebox"><pre>
+if (condition)
+{
+ do_stuff();
+}
+
+while (condition)
+{
+ do_stuff();
+}
+
+for ($i = 0; $i &lt; size; $i++)
+{
+ do_stuff();
+}
+ </pre></div>
+
+ <h4>Where to put the braces:</h4>
+ <p>This one is a bit of a holy war, but we're going to use a style that can be summed up in one sentence: Braces always go on their own line. The closing brace should also always be at the same column as the corresponding opening brace, examples:</p>
+
+ <div class="codebox"><pre>
+if (condition)
+{
+ while (condition2)
+ {
+ ...
+ }
+}
+else
+{
+ ...
+}
+
+for ($i = 0; $i &lt; $size; $i++)
+{
+ ...
+}
+
+while (condition)
+{
+ ...
+}
+
+function do_stuff()
+{
+ ...
+}
+ </pre></div>
+
+ <h4>Use spaces between tokens:</h4>
+ <p>This is another simple, easy step that helps keep code readable without much effort. Whenever you write an assignment, expression, etc.. Always leave <em>one</em> space between the tokens. Basically, write code as if it was English. Put spaces between variable names and operators. Don't put spaces just after an opening bracket or before a closing bracket. Don't put spaces just before a comma or a semicolon. This is best shown with a few examples, examples:</p>
+
+ <p>// Each pair shows the wrong way followed by the right way. </p>
+
+ <div class="codebox"><pre>
+$i=0;
+$i = 0;
+
+if($i&lt;7) ...
+if ($i &lt; 7) ...
+
+if ( ($i &lt; 7)&amp;&amp;($j &gt; 8) ) ...
+if ($i &lt; 7 &amp;&amp; $j &gt; 8) ...
+
+do_stuff( $i, 'foo', $b );
+do_stuff($i, 'foo', $b);
+
+for($i=0; $i&lt;$size; $i++) ...
+for ($i = 0; $i &lt; $size; $i++) ...
+
+$i=($j &lt; $size)?0:1;
+$i = ($j &lt; $size) ? 0 : 1;
+ </pre></div>
+
+ <h4>Operator precedence:</h4>
+ <p>Do you know the exact precedence of all the operators in PHP? Neither do I. Don't guess. Always make it obvious by using brackets to force the precedence of an equation so you know what it does. Remember to not over-use this, as it may harden the readability. Basically, do not enclose single expressions. Examples:</p>
+
+ <p class="bad">// what's the result? who knows. </p>
+ <div class="codebox"><pre>
+$bool = ($i &lt; 7 &amp;&amp; $j &gt; 8 || $k == 4);
+ </pre></div>
+
+ <p class="bad">// now you can be certain what I'm doing here.</p>
+ <div class="codebox"><pre>
+$bool = (($i &lt; 7) &amp;&amp; (($j &lt; 8) || ($k == 4)));
+ </pre></div>
+
+ <p class="good">// But this one is even better, because it is easier on the eye but the intention is preserved</p>
+ <div class="codebox"><pre>
+$bool = ($i &lt; 7 &amp;&amp; ($j &lt; 8 || $k == 4));
+ </pre></div>
+
+ <h4>Quoting strings:</h4>
+ <p>There are two different ways to quote strings in PHP - either with single quotes or with double quotes. The main difference is that the parser does variable interpolation in double-quoted strings, but not in single quoted strings. Because of this, you should <em>always</em> use single quotes <em>unless</em> you specifically need variable interpolation to be done on that string. This way, we can save the parser the trouble of parsing a bunch of strings where no interpolation needs to be done.</p>
+ <p>Also, if you are using a string variable as part of a function call, you do not need to enclose that variable in quotes. Again, this will just make unnecessary work for the parser. Note, however, that nearly all of the escape sequences that exist for double-quoted strings will not work with single-quoted strings. Be careful, and feel free to break this guideline if it's making your code easier to read, examples:</p>
+
+ <p class="bad">// wrong </p>
+ <div class="codebox"><pre>
+$str = "This is a really long string with no variables for the parser to find.";
+
+do_stuff("$str");
+ </pre></div>
+
+ <p class="good">// right</p>
+ <div class="codebox"><pre>
+$str = 'This is a really long string with no variables for the parser to find.';
+
+do_stuff($str);
+ </pre></div>
+
+ <p class="bad">// Sometimes single quotes are just not right</p>
+ <div class="codebox"><pre>
+$post_url = $phpbb_root_path . 'posting.' . $phpEx . '?mode=' . $mode . '&amp;amp;start=' . $start;
+ </pre></div>
+
+ <p class="good">// Double quotes are sometimes needed to not overcroud the line with concentinations</p>
+ <div class="codebox"><pre>
+$post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;amp;start=$start";
+ </pre></div>
+
+ <p>In SQL Statements mixing single and double quotes is partly allowed (following the guidelines listed here about SQL Formatting), else it should be tryed to only use one method - mostly single quotes.</p>
+
+ <h4>Associative array keys:</h4>
+ <p>In PHP, it's legal to use a literal string as a key to an associative array without quoting that string. We don't want to do this -- the string should always be quoted to avoid confusion. Note that this is only when we're using a literal, not when we're using a variable, examples:</p>
+
+ <p class="bad">// wrong</p>
+ <div class="codebox"><pre>
+$foo = $assoc_array[blah];
+ </pre></div>
+
+ <p class="good">// right </p>
+ <div class="codebox"><pre>
+$foo = $assoc_array['blah'];
+ </pre></div>
+
+ <p class="bad">// wrong</p>
+ <div class="codebox"><pre>
+$foo = $assoc_array["$var"];
+ </pre></div>
+
+ <p class="good">// right </p>
+ <div class="codebox"><pre>
+$foo = $assoc_array[$var];
+ </pre></div>
+
+ <h4>Comments:</h4>
+ <p>Each complex function should be preceded by a comment that tells a programmer everything they need to know to use that function. The meaning of every parameter, the expected input, and the output are required as a minimal comment. The function's behaviour in error conditions (and what those error conditions are) should also be present - but mostly included within the comment about the output.<br /><br />Especially important to document are any assumptions the code makes, or preconditions for its proper operation. Any one of the developers should be able to look at any part of the application and figure out what's going on in a reasonable amount of time.<br /><br />Avoid using <code>/* */</code> comment blocks for one-line comments, <code>//</code> should be used for one/two-liners.</p>
+
+ <h4>Magic numbers:</h4>
+ <p>Don't use them. Use named constants for any literal value other than obvious special cases. Basically, it's ok to check if an array has 0 elements by using the literal 0. It's not ok to assign some special meaning to a number and then use it everywhere as a literal. This hurts readability AND maintainability. The constants <code>true</code> and <code>false</code> should be used in place of the literals 1 and 0 -- even though they have the same values (but not type!), it's more obvious what the actual logic is when you use the named constants. Typecast variables where it is needed, do not rely on the correct variable type (PHP is currently very loose on typecasting which can lead to security problems if a developer does not have a very close eye to it).</p>
+
+ <h4>Shortcut operators:</h4>
+ <p>The only shortcut operators that cause readability problems are the shortcut increment <code>$i++</code> and decrement <code>$j--</code> operators. These operators should not be used as part of an expression. They can, however, be used on their own line. Using them in expressions is just not worth the headaches when debugging, examples:</p>
+
+ <p class="bad">// wrong </p>
+ <div class="codebox"><pre>
+$array[++$i] = $j;
+$array[$i++] = $k;
+ </pre></div>
+
+ <p class="good">// right </p>
+ <div class="codebox"><pre>
+$i++;
+$array[$i] = $j;
+
+$array[$i] = $k;
+$i++;
+ </pre></div>
+
+ <h4>Inline conditionals:</h4>
+ <p>Inline conditionals should only be used to do very simple things. Preferably, they will only be used to do assignments, and not for function calls or anything complex at all. They can be harmful to readability if used incorrectly, so don't fall in love with saving typing by using them, examples:</p>
+
+ <p class="bad">// Bad place to use them</p>
+ <div class="codebox"><pre>
+($i &lt; $size &amp;&amp; $j &gt; $size) ? do_stuff($foo) : do_stuff($bar);
+ </pre></div>
+
+ <p class="good">// OK place to use them </p>
+ <div class="codebox"><pre>
+$min = ($i &lt; $j) ? $i : $j;
+ </pre></div>
+
+ <h4>Don't use uninitialized variables.</h4>
+ <p>For phpBB3, we intend to use a higher level of run-time error reporting. This will mean that the use of an uninitialized variable will be reported as a warning. These warnings can be avoided by using the built-in isset() function to check whether a variable has been set - but preferably the variable is always existing. For checking if an array has a key set this can come in handy though, examples:</p>
+
+ <p class="bad">// Wrong </p>
+ <div class="codebox"><pre>
+if ($forum) ...
+ </pre></div>
+
+ <p class="good">// Right </p>
+ <div class="codebox"><pre>
+if (isset($forum)) ...
+ </pre></div>
+
+ <p class="good">// Also possible</p>
+ <div class="codebox"><pre>
+if (isset($forum) &amp;&amp; $forum == 5)
+ </pre></div>
+
+ <p>The <code>empty()</code> function is useful if you want to check if a variable is not set or being empty (an empty string, 0 as an integer or string, NULL, false, an empty array or a variable declared, but without a value in a class). Therefore empty should be used in favor of <code>isset($array) &amp;&amp; sizeof($array) &gt; 0</code> - this can be written in a shorter way as <code>!empty($array)</code>.</p>
+
+ <h4>Switch statements:</h4>
+ <p>Switch/case code blocks can get a bit long sometimes. To have some level of notice and being in-line with the opening/closing brace requirement (where they are on the same line for better readability), this also applies to switch/case code blocks and the breaks. An example:</p>
+
+ <p class="bad">// Wrong </p>
+ <div class="codebox"><pre>
+switch ($mode)
+{
+ case 'mode1':
+ // I am doing something here
+ break;
+ case 'mode2':
+ // I am doing something completely different here
+ break;
+}
+ </pre></div>
+
+ <p class="good">// Good </p>
+ <div class="codebox"><pre>
+switch ($mode)
+{
+ case 'mode1':
+ // I am doing something here
+ break;
+
+ case 'mode2':
+ // I am doing something completely different here
+ break;
+
+ default:
+ // Always assume that a case was not caught
+ break;
+}
+ </pre></div>
+
+ <p class="good">// Also good, if you have more code between the case and the break </p>
+ <div class="codebox"><pre>
+switch ($mode)
+{
+ case 'mode1':
+
+ // I am doing something here
+
+ break;
+
+ case 'mode2':
+
+ // I am doing something completely different here
+
+ break;
+
+ default:
+
+ // Always assume that a case was not caught
+
+ break;
+}
+ </pre></div>
+
+ <p>Even if the break for the default case is not needed, it is sometimes better to include it just for readability and completeness.</p>
+
+ <p>If no break is intended, please add a comment instead. An example:</p>
+
+ <p class="good">// Example with no break </p>
+ <div class="codebox"><pre>
+switch ($mode)
+{
+ case 'mode1':
+
+ // I am doing something here
+
+ // no break here
+
+ case 'mode2':
+
+ // I am doing something completely different here
+
+ break;
+
+ default:
+
+ // Always assume that a case was not caught
+
+ break;
+}
+ </pre></div>
+
+ <a name="sql"></a><h3>2.iii. SQL/SQL Layout</h3>
+
+ <h4>Common SQL Guidelines: </h4>
+ <p>All SQL should be cross-DB compatible, if DB specific SQL is used alternatives must be provided which work on all supported DB's (MySQL3/4/5, MSSQL (7.0 and 2000), PostgreSQL (7.0+), Firebird, SQLite, Oracle8, ODBC (generalised if possible)).</p>
+ <p>All SQL commands should utilise the DataBase Abstraction Layer (DBAL)</p>
+
+ <h4>SQL code layout:</h4>
+ <p>SQL Statements are often unreadable without some formatting, since they tend to be big at times. Though the formatting of sql statements adds a lot to the readability of code. SQL statements should be formatted in the following way, basically writing keywords: </p>
+
+ <div class="codebox"><pre>
+$sql = 'SELECT *
+&lt;-one tab-&gt;FROM ' . SOME_TABLE . '
+&lt;-one tab-&gt;WHERE a = 1
+&lt;-two tabs-&gt;AND (b = 2
+&lt;-three tabs-&gt;OR b = 3)
+&lt;-one tab-&gt;ORDER BY b';
+ </pre></div>
+
+ <p>Here the example with the tabs applied:</p>
+
+ <div class="codebox"><pre>
+$sql = 'SELECT *
+ FROM ' . SOME_TABLE . '
+ WHERE a = 1
+ AND (b = 2
+ OR b = 3)
+ ORDER BY b';
+ </pre></div>
+
+ <h4>SQL Quotes: </h4>
+ <p>Double quotes where applicable (The variables in these examples are typecasted to integers before) ... examples: </p>
+
+ <p class="bad">// These are wrong.</p>
+ <div class="codebox"><pre>
+"UPDATE " . SOME_TABLE . " SET something = something_else WHERE a = $b";
+
+'UPDATE ' . SOME_TABLE . ' SET something = ' . $user_id . ' WHERE a = ' . $something;
+ </pre></div>
+
+ <p class="good">// These are right. </p>
+
+ <div class="codebox"><pre>
+'UPDATE ' . SOME_TABLE . " SET something = something_else WHERE a = $b";
+
+'UPDATE ' . SOME_TABLE . " SET something = $user_id WHERE a = $something";
+ </pre></div>
+
+ <p>In other words use single quotes where no variable substitution is required or where the variable involved shouldn't appear within double quotes. Otherwise use double quotes.</p>
+
+ <h4>Avoid DB specific SQL: </h4>
+ <p>The &quot;not equals operator&quot;, as defined by the SQL:2003 standard, is &quot;&lt;&gt;&quot;</p>
+
+ <p class="bad">// This is wrong.</p>
+ <div class="codebox"><pre>
+$sql = 'SELECT *
+ FROM ' . SOME_TABLE . '
+ WHERE a != 2';
+ </pre></div>
+
+ <p class="good">// This is right. </p>
+ <div class="codebox"><pre>
+$sql = 'SELECT *
+ FROM ' . SOME_TABLE . '
+ WHERE a &lt;&gt; 2';
+ </pre></div>
+
+ <h4>Common DBAL methods: </h4>
+
+ <h4>sql_escape():</h4>
+
+ <p>Always use <code>$db-&gt;sql_escape()</code> if you need to check for a string within an SQL statement (even if you are sure the variable cannot contain single quotes - never trust your input), for example:</p>
+
+ <div class="codebox"><pre>
+$sql = 'SELECT *
+ FROM ' . SOME_TABLE . "
+ WHERE username = '" . $db-&gt;sql_escape($username) . "'";
+ </pre></div>
+
+ <h4>sql_query_limit():</h4>
+
+ <p>We do not add limit statements to the sql query, but instead use <code>$db-&gt;sql_query_limit()</code>. You basically pass the query, the total number of lines to retrieve and the offset.</p>
+
+ <p><strong>Note: </strong> Since Oracle handles limits differently and because of how we implemented this handling you need to take special care if you use <code>sql_query_limit</code> with an sql query retrieving data from more than one table.</p>
+
+ <p>Make sure when using something like "SELECT x.*, y.jars" that there is not a column named jars in x; make sure that there is no overlap between an implicit column and the explicit columns.</p>
+
+ <h4>sql_build_array():</h4>
+
+ <p>If you need to UPDATE or INSERT data, make use of the <code>$db-&gt;sql_build_array()</code> function. This function already escapes strings and checks other types, so there is no need to do this here. The data to be inserted should go into an array - <code>$sql_ary</code> - or directly within the statement if one or two variables needs to be inserted/updated. An example of an insert statement would be:</p>
+
+ <div class="codebox"><pre>
+$sql_ary = array(
+ 'somedata' =&gt; $my_string,
+ 'otherdata' =&gt; $an_int,
+ 'moredata' =&gt; $another_int
+);
+
+$db-&gt;sql_query('INSERT INTO ' . SOME_TABLE . ' ' . $db-&gt;sql_build_array('INSERT', $sql_ary));
+ </pre></div>
+
+ <p>To complete the example, this is how an update statement would look like:</p>
+
+ <div class="codebox"><pre>
+$sql_ary = array(
+ 'somedata' =&gt; $my_string,
+ 'otherdata' =&gt; $an_int,
+ 'moredata' =&gt; $another_int
+);
+
+$sql = 'UPDATE ' . SOME_TABLE . '
+ SET ' . $db-&gt;sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . (int) $user_id;
+$db-&gt;sql_query($sql);
+ </pre></div>
+
+ <p>The <code>$db-&gt;sql_build_array()</code> function supports the following modes: <code>INSERT</code> (example above), <code>INSERT_SELECT</code> (building query for <code>INSERT INTO table (...) SELECT value, column ...</code> statements), <code>UPDATE</code> (example above) and <code>SELECT</code> (for building WHERE statement [AND logic]).</p>
+
+ <h4>sql_multi_insert():</h4>
+
+ <p>If you want to insert multiple statements at once, please use the separate <code>sql_multi_insert()</code> method. An example:</p>
+
+ <div class="codebox"><pre>
+$sql_ary = array();
+
+$sql_ary[] = array(
+ 'somedata' =&gt; $my_string_1,
+ 'otherdata' =&gt; $an_int_1,
+ 'moredata' =&gt; $another_int_1,
+);
+
+$sql_ary[] = array(
+ 'somedata' =&gt; $my_string_2,
+ 'otherdata' =&gt; $an_int_2,
+ 'moredata' =&gt; $another_int_2,
+);
+
+$db->sql_multi_insert(SOME_TABLE, $sql_ary);
+ </pre></div>
+
+ <h4>sql_in_set():</h4>
+
+ <p>The <code>$db-&gt;sql_in_set()</code> function should be used for building <code>IN ()</code> and <code>NOT IN ()</code> constructs. Since (specifically) MySQL tend to be faster if for one value to be compared the <code>=</code> and <code>&lt;&gt;</code> operator is used, we let the DBAL decide what to do. A typical example of doing a positive match against a number of values would be:</p>
+
+ <div class="codebox"><pre>
+$sql = 'SELECT *
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db-&gt;sql_in_set('forum_id', $forum_ids);
+$db-&gt;sql_query($sql);
+ </pre></div>
+
+ <p>Based on the number of values in $forum_ids, the query can look differently.</p>
+
+ <p class="good">// SQL Statement if $forum_ids = array(1, 2, 3);</p>
+
+ <div class="codebox"><pre>
+SELECT FROM phpbb_forums WHERE forum_id IN (1, 2, 3)
+ </pre></div>
+
+ <p class="good">// SQL Statement if $forum_ids = array(1) or $forum_ids = 1</p>
+
+ <div class="codebox"><pre>
+SELECT FROM phpbb_forums WHERE forum_id = 1
+ </pre></div>
+
+ <p>Of course the same is possible for doing a negative match against a number of values:</p>
+
+ <div class="codebox"><pre>
+$sql = 'SELECT *
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db-&gt;sql_in_set('forum_id', $forum_ids, <strong>true</strong>);
+$db-&gt;sql_query($sql);
+ </pre></div>
+
+ <p>Based on the number of values in $forum_ids, the query can look differently here too.</p>
+
+ <p class="good">// SQL Statement if $forum_ids = array(1, 2, 3);</p>
+
+ <div class="codebox"><pre>
+SELECT FROM phpbb_forums WHERE forum_id <strong>NOT</strong> IN (1, 2, 3)
+ </pre></div>
+
+ <p class="good">// SQL Statement if $forum_ids = array(1) or $forum_ids = 1</p>
+
+ <div class="codebox"><pre>
+SELECT FROM phpbb_forums WHERE forum_id <strong>&lt;&gt;</strong> 1
+ </pre></div>
+
+ <p>If the given array is empty, an error will be produced.</p>
+
+ <h4>sql_build_query():</h4>
+
+ <p>The <code>$db-&gt;sql_build_query()</code> function is responsible for building sql statements for select and select distinct queries if you need to JOIN on more than one table or retrieving data from more than one table while doing a JOIN. This needs to be used to make sure the resulting statement is working on all supported db's. Instead of explaining every possible combination, i will give a short example:</p>
+
+ <div class="codebox"><pre>
+$sql_array = array(
+ 'SELECT' =&gt; 'f.*, ft.mark_time',
+
+ 'FROM' =&gt; array(
+ FORUMS_WATCH_TABLE =&gt; 'fw',
+ FORUMS_TABLE =&gt; 'f'
+ ),
+
+ 'LEFT_JOIN' =&gt; array(
+ array(
+ 'FROM' =&gt; array(FORUMS_TRACK_TABLE =&gt; 'ft'),
+ 'ON' =&gt; 'ft.user_id = ' . $user-&gt;data['user_id'] . ' AND ft.forum_id = f.forum_id'
+ )
+ ),
+
+ 'WHERE' =&gt; 'fw.user_id = ' . $user-&gt;data['user_id'] . '
+ AND f.forum_id = fw.forum_id',
+
+ 'ORDER_BY' =&gt; 'left_id'
+);
+
+$sql = $db-&gt;sql_build_query('SELECT', $sql_array);
+ </pre></div>
+
+ <p>The possible first parameter for sql_build_query() is SELECT or SELECT_DISTINCT. As you can see, the logic is pretty self-explaining. For the LEFT_JOIN key, just add another array if you want to join on to tables for example. The added benefit of using this construct is that you are able to easily build the query statement based on conditions - for example the above LEFT_JOIN is only necessary if server side topic tracking is enabled; a slight adjustement would be:</p>
+
+ <div class="codebox"><pre>
+$sql_array = array(
+ 'SELECT' =&gt; 'f.*',
+
+ 'FROM' =&gt; array(
+ FORUMS_WATCH_TABLE =&gt; 'fw',
+ FORUMS_TABLE =&gt; 'f'
+ ),
+
+ 'WHERE' =&gt; 'fw.user_id = ' . $user-&gt;data['user_id'] . '
+ AND f.forum_id = fw.forum_id',
+
+ 'ORDER_BY' =&gt; 'left_id'
+);
+
+if ($config['load_db_lastread'])
+{
+ $sql_array['LEFT_JOIN'] = array(
+ array(
+ 'FROM' =&gt; array(FORUMS_TRACK_TABLE =&gt; 'ft'),
+ 'ON' =&gt; 'ft.user_id = ' . $user-&gt;data['user_id'] . ' AND ft.forum_id = f.forum_id'
+ )
+ );
+
+ $sql_array['SELECT'] .= ', ft.mark_time ';
+}
+else
+{
+ // Here we read the cookie data
+}
+
+$sql = $db-&gt;sql_build_query('SELECT', $sql_array);
+ </pre></div>
+
+ <a name="optimizing"></a><h3>2.iv. Optimizations</h3>
+
+ <h4>Operations in loop definition: </h4>
+ <p>Always try to optimize your loops if operations are going on at the comparing part, since this part is executed every time the loop is parsed through. For assignments a descriptive name should be chosen. Example:</p>
+
+ <p class="bad">// On every iteration the sizeof function is called</p>
+ <div class="codebox"><pre>
+for ($i = 0; $i &lt; sizeof($post_data); $i++)
+{
+ do_something();
+}
+ </pre></div>
+
+ <p class="good">// You are able to assign the (not changing) result within the loop itself</p>
+ <div class="codebox"><pre>
+for ($i = 0, $size = sizeof($post_data); $i &lt; $size; $i++)
+{
+ do_something();
+}
+ </pre></div>
+
+ <h4>Use of in_array(): </h4>
+ <p>Try to avoid using in_array() on huge arrays, and try to not place them into loops if the array to check consist of more than 20 entries. in_array() can be very time consuming and uses a lot of cpu processing time. For little checks it is not noticable, but if checked against a huge array within a loop those checks alone can be a bunch of seconds. If you need this functionality, try using isset() on the arrays keys instead, actually shifting the values into keys and vice versa. A call to <code>isset($array[$var])</code> is a lot faster than <code>in_array($var, array_keys($array))</code> for example.</p>
+
+
+ <a name="general"></a><h3>2.v. General Guidelines</h3>
+
+ <h4>General things:</h4>
+ <p>Never trust user input (this also applies to server variables as well as cookies).</p>
+ <p>Try to sanitize values returned from a function.</p>
+ <p>Try to sanitize given function variables within your function.</p>
+ <p>The auth class should be used for all authorisation checking.</p>
+ <p>No attempt should be made to remove any copyright information (either contained within the source or displayed interactively when the source is run/compiled), neither should the copyright information be altered in any way (it may be added to).</p>
+
+ <h4>Variables: </h4>
+ <p>Make use of the <code>request_var()</code> function for anything except for submit or single checking params. </p>
+ <p>The request_var function determines the type to set from the second parameter (which determines the default value too). If you need to get a scalar variable type, you need to tell this the request_var function explicitly. Examples:</p>
+
+ <p class="bad">// Old method, do not use it</p>
+ <div class="codebox"><pre>
+$start = (isset($HTTP_GET_VARS['start'])) ? intval($HTTP_GET_VARS['start']) : intval($HTTP_POST_VARS['start']);
+$submit = (isset($HTTP_POST_VARS['submit'])) ? true : false;
+ </pre></div>
+
+ <p class="good">// Use request var and define a default variable (use the correct type)</p>
+ <div class="codebox"><pre>
+$start = request_var('start', 0);
+$submit = (isset($_POST['submit'])) ? true : false;
+ </pre></div>
+
+ <p class="bad">// $start is an int, the following use of request_var therefore is not allowed</p>
+ <div class="codebox"><pre>
+$start = request_var('start', '0');
+ </pre></div>
+
+ <p class="good">// Getting an array, keys are integers, value defaults to 0</p>
+ <div class="codebox"><pre>
+$mark_array = request_var('mark', array(0));
+ </pre></div>
+
+ <p class="good">// Getting an array, keys are strings, value defaults to 0</p>
+ <div class="codebox"><pre>
+$action_ary = request_var('action', array('' =&gt; 0));
+ </pre></div>
+
+ <h4>Login checks/redirection: </h4>
+ <p>To show a forum login box use <code>login_forum_box($forum_data)</code>, else use the <code>login_box()</code> function.</p>
+
+ <p>The <code>login_box()</code> function can have a redirect as the first parameter. As a thumb of rule, specify an empty string if you want to redirect to the users current location, else do not add the <code>$SID</code> to the redirect string (for example within the ucp/login we redirect to the board index because else the user would be redirected to the login screen).</p>
+
+ <h4>Sensitive Operations: </h4>
+ <p>For sensitive operations always let the user confirm the action. For the confirmation screens, make use of the <code>confirm_box()</code> function.</p>
+
+ <h4>Altering Operations: </h4>
+ <p>For operations altering the state of the database, for instance posting, always verify the form token, unless you are already using <code>confirm_box()</code>. To do so, make use of the <code>add_form_key()</code> and <code>check_form_key()</code> functions. </p>
+ <div class="codebox"><pre>
+ add_form_key('my_form');
+
+ if ($submit)
+ {
+ if (!check_form_key('my_form'))
+ {
+ trigger_error('FORM_INVALID');
+ }
+ }
+ </pre></div>
+
+ <p>The string passed to <code>add_form_key()</code> needs to match the string passed to <code>check_form_key()</code>. Another requirement for this to work correctly is that all forms include the <code>{S_FORM_TOKEN}</code> template variable.</p>
+
+
+ <h4>Sessions: </h4>
+ <p>Sessions should be initiated on each page, as near the top as possible using the following code:</p>
+
+ <div class="codebox"><pre>
+$user-&gt;session_begin();
+$auth-&gt;acl($user-&gt;data);
+$user-&gt;setup();
+ </pre></div>
+
+ <p>The <code>$user-&gt;setup()</code> call can be used to pass on additional language definition and a custom style (used in viewforum).</p>
+
+ <h4>Errors and messages: </h4>
+ <p>All messages/errors should be outputed by calling <code>trigger_error()</code> using the appropriate message type and language string. Example:</p>
+
+ <div class="codebox"><pre>
+trigger_error('NO_FORUM');
+ </pre></div>
+
+ <div class="codebox"><pre>
+trigger_error($user-&gt;lang['NO_FORUM']);
+ </pre></div>
+
+ <div class="codebox"><pre>
+trigger_error('NO_MODE', E_USER_ERROR);
+ </pre></div>
+
+ <h4>Url formatting</h4>
+
+ <p>All urls pointing to internal files need to be prepended by the <code>$phpbb_root_path</code> variable. Within the administration control panel all urls pointing to internal files need to be prepended by the <code>$phpbb_admin_path</code> variable. This makes sure the path is always correct and users being able to just rename the admin folder and the acp still working as intended (though some links will fail and the code need to be slightly adjusted).</p>
+
+ <p>The <code>append_sid()</code> function from 2.0.x is available too, though does not handle url alterations automatically. Please have a look at the code documentation if you want to get more details on how to use append_sid(). A sample call to append_sid() can look like this:</p>
+
+ <div class="codebox"><pre>
+append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;g=' . $row['group_id'])
+ </pre></div>
+
+ <h4>General function usage: </h4>
+
+ <p>Some of these functions are only chosen over others because of personal preference and having no other benefit than to be consistant over the code.</p>
+
+ <ul>
+ <li>
+ <p>Use <code>sizeof</code> instead of <code>count</code></p>
+ </li>
+ <li>
+ <p>Use <code>strpos</code> instead of <code>strstr</code></p>
+ </li>
+ <li>
+ <p>Use <code>else if</code> instead of <code>elseif</code></p>
+ </li>
+ <li>
+ <p>Use <code>false</code> (lowercase) instead of <code>FALSE</code></p>
+ </li>
+ <li>
+ <p>Use <code>true</code> (lowercase) instead of <code>TRUE</code></p>
+ </li>
+ </ul>
+
+ <h4>Exiting</h4>
+
+ <p>Your page should either call <code>page_footer()</code> in the end to trigger output through the template engine and terminate the script, or alternatively at least call the <code>exit_handler()</code>. That call is necessary because it provides a method for external applications embedding phpBB to be called at the end of the script.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="styling"></a><h2>3. Styling</h2>
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+ <a name="cfgfiles"></a><h3>3.i. Style Config Files</h3>
+ <p>Style cfg files are simple name-value lists with the information necessary for installing a style. Similar cfg files exist for templates, themes and imagesets. These follow the same principle and will not be introduced individually. Styles can use installed components by using the required_theme/required_template/required_imageset entries. The important part of the style configuration file is assigning an unique name.</p>
+ <div class="codebox"><pre>
+ # General Information about this style
+ name = prosilver_duplicate
+ copyright = &copy; phpBB Group, 2007
+ version = 3.0.3
+ required_template = prosilver
+ required_theme = prosilver
+ required_imageset = prosilver
+ </pre></div>
+ <a name="genstyling"></a><h3>3.2. General Styling Rules</h3>
+<p>Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the intendation and coding guidelines also apply to templates where possible.</p>
+
+<p>The outer table class <code>forumline</code> has gone and is replaced with <code>tablebg</code>.</p>
+<p>When writing <code>&lt;table&gt;</code> the order <code>&lt;table class="" cellspacing="" cellpadding="" border="" align=""&gt;</code> creates consistency and allows everyone to easily see which table produces which "look". The same applies to most other tags for which additional parameters can be set, consistency is the major aim here.</p>
+<p>Each block level element should be indented by one tab, same for tabular elements, e.g. <code>&lt;tr&gt;</code> <code>&lt;td&gt;</code> etc., whereby the intendiation of <code>&lt;table&gt;</code> and the following/ending <code>&lt;tr&gt;</code> should be on the same line. This applies not to div elements of course.</p>
+<p>Don't use <code>&lt;span&gt;</code> more than is essential ... the CSS is such that text sizes are dependent on the parent class. So writing <code>&lt;span class="gensmall"&gt;&lt;span class="gensmall"&gt;TEST&lt;/span&gt;&lt;/span&gt;</code> will result in very very small text. Similarly don't use span at all if another element can contain the class definition, e.g.</p>
+
+<div class="codebox"><pre>
+&lt;td&gt;&lt;span class=&quot;gensmall&quot;&gt;TEST&lt;/span&gt;&lt;/td&gt;
+</pre></div>
+
+<p>can just as well become:</p>
+<div class="codebox"><pre>
+&lt;td class=&quot;gensmall&quot;&gt;TEST&lt;/td&gt;
+</pre></div>
+
+<p>Try to match text class types with existing useage, e.g. don't use the nav class where viewtopic uses gensmall for example.</p>
+
+<p>Row colours/classes are now defined by the template, use an <code>IF S_ROW_COUNT</code> switch, see viewtopic or viewforum for an example.</p>
+
+<p>Remember block level ordering is important ... while not all pages validate as XHTML 1.0 Strict compliant it is something we're trying to work too.</p>
+
+<p>Use a standard cellpadding of 2 and cellspacing of 0 on outer tables. Inner tables can vary from 0 to 3 or even 4 depending on the need.</p>
+
+<p><strong>Use div container/css for styling and table for data representation.</strong></p>
+
+<p>The separate catXXXX and thXXX classes are gone. When defining a header cell just use <code>&lt;th&gt;</code> rather than <code>&lt;th class="thHead"&gt;</code> etc. Similarly for cat, don't use <code>&lt;td class="catLeft"&gt;</code> use <code>&lt;td class="cat"&gt;</code> etc.</p>
+
+<p>Try to retain consistency of basic layout and class useage, i.e. _EXPLAIN text should generally be placed below the title it explains, e.g. <code>{L_POST_USERNAME}&lt;br /&gt;&lt;span class="gensmall"&gt;{L_POST_USERNAME_EXPLAIN}&lt;/span&gt;</code> is the typical way of handling this ... there may be exceptions and this isn't a hard and fast rule.</p>
+
+<p>Try to keep template conditional and other statements tabbed in line with the block to which they refer.</p>
+
+<p class="good">this is correct</p>
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- BEGIN test --&gt;</span>
+ &lt;tr&gt;
+ &lt;td&gt;&#123;test.TEXT&#125;&lt;/td&gt;
+ &lt;/tr&gt;
+<span class="comment">&lt;!-- END test --&gt;</span>
+</pre></div>
+
+<p class="good">this is also correct:</p>
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- BEGIN test --&gt;</span>
+&lt;tr&gt;
+ &lt;td&gt;&#123;test.TEXT&#125;&lt;/td&gt;
+&lt;/tr&gt;
+<span class="comment">&lt;!-- END test --&gt;</span>
+</pre></div>
+
+<p>it gives immediate feedback on exactly what is looping - decide which way to use based on the readability.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="templating"></a><h2>4. Templating</h2>
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+ <a name="templates"></a><h3>4.i. General Templating</h3>
+
+<h4>File naming</h4>
+<p>Firstly templates now take the suffix &quot;.html&quot; rather than &quot;.tpl&quot;. This was done simply to make the lifes of some people easier wrt syntax highlighting, etc.</p>
+
+<h4>Variables</h4>
+<p>All template variables should be named appropriately (using underscores for spaces), language entries should be prefixed with L_, system data with S_, urls with U_, javascript urls with UA_, language to be put in javascript statements with LA_, all other variables should be presented 'as is'.</p>
+
+<p>L_* template variables are automatically tried to be mapped to the corresponding language entry if the code does not set (and therefore overwrite) this variable specifically. For example <code>{L_USERNAME}</code> maps to <code>$user-&gt;lang['USERNAME']</code>. The LA_* template variables are handled within the same way, but properly escaped to be put in javascript code. This should reduce the need to assign loads of new lang vars in Modifications.
+</p>
+
+<h4>Blocks/Loops</h4>
+<p>The basic block level loop remains and takes the form:</p>
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- BEGIN loopname --&gt;</span>
+ markup, {loopname&#46;X_YYYYY}, etc&#46;
+<span class="comment">&lt;!-- END loopname --&gt;</span>
+</pre></div>
+
+<p>A bit later loops will be explained further. To not irritate you we will explain conditionals as well as other statements first.</p>
+
+<h4>Including files</h4>
+<p>Something that existed in 2.0.x which no longer exists in 3.0.x is the ability to assign a template to a variable. This was used (for example) to output the jumpbox. Instead (perhaps better, perhaps not but certainly more flexible) we now have INCLUDE. This takes the simple form:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- INCLUDE filename --&gt;</span>
+</pre></div>
+
+<p>You will note in the 3.0 templates the major sources start with <code>&lt;!-- INCLUDE overall_header.html --&gt;</code> or <code>&lt;!-- INCLUDE simple_header.html --&gt;</code>, etc. In 2.0.x control of &quot;which&quot; header to use was defined entirely within the code. In 3.0.x the template designer can output what they like. Note that you can introduce new templates (i.e. other than those in the default set) using this system and include them as you wish ... perhaps useful for a common &quot;menu&quot; bar or some such. No need to modify loads of files as with 2.0.x.</p>
+
+<p>Added in <strong>3.0.6</strong> is the ability to include a file using a template variable to specify the file, this functionality only works for root variables (i.e. not block variables).</p>
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- INCLUDE {FILE_VAR} --&gt;</span>
+</pre></div>
+
+<p>Template defined variables can also be utilised.
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- DEFINE $SOME_VAR = 'my_file.html' --&gt;</span>
+<span class="comment">&lt;!-- INCLUDE {$SOME_VAR} --&gt;</span>
+</pre></div>
+<!-- no longer added in 3.0.6
+<p>Also added in <strong>3.0.6</strong> is the ability to increment or decrement a variable on use. This can be used for instances like tabindexes, where the amount of entries is not statically known.
+The INC (for incrementing) and DEC (for decrementing) commands will print the <strong>current</strong> state of a defined var and then increment/decrement it by one (postincrement/postdecrement).</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- DEFINE $SOME_VAR = 1 --&gt;</span>
+<span class="comment">&lt;!-- INC $SOME_VAR --&gt;</span>
+Result: 1<br />
+<span class="comment">{$SOME_VAR}</span>
+Result: 2<br />
+</pre></div>
+//-->
+<h4>PHP</h4>
+<p>A contentious decision has seen the ability to include PHP within the template introduced. This is achieved by enclosing the PHP within relevant tags:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- PHP --&gt;</span>
+ echo &quot;hello!&quot;;
+<span class="comment">&lt;!-- ENDPHP --&gt;</span>
+</pre></div>
+
+<p>You may also include PHP from an external file using:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- INCLUDEPHP somefile&#46;php --&gt;</span>
+</pre></div>
+
+<p>it will be included and executed inline.<br /><br />A note, it is very much encouraged that template designers do not include PHP. The ability to include raw PHP was introduced primarily to allow end users to include banner code, etc. without modifying multiple files (as with 2.0.x). It was not intended for general use ... hence <!-- w --><a href="http://www.phpbb.com">www.phpbb.com</a><!-- w --> will <strong>not</strong> make available template sets which include PHP. And by default templates will have PHP disabled (the admin will need to specifically activate PHP for a template).</p>
+
+<h4>Conditionals/Control structures</h4>
+<p>The most significant addition to 3.0.x are conditions or control structures, &quot;if something then do this else do that&quot;. The system deployed is very similar to Smarty. This may confuse some people at first but it offers great potential and great flexibility with a little imagination. In their most simple form these constructs take the form:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- IF expr --&gt;</span>
+ markup
+<span class="comment">&lt;!-- ENDIF --&gt;</span>
+</pre></div>
+
+<p>expr can take many forms, for example:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- IF loop&#46;S_ROW_COUNT is even --&gt;</span>
+ markup
+<span class="comment">&lt;!-- ENDIF --&gt;</span>
+</pre></div>
+
+<p>This will output the markup if the S_ROW_COUNT variable in the current iteration of loop is an even value (i.e. the expr is TRUE). You can use various comparison methods (standard as well as equivalent textual versions noted in square brackets) including (<code>not, or, and, eq, neq, is</code> should be used if possible for better readability):</p>
+
+<div class="codebox"><pre>
+== [eq]
+!= [neq, ne]
+&lt;&gt; (same as !=)
+!== (not equivalent in value and type)
+=== (equivalent in value and type)
+&gt; [gt]
+&lt; [lt]
+&gt;= [gte]
+&lt;= [lte]
+&amp;&amp; [and]
+|| [or]
+% [mod]
+! [not]
++
+-
+*
+/
+,
+&lt;&lt; (bitwise shift left)
+&gt;&gt; (bitwise shift right)
+| (bitwise or)
+^ (bitwise xor)
+&amp; (bitwise and)
+~ (bitwise not)
+is (can be used to join comparison operations)
+</pre></div>
+
+<p>Basic parenthesis can also be used to enforce good old BODMAS rules. Additionally some basic comparison types are defined:</p>
+
+<div class="codebox"><pre>
+even
+odd
+div
+</pre></div>
+
+<p>Beyond the simple use of IF you can also do a sequence of comparisons using the following:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- IF expr1 --&gt;</span>
+ markup
+<span class="comment">&lt;!-- ELSEIF expr2 --&gt;</span>
+ markup
+ &#46;
+ &#46;
+ &#46;
+<span class="comment">&lt;!-- ELSEIF exprN --&gt;</span>
+ markup
+<span class="comment">&lt;!-- ELSE --&gt;</span>
+ markup
+<span class="comment">&lt;!-- ENDIF --&gt;</span>
+</pre></div>
+
+<p>Each statement will be tested in turn and the relevant output generated when a match (if a match) is found. It is not necessary to always use ELSEIF, ELSE can be used alone to match &quot;everything else&quot;.<br /><br />So what can you do with all this? Well take for example the colouration of rows in viewforum. In 2.0.x row colours were predefined within the source as either row color1, row color2 or row class1, row class2. In 3.0.x this is moved to the template, it may look a little daunting at first but remember control flows from top to bottom and it's not too difficult:</p>
+
+<div class="codebox"><pre>
+&lt;table&gt;
+ <span class="comment">&lt;!-- IF loop&#46;S_ROW_COUNT is even --&gt;</span>
+ &lt;tr class=&quot;row1&quot;&gt;
+ <span class="comment">&lt;!-- ELSE --&gt;</span>
+ &lt;tr class=&quot;row2&quot;&gt;
+ <span class="comment">&lt;!-- ENDIF --&gt;</span>
+ &lt;td&gt;HELLO!&lt;/td&gt;
+&lt;/tr&gt;
+&lt;/table&gt;
+</pre></div>
+
+<p>This will cause the row cell to be output using class row1 when the row count is even, and class row2 otherwise. The S_ROW_COUNT parameter gets assigned to loops by default. Another example would be the following: </p>
+
+<div class="codebox"><pre>
+&lt;table&gt;
+ <span class="comment">&lt;!-- IF loop&#46;S_ROW_COUNT &gt; 10 --&gt;</span>
+ &lt;tr bgcolor=&quot;#FF0000&quot;&gt;
+ <span class="comment">&lt;!-- ELSEIF loop&#46;S_ROW_COUNT &gt; 5 --&gt;</span>
+ &lt;tr bgcolor=&quot;#00FF00&quot;&gt;
+ <span class="comment">&lt;!-- ELSEIF loop&#46;S_ROW_COUNT &gt; 2 --&gt;</span>
+ &lt;tr bgcolor=&quot;#0000FF&quot;&gt;
+ <span class="comment">&lt;!-- ELSE --&gt;</span>
+ &lt;tr bgcolor=&quot;#FF00FF&quot;&gt;
+ <span class="comment">&lt;!-- ENDIF --&gt;</span>
+ &lt;td&gt;hello!&lt;/td&gt;
+&lt;/tr&gt;
+&lt;/table&gt;
+</pre></div>
+
+<p>This will output the row cell in purple for the first two rows, blue for rows 2 to 5, green for rows 5 to 10 and red for remainder. So, you could produce a &quot;nice&quot; gradient effect, for example.<br /><br />What else can you do? Well, you could use IF to do common checks on for example the login state of a user:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- IF S_USER_LOGGED_IN --&gt;</span>
+ markup
+<span class="comment">&lt;!-- ENDIF --&gt;</span>
+</pre></div>
+
+<p>This replaces the existing (fudged) method in 2.0.x using a zero length array and BEGIN/END.</p>
+
+<h4>Extended syntax for Blocks/Loops</h4>
+
+<p>Back to our loops - they had been extended with the following additions. Firstly you can set the start and end points of the loop. For example:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- BEGIN loopname(2) --&gt;</span>
+ markup
+<span class="comment">&lt;!-- END loopname --&gt;</span>
+</pre></div>
+
+<p>Will start the loop on the third entry (note that indexes start at zero). Extensions of this are:
+<br /><br />
+<code>loopname(2)</code>: Will start the loop on the 3rd entry<br />
+<code>loopname(-2)</code>: Will start the loop two entries from the end<br />
+<code>loopname(3,4)</code>: Will start the loop on the fourth entry and end it on the fifth<br />
+<code>loopname(3,-4)</code>: Will start the loop on the fourth entry and end it four from last<br />
+</p>
+
+<p>A further extension to begin is BEGINELSE:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- BEGIN loop --&gt;</span>
+ markup
+<span class="comment">&lt;!-- BEGINELSE --&gt;</span>
+ markup
+<span class="comment">&lt;!-- END loop --&gt;</span>
+</pre></div>
+
+<p>This will cause the markup between <code>BEGINELSE</code> and <code>END</code> to be output if the loop contains no values. This is useful for forums with no topics (for example) ... in some ways it replaces &quot;bits of&quot; the existing &quot;switch_&quot; type control (the rest being replaced by conditionals).</p>
+
+<p>Another way of checking if a loop contains values is by prefixing the loops name with a dot:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- IF .loop --&gt;</span>
+ <span class="comment">&lt;!-- BEGIN loop --&gt;</span>
+ markup
+ <span class="comment">&lt;!-- END loop --&gt;</span>
+<span class="comment">&lt;!-- ELSE --&gt;</span>
+ markup
+<span class="comment">&lt;!-- ENDIF --&gt;</span>
+</pre></div>
+
+<p>You are even able to check the number of items within a loop by comparing it with values within the IF condition:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- IF .loop &gt; 2 --&gt;</span>
+ <span class="comment">&lt;!-- BEGIN loop --&gt;</span>
+ markup
+ <span class="comment">&lt;!-- END loop --&gt;</span>
+<span class="comment">&lt;!-- ELSE --&gt;</span>
+ markup
+<span class="comment">&lt;!-- ENDIF --&gt;</span>
+</pre></div>
+
+<p>Nesting loops cause the conditionals needing prefixed with all loops from the outer one to the inner most. An illustration of this:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- BEGIN firstloop --&gt;</span>
+ {firstloop.MY_VARIABLE_FROM_FIRSTLOOP}
+
+ <span class="comment">&lt;!-- BEGIN secondloop --&gt;</span>
+ {firstloop.secondloop.MY_VARIABLE_FROM_SECONDLOOP}
+ <span class="comment">&lt;!-- END secondloop --&gt;</span>
+<span class="comment">&lt;!-- END firstloop --&gt;</span>
+</pre></div>
+
+<p>Sometimes it is necessary to break out of nested loops to be able to call another loop within the current iteration. This sounds a little bit confusing and it is not used very often. The following (rather complex) example shows this quite good - it also shows how you test for the first and last row in a loop (i will explain the example in detail further down):</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- BEGIN l_block1 --&gt;</span>
+ <span class="comment">&lt;!-- IF l_block1.S_SELECTED --&gt;</span>
+ &lt;strong&gt;{l_block1.L_TITLE}&lt;/strong&gt;
+ <span class="comment">&lt;!-- IF S_PRIVMSGS --&gt;</span>
+
+ <span class="comment">&lt;!-- the ! at the beginning of the loop name forces the loop to be not a nested one of l_block1 --&gt;</span>
+ <span class="comment">&lt;!-- BEGIN !folder --&gt;</span>
+ <span class="comment">&lt;!-- IF folder.S_FIRST_ROW --&gt;</span>
+ &lt;ul class=&quot;nav&quot;&gt;
+ <span class="comment">&lt;!-- ENDIF --&gt;</span>
+
+ &lt;li&gt;&lt;a href=&quot;{folder.U_FOLDER}&quot;&gt;{folder.FOLDER_NAME}&lt;/a&gt;&lt;/li&gt;
+
+ <span class="comment">&lt;!-- IF folder.S_LAST_ROW --&gt;</span>
+ &lt;/ul&gt;
+ <span class="comment">&lt;!-- ENDIF --&gt;</span>
+ <span class="comment">&lt;!-- END !folder --&gt;</span>
+
+ <span class="comment">&lt;!-- ENDIF --&gt;</span>
+
+ &lt;ul class=&quot;nav&quot;&gt;
+ <span class="comment">&lt;!-- BEGIN l_block2 --&gt;</span>
+ &lt;li&gt;
+ <span class="comment">&lt;!-- IF l_block1.l_block2.S_SELECTED --&gt;</span>
+ &lt;strong&gt;{l_block1.l_block2.L_TITLE}&lt;/strong&gt;
+ <span class="comment">&lt;!-- ELSE --&gt;</span>
+ &lt;a href=&quot;{l_block1.l_block2.U_TITLE}&quot;&gt;{l_block1.l_block2.L_TITLE}&lt;/a&gt;
+ <span class="comment">&lt;!-- ENDIF --&gt;</span>
+ &lt;/li&gt;
+ <span class="comment">&lt;!-- END l_block2 --&gt;</span>
+ &lt;/ul&gt;
+ <span class="comment">&lt;!-- ELSE --&gt;</span>
+ &lt;a class=&quot;nav&quot; href=&quot;{l_block1.U_TITLE}&quot;&gt;{l_block1.L_TITLE}&lt;/a&gt;
+ <span class="comment">&lt;!-- ENDIF --&gt;</span>
+<span class="comment">&lt;!-- END l_block1 --&gt;</span>
+</pre></div>
+
+<p>Let us first concentrate on this part of the example:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- BEGIN l_block1 --&gt;</span>
+ <span class="comment">&lt;!-- IF l_block1.S_SELECTED --&gt;</span>
+ markup
+ <span class="comment">&lt;!-- ELSE --&gt;</span>
+ &lt;a class=&quot;nav&quot; href=&quot;{l_block1.U_TITLE}&quot;&gt;{l_block1.L_TITLE}&lt;/a&gt;
+ <span class="comment">&lt;!-- ENDIF --&gt;</span>
+<span class="comment">&lt;!-- END l_block1 --&gt;</span>
+</pre></div>
+
+<p>Here we open the loop l_block1 and doing some things if the value S_SELECTED within the current loop iteration is true, else we write the blocks link and title. Here, you see <code>{l_block1.L_TITLE}</code> referenced - you remember that L_* variables get automatically assigned the corresponding language entry? This is true, but not within loops. The L_TITLE variable within the loop l_block1 is assigned within the code itself.</p>
+
+<p>Let's have a closer look to the markup:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- BEGIN l_block1 --&gt;</span>
+.
+.
+ <span class="comment">&lt;!-- IF S_PRIVMSGS --&gt;</span>
+
+ <span class="comment">&lt;!-- BEGIN !folder --&gt;</span>
+ <span class="comment">&lt;!-- IF folder.S_FIRST_ROW --&gt;</span>
+ &lt;ul class=&quot;nav&quot;&gt;
+ <span class="comment">&lt;!-- ENDIF --&gt;</span>
+
+ &lt;li&gt;&lt;a href=&quot;{folder.U_FOLDER}&quot;&gt;{folder.FOLDER_NAME}&lt;/a&gt;&lt;/li&gt;
+
+ <span class="comment">&lt;!-- IF folder.S_LAST_ROW --&gt;</span>
+ &lt;/ul&gt;
+ <span class="comment">&lt;!-- ENDIF --&gt;</span>
+ <span class="comment">&lt;!-- END !folder --&gt;</span>
+
+ <span class="comment">&lt;!-- ENDIF --&gt;</span>
+.
+.
+<span class="comment">&lt;!-- END l_block1 --&gt;</span>
+</pre></div>
+
+<p>The <code>&lt;!-- IF S_PRIVMSGS --&gt;</code> statement clearly checks a global variable and not one within the loop, since the loop is not given here. So, if S_PRIVMSGS is true we execute the shown markup. Now, you see the <code>&lt;!-- BEGIN !folder --&gt;</code> statement. The exclamation mark is responsible for instructing the template engine to iterate through the main loop folder. So, we are now within the loop folder - with <code>&lt;!-- BEGIN folder --&gt;</code> we would have been within the loop <code>l_block1.folder</code> automatically as is the case with l_block2:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- BEGIN l_block1 --&gt;</span>
+.
+.
+ &lt;ul class=&quot;nav&quot;&gt;
+ <span class="comment">&lt;!-- BEGIN l_block2 --&gt;</span>
+ &lt;li&gt;
+ <span class="comment">&lt;!-- IF l_block1.l_block2.S_SELECTED --&gt;</span>
+ &lt;strong&gt;{l_block1.l_block2.L_TITLE}&lt;/strong&gt;
+ <span class="comment">&lt;!-- ELSE --&gt;</span>
+ &lt;a href=&quot;{l_block1.l_block2.U_TITLE}&quot;&gt;{l_block1.l_block2.L_TITLE}&lt;/a&gt;
+ <span class="comment">&lt;!-- ENDIF --&gt;</span>
+ &lt;/li&gt;
+ <span class="comment">&lt;!-- END l_block2 --&gt;</span>
+ &lt;/ul&gt;
+.
+.
+<span class="comment">&lt;!-- END l_block1 --&gt;</span>
+</pre></div>
+
+<p>You see the difference? The loop l_block2 is a member of the loop l_block1 but the loop folder is a main loop.</p>
+
+<p>Now back to our folder loop:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- IF folder.S_FIRST_ROW --&gt;</span>
+ &lt;ul class=&quot;nav&quot;&gt;
+<span class="comment">&lt;!-- ENDIF --&gt;</span>
+
+&lt;li&gt;&lt;a href=&quot;{folder.U_FOLDER}&quot;&gt;{folder.FOLDER_NAME}&lt;/a&gt;&lt;/li&gt;
+
+<span class="comment">&lt;!-- IF folder.S_LAST_ROW --&gt;</span>
+ &lt;/ul&gt;
+<span class="comment">&lt;!-- ENDIF --&gt;</span>
+</pre></div>
+
+<p>You may have wondered what the comparison to S_FIRST_ROW and S_LAST_ROW is about. If you haven't guessed already - it is checking for the first iteration of the loop with <code>S_FIRST_ROW</code> and the last iteration with <code>S_LAST_ROW</code>. This can come in handy quite often if you want to open or close design elements, like the above list. Let us imagine a folder loop build with three iterations, it would go this way:</p>
+
+<div class="codebox"><pre>
+&lt;ul class=&quot;nav&quot;&gt; <span class="comment">&lt;!-- written on first iteration --&gt;</span>
+ &lt;li&gt;first element&lt;/li&gt; <span class="comment">&lt;!-- written on first iteration --&gt;</span>
+ &lt;li&gt;second element&lt;/li&gt; <span class="comment">&lt;!-- written on second iteration --&gt;</span>
+ &lt;li&gt;third element&lt;/li&gt; <span class="comment">&lt;!-- written on third iteration --&gt;</span>
+&lt;/ul&gt; <span class="comment">&lt;!-- written on third iteration --&gt;</span>
+</pre></div>
+
+<p>As you can see, all three elements are written down as well as the markup for the first iteration and the last one. Sometimes you want to omit writing the general markup - for example:</p>
+
+<div class="codebox"><pre>
+<span class="comment">&lt;!-- IF folder.S_FIRST_ROW --&gt;</span>
+ &lt;ul class=&quot;nav&quot;&gt;
+<span class="comment">&lt;!-- ELSEIF folder.S_LAST_ROW --&gt;</span>
+ &lt;/ul&gt;
+<span class="comment">&lt;!-- ELSE --&gt;</span>
+ &lt;li&gt;&lt;a href=&quot;{folder.U_FOLDER}&quot;&gt;{folder.FOLDER_NAME}&lt;/a&gt;&lt;/li&gt;
+<span class="comment">&lt;!-- ENDIF --&gt;</span>
+</pre></div>
+
+<p>would result in the following markup:</p>
+
+<div class="codebox"><pre>
+&lt;ul class=&quot;nav&quot;&gt; <span class="comment">&lt;!-- written on first iteration --&gt;</span>
+ &lt;li&gt;second element&lt;/li&gt; <span class="comment">&lt;!-- written on second iteration --&gt;</span>
+&lt;/ul&gt; <span class="comment">&lt;!-- written on third iteration --&gt;</span>
+</pre></div>
+
+<p>Just always remember that processing is taking place from up to down.</p>
+
+ <h4>Forms</h4>
+ <p>If a form is used for a non-trivial operation (i.e. more than a jumpbox), then it should include the <code>{S_FORM_TOKEN}</code> template variable.</p>
+ <div class="codebox"><pre>
+&lt;form method=&quot;post&quot; id=&quot;mcp&quot; action=&quot;{U_POST_ACTION}&quot;&gt;
+
+ &lt;fieldset class="submit-buttons"&gt;
+ &lt;input type=&quot;reset&quot; value=&quot;{L_RESET}&quot; name=&quot;reset&quot; class=&quot;button2&quot; /&gt&nbsp;
+ &lt;input type=&quot;submit&quot; name=&quot;action[add_warning]&quot; value=&quot;{L_SUBMIT}&quot; class=&quot;button1&quot; /&gt
+ {S_FORM_TOKEN}
+ &lt;/fieldset&gt
+&lt;/form&gt
+ </pre></div><br />
+
+ <a name="inheritance"></a><h3>4.ii. Template Inheritance</h3>
+ <p>When basing a new template on an existing one, it is not necessary to provide all template files. By declaring the template to be &quot;<strong>inheriting</strong>&quot; in the template configuration file.</p>
+
+ <p>The limitation on this is that the base style has to be installed and complete, meaning that it is not itself inheriting.</p>
+
+ <p>The effect of doing so is that the template engine will use the files in the new template where they exist, but fall back to files in the base template otherwise. Declaring a style to be inheriting also causes it to use some of the configuration settings of the base style, notably database storage.</p>
+
+ <p>We strongly encourage the use of inheritance for styles based on the bundled styles, as it will ease the update procedure.</p>
+
+ <div class="codebox"><pre>
+ # General Information about this template
+ name = inherits
+ copyright = &copy; phpBB Group, 2007
+ version = 3.0.3
+
+ # Defining a different template bitfield
+ template_bitfield = lNg=
+
+ # Are we inheriting?
+ inherit_from = prosilver
+ </pre></div>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+
+
+<a name="charsets"></a><h2>5. Character Sets and Encodings</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+
+
+<h4>What are Unicode, UCS and UTF-8?</h4>
+<p>The <a href="http://en.wikipedia.org/wiki/Universal_Character_Set">Universal Character Set (UCS)</a> described in ISO/IEC 10646 consists of a large amount of characters. Each of them has a unique name and a code point which is an integer number. <a href="http://en.wikipedia.org/wiki/Unicode">Unicode</a> - which is an industry standard - complements the Universal Character Set with further information about the characters' properties and alternative character encodings. More information on Unicode can be found on the <a href="http://www.unicode.org/">Unicode Consortium's website</a>. One of the Unicode encodings is the <a href="http://en.wikipedia.org/wiki/UTF-8">8-bit Unicode Transformation Format (UTF-8)</a>. It encodes characters with up to four bytes aiming for maximum compatibility with the <a href="http://en.wikipedia.org/wiki/ASCII">American Standard Code for Information Interchange</a> which is a 7-bit encoding of a relatively small subset of the UCS.</p>
+
+<h4>phpBB's use of Unicode</h4>
+<p>Unfortunately PHP does not faciliate the use of Unicode prior to version 6. Most functions simply treat strings as sequences of bytes assuming that each character takes up exactly one byte. This behaviour still allows for storing UTF-8 encoded text in PHP strings but many operations on strings have unexpected results. To circumvent this problem we have created some alternative functions to PHP's native string operations which use code points instead of bytes. These functions can be found in <code>/includes/utf/utf_tools.php</code>. They are also covered in the <a href="http://area51.phpbb.com/docs/code/">phpBB3 Sourcecode Documentation</a>. A lot of native PHP functions still work with UTF-8 as long as you stick to certain restrictions. For example <code>explode</code> still works as long as the first and the last character of the delimiter string are ASCII characters.</p>
+
+<p>phpBB only uses the ASCII and the UTF-8 character encodings. Still all Strings are UTF-8 encoded because ASCII is a subset of UTF-8. The only exceptions to this rule are code sections which deal with external systems which use other encodings and character sets. Such external data should be converted to UTF-8 using the <code>utf8_recode()</code> function supplied with phpBB. It supports a variety of other character sets and encodings, a full list can be found below.</p>
+
+<p>With <code>request_var()</code> you can either allow all UCS characters in user input or restrict user input to ASCII characters. This feature is controlled by the function's third parameter called <code>$multibyte</code>. You should allow multibyte characters in posts, PMs, topic titles, forum names, etc. but it's not necessary for internal uses like a <code>$mode</code> variable which should only hold a predefined list of ASCII strings anyway.</p>
+
+<div class="codebox"><pre>
+// an input string containing a multibyte character
+$_REQUEST['multibyte_string'] = 'K&#228;se';
+
+// print request variable as a UTF-8 string allowing multibyte characters
+echo request_var('multibyte_string', '', true);
+// print request variable as ASCII string
+echo request_var('multibyte_string', '');
+</pre></div>
+
+<p>This code snippet will generate the following output:</p>
+
+<div class="codebox"><pre>
+K&#228;se
+K??se
+</pre></div>
+
+<h4>Unicode Normalization</h4>
+
+<p>If you retrieve user input with multibyte characters you should additionally normalize the string using <code>utf8_normalize_nfc()</code> before you work with it. This is necessary to make sure that equal characters can only occur in one particular binary representation. For example the character &#197; can be represented either as <code>U+00C5</code> (LATIN CAPITAL LETTER A WITH RING ABOVE) or as <code>U+212B</code> (ANGSTROM SIGN). phpBB uses Normalization Form Canonical Composition (NFC) for all text. So the correct version of the above example would look like this:</p>
+
+<div class="codebox"><pre>
+$_REQUEST['multibyte_string'] = 'K&#228;se';
+
+// normalize multibyte strings
+echo utf8_normalize_nfc(request_var('multibyte_string', '', true));
+// ASCII strings do not need to be normalized
+echo request_var('multibyte_string', '');
+</pre></div>
+
+<h4>Case Folding</h4>
+
+<p>Case insensitive comparison of strings is no longer possible with <code>strtolower</code> or <code>strtoupper</code> as some characters have multiple lower case or multiple upper case forms depending on their position in a word. The <code>utf8_strtolower</code> and the <code>utf8_strtoupper</code> functions suffer from the same problem so they can only be used to display upper/lower case versions of a string but they cannot be used for case insensitive comparisons either. So instead you should use case folding which gives you a case insensitive version of the string which can be used for case insensitive comparisons. An NFC normalized string can be case folded using <code>utf8_case_fold_nfc()</code>.</p>
+
+<p class="bad">// Bad - The strings might be the same even if strtolower differs</p>
+
+<div class="codebox"><pre>
+if (strtolower($string1) == strtolower($string2))
+{
+ echo '$string1 and $string2 are equal or differ in case';
+}
+</pre></div>
+
+<p class="good">// Good - Case folding is really case insensitive</p>
+
+<div class="codebox"><pre>
+if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
+{
+ echo '$string1 and $string2 are equal or differ in case';
+}
+</pre></div>
+
+<h4>Confusables Detection</h4>
+
+<p>phpBB offers a special method <code>utf8_clean_string</code> which can be used to make sure string identifiers are unique. This method uses Normalization Form Compatibility Composition (NFKC) instead of NFC and replaces similarly looking characters with a particular representative of the equivalence class. This method is currently used for usernames and group names to avoid confusion with similarly looking names.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="translation"></a><h2>6. Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <a name="standardisation"></a><h3>6.i. Standardisation</h3>
+
+ <h4>Reason:</h4>
+
+ <p>phpBB is one of the most translated open-source projects, with the current stable version being available in over 60 localisations. Whilst the ad hoc approach to the naming of language packs has worked, for phpBB3 and beyond we hope to make this process saner which will allow for better interoperation with current and future web browsers.</p>
+
+ <h4>Encoding:</h4>
+
+ <p>With phpBB3, the output encoding for the forum in now UTF-8, a Universal Character Encoding by the Unicode Consortium that is by design a superset to US-ASCII and ISO-8859-1. By using one character set which simultaenously supports all scripts which previously would have required different encodings (eg: ISO-8859-1 to ISO-8859-15 (Latin, Greek, Cyrillic, Thai, Hebrew, Arabic); GB2312 (Simplified Chinese); Big5 (Traditional Chinese), EUC-JP (Japanese), EUC-KR (Korean), VISCII (Vietnamese); et cetera), this removes the need to convert between encodings and improves the accessibility of multilingual forums.</p>
+
+ <p>The impact is that the language files for phpBB must now also be encoded as UTF-8, with a caveat that the files must <strong>not contain</strong> a <acronym title="Byte-Order-Mark">BOM</acronym> for compatibility reasons with non-Unicode aware versions of PHP. For those with forums using the Latin character set (ie: most European languages), this change is transparent since UTF-8 is superset to US-ASCII and ISO-8859-1.</p>
+
+ <h4>Language Tag:</h4>
+
+ <p>The <abbr title="Internet Engineering Task Force">IETF</abbr> recently published <a href="http://tools.ietf.org/html/rfc4646">RFC 4646</a> for tags used to identify languages, which in combination with <a href="http://tools.ietf.org/html/rfc4647">RFC 4647</a> obseletes the older <a href="http://tools.ietf.org/html/rfc3066">RFC 3006</a> and older-still <a href="http://tools.ietf.org/html/rfc1766">RFC 1766</a>. <a href="http://tools.ietf.org/html/rfc4646">RFC 4646</a> uses <a href="http://www.loc.gov/standards/iso639-2/php/English_list.php">ISO 639-1/ISO 639-2</a>, <a href="http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO 3166-1 alpha-2</a>, <a href="http://www.unicode.org/iso15924/iso15924-codes.html">ISO 15924</a> and <a href="http://unstats.un.org/unsd/methods/m49/m49.htm">UN M.49</a> to define a language tag. Each complete tag is composed of subtags which are not case sensitive and can also be empty.</p>
+
+ <p>Ordering of the subtags in the case that they are all non-empty is: <code>language</code>-<code>script</code>-<code>region</code>-<code>variant</code>-<code>extension</code>-<code>privateuse</code>. Should any subtag be empty, its corresponding hyphen would also be ommited. Thus, the language tag for English will be <code>en</code> <strong>and not</strong> <code>en-----</code>.</p>
+
+ <p>Most language tags consist of a two- or three-letter language subtag (from <a href="http://www.loc.gov/standards/iso639-2/php/English_list.php">ISO 639-1/ISO 639-2</a>). Sometimes, this is followed by a two-letter or three-digit region subtag (from <a href="http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO 3166-1 alpha-2</a> or <a href="http://unstats.un.org/unsd/methods/m49/m49.htm">UN M.49</a>). Some examples are:</p>
+
+ <table summary="Examples of various possible language tags as described by RFC 4646 and RFC 4647">
+ <caption>Language tag examples</caption>
+ <thead>
+ <tr>
+ <th scope="col">Language tag</th>
+ <th scope="col">Description</th>
+ <th scope="col">Component subtags</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>en</code></td>
+ <td>English</td>
+ <td><code>language</code></td>
+ </tr>
+ <tr>
+ <td><code>mas</code></td>
+ <td>Masai</td>
+ <td><code>language</code></td>
+ </tr>
+ <tr>
+ <td><code>fr-CA</code></td>
+ <td>French as used in Canada</td>
+ <td><code>language</code>+<code>region</code></td>
+ </tr>
+ <tr>
+ <td><code>en-833</code></td>
+ <td>English as used in the Isle of Man</td>
+ <td><code>language</code>+<code>region</code></td>
+ </tr>
+ <tr>
+ <td><code>zh-Hans</code></td>
+ <td>Chinese written with Simplified script</td>
+ <td><code>language</code>+<code>script</code></td>
+ </tr>
+ <tr>
+ <td><code>zh-Hant-HK</code></td>
+ <td>Chinese written with Traditional script as used in Hong Kong</td>
+ <td><code>language</code>+<code>script</code>+<code>region</code></td>
+ </tr>
+ <tr>
+ <td><code>de-AT-1996</code></td>
+ <td>German as used in Austria with 1996 orthography</td>
+ <td><code>language</code>+<code>region</code>+<code>variant</code></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>The ultimate aim of a language tag is to convey the needed <strong>useful distingushing information</strong>, whilst keeping it as <strong>short as possible</strong>. So for example, use <code>en</code>, <code>fr</code> and <code>ja</code> as opposed to <code>en-GB</code>, <code>fr-FR</code> and <code>ja-JP</code>, since we know English, French and Japanese are the native language of Great Britain, France and Japan respectively.</p>
+
+ <p>Next is the <a href="http://www.unicode.org/iso15924/iso15924-codes.html">ISO 15924</a> language script code and when one should or shouldn't use it. For example, whilst <code>en-Latn</code> is syntaxically correct for describing English written with Latin script, real world English writing is <strong>more-or-less exclusively in the Latin script</strong>. For such languages like English that are written in a single script, the <a href="http://www.iana.org/assignments/language-subtag-registry"><abbr title="Internet Assigned Numbers Authority">IANA</abbr> Language Subtag Registry</a> has a "Suppress-Script" field meaning the script code <strong>should be ommitted</strong> unless a specific language tag requires a specific script code. Some languages are <strong>written in more than one script</strong> and in such cases, the script code <strong>is encouraged</strong> since an end-user may be able to read their language in one script, but not the other. Some examples are:</p>
+
+ <table summary="Examples of using a language subtag in combination with a script subtag">
+ <caption>Language subtag + script subtag examples</caption>
+ <thead>
+ <tr>
+ <th scope="col">Language tag</th>
+ <th scope="col">Description</th>
+ <th scope="col">Component subtags</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>en-Brai</code></td>
+ <td>English written in Braille script</td>
+ <td><code>language</code>+<code>script</code></td>
+ </tr>
+ <tr>
+ <td><code>en-Dsrt</code></td>
+ <td>English written in Deseret (Mormon) script</td>
+ <td><code>language</code>+<code>script</code></td>
+ </tr>
+ <tr>
+ <td><code>sr-Latn</code></td>
+ <td>Serbian written in Latin script</td>
+ <td><code>language</code>+<code>script</code></td>
+ </tr>
+ <tr>
+ <td><code>sr-Cyrl</code></td>
+ <td>Serbian written in Cyrillic script</td>
+ <td><code>language</code>+<code>script</code></td>
+ </tr>
+ <tr>
+ <td><code>mn-Mong</code></td>
+ <td>Mongolian written in Mongolian script</td>
+ <td><code>language</code>+<code>script</code></td>
+ </tr>
+ <tr>
+ <td><code>mn-Cyrl</code></td>
+ <td>Mongolian written in Cyrillic script</td>
+ <td><code>language</code>+<code>script</code></td>
+ </tr>
+ <tr>
+ <td><code>mn-Phag</code></td>
+ <td>Mongolian written in Phags-pa script</td>
+ <td><code>language</code>+<code>script</code></td>
+ </tr>
+ <tr>
+ <td><code>az-Cyrl-AZ</code></td>
+ <td>Azerbaijani written in Cyrillic script as used in Azerbaijan</td>
+ <td><code>language</code>+<code>script</code>+<code>region</code></td>
+ </tr>
+ <tr>
+ <td><code>az-Latn-AZ</code></td>
+ <td>Azerbaijani written in Latin script as used in Azerbaijan</td>
+ <td><code>language</code>+<code>script</code>+<code>region</code></td>
+ </tr>
+ <tr>
+ <td><code>az-Arab-IR</code></td>
+ <td>Azerbaijani written in Arabic script as used in Iran</td>
+ <td><code>language</code>+<code>script</code>+<code>region</code></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>Usage of the three-digit <a href="http://unstats.un.org/unsd/methods/m49/m49.htm">UN M.49</a> code over the two-letter <a href="http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO 3166-1 alpha-2</a> code should hapen if a macro-geographical entity is required and/or the <a href="http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO 3166-1 alpha-2</a> is ambiguous.</p>
+
+ <p>Examples of English using marco-geographical regions:</p>
+
+ <table summary="Examples for English of ISO 3166-1 alpha-2 vs. UN M.49 code">
+ <caption>Coding for English using macro-geographical regions</caption>
+ <thead>
+ <tr>
+ <th scope="col">ISO 639-1/ISO 639-2 + ISO 3166-1 alpha-2</th>
+ <th scope="col" colspan="2">ISO 639-1/ISO 639-2 + UN M.49 (Example macro regions)</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><dl><dt><code>en-AU</code></dt><dd>English as used in <strong>Australia</strong></dd></dl></td>
+ <td rowspan="2"><dl><dt><code>en-053</code></dt><dd>English as used in <strong>Australia &amp; New Zealand</strong></dd></dl></td>
+ <td rowspan="3"><dl><dt><code>en-009</code></dt><dd>English as used in <strong>Oceania</strong></dd></dl></td>
+ </tr>
+ <tr>
+ <td><dl><dt><code>en-NZ</code></dt><dd>English as used in <strong>New Zealand</strong></dd></dl></td>
+ </tr>
+ <tr>
+ <td><dl><dt><code>en-FJ</code></dt><dd>English as used in <strong>Fiji</strong></dd></dl></td>
+ <td><dl><dt><code>en-054 </code></dt><dd>English as used in <strong>Melanesia</strong></dd></dl></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>Examples of Spanish using marco-geographical regions:</p>
+
+ <table summary="Examples for Spanish of ISO 3166-1 alpha-2 vs. UN M.49 code">
+ <caption>Coding for Spanish macro-geographical regions</caption>
+ <thead>
+ <tr>
+ <th scope="col">ISO 639-1/ISO 639-2 + ISO 3166-1 alpha-2</th>
+ <th scope="col" colspan="2">ISO 639-1/ISO 639-2 + UN M.49 (Example macro regions)</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><dl><dt><code>es-PR</code></dt><dd>Spanish as used in <strong>Puerto Rico</strong></dd></dl></td>
+ <td rowspan="3"><dl><dt><code>es-419</code></dt><dd>Spanish as used in <strong>Latin America &amp; the Caribbean</strong></dd></dl></td>
+ <td rowspan="4"><dl><dt><code>es-019</code></dt><dd>Spanish as used in <strong>the Americas</strong></dd></dl></td>
+ </tr>
+ <tr>
+ <td><dl><dt><code>es-HN</code></dt><dd>Spanish as used in <strong>Honduras</strong></dd></dl></td>
+ </tr>
+ <tr>
+ <td><dl><dt><code>es-AR</code></dt><dd>Spanish as used in <strong>Argentina</strong></dd></dl></td>
+ </tr>
+ <tr>
+ <td><dl><dt><code>es-US</code></dt><dd>Spanish as used in <strong>United States of America</strong></dd></dl></td>
+ <td><dl><dt><code>es-021</code></dt><dd>Spanish as used in <strong>North America</strong></dd></dl></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>Example of where the <a href="http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO 3166-1 alpha-2</a> is ambiguous and why <a href="http://unstats.un.org/unsd/methods/m49/m49.htm">UN M.49</a> might be preferred:</p>
+
+ <table summary="Example where the ISO 3166-1 alpha-2 is ambiguous">
+ <caption>Coding for ambiguous ISO 3166-1 alpha-2 regions</caption>
+ <thead>
+ <tr>
+ <th scope="col" colspan="2"><code>CS</code> assignment pre-1994</th>
+ <th scope="col" colspan="2"><code>CS</code> assignment post-1994</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td colspan="2">
+ <dl>
+ <dt><code>CS</code></dt><dd><strong>Czechoslovakia</strong> (ISO 3166-1)</dd>
+ <dt><code>200</code></dt><dd><strong>Czechoslovakia</strong> (UN M.49)</dd>
+ </dl>
+ </td>
+ <td colspan="2">
+ <dl>
+ <dt><code>CS</code></dt><dd><strong>Serbian &amp; Montenegro</strong> (ISO 3166-1)</dd>
+ <dt><code>891</code></dt><dd><strong>Serbian &amp; Montenegro</strong> (UN M.49)</dd>
+ </dl>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <dl>
+ <dt><code>CZ</code></dt><dd><strong>Czech Republic</strong> (ISO 3166-1)</dd>
+ <dt><code>203</code></dt><dd><strong>Czech Republic</strong> (UN M.49)</dd>
+ </dl>
+ </td>
+ <td>
+ <dl>
+ <dt><code>SK</code></dt><dd><strong>Slovakia</strong> (ISO 3166-1)</dd>
+ <dt><code>703</code></dt><dd><strong>Slovakia</strong> (UN M.49)</dd>
+ </dl>
+ </td>
+ <td>
+ <dl>
+ <dt><code>RS</code></dt><dd><strong>Serbia</strong> (ISO 3166-1)</dd>
+ <dt><code>688</code></dt><dd><strong>Serbia</strong> (UN M.49)</dd>
+ </dl>
+ </td>
+ <td>
+ <dl>
+ <dt><code>ME</code></dt><dd><strong>Montenegro</strong> (ISO 3166-1)</dd>
+ <dt><code>499</code></dt><dd><strong>Montenegro</strong> (UN M.49)</dd>
+ </dl>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <h4>Macro-languages &amp; Topolects:</h4>
+
+ <p><a href="http://tools.ietf.org/html/rfc4646">RFC 4646</a> anticipates features which shall be available in (currently draft) <a href="http://www.sil.org/iso639-3/">ISO 639-3</a> which aims to provide as complete enumeration of languages as possible, including living, extinct, ancient and constructed languages, whether majour, minor or unwritten. A new feature of <a href="http://www.sil.org/iso639-3/">ISO 639-3</a> compared to the previous two revisions is the concept of <a href="http://www.sil.org/iso639-3/macrolanguages.asp">macrolanguages</a> where Arabic and Chinese are two such examples. In such cases, their respective codes of <code>ar</code> and <code>zh</code> is very vague as to which dialect/topolect is used or perhaps some terse classical variant which may be difficult for all but very educated users. For such macrolanguages, it is recommended that the sub-language tag is used as a suffix to the macrolanguage tag, eg:</p>
+
+ <table summary="Examples of macrolanguages used with sub-language subtags">
+ <caption>Macrolanguage subtag + sub-language subtag examples</caption>
+ <thead>
+ <tr>
+ <th scope="col">Language tag</th>
+ <th scope="col">Description</th>
+ <th scope="col">Component subtags</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>zh-cmn</code></td>
+ <td>Mandarin (Putonghau/Guoyu) Chinese</td>
+ <td><code>macrolanguage</code>+<code>sublanguage</code></td>
+ </tr>
+ <tr>
+ <td><code>zh-yue</code></td>
+ <td>Yue (Cantonese) Chinese</td>
+ <td><code>macrolanguage</code>+<code>sublanguage</code></td>
+ </tr>
+ <tr>
+ <td><code>zh-cmn-Hans</code></td>
+ <td>Mandarin (Putonghau/Guoyu) Chinese written in Simplified script</td>
+ <td><code>macrolanguage</code>+<code>sublanguage</code>+<code>script</code></td>
+ </tr>
+ <tr>
+ <td><code>zh-cmn-Hant</code></td>
+ <td>Mandarin (Putonghau/Guoyu) Chinese written in Traditional script</td>
+ <td><code>macrolanguage</code>+<code>sublanguage</code>+<code>script</code></td>
+ </tr>
+ <tr>
+ <td><code>zh-nan-Latn-TW</code></td>
+ <td>Minnan (Hoklo) Chinese written in Latin script (POJ Romanisation) as used in Taiwan</td>
+ <td><code>macrolanguage</code>+<code>sublanguage</code>+<code>script</code>+<code>region</code></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <a name="otherconsiderations"></a><h3>6.ii. Other considerations</h3>
+
+ <h4>Normalisation of language tags for phpBB:</h4>
+
+ <p>For phpBB, the language tags are <strong>not</strong> used in their raw form and instead converted to all lower-case and have the hyphen <code>-</code> replaced with an underscore <code>_</code> where appropriate, with some examples below:</p>
+
+ <table summary="Normalisation of language tags for usage in phpBB">
+ <caption>Language tag normalisation examples</caption>
+ <thead>
+ <tr>
+ <th scope="col">Raw language tag</th>
+ <th scope="col">Description</th>
+ <th scope="col">Value of <code>USER_LANG</code><br />in <code>./common.php</code></th>
+ <th scope="col">Language pack directory<br />name in <code>/language/</code></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>en</code></td>
+ <td>British English</td>
+ <td><code>en</code></td>
+ <td><code>en</code></td>
+ </tr>
+ <tr>
+ <td><code>de-AT</code></td>
+ <td>German as used in Austria</td>
+ <td><code>de-at</code></td>
+ <td><code>de_at</code></td>
+ </tr>
+ <tr>
+ <td><code>es-419</code></td>
+ <td>Spanish as used in Latin America &amp; Caribbean</td>
+ <td><code>en-419</code></td>
+ <td><code>en_419</code></td>
+ </tr>
+ <tr>
+ <td><code>zh-yue-Hant-HK</code></td>
+ <td>Cantonese written in Traditional script as used in Hong Kong</td>
+ <td><code>zh-yue-hant-hk</code></td>
+ <td><code>zh_yue_hant_hk</code></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <h4>How to use <code>iso.txt</code>:</h4>
+
+ <p>The <code>iso.txt</code> file is a small UTF-8 encoded plain-text file which consists of three lines:</p>
+
+ <ol>
+ <li><code>Language's English name</code></li>
+ <li><code>Language's local name</code></li>
+ <li><code>Authors information</code></li>
+ </ol>
+
+ <p><code>iso.txt</code> is automatically generated by the language pack submission system on phpBB.com. You don't have to create this file yourself if you plan on releasing your language pack on phpBB.com, but do keep in mind that phpBB itself does require this file to be present.</p>
+
+ <p>Because language tags themselves are meant to be machine read, they can be rather obtuse to humans and why descriptive strings as provided by <code>iso.txt</code> are needed. Whilst <code>en-US</code> could be fairly easily deduced to be "English as used in the United States", <code>de-CH</code> is more difficult less one happens to know that <code>de</code> is from "<span lang="de">Deutsch</span>", German for "German" and <code>CH</code> is the abbreviation of the official Latin name for Switzerland, "<span lang="la">Confoederatio Helvetica</span>".</p>
+
+ <p>For the English language description, the language name is always first and any additional attributes required to describe the subtags within the language code are then listed in order separated with commas and enclosed within parentheses, eg:</p>
+
+ <table summary="English language description examples of iso.txt for usage in phpBB">
+ <caption>English language description examples for iso.txt</caption>
+ <thead>
+ <tr>
+ <th scope="col">Raw language tag</th>
+ <th scope="col">English description within <code>iso.txt</code></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>en</code></td>
+ <td>British English</td>
+ </tr>
+ <tr>
+ <td><code>en-US</code></td>
+ <td>English (United States)</td>
+ </tr>
+ <tr>
+ <td><code>en-053</code></td>
+ <td>English (Australia &amp; New Zealand)</td>
+ </tr>
+ <tr>
+ <td><code>de</code></td>
+ <td>German</td>
+ </tr>
+ <tr>
+ <td><code>de-CH-1996</code></td>
+ <td>German (Switzerland, 1996 orthography)</td>
+ </tr>
+ <tr>
+ <td><code>gws-1996</code></td>
+ <td>Swiss German (1996 orthography)</td>
+ </tr>
+ <tr>
+ <td><code>zh-cmn-Hans-CN</code></td>
+ <td>Mandarin Chinese (Simplified, Mainland China)</td>
+ </tr>
+ <tr>
+ <td><code>zh-yue-Hant-HK</code></td>
+ <td>Cantonese Chinese (Traditional, Hong Kong)</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>For the localised language description, just translate the English version though use whatever appropriate punctuation typical for your own locale, assuming the language uses punctuation at all.</p>
+
+ <h4>Unicode bi-directional considerations:</h4>
+
+ <p>Because phpBB is now UTF-8, all translators must take into account that certain strings may be shown when the directionality of the document is either opposite to normal or is ambiguous.</p>
+
+ <p>The various Unicode control characters for bi-directional text and their HTML enquivalents where appropriate are as follows:</p>
+
+ <table summary="Table of the various Unicode bidirectional control characters">
+ <caption>Unicode bidirectional control characters &amp; HTML elements/entities</caption>
+ <thead>
+ <tr>
+ <th scope="col">Unicode character<br />abbreviation</th>
+ <th scope="col">Unicode<br />code-point</th>
+ <th scope="col">Unicode character<br />name</th>
+ <th scope="col">Equivalent HTML<br />markup/entity</th>
+ <th scope="col">Raw character<br />(enclosed between '')</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>LRM</code></td>
+ <td><code>U+200E</code></td>
+ <td>Left-to-Right Mark</td>
+ <td><code>&amp;lrm;</code></td>
+ <td>'&#x200E;'</td>
+ </tr>
+ <tr>
+ <td><code>RLM</code></td>
+ <td><code>U+200F</code></td>
+ <td>Right-to-Left Mark</td>
+ <td><code>&amp;rlm;</code></td>
+ <td>'&#x200F;'</td>
+ </tr>
+ <tr>
+ <td><code>LRE</code></td>
+ <td><code>U+202A</code></td>
+ <td>Left-to-Right Embedding</td>
+ <td><code>dir=&quot;ltr&quot;</code></td>
+ <td>'&#x202A;'</td>
+ </tr>
+ <tr>
+ <td><code>RLE</code></td>
+ <td><code>U+202B</code></td>
+ <td>Right-to-Left Embedding</td>
+ <td><code>dir=&quot;rtl&quot;</code></td>
+ <td>'&#x202B;'</td>
+ </tr>
+ <tr>
+ <td><code>PDF</code></td>
+ <td><code>U+202C</code></td>
+ <td>Pop Directional Formatting</td>
+ <td><code>&lt;/bdo&gt;</code></td>
+ <td>'&#x202C;'</td>
+ </tr>
+ <tr>
+ <td><code>LRO</code></td>
+ <td><code>U+202D</code></td>
+ <td>Left-to-Right Override</td>
+ <td><code>&lt;bdo dir=&quot;ltr&quot;&gt;</code></td>
+ <td>'&#x202D;'</td>
+ </tr>
+ <tr>
+ <td><code>RLO</code></td>
+ <td><code>U+202E</code></td>
+ <td>Right-to-Left Override</td>
+ <td><code>&lt;bdo dir=&quot;rtl&quot;&gt;</code></td>
+ <td>'&#x202E;'</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>For <code>iso.txt</code>, the directionality of the text can be explicitly set using special Unicode characters via any of the three methods provided by left-to-right/right-to-left markers/embeds/overrides, as without them, the ordering of characters will be incorrect, eg:</p>
+
+ <table summary="Effect of using Unicode bidirectional control characters within iso.txt">
+ <caption>Unicode bidirectional control characters iso.txt</caption>
+ <thead>
+ <tr>
+ <th scope="col">Directionality</th>
+ <th scope="col">Raw character view</th>
+ <th scope="col">Display of localised<br />description in <code>iso.txt</code></th>
+ <th scope="col">Ordering</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>dir=&quot;ltr&quot;</code></td>
+ <td>English (Australia &amp; New Zealand)</td>
+ <td dir="ltr">English (Australia &amp; New Zealand)</td>
+ <td class="good">Correct</td>
+ </tr>
+ <tr>
+ <td><code>dir=&quot;rtl&quot;</code></td>
+ <td>English (Australia &amp; New Zealand)</td>
+ <td dir="rtl">English (Australia &amp; New Zealand)</td>
+ <td class="bad">Incorrect</td>
+ </tr>
+ <tr>
+ <td><code>dir=&quot;rtl&quot;</code> with <code>LRM</code></td>
+ <td>English (Australia &amp; New Zealand)<code>U+200E</code></td>
+ <td dir="rtl">English (Australia &amp; New Zealand)&#x200E;</td>
+ <td class="good">Correct</td>
+ </tr>
+ <tr>
+ <td><code>dir=&quot;rtl&quot;</code> with <code>LRE</code> &amp; <code>PDF</code></td>
+ <td><code>U+202A</code>English (Australia &amp; New Zealand)<code>U+202C</code></td>
+ <td dir="rtl">&#x202A;English (Australia &amp; New Zealand)&#x202C;</td>
+ <td class="good">Correct</td>
+ </tr>
+ <tr>
+ <td><code>dir=&quot;rtl&quot;</code> with <code>LRO</code> &amp; <code>PDF</code></td>
+ <td><code>U+202D</code>English (Australia &amp; New Zealand)<code>U+202C</code></td>
+ <td dir="rtl">&#x202D;English (Australia &amp; New Zealand)&#x202C;</td>
+ <td class="good">Correct</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>In choosing which of the three methods to use, in the majority of cases, the <code>LRM</code> or <code>RLM</code> to put a &quot;strong&quot; character to fully enclose an ambiguous punctuation character and thus make it inherit the correct directionality is sufficient.</p>
+ <p>Within some cases, there may be mixed scripts of a left-to-right and right-to-left direction, so using <code>LRE</code> &amp; <code>RLE</code> with <code>PDF</code> may be more appropriate. Lastly, in very rare instances where directionality must be forced, then use <code>LRO</code> &amp; <code>RLO</code> with <code>PDF</code>.</p>
+ <p>For further information on authoring techniques of bi-directional text, please see the W3C tutorial on <a href="http://www.w3.org/International/tutorials/bidi-xhtml/">authoring techniques for XHTML pages with bi-directional text</a>.</p>
+
+ <h4>Working with placeholders:</h4>
+
+ <p>As phpBB is translated into languages with different ordering rules to that of English, it is possible to show specific values in any order deemed appropriate. Take for example the extremely simple &quot;Page <em>X</em> of <em>Y</em>&quot;, whilst in English this could just be coded as:</p>
+
+ <div class="codebox"><pre>
+ ...
+'PAGE_OF' =&gt; 'Page %s of %s',
+ /* Just grabbing the replacements as they
+ come and hope they are in the right order */
+ ...
+ </pre></div>
+
+ <p>&hellip; a clearer way to show explicit replacement ordering is to do:</p>
+
+ <div class="codebox"><pre>
+ ...
+'PAGE_OF' =&gt; 'Page %1$s of %2$s',
+ /* Explicit ordering of the replacements,
+ even if they are the same order as English */
+ ...
+ </pre></div>
+
+ <p>Why bother at all? Because some languages, the string transliterated back to English might read something like:</p>
+
+ <div class="codebox"><pre>
+ ...
+'PAGE_OF' =&gt; 'Total of %2$s pages, currently on page %1$s',
+ /* Explicit ordering of the replacements,
+ reversed compared to English as the total comes first */
+ ...
+ </pre></div>
+
+ <a name="writingstyle"></a><h3>6.iii. Writing Style</h3>
+
+ <h4>Miscellaneous tips &amp; hints:</h4>
+
+ <p>As the language files are PHP files, where the various strings for phpBB are stored within an array which in turn are used for display within an HTML page, rules of syntax for both must be considered. Potentially problematic characters are: <code>'</code> (straight quote/apostrophe), <code>&quot;</code> (straight double quote), <code>&lt;</code> (less-than sign), <code>&gt;</code> (greater-than sign) and <code>&amp;</code> (ampersand).</p>
+
+ <p class="bad">// Bad - The un-escapsed straight-quote/apostrophe will throw a PHP parse error</p>
+
+ <div class="codebox"><pre>
+ ...
+'CONV_ERROR_NO_AVATAR_PATH'
+ =&gt; 'Note to developer: you must specify $convertor['avatar_path'] to use %s.',
+ ...
+ </pre></div>
+
+ <p class="good">// Good - Literal straight quotes should be escaped with a backslash, ie: \</p>
+
+ <div class="codebox"><pre>
+ ...
+'CONV_ERROR_NO_AVATAR_PATH'
+ =&gt; 'Note to developer: you must specify $convertor[\'avatar_path\'] to use %s.',
+ ...
+ </pre></div>
+
+ <p>However, because phpBB3 now uses UTF-8 as its sole encoding, we can actually use this to our advantage and not have to remember to escape a straight quote when we don't have to:</p>
+
+ <p class="bad">// Bad - The un-escapsed straight-quote/apostrophe will throw a PHP parse error</p>
+
+ <div class="codebox"><pre>
+ ...
+'USE_PERMISSIONS' =&gt; 'Test out user's permissions',
+ ...
+ </pre></div>
+
+ <p class="good">// Okay - However, non-programmers wouldn't type "user\'s" automatically</p>
+
+ <div class="codebox"><pre>
+ ...
+'USE_PERMISSIONS' =&gt; 'Test out user\'s permissions',
+ ...
+ </pre></div>
+
+ <p class="good">// Best - Use the Unicode Right-Single-Quotation-Mark character</p>
+
+ <div class="codebox"><pre>
+ ...
+'USE_PERMISSIONS' =&gt; 'Test out user&rsquo;s permissions',
+ ...
+ </pre></div>
+
+ <p>The <code>&quot;</code> (straight double quote), <code>&lt;</code> (less-than sign) and <code>&gt;</code> (greater-than sign) characters can all be used as displayed glyphs or as part of HTML markup, for example:</p>
+
+ <p class="bad">// Bad - Invalid HTML, as segments not part of elements are not entitised</p>
+
+ <div class="codebox"><pre>
+ ...
+'FOO_BAR' =&gt; 'PHP version &lt; 4.3.3.&lt;br /&gt;
+ Visit &quot;Downloads&quot; at &lt;a href=&quot;http://www.php.net/&quot;&gt;www.php.net&lt;/a&gt;.',
+ ...
+ </pre></div>
+
+ <p class="good">// Okay - No more invalid HTML, but &quot;&amp;quot;&quot; is rather clumsy</p>
+
+ <div class="codebox"><pre>
+ ...
+'FOO_BAR' =&gt; 'PHP version &amp;lt; 4.3.3.&lt;br /&gt;
+ Visit &amp;quot;Downloads&amp;quot; at &lt;a href=&quot;http://www.php.net/&quot;&gt;www.php.net&lt;/a&gt;.',
+ ...
+ </pre></div>
+
+ <p class="good">// Best - No more invalid HTML, and usage of correct typographical quotation marks</p>
+
+ <div class="codebox"><pre>
+ ...
+'FOO_BAR' =&gt; 'PHP version &amp;lt; 4.3.3.&lt;br /&gt;
+ Visit &ldquo;Downloads&rdquo; at &lt;a href=&quot;http://www.php.net/&quot;&gt;www.php.net&lt;/a&gt;.',
+ ...
+ </pre></div>
+
+ <p>Lastly, the <code>&amp;</code> (ampersand) must always be entitised regardless of where it is used:</p>
+
+ <p class="bad">// Bad - Invalid HTML, none of the ampersands are entitised</p>
+
+ <div class="codebox"><pre>
+ ...
+'FOO_BAR' =&gt; '&lt;a href=&quot;http://somedomain.tld/?foo=1&amp;bar=2&quot;&gt;Foo &amp; Bar&lt;/a&gt;.',
+ ...
+ </pre></div>
+
+ <p class="good">// Good - Valid HTML, amperands are correctly entitised in all cases</p>
+
+ <div class="codebox"><pre>
+ ...
+'FOO_BAR' =&gt; '&lt;a href=&quot;http://somedomain.tld/?foo=1&amp;amp;bar=2&quot;&gt;Foo &amp;amp; Bar&lt;/a&gt;.',
+ ...
+ </pre></div>
+
+ <p>As for how these charcters are entered depends very much on choice of Operating System, current language locale/keyboard configuration and native abilities of the text editor used to edit phpBB language files. Please see <a href="http://en.wikipedia.org/wiki/Unicode#Input_methods">http://en.wikipedia.org/wiki/Unicode#Input_methods</a> for more information.</p>
+
+ <h4>Spelling, punctuation, grammar, et cetera:</h4>
+
+ <p>The default language pack bundled with phpBB is <strong>British English</strong> using <a href="http://www.cambridge.org/">Cambridge University Press</a> spelling and is assigned the language code <code>en</code>. The style and tone of writing tends towards formal and translations <strong>should</strong> emulate this style, at least for the variant using the most compact language code. Less formal translations or those with colloquialisms <strong>must</strong> be denoted as such via either an <code>extension</code> or <code>privateuse</code> tag within its language code.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="vcs"></a><h2>7. VCS Guidelines</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>The version control system for phpBB3 is subversion. The repository is available at <a href="http://code.phpbb.com/svn/phpbb" title="repository">http://code.phpbb.com/svn/phpbb</a>.
+
+ <a name="repostruct"></a><h3>7.i. Repository Structure</h3>
+
+ <ul>
+ <li><strong>trunk</strong><br />The latest unstable development version with new features etc. Contains the actual board in <code>/trunk/phpBB</code></li>
+ <li><strong>branches</strong><br />Development branches of stable phpBB releases. Copied from <code>/trunk</code> at the time of release.
+ <ul>
+ <li><strong>phpBB3.0</strong><code>/branches/phpBB-3_0_0/phpBB</code><br />Development branch of the stable 3.0 line. Bug fixes are applied here.</li>
+ <li><strong>phpBB2</strong><code>/branches/phpBB-2_0_0/phpBB</code><br />Old phpBB2 development branch.</li>
+ </ul>
+ </li>
+ <li><strong>tags</strong><br />Released versions. Copies of trunk or the respective branch, made at the time of release.
+ <ul>
+ <li><code>/tags/release_3_0_BX</code><br />Beta release X of the 3.0 line.</li>
+ <li><code>/tags/release_3_0_RCX</code><br />Release candidate X of the 3.0 line.</li>
+ <li><code>/tags/release_3_0_X-RCY</code><br />Release candidate Y of the stable 3.0.X release.</li>
+ <li><code>/tags/release_3_0_X</code><br />Stable <strong>3.0.X</strong> release.</li>
+ <li><code>/tags/release_2_0_X</code><br />Old stable 2.0.X release.</li>
+ </ul>
+ </li>
+ </ul>
+
+ <a name="commitmessage"></a><h3>7.ii. Commit Messages</h3>
+
+ <p>The commit message should contain a brief explanation of all changes made within the commit. Often identical to the changelog entry. A bug ticket can be referenced by specifying the ticket ID with a hash, e.g. #12345. A reference to another revision should simply be prefixed with r, e.g. r12345.</p>
+
+ <p>Junior Developers need to have their patches approved by a development team member first. The commit message must end in a line with the following format:</p>
+
+ <div class="codebox"><pre>
+Authorised by: developer1[, developer2[, ...]]
+ </pre></div>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="changes"></a><h2>8. Guidelines Changelog</h2>
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+<h3>Revision 10007</h3>
+
+<ul>
+ <li>Added <a href="#constants">Special Constants</a> section.</li>
+</ul>
+
+<h3>Revision 9817</h3>
+
+<ul>
+ <li>Added VCS section.</li>
+</ul>
+
+<h3>Revision 8732</h3>
+
+<ul>
+ <li>Added cfg files.</li>
+ <li>Added template <a href="#inheritance">inheritance</a>.</li>
+</ul>
+
+<h3>Revision 8596+</h3>
+
+<ul>
+ <li>Removed sql_build_array('MULTI_INSERT'... statements.</li>
+ <li>Added sql_multi_insert() explanation.</li>
+</ul>
+
+<h3>Revision 1.31</h3>
+
+<ul>
+ <li>Added add_form_key and check_form_key. </li>
+</ul>
+
+<h3>Revision 1.24</h3>
+
+<ul>
+ <li>Added <a href="#translation">5. Character Sets and Encodings</a> section to explain the recommended treatment of strings in phpBB.</li>
+</ul>
+
+<h3>Revision 1.16</h3>
+
+<ul>
+ <li>Added <a href="#translation">6. Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</a> section to explain expected format and authoring considerations for language packs that are to be created for phpBB.</li>
+</ul>
+
+<h3>Revision 1.11-1.15</h3>
+
+<ul>
+ <li>Various document formatting, spelling, punctuation, grammar bugs.</li>
+</ul>
+
+<h3>Revision 1.9-1.10</h3>
+
+<ul>
+ <li>Added sql_query_limit to <a href="#sql">2.iii. SQL/SQL Layout</a>.</li>
+</ul>
+
+<h3>Revision 1.8</h3>
+
+<ul>
+ <li>Some adjustements to wordings</li>
+ <li>Updated paragraph <a href="#locations">1.iii. File Locations</a> to reflect recent changes</li>
+ <li>Extended paragraph <a href="#codelayout">2.ii. Code Layout</a>.</li>
+ <li>Added sql_in_set and sql_build_query explanation to <a href="#sql">2.iii. SQL/SQL Layout</a>.</li>
+ <li>Updated paragraph <a href="#styling">3. Styling</a>.</li>
+ <li>Updated paragraph <a href="#templating">4. Templating</a> to explain loop checking, loop breaking and other changes we recently made.</li>
+</ul>
+
+<h3>Revision 1.5</h3>
+
+<ul>
+ <li>Changed General function usage paragraph in <a href="#general">2.v. General Guidelines</a></li>
+</ul>
+
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+<a name="disclaimer"></a><h2>9. Copyright and disclaimer</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+<!-- END DOCUMENT -->
+
+ <div id="page-footer">
+ <div class="version"> $Id$ </div>
+ </div>
+</div></div>
+
+<div>
+ <a id="bottom" name="bottom" accesskey="z"></a>
+</div>
+
+</body>
+</html>
diff --git a/phpBB/docs/corners_left.gif b/phpBB/docs/corners_left.gif
new file mode 100644
index 0000000000..206e50368d
--- /dev/null
+++ b/phpBB/docs/corners_left.gif
Binary files differ
diff --git a/phpBB/docs/corners_left.png b/phpBB/docs/corners_left.png
new file mode 100644
index 0000000000..256bde3daa
--- /dev/null
+++ b/phpBB/docs/corners_left.png
Binary files differ
diff --git a/phpBB/docs/corners_right.gif b/phpBB/docs/corners_right.gif
new file mode 100644
index 0000000000..0ba66d50b2
--- /dev/null
+++ b/phpBB/docs/corners_right.gif
Binary files differ
diff --git a/phpBB/docs/corners_right.png b/phpBB/docs/corners_right.png
new file mode 100644
index 0000000000..df41823b4c
--- /dev/null
+++ b/phpBB/docs/corners_right.png
Binary files differ
diff --git a/phpBB/docs/hook_system.html b/phpBB/docs/hook_system.html
new file mode 100644
index 0000000000..b23ebab869
--- /dev/null
+++ b/phpBB/docs/hook_system.html
@@ -0,0 +1,887 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="content-language" content="en" />
+<meta http-equiv="imagetoolbar" content="no" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<meta name="copyright" content="2007 phpBB Group" />
+<meta name="keywords" content="" />
+<meta name="description" content="Hook System explanation" />
+<title>phpBB3 &bull; Hook System</title>
+
+<style type="text/css">
+/* <![CDATA[ */
+
+/*
+ The original "prosilver" theme for phpBB3
+ Created by subBlue design :: http://www.subBlue.com
+*/
+
+* { margin: 0; padding: 0; }
+
+html { font-size: 100%; height: 100%; margin-bottom: 1px; }
+
+body {
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ color: #828282;
+ background-color: #FFFFFF;
+ font-size: 12px;
+ margin: 0;
+ padding: 12px 0;
+}
+
+img { border-width: 0; }
+
+p {
+ line-height: 1.3em;
+ font-size: 1.1em;
+ margin-bottom: 1.5em;
+}
+
+hr {
+ border: 0 none #FFFFFF;
+ border-top: 1px solid #CCCCCC;
+ height: 1px;
+ margin: 5px 0;
+ display: block;
+ clear: both;
+}
+
+html, body {
+ color: #536482;
+ background-color: #FFFFFF;
+}
+
+#doc-description h1 {
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+ margin-right: 200px;
+ color: #FFFFFF;
+ margin-top: 15px;
+ font-weight: bold;
+ font-size: 2em;
+ color: #fff;
+}
+
+h1 {
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ color: #000;
+ font-size: 2em;
+ margin: 0.8em 0 0.2em 0;
+}
+
+h2 {
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ color: #28313F;
+ font-size: 1.5em;
+ margin: 0.8em 0 0.2em 0;
+}
+
+h3 {
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ border-bottom: 1px solid #CCCCCC;
+ margin-bottom: 3px;
+ padding-bottom: 2px;
+ font-size: 1.05em;
+ color: #115098;
+ margin-top: 20px;
+}
+
+.good { color: green; }
+.bad { color: red; }
+
+.version {
+ margin-top: 20px;
+ text-align: left;
+ font-size: 70%;
+ color: #006600;
+ border-top: 1px solid #ccc;
+}
+
+code {
+ color: #006600;
+ font-weight: normal;
+ font-family: 'Courier New', monospace;
+ border-color: #D1D7DC;
+ border-width: 1px;
+ border-style: solid;
+ background-color: #FAFAFA;
+}
+
+#wrap {
+ padding: 0 20px;
+ min-width: 650px;
+}
+
+#simple-wrap {
+ padding: 6px 10px;
+}
+
+#page-body {
+ margin: 4px 0;
+ clear: both;
+}
+
+#page-footer {
+ clear: both;
+}
+
+#logo {
+ float: left;
+ width: auto;
+ padding: 10px 13px 0 10px;
+}
+
+a#logo:hover {
+ text-decoration: none;
+}
+
+#doc-description {
+ float: left;
+ width: 70%;
+}
+
+#doc-description h1 {
+ margin-right: 0;
+}
+
+.headerbar {
+ background: #ebebeb none repeat-x 0 0;
+ color: #FFFFFF;
+ margin-bottom: 4px;
+ padding: 0 5px;
+}
+
+span.corners-top, span.corners-bottom, span.corners-top span, span.corners-bottom span {
+ font-size: 1px;
+ line-height: 1px;
+ display: block;
+ height: 5px;
+ background-repeat: no-repeat;
+}
+
+span.corners-top {
+ background-image: none;
+ background-position: 0 0;
+ margin: 0 -5px;
+}
+
+span.corners-top span {
+ background-image: none;
+ background-position: 100% 0;
+}
+
+span.corners-bottom {
+ background-image: none;
+ background-position: 0 100%;
+ margin: 0 -5px;
+ clear: both;
+}
+
+span.corners-bottom span {
+ background-image: none;
+ background-position: 100% 100%;
+}
+
+.paragraph {
+ padding: 0 10px;
+ margin-bottom: 4px;
+ background-repeat: no-repeat;
+ background-position: 100% 0;
+ background-color: #ECF3F7;
+}
+
+.paragraph:target .content {
+ color: #000000;
+}
+
+.paragraph:target h3 a {
+ color: #000000;
+}
+
+.content {
+ color: #333333;
+}
+
+.content h2, .panel h2 {
+ color: #115098;
+ border-bottom-color: #CCCCCC;
+}
+
+a:link { color: #898989; text-decoration: none; }
+a:visited { color: #898989; text-decoration: none; }
+a:hover { color: #d3d3d3; text-decoration: underline; }
+a:active { color: #d2d2d2; text-decoration: none; }
+
+hr {
+ border-color: #FFFFFF;
+ border-top-color: #CCCCCC;
+}
+
+.menu {
+ background-color: #cadceb;
+}
+
+.headerbar {
+ background-color: #12A3EB;
+ background-image: url("bg_header.gif");
+ color: #FFFFFF;
+}
+
+.panel {
+ background-color: #ECF1F3;
+ color: #28313F;
+}
+
+
+span.corners-top {
+ background-image: url("corners_left.png");
+}
+
+span.corners-top span {
+ background-image: url("corners_right.png");
+}
+
+span.corners-bottom {
+ background-image: url("corners_left.png");
+}
+
+span.corners-bottom span {
+ background-image: url("corners_right.png");
+}
+
+.error {
+ color: #BC2A4D;
+}
+
+a:link { color: #105289; }
+a:visited { color: #105289; }
+a:hover { color: #D31141; }
+a:active { color: #368AD2; }
+
+.paragraph span.corners-top, .paragraph span.corners-bottom {
+ margin: 0 -10px;
+}
+
+.content {
+ padding: 0;
+ line-height: 1.48em;
+ color: #333333;
+}
+
+.content h2, .panel h2 {
+ color: #115098;
+ border-bottom-color: #CCCCCC;
+}
+
+.notice {
+ border-top-color: #CCCCCC;
+}
+
+.codebox {
+ padding: 3px;
+ background-color: #FFFFFF;
+ border: 1px solid #C9D2D8;
+ font-size: 1em;
+ margin-bottom: 10px;
+ display: block;
+ font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono;
+ line-height: 1.3em;
+}
+
+* html hr { margin: 0; }
+* html span.corners-top, * html span.corners-bottom { background-image: url("corners_left.gif"); }
+* html span.corners-top span, * html span.corners-bottom span { background-image: url("corners_right.gif"); }
+
+.back2top {
+ clear: both;
+ height: 11px;
+ text-align: right;
+}
+
+.content ol {
+ margin-left: 25px;
+}
+
+/* ]]> */
+</style>
+
+</head>
+
+<body id="phpbb" class="section-docs">
+
+<div id="wrap">
+ <a id="top" name="top" accesskey="t"></a>
+ <div id="page-header">
+ <div class="headerbar">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div id="doc-description">
+ <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
+ <h1>Hook System</h1>
+ <p>This is an explanation of how to use the phpBB3 hook system.</p>
+ <p style="display: none;"><a href="#start_here">Skip</a></p>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ </div>
+
+ <a name="start_here"></a>
+
+ <div id="page-body">
+
+ <h1>Hook System</h1>
+
+ <div class="paragraph menu">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <ol>
+ <li><a href="#intro">Introduction</a></li>
+ <li><a href="#use">Allow hooks in functions/methods</a></li>
+ <li><a href="#register">Registering hooks</a></li>
+ <li><a href="#return">Result returning</a></li>
+ <li><a href="#embed">Embedding your hook files/classes/methods</a></li>
+ <li><a href="#disclaimer">Copyright and disclaimer</a></li>
+ </ol>
+
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr />
+
+ <a name="intro"></a><h2>1. Introduction</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<h3>What is it?</h3>
+
+<p>The hook system allows applicaton and mod developers to hook into phpBB's or their own functions.</p>
+
+<h3>Pre-defined hookable phpBB3 functions</h3>
+
+<p>In phpBB3 there are four functions you are able to hook into with your custom functions:</p>
+
+<p><code>phpbb_user_session_handler();</code> which is called within user::setup after the session and the user object is correctly initialized.<br />
+<code>append_sid($url, $params = false, $is_amp = true, $session_id = false);</code> which is called for building urls (appending the session id)<br />
+<code>$template-&gt;display($handle, $include_once = true);</code> which is called directly before outputting the (not-yet-compiled) template.<br />
+<code>exit_handler();</code> which is called at the very end of phpBB3's execution.</p>
+
+<p>There are also valid external constants you may want to use if you embed phpBB3 into your application:</p>
+
+<div class="codebox"><pre>
+PHPBB_MSG_HANDLER (overwrite message handler)
+PHPBB_DB_NEW_LINK (overwrite new_link parameter for sql_connect)
+PHPBB_ROOT_PATH (overwrite $phpbb_root_path)
+PHPBB_ADMIN_PATH (overwrite $phpbb_admin_path)
+PHPBB_USE_BOARD_URL_PATH (use generate_board_url() for image paths instead of $phpbb_root_path)
+</pre></div>
+
+<p>If the <code>PHPBB_USE_BOARD_URL_PATH</code> constant is set to true, phpBB uses generate_board_url() (this will return the boards url with the script path included) on all instances where web-accessible images are loaded. The exact locations are:</p>
+
+<ul>
+ <li>/includes/session.php - user::img()</li>
+ <li>/includes/functions_content.php - smiley_text()</li>
+</ul>
+
+<p>Path locations for the following template variables are affected by this too:</p>
+
+<ul>
+ <li>{T_THEME_PATH} - styles/xxx/theme</li>
+ <li>{T_TEMPLATE_PATH} - styles/xxx/template</li>
+ <li>{T_SUPER_TEMPLATE_PATH} - styles/xxx/template</li>
+ <li>{T_IMAGESET_PATH} - styles/xxx/imageset</li>
+ <li>{T_IMAGESET_LANG_PATH} - styles/xxx/imageset/yy</li>
+ <li>{T_IMAGES_PATH} - images/</li>
+ <li>{T_SMILIES_PATH} - $config['smilies_path']/</li>
+ <li>{T_AVATAR_PATH} - $config['avatar_path']/</li>
+ <li>{T_AVATAR_GALLERY_PATH} - $config['avatar_gallery_path']/</li>
+ <li>{T_ICONS_PATH} - $config['icons_path']/</li>
+ <li>{T_RANKS_PATH} - $config['ranks_path']/</li>
+ <li>{T_UPLOAD_PATH} - $config['upload_path']/</li>
+ <li>{T_STYLESHEET_LINK} - styles/xxx/theme/stylesheet.css (or link to style.php if css is parsed dynamically)</li>
+ <li>New template variable {BOARD_URL} for the board url + script path.</li>
+</ul>
+
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <a name="use"></a><h2>2. Allow hooks in functions/methods</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>The following examples explain how phpBB3 utilize the in-build hook system. You will be more interested in registering your hooks, but showing you this may help you understand the system better along the way.</p>
+
+<p>First of all, this is how a function need to be layed out if you want to allow it to be hookable...</p>
+
+<div class="codebox"><pre>
+function my_own_function($my_first_parameter, $my_second_parameter)
+{
+ global $phpbb_hook;
+
+ if ($phpbb_hook-&gt;call_hook(__FUNCTION__, $my_first_parameter, $my_second_parameter))
+ {
+ if ($phpbb_hook-&gt;hook_return(__FUNCTION__))
+ {
+ return $phpbb_hook-&gt;hook_return_result(__FUNCTION__);
+ }
+ }
+
+ [YOUR CODE HERE]
+}
+</pre></div>
+
+<p>Above, the call_hook function should always be mapping your function call... in regard to the number of parameters passed.</p>
+
+<p>This is how you could make a method being hookable...</p>
+
+<div class="codebox"><pre>
+class my_hookable_object
+{
+ function hook_me($my_first_parameter, $my_second_parameter)
+ {
+ global $phpbb_hook;
+
+ if ($phpbb_hook-&gt;call_hook(array(__CLASS__, __FUNCTION__), $my_first_parameter, $my_second_parameter))
+ {
+ if ($phpbb_hook-&gt;hook_return(array(__CLASS__, __FUNCTION__)))
+ {
+ return $phpbb_hook-&gt;hook_return_result(array(__CLASS__, __FUNCTION__));
+ }
+ }
+
+ [YOUR CODE HERE]
+ }
+}
+</pre></div>
+
+<p>The only difference about calling it is the way you define the first parameter. For a function it is only <code>__FUNCTION__</code>, for a method it is <code>array(__CLASS__, __FUNCTION__)</code>. In PHP4 __CLASS__ is always returning the class in lowercase.</p>
+
+<p>Now, in phpBB there are some pre-defined hooks available, but how do you make your own hookable function available (and therefore allowing others to hook into it)? For this, there is the add_hook() method:</p>
+
+<div class="codebox"><pre>
+// Adding your own hookable function:
+$phpbb_hook-&gt;add_hook('my_own_function');
+
+// Adding your own hookable method:
+$phpbb_hook-&gt;add_hook(array('my_hookable_object', 'hook_me'));
+</pre></div>
+
+<p>You are also able to remove the possibility of hooking a function/method by calling <code>$phpbb_hook-&gt;remove_hook()</code> with the same parameters as add_hook().<br />
+This comes in handy if you want to force some hooks not to be called - at all.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <a name="register"></a><h2>3. Registering hooks</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <h3>Registering hooks</h3>
+
+<p>Now to actually defining your functions which should be called. For this we take the append_sid() function as an example (this function is able to be hooked by default). We create two classes, one being static and a function:</p>
+
+<div class="codebox"><pre>
+class my_append_sid_class
+{
+ // Our functions
+ function my_append_sid(&amp;$hook, $url, $params = false, $is_amp = true, $session_id = false)
+ {
+ // Get possible previous results
+ $result = $hook-&gt;previous_hook_result('append_sid');
+
+ return $result['result'] . '&lt;br /&gt;And i was the second one.';
+ }
+}
+
+// Yet another class :o
+class my_second_append_sid_class
+{
+ function my_append_sid(&amp;$hook, $url, $params = false, $is_amp = true, $session_id = false)
+ {
+ // Get possible previous results
+ $result = $hook-&gt;previous_hook_result('append_sid');
+
+ echo $result['result'] . '&lt;br /&gt;I was called as the third one.';
+ }
+}
+
+// And a normal function
+function my_append_sid(&amp;$hook, $url, $params = false, $is_amp = true, $session_id = false)
+{
+ // Get possible previous results
+ $result = $hook-&gt;previous_hook_result('append_sid');
+
+ return 'I was called as the first one';
+}
+
+// Initializing the second class
+$my_second_append_sid_class = new my_second_append_sid_class();
+</pre></div>
+
+<p>Make sure you add the same parameters to your function as is defined for the hookable function with one exception: The first variable is always <code>&amp;$hook</code>... this is the hook object itself you are able to operate on.</p>
+
+<p>Now we register the hooks one by one with the <code>$phpbb_hook-&gt;register()</code> method:</p>
+
+<div class="codebox"><pre>
+// Now, we register our append_sid &quot;replacements&quot; in a stacked way...
+// Registering the function (this is called first)
+$phpbb_hook-&gt;register('append_sid', 'my_append_sid');
+
+// Registering the first class
+$phpbb_hook-&gt;register('append_sid', array('my_append_sid_class', 'my_append_sid'));
+$phpbb_hook-&gt;register('append_sid', array(&amp;$my_second_append_sid_class, 'my_append_sid'));
+</pre></div>
+
+<p>With this you are even able to make your own functions that are already hooked itself being hooked again...</p>
+
+<div class="codebox"><pre>
+// Registering hook, which will be called
+$phpbb_hook-&gt;register('append_sid', 'my_own_append_sid');
+
+// Add hook to our called hook function
+$phpbb_hook-&gt;add_hook('my_own_append_sid');
+
+// Register added hook
+$phpbb_hook-&gt;register('my_own_append_sid', 'also_my_own_append_sid');
+</pre></div>
+
+ <h3>Special treatment/chains</h3>
+
+ <p>The <code>register</code> method is able to take a third argument to specify a special 'chain' mode. The valid modes are <code>first</code>, <code>last</code> and <code>standalone</code></p>
+
+ <p><code>$phpbb_hook-&gt;register('append_sid', 'my_own_append_sid', 'first')</code> would make sure that the function is called in the beginning of the chain. It is possible that more than one function is called within the first block - here the FIFO principle is used.</p>
+
+ <p><code>$phpbb_hook-&gt;register('append_sid', 'my_own_append_sid', 'last')</code> would make sure that the function is called at the very end of the chain. It is possible that more than one function is called within the last block - here the FIFO principle is used.</p>
+
+ <p><code>$phpbb_hook-&gt;register('append_sid', 'my_own_append_sid', 'standalone')</code> makes sure only the defined function is called. All other functions are removed from the chain and no other functions are added to it later on. If two applications try to trigger the standalone mode a PHP notice will be printed and the second function being discarded.</p>
+
+ <h3>Only allowing hooks for some objects</h3>
+
+ <p>Because the hook system is not able to differate between initialized objects and only operate on the class, you need to solve this on the code level.</p>
+
+ <p>One possibility would be to use a property:</p>
+
+ <div class="codebox"><pre>
+class my_hookable_object
+{
+ function blabla()
+ {
+ }
+}
+
+class my_hookable_object2 extends my_hookable_object
+{
+ var $call_hook = true;
+
+ function hook_me($my_first_parameter, $my_second_parameter)
+ {
+ if ($this-&gt;call_hook)
+ {
+ global $phpbb_hook;
+
+ if ($phpbb_hook-&gt;call_hook(array(__CLASS__, __FUNCTION__), $my_first_parameter, $my_second_parameter))
+ {
+ if ($phpbb_hook-&gt;hook_return(array(__CLASS__, __FUNCTION__)))
+ {
+ return $phpbb_hook-&gt;hook_return_result(array(__CLASS__, __FUNCTION__));
+ }
+ }
+ }
+
+ return 'not hooked';
+ }
+}
+
+function hooking(&amp;$hook, $first, $second)
+{
+ return 'hooked';
+}
+
+$first_object = new my_hookable_object2();
+$second_object = new my_hookable_object2();
+
+$phpbb_hook-&gt;add_hook(array('my_hookable_object2', 'hook_me'));
+
+$phpbb_hook-&gt;register(array('my_hookable_object2', 'hook_me'), 'hooking');
+
+// Do not call the hook for $first_object
+$first_object-&gt;call_hook = false;
+
+echo $first_object-&gt;hook_me('first', 'second') . '&lt;br /&gt;';
+echo $second_object-&gt;hook_me('first', 'second') . '&lt;br /&gt;';
+</pre></div>
+
+<p>OUTPUT:</p>
+
+<div class="codebox"><pre>
+not hooked
+hooked
+</pre></div>
+
+ <p>A different possibility would be using a function variable (which could be left out on passing the function variables to the hook):</p>
+
+ <div class="codebox"><pre>
+class my_hookable_object
+{
+ function blabla()
+ {
+ }
+}
+
+class my_hookable_object2 extends my_hookable_object
+{
+ function hook_me($my_first_parameter, $my_second_parameter, $hook_me = true)
+ {
+ if ($hook_me)
+ {
+ global $phpbb_hook;
+
+ if ($phpbb_hook-&gt;call_hook(array(__CLASS__, __FUNCTION__), $my_first_parameter, $my_second_parameter))
+ {
+ if ($phpbb_hook-&gt;hook_return(array(__CLASS__, __FUNCTION__)))
+ {
+ return $phpbb_hook-&gt;hook_return_result(array(__CLASS__, __FUNCTION__));
+ }
+ }
+ }
+
+ return 'not hooked';
+ }
+}
+
+function hooking(&amp;$hook, $first, $second)
+{
+ return 'hooked';
+}
+
+$first_object = new my_hookable_object2();
+$second_object = new my_hookable_object2();
+
+$phpbb_hook-&gt;add_hook(array('my_hookable_object2', 'hook_me'));
+
+$phpbb_hook-&gt;register(array('my_hookable_object2', 'hook_me'), 'hooking');
+
+echo $first_object-&gt;hook_me('first', 'second', false) . '&lt;br /&gt;';
+echo $second_object-&gt;hook_me('first', 'second') . '&lt;br /&gt;';
+ </pre></div>
+
+ <p>OUTPUT:</p>
+
+ <div class="codebox"><pre>
+not hooked
+hooked
+ </pre></div>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <a name="return"></a><h2>4. Result returning</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>Generally, the distinction has to be made if a function returns the result obtained from the called function or continue the execution. Based on the needs of the application this may differ. Therefore, the function returns the results only if the called hook function is returning a result.</p>
+
+<h3>Case 1 - Returning the result</h3>
+
+<p>Imagine the following function supporting hooks:</p>
+
+<div class="codebox"><pre>
+function append_sid($url, $params = false, $is_amp = true, $session_id = false)
+{
+ global $_SID, $_EXTRA_URL, $phpbb_hook;
+
+ // Developers using the hook function need to globalise the $_SID and $_EXTRA_URL on their own and also handle it appropiatly.
+ // They could mimick most of what is within this function
+ if ($phpbb_hook-&gt;call_hook(__FUNCTION__, $url, $params, $is_amp, $session_id))
+ {
+ if ($phpbb_hook-&gt;hook_return(__FUNCTION__))
+ {
+ return $phpbb_hook-&gt;hook_return_result(__FUNCTION__);
+ }
+ }
+
+ [...]
+}
+</pre></div>
+
+<p>Now, the following function is yours. Since you return a value, the append_sid() function itself is returning it as is:</p>
+
+<div class="codebox"><pre>
+// The function called
+function my_append_sid(&amp;$hook, $url, $params = false, $is_amp = true, $session_id = false)
+{
+ // Get possible previous results
+ $result = $hook-&gt;previous_hook_result('append_sid');
+
+ return 'Since i return something the append_sid() function will return my result.';
+}
+</pre></div>
+
+<p>To be able to get the results returned from functions higher in the change the <code>previous_hook_result()</code> method should always be used, it returns an <code>array('result' => [your result])</code> construct.</p>
+
+<h3>Case 2 - Not Returning any result</h3>
+
+<p>Sometimes applications want to return nothing and therefore force the underlying function to continue it's execution:</p>
+
+<div class="codebox"><pre>
+function append_sid($url, $params = false, $is_amp = true, $session_id = false)
+{
+ global $_SID, $_EXTRA_URL, $phpbb_hook;
+
+ // Developers using the hook function need to globalise the $_SID and $_EXTRA_URL on their own and also handle it appropiatly.
+ // They could mimick most of what is within this function
+ if ($phpbb_hook-&gt;call_hook(__FUNCTION__, $url, $params, $is_amp, $session_id))
+ {
+ if ($phpbb_hook-&gt;hook_return(__FUNCTION__))
+ {
+ return $phpbb_hook-&gt;hook_return_result(__FUNCTION__);
+ }
+ }
+
+ [...]
+}
+
+// The function called
+function my_append_sid(&amp;$hook, $url, $params = false, $is_amp = true, $session_id = false)
+{
+ // Get possible previous results
+ $result = $hook-&gt;previous_hook_result('append_sid');
+
+ [...]
+
+ // I only rewrite some variables, but return nothing. Therefore, the append_sid() function will not return my (non)result.
+}
+</pre></div>
+
+<p>Please Note: The decision to return or not return is solely made of the very last function call within the hook chain. An example:</p>
+
+<div class="codebox"><pre>
+// The function called
+function my_append_sid(&amp;$hook, $url, $params = false, $is_amp = true, $session_id = false)
+{
+ // Get possible previous results
+ $result = $hook-&gt;previous_hook_result('append_sid');
+
+ // $result is not filled
+
+ return 'FILLED';
+}
+
+// This function is registered too and gets executed after my_append_sid()
+function my_own_append_sid(&amp;$hook, $url, $params = false, $is_amp = true, $session_id = false)
+{
+ $result = $hook->previous_hook_result('append_sid');
+
+ // $result is actually filled with $result['result'] = 'FILLED'
+ // But i return nothing, therefore append_sid() continues it's execution.
+}
+
+// The way both functions are registered.
+$phpbb_hook->register('append_sid', 'my_append_sid');
+$phpbb_hook->register('append_sid', 'my_own_append_sid');
+</pre></div>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <a name="embed"></a><h2>5. Embedding your hook files/classes/methods</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+<p>There are basically two methods you are able to choose from:</p>
+
+<p>1) Add a file to includes/hooks/. The file need to be prefixed by <code>hook_</code>. This file is included within common.php, you are able to register your hooks, include other files or functions, etc. It is advised to only include other files if needed (within a function call for example).</p>
+
+<p>Please be aware that you need to purge your cache within the ACP to make your newly placed file available to phpBB3.</p>
+
+<p>2) The second method is meant for those wanting to wrap phpBB3 without placing a custom file to the hooks directory. This is mostly done by including phpBB's files within the application file. To be able to register your hooks you need to create a function within your application:</p>
+
+<div class="codebox"><pre>
+// My function which gets executed within the hooks constuctor
+function phpbb_hook_register(&amp;$hook)
+{
+ $hook-&gt;register('append_sid', 'my_append_sid');
+}
+
+[...]
+</pre></div>
+
+<p>You should get the idea. ;)</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <a name="disclaimer"></a><h2>6. Copyright and disclaimer</h2>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
+
+ </div>
+
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <div id="page-footer">
+ <div class="version">$Id$</div>
+ </div>
+</div></div>
+
+<div>
+ <a id="bottom" name="bottom" accesskey="z"></a>
+</div>
+
+</body>
+</html>
diff --git a/phpBB/docs/site_logo.gif b/phpBB/docs/site_logo.gif
new file mode 100644
index 0000000000..909114c377
--- /dev/null
+++ b/phpBB/docs/site_logo.gif
Binary files differ
diff --git a/phpBB/docs/stylesheet.css b/phpBB/docs/stylesheet.css
new file mode 100644
index 0000000000..6b8f5994c0
--- /dev/null
+++ b/phpBB/docs/stylesheet.css
@@ -0,0 +1,352 @@
+/*
+ The original "prosilver" theme for phpBB3
+ Created by subBlue design :: http://www.subBlue.com
+*/
+
+* { margin: 0; padding: 0; }
+
+html { font-size: 100%; height: 100%; margin-bottom: 1px; }
+
+body {
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ color: #828282;
+ background-color: #FFFFFF;
+ font-size: 12px;
+ margin: 0;
+ padding: 12px 0;
+}
+
+img { border-width: 0; }
+
+p {
+ line-height: 1.3em;
+ font-size: 1.1em;
+ margin-bottom: 1.5em;
+}
+
+hr {
+ border: 0 none #FFFFFF;
+ border-top: 1px solid #CCCCCC;
+ height: 1px;
+ margin: 5px 0;
+ display: block;
+ clear: both;
+}
+
+html, body {
+ color: #536482;
+ background-color: #FFFFFF;
+}
+
+#doc-description h1 {
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+ margin-right: 200px;
+ color: #FFFFFF;
+ margin-top: 15px;
+ font-weight: bold;
+ font-size: 2em;
+ color: #fff;
+}
+
+h1 {
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ color: #000;
+ font-size: 2em;
+ margin: 0.8em 0 0.2em 0;
+}
+
+h2 {
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ color: #28313F;
+ font-size: 1.5em;
+ margin: 0.8em 0 0.2em 0;
+}
+
+h3 {
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ border-bottom: 1px solid #CCCCCC;
+ margin-bottom: 3px;
+ padding-bottom: 2px;
+ font-size: 1.05em;
+ color: #115098;
+ margin-top: 20px;
+}
+
+h4 {
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ margin-bottom: 3px;
+ padding-bottom: 2px;
+ font-size: 1.05em;
+ color: #115098;
+ margin-top: 20px;
+}
+
+.good { color: green; }
+.bad { color: red; }
+
+.version {
+ margin-top: 20px;
+ text-align: left;
+ font-size: 70%;
+ color: #006600;
+ border-top: 1px solid #ccc;
+}
+
+code {
+ color: #006600;
+ font-weight: normal;
+ font-family: 'Courier New', monospace;
+ border-color: #D1D7DC;
+ border-width: 1px;
+ border-style: solid;
+ background-color: #FAFAFA;
+}
+
+#wrap {
+ padding: 0 20px;
+ min-width: 650px;
+}
+
+#simple-wrap {
+ padding: 6px 10px;
+}
+
+#page-body {
+ margin: 4px 0;
+ clear: both;
+}
+
+#page-footer {
+ clear: both;
+}
+
+#logo {
+ float: left;
+ width: auto;
+ padding: 10px 13px 0 10px;
+}
+
+a#logo:hover {
+ text-decoration: none;
+}
+
+#doc-description {
+ float: left;
+ width: 70%;
+}
+
+#doc-description h1 {
+ margin-right: 0;
+}
+
+.headerbar {
+ background: #ebebeb none repeat-x 0 0;
+ color: #FFFFFF;
+ margin-bottom: 4px;
+ padding: 0 5px;
+}
+
+span.corners-top, span.corners-bottom, span.corners-top span, span.corners-bottom span {
+ font-size: 1px;
+ line-height: 1px;
+ display: block;
+ height: 5px;
+ background-repeat: no-repeat;
+}
+
+span.corners-top {
+ background-image: none;
+ background-position: 0 0;
+ margin: 0 -5px;
+}
+
+span.corners-top span {
+ background-image: none;
+ background-position: 100% 0;
+}
+
+span.corners-bottom {
+ background-image: none;
+ background-position: 0 100%;
+ margin: 0 -5px;
+ clear: both;
+}
+
+span.corners-bottom span {
+ background-image: none;
+ background-position: 100% 100%;
+}
+
+.paragraph {
+ padding: 0 10px;
+ margin-bottom: 4px;
+ background-repeat: no-repeat;
+ background-position: 100% 0;
+ background-color: #ECF3F7;
+}
+
+.paragraph:target .content {
+ color: #000000;
+}
+
+.paragraph:target h3 a {
+ color: #000000;
+}
+
+.content {
+ color: #333333;
+}
+
+.content h2, .panel h2 {
+ color: #115098;
+ border-bottom-color: #CCCCCC;
+}
+
+a:link { color: #898989; text-decoration: none; }
+a:visited { color: #898989; text-decoration: none; }
+a:hover { color: #d3d3d3; text-decoration: underline; }
+a:active { color: #d2d2d2; text-decoration: none; }
+
+hr {
+ border-color: #FFFFFF;
+ border-top-color: #CCCCCC;
+}
+
+.menu {
+ background-color: #cadceb;
+}
+
+.headerbar {
+ background-color: #12A3EB;
+ background-image: url("bg_header.gif");
+ color: #FFFFFF;
+}
+
+.panel {
+ background-color: #ECF1F3;
+ color: #28313F;
+}
+
+
+span.corners-top {
+ background-image: url("corners_left.png");
+}
+
+span.corners-top span {
+ background-image: url("corners_right.png");
+}
+
+span.corners-bottom {
+ background-image: url("corners_left.png");
+}
+
+span.corners-bottom span {
+ background-image: url("corners_right.png");
+}
+
+.error {
+ color: #BC2A4D;
+}
+
+a:link { color: #105289; }
+a:visited { color: #105289; }
+a:hover { color: #D31141; }
+a:active { color: #368AD2; }
+
+.paragraph span.corners-top, .paragraph span.corners-bottom {
+ margin: 0 -10px;
+}
+
+.content {
+ padding: 0;
+ line-height: 1.48em;
+ color: #333333;
+}
+
+.content h2, .panel h2 {
+ color: #115098;
+ border-bottom-color: #CCCCCC;
+}
+
+.notice {
+ border-top-color: #CCCCCC;
+}
+
+.codebox {
+ padding: 3px;
+ background-color: #FFFFFF;
+ border: 1px solid #C9D2D8;
+ font-size: 1em;
+ margin-bottom: 10px;
+ display: block;
+ font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono;
+ line-height: 1.3em;
+}
+
+* html hr { margin: 0; }
+* html span.corners-top, * html span.corners-bottom { background-image: url("corners_left.gif"); }
+* html span.corners-top span, * html span.corners-bottom span { background-image: url("corners_right.gif"); }
+
+.back2top {
+ clear: both;
+ height: 11px;
+ text-align: right;
+}
+
+.content ol, .content ul {
+ margin-left: 25px;
+ margin-top: 0;
+}
+
+.content ul + p, .content ul + div {
+ margin-top: 20px;
+}
+
+.comment {
+ color: green;
+}
+
+.indent {
+ margin-left: 20px;
+}
+
+.paragraph table {
+ font-size: 8pt;
+ border-collapse: collapse;
+ border: 1px solid #cfcfcf;
+ margin-bottom: 20px;
+}
+
+.paragraph table caption {
+ display: none;
+}
+
+.paragraph table thead {
+ background-color: #cadceb;
+ color: #000;
+}
+
+.paragraph table td, .paragraph table th {
+ border: 1px solid #006699;
+ padding: 0.5em;
+ background-color: #e1ebf2;
+}
+
+.paragraph table th {
+ background-color: #cadceb;
+}
+
+.paragraph table td dl {
+ margin: 0;
+ padding: 0;
+}
+
+.paragraph table td dl dt {
+ float: left;
+ clear: both;
+ margin-right: 1em;
+}
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
new file mode 100644
index 0000000000..c6106fc09f
--- /dev/null
+++ b/phpBB/download/file.php
@@ -0,0 +1,706 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+
+
+// Thank you sun.
+if (isset($_SERVER['CONTENT_TYPE']))
+{
+ if ($_SERVER['CONTENT_TYPE'] === 'application/x-java-archive')
+ {
+ exit;
+ }
+}
+else if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'Java') !== false)
+{
+ exit;
+}
+
+if (isset($_GET['avatar']))
+{
+ require($phpbb_root_path . 'config.' . $phpEx);
+
+ if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
+ {
+ exit;
+ }
+
+ require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx);
+ require($phpbb_root_path . 'includes/cache.' . $phpEx);
+ require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
+ require($phpbb_root_path . 'includes/constants.' . $phpEx);
+
+ $db = new $sql_db();
+ $cache = new cache();
+
+ // Connect to DB
+ if (!@$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false))
+ {
+ exit;
+ }
+ unset($dbpasswd);
+
+ // worst-case default
+ $browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : 'msie 6.0';
+
+ $config = $cache->obtain_config();
+ $filename = $_GET['avatar'];
+ $avatar_group = false;
+ $exit = false;
+
+ if ($filename[0] === 'g')
+ {
+ $avatar_group = true;
+ $filename = substr($filename, 1);
+ }
+
+ // '==' is not a bug - . as the first char is as bad as no dot at all
+ if (strpos($filename, '.') == false)
+ {
+ header('HTTP/1.0 403 Forbidden');
+ $exit = true;
+ }
+
+ if (!$exit)
+ {
+ $ext = substr(strrchr($filename, '.'), 1);
+ $stamp = (int) substr(stristr($filename, '_'), 1);
+ $filename = (int) $filename;
+ $exit = set_modified_headers($stamp, $browser);
+ }
+ if (!$exit && !in_array($ext, array('png', 'gif', 'jpg', 'jpeg')))
+ {
+ // no way such an avatar could exist. They are not following the rules, stop the show.
+ header("HTTP/1.0 403 Forbidden");
+ $exit = true;
+ }
+
+
+ if (!$exit)
+ {
+ if (!$filename)
+ {
+ // no way such an avatar could exist. They are not following the rules, stop the show.
+ header("HTTP/1.0 403 Forbidden");
+ }
+ else
+ {
+ send_avatar_to_browser(($avatar_group ? 'g' : '') . $filename . '.' . $ext, $browser);
+ }
+ }
+ file_gc();
+}
+
+// implicit else: we are not in avatar mode
+include($phpbb_root_path . 'common.' . $phpEx);
+
+$download_id = request_var('id', 0);
+$mode = request_var('mode', '');
+$thumbnail = request_var('t', false);
+
+// Start session management, do not update session page.
+$user->session_begin(false);
+$auth->acl($user->data);
+$user->setup('viewtopic');
+
+if (!$download_id)
+{
+ trigger_error('NO_ATTACHMENT_SELECTED');
+}
+
+if (!$config['allow_attachments'] && !$config['allow_pm_attach'])
+{
+ trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED');
+}
+
+$sql = 'SELECT attach_id, in_message, post_msg_id, extension, is_orphan, poster_id, filetime
+ FROM ' . ATTACHMENTS_TABLE . "
+ WHERE attach_id = $download_id";
+$result = $db->sql_query_limit($sql, 1);
+$attachment = $db->sql_fetchrow($result);
+$db->sql_freeresult($result);
+
+if (!$attachment)
+{
+ trigger_error('ERROR_NO_ATTACHMENT');
+}
+
+if ((!$attachment['in_message'] && !$config['allow_attachments']) || ($attachment['in_message'] && !$config['allow_pm_attach']))
+{
+ trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED');
+}
+
+$row = array();
+
+if ($attachment['is_orphan'])
+{
+ // We allow admins having attachment permissions to see orphan attachments...
+ $own_attachment = ($auth->acl_get('a_attach') || $attachment['poster_id'] == $user->data['user_id']) ? true : false;
+
+ if (!$own_attachment || ($attachment['in_message'] && !$auth->acl_get('u_pm_download')) || (!$attachment['in_message'] && !$auth->acl_get('u_download')))
+ {
+ trigger_error('ERROR_NO_ATTACHMENT');
+ }
+
+ // Obtain all extensions...
+ $extensions = $cache->obtain_attach_extensions(true);
+}
+else
+{
+ if (!$attachment['in_message'])
+ {
+ //
+ $sql = 'SELECT p.forum_id, f.forum_password, f.parent_id
+ FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
+ WHERE p.post_id = ' . $attachment['post_msg_id'] . '
+ AND p.forum_id = f.forum_id';
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // Global announcement?
+ $f_download = (!$row) ? $auth->acl_getf_global('f_download') : $auth->acl_get('f_download', $row['forum_id']);
+
+ if ($auth->acl_get('u_download') && $f_download)
+ {
+ if ($row && $row['forum_password'])
+ {
+ // Do something else ... ?
+ login_forum_box($row);
+ }
+ }
+ else
+ {
+ trigger_error('SORRY_AUTH_VIEW_ATTACH');
+ }
+ }
+ else
+ {
+ $row['forum_id'] = false;
+ if (!$auth->acl_get('u_pm_download'))
+ {
+ header('HTTP/1.0 403 Forbidden');
+ trigger_error('SORRY_AUTH_VIEW_ATTACH');
+ }
+
+ // Check if the attachment is within the users scope...
+ $sql = 'SELECT user_id, author_id
+ FROM ' . PRIVMSGS_TO_TABLE . '
+ WHERE msg_id = ' . $attachment['post_msg_id'];
+ $result = $db->sql_query($sql);
+
+ $allowed = false;
+ while ($user_row = $db->sql_fetchrow($result))
+ {
+ if ($user->data['user_id'] == $user_row['user_id'] || $user->data['user_id'] == $user_row['author_id'])
+ {
+ $allowed = true;
+ break;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (!$allowed)
+ {
+ header('HTTP/1.0 403 Forbidden');
+ trigger_error('ERROR_NO_ATTACHMENT');
+ }
+ }
+
+ // disallowed?
+ $extensions = array();
+ if (!extension_allowed($row['forum_id'], $attachment['extension'], $extensions))
+ {
+ trigger_error(sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension']));
+ }
+}
+
+if (!download_allowed())
+{
+ header('HTTP/1.0 403 Forbidden');
+ trigger_error($user->lang['LINKAGE_FORBIDDEN']);
+}
+
+$download_mode = (int) $extensions[$attachment['extension']]['download_mode'];
+
+// Fetching filename here to prevent sniffing of filename
+$sql = 'SELECT attach_id, is_orphan, in_message, post_msg_id, extension, physical_filename, real_filename, mimetype, filetime
+ FROM ' . ATTACHMENTS_TABLE . "
+ WHERE attach_id = $download_id";
+$result = $db->sql_query_limit($sql, 1);
+$attachment = $db->sql_fetchrow($result);
+$db->sql_freeresult($result);
+
+if (!$attachment)
+{
+ trigger_error('ERROR_NO_ATTACHMENT');
+}
+
+$attachment['physical_filename'] = utf8_basename($attachment['physical_filename']);
+$display_cat = $extensions[$attachment['extension']]['display_cat'];
+
+if (($display_cat == ATTACHMENT_CATEGORY_IMAGE || $display_cat == ATTACHMENT_CATEGORY_THUMB) && !$user->optionget('viewimg'))
+{
+ $display_cat = ATTACHMENT_CATEGORY_NONE;
+}
+
+if ($display_cat == ATTACHMENT_CATEGORY_FLASH && !$user->optionget('viewflash'))
+{
+ $display_cat = ATTACHMENT_CATEGORY_NONE;
+}
+
+if ($thumbnail)
+{
+ $attachment['physical_filename'] = 'thumb_' . $attachment['physical_filename'];
+}
+else if (($display_cat == ATTACHMENT_CATEGORY_NONE/* || $display_cat == ATTACHMENT_CATEGORY_IMAGE*/) && !$attachment['is_orphan'])
+{
+ // Update download count
+ $sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
+ SET download_count = download_count + 1
+ WHERE attach_id = ' . $attachment['attach_id'];
+ $db->sql_query($sql);
+}
+
+if ($display_cat == ATTACHMENT_CATEGORY_IMAGE && $mode === 'view' && (strpos($attachment['mimetype'], 'image') === 0) && ((strpos(strtolower($user->browser), 'msie') !== false) && (strpos(strtolower($user->browser), 'msie 8.0') === false)))
+{
+ wrap_img_in_html(append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'id=' . $attachment['attach_id']), $attachment['real_filename']);
+ file_gc();
+}
+else
+{
+ // Determine the 'presenting'-method
+ if ($download_mode == PHYSICAL_LINK)
+ {
+ // This presenting method should no longer be used
+ if (!@is_dir($phpbb_root_path . $config['upload_path']))
+ {
+ trigger_error($user->lang['PHYSICAL_DOWNLOAD_NOT_POSSIBLE']);
+ }
+
+ redirect($phpbb_root_path . $config['upload_path'] . '/' . $attachment['physical_filename']);
+ file_gc();
+ }
+ else
+ {
+ send_file_to_browser($attachment, $config['upload_path'], $display_cat);
+ file_gc();
+ }
+}
+
+
+/**
+* A simplified function to deliver avatars
+* The argument needs to be checked before calling this function.
+*/
+function send_avatar_to_browser($file, $browser)
+{
+ global $config, $phpbb_root_path;
+
+ $prefix = $config['avatar_salt'] . '_';
+ $image_dir = $config['avatar_path'];
+
+ // Adjust image_dir path (no trailing slash)
+ if (substr($image_dir, -1, 1) == '/' || substr($image_dir, -1, 1) == '\\')
+ {
+ $image_dir = substr($image_dir, 0, -1) . '/';
+ }
+ $image_dir = str_replace(array('../', '..\\', './', '.\\'), '', $image_dir);
+
+ if ($image_dir && ($image_dir[0] == '/' || $image_dir[0] == '\\'))
+ {
+ $image_dir = '';
+ }
+ $file_path = $phpbb_root_path . $image_dir . '/' . $prefix . $file;
+
+ if ((@file_exists($file_path) && @is_readable($file_path)) && !headers_sent())
+ {
+ header('Pragma: public');
+
+ $image_data = @getimagesize($file_path);
+ header('Content-Type: ' . image_type_to_mime_type($image_data[2]));
+
+ if (strpos(strtolower($browser), 'msie') !== false && strpos(strtolower($browser), 'msie 8.0') === false)
+ {
+ header('Content-Disposition: attachment; ' . header_filename($file));
+
+ if (strpos(strtolower($browser), 'msie 6.0') !== false)
+ {
+ header('Expires: -1');
+ }
+ else
+ {
+ header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
+ }
+ }
+ else
+ {
+ header('Content-Disposition: inline; ' . header_filename($file));
+ header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
+ }
+
+ $size = @filesize($file_path);
+ if ($size)
+ {
+ header("Content-Length: $size");
+ }
+
+ if (@readfile($file_path) == false)
+ {
+ $fp = @fopen($file_path, 'rb');
+
+ if ($fp !== false)
+ {
+ while (!feof($fp))
+ {
+ echo fread($fp, 8192);
+ }
+ fclose($fp);
+ }
+ }
+
+ flush();
+ }
+ else
+ {
+ header('HTTP/1.0 404 Not Found');
+ }
+}
+
+/**
+* Wraps an url into a simple html page. Used to display attachments in IE.
+* this is a workaround for now; might be moved to template system later
+* direct any complaints to 1 Microsoft Way, Redmond
+*/
+function wrap_img_in_html($src, $title)
+{
+ echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Strict.dtd">';
+ echo '<html>';
+ echo '<head>';
+ echo '<meta http-equiv="content-type" content="text/html; charset=UTF-8" />';
+ echo '<title>' . $title . '</title>';
+ echo '</head>';
+ echo '<body>';
+ echo '<div>';
+ echo '<img src="' . $src . '" alt="' . $title . '" />';
+ echo '</div>';
+ echo '</body>';
+ echo '</html>';
+}
+
+/**
+* Send file to browser
+*/
+function send_file_to_browser($attachment, $upload_dir, $category)
+{
+ global $user, $db, $config, $phpbb_root_path;
+
+ $filename = $phpbb_root_path . $upload_dir . '/' . $attachment['physical_filename'];
+
+ if (!@file_exists($filename))
+ {
+ trigger_error($user->lang['ERROR_NO_ATTACHMENT'] . '<br /><br />' . sprintf($user->lang['FILE_NOT_FOUND_404'], $filename));
+ }
+
+ // Correct the mime type - we force application/octetstream for all files, except images
+ // Please do not change this, it is a security precaution
+ if ($category != ATTACHMENT_CATEGORY_IMAGE || strpos($attachment['mimetype'], 'image') !== 0)
+ {
+ $attachment['mimetype'] = (strpos(strtolower($user->browser), 'msie') !== false || strpos(strtolower($user->browser), 'opera') !== false) ? 'application/octetstream' : 'application/octet-stream';
+ }
+
+ if (@ob_get_length())
+ {
+ @ob_end_clean();
+ }
+
+ // Now send the File Contents to the Browser
+ $size = @filesize($filename);
+
+ // To correctly display further errors we need to make sure we are using the correct headers for both (unsetting content-length may not work)
+
+ // Check if headers already sent or not able to get the file contents.
+ if (headers_sent() || !@file_exists($filename) || !@is_readable($filename))
+ {
+ // PHP track_errors setting On?
+ if (!empty($php_errormsg))
+ {
+ trigger_error($user->lang['UNABLE_TO_DELIVER_FILE'] . '<br />' . sprintf($user->lang['TRACKED_PHP_ERROR'], $php_errormsg));
+ }
+
+ trigger_error('UNABLE_TO_DELIVER_FILE');
+ }
+
+ // Now the tricky part... let's dance
+ header('Pragma: public');
+
+ /**
+ * Commented out X-Sendfile support. To not expose the physical filename within the header if xsendfile is absent we need to look into methods of checking it's status.
+ *
+ * Try X-Sendfile since it is much more server friendly - only works if the path is *not* outside of the root path...
+ * lighttpd has core support for it. An apache2 module is available at http://celebnamer.celebworld.ws/stuff/mod_xsendfile/
+ *
+ * Not really ideal, but should work fine...
+ * <code>
+ * if (strpos($upload_dir, '/') !== 0 && strpos($upload_dir, '../') === false)
+ * {
+ * header('X-Sendfile: ' . $filename);
+ * }
+ * </code>
+ */
+
+ // Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.
+ $is_ie8 = (strpos(strtolower($user->browser), 'msie 8.0') !== false);
+ header('Content-Type: ' . $attachment['mimetype']);
+
+ if ($is_ie8)
+ {
+ header('X-Content-Type-Options: nosniff');
+ }
+
+ if ($category == ATTACHMENT_CATEGORY_FLASH && request_var('view', 0) === 1)
+ {
+ // We use content-disposition: inline for flash files and view=1 to let it correctly play with flash player 10 - any other disposition will fail to play inline
+ header('Content-Disposition: inline');
+ }
+ else
+ {
+ if (empty($user->browser) || (!$is_ie8 && (strpos(strtolower($user->browser), 'msie') !== false)))
+ {
+ header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
+ if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie 6.0') !== false))
+ {
+ header('expires: -1');
+ }
+ }
+ else
+ {
+ header('Content-Disposition: ' . ((strpos($attachment['mimetype'], 'image') === 0) ? 'inline' : 'attachment') . '; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
+ if ($is_ie8 && (strpos($attachment['mimetype'], 'image') !== 0))
+ {
+ header('X-Download-Options: noopen');
+ }
+ }
+ }
+
+ if ($size)
+ {
+ header("Content-Length: $size");
+ }
+
+ // Close the db connection before sending the file
+ $db->sql_close();
+
+ if (!set_modified_headers($attachment['filetime'], $user->browser))
+ {
+ // Try to deliver in chunks
+ @set_time_limit(0);
+
+ $fp = @fopen($filename, 'rb');
+
+ if ($fp !== false)
+ {
+ while (!feof($fp))
+ {
+ echo fread($fp, 8192);
+ }
+ fclose($fp);
+ }
+ else
+ {
+ @readfile($filename);
+ }
+
+ flush();
+ }
+ file_gc();
+}
+
+/**
+* Get a browser friendly UTF-8 encoded filename
+*/
+function header_filename($file)
+{
+ $user_agent = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : '';
+
+ // There be dragons here.
+ // Not many follows the RFC...
+ if (strpos($user_agent, 'MSIE') !== false || strpos($user_agent, 'Safari') !== false || strpos($user_agent, 'Konqueror') !== false)
+ {
+ return "filename=" . rawurlencode($file);
+ }
+
+ // follow the RFC for extended filename for the rest
+ return "filename*=UTF-8''" . rawurlencode($file);
+}
+
+/**
+* Check if downloading item is allowed
+*/
+function download_allowed()
+{
+ global $config, $user, $db;
+
+ if (!$config['secure_downloads'])
+ {
+ return true;
+ }
+
+ $url = (!empty($_SERVER['HTTP_REFERER'])) ? trim($_SERVER['HTTP_REFERER']) : trim(getenv('HTTP_REFERER'));
+
+ if (!$url)
+ {
+ return ($config['secure_allow_empty_referer']) ? true : false;
+ }
+
+ // Split URL into domain and script part
+ $url = @parse_url($url);
+
+ if ($url === false)
+ {
+ return ($config['secure_allow_empty_referer']) ? true : false;
+ }
+
+ $hostname = $url['host'];
+ unset($url);
+
+ $allowed = ($config['secure_allow_deny']) ? false : true;
+ $iplist = array();
+
+ if (($ip_ary = @gethostbynamel($hostname)) !== false)
+ {
+ foreach ($ip_ary as $ip)
+ {
+ if ($ip)
+ {
+ $iplist[] = $ip;
+ }
+ }
+ }
+
+ // Check for own server...
+ $server_name = $user->host;
+
+ // Forcing server vars is the only way to specify/override the protocol
+ if ($config['force_server_vars'] || !$server_name)
+ {
+ $server_name = $config['server_name'];
+ }
+
+ if (preg_match('#^.*?' . preg_quote($server_name, '#') . '.*?$#i', $hostname))
+ {
+ $allowed = true;
+ }
+
+ // Get IP's and Hostnames
+ if (!$allowed)
+ {
+ $sql = 'SELECT site_ip, site_hostname, ip_exclude
+ FROM ' . SITELIST_TABLE;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $site_ip = trim($row['site_ip']);
+ $site_hostname = trim($row['site_hostname']);
+
+ if ($site_ip)
+ {
+ foreach ($iplist as $ip)
+ {
+ if (preg_match('#^' . str_replace('\*', '.*?', preg_quote($site_ip, '#')) . '$#i', $ip))
+ {
+ if ($row['ip_exclude'])
+ {
+ $allowed = ($config['secure_allow_deny']) ? false : true;
+ break 2;
+ }
+ else
+ {
+ $allowed = ($config['secure_allow_deny']) ? true : false;
+ }
+ }
+ }
+ }
+
+ if ($site_hostname)
+ {
+ if (preg_match('#^' . str_replace('\*', '.*?', preg_quote($site_hostname, '#')) . '$#i', $hostname))
+ {
+ if ($row['ip_exclude'])
+ {
+ $allowed = ($config['secure_allow_deny']) ? false : true;
+ break;
+ }
+ else
+ {
+ $allowed = ($config['secure_allow_deny']) ? true : false;
+ }
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+
+ return $allowed;
+}
+
+/**
+* Check if the browser has the file already and set the appropriate headers-
+* @returns false if a resend is in order.
+*/
+function set_modified_headers($stamp, $browser)
+{
+ // let's see if we have to send the file at all
+ $last_load = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? strtotime(trim($_SERVER['HTTP_IF_MODIFIED_SINCE'])) : false;
+ if ((strpos(strtolower($browser), 'msie 6.0') === false) && (strpos(strtolower($browser), 'msie 8.0') === false))
+ {
+ if ($last_load !== false && $last_load <= $stamp)
+ {
+ if (substr(strtolower(@php_sapi_name()),0,3) === 'cgi')
+ {
+ // in theory, we shouldn't need that due to php doing it. Reality offers a differing opinion, though
+ header('Status: 304 Not Modified', true, 304);
+ }
+ else
+ {
+ header('HTTP/1.0 304 Not Modified', true, 304);
+ }
+ // seems that we need those too ... browsers
+ header('Pragma: public');
+ header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
+ return true;
+ }
+ else
+ {
+ header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $stamp) . ' GMT');
+ }
+ }
+ return false;
+}
+
+function file_gc()
+{
+ global $cache, $db;
+ if (!empty($cache))
+ {
+ $cache->unload();
+ }
+ $db->sql_close();
+ exit;
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/download/index.htm b/phpBB/download/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/download/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/faq.php b/phpBB/faq.php
new file mode 100644
index 0000000000..0a04bad8eb
--- /dev/null
+++ b/phpBB/faq.php
@@ -0,0 +1,89 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup();
+
+$mode = request_var('mode', '');
+
+// Load the appropriate faq file
+switch ($mode)
+{
+ case 'bbcode':
+ $l_title = $user->lang['BBCODE_GUIDE'];
+ $user->add_lang('bbcode', false, true);
+ break;
+
+ default:
+ $l_title = $user->lang['FAQ_EXPLAIN'];
+ $user->add_lang('faq', false, true);
+ break;
+}
+
+// Pull the array data from the lang pack
+$switch_column = $found_switch = false;
+$help_blocks = array();
+foreach ($user->help as $help_ary)
+{
+ if ($help_ary[0] == '--')
+ {
+ if ($help_ary[1] == '--')
+ {
+ $switch_column = true;
+ $found_switch = true;
+ continue;
+ }
+
+ $template->assign_block_vars('faq_block', array(
+ 'BLOCK_TITLE' => $help_ary[1],
+ 'SWITCH_COLUMN' => $switch_column,
+ ));
+
+ if ($switch_column)
+ {
+ $switch_column = false;
+ }
+ continue;
+ }
+
+ $template->assign_block_vars('faq_block.faq_row', array(
+ 'FAQ_QUESTION' => $help_ary[0],
+ 'FAQ_ANSWER' => $help_ary[1])
+ );
+}
+
+// Lets build a page ...
+$template->assign_vars(array(
+ 'L_FAQ_TITLE' => $l_title,
+ 'L_BACK_TO_TOP' => $user->lang['BACK_TO_TOP'],
+
+ 'SWITCH_COLUMN_MANUALLY' => (!$found_switch) ? true : false,
+));
+
+page_header($l_title, false);
+
+$template->set_filenames(array(
+ 'body' => 'faq_body.html')
+);
+make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
+
+page_footer();
+
+?> \ No newline at end of file
diff --git a/phpBB/feed.php b/phpBB/feed.php
new file mode 100644
index 0000000000..a6206d9203
--- /dev/null
+++ b/phpBB/feed.php
@@ -0,0 +1,1064 @@
+<?php
+/**
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2009 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+* Idea and original RSS Feed 2.0 MOD (Version 1.0.8/9) by leviatan21
+* Original MOD: http://www.phpbb.com/community/viewtopic.php?f=69&t=1214645
+* MOD Author Profile: http://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=345763
+* MOD Author Homepage: http://www.mssti.com/phpbb3/
+*
+**/
+
+/**
+* @ignore
+**/
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+
+if (!$config['feed_enable'])
+{
+ trigger_error('NO_FEED_ENABLED');
+}
+
+// Start session
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup();
+
+// Initial var setup
+$forum_id = request_var('f', 0);
+$topic_id = request_var('t', 0);
+$mode = request_var('mode', '');
+
+// Feed date format for PHP > 5 and PHP4
+$feed_date_format = (PHP_VERSION >= 5) ? 'c' : "Y-m-d\TH:i:sO";
+$params = false;
+
+// We do not use a template, therefore we simply define the global template variables here
+$global_vars = $item_vars = array();
+
+// Generate params array for use in append_sid() to correctly link back to this page
+if ($forum_id || $topic_id || $mode)
+{
+ $params = array(
+ 'f' => ($forum_id) ? $forum_id : NULL,
+ 't' => ($topic_id) ? $topic_id : NULL,
+ 'mode' => ($mode) ? $mode : NULL,
+ );
+}
+
+// This boards URL
+$board_url = generate_board_url();
+
+// Get correct feed object
+$feed = phpbb_feed_factory::init($mode, $forum_id, $topic_id);
+
+// No feed found
+if ($feed === false)
+{
+ trigger_error('NO_FEED');
+}
+
+// Open Feed
+$feed->open();
+
+// Some default assignments
+// FEED_IMAGE is not used (atom)
+$global_vars = array(
+ 'FEED_IMAGE' => ($user->img('site_logo', '', false, '', 'src')) ? $board_url . '/' . substr($user->img('site_logo', '', false, '', 'src'), strlen($phpbb_root_path)) : '',
+ 'SELF_LINK' => feed_append_sid('/feed.' . $phpEx, $params),
+ 'FEED_LINK' => $board_url . '/index.' . $phpEx,
+ 'FEED_TITLE' => $config['sitename'],
+ 'FEED_SUBTITLE' => $config['site_desc'],
+ 'FEED_UPDATED' => $user->format_date(time(), $feed_date_format, true),
+ 'FEED_LANG' => $user->lang['USER_LANG'],
+ 'FEED_AUTHOR' => $config['sitename'],
+);
+
+// Iterate through items
+while ($row = $feed->get_item())
+{
+ // BBCode options to correctly disable urls, smilies, bbcode...
+ if ($feed->get('options') === NULL)
+ {
+ // Allow all combinations
+ $options = 7;
+
+ if ($feed->get('enable_bbcode') !== NULL && $feed->get('enable_smilies') !== NULL && $feed->get('enable_magic_url') !== NULL)
+ {
+ $options = (($row[$feed->get('enable_bbcode')]) ? OPTION_FLAG_BBCODE : 0) + (($row[$feed->get('enable_smilies')]) ? OPTION_FLAG_SMILIES : 0) + (($row[$feed->get('enable_magic_url')]) ? OPTION_FLAG_LINKS : 0);
+ }
+ }
+ else
+ {
+ $options = $row[$feed->get('options')];
+ }
+
+ $title = ($row[$feed->get('title')]) ? $row[$feed->get('title')] : ((isset($row[$feed->get('title2')])) ? $row[$feed->get('title2')] : '');
+ $title = censor_text($title);
+
+ $item_row = array(
+ 'author' => ($feed->get('creator') !== NULL) ? $row[$feed->get('creator')] : '',
+ 'pubdate' => $user->format_date($row[$feed->get('date')], $feed_date_format, true),
+ 'link' => '',
+ 'title' => censor_text($title),
+ 'category' => ($config['feed_item_statistics']) ? $board_url . '/viewforum.' . $phpEx . '?f=' . $row['forum_id'] : '',
+ 'category_name' => ($config['feed_item_statistics']) ? utf8_htmlspecialchars($row['forum_name']) : '',
+ 'description' => censor_text(feed_generate_content($row[$feed->get('text')], $row[$feed->get('bbcode_uid')], $row[$feed->get('bitfield')], $options)),
+ 'statistics' => '',
+ );
+
+ // Adjust items, fill link, etc.
+ $feed->adjust_item($item_row, $row);
+
+ $item_vars[] = $item_row;
+}
+
+$feed->close();
+
+// Output page
+
+// gzip_compression
+if ($config['gzip_compress'])
+{
+ if (@extension_loaded('zlib') && !headers_sent())
+ {
+ ob_start('ob_gzhandler');
+ }
+}
+
+// IF debug extra is enabled and admin want to "explain" the page we need to set other headers...
+if (!defined('DEBUG_EXTRA') || !request_var('explain', 0) || !$auth->acl_get('a_'))
+{
+ header("Content-Type: application/atom+xml; charset=UTF-8");
+ header("Last-Modified: " . gmdate('D, d M Y H:i:s', time()) . ' GMT');
+}
+else
+{
+ header('Content-type: text/html; charset=UTF-8');
+ header('Cache-Control: private, no-cache="set-cookie"');
+ header('Expires: 0');
+ header('Pragma: no-cache');
+
+ $mtime = explode(' ', microtime());
+ $totaltime = $mtime[0] + $mtime[1] - $starttime;
+
+ if (method_exists($db, 'sql_report'))
+ {
+ $db->sql_report('display');
+ }
+
+ garbage_collection();
+ exit_handler();
+}
+
+echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
+echo '<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="' . $global_vars['FEED_LANG'] . '">' . "\n";
+echo '<link rel="self" type="application/atom+xml" href="' . $global_vars['SELF_LINK'] . '" />' . "\n\n";
+
+echo (!empty($global_vars['FEED_TITLE'])) ? '<title>' . $global_vars['FEED_TITLE'] . '</title>' . "\n" : '';
+echo (!empty($global_vars['FEED_SUBTITLE'])) ? '<subtitle>' . $global_vars['FEED_SUBTITLE'] . '</subtitle>' . "\n" : '';
+echo (!empty($global_vars['FEED_LINK'])) ? '<link href="' . $global_vars['FEED_LINK'] .'" />' . "\n" : '';
+echo '<updated>' . $global_vars['FEED_UPDATED'] . '</updated>' . "\n\n";
+
+echo '<author><name><![CDATA[' . $global_vars['FEED_AUTHOR'] . ']]></name></author>' . "\n";
+echo '<id>' . $global_vars['SELF_LINK'] . '</id>' . "\n";
+
+foreach ($item_vars as $row)
+{
+ echo '<entry>' . "\n";
+
+ if (!empty($row['author']))
+ {
+ echo '<author><name><![CDATA[' . $row['author'] . ']]></name></author>' . "\n";
+ }
+
+ echo '<updated>' . $row['pubdate'] . '</updated>' . "\n";
+ echo '<id>' . $row['link'] . '</id>' . "\n";
+ echo '<link href="' . $row['link'] . '"/>' . "\n";
+ echo '<title type="html"><![CDATA[' . $row['title'] . ']]></title>' . "\n\n";
+
+ if (!empty($row['category']))
+ {
+ echo '<category term="' . $row['category_name'] . '" scheme="' . $row['category'] . '" label="' . $row['category_name'] . '"/>' . "\n";
+ }
+
+ echo '<content type="html" xml:base="' . $row['link'] . '"><![CDATA[' . "\n";
+ echo $row['description'];
+
+ if (!empty($row['statistics']))
+ {
+ echo '<p>' . $user->lang['STATISTICS'] . ': ' . $row['statistics'] . '</p>';
+ }
+
+ echo '<hr /></div>' . "\n" . ']]></content>' . "\n";
+ echo '</entry>' . "\n";
+}
+
+echo '</feed>';
+
+garbage_collection();
+exit_handler();
+
+/**
+* Run links through append_sid(), prepend generate_board_url() and remove session id
+**/
+function feed_append_sid($url, $params)
+{
+ global $board_url;
+
+ $link = append_sid($board_url . $url, $params);
+
+ // Remove added sid - not as easy as it sounds. ;)
+ $link = (strpos($link, 'sid=') !== false) ? trim(preg_replace('/(&amp;|&|\?)sid=[a-z0-9]+(&amp;|&)?/', '\1', $link), '?& ') : $link;
+
+ // Now the only thing remaining could be an empty &amp;
+ $link = (substr($link, -5) === '&amp;') ? substr($link, 0, -5) : $link;
+ // And &amp;#xxx
+ $link = str_replace('&amp;#', '#', $link);
+
+ return $link;
+}
+
+/**
+* Generate text content
+**/
+function feed_generate_content($content, $uid, $bitfield, $options)
+{
+ global $user, $config, $phpbb_root_path, $phpEx, $board_url;
+
+ if (empty($content))
+ {
+ return '';
+ }
+
+ // Prepare some bbcodes for better parsing
+ $content = preg_replace("#\[quote(=&quot;.*?&quot;)?:$uid\]\s*(.*?)\s*\[/quote:$uid\]#si", "[quote$1:$uid]<br />$2<br />[/quote:$uid]", $content);
+
+ $content = generate_text_for_display($content, $uid, $bitfield, $options);
+
+ // Add newlines
+ $content = str_replace('<br />', '<br />' . "\n", $content);
+
+ // Relative Path to Absolute path, Windows style
+ $content = str_replace('./', $board_url . '/', $content);
+
+ // Remove "Select all" link and mouse events
+ $content = str_replace('<a href="#" onclick="selectCode(this); return false;">' . $user->lang['SELECT_ALL_CODE'] . '</a>', '', $content);
+ $content = preg_replace('#(onkeypress|onclick)="(.*?)"#si', '', $content);
+
+ // Firefox does not support CSS for feeds, though
+
+ // Remove font sizes
+// $content = preg_replace('#<span style="font-size: [0-9]+%; line-height: [0-9]+%;">([^>]+)</span>#iU', '\1', $content);
+
+ // Make text strong :P
+// $content = preg_replace('#<span style="font-weight: bold?">(.*?)</span>#iU', '<strong>\1</strong>', $content);
+
+ // Italic
+// $content = preg_replace('#<span style="font-style: italic?">([^<]+)</span>#iU', '<em>\1</em>', $content);
+
+ // Underline
+// $content = preg_replace('#<span style="text-decoration: underline?">([^<]+)</span>#iU', '<u>\1</u>', $content);
+
+ // Remove embed Windows Media Streams
+ $content = preg_replace( '#<\!--\[if \!IE\]>-->([^[]+)<\!--<!\[endif\]-->#si', '', $content);
+
+ // Do not use &lt; and &gt;, because we want to retain code contained in [code][/code]
+
+ // Remove embed and objects
+ $content = preg_replace( '#<(object|embed)(.*?) (value|src)=(.*?) ([^[]+)(object|embed)>#si',' <a href=$4 target="_blank"><strong>$1</strong></a> ',$content);
+
+ // Remove some specials html tag, because somewhere there are a mod to allow html tags ;)
+ $content = preg_replace( '#<(script|iframe)([^[]+)\1>#siU', ' <strong>$1</strong> ', $content);
+
+ // Remove Comments from inline attachments [ia]
+ $content = preg_replace('#<div class="(inline-attachment|attachtitle)">(.*?)<!-- ia(.*?) -->(.*?)<!-- ia(.*?) -->(.*?)</div>#si','$4',$content);
+
+ // Replace some entities with their unicode counterpart
+ $entities = array(
+ '&nbsp;' => "\xC2\xA0",
+ '&bull;' => "\xE2\x80\xA2",
+ '&middot;' => "\xC2\xB7",
+ '&copy;' => "\xC2\xA9",
+ );
+
+ $content = str_replace(array_keys($entities), array_values($entities), $content);
+
+ // Remove CDATA blocks. ;)
+ $content = preg_replace('#\<\!\[CDATA\[(.*?)\]\]\>#s', '', $content);
+
+ // Other control characters
+ // $content = preg_replace('#(?:[\x00-\x1F\x7F]+|(?:\xC2[\x80-\x9F])+)#', '', $content);
+
+ return $content;
+}
+
+/**
+* Factory class to return correct object
+* @package phpBB3
+*/
+class phpbb_feed_factory
+{
+ /**
+ * Return correct object for specified mode
+ *
+ * @param string $mode The feeds mode.
+ * @param int $forum_id Forum id specified by the script if forum feed provided.
+ * @param int $topic_id Topic id specified by the script if topic feed provided.
+ *
+ * @return object Returns correct feeds object for specified mode.
+ */
+ function init($mode, $forum_id, $topic_id)
+ {
+ global $config;
+
+ switch ($mode)
+ {
+ case 'forums':
+ if (!$config['feed_overall_forums'])
+ {
+ return false;
+ }
+
+ return new phpbb_feed_forums();
+ break;
+
+ case 'topics':
+ if (!$config['feed_overall_topics'])
+ {
+ return false;
+ }
+
+ return new phpbb_feed_topics();
+ break;
+
+ case 'news':
+ global $db;
+
+ // Get at least one news forum
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db->sql_bit_and('forum_options', FORUM_OPTION_FEED_NEWS, '<> 0');
+ $result = $db->sql_query_limit($sql, 1, 0, 600);
+ $s_feed_news = (int) $db->sql_fetchfield('forum_id');
+ $db->sql_freeresult($result);
+
+ if (!$s_feed_news)
+ {
+ return false;
+ }
+
+ return new phpbb_feed_news();
+ break;
+
+ default:
+ // Forum and/or topic specified?
+ if ($topic_id && !$config['feed_topic'])
+ {
+ return false;
+ }
+
+ if ($forum_id && !$topic_id && !$config['feed_forum'])
+ {
+ return false;
+ }
+
+ return new phpbb_feed($forum_id, $topic_id);
+ break;
+ }
+ }
+}
+
+/**
+* Base/default Feed class if no mode is specified.
+* This can be the overall site feed or a forum/topic feed.
+* @package phpBB3
+*/
+class phpbb_feed
+{
+ /**
+ * Forum id specified for forum feed.
+ */
+ var $forum_id = 0;
+
+ /**
+ * Topic id specified for topic feed.
+ */
+ var $topic_id = 0;
+
+ /**
+ * SQL Query to be executed to get feed items
+ */
+ var $sql;
+
+ /**
+ * Keys specified for retrieval of title, content, etc.
+ */
+ var $keys = array();
+
+ /**
+ * An array of excluded forum ids.
+ */
+ var $excluded_forums_ary = NULL;
+
+ /**
+ * Number of items to fetch
+ */
+ var $num_items;
+
+ /**
+ * boolean to determine if items array is filled or not
+ */
+ var $items_filled = false;
+
+ /**
+ * array holding items
+ */
+ var $items = array();
+
+ /**
+ * Default setting for last x days
+ */
+ var $sort_days = 30;
+
+ /**
+ * Default cache time of entries in seconds
+ */
+ var $cache_time = 300;
+
+ /**
+ * Separator for title elements to separate items (for example forum / topic)
+ */
+ var $separator = "\xE2\x80\xA2"; // &bull;
+
+ /**
+ * Constructor. Set standard keys.
+ */
+ function phpbb_feed($forum_id = 0, $topic_id = 0)
+ {
+ global $config;
+
+ $this->forum_id = $forum_id;
+ $this->topic_id = $topic_id;
+
+ $this->sql = array();
+
+ // Set some values for pagination
+ $this->num_items = (int) $config['feed_limit'];
+ $this->set_keys();
+ }
+
+ function set_keys()
+ {
+ // Set keys for items...
+ $this->set('title', 'post_subject');
+ $this->set('title2', 'topic_title');
+ $this->set('author_id', 'user_id');
+ $this->set('creator', 'username');
+ $this->set('text', 'post_text');
+ $this->set('bitfield', 'bbcode_bitfield');
+ $this->set('bbcode_uid','bbcode_uid');
+ $this->set('date', 'post_time');
+
+ $this->set('enable_bbcode', 'enable_bbcode');
+ $this->set('enable_smilies', 'enable_smilies');
+ $this->set('enable_magic_url', 'enable_magic_url');
+ }
+
+ function open()
+ {
+ if (!$this->forum_id && !$this->topic_id)
+ {
+ return;
+ }
+ else if ($this->forum_id && !$this->topic_id)
+ {
+ global $db, $user, $global_vars;
+
+ $sql = 'SELECT forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $this->forum_id;
+ $result = $db->sql_query($sql);
+
+ $global_vars['FEED_MODE'] = $user->lang['FORUM'] . ': ' . $db->sql_fetchfield('forum_name');
+
+ $db->sql_freeresult($result);
+ }
+ else if ($this->topic_id)
+ {
+ global $db, $user, $global_vars;
+
+ $sql = 'SELECT topic_title
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_id = ' . $this->topic_id;
+ $result = $db->sql_query($sql);
+
+ $global_vars['FEED_MODE'] = $user->lang['TOPIC'] . ': ' . $db->sql_fetchfield('topic_title');
+
+ $db->sql_freeresult($result);
+ }
+ }
+
+ function close()
+ {
+ if (!empty($this->result))
+ {
+ global $db;
+
+ $db->sql_freeresult($this->result);
+ }
+ }
+
+ /**
+ * Set key
+ */
+ function set($key, $value)
+ {
+ $this->keys[$key] = $value;
+ }
+
+ /**
+ * Get key
+ */
+ function get($key)
+ {
+ return (isset($this->keys[$key])) ? $this->keys[$key] : NULL;
+ }
+
+ /**
+ * Return array of excluded forums
+ */
+ function excluded_forums()
+ {
+ if ($this->excluded_forums_ary !== NULL)
+ {
+ return $this->excluded_forums_ary;
+ }
+
+ global $auth, $db, $config, $phpbb_root_path, $phpEx, $user;
+
+ // Which forums should not be searched ?
+ $exclude_forums = array();
+
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db->sql_bit_and('forum_options', FORUM_OPTION_FEED_EXCLUDE, '<> 0');
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $exclude_forums[] = (int) $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // Exclude forums the user is not able to read
+ $this->excluded_forums_ary = array_keys($auth->acl_getf('!f_read', true));
+ $this->excluded_forums_ary = (sizeof($exclude_forums)) ? array_merge($exclude_forums, $this->excluded_forums_ary) : $this->excluded_forums_ary;
+
+ $not_in_fid = (sizeof($this->excluded_forums_ary)) ? 'WHERE (' . $db->sql_in_set('f.forum_id', $this->excluded_forums_ary, true) . ' AND ' . $db->sql_in_set('f.parent_id', $this->excluded_forums_ary, true) . ") OR (f.forum_password <> '' AND fa.user_id <> " . (int) $user->data['user_id'] . ')' : '';
+
+ $sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.right_id, f.forum_password, fa.user_id
+ FROM ' . FORUMS_TABLE . ' f
+ LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa ON (fa.forum_id = f.forum_id
+ AND fa.session_id = '" . $db->sql_escape($user->session_id) . "')
+ $not_in_fid
+ ORDER BY f.left_id";
+ $result = $db->sql_query($sql);
+
+ $right_id = 0;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // Exclude passworded forum completely
+ if ($row['forum_password'] && $row['user_id'] != $user->data['user_id'])
+ {
+ $this->excluded_forums_ary[] = (int) $row['forum_id'];
+ continue;
+ }
+
+ if ($row['right_id'] > $right_id)
+ {
+ $right_id = (int) $row['right_id'];
+ }
+ else if ($row['right_id'] < $right_id)
+ {
+ continue;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ return $this->excluded_forums_ary;
+ }
+
+ /**
+ * Get SQL query for fetching items
+ */
+ function get_sql()
+ {
+ global $db;
+
+ $post_ids = array();
+
+ // Search for topics in last X days
+ $last_post_time_sql = ($this->sort_days) ? ' AND t.topic_last_post_time > ' . (time() - ($this->sort_days * 24 * 3600)) : '';
+
+ // Fetch latest post, grouped by topic...
+ if (!$this->forum_id && !$this->topic_id)
+ {
+ // First of all, the post ids...
+ $not_in_fid = (sizeof($this->excluded_forums())) ? ' AND ' . $db->sql_in_set('t.forum_id', $this->excluded_forums(), true) : '';
+
+ $sql = 'SELECT t.topic_last_post_id
+ FROM ' . TOPICS_TABLE . ' t
+ WHERE t.topic_approved = 1
+ AND t.topic_moved_id = 0' .
+ $not_in_fid .
+ $last_post_time_sql . '
+ ORDER BY t.topic_last_post_time DESC';
+ $result = $db->sql_query_limit($sql, $this->num_items);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_ids[] = (int) $row['topic_last_post_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+ // Fetch latest posts from forum
+ else if (!$this->topic_id && $this->forum_id)
+ {
+ // Make sure the forum is not listed within the forbidden ones. ;)
+ if (in_array($this->forum_id, $this->excluded_forums()))
+ {
+ return false;
+ }
+
+ // Determine which forums to fetch
+ $not_in_fid = (sizeof($this->excluded_forums())) ? ' AND ' . $db->sql_in_set('f1.forum_id', $this->excluded_forums(), true) : '';
+
+ // Determine forum childs...
+ $sql = 'SELECT f2.forum_id
+ FROM ' . FORUMS_TABLE . ' f1, ' . FORUMS_TABLE . ' f2
+ WHERE f1.forum_id = ' . $this->forum_id . '
+ AND (f2.left_id BETWEEN f1.left_id AND f1.right_id' . $not_in_fid . ')';
+ $result = $db->sql_query($sql);
+
+ $forum_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_ids[] = (int) $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // Now select from forums...
+ $sql = 'SELECT t.topic_last_post_id
+ FROM ' . TOPICS_TABLE . ' t
+ WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
+ AND t.topic_approved = 1
+ AND t.topic_moved_id = 0' .
+ $last_post_time_sql . '
+ ORDER BY t.topic_last_post_time DESC';
+ $result = $db->sql_query_limit($sql, $this->num_items);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_ids[] = (int) $row['topic_last_post_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+ // Fetch last posts from specified topic...
+ else if ($this->topic_id)
+ {
+ // First of all, determine the forum...
+ $sql = 'SELECT forum_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_id = ' . $this->topic_id;
+ $result = $db->sql_query_limit($sql, 1);
+ $this->forum_id = (int) $db->sql_fetchfield('forum_id');
+ $db->sql_freeresult($result);
+
+ // non-global announcement
+ if ($this->forum_id && in_array($this->forum_id, $this->excluded_forums()))
+ {
+ return false;
+ }
+
+ $sql = 'SELECT post_id
+ FROM ' . POSTS_TABLE . '
+ WHERE topic_id = ' . $this->topic_id . '
+ AND post_approved = 1
+ ORDER BY post_time DESC';
+ $result = $db->sql_query_limit($sql, $this->num_items);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_ids[] = (int) $row['post_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (!sizeof($post_ids))
+ {
+ return false;
+ }
+
+ // Now build sql query for obtaining items
+ $this->sql = array(
+ 'SELECT' => 'f.forum_id, f.forum_name, f.forum_desc_options, ' .
+ 't.topic_last_post_time, t.topic_id, t.topic_title, t.topic_time, t.topic_replies, t.topic_views, ' .
+ 'p.post_id, p.post_time, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, ' .
+ 'u.username, u.user_id, u.user_email, u.user_colour',
+ 'FROM' => array(
+ POSTS_TABLE => 'p',
+ TOPICS_TABLE => 't',
+ FORUMS_TABLE => 'f',
+ USERS_TABLE => 'u',
+ ),
+ 'WHERE' => $db->sql_in_set('p.post_id', $post_ids) . '
+ AND f.forum_id = p.forum_id
+ AND t.topic_id = p.topic_id
+ AND u.user_id = p.poster_id',
+ 'ORDER_BY' => 'p.post_time DESC',
+ );
+
+ return true;
+ }
+
+ function get_item()
+ {
+ global $db, $cache;
+
+ // Disable cache if it is not a guest or a bot but a registered user
+ if ($this->cache_time)
+ {
+ global $user;
+
+ // We check this here because we call get_item() quite often
+ if (!empty($user) && $user->data['is_registered'])
+ {
+ $this->cache_time = 0;
+ }
+ }
+
+ if (!$this->cache_time)
+ {
+ if (empty($this->result))
+ {
+ if (!$this->get_sql())
+ {
+ return false;
+ }
+
+ // Query database
+ $sql = $db->sql_build_query('SELECT', $this->sql);
+ $this->result = $db->sql_query_limit($sql, $this->num_items);
+ }
+
+ return $db->sql_fetchrow($this->result);
+ }
+ else
+ {
+ if (empty($this->items_filled))
+ {
+ // Try to load result set...
+ $cache_filename = substr(get_class($this), strlen('phpbb_'));
+
+ if (($this->items = $cache->get('_' . $cache_filename)) === false)
+ {
+ $this->items = array();
+
+ if ($this->get_sql())
+ {
+ // Query database
+ $sql = $db->sql_build_query('SELECT', $this->sql);
+ $result = $db->sql_query_limit($sql, $this->num_items);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $this->items[] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ $cache->put('_' . $cache_filename, $this->items, $this->cache_time);
+ }
+
+ $this->items_filled = true;
+ }
+
+ $row = array_shift($this->items);
+ return (!$row) ? false : $row;
+ }
+ }
+
+ function adjust_item(&$item_row, &$row)
+ {
+ global $phpEx, $config;
+
+ $item_row['title'] = (!$this->topic_id) ? $row['forum_name'] . ' ' . $this->separator . ' ' . $item_row['title'] : $item_row['title'];
+ $item_row['link'] = feed_append_sid('/viewtopic.' . $phpEx, "t={$row['topic_id']}&amp;p={$row['post_id']}#p{$row['post_id']}");
+
+ if ($config['feed_item_statistics'])
+ {
+ global $user;
+
+ $user_link = '<a href="' . feed_append_sid('/memberlist.' . $phpEx, 'mode=viewprofile&amp;u=' . $row['user_id']) . '">' . $row['username'] . '</a>';
+
+ $time = ($this->topic_id) ? $row['post_time'] : $row['topic_time'];
+
+ $item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $user_link . ' - ' . $user->format_date($time). ' - ' . $user->lang['REPLIES'] . ' ' . $row['topic_replies'] . ' - ' . $user->lang['VIEWS'] . ' ' . $row['topic_views'];
+ }
+ }
+}
+
+class phpbb_feed_forums extends phpbb_feed
+{
+ function set_keys()
+ {
+ global $config;
+
+ $this->set('title', 'forum_name');
+ $this->set('text', 'forum_desc');
+ $this->set('bitfield', 'forum_desc_bitfield');
+ $this->set('bbcode_uid','forum_desc_uid');
+ $this->set('date', 'forum_last_post_time');
+ $this->set('options', 'forum_desc_options');
+
+ $this->num_items = (int) $config['feed_overall_forums_limit'];
+ }
+
+ function open()
+ {
+ global $user, $global_vars;
+
+ $global_vars['FEED_MODE'] = $user->lang['FORUMS'];
+ }
+
+ function get_sql()
+ {
+ global $db;
+
+ $not_in_fid = (sizeof($this->excluded_forums())) ? ' AND ' . $db->sql_in_set('f.forum_id', $this->excluded_forums(), true) : '';
+
+ // Build SQL Query
+ $this->sql = array(
+ 'SELECT' => 'f.*',
+ 'FROM' => array(FORUMS_TABLE => 'f'),
+ 'WHERE' => 'f.forum_type = ' . FORUM_POST . '
+ AND (f.forum_last_post_id > 0' . $not_in_fid . ')',
+ 'ORDER_BY' => 'f.left_id',
+ );
+
+ return true;
+ }
+
+ function adjust_item(&$item_row, &$row)
+ {
+ global $phpEx, $config;
+
+ $item_row['link'] = feed_append_sid('/viewforum.' . $phpEx, 'f=' . $row['forum_id']);
+
+ if ($config['feed_item_statistics'])
+ {
+ global $user;
+
+ $item_row['statistics'] = sprintf($user->lang['TOTAL_TOPICS_OTHER'], $row['forum_topics']) . ' - ' . sprintf($user->lang['TOTAL_POSTS_OTHER'], $row['forum_posts']);
+ }
+ }
+}
+
+class phpbb_feed_news extends phpbb_feed
+{
+ function set_keys()
+ {
+ global $config;
+
+ $this->set('title', 'topic_title');
+ $this->set('title2', 'forum_name');
+ $this->set('author_id', 'topic_poster');
+ $this->set('creator', 'topic_first_poster_name');
+ $this->set('text', 'post_text');
+ $this->set('bitfield', 'bbcode_bitfield');
+ $this->set('bbcode_uid','bbcode_uid');
+ $this->set('date', 'topic_time');
+
+ $this->set('enable_bbcode', 'enable_bbcode');
+ $this->set('enable_smilies', 'enable_smilies');
+ $this->set('enable_magic_url', 'enable_magic_url');
+
+ $this->num_items = (int) $config['feed_overall_forums_limit'];
+ }
+
+ function open()
+ {
+ global $user, $global_vars;
+
+ $global_vars['FEED_MODE'] = $user->lang['FEED_NEWS'];
+ }
+
+ function get_sql()
+ {
+ global $db, $config;
+
+ // Get news forums...
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db->sql_bit_and('forum_options', FORUM_OPTION_FEED_NEWS, '<> 0');
+ $result = $db->sql_query($sql);
+
+ $in_fid_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $in_fid_ary[] = (int) $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($in_fid_ary))
+ {
+ return false;
+ }
+
+ // Build SQL Query
+ $this->sql = array(
+ 'SELECT' => 'f.forum_id, f.forum_password, f.forum_name, f.forum_topics, f.forum_posts, f.parent_id, f.left_id, f.right_id,
+ t.topic_id, t.topic_title, t.topic_poster, t.topic_first_poster_name, t.topic_replies, t.topic_views, t.topic_time,
+ p.post_id, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url,
+ u.username, u.user_id, u.user_email, u.user_colour',
+ 'FROM' => array(
+ TOPICS_TABLE => 't',
+ FORUMS_TABLE => 'f',
+ POSTS_TABLE => 'p',
+ USERS_TABLE => 'u',
+ ),
+ 'WHERE' => $db->sql_in_set('t.forum_id', $in_fid_ary) . '
+ AND f.forum_id = t.forum_id
+ AND p.post_id = t.topic_first_post_id
+ AND t.topic_poster = u.user_id
+ AND t.topic_moved_id = 0',
+ 'ORDER_BY' => 't.topic_time DESC',
+ );
+
+ return true;
+ }
+
+ function adjust_item(&$item_row, &$row)
+ {
+ global $phpEx, $config;
+
+ $item_row['link'] = feed_append_sid('/viewtopic.' . $phpEx, 't=' . $row['topic_id'] . '&amp;p=' . $row['post_id'] . '#p' . $row['post_id']);
+
+ if ($config['feed_item_statistics'])
+ {
+ global $user;
+
+ $user_link = '<a href="' . feed_append_sid('/memberlist.' . $phpEx, 'mode=viewprofile&amp;u=' . $row[$this->get('author_id')]) . '">' . $row[$this->get('creator')] . '</a>';
+
+ $item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $user_link . ' - ' . $user->format_date($row['topic_time']). ' - ' . $user->lang['REPLIES'] . ' ' . $row['topic_replies'] . ' - ' . $user->lang['VIEWS'] . ' ' . $row['topic_views'];
+ }
+ }
+}
+
+class phpbb_feed_topics extends phpbb_feed
+{
+ function set_keys()
+ {
+ global $config;
+
+ $this->set('title', 'topic_title');
+ $this->set('title2', 'forum_name');
+ $this->set('author_id', 'topic_poster');
+ $this->set('creator', 'topic_first_poster_name');
+ $this->set('text', 'post_text');
+ $this->set('bitfield', 'bbcode_bitfield');
+ $this->set('bbcode_uid','bbcode_uid');
+ $this->set('date', 'topic_time');
+
+ $this->set('enable_bbcode', 'enable_bbcode');
+ $this->set('enable_smilies', 'enable_smilies');
+ $this->set('enable_magic_url', 'enable_magic_url');
+
+ $this->num_items = (int) $config['feed_overall_topics_limit'];
+ }
+
+ function open()
+ {
+ global $user, $global_vars;
+
+ $global_vars['FEED_MODE'] = $user->lang['TOPICS'];
+ }
+
+ function get_sql()
+ {
+ global $db, $config;
+
+ $post_ids = array();
+ $not_in_fid = (sizeof($this->excluded_forums())) ? ' AND ' . $db->sql_in_set('t.forum_id', $this->excluded_forums(), true) : '';
+
+ // Search for topics in last x days
+ $last_post_time_sql = ($this->sort_days) ? ' AND t.topic_last_post_time > ' . (time() - ($this->sort_days * 24 * 3600)) : '';
+
+ // Last x topics from all forums, with first post from topic...
+ $sql = 'SELECT t.topic_first_post_id
+ FROM ' . TOPICS_TABLE . ' t
+ WHERE t.topic_approved = 1
+ AND t.topic_moved_id = 0' .
+ $not_in_fid .
+ $last_post_time_sql . '
+ ORDER BY t.topic_last_post_time DESC';
+ $result = $db->sql_query_limit($sql, $this->num_items);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_ids[] = (int) $row['topic_first_post_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($post_ids))
+ {
+ return false;
+ }
+
+ $this->sql = array(
+ 'SELECT' => 'f.forum_id, f.forum_password, f.forum_name, f.forum_topics, f.forum_posts, f.parent_id, f.left_id, f.right_id,
+ t.topic_id, t.topic_title, t.topic_poster, t.topic_first_poster_name, t.topic_replies, t.topic_views, t.topic_time,
+ p.post_id, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url,
+ u.username, u.user_id, u.user_email, u.user_colour',
+ 'FROM' => array(
+ TOPICS_TABLE => 't',
+ FORUMS_TABLE => 'f',
+ POSTS_TABLE => 'p',
+ USERS_TABLE => 'u',
+ ),
+ 'WHERE' => $db->sql_in_set('p.post_id', $post_ids) . '
+ AND f.forum_id = p.forum_id
+ AND t.topic_id = p.topic_id
+ AND u.user_id = p.poster_id',
+ 'ORDER_BY' => 't.topic_last_post_time DESC',
+ );
+
+ return true;
+ }
+
+ function adjust_item(&$item_row, &$row)
+ {
+ global $phpEx, $config;
+
+ $item_row['link'] = feed_append_sid('/viewtopic.' . $phpEx, 't=' . $row['topic_id'] . '&amp;p=' . $row['post_id'] . '#p' . $row['post_id']);
+
+ if ($config['feed_item_statistics'])
+ {
+ global $user;
+
+ $user_link = '<a href="' . feed_append_sid('/memberlist.' . $phpEx, 'mode=viewprofile&amp;u=' . $row[$this->get('author_id')]) . '">' . $row[$this->get('creator')] . '</a>';
+
+ $item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $user_link . ' - ' . $user->format_date($row['topic_time']). ' - ' . $user->lang['REPLIES'] . ' ' . $row['topic_replies'] . ' - ' . $user->lang['VIEWS'] . ' ' . $row['topic_views'];
+ }
+ }
+}
+
+
+?> \ No newline at end of file
diff --git a/phpBB/files/.htaccess b/phpBB/files/.htaccess
new file mode 100644
index 0000000000..aa5afc1640
--- /dev/null
+++ b/phpBB/files/.htaccess
@@ -0,0 +1,4 @@
+<Files *>
+ Order Allow,Deny
+ Deny from All
+</Files> \ No newline at end of file
diff --git a/phpBB/files/index.htm b/phpBB/files/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/files/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/images/avatars/gallery/index.htm b/phpBB/images/avatars/gallery/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/images/avatars/gallery/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/images/avatars/index.htm b/phpBB/images/avatars/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/images/avatars/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/images/avatars/upload/.htaccess b/phpBB/images/avatars/upload/.htaccess
new file mode 100644
index 0000000000..aa5afc1640
--- /dev/null
+++ b/phpBB/images/avatars/upload/.htaccess
@@ -0,0 +1,4 @@
+<Files *>
+ Order Allow,Deny
+ Deny from All
+</Files> \ No newline at end of file
diff --git a/phpBB/images/avatars/upload/index.htm b/phpBB/images/avatars/upload/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/images/avatars/upload/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/images/icons/index.htm b/phpBB/images/icons/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/images/icons/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/images/icons/misc/fire.gif b/phpBB/images/icons/misc/fire.gif
new file mode 100644
index 0000000000..e436d6e8c9
--- /dev/null
+++ b/phpBB/images/icons/misc/fire.gif
Binary files differ
diff --git a/phpBB/images/icons/misc/heart.gif b/phpBB/images/icons/misc/heart.gif
new file mode 100644
index 0000000000..c626dcb99f
--- /dev/null
+++ b/phpBB/images/icons/misc/heart.gif
Binary files differ
diff --git a/phpBB/images/icons/misc/index.htm b/phpBB/images/icons/misc/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/images/icons/misc/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/images/icons/misc/radioactive.gif b/phpBB/images/icons/misc/radioactive.gif
new file mode 100644
index 0000000000..517ae6397b
--- /dev/null
+++ b/phpBB/images/icons/misc/radioactive.gif
Binary files differ
diff --git a/phpBB/images/icons/misc/star.gif b/phpBB/images/icons/misc/star.gif
new file mode 100644
index 0000000000..dcde6eb66e
--- /dev/null
+++ b/phpBB/images/icons/misc/star.gif
Binary files differ
diff --git a/phpBB/images/icons/misc/thinking.gif b/phpBB/images/icons/misc/thinking.gif
new file mode 100644
index 0000000000..fdec41bc19
--- /dev/null
+++ b/phpBB/images/icons/misc/thinking.gif
Binary files differ
diff --git a/phpBB/images/icons/smile/alert.gif b/phpBB/images/icons/smile/alert.gif
new file mode 100644
index 0000000000..024e2a969a
--- /dev/null
+++ b/phpBB/images/icons/smile/alert.gif
Binary files differ
diff --git a/phpBB/images/icons/smile/index.htm b/phpBB/images/icons/smile/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/images/icons/smile/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/images/icons/smile/info.gif b/phpBB/images/icons/smile/info.gif
new file mode 100644
index 0000000000..d715ac7c75
--- /dev/null
+++ b/phpBB/images/icons/smile/info.gif
Binary files differ
diff --git a/phpBB/images/icons/smile/mrgreen.gif b/phpBB/images/icons/smile/mrgreen.gif
new file mode 100644
index 0000000000..9cd2715824
--- /dev/null
+++ b/phpBB/images/icons/smile/mrgreen.gif
Binary files differ
diff --git a/phpBB/images/icons/smile/question.gif b/phpBB/images/icons/smile/question.gif
new file mode 100644
index 0000000000..a07c038a9b
--- /dev/null
+++ b/phpBB/images/icons/smile/question.gif
Binary files differ
diff --git a/phpBB/images/icons/smile/redface.gif b/phpBB/images/icons/smile/redface.gif
new file mode 100644
index 0000000000..50e7ce3bfa
--- /dev/null
+++ b/phpBB/images/icons/smile/redface.gif
Binary files differ
diff --git a/phpBB/images/index.htm b/phpBB/images/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/images/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/images/ranks/index.htm b/phpBB/images/ranks/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/images/ranks/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/images/smilies/icon_arrow.gif b/phpBB/images/smilies/icon_arrow.gif
new file mode 100644
index 0000000000..c0f9117b96
--- /dev/null
+++ b/phpBB/images/smilies/icon_arrow.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_cool.gif b/phpBB/images/smilies/icon_cool.gif
new file mode 100644
index 0000000000..6dd150375d
--- /dev/null
+++ b/phpBB/images/smilies/icon_cool.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_cry.gif b/phpBB/images/smilies/icon_cry.gif
new file mode 100644
index 0000000000..21a5a3c113
--- /dev/null
+++ b/phpBB/images/smilies/icon_cry.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_e_biggrin.gif b/phpBB/images/smilies/icon_e_biggrin.gif
new file mode 100644
index 0000000000..08be8479b2
--- /dev/null
+++ b/phpBB/images/smilies/icon_e_biggrin.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_e_confused.gif b/phpBB/images/smilies/icon_e_confused.gif
new file mode 100644
index 0000000000..be5b583c0c
--- /dev/null
+++ b/phpBB/images/smilies/icon_e_confused.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_e_geek.gif b/phpBB/images/smilies/icon_e_geek.gif
new file mode 100644
index 0000000000..535bc9f723
--- /dev/null
+++ b/phpBB/images/smilies/icon_e_geek.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_e_sad.gif b/phpBB/images/smilies/icon_e_sad.gif
new file mode 100644
index 0000000000..7cd3016a96
--- /dev/null
+++ b/phpBB/images/smilies/icon_e_sad.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_e_smile.gif b/phpBB/images/smilies/icon_e_smile.gif
new file mode 100644
index 0000000000..d1ec74c8e0
--- /dev/null
+++ b/phpBB/images/smilies/icon_e_smile.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_e_surprised.gif b/phpBB/images/smilies/icon_e_surprised.gif
new file mode 100644
index 0000000000..1be6041e3a
--- /dev/null
+++ b/phpBB/images/smilies/icon_e_surprised.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_e_ugeek.gif b/phpBB/images/smilies/icon_e_ugeek.gif
new file mode 100644
index 0000000000..0d3c17994d
--- /dev/null
+++ b/phpBB/images/smilies/icon_e_ugeek.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_e_wink.gif b/phpBB/images/smilies/icon_e_wink.gif
new file mode 100644
index 0000000000..fb1c1402d2
--- /dev/null
+++ b/phpBB/images/smilies/icon_e_wink.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_eek.gif b/phpBB/images/smilies/icon_eek.gif
new file mode 100644
index 0000000000..cbe9b7b6ab
--- /dev/null
+++ b/phpBB/images/smilies/icon_eek.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_evil.gif b/phpBB/images/smilies/icon_evil.gif
new file mode 100644
index 0000000000..98e6535fde
--- /dev/null
+++ b/phpBB/images/smilies/icon_evil.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_exclaim.gif b/phpBB/images/smilies/icon_exclaim.gif
new file mode 100644
index 0000000000..2b4a3df330
--- /dev/null
+++ b/phpBB/images/smilies/icon_exclaim.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_idea.gif b/phpBB/images/smilies/icon_idea.gif
new file mode 100644
index 0000000000..e51d542bfe
--- /dev/null
+++ b/phpBB/images/smilies/icon_idea.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_lol.gif b/phpBB/images/smilies/icon_lol.gif
new file mode 100644
index 0000000000..3042b00d6b
--- /dev/null
+++ b/phpBB/images/smilies/icon_lol.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_mad.gif b/phpBB/images/smilies/icon_mad.gif
new file mode 100644
index 0000000000..994216615b
--- /dev/null
+++ b/phpBB/images/smilies/icon_mad.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_mrgreen.gif b/phpBB/images/smilies/icon_mrgreen.gif
new file mode 100644
index 0000000000..dcb44bb01a
--- /dev/null
+++ b/phpBB/images/smilies/icon_mrgreen.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_neutral.gif b/phpBB/images/smilies/icon_neutral.gif
new file mode 100644
index 0000000000..41c3e14c48
--- /dev/null
+++ b/phpBB/images/smilies/icon_neutral.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_question.gif b/phpBB/images/smilies/icon_question.gif
new file mode 100644
index 0000000000..13936f71a6
--- /dev/null
+++ b/phpBB/images/smilies/icon_question.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_razz.gif b/phpBB/images/smilies/icon_razz.gif
new file mode 100644
index 0000000000..a262743958
--- /dev/null
+++ b/phpBB/images/smilies/icon_razz.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_redface.gif b/phpBB/images/smilies/icon_redface.gif
new file mode 100644
index 0000000000..d23a1396a0
--- /dev/null
+++ b/phpBB/images/smilies/icon_redface.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_rolleyes.gif b/phpBB/images/smilies/icon_rolleyes.gif
new file mode 100644
index 0000000000..0707821667
--- /dev/null
+++ b/phpBB/images/smilies/icon_rolleyes.gif
Binary files differ
diff --git a/phpBB/images/smilies/icon_twisted.gif b/phpBB/images/smilies/icon_twisted.gif
new file mode 100644
index 0000000000..a555dd0ab3
--- /dev/null
+++ b/phpBB/images/smilies/icon_twisted.gif
Binary files differ
diff --git a/phpBB/images/spacer.gif b/phpBB/images/spacer.gif
new file mode 100644
index 0000000000..cd29009a65
--- /dev/null
+++ b/phpBB/images/spacer.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/avi.gif b/phpBB/images/upload_icons/avi.gif
new file mode 100644
index 0000000000..55f2116261
--- /dev/null
+++ b/phpBB/images/upload_icons/avi.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/bmp.gif b/phpBB/images/upload_icons/bmp.gif
new file mode 100644
index 0000000000..abd05713ef
--- /dev/null
+++ b/phpBB/images/upload_icons/bmp.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/doc.gif b/phpBB/images/upload_icons/doc.gif
new file mode 100644
index 0000000000..078d9f7a14
--- /dev/null
+++ b/phpBB/images/upload_icons/doc.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/exe.gif b/phpBB/images/upload_icons/exe.gif
new file mode 100644
index 0000000000..b77dd4dcec
--- /dev/null
+++ b/phpBB/images/upload_icons/exe.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/flash.gif b/phpBB/images/upload_icons/flash.gif
new file mode 100644
index 0000000000..00ee0f4f72
--- /dev/null
+++ b/phpBB/images/upload_icons/flash.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/gif.gif b/phpBB/images/upload_icons/gif.gif
new file mode 100644
index 0000000000..5aa8d463e7
--- /dev/null
+++ b/phpBB/images/upload_icons/gif.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/html.gif b/phpBB/images/upload_icons/html.gif
new file mode 100644
index 0000000000..eb948eae6a
--- /dev/null
+++ b/phpBB/images/upload_icons/html.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/jpg.gif b/phpBB/images/upload_icons/jpg.gif
new file mode 100644
index 0000000000..537de1c3a0
--- /dev/null
+++ b/phpBB/images/upload_icons/jpg.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/mid.gif b/phpBB/images/upload_icons/mid.gif
new file mode 100644
index 0000000000..ea7302cb16
--- /dev/null
+++ b/phpBB/images/upload_icons/mid.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/mov.gif b/phpBB/images/upload_icons/mov.gif
new file mode 100644
index 0000000000..55f2116261
--- /dev/null
+++ b/phpBB/images/upload_icons/mov.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/mp3.gif b/phpBB/images/upload_icons/mp3.gif
new file mode 100644
index 0000000000..acf1a5015f
--- /dev/null
+++ b/phpBB/images/upload_icons/mp3.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/mpg.gif b/phpBB/images/upload_icons/mpg.gif
new file mode 100644
index 0000000000..55f2116261
--- /dev/null
+++ b/phpBB/images/upload_icons/mpg.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/netscape.gif b/phpBB/images/upload_icons/netscape.gif
new file mode 100644
index 0000000000..0854440952
--- /dev/null
+++ b/phpBB/images/upload_icons/netscape.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/pdf.gif b/phpBB/images/upload_icons/pdf.gif
new file mode 100644
index 0000000000..8d0603ae65
--- /dev/null
+++ b/phpBB/images/upload_icons/pdf.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/ppt.gif b/phpBB/images/upload_icons/ppt.gif
new file mode 100644
index 0000000000..a3800d12c6
--- /dev/null
+++ b/phpBB/images/upload_icons/ppt.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/rar.gif b/phpBB/images/upload_icons/rar.gif
new file mode 100644
index 0000000000..9c0bd5667e
--- /dev/null
+++ b/phpBB/images/upload_icons/rar.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/txt.gif b/phpBB/images/upload_icons/txt.gif
new file mode 100644
index 0000000000..cc3639b89c
--- /dev/null
+++ b/phpBB/images/upload_icons/txt.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/wav.gif b/phpBB/images/upload_icons/wav.gif
new file mode 100644
index 0000000000..21195252b7
--- /dev/null
+++ b/phpBB/images/upload_icons/wav.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/xls.gif b/phpBB/images/upload_icons/xls.gif
new file mode 100644
index 0000000000..187a19b53c
--- /dev/null
+++ b/phpBB/images/upload_icons/xls.gif
Binary files differ
diff --git a/phpBB/images/upload_icons/zip.gif b/phpBB/images/upload_icons/zip.gif
new file mode 100644
index 0000000000..0141376100
--- /dev/null
+++ b/phpBB/images/upload_icons/zip.gif
Binary files differ
diff --git a/phpBB/includes/acm/acm_apc.php b/phpBB/includes/acm/acm_apc.php
new file mode 100644
index 0000000000..1a487f94ad
--- /dev/null
+++ b/phpBB/includes/acm/acm_apc.php
@@ -0,0 +1,84 @@
+<?php
+/**
+*
+* @package acm
+* @version $Id$
+* @copyright (c) 2005, 2009 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+// Include the abstract base
+if (!class_exists('acm_memory'))
+{
+ require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
+}
+
+/**
+* ACM for APC
+* @package acm
+*/
+class acm extends acm_memory
+{
+ var $extension = 'apc';
+
+ /**
+ * Purge cache data
+ *
+ * @return void
+ */
+ function purge()
+ {
+ apc_clear_cache('user');
+
+ parent::purge();
+ }
+
+ /**
+ * Fetch an item from the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @return mixed Cached data
+ */
+ function _read($var)
+ {
+ return apc_fetch($this->key_prefix . $var);
+ }
+
+ /**
+ * Store data in the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @param mixed $data Data to store
+ * @param int $ttl Time-to-live of cached data
+ * @return bool True if the operation succeeded
+ */
+ function _write($var, $data, $ttl = 2592000)
+ {
+ return apc_store($this->key_prefix . $var, $data, $ttl);
+ }
+
+ /**
+ * Remove an item from the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @return bool True if the operation succeeded
+ */
+ function _delete($var)
+ {
+ return apc_delete($this->key_prefix . $var);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acm/acm_eaccelerator.php b/phpBB/includes/acm/acm_eaccelerator.php
new file mode 100644
index 0000000000..1a3cf3c0f7
--- /dev/null
+++ b/phpBB/includes/acm/acm_eaccelerator.php
@@ -0,0 +1,120 @@
+<?php
+/**
+*
+* @package acm
+* @version $Id$
+* @copyright (c) 2005, 2009 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+// Include the abstract base
+if (!class_exists('acm_memory'))
+{
+ require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
+}
+
+/**
+* ACM for eAccelerator
+* @package acm
+* @todo Missing locks from destroy() talk with David
+*/
+class acm extends acm_memory
+{
+ var $extension = 'eaccelerator';
+
+ var $serialize_header = '#phpbb-serialized#';
+
+ /**
+ * Purge cache data
+ *
+ * @return void
+ */
+ function purge()
+ {
+ foreach (eaccelerator_list_keys() as $var)
+ {
+ // @todo Check why the substr()
+ // @todo Only unset vars matching $this->key_prefix
+ eaccelerator_rm(substr($var['name'], 1));
+ }
+
+ parent::purge();
+ }
+
+ /**
+ * Perform cache garbage collection
+ *
+ * @return void
+ */
+ function tidy()
+ {
+ eaccelerator_gc();
+
+ set_config('cache_last_gc', time(), true);
+ }
+
+ /**
+ * Fetch an item from the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @return mixed Cached data
+ */
+ function _read($var)
+ {
+ $result = eaccelerator_get($this->key_prefix . $var);
+
+ if ($result === null)
+ {
+ return false;
+ }
+
+ // Handle serialized objects
+ if (is_string($result) && strpos($result, $this->serialize_header . 'O:') === 0)
+ {
+ $result = unserialize(substr($result, strlen($this->serialize_header)));
+ }
+
+ return $result;
+ }
+
+ /**
+ * Store data in the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @param mixed $data Data to store
+ * @param int $ttl Time-to-live of cached data
+ * @return bool True if the operation succeeded
+ */
+ function _write($var, $data, $ttl = 2592000)
+ {
+ // Serialize objects and make them easy to detect
+ $data = (is_object($data)) ? $this->serialize_header . serialize($data) : $data;
+
+ return eaccelerator_put($this->key_prefix . $var, $data, $ttl);
+ }
+
+ /**
+ * Remove an item from the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @return bool True if the operation succeeded
+ */
+ function _delete($var)
+ {
+ return eaccelerator_rm($this->key_prefix . $var);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php
new file mode 100644
index 0000000000..234be5c5d1
--- /dev/null
+++ b/phpBB/includes/acm/acm_file.php
@@ -0,0 +1,720 @@
+<?php
+/**
+*
+* @package acm
+* @version $Id$
+* @copyright (c) 2005, 2009 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* ACM File Based Caching
+* @package acm
+*/
+class acm
+{
+ var $vars = array();
+ var $var_expires = array();
+ var $is_modified = false;
+
+ var $sql_rowset = array();
+ var $sql_row_pointer = array();
+ var $cache_dir = '';
+
+ /**
+ * Set cache path
+ */
+ function acm()
+ {
+ global $phpbb_root_path;
+ $this->cache_dir = $phpbb_root_path . 'cache/';
+ }
+
+ /**
+ * Load global cache
+ */
+ function load()
+ {
+ return $this->_read('data_global');
+ }
+
+ /**
+ * Unload cache object
+ */
+ function unload()
+ {
+ $this->save();
+ unset($this->vars);
+ unset($this->var_expires);
+ unset($this->sql_rowset);
+ unset($this->sql_row_pointer);
+
+ $this->vars = array();
+ $this->var_expires = array();
+ $this->sql_rowset = array();
+ $this->sql_row_pointer = array();
+ }
+
+ /**
+ * Save modified objects
+ */
+ function save()
+ {
+ if (!$this->is_modified)
+ {
+ return;
+ }
+
+ global $phpEx;
+
+ if (!$this->_write('data_global'))
+ {
+ // Now, this occurred how often? ... phew, just tell the user then...
+ if (!@is_writable($this->cache_dir))
+ {
+ // We need to use die() here, because else we may encounter an infinite loop (the message handler calls $cache->unload())
+ die($this->cache_dir . ' is NOT writable.');
+ exit;
+ }
+
+ die('Not able to open ' . $this->cache_dir . 'data_global.' . $phpEx);
+ exit;
+ }
+
+ $this->is_modified = false;
+ }
+
+ /**
+ * Tidy cache
+ */
+ function tidy()
+ {
+ global $phpEx;
+
+ $dir = @opendir($this->cache_dir);
+
+ if (!$dir)
+ {
+ return;
+ }
+
+ $time = time();
+
+ while (($entry = readdir($dir)) !== false)
+ {
+ if (!preg_match('/^(sql_|data_(?!global))/', $entry))
+ {
+ continue;
+ }
+
+ if (!($handle = @fopen($this->cache_dir . $entry, 'rb')))
+ {
+ continue;
+ }
+
+ // Skip the PHP header
+ fgets($handle);
+
+ // Skip expiration
+ $expires = (int) fgets($handle);
+
+ fclose($handle);
+
+ if ($time >= $expires)
+ {
+ $this->remove_file($this->cache_dir . $entry);
+ }
+ }
+ closedir($dir);
+
+ if (file_exists($this->cache_dir . 'data_global.' . $phpEx))
+ {
+ if (!sizeof($this->vars))
+ {
+ $this->load();
+ }
+
+ foreach ($this->var_expires as $var_name => $expires)
+ {
+ if ($time >= $expires)
+ {
+ $this->destroy($var_name);
+ }
+ }
+ }
+
+ set_config('cache_last_gc', time(), true);
+ }
+
+ /**
+ * Get saved cache object
+ */
+ function get($var_name)
+ {
+ if ($var_name[0] == '_')
+ {
+ global $phpEx;
+
+ if (!$this->_exists($var_name))
+ {
+ return false;
+ }
+
+ return $this->_read('data' . $var_name);
+ }
+ else
+ {
+ return ($this->_exists($var_name)) ? $this->vars[$var_name] : false;
+ }
+ }
+
+ /**
+ * Put data into cache
+ */
+ function put($var_name, $var, $ttl = 31536000)
+ {
+ if ($var_name[0] == '_')
+ {
+ $this->_write('data' . $var_name, $var, time() + $ttl);
+ }
+ else
+ {
+ $this->vars[$var_name] = $var;
+ $this->var_expires[$var_name] = time() + $ttl;
+ $this->is_modified = true;
+ }
+ }
+
+ /**
+ * Purge cache data
+ */
+ function purge()
+ {
+ // Purge all phpbb cache files
+ $dir = @opendir($this->cache_dir);
+
+ if (!$dir)
+ {
+ return;
+ }
+
+ while (($entry = readdir($dir)) !== false)
+ {
+ if (strpos($entry, 'sql_') !== 0 && strpos($entry, 'data_') !== 0 && strpos($entry, 'ctpl_') !== 0 && strpos($entry, 'tpl_') !== 0)
+ {
+ continue;
+ }
+
+ $this->remove_file($this->cache_dir . $entry);
+ }
+ closedir($dir);
+
+ unset($this->vars);
+ unset($this->var_expires);
+ unset($this->sql_rowset);
+ unset($this->sql_row_pointer);
+
+ $this->vars = array();
+ $this->var_expires = array();
+ $this->sql_rowset = array();
+ $this->sql_row_pointer = array();
+
+ $this->is_modified = false;
+ }
+
+ /**
+ * Destroy cache data
+ */
+ function destroy($var_name, $table = '')
+ {
+ global $phpEx;
+
+ if ($var_name == 'sql' && !empty($table))
+ {
+ if (!is_array($table))
+ {
+ $table = array($table);
+ }
+
+ $dir = @opendir($this->cache_dir);
+
+ if (!$dir)
+ {
+ return;
+ }
+
+ while (($entry = readdir($dir)) !== false)
+ {
+ if (strpos($entry, 'sql_') !== 0)
+ {
+ continue;
+ }
+
+ if (!($handle = @fopen($this->cache_dir . $entry, 'rb')))
+ {
+ continue;
+ }
+
+ // Skip the PHP header
+ fgets($handle);
+
+ // Skip expiration
+ fgets($handle);
+
+ // Grab the query, remove the LF
+ $query = substr(fgets($handle), 0, -1);
+
+ fclose($handle);
+
+ foreach ($table as $check_table)
+ {
+ // Better catch partial table names than no table names. ;)
+ if (strpos($query, $check_table) !== false)
+ {
+ $this->remove_file($this->cache_dir . $entry);
+ break;
+ }
+ }
+ }
+ closedir($dir);
+
+ return;
+ }
+
+ if (!$this->_exists($var_name))
+ {
+ return;
+ }
+
+ if ($var_name[0] == '_')
+ {
+ $this->remove_file($this->cache_dir . 'data' . $var_name . ".$phpEx", true);
+ }
+ else if (isset($this->vars[$var_name]))
+ {
+ $this->is_modified = true;
+ unset($this->vars[$var_name]);
+ unset($this->var_expires[$var_name]);
+
+ // We save here to let the following cache hits succeed
+ $this->save();
+ }
+ }
+
+ /**
+ * Check if a given cache entry exist
+ */
+ function _exists($var_name)
+ {
+ if ($var_name[0] == '_')
+ {
+ global $phpEx;
+ return file_exists($this->cache_dir . 'data' . $var_name . ".$phpEx");
+ }
+ else
+ {
+ if (!sizeof($this->vars))
+ {
+ $this->load();
+ }
+
+ if (!isset($this->var_expires[$var_name]))
+ {
+ return false;
+ }
+
+ return (time() > $this->var_expires[$var_name]) ? false : isset($this->vars[$var_name]);
+ }
+ }
+
+ /**
+ * Load cached sql query
+ */
+ function sql_load($query)
+ {
+ // Remove extra spaces and tabs
+ $query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
+
+ if (($rowset = $this->_read('sql_' . md5($query))) === false)
+ {
+ return false;
+ }
+
+ $query_id = sizeof($this->sql_rowset);
+ $this->sql_rowset[$query_id] = $rowset;
+ $this->sql_row_pointer[$query_id] = 0;
+
+ return $query_id;
+ }
+
+ /**
+ * Save sql query
+ */
+ function sql_save($query, &$query_result, $ttl)
+ {
+ global $db;
+
+ // Remove extra spaces and tabs
+ $query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
+
+ $query_id = sizeof($this->sql_rowset);
+ $this->sql_rowset[$query_id] = array();
+ $this->sql_row_pointer[$query_id] = 0;
+
+ while ($row = $db->sql_fetchrow($query_result))
+ {
+ $this->sql_rowset[$query_id][] = $row;
+ }
+ $db->sql_freeresult($query_result);
+
+ if ($this->_write('sql_' . md5($query), $this->sql_rowset[$query_id], $ttl + time(), $query))
+ {
+ $query_result = $query_id;
+ }
+ }
+
+ /**
+ * Ceck if a given sql query exist in cache
+ */
+ function sql_exists($query_id)
+ {
+ return isset($this->sql_rowset[$query_id]);
+ }
+
+ /**
+ * Fetch row from cache (database)
+ */
+ function sql_fetchrow($query_id)
+ {
+ if ($this->sql_row_pointer[$query_id] < sizeof($this->sql_rowset[$query_id]))
+ {
+ return $this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]++];
+ }
+
+ return false;
+ }
+
+ /**
+ * Fetch a field from the current row of a cached database result (database)
+ */
+ function sql_fetchfield($query_id, $field)
+ {
+ if ($this->sql_row_pointer[$query_id] < sizeof($this->sql_rowset[$query_id]))
+ {
+ return (isset($this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]][$field])) ? $this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]][$field] : false;
+ }
+
+ return false;
+ }
+
+ /**
+ * Seek a specific row in an a cached database result (database)
+ */
+ function sql_rowseek($rownum, $query_id)
+ {
+ if ($rownum >= sizeof($this->sql_rowset[$query_id]))
+ {
+ return false;
+ }
+
+ $this->sql_row_pointer[$query_id] = $rownum;
+ return true;
+ }
+
+ /**
+ * Free memory used for a cached database result (database)
+ */
+ function sql_freeresult($query_id)
+ {
+ if (!isset($this->sql_rowset[$query_id]))
+ {
+ return false;
+ }
+
+ unset($this->sql_rowset[$query_id]);
+ unset($this->sql_row_pointer[$query_id]);
+
+ return true;
+ }
+
+ /**
+ * Read cached data from a specified file
+ *
+ * @access private
+ * @param string $filename Filename to write
+ * @return mixed False if an error was encountered, otherwise the data type of the cached data
+ */
+ function _read($filename)
+ {
+ global $phpEx;
+
+ $file = "{$this->cache_dir}$filename.$phpEx";
+
+ $type = substr($filename, 0, strpos($filename, '_'));
+
+ if (!file_exists($file))
+ {
+ return false;
+ }
+
+ if (!($handle = @fopen($file, 'rb')))
+ {
+ return false;
+ }
+
+ // Skip the PHP header
+ fgets($handle);
+
+ if ($filename == 'data_global')
+ {
+ $this->vars = $this->var_expires = array();
+
+ $time = time();
+
+ while (($expires = (int) fgets($handle)) && !feof($handle))
+ {
+ // Number of bytes of data
+ $bytes = substr(fgets($handle), 0, -1);
+
+ if (!is_numeric($bytes) || ($bytes = (int) $bytes) === 0)
+ {
+ // We cannot process the file without a valid number of bytes
+ // so we discard it
+ fclose($handle);
+
+ $this->vars = $this->var_expires = array();
+ $this->is_modified = false;
+
+ $this->remove_file($file);
+
+ return false;
+ }
+
+ if ($time >= $expires)
+ {
+ fseek($handle, $bytes, SEEK_CUR);
+
+ continue;
+ }
+
+ $var_name = substr(fgets($handle), 0, -1);
+
+ // Read the length of bytes that consists of data.
+ $data = fread($handle, $bytes - strlen($var_name));
+ $data = @unserialize($data);
+
+ // Don't use the data if it was invalid
+ if ($data !== false)
+ {
+ $this->vars[$var_name] = $data;
+ $this->var_expires[$var_name] = $expires;
+ }
+
+ // Absorb the LF
+ fgets($handle);
+ }
+
+ fclose($handle);
+
+ $this->is_modified = false;
+
+ return true;
+ }
+ else
+ {
+ $data = false;
+ $line = 0;
+
+ while (($buffer = fgets($handle)) && !feof($handle))
+ {
+ $buffer = substr($buffer, 0, -1); // Remove the LF
+
+ // $buffer is only used to read integers
+ // if it is non numeric we have an invalid
+ // cache file, which we will now remove.
+ if (!is_numeric($buffer))
+ {
+ break;
+ }
+
+ if ($line == 0)
+ {
+ $expires = (int) $buffer;
+
+ if (time() >= $expires)
+ {
+ break;
+ }
+
+ if ($type == 'sql')
+ {
+ // Skip the query
+ fgets($handle);
+ }
+ }
+ else if ($line == 1)
+ {
+ $bytes = (int) $buffer;
+
+ // Never should have 0 bytes
+ if (!$bytes)
+ {
+ break;
+ }
+
+ // Grab the serialized data
+ $data = fread($handle, $bytes);
+
+ // Read 1 byte, to trigger EOF
+ fread($handle, 1);
+
+ if (!feof($handle))
+ {
+ // Somebody tampered with our data
+ $data = false;
+ }
+ break;
+ }
+ else
+ {
+ // Something went wrong
+ break;
+ }
+ $line++;
+ }
+ fclose($handle);
+
+ // unserialize if we got some data
+ $data = ($data !== false) ? @unserialize($data) : $data;
+
+ if ($data === false)
+ {
+ $this->remove_file($file);
+ return false;
+ }
+
+ return $data;
+ }
+ }
+
+ /**
+ * Write cache data to a specified file
+ *
+ * 'data_global' is a special case and the generated format is different for this file:
+ * <code>
+ * <?php exit; ?>
+ * (expiration)
+ * (length of var and serialised data)
+ * (var)
+ * (serialised data)
+ * ... (repeat)
+ * </code>
+ *
+ * The other files have a similar format:
+ * <code>
+ * <?php exit; ?>
+ * (expiration)
+ * (query) [SQL files only]
+ * (length of serialised data)
+ * (serialised data)
+ * </code>
+ *
+ * @access private
+ * @param string $filename Filename to write
+ * @param mixed $data Data to store
+ * @param int $expires Timestamp when the data expires
+ * @param string $query Query when caching SQL queries
+ * @return bool True if the file was successfully created, otherwise false
+ */
+ function _write($filename, $data = null, $expires = 0, $query = '')
+ {
+ global $phpEx;
+
+ $file = "{$this->cache_dir}$filename.$phpEx";
+
+ if ($handle = @fopen($file, 'wb'))
+ {
+ @flock($handle, LOCK_EX);
+
+ // File header
+ fwrite($handle, '<' . '?php exit; ?' . '>');
+
+ if ($filename == 'data_global')
+ {
+ // Global data is a different format
+ foreach ($this->vars as $var => $data)
+ {
+ if (strpos($var, "\r") !== false || strpos($var, "\n") !== false)
+ {
+ // CR/LF would cause fgets() to read the cache file incorrectly
+ // do not cache test entries, they probably won't be read back
+ // the cache keys should really be alphanumeric with a few symbols.
+ continue;
+ }
+ $data = serialize($data);
+
+ // Write out the expiration time
+ fwrite($handle, "\n" . $this->var_expires[$var] . "\n");
+
+ // Length of the remaining data for this var (ignoring two LF's)
+ fwrite($handle, strlen($data . $var) . "\n");
+ fwrite($handle, $var . "\n");
+ fwrite($handle, $data);
+ }
+ }
+ else
+ {
+ fwrite($handle, "\n" . $expires . "\n");
+
+ if (strpos($filename, 'sql_') === 0)
+ {
+ fwrite($handle, $query . "\n");
+ }
+ $data = serialize($data);
+
+ fwrite($handle, strlen($data) . "\n");
+ fwrite($handle, $data);
+ }
+
+ @flock($handle, LOCK_UN);
+ fclose($handle);
+
+ if (!function_exists('phpbb_chmod'))
+ {
+ global $phpbb_root_path;
+ include($phpbb_root_path . 'includes/functions.' . $phpEx);
+ }
+
+ phpbb_chmod($file, CHMOD_READ | CHMOD_WRITE);
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Removes/unlinks file
+ */
+ function remove_file($filename, $check = false)
+ {
+ if ($check && !@is_writable($this->cache_dir))
+ {
+ // E_USER_ERROR - not using language entry - intended.
+ trigger_error('Unable to remove files within ' . $this->cache_dir . '. Please check directory permissions.', E_USER_ERROR);
+ }
+
+ return @unlink($filename);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acm/acm_memcache.php b/phpBB/includes/acm/acm_memcache.php
new file mode 100644
index 0000000000..3077ee9615
--- /dev/null
+++ b/phpBB/includes/acm/acm_memcache.php
@@ -0,0 +1,124 @@
+<?php
+/**
+*
+* @package acm
+* @version $Id$
+* @copyright (c) 2005, 2009 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+// Include the abstract base
+if (!class_exists('acm_memory'))
+{
+ require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
+}
+
+if (!defined('PHPBB_ACM_MEMCACHE_PORT'))
+{
+ define('PHPBB_ACM_MEMCACHE_PORT', 11211);
+}
+
+if (!defined('PHPBB_ACM_MEMCACHE_COMPRESS'))
+{
+ define('PHPBB_ACM_MEMCACHE_COMPRESS', false);
+}
+
+if (!defined('PHPBB_ACM_MEMCACHE_HOST'))
+{
+ define('PHPBB_ACM_MEMCACHE_HOST', 'localhost');
+}
+
+/**
+* ACM for Memcached
+* @package acm
+*/
+class acm extends acm_memory
+{
+ var $extension = 'memcache';
+
+ var $memcache;
+ var $flags = 0;
+
+ function acm()
+ {
+ // Call the parent constructor
+ parent::acm_memory();
+
+ $this->memcache = new Memcache;
+ $this->memcache->connect(PHPBB_ACM_MEMCACHE_HOST, PHPBB_ACM_MEMCACHE_PORT);
+ $this->flags = (PHPBB_ACM_MEMCACHE_COMPRESS) ? MEMCACHE_COMPRESSED : 0;
+ }
+
+ /**
+ * Unload the cache resources
+ *
+ * @return void
+ */
+ function unload()
+ {
+ parent::unload();
+
+ $this->memcache->close();
+ }
+
+ /**
+ * Purge cache data
+ *
+ * @return void
+ */
+ function purge()
+ {
+ $this->memcache->flush();
+
+ parent::purge();
+ }
+
+ /**
+ * Fetch an item from the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @return mixed Cached data
+ */
+ function _read($var)
+ {
+ return $this->memcache->get($this->key_prefix . $var);
+ }
+
+ /**
+ * Store data in the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @param mixed $data Data to store
+ * @param int $ttl Time-to-live of cached data
+ * @return bool True if the operation succeeded
+ */
+ function _write($var, $data, $ttl = 2592000)
+ {
+ return $this->memcache->set($this->key_prefix . $var, $data, $this->flags, $ttl);
+ }
+
+ /**
+ * Remove an item from the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @return bool True if the operation succeeded
+ */
+ function _delete($var)
+ {
+ return $this->memcache->delete($this->key_prefix . $var);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acm/acm_memory.php b/phpBB/includes/acm/acm_memory.php
new file mode 100644
index 0000000000..1ed4fb0d55
--- /dev/null
+++ b/phpBB/includes/acm/acm_memory.php
@@ -0,0 +1,426 @@
+<?php
+/**
+*
+* @package acm
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* ACM Abstract Memory Class
+* @package acm
+*/
+class acm_memory
+{
+ var $key_prefix;
+
+ var $vars = array();
+ var $is_modified = false;
+
+ var $sql_rowset = array();
+ var $sql_row_pointer = array();
+ var $cache_dir = '';
+
+ /**
+ * Set cache path
+ */
+ function acm_memory()
+ {
+ global $phpbb_root_path, $dbname, $table_prefix;
+
+ $this->cache_dir = $phpbb_root_path . 'cache/';
+ $this->key_prefix = substr(md5($dbname . $table_prefix), 0, 8) . '_';
+
+ if (!isset($this->extension) || !extension_loaded($this->extension))
+ {
+ global $acm_type;
+
+ trigger_error("Could not find required extension [{$this->extension}] for the ACM module $acm_type.", E_USER_ERROR);
+ }
+ }
+
+ /**
+ * Load global cache
+ */
+ function load()
+ {
+ // grab the global cache
+ $this->vars = $this->_read('global');
+
+ if ($this->vars !== false)
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Unload cache object
+ */
+ function unload()
+ {
+ $this->save();
+ unset($this->vars);
+ unset($this->sql_rowset);
+ unset($this->sql_row_pointer);
+
+ $this->vars = array();
+ $this->sql_rowset = array();
+ $this->sql_row_pointer = array();
+ }
+
+ /**
+ * Save modified objects
+ */
+ function save()
+ {
+ if (!$this->is_modified)
+ {
+ return;
+ }
+
+ $this->_write('global', $this->vars, 2592000);
+
+ $this->is_modified = false;
+ }
+
+ /**
+ * Tidy cache
+ */
+ function tidy()
+ {
+ // cache has auto GC, no need to have any code here :)
+
+ set_config('cache_last_gc', time(), true);
+ }
+
+ /**
+ * Get saved cache object
+ */
+ function get($var_name)
+ {
+ if ($var_name[0] == '_')
+ {
+ if (!$this->_exists($var_name))
+ {
+ return false;
+ }
+
+ return $this->_read($var_name);
+ }
+ else
+ {
+ return ($this->_exists($var_name)) ? $this->vars[$var_name] : false;
+ }
+ }
+
+ /**
+ * Put data into cache
+ */
+ function put($var_name, $var, $ttl = 2592000)
+ {
+ if ($var_name[0] == '_')
+ {
+ $this->_write($var_name, $var, $ttl);
+ }
+ else
+ {
+ $this->vars[$var_name] = $var;
+ $this->is_modified = true;
+ }
+ }
+
+ /**
+ * Purge cache data
+ */
+ function purge()
+ {
+ // Purge all phpbb cache files
+ $dir = @opendir($this->cache_dir);
+
+ if (!$dir)
+ {
+ return;
+ }
+
+ while (($entry = readdir($dir)) !== false)
+ {
+ if (strpos($entry, 'sql_') !== 0 && strpos($entry, 'data_') !== 0 && strpos($entry, 'ctpl_') !== 0 && strpos($entry, 'tpl_') !== 0)
+ {
+ continue;
+ }
+
+ $this->remove_file($this->cache_dir . $entry);
+ }
+ closedir($dir);
+
+ unset($this->vars);
+ unset($this->sql_rowset);
+ unset($this->sql_row_pointer);
+
+ $this->vars = array();
+ $this->sql_rowset = array();
+ $this->sql_row_pointer = array();
+
+ $this->is_modified = false;
+ }
+
+
+ /**
+ * Destroy cache data
+ */
+ function destroy($var_name, $table = '')
+ {
+ if ($var_name == 'sql' && !empty($table))
+ {
+ if (!is_array($table))
+ {
+ $table = array($table);
+ }
+
+ foreach ($table as $table_name)
+ {
+ // gives us the md5s that we want
+ $temp = $this->_read('sql_' . $table_name);
+
+ if ($temp === false)
+ {
+ continue;
+ }
+
+ // delete each query ref
+ foreach ($temp as $md5_id => $void)
+ {
+ $this->_delete('sql_' . $md5_id);
+ }
+
+ // delete the table ref
+ $this->_delete('sql_' . $table_name);
+ }
+
+ return;
+ }
+
+ if (!$this->_exists($var_name))
+ {
+ return;
+ }
+
+ if ($var_name[0] == '_')
+ {
+ $this->_delete($var_name);
+ }
+ else if (isset($this->vars[$var_name]))
+ {
+ $this->is_modified = true;
+ unset($this->vars[$var_name]);
+
+ // We save here to let the following cache hits succeed
+ $this->save();
+ }
+ }
+
+ /**
+ * Check if a given cache entry exist
+ */
+ function _exists($var_name)
+ {
+ if ($var_name[0] == '_')
+ {
+ return $this->_isset($var_name);
+ }
+ else
+ {
+ if (!sizeof($this->vars))
+ {
+ $this->load();
+ }
+
+ return isset($this->vars[$var_name]);
+ }
+ }
+
+ /**
+ * Load cached sql query
+ */
+ function sql_load($query)
+ {
+ // Remove extra spaces and tabs
+ $query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
+ $query_id = sizeof($this->sql_rowset);
+
+ if (($result = $this->_read('sql_' . md5($query))) === false)
+ {
+ return false;
+ }
+
+ $this->sql_rowset[$query_id] = $result;
+ $this->sql_row_pointer[$query_id] = 0;
+
+ return $query_id;
+ }
+
+ /**
+ * Save sql query
+ */
+ function sql_save($query, &$query_result, $ttl)
+ {
+ global $db;
+
+ // Remove extra spaces and tabs
+ $query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
+ $hash = md5($query);
+
+ // determine which tables this query belongs to
+ // Some queries use backticks, namely the get_database_size() query
+ // don't check for conformity, the SQL would error and not reach here.
+ if (!preg_match('/FROM \\(?(`?\\w+`?(?: \\w+)?(?:, ?`?\\w+`?(?: \\w+)?)*)\\)?/', $query, $regs))
+ {
+ // Bail out if the match fails.
+ return;
+ }
+ $tables = array_map('trim', explode(',', $regs[1]));
+
+ foreach ($tables as $table_name)
+ {
+ // Remove backticks
+ $table_name = ($table_name[0] == '`') ? substr($table_name, 1, -1) : $table_name;
+
+ if (($pos = strpos($table_name, ' ')) !== false)
+ {
+ $table_name = substr($table_name, 0, $pos);
+ }
+
+ $temp = $this->_read('sql_' . $table_name);
+
+ if ($temp === false)
+ {
+ $temp = array();
+ }
+
+ $temp[$hash] = true;
+
+ // This must never expire
+ $this->_write('sql_' . $table_name, $temp, 0);
+ }
+
+ // store them in the right place
+ $query_id = sizeof($this->sql_rowset);
+ $this->sql_rowset[$query_id] = array();
+ $this->sql_row_pointer[$query_id] = 0;
+
+ while ($row = $db->sql_fetchrow($query_result))
+ {
+ $this->sql_rowset[$query_id][] = $row;
+ }
+ $db->sql_freeresult($query_result);
+
+ $this->_write('sql_' . $hash, $this->sql_rowset[$query_id], $ttl);
+
+ $query_result = $query_id;
+ }
+
+ /**
+ * Ceck if a given sql query exist in cache
+ */
+ function sql_exists($query_id)
+ {
+ return isset($this->sql_rowset[$query_id]);
+ }
+
+ /**
+ * Fetch row from cache (database)
+ */
+ function sql_fetchrow($query_id)
+ {
+ if ($this->sql_row_pointer[$query_id] < sizeof($this->sql_rowset[$query_id]))
+ {
+ return $this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]++];
+ }
+
+ return false;
+ }
+
+ /**
+ * Fetch a field from the current row of a cached database result (database)
+ */
+ function sql_fetchfield($query_id, $field)
+ {
+ if ($this->sql_row_pointer[$query_id] < sizeof($this->sql_rowset[$query_id]))
+ {
+ return (isset($this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]][$field])) ? $this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]][$field] : false;
+ }
+
+ return false;
+ }
+
+ /**
+ * Seek a specific row in an a cached database result (database)
+ */
+ function sql_rowseek($rownum, $query_id)
+ {
+ if ($rownum >= sizeof($this->sql_rowset[$query_id]))
+ {
+ return false;
+ }
+
+ $this->sql_row_pointer[$query_id] = $rownum;
+ return true;
+ }
+
+ /**
+ * Free memory used for a cached database result (database)
+ */
+ function sql_freeresult($query_id)
+ {
+ if (!isset($this->sql_rowset[$query_id]))
+ {
+ return false;
+ }
+
+ unset($this->sql_rowset[$query_id]);
+ unset($this->sql_row_pointer[$query_id]);
+
+ return true;
+ }
+
+ /**
+ * Removes/unlinks file
+ */
+ function remove_file($filename, $check = false)
+ {
+ if ($check && !@is_writable($this->cache_dir))
+ {
+ // E_USER_ERROR - not using language entry - intended.
+ trigger_error('Unable to remove files within ' . $this->cache_dir . '. Please check directory permissions.', E_USER_ERROR);
+ }
+
+ return @unlink($filename);
+ }
+
+ /**
+ * Check if a cache var exists
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @return bool True if it exists, otherwise false
+ */
+ function _isset($var)
+ {
+ // Most caches don't need to check
+ return true;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acm/acm_null.php b/phpBB/includes/acm/acm_null.php
new file mode 100644
index 0000000000..fca67115a7
--- /dev/null
+++ b/phpBB/includes/acm/acm_null.php
@@ -0,0 +1,156 @@
+<?php
+/**
+*
+* @package acm
+* @version $Id$
+* @copyright (c) 2005, 2009 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* ACM Null Caching
+* @package acm
+*/
+class acm
+{
+ /**
+ * Set cache path
+ */
+ function acm()
+ {
+ }
+
+ /**
+ * Load global cache
+ */
+ function load()
+ {
+ return true;
+ }
+
+ /**
+ * Unload cache object
+ */
+ function unload()
+ {
+ }
+
+ /**
+ * Save modified objects
+ */
+ function save()
+ {
+ }
+
+ /**
+ * Tidy cache
+ */
+ function tidy()
+ {
+ // This cache always has a tidy room.
+ set_config('cache_last_gc', time(), true);
+ }
+
+ /**
+ * Get saved cache object
+ */
+ function get($var_name)
+ {
+ return false;
+ }
+
+ /**
+ * Put data into cache
+ */
+ function put($var_name, $var, $ttl = 0)
+ {
+ }
+
+ /**
+ * Purge cache data
+ */
+ function purge()
+ {
+ }
+
+ /**
+ * Destroy cache data
+ */
+ function destroy($var_name, $table = '')
+ {
+ }
+
+ /**
+ * Check if a given cache entry exist
+ */
+ function _exists($var_name)
+ {
+ return false;
+ }
+
+ /**
+ * Load cached sql query
+ */
+ function sql_load($query)
+ {
+ return false;
+ }
+
+ /**
+ * Save sql query
+ */
+ function sql_save($query, &$query_result, $ttl)
+ {
+ }
+
+ /**
+ * Ceck if a given sql query exist in cache
+ */
+ function sql_exists($query_id)
+ {
+ return false;
+ }
+
+ /**
+ * Fetch row from cache (database)
+ */
+ function sql_fetchrow($query_id)
+ {
+ return false;
+ }
+
+ /**
+ * Fetch a field from the current row of a cached database result (database)
+ */
+ function sql_fetchfield($query_id, $field)
+ {
+ return false;
+ }
+
+ /**
+ * Seek a specific row in an a cached database result (database)
+ */
+ function sql_rowseek($rownum, $query_id)
+ {
+ return false;
+ }
+
+ /**
+ * Free memory used for a cached database result (database)
+ */
+ function sql_freeresult($query_id)
+ {
+ return false;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acm/acm_xcache.php b/phpBB/includes/acm/acm_xcache.php
new file mode 100644
index 0000000000..d0a614660c
--- /dev/null
+++ b/phpBB/includes/acm/acm_xcache.php
@@ -0,0 +1,121 @@
+<?php
+/**
+*
+* @package acm
+* @version $Id$
+* @copyright (c) 2005, 2009 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+// Include the abstract base
+if (!class_exists('acm_memory'))
+{
+ require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
+}
+
+/**
+* ACM for XCache
+* @package acm
+*
+* To use this module you need ini_get() enabled and the following INI settings configured as follows:
+* - xcache.var_size > 0
+* - xcache.admin.enable_auth = off (or xcache.admin.user and xcache.admin.password set)
+*
+*/
+class acm extends acm_memory
+{
+ var $extension = 'XCache';
+
+ function acm()
+ {
+ parent::acm_memory();
+
+ if (!function_exists('ini_get') || (int) ini_get('xcache.var_size') <= 0)
+ {
+ trigger_error('Increase xcache.var_size setting above 0 or enable ini_get() to use this ACM module.', E_USER_ERROR);
+ }
+ }
+
+ /**
+ * Purge cache data
+ *
+ * @return void
+ */
+ function purge()
+ {
+ // Run before for XCache, if admin functions are disabled it will terminate execution
+ parent::purge();
+
+ // If the admin authentication is enabled but not set up, this will cause a nasty error.
+ // Not much we can do about it though.
+ $n = xcache_count(XC_TYPE_VAR);
+
+ for ($i = 0; $i < $n; $i++)
+ {
+ xcache_clear_cache(XC_TYPE_VAR, $i);
+ }
+ }
+
+ /**
+ * Fetch an item from the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @return mixed Cached data
+ */
+ function _read($var)
+ {
+ $result = xcache_get($this->key_prefix . $var);
+
+ return ($result !== null) ? $result : false;
+ }
+
+ /**
+ * Store data in the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @param mixed $data Data to store
+ * @param int $ttl Time-to-live of cached data
+ * @return bool True if the operation succeeded
+ */
+ function _write($var, $data, $ttl = 2592000)
+ {
+ return xcache_set($this->key_prefix . $var, $data, $ttl);
+ }
+
+ /**
+ * Remove an item from the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @return bool True if the operation succeeded
+ */
+ function _delete($var)
+ {
+ return xcache_unset($this->key_prefix . $var);
+ }
+
+ /**
+ * Check if a cache var exists
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @return bool True if it exists, otherwise false
+ */
+ function _isset($var)
+ {
+ return xcache_isset($this->key_prefix . $var);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
new file mode 100644
index 0000000000..849c076f0e
--- /dev/null
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -0,0 +1,1452 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_attachments
+{
+ var $u_action;
+ var $new_config;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template, $cache;
+ global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
+
+ $user->add_lang(array('posting', 'viewtopic', 'acp/attachments'));
+
+ $error = $notify = array();
+ $submit = (isset($_POST['submit'])) ? true : false;
+ $action = request_var('action', '');
+
+ $form_key = 'acp_attach';
+ add_form_key($form_key);
+
+ if ($submit && !check_form_key($form_key))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ switch ($mode)
+ {
+ case 'attach':
+ $l_title = 'ACP_ATTACHMENT_SETTINGS';
+ break;
+
+ case 'extensions':
+ $l_title = 'ACP_MANAGE_EXTENSIONS';
+ break;
+
+ case 'ext_groups':
+ $l_title = 'ACP_EXTENSION_GROUPS';
+ break;
+
+ case 'orphan':
+ $l_title = 'ACP_ORPHAN_ATTACHMENTS';
+ break;
+
+ default:
+ trigger_error('NO_MODE', E_USER_ERROR);
+ break;
+ }
+
+ $this->tpl_name = 'acp_attachments';
+ $this->page_title = $l_title;
+
+ $template->assign_vars(array(
+ 'L_TITLE' => $user->lang[$l_title],
+ 'L_TITLE_EXPLAIN' => $user->lang[$l_title . '_EXPLAIN'],
+ 'U_ACTION' => $this->u_action)
+ );
+
+ switch ($mode)
+ {
+ case 'attach':
+
+ include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+
+ $sql = 'SELECT group_name, cat_id
+ FROM ' . EXTENSION_GROUPS_TABLE . '
+ WHERE cat_id > 0
+ ORDER BY cat_id';
+ $result = $db->sql_query($sql);
+
+ $s_assigned_groups = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $s_assigned_groups[$row['cat_id']][] = $row['group_name'];
+ }
+ $db->sql_freeresult($result);
+
+ $l_legend_cat_images = $user->lang['SETTINGS_CAT_IMAGES'] . ' [' . $user->lang['ASSIGNED_GROUP'] . ': ' . ((!empty($s_assigned_groups[ATTACHMENT_CATEGORY_IMAGE])) ? implode(', ', $s_assigned_groups[ATTACHMENT_CATEGORY_IMAGE]) : $user->lang['NO_EXT_GROUP']) . ']';
+
+ $display_vars = array(
+ 'title' => 'ACP_ATTACHMENT_SETTINGS',
+ 'vars' => array(
+ 'legend1' => 'ACP_ATTACHMENT_SETTINGS',
+
+ 'img_max_width' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
+ 'img_max_height' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
+ 'img_link_width' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
+ 'img_link_height' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
+
+ 'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'upload_path' => array('lang' => 'UPLOAD_DIR', 'validate' => 'wpath', 'type' => 'text:25:100', 'explain' => true),
+ 'display_order' => array('lang' => 'DISPLAY_ORDER', 'validate' => 'bool', 'type' => 'custom', 'method' => 'display_order', 'explain' => true),
+ 'attachment_quota' => array('lang' => 'ATTACH_QUOTA', 'validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
+ 'max_filesize' => array('lang' => 'ATTACH_MAX_FILESIZE', 'validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
+ 'max_filesize_pm' => array('lang' => 'ATTACH_MAX_PM_FILESIZE','validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
+ 'max_attachments' => array('lang' => 'MAX_ATTACHMENTS', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => false),
+ 'max_attachments_pm' => array('lang' => 'MAX_ATTACHMENTS_PM', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => false),
+ 'secure_downloads' => array('lang' => 'SECURE_DOWNLOADS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'secure_allow_deny' => array('lang' => 'SECURE_ALLOW_DENY', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_allow_deny', 'explain' => true),
+ 'secure_allow_empty_referer' => array('lang' => 'SECURE_EMPTY_REFERRER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'check_attachment_content' => array('lang' => 'CHECK_CONTENT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+
+
+ 'legend2' => $l_legend_cat_images,
+ 'img_display_inlined' => array('lang' => 'DISPLAY_INLINED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'img_create_thumbnail' => array('lang' => 'CREATE_THUMBNAIL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' px'),
+ 'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
+ 'img_imagick' => array('lang' => 'IMAGICK_PATH', 'validate' => 'string', 'type' => 'text:20:200', 'explain' => true, 'append' => '&nbsp;&nbsp;<span>[ <a href="' . $this->u_action . '&amp;action=imgmagick">' . $user->lang['SEARCH_IMAGICK'] . '</a> ]</span>'),
+ 'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' px'),
+ 'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' px'),
+ )
+ );
+
+ $this->new_config = $config;
+ $cfg_array = (isset($_REQUEST['config'])) ? request_var('config', array('' => '')) : $this->new_config;
+ $error = array();
+
+ // We validate the complete config if whished
+ validate_config_vars($display_vars['vars'], $cfg_array, $error);
+
+ // Do not write values if there is an error
+ if (sizeof($error))
+ {
+ $submit = false;
+ }
+
+ // We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
+ foreach ($display_vars['vars'] as $config_name => $null)
+ {
+ if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
+ {
+ continue;
+ }
+
+ $this->new_config[$config_name] = $config_value = $cfg_array[$config_name];
+
+ if (in_array($config_name, array('attachment_quota', 'max_filesize', 'max_filesize_pm')))
+ {
+ $size_var = request_var($config_name, '');
+ $this->new_config[$config_name] = $config_value = ($size_var == 'kb') ? round($config_value * 1024) : (($size_var == 'mb') ? round($config_value * 1048576) : $config_value);
+ }
+
+ if ($submit)
+ {
+ set_config($config_name, $config_value);
+ }
+ }
+
+ $this->perform_site_list();
+
+ if ($submit)
+ {
+ add_log('admin', 'LOG_CONFIG_ATTACH');
+
+ // Check Settings
+ $this->test_upload($error, $this->new_config['upload_path'], false);
+
+ if (!sizeof($error))
+ {
+ trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
+ }
+ }
+
+ $template->assign_var('S_ATTACHMENT_SETTINGS', true);
+
+ if ($action == 'imgmagick')
+ {
+ $this->new_config['img_imagick'] = $this->search_imagemagick();
+ }
+
+ // We strip eventually manual added convert program, we only want the patch
+ if ($this->new_config['img_imagick'])
+ {
+ // Change path separator
+ $this->new_config['img_imagick'] = str_replace('\\', '/', $this->new_config['img_imagick']);
+ $this->new_config['img_imagick'] = str_replace(array('convert', '.exe'), array('', ''), $this->new_config['img_imagick']);
+
+ // Check for trailing slash
+ if (substr($this->new_config['img_imagick'], -1) !== '/')
+ {
+ $this->new_config['img_imagick'] .= '/';
+ }
+ }
+
+ $supported_types = get_supported_image_types();
+
+ // Check Thumbnail Support
+ if (!$this->new_config['img_imagick'] && (!isset($supported_types['format']) || !sizeof($supported_types['format'])))
+ {
+ $this->new_config['img_create_thumbnail'] = 0;
+ }
+
+ $template->assign_vars(array(
+ 'U_SEARCH_IMAGICK' => $this->u_action . '&amp;action=imgmagick',
+ 'S_THUMBNAIL_SUPPORT' => (!$this->new_config['img_imagick'] && (!isset($supported_types['format']) || !sizeof($supported_types['format']))) ? false : true)
+ );
+
+ // Secure Download Options - Same procedure as with banning
+ $allow_deny = ($this->new_config['secure_allow_deny']) ? 'ALLOWED' : 'DISALLOWED';
+
+ $sql = 'SELECT *
+ FROM ' . SITELIST_TABLE;
+ $result = $db->sql_query($sql);
+
+ $defined_ips = '';
+ $ips = array();
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $value = ($row['site_ip']) ? $row['site_ip'] : $row['site_hostname'];
+ if ($value)
+ {
+ $defined_ips .= '<option' . (($row['ip_exclude']) ? ' class="sep"' : '') . ' value="' . $row['site_id'] . '">' . $value . '</option>';
+ $ips[$row['site_id']] = $value;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'S_SECURE_DOWNLOADS' => $this->new_config['secure_downloads'],
+ 'S_DEFINED_IPS' => ($defined_ips != '') ? true : false,
+ 'S_WARNING' => (sizeof($error)) ? true : false,
+
+ 'WARNING_MSG' => implode('<br />', $error),
+ 'DEFINED_IPS' => $defined_ips,
+
+ 'L_SECURE_TITLE' => $user->lang['DEFINE_' . $allow_deny . '_IPS'],
+ 'L_IP_EXCLUDE' => $user->lang['EXCLUDE_FROM_' . $allow_deny . '_IP'],
+ 'L_REMOVE_IPS' => $user->lang['REMOVE_' . $allow_deny . '_IPS'])
+ );
+
+ // Output relevant options
+ foreach ($display_vars['vars'] as $config_key => $vars)
+ {
+ if (!is_array($vars) && strpos($config_key, 'legend') === false)
+ {
+ continue;
+ }
+
+ if (strpos($config_key, 'legend') !== false)
+ {
+ $template->assign_block_vars('options', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => (isset($user->lang[$vars])) ? $user->lang[$vars] : $vars)
+ );
+
+ continue;
+ }
+
+ $type = explode(':', $vars['type']);
+
+ $l_explain = '';
+ if ($vars['explain'] && isset($vars['lang_explain']))
+ {
+ $l_explain = (isset($user->lang[$vars['lang_explain']])) ? $user->lang[$vars['lang_explain']] : $vars['lang_explain'];
+ }
+ else if ($vars['explain'])
+ {
+ $l_explain = (isset($user->lang[$vars['lang'] . '_EXPLAIN'])) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '';
+ }
+
+ $content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars);
+ if (empty($content))
+ {
+ continue;
+ }
+
+ $template->assign_block_vars('options', array(
+ 'KEY' => $config_key,
+ 'TITLE' => $user->lang[$vars['lang']],
+ 'S_EXPLAIN' => $vars['explain'],
+ 'TITLE_EXPLAIN' => $l_explain,
+ 'CONTENT' => $content,
+ )
+ );
+
+ unset($display_vars['vars'][$config_key]);
+ }
+
+ break;
+
+ case 'extensions':
+
+ if ($submit || isset($_POST['add_extension_check']))
+ {
+ if ($submit)
+ {
+ // Change Extensions ?
+ $extension_change_list = request_var('extension_change_list', array(0));
+ $group_select_list = request_var('group_select', array(0));
+
+ // Generate correct Change List
+ $extensions = array();
+
+ for ($i = 0, $size = sizeof($extension_change_list); $i < $size; $i++)
+ {
+ $extensions[$extension_change_list[$i]]['group_id'] = $group_select_list[$i];
+ }
+
+ $sql = 'SELECT *
+ FROM ' . EXTENSIONS_TABLE . '
+ ORDER BY extension_id';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['group_id'] != $extensions[$row['extension_id']]['group_id'])
+ {
+ $sql = 'UPDATE ' . EXTENSIONS_TABLE . '
+ SET group_id = ' . (int) $extensions[$row['extension_id']]['group_id'] . '
+ WHERE extension_id = ' . $row['extension_id'];
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_ATTACH_EXT_UPDATE', $row['extension']);
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // Delete Extension?
+ $extension_id_list = request_var('extension_id_list', array(0));
+
+ if (sizeof($extension_id_list))
+ {
+ $sql = 'SELECT extension
+ FROM ' . EXTENSIONS_TABLE . '
+ WHERE ' . $db->sql_in_set('extension_id', $extension_id_list);
+ $result = $db->sql_query($sql);
+
+ $extension_list = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $extension_list .= ($extension_list == '') ? $row['extension'] : ', ' . $row['extension'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'DELETE
+ FROM ' . EXTENSIONS_TABLE . '
+ WHERE ' . $db->sql_in_set('extension_id', $extension_id_list);
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_ATTACH_EXT_DEL', $extension_list);
+ }
+ }
+
+ // Add Extension?
+ $add_extension = strtolower(request_var('add_extension', ''));
+ $add_extension_group = request_var('add_group_select', 0);
+ $add = (isset($_POST['add_extension_check'])) ? true : false;
+
+ if ($add_extension && $add)
+ {
+ if (!sizeof($error))
+ {
+ $sql = 'SELECT extension_id
+ FROM ' . EXTENSIONS_TABLE . "
+ WHERE extension = '" . $db->sql_escape($add_extension) . "'";
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $error[] = sprintf($user->lang['EXTENSION_EXIST'], $add_extension);
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($error))
+ {
+ $sql_ary = array(
+ 'group_id' => $add_extension_group,
+ 'extension' => $add_extension
+ );
+
+ $db->sql_query('INSERT INTO ' . EXTENSIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+ add_log('admin', 'LOG_ATTACH_EXT_ADD', $add_extension);
+ }
+ }
+ }
+
+ if (!sizeof($error))
+ {
+ $notify[] = $user->lang['EXTENSIONS_UPDATED'];
+ }
+
+ $cache->destroy('_extensions');
+ }
+
+ $template->assign_vars(array(
+ 'S_EXTENSIONS' => true,
+ 'ADD_EXTENSION' => (isset($add_extension)) ? $add_extension : '',
+ 'GROUP_SELECT_OPTIONS' => (isset($_POST['add_extension_check'])) ? $this->group_select('add_group_select', $add_extension_group, 'extension_group') : $this->group_select('add_group_select', false, 'extension_group'))
+ );
+
+ $sql = 'SELECT *
+ FROM ' . EXTENSIONS_TABLE . '
+ ORDER BY group_id, extension';
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $old_group_id = $row['group_id'];
+ do
+ {
+ $s_spacer = false;
+
+ $current_group_id = $row['group_id'];
+ if ($old_group_id != $current_group_id)
+ {
+ $s_spacer = true;
+ $old_group_id = $current_group_id;
+ }
+
+ $template->assign_block_vars('extensions', array(
+ 'S_SPACER' => $s_spacer,
+ 'EXTENSION_ID' => $row['extension_id'],
+ 'EXTENSION' => $row['extension'],
+ 'GROUP_OPTIONS' => $this->group_select('group_select[]', $row['group_id']))
+ );
+ }
+ while ($row = $db->sql_fetchrow($result));
+ }
+ $db->sql_freeresult($result);
+
+ break;
+
+ case 'ext_groups':
+
+ $template->assign_var('S_EXTENSION_GROUPS', true);
+
+ if ($submit)
+ {
+ $action = request_var('action', '');
+ $group_id = request_var('g', 0);
+
+ if ($action != 'add' && $action != 'edit')
+ {
+ trigger_error('NO_MODE', E_USER_ERROR);
+ }
+
+ if (!$group_id && $action == 'edit')
+ {
+ trigger_error($user->lang['NO_EXT_GROUP_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if ($group_id)
+ {
+ $sql = 'SELECT *
+ FROM ' . EXTENSION_GROUPS_TABLE . "
+ WHERE group_id = $group_id";
+ $result = $db->sql_query($sql);
+ $ext_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$ext_row)
+ {
+ trigger_error($user->lang['NO_EXT_GROUP_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+ else
+ {
+ $ext_row = array();
+ }
+
+ $group_name = utf8_normalize_nfc(request_var('group_name', '', true));
+ $new_group_name = ($action == 'add') ? $group_name : (($ext_row['group_name'] != $group_name) ? $group_name : '');
+
+ if (!$group_name)
+ {
+ $error[] = $user->lang['NO_EXT_GROUP_NAME'];
+ }
+
+ // Check New Group Name
+ if ($new_group_name)
+ {
+ $sql = 'SELECT group_id
+ FROM ' . EXTENSION_GROUPS_TABLE . "
+ WHERE LOWER(group_name) = '" . $db->sql_escape(utf8_strtolower($new_group_name)) . "'";
+ $result = $db->sql_query($sql);
+
+ if ($db->sql_fetchrow($result))
+ {
+ $error[] = sprintf($user->lang['EXTENSION_GROUP_EXIST'], $new_group_name);
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (!sizeof($error))
+ {
+ // Ok, build the update/insert array
+ $upload_icon = request_var('upload_icon', 'no_image');
+ $size_select = request_var('size_select', 'b');
+ $forum_select = request_var('forum_select', false);
+ $allowed_forums = request_var('allowed_forums', array(0));
+ $allow_in_pm = (isset($_POST['allow_in_pm'])) ? true : false;
+ $max_filesize = request_var('max_filesize', 0);
+ $max_filesize = ($size_select == 'kb') ? round($max_filesize * 1024) : (($size_select == 'mb') ? round($max_filesize * 1048576) : $max_filesize);
+ $allow_group = (isset($_POST['allow_group'])) ? true : false;
+
+ if ($max_filesize == $config['max_filesize'])
+ {
+ $max_filesize = 0;
+ }
+
+ if (!sizeof($allowed_forums))
+ {
+ $forum_select = false;
+ }
+
+ $group_ary = array(
+ 'group_name' => $group_name,
+ 'cat_id' => request_var('special_category', ATTACHMENT_CATEGORY_NONE),
+ 'allow_group' => ($allow_group) ? 1 : 0,
+ 'upload_icon' => ($upload_icon == 'no_image') ? '' : $upload_icon,
+ 'max_filesize' => $max_filesize,
+ 'allowed_forums'=> ($forum_select) ? serialize($allowed_forums) : '',
+ 'allow_in_pm' => ($allow_in_pm) ? 1 : 0,
+ );
+
+ if ($action == 'add')
+ {
+ $group_ary['download_mode'] = INLINE_LINK;
+ }
+
+ $sql = ($action == 'add') ? 'INSERT INTO ' . EXTENSION_GROUPS_TABLE . ' ' : 'UPDATE ' . EXTENSION_GROUPS_TABLE . ' SET ';
+ $sql .= $db->sql_build_array((($action == 'add') ? 'INSERT' : 'UPDATE'), $group_ary);
+ $sql .= ($action == 'edit') ? " WHERE group_id = $group_id" : '';
+
+ $db->sql_query($sql);
+
+ if ($action == 'add')
+ {
+ $group_id = $db->sql_nextid();
+ }
+
+ add_log('admin', 'LOG_ATTACH_EXTGROUP_' . strtoupper($action), $group_name);
+ }
+
+ $extension_list = request_var('extensions', array(0));
+
+ if ($action == 'edit' && sizeof($extension_list))
+ {
+ $sql = 'UPDATE ' . EXTENSIONS_TABLE . "
+ SET group_id = 0
+ WHERE group_id = $group_id";
+ $db->sql_query($sql);
+ }
+
+ if (sizeof($extension_list))
+ {
+ $sql = 'UPDATE ' . EXTENSIONS_TABLE . "
+ SET group_id = $group_id
+ WHERE " . $db->sql_in_set('extension_id', $extension_list);
+ $db->sql_query($sql);
+ }
+
+ $cache->destroy('_extensions');
+
+ if (!sizeof($error))
+ {
+ $notify[] = $user->lang['SUCCESS_EXTENSION_GROUP_' . strtoupper($action)];
+ }
+ }
+
+ $cat_lang = array(
+ ATTACHMENT_CATEGORY_NONE => $user->lang['NO_FILE_CAT'],
+ ATTACHMENT_CATEGORY_IMAGE => $user->lang['CAT_IMAGES'],
+ ATTACHMENT_CATEGORY_WM => $user->lang['CAT_WM_FILES'],
+ ATTACHMENT_CATEGORY_RM => $user->lang['CAT_RM_FILES'],
+ ATTACHMENT_CATEGORY_FLASH => $user->lang['CAT_FLASH_FILES'],
+ ATTACHMENT_CATEGORY_QUICKTIME => $user->lang['CAT_QUICKTIME_FILES'],
+ );
+
+ $group_id = request_var('g', 0);
+ $action = (isset($_POST['add'])) ? 'add' : $action;
+
+ switch ($action)
+ {
+ case 'delete':
+
+ if (confirm_box(true))
+ {
+ $sql = 'SELECT group_name
+ FROM ' . EXTENSION_GROUPS_TABLE . "
+ WHERE group_id = $group_id";
+ $result = $db->sql_query($sql);
+ $group_name = (string) $db->sql_fetchfield('group_name');
+ $db->sql_freeresult($result);
+
+ $sql = 'DELETE
+ FROM ' . EXTENSION_GROUPS_TABLE . "
+ WHERE group_id = $group_id";
+ $db->sql_query($sql);
+
+ // Set corresponding Extensions to a pending Group
+ $sql = 'UPDATE ' . EXTENSIONS_TABLE . "
+ SET group_id = 0
+ WHERE group_id = $group_id";
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_ATTACH_EXTGROUP_DEL', $group_name);
+
+ $cache->destroy('_extensions');
+
+ trigger_error($user->lang['EXTENSION_GROUP_DELETED'] . adm_back_link($this->u_action));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'group_id' => $group_id,
+ 'action' => 'delete',
+ )));
+ }
+
+ break;
+
+ case 'edit':
+
+ if (!$group_id)
+ {
+ trigger_error($user->lang['NO_EXT_GROUP_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = 'SELECT *
+ FROM ' . EXTENSION_GROUPS_TABLE . "
+ WHERE group_id = $group_id";
+ $result = $db->sql_query($sql);
+ $ext_group_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $forum_ids = (!$ext_group_row['allowed_forums']) ? array() : unserialize(trim($ext_group_row['allowed_forums']));
+
+ // no break;
+
+ case 'add':
+
+ if ($action == 'add')
+ {
+ $ext_group_row = array(
+ 'group_name' => utf8_normalize_nfc(request_var('group_name', '', true)),
+ 'cat_id' => 0,
+ 'allow_group' => 1,
+ 'allow_in_pm' => 1,
+ 'upload_icon' => '',
+ 'max_filesize' => 0,
+ );
+
+ $forum_ids = array();
+ }
+
+ $extensions = array();
+
+ $sql = 'SELECT *
+ FROM ' . EXTENSIONS_TABLE . "
+ WHERE group_id = $group_id
+ OR group_id = 0
+ ORDER BY extension";
+ $result = $db->sql_query($sql);
+ $extensions = $db->sql_fetchrowset($result);
+ $db->sql_freeresult($result);
+
+ if ($ext_group_row['max_filesize'] == 0)
+ {
+ $ext_group_row['max_filesize'] = (int) $config['max_filesize'];
+ }
+
+ $max_filesize = get_formatted_filesize($ext_group_row['max_filesize'], false, array('mb', 'kb', 'b'));
+ $size_format = $max_filesize['si_identifier'];
+ $ext_group_row['max_filesize'] = $max_filesize['value'];
+
+ $img_path = $config['upload_icons_path'];
+
+ $filename_list = '';
+ $no_image_select = false;
+
+ $imglist = filelist($phpbb_root_path . $img_path);
+
+ if (!empty($imglist['']))
+ {
+ $imglist = array_values($imglist);
+ $imglist = $imglist[0];
+
+ foreach ($imglist as $key => $img)
+ {
+ if (!$ext_group_row['upload_icon'])
+ {
+ $no_image_select = true;
+ $selected = '';
+ }
+ else
+ {
+ $selected = ($ext_group_row['upload_icon'] == $img) ? ' selected="selected"' : '';
+ }
+
+ if (strlen($img) > 255)
+ {
+ continue;
+ }
+
+ $filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . htmlspecialchars($img) . '</option>';
+ }
+ }
+
+ $i = 0;
+ $assigned_extensions = '';
+ foreach ($extensions as $num => $row)
+ {
+ if ($row['group_id'] == $group_id && $group_id)
+ {
+ $assigned_extensions .= ($i) ? ', ' . $row['extension'] : $row['extension'];
+ $i++;
+ }
+ }
+
+ $s_extension_options = '';
+ foreach ($extensions as $row)
+ {
+ $s_extension_options .= '<option' . ((!$row['group_id']) ? ' class="disabled"' : '') . ' value="' . $row['extension_id'] . '"' . (($row['group_id'] == $group_id && $group_id) ? ' selected="selected"' : '') . '>' . $row['extension'] . '</option>';
+ }
+
+ $template->assign_vars(array(
+ 'PHPBB_ROOT_PATH' => $phpbb_root_path,
+ 'IMG_PATH' => $img_path,
+ 'ACTION' => $action,
+ 'GROUP_ID' => $group_id,
+ 'GROUP_NAME' => $ext_group_row['group_name'],
+ 'ALLOW_GROUP' => $ext_group_row['allow_group'],
+ 'ALLOW_IN_PM' => $ext_group_row['allow_in_pm'],
+ 'UPLOAD_ICON_SRC' => $phpbb_root_path . $img_path . '/' . $ext_group_row['upload_icon'],
+ 'EXTGROUP_FILESIZE' => $ext_group_row['max_filesize'],
+ 'ASSIGNED_EXTENSIONS' => $assigned_extensions,
+
+ 'S_CATEGORY_SELECT' => $this->category_select('special_category', $group_id, 'category'),
+ 'S_EXT_GROUP_SIZE_OPTIONS' => size_select_options($size_format),
+ 'S_EXTENSION_OPTIONS' => $s_extension_options,
+ 'S_FILENAME_LIST' => $filename_list,
+ 'S_EDIT_GROUP' => true,
+ 'S_NO_IMAGE' => $no_image_select,
+ 'S_FORUM_IDS' => (sizeof($forum_ids)) ? true : false,
+
+ 'U_EXTENSIONS' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&amp;mode=extensions"),
+ 'U_BACK' => $this->u_action,
+
+ 'L_LEGEND' => $user->lang[strtoupper($action) . '_EXTENSION_GROUP'])
+ );
+
+ $s_forum_id_options = '';
+
+ /** @todo use in-built function **/
+
+ $sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id
+ FROM ' . FORUMS_TABLE . '
+ ORDER BY left_id ASC';
+ $result = $db->sql_query($sql, 600);
+
+ $right = $cat_right = $padding_inc = 0;
+ $padding = $forum_list = $holding = '';
+ $padding_store = array('0' => '');
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['forum_type'] == FORUM_CAT && ($row['left_id'] + 1 == $row['right_id']))
+ {
+ // Non-postable forum with no subforums, don't display
+ continue;
+ }
+
+ if (!$auth->acl_get('f_list', $row['forum_id']))
+ {
+ // if the user does not have permissions to list this forum skip
+ continue;
+ }
+
+ if ($row['left_id'] < $right)
+ {
+ $padding .= '&nbsp; &nbsp;';
+ $padding_store[$row['parent_id']] = $padding;
+ }
+ else if ($row['left_id'] > $right + 1)
+ {
+ $padding = empty($padding_store[$row['parent_id']]) ? '' : $padding_store[$row['parent_id']];
+ }
+
+ $right = $row['right_id'];
+
+ $selected = (in_array($row['forum_id'], $forum_ids)) ? ' selected="selected"' : '';
+
+ if ($row['left_id'] > $cat_right)
+ {
+ // make sure we don't forget anything
+ $s_forum_id_options .= $holding;
+ $holding = '';
+ }
+
+ if ($row['right_id'] - $row['left_id'] > 1)
+ {
+ $cat_right = max($cat_right, $row['right_id']);
+
+ $holding .= '<option value="' . $row['forum_id'] . '"' . (($row['forum_type'] == FORUM_POST) ? ' class="sep"' : '') . $selected . '>' . $padding . $row['forum_name'] . '</option>';
+ }
+ else
+ {
+ $s_forum_id_options .= $holding . '<option value="' . $row['forum_id'] . '"' . (($row['forum_type'] == FORUM_POST) ? ' class="sep"' : '') . $selected . '>' . $padding . $row['forum_name'] . '</option>';
+ $holding = '';
+ }
+ }
+
+ if ($holding)
+ {
+ $s_forum_id_options .= $holding;
+ }
+
+ $db->sql_freeresult($result);
+ unset($padding_store);
+
+ $template->assign_vars(array(
+ 'S_FORUM_ID_OPTIONS' => $s_forum_id_options)
+ );
+
+ break;
+ }
+
+ $sql = 'SELECT *
+ FROM ' . EXTENSION_GROUPS_TABLE . '
+ ORDER BY allow_group DESC, allow_in_pm DESC, group_name';
+ $result = $db->sql_query($sql);
+
+ $old_allow_group = $old_allow_pm = 1;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $s_add_spacer = ($old_allow_group != $row['allow_group'] || $old_allow_pm != $row['allow_in_pm']) ? true : false;
+
+ $template->assign_block_vars('groups', array(
+ 'S_ADD_SPACER' => $s_add_spacer,
+ 'S_ALLOWED_IN_PM' => ($row['allow_in_pm']) ? true : false,
+ 'S_GROUP_ALLOWED' => ($row['allow_group']) ? true : false,
+
+ 'U_EDIT' => $this->u_action . "&amp;action=edit&amp;g={$row['group_id']}",
+ 'U_DELETE' => $this->u_action . "&amp;action=delete&amp;g={$row['group_id']}",
+
+ 'GROUP_NAME' => $row['group_name'],
+ 'CATEGORY' => $cat_lang[$row['cat_id']],
+ )
+ );
+
+ $old_allow_group = $row['allow_group'];
+ $old_allow_pm = $row['allow_in_pm'];
+ }
+ $db->sql_freeresult($result);
+
+ break;
+
+ case 'orphan':
+
+ if ($submit)
+ {
+ $delete_files = (isset($_POST['delete'])) ? array_keys(request_var('delete', array('' => 0))) : array();
+ $add_files = (isset($_POST['add'])) ? array_keys(request_var('add', array('' => 0))) : array();
+ $post_ids = request_var('post_id', array('' => 0));
+
+ if (sizeof($delete_files))
+ {
+ $sql = 'SELECT *
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('attach_id', $delete_files) . '
+ AND is_orphan = 1';
+ $result = $db->sql_query($sql);
+
+ $delete_files = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ phpbb_unlink($row['physical_filename'], 'file');
+
+ if ($row['thumbnail'])
+ {
+ phpbb_unlink($row['physical_filename'], 'thumbnail');
+ }
+
+ $delete_files[$row['attach_id']] = $row['real_filename'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (sizeof($delete_files))
+ {
+ $sql = 'DELETE FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('attach_id', array_keys($delete_files));
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_ATTACH_ORPHAN_DEL', implode(', ', $delete_files));
+ $notify[] = sprintf($user->lang['LOG_ATTACH_ORPHAN_DEL'], implode(', ', $delete_files));
+ }
+
+ $upload_list = array();
+ foreach ($add_files as $attach_id)
+ {
+ if (!isset($delete_files[$attach_id]) && !empty($post_ids[$attach_id]))
+ {
+ $upload_list[$attach_id] = $post_ids[$attach_id];
+ }
+ }
+ unset($add_files);
+
+ if (sizeof($upload_list))
+ {
+ $template->assign_var('S_UPLOADING_FILES', true);
+
+ $sql = 'SELECT forum_id, forum_name
+ FROM ' . FORUMS_TABLE;
+ $result = $db->sql_query($sql);
+
+ $forum_names = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_names[$row['forum_id']] = $row['forum_name'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT forum_id, topic_id, post_id, poster_id
+ FROM ' . POSTS_TABLE . '
+ WHERE ' . $db->sql_in_set('post_id', $upload_list);
+ $result = $db->sql_query($sql);
+
+ $post_info = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_info[$row['post_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ // Select those attachments we want to change...
+ $sql = 'SELECT *
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('attach_id', array_keys($upload_list)) . '
+ AND is_orphan = 1';
+ $result = $db->sql_query($sql);
+
+ $files_added = $space_taken = 0;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_row = $post_info[$upload_list[$row['attach_id']]];
+
+ $template->assign_block_vars('upload', array(
+ 'FILE_INFO' => sprintf($user->lang['UPLOADING_FILE_TO'], $row['real_filename'], $post_row['post_id']),
+ 'S_DENIED' => (!$auth->acl_get('f_attach', $post_row['forum_id'])) ? true : false,
+ 'L_DENIED' => (!$auth->acl_get('f_attach', $post_row['forum_id'])) ? sprintf($user->lang['UPLOAD_DENIED_FORUM'], $forum_names[$row['forum_id']]) : '')
+ );
+
+ if (!$auth->acl_get('f_attach', $post_row['forum_id']))
+ {
+ continue;
+ }
+
+ // Adjust attachment entry
+ $sql_ary = array(
+ 'in_message' => 0,
+ 'is_orphan' => 0,
+ 'poster_id' => $post_row['poster_id'],
+ 'post_msg_id' => $post_row['post_id'],
+ 'topic_id' => $post_row['topic_id'],
+ );
+
+ $sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE attach_id = ' . $row['attach_id'];
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET post_attachment = 1
+ WHERE post_id = ' . $post_row['post_id'];
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_attachment = 1
+ WHERE topic_id = ' . $post_row['topic_id'];
+ $db->sql_query($sql);
+
+ $space_taken += $row['filesize'];
+ $files_added++;
+
+ add_log('admin', 'LOG_ATTACH_FILEUPLOAD', $post_row['post_id'], $row['real_filename']);
+ }
+ $db->sql_freeresult($result);
+
+ if ($files_added)
+ {
+ set_config_count('upload_dir_size', $space_taken, true);
+ set_config_count('num_files', $files_added, true);
+ }
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_ORPHAN' => true)
+ );
+
+ // Just get the files with is_orphan set and older than 3 hours
+ $sql = 'SELECT *
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE is_orphan = 1
+ AND filetime < ' . (time() - 3*60*60) . '
+ ORDER BY filetime DESC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $template->assign_block_vars('orphan', array(
+ 'FILESIZE' => get_formatted_filesize($row['filesize']),
+ 'FILETIME' => $user->format_date($row['filetime']),
+ 'REAL_FILENAME' => utf8_basename($row['real_filename']),
+ 'PHYSICAL_FILENAME' => utf8_basename($row['physical_filename']),
+ 'ATTACH_ID' => $row['attach_id'],
+ 'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? $post_ids[$row['attach_id']] : '',
+ 'U_FILE' => append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'mode=view&amp;id=' . $row['attach_id']))
+ );
+ }
+ $db->sql_freeresult($result);
+
+ break;
+ }
+
+ if (sizeof($error))
+ {
+ $template->assign_vars(array(
+ 'S_WARNING' => true,
+ 'WARNING_MSG' => implode('<br />', $error))
+ );
+ }
+
+ if (sizeof($notify))
+ {
+ $template->assign_vars(array(
+ 'S_NOTIFY' => true,
+ 'NOTIFY_MSG' => implode('<br />', $notify))
+ );
+ }
+ }
+
+ /**
+ * Build Select for category items
+ */
+ function category_select($select_name, $group_id = false, $key = '')
+ {
+ global $db, $user;
+
+ $types = array(
+ ATTACHMENT_CATEGORY_NONE => $user->lang['NO_FILE_CAT'],
+ ATTACHMENT_CATEGORY_IMAGE => $user->lang['CAT_IMAGES'],
+ ATTACHMENT_CATEGORY_WM => $user->lang['CAT_WM_FILES'],
+ ATTACHMENT_CATEGORY_RM => $user->lang['CAT_RM_FILES'],
+ ATTACHMENT_CATEGORY_FLASH => $user->lang['CAT_FLASH_FILES'],
+ ATTACHMENT_CATEGORY_QUICKTIME => $user->lang['CAT_QUICKTIME_FILES'],
+ );
+
+ if ($group_id)
+ {
+ $sql = 'SELECT cat_id
+ FROM ' . EXTENSION_GROUPS_TABLE . '
+ WHERE group_id = ' . (int) $group_id;
+ $result = $db->sql_query($sql);
+
+ $cat_type = (!($row = $db->sql_fetchrow($result))) ? ATTACHMENT_CATEGORY_NONE : $row['cat_id'];
+
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $cat_type = ATTACHMENT_CATEGORY_NONE;
+ }
+
+ $group_select = '<select name="' . $select_name . '"' . (($key) ? ' id="' . $key . '"' : '') . '>';
+
+ foreach ($types as $type => $mode)
+ {
+ $selected = ($type == $cat_type) ? ' selected="selected"' : '';
+ $group_select .= '<option value="' . $type . '"' . $selected . '>' . $mode . '</option>';
+ }
+
+ $group_select .= '</select>';
+
+ return $group_select;
+ }
+
+ /**
+ * Extension group select
+ */
+ function group_select($select_name, $default_group = false, $key = '')
+ {
+ global $db, $user;
+
+ $group_select = '<select name="' . $select_name . '"' . (($key) ? ' id="' . $key . '"' : '') . '>';
+
+ $sql = 'SELECT group_id, group_name
+ FROM ' . EXTENSION_GROUPS_TABLE . '
+ ORDER BY group_name';
+ $result = $db->sql_query($sql);
+
+ $group_name = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $group_name[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ $row['group_id'] = 0;
+ $row['group_name'] = $user->lang['NOT_ASSIGNED'];
+ $group_name[] = $row;
+
+ for ($i = 0; $i < sizeof($group_name); $i++)
+ {
+ if ($default_group === false)
+ {
+ $selected = ($i == 0) ? ' selected="selected"' : '';
+ }
+ else
+ {
+ $selected = ($group_name[$i]['group_id'] == $default_group) ? ' selected="selected"' : '';
+ }
+
+ $group_select .= '<option value="' . $group_name[$i]['group_id'] . '"' . $selected . '>' . $group_name[$i]['group_name'] . '</option>';
+ }
+
+ $group_select .= '</select>';
+
+ return $group_select;
+ }
+
+ /**
+ * Search Imagick
+ */
+ function search_imagemagick()
+ {
+ $imagick = '';
+
+ $exe = ((defined('PHP_OS')) && (preg_match('#^win#i', PHP_OS))) ? '.exe' : '';
+
+ $magic_home = getenv('MAGICK_HOME');
+
+ if (empty($magic_home))
+ {
+ $locations = array('C:/WINDOWS/', 'C:/WINNT/', 'C:/WINDOWS/SYSTEM/', 'C:/WINNT/SYSTEM/', 'C:/WINDOWS/SYSTEM32/', 'C:/WINNT/SYSTEM32/', '/usr/bin/', '/usr/sbin/', '/usr/local/bin/', '/usr/local/sbin/', '/opt/', '/usr/imagemagick/', '/usr/bin/imagemagick/');
+ $path_locations = str_replace('\\', '/', (explode(($exe) ? ';' : ':', getenv('PATH'))));
+
+ $locations = array_merge($path_locations, $locations);
+
+ foreach ($locations as $location)
+ {
+ // The path might not end properly, fudge it
+ if (substr($location, -1) !== '/')
+ {
+ $location .= '/';
+ }
+
+ if (@file_exists($location) && @is_readable($location . 'mogrify' . $exe) && @filesize($location . 'mogrify' . $exe) > 3000)
+ {
+ $imagick = str_replace('\\', '/', $location);
+ continue;
+ }
+ }
+ }
+ else
+ {
+ $imagick = str_replace('\\', '/', $magic_home);
+ }
+
+ return $imagick;
+ }
+
+ /**
+ * Test Settings
+ */
+ function test_upload(&$error, $upload_dir, $create_directory = false)
+ {
+ global $user, $phpbb_root_path;
+
+ // Does the target directory exist, is it a directory and writable.
+ if ($create_directory)
+ {
+ if (!file_exists($phpbb_root_path . $upload_dir))
+ {
+ @mkdir($phpbb_root_path . $upload_dir, 0777);
+ phpbb_chmod($phpbb_root_path . $upload_dir, CHMOD_READ | CHMOD_WRITE);
+ }
+ }
+
+ if (!file_exists($phpbb_root_path . $upload_dir))
+ {
+ $error[] = sprintf($user->lang['NO_UPLOAD_DIR'], $upload_dir);
+ return;
+ }
+
+ if (!is_dir($phpbb_root_path . $upload_dir))
+ {
+ $error[] = sprintf($user->lang['UPLOAD_NOT_DIR'], $upload_dir);
+ return;
+ }
+
+ if (!is_writable($phpbb_root_path . $upload_dir))
+ {
+ $error[] = sprintf($user->lang['NO_WRITE_UPLOAD'], $upload_dir);
+ return;
+ }
+ }
+
+ /**
+ * Perform operations on sites for external linking
+ */
+ function perform_site_list()
+ {
+ global $db, $user;
+
+ if (isset($_REQUEST['securesubmit']))
+ {
+ // Grab the list of entries
+ $ips = request_var('ips', '');
+ $ip_list = array_unique(explode("\n", $ips));
+ $ip_list_log = implode(', ', $ip_list);
+
+ $ip_exclude = (!empty($_POST['ipexclude'])) ? 1 : 0;
+
+ $iplist = array();
+ $hostlist = array();
+
+ foreach ($ip_list as $item)
+ {
+ if (preg_match('#^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})[ ]*\-[ ]*([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$#', trim($item), $ip_range_explode))
+ {
+ // Don't ask about all this, just don't ask ... !
+ $ip_1_counter = $ip_range_explode[1];
+ $ip_1_end = $ip_range_explode[5];
+
+ while ($ip_1_counter <= $ip_1_end)
+ {
+ $ip_2_counter = ($ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[2] : 0;
+ $ip_2_end = ($ip_1_counter < $ip_1_end) ? 254 : $ip_range_explode[6];
+
+ if ($ip_2_counter == 0 && $ip_2_end == 254)
+ {
+ $ip_2_counter = 256;
+ $ip_2_fragment = 256;
+
+ $iplist[] = "'$ip_1_counter.*'";
+ }
+
+ while ($ip_2_counter <= $ip_2_end)
+ {
+ $ip_3_counter = ($ip_2_counter == $ip_range_explode[2] && $ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[3] : 0;
+ $ip_3_end = ($ip_2_counter < $ip_2_end || $ip_1_counter < $ip_1_end) ? 254 : $ip_range_explode[7];
+
+ if ($ip_3_counter == 0 && $ip_3_end == 254)
+ {
+ $ip_3_counter = 256;
+ $ip_3_fragment = 256;
+
+ $iplist[] = "'$ip_1_counter.$ip_2_counter.*'";
+ }
+
+ while ($ip_3_counter <= $ip_3_end)
+ {
+ $ip_4_counter = ($ip_3_counter == $ip_range_explode[3] && $ip_2_counter == $ip_range_explode[2] && $ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[4] : 0;
+ $ip_4_end = ($ip_3_counter < $ip_3_end || $ip_2_counter < $ip_2_end) ? 254 : $ip_range_explode[8];
+
+ if ($ip_4_counter == 0 && $ip_4_end == 254)
+ {
+ $ip_4_counter = 256;
+ $ip_4_fragment = 256;
+
+ $iplist[] = "'$ip_1_counter.$ip_2_counter.$ip_3_counter.*'";
+ }
+
+ while ($ip_4_counter <= $ip_4_end)
+ {
+ $iplist[] = "'$ip_1_counter.$ip_2_counter.$ip_3_counter.$ip_4_counter'";
+ $ip_4_counter++;
+ }
+ $ip_3_counter++;
+ }
+ $ip_2_counter++;
+ }
+ $ip_1_counter++;
+ }
+ }
+ else if (preg_match('#^([0-9]{1,3})\.([0-9\*]{1,3})\.([0-9\*]{1,3})\.([0-9\*]{1,3})$#', trim($item)) || preg_match('#^[a-f0-9:]+\*?$#i', trim($item)))
+ {
+ $iplist[] = "'" . trim($item) . "'";
+ }
+ else if (preg_match('#^([\w\-_]\.?){2,}$#is', trim($item)))
+ {
+ $hostlist[] = "'" . trim($item) . "'";
+ }
+ else if (preg_match("#^([a-z0-9\-\*\._/]+?)$#is", trim($item)))
+ {
+ $hostlist[] = "'" . trim($item) . "'";
+ }
+ }
+
+ $sql = 'SELECT site_ip, site_hostname
+ FROM ' . SITELIST_TABLE . "
+ WHERE ip_exclude = $ip_exclude";
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $iplist_tmp = array();
+ $hostlist_tmp = array();
+ do
+ {
+ if ($row['site_ip'])
+ {
+ if (strlen($row['site_ip']) > 40)
+ {
+ continue;
+ }
+
+ $iplist_tmp[] = "'" . $row['site_ip'] . "'";
+ }
+ else if ($row['site_hostname'])
+ {
+ if (strlen($row['site_hostname']) > 255)
+ {
+ continue;
+ }
+
+ $hostlist_tmp[] = "'" . $row['site_hostname'] . "'";
+ }
+ // break;
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ $iplist = array_unique(array_diff($iplist, $iplist_tmp));
+ $hostlist = array_unique(array_diff($hostlist, $hostlist_tmp));
+ unset($iplist_tmp);
+ unset($hostlist_tmp);
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($iplist))
+ {
+ foreach ($iplist as $ip_entry)
+ {
+ $sql = 'INSERT INTO ' . SITELIST_TABLE . " (site_ip, ip_exclude)
+ VALUES ($ip_entry, $ip_exclude)";
+ $db->sql_query($sql);
+ }
+ }
+
+ if (sizeof($hostlist))
+ {
+ foreach ($hostlist as $host_entry)
+ {
+ $sql = 'INSERT INTO ' . SITELIST_TABLE . " (site_hostname, ip_exclude)
+ VALUES ($host_entry, $ip_exclude)";
+ $db->sql_query($sql);
+ }
+ }
+
+ if (!empty($ip_list_log))
+ {
+ // Update log
+ $log_entry = ($ip_exclude) ? 'LOG_DOWNLOAD_EXCLUDE_IP' : 'LOG_DOWNLOAD_IP';
+ add_log('admin', $log_entry, $ip_list_log);
+ }
+
+ trigger_error($user->lang['SECURE_DOWNLOAD_UPDATE_SUCCESS'] . adm_back_link($this->u_action));
+ }
+ else if (isset($_POST['unsecuresubmit']))
+ {
+ $unip_sql = request_var('unip', array(0));
+
+ if (sizeof($unip_sql))
+ {
+ $l_unip_list = '';
+
+ // Grab details of ips for logging information later
+ $sql = 'SELECT site_ip, site_hostname
+ FROM ' . SITELIST_TABLE . '
+ WHERE ' . $db->sql_in_set('site_id', $unip_sql);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $l_unip_list .= (($l_unip_list != '') ? ', ' : '') . (($row['site_ip']) ? $row['site_ip'] : $row['site_hostname']);
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'DELETE FROM ' . SITELIST_TABLE . '
+ WHERE ' . $db->sql_in_set('site_id', $unip_sql);
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_DOWNLOAD_REMOVE_IP', $l_unip_list);
+ }
+
+ trigger_error($user->lang['SECURE_DOWNLOAD_UPDATE_SUCCESS'] . adm_back_link($this->u_action));
+ }
+ }
+
+ /**
+ * Write display_order config field
+ */
+ function display_order($value, $key = '')
+ {
+ $radio_ary = array(0 => 'DESCENDING', 1 => 'ASCENDING');
+
+ return h_radio('config[display_order]', $radio_ary, $value, $key);
+ }
+
+ /**
+ * Adjust all three max_filesize config vars for display
+ */
+ function max_filesize($value, $key = '')
+ {
+ // Determine size var and adjust the value accordingly
+ $filesize = get_formatted_filesize($value, false, array('mb', 'kb', 'b'));
+ $size_var = $filesize['si_identifier'];
+ $value = $filesize['value'];
+
+ return '<input type="text" id="' . $key . '" size="8" maxlength="15" name="config[' . $key . ']" value="' . $value . '" /> <select name="' . $key . '">' . size_select_options($size_var) . '</select>';
+ }
+
+ /**
+ * Write secure_allow_deny config field
+ */
+ function select_allow_deny($value, $key = '')
+ {
+ $radio_ary = array(1 => 'ORDER_ALLOW_DENY', 0 => 'ORDER_DENY_ALLOW');
+
+ return h_radio('config[' . $key . ']', $radio_ary, $value, $key);
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_ban.php b/phpBB/includes/acp/acp_ban.php
new file mode 100644
index 0000000000..3198376584
--- /dev/null
+++ b/phpBB/includes/acp/acp_ban.php
@@ -0,0 +1,252 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_ban
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template, $cache;
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
+
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ $bansubmit = (isset($_POST['bansubmit'])) ? true : false;
+ $unbansubmit = (isset($_POST['unbansubmit'])) ? true : false;
+ $current_time = time();
+
+ $user->add_lang(array('acp/ban', 'acp/users'));
+ $this->tpl_name = 'acp_ban';
+ $form_key = 'acp_ban';
+ add_form_key($form_key);
+
+ if (($bansubmit || $unbansubmit) && !check_form_key($form_key))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // Ban submitted?
+ if ($bansubmit)
+ {
+ // Grab the list of entries
+ $ban = utf8_normalize_nfc(request_var('ban', '', true));
+ $ban_len = request_var('banlength', 0);
+ $ban_len_other = request_var('banlengthother', '');
+ $ban_exclude = request_var('banexclude', 0);
+ $ban_reason = utf8_normalize_nfc(request_var('banreason', '', true));
+ $ban_give_reason = utf8_normalize_nfc(request_var('bangivereason', '', true));
+
+ if ($ban)
+ {
+ user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
+
+ trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . adm_back_link($this->u_action));
+ }
+ }
+ else if ($unbansubmit)
+ {
+ $ban = request_var('unban', array(''));
+
+ if ($ban)
+ {
+ user_unban($mode, $ban);
+
+ trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . adm_back_link($this->u_action));
+ }
+ }
+
+ // Define language vars
+ $this->page_title = $user->lang[strtoupper($mode) . '_BAN'];
+
+ $l_ban_explain = $user->lang[strtoupper($mode) . '_BAN_EXPLAIN'];
+ $l_ban_exclude_explain = $user->lang[strtoupper($mode) . '_BAN_EXCLUDE_EXPLAIN'];
+ $l_unban_title = $user->lang[strtoupper($mode) . '_UNBAN'];
+ $l_unban_explain = $user->lang[strtoupper($mode) . '_UNBAN_EXPLAIN'];
+ $l_no_ban_cell = $user->lang[strtoupper($mode) . '_NO_BANNED'];
+
+ switch ($mode)
+ {
+ case 'user':
+ $l_ban_cell = $user->lang['USERNAME'];
+ break;
+
+ case 'ip':
+ $l_ban_cell = $user->lang['IP_HOSTNAME'];
+ break;
+
+ case 'email':
+ $l_ban_cell = $user->lang['EMAIL_ADDRESS'];
+ break;
+ }
+
+ $this->display_ban_options($mode);
+
+ $template->assign_vars(array(
+ 'L_TITLE' => $this->page_title,
+ 'L_EXPLAIN' => $l_ban_explain,
+ 'L_UNBAN_TITLE' => $l_unban_title,
+ 'L_UNBAN_EXPLAIN' => $l_unban_explain,
+ 'L_BAN_CELL' => $l_ban_cell,
+ 'L_BAN_EXCLUDE_EXPLAIN' => $l_ban_exclude_explain,
+ 'L_NO_BAN_CELL' => $l_no_ban_cell,
+
+ 'S_USERNAME_BAN' => ($mode == 'user') ? true : false,
+
+ 'U_ACTION' => $this->u_action,
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=acp_ban&amp;field=ban'),
+ ));
+ }
+
+ /**
+ * Display ban options
+ */
+ function display_ban_options($mode)
+ {
+ global $user, $db, $template;
+
+ // Ban length options
+ $ban_end_text = array(0 => $user->lang['PERMANENT'], 30 => $user->lang['30_MINS'], 60 => $user->lang['1_HOUR'], 360 => $user->lang['6_HOURS'], 1440 => $user->lang['1_DAY'], 10080 => $user->lang['7_DAYS'], 20160 => $user->lang['2_WEEKS'], 40320 => $user->lang['1_MONTH'], -1 => $user->lang['UNTIL'] . ' -&gt; ');
+
+ $ban_end_options = '';
+ foreach ($ban_end_text as $length => $text)
+ {
+ $ban_end_options .= '<option value="' . $length . '">' . $text . '</option>';
+ }
+
+ switch ($mode)
+ {
+ case 'user':
+
+ $field = 'username';
+ $l_ban_cell = $user->lang['USERNAME'];
+
+ $sql = 'SELECT b.*, u.user_id, u.username, u.username_clean
+ FROM ' . BANLIST_TABLE . ' b, ' . USERS_TABLE . ' u
+ WHERE (b.ban_end >= ' . time() . '
+ OR b.ban_end = 0)
+ AND u.user_id = b.ban_userid
+ ORDER BY u.username_clean ASC';
+ break;
+
+ case 'ip':
+
+ $field = 'ban_ip';
+ $l_ban_cell = $user->lang['IP_HOSTNAME'];
+
+ $sql = 'SELECT *
+ FROM ' . BANLIST_TABLE . '
+ WHERE (ban_end >= ' . time() . "
+ OR ban_end = 0)
+ AND ban_ip <> ''
+ ORDER BY ban_ip";
+ break;
+
+ case 'email':
+
+ $field = 'ban_email';
+ $l_ban_cell = $user->lang['EMAIL_ADDRESS'];
+
+ $sql = 'SELECT *
+ FROM ' . BANLIST_TABLE . '
+ WHERE (ban_end >= ' . time() . "
+ OR ban_end = 0)
+ AND ban_email <> ''
+ ORDER BY ban_email";
+ break;
+ }
+ $result = $db->sql_query($sql);
+
+ $banned_options = '';
+ $ban_length = $ban_reasons = $ban_give_reasons = array();
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $banned_options .= '<option' . (($row['ban_exclude']) ? ' class="sep"' : '') . ' value="' . $row['ban_id'] . '">' . $row[$field] . '</option>';
+
+ $time_length = ($row['ban_end']) ? ($row['ban_end'] - $row['ban_start']) / 60 : 0;
+
+ if ($time_length == 0)
+ {
+ // Banned permanently
+ $ban_length[$row['ban_id']] = $user->lang['PERMANENT'];
+ }
+ else if (isset($ban_end_text[$time_length]))
+ {
+ // Banned for a given duration
+ $ban_length[$row['ban_id']] = sprintf($user->lang['BANNED_UNTIL_DURATION'], $ban_end_text[$time_length], $user->format_date($row['ban_end'], false, true));
+ }
+ else
+ {
+ // Banned until given date
+ $ban_length[$row['ban_id']] = sprintf($user->lang['BANNED_UNTIL_DATE'], $user->format_date($row['ban_end'], false, true));
+ }
+
+ $ban_reasons[$row['ban_id']] = $row['ban_reason'];
+ $ban_give_reasons[$row['ban_id']] = $row['ban_give_reason'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($ban_length))
+ {
+ foreach ($ban_length as $ban_id => $length)
+ {
+ $template->assign_block_vars('ban_length', array(
+ 'BAN_ID' => (int) $ban_id,
+ 'LENGTH' => $length,
+ 'A_LENGTH' => addslashes($length),
+ ));
+ }
+ }
+
+ if (sizeof($ban_reasons))
+ {
+ foreach ($ban_reasons as $ban_id => $reason)
+ {
+ $template->assign_block_vars('ban_reason', array(
+ 'BAN_ID' => $ban_id,
+ 'REASON' => $reason,
+ 'A_REASON' => addslashes(htmlspecialchars_decode($reason)),
+ ));
+ }
+ }
+
+ if (sizeof($ban_give_reasons))
+ {
+ foreach ($ban_give_reasons as $ban_id => $reason)
+ {
+ $template->assign_block_vars('ban_give_reason', array(
+ 'BAN_ID' => $ban_id,
+ 'REASON' => $reason,
+ 'A_REASON' => addslashes(htmlspecialchars_decode($reason)),
+ ));
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_BAN_END_OPTIONS' => $ban_end_options,
+ 'S_BANNED_OPTIONS' => ($banned_options) ? true : false,
+ 'BANNED_OPTIONS' => $banned_options)
+ );
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
new file mode 100644
index 0000000000..b827d1107e
--- /dev/null
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -0,0 +1,443 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_bbcodes
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template, $cache;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ $user->add_lang('acp/posting');
+
+ // Set up general vars
+ $action = request_var('action', '');
+ $bbcode_id = request_var('bbcode', 0);
+
+ $this->tpl_name = 'acp_bbcodes';
+ $this->page_title = 'ACP_BBCODES';
+ $form_key = 'acp_bbcodes';
+
+ add_form_key($form_key);
+
+ // Set up mode-specific vars
+ switch ($action)
+ {
+ case 'add':
+ $bbcode_match = $bbcode_tpl = $bbcode_helpline = '';
+ $display_on_posting = 0;
+ break;
+
+ case 'edit':
+ $sql = 'SELECT bbcode_match, bbcode_tpl, display_on_posting, bbcode_helpline
+ FROM ' . BBCODES_TABLE . '
+ WHERE bbcode_id = ' . $bbcode_id;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error($user->lang['BBCODE_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $bbcode_match = $row['bbcode_match'];
+ $bbcode_tpl = htmlspecialchars($row['bbcode_tpl']);
+ $display_on_posting = $row['display_on_posting'];
+ $bbcode_helpline = $row['bbcode_helpline'];
+ break;
+
+ case 'modify':
+ $sql = 'SELECT bbcode_id, bbcode_tag
+ FROM ' . BBCODES_TABLE . '
+ WHERE bbcode_id = ' . $bbcode_id;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error($user->lang['BBCODE_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // No break here
+
+ case 'create':
+ $display_on_posting = request_var('display_on_posting', 0);
+
+ $bbcode_match = request_var('bbcode_match', '');
+ $bbcode_tpl = htmlspecialchars_decode(utf8_normalize_nfc(request_var('bbcode_tpl', '', true)));
+ $bbcode_helpline = utf8_normalize_nfc(request_var('bbcode_helpline', '', true));
+ break;
+ }
+
+ // Do major work
+ switch ($action)
+ {
+ case 'edit':
+ case 'add':
+
+ $template->assign_vars(array(
+ 'S_EDIT_BBCODE' => true,
+ 'U_BACK' => $this->u_action,
+ 'U_ACTION' => $this->u_action . '&amp;action=' . (($action == 'add') ? 'create' : 'modify') . (($bbcode_id) ? "&amp;bbcode=$bbcode_id" : ''),
+
+ 'L_BBCODE_USAGE_EXPLAIN'=> sprintf($user->lang['BBCODE_USAGE_EXPLAIN'], '<a href="#down">', '</a>'),
+ 'BBCODE_MATCH' => $bbcode_match,
+ 'BBCODE_TPL' => $bbcode_tpl,
+ 'BBCODE_HELPLINE' => $bbcode_helpline,
+ 'DISPLAY_ON_POSTING' => $display_on_posting)
+ );
+
+ foreach ($user->lang['tokens'] as $token => $token_explain)
+ {
+ $template->assign_block_vars('token', array(
+ 'TOKEN' => '{' . $token . '}',
+ 'EXPLAIN' => $token_explain)
+ );
+ }
+
+ return;
+
+ break;
+
+ case 'modify':
+ case 'create':
+
+ $data = $this->build_regexp($bbcode_match, $bbcode_tpl);
+
+ // Make sure the user didn't pick a "bad" name for the BBCode tag.
+ $hard_coded = array('code', 'quote', 'quote=', 'attachment', 'attachment=', 'b', 'i', 'url', 'url=', 'img', 'size', 'size=', 'color', 'color=', 'u', 'list', 'list=', 'email', 'email=', 'flash', 'flash=');
+
+ if (($action == 'modify' && strtolower($data['bbcode_tag']) !== strtolower($row['bbcode_tag'])) || ($action == 'create'))
+ {
+ $sql = 'SELECT 1 as test
+ FROM ' . BBCODES_TABLE . "
+ WHERE LOWER(bbcode_tag) = '" . $db->sql_escape(strtolower($data['bbcode_tag'])) . "'";
+ $result = $db->sql_query($sql);
+ $info = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // Grab the end, interrogate the last closing tag
+ if ($info['test'] === '1' || in_array(strtolower($data['bbcode_tag']), $hard_coded) || (preg_match('#\[/([^[]*)]$#', $bbcode_match, $regs) && in_array(strtolower($regs[1]), $hard_coded)))
+ {
+ trigger_error($user->lang['BBCODE_INVALID_TAG_NAME'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+
+ if (substr($data['bbcode_tag'], -1) === '=')
+ {
+ $test = substr($data['bbcode_tag'], 0, -1);
+ }
+ else
+ {
+ $test = $data['bbcode_tag'];
+ }
+
+ if (!preg_match('%\\[' . $test . '[^]]*].*?\\[/' . $test . ']%s', $bbcode_match))
+ {
+ trigger_error($user->lang['BBCODE_OPEN_ENDED_TAG'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (strlen($data['bbcode_tag']) > 16)
+ {
+ trigger_error($user->lang['BBCODE_TAG_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (strlen($bbcode_match) > 4000)
+ {
+ trigger_error($user->lang['BBCODE_TAG_DEF_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+
+ if (strlen($bbcode_helpline) > 255)
+ {
+ trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql_ary = array(
+ 'bbcode_tag' => $data['bbcode_tag'],
+ 'bbcode_match' => $bbcode_match,
+ 'bbcode_tpl' => $bbcode_tpl,
+ 'display_on_posting' => $display_on_posting,
+ 'bbcode_helpline' => $bbcode_helpline,
+ 'first_pass_match' => $data['first_pass_match'],
+ 'first_pass_replace' => $data['first_pass_replace'],
+ 'second_pass_match' => $data['second_pass_match'],
+ 'second_pass_replace' => $data['second_pass_replace']
+ );
+
+ if ($action == 'create')
+ {
+ $sql = 'SELECT MAX(bbcode_id) as max_bbcode_id
+ FROM ' . BBCODES_TABLE;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ $bbcode_id = $row['max_bbcode_id'] + 1;
+
+ // Make sure it is greater than the core bbcode ids...
+ if ($bbcode_id <= NUM_CORE_BBCODES)
+ {
+ $bbcode_id = NUM_CORE_BBCODES + 1;
+ }
+ }
+ else
+ {
+ $bbcode_id = NUM_CORE_BBCODES + 1;
+ }
+
+ if ($bbcode_id > 1511)
+ {
+ trigger_error($user->lang['TOO_MANY_BBCODES'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql_ary['bbcode_id'] = (int) $bbcode_id;
+
+ $db->sql_query('INSERT INTO ' . BBCODES_TABLE . $db->sql_build_array('INSERT', $sql_ary));
+ $cache->destroy('sql', BBCODES_TABLE);
+
+ $lang = 'BBCODE_ADDED';
+ $log_action = 'LOG_BBCODE_ADD';
+ }
+ else
+ {
+ $sql = 'UPDATE ' . BBCODES_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE bbcode_id = ' . $bbcode_id;
+ $db->sql_query($sql);
+ $cache->destroy('sql', BBCODES_TABLE);
+
+ $lang = 'BBCODE_EDITED';
+ $log_action = 'LOG_BBCODE_EDIT';
+ }
+
+ add_log('admin', $log_action, $data['bbcode_tag']);
+
+ trigger_error($user->lang[$lang] . adm_back_link($this->u_action));
+
+ break;
+
+ case 'delete':
+
+ $sql = 'SELECT bbcode_tag
+ FROM ' . BBCODES_TABLE . "
+ WHERE bbcode_id = $bbcode_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ if (confirm_box(true))
+ {
+ $db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id");
+ $cache->destroy('sql', BBCODES_TABLE);
+ add_log('admin', 'LOG_BBCODE_DELETE', $row['bbcode_tag']);
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'bbcode' => $bbcode_id,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action))
+ );
+ }
+ }
+
+ break;
+ }
+
+ $template->assign_vars(array(
+ 'U_ACTION' => $this->u_action . '&amp;action=add')
+ );
+
+ $sql = 'SELECT *
+ FROM ' . BBCODES_TABLE . '
+ ORDER BY bbcode_tag';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $template->assign_block_vars('bbcodes', array(
+ 'BBCODE_TAG' => $row['bbcode_tag'],
+ 'U_EDIT' => $this->u_action . '&amp;action=edit&amp;bbcode=' . $row['bbcode_id'],
+ 'U_DELETE' => $this->u_action . '&amp;action=delete&amp;bbcode=' . $row['bbcode_id'])
+ );
+ }
+ $db->sql_freeresult($result);
+ }
+
+ /*
+ * Build regular expression for custom bbcode
+ */
+ function build_regexp(&$bbcode_match, &$bbcode_tpl)
+ {
+ $bbcode_match = trim($bbcode_match);
+ $bbcode_tpl = trim($bbcode_tpl);
+
+ $fp_match = preg_quote($bbcode_match, '!');
+ $fp_replace = preg_replace('#^\[(.*?)\]#', '[$1:$uid]', $bbcode_match);
+ $fp_replace = preg_replace('#\[/(.*?)\]$#', '[/$1:$uid]', $fp_replace);
+
+ $sp_match = preg_quote($bbcode_match, '!');
+ $sp_match = preg_replace('#^\\\\\[(.*?)\\\\\]#', '\[$1:$uid\]', $sp_match);
+ $sp_match = preg_replace('#\\\\\[/(.*?)\\\\\]$#', '\[/$1:$uid\]', $sp_match);
+ $sp_replace = $bbcode_tpl;
+
+ // @todo Make sure to change this too if something changed in message parsing
+ $tokens = array(
+ 'URL' => array(
+ '!(?:(' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('url')) . ')|(' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('www_url')) . '))!ie' => "\$this->bbcode_specialchars(('\$1') ? '\$1' : 'http://\$2')"
+ ),
+ 'LOCAL_URL' => array(
+ '!(' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('relative_url')) . ')!e' => "\$this->bbcode_specialchars('$1')"
+ ),
+ 'EMAIL' => array(
+ '!(' . get_preg_expression('email') . ')!ie' => "\$this->bbcode_specialchars('$1')"
+ ),
+ 'TEXT' => array(
+ '!(.*?)!es' => "str_replace(array(\"\\r\\n\", '\\\"', '\\'', '(', ')'), array(\"\\n\", '\"', '&#39;', '&#40;', '&#41;'), trim('\$1'))"
+ ),
+ 'SIMPLETEXT' => array(
+ '!([a-zA-Z0-9-+.,_ ]+)!' => "$1"
+ ),
+ 'IDENTIFIER' => array(
+ '!([a-zA-Z0-9-_]+)!' => "$1"
+ ),
+ 'COLOR' => array(
+ '!([a-z]+|#[0-9abcdef]+)!i' => '$1'
+ ),
+ 'NUMBER' => array(
+ '!([0-9]+)!' => '$1'
+ )
+ );
+
+ $sp_tokens = array(
+ 'URL' => '(?i)((?:' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('url')) . ')|(?:' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('www_url')) . '))(?-i)',
+ 'LOCAL_URL' => '(?i)(' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('relative_url')) . ')(?-i)',
+ 'EMAIL' => '(' . get_preg_expression('email') . ')',
+ 'TEXT' => '(.*?)',
+ 'SIMPLETEXT' => '([a-zA-Z0-9-+.,_ ]+)',
+ 'IDENTIFIER' => '([a-zA-Z0-9-_]+)',
+ 'COLOR' => '([a-zA-Z]+|#[0-9abcdefABCDEF]+)',
+ 'NUMBER' => '([0-9]+)',
+ );
+
+ $pad = 0;
+ $modifiers = 'i';
+
+ if (preg_match_all('/\{(' . implode('|', array_keys($tokens)) . ')[0-9]*\}/i', $bbcode_match, $m))
+ {
+ foreach ($m[0] as $n => $token)
+ {
+ $token_type = $m[1][$n];
+
+ reset($tokens[strtoupper($token_type)]);
+ list($match, $replace) = each($tokens[strtoupper($token_type)]);
+
+ // Pad backreference numbers from tokens
+ if (preg_match_all('/(?<!\\\\)\$([0-9]+)/', $replace, $repad))
+ {
+ $repad = $pad + sizeof(array_unique($repad[0]));
+ $replace = preg_replace('/(?<!\\\\)\$([0-9]+)/e', "'\${' . (\$1 + \$pad) . '}'", $replace);
+ $pad = $repad;
+ }
+
+ // Obtain pattern modifiers to use and alter the regex accordingly
+ $regex = preg_replace('/!(.*)!([a-z]*)/', '$1', $match);
+ $regex_modifiers = preg_replace('/!(.*)!([a-z]*)/', '$2', $match);
+
+ for ($i = 0, $size = strlen($regex_modifiers); $i < $size; ++$i)
+ {
+ if (strpos($modifiers, $regex_modifiers[$i]) === false)
+ {
+ $modifiers .= $regex_modifiers[$i];
+
+ if ($regex_modifiers[$i] == 'e')
+ {
+ $fp_replace = "'" . str_replace("'", "\\'", $fp_replace) . "'";
+ }
+ }
+
+ if ($regex_modifiers[$i] == 'e')
+ {
+ $replace = "'.$replace.'";
+ }
+ }
+
+ $fp_match = str_replace(preg_quote($token, '!'), $regex, $fp_match);
+ $fp_replace = str_replace($token, $replace, $fp_replace);
+
+ $sp_match = str_replace(preg_quote($token, '!'), $sp_tokens[$token_type], $sp_match);
+ $sp_replace = str_replace($token, '${' . ($n + 1) . '}', $sp_replace);
+ }
+
+ $fp_match = '!' . $fp_match . '!' . $modifiers;
+ $sp_match = '!' . $sp_match . '!s';
+
+ if (strpos($fp_match, 'e') !== false)
+ {
+ $fp_replace = str_replace("'.'", '', $fp_replace);
+ $fp_replace = str_replace(".''.", '.', $fp_replace);
+ }
+ }
+ else
+ {
+ // No replacement is present, no need for a second-pass pattern replacement
+ // A simple str_replace will suffice
+ $fp_match = '!' . $fp_match . '!' . $modifiers;
+ $sp_match = $fp_replace;
+ $sp_replace = '';
+ }
+
+ // Lowercase tags
+ $bbcode_tag = preg_replace('/.*?\[([a-z0-9_-]+=?).*/i', '$1', $bbcode_match);
+ $bbcode_search = preg_replace('/.*?\[([a-z0-9_-]+)=?.*/i', '$1', $bbcode_match);
+
+ if (!preg_match('/^[a-zA-Z0-9_-]+=?$/', $bbcode_tag))
+ {
+ global $user;
+ trigger_error($user->lang['BBCODE_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $fp_match = preg_replace('#\[/?' . $bbcode_search . '#ie', "strtolower('\$0')", $fp_match);
+ $fp_replace = preg_replace('#\[/?' . $bbcode_search . '#ie', "strtolower('\$0')", $fp_replace);
+ $sp_match = preg_replace('#\[/?' . $bbcode_search . '#ie', "strtolower('\$0')", $sp_match);
+ $sp_replace = preg_replace('#\[/?' . $bbcode_search . '#ie', "strtolower('\$0')", $sp_replace);
+
+ return array(
+ 'bbcode_tag' => $bbcode_tag,
+ 'first_pass_match' => $fp_match,
+ 'first_pass_replace' => $fp_replace,
+ 'second_pass_match' => $sp_match,
+ 'second_pass_replace' => $sp_replace
+ );
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
new file mode 100644
index 0000000000..9f0bcf210f
--- /dev/null
+++ b/phpBB/includes/acp/acp_board.php
@@ -0,0 +1,957 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+* @todo add cron intervals to server settings? (database_gc, queue_interval, session_gc, search_gc, cache_gc, warnings_gc)
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_board
+{
+ var $u_action;
+ var $new_config = array();
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ $user->add_lang('acp/board');
+
+ $action = request_var('action', '');
+ $submit = (isset($_POST['submit'])) ? true : false;
+
+ $form_key = 'acp_board';
+ add_form_key($form_key);
+
+ /**
+ * Validation types are:
+ * string, int, bool,
+ * script_path (absolute path in url - beginning with / and no trailing slash),
+ * rpath (relative), rwpath (realtive, writable), path (relative path, but able to escape the root), wpath (writable)
+ */
+ switch ($mode)
+ {
+ case 'settings':
+ $display_vars = array(
+ 'title' => 'ACP_BOARD_SETTINGS',
+ 'vars' => array(
+ 'legend1' => 'ACP_BOARD_SETTINGS',
+ 'sitename' => array('lang' => 'SITE_NAME', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
+ 'site_desc' => array('lang' => 'SITE_DESC', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
+ 'board_disable' => array('lang' => 'DISABLE_BOARD', 'validate' => 'bool', 'type' => 'custom', 'method' => 'board_disable', 'explain' => true),
+ 'board_disable_msg' => false,
+ 'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'validate' => 'lang', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
+ 'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'validate' => 'string', 'type' => 'custom', 'method' => 'dateformat_select', 'explain' => true),
+ 'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'validate' => 'string', 'type' => 'select', 'function' => 'tz_select', 'params' => array('{CONFIG_VALUE}', 1), 'explain' => false),
+ 'board_dst' => array('lang' => 'SYSTEM_DST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'default_style' => array('lang' => 'DEFAULT_STYLE', 'validate' => 'int', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', false), 'explain' => false),
+ 'override_user_style' => array('lang' => 'OVERRIDE_STYLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+
+ 'legend2' => 'WARNINGS',
+ 'warnings_expire_days' => array('lang' => 'WARNINGS_EXPIRE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
+
+ 'legend3' => 'ACP_SUBMIT_CHANGES',
+ )
+ );
+ break;
+
+ case 'features':
+ $display_vars = array(
+ 'title' => 'ACP_BOARD_FEATURES',
+ 'vars' => array(
+ 'legend1' => 'ACP_BOARD_FEATURES',
+ 'allow_privmsg' => array('lang' => 'BOARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_pm_report' => array('lang' => 'ALLOW_PM_REPORT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_sig' => array('lang' => 'ALLOW_SIG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_birthdays' => array('lang' => 'ALLOW_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+
+ 'legend2' => 'ACP_LOAD_SETTINGS',
+ 'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_moderators' => array('lang' => 'YES_MODERATORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+
+ 'legend3' => 'ACP_SUBMIT_CHANGES',
+ )
+ );
+ break;
+
+ case 'avatar':
+ $display_vars = array(
+ 'title' => 'ACP_AVATAR_SETTINGS',
+ 'vars' => array(
+ 'legend1' => 'ACP_AVATAR_SETTINGS',
+
+ 'avatar_min_width' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
+ 'avatar_min_height' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
+ 'avatar_max_width' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
+ 'avatar_max_height' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
+
+ 'allow_avatar' => array('lang' => 'ALLOW_AVATARS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_avatar_local' => array('lang' => 'ALLOW_LOCAL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_avatar_remote' => array('lang' => 'ALLOW_REMOTE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_avatar_upload' => array('lang' => 'ALLOW_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_avatar_remote_upload'=> array('lang' => 'ALLOW_REMOTE_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'avatar_filesize' => array('lang' => 'MAX_FILESIZE', 'validate' => 'int:0', 'type' => 'text:4:10', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
+ 'avatar_min' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
+ 'avatar_max' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
+ 'avatar_path' => array('lang' => 'AVATAR_STORAGE_PATH', 'validate' => 'rwpath', 'type' => 'text:20:255', 'explain' => true),
+ 'avatar_gallery_path' => array('lang' => 'AVATAR_GALLERY_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true)
+ )
+ );
+ break;
+
+ case 'message':
+ $display_vars = array(
+ 'title' => 'ACP_MESSAGE_SETTINGS',
+ 'lang' => 'ucp',
+ 'vars' => array(
+ 'legend1' => 'GENERAL_SETTINGS',
+ 'allow_privmsg' => array('lang' => 'BOARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'pm_max_boxes' => array('lang' => 'BOXES_MAX', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
+ 'pm_max_msgs' => array('lang' => 'BOXES_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
+ 'full_folder_action' => array('lang' => 'FULL_FOLDER_ACTION', 'validate' => 'int', 'type' => 'select', 'method' => 'full_folder_select', 'explain' => true),
+ 'pm_edit_time' => array('lang' => 'PM_EDIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
+ 'pm_max_recipients' => array('lang' => 'PM_MAX_RECIPIENTS', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true),
+
+ 'legend2' => 'GENERAL_OPTIONS',
+ 'allow_mass_pm' => array('lang' => 'ALLOW_MASS_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'auth_bbcode_pm' => array('lang' => 'ALLOW_BBCODE_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'auth_smilies_pm' => array('lang' => 'ALLOW_SMILIES_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_sig_pm' => array('lang' => 'ALLOW_SIG_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'print_pm' => array('lang' => 'ALLOW_PRINT_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'forward_pm' => array('lang' => 'ALLOW_FORWARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'auth_img_pm' => array('lang' => 'ALLOW_IMG_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'auth_flash_pm' => array('lang' => 'ALLOW_FLASH_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'enable_pm_icons' => array('lang' => 'ENABLE_PM_ICONS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+
+ 'legend3' => 'ACP_SUBMIT_CHANGES',
+ )
+ );
+ break;
+
+ case 'post':
+ $display_vars = array(
+ 'title' => 'ACP_POST_SETTINGS',
+ 'vars' => array(
+ 'legend1' => 'GENERAL_OPTIONS',
+ 'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_post_flash' => array('lang' => 'ALLOW_POST_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_post_links' => array('lang' => 'ALLOW_POST_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'enable_post_confirm' => array('lang' => 'VISUAL_CONFIRM_POST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+
+ 'legend2' => 'POSTING',
+ 'bump_type' => false,
+ 'edit_time' => array('lang' => 'EDIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
+ 'delete_time' => array('lang' => 'DELETE_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
+ 'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'validate' => 'int:0', 'type' => 'text:3:10', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
+ 'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'validate' => 'int:0', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true),
+ 'topics_per_page' => array('lang' => 'TOPICS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
+ 'posts_per_page' => array('lang' => 'POSTS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
+ 'smilies_per_page' => array('lang' => 'SMILIES_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
+ 'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'validate' => 'int:0', 'type' => 'text:3:4', 'explain' => true),
+ 'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'validate' => 'int:2:127', 'type' => 'text:4:4', 'explain' => false),
+ 'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true),
+ 'min_post_chars' => array('lang' => 'MIN_CHAR_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true),
+ 'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
+ 'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
+ 'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' %'),
+ 'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
+ 'max_post_img_width' => array('lang' => 'MAX_POST_IMG_WIDTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
+ 'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
+
+ 'legend3' => 'ACP_SUBMIT_CHANGES',
+ )
+ );
+ break;
+
+ case 'signature':
+ $display_vars = array(
+ 'title' => 'ACP_SIGNATURE_SETTINGS',
+ 'vars' => array(
+ 'legend1' => 'GENERAL_OPTIONS',
+ 'allow_sig' => array('lang' => 'ALLOW_SIG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_sig_bbcode' => array('lang' => 'ALLOW_SIG_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_sig_img' => array('lang' => 'ALLOW_SIG_IMG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_sig_flash' => array('lang' => 'ALLOW_SIG_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_sig_smilies' => array('lang' => 'ALLOW_SIG_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_sig_links' => array('lang' => 'ALLOW_SIG_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+
+ 'legend2' => 'GENERAL_SETTINGS',
+ 'max_sig_chars' => array('lang' => 'MAX_SIG_LENGTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
+ 'max_sig_urls' => array('lang' => 'MAX_SIG_URLS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
+ 'max_sig_font_size' => array('lang' => 'MAX_SIG_FONT_SIZE', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' %'),
+ 'max_sig_smilies' => array('lang' => 'MAX_SIG_SMILIES', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
+ 'max_sig_img_width' => array('lang' => 'MAX_SIG_IMG_WIDTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
+ 'max_sig_img_height' => array('lang' => 'MAX_SIG_IMG_HEIGHT', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
+
+ 'legend3' => 'ACP_SUBMIT_CHANGES',
+ )
+ );
+ break;
+
+ case 'registration':
+ $display_vars = array(
+ 'title' => 'ACP_REGISTER_SETTINGS',
+ 'vars' => array(
+ 'legend1' => 'GENERAL_SETTINGS',
+ 'max_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:8:180', 'type' => false, 'method' => false, 'explain' => false,),
+ 'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,),
+
+ 'require_activation' => array('lang' => 'ACC_ACTIVATION', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_acc_activation', 'explain' => true),
+ 'new_member_post_limit' => array('lang' => 'NEW_MEMBER_POST_LIMIT', 'validate' => 'int:0:255', 'type' => 'text:4:4', 'explain' => true, 'append' => ' ' . $user->lang['POSTS']),
+ 'new_member_group_default'=> array('lang' => 'NEW_MEMBER_GROUP_DEFAULT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'min_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:1', 'type' => 'custom:5:180', 'method' => 'username_length', 'explain' => true),
+ 'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:1', 'type' => 'custom', 'method' => 'password_length', 'explain' => true),
+ 'allow_name_chars' => array('lang' => 'USERNAME_CHARS', 'validate' => 'string', 'type' => 'select', 'method' => 'select_username_chars', 'explain' => true),
+ 'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
+ 'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
+
+ 'legend2' => 'GENERAL_OPTIONS',
+ 'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_emailreuse' => array('lang' => 'ALLOW_EMAIL_REUSE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'enable_confirm' => array('lang' => 'VISUAL_CONFIRM_REG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true),
+ 'max_reg_attempts' => array('lang' => 'REG_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
+
+ 'legend3' => 'COPPA',
+ 'coppa_enable' => array('lang' => 'ENABLE_COPPA', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'coppa_mail' => array('lang' => 'COPPA_MAIL', 'validate' => 'string', 'type' => 'textarea:5:40', 'explain' => true),
+ 'coppa_fax' => array('lang' => 'COPPA_FAX', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => false),
+
+ 'legend4' => 'ACP_SUBMIT_CHANGES',
+ )
+ );
+ break;
+
+ case 'feed':
+ $display_vars = array(
+ 'title' => 'ACP_FEED_MANAGEMENT',
+ 'vars' => array(
+ 'legend1' => 'ACP_FEED_GENERAL',
+ 'feed_enable' => array('lang' => 'ACP_FEED_ENABLE', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
+ 'feed_item_statistics' => array('lang' => 'ACP_FEED_ITEM_STATISTICS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
+ 'feed_limit' => array('lang' => 'ACP_FEED_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => true),
+ 'feed_overall_forums' => array('lang' => 'ACP_FEED_OVERALL_FORUMS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
+ 'feed_overall_forums_limit' => array('lang' => 'ACP_FEED_OVERALL_FORUMS_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => false),
+ 'feed_overall_topics' => array('lang' => 'ACP_FEED_OVERALL_TOPIC', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
+ 'feed_overall_topics_limit' => array('lang' => 'ACP_FEED_OVERALL_TOPIC_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => false),
+ 'feed_forum' => array('lang' => 'ACP_FEED_FORUM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
+ 'feed_topic' => array('lang' => 'ACP_FEED_TOPIC', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
+ 'feed_news_id' => array('lang' => 'ACP_FEED_NEWS', 'validate' => 'string', 'type' => 'custom', 'method' => 'select_news_forums', 'explain' => true),
+ 'feed_exclude_id' => array('lang' => 'ACP_FEED_EXCLUDE_ID', 'validate' => 'string', 'type' => 'custom', 'method' => 'select_exclude_forums', 'explain' => true),
+ )
+ );
+ break;
+
+ case 'cookie':
+ $display_vars = array(
+ 'title' => 'ACP_COOKIE_SETTINGS',
+ 'vars' => array(
+ 'legend1' => 'ACP_COOKIE_SETTINGS',
+ 'cookie_domain' => array('lang' => 'COOKIE_DOMAIN', 'validate' => 'string', 'type' => 'text::255', 'explain' => false),
+ 'cookie_name' => array('lang' => 'COOKIE_NAME', 'validate' => 'string', 'type' => 'text::16', 'explain' => false),
+ 'cookie_path' => array('lang' => 'COOKIE_PATH', 'validate' => 'string', 'type' => 'text::255', 'explain' => false),
+ 'cookie_secure' => array('lang' => 'COOKIE_SECURE', 'validate' => 'bool', 'type' => 'radio:disabled_enabled', 'explain' => true)
+ )
+ );
+ break;
+
+ case 'load':
+ $display_vars = array(
+ 'title' => 'ACP_LOAD_SETTINGS',
+ 'vars' => array(
+ 'legend1' => 'GENERAL_SETTINGS',
+ 'limit_load' => array('lang' => 'LIMIT_LOAD', 'validate' => 'string', 'type' => 'text:4:4', 'explain' => true),
+ 'session_length' => array('lang' => 'SESSION_LENGTH', 'validate' => 'int:60', 'type' => 'text:5:10', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
+ 'active_sessions' => array('lang' => 'LIMIT_SESSIONS', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
+ 'load_online_time' => array('lang' => 'ONLINE_LENGTH', 'validate' => 'int:0', 'type' => 'text:4:3', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
+
+ 'legend2' => 'GENERAL_OPTIONS',
+ 'load_db_track' => array('lang' => 'YES_POST_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_db_lastread' => array('lang' => 'YES_READ_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_anon_lastread' => array('lang' => 'YES_ANON_READ_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_online' => array('lang' => 'YES_ONLINE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_online_guests' => array('lang' => 'YES_ONLINE_GUESTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_onlinetrack' => array('lang' => 'YES_ONLINE_TRACK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_moderators' => array('lang' => 'YES_MODERATORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_tplcompile' => array('lang' => 'RECOMPILE_STYLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+
+ 'legend3' => 'CUSTOM_PROFILE_FIELDS',
+ 'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+
+ 'legend4' => 'ACP_SUBMIT_CHANGES',
+ )
+ );
+ break;
+
+ case 'auth':
+ $display_vars = array(
+ 'title' => 'ACP_AUTH_SETTINGS',
+ 'vars' => array(
+ 'legend1' => 'ACP_AUTH_SETTINGS',
+ 'auth_method' => array('lang' => 'AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'select_auth_method', 'explain' => false)
+ )
+ );
+ break;
+
+ case 'server':
+ $display_vars = array(
+ 'title' => 'ACP_SERVER_SETTINGS',
+ 'vars' => array(
+ 'legend1' => 'ACP_SERVER_SETTINGS',
+ 'gzip_compress' => array('lang' => 'ENABLE_GZIP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+
+ 'legend2' => 'PATH_SETTINGS',
+ 'smilies_path' => array('lang' => 'SMILIES_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
+ 'icons_path' => array('lang' => 'ICONS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
+ 'upload_icons_path' => array('lang' => 'UPLOAD_ICONS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
+ 'ranks_path' => array('lang' => 'RANKS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
+
+ 'legend3' => 'SERVER_URL_SETTINGS',
+ 'force_server_vars' => array('lang' => 'FORCE_SERVER_VARS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'server_protocol' => array('lang' => 'SERVER_PROTOCOL', 'validate' => 'string', 'type' => 'text:10:10', 'explain' => true),
+ 'server_name' => array('lang' => 'SERVER_NAME', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
+ 'server_port' => array('lang' => 'SERVER_PORT', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true),
+ 'script_path' => array('lang' => 'SCRIPT_PATH', 'validate' => 'script_path', 'type' => 'text::255', 'explain' => true),
+
+ 'legend4' => 'ACP_SUBMIT_CHANGES',
+ )
+ );
+ break;
+
+ case 'security':
+ $display_vars = array(
+ 'title' => 'ACP_SECURITY_SETTINGS',
+ 'vars' => array(
+ 'legend1' => 'ACP_SECURITY_SETTINGS',
+ 'allow_autologin' => array('lang' => 'ALLOW_AUTOLOGIN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'max_autologin_time' => array('lang' => 'AUTOLOGIN_LENGTH', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
+ 'ip_check' => array('lang' => 'IP_VALID', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_ip_check', 'explain' => true),
+ 'browser_check' => array('lang' => 'BROWSER_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'forwarded_for_check' => array('lang' => 'FORWARDED_FOR_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'referer_validation' => array('lang' => 'REFERER_VALID', 'validate' => 'int:0:3','type' => 'custom', 'method' => 'select_ref_check', 'explain' => true),
+ 'check_dnsbl' => array('lang' => 'CHECK_DNSBL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'email_check_mx' => array('lang' => 'EMAIL_CHECK_MX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
+ 'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
+ 'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true),
+ 'tpl_allow_php' => array('lang' => 'TPL_ALLOW_PHP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'form_token_lifetime' => array('lang' => 'FORM_TIME_MAX', 'validate' => 'int:-1', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
+ 'form_token_sid_guests' => array('lang' => 'FORM_SID_GUESTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+
+ )
+ );
+ break;
+
+ case 'email':
+ $display_vars = array(
+ 'title' => 'ACP_EMAIL_SETTINGS',
+ 'vars' => array(
+ 'legend1' => 'GENERAL_SETTINGS',
+ 'email_enable' => array('lang' => 'ENABLE_EMAIL', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
+ 'board_email_form' => array('lang' => 'BOARD_EMAIL_FORM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
+ 'email_function_name' => array('lang' => 'EMAIL_FUNCTION_NAME', 'validate' => 'string', 'type' => 'text:20:50', 'explain' => true),
+ 'email_package_size' => array('lang' => 'EMAIL_PACKAGE_SIZE', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true),
+ 'board_contact' => array('lang' => 'CONTACT_EMAIL', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => true),
+ 'board_email' => array('lang' => 'ADMIN_EMAIL', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => true),
+ 'board_email_sig' => array('lang' => 'EMAIL_SIG', 'validate' => 'string', 'type' => 'textarea:5:30', 'explain' => true),
+ 'board_hide_emails' => array('lang' => 'BOARD_HIDE_EMAILS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+
+ 'legend2' => 'SMTP_SETTINGS',
+ 'smtp_delivery' => array('lang' => 'USE_SMTP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'smtp_host' => array('lang' => 'SMTP_SERVER', 'validate' => 'string', 'type' => 'text:25:50', 'explain' => false),
+ 'smtp_port' => array('lang' => 'SMTP_PORT', 'validate' => 'int:0', 'type' => 'text:4:5', 'explain' => true),
+ 'smtp_auth_method' => array('lang' => 'SMTP_AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true),
+ 'smtp_username' => array('lang' => 'SMTP_USERNAME', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true),
+ 'smtp_password' => array('lang' => 'SMTP_PASSWORD', 'validate' => 'string', 'type' => 'password:25:255', 'explain' => true),
+
+ 'legend3' => 'ACP_SUBMIT_CHANGES',
+ )
+ );
+ break;
+
+ default:
+ trigger_error('NO_MODE', E_USER_ERROR);
+ break;
+ }
+
+ if (isset($display_vars['lang']))
+ {
+ $user->add_lang($display_vars['lang']);
+ }
+
+ $this->new_config = $config;
+ $cfg_array = (isset($_REQUEST['config'])) ? utf8_normalize_nfc(request_var('config', array('' => ''), true)) : $this->new_config;
+ $error = array();
+
+ // We validate the complete config if whished
+ validate_config_vars($display_vars['vars'], $cfg_array, $error);
+
+ if ($submit && !check_form_key($form_key))
+ {
+ $error[] = $user->lang['FORM_INVALID'];
+ }
+ // Do not write values if there is an error
+ if (sizeof($error))
+ {
+ $submit = false;
+ }
+
+ // We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
+ foreach ($display_vars['vars'] as $config_name => $null)
+ {
+ if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
+ {
+ continue;
+ }
+
+ if ($config_name == 'auth_method' || $config_name == 'feed_news_id' || $config_name == 'feed_exclude_id')
+ {
+ continue;
+ }
+
+ $this->new_config[$config_name] = $config_value = $cfg_array[$config_name];
+
+ if ($config_name == 'email_function_name')
+ {
+ $this->new_config['email_function_name'] = trim(str_replace(array('(', ')'), array('', ''), $this->new_config['email_function_name']));
+ $this->new_config['email_function_name'] = (empty($this->new_config['email_function_name']) || !function_exists($this->new_config['email_function_name'])) ? 'mail' : $this->new_config['email_function_name'];
+ $config_value = $this->new_config['email_function_name'];
+ }
+
+ if ($submit)
+ {
+ set_config($config_name, $config_value);
+ }
+ }
+
+ // Store news and exclude ids
+ if ($mode == 'feed' && $submit)
+ {
+ $this->store_feed_forums(FORUM_OPTION_FEED_NEWS, 'feed_news_id');
+ $this->store_feed_forums(FORUM_OPTION_FEED_EXCLUDE, 'feed_exclude_id');
+ }
+
+ if ($mode == 'auth')
+ {
+ // Retrieve a list of auth plugins and check their config values
+ $auth_plugins = array();
+
+ $dp = @opendir($phpbb_root_path . 'includes/auth');
+
+ if ($dp)
+ {
+ while (($file = readdir($dp)) !== false)
+ {
+ if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))
+ {
+ $auth_plugins[] = basename(preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file));
+ }
+ }
+ closedir($dp);
+
+ sort($auth_plugins);
+ }
+
+ $updated_auth_settings = false;
+ $old_auth_config = array();
+ foreach ($auth_plugins as $method)
+ {
+ if ($method && file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
+ {
+ include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
+
+ $method = 'acp_' . $method;
+ if (function_exists($method))
+ {
+ if ($fields = $method($this->new_config))
+ {
+ // Check if we need to create config fields for this plugin and save config when submit was pressed
+ foreach ($fields['config'] as $field)
+ {
+ if (!isset($config[$field]))
+ {
+ set_config($field, '');
+ }
+
+ if (!isset($cfg_array[$field]) || strpos($field, 'legend') !== false)
+ {
+ continue;
+ }
+
+ $old_auth_config[$field] = $this->new_config[$field];
+ $config_value = $cfg_array[$field];
+ $this->new_config[$field] = $config_value;
+
+ if ($submit)
+ {
+ $updated_auth_settings = true;
+ set_config($field, $config_value);
+ }
+ }
+ }
+ unset($fields);
+ }
+ }
+ }
+
+ if ($submit && (($cfg_array['auth_method'] != $this->new_config['auth_method']) || $updated_auth_settings))
+ {
+ $method = basename($cfg_array['auth_method']);
+ if ($method && in_array($method, $auth_plugins))
+ {
+ include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
+
+ $method = 'init_' . $method;
+ if (function_exists($method))
+ {
+ if ($error = $method())
+ {
+ foreach ($old_auth_config as $config_name => $config_value)
+ {
+ set_config($config_name, $config_value);
+ }
+ trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+ set_config('auth_method', basename($cfg_array['auth_method']));
+ }
+ else
+ {
+ trigger_error('NO_AUTH_PLUGIN', E_USER_ERROR);
+ }
+ }
+ }
+
+ if ($submit)
+ {
+ add_log('admin', 'LOG_CONFIG_' . strtoupper($mode));
+
+ trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
+ }
+
+ $this->tpl_name = 'acp_board';
+ $this->page_title = $display_vars['title'];
+
+ $template->assign_vars(array(
+ 'L_TITLE' => $user->lang[$display_vars['title']],
+ 'L_TITLE_EXPLAIN' => $user->lang[$display_vars['title'] . '_EXPLAIN'],
+
+ 'S_ERROR' => (sizeof($error)) ? true : false,
+ 'ERROR_MSG' => implode('<br />', $error),
+
+ 'U_ACTION' => $this->u_action)
+ );
+
+ // Output relevant page
+ foreach ($display_vars['vars'] as $config_key => $vars)
+ {
+ if (!is_array($vars) && strpos($config_key, 'legend') === false)
+ {
+ continue;
+ }
+
+ if (strpos($config_key, 'legend') !== false)
+ {
+ $template->assign_block_vars('options', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => (isset($user->lang[$vars])) ? $user->lang[$vars] : $vars)
+ );
+
+ continue;
+ }
+
+ $type = explode(':', $vars['type']);
+
+ $l_explain = '';
+ if ($vars['explain'] && isset($vars['lang_explain']))
+ {
+ $l_explain = (isset($user->lang[$vars['lang_explain']])) ? $user->lang[$vars['lang_explain']] : $vars['lang_explain'];
+ }
+ else if ($vars['explain'])
+ {
+ $l_explain = (isset($user->lang[$vars['lang'] . '_EXPLAIN'])) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '';
+ }
+
+ $content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars);
+
+ if (empty($content))
+ {
+ continue;
+ }
+
+ $template->assign_block_vars('options', array(
+ 'KEY' => $config_key,
+ 'TITLE' => (isset($user->lang[$vars['lang']])) ? $user->lang[$vars['lang']] : $vars['lang'],
+ 'S_EXPLAIN' => $vars['explain'],
+ 'TITLE_EXPLAIN' => $l_explain,
+ 'CONTENT' => $content,
+ )
+ );
+
+ unset($display_vars['vars'][$config_key]);
+ }
+
+ if ($mode == 'auth')
+ {
+ $template->assign_var('S_AUTH', true);
+
+ foreach ($auth_plugins as $method)
+ {
+ if ($method && file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
+ {
+ $method = 'acp_' . $method;
+ if (function_exists($method))
+ {
+ $fields = $method($this->new_config);
+
+ if ($fields['tpl'])
+ {
+ $template->assign_block_vars('auth_tpl', array(
+ 'TPL' => $fields['tpl'])
+ );
+ }
+ unset($fields);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Select auth method
+ */
+ function select_auth_method($selected_method, $key = '')
+ {
+ global $phpbb_root_path, $phpEx;
+
+ $auth_plugins = array();
+
+ $dp = @opendir($phpbb_root_path . 'includes/auth');
+
+ if (!$dp)
+ {
+ return '';
+ }
+
+ while (($file = readdir($dp)) !== false)
+ {
+ if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))
+ {
+ $auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file);
+ }
+ }
+ closedir($dp);
+
+ sort($auth_plugins);
+
+ $auth_select = '';
+ foreach ($auth_plugins as $method)
+ {
+ $selected = ($selected_method == $method) ? ' selected="selected"' : '';
+ $auth_select .= '<option value="' . $method . '"' . $selected . '>' . ucfirst($method) . '</option>';
+ }
+
+ return $auth_select;
+ }
+
+ /**
+ * Select mail authentication method
+ */
+ function mail_auth_select($selected_method, $key = '')
+ {
+ global $user;
+
+ $auth_methods = array('PLAIN', 'LOGIN', 'CRAM-MD5', 'DIGEST-MD5', 'POP-BEFORE-SMTP');
+ $s_smtp_auth_options = '';
+
+ foreach ($auth_methods as $method)
+ {
+ $s_smtp_auth_options .= '<option value="' . $method . '"' . (($selected_method == $method) ? ' selected="selected"' : '') . '>' . $user->lang['SMTP_' . str_replace('-', '_', $method)] . '</option>';
+ }
+
+ return $s_smtp_auth_options;
+ }
+
+ /**
+ * Select full folder action
+ */
+ function full_folder_select($value, $key = '')
+ {
+ global $user;
+
+ return '<option value="1"' . (($value == 1) ? ' selected="selected"' : '') . '>' . $user->lang['DELETE_OLDEST_MESSAGES'] . '</option><option value="2"' . (($value == 2) ? ' selected="selected"' : '') . '>' . $user->lang['HOLD_NEW_MESSAGES_SHORT'] . '</option>';
+ }
+
+ /**
+ * Select ip validation
+ */
+ function select_ip_check($value, $key = '')
+ {
+ $radio_ary = array(4 => 'ALL', 3 => 'CLASS_C', 2 => 'CLASS_B', 0 => 'NO_IP_VALIDATION');
+
+ return h_radio('config[ip_check]', $radio_ary, $value, $key);
+ }
+
+ /**
+ * Select referer validation
+ */
+ function select_ref_check($value, $key = '')
+ {
+ $radio_ary = array(REFERER_VALIDATE_PATH => 'REF_PATH', REFERER_VALIDATE_HOST => 'REF_HOST', REFERER_VALIDATE_NONE => 'NO_REF_VALIDATION');
+
+ return h_radio('config[referer_validation]', $radio_ary, $value, $key);
+ }
+
+ /**
+ * Select account activation method
+ */
+ function select_acc_activation($value, $key = '')
+ {
+ global $user, $config;
+
+ $radio_ary = array(USER_ACTIVATION_DISABLE => 'ACC_DISABLE', USER_ACTIVATION_NONE => 'ACC_NONE');
+ if ($config['email_enable'])
+ {
+ $radio_ary += array(USER_ACTIVATION_SELF => 'ACC_USER', USER_ACTIVATION_ADMIN => 'ACC_ADMIN');
+ }
+
+ return h_radio('config[require_activation]', $radio_ary, $value, $key);
+ }
+
+ /**
+ * Maximum/Minimum username length
+ */
+ function username_length($value, $key = '')
+ {
+ global $user;
+
+ return '<input id="' . $key . '" type="text" size="3" maxlength="3" name="config[min_name_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . '&nbsp;&nbsp;<input type="text" size="3" maxlength="3" name="config[max_name_chars]" value="' . $this->new_config['max_name_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
+ }
+
+ /**
+ * Allowed chars in usernames
+ */
+ function select_username_chars($selected_value, $key)
+ {
+ global $user;
+
+ $user_char_ary = array('USERNAME_CHARS_ANY', 'USERNAME_ALPHA_ONLY', 'USERNAME_ALPHA_SPACERS', 'USERNAME_LETTER_NUM', 'USERNAME_LETTER_NUM_SPACERS', 'USERNAME_ASCII');
+ $user_char_options = '';
+ foreach ($user_char_ary as $user_type)
+ {
+ $selected = ($selected_value == $user_type) ? ' selected="selected"' : '';
+ $user_char_options .= '<option value="' . $user_type . '"' . $selected . '>' . $user->lang[$user_type] . '</option>';
+ }
+
+ return $user_char_options;
+ }
+
+ /**
+ * Maximum/Minimum password length
+ */
+ function password_length($value, $key)
+ {
+ global $user;
+
+ return '<input id="' . $key . '" type="text" size="3" maxlength="3" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . '&nbsp;&nbsp;<input type="text" size="3" maxlength="3" name="config[max_pass_chars]" value="' . $this->new_config['max_pass_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
+ }
+
+ /**
+ * Required chars in passwords
+ */
+ function select_password_chars($selected_value, $key)
+ {
+ global $user;
+
+ $pass_type_ary = array('PASS_TYPE_ANY', 'PASS_TYPE_CASE', 'PASS_TYPE_ALPHA', 'PASS_TYPE_SYMBOL');
+ $pass_char_options = '';
+ foreach ($pass_type_ary as $pass_type)
+ {
+ $selected = ($selected_value == $pass_type) ? ' selected="selected"' : '';
+ $pass_char_options .= '<option value="' . $pass_type . '"' . $selected . '>' . $user->lang[$pass_type] . '</option>';
+ }
+
+ return $pass_char_options;
+ }
+
+ /**
+ * Select bump interval
+ */
+ function bump_interval($value, $key)
+ {
+ global $user;
+
+ $s_bump_type = '';
+ $types = array('m' => 'MINUTES', 'h' => 'HOURS', 'd' => 'DAYS');
+ foreach ($types as $type => $lang)
+ {
+ $selected = ($this->new_config['bump_type'] == $type) ? ' selected="selected"' : '';
+ $s_bump_type .= '<option value="' . $type . '"' . $selected . '>' . $user->lang[$lang] . '</option>';
+ }
+
+ return '<input id="' . $key . '" type="text" size="3" maxlength="4" name="config[bump_interval]" value="' . $value . '" />&nbsp;<select name="config[bump_type]">' . $s_bump_type . '</select>';
+ }
+
+ /**
+ * Board disable option and message
+ */
+ function board_disable($value, $key)
+ {
+ global $user;
+
+ $radio_ary = array(1 => 'YES', 0 => 'NO');
+
+ return h_radio('config[board_disable]', $radio_ary, $value) . '<br /><input id="' . $key . '" type="text" name="config[board_disable_msg]" maxlength="255" size="40" value="' . $this->new_config['board_disable_msg'] . '" />';
+ }
+
+ /**
+ * Select default dateformat
+ */
+ function dateformat_select($value, $key)
+ {
+ global $user, $config;
+
+ // Let the format_date function operate with the acp values
+ $old_tz = $user->timezone;
+ $old_dst = $user->dst;
+
+ $user->timezone = $config['board_timezone'];
+ $user->dst = $config['board_dst'];
+
+ $dateformat_options = '';
+
+ foreach ($user->lang['dateformats'] as $format => $null)
+ {
+ $dateformat_options .= '<option value="' . $format . '"' . (($format == $value) ? ' selected="selected"' : '') . '>';
+ $dateformat_options .= $user->format_date(time(), $format, false) . ((strpos($format, '|') !== false) ? $user->lang['VARIANT_DATE_SEPARATOR'] . $user->format_date(time(), $format, true) : '');
+ $dateformat_options .= '</option>';
+ }
+
+ $dateformat_options .= '<option value="custom"';
+ if (!isset($user->lang['dateformats'][$value]))
+ {
+ $dateformat_options .= ' selected="selected"';
+ }
+ $dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
+
+ // Reset users date options
+ $user->timezone = $old_tz;
+ $user->dst = $old_dst;
+
+ return "<select name=\"dateoptions\" id=\"dateoptions\" onchange=\"if (this.value == 'custom') { document.getElementById('" . addslashes($key) . "').value = '" . addslashes($value) . "'; } else { document.getElementById('" . addslashes($key) . "').value = this.value; }\">$dateformat_options</select>
+ <input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"30\" />";
+ }
+
+ /**
+ * Select multiple forums
+ */
+ function select_news_forums($value, $key)
+ {
+ global $user, $config;
+
+ $forum_list = make_forum_select(false, false, true, true, true, false, true);
+
+ // Build forum options
+ $s_forum_options = '<select id="' . $key . '" name="' . $key . '[]" multiple="multiple">';
+ foreach ($forum_list as $f_id => $f_row)
+ {
+ $f_row['selected'] = phpbb_optionget(FORUM_OPTION_FEED_NEWS, $f_row['forum_options']);
+
+ $s_forum_options .= '<option value="' . $f_id . '"' . (($f_row['selected']) ? ' selected="selected"' : '') . (($f_row['disabled']) ? ' disabled="disabled" class="disabled-option"' : '') . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
+ }
+ $s_forum_options .= '</select>';
+
+ return $s_forum_options;
+ }
+
+ function select_exclude_forums($value, $key)
+ {
+ global $user, $config;
+
+ $forum_list = make_forum_select(false, false, true, false, false, false, true);
+
+ // Build forum options
+ $s_forum_options = '<select id="' . $key . '" name="' . $key . '[]" multiple="multiple">';
+ foreach ($forum_list as $f_id => $f_row)
+ {
+ $f_row['selected'] = phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $f_row['forum_options']);
+
+ $s_forum_options .= '<option value="' . $f_id . '"' . (($f_row['selected']) ? ' selected="selected"' : '') . (($f_row['disabled']) ? ' disabled="disabled" class="disabled-option"' : '') . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
+ }
+ $s_forum_options .= '</select>';
+
+ return $s_forum_options;
+ }
+
+ function store_feed_forums($option, $key)
+ {
+ global $db, $cache;
+
+ // Get key
+ $values = request_var($key, array(0 => 0));
+
+ // Empty option bit for all forums
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET forum_options = forum_options - ' . (1 << $option) . '
+ WHERE ' . $db->sql_bit_and('forum_options', $option, '<> 0');
+ $db->sql_query($sql);
+
+ // Already emptied for all...
+ if (sizeof($values))
+ {
+ // Set for selected forums
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET forum_options = forum_options + ' . (1 << $option) . '
+ WHERE ' . $db->sql_in_set('forum_id', $values);
+ $db->sql_query($sql);
+ }
+
+ // Empty sql cache for forums table because options changed
+ $cache->destroy('sql', FORUMS_TABLE);
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_bots.php b/phpBB/includes/acp/acp_bots.php
new file mode 100644
index 0000000000..d08cabb062
--- /dev/null
+++ b/phpBB/includes/acp/acp_bots.php
@@ -0,0 +1,418 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_bots
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template, $cache;
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
+
+ $action = request_var('action', '');
+ $submit = (isset($_POST['submit'])) ? true : false;
+ $mark = request_var('mark', array(0));
+ $bot_id = request_var('id', 0);
+
+ if (isset($_POST['add']))
+ {
+ $action = 'add';
+ }
+
+ $error = array();
+
+ $user->add_lang('acp/bots');
+ $this->tpl_name = 'acp_bots';
+ $this->page_title = 'ACP_BOTS';
+ $form_key = 'acp_bots';
+ add_form_key($form_key);
+
+ if ($submit && !check_form_key($form_key))
+ {
+ $error[] = $user->lang['FORM_INVALID'];
+ }
+
+ // User wants to do something, how inconsiderate of them!
+ switch ($action)
+ {
+ case 'activate':
+ if ($bot_id || sizeof($mark))
+ {
+ $sql_id = ($bot_id) ? " = $bot_id" : ' IN (' . implode(', ', $mark) . ')';
+
+ $sql = 'UPDATE ' . BOTS_TABLE . "
+ SET bot_active = 1
+ WHERE bot_id $sql_id";
+ $db->sql_query($sql);
+ }
+
+ $cache->destroy('_bots');
+ break;
+
+ case 'deactivate':
+ if ($bot_id || sizeof($mark))
+ {
+ $sql_id = ($bot_id) ? " = $bot_id" : ' IN (' . implode(', ', $mark) . ')';
+
+ $sql = 'UPDATE ' . BOTS_TABLE . "
+ SET bot_active = 0
+ WHERE bot_id $sql_id";
+ $db->sql_query($sql);
+ }
+
+ $cache->destroy('_bots');
+ break;
+
+ case 'delete':
+ if ($bot_id || sizeof($mark))
+ {
+ if (confirm_box(true))
+ {
+ // We need to delete the relevant user, usergroup and bot entries ...
+ $sql_id = ($bot_id) ? " = $bot_id" : ' IN (' . implode(', ', $mark) . ')';
+
+ $sql = 'SELECT bot_name, user_id
+ FROM ' . BOTS_TABLE . "
+ WHERE bot_id $sql_id";
+ $result = $db->sql_query($sql);
+
+ $user_id_ary = $bot_name_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $user_id_ary[] = (int) $row['user_id'];
+ $bot_name_ary[] = $row['bot_name'];
+ }
+ $db->sql_freeresult($result);
+
+ $db->sql_transaction('begin');
+
+ $sql = 'DELETE FROM ' . BOTS_TABLE . "
+ WHERE bot_id $sql_id";
+ $db->sql_query($sql);
+
+ if (sizeof($user_id_ary))
+ {
+ $_tables = array(USERS_TABLE, USER_GROUP_TABLE);
+ foreach ($_tables as $table)
+ {
+ $sql = "DELETE FROM $table
+ WHERE " . $db->sql_in_set('user_id', $user_id_ary);
+ $db->sql_query($sql);
+ }
+ }
+
+ $db->sql_transaction('commit');
+
+ $cache->destroy('_bots');
+
+ add_log('admin', 'LOG_BOT_DELETE', implode(', ', $bot_name_ary));
+ trigger_error($user->lang['BOT_DELETED'] . adm_back_link($this->u_action));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'mark' => $mark,
+ 'id' => $bot_id,
+ 'mode' => $mode,
+ 'action' => $action))
+ );
+ }
+ }
+ break;
+
+ case 'edit':
+ case 'add':
+ include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ $bot_row = array(
+ 'bot_name' => utf8_normalize_nfc(request_var('bot_name', '', true)),
+ 'bot_agent' => request_var('bot_agent', ''),
+ 'bot_ip' => request_var('bot_ip', ''),
+ 'bot_active' => request_var('bot_active', true),
+ 'bot_lang' => request_var('bot_lang', $config['default_lang']),
+ 'bot_style' => request_var('bot_style' , $config['default_style']),
+ );
+
+ if ($submit)
+ {
+ if (!$bot_row['bot_agent'] && !$bot_row['bot_ip'])
+ {
+ $error[] = $user->lang['ERR_BOT_NO_MATCHES'];
+ }
+
+ if ($bot_row['bot_ip'] && !preg_match('#^[\d\.,:]+$#', $bot_row['bot_ip']))
+ {
+ if (!$ip_list = gethostbynamel($bot_row['bot_ip']))
+ {
+ $error[] = $user->lang['ERR_BOT_NO_IP'];
+ }
+ else
+ {
+ $bot_row['bot_ip'] = implode(',', $ip_list);
+ }
+ }
+ $bot_row['bot_ip'] = str_replace(' ', '', $bot_row['bot_ip']);
+
+ // Make sure the admin is not adding a bot with an user agent similar to his one
+ if ($bot_row['bot_agent'] && substr($user->data['session_browser'], 0, 149) === substr($bot_row['bot_agent'], 0, 149))
+ {
+ $error[] = $user->lang['ERR_BOT_AGENT_MATCHES_UA'];
+ }
+
+ $bot_name = false;
+ if ($bot_id)
+ {
+ $sql = 'SELECT u.username_clean
+ FROM ' . BOTS_TABLE . ' b, ' . USERS_TABLE . " u
+ WHERE b.bot_id = $bot_id
+ AND u.user_id = b.user_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$bot_row)
+ {
+ $error[] = $user->lang['NO_BOT'];
+ }
+ else
+ {
+ $bot_name = $row['username_clean'];
+ }
+ }
+ if (!$this->validate_botname($bot_row['bot_name'], $bot_name))
+ {
+ $error[] = $user->lang['BOT_NAME_TAKEN'];
+ }
+
+ if (!sizeof($error))
+ {
+ // New bot? Create a new user and group entry
+ if ($action == 'add')
+ {
+ $sql = 'SELECT group_id, group_colour
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = 'BOTS'
+ AND group_type = " . GROUP_SPECIAL;
+ $result = $db->sql_query($sql);
+ $group_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$group_row)
+ {
+ trigger_error($user->lang['NO_BOT_GROUP'] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"), E_USER_WARNING);
+ }
+
+
+ $user_id = user_add(array(
+ 'user_type' => (int) USER_IGNORE,
+ 'group_id' => (int) $group_row['group_id'],
+ 'username' => (string) $bot_row['bot_name'],
+ 'user_regdate' => time(),
+ 'user_password' => '',
+ 'user_colour' => (string) $group_row['group_colour'],
+ 'user_email' => '',
+ 'user_lang' => (string) $bot_row['bot_lang'],
+ 'user_style' => (int) $bot_row['bot_style'],
+ 'user_allow_massemail' => 0,
+ ));
+
+ $sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'user_id' => (int) $user_id,
+ 'bot_name' => (string) $bot_row['bot_name'],
+ 'bot_active' => (int) $bot_row['bot_active'],
+ 'bot_agent' => (string) $bot_row['bot_agent'],
+ 'bot_ip' => (string) $bot_row['bot_ip'])
+ );
+ $db->sql_query($sql);
+
+ $log = 'ADDED';
+ }
+ else if ($bot_id)
+ {
+ $sql = 'SELECT user_id, bot_name
+ FROM ' . BOTS_TABLE . "
+ WHERE bot_id = $bot_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"), E_USER_WARNING);
+ }
+
+ $sql_ary = array(
+ 'user_style' => (int) $bot_row['bot_style'],
+ 'user_lang' => (string) $bot_row['bot_lang'],
+ );
+
+ if ($bot_row['bot_name'] !== $row['bot_name'])
+ {
+ $sql_ary['username'] = (string) $bot_row['bot_name'];
+ $sql_ary['username_clean'] = (string) utf8_clean_string($bot_row['bot_name']);
+ }
+
+ $sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE user_id = {$row['user_id']}";
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . BOTS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array(
+ 'bot_name' => (string) $bot_row['bot_name'],
+ 'bot_active' => (int) $bot_row['bot_active'],
+ 'bot_agent' => (string) $bot_row['bot_agent'],
+ 'bot_ip' => (string) $bot_row['bot_ip'])
+ ) . " WHERE bot_id = $bot_id";
+ $db->sql_query($sql);
+
+ // Updated username?
+ if ($bot_row['bot_name'] !== $row['bot_name'])
+ {
+ user_update_name($row['bot_name'], $bot_row['bot_name']);
+ }
+
+ $log = 'UPDATED';
+ }
+
+ $cache->destroy('_bots');
+
+ add_log('admin', 'LOG_BOT_' . $log, $bot_row['bot_name']);
+ trigger_error($user->lang['BOT_' . $log] . adm_back_link($this->u_action));
+
+ }
+ }
+ else if ($bot_id)
+ {
+ $sql = 'SELECT b.*, u.user_lang, u.user_style
+ FROM ' . BOTS_TABLE . ' b, ' . USERS_TABLE . " u
+ WHERE b.bot_id = $bot_id
+ AND u.user_id = b.user_id";
+ $result = $db->sql_query($sql);
+ $bot_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$bot_row)
+ {
+ trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"), E_USER_WARNING);
+ }
+
+ $bot_row['bot_lang'] = $bot_row['user_lang'];
+ $bot_row['bot_style'] = $bot_row['user_style'];
+ unset($bot_row['user_lang'], $bot_row['user_style']);
+ }
+
+ $s_active_options = '';
+ $_options = array('0' => 'NO', '1' => 'YES');
+ foreach ($_options as $value => $lang)
+ {
+ $selected = ($bot_row['bot_active'] == $value) ? ' selected="selected"' : '';
+ $s_active_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$lang] . '</option>';
+ }
+
+ $style_select = style_select($bot_row['bot_style'], true);
+ $lang_select = language_select($bot_row['bot_lang']);
+
+ $l_title = ($action == 'edit') ? 'EDIT' : 'ADD';
+
+ $template->assign_vars(array(
+ 'L_TITLE' => $user->lang['BOT_' . $l_title],
+ 'U_ACTION' => $this->u_action . "&amp;id=$bot_id&amp;action=$action",
+ 'U_BACK' => $this->u_action,
+ 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
+
+ 'BOT_NAME' => $bot_row['bot_name'],
+ 'BOT_IP' => $bot_row['bot_ip'],
+ 'BOT_AGENT' => $bot_row['bot_agent'],
+
+ 'S_EDIT_BOT' => true,
+ 'S_ACTIVE_OPTIONS' => $s_active_options,
+ 'S_STYLE_OPTIONS' => $style_select,
+ 'S_LANG_OPTIONS' => $lang_select,
+ 'S_ERROR' => (sizeof($error)) ? true : false,
+ )
+ );
+
+ return;
+
+ break;
+ }
+
+ $s_options = '';
+ $_options = array('activate' => 'BOT_ACTIVATE', 'deactivate' => 'BOT_DEACTIVATE', 'delete' => 'DELETE');
+ foreach ($_options as $value => $lang)
+ {
+ $s_options .= '<option value="' . $value . '">' . $user->lang[$lang] . '</option>';
+ }
+
+ $template->assign_vars(array(
+ 'U_ACTION' => $this->u_action,
+ 'S_BOT_OPTIONS' => $s_options)
+ );
+
+ $sql = 'SELECT b.bot_id, b.bot_name, b.bot_active, u.user_lastvisit
+ FROM ' . BOTS_TABLE . ' b, ' . USERS_TABLE . ' u
+ WHERE u.user_id = b.user_id
+ ORDER BY u.user_lastvisit DESC, b.bot_name ASC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $active_lang = (!$row['bot_active']) ? 'BOT_ACTIVATE' : 'BOT_DEACTIVATE';
+ $active_value = (!$row['bot_active']) ? 'activate' : 'deactivate';
+
+ $template->assign_block_vars('bots', array(
+ 'BOT_NAME' => $row['bot_name'],
+ 'BOT_ID' => $row['bot_id'],
+ 'LAST_VISIT' => ($row['user_lastvisit']) ? $user->format_date($row['user_lastvisit']) : $user->lang['BOT_NEVER'],
+
+ 'U_ACTIVATE_DEACTIVATE' => $this->u_action . "&amp;id={$row['bot_id']}&amp;action=$active_value",
+ 'L_ACTIVATE_DEACTIVATE' => $user->lang[$active_lang],
+ 'U_EDIT' => $this->u_action . "&amp;id={$row['bot_id']}&amp;action=edit",
+ 'U_DELETE' => $this->u_action . "&amp;id={$row['bot_id']}&amp;action=delete")
+ );
+ }
+ $db->sql_freeresult($result);
+ }
+
+ /**
+ * Validate bot name against username table
+ */
+ function validate_botname($newname, $oldname = false)
+ {
+ global $db;
+
+ if ($oldname && utf8_clean_string($newname) === $oldname)
+ {
+ return true;
+ }
+
+ // Admins might want to use names otherwise forbidden, thus we only check for duplicates.
+ $sql = 'SELECT username
+ FROM ' . USERS_TABLE . "
+ WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($newname)) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ return ($row) ? false : true;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php
new file mode 100644
index 0000000000..e1fa764191
--- /dev/null
+++ b/phpBB/includes/acp/acp_captcha.php
@@ -0,0 +1,147 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_captcha
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ $user->add_lang('acp/board');
+
+ include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
+ $captchas = phpbb_captcha_factory::get_captcha_types();
+
+ $selected = request_var('select_captcha', $config['captcha_plugin']);
+ $selected = (isset($captchas['available'][$selected]) || isset($captchas['unavailable'][$selected])) ? $selected : $config['captcha_plugin'];
+ $configure = request_var('configure', false);
+
+
+ // Oh, they are just here for the view
+ if (isset($_GET['captcha_demo']))
+ {
+ $this->deliver_demo($selected);
+ }
+
+ // Delegate
+ if ($configure)
+ {
+ $config_captcha =& phpbb_captcha_factory::get_instance($selected);
+ $config_captcha->acp_page($id, $this);
+ }
+ else
+ {
+ $config_vars = array(
+ 'enable_confirm' => array('tpl' => 'REG_ENABLE', 'default' => false),
+ 'enable_post_confirm' => array('tpl' => 'POST_ENABLE', 'default' => false),
+ 'confirm_refresh' => array('tpl' => 'CONFIRM_REFRESH', 'default' => false),
+ 'max_reg_attempts' => array('tpl' => 'REG_LIMIT', 'default' => 0),
+ );
+
+ $this->tpl_name = 'acp_captcha';
+ $this->page_title = 'ACP_VC_SETTINGS';
+ $form_key = 'acp_captcha';
+ add_form_key($form_key);
+
+ $submit = request_var('main_submit', false);
+
+ if ($submit && check_form_key($form_key))
+ {
+ foreach ($config_vars as $config_var => $options)
+ {
+ set_config($config_var, request_var($config_var, $options['default']));
+ }
+
+ if ($selected !== $config['captcha_plugin'])
+ {
+ // sanity check
+ if (isset($captchas['available'][$selected]))
+ {
+ $old_captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $old_captcha->uninstall();
+
+ set_config('captcha_plugin', $selected);
+ $new_captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $new_captcha->install();
+
+ add_log('admin', 'LOG_CONFIG_VISUAL');
+ }
+ else
+ {
+ trigger_error($user->lang['CAPTCHA_UNAVAILABLE'] . adm_back_link($this->u_action));
+ }
+ }
+ trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
+ }
+ else if ($submit)
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link());
+ }
+ else
+ {
+ $captcha_select = '';
+ foreach ($captchas['available'] as $value => $title)
+ {
+ $current = ($selected !== false && $value == $selected) ? ' selected="selected"' : '';
+ $captcha_select .= '<option value="' . $value . '"' . $current . '>' . $user->lang[$title] . '</option>';
+ }
+
+ foreach ($captchas['unavailable'] as $value => $title)
+ {
+ $current = ($selected !== false && $value == $selected) ? ' selected="selected"' : '';
+ $captcha_select .= '<option value="' . $value . '"' . $current . ' class="disabled-option">' . $user->lang[$title] . '</option>';
+ }
+
+ $demo_captcha =& phpbb_captcha_factory::get_instance($selected);
+
+ foreach ($config_vars as $config_var => $options)
+ {
+ $template->assign_var($options['tpl'], (isset($_POST[$config_var])) ? request_var($config_var, $options['default']) : $config[$config_var]) ;
+ }
+
+ $template->assign_vars(array(
+ 'CAPTCHA_PREVIEW_TPL' => $demo_captcha->get_demo_template($id),
+ 'S_CAPTCHA_HAS_CONFIG' => $demo_captcha->has_config(),
+ 'CAPTCHA_SELECT' => $captcha_select,
+ ));
+ }
+ }
+ }
+
+ /**
+ * Entry point for delivering image CAPTCHAs in the ACP.
+ */
+ function deliver_demo($selected)
+ {
+ global $db, $user, $config;
+
+ $captcha =& phpbb_captcha_factory::get_instance($selected);
+ $captcha->init(CONFIRM_REG);
+ $captcha->execute_demo();
+
+ garbage_collection();
+ exit_handler();
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
new file mode 100644
index 0000000000..5d7450bdfd
--- /dev/null
+++ b/phpBB/includes/acp/acp_database.php
@@ -0,0 +1,2348 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_database
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $cache, $db, $user, $auth, $template, $table_prefix;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ $user->add_lang('acp/database');
+
+ $this->tpl_name = 'acp_database';
+ $this->page_title = 'ACP_DATABASE';
+
+ $action = request_var('action', '');
+ $submit = (isset($_POST['submit'])) ? true : false;
+
+ $template->assign_vars(array(
+ 'MODE' => $mode
+ ));
+
+ switch ($mode)
+ {
+ case 'backup':
+
+ $this->page_title = 'ACP_BACKUP';
+
+ switch ($action)
+ {
+ case 'download':
+ $type = request_var('type', '');
+ $table = request_var('table', array(''));
+ $format = request_var('method', '');
+ $where = request_var('where', '');
+
+ if (!sizeof($table))
+ {
+ trigger_error($user->lang['TABLE_SELECT_ERROR'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $store = $download = $structure = $schema_data = false;
+
+ if ($where == 'store_and_download' || $where == 'store')
+ {
+ $store = true;
+ }
+
+ if ($where == 'store_and_download' || $where == 'download')
+ {
+ $download = true;
+ }
+
+ if ($type == 'full' || $type == 'structure')
+ {
+ $structure = true;
+ }
+
+ if ($type == 'full' || $type == 'data')
+ {
+ $schema_data = true;
+ }
+
+ @set_time_limit(1200);
+ @set_time_limit(0);
+
+ $time = time();
+
+ $filename = 'backup_' . $time . '_' . unique_id();
+ switch ($db->sql_layer)
+ {
+ case 'mysqli':
+ case 'mysql4':
+ case 'mysql':
+ $extractor = new mysql_extractor($download, $store, $format, $filename, $time);
+ break;
+
+ case 'sqlite':
+ $extractor = new sqlite_extractor($download, $store, $format, $filename, $time);
+ break;
+
+ case 'postgres':
+ $extractor = new postgres_extractor($download, $store, $format, $filename, $time);
+ break;
+
+ case 'oracle':
+ $extractor = new oracle_extractor($download, $store, $format, $filename, $time);
+ break;
+
+ case 'mssql':
+ case 'mssql_odbc':
+ $extractor = new mssql_extractor($download, $store, $format, $filename, $time);
+ break;
+
+ case 'firebird':
+ $extractor = new firebird_extractor($download, $store, $format, $filename, $time);
+ break;
+ }
+
+ $extractor->write_start($table_prefix);
+
+ foreach ($table as $table_name)
+ {
+ // Get the table structure
+ if ($structure)
+ {
+ $extractor->write_table($table_name);
+ }
+ else
+ {
+ // We might wanna empty out all that junk :D
+ switch ($db->sql_layer)
+ {
+ case 'sqlite':
+ case 'firebird':
+ $extractor->flush('DELETE FROM ' . $table_name . ";\n");
+ break;
+
+ case 'mssql':
+ case 'mssql_odbc':
+ $extractor->flush('TRUNCATE TABLE ' . $table_name . "GO\n");
+ break;
+
+ case 'oracle':
+ $extractor->flush('TRUNCATE TABLE ' . $table_name . "/\n");
+ break;
+
+ default:
+ $extractor->flush('TRUNCATE TABLE ' . $table_name . ";\n");
+ break;
+ }
+ }
+
+ // Data
+ if ($schema_data)
+ {
+ $extractor->write_data($table_name);
+ }
+ }
+
+ $extractor->write_end();
+
+ add_log('admin', 'LOG_DB_BACKUP');
+
+ if ($download == true)
+ {
+ exit;
+ }
+
+ trigger_error($user->lang['BACKUP_SUCCESS'] . adm_back_link($this->u_action));
+ break;
+
+ default:
+ include($phpbb_root_path . 'includes/functions_install.' . $phpEx);
+ $tables = get_tables($db);
+ asort($tables);
+ foreach ($tables as $table_name)
+ {
+ if (strlen($table_prefix) === 0 || stripos($table_name, $table_prefix) === 0)
+ {
+ $template->assign_block_vars('tables', array(
+ 'TABLE' => $table_name
+ ));
+ }
+ }
+ unset($tables);
+
+ $template->assign_vars(array(
+ 'U_ACTION' => $this->u_action . '&amp;action=download'
+ ));
+
+ $available_methods = array('gzip' => 'zlib', 'bzip2' => 'bz2');
+
+ foreach ($available_methods as $type => $module)
+ {
+ if (!@extension_loaded($module))
+ {
+ continue;
+ }
+
+ $template->assign_block_vars('methods', array(
+ 'TYPE' => $type
+ ));
+ }
+
+ $template->assign_block_vars('methods', array(
+ 'TYPE' => 'text'
+ ));
+ break;
+ }
+ break;
+
+ case 'restore':
+
+ $this->page_title = 'ACP_RESTORE';
+
+ switch ($action)
+ {
+ case 'submit':
+ $delete = request_var('delete', '');
+ $file = request_var('file', '');
+
+ if (!preg_match('#^backup_\d{10,}_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
+ {
+ trigger_error($user->lang['BACKUP_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $file_name = $phpbb_root_path . 'store/' . $matches[0];
+
+ if (!file_exists($file_name) || !is_readable($file_name))
+ {
+ trigger_error($user->lang['BACKUP_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if ($delete)
+ {
+ if (confirm_box(true))
+ {
+ unlink($file_name);
+ add_log('admin', 'LOG_DB_DELETE');
+ trigger_error($user->lang['BACKUP_DELETE'] . adm_back_link($this->u_action));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['DELETE_SELECTED_BACKUP'], build_hidden_fields(array('delete' => $delete, 'file' => $file)));
+ }
+ }
+ else
+ {
+ $download = request_var('download', '');
+
+ if ($download)
+ {
+ $name = $matches[0];
+
+ switch ($matches[1])
+ {
+ case 'sql':
+ $mimetype = 'text/x-sql';
+ break;
+ case 'sql.bz2':
+ $mimetype = 'application/x-bzip2';
+ break;
+ case 'sql.gz':
+ $mimetype = 'application/x-gzip';
+ break;
+ }
+
+ header('Pragma: no-cache');
+ header("Content-Type: $mimetype; name=\"$name\"");
+ header("Content-disposition: attachment; filename=$name");
+
+ @set_time_limit(0);
+
+ $fp = @fopen($file_name, 'rb');
+
+ if ($fp !== false)
+ {
+ while (!feof($fp))
+ {
+ echo fread($fp, 8192);
+ }
+ fclose($fp);
+ }
+
+ flush();
+ exit;
+ }
+
+ switch ($matches[1])
+ {
+ case 'sql':
+ $fp = fopen($file_name, 'rb');
+ $read = 'fread';
+ $seek = 'fseek';
+ $eof = 'feof';
+ $close = 'fclose';
+ $fgetd = 'fgetd';
+ break;
+
+ case 'sql.bz2':
+ $fp = bzopen($file_name, 'r');
+ $read = 'bzread';
+ $seek = '';
+ $eof = 'feof';
+ $close = 'bzclose';
+ $fgetd = 'fgetd_seekless';
+ break;
+
+ case 'sql.gz':
+ $fp = gzopen($file_name, 'rb');
+ $read = 'gzread';
+ $seek = 'gzseek';
+ $eof = 'gzeof';
+ $close = 'gzclose';
+ $fgetd = 'fgetd';
+ break;
+ }
+
+ switch ($db->sql_layer)
+ {
+ case 'mysql':
+ case 'mysql4':
+ case 'mysqli':
+ case 'sqlite':
+ while (($sql = $fgetd($fp, ";\n", $read, $seek, $eof)) !== false)
+ {
+ $db->sql_query($sql);
+ }
+ break;
+
+ case 'firebird':
+ $delim = ";\n";
+ while (($sql = $fgetd($fp, $delim, $read, $seek, $eof)) !== false)
+ {
+ $query = trim($sql);
+ if (substr($query, 0, 8) === 'SET TERM')
+ {
+ $delim = $query[9] . "\n";
+ continue;
+ }
+ $db->sql_query($query);
+ }
+ break;
+
+ case 'postgres':
+ $delim = ";\n";
+ while (($sql = $fgetd($fp, $delim, $read, $seek, $eof)) !== false)
+ {
+ $query = trim($sql);
+
+ if (substr($query, 0, 13) == 'CREATE DOMAIN')
+ {
+ list(, , $domain) = explode(' ', $query);
+ $sql = "SELECT domain_name
+ FROM information_schema.domains
+ WHERE domain_name = '$domain';";
+ $result = $db->sql_query($sql);
+ if (!$db->sql_fetchrow($result))
+ {
+ $db->sql_query($query);
+ }
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $db->sql_query($query);
+ }
+
+ if (substr($query, 0, 4) == 'COPY')
+ {
+ while (($sub = $fgetd($fp, "\n", $read, $seek, $eof)) !== '\.')
+ {
+ if ($sub === false)
+ {
+ trigger_error($user->lang['RESTORE_FAILURE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ pg_put_line($db->db_connect_id, $sub . "\n");
+ }
+ pg_put_line($db->db_connect_id, "\\.\n");
+ pg_end_copy($db->db_connect_id);
+ }
+ }
+ break;
+
+ case 'oracle':
+ while (($sql = $fgetd($fp, "/\n", $read, $seek, $eof)) !== false)
+ {
+ $db->sql_query($sql);
+ }
+ break;
+
+ case 'mssql':
+ case 'mssql_odbc':
+ while (($sql = $fgetd($fp, "GO\n", $read, $seek, $eof)) !== false)
+ {
+ $db->sql_query($sql);
+ }
+ break;
+ }
+
+ $close($fp);
+
+ // Purge the cache due to updated data
+ $cache->purge();
+
+ add_log('admin', 'LOG_DB_RESTORE');
+ trigger_error($user->lang['RESTORE_SUCCESS'] . adm_back_link($this->u_action));
+ break;
+ }
+
+ default:
+ $methods = array('sql');
+ $available_methods = array('sql.gz' => 'zlib', 'sql.bz2' => 'bz2');
+
+ foreach ($available_methods as $type => $module)
+ {
+ if (!@extension_loaded($module))
+ {
+ continue;
+ }
+ $methods[] = $type;
+ }
+
+ $dir = $phpbb_root_path . 'store/';
+ $dh = @opendir($dir);
+
+ $backup_files = array();
+
+ if ($dh)
+ {
+ while (($file = readdir($dh)) !== false)
+ {
+ if (preg_match('#^backup_(\d{10,})_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
+ {
+ if (in_array($matches[2], $methods))
+ {
+ $backup_files[gmdate("d-m-Y H:i:s", $matches[1])] = $file;
+ }
+ }
+ }
+ closedir($dh);
+ }
+
+ if (!empty($backup_files))
+ {
+ krsort($backup_files);
+
+ foreach ($backup_files as $name => $file)
+ {
+ $template->assign_block_vars('files', array(
+ 'FILE' => $file,
+ 'NAME' => $name,
+ 'SUPPORTED' => true,
+ ));
+ }
+ }
+
+ $template->assign_vars(array(
+ 'U_ACTION' => $this->u_action . '&amp;action=submit'
+ ));
+ break;
+ }
+ break;
+ }
+ }
+}
+
+/**
+* @package acp
+*/
+class base_extractor
+{
+ var $fh;
+ var $fp;
+ var $write;
+ var $close;
+ var $store;
+ var $download;
+ var $time;
+ var $format;
+ var $run_comp = false;
+
+ function base_extractor($download = false, $store = false, $format, $filename, $time)
+ {
+ $this->download = $download;
+ $this->store = $store;
+ $this->time = $time;
+ $this->format = $format;
+
+ switch ($format)
+ {
+ case 'text':
+ $ext = '.sql';
+ $open = 'fopen';
+ $this->write = 'fwrite';
+ $this->close = 'fclose';
+ $mimetype = 'text/x-sql';
+ break;
+ case 'bzip2':
+ $ext = '.sql.bz2';
+ $open = 'bzopen';
+ $this->write = 'bzwrite';
+ $this->close = 'bzclose';
+ $mimetype = 'application/x-bzip2';
+ break;
+ case 'gzip':
+ $ext = '.sql.gz';
+ $open = 'gzopen';
+ $this->write = 'gzwrite';
+ $this->close = 'gzclose';
+ $mimetype = 'application/x-gzip';
+ break;
+ }
+
+ if ($download == true)
+ {
+ $name = $filename . $ext;
+ header('Pragma: no-cache');
+ header("Content-Type: $mimetype; name=\"$name\"");
+ header("Content-disposition: attachment; filename=$name");
+
+ switch ($format)
+ {
+ case 'bzip2':
+ ob_start();
+ break;
+
+ case 'gzip':
+ if ((isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false) && strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'msie') === false)
+ {
+ ob_start('ob_gzhandler');
+ }
+ else
+ {
+ $this->run_comp = true;
+ }
+ break;
+ }
+ }
+
+ if ($store == true)
+ {
+ global $phpbb_root_path;
+ $file = $phpbb_root_path . 'store/' . $filename . $ext;
+
+ $this->fp = $open($file, 'w');
+
+ if (!$this->fp)
+ {
+ trigger_error('FILE_WRITE_FAIL', E_USER_ERROR);
+ }
+ }
+ }
+
+ function write_end()
+ {
+ static $close;
+
+ if ($this->store)
+ {
+ if ($close === null)
+ {
+ $close = $this->close;
+ }
+ $close($this->fp);
+ }
+
+ // bzip2 must be written all the way at the end
+ if ($this->download && $this->format === 'bzip2')
+ {
+ $c = ob_get_clean();
+ echo bzcompress($c);
+ }
+ }
+
+ function flush($data)
+ {
+ static $write;
+ if ($this->store === true)
+ {
+ if ($write === null)
+ {
+ $write = $this->write;
+ }
+ $write($this->fp, $data);
+ }
+
+ if ($this->download === true)
+ {
+ if ($this->format === 'bzip2' || $this->format === 'text' || ($this->format === 'gzip' && !$this->run_comp))
+ {
+ echo $data;
+ }
+
+ // we can write the gzip data as soon as we get it
+ if ($this->format === 'gzip')
+ {
+ if ($this->run_comp)
+ {
+ echo gzencode($data);
+ }
+ else
+ {
+ ob_flush();
+ flush();
+ }
+ }
+ }
+ }
+}
+
+/**
+* @package acp
+*/
+class mysql_extractor extends base_extractor
+{
+ function write_start($table_prefix)
+ {
+ $sql_data = "#\n";
+ $sql_data .= "# phpBB Backup Script\n";
+ $sql_data .= "# Dump of tables for $table_prefix\n";
+ $sql_data .= "# DATE : " . gmdate("d-m-Y H:i:s", $this->time) . " GMT\n";
+ $sql_data .= "#\n";
+ $this->flush($sql_data);
+ }
+
+ function write_table($table_name)
+ {
+ global $db;
+ static $new_extract;
+
+ if ($new_extract === null)
+ {
+ if ($db->sql_layer === 'mysqli' || version_compare($db->sql_server_info(true), '3.23.20', '>='))
+ {
+ $new_extract = true;
+ }
+ else
+ {
+ $new_extract = false;
+ }
+ }
+
+ if ($new_extract)
+ {
+ $this->new_write_table($table_name);
+ }
+ else
+ {
+ $this->old_write_table($table_name);
+ }
+ }
+
+ function write_data($table_name)
+ {
+ global $db;
+ if ($db->sql_layer === 'mysqli')
+ {
+ $this->write_data_mysqli($table_name);
+ }
+ else
+ {
+ $this->write_data_mysql($table_name);
+ }
+ }
+
+ function write_data_mysqli($table_name)
+ {
+ global $db;
+ $sql = "SELECT *
+ FROM $table_name";
+ $result = mysqli_query($db->db_connect_id, $sql, MYSQLI_USE_RESULT);
+ if ($result != false)
+ {
+ $fields_cnt = mysqli_num_fields($result);
+
+ // Get field information
+ $field = mysqli_fetch_fields($result);
+ $field_set = array();
+
+ for ($j = 0; $j < $fields_cnt; $j++)
+ {
+ $field_set[] = $field[$j]->name;
+ }
+
+ $search = array("\\", "'", "\x00", "\x0a", "\x0d", "\x1a", '"');
+ $replace = array("\\\\", "\\'", '\0', '\n', '\r', '\Z', '\\"');
+ $fields = implode(', ', $field_set);
+ $sql_data = 'INSERT INTO ' . $table_name . ' (' . $fields . ') VALUES ';
+ $first_set = true;
+ $query_len = 0;
+ $max_len = get_usable_memory();
+
+ while ($row = mysqli_fetch_row($result))
+ {
+ $values = array();
+ if ($first_set)
+ {
+ $query = $sql_data . '(';
+ }
+ else
+ {
+ $query .= ',(';
+ }
+
+ for ($j = 0; $j < $fields_cnt; $j++)
+ {
+ if (!isset($row[$j]) || is_null($row[$j]))
+ {
+ $values[$j] = 'NULL';
+ }
+ else if (($field[$j]->flags & 32768) && !($field[$j]->flags & 1024))
+ {
+ $values[$j] = $row[$j];
+ }
+ else
+ {
+ $values[$j] = "'" . str_replace($search, $replace, $row[$j]) . "'";
+ }
+ }
+ $query .= implode(', ', $values) . ')';
+
+ $query_len += strlen($query);
+ if ($query_len > $max_len)
+ {
+ $this->flush($query . ";\n\n");
+ $query = '';
+ $query_len = 0;
+ $first_set = true;
+ }
+ else
+ {
+ $first_set = false;
+ }
+ }
+ mysqli_free_result($result);
+
+ // check to make sure we have nothing left to flush
+ if (!$first_set && $query)
+ {
+ $this->flush($query . ";\n\n");
+ }
+ }
+ }
+
+ function write_data_mysql($table_name)
+ {
+ global $db;
+ $sql = "SELECT *
+ FROM $table_name";
+ $result = mysql_unbuffered_query($sql, $db->db_connect_id);
+
+ if ($result != false)
+ {
+ $fields_cnt = mysql_num_fields($result);
+
+ // Get field information
+ $field = array();
+ for ($i = 0; $i < $fields_cnt; $i++)
+ {
+ $field[] = mysql_fetch_field($result, $i);
+ }
+ $field_set = array();
+
+ for ($j = 0; $j < $fields_cnt; $j++)
+ {
+ $field_set[] = $field[$j]->name;
+ }
+
+ $search = array("\\", "'", "\x00", "\x0a", "\x0d", "\x1a", '"');
+ $replace = array("\\\\", "\\'", '\0', '\n', '\r', '\Z', '\\"');
+ $fields = implode(', ', $field_set);
+ $sql_data = 'INSERT INTO ' . $table_name . ' (' . $fields . ') VALUES ';
+ $first_set = true;
+ $query_len = 0;
+ $max_len = get_usable_memory();
+
+ while ($row = mysql_fetch_row($result))
+ {
+ $values = array();
+ if ($first_set)
+ {
+ $query = $sql_data . '(';
+ }
+ else
+ {
+ $query .= ',(';
+ }
+
+ for ($j = 0; $j < $fields_cnt; $j++)
+ {
+ if (!isset($row[$j]) || is_null($row[$j]))
+ {
+ $values[$j] = 'NULL';
+ }
+ else if ($field[$j]->numeric && ($field[$j]->type !== 'timestamp'))
+ {
+ $values[$j] = $row[$j];
+ }
+ else
+ {
+ $values[$j] = "'" . str_replace($search, $replace, $row[$j]) . "'";
+ }
+ }
+ $query .= implode(', ', $values) . ')';
+
+ $query_len += strlen($query);
+ if ($query_len > $max_len)
+ {
+ $this->flush($query . ";\n\n");
+ $query = '';
+ $query_len = 0;
+ $first_set = true;
+ }
+ else
+ {
+ $first_set = false;
+ }
+ }
+ mysql_free_result($result);
+
+ // check to make sure we have nothing left to flush
+ if (!$first_set && $query)
+ {
+ $this->flush($query . ";\n\n");
+ }
+ }
+ }
+
+ function new_write_table($table_name)
+ {
+ global $db;
+
+ $sql = 'SHOW CREATE TABLE ' . $table_name;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+
+ $sql_data = '# Table: ' . $table_name . "\n";
+ $sql_data .= "DROP TABLE IF EXISTS $table_name;\n";
+ $this->flush($sql_data . $row['Create Table'] . ";\n\n");
+
+ $db->sql_freeresult($result);
+ }
+
+ function old_write_table($table_name)
+ {
+ global $db;
+
+ $sql_data = '# Table: ' . $table_name . "\n";
+ $sql_data .= "DROP TABLE IF EXISTS $table_name;\n";
+ $sql_data .= "CREATE TABLE $table_name(\n";
+ $rows = array();
+
+ $sql = "SHOW FIELDS
+ FROM $table_name";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $line = ' ' . $row['Field'] . ' ' . $row['Type'];
+
+ if (!is_null($row['Default']))
+ {
+ $line .= " DEFAULT '{$row['Default']}'";
+ }
+
+ if ($row['Null'] != 'YES')
+ {
+ $line .= ' NOT NULL';
+ }
+
+ if ($row['Extra'] != '')
+ {
+ $line .= ' ' . $row['Extra'];
+ }
+
+ $rows[] = $line;
+ }
+ $db->sql_freeresult($result);
+
+ $sql = "SHOW KEYS
+ FROM $table_name";
+
+ $result = $db->sql_query($sql);
+
+ $index = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $kname = $row['Key_name'];
+
+ if ($kname != 'PRIMARY')
+ {
+ if ($row['Non_unique'] == 0)
+ {
+ $kname = "UNIQUE|$kname";
+ }
+ }
+
+ if ($row['Sub_part'])
+ {
+ $row['Column_name'] .= '(' . $row['Sub_part'] . ')';
+ }
+ $index[$kname][] = $row['Column_name'];
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($index as $key => $columns)
+ {
+ $line = ' ';
+
+ if ($key == 'PRIMARY')
+ {
+ $line .= 'PRIMARY KEY (' . implode(', ', $columns) . ')';
+ }
+ else if (strpos($key, 'UNIQUE') === 0)
+ {
+ $line .= 'UNIQUE ' . substr($key, 7) . ' (' . implode(', ', $columns) . ')';
+ }
+ else if (strpos($key, 'FULLTEXT') === 0)
+ {
+ $line .= 'FULLTEXT ' . substr($key, 9) . ' (' . implode(', ', $columns) . ')';
+ }
+ else
+ {
+ $line .= "KEY $key (" . implode(', ', $columns) . ')';
+ }
+
+ $rows[] = $line;
+ }
+
+ $sql_data .= implode(",\n", $rows);
+ $sql_data .= "\n);\n\n";
+
+ $this->flush($sql_data);
+ }
+}
+
+/**
+* @package acp
+*/
+class sqlite_extractor extends base_extractor
+{
+ function write_start($prefix)
+ {
+ $sql_data = "--\n";
+ $sql_data .= "-- phpBB Backup Script\n";
+ $sql_data .= "-- Dump of tables for $prefix\n";
+ $sql_data .= "-- DATE : " . gmdate("d-m-Y H:i:s", $this->time) . " GMT\n";
+ $sql_data .= "--\n";
+ $sql_data .= "BEGIN TRANSACTION;\n";
+ $this->flush($sql_data);
+ }
+
+ function write_table($table_name)
+ {
+ global $db;
+ $sql_data = '-- Table: ' . $table_name . "\n";
+ $sql_data .= "DROP TABLE $table_name;\n";
+
+ $sql = "SELECT sql
+ FROM sqlite_master
+ WHERE type = 'table'
+ AND name = '" . $db->sql_escape($table_name) . "'
+ ORDER BY type DESC, name;";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // Create Table
+ $sql_data .= $row['sql'] . ";\n";
+
+ $result = $db->sql_query("PRAGMA index_list('" . $db->sql_escape($table_name) . "');");
+
+ $ar = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $ar[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($ar as $value)
+ {
+ if (strpos($value['name'], 'autoindex') !== false)
+ {
+ continue;
+ }
+
+ $result = $db->sql_query("PRAGMA index_info('" . $db->sql_escape($value['name']) . "');");
+
+ $fields = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $fields[] = $row['name'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql_data .= 'CREATE ' . ($value['unique'] ? 'UNIQUE ' : '') . 'INDEX ' . $value['name'] . ' on ' . $table_name . ' (' . implode(', ', $fields) . ");\n";
+ }
+
+ $this->flush($sql_data . "\n");
+ }
+
+ function write_data($table_name)
+ {
+ global $db;
+ static $proper;
+
+ if (is_null($proper))
+ {
+ $proper = version_compare(PHP_VERSION, '5.1.3', '>=');
+ }
+
+ if ($proper)
+ {
+ $col_types = sqlite_fetch_column_types($db->db_connect_id, $table_name);
+ }
+ else
+ {
+ $sql = "SELECT sql
+ FROM sqlite_master
+ WHERE type = 'table'
+ AND name = '" . $table_name . "'";
+ $table_data = sqlite_single_query($db->db_connect_id, $sql);
+ $table_data = preg_replace('#CREATE\s+TABLE\s+"?' . $table_name . '"?#i', '', $table_data);
+ $table_data = trim($table_data);
+
+ preg_match('#\((.*)\)#s', $table_data, $matches);
+
+ $table_cols = explode(',', trim($matches[1]));
+ foreach ($table_cols as $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ $column_name = preg_replace('/"?([^"]+)"?/', '\1', $entities[0]);
+
+ // Hit a primary key, those are not what we need :D
+ if (empty($entities[1]) || (strtolower($entities[0]) === 'primary' && strtolower($entities[1]) === 'key'))
+ {
+ continue;
+ }
+ $col_types[$column_name] = $entities[1];
+ }
+ }
+
+ $sql = "SELECT *
+ FROM $table_name";
+ $result = sqlite_unbuffered_query($db->db_connect_id, $sql);
+ $rows = sqlite_fetch_all($result, SQLITE_ASSOC);
+ $sql_insert = 'INSERT INTO ' . $table_name . ' (' . implode(', ', array_keys($col_types)) . ') VALUES (';
+ foreach ($rows as $row)
+ {
+ foreach ($row as $column_name => $column_data)
+ {
+ if (is_null($column_data))
+ {
+ $row[$column_name] = 'NULL';
+ }
+ else if ($column_data == '')
+ {
+ $row[$column_name] = "''";
+ }
+ else if (strpos($col_types[$column_name], 'text') !== false || strpos($col_types[$column_name], 'char') !== false || strpos($col_types[$column_name], 'blob') !== false)
+ {
+ $row[$column_name] = sanitize_data_generic(str_replace("'", "''", $column_data));
+ }
+ }
+ $this->flush($sql_insert . implode(', ', $row) . ");\n");
+ }
+ }
+
+ function write_end()
+ {
+ $this->flush("COMMIT;\n");
+ parent::write_end();
+ }
+}
+
+/**
+* @package acp
+*/
+class postgres_extractor extends base_extractor
+{
+ function write_start($prefix)
+ {
+ $sql_data = "--\n";
+ $sql_data .= "-- phpBB Backup Script\n";
+ $sql_data .= "-- Dump of tables for $prefix\n";
+ $sql_data .= "-- DATE : " . gmdate("d-m-Y H:i:s", $this->time) . " GMT\n";
+ $sql_data .= "--\n";
+ $sql_data .= "BEGIN TRANSACTION;\n";
+ $this->flush($sql_data);
+ }
+
+ function write_table($table_name)
+ {
+ global $db;
+ static $domains_created = array();
+
+ $sql = "SELECT a.domain_name, a.data_type, a.character_maximum_length, a.domain_default
+ FROM INFORMATION_SCHEMA.domains a, INFORMATION_SCHEMA.column_domain_usage b
+ WHERE a.domain_name = b.domain_name
+ AND b.table_name = '{$table_name}'";
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (empty($domains_created[$row['domain_name']]))
+ {
+ $domains_created[$row['domain_name']] = true;
+ //$sql_data = "DROP DOMAIN {$row['domain_name']};\n";
+ $sql_data = "CREATE DOMAIN {$row['domain_name']} as {$row['data_type']}";
+ if (!empty($row['character_maximum_length']))
+ {
+ $sql_data .= '(' . $row['character_maximum_length'] . ')';
+ }
+ $sql_data .= ' NOT NULL';
+ if (!empty($row['domain_default']))
+ {
+ $sql_data .= ' DEFAULT ' . $row['domain_default'];
+ }
+ $this->flush($sql_data . ";\n");
+ }
+ }
+
+ $sql_data = '-- Table: ' . $table_name . "\n";
+ $sql_data .= "DROP TABLE $table_name;\n";
+ // PGSQL does not "tightly" bind sequences and tables, we must guess...
+ $sql = "SELECT relname
+ FROM pg_class
+ WHERE relkind = 'S'
+ AND relname = '{$table_name}_seq'";
+ $result = $db->sql_query($sql);
+ // We don't even care about storing the results. We already know the answer if we get rows back.
+ if ($db->sql_fetchrow($result))
+ {
+ $sql_data .= "DROP SEQUENCE {$table_name}_seq;\n";
+ $sql_data .= "CREATE SEQUENCE {$table_name}_seq;\n";
+ }
+ $db->sql_freeresult($result);
+
+ $field_query = "SELECT a.attnum, a.attname as field, t.typname as type, a.attlen as length, a.atttypmod as lengthvar, a.attnotnull as notnull
+ FROM pg_class c, pg_attribute a, pg_type t
+ WHERE c.relname = '" . $db->sql_escape($table_name) . "'
+ AND a.attnum > 0
+ AND a.attrelid = c.oid
+ AND a.atttypid = t.oid
+ ORDER BY a.attnum";
+ $result = $db->sql_query($field_query);
+
+ $sql_data .= "CREATE TABLE $table_name(\n";
+ $lines = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // Get the data from the table
+ $sql_get_default = "SELECT pg_get_expr(d.adbin, d.adrelid) as rowdefault
+ FROM pg_attrdef d, pg_class c
+ WHERE (c.relname = '" . $db->sql_escape($table_name) . "')
+ AND (c.oid = d.adrelid)
+ AND d.adnum = " . $row['attnum'];
+ $def_res = $db->sql_query($sql_get_default);
+ $def_row = $db->sql_fetchrow($def_res);
+ $db->sql_freeresult($def_res);
+
+ if (empty($def_row))
+ {
+ unset($row['rowdefault']);
+ }
+ else
+ {
+ $row['rowdefault'] = $def_row['rowdefault'];
+ }
+
+ if ($row['type'] == 'bpchar')
+ {
+ // Internally stored as bpchar, but isn't accepted in a CREATE TABLE statement.
+ $row['type'] = 'char';
+ }
+
+ $line = ' ' . $row['field'] . ' ' . $row['type'];
+
+ if (strpos($row['type'], 'char') !== false)
+ {
+ if ($row['lengthvar'] > 0)
+ {
+ $line .= '(' . ($row['lengthvar'] - 4) . ')';
+ }
+ }
+
+ if (strpos($row['type'], 'numeric') !== false)
+ {
+ $line .= '(';
+ $line .= sprintf("%s,%s", (($row['lengthvar'] >> 16) & 0xffff), (($row['lengthvar'] - 4) & 0xffff));
+ $line .= ')';
+ }
+
+ if (isset($row['rowdefault']))
+ {
+ $line .= ' DEFAULT ' . $row['rowdefault'];
+ }
+
+ if ($row['notnull'] == 't')
+ {
+ $line .= ' NOT NULL';
+ }
+
+ $lines[] = $line;
+ }
+ $db->sql_freeresult($result);
+
+
+ // Get the listing of primary keys.
+ $sql_pri_keys = "SELECT ic.relname as index_name, bc.relname as tab_name, ta.attname as column_name, i.indisunique as unique_key, i.indisprimary as primary_key
+ FROM pg_class bc, pg_class ic, pg_index i, pg_attribute ta, pg_attribute ia
+ WHERE (bc.oid = i.indrelid)
+ AND (ic.oid = i.indexrelid)
+ AND (ia.attrelid = i.indexrelid)
+ AND (ta.attrelid = bc.oid)
+ AND (bc.relname = '" . $db->sql_escape($table_name) . "')
+ AND (ta.attrelid = i.indrelid)
+ AND (ta.attnum = i.indkey[ia.attnum-1])
+ ORDER BY index_name, tab_name, column_name";
+
+ $result = $db->sql_query($sql_pri_keys);
+
+ $index_create = $index_rows = $primary_key = array();
+
+ // We do this in two steps. It makes placing the comma easier
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['primary_key'] == 't')
+ {
+ $primary_key[] = $row['column_name'];
+ $primary_key_name = $row['index_name'];
+ }
+ else
+ {
+ // We have to store this all this info because it is possible to have a multi-column key...
+ // we can loop through it again and build the statement
+ $index_rows[$row['index_name']]['table'] = $table_name;
+ $index_rows[$row['index_name']]['unique'] = ($row['unique_key'] == 't') ? true : false;
+ $index_rows[$row['index_name']]['column_names'][] = $row['column_name'];
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (!empty($index_rows))
+ {
+ foreach ($index_rows as $idx_name => $props)
+ {
+ $index_create[] = 'CREATE ' . ($props['unique'] ? 'UNIQUE ' : '') . "INDEX $idx_name ON $table_name (" . implode(', ', $props['column_names']) . ");";
+ }
+ }
+
+ if (!empty($primary_key))
+ {
+ $lines[] = " CONSTRAINT $primary_key_name PRIMARY KEY (" . implode(', ', $primary_key) . ")";
+ }
+
+ // Generate constraint clauses for CHECK constraints
+ $sql_checks = "SELECT conname as index_name, consrc
+ FROM pg_constraint, pg_class bc
+ WHERE conrelid = bc.oid
+ AND bc.relname = '" . $db->sql_escape($table_name) . "'
+ AND NOT EXISTS (
+ SELECT *
+ FROM pg_constraint as c, pg_inherits as i
+ WHERE i.inhrelid = pg_constraint.conrelid
+ AND c.conname = pg_constraint.conname
+ AND c.consrc = pg_constraint.consrc
+ AND c.conrelid = i.inhparent
+ )";
+ $result = $db->sql_query($sql_checks);
+
+ // Add the constraints to the sql file.
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!is_null($row['consrc']))
+ {
+ $lines[] = ' CONSTRAINT ' . $row['index_name'] . ' CHECK ' . $row['consrc'];
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $sql_data .= implode(", \n", $lines);
+ $sql_data .= "\n);\n";
+
+ if (!empty($index_create))
+ {
+ $sql_data .= implode("\n", $index_create) . "\n\n";
+ }
+ $this->flush($sql_data);
+ }
+
+ function write_data($table_name)
+ {
+ global $db;
+ // Grab all of the data from current table.
+ $sql = "SELECT *
+ FROM $table_name";
+ $result = $db->sql_query($sql);
+
+ $i_num_fields = pg_num_fields($result);
+ $seq = '';
+
+ for ($i = 0; $i < $i_num_fields; $i++)
+ {
+ $ary_type[] = pg_field_type($result, $i);
+ $ary_name[] = pg_field_name($result, $i);
+
+
+ $sql = "SELECT pg_get_expr(d.adbin, d.adrelid) as rowdefault
+ FROM pg_attrdef d, pg_class c
+ WHERE (c.relname = '{$table_name}')
+ AND (c.oid = d.adrelid)
+ AND d.adnum = " . strval($i + 1);
+ $result2 = $db->sql_query($sql);
+ if ($row = $db->sql_fetchrow($result2))
+ {
+ // Determine if we must reset the sequences
+ if (strpos($row['rowdefault'], "nextval('") === 0)
+ {
+ $seq .= "SELECT SETVAL('{$table_name}_seq',(select case when max({$ary_name[$i]})>0 then max({$ary_name[$i]})+1 else 1 end FROM {$table_name}));\n";
+ }
+ }
+ }
+
+ $this->flush("COPY $table_name (" . implode(', ', $ary_name) . ') FROM stdin;' . "\n");
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $schema_vals = array();
+
+ // Build the SQL statement to recreate the data.
+ for ($i = 0; $i < $i_num_fields; $i++)
+ {
+ $str_val = $row[$ary_name[$i]];
+
+ if (preg_match('#char|text|bool|bytea#i', $ary_type[$i]))
+ {
+ $str_val = str_replace(array("\n", "\t", "\r", "\b", "\f", "\v"), array('\n', '\t', '\r', '\b', '\f', '\v'), addslashes($str_val));
+ $str_empty = '';
+ }
+ else
+ {
+ $str_empty = '\N';
+ }
+
+ if (empty($str_val) && $str_val !== '0')
+ {
+ $str_val = $str_empty;
+ }
+
+ $schema_vals[] = $str_val;
+ }
+
+ // Take the ordered fields and their associated data and build it
+ // into a valid sql statement to recreate that field in the data.
+ $this->flush(implode("\t", $schema_vals) . "\n");
+ }
+ $db->sql_freeresult($result);
+ $this->flush("\\.\n");
+
+ // Write out the sequence statements
+ $this->flush($seq);
+ }
+
+ function write_end()
+ {
+ $this->flush("COMMIT;\n");
+ parent::write_end();
+ }
+}
+
+/**
+* @package acp
+*/
+class mssql_extractor extends base_extractor
+{
+ function write_end()
+ {
+ $this->flush("COMMIT\nGO\n");
+ parent::write_end();
+ }
+
+ function write_start($prefix)
+ {
+ $sql_data = "--\n";
+ $sql_data .= "-- phpBB Backup Script\n";
+ $sql_data .= "-- Dump of tables for $prefix\n";
+ $sql_data .= "-- DATE : " . gmdate("d-m-Y H:i:s", $this->time) . " GMT\n";
+ $sql_data .= "--\n";
+ $sql_data .= "BEGIN TRANSACTION\n";
+ $sql_data .= "GO\n";
+ $this->flush($sql_data);
+ }
+
+ function write_table($table_name)
+ {
+ global $db;
+ $sql_data = '-- Table: ' . $table_name . "\n";
+ $sql_data .= "IF OBJECT_ID(N'$table_name', N'U') IS NOT NULL\n";
+ $sql_data .= "DROP TABLE $table_name;\n";
+ $sql_data .= "GO\n";
+ $sql_data .= "\nCREATE TABLE [$table_name] (\n";
+ $rows = array();
+
+ $text_flag = false;
+
+ $sql = "SELECT COLUMN_NAME, COLUMN_DEFAULT, IS_NULLABLE, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH, COLUMNPROPERTY(object_id(TABLE_NAME), COLUMN_NAME, 'IsIdentity') as IS_IDENTITY
+ FROM INFORMATION_SCHEMA.COLUMNS
+ WHERE TABLE_NAME = '$table_name'";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $line = "\t[{$row['COLUMN_NAME']}] [{$row['DATA_TYPE']}]";
+
+ if ($row['DATA_TYPE'] == 'text')
+ {
+ $text_flag = true;
+ }
+
+ if ($row['IS_IDENTITY'])
+ {
+ $line .= ' IDENTITY (1 , 1)';
+ }
+
+ if ($row['CHARACTER_MAXIMUM_LENGTH'] && $row['DATA_TYPE'] !== 'text')
+ {
+ $line .= ' (' . $row['CHARACTER_MAXIMUM_LENGTH'] . ')';
+ }
+
+ if ($row['IS_NULLABLE'] == 'YES')
+ {
+ $line .= ' NULL';
+ }
+ else
+ {
+ $line .= ' NOT NULL';
+ }
+
+ if ($row['COLUMN_DEFAULT'])
+ {
+ $line .= ' DEFAULT ' . $row['COLUMN_DEFAULT'];
+ }
+
+ $rows[] = $line;
+ }
+ $db->sql_freeresult($result);
+
+ $sql_data .= implode(",\n", $rows);
+ $sql_data .= "\n) ON [PRIMARY]";
+
+ if ($text_flag)
+ {
+ $sql_data .= " TEXTIMAGE_ON [PRIMARY]";
+ }
+
+ $sql_data .= "\nGO\n\n";
+ $rows = array();
+
+ $sql = "SELECT CONSTRAINT_NAME, COLUMN_NAME
+ FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
+ WHERE TABLE_NAME = '$table_name'";
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!sizeof($rows))
+ {
+ $sql_data .= "ALTER TABLE [$table_name] WITH NOCHECK ADD\n";
+ $sql_data .= "\tCONSTRAINT [{$row['CONSTRAINT_NAME']}] PRIMARY KEY CLUSTERED \n\t(\n";
+ }
+ $rows[] = "\t\t[{$row['COLUMN_NAME']}]";
+ }
+ if (sizeof($rows))
+ {
+ $sql_data .= implode(",\n", $rows);
+ $sql_data .= "\n\t) ON [PRIMARY] \nGO\n";
+ }
+ $db->sql_freeresult($result);
+
+ $index = array();
+ $sql = "EXEC sp_statistics '$table_name'";
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['TYPE'] == 3)
+ {
+ $index[$row['INDEX_NAME']][] = '[' . $row['COLUMN_NAME'] . ']';
+ }
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($index as $index_name => $column_name)
+ {
+ $index[$index_name] = implode(', ', $column_name);
+ }
+
+ foreach ($index as $index_name => $columns)
+ {
+ $sql_data .= "\nCREATE INDEX [$index_name] ON [$table_name]($columns) ON [PRIMARY]\nGO\n";
+ }
+ $this->flush($sql_data);
+ }
+
+ function write_data($table_name)
+ {
+ global $db;
+
+ if ($db->sql_layer === 'mssql')
+ {
+ $this->write_data_mssql($table_name);
+ }
+ else
+ {
+ $this->write_data_odbc($table_name);
+ }
+ }
+
+ function write_data_mssql($table_name)
+ {
+ global $db;
+ $ary_type = $ary_name = array();
+ $ident_set = false;
+ $sql_data = '';
+
+ // Grab all of the data from current table.
+ $sql = "SELECT *
+ FROM $table_name";
+ $result = $db->sql_query($sql);
+
+ $retrieved_data = mssql_num_rows($result);
+
+ $i_num_fields = mssql_num_fields($result);
+
+ for ($i = 0; $i < $i_num_fields; $i++)
+ {
+ $ary_type[$i] = mssql_field_type($result, $i);
+ $ary_name[$i] = mssql_field_name($result, $i);
+ }
+
+ if ($retrieved_data)
+ {
+ $sql = "SELECT 1 as has_identity
+ FROM INFORMATION_SCHEMA.COLUMNS
+ WHERE COLUMNPROPERTY(object_id('$table_name'), COLUMN_NAME, 'IsIdentity') = 1";
+ $result2 = $db->sql_query($sql);
+ $row2 = $db->sql_fetchrow($result2);
+ if (!empty($row2['has_identity']))
+ {
+ $sql_data .= "\nSET IDENTITY_INSERT $table_name ON\nGO\n";
+ $ident_set = true;
+ }
+ $db->sql_freeresult($result2);
+ }
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $schema_vals = $schema_fields = array();
+
+ // Build the SQL statement to recreate the data.
+ for ($i = 0; $i < $i_num_fields; $i++)
+ {
+ $str_val = $row[$ary_name[$i]];
+
+ if (preg_match('#char|text|bool|varbinary#i', $ary_type[$i]))
+ {
+ $str_quote = '';
+ $str_empty = "''";
+ $str_val = sanitize_data_mssql(str_replace("'", "''", $str_val));
+ }
+ else if (preg_match('#date|timestamp#i', $ary_type[$i]))
+ {
+ if (empty($str_val))
+ {
+ $str_quote = '';
+ }
+ else
+ {
+ $str_quote = "'";
+ }
+ }
+ else
+ {
+ $str_quote = '';
+ $str_empty = 'NULL';
+ }
+
+ if (empty($str_val) && $str_val !== '0' && !(is_int($str_val) || is_float($str_val)))
+ {
+ $str_val = $str_empty;
+ }
+
+ $schema_vals[$i] = $str_quote . $str_val . $str_quote;
+ $schema_fields[$i] = $ary_name[$i];
+ }
+
+ // Take the ordered fields and their associated data and build it
+ // into a valid sql statement to recreate that field in the data.
+ $sql_data .= "INSERT INTO $table_name (" . implode(', ', $schema_fields) . ') VALUES (' . implode(', ', $schema_vals) . ");\nGO\n";
+
+ $this->flush($sql_data);
+ $sql_data = '';
+ }
+ $db->sql_freeresult($result);
+
+ if ($retrieved_data && $ident_set)
+ {
+ $sql_data .= "\nSET IDENTITY_INSERT $table_name OFF\nGO\n";
+ }
+ $this->flush($sql_data);
+ }
+
+ function write_data_odbc($table_name)
+ {
+ global $db;
+ $ary_type = $ary_name = array();
+ $ident_set = false;
+ $sql_data = '';
+
+ // Grab all of the data from current table.
+ $sql = "SELECT *
+ FROM $table_name";
+ $result = $db->sql_query($sql);
+
+ $retrieved_data = odbc_num_rows($result);
+
+ if ($retrieved_data)
+ {
+ $sql = "SELECT 1 as has_identity
+ FROM INFORMATION_SCHEMA.COLUMNS
+ WHERE COLUMNPROPERTY(object_id('$table_name'), COLUMN_NAME, 'IsIdentity') = 1";
+ $result2 = $db->sql_query($sql);
+ $row2 = $db->sql_fetchrow($result2);
+ if (!empty($row2['has_identity']))
+ {
+ $sql_data .= "\nSET IDENTITY_INSERT $table_name ON\nGO\n";
+ $ident_set = true;
+ }
+ $db->sql_freeresult($result2);
+ }
+
+ $i_num_fields = odbc_num_fields($result);
+
+ for ($i = 0; $i < $i_num_fields; $i++)
+ {
+ $ary_type[$i] = odbc_field_type($result, $i + 1);
+ $ary_name[$i] = odbc_field_name($result, $i + 1);
+ }
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $schema_vals = $schema_fields = array();
+
+ // Build the SQL statement to recreate the data.
+ for ($i = 0; $i < $i_num_fields; $i++)
+ {
+ $str_val = $row[$ary_name[$i]];
+
+ if (preg_match('#char|text|bool|varbinary#i', $ary_type[$i]))
+ {
+ $str_quote = '';
+ $str_empty = "''";
+ $str_val = sanitize_data_mssql(str_replace("'", "''", $str_val));
+ }
+ else if (preg_match('#date|timestamp#i', $ary_type[$i]))
+ {
+ if (empty($str_val))
+ {
+ $str_quote = '';
+ }
+ else
+ {
+ $str_quote = "'";
+ }
+ }
+ else
+ {
+ $str_quote = '';
+ $str_empty = 'NULL';
+ }
+
+ if (empty($str_val) && $str_val !== '0' && !(is_int($str_val) || is_float($str_val)))
+ {
+ $str_val = $str_empty;
+ }
+
+ $schema_vals[$i] = $str_quote . $str_val . $str_quote;
+ $schema_fields[$i] = $ary_name[$i];
+ }
+
+ // Take the ordered fields and their associated data and build it
+ // into a valid sql statement to recreate that field in the data.
+ $sql_data .= "INSERT INTO $table_name (" . implode(', ', $schema_fields) . ') VALUES (' . implode(', ', $schema_vals) . ");\nGO\n";
+
+ $this->flush($sql_data);
+
+ $sql_data = '';
+
+ }
+ $db->sql_freeresult($result);
+
+ if ($retrieved_data && $ident_set)
+ {
+ $sql_data .= "\nSET IDENTITY_INSERT $table_name OFF\nGO\n";
+ }
+ $this->flush($sql_data);
+ }
+
+}
+
+/**
+* @package acp
+*/
+class oracle_extractor extends base_extractor
+{
+ function write_table($table_name)
+ {
+ global $db;
+ $sql_data = '-- Table: ' . $table_name . "\n";
+ $sql_data .= "DROP TABLE $table_name\n/\n";
+ $sql_data .= "\nCREATE TABLE $table_name (\n";
+
+ $sql = "SELECT COLUMN_NAME, DATA_TYPE, DATA_PRECISION, DATA_LENGTH, NULLABLE, DATA_DEFAULT
+ FROM ALL_TAB_COLS
+ WHERE table_name = '{$table_name}'";
+ $result = $db->sql_query($sql);
+
+ $rows = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $line = ' "' . $row['column_name'] . '" ' . $row['data_type'];
+
+ if ($row['data_type'] !== 'CLOB')
+ {
+ if ($row['data_type'] !== 'VARCHAR2' && $row['data_type'] !== 'CHAR')
+ {
+ $line .= '(' . $row['data_precision'] . ')';
+ }
+ else
+ {
+ $line .= '(' . $row['data_length'] . ')';
+ }
+ }
+
+ if (!empty($row['data_default']))
+ {
+ $line .= ' DEFAULT ' . $row['data_default'];
+ }
+
+ if ($row['nullable'] == 'N')
+ {
+ $line .= ' NOT NULL';
+ }
+ $rows[] = $line;
+ }
+ $db->sql_freeresult($result);
+
+ $sql = "SELECT A.CONSTRAINT_NAME, A.COLUMN_NAME
+ FROM USER_CONS_COLUMNS A, USER_CONSTRAINTS B
+ WHERE A.CONSTRAINT_NAME = B.CONSTRAINT_NAME
+ AND B.CONSTRAINT_TYPE = 'P'
+ AND A.TABLE_NAME = '{$table_name}'";
+ $result = $db->sql_query($sql);
+
+ $primary_key = array();
+ $contraint_name = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $constraint_name = '"' . $row['constraint_name'] . '"';
+ $primary_key[] = '"' . $row['column_name'] . '"';
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($primary_key))
+ {
+ $rows[] = " CONSTRAINT {$constraint_name} PRIMARY KEY (" . implode(', ', $primary_key) . ')';
+ }
+
+ $sql = "SELECT A.CONSTRAINT_NAME, A.COLUMN_NAME
+ FROM USER_CONS_COLUMNS A, USER_CONSTRAINTS B
+ WHERE A.CONSTRAINT_NAME = B.CONSTRAINT_NAME
+ AND B.CONSTRAINT_TYPE = 'U'
+ AND A.TABLE_NAME = '{$table_name}'";
+ $result = $db->sql_query($sql);
+
+ $unique = array();
+ $contraint_name = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $constraint_name = '"' . $row['constraint_name'] . '"';
+ $unique[] = '"' . $row['column_name'] . '"';
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($unique))
+ {
+ $rows[] = " CONSTRAINT {$constraint_name} UNIQUE (" . implode(', ', $unique) . ')';
+ }
+
+ $sql_data .= implode(",\n", $rows);
+ $sql_data .= "\n)\n/\n";
+
+ $sql = "SELECT A.REFERENCED_NAME, C.*
+ FROM USER_DEPENDENCIES A, USER_TRIGGERS B, USER_SEQUENCES C
+ WHERE A.REFERENCED_TYPE = 'SEQUENCE'
+ AND A.NAME = B.TRIGGER_NAME
+ AND B.TABLE_NAME = '{$table_name}'
+ AND C.SEQUENCE_NAME = A.REFERENCED_NAME";
+ $result = $db->sql_query($sql);
+
+ $type = request_var('type', '');
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $sql_data .= "\nDROP SEQUENCE \"{$row['referenced_name']}\"\n/\n";
+ $sql_data .= "\nCREATE SEQUENCE \"{$row['referenced_name']}\"";
+
+ if ($type == 'full')
+ {
+ $sql_data .= ' START WITH ' . $row['last_number'];
+ }
+
+ $sql_data .= "\n/\n";
+ }
+ $db->sql_freeresult($result);
+
+ $sql = "SELECT DESCRIPTION, WHEN_CLAUSE, TRIGGER_BODY
+ FROM USER_TRIGGERS
+ WHERE TABLE_NAME = '{$table_name}'";
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $sql_data .= "\nCREATE OR REPLACE TRIGGER {$row['description']}WHEN ({$row['when_clause']})\n{$row['trigger_body']}\n/\n";
+ }
+ $db->sql_freeresult($result);
+
+ $sql = "SELECT A.INDEX_NAME, B.COLUMN_NAME
+ FROM USER_INDEXES A, USER_IND_COLUMNS B
+ WHERE A.UNIQUENESS = 'NONUNIQUE'
+ AND A.INDEX_NAME = B.INDEX_NAME
+ AND B.TABLE_NAME = '{$table_name}'";
+ $result = $db->sql_query($sql);
+
+ $index = array();
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $index[$row['index_name']][] = $row['column_name'];
+ }
+
+ foreach ($index as $index_name => $column_names)
+ {
+ $sql_data .= "\nCREATE INDEX $index_name ON $table_name(" . implode(', ', $column_names) . ")\n/\n";
+ }
+ $db->sql_freeresult($result);
+ $this->flush($sql_data);
+ }
+
+ function write_data($table_name)
+ {
+ global $db;
+ $ary_type = $ary_name = array();
+
+ // Grab all of the data from current table.
+ $sql = "SELECT *
+ FROM $table_name";
+ $result = $db->sql_query($sql);
+
+ $i_num_fields = ocinumcols($result);
+
+ for ($i = 0; $i < $i_num_fields; $i++)
+ {
+ $ary_type[$i] = ocicolumntype($result, $i + 1);
+ $ary_name[$i] = ocicolumnname($result, $i + 1);
+ }
+
+ $sql_data = '';
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $schema_vals = $schema_fields = array();
+
+ // Build the SQL statement to recreate the data.
+ for ($i = 0; $i < $i_num_fields; $i++)
+ {
+ // Oracle uses uppercase - we use lowercase
+ $str_val = $row[strtolower($ary_name[$i])];
+
+ if (preg_match('#char|text|bool|raw|clob#i', $ary_type[$i]))
+ {
+ $str_quote = '';
+ $str_empty = "''";
+ $str_val = sanitize_data_oracle($str_val);
+ }
+ else if (preg_match('#date|timestamp#i', $ary_type[$i]))
+ {
+ if (empty($str_val))
+ {
+ $str_quote = '';
+ }
+ else
+ {
+ $str_quote = "'";
+ }
+ }
+ else
+ {
+ $str_quote = '';
+ $str_empty = 'NULL';
+ }
+
+ if (empty($str_val) && $str_val !== '0')
+ {
+ $str_val = $str_empty;
+ }
+
+ $schema_vals[$i] = $str_quote . $str_val . $str_quote;
+ $schema_fields[$i] = '"' . $ary_name[$i] . '"';
+ }
+
+ // Take the ordered fields and their associated data and build it
+ // into a valid sql statement to recreate that field in the data.
+ $sql_data = "INSERT INTO $table_name (" . implode(', ', $schema_fields) . ') VALUES (' . implode(', ', $schema_vals) . ")\n/\n";
+
+ $this->flush($sql_data);
+ }
+ $db->sql_freeresult($result);
+ }
+
+ function write_start($prefix)
+ {
+ $sql_data = "--\n";
+ $sql_data .= "-- phpBB Backup Script\n";
+ $sql_data .= "-- Dump of tables for $prefix\n";
+ $sql_data .= "-- DATE : " . gmdate("d-m-Y H:i:s", $this->time) . " GMT\n";
+ $sql_data .= "--\n";
+ $this->flush($sql_data);
+ }
+}
+
+/**
+* @package acp
+*/
+class firebird_extractor extends base_extractor
+{
+ function write_start($prefix)
+ {
+ $sql_data = "--\n";
+ $sql_data .= "-- phpBB Backup Script\n";
+ $sql_data .= "-- Dump of tables for $prefix\n";
+ $sql_data .= "-- DATE : " . gmdate("d-m-Y H:i:s", $this->time) . " GMT\n";
+ $sql_data .= "--\n";
+ $this->flush($sql_data);
+ }
+
+ function write_data($table_name)
+ {
+ global $db;
+ $ary_type = $ary_name = array();
+
+ // Grab all of the data from current table.
+ $sql = "SELECT *
+ FROM $table_name";
+ $result = $db->sql_query($sql);
+
+ $i_num_fields = ibase_num_fields($result);
+
+ for ($i = 0; $i < $i_num_fields; $i++)
+ {
+ $info = ibase_field_info($result, $i);
+ $ary_type[$i] = $info['type'];
+ $ary_name[$i] = $info['name'];
+ }
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $schema_vals = $schema_fields = array();
+
+ // Build the SQL statement to recreate the data.
+ for ($i = 0; $i < $i_num_fields; $i++)
+ {
+ $str_val = $row[strtolower($ary_name[$i])];
+
+ if (preg_match('#char|text|bool|varbinary|blob#i', $ary_type[$i]))
+ {
+ $str_quote = '';
+ $str_empty = "''";
+ $str_val = sanitize_data_generic(str_replace("'", "''", $str_val));
+ }
+ else if (preg_match('#date|timestamp#i', $ary_type[$i]))
+ {
+ if (empty($str_val))
+ {
+ $str_quote = '';
+ }
+ else
+ {
+ $str_quote = "'";
+ }
+ }
+ else
+ {
+ $str_quote = '';
+ $str_empty = 'NULL';
+ }
+
+ if (empty($str_val) && $str_val !== '0')
+ {
+ $str_val = $str_empty;
+ }
+
+ $schema_vals[$i] = $str_quote . $str_val . $str_quote;
+ $schema_fields[$i] = '"' . $ary_name[$i] . '"';
+ }
+
+ // Take the ordered fields and their associated data and build it
+ // into a valid sql statement to recreate that field in the data.
+ $sql_data = "INSERT INTO $table_name (" . implode(', ', $schema_fields) . ') VALUES (' . implode(', ', $schema_vals) . ");\n";
+
+ $this->flush($sql_data);
+ }
+ $db->sql_freeresult($result);
+ }
+
+ function write_table($table_name)
+ {
+ global $db;
+
+ $sql_data = '-- Table: ' . $table_name . "\n";
+ $sql_data .= "DROP TABLE $table_name;\n";
+
+ $data_types = array(7 => 'SMALLINT', 8 => 'INTEGER', 10 => 'FLOAT', 12 => 'DATE', 13 => 'TIME', 14 => 'CHARACTER', 27 => 'DOUBLE PRECISION', 35 => 'TIMESTAMP', 37 => 'VARCHAR', 40 => 'CSTRING', 261 => 'BLOB', 701 => 'DECIMAL', 702 => 'NUMERIC');
+
+ $sql_data .= "\nCREATE TABLE $table_name (\n";
+
+ $sql = 'SELECT DISTINCT R.RDB$FIELD_NAME as FNAME, R.RDB$NULL_FLAG as NFLAG, R.RDB$DEFAULT_SOURCE as DSOURCE, F.RDB$FIELD_TYPE as FTYPE, F.RDB$FIELD_SUB_TYPE as STYPE, F.RDB$FIELD_LENGTH as FLEN
+ FROM RDB$RELATION_FIELDS R
+ JOIN RDB$FIELDS F ON R.RDB$FIELD_SOURCE=F.RDB$FIELD_NAME
+ LEFT JOIN RDB$FIELD_DIMENSIONS D ON R.RDB$FIELD_SOURCE = D.RDB$FIELD_NAME
+ WHERE F.RDB$SYSTEM_FLAG = 0
+ AND R.RDB$RELATION_NAME = \''. $table_name . '\'
+ ORDER BY R.RDB$FIELD_POSITION';
+ $result = $db->sql_query($sql);
+
+ $rows = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $line = "\t" . '"' . $row['fname'] . '" ' . $data_types[$row['ftype']];
+
+ if ($row['ftype'] == 261 && $row['stype'] == 1)
+ {
+ $line .= ' SUB_TYPE TEXT';
+ }
+
+ if ($row['ftype'] == 37 || $row['ftype'] == 14)
+ {
+ $line .= ' (' . $row['flen'] . ')';
+ }
+
+ if (!empty($row['dsource']))
+ {
+ $line .= ' ' . $row['dsource'];
+ }
+
+ if (!empty($row['nflag']))
+ {
+ $line .= ' NOT NULL';
+ }
+ $rows[] = $line;
+ }
+ $db->sql_freeresult($result);
+
+ $sql_data .= implode(",\n", $rows);
+ $sql_data .= "\n);\n";
+ $keys = array();
+
+ $sql = 'SELECT I.RDB$FIELD_NAME as NAME
+ FROM RDB$RELATION_CONSTRAINTS RC, RDB$INDEX_SEGMENTS I, RDB$INDICES IDX
+ WHERE (I.RDB$INDEX_NAME = RC.RDB$INDEX_NAME)
+ AND (IDX.RDB$INDEX_NAME = RC.RDB$INDEX_NAME)
+ AND (RC.RDB$RELATION_NAME = \''. $table_name . '\')
+ ORDER BY I.RDB$FIELD_POSITION';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $keys[] = $row['name'];
+ }
+
+ if (sizeof($keys))
+ {
+ $sql_data .= "\nALTER TABLE $table_name ADD PRIMARY KEY (" . implode(', ', $keys) . ');';
+ }
+
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT I.RDB$INDEX_NAME as INAME, I.RDB$UNIQUE_FLAG as UFLAG, S.RDB$FIELD_NAME as FNAME
+ FROM RDB$INDICES I JOIN RDB$INDEX_SEGMENTS S ON S.RDB$INDEX_NAME=I.RDB$INDEX_NAME
+ WHERE (I.RDB$SYSTEM_FLAG IS NULL OR I.RDB$SYSTEM_FLAG=0)
+ AND I.RDB$FOREIGN_KEY IS NULL
+ AND I.RDB$RELATION_NAME = \''. $table_name . '\'
+ AND I.RDB$INDEX_NAME NOT STARTING WITH \'RDB$\'
+ ORDER BY S.RDB$FIELD_POSITION';
+ $result = $db->sql_query($sql);
+
+ $index = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $index[$row['iname']]['unique'] = !empty($row['uflag']);
+ $index[$row['iname']]['values'][] = $row['fname'];
+ }
+
+ foreach ($index as $index_name => $data)
+ {
+ $sql_data .= "\nCREATE ";
+ if ($data['unique'])
+ {
+ $sql_data .= 'UNIQUE ';
+ }
+ $sql_data .= "INDEX $index_name ON $table_name(" . implode(', ', $data['values']) . ");";
+ }
+ $sql_data .= "\n";
+
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT D1.RDB$DEPENDENT_NAME as DNAME, D1.RDB$FIELD_NAME as FNAME, D1.RDB$DEPENDENT_TYPE, R1.RDB$RELATION_NAME
+ FROM RDB$DEPENDENCIES D1
+ LEFT JOIN RDB$RELATIONS R1 ON ((D1.RDB$DEPENDENT_NAME = R1.RDB$RELATION_NAME) AND (NOT (R1.RDB$VIEW_BLR IS NULL)))
+ WHERE (D1.RDB$DEPENDED_ON_TYPE = 0)
+ AND (D1.RDB$DEPENDENT_TYPE <> 3)
+ AND (D1.RDB$DEPENDED_ON_NAME = \'' . $table_name . '\')
+ UNION SELECT DISTINCT F2.RDB$RELATION_NAME, D2.RDB$FIELD_NAME, D2.RDB$DEPENDENT_TYPE, R2.RDB$RELATION_NAME FROM RDB$DEPENDENCIES D2, RDB$RELATION_FIELDS F2
+ LEFT JOIN RDB$RELATIONS R2 ON ((F2.RDB$RELATION_NAME = R2.RDB$RELATION_NAME) AND (NOT (R2.RDB$VIEW_BLR IS NULL)))
+ WHERE (D2.RDB$DEPENDENT_TYPE = 3)
+ AND (D2.RDB$DEPENDENT_NAME = F2.RDB$FIELD_SOURCE)
+ AND (D2.RDB$DEPENDED_ON_NAME = \'' . $table_name . '\')
+ ORDER BY 1, 2';
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $sql = 'SELECT T1.RDB$DEPENDED_ON_NAME as GEN, T1.RDB$FIELD_NAME, T1.RDB$DEPENDED_ON_TYPE
+ FROM RDB$DEPENDENCIES T1
+ WHERE (T1.RDB$DEPENDENT_NAME = \'' . $row['dname'] . '\')
+ AND (T1.RDB$DEPENDENT_TYPE = 2 AND T1.RDB$DEPENDED_ON_TYPE = 14)
+ UNION ALL SELECT DISTINCT D.RDB$DEPENDED_ON_NAME, D.RDB$FIELD_NAME, D.RDB$DEPENDED_ON_TYPE
+ FROM RDB$DEPENDENCIES D, RDB$RELATION_FIELDS F
+ WHERE (D.RDB$DEPENDENT_TYPE = 3)
+ AND (D.RDB$DEPENDENT_NAME = F.RDB$FIELD_SOURCE)
+ AND (F.RDB$RELATION_NAME = \'' . $row['dname'] . '\')
+ ORDER BY 1,2';
+ $result2 = $db->sql_query($sql);
+ $row2 = $db->sql_fetchrow($result2);
+ $db->sql_freeresult($result2);
+ $gen_name = $row2['gen'];
+
+ $sql_data .= "\nDROP GENERATOR " . $gen_name . ";";
+ $sql_data .= "\nSET TERM ^ ;";
+ $sql_data .= "\nCREATE GENERATOR " . $gen_name . "^";
+ $sql_data .= "\nSET GENERATOR " . $gen_name . " TO 0^\n";
+ $sql_data .= "\nCREATE TRIGGER {$row['dname']} FOR $table_name";
+ $sql_data .= "\nBEFORE INSERT\nAS\nBEGIN";
+ $sql_data .= "\n NEW.{$row['fname']} = GEN_ID(" . $gen_name . ", 1);";
+ $sql_data .= "\nEND^\n";
+ $sql_data .= "\nSET TERM ; ^\n";
+ }
+
+ $this->flush($sql_data);
+
+ $db->sql_freeresult($result);
+ }
+}
+
+// get how much space we allow for a chunk of data, very similar to phpMyAdmin's way of doing things ;-) (hey, we only do this for MySQL anyway :P)
+function get_usable_memory()
+{
+ $val = trim(@ini_get('memory_limit'));
+
+ if (preg_match('/(\\d+)([mkg]?)/i', $val, $regs))
+ {
+ $memory_limit = (int) $regs[1];
+ switch ($regs[2])
+ {
+
+ case 'k':
+ case 'K':
+ $memory_limit *= 1024;
+ break;
+
+ case 'm':
+ case 'M':
+ $memory_limit *= 1048576;
+ break;
+
+ case 'g':
+ case 'G':
+ $memory_limit *= 1073741824;
+ break;
+ }
+
+ // how much memory PHP requires at the start of export (it is really a little less)
+ if ($memory_limit > 6100000)
+ {
+ $memory_limit -= 6100000;
+ }
+
+ // allow us to consume half of the total memory available
+ $memory_limit /= 2;
+ }
+ else
+ {
+ // set the buffer to 1M if we have no clue how much memory PHP will give us :P
+ $memory_limit = 1048576;
+ }
+
+ return $memory_limit;
+}
+
+function sanitize_data_mssql($text)
+{
+ $data = preg_split('/[\n\t\r\b\f]/', $text);
+ preg_match_all('/[\n\t\r\b\f]/', $text, $matches);
+
+ $val = array();
+
+ foreach ($data as $value)
+ {
+ if (strlen($value))
+ {
+ $val[] = "'" . $value . "'";
+ }
+ if (sizeof($matches[0]))
+ {
+ $val[] = 'char(' . ord(array_shift($matches[0])) . ')';
+ }
+ }
+
+ return implode('+', $val);
+}
+
+function sanitize_data_oracle($text)
+{
+// $data = preg_split('/[\0\n\t\r\b\f\'"\/\\\]/', $text);
+// preg_match_all('/[\0\n\t\r\b\f\'"\/\\\]/', $text, $matches);
+ $data = preg_split('/[\0\b\f\'\/]/', $text);
+ preg_match_all('/[\0\r\b\f\'\/]/', $text, $matches);
+
+ $val = array();
+
+ foreach ($data as $value)
+ {
+ if (strlen($value))
+ {
+ $val[] = "'" . $value . "'";
+ }
+ if (sizeof($matches[0]))
+ {
+ $val[] = 'chr(' . ord(array_shift($matches[0])) . ')';
+ }
+ }
+
+ return implode('||', $val);
+}
+
+function sanitize_data_generic($text)
+{
+ $data = preg_split('/[\n\t\r\b\f]/', $text);
+ preg_match_all('/[\n\t\r\b\f]/', $text, $matches);
+
+ $val = array();
+
+ foreach ($data as $value)
+ {
+ if (strlen($value))
+ {
+ $val[] = "'" . $value . "'";
+ }
+ if (sizeof($matches[0]))
+ {
+ $val[] = "'" . array_shift($matches[0]) . "'";
+ }
+ }
+
+ return implode('||', $val);
+}
+
+// modified from PHP.net
+function fgetd(&$fp, $delim, $read, $seek, $eof, $buffer = 8192)
+{
+ $record = '';
+ $delim_len = strlen($delim);
+
+ while (!$eof($fp))
+ {
+ $pos = strpos($record, $delim);
+ if ($pos === false)
+ {
+ $record .= $read($fp, $buffer);
+ if ($eof($fp) && ($pos = strpos($record, $delim)) !== false)
+ {
+ $seek($fp, $pos + $delim_len - strlen($record), SEEK_CUR);
+ return substr($record, 0, $pos);
+ }
+ }
+ else
+ {
+ $seek($fp, $pos + $delim_len - strlen($record), SEEK_CUR);
+ return substr($record, 0, $pos);
+ }
+ }
+
+ return false;
+}
+
+function fgetd_seekless(&$fp, $delim, $read, $seek, $eof, $buffer = 8192)
+{
+ static $array = array();
+ static $record = '';
+
+ if (!sizeof($array))
+ {
+ while (!$eof($fp))
+ {
+ if (strpos($record, $delim) !== false)
+ {
+ $array = explode($delim, $record);
+ $record = array_pop($array);
+ break;
+ }
+ else
+ {
+ $record .= $read($fp, $buffer);
+ }
+ }
+ if ($eof($fp) && strpos($record, $delim) !== false)
+ {
+ $array = explode($delim, $record);
+ $record = array_pop($array);
+ }
+ }
+
+ if (sizeof($array))
+ {
+ return array_shift($array);
+ }
+
+ return false;
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_disallow.php b/phpBB/includes/acp/acp_disallow.php
new file mode 100644
index 0000000000..9549955cc8
--- /dev/null
+++ b/phpBB/includes/acp/acp_disallow.php
@@ -0,0 +1,108 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_disallow
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template, $cache;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ $user->add_lang('acp/posting');
+
+ // Set up general vars
+ $this->tpl_name = 'acp_disallow';
+ $this->page_title = 'ACP_DISALLOW_USERNAMES';
+
+ $form_key = 'acp_disallow';
+ add_form_key($form_key);
+
+ $disallow = (isset($_POST['disallow'])) ? true : false;
+ $allow = (isset($_POST['allow'])) ? true : false;
+
+ if (($allow || $disallow) && !check_form_key($form_key))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if ($disallow)
+ {
+ $disallowed_user = str_replace('*', '%', utf8_normalize_nfc(request_var('disallowed_user', '', true)));
+
+ if (!$disallowed_user)
+ {
+ trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = 'INSERT INTO ' . DISALLOW_TABLE . ' ' . $db->sql_build_array('INSERT', array('disallow_username' => $disallowed_user));
+ $db->sql_query($sql);
+
+ $cache->destroy('_disallowed_usernames');
+
+ $message = $user->lang['DISALLOW_SUCCESSFUL'];
+ add_log('admin', 'LOG_DISALLOW_ADD', str_replace('%', '*', $disallowed_user));
+
+ trigger_error($message . adm_back_link($this->u_action));
+ }
+ else if ($allow)
+ {
+ $disallowed_id = request_var('disallowed_id', 0);
+
+ if (!$disallowed_id)
+ {
+ trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = 'DELETE FROM ' . DISALLOW_TABLE . '
+ WHERE disallow_id = ' . $disallowed_id;
+ $db->sql_query($sql);
+
+ $cache->destroy('_disallowed_usernames');
+
+ add_log('admin', 'LOG_DISALLOW_DELETE');
+
+ trigger_error($user->lang['DISALLOWED_DELETED'] . adm_back_link($this->u_action));
+ }
+
+ // Grab the current list of disallowed usernames...
+ $sql = 'SELECT *
+ FROM ' . DISALLOW_TABLE;
+ $result = $db->sql_query($sql);
+
+ $disallow_select = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $disallow_select .= '<option value="' . $row['disallow_id'] . '">' . str_replace('%', '*', $row['disallow_username']) . '</option>';
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'U_ACTION' => $this->u_action,
+ 'S_DISALLOWED_NAMES' => $disallow_select)
+ );
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php
new file mode 100644
index 0000000000..350693a630
--- /dev/null
+++ b/phpBB/includes/acp/acp_email.php
@@ -0,0 +1,262 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_email
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template, $cache;
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
+
+ $user->add_lang('acp/email');
+ $this->tpl_name = 'acp_email';
+ $this->page_title = 'ACP_MASS_EMAIL';
+
+ $form_key = 'acp_email';
+ add_form_key($form_key);
+
+ // Set some vars
+ $submit = (isset($_POST['submit'])) ? true : false;
+ $error = array();
+
+ $usernames = request_var('usernames', '', true);
+ $group_id = request_var('g', 0);
+ $subject = utf8_normalize_nfc(request_var('subject', '', true));
+ $message = utf8_normalize_nfc(request_var('message', '', true));
+
+ // Do the job ...
+ if ($submit)
+ {
+ // Error checking needs to go here ... if no subject and/or no message then skip
+ // over the send and return to the form
+ $use_queue = (isset($_POST['send_immediately'])) ? false : true;
+ $priority = request_var('mail_priority_flag', MAIL_NORMAL_PRIORITY);
+
+ if (!check_form_key($form_key))
+ {
+ $error[] = $user->lang['FORM_INVALID'];
+ }
+
+ if (!$subject)
+ {
+ $error[] = $user->lang['NO_EMAIL_SUBJECT'];
+ }
+
+ if (!$message)
+ {
+ $error[] = $user->lang['NO_EMAIL_MESSAGE'];
+ }
+
+ if (!sizeof($error))
+ {
+ if ($usernames)
+ {
+ // If giving usernames the admin is able to email inactive users too...
+ $sql = 'SELECT username, user_email, user_jabber, user_notify_type, user_lang
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('username_clean', array_map('utf8_clean_string', explode("\n", $usernames))) . '
+ AND user_allow_massemail = 1
+ ORDER BY user_lang, user_notify_type'; // , SUBSTRING(user_email FROM INSTR(user_email, '@'))
+ }
+ else
+ {
+ if ($group_id)
+ {
+ $sql = 'SELECT u.user_email, u.username, u.username_clean, u.user_lang, u.user_jabber, u.user_notify_type
+ FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . ' ug
+ WHERE ug.group_id = ' . $group_id . '
+ AND ug.user_pending = 0
+ AND u.user_id = ug.user_id
+ AND u.user_allow_massemail = 1
+ AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
+ ORDER BY u.user_lang, u.user_notify_type';
+ }
+ else
+ {
+ $sql = 'SELECT username, username_clean, user_email, user_jabber, user_notify_type, user_lang
+ FROM ' . USERS_TABLE . '
+ WHERE user_allow_massemail = 1
+ AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
+ ORDER BY user_lang, user_notify_type';
+ }
+ }
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+
+ if (!$row)
+ {
+ $db->sql_freeresult($result);
+ trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $i = $j = 0;
+
+ // Send with BCC, no more than 50 recipients for one mail (to not exceed the limit)
+ $max_chunk_size = 50;
+ $email_list = array();
+ $old_lang = $row['user_lang'];
+ $old_notify_type = $row['user_notify_type'];
+
+ do
+ {
+ if (($row['user_notify_type'] == NOTIFY_EMAIL && $row['user_email']) ||
+ ($row['user_notify_type'] == NOTIFY_IM && $row['user_jabber']) ||
+ ($row['user_notify_type'] == NOTIFY_BOTH && ($row['user_email'] || $row['user_jabber'])))
+ {
+ if ($i == $max_chunk_size || $row['user_lang'] != $old_lang || $row['user_notify_type'] != $old_notify_type)
+ {
+ $i = 0;
+
+ if (sizeof($email_list))
+ {
+ $j++;
+ }
+
+ $old_lang = $row['user_lang'];
+ $old_notify_type = $row['user_notify_type'];
+ }
+
+ $email_list[$j][$i]['lang'] = $row['user_lang'];
+ $email_list[$j][$i]['method'] = $row['user_notify_type'];
+ $email_list[$j][$i]['email'] = $row['user_email'];
+ $email_list[$j][$i]['name'] = $row['username'];
+ $email_list[$j][$i]['jabber'] = $row['user_jabber'];
+ $i++;
+ }
+ }
+ while ($row = $db->sql_fetchrow($result));
+ $db->sql_freeresult($result);
+
+ // Send the messages
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ $messenger = new messenger($use_queue);
+
+ $errored = false;
+
+ for ($i = 0, $size = sizeof($email_list); $i < $size; $i++)
+ {
+ $used_lang = $email_list[$i][0]['lang'];
+ $used_method = $email_list[$i][0]['method'];
+
+ for ($j = 0, $list_size = sizeof($email_list[$i]); $j < $list_size; $j++)
+ {
+ $email_row = $email_list[$i][$j];
+
+ $messenger->{((sizeof($email_list[$i]) == 1) ? 'to' : 'bcc')}($email_row['email'], $email_row['name']);
+ $messenger->im($email_row['jabber'], $email_row['name']);
+ }
+
+ $messenger->template('admin_send_email', $used_lang);
+
+ $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
+ $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
+ $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
+ $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
+
+ $messenger->subject(htmlspecialchars_decode($subject));
+ $messenger->set_mail_priority($priority);
+
+ $messenger->assign_vars(array(
+ 'CONTACT_EMAIL' => $config['board_contact'],
+ 'MESSAGE' => htmlspecialchars_decode($message))
+ );
+
+ if (!($messenger->send($used_method)))
+ {
+ $errored = true;
+ }
+ }
+ unset($email_list);
+
+ $messenger->save_queue();
+
+ if ($usernames)
+ {
+ $usernames = explode("\n", $usernames);
+ add_log('admin', 'LOG_MASS_EMAIL', implode(', ', utf8_normalize_nfc($usernames)));
+ }
+ else
+ {
+ if ($group_id)
+ {
+ $group_name = get_group_name($group_id);
+ }
+ else
+ {
+ // Not great but the logging routine doesn't cope well with localising on the fly
+ $group_name = $user->lang['ALL_USERS'];
+ }
+
+ add_log('admin', 'LOG_MASS_EMAIL', $group_name);
+ }
+
+ if (!$errored)
+ {
+ $message = ($use_queue) ? $user->lang['EMAIL_SENT_QUEUE'] : $user->lang['EMAIL_SENT'];
+ trigger_error($message . adm_back_link($this->u_action));
+ }
+ else
+ {
+ $message = sprintf($user->lang['EMAIL_SEND_ERROR'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=logs&amp;mode=critical') . '">', '</a>');
+ trigger_error($message . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+ }
+
+ // Exclude bots and guests...
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name IN ('BOTS', 'GUESTS')";
+ $result = $db->sql_query($sql);
+
+ $exclude = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $exclude[] = $row['group_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $select_list = '<option value="0"' . ((!$group_id) ? ' selected="selected"' : '') . '>' . $user->lang['ALL_USERS'] . '</option>';
+ $select_list .= group_select_options($group_id, $exclude);
+
+ $s_priority_options = '<option value="' . MAIL_LOW_PRIORITY . '">' . $user->lang['MAIL_LOW_PRIORITY'] . '</option>';
+ $s_priority_options .= '<option value="' . MAIL_NORMAL_PRIORITY . '" selected="selected">' . $user->lang['MAIL_NORMAL_PRIORITY'] . '</option>';
+ $s_priority_options .= '<option value="' . MAIL_HIGH_PRIORITY . '">' . $user->lang['MAIL_HIGH_PRIORITY'] . '</option>';
+
+ $template->assign_vars(array(
+ 'S_WARNING' => (sizeof($error)) ? true : false,
+ 'WARNING_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'U_ACTION' => $this->u_action,
+ 'S_GROUP_OPTIONS' => $select_list,
+ 'USERNAMES' => $usernames,
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=acp_email&amp;field=usernames'),
+ 'SUBJECT' => $subject,
+ 'MESSAGE' => $message,
+ 'S_PRIORITY_OPTIONS' => $s_priority_options)
+ );
+
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
new file mode 100644
index 0000000000..2ff597ee98
--- /dev/null
+++ b/phpBB/includes/acp/acp_forums.php
@@ -0,0 +1,1947 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_forums
+{
+ var $u_action;
+ var $parent_id = 0;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template, $cache;
+ global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
+
+ $user->add_lang('acp/forums');
+ $this->tpl_name = 'acp_forums';
+ $this->page_title = 'ACP_MANAGE_FORUMS';
+
+ $form_key = 'acp_forums';
+ add_form_key($form_key);
+
+ $action = request_var('action', '');
+ $update = (isset($_POST['update'])) ? true : false;
+ $forum_id = request_var('f', 0);
+
+ $this->parent_id = request_var('parent_id', 0);
+ $forum_data = $errors = array();
+ if ($update && !check_form_key($form_key))
+ {
+ $update = false;
+ $errors[] = $user->lang['FORM_INVALID'];
+ }
+
+ // Check additional permissions
+ switch ($action)
+ {
+ case 'progress_bar':
+ $start = request_var('start', 0);
+ $total = request_var('total', 0);
+
+ $this->display_progress_bar($start, $total);
+ exit;
+ break;
+
+ case 'delete':
+
+ if (!$auth->acl_get('a_forumdel'))
+ {
+ trigger_error($user->lang['NO_PERMISSION_FORUM_DELETE'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ break;
+
+ case 'add':
+
+ if (!$auth->acl_get('a_forumadd'))
+ {
+ trigger_error($user->lang['NO_PERMISSION_FORUM_ADD'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ case 'copy_perm':
+
+ if (!(($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
+ {
+ trigger_error($user->lang['NO_PERMISSION_COPY'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ break;
+ }
+
+ // Major routines
+ if ($update)
+ {
+ switch ($action)
+ {
+ case 'delete':
+ $action_subforums = request_var('action_subforums', '');
+ $subforums_to_id = request_var('subforums_to_id', 0);
+ $action_posts = request_var('action_posts', '');
+ $posts_to_id = request_var('posts_to_id', 0);
+
+ $errors = $this->delete_forum($forum_id, $action_posts, $action_subforums, $posts_to_id, $subforums_to_id);
+
+ if (sizeof($errors))
+ {
+ break;
+ }
+
+ $auth->acl_clear_prefetch();
+ $cache->destroy('sql', FORUMS_TABLE);
+
+ trigger_error($user->lang['FORUM_DELETED'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
+
+ break;
+
+ case 'edit':
+ $forum_data = array(
+ 'forum_id' => $forum_id
+ );
+
+ // No break here
+
+ case 'add':
+
+ $forum_data += array(
+ 'parent_id' => request_var('forum_parent_id', $this->parent_id),
+ 'forum_type' => request_var('forum_type', FORUM_POST),
+ 'type_action' => request_var('type_action', ''),
+ 'forum_status' => request_var('forum_status', ITEM_UNLOCKED),
+ 'forum_parents' => '',
+ 'forum_options' => 0,
+ 'forum_name' => utf8_normalize_nfc(request_var('forum_name', '', true)),
+ 'forum_link' => request_var('forum_link', ''),
+ 'forum_link_track' => request_var('forum_link_track', false),
+ 'forum_desc' => utf8_normalize_nfc(request_var('forum_desc', '', true)),
+ 'forum_desc_uid' => '',
+ 'forum_desc_options' => 7,
+ 'forum_desc_bitfield' => '',
+ 'forum_rules' => utf8_normalize_nfc(request_var('forum_rules', '', true)),
+ 'forum_rules_uid' => '',
+ 'forum_rules_options' => 7,
+ 'forum_rules_bitfield' => '',
+ 'forum_rules_link' => request_var('forum_rules_link', ''),
+ 'forum_image' => request_var('forum_image', ''),
+ 'forum_style' => request_var('forum_style', 0),
+ 'display_subforum_list' => request_var('display_subforum_list', false),
+ 'display_on_index' => request_var('display_on_index', false),
+ 'forum_topics_per_page' => request_var('topics_per_page', 0),
+ 'enable_indexing' => request_var('enable_indexing', true),
+ 'enable_icons' => request_var('enable_icons', false),
+ 'enable_prune' => request_var('enable_prune', false),
+ 'enable_post_review' => request_var('enable_post_review', true),
+ 'enable_quick_reply' => request_var('enable_quick_reply', false),
+ 'prune_days' => request_var('prune_days', 7),
+ 'prune_viewed' => request_var('prune_viewed', 7),
+ 'prune_freq' => request_var('prune_freq', 1),
+ 'prune_old_polls' => request_var('prune_old_polls', false),
+ 'prune_announce' => request_var('prune_announce', false),
+ 'prune_sticky' => request_var('prune_sticky', false),
+ 'forum_password' => request_var('forum_password', '', true),
+ 'forum_password_confirm'=> request_var('forum_password_confirm', '', true),
+ 'forum_password_unset' => request_var('forum_password_unset', false),
+ );
+
+ // Use link_display_on_index setting if forum type is link
+ if ($forum_data['forum_type'] == FORUM_LINK)
+ {
+ $forum_data['display_on_index'] = request_var('link_display_on_index', false);
+ }
+
+ // Linked forums and categories are not able to be locked...
+ if ($forum_data['forum_type'] == FORUM_LINK || $forum_data['forum_type'] == FORUM_CAT)
+ {
+ $forum_data['forum_status'] = ITEM_UNLOCKED;
+ }
+
+ $forum_data['show_active'] = ($forum_data['forum_type'] == FORUM_POST) ? request_var('display_recent', true) : request_var('display_active', true);
+
+ // Get data for forum rules if specified...
+ if ($forum_data['forum_rules'])
+ {
+ generate_text_for_storage($forum_data['forum_rules'], $forum_data['forum_rules_uid'], $forum_data['forum_rules_bitfield'], $forum_data['forum_rules_options'], request_var('rules_parse_bbcode', false), request_var('rules_parse_urls', false), request_var('rules_parse_smilies', false));
+ }
+
+ // Get data for forum description if specified
+ if ($forum_data['forum_desc'])
+ {
+ generate_text_for_storage($forum_data['forum_desc'], $forum_data['forum_desc_uid'], $forum_data['forum_desc_bitfield'], $forum_data['forum_desc_options'], request_var('desc_parse_bbcode', false), request_var('desc_parse_urls', false), request_var('desc_parse_smilies', false));
+ }
+
+ $errors = $this->update_forum_data($forum_data);
+
+ if (!sizeof($errors))
+ {
+ $forum_perm_from = request_var('forum_perm_from', 0);
+ $cache->destroy('sql', FORUMS_TABLE);
+
+ // Copy permissions?
+ if ($forum_perm_from && $forum_perm_from != $forum_data['forum_id'] &&
+ ($action != 'edit' || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
+ {
+ copy_forum_permissions($forum_perm_from, $forum_data['forum_id'], ($action == 'edit') ? true : false);
+ cache_moderators();
+ }
+/* Commented out because of questionable UI workflow - re-visit for 3.0.7
+ else if (!$this->parent_id && $action != 'edit' && $auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))
+ {
+ $this->copy_permission_page($forum_data);
+ return;
+ }
+*/
+ $auth->acl_clear_prefetch();
+
+ $acl_url = '&amp;mode=setting_forum_local&amp;forum_id[]=' . $forum_data['forum_id'];
+
+ $message = ($action == 'add') ? $user->lang['FORUM_CREATED'] : $user->lang['FORUM_UPDATED'];
+
+ // Redirect to permissions
+ if ($auth->acl_get('a_fauth'))
+ {
+ $message .= '<br /><br />' . sprintf($user->lang['REDIRECT_ACL'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url) . '">', '</a>');
+ }
+
+ // redirect directly to permission settings screen if authed
+ if ($action == 'add' && !$forum_perm_from && $auth->acl_get('a_fauth'))
+ {
+ meta_refresh(4, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url));
+ }
+
+ trigger_error($message . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
+ }
+
+ break;
+ }
+ }
+
+ switch ($action)
+ {
+ case 'move_up':
+ case 'move_down':
+
+ if (!$forum_id)
+ {
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ $sql = 'SELECT *
+ FROM ' . FORUMS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ $move_forum_name = $this->move_forum_by($row, $action, 1);
+
+ if ($move_forum_name !== false)
+ {
+ add_log('admin', 'LOG_FORUM_' . strtoupper($action), $row['forum_name'], $move_forum_name);
+ $cache->destroy('sql', FORUMS_TABLE);
+ }
+
+ break;
+
+ case 'sync':
+ if (!$forum_id)
+ {
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ @set_time_limit(0);
+
+ $sql = 'SELECT forum_name, forum_topics_real
+ FROM ' . FORUMS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ if ($row['forum_topics_real'])
+ {
+ $sql = 'SELECT MIN(topic_id) as min_topic_id, MAX(topic_id) as max_topic_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE forum_id = ' . $forum_id;
+ $result = $db->sql_query($sql);
+ $row2 = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // Typecast to int if there is no data available
+ $row2['min_topic_id'] = (int) $row2['min_topic_id'];
+ $row2['max_topic_id'] = (int) $row2['max_topic_id'];
+
+ $start = request_var('start', $row2['min_topic_id']);
+
+ $batch_size = 2000;
+ $end = $start + $batch_size;
+
+ // Sync all topics in batch mode...
+ sync('topic_approved', 'range', 'topic_id BETWEEN ' . $start . ' AND ' . $end, true, false);
+ sync('topic', 'range', 'topic_id BETWEEN ' . $start . ' AND ' . $end, true, true);
+
+ if ($end < $row2['max_topic_id'])
+ {
+ // We really need to find a way of showing statistics... no progress here
+ $sql = 'SELECT COUNT(topic_id) as num_topics
+ FROM ' . TOPICS_TABLE . '
+ WHERE forum_id = ' . $forum_id . '
+ AND topic_id BETWEEN ' . $start . ' AND ' . $end;
+ $result = $db->sql_query($sql);
+ $topics_done = request_var('topics_done', 0) + (int) $db->sql_fetchfield('num_topics');
+ $db->sql_freeresult($result);
+
+ $start += $batch_size;
+
+ $url = $this->u_action . "&amp;parent_id={$this->parent_id}&amp;f=$forum_id&amp;action=sync&amp;start=$start&amp;topics_done=$topics_done&amp;total={$row['forum_topics_real']}";
+
+ meta_refresh(0, $url);
+
+ $template->assign_vars(array(
+ 'U_PROGRESS_BAR' => $this->u_action . "&amp;action=progress_bar&amp;start=$topics_done&amp;total={$row['forum_topics_real']}",
+ 'UA_PROGRESS_BAR' => addslashes($this->u_action . "&amp;action=progress_bar&amp;start=$topics_done&amp;total={$row['forum_topics_real']}"),
+ 'S_CONTINUE_SYNC' => true,
+ 'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], $topics_done, $row['forum_topics_real']))
+ );
+
+ return;
+ }
+ }
+
+ $url = $this->u_action . "&amp;parent_id={$this->parent_id}&amp;f=$forum_id&amp;action=sync_forum";
+ meta_refresh(0, $url);
+
+ $template->assign_vars(array(
+ 'U_PROGRESS_BAR' => $this->u_action . '&amp;action=progress_bar',
+ 'UA_PROGRESS_BAR' => addslashes($this->u_action . '&amp;action=progress_bar'),
+ 'S_CONTINUE_SYNC' => true,
+ 'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], 0, $row['forum_topics_real']))
+ );
+
+ return;
+
+ break;
+
+ case 'sync_forum':
+
+ $sql = 'SELECT forum_name, forum_type
+ FROM ' . FORUMS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ sync('forum', 'forum_id', $forum_id, false, true);
+
+ add_log('admin', 'LOG_FORUM_SYNC', $row['forum_name']);
+ $cache->destroy('sql', FORUMS_TABLE);
+
+ $template->assign_var('L_FORUM_RESYNCED', sprintf($user->lang['FORUM_RESYNCED'], $row['forum_name']));
+
+ break;
+
+ case 'add':
+ case 'edit':
+
+ if ($update)
+ {
+ $forum_data['forum_flags'] = 0;
+ $forum_data['forum_flags'] += (request_var('forum_link_track', false)) ? FORUM_FLAG_LINK_TRACK : 0;
+ $forum_data['forum_flags'] += (request_var('prune_old_polls', false)) ? FORUM_FLAG_PRUNE_POLL : 0;
+ $forum_data['forum_flags'] += (request_var('prune_announce', false)) ? FORUM_FLAG_PRUNE_ANNOUNCE : 0;
+ $forum_data['forum_flags'] += (request_var('prune_sticky', false)) ? FORUM_FLAG_PRUNE_STICKY : 0;
+ $forum_data['forum_flags'] += ($forum_data['show_active']) ? FORUM_FLAG_ACTIVE_TOPICS : 0;
+ $forum_data['forum_flags'] += (request_var('enable_post_review', true)) ? FORUM_FLAG_POST_REVIEW : 0;
+ $forum_data['forum_flags'] += (request_var('enable_quick_reply', false)) ? FORUM_FLAG_QUICK_REPLY : 0;
+ }
+
+ // Show form to create/modify a forum
+ if ($action == 'edit')
+ {
+ $this->page_title = 'EDIT_FORUM';
+ $row = $this->get_forum_info($forum_id);
+ $old_forum_type = $row['forum_type'];
+
+ if (!$update)
+ {
+ $forum_data = $row;
+ }
+ else
+ {
+ $forum_data['left_id'] = $row['left_id'];
+ $forum_data['right_id'] = $row['right_id'];
+ }
+
+ // Make sure no direct child forums are able to be selected as parents.
+ $exclude_forums = array();
+ foreach (get_forum_branch($forum_id, 'children') as $row)
+ {
+ $exclude_forums[] = $row['forum_id'];
+ }
+
+ $parents_list = make_forum_select($forum_data['parent_id'], $exclude_forums, false, false, false);
+
+ $forum_data['forum_password_confirm'] = $forum_data['forum_password'];
+ }
+ else
+ {
+ $this->page_title = 'CREATE_FORUM';
+
+ $forum_id = $this->parent_id;
+ $parents_list = make_forum_select($this->parent_id, false, false, false, false);
+
+ // Fill forum data with default values
+ if (!$update)
+ {
+ $forum_data = array(
+ 'parent_id' => $this->parent_id,
+ 'forum_type' => FORUM_POST,
+ 'forum_status' => ITEM_UNLOCKED,
+ 'forum_name' => utf8_normalize_nfc(request_var('forum_name', '', true)),
+ 'forum_link' => '',
+ 'forum_link_track' => false,
+ 'forum_desc' => '',
+ 'forum_rules' => '',
+ 'forum_rules_link' => '',
+ 'forum_image' => '',
+ 'forum_style' => 0,
+ 'display_subforum_list' => true,
+ 'display_on_index' => false,
+ 'forum_topics_per_page' => 0,
+ 'enable_indexing' => true,
+ 'enable_icons' => false,
+ 'enable_prune' => false,
+ 'prune_days' => 7,
+ 'prune_viewed' => 7,
+ 'prune_freq' => 1,
+ 'forum_flags' => FORUM_FLAG_POST_REVIEW + FORUM_FLAG_ACTIVE_TOPICS,
+ 'forum_options' => 0,
+ 'forum_password' => '',
+ 'forum_password_confirm'=> '',
+ );
+ }
+ }
+
+ $forum_rules_data = array(
+ 'text' => $forum_data['forum_rules'],
+ 'allow_bbcode' => true,
+ 'allow_smilies' => true,
+ 'allow_urls' => true
+ );
+
+ $forum_desc_data = array(
+ 'text' => $forum_data['forum_desc'],
+ 'allow_bbcode' => true,
+ 'allow_smilies' => true,
+ 'allow_urls' => true
+ );
+
+ $forum_rules_preview = '';
+
+ // Parse rules if specified
+ if ($forum_data['forum_rules'])
+ {
+ if (!isset($forum_data['forum_rules_uid']))
+ {
+ // Before we are able to display the preview and plane text, we need to parse our request_var()'d value...
+ $forum_data['forum_rules_uid'] = '';
+ $forum_data['forum_rules_bitfield'] = '';
+ $forum_data['forum_rules_options'] = 0;
+
+ generate_text_for_storage($forum_data['forum_rules'], $forum_data['forum_rules_uid'], $forum_data['forum_rules_bitfield'], $forum_data['forum_rules_options'], request_var('rules_allow_bbcode', false), request_var('rules_allow_urls', false), request_var('rules_allow_smilies', false));
+ }
+
+ // Generate preview content
+ $forum_rules_preview = generate_text_for_display($forum_data['forum_rules'], $forum_data['forum_rules_uid'], $forum_data['forum_rules_bitfield'], $forum_data['forum_rules_options']);
+
+ // decode...
+ $forum_rules_data = generate_text_for_edit($forum_data['forum_rules'], $forum_data['forum_rules_uid'], $forum_data['forum_rules_options']);
+ }
+
+ // Parse desciption if specified
+ if ($forum_data['forum_desc'])
+ {
+ if (!isset($forum_data['forum_desc_uid']))
+ {
+ // Before we are able to display the preview and plane text, we need to parse our request_var()'d value...
+ $forum_data['forum_desc_uid'] = '';
+ $forum_data['forum_desc_bitfield'] = '';
+ $forum_data['forum_desc_options'] = 0;
+
+ generate_text_for_storage($forum_data['forum_desc'], $forum_data['forum_desc_uid'], $forum_data['forum_desc_bitfield'], $forum_data['forum_desc_options'], request_var('desc_allow_bbcode', false), request_var('desc_allow_urls', false), request_var('desc_allow_smilies', false));
+ }
+
+ // decode...
+ $forum_desc_data = generate_text_for_edit($forum_data['forum_desc'], $forum_data['forum_desc_uid'], $forum_data['forum_desc_options']);
+ }
+
+ $forum_type_options = '';
+ $forum_type_ary = array(FORUM_CAT => 'CAT', FORUM_POST => 'FORUM', FORUM_LINK => 'LINK');
+
+ foreach ($forum_type_ary as $value => $lang)
+ {
+ $forum_type_options .= '<option value="' . $value . '"' . (($value == $forum_data['forum_type']) ? ' selected="selected"' : '') . '>' . $user->lang['TYPE_' . $lang] . '</option>';
+ }
+
+ $styles_list = style_select($forum_data['forum_style'], true);
+
+ $statuslist = '<option value="' . ITEM_UNLOCKED . '"' . (($forum_data['forum_status'] == ITEM_UNLOCKED) ? ' selected="selected"' : '') . '>' . $user->lang['UNLOCKED'] . '</option><option value="' . ITEM_LOCKED . '"' . (($forum_data['forum_status'] == ITEM_LOCKED) ? ' selected="selected"' : '') . '>' . $user->lang['LOCKED'] . '</option>';
+
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_type = ' . FORUM_POST . "
+ AND forum_id <> $forum_id";
+ $result = $db->sql_query_limit($sql, 1);
+
+ $postable_forum_exists = false;
+ if ($db->sql_fetchrow($result))
+ {
+ $postable_forum_exists = true;
+ }
+ $db->sql_freeresult($result);
+
+ // Subforum move options
+ if ($action == 'edit' && $forum_data['forum_type'] == FORUM_CAT)
+ {
+ $subforums_id = array();
+ $subforums = get_forum_branch($forum_id, 'children');
+
+ foreach ($subforums as $row)
+ {
+ $subforums_id[] = $row['forum_id'];
+ }
+
+ $forums_list = make_forum_select($forum_data['parent_id'], $subforums_id);
+
+ if ($postable_forum_exists)
+ {
+ $template->assign_vars(array(
+ 'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $subforums_id)) // , false, true, false???
+ );
+ }
+
+ $template->assign_vars(array(
+ 'S_HAS_SUBFORUMS' => ($forum_data['right_id'] - $forum_data['left_id'] > 1) ? true : false,
+ 'S_FORUMS_LIST' => $forums_list)
+ );
+ }
+ else if ($postable_forum_exists)
+ {
+ $template->assign_vars(array(
+ 'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $forum_id, false, true, false))
+ );
+ }
+
+ $s_show_display_on_index = false;
+
+ if ($forum_data['parent_id'] > 0)
+ {
+ // if this forum is a subforum put the "display on index" checkbox
+ if ($parent_info = $this->get_forum_info($forum_data['parent_id']))
+ {
+ if ($parent_info['parent_id'] > 0 || $parent_info['forum_type'] == FORUM_CAT)
+ {
+ $s_show_display_on_index = true;
+ }
+ }
+ }
+
+ if (strlen($forum_data['forum_password']) == 32)
+ {
+ $errors[] = $user->lang['FORUM_PASSWORD_OLD'];
+ }
+
+ $template->assign_vars(array(
+ 'S_EDIT_FORUM' => true,
+ 'S_ERROR' => (sizeof($errors)) ? true : false,
+ 'S_PARENT_ID' => $this->parent_id,
+ 'S_FORUM_PARENT_ID' => $forum_data['parent_id'],
+ 'S_ADD_ACTION' => ($action == 'add') ? true : false,
+
+ 'U_BACK' => $this->u_action . '&amp;parent_id=' . $this->parent_id,
+ 'U_EDIT_ACTION' => $this->u_action . "&amp;parent_id={$this->parent_id}&amp;action=$action&amp;f=$forum_id",
+
+ 'L_COPY_PERMISSIONS_EXPLAIN' => $user->lang['COPY_PERMISSIONS_' . strtoupper($action) . '_EXPLAIN'],
+ 'L_TITLE' => $user->lang[$this->page_title],
+ 'ERROR_MSG' => (sizeof($errors)) ? implode('<br />', $errors) : '',
+
+ 'FORUM_NAME' => $forum_data['forum_name'],
+ 'FORUM_DATA_LINK' => $forum_data['forum_link'],
+ 'FORUM_IMAGE' => $forum_data['forum_image'],
+ 'FORUM_IMAGE_SRC' => ($forum_data['forum_image']) ? $phpbb_root_path . $forum_data['forum_image'] : '',
+ 'FORUM_POST' => FORUM_POST,
+ 'FORUM_LINK' => FORUM_LINK,
+ 'FORUM_CAT' => FORUM_CAT,
+ 'PRUNE_FREQ' => $forum_data['prune_freq'],
+ 'PRUNE_DAYS' => $forum_data['prune_days'],
+ 'PRUNE_VIEWED' => $forum_data['prune_viewed'],
+ 'TOPICS_PER_PAGE' => $forum_data['forum_topics_per_page'],
+ 'FORUM_RULES_LINK' => $forum_data['forum_rules_link'],
+ 'FORUM_RULES' => $forum_data['forum_rules'],
+ 'FORUM_RULES_PREVIEW' => $forum_rules_preview,
+ 'FORUM_RULES_PLAIN' => $forum_rules_data['text'],
+ 'S_BBCODE_CHECKED' => ($forum_rules_data['allow_bbcode']) ? true : false,
+ 'S_SMILIES_CHECKED' => ($forum_rules_data['allow_smilies']) ? true : false,
+ 'S_URLS_CHECKED' => ($forum_rules_data['allow_urls']) ? true : false,
+ 'S_FORUM_PASSWORD_SET' => (empty($forum_data['forum_password'])) ? false : true,
+
+ 'FORUM_DESC' => $forum_desc_data['text'],
+ 'S_DESC_BBCODE_CHECKED' => ($forum_desc_data['allow_bbcode']) ? true : false,
+ 'S_DESC_SMILIES_CHECKED' => ($forum_desc_data['allow_smilies']) ? true : false,
+ 'S_DESC_URLS_CHECKED' => ($forum_desc_data['allow_urls']) ? true : false,
+
+ 'S_FORUM_TYPE_OPTIONS' => $forum_type_options,
+ 'S_STATUS_OPTIONS' => $statuslist,
+ 'S_PARENT_OPTIONS' => $parents_list,
+ 'S_STYLES_OPTIONS' => $styles_list,
+ 'S_FORUM_OPTIONS' => make_forum_select(($action == 'add') ? $forum_data['parent_id'] : false, ($action == 'edit') ? $forum_data['forum_id'] : false, false, false, false),
+ 'S_SHOW_DISPLAY_ON_INDEX' => $s_show_display_on_index,
+ 'S_FORUM_POST' => ($forum_data['forum_type'] == FORUM_POST) ? true : false,
+ 'S_FORUM_ORIG_POST' => (isset($old_forum_type) && $old_forum_type == FORUM_POST) ? true : false,
+ 'S_FORUM_ORIG_CAT' => (isset($old_forum_type) && $old_forum_type == FORUM_CAT) ? true : false,
+ 'S_FORUM_ORIG_LINK' => (isset($old_forum_type) && $old_forum_type == FORUM_LINK) ? true : false,
+ 'S_FORUM_LINK' => ($forum_data['forum_type'] == FORUM_LINK) ? true : false,
+ 'S_FORUM_CAT' => ($forum_data['forum_type'] == FORUM_CAT) ? true : false,
+ 'S_ENABLE_INDEXING' => ($forum_data['enable_indexing']) ? true : false,
+ 'S_TOPIC_ICONS' => ($forum_data['enable_icons']) ? true : false,
+ 'S_DISPLAY_SUBFORUM_LIST' => ($forum_data['display_subforum_list']) ? true : false,
+ 'S_DISPLAY_ON_INDEX' => ($forum_data['display_on_index']) ? true : false,
+ 'S_PRUNE_ENABLE' => ($forum_data['enable_prune']) ? true : false,
+ 'S_FORUM_LINK_TRACK' => ($forum_data['forum_flags'] & FORUM_FLAG_LINK_TRACK) ? true : false,
+ 'S_PRUNE_OLD_POLLS' => ($forum_data['forum_flags'] & FORUM_FLAG_PRUNE_POLL) ? true : false,
+ 'S_PRUNE_ANNOUNCE' => ($forum_data['forum_flags'] & FORUM_FLAG_PRUNE_ANNOUNCE) ? true : false,
+ 'S_PRUNE_STICKY' => ($forum_data['forum_flags'] & FORUM_FLAG_PRUNE_STICKY) ? true : false,
+ 'S_DISPLAY_ACTIVE_TOPICS' => ($forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS) ? true : false,
+ 'S_ENABLE_POST_REVIEW' => ($forum_data['forum_flags'] & FORUM_FLAG_POST_REVIEW) ? true : false,
+ 'S_ENABLE_QUICK_REPLY' => ($forum_data['forum_flags'] & FORUM_FLAG_QUICK_REPLY) ? true : false,
+ 'S_CAN_COPY_PERMISSIONS' => ($action != 'edit' || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))) ? true : false,
+ ));
+
+ return;
+
+ break;
+
+ case 'delete':
+
+ if (!$forum_id)
+ {
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ $forum_data = $this->get_forum_info($forum_id);
+
+ $subforums_id = array();
+ $subforums = get_forum_branch($forum_id, 'children');
+
+ foreach ($subforums as $row)
+ {
+ $subforums_id[] = $row['forum_id'];
+ }
+
+ $forums_list = make_forum_select($forum_data['parent_id'], $subforums_id);
+
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_type = ' . FORUM_POST . "
+ AND forum_id <> $forum_id";
+ $result = $db->sql_query_limit($sql, 1);
+
+ if ($db->sql_fetchrow($result))
+ {
+ $template->assign_vars(array(
+ 'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $subforums_id, false, true)) // , false, true, false???
+ );
+ }
+ $db->sql_freeresult($result);
+
+ $parent_id = ($this->parent_id == $forum_id) ? 0 : $this->parent_id;
+
+ $template->assign_vars(array(
+ 'S_DELETE_FORUM' => true,
+ 'U_ACTION' => $this->u_action . "&amp;parent_id={$parent_id}&amp;action=delete&amp;f=$forum_id",
+ 'U_BACK' => $this->u_action . '&amp;parent_id=' . $this->parent_id,
+
+ 'FORUM_NAME' => $forum_data['forum_name'],
+ 'S_FORUM_POST' => ($forum_data['forum_type'] == FORUM_POST) ? true : false,
+ 'S_FORUM_LINK' => ($forum_data['forum_type'] == FORUM_LINK) ? true : false,
+ 'S_HAS_SUBFORUMS' => ($forum_data['right_id'] - $forum_data['left_id'] > 1) ? true : false,
+ 'S_FORUMS_LIST' => $forums_list,
+ 'S_ERROR' => (sizeof($errors)) ? true : false,
+ 'ERROR_MSG' => (sizeof($errors)) ? implode('<br />', $errors) : '')
+ );
+
+ return;
+ break;
+
+ case 'copy_perm':
+ $forum_perm_from = request_var('forum_perm_from', 0);
+
+ // Copy permissions?
+ if (!empty($forum_perm_from) && $forum_perm_from != $forum_id)
+ {
+ copy_forum_permissions($forum_perm_from, $forum_id, true);
+ cache_moderators();
+ $auth->acl_clear_prefetch();
+ $cache->destroy('sql', FORUMS_TABLE);
+
+ $acl_url = '&amp;mode=setting_forum_local&amp;forum_id[]=' . $forum_id;
+
+ $message = $user->lang['FORUM_UPDATED'];
+
+ // Redirect to permissions
+ if ($auth->acl_get('a_fauth'))
+ {
+ $message .= '<br /><br />' . sprintf($user->lang['REDIRECT_ACL'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url) . '">', '</a>');
+ }
+
+ trigger_error($message . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
+ }
+
+ break;
+ }
+
+ // Default management page
+ if (!$this->parent_id)
+ {
+ $navigation = $user->lang['FORUM_INDEX'];
+ }
+ else
+ {
+ $navigation = '<a href="' . $this->u_action . '">' . $user->lang['FORUM_INDEX'] . '</a>';
+
+ $forums_nav = get_forum_branch($this->parent_id, 'parents', 'descending');
+ foreach ($forums_nav as $row)
+ {
+ if ($row['forum_id'] == $this->parent_id)
+ {
+ $navigation .= ' -&gt; ' . $row['forum_name'];
+ }
+ else
+ {
+ $navigation .= ' -&gt; <a href="' . $this->u_action . '&amp;parent_id=' . $row['forum_id'] . '">' . $row['forum_name'] . '</a>';
+ }
+ }
+ }
+
+ // Jumpbox
+ $forum_box = make_forum_select($this->parent_id, false, false, false, false); //make_forum_select($this->parent_id);
+
+ if ($action == 'sync' || $action == 'sync_forum')
+ {
+ $template->assign_var('S_RESYNCED', true);
+ }
+
+ $sql = 'SELECT *
+ FROM ' . FORUMS_TABLE . "
+ WHERE parent_id = $this->parent_id
+ ORDER BY left_id";
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ do
+ {
+ $forum_type = $row['forum_type'];
+
+ if ($row['forum_status'] == ITEM_LOCKED)
+ {
+ $folder_image = '<img src="images/icon_folder_lock.gif" alt="' . $user->lang['LOCKED'] . '" />';
+ }
+ else
+ {
+ switch ($forum_type)
+ {
+ case FORUM_LINK:
+ $folder_image = '<img src="images/icon_folder_link.gif" alt="' . $user->lang['LINK'] . '" />';
+ break;
+
+ default:
+ $folder_image = ($row['left_id'] + 1 != $row['right_id']) ? '<img src="images/icon_subfolder.gif" alt="' . $user->lang['SUBFORUM'] . '" />' : '<img src="images/icon_folder.gif" alt="' . $user->lang['FOLDER'] . '" />';
+ break;
+ }
+ }
+
+ $url = $this->u_action . "&amp;parent_id=$this->parent_id&amp;f={$row['forum_id']}";
+
+ $template->assign_block_vars('forums', array(
+ 'FOLDER_IMAGE' => $folder_image,
+ 'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="" />' : '',
+ 'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
+ 'FORUM_NAME' => $row['forum_name'],
+ 'FORUM_DESCRIPTION' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']),
+ 'FORUM_TOPICS' => $row['forum_topics'],
+ 'FORUM_POSTS' => $row['forum_posts'],
+
+ 'S_FORUM_LINK' => ($forum_type == FORUM_LINK) ? true : false,
+ 'S_FORUM_POST' => ($forum_type == FORUM_POST) ? true : false,
+
+ 'U_FORUM' => $this->u_action . '&amp;parent_id=' . $row['forum_id'],
+ 'U_MOVE_UP' => $url . '&amp;action=move_up',
+ 'U_MOVE_DOWN' => $url . '&amp;action=move_down',
+ 'U_EDIT' => $url . '&amp;action=edit',
+ 'U_DELETE' => $url . '&amp;action=delete',
+ 'U_SYNC' => $url . '&amp;action=sync')
+ );
+ }
+ while ($row = $db->sql_fetchrow($result));
+ }
+ else if ($this->parent_id)
+ {
+ $row = $this->get_forum_info($this->parent_id);
+
+ $url = $this->u_action . '&amp;parent_id=' . $this->parent_id . '&amp;f=' . $row['forum_id'];
+
+ $template->assign_vars(array(
+ 'S_NO_FORUMS' => true,
+
+ 'U_EDIT' => $url . '&amp;action=edit',
+ 'U_DELETE' => $url . '&amp;action=delete',
+ 'U_SYNC' => $url . '&amp;action=sync')
+ );
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'ERROR_MSG' => (sizeof($errors)) ? implode('<br />', $errors) : '',
+ 'NAVIGATION' => $navigation,
+ 'FORUM_BOX' => $forum_box,
+ 'U_SEL_ACTION' => $this->u_action,
+ 'U_ACTION' => $this->u_action . '&amp;parent_id=' . $this->parent_id,
+
+ 'U_PROGRESS_BAR' => $this->u_action . '&amp;action=progress_bar',
+ 'UA_PROGRESS_BAR' => addslashes($this->u_action . '&amp;action=progress_bar'),
+ ));
+ }
+
+ /**
+ * Get forum details
+ */
+ function get_forum_info($forum_id)
+ {
+ global $db;
+
+ $sql = 'SELECT *
+ FROM ' . FORUMS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error("Forum #$forum_id does not exist", E_USER_ERROR);
+ }
+
+ return $row;
+ }
+
+ /**
+ * Update forum data
+ */
+ function update_forum_data(&$forum_data)
+ {
+ global $db, $user, $cache, $phpbb_root_path;
+
+ $errors = array();
+
+ if (!$forum_data['forum_name'])
+ {
+ $errors[] = $user->lang['FORUM_NAME_EMPTY'];
+ }
+
+ if (utf8_strlen($forum_data['forum_desc']) > 4000)
+ {
+ $errors[] = $user->lang['FORUM_DESC_TOO_LONG'];
+ }
+
+ if (utf8_strlen($forum_data['forum_rules']) > 4000)
+ {
+ $errors[] = $user->lang['FORUM_RULES_TOO_LONG'];
+ }
+
+ if ($forum_data['forum_password'] || $forum_data['forum_password_confirm'])
+ {
+ if ($forum_data['forum_password'] != $forum_data['forum_password_confirm'])
+ {
+ $forum_data['forum_password'] = $forum_data['forum_password_confirm'] = '';
+ $errors[] = $user->lang['FORUM_PASSWORD_MISMATCH'];
+ }
+ }
+
+ if ($forum_data['prune_days'] < 0 || $forum_data['prune_viewed'] < 0 || $forum_data['prune_freq'] < 0)
+ {
+ $forum_data['prune_days'] = $forum_data['prune_viewed'] = $forum_data['prune_freq'] = 0;
+ $errors[] = $user->lang['FORUM_DATA_NEGATIVE'];
+ }
+
+ $range_test_ary = array(
+ array('lang' => 'FORUM_TOPICS_PAGE', 'value' => $forum_data['forum_topics_per_page'], 'column_type' => 'TINT:0'),
+ );
+
+ if (!empty($forum_data['forum_image']) && !file_exists($phpbb_root_path . $forum_data['forum_image']))
+ {
+ $errors[] = $user->lang['FORUM_IMAGE_NO_EXIST'];
+ }
+
+ validate_range($range_test_ary, $errors);
+
+ // Set forum flags
+ // 1 = link tracking
+ // 2 = prune old polls
+ // 4 = prune announcements
+ // 8 = prune stickies
+ // 16 = show active topics
+ // 32 = enable post review
+ $forum_data['forum_flags'] = 0;
+ $forum_data['forum_flags'] += ($forum_data['forum_link_track']) ? FORUM_FLAG_LINK_TRACK : 0;
+ $forum_data['forum_flags'] += ($forum_data['prune_old_polls']) ? FORUM_FLAG_PRUNE_POLL : 0;
+ $forum_data['forum_flags'] += ($forum_data['prune_announce']) ? FORUM_FLAG_PRUNE_ANNOUNCE : 0;
+ $forum_data['forum_flags'] += ($forum_data['prune_sticky']) ? FORUM_FLAG_PRUNE_STICKY : 0;
+ $forum_data['forum_flags'] += ($forum_data['show_active']) ? FORUM_FLAG_ACTIVE_TOPICS : 0;
+ $forum_data['forum_flags'] += ($forum_data['enable_post_review']) ? FORUM_FLAG_POST_REVIEW : 0;
+ $forum_data['forum_flags'] += ($forum_data['enable_quick_reply']) ? FORUM_FLAG_QUICK_REPLY : 0;
+
+ // Unset data that are not database fields
+ $forum_data_sql = $forum_data;
+
+ unset($forum_data_sql['forum_link_track']);
+ unset($forum_data_sql['prune_old_polls']);
+ unset($forum_data_sql['prune_announce']);
+ unset($forum_data_sql['prune_sticky']);
+ unset($forum_data_sql['show_active']);
+ unset($forum_data_sql['enable_post_review']);
+ unset($forum_data_sql['enable_quick_reply']);
+ unset($forum_data_sql['forum_password_confirm']);
+
+ // What are we going to do tonight Brain? The same thing we do everynight,
+ // try to take over the world ... or decide whether to continue update
+ // and if so, whether it's a new forum/cat/link or an existing one
+ if (sizeof($errors))
+ {
+ return $errors;
+ }
+
+ // As we don't know the old password, it's kinda tricky to detect changes
+ if ($forum_data_sql['forum_password_unset'])
+ {
+ $forum_data_sql['forum_password'] = '';
+ }
+ else if (empty($forum_data_sql['forum_password']))
+ {
+ unset($forum_data_sql['forum_password']);
+ }
+ else
+ {
+ $forum_data_sql['forum_password'] = phpbb_hash($forum_data_sql['forum_password']);
+ }
+ unset($forum_data_sql['forum_password_unset']);
+
+ if (!isset($forum_data_sql['forum_id']))
+ {
+ // no forum_id means we're creating a new forum
+ unset($forum_data_sql['type_action']);
+
+ if ($forum_data_sql['parent_id'])
+ {
+ $sql = 'SELECT left_id, right_id, forum_type
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $forum_data_sql['parent_id'];
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error($user->lang['PARENT_NOT_EXIST'] . adm_back_link($this->u_action . '&amp;' . $this->parent_id), E_USER_WARNING);
+ }
+
+ if ($row['forum_type'] == FORUM_LINK)
+ {
+ $errors[] = $user->lang['PARENT_IS_LINK_FORUM'];
+ return $errors;
+ }
+
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET left_id = left_id + 2, right_id = right_id + 2
+ WHERE left_id > ' . $row['right_id'];
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET right_id = right_id + 2
+ WHERE ' . $row['left_id'] . ' BETWEEN left_id AND right_id';
+ $db->sql_query($sql);
+
+ $forum_data_sql['left_id'] = $row['right_id'];
+ $forum_data_sql['right_id'] = $row['right_id'] + 1;
+ }
+ else
+ {
+ $sql = 'SELECT MAX(right_id) AS right_id
+ FROM ' . FORUMS_TABLE;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $forum_data_sql['left_id'] = $row['right_id'] + 1;
+ $forum_data_sql['right_id'] = $row['right_id'] + 2;
+ }
+
+ $sql = 'INSERT INTO ' . FORUMS_TABLE . ' ' . $db->sql_build_array('INSERT', $forum_data_sql);
+ $db->sql_query($sql);
+
+ $forum_data['forum_id'] = $db->sql_nextid();
+
+ add_log('admin', 'LOG_FORUM_ADD', $forum_data['forum_name']);
+ }
+ else
+ {
+ $row = $this->get_forum_info($forum_data_sql['forum_id']);
+
+ if ($row['forum_type'] == FORUM_POST && $row['forum_type'] != $forum_data_sql['forum_type'])
+ {
+ // Has subforums and want to change into a link?
+ if ($row['right_id'] - $row['left_id'] > 1 && $forum_data_sql['forum_type'] == FORUM_LINK)
+ {
+ $errors[] = $user->lang['FORUM_WITH_SUBFORUMS_NOT_TO_LINK'];
+ return $errors;
+ }
+
+ // we're turning a postable forum into a non-postable forum
+ if ($forum_data_sql['type_action'] == 'move')
+ {
+ $to_forum_id = request_var('to_forum_id', 0);
+
+ if ($to_forum_id)
+ {
+ $errors = $this->move_forum_content($forum_data_sql['forum_id'], $to_forum_id);
+ }
+ else
+ {
+ return array($user->lang['NO_DESTINATION_FORUM']);
+ }
+ }
+ else if ($forum_data_sql['type_action'] == 'delete')
+ {
+ $errors = $this->delete_forum_content($forum_data_sql['forum_id']);
+ }
+ else
+ {
+ return array($user->lang['NO_FORUM_ACTION']);
+ }
+
+ $forum_data_sql['forum_posts'] = $forum_data_sql['forum_topics'] = $forum_data_sql['forum_topics_real'] = $forum_data_sql['forum_last_post_id'] = $forum_data_sql['forum_last_poster_id'] = $forum_data_sql['forum_last_post_time'] = 0;
+ $forum_data_sql['forum_last_poster_name'] = $forum_data_sql['forum_last_poster_colour'] = '';
+ }
+ else if ($row['forum_type'] == FORUM_CAT && $forum_data_sql['forum_type'] == FORUM_LINK)
+ {
+ // Has subforums?
+ if ($row['right_id'] - $row['left_id'] > 1)
+ {
+ // We are turning a category into a link - but need to decide what to do with the subforums.
+ $action_subforums = request_var('action_subforums', '');
+ $subforums_to_id = request_var('subforums_to_id', 0);
+
+ if ($action_subforums == 'delete')
+ {
+ $rows = get_forum_branch($row['forum_id'], 'children', 'descending', false);
+
+ foreach ($rows as $_row)
+ {
+ // Do not remove the forum id we are about to change. ;)
+ if ($_row['forum_id'] == $row['forum_id'])
+ {
+ continue;
+ }
+
+ $forum_ids[] = $_row['forum_id'];
+ $errors = array_merge($errors, $this->delete_forum_content($_row['forum_id']));
+ }
+
+ if (sizeof($errors))
+ {
+ return $errors;
+ }
+
+ if (sizeof($forum_ids))
+ {
+ $sql = 'DELETE FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
+ $db->sql_query($sql);
+
+ // Delete forum ids from extension groups table
+ $sql = 'SELECT group_id, allowed_forums
+ FROM ' . EXTENSION_GROUPS_TABLE;
+ $result = $db->sql_query($sql);
+
+ while ($_row = $db->sql_fetchrow($result))
+ {
+ if (!$_row['allowed_forums'])
+ {
+ continue;
+ }
+
+ $allowed_forums = unserialize(trim($_row['allowed_forums']));
+ $allowed_forums = array_diff($allowed_forums, $forum_ids);
+
+ $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . "
+ SET allowed_forums = '" . ((sizeof($allowed_forums)) ? serialize($allowed_forums) : '') . "'
+ WHERE group_id = {$_row['group_id']}";
+ $db->sql_query($sql);
+ }
+ $db->sql_freeresult($result);
+
+ $cache->destroy('_extensions');
+ }
+ }
+ else if ($action_subforums == 'move')
+ {
+ if (!$subforums_to_id)
+ {
+ return array($user->lang['NO_DESTINATION_FORUM']);
+ }
+
+ $sql = 'SELECT forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $subforums_to_id;
+ $result = $db->sql_query($sql);
+ $_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$_row)
+ {
+ return array($user->lang['NO_FORUM']);
+ }
+
+ $subforums_to_name = $_row['forum_name'];
+
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . "
+ WHERE parent_id = {$row['forum_id']}";
+ $result = $db->sql_query($sql);
+
+ while ($_row = $db->sql_fetchrow($result))
+ {
+ $this->move_forum($_row['forum_id'], $subforums_to_id);
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'UPDATE ' . FORUMS_TABLE . "
+ SET parent_id = $subforums_to_id
+ WHERE parent_id = {$row['forum_id']}";
+ $db->sql_query($sql);
+ }
+
+ // Adjust the left/right id
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET right_id = left_id + 1
+ WHERE forum_id = ' . $row['forum_id'];
+ $db->sql_query($sql);
+ }
+ }
+ else if ($row['forum_type'] == FORUM_CAT && $forum_data_sql['forum_type'] == FORUM_POST)
+ {
+ // Changing a category to a forum? Reset the data (you can't post directly in a cat, you must use a forum)
+ $forum_data_sql['forum_posts'] = 0;
+ $forum_data_sql['forum_topics'] = 0;
+ $forum_data_sql['forum_topics_real'] = 0;
+ $forum_data_sql['forum_last_post_id'] = 0;
+ $forum_data_sql['forum_last_post_subject'] = '';
+ $forum_data_sql['forum_last_post_time'] = 0;
+ $forum_data_sql['forum_last_poster_id'] = 0;
+ $forum_data_sql['forum_last_poster_name'] = '';
+ $forum_data_sql['forum_last_poster_colour'] = '';
+ }
+
+ if (sizeof($errors))
+ {
+ return $errors;
+ }
+
+ if ($row['parent_id'] != $forum_data_sql['parent_id'])
+ {
+ if ($row['forum_id'] != $forum_data_sql['parent_id'])
+ {
+ $errors = $this->move_forum($forum_data_sql['forum_id'], $forum_data_sql['parent_id']);
+ }
+ else
+ {
+ $forum_data_sql['parent_id'] = $row['parent_id'];
+ }
+ }
+
+ if (sizeof($errors))
+ {
+ return $errors;
+ }
+
+ unset($forum_data_sql['type_action']);
+
+ if ($row['forum_name'] != $forum_data_sql['forum_name'])
+ {
+ // the forum name has changed, clear the parents list of all forums (for safety)
+ $sql = 'UPDATE ' . FORUMS_TABLE . "
+ SET forum_parents = ''";
+ $db->sql_query($sql);
+ }
+
+ // Setting the forum id to the forum id is not really received well by some dbs. ;)
+ $forum_id = $forum_data_sql['forum_id'];
+ unset($forum_data_sql['forum_id']);
+
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $forum_data_sql) . '
+ WHERE forum_id = ' . $forum_id;
+ $db->sql_query($sql);
+
+ // Add it back
+ $forum_data['forum_id'] = $forum_id;
+
+ add_log('admin', 'LOG_FORUM_EDIT', $forum_data['forum_name']);
+ }
+
+ return $errors;
+ }
+
+ /**
+ * Move forum
+ */
+ function move_forum($from_id, $to_id)
+ {
+ global $db, $user;
+
+ $to_data = $moved_ids = $errors = array();
+
+ // Check if we want to move to a parent with link type
+ if ($to_id > 0)
+ {
+ $to_data = $this->get_forum_info($to_id);
+
+ if ($to_data['forum_type'] == FORUM_LINK)
+ {
+ $errors[] = $user->lang['PARENT_IS_LINK_FORUM'];
+ return $errors;
+ }
+ }
+
+ $moved_forums = get_forum_branch($from_id, 'children', 'descending');
+ $from_data = $moved_forums[0];
+ $diff = sizeof($moved_forums) * 2;
+
+ $moved_ids = array();
+ for ($i = 0; $i < sizeof($moved_forums); ++$i)
+ {
+ $moved_ids[] = $moved_forums[$i]['forum_id'];
+ }
+
+ // Resync parents
+ $sql = 'UPDATE ' . FORUMS_TABLE . "
+ SET right_id = right_id - $diff, forum_parents = ''
+ WHERE left_id < " . $from_data['right_id'] . "
+ AND right_id > " . $from_data['right_id'];
+ $db->sql_query($sql);
+
+ // Resync righthand side of tree
+ $sql = 'UPDATE ' . FORUMS_TABLE . "
+ SET left_id = left_id - $diff, right_id = right_id - $diff, forum_parents = ''
+ WHERE left_id > " . $from_data['right_id'];
+ $db->sql_query($sql);
+
+ if ($to_id > 0)
+ {
+ // Retrieve $to_data again, it may have been changed...
+ $to_data = $this->get_forum_info($to_id);
+
+ // Resync new parents
+ $sql = 'UPDATE ' . FORUMS_TABLE . "
+ SET right_id = right_id + $diff, forum_parents = ''
+ WHERE " . $to_data['right_id'] . ' BETWEEN left_id AND right_id
+ AND ' . $db->sql_in_set('forum_id', $moved_ids, true);
+ $db->sql_query($sql);
+
+ // Resync the righthand side of the tree
+ $sql = 'UPDATE ' . FORUMS_TABLE . "
+ SET left_id = left_id + $diff, right_id = right_id + $diff, forum_parents = ''
+ WHERE left_id > " . $to_data['right_id'] . '
+ AND ' . $db->sql_in_set('forum_id', $moved_ids, true);
+ $db->sql_query($sql);
+
+ // Resync moved branch
+ $to_data['right_id'] += $diff;
+
+ if ($to_data['right_id'] > $from_data['right_id'])
+ {
+ $diff = '+ ' . ($to_data['right_id'] - $from_data['right_id'] - 1);
+ }
+ else
+ {
+ $diff = '- ' . abs($to_data['right_id'] - $from_data['right_id'] - 1);
+ }
+ }
+ else
+ {
+ $sql = 'SELECT MAX(right_id) AS right_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $moved_ids, true);
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $diff = '+ ' . ($row['right_id'] - $from_data['left_id'] + 1);
+ }
+
+ $sql = 'UPDATE ' . FORUMS_TABLE . "
+ SET left_id = left_id $diff, right_id = right_id $diff, forum_parents = ''
+ WHERE " . $db->sql_in_set('forum_id', $moved_ids);
+ $db->sql_query($sql);
+
+ return $errors;
+ }
+
+ /**
+ * Move forum content from one to another forum
+ */
+ function move_forum_content($from_id, $to_id, $sync = true)
+ {
+ global $db;
+
+ $table_ary = array(LOG_TABLE, POSTS_TABLE, TOPICS_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
+
+ foreach ($table_ary as $table)
+ {
+ $sql = "UPDATE $table
+ SET forum_id = $to_id
+ WHERE forum_id = $from_id";
+ $db->sql_query($sql);
+ }
+ unset($table_ary);
+
+ $table_ary = array(FORUMS_ACCESS_TABLE, FORUMS_TRACK_TABLE, FORUMS_WATCH_TABLE, MODERATOR_CACHE_TABLE);
+
+ foreach ($table_ary as $table)
+ {
+ $sql = "DELETE FROM $table
+ WHERE forum_id = $from_id";
+ $db->sql_query($sql);
+ }
+
+ if ($sync)
+ {
+ // Delete ghost topics that link back to the same forum then resync counters
+ sync('topic_moved');
+ sync('forum', 'forum_id', $to_id, false, true);
+ }
+
+ return array();
+ }
+
+ /**
+ * Remove complete forum
+ */
+ function delete_forum($forum_id, $action_posts = 'delete', $action_subforums = 'delete', $posts_to_id = 0, $subforums_to_id = 0)
+ {
+ global $db, $user, $cache;
+
+ $forum_data = $this->get_forum_info($forum_id);
+
+ $errors = array();
+ $log_action_posts = $log_action_forums = $posts_to_name = $subforums_to_name = '';
+ $forum_ids = array($forum_id);
+
+ if ($action_posts == 'delete')
+ {
+ $log_action_posts = 'POSTS';
+ $errors = array_merge($errors, $this->delete_forum_content($forum_id));
+ }
+ else if ($action_posts == 'move')
+ {
+ if (!$posts_to_id)
+ {
+ $errors[] = $user->lang['NO_DESTINATION_FORUM'];
+ }
+ else
+ {
+ $log_action_posts = 'MOVE_POSTS';
+
+ $sql = 'SELECT forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $posts_to_id;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ $errors[] = $user->lang['NO_FORUM'];
+ }
+ else
+ {
+ $posts_to_name = $row['forum_name'];
+ $errors = array_merge($errors, $this->move_forum_content($forum_id, $posts_to_id));
+ }
+ }
+ }
+
+ if (sizeof($errors))
+ {
+ return $errors;
+ }
+
+ if ($action_subforums == 'delete')
+ {
+ $log_action_forums = 'FORUMS';
+ $rows = get_forum_branch($forum_id, 'children', 'descending', false);
+
+ foreach ($rows as $row)
+ {
+ $forum_ids[] = $row['forum_id'];
+ $errors = array_merge($errors, $this->delete_forum_content($row['forum_id']));
+ }
+
+ if (sizeof($errors))
+ {
+ return $errors;
+ }
+
+ $diff = sizeof($forum_ids) * 2;
+
+ $sql = 'DELETE FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
+ $db->sql_query($sql);
+ }
+ else if ($action_subforums == 'move')
+ {
+ if (!$subforums_to_id)
+ {
+ $errors[] = $user->lang['NO_DESTINATION_FORUM'];
+ }
+ else
+ {
+ $log_action_forums = 'MOVE_FORUMS';
+
+ $sql = 'SELECT forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $subforums_to_id;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ $errors[] = $user->lang['NO_FORUM'];
+ }
+ else
+ {
+ $subforums_to_name = $row['forum_name'];
+
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . "
+ WHERE parent_id = $forum_id";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $this->move_forum($row['forum_id'], $subforums_to_id);
+ }
+ $db->sql_freeresult($result);
+
+ // Grab new forum data for correct tree updating later
+ $forum_data = $this->get_forum_info($forum_id);
+
+ $sql = 'UPDATE ' . FORUMS_TABLE . "
+ SET parent_id = $subforums_to_id
+ WHERE parent_id = $forum_id";
+ $db->sql_query($sql);
+
+ $diff = 2;
+ $sql = 'DELETE FROM ' . FORUMS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_USERS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
+ }
+ }
+
+ if (sizeof($errors))
+ {
+ return $errors;
+ }
+ }
+ else
+ {
+ $diff = 2;
+ $sql = 'DELETE FROM ' . FORUMS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_USERS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
+ }
+
+ // Resync tree
+ $sql = 'UPDATE ' . FORUMS_TABLE . "
+ SET right_id = right_id - $diff
+ WHERE left_id < {$forum_data['right_id']} AND right_id > {$forum_data['right_id']}";
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . FORUMS_TABLE . "
+ SET left_id = left_id - $diff, right_id = right_id - $diff
+ WHERE left_id > {$forum_data['right_id']}";
+ $db->sql_query($sql);
+
+ // Delete forum ids from extension groups table
+ $sql = 'SELECT group_id, allowed_forums
+ FROM ' . EXTENSION_GROUPS_TABLE;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!$row['allowed_forums'])
+ {
+ continue;
+ }
+
+ $allowed_forums = unserialize(trim($row['allowed_forums']));
+ $allowed_forums = array_diff($allowed_forums, $forum_ids);
+
+ $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . "
+ SET allowed_forums = '" . ((sizeof($allowed_forums)) ? serialize($allowed_forums) : '') . "'
+ WHERE group_id = {$row['group_id']}";
+ $db->sql_query($sql);
+ }
+ $db->sql_freeresult($result);
+
+ $cache->destroy('_extensions');
+
+ $log_action = implode('_', array($log_action_posts, $log_action_forums));
+
+ switch ($log_action)
+ {
+ case 'MOVE_POSTS_MOVE_FORUMS':
+ add_log('admin', 'LOG_FORUM_DEL_MOVE_POSTS_MOVE_FORUMS', $posts_to_name, $subforums_to_name, $forum_data['forum_name']);
+ break;
+
+ case 'MOVE_POSTS_FORUMS':
+ add_log('admin', 'LOG_FORUM_DEL_MOVE_POSTS_FORUMS', $posts_to_name, $forum_data['forum_name']);
+ break;
+
+ case 'POSTS_MOVE_FORUMS':
+ add_log('admin', 'LOG_FORUM_DEL_POSTS_MOVE_FORUMS', $subforums_to_name, $forum_data['forum_name']);
+ break;
+
+ case '_MOVE_FORUMS':
+ add_log('admin', 'LOG_FORUM_DEL_MOVE_FORUMS', $subforums_to_name, $forum_data['forum_name']);
+ break;
+
+ case 'MOVE_POSTS_':
+ add_log('admin', 'LOG_FORUM_DEL_MOVE_POSTS', $posts_to_name, $forum_data['forum_name']);
+ break;
+
+ case 'POSTS_FORUMS':
+ add_log('admin', 'LOG_FORUM_DEL_POSTS_FORUMS', $forum_data['forum_name']);
+ break;
+
+ case '_FORUMS':
+ add_log('admin', 'LOG_FORUM_DEL_FORUMS', $forum_data['forum_name']);
+ break;
+
+ case 'POSTS_':
+ add_log('admin', 'LOG_FORUM_DEL_POSTS', $forum_data['forum_name']);
+ break;
+
+ default:
+ add_log('admin', 'LOG_FORUM_DEL_FORUM', $forum_data['forum_name']);
+ break;
+ }
+
+ return $errors;
+ }
+
+ /**
+ * Delete forum content
+ */
+ function delete_forum_content($forum_id)
+ {
+ global $db, $config, $phpbb_root_path, $phpEx;
+
+ include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+
+ $db->sql_transaction('begin');
+
+ // Select then delete all attachments
+ $sql = 'SELECT a.topic_id
+ FROM ' . POSTS_TABLE . ' p, ' . ATTACHMENTS_TABLE . " a
+ WHERE p.forum_id = $forum_id
+ AND a.in_message = 0
+ AND a.topic_id = p.topic_id";
+ $result = $db->sql_query($sql);
+
+ $topic_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_ids[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ delete_attachments('topic', $topic_ids, false);
+
+ // Before we remove anything we make sure we are able to adjust the post counts later. ;)
+ $sql = 'SELECT poster_id
+ FROM ' . POSTS_TABLE . '
+ WHERE forum_id = ' . $forum_id . '
+ AND post_postcount = 1
+ AND post_approved = 1';
+ $result = $db->sql_query($sql);
+
+ $post_counts = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_counts[$row['poster_id']] = (!empty($post_counts[$row['poster_id']])) ? $post_counts[$row['poster_id']] + 1 : 1;
+ }
+ $db->sql_freeresult($result);
+
+ switch ($db->sql_layer)
+ {
+ case 'mysql4':
+ case 'mysqli':
+
+ // Delete everything else and thank MySQL for offering multi-table deletion
+ $tables_ary = array(
+ SEARCH_WORDMATCH_TABLE => 'post_id',
+ REPORTS_TABLE => 'post_id',
+ WARNINGS_TABLE => 'post_id',
+ BOOKMARKS_TABLE => 'topic_id',
+ TOPICS_WATCH_TABLE => 'topic_id',
+ TOPICS_POSTED_TABLE => 'topic_id',
+ POLL_OPTIONS_TABLE => 'topic_id',
+ POLL_VOTES_TABLE => 'topic_id',
+ );
+
+ $sql = 'DELETE ' . POSTS_TABLE;
+ $sql_using = "\nFROM " . POSTS_TABLE;
+ $sql_where = "\nWHERE " . POSTS_TABLE . ".forum_id = $forum_id\n";
+
+ foreach ($tables_ary as $table => $field)
+ {
+ $sql .= ", $table ";
+ $sql_using .= ", $table ";
+ $sql_where .= "\nAND $table.$field = " . POSTS_TABLE . ".$field";
+ }
+
+ $db->sql_query($sql . $sql_using . $sql_where);
+
+ break;
+
+ default:
+
+ // Delete everything else and curse your DB for not offering multi-table deletion
+ $tables_ary = array(
+ 'post_id' => array(
+ SEARCH_WORDMATCH_TABLE,
+ REPORTS_TABLE,
+ WARNINGS_TABLE,
+ ),
+
+ 'topic_id' => array(
+ BOOKMARKS_TABLE,
+ TOPICS_WATCH_TABLE,
+ TOPICS_POSTED_TABLE,
+ POLL_OPTIONS_TABLE,
+ POLL_VOTES_TABLE,
+ )
+ );
+
+ foreach ($tables_ary as $field => $tables)
+ {
+ $start = 0;
+
+ do
+ {
+ $sql = "SELECT $field
+ FROM " . POSTS_TABLE . '
+ WHERE forum_id = ' . $forum_id;
+ $result = $db->sql_query_limit($sql, 500, $start);
+
+ $ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $ids[] = $row[$field];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($ids))
+ {
+ $start += sizeof($ids);
+
+ foreach ($tables as $table)
+ {
+ $db->sql_query("DELETE FROM $table WHERE " . $db->sql_in_set($field, $ids));
+ }
+ }
+ }
+ while ($row);
+ }
+ unset($ids);
+
+ break;
+ }
+
+ $table_ary = array(FORUMS_ACCESS_TABLE, FORUMS_TRACK_TABLE, FORUMS_WATCH_TABLE, LOG_TABLE, MODERATOR_CACHE_TABLE, POSTS_TABLE, TOPICS_TABLE, TOPICS_TRACK_TABLE);
+
+ foreach ($table_ary as $table)
+ {
+ $db->sql_query("DELETE FROM $table WHERE forum_id = $forum_id");
+ }
+
+ // Set forum ids to 0
+ $table_ary = array(DRAFTS_TABLE);
+
+ foreach ($table_ary as $table)
+ {
+ $db->sql_query("UPDATE $table SET forum_id = 0 WHERE forum_id = $forum_id");
+ }
+
+ // Adjust users post counts
+ if (sizeof($post_counts))
+ {
+ foreach ($post_counts as $poster_id => $substract)
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_posts = 0
+ WHERE user_id = ' . $poster_id . '
+ AND user_posts < ' . $substract;
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_posts = user_posts - ' . $substract . '
+ WHERE user_id = ' . $poster_id . '
+ AND user_posts >= ' . $substract;
+ $db->sql_query($sql);
+ }
+ }
+
+ $db->sql_transaction('commit');
+
+ // Make sure the overall post/topic count is correct...
+ $sql = 'SELECT COUNT(post_id) AS stat
+ FROM ' . POSTS_TABLE . '
+ WHERE post_approved = 1';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ set_config('num_posts', (int) $row['stat'], true);
+
+ $sql = 'SELECT COUNT(topic_id) AS stat
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_approved = 1';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ set_config('num_topics', (int) $row['stat'], true);
+
+ $sql = 'SELECT COUNT(attach_id) as stat
+ FROM ' . ATTACHMENTS_TABLE;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ set_config('num_files', (int) $row['stat'], true);
+
+ $sql = 'SELECT SUM(filesize) as stat
+ FROM ' . ATTACHMENTS_TABLE;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ set_config('upload_dir_size', (float) $row['stat'], true);
+
+ return array();
+ }
+
+ /**
+ * Move forum position by $steps up/down
+ */
+ function move_forum_by($forum_row, $action = 'move_up', $steps = 1)
+ {
+ global $db;
+
+ /**
+ * Fetch all the siblings between the module's current spot
+ * and where we want to move it to. If there are less than $steps
+ * siblings between the current spot and the target then the
+ * module will move as far as possible
+ */
+ $sql = 'SELECT forum_id, forum_name, left_id, right_id
+ FROM ' . FORUMS_TABLE . "
+ WHERE parent_id = {$forum_row['parent_id']}
+ AND " . (($action == 'move_up') ? "right_id < {$forum_row['right_id']} ORDER BY right_id DESC" : "left_id > {$forum_row['left_id']} ORDER BY left_id ASC");
+ $result = $db->sql_query_limit($sql, $steps);
+
+ $target = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $target = $row;
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($target))
+ {
+ // The forum is already on top or bottom
+ return false;
+ }
+
+ /**
+ * $left_id and $right_id define the scope of the nodes that are affected by the move.
+ * $diff_up and $diff_down are the values to substract or add to each node's left_id
+ * and right_id in order to move them up or down.
+ * $move_up_left and $move_up_right define the scope of the nodes that are moving
+ * up. Other nodes in the scope of ($left_id, $right_id) are considered to move down.
+ */
+ if ($action == 'move_up')
+ {
+ $left_id = $target['left_id'];
+ $right_id = $forum_row['right_id'];
+
+ $diff_up = $forum_row['left_id'] - $target['left_id'];
+ $diff_down = $forum_row['right_id'] + 1 - $forum_row['left_id'];
+
+ $move_up_left = $forum_row['left_id'];
+ $move_up_right = $forum_row['right_id'];
+ }
+ else
+ {
+ $left_id = $forum_row['left_id'];
+ $right_id = $target['right_id'];
+
+ $diff_up = $forum_row['right_id'] + 1 - $forum_row['left_id'];
+ $diff_down = $target['right_id'] - $forum_row['right_id'];
+
+ $move_up_left = $forum_row['right_id'] + 1;
+ $move_up_right = $target['right_id'];
+ }
+
+ // Now do the dirty job
+ $sql = 'UPDATE ' . FORUMS_TABLE . "
+ SET left_id = left_id + CASE
+ WHEN left_id BETWEEN {$move_up_left} AND {$move_up_right} THEN -{$diff_up}
+ ELSE {$diff_down}
+ END,
+ right_id = right_id + CASE
+ WHEN right_id BETWEEN {$move_up_left} AND {$move_up_right} THEN -{$diff_up}
+ ELSE {$diff_down}
+ END,
+ forum_parents = ''
+ WHERE
+ left_id BETWEEN {$left_id} AND {$right_id}
+ AND right_id BETWEEN {$left_id} AND {$right_id}";
+ $db->sql_query($sql);
+
+ return $target['forum_name'];
+ }
+
+ /**
+ * Display progress bar for syncinc forums
+ */
+ function display_progress_bar($start, $total)
+ {
+ global $template, $user;
+
+ adm_page_header($user->lang['SYNC_IN_PROGRESS']);
+
+ $template->set_filenames(array(
+ 'body' => 'progress_bar.html')
+ );
+
+ $template->assign_vars(array(
+ 'L_PROGRESS' => $user->lang['SYNC_IN_PROGRESS'],
+ 'L_PROGRESS_EXPLAIN' => ($start && $total) ? sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], $start, $total) : $user->lang['SYNC_IN_PROGRESS'])
+ );
+
+ adm_page_footer();
+ }
+
+ /**
+ * Display copy permission page
+ * Not used at the moment - we will have a look at it for 3.0.7
+ */
+ function copy_permission_page($forum_data)
+ {
+ global $phpEx, $phpbb_admin_path, $template, $user;
+
+ $acl_url = '&amp;mode=setting_forum_local&amp;forum_id[]=' . $forum_data['forum_id'];
+ $action = append_sid($this->u_action . "&amp;parent_id={$this->parent_id}&amp;f={$forum_data['forum_id']}&amp;action=copy_perm");
+
+ $l_acl = sprintf($user->lang['COPY_TO_ACL'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url) . '">', '</a>');
+
+ $this->tpl_name = 'acp_forums_copy_perm';
+
+ $template->assign_vars(array(
+ 'U_ACL' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url),
+ 'L_ACL_LINK' => $l_acl,
+ 'L_BACK_LINK' => adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id),
+ 'S_COPY_ACTION' => $action,
+ 'S_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $forum_data['forum_id'], false, false, false),
+ ));
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
new file mode 100644
index 0000000000..3df61ff4e2
--- /dev/null
+++ b/phpBB/includes/acp/acp_groups.php
@@ -0,0 +1,789 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_groups
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template, $cache;
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix, $file_uploads;
+
+ $user->add_lang('acp/groups');
+ $this->tpl_name = 'acp_groups';
+ $this->page_title = 'ACP_GROUPS_MANAGE';
+
+ $form_key = 'acp_groups';
+ add_form_key($form_key);
+
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ // Check and set some common vars
+ $action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['addusers'])) ? 'addusers' : request_var('action', ''));
+ $group_id = request_var('g', 0);
+ $mark_ary = request_var('mark', array(0));
+ $name_ary = request_var('usernames', '', true);
+ $leader = request_var('leader', 0);
+ $default = request_var('default', 0);
+ $start = request_var('start', 0);
+ $update = (isset($_POST['update'])) ? true : false;
+
+
+ // Clear some vars
+ $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false;
+ $group_row = array();
+
+ // Grab basic data for group, if group_id is set and exists
+ if ($group_id)
+ {
+ $sql = 'SELECT *
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_id = $group_id";
+ $result = $db->sql_query($sql);
+ $group_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$group_row)
+ {
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // Check if the user is allowed to manage this group if set to founder only.
+ if ($user->data['user_type'] != USER_FOUNDER && $group_row['group_founder_manage'])
+ {
+ trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+
+ // Which page?
+ switch ($action)
+ {
+ case 'approve':
+ case 'demote':
+ case 'promote':
+ if (!$group_id)
+ {
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // Approve, demote or promote
+ $group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
+ $error = group_user_attributes($action, $group_id, $mark_ary, false, $group_name);
+
+ if (!$error)
+ {
+ switch ($action)
+ {
+ case 'demote':
+ $message = 'GROUP_MODS_DEMOTED';
+ break;
+
+ case 'promote':
+ $message = 'GROUP_MODS_PROMOTED';
+ break;
+
+ case 'approve':
+ $message = 'USERS_APPROVED';
+ break;
+ }
+
+ trigger_error($user->lang[$message] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id));
+ }
+ else
+ {
+ trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id), E_USER_WARNING);
+ }
+
+ break;
+
+ case 'default':
+ if (!$group_id)
+ {
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (confirm_box(true))
+ {
+ $group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
+
+ if (!sizeof($mark_ary))
+ {
+ $start = 0;
+
+ do
+ {
+ $sql = 'SELECT user_id
+ FROM ' . USER_GROUP_TABLE . "
+ WHERE group_id = $group_id
+ ORDER BY user_id";
+ $result = $db->sql_query_limit($sql, 200, $start);
+
+ $mark_ary = array();
+ if ($row = $db->sql_fetchrow($result))
+ {
+ do
+ {
+ $mark_ary[] = $row['user_id'];
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ group_user_attributes('default', $group_id, $mark_ary, false, $group_name, $group_row);
+
+ $start = (sizeof($mark_ary) < 200) ? 0 : $start + 200;
+ }
+ else
+ {
+ $start = 0;
+ }
+ $db->sql_freeresult($result);
+ }
+ while ($start);
+ }
+ else
+ {
+ group_user_attributes('default', $group_id, $mark_ary, false, $group_name, $group_row);
+ }
+
+ trigger_error($user->lang['GROUP_DEFS_UPDATED'] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'mark' => $mark_ary,
+ 'g' => $group_id,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action))
+ );
+ }
+
+ break;
+
+ case 'deleteusers':
+ case 'delete':
+ if (!$group_id)
+ {
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ else if ($action === 'delete' && $group_row['group_type'] == GROUP_SPECIAL)
+ {
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (confirm_box(true))
+ {
+ $error = '';
+
+ switch ($action)
+ {
+ case 'delete':
+ if (!$auth->acl_get('a_groupdel'))
+ {
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $error = group_delete($group_id, $group_row['group_name']);
+ break;
+
+ case 'deleteusers':
+ $group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
+ $error = group_user_del($group_id, $mark_ary, false, $group_name);
+ break;
+ }
+
+ $back_link = ($action == 'delete') ? $this->u_action : $this->u_action . '&amp;action=list&amp;g=' . $group_id;
+
+ if ($error)
+ {
+ trigger_error($user->lang[$error] . adm_back_link($back_link), E_USER_WARNING);
+ }
+
+ $message = ($action == 'delete') ? 'GROUP_DELETED' : 'GROUP_USERS_REMOVE';
+ trigger_error($user->lang[$message] . adm_back_link($back_link));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'mark' => $mark_ary,
+ 'g' => $group_id,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action))
+ );
+ }
+ break;
+
+ case 'addusers':
+ if (!$group_id)
+ {
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (!$name_ary)
+ {
+ trigger_error($user->lang['NO_USERS'] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id), E_USER_WARNING);
+ }
+
+ $name_ary = array_unique(explode("\n", $name_ary));
+ $group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
+
+ // Add user/s to group
+ if ($error = group_user_add($group_id, false, $name_ary, $group_name, $default, $leader, 0, $group_row))
+ {
+ trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id), E_USER_WARNING);
+ }
+
+ $message = ($leader) ? 'GROUP_MODS_ADDED' : 'GROUP_USERS_ADDED';
+ trigger_error($user->lang[$message] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id));
+ break;
+
+ case 'edit':
+ case 'add':
+
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+
+ $data = $submit_ary = array();
+
+ if ($action == 'edit' && !$group_id)
+ {
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if ($action == 'add' && !$auth->acl_get('a_groupadd'))
+ {
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $error = array();
+ $user->add_lang('ucp');
+
+ $avatar_select = basename(request_var('avatar_select', ''));
+ $category = basename(request_var('category', ''));
+
+ // Did we submit?
+ if ($update)
+ {
+ if (!check_form_key($form_key))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $group_name = utf8_normalize_nfc(request_var('group_name', '', true));
+ $group_desc = utf8_normalize_nfc(request_var('group_desc', '', true));
+ $group_type = request_var('group_type', GROUP_FREE);
+
+ $allow_desc_bbcode = request_var('desc_parse_bbcode', false);
+ $allow_desc_urls = request_var('desc_parse_urls', false);
+ $allow_desc_smilies = request_var('desc_parse_smilies', false);
+
+ $data['uploadurl'] = request_var('uploadurl', '');
+ $data['remotelink'] = request_var('remotelink', '');
+ $data['width'] = request_var('width', '');
+ $data['height'] = request_var('height', '');
+ $delete = request_var('delete', '');
+
+ $submit_ary = array(
+ 'colour' => request_var('group_colour', ''),
+ 'rank' => request_var('group_rank', 0),
+ 'receive_pm' => isset($_REQUEST['group_receive_pm']) ? 1 : 0,
+ 'legend' => isset($_REQUEST['group_legend']) ? 1 : 0,
+ 'message_limit' => request_var('group_message_limit', 0),
+ 'max_recipients' => request_var('group_max_recipients', 0),
+ 'founder_manage' => 0,
+ 'skip_auth' => request_var('group_skip_auth', 0),
+ );
+
+ if ($user->data['user_type'] == USER_FOUNDER)
+ {
+ $submit_ary['founder_manage'] = isset($_REQUEST['group_founder_manage']) ? 1 : 0;
+ }
+
+ if (!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl'] || $data['remotelink'])
+ {
+ // Avatar stuff
+ $var_ary = array(
+ 'uploadurl' => array('string', true, 5, 255),
+ 'remotelink' => array('string', true, 5, 255),
+ 'width' => array('string', true, 1, 3),
+ 'height' => array('string', true, 1, 3),
+ );
+
+ if (!($error = validate_data($data, $var_ary)))
+ {
+ $data['user_id'] = "g$group_id";
+
+ if ((!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl']) && $can_upload)
+ {
+ list($submit_ary['avatar_type'], $submit_ary['avatar'], $submit_ary['avatar_width'], $submit_ary['avatar_height']) = avatar_upload($data, $error);
+ }
+ else if ($data['remotelink'])
+ {
+ list($submit_ary['avatar_type'], $submit_ary['avatar'], $submit_ary['avatar_width'], $submit_ary['avatar_height']) = avatar_remote($data, $error);
+ }
+ }
+ }
+ else if ($avatar_select && $config['allow_avatar_local'])
+ {
+ // check avatar gallery
+ if (is_dir($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category))
+ {
+ $submit_ary['avatar_type'] = AVATAR_GALLERY;
+
+ list($submit_ary['avatar_width'], $submit_ary['avatar_height']) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . $avatar_select);
+ $submit_ary['avatar'] = $category . '/' . $avatar_select;
+ }
+ }
+ else if ($delete)
+ {
+ $submit_ary['avatar'] = '';
+ $submit_ary['avatar_type'] = $submit_ary['avatar_width'] = $submit_ary['avatar_height'] = 0;
+ }
+ else if ($data['width'] && $data['height'])
+ {
+ // Only update the dimensions?
+ if ($config['avatar_max_width'] || $config['avatar_max_height'])
+ {
+ if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
+ {
+ $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ }
+ }
+
+ if (!sizeof($error))
+ {
+ if ($config['avatar_min_width'] || $config['avatar_min_height'])
+ {
+ if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
+ {
+ $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ }
+ }
+ }
+
+ if (!sizeof($error))
+ {
+ $submit_ary['avatar_width'] = $data['width'];
+ $submit_ary['avatar_height'] = $data['height'];
+ }
+ }
+
+ if ((isset($submit_ary['avatar']) && $submit_ary['avatar'] && (!isset($group_row['group_avatar']))) || $delete)
+ {
+ if (isset($group_row['group_avatar']) && $group_row['group_avatar'])
+ {
+ avatar_delete('group', $group_row, true);
+ }
+ }
+
+ if (!sizeof($error))
+ {
+ // Only set the rank, colour, etc. if it's changed or if we're adding a new
+ // group. This prevents existing group members being updated if no changes
+ // were made.
+
+ $group_attributes = array();
+ $test_variables = array(
+ 'rank' => 'int',
+ 'colour' => 'string',
+ 'avatar' => 'string',
+ 'avatar_type' => 'int',
+ 'avatar_width' => 'int',
+ 'avatar_height' => 'int',
+ 'receive_pm' => 'int',
+ 'legend' => 'int',
+ 'message_limit' => 'int',
+ 'max_recipients'=> 'int',
+ 'founder_manage'=> 'int',
+ 'skip_auth' => 'int',
+ );
+
+ foreach ($test_variables as $test => $type)
+ {
+ if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test]))
+ {
+ settype($submit_ary[$test], $type);
+ $group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test];
+ }
+ }
+
+ if (!($error = group_create($group_id, $group_type, $group_name, $group_desc, $group_attributes, $allow_desc_bbcode, $allow_desc_urls, $allow_desc_smilies)))
+ {
+ $group_perm_from = request_var('group_perm_from', 0);
+
+ // Copy permissions?
+ // If the user has the a_authgroups permission and at least one additional permission ability set the permissions are fully transferred.
+ // We do not limit on one auth category because this can lead to incomplete permissions being tricky to fix for the admin, roles being assigned or added non-default permissions.
+ // Since the user only has the option to copy permissions from non leader managed groups this seems to be a good compromise.
+ if ($group_perm_from && $action == 'add' && $auth->acl_get('a_authgroups') && $auth->acl_gets('a_aauth', 'a_fauth', 'a_mauth', 'a_uauth'))
+ {
+ $sql = 'SELECT group_founder_manage
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_id = ' . $group_perm_from;
+ $result = $db->sql_query($sql);
+ $check_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // Check the group if non-founder
+ if ($check_row && ($user->data['user_type'] == USER_FOUNDER || $check_row['group_founder_manage'] == 0))
+ {
+ // From the mysql documentation:
+ // Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14.
+ // Due to this we stay on the safe side if we do the insertion "the manual way"
+
+ // Copy permisisons from/to the acl groups table (only group_id gets changed)
+ $sql = 'SELECT forum_id, auth_option_id, auth_role_id, auth_setting
+ FROM ' . ACL_GROUPS_TABLE . '
+ WHERE group_id = ' . $group_perm_from;
+ $result = $db->sql_query($sql);
+
+ $groups_sql_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $groups_sql_ary[] = array(
+ 'group_id' => (int) $group_id,
+ 'forum_id' => (int) $row['forum_id'],
+ 'auth_option_id' => (int) $row['auth_option_id'],
+ 'auth_role_id' => (int) $row['auth_role_id'],
+ 'auth_setting' => (int) $row['auth_setting']
+ );
+ }
+ $db->sql_freeresult($result);
+
+ // Now insert the data
+ $db->sql_multi_insert(ACL_GROUPS_TABLE, $groups_sql_ary);
+
+ $auth->acl_clear_prefetch();
+ }
+ }
+
+ $cache->destroy('sql', GROUPS_TABLE);
+
+ $message = ($action == 'edit') ? 'GROUP_UPDATED' : 'GROUP_CREATED';
+ trigger_error($user->lang[$message] . adm_back_link($this->u_action));
+ }
+ }
+
+ if (sizeof($error))
+ {
+ $group_rank = $submit_ary['rank'];
+
+ $group_desc_data = array(
+ 'text' => $group_desc,
+ 'allow_bbcode' => $allow_desc_bbcode,
+ 'allow_smilies' => $allow_desc_smilies,
+ 'allow_urls' => $allow_desc_urls
+ );
+ }
+ }
+ else if (!$group_id)
+ {
+ $group_name = utf8_normalize_nfc(request_var('group_name', '', true));
+ $group_desc_data = array(
+ 'text' => '',
+ 'allow_bbcode' => true,
+ 'allow_smilies' => true,
+ 'allow_urls' => true
+ );
+ $group_rank = 0;
+ $group_type = GROUP_OPEN;
+ }
+ else
+ {
+ $group_name = $group_row['group_name'];
+ $group_desc_data = generate_text_for_edit($group_row['group_desc'], $group_row['group_desc_uid'], $group_row['group_desc_options']);
+ $group_type = $group_row['group_type'];
+ $group_rank = $group_row['group_rank'];
+ }
+
+ $sql = 'SELECT *
+ FROM ' . RANKS_TABLE . '
+ WHERE rank_special = 1
+ ORDER BY rank_title';
+ $result = $db->sql_query($sql);
+
+ $rank_options = '<option value="0"' . ((!$group_rank) ? ' selected="selected"' : '') . '>' . $user->lang['USER_DEFAULT'] . '</option>';
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $selected = ($group_rank && $row['rank_id'] == $group_rank) ? ' selected="selected"' : '';
+ $rank_options .= '<option value="' . $row['rank_id'] . '"' . $selected . '>' . $row['rank_title'] . '</option>';
+ }
+ $db->sql_freeresult($result);
+
+ $type_free = ($group_type == GROUP_FREE) ? ' checked="checked"' : '';
+ $type_open = ($group_type == GROUP_OPEN) ? ' checked="checked"' : '';
+ $type_closed = ($group_type == GROUP_CLOSED) ? ' checked="checked"' : '';
+ $type_hidden = ($group_type == GROUP_HIDDEN) ? ' checked="checked"' : '';
+
+ $avatar_img = (!empty($group_row['group_avatar'])) ? get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR') : '<img src="' . $phpbb_admin_path . 'images/no_avatar.gif" alt="" />';
+
+ $display_gallery = (isset($_POST['display_gallery'])) ? true : false;
+
+ if ($config['allow_avatar_local'] && $display_gallery)
+ {
+ avatar_gallery($category, $avatar_select, 4);
+ }
+
+ $back_link = request_var('back_link', '');
+
+ switch ($back_link)
+ {
+ case 'acp_users_groups':
+ $u_back = append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&amp;mode=groups&amp;u=' . request_var('u', 0));
+ break;
+
+ default:
+ $u_back = $this->u_action;
+ break;
+ }
+
+ $template->assign_vars(array(
+ 'S_EDIT' => true,
+ 'S_ADD_GROUP' => ($action == 'add') ? true : false,
+ 'S_GROUP_PERM' => ($action == 'add' && $auth->acl_get('a_authgroups') && $auth->acl_gets('a_aauth', 'a_fauth', 'a_mauth', 'a_uauth')) ? true : false,
+ 'S_INCLUDE_SWATCH' => true,
+ 'S_CAN_UPLOAD' => $can_upload,
+ 'S_ERROR' => (sizeof($error)) ? true : false,
+ 'S_SPECIAL_GROUP' => ($group_type == GROUP_SPECIAL) ? true : false,
+ 'S_DISPLAY_GALLERY' => ($config['allow_avatar_local'] && !$display_gallery) ? true : false,
+ 'S_IN_GALLERY' => ($config['allow_avatar_local'] && $display_gallery) ? true : false,
+ 'S_USER_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
+
+ 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'GROUP_NAME' => ($group_type == GROUP_SPECIAL) ? $user->lang['G_' . $group_name] : $group_name,
+ 'GROUP_INTERNAL_NAME' => $group_name,
+ 'GROUP_DESC' => $group_desc_data['text'],
+ 'GROUP_RECEIVE_PM' => (isset($group_row['group_receive_pm']) && $group_row['group_receive_pm']) ? ' checked="checked"' : '',
+ 'GROUP_FOUNDER_MANAGE' => (isset($group_row['group_founder_manage']) && $group_row['group_founder_manage']) ? ' checked="checked"' : '',
+ 'GROUP_LEGEND' => (isset($group_row['group_legend']) && $group_row['group_legend']) ? ' checked="checked"' : '',
+ 'GROUP_MESSAGE_LIMIT' => (isset($group_row['group_message_limit'])) ? $group_row['group_message_limit'] : 0,
+ 'GROUP_MAX_RECIPIENTS' => (isset($group_row['group_max_recipients'])) ? $group_row['group_max_recipients'] : 0,
+ 'GROUP_COLOUR' => (isset($group_row['group_colour'])) ? $group_row['group_colour'] : '',
+ 'GROUP_SKIP_AUTH' => (!empty($group_row['group_skip_auth'])) ? ' checked="checked"' : '',
+
+ 'S_DESC_BBCODE_CHECKED' => $group_desc_data['allow_bbcode'],
+ 'S_DESC_URLS_CHECKED' => $group_desc_data['allow_urls'],
+ 'S_DESC_SMILIES_CHECKED'=> $group_desc_data['allow_smilies'],
+
+ 'S_RANK_OPTIONS' => $rank_options,
+ 'S_GROUP_OPTIONS' => group_select_options(false, false, (($user->data['user_type'] == USER_FOUNDER) ? false : 0)),
+ 'AVATAR' => $avatar_img,
+ 'AVATAR_IMAGE' => $avatar_img,
+ 'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'],
+ 'AVATAR_WIDTH' => (isset($group_row['group_avatar_width'])) ? $group_row['group_avatar_width'] : '',
+ 'AVATAR_HEIGHT' => (isset($group_row['group_avatar_height'])) ? $group_row['group_avatar_height'] : '',
+
+ 'GROUP_TYPE_FREE' => GROUP_FREE,
+ 'GROUP_TYPE_OPEN' => GROUP_OPEN,
+ 'GROUP_TYPE_CLOSED' => GROUP_CLOSED,
+ 'GROUP_TYPE_HIDDEN' => GROUP_HIDDEN,
+ 'GROUP_TYPE_SPECIAL' => GROUP_SPECIAL,
+
+ 'GROUP_FREE' => $type_free,
+ 'GROUP_OPEN' => $type_open,
+ 'GROUP_CLOSED' => $type_closed,
+ 'GROUP_HIDDEN' => $type_hidden,
+
+ 'U_BACK' => $u_back,
+ 'U_SWATCH' => append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=settings&amp;name=group_colour'),
+ 'U_ACTION' => "{$this->u_action}&amp;action=$action&amp;g=$group_id",
+ 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)),
+ ));
+
+ return;
+ break;
+
+ case 'list':
+
+ if (!$group_id)
+ {
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $this->page_title = 'GROUP_MEMBERS';
+
+ // Grab the leaders - always, on every page...
+ $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_colour, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
+ FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
+ WHERE ug.group_id = $group_id
+ AND u.user_id = ug.user_id
+ AND ug.group_leader = 1
+ ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username_clean";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $template->assign_block_vars('leader', array(
+ 'U_USER_EDIT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&amp;action=edit&amp;u={$row['user_id']}"),
+
+ 'USERNAME' => $row['username'],
+ 'USERNAME_COLOUR' => $row['user_colour'],
+ 'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
+ 'JOINED' => ($row['user_regdate']) ? $user->format_date($row['user_regdate']) : ' - ',
+ 'USER_POSTS' => $row['user_posts'],
+ 'USER_ID' => $row['user_id'],
+ ));
+ }
+ $db->sql_freeresult($result);
+
+ // Total number of group members (non-leaders)
+ $sql = 'SELECT COUNT(user_id) AS total_members
+ FROM ' . USER_GROUP_TABLE . "
+ WHERE group_id = $group_id
+ AND group_leader = 0";
+ $result = $db->sql_query($sql);
+ $total_members = (int) $db->sql_fetchfield('total_members');
+ $db->sql_freeresult($result);
+
+ $s_action_options = '';
+ $options = array('default' => 'DEFAULT', 'approve' => 'APPROVE', 'demote' => 'DEMOTE', 'promote' => 'PROMOTE', 'deleteusers' => 'DELETE');
+
+ foreach ($options as $option => $lang)
+ {
+ $s_action_options .= '<option value="' . $option . '">' . $user->lang['GROUP_' . $lang] . '</option>';
+ }
+
+ $template->assign_vars(array(
+ 'S_LIST' => true,
+ 'S_GROUP_SPECIAL' => ($group_row['group_type'] == GROUP_SPECIAL) ? true : false,
+ 'S_ACTION_OPTIONS' => $s_action_options,
+
+ 'S_ON_PAGE' => on_page($total_members, $config['topics_per_page'], $start),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;action=$action&amp;g=$group_id", $total_members, $config['topics_per_page'], $start, true),
+ 'GROUP_NAME' => ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'],
+
+ 'U_ACTION' => $this->u_action . "&amp;g=$group_id",
+ 'U_BACK' => $this->u_action,
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=list&amp;field=usernames'),
+ 'U_DEFAULT_ALL' => "{$this->u_action}&amp;action=default&amp;g=$group_id",
+ ));
+
+ // Grab the members
+ $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
+ FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
+ WHERE ug.group_id = $group_id
+ AND u.user_id = ug.user_id
+ AND ug.group_leader = 0
+ ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username_clean";
+ $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
+
+ $pending = false;
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['user_pending'] && !$pending)
+ {
+ $template->assign_block_vars('member', array(
+ 'S_PENDING' => true)
+ );
+
+ $pending = true;
+ }
+
+ $template->assign_block_vars('member', array(
+ 'U_USER_EDIT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&amp;action=edit&amp;u={$row['user_id']}"),
+
+ 'USERNAME' => $row['username'],
+ 'USERNAME_COLOUR' => $row['user_colour'],
+ 'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
+ 'JOINED' => ($row['user_regdate']) ? $user->format_date($row['user_regdate']) : ' - ',
+ 'USER_POSTS' => $row['user_posts'],
+ 'USER_ID' => $row['user_id'])
+ );
+ }
+ $db->sql_freeresult($result);
+
+ return;
+ break;
+ }
+
+ $template->assign_vars(array(
+ 'U_ACTION' => $this->u_action,
+ 'S_GROUP_ADD' => ($auth->acl_get('a_groupadd')) ? true : false)
+ );
+
+ // Get us all the groups
+ $sql = 'SELECT g.group_id, g.group_name, g.group_type
+ FROM ' . GROUPS_TABLE . ' g
+ ORDER BY g.group_type ASC, g.group_name';
+ $result = $db->sql_query($sql);
+
+ $lookup = $cached_group_data = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $type = ($row['group_type'] == GROUP_SPECIAL) ? 'special' : 'normal';
+
+ // used to determine what type a group is
+ $lookup[$row['group_id']] = $type;
+
+ // used for easy access to the data within a group
+ $cached_group_data[$type][$row['group_id']] = $row;
+ $cached_group_data[$type][$row['group_id']]['total_members'] = 0;
+ }
+ $db->sql_freeresult($result);
+
+ // How many people are in which group?
+ $sql = 'SELECT COUNT(ug.user_id) AS total_members, ug.group_id
+ FROM ' . USER_GROUP_TABLE . ' ug
+ WHERE ' . $db->sql_in_set('ug.group_id', array_keys($lookup)) . '
+ GROUP BY ug.group_id';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $type = $lookup[$row['group_id']];
+ $cached_group_data[$type][$row['group_id']]['total_members'] = $row['total_members'];
+ }
+ $db->sql_freeresult($result);
+
+ // The order is... normal, then special
+ ksort($cached_group_data);
+
+ foreach ($cached_group_data as $type => $row_ary)
+ {
+ if ($type == 'special')
+ {
+ $template->assign_block_vars('groups', array(
+ 'S_SPECIAL' => true)
+ );
+ }
+
+ foreach ($row_ary as $group_id => $row)
+ {
+ $group_name = (!empty($user->lang['G_' . $row['group_name']]))? $user->lang['G_' . $row['group_name']] : $row['group_name'];
+
+ $template->assign_block_vars('groups', array(
+ 'U_LIST' => "{$this->u_action}&amp;action=list&amp;g=$group_id",
+ 'U_EDIT' => "{$this->u_action}&amp;action=edit&amp;g=$group_id",
+ 'U_DELETE' => ($auth->acl_get('a_groupdel')) ? "{$this->u_action}&amp;action=delete&amp;g=$group_id" : '',
+
+ 'S_GROUP_SPECIAL' => ($row['group_type'] == GROUP_SPECIAL) ? true : false,
+
+ 'GROUP_NAME' => $group_name,
+ 'TOTAL_MEMBERS' => $row['total_members'],
+ ));
+ }
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
new file mode 100644
index 0000000000..8213c55ccb
--- /dev/null
+++ b/phpBB/includes/acp/acp_icons.php
@@ -0,0 +1,946 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @todo [smilies] check regular expressions for special char replacements (stored specialchared in db)
+* @package acp
+*/
+class acp_icons
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template, $cache;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ $user->add_lang('acp/posting');
+
+ // Set up general vars
+ $action = request_var('action', '');
+ $action = (isset($_POST['add'])) ? 'add' : $action;
+ $action = (isset($_POST['edit'])) ? 'edit' : $action;
+ $action = (isset($_POST['import'])) ? 'import' : $action;
+ $icon_id = request_var('id', 0);
+
+ $mode = ($mode == 'smilies') ? 'smilies' : 'icons';
+
+ $this->tpl_name = 'acp_icons';
+
+ // What are we working on?
+ switch ($mode)
+ {
+ case 'smilies':
+ $table = SMILIES_TABLE;
+ $lang = 'SMILIES';
+ $fields = 'smiley';
+ $img_path = $config['smilies_path'];
+ break;
+
+ case 'icons':
+ $table = ICONS_TABLE;
+ $lang = 'ICONS';
+ $fields = 'icons';
+ $img_path = $config['icons_path'];
+ break;
+ }
+
+ $this->page_title = 'ACP_' . $lang;
+
+ // Clear some arrays
+ $_images = $_paks = array();
+ $notice = '';
+
+ // Grab file list of paks and images
+ if ($action == 'edit' || $action == 'add' || $action == 'import')
+ {
+ $imglist = filelist($phpbb_root_path . $img_path, '');
+
+ foreach ($imglist as $path => $img_ary)
+ {
+ if (empty($img_ary))
+ {
+ continue;
+ }
+
+ asort($img_ary, SORT_STRING);
+
+ foreach ($img_ary as $img)
+ {
+ $img_size = getimagesize($phpbb_root_path . $img_path . '/' . $path . $img);
+
+ if (!$img_size[0] || !$img_size[1] || strlen($img) > 255)
+ {
+ continue;
+ }
+
+ // adjust the width and height to be lower than 128px while perserving the aspect ratio
+ if ($img_size[0] > 127 && $img_size[0] > $img_size[1])
+ {
+ $img_size[1] = (int) ($img_size[1] * (127 / $img_size[0]));
+ $img_size[0] = 127;
+ }
+ else if ($img_size[1] > 127)
+ {
+ $img_size[0] = (int) ($img_size[0] * (127 / $img_size[1]));
+ $img_size[1] = 127;
+ }
+
+ $_images[$path . $img]['file'] = $path . $img;
+ $_images[$path . $img]['width'] = $img_size[0];
+ $_images[$path . $img]['height'] = $img_size[1];
+ }
+ }
+ unset($imglist);
+
+ if ($dir = @opendir($phpbb_root_path . $img_path))
+ {
+ while (($file = readdir($dir)) !== false)
+ {
+ if (is_file($phpbb_root_path . $img_path . '/' . $file) && preg_match('#\.pak$#i', $file))
+ {
+ $_paks[] = $file;
+ }
+ }
+ closedir($dir);
+
+ if (!empty($_paks))
+ {
+ asort($_paks, SORT_STRING);
+ }
+ }
+ }
+
+ // What shall we do today? Oops, I believe that's trademarked ...
+ switch ($action)
+ {
+ case 'edit':
+ unset($_images);
+ $_images = array();
+
+ // no break;
+
+ case 'add':
+
+ $smilies = $default_row = array();
+ $smiley_options = $order_list = $add_order_list = '';
+
+ if ($action == 'add' && $mode == 'smilies')
+ {
+ $sql = 'SELECT *
+ FROM ' . SMILIES_TABLE . '
+ ORDER BY smiley_order';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (empty($smilies[$row['smiley_url']]))
+ {
+ $smilies[$row['smiley_url']] = $row;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($smilies))
+ {
+ foreach ($smilies as $row)
+ {
+ $selected = false;
+
+ if (!$smiley_options)
+ {
+ $selected = true;
+ $default_row = $row;
+ }
+ $smiley_options .= '<option value="' . $row['smiley_url'] . '"' . (($selected) ? ' selected="selected"' : '') . '>' . $row['smiley_url'] . '</option>';
+
+ $template->assign_block_vars('smile', array(
+ 'SMILEY_URL' => addslashes($row['smiley_url']),
+ 'CODE' => addslashes($row['code']),
+ 'EMOTION' => addslashes($row['emotion']),
+ 'WIDTH' => $row['smiley_width'],
+ 'HEIGHT' => $row['smiley_height'],
+ 'ORDER' => $row['smiley_order'] + 1,
+ ));
+ }
+ }
+ }
+
+ $sql = "SELECT *
+ FROM $table
+ ORDER BY {$fields}_order " . (($icon_id || $action == 'add') ? 'DESC' : 'ASC');
+ $result = $db->sql_query($sql);
+
+ $data = array();
+ $after = false;
+ $display = 0;
+ $order_lists = array('', '');
+ $add_order_lists = array('', '');
+ $display_count = 0;
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($action == 'add')
+ {
+ unset($_images[$row[$fields . '_url']]);
+ }
+
+
+ if ($row[$fields . '_id'] == $icon_id)
+ {
+ $after = true;
+ $display = $row['display_on_posting'];
+ $data[$row[$fields . '_url']] = $row;
+ }
+ else
+ {
+ if ($action == 'edit' && !$icon_id)
+ {
+ $data[$row[$fields . '_url']] = $row;
+ }
+
+ $selected = '';
+ if (!empty($after))
+ {
+ $selected = ' selected="selected"';
+ $after = false;
+ }
+ if ($row['display_on_posting'])
+ {
+ $display_count++;
+ }
+ $after_txt = ($mode == 'smilies') ? $row['code'] : $row['icons_url'];
+ $order_lists[$row['display_on_posting']] = '<option value="' . ($row[$fields . '_order'] + 1) . '"' . $selected . '>' . sprintf($user->lang['AFTER_' . $lang], ' -&gt; ' . $after_txt) . '</option>' . $order_lists[$row['display_on_posting']];
+
+ if (!empty($default_row))
+ {
+ $add_order_lists[$row['display_on_posting']] = '<option value="' . ($row[$fields . '_order'] + 1) . '"' . (($row[$fields . '_id'] == $default_row['smiley_id']) ? ' selected="selected"' : '') . '>' . sprintf($user->lang['AFTER_' . $lang], ' -&gt; ' . $after_txt) . '</option>' . $add_order_lists[$row['display_on_posting']];
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $order_list = '<option value="1"' . ((!isset($after)) ? ' selected="selected"' : '') . '>' . $user->lang['FIRST'] . '</option>';
+ $add_order_list = '<option value="1">' . $user->lang['FIRST'] . '</option>';
+
+ if ($action == 'add')
+ {
+ $data = $_images;
+ }
+
+ $colspan = (($mode == 'smilies') ? 7 : 5);
+ $colspan += ($icon_id) ? 1 : 0;
+ $colspan += ($action == 'add') ? 2 : 0;
+
+ $template->assign_vars(array(
+ 'S_EDIT' => true,
+ 'S_SMILIES' => ($mode == 'smilies') ? true : false,
+ 'S_ADD' => ($action == 'add') ? true : false,
+
+ 'S_ORDER_LIST_DISPLAY' => $order_list . $order_lists[1],
+ 'S_ORDER_LIST_UNDISPLAY' => $order_list . $order_lists[0],
+ 'S_ORDER_LIST_DISPLAY_COUNT' => $display_count + 1,
+
+ 'L_TITLE' => $user->lang['ACP_' . $lang],
+ 'L_EXPLAIN' => $user->lang['ACP_' . $lang . '_EXPLAIN'],
+ 'L_CONFIG' => $user->lang[$lang . '_CONFIG'],
+ 'L_URL' => $user->lang[$lang . '_URL'],
+ 'L_LOCATION' => $user->lang[$lang . '_LOCATION'],
+ 'L_WIDTH' => $user->lang[$lang . '_WIDTH'],
+ 'L_HEIGHT' => $user->lang[$lang . '_HEIGHT'],
+ 'L_ORDER' => $user->lang[$lang . '_ORDER'],
+ 'L_NO_ICONS' => $user->lang['NO_' . $lang . '_' . strtoupper($action)],
+
+ 'COLSPAN' => $colspan,
+ 'ID' => $icon_id,
+
+ 'U_BACK' => $this->u_action,
+ 'U_ACTION' => $this->u_action . '&amp;action=' . (($action == 'add') ? 'create' : 'modify'),
+ ));
+
+ foreach ($data as $img => $img_row)
+ {
+ $template->assign_block_vars('items', array(
+ 'IMG' => $img,
+ 'A_IMG' => addslashes($img),
+ 'IMG_SRC' => $phpbb_root_path . $img_path . '/' . $img,
+
+ 'CODE' => ($mode == 'smilies' && isset($img_row['code'])) ? $img_row['code'] : '',
+ 'EMOTION' => ($mode == 'smilies' && isset($img_row['emotion'])) ? $img_row['emotion'] : '',
+
+ 'S_ID' => (isset($img_row[$fields . '_id'])) ? true : false,
+ 'ID' => (isset($img_row[$fields . '_id'])) ? $img_row[$fields . '_id'] : 0,
+ 'WIDTH' => (!empty($img_row[$fields .'_width'])) ? $img_row[$fields .'_width'] : $img_row['width'],
+ 'HEIGHT' => (!empty($img_row[$fields .'_height'])) ? $img_row[$fields .'_height'] : $img_row['height'],
+ 'POSTING_CHECKED' => (!empty($img_row['display_on_posting']) || $action == 'add') ? ' checked="checked"' : '',
+ ));
+ }
+
+ // Ok, another row for adding an addition code for a pre-existing image...
+ if ($action == 'add' && $mode == 'smilies' && sizeof($smilies))
+ {
+ $template->assign_vars(array(
+ 'S_ADD_CODE' => true,
+
+ 'S_IMG_OPTIONS' => $smiley_options,
+
+ 'S_ADD_ORDER_LIST_DISPLAY' => $add_order_list . $add_order_lists[1],
+ 'S_ADD_ORDER_LIST_UNDISPLAY' => $add_order_list . $add_order_lists[0],
+
+ 'IMG_SRC' => $phpbb_root_path . $img_path . '/' . $default_row['smiley_url'],
+ 'IMG_PATH' => $img_path,
+ 'PHPBB_ROOT_PATH' => $phpbb_root_path,
+
+ 'CODE' => $default_row['code'],
+ 'EMOTION' => $default_row['emotion'],
+
+ 'WIDTH' => $default_row['smiley_width'],
+ 'HEIGHT' => $default_row['smiley_height'],
+ ));
+ }
+
+ return;
+
+ break;
+
+ case 'create':
+ case 'modify':
+
+ // Get items to create/modify
+ $images = (isset($_POST['image'])) ? array_keys(request_var('image', array('' => 0))) : array();
+
+ // Now really get the items
+ $image_id = (isset($_POST['id'])) ? request_var('id', array('' => 0)) : array();
+ $image_order = (isset($_POST['order'])) ? request_var('order', array('' => 0)) : array();
+ $image_width = (isset($_POST['width'])) ? request_var('width', array('' => 0)) : array();
+ $image_height = (isset($_POST['height'])) ? request_var('height', array('' => 0)) : array();
+ $image_add = (isset($_POST['add_img'])) ? request_var('add_img', array('' => 0)) : array();
+ $image_emotion = utf8_normalize_nfc(request_var('emotion', array('' => ''), true));
+ $image_code = utf8_normalize_nfc(request_var('code', array('' => ''), true));
+ $image_display_on_posting = (isset($_POST['display_on_posting'])) ? request_var('display_on_posting', array('' => 0)) : array();
+
+ // Ok, add the relevant bits if we are adding new codes to existing emoticons...
+ if (!empty($_POST['add_additional_code']))
+ {
+ $add_image = request_var('add_image', '');
+ $add_code = utf8_normalize_nfc(request_var('add_code', '', true));
+ $add_emotion = utf8_normalize_nfc(request_var('add_emotion', '', true));
+
+ if ($add_image && $add_emotion && $add_code)
+ {
+ $images[] = $add_image;
+ $image_add[$add_image] = true;
+
+ $image_code[$add_image] = $add_code;
+ $image_emotion[$add_image] = $add_emotion;
+ $image_width[$add_image] = request_var('add_width', 0);
+ $image_height[$add_image] = request_var('add_height', 0);
+
+ if (!empty($_POST['add_display_on_posting']))
+ {
+ $image_display_on_posting[$add_image] = 1;
+ }
+
+ $image_order[$add_image] = request_var('add_order', 0);
+ }
+ }
+
+ if ($mode == 'smilies' && $action == 'create')
+ {
+ $smiley_count = $this->item_count($table);
+
+ $addable_smileys_count = sizeof($images);
+ foreach ($images as $image)
+ {
+ if (!isset($image_add[$image]))
+ {
+ --$addable_smileys_count;
+ }
+ }
+
+ if ($smiley_count + $addable_smileys_count > SMILEY_LIMIT)
+ {
+ trigger_error(sprintf($user->lang['TOO_MANY_SMILIES'], SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+
+ $icons_updated = 0;
+ $errors = array();
+ foreach ($images as $image)
+ {
+ if ($mode == 'smilies' && ($image_emotion[$image] == '' || $image_code[$image] == ''))
+ {
+ $errors[$image] = 'SMILIE_NO_' . (($image_emotion[$image] == '') ? 'EMOTION' : 'CODE');
+ }
+ else if ($action == 'create' && !isset($image_add[$image]))
+ {
+ // skip images where add wasn't checked
+ }
+ else
+ {
+ if ($image_width[$image] == 0 || $image_height[$image] == 0)
+ {
+ $img_size = getimagesize($phpbb_root_path . $img_path . '/' . $image);
+ $image_width[$image] = $img_size[0];
+ $image_height[$image] = $img_size[1];
+ }
+
+ if ($image_width[$image] > 127 && $image_width[$image] > $image_height[$image])
+ {
+ $image_height[$image] = (int) ($image_height[$image] * (127 / $image_width[$image]));
+ $image_width[$image] = 127;
+ }
+ else if ($image_height[$image] > 127)
+ {
+ $image_width[$image] = (int) ($image_width[$image] * (127 / $image_height[$image]));
+ $image_height[$image] = 127;
+ }
+
+ $img_sql = array(
+ $fields . '_url' => $image,
+ $fields . '_width' => $image_width[$image],
+ $fields . '_height' => $image_height[$image],
+ 'display_on_posting' => (isset($image_display_on_posting[$image])) ? 1 : 0,
+ );
+
+ if ($mode == 'smilies')
+ {
+ $img_sql = array_merge($img_sql, array(
+ 'emotion' => $image_emotion[$image],
+ 'code' => $image_code[$image])
+ );
+ }
+
+ // Image_order holds the 'new' order value
+ if (!empty($image_order[$image]))
+ {
+ $img_sql = array_merge($img_sql, array(
+ $fields . '_order' => $image_order[$image])
+ );
+
+ // Since we always add 'after' an item, we just need to increase all following + the current by one
+ $sql = "UPDATE $table
+ SET {$fields}_order = {$fields}_order + 1
+ WHERE {$fields}_order >= {$image_order[$image]}";
+ $db->sql_query($sql);
+
+ // If we adjust the order, we need to adjust all other orders too - they became inaccurate...
+ foreach ($image_order as $_image => $_order)
+ {
+ if ($_image == $image)
+ {
+ continue;
+ }
+
+ if ($_order >= $image_order[$image])
+ {
+ $image_order[$_image]++;
+ }
+ }
+ }
+
+ if ($action == 'modify' && !empty($image_id[$image]))
+ {
+ $sql = "UPDATE $table
+ SET " . $db->sql_build_array('UPDATE', $img_sql) . "
+ WHERE {$fields}_id = " . $image_id[$image];
+ $db->sql_query($sql);
+ $icons_updated++;
+ }
+ else if ($action !== 'modify')
+ {
+ $sql = "INSERT INTO $table " . $db->sql_build_array('INSERT', $img_sql);
+ $db->sql_query($sql);
+ $icons_updated++;
+ }
+
+ }
+ }
+
+ $cache->destroy('_icons');
+ $cache->destroy('sql', $table);
+
+ $level = E_USER_NOTICE;
+ switch ($icons_updated)
+ {
+ case 0:
+ $suc_lang = "{$lang}_NONE";
+ $level = E_USER_WARNING;
+ break;
+
+ case 1:
+ $suc_lang = "{$lang}_ONE";
+ break;
+
+ default:
+ $suc_lang = $lang;
+ }
+ $errormsgs = '';
+ foreach ($errors as $img => $error)
+ {
+ $errormsgs .= '<br />' . sprintf($user->lang[$error], $img);
+ }
+ if ($action == 'modify')
+ {
+ trigger_error($user->lang[$suc_lang . '_EDITED'] . $errormsgs . adm_back_link($this->u_action), $level);
+ }
+ else
+ {
+ trigger_error($user->lang[$suc_lang . '_ADDED'] . $errormsgs . adm_back_link($this->u_action), $level);
+ }
+
+ break;
+
+ case 'import':
+
+ $pak = request_var('pak', '');
+ $current = request_var('current', '');
+
+ if ($pak != '')
+ {
+ $order = 0;
+
+ if (!($pak_ary = @file($phpbb_root_path . $img_path . '/' . $pak)))
+ {
+ trigger_error($user->lang['PAK_FILE_NOT_READABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // Make sure the pak_ary is valid
+ foreach ($pak_ary as $pak_entry)
+ {
+ if (preg_match_all("#'(.*?)', ?#", $pak_entry, $data))
+ {
+ if ((sizeof($data[1]) != 4 && $mode == 'icons') ||
+ ((sizeof($data[1]) != 6 || (empty($data[1][4]) || empty($data[1][5]))) && $mode == 'smilies' ))
+ {
+ trigger_error($user->lang['WRONG_PAK_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+ else
+ {
+ trigger_error($user->lang['WRONG_PAK_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+
+ // The user has already selected a smilies_pak file
+ if ($current == 'delete')
+ {
+ switch ($db->sql_layer)
+ {
+ case 'sqlite':
+ case 'firebird':
+ $db->sql_query('DELETE FROM ' . $table);
+ break;
+
+ default:
+ $db->sql_query('TRUNCATE TABLE ' . $table);
+ break;
+ }
+
+ switch ($mode)
+ {
+ case 'smilies':
+ break;
+
+ case 'icons':
+ // Reset all icon_ids
+ $db->sql_query('UPDATE ' . TOPICS_TABLE . ' SET icon_id = 0');
+ $db->sql_query('UPDATE ' . POSTS_TABLE . ' SET icon_id = 0');
+ break;
+ }
+ }
+ else
+ {
+ $cur_img = array();
+
+ $field_sql = ($mode == 'smilies') ? 'code' : 'icons_url';
+
+ $sql = "SELECT $field_sql
+ FROM $table";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ ++$order;
+ $cur_img[$row[$field_sql]] = 1;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if ($mode == 'smilies')
+ {
+ $smiley_count = $this->item_count($table);
+ if ($smiley_count + sizeof($pak_ary) > SMILEY_LIMIT)
+ {
+ trigger_error(sprintf($user->lang['TOO_MANY_SMILIES'], SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+
+ foreach ($pak_ary as $pak_entry)
+ {
+ $data = array();
+ if (preg_match_all("#'(.*?)', ?#", $pak_entry, $data))
+ {
+ if ((sizeof($data[1]) != 4 && $mode == 'icons') ||
+ (sizeof($data[1]) != 6 && $mode == 'smilies'))
+ {
+ trigger_error($user->lang['WRONG_PAK_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // Stripslash here because it got addslashed before... (on export)
+ $img = stripslashes($data[1][0]);
+ $width = stripslashes($data[1][1]);
+ $height = stripslashes($data[1][2]);
+ $display_on_posting = stripslashes($data[1][3]);
+
+ if (isset($data[1][4]) && isset($data[1][5]))
+ {
+ $emotion = stripslashes($data[1][4]);
+ $code = stripslashes($data[1][5]);
+ }
+
+ if ($current == 'replace' &&
+ (($mode == 'smilies' && !empty($cur_img[$code])) ||
+ ($mode == 'icons' && !empty($cur_img[$img]))))
+ {
+ $replace_sql = ($mode == 'smilies') ? $code : $img;
+ $sql = array(
+ $fields . '_url' => $img,
+ $fields . '_height' => (int) $height,
+ $fields . '_width' => (int) $width,
+ 'display_on_posting' => (int) $display_on_posting,
+ );
+
+ if ($mode == 'smilies')
+ {
+ $sql = array_merge($sql, array(
+ 'emotion' => $emotion,
+ ));
+ }
+
+ $sql = "UPDATE $table SET " . $db->sql_build_array('UPDATE', $sql) . "
+ WHERE $field_sql = '" . $db->sql_escape($replace_sql) . "'";
+ $db->sql_query($sql);
+ }
+ else
+ {
+ ++$order;
+
+ $sql = array(
+ $fields . '_url' => $img,
+ $fields . '_height' => (int) $height,
+ $fields . '_width' => (int) $width,
+ $fields . '_order' => (int) $order,
+ 'display_on_posting'=> (int) $display_on_posting,
+ );
+
+ if ($mode == 'smilies')
+ {
+ $sql = array_merge($sql, array(
+ 'code' => $code,
+ 'emotion' => $emotion,
+ ));
+ }
+ $db->sql_query("INSERT INTO $table " . $db->sql_build_array('INSERT', $sql));
+ }
+ }
+ }
+
+ $cache->destroy('_icons');
+ $cache->destroy('sql', $table);
+
+ trigger_error($user->lang[$lang . '_IMPORT_SUCCESS'] . adm_back_link($this->u_action));
+ }
+ else
+ {
+ $pak_options = '';
+
+ foreach ($_paks as $pak)
+ {
+ $pak_options .= '<option value="' . $pak . '">' . htmlspecialchars($pak) . '</option>';
+ }
+
+ $template->assign_vars(array(
+ 'S_CHOOSE_PAK' => true,
+ 'S_PAK_OPTIONS' => $pak_options,
+
+ 'L_TITLE' => $user->lang['ACP_' . $lang],
+ 'L_EXPLAIN' => $user->lang['ACP_' . $lang . '_EXPLAIN'],
+ 'L_NO_PAK_OPTIONS' => $user->lang['NO_' . $lang . '_PAK'],
+ 'L_CURRENT' => $user->lang['CURRENT_' . $lang],
+ 'L_CURRENT_EXPLAIN' => $user->lang['CURRENT_' . $lang . '_EXPLAIN'],
+ 'L_IMPORT_SUBMIT' => $user->lang['IMPORT_' . $lang],
+
+ 'U_BACK' => $this->u_action,
+ 'U_ACTION' => $this->u_action . '&amp;action=import',
+ )
+ );
+ }
+ break;
+
+ case 'export':
+
+ $this->page_title = 'EXPORT_' . $lang;
+ $this->tpl_name = 'message_body';
+
+ $template->assign_vars(array(
+ 'MESSAGE_TITLE' => $user->lang['EXPORT_' . $lang],
+ 'MESSAGE_TEXT' => sprintf($user->lang['EXPORT_' . $lang . '_EXPLAIN'], '<a href="' . $this->u_action . '&amp;action=send">', '</a>'),
+
+ 'S_USER_NOTICE' => true,
+ )
+ );
+
+ return;
+
+ break;
+
+ case 'send':
+
+ $sql = "SELECT *
+ FROM $table
+ ORDER BY {$fields}_order";
+ $result = $db->sql_query($sql);
+
+ $pak = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $pak .= "'" . addslashes($row[$fields . '_url']) . "', ";
+ $pak .= "'" . addslashes($row[$fields . '_width']) . "', ";
+ $pak .= "'" . addslashes($row[$fields . '_height']) . "', ";
+ $pak .= "'" . addslashes($row['display_on_posting']) . "', ";
+
+ if ($mode == 'smilies')
+ {
+ $pak .= "'" . addslashes($row['emotion']) . "', ";
+ $pak .= "'" . addslashes($row['code']) . "', ";
+ }
+
+ $pak .= "\n";
+ }
+ $db->sql_freeresult($result);
+
+ if ($pak != '')
+ {
+ garbage_collection();
+
+ header('Pragma: public');
+
+ // Send out the Headers
+ header('Content-Type: text/x-delimtext; name="' . $mode . '.pak"');
+ header('Content-Disposition: inline; filename="' . $mode . '.pak"');
+ echo $pak;
+
+ flush();
+ exit;
+ }
+ else
+ {
+ trigger_error($user->lang['NO_' . strtoupper($fields) . '_EXPORT'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ break;
+
+ case 'delete':
+
+ if (confirm_box(true))
+ {
+ $sql = "DELETE FROM $table
+ WHERE {$fields}_id = $icon_id";
+ $db->sql_query($sql);
+
+ switch ($mode)
+ {
+ case 'smilies':
+ break;
+
+ case 'icons':
+ // Reset appropriate icon_ids
+ $db->sql_query('UPDATE ' . TOPICS_TABLE . "
+ SET icon_id = 0
+ WHERE icon_id = $icon_id");
+
+ $db->sql_query('UPDATE ' . POSTS_TABLE . "
+ SET icon_id = 0
+ WHERE icon_id = $icon_id");
+ break;
+ }
+
+ $notice = $user->lang[$lang . '_DELETED'];
+
+ $cache->destroy('_icons');
+ $cache->destroy('sql', $table);
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'id' => $icon_id,
+ 'action' => 'delete',
+ )));
+ }
+
+ break;
+
+ case 'move_up':
+ case 'move_down':
+
+ // Get current order id...
+ $sql = "SELECT {$fields}_order as current_order
+ FROM $table
+ WHERE {$fields}_id = $icon_id";
+ $result = $db->sql_query($sql);
+ $current_order = (int) $db->sql_fetchfield('current_order');
+ $db->sql_freeresult($result);
+
+ if ($current_order == 0 && $action == 'move_up')
+ {
+ break;
+ }
+
+ // on move_down, switch position with next order_id...
+ // on move_up, switch position with previous order_id...
+ $switch_order_id = ($action == 'move_down') ? $current_order + 1 : $current_order - 1;
+
+ //
+ $sql = "UPDATE $table
+ SET {$fields}_order = $current_order
+ WHERE {$fields}_order = $switch_order_id
+ AND {$fields}_id <> $icon_id";
+ $db->sql_query($sql);
+
+ // Only update the other entry too if the previous entry got updated
+ if ($db->sql_affectedrows())
+ {
+ $sql = "UPDATE $table
+ SET {$fields}_order = $switch_order_id
+ WHERE {$fields}_order = $current_order
+ AND {$fields}_id = $icon_id";
+ $db->sql_query($sql);
+ }
+
+ $cache->destroy('_icons');
+ $cache->destroy('sql', $table);
+
+ break;
+ }
+
+ // By default, check that image_order is valid and fix it if necessary
+ $sql = "SELECT {$fields}_id AS order_id, {$fields}_order AS fields_order
+ FROM $table
+ ORDER BY display_on_posting DESC, {$fields}_order";
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $order = 0;
+ do
+ {
+ ++$order;
+ if ($row['fields_order'] != $order)
+ {
+ $db->sql_query("UPDATE $table
+ SET {$fields}_order = $order
+ WHERE {$fields}_id = " . $row['order_id']);
+ }
+ }
+ while ($row = $db->sql_fetchrow($result));
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'L_TITLE' => $user->lang['ACP_' . $lang],
+ 'L_EXPLAIN' => $user->lang['ACP_' . $lang . '_EXPLAIN'],
+ 'L_IMPORT' => $user->lang['IMPORT_' . $lang],
+ 'L_EXPORT' => $user->lang['EXPORT_' . $lang],
+ 'L_NOT_DISPLAYED' => $user->lang[$lang . '_NOT_DISPLAYED'],
+ 'L_ICON_ADD' => $user->lang['ADD_' . $lang],
+ 'L_ICON_EDIT' => $user->lang['EDIT_' . $lang],
+
+ 'NOTICE' => $notice,
+ 'COLSPAN' => ($mode == 'smilies') ? 5 : 3,
+
+ 'S_SMILIES' => ($mode == 'smilies') ? true : false,
+
+ 'U_ACTION' => $this->u_action,
+ 'U_IMPORT' => $this->u_action . '&amp;action=import',
+ 'U_EXPORT' => $this->u_action . '&amp;action=export',
+ )
+ );
+
+ $spacer = false;
+ $pagination_start = request_var('start', 0);
+
+ $item_count = $this->item_count($table);
+
+ $sql = "SELECT *
+ FROM $table
+ ORDER BY {$fields}_order ASC";
+ $result = $db->sql_query_limit($sql, $config['smilies_per_page'], $pagination_start);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $alt_text = ($mode == 'smilies') ? $row['code'] : '';
+
+ $template->assign_block_vars('items', array(
+ 'S_SPACER' => (!$spacer && !$row['display_on_posting']) ? true : false,
+ 'ALT_TEXT' => $alt_text,
+ 'IMG_SRC' => $phpbb_root_path . $img_path . '/' . $row[$fields . '_url'],
+ 'WIDTH' => $row[$fields . '_width'],
+ 'HEIGHT' => $row[$fields . '_height'],
+ 'CODE' => (isset($row['code'])) ? $row['code'] : '',
+ 'EMOTION' => (isset($row['emotion'])) ? $row['emotion'] : '',
+ 'U_EDIT' => $this->u_action . '&amp;action=edit&amp;id=' . $row[$fields . '_id'],
+ 'U_DELETE' => $this->u_action . '&amp;action=delete&amp;id=' . $row[$fields . '_id'],
+ 'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;id=' . $row[$fields . '_id'] . '&amp;start=' . $pagination_start,
+ 'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;id=' . $row[$fields . '_id'] . '&amp;start=' . $pagination_start,
+ ));
+
+ if (!$spacer && !$row['display_on_posting'])
+ {
+ $spacer = true;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_var('PAGINATION',
+ generate_pagination($this->u_action, $item_count, $config['smilies_per_page'], $pagination_start, true)
+ );
+ }
+
+ /**
+ * Returns the count of smilies or icons in the database
+ *
+ * @param string $table The table of items to count.
+ * @return int number of items
+ */
+ /* private */ function item_count($table)
+ {
+ global $db;
+
+ $sql = "SELECT COUNT(*) AS count
+ FROM $table";
+ $result = $db->sql_query($sql);
+ $item_count = (int) $db->sql_fetchfield('count');
+ $db->sql_freeresult($result);
+ return $item_count;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php
new file mode 100644
index 0000000000..3d0c0a2780
--- /dev/null
+++ b/phpBB/includes/acp/acp_inactive.php
@@ -0,0 +1,306 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_inactive
+{
+ var $u_action;
+ var $p_master;
+
+ function acp_inactive(&$p_master)
+ {
+ $this->p_master = &$p_master;
+ }
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template;
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
+
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ $user->add_lang('memberlist');
+
+ $action = request_var('action', '');
+ $mark = (isset($_REQUEST['mark'])) ? request_var('mark', array(0)) : array();
+ $start = request_var('start', 0);
+ $submit = isset($_POST['submit']);
+
+ // Sort keys
+ $sort_days = request_var('st', 0);
+ $sort_key = request_var('sk', 'i');
+ $sort_dir = request_var('sd', 'd');
+
+ $form_key = 'acp_inactive';
+ add_form_key($form_key);
+
+ // We build the sort key and per page settings here, because they may be needed later
+
+ // Number of entries to display
+ $per_page = request_var('users_per_page', (int) $config['topics_per_page']);
+
+ // Sorting
+ $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_text = array('i' => $user->lang['SORT_INACTIVE'], 'j' => $user->lang['SORT_REG_DATE'], 'l' => $user->lang['SORT_LAST_VISIT'], 'd' => $user->lang['SORT_LAST_REMINDER'], 'r' => $user->lang['SORT_REASON'], 'u' => $user->lang['SORT_USERNAME'], 'p' => $user->lang['SORT_POSTS'], 'e' => $user->lang['SORT_REMINDER']);
+ $sort_by_sql = array('i' => 'user_inactive_time', 'j' => 'user_regdate', 'l' => 'user_lastvisit', 'd' => 'user_reminded_time', 'r' => 'user_inactive_reason', 'u' => 'username_clean', 'p' => 'user_posts', 'e' => 'user_reminded');
+
+ $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
+ gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
+
+ if ($submit && sizeof($mark))
+ {
+ if ($action !== 'delete' && !check_form_key($form_key))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ switch ($action)
+ {
+ case 'activate':
+ case 'delete':
+
+ $sql = 'SELECT user_id, username
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $mark);
+ $result = $db->sql_query($sql);
+
+ $user_affected = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $user_affected[$row['user_id']] = $row['username'];
+ }
+ $db->sql_freeresult($result);
+
+ if ($action == 'activate')
+ {
+ if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
+ {
+ // Get those 'being activated'...
+ $sql = 'SELECT user_id, username, user_email, user_lang
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $mark) . '
+ AND user_type = ' . USER_INACTIVE;
+ $result = $db->sql_query($sql);
+
+ $inactive_users = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $inactive_users[] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ user_active_flip('activate', $mark);
+
+ if ($config['require_activation'] == USER_ACTIVATION_ADMIN && !empty($inactive_users))
+ {
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+
+ $messenger = new messenger(false);
+
+ foreach ($inactive_users as $row)
+ {
+ $messenger->template('admin_welcome_activated', $row['user_lang']);
+
+ $messenger->to($row['user_email'], $row['username']);
+
+ $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
+ $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
+ $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
+ $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
+
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($row['username']))
+ );
+
+ $messenger->send(NOTIFY_EMAIL);
+ }
+
+ $messenger->save_queue();
+ }
+
+ // For activate we really need to redirect, else a refresh can result in users being deactivated again
+ $u_action = $this->u_action . "&amp;$u_sort_param&amp;start=$start";
+ $u_action .= ($per_page != $config['topics_per_page']) ? "&amp;users_per_page=$per_page" : '';
+
+ redirect($u_action);
+ }
+ else if ($action == 'delete')
+ {
+ if (confirm_box(true))
+ {
+ if (!$auth->acl_get('a_userdel'))
+ {
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ foreach ($mark as $user_id)
+ {
+ user_delete('retain', $user_id, $user_affected[$user_id]);
+ }
+
+ add_log('admin', 'LOG_INACTIVE_' . strtoupper($action), implode(', ', $user_affected));
+ }
+ else
+ {
+ $s_hidden_fields = array(
+ 'mode' => $mode,
+ 'action' => $action,
+ 'mark' => $mark,
+ 'submit' => 1,
+ 'start' => $start,
+ );
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($s_hidden_fields));
+ }
+ }
+
+ break;
+
+ case 'remind':
+ if (empty($config['email_enable']))
+ {
+ trigger_error($user->lang['EMAIL_DISABLED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $mark) . '
+ AND user_inactive_reason';
+
+ $sql .= ($config['require_activation'] == USER_ACTIVATION_ADMIN) ? ' = ' . INACTIVE_REMIND : ' <> ' . INACTIVE_MANUAL;
+
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ // Send the messages
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+
+ $messenger = new messenger();
+ $usernames = $user_ids = array();
+
+ do
+ {
+ $messenger->template('user_remind_inactive', $row['user_lang']);
+
+ $messenger->to($row['user_email'], $row['username']);
+ $messenger->im($row['user_jabber'], $row['username']);
+
+ $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
+ $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
+ $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
+ $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
+
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($row['username']),
+ 'REGISTER_DATE' => $user->format_date($row['user_regdate'], false, true),
+ 'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u=" . $row['user_id'] . '&k=' . $row['user_actkey'])
+ );
+
+ $messenger->send($row['user_notify_type']);
+
+ $usernames[] = $row['username'];
+ $user_ids[] = (int) $row['user_id'];
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ $messenger->save_queue();
+
+ // Add the remind state to the database
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_reminded = user_reminded + 1,
+ user_reminded_time = ' . time() . '
+ WHERE ' . $db->sql_in_set('user_id', $user_ids);
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_INACTIVE_REMIND', implode(', ', $usernames));
+ unset($usernames);
+ }
+ $db->sql_freeresult($result);
+
+ // For remind we really need to redirect, else a refresh can result in more than one reminder
+ $u_action = $this->u_action . "&amp;$u_sort_param&amp;start=$start";
+ $u_action .= ($per_page != $config['topics_per_page']) ? "&amp;users_per_page=$per_page" : '';
+
+ redirect($u_action);
+
+ break;
+ }
+ }
+
+ // Define where and sort sql for use in displaying logs
+ $sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0;
+ $sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
+
+ $inactive = array();
+ $inactive_count = 0;
+
+ $start = view_inactive_users($inactive, $inactive_count, $per_page, $start, $sql_where, $sql_sort);
+
+ foreach ($inactive as $row)
+ {
+ $template->assign_block_vars('inactive', array(
+ 'INACTIVE_DATE' => $user->format_date($row['user_inactive_time']),
+ 'REMINDED_DATE' => $user->format_date($row['user_reminded_time']),
+ 'JOINED' => $user->format_date($row['user_regdate']),
+ 'LAST_VISIT' => (!$row['user_lastvisit']) ? ' - ' : $user->format_date($row['user_lastvisit']),
+
+ 'REASON' => $row['inactive_reason'],
+ 'USER_ID' => $row['user_id'],
+ 'POSTS' => ($row['user_posts']) ? $row['user_posts'] : 0,
+ 'REMINDED' => $row['user_reminded'],
+
+ 'REMINDED_EXPLAIN' => $user->lang('USER_LAST_REMINDED', (int) $row['user_reminded'], $user->format_date($row['user_reminded_time'])),
+
+ 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&amp;mode=overview')),
+ 'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USER_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
+
+ 'U_USER_ADMIN' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&amp;mode=overview&amp;u={$row['user_id']}"),
+ 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id={$row['user_id']}&amp;sr=posts") : '',
+ ));
+ }
+
+ $option_ary = array('activate' => 'ACTIVATE', 'delete' => 'DELETE');
+ if ($config['email_enable'])
+ {
+ $option_ary += array('remind' => 'REMIND');
+ }
+
+ $template->assign_vars(array(
+ 'S_INACTIVE_USERS' => true,
+ 'S_INACTIVE_OPTIONS' => build_select($option_ary),
+
+ 'S_LIMIT_DAYS' => $s_limit_days,
+ 'S_SORT_KEY' => $s_sort_key,
+ 'S_SORT_DIR' => $s_sort_dir,
+ 'S_ON_PAGE' => on_page($inactive_count, $per_page, $start),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param&amp;users_per_page=$per_page", $inactive_count, $per_page, $start, true),
+ 'USERS_PER_PAGE' => $per_page,
+
+ 'U_ACTION' => $this->u_action . '&amp;start=' . $start,
+ ));
+
+ $this->tpl_name = 'acp_inactive';
+ $this->page_title = 'ACP_INACTIVE_USERS';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_jabber.php b/phpBB/includes/acp/acp_jabber.php
new file mode 100644
index 0000000000..3ab6eb64ed
--- /dev/null
+++ b/phpBB/includes/acp/acp_jabber.php
@@ -0,0 +1,131 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+* @todo Check/enter/update transport info
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_jabber
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ $user->add_lang('acp/board');
+
+ include_once($phpbb_root_path . 'includes/functions_jabber.' . $phpEx);
+
+ $action = request_var('action', '');
+ $submit = (isset($_POST['submit'])) ? true : false;
+
+ if ($mode != 'settings')
+ {
+ return;
+ }
+
+ $this->tpl_name = 'acp_jabber';
+ $this->page_title = 'ACP_JABBER_SETTINGS';
+
+ $jab_enable = request_var('jab_enable', $config['jab_enable']);
+ $jab_host = request_var('jab_host', $config['jab_host']);
+ $jab_port = request_var('jab_port', $config['jab_port']);
+ $jab_username = request_var('jab_username', $config['jab_username']);
+ $jab_password = request_var('jab_password', $config['jab_password']);
+ $jab_package_size = request_var('jab_package_size', $config['jab_package_size']);
+ $jab_use_ssl = request_var('jab_use_ssl', $config['jab_use_ssl']);
+
+ $form_name = 'acp_jabber';
+ add_form_key($form_name);
+
+ if ($submit)
+ {
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $error = array();
+
+ $message = $user->lang['JAB_SETTINGS_CHANGED'];
+ $log = 'JAB_SETTINGS_CHANGED';
+
+ // Is this feature enabled? Then try to establish a connection
+ if ($jab_enable)
+ {
+ $jabber = new jabber($jab_host, $jab_port, $jab_username, $jab_password, $jab_use_ssl);
+
+ if (!$jabber->connect())
+ {
+ trigger_error($user->lang['ERR_JAB_CONNECT'] . '<br /><br />' . $jabber->get_log() . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // We'll try to authorise using this account
+ if (!$jabber->login())
+ {
+ trigger_error($user->lang['ERR_JAB_AUTH'] . '<br /><br />' . $jabber->get_log() . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $jabber->disconnect();
+ }
+ else
+ {
+ // This feature is disabled.
+ // We update the user table to be sure all users that have IM as notify type are set to both as notify type
+ // We set this to both because users still have their jabber address entered and may want to receive jabber notifications again once it is re-enabled.
+ $sql_ary = array(
+ 'user_notify_type' => NOTIFY_BOTH,
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_notify_type = ' . NOTIFY_IM;
+ $db->sql_query($sql);
+ }
+
+ set_config('jab_enable', $jab_enable);
+ set_config('jab_host', $jab_host);
+ set_config('jab_port', $jab_port);
+ set_config('jab_username', $jab_username);
+ set_config('jab_password', $jab_password);
+ set_config('jab_package_size', $jab_package_size);
+ set_config('jab_use_ssl', $jab_use_ssl);
+
+ add_log('admin', 'LOG_' . $log);
+ trigger_error($message . adm_back_link($this->u_action));
+ }
+
+ $template->assign_vars(array(
+ 'U_ACTION' => $this->u_action,
+ 'JAB_ENABLE' => $jab_enable,
+ 'L_JAB_SERVER_EXPLAIN' => sprintf($user->lang['JAB_SERVER_EXPLAIN'], '<a href="http://www.jabber.org/">', '</a>'),
+ 'JAB_HOST' => $jab_host,
+ 'JAB_PORT' => $jab_port,
+ 'JAB_USERNAME' => $jab_username,
+ 'JAB_PASSWORD' => $jab_password,
+ 'JAB_PACKAGE_SIZE' => $jab_package_size,
+ 'JAB_USE_SSL' => $jab_use_ssl,
+ 'S_CAN_USE_SSL' => jabber::can_use_ssl(),
+ 'S_GTALK_NOTE' => (!@function_exists('dns_get_record')) ? true : false,
+ ));
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php
new file mode 100644
index 0000000000..8ca45a27f6
--- /dev/null
+++ b/phpBB/includes/acp/acp_language.php
@@ -0,0 +1,1453 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_language
+{
+ var $u_action;
+ var $main_files;
+ var $language_header = '';
+ var $lang_header = '';
+
+ var $language_file = '';
+ var $language_directory = '';
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template, $cache;
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
+ global $safe_mode, $file_uploads;
+
+ include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ $this->default_variables();
+
+ // Check and set some common vars
+
+ $action = (isset($_POST['update_details'])) ? 'update_details' : '';
+ $action = (isset($_POST['download_file'])) ? 'download_file' : $action;
+ $action = (isset($_POST['upload_file'])) ? 'upload_file' : $action;
+ $action = (isset($_POST['upload_data'])) ? 'upload_data' : $action;
+ $action = (isset($_POST['submit_file'])) ? 'submit_file' : $action;
+ $action = (isset($_POST['remove_store'])) ? 'details' : $action;
+
+ $submit = (empty($action) && !isset($_POST['update']) && !isset($_POST['test_connection'])) ? false : true;
+ $action = (empty($action)) ? request_var('action', '') : $action;
+
+ $form_name = 'acp_lang';
+ add_form_key('acp_lang');
+
+ $lang_id = request_var('id', 0);
+ if (isset($_POST['missing_file']))
+ {
+ $missing_file = request_var('missing_file', array('' => 0));
+ list($_REQUEST['language_file'], ) = array_keys($missing_file);
+ }
+
+ $selected_lang_file = request_var('language_file', '|common.' . $phpEx);
+
+ list($this->language_directory, $this->language_file) = explode('|', $selected_lang_file);
+
+ $this->language_directory = basename($this->language_directory);
+ $this->language_file = basename($this->language_file);
+
+ $user->add_lang('acp/language');
+ $this->tpl_name = 'acp_language';
+ $this->page_title = 'ACP_LANGUAGE_PACKS';
+
+ if ($submit && $action == 'upload_data' && request_var('test_connection', ''))
+ {
+ $test_connection = false;
+ $action = 'upload_file';
+ $method = request_var('method', '');
+
+ include_once($phpbb_root_path . 'includes/functions_transfer.' . $phpEx);
+
+ switch ($method)
+ {
+ case 'ftp':
+ $transfer = new ftp(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
+ break;
+
+ case 'ftp_fsock':
+ $transfer = new ftp_fsock(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
+ break;
+
+ default:
+ trigger_error($user->lang['INVALID_UPLOAD_METHOD'], E_USER_ERROR);
+ break;
+ }
+
+ $test_connection = $transfer->open_session();
+ $transfer->close_session();
+ }
+
+ switch ($action)
+ {
+ case 'upload_file':
+
+ include_once($phpbb_root_path . 'includes/functions_transfer.' . $phpEx);
+
+ $method = request_var('method', '');
+
+ if (!class_exists($method))
+ {
+ trigger_error('Method does not exist.', E_USER_ERROR);
+ }
+
+ $requested_data = call_user_func(array($method, 'data'));
+ foreach ($requested_data as $data => $default)
+ {
+ $template->assign_block_vars('data', array(
+ 'DATA' => $data,
+ 'NAME' => $user->lang[strtoupper($method . '_' . $data)],
+ 'EXPLAIN' => $user->lang[strtoupper($method . '_' . $data) . '_EXPLAIN'],
+ 'DEFAULT' => (!empty($_REQUEST[$data])) ? request_var($data, '') : $default
+ ));
+ }
+
+ $hidden_data = build_hidden_fields(array(
+ 'file' => $this->language_file,
+ 'dir' => $this->language_directory,
+ 'language_file' => $selected_lang_file,
+ 'method' => $method)
+ );
+
+ $hidden_data .= build_hidden_fields(array('entry' => $_POST['entry']), true, STRIP);
+
+ $template->assign_vars(array(
+ 'S_UPLOAD' => true,
+ 'NAME' => $method,
+ 'U_ACTION' => $this->u_action . "&amp;id=$lang_id&amp;action=upload_data",
+ 'U_BACK' => $this->u_action . "&amp;id=$lang_id&amp;action=details&amp;language_file=" . urlencode($selected_lang_file),
+ 'HIDDEN' => $hidden_data,
+
+ 'S_CONNECTION_SUCCESS' => (request_var('test_connection', '') && $test_connection === true) ? true : false,
+ 'S_CONNECTION_FAILED' => (request_var('test_connection', '') && $test_connection !== true) ? true : false
+ ));
+ break;
+
+ case 'update_details':
+
+ if (!$submit || !check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (!$lang_id)
+ {
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = 'SELECT *
+ FROM ' . LANG_TABLE . "
+ WHERE lang_id = $lang_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $sql_ary = array(
+ 'lang_english_name' => request_var('lang_english_name', $row['lang_english_name']),
+ 'lang_local_name' => utf8_normalize_nfc(request_var('lang_local_name', $row['lang_local_name'], true)),
+ 'lang_author' => utf8_normalize_nfc(request_var('lang_author', $row['lang_author'], true)),
+ );
+
+ $db->sql_query('UPDATE ' . LANG_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE lang_id = ' . $lang_id);
+
+ add_log('admin', 'LOG_LANGUAGE_PACK_UPDATED', $sql_ary['lang_english_name']);
+
+ trigger_error($user->lang['LANGUAGE_DETAILS_UPDATED'] . adm_back_link($this->u_action));
+ break;
+
+ case 'submit_file':
+ case 'download_file':
+ case 'upload_data':
+
+ if (!$submit || !check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (!$lang_id || empty($_POST['entry']))
+ {
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if ($this->language_directory != 'email' && !is_array($_POST['entry']))
+ {
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (!$this->language_file || (!$this->language_directory && !in_array($this->language_file, $this->main_files)))
+ {
+ trigger_error($user->lang['NO_FILE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = 'SELECT *
+ FROM ' . LANG_TABLE . "
+ WHERE lang_id = $lang_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // Before we attempt to write anything let's check if the admin really chose a correct filename
+ switch ($this->language_directory)
+ {
+ case 'email':
+ // Get email templates
+ $email_files = filelist($phpbb_root_path . 'language/' . $row['lang_iso'], 'email', 'txt');
+ $email_files = $email_files['email/'];
+
+ if (!in_array($this->language_file, $email_files))
+ {
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id), E_USER_WARNING);
+ }
+ break;
+
+ case 'acp':
+ // Get acp files
+ $acp_files = filelist($phpbb_root_path . 'language/' . $row['lang_iso'], 'acp', $phpEx);
+ $acp_files = $acp_files['acp/'];
+
+ if (!in_array($this->language_file, $acp_files))
+ {
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id), E_USER_WARNING);
+ }
+ break;
+
+ case 'mods':
+ // Get mod files
+ $mods_files = filelist($phpbb_root_path . 'language/' . $row['lang_iso'], 'mods', $phpEx);
+ $mods_files = (isset($mods_files['mods/'])) ? $mods_files['mods/'] : array();
+
+ if (!in_array($this->language_file, $mods_files))
+ {
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id), E_USER_WARNING);
+ }
+ break;
+
+ default:
+ if (!in_array($this->language_file, $this->main_files))
+ {
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id), E_USER_WARNING);
+ }
+ break;
+ }
+
+ if (!$safe_mode)
+ {
+ $mkdir_ary = array('language', 'language/' . $row['lang_iso']);
+
+ if ($this->language_directory)
+ {
+ $mkdir_ary[] = 'language/' . $row['lang_iso'] . '/' . $this->language_directory;
+ }
+
+ foreach ($mkdir_ary as $dir)
+ {
+ $dir = $phpbb_root_path . 'store/' . $dir;
+
+ if (!is_dir($dir))
+ {
+ if (!@mkdir($dir, 0777))
+ {
+ trigger_error("Could not create directory $dir", E_USER_ERROR);
+ }
+ @chmod($dir, 0777);
+ }
+ }
+ }
+
+ // Get target filename for storage folder
+ $filename = $this->get_filename($row['lang_iso'], $this->language_directory, $this->language_file, true, true);
+ $fp = @fopen($phpbb_root_path . $filename, 'wb');
+
+ if (!$fp)
+ {
+ trigger_error(sprintf($user->lang['UNABLE_TO_WRITE_FILE'], $filename) . adm_back_link($this->u_action . '&amp;id=' . $lang_id . '&amp;action=details&amp;language_file=' . urlencode($selected_lang_file)), E_USER_WARNING);
+ }
+
+ if ($this->language_directory == 'email')
+ {
+ // Email Template
+ $entry = $this->prepare_lang_entry($_POST['entry'], false);
+ fwrite($fp, $entry);
+ }
+ else
+ {
+ $name = (($this->language_directory) ? $this->language_directory . '_' : '') . $this->language_file;
+ $header = str_replace(array('{FILENAME}', '{LANG_NAME}', '{CHANGED}', '{AUTHOR}'), array($name, $row['lang_english_name'], date('Y-m-d', time()), $row['lang_author']), $this->language_file_header);
+
+ if (strpos($this->language_file, 'help_') === 0)
+ {
+ // Help File
+ $header .= '$help = array(' . "\n";
+ fwrite($fp, $header);
+
+ foreach ($_POST['entry'] as $key => $value)
+ {
+ if (!is_array($value))
+ {
+ continue;
+ }
+
+ $entry = "\tarray(\n";
+
+ foreach ($value as $_key => $_value)
+ {
+ $entry .= "\t\t" . (int) $_key . "\t=> '" . $this->prepare_lang_entry($_value) . "',\n";
+ }
+
+ $entry .= "\t),\n";
+ fwrite($fp, $entry);
+ }
+
+ $footer = ");\n\n?>";
+ fwrite($fp, $footer);
+ }
+ else
+ {
+ // Language File
+ $header .= $this->lang_header;
+ fwrite($fp, $header);
+
+ foreach ($_POST['entry'] as $key => $value)
+ {
+ $entry = $this->format_lang_array($key, $value);
+ fwrite($fp, $entry);
+ }
+
+ $footer = "));\n\n?>";
+ fwrite($fp, $footer);
+ }
+ }
+
+ fclose($fp);
+
+ if ($action == 'download_file')
+ {
+ header('Pragma: no-cache');
+ header('Content-Type: application/octetstream; name="' . $this->language_file . '"');
+ header('Content-disposition: attachment; filename=' . $this->language_file);
+
+ $fp = @fopen($phpbb_root_path . $filename, 'rb');
+ while ($buffer = fread($fp, 1024))
+ {
+ echo $buffer;
+ }
+ fclose($fp);
+
+ add_log('admin', 'LOG_LANGUAGE_FILE_SUBMITTED', $this->language_file);
+
+ exit;
+ }
+ else if ($action == 'upload_data')
+ {
+ $sql = 'SELECT lang_iso
+ FROM ' . LANG_TABLE . "
+ WHERE lang_id = $lang_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $file = request_var('file', '');
+ $dir = request_var('dir', '');
+
+ $selected_lang_file = $dir . '|' . $file;
+
+ $old_file = '/' . $this->get_filename($row['lang_iso'], $dir, $file, false, true);
+ $lang_path = 'language/' . $row['lang_iso'] . '/' . (($dir) ? $dir . '/' : '');
+
+ include_once($phpbb_root_path . 'includes/functions_transfer.' . $phpEx);
+ $method = request_var('method', '');
+
+ if ($method != 'ftp' && $method != 'ftp_fsock')
+ {
+ trigger_error($user->lang['INVALID_UPLOAD_METHOD'], E_USER_ERROR);
+ }
+
+ $transfer = new $method(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
+
+ if (($result = $transfer->open_session()) !== true)
+ {
+ trigger_error($user->lang[$result] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id . '&amp;language_file=' . urlencode($selected_lang_file)), E_USER_WARNING);
+ }
+
+ $transfer->rename($lang_path . $file, $lang_path . $file . '.bak');
+ $result = $transfer->copy_file('store/' . $lang_path . $file, $lang_path . $file);
+
+ if ($result === false)
+ {
+ // If failed, try to rename again and print error out...
+ $transfer->delete_file($lang_path . $file);
+ $transfer->rename($lang_path . $file . '.bak', $lang_path . $file);
+
+ trigger_error($user->lang['UPLOAD_FAILED'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id . '&amp;language_file=' . urlencode($selected_lang_file)), E_USER_WARNING);
+ }
+
+ $transfer->close_session();
+
+ // Remove from storage folder
+ if (file_exists($phpbb_root_path . 'store/' . $lang_path . $file))
+ {
+ @unlink($phpbb_root_path . 'store/' . $lang_path . $file);
+ }
+
+ add_log('admin', 'LOG_LANGUAGE_FILE_REPLACED', $file);
+
+ trigger_error($user->lang['UPLOAD_COMPLETED'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id . '&amp;language_file=' . urlencode($selected_lang_file)));
+ }
+
+ add_log('admin', 'LOG_LANGUAGE_FILE_SUBMITTED', $this->language_file);
+ $action = 'details';
+
+ // no break;
+
+ case 'details':
+
+ if (!$lang_id)
+ {
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $this->page_title = 'LANGUAGE_PACK_DETAILS';
+
+ $sql = 'SELECT *
+ FROM ' . LANG_TABLE . '
+ WHERE lang_id = ' . $lang_id;
+ $result = $db->sql_query($sql);
+ $lang_entries = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $lang_iso = $lang_entries['lang_iso'];
+ $missing_vars = $missing_files = array();
+
+ // Get email templates
+ $email_files = filelist($phpbb_root_path . 'language/' . $config['default_lang'], 'email', 'txt');
+ $email_files = $email_files['email/'];
+
+ // Get acp files
+ $acp_files = filelist($phpbb_root_path . 'language/' . $config['default_lang'], 'acp', $phpEx);
+ $acp_files = $acp_files['acp/'];
+
+ // Get mod files
+ $mods_files = filelist($phpbb_root_path . 'language/' . $config['default_lang'], 'mods', $phpEx);
+ $mods_files = (isset($mods_files['mods/'])) ? $mods_files['mods/'] : array();
+
+ // Check if our current filename matches the files
+ switch ($this->language_directory)
+ {
+ case 'email':
+ if (!in_array($this->language_file, $email_files))
+ {
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id), E_USER_WARNING);
+ }
+ break;
+
+ case 'acp':
+ if (!in_array($this->language_file, $acp_files))
+ {
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id), E_USER_WARNING);
+ }
+ break;
+
+ case 'mods':
+ if (!in_array($this->language_file, $mods_files))
+ {
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id), E_USER_WARNING);
+ }
+ break;
+
+ default:
+ if (!in_array($this->language_file, $this->main_files))
+ {
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id), E_USER_WARNING);
+ }
+ }
+
+ if (isset($_POST['remove_store']))
+ {
+ $store_filename = $this->get_filename($lang_iso, $this->language_directory, $this->language_file, true, true);
+
+ if (file_exists($phpbb_root_path . $store_filename))
+ {
+ @unlink($phpbb_root_path . $store_filename);
+ }
+ }
+
+ include_once($phpbb_root_path . 'includes/functions_transfer.' . $phpEx);
+
+ $methods = transfer::methods();
+
+ foreach ($methods as $method)
+ {
+ $template->assign_block_vars('buttons', array(
+ 'VALUE' => $method
+ ));
+ }
+
+ $template->assign_vars(array(
+ 'S_DETAILS' => true,
+ 'U_ACTION' => $this->u_action . "&amp;action=details&amp;id=$lang_id",
+ 'U_BACK' => $this->u_action,
+ 'LANG_LOCAL_NAME' => $lang_entries['lang_local_name'],
+ 'LANG_ENGLISH_NAME' => $lang_entries['lang_english_name'],
+ 'LANG_ISO' => $lang_entries['lang_iso'],
+ 'LANG_AUTHOR' => $lang_entries['lang_author'],
+ 'ALLOW_UPLOAD' => sizeof($methods)
+ )
+ );
+
+ // If current lang is different from the default lang, then first try to grab missing/additional vars
+ if ($lang_iso != $config['default_lang'])
+ {
+ $is_missing_var = false;
+
+ foreach ($this->main_files as $file)
+ {
+ if (file_exists($phpbb_root_path . $this->get_filename($lang_iso, '', $file)))
+ {
+ $missing_vars[$file] = $this->compare_language_files($config['default_lang'], $lang_iso, '', $file);
+
+ if (sizeof($missing_vars[$file]))
+ {
+ $is_missing_var = true;
+ }
+ }
+ else
+ {
+ $missing_files[] = $this->get_filename($lang_iso, '', $file);
+ }
+ }
+
+ // Now go through acp/mods directories
+ foreach ($acp_files as $file)
+ {
+ if (file_exists($phpbb_root_path . $this->get_filename($lang_iso, 'acp', $file)))
+ {
+ $missing_vars['acp/' . $file] = $this->compare_language_files($config['default_lang'], $lang_iso, 'acp', $file);
+
+ if (sizeof($missing_vars['acp/' . $file]))
+ {
+ $is_missing_var = true;
+ }
+ }
+ else
+ {
+ $missing_files[] = $this->get_filename($lang_iso, 'acp', $file);
+ }
+ }
+
+ if (sizeof($mods_files))
+ {
+ foreach ($mods_files as $file)
+ {
+ if (file_exists($phpbb_root_path . $this->get_filename($lang_iso, 'mods', $file)))
+ {
+ $missing_vars['mods/' . $file] = $this->compare_language_files($config['default_lang'], $lang_iso, 'mods', $file);
+
+ if (sizeof($missing_vars['mods/' . $file]))
+ {
+ $is_missing_var = true;
+ }
+ }
+ else
+ {
+ $missing_files[] = $this->get_filename($lang_iso, 'mods', $file);
+ }
+ }
+ }
+
+ // More missing files... for example email templates?
+ foreach ($email_files as $file)
+ {
+ if (!file_exists($phpbb_root_path . $this->get_filename($lang_iso, 'email', $file)))
+ {
+ $missing_files[] = $this->get_filename($lang_iso, 'email', $file);
+ }
+ }
+
+ if (sizeof($missing_files))
+ {
+ $template->assign_vars(array(
+ 'S_MISSING_FILES' => true,
+ 'L_MISSING_FILES' => sprintf($user->lang['THOSE_MISSING_LANG_FILES'], $lang_entries['lang_local_name']),
+ 'MISSING_FILES' => implode('<br />', $missing_files))
+ );
+ }
+
+ if ($is_missing_var)
+ {
+ $template->assign_vars(array(
+ 'S_MISSING_VARS' => true,
+ 'L_MISSING_VARS_EXPLAIN' => sprintf($user->lang['THOSE_MISSING_LANG_VARIABLES'], $lang_entries['lang_local_name']),
+ 'U_MISSING_ACTION' => $this->u_action . "&amp;action=$action&amp;id=$lang_id")
+ );
+
+ foreach ($missing_vars as $file => $vars)
+ {
+ if (!sizeof($vars))
+ {
+ continue;
+ }
+
+ $template->assign_block_vars('missing', array(
+ 'FILE' => $file,
+ 'TPL' => $this->print_language_entries($vars, '', false),
+ 'KEY' => (strpos($file, '/') === false) ? '|' . $file : str_replace('/', '|', $file))
+ );
+ }
+ }
+ }
+
+ // Main language files
+ $s_lang_options = '<option value="|common.' . $phpEx . '" class="sep">' . $user->lang['LANGUAGE_FILES'] . '</option>';
+ foreach ($this->main_files as $file)
+ {
+ if (strpos($file, 'help_') === 0)
+ {
+ continue;
+ }
+
+ $prefix = (file_exists($phpbb_root_path . $this->get_filename($lang_iso, '', $file, true, true))) ? '* ' : '';
+
+ $selected = (!$this->language_directory && $this->language_file == $file) ? ' selected="selected"' : '';
+ $s_lang_options .= '<option value="|' . $file . '"' . $selected . '>' . $prefix . $file . '</option>';
+ }
+
+ // Help Files
+ $s_lang_options .= '<option value="|common.' . $phpEx . '" class="sep">' . $user->lang['HELP_FILES'] . '</option>';
+ foreach ($this->main_files as $file)
+ {
+ if (strpos($file, 'help_') !== 0)
+ {
+ continue;
+ }
+
+ $prefix = (file_exists($phpbb_root_path . $this->get_filename($lang_iso, '', $file, true, true))) ? '* ' : '';
+
+ $selected = (!$this->language_directory && $this->language_file == $file) ? ' selected="selected"' : '';
+ $s_lang_options .= '<option value="|' . $file . '"' . $selected . '>' . $prefix . $file . '</option>';
+ }
+
+ // Now every other language directory
+ $check_files = array('email', 'acp', 'mods');
+
+ foreach ($check_files as $check)
+ {
+ if (!sizeof(${$check . '_files'}))
+ {
+ continue;
+ }
+
+ $s_lang_options .= '<option value="|common.' . $phpEx . '" class="sep">' . $user->lang[strtoupper($check) . '_FILES'] . '</option>';
+
+ foreach (${$check . '_files'} as $file)
+ {
+ $prefix = (file_exists($phpbb_root_path . $this->get_filename($lang_iso, $check, $file, true, true))) ? '* ' : '';
+
+ $selected = ($this->language_directory == $check && $this->language_file == $file) ? ' selected="selected"' : '';
+ $s_lang_options .= '<option value="' . $check . '|' . $file . '"' . $selected . '>' . $prefix . $file . '</option>';
+ }
+ }
+
+ // Get Language Entries - if saved within store folder, we take this one (with the option to remove it)
+ $lang = array();
+
+ $is_email_file = ($this->language_directory == 'email') ? true : false;
+ $is_help_file = (strpos($this->language_file, 'help_') === 0) ? true : false;
+
+ $file_from_store = (file_exists($phpbb_root_path . $this->get_filename($lang_iso, $this->language_directory, $this->language_file, true, true))) ? true : false;
+ $no_store_filename = $this->get_filename($lang_iso, $this->language_directory, $this->language_file);
+
+ if (!$file_from_store && !file_exists($phpbb_root_path . $no_store_filename))
+ {
+ $print_message = sprintf($user->lang['MISSING_LANGUAGE_FILE'], $no_store_filename);
+ }
+ else
+ {
+ if ($is_email_file)
+ {
+ $lang = file_get_contents($phpbb_root_path . $this->get_filename($lang_iso, $this->language_directory, $this->language_file, $file_from_store));
+ }
+ else
+ {
+ $help = array();
+ include($phpbb_root_path . $this->get_filename($lang_iso, $this->language_directory, $this->language_file, $file_from_store));
+
+ if ($is_help_file)
+ {
+ $lang = $help;
+ unset($help);
+ }
+ }
+
+ $print_message = (($this->language_directory) ? $this->language_directory . '/' : '') . $this->language_file;
+ }
+
+ // Normal language pack entries
+ $template->assign_vars(array(
+ 'U_ENTRY_ACTION' => $this->u_action . "&amp;action=details&amp;id=$lang_id#entries",
+ 'S_EMAIL_FILE' => $is_email_file,
+ 'S_FROM_STORE' => $file_from_store,
+ 'S_LANG_OPTIONS' => $s_lang_options,
+ 'PRINT_MESSAGE' => $print_message,
+ )
+ );
+
+ if (!$is_email_file)
+ {
+ $tpl = '';
+ $name = (($this->language_directory) ? $this->language_directory . '/' : '') . $this->language_file;
+
+ if (isset($missing_vars[$name]) && sizeof($missing_vars[$name]))
+ {
+ $tpl .= $this->print_language_entries($missing_vars[$name], '* ');
+ }
+
+ $tpl .= $this->print_language_entries($lang);
+
+ $template->assign_var('TPL', $tpl);
+ unset($tpl);
+ }
+ else
+ {
+ $template->assign_vars(array(
+ 'LANG' => $lang)
+ );
+
+ unset($lang);
+ }
+
+ return;
+
+ break;
+
+ case 'delete':
+
+ if (!$lang_id)
+ {
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = 'SELECT *
+ FROM ' . LANG_TABLE . '
+ WHERE lang_id = ' . $lang_id;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row['lang_iso'] == $config['default_lang'])
+ {
+ trigger_error($user->lang['NO_REMOVE_DEFAULT_LANG'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (confirm_box(true))
+ {
+ $db->sql_query('DELETE FROM ' . LANG_TABLE . ' WHERE lang_id = ' . $lang_id);
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_lang = '" . $db->sql_escape($config['default_lang']) . "'
+ WHERE user_lang = '" . $db->sql_escape($row['lang_iso']) . "'";
+ $db->sql_query($sql);
+
+ // We also need to remove the translated entries for custom profile fields - we want clean tables, don't we?
+ $sql = 'DELETE FROM ' . PROFILE_LANG_TABLE . ' WHERE lang_id = ' . $lang_id;
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . ' WHERE lang_id = ' . $lang_id;
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . STYLES_IMAGESET_DATA_TABLE . " WHERE image_lang = '" . $db->sql_escape($row['lang_iso']) . "'";
+ $result = $db->sql_query($sql);
+
+ $cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE);
+
+ add_log('admin', 'LOG_LANGUAGE_PACK_DELETED', $row['lang_english_name']);
+
+ trigger_error(sprintf($user->lang['LANGUAGE_PACK_DELETED'], $row['lang_english_name']) . adm_back_link($this->u_action));
+ }
+ else
+ {
+ $s_hidden_fields = array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ 'id' => $lang_id,
+ );
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($s_hidden_fields));
+ }
+ break;
+
+ case 'install':
+ $lang_iso = request_var('iso', '');
+ $lang_iso = basename($lang_iso);
+
+ if (!$lang_iso || !file_exists("{$phpbb_root_path}language/$lang_iso/iso.txt"))
+ {
+ trigger_error($user->lang['LANGUAGE_PACK_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $file = file("{$phpbb_root_path}language/$lang_iso/iso.txt");
+
+ $lang_pack = array(
+ 'iso' => $lang_iso,
+ 'name' => trim(htmlspecialchars($file[0])),
+ 'local_name'=> trim(htmlspecialchars($file[1], ENT_COMPAT, 'UTF-8')),
+ 'author' => trim(htmlspecialchars($file[2], ENT_COMPAT, 'UTF-8'))
+ );
+ unset($file);
+
+ $sql = 'SELECT lang_iso
+ FROM ' . LANG_TABLE . "
+ WHERE lang_iso = '" . $db->sql_escape($lang_iso) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ trigger_error($user->lang['LANGUAGE_PACK_ALREADY_INSTALLED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (!$lang_pack['name'] || !$lang_pack['local_name'])
+ {
+ trigger_error($user->lang['INVALID_LANGUAGE_PACK'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // Add language pack
+ $sql_ary = array(
+ 'lang_iso' => $lang_pack['iso'],
+ 'lang_dir' => $lang_pack['iso'],
+ 'lang_english_name' => $lang_pack['name'],
+ 'lang_local_name' => $lang_pack['local_name'],
+ 'lang_author' => $lang_pack['author']
+ );
+
+ $db->sql_query('INSERT INTO ' . LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+ $lang_id = $db->sql_nextid();
+
+ $valid_localized = array(
+ 'icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply',
+ );
+
+ $sql_ary = array();
+
+ $sql = 'SELECT *
+ FROM ' . STYLES_IMAGESET_TABLE;
+ $result = $db->sql_query($sql);
+ while ($imageset_row = $db->sql_fetchrow($result))
+ {
+ if (@file_exists("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$lang_pack['iso']}/imageset.cfg"))
+ {
+ $cfg_data_imageset_data = parse_cfg_file("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$lang_pack['iso']}/imageset.cfg");
+ foreach ($cfg_data_imageset_data as $image_name => $value)
+ {
+ if (strpos($value, '*') !== false)
+ {
+ if (substr($value, -1, 1) === '*')
+ {
+ list($image_filename, $image_height) = explode('*', $value);
+ $image_width = 0;
+ }
+ else
+ {
+ list($image_filename, $image_height, $image_width) = explode('*', $value);
+ }
+ }
+ else
+ {
+ $image_filename = $value;
+ $image_height = $image_width = 0;
+ }
+
+ if (strpos($image_name, 'img_') === 0 && $image_filename)
+ {
+ $image_name = substr($image_name, 4);
+ if (in_array($image_name, $valid_localized))
+ {
+ $sql_ary[] = array(
+ 'image_name' => (string) $image_name,
+ 'image_filename' => (string) $image_filename,
+ 'image_height' => (int) $image_height,
+ 'image_width' => (int) $image_width,
+ 'imageset_id' => (int) $imageset_row['imageset_id'],
+ 'image_lang' => (string) $lang_pack['iso'],
+ );
+ }
+ }
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($sql_ary))
+ {
+ $db->sql_multi_insert(STYLES_IMAGESET_DATA_TABLE, $sql_ary);
+ $cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE);
+ }
+
+ // Now let's copy the default language entries for custom profile fields for this new language - makes admin's life easier.
+ $sql = 'SELECT lang_id
+ FROM ' . LANG_TABLE . "
+ WHERE lang_iso = '" . $db->sql_escape($config['default_lang']) . "'";
+ $result = $db->sql_query($sql);
+ $default_lang_id = (int) $db->sql_fetchfield('lang_id');
+ $db->sql_freeresult($result);
+
+ // From the mysql documentation:
+ // Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14.
+ // Due to this we stay on the safe side if we do the insertion "the manual way"
+
+ $sql = 'SELECT field_id, lang_name, lang_explain, lang_default_value
+ FROM ' . PROFILE_LANG_TABLE . '
+ WHERE lang_id = ' . $default_lang_id;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $row['lang_id'] = $lang_id;
+ $db->sql_query('INSERT INTO ' . PROFILE_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $row));
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT field_id, option_id, field_type, lang_value
+ FROM ' . PROFILE_FIELDS_LANG_TABLE . '
+ WHERE lang_id = ' . $default_lang_id;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $row['lang_id'] = $lang_id;
+ $db->sql_query('INSERT INTO ' . PROFILE_FIELDS_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $row));
+ }
+ $db->sql_freeresult($result);
+
+ add_log('admin', 'LOG_LANGUAGE_PACK_INSTALLED', $lang_pack['name']);
+
+ trigger_error(sprintf($user->lang['LANGUAGE_PACK_INSTALLED'], $lang_pack['name']) . adm_back_link($this->u_action));
+
+ break;
+
+ case 'download':
+
+ if (!$lang_id)
+ {
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = 'SELECT *
+ FROM ' . LANG_TABLE . '
+ WHERE lang_id = ' . $lang_id;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $use_method = request_var('use_method', '');
+ $methods = array('.tar');
+
+ $available_methods = array('.tar.gz' => 'zlib', '.tar.bz2' => 'bz2', '.zip' => 'zlib');
+ foreach ($available_methods as $type => $module)
+ {
+ if (!@extension_loaded($module))
+ {
+ continue;
+ }
+
+ $methods[] = $type;
+ }
+
+ // Let the user decide in which format he wants to have the pack
+ if (!$use_method)
+ {
+ $this->page_title = 'SELECT_DOWNLOAD_FORMAT';
+
+ $radio_buttons = '';
+ foreach ($methods as $method)
+ {
+ $radio_buttons .= '<label><input type="radio"' . ((!$radio_buttons) ? ' id="use_method"' : '') . ' class="radio" value="' . $method . '" name="use_method" /> ' . $method . '</label>';
+ }
+
+ $template->assign_vars(array(
+ 'S_SELECT_METHOD' => true,
+ 'U_BACK' => $this->u_action,
+ 'U_ACTION' => $this->u_action . "&amp;action=$action&amp;id=$lang_id",
+ 'RADIO_BUTTONS' => $radio_buttons)
+ );
+
+ return;
+ }
+
+ if (!in_array($use_method, $methods))
+ {
+ $use_method = '.tar';
+ }
+
+ include_once($phpbb_root_path . 'includes/functions_compress.' . $phpEx);
+
+ if ($use_method == '.zip')
+ {
+ $compress = new compress_zip('w', $phpbb_root_path . 'store/lang_' . $row['lang_iso'] . $use_method);
+ }
+ else
+ {
+ $compress = new compress_tar('w', $phpbb_root_path . 'store/lang_' . $row['lang_iso'] . $use_method, $use_method);
+ }
+
+ // Get email templates
+ $email_templates = filelist($phpbb_root_path . 'language/' . $row['lang_iso'], 'email', 'txt');
+ $email_templates = $email_templates['email/'];
+
+ // Get acp files
+ $acp_files = filelist($phpbb_root_path . 'language/' . $row['lang_iso'], 'acp', $phpEx);
+ $acp_files = $acp_files['acp/'];
+
+ // Get mod files
+ $mod_files = filelist($phpbb_root_path . 'language/' . $row['lang_iso'], 'mods', $phpEx);
+ $mod_files = (isset($mod_files['mods/'])) ? $mod_files['mods/'] : array();
+
+ // Add main files
+ $this->add_to_archive($compress, $this->main_files, $row['lang_iso']);
+
+ // Add search files if they exist...
+ if (file_exists($phpbb_root_path . 'language/' . $row['lang_iso'] . '/search_ignore_words.' . $phpEx))
+ {
+ $this->add_to_archive($compress, array("search_ignore_words.$phpEx"), $row['lang_iso']);
+ }
+
+ if (file_exists($phpbb_root_path . 'language/' . $row['lang_iso'] . '/search_synonyms.' . $phpEx))
+ {
+ $this->add_to_archive($compress, array("search_synonyms.$phpEx"), $row['lang_iso']);
+ }
+
+ // Write files in folders
+ $this->add_to_archive($compress, $email_templates, $row['lang_iso'], 'email');
+ $this->add_to_archive($compress, $acp_files, $row['lang_iso'], 'acp');
+ $this->add_to_archive($compress, $mod_files, $row['lang_iso'], 'mods');
+
+ // Write ISO File
+ $iso_src = htmlspecialchars_decode($row['lang_english_name']) . "\n";
+ $iso_src .= htmlspecialchars_decode($row['lang_local_name']) . "\n";
+ $iso_src .= htmlspecialchars_decode($row['lang_author']);
+ $compress->add_data($iso_src, 'language/' . $row['lang_iso'] . '/iso.txt');
+
+ // index.html files
+ $compress->add_data('', 'language/' . $row['lang_iso'] . '/index.html');
+ $compress->add_data('', 'language/' . $row['lang_iso'] . '/email/index.html');
+ $compress->add_data('', 'language/' . $row['lang_iso'] . '/acp/index.html');
+
+ if (sizeof($mod_files))
+ {
+ $compress->add_data('', 'language/' . $row['lang_iso'] . '/mods/index.html');
+ }
+
+ $compress->close();
+
+ $compress->download('lang_' . $row['lang_iso']);
+ @unlink($phpbb_root_path . 'store/lang_' . $row['lang_iso'] . $use_method);
+
+ exit;
+
+ break;
+ }
+
+ $sql = 'SELECT user_lang, COUNT(user_lang) AS lang_count
+ FROM ' . USERS_TABLE . '
+ GROUP BY user_lang';
+ $result = $db->sql_query($sql);
+
+ $lang_count = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $lang_count[$row['user_lang']] = $row['lang_count'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT *
+ FROM ' . LANG_TABLE . '
+ ORDER BY lang_english_name';
+ $result = $db->sql_query($sql);
+
+ $installed = array();
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $installed[] = $row['lang_iso'];
+ $tagstyle = ($row['lang_iso'] == $config['default_lang']) ? '*' : '';
+
+ $template->assign_block_vars('lang', array(
+ 'U_DETAILS' => $this->u_action . "&amp;action=details&amp;id={$row['lang_id']}",
+ 'U_DOWNLOAD' => $this->u_action . "&amp;action=download&amp;id={$row['lang_id']}",
+ 'U_DELETE' => $this->u_action . "&amp;action=delete&amp;id={$row['lang_id']}",
+
+ 'ENGLISH_NAME' => $row['lang_english_name'],
+ 'TAG' => $tagstyle,
+ 'LOCAL_NAME' => $row['lang_local_name'],
+ 'ISO' => $row['lang_iso'],
+ 'USED_BY' => (isset($lang_count[$row['lang_iso']])) ? $lang_count[$row['lang_iso']] : 0,
+ ));
+ }
+ $db->sql_freeresult($result);
+
+ $new_ary = $iso = array();
+ $dp = @opendir("{$phpbb_root_path}language");
+
+ if ($dp)
+ {
+ while (($file = readdir($dp)) !== false)
+ {
+ if ($file[0] != '.' && file_exists("{$phpbb_root_path}language/$file/iso.txt"))
+ {
+ if (!in_array($file, $installed))
+ {
+ if ($iso = file("{$phpbb_root_path}language/$file/iso.txt"))
+ {
+ if (sizeof($iso) == 3)
+ {
+ $new_ary[$file] = array(
+ 'iso' => $file,
+ 'name' => trim($iso[0]),
+ 'local_name'=> trim($iso[1]),
+ 'author' => trim($iso[2])
+ );
+ }
+ }
+ }
+ }
+ }
+ closedir($dp);
+ }
+
+ unset($installed);
+
+ if (sizeof($new_ary))
+ {
+ foreach ($new_ary as $iso => $lang_ary)
+ {
+ $template->assign_block_vars('notinst', array(
+ 'ISO' => htmlspecialchars($lang_ary['iso']),
+ 'LOCAL_NAME' => htmlspecialchars($lang_ary['local_name'], ENT_COMPAT, 'UTF-8'),
+ 'NAME' => htmlspecialchars($lang_ary['name'], ENT_COMPAT, 'UTF-8'),
+ 'U_INSTALL' => $this->u_action . '&amp;action=install&amp;iso=' . urlencode($lang_ary['iso']))
+ );
+ }
+ }
+
+ unset($new_ary);
+ }
+
+
+ /**
+ * Set default language variables/header
+ */
+ function default_variables()
+ {
+ global $phpEx;
+
+ $this->language_file_header = '<?php
+/**
+*
+* {FILENAME} [{LANG_NAME}]
+*
+* @package language
+* @version $' . 'Id: ' . '$
+* @copyright (c) ' . date('Y') . ' phpBB Group
+* @author {CHANGED} - {AUTHOR}
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined(\'IN_PHPBB\'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// \'Page %s of %s\' you can (and should) write \'Page %1$s of %2$s\', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. \'Message %d\' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., \'Click %sHERE%s\' is fine
+';
+
+ $this->lang_header = '
+$lang = array_merge($lang, array(
+';
+
+ // Language files in language root directory
+ $this->main_files = array("common.$phpEx", "groups.$phpEx", "install.$phpEx", "mcp.$phpEx", "memberlist.$phpEx", "posting.$phpEx", "search.$phpEx", "ucp.$phpEx", "viewforum.$phpEx", "viewtopic.$phpEx", "help_bbcode.$phpEx", "help_faq.$phpEx");
+ }
+
+ /**
+ * Get filename/location of language file
+ */
+ function get_filename($lang_iso, $directory, $filename, $check_store = false, $only_return_filename = false)
+ {
+ global $phpbb_root_path, $safe_mode;
+
+ $check_filename = "language/$lang_iso/" . (($directory) ? $directory . '/' : '') . $filename;
+
+ if ($check_store)
+ {
+ $check_store_filename = ($safe_mode) ? "store/langfile_{$lang_iso}" . (($directory) ? '_' . $directory : '') . "_{$filename}" : "store/language/$lang_iso/" . (($directory) ? $directory . '/' : '') . $filename;
+
+ if (!$only_return_filename && file_exists($phpbb_root_path . $check_store_filename))
+ {
+ return $check_store_filename;
+ }
+ else if ($only_return_filename)
+ {
+ return $check_store_filename;
+ }
+ }
+
+ return $check_filename;
+ }
+
+ /**
+ * Add files to archive
+ */
+ function add_to_archive(&$compress, $filelist, $lang_iso, $directory = '')
+ {
+ global $phpbb_root_path;
+
+ foreach ($filelist as $file)
+ {
+ // Get source filename
+ $source = $this->get_filename($lang_iso, $directory, $file, true);
+ $destination = 'language/' . $lang_iso . '/' . (($directory) ? $directory . '/' : '') . $file;
+
+ // Add file to archive
+ $compress->add_custom_file($phpbb_root_path . $source, $destination);
+ }
+ }
+
+ /**
+ * Little helper to add some hardcoded template bits
+ */
+ function add_input_field()
+ {
+ $keys = func_get_args();
+
+ $non_static = array_shift($keys);
+ $value = utf8_normalize_nfc(array_shift($keys));
+
+ if (!$non_static)
+ {
+ return '<strong>' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '</strong>';
+ }
+
+ // If more then 270 characters, then we present a textarea, else an input field
+ $textarea = (utf8_strlen($value) > 270) ? true : false;
+ $tpl = '';
+
+ $tpl .= ($textarea) ? '<textarea name="' : '<input type="text" name="';
+ $tpl .= 'entry[' . implode('][', array_map('utf8_htmlspecialchars', $keys)) . ']"';
+
+ $tpl .= ($textarea) ? ' cols="80" rows="5" class="langvalue">' : ' class="langvalue" value="';
+ $tpl .= htmlspecialchars($value, ENT_COMPAT, 'UTF-8');
+ $tpl .= ($textarea) ? '</textarea>' : '" />';
+
+ return $tpl;
+ }
+
+ /**
+ * Print language entries
+ */
+ function print_language_entries(&$lang_ary, $key_prefix = '', $input_field = true)
+ {
+ $tpl = '';
+
+ foreach ($lang_ary as $key => $value)
+ {
+ if (is_array($value))
+ {
+ // Write key
+ $tpl .= '
+ <tr>
+ <td class="row3" colspan="2">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '<strong>' . htmlspecialchars($key, ENT_COMPAT, 'UTF-8') . '</strong></td>
+ </tr>';
+
+ foreach ($value as $_key => $_value)
+ {
+ if (is_array($_value))
+ {
+ // Write key
+ $tpl .= '
+ <tr>
+ <td class="row3" colspan="2">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '&nbsp; &nbsp;<strong>' . htmlspecialchars($_key, ENT_COMPAT, 'UTF-8') . '</strong></td>
+ </tr>';
+
+ foreach ($_value as $__key => $__value)
+ {
+ // Write key
+ $tpl .= '
+ <tr>
+ <td class="row1" style="white-space: nowrap;">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '<strong>' . htmlspecialchars($__key, ENT_COMPAT, 'UTF-8') . '</strong></td>
+ <td class="row2">';
+
+ $tpl .= $this->add_input_field($input_field, $__value, $key, $_key, $__key);
+
+ $tpl .= '</td>
+ </tr>';
+ }
+ }
+ else
+ {
+ // Write key
+ $tpl .= '
+ <tr>
+ <td class="row1" style="white-space: nowrap;">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '<strong>' . htmlspecialchars($_key, ENT_COMPAT, 'UTF-8') . '</strong></td>
+ <td class="row2">';
+
+ $tpl .= $this->add_input_field($input_field, $_value, $key, $_key);
+
+ $tpl .= '</td>
+ </tr>';
+ }
+ }
+
+ $tpl .= '
+ <tr>
+ <td class="spacer" colspan="2">&nbsp;</td>
+ </tr>';
+ }
+ else
+ {
+ // Write key
+ $tpl .= '
+ <tr>
+ <td class="row1" style="white-space: nowrap;">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '<strong>' . htmlspecialchars($key, ENT_COMPAT, 'UTF-8') . '</strong></td>
+ <td class="row2">';
+
+ $tpl .= $this->add_input_field($input_field, $value, $key);
+
+ $tpl .= '</td>
+ </tr>';
+ }
+ }
+
+ return $tpl;
+ }
+
+ /**
+ * Compare two language files
+ */
+ function compare_language_files($source_lang, $dest_lang, $directory, $file)
+ {
+ global $phpbb_root_path, $phpEx;
+
+ $return_ary = array();
+
+ $lang = array();
+ include("{$phpbb_root_path}language/{$source_lang}/" . (($directory) ? $directory . '/' : '') . $file);
+ $lang_entry_src = $lang;
+
+ $lang = array();
+
+ if (!file_exists($phpbb_root_path . $this->get_filename($dest_lang, $directory, $file, true)))
+ {
+ return array();
+ }
+
+ include($phpbb_root_path . $this->get_filename($dest_lang, $directory, $file, true));
+
+ $lang_entry_dst = $lang;
+
+ unset($lang);
+
+ $diff_array_keys = array_diff(array_keys($lang_entry_src), array_keys($lang_entry_dst));
+ unset($lang_entry_dst);
+
+ foreach ($diff_array_keys as $key)
+ {
+ $return_ary[$key] = $lang_entry_src[$key];
+ }
+
+ unset($lang_entry_src);
+
+ return $return_ary;
+ }
+
+ /**
+ * Return language string value for storage
+ */
+ function prepare_lang_entry($text, $store = true)
+ {
+ $text = (STRIP) ? stripslashes($text) : $text;
+
+ // Adjust for storage...
+ if ($store)
+ {
+ $text = str_replace("'", "\\'", str_replace('\\', '\\\\', $text));
+ }
+
+ return $text;
+ }
+
+ /**
+ * Format language array for storage
+ */
+ function format_lang_array($key, $value, $tabs = "\t")
+ {
+ $entry = '';
+
+ if (!is_array($value))
+ {
+ $entry .= "{$tabs}'" . $this->prepare_lang_entry($key) . "'\t=> '" . $this->prepare_lang_entry($value) . "',\n";
+ }
+ else
+ {
+ $_tabs = $tabs . "\t";
+ $entry .= "\n{$tabs}'" . $this->prepare_lang_entry($key) . "'\t=> array(\n";
+
+ foreach ($value as $_key => $_value)
+ {
+ $entry .= $this->format_lang_array($_key, $_value, $_tabs);
+ }
+
+ $entry .= "{$tabs}),\n\n";
+ }
+
+ return $entry;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_logs.php b/phpBB/includes/acp/acp_logs.php
new file mode 100644
index 0000000000..0f4f78fcdd
--- /dev/null
+++ b/phpBB/includes/acp/acp_logs.php
@@ -0,0 +1,176 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_logs
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template, $cache;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ $user->add_lang('mcp');
+
+ // Set up general vars
+ $action = request_var('action', '');
+ $forum_id = request_var('f', 0);
+ $topic_id = request_var('t', 0);
+ $start = request_var('start', 0);
+ $deletemark = (!empty($_POST['delmarked'])) ? true : false;
+ $deleteall = (!empty($_POST['delall'])) ? true : false;
+ $marked = request_var('mark', array(0));
+
+ // Sort keys
+ $sort_days = request_var('st', 0);
+ $sort_key = request_var('sk', 't');
+ $sort_dir = request_var('sd', 'd');
+
+ $this->tpl_name = 'acp_logs';
+ $this->log_type = constant('LOG_' . strtoupper($mode));
+
+ // Delete entries if requested and able
+ if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
+ {
+ if (confirm_box(true))
+ {
+ $where_sql = '';
+
+ if ($deletemark && sizeof($marked))
+ {
+ $sql_in = array();
+ foreach ($marked as $mark)
+ {
+ $sql_in[] = $mark;
+ }
+ $where_sql = ' AND ' . $db->sql_in_set('log_id', $sql_in);
+ unset($sql_in);
+ }
+
+ if ($where_sql || $deleteall)
+ {
+ $sql = 'DELETE FROM ' . LOG_TABLE . "
+ WHERE log_type = {$this->log_type}
+ $where_sql";
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_CLEAR_' . strtoupper($mode));
+ }
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'f' => $forum_id,
+ 'start' => $start,
+ 'delmarked' => $deletemark,
+ 'delall' => $deleteall,
+ 'mark' => $marked,
+ 'st' => $sort_days,
+ 'sk' => $sort_key,
+ 'sd' => $sort_dir,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action))
+ );
+ }
+ }
+
+ // Sorting
+ $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_text = array('u' => $user->lang['SORT_USERNAME'], 't' => $user->lang['SORT_DATE'], 'i' => $user->lang['SORT_IP'], 'o' => $user->lang['SORT_ACTION']);
+ $sort_by_sql = array('u' => 'u.username_clean', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation');
+
+ $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
+ gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
+
+ // Define where and sort sql for use in displaying logs
+ $sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0;
+ $sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
+
+ $keywords = utf8_normalize_nfc(request_var('keywords', '', true));
+ $keywords_param = !empty($keywords) ? '&amp;keywords=' . urlencode(htmlspecialchars_decode($keywords)) : '';
+
+ $l_title = $user->lang['ACP_' . strtoupper($mode) . '_LOGS'];
+ $l_title_explain = $user->lang['ACP_' . strtoupper($mode) . '_LOGS_EXPLAIN'];
+
+ $this->page_title = $l_title;
+
+ // Define forum list if we're looking @ mod logs
+ if ($mode == 'mod')
+ {
+ $forum_box = '<option value="0">' . $user->lang['ALL_FORUMS'] . '</option>' . make_forum_select($forum_id);
+
+ $template->assign_vars(array(
+ 'S_SHOW_FORUMS' => true,
+ 'S_FORUM_BOX' => $forum_box)
+ );
+ }
+
+ // Grab log data
+ $log_data = array();
+ $log_count = 0;
+ view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort, $keywords);
+
+ $template->assign_vars(array(
+ 'L_TITLE' => $l_title,
+ 'L_EXPLAIN' => $l_title_explain,
+ 'U_ACTION' => $this->u_action,
+
+ 'S_ON_PAGE' => on_page($log_count, $config['topics_per_page'], $start),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param$keywords_param", $log_count, $config['topics_per_page'], $start, true),
+
+ 'S_LIMIT_DAYS' => $s_limit_days,
+ 'S_SORT_KEY' => $s_sort_key,
+ 'S_SORT_DIR' => $s_sort_dir,
+ 'S_CLEARLOGS' => $auth->acl_get('a_clearlogs'),
+ 'S_KEYWORDS' => $keywords,
+ )
+ );
+
+ foreach ($log_data as $row)
+ {
+ $data = array();
+
+ $checks = array('viewtopic', 'viewlogs', 'viewforum');
+ foreach ($checks as $check)
+ {
+ if (isset($row[$check]) && $row[$check])
+ {
+ $data[] = '<a href="' . $row[$check] . '">' . $user->lang['LOGVIEW_' . strtoupper($check)] . '</a>';
+ }
+ }
+
+ $template->assign_block_vars('log', array(
+ 'USERNAME' => $row['username_full'],
+ 'REPORTEE_USERNAME' => ($row['reportee_username'] && $row['user_id'] != $row['reportee_id']) ? $row['reportee_username_full'] : '',
+
+ 'IP' => $row['ip'],
+ 'DATE' => $user->format_date($row['time']),
+ 'ACTION' => $row['action'],
+ 'DATA' => (sizeof($data)) ? implode(' | ', $data) : '',
+ 'ID' => $row['id'],
+ )
+ );
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
new file mode 100644
index 0000000000..cd83c52e01
--- /dev/null
+++ b/phpBB/includes/acp/acp_main.php
@@ -0,0 +1,609 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_main
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template;
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ // Show restore permissions notice
+ if ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm'))
+ {
+ $this->tpl_name = 'acp_main';
+ $this->page_title = 'ACP_MAIN';
+
+ $sql = 'SELECT user_id, username, user_colour
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . $user->data['user_perm_from'];
+ $result = $db->sql_query($sql);
+ $user_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $perm_from = '<strong' . (($user_row['user_colour']) ? ' style="color: #' . $user_row['user_colour'] . '">' : '>');
+ $perm_from .= ($user_row['user_id'] != ANONYMOUS) ? '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $user_row['user_id']) . '">' : '';
+ $perm_from .= $user_row['username'];
+ $perm_from .= ($user_row['user_id'] != ANONYMOUS) ? '</a>' : '';
+ $perm_from .= '</strong>';
+
+ $template->assign_vars(array(
+ 'S_RESTORE_PERMISSIONS' => true,
+ 'U_RESTORE_PERMISSIONS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm'),
+ 'PERM_FROM' => $perm_from,
+ 'L_PERMISSIONS_TRANSFERRED_EXPLAIN' => sprintf($user->lang['PERMISSIONS_TRANSFERRED_EXPLAIN'], $perm_from, append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm')),
+ ));
+
+ return;
+ }
+
+ $action = request_var('action', '');
+
+ if ($action)
+ {
+ if ($action === 'admlogout')
+ {
+ $user->unset_admin();
+ $redirect_url = append_sid("{$phpbb_root_path}index.$phpEx");
+ meta_refresh(3, $redirect_url);
+ trigger_error($user->lang['ADM_LOGGED_OUT'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . $redirect_url . '">', '</a>'));
+ }
+
+ if (!confirm_box(true))
+ {
+ switch ($action)
+ {
+ case 'online':
+ $confirm = true;
+ $confirm_lang = 'RESET_ONLINE_CONFIRM';
+ break;
+ case 'stats':
+ $confirm = true;
+ $confirm_lang = 'RESYNC_STATS_CONFIRM';
+ break;
+ case 'user':
+ $confirm = true;
+ $confirm_lang = 'RESYNC_POSTCOUNTS_CONFIRM';
+ break;
+ case 'date':
+ $confirm = true;
+ $confirm_lang = 'RESET_DATE_CONFIRM';
+ break;
+ case 'db_track':
+ $confirm = true;
+ $confirm_lang = 'RESYNC_POST_MARKING_CONFIRM';
+ break;
+ case 'purge_cache':
+ $confirm = true;
+ $confirm_lang = 'PURGE_CACHE_CONFIRM';
+ break;
+ case 'purge_sessions':
+ $confirm = true;
+ $confirm_lang = 'PURGE_SESSIONS_CONFIRM';
+ break;
+
+ default:
+ $confirm = true;
+ $confirm_lang = 'CONFIRM_OPERATION';
+ }
+
+ if ($confirm)
+ {
+ confirm_box(false, $user->lang[$confirm_lang], build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ )));
+ }
+ }
+ else
+ {
+ switch ($action)
+ {
+
+ case 'online':
+ if (!$auth->acl_get('a_board'))
+ {
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ set_config('record_online_users', 1, true);
+ set_config('record_online_date', time(), true);
+ add_log('admin', 'LOG_RESET_ONLINE');
+ break;
+
+ case 'stats':
+ if (!$auth->acl_get('a_board'))
+ {
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = 'SELECT COUNT(post_id) AS stat
+ FROM ' . POSTS_TABLE . '
+ WHERE post_approved = 1';
+ $result = $db->sql_query($sql);
+ set_config('num_posts', (int) $db->sql_fetchfield('stat'), true);
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT COUNT(topic_id) AS stat
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_approved = 1';
+ $result = $db->sql_query($sql);
+ set_config('num_topics', (int) $db->sql_fetchfield('stat'), true);
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT COUNT(user_id) AS stat
+ FROM ' . USERS_TABLE . '
+ WHERE user_type IN (' . USER_NORMAL . ',' . USER_FOUNDER . ')';
+ $result = $db->sql_query($sql);
+ set_config('num_users', (int) $db->sql_fetchfield('stat'), true);
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT COUNT(attach_id) as stat
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE is_orphan = 0';
+ $result = $db->sql_query($sql);
+ set_config('num_files', (int) $db->sql_fetchfield('stat'), true);
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT SUM(filesize) as stat
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE is_orphan = 0';
+ $result = $db->sql_query($sql);
+ set_config('upload_dir_size', (float) $db->sql_fetchfield('stat'), true);
+ $db->sql_freeresult($result);
+
+ if (!function_exists('update_last_username'))
+ {
+ include($phpbb_root_path . "includes/functions_user.$phpEx");
+ }
+ update_last_username();
+
+ add_log('admin', 'LOG_RESYNC_STATS');
+ break;
+
+ case 'user':
+ if (!$auth->acl_get('a_board'))
+ {
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // Resync post counts
+ $start = $max_post_id = 0;
+
+ // Find the maximum post ID, we can only stop the cycle when we've reached it
+ $sql = 'SELECT MAX(forum_last_post_id) as max_post_id
+ FROM ' . FORUMS_TABLE;
+ $result = $db->sql_query($sql);
+ $max_post_id = (int) $db->sql_fetchfield('max_post_id');
+ $db->sql_freeresult($result);
+
+ // No maximum post id? :o
+ if (!$max_post_id)
+ {
+ $sql = 'SELECT MAX(post_id)
+ FROM ' . POSTS_TABLE;
+ $result = $db->sql_query($sql);
+ $max_post_id = (int) $db->sql_fetchfield('max_post_id');
+ $db->sql_freeresult($result);
+ }
+
+ // Still no maximum post id? Then we are finished
+ if (!$max_post_id)
+ {
+ add_log('admin', 'LOG_RESYNC_POSTCOUNTS');
+ break;
+ }
+
+ $step = ($config['num_posts']) ? (max((int) ($config['num_posts'] / 5), 20000)) : 20000;
+ $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_posts = 0');
+
+ while ($start < $max_post_id)
+ {
+ $sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
+ FROM ' . POSTS_TABLE . '
+ WHERE post_id BETWEEN ' . ($start + 1) . ' AND ' . ($start + $step) . '
+ AND post_postcount = 1 AND post_approved = 1
+ GROUP BY poster_id';
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ do
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . " SET user_posts = user_posts + {$row['num_posts']} WHERE user_id = {$row['poster_id']}";
+ $db->sql_query($sql);
+ }
+ while ($row = $db->sql_fetchrow($result));
+ }
+ $db->sql_freeresult($result);
+
+ $start += $step;
+ }
+
+ add_log('admin', 'LOG_RESYNC_POSTCOUNTS');
+
+ break;
+
+ case 'date':
+ if (!$auth->acl_get('a_board'))
+ {
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ set_config('board_startdate', time() - 1);
+ add_log('admin', 'LOG_RESET_DATE');
+ break;
+
+ case 'db_track':
+ switch ($db->sql_layer)
+ {
+ case 'sqlite':
+ case 'firebird':
+ $db->sql_query('DELETE FROM ' . TOPICS_POSTED_TABLE);
+ break;
+
+ default:
+ $db->sql_query('TRUNCATE TABLE ' . TOPICS_POSTED_TABLE);
+ break;
+ }
+
+ // This can get really nasty... therefore we only do the last six months
+ $get_from_time = time() - (6 * 4 * 7 * 24 * 60 * 60);
+
+ // Select forum ids, do not include categories
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_type <> ' . FORUM_CAT;
+ $result = $db->sql_query($sql);
+
+ $forum_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_ids[] = $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // Any global announcements? ;)
+ $forum_ids[] = 0;
+
+ // Now go through the forums and get us some topics...
+ foreach ($forum_ids as $forum_id)
+ {
+ $sql = 'SELECT p.poster_id, p.topic_id
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t
+ WHERE t.forum_id = ' . $forum_id . '
+ AND t.topic_moved_id = 0
+ AND t.topic_last_post_time > ' . $get_from_time . '
+ AND t.topic_id = p.topic_id
+ AND p.poster_id <> ' . ANONYMOUS . '
+ GROUP BY p.poster_id, p.topic_id';
+ $result = $db->sql_query($sql);
+
+ $posted = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $posted[$row['poster_id']][] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql_ary = array();
+ foreach ($posted as $user_id => $topic_row)
+ {
+ foreach ($topic_row as $topic_id)
+ {
+ $sql_ary[] = array(
+ 'user_id' => (int) $user_id,
+ 'topic_id' => (int) $topic_id,
+ 'topic_posted' => 1,
+ );
+ }
+ }
+ unset($posted);
+
+ if (sizeof($sql_ary))
+ {
+ $db->sql_multi_insert(TOPICS_POSTED_TABLE, $sql_ary);
+ }
+ }
+
+ add_log('admin', 'LOG_RESYNC_POST_MARKING');
+ break;
+
+ case 'purge_cache':
+ if ((int) $user->data['user_type'] !== USER_FOUNDER)
+ {
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ global $cache;
+ $cache->purge();
+
+ // Clear permissions
+ $auth->acl_clear_prefetch();
+ cache_moderators();
+
+ add_log('admin', 'LOG_PURGE_CACHE');
+ break;
+
+ case 'purge_sessions':
+ if ((int) $user->data['user_type'] !== USER_FOUNDER)
+ {
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $tables = array(CONFIRM_TABLE, SESSIONS_TABLE);
+
+ foreach ($tables as $table)
+ {
+ switch ($db->sql_layer)
+ {
+ case 'sqlite':
+ case 'firebird':
+ $db->sql_query("DELETE FROM $table");
+ break;
+
+ default:
+ $db->sql_query("TRUNCATE TABLE $table");
+ break;
+ }
+ }
+
+ // let's restore the admin session
+ $reinsert_ary = array(
+ 'session_id' => (string) $user->session_id,
+ 'session_page' => (string) substr($user->page['page'], 0, 199),
+ 'session_forum_id' => $user->page['forum'],
+ 'session_user_id' => (int) $user->data['user_id'],
+ 'session_start' => (int) $user->data['session_start'],
+ 'session_last_visit' => (int) $user->data['session_last_visit'],
+ 'session_time' => (int) $user->time_now,
+ 'session_browser' => (string) trim(substr($user->browser, 0, 149)),
+ 'session_forwarded_for' => (string) $user->forwarded_for,
+ 'session_ip' => (string) $user->ip,
+ 'session_autologin' => (int) $user->data['session_autologin'],
+ 'session_admin' => 1,
+ 'session_viewonline' => (int) $user->data['session_viewonline'],
+ );
+
+ $sql = 'INSERT INTO ' . SESSIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $reinsert_ary);
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_PURGE_SESSIONS');
+ break;
+ }
+ }
+ }
+
+ // Version check
+ $user->add_lang('install');
+
+ $latest_version_info = false;
+ if (($latest_version_info = obtain_latest_version_info(request_var('versioncheck_force', false))) === false)
+ {
+ $template->assign_var('S_VERSIONCHECK_FAIL', true);
+ }
+ else
+ {
+ $latest_version_info = explode("\n", $latest_version_info);
+
+ $latest_version = str_replace('rc', 'RC', strtolower(trim($latest_version_info[0])));
+ $current_version = str_replace('rc', 'RC', strtolower($config['version']));
+
+ $template->assign_vars(array(
+ 'S_VERSION_UP_TO_DATE' => version_compare($current_version, $latest_version, '<') ? false : true,
+ ));
+ }
+
+ // Get forum statistics
+ $total_posts = $config['num_posts'];
+ $total_topics = $config['num_topics'];
+ $total_users = $config['num_users'];
+ $total_files = $config['num_files'];
+
+ $start_date = $user->format_date($config['board_startdate']);
+
+ $boarddays = (time() - $config['board_startdate']) / 86400;
+
+ $posts_per_day = sprintf('%.2f', $total_posts / $boarddays);
+ $topics_per_day = sprintf('%.2f', $total_topics / $boarddays);
+ $users_per_day = sprintf('%.2f', $total_users / $boarddays);
+ $files_per_day = sprintf('%.2f', $total_files / $boarddays);
+
+ $upload_dir_size = get_formatted_filesize($config['upload_dir_size']);
+
+ $avatar_dir_size = 0;
+
+ if ($avatar_dir = @opendir($phpbb_root_path . $config['avatar_path']))
+ {
+ while (($file = readdir($avatar_dir)) !== false)
+ {
+ if ($file[0] != '.' && $file != 'CVS' && strpos($file, 'index.') === false)
+ {
+ $avatar_dir_size += filesize($phpbb_root_path . $config['avatar_path'] . '/' . $file);
+ }
+ }
+ closedir($avatar_dir);
+
+ $avatar_dir_size = get_formatted_filesize($avatar_dir_size);
+ }
+ else
+ {
+ // Couldn't open Avatar dir.
+ $avatar_dir_size = $user->lang['NOT_AVAILABLE'];
+ }
+
+ if ($posts_per_day > $total_posts)
+ {
+ $posts_per_day = $total_posts;
+ }
+
+ if ($topics_per_day > $total_topics)
+ {
+ $topics_per_day = $total_topics;
+ }
+
+ if ($users_per_day > $total_users)
+ {
+ $users_per_day = $total_users;
+ }
+
+ if ($files_per_day > $total_files)
+ {
+ $files_per_day = $total_files;
+ }
+
+ if ($config['allow_attachments'] || $config['allow_pm_attach'])
+ {
+ $sql = 'SELECT COUNT(attach_id) AS total_orphan
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE is_orphan = 1
+ AND filetime < ' . (time() - 3*60*60);
+ $result = $db->sql_query($sql);
+ $total_orphan = (int) $db->sql_fetchfield('total_orphan');
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $total_orphan = false;
+ }
+
+ $dbsize = get_database_size();
+
+ $template->assign_vars(array(
+ 'TOTAL_POSTS' => $total_posts,
+ 'POSTS_PER_DAY' => $posts_per_day,
+ 'TOTAL_TOPICS' => $total_topics,
+ 'TOPICS_PER_DAY' => $topics_per_day,
+ 'TOTAL_USERS' => $total_users,
+ 'USERS_PER_DAY' => $users_per_day,
+ 'TOTAL_FILES' => $total_files,
+ 'FILES_PER_DAY' => $files_per_day,
+ 'START_DATE' => $start_date,
+ 'AVATAR_DIR_SIZE' => $avatar_dir_size,
+ 'DBSIZE' => $dbsize,
+ 'UPLOAD_DIR_SIZE' => $upload_dir_size,
+ 'TOTAL_ORPHAN' => $total_orphan,
+ 'S_TOTAL_ORPHAN' => ($total_orphan === false) ? false : true,
+ 'GZIP_COMPRESSION' => ($config['gzip_compress'] && @extension_loaded('zlib')) ? $user->lang['ON'] : $user->lang['OFF'],
+ 'DATABASE_INFO' => $db->sql_server_info(),
+ 'BOARD_VERSION' => $config['version'],
+
+ 'U_ACTION' => $this->u_action,
+ 'U_ADMIN_LOG' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=logs&amp;mode=admin'),
+ 'U_INACTIVE_USERS' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=inactive&amp;mode=list'),
+ 'U_VERSIONCHECK' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=update&amp;mode=version_check'),
+ 'U_VERSIONCHECK_FORCE' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=1&amp;versioncheck_force=1'),
+
+ 'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? true : false,
+ 'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
+ )
+ );
+
+ $log_data = array();
+ $log_count = 0;
+
+ if ($auth->acl_get('a_viewlogs'))
+ {
+ view_log('admin', $log_data, $log_count, 5);
+
+ foreach ($log_data as $row)
+ {
+ $template->assign_block_vars('log', array(
+ 'USERNAME' => $row['username_full'],
+ 'IP' => $row['ip'],
+ 'DATE' => $user->format_date($row['time']),
+ 'ACTION' => $row['action'])
+ );
+ }
+ }
+
+ if ($auth->acl_get('a_user'))
+ {
+ $user->add_lang('memberlist');
+
+ $inactive = array();
+ $inactive_count = 0;
+
+ view_inactive_users($inactive, $inactive_count, 10);
+
+ foreach ($inactive as $row)
+ {
+ $template->assign_block_vars('inactive', array(
+ 'INACTIVE_DATE' => $user->format_date($row['user_inactive_time']),
+ 'REMINDED_DATE' => $user->format_date($row['user_reminded_time']),
+ 'JOINED' => $user->format_date($row['user_regdate']),
+ 'LAST_VISIT' => (!$row['user_lastvisit']) ? ' - ' : $user->format_date($row['user_lastvisit']),
+
+ 'REASON' => $row['inactive_reason'],
+ 'USER_ID' => $row['user_id'],
+ 'POSTS' => ($row['user_posts']) ? $row['user_posts'] : 0,
+ 'REMINDED' => $row['user_reminded'],
+
+ 'REMINDED_EXPLAIN' => $user->lang('USER_LAST_REMINDED', (int) $row['user_reminded'], $user->format_date($row['user_reminded_time'])),
+
+ 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&amp;mode=overview')),
+ 'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USER_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
+
+ 'U_USER_ADMIN' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&amp;mode=overview&amp;u={$row['user_id']}"),
+ 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id={$row['user_id']}&amp;sr=posts") : '',
+ ));
+ }
+
+ $option_ary = array('activate' => 'ACTIVATE', 'delete' => 'DELETE');
+ if ($config['email_enable'])
+ {
+ $option_ary += array('remind' => 'REMIND');
+ }
+
+ $template->assign_vars(array(
+ 'S_INACTIVE_USERS' => true,
+ 'S_INACTIVE_OPTIONS' => build_select($option_ary))
+ );
+ }
+
+ // Warn if install is still present
+ if (file_exists($phpbb_root_path . 'install') && !is_file($phpbb_root_path . 'install'))
+ {
+ $template->assign_var('S_REMOVE_INSTALL', true);
+ }
+
+ if (!defined('PHPBB_DISABLE_CONFIG_CHECK') && file_exists($phpbb_root_path . 'config.' . $phpEx) && phpbb_is_writable($phpbb_root_path . 'config.' . $phpEx))
+ {
+ // World-Writable? (000x)
+ $template->assign_var('S_WRITABLE_CONFIG', (bool) (@fileperms($phpbb_root_path . 'config.' . $phpEx) & 0x0002));
+ }
+
+ // Fill dbms version if not yet filled
+ if (empty($config['dbms_version']))
+ {
+ set_config('dbms_version', $db->sql_server_info(true));
+ }
+
+ $this->tpl_name = 'acp_main';
+ $this->page_title = 'ACP_MAIN';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php
new file mode 100644
index 0000000000..75bc5766a9
--- /dev/null
+++ b/phpBB/includes/acp/acp_modules.php
@@ -0,0 +1,1065 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* - Able to check for new module versions (modes changed/adjusted/added/removed)
+* Icons for:
+* - module enabled and displayed (common)
+* - module enabled and not displayed
+* - module deactivated
+* - category (enabled)
+* - category disabled
+*/
+
+/**
+* @package acp
+*/
+class acp_modules
+{
+ var $module_class = '';
+ var $parent_id;
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template, $module;
+ global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
+
+ // Set a global define for modules we might include (the author is able to prevent execution of code by checking this constant)
+ define('MODULE_INCLUDE', true);
+
+ $user->add_lang('acp/modules');
+ $this->tpl_name = 'acp_modules';
+
+ // module class
+ $this->module_class = $mode;
+
+ if ($this->module_class == 'ucp')
+ {
+ $user->add_lang('ucp');
+ }
+ else if ($this->module_class == 'mcp')
+ {
+ $user->add_lang('mcp');
+ }
+
+ if ($module->p_class != $this->module_class)
+ {
+ $module->add_mod_info($this->module_class);
+ }
+
+ $this->page_title = strtoupper($this->module_class);
+
+ $this->parent_id = request_var('parent_id', 0);
+ $module_id = request_var('m', 0);
+ $action = request_var('action', '');
+ $errors = array();
+
+ switch ($action)
+ {
+ case 'delete':
+ if (!$module_id)
+ {
+ trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ if (confirm_box(true))
+ {
+ // Make sure we are not directly within a module
+ if ($module_id == $this->parent_id)
+ {
+ $sql = 'SELECT parent_id
+ FROM ' . MODULES_TABLE . '
+ WHERE module_id = ' . $module_id;
+ $result = $db->sql_query($sql);
+ $this->parent_id = (int) $db->sql_fetchfield('parent_id');
+ $db->sql_freeresult($result);
+ }
+
+ $errors = $this->delete_module($module_id);
+
+ if (!sizeof($errors))
+ {
+ $this->remove_cache_file();
+ trigger_error($user->lang['MODULE_DELETED'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
+ }
+ }
+ else
+ {
+ confirm_box(false, 'DELETE_MODULE', build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'parent_id' => $this->parent_id,
+ 'module_id' => $module_id,
+ 'action' => $action,
+ )));
+ }
+
+ break;
+
+ case 'enable':
+ case 'disable':
+ if (!$module_id)
+ {
+ trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND module_id = $module_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ $sql = 'UPDATE ' . MODULES_TABLE . '
+ SET module_enabled = ' . (($action == 'enable') ? 1 : 0) . "
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND module_id = $module_id";
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_MODULE_' . strtoupper($action), $this->lang_name($row['module_langname']));
+ $this->remove_cache_file();
+
+ break;
+
+ case 'move_up':
+ case 'move_down':
+ if (!$module_id)
+ {
+ trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND module_id = $module_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ $move_module_name = $this->move_module_by($row, $action, 1);
+
+ if ($move_module_name !== false)
+ {
+ add_log('admin', 'LOG_MODULE_' . strtoupper($action), $this->lang_name($row['module_langname']), $move_module_name);
+ $this->remove_cache_file();
+ }
+
+ break;
+
+ case 'quickadd':
+ $quick_install = request_var('quick_install', '');
+
+ if (confirm_box(true))
+ {
+ if (!$quick_install || strpos($quick_install, '::') === false)
+ {
+ break;
+ }
+
+ list($module_basename, $module_mode) = explode('::', $quick_install);
+
+ // Check if module name and mode exist...
+ $fileinfo = $this->get_module_infos($module_basename);
+ $fileinfo = $fileinfo[$module_basename];
+
+ if (isset($fileinfo['modes'][$module_mode]))
+ {
+ $module_data = array(
+ 'module_basename' => $module_basename,
+ 'module_enabled' => 0,
+ 'module_display' => (isset($fileinfo['modes'][$module_mode]['display'])) ? $fileinfo['modes'][$module_mode]['display'] : 1,
+ 'parent_id' => $this->parent_id,
+ 'module_class' => $this->module_class,
+ 'module_langname' => $fileinfo['modes'][$module_mode]['title'],
+ 'module_mode' => $module_mode,
+ 'module_auth' => $fileinfo['modes'][$module_mode]['auth'],
+ );
+
+ $errors = $this->update_module_data($module_data);
+
+ if (!sizeof($errors))
+ {
+ $this->remove_cache_file();
+
+ trigger_error($user->lang['MODULE_ADDED'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
+ }
+ }
+ }
+ else
+ {
+ confirm_box(false, 'ADD_MODULE', build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'parent_id' => $this->parent_id,
+ 'action' => 'quickadd',
+ 'quick_install' => $quick_install,
+ )));
+ }
+
+ break;
+
+ case 'edit':
+
+ if (!$module_id)
+ {
+ trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ $module_row = $this->get_module_row($module_id);
+
+ // no break
+
+ case 'add':
+
+ if ($action == 'add')
+ {
+ $module_row = array(
+ 'module_basename' => '',
+ 'module_enabled' => 0,
+ 'module_display' => 1,
+ 'parent_id' => 0,
+ 'module_langname' => utf8_normalize_nfc(request_var('module_langname', '', true)),
+ 'module_mode' => '',
+ 'module_auth' => '',
+ );
+ }
+
+ $module_data = array();
+
+ $module_data['module_basename'] = request_var('module_basename', (string) $module_row['module_basename']);
+ $module_data['module_enabled'] = request_var('module_enabled', (int) $module_row['module_enabled']);
+ $module_data['module_display'] = request_var('module_display', (int) $module_row['module_display']);
+ $module_data['parent_id'] = request_var('module_parent_id', (int) $module_row['parent_id']);
+ $module_data['module_class'] = $this->module_class;
+ $module_data['module_langname'] = utf8_normalize_nfc(request_var('module_langname', (string) $module_row['module_langname'], true));
+ $module_data['module_mode'] = request_var('module_mode', (string) $module_row['module_mode']);
+
+ $submit = (isset($_POST['submit'])) ? true : false;
+
+ if ($submit)
+ {
+ if (!$module_data['module_langname'])
+ {
+ trigger_error($user->lang['NO_MODULE_LANGNAME'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ $module_type = request_var('module_type', 'category');
+
+ if ($module_type == 'category')
+ {
+ $module_data['module_basename'] = $module_data['module_mode'] = $module_data['module_auth'] = '';
+ $module_data['module_display'] = 1;
+ }
+
+ if ($action == 'edit')
+ {
+ $module_data['module_id'] = $module_id;
+ }
+
+ // Adjust auth row
+ if ($module_data['module_basename'] && $module_data['module_mode'])
+ {
+ $fileinfo = $this->get_module_infos($module_data['module_basename']);
+ $module_data['module_auth'] = $fileinfo[$module_data['module_basename']]['modes'][$module_data['module_mode']]['auth'];
+ }
+
+ $errors = $this->update_module_data($module_data);
+
+ if (!sizeof($errors))
+ {
+ $this->remove_cache_file();
+
+ trigger_error((($action == 'add') ? $user->lang['MODULE_ADDED'] : $user->lang['MODULE_EDITED']) . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
+ }
+ }
+
+ // Category/not category?
+ $is_cat = (!$module_data['module_basename']) ? true : false;
+
+ // Get module information
+ $module_infos = $this->get_module_infos();
+
+ // Build name options
+ $s_name_options = $s_mode_options = '';
+ foreach ($module_infos as $option => $values)
+ {
+ if (!$module_data['module_basename'])
+ {
+ $module_data['module_basename'] = $option;
+ }
+
+ // Name options
+ $s_name_options .= '<option value="' . $option . '"' . (($option == $module_data['module_basename']) ? ' selected="selected"' : '') . '>' . $this->lang_name($values['title']) . ' [' . $this->module_class . '_' . $option . ']</option>';
+
+ $template->assign_block_vars('m_names', array('NAME' => $option, 'A_NAME' => addslashes($option)));
+
+ // Build module modes
+ foreach ($values['modes'] as $m_mode => $m_values)
+ {
+ if ($option == $module_data['module_basename'])
+ {
+ $s_mode_options .= '<option value="' . $m_mode . '"' . (($m_mode == $module_data['module_mode']) ? ' selected="selected"' : '') . '>' . $this->lang_name($m_values['title']) . '</option>';
+ }
+
+ $template->assign_block_vars('m_names.modes', array(
+ 'OPTION' => $m_mode,
+ 'VALUE' => $this->lang_name($m_values['title']),
+ 'A_OPTION' => addslashes($m_mode),
+ 'A_VALUE' => addslashes($this->lang_name($m_values['title'])))
+ );
+ }
+ }
+
+ $s_cat_option = '<option value="0"' . (($module_data['parent_id'] == 0) ? ' selected="selected"' : '') . '>' . $user->lang['NO_PARENT'] . '</option>';
+
+ $template->assign_vars(array_merge(array(
+ 'S_EDIT_MODULE' => true,
+ 'S_IS_CAT' => $is_cat,
+ 'S_CAT_OPTIONS' => $s_cat_option . $this->make_module_select($module_data['parent_id'], ($action == 'edit') ? $module_row['module_id'] : false, false, false, false, true),
+ 'S_MODULE_NAMES' => $s_name_options,
+ 'S_MODULE_MODES' => $s_mode_options,
+ 'U_BACK' => $this->u_action . '&amp;parent_id=' . $this->parent_id,
+ 'U_EDIT_ACTION' => $this->u_action . '&amp;parent_id=' . $this->parent_id,
+
+ 'L_TITLE' => $user->lang[strtoupper($action) . '_MODULE'],
+
+ 'MODULENAME' => $this->lang_name($module_data['module_langname']),
+ 'ACTION' => $action,
+ 'MODULE_ID' => $module_id,
+
+ ),
+ array_change_key_case($module_data, CASE_UPPER))
+ );
+
+ if (sizeof($errors))
+ {
+ $template->assign_vars(array(
+ 'S_ERROR' => true,
+ 'ERROR_MSG' => implode('<br />', $errors))
+ );
+ }
+
+ return;
+
+ break;
+ }
+
+ // Default management page
+ if (sizeof($errors))
+ {
+ $template->assign_vars(array(
+ 'S_ERROR' => true,
+ 'ERROR_MSG' => implode('<br />', $errors))
+ );
+ }
+
+ if (!$this->parent_id)
+ {
+ $navigation = strtoupper($this->module_class);
+ }
+ else
+ {
+ $navigation = '<a href="' . $this->u_action . '">' . strtoupper($this->module_class) . '</a>';
+
+ $modules_nav = $this->get_module_branch($this->parent_id, 'parents', 'descending');
+
+ foreach ($modules_nav as $row)
+ {
+ $langname = $this->lang_name($row['module_langname']);
+
+ if ($row['module_id'] == $this->parent_id)
+ {
+ $navigation .= ' -&gt; ' . $langname;
+ }
+ else
+ {
+ $navigation .= ' -&gt; <a href="' . $this->u_action . '&amp;parent_id=' . $row['module_id'] . '">' . $langname . '</a>';
+ }
+ }
+ }
+
+ // Jumpbox
+ $module_box = $this->make_module_select($this->parent_id, false, false, false, false);
+
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE parent_id = {$this->parent_id}
+ AND module_class = '" . $db->sql_escape($this->module_class) . "'
+ ORDER BY left_id";
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ do
+ {
+ $langname = $this->lang_name($row['module_langname']);
+
+ if (!$row['module_enabled'])
+ {
+ $module_image = '<img src="images/icon_folder_lock.gif" alt="' . $user->lang['DEACTIVATED_MODULE'] .'" />';
+ }
+ else
+ {
+ $module_image = (!$row['module_basename'] || $row['left_id'] + 1 != $row['right_id']) ? '<img src="images/icon_subfolder.gif" alt="' . $user->lang['CATEGORY'] . '" />' : '<img src="images/icon_folder.gif" alt="' . $user->lang['MODULE'] . '" />';
+ }
+
+ $url = $this->u_action . '&amp;parent_id=' . $this->parent_id . '&amp;m=' . $row['module_id'];
+
+ $template->assign_block_vars('modules', array(
+ 'MODULE_IMAGE' => $module_image,
+ 'MODULE_TITLE' => $langname,
+ 'MODULE_ENABLED' => ($row['module_enabled']) ? true : false,
+ 'MODULE_DISPLAYED' => ($row['module_display']) ? true : false,
+
+ 'S_ACP_CAT_SYSTEM' => ($this->module_class == 'acp' && $row['module_langname'] == 'ACP_CAT_SYSTEM') ? true : false,
+ 'S_ACP_MODULE_MANAGEMENT' => ($this->module_class == 'acp' && ($row['module_basename'] == 'modules' || $row['module_langname'] == 'ACP_MODULE_MANAGEMENT')) ? true : false,
+
+ 'U_MODULE' => $this->u_action . '&amp;parent_id=' . $row['module_id'],
+ 'U_MOVE_UP' => $url . '&amp;action=move_up',
+ 'U_MOVE_DOWN' => $url . '&amp;action=move_down',
+ 'U_EDIT' => $url . '&amp;action=edit',
+ 'U_DELETE' => $url . '&amp;action=delete',
+ 'U_ENABLE' => $url . '&amp;action=enable',
+ 'U_DISABLE' => $url . '&amp;action=disable')
+ );
+ }
+ while ($row = $db->sql_fetchrow($result));
+ }
+ else if ($this->parent_id)
+ {
+ $row = $this->get_module_row($this->parent_id);
+
+ $url = $this->u_action . '&amp;parent_id=' . $this->parent_id . '&amp;m=' . $row['module_id'];
+
+ $template->assign_vars(array(
+ 'S_NO_MODULES' => true,
+ 'MODULE_TITLE' => $langname,
+ 'MODULE_ENABLED' => ($row['module_enabled']) ? true : false,
+ 'MODULE_DISPLAYED' => ($row['module_display']) ? true : false,
+
+ 'U_EDIT' => $url . '&amp;action=edit',
+ 'U_DELETE' => $url . '&amp;action=delete',
+ 'U_ENABLE' => $url . '&amp;action=enable',
+ 'U_DISABLE' => $url . '&amp;action=disable')
+ );
+ }
+ $db->sql_freeresult($result);
+
+ // Quick adding module
+ $module_infos = $this->get_module_infos();
+
+ // Build quick options
+ $s_install_options = '';
+ foreach ($module_infos as $option => $values)
+ {
+ // Name options
+ $s_install_options .= '<optgroup label="' . $this->lang_name($values['title']) . ' [' . $this->module_class . '_' . $option . ']">';
+
+ // Build module modes
+ foreach ($values['modes'] as $m_mode => $m_values)
+ {
+ $s_install_options .= '<option value="' . $option . '::' . $m_mode . '">&nbsp; &nbsp;' . $this->lang_name($m_values['title']) . '</option>';
+ }
+
+ $s_install_options .= '</optgroup>';
+ }
+
+ $template->assign_vars(array(
+ 'U_SEL_ACTION' => $this->u_action,
+ 'U_ACTION' => $this->u_action . '&amp;parent_id=' . $this->parent_id,
+ 'NAVIGATION' => $navigation,
+ 'MODULE_BOX' => $module_box,
+ 'PARENT_ID' => $this->parent_id,
+ 'S_INSTALL_OPTIONS' => $s_install_options,
+ )
+ );
+ }
+
+ /**
+ * Get row for specified module
+ */
+ function get_module_row($module_id)
+ {
+ global $db, $user;
+
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND module_id = $module_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ return $row;
+ }
+
+ /**
+ * Get available module information from module files
+ */
+ function get_module_infos($module = '', $module_class = false)
+ {
+ global $phpbb_root_path, $phpEx;
+
+ $module_class = ($module_class === false) ? $this->module_class : $module_class;
+
+ $directory = $phpbb_root_path . 'includes/' . $module_class . '/info/';
+ $fileinfo = array();
+
+ if (!$module)
+ {
+ $dh = @opendir($directory);
+
+ if (!$dh)
+ {
+ return $fileinfo;
+ }
+
+ while (($file = readdir($dh)) !== false)
+ {
+ // Is module?
+ if (preg_match('/^' . $module_class . '_.+\.' . $phpEx . '$/', $file))
+ {
+ $class = str_replace(".$phpEx", '', $file) . '_info';
+
+ if (!class_exists($class))
+ {
+ include($directory . $file);
+ }
+
+ // Get module title tag
+ if (class_exists($class))
+ {
+ $c_class = new $class();
+ $module_info = $c_class->module();
+ $fileinfo[str_replace($module_class . '_', '', $module_info['filename'])] = $module_info;
+ }
+ }
+ }
+ closedir($dh);
+
+ ksort($fileinfo);
+ }
+ else
+ {
+ $filename = $module_class . '_' . basename($module);
+ $class = $module_class . '_' . basename($module) . '_info';
+
+ if (!class_exists($class))
+ {
+ include($directory . $filename . '.' . $phpEx);
+ }
+
+ // Get module title tag
+ if (class_exists($class))
+ {
+ $c_class = new $class();
+ $module_info = $c_class->module();
+ $fileinfo[str_replace($module_class . '_', '', $module_info['filename'])] = $module_info;
+ }
+ }
+
+ return $fileinfo;
+ }
+
+ /**
+ * Simple version of jumpbox, just lists modules
+ */
+ function make_module_select($select_id = false, $ignore_id = false, $ignore_acl = false, $ignore_nonpost = false, $ignore_emptycat = true, $ignore_noncat = false)
+ {
+ global $db, $user, $auth, $config;
+
+ $sql = 'SELECT module_id, module_enabled, module_basename, parent_id, module_langname, left_id, right_id, module_auth
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ ORDER BY left_id ASC";
+ $result = $db->sql_query($sql);
+
+ $right = $iteration = 0;
+ $padding_store = array('0' => '');
+ $module_list = $padding = '';
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['left_id'] < $right)
+ {
+ $padding .= '&nbsp; &nbsp;';
+ $padding_store[$row['parent_id']] = $padding;
+ }
+ else if ($row['left_id'] > $right + 1)
+ {
+ $padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : '';
+ }
+
+ $right = $row['right_id'];
+
+ if (!$ignore_acl && $row['module_auth'])
+ {
+ // We use zero as the forum id to check - global setting.
+ if (!p_master::module_auth($row['module_auth'], 0))
+ {
+ continue;
+ }
+ }
+
+ // ignore this module?
+ if ((is_array($ignore_id) && in_array($row['module_id'], $ignore_id)) || $row['module_id'] == $ignore_id)
+ {
+ continue;
+ }
+
+ // empty category
+ if (!$row['module_basename'] && ($row['left_id'] + 1 == $row['right_id']) && $ignore_emptycat)
+ {
+ continue;
+ }
+
+ // ignore non-category?
+ if ($row['module_basename'] && $ignore_noncat)
+ {
+ continue;
+ }
+
+ $selected = (is_array($select_id)) ? ((in_array($row['module_id'], $select_id)) ? ' selected="selected"' : '') : (($row['module_id'] == $select_id) ? ' selected="selected"' : '');
+
+ $langname = $this->lang_name($row['module_langname']);
+ $module_list .= '<option value="' . $row['module_id'] . '"' . $selected . ((!$row['module_enabled']) ? ' class="disabled"' : '') . '>' . $padding . $langname . '</option>';
+
+ $iteration++;
+ }
+ $db->sql_freeresult($result);
+
+ unset($padding_store);
+
+ return $module_list;
+ }
+
+ /**
+ * Get module branch
+ */
+ function get_module_branch($module_id, $type = 'all', $order = 'descending', $include_module = true)
+ {
+ global $db;
+
+ switch ($type)
+ {
+ case 'parents':
+ $condition = 'm1.left_id BETWEEN m2.left_id AND m2.right_id';
+ break;
+
+ case 'children':
+ $condition = 'm2.left_id BETWEEN m1.left_id AND m1.right_id';
+ break;
+
+ default:
+ $condition = 'm2.left_id BETWEEN m1.left_id AND m1.right_id OR m1.left_id BETWEEN m2.left_id AND m2.right_id';
+ break;
+ }
+
+ $rows = array();
+
+ $sql = 'SELECT m2.*
+ FROM ' . MODULES_TABLE . ' m1
+ LEFT JOIN ' . MODULES_TABLE . " m2 ON ($condition)
+ WHERE m1.module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND m2.module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND m1.module_id = $module_id
+ ORDER BY m2.left_id " . (($order == 'descending') ? 'ASC' : 'DESC');
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!$include_module && $row['module_id'] == $module_id)
+ {
+ continue;
+ }
+
+ $rows[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ return $rows;
+ }
+
+ /**
+ * Remove modules cache file
+ */
+ function remove_cache_file()
+ {
+ global $cache;
+
+ // Sanitise for future path use, it's escaped as appropriate for queries
+ $p_class = str_replace(array('.', '/', '\\'), '', basename($this->module_class));
+
+ $cache->destroy('_modules_' . $p_class);
+
+ // Additionally remove sql cache
+ $cache->destroy('sql', MODULES_TABLE);
+ }
+
+ /**
+ * Return correct language name
+ */
+ function lang_name($module_langname)
+ {
+ global $user;
+
+ return (!empty($user->lang[$module_langname])) ? $user->lang[$module_langname] : $module_langname;
+ }
+
+ /**
+ * Update/Add module
+ *
+ * @param bool $run_inline if set to true errors will be returned and no logs being written
+ */
+ function update_module_data(&$module_data, $run_inline = false)
+ {
+ global $db, $user;
+
+ if (!isset($module_data['module_id']))
+ {
+ // no module_id means we're creating a new category/module
+ if ($module_data['parent_id'])
+ {
+ $sql = 'SELECT left_id, right_id
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'
+ AND module_id = " . (int) $module_data['parent_id'];
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ if ($run_inline)
+ {
+ return 'PARENT_NO_EXIST';
+ }
+
+ trigger_error($user->lang['PARENT_NO_EXIST'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
+ // Workaround
+ $row['left_id'] = (int) $row['left_id'];
+ $row['right_id'] = (int) $row['right_id'];
+
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET left_id = left_id + 2, right_id = right_id + 2
+ WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'
+ AND left_id > {$row['right_id']}";
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET right_id = right_id + 2
+ WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'
+ AND {$row['left_id']} BETWEEN left_id AND right_id";
+ $db->sql_query($sql);
+
+ $module_data['left_id'] = (int) $row['right_id'];
+ $module_data['right_id'] = (int) $row['right_id'] + 1;
+ }
+ else
+ {
+ $sql = 'SELECT MAX(right_id) AS right_id
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $module_data['left_id'] = (int) $row['right_id'] + 1;
+ $module_data['right_id'] = (int) $row['right_id'] + 2;
+ }
+
+ $sql = 'INSERT INTO ' . MODULES_TABLE . ' ' . $db->sql_build_array('INSERT', $module_data);
+ $db->sql_query($sql);
+
+ $module_data['module_id'] = $db->sql_nextid();
+
+ if (!$run_inline)
+ {
+ add_log('admin', 'LOG_MODULE_ADD', $this->lang_name($module_data['module_langname']));
+ }
+ }
+ else
+ {
+ $row = $this->get_module_row($module_data['module_id']);
+
+ if ($module_data['module_basename'] && !$row['module_basename'])
+ {
+ // we're turning a category into a module
+ $branch = $this->get_module_branch($module_data['module_id'], 'children', 'descending', false);
+
+ if (sizeof($branch))
+ {
+ return array($user->lang['NO_CATEGORY_TO_MODULE']);
+ }
+ }
+
+ if ($row['parent_id'] != $module_data['parent_id'])
+ {
+ $this->move_module($module_data['module_id'], $module_data['parent_id']);
+ }
+
+ $update_ary = $module_data;
+ unset($update_ary['module_id']);
+
+ $sql = 'UPDATE ' . MODULES_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $update_ary) . "
+ WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'
+ AND module_id = " . (int) $module_data['module_id'];
+ $db->sql_query($sql);
+
+ if (!$run_inline)
+ {
+ add_log('admin', 'LOG_MODULE_EDIT', $this->lang_name($module_data['module_langname']));
+ }
+ }
+
+ return array();
+ }
+
+ /**
+ * Move module around the tree
+ */
+ function move_module($from_module_id, $to_parent_id)
+ {
+ global $db;
+
+ $moved_modules = $this->get_module_branch($from_module_id, 'children', 'descending');
+ $from_data = $moved_modules[0];
+ $diff = sizeof($moved_modules) * 2;
+
+ $moved_ids = array();
+ for ($i = 0; $i < sizeof($moved_modules); ++$i)
+ {
+ $moved_ids[] = $moved_modules[$i]['module_id'];
+ }
+
+ // Resync parents
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET right_id = right_id - $diff
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND left_id < " . (int) $from_data['right_id'] . '
+ AND right_id > ' . (int) $from_data['right_id'];
+ $db->sql_query($sql);
+
+ // Resync righthand side of tree
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET left_id = left_id - $diff, right_id = right_id - $diff
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND left_id > " . (int) $from_data['right_id'];
+ $db->sql_query($sql);
+
+ if ($to_parent_id > 0)
+ {
+ $to_data = $this->get_module_row($to_parent_id);
+
+ // Resync new parents
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET right_id = right_id + $diff
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND " . (int) $to_data['right_id'] . ' BETWEEN left_id AND right_id
+ AND ' . $db->sql_in_set('module_id', $moved_ids, true);
+ $db->sql_query($sql);
+
+ // Resync the righthand side of the tree
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET left_id = left_id + $diff, right_id = right_id + $diff
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND left_id > " . (int) $to_data['right_id'] . '
+ AND ' . $db->sql_in_set('module_id', $moved_ids, true);
+ $db->sql_query($sql);
+
+ // Resync moved branch
+ $to_data['right_id'] += $diff;
+ if ($to_data['right_id'] > $from_data['right_id'])
+ {
+ $diff = '+ ' . ($to_data['right_id'] - $from_data['right_id'] - 1);
+ }
+ else
+ {
+ $diff = '- ' . abs($to_data['right_id'] - $from_data['right_id'] - 1);
+ }
+ }
+ else
+ {
+ $sql = 'SELECT MAX(right_id) AS right_id
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND " . $db->sql_in_set('module_id', $moved_ids, true);
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $diff = '+ ' . (int) ($row['right_id'] - $from_data['left_id'] + 1);
+ }
+
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET left_id = left_id $diff, right_id = right_id $diff
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND " . $db->sql_in_set('module_id', $moved_ids);
+ $db->sql_query($sql);
+ }
+
+ /**
+ * Remove module from tree
+ */
+ function delete_module($module_id)
+ {
+ global $db, $user;
+
+ $row = $this->get_module_row($module_id);
+
+ $branch = $this->get_module_branch($module_id, 'children', 'descending', false);
+
+ if (sizeof($branch))
+ {
+ return array($user->lang['CANNOT_REMOVE_MODULE']);
+ }
+
+ // If not move
+ $diff = 2;
+ $sql = 'DELETE FROM ' . MODULES_TABLE . "
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND module_id = $module_id";
+ $db->sql_query($sql);
+
+ $row['right_id'] = (int) $row['right_id'];
+ $row['left_id'] = (int) $row['left_id'];
+
+ // Resync tree
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET right_id = right_id - $diff
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND left_id < {$row['right_id']} AND right_id > {$row['right_id']}";
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET left_id = left_id - $diff, right_id = right_id - $diff
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND left_id > {$row['right_id']}";
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_MODULE_REMOVED', $this->lang_name($row['module_langname']));
+
+ return array();
+
+ }
+
+ /**
+ * Move module position by $steps up/down
+ */
+ function move_module_by($module_row, $action = 'move_up', $steps = 1)
+ {
+ global $db;
+
+ /**
+ * Fetch all the siblings between the module's current spot
+ * and where we want to move it to. If there are less than $steps
+ * siblings between the current spot and the target then the
+ * module will move as far as possible
+ */
+ $sql = 'SELECT module_id, left_id, right_id, module_langname
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND parent_id = " . (int) $module_row['parent_id'] . '
+ AND ' . (($action == 'move_up') ? 'right_id < ' . (int) $module_row['right_id'] . ' ORDER BY right_id DESC' : 'left_id > ' . (int) $module_row['left_id'] . ' ORDER BY left_id ASC');
+ $result = $db->sql_query_limit($sql, $steps);
+
+ $target = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $target = $row;
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($target))
+ {
+ // The module is already on top or bottom
+ return false;
+ }
+
+ /**
+ * $left_id and $right_id define the scope of the nodes that are affected by the move.
+ * $diff_up and $diff_down are the values to substract or add to each node's left_id
+ * and right_id in order to move them up or down.
+ * $move_up_left and $move_up_right define the scope of the nodes that are moving
+ * up. Other nodes in the scope of ($left_id, $right_id) are considered to move down.
+ */
+ if ($action == 'move_up')
+ {
+ $left_id = (int) $target['left_id'];
+ $right_id = (int) $module_row['right_id'];
+
+ $diff_up = (int) ($module_row['left_id'] - $target['left_id']);
+ $diff_down = (int) ($module_row['right_id'] + 1 - $module_row['left_id']);
+
+ $move_up_left = (int) $module_row['left_id'];
+ $move_up_right = (int) $module_row['right_id'];
+ }
+ else
+ {
+ $left_id = (int) $module_row['left_id'];
+ $right_id = (int) $target['right_id'];
+
+ $diff_up = (int) ($module_row['right_id'] + 1 - $module_row['left_id']);
+ $diff_down = (int) ($target['right_id'] - $module_row['right_id']);
+
+ $move_up_left = (int) ($module_row['right_id'] + 1);
+ $move_up_right = (int) $target['right_id'];
+ }
+
+ // Now do the dirty job
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET left_id = left_id + CASE
+ WHEN left_id BETWEEN {$move_up_left} AND {$move_up_right} THEN -{$diff_up}
+ ELSE {$diff_down}
+ END,
+ right_id = right_id + CASE
+ WHEN right_id BETWEEN {$move_up_left} AND {$move_up_right} THEN -{$diff_up}
+ ELSE {$diff_down}
+ END
+ WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ AND left_id BETWEEN {$left_id} AND {$right_id}
+ AND right_id BETWEEN {$left_id} AND {$right_id}";
+ $db->sql_query($sql);
+
+ $this->remove_cache_file();
+
+ return $this->lang_name($target['module_langname']);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_permission_roles.php b/phpBB/includes/acp/acp_permission_roles.php
new file mode 100644
index 0000000000..03ea5a39dd
--- /dev/null
+++ b/phpBB/includes/acp/acp_permission_roles.php
@@ -0,0 +1,571 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_permission_roles
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template, $cache;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
+
+ $auth_admin = new auth_admin();
+
+ $user->add_lang('acp/permissions');
+ add_permission_language();
+
+ $this->tpl_name = 'acp_permission_roles';
+
+ $submit = (isset($_POST['submit'])) ? true : false;
+ $role_id = request_var('role_id', 0);
+ $action = request_var('action', '');
+ $action = (isset($_POST['add'])) ? 'add' : $action;
+
+ $form_name = 'acp_permissions';
+ add_form_key($form_name);
+
+ switch ($mode)
+ {
+ case 'admin_roles':
+ $permission_type = 'a_';
+ $this->page_title = 'ACP_ADMIN_ROLES';
+ break;
+
+ case 'user_roles':
+ $permission_type = 'u_';
+ $this->page_title = 'ACP_USER_ROLES';
+ break;
+
+ case 'mod_roles':
+ $permission_type = 'm_';
+ $this->page_title = 'ACP_MOD_ROLES';
+ break;
+
+ case 'forum_roles':
+ $permission_type = 'f_';
+ $this->page_title = 'ACP_FORUM_ROLES';
+ break;
+
+ default:
+ trigger_error('NO_MODE', E_USER_ERROR);
+ break;
+ }
+
+ $template->assign_vars(array(
+ 'L_TITLE' => $user->lang[$this->page_title],
+ 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'])
+ );
+
+ // Take action... admin submitted something
+ if ($submit || $action == 'remove')
+ {
+ switch ($action)
+ {
+ case 'remove':
+
+ if (!$role_id)
+ {
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = 'SELECT *
+ FROM ' . ACL_ROLES_TABLE . '
+ WHERE role_id = ' . $role_id;
+ $result = $db->sql_query($sql);
+ $role_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$role_row)
+ {
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (confirm_box(true))
+ {
+ $this->remove_role($role_id, $permission_type);
+
+ $role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name'];
+ add_log('admin', 'LOG_' . strtoupper($permission_type) . 'ROLE_REMOVED', $role_name);
+ trigger_error($user->lang['ROLE_DELETED'] . adm_back_link($this->u_action));
+ }
+ else
+ {
+ confirm_box(false, 'DELETE_ROLE', build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'role_id' => $role_id,
+ 'action' => $action,
+ )));
+ }
+
+ break;
+
+ case 'edit':
+ if (!$role_id)
+ {
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // Get role we edit
+ $sql = 'SELECT *
+ FROM ' . ACL_ROLES_TABLE . '
+ WHERE role_id = ' . $role_id;
+ $result = $db->sql_query($sql);
+ $role_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$role_row)
+ {
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // no break;
+
+ case 'add':
+
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $role_name = utf8_normalize_nfc(request_var('role_name', '', true));
+ $role_description = utf8_normalize_nfc(request_var('role_description', '', true));
+ $auth_settings = request_var('setting', array('' => 0));
+
+ if (!$role_name)
+ {
+ trigger_error($user->lang['NO_ROLE_NAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (utf8_strlen($role_description) > 4000)
+ {
+ trigger_error($user->lang['ROLE_DESCRIPTION_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // if we add/edit a role we check the name to be unique among the settings...
+ $sql = 'SELECT role_id
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_type = '" . $db->sql_escape($permission_type) . "'
+ AND role_name = '" . $db->sql_escape($role_name) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // Make sure we only print out the error if we add the role or change it's name
+ if ($row && ($mode == 'add' || ($mode == 'edit' && $role_row['role_name'] != $role_name)))
+ {
+ trigger_error(sprintf($user->lang['ROLE_NAME_ALREADY_EXIST'], $role_name) . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql_ary = array(
+ 'role_name' => (string) $role_name,
+ 'role_description' => (string) $role_description,
+ 'role_type' => (string) $permission_type,
+ );
+
+ if ($action == 'edit')
+ {
+ $sql = 'UPDATE ' . ACL_ROLES_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE role_id = ' . $role_id;
+ $db->sql_query($sql);
+ }
+ else
+ {
+ // Get maximum role order for inserting a new role...
+ $sql = 'SELECT MAX(role_order) as max_order
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_type = '" . $db->sql_escape($permission_type) . "'";
+ $result = $db->sql_query($sql);
+ $max_order = (int) $db->sql_fetchfield('max_order');
+ $db->sql_freeresult($result);
+
+ $sql_ary['role_order'] = $max_order + 1;
+
+ $sql = 'INSERT INTO ' . ACL_ROLES_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ $db->sql_query($sql);
+
+ $role_id = $db->sql_nextid();
+ }
+
+ // Now add the auth settings
+ $auth_admin->acl_set_role($role_id, $auth_settings);
+
+ $role_name = (!empty($user->lang[$role_name])) ? $user->lang[$role_name] : $role_name;
+ add_log('admin', 'LOG_' . strtoupper($permission_type) . 'ROLE_' . strtoupper($action), $role_name);
+
+ trigger_error($user->lang['ROLE_' . strtoupper($action) . '_SUCCESS'] . adm_back_link($this->u_action));
+
+ break;
+ }
+ }
+
+ // Display screens
+ switch ($action)
+ {
+ case 'add':
+
+ $options_from = request_var('options_from', 0);
+
+ $role_row = array(
+ 'role_name' => utf8_normalize_nfc(request_var('role_name', '', true)),
+ 'role_description' => utf8_normalize_nfc(request_var('role_description', '', true)),
+ 'role_type' => $permission_type,
+ );
+
+ if ($options_from)
+ {
+ $sql = 'SELECT p.auth_option_id, p.auth_setting, o.auth_option
+ FROM ' . ACL_ROLES_DATA_TABLE . ' p, ' . ACL_OPTIONS_TABLE . ' o
+ WHERE o.auth_option_id = p.auth_option_id
+ AND p.role_id = ' . $options_from . '
+ ORDER BY p.auth_option_id';
+ $result = $db->sql_query($sql);
+
+ $auth_options = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $auth_options[$row['auth_option']] = $row['auth_setting'];
+ }
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $sql = 'SELECT auth_option_id, auth_option
+ FROM ' . ACL_OPTIONS_TABLE . "
+ WHERE auth_option " . $db->sql_like_expression($permission_type . $db->any_char) . "
+ AND auth_option <> '{$permission_type}'
+ ORDER BY auth_option_id";
+ $result = $db->sql_query($sql);
+
+ $auth_options = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $auth_options[$row['auth_option']] = ACL_NO;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ // no break;
+
+ case 'edit':
+
+ if ($action == 'edit')
+ {
+ if (!$role_id)
+ {
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = 'SELECT *
+ FROM ' . ACL_ROLES_TABLE . '
+ WHERE role_id = ' . $role_id;
+ $result = $db->sql_query($sql);
+ $role_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT p.auth_option_id, p.auth_setting, o.auth_option
+ FROM ' . ACL_ROLES_DATA_TABLE . ' p, ' . ACL_OPTIONS_TABLE . ' o
+ WHERE o.auth_option_id = p.auth_option_id
+ AND p.role_id = ' . $role_id . '
+ ORDER BY p.auth_option_id';
+ $result = $db->sql_query($sql);
+
+ $auth_options = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $auth_options[$row['auth_option']] = $row['auth_setting'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (!$role_row)
+ {
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $template->assign_vars(array(
+ 'S_EDIT' => true,
+
+ 'U_ACTION' => $this->u_action . "&amp;action={$action}&amp;role_id={$role_id}",
+ 'U_BACK' => $this->u_action,
+
+ 'ROLE_NAME' => $role_row['role_name'],
+ 'ROLE_DESCRIPTION' => $role_row['role_description'],
+ 'L_ACL_TYPE' => $user->lang['ACL_TYPE_' . strtoupper($permission_type)],
+ )
+ );
+
+ // We need to fill the auth options array with ACL_NO options ;)
+ $sql = 'SELECT auth_option_id, auth_option
+ FROM ' . ACL_OPTIONS_TABLE . "
+ WHERE auth_option " . $db->sql_like_expression($permission_type . $db->any_char) . "
+ AND auth_option <> '{$permission_type}'
+ ORDER BY auth_option_id";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!isset($auth_options[$row['auth_option']]))
+ {
+ $auth_options[$row['auth_option']] = ACL_NO;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // Unset global permission option
+ unset($auth_options[$permission_type]);
+
+ // Display auth options
+ $this->display_auth_options($auth_options);
+
+ // Get users/groups/forums using this preset...
+ if ($action == 'edit')
+ {
+ $hold_ary = $auth_admin->get_role_mask($role_id);
+
+ if (sizeof($hold_ary))
+ {
+ $role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name'];
+
+ $template->assign_vars(array(
+ 'S_DISPLAY_ROLE_MASK' => true,
+ 'L_ROLE_ASSIGNED_TO' => sprintf($user->lang['ROLE_ASSIGNED_TO'], $role_name))
+ );
+
+ $auth_admin->display_role_mask($hold_ary);
+ }
+ }
+
+ return;
+ break;
+
+ case 'move_up':
+ case 'move_down':
+
+ $order = request_var('order', 0);
+ $order_total = $order * 2 + (($action == 'move_up') ? -1 : 1);
+
+ $sql = 'UPDATE ' . ACL_ROLES_TABLE . '
+ SET role_order = ' . $order_total . " - role_order
+ WHERE role_type = '" . $db->sql_escape($permission_type) . "'
+ AND role_order IN ($order, " . (($action == 'move_up') ? $order - 1 : $order + 1) . ')';
+ $db->sql_query($sql);
+
+ break;
+ }
+
+ // By default, check that role_order is valid and fix it if necessary
+ $sql = 'SELECT role_id, role_order
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_type = '" . $db->sql_escape($permission_type) . "'
+ ORDER BY role_order ASC";
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $order = 0;
+ do
+ {
+ $order++;
+ if ($row['role_order'] != $order)
+ {
+ $db->sql_query('UPDATE ' . ACL_ROLES_TABLE . " SET role_order = $order WHERE role_id = {$row['role_id']}");
+ }
+ }
+ while ($row = $db->sql_fetchrow($result));
+ }
+ $db->sql_freeresult($result);
+
+ // Display assigned items?
+ $display_item = request_var('display_item', 0);
+
+ // Select existing roles
+ $sql = 'SELECT *
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_type = '" . $db->sql_escape($permission_type) . "'
+ ORDER BY role_order ASC";
+ $result = $db->sql_query($sql);
+
+ $s_role_options = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $role_name = (!empty($user->lang[$row['role_name']])) ? $user->lang[$row['role_name']] : $row['role_name'];
+
+ $template->assign_block_vars('roles', array(
+ 'ROLE_NAME' => $role_name,
+ 'ROLE_DESCRIPTION' => (!empty($user->lang[$row['role_description']])) ? $user->lang[$row['role_description']] : nl2br($row['role_description']),
+
+ 'U_EDIT' => $this->u_action . '&amp;action=edit&amp;role_id=' . $row['role_id'],
+ 'U_REMOVE' => $this->u_action . '&amp;action=remove&amp;role_id=' . $row['role_id'],
+ 'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;order=' . $row['role_order'],
+ 'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;order=' . $row['role_order'],
+ 'U_DISPLAY_ITEMS' => ($row['role_id'] == $display_item) ? '' : $this->u_action . '&amp;display_item=' . $row['role_id'] . '#assigned_to')
+ );
+
+ $s_role_options .= '<option value="' . $row['role_id'] . '">' . $role_name . '</option>';
+
+ if ($display_item == $row['role_id'])
+ {
+ $template->assign_vars(array(
+ 'L_ROLE_ASSIGNED_TO' => sprintf($user->lang['ROLE_ASSIGNED_TO'], $role_name))
+ );
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'S_ROLE_OPTIONS' => $s_role_options)
+ );
+
+ if ($display_item)
+ {
+ $template->assign_vars(array(
+ 'S_DISPLAY_ROLE_MASK' => true)
+ );
+
+ $hold_ary = $auth_admin->get_role_mask($display_item);
+ $auth_admin->display_role_mask($hold_ary);
+ }
+ }
+
+ /**
+ * Display permission settings able to be set
+ */
+ function display_auth_options($auth_options)
+ {
+ global $template, $user;
+
+ $content_array = $categories = array();
+ $key_sort_array = array(0);
+ $auth_options = array(0 => $auth_options);
+
+ // Making use of auth_admin method here (we do not really want to change two similar code fragments)
+ auth_admin::build_permission_array($auth_options, $content_array, $categories, $key_sort_array);
+
+ $content_array = $content_array[0];
+
+ $template->assign_var('S_NUM_PERM_COLS', sizeof($categories));
+
+ // Assign to template
+ foreach ($content_array as $cat => $cat_array)
+ {
+ $template->assign_block_vars('auth', array(
+ 'CAT_NAME' => $user->lang['permission_cat'][$cat],
+
+ 'S_YES' => ($cat_array['S_YES'] && !$cat_array['S_NEVER'] && !$cat_array['S_NO']) ? true : false,
+ 'S_NEVER' => ($cat_array['S_NEVER'] && !$cat_array['S_YES'] && !$cat_array['S_NO']) ? true : false,
+ 'S_NO' => ($cat_array['S_NO'] && !$cat_array['S_NEVER'] && !$cat_array['S_YES']) ? true : false)
+ );
+
+ foreach ($cat_array['permissions'] as $permission => $allowed)
+ {
+ $template->assign_block_vars('auth.mask', array(
+ 'S_YES' => ($allowed == ACL_YES) ? true : false,
+ 'S_NEVER' => ($allowed == ACL_NEVER) ? true : false,
+ 'S_NO' => ($allowed == ACL_NO) ? true : false,
+
+ 'FIELD_NAME' => $permission,
+ 'PERMISSION' => $user->lang['acl_' . $permission]['lang'])
+ );
+ }
+ }
+ }
+
+ /**
+ * Remove role
+ */
+ function remove_role($role_id, $permission_type)
+ {
+ global $db;
+
+ $auth_admin = new auth_admin();
+
+ // Get complete auth array
+ $sql = 'SELECT auth_option, auth_option_id
+ FROM ' . ACL_OPTIONS_TABLE . "
+ WHERE auth_option " . $db->sql_like_expression($permission_type . $db->any_char);
+ $result = $db->sql_query($sql);
+
+ $auth_settings = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $auth_settings[$row['auth_option']] = ACL_NO;
+ }
+ $db->sql_freeresult($result);
+
+ // Get the role auth settings we need to re-set...
+ $sql = 'SELECT o.auth_option, r.auth_setting
+ FROM ' . ACL_ROLES_DATA_TABLE . ' r, ' . ACL_OPTIONS_TABLE . ' o
+ WHERE o.auth_option_id = r.auth_option_id
+ AND r.role_id = ' . $role_id;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $auth_settings[$row['auth_option']] = $row['auth_setting'];
+ }
+ $db->sql_freeresult($result);
+
+ // Get role assignments
+ $hold_ary = $auth_admin->get_role_mask($role_id);
+
+ // Re-assign permissions
+ foreach ($hold_ary as $forum_id => $forum_ary)
+ {
+ if (isset($forum_ary['users']))
+ {
+ $auth_admin->acl_set('user', $forum_id, $forum_ary['users'], $auth_settings, 0, false);
+ }
+
+ if (isset($forum_ary['groups']))
+ {
+ $auth_admin->acl_set('group', $forum_id, $forum_ary['groups'], $auth_settings, 0, false);
+ }
+ }
+
+ // Remove role from users and groups just to be sure (happens through acl_set)
+ $sql = 'DELETE FROM ' . ACL_USERS_TABLE . '
+ WHERE auth_role_id = ' . $role_id;
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . '
+ WHERE auth_role_id = ' . $role_id;
+ $db->sql_query($sql);
+
+ // Remove role data and role
+ $sql = 'DELETE FROM ' . ACL_ROLES_DATA_TABLE . '
+ WHERE role_id = ' . $role_id;
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_ROLES_TABLE . '
+ WHERE role_id = ' . $role_id;
+ $db->sql_query($sql);
+
+ $auth_admin->acl_clear_prefetch();
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
new file mode 100644
index 0000000000..e9f0af5071
--- /dev/null
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -0,0 +1,1315 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_permissions
+{
+ var $u_action;
+ var $permission_dropdown;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template, $cache;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
+
+ $auth_admin = new auth_admin();
+
+ $user->add_lang('acp/permissions');
+ add_permission_language();
+
+ $this->tpl_name = 'acp_permissions';
+
+ // Trace has other vars
+ if ($mode == 'trace')
+ {
+ $user_id = request_var('u', 0);
+ $forum_id = request_var('f', 0);
+ $permission = request_var('auth', '');
+
+ $this->tpl_name = 'permission_trace';
+
+ if ($user_id && isset($auth_admin->acl_options['id'][$permission]) && $auth->acl_get('a_viewauth'))
+ {
+ $this->page_title = sprintf($user->lang['TRACE_PERMISSION'], $user->lang['acl_' . $permission]['lang']);
+ $this->permission_trace($user_id, $forum_id, $permission);
+ return;
+ }
+ trigger_error('NO_MODE', E_USER_ERROR);
+ }
+
+ // Copy forum permissions
+ if ($mode == 'setting_forum_copy')
+ {
+ $this->tpl_name = 'permission_forum_copy';
+
+ if ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))
+ {
+ $this->page_title = 'ACP_FORUM_PERMISSIONS_COPY';
+ $this->copy_forum_permissions();
+ return;
+ }
+
+ trigger_error('NO_MODE', E_USER_ERROR);
+ }
+
+ // Set some vars
+ $action = request_var('action', array('' => 0));
+ $action = key($action);
+ $action = (isset($_POST['psubmit'])) ? 'apply_permissions' : $action;
+
+ $all_forums = request_var('all_forums', 0);
+ $subforum_id = request_var('subforum_id', 0);
+ $forum_id = request_var('forum_id', array(0));
+
+ $username = request_var('username', array(''), true);
+ $usernames = request_var('usernames', '', true);
+ $user_id = request_var('user_id', array(0));
+
+ $group_id = request_var('group_id', array(0));
+ $select_all_groups = request_var('select_all_groups', 0);
+
+ $form_name = 'acp_permissions';
+ add_form_key($form_name);
+
+ // If select all groups is set, we pre-build the group id array (this option is used for other screens to link to the permission settings screen)
+ if ($select_all_groups)
+ {
+ // Add default groups to selection
+ $sql_and = (!$config['coppa_enable']) ? " AND group_name <> 'REGISTERED_COPPA'" : '';
+
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_type = ' . GROUP_SPECIAL . "
+ $sql_and";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $group_id[] = $row['group_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ // Map usernames to ids and vice versa
+ if ($usernames)
+ {
+ $username = explode("\n", $usernames);
+ }
+ unset($usernames);
+
+ if (sizeof($username) && !sizeof($user_id))
+ {
+ user_get_id_name($user_id, $username);
+
+ if (!sizeof($user_id))
+ {
+ trigger_error($user->lang['SELECTED_USER_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+ unset($username);
+
+ // Build forum ids (of all forums are checked or subforum listing used)
+ if ($all_forums)
+ {
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ ORDER BY left_id';
+ $result = $db->sql_query($sql);
+
+ $forum_id = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_id[] = (int) $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+ else if ($subforum_id)
+ {
+ $forum_id = array();
+ foreach (get_forum_branch($subforum_id, 'children') as $row)
+ {
+ $forum_id[] = (int) $row['forum_id'];
+ }
+ }
+
+ // Define some common variables for every mode
+ $error = array();
+
+ $permission_scope = (strpos($mode, '_global') !== false) ? 'global' : 'local';
+
+ // Showing introductionary page?
+ if ($mode == 'intro')
+ {
+ $this->page_title = 'ACP_PERMISSIONS';
+
+ $template->assign_vars(array(
+ 'S_INTRO' => true)
+ );
+
+ return;
+ }
+
+ switch ($mode)
+ {
+ case 'setting_user_global':
+ case 'setting_group_global':
+ $this->permission_dropdown = array('u_', 'm_', 'a_');
+ $permission_victim = ($mode == 'setting_user_global') ? array('user') : array('group');
+ $this->page_title = ($mode == 'setting_user_global') ? 'ACP_USERS_PERMISSIONS' : 'ACP_GROUPS_PERMISSIONS';
+ break;
+
+ case 'setting_user_local':
+ case 'setting_group_local':
+ $this->permission_dropdown = array('f_', 'm_');
+ $permission_victim = ($mode == 'setting_user_local') ? array('user', 'forums') : array('group', 'forums');
+ $this->page_title = ($mode == 'setting_user_local') ? 'ACP_USERS_FORUM_PERMISSIONS' : 'ACP_GROUPS_FORUM_PERMISSIONS';
+ break;
+
+ case 'setting_admin_global':
+ case 'setting_mod_global':
+ $this->permission_dropdown = (strpos($mode, '_admin_') !== false) ? array('a_') : array('m_');
+ $permission_victim = array('usergroup');
+ $this->page_title = ($mode == 'setting_admin_global') ? 'ACP_ADMINISTRATORS' : 'ACP_GLOBAL_MODERATORS';
+ break;
+
+ case 'setting_mod_local':
+ case 'setting_forum_local':
+ $this->permission_dropdown = ($mode == 'setting_mod_local') ? array('m_') : array('f_');
+ $permission_victim = array('forums', 'usergroup');
+ $this->page_title = ($mode == 'setting_mod_local') ? 'ACP_FORUM_MODERATORS' : 'ACP_FORUM_PERMISSIONS';
+ break;
+
+ case 'view_admin_global':
+ case 'view_user_global':
+ case 'view_mod_global':
+ $this->permission_dropdown = ($mode == 'view_admin_global') ? array('a_') : (($mode == 'view_user_global') ? array('u_') : array('m_'));
+ $permission_victim = array('usergroup_view');
+ $this->page_title = ($mode == 'view_admin_global') ? 'ACP_VIEW_ADMIN_PERMISSIONS' : (($mode == 'view_user_global') ? 'ACP_VIEW_USER_PERMISSIONS' : 'ACP_VIEW_GLOBAL_MOD_PERMISSIONS');
+ break;
+
+ case 'view_mod_local':
+ case 'view_forum_local':
+ $this->permission_dropdown = ($mode == 'view_mod_local') ? array('m_') : array('f_');
+ $permission_victim = array('forums', 'usergroup_view');
+ $this->page_title = ($mode == 'view_mod_local') ? 'ACP_VIEW_FORUM_MOD_PERMISSIONS' : 'ACP_VIEW_FORUM_PERMISSIONS';
+ break;
+
+ default:
+ trigger_error('NO_MODE', E_USER_ERROR);
+ break;
+ }
+
+ $template->assign_vars(array(
+ 'L_TITLE' => $user->lang[$this->page_title],
+ 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'])
+ );
+
+ // Get permission type
+ $permission_type = request_var('type', $this->permission_dropdown[0]);
+
+ if (!in_array($permission_type, $this->permission_dropdown))
+ {
+ trigger_error($user->lang['WRONG_PERMISSION_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // Handle actions
+ if (strpos($mode, 'setting_') === 0 && $action)
+ {
+ switch ($action)
+ {
+ case 'delete':
+ if (confirm_box(true))
+ {
+ // All users/groups selected?
+ $all_users = (isset($_POST['all_users'])) ? true : false;
+ $all_groups = (isset($_POST['all_groups'])) ? true : false;
+
+ if ($all_users || $all_groups)
+ {
+ $items = $this->retrieve_defined_user_groups($permission_scope, $forum_id, $permission_type);
+
+ if ($all_users && sizeof($items['user_ids']))
+ {
+ $user_id = $items['user_ids'];
+ }
+ else if ($all_groups && sizeof($items['group_ids']))
+ {
+ $group_id = $items['group_ids'];
+ }
+ }
+
+ if (sizeof($user_id) || sizeof($group_id))
+ {
+ $this->remove_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id, $forum_id);
+ }
+ else
+ {
+ trigger_error($user->lang['NO_USER_GROUP_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+ else
+ {
+ if (isset($_POST['cancel']))
+ {
+ $u_redirect = $this->u_action . '&amp;type=' . $permission_type;
+ foreach ($forum_id as $fid)
+ {
+ $u_redirect .= '&amp;forum_id[]=' . $fid;
+ }
+ redirect($u_redirect);
+ }
+
+ $s_hidden_fields = array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => array($action => 1),
+ 'user_id' => $user_id,
+ 'group_id' => $group_id,
+ 'forum_id' => $forum_id,
+ 'type' => $permission_type,
+ );
+ if (isset($_POST['all_users']))
+ {
+ $s_hidden_fields['all_users'] = 1;
+ }
+ if (isset($_POST['all_groups']))
+ {
+ $s_hidden_fields['all_groups'] = 1;
+ }
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($s_hidden_fields));
+ }
+ break;
+
+ case 'apply_permissions':
+ if (!isset($_POST['setting']))
+ {
+ trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $this->set_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id);
+ break;
+
+ case 'apply_all_permissions':
+ if (!isset($_POST['setting']))
+ {
+ trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $this->set_all_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id);
+ break;
+ }
+ }
+
+
+ // Setting permissions screen
+ $s_hidden_fields = build_hidden_fields(array(
+ 'user_id' => $user_id,
+ 'group_id' => $group_id,
+ 'forum_id' => $forum_id,
+ 'type' => $permission_type)
+ );
+
+ // Go through the screens/options needed and present them in correct order
+ foreach ($permission_victim as $victim)
+ {
+ switch ($victim)
+ {
+ case 'forum_dropdown':
+
+ if (sizeof($forum_id))
+ {
+ $this->check_existence('forum', $forum_id);
+ continue 2;
+ }
+
+ $template->assign_vars(array(
+ 'S_SELECT_FORUM' => true,
+ 'S_FORUM_OPTIONS' => make_forum_select(false, false, true, false, false))
+ );
+
+ break;
+
+ case 'forums':
+
+ if (sizeof($forum_id))
+ {
+ $this->check_existence('forum', $forum_id);
+ continue 2;
+ }
+
+ $forum_list = make_forum_select(false, false, true, false, false, false, true);
+
+ // Build forum options
+ $s_forum_options = '';
+ foreach ($forum_list as $f_id => $f_row)
+ {
+ $s_forum_options .= '<option value="' . $f_id . '"' . (($f_row['selected']) ? ' selected="selected"' : '') . (($f_row['disabled']) ? ' disabled="disabled" class="disabled-option"' : '') . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
+ }
+
+ // Build subforum options
+ $s_subforum_options = $this->build_subforum_options($forum_list);
+
+ $template->assign_vars(array(
+ 'S_SELECT_FORUM' => true,
+ 'S_FORUM_OPTIONS' => $s_forum_options,
+ 'S_SUBFORUM_OPTIONS' => $s_subforum_options,
+ 'S_FORUM_ALL' => true,
+ 'S_FORUM_MULTIPLE' => true)
+ );
+
+ break;
+
+ case 'user':
+
+ if (sizeof($user_id))
+ {
+ $this->check_existence('user', $user_id);
+ continue 2;
+ }
+
+ $template->assign_vars(array(
+ 'S_SELECT_USER' => true,
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=select_victim&amp;field=username&amp;select_single=true'),
+ ));
+
+ break;
+
+ case 'group':
+
+ if (sizeof($group_id))
+ {
+ $this->check_existence('group', $group_id);
+ continue 2;
+ }
+
+ $template->assign_vars(array(
+ 'S_SELECT_GROUP' => true,
+ 'S_GROUP_OPTIONS' => group_select_options(false, false, false), // Show all groups
+ ));
+
+ break;
+
+ case 'usergroup':
+ case 'usergroup_view':
+
+ $all_users = (isset($_POST['all_users'])) ? true : false;
+ $all_groups = (isset($_POST['all_groups'])) ? true : false;
+
+ if ((sizeof($user_id) && !$all_users) || (sizeof($group_id) && !$all_groups))
+ {
+ if (sizeof($user_id))
+ {
+ $this->check_existence('user', $user_id);
+ }
+
+ if (sizeof($group_id))
+ {
+ $this->check_existence('group', $group_id);
+ }
+
+ continue 2;
+ }
+
+ // Now we check the users... because the "all"-selection is different here (all defined users/groups)
+ $items = $this->retrieve_defined_user_groups($permission_scope, $forum_id, $permission_type);
+
+ if ($all_users && sizeof($items['user_ids']))
+ {
+ $user_id = $items['user_ids'];
+ continue 2;
+ }
+
+ if ($all_groups && sizeof($items['group_ids']))
+ {
+ $group_id = $items['group_ids'];
+ continue 2;
+ }
+
+ $template->assign_vars(array(
+ 'S_SELECT_USERGROUP' => ($victim == 'usergroup') ? true : false,
+ 'S_SELECT_USERGROUP_VIEW' => ($victim == 'usergroup_view') ? true : false,
+ 'S_DEFINED_USER_OPTIONS' => $items['user_ids_options'],
+ 'S_DEFINED_GROUP_OPTIONS' => $items['group_ids_options'],
+ 'S_ADD_GROUP_OPTIONS' => group_select_options(false, $items['group_ids'], false), // Show all groups
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=add_user&amp;field=username&amp;select_single=true'),
+ ));
+
+ break;
+ }
+
+ // The S_ALLOW_SELECT parameter below is a measure to lower memory usage.
+ // If there are more than 5 forums selected the admin is not able to select all users/groups too.
+ // We need to see if the number of forums can be increased or need to be decreased.
+
+ $template->assign_vars(array(
+ 'U_ACTION' => $this->u_action,
+ 'ANONYMOUS_USER_ID' => ANONYMOUS,
+
+ 'S_SELECT_VICTIM' => true,
+ 'S_ALLOW_ALL_SELECT' => (sizeof($forum_id) > 5) ? false : true,
+ 'S_CAN_SELECT_USER' => ($auth->acl_get('a_authusers')) ? true : false,
+ 'S_CAN_SELECT_GROUP' => ($auth->acl_get('a_authgroups')) ? true : false,
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields)
+ );
+
+ // Let the forum names being displayed
+ if (sizeof($forum_id))
+ {
+ $sql = 'SELECT forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_id) . '
+ ORDER BY left_id ASC';
+ $result = $db->sql_query($sql);
+
+ $forum_names = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_names[] = $row['forum_name'];
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'S_FORUM_NAMES' => (sizeof($forum_names)) ? true : false,
+ 'FORUM_NAMES' => implode(', ', $forum_names))
+ );
+ }
+
+ return;
+ }
+
+ // Do not allow forum_ids being set and no other setting defined (will bog down the server too much)
+ if (sizeof($forum_id) && !sizeof($user_id) && !sizeof($group_id))
+ {
+ trigger_error($user->lang['ONLY_FORUM_DEFINED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $template->assign_vars(array(
+ 'S_PERMISSION_DROPDOWN' => (sizeof($this->permission_dropdown) > 1) ? $this->build_permission_dropdown($this->permission_dropdown, $permission_type, $permission_scope) : false,
+ 'L_PERMISSION_TYPE' => $user->lang['ACL_TYPE_' . strtoupper($permission_type)],
+
+ 'U_ACTION' => $this->u_action,
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields)
+ );
+
+ if (strpos($mode, 'setting_') === 0)
+ {
+ $template->assign_vars(array(
+ 'S_SETTING_PERMISSIONS' => true)
+ );
+
+ $hold_ary = $auth_admin->get_mask('set', (sizeof($user_id)) ? $user_id : false, (sizeof($group_id)) ? $group_id : false, (sizeof($forum_id)) ? $forum_id : false, $permission_type, $permission_scope, ACL_NO);
+ $auth_admin->display_mask('set', $permission_type, $hold_ary, ((sizeof($user_id)) ? 'user' : 'group'), (($permission_scope == 'local') ? true : false));
+ }
+ else
+ {
+ $template->assign_vars(array(
+ 'S_VIEWING_PERMISSIONS' => true)
+ );
+
+ $hold_ary = $auth_admin->get_mask('view', (sizeof($user_id)) ? $user_id : false, (sizeof($group_id)) ? $group_id : false, (sizeof($forum_id)) ? $forum_id : false, $permission_type, $permission_scope, ACL_NEVER);
+ $auth_admin->display_mask('view', $permission_type, $hold_ary, ((sizeof($user_id)) ? 'user' : 'group'), (($permission_scope == 'local') ? true : false));
+ }
+ }
+
+ /**
+ * Build +subforum options
+ */
+ function build_subforum_options($forum_list)
+ {
+ global $user;
+
+ $s_options = '';
+
+ $forum_list = array_merge($forum_list);
+
+ foreach ($forum_list as $key => $row)
+ {
+ if ($row['disabled'])
+ {
+ continue;
+ }
+
+ $s_options .= '<option value="' . $row['forum_id'] . '"' . (($row['selected']) ? ' selected="selected"' : '') . '>' . $row['padding'] . $row['forum_name'];
+
+ // We check if a branch is there...
+ $branch_there = false;
+
+ foreach (array_slice($forum_list, $key + 1) as $temp_row)
+ {
+ if ($temp_row['left_id'] > $row['left_id'] && $temp_row['left_id'] < $row['right_id'])
+ {
+ $branch_there = true;
+ break;
+ }
+ continue;
+ }
+
+ if ($branch_there)
+ {
+ $s_options .= ' [' . $user->lang['PLUS_SUBFORUMS'] . ']';
+ }
+
+ $s_options .= '</option>';
+ }
+
+ return $s_options;
+ }
+
+ /**
+ * Build dropdown field for changing permission types
+ */
+ function build_permission_dropdown($options, $default_option, $permission_scope)
+ {
+ global $user, $auth;
+
+ $s_dropdown_options = '';
+ foreach ($options as $setting)
+ {
+ if (!$auth->acl_get('a_' . str_replace('_', '', $setting) . 'auth'))
+ {
+ continue;
+ }
+
+ $selected = ($setting == $default_option) ? ' selected="selected"' : '';
+ $l_setting = (isset($user->lang['permission_type'][$permission_scope][$setting])) ? $user->lang['permission_type'][$permission_scope][$setting] : $user->lang['permission_type'][$setting];
+ $s_dropdown_options .= '<option value="' . $setting . '"' . $selected . '>' . $l_setting . '</option>';
+ }
+
+ return $s_dropdown_options;
+ }
+
+ /**
+ * Check if selected items exist. Remove not found ids and if empty return error.
+ */
+ function check_existence($mode, &$ids)
+ {
+ global $db, $user;
+
+ switch ($mode)
+ {
+ case 'user':
+ $table = USERS_TABLE;
+ $sql_id = 'user_id';
+ break;
+
+ case 'group':
+ $table = GROUPS_TABLE;
+ $sql_id = 'group_id';
+ break;
+
+ case 'forum':
+ $table = FORUMS_TABLE;
+ $sql_id = 'forum_id';
+ break;
+ }
+
+ if (sizeof($ids))
+ {
+ $sql = "SELECT $sql_id
+ FROM $table
+ WHERE " . $db->sql_in_set($sql_id, $ids);
+ $result = $db->sql_query($sql);
+
+ $ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $ids[] = (int) $row[$sql_id];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (!sizeof($ids))
+ {
+ trigger_error($user->lang['SELECTED_' . strtoupper($mode) . '_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+
+ /**
+ * Apply permissions
+ */
+ function set_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id)
+ {
+ global $user, $auth;
+
+ $psubmit = request_var('psubmit', array(0 => array(0 => 0)));
+
+ // User or group to be set?
+ $ug_type = (sizeof($user_id)) ? 'user' : 'group';
+
+ // Check the permission setting again
+ if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
+ {
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $ug_id = $forum_id = 0;
+
+ // We loop through the auth settings defined in our submit
+ list($ug_id, ) = each($psubmit);
+ list($forum_id, ) = each($psubmit[$ug_id]);
+
+ if (empty($_POST['setting']) || empty($_POST['setting'][$ug_id]) || empty($_POST['setting'][$ug_id][$forum_id]) || !is_array($_POST['setting'][$ug_id][$forum_id]))
+ {
+ trigger_error('WRONG_PERMISSION_SETTING_FORMAT', E_USER_WARNING);
+ }
+
+ // We obtain and check $_POST['setting'][$ug_id][$forum_id] directly and not using request_var() because request_var()
+ // currently does not support the amount of dimensions required. ;)
+ // $auth_settings = request_var('setting', array(0 => array(0 => array('' => 0))));
+ $auth_settings = array_map('intval', $_POST['setting'][$ug_id][$forum_id]);
+
+ // Do we have a role we want to set?
+ $assigned_role = (isset($_POST['role'][$ug_id][$forum_id])) ? (int) $_POST['role'][$ug_id][$forum_id] : 0;
+
+ // Do the admin want to set these permissions to other items too?
+ $inherit = request_var('inherit', array(0 => array(0)));
+
+ $ug_id = array($ug_id);
+ $forum_id = array($forum_id);
+
+ if (sizeof($inherit))
+ {
+ foreach ($inherit as $_ug_id => $forum_id_ary)
+ {
+ // Inherit users/groups?
+ if (!in_array($_ug_id, $ug_id))
+ {
+ $ug_id[] = $_ug_id;
+ }
+
+ // Inherit forums?
+ $forum_id = array_merge($forum_id, array_keys($forum_id_ary));
+ }
+ }
+
+ $forum_id = array_unique($forum_id);
+
+ // If the auth settings differ from the assigned role, then do not set a role...
+ if ($assigned_role)
+ {
+ if (!$this->check_assigned_role($assigned_role, $auth_settings))
+ {
+ $assigned_role = 0;
+ }
+ }
+
+ // Update the permission set...
+ $auth_admin->acl_set($ug_type, $forum_id, $ug_id, $auth_settings, $assigned_role);
+
+ // Do we need to recache the moderator lists?
+ if ($permission_type == 'm_')
+ {
+ cache_moderators();
+ }
+
+ // Remove users who are now moderators or admins from everyones foes list
+ if ($permission_type == 'm_' || $permission_type == 'a_')
+ {
+ update_foes($group_id, $user_id);
+ }
+
+ $this->log_action($mode, 'add', $permission_type, $ug_type, $ug_id, $forum_id);
+
+ trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
+ }
+
+ /**
+ * Apply all permissions
+ */
+ function set_all_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id)
+ {
+ global $user, $auth;
+
+ // User or group to be set?
+ $ug_type = (sizeof($user_id)) ? 'user' : 'group';
+
+ // Check the permission setting again
+ if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
+ {
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $auth_settings = (isset($_POST['setting'])) ? $_POST['setting'] : array();
+ $auth_roles = (isset($_POST['role'])) ? $_POST['role'] : array();
+ $ug_ids = $forum_ids = array();
+
+ // We need to go through the auth settings
+ foreach ($auth_settings as $ug_id => $forum_auth_row)
+ {
+ $ug_id = (int) $ug_id;
+ $ug_ids[] = $ug_id;
+
+ foreach ($forum_auth_row as $forum_id => $auth_options)
+ {
+ $forum_id = (int) $forum_id;
+ $forum_ids[] = $forum_id;
+
+ // Check role...
+ $assigned_role = (isset($auth_roles[$ug_id][$forum_id])) ? (int) $auth_roles[$ug_id][$forum_id] : 0;
+
+ // If the auth settings differ from the assigned role, then do not set a role...
+ if ($assigned_role)
+ {
+ if (!$this->check_assigned_role($assigned_role, $auth_options))
+ {
+ $assigned_role = 0;
+ }
+ }
+
+ // Update the permission set...
+ $auth_admin->acl_set($ug_type, $forum_id, $ug_id, $auth_options, $assigned_role, false);
+ }
+ }
+
+ $auth_admin->acl_clear_prefetch();
+
+ // Do we need to recache the moderator lists?
+ if ($permission_type == 'm_')
+ {
+ cache_moderators();
+ }
+
+ // Remove users who are now moderators or admins from everyones foes list
+ if ($permission_type == 'm_' || $permission_type == 'a_')
+ {
+ update_foes($group_id, $user_id);
+ }
+
+ $this->log_action($mode, 'add', $permission_type, $ug_type, $ug_ids, $forum_ids);
+
+ if ($mode == 'setting_forum_local' || $mode == 'setting_mod_local')
+ {
+ trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action . '&amp;forum_id[]=' . implode('&amp;forum_id[]=', $forum_ids)));
+ }
+ else
+ {
+ trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
+ }
+ }
+
+ /**
+ * Compare auth settings with auth settings from role
+ * returns false if they differ, true if they are equal
+ */
+ function check_assigned_role($role_id, &$auth_settings)
+ {
+ global $db;
+
+ $sql = 'SELECT o.auth_option, r.auth_setting
+ FROM ' . ACL_OPTIONS_TABLE . ' o, ' . ACL_ROLES_DATA_TABLE . ' r
+ WHERE o.auth_option_id = r.auth_option_id
+ AND r.role_id = ' . $role_id;
+ $result = $db->sql_query($sql);
+
+ $test_auth_settings = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $test_auth_settings[$row['auth_option']] = $row['auth_setting'];
+ }
+ $db->sql_freeresult($result);
+
+ // We need to add any ACL_NO setting from auth_settings to compare correctly
+ foreach ($auth_settings as $option => $setting)
+ {
+ if ($setting == ACL_NO)
+ {
+ $test_auth_settings[$option] = $setting;
+ }
+ }
+
+ if (sizeof(array_diff_assoc($auth_settings, $test_auth_settings)))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Remove permissions
+ */
+ function remove_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id, &$forum_id)
+ {
+ global $user, $db, $auth;
+
+ // User or group to be set?
+ $ug_type = (sizeof($user_id)) ? 'user' : 'group';
+
+ // Check the permission setting again
+ if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
+ {
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $auth_admin->acl_delete($ug_type, (($ug_type == 'user') ? $user_id : $group_id), (sizeof($forum_id) ? $forum_id : false), $permission_type);
+
+ // Do we need to recache the moderator lists?
+ if ($permission_type == 'm_')
+ {
+ cache_moderators();
+ }
+
+ $this->log_action($mode, 'del', $permission_type, $ug_type, (($ug_type == 'user') ? $user_id : $group_id), (sizeof($forum_id) ? $forum_id : array(0 => 0)));
+
+ if ($mode == 'setting_forum_local' || $mode == 'setting_mod_local')
+ {
+ trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action . '&amp;forum_id[]=' . implode('&amp;forum_id[]=', $forum_id)));
+ }
+ else
+ {
+ trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
+ }
+ }
+
+ /**
+ * Log permission changes
+ */
+ function log_action($mode, $action, $permission_type, $ug_type, $ug_id, $forum_id)
+ {
+ global $db, $user;
+
+ if (!is_array($ug_id))
+ {
+ $ug_id = array($ug_id);
+ }
+
+ if (!is_array($forum_id))
+ {
+ $forum_id = array($forum_id);
+ }
+
+ // Logging ... first grab user or groupnames ...
+ $sql = ($ug_type == 'group') ? 'SELECT group_name as name, group_type FROM ' . GROUPS_TABLE . ' WHERE ' : 'SELECT username as name FROM ' . USERS_TABLE . ' WHERE ';
+ $sql .= $db->sql_in_set(($ug_type == 'group') ? 'group_id' : 'user_id', array_map('intval', $ug_id));
+ $result = $db->sql_query($sql);
+
+ $l_ug_list = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $l_ug_list .= (($l_ug_list != '') ? ', ' : '') . ((isset($row['group_type']) && $row['group_type'] == GROUP_SPECIAL) ? '<span class="sep">' . $user->lang['G_' . $row['name']] . '</span>' : $row['name']);
+ }
+ $db->sql_freeresult($result);
+
+ $mode = str_replace('setting_', '', $mode);
+
+ if ($forum_id[0] == 0)
+ {
+ add_log('admin', 'LOG_ACL_' . strtoupper($action) . '_' . strtoupper($mode) . '_' . strtoupper($permission_type), $l_ug_list);
+ }
+ else
+ {
+ // Grab the forum details if non-zero forum_id
+ $sql = 'SELECT forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_id);
+ $result = $db->sql_query($sql);
+
+ $l_forum_list = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $l_forum_list .= (($l_forum_list != '') ? ', ' : '') . $row['forum_name'];
+ }
+ $db->sql_freeresult($result);
+
+ add_log('admin', 'LOG_ACL_' . strtoupper($action) . '_' . strtoupper($mode) . '_' . strtoupper($permission_type), $l_forum_list, $l_ug_list);
+ }
+ }
+
+ /**
+ * Display a complete trace tree for the selected permission to determine where settings are set/unset
+ */
+ function permission_trace($user_id, $forum_id, $permission)
+ {
+ global $db, $template, $user, $auth;
+
+ if ($user_id != $user->data['user_id'])
+ {
+ $sql = 'SELECT user_id, username, user_permissions, user_type
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . $user_id;
+ $result = $db->sql_query($sql);
+ $userdata = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $userdata = $user->data;
+ }
+
+ if (!$userdata)
+ {
+ trigger_error('NO_USERS', E_USER_ERROR);
+ }
+
+ $forum_name = false;
+
+ if ($forum_id)
+ {
+ $sql = 'SELECT forum_name
+ FROM ' . FORUMS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $result = $db->sql_query($sql, 3600);
+ $forum_name = $db->sql_fetchfield('forum_name');
+ $db->sql_freeresult($result);
+ }
+
+ $back = request_var('back', 0);
+
+ $template->assign_vars(array(
+ 'PERMISSION' => $user->lang['acl_' . $permission]['lang'],
+ 'PERMISSION_USERNAME' => $userdata['username'],
+ 'FORUM_NAME' => $forum_name,
+
+ 'S_GLOBAL_TRACE' => ($forum_id) ? false : true,
+
+ 'U_BACK' => ($back) ? build_url(array('f', 'back')) . "&amp;f=$back" : '')
+ );
+
+ $template->assign_block_vars('trace', array(
+ 'WHO' => $user->lang['DEFAULT'],
+ 'INFORMATION' => $user->lang['TRACE_DEFAULT'],
+
+ 'S_SETTING_NO' => true,
+ 'S_TOTAL_NO' => true)
+ );
+
+ $sql = 'SELECT DISTINCT g.group_name, g.group_id, g.group_type
+ FROM ' . GROUPS_TABLE . ' g
+ LEFT JOIN ' . USER_GROUP_TABLE . ' ug ON (ug.group_id = g.group_id)
+ WHERE ug.user_id = ' . $user_id . '
+ AND ug.user_pending = 0
+ AND NOT (ug.group_leader = 1 AND g.group_skip_auth = 1)
+ ORDER BY g.group_type DESC, g.group_id DESC';
+ $result = $db->sql_query($sql);
+
+ $groups = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $groups[$row['group_id']] = array(
+ 'auth_setting' => ACL_NO,
+ 'group_name' => ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']
+ );
+ }
+ $db->sql_freeresult($result);
+
+ $total = ACL_NO;
+ $add_key = (($forum_id) ? '_LOCAL' : '');
+
+ if (sizeof($groups))
+ {
+ // Get group auth settings
+ $hold_ary = $auth->acl_group_raw_data(array_keys($groups), $permission, $forum_id);
+
+ foreach ($hold_ary as $group_id => $forum_ary)
+ {
+ $groups[$group_id]['auth_setting'] = $hold_ary[$group_id][$forum_id][$permission];
+ }
+ unset($hold_ary);
+
+ foreach ($groups as $id => $row)
+ {
+ switch ($row['auth_setting'])
+ {
+ case ACL_NO:
+ $information = $user->lang['TRACE_GROUP_NO' . $add_key];
+ break;
+
+ case ACL_YES:
+ $information = ($total == ACL_YES) ? $user->lang['TRACE_GROUP_YES_TOTAL_YES' . $add_key] : (($total == ACL_NEVER) ? $user->lang['TRACE_GROUP_YES_TOTAL_NEVER' . $add_key] : $user->lang['TRACE_GROUP_YES_TOTAL_NO' . $add_key]);
+ $total = ($total == ACL_NO) ? ACL_YES : $total;
+ break;
+
+ case ACL_NEVER:
+ $information = ($total == ACL_YES) ? $user->lang['TRACE_GROUP_NEVER_TOTAL_YES' . $add_key] : (($total == ACL_NEVER) ? $user->lang['TRACE_GROUP_NEVER_TOTAL_NEVER' . $add_key] : $user->lang['TRACE_GROUP_NEVER_TOTAL_NO' . $add_key]);
+ $total = ACL_NEVER;
+ break;
+ }
+
+ $template->assign_block_vars('trace', array(
+ 'WHO' => $row['group_name'],
+ 'INFORMATION' => $information,
+
+ 'S_SETTING_NO' => ($row['auth_setting'] == ACL_NO) ? true : false,
+ 'S_SETTING_YES' => ($row['auth_setting'] == ACL_YES) ? true : false,
+ 'S_SETTING_NEVER' => ($row['auth_setting'] == ACL_NEVER) ? true : false,
+ 'S_TOTAL_NO' => ($total == ACL_NO) ? true : false,
+ 'S_TOTAL_YES' => ($total == ACL_YES) ? true : false,
+ 'S_TOTAL_NEVER' => ($total == ACL_NEVER) ? true : false)
+ );
+ }
+ }
+
+ // Get user specific permission... globally or for this forum
+ $hold_ary = $auth->acl_user_raw_data($user_id, $permission, $forum_id);
+ $auth_setting = (!sizeof($hold_ary)) ? ACL_NO : $hold_ary[$user_id][$forum_id][$permission];
+
+ switch ($auth_setting)
+ {
+ case ACL_NO:
+ $information = ($total == ACL_NO) ? $user->lang['TRACE_USER_NO_TOTAL_NO' . $add_key] : $user->lang['TRACE_USER_KEPT' . $add_key];
+ $total = ($total == ACL_NO) ? ACL_NEVER : $total;
+ break;
+
+ case ACL_YES:
+ $information = ($total == ACL_YES) ? $user->lang['TRACE_USER_YES_TOTAL_YES' . $add_key] : (($total == ACL_NEVER) ? $user->lang['TRACE_USER_YES_TOTAL_NEVER' . $add_key] : $user->lang['TRACE_USER_YES_TOTAL_NO' . $add_key]);
+ $total = ($total == ACL_NO) ? ACL_YES : $total;
+ break;
+
+ case ACL_NEVER:
+ $information = ($total == ACL_YES) ? $user->lang['TRACE_USER_NEVER_TOTAL_YES' . $add_key] : (($total == ACL_NEVER) ? $user->lang['TRACE_USER_NEVER_TOTAL_NEVER' . $add_key] : $user->lang['TRACE_USER_NEVER_TOTAL_NO' . $add_key]);
+ $total = ACL_NEVER;
+ break;
+ }
+
+ $template->assign_block_vars('trace', array(
+ 'WHO' => $userdata['username'],
+ 'INFORMATION' => $information,
+
+ 'S_SETTING_NO' => ($auth_setting == ACL_NO) ? true : false,
+ 'S_SETTING_YES' => ($auth_setting == ACL_YES) ? true : false,
+ 'S_SETTING_NEVER' => ($auth_setting == ACL_NEVER) ? true : false,
+ 'S_TOTAL_NO' => false,
+ 'S_TOTAL_YES' => ($total == ACL_YES) ? true : false,
+ 'S_TOTAL_NEVER' => ($total == ACL_NEVER) ? true : false)
+ );
+
+ if ($forum_id != 0 && isset($auth->acl_options['global'][$permission]))
+ {
+ if ($user_id != $user->data['user_id'])
+ {
+ $auth2 = new auth();
+ $auth2->acl($userdata);
+ $auth_setting = $auth2->acl_get($permission);
+ }
+ else
+ {
+ $auth_setting = $auth->acl_get($permission);
+ }
+
+ if ($auth_setting)
+ {
+ $information = ($total == ACL_YES) ? $user->lang['TRACE_USER_GLOBAL_YES_TOTAL_YES'] : $user->lang['TRACE_USER_GLOBAL_YES_TOTAL_NEVER'];
+ $total = ACL_YES;
+ }
+ else
+ {
+ $information = $user->lang['TRACE_USER_GLOBAL_NEVER_TOTAL_KEPT'];
+ }
+
+ // If there is no auth information we do not need to worry the user by showing non-relevant data.
+ if ($auth_setting)
+ {
+ $template->assign_block_vars('trace', array(
+ 'WHO' => sprintf($user->lang['TRACE_GLOBAL_SETTING'], $userdata['username']),
+ 'INFORMATION' => sprintf($information, '<a href="' . $this->u_action . "&amp;u=$user_id&amp;f=0&amp;auth=$permission&amp;back=$forum_id\">", '</a>'),
+
+ 'S_SETTING_NO' => false,
+ 'S_SETTING_YES' => $auth_setting,
+ 'S_SETTING_NEVER' => !$auth_setting,
+ 'S_TOTAL_NO' => false,
+ 'S_TOTAL_YES' => ($total == ACL_YES) ? true : false,
+ 'S_TOTAL_NEVER' => ($total == ACL_NEVER) ? true : false)
+ );
+ }
+ }
+
+ // Take founder status into account, overwriting the default values
+ if ($userdata['user_type'] == USER_FOUNDER && strpos($permission, 'a_') === 0)
+ {
+ $template->assign_block_vars('trace', array(
+ 'WHO' => $userdata['username'],
+ 'INFORMATION' => $user->lang['TRACE_USER_FOUNDER'],
+
+ 'S_SETTING_NO' => ($auth_setting == ACL_NO) ? true : false,
+ 'S_SETTING_YES' => ($auth_setting == ACL_YES) ? true : false,
+ 'S_SETTING_NEVER' => ($auth_setting == ACL_NEVER) ? true : false,
+ 'S_TOTAL_NO' => false,
+ 'S_TOTAL_YES' => true,
+ 'S_TOTAL_NEVER' => false)
+ );
+
+ $total = ACL_YES;
+ }
+
+ // Total value...
+ $template->assign_vars(array(
+ 'S_RESULT_NO' => ($total == ACL_NO) ? true : false,
+ 'S_RESULT_YES' => ($total == ACL_YES) ? true : false,
+ 'S_RESULT_NEVER' => ($total == ACL_NEVER) ? true : false,
+ ));
+ }
+
+ /**
+ * Handles copying permissions from one forum to others
+ */
+ function copy_forum_permissions()
+ {
+ global $auth, $cache, $template, $user;
+
+ $user->add_lang('acp/forums');
+
+ $submit = isset($_POST['submit']) ? true : false;
+
+ if ($submit)
+ {
+ $src = request_var('src_forum_id', 0);
+ $dest = request_var('dest_forum_ids', array(0));
+
+ if (confirm_box(true))
+ {
+ if (copy_forum_permissions($src, $dest))
+ {
+ cache_moderators();
+
+ $auth->acl_clear_prefetch();
+ $cache->destroy('sql', FORUMS_TABLE);
+
+ trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
+ }
+ else
+ {
+ trigger_error($user->lang['SELECTED_FORUM_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+ else
+ {
+ $s_hidden_fields = array(
+ 'submit' => $submit,
+ 'src_forum_id' => $src,
+ 'dest_forum_ids' => $dest,
+ );
+
+ $s_hidden_fields = build_hidden_fields($s_hidden_fields);
+
+ confirm_box(false, $user->lang['COPY_PERMISSIONS_CONFIRM'], $s_hidden_fields);
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_FORUM_OPTIONS' => make_forum_select(false, false, false, false, false),
+ ));
+ }
+
+ /**
+ * Get already assigned users/groups
+ */
+ function retrieve_defined_user_groups($permission_scope, $forum_id, $permission_type)
+ {
+ global $db, $user;
+
+ $sql_forum_id = ($permission_scope == 'global') ? 'AND a.forum_id = 0' : ((sizeof($forum_id)) ? 'AND ' . $db->sql_in_set('a.forum_id', $forum_id) : 'AND a.forum_id <> 0');
+
+ // Permission options are only able to be a permission set... therefore we will pre-fetch the possible options and also the possible roles
+ $option_ids = $role_ids = array();
+
+ $sql = 'SELECT auth_option_id
+ FROM ' . ACL_OPTIONS_TABLE . '
+ WHERE auth_option ' . $db->sql_like_expression($permission_type . $db->any_char);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $option_ids[] = (int) $row['auth_option_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($option_ids))
+ {
+ $sql = 'SELECT DISTINCT role_id
+ FROM ' . ACL_ROLES_DATA_TABLE . '
+ WHERE ' . $db->sql_in_set('auth_option_id', $option_ids);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $role_ids[] = (int) $row['role_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (sizeof($option_ids) && sizeof($role_ids))
+ {
+ $sql_where = 'AND (' . $db->sql_in_set('a.auth_option_id', $option_ids) . ' OR ' . $db->sql_in_set('a.auth_role_id', $role_ids) . ')';
+ }
+ else if (sizeof($role_ids))
+ {
+ $sql_where = 'AND ' . $db->sql_in_set('a.auth_role_id', $role_ids);
+ }
+ else if (sizeof($option_ids))
+ {
+ $sql_where = 'AND ' . $db->sql_in_set('a.auth_option_id', $option_ids);
+ }
+
+ // Not ideal, due to the filesort, non-use of indexes, etc.
+ $sql = 'SELECT DISTINCT u.user_id, u.username, u.username_clean, u.user_regdate
+ FROM ' . USERS_TABLE . ' u, ' . ACL_USERS_TABLE . " a
+ WHERE u.user_id = a.user_id
+ $sql_forum_id
+ $sql_where
+ ORDER BY u.username_clean, u.user_regdate ASC";
+ $result = $db->sql_query($sql);
+
+ $s_defined_user_options = '';
+ $defined_user_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $s_defined_user_options .= '<option value="' . $row['user_id'] . '">' . $row['username'] . '</option>';
+ $defined_user_ids[] = $row['user_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT DISTINCT g.group_type, g.group_name, g.group_id
+ FROM ' . GROUPS_TABLE . ' g, ' . ACL_GROUPS_TABLE . " a
+ WHERE g.group_id = a.group_id
+ $sql_forum_id
+ $sql_where
+ ORDER BY g.group_type DESC, g.group_name ASC";
+ $result = $db->sql_query($sql);
+
+ $s_defined_group_options = '';
+ $defined_group_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $s_defined_group_options .= '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '') . ' value="' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
+ $defined_group_ids[] = $row['group_id'];
+ }
+ $db->sql_freeresult($result);
+
+ return array(
+ 'group_ids' => $defined_group_ids,
+ 'group_ids_options' => $s_defined_group_options,
+ 'user_ids' => $defined_user_ids,
+ 'user_ids_options' => $s_defined_user_options
+ );
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_php_info.php b/phpBB/includes/acp/acp_php_info.php
new file mode 100644
index 0000000000..9935c0466e
--- /dev/null
+++ b/phpBB/includes/acp/acp_php_info.php
@@ -0,0 +1,84 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_php_info
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ if ($mode != 'info')
+ {
+ trigger_error('NO_MODE', E_USER_ERROR);
+ }
+
+ $this->tpl_name = 'acp_php_info';
+ $this->page_title = 'ACP_PHP_INFO';
+
+ ob_start();
+ @phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_VARIABLES);
+ $phpinfo = ob_get_clean();
+
+ $phpinfo = trim($phpinfo);
+
+ // Here we play around a little with the PHP Info HTML to try and stylise
+ // it along phpBB's lines ... hopefully without breaking anything. The idea
+ // for this was nabbed from the PHP annotated manual
+ preg_match_all('#<body[^>]*>(.*)</body>#si', $phpinfo, $output);
+
+ if (empty($phpinfo) || empty($output))
+ {
+ trigger_error('NO_PHPINFO_AVAILABLE', E_USER_WARNING);
+ }
+
+ $output = $output[1][0];
+
+ // expose_php can make the image not exist
+ if (preg_match('#<a[^>]*><img[^>]*></a>#', $output))
+ {
+ $output = preg_replace('#<tr class="v"><td>(.*?<a[^>]*><img[^>]*></a>)(.*?)</td></tr>#s', '<tr class="row1"><td><table class="type2"><tr><td>\2</td><td>\1</td></tr></table></td></tr>', $output);
+ }
+ else
+ {
+ $output = preg_replace('#<tr class="v"><td>(.*?)</td></tr>#s', '<tr class="row1"><td><table class="type2"><tr><td>\1</td></tr></table></td></tr>', $output);
+ }
+ $output = preg_replace('#<table[^>]+>#i', '<table>', $output);
+ $output = preg_replace('#<img border="0"#i', '<img', $output);
+ $output = str_replace(array('class="e"', 'class="v"', 'class="h"', '<hr />', '<font', '</font>'), array('class="row1"', 'class="row2"', '', '', '<span', '</span>'), $output);
+
+ if (empty($output))
+ {
+ trigger_error('NO_PHPINFO_AVAILABLE', E_USER_WARNING);
+ }
+
+ $orig_output = $output;
+
+ preg_match_all('#<div class="center">(.*)</div>#siU', $output, $output);
+ $output = (!empty($output[1][0])) ? $output[1][0] : $orig_output;
+
+ $template->assign_var('PHPINFO', $output);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
new file mode 100644
index 0000000000..1b0ec4b5d5
--- /dev/null
+++ b/phpBB/includes/acp/acp_profile.php
@@ -0,0 +1,1617 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_profile
+{
+ var $u_action;
+
+ var $edit_lang_id;
+ var $lang_defs;
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template, $cache;
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
+
+ include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
+
+ $user->add_lang(array('ucp', 'acp/profile'));
+ $this->tpl_name = 'acp_profile';
+ $this->page_title = 'ACP_CUSTOM_PROFILE_FIELDS';
+
+ $action = (isset($_POST['create'])) ? 'create' : request_var('action', '');
+
+ $error = array();
+ $s_hidden_fields = '';
+
+ // Define some default values for each field type
+ $default_values = array(
+ FIELD_STRING => array('field_length' => 10, 'field_minlen' => 0, 'field_maxlen' => 20, 'field_validation' => '.*', 'field_novalue' => '', 'field_default_value' => ''),
+ FIELD_TEXT => array('field_length' => '5|80', 'field_minlen' => 0, 'field_maxlen' => 1000, 'field_validation' => '.*', 'field_novalue' => '', 'field_default_value' => ''),
+ FIELD_INT => array('field_length' => 5, 'field_minlen' => 0, 'field_maxlen' => 100, 'field_validation' => '', 'field_novalue' => 0, 'field_default_value' => 0),
+ FIELD_DATE => array('field_length' => 10, 'field_minlen' => 10, 'field_maxlen' => 10, 'field_validation' => '', 'field_novalue' => ' 0- 0- 0', 'field_default_value' => ' 0- 0- 0'),
+ FIELD_BOOL => array('field_length' => 1, 'field_minlen' => 0, 'field_maxlen' => 0, 'field_validation' => '', 'field_novalue' => 0, 'field_default_value' => 0),
+ FIELD_DROPDOWN => array('field_length' => 0, 'field_minlen' => 0, 'field_maxlen' => 5, 'field_validation' => '', 'field_novalue' => 0, 'field_default_value' => 0),
+ );
+
+ $cp = new custom_profile_admin();
+
+ // Build Language array
+ // Based on this, we decide which elements need to be edited later and which language items are missing
+ $this->lang_defs = array();
+
+ $sql = 'SELECT lang_id, lang_iso
+ FROM ' . LANG_TABLE . '
+ ORDER BY lang_english_name';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // Make some arrays with all available languages
+ $this->lang_defs['id'][$row['lang_id']] = $row['lang_iso'];
+ $this->lang_defs['iso'][$row['lang_iso']] = $row['lang_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT field_id, lang_id
+ FROM ' . PROFILE_LANG_TABLE . '
+ ORDER BY lang_id';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // Which languages are available for each item
+ $this->lang_defs['entry'][$row['field_id']][] = $row['lang_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // Have some fields been defined?
+ if (isset($this->lang_defs['entry']))
+ {
+ foreach ($this->lang_defs['entry'] as $field_id => $field_ary)
+ {
+ // Fill an array with the languages that are missing for each field
+ $this->lang_defs['diff'][$field_id] = array_diff(array_values($this->lang_defs['iso']), $field_ary);
+ }
+ }
+
+ switch ($action)
+ {
+ case 'delete':
+ $field_id = request_var('field_id', 0);
+
+ if (!$field_id)
+ {
+ trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (confirm_box(true))
+ {
+ $sql = 'SELECT field_ident
+ FROM ' . PROFILE_FIELDS_TABLE . "
+ WHERE field_id = $field_id";
+ $result = $db->sql_query($sql);
+ $field_ident = (string) $db->sql_fetchfield('field_ident');
+ $db->sql_freeresult($result);
+
+ $db->sql_transaction('begin');
+
+ $db->sql_query('DELETE FROM ' . PROFILE_FIELDS_TABLE . " WHERE field_id = $field_id");
+ $db->sql_query('DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . " WHERE field_id = $field_id");
+ $db->sql_query('DELETE FROM ' . PROFILE_LANG_TABLE . " WHERE field_id = $field_id");
+
+ switch ($db->sql_layer)
+ {
+ case 'sqlite':
+ $sql = "SELECT sql
+ FROM sqlite_master
+ WHERE type = 'table'
+ AND name = '" . PROFILE_FIELDS_DATA_TABLE . "'
+ ORDER BY type DESC, name;";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // Create a temp table and populate it, destroy the existing one
+ $db->sql_query(preg_replace('#CREATE\s+TABLE\s+"?' . PROFILE_FIELDS_DATA_TABLE . '"?#i', 'CREATE TEMPORARY TABLE ' . PROFILE_FIELDS_DATA_TABLE . '_temp', $row['sql']));
+ $db->sql_query('INSERT INTO ' . PROFILE_FIELDS_DATA_TABLE . '_temp SELECT * FROM ' . PROFILE_FIELDS_DATA_TABLE);
+ $db->sql_query('DROP TABLE ' . PROFILE_FIELDS_DATA_TABLE);
+
+ preg_match('#\((.*)\)#s', $row['sql'], $matches);
+
+ $new_table_cols = trim($matches[1]);
+ $old_table_cols = preg_split('/,(?=[\\sa-z])/im', $new_table_cols);
+ $column_list = array();
+
+ foreach ($old_table_cols as $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+
+ if ($entities[0] == 'PRIMARY')
+ {
+ continue;
+ }
+
+ if ($entities[0] !== 'pf_' . $field_ident)
+ {
+ $column_list[] = $entities[0];
+ }
+ }
+
+ $columns = implode(',', $column_list);
+
+ $new_table_cols = preg_replace('/' . 'pf_' . $field_ident . '[^,]+,/', '', $new_table_cols);
+
+ // create a new table and fill it up. destroy the temp one
+ $db->sql_query('CREATE TABLE ' . PROFILE_FIELDS_DATA_TABLE . ' (' . $new_table_cols . ');');
+ $db->sql_query('INSERT INTO ' . PROFILE_FIELDS_DATA_TABLE . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . PROFILE_FIELDS_DATA_TABLE . '_temp;');
+ $db->sql_query('DROP TABLE ' . PROFILE_FIELDS_DATA_TABLE . '_temp');
+ break;
+
+ default:
+ $db->sql_query('ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " DROP COLUMN pf_$field_ident");
+ }
+
+ $order = 0;
+
+ $sql = 'SELECT *
+ FROM ' . PROFILE_FIELDS_TABLE . '
+ ORDER BY field_order';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $order++;
+ if ($row['field_order'] != $order)
+ {
+ $sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . "
+ SET field_order = $order
+ WHERE field_id = {$row['field_id']}";
+ $db->sql_query($sql);
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $db->sql_transaction('commit');
+
+ add_log('admin', 'LOG_PROFILE_FIELD_REMOVED', $field_ident);
+ trigger_error($user->lang['REMOVED_PROFILE_FIELD'] . adm_back_link($this->u_action));
+ }
+ else
+ {
+ confirm_box(false, 'DELETE_PROFILE_FIELD', build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ 'field_id' => $field_id,
+ )));
+ }
+
+ break;
+
+ case 'activate':
+ $field_id = request_var('field_id', 0);
+
+ if (!$field_id)
+ {
+ trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = 'SELECT lang_id
+ FROM ' . LANG_TABLE . "
+ WHERE lang_iso = '" . $db->sql_escape($config['default_lang']) . "'";
+ $result = $db->sql_query($sql);
+ $default_lang_id = (int) $db->sql_fetchfield('lang_id');
+ $db->sql_freeresult($result);
+
+ if (!in_array($default_lang_id, $this->lang_defs['entry'][$field_id]))
+ {
+ trigger_error($user->lang['DEFAULT_LANGUAGE_NOT_FILLED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . "
+ SET field_active = 1
+ WHERE field_id = $field_id";
+ $db->sql_query($sql);
+
+ $sql = 'SELECT field_ident
+ FROM ' . PROFILE_FIELDS_TABLE . "
+ WHERE field_id = $field_id";
+ $result = $db->sql_query($sql);
+ $field_ident = (string) $db->sql_fetchfield('field_ident');
+ $db->sql_freeresult($result);
+
+ add_log('admin', 'LOG_PROFILE_FIELD_ACTIVATE', $field_ident);
+ trigger_error($user->lang['PROFILE_FIELD_ACTIVATED'] . adm_back_link($this->u_action));
+
+ break;
+
+ case 'deactivate':
+ $field_id = request_var('field_id', 0);
+
+ if (!$field_id)
+ {
+ trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . "
+ SET field_active = 0
+ WHERE field_id = $field_id";
+ $db->sql_query($sql);
+
+ $sql = 'SELECT field_ident
+ FROM ' . PROFILE_FIELDS_TABLE . "
+ WHERE field_id = $field_id";
+ $result = $db->sql_query($sql);
+ $field_ident = (string) $db->sql_fetchfield('field_ident');
+ $db->sql_freeresult($result);
+
+ add_log('admin', 'LOG_PROFILE_FIELD_DEACTIVATE', $field_ident);
+ trigger_error($user->lang['PROFILE_FIELD_DEACTIVATED'] . adm_back_link($this->u_action));
+
+ break;
+
+ case 'move_up':
+ case 'move_down':
+ $field_order = request_var('order', 0);
+ $order_total = $field_order * 2 + (($action == 'move_up') ? -1 : 1);
+
+ $sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . "
+ SET field_order = $order_total - field_order
+ WHERE field_order IN ($field_order, " . (($action == 'move_up') ? $field_order - 1 : $field_order + 1) . ')';
+ $db->sql_query($sql);
+
+ break;
+
+ case 'create':
+ case 'edit':
+
+ $field_id = request_var('field_id', 0);
+ $step = request_var('step', 1);
+
+ $submit = (isset($_REQUEST['next']) || isset($_REQUEST['prev'])) ? true : false;
+ $save = (isset($_REQUEST['save'])) ? true : false;
+
+ // The language id of default language
+ $this->edit_lang_id = $this->lang_defs['iso'][$config['default_lang']];
+
+ // We are editing... we need to grab basic things
+ if ($action == 'edit')
+ {
+ if (!$field_id)
+ {
+ trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = 'SELECT l.*, f.*
+ FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f
+ WHERE l.lang_id = ' . $this->edit_lang_id . "
+ AND f.field_id = $field_id
+ AND l.field_id = f.field_id";
+ $result = $db->sql_query($sql);
+ $field_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$field_row)
+ {
+ // Some admin changed the default language?
+ $sql = 'SELECT l.*, f.*
+ FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f
+ WHERE l.lang_id <> ' . $this->edit_lang_id . "
+ AND f.field_id = $field_id
+ AND l.field_id = f.field_id";
+ $result = $db->sql_query($sql);
+ $field_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$field_row)
+ {
+ trigger_error($user->lang['FIELD_NOT_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $this->edit_lang_id = $field_row['lang_id'];
+ }
+ $field_type = $field_row['field_type'];
+
+ // Get language entries
+ $sql = 'SELECT *
+ FROM ' . PROFILE_FIELDS_LANG_TABLE . '
+ WHERE lang_id = ' . $this->edit_lang_id . "
+ AND field_id = $field_id
+ ORDER BY option_id ASC";
+ $result = $db->sql_query($sql);
+
+ $lang_options = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $lang_options[$row['option_id']] = $row['lang_value'];
+ }
+ $db->sql_freeresult($result);
+
+ $s_hidden_fields = '<input type="hidden" name="field_id" value="' . $field_id . '" />';
+ }
+ else
+ {
+ // We are adding a new field, define basic params
+ $lang_options = $field_row = array();
+
+ $field_type = request_var('field_type', 0);
+
+ if (!$field_type)
+ {
+ trigger_error($user->lang['NO_FIELD_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $field_row = array_merge($default_values[$field_type], array(
+ 'field_ident' => str_replace(' ', '_', utf8_clean_string(request_var('field_ident', '', true))),
+ 'field_required' => 0,
+ 'field_hide' => 0,
+ 'field_show_profile'=> 0,
+ 'field_no_view' => 0,
+ 'field_show_on_reg' => 0,
+ 'field_show_on_vt' => 0,
+ 'lang_name' => utf8_normalize_nfc(request_var('field_ident', '', true)),
+ 'lang_explain' => '',
+ 'lang_default_value'=> '')
+ );
+
+ $s_hidden_fields = '<input type="hidden" name="field_type" value="' . $field_type . '" />';
+ }
+
+ // $exclude contains the data we gather in each step
+ $exclude = array(
+ 1 => array('field_ident', 'lang_name', 'lang_explain', 'field_option_none', 'field_show_on_reg', 'field_show_on_vt', 'field_required', 'field_hide', 'field_show_profile', 'field_no_view'),
+ 2 => array('field_length', 'field_maxlen', 'field_minlen', 'field_validation', 'field_novalue', 'field_default_value'),
+ 3 => array('l_lang_name', 'l_lang_explain', 'l_lang_default_value', 'l_lang_options')
+ );
+
+ // Text-based fields require the lang_default_value to be excluded
+ if ($field_type == FIELD_STRING || $field_type == FIELD_TEXT)
+ {
+ $exclude[1][] = 'lang_default_value';
+ }
+
+ // option-specific fields require lang_options to be excluded
+ if ($field_type == FIELD_BOOL || $field_type == FIELD_DROPDOWN)
+ {
+ $exclude[1][] = 'lang_options';
+ }
+
+ $cp->vars['field_ident'] = ($action == 'create' && $step == 1) ? utf8_clean_string(request_var('field_ident', $field_row['field_ident'], true)) : request_var('field_ident', $field_row['field_ident']);
+ $cp->vars['lang_name'] = utf8_normalize_nfc(request_var('lang_name', $field_row['lang_name'], true));
+ $cp->vars['lang_explain'] = utf8_normalize_nfc(request_var('lang_explain', $field_row['lang_explain'], true));
+ $cp->vars['lang_default_value'] = utf8_normalize_nfc(request_var('lang_default_value', $field_row['lang_default_value'], true));
+
+ // Visibility Options...
+ $visibility_ary = array(
+ 'field_required',
+ 'field_show_on_reg',
+ 'field_show_on_vt',
+ 'field_show_profile',
+ 'field_hide',
+ );
+
+ foreach ($visibility_ary as $val)
+ {
+ $cp->vars[$val] = ($submit || $save) ? request_var($val, 0) : $field_row[$val];
+ }
+
+ $cp->vars['field_no_view'] = request_var('field_no_view', (int) $field_row['field_no_view']);
+
+ // A boolean field expects an array as the lang options
+ if ($field_type == FIELD_BOOL)
+ {
+ $options = utf8_normalize_nfc(request_var('lang_options', array(''), true));
+ }
+ else
+ {
+ $options = utf8_normalize_nfc(request_var('lang_options', '', true));
+ }
+
+ // If the user has submitted a form with options (i.e. dropdown field)
+ if ($options)
+ {
+ $exploded_options = (is_array($options)) ? $options : explode("\n", $options);
+
+ if (sizeof($exploded_options) == sizeof($lang_options) || $action == 'create')
+ {
+ // The number of options in the field is equal to the number of options already in the database
+ // Or we are creating a new dropdown list.
+ $cp->vars['lang_options'] = $exploded_options;
+ }
+ else if ($action == 'edit')
+ {
+ // Changing the number of options? (We remove and re-create the option fields)
+ $cp->vars['lang_options'] = $exploded_options;
+ }
+ }
+ else
+ {
+ $cp->vars['lang_options'] = $lang_options;
+ }
+
+ // step 2
+ foreach ($exclude[2] as $key)
+ {
+ $var = utf8_normalize_nfc(request_var($key, $field_row[$key], true));
+
+ // Manipulate the intended variables a little bit if needed
+ if ($field_type == FIELD_DROPDOWN && $key == 'field_maxlen')
+ {
+ // Get the number of options if this key is 'field_maxlen'
+ $var = sizeof(explode("\n", utf8_normalize_nfc(request_var('lang_options', '', true))));
+ }
+ else if ($field_type == FIELD_TEXT && $key == 'field_length')
+ {
+ if (isset($_REQUEST['rows']))
+ {
+ $cp->vars['rows'] = request_var('rows', 0);
+ $cp->vars['columns'] = request_var('columns', 0);
+ $var = $cp->vars['rows'] . '|' . $cp->vars['columns'];
+ }
+ else
+ {
+ $row_col = explode('|', $var);
+ $cp->vars['rows'] = $row_col[0];
+ $cp->vars['columns'] = $row_col[1];
+ }
+ }
+ else if ($field_type == FIELD_DATE && $key == 'field_default_value')
+ {
+ $always_now = request_var('always_now', -1);
+
+ if ($always_now == 1 || ($always_now === -1 && $var == 'now'))
+ {
+ $now = getdate();
+
+ $cp->vars['field_default_value_day'] = $now['mday'];
+ $cp->vars['field_default_value_month'] = $now['mon'];
+ $cp->vars['field_default_value_year'] = $now['year'];
+ $var = $_POST['field_default_value'] = 'now';
+ }
+ else
+ {
+ if (isset($_REQUEST['field_default_value_day']))
+ {
+ $cp->vars['field_default_value_day'] = request_var('field_default_value_day', 0);
+ $cp->vars['field_default_value_month'] = request_var('field_default_value_month', 0);
+ $cp->vars['field_default_value_year'] = request_var('field_default_value_year', 0);
+ $var = $_POST['field_default_value'] = sprintf('%2d-%2d-%4d', $cp->vars['field_default_value_day'], $cp->vars['field_default_value_month'], $cp->vars['field_default_value_year']);
+ }
+ else
+ {
+ list($cp->vars['field_default_value_day'], $cp->vars['field_default_value_month'], $cp->vars['field_default_value_year']) = explode('-', $var);
+ }
+ }
+ }
+ /* else if ($field_type == FIELD_BOOL && $key == 'field_default_value')
+ {
+ // Get the number of options if this key is 'field_maxlen'
+ $var = request_var('field_default_value', 0);
+ }*/
+
+ $cp->vars[$key] = $var;
+ }
+
+ // step 3 - all arrays
+ if ($action == 'edit')
+ {
+ // Get language entries
+ $sql = 'SELECT *
+ FROM ' . PROFILE_FIELDS_LANG_TABLE . '
+ WHERE lang_id <> ' . $this->edit_lang_id . "
+ AND field_id = $field_id
+ ORDER BY option_id ASC";
+ $result = $db->sql_query($sql);
+
+ $l_lang_options = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $l_lang_options[$row['lang_id']][$row['option_id']] = $row['lang_value'];
+ }
+ $db->sql_freeresult($result);
+
+
+ $sql = 'SELECT lang_id, lang_name, lang_explain, lang_default_value
+ FROM ' . PROFILE_LANG_TABLE . '
+ WHERE lang_id <> ' . $this->edit_lang_id . "
+ AND field_id = $field_id
+ ORDER BY lang_id ASC";
+ $result = $db->sql_query($sql);
+
+ $l_lang_name = $l_lang_explain = $l_lang_default_value = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $l_lang_name[$row['lang_id']] = $row['lang_name'];
+ $l_lang_explain[$row['lang_id']] = $row['lang_explain'];
+ $l_lang_default_value[$row['lang_id']] = $row['lang_default_value'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ foreach ($exclude[3] as $key)
+ {
+ $cp->vars[$key] = utf8_normalize_nfc(request_var($key, array(0 => ''), true));
+
+ if (!$cp->vars[$key] && $action == 'edit')
+ {
+ $cp->vars[$key] = $$key;
+ }
+ else if ($key == 'l_lang_options' && $field_type == FIELD_BOOL)
+ {
+ $cp->vars[$key] = utf8_normalize_nfc(request_var($key, array(0 => array('')), true));
+ }
+ else if ($key == 'l_lang_options' && is_array($cp->vars[$key]))
+ {
+ foreach ($cp->vars[$key] as $lang_id => $options)
+ {
+ $cp->vars[$key][$lang_id] = explode("\n", $options);
+ }
+
+ }
+ }
+
+ // Check for general issues in every step
+ if ($submit) // && $step == 1
+ {
+ // Check values for step 1
+ if ($cp->vars['field_ident'] == '')
+ {
+ $error[] = $user->lang['EMPTY_FIELD_IDENT'];
+ }
+
+ if (!preg_match('/^[a-z_]+$/', $cp->vars['field_ident']))
+ {
+ $error[] = $user->lang['INVALID_CHARS_FIELD_IDENT'];
+ }
+
+ if (strlen($cp->vars['field_ident']) > 17)
+ {
+ $error[] = $user->lang['INVALID_FIELD_IDENT_LEN'];
+ }
+
+ if ($cp->vars['lang_name'] == '')
+ {
+ $error[] = $user->lang['EMPTY_USER_FIELD_NAME'];
+ }
+
+ if ($field_type == FIELD_DROPDOWN && !sizeof($cp->vars['lang_options']))
+ {
+ $error[] = $user->lang['NO_FIELD_ENTRIES'];
+ }
+
+ if ($field_type == FIELD_BOOL && (empty($cp->vars['lang_options'][0]) || empty($cp->vars['lang_options'][1])))
+ {
+ $error[] = $user->lang['NO_FIELD_ENTRIES'];
+ }
+
+ // Check for already existing field ident
+ if ($action != 'edit')
+ {
+ $sql = 'SELECT field_ident
+ FROM ' . PROFILE_FIELDS_TABLE . "
+ WHERE field_ident = '" . $db->sql_escape($cp->vars['field_ident']) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ $error[] = $user->lang['FIELD_IDENT_ALREADY_EXIST'];
+ }
+ }
+ }
+
+ $step = (isset($_REQUEST['next'])) ? $step + 1 : ((isset($_REQUEST['prev'])) ? $step - 1 : $step);
+
+ if (sizeof($error))
+ {
+ $step--;
+ $submit = false;
+ }
+
+ // Build up the specific hidden fields
+ foreach ($exclude as $num => $key_ary)
+ {
+ if ($num == $step)
+ {
+ continue;
+ }
+
+ $_new_key_ary = array();
+
+ foreach ($key_ary as $key)
+ {
+ if ($field_type == FIELD_TEXT && $key == 'field_length' && isset($_REQUEST['rows']))
+ {
+ $cp->vars['rows'] = request_var('rows', 0);
+ $cp->vars['columns'] = request_var('columns', 0);
+ $_new_key_ary[$key] = $cp->vars['rows'] . '|' . $cp->vars['columns'];
+ }
+ else if ($field_type == FIELD_DATE && $key == 'field_default_value')
+ {
+ $always_now = request_var('always_now', 0);
+
+ if ($always_now)
+ {
+ $_new_key_ary[$key] = 'now';
+ }
+ else if (isset($_REQUEST['field_default_value_day']))
+ {
+ $cp->vars['field_default_value_day'] = request_var('field_default_value_day', 0);
+ $cp->vars['field_default_value_month'] = request_var('field_default_value_month', 0);
+ $cp->vars['field_default_value_year'] = request_var('field_default_value_year', 0);
+ $_new_key_ary[$key] = sprintf('%2d-%2d-%4d', $cp->vars['field_default_value_day'], $cp->vars['field_default_value_month'], $cp->vars['field_default_value_year']);
+ }
+ }
+ else if ($field_type == FIELD_BOOL && $key == 'l_lang_options' && isset($_REQUEST['l_lang_options']))
+ {
+ $_new_key_ary[$key] = utf8_normalize_nfc(request_var($key, array(array('')), true));
+ }
+ else
+ {
+ if (!isset($_REQUEST[$key]))
+ {
+ $var = false;
+ }
+ else if ($key == 'field_ident' && isset($cp->vars[$key]))
+ {
+ $_new_key_ary[$key]= $cp->vars[$key];
+ }
+ else
+ {
+ $_new_key_ary[$key] = (is_array($_REQUEST[$key])) ? utf8_normalize_nfc(request_var($key, array(''), true)) : utf8_normalize_nfc(request_var($key, '', true));
+ }
+ }
+ }
+
+ $s_hidden_fields .= build_hidden_fields($_new_key_ary);
+ }
+
+ if (!sizeof($error))
+ {
+ if ($step == 3 && (sizeof($this->lang_defs['iso']) == 1 || $save))
+ {
+ $this->save_profile_field($cp, $field_type, $action);
+ }
+ else if ($action == 'edit' && $save)
+ {
+ $this->save_profile_field($cp, $field_type, $action);
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_EDIT' => true,
+ 'S_EDIT_MODE' => ($action == 'edit') ? true : false,
+ 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
+
+ 'L_TITLE' => $user->lang['STEP_' . $step . '_TITLE_' . strtoupper($action)],
+ 'L_EXPLAIN' => $user->lang['STEP_' . $step . '_EXPLAIN_' . strtoupper($action)],
+
+ 'U_ACTION' => $this->u_action . "&amp;action=$action&amp;step=$step",
+ 'U_BACK' => $this->u_action)
+ );
+
+ // Now go through the steps
+ switch ($step)
+ {
+ // Create basic options - only small differences between field types
+ case 1:
+
+ // Build common create options
+ $template->assign_vars(array(
+ 'S_STEP_ONE' => true,
+ 'S_FIELD_REQUIRED' => ($cp->vars['field_required']) ? true : false,
+ 'S_SHOW_ON_REG' => ($cp->vars['field_show_on_reg']) ? true : false,
+ 'S_SHOW_ON_VT' => ($cp->vars['field_show_on_vt']) ? true : false,
+ 'S_FIELD_HIDE' => ($cp->vars['field_hide']) ? true : false,
+ 'S_SHOW_PROFILE' => ($cp->vars['field_show_profile']) ? true : false,
+ 'S_FIELD_NO_VIEW' => ($cp->vars['field_no_view']) ? true : false,
+
+ 'L_LANG_SPECIFIC' => sprintf($user->lang['LANG_SPECIFIC_OPTIONS'], $config['default_lang']),
+ 'FIELD_TYPE' => $user->lang['FIELD_' . strtoupper($cp->profile_types[$field_type])],
+ 'FIELD_IDENT' => $cp->vars['field_ident'],
+ 'LANG_NAME' => $cp->vars['lang_name'],
+ 'LANG_EXPLAIN' => $cp->vars['lang_explain'])
+ );
+
+ // String and Text needs to set default values here...
+ if ($field_type == FIELD_STRING || $field_type == FIELD_TEXT)
+ {
+ $template->assign_vars(array(
+ 'S_TEXT' => ($field_type == FIELD_TEXT) ? true : false,
+ 'S_STRING' => ($field_type == FIELD_STRING) ? true : false,
+
+ 'L_DEFAULT_VALUE_EXPLAIN' => $user->lang[strtoupper($cp->profile_types[$field_type]) . '_DEFAULT_VALUE_EXPLAIN'],
+ 'LANG_DEFAULT_VALUE' => $cp->vars['lang_default_value'])
+ );
+ }
+
+ if ($field_type == FIELD_BOOL || $field_type == FIELD_DROPDOWN)
+ {
+ // Initialize these array elements if we are creating a new field
+ if (!sizeof($cp->vars['lang_options']))
+ {
+ if ($field_type == FIELD_BOOL)
+ {
+ // No options have been defined for a boolean field.
+ $cp->vars['lang_options'][0] = '';
+ $cp->vars['lang_options'][1] = '';
+ }
+ else
+ {
+ // No options have been defined for the dropdown menu
+ $cp->vars['lang_options'] = array();
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_BOOL' => ($field_type == FIELD_BOOL) ? true : false,
+ 'S_DROPDOWN' => ($field_type == FIELD_DROPDOWN) ? true : false,
+
+ 'L_LANG_OPTIONS_EXPLAIN' => $user->lang[strtoupper($cp->profile_types[$field_type]) . '_ENTRIES_EXPLAIN'],
+ 'LANG_OPTIONS' => ($field_type == FIELD_DROPDOWN) ? implode("\n", $cp->vars['lang_options']) : '',
+ 'FIRST_LANG_OPTION' => ($field_type == FIELD_BOOL) ? $cp->vars['lang_options'][0] : '',
+ 'SECOND_LANG_OPTION' => ($field_type == FIELD_BOOL) ? $cp->vars['lang_options'][1] : '')
+ );
+ }
+
+ break;
+
+ case 2:
+
+ $template->assign_vars(array(
+ 'S_STEP_TWO' => true,
+ 'L_NEXT_STEP' => (sizeof($this->lang_defs['iso']) == 1) ? $user->lang['SAVE'] : $user->lang['PROFILE_LANG_OPTIONS'])
+ );
+
+ // Build options based on profile type
+ $function = 'get_' . $cp->profile_types[$field_type] . '_options';
+ $options = $cp->$function();
+
+ foreach ($options as $num => $option_ary)
+ {
+ $template->assign_block_vars('option', $option_ary);
+ }
+
+ break;
+
+ // Define remaining language variables
+ case 3:
+
+ $template->assign_var('S_STEP_THREE', true);
+ $options = $this->build_language_options($cp, $field_type, $action);
+
+ foreach ($options as $lang_id => $lang_ary)
+ {
+ $template->assign_block_vars('options', array(
+ 'LANGUAGE' => sprintf($user->lang[(($lang_id == $this->edit_lang_id) ? 'DEFAULT_' : '') . 'ISO_LANGUAGE'], $lang_ary['lang_iso']))
+ );
+
+ foreach ($lang_ary['fields'] as $field_ident => $field_ary)
+ {
+ $template->assign_block_vars('options.field', array(
+ 'L_TITLE' => $field_ary['TITLE'],
+ 'L_EXPLAIN' => (isset($field_ary['EXPLAIN'])) ? $field_ary['EXPLAIN'] : '',
+ 'FIELD' => $field_ary['FIELD'])
+ );
+ }
+ }
+
+ break;
+ }
+
+ $template->assign_vars(array(
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields)
+ );
+
+ return;
+
+ break;
+ }
+
+ $sql = 'SELECT *
+ FROM ' . PROFILE_FIELDS_TABLE . '
+ ORDER BY field_order';
+ $result = $db->sql_query($sql);
+
+ $s_one_need_edit = false;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $active_lang = (!$row['field_active']) ? 'ACTIVATE' : 'DEACTIVATE';
+ $active_value = (!$row['field_active']) ? 'activate' : 'deactivate';
+ $id = $row['field_id'];
+
+ $s_need_edit = (sizeof($this->lang_defs['diff'][$row['field_id']])) ? true : false;
+
+ if ($s_need_edit)
+ {
+ $s_one_need_edit = true;
+ }
+
+ $template->assign_block_vars('fields', array(
+ 'FIELD_IDENT' => $row['field_ident'],
+ 'FIELD_TYPE' => $user->lang['FIELD_' . strtoupper($cp->profile_types[$row['field_type']])],
+
+ 'L_ACTIVATE_DEACTIVATE' => $user->lang[$active_lang],
+ 'U_ACTIVATE_DEACTIVATE' => $this->u_action . "&amp;action=$active_value&amp;field_id=$id",
+ 'U_EDIT' => $this->u_action . "&amp;action=edit&amp;field_id=$id",
+ 'U_TRANSLATE' => $this->u_action . "&amp;action=edit&amp;field_id=$id&amp;step=3",
+ 'U_DELETE' => $this->u_action . "&amp;action=delete&amp;field_id=$id",
+ 'U_MOVE_UP' => $this->u_action . "&amp;action=move_up&amp;order={$row['field_order']}",
+ 'U_MOVE_DOWN' => $this->u_action . "&amp;action=move_down&amp;order={$row['field_order']}",
+
+ 'S_NEED_EDIT' => $s_need_edit)
+ );
+ }
+ $db->sql_freeresult($result);
+
+ // At least one option field needs editing?
+ if ($s_one_need_edit)
+ {
+ $template->assign_var('S_NEED_EDIT', true);
+ }
+
+ $s_select_type = '';
+ foreach ($cp->profile_types as $key => $value)
+ {
+ $s_select_type .= '<option value="' . $key . '">' . $user->lang['FIELD_' . strtoupper($value)] . '</option>';
+ }
+
+ $template->assign_vars(array(
+ 'U_ACTION' => $this->u_action,
+ 'S_TYPE_OPTIONS' => $s_select_type)
+ );
+ }
+
+ /**
+ * Build all Language specific options
+ */
+ function build_language_options(&$cp, $field_type, $action = 'create')
+ {
+ global $user, $config, $db;
+
+ $default_lang_id = (!empty($this->edit_lang_id)) ? $this->edit_lang_id : $this->lang_defs['iso'][$config['default_lang']];
+
+ $sql = 'SELECT lang_id, lang_iso
+ FROM ' . LANG_TABLE . '
+ WHERE lang_id <> ' . (int) $default_lang_id . '
+ ORDER BY lang_english_name';
+ $result = $db->sql_query($sql);
+
+ $languages = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $languages[$row['lang_id']] = $row['lang_iso'];
+ }
+ $db->sql_freeresult($result);
+
+ $options = array();
+ $options['lang_name'] = 'string';
+ if ($cp->vars['lang_explain'])
+ {
+ $options['lang_explain'] = 'text';
+ }
+
+ switch ($field_type)
+ {
+ case FIELD_BOOL:
+ $options['lang_options'] = 'two_options';
+ break;
+
+ case FIELD_DROPDOWN:
+ $options['lang_options'] = 'optionfield';
+ break;
+
+ case FIELD_TEXT:
+ case FIELD_STRING:
+ if (strlen($cp->vars['lang_default_value']))
+ {
+ $options['lang_default_value'] = ($field_type == FIELD_STRING) ? 'string' : 'text';
+ }
+ break;
+ }
+
+ $lang_options = array();
+
+ foreach ($options as $field => $field_type)
+ {
+ $lang_options[1]['lang_iso'] = $this->lang_defs['id'][$default_lang_id];
+ $lang_options[1]['fields'][$field] = array(
+ 'TITLE' => $user->lang['CP_' . strtoupper($field)],
+ 'FIELD' => '<dd>' . ((is_array($cp->vars[$field])) ? implode('<br />', $cp->vars[$field]) : bbcode_nl2br($cp->vars[$field])) . '</dd>'
+ );
+
+ if (isset($user->lang['CP_' . strtoupper($field) . '_EXPLAIN']))
+ {
+ $lang_options[1]['fields'][$field]['EXPLAIN'] = $user->lang['CP_' . strtoupper($field) . '_EXPLAIN'];
+ }
+ }
+
+ foreach ($languages as $lang_id => $lang_iso)
+ {
+ $lang_options[$lang_id]['lang_iso'] = $lang_iso;
+ foreach ($options as $field => $field_type)
+ {
+ $value = ($action == 'create') ? utf8_normalize_nfc(request_var('l_' . $field, array(0 => ''), true)) : $cp->vars['l_' . $field];
+ if ($field == 'lang_options')
+ {
+ $var = (!isset($cp->vars['l_lang_options'][$lang_id]) || !is_array($cp->vars['l_lang_options'][$lang_id])) ? $cp->vars['lang_options'] : $cp->vars['l_lang_options'][$lang_id];
+
+ switch ($field_type)
+ {
+ case 'two_options':
+
+ $lang_options[$lang_id]['fields'][$field] = array(
+ 'TITLE' => $user->lang['CP_' . strtoupper($field)],
+ 'FIELD' => '
+ <dd><input class="medium" name="l_' . $field . '[' . $lang_id . '][]" value="' . ((isset($value[$lang_id][0])) ? $value[$lang_id][0] : $var[0]) . '" /> ' . $user->lang['FIRST_OPTION'] . '</dd>
+ <dd><input class="medium" name="l_' . $field . '[' . $lang_id . '][]" value="' . ((isset($value[$lang_id][1])) ? $value[$lang_id][1] : $var[1]) . '" /> ' . $user->lang['SECOND_OPTION'] . '</dd>'
+ );
+ break;
+
+ case 'optionfield':
+ $value = ((isset($value[$lang_id])) ? ((is_array($value[$lang_id])) ? implode("\n", $value[$lang_id]) : $value[$lang_id]) : implode("\n", $var));
+ $lang_options[$lang_id]['fields'][$field] = array(
+ 'TITLE' => $user->lang['CP_' . strtoupper($field)],
+ 'FIELD' => '<dd><textarea name="l_' . $field . '[' . $lang_id . ']" rows="7" cols="80">' . $value . '</textarea></dd>'
+ );
+ break;
+ }
+
+ if (isset($user->lang['CP_' . strtoupper($field) . '_EXPLAIN']))
+ {
+ $lang_options[$lang_id]['fields'][$field]['EXPLAIN'] = $user->lang['CP_' . strtoupper($field) . '_EXPLAIN'];
+ }
+ }
+ else
+ {
+ $var = ($action == 'create' || !is_array($cp->vars[$field])) ? $cp->vars[$field] : $cp->vars[$field][$lang_id];
+
+ $lang_options[$lang_id]['fields'][$field] = array(
+ 'TITLE' => $user->lang['CP_' . strtoupper($field)],
+ 'FIELD' => ($field_type == 'string') ? '<dd><input class="medium" type="text" name="l_' . $field . '[' . $lang_id . ']" value="' . ((isset($value[$lang_id])) ? $value[$lang_id] : $var) . '" /></dd>' : '<dd><textarea name="l_' . $field . '[' . $lang_id . ']" rows="3" cols="80">' . ((isset($value[$lang_id])) ? $value[$lang_id] : $var) . '</textarea></dd>'
+ );
+
+ if (isset($user->lang['CP_' . strtoupper($field) . '_EXPLAIN']))
+ {
+ $lang_options[$lang_id]['fields'][$field]['EXPLAIN'] = $user->lang['CP_' . strtoupper($field) . '_EXPLAIN'];
+ }
+ }
+ }
+ }
+
+ return $lang_options;
+ }
+
+ /**
+ * Save Profile Field
+ */
+ function save_profile_field(&$cp, $field_type, $action = 'create')
+ {
+ global $db, $config, $user;
+
+ $field_id = request_var('field_id', 0);
+
+ // Collect all information, if something is going wrong, abort the operation
+ $profile_sql = $profile_lang = $empty_lang = $profile_lang_fields = array();
+
+ $default_lang_id = (!empty($this->edit_lang_id)) ? $this->edit_lang_id : $this->lang_defs['iso'][$config['default_lang']];
+
+ if ($action == 'create')
+ {
+ $sql = 'SELECT MAX(field_order) as max_field_order
+ FROM ' . PROFILE_FIELDS_TABLE;
+ $result = $db->sql_query($sql);
+ $new_field_order = (int) $db->sql_fetchfield('max_field_order');
+ $db->sql_freeresult($result);
+
+ $field_ident = $cp->vars['field_ident'];
+ }
+
+ // Save the field
+ $profile_fields = array(
+ 'field_length' => $cp->vars['field_length'],
+ 'field_minlen' => $cp->vars['field_minlen'],
+ 'field_maxlen' => $cp->vars['field_maxlen'],
+ 'field_novalue' => $cp->vars['field_novalue'],
+ 'field_default_value' => $cp->vars['field_default_value'],
+ 'field_validation' => $cp->vars['field_validation'],
+ 'field_required' => $cp->vars['field_required'],
+ 'field_show_on_reg' => $cp->vars['field_show_on_reg'],
+ 'field_show_on_vt' => $cp->vars['field_show_on_vt'],
+ 'field_hide' => $cp->vars['field_hide'],
+ 'field_show_profile' => $cp->vars['field_show_profile'],
+ 'field_no_view' => $cp->vars['field_no_view']
+ );
+
+ if ($action == 'create')
+ {
+ $profile_fields += array(
+ 'field_type' => $field_type,
+ 'field_ident' => $field_ident,
+ 'field_name' => $field_ident,
+ 'field_order' => $new_field_order + 1,
+ 'field_active' => 1
+ );
+
+ $sql = 'INSERT INTO ' . PROFILE_FIELDS_TABLE . ' ' . $db->sql_build_array('INSERT', $profile_fields);
+ $db->sql_query($sql);
+
+ $field_id = $db->sql_nextid();
+ }
+ else
+ {
+ $sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $profile_fields) . "
+ WHERE field_id = $field_id";
+ $db->sql_query($sql);
+ }
+
+ if ($action == 'create')
+ {
+ $field_ident = 'pf_' . $field_ident;
+ $profile_sql[] = $this->add_field_ident($field_ident, $field_type);
+ }
+
+ $sql_ary = array(
+ 'lang_name' => $cp->vars['lang_name'],
+ 'lang_explain' => $cp->vars['lang_explain'],
+ 'lang_default_value' => $cp->vars['lang_default_value']
+ );
+
+ if ($action == 'create')
+ {
+ $sql_ary['field_id'] = $field_id;
+ $sql_ary['lang_id'] = $default_lang_id;
+
+ $profile_sql[] = 'INSERT INTO ' . PROFILE_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ }
+ else
+ {
+ $this->update_insert(PROFILE_LANG_TABLE, $sql_ary, array('field_id' => $field_id, 'lang_id' => $default_lang_id));
+ }
+
+ if (is_array($cp->vars['l_lang_name']) && sizeof($cp->vars['l_lang_name']))
+ {
+ foreach ($cp->vars['l_lang_name'] as $lang_id => $data)
+ {
+ if (($cp->vars['lang_name'] != '' && $cp->vars['l_lang_name'][$lang_id] == '')
+ || ($cp->vars['lang_explain'] != '' && $cp->vars['l_lang_explain'][$lang_id] == '')
+ || ($cp->vars['lang_default_value'] != '' && $cp->vars['l_lang_default_value'][$lang_id] == ''))
+ {
+ $empty_lang[$lang_id] = true;
+ break;
+ }
+
+ if (!isset($empty_lang[$lang_id]))
+ {
+ $profile_lang[] = array(
+ 'field_id' => $field_id,
+ 'lang_id' => $lang_id,
+ 'lang_name' => $cp->vars['l_lang_name'][$lang_id],
+ 'lang_explain' => (isset($cp->vars['l_lang_explain'][$lang_id])) ? $cp->vars['l_lang_explain'][$lang_id] : '',
+ 'lang_default_value' => (isset($cp->vars['l_lang_default_value'][$lang_id])) ? $cp->vars['l_lang_default_value'][$lang_id] : ''
+ );
+ }
+ }
+
+ foreach ($empty_lang as $lang_id => $NULL)
+ {
+ $sql = 'DELETE FROM ' . PROFILE_LANG_TABLE . "
+ WHERE field_id = $field_id
+ AND lang_id = " . (int) $lang_id;
+ $db->sql_query($sql);
+ }
+ }
+
+ // These are always arrays because the key is the language id...
+ $cp->vars['l_lang_name'] = utf8_normalize_nfc(request_var('l_lang_name', array(0 => ''), true));
+ $cp->vars['l_lang_explain'] = utf8_normalize_nfc(request_var('l_lang_explain', array(0 => ''), true));
+ $cp->vars['l_lang_default_value'] = utf8_normalize_nfc(request_var('l_lang_default_value', array(0 => ''), true));
+
+ if ($field_type != FIELD_BOOL)
+ {
+ $cp->vars['l_lang_options'] = utf8_normalize_nfc(request_var('l_lang_options', array(0 => ''), true));
+ }
+ else
+ {
+ /**
+ * @todo check if this line is correct...
+ $cp->vars['l_lang_default_value'] = request_var('l_lang_default_value', array(0 => array('')), true);
+ */
+ $cp->vars['l_lang_options'] = utf8_normalize_nfc(request_var('l_lang_options', array(0 => array('')), true));
+ }
+
+ if ($cp->vars['lang_options'])
+ {
+ if (!is_array($cp->vars['lang_options']))
+ {
+ $cp->vars['lang_options'] = explode("\n", $cp->vars['lang_options']);
+ }
+
+ if ($action != 'create')
+ {
+ $sql = 'DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . "
+ WHERE field_id = $field_id
+ AND lang_id = " . (int) $default_lang_id;
+ $db->sql_query($sql);
+ }
+
+ foreach ($cp->vars['lang_options'] as $option_id => $value)
+ {
+ $sql_ary = array(
+ 'field_type' => (int) $field_type,
+ 'lang_value' => $value
+ );
+
+ if ($action == 'create')
+ {
+ $sql_ary['field_id'] = $field_id;
+ $sql_ary['lang_id'] = $default_lang_id;
+ $sql_ary['option_id'] = (int) $option_id;
+
+ $profile_sql[] = 'INSERT INTO ' . PROFILE_FIELDS_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ }
+ else
+ {
+ $this->update_insert(PROFILE_FIELDS_LANG_TABLE, $sql_ary, array(
+ 'field_id' => $field_id,
+ 'lang_id' => (int) $default_lang_id,
+ 'option_id' => (int) $option_id)
+ );
+ }
+ }
+ }
+
+ if (is_array($cp->vars['l_lang_options']) && sizeof($cp->vars['l_lang_options']))
+ {
+ $empty_lang = array();
+
+ foreach ($cp->vars['l_lang_options'] as $lang_id => $lang_ary)
+ {
+ if (!is_array($lang_ary))
+ {
+ $lang_ary = explode("\n", $lang_ary);
+ }
+
+ if (sizeof($lang_ary) != sizeof($cp->vars['lang_options']))
+ {
+ $empty_lang[$lang_id] = true;
+ }
+
+ if (!isset($empty_lang[$lang_id]))
+ {
+ if ($action != 'create')
+ {
+ $sql = 'DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . "
+ WHERE field_id = $field_id
+ AND lang_id = " . (int) $lang_id;
+ $db->sql_query($sql);
+ }
+
+ foreach ($lang_ary as $option_id => $value)
+ {
+ $profile_lang_fields[] = array(
+ 'field_id' => (int) $field_id,
+ 'lang_id' => (int) $lang_id,
+ 'option_id' => (int) $option_id,
+ 'field_type' => (int) $field_type,
+ 'lang_value' => $value
+ );
+ }
+ }
+ }
+
+ foreach ($empty_lang as $lang_id => $NULL)
+ {
+ $sql = 'DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . "
+ WHERE field_id = $field_id
+ AND lang_id = " . (int) $lang_id;
+ $db->sql_query($sql);
+ }
+ }
+
+ foreach ($profile_lang as $sql)
+ {
+ if ($action == 'create')
+ {
+ $profile_sql[] = 'INSERT INTO ' . PROFILE_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql);
+ }
+ else
+ {
+ $lang_id = $sql['lang_id'];
+ unset($sql['lang_id'], $sql['field_id']);
+
+ $this->update_insert(PROFILE_LANG_TABLE, $sql, array('lang_id' => (int) $lang_id, 'field_id' => $field_id));
+ }
+ }
+
+ if (sizeof($profile_lang_fields))
+ {
+ foreach ($profile_lang_fields as $sql)
+ {
+ if ($action == 'create')
+ {
+ $profile_sql[] = 'INSERT INTO ' . PROFILE_FIELDS_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql);
+ }
+ else
+ {
+ $lang_id = $sql['lang_id'];
+ $option_id = $sql['option_id'];
+ unset($sql['lang_id'], $sql['field_id'], $sql['option_id']);
+
+ $this->update_insert(PROFILE_FIELDS_LANG_TABLE, $sql, array(
+ 'lang_id' => $lang_id,
+ 'field_id' => $field_id,
+ 'option_id' => $option_id)
+ );
+ }
+ }
+ }
+
+
+ $db->sql_transaction('begin');
+
+ if ($action == 'create')
+ {
+ foreach ($profile_sql as $sql)
+ {
+ $db->sql_query($sql);
+ }
+ }
+
+ $db->sql_transaction('commit');
+
+ if ($action == 'edit')
+ {
+ add_log('admin', 'LOG_PROFILE_FIELD_EDIT', $cp->vars['field_ident'] . ':' . $cp->vars['lang_name']);
+ trigger_error($user->lang['CHANGED_PROFILE_FIELD'] . adm_back_link($this->u_action));
+ }
+ else
+ {
+ add_log('admin', 'LOG_PROFILE_FIELD_CREATE', substr($field_ident, 3) . ':' . $cp->vars['lang_name']);
+ trigger_error($user->lang['ADDED_PROFILE_FIELD'] . adm_back_link($this->u_action));
+ }
+ }
+
+ /**
+ * Update, then insert if not successfull
+ */
+ function update_insert($table, $sql_ary, $where_fields)
+ {
+ global $db;
+
+ $where_sql = array();
+ $check_key = '';
+
+ foreach ($where_fields as $key => $value)
+ {
+ $check_key = (!$check_key) ? $key : $check_key;
+ $where_sql[] = $key . ' = ' . ((is_string($value)) ? "'" . $db->sql_escape($value) . "'" : (int) $value);
+ }
+
+ if (!sizeof($where_sql))
+ {
+ return;
+ }
+
+ $sql = "SELECT $check_key
+ FROM $table
+ WHERE " . implode(' AND ', $where_sql);
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ $sql_ary = array_merge($where_fields, $sql_ary);
+
+ if (sizeof($sql_ary))
+ {
+ $db->sql_query("INSERT INTO $table " . $db->sql_build_array('INSERT', $sql_ary));
+ }
+ }
+ else
+ {
+ if (sizeof($sql_ary))
+ {
+ $sql = "UPDATE $table SET " . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE ' . implode(' AND ', $where_sql);
+ $db->sql_query($sql);
+ }
+ }
+ }
+
+ /**
+ * Return sql statement for adding a new field ident (profile field) to the profile fields data table
+ */
+ function add_field_ident($field_ident, $field_type)
+ {
+ global $db;
+
+ switch ($db->sql_layer)
+ {
+ case 'mysql':
+ case 'mysql4':
+ case 'mysqli':
+
+ // We are defining the biggest common value, because of the possibility to edit the min/max values of each field.
+ $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD `$field_ident` ";
+
+ switch ($field_type)
+ {
+ case FIELD_STRING:
+ $sql .= ' VARCHAR(255) ';
+ break;
+
+ case FIELD_DATE:
+ $sql .= 'VARCHAR(10) ';
+ break;
+
+ case FIELD_TEXT:
+ $sql .= "TEXT";
+ // ADD {$field_ident}_bbcode_uid VARCHAR(5) NOT NULL,
+ // ADD {$field_ident}_bbcode_bitfield INT(11) UNSIGNED";
+ break;
+
+ case FIELD_BOOL:
+ $sql .= 'TINYINT(2) ';
+ break;
+
+ case FIELD_DROPDOWN:
+ $sql .= 'MEDIUMINT(8) ';
+ break;
+
+ case FIELD_INT:
+ $sql .= 'BIGINT(20) ';
+ break;
+ }
+
+ break;
+
+ case 'sqlite':
+
+ switch ($field_type)
+ {
+ case FIELD_STRING:
+ $type = ' VARCHAR(255) ';
+ break;
+
+ case FIELD_DATE:
+ $type = 'VARCHAR(10) ';
+ break;
+
+ case FIELD_TEXT:
+ $type = "TEXT(65535)";
+ // ADD {$field_ident}_bbcode_uid VARCHAR(5) NOT NULL,
+ // ADD {$field_ident}_bbcode_bitfield INT(11) UNSIGNED";
+ break;
+
+ case FIELD_BOOL:
+ $type = 'TINYINT(2) ';
+ break;
+
+ case FIELD_DROPDOWN:
+ $type = 'MEDIUMINT(8) ';
+ break;
+
+ case FIELD_INT:
+ $type = 'BIGINT(20) ';
+ break;
+ }
+
+ // We are defining the biggest common value, because of the possibility to edit the min/max values of each field.
+ if (version_compare(sqlite_libversion(), '3.0') == -1)
+ {
+ $sql = "SELECT sql
+ FROM sqlite_master
+ WHERE type = 'table'
+ AND name = '" . PROFILE_FIELDS_DATA_TABLE . "'
+ ORDER BY type DESC, name;";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // Create a temp table and populate it, destroy the existing one
+ $db->sql_query(preg_replace('#CREATE\s+TABLE\s+"?' . PROFILE_FIELDS_DATA_TABLE . '"?#i', 'CREATE TEMPORARY TABLE ' . PROFILE_FIELDS_DATA_TABLE . '_temp', $row['sql']));
+ $db->sql_query('INSERT INTO ' . PROFILE_FIELDS_DATA_TABLE . '_temp SELECT * FROM ' . PROFILE_FIELDS_DATA_TABLE);
+ $db->sql_query('DROP TABLE ' . PROFILE_FIELDS_DATA_TABLE);
+
+ preg_match('#\((.*)\)#s', $row['sql'], $matches);
+
+ $new_table_cols = trim($matches[1]);
+ $old_table_cols = explode(',', $new_table_cols);
+ $column_list = array();
+
+ foreach ($old_table_cols as $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if ($entities[0] == 'PRIMARY')
+ {
+ continue;
+ }
+ $column_list[] = $entities[0];
+ }
+
+ $columns = implode(',', $column_list);
+
+ $new_table_cols = $field_ident . ' ' . $type . ',' . $new_table_cols;
+
+ // create a new table and fill it up. destroy the temp one
+ $db->sql_query('CREATE TABLE ' . PROFILE_FIELDS_DATA_TABLE . ' (' . $new_table_cols . ');');
+ $db->sql_query('INSERT INTO ' . PROFILE_FIELDS_DATA_TABLE . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . PROFILE_FIELDS_DATA_TABLE . '_temp;');
+ $db->sql_query('DROP TABLE ' . PROFILE_FIELDS_DATA_TABLE . '_temp');
+ }
+ else
+ {
+ $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD $field_ident [$type]";
+ }
+
+ break;
+
+ case 'mssql':
+ case 'mssql_odbc':
+
+ // We are defining the biggest common value, because of the possibility to edit the min/max values of each field.
+ $sql = 'ALTER TABLE [' . PROFILE_FIELDS_DATA_TABLE . "] ADD [$field_ident] ";
+
+ switch ($field_type)
+ {
+ case FIELD_STRING:
+ $sql .= ' [VARCHAR] (255) ';
+ break;
+
+ case FIELD_DATE:
+ $sql .= '[VARCHAR] (10) ';
+ break;
+
+ case FIELD_TEXT:
+ $sql .= "[TEXT]";
+ // ADD {$field_ident}_bbcode_uid [VARCHAR] (5) NOT NULL,
+ // ADD {$field_ident}_bbcode_bitfield [INT] UNSIGNED";
+ break;
+
+ case FIELD_BOOL:
+ case FIELD_DROPDOWN:
+ $sql .= '[INT] ';
+ break;
+
+ case FIELD_INT:
+ $sql .= '[FLOAT] ';
+ break;
+ }
+
+ break;
+
+ case 'postgres':
+
+ // We are defining the biggest common value, because of the possibility to edit the min/max values of each field.
+ $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD COLUMN \"$field_ident\" ";
+
+ switch ($field_type)
+ {
+ case FIELD_STRING:
+ $sql .= ' VARCHAR(255) ';
+ break;
+
+ case FIELD_DATE:
+ $sql .= 'VARCHAR(10) ';
+ break;
+
+ case FIELD_TEXT:
+ $sql .= "TEXT";
+ // ADD {$field_ident}_bbcode_uid VARCHAR(5) NOT NULL,
+ // ADD {$field_ident}_bbcode_bitfield INT4 UNSIGNED";
+ break;
+
+ case FIELD_BOOL:
+ $sql .= 'INT2 ';
+ break;
+
+ case FIELD_DROPDOWN:
+ $sql .= 'INT4 ';
+ break;
+
+ case FIELD_INT:
+ $sql .= 'INT8 ';
+ break;
+ }
+
+ break;
+
+ case 'firebird':
+
+ // We are defining the biggest common value, because of the possibility to edit the min/max values of each field.
+ $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . ' ADD "' . strtoupper($field_ident) . '" ';
+
+ switch ($field_type)
+ {
+ case FIELD_STRING:
+ $sql .= ' VARCHAR(255) ';
+ break;
+
+ case FIELD_DATE:
+ $sql .= 'VARCHAR(10) ';
+ break;
+
+ case FIELD_TEXT:
+ $sql .= "BLOB SUB_TYPE TEXT";
+ // ADD {$field_ident}_bbcode_uid VARCHAR(5) NOT NULL,
+ // ADD {$field_ident}_bbcode_bitfield INTEGER UNSIGNED";
+ break;
+
+ case FIELD_BOOL:
+ case FIELD_DROPDOWN:
+ $sql .= 'INTEGER ';
+ break;
+
+ case FIELD_INT:
+ $sql .= 'DOUBLE PRECISION ';
+ break;
+ }
+
+ break;
+
+ case 'oracle':
+
+ // We are defining the biggest common value, because of the possibility to edit the min/max values of each field.
+ $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD $field_ident ";
+
+ switch ($field_type)
+ {
+ case FIELD_STRING:
+ $sql .= ' VARCHAR2(255) ';
+ break;
+
+ case FIELD_DATE:
+ $sql .= 'VARCHAR2(10) ';
+ break;
+
+ case FIELD_TEXT:
+ $sql .= "CLOB";
+ // ADD {$field_ident}_bbcode_uid VARCHAR2(5) NOT NULL,
+ // ADD {$field_ident}_bbcode_bitfield NUMBER(11) UNSIGNED";
+ break;
+
+ case FIELD_BOOL:
+ $sql .= 'NUMBER(2) ';
+ break;
+
+ case FIELD_DROPDOWN:
+ $sql .= 'NUMBER(8) ';
+ break;
+
+ case FIELD_INT:
+ $sql .= 'NUMBER(20) ';
+ break;
+ }
+
+ break;
+ }
+
+ return $sql;
+ }
+}
+
+?>
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
new file mode 100644
index 0000000000..7eeb37133f
--- /dev/null
+++ b/phpBB/includes/acp/acp_prune.php
@@ -0,0 +1,466 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_prune
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $user, $phpEx, $phpbb_admin_path, $phpbb_root_path;
+
+ $user->add_lang('acp/prune');
+ include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ switch ($mode)
+ {
+ case 'forums':
+ $this->tpl_name = 'acp_prune_forums';
+ $this->page_title = 'ACP_PRUNE_FORUMS';
+ $this->prune_forums($id, $mode);
+ break;
+
+ case 'users':
+ $this->tpl_name = 'acp_prune_users';
+ $this->page_title = 'ACP_PRUNE_USERS';
+ $this->prune_users($id, $mode);
+ break;
+ }
+ }
+
+ /**
+ * Prune forums
+ */
+ function prune_forums($id, $mode)
+ {
+ global $db, $user, $auth, $template, $cache;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ $all_forums = request_var('all_forums', 0);
+ $forum_id = request_var('f', array(0));
+ $submit = (isset($_POST['submit'])) ? true : false;
+
+ if ($all_forums)
+ {
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ ORDER BY left_id';
+ $result = $db->sql_query($sql);
+
+ $forum_id = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_id[] = $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if ($submit)
+ {
+ if (confirm_box(true))
+ {
+ $prune_posted = request_var('prune_days', 0);
+ $prune_viewed = request_var('prune_vieweddays', 0);
+ $prune_all = (!$prune_posted && !$prune_viewed) ? true : false;
+
+ $prune_flags = 0;
+ $prune_flags += (request_var('prune_old_polls', 0)) ? 2 : 0;
+ $prune_flags += (request_var('prune_announce', 0)) ? 4 : 0;
+ $prune_flags += (request_var('prune_sticky', 0)) ? 8 : 0;
+
+ // Convert days to seconds for timestamp functions...
+ $prunedate_posted = time() - ($prune_posted * 86400);
+ $prunedate_viewed = time() - ($prune_viewed * 86400);
+
+ $template->assign_vars(array(
+ 'S_PRUNED' => true)
+ );
+
+ $sql_forum = (sizeof($forum_id)) ? ' AND ' . $db->sql_in_set('forum_id', $forum_id) : '';
+
+ // Get a list of forum's or the data for the forum that we are pruning.
+ $sql = 'SELECT forum_id, forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_type = ' . FORUM_POST . "
+ $sql_forum
+ ORDER BY left_id ASC";
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $prune_ids = array();
+ $p_result['topics'] = 0;
+ $p_result['posts'] = 0;
+ $log_data = '';
+
+ do
+ {
+ if (!$auth->acl_get('f_list', $row['forum_id']))
+ {
+ continue;
+ }
+
+ if ($prune_all)
+ {
+ $p_result = prune($row['forum_id'], 'posted', time(), $prune_flags, false);
+ }
+ else
+ {
+ if ($prune_posted)
+ {
+ $return = prune($row['forum_id'], 'posted', $prunedate_posted, $prune_flags, false);
+ $p_result['topics'] += $return['topics'];
+ $p_result['posts'] += $return['posts'];
+ }
+
+ if ($prune_viewed)
+ {
+ $return = prune($row['forum_id'], 'viewed', $prunedate_viewed, $prune_flags, false);
+ $p_result['topics'] += $return['topics'];
+ $p_result['posts'] += $return['posts'];
+ }
+ }
+
+ $prune_ids[] = $row['forum_id'];
+
+ $template->assign_block_vars('pruned', array(
+ 'FORUM_NAME' => $row['forum_name'],
+ 'NUM_TOPICS' => $p_result['topics'],
+ 'NUM_POSTS' => $p_result['posts'])
+ );
+
+ $log_data .= (($log_data != '') ? ', ' : '') . $row['forum_name'];
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ // Sync all pruned forums at once
+ sync('forum', 'forum_id', $prune_ids, true, true);
+ add_log('admin', 'LOG_PRUNE', $log_data);
+ }
+ $db->sql_freeresult($result);
+
+ return;
+ }
+ else
+ {
+ confirm_box(false, $user->lang['PRUNE_FORUM_CONFIRM'], build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'submit' => 1,
+ 'all_forums' => $all_forums,
+ 'f' => $forum_id,
+
+ 'prune_days' => request_var('prune_days', 0),
+ 'prune_vieweddays' => request_var('prune_vieweddays', 0),
+ 'prune_old_polls' => request_var('prune_old_polls', 0),
+ 'prune_announce' => request_var('prune_announce', 0),
+ 'prune_sticky' => request_var('prune_sticky', 0),
+ )));
+ }
+ }
+
+ // If they haven't selected a forum for pruning yet then
+ // display a select box to use for pruning.
+ if (!sizeof($forum_id))
+ {
+ $template->assign_vars(array(
+ 'U_ACTION' => $this->u_action,
+ 'S_SELECT_FORUM' => true,
+ 'S_FORUM_OPTIONS' => make_forum_select(false, false, false))
+ );
+ }
+ else
+ {
+ $sql = 'SELECT forum_id, forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_id);
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+
+ if (!$row)
+ {
+ $db->sql_freeresult($result);
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $forum_list = $s_hidden_fields = '';
+ do
+ {
+ $forum_list .= (($forum_list != '') ? ', ' : '') . '<b>' . $row['forum_name'] . '</b>';
+ $s_hidden_fields .= '<input type="hidden" name="f[]" value="' . $row['forum_id'] . '" />';
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ $db->sql_freeresult($result);
+
+ $l_selected_forums = (sizeof($forum_id) == 1) ? 'SELECTED_FORUM' : 'SELECTED_FORUMS';
+
+ $template->assign_vars(array(
+ 'L_SELECTED_FORUMS' => $user->lang[$l_selected_forums],
+ 'U_ACTION' => $this->u_action,
+ 'U_BACK' => $this->u_action,
+ 'FORUM_LIST' => $forum_list,
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields)
+ );
+ }
+ }
+
+ /**
+ * Prune users
+ */
+ function prune_users($id, $mode)
+ {
+ global $db, $user, $auth, $template, $cache;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ $user->add_lang('memberlist');
+
+ $prune = (isset($_POST['prune'])) ? true : false;
+
+ if ($prune)
+ {
+ $action = request_var('action', 'deactivate');
+ $deleteposts = request_var('deleteposts', 0);
+
+ if (confirm_box(true))
+ {
+ $user_ids = $usernames = array();
+ $this->get_prune_users($user_ids, $usernames);
+
+ if (sizeof($user_ids))
+ {
+ if ($action == 'deactivate')
+ {
+ user_active_flip('deactivate', $user_ids);
+ $l_log = 'LOG_PRUNE_USER_DEAC';
+ }
+ else if ($action == 'delete')
+ {
+ if ($deleteposts)
+ {
+ foreach ($user_ids as $user_id)
+ {
+ user_delete('remove', $user_id);
+ }
+
+ $l_log = 'LOG_PRUNE_USER_DEL_DEL';
+ }
+ else
+ {
+ foreach ($user_ids as $user_id)
+ {
+ user_delete('retain', $user_id, $usernames[$user_id]);
+ }
+
+ $l_log = 'LOG_PRUNE_USER_DEL_ANON';
+ }
+ }
+
+ add_log('admin', $l_log, implode(', ', $usernames));
+ $msg = $user->lang['USER_' . strtoupper($action) . '_SUCCESS'];
+ }
+ else
+ {
+ $msg = $user->lang['USER_PRUNE_FAILURE'];
+ }
+
+ trigger_error($msg . adm_back_link($this->u_action));
+ }
+ else
+ {
+ // We list the users which will be pruned...
+ $user_ids = $usernames = array();
+ $this->get_prune_users($user_ids, $usernames);
+
+ if (!sizeof($user_ids))
+ {
+ trigger_error($user->lang['USER_PRUNE_FAILURE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // Assign to template
+ foreach ($user_ids as $user_id)
+ {
+ $template->assign_block_vars('users', array(
+ 'USERNAME' => $usernames[$user_id],
+ 'U_PROFILE' => append_sid($phpbb_root_path . 'memberlist.' . $phpEx, 'mode=viewprofile&amp;u=' . $user_id),
+ 'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&amp;mode=overview&amp;u=' . $user_id, true, $user->session_id) : '',
+ ));
+ }
+
+ $template->assign_vars(array(
+ 'S_DEACTIVATE' => ($action == 'deactivate') ? true : false,
+ 'S_DELETE' => ($action == 'delete') ? true : false,
+ ));
+
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'prune' => 1,
+
+ 'users' => request_var('users', '', true),
+ 'username' => request_var('username', '', true),
+ 'email' => request_var('email', ''),
+ 'joined_select' => request_var('joined_select', ''),
+ 'joined' => request_var('joined', ''),
+ 'active_select' => request_var('active_select', ''),
+ 'active' => request_var('active', ''),
+ 'count_select' => request_var('count_select', ''),
+ 'count' => request_var('count', ''),
+ 'deleteposts' => request_var('deleteposts', 0),
+
+ 'action' => request_var('action', ''),
+ )), 'confirm_body_prune.html');
+ }
+ }
+
+ $find_count = array('lt' => $user->lang['LESS_THAN'], 'eq' => $user->lang['EQUAL_TO'], 'gt' => $user->lang['MORE_THAN']);
+ $s_find_count = '';
+
+ foreach ($find_count as $key => $value)
+ {
+ $selected = ($key == 'eq') ? ' selected="selected"' : '';
+ $s_find_count .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
+ }
+
+ $find_time = array('lt' => $user->lang['BEFORE'], 'gt' => $user->lang['AFTER']);
+ $s_find_join_time = '';
+ foreach ($find_time as $key => $value)
+ {
+ $s_find_join_time .= '<option value="' . $key . '">' . $value . '</option>';
+ }
+
+ $s_find_active_time = '';
+ foreach ($find_time as $key => $value)
+ {
+ $s_find_active_time .= '<option value="' . $key . '">' . $value . '</option>';
+ }
+
+ $template->assign_vars(array(
+ 'U_ACTION' => $this->u_action,
+ 'S_JOINED_OPTIONS' => $s_find_join_time,
+ 'S_ACTIVE_OPTIONS' => $s_find_active_time,
+ 'S_COUNT_OPTIONS' => $s_find_count,
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=acp_prune&amp;field=users'),
+ ));
+ }
+
+ /**
+ * Get user_ids/usernames from those being pruned
+ */
+ function get_prune_users(&$user_ids, &$usernames)
+ {
+ global $user, $db;
+
+ $users = request_var('users', '', true);
+
+ if ($users)
+ {
+ $users = explode("\n", $users);
+ $where_sql = ' AND ' . $db->sql_in_set('username_clean', array_map('utf8_clean_string', $users));
+ }
+ else
+ {
+ $username = request_var('username', '', true);
+ $email = request_var('email', '');
+
+ $joined_select = request_var('joined_select', 'lt');
+ $active_select = request_var('active_select', 'lt');
+ $count_select = request_var('count_select', 'eq');
+ $joined = request_var('joined', '');
+ $active = request_var('active', '');
+
+ $active = ($active) ? explode('-', $active) : array();
+ $joined = ($joined) ? explode('-', $joined) : array();
+
+ if ((sizeof($active) && sizeof($active) != 3) || (sizeof($joined) && sizeof($joined) != 3))
+ {
+ trigger_error($user->lang['WRONG_ACTIVE_JOINED_DATE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $count = request_var('count', '');
+
+ $key_match = array('lt' => '<', 'gt' => '>', 'eq' => '=');
+ $sort_by_types = array('username', 'user_email', 'user_posts', 'user_regdate', 'user_lastvisit');
+
+ $where_sql = '';
+ $where_sql .= ($username) ? ' AND username_clean ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($username))) : '';
+ $where_sql .= ($email) ? ' AND user_email ' . $db->sql_like_expression(str_replace('*', $db->any_char, $email)) . ' ' : '';
+ $where_sql .= (sizeof($joined)) ? " AND user_regdate " . $key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, (int) $joined[1], (int) $joined[2], (int) $joined[0]) : '';
+ $where_sql .= ($count !== '') ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : '';
+
+ // First handle pruning of users who never logged in, last active date is 0000-00-00
+ if (sizeof($active) && (int) $active[0] == 0 && (int) $active[1] == 0 && (int) $active[2] == 0)
+ {
+ $where_sql .= ' AND user_lastvisit = 0';
+ }
+ else if (sizeof($active) && $active_select != 'lt')
+ {
+ $where_sql .= ' AND user_lastvisit ' . $key_match[$active_select] . ' ' . gmmktime(0, 0, 0, (int) $active[1], (int) $active[2], (int) $active[0]);
+ }
+ else if (sizeof($active))
+ {
+ $where_sql .= ' AND (user_lastvisit > 0 AND user_lastvisit < ' . gmmktime(0, 0, 0, (int) $active[1], (int) $active[2], (int) $active[0]) . ')';
+ }
+ }
+
+ // Protect the admin, do not prune if no options are given...
+ if (!$where_sql)
+ {
+ return;
+ }
+
+ // Get bot ids
+ $sql = 'SELECT user_id
+ FROM ' . BOTS_TABLE;
+ $result = $db->sql_query($sql);
+
+ $bot_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $bot_ids[] = $row['user_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // Do not prune founder members
+ $sql = 'SELECT user_id, username
+ FROM ' . USERS_TABLE . '
+ WHERE user_id <> ' . ANONYMOUS . '
+ AND user_type <> ' . USER_FOUNDER . "
+ $where_sql";
+ $result = $db->sql_query($sql);
+
+ $where_sql = '';
+ $user_ids = $usernames = array();
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // Do not prune bots and the user currently pruning.
+ if ($row['user_id'] != $user->data['user_id'] && !in_array($row['user_id'], $bot_ids))
+ {
+ $user_ids[] = $row['user_id'];
+ $usernames[$row['user_id']] = $row['username'];
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_ranks.php b/phpBB/includes/acp/acp_ranks.php
new file mode 100644
index 0000000000..fcfef2a61e
--- /dev/null
+++ b/phpBB/includes/acp/acp_ranks.php
@@ -0,0 +1,240 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_ranks
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template, $cache;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ $user->add_lang('acp/posting');
+
+ // Set up general vars
+ $action = request_var('action', '');
+ $action = (isset($_POST['add'])) ? 'add' : $action;
+ $action = (isset($_POST['save'])) ? 'save' : $action;
+ $rank_id = request_var('id', 0);
+
+ $this->tpl_name = 'acp_ranks';
+ $this->page_title = 'ACP_MANAGE_RANKS';
+
+ $form_name = 'acp_ranks';
+ add_form_key($form_name);
+
+ switch ($action)
+ {
+ case 'save':
+
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ $rank_title = utf8_normalize_nfc(request_var('title', '', true));
+ $special_rank = request_var('special_rank', 0);
+ $min_posts = ($special_rank) ? 0 : request_var('min_posts', 0);
+ $rank_image = request_var('rank_image', '');
+
+ // The rank image has to be a jpg, gif or png
+ if ($rank_image != '' && !preg_match('#(\.gif|\.png|\.jpg|\.jpeg)$#i', $rank_image))
+ {
+ $rank_image = '';
+ }
+
+ if (!$rank_title)
+ {
+ trigger_error($user->lang['NO_RANK_TITLE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql_ary = array(
+ 'rank_title' => $rank_title,
+ 'rank_special' => $special_rank,
+ 'rank_min' => $min_posts,
+ 'rank_image' => htmlspecialchars_decode($rank_image)
+ );
+
+ if ($rank_id)
+ {
+ $sql = 'UPDATE ' . RANKS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE rank_id = $rank_id";
+ $message = $user->lang['RANK_UPDATED'];
+
+ add_log('admin', 'LOG_RANK_UPDATED', $rank_title);
+ }
+ else
+ {
+ $sql = 'INSERT INTO ' . RANKS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ $message = $user->lang['RANK_ADDED'];
+
+ add_log('admin', 'LOG_RANK_ADDED', $rank_title);
+ }
+ $db->sql_query($sql);
+
+ $cache->destroy('_ranks');
+
+ trigger_error($message . adm_back_link($this->u_action));
+
+ break;
+
+ case 'delete':
+
+ if (!$rank_id)
+ {
+ trigger_error($user->lang['MUST_SELECT_RANK'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (confirm_box(true))
+ {
+ $sql = 'SELECT rank_title
+ FROM ' . RANKS_TABLE . '
+ WHERE rank_id = ' . $rank_id;
+ $result = $db->sql_query($sql);
+ $rank_title = (string) $db->sql_fetchfield('rank_title');
+ $db->sql_freeresult($result);
+
+ $sql = 'DELETE FROM ' . RANKS_TABLE . "
+ WHERE rank_id = $rank_id";
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_rank = 0
+ WHERE user_rank = $rank_id";
+ $db->sql_query($sql);
+
+ $cache->destroy('_ranks');
+
+ add_log('admin', 'LOG_RANK_REMOVED', $rank_title);
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'rank_id' => $rank_id,
+ 'action' => 'delete',
+ )));
+ }
+
+ break;
+
+ case 'edit':
+ case 'add':
+
+ $data = $ranks = $existing_imgs = array();
+
+ $sql = 'SELECT *
+ FROM ' . RANKS_TABLE . '
+ ORDER BY rank_min ASC, rank_special ASC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $existing_imgs[] = $row['rank_image'];
+
+ if ($action == 'edit' && $rank_id == $row['rank_id'])
+ {
+ $ranks = $row;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $imglist = filelist($phpbb_root_path . $config['ranks_path'], '');
+ $edit_img = $filename_list = '';
+
+ foreach ($imglist as $path => $img_ary)
+ {
+ sort($img_ary);
+
+ foreach ($img_ary as $img)
+ {
+ $img = $path . $img;
+
+ if ($ranks && $img == $ranks['rank_image'])
+ {
+ $selected = ' selected="selected"';
+ $edit_img = $img;
+ }
+ else
+ {
+ $selected = '';
+ }
+
+ if (strlen($img) > 255)
+ {
+ continue;
+ }
+
+ $filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $img . ((in_array($img, $existing_imgs)) ? ' ' . $user->lang['RANK_IMAGE_IN_USE'] : '') . '</option>';
+ }
+ }
+
+ $filename_list = '<option value=""' . (($edit_img == '') ? ' selected="selected"' : '') . '>----------</option>' . $filename_list;
+ unset($existing_imgs, $imglist);
+
+ $template->assign_vars(array(
+ 'S_EDIT' => true,
+ 'U_BACK' => $this->u_action,
+ 'RANKS_PATH' => $phpbb_root_path . $config['ranks_path'],
+ 'U_ACTION' => $this->u_action . '&amp;id=' . $rank_id,
+
+ 'RANK_TITLE' => (isset($ranks['rank_title'])) ? $ranks['rank_title'] : '',
+ 'S_FILENAME_LIST' => $filename_list,
+ 'RANK_IMAGE' => ($edit_img) ? $phpbb_root_path . $config['ranks_path'] . '/' . $edit_img : $phpbb_admin_path . 'images/spacer.gif',
+ 'S_SPECIAL_RANK' => (!isset($ranks['rank_special']) || $ranks['rank_special']) ? true : false,
+ 'MIN_POSTS' => (isset($ranks['rank_min']) && !$ranks['rank_special']) ? $ranks['rank_min'] : 0)
+ );
+
+
+ return;
+
+ break;
+ }
+
+ $template->assign_vars(array(
+ 'U_ACTION' => $this->u_action)
+ );
+
+ $sql = 'SELECT *
+ FROM ' . RANKS_TABLE . '
+ ORDER BY rank_special DESC, rank_min ASC, rank_title ASC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $template->assign_block_vars('ranks', array(
+ 'S_RANK_IMAGE' => ($row['rank_image']) ? true : false,
+ 'S_SPECIAL_RANK' => ($row['rank_special']) ? true : false,
+
+ 'RANK_IMAGE' => $phpbb_root_path . $config['ranks_path'] . '/' . $row['rank_image'],
+ 'RANK_TITLE' => $row['rank_title'],
+ 'MIN_POSTS' => $row['rank_min'],
+
+ 'U_EDIT' => $this->u_action . '&amp;action=edit&amp;id=' . $row['rank_id'],
+ 'U_DELETE' => $this->u_action . '&amp;action=delete&amp;id=' . $row['rank_id'])
+ );
+ }
+ $db->sql_freeresult($result);
+
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_reasons.php b/phpBB/includes/acp/acp_reasons.php
new file mode 100644
index 0000000000..8d7bc88769
--- /dev/null
+++ b/phpBB/includes/acp/acp_reasons.php
@@ -0,0 +1,374 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_reasons
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template, $cache;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ $user->add_lang(array('mcp', 'acp/posting'));
+
+ // Set up general vars
+ $action = request_var('action', '');
+ $submit = (isset($_POST['submit'])) ? true : false;
+ $reason_id = request_var('id', 0);
+
+ $this->tpl_name = 'acp_reasons';
+ $this->page_title = 'ACP_REASONS';
+
+ $form_name = 'acp_reason';
+ add_form_key('acp_reason');
+
+ $error = array();
+
+ switch ($action)
+ {
+ case 'add':
+ case 'edit':
+
+ $reason_row = array(
+ 'reason_title' => utf8_normalize_nfc(request_var('reason_title', '', true)),
+ 'reason_description' => utf8_normalize_nfc(request_var('reason_description', '', true)),
+ );
+
+ if ($submit)
+ {
+ if (!check_form_key($form_name))
+ {
+ $error[] = $user->lang['FORM_INVALID'];
+ }
+ // Reason specified?
+ if (!$reason_row['reason_title'] || !$reason_row['reason_description'])
+ {
+ $error[] = $user->lang['NO_REASON_INFO'];
+ }
+
+ $check_double = ($action == 'add') ? true : false;
+
+ if ($action == 'edit')
+ {
+ $sql = 'SELECT reason_title
+ FROM ' . REPORTS_REASONS_TABLE . "
+ WHERE reason_id = $reason_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (strtolower($row['reason_title']) == 'other' || strtolower($reason_row['reason_title']) == 'other')
+ {
+ $reason_row['reason_title'] = 'other';
+ }
+
+ if ($row['reason_title'] != $reason_row['reason_title'])
+ {
+ $check_double = true;
+ }
+ }
+
+ // Check for same reason if adding it...
+ if ($check_double)
+ {
+ $sql = 'SELECT reason_id
+ FROM ' . REPORTS_REASONS_TABLE . "
+ WHERE reason_title = '" . $db->sql_escape($reason_row['reason_title']) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row || ($action == 'add' && strtolower($reason_row['reason_title']) == 'other'))
+ {
+ $error[] = $user->lang['REASON_ALREADY_EXIST'];
+ }
+ }
+
+ if (!sizeof($error))
+ {
+ // New reason?
+ if ($action == 'add')
+ {
+ // Get new order...
+ $sql = 'SELECT MAX(reason_order) as max_reason_order
+ FROM ' . REPORTS_REASONS_TABLE;
+ $result = $db->sql_query($sql);
+ $max_order = (int) $db->sql_fetchfield('max_reason_order');
+ $db->sql_freeresult($result);
+
+ $sql_ary = array(
+ 'reason_title' => (string) $reason_row['reason_title'],
+ 'reason_description' => (string) $reason_row['reason_description'],
+ 'reason_order' => $max_order + 1
+ );
+
+ $db->sql_query('INSERT INTO ' . REPORTS_REASONS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+
+ $log = 'ADDED';
+ }
+ else if ($reason_id)
+ {
+ $sql_ary = array(
+ 'reason_title' => (string) $reason_row['reason_title'],
+ 'reason_description' => (string) $reason_row['reason_description'],
+ );
+
+ $db->sql_query('UPDATE ' . REPORTS_REASONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE reason_id = ' . $reason_id);
+
+ $log = 'UPDATED';
+ }
+
+ add_log('admin', 'LOG_REASON_' . $log, $reason_row['reason_title']);
+ trigger_error($user->lang['REASON_' . $log] . adm_back_link($this->u_action));
+ }
+ }
+ else if ($reason_id)
+ {
+ $sql = 'SELECT *
+ FROM ' . REPORTS_REASONS_TABLE . '
+ WHERE reason_id = ' . $reason_id;
+ $result = $db->sql_query($sql);
+ $reason_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$reason_row)
+ {
+ trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+
+ $l_title = ($action == 'edit') ? 'EDIT' : 'ADD';
+
+ $translated = false;
+
+ // If the reason is defined within the language file, we will use the localized version, else just use the database entry...
+ if (isset($user->lang['report_reasons']['TITLE'][strtoupper($reason_row['reason_title'])]) && isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($reason_row['reason_title'])]))
+ {
+ $translated = true;
+ }
+
+ $template->assign_vars(array(
+ 'L_TITLE' => $user->lang['REASON_' . $l_title],
+ 'U_ACTION' => $this->u_action . "&amp;id=$reason_id&amp;action=$action",
+ 'U_BACK' => $this->u_action,
+ 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
+
+ 'REASON_TITLE' => $reason_row['reason_title'],
+ 'REASON_DESCRIPTION' => $reason_row['reason_description'],
+
+ 'TRANSLATED_TITLE' => ($translated) ? $user->lang['report_reasons']['TITLE'][strtoupper($reason_row['reason_title'])] : '',
+ 'TRANSLATED_DESCRIPTION'=> ($translated) ? $user->lang['report_reasons']['DESCRIPTION'][strtoupper($reason_row['reason_title'])] : '',
+
+ 'S_AVAILABLE_TITLES' => implode(', ', array_map('htmlspecialchars', array_keys($user->lang['report_reasons']['TITLE']))),
+ 'S_EDIT_REASON' => true,
+ 'S_TRANSLATED' => $translated,
+ 'S_ERROR' => (sizeof($error)) ? true : false,
+ )
+ );
+
+ return;
+ break;
+
+ case 'delete':
+
+ $sql = 'SELECT *
+ FROM ' . REPORTS_REASONS_TABLE . '
+ WHERE reason_id = ' . $reason_id;
+ $result = $db->sql_query($sql);
+ $reason_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$reason_row)
+ {
+ trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (strtolower($reason_row['reason_title']) == 'other')
+ {
+ trigger_error($user->lang['NO_REMOVE_DEFAULT_REASON'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // Let the deletion be confirmed...
+ if (confirm_box(true))
+ {
+ $sql = 'SELECT reason_id
+ FROM ' . REPORTS_REASONS_TABLE . "
+ WHERE LOWER(reason_title) = 'other'";
+ $result = $db->sql_query($sql);
+ $other_reason_id = (int) $db->sql_fetchfield('reason_id');
+ $db->sql_freeresult($result);
+
+ switch ($db->sql_layer)
+ {
+ // The ugly one!
+ case 'mysqli':
+ case 'mysql4':
+ case 'mysql':
+ // Change the reports using this reason to 'other'
+ $sql = 'UPDATE ' . REPORTS_TABLE . '
+ SET reason_id = ' . $other_reason_id . ", report_text = CONCAT('" . $db->sql_escape($reason_row['reason_description']) . "\n\n', report_text)
+ WHERE reason_id = $reason_id";
+ break;
+
+ // Standard? What's that?
+ case 'mssql':
+ case 'mssql_odbc':
+ // Change the reports using this reason to 'other'
+ $sql = "DECLARE @ptrval binary(16)
+
+ SELECT @ptrval = TEXTPTR(report_text)
+ FROM " . REPORTS_TABLE . "
+ WHERE reason_id = " . $reason_id . "
+
+ UPDATETEXT " . REPORTS_TABLE . ".report_text @ptrval 0 0 '" . $db->sql_escape($reason_row['reason_description']) . "\n\n'
+
+ UPDATE " . REPORTS_TABLE . '
+ SET reason_id = ' . $other_reason_id . "
+ WHERE reason_id = $reason_id";
+ break;
+
+ // Teh standard
+ case 'postgres':
+ case 'oracle':
+ case 'firebird':
+ case 'sqlite':
+ // Change the reports using this reason to 'other'
+ $sql = 'UPDATE ' . REPORTS_TABLE . '
+ SET reason_id = ' . $other_reason_id . ", report_text = '" . $db->sql_escape($reason_row['reason_description']) . "\n\n' || report_text
+ WHERE reason_id = $reason_id";
+ break;
+ }
+ $db->sql_query($sql);
+
+ $db->sql_query('DELETE FROM ' . REPORTS_REASONS_TABLE . ' WHERE reason_id = ' . $reason_id);
+
+ add_log('admin', 'LOG_REASON_REMOVED', $reason_row['reason_title']);
+ trigger_error($user->lang['REASON_REMOVED'] . adm_back_link($this->u_action));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ 'id' => $reason_id))
+ );
+ }
+
+ break;
+
+ case 'move_up':
+ case 'move_down':
+
+ $order = request_var('order', 0);
+ $order_total = $order * 2 + (($action == 'move_up') ? -1 : 1);
+
+ $sql = 'UPDATE ' . REPORTS_REASONS_TABLE . '
+ SET reason_order = ' . $order_total . ' - reason_order
+ WHERE reason_order IN (' . $order . ', ' . (($action == 'move_up') ? $order - 1 : $order + 1) . ')';
+ $db->sql_query($sql);
+
+ break;
+ }
+
+ // By default, check that order is valid and fix it if necessary
+ $sql = 'SELECT reason_id, reason_order
+ FROM ' . REPORTS_REASONS_TABLE . '
+ ORDER BY reason_order';
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $order = 0;
+ do
+ {
+ ++$order;
+
+ if ($row['reason_order'] != $order)
+ {
+ $sql = 'UPDATE ' . REPORTS_REASONS_TABLE . "
+ SET reason_order = $order
+ WHERE reason_id = {$row['reason_id']}";
+ $db->sql_query($sql);
+ }
+ }
+ while ($row = $db->sql_fetchrow($result));
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'U_ACTION' => $this->u_action,
+ )
+ );
+
+ // Reason count
+ $sql = 'SELECT reason_id, COUNT(reason_id) AS reason_count
+ FROM ' . REPORTS_TABLE . '
+ GROUP BY reason_id';
+ $result = $db->sql_query($sql);
+
+ $reason_count = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $reason_count[$row['reason_id']] = $row['reason_count'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT *
+ FROM ' . REPORTS_REASONS_TABLE . '
+ ORDER BY reason_order ASC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $translated = false;
+ $other_reason = ($row['reason_title'] == 'other') ? true : false;
+
+ // If the reason is defined within the language file, we will use the localized version, else just use the database entry...
+ if (isset($user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])]) && isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])]))
+ {
+ $row['reason_description'] = $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])];
+ $row['reason_title'] = $user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])];
+
+ $translated = true;
+ }
+
+ $template->assign_block_vars('reasons', array(
+ 'REASON_TITLE' => $row['reason_title'],
+ 'REASON_DESCRIPTION' => $row['reason_description'],
+ 'REASON_COUNT' => (isset($reason_count[$row['reason_id']])) ? $reason_count[$row['reason_id']] : 0,
+
+ 'S_TRANSLATED' => $translated,
+ 'S_OTHER_REASON' => $other_reason,
+
+ 'U_EDIT' => $this->u_action . '&amp;action=edit&amp;id=' . $row['reason_id'],
+ 'U_DELETE' => (!$other_reason) ? $this->u_action . '&amp;action=delete&amp;id=' . $row['reason_id'] : '',
+ 'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;order=' . $row['reason_order'],
+ 'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;order=' . $row['reason_order'])
+ );
+ }
+ $db->sql_freeresult($result);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php
new file mode 100644
index 0000000000..930c8d2a26
--- /dev/null
+++ b/phpBB/includes/acp/acp_search.php
@@ -0,0 +1,629 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_search
+{
+ var $u_action;
+ var $state;
+ var $search;
+ var $max_post_id;
+ var $batch_size = 100;
+
+ function main($id, $mode)
+ {
+ global $user;
+
+ $user->add_lang('acp/search');
+
+ // For some this may be of help...
+ @ini_set('memory_limit', '128M');
+
+ switch ($mode)
+ {
+ case 'settings':
+ $this->settings($id, $mode);
+ break;
+
+ case 'index':
+ $this->index($id, $mode);
+ break;
+ }
+ }
+
+ function settings($id, $mode)
+ {
+ global $db, $user, $auth, $template, $cache;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ $submit = (isset($_POST['submit'])) ? true : false;
+
+ $search_types = $this->get_search_types();
+
+ $settings = array(
+ 'search_interval' => 'float',
+ 'search_anonymous_interval' => 'float',
+ 'load_search' => 'bool',
+ 'limit_search_load' => 'float',
+ 'min_search_author_chars' => 'integer',
+ 'max_num_search_keywords' => 'integer',
+ 'search_store_results' => 'integer',
+ );
+
+ $search = null;
+ $error = false;
+ $search_options = '';
+ foreach ($search_types as $type)
+ {
+ if ($this->init_search($type, $search, $error))
+ {
+ continue;
+ }
+
+ $name = ucfirst(strtolower(str_replace('_', ' ', $type)));
+ $selected = ($config['search_type'] == $type) ? ' selected="selected"' : '';
+ $search_options .= '<option value="' . $type . '"' . $selected . '>' . $name . '</option>';
+
+ if (method_exists($search, 'acp'))
+ {
+ $vars = $search->acp();
+
+ if (!$submit)
+ {
+ $template->assign_block_vars('backend', array(
+ 'NAME' => $name,
+ 'SETTINGS' => $vars['tpl'])
+ );
+ }
+ else if (is_array($vars['config']))
+ {
+ $settings = array_merge($settings, $vars['config']);
+ }
+ }
+ }
+ unset($search);
+ unset($error);
+
+ $cfg_array = (isset($_REQUEST['config'])) ? request_var('config', array('' => ''), true) : array();
+ $updated = request_var('updated', false);
+
+ foreach ($settings as $config_name => $var_type)
+ {
+ if (!isset($cfg_array[$config_name]))
+ {
+ continue;
+ }
+
+ // e.g. integer:4:12 (min 4, max 12)
+ $var_type = explode(':', $var_type);
+
+ $config_value = $cfg_array[$config_name];
+ settype($config_value, $var_type[0]);
+
+ if (isset($var_type[1]))
+ {
+ $config_value = max($var_type[1], $config_value);
+ }
+
+ if (isset($var_type[2]))
+ {
+ $config_value = min($var_type[2], $config_value);
+ }
+
+ // only change config if anything was actually changed
+ if ($submit && ($config[$config_name] != $config_value))
+ {
+ set_config($config_name, $config_value);
+ $updated = true;
+ }
+ }
+
+ if ($submit)
+ {
+ $extra_message = '';
+ if ($updated)
+ {
+ add_log('admin', 'LOG_CONFIG_SEARCH');
+ }
+
+ if (isset($cfg_array['search_type']) && in_array($cfg_array['search_type'], $search_types, true) && ($cfg_array['search_type'] != $config['search_type']))
+ {
+ $search = null;
+ $error = false;
+
+ if (!$this->init_search($cfg_array['search_type'], $search, $error))
+ {
+ if (confirm_box(true))
+ {
+ if (!method_exists($search, 'init') || !($error = $search->init()))
+ {
+ set_config('search_type', $cfg_array['search_type']);
+
+ if (!$updated)
+ {
+ add_log('admin', 'LOG_CONFIG_SEARCH');
+ }
+ $extra_message = '<br />' . $user->lang['SWITCHED_SEARCH_BACKEND'] . '<br /><a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=search&amp;mode=index') . '">&raquo; ' . $user->lang['GO_TO_SEARCH_INDEX'] . '</a>';
+ }
+ else
+ {
+ trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_SEARCH_BACKEND'], build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'submit' => true,
+ 'updated' => $updated,
+ 'config' => array('search_type' => $cfg_array['search_type']),
+ )));
+ }
+ }
+ else
+ {
+ trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+
+ $search = null;
+ $error = false;
+ if (!$this->init_search($config['search_type'], $search, $error))
+ {
+ if ($updated)
+ {
+ if (method_exists($search, 'config_updated'))
+ {
+ if ($search->config_updated())
+ {
+ trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+ }
+ }
+ else
+ {
+ trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ trigger_error($user->lang['CONFIG_UPDATED'] . $extra_message . adm_back_link($this->u_action));
+ }
+ unset($cfg_array);
+
+ $this->tpl_name = 'acp_search';
+ $this->page_title = 'ACP_SEARCH_SETTINGS';
+
+ $template->assign_vars(array(
+ 'LIMIT_SEARCH_LOAD' => (float) $config['limit_search_load'],
+ 'MIN_SEARCH_AUTHOR_CHARS' => (int) $config['min_search_author_chars'],
+ 'SEARCH_INTERVAL' => (float) $config['search_interval'],
+ 'SEARCH_GUEST_INTERVAL' => (float) $config['search_anonymous_interval'],
+ 'SEARCH_STORE_RESULTS' => (int) $config['search_store_results'],
+ 'MAX_NUM_SEARCH_KEYWORDS' => (int) $config['max_num_search_keywords'],
+
+ 'S_SEARCH_TYPES' => $search_options,
+ 'S_YES_SEARCH' => (bool) $config['load_search'],
+ 'S_SETTINGS' => true,
+
+ 'U_ACTION' => $this->u_action)
+ );
+ }
+
+ function index($id, $mode)
+ {
+ global $db, $user, $auth, $template, $cache;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ if (isset($_REQUEST['action']) && is_array($_REQUEST['action']))
+ {
+ $action = request_var('action', array('' => false));
+ $action = key($action);
+ }
+ else
+ {
+ $action = request_var('action', '');
+ }
+ $this->state = explode(',', $config['search_indexing_state']);
+
+ if (isset($_POST['cancel']))
+ {
+ $action = '';
+ $this->state = array();
+ $this->save_state();
+ }
+
+ if ($action)
+ {
+ switch ($action)
+ {
+ case 'progress_bar':
+ $type = request_var('type', '');
+ $this->display_progress_bar($type);
+ break;
+
+ case 'delete':
+ $this->state[1] = 'delete';
+ break;
+
+ case 'create':
+ $this->state[1] = 'create';
+ break;
+
+ default:
+ trigger_error('NO_ACTION', E_USER_ERROR);
+ break;
+ }
+
+ if (empty($this->state[0]))
+ {
+ $this->state[0] = request_var('search_type', '');
+ }
+
+ $this->search = null;
+ $error = false;
+ if ($this->init_search($this->state[0], $this->search, $error))
+ {
+ trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ $name = ucfirst(strtolower(str_replace('_', ' ', $this->state[0])));
+
+ $action = &$this->state[1];
+
+ $this->max_post_id = $this->get_max_post_id();
+
+ $post_counter = (isset($this->state[2])) ? $this->state[2] : 0;
+ $this->state[2] = &$post_counter;
+ $this->save_state();
+
+ switch ($action)
+ {
+ case 'delete':
+ if (method_exists($this->search, 'delete_index'))
+ {
+ // pass a reference to myself so the $search object can make use of save_state() and attributes
+ if ($error = $this->search->delete_index($this, append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=delete", false)))
+ {
+ $this->state = array('');
+ $this->save_state();
+ trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js(), E_USER_WARNING);
+ }
+ }
+ else
+ {
+ $starttime = explode(' ', microtime());
+ $starttime = $starttime[1] + $starttime[0];
+ $row_count = 0;
+ while (still_on_time() && $post_counter <= $this->max_post_id)
+ {
+ $sql = 'SELECT post_id, poster_id, forum_id
+ FROM ' . POSTS_TABLE . '
+ WHERE post_id >= ' . (int) ($post_counter + 1) . '
+ AND post_id <= ' . (int) ($post_counter + $this->batch_size);
+ $result = $db->sql_query($sql);
+
+ $ids = $posters = $forum_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $ids[] = $row['post_id'];
+ $posters[] = $row['poster_id'];
+ $forum_ids[] = $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
+ $row_count += sizeof($ids);
+
+ if (sizeof($ids))
+ {
+ $this->search->index_remove($ids, $posters, $forum_ids);
+ }
+
+ $post_counter += $this->batch_size;
+ }
+ // save the current state
+ $this->save_state();
+
+ if ($post_counter <= $this->max_post_id)
+ {
+ $mtime = explode(' ', microtime());
+ $totaltime = $mtime[0] + $mtime[1] - $starttime;
+ $rows_per_second = $row_count / $totaltime;
+ meta_refresh(1, append_sid($this->u_action . '&amp;action=delete&amp;skip_rows=' . $post_counter));
+ trigger_error(sprintf($user->lang['SEARCH_INDEX_DELETE_REDIRECT'], $post_counter, $row_count, $rows_per_second));
+ }
+ }
+
+ $this->search->tidy();
+
+ $this->state = array('');
+ $this->save_state();
+
+ add_log('admin', 'LOG_SEARCH_INDEX_REMOVED', $name);
+ trigger_error($user->lang['SEARCH_INDEX_REMOVED'] . adm_back_link($this->u_action) . $this->close_popup_js());
+ break;
+
+ case 'create':
+ if (method_exists($this->search, 'create_index'))
+ {
+ // pass a reference to acp_search so the $search object can make use of save_state() and attributes
+ if ($error = $this->search->create_index($this, append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=create", false)))
+ {
+ $this->state = array('');
+ $this->save_state();
+ trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js(), E_USER_WARNING);
+ }
+ }
+ else
+ {
+ $sql = 'SELECT forum_id, enable_indexing
+ FROM ' . FORUMS_TABLE;
+ $result = $db->sql_query($sql, 3600);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forums[$row['forum_id']] = (bool) $row['enable_indexing'];
+ }
+ $db->sql_freeresult($result);
+
+ $starttime = explode(' ', microtime());
+ $starttime = $starttime[1] + $starttime[0];
+ $row_count = 0;
+ while (still_on_time() && $post_counter <= $this->max_post_id)
+ {
+ $sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id
+ FROM ' . POSTS_TABLE . '
+ WHERE post_id >= ' . (int) ($post_counter + 1) . '
+ AND post_id <= ' . (int) ($post_counter + $this->batch_size);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // Indexing enabled for this forum or global announcement?
+ // Global announcements get indexed by default.
+ if (!$row['forum_id'] || (isset($forums[$row['forum_id']]) && $forums[$row['forum_id']]))
+ {
+ $this->search->index('post', $row['post_id'], $row['post_text'], $row['post_subject'], $row['poster_id'], $row['forum_id']);
+ }
+ $row_count++;
+ }
+ $db->sql_freeresult($result);
+
+ $post_counter += $this->batch_size;
+ }
+ // save the current state
+ $this->save_state();
+
+ // pretend the number of posts was as big as the number of ids we indexed so far
+ // just an estimation as it includes deleted posts
+ $num_posts = $config['num_posts'];
+ $config['num_posts'] = min($config['num_posts'], $post_counter);
+ $this->search->tidy();
+ $config['num_posts'] = $num_posts;
+
+ if ($post_counter <= $this->max_post_id)
+ {
+ $mtime = explode(' ', microtime());
+ $totaltime = $mtime[0] + $mtime[1] - $starttime;
+ $rows_per_second = $row_count / $totaltime;
+ meta_refresh(1, append_sid($this->u_action . '&amp;action=create&amp;skip_rows=' . $post_counter));
+ trigger_error(sprintf($user->lang['SEARCH_INDEX_CREATE_REDIRECT'], $post_counter, $row_count, $rows_per_second));
+ }
+ }
+
+ $this->search->tidy();
+
+ $this->state = array('');
+ $this->save_state();
+
+ add_log('admin', 'LOG_SEARCH_INDEX_CREATED', $name);
+ trigger_error($user->lang['SEARCH_INDEX_CREATED'] . adm_back_link($this->u_action) . $this->close_popup_js());
+ break;
+ }
+ }
+
+ $search_types = $this->get_search_types();
+
+ $search = null;
+ $error = false;
+ $search_options = '';
+ foreach ($search_types as $type)
+ {
+ if ($this->init_search($type, $search, $error) || !method_exists($search, 'index_created'))
+ {
+ continue;
+ }
+
+ $name = ucfirst(strtolower(str_replace('_', ' ', $type)));
+
+ $data = array();
+ if (method_exists($search, 'index_stats'))
+ {
+ $data = $search->index_stats();
+ }
+
+ $statistics = array();
+ foreach ($data as $statistic => $value)
+ {
+ $n = sizeof($statistics);
+ if ($n && sizeof($statistics[$n - 1]) < 3)
+ {
+ $statistics[$n - 1] += array('statistic_2' => $statistic, 'value_2' => $value);
+ }
+ else
+ {
+ $statistics[] = array('statistic_1' => $statistic, 'value_1' => $value);
+ }
+ }
+
+ $template->assign_block_vars('backend', array(
+ 'L_NAME' => $name,
+ 'NAME' => $type,
+
+ 'S_ACTIVE' => ($type == $config['search_type']) ? true : false,
+ 'S_HIDDEN_FIELDS' => build_hidden_fields(array('search_type' => $type)),
+ 'S_INDEXED' => (bool) $search->index_created(),
+ 'S_STATS' => (bool) sizeof($statistics))
+ );
+
+ foreach ($statistics as $statistic)
+ {
+ $template->assign_block_vars('backend.data', array(
+ 'STATISTIC_1' => $statistic['statistic_1'],
+ 'VALUE_1' => $statistic['value_1'],
+ 'STATISTIC_2' => (isset($statistic['statistic_2'])) ? $statistic['statistic_2'] : '',
+ 'VALUE_2' => (isset($statistic['value_2'])) ? $statistic['value_2'] : '')
+ );
+ }
+ }
+ unset($search);
+ unset($error);
+ unset($statistics);
+ unset($data);
+
+ $this->tpl_name = 'acp_search';
+ $this->page_title = 'ACP_SEARCH_INDEX';
+
+ $template->assign_vars(array(
+ 'S_INDEX' => true,
+ 'U_ACTION' => $this->u_action,
+ 'U_PROGRESS_BAR' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&amp;mode=$mode&amp;action=progress_bar"),
+ 'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&amp;mode=$mode&amp;action=progress_bar")),
+ ));
+
+ if (isset($this->state[1]))
+ {
+ $template->assign_vars(array(
+ 'S_CONTINUE_INDEXING' => $this->state[1],
+ 'U_CONTINUE_INDEXING' => $this->u_action . '&amp;action=' . $this->state[1],
+ 'L_CONTINUE' => ($this->state[1] == 'create') ? $user->lang['CONTINUE_INDEXING'] : $user->lang['CONTINUE_DELETING_INDEX'],
+ 'L_CONTINUE_EXPLAIN' => ($this->state[1] == 'create') ? $user->lang['CONTINUE_INDEXING_EXPLAIN'] : $user->lang['CONTINUE_DELETING_INDEX_EXPLAIN'])
+ );
+ }
+ }
+
+ function display_progress_bar($type)
+ {
+ global $template, $user;
+
+ $l_type = ($type == 'create') ? 'INDEXING_IN_PROGRESS' : 'DELETING_INDEX_IN_PROGRESS';
+
+ adm_page_header($user->lang[$l_type]);
+
+ $template->set_filenames(array(
+ 'body' => 'progress_bar.html')
+ );
+
+ $template->assign_vars(array(
+ 'L_PROGRESS' => $user->lang[$l_type],
+ 'L_PROGRESS_EXPLAIN' => $user->lang[$l_type . '_EXPLAIN'])
+ );
+
+ adm_page_footer();
+ }
+
+ function close_popup_js()
+ {
+ return "<script type=\"text/javascript\">\n" .
+ "// <![CDATA[\n" .
+ " close_waitscreen = 1;\n" .
+ "// ]]>\n" .
+ "</script>\n";
+ }
+
+ function get_search_types()
+ {
+ global $phpbb_root_path, $phpEx;
+
+ $search_types = array();
+
+ $dp = @opendir($phpbb_root_path . 'includes/search');
+
+ if ($dp)
+ {
+ while (($file = readdir($dp)) !== false)
+ {
+ if ((preg_match('#\.' . $phpEx . '$#', $file)) && ($file != "search.$phpEx"))
+ {
+ $search_types[] = preg_replace('#^(.*?)\.' . $phpEx . '$#', '\1', $file);
+ }
+ }
+ closedir($dp);
+
+ sort($search_types);
+ }
+
+ return $search_types;
+ }
+
+ function get_max_post_id()
+ {
+ global $db;
+
+ $sql = 'SELECT MAX(post_id) as max_post_id
+ FROM '. POSTS_TABLE;
+ $result = $db->sql_query($sql);
+ $max_post_id = (int) $db->sql_fetchfield('max_post_id');
+ $db->sql_freeresult($result);
+
+ return $max_post_id;
+ }
+
+ function save_state($state = false)
+ {
+ if ($state)
+ {
+ $this->state = $state;
+ }
+
+ ksort($this->state);
+
+ set_config('search_indexing_state', implode(',', $this->state), true);
+ }
+
+ /**
+ * Initialises a search backend object
+ *
+ * @return false if no error occurred else an error message
+ */
+ function init_search($type, &$search, &$error)
+ {
+ global $phpbb_root_path, $phpEx, $user;
+
+ if (!preg_match('#^\w+$#', $type) || !file_exists("{$phpbb_root_path}includes/search/$type.$phpEx"))
+ {
+ $error = $user->lang['NO_SUCH_SEARCH_MODULE'];
+ return $error;
+ }
+
+ include_once("{$phpbb_root_path}includes/search/$type.$phpEx");
+
+ if (!class_exists($type))
+ {
+ $error = $user->lang['NO_SUCH_SEARCH_MODULE'];
+ return $error;
+ }
+
+ $error = false;
+ $search = new $type($error);
+
+ return $error;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_send_statistics.php b/phpBB/includes/acp/acp_send_statistics.php
new file mode 100644
index 0000000000..b3baf54983
--- /dev/null
+++ b/phpBB/includes/acp/acp_send_statistics.php
@@ -0,0 +1,90 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx);
+
+/**
+* @package acp
+*/
+class acp_send_statistics
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $config, $template, $phpbb_admin_path, $phpEx;
+
+ $collect_url = "http://www.phpbb.com/stats/receive_stats.php";
+
+ $this->tpl_name = 'acp_send_statistics';
+ $this->page_title = 'ACP_SEND_STATISTICS';
+
+ // generate a unique id if necessary
+ if (!isset($config['questionnaire_unique_id']))
+ {
+ $install_id = unique_id();
+ set_config('questionnaire_unique_id', $install_id);
+ }
+ else
+ {
+ $install_id = $config['questionnaire_unique_id'];
+ }
+
+ $collector = new phpbb_questionnaire_data_collector($install_id);
+
+ // Add data provider
+ $collector->add_data_provider(new phpbb_questionnaire_php_data_provider());
+ $collector->add_data_provider(new phpbb_questionnaire_system_data_provider());
+ $collector->add_data_provider(new phpbb_questionnaire_phpbb_data_provider($config));
+
+ $template->assign_vars(array(
+ 'U_COLLECT_STATS' => $collect_url,
+ 'RAW_DATA' => $collector->get_data_for_form(),
+ 'U_ACP_MAIN' => append_sid("{$phpbb_admin_path}index.$phpEx"),
+ ));
+
+ $raw = $collector->get_data_raw();
+
+ foreach ($raw as $provider => $data)
+ {
+ if ($provider == 'install_id')
+ {
+ $data = array($provider => $data);
+ }
+
+ $template->assign_block_vars('providers', array(
+ 'NAME' => htmlspecialchars($provider),
+ ));
+
+ foreach ($data as $key => $value)
+ {
+ if (is_array($value))
+ {
+ $value = utf8_wordwrap(serialize($value), 75, "\n", true);
+ }
+
+ $template->assign_block_vars('providers.values', array(
+ 'KEY' => utf8_htmlspecialchars($key),
+ 'VALUE' => utf8_htmlspecialchars($value),
+ ));
+ }
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
new file mode 100644
index 0000000000..fbf3eadcb2
--- /dev/null
+++ b/phpBB/includes/acp/acp_styles.php
@@ -0,0 +1,3768 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_styles
+{
+ var $u_action;
+
+ var $style_cfg;
+ var $template_cfg;
+ var $theme_cfg;
+ var $imageset_cfg;
+ var $imageset_keys;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template, $cache;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ // Hardcoded template bitfield to add for new templates
+ $bitfield = new bitfield();
+ $bitfield->set(0);
+ $bitfield->set(1);
+ $bitfield->set(2);
+ $bitfield->set(3);
+ $bitfield->set(4);
+ $bitfield->set(8);
+ $bitfield->set(9);
+ $bitfield->set(11);
+ $bitfield->set(12);
+ define('TEMPLATE_BITFIELD', $bitfield->get_base64());
+ unset($bitfield);
+
+ $user->add_lang('acp/styles');
+
+ $this->tpl_name = 'acp_styles';
+ $this->page_title = 'ACP_CAT_STYLES';
+
+ $action = request_var('action', '');
+ $action = (isset($_POST['add'])) ? 'add' : $action;
+ $style_id = request_var('id', 0);
+
+ // Fill the configuration variables
+ $this->style_cfg = $this->template_cfg = $this->theme_cfg = $this->imageset_cfg = '
+#
+# phpBB {MODE} configuration file
+#
+# @package phpBB3
+# @copyright (c) 2005 phpBB Group
+# @license http://opensource.org/licenses/gpl-license.php GNU Public License
+#
+#
+# At the left is the name, please do not change this
+# At the right the value is entered
+# For on/off options the valid values are on, off, 1, 0, true and false
+#
+# Values get trimmed, if you want to add a space in front or at the end of
+# the value, then enclose the value with single or double quotes.
+# Single and double quotes do not need to be escaped.
+#
+#
+
+# General Information about this {MODE}
+name = {NAME}
+copyright = {COPYRIGHT}
+version = {VERSION}
+';
+
+ $this->theme_cfg .= '
+# Some configuration options
+
+#
+# You have to turn this option on if you want to use the
+# path template variables ({T_IMAGESET_PATH} for example) within
+# your css file.
+# This is mostly the case if you want to use language specific
+# images within your css file.
+#
+parse_css_file = {PARSE_CSS_FILE}
+';
+
+ $this->template_cfg .= '
+# Some configuration options
+
+#
+# You can use this function to inherit templates from another template.
+# The template of the given name has to be installed.
+# Templates cannot inherit from inheriting templates.
+#';
+
+ $this->imageset_keys = array(
+ 'logos' => array(
+ 'site_logo',
+ ),
+ 'buttons' => array(
+ 'icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply',
+ ),
+ 'icons' => array(
+ 'icon_post_target', 'icon_post_target_unread', 'icon_topic_attach', 'icon_topic_latest', 'icon_topic_newest', 'icon_topic_reported', 'icon_topic_unapproved', 'icon_friend', 'icon_foe',
+ ),
+ 'forums' => array(
+ 'forum_link', 'forum_read', 'forum_read_locked', 'forum_read_subforum', 'forum_unread', 'forum_unread_locked', 'forum_unread_subforum', 'subforum_read', 'subforum_unread'
+ ),
+ 'folders' => array(
+ 'topic_moved', 'topic_read', 'topic_read_mine', 'topic_read_hot', 'topic_read_hot_mine', 'topic_read_locked', 'topic_read_locked_mine', 'topic_unread', 'topic_unread_mine', 'topic_unread_hot', 'topic_unread_hot_mine', 'topic_unread_locked', 'topic_unread_locked_mine', 'sticky_read', 'sticky_read_mine', 'sticky_read_locked', 'sticky_read_locked_mine', 'sticky_unread', 'sticky_unread_mine', 'sticky_unread_locked', 'sticky_unread_locked_mine', 'announce_read', 'announce_read_mine', 'announce_read_locked', 'announce_read_locked_mine', 'announce_unread', 'announce_unread_mine', 'announce_unread_locked', 'announce_unread_locked_mine', 'global_read', 'global_read_mine', 'global_read_locked', 'global_read_locked_mine', 'global_unread', 'global_unread_mine', 'global_unread_locked', 'global_unread_locked_mine', 'pm_read', 'pm_unread',
+ ),
+ 'polls' => array(
+ 'poll_left', 'poll_center', 'poll_right',
+ ),
+ 'ui' => array(
+ 'upload_bar',
+ ),
+ 'user' => array(
+ 'user_icon1', 'user_icon2', 'user_icon3', 'user_icon4', 'user_icon5', 'user_icon6', 'user_icon7', 'user_icon8', 'user_icon9', 'user_icon10',
+ ),
+ );
+
+ // Execute overall actions
+ switch ($action)
+ {
+ case 'delete':
+ if ($style_id)
+ {
+ $this->remove($mode, $style_id);
+ return;
+ }
+ break;
+
+ case 'export':
+ if ($style_id)
+ {
+ $this->export($mode, $style_id);
+ return;
+ }
+ break;
+
+ case 'install':
+ $this->install($mode);
+ return;
+ break;
+
+ case 'add':
+ $this->add($mode);
+ return;
+ break;
+
+ case 'details':
+ if ($style_id)
+ {
+ $this->details($mode, $style_id);
+ return;
+ }
+ break;
+
+ case 'edit':
+ if ($style_id)
+ {
+ switch ($mode)
+ {
+ case 'imageset':
+ return $this->edit_imageset($style_id);
+ case 'template':
+ return $this->edit_template($style_id);
+ case 'theme':
+ return $this->edit_theme($style_id);
+ }
+ }
+ break;
+
+ case 'cache':
+ if ($style_id)
+ {
+ switch ($mode)
+ {
+ case 'template':
+ return $this->template_cache($style_id);
+ }
+ }
+ break;
+ }
+
+ switch ($mode)
+ {
+ case 'style':
+
+ switch ($action)
+ {
+ case 'activate':
+ case 'deactivate':
+
+ if ($style_id == $config['default_style'])
+ {
+ trigger_error($user->lang['DEACTIVATE_DEFAULT'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (($action == 'deactivate' && confirm_box(true)) || $action == 'activate')
+ {
+ $sql = 'UPDATE ' . STYLES_TABLE . '
+ SET style_active = ' . (($action == 'activate') ? 1 : 0) . '
+ WHERE style_id = ' . $style_id;
+ $db->sql_query($sql);
+
+ // Set style to default for any member using deactivated style
+ if ($action == 'deactivate')
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_style = ' . $config['default_style'] . "
+ WHERE user_style = $style_id";
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET forum_style = 0
+ WHERE forum_style = ' . $style_id;
+ $db->sql_query($sql);
+ }
+ }
+ else if ($action == 'deactivate')
+ {
+ $s_hidden_fields = array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ 'style_id' => $style_id,
+ );
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($s_hidden_fields));
+ }
+ break;
+ }
+
+ $this->frontend('style', array('details'), array('export', 'delete'));
+ break;
+
+ case 'template':
+
+ switch ($action)
+ {
+ // Refresh template data stored in db and clear cache
+ case 'refresh':
+
+ $sql = 'SELECT *
+ FROM ' . STYLES_TEMPLATE_TABLE . "
+ WHERE template_id = $style_id";
+ $result = $db->sql_query($sql);
+ $template_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$template_row)
+ {
+ trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (confirm_box(true))
+ {
+ $template_refreshed = '';
+
+ // Only refresh database if the template is stored in the database
+ if ($template_row['template_storedb'] && file_exists("{$phpbb_root_path}styles/{$template_row['template_path']}/template/"))
+ {
+ $filelist = array('' => array());
+
+ $sql = 'SELECT template_filename, template_mtime
+ FROM ' . STYLES_TEMPLATE_DATA_TABLE . "
+ WHERE template_id = $style_id";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+// if (@filemtime("{$phpbb_root_path}styles/{$template_row['template_path']}/template/" . $row['template_filename']) > $row['template_mtime'])
+// {
+ // get folder info from the filename
+ if (($slash_pos = strrpos($row['template_filename'], '/')) === false)
+ {
+ $filelist[''][] = $row['template_filename'];
+ }
+ else
+ {
+ $filelist[substr($row['template_filename'], 0, $slash_pos + 1)][] = substr($row['template_filename'], $slash_pos + 1, strlen($row['template_filename']) - $slash_pos - 1);
+ }
+// }
+ }
+ $db->sql_freeresult($result);
+
+ $this->store_templates('update', $style_id, $template_row['template_path'], $filelist);
+ unset($filelist);
+
+ $template_refreshed = $user->lang['TEMPLATE_REFRESHED'] . '<br />';
+ add_log('admin', 'LOG_TEMPLATE_REFRESHED', $template_row['template_name']);
+ }
+
+ $this->clear_template_cache($template_row);
+
+ trigger_error($template_refreshed . $user->lang['TEMPLATE_CACHE_CLEARED'] . adm_back_link($this->u_action));
+ }
+ else
+ {
+ confirm_box(false, ($template_row['template_storedb']) ? $user->lang['CONFIRM_TEMPLATE_REFRESH'] : $user->lang['CONFIRM_TEMPLATE_CLEAR_CACHE'], build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ 'id' => $style_id
+ )));
+ }
+
+ break;
+ }
+
+ $this->frontend('template', array('edit', 'cache', 'details'), array('refresh', 'export', 'delete'));
+ break;
+
+ case 'theme':
+
+ switch ($action)
+ {
+ // Refresh theme data stored in the database
+ case 'refresh':
+
+ $sql = 'SELECT *
+ FROM ' . STYLES_THEME_TABLE . "
+ WHERE theme_id = $style_id";
+ $result = $db->sql_query($sql);
+ $theme_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$theme_row)
+ {
+ trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (!$theme_row['theme_storedb'])
+ {
+ trigger_error($user->lang['THEME_ERR_REFRESH_FS'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (confirm_box(true))
+ {
+ if ($theme_row['theme_storedb'] && file_exists("{$phpbb_root_path}styles/{$theme_row['theme_path']}/theme/stylesheet.css"))
+ {
+ // Save CSS contents
+ $sql_ary = array(
+ 'theme_mtime' => (int) filemtime("{$phpbb_root_path}styles/{$theme_row['theme_path']}/theme/stylesheet.css"),
+ 'theme_data' => $this->db_theme_data($theme_row)
+ );
+
+ $sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE theme_id = $style_id";
+ $db->sql_query($sql);
+
+ $cache->destroy('sql', STYLES_THEME_TABLE);
+
+ add_log('admin', 'LOG_THEME_REFRESHED', $theme_row['theme_name']);
+ trigger_error($user->lang['THEME_REFRESHED'] . adm_back_link($this->u_action));
+ }
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_THEME_REFRESH'], build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ 'id' => $style_id
+ )));
+ }
+ break;
+ }
+
+ $this->frontend('theme', array('edit', 'details'), array('refresh', 'export', 'delete'));
+ break;
+
+ case 'imageset':
+
+ switch ($action)
+ {
+ case 'refresh':
+
+ $sql = 'SELECT *
+ FROM ' . STYLES_IMAGESET_TABLE . "
+ WHERE imageset_id = $style_id";
+ $result = $db->sql_query($sql);
+ $imageset_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$imageset_row)
+ {
+ trigger_error($user->lang['NO_IMAGESET'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (confirm_box(true))
+ {
+ $sql_ary = array();
+
+ $imageset_definitions = array();
+ foreach ($this->imageset_keys as $topic => $key_array)
+ {
+ $imageset_definitions = array_merge($imageset_definitions, $key_array);
+ }
+
+ $cfg_data_imageset = parse_cfg_file("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/imageset.cfg");
+
+ $db->sql_transaction('begin');
+
+ $sql = 'DELETE FROM ' . STYLES_IMAGESET_DATA_TABLE . '
+ WHERE imageset_id = ' . $style_id;
+ $result = $db->sql_query($sql);
+
+ foreach ($cfg_data_imageset as $image_name => $value)
+ {
+ if (strpos($value, '*') !== false)
+ {
+ if (substr($value, -1, 1) === '*')
+ {
+ list($image_filename, $image_height) = explode('*', $value);
+ $image_width = 0;
+ }
+ else
+ {
+ list($image_filename, $image_height, $image_width) = explode('*', $value);
+ }
+ }
+ else
+ {
+ $image_filename = $value;
+ $image_height = $image_width = 0;
+ }
+
+ if (strpos($image_name, 'img_') === 0 && $image_filename)
+ {
+ $image_name = substr($image_name, 4);
+ if (in_array($image_name, $imageset_definitions))
+ {
+ $sql_ary[] = array(
+ 'image_name' => (string) $image_name,
+ 'image_filename' => (string) $image_filename,
+ 'image_height' => (int) $image_height,
+ 'image_width' => (int) $image_width,
+ 'imageset_id' => (int) $style_id,
+ 'image_lang' => '',
+ );
+ }
+ }
+ }
+
+ $sql = 'SELECT lang_dir
+ FROM ' . LANG_TABLE;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (@file_exists("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$row['lang_dir']}/imageset.cfg"))
+ {
+ $cfg_data_imageset_data = parse_cfg_file("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$row['lang_dir']}/imageset.cfg");
+ foreach ($cfg_data_imageset_data as $image_name => $value)
+ {
+ if (strpos($value, '*') !== false)
+ {
+ if (substr($value, -1, 1) === '*')
+ {
+ list($image_filename, $image_height) = explode('*', $value);
+ $image_width = 0;
+ }
+ else
+ {
+ list($image_filename, $image_height, $image_width) = explode('*', $value);
+ }
+ }
+ else
+ {
+ $image_filename = $value;
+ $image_height = $image_width = 0;
+ }
+
+ if (strpos($image_name, 'img_') === 0 && $image_filename)
+ {
+ $image_name = substr($image_name, 4);
+ if (in_array($image_name, $imageset_definitions))
+ {
+ $sql_ary[] = array(
+ 'image_name' => (string) $image_name,
+ 'image_filename' => (string) $image_filename,
+ 'image_height' => (int) $image_height,
+ 'image_width' => (int) $image_width,
+ 'imageset_id' => (int) $style_id,
+ 'image_lang' => (string) $row['lang_dir'],
+ );
+ }
+ }
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $db->sql_multi_insert(STYLES_IMAGESET_DATA_TABLE, $sql_ary);
+
+ $db->sql_transaction('commit');
+
+ $cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE);
+
+ add_log('admin', 'LOG_IMAGESET_REFRESHED', $imageset_row['imageset_name']);
+ trigger_error($user->lang['IMAGESET_REFRESHED'] . adm_back_link($this->u_action));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_IMAGESET_REFRESH'], build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ 'id' => $style_id
+ )));
+ }
+ break;
+ }
+
+ $this->frontend('imageset', array('edit', 'details'), array('refresh', 'export', 'delete'));
+ break;
+ }
+ }
+
+ /**
+ * Build Frontend with supplied options
+ */
+ function frontend($mode, $options, $actions)
+ {
+ global $user, $template, $db, $config, $phpbb_root_path, $phpEx;
+
+ $sql_from = '';
+ $style_count = array();
+
+ switch ($mode)
+ {
+ case 'style':
+ $sql_from = STYLES_TABLE;
+
+ $sql = 'SELECT user_style, COUNT(user_style) AS style_count
+ FROM ' . USERS_TABLE . '
+ GROUP BY user_style';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $style_count[$row['user_style']] = $row['style_count'];
+ }
+ $db->sql_freeresult($result);
+
+ break;
+
+ case 'template':
+ $sql_from = STYLES_TEMPLATE_TABLE;
+ break;
+
+ case 'theme':
+ $sql_from = STYLES_THEME_TABLE;
+ break;
+
+ case 'imageset':
+ $sql_from = STYLES_IMAGESET_TABLE;
+ break;
+ }
+
+ $l_prefix = strtoupper($mode);
+
+ $this->page_title = 'ACP_' . $l_prefix . 'S';
+
+ $template->assign_vars(array(
+ 'S_FRONTEND' => true,
+ 'S_STYLE' => ($mode == 'style') ? true : false,
+
+ 'L_TITLE' => $user->lang[$this->page_title],
+ 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'],
+ 'L_NAME' => $user->lang[$l_prefix . '_NAME'],
+ 'L_INSTALLED' => $user->lang['INSTALLED_' . $l_prefix],
+ 'L_UNINSTALLED' => $user->lang['UNINSTALLED_' . $l_prefix],
+ 'L_NO_UNINSTALLED' => $user->lang['NO_UNINSTALLED_' . $l_prefix],
+ 'L_CREATE' => $user->lang['CREATE_' . $l_prefix],
+
+ 'U_ACTION' => $this->u_action,
+ )
+ );
+
+ $sql = "SELECT *
+ FROM $sql_from";
+ $result = $db->sql_query($sql);
+
+ $installed = array();
+
+ $basis_options = '<option class="sep" value="">' . $user->lang['OPTIONAL_BASIS'] . '</option>';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $installed[] = $row[$mode . '_name'];
+ $basis_options .= '<option value="' . $row[$mode . '_id'] . '">' . $row[$mode . '_name'] . '</option>';
+
+ $stylevis = ($mode == 'style' && !$row['style_active']) ? 'activate' : 'deactivate';
+
+ $s_options = array();
+ foreach ($options as $option)
+ {
+ $s_options[] = '<a href="' . $this->u_action . "&amp;action=$option&amp;id=" . $row[$mode . '_id'] . '">' . $user->lang[strtoupper($option)] . '</a>';
+ }
+
+ $s_actions = array();
+ foreach ($actions as $option)
+ {
+ $s_actions[] = '<a href="' . $this->u_action . "&amp;action=$option&amp;id=" . $row[$mode . '_id'] . '">' . $user->lang[strtoupper($option)] . '</a>';
+ }
+
+ $template->assign_block_vars('installed', array(
+ 'S_DEFAULT_STYLE' => ($mode == 'style' && $row['style_id'] == $config['default_style']) ? true : false,
+ 'U_EDIT' => $this->u_action . '&amp;action=' . (($mode == 'style') ? 'details' : 'edit') . '&amp;id=' . $row[$mode . '_id'],
+ 'U_STYLE_ACT_DEACT' => $this->u_action . '&amp;action=' . $stylevis . '&amp;id=' . $row[$mode . '_id'],
+ 'L_STYLE_ACT_DEACT' => $user->lang['STYLE_' . strtoupper($stylevis)],
+ 'S_OPTIONS' => implode(' | ', $s_options),
+ 'S_ACTIONS' => implode(' | ', $s_actions),
+ 'U_PREVIEW' => ($mode == 'style') ? append_sid("{$phpbb_root_path}index.$phpEx", "$mode=" . $row[$mode . '_id']) : '',
+
+ 'NAME' => $row[$mode . '_name'],
+ 'STYLE_COUNT' => ($mode == 'style' && isset($style_count[$row['style_id']])) ? $style_count[$row['style_id']] : 0,
+ )
+ );
+ }
+ $db->sql_freeresult($result);
+
+ // Grab uninstalled items
+ $new_ary = $cfg = array();
+
+ $dp = @opendir("{$phpbb_root_path}styles");
+
+ if ($dp)
+ {
+ while (($file = readdir($dp)) !== false)
+ {
+ $subpath = ($mode != 'style') ? "$mode/" : '';
+ if ($file[0] != '.' && file_exists("{$phpbb_root_path}styles/$file/$subpath$mode.cfg"))
+ {
+ if ($cfg = file("{$phpbb_root_path}styles/$file/$subpath$mode.cfg"))
+ {
+ $items = parse_cfg_file('', $cfg);
+ $name = (isset($items['name'])) ? trim($items['name']) : false;
+
+ if ($name && !in_array($name, $installed))
+ {
+ $new_ary[] = array(
+ 'path' => $file,
+ 'name' => $name,
+ 'copyright' => $items['copyright'],
+ );
+ }
+ }
+ }
+ }
+ closedir($dp);
+ }
+
+ unset($installed);
+
+ if (sizeof($new_ary))
+ {
+ foreach ($new_ary as $cfg)
+ {
+ $template->assign_block_vars('uninstalled', array(
+ 'NAME' => $cfg['name'],
+ 'COPYRIGHT' => $cfg['copyright'],
+ 'U_INSTALL' => $this->u_action . '&amp;action=install&amp;path=' . urlencode($cfg['path']))
+ );
+ }
+ }
+ unset($new_ary);
+
+ $template->assign_vars(array(
+ 'S_BASIS_OPTIONS' => $basis_options)
+ );
+
+ }
+
+ /**
+ * Provides a template editor which allows saving changes to template files on the filesystem or in the database.
+ *
+ * @param int $template_id specifies which template set is being edited
+ */
+ function edit_template($template_id)
+ {
+ global $phpbb_root_path, $phpEx, $config, $db, $cache, $user, $template, $safe_mode;
+
+ if (defined('PHPBB_DISABLE_ACP_EDITOR'))
+ {
+ trigger_error($user->lang['EDITOR_DISABLED'] . adm_back_link($this->u_action));
+ }
+
+ $this->page_title = 'EDIT_TEMPLATE';
+
+ $filelist = $filelist_cats = array();
+
+ $template_data = utf8_normalize_nfc(request_var('template_data', '', true));
+ $template_data = htmlspecialchars_decode($template_data);
+ $template_file = utf8_normalize_nfc(request_var('template_file', '', true));
+ $text_rows = max(5, min(999, request_var('text_rows', 20)));
+ $save_changes = (isset($_POST['save'])) ? true : false;
+
+ // make sure template_file path doesn't go upwards
+ $template_file = str_replace('..', '.', $template_file);
+
+ // Retrieve some information about the template
+ $sql = 'SELECT template_storedb, template_path, template_name
+ FROM ' . STYLES_TEMPLATE_TABLE . "
+ WHERE template_id = $template_id";
+ $result = $db->sql_query($sql);
+ $template_info = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$template_info)
+ {
+ trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if ($save_changes && !check_form_key('acp_styles'))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ else if (!$save_changes)
+ {
+ add_form_key('acp_styles');
+ }
+
+ // save changes to the template if the user submitted any
+ if ($save_changes && $template_file)
+ {
+ // Get the filesystem location of the current file
+ $file = "{$phpbb_root_path}styles/{$template_info['template_path']}/template/$template_file";
+ $additional = '';
+
+ // If the template is stored on the filesystem try to write the file else store it in the database
+ if (!$safe_mode && !$template_info['template_storedb'] && file_exists($file) && @is_writable($file))
+ {
+ if (!($fp = @fopen($file, 'wb')))
+ {
+ // File exists and is writeable, but still not able to be written to
+ trigger_error(sprintf($user->lang['TEMPLATE_FILE_NOT_WRITABLE'], htmlspecialchars($template_file)) . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ fwrite($fp, $template_data);
+ fclose($fp);
+ }
+ else
+ {
+ $db->sql_transaction('begin');
+
+ // If it's not stored in the db yet, then update the template setting and store all template files in the db
+ if (!$template_info['template_storedb'])
+ {
+ if ($super = $this->get_super('template', $template_id))
+ {
+ $this->store_in_db('template', $super['template_id']);
+ }
+ else
+ {
+ $this->store_in_db('template', $template_id);
+ }
+
+ add_log('admin', 'LOG_TEMPLATE_EDIT_DETAILS', $template_info['template_name']);
+ $additional .= '<br />' . $user->lang['EDIT_TEMPLATE_STORED_DB'];
+ }
+
+ // Update the template_data table entry for this template file
+ $sql = 'UPDATE ' . STYLES_TEMPLATE_DATA_TABLE . "
+ SET template_data = '" . $db->sql_escape($template_data) . "', template_mtime = " . time() . "
+ WHERE template_id = $template_id
+ AND template_filename = '" . $db->sql_escape($template_file) . "'";
+ $db->sql_query($sql);
+
+ $db->sql_transaction('commit');
+ }
+
+ // destroy the cached version of the template (filename without extension)
+ $this->clear_template_cache($template_info, array(substr($template_file, 0, -5)));
+
+ $cache->destroy('sql', STYLES_TABLE);
+
+ add_log('admin', 'LOG_TEMPLATE_EDIT', $template_info['template_name'], $template_file);
+ trigger_error($user->lang['TEMPLATE_FILE_UPDATED'] . $additional . adm_back_link($this->u_action . "&amp;action=edit&amp;id=$template_id&amp;text_rows=$text_rows&amp;template_file=$template_file"));
+ }
+
+ // Generate a category array containing template filenames
+ if (!$template_info['template_storedb'])
+ {
+ $template_path = "{$phpbb_root_path}styles/{$template_info['template_path']}/template";
+
+ $filelist = filelist($template_path, '', 'html');
+ $filelist[''] = array_diff($filelist[''], array('bbcode.html'));
+
+ if ($template_file)
+ {
+ if (!file_exists($template_path . "/$template_file") || !($template_data = file_get_contents($template_path . "/$template_file")))
+ {
+ trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+ }
+ else
+ {
+ $sql = 'SELECT *
+ FROM ' . STYLES_TEMPLATE_DATA_TABLE . "
+ WHERE template_id = $template_id";
+ $result = $db->sql_query($sql);
+
+ $filelist = array('' => array());
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $file_info = pathinfo($row['template_filename']);
+
+ if (($file_info['basename'] != 'bbcode') && ($file_info['extension'] == 'html'))
+ {
+ if (($file_info['dirname'] == '.') || empty($file_info['dirname']))
+ {
+ $filelist[''][] = $row['template_filename'];
+ }
+ else
+ {
+ $filelist[$file_info['dirname'] . '/'][] = $file_info['basename'];
+ }
+ }
+
+ if ($row['template_filename'] == $template_file)
+ {
+ $template_data = $row['template_data'];
+ }
+ }
+ $db->sql_freeresult($result);
+ unset($file_info);
+ }
+
+ if (empty($filelist['']))
+ {
+ trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // Now create the categories
+ $filelist_cats[''] = array();
+ foreach ($filelist as $pathfile => $file_ary)
+ {
+ // Use the directory name as category name
+ if (!empty($pathfile))
+ {
+ $filelist_cats[$pathfile] = array();
+ foreach ($file_ary as $file)
+ {
+ $filelist_cats[$pathfile][$pathfile . $file] = $file;
+ }
+ }
+ // or if it's in the main category use the word before the first underscore to group files
+ else
+ {
+ $cats = array();
+ foreach ($file_ary as $file)
+ {
+ $cats[] = substr($file, 0, strpos($file, '_'));
+ $filelist_cats[substr($file, 0, strpos($file, '_'))][$file] = $file;
+ }
+
+ $cats = array_values(array_unique($cats));
+
+ // we don't need any single element categories so put them into the misc '' category
+ for ($i = 0, $n = sizeof($cats); $i < $n; $i++)
+ {
+ if (sizeof($filelist_cats[$cats[$i]]) == 1 && $cats[$i] !== '')
+ {
+ $filelist_cats[''][key($filelist_cats[$cats[$i]])] = current($filelist_cats[$cats[$i]]);
+ unset($filelist_cats[$cats[$i]]);
+ }
+ }
+ unset($cats);
+ }
+ }
+ unset($filelist);
+
+ // Generate list of categorised template files
+ $tpl_options = '';
+ ksort($filelist_cats);
+ foreach ($filelist_cats as $category => $tpl_ary)
+ {
+ ksort($tpl_ary);
+
+ if (!empty($category))
+ {
+ $tpl_options .= '<option class="sep" value="">' . $category . '</option>';
+ }
+
+ foreach ($tpl_ary as $filename => $file)
+ {
+ $selected = ($template_file == $filename) ? ' selected="selected"' : '';
+ $tpl_options .= '<option value="' . $filename . '"' . $selected . '>' . $file . '</option>';
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_EDIT_TEMPLATE' => true,
+ 'S_HIDDEN_FIELDS' => build_hidden_fields(array('template_file' => $template_file)),
+ 'S_TEMPLATES' => $tpl_options,
+
+ 'U_ACTION' => $this->u_action . "&amp;action=edit&amp;id=$template_id&amp;text_rows=$text_rows",
+ 'U_BACK' => $this->u_action,
+
+ 'L_EDIT' => $user->lang['EDIT_TEMPLATE'],
+ 'L_EDIT_EXPLAIN' => $user->lang['EDIT_TEMPLATE_EXPLAIN'],
+ 'L_EDITOR' => $user->lang['TEMPLATE_EDITOR'],
+ 'L_EDITOR_HEIGHT' => $user->lang['TEMPLATE_EDITOR_HEIGHT'],
+ 'L_FILE' => $user->lang['TEMPLATE_FILE'],
+ 'L_SELECT' => $user->lang['SELECT_TEMPLATE'],
+ 'L_SELECTED' => $user->lang['SELECTED_TEMPLATE'],
+ 'L_SELECTED_FILE' => $user->lang['SELECTED_TEMPLATE_FILE'],
+
+ 'SELECTED_TEMPLATE' => $template_info['template_name'],
+ 'TEMPLATE_FILE' => $template_file,
+ 'TEMPLATE_DATA' => utf8_htmlspecialchars($template_data),
+ 'TEXT_ROWS' => $text_rows)
+ );
+ }
+
+ /**
+ * Allows the admin to view cached versions of template files and clear single template cache files
+ *
+ * @param int $template_id specifies which template's cache is shown
+ */
+ function template_cache($template_id)
+ {
+ global $phpbb_root_path, $phpEx, $config, $db, $cache, $user, $template;
+
+ $source = str_replace('/', '.', request_var('source', ''));
+ $file_ary = array_diff(request_var('delete', array('')), array(''));
+ $submit = isset($_POST['submit']) ? true : false;
+
+ $sql = 'SELECT *
+ FROM ' . STYLES_TEMPLATE_TABLE . "
+ WHERE template_id = $template_id";
+ $result = $db->sql_query($sql);
+ $template_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$template_row)
+ {
+ trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // User wants to delete one or more files ...
+ if ($submit && $file_ary)
+ {
+ $this->clear_template_cache($template_row, $file_ary);
+ trigger_error($user->lang['TEMPLATE_CACHE_CLEARED'] . adm_back_link($this->u_action . "&amp;action=cache&amp;id=$template_id"));
+ }
+
+ $cache_prefix = 'tpl_' . str_replace('_', '-', $template_row['template_path']);
+
+ // Someone wants to see the cached source ... so we'll highlight it,
+ // add line numbers and indent it appropriately. This could be nasty
+ // on larger source files ...
+ if ($source && file_exists("{$phpbb_root_path}cache/{$cache_prefix}_$source.html.$phpEx"))
+ {
+ adm_page_header($user->lang['TEMPLATE_CACHE']);
+
+ $template->set_filenames(array(
+ 'body' => 'viewsource.html')
+ );
+
+ $template->assign_vars(array(
+ 'FILENAME' => str_replace('.', '/', $source) . '.html')
+ );
+
+ $code = str_replace(array("\r\n", "\r"), array("\n", "\n"), file_get_contents("{$phpbb_root_path}cache/{$cache_prefix}_$source.html.$phpEx"));
+
+ $conf = array('highlight.bg', 'highlight.comment', 'highlight.default', 'highlight.html', 'highlight.keyword', 'highlight.string');
+ foreach ($conf as $ini_var)
+ {
+ @ini_set($ini_var, str_replace('highlight.', 'syntax', $ini_var));
+ }
+
+ $marker = 'MARKER' . time();
+ $code = highlight_string(str_replace("\n", $marker, $code), true);
+ $code = str_replace($marker, "\n", $code);
+ $str_from = array('<span style="color: ', '<font color="syntax', '</font>', '<code>', '</code>','[', ']', '.', ':');
+ $str_to = array('<span class="', '<span class="syntax', '</span>', '', '', '&#91;', '&#93;', '&#46;', '&#58;');
+
+ $code = str_replace($str_from, $str_to, $code);
+ $code = preg_replace('#^(<span class="[a-z_]+">)\n?(.*?)\n?(</span>)$#ism', '$1$2$3', $code);
+ $code = substr($code, strlen('<span class="syntaxhtml">'));
+ $code = substr($code, 0, -1 * strlen('</ span>'));
+ $code = explode("\n", $code);
+
+ foreach ($code as $key => $line)
+ {
+ $template->assign_block_vars('source', array(
+ 'LINENUM' => $key + 1,
+ 'LINE' => preg_replace('#([^ ;])&nbsp;([^ &])#', '$1 $2', $line))
+ );
+ unset($code[$key]);
+ }
+
+ adm_page_footer();
+ }
+
+ $filemtime = array();
+ if ($template_row['template_storedb'])
+ {
+ $ids = array();
+ if (isset($template_row['template_inherits_id']) && $template_row['template_inherits_id'])
+ {
+ $ids[] = $template_row['template_inherits_id'];
+ }
+ $ids[] = $template_row['template_id'];
+
+ $filemtime = array();
+ $file_template_db = array();
+
+ foreach ($ids as $id)
+ {
+ $sql = 'SELECT template_filename, template_mtime
+ FROM ' . STYLES_TEMPLATE_DATA_TABLE . "
+ WHERE template_id = $id";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $filemtime[$row['template_filename']] = $row['template_mtime'];
+ $file_template_db[$row['template_filename']] = $id;
+ }
+ $db->sql_freeresult($result);
+ }
+ }
+
+ // Get a list of cached template files and then retrieve additional information about them
+ $file_ary = $this->template_cache_filelist($template_row['template_path']);
+
+ foreach ($file_ary as $file)
+ {
+ $file = str_replace('/', '.', $file);
+
+ // perform some dirty guessing to get the path right.
+ // We assume that three dots in a row were '../'
+ $tpl_file = str_replace('.', '/', $file);
+ $tpl_file = str_replace('///', '../', $tpl_file);
+
+ $filename = "{$cache_prefix}_$file.html.$phpEx";
+
+ if (!file_exists("{$phpbb_root_path}cache/$filename"))
+ {
+ continue;
+ }
+
+ $file_tpl = "{$phpbb_root_path}styles/{$template_row['template_path']}/template/$tpl_file.html";
+ $inherited = false;
+
+ if (isset($template_row['template_inherits_id']) && $template_row['template_inherits_id'])
+ {
+ if (!$template_row['template_storedb'])
+ {
+ if (!file_exists($file_tpl))
+ {
+ $file_tpl = "{$phpbb_root_path}styles/{$template_row['template_inherit_path']}/template/$tpl_file.html";
+ $inherited = true;
+ }
+ }
+ else
+ {
+ if ($file_template_db[$file . '.html'] == $template_row['template_inherits_id'])
+ {
+ $file_tpl = "{$phpbb_root_path}styles/{$template_row['template_inherit_path']}/template/$tpl_file.html";
+ $inherited = true;
+ }
+ }
+ }
+
+ // Correct the filename if it is stored in database and the file is in a subfolder.
+ if ($template_row['template_storedb'])
+ {
+ $file = str_replace('.', '/', $file);
+ }
+
+ $template->assign_block_vars('file', array(
+ 'U_VIEWSOURCE' => $this->u_action . "&amp;action=cache&amp;id=$template_id&amp;source=$file",
+
+ 'CACHED' => $user->format_date(filemtime("{$phpbb_root_path}cache/$filename")),
+ 'FILENAME' => $file,
+ 'FILENAME_PATH' => $file_tpl,
+ 'FILESIZE' => get_formatted_filesize(filesize("{$phpbb_root_path}cache/$filename")),
+ 'MODIFIED' => $user->format_date((!$template_row['template_storedb']) ? filemtime($file_tpl) : $filemtime[$file . '.html']))
+ );
+ }
+ unset($filemtime);
+
+ $template->assign_vars(array(
+ 'S_CACHE' => true,
+ 'S_TEMPLATE' => true,
+
+ 'U_ACTION' => $this->u_action . "&amp;action=cache&amp;id=$template_id",
+ 'U_BACK' => $this->u_action)
+ );
+ }
+
+ /**
+ * Provides a css editor and a basic easier to use stylesheet editing tool for less experienced (or lazy) users
+ *
+ * @param int $theme_id specifies which theme is being edited
+ */
+ function edit_theme($theme_id)
+ {
+ global $phpbb_root_path, $phpEx, $config, $db, $cache, $user, $template, $safe_mode;
+
+ $this->page_title = 'EDIT_THEME';
+
+ $filelist = $filelist_cats = array();
+
+ $theme_data = utf8_normalize_nfc(request_var('template_data', '', true));
+ $theme_data = htmlspecialchars_decode($theme_data);
+ $theme_file = utf8_normalize_nfc(request_var('template_file', '', true));
+ $text_rows = max(5, min(999, request_var('text_rows', 20)));
+ $save_changes = (isset($_POST['save'])) ? true : false;
+
+ // make sure theme_file path doesn't go upwards
+ $theme_file = str_replace('..', '.', $theme_file);
+
+ // Retrieve some information about the theme
+ $sql = 'SELECT theme_storedb, theme_path, theme_name, theme_data
+ FROM ' . STYLES_THEME_TABLE . "
+ WHERE theme_id = $theme_id";
+ $result = $db->sql_query($sql);
+
+ if (!($theme_info = $db->sql_fetchrow($result)))
+ {
+ trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ $db->sql_freeresult($result);
+
+ // save changes to the theme if the user submitted any
+ if ($save_changes)
+ {
+ // Get the filesystem location of the current file
+ $file = "{$phpbb_root_path}styles/{$theme_info['theme_path']}/theme/$theme_file";
+ $additional = '';
+ $message = $user->lang['THEME_UPDATED'];
+
+ // If the theme is stored on the filesystem try to write the file else store it in the database
+ if (!$safe_mode && !$theme_info['theme_storedb'] && file_exists($file) && @is_writable($file))
+ {
+ if (!($fp = @fopen($file, 'wb')))
+ {
+ trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ fwrite($fp, $theme_data);
+ fclose($fp);
+ }
+ else
+ {
+ // Write stylesheet to db
+ $sql_ary = array(
+ 'theme_mtime' => time(),
+ 'theme_storedb' => 1,
+ 'theme_data' => $this->db_theme_data($theme_info, $theme_data),
+ );
+ $sql = 'UPDATE ' . STYLES_THEME_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE theme_id = ' . $theme_id;
+ $db->sql_query($sql);
+
+ $cache->destroy('sql', STYLES_THEME_TABLE);
+
+ // notify the user if the theme was not stored in the db before his modification
+ if (!$theme_info['theme_storedb'])
+ {
+ add_log('admin', 'LOG_THEME_EDIT_DETAILS', $theme_info['theme_name']);
+ $message .= '<br />' . $user->lang['EDIT_THEME_STORED_DB'];
+ }
+ }
+ $cache->destroy('sql', STYLES_THEME_TABLE);
+ add_log('admin', (!$theme_info['theme_storedb']) ? 'LOG_THEME_EDIT_FILE' : 'LOG_THEME_EDIT', $theme_info['theme_name'], (!$theme_info['theme_storedb']) ? $theme_file : '');
+
+ trigger_error($message . adm_back_link($this->u_action . "&amp;action=edit&amp;id=$theme_id&amp;template_file=$theme_file&amp;text_rows=$text_rows"));
+ }
+
+ // Generate a category array containing theme filenames
+ if (!$theme_info['theme_storedb'])
+ {
+ $theme_path = "{$phpbb_root_path}styles/{$theme_info['theme_path']}/theme";
+
+ $filelist = filelist($theme_path, '', 'css');
+
+ if ($theme_file)
+ {
+ if (!file_exists($theme_path . "/$theme_file") || !($theme_data = file_get_contents($theme_path . "/$theme_file")))
+ {
+ trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+ }
+ else
+ {
+ $theme_data = &$theme_info['theme_data'];
+ }
+
+ // Now create the categories
+ $filelist_cats[''] = array();
+ foreach ($filelist as $pathfile => $file_ary)
+ {
+ // Use the directory name as category name
+ if (!empty($pathfile))
+ {
+ $filelist_cats[$pathfile] = array();
+ foreach ($file_ary as $file)
+ {
+ $filelist_cats[$pathfile][$pathfile . $file] = $file;
+ }
+ }
+ // or if it's in the main category use the word before the first underscore to group files
+ else
+ {
+ $cats = array();
+ foreach ($file_ary as $file)
+ {
+ $cats[] = substr($file, 0, strpos($file, '_'));
+ $filelist_cats[substr($file, 0, strpos($file, '_'))][$file] = $file;
+ }
+
+ $cats = array_values(array_unique($cats));
+
+ // we don't need any single element categories so put them into the misc '' category
+ for ($i = 0, $n = sizeof($cats); $i < $n; $i++)
+ {
+ if (sizeof($filelist_cats[$cats[$i]]) == 1 && $cats[$i] !== '')
+ {
+ $filelist_cats[''][key($filelist_cats[$cats[$i]])] = current($filelist_cats[$cats[$i]]);
+ unset($filelist_cats[$cats[$i]]);
+ }
+ }
+ unset($cats);
+ }
+ }
+ unset($filelist);
+
+ // Generate list of categorised theme files
+ $tpl_options = '';
+ ksort($filelist_cats);
+ foreach ($filelist_cats as $category => $tpl_ary)
+ {
+ ksort($tpl_ary);
+
+ if (!empty($category))
+ {
+ $tpl_options .= '<option class="sep" value="">' . $category . '</option>';
+ }
+
+ foreach ($tpl_ary as $filename => $file)
+ {
+ $selected = ($theme_file == $filename) ? ' selected="selected"' : '';
+ $tpl_options .= '<option value="' . $filename . '"' . $selected . '>' . $file . '</option>';
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_EDIT_THEME' => true,
+ 'S_HIDDEN_FIELDS' => build_hidden_fields(array('template_file' => $theme_file)),
+ 'S_THEME_IN_DB' => $theme_info['theme_storedb'],
+ 'S_TEMPLATES' => $tpl_options,
+
+ 'U_ACTION' => $this->u_action . "&amp;action=edit&amp;id=$theme_id&amp;text_rows=$text_rows",
+ 'U_BACK' => $this->u_action,
+
+ 'L_EDIT' => $user->lang['EDIT_THEME'],
+ 'L_EDIT_EXPLAIN' => $user->lang['EDIT_THEME_EXPLAIN'],
+ 'L_EDITOR' => $user->lang['THEME_EDITOR'],
+ 'L_EDITOR_HEIGHT' => $user->lang['THEME_EDITOR_HEIGHT'],
+ 'L_FILE' => $user->lang['THEME_FILE'],
+ 'L_SELECT' => $user->lang['SELECT_THEME'],
+ 'L_SELECTED' => $user->lang['SELECTED_THEME'],
+ 'L_SELECTED_FILE' => $user->lang['SELECTED_THEME_FILE'],
+
+ 'SELECTED_TEMPLATE' => $theme_info['theme_name'],
+ 'TEMPLATE_FILE' => $theme_file,
+ 'TEMPLATE_DATA' => utf8_htmlspecialchars($theme_data),
+ 'TEXT_ROWS' => $text_rows)
+ );
+ }
+
+ /**
+ * Edit imagesets
+ *
+ * @param int $imageset_id specifies which imageset is being edited
+ */
+ function edit_imageset($imageset_id)
+ {
+ global $db, $user, $phpbb_root_path, $cache, $template;
+
+ $this->page_title = 'EDIT_IMAGESET';
+
+ if (!$imageset_id)
+ {
+ trigger_error($user->lang['NO_IMAGESET'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $update = (isset($_POST['update'])) ? true : false;
+
+ $imgname = request_var('imgname', 'site_logo');
+ $imgname = preg_replace('#[^a-z0-9\-+_]#i', '', $imgname);
+ $sql_extra = $imgnamelang = '';
+
+ $sql = 'SELECT imageset_path, imageset_name
+ FROM ' . STYLES_IMAGESET_TABLE . "
+ WHERE imageset_id = $imageset_id";
+ $result = $db->sql_query($sql);
+ $imageset_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$imageset_row)
+ {
+ trigger_error($user->lang['NO_IMAGESET'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $imageset_path = $imageset_row['imageset_path'];
+ $imageset_name = $imageset_row['imageset_name'];
+
+ if (strpos($imgname, '-') !== false)
+ {
+ list($imgname, $imgnamelang) = explode('-', $imgname);
+ $sql_extra = " AND image_lang IN ('" . $db->sql_escape($imgnamelang) . "', '')";
+ }
+
+ $sql = 'SELECT image_filename, image_width, image_height, image_lang, image_id
+ FROM ' . STYLES_IMAGESET_DATA_TABLE . "
+ WHERE imageset_id = $imageset_id
+ AND image_name = '" . $db->sql_escape($imgname) . "'$sql_extra";
+ $result = $db->sql_query($sql);
+ $imageset_data_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $image_filename = $imageset_data_row['image_filename'];
+ $image_width = $imageset_data_row['image_width'];
+ $image_height = $imageset_data_row['image_height'];
+ $image_lang = $imageset_data_row['image_lang'];
+ $image_id = $imageset_data_row['image_id'];
+ $imgsize = ($imageset_data_row['image_width'] && $imageset_data_row['image_height']) ? 1 : 0;
+
+ // Check to see whether the selected image exists in the table
+ $valid_name = ($update) ? false : true;
+
+ foreach ($this->imageset_keys as $category => $img_ary)
+ {
+ if (in_array($imgname, $img_ary))
+ {
+ $valid_name = true;
+ break;
+ }
+ }
+
+ if ($update && isset($_POST['imgpath']) && $valid_name)
+ {
+ // If imgwidth and imgheight are non-zero grab the actual size
+ // from the image itself ... we ignore width settings for the poll center image
+ $imgwidth = request_var('imgwidth', 0);
+ $imgheight = request_var('imgheight', 0);
+ $imgsize = request_var('imgsize', 0);
+ $imgpath = request_var('imgpath', '');
+ $imgpath = str_replace('..', '.', $imgpath);
+
+ // If no dimensions selected, we reset width and height to 0 ;)
+ if (!$imgsize)
+ {
+ $imgwidth = $imgheight = 0;
+ }
+
+ $imglang = '';
+
+ if ($imgpath && !file_exists("{$phpbb_root_path}styles/$imageset_path/imageset/$imgpath"))
+ {
+ trigger_error($user->lang['NO_IMAGE_ERROR'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // Determine width/height. If dimensions included and no width/height given, we detect them automatically...
+ if ($imgsize && $imgpath)
+ {
+ if (!$imgwidth || !$imgheight)
+ {
+ list($imgwidth_file, $imgheight_file) = getimagesize("{$phpbb_root_path}styles/$imageset_path/imageset/$imgpath");
+ $imgwidth = ($imgwidth) ? $imgwidth : $imgwidth_file;
+ $imgheight = ($imgheight) ? $imgheight : $imgheight_file;
+ }
+ $imgwidth = ($imgname != 'poll_center') ? (int) $imgwidth : 0;
+ $imgheight = (int) $imgheight;
+ }
+
+ if (strpos($imgpath, '/') !== false)
+ {
+ list($imglang, $imgfilename) = explode('/', $imgpath);
+ }
+ else
+ {
+ $imgfilename = $imgpath;
+ }
+
+ $sql_ary = array(
+ 'image_filename' => (string) $imgfilename,
+ 'image_width' => (int) $imgwidth,
+ 'image_height' => (int) $imgheight,
+ 'image_lang' => (string) $imglang,
+ );
+
+ // already exists
+ if ($imageset_data_row)
+ {
+ $sql = 'UPDATE ' . STYLES_IMAGESET_DATA_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE image_id = $image_id";
+ $db->sql_query($sql);
+ }
+ // does not exist
+ else if (!$imageset_data_row)
+ {
+ $sql_ary['image_name'] = $imgname;
+ $sql_ary['imageset_id'] = (int) $imageset_id;
+ $db->sql_query('INSERT INTO ' . STYLES_IMAGESET_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+ }
+
+ $cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE);
+
+ add_log('admin', 'LOG_IMAGESET_EDIT', $imageset_name);
+
+ $template->assign_var('SUCCESS', true);
+
+ $image_filename = $imgfilename;
+ $image_width = $imgwidth;
+ $image_height = $imgheight;
+ $image_lang = $imglang;
+ }
+
+ $imglang = '';
+ $imagesetlist = array('nolang' => array(), 'lang' => array());
+ $langs = array();
+
+ $dir = "{$phpbb_root_path}styles/$imageset_path/imageset";
+ $dp = @opendir($dir);
+
+ if ($dp)
+ {
+ while (($file = readdir($dp)) !== false)
+ {
+ if ($file[0] != '.' && strtoupper($file) != 'CVS' && !is_file($dir . '/' . $file) && !is_link($dir . '/' . $file))
+ {
+ $langs[] = $file;
+ }
+ else if (preg_match('#\.(?:gif|jpg|png)$#', $file))
+ {
+ $imagesetlist['nolang'][] = $file;
+ }
+ }
+
+ if ($sql_extra)
+ {
+ $dp2 = @opendir("$dir/$imgnamelang");
+
+ if ($dp2)
+ {
+ while (($file2 = readdir($dp2)) !== false)
+ {
+ if (preg_match('#\.(?:gif|jpg|png)$#', $file2))
+ {
+ $imagesetlist['lang'][] = "$imgnamelang/$file2";
+ }
+ }
+ closedir($dp2);
+ }
+ }
+ closedir($dp);
+ }
+
+ // Generate list of image options
+ $img_options = '';
+ foreach ($this->imageset_keys as $category => $img_ary)
+ {
+ $template->assign_block_vars('category', array(
+ 'NAME' => $user->lang['IMG_CAT_' . strtoupper($category)]
+ ));
+
+ foreach ($img_ary as $img)
+ {
+ if ($category == 'buttons')
+ {
+ foreach ($langs as $language)
+ {
+ $template->assign_block_vars('category.images', array(
+ 'SELECTED' => ($img == $imgname && $language == $imgnamelang),
+ 'VALUE' => $img . '-' . $language,
+ 'TEXT' => $user->lang['IMG_' . strtoupper($img)] . ' [ ' . $language . ' ]'
+ ));
+ }
+ }
+ else
+ {
+ $template->assign_block_vars('category.images', array(
+ 'SELECTED' => ($img == $imgname),
+ 'VALUE' => $img,
+ 'TEXT' => (($category == 'custom') ? $img : $user->lang['IMG_' . strtoupper($img)])
+ ));
+ }
+ }
+ }
+
+ // Make sure the list of possible images is sorted alphabetically
+ sort($imagesetlist['lang']);
+ sort($imagesetlist['nolang']);
+
+ $image_found = false;
+ $img_val = '';
+ foreach ($imagesetlist as $type => $img_ary)
+ {
+ if ($type !== 'lang' || $sql_extra)
+ {
+ $template->assign_block_vars('imagesetlist', array(
+ 'TYPE' => ($type == 'lang')
+ ));
+ }
+
+ foreach ($img_ary as $img)
+ {
+ $imgtext = preg_replace('/^([^\/]+\/)/', '', $img);
+ $selected = (!empty($imgname) && strpos($image_filename, $imgtext) !== false);
+ if ($selected)
+ {
+ $image_found = true;
+ $img_val = htmlspecialchars($img);
+ }
+ $template->assign_block_vars('imagesetlist.images', array(
+ 'SELECTED' => $selected,
+ 'TEXT' => $imgtext,
+ 'VALUE' => htmlspecialchars($img)
+ ));
+ }
+ }
+
+ $imgsize_bool = (!empty($imgname) && $image_width && $image_height) ? true : false;
+ $image_request = '../styles/' . $imageset_path . '/imageset/' . ($image_lang ? $imgnamelang . '/' : '') . $image_filename;
+
+ $template->assign_vars(array(
+ 'S_EDIT_IMAGESET' => true,
+ 'L_TITLE' => $user->lang[$this->page_title],
+ 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'],
+ 'IMAGE_OPTIONS' => $img_options,
+ 'IMAGE_SIZE' => $image_width,
+ 'IMAGE_HEIGHT' => $image_height,
+ 'IMAGE_REQUEST' => (empty($image_filename)) ? 'images/no_image.png' : $image_request,
+ 'U_ACTION' => $this->u_action . "&amp;action=edit&amp;id=$imageset_id",
+ 'U_BACK' => $this->u_action,
+ 'NAME' => $imageset_name,
+ 'A_NAME' => addslashes($imageset_name),
+ 'PATH' => $imageset_path,
+ 'A_PATH' => addslashes($imageset_path),
+ 'ERROR' => !$valid_name,
+ 'IMG_SRC' => ($image_found) ? '../styles/' . $imageset_path . '/imageset/' . $img_val : 'images/no_image.png',
+ 'IMAGE_SELECT' => $image_found
+ ));
+ }
+
+ /**
+ * Remove style/template/theme/imageset
+ */
+ function remove($mode, $style_id)
+ {
+ global $db, $template, $user, $phpbb_root_path, $cache, $config;
+
+ $new_id = request_var('new_id', 0);
+ $update = (isset($_POST['update'])) ? true : false;
+ $sql_where = '';
+
+ switch ($mode)
+ {
+ case 'style':
+ $sql_from = STYLES_TABLE;
+ $sql_select = 'style_name';
+ $sql_where = 'AND style_active = 1';
+ break;
+
+ case 'template':
+ $sql_from = STYLES_TEMPLATE_TABLE;
+ $sql_select = 'template_name, template_path, template_storedb';
+ break;
+
+ case 'theme':
+ $sql_from = STYLES_THEME_TABLE;
+ $sql_select = 'theme_name, theme_path, theme_storedb';
+ break;
+
+ case 'imageset':
+ $sql_from = STYLES_IMAGESET_TABLE;
+ $sql_select = 'imageset_name, imageset_path';
+ break;
+ }
+
+ if ($mode === 'template' && ($conflicts = $this->check_inheritance($mode, $style_id)))
+ {
+ $l_type = strtoupper($mode);
+ $msg = $user->lang[$l_type . '_DELETE_DEPENDENT'];
+ foreach ($conflicts as $id => $values)
+ {
+ $msg .= '<br />' . $values['template_name'];
+ }
+
+ trigger_error($msg . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $l_prefix = strtoupper($mode);
+
+ $sql = "SELECT $sql_select
+ FROM $sql_from
+ WHERE {$mode}_id = $style_id";
+ $result = $db->sql_query($sql);
+ $style_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$style_row)
+ {
+ trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = "SELECT {$mode}_id, {$mode}_name
+ FROM $sql_from
+ WHERE {$mode}_id <> $style_id
+ $sql_where
+ ORDER BY {$mode}_name ASC";
+ $result = $db->sql_query($sql);
+
+ $s_options = '';
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ do
+ {
+ $s_options .= '<option value="' . $row[$mode . '_id'] . '">' . $row[$mode . '_name'] . '</option>';
+ }
+ while ($row = $db->sql_fetchrow($result));
+ }
+ else
+ {
+ trigger_error($user->lang['ONLY_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ $db->sql_freeresult($result);
+
+ if ($update)
+ {
+ $sql = "DELETE FROM $sql_from
+ WHERE {$mode}_id = $style_id";
+ $db->sql_query($sql);
+
+ if ($mode == 'style')
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_style = $new_id
+ WHERE user_style = $style_id";
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . FORUMS_TABLE . "
+ SET forum_style = $new_id
+ WHERE forum_style = $style_id";
+ $db->sql_query($sql);
+
+ if ($style_id == $config['default_style'])
+ {
+ set_config('default_style', $new_id);
+ }
+ }
+ else
+ {
+ if ($mode == 'imageset')
+ {
+ $sql = 'DELETE FROM ' . STYLES_IMAGESET_DATA_TABLE . "
+ WHERE imageset_id = $style_id";
+ $db->sql_query($sql);
+ }
+ $sql = 'UPDATE ' . STYLES_TABLE . "
+ SET {$mode}_id = $new_id
+ WHERE {$mode}_id = $style_id";
+ $db->sql_query($sql);
+ }
+
+ $cache->destroy('sql', STYLES_TABLE);
+
+ add_log('admin', 'LOG_' . $l_prefix . '_DELETE', $style_row[$mode . '_name']);
+ $message = ($mode != 'style') ? $l_prefix . '_DELETED_FS' : $l_prefix . '_DELETED';
+ trigger_error($user->lang[$message] . adm_back_link($this->u_action));
+ }
+
+ $this->page_title = 'DELETE_' . $l_prefix;
+
+ $template->assign_vars(array(
+ 'S_DELETE' => true,
+ 'S_REPLACE_OPTIONS' => $s_options,
+
+ 'L_TITLE' => $user->lang[$this->page_title],
+ 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'],
+ 'L_NAME' => $user->lang[$l_prefix . '_NAME'],
+ 'L_REPLACE' => $user->lang['REPLACE_' . $l_prefix],
+ 'L_REPLACE_EXPLAIN' => $user->lang['REPLACE_' . $l_prefix . '_EXPLAIN'],
+
+ 'U_ACTION' => $this->u_action . "&amp;action=delete&amp;id=$style_id",
+ 'U_BACK' => $this->u_action,
+
+ 'NAME' => $style_row[$mode . '_name'],
+ )
+ );
+ }
+
+ /**
+ * Export style or style elements
+ */
+ function export($mode, $style_id)
+ {
+ global $db, $template, $user, $phpbb_root_path, $cache, $phpEx, $config;
+
+ $update = (isset($_POST['update'])) ? true : false;
+
+ $inc_template = request_var('inc_template', 0);
+ $inc_theme = request_var('inc_theme', 0);
+ $inc_imageset = request_var('inc_imageset', 0);
+ $store = request_var('store', 0);
+ $format = request_var('format', '');
+
+ $error = array();
+ $methods = array('tar');
+
+ $available_methods = array('tar.gz' => 'zlib', 'tar.bz2' => 'bz2', 'zip' => 'zlib');
+ foreach ($available_methods as $type => $module)
+ {
+ if (!@extension_loaded($module))
+ {
+ continue;
+ }
+
+ $methods[] = $type;
+ }
+
+ if (!in_array($format, $methods))
+ {
+ $format = 'tar';
+ }
+
+ switch ($mode)
+ {
+ case 'style':
+ if ($update && ($inc_template + $inc_theme + $inc_imageset) < 1)
+ {
+ $error[] = $user->lang['STYLE_ERR_MORE_ELEMENTS'];
+ }
+
+ $name = 'style_name';
+
+ $sql_select = 's.style_id, s.style_name, s.style_copyright';
+ $sql_select .= ($inc_template) ? ', t.*' : ', t.template_name';
+ $sql_select .= ($inc_theme) ? ', c.*' : ', c.theme_name';
+ $sql_select .= ($inc_imageset) ? ', i.*' : ', i.imageset_name';
+ $sql_from = STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c, ' . STYLES_IMAGESET_TABLE . ' i';
+ $sql_where = "s.style_id = $style_id AND t.template_id = s.template_id AND c.theme_id = s.theme_id AND i.imageset_id = s.imageset_id";
+
+ $l_prefix = 'STYLE';
+ break;
+
+ case 'template':
+ $name = 'template_name';
+
+ $sql_select = '*';
+ $sql_from = STYLES_TEMPLATE_TABLE;
+ $sql_where = "template_id = $style_id";
+
+ $l_prefix = 'TEMPLATE';
+ break;
+
+ case 'theme':
+ $name = 'theme_name';
+
+ $sql_select = '*';
+ $sql_from = STYLES_THEME_TABLE;
+ $sql_where = "theme_id = $style_id";
+
+ $l_prefix = 'THEME';
+ break;
+
+ case 'imageset':
+ $name = 'imageset_name';
+
+ $sql_select = '*';
+ $sql_from = STYLES_IMAGESET_TABLE;
+ $sql_where = "imageset_id = $style_id";
+
+ $l_prefix = 'IMAGESET';
+ break;
+ }
+
+ if ($update && !sizeof($error))
+ {
+ $sql = "SELECT $sql_select
+ FROM $sql_from
+ WHERE $sql_where";
+ $result = $db->sql_query($sql);
+ $style_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$style_row)
+ {
+ trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $var_ary = array('style_id', 'style_name', 'style_copyright', 'template_id', 'template_name', 'template_path', 'template_copyright', 'template_storedb', 'template_inherits_id', 'bbcode_bitfield', 'theme_id', 'theme_name', 'theme_path', 'theme_copyright', 'theme_storedb', 'theme_mtime', 'theme_data', 'imageset_id', 'imageset_name', 'imageset_path', 'imageset_copyright');
+
+ foreach ($var_ary as $var)
+ {
+ if (!isset($style_row[$var]))
+ {
+ $style_row[$var] = '';
+ }
+ }
+
+ $files = $data = array();
+
+ if ($mode == 'style')
+ {
+ $style_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['style_name'], $style_row['style_copyright'], $config['version']), $this->style_cfg);
+
+ $style_cfg .= (!$inc_template) ? "\nrequired_template = {$style_row['template_name']}" : '';
+ $style_cfg .= (!$inc_theme) ? "\nrequired_theme = {$style_row['theme_name']}" : '';
+ $style_cfg .= (!$inc_imageset) ? "\nrequired_imageset = {$style_row['imageset_name']}" : '';
+
+ $data[] = array(
+ 'src' => $style_cfg,
+ 'prefix' => 'style.cfg'
+ );
+
+ unset($style_cfg);
+ }
+
+ // Export template core code
+ if ($mode == 'template' || $inc_template)
+ {
+ $template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], $config['version']), $this->template_cfg);
+
+ $use_template_name = '';
+
+ // Add the inherit from variable, depending on it's use...
+ if ($style_row['template_inherits_id'])
+ {
+ // Get the template name
+ $sql = 'SELECT template_name
+ FROM ' . STYLES_TEMPLATE_TABLE . '
+ WHERE template_id = ' . (int) $style_row['template_inherits_id'];
+ $result = $db->sql_query($sql);
+ $use_template_name = (string) $db->sql_fetchfield('template_name');
+ $db->sql_freeresult($result);
+ }
+
+ $template_cfg .= ($use_template_name) ? "\ninherit_from = $use_template_name" : "\n#inherit_from = ";
+ $template_cfg .= "\n\nbbcode_bitfield = {$style_row['bbcode_bitfield']}";
+
+ $data[] = array(
+ 'src' => $template_cfg,
+ 'prefix' => 'template/template.cfg'
+ );
+
+ // This is potentially nasty memory-wise ...
+ if (!$style_row['template_storedb'])
+ {
+ $files[] = array(
+ 'src' => "styles/{$style_row['template_path']}/template/",
+ 'prefix-' => "styles/{$style_row['template_path']}/",
+ 'prefix+' => false,
+ 'exclude' => 'template.cfg'
+ );
+ }
+ else
+ {
+ $sql = 'SELECT template_filename, template_data
+ FROM ' . STYLES_TEMPLATE_DATA_TABLE . "
+ WHERE template_id = {$style_row['template_id']}";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $data[] = array(
+ 'src' => $row['template_data'],
+ 'prefix' => 'template/' . $row['template_filename']
+ );
+ }
+ $db->sql_freeresult($result);
+ }
+ unset($template_cfg);
+ }
+
+ // Export theme core code
+ if ($mode == 'theme' || $inc_theme)
+ {
+ $theme_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['theme_name'], $style_row['theme_copyright'], $config['version']), $this->theme_cfg);
+
+ // Read old cfg file
+ $items = $cache->obtain_cfg_items($style_row);
+ $items = $items['theme'];
+
+ if (!isset($items['parse_css_file']))
+ {
+ $items['parse_css_file'] = 'off';
+ }
+
+ $theme_cfg = str_replace(array('{PARSE_CSS_FILE}'), array($items['parse_css_file']), $theme_cfg);
+
+ $files[] = array(
+ 'src' => "styles/{$style_row['theme_path']}/theme/",
+ 'prefix-' => "styles/{$style_row['theme_path']}/",
+ 'prefix+' => false,
+ 'exclude' => ($style_row['theme_storedb']) ? 'stylesheet.css,theme.cfg' : 'theme.cfg'
+ );
+
+ $data[] = array(
+ 'src' => $theme_cfg,
+ 'prefix' => 'theme/theme.cfg'
+ );
+
+ if ($style_row['theme_storedb'])
+ {
+ $data[] = array(
+ 'src' => $style_row['theme_data'],
+ 'prefix' => 'theme/stylesheet.css'
+ );
+ }
+
+ unset($items, $theme_cfg);
+ }
+
+ // Export imageset core code
+ if ($mode == 'imageset' || $inc_imageset)
+ {
+ $imageset_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['imageset_name'], $style_row['imageset_copyright'], $config['version']), $this->imageset_cfg);
+
+ $imageset_main = array();
+
+ $sql = 'SELECT image_filename, image_name, image_height, image_width
+ FROM ' . STYLES_IMAGESET_DATA_TABLE . "
+ WHERE imageset_id = $style_id
+ AND image_lang = ''";
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $imageset_main[$row['image_name']] = $row['image_filename'] . ($row['image_height'] ? '*' . $row['image_height']: '') . ($row['image_width'] ? '*' . $row['image_width']: '');
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($this->imageset_keys as $topic => $key_array)
+ {
+ foreach ($key_array as $key)
+ {
+ if (isset($imageset_main[$key]))
+ {
+ $imageset_cfg .= "\nimg_" . $key . ' = ' . str_replace("styles/{$style_row['imageset_path']}/imageset/", '{PATH}', $imageset_main[$key]);
+ }
+ }
+ }
+
+ $files[] = array(
+ 'src' => "styles/{$style_row['imageset_path']}/imageset/",
+ 'prefix-' => "styles/{$style_row['imageset_path']}/",
+ 'prefix+' => false,
+ 'exclude' => 'imageset.cfg'
+ );
+
+ $data[] = array(
+ 'src' => trim($imageset_cfg),
+ 'prefix' => 'imageset/imageset.cfg'
+ );
+
+ end($data);
+
+ $imageset_root = "{$phpbb_root_path}styles/{$style_row['imageset_path']}/imageset/";
+
+ if ($dh = @opendir($imageset_root))
+ {
+ while (($fname = readdir($dh)) !== false)
+ {
+ if ($fname[0] != '.' && $fname != 'CVS' && is_dir("$imageset_root$fname"))
+ {
+ $files[key($files)]['exclude'] .= ',' . $fname . '/imageset.cfg';
+ }
+ }
+ closedir($dh);
+ }
+
+ $imageset_lang = array();
+
+ $sql = 'SELECT image_filename, image_name, image_height, image_width, image_lang
+ FROM ' . STYLES_IMAGESET_DATA_TABLE . "
+ WHERE imageset_id = $style_id
+ AND image_lang <> ''";
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $imageset_lang[$row['image_lang']][$row['image_name']] = $row['image_filename'] . ($row['image_height'] ? '*' . $row['image_height']: '') . ($row['image_width'] ? '*' . $row['image_width']: '');
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($imageset_lang as $lang => $imageset_localized)
+ {
+ $imageset_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['imageset_name'], $style_row['imageset_copyright'], $config['version']), $this->imageset_cfg);
+
+ foreach ($this->imageset_keys as $topic => $key_array)
+ {
+ foreach ($key_array as $key)
+ {
+ if (isset($imageset_localized[$key]))
+ {
+ $imageset_cfg .= "\nimg_" . $key . ' = ' . str_replace("styles/{$style_row['imageset_path']}/imageset/", '{PATH}', $imageset_localized[$key]);
+ }
+ }
+ }
+
+ $data[] = array(
+ 'src' => trim($imageset_cfg),
+ 'prefix' => 'imageset/' . $lang . '/imageset.cfg'
+ );
+ }
+
+ unset($imageset_cfg);
+ }
+
+ switch ($format)
+ {
+ case 'tar':
+ $ext = '.tar';
+ $mimetype = 'x-tar';
+ $compress = 'compress_tar';
+ break;
+
+ case 'zip':
+ $ext = '.zip';
+ $mimetype = 'zip';
+ break;
+
+ case 'tar.gz':
+ $ext = '.tar.gz';
+ $mimetype = 'x-gzip';
+ break;
+
+ case 'tar.bz2':
+ $ext = '.tar.bz2';
+ $mimetype = 'x-bzip2';
+ break;
+
+ default:
+ $error[] = $user->lang[$l_prefix . '_ERR_ARCHIVE'];
+ }
+
+ if (!sizeof($error))
+ {
+ include($phpbb_root_path . 'includes/functions_compress.' . $phpEx);
+
+ if ($mode == 'style')
+ {
+ $path = preg_replace('#[^\w-]+#', '_', $style_row['style_name']);
+ }
+ else
+ {
+ $path = $style_row[$mode . '_path'];
+ }
+
+ if ($format == 'zip')
+ {
+ $compress = new compress_zip('w', $phpbb_root_path . "store/$path$ext");
+ }
+ else
+ {
+ $compress = new compress_tar('w', $phpbb_root_path . "store/$path$ext", $ext);
+ }
+
+ if (sizeof($files))
+ {
+ foreach ($files as $file_ary)
+ {
+ $compress->add_file($file_ary['src'], $file_ary['prefix-'], $file_ary['prefix+'], $file_ary['exclude']);
+ }
+ }
+
+ if (sizeof($data))
+ {
+ foreach ($data as $data_ary)
+ {
+ $compress->add_data($data_ary['src'], $data_ary['prefix']);
+ }
+ }
+
+ $compress->close();
+
+ add_log('admin', 'LOG_' . $l_prefix . '_EXPORT', $style_row[$mode . '_name']);
+
+ if (!$store)
+ {
+ $compress->download($path);
+ @unlink("{$phpbb_root_path}store/$path$ext");
+ exit;
+ }
+
+ trigger_error(sprintf($user->lang[$l_prefix . '_EXPORTED'], "store/$path$ext") . adm_back_link($this->u_action));
+ }
+ }
+
+ $sql = "SELECT {$mode}_id, {$mode}_name
+ FROM " . (($mode == 'style') ? STYLES_TABLE : $sql_from) . "
+ WHERE {$mode}_id = $style_id";
+ $result = $db->sql_query($sql);
+ $style_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$style_row)
+ {
+ trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $this->page_title = $l_prefix . '_EXPORT';
+
+ $format_buttons = '';
+ foreach ($methods as $method)
+ {
+ $format_buttons .= '<label><input type="radio"' . ((!$format_buttons) ? ' id="format"' : '') . ' class="radio" value="' . $method . '" name="format"' . (($method == $format) ? ' checked="checked"' : '') . ' /> ' . $method . '</label>';
+ }
+
+ $template->assign_vars(array(
+ 'S_EXPORT' => true,
+ 'S_ERROR_MSG' => (sizeof($error)) ? true : false,
+ 'S_STYLE' => ($mode == 'style') ? true : false,
+
+ 'L_TITLE' => $user->lang[$this->page_title],
+ 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'],
+ 'L_NAME' => $user->lang[$l_prefix . '_NAME'],
+
+ 'U_ACTION' => $this->u_action . '&amp;action=export&amp;id=' . $style_id,
+ 'U_BACK' => $this->u_action,
+
+ 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'NAME' => $style_row[$mode . '_name'],
+ 'FORMAT_BUTTONS' => $format_buttons)
+ );
+ }
+
+ /**
+ * Display details
+ */
+ function details($mode, $style_id)
+ {
+ global $template, $db, $config, $user, $safe_mode, $cache, $phpbb_root_path;
+
+ $update = (isset($_POST['update'])) ? true : false;
+ $l_type = strtoupper($mode);
+
+ $error = array();
+ $element_ary = array('template' => STYLES_TEMPLATE_TABLE, 'theme' => STYLES_THEME_TABLE, 'imageset' => STYLES_IMAGESET_TABLE);
+
+ switch ($mode)
+ {
+ case 'style':
+ $sql_from = STYLES_TABLE;
+ break;
+
+ case 'template':
+ $sql_from = STYLES_TEMPLATE_TABLE;
+ break;
+
+ case 'theme':
+ $sql_from = STYLES_THEME_TABLE;
+ break;
+
+ case 'imageset':
+ $sql_from = STYLES_IMAGESET_TABLE;
+ break;
+ }
+
+ $sql = "SELECT *
+ FROM $sql_from
+ WHERE {$mode}_id = $style_id";
+ $result = $db->sql_query($sql);
+ $style_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$style_row)
+ {
+ trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $style_row['style_default'] = ($mode == 'style' && $config['default_style'] == $style_id) ? 1 : 0;
+
+ if ($update)
+ {
+ $name = utf8_normalize_nfc(request_var('name', '', true));
+ $copyright = utf8_normalize_nfc(request_var('copyright', '', true));
+
+ $template_id = request_var('template_id', 0);
+ $theme_id = request_var('theme_id', 0);
+ $imageset_id = request_var('imageset_id', 0);
+
+ $style_active = request_var('style_active', 0);
+ $style_default = request_var('style_default', 0);
+ $store_db = request_var('store_db', 0);
+
+ // If the admin selected the style to be the default style, but forgot to activate it... we will do it for him
+ if ($style_default)
+ {
+ $style_active = 1;
+ }
+
+ $sql = "SELECT {$mode}_id, {$mode}_name
+ FROM $sql_from
+ WHERE {$mode}_id <> $style_id
+ AND LOWER({$mode}_name) = '" . $db->sql_escape(strtolower($name)) . "'";
+ $result = $db->sql_query($sql);
+ $conflict = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($mode == 'style' && (!$template_id || !$theme_id || !$imageset_id))
+ {
+ $error[] = $user->lang['STYLE_ERR_NO_IDS'];
+ }
+
+ if ($mode == 'style' && $style_row['style_active'] && !$style_active && $config['default_style'] == $style_id)
+ {
+ $error[] = $user->lang['DEACTIVATE_DEFAULT'];
+ }
+
+ if (!$name || $conflict)
+ {
+ $error[] = $user->lang[$l_type . '_ERR_STYLE_NAME'];
+ }
+
+ if ($mode === 'theme' || $mode === 'template')
+ {
+ // a rather elaborate check we have to do here once to avoid trouble later
+ $check = "{$phpbb_root_path}styles/" . $style_row["{$mode}_path"] . (($mode === 'theme') ? '/theme/stylesheet.css' : '/template');
+ if (($style_row["{$mode}_storedb"] != $store_db) && !$store_db && ($safe_mode || !@is_writable($check)))
+ {
+ $error[] = $user->lang['EDIT_' . strtoupper($mode) . '_STORED_DB'];
+ $store_db = 1;
+ }
+
+ // themes which have to be parsed have to go into db
+ if ($mode == 'theme')
+ {
+ $cfg = parse_cfg_file("{$phpbb_root_path}styles/" . $style_row["{$mode}_path"] . "/theme/theme.cfg");
+
+ if (isset($cfg['parse_css_file']) && $cfg['parse_css_file'] && !$store_db)
+ {
+ $error[] = $user->lang['EDIT_THEME_STORE_PARSED'];
+ $store_db = 1;
+ }
+ }
+ }
+
+ if (!sizeof($error))
+ {
+ // Check length settings
+ if (utf8_strlen($name) > 30)
+ {
+ $error[] = $user->lang[$l_type . '_ERR_NAME_LONG'];
+ }
+
+ if (utf8_strlen($copyright) > 60)
+ {
+ $error[] = $user->lang[$l_type . '_ERR_COPY_LONG'];
+ }
+ }
+ }
+
+ if ($update && sizeof($error))
+ {
+ $style_row = array_merge($style_row, array(
+ 'template_id' => $template_id,
+ 'theme_id' => $theme_id,
+ 'imageset_id' => $imageset_id,
+ 'style_active' => $style_active,
+ $mode . '_storedb' => $store_db,
+ $mode . '_name' => $name,
+ $mode . '_copyright' => $copyright)
+ );
+ }
+
+ // User has submitted form and no errors have occurred
+ if ($update && !sizeof($error))
+ {
+ $sql_ary = array(
+ $mode . '_name' => $name,
+ $mode . '_copyright' => $copyright
+ );
+
+ switch ($mode)
+ {
+ case 'style':
+
+ $sql_ary += array(
+ 'template_id' => (int) $template_id,
+ 'theme_id' => (int) $theme_id,
+ 'imageset_id' => (int) $imageset_id,
+ 'style_active' => (int) $style_active,
+ );
+ break;
+
+ case 'imageset':
+ break;
+
+ case 'theme':
+
+ if ($style_row['theme_storedb'] != $store_db)
+ {
+ $theme_data = '';
+
+ if (!$style_row['theme_storedb'])
+ {
+ $theme_data = $this->db_theme_data($style_row);
+ }
+ else if (!$store_db && !$safe_mode && @is_writable("{$phpbb_root_path}styles/{$style_row['theme_path']}/theme/stylesheet.css"))
+ {
+ $store_db = 1;
+ $theme_data = $style_row['theme_data'];
+
+ if ($fp = @fopen("{$phpbb_root_path}styles/{$style_row['theme_path']}/theme/stylesheet.css", 'wb'))
+ {
+ $store_db = (@fwrite($fp, str_replace("styles/{$style_row['theme_path']}/theme/", './', $theme_data))) ? 0 : 1;
+ }
+ fclose($fp);
+ }
+
+ $sql_ary += array(
+ 'theme_mtime' => ($store_db) ? filemtime("{$phpbb_root_path}styles/{$style_row['theme_path']}/theme/stylesheet.css") : 0,
+ 'theme_storedb' => $store_db,
+ 'theme_data' => ($store_db) ? $theme_data : '',
+ );
+ }
+ break;
+
+ case 'template':
+
+ if ($style_row['template_storedb'] != $store_db)
+ {
+ if ($super = $this->get_super($mode, $style_row['template_id']))
+ {
+ $error[] = (sprintf($user->lang["{$l_type}_INHERITS"], $super['template_name']));
+ $sql_ary = array();
+ }
+ else
+ {
+ if (!$store_db && !$safe_mode && @is_writable("{$phpbb_root_path}styles/{$style_row['template_path']}/template"))
+ {
+ $err = $this->store_in_fs('template', $style_row['template_id']);
+ if ($err)
+ {
+ $error += $err;
+ }
+ }
+ else if ($store_db)
+ {
+ $this->store_in_db('template', $style_row['template_id']);
+ }
+ else
+ {
+ // We no longer store within the db, but are also not able to update the file structure
+ // Since the admin want to switch this, we adhere to his decision. But we also need to remove the cache
+ $sql = 'DELETE FROM ' . STYLES_TEMPLATE_DATA_TABLE . "
+ WHERE template_id = $style_id";
+ $db->sql_query($sql);
+ }
+
+ $sql_ary += array(
+ 'template_storedb' => $store_db,
+ );
+ }
+ }
+ break;
+ }
+
+ if (sizeof($sql_ary))
+ {
+ $sql = "UPDATE $sql_from
+ SET " . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE {$mode}_id = $style_id";
+ $db->sql_query($sql);
+
+ // Making this the default style?
+ if ($mode == 'style' && $style_default)
+ {
+ set_config('default_style', $style_id);
+ }
+ }
+
+ $cache->destroy('sql', STYLES_TABLE);
+
+ add_log('admin', 'LOG_' . $l_type . '_EDIT_DETAILS', $name);
+ if (sizeof($error))
+ {
+ trigger_error(implode('<br />', $error) . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ else
+ {
+ trigger_error($user->lang[$l_type . '_DETAILS_UPDATED'] . adm_back_link($this->u_action));
+ }
+ }
+
+ if ($mode == 'style')
+ {
+ foreach ($element_ary as $element => $table)
+ {
+ $sql = "SELECT {$element}_id, {$element}_name
+ FROM $table
+ ORDER BY {$element}_id ASC";
+ $result = $db->sql_query($sql);
+
+ ${$element . '_options'} = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $selected = ($row[$element . '_id'] == $style_row[$element . '_id']) ? ' selected="selected"' : '';
+ ${$element . '_options'} .= '<option value="' . $row[$element . '_id'] . '"' . $selected . '>' . $row[$element . '_name'] . '</option>';
+ }
+ $db->sql_freeresult($result);
+ }
+ }
+
+ if ($mode == 'template')
+ {
+ $super = array();
+ if (isset($style_row[$mode . '_inherits_id']) && $style_row['template_inherits_id'])
+ {
+ $super = $this->get_super($mode, $style_row['template_id']);
+ }
+ }
+
+ $this->page_title = 'EDIT_DETAILS_' . $l_type;
+
+ $template->assign_vars(array(
+ 'S_DETAILS' => true,
+ 'S_ERROR_MSG' => (sizeof($error)) ? true : false,
+ 'S_STYLE' => ($mode == 'style') ? true : false,
+ 'S_TEMPLATE' => ($mode == 'template') ? true : false,
+ 'S_THEME' => ($mode == 'theme') ? true : false,
+ 'S_IMAGESET' => ($mode == 'imageset') ? true : false,
+ 'S_STORE_DB' => (isset($style_row[$mode . '_storedb'])) ? $style_row[$mode . '_storedb'] : 0,
+ 'S_STORE_DB_DISABLED' => (isset($style_row[$mode . '_inherits_id'])) ? $style_row[$mode . '_inherits_id'] : 0,
+ 'S_STYLE_ACTIVE' => (isset($style_row['style_active'])) ? $style_row['style_active'] : 0,
+ 'S_STYLE_DEFAULT' => (isset($style_row['style_default'])) ? $style_row['style_default'] : 0,
+ 'S_SUPERTEMPLATE' => (isset($style_row[$mode . '_inherits_id']) && $style_row[$mode . '_inherits_id']) ? $super['template_name'] : 0,
+
+ 'S_TEMPLATE_OPTIONS' => ($mode == 'style') ? $template_options : '',
+ 'S_THEME_OPTIONS' => ($mode == 'style') ? $theme_options : '',
+ 'S_IMAGESET_OPTIONS' => ($mode == 'style') ? $imageset_options : '',
+
+ 'U_ACTION' => $this->u_action . '&amp;action=details&amp;id=' . $style_id,
+ 'U_BACK' => $this->u_action,
+
+ 'L_TITLE' => $user->lang[$this->page_title],
+ 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'],
+ 'L_NAME' => $user->lang[$l_type . '_NAME'],
+ 'L_LOCATION' => ($mode == 'template' || $mode == 'theme') ? $user->lang[$l_type . '_LOCATION'] : '',
+ 'L_LOCATION_EXPLAIN' => ($mode == 'template' || $mode == 'theme') ? $user->lang[$l_type . '_LOCATION_EXPLAIN'] : '',
+
+ 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'NAME' => $style_row[$mode . '_name'],
+ 'COPYRIGHT' => $style_row[$mode . '_copyright'],
+ )
+ );
+ }
+
+ /**
+ * Load css file contents
+ */
+ function load_css_file($path, $filename)
+ {
+ global $phpbb_root_path;
+
+ $file = "{$phpbb_root_path}styles/$path/theme/$filename";
+
+ if (file_exists($file) && ($content = file_get_contents($file)))
+ {
+ $content = trim($content);
+ }
+ else
+ {
+ $content = '';
+ }
+ if (defined('DEBUG'))
+ {
+ $content = "/* BEGIN @include $filename */ \n $content \n /* END @include $filename */ \n";
+ }
+
+ return $content;
+ }
+
+ /**
+ * Returns a string containing the value that should be used for the theme_data column in the theme database table.
+ * Includes contents of files loaded via @import
+ *
+ * @param array $theme_row is an associative array containing the theme's current database entry
+ * @param mixed $stylesheet can either be the new content for the stylesheet or false to load from the standard file
+ * @param string $root_path should only be used in case you want to use a different root path than "{$phpbb_root_path}styles/{$theme_row['theme_path']}"
+ *
+ * @return string Stylesheet data for theme_data column in the theme table
+ */
+ function db_theme_data($theme_row, $stylesheet = false, $root_path = '')
+ {
+ global $phpbb_root_path;
+
+ if (!$root_path)
+ {
+ $root_path = $phpbb_root_path . 'styles/' . $theme_row['theme_path'];
+ }
+
+ if (!$stylesheet)
+ {
+ $stylesheet = '';
+ if (file_exists($root_path . '/theme/stylesheet.css'))
+ {
+ $stylesheet = file_get_contents($root_path . '/theme/stylesheet.css');
+ }
+ }
+
+ // Match CSS imports
+ $matches = array();
+ preg_match_all('/@import url\(["\'](.*)["\']\);/i', $stylesheet, $matches);
+
+ if (sizeof($matches))
+ {
+ foreach ($matches[0] as $idx => $match)
+ {
+ $stylesheet = str_replace($match, acp_styles::load_css_file($theme_row['theme_path'], $matches[1][$idx]), $stylesheet);
+ }
+ }
+
+ // adjust paths
+ return str_replace('./', 'styles/' . $theme_row['theme_path'] . '/theme/', $stylesheet);
+ }
+
+ /**
+ * Store template files into db
+ */
+ function store_templates($mode, $style_id, $template_path, $filelist)
+ {
+ global $phpbb_root_path, $phpEx, $db;
+
+ $template_path = $template_path . '/template/';
+ $includes = array();
+ foreach ($filelist as $pathfile => $file_ary)
+ {
+ foreach ($file_ary as $file)
+ {
+ if (!($fp = @fopen("{$phpbb_root_path}styles/$template_path$pathfile$file", 'r')))
+ {
+ trigger_error("Could not open {$phpbb_root_path}styles/$template_path$pathfile$file", E_USER_ERROR);
+ }
+
+ $filesize = filesize("{$phpbb_root_path}styles/$template_path$pathfile$file");
+
+ if ($filesize)
+ {
+ $template_data = fread($fp, $filesize);
+ }
+
+ fclose($fp);
+
+ if (!$filesize)
+ {
+ // File is empty
+ continue;
+ }
+
+ if (preg_match_all('#<!-- INCLUDE (.*?\.html) -->#is', $template_data, $matches))
+ {
+ foreach ($matches[1] as $match)
+ {
+ $includes[trim($match)][] = $file;
+ }
+ }
+ }
+ }
+
+ foreach ($filelist as $pathfile => $file_ary)
+ {
+ foreach ($file_ary as $file)
+ {
+ // Skip index.
+ if (strpos($file, 'index.') === 0)
+ {
+ continue;
+ }
+
+ // We could do this using extended inserts ... but that could be one
+ // heck of a lot of data ...
+ $sql_ary = array(
+ 'template_id' => (int) $style_id,
+ 'template_filename' => "$pathfile$file",
+ 'template_included' => (isset($includes[$file])) ? implode(':', $includes[$file]) . ':' : '',
+ 'template_mtime' => (int) filemtime("{$phpbb_root_path}styles/$template_path$pathfile$file"),
+ 'template_data' => (string) file_get_contents("{$phpbb_root_path}styles/$template_path$pathfile$file"),
+ );
+
+ if ($mode == 'insert')
+ {
+ $sql = 'INSERT INTO ' . STYLES_TEMPLATE_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ }
+ else
+ {
+ $sql = 'UPDATE ' . STYLES_TEMPLATE_DATA_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE template_id = $style_id
+ AND template_filename = '" . $db->sql_escape("$pathfile$file") . "'";
+ }
+ $db->sql_query($sql);
+ }
+ }
+ }
+
+ /**
+ * Returns an array containing all template filenames for one template that are currently cached.
+ *
+ * @param string $template_path contains the name of the template's folder in /styles/
+ *
+ * @return array of filenames that exist in /styles/$template_path/template/ (without extension!)
+ */
+ function template_cache_filelist($template_path)
+ {
+ global $phpbb_root_path, $phpEx, $user;
+
+ $cache_prefix = 'tpl_' . str_replace('_', '-', $template_path);
+
+ if (!($dp = @opendir("{$phpbb_root_path}cache")))
+ {
+ trigger_error($user->lang['TEMPLATE_ERR_CACHE_READ'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $file_ary = array();
+ while ($file = readdir($dp))
+ {
+ if ($file[0] == '.')
+ {
+ continue;
+ }
+
+ if (is_file($phpbb_root_path . 'cache/' . $file) && (strpos($file, $cache_prefix) === 0))
+ {
+ $file_ary[] = str_replace('.', '/', preg_replace('#^' . preg_quote($cache_prefix, '#') . '_(.*?)\.html\.' . $phpEx . '$#i', '\1', $file));
+ }
+ }
+ closedir($dp);
+
+ return $file_ary;
+ }
+
+ /**
+ * Destroys cached versions of template files
+ *
+ * @param array $template_row contains the template's row in the STYLES_TEMPLATE_TABLE database table
+ * @param mixed $file_ary is optional and may contain an array of template file names which should be refreshed in the cache.
+ * The file names should be the original template file names and not the cache file names.
+ */
+ function clear_template_cache($template_row, $file_ary = false)
+ {
+ global $phpbb_root_path, $phpEx, $user;
+
+ $cache_prefix = 'tpl_' . str_replace('_', '-', $template_row['template_path']);
+
+ if (!$file_ary || !is_array($file_ary))
+ {
+ $file_ary = $this->template_cache_filelist($template_row['template_path']);
+ $log_file_list = $user->lang['ALL_FILES'];
+ }
+ else
+ {
+ $log_file_list = implode(', ', $file_ary);
+ }
+
+ foreach ($file_ary as $file)
+ {
+ $file = str_replace('/', '.', $file);
+
+ $file = "{$phpbb_root_path}cache/{$cache_prefix}_$file.html.$phpEx";
+ if (file_exists($file) && is_file($file))
+ {
+ @unlink($file);
+ }
+ }
+ unset($file_ary);
+
+ add_log('admin', 'LOG_TEMPLATE_CACHE_CLEARED', $template_row['template_name'], $log_file_list);
+ }
+
+ /**
+ * Install Style/Template/Theme/Imageset
+ */
+ function install($mode)
+ {
+ global $phpbb_root_path, $phpEx, $config, $db, $cache, $user, $template;
+
+ $l_type = strtoupper($mode);
+
+ $error = $installcfg = $style_row = array();
+ $root_path = $cfg_file = '';
+ $element_ary = array('template' => STYLES_TEMPLATE_TABLE, 'theme' => STYLES_THEME_TABLE, 'imageset' => STYLES_IMAGESET_TABLE);
+
+ $install_path = request_var('path', '');
+ $update = (isset($_POST['update'])) ? true : false;
+
+ // Installing, obtain cfg file contents
+ if ($install_path)
+ {
+ $root_path = $phpbb_root_path . 'styles/' . $install_path . '/';
+ $cfg_file = ($mode == 'style') ? "$root_path$mode.cfg" : "$root_path$mode/$mode.cfg";
+
+ if (!file_exists($cfg_file))
+ {
+ $error[] = $user->lang[$l_type . '_ERR_NOT_' . $l_type];
+ }
+ else
+ {
+ $installcfg = parse_cfg_file($cfg_file);
+ }
+ }
+
+ // Installing
+ if (sizeof($installcfg))
+ {
+ $name = $installcfg['name'];
+ $copyright = $installcfg['copyright'];
+ $version = $installcfg['version'];
+
+ $style_row = array(
+ $mode . '_id' => 0,
+ $mode . '_name' => '',
+ $mode . '_copyright' => ''
+ );
+
+ switch ($mode)
+ {
+ case 'style':
+
+ $style_row = array(
+ 'style_id' => 0,
+ 'style_name' => $installcfg['name'],
+ 'style_copyright' => $installcfg['copyright']
+ );
+
+ $reqd_template = (isset($installcfg['required_template'])) ? $installcfg['required_template'] : false;
+ $reqd_theme = (isset($installcfg['required_theme'])) ? $installcfg['required_theme'] : false;
+ $reqd_imageset = (isset($installcfg['required_imageset'])) ? $installcfg['required_imageset'] : false;
+
+ // Check to see if each element is already installed, if it is grab the id
+ foreach ($element_ary as $element => $table)
+ {
+ $style_row = array_merge($style_row, array(
+ $element . '_id' => 0,
+ $element . '_name' => '',
+ $element . '_copyright' => '')
+ );
+
+ $this->test_installed($element, $error, (${'reqd_' . $element}) ? $phpbb_root_path . 'styles/' . $reqd_template . '/' : $root_path, ${'reqd_' . $element}, $style_row[$element . '_id'], $style_row[$element . '_name'], $style_row[$element . '_copyright']);
+
+ if (!$style_row[$element . '_name'])
+ {
+ $style_row[$element . '_name'] = $reqd_template;
+ }
+
+ // Merge other information to installcfg... if present
+ $cfg_file = $phpbb_root_path . 'styles/' . $install_path . '/' . $element . '/' . $element . '.cfg';
+
+ if (file_exists($cfg_file))
+ {
+ $cfg_contents = parse_cfg_file($cfg_file);
+
+ // Merge only specific things. We may need them later.
+ foreach (array('inherit_from', 'parse_css_file') as $key)
+ {
+ if (!empty($cfg_contents[$key]) && !isset($installcfg[$key]))
+ {
+ $installcfg[$key] = $cfg_contents[$key];
+ }
+ }
+ }
+ }
+
+ break;
+
+ case 'template':
+ $this->test_installed('template', $error, $root_path, false, $style_row['template_id'], $style_row['template_name'], $style_row['template_copyright']);
+ break;
+
+ case 'theme':
+ $this->test_installed('theme', $error, $root_path, false, $style_row['theme_id'], $style_row['theme_name'], $style_row['theme_copyright']);
+ break;
+
+ case 'imageset':
+ $this->test_installed('imageset', $error, $root_path, false, $style_row['imageset_id'], $style_row['imageset_name'], $style_row['imageset_copyright']);
+ break;
+ }
+ }
+ else
+ {
+ trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $style_row['store_db'] = request_var('store_db', 0);
+ $style_row['style_active'] = request_var('style_active', 1);
+ $style_row['style_default'] = request_var('style_default', 0);
+
+ // User has submitted form and no errors have occurred
+ if ($update && !sizeof($error))
+ {
+ if ($mode == 'style')
+ {
+ foreach ($element_ary as $element => $table)
+ {
+ ${$element . '_root_path'} = (${'reqd_' . $element}) ? $phpbb_root_path . 'styles/' . ${'reqd_' . $element} . '/' : false;
+ ${$element . '_path'} = (${'reqd_' . $element}) ? ${'reqd_' . $element} : false;
+ }
+ $this->install_style($error, 'install', $root_path, $style_row['style_id'], $style_row['style_name'], $install_path, $style_row['style_copyright'], $style_row['style_active'], $style_row['style_default'], $style_row, $template_root_path, $template_path, $theme_root_path, $theme_path, $imageset_root_path, $imageset_path);
+ }
+ else
+ {
+ $style_row['store_db'] = $this->install_element($mode, $error, 'install', $root_path, $style_row[$mode . '_id'], $style_row[$mode . '_name'], $install_path, $style_row[$mode . '_copyright'], $style_row['store_db']);
+ }
+
+ if (!sizeof($error))
+ {
+ $cache->destroy('sql', STYLES_TABLE);
+
+ $message = ($style_row['store_db']) ? '_ADDED_DB' : '_ADDED';
+ trigger_error($user->lang[$l_type . $message] . adm_back_link($this->u_action));
+ }
+ }
+
+ $this->page_title = 'INSTALL_' . $l_type;
+
+ $template->assign_vars(array(
+ 'S_DETAILS' => true,
+ 'S_INSTALL' => true,
+ 'S_ERROR_MSG' => (sizeof($error)) ? true : false,
+ 'S_LOCATION' => (isset($installcfg['inherit_from']) && $installcfg['inherit_from']) ? false : true,
+ 'S_STYLE' => ($mode == 'style') ? true : false,
+ 'S_TEMPLATE' => ($mode == 'template') ? true : false,
+ 'S_SUPERTEMPLATE' => (isset($installcfg['inherit_from'])) ? $installcfg['inherit_from'] : '',
+ 'S_THEME' => ($mode == 'theme') ? true : false,
+
+ 'S_STORE_DB' => (isset($style_row[$mode . '_storedb'])) ? $style_row[$mode . '_storedb'] : 0,
+ 'S_STYLE_ACTIVE' => (isset($style_row['style_active'])) ? $style_row['style_active'] : 0,
+ 'S_STYLE_DEFAULT' => (isset($style_row['style_default'])) ? $style_row['style_default'] : 0,
+
+ 'U_ACTION' => $this->u_action . "&amp;action=install&amp;path=" . urlencode($install_path),
+ 'U_BACK' => $this->u_action,
+
+ 'L_TITLE' => $user->lang[$this->page_title],
+ 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'],
+ 'L_NAME' => $user->lang[$l_type . '_NAME'],
+ 'L_LOCATION' => ($mode == 'template' || $mode == 'theme') ? $user->lang[$l_type . '_LOCATION'] : '',
+ 'L_LOCATION_EXPLAIN' => ($mode == 'template' || $mode == 'theme') ? $user->lang[$l_type . '_LOCATION_EXPLAIN'] : '',
+
+ 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'NAME' => $style_row[$mode . '_name'],
+ 'COPYRIGHT' => $style_row[$mode . '_copyright'],
+ 'TEMPLATE_NAME' => ($mode == 'style') ? $style_row['template_name'] : '',
+ 'THEME_NAME' => ($mode == 'style') ? $style_row['theme_name'] : '',
+ 'IMAGESET_NAME' => ($mode == 'style') ? $style_row['imageset_name'] : '')
+ );
+ }
+
+ /**
+ * Add new style
+ */
+ function add($mode)
+ {
+ global $phpbb_root_path, $phpEx, $config, $db, $cache, $user, $template;
+
+ $l_type = strtoupper($mode);
+ $element_ary = array('template' => STYLES_TEMPLATE_TABLE, 'theme' => STYLES_THEME_TABLE, 'imageset' => STYLES_IMAGESET_TABLE);
+ $error = array();
+
+ $style_row = array(
+ $mode . '_name' => utf8_normalize_nfc(request_var('name', '', true)),
+ $mode . '_copyright' => utf8_normalize_nfc(request_var('copyright', '', true)),
+ 'template_id' => 0,
+ 'theme_id' => 0,
+ 'imageset_id' => 0,
+ 'store_db' => request_var('store_db', 0),
+ 'style_active' => request_var('style_active', 1),
+ 'style_default' => request_var('style_default', 0),
+ );
+
+ $basis = request_var('basis', 0);
+ $update = (isset($_POST['update'])) ? true : false;
+
+ if ($basis)
+ {
+ switch ($mode)
+ {
+ case 'style':
+ $sql_select = 'template_id, theme_id, imageset_id';
+ $sql_from = STYLES_TABLE;
+ break;
+
+ case 'template':
+ $sql_select = 'template_id';
+ $sql_from = STYLES_TEMPLATE_TABLE;
+ break;
+
+ case 'theme':
+ $sql_select = 'theme_id';
+ $sql_from = STYLES_THEME_TABLE;
+ break;
+
+ case 'imageset':
+ $sql_select = 'imageset_id';
+ $sql_from = STYLES_IMAGESET_TABLE;
+ break;
+ }
+
+ $sql = "SELECT $sql_select
+ FROM $sql_from
+ WHERE {$mode}_id = $basis";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ $error[] = $user->lang['NO_' . $l_type];
+ }
+
+ if (!sizeof($error))
+ {
+ $style_row['template_id'] = (isset($row['template_id'])) ? $row['template_id'] : $style_row['template_id'];
+ $style_row['theme_id'] = (isset($row['theme_id'])) ? $row['theme_id'] : $style_row['theme_id'];
+ $style_row['imageset_id'] = (isset($row['imageset_id'])) ? $row['imageset_id'] : $style_row['imageset_id'];
+ }
+ }
+
+ if ($update)
+ {
+ $style_row['template_id'] = request_var('template_id', $style_row['template_id']);
+ $style_row['theme_id'] = request_var('theme_id', $style_row['theme_id']);
+ $style_row['imageset_id'] = request_var('imageset_id', $style_row['imageset_id']);
+
+ if ($mode == 'style' && (!$style_row['template_id'] || !$style_row['theme_id'] || !$style_row['imageset_id']))
+ {
+ $error[] = $user->lang['STYLE_ERR_NO_IDS'];
+ }
+ }
+
+ // User has submitted form and no errors have occurred
+ if ($update && !sizeof($error))
+ {
+ if ($mode == 'style')
+ {
+ $style_row['style_id'] = 0;
+
+ $this->install_style($error, 'add', '', $style_row['style_id'], $style_row['style_name'], '', $style_row['style_copyright'], $style_row['style_active'], $style_row['style_default'], $style_row);
+ }
+
+ if (!sizeof($error))
+ {
+ $cache->destroy('sql', STYLES_TABLE);
+
+ $message = ($style_row['store_db']) ? '_ADDED_DB' : '_ADDED';
+ trigger_error($user->lang[$l_type . $message] . adm_back_link($this->u_action));
+ }
+ }
+
+ if ($mode == 'style')
+ {
+ foreach ($element_ary as $element => $table)
+ {
+ $sql = "SELECT {$element}_id, {$element}_name
+ FROM $table
+ ORDER BY {$element}_id ASC";
+ $result = $db->sql_query($sql);
+
+ ${$element . '_options'} = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $selected = ($row[$element . '_id'] == $style_row[$element . '_id']) ? ' selected="selected"' : '';
+ ${$element . '_options'} .= '<option value="' . $row[$element . '_id'] . '"' . $selected . '>' . $row[$element . '_name'] . '</option>';
+ }
+ $db->sql_freeresult($result);
+ }
+ }
+
+ $this->page_title = 'ADD_' . $l_type;
+
+ $template->assign_vars(array(
+ 'S_DETAILS' => true,
+ 'S_ADD' => true,
+ 'S_ERROR_MSG' => (sizeof($error)) ? true : false,
+ 'S_STYLE' => ($mode == 'style') ? true : false,
+ 'S_TEMPLATE' => ($mode == 'template') ? true : false,
+ 'S_THEME' => ($mode == 'theme') ? true : false,
+ 'S_BASIS' => ($basis) ? true : false,
+
+ 'S_STORE_DB' => (isset($style_row['storedb'])) ? $style_row['storedb'] : 0,
+ 'S_STYLE_ACTIVE' => (isset($style_row['style_active'])) ? $style_row['style_active'] : 0,
+ 'S_STYLE_DEFAULT' => (isset($style_row['style_default'])) ? $style_row['style_default'] : 0,
+ 'S_TEMPLATE_OPTIONS' => ($mode == 'style') ? $template_options : '',
+ 'S_THEME_OPTIONS' => ($mode == 'style') ? $theme_options : '',
+ 'S_IMAGESET_OPTIONS' => ($mode == 'style') ? $imageset_options : '',
+
+ 'U_ACTION' => $this->u_action . '&amp;action=add&amp;basis=' . $basis,
+ 'U_BACK' => $this->u_action,
+
+ 'L_TITLE' => $user->lang[$this->page_title],
+ 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'],
+ 'L_NAME' => $user->lang[$l_type . '_NAME'],
+ 'L_LOCATION' => ($mode == 'template' || $mode == 'theme') ? $user->lang[$l_type . '_LOCATION'] : '',
+ 'L_LOCATION_EXPLAIN' => ($mode == 'template' || $mode == 'theme') ? $user->lang[$l_type . '_LOCATION_EXPLAIN'] : '',
+
+ 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'NAME' => $style_row[$mode . '_name'],
+ 'COPYRIGHT' => $style_row[$mode . '_copyright'])
+ );
+
+ }
+
+ /**
+
+ $reqd_template = (isset($installcfg['required_template'])) ? $installcfg['required_template'] : false;
+ $reqd_theme = (isset($installcfg['required_theme'])) ? $installcfg['required_theme'] : false;
+ $reqd_imageset = (isset($installcfg['required_imageset'])) ? $installcfg['required_imageset'] : false;
+
+ // Check to see if each element is already installed, if it is grab the id
+ foreach ($element_ary as $element => $table)
+ {
+ $style_row = array_merge($style_row, array(
+ $element . '_id' => 0,
+ $element . '_name' => '',
+ $element . '_copyright' => '')
+ );
+
+ $this->test_installed($element, $error, $root_path, ${'reqd_' . $element}, $style_row[$element . '_id'], $style_row[$element . '_name'], $style_row[$element . '_copyright']);
+ * Is this element installed? If not, grab its cfg details
+ */
+ function test_installed($element, &$error, $root_path, $reqd_name, &$id, &$name, &$copyright)
+ {
+ global $db, $user;
+
+ switch ($element)
+ {
+ case 'template':
+ $sql_from = STYLES_TEMPLATE_TABLE;
+ break;
+
+ case 'theme':
+ $sql_from = STYLES_THEME_TABLE;
+ break;
+
+ case 'imageset':
+ $sql_from = STYLES_IMAGESET_TABLE;
+ break;
+ }
+
+ $l_element = strtoupper($element);
+
+ $chk_name = ($reqd_name !== false) ? $reqd_name : $name;
+
+ $sql = "SELECT {$element}_id, {$element}_name
+ FROM $sql_from
+ WHERE {$element}_name = '" . $db->sql_escape($chk_name) . "'";
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $name = $row[$element . '_name'];
+ $id = $row[$element . '_id'];
+ }
+ else
+ {
+ if (!($cfg = @file("$root_path$element/$element.cfg")))
+ {
+ $error[] = sprintf($user->lang['REQUIRES_' . $l_element], $reqd_name);
+ return false;
+ }
+
+ $cfg = parse_cfg_file("$root_path$element/$element.cfg", $cfg);
+
+ $name = $cfg['name'];
+ $copyright = $cfg['copyright'];
+ $id = 0;
+
+ unset($cfg);
+ }
+ $db->sql_freeresult($result);
+ }
+
+ /**
+ * Install/Add style
+ */
+ function install_style(&$error, $action, $root_path, &$id, $name, $path, $copyright, $active, $default, &$style_row, $template_root_path = false, $template_path = false, $theme_root_path = false, $theme_path = false, $imageset_root_path = false, $imageset_path = false)
+ {
+ global $config, $db, $user;
+
+ $element_ary = array('template', 'theme', 'imageset');
+
+ if (!$name)
+ {
+ $error[] = $user->lang['STYLE_ERR_STYLE_NAME'];
+ }
+
+ // Check length settings
+ if (utf8_strlen($name) > 30)
+ {
+ $error[] = $user->lang['STYLE_ERR_NAME_LONG'];
+ }
+
+ if (utf8_strlen($copyright) > 60)
+ {
+ $error[] = $user->lang['STYLE_ERR_COPY_LONG'];
+ }
+
+ // Check if the name already exist
+ $sql = 'SELECT style_id
+ FROM ' . STYLES_TABLE . "
+ WHERE style_name = '" . $db->sql_escape($name) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ $error[] = $user->lang['STYLE_ERR_NAME_EXIST'];
+ }
+
+ if (sizeof($error))
+ {
+ return false;
+ }
+
+ foreach ($element_ary as $element)
+ {
+ // Zero id value ... need to install element ... run usual checks
+ // and do the install if necessary
+ if (!$style_row[$element . '_id'])
+ {
+ $this->install_element($element, $error, $action, (${$element . '_root_path'}) ? ${$element . '_root_path'} : $root_path, $style_row[$element . '_id'], $style_row[$element . '_name'], (${$element . '_path'}) ? ${$element . '_path'} : $path, $style_row[$element . '_copyright']);
+ }
+ }
+
+ if (!$style_row['template_id'] || !$style_row['theme_id'] || !$style_row['imageset_id'])
+ {
+ $error[] = $user->lang['STYLE_ERR_NO_IDS'];
+ }
+
+ if (sizeof($error))
+ {
+ return false;
+ }
+
+ $db->sql_transaction('begin');
+
+ $sql_ary = array(
+ 'style_name' => $name,
+ 'style_copyright' => $copyright,
+ 'style_active' => (int) $active,
+ 'template_id' => (int) $style_row['template_id'],
+ 'theme_id' => (int) $style_row['theme_id'],
+ 'imageset_id' => (int) $style_row['imageset_id'],
+ );
+
+ $sql = 'INSERT INTO ' . STYLES_TABLE . '
+ ' . $db->sql_build_array('INSERT', $sql_ary);
+ $db->sql_query($sql);
+
+ $id = $db->sql_nextid();
+
+ if ($default)
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_style = $id
+ WHERE user_style = " . $config['default_style'];
+ $db->sql_query($sql);
+
+ set_config('default_style', $id);
+ }
+
+ $db->sql_transaction('commit');
+
+ add_log('admin', 'LOG_STYLE_ADD', $name);
+ }
+
+ /**
+ * Install/add an element, doing various checks as we go
+ */
+ function install_element($mode, &$error, $action, $root_path, &$id, $name, $path, $copyright, $store_db = 0)
+ {
+ global $phpbb_root_path, $db, $user;
+
+ // we parse the cfg here (again)
+ $cfg_data = parse_cfg_file("$root_path$mode/$mode.cfg");
+
+ switch ($mode)
+ {
+ case 'template':
+ $sql_from = STYLES_TEMPLATE_TABLE;
+ break;
+
+ case 'theme':
+ $sql_from = STYLES_THEME_TABLE;
+ break;
+
+ case 'imageset':
+ $sql_from = STYLES_IMAGESET_TABLE;
+ break;
+ }
+
+ $l_type = strtoupper($mode);
+
+ if (!$name)
+ {
+ $error[] = $user->lang[$l_type . '_ERR_STYLE_NAME'];
+ }
+
+ // Check length settings
+ if (utf8_strlen($name) > 30)
+ {
+ $error[] = $user->lang[$l_type . '_ERR_NAME_LONG'];
+ }
+
+ if (utf8_strlen($copyright) > 60)
+ {
+ $error[] = $user->lang[$l_type . '_ERR_COPY_LONG'];
+ }
+
+ // Check if the name already exist
+ $sql = "SELECT {$mode}_id
+ FROM $sql_from
+ WHERE {$mode}_name = '" . $db->sql_escape($name) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ // If it exist, we just use the style on installation
+ if ($action == 'install')
+ {
+ $id = $row[$mode . '_id'];
+ return false;
+ }
+
+ $error[] = $user->lang[$l_type . '_ERR_NAME_EXIST'];
+ }
+
+ if (isset($cfg_data['inherit_from']) && $cfg_data['inherit_from'])
+ {
+ if ($mode === 'template')
+ {
+ $select_bf = ', bbcode_bitfield';
+ }
+ else
+ {
+ $select_bf = '';
+ }
+
+ $sql = "SELECT {$mode}_id, {$mode}_name, {$mode}_path, {$mode}_storedb $select_bf
+ FROM $sql_from
+ WHERE {$mode}_name = '" . $db->sql_escape($cfg_data['inherit_from']) . "'
+ AND {$mode}_inherits_id = 0";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ if (!$row)
+ {
+ $error[] = sprintf($user->lang[$l_type . '_ERR_REQUIRED_OR_INCOMPLETE'], $cfg_data['inherit_from']);
+ }
+ else
+ {
+ $inherit_id = $row["{$mode}_id"];
+ $inherit_path = $row["{$mode}_path"];
+ $inherit_bf = ($mode === 'template') ? $row["bbcode_bitfield"] : false;
+ $cfg_data['store_db'] = $row["{$mode}_storedb"];
+ $store_db = $row["{$mode}_storedb"];
+ }
+ }
+ else
+ {
+ $inherit_id = 0;
+ $inherit_path = '';
+ $inherit_bf = false;
+ }
+
+ if (sizeof($error))
+ {
+ return false;
+ }
+
+ $sql_ary = array(
+ $mode . '_name' => $name,
+ $mode . '_copyright' => $copyright,
+ $mode . '_path' => $path,
+ );
+
+ switch ($mode)
+ {
+ case 'template':
+ // We check if the template author defined a different bitfield
+ if (!empty($cfg_data['template_bitfield']))
+ {
+ $sql_ary['bbcode_bitfield'] = $cfg_data['template_bitfield'];
+ }
+ else if ($inherit_bf)
+ {
+ $sql_ary['bbcode_bitfield'] = $inherit_bf;
+ }
+ else
+ {
+ $sql_ary['bbcode_bitfield'] = TEMPLATE_BITFIELD;
+ }
+
+ // We set a pre-defined bitfield here which we may use further in 3.2
+ $sql_ary += array(
+ 'template_storedb' => $store_db,
+ );
+ if (isset($cfg_data['inherit_from']) && $cfg_data['inherit_from'])
+ {
+ $sql_ary += array(
+ 'template_inherits_id' => $inherit_id,
+ 'template_inherit_path' => $inherit_path,
+ );
+ }
+ break;
+
+ case 'theme':
+ // We are only interested in the theme configuration for now
+
+ if (isset($cfg_data['parse_css_file']) && $cfg_data['parse_css_file'])
+ {
+ $store_db = 1;
+ }
+
+ $sql_ary += array(
+ 'theme_storedb' => $store_db,
+ 'theme_data' => ($store_db) ? $this->db_theme_data($sql_ary, false, $root_path) : '',
+ 'theme_mtime' => (int) filemtime("{$phpbb_root_path}styles/$path/theme/stylesheet.css")
+ );
+ break;
+
+ // all the heavy lifting is done later
+ case 'imageset':
+ break;
+ }
+
+ $db->sql_transaction('begin');
+
+ $sql = "INSERT INTO $sql_from
+ " . $db->sql_build_array('INSERT', $sql_ary);
+ $db->sql_query($sql);
+
+ $id = $db->sql_nextid();
+
+ if ($mode == 'template' && $store_db)
+ {
+ $filelist = filelist("{$root_path}template", '', 'html');
+ $this->store_templates('insert', $id, $path, $filelist);
+ }
+ else if ($mode == 'imageset')
+ {
+ $cfg_data = parse_cfg_file("$root_path$mode/imageset.cfg");
+
+ $imageset_definitions = array();
+ foreach ($this->imageset_keys as $topic => $key_array)
+ {
+ $imageset_definitions = array_merge($imageset_definitions, $key_array);
+ }
+
+ foreach ($cfg_data as $key => $value)
+ {
+ if (strpos($value, '*') !== false)
+ {
+ if (substr($value, -1, 1) === '*')
+ {
+ list($image_filename, $image_height) = explode('*', $value);
+ $image_width = 0;
+ }
+ else
+ {
+ list($image_filename, $image_height, $image_width) = explode('*', $value);
+ }
+ }
+ else
+ {
+ $image_filename = $value;
+ $image_height = $image_width = 0;
+ }
+
+ if (strpos($key, 'img_') === 0 && $image_filename)
+ {
+ $key = substr($key, 4);
+ if (in_array($key, $imageset_definitions))
+ {
+ $sql_ary = array(
+ 'image_name' => $key,
+ 'image_filename' => str_replace('{PATH}', "styles/$path/imageset/", trim($image_filename)),
+ 'image_height' => (int) $image_height,
+ 'image_width' => (int) $image_width,
+ 'imageset_id' => (int) $id,
+ 'image_lang' => '',
+ );
+ $db->sql_query('INSERT INTO ' . STYLES_IMAGESET_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+ }
+ }
+ }
+ unset($cfg_data);
+
+ $sql = 'SELECT lang_dir
+ FROM ' . LANG_TABLE;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (@file_exists("$root_path$mode/{$row['lang_dir']}/imageset.cfg"))
+ {
+ $cfg_data_imageset_data = parse_cfg_file("$root_path$mode/{$row['lang_dir']}/imageset.cfg");
+ foreach ($cfg_data_imageset_data as $image_name => $value)
+ {
+ if (strpos($value, '*') !== false)
+ {
+ if (substr($value, -1, 1) === '*')
+ {
+ list($image_filename, $image_height) = explode('*', $value);
+ $image_width = 0;
+ }
+ else
+ {
+ list($image_filename, $image_height, $image_width) = explode('*', $value);
+ }
+ }
+ else
+ {
+ $image_filename = $value;
+ $image_height = $image_width = 0;
+ }
+
+ if (strpos($image_name, 'img_') === 0 && $image_filename)
+ {
+ $image_name = substr($image_name, 4);
+ if (in_array($image_name, $imageset_definitions))
+ {
+ $sql_ary = array(
+ 'image_name' => $image_name,
+ 'image_filename' => $image_filename,
+ 'image_height' => (int) $image_height,
+ 'image_width' => (int) $image_width,
+ 'imageset_id' => (int) $id,
+ 'image_lang' => $row['lang_dir'],
+ );
+ $db->sql_query('INSERT INTO ' . STYLES_IMAGESET_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+ }
+ }
+ }
+ unset($cfg_data_imageset_data);
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+
+ $db->sql_transaction('commit');
+
+ $log = ($store_db) ? 'LOG_' . $l_type . '_ADD_DB' : 'LOG_' . $l_type . '_ADD_FS';
+ add_log('admin', $log, $name);
+
+ // Return store_db in case it had to be altered
+ return $store_db;
+ }
+
+ /**
+ * Checks downwards dependencies
+ *
+ * @access public
+ * @param string $mode The element type to check - only template is supported
+ * @param int $id The template id
+ * @returns false if no component inherits, array with name, path and id for each subtemplate otherwise
+ */
+ function check_inheritance($mode, $id)
+ {
+ global $db;
+
+ $l_type = strtoupper($mode);
+
+ switch ($mode)
+ {
+ case 'template':
+ $sql_from = STYLES_TEMPLATE_TABLE;
+ break;
+
+ case 'theme':
+ $sql_from = STYLES_THEME_TABLE;
+ break;
+
+ case 'imageset':
+ $sql_from = STYLES_IMAGESET_TABLE;
+ break;
+ }
+
+ $sql = "SELECT {$mode}_id, {$mode}_name, {$mode}_path
+ FROM $sql_from
+ WHERE {$mode}_inherits_id = " . (int) $id;
+ $result = $db->sql_query($sql);
+
+ $names = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+
+ $names[$row["{$mode}_id"]] = array(
+ "{$mode}_id" => $row["{$mode}_id"],
+ "{$mode}_name" => $row["{$mode}_name"],
+ "{$mode}_path" => $row["{$mode}_path"],
+ );
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($names))
+ {
+ return $names;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Checks upwards dependencies
+ *
+ * @access public
+ * @param string $mode The element type to check - only template is supported
+ * @param int $id The template id
+ * @returns false if the component does not inherit, array with name, path and id otherwise
+ */
+ function get_super($mode, $id)
+ {
+ global $db;
+
+ $l_type = strtoupper($mode);
+
+ switch ($mode)
+ {
+ case 'template':
+ $sql_from = STYLES_TEMPLATE_TABLE;
+ break;
+
+ case 'theme':
+ $sql_from = STYLES_THEME_TABLE;
+ break;
+
+ case 'imageset':
+ $sql_from = STYLES_IMAGESET_TABLE;
+ break;
+ }
+
+ $sql = "SELECT {$mode}_inherits_id
+ FROM $sql_from
+ WHERE {$mode}_id = " . (int) $id;
+ $result = $db->sql_query_limit($sql, 1);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ return false;
+ }
+
+ $super_id = $row["{$mode}_inherits_id"];
+
+ $sql = "SELECT {$mode}_id, {$mode}_name, {$mode}_path
+ FROM $sql_from
+ WHERE {$mode}_id = " . (int) $super_id;
+
+ $result = $db->sql_query_limit($sql, 1);
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $db->sql_freeresult($result);
+ return $row;
+ }
+
+ return false;
+ }
+
+ /**
+ * Moves a template set and its subtemplates to the database
+ *
+ * @access public
+ * @param string $mode The component to move - only template is supported
+ * @param int $id The template id
+ */
+ function store_in_db($mode, $id)
+ {
+ global $db, $user;
+
+ $error = array();
+ $l_type = strtoupper($mode);
+ if ($super = $this->get_super($mode, $id))
+ {
+ $error[] = (sprintf($user->lang["{$l_type}_INHERITS"], $super['template_name']));
+ return $error;
+ }
+
+ $sql = "SELECT {$mode}_id, {$mode}_name, {$mode}_path
+ FROM " . STYLES_TEMPLATE_TABLE . '
+ WHERE template_id = ' . (int) $id;
+
+ $result = $db->sql_query_limit($sql, 1);
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $db->sql_freeresult($result);
+ $subs = $this->check_inheritance($mode, $id);
+
+ $this->_store_in_db($mode, $id, $row["{$mode}_path"]);
+ if ($subs && sizeof($subs))
+ {
+ foreach ($subs as $sub_id => $sub)
+ {
+ if ($err = $this->_store_in_db($mode, $sub["{$mode}_id"], $sub["{$mode}_path"]))
+ {
+ $error[] = $err;
+ }
+ }
+ }
+ }
+ if (sizeof($error))
+ {
+ return $error;
+ }
+
+ return false;
+ }
+
+ /**
+ * Moves a template set to the database
+ *
+ * @access private
+ * @param string $mode The component to move - only template is supported
+ * @param int $id The template id
+ * @param string $path TThe path to the template files
+ */
+ function _store_in_db($mode, $id, $path)
+ {
+ global $phpbb_root_path, $db;
+
+ $filelist = filelist("{$phpbb_root_path}styles/{$path}/template", '', 'html');
+ $this->store_templates('insert', $id, $path, $filelist);
+
+ // Okay, we do the query here -shouldn't be triggered often.
+ $sql = 'UPDATE ' . STYLES_TEMPLATE_TABLE . '
+ SET template_storedb = 1
+ WHERE template_id = ' . $id;
+ $db->sql_query($sql);
+ }
+
+ /**
+ * Moves a template set and its subtemplates to the filesystem
+ *
+ * @access public
+ * @param string $mode The component to move - only template is supported
+ * @param int $id The template id
+ */
+ function store_in_fs($mode, $id)
+ {
+ global $db, $user;
+
+ $error = array();
+ $l_type = strtoupper($mode);
+ if ($super = $this->get_super($mode, $id))
+ {
+ $error[] = (sprintf($user->lang["{$l_type}_INHERITS"], $super['template_name']));
+ return($error);
+ }
+
+ $sql = "SELECT {$mode}_id, {$mode}_name, {$mode}_path
+ FROM " . STYLES_TEMPLATE_TABLE . '
+ WHERE template_id = ' . (int) $id;
+
+ $result = $db->sql_query_limit($sql, 1);
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $db->sql_freeresult($result);
+ if (!sizeof($error))
+ {
+ $subs = $this->check_inheritance($mode, $id);
+
+ $this->_store_in_fs($mode, $id, $row["{$mode}_path"]);
+
+ if ($subs && sizeof($subs))
+ {
+ foreach ($subs as $sub_id => $sub)
+ {
+ $this->_store_in_fs($mode, $sub["{$mode}_id"], $sub["{$mode}_path"]);
+ }
+ }
+ }
+ if (sizeof($error))
+ {
+ $this->store_in_db($id, $mode);
+ return $error;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Moves a template set to the filesystem
+ *
+ * @access private
+ * @param string $mode The component to move - only template is supported
+ * @param int $id The template id
+ * @param string $path The path to the template
+ */
+ function _store_in_fs($mode, $id, $path)
+ {
+ global $phpbb_root_path, $db, $user, $safe_mode;
+
+ $store_db = 0;
+ $error = array();
+ if (!$safe_mode && @is_writable("{$phpbb_root_path}styles/{$path}/template"))
+ {
+ $sql = 'SELECT *
+ FROM ' . STYLES_TEMPLATE_DATA_TABLE . "
+ WHERE template_id = $id";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!($fp = @fopen("{$phpbb_root_path}styles/{$path}/template/" . $row['template_filename'], 'wb')))
+ {
+ $store_db = 1;
+ $error[] = $user->lang['EDIT_TEMPLATE_STORED_DB'];
+ break;
+ }
+
+ fwrite($fp, $row['template_data']);
+ fclose($fp);
+ }
+ $db->sql_freeresult($result);
+
+ if (!$store_db)
+ {
+ $sql = 'DELETE FROM ' . STYLES_TEMPLATE_DATA_TABLE . "
+ WHERE template_id = $id";
+ $db->sql_query($sql);
+ }
+ }
+ if (sizeof($error))
+ {
+ return $error;
+ }
+ $sql = 'UPDATE ' . STYLES_TEMPLATE_TABLE . '
+ SET template_storedb = 0
+ WHERE template_id = ' . $id;
+ $db->sql_query($sql);
+
+ return false;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php
new file mode 100644
index 0000000000..3204e0204e
--- /dev/null
+++ b/phpBB/includes/acp/acp_update.php
@@ -0,0 +1,83 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_update
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template, $cache;
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ $user->add_lang('install');
+
+ $this->tpl_name = 'acp_update';
+ $this->page_title = 'ACP_VERSION_CHECK';
+
+ // Get current and latest version
+ $errstr = '';
+ $errno = 0;
+
+ $info = obtain_latest_version_info(request_var('versioncheck_force', false), true);
+
+ if ($info === false)
+ {
+ trigger_error('VERSIONCHECK_FAIL', E_USER_WARNING);
+ }
+
+ $info = explode("\n", $info);
+ $latest_version = trim($info[0]);
+
+ $announcement_url = trim($info[1]);
+ $announcement_url = (strpos($announcement_url, '&amp;') === false) ? str_replace('&', '&amp;', $announcement_url) : $announcement_url;
+ $update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update');
+
+ // Determine automatic update...
+ $sql = 'SELECT config_value
+ FROM ' . CONFIG_TABLE . "
+ WHERE config_name = 'version_update_from'";
+ $result = $db->sql_query($sql);
+ $version_update_from = (string) $db->sql_fetchfield('config_value');
+ $db->sql_freeresult($result);
+
+ $current_version = (!empty($version_update_from)) ? $version_update_from : $config['version'];
+
+ $up_to_date_automatic = (version_compare(str_replace('rc', 'RC', strtolower($current_version)), str_replace('rc', 'RC', strtolower($latest_version)), '<')) ? false : true;
+ $up_to_date = (version_compare(str_replace('rc', 'RC', strtolower($config['version'])), str_replace('rc', 'RC', strtolower($latest_version)), '<')) ? false : true;
+
+ $template->assign_vars(array(
+ 'S_UP_TO_DATE' => $up_to_date,
+ 'S_UP_TO_DATE_AUTO' => $up_to_date_automatic,
+ 'S_VERSION_CHECK' => true,
+ 'U_ACTION' => $this->u_action,
+ 'U_VERSIONCHECK_FORCE' => append_sid($this->u_action . '&amp;versioncheck_force=1'),
+
+ 'LATEST_VERSION' => $latest_version,
+ 'CURRENT_VERSION' => $config['version'],
+ 'AUTO_VERSION' => $version_update_from,
+
+ 'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $announcement_url, $update_link),
+ ));
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
new file mode 100644
index 0000000000..afca056eb2
--- /dev/null
+++ b/phpBB/includes/acp/acp_users.php
@@ -0,0 +1,2358 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_users
+{
+ var $u_action;
+ var $p_master;
+
+ function acp_users(&$p_master)
+ {
+ $this->p_master = &$p_master;
+ }
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template, $cache;
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix, $file_uploads;
+
+ $user->add_lang(array('posting', 'ucp', 'acp/users'));
+ $this->tpl_name = 'acp_users';
+ $this->page_title = 'ACP_USER_' . strtoupper($mode);
+
+ $error = array();
+ $username = utf8_normalize_nfc(request_var('username', '', true));
+ $user_id = request_var('u', 0);
+ $action = request_var('action', '');
+
+ $submit = (isset($_POST['update']) && !isset($_POST['cancel'])) ? true : false;
+
+ $form_name = 'acp_users';
+ add_form_key($form_name);
+
+ // Whois (special case)
+ if ($action == 'whois')
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ $this->page_title = 'WHOIS';
+ $this->tpl_name = 'simple_body';
+
+ $user_ip = request_var('user_ip', '');
+ $domain = gethostbyaddr($user_ip);
+ $ipwhois = user_ipwhois($user_ip);
+
+ $template->assign_vars(array(
+ 'MESSAGE_TITLE' => sprintf($user->lang['IP_WHOIS_FOR'], $domain),
+ 'MESSAGE_TEXT' => nl2br($ipwhois))
+ );
+
+ return;
+ }
+
+ // Show user selection mask
+ if (!$username && !$user_id)
+ {
+ $this->page_title = 'SELECT_USER';
+
+ $template->assign_vars(array(
+ 'U_ACTION' => $this->u_action,
+ 'ANONYMOUS_USER_ID' => ANONYMOUS,
+
+ 'S_SELECT_USER' => true,
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=select_user&amp;field=username&amp;select_single=true'),
+ ));
+
+ return;
+ }
+
+ if (!$user_id)
+ {
+ $sql = 'SELECT user_id
+ FROM ' . USERS_TABLE . "
+ WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
+ $result = $db->sql_query($sql);
+ $user_id = (int) $db->sql_fetchfield('user_id');
+ $db->sql_freeresult($result);
+
+ if (!$user_id)
+ {
+ trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+
+ // Generate content for all modes
+ $sql = 'SELECT u.*, s.*
+ FROM ' . USERS_TABLE . ' u
+ LEFT JOIN ' . SESSIONS_TABLE . ' s ON (s.session_user_id = u.user_id)
+ WHERE u.user_id = ' . $user_id . '
+ ORDER BY s.session_time DESC';
+ $result = $db->sql_query($sql);
+ $user_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$user_row)
+ {
+ trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ // Generate overall "header" for user admin
+ $s_form_options = '';
+
+ // Build modes dropdown list
+ $sql = 'SELECT module_mode, module_auth
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename = 'users'
+ AND module_enabled = 1
+ AND module_class = 'acp'
+ ORDER BY left_id, module_mode";
+ $result = $db->sql_query($sql);
+
+ $dropdown_modes = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!$this->p_master->module_auth($row['module_auth']))
+ {
+ continue;
+ }
+
+ $dropdown_modes[$row['module_mode']] = true;
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($dropdown_modes as $module_mode => $null)
+ {
+ $selected = ($mode == $module_mode) ? ' selected="selected"' : '';
+ $s_form_options .= '<option value="' . $module_mode . '"' . $selected . '>' . $user->lang['ACP_USER_' . strtoupper($module_mode)] . '</option>';
+ }
+
+ $template->assign_vars(array(
+ 'U_BACK' => $this->u_action,
+ 'U_MODE_SELECT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&amp;u=$user_id"),
+ 'U_ACTION' => $this->u_action . '&amp;u=' . $user_id,
+ 'S_FORM_OPTIONS' => $s_form_options,
+ 'MANAGED_USERNAME' => $user_row['username'])
+ );
+
+ // Prevent normal users/admins change/view founders if they are not a founder by themselves
+ if ($user->data['user_type'] != USER_FOUNDER && $user_row['user_type'] == USER_FOUNDER)
+ {
+ trigger_error($user->lang['NOT_MANAGE_FOUNDER'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ switch ($mode)
+ {
+ case 'overview':
+
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ $user->add_lang('acp/ban');
+
+ $delete = request_var('delete', 0);
+ $delete_type = request_var('delete_type', '');
+ $ip = request_var('ip', 'ip');
+
+ if ($submit)
+ {
+ // You can't delete the founder
+ if ($delete && $user_row['user_type'] != USER_FOUNDER)
+ {
+ if (!$auth->acl_get('a_userdel'))
+ {
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ // Check if the user wants to remove himself or the guest user account
+ if ($user_id == ANONYMOUS)
+ {
+ trigger_error($user->lang['CANNOT_REMOVE_ANONYMOUS'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ if ($user_id == $user->data['user_id'])
+ {
+ trigger_error($user->lang['CANNOT_REMOVE_YOURSELF'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ if (confirm_box(true))
+ {
+ user_delete($delete_type, $user_id, $user_row['username']);
+
+ add_log('admin', 'LOG_USER_DELETED', $user_row['username']);
+ trigger_error($user->lang['USER_DELETED'] . adm_back_link($this->u_action));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'u' => $user_id,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ 'update' => true,
+ 'delete' => 1,
+ 'delete_type' => $delete_type))
+ );
+ }
+ }
+
+ // Handle quicktool actions
+ switch ($action)
+ {
+ case 'banuser':
+ case 'banemail':
+ case 'banip':
+
+ if ($user_id == $user->data['user_id'])
+ {
+ trigger_error($user->lang['CANNOT_BAN_YOURSELF'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ if ($user_row['user_type'] == USER_FOUNDER)
+ {
+ trigger_error($user->lang['CANNOT_BAN_FOUNDER'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ $ban = array();
+
+ switch ($action)
+ {
+ case 'banuser':
+ $ban[] = $user_row['username'];
+ $reason = 'USER_ADMIN_BAN_NAME_REASON';
+ $log = 'LOG_USER_BAN_USER';
+ break;
+
+ case 'banemail':
+ $ban[] = $user_row['user_email'];
+ $reason = 'USER_ADMIN_BAN_EMAIL_REASON';
+ $log = 'LOG_USER_BAN_EMAIL';
+ break;
+
+ case 'banip':
+ $ban[] = $user_row['user_ip'];
+
+ $sql = 'SELECT DISTINCT poster_ip
+ FROM ' . POSTS_TABLE . "
+ WHERE poster_id = $user_id";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $ban[] = $row['poster_ip'];
+ }
+ $db->sql_freeresult($result);
+
+ $reason = 'USER_ADMIN_BAN_IP_REASON';
+ $log = 'LOG_USER_BAN_IP';
+ break;
+ }
+
+ $ban_reason = utf8_normalize_nfc(request_var('ban_reason', $user->lang[$reason], true));
+ $ban_give_reason = utf8_normalize_nfc(request_var('ban_give_reason', '', true));
+
+ // Log not used at the moment, we simply utilize the ban function.
+ $result = user_ban(substr($action, 3), $ban, 0, 0, 0, $ban_reason, $ban_give_reason);
+
+ trigger_error((($result === false) ? $user->lang['BAN_ALREADY_ENTERED'] : $user->lang['BAN_SUCCESSFUL']) . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+
+ break;
+
+ case 'reactivate':
+
+ if ($user_id == $user->data['user_id'])
+ {
+ trigger_error($user->lang['CANNOT_FORCE_REACT_YOURSELF'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ if ($user_row['user_type'] == USER_FOUNDER)
+ {
+ trigger_error($user->lang['CANNOT_FORCE_REACT_FOUNDER'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ if ($user_row['user_type'] == USER_IGNORE)
+ {
+ trigger_error($user->lang['CANNOT_FORCE_REACT_BOT'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ if ($config['email_enable'])
+ {
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+
+ $server_url = generate_board_url();
+
+ $user_actkey = gen_rand_string(10);
+ $key_len = 54 - (strlen($server_url));
+ $key_len = ($key_len > 6) ? $key_len : 6;
+ $user_actkey = substr($user_actkey, 0, $key_len);
+ $email_template = ($user_row['user_type'] == USER_NORMAL) ? 'user_reactivate_account' : 'user_resend_inactive';
+
+ if ($user_row['user_type'] == USER_NORMAL)
+ {
+ user_active_flip('deactivate', $user_id, INACTIVE_REMIND);
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_actkey = '" . $db->sql_escape($user_actkey) . "'
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
+ }
+ else
+ {
+ // Grabbing the last confirm key - we only send a reminder
+ $sql = 'SELECT user_actkey
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . $user_id;
+ $result = $db->sql_query($sql);
+ $user_actkey = (string) $db->sql_fetchfield('user_actkey');
+ $db->sql_freeresult($result);
+ }
+
+ $messenger = new messenger(false);
+
+ $messenger->template($email_template, $user_row['user_lang']);
+
+ $messenger->to($user_row['user_email'], $user_row['username']);
+
+ $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
+ $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
+ $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
+ $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
+
+ $messenger->assign_vars(array(
+ 'WELCOME_MSG' => htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename'])),
+ 'USERNAME' => htmlspecialchars_decode($user_row['username']),
+ 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user_row['user_id']}&k=$user_actkey")
+ );
+
+ $messenger->send(NOTIFY_EMAIL);
+
+ add_log('admin', 'LOG_USER_REACTIVATE', $user_row['username']);
+ add_log('user', $user_id, 'LOG_USER_REACTIVATE_USER');
+
+ trigger_error($user->lang['FORCE_REACTIVATION_SUCCESS'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ }
+
+ break;
+
+ case 'active':
+
+ if ($user_id == $user->data['user_id'])
+ {
+ // It is only deactivation since the user is already activated (else he would not have reached this page)
+ trigger_error($user->lang['CANNOT_DEACTIVATE_YOURSELF'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ if ($user_row['user_type'] == USER_FOUNDER)
+ {
+ trigger_error($user->lang['CANNOT_DEACTIVATE_FOUNDER'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ if ($user_row['user_type'] == USER_IGNORE)
+ {
+ trigger_error($user->lang['CANNOT_DEACTIVATE_BOT'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ user_active_flip('flip', $user_id);
+
+ if ($user_row['user_type'] == USER_INACTIVE)
+ {
+ if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
+ {
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+
+ $messenger = new messenger(false);
+
+ $messenger->template('admin_welcome_activated', $user_row['user_lang']);
+
+ $messenger->to($user_row['user_email'], $user_row['username']);
+
+ $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
+ $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
+ $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
+ $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
+
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($user_row['username']))
+ );
+
+ $messenger->send(NOTIFY_EMAIL);
+ }
+ }
+
+ $message = ($user_row['user_type'] == USER_INACTIVE) ? 'USER_ADMIN_ACTIVATED' : 'USER_ADMIN_DEACTIVED';
+ $log = ($user_row['user_type'] == USER_INACTIVE) ? 'LOG_USER_ACTIVE' : 'LOG_USER_INACTIVE';
+
+ add_log('admin', $log, $user_row['username']);
+ add_log('user', $user_id, $log . '_USER');
+
+ trigger_error($user->lang[$message] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+
+ break;
+
+ case 'delsig':
+
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ $sql_ary = array(
+ 'user_sig' => '',
+ 'user_sig_bbcode_uid' => '',
+ 'user_sig_bbcode_bitfield' => ''
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_USER_DEL_SIG', $user_row['username']);
+ add_log('user', $user_id, 'LOG_USER_DEL_SIG_USER');
+
+ trigger_error($user->lang['USER_ADMIN_SIG_REMOVED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+
+ break;
+
+ case 'delavatar':
+
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ $sql_ary = array(
+ 'user_avatar' => '',
+ 'user_avatar_type' => 0,
+ 'user_avatar_width' => 0,
+ 'user_avatar_height' => 0,
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
+
+ // Delete old avatar if present
+ if ($user_row['user_avatar'] && $user_row['user_avatar_type'] != AVATAR_GALLERY)
+ {
+ avatar_delete('user', $user_row);
+ }
+
+ add_log('admin', 'LOG_USER_DEL_AVATAR', $user_row['username']);
+ add_log('user', $user_id, 'LOG_USER_DEL_AVATAR_USER');
+
+ trigger_error($user->lang['USER_ADMIN_AVATAR_REMOVED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ break;
+
+ case 'delposts':
+
+ if (confirm_box(true))
+ {
+ // Delete posts, attachments, etc.
+ delete_posts('poster_id', $user_id);
+
+ add_log('admin', 'LOG_USER_DEL_POSTS', $user_row['username']);
+ trigger_error($user->lang['USER_POSTS_DELETED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'u' => $user_id,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ 'update' => true))
+ );
+ }
+
+ break;
+
+ case 'delattach':
+
+ if (confirm_box(true))
+ {
+ delete_attachments('user', $user_id);
+
+ add_log('admin', 'LOG_USER_DEL_ATTACH', $user_row['username']);
+ trigger_error($user->lang['USER_ATTACHMENTS_REMOVED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'u' => $user_id,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ 'update' => true))
+ );
+ }
+
+ break;
+
+ case 'deloutbox':
+
+ if (confirm_box(true))
+ {
+ $msg_ids = array();
+ $lang = 'EMPTY';
+
+ $sql = 'SELECT msg_id
+ FROM ' . PRIVMSGS_TO_TABLE . "
+ WHERE author_id = $user_id
+ AND folder_id = " . PRIVMSGS_OUTBOX;
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ if (!function_exists('delete_pm'))
+ {
+ include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
+ }
+
+ do
+ {
+ $msg_ids[] = (int) $row['msg_id'];
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ $db->sql_freeresult($result);
+
+ delete_pm($user_id, $msg_ids, PRIVMSGS_OUTBOX);
+
+ add_log('admin', 'LOG_USER_DEL_OUTBOX', $user_row['username']);
+
+ $lang = 'EMPTIED';
+ }
+ $db->sql_freeresult($result);
+
+ trigger_error($user->lang['USER_OUTBOX_' . $lang] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'u' => $user_id,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ 'update' => true))
+ );
+ }
+ break;
+
+ case 'moveposts':
+
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ $user->add_lang('acp/forums');
+
+ $new_forum_id = request_var('new_f', 0);
+
+ if (!$new_forum_id)
+ {
+ $this->page_title = 'USER_ADMIN_MOVE_POSTS';
+
+ $template->assign_vars(array(
+ 'S_SELECT_FORUM' => true,
+ 'U_ACTION' => $this->u_action . "&amp;action=$action&amp;u=$user_id",
+ 'U_BACK' => $this->u_action . "&amp;u=$user_id",
+ 'S_FORUM_OPTIONS' => make_forum_select(false, false, false, true))
+ );
+
+ return;
+ }
+
+ // Is the new forum postable to?
+ $sql = 'SELECT forum_name, forum_type
+ FROM ' . FORUMS_TABLE . "
+ WHERE forum_id = $new_forum_id";
+ $result = $db->sql_query($sql);
+ $forum_info = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$forum_info)
+ {
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ if ($forum_info['forum_type'] != FORUM_POST)
+ {
+ trigger_error($user->lang['MOVE_POSTS_NO_POSTABLE_FORUM'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ // Two stage?
+ // Move topics comprising only posts from this user
+ $topic_id_ary = $move_topic_ary = $move_post_ary = $new_topic_id_ary = array();
+ $forum_id_ary = array($new_forum_id);
+
+ $sql = 'SELECT topic_id, COUNT(post_id) AS total_posts
+ FROM ' . POSTS_TABLE . "
+ WHERE poster_id = $user_id
+ AND forum_id <> $new_forum_id
+ GROUP BY topic_id";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_id_ary[$row['topic_id']] = $row['total_posts'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($topic_id_ary))
+ {
+ $sql = 'SELECT topic_id, forum_id, topic_title, topic_replies, topic_replies_real, topic_attachment
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', array_keys($topic_id_ary));
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (max($row['topic_replies'], $row['topic_replies_real']) + 1 == $topic_id_ary[$row['topic_id']])
+ {
+ $move_topic_ary[] = $row['topic_id'];
+ }
+ else
+ {
+ $move_post_ary[$row['topic_id']]['title'] = $row['topic_title'];
+ $move_post_ary[$row['topic_id']]['attach'] = ($row['topic_attachment']) ? 1 : 0;
+ }
+
+ $forum_id_ary[] = $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ // Entire topic comprises posts by this user, move these topics
+ if (sizeof($move_topic_ary))
+ {
+ move_topics($move_topic_ary, $new_forum_id, false);
+ }
+
+ if (sizeof($move_post_ary))
+ {
+ // Create new topic
+ // Update post_ids, report_ids, attachment_ids
+ foreach ($move_post_ary as $topic_id => $post_ary)
+ {
+ // Create new topic
+ $sql = 'INSERT INTO ' . TOPICS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'topic_poster' => $user_id,
+ 'topic_time' => time(),
+ 'forum_id' => $new_forum_id,
+ 'icon_id' => 0,
+ 'topic_approved' => 1,
+ 'topic_title' => $post_ary['title'],
+ 'topic_first_poster_name' => $user_row['username'],
+ 'topic_type' => POST_NORMAL,
+ 'topic_time_limit' => 0,
+ 'topic_attachment' => $post_ary['attach'])
+ );
+ $db->sql_query($sql);
+
+ $new_topic_id = $db->sql_nextid();
+
+ // Move posts
+ $sql = 'UPDATE ' . POSTS_TABLE . "
+ SET forum_id = $new_forum_id, topic_id = $new_topic_id
+ WHERE topic_id = $topic_id
+ AND poster_id = $user_id";
+ $db->sql_query($sql);
+
+ if ($post_ary['attach'])
+ {
+ $sql = 'UPDATE ' . ATTACHMENTS_TABLE . "
+ SET topic_id = $new_topic_id
+ WHERE topic_id = $topic_id
+ AND poster_id = $user_id";
+ $db->sql_query($sql);
+ }
+
+ $new_topic_id_ary[] = $new_topic_id;
+ }
+ }
+
+ $forum_id_ary = array_unique($forum_id_ary);
+ $topic_id_ary = array_unique(array_merge(array_keys($topic_id_ary), $new_topic_id_ary));
+
+ if (sizeof($topic_id_ary))
+ {
+ sync('topic_reported', 'topic_id', $topic_id_ary);
+ sync('topic', 'topic_id', $topic_id_ary);
+ }
+
+ if (sizeof($forum_id_ary))
+ {
+ sync('forum', 'forum_id', $forum_id_ary, false, true);
+ }
+
+
+ add_log('admin', 'LOG_USER_MOVE_POSTS', $user_row['username'], $forum_info['forum_name']);
+ add_log('user', $user_id, 'LOG_USER_MOVE_POSTS_USER', $forum_info['forum_name']);
+
+ trigger_error($user->lang['USER_POSTS_MOVED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+
+ break;
+
+ case 'leave_nr':
+
+ if (confirm_box(true))
+ {
+ remove_newly_registered($user_id, $user_row);
+
+ add_log('admin', 'LOG_USER_REMOVED_NR', $user_row['username']);
+ trigger_error($user->lang['USER_LIFTED_NR'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'u' => $user_id,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ 'update' => true))
+ );
+ }
+
+ break;
+ }
+
+ // Handle registration info updates
+ $data = array(
+ 'username' => utf8_normalize_nfc(request_var('user', $user_row['username'], true)),
+ 'user_founder' => request_var('user_founder', ($user_row['user_type'] == USER_FOUNDER) ? 1 : 0),
+ 'email' => strtolower(request_var('user_email', $user_row['user_email'])),
+ 'email_confirm' => strtolower(request_var('email_confirm', '')),
+ 'new_password' => request_var('new_password', '', true),
+ 'password_confirm' => request_var('password_confirm', '', true),
+ );
+
+ // Validation data - we do not check the password complexity setting here
+ $check_ary = array(
+ 'new_password' => array(
+ array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
+ array('password')),
+ 'password_confirm' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
+ );
+
+ // Check username if altered
+ if ($data['username'] != $user_row['username'])
+ {
+ $check_ary += array(
+ 'username' => array(
+ array('string', false, $config['min_name_chars'], $config['max_name_chars']),
+ array('username', $user_row['username'])
+ ),
+ );
+ }
+
+ // Check email if altered
+ if ($data['email'] != $user_row['user_email'])
+ {
+ $check_ary += array(
+ 'email' => array(
+ array('string', false, 6, 60),
+ array('email', $user_row['user_email'])
+ ),
+ 'email_confirm' => array('string', true, 6, 60)
+ );
+ }
+
+ $error = validate_data($data, $check_ary);
+
+ if ($data['new_password'] && $data['password_confirm'] != $data['new_password'])
+ {
+ $error[] = 'NEW_PASSWORD_ERROR';
+ }
+
+ if ($data['email'] != $user_row['user_email'] && $data['email_confirm'] != $data['email'])
+ {
+ $error[] = 'NEW_EMAIL_ERROR';
+ }
+
+ if (!check_form_key($form_name))
+ {
+ $error[] = 'FORM_INVALID';
+ }
+
+ // Which updates do we need to do?
+ $update_username = ($user_row['username'] != $data['username']) ? $data['username'] : false;
+ $update_password = ($data['new_password'] && !phpbb_check_hash($user_row['user_password'], $data['new_password'])) ? true : false;
+ $update_email = ($data['email'] != $user_row['user_email']) ? $data['email'] : false;
+
+ if (!sizeof($error))
+ {
+ $sql_ary = array();
+
+ if ($user_row['user_type'] != USER_FOUNDER || $user->data['user_type'] == USER_FOUNDER)
+ {
+ // Only allow founders updating the founder status...
+ if ($user->data['user_type'] == USER_FOUNDER)
+ {
+ // Setting a normal member to be a founder
+ if ($data['user_founder'] && $user_row['user_type'] != USER_FOUNDER)
+ {
+ // Make sure the user is not setting an Inactive or ignored user to be a founder
+ if ($user_row['user_type'] == USER_IGNORE)
+ {
+ trigger_error($user->lang['CANNOT_SET_FOUNDER_IGNORED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ if ($user_row['user_type'] == USER_INACTIVE)
+ {
+ trigger_error($user->lang['CANNOT_SET_FOUNDER_INACTIVE'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ $sql_ary['user_type'] = USER_FOUNDER;
+ }
+ else if (!$data['user_founder'] && $user_row['user_type'] == USER_FOUNDER)
+ {
+ // Check if at least one founder is present
+ $sql = 'SELECT user_id
+ FROM ' . USERS_TABLE . '
+ WHERE user_type = ' . USER_FOUNDER . '
+ AND user_id <> ' . $user_id;
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ $sql_ary['user_type'] = USER_NORMAL;
+ }
+ else
+ {
+ trigger_error($user->lang['AT_LEAST_ONE_FOUNDER'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+ }
+ }
+ }
+
+ if ($update_username !== false)
+ {
+ $sql_ary['username'] = $update_username;
+ $sql_ary['username_clean'] = utf8_clean_string($update_username);
+
+ add_log('user', $user_id, 'LOG_USER_UPDATE_NAME', $user_row['username'], $update_username);
+ }
+
+ if ($update_email !== false)
+ {
+ $sql_ary += array(
+ 'user_email' => $update_email,
+ 'user_email_hash' => phpbb_email_hash($update_email),
+ );
+
+ add_log('user', $user_id, 'LOG_USER_UPDATE_EMAIL', $user_row['username'], $user_row['user_email'], $update_email);
+ }
+
+ if ($update_password)
+ {
+ $sql_ary += array(
+ 'user_password' => phpbb_hash($data['new_password']),
+ 'user_passchg' => time(),
+ 'user_pass_convert' => 0,
+ );
+
+ $user->reset_login_keys($user_id);
+ add_log('user', $user_id, 'LOG_USER_NEW_PASSWORD', $user_row['username']);
+ }
+
+ if (sizeof($sql_ary))
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . $user_id;
+ $db->sql_query($sql);
+ }
+
+ if ($update_username)
+ {
+ user_update_name($user_row['username'], $update_username);
+ }
+
+ // Let the users permissions being updated
+ $auth->acl_clear_prefetch($user_id);
+
+ add_log('admin', 'LOG_USER_USER_UPDATE', $data['username']);
+
+ trigger_error($user->lang['USER_OVERVIEW_UPDATED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ }
+
+ // Replace "error" strings with their real, localised form
+ $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ }
+
+ if ($user_id == $user->data['user_id'])
+ {
+ $quick_tool_ary = array('delsig' => 'DEL_SIG', 'delavatar' => 'DEL_AVATAR', 'moveposts' => 'MOVE_POSTS', 'delposts' => 'DEL_POSTS', 'delattach' => 'DEL_ATTACH', 'deloutbox' => 'DEL_OUTBOX');
+ if ($user_row['user_new'])
+ {
+ $quick_tool_ary['leave_nr'] = 'LEAVE_NR';
+ }
+ }
+ else
+ {
+ $quick_tool_ary = array();
+
+ if ($user_row['user_type'] != USER_FOUNDER)
+ {
+ $quick_tool_ary += array('banuser' => 'BAN_USER', 'banemail' => 'BAN_EMAIL', 'banip' => 'BAN_IP');
+ }
+
+ if ($user_row['user_type'] != USER_FOUNDER && $user_row['user_type'] != USER_IGNORE)
+ {
+ $quick_tool_ary += array('active' => (($user_row['user_type'] == USER_INACTIVE) ? 'ACTIVATE' : 'DEACTIVATE'));
+ }
+
+ $quick_tool_ary += array('delsig' => 'DEL_SIG', 'delavatar' => 'DEL_AVATAR', 'moveposts' => 'MOVE_POSTS', 'delposts' => 'DEL_POSTS', 'delattach' => 'DEL_ATTACH', 'deloutbox' => 'DEL_OUTBOX');
+
+ if ($config['email_enable'] && ($user_row['user_type'] == USER_NORMAL || $user_row['user_type'] == USER_INACTIVE))
+ {
+ $quick_tool_ary['reactivate'] = 'FORCE';
+ }
+
+ if ($user_row['user_new'])
+ {
+ $quick_tool_ary['leave_nr'] = 'LEAVE_NR';
+ }
+ }
+
+ $s_action_options = '<option class="sep" value="">' . $user->lang['SELECT_OPTION'] . '</option>';
+ foreach ($quick_tool_ary as $value => $lang)
+ {
+ $s_action_options .= '<option value="' . $value . '">' . $user->lang['USER_ADMIN_' . $lang] . '</option>';
+ }
+
+ if ($config['load_onlinetrack'])
+ {
+ $sql = 'SELECT MAX(session_time) AS session_time, MIN(session_viewonline) AS session_viewonline
+ FROM ' . SESSIONS_TABLE . "
+ WHERE session_user_id = $user_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $user_row['session_time'] = (isset($row['session_time'])) ? $row['session_time'] : 0;
+ $user_row['session_viewonline'] = (isset($row['session_viewonline'])) ? $row['session_viewonline'] : 0;
+ unset($row);
+ }
+
+ $last_visit = (!empty($user_row['session_time'])) ? $user_row['session_time'] : $user_row['user_lastvisit'];
+
+ $inactive_reason = '';
+ if ($user_row['user_type'] == USER_INACTIVE)
+ {
+ $inactive_reason = $user->lang['INACTIVE_REASON_UNKNOWN'];
+
+ switch ($user_row['user_inactive_reason'])
+ {
+ case INACTIVE_REGISTER:
+ $inactive_reason = $user->lang['INACTIVE_REASON_REGISTER'];
+ break;
+
+ case INACTIVE_PROFILE:
+ $inactive_reason = $user->lang['INACTIVE_REASON_PROFILE'];
+ break;
+
+ case INACTIVE_MANUAL:
+ $inactive_reason = $user->lang['INACTIVE_REASON_MANUAL'];
+ break;
+
+ case INACTIVE_REMIND:
+ $inactive_reason = $user->lang['INACTIVE_REASON_REMIND'];
+ break;
+ }
+ }
+
+ // Posts in Queue
+ $sql = 'SELECT COUNT(post_id) as posts_in_queue
+ FROM ' . POSTS_TABLE . '
+ WHERE poster_id = ' . $user_id . '
+ AND post_approved = 0';
+ $result = $db->sql_query($sql);
+ $user_row['posts_in_queue'] = (int) $db->sql_fetchfield('posts_in_queue');
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'L_NAME_CHARS_EXPLAIN' => sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
+ 'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
+ 'L_POSTS_IN_QUEUE' => $user->lang('NUM_POSTS_IN_QUEUE', $user_row['posts_in_queue']),
+ 'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
+
+ 'S_OVERVIEW' => true,
+ 'S_USER_IP' => ($user_row['user_ip']) ? true : false,
+ 'S_USER_FOUNDER' => ($user_row['user_type'] == USER_FOUNDER) ? true : false,
+ 'S_ACTION_OPTIONS' => $s_action_options,
+ 'S_OWN_ACCOUNT' => ($user_id == $user->data['user_id']) ? true : false,
+ 'S_USER_INACTIVE' => ($user_row['user_type'] == USER_INACTIVE) ? true : false,
+
+ 'U_SHOW_IP' => $this->u_action . "&amp;u=$user_id&amp;ip=" . (($ip == 'ip') ? 'hostname' : 'ip'),
+ 'U_WHOIS' => $this->u_action . "&amp;action=whois&amp;user_ip={$user_row['user_ip']}",
+ 'U_MCP_QUEUE' => ($auth->acl_getf_global('m_approve')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue', true, $user->session_id) : '',
+
+ 'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_row['user_id']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=switch_perm&amp;u={$user_row['user_id']}&amp;hash=" . generate_link_hash('switchperm')) : '',
+
+ 'POSTS_IN_QUEUE' => $user_row['posts_in_queue'],
+ 'USER' => $user_row['username'],
+ 'USER_REGISTERED' => $user->format_date($user_row['user_regdate']),
+ 'REGISTERED_IP' => ($ip == 'hostname') ? gethostbyaddr($user_row['user_ip']) : $user_row['user_ip'],
+ 'USER_LASTACTIVE' => ($last_visit) ? $user->format_date($last_visit) : ' - ',
+ 'USER_EMAIL' => $user_row['user_email'],
+ 'USER_WARNINGS' => $user_row['user_warnings'],
+ 'USER_POSTS' => $user_row['user_posts'],
+ 'USER_INACTIVE_REASON' => $inactive_reason,
+ ));
+
+ break;
+
+ case 'feedback':
+
+ $user->add_lang('mcp');
+
+ // Set up general vars
+ $start = request_var('start', 0);
+ $deletemark = (isset($_POST['delmarked'])) ? true : false;
+ $deleteall = (isset($_POST['delall'])) ? true : false;
+ $marked = request_var('mark', array(0));
+ $message = utf8_normalize_nfc(request_var('message', '', true));
+
+ // Sort keys
+ $sort_days = request_var('st', 0);
+ $sort_key = request_var('sk', 't');
+ $sort_dir = request_var('sd', 'd');
+
+ // Delete entries if requested and able
+ if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
+ {
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ $where_sql = '';
+ if ($deletemark && $marked)
+ {
+ $sql_in = array();
+ foreach ($marked as $mark)
+ {
+ $sql_in[] = $mark;
+ }
+ $where_sql = ' AND ' . $db->sql_in_set('log_id', $sql_in);
+ unset($sql_in);
+ }
+
+ if ($where_sql || $deleteall)
+ {
+ $sql = 'DELETE FROM ' . LOG_TABLE . '
+ WHERE log_type = ' . LOG_USERS . "
+ AND reportee_id = $user_id
+ $where_sql";
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_CLEAR_USER', $user_row['username']);
+ }
+ }
+
+ if ($submit && $message)
+ {
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ add_log('admin', 'LOG_USER_FEEDBACK', $user_row['username']);
+ add_log('mod', 0, 0, 'LOG_USER_FEEDBACK', $user_row['username']);
+ add_log('user', $user_id, 'LOG_USER_GENERAL', $message);
+
+ trigger_error($user->lang['USER_FEEDBACK_ADDED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ }
+
+ // Sorting
+ $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_text = array('u' => $user->lang['SORT_USERNAME'], 't' => $user->lang['SORT_DATE'], 'i' => $user->lang['SORT_IP'], 'o' => $user->lang['SORT_ACTION']);
+ $sort_by_sql = array('u' => 'u.username_clean', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation');
+
+ $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
+ gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
+
+ // Define where and sort sql for use in displaying logs
+ $sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0;
+ $sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
+
+ // Grab log data
+ $log_data = array();
+ $log_count = 0;
+ view_log('user', $log_data, $log_count, $config['topics_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort);
+
+ $template->assign_vars(array(
+ 'S_FEEDBACK' => true,
+ 'S_ON_PAGE' => on_page($log_count, $config['topics_per_page'], $start),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;u=$user_id&amp;$u_sort_param", $log_count, $config['topics_per_page'], $start, true),
+
+ 'S_LIMIT_DAYS' => $s_limit_days,
+ 'S_SORT_KEY' => $s_sort_key,
+ 'S_SORT_DIR' => $s_sort_dir,
+ 'S_CLEARLOGS' => $auth->acl_get('a_clearlogs'))
+ );
+
+ foreach ($log_data as $row)
+ {
+ $template->assign_block_vars('log', array(
+ 'USERNAME' => $row['username_full'],
+ 'IP' => $row['ip'],
+ 'DATE' => $user->format_date($row['time']),
+ 'ACTION' => nl2br($row['action']),
+ 'ID' => $row['id'])
+ );
+ }
+
+ break;
+
+ case 'warnings':
+ $user->add_lang('mcp');
+
+ // Set up general vars
+ $start = request_var('start', 0);
+ $deletemark = (isset($_POST['delmarked'])) ? true : false;
+ $deleteall = (isset($_POST['delall'])) ? true : false;
+ $confirm = (isset($_POST['confirm'])) ? true : false;
+ $marked = request_var('mark', array(0));
+ $message = utf8_normalize_nfc(request_var('message', '', true));
+
+ // Sort keys
+ $sort_days = request_var('st', 0);
+ $sort_key = request_var('sk', 't');
+ $sort_dir = request_var('sd', 'd');
+
+ // Delete entries if requested and able
+ if ($deletemark || $deleteall || $confirm)
+ {
+ if (confirm_box(true))
+ {
+ $where_sql = '';
+ $deletemark = request_var('delmarked', 0);
+ $deleteall = request_var('delall', 0);
+ if ($deletemark && $marked)
+ {
+ $where_sql = ' AND ' . $db->sql_in_set('warning_id', array_values($marked));
+ }
+
+ if ($where_sql || $deleteall)
+ {
+ $sql = 'DELETE FROM ' . WARNINGS_TABLE . "
+ WHERE user_id = $user_id
+ $where_sql";
+ $db->sql_query($sql);
+
+ if ($deleteall)
+ {
+ $log_warnings = $deleted_warnings = 0;
+ }
+ else
+ {
+ $num_warnings = (int) $db->sql_affectedrows();
+ $deleted_warnings = ' user_warnings - ' . $num_warnings;
+ $log_warnings = ($num_warnings > 2) ? 2 : $num_warnings;
+ }
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_warnings = $deleted_warnings
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
+
+ switch ($log_warnings)
+ {
+ case 2:
+ add_log('admin', 'LOG_WARNINGS_DELETED', $user_row['username'], $num_warnings);
+ break;
+ case 1:
+ add_log('admin', 'LOG_WARNING_DELETED', $user_row['username']);
+ break;
+ default:
+ add_log('admin', 'LOG_WARNINGS_DELETED_ALL', $user_row['username']);
+ break;
+ }
+ }
+ }
+ else
+ {
+ $s_hidden_fields = array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'u' => $user_id,
+ 'mark' => $marked,
+ );
+ if (isset($_POST['delmarked']))
+ {
+ $s_hidden_fields['delmarked'] = 1;
+ }
+ if (isset($_POST['delall']))
+ {
+ $s_hidden_fields['delall'] = 1;
+ }
+ if (isset($_POST['delall']) || (isset($_POST['delmarked']) && sizeof($marked)))
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($s_hidden_fields));
+ }
+ }
+ }
+
+ $sql = 'SELECT w.warning_id, w.warning_time, w.post_id, l.log_operation, l.log_data, l.user_id AS mod_user_id, m.username AS mod_username, m.user_colour AS mod_user_colour
+ FROM ' . WARNINGS_TABLE . ' w
+ LEFT JOIN ' . LOG_TABLE . ' l
+ ON (w.log_id = l.log_id)
+ LEFT JOIN ' . USERS_TABLE . ' m
+ ON (l.user_id = m.user_id)
+ WHERE w.user_id = ' . $user_id . '
+ ORDER BY w.warning_time DESC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!$row['log_operation'])
+ {
+ // We do not have a log-entry anymore, so there is no data available
+ $row['action'] = $user->lang['USER_WARNING_LOG_DELETED'];
+ }
+ else
+ {
+ $row['action'] = (isset($user->lang[$row['log_operation']])) ? $user->lang[$row['log_operation']] : '{' . ucfirst(str_replace('_', ' ', $row['log_operation'])) . '}';
+ if (!empty($row['log_data']))
+ {
+ $log_data_ary = @unserialize($row['log_data']);
+ $log_data_ary = ($log_data_ary === false) ? array() : $log_data_ary;
+
+ if (isset($user->lang[$row['log_operation']]))
+ {
+ // Check if there are more occurrences of % than arguments, if there are we fill out the arguments array
+ // It doesn't matter if we add more arguments than placeholders
+ if ((substr_count($row['action'], '%') - sizeof($log_data_ary)) > 0)
+ {
+ $log_data_ary = array_merge($log_data_ary, array_fill(0, substr_count($row['action'], '%') - sizeof($log_data_ary), ''));
+ }
+ $row['action'] = vsprintf($row['action'], $log_data_ary);
+ $row['action'] = bbcode_nl2br(censor_text($row['action']));
+ }
+ else if (!empty($log_data_ary))
+ {
+ $row['action'] .= '<br />' . implode('', $log_data_ary);
+ }
+ }
+ }
+
+
+ $template->assign_block_vars('warn', array(
+ 'ID' => $row['warning_id'],
+ 'USERNAME' => ($row['log_operation']) ? get_username_string('full', $row['mod_user_id'], $row['mod_username'], $row['mod_user_colour']) : '-',
+ 'ACTION' => make_clickable($row['action']),
+ 'DATE' => $user->format_date($row['warning_time']),
+ ));
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'S_WARNINGS' => true,
+ ));
+
+ break;
+
+ case 'profile':
+
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
+
+ $cp = new custom_profile();
+
+ $cp_data = $cp_error = array();
+
+ $sql = 'SELECT lang_id
+ FROM ' . LANG_TABLE . "
+ WHERE lang_iso = '" . $db->sql_escape($user->data['user_lang']) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $user_row['iso_lang_id'] = $row['lang_id'];
+
+ $data = array(
+ 'icq' => request_var('icq', $user_row['user_icq']),
+ 'aim' => request_var('aim', $user_row['user_aim']),
+ 'msn' => request_var('msn', $user_row['user_msnm']),
+ 'yim' => request_var('yim', $user_row['user_yim']),
+ 'jabber' => utf8_normalize_nfc(request_var('jabber', $user_row['user_jabber'], true)),
+ 'website' => request_var('website', $user_row['user_website']),
+ 'location' => utf8_normalize_nfc(request_var('location', $user_row['user_from'], true)),
+ 'occupation' => utf8_normalize_nfc(request_var('occupation', $user_row['user_occ'], true)),
+ 'interests' => utf8_normalize_nfc(request_var('interests', $user_row['user_interests'], true)),
+ 'bday_day' => 0,
+ 'bday_month' => 0,
+ 'bday_year' => 0,
+ );
+
+ if ($user_row['user_birthday'])
+ {
+ list($data['bday_day'], $data['bday_month'], $data['bday_year']) = explode('-', $user_row['user_birthday']);
+ }
+
+ $data['bday_day'] = request_var('bday_day', $data['bday_day']);
+ $data['bday_month'] = request_var('bday_month', $data['bday_month']);
+ $data['bday_year'] = request_var('bday_year', $data['bday_year']);
+ $data['user_birthday'] = sprintf('%2d-%2d-%4d', $data['bday_day'], $data['bday_month'], $data['bday_year']);
+
+
+ if ($submit)
+ {
+ $error = validate_data($data, array(
+ 'icq' => array(
+ array('string', true, 3, 15),
+ array('match', true, '#^[0-9]+$#i')),
+ 'aim' => array('string', true, 3, 255),
+ 'msn' => array('string', true, 5, 255),
+ 'jabber' => array(
+ array('string', true, 5, 255),
+ array('jabber')),
+ 'yim' => array('string', true, 5, 255),
+ 'website' => array(
+ array('string', true, 12, 255),
+ array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
+ 'location' => array('string', true, 2, 100),
+ 'occupation' => array('string', true, 2, 500),
+ 'interests' => array('string', true, 2, 500),
+ 'bday_day' => array('num', true, 1, 31),
+ 'bday_month' => array('num', true, 1, 12),
+ 'bday_year' => array('num', true, 1901, gmdate('Y', time())),
+ 'user_birthday' => array('date', true),
+ ));
+
+ // validate custom profile fields
+ $cp->submit_cp_field('profile', $user_row['iso_lang_id'], $cp_data, $cp_error);
+
+ if (sizeof($cp_error))
+ {
+ $error = array_merge($error, $cp_error);
+ }
+ if (!check_form_key($form_name))
+ {
+ $error[] = 'FORM_INVALID';
+ }
+
+ if (!sizeof($error))
+ {
+ $sql_ary = array(
+ 'user_icq' => $data['icq'],
+ 'user_aim' => $data['aim'],
+ 'user_msnm' => $data['msn'],
+ 'user_yim' => $data['yim'],
+ 'user_jabber' => $data['jabber'],
+ 'user_website' => $data['website'],
+ 'user_from' => $data['location'],
+ 'user_occ' => $data['occupation'],
+ 'user_interests'=> $data['interests'],
+ 'user_birthday' => $data['user_birthday'],
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
+
+ // Update Custom Fields
+ $cp->update_profile_field_data($user_id, $cp_data);
+
+ trigger_error($user->lang['USER_PROFILE_UPDATED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ }
+
+ // Replace "error" strings with their real, localised form
+ $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ }
+
+ $s_birthday_day_options = '<option value="0"' . ((!$data['bday_day']) ? ' selected="selected"' : '') . '>--</option>';
+ for ($i = 1; $i < 32; $i++)
+ {
+ $selected = ($i == $data['bday_day']) ? ' selected="selected"' : '';
+ $s_birthday_day_options .= "<option value=\"$i\"$selected>$i</option>";
+ }
+
+ $s_birthday_month_options = '<option value="0"' . ((!$data['bday_month']) ? ' selected="selected"' : '') . '>--</option>';
+ for ($i = 1; $i < 13; $i++)
+ {
+ $selected = ($i == $data['bday_month']) ? ' selected="selected"' : '';
+ $s_birthday_month_options .= "<option value=\"$i\"$selected>$i</option>";
+ }
+ $s_birthday_year_options = '';
+
+ $now = getdate();
+ $s_birthday_year_options = '<option value="0"' . ((!$data['bday_year']) ? ' selected="selected"' : '') . '>--</option>';
+ for ($i = $now['year'] - 100; $i < $now['year']; $i++)
+ {
+ $selected = ($i == $data['bday_year']) ? ' selected="selected"' : '';
+ $s_birthday_year_options .= "<option value=\"$i\"$selected>$i</option>";
+ }
+ unset($now);
+
+ $template->assign_vars(array(
+ 'ICQ' => $data['icq'],
+ 'YIM' => $data['yim'],
+ 'AIM' => $data['aim'],
+ 'MSN' => $data['msn'],
+ 'JABBER' => $data['jabber'],
+ 'WEBSITE' => $data['website'],
+ 'LOCATION' => $data['location'],
+ 'OCCUPATION' => $data['occupation'],
+ 'INTERESTS' => $data['interests'],
+
+ 'S_BIRTHDAY_DAY_OPTIONS' => $s_birthday_day_options,
+ 'S_BIRTHDAY_MONTH_OPTIONS' => $s_birthday_month_options,
+ 'S_BIRTHDAY_YEAR_OPTIONS' => $s_birthday_year_options,
+
+ 'S_PROFILE' => true)
+ );
+
+ // Get additional profile fields and assign them to the template block var 'profile_fields'
+ $user->get_profile_fields($user_id);
+
+ $cp->generate_profile_fields('profile', $user_row['iso_lang_id']);
+
+ break;
+
+ case 'prefs':
+
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ $data = array(
+ 'dateformat' => utf8_normalize_nfc(request_var('dateformat', $user_row['user_dateformat'], true)),
+ 'lang' => basename(request_var('lang', $user_row['user_lang'])),
+ 'tz' => request_var('tz', (float) $user_row['user_timezone']),
+ 'style' => request_var('style', $user_row['user_style']),
+ 'dst' => request_var('dst', $user_row['user_dst']),
+ 'viewemail' => request_var('viewemail', $user_row['user_allow_viewemail']),
+ 'massemail' => request_var('massemail', $user_row['user_allow_massemail']),
+ 'hideonline' => request_var('hideonline', !$user_row['user_allow_viewonline']),
+ 'notifymethod' => request_var('notifymethod', $user_row['user_notify_type']),
+ 'notifypm' => request_var('notifypm', $user_row['user_notify_pm']),
+ 'popuppm' => request_var('popuppm', $this->optionget($user_row, 'popuppm')),
+ 'allowpm' => request_var('allowpm', $user_row['user_allow_pm']),
+
+ 'topic_sk' => request_var('topic_sk', ($user_row['user_topic_sortby_type']) ? $user_row['user_topic_sortby_type'] : 't'),
+ 'topic_sd' => request_var('topic_sd', ($user_row['user_topic_sortby_dir']) ? $user_row['user_topic_sortby_dir'] : 'd'),
+ 'topic_st' => request_var('topic_st', ($user_row['user_topic_show_days']) ? $user_row['user_topic_show_days'] : 0),
+
+ 'post_sk' => request_var('post_sk', ($user_row['user_post_sortby_type']) ? $user_row['user_post_sortby_type'] : 't'),
+ 'post_sd' => request_var('post_sd', ($user_row['user_post_sortby_dir']) ? $user_row['user_post_sortby_dir'] : 'a'),
+ 'post_st' => request_var('post_st', ($user_row['user_post_show_days']) ? $user_row['user_post_show_days'] : 0),
+
+ 'view_images' => request_var('view_images', $this->optionget($user_row, 'viewimg')),
+ 'view_flash' => request_var('view_flash', $this->optionget($user_row, 'viewflash')),
+ 'view_smilies' => request_var('view_smilies', $this->optionget($user_row, 'viewsmilies')),
+ 'view_sigs' => request_var('view_sigs', $this->optionget($user_row, 'viewsigs')),
+ 'view_avatars' => request_var('view_avatars', $this->optionget($user_row, 'viewavatars')),
+ 'view_wordcensor' => request_var('view_wordcensor', $this->optionget($user_row, 'viewcensors')),
+
+ 'bbcode' => request_var('bbcode', $this->optionget($user_row, 'bbcode')),
+ 'smilies' => request_var('smilies', $this->optionget($user_row, 'smilies')),
+ 'sig' => request_var('sig', $this->optionget($user_row, 'attachsig')),
+ 'notify' => request_var('notify', $user_row['user_notify']),
+ );
+
+ if ($submit)
+ {
+ $error = validate_data($data, array(
+ 'dateformat' => array('string', false, 1, 30),
+ 'lang' => array('match', false, '#^[a-z_\-]{2,}$#i'),
+ 'tz' => array('num', false, -14, 14),
+
+ 'topic_sk' => array('string', false, 1, 1),
+ 'topic_sd' => array('string', false, 1, 1),
+ 'post_sk' => array('string', false, 1, 1),
+ 'post_sd' => array('string', false, 1, 1),
+ ));
+
+ if (!check_form_key($form_name))
+ {
+ $error[] = 'FORM_INVALID';
+ }
+
+ if (!sizeof($error))
+ {
+ $this->optionset($user_row, 'popuppm', $data['popuppm']);
+ $this->optionset($user_row, 'viewimg', $data['view_images']);
+ $this->optionset($user_row, 'viewflash', $data['view_flash']);
+ $this->optionset($user_row, 'viewsmilies', $data['view_smilies']);
+ $this->optionset($user_row, 'viewsigs', $data['view_sigs']);
+ $this->optionset($user_row, 'viewavatars', $data['view_avatars']);
+ $this->optionset($user_row, 'viewcensors', $data['view_wordcensor']);
+ $this->optionset($user_row, 'bbcode', $data['bbcode']);
+ $this->optionset($user_row, 'smilies', $data['smilies']);
+ $this->optionset($user_row, 'attachsig', $data['sig']);
+
+ $sql_ary = array(
+ 'user_options' => $user_row['user_options'],
+
+ 'user_allow_pm' => $data['allowpm'],
+ 'user_allow_viewemail' => $data['viewemail'],
+ 'user_allow_massemail' => $data['massemail'],
+ 'user_allow_viewonline' => !$data['hideonline'],
+ 'user_notify_type' => $data['notifymethod'],
+ 'user_notify_pm' => $data['notifypm'],
+
+ 'user_dst' => $data['dst'],
+ 'user_dateformat' => $data['dateformat'],
+ 'user_lang' => $data['lang'],
+ 'user_timezone' => $data['tz'],
+ 'user_style' => $data['style'],
+
+ 'user_topic_sortby_type' => $data['topic_sk'],
+ 'user_post_sortby_type' => $data['post_sk'],
+ 'user_topic_sortby_dir' => $data['topic_sd'],
+ 'user_post_sortby_dir' => $data['post_sd'],
+
+ 'user_topic_show_days' => $data['topic_st'],
+ 'user_post_show_days' => $data['post_st'],
+
+ 'user_notify' => $data['notify'],
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
+
+ trigger_error($user->lang['USER_PREFS_UPDATED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ }
+
+ // Replace "error" strings with their real, localised form
+ $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ }
+
+ $dateformat_options = '';
+ foreach ($user->lang['dateformats'] as $format => $null)
+ {
+ $dateformat_options .= '<option value="' . $format . '"' . (($format == $data['dateformat']) ? ' selected="selected"' : '') . '>';
+ $dateformat_options .= $user->format_date(time(), $format, false) . ((strpos($format, '|') !== false) ? $user->lang['VARIANT_DATE_SEPARATOR'] . $user->format_date(time(), $format, true) : '');
+ $dateformat_options .= '</option>';
+ }
+
+ $s_custom = false;
+
+ $dateformat_options .= '<option value="custom"';
+ if (!isset($user->lang['dateformats'][$data['dateformat']]))
+ {
+ $dateformat_options .= ' selected="selected"';
+ $s_custom = true;
+ }
+ $dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
+
+ $sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
+
+ // Topic ordering options
+ $limit_topic_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_topic_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']);
+
+ // Post ordering options
+ $limit_post_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_post_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']);
+
+ $_options = array('topic', 'post');
+ foreach ($_options as $sort_option)
+ {
+ ${'s_limit_' . $sort_option . '_days'} = '<select name="' . $sort_option . '_st">';
+ foreach (${'limit_' . $sort_option . '_days'} as $day => $text)
+ {
+ $selected = ($data[$sort_option . '_st'] == $day) ? ' selected="selected"' : '';
+ ${'s_limit_' . $sort_option . '_days'} .= '<option value="' . $day . '"' . $selected . '>' . $text . '</option>';
+ }
+ ${'s_limit_' . $sort_option . '_days'} .= '</select>';
+
+ ${'s_sort_' . $sort_option . '_key'} = '<select name="' . $sort_option . '_sk">';
+ foreach (${'sort_by_' . $sort_option . '_text'} as $key => $text)
+ {
+ $selected = ($data[$sort_option . '_sk'] == $key) ? ' selected="selected"' : '';
+ ${'s_sort_' . $sort_option . '_key'} .= '<option value="' . $key . '"' . $selected . '>' . $text . '</option>';
+ }
+ ${'s_sort_' . $sort_option . '_key'} .= '</select>';
+
+ ${'s_sort_' . $sort_option . '_dir'} = '<select name="' . $sort_option . '_sd">';
+ foreach ($sort_dir_text as $key => $value)
+ {
+ $selected = ($data[$sort_option . '_sd'] == $key) ? ' selected="selected"' : '';
+ ${'s_sort_' . $sort_option . '_dir'} .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
+ }
+ ${'s_sort_' . $sort_option . '_dir'} .= '</select>';
+ }
+
+ $template->assign_vars(array(
+ 'S_PREFS' => true,
+ 'S_JABBER_DISABLED' => ($config['jab_enable'] && $user_row['user_jabber'] && @extension_loaded('xml')) ? false : true,
+
+ 'VIEW_EMAIL' => $data['viewemail'],
+ 'MASS_EMAIL' => $data['massemail'],
+ 'ALLOW_PM' => $data['allowpm'],
+ 'HIDE_ONLINE' => $data['hideonline'],
+ 'NOTIFY_EMAIL' => ($data['notifymethod'] == NOTIFY_EMAIL) ? true : false,
+ 'NOTIFY_IM' => ($data['notifymethod'] == NOTIFY_IM) ? true : false,
+ 'NOTIFY_BOTH' => ($data['notifymethod'] == NOTIFY_BOTH) ? true : false,
+ 'NOTIFY_PM' => $data['notifypm'],
+ 'POPUP_PM' => $data['popuppm'],
+ 'DST' => $data['dst'],
+ 'BBCODE' => $data['bbcode'],
+ 'SMILIES' => $data['smilies'],
+ 'ATTACH_SIG' => $data['sig'],
+ 'NOTIFY' => $data['notify'],
+ 'VIEW_IMAGES' => $data['view_images'],
+ 'VIEW_FLASH' => $data['view_flash'],
+ 'VIEW_SMILIES' => $data['view_smilies'],
+ 'VIEW_SIGS' => $data['view_sigs'],
+ 'VIEW_AVATARS' => $data['view_avatars'],
+ 'VIEW_WORDCENSOR' => $data['view_wordcensor'],
+
+ 'S_TOPIC_SORT_DAYS' => $s_limit_topic_days,
+ 'S_TOPIC_SORT_KEY' => $s_sort_topic_key,
+ 'S_TOPIC_SORT_DIR' => $s_sort_topic_dir,
+ 'S_POST_SORT_DAYS' => $s_limit_post_days,
+ 'S_POST_SORT_KEY' => $s_sort_post_key,
+ 'S_POST_SORT_DIR' => $s_sort_post_dir,
+
+ 'DATE_FORMAT' => $data['dateformat'],
+ 'S_DATEFORMAT_OPTIONS' => $dateformat_options,
+ 'S_CUSTOM_DATEFORMAT' => $s_custom,
+ 'DEFAULT_DATEFORMAT' => $config['default_dateformat'],
+ 'A_DEFAULT_DATEFORMAT' => addslashes($config['default_dateformat']),
+
+ 'S_LANG_OPTIONS' => language_select($data['lang']),
+ 'S_STYLE_OPTIONS' => style_select($data['style']),
+ 'S_TZ_OPTIONS' => tz_select($data['tz'], true),
+ )
+ );
+
+ break;
+
+ case 'avatar':
+
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false;
+
+ if ($submit)
+ {
+
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ if (avatar_process_user($error, $user_row))
+ {
+ trigger_error($user->lang['USER_AVATAR_UPDATED'] . adm_back_link($this->u_action . '&amp;u=' . $user_row['user_id']));
+ }
+
+ // Replace "error" strings with their real, localised form
+ $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ }
+
+ if (!$config['allow_avatar'] && $user_row['user_avatar_type'])
+ {
+ $error[] = $user->lang['USER_AVATAR_NOT_ALLOWED'];
+ }
+ else if ((($user_row['user_avatar_type'] == AVATAR_UPLOAD) && !$config['allow_avatar_upload']) ||
+ (($user_row['user_avatar_type'] == AVATAR_REMOTE) && !$config['allow_avatar_remote']) ||
+ (($user_row['user_avatar_type'] == AVATAR_GALLERY) && !$config['allow_avatar_local']))
+ {
+ $error[] = $user->lang['USER_AVATAR_TYPE_NOT_ALLOWED'];
+ }
+
+ // Generate users avatar
+ $avatar_img = ($user_row['user_avatar']) ? get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height'], 'USER_AVATAR', true) : '<img src="' . $phpbb_admin_path . 'images/no_avatar.gif" alt="" />';
+
+ $display_gallery = (isset($_POST['display_gallery'])) ? true : false;
+ $avatar_select = basename(request_var('avatar_select', ''));
+ $category = basename(request_var('category', ''));
+
+ if ($config['allow_avatar_local'] && $display_gallery)
+ {
+ avatar_gallery($category, $avatar_select, 4);
+ }
+
+ $template->assign_vars(array(
+ 'S_AVATAR' => true,
+ 'S_CAN_UPLOAD' => $can_upload,
+ 'S_UPLOAD_FILE' => ($config['allow_avatar'] && $can_upload && $config['allow_avatar_upload']) ? true : false,
+ 'S_REMOTE_UPLOAD' => ($config['allow_avatar'] && $can_upload && $config['allow_avatar_remote_upload']) ? true : false,
+ 'S_ALLOW_REMOTE' => ($config['allow_avatar'] && $config['allow_avatar_remote']) ? true : false,
+ 'S_DISPLAY_GALLERY' => ($config['allow_avatar'] && $config['allow_avatar_local'] && !$display_gallery) ? true : false,
+ 'S_IN_GALLERY' => ($config['allow_avatar'] && $config['allow_avatar_local'] && $display_gallery) ? true : false,
+
+ 'AVATAR_IMAGE' => $avatar_img,
+ 'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'],
+ 'USER_AVATAR_WIDTH' => $user_row['user_avatar_width'],
+ 'USER_AVATAR_HEIGHT' => $user_row['user_avatar_height'],
+
+ 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)))
+ );
+
+ break;
+
+ case 'rank':
+
+ if ($submit)
+ {
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ $rank_id = request_var('user_rank', 0);
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_rank = $rank_id
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
+
+ trigger_error($user->lang['USER_RANK_UPDATED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ }
+
+ $sql = 'SELECT *
+ FROM ' . RANKS_TABLE . '
+ WHERE rank_special = 1
+ ORDER BY rank_title';
+ $result = $db->sql_query($sql);
+
+ $s_rank_options = '<option value="0"' . ((!$user_row['user_rank']) ? ' selected="selected"' : '') . '>' . $user->lang['NO_SPECIAL_RANK'] . '</option>';
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $selected = ($user_row['user_rank'] && $row['rank_id'] == $user_row['user_rank']) ? ' selected="selected"' : '';
+ $s_rank_options .= '<option value="' . $row['rank_id'] . '"' . $selected . '>' . $row['rank_title'] . '</option>';
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'S_RANK' => true,
+ 'S_RANK_OPTIONS' => $s_rank_options)
+ );
+
+ break;
+
+ case 'sig':
+
+ include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+ include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+
+ $enable_bbcode = ($config['allow_sig_bbcode']) ? (bool) $this->optionget($user_row, 'sig_bbcode') : false;
+ $enable_smilies = ($config['allow_sig_smilies']) ? (bool) $this->optionget($user_row, 'sig_smilies') : false;
+ $enable_urls = ($config['allow_sig_links']) ? (bool) $this->optionget($user_row, 'sig_links') : false;
+ $signature = utf8_normalize_nfc(request_var('signature', (string) $user_row['user_sig'], true));
+
+ $preview = (isset($_POST['preview'])) ? true : false;
+
+ if ($submit || $preview)
+ {
+ include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx);
+
+ $enable_bbcode = ($config['allow_sig_bbcode']) ? ((request_var('disable_bbcode', false)) ? false : true) : false;
+ $enable_smilies = ($config['allow_sig_smilies']) ? ((request_var('disable_smilies', false)) ? false : true) : false;
+ $enable_urls = ($config['allow_sig_links']) ? ((request_var('disable_magic_url', false)) ? false : true) : false;
+
+ $message_parser = new parse_message($signature);
+
+ // Allowing Quote BBCode
+ $message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig');
+
+ if (sizeof($message_parser->warn_msg))
+ {
+ $error[] = implode('<br />', $message_parser->warn_msg);
+ }
+
+ if (!check_form_key($form_name))
+ {
+ $error = 'FORM_INVALID';
+ }
+
+ if (!sizeof($error) && $submit)
+ {
+ $this->optionset($user_row, 'sig_bbcode', $enable_bbcode);
+ $this->optionset($user_row, 'sig_smilies', $enable_smilies);
+ $this->optionset($user_row, 'sig_links', $enable_urls);
+
+ $sql_ary = array(
+ 'user_sig' => (string) $message_parser->message,
+ 'user_options' => $user_row['user_options'],
+ 'user_sig_bbcode_uid' => (string) $message_parser->bbcode_uid,
+ 'user_sig_bbcode_bitfield' => (string) $message_parser->bbcode_bitfield
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . $user_id;
+ $db->sql_query($sql);
+
+ trigger_error($user->lang['USER_SIG_UPDATED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ }
+
+ // Replace "error" strings with their real, localised form
+ $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ }
+
+ $signature_preview = '';
+
+ if ($preview)
+ {
+ // Now parse it for displaying
+ $signature_preview = $message_parser->format_display($enable_bbcode, $enable_urls, $enable_smilies, false);
+ unset($message_parser);
+ }
+
+ decode_message($signature, $user_row['user_sig_bbcode_uid']);
+
+ $template->assign_vars(array(
+ 'S_SIGNATURE' => true,
+
+ 'SIGNATURE' => $signature,
+ 'SIGNATURE_PREVIEW' => $signature_preview,
+
+ 'S_BBCODE_CHECKED' => (!$enable_bbcode) ? ' checked="checked"' : '',
+ 'S_SMILIES_CHECKED' => (!$enable_smilies) ? ' checked="checked"' : '',
+ 'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? ' checked="checked"' : '',
+
+ 'BBCODE_STATUS' => ($config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>'),
+ 'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
+ 'IMG_STATUS' => ($config['allow_sig_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
+ 'FLASH_STATUS' => ($config['allow_sig_flash']) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
+ 'URL_STATUS' => ($config['allow_sig_links']) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
+
+ 'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']),
+
+ 'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
+ 'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],
+ 'S_BBCODE_IMG' => ($config['allow_sig_img']) ? true : false,
+ 'S_BBCODE_FLASH' => ($config['allow_sig_flash']) ? true : false,
+ 'S_LINKS_ALLOWED' => ($config['allow_sig_links']) ? true : false)
+ );
+
+ // Assigning custom bbcodes
+ display_custom_bbcodes();
+
+ break;
+
+ case 'attach':
+
+ $start = request_var('start', 0);
+ $deletemark = (isset($_POST['delmarked'])) ? true : false;
+ $marked = request_var('mark', array(0));
+
+ // Sort keys
+ $sort_key = request_var('sk', 'a');
+ $sort_dir = request_var('sd', 'd');
+
+ if ($deletemark && sizeof($marked))
+ {
+ $sql = 'SELECT attach_id
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE poster_id = ' . $user_id . '
+ AND is_orphan = 0
+ AND ' . $db->sql_in_set('attach_id', $marked);
+ $result = $db->sql_query($sql);
+
+ $marked = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $marked[] = $row['attach_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if ($deletemark && sizeof($marked))
+ {
+ if (confirm_box(true))
+ {
+ $sql = 'SELECT real_filename
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('attach_id', $marked);
+ $result = $db->sql_query($sql);
+
+ $log_attachments = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $log_attachments[] = $row['real_filename'];
+ }
+ $db->sql_freeresult($result);
+
+ delete_attachments('attach', $marked);
+
+ $message = (sizeof($log_attachments) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED'];
+
+ add_log('admin', 'LOG_ATTACHMENTS_DELETED', implode(', ', $log_attachments));
+ trigger_error($message . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'u' => $user_id,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ 'delmarked' => true,
+ 'mark' => $marked))
+ );
+ }
+ }
+
+ $sk_text = array('a' => $user->lang['SORT_FILENAME'], 'c' => $user->lang['SORT_EXTENSION'], 'd' => $user->lang['SORT_SIZE'], 'e' => $user->lang['SORT_DOWNLOADS'], 'f' => $user->lang['SORT_POST_TIME'], 'g' => $user->lang['SORT_TOPIC_TITLE']);
+ $sk_sql = array('a' => 'a.real_filename', 'c' => 'a.extension', 'd' => 'a.filesize', 'e' => 'a.download_count', 'f' => 'a.filetime', 'g' => 't.topic_title');
+
+ $sd_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
+
+ $s_sort_key = '';
+ foreach ($sk_text as $key => $value)
+ {
+ $selected = ($sort_key == $key) ? ' selected="selected"' : '';
+ $s_sort_key .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
+ }
+
+ $s_sort_dir = '';
+ foreach ($sd_text as $key => $value)
+ {
+ $selected = ($sort_dir == $key) ? ' selected="selected"' : '';
+ $s_sort_dir .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
+ }
+
+ if (!isset($sk_sql[$sort_key]))
+ {
+ $sort_key = 'a';
+ }
+
+ $order_by = $sk_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
+
+ $sql = 'SELECT COUNT(attach_id) as num_attachments
+ FROM ' . ATTACHMENTS_TABLE . "
+ WHERE poster_id = $user_id
+ AND is_orphan = 0";
+ $result = $db->sql_query_limit($sql, 1);
+ $num_attachments = (int) $db->sql_fetchfield('num_attachments');
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT a.*, t.topic_title, p.message_subject as message_title
+ FROM ' . ATTACHMENTS_TABLE . ' a
+ LEFT JOIN ' . TOPICS_TABLE . ' t ON (a.topic_id = t.topic_id
+ AND a.in_message = 0)
+ LEFT JOIN ' . PRIVMSGS_TABLE . ' p ON (a.post_msg_id = p.msg_id
+ AND a.in_message = 1)
+ WHERE a.poster_id = ' . $user_id . "
+ AND a.is_orphan = 0
+ ORDER BY $order_by";
+ $result = $db->sql_query_limit($sql, $config['posts_per_page'], $start);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['in_message'])
+ {
+ $view_topic = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&amp;p={$row['post_msg_id']}");
+ }
+ else
+ {
+ $view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_id']}&amp;p={$row['post_msg_id']}") . '#p' . $row['post_msg_id'];
+ }
+
+ $template->assign_block_vars('attach', array(
+ 'REAL_FILENAME' => $row['real_filename'],
+ 'COMMENT' => nl2br($row['attach_comment']),
+ 'EXTENSION' => $row['extension'],
+ 'SIZE' => get_formatted_filesize($row['filesize']),
+ 'DOWNLOAD_COUNT' => $row['download_count'],
+ 'POST_TIME' => $user->format_date($row['filetime']),
+ 'TOPIC_TITLE' => ($row['in_message']) ? $row['message_title'] : $row['topic_title'],
+
+ 'ATTACH_ID' => $row['attach_id'],
+ 'POST_ID' => $row['post_msg_id'],
+ 'TOPIC_ID' => $row['topic_id'],
+
+ 'S_IN_MESSAGE' => $row['in_message'],
+
+ 'U_DOWNLOAD' => append_sid("{$phpbb_root_path}download/file.$phpEx", 'mode=view&amp;id=' . $row['attach_id']),
+ 'U_VIEW_TOPIC' => $view_topic)
+ );
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'S_ATTACHMENTS' => true,
+ 'S_ON_PAGE' => on_page($num_attachments, $config['topics_per_page'], $start),
+ 'S_SORT_KEY' => $s_sort_key,
+ 'S_SORT_DIR' => $s_sort_dir,
+
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;u=$user_id&amp;sk=$sort_key&amp;sd=$sort_dir", $num_attachments, $config['topics_per_page'], $start, true))
+ );
+
+ break;
+
+ case 'groups':
+
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ $user->add_lang(array('groups', 'acp/groups'));
+ $group_id = request_var('g', 0);
+
+ if ($group_id)
+ {
+ // Check the founder only entry for this group to make sure everything is well
+ $sql = 'SELECT group_founder_manage
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_id = ' . $group_id;
+ $result = $db->sql_query($sql);
+ $founder_manage = (int) $db->sql_fetchfield('group_founder_manage');
+ $db->sql_freeresult($result);
+
+ if ($user->data['user_type'] != USER_FOUNDER && $founder_manage)
+ {
+ trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+ }
+ else
+ {
+ $founder_manage = 0;
+ }
+
+ switch ($action)
+ {
+ case 'demote':
+ case 'promote':
+ case 'default':
+ if (!$group_id)
+ {
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+ group_user_attributes($action, $group_id, $user_id);
+
+ if ($action == 'default')
+ {
+ $user_row['group_id'] = $group_id;
+ }
+ break;
+
+ case 'delete':
+
+ if (confirm_box(true))
+ {
+ if (!$group_id)
+ {
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ if ($error = group_user_del($group_id, $user_id))
+ {
+ trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ $error = array();
+
+ // The delete action was successful - therefore update the user row...
+ $sql = 'SELECT u.*, s.*
+ FROM ' . USERS_TABLE . ' u
+ LEFT JOIN ' . SESSIONS_TABLE . ' s ON (s.session_user_id = u.user_id)
+ WHERE u.user_id = ' . $user_id . '
+ ORDER BY s.session_time DESC';
+ $result = $db->sql_query($sql);
+ $user_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'u' => $user_id,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ 'g' => $group_id))
+ );
+ }
+
+ break;
+
+ case 'approve':
+
+ if (confirm_box(true))
+ {
+ if (!$group_id)
+ {
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+ group_user_attributes($action, $group_id, $user_id);
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'u' => $user_id,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ 'g' => $group_id))
+ );
+ }
+
+ break;
+ }
+
+ // Add user to group?
+ if ($submit)
+ {
+
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ if (!$group_id)
+ {
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ // Add user/s to group
+ if ($error = group_user_add($group_id, $user_id))
+ {
+ trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
+ $error = array();
+ }
+
+
+ $sql = 'SELECT ug.*, g.*
+ FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . " ug
+ WHERE ug.user_id = $user_id
+ AND g.group_id = ug.group_id
+ ORDER BY g.group_type DESC, ug.user_pending ASC, g.group_name";
+ $result = $db->sql_query($sql);
+
+ $i = 0;
+ $group_data = $id_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $type = ($row['group_type'] == GROUP_SPECIAL) ? 'special' : (($row['user_pending']) ? 'pending' : 'normal');
+
+ $group_data[$type][$i]['group_id'] = $row['group_id'];
+ $group_data[$type][$i]['group_name'] = $row['group_name'];
+ $group_data[$type][$i]['group_leader'] = ($row['group_leader']) ? 1 : 0;
+
+ $id_ary[] = $row['group_id'];
+
+ $i++;
+ }
+ $db->sql_freeresult($result);
+
+ // Select box for other groups
+ $sql = 'SELECT group_id, group_name, group_type, group_founder_manage
+ FROM ' . GROUPS_TABLE . '
+ ' . ((sizeof($id_ary)) ? 'WHERE ' . $db->sql_in_set('group_id', $id_ary, true) : '') . '
+ ORDER BY group_type DESC, group_name ASC';
+ $result = $db->sql_query($sql);
+
+ $s_group_options = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!$config['coppa_enable'] && $row['group_name'] == 'REGISTERED_COPPA')
+ {
+ continue;
+ }
+
+ // Do not display those groups not allowed to be managed
+ if ($user->data['user_type'] != USER_FOUNDER && $row['group_founder_manage'])
+ {
+ continue;
+ }
+
+ $s_group_options .= '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '') . ' value="' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
+ }
+ $db->sql_freeresult($result);
+
+ $current_type = '';
+ foreach ($group_data as $group_type => $data_ary)
+ {
+ if ($current_type != $group_type)
+ {
+ $template->assign_block_vars('group', array(
+ 'S_NEW_GROUP_TYPE' => true,
+ 'GROUP_TYPE' => $user->lang['USER_GROUP_' . strtoupper($group_type)])
+ );
+ }
+
+ foreach ($data_ary as $data)
+ {
+ $template->assign_block_vars('group', array(
+ 'U_EDIT_GROUP' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=groups&amp;mode=manage&amp;action=edit&amp;u=$user_id&amp;g={$data['group_id']}&amp;back_link=acp_users_groups"),
+ 'U_DEFAULT' => $this->u_action . "&amp;action=default&amp;u=$user_id&amp;g=" . $data['group_id'],
+ 'U_DEMOTE_PROMOTE' => $this->u_action . '&amp;action=' . (($data['group_leader']) ? 'demote' : 'promote') . "&amp;u=$user_id&amp;g=" . $data['group_id'],
+ 'U_DELETE' => $this->u_action . "&amp;action=delete&amp;u=$user_id&amp;g=" . $data['group_id'],
+ 'U_APPROVE' => ($group_type == 'pending') ? $this->u_action . "&amp;action=approve&amp;u=$user_id&amp;g=" . $data['group_id'] : '',
+
+ 'GROUP_NAME' => ($group_type == 'special') ? $user->lang['G_' . $data['group_name']] : $data['group_name'],
+ 'L_DEMOTE_PROMOTE' => ($data['group_leader']) ? $user->lang['GROUP_DEMOTE'] : $user->lang['GROUP_PROMOTE'],
+
+ 'S_IS_MEMBER' => ($group_type != 'pending') ? true : false,
+ 'S_NO_DEFAULT' => ($user_row['group_id'] != $data['group_id']) ? true : false,
+ 'S_SPECIAL_GROUP' => ($group_type == 'special') ? true : false,
+ )
+ );
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_GROUPS' => true,
+ 'S_GROUP_OPTIONS' => $s_group_options)
+ );
+
+ break;
+
+ case 'perm':
+
+ include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
+
+ $auth_admin = new auth_admin();
+
+ $user->add_lang('acp/permissions');
+ add_permission_language();
+
+ $forum_id = request_var('f', 0);
+
+ // Global Permissions
+ if (!$forum_id)
+ {
+ // Select auth options
+ $sql = 'SELECT auth_option, is_local, is_global
+ FROM ' . ACL_OPTIONS_TABLE . '
+ WHERE auth_option ' . $db->sql_like_expression($db->any_char . '_') . '
+ AND is_global = 1
+ ORDER BY auth_option';
+ $result = $db->sql_query($sql);
+
+ $hold_ary = array();
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $hold_ary = $auth_admin->get_mask('view', $user_id, false, false, $row['auth_option'], 'global', ACL_NEVER);
+ $auth_admin->display_mask('view', $row['auth_option'], $hold_ary, 'user', false, false);
+ }
+ $db->sql_freeresult($result);
+
+ unset($hold_ary);
+ }
+ else
+ {
+ $sql = 'SELECT auth_option, is_local, is_global
+ FROM ' . ACL_OPTIONS_TABLE . "
+ WHERE auth_option " . $db->sql_like_expression($db->any_char . '_') . "
+ AND is_local = 1
+ ORDER BY is_global DESC, auth_option";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $hold_ary = $auth_admin->get_mask('view', $user_id, false, $forum_id, $row['auth_option'], 'local', ACL_NEVER);
+ $auth_admin->display_mask('view', $row['auth_option'], $hold_ary, 'user', true, false);
+ }
+ $db->sql_freeresult($result);
+ }
+
+ $s_forum_options = '<option value="0"' . ((!$forum_id) ? ' selected="selected"' : '') . '>' . $user->lang['VIEW_GLOBAL_PERMS'] . '</option>';
+ $s_forum_options .= make_forum_select($forum_id, false, true, false, false, false);
+
+ $template->assign_vars(array(
+ 'S_PERMISSIONS' => true,
+
+ 'S_GLOBAL' => (!$forum_id) ? true : false,
+ 'S_FORUM_OPTIONS' => $s_forum_options,
+
+ 'U_ACTION' => $this->u_action . '&amp;u=' . $user_id,
+ 'U_USER_PERMISSIONS' => append_sid("{$phpbb_admin_path}index.$phpEx" ,'i=permissions&amp;mode=setting_user_global&amp;user_id[]=' . $user_id),
+ 'U_USER_FORUM_PERMISSIONS' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions&amp;mode=setting_user_local&amp;user_id[]=' . $user_id))
+ );
+
+ break;
+
+ }
+
+ // Assign general variables
+ $template->assign_vars(array(
+ 'S_ERROR' => (sizeof($error)) ? true : false,
+ 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '')
+ );
+ }
+
+ /**
+ * Optionset replacement for this module based on $user->optionset
+ */
+ function optionset(&$user_row, $key, $value, $data = false)
+ {
+ global $user;
+
+ $var = ($data) ? $data : $user_row['user_options'];
+
+ if ($value && !($var & 1 << $user->keyoptions[$key]))
+ {
+ $var += 1 << $user->keyoptions[$key];
+ }
+ else if (!$value && ($var & 1 << $user->keyoptions[$key]))
+ {
+ $var -= 1 << $user->keyoptions[$key];
+ }
+ else
+ {
+ return ($data) ? $var : false;
+ }
+
+ if (!$data)
+ {
+ $user_row['user_options'] = $var;
+ return true;
+ }
+ else
+ {
+ return $var;
+ }
+ }
+
+ /**
+ * Optionget replacement for this module based on $user->optionget
+ */
+ function optionget(&$user_row, $key, $data = false)
+ {
+ global $user;
+
+ $var = ($data) ? $data : $user_row['user_options'];
+ return ($var & 1 << $user->keyoptions[$key]) ? true : false;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_words.php b/phpBB/includes/acp/acp_words.php
new file mode 100644
index 0000000000..1cb9545967
--- /dev/null
+++ b/phpBB/includes/acp/acp_words.php
@@ -0,0 +1,187 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @todo [words] check regular expressions for special char replacements (stored specialchared in db)
+* @package acp
+*/
+class acp_words
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $auth, $template, $cache;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ $user->add_lang('acp/posting');
+
+ // Set up general vars
+ $action = request_var('action', '');
+ $action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['save'])) ? 'save' : $action);
+
+ $s_hidden_fields = '';
+ $word_info = array();
+
+ $this->tpl_name = 'acp_words';
+ $this->page_title = 'ACP_WORDS';
+
+ $form_name = 'acp_words';
+ add_form_key($form_name);
+
+ switch ($action)
+ {
+ case 'edit':
+
+ $word_id = request_var('id', 0);
+
+ if (!$word_id)
+ {
+ trigger_error($user->lang['NO_WORD'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql = 'SELECT *
+ FROM ' . WORDS_TABLE . "
+ WHERE word_id = $word_id";
+ $result = $db->sql_query($sql);
+ $word_info = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $s_hidden_fields .= '<input type="hidden" name="id" value="' . $word_id . '" />';
+
+ case 'add':
+
+ $template->assign_vars(array(
+ 'S_EDIT_WORD' => true,
+ 'U_ACTION' => $this->u_action,
+ 'U_BACK' => $this->u_action,
+ 'WORD' => (isset($word_info['word'])) ? $word_info['word'] : '',
+ 'REPLACEMENT' => (isset($word_info['replacement'])) ? $word_info['replacement'] : '',
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields)
+ );
+
+ return;
+
+ break;
+
+ case 'save':
+
+ if (!check_form_key($form_name))
+ {
+ trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $word_id = request_var('id', 0);
+ $word = utf8_normalize_nfc(request_var('word', '', true));
+ $replacement = utf8_normalize_nfc(request_var('replacement', '', true));
+
+ if ($word === '' || $replacement === '')
+ {
+ trigger_error($user->lang['ENTER_WORD'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ $sql_ary = array(
+ 'word' => $word,
+ 'replacement' => $replacement
+ );
+
+ if ($word_id)
+ {
+ $db->sql_query('UPDATE ' . WORDS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE word_id = ' . $word_id);
+ }
+ else
+ {
+ $db->sql_query('INSERT INTO ' . WORDS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+ }
+
+ $cache->destroy('_word_censors');
+
+ $log_action = ($word_id) ? 'LOG_WORD_EDIT' : 'LOG_WORD_ADD';
+ add_log('admin', $log_action, $word);
+
+ $message = ($word_id) ? $user->lang['WORD_UPDATED'] : $user->lang['WORD_ADDED'];
+ trigger_error($message . adm_back_link($this->u_action));
+
+ break;
+
+ case 'delete':
+
+ $word_id = request_var('id', 0);
+
+ if (!$word_id)
+ {
+ trigger_error($user->lang['NO_WORD'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (confirm_box(true))
+ {
+ $sql = 'SELECT word
+ FROM ' . WORDS_TABLE . "
+ WHERE word_id = $word_id";
+ $result = $db->sql_query($sql);
+ $deleted_word = $db->sql_fetchfield('word');
+ $db->sql_freeresult($result);
+
+ $sql = 'DELETE FROM ' . WORDS_TABLE . "
+ WHERE word_id = $word_id";
+ $db->sql_query($sql);
+
+ $cache->destroy('_word_censors');
+
+ add_log('admin', 'LOG_WORD_DELETE', $deleted_word);
+
+ trigger_error($user->lang['WORD_REMOVED'] . adm_back_link($this->u_action));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'id' => $word_id,
+ 'action' => 'delete',
+ )));
+ }
+
+ break;
+ }
+
+
+ $template->assign_vars(array(
+ 'U_ACTION' => $this->u_action,
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields)
+ );
+
+ $sql = 'SELECT *
+ FROM ' . WORDS_TABLE . '
+ ORDER BY word';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $template->assign_block_vars('words', array(
+ 'WORD' => $row['word'],
+ 'REPLACEMENT' => $row['replacement'],
+ 'U_EDIT' => $this->u_action . '&amp;action=edit&amp;id=' . $row['word_id'],
+ 'U_DELETE' => $this->u_action . '&amp;action=delete&amp;id=' . $row['word_id'])
+ );
+ }
+ $db->sql_freeresult($result);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
new file mode 100644
index 0000000000..10d7973da6
--- /dev/null
+++ b/phpBB/includes/acp/auth.php
@@ -0,0 +1,1285 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* ACP Permission/Auth class
+* @package phpBB3
+*/
+class auth_admin extends auth
+{
+ /**
+ * Init auth settings
+ */
+ function auth_admin()
+ {
+ global $db, $cache;
+
+ if (($this->acl_options = $cache->get('_acl_options')) === false)
+ {
+ $sql = 'SELECT auth_option_id, auth_option, is_global, is_local
+ FROM ' . ACL_OPTIONS_TABLE . '
+ ORDER BY auth_option_id';
+ $result = $db->sql_query($sql);
+
+ $global = $local = 0;
+ $this->acl_options = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['is_global'])
+ {
+ $this->acl_options['global'][$row['auth_option']] = $global++;
+ }
+
+ if ($row['is_local'])
+ {
+ $this->acl_options['local'][$row['auth_option']] = $local++;
+ }
+
+ $this->acl_options['id'][$row['auth_option']] = (int) $row['auth_option_id'];
+ $this->acl_options['option'][(int) $row['auth_option_id']] = $row['auth_option'];
+ }
+ $db->sql_freeresult($result);
+
+ $cache->put('_acl_options', $this->acl_options);
+ }
+ }
+
+ /**
+ * Get permission mask
+ * This function only supports getting permissions of one type (for example a_)
+ *
+ * @param set|view $mode defines the permissions we get, view gets effective permissions (checking user AND group permissions), set only gets the user or group permission set alone
+ * @param mixed $user_id user ids to search for (a user_id or a group_id has to be specified at least)
+ * @param mixed $group_id group ids to search for, return group related settings (a user_id or a group_id has to be specified at least)
+ * @param mixed $forum_id forum_ids to search for. Defining a forum id also means getting local settings
+ * @param string $auth_option the auth_option defines the permission setting to look for (a_ for example)
+ * @param local|global $scope the scope defines the permission scope. If local, a forum_id is additionally required
+ * @param ACL_NEVER|ACL_NO|ACL_YES $acl_fill defines the mode those permissions not set are getting filled with
+ */
+ function get_mask($mode, $user_id = false, $group_id = false, $forum_id = false, $auth_option = false, $scope = false, $acl_fill = ACL_NEVER)
+ {
+ global $db, $user;
+
+ $hold_ary = array();
+ $view_user_mask = ($mode == 'view' && $group_id === false) ? true : false;
+
+ if ($auth_option === false || $scope === false)
+ {
+ return array();
+ }
+
+ $acl_user_function = ($mode == 'set') ? 'acl_user_raw_data' : 'acl_raw_data';
+
+ if (!$view_user_mask)
+ {
+ if ($forum_id !== false)
+ {
+ $hold_ary = ($group_id !== false) ? $this->acl_group_raw_data($group_id, $auth_option . '%', $forum_id) : $this->$acl_user_function($user_id, $auth_option . '%', $forum_id);
+ }
+ else
+ {
+ $hold_ary = ($group_id !== false) ? $this->acl_group_raw_data($group_id, $auth_option . '%', ($scope == 'global') ? 0 : false) : $this->$acl_user_function($user_id, $auth_option . '%', ($scope == 'global') ? 0 : false);
+ }
+ }
+
+ // Make sure hold_ary is filled with every setting (prevents missing forums/users/groups)
+ $ug_id = ($group_id !== false) ? ((!is_array($group_id)) ? array($group_id) : $group_id) : ((!is_array($user_id)) ? array($user_id) : $user_id);
+ $forum_ids = ($forum_id !== false) ? ((!is_array($forum_id)) ? array($forum_id) : $forum_id) : (($scope == 'global') ? array(0) : array());
+
+ // Only those options we need
+ $compare_options = array_diff(preg_replace('/^((?!' . $auth_option . ').+)|(' . $auth_option . ')$/', '', array_keys($this->acl_options[$scope])), array(''));
+
+ // If forum_ids is false and the scope is local we actually want to have all forums within the array
+ if ($scope == 'local' && !sizeof($forum_ids))
+ {
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE;
+ $result = $db->sql_query($sql, 120);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_ids[] = (int) $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if ($view_user_mask)
+ {
+ $auth2 = null;
+
+ $sql = 'SELECT user_id, user_permissions, user_type
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $ug_id);
+ $result = $db->sql_query($sql);
+
+ while ($userdata = $db->sql_fetchrow($result))
+ {
+ if ($user->data['user_id'] != $userdata['user_id'])
+ {
+ $auth2 = new auth();
+ $auth2->acl($userdata);
+ }
+ else
+ {
+ global $auth;
+ $auth2 = &$auth;
+ }
+
+
+ $hold_ary[$userdata['user_id']] = array();
+ foreach ($forum_ids as $f_id)
+ {
+ $hold_ary[$userdata['user_id']][$f_id] = array();
+ foreach ($compare_options as $option)
+ {
+ $hold_ary[$userdata['user_id']][$f_id][$option] = $auth2->acl_get($option, $f_id);
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+
+ unset($userdata);
+ unset($auth2);
+ }
+
+ foreach ($ug_id as $_id)
+ {
+ if (!isset($hold_ary[$_id]))
+ {
+ $hold_ary[$_id] = array();
+ }
+
+ foreach ($forum_ids as $f_id)
+ {
+ if (!isset($hold_ary[$_id][$f_id]))
+ {
+ $hold_ary[$_id][$f_id] = array();
+ }
+ }
+ }
+
+ // Now, we need to fill the gaps with $acl_fill. ;)
+
+ // Now switch back to keys
+ if (sizeof($compare_options))
+ {
+ $compare_options = array_combine($compare_options, array_fill(1, sizeof($compare_options), $acl_fill));
+ }
+
+ // Defining the user-function here to save some memory
+ $return_acl_fill = create_function('$value', 'return ' . $acl_fill . ';');
+
+ // Actually fill the gaps
+ if (sizeof($hold_ary))
+ {
+ foreach ($hold_ary as $ug_id => $row)
+ {
+ foreach ($row as $id => $options)
+ {
+ // Do not include the global auth_option
+ unset($options[$auth_option]);
+
+ // Not a "fine" solution, but at all it's a 1-dimensional
+ // array_diff_key function filling the resulting array values with zeros
+ // The differences get merged into $hold_ary (all permissions having $acl_fill set)
+ $hold_ary[$ug_id][$id] = array_merge($options,
+
+ array_map($return_acl_fill,
+ array_flip(
+ array_diff(
+ array_keys($compare_options), array_keys($options)
+ )
+ )
+ )
+ );
+ }
+ }
+ }
+ else
+ {
+ $hold_ary[($group_id !== false) ? $group_id : $user_id][(int) $forum_id] = $compare_options;
+ }
+
+ return $hold_ary;
+ }
+
+ /**
+ * Get permission mask for roles
+ * This function only supports getting masks for one role
+ */
+ function get_role_mask($role_id)
+ {
+ global $db;
+
+ $hold_ary = array();
+
+ // Get users having this role set...
+ $sql = 'SELECT user_id, forum_id
+ FROM ' . ACL_USERS_TABLE . '
+ WHERE auth_role_id = ' . $role_id . '
+ ORDER BY forum_id';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $hold_ary[$row['forum_id']]['users'][] = $row['user_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // Now grab groups...
+ $sql = 'SELECT group_id, forum_id
+ FROM ' . ACL_GROUPS_TABLE . '
+ WHERE auth_role_id = ' . $role_id . '
+ ORDER BY forum_id';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $hold_ary[$row['forum_id']]['groups'][] = $row['group_id'];
+ }
+ $db->sql_freeresult($result);
+
+ return $hold_ary;
+ }
+
+ /**
+ * Display permission mask (assign to template)
+ */
+ function display_mask($mode, $permission_type, &$hold_ary, $user_mode = 'user', $local = false, $group_display = true)
+ {
+ global $template, $user, $db, $phpbb_root_path, $phpEx;
+
+ // Define names for template loops, might be able to be set
+ $tpl_pmask = 'p_mask';
+ $tpl_fmask = 'f_mask';
+ $tpl_category = 'category';
+ $tpl_mask = 'mask';
+
+ $l_acl_type = (isset($user->lang['ACL_TYPE_' . (($local) ? 'LOCAL' : 'GLOBAL') . '_' . strtoupper($permission_type)])) ? $user->lang['ACL_TYPE_' . (($local) ? 'LOCAL' : 'GLOBAL') . '_' . strtoupper($permission_type)] : 'ACL_TYPE_' . (($local) ? 'LOCAL' : 'GLOBAL') . '_' . strtoupper($permission_type);
+
+ // Allow trace for viewing permissions and in user mode
+ $show_trace = ($mode == 'view' && $user_mode == 'user') ? true : false;
+
+ // Get names
+ if ($user_mode == 'user')
+ {
+ $sql = 'SELECT user_id as ug_id, username as ug_name
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', array_keys($hold_ary)) . '
+ ORDER BY username_clean ASC';
+ }
+ else
+ {
+ $sql = 'SELECT group_id as ug_id, group_name as ug_name, group_type
+ FROM ' . GROUPS_TABLE . '
+ WHERE ' . $db->sql_in_set('group_id', array_keys($hold_ary)) . '
+ ORDER BY group_type DESC, group_name ASC';
+ }
+ $result = $db->sql_query($sql);
+
+ $ug_names_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $ug_names_ary[$row['ug_id']] = ($user_mode == 'user') ? $row['ug_name'] : (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['ug_name']] : $row['ug_name']);
+ }
+ $db->sql_freeresult($result);
+
+ // Get used forums
+ $forum_ids = array();
+ foreach ($hold_ary as $ug_id => $row)
+ {
+ $forum_ids = array_merge($forum_ids, array_keys($row));
+ }
+ $forum_ids = array_unique($forum_ids);
+
+ $forum_names_ary = array();
+ if ($local)
+ {
+ $forum_names_ary = make_forum_select(false, false, true, false, false, false, true);
+
+ // Remove the disabled ones, since we do not create an option field here...
+ foreach ($forum_names_ary as $key => $value)
+ {
+ if (!$value['disabled'])
+ {
+ continue;
+ }
+ unset($forum_names_ary[$key]);
+ }
+ }
+ else
+ {
+ $forum_names_ary[0] = $l_acl_type;
+ }
+
+ // Get available roles
+ $sql = 'SELECT *
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_type = '" . $db->sql_escape($permission_type) . "'
+ ORDER BY role_order ASC";
+ $result = $db->sql_query($sql);
+
+ $roles = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $roles[$row['role_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ $cur_roles = $this->acl_role_data($user_mode, $permission_type, array_keys($hold_ary));
+
+ // Build js roles array (role data assignments)
+ $s_role_js_array = '';
+
+ if (sizeof($roles))
+ {
+ $s_role_js_array = array();
+
+ // Make sure every role (even if empty) has its array defined
+ foreach ($roles as $_role_id => $null)
+ {
+ $s_role_js_array[$_role_id] = "\n" . 'role_options[' . $_role_id . '] = new Array();' . "\n";
+ }
+
+ $sql = 'SELECT r.role_id, o.auth_option, r.auth_setting
+ FROM ' . ACL_ROLES_DATA_TABLE . ' r, ' . ACL_OPTIONS_TABLE . ' o
+ WHERE o.auth_option_id = r.auth_option_id
+ AND ' . $db->sql_in_set('r.role_id', array_keys($roles));
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $flag = substr($row['auth_option'], 0, strpos($row['auth_option'], '_') + 1);
+ if ($flag == $row['auth_option'])
+ {
+ continue;
+ }
+
+ $s_role_js_array[$row['role_id']] .= 'role_options[' . $row['role_id'] . '][\'' . addslashes($row['auth_option']) . '\'] = ' . $row['auth_setting'] . '; ';
+ }
+ $db->sql_freeresult($result);
+
+ $s_role_js_array = implode('', $s_role_js_array);
+ }
+
+ $template->assign_var('S_ROLE_JS_ARRAY', $s_role_js_array);
+ unset($s_role_js_array);
+
+ // Now obtain memberships
+ $user_groups_default = $user_groups_custom = array();
+ if ($user_mode == 'user' && $group_display)
+ {
+ $sql = 'SELECT group_id, group_name, group_type
+ FROM ' . GROUPS_TABLE . '
+ ORDER BY group_type DESC, group_name ASC';
+ $result = $db->sql_query($sql);
+
+ $groups = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $groups[$row['group_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ $memberships = group_memberships(false, array_keys($hold_ary), false);
+
+ // User is not a member of any group? Bad admin, bad bad admin...
+ if ($memberships)
+ {
+ foreach ($memberships as $row)
+ {
+ if ($groups[$row['group_id']]['group_type'] == GROUP_SPECIAL)
+ {
+ $user_groups_default[$row['user_id']][] = $user->lang['G_' . $groups[$row['group_id']]['group_name']];
+ }
+ else
+ {
+ $user_groups_custom[$row['user_id']][] = $groups[$row['group_id']]['group_name'];
+ }
+ }
+ }
+ unset($memberships, $groups);
+ }
+
+ // If we only have one forum id to display or being in local mode and more than one user/group to display,
+ // we switch the complete interface to group by user/usergroup instead of grouping by forum
+ // To achieve this, we need to switch the array a bit
+ if (sizeof($forum_ids) == 1 || ($local && sizeof($ug_names_ary) > 1))
+ {
+ $hold_ary_temp = $hold_ary;
+ $hold_ary = array();
+ foreach ($hold_ary_temp as $ug_id => $row)
+ {
+ foreach ($forum_names_ary as $forum_id => $forum_row)
+ {
+ if (isset($row[$forum_id]))
+ {
+ $hold_ary[$forum_id][$ug_id] = $row[$forum_id];
+ }
+ }
+ }
+ unset($hold_ary_temp);
+
+ foreach ($hold_ary as $forum_id => $forum_array)
+ {
+ $content_array = $categories = array();
+ $this->build_permission_array($hold_ary[$forum_id], $content_array, $categories, array_keys($ug_names_ary));
+
+ $template->assign_block_vars($tpl_pmask, array(
+ 'NAME' => ($forum_id == 0) ? $forum_names_ary[0] : $forum_names_ary[$forum_id]['forum_name'],
+ 'PADDING' => ($forum_id == 0) ? '' : $forum_names_ary[$forum_id]['padding'],
+
+ 'CATEGORIES' => implode('</th><th>', $categories),
+
+ 'L_ACL_TYPE' => $l_acl_type,
+
+ 'S_LOCAL' => ($local) ? true : false,
+ 'S_GLOBAL' => (!$local) ? true : false,
+ 'S_NUM_CATS' => sizeof($categories),
+ 'S_VIEW' => ($mode == 'view') ? true : false,
+ 'S_NUM_OBJECTS' => sizeof($content_array),
+ 'S_USER_MODE' => ($user_mode == 'user') ? true : false,
+ 'S_GROUP_MODE' => ($user_mode == 'group') ? true : false)
+ );
+
+ @reset($content_array);
+ while (list($ug_id, $ug_array) = each($content_array))
+ {
+ // Build role dropdown options
+ $current_role_id = (isset($cur_roles[$ug_id][$forum_id])) ? $cur_roles[$ug_id][$forum_id] : 0;
+
+ $s_role_options = '';
+
+ @reset($roles);
+ while (list($role_id, $role_row) = each($roles))
+ {
+ $role_description = (!empty($user->lang[$role_row['role_description']])) ? $user->lang[$role_row['role_description']] : nl2br($role_row['role_description']);
+ $role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name'];
+
+ $title = ($role_description) ? ' title="' . $role_description . '"' : '';
+ $s_role_options .= '<option value="' . $role_id . '"' . (($role_id == $current_role_id) ? ' selected="selected"' : '') . $title . '>' . $role_name . '</option>';
+ }
+
+ if ($s_role_options)
+ {
+ $s_role_options = '<option value="0"' . ((!$current_role_id) ? ' selected="selected"' : '') . ' title="' . htmlspecialchars($user->lang['NO_ROLE_ASSIGNED_EXPLAIN']) . '">' . $user->lang['NO_ROLE_ASSIGNED'] . '</option>' . $s_role_options;
+ }
+
+ if (!$current_role_id && $mode != 'view')
+ {
+ $s_custom_permissions = false;
+
+ foreach ($ug_array as $key => $value)
+ {
+ if ($value['S_NEVER'] || $value['S_YES'])
+ {
+ $s_custom_permissions = true;
+ break;
+ }
+ }
+ }
+ else
+ {
+ $s_custom_permissions = false;
+ }
+
+ $template->assign_block_vars($tpl_pmask . '.' . $tpl_fmask, array(
+ 'NAME' => $ug_names_ary[$ug_id],
+ 'S_ROLE_OPTIONS' => $s_role_options,
+ 'UG_ID' => $ug_id,
+ 'S_CUSTOM' => $s_custom_permissions,
+ 'FORUM_ID' => $forum_id)
+ );
+
+ $this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
+
+ unset($content_array[$ug_id]);
+ }
+
+ unset($hold_ary[$forum_id]);
+ }
+ }
+ else
+ {
+ foreach ($ug_names_ary as $ug_id => $ug_name)
+ {
+ if (!isset($hold_ary[$ug_id]))
+ {
+ continue;
+ }
+
+ $content_array = $categories = array();
+ $this->build_permission_array($hold_ary[$ug_id], $content_array, $categories, array_keys($forum_names_ary));
+
+ $template->assign_block_vars($tpl_pmask, array(
+ 'NAME' => $ug_name,
+ 'CATEGORIES' => implode('</th><th>', $categories),
+
+ 'USER_GROUPS_DEFAULT' => ($user_mode == 'user' && isset($user_groups_default[$ug_id]) && sizeof($user_groups_default[$ug_id])) ? implode(', ', $user_groups_default[$ug_id]) : '',
+ 'USER_GROUPS_CUSTOM' => ($user_mode == 'user' && isset($user_groups_custom[$ug_id]) && sizeof($user_groups_custom[$ug_id])) ? implode(', ', $user_groups_custom[$ug_id]) : '',
+ 'L_ACL_TYPE' => $l_acl_type,
+
+ 'S_LOCAL' => ($local) ? true : false,
+ 'S_GLOBAL' => (!$local) ? true : false,
+ 'S_NUM_CATS' => sizeof($categories),
+ 'S_VIEW' => ($mode == 'view') ? true : false,
+ 'S_NUM_OBJECTS' => sizeof($content_array),
+ 'S_USER_MODE' => ($user_mode == 'user') ? true : false,
+ 'S_GROUP_MODE' => ($user_mode == 'group') ? true : false)
+ );
+
+ @reset($content_array);
+ while (list($forum_id, $forum_array) = each($content_array))
+ {
+ // Build role dropdown options
+ $current_role_id = (isset($cur_roles[$ug_id][$forum_id])) ? $cur_roles[$ug_id][$forum_id] : 0;
+
+ $s_role_options = '';
+
+ @reset($roles);
+ while (list($role_id, $role_row) = each($roles))
+ {
+ $role_description = (!empty($user->lang[$role_row['role_description']])) ? $user->lang[$role_row['role_description']] : nl2br($role_row['role_description']);
+ $role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name'];
+
+ $title = ($role_description) ? ' title="' . $role_description . '"' : '';
+ $s_role_options .= '<option value="' . $role_id . '"' . (($role_id == $current_role_id) ? ' selected="selected"' : '') . $title . '>' . $role_name . '</option>';
+ }
+
+ if ($s_role_options)
+ {
+ $s_role_options = '<option value="0"' . ((!$current_role_id) ? ' selected="selected"' : '') . ' title="' . htmlspecialchars($user->lang['NO_ROLE_ASSIGNED_EXPLAIN']) . '">' . $user->lang['NO_ROLE_ASSIGNED'] . '</option>' . $s_role_options;
+ }
+
+ if (!$current_role_id && $mode != 'view')
+ {
+ $s_custom_permissions = false;
+
+ foreach ($forum_array as $key => $value)
+ {
+ if ($value['S_NEVER'] || $value['S_YES'])
+ {
+ $s_custom_permissions = true;
+ break;
+ }
+ }
+ }
+ else
+ {
+ $s_custom_permissions = false;
+ }
+
+ $template->assign_block_vars($tpl_pmask . '.' . $tpl_fmask, array(
+ 'NAME' => ($forum_id == 0) ? $forum_names_ary[0] : $forum_names_ary[$forum_id]['forum_name'],
+ 'PADDING' => ($forum_id == 0) ? '' : $forum_names_ary[$forum_id]['padding'],
+ 'S_ROLE_OPTIONS' => $s_role_options,
+ 'S_CUSTOM' => $s_custom_permissions,
+ 'UG_ID' => $ug_id,
+ 'FORUM_ID' => $forum_id)
+ );
+
+ $this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
+ }
+
+ unset($hold_ary[$ug_id], $ug_names_ary[$ug_id]);
+ }
+ }
+ }
+
+ /**
+ * Display permission mask for roles
+ */
+ function display_role_mask(&$hold_ary)
+ {
+ global $db, $template, $user, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ if (!sizeof($hold_ary))
+ {
+ return;
+ }
+
+ // Get forum names
+ $sql = 'SELECT forum_id, forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', array_keys($hold_ary)) . '
+ ORDER BY left_id';
+ $result = $db->sql_query($sql);
+
+ // If the role is used globally, then reflect that
+ $forum_names = (isset($hold_ary[0])) ? array(0 => '') : array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_names[$row['forum_id']] = $row['forum_name'];
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($forum_names as $forum_id => $forum_name)
+ {
+ $auth_ary = $hold_ary[$forum_id];
+
+ $template->assign_block_vars('role_mask', array(
+ 'NAME' => ($forum_id == 0) ? $user->lang['GLOBAL_MASK'] : $forum_name,
+ 'FORUM_ID' => $forum_id)
+ );
+
+ if (isset($auth_ary['users']) && sizeof($auth_ary['users']))
+ {
+ $sql = 'SELECT user_id, username
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $auth_ary['users']) . '
+ ORDER BY username_clean ASC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $template->assign_block_vars('role_mask.users', array(
+ 'USER_ID' => $row['user_id'],
+ 'USERNAME' => $row['username'],
+ 'U_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&amp;u={$row['user_id']}"))
+ );
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (isset($auth_ary['groups']) && sizeof($auth_ary['groups']))
+ {
+ $sql = 'SELECT group_id, group_name, group_type
+ FROM ' . GROUPS_TABLE . '
+ WHERE ' . $db->sql_in_set('group_id', $auth_ary['groups']) . '
+ ORDER BY group_type ASC, group_name';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $template->assign_block_vars('role_mask.groups', array(
+ 'GROUP_ID' => $row['group_id'],
+ 'GROUP_NAME' => ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'],
+ 'U_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=group&amp;g={$row['group_id']}"))
+ );
+ }
+ $db->sql_freeresult($result);
+ }
+ }
+ }
+
+ /**
+ * NOTE: this function is not in use atm
+ * Add a new option to the list ... $options is a hash of form ->
+ * $options = array(
+ * 'local' => array('option1', 'option2', ...),
+ * 'global' => array('optionA', 'optionB', ...)
+ * );
+ */
+ function acl_add_option($options)
+ {
+ global $db, $cache;
+
+ if (!is_array($options))
+ {
+ return false;
+ }
+
+ $cur_options = array();
+
+ // Determine current options
+ $sql = 'SELECT auth_option, is_global, is_local
+ FROM ' . ACL_OPTIONS_TABLE . '
+ ORDER BY auth_option_id';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $cur_options[$row['auth_option']] = ($row['is_global'] && $row['is_local']) ? 'both' : (($row['is_global']) ? 'global' : 'local');
+ }
+ $db->sql_freeresult($result);
+
+ // Here we need to insert new options ... this requires discovering whether
+ // an options is global, local or both and whether we need to add an permission
+ // set flag (x_)
+ $new_options = array('local' => array(), 'global' => array());
+
+ foreach ($options as $type => $option_ary)
+ {
+ $option_ary = array_unique($option_ary);
+
+ foreach ($option_ary as $option_value)
+ {
+ $new_options[$type][] = $option_value;
+
+ $flag = substr($option_value, 0, strpos($option_value, '_') + 1);
+
+ if (!in_array($flag, $new_options[$type]))
+ {
+ $new_options[$type][] = $flag;
+ }
+ }
+ }
+ unset($options);
+
+ $options = array();
+ $options['local'] = array_diff($new_options['local'], $new_options['global']);
+ $options['global'] = array_diff($new_options['global'], $new_options['local']);
+ $options['both'] = array_intersect($new_options['local'], $new_options['global']);
+
+ // Now check which options to add/update
+ $add_options = $update_options = array();
+
+ // First local ones...
+ foreach ($options as $type => $option_ary)
+ {
+ foreach ($option_ary as $option)
+ {
+ if (!isset($cur_options[$option]))
+ {
+ $add_options[] = array(
+ 'auth_option' => (string) $option,
+ 'is_global' => ($type == 'global' || $type == 'both') ? 1 : 0,
+ 'is_local' => ($type == 'local' || $type == 'both') ? 1 : 0
+ );
+
+ continue;
+ }
+
+ // Else, update existing entry if it is changed...
+ if ($type === $cur_options[$option])
+ {
+ continue;
+ }
+
+ // New type is always both:
+ // If is now both, we set both.
+ // If it was global the new one is local and we need to set it to both
+ // If it was local the new one is global and we need to set it to both
+ $update_options[] = $option;
+ }
+ }
+
+ if (!empty($add_options))
+ {
+ $db->sql_multi_insert(ACL_OPTIONS_TABLE, $add_options);
+ }
+
+ if (!empty($update_options))
+ {
+ $sql = 'UPDATE ' . ACL_OPTIONS_TABLE . '
+ SET is_global = 1, is_local = 1
+ WHERE ' . $db->sql_in_set('auth_option', $update_options);
+ $db->sql_query($sql);
+ }
+
+ $cache->destroy('_acl_options');
+ $this->acl_clear_prefetch();
+
+ // Because we just changed the options and also purged the options cache, we instantly update/regenerate it for later calls to succeed.
+ $this->acl_options = array();
+ $this->auth_admin();
+
+ return true;
+ }
+
+ /**
+ * Set a user or group ACL record
+ */
+ function acl_set($ug_type, $forum_id, $ug_id, $auth, $role_id = 0, $clear_prefetch = true)
+ {
+ global $db;
+
+ // One or more forums
+ if (!is_array($forum_id))
+ {
+ $forum_id = array($forum_id);
+ }
+
+ // One or more users
+ if (!is_array($ug_id))
+ {
+ $ug_id = array($ug_id);
+ }
+
+ $ug_id_sql = $db->sql_in_set($ug_type . '_id', array_map('intval', $ug_id));
+ $forum_sql = $db->sql_in_set('forum_id', array_map('intval', $forum_id));
+
+ // Instead of updating, inserting, removing we just remove all current settings and re-set everything...
+ $table = ($ug_type == 'user') ? ACL_USERS_TABLE : ACL_GROUPS_TABLE;
+ $id_field = $ug_type . '_id';
+
+ // Get any flags as required
+ reset($auth);
+ $flag = key($auth);
+ $flag = substr($flag, 0, strpos($flag, '_') + 1);
+
+ // This ID (the any-flag) is set if one or more permissions are true...
+ $any_option_id = (int) $this->acl_options['id'][$flag];
+
+ // Remove any-flag from auth ary
+ if (isset($auth[$flag]))
+ {
+ unset($auth[$flag]);
+ }
+
+ // Remove current auth options...
+ $auth_option_ids = array((int)$any_option_id);
+ foreach ($auth as $auth_option => $auth_setting)
+ {
+ $auth_option_ids[] = (int) $this->acl_options['id'][$auth_option];
+ }
+
+ $sql = "DELETE FROM $table
+ WHERE $forum_sql
+ AND $ug_id_sql
+ AND " . $db->sql_in_set('auth_option_id', $auth_option_ids);
+ $db->sql_query($sql);
+
+ // Remove those having a role assigned... the correct type of course...
+ $sql = 'SELECT role_id
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_type = '" . $db->sql_escape($flag) . "'";
+ $result = $db->sql_query($sql);
+
+ $role_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $role_ids[] = $row['role_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($role_ids))
+ {
+ $sql = "DELETE FROM $table
+ WHERE $forum_sql
+ AND $ug_id_sql
+ AND auth_option_id = 0
+ AND " . $db->sql_in_set('auth_role_id', $role_ids);
+ $db->sql_query($sql);
+ }
+
+ // Ok, include the any-flag if one or more auth options are set to yes...
+ foreach ($auth as $auth_option => $setting)
+ {
+ if ($setting == ACL_YES && (!isset($auth[$flag]) || $auth[$flag] == ACL_NEVER))
+ {
+ $auth[$flag] = ACL_YES;
+ }
+ }
+
+ $sql_ary = array();
+ foreach ($forum_id as $forum)
+ {
+ $forum = (int) $forum;
+
+ if ($role_id)
+ {
+ foreach ($ug_id as $id)
+ {
+ $sql_ary[] = array(
+ $id_field => (int) $id,
+ 'forum_id' => (int) $forum,
+ 'auth_option_id' => 0,
+ 'auth_setting' => 0,
+ 'auth_role_id' => (int) $role_id,
+ );
+ }
+ }
+ else
+ {
+ foreach ($auth as $auth_option => $setting)
+ {
+ $auth_option_id = (int) $this->acl_options['id'][$auth_option];
+
+ if ($setting != ACL_NO)
+ {
+ foreach ($ug_id as $id)
+ {
+ $sql_ary[] = array(
+ $id_field => (int) $id,
+ 'forum_id' => (int) $forum,
+ 'auth_option_id' => (int) $auth_option_id,
+ 'auth_setting' => (int) $setting
+ );
+ }
+ }
+ }
+ }
+ }
+
+ $db->sql_multi_insert($table, $sql_ary);
+
+ if ($clear_prefetch)
+ {
+ $this->acl_clear_prefetch();
+ }
+ }
+
+ /**
+ * Set a role-specific ACL record
+ */
+ function acl_set_role($role_id, $auth)
+ {
+ global $db;
+
+ // Get any-flag as required
+ reset($auth);
+ $flag = key($auth);
+ $flag = substr($flag, 0, strpos($flag, '_') + 1);
+
+ // Remove any-flag from auth ary
+ if (isset($auth[$flag]))
+ {
+ unset($auth[$flag]);
+ }
+
+ // Re-set any flag...
+ foreach ($auth as $auth_option => $setting)
+ {
+ if ($setting == ACL_YES && (!isset($auth[$flag]) || $auth[$flag] == ACL_NEVER))
+ {
+ $auth[$flag] = ACL_YES;
+ }
+ }
+
+ $sql_ary = array();
+ foreach ($auth as $auth_option => $setting)
+ {
+ $auth_option_id = (int) $this->acl_options['id'][$auth_option];
+
+ if ($setting != ACL_NO)
+ {
+ $sql_ary[] = array(
+ 'role_id' => (int) $role_id,
+ 'auth_option_id' => (int) $auth_option_id,
+ 'auth_setting' => (int) $setting
+ );
+ }
+ }
+
+ // If no data is there, we set the any-flag to ACL_NEVER...
+ if (!sizeof($sql_ary))
+ {
+ $sql_ary[] = array(
+ 'role_id' => (int) $role_id,
+ 'auth_option_id' => (int) $this->acl_options['id'][$flag],
+ 'auth_setting' => ACL_NEVER
+ );
+ }
+
+ // Remove current auth options...
+ $sql = 'DELETE FROM ' . ACL_ROLES_DATA_TABLE . '
+ WHERE role_id = ' . $role_id;
+ $db->sql_query($sql);
+
+ // Now insert the new values
+ $db->sql_multi_insert(ACL_ROLES_DATA_TABLE, $sql_ary);
+
+ $this->acl_clear_prefetch();
+ }
+
+ /**
+ * Remove local permission
+ */
+ function acl_delete($mode, $ug_id = false, $forum_id = false, $permission_type = false)
+ {
+ global $db;
+
+ if ($ug_id === false && $forum_id === false)
+ {
+ return;
+ }
+
+ $option_id_ary = array();
+ $table = ($mode == 'user') ? ACL_USERS_TABLE : ACL_GROUPS_TABLE;
+ $id_field = $mode . '_id';
+
+ $where_sql = array();
+
+ if ($forum_id !== false)
+ {
+ $where_sql[] = (!is_array($forum_id)) ? 'forum_id = ' . (int) $forum_id : $db->sql_in_set('forum_id', array_map('intval', $forum_id));
+ }
+
+ if ($ug_id !== false)
+ {
+ $where_sql[] = (!is_array($ug_id)) ? $id_field . ' = ' . (int) $ug_id : $db->sql_in_set($id_field, array_map('intval', $ug_id));
+ }
+
+ // There seem to be auth options involved, therefore we need to go through the list and make sure we capture roles correctly
+ if ($permission_type !== false)
+ {
+ // Get permission type
+ $sql = 'SELECT auth_option, auth_option_id
+ FROM ' . ACL_OPTIONS_TABLE . "
+ WHERE auth_option " . $db->sql_like_expression($permission_type . $db->any_char);
+ $result = $db->sql_query($sql);
+
+ $auth_id_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $option_id_ary[] = $row['auth_option_id'];
+ $auth_id_ary[$row['auth_option']] = ACL_NO;
+ }
+ $db->sql_freeresult($result);
+
+ // First of all, lets grab the items having roles with the specified auth options assigned
+ $sql = "SELECT auth_role_id, $id_field, forum_id
+ FROM $table, " . ACL_ROLES_TABLE . " r
+ WHERE auth_role_id <> 0
+ AND auth_role_id = r.role_id
+ AND r.role_type = '{$permission_type}'
+ AND " . implode(' AND ', $where_sql) . '
+ ORDER BY auth_role_id';
+ $result = $db->sql_query($sql);
+
+ $cur_role_auth = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $cur_role_auth[$row['auth_role_id']][$row['forum_id']][] = $row[$id_field];
+ }
+ $db->sql_freeresult($result);
+
+ // Get role data for resetting data
+ if (sizeof($cur_role_auth))
+ {
+ $sql = 'SELECT ao.auth_option, rd.role_id, rd.auth_setting
+ FROM ' . ACL_OPTIONS_TABLE . ' ao, ' . ACL_ROLES_DATA_TABLE . ' rd
+ WHERE ao.auth_option_id = rd.auth_option_id
+ AND ' . $db->sql_in_set('rd.role_id', array_keys($cur_role_auth));
+ $result = $db->sql_query($sql);
+
+ $auth_settings = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // We need to fill all auth_options, else setting it will fail...
+ if (!isset($auth_settings[$row['role_id']]))
+ {
+ $auth_settings[$row['role_id']] = $auth_id_ary;
+ }
+ $auth_settings[$row['role_id']][$row['auth_option']] = $row['auth_setting'];
+ }
+ $db->sql_freeresult($result);
+
+ // Set the options
+ foreach ($cur_role_auth as $role_id => $auth_row)
+ {
+ foreach ($auth_row as $f_id => $ug_row)
+ {
+ $this->acl_set($mode, $f_id, $ug_row, $auth_settings[$role_id], 0, false);
+ }
+ }
+ }
+ }
+
+ // Now, normally remove permissions...
+ if ($permission_type !== false)
+ {
+ $where_sql[] = $db->sql_in_set('auth_option_id', array_map('intval', $option_id_ary));
+ }
+
+ $sql = "DELETE FROM $table
+ WHERE " . implode(' AND ', $where_sql);
+ $db->sql_query($sql);
+
+ $this->acl_clear_prefetch();
+ }
+
+ /**
+ * Assign category to template
+ * used by display_mask()
+ */
+ function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $show_trace = false, $s_view)
+ {
+ global $template, $user, $phpbb_admin_path, $phpEx;
+
+ @reset($category_array);
+ while (list($cat, $cat_array) = each($category_array))
+ {
+ $template->assign_block_vars($tpl_cat, array(
+ 'S_YES' => ($cat_array['S_YES'] && !$cat_array['S_NEVER'] && !$cat_array['S_NO']) ? true : false,
+ 'S_NEVER' => ($cat_array['S_NEVER'] && !$cat_array['S_YES'] && !$cat_array['S_NO']) ? true : false,
+ 'S_NO' => ($cat_array['S_NO'] && !$cat_array['S_NEVER'] && !$cat_array['S_YES']) ? true : false,
+
+ 'CAT_NAME' => $user->lang['permission_cat'][$cat])
+ );
+
+ /* Sort permissions by name (more naturaly and user friendly than sorting by a primary key)
+ * Commented out due to it's memory consumption and time needed
+ *
+ $key_array = array_intersect(array_keys($user->lang), array_map(create_function('$a', 'return "acl_" . $a;'), array_keys($cat_array['permissions'])));
+ $values_array = $cat_array['permissions'];
+
+ $cat_array['permissions'] = array();
+
+ foreach ($key_array as $key)
+ {
+ $key = str_replace('acl_', '', $key);
+ $cat_array['permissions'][$key] = $values_array[$key];
+ }
+ unset($key_array, $values_array);
+*/
+ @reset($cat_array['permissions']);
+ while (list($permission, $allowed) = each($cat_array['permissions']))
+ {
+ if ($s_view)
+ {
+ $template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array(
+ 'S_YES' => ($allowed == ACL_YES) ? true : false,
+ 'S_NEVER' => ($allowed == ACL_NEVER) ? true : false,
+
+ 'UG_ID' => $ug_id,
+ 'FORUM_ID' => $forum_id,
+ 'FIELD_NAME' => $permission,
+ 'S_FIELD_NAME' => 'setting[' . $ug_id . '][' . $forum_id . '][' . $permission . ']',
+
+ 'U_TRACE' => ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&amp;mode=trace&amp;u=$ug_id&amp;f=$forum_id&amp;auth=$permission") : '',
+ 'UA_TRACE' => ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&mode=trace&u=$ug_id&f=$forum_id&auth=$permission", false) : '',
+
+ 'PERMISSION' => $user->lang['acl_' . $permission]['lang'])
+ );
+ }
+ else
+ {
+ $template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array(
+ 'S_YES' => ($allowed == ACL_YES) ? true : false,
+ 'S_NEVER' => ($allowed == ACL_NEVER) ? true : false,
+ 'S_NO' => ($allowed == ACL_NO) ? true : false,
+
+ 'UG_ID' => $ug_id,
+ 'FORUM_ID' => $forum_id,
+ 'FIELD_NAME' => $permission,
+ 'S_FIELD_NAME' => 'setting[' . $ug_id . '][' . $forum_id . '][' . $permission . ']',
+
+ 'U_TRACE' => ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&amp;mode=trace&amp;u=$ug_id&amp;f=$forum_id&amp;auth=$permission") : '',
+ 'UA_TRACE' => ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&mode=trace&u=$ug_id&f=$forum_id&auth=$permission", false) : '',
+
+ 'PERMISSION' => $user->lang['acl_' . $permission]['lang'])
+ );
+ }
+ }
+ }
+ }
+
+ /**
+ * Building content array from permission rows with explicit key ordering
+ * used by display_mask()
+ */
+ function build_permission_array(&$permission_row, &$content_array, &$categories, $key_sort_array)
+ {
+ global $user;
+
+ foreach ($key_sort_array as $forum_id)
+ {
+ if (!isset($permission_row[$forum_id]))
+ {
+ continue;
+ }
+
+ $permissions = $permission_row[$forum_id];
+ ksort($permissions);
+
+ @reset($permissions);
+ while (list($permission, $auth_setting) = each($permissions))
+ {
+ if (!isset($user->lang['acl_' . $permission]))
+ {
+ $user->lang['acl_' . $permission] = array(
+ 'cat' => 'misc',
+ 'lang' => '{ acl_' . $permission . ' }'
+ );
+ }
+
+ $cat = $user->lang['acl_' . $permission]['cat'];
+
+ // Build our categories array
+ if (!isset($categories[$cat]))
+ {
+ $categories[$cat] = $user->lang['permission_cat'][$cat];
+ }
+
+ // Build our content array
+ if (!isset($content_array[$forum_id]))
+ {
+ $content_array[$forum_id] = array();
+ }
+
+ if (!isset($content_array[$forum_id][$cat]))
+ {
+ $content_array[$forum_id][$cat] = array(
+ 'S_YES' => false,
+ 'S_NEVER' => false,
+ 'S_NO' => false,
+ 'permissions' => array(),
+ );
+ }
+
+ $content_array[$forum_id][$cat]['S_YES'] |= ($auth_setting == ACL_YES) ? true : false;
+ $content_array[$forum_id][$cat]['S_NEVER'] |= ($auth_setting == ACL_NEVER) ? true : false;
+ $content_array[$forum_id][$cat]['S_NO'] |= ($auth_setting == ACL_NO) ? true : false;
+
+ $content_array[$forum_id][$cat]['permissions'][$permission] = $auth_setting;
+ }
+ }
+ }
+
+ /**
+ * Use permissions from another user. This transferes a permission set from one user to another.
+ * The other user is always able to revert back to his permission set.
+ * This function does not check for lower/higher permissions, it is possible for the user to gain
+ * "more" permissions by this.
+ * Admin permissions will not be copied.
+ */
+ function ghost_permissions($from_user_id, $to_user_id)
+ {
+ global $db;
+
+ if ($to_user_id == ANONYMOUS)
+ {
+ return false;
+ }
+
+ $hold_ary = $this->acl_raw_data_single_user($from_user_id);
+
+ // Key 0 in $hold_ary are global options, all others are forum_ids
+
+ // We disallow copying admin permissions
+ foreach ($this->acl_options['global'] as $opt => $id)
+ {
+ if (strpos($opt, 'a_') === 0)
+ {
+ $hold_ary[0][$this->acl_options['id'][$opt]] = ACL_NEVER;
+ }
+ }
+
+ // Force a_switchperm to be allowed
+ $hold_ary[0][$this->acl_options['id']['a_switchperm']] = ACL_YES;
+
+ $user_permissions = $this->build_bitstring($hold_ary);
+
+ if (!$user_permissions)
+ {
+ return false;
+ }
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_permissions = '" . $db->sql_escape($user_permissions) . "',
+ user_perm_from = $from_user_id
+ WHERE user_id = " . $to_user_id;
+ $db->sql_query($sql);
+
+ return true;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_attachments.php b/phpBB/includes/acp/info/acp_attachments.php
new file mode 100644
index 0000000000..b77785801f
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_attachments.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_attachments_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_attachments',
+ 'title' => 'ACP_ATTACHMENTS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'attach' => array('title' => 'ACP_ATTACHMENT_SETTINGS', 'auth' => 'acl_a_attach', 'cat' => array('ACP_BOARD_CONFIGURATION', 'ACP_ATTACHMENTS')),
+ 'extensions' => array('title' => 'ACP_MANAGE_EXTENSIONS', 'auth' => 'acl_a_attach', 'cat' => array('ACP_ATTACHMENTS')),
+ 'ext_groups' => array('title' => 'ACP_EXTENSION_GROUPS', 'auth' => 'acl_a_attach', 'cat' => array('ACP_ATTACHMENTS')),
+ 'orphan' => array('title' => 'ACP_ORPHAN_ATTACHMENTS', 'auth' => 'acl_a_attach', 'cat' => array('ACP_ATTACHMENTS'))
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_ban.php b/phpBB/includes/acp/info/acp_ban.php
new file mode 100644
index 0000000000..df51011ec6
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_ban.php
@@ -0,0 +1,39 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_ban_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_ban',
+ 'title' => 'ACP_BAN',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'email' => array('title' => 'ACP_BAN_EMAILS', 'auth' => 'acl_a_ban', 'cat' => array('ACP_USER_SECURITY')),
+ 'ip' => array('title' => 'ACP_BAN_IPS', 'auth' => 'acl_a_ban', 'cat' => array('ACP_USER_SECURITY')),
+ 'user' => array('title' => 'ACP_BAN_USERNAMES', 'auth' => 'acl_a_ban', 'cat' => array('ACP_USER_SECURITY')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_bbcodes.php b/phpBB/includes/acp/info/acp_bbcodes.php
new file mode 100644
index 0000000000..c0206432d6
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_bbcodes.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_bbcodes_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_bbcodes',
+ 'title' => 'ACP_BBCODES',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'bbcodes' => array('title' => 'ACP_BBCODES', 'auth' => 'acl_a_bbcode', 'cat' => array('ACP_MESSAGES')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_board.php b/phpBB/includes/acp/info/acp_board.php
new file mode 100644
index 0000000000..58b650650c
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_board.php
@@ -0,0 +1,52 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_board_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_board',
+ 'title' => 'ACP_BOARD_MANAGEMENT',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'settings' => array('title' => 'ACP_BOARD_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
+ 'features' => array('title' => 'ACP_BOARD_FEATURES', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
+ 'avatar' => array('title' => 'ACP_AVATAR_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
+ 'message' => array('title' => 'ACP_MESSAGE_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION', 'ACP_MESSAGES')),
+ 'post' => array('title' => 'ACP_POST_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
+ 'signature' => array('title' => 'ACP_SIGNATURE_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
+ 'feed' => array('title' => 'ACP_FEED_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
+ 'registration' => array('title' => 'ACP_REGISTER_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
+
+ 'auth' => array('title' => 'ACP_AUTH_SETTINGS', 'auth' => 'acl_a_server', 'cat' => array('ACP_CLIENT_COMMUNICATION')),
+ 'email' => array('title' => 'ACP_EMAIL_SETTINGS', 'auth' => 'acl_a_server', 'cat' => array('ACP_CLIENT_COMMUNICATION')),
+
+ 'cookie' => array('title' => 'ACP_COOKIE_SETTINGS', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')),
+ 'server' => array('title' => 'ACP_SERVER_SETTINGS', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')),
+ 'security' => array('title' => 'ACP_SECURITY_SETTINGS', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')),
+ 'load' => array('title' => 'ACP_LOAD_SETTINGS', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_bots.php b/phpBB/includes/acp/info/acp_bots.php
new file mode 100644
index 0000000000..45087f9225
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_bots.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_bots_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_bots',
+ 'title' => 'ACP_BOTS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'bots' => array('title' => 'ACP_BOTS', 'auth' => 'acl_a_bots', 'cat' => array('ACP_GENERAL_TASKS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_captcha.php b/phpBB/includes/acp/info/acp_captcha.php
new file mode 100644
index 0000000000..b2541c252c
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_captcha.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_captcha_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_captcha',
+ 'title' => 'ACP_CAPTCHA',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'visual' => array('title' => 'ACP_VC_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
+ 'img' => array('title' => 'ACP_VC_CAPTCHA_DISPLAY', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION'), 'display' => false)
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_database.php b/phpBB/includes/acp/info/acp_database.php
new file mode 100644
index 0000000000..85c3c8b21c
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_database.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_database_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_database',
+ 'title' => 'ACP_DATABASE',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'backup' => array('title' => 'ACP_BACKUP', 'auth' => 'acl_a_backup', 'cat' => array('ACP_CAT_DATABASE')),
+ 'restore' => array('title' => 'ACP_RESTORE', 'auth' => 'acl_a_backup', 'cat' => array('ACP_CAT_DATABASE')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_disallow.php b/phpBB/includes/acp/info/acp_disallow.php
new file mode 100644
index 0000000000..41315eb716
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_disallow.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_disallow_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_disallow',
+ 'title' => 'ACP_DISALLOW',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'usernames' => array('title' => 'ACP_DISALLOW_USERNAMES', 'auth' => 'acl_a_names', 'cat' => array('ACP_USER_SECURITY')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_email.php b/phpBB/includes/acp/info/acp_email.php
new file mode 100644
index 0000000000..4ad7bca58b
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_email.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_email_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_email',
+ 'title' => 'ACP_MASS_EMAIL',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'email' => array('title' => 'ACP_MASS_EMAIL', 'auth' => 'acl_a_email && cfg_email_enable', 'cat' => array('ACP_GENERAL_TASKS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_forums.php b/phpBB/includes/acp/info/acp_forums.php
new file mode 100644
index 0000000000..8d82eaf42d
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_forums.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_forums_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_forums',
+ 'title' => 'ACP_FORUM_MANAGEMENT',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'manage' => array('title' => 'ACP_MANAGE_FORUMS', 'auth' => 'acl_a_forum', 'cat' => array('ACP_MANAGE_FORUMS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_groups.php b/phpBB/includes/acp/info/acp_groups.php
new file mode 100644
index 0000000000..3910c24e6b
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_groups.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_groups_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_groups',
+ 'title' => 'ACP_GROUPS_MANAGEMENT',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'manage' => array('title' => 'ACP_GROUPS_MANAGE', 'auth' => 'acl_a_group', 'cat' => array('ACP_GROUPS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_icons.php b/phpBB/includes/acp/info/acp_icons.php
new file mode 100644
index 0000000000..16bf753940
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_icons.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_icons_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_icons',
+ 'title' => 'ACP_ICONS_SMILIES',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'icons' => array('title' => 'ACP_ICONS', 'auth' => 'acl_a_icons', 'cat' => array('ACP_MESSAGES')),
+ 'smilies' => array('title' => 'ACP_SMILIES', 'auth' => 'acl_a_icons', 'cat' => array('ACP_MESSAGES')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_inactive.php b/phpBB/includes/acp/info/acp_inactive.php
new file mode 100644
index 0000000000..e17fbda9dd
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_inactive.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_inactive_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_inactive',
+ 'title' => 'ACP_INACTIVE_USERS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'list' => array('title' => 'ACP_INACTIVE_USERS', 'auth' => 'acl_a_user', 'cat' => array('ACP_CAT_USERS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_jabber.php b/phpBB/includes/acp/info/acp_jabber.php
new file mode 100644
index 0000000000..7bcf7744e1
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_jabber.php
@@ -0,0 +1,36 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_jabber_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_jabber',
+ 'title' => 'ACP_JABBER_SETTINGS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'settings' => array('title' => 'ACP_JABBER_SETTINGS', 'auth' => 'acl_a_jabber', 'cat' => array('ACP_CLIENT_COMMUNICATION')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_language.php b/phpBB/includes/acp/info/acp_language.php
new file mode 100644
index 0000000000..f7606631fe
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_language.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_language_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_language',
+ 'title' => 'ACP_LANGUAGE',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'lang_packs' => array('title' => 'ACP_LANGUAGE_PACKS', 'auth' => 'acl_a_language', 'cat' => array('ACP_GENERAL_TASKS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_logs.php b/phpBB/includes/acp/info/acp_logs.php
new file mode 100644
index 0000000000..f119e10b83
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_logs.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_logs_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_logs',
+ 'title' => 'ACP_LOGGING',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'admin' => array('title' => 'ACP_ADMIN_LOGS', 'auth' => 'acl_a_viewlogs', 'cat' => array('ACP_FORUM_LOGS')),
+ 'mod' => array('title' => 'ACP_MOD_LOGS', 'auth' => 'acl_a_viewlogs', 'cat' => array('ACP_FORUM_LOGS')),
+ 'users' => array('title' => 'ACP_USERS_LOGS', 'auth' => 'acl_a_viewlogs', 'cat' => array('ACP_FORUM_LOGS')),
+ 'critical' => array('title' => 'ACP_CRITICAL_LOGS', 'auth' => 'acl_a_viewlogs', 'cat' => array('ACP_FORUM_LOGS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_main.php b/phpBB/includes/acp/info/acp_main.php
new file mode 100644
index 0000000000..5574cc40d1
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_main.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_main_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_main',
+ 'title' => 'ACP_INDEX',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'main' => array('title' => 'ACP_INDEX', 'auth' => '', 'cat' => array('ACP_CAT_GENERAL')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_modules.php b/phpBB/includes/acp/info/acp_modules.php
new file mode 100644
index 0000000000..886f17d628
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_modules.php
@@ -0,0 +1,39 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_modules_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_modules',
+ 'title' => 'ACP_MODULE_MANAGEMENT',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'acp' => array('title' => 'ACP', 'auth' => 'acl_a_modules', 'cat' => array('ACP_MODULE_MANAGEMENT')),
+ 'ucp' => array('title' => 'UCP', 'auth' => 'acl_a_modules', 'cat' => array('ACP_MODULE_MANAGEMENT')),
+ 'mcp' => array('title' => 'MCP', 'auth' => 'acl_a_modules', 'cat' => array('ACP_MODULE_MANAGEMENT')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_permission_roles.php b/phpBB/includes/acp/info/acp_permission_roles.php
new file mode 100644
index 0000000000..3ab2fecd53
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_permission_roles.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_permission_roles_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_permission_roles',
+ 'title' => 'ACP_PERMISSION_ROLES',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'admin_roles' => array('title' => 'ACP_ADMIN_ROLES', 'auth' => 'acl_a_roles && acl_a_aauth', 'cat' => array('ACP_PERMISSION_ROLES')),
+ 'user_roles' => array('title' => 'ACP_USER_ROLES', 'auth' => 'acl_a_roles && acl_a_uauth', 'cat' => array('ACP_PERMISSION_ROLES')),
+ 'mod_roles' => array('title' => 'ACP_MOD_ROLES', 'auth' => 'acl_a_roles && acl_a_mauth', 'cat' => array('ACP_PERMISSION_ROLES')),
+ 'forum_roles' => array('title' => 'ACP_FORUM_ROLES', 'auth' => 'acl_a_roles && acl_a_fauth', 'cat' => array('ACP_PERMISSION_ROLES')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_permissions.php b/phpBB/includes/acp/info/acp_permissions.php
new file mode 100644
index 0000000000..6f341742f3
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_permissions.php
@@ -0,0 +1,54 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_permissions_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_permissions',
+ 'title' => 'ACP_PERMISSIONS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'intro' => array('title' => 'ACP_PERMISSIONS', 'auth' => 'acl_a_authusers || acl_a_authgroups || acl_a_viewauth', 'cat' => array('ACP_CAT_PERMISSIONS')),
+ 'trace' => array('title' => 'ACP_PERMISSION_TRACE', 'auth' => 'acl_a_viewauth', 'display' => false, 'cat' => array('ACP_PERMISSION_MASKS')),
+
+ 'setting_forum_local' => array('title' => 'ACP_FORUM_PERMISSIONS', 'auth' => 'acl_a_fauth && (acl_a_authusers || acl_a_authgroups)', 'cat' => array('ACP_FORUM_BASED_PERMISSIONS')),
+ 'setting_forum_copy' => array('title' => 'ACP_FORUM_PERMISSIONS_COPY', 'auth' => 'acl_a_fauth && acl_a_authusers && acl_a_authgroups && acl_a_mauth', 'cat' => array('ACP_FORUM_BASED_PERMISSIONS')),
+ 'setting_mod_local' => array('title' => 'ACP_FORUM_MODERATORS', 'auth' => 'acl_a_mauth && (acl_a_authusers || acl_a_authgroups)', 'cat' => array('ACP_FORUM_BASED_PERMISSIONS')),
+ 'setting_user_global' => array('title' => 'ACP_USERS_PERMISSIONS', 'auth' => 'acl_a_authusers && (acl_a_aauth || acl_a_mauth || acl_a_uauth)', 'cat' => array('ACP_GLOBAL_PERMISSIONS', 'ACP_CAT_USERS')),
+ 'setting_user_local' => array('title' => 'ACP_USERS_FORUM_PERMISSIONS', 'auth' => 'acl_a_authusers && (acl_a_mauth || acl_a_fauth)', 'cat' => array('ACP_FORUM_BASED_PERMISSIONS', 'ACP_CAT_USERS')),
+ 'setting_group_global' => array('title' => 'ACP_GROUPS_PERMISSIONS', 'auth' => 'acl_a_authgroups && (acl_a_aauth || acl_a_mauth || acl_a_uauth)', 'cat' => array('ACP_GLOBAL_PERMISSIONS', 'ACP_GROUPS')),
+ 'setting_group_local' => array('title' => 'ACP_GROUPS_FORUM_PERMISSIONS', 'auth' => 'acl_a_authgroups && (acl_a_mauth || acl_a_fauth)', 'cat' => array('ACP_FORUM_BASED_PERMISSIONS', 'ACP_GROUPS')),
+ 'setting_admin_global' => array('title' => 'ACP_ADMINISTRATORS', 'auth' => 'acl_a_aauth && (acl_a_authusers || acl_a_authgroups)', 'cat' => array('ACP_GLOBAL_PERMISSIONS')),
+ 'setting_mod_global' => array('title' => 'ACP_GLOBAL_MODERATORS', 'auth' => 'acl_a_mauth && (acl_a_authusers || acl_a_authgroups)', 'cat' => array('ACP_GLOBAL_PERMISSIONS')),
+
+ 'view_admin_global' => array('title' => 'ACP_VIEW_ADMIN_PERMISSIONS', 'auth' => 'acl_a_viewauth', 'cat' => array('ACP_PERMISSION_MASKS')),
+ 'view_user_global' => array('title' => 'ACP_VIEW_USER_PERMISSIONS', 'auth' => 'acl_a_viewauth', 'cat' => array('ACP_PERMISSION_MASKS')),
+ 'view_mod_global' => array('title' => 'ACP_VIEW_GLOBAL_MOD_PERMISSIONS', 'auth' => 'acl_a_viewauth', 'cat' => array('ACP_PERMISSION_MASKS')),
+ 'view_mod_local' => array('title' => 'ACP_VIEW_FORUM_MOD_PERMISSIONS', 'auth' => 'acl_a_viewauth', 'cat' => array('ACP_PERMISSION_MASKS')),
+ 'view_forum_local' => array('title' => 'ACP_VIEW_FORUM_PERMISSIONS', 'auth' => 'acl_a_viewauth', 'cat' => array('ACP_PERMISSION_MASKS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_php_info.php b/phpBB/includes/acp/info/acp_php_info.php
new file mode 100644
index 0000000000..7d716b0f83
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_php_info.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_php_info_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_php_info',
+ 'title' => 'ACP_PHP_INFO',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'info' => array('title' => 'ACP_PHP_INFO', 'auth' => 'acl_a_phpinfo', 'cat' => array('ACP_GENERAL_TASKS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_profile.php b/phpBB/includes/acp/info/acp_profile.php
new file mode 100644
index 0000000000..8590226038
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_profile.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_profile_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_profile',
+ 'title' => 'ACP_CUSTOM_PROFILE_FIELDS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'profile' => array('title' => 'ACP_CUSTOM_PROFILE_FIELDS', 'auth' => 'acl_a_profile', 'cat' => array('ACP_CAT_USERS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_prune.php b/phpBB/includes/acp/info/acp_prune.php
new file mode 100644
index 0000000000..46565c4f16
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_prune.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_prune_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_prune',
+ 'title' => 'ACP_PRUNING',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'forums' => array('title' => 'ACP_PRUNE_FORUMS', 'auth' => 'acl_a_prune', 'cat' => array('ACP_MANAGE_FORUMS')),
+ 'users' => array('title' => 'ACP_PRUNE_USERS', 'auth' => 'acl_a_userdel', 'cat' => array('ACP_USER_SECURITY')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_ranks.php b/phpBB/includes/acp/info/acp_ranks.php
new file mode 100644
index 0000000000..06b9c6d284
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_ranks.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_ranks_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_ranks',
+ 'title' => 'ACP_RANKS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'ranks' => array('title' => 'ACP_MANAGE_RANKS', 'auth' => 'acl_a_ranks', 'cat' => array('ACP_CAT_USERS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_reasons.php b/phpBB/includes/acp/info/acp_reasons.php
new file mode 100644
index 0000000000..65d805ee18
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_reasons.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_reasons_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_reasons',
+ 'title' => 'ACP_REASONS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'main' => array('title' => 'ACP_MANAGE_REASONS', 'auth' => 'acl_a_reasons', 'cat' => array('ACP_GENERAL_TASKS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_search.php b/phpBB/includes/acp/info/acp_search.php
new file mode 100644
index 0000000000..4afd6c6994
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_search.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_search_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_search',
+ 'title' => 'ACP_SEARCH',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'settings' => array('title' => 'ACP_SEARCH_SETTINGS', 'auth' => 'acl_a_search', 'cat' => array('ACP_SERVER_CONFIGURATION')),
+ 'index' => array('title' => 'ACP_SEARCH_INDEX', 'auth' => 'acl_a_search', 'cat' => array('ACP_CAT_DATABASE')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_send_statistics.php b/phpBB/includes/acp/info/acp_send_statistics.php
new file mode 100644
index 0000000000..de5dcdb8ad
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_send_statistics.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_send_statistics_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_send_statistics',
+ 'title' => 'ACP_SEND_STATISTICS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'send_statistics' => array('title' => 'ACP_SEND_STATISTICS', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_styles.php b/phpBB/includes/acp/info/acp_styles.php
new file mode 100644
index 0000000000..db67167e39
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_styles.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_styles_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_styles',
+ 'title' => 'ACP_CAT_STYLES',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'style' => array('title' => 'ACP_STYLES', 'auth' => 'acl_a_styles', 'cat' => array('ACP_STYLE_MANAGEMENT')),
+ 'template' => array('title' => 'ACP_TEMPLATES', 'auth' => 'acl_a_styles', 'cat' => array('ACP_STYLE_COMPONENTS')),
+ 'theme' => array('title' => 'ACP_THEMES', 'auth' => 'acl_a_styles', 'cat' => array('ACP_STYLE_COMPONENTS')),
+ 'imageset' => array('title' => 'ACP_IMAGESETS', 'auth' => 'acl_a_styles', 'cat' => array('ACP_STYLE_COMPONENTS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_update.php b/phpBB/includes/acp/info/acp_update.php
new file mode 100644
index 0000000000..886cdc94d5
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_update.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_update_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_update',
+ 'title' => 'ACP_UPDATE',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'version_check' => array('title' => 'ACP_VERSION_CHECK', 'auth' => 'acl_a_board', 'cat' => array('ACP_AUTOMATION')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_users.php b/phpBB/includes/acp/info/acp_users.php
new file mode 100644
index 0000000000..10081ac870
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_users.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_users_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_users',
+ 'title' => 'ACP_USER_MANAGEMENT',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'overview' => array('title' => 'ACP_MANAGE_USERS', 'auth' => 'acl_a_user', 'cat' => array('ACP_CAT_USERS')),
+ 'feedback' => array('title' => 'ACP_USER_FEEDBACK', 'auth' => 'acl_a_user', 'display' => false, 'cat' => array('ACP_CAT_USERS')),
+ 'warnings' => array('title' => 'ACP_USER_WARNINGS', 'auth' => 'acl_a_user', 'display' => false, 'cat' => array('ACP_CAT_USERS')),
+ 'profile' => array('title' => 'ACP_USER_PROFILE', 'auth' => 'acl_a_user', 'display' => false, 'cat' => array('ACP_CAT_USERS')),
+ 'prefs' => array('title' => 'ACP_USER_PREFS', 'auth' => 'acl_a_user', 'display' => false, 'cat' => array('ACP_CAT_USERS')),
+ 'avatar' => array('title' => 'ACP_USER_AVATAR', 'auth' => 'acl_a_user', 'display' => false, 'cat' => array('ACP_CAT_USERS')),
+ 'rank' => array('title' => 'ACP_USER_RANK', 'auth' => 'acl_a_user', 'display' => false, 'cat' => array('ACP_CAT_USERS')),
+ 'sig' => array('title' => 'ACP_USER_SIG', 'auth' => 'acl_a_user', 'display' => false, 'cat' => array('ACP_CAT_USERS')),
+ 'groups' => array('title' => 'ACP_USER_GROUPS', 'auth' => 'acl_a_user && acl_a_group', 'display' => false, 'cat' => array('ACP_CAT_USERS')),
+ 'perm' => array('title' => 'ACP_USER_PERM', 'auth' => 'acl_a_user && acl_a_viewauth', 'display' => false, 'cat' => array('ACP_CAT_USERS')),
+ 'attach' => array('title' => 'ACP_USER_ATTACH', 'auth' => 'acl_a_user', 'display' => false, 'cat' => array('ACP_CAT_USERS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_words.php b/phpBB/includes/acp/info/acp_words.php
new file mode 100644
index 0000000000..a2417f8a7f
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_words.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_words_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_words',
+ 'title' => 'ACP_WORDS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'words' => array('title' => 'ACP_WORDS', 'auth' => 'acl_a_words', 'cat' => array('ACP_MESSAGES')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php
new file mode 100644
index 0000000000..02819f9e78
--- /dev/null
+++ b/phpBB/includes/auth.php
@@ -0,0 +1,1046 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Permission/Auth class
+* @package phpBB3
+*/
+class auth
+{
+ var $acl = array();
+ var $cache = array();
+ var $acl_options = array();
+ var $acl_forum_ids = false;
+
+ /**
+ * Init permissions
+ */
+ function acl(&$userdata)
+ {
+ global $db, $cache;
+
+ $this->acl = $this->cache = $this->acl_options = array();
+ $this->acl_forum_ids = false;
+
+ if (($this->acl_options = $cache->get('_acl_options')) === false)
+ {
+ $sql = 'SELECT auth_option_id, auth_option, is_global, is_local
+ FROM ' . ACL_OPTIONS_TABLE . '
+ ORDER BY auth_option_id';
+ $result = $db->sql_query($sql);
+
+ $global = $local = 0;
+ $this->acl_options = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['is_global'])
+ {
+ $this->acl_options['global'][$row['auth_option']] = $global++;
+ }
+
+ if ($row['is_local'])
+ {
+ $this->acl_options['local'][$row['auth_option']] = $local++;
+ }
+
+ $this->acl_options['id'][$row['auth_option']] = (int) $row['auth_option_id'];
+ $this->acl_options['option'][(int) $row['auth_option_id']] = $row['auth_option'];
+ }
+ $db->sql_freeresult($result);
+
+ $cache->put('_acl_options', $this->acl_options);
+ }
+
+ if (!trim($userdata['user_permissions']))
+ {
+ $this->acl_cache($userdata);
+ }
+
+ // Fill ACL array
+ $this->_fill_acl($userdata['user_permissions']);
+
+ // Verify bitstring length with options provided...
+ $renew = false;
+ $global_length = sizeof($this->acl_options['global']);
+ $local_length = sizeof($this->acl_options['local']);
+
+ // Specify comparing length (bitstring is padded to 31 bits)
+ $global_length = ($global_length % 31) ? ($global_length - ($global_length % 31) + 31) : $global_length;
+ $local_length = ($local_length % 31) ? ($local_length - ($local_length % 31) + 31) : $local_length;
+
+ // You thought we are finished now? Noooo... now compare them.
+ foreach ($this->acl as $forum_id => $bitstring)
+ {
+ if (($forum_id && strlen($bitstring) != $local_length) || (!$forum_id && strlen($bitstring) != $global_length))
+ {
+ $renew = true;
+ break;
+ }
+ }
+
+ // If a bitstring within the list does not match the options, we have a user with incorrect permissions set and need to renew them
+ if ($renew)
+ {
+ $this->acl_cache($userdata);
+ $this->_fill_acl($userdata['user_permissions']);
+ }
+
+ return;
+ }
+
+ /**
+ * Fill ACL array with relevant bitstrings from user_permissions column
+ * @access private
+ */
+ function _fill_acl($user_permissions)
+ {
+ $this->acl = array();
+ $user_permissions = explode("\n", $user_permissions);
+
+ foreach ($user_permissions as $f => $seq)
+ {
+ if ($seq)
+ {
+ $i = 0;
+
+ if (!isset($this->acl[$f]))
+ {
+ $this->acl[$f] = '';
+ }
+
+ while ($subseq = substr($seq, $i, 6))
+ {
+ // We put the original bitstring into the acl array
+ $this->acl[$f] .= str_pad(base_convert($subseq, 36, 2), 31, 0, STR_PAD_LEFT);
+ $i += 6;
+ }
+ }
+ }
+ }
+
+ /**
+ * Look up an option
+ * if the option is prefixed with !, then the result becomes negated
+ *
+ * If a forum id is specified the local option will be combined with a global option if one exist.
+ * If a forum id is not specified, only the global option will be checked.
+ */
+ function acl_get($opt, $f = 0)
+ {
+ $negate = false;
+
+ if (strpos($opt, '!') === 0)
+ {
+ $negate = true;
+ $opt = substr($opt, 1);
+ }
+
+ if (!isset($this->cache[$f][$opt]))
+ {
+ // We combine the global/local option with an OR because some options are global and local.
+ // If the user has the global permission the local one is true too and vice versa
+ $this->cache[$f][$opt] = false;
+
+ // Is this option a global permission setting?
+ if (isset($this->acl_options['global'][$opt]))
+ {
+ if (isset($this->acl[0]))
+ {
+ $this->cache[$f][$opt] = $this->acl[0][$this->acl_options['global'][$opt]];
+ }
+ }
+
+ // Is this option a local permission setting?
+ // But if we check for a global option only, we won't combine the options...
+ if ($f != 0 && isset($this->acl_options['local'][$opt]))
+ {
+ if (isset($this->acl[$f]) && isset($this->acl[$f][$this->acl_options['local'][$opt]]))
+ {
+ $this->cache[$f][$opt] |= $this->acl[$f][$this->acl_options['local'][$opt]];
+ }
+ }
+ }
+
+ // Founder always has all global options set to true...
+ return ($negate) ? !$this->cache[$f][$opt] : $this->cache[$f][$opt];
+ }
+
+ /**
+ * Get forums with the specified permission setting
+ * if the option is prefixed with !, then the result becomes nagated
+ *
+ * @param bool $clean set to true if only values needs to be returned which are set/unset
+ */
+ function acl_getf($opt, $clean = false)
+ {
+ $acl_f = array();
+ $negate = false;
+
+ if (strpos($opt, '!') === 0)
+ {
+ $negate = true;
+ $opt = substr($opt, 1);
+ }
+
+ // If we retrieve a list of forums not having permissions in, we need to get every forum_id
+ if ($negate)
+ {
+ if ($this->acl_forum_ids === false)
+ {
+ global $db;
+
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE;
+
+ if (sizeof($this->acl))
+ {
+ $sql .= ' WHERE ' . $db->sql_in_set('forum_id', array_keys($this->acl), true);
+ }
+ $result = $db->sql_query($sql);
+
+ $this->acl_forum_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $this->acl_forum_ids[] = $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+ }
+
+ if (isset($this->acl_options['local'][$opt]))
+ {
+ foreach ($this->acl as $f => $bitstring)
+ {
+ // Skip global settings
+ if (!$f)
+ {
+ continue;
+ }
+
+ $allowed = (!isset($this->cache[$f][$opt])) ? $this->acl_get($opt, $f) : $this->cache[$f][$opt];
+
+ if (!$clean)
+ {
+ $acl_f[$f][$opt] = ($negate) ? !$allowed : $allowed;
+ }
+ else
+ {
+ if (($negate && !$allowed) || (!$negate && $allowed))
+ {
+ $acl_f[$f][$opt] = 1;
+ }
+ }
+ }
+ }
+
+ // If we get forum_ids not having this permission, we need to fill the remaining parts
+ if ($negate && sizeof($this->acl_forum_ids))
+ {
+ foreach ($this->acl_forum_ids as $f)
+ {
+ $acl_f[$f][$opt] = 1;
+ }
+ }
+
+ return $acl_f;
+ }
+
+ /**
+ * Get local permission state for any forum.
+ *
+ * Returns true if user has the permission in one or more forums, false if in no forum.
+ * If global option is checked it returns the global state (same as acl_get($opt))
+ * Local option has precedence...
+ */
+ function acl_getf_global($opt)
+ {
+ if (is_array($opt))
+ {
+ // evaluates to true as soon as acl_getf_global is true for one option
+ foreach ($opt as $check_option)
+ {
+ if ($this->acl_getf_global($check_option))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ if (isset($this->acl_options['local'][$opt]))
+ {
+ foreach ($this->acl as $f => $bitstring)
+ {
+ // Skip global settings
+ if (!$f)
+ {
+ continue;
+ }
+
+ // as soon as the user has any permission we're done so return true
+ if ((!isset($this->cache[$f][$opt])) ? $this->acl_get($opt, $f) : $this->cache[$f][$opt])
+ {
+ return true;
+ }
+ }
+ }
+ else if (isset($this->acl_options['global'][$opt]))
+ {
+ return $this->acl_get($opt);
+ }
+
+ return false;
+ }
+
+ /**
+ * Get permission settings (more than one)
+ */
+ function acl_gets()
+ {
+ $args = func_get_args();
+ $f = array_pop($args);
+
+ if (!is_numeric($f))
+ {
+ $args[] = $f;
+ $f = 0;
+ }
+
+ // alternate syntax: acl_gets(array('m_', 'a_'), $forum_id)
+ if (is_array($args[0]))
+ {
+ $args = $args[0];
+ }
+
+ $acl = 0;
+ foreach ($args as $opt)
+ {
+ $acl |= $this->acl_get($opt, $f);
+ }
+
+ return $acl;
+ }
+
+ /**
+ * Get permission listing based on user_id/options/forum_ids
+ */
+ function acl_get_list($user_id = false, $opts = false, $forum_id = false)
+ {
+ if ($user_id !== false && !is_array($user_id) && $opts === false && $forum_id === false)
+ {
+ $hold_ary = array($user_id => $this->acl_raw_data_single_user($user_id));
+ }
+ else
+ {
+ $hold_ary = $this->acl_raw_data($user_id, $opts, $forum_id);
+ }
+
+ $auth_ary = array();
+ foreach ($hold_ary as $user_id => $forum_ary)
+ {
+ foreach ($forum_ary as $forum_id => $auth_option_ary)
+ {
+ foreach ($auth_option_ary as $auth_option => $auth_setting)
+ {
+ if ($auth_setting)
+ {
+ $auth_ary[$forum_id][$auth_option][] = $user_id;
+ }
+ }
+ }
+ }
+
+ return $auth_ary;
+ }
+
+ /**
+ * Cache data to user_permissions row
+ */
+ function acl_cache(&$userdata)
+ {
+ global $db;
+
+ // Empty user_permissions
+ $userdata['user_permissions'] = '';
+
+ $hold_ary = $this->acl_raw_data_single_user($userdata['user_id']);
+
+ // Key 0 in $hold_ary are global options, all others are forum_ids
+
+ // If this user is founder we're going to force fill the admin options ...
+ if ($userdata['user_type'] == USER_FOUNDER)
+ {
+ foreach ($this->acl_options['global'] as $opt => $id)
+ {
+ if (strpos($opt, 'a_') === 0)
+ {
+ $hold_ary[0][$this->acl_options['id'][$opt]] = ACL_YES;
+ }
+ }
+ }
+
+ $hold_str = $this->build_bitstring($hold_ary);
+
+ if ($hold_str)
+ {
+ $userdata['user_permissions'] = $hold_str;
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_permissions = '" . $db->sql_escape($userdata['user_permissions']) . "',
+ user_perm_from = 0
+ WHERE user_id = " . $userdata['user_id'];
+ $db->sql_query($sql);
+ }
+
+ return;
+ }
+
+ /**
+ * Build bitstring from permission set
+ */
+ function build_bitstring(&$hold_ary)
+ {
+ $hold_str = '';
+
+ if (sizeof($hold_ary))
+ {
+ ksort($hold_ary);
+
+ $last_f = 0;
+
+ foreach ($hold_ary as $f => $auth_ary)
+ {
+ $ary_key = (!$f) ? 'global' : 'local';
+
+ $bitstring = array();
+ foreach ($this->acl_options[$ary_key] as $opt => $id)
+ {
+ if (isset($auth_ary[$this->acl_options['id'][$opt]]))
+ {
+ $bitstring[$id] = $auth_ary[$this->acl_options['id'][$opt]];
+
+ $option_key = substr($opt, 0, strpos($opt, '_') + 1);
+
+ // If one option is allowed, the global permission for this option has to be allowed too
+ // example: if the user has the a_ permission this means he has one or more a_* permissions
+ if ($auth_ary[$this->acl_options['id'][$opt]] == ACL_YES && (!isset($bitstring[$this->acl_options[$ary_key][$option_key]]) || $bitstring[$this->acl_options[$ary_key][$option_key]] == ACL_NEVER))
+ {
+ $bitstring[$this->acl_options[$ary_key][$option_key]] = ACL_YES;
+ }
+ }
+ else
+ {
+ $bitstring[$id] = ACL_NEVER;
+ }
+ }
+
+ // Now this bitstring defines the permission setting for the current forum $f (or global setting)
+ $bitstring = implode('', $bitstring);
+
+ // The line number indicates the id, therefore we have to add empty lines for those ids not present
+ $hold_str .= str_repeat("\n", $f - $last_f);
+
+ // Convert bitstring for storage - we do not use binary/bytes because PHP's string functions are not fully binary safe
+ for ($i = 0, $bit_length = strlen($bitstring); $i < $bit_length; $i += 31)
+ {
+ $hold_str .= str_pad(base_convert(str_pad(substr($bitstring, $i, 31), 31, 0, STR_PAD_RIGHT), 2, 36), 6, 0, STR_PAD_LEFT);
+ }
+
+ $last_f = $f;
+ }
+ unset($bitstring);
+
+ $hold_str = rtrim($hold_str);
+ }
+
+ return $hold_str;
+ }
+
+ /**
+ * Clear one or all users cached permission settings
+ */
+ function acl_clear_prefetch($user_id = false)
+ {
+ global $db, $cache;
+
+ // Rebuild options cache
+ $cache->destroy('_role_cache');
+
+ $sql = 'SELECT *
+ FROM ' . ACL_ROLES_DATA_TABLE . '
+ ORDER BY role_id ASC';
+ $result = $db->sql_query($sql);
+
+ $this->role_cache = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $this->role_cache[$row['role_id']][$row['auth_option_id']] = (int) $row['auth_setting'];
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($this->role_cache as $role_id => $role_options)
+ {
+ $this->role_cache[$role_id] = serialize($role_options);
+ }
+
+ $cache->put('_role_cache', $this->role_cache);
+
+ // Now empty user permissions
+ $where_sql = '';
+
+ if ($user_id !== false)
+ {
+ $user_id = (!is_array($user_id)) ? $user_id = array((int) $user_id) : array_map('intval', $user_id);
+ $where_sql = ' WHERE ' . $db->sql_in_set('user_id', $user_id);
+ }
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_permissions = '',
+ user_perm_from = 0
+ $where_sql";
+ $db->sql_query($sql);
+
+ return;
+ }
+
+ /**
+ * Get assigned roles
+ */
+ function acl_role_data($user_type, $role_type, $ug_id = false, $forum_id = false)
+ {
+ global $db;
+
+ $roles = array();
+
+ $sql_id = ($user_type == 'user') ? 'user_id' : 'group_id';
+
+ $sql_ug = ($ug_id !== false) ? ((!is_array($ug_id)) ? "AND a.$sql_id = $ug_id" : 'AND ' . $db->sql_in_set("a.$sql_id", $ug_id)) : '';
+ $sql_forum = ($forum_id !== false) ? ((!is_array($forum_id)) ? "AND a.forum_id = $forum_id" : 'AND ' . $db->sql_in_set('a.forum_id', $forum_id)) : '';
+
+ // Grab assigned roles...
+ $sql = 'SELECT a.auth_role_id, a.' . $sql_id . ', a.forum_id
+ FROM ' . (($user_type == 'user') ? ACL_USERS_TABLE : ACL_GROUPS_TABLE) . ' a, ' . ACL_ROLES_TABLE . " r
+ WHERE a.auth_role_id = r.role_id
+ AND r.role_type = '" . $db->sql_escape($role_type) . "'
+ $sql_ug
+ $sql_forum
+ ORDER BY r.role_order ASC";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $roles[$row[$sql_id]][$row['forum_id']] = $row['auth_role_id'];
+ }
+ $db->sql_freeresult($result);
+
+ return $roles;
+ }
+
+ /**
+ * Get raw acl data based on user/option/forum
+ */
+ function acl_raw_data($user_id = false, $opts = false, $forum_id = false)
+ {
+ global $db;
+
+ $sql_user = ($user_id !== false) ? ((!is_array($user_id)) ? 'user_id = ' . (int) $user_id : $db->sql_in_set('user_id', array_map('intval', $user_id))) : '';
+ $sql_forum = ($forum_id !== false) ? ((!is_array($forum_id)) ? 'AND a.forum_id = ' . (int) $forum_id : 'AND ' . $db->sql_in_set('a.forum_id', array_map('intval', $forum_id))) : '';
+
+ $sql_opts = $sql_opts_select = $sql_opts_from = '';
+ $hold_ary = array();
+
+ if ($opts !== false)
+ {
+ $sql_opts_select = ', ao.auth_option';
+ $sql_opts_from = ', ' . ACL_OPTIONS_TABLE . ' ao';
+ $this->build_auth_option_statement('ao.auth_option', $opts, $sql_opts);
+ }
+
+ $sql_ary = array();
+
+ // Grab non-role settings - user-specific
+ $sql_ary[] = 'SELECT a.user_id, a.forum_id, a.auth_setting, a.auth_option_id' . $sql_opts_select . '
+ FROM ' . ACL_USERS_TABLE . ' a' . $sql_opts_from . '
+ WHERE a.auth_role_id = 0 ' .
+ (($sql_opts_from) ? 'AND a.auth_option_id = ao.auth_option_id ' : '') .
+ (($sql_user) ? 'AND a.' . $sql_user : '') . "
+ $sql_forum
+ $sql_opts";
+
+ // Now the role settings - user-specific
+ $sql_ary[] = 'SELECT a.user_id, a.forum_id, r.auth_option_id, r.auth_setting, r.auth_option_id' . $sql_opts_select . '
+ FROM ' . ACL_USERS_TABLE . ' a, ' . ACL_ROLES_DATA_TABLE . ' r' . $sql_opts_from . '
+ WHERE a.auth_role_id = r.role_id ' .
+ (($sql_opts_from) ? 'AND r.auth_option_id = ao.auth_option_id ' : '') .
+ (($sql_user) ? 'AND a.' . $sql_user : '') . "
+ $sql_forum
+ $sql_opts";
+
+ foreach ($sql_ary as $sql)
+ {
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $option = ($sql_opts_select) ? $row['auth_option'] : $this->acl_options['option'][$row['auth_option_id']];
+ $hold_ary[$row['user_id']][$row['forum_id']][$option] = $row['auth_setting'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ $sql_ary = array();
+
+ // Now grab group settings - non-role specific...
+ $sql_ary[] = 'SELECT ug.user_id, a.forum_id, a.auth_setting, a.auth_option_id' . $sql_opts_select . '
+ FROM ' . ACL_GROUPS_TABLE . ' a, ' . USER_GROUP_TABLE . ' ug, ' . GROUPS_TABLE . ' g' . $sql_opts_from . '
+ WHERE a.auth_role_id = 0 ' .
+ (($sql_opts_from) ? 'AND a.auth_option_id = ao.auth_option_id ' : '') . '
+ AND a.group_id = ug.group_id
+ AND g.group_id = ug.group_id
+ AND ug.user_pending = 0
+ AND NOT (ug.group_leader = 1 AND g.group_skip_auth = 1)
+ ' . (($sql_user) ? 'AND ug.' . $sql_user : '') . "
+ $sql_forum
+ $sql_opts";
+
+ // Now grab group settings - role specific...
+ $sql_ary[] = 'SELECT ug.user_id, a.forum_id, r.auth_setting, r.auth_option_id' . $sql_opts_select . '
+ FROM ' . ACL_GROUPS_TABLE . ' a, ' . USER_GROUP_TABLE . ' ug, ' . GROUPS_TABLE . ' g, ' . ACL_ROLES_DATA_TABLE . ' r' . $sql_opts_from . '
+ WHERE a.auth_role_id = r.role_id ' .
+ (($sql_opts_from) ? 'AND r.auth_option_id = ao.auth_option_id ' : '') . '
+ AND a.group_id = ug.group_id
+ AND g.group_id = ug.group_id
+ AND ug.user_pending = 0
+ AND NOT (ug.group_leader = 1 AND g.group_skip_auth = 1)
+ ' . (($sql_user) ? 'AND ug.' . $sql_user : '') . "
+ $sql_forum
+ $sql_opts";
+
+ foreach ($sql_ary as $sql)
+ {
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $option = ($sql_opts_select) ? $row['auth_option'] : $this->acl_options['option'][$row['auth_option_id']];
+
+ if (!isset($hold_ary[$row['user_id']][$row['forum_id']][$option]) || (isset($hold_ary[$row['user_id']][$row['forum_id']][$option]) && $hold_ary[$row['user_id']][$row['forum_id']][$option] != ACL_NEVER))
+ {
+ $hold_ary[$row['user_id']][$row['forum_id']][$option] = $row['auth_setting'];
+
+ // If we detect ACL_NEVER, we will unset the flag option (within building the bitstring it is correctly set again)
+ if ($row['auth_setting'] == ACL_NEVER)
+ {
+ $flag = substr($option, 0, strpos($option, '_') + 1);
+
+ if (isset($hold_ary[$row['user_id']][$row['forum_id']][$flag]) && $hold_ary[$row['user_id']][$row['forum_id']][$flag] == ACL_YES)
+ {
+ unset($hold_ary[$row['user_id']][$row['forum_id']][$flag]);
+
+/* if (in_array(ACL_YES, $hold_ary[$row['user_id']][$row['forum_id']]))
+ {
+ $hold_ary[$row['user_id']][$row['forum_id']][$flag] = ACL_YES;
+ }
+*/
+ }
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+
+ return $hold_ary;
+ }
+
+ /**
+ * Get raw user based permission settings
+ */
+ function acl_user_raw_data($user_id = false, $opts = false, $forum_id = false)
+ {
+ global $db;
+
+ $sql_user = ($user_id !== false) ? ((!is_array($user_id)) ? 'user_id = ' . (int) $user_id : $db->sql_in_set('user_id', array_map('intval', $user_id))) : '';
+ $sql_forum = ($forum_id !== false) ? ((!is_array($forum_id)) ? 'AND a.forum_id = ' . (int) $forum_id : 'AND ' . $db->sql_in_set('a.forum_id', array_map('intval', $forum_id))) : '';
+
+ $sql_opts = '';
+ $hold_ary = $sql_ary = array();
+
+ if ($opts !== false)
+ {
+ $this->build_auth_option_statement('ao.auth_option', $opts, $sql_opts);
+ }
+
+ // Grab user settings - non-role specific...
+ $sql_ary[] = 'SELECT a.user_id, a.forum_id, a.auth_setting, a.auth_option_id, ao.auth_option
+ FROM ' . ACL_USERS_TABLE . ' a, ' . ACL_OPTIONS_TABLE . ' ao
+ WHERE a.auth_role_id = 0
+ AND a.auth_option_id = ao.auth_option_id ' .
+ (($sql_user) ? 'AND a.' . $sql_user : '') . "
+ $sql_forum
+ $sql_opts
+ ORDER BY a.forum_id, ao.auth_option";
+
+ // Now the role settings - user-specific
+ $sql_ary[] = 'SELECT a.user_id, a.forum_id, r.auth_option_id, r.auth_setting, r.auth_option_id, ao.auth_option
+ FROM ' . ACL_USERS_TABLE . ' a, ' . ACL_ROLES_DATA_TABLE . ' r, ' . ACL_OPTIONS_TABLE . ' ao
+ WHERE a.auth_role_id = r.role_id
+ AND r.auth_option_id = ao.auth_option_id ' .
+ (($sql_user) ? 'AND a.' . $sql_user : '') . "
+ $sql_forum
+ $sql_opts
+ ORDER BY a.forum_id, ao.auth_option";
+
+ foreach ($sql_ary as $sql)
+ {
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']] = $row['auth_setting'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ return $hold_ary;
+ }
+
+ /**
+ * Get raw group based permission settings
+ */
+ function acl_group_raw_data($group_id = false, $opts = false, $forum_id = false)
+ {
+ global $db;
+
+ $sql_group = ($group_id !== false) ? ((!is_array($group_id)) ? 'group_id = ' . (int) $group_id : $db->sql_in_set('group_id', array_map('intval', $group_id))) : '';
+ $sql_forum = ($forum_id !== false) ? ((!is_array($forum_id)) ? 'AND a.forum_id = ' . (int) $forum_id : 'AND ' . $db->sql_in_set('a.forum_id', array_map('intval', $forum_id))) : '';
+
+ $sql_opts = '';
+ $hold_ary = $sql_ary = array();
+
+ if ($opts !== false)
+ {
+ $this->build_auth_option_statement('ao.auth_option', $opts, $sql_opts);
+ }
+
+ // Grab group settings - non-role specific...
+ $sql_ary[] = 'SELECT a.group_id, a.forum_id, a.auth_setting, a.auth_option_id, ao.auth_option
+ FROM ' . ACL_GROUPS_TABLE . ' a, ' . ACL_OPTIONS_TABLE . ' ao
+ WHERE a.auth_role_id = 0
+ AND a.auth_option_id = ao.auth_option_id ' .
+ (($sql_group) ? 'AND a.' . $sql_group : '') . "
+ $sql_forum
+ $sql_opts
+ ORDER BY a.forum_id, ao.auth_option";
+
+ // Now grab group settings - role specific...
+ $sql_ary[] = 'SELECT a.group_id, a.forum_id, r.auth_setting, r.auth_option_id, ao.auth_option
+ FROM ' . ACL_GROUPS_TABLE . ' a, ' . ACL_ROLES_DATA_TABLE . ' r, ' . ACL_OPTIONS_TABLE . ' ao
+ WHERE a.auth_role_id = r.role_id
+ AND r.auth_option_id = ao.auth_option_id ' .
+ (($sql_group) ? 'AND a.' . $sql_group : '') . "
+ $sql_forum
+ $sql_opts
+ ORDER BY a.forum_id, ao.auth_option";
+
+ foreach ($sql_ary as $sql)
+ {
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $hold_ary[$row['group_id']][$row['forum_id']][$row['auth_option']] = $row['auth_setting'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ return $hold_ary;
+ }
+
+ /**
+ * Get raw acl data based on user for caching user_permissions
+ * This function returns the same data as acl_raw_data(), but without the user id as the first key within the array.
+ */
+ function acl_raw_data_single_user($user_id)
+ {
+ global $db, $cache;
+
+ // Check if the role-cache is there
+ if (($this->role_cache = $cache->get('_role_cache')) === false)
+ {
+ $this->role_cache = array();
+
+ // We pre-fetch roles
+ $sql = 'SELECT *
+ FROM ' . ACL_ROLES_DATA_TABLE . '
+ ORDER BY role_id ASC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $this->role_cache[$row['role_id']][$row['auth_option_id']] = (int) $row['auth_setting'];
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($this->role_cache as $role_id => $role_options)
+ {
+ $this->role_cache[$role_id] = serialize($role_options);
+ }
+
+ $cache->put('_role_cache', $this->role_cache);
+ }
+
+ $hold_ary = array();
+
+ // Grab user-specific permission settings
+ $sql = 'SELECT forum_id, auth_option_id, auth_role_id, auth_setting
+ FROM ' . ACL_USERS_TABLE . '
+ WHERE user_id = ' . $user_id;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // If a role is assigned, assign all options included within this role. Else, only set this one option.
+ if ($row['auth_role_id'])
+ {
+ $hold_ary[$row['forum_id']] = (empty($hold_ary[$row['forum_id']])) ? unserialize($this->role_cache[$row['auth_role_id']]) : $hold_ary[$row['forum_id']] + unserialize($this->role_cache[$row['auth_role_id']]);
+ }
+ else
+ {
+ $hold_ary[$row['forum_id']][$row['auth_option_id']] = $row['auth_setting'];
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // Now grab group-specific permission settings
+ $sql = 'SELECT a.forum_id, a.auth_option_id, a.auth_role_id, a.auth_setting
+ FROM ' . ACL_GROUPS_TABLE . ' a, ' . USER_GROUP_TABLE . ' ug, ' . GROUPS_TABLE . ' g
+ WHERE a.group_id = ug.group_id
+ AND g.group_id = ug.group_id
+ AND ug.user_pending = 0
+ AND NOT (ug.group_leader = 1 AND g.group_skip_auth = 1)
+ AND ug.user_id = ' . $user_id;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!$row['auth_role_id'])
+ {
+ $this->_set_group_hold_ary($hold_ary[$row['forum_id']], $row['auth_option_id'], $row['auth_setting']);
+ }
+ else if (!empty($this->role_cache[$row['auth_role_id']]))
+ {
+ foreach (unserialize($this->role_cache[$row['auth_role_id']]) as $option_id => $setting)
+ {
+ $this->_set_group_hold_ary($hold_ary[$row['forum_id']], $option_id, $setting);
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+
+ return $hold_ary;
+ }
+
+ /**
+ * Private function snippet for setting a specific piece of the hold_ary
+ */
+ function _set_group_hold_ary(&$hold_ary, $option_id, $setting)
+ {
+ if (!isset($hold_ary[$option_id]) || (isset($hold_ary[$option_id]) && $hold_ary[$option_id] != ACL_NEVER))
+ {
+ $hold_ary[$option_id] = $setting;
+
+ // If we detect ACL_NEVER, we will unset the flag option (within building the bitstring it is correctly set again)
+ if ($setting == ACL_NEVER)
+ {
+ $flag = substr($this->acl_options['option'][$option_id], 0, strpos($this->acl_options['option'][$option_id], '_') + 1);
+ $flag = (int) $this->acl_options['id'][$flag];
+
+ if (isset($hold_ary[$flag]) && $hold_ary[$flag] == ACL_YES)
+ {
+ unset($hold_ary[$flag]);
+
+/* This is uncommented, because i suspect this being slightly wrong due to mixed permission classes being possible
+ if (in_array(ACL_YES, $hold_ary))
+ {
+ $hold_ary[$flag] = ACL_YES;
+ }*/
+ }
+ }
+ }
+ }
+
+ /**
+ * Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
+ */
+ function login($username, $password, $autologin = false, $viewonline = 1, $admin = 0)
+ {
+ global $config, $db, $user, $phpbb_root_path, $phpEx;
+
+ $method = trim(basename($config['auth_method']));
+ include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
+
+ $method = 'login_' . $method;
+ if (function_exists($method))
+ {
+ $login = $method($username, $password);
+
+ // If the auth module wants us to create an empty profile do so and then treat the status as LOGIN_SUCCESS
+ if ($login['status'] == LOGIN_SUCCESS_CREATE_PROFILE)
+ {
+ // we are going to use the user_add function so include functions_user.php if it wasn't defined yet
+ if (!function_exists('user_add'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
+
+ user_add($login['user_row'], (isset($login['cp_data'])) ? $login['cp_data'] : false);
+
+ $sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type
+ FROM ' . USERS_TABLE . "
+ WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
+ 'error_msg' => 'AUTH_NO_PROFILE_CREATED',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ $login = array(
+ 'status' => LOGIN_SUCCESS,
+ 'error_msg' => false,
+ 'user_row' => $row,
+ );
+ }
+
+ // If login succeeded, we will log the user in... else we pass the login array through...
+ if ($login['status'] == LOGIN_SUCCESS)
+ {
+ $old_session_id = $user->session_id;
+
+ if ($admin)
+ {
+ global $SID, $_SID;
+
+ $cookie_expire = time() - 31536000;
+ $user->set_cookie('u', '', $cookie_expire);
+ $user->set_cookie('sid', '', $cookie_expire);
+ unset($cookie_expire);
+
+ $SID = '?sid=';
+ $user->session_id = $_SID = '';
+ }
+
+ $result = $user->session_create($login['user_row']['user_id'], $admin, $autologin, $viewonline);
+
+ // Successful session creation
+ if ($result === true)
+ {
+ // If admin re-authentication we remove the old session entry because a new one has been created...
+ if ($admin)
+ {
+ // the login array is used because the user ids do not differ for re-authentication
+ $sql = 'DELETE FROM ' . SESSIONS_TABLE . "
+ WHERE session_id = '" . $db->sql_escape($old_session_id) . "'
+ AND session_user_id = {$login['user_row']['user_id']}";
+ $db->sql_query($sql);
+ }
+
+ return array(
+ 'status' => LOGIN_SUCCESS,
+ 'error_msg' => false,
+ 'user_row' => $login['user_row'],
+ );
+ }
+
+ return array(
+ 'status' => LOGIN_BREAK,
+ 'error_msg' => $result,
+ 'user_row' => $login['user_row'],
+ );
+ }
+
+ return $login;
+ }
+
+ trigger_error('Authentication method not found', E_USER_ERROR);
+ }
+
+ /**
+ * Fill auth_option statement for later querying based on the supplied options
+ */
+ function build_auth_option_statement($key, $auth_options, &$sql_opts)
+ {
+ global $db;
+
+ if (!is_array($auth_options))
+ {
+ if (strpos($auth_options, '%') !== false)
+ {
+ $sql_opts = "AND $key " . $db->sql_like_expression(str_replace('%', $db->any_char, $auth_options));
+ }
+ else
+ {
+ $sql_opts = "AND $key = '" . $db->sql_escape($auth_options) . "'";
+ }
+ }
+ else
+ {
+ $is_like_expression = false;
+
+ foreach ($auth_options as $option)
+ {
+ if (strpos($option, '%') !== false)
+ {
+ $is_like_expression = true;
+ }
+ }
+
+ if (!$is_like_expression)
+ {
+ $sql_opts = 'AND ' . $db->sql_in_set($key, $auth_options);
+ }
+ else
+ {
+ $sql = array();
+
+ foreach ($auth_options as $option)
+ {
+ if (strpos($option, '%') !== false)
+ {
+ $sql[] = $key . ' ' . $db->sql_like_expression(str_replace('%', $db->any_char, $option));
+ }
+ else
+ {
+ $sql[] = $key . " = '" . $db->sql_escape($option) . "'";
+ }
+ }
+
+ $sql_opts = 'AND (' . implode(' OR ', $sql) . ')';
+ }
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/auth/auth_apache.php b/phpBB/includes/auth/auth_apache.php
new file mode 100644
index 0000000000..391e7abb0e
--- /dev/null
+++ b/phpBB/includes/auth/auth_apache.php
@@ -0,0 +1,249 @@
+<?php
+/**
+* Apache auth plug-in for phpBB3
+*
+* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
+*
+* @package login
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Checks whether the user is identified to apache
+* Only allow changing authentication to apache if the user is identified
+* Called in acp_board while setting authentication plugins
+*
+* @return boolean|string false if the user is identified and else an error message
+*/
+function init_apache()
+{
+ global $user;
+
+ if (!isset($_SERVER['PHP_AUTH_USER']) || $user->data['username'] !== $_SERVER['PHP_AUTH_USER'])
+ {
+ return $user->lang['APACHE_SETUP_BEFORE_USE'];
+ }
+ return false;
+}
+
+/**
+* Login function
+*/
+function login_apache(&$username, &$password)
+{
+ global $db;
+
+ // do not allow empty password
+ if (!$password)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_PASSWORD,
+ 'error_msg' => 'NO_PASSWORD_SUPPLIED',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ if (!$username)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_USERNAME,
+ 'error_msg' => 'LOGIN_ERROR_USERNAME',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ if (!isset($_SERVER['PHP_AUTH_USER']))
+ {
+ return array(
+ 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
+ 'error_msg' => 'LOGIN_ERROR_EXTERNAL_AUTH_APACHE',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ $php_auth_user = $_SERVER['PHP_AUTH_USER'];
+ $php_auth_pw = $_SERVER['PHP_AUTH_PW'];
+
+ if (!empty($php_auth_user) && !empty($php_auth_pw))
+ {
+ if ($php_auth_user !== $username)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_USERNAME,
+ 'error_msg' => 'LOGIN_ERROR_USERNAME',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ $sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type
+ FROM ' . USERS_TABLE . "
+ WHERE username = '" . $db->sql_escape($php_auth_user) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ // User inactive...
+ if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_ACTIVE,
+ 'error_msg' => 'ACTIVE_ERROR',
+ 'user_row' => $row,
+ );
+ }
+
+ // Successful login...
+ return array(
+ 'status' => LOGIN_SUCCESS,
+ 'error_msg' => false,
+ 'user_row' => $row,
+ );
+ }
+
+ // this is the user's first login so create an empty profile
+ return array(
+ 'status' => LOGIN_SUCCESS_CREATE_PROFILE,
+ 'error_msg' => false,
+ 'user_row' => user_row_apache($php_auth_user, $php_auth_pw),
+ );
+ }
+
+ // Not logged into apache
+ return array(
+ 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
+ 'error_msg' => 'LOGIN_ERROR_EXTERNAL_AUTH_APACHE',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+}
+
+/**
+* Autologin function
+*
+* @return array containing the user row or empty if no auto login should take place
+*/
+function autologin_apache()
+{
+ global $db;
+
+ if (!isset($_SERVER['PHP_AUTH_USER']))
+ {
+ return array();
+ }
+
+ $php_auth_user = $_SERVER['PHP_AUTH_USER'];
+ $php_auth_pw = $_SERVER['PHP_AUTH_PW'];
+
+ if (!empty($php_auth_user) && !empty($php_auth_pw))
+ {
+ set_var($php_auth_user, $php_auth_user, 'string', true);
+ set_var($php_auth_pw, $php_auth_pw, 'string', true);
+
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . "
+ WHERE username = '" . $db->sql_escape($php_auth_user) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ return ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE) ? array() : $row;
+ }
+
+ if (!function_exists('user_add'))
+ {
+ global $phpbb_root_path, $phpEx;
+
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
+
+ // create the user if he does not exist yet
+ user_add(user_row_apache($php_auth_user, $php_auth_pw));
+
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . "
+ WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($php_auth_user)) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ return $row;
+ }
+ }
+
+ return array();
+}
+
+/**
+* This function generates an array which can be passed to the user_add function in order to create a user
+*/
+function user_row_apache($username, $password)
+{
+ global $db, $config, $user;
+ // first retrieve default group id
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = '" . $db->sql_escape('REGISTERED') . "'
+ AND group_type = " . GROUP_SPECIAL;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error('NO_GROUP');
+ }
+
+ // generate user account data
+ return array(
+ 'username' => $username,
+ 'user_password' => phpbb_hash($password),
+ 'user_email' => '',
+ 'group_id' => (int) $row['group_id'],
+ 'user_type' => USER_NORMAL,
+ 'user_ip' => $user->ip,
+ 'user_new' => ($config['new_member_post_limit']) ? 1 : 0,
+ );
+}
+
+/**
+* The session validation function checks whether the user is still logged in
+*
+* @return boolean true if the given user is authenticated or false if the session should be closed
+*/
+function validate_session_apache(&$user)
+{
+ // Check if PHP_AUTH_USER is set and handle this case
+ if (isset($_SERVER['PHP_AUTH_USER']))
+ {
+ $php_auth_user = '';
+ set_var($php_auth_user, $_SERVER['PHP_AUTH_USER'], 'string', true);
+
+ return ($php_auth_user === $user['username']) ? true : false;
+ }
+
+ // PHP_AUTH_USER is not set. A valid session is now determined by the user type (anonymous/bot or not)
+ if ($user['user_type'] == USER_IGNORE)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php
new file mode 100644
index 0000000000..71f8a7c082
--- /dev/null
+++ b/phpBB/includes/auth/auth_db.php
@@ -0,0 +1,198 @@
+<?php
+/**
+* Database auth plug-in for phpBB3
+*
+* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
+*
+* This is for authentication via the integrated user table
+*
+* @package login
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Login function
+*/
+function login_db(&$username, &$password)
+{
+ global $db, $config;
+
+ // do not allow empty password
+ if (!$password)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_PASSWORD,
+ 'error_msg' => 'NO_PASSWORD_SUPPLIED',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ if (!$username)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_USERNAME,
+ 'error_msg' => 'LOGIN_ERROR_USERNAME',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ $sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts
+ FROM ' . USERS_TABLE . "
+ WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_USERNAME,
+ 'error_msg' => 'LOGIN_ERROR_USERNAME',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ // If there are too much login attempts, we need to check for an confirm image
+ // Every auth module is able to define what to do by itself...
+ if ($config['max_login_attempts'] && $row['user_login_attempts'] >= $config['max_login_attempts'])
+ {
+ // Visual Confirmation handling
+
+ $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $captcha->init(CONFIRM_LOGIN);
+ $vc_response = $captcha->validate();
+ if ($vc_response)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_ATTEMPTS,
+ 'error_msg' => 'LOGIN_ERROR_ATTEMPTS',
+ 'user_row' => $row,
+ );
+ }
+
+ }
+
+ // If the password convert flag is set we need to convert it
+ if ($row['user_pass_convert'])
+ {
+ // in phpBB2 passwords were used exactly as they were sent, with addslashes applied
+ $password_old_format = isset($_REQUEST['password']) ? (string) $_REQUEST['password'] : '';
+ $password_old_format = (!STRIP) ? addslashes($password_old_format) : $password_old_format;
+ $password_new_format = '';
+
+ set_var($password_new_format, stripslashes($password_old_format), 'string');
+
+ if ($password == $password_new_format)
+ {
+ if (!function_exists('utf8_to_cp1252'))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx);
+ }
+
+ // cp1252 is phpBB2's default encoding, characters outside ASCII range might work when converted into that encoding
+ // plain md5 support left in for conversions from other systems.
+ if ((strlen($row['user_password']) == 34 && (phpbb_check_hash(md5($password_old_format), $row['user_password']) || phpbb_check_hash(md5(utf8_to_cp1252($password_old_format)), $row['user_password'])))
+ || (strlen($row['user_password']) == 32 && (md5($password_old_format) == $row['user_password'] || md5(utf8_to_cp1252($password_old_format)) == $row['user_password'])))
+ {
+ $hash = phpbb_hash($password_new_format);
+
+ // Update the password in the users table to the new format and remove user_pass_convert flag
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_password = \'' . $db->sql_escape($hash) . '\',
+ user_pass_convert = 0
+ WHERE user_id = ' . $row['user_id'];
+ $db->sql_query($sql);
+
+ $row['user_pass_convert'] = 0;
+ $row['user_password'] = $hash;
+ }
+ else
+ {
+ // Although we weren't able to convert this password we have to
+ // increase login attempt count to make sure this cannot be exploited
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_login_attempts = user_login_attempts + 1
+ WHERE user_id = ' . $row['user_id'];
+ $db->sql_query($sql);
+
+ return array(
+ 'status' => LOGIN_ERROR_PASSWORD_CONVERT,
+ 'error_msg' => 'LOGIN_ERROR_PASSWORD_CONVERT',
+ 'user_row' => $row,
+ );
+ }
+ }
+ }
+
+ // Check password ...
+ if (!$row['user_pass_convert'] && phpbb_check_hash($password, $row['user_password']))
+ {
+ // Check for old password hash...
+ if (strlen($row['user_password']) == 32)
+ {
+ $hash = phpbb_hash($password);
+
+ // Update the password in the users table to the new format
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_password = '" . $db->sql_escape($hash) . "',
+ user_pass_convert = 0
+ WHERE user_id = {$row['user_id']}";
+ $db->sql_query($sql);
+
+ $row['user_password'] = $hash;
+ }
+
+ if ($row['user_login_attempts'] != 0)
+ {
+ // Successful, reset login attempts (the user passed all stages)
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_login_attempts = 0
+ WHERE user_id = ' . $row['user_id'];
+ $db->sql_query($sql);
+ }
+
+ // User inactive...
+ if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_ACTIVE,
+ 'error_msg' => 'ACTIVE_ERROR',
+ 'user_row' => $row,
+ );
+ }
+
+ // Successful login... set user_login_attempts to zero...
+ return array(
+ 'status' => LOGIN_SUCCESS,
+ 'error_msg' => false,
+ 'user_row' => $row,
+ );
+ }
+
+ // Password incorrect - increase login attempts
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_login_attempts = user_login_attempts + 1
+ WHERE user_id = ' . $row['user_id'];
+ $db->sql_query($sql);
+
+ // Give status about wrong password...
+ return array(
+ 'status' => LOGIN_ERROR_PASSWORD,
+ 'error_msg' => 'LOGIN_ERROR_PASSWORD',
+ 'user_row' => $row,
+ );
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/auth/auth_ldap.php b/phpBB/includes/auth/auth_ldap.php
new file mode 100644
index 0000000000..a6092baba5
--- /dev/null
+++ b/phpBB/includes/auth/auth_ldap.php
@@ -0,0 +1,349 @@
+<?php
+/**
+*
+* LDAP auth plug-in for phpBB3
+*
+* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
+*
+* @package login
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Connect to ldap server
+* Only allow changing authentication to ldap if we can connect to the ldap server
+* Called in acp_board while setting authentication plugins
+*/
+function init_ldap()
+{
+ global $config, $user;
+
+ if (!@extension_loaded('ldap'))
+ {
+ return $user->lang['LDAP_NO_LDAP_EXTENSION'];
+ }
+
+ $config['ldap_port'] = (int) $config['ldap_port'];
+ if ($config['ldap_port'])
+ {
+ $ldap = @ldap_connect($config['ldap_server'], $config['ldap_port']);
+ }
+ else
+ {
+ $ldap = @ldap_connect($config['ldap_server']);
+ }
+
+ if (!$ldap)
+ {
+ return $user->lang['LDAP_NO_SERVER_CONNECTION'];
+ }
+
+ @ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
+ @ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
+
+ if ($config['ldap_user'] || $config['ldap_password'])
+ {
+ if (!@ldap_bind($ldap, htmlspecialchars_decode($config['ldap_user']), htmlspecialchars_decode($config['ldap_password'])))
+ {
+ return $user->lang['LDAP_INCORRECT_USER_PASSWORD'];
+ }
+ }
+
+ // ldap_connect only checks whether the specified server is valid, so the connection might still fail
+ $search = @ldap_search(
+ $ldap,
+ htmlspecialchars_decode($config['ldap_base_dn']),
+ ldap_user_filter($user->data['username']),
+ (empty($config['ldap_email'])) ?
+ array(htmlspecialchars_decode($config['ldap_uid'])) :
+ array(htmlspecialchars_decode($config['ldap_uid']), htmlspecialchars_decode($config['ldap_email'])),
+ 0,
+ 1
+ );
+
+ if ($search === false)
+ {
+ return $user->lang['LDAP_NO_SERVER_CONNECTION'];
+ }
+
+ $result = @ldap_get_entries($ldap, $search);
+
+ @ldap_close($ldap);
+
+
+ if (!is_array($result) || sizeof($result) < 2)
+ {
+ return sprintf($user->lang['LDAP_NO_IDENTITY'], $user->data['username']);
+ }
+
+ if (!empty($config['ldap_email']) && !isset($result[0][htmlspecialchars_decode($config['ldap_email'])]))
+ {
+ return $user->lang['LDAP_NO_EMAIL'];
+ }
+
+ return false;
+}
+
+/**
+* Login function
+*/
+function login_ldap(&$username, &$password)
+{
+ global $db, $config, $user;
+
+ // do not allow empty password
+ if (!$password)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_PASSWORD,
+ 'error_msg' => 'NO_PASSWORD_SUPPLIED',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ if (!$username)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_USERNAME,
+ 'error_msg' => 'LOGIN_ERROR_USERNAME',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ if (!@extension_loaded('ldap'))
+ {
+ return array(
+ 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
+ 'error_msg' => 'LDAP_NO_LDAP_EXTENSION',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ $config['ldap_port'] = (int) $config['ldap_port'];
+ if ($config['ldap_port'])
+ {
+ $ldap = @ldap_connect($config['ldap_server'], $config['ldap_port']);
+ }
+ else
+ {
+ $ldap = @ldap_connect($config['ldap_server']);
+ }
+
+ if (!$ldap)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
+ 'error_msg' => 'LDAP_NO_SERVER_CONNECTION',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ @ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
+ @ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
+
+ if ($config['ldap_user'] || $config['ldap_password'])
+ {
+ if (!@ldap_bind($ldap, htmlspecialchars_decode($config['ldap_user']), htmlspecialchars_decode($config['ldap_password'])))
+ {
+ return $user->lang['LDAP_NO_SERVER_CONNECTION'];
+ }
+ }
+
+ $search = @ldap_search(
+ $ldap,
+ htmlspecialchars_decode($config['ldap_base_dn']),
+ ldap_user_filter($username),
+ (empty($config['ldap_email'])) ?
+ array(htmlspecialchars_decode($config['ldap_uid'])) :
+ array(htmlspecialchars_decode($config['ldap_uid']), htmlspecialchars_decode($config['ldap_email'])),
+ 0,
+ 1
+ );
+
+ $ldap_result = @ldap_get_entries($ldap, $search);
+
+ if (is_array($ldap_result) && sizeof($ldap_result) > 1)
+ {
+ if (@ldap_bind($ldap, $ldap_result[0]['dn'], htmlspecialchars_decode($password)))
+ {
+ @ldap_close($ldap);
+
+ $sql ='SELECT user_id, username, user_password, user_passchg, user_email, user_type
+ FROM ' . USERS_TABLE . "
+ WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ unset($ldap_result);
+
+ // User inactive...
+ if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_ACTIVE,
+ 'error_msg' => 'ACTIVE_ERROR',
+ 'user_row' => $row,
+ );
+ }
+
+ // Successful login... set user_login_attempts to zero...
+ return array(
+ 'status' => LOGIN_SUCCESS,
+ 'error_msg' => false,
+ 'user_row' => $row,
+ );
+ }
+ else
+ {
+ // retrieve default group id
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = '" . $db->sql_escape('REGISTERED') . "'
+ AND group_type = " . GROUP_SPECIAL;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error('NO_GROUP');
+ }
+
+ // generate user account data
+ $ldap_user_row = array(
+ 'username' => $username,
+ 'user_password' => phpbb_hash($password),
+ 'user_email' => (!empty($config['ldap_email'])) ? utf8_htmlspecialchars($ldap_result[0][htmlspecialchars_decode($config['ldap_email'])][0]) : '',
+ 'group_id' => (int) $row['group_id'],
+ 'user_type' => USER_NORMAL,
+ 'user_ip' => $user->ip,
+ 'user_new' => ($config['new_member_post_limit']) ? 1 : 0,
+ );
+
+ unset($ldap_result);
+
+ // this is the user's first login so create an empty profile
+ return array(
+ 'status' => LOGIN_SUCCESS_CREATE_PROFILE,
+ 'error_msg' => false,
+ 'user_row' => $ldap_user_row,
+ );
+ }
+ }
+ else
+ {
+ unset($ldap_result);
+ @ldap_close($ldap);
+
+ // Give status about wrong password...
+ return array(
+ 'status' => LOGIN_ERROR_PASSWORD,
+ 'error_msg' => 'LOGIN_ERROR_PASSWORD',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+ }
+
+ @ldap_close($ldap);
+
+ return array(
+ 'status' => LOGIN_ERROR_USERNAME,
+ 'error_msg' => 'LOGIN_ERROR_USERNAME',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+}
+
+/**
+* Generates a filter string for ldap_search to find a user
+*
+* @param $username string Username identifying the searched user
+*
+* @return string A filter string for ldap_search
+*/
+function ldap_user_filter($username)
+{
+ global $config;
+
+ $filter = '(' . $config['ldap_uid'] . '=' . ldap_escape(htmlspecialchars_decode($username)) . ')';
+ if ($config['ldap_user_filter'])
+ {
+ $_filter = ($config['ldap_user_filter'][0] == '(' && substr($config['ldap_user_filter'], -1) == ')') ? $config['ldap_user_filter'] : "({$config['ldap_user_filter']})";
+ $filter = "(&{$filter}{$_filter})";
+ }
+ return $filter;
+}
+
+/**
+* Escapes an LDAP AttributeValue
+*/
+function ldap_escape($string)
+{
+ return str_replace(array('*', '\\', '(', ')'), array('\\*', '\\\\', '\\(', '\\)'), $string);
+}
+
+/**
+* This function is used to output any required fields in the authentication
+* admin panel. It also defines any required configuration table fields.
+*/
+function acp_ldap(&$new)
+{
+ global $user;
+
+ $tpl = '
+
+ <dl>
+ <dt><label for="ldap_server">' . $user->lang['LDAP_SERVER'] . ':</label><br /><span>' . $user->lang['LDAP_SERVER_EXPLAIN'] . '</span></dt>
+ <dd><input type="text" id="ldap_server" size="40" name="config[ldap_server]" value="' . $new['ldap_server'] . '" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="ldap_port">' . $user->lang['LDAP_PORT'] . ':</label><br /><span>' . $user->lang['LDAP_PORT_EXPLAIN'] . '</span></dt>
+ <dd><input type="text" id="ldap_port" size="40" name="config[ldap_port]" value="' . $new['ldap_port'] . '" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="ldap_dn">' . $user->lang['LDAP_DN'] . ':</label><br /><span>' . $user->lang['LDAP_DN_EXPLAIN'] . '</span></dt>
+ <dd><input type="text" id="ldap_dn" size="40" name="config[ldap_base_dn]" value="' . $new['ldap_base_dn'] . '" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="ldap_uid">' . $user->lang['LDAP_UID'] . ':</label><br /><span>' . $user->lang['LDAP_UID_EXPLAIN'] . '</span></dt>
+ <dd><input type="text" id="ldap_uid" size="40" name="config[ldap_uid]" value="' . $new['ldap_uid'] . '" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="ldap_user_filter">' . $user->lang['LDAP_USER_FILTER'] . ':</label><br /><span>' . $user->lang['LDAP_USER_FILTER_EXPLAIN'] . '</span></dt>
+ <dd><input type="text" id="ldap_user_filter" size="40" name="config[ldap_user_filter]" value="' . $new['ldap_user_filter'] . '" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="ldap_email">' . $user->lang['LDAP_EMAIL'] . ':</label><br /><span>' . $user->lang['LDAP_EMAIL_EXPLAIN'] . '</span></dt>
+ <dd><input type="text" id="ldap_email" size="40" name="config[ldap_email]" value="' . $new['ldap_email'] . '" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="ldap_user">' . $user->lang['LDAP_USER'] . ':</label><br /><span>' . $user->lang['LDAP_USER_EXPLAIN'] . '</span></dt>
+ <dd><input type="text" id="ldap_user" size="40" name="config[ldap_user]" value="' . $new['ldap_user'] . '" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="ldap_password">' . $user->lang['LDAP_PASSWORD'] . ':</label><br /><span>' . $user->lang['LDAP_PASSWORD_EXPLAIN'] . '</span></dt>
+ <dd><input type="password" id="ldap_password" size="40" name="config[ldap_password]" value="' . $new['ldap_password'] . '" /></dd>
+ </dl>
+ ';
+
+ // These are fields required in the config table
+ return array(
+ 'tpl' => $tpl,
+ 'config' => array('ldap_server', 'ldap_port', 'ldap_base_dn', 'ldap_uid', 'ldap_user_filter', 'ldap_email', 'ldap_user', 'ldap_password')
+ );
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/auth/index.htm b/phpBB/includes/auth/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/includes/auth/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
new file mode 100644
index 0000000000..f58852c00b
--- /dev/null
+++ b/phpBB/includes/bbcode.php
@@ -0,0 +1,602 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* BBCode class
+* @package phpBB3
+*/
+class bbcode
+{
+ var $bbcode_uid = '';
+ var $bbcode_bitfield = '';
+ var $bbcode_cache = array();
+ var $bbcode_template = array();
+
+ var $bbcodes = array();
+
+ var $template_bitfield;
+ var $template_filename = '';
+
+ /**
+ * Constructor
+ * Init bbcode cache entries if bitfield is specified
+ */
+ function bbcode($bitfield = '')
+ {
+ if ($bitfield)
+ {
+ $this->bbcode_bitfield = $bitfield;
+ $this->bbcode_cache_init();
+ }
+ }
+
+ /**
+ * Second pass bbcodes
+ */
+ function bbcode_second_pass(&$message, $bbcode_uid = '', $bbcode_bitfield = false)
+ {
+ if ($bbcode_uid)
+ {
+ $this->bbcode_uid = $bbcode_uid;
+ }
+
+ if ($bbcode_bitfield !== false)
+ {
+ $this->bbcode_bitfield = $bbcode_bitfield;
+
+ // Init those added with a new bbcode_bitfield (already stored codes will not get parsed again)
+ $this->bbcode_cache_init();
+ }
+
+ if (!$this->bbcode_bitfield)
+ {
+ // Remove the uid from tags that have not been transformed into HTML
+ if ($this->bbcode_uid)
+ {
+ $message = str_replace(':' . $this->bbcode_uid, '', $message);
+ }
+
+ return;
+ }
+
+ $str = array('search' => array(), 'replace' => array());
+ $preg = array('search' => array(), 'replace' => array());
+
+ $bitfield = new bitfield($this->bbcode_bitfield);
+ $bbcodes_set = $bitfield->get_all_set();
+
+ $undid_bbcode_specialchars = false;
+ foreach ($bbcodes_set as $bbcode_id)
+ {
+ if (!empty($this->bbcode_cache[$bbcode_id]))
+ {
+ foreach ($this->bbcode_cache[$bbcode_id] as $type => $array)
+ {
+ foreach ($array as $search => $replace)
+ {
+ ${$type}['search'][] = str_replace('$uid', $this->bbcode_uid, $search);
+ ${$type}['replace'][] = $replace;
+ }
+
+ if (sizeof($str['search']))
+ {
+ $message = str_replace($str['search'], $str['replace'], $message);
+ $str = array('search' => array(), 'replace' => array());
+ }
+
+ if (sizeof($preg['search']))
+ {
+ // we need to turn the entities back into their original form to allow the
+ // search patterns to work properly
+ if (!$undid_bbcode_specialchars)
+ {
+ $message = str_replace(array('&#58;', '&#46;'), array(':', '.'), $message);
+ $undid_bbcode_specialchars = true;
+ }
+
+ $message = preg_replace($preg['search'], $preg['replace'], $message);
+ $preg = array('search' => array(), 'replace' => array());
+ }
+ }
+ }
+ }
+
+ // Remove the uid from tags that have not been transformed into HTML
+ $message = str_replace(':' . $this->bbcode_uid, '', $message);
+ }
+
+ /**
+ * Init bbcode cache
+ *
+ * requires: $this->bbcode_bitfield
+ * sets: $this->bbcode_cache with bbcode templates needed for bbcode_bitfield
+ */
+ function bbcode_cache_init()
+ {
+ global $phpbb_root_path, $template, $user;
+
+ if (empty($this->template_filename))
+ {
+ $this->template_bitfield = new bitfield($user->theme['bbcode_bitfield']);
+ $this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/bbcode.html';
+
+ if (!@file_exists($this->template_filename))
+ {
+ if (isset($template->orig_tpl_inherits_id) && $template->orig_tpl_inherits_id)
+ {
+ $this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template/bbcode.html';
+ if (!@file_exists($this->template_filename))
+ {
+ trigger_error('The file ' . $this->template_filename . ' is missing.', E_USER_ERROR);
+ }
+ }
+ else
+ {
+ trigger_error('The file ' . $this->template_filename . ' is missing.', E_USER_ERROR);
+ }
+ }
+ }
+
+ $bbcode_ids = $rowset = $sql = array();
+
+ $bitfield = new bitfield($this->bbcode_bitfield);
+ $bbcodes_set = $bitfield->get_all_set();
+
+ foreach ($bbcodes_set as $bbcode_id)
+ {
+ if (isset($this->bbcode_cache[$bbcode_id]))
+ {
+ // do not try to re-cache it if it's already in
+ continue;
+ }
+ $bbcode_ids[] = $bbcode_id;
+
+ if ($bbcode_id > NUM_CORE_BBCODES)
+ {
+ $sql[] = $bbcode_id;
+ }
+ }
+
+ if (sizeof($sql))
+ {
+ global $db;
+
+ $sql = 'SELECT *
+ FROM ' . BBCODES_TABLE . '
+ WHERE ' . $db->sql_in_set('bbcode_id', $sql);
+ $result = $db->sql_query($sql, 3600);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // To circumvent replacing newlines with <br /> for the generated html,
+ // we use carriage returns here. They are later changed back to newlines
+ $row['bbcode_tpl'] = str_replace("\n", "\r", $row['bbcode_tpl']);
+ $row['second_pass_replace'] = str_replace("\n", "\r", $row['second_pass_replace']);
+
+ $rowset[$row['bbcode_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ foreach ($bbcode_ids as $bbcode_id)
+ {
+ switch ($bbcode_id)
+ {
+ case 0:
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'str' => array(
+ '[/quote:$uid]' => $this->bbcode_tpl('quote_close', $bbcode_id)
+ ),
+ 'preg' => array(
+ '#\[quote(?:=&quot;(.*?)&quot;)?:$uid\]((?!\[quote(?:=&quot;.*?&quot;)?:$uid\]).)?#ise' => "\$this->bbcode_second_pass_quote('\$1', '\$2')"
+ )
+ );
+ break;
+
+ case 1:
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'str' => array(
+ '[b:$uid]' => $this->bbcode_tpl('b_open', $bbcode_id),
+ '[/b:$uid]' => $this->bbcode_tpl('b_close', $bbcode_id),
+ )
+ );
+ break;
+
+ case 2:
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'str' => array(
+ '[i:$uid]' => $this->bbcode_tpl('i_open', $bbcode_id),
+ '[/i:$uid]' => $this->bbcode_tpl('i_close', $bbcode_id),
+ )
+ );
+ break;
+
+ case 3:
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'preg' => array(
+ '#\[url:$uid\]((.*?))\[/url:$uid\]#s' => $this->bbcode_tpl('url', $bbcode_id),
+ '#\[url=([^\[]+?):$uid\](.*?)\[/url:$uid\]#s' => $this->bbcode_tpl('url', $bbcode_id),
+ )
+ );
+ break;
+
+ case 4:
+ if ($user->optionget('viewimg'))
+ {
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'preg' => array(
+ '#\[img:$uid\](.*?)\[/img:$uid\]#s' => $this->bbcode_tpl('img', $bbcode_id),
+ )
+ );
+ }
+ else
+ {
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'preg' => array(
+ '#\[img:$uid\](.*?)\[/img:$uid\]#s' => str_replace('$2', '[ img ]', $this->bbcode_tpl('url', $bbcode_id, true)),
+ )
+ );
+ }
+ break;
+
+ case 5:
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'preg' => array(
+ '#\[size=([\-\+]?\d+):$uid\](.*?)\[/size:$uid\]#s' => $this->bbcode_tpl('size', $bbcode_id),
+ )
+ );
+ break;
+
+ case 6:
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'preg' => array(
+ '!\[color=(#[0-9a-f]{3}|#[0-9a-f]{6}|[a-z\-]+):$uid\](.*?)\[/color:$uid\]!is' => $this->bbcode_tpl('color', $bbcode_id),
+ )
+ );
+ break;
+
+ case 7:
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'str' => array(
+ '[u:$uid]' => $this->bbcode_tpl('u_open', $bbcode_id),
+ '[/u:$uid]' => $this->bbcode_tpl('u_close', $bbcode_id),
+ )
+ );
+ break;
+
+ case 8:
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'preg' => array(
+ '#\[code(?:=([a-z]+))?:$uid\](.*?)\[/code:$uid\]#ise' => "\$this->bbcode_second_pass_code('\$1', '\$2')",
+ )
+ );
+ break;
+
+ case 9:
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'preg' => array(
+ '#(\[\/?(list|\*):[mou]?:?$uid\])[\n]{1}#' => "\$1",
+ '#(\[list=([^\[]+):$uid\])[\n]{1}#' => "\$1",
+ '#\[list=([^\[]+):$uid\]#e' => "\$this->bbcode_list('\$1')",
+ ),
+ 'str' => array(
+ '[list:$uid]' => $this->bbcode_tpl('ulist_open_default', $bbcode_id),
+ '[/list:u:$uid]' => $this->bbcode_tpl('ulist_close', $bbcode_id),
+ '[/list:o:$uid]' => $this->bbcode_tpl('olist_close', $bbcode_id),
+ '[*:$uid]' => $this->bbcode_tpl('listitem', $bbcode_id),
+ '[/*:$uid]' => $this->bbcode_tpl('listitem_close', $bbcode_id),
+ '[/*:m:$uid]' => $this->bbcode_tpl('listitem_close', $bbcode_id)
+ ),
+ );
+ break;
+
+ case 10:
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'preg' => array(
+ '#\[email:$uid\]((.*?))\[/email:$uid\]#is' => $this->bbcode_tpl('email', $bbcode_id),
+ '#\[email=([^\[]+):$uid\](.*?)\[/email:$uid\]#is' => $this->bbcode_tpl('email', $bbcode_id)
+ )
+ );
+ break;
+
+ case 11:
+ if ($user->optionget('viewflash'))
+ {
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'preg' => array(
+ '#\[flash=([0-9]+),([0-9]+):$uid\](.*?)\[/flash:$uid\]#' => $this->bbcode_tpl('flash', $bbcode_id),
+ )
+ );
+ }
+ else
+ {
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'preg' => array(
+ '#\[flash=([0-9]+),([0-9]+):$uid\](.*?)\[/flash:$uid\]#' => str_replace('$1', '$3', str_replace('$2', '[ flash ]', $this->bbcode_tpl('url', $bbcode_id, true)))
+ )
+ );
+ }
+ break;
+
+ case 12:
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'str' => array(
+ '[/attachment:$uid]' => $this->bbcode_tpl('inline_attachment_close', $bbcode_id)
+ ),
+ 'preg' => array(
+ '#\[attachment=([0-9]+):$uid\]#' => $this->bbcode_tpl('inline_attachment_open', $bbcode_id)
+ )
+ );
+ break;
+
+ default:
+ if (isset($rowset[$bbcode_id]))
+ {
+ if ($this->template_bitfield->get($bbcode_id))
+ {
+ // The bbcode requires a custom template to be loaded
+ if (!$bbcode_tpl = $this->bbcode_tpl($rowset[$bbcode_id]['bbcode_tag'], $bbcode_id))
+ {
+ // For some reason, the required template seems not to be available, use the default template
+ $bbcode_tpl = (!empty($rowset[$bbcode_id]['second_pass_replace'])) ? $rowset[$bbcode_id]['second_pass_replace'] : $rowset[$bbcode_id]['bbcode_tpl'];
+ }
+ else
+ {
+ // In order to use templates with custom bbcodes we need
+ // to replace all {VARS} to corresponding backreferences
+ // Note that backreferences are numbered from bbcode_match
+ if (preg_match_all('/\{(URL|LOCAL_URL|EMAIL|TEXT|SIMPLETEXT|IDENTIFIER|COLOR|NUMBER)[0-9]*\}/', $rowset[$bbcode_id]['bbcode_match'], $m))
+ {
+ foreach ($m[0] as $i => $tok)
+ {
+ $bbcode_tpl = str_replace($tok, '$' . ($i + 1), $bbcode_tpl);
+ }
+ }
+ }
+ }
+ else
+ {
+ // Default template
+ $bbcode_tpl = (!empty($rowset[$bbcode_id]['second_pass_replace'])) ? $rowset[$bbcode_id]['second_pass_replace'] : $rowset[$bbcode_id]['bbcode_tpl'];
+ }
+
+ // Replace {L_*} lang strings
+ $bbcode_tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $bbcode_tpl);
+
+ if (!empty($rowset[$bbcode_id]['second_pass_replace']))
+ {
+ // The custom BBCode requires second-pass pattern replacements
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'preg' => array($rowset[$bbcode_id]['second_pass_match'] => $bbcode_tpl)
+ );
+ }
+ else
+ {
+ $this->bbcode_cache[$bbcode_id] = array(
+ 'str' => array($rowset[$bbcode_id]['second_pass_match'] => $bbcode_tpl)
+ );
+ }
+ }
+ else
+ {
+ $this->bbcode_cache[$bbcode_id] = false;
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * Return bbcode template
+ */
+ function bbcode_tpl($tpl_name, $bbcode_id = -1, $skip_bitfield_check = false)
+ {
+ static $bbcode_hardtpl = array();
+ if (empty($bbcode_hardtpl))
+ {
+ global $user;
+
+ $bbcode_hardtpl = array(
+ 'b_open' => '<span style="font-weight: bold">',
+ 'b_close' => '</span>',
+ 'i_open' => '<span style="font-style: italic">',
+ 'i_close' => '</span>',
+ 'u_open' => '<span style="text-decoration: underline">',
+ 'u_close' => '</span>',
+ 'img' => '<img src="$1" alt="' . $user->lang['IMAGE'] . '" />',
+ 'size' => '<span style="font-size: $1%; line-height: normal">$2</span>',
+ 'color' => '<span style="color: $1">$2</span>',
+ 'email' => '<a href="mailto:$1">$2</a>'
+ );
+ }
+
+ if ($bbcode_id != -1 && !$skip_bitfield_check && !$this->template_bitfield->get($bbcode_id))
+ {
+ return (isset($bbcode_hardtpl[$tpl_name])) ? $bbcode_hardtpl[$tpl_name] : false;
+ }
+
+ if (empty($this->bbcode_template))
+ {
+ if (($tpl = file_get_contents($this->template_filename)) === false)
+ {
+ trigger_error('Could not load bbcode template', E_USER_ERROR);
+ }
+
+ // replace \ with \\ and then ' with \'.
+ $tpl = str_replace('\\', '\\\\', $tpl);
+ $tpl = str_replace("'", "\'", $tpl);
+
+ // strip newlines and indent
+ $tpl = preg_replace("/\n[\n\r\s\t]*/", '', $tpl);
+
+ // Turn template blocks into PHP assignment statements for the values of $bbcode_tpl..
+ $this->bbcode_template = array();
+
+ $matches = preg_match_all('#<!-- BEGIN (.*?) -->(.*?)<!-- END (?:.*?) -->#', $tpl, $match);
+
+ for ($i = 0; $i < $matches; $i++)
+ {
+ if (empty($match[1][$i]))
+ {
+ continue;
+ }
+
+ $this->bbcode_template[$match[1][$i]] = $this->bbcode_tpl_replace($match[1][$i], $match[2][$i]);
+ }
+ }
+
+ return (isset($this->bbcode_template[$tpl_name])) ? $this->bbcode_template[$tpl_name] : ((isset($bbcode_hardtpl[$tpl_name])) ? $bbcode_hardtpl[$tpl_name] : false);
+ }
+
+ /**
+ * Return bbcode template replacement
+ */
+ function bbcode_tpl_replace($tpl_name, $tpl)
+ {
+ global $user;
+
+ static $replacements = array(
+ 'quote_username_open' => array('{USERNAME}' => '$1'),
+ 'color' => array('{COLOR}' => '$1', '{TEXT}' => '$2'),
+ 'size' => array('{SIZE}' => '$1', '{TEXT}' => '$2'),
+ 'img' => array('{URL}' => '$1'),
+ 'flash' => array('{WIDTH}' => '$1', '{HEIGHT}' => '$2', '{URL}' => '$3'),
+ 'url' => array('{URL}' => '$1', '{DESCRIPTION}' => '$2'),
+ 'email' => array('{EMAIL}' => '$1', '{DESCRIPTION}' => '$2')
+ );
+
+ $tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);
+
+ if (!empty($replacements[$tpl_name]))
+ {
+ $tpl = strtr($tpl, $replacements[$tpl_name]);
+ }
+
+ return trim($tpl);
+ }
+
+ /**
+ * Second parse list bbcode
+ */
+ function bbcode_list($type)
+ {
+ if ($type == '')
+ {
+ $tpl = 'ulist_open_default';
+ $type = 'default';
+ }
+ else if ($type == 'i')
+ {
+ $tpl = 'olist_open';
+ $type = 'lower-roman';
+ }
+ else if ($type == 'I')
+ {
+ $tpl = 'olist_open';
+ $type = 'upper-roman';
+ }
+ else if (preg_match('#^(disc|circle|square)$#i', $type))
+ {
+ $tpl = 'ulist_open';
+ $type = strtolower($type);
+ }
+ else if (preg_match('#^[a-z]$#', $type))
+ {
+ $tpl = 'olist_open';
+ $type = 'lower-alpha';
+ }
+ else if (preg_match('#[A-Z]#', $type))
+ {
+ $tpl = 'olist_open';
+ $type = 'upper-alpha';
+ }
+ else if (is_numeric($type))
+ {
+ $tpl = 'olist_open';
+ $type = 'decimal';
+ }
+ else
+ {
+ $tpl = 'olist_open';
+ $type = 'decimal';
+ }
+
+ return str_replace('{LIST_TYPE}', $type, $this->bbcode_tpl($tpl));
+ }
+
+ /**
+ * Second parse quote tag
+ */
+ function bbcode_second_pass_quote($username, $quote)
+ {
+ // when using the /e modifier, preg_replace slashes double-quotes but does not
+ // seem to slash anything else
+ $quote = str_replace('\"', '"', $quote);
+ $username = str_replace('\"', '"', $username);
+
+ // remove newline at the beginning
+ if ($quote == "\n")
+ {
+ $quote = '';
+ }
+
+ $quote = (($username) ? str_replace('$1', $username, $this->bbcode_tpl('quote_username_open')) : $this->bbcode_tpl('quote_open')) . $quote;
+
+ return $quote;
+ }
+
+ /**
+ * Second parse code tag
+ */
+ function bbcode_second_pass_code($type, $code)
+ {
+ // when using the /e modifier, preg_replace slashes double-quotes but does not
+ // seem to slash anything else
+ $code = str_replace('\"', '"', $code);
+
+ switch ($type)
+ {
+ case 'php':
+ // Not the english way, but valid because of hardcoded syntax highlighting
+ if (strpos($code, '<span class="syntaxdefault"><br /></span>') === 0)
+ {
+ $code = substr($code, 41);
+ }
+
+ // no break;
+
+ default:
+ $code = str_replace("\t", '&nbsp; &nbsp;', $code);
+ $code = str_replace(' ', '&nbsp; ', $code);
+ $code = str_replace(' ', ' &nbsp;', $code);
+
+ // remove newline at the beginning
+ if (!empty($code) && $code[0] == "\n")
+ {
+ $code = substr($code, 1);
+ }
+ break;
+ }
+
+ $code = $this->bbcode_tpl('code_open') . $code . $this->bbcode_tpl('code_close');
+
+ return $code;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/cache.php b/phpBB/includes/cache.php
new file mode 100644
index 0000000000..1effada666
--- /dev/null
+++ b/phpBB/includes/cache.php
@@ -0,0 +1,444 @@
+<?php
+/**
+*
+* @package acm
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Class for grabbing/handling cached entries, extends acm_file or acm_db depending on the setup
+* @package acm
+*/
+class cache extends acm
+{
+ /**
+ * Get config values
+ */
+ function obtain_config()
+ {
+ global $db;
+
+ if (($config = $this->get('config')) !== false)
+ {
+ $sql = 'SELECT config_name, config_value
+ FROM ' . CONFIG_TABLE . '
+ WHERE is_dynamic = 1';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $config[$row['config_name']] = $row['config_value'];
+ }
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $config = $cached_config = array();
+
+ $sql = 'SELECT config_name, config_value, is_dynamic
+ FROM ' . CONFIG_TABLE;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!$row['is_dynamic'])
+ {
+ $cached_config[$row['config_name']] = $row['config_value'];
+ }
+
+ $config[$row['config_name']] = $row['config_value'];
+ }
+ $db->sql_freeresult($result);
+
+ $this->put('config', $cached_config);
+ }
+
+ return $config;
+ }
+
+ /**
+ * Obtain list of naughty words and build preg style replacement arrays for use by the
+ * calling script
+ */
+ function obtain_word_list()
+ {
+ global $db;
+
+ if (($censors = $this->get('_word_censors')) === false)
+ {
+ $sql = 'SELECT word, replacement
+ FROM ' . WORDS_TABLE;
+ $result = $db->sql_query($sql);
+
+ $censors = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false)
+ {
+ $censors['match'][] = '#(?<![\p{Nd}\p{L}_])(' . str_replace('\*', '[\p{Nd}\p{L}_]*?', preg_quote($row['word'], '#')) . ')(?![\p{Nd}\p{L}_])#u';
+ }
+ else
+ {
+ $censors['match'][] = '#(?<!\S)(' . str_replace('\*', '\S*?', preg_quote($row['word'], '#')) . ')(?!\S)#iu';
+ }
+
+ $censors['replace'][] = $row['replacement'];
+ }
+ $db->sql_freeresult($result);
+
+ $this->put('_word_censors', $censors);
+ }
+
+ return $censors;
+ }
+
+ /**
+ * Obtain currently listed icons
+ */
+ function obtain_icons()
+ {
+ if (($icons = $this->get('_icons')) === false)
+ {
+ global $db;
+
+ // Topic icons
+ $sql = 'SELECT *
+ FROM ' . ICONS_TABLE . '
+ ORDER BY icons_order';
+ $result = $db->sql_query($sql);
+
+ $icons = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $icons[$row['icons_id']]['img'] = $row['icons_url'];
+ $icons[$row['icons_id']]['width'] = (int) $row['icons_width'];
+ $icons[$row['icons_id']]['height'] = (int) $row['icons_height'];
+ $icons[$row['icons_id']]['display'] = (bool) $row['display_on_posting'];
+ }
+ $db->sql_freeresult($result);
+
+ $this->put('_icons', $icons);
+ }
+
+ return $icons;
+ }
+
+ /**
+ * Obtain ranks
+ */
+ function obtain_ranks()
+ {
+ if (($ranks = $this->get('_ranks')) === false)
+ {
+ global $db;
+
+ $sql = 'SELECT *
+ FROM ' . RANKS_TABLE . '
+ ORDER BY rank_min DESC';
+ $result = $db->sql_query($sql);
+
+ $ranks = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['rank_special'])
+ {
+ $ranks['special'][$row['rank_id']] = array(
+ 'rank_title' => $row['rank_title'],
+ 'rank_image' => $row['rank_image']
+ );
+ }
+ else
+ {
+ $ranks['normal'][] = array(
+ 'rank_title' => $row['rank_title'],
+ 'rank_min' => $row['rank_min'],
+ 'rank_image' => $row['rank_image']
+ );
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $this->put('_ranks', $ranks);
+ }
+
+ return $ranks;
+ }
+
+ /**
+ * Obtain allowed extensions
+ *
+ * @param mixed $forum_id If false then check for private messaging, if int then check for forum id. If true, then only return extension informations.
+ *
+ * @return array allowed extensions array.
+ */
+ function obtain_attach_extensions($forum_id)
+ {
+ if (($extensions = $this->get('_extensions')) === false)
+ {
+ global $db;
+
+ $extensions = array(
+ '_allowed_post' => array(),
+ '_allowed_pm' => array(),
+ );
+
+ // The rule is to only allow those extensions defined. ;)
+ $sql = 'SELECT e.extension, g.*
+ FROM ' . EXTENSIONS_TABLE . ' e, ' . EXTENSION_GROUPS_TABLE . ' g
+ WHERE e.group_id = g.group_id
+ AND (g.allow_group = 1 OR g.allow_in_pm = 1)';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $extension = strtolower(trim($row['extension']));
+
+ $extensions[$extension] = array(
+ 'display_cat' => (int) $row['cat_id'],
+ 'download_mode' => (int) $row['download_mode'],
+ 'upload_icon' => trim($row['upload_icon']),
+ 'max_filesize' => (int) $row['max_filesize'],
+ 'allow_group' => $row['allow_group'],
+ 'allow_in_pm' => $row['allow_in_pm'],
+ );
+
+ $allowed_forums = ($row['allowed_forums']) ? unserialize(trim($row['allowed_forums'])) : array();
+
+ // Store allowed extensions forum wise
+ if ($row['allow_group'])
+ {
+ $extensions['_allowed_post'][$extension] = (!sizeof($allowed_forums)) ? 0 : $allowed_forums;
+ }
+
+ if ($row['allow_in_pm'])
+ {
+ $extensions['_allowed_pm'][$extension] = 0;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $this->put('_extensions', $extensions);
+ }
+
+ // Forum post
+ if ($forum_id === false)
+ {
+ // We are checking for private messages, therefore we only need to get the pm extensions...
+ $return = array('_allowed_' => array());
+
+ foreach ($extensions['_allowed_pm'] as $extension => $check)
+ {
+ $return['_allowed_'][$extension] = 0;
+ $return[$extension] = $extensions[$extension];
+ }
+
+ $extensions = $return;
+ }
+ else if ($forum_id === true)
+ {
+ return $extensions;
+ }
+ else
+ {
+ $forum_id = (int) $forum_id;
+ $return = array('_allowed_' => array());
+
+ foreach ($extensions['_allowed_post'] as $extension => $check)
+ {
+ // Check for allowed forums
+ if (is_array($check))
+ {
+ $allowed = (!in_array($forum_id, $check)) ? false : true;
+ }
+ else
+ {
+ $allowed = true;
+ }
+
+ if ($allowed)
+ {
+ $return['_allowed_'][$extension] = 0;
+ $return[$extension] = $extensions[$extension];
+ }
+ }
+
+ $extensions = $return;
+ }
+
+ if (!isset($extensions['_allowed_']))
+ {
+ $extensions['_allowed_'] = array();
+ }
+
+ return $extensions;
+ }
+
+ /**
+ * Obtain active bots
+ */
+ function obtain_bots()
+ {
+ if (($bots = $this->get('_bots')) === false)
+ {
+ global $db;
+
+ switch ($db->sql_layer)
+ {
+ case 'mssql':
+ case 'mssql_odbc':
+ $sql = 'SELECT user_id, bot_agent, bot_ip
+ FROM ' . BOTS_TABLE . '
+ WHERE bot_active = 1
+ ORDER BY LEN(bot_agent) DESC';
+ break;
+
+ case 'firebird':
+ $sql = 'SELECT user_id, bot_agent, bot_ip
+ FROM ' . BOTS_TABLE . '
+ WHERE bot_active = 1
+ ORDER BY CHAR_LENGTH(bot_agent) DESC';
+ break;
+
+ // LENGTH supported by MySQL, IBM DB2 and Oracle for sure...
+ default:
+ $sql = 'SELECT user_id, bot_agent, bot_ip
+ FROM ' . BOTS_TABLE . '
+ WHERE bot_active = 1
+ ORDER BY LENGTH(bot_agent) DESC';
+ break;
+ }
+ $result = $db->sql_query($sql);
+
+ $bots = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $bots[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ $this->put('_bots', $bots);
+ }
+
+ return $bots;
+ }
+
+ /**
+ * Obtain cfg file data
+ */
+ function obtain_cfg_items($theme)
+ {
+ global $config, $phpbb_root_path;
+
+ $parsed_items = array(
+ 'theme' => array(),
+ 'template' => array(),
+ 'imageset' => array()
+ );
+
+ foreach ($parsed_items as $key => $parsed_array)
+ {
+ $parsed_array = $this->get('_cfg_' . $key . '_' . $theme[$key . '_path']);
+
+ if ($parsed_array === false)
+ {
+ $parsed_array = array();
+ }
+
+ $reparse = false;
+ $filename = $phpbb_root_path . 'styles/' . $theme[$key . '_path'] . '/' . $key . '/' . $key . '.cfg';
+
+ if (!file_exists($filename))
+ {
+ continue;
+ }
+
+ if (!isset($parsed_array['filetime']) || (($config['load_tplcompile'] && @filemtime($filename) > $parsed_array['filetime'])))
+ {
+ $reparse = true;
+ }
+
+ // Re-parse cfg file
+ if ($reparse)
+ {
+ $parsed_array = parse_cfg_file($filename);
+ $parsed_array['filetime'] = @filemtime($filename);
+
+ $this->put('_cfg_' . $key . '_' . $theme[$key . '_path'], $parsed_array);
+ }
+ $parsed_items[$key] = $parsed_array;
+ }
+
+ return $parsed_items;
+ }
+
+ /**
+ * Obtain disallowed usernames
+ */
+ function obtain_disallowed_usernames()
+ {
+ if (($usernames = $this->get('_disallowed_usernames')) === false)
+ {
+ global $db;
+
+ $sql = 'SELECT disallow_username
+ FROM ' . DISALLOW_TABLE;
+ $result = $db->sql_query($sql);
+
+ $usernames = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $usernames[] = str_replace('%', '.*?', preg_quote(utf8_clean_string($row['disallow_username']), '#'));
+ }
+ $db->sql_freeresult($result);
+
+ $this->put('_disallowed_usernames', $usernames);
+ }
+
+ return $usernames;
+ }
+
+ /**
+ * Obtain hooks...
+ */
+ function obtain_hooks()
+ {
+ global $phpbb_root_path, $phpEx;
+
+ if (($hook_files = $this->get('_hooks')) === false)
+ {
+ $hook_files = array();
+
+ // Now search for hooks...
+ $dh = @opendir($phpbb_root_path . 'includes/hooks/');
+
+ if ($dh)
+ {
+ while (($file = readdir($dh)) !== false)
+ {
+ if (strpos($file, 'hook_') === 0 && substr($file, -(strlen($phpEx) + 1)) === '.' . $phpEx)
+ {
+ $hook_files[] = substr($file, 0, -(strlen($phpEx) + 1));
+ }
+ }
+ closedir($dh);
+ }
+
+ $this->put('_hooks', $hook_files);
+ }
+
+ return $hook_files;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/captcha_factory.php b/phpBB/includes/captcha/captcha_factory.php
new file mode 100644
index 0000000000..73406a954f
--- /dev/null
+++ b/phpBB/includes/captcha/captcha_factory.php
@@ -0,0 +1,100 @@
+<?php
+/**
+*
+* @package VC
+* @version $Id$
+* @copyright (c) 2008 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* A small class for 3.0.x (no autoloader in 3.0.x)
+*
+* @package VC
+*/
+class phpbb_captcha_factory
+{
+ /**
+ * return an instance of class $name in file $name_plugin.php
+ */
+ function &get_instance($name)
+ {
+ global $phpbb_root_path, $phpEx;
+
+ $name = basename($name);
+ if (!class_exists($name))
+ {
+ include($phpbb_root_path . "includes/captcha/plugins/{$name}_plugin." . $phpEx);
+ }
+ $instance =& call_user_func(array($name, 'get_instance'));
+ return $instance;
+ }
+
+ /**
+ * Call the garbage collector
+ */
+ function garbage_collect($name)
+ {
+ global $phpbb_root_path, $phpEx;
+
+ $name = basename($name);
+ if (!class_exists($name))
+ {
+ include($phpbb_root_path . "includes/captcha/plugins/{$name}_plugin." . $phpEx);
+ }
+ call_user_func(array($name, 'garbage_collect'), 0);
+ }
+
+ /**
+ * return a list of all discovered CAPTCHA plugins
+ */
+ function get_captcha_types()
+ {
+ global $phpbb_root_path, $phpEx;
+
+ $captchas = array(
+ 'available' => array(),
+ 'unavailable' => array(),
+ );
+
+ $dp = @opendir($phpbb_root_path . 'includes/captcha/plugins');
+
+ if ($dp)
+ {
+ while (($file = readdir($dp)) !== false)
+ {
+ if ((preg_match('#_plugin\.' . $phpEx . '$#', $file)))
+ {
+ $name = preg_replace('#^(.*?)_plugin\.' . $phpEx . '$#', '\1', $file);
+ if (!class_exists($name))
+ {
+ include($phpbb_root_path . "includes/captcha/plugins/$file");
+ }
+
+ if (call_user_func(array($name, 'is_available')))
+ {
+ $captchas['available'][$name] = call_user_func(array($name, 'get_name'));
+ }
+ else
+ {
+ $captchas['unavailable'][$name] = call_user_func(array($name, 'get_name'));
+ }
+ }
+ }
+ closedir($dp);
+ }
+
+ return $captchas;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/captcha_gd.php b/phpBB/includes/captcha/captcha_gd.php
new file mode 100644
index 0000000000..96e39af85b
--- /dev/null
+++ b/phpBB/includes/captcha/captcha_gd.php
@@ -0,0 +1,2640 @@
+<?php
+/**
+*
+* @package VC
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Original Author - Xore (Robert Hetzler)
+* With contributions from Neothermic
+*
+* @package VC
+*/
+class captcha
+{
+ var $width = 360;
+ var $height = 96;
+
+
+ /**
+ * Create the image containing $code with a seed of $seed
+ */
+ function execute($code, $seed)
+ {
+ global $config;
+
+ mt_srand($seed);
+
+ // Create image
+ $img = imagecreatetruecolor($this->width, $this->height);
+
+ // Generate colours
+ $colour = new colour_manager($img, array(
+ 'random' => true,
+ 'min_value' => 60,
+ ), 'hsv');
+
+ $scheme = $colour->colour_scheme('background', false);
+ $scheme = $colour->mono_range($scheme, 10, false);
+ shuffle($scheme);
+
+ $bg_colours = array_splice($scheme, mt_rand(6, 12));
+
+ // Generate code characters
+ $characters = $sizes = $bounding_boxes = $noise = array();
+ $width_avail = $this->width - 15;
+ $code_len = strlen($code);
+ $captcha_bitmaps = $this->captcha_bitmaps();
+
+ for ($i = 0; $i < $code_len; ++$i)
+ {
+ $characters[$i] = new char_cube3d($captcha_bitmaps, $code[$i]);
+
+ list($min, $max) = $characters[$i]->range();
+ $sizes[$i] = mt_rand($min, $max);
+
+ $box = $characters[$i]->dimensions($sizes[$i]);
+ $width_avail -= ($box[2] - $box[0]);
+ $bounding_boxes[$i] = $box;
+ }
+
+
+ // Redistribute leftover x-space
+ $offset = array();
+ for ($i = 0; $i < $code_len; ++$i)
+ {
+ $denom = ($code_len - $i);
+ $denom = max(1.3, $denom);
+ $offset[$i] = mt_rand(0, (1.5 * $width_avail) / $denom);
+ $width_avail -= $offset[$i];
+ }
+
+ if ($config['captcha_gd_x_grid'])
+ {
+ $grid = (int) $config['captcha_gd_x_grid'];
+ for ($y = 0; $y < $this->height; $y += mt_rand($grid - 2, $grid + 2))
+ {
+ $current_colour = $scheme[array_rand($scheme)];
+ imageline($img, mt_rand(0,4), mt_rand($y - 3, $y), mt_rand($this->width - 5, $this->width), mt_rand($y - 3, $y), $current_colour);
+ }
+ }
+
+ if ($config['captcha_gd_y_grid'])
+ {
+ $grid = (int) $config['captcha_gd_y_grid'];
+ for ($x = 0; $x < $this->width; $x += mt_rand($grid - 2, $grid + 2))
+ {
+ $current_colour = $scheme[array_rand($scheme)];
+ imagedashedline($img, mt_rand($x -3, $x + 3), mt_rand(0, 4), mt_rand($x -3, $x + 3), mt_rand($this->height - 5, $this->height), $current_colour);
+ }
+ }
+ if ($config['captcha_gd_wave'] && ($config['captcha_gd_y_grid'] || $config['captcha_gd_y_grid']))
+ {
+ $this->wave($img);
+ }
+
+
+ if ($config['captcha_gd_3d_noise'])
+ {
+ $xoffset = mt_rand(0,9);
+ $noise_bitmaps = $this->captcha_noise_bg_bitmaps();
+ for ($i = 0; $i < $code_len; ++$i)
+ {
+ $noise[$i] = new char_cube3d($noise_bitmaps, mt_rand(1, count($noise_bitmaps['data'])));
+
+ list($min, $max) = $noise[$i]->range();
+ //$box = $noise[$i]->dimensions($sizes[$i]);
+ }
+ $xoffset = 0;
+ for ($i = 0; $i < $code_len; ++$i)
+ {
+ $dimm = $bounding_boxes[$i];
+ $xoffset += ($offset[$i] - $dimm[0]);
+ $yoffset = mt_rand(-$dimm[1], $this->height - $dimm[3]);
+
+ $noise[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme);
+ $xoffset += $dimm[2];
+ }
+ }
+ $xoffset = 5;
+ for ($i = 0; $i < $code_len; ++$i)
+ {
+ $dimm = $bounding_boxes[$i];
+ $xoffset += ($offset[$i] - $dimm[0]);
+ $yoffset = mt_rand(-$dimm[1], $this->height - $dimm[3]);
+
+ $characters[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme);
+ $xoffset += $dimm[2];
+ }
+ if ($config['captcha_gd_wave'])
+ {
+ $this->wave($img);
+ }
+ if ($config['captcha_gd_foreground_noise'])
+ {
+ $this->noise_line($img, 0, 0, $this->width, $this->height, $colour->get_resource('background'), $scheme, $bg_colours);
+ }
+ // Send image
+ header('Content-Type: image/png');
+ header('Cache-control: no-cache, no-store');
+ imagepng($img);
+ imagedestroy($img);
+ }
+
+ /**
+ * Sinus
+ */
+ function wave($img)
+ {
+ global $config;
+
+ $period_x = mt_rand(12,18);
+ $period_y = mt_rand(7,14);
+ $amp_x = mt_rand(5,10);
+ $amp_y = mt_rand(2,4);
+ $socket = mt_rand(0,100);
+
+ $dampen_x = mt_rand($this->width/5, $this->width/2);
+ $dampen_y = mt_rand($this->height/5, $this->height/2);
+ $direction_x = (mt_rand (0, 1));
+ $direction_y = (mt_rand (0, 1));
+
+ for ($i = 0; $i < $this->width; $i++)
+ {
+ $dir = ($direction_x) ? $i : ($this->width - $i);
+ imagecopy($img, $img, $i-1, sin($socket+ $i/($period_x + $dir/$dampen_x)) * $amp_x, $i, 0, 1, $this->height);
+ }
+ $socket = mt_rand(0,100);
+ for ($i = 0; $i < $this->height; $i++)
+ {
+ $dir = ($direction_y) ? $i : ($this->height - $i);
+ imagecopy($img, $img ,sin($socket + $i/($period_y + ($dir)/$dampen_y)) * $amp_y, $i-1, 0, $i, $this->width, 1);
+ }
+ return $img;
+ }
+
+ /**
+ * Noise line
+ */
+ function noise_line($img, $min_x, $min_y, $max_x, $max_y, $bg, $font, $non_font)
+ {
+ imagesetthickness($img, 2);
+
+ $x1 = $min_x;
+ $x2 = $max_x;
+ $y1 = $min_y;
+ $y2 = $min_y;
+
+ do
+ {
+ $line = array_merge(
+ array_fill(0, mt_rand(30, 60), $non_font[array_rand($non_font)]),
+ array_fill(0, mt_rand(30, 60), $bg)
+ );
+
+ imagesetstyle($img, $line);
+ imageline($img, $x1, $y1, $x2, $y2, IMG_COLOR_STYLED);
+
+ $y1 += mt_rand(12, 35);
+ $y2 += mt_rand(12, 35);
+ }
+ while ($y1 < $max_y && $y2 < $max_y);
+
+ $x1 = $min_x;
+ $x2 = $min_x;
+ $y1 = $min_y;
+ $y2 = $max_y;
+
+ do
+ {
+ $line = array_merge(
+ array_fill(0, mt_rand(30, 60), $non_font[array_rand($non_font)]),
+ array_fill(0, mt_rand(30, 60), $bg)
+ );
+
+ imagesetstyle($img, $line);
+ imageline($img, $x1, $y1, $x2, $y2, IMG_COLOR_STYLED);
+
+ $x1 += mt_rand(20, 35);
+ $x2 += mt_rand(20, 35);
+ }
+ while ($x1 < $max_x && $x2 < $max_x);
+ imagesetthickness($img, 1);
+ }
+
+
+ function captcha_noise_bg_bitmaps()
+ {
+ return array(
+ 'width' => 15,
+ 'height' => 5,
+ 'data' => array(
+
+ 1 => array(
+ array(1,0,0,0,1,0,0,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,1,0,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,1,0,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0,0,0,1,0,0,0),
+ ),
+ 2 => array(
+ array(1,1,mt_rand(0,1),1,0,1,1,1,1,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,1,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,1,1,0,1,1,1),
+ ),
+ 3 => array(
+ array(1,0,0,0,0,0,0,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,1,0,0,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,0,0,0,0,0,0,1),
+ ),
+ 4 => array(
+ array(1,0,1,0,1,0,0,1,1,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,1,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(1,0,1,0,0,0,0,0,0,0,0,0,0,0,0),
+ ),
+ 5 => array(
+ array(1,1,1,1,0,0,0,1,1,1,0,0,1,0,1),
+ array(0,0,0,0,0,0,0,1,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(1,0,1,0,0,0,0,0,0,0,0,0,0,0,0),
+ ),
+ 6 => array(
+ array(mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),0,mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),0,mt_rand(0,1),mt_rand(0,1),mt_rand(0,1)),
+ array(0,0,0,0,0,0,0,mt_rand(0,1),0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(mt_rand(0,1),0,mt_rand(0,1),0,0,0,0,0,0,0,0,0,0,0,0),
+ ),
+ 7 => array(
+ array(0,0,0,0,0,0,0,0,0,0,1,1,0,1,1),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(0,0,1,1,0,0,0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,1,0,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ ),
+ ));
+ }
+
+ /**
+ * Return bitmaps
+ */
+ function captcha_bitmaps()
+ {
+ global $config;
+
+ $chars = array(
+ 'A' => array(
+ array(
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,1,1,1,1,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,1,1,0,1,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,1,1,1,1,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,0,0,0,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,1,1),
+ array(0,0,0,0,0,1,1,1,1),
+ array(0,0,0,1,1,1,0,0,1),
+ array(0,1,1,1,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,1,0,0,0,0,1,1,1),
+ array(0,1,1,1,1,1,1,0,1),
+ ),
+ ),
+ 'B' => array(
+ array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,1,1,1,1,0,0),
+ ),
+ ),
+ 'C' => array(
+ array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,0,1,1,1,1,1,0,1),
+ array(0,1,0,0,0,0,0,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,1),
+ array(0,0,1,1,1,1,1,0,1),
+ ),
+ ),
+ 'D' => array(
+ array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,1,1,1,1,1,0,1),
+ array(0,1,1,0,0,0,1,1,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,1,0,0,0,1,1,1),
+ array(0,0,1,1,1,1,1,0,1),
+ ),
+ ),
+ 'E' => array(
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,1,1,1,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,1,1,1,1),
+ ),
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,1,1,1,1,1,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(0,1,1,1,1,1,1,1,0),
+ ),
+ ),
+ 'F' => array(
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ ),
+ array(
+ array(0,1,1,1,1,1,1,1,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(1,1,1,0,0,0,0,0,0),
+ ),
+ array(
+ array(0,0,0,1,1,0,0,0,0),
+ array(0,0,1,1,0,0,0,0,0),
+ array(0,1,1,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(1,1,1,1,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ ),
+ ),
+ 'G' => array(
+ array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,1,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,0,1,1,1,1,1,0,1),
+ array(0,1,0,0,0,0,0,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,1,1,1,1,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,1),
+ array(0,0,1,1,1,1,1,0,1),
+ ),
+ array(
+ array(0,0,1,1,1,1,1,0,1),
+ array(0,1,1,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,1,1,0,0,0,0,0,1),
+ array(0,0,1,1,1,1,1,1,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,1,1),
+ array(1,1,1,1,1,1,1,1,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ ),
+ 'H' => array(
+ array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ ),
+ array(
+ array(1,1,1,0,0,0,1,1,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,1,1,1,1,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,0,0,0,1,1,1),
+ ),
+ array(
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,1,1,1,0,0,0),
+ array(1,1,1,1,0,1,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ ),
+ ),
+ 'I' => array(
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(1,1,1,1,1,1,1,1,1),
+ ),
+ array(
+ array(0,0,0,1,1,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,1,1,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,1,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,1,1,0,0,0),
+ ),
+ ),
+ 'J' => array(
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(0,1,0,0,1,0,0,0,0),
+ array(0,0,1,1,0,0,0,0,0),
+ ),
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,1,0,0,1,0,0,0,0),
+ array(1,0,1,1,0,0,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(0,1,0,0,1,0,0,0,0),
+ array(0,0,1,1,0,0,0,0,0),
+ ),
+ ),
+ 'K' => array(
+ array( // New 'K', supplied by NeoThermic
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,1,0,0,0,0),
+ array(1,0,0,1,0,0,0,0,0),
+ array(1,0,1,0,0,0,0,0,0),
+ array(1,1,0,0,0,0,0,0,0),
+ array(1,0,1,0,0,0,0,0,0),
+ array(1,0,0,1,0,0,0,0,0),
+ array(1,0,0,0,1,0,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ ),
+ array(
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,1,0,0),
+ array(0,1,0,0,0,1,0,0,0),
+ array(0,1,0,0,1,0,0,0,0),
+ array(0,1,0,1,0,0,0,0,0),
+ array(0,1,1,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,1,0,0,0,0,0,0),
+ array(0,1,0,1,0,0,0,0,0),
+ array(0,1,0,0,1,0,0,0,0),
+ array(0,1,0,0,0,1,0,0,0),
+ array(0,1,0,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,0,0,0,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,1,0,0,0),
+ array(0,1,0,0,1,0,0,0,0),
+ array(0,1,0,1,0,0,0,0,0),
+ array(0,1,1,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,1,0,0,0,0,0,0),
+ array(0,1,0,1,0,0,0,0,0),
+ array(0,1,0,0,1,0,0,0,0),
+ array(0,1,0,0,0,1,0,0,0),
+ array(0,1,0,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ ),
+ ),
+ 'L' => array(
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,1,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,1),
+ array(1,1,1,1,1,1,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,1,0,0,0,0,0,0),
+ array(0,0,1,1,1,0,0,0,0),
+ ),
+ ),
+ 'M' => array(
+ array(
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,0,1,0,0,0,1,0,1),
+ array(1,0,1,0,0,0,1,0,1),
+ array(1,0,1,0,0,0,1,0,1),
+ array(1,0,0,1,0,1,0,0,1),
+ array(1,0,0,1,0,1,0,0,1),
+ array(1,0,0,1,0,1,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,1,0,1,0,1,0,1,0),
+ array(0,1,0,1,0,1,0,1,0),
+ array(0,1,0,1,0,1,0,1,0),
+ array(0,1,0,0,1,0,0,1,0),
+ array(0,1,0,0,1,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,0,0,0,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,1,1,0,1,1,1,0),
+ array(1,1,0,1,1,1,0,1,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ ),
+ ),
+ 'N' => array(
+ array(
+ array(1,1,0,0,0,0,0,0,1),
+ array(1,1,0,0,0,0,0,0,1),
+ array(1,0,1,0,0,0,0,0,1),
+ array(1,0,1,0,0,0,0,0,1),
+ array(1,0,0,1,0,0,0,0,1),
+ array(1,0,0,1,0,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,0,1,0,0,1),
+ array(1,0,0,0,0,1,0,0,1),
+ array(1,0,0,0,0,0,1,0,1),
+ array(1,0,0,0,0,0,1,0,1),
+ array(1,0,0,0,0,0,0,1,1),
+ array(1,0,0,0,0,0,0,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,0,0,0,0,1,0),
+ array(0,1,1,0,0,0,0,1,0),
+ array(0,1,1,0,0,0,0,1,0),
+ array(0,1,0,1,0,0,0,1,0),
+ array(0,1,0,1,0,0,0,1,0),
+ array(0,1,0,1,0,0,0,1,0),
+ array(0,1,0,0,1,0,0,1,0),
+ array(0,1,0,0,1,1,0,1,0),
+ array(0,1,0,0,0,1,0,1,0),
+ array(0,1,0,0,0,1,1,1,0),
+ array(0,1,0,0,0,0,1,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,0,0,0,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(1,0,1,1,1,1,0,0,0),
+ array(1,1,1,0,0,1,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ ),
+ ),
+ 'O' => array(
+ array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,1,1,1,1,0,0,0),
+ array(1,1,1,0,0,1,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,1,0,0,0,1,1,0,0),
+ array(0,1,1,1,1,1,0,0,0),
+ ),
+ ),
+ 'P' => array(
+ array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ ),
+ array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(1,1,1,0,0,0,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,1,1,0,0,0,0,0),
+ array(1,1,0,1,1,0,0,0,0),
+ array(1,0,0,0,1,0,0,0,0),
+ array(1,0,0,0,1,0,0,0,0),
+ array(1,0,0,1,1,0,0,0,0),
+ array(1,1,1,1,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ ),
+ ),
+ 'Q' => array(
+ array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,1,0,0,1),
+ array(1,0,0,0,0,0,1,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,1),
+ ),
+ array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,1,0,0,1,1,0,1,1),
+ array(0,1,1,1,1,1,1,1,0),
+ array(0,0,0,0,0,0,1,1,0),
+ array(0,0,0,0,0,0,0,1,1),
+ array(0,0,0,0,0,0,0,0,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,1,1,1,1),
+ array(0,0,0,0,1,1,0,0,1),
+ array(0,0,0,0,1,0,0,0,1),
+ array(0,0,0,0,1,0,0,0,1),
+ array(0,0,0,0,1,1,0,1,1),
+ array(0,0,0,0,0,1,1,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ ),
+ ),
+ 'R' => array(
+ array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,1,1,0,0,0,0,0,0),
+ array(1,0,0,1,0,0,0,0,0),
+ array(1,0,0,0,1,0,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ ),
+ array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(0,1,1,0,0,0,0,0,0),
+ array(0,1,1,1,0,0,0,0,0),
+ array(0,1,0,1,1,0,0,0,0),
+ array(0,1,0,0,1,1,0,0,0),
+ array(0,1,0,0,0,1,1,0,0),
+ array(0,1,0,0,0,0,1,1,0),
+ array(1,1,1,0,0,0,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,0,0,0,0),
+ array(1,1,0,0,1,1,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ ),
+ ),
+ 'S' => array(
+ array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,0,1,1,1,1,1,0,1),
+ array(0,1,0,0,0,0,0,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,1,0,0,0,0,0,1,0),
+ array(1,0,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,1,1,1,0,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,0,0,0,0,0,0,0),
+ array(0,1,1,1,1,0,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,1,1,0,0,0),
+ array(0,1,1,1,1,0,0,0,0),
+ ),
+ ),
+ 'T' => array(
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ ),
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,1,1,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,1,1,1,1,1,1,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,1,0,0,0),
+ array(0,0,0,0,0,1,1,1,0),
+ ),
+ ),
+ 'U' => array(
+ array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,0,0,0,1,1,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,1,0,0,0,0,0,1),
+ array(0,0,1,0,0,0,0,0,1),
+ array(0,0,1,0,0,0,0,0,1),
+ array(0,0,1,0,0,0,0,0,1),
+ array(0,0,1,0,0,0,0,0,1),
+ array(0,0,1,0,0,0,0,1,1),
+ array(0,0,1,1,0,0,1,1,1),
+ array(0,0,0,1,1,1,1,0,1),
+ ),
+ ),
+ 'V' => array(
+ array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(1,1,1,0,0,0,1,1,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ ),
+ ),
+ 'W' => array(
+ array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,1,0,1,0,0,1),
+ array(1,0,0,1,0,1,0,0,1),
+ array(1,0,0,1,0,1,0,0,1),
+ array(1,0,1,0,0,0,1,0,1),
+ array(1,0,1,0,0,0,1,0,1),
+ array(1,0,1,0,0,0,1,0,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(1,1,1,0,0,0,1,1,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,1,0,0,1,0),
+ array(0,1,0,0,1,0,0,1,0),
+ array(0,1,0,1,1,1,0,1,0),
+ array(0,1,0,1,0,1,0,1,0),
+ array(0,1,1,1,0,1,1,1,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,1,0,0,1,0),
+ array(0,1,0,0,1,0,0,1,0),
+ array(0,1,0,1,1,1,0,1,0),
+ array(0,1,0,1,0,1,0,1,0),
+ array(0,1,1,1,0,1,1,1,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ ),
+ 'X' => array(
+ array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(1,1,1,0,0,0,1,1,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,0,0,0,1,1,1),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,0,1,1,0,1,1,0,0),
+ array(0,0,0,1,1,1,0,0,0),
+ array(0,0,0,1,1,1,0,0,0),
+ array(0,0,1,1,0,1,1,0,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ ),
+ 'Y' => array(
+ array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(1,1,1,0,0,0,1,1,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,1,1,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,1,0,0,0,0,1),
+ array(0,0,0,1,1,0,0,0,1),
+ array(0,0,0,0,1,0,0,1,1),
+ array(0,0,0,0,1,1,0,1,0),
+ array(0,0,0,0,0,1,1,1,0),
+ array(0,0,0,0,0,0,1,0,0),
+ array(0,0,0,0,0,1,1,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,1,1,0,0,0),
+ array(0,0,1,1,1,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ ),
+ 'Z' => array(
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,1,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,0,0,0,0,0),
+ array(0,0,0,1,0,0,0,0,0),
+ array(0,0,1,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,1,1,1,1,1,1,1,1),
+ ),
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,1,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,0,0,1,0,0,0,0,0),
+ array(0,0,0,1,0,0,0,0,0),
+ array(0,0,1,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,1,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,1,1,1,1,1,1,0),
+ array(0,0,0,0,0,1,1,0,0),
+ array(0,0,0,0,1,1,0,0,0),
+ array(0,0,0,1,1,0,0,0,0),
+ array(0,0,1,1,0,0,0,0,0),
+ array(0,0,1,0,0,0,0,0,0),
+ array(0,1,1,1,1,1,1,1,0),
+ ),
+ ),
+ );
+ return array(
+ 'width' => 9,
+ 'height' => 15,
+ 'data' => array(
+
+ 'A' => $chars['A'][mt_rand(0, min(count($chars['A']), $config['captcha_gd_fonts']) -1)],
+ 'B' => $chars['B'][mt_rand(0, min(count($chars['B']), $config['captcha_gd_fonts']) -1)],
+ 'C' => $chars['C'][mt_rand(0, min(count($chars['C']), $config['captcha_gd_fonts']) -1)],
+ 'D' => $chars['D'][mt_rand(0, min(count($chars['D']), $config['captcha_gd_fonts']) -1)],
+ 'E' => $chars['E'][mt_rand(0, min(count($chars['E']), $config['captcha_gd_fonts']) -1)],
+ 'F' => $chars['F'][mt_rand(0, min(count($chars['F']), $config['captcha_gd_fonts']) -1)],
+ 'G' => $chars['G'][mt_rand(0, min(count($chars['G']), $config['captcha_gd_fonts']) -1)],
+ 'H' => $chars['H'][mt_rand(0, min(count($chars['H']), $config['captcha_gd_fonts']) -1)],
+ 'I' => $chars['I'][mt_rand(0, min(count($chars['I']), $config['captcha_gd_fonts']) -1)],
+ 'J' => $chars['J'][mt_rand(0, min(count($chars['J']), $config['captcha_gd_fonts']) -1)],
+ 'K' => $chars['K'][mt_rand(0, min(count($chars['K']), $config['captcha_gd_fonts']) -1)],
+ 'L' => $chars['L'][mt_rand(0, min(count($chars['L']), $config['captcha_gd_fonts']) -1)],
+ 'M' => $chars['M'][mt_rand(0, min(count($chars['M']), $config['captcha_gd_fonts']) -1)],
+ 'N' => $chars['N'][mt_rand(0, min(count($chars['N']), $config['captcha_gd_fonts']) -1)],
+ 'O' => $chars['O'][mt_rand(0, min(count($chars['O']), $config['captcha_gd_fonts']) -1)],
+ 'P' => $chars['P'][mt_rand(0, min(count($chars['P']), $config['captcha_gd_fonts']) -1)],
+ 'Q' => $chars['Q'][mt_rand(0, min(count($chars['Q']), $config['captcha_gd_fonts']) -1)],
+ 'R' => $chars['R'][mt_rand(0, min(count($chars['R']), $config['captcha_gd_fonts']) -1)],
+ 'S' => $chars['S'][mt_rand(0, min(count($chars['S']), $config['captcha_gd_fonts']) -1)],
+ 'T' => $chars['T'][mt_rand(0, min(count($chars['T']), $config['captcha_gd_fonts']) -1)],
+ 'U' => $chars['U'][mt_rand(0, min(count($chars['U']), $config['captcha_gd_fonts']) -1)],
+ 'V' => $chars['V'][mt_rand(0, min(count($chars['V']), $config['captcha_gd_fonts']) -1)],
+ 'W' => $chars['W'][mt_rand(0, min(count($chars['W']), $config['captcha_gd_fonts']) -1)],
+ 'X' => $chars['X'][mt_rand(0, min(count($chars['X']), $config['captcha_gd_fonts']) -1)],
+ 'Y' => $chars['Y'][mt_rand(0, min(count($chars['Y']), $config['captcha_gd_fonts']) -1)],
+ 'Z' => $chars['Z'][mt_rand(0, min(count($chars['Z']), $config['captcha_gd_fonts']) -1)],
+
+ '1' => array(
+ array(0,0,0,1,1,0,0,0,0),
+ array(0,0,1,0,1,0,0,0,0),
+ array(0,1,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,1,1,1,1,1,1,1,0),
+ ),
+ '2' => array( // New '2' supplied by Anon
+ array(0,0,0,1,1,1,0,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,1,1,0),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,1,1),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,1,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,0,0,0,0,0),
+ array(0,0,1,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ '3' => array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,1,1,0,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ '4' => array(
+ array(0,0,0,0,0,0,1,1,0),
+ array(0,0,0,0,0,1,0,1,0),
+ array(0,0,0,0,1,0,0,1,0),
+ array(0,0,0,1,0,0,0,1,0),
+ array(0,0,1,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,1,0),
+ ),
+ '5' => array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ '6' => array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,1,1,1,1,0,0),
+ array(1,0,1,0,0,0,0,1,0),
+ array(1,1,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ '7' => array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,1,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,0,0,0,0,0),
+ array(0,0,0,1,0,0,0,0,0),
+ array(0,0,1,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ ),
+ '8' => array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ '9' => array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,1,1),
+ array(0,1,0,0,0,0,1,0,1),
+ array(0,0,1,1,1,1,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ )
+ );
+ }
+}
+
+/**
+* @package VC
+*/
+class char_cube3d
+{
+ var $bitmap;
+ var $bitmap_width;
+ var $bitmap_height;
+
+ var $basis_matrix = array(array(1, 0, 0), array(0, 1, 0), array(0, 0, 1));
+ var $abs_x = array(1, 0);
+ var $abs_y = array(0, 1);
+ var $x = 0;
+ var $y = 1;
+ var $z = 2;
+ var $letter = '';
+
+ /**
+ */
+ function char_cube3d(&$bitmaps, $letter)
+ {
+ $this->bitmap = $bitmaps['data'][$letter];
+ $this->bitmap_width = $bitmaps['width'];
+ $this->bitmap_height = $bitmaps['height'];
+
+ $this->basis_matrix[0][0] = mt_rand(-600, 600);
+ $this->basis_matrix[0][1] = mt_rand(-600, 600);
+ $this->basis_matrix[0][2] = (mt_rand(0, 1) * 2000) - 1000;
+ $this->basis_matrix[1][0] = mt_rand(-1000, 1000);
+ $this->basis_matrix[1][1] = mt_rand(-1000, 1000);
+ $this->basis_matrix[1][2] = mt_rand(-1000, 1000);
+
+ $this->normalize($this->basis_matrix[0]);
+ $this->normalize($this->basis_matrix[1]);
+ $this->basis_matrix[2] = $this->cross_product($this->basis_matrix[0], $this->basis_matrix[1]);
+ $this->normalize($this->basis_matrix[2]);
+
+ // $this->basis_matrix[1] might not be (probably isn't) orthogonal to $basis_matrix[0]
+ $this->basis_matrix[1] = $this->cross_product($this->basis_matrix[0], $this->basis_matrix[2]);
+ $this->normalize($this->basis_matrix[1]);
+
+ // Make sure our cube is facing into the canvas (assuming +z == in)
+ for ($i = 0; $i < 3; ++$i)
+ {
+ if ($this->basis_matrix[$i][2] < 0)
+ {
+ $this->basis_matrix[$i][0] *= -1;
+ $this->basis_matrix[$i][1] *= -1;
+ $this->basis_matrix[$i][2] *= -1;
+ }
+ }
+
+ // Force our "z" basis vector to be the one with greatest absolute z value
+ $this->x = 0;
+ $this->y = 1;
+ $this->z = 2;
+
+ // Swap "y" with "z"
+ if ($this->basis_matrix[1][2] > $this->basis_matrix[2][2])
+ {
+ $this->z = 1;
+ $this->y = 2;
+ }
+
+ // Swap "x" with "z"
+ if ($this->basis_matrix[0][2] > $this->basis_matrix[$this->z][2])
+ {
+ $this->x = $this->z;
+ $this->z = 0;
+ }
+
+ // Still need to determine which of $x,$y are which.
+ // wrong orientation if y's y-component is less than it's x-component
+ // likewise if x's x-component is less than it's y-component
+ // if they disagree, go with the one with the greater weight difference.
+ // rotate if positive
+ $weight = (abs($this->basis_matrix[$this->x][1]) - abs($this->basis_matrix[$this->x][0])) + (abs($this->basis_matrix[$this->y][0]) - abs($this->basis_matrix[$this->y][1]));
+
+ // Swap "x" with "y"
+ if ($weight > 0)
+ {
+ list($this->x, $this->y) = array($this->y, $this->x);
+ }
+
+ $this->abs_x = array($this->basis_matrix[$this->x][0], $this->basis_matrix[$this->x][1]);
+ $this->abs_y = array($this->basis_matrix[$this->y][0], $this->basis_matrix[$this->y][1]);
+
+ if ($this->abs_x[0] < 0)
+ {
+ $this->abs_x[0] *= -1;
+ $this->abs_x[1] *= -1;
+ }
+
+ if ($this->abs_y[1] > 0)
+ {
+ $this->abs_y[0] *= -1;
+ $this->abs_y[1] *= -1;
+ }
+
+ $this->letter = $letter;
+ }
+
+ /**
+ * Draw a character
+ */
+ function drawchar($scale, $xoff, $yoff, $img, $background, $colours)
+ {
+ $width = $this->bitmap_width;
+ $height = $this->bitmap_height;
+ $bitmap = $this->bitmap;
+
+ $colour1 = $colours[array_rand($colours)];
+ $colour2 = $colours[array_rand($colours)];
+
+ $swapx = ($this->basis_matrix[$this->x][0] > 0);
+ $swapy = ($this->basis_matrix[$this->y][1] < 0);
+
+ for ($y = 0; $y < $height; ++$y)
+ {
+ for ($x = 0; $x < $width; ++$x)
+ {
+ $xp = ($swapx) ? ($width - $x - 1) : $x;
+ $yp = ($swapy) ? ($height - $y - 1) : $y;
+
+ if ($bitmap[$height - $yp - 1][$xp])
+ {
+ $dx = $this->scale($this->abs_x, ($xp - ($swapx ? ($width / 2) : ($width / 2) - 1)) * $scale);
+ $dy = $this->scale($this->abs_y, ($yp - ($swapy ? ($height / 2) : ($height / 2) - 1)) * $scale);
+ $xo = $xoff + $dx[0] + $dy[0];
+ $yo = $yoff + $dx[1] + $dy[1];
+
+ $origin = array(0, 0, 0);
+ $xvec = $this->scale($this->basis_matrix[$this->x], $scale);
+ $yvec = $this->scale($this->basis_matrix[$this->y], $scale);
+ $face_corner = $this->sum2($xvec, $yvec);
+
+ $zvec = $this->scale($this->basis_matrix[$this->z], $scale);
+ $x_corner = $this->sum2($xvec, $zvec);
+ $y_corner = $this->sum2($yvec, $zvec);
+
+ imagefilledpolygon($img, $this->gen_poly($xo, $yo, $origin, $xvec, $x_corner,$zvec), 4, $colour1);
+ imagefilledpolygon($img, $this->gen_poly($xo, $yo, $origin, $yvec, $y_corner,$zvec), 4, $colour2);
+
+ $face = $this->gen_poly($xo, $yo, $origin, $xvec, $face_corner, $yvec);
+
+ imagefilledpolygon($img, $face, 4, $background);
+ imagepolygon($img, $face, 4, $colour1);
+ }
+ }
+ }
+ }
+
+ /*
+ * return a roughly acceptable range of sizes for rendering with this texttype
+ */
+ function range()
+ {
+ return array(3, 4);
+ }
+
+ /**
+ * Vector length
+ */
+ function vectorlen($vector)
+ {
+ return sqrt(pow($vector[0], 2) + pow($vector[1], 2) + pow($vector[2], 2));
+ }
+
+ /**
+ * Normalize
+ */
+ function normalize(&$vector, $length = 1)
+ {
+ $length = (( $length < 1) ? 1 : $length);
+ $length /= $this->vectorlen($vector);
+ $vector[0] *= $length;
+ $vector[1] *= $length;
+ $vector[2] *= $length;
+ }
+
+ /**
+ */
+ function cross_product($vector1, $vector2)
+ {
+ $retval = array(0, 0, 0);
+ $retval[0] = (($vector1[1] * $vector2[2]) - ($vector1[2] * $vector2[1]));
+ $retval[1] = -(($vector1[0] * $vector2[2]) - ($vector1[2] * $vector2[0]));
+ $retval[2] = (($vector1[0] * $vector2[1]) - ($vector1[1] * $vector2[0]));
+
+ return $retval;
+ }
+
+ /**
+ */
+ function sum($vector1, $vector2)
+ {
+ return array($vector1[0] + $vector2[0], $vector1[1] + $vector2[1], $vector1[2] + $vector2[2]);
+ }
+
+ /**
+ */
+ function sum2($vector1, $vector2)
+ {
+ return array($vector1[0] + $vector2[0], $vector1[1] + $vector2[1]);
+ }
+
+ /**
+ */
+ function scale($vector, $length)
+ {
+ if (sizeof($vector) == 2)
+ {
+ return array($vector[0] * $length, $vector[1] * $length);
+ }
+
+ return array($vector[0] * $length, $vector[1] * $length, $vector[2] * $length);
+ }
+
+ /**
+ */
+ function gen_poly($xoff, $yoff, &$vec1, &$vec2, &$vec3, &$vec4)
+ {
+ $poly = array();
+ $poly[0] = $xoff + $vec1[0];
+ $poly[1] = $yoff + $vec1[1];
+ $poly[2] = $xoff + $vec2[0];
+ $poly[3] = $yoff + $vec2[1];
+ $poly[4] = $xoff + $vec3[0];
+ $poly[5] = $yoff + $vec3[1];
+ $poly[6] = $xoff + $vec4[0];
+ $poly[7] = $yoff + $vec4[1];
+
+ return $poly;
+ }
+
+ /**
+ * dimensions
+ */
+ function dimensions($size)
+ {
+ $xn = $this->scale($this->basis_matrix[$this->x], -($this->bitmap_width / 2) * $size);
+ $xp = $this->scale($this->basis_matrix[$this->x], ($this->bitmap_width / 2) * $size);
+ $yn = $this->scale($this->basis_matrix[$this->y], -($this->bitmap_height / 2) * $size);
+ $yp = $this->scale($this->basis_matrix[$this->y], ($this->bitmap_height / 2) * $size);
+
+ $p = array();
+ $p[0] = $this->sum2($xn, $yn);
+ $p[1] = $this->sum2($xp, $yn);
+ $p[2] = $this->sum2($xp, $yp);
+ $p[3] = $this->sum2($xn, $yp);
+
+ $min_x = $max_x = $p[0][0];
+ $min_y = $max_y = $p[0][1];
+
+ for ($i = 1; $i < 4; ++$i)
+ {
+ $min_x = ($min_x > $p[$i][0]) ? $p[$i][0] : $min_x;
+ $min_y = ($min_y > $p[$i][1]) ? $p[$i][1] : $min_y;
+ $max_x = ($max_x < $p[$i][0]) ? $p[$i][0] : $max_x;
+ $max_y = ($max_y < $p[$i][1]) ? $p[$i][1] : $max_y;
+ }
+
+ return array($min_x, $min_y, $max_x, $max_y);
+ }
+}
+
+/**
+* @package VC
+*/
+class colour_manager
+{
+ var $img;
+ var $mode;
+ var $colours;
+ var $named_colours;
+
+ /**
+ * Create the colour manager, link it to the image resource
+ */
+ function colour_manager($img, $background = false, $mode = 'ahsv')
+ {
+ $this->img = $img;
+ $this->mode = $mode;
+ $this->colours = array();
+ $this->named_colours = array();
+
+ if ($background !== false)
+ {
+ $bg = $this->allocate_named('background', $background);
+ imagefill($this->img, 0, 0, $bg);
+ }
+ }
+
+ /**
+ * Lookup a named colour resource
+ */
+ function get_resource($named_colour)
+ {
+ if (isset($this->named_colours[$named_colour]))
+ {
+ return $this->named_colours[$named_colour];
+ }
+
+ if (isset($this->named_rgb[$named_colour]))
+ {
+ return $this->allocate_named($named_colour, $this->named_rgb[$named_colour], 'rgb');
+ }
+
+ return false;
+ }
+
+ /**
+ * Assign a name to a colour resource
+ */
+ function name_colour($name, $resource)
+ {
+ $this->named_colours[$name] = $resource;
+ }
+
+ /**
+ * names and allocates a colour resource
+ */
+ function allocate_named($name, $colour, $mode = false)
+ {
+ $resource = $this->allocate($colour, $mode);
+
+ if ($resource !== false)
+ {
+ $this->name_colour($name, $resource);
+ }
+ return $resource;
+ }
+
+ /**
+ * allocates a specified colour into the image
+ */
+ function allocate($colour, $mode = false)
+ {
+ if ($mode === false)
+ {
+ $mode = $this->mode;
+ }
+
+ if (!is_array($colour))
+ {
+ if (isset($this->named_rgb[$colour]))
+ {
+ return $this->allocate_named($colour, $this->named_rgb[$colour], 'rgb');
+ }
+
+ if (!is_int($colour))
+ {
+ return false;
+ }
+
+ $mode = 'rgb';
+ $colour = array(255 & ($colour >> 16), 255 & ($colour >> 8), 255 & $colour);
+ }
+
+ if (isset($colour['mode']))
+ {
+ $mode = $colour['mode'];
+ unset($colour['mode']);
+ }
+
+ if (isset($colour['random']))
+ {
+ unset($colour['random']);
+ // everything else is params
+ return $this->random_colour($colour, $mode);
+ }
+
+ $rgb = colour_manager::model_convert($colour, $mode, 'rgb');
+ $store = ($this->mode == 'rgb') ? $rgb : colour_manager::model_convert($colour, $mode, $this->mode);
+ $resource = imagecolorallocate($this->img, $rgb[0], $rgb[1], $rgb[2]);
+ $this->colours[$resource] = $store;
+
+ return $resource;
+ }
+
+ /**
+ * randomly generates a colour, with optional params
+ */
+ function random_colour($params = array(), $mode = false)
+ {
+ if ($mode === false)
+ {
+ $mode = $this->mode;
+ }
+
+ switch ($mode)
+ {
+ case 'rgb':
+ // @TODO random rgb generation. do we intend to do this, or is it just too tedious?
+ break;
+
+ case 'ahsv':
+ case 'hsv':
+ default:
+
+ $default_params = array(
+ 'hue_bias' => false, // degree / 'r'/'g'/'b'/'c'/'m'/'y' /'o'
+ 'hue_range' => false, // if hue bias, then difference range +/- from bias
+ 'min_saturation' => 30, // 0 - 100
+ 'max_saturation' => 80, // 0 - 100
+ 'min_value' => 30, // 0 - 100
+ 'max_value' => 80, // 0 - 100
+ );
+
+ $alt = ($mode == 'ahsv') ? true : false;
+ $params = array_merge($default_params, $params);
+
+ $min_hue = 0;
+ $max_hue = 359;
+ $min_saturation = max(0, $params['min_saturation']);
+ $max_saturation = min(100, $params['max_saturation']);
+ $min_value = max(0, $params['min_value']);
+ $max_value = min(100, $params['max_value']);
+
+ if ($params['hue_bias'] !== false)
+ {
+ if (is_numeric($params['hue_bias']))
+ {
+ $h = intval($params['hue_bias']) % 360;
+ }
+ else
+ {
+ switch ($params['hue_bias'])
+ {
+ case 'o':
+ $h = $alt ? 60 : 30;
+ break;
+
+ case 'y':
+ $h = $alt ? 120 : 60;
+ break;
+
+ case 'g':
+ $h = $alt ? 180 : 120;
+ break;
+
+ case 'c':
+ $h = $alt ? 210 : 180;
+ break;
+
+ case 'b':
+ $h = 240;
+ break;
+
+ case 'm':
+ $h = 300;
+ break;
+
+ case 'r':
+ default:
+ $h = 0;
+ break;
+ }
+ }
+
+ $min_hue = $h + 360;
+ $max_hue = $h + 360;
+
+ if ($params['hue_range'])
+ {
+ $min_hue -= min(180, $params['hue_range']);
+ $max_hue += min(180, $params['hue_range']);
+ }
+ }
+
+ $h = mt_rand($min_hue, $max_hue);
+ $s = mt_rand($min_saturation, $max_saturation);
+ $v = mt_rand($min_value, $max_value);
+
+ return $this->allocate(array($h, $s, $v), $mode);
+
+ break;
+ }
+ }
+
+ /**
+ */
+ function colour_scheme($resource, $include_original = true)
+ {
+ $mode = 'hsv';
+
+ if (($pre = $this->get_resource($resource)) !== false)
+ {
+ $resource = $pre;
+ }
+
+ $colour = colour_manager::model_convert($this->colours[$resource], $this->mode, $mode);
+ $results = ($include_original) ? array($resource) : array();
+ $colour2 = $colour3 = $colour4 = $colour;
+ $colour2[0] += 150;
+ $colour3[0] += 180;
+ $colour4[0] += 210;
+
+
+ $results[] = $this->allocate($colour2, $mode);
+ $results[] = $this->allocate($colour3, $mode);
+ $results[] = $this->allocate($colour4, $mode);
+
+ return $results;
+ }
+
+ /**
+ */
+ function mono_range($resource, $count = 5, $include_original = true)
+ {
+ if (is_array($resource))
+ {
+ $results = array();
+ for ($i = 0, $size = sizeof($resource); $i < $size; ++$i)
+ {
+ $results = array_merge($results, $this->mono_range($resource[$i], $count, $include_original));
+ }
+ return $results;
+ }
+
+ $mode = (in_array($this->mode, array('hsv', 'ahsv'), true) ? $this->mode : 'ahsv');
+ if (($pre = $this->get_resource($resource)) !== false)
+ {
+ $resource = $pre;
+ }
+
+ $colour = colour_manager::model_convert($this->colours[$resource], $this->mode, $mode);
+
+ $results = array();
+ if ($include_original)
+ {
+ $results[] = $resource;
+ $count--;
+ }
+
+ // This is a hard problem. I chicken out and try to maintain readability at the cost of less randomness.
+
+ while ($count > 0)
+ {
+ $colour[1] = ($colour[1] + mt_rand(40,60)) % 99;
+ $colour[2] = ($colour[2] + mt_rand(40,60));
+ $results[] = $this->allocate($colour, $mode);
+ $count--;
+ }
+ return $results;
+ }
+
+ /**
+ * Convert from one colour model to another
+ */
+ function model_convert($colour, $from_model, $to_model)
+ {
+ if ($from_model == $to_model)
+ {
+ return $colour;
+ }
+
+ switch ($to_model)
+ {
+ case 'hsv':
+
+ switch ($from_model)
+ {
+ case 'ahsv':
+ return colour_manager::ah2h($colour);
+ break;
+
+ case 'rgb':
+ return colour_manager::rgb2hsv($colour);
+ break;
+ }
+ break;
+
+ case 'ahsv':
+
+ switch ($from_model)
+ {
+ case 'hsv':
+ return colour_manager::h2ah($colour);
+ break;
+
+ case 'rgb':
+ return colour_manager::h2ah(colour_manager::rgb2hsv($colour));
+ break;
+ }
+ break;
+
+ case 'rgb':
+ switch ($from_model)
+ {
+ case 'hsv':
+ return colour_manager::hsv2rgb($colour);
+ break;
+
+ case 'ahsv':
+ return colour_manager::hsv2rgb(colour_manager::ah2h($colour));
+ break;
+ }
+ break;
+ }
+ return false;
+ }
+
+ /**
+ * Slightly altered from wikipedia's algorithm
+ */
+ function hsv2rgb($hsv)
+ {
+ colour_manager::normalize_hue($hsv[0]);
+
+ $h = $hsv[0];
+ $s = min(1, max(0, $hsv[1] / 100));
+ $v = min(1, max(0, $hsv[2] / 100));
+
+ // calculate hue sector
+ $hi = floor($hsv[0] / 60);
+
+ // calculate opposite colour
+ $p = $v * (1 - $s);
+
+ // calculate distance between hex vertices
+ $f = ($h / 60) - $hi;
+
+ // coming in or going out?
+ if (!($hi & 1))
+ {
+ $f = 1 - $f;
+ }
+
+ // calculate adjacent colour
+ $q = $v * (1 - ($f * $s));
+
+ switch ($hi)
+ {
+ case 0:
+ $rgb = array($v, $q, $p);
+ break;
+
+ case 1:
+ $rgb = array($q, $v, $p);
+ break;
+
+ case 2:
+ $rgb = array($p, $v, $q);
+ break;
+
+ case 3:
+ $rgb = array($p, $q, $v);
+ break;
+
+ case 4:
+ $rgb = array($q, $p, $v);
+ break;
+
+ case 5:
+ $rgb = array($v, $p, $q);
+ break;
+
+ default:
+ return array(0, 0, 0);
+ break;
+ }
+
+ return array(255 * $rgb[0], 255 * $rgb[1], 255 * $rgb[2]);
+ }
+
+ /**
+ * (more than) Slightly altered from wikipedia's algorithm
+ */
+ function rgb2hsv($rgb)
+ {
+ $r = min(255, max(0, $rgb[0]));
+ $g = min(255, max(0, $rgb[1]));
+ $b = min(255, max(0, $rgb[2]));
+ $max = max($r, $g, $b);
+ $min = min($r, $g, $b);
+
+ $v = $max / 255;
+ $s = (!$max) ? 0 : 1 - ($min / $max);
+
+ // if max - min is 0, we want hue to be 0 anyway.
+ $h = $max - $min;
+
+ if ($h)
+ {
+ switch ($max)
+ {
+ case $g:
+ $h = 120 + (60 * ($b - $r) / $h);
+ break;
+
+ case $b:
+ $h = 240 + (60 * ($r - $g) / $h);
+ break;
+
+ case $r:
+ $h = 360 + (60 * ($g - $b) / $h);
+ break;
+ }
+ }
+ colour_manager::normalize_hue($h);
+
+ return array($h, $s * 100, $v * 100);
+ }
+
+ /**
+ */
+ function normalize_hue(&$hue)
+ {
+ $hue %= 360;
+
+ if ($hue < 0)
+ {
+ $hue += 360;
+ }
+ }
+
+ /**
+ * Alternate hue to hue
+ */
+ function ah2h($ahue)
+ {
+ if (is_array($ahue))
+ {
+ $ahue[0] = colour_manager::ah2h($ahue[0]);
+ return $ahue;
+ }
+ colour_manager::normalize_hue($ahue);
+
+ // blue through red is already ok
+ if ($ahue >= 240)
+ {
+ return $ahue;
+ }
+
+ // ahue green is at 180
+ if ($ahue >= 180)
+ {
+ // return (240 - (2 * (240 - $ahue)));
+ return (2 * $ahue) - 240; // equivalent
+ }
+
+ // ahue yellow is at 120 (RYB rather than RGB)
+ if ($ahue >= 120)
+ {
+ return $ahue - 60;
+ }
+
+ return $ahue / 2;
+ }
+
+ /**
+ * hue to Alternate hue
+ */
+ function h2ah($hue)
+ {
+ if (is_array($hue))
+ {
+ $hue[0] = colour_manager::h2ah($hue[0]);
+ return $hue;
+ }
+ colour_manager::normalize_hue($hue);
+
+ // blue through red is already ok
+ if ($hue >= 240)
+ {
+ return $hue;
+ }
+ else if ($hue <= 60)
+ {
+ return $hue * 2;
+ }
+ else if ($hue <= 120)
+ {
+ return $hue + 60;
+ }
+ else
+ {
+ return ($hue + 240) / 2;
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/captcha_gd_wave.php b/phpBB/includes/captcha/captcha_gd_wave.php
new file mode 100644
index 0000000000..f706c98d43
--- /dev/null
+++ b/phpBB/includes/captcha/captcha_gd_wave.php
@@ -0,0 +1,845 @@
+<?php
+/**
+*
+* @package VC
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* Wave3D CAPTCHA
+*
+* @author Robert Hetzler
+* @package VC
+*/
+class captcha
+{
+ var $width = 360;
+ var $height = 96;
+
+ function execute($code, $seed)
+ {
+ global $starttime;
+
+ // seed the random generator
+ mt_srand($seed);
+
+ // set height and width
+ $img_x = $this->width;
+ $img_y = $this->height;
+
+ // Generate image
+ $img = imagecreatetruecolor($img_x, $img_y);
+ $x_grid = mt_rand(6, 10);
+ $y_grid = mt_rand(6, 10);
+
+ // Ok, so lets cut to the chase. We could accurately represent this in 3d and
+ // do all the appropriate linear transforms. my questions is... why bother?
+ // The computational overhead is unnecessary when you consider the simple fact:
+ // we're not here to accurately represent a model, but to just show off some random-ish
+ // polygons
+
+ // Conceive of 3 spaces.
+ // 1) planar-space (discrete "pixel" grid)
+ // 2) 3-space. (planar-space with z/height aspect)
+ // 3) image space (pixels on the screen)
+ // resolution of the planar-space we're embedding the text code in
+ $plane_x = 100;
+ $plane_y = 30;
+
+ $subdivision_factor = 3;
+
+ // $box is the 4 points in img_space that correspond to the corners of the plane in 3-space
+ $box = array(
+ 'upper_left' => array(
+ 'x' => mt_rand(5, 15),
+ 'y' => mt_rand(10, 15)
+ ),
+ 'upper_right' => array(
+ 'x' => mt_rand($img_x - 35, $img_x - 19),
+ 'y' => mt_rand(10, 17)
+ ),
+ 'lower_left' => array(
+ 'x' => mt_rand($img_x - 5, $img_x - 45),
+ 'y' => mt_rand($img_y - 0, $img_y - 15)
+ ),
+ );
+
+ $box['lower_right'] = array(
+ 'x' => $box['lower_left']['x'] + $box['upper_left']['x'] - $box['upper_right']['x'],
+ 'y' => $box['lower_left']['y'] + $box['upper_left']['y'] - $box['upper_right']['y'],
+ );
+
+ // TODO
+ $background = imagecolorallocate($img, mt_rand(155, 255), mt_rand(155, 255), mt_rand(155, 255));
+ imagefill($img, 0, 0, $background);
+ $black = imagecolorallocate($img, 0, 0, 0);
+
+ $random = array();
+ $fontcolors = array();
+
+ for ($i = 0; $i < 15; ++$i)
+ {
+ $random[$i] = imagecolorallocate($img, mt_rand(120, 255), mt_rand(120, 255), mt_rand(120, 255));
+ }
+
+ $fontcolors[0] = imagecolorallocate($img, mt_rand(0, 120), mt_rand(0, 120), mt_rand(0, 120));
+
+ $colors = array();
+
+ $minr = mt_rand(20, 30);
+ $ming = mt_rand(20, 30);
+ $minb = mt_rand(20, 30);
+
+ $maxr = mt_rand(150, 230);
+ $maxg = mt_rand(150, 230);
+ $maxb = mt_rand(150, 230);
+
+ for ($i = -30; $i <= 30; ++$i)
+ {
+ $coeff1 = ($i + 12) / 45;
+ $coeff2 = 1 - $coeff1;
+ $colors[$i] = imagecolorallocate($img, ($coeff2 * $maxr) + ($coeff1 * $minr), ($coeff2 * $maxg) + ($coeff1 * $ming), ($coeff2 * $maxb) + ($coeff1 * $minb));
+ }
+
+ // $img_buffer is the last row of 3-space positions (converted to img-space), cached
+ // (using this means we don't need to recalculate all 4 positions for each new polygon,
+ // merely the newest point that we're adding, which is then cached.
+ $img_buffer = array(array(), array());
+
+ // In image-space, the x- and y-offset necessary to move one unit in the x-direction in planar-space
+ $dxx = ($box['upper_right']['x'] - $box['upper_left']['x']) / ($subdivision_factor * $plane_x);
+ $dxy = ($box['upper_right']['y'] - $box['upper_left']['y']) / ($subdivision_factor * $plane_x);
+
+ // In image-space, the x- and y-offset necessary to move one unit in the y-direction in planar-space
+ $dyx = ($box['lower_right']['x'] - $box['upper_left']['x']) / ($subdivision_factor * $plane_y);
+ $dyy = ($box['lower_right']['y'] - $box['upper_left']['y']) / ($subdivision_factor * $plane_y);
+
+ // Initial captcha-letter offset in planar-space
+ $plane_offset_x = mt_rand(3, 8);
+ $plane_offset_y = mt_rand( 12, 15);
+
+ // character map
+ $map = $this->captcha_bitmaps();
+
+ // matrix
+ $plane = array();
+
+ // for each character, we'll silkscreen it into our boolean pixel plane
+ for ($c = 0, $code_num = strlen($code); $c < $code_num; ++$c)
+ {
+ $letter = $code[$c];
+
+ for ($x = $map['width'] - 1; $x >= 0; --$x)
+ {
+ for ($y = $map['height'] - 1; $y >= 0; --$y)
+ {
+ if ($map['data'][$letter][$y][$x])
+ {
+ $plane[$y + $plane_offset_y + (($c & 1) ? 1 : -1)][$x + $plane_offset_x] = true;
+ }
+ }
+ }
+ $plane_offset_x += 11;
+ }
+
+ // calculate our first buffer, we can't actually draw polys with these yet
+ // img_pos_prev == screen x,y location to our immediate left.
+ // img_pos_cur == current screen x,y location
+ // we calculate screen position of our
+ // current cell based on the difference from the previous cell
+ // rather than recalculating from absolute coordinates
+ // What we cache into the $img_buffer contains the raised text coordinates.
+ $img_pos_prev = $img_buffer[0][0] = array($box['upper_left']['x'], $box['upper_left']['y']);
+ $cur_height = $prev_height = $this->wave_height(0, 0, $subdivision_factor);
+ $full_x = $plane_x * $subdivision_factor;
+ $full_y = $plane_y * $subdivision_factor;
+
+ for ($x = 1; $x <= $full_x; ++$x)
+ {
+ $cur_height = $this->wave_height($x, 0, $subdivision_factor);
+ $offset = $cur_height - $prev_height;
+ $img_pos_cur = array($img_pos_prev[0] + $dxx, $img_pos_prev[1] + $dxy + $offset);
+
+ $img_buffer[0][$x] = $img_pos_cur;
+ $img_pos_prev = $img_pos_cur;
+ $prev_height = $cur_height;
+ }
+
+ for ($y = 1; $y <= $full_y; ++$y)
+ {
+ // swap buffers
+ $buffer_cur = $y & 1;
+ $buffer_prev = 1 - $buffer_cur;
+
+ $prev_height = $this->wave_height(0, $y, $subdivision_factor);
+ $offset = $prev_height - $this->wave_height(0, $y - 1, $subdivision_factor);
+ $img_pos_cur = array($img_buffer[$buffer_prev][0][0] + $dyx, min($img_buffer[$buffer_prev][0][1] + $dyy + $offset, $img_y - 1));
+
+ // make sure we don't try to write off the page
+ $img_pos_prev = $img_pos_cur;
+
+ $img_buffer[$buffer_cur][0] = $img_pos_cur;
+
+ for ($x = 1; $x <= $full_x; ++$x)
+ {
+ $cur_height = $this->wave_height($x, $y, $subdivision_factor) + $this->grid_height($x, $y, 1, $x_grid, $y_grid);
+
+ // height is a z-factor, not a y-factor
+ $offset = $cur_height - $prev_height;
+ $img_pos_cur = array($img_pos_prev[0] + $dxx, $img_pos_prev[1] + $dxy + $offset);
+
+ // height is float, index it to an int, get closest color
+ $color = $colors[intval($cur_height)];
+ $img_pos_prev = $img_pos_cur;
+ $prev_height = $cur_height;
+
+ $y_index_old = intval(($y - 1) / $subdivision_factor);
+ $y_index_new = intval($y / $subdivision_factor);
+ $x_index_old = intval(($x - 1) / $subdivision_factor);
+ $x_index_new = intval($x / $subdivision_factor);
+
+ if (!empty($plane[$y_index_new][$x_index_new]))
+ {
+ $img_pos_cur[1] += $this->wave_height($x, $y, $subdivision_factor, 1) - 30 - $cur_height;
+ $color = $colors[20];
+ }
+ $img_pos_cur[1] = min($img_pos_cur[1], $img_y - 1);
+ $img_buffer[$buffer_cur][$x] = $img_pos_cur;
+
+ // Smooth the edges as much as possible by having not more than one low<->high traingle per square
+ // Otherwise, just
+ $diag_down = (empty($plane[$y_index_old][$x_index_old]) == empty($plane[$y_index_new][$x_index_new]));
+ $diag_up = (empty($plane[$y_index_old][$x_index_new]) == empty($plane[$y_index_new][$x_index_old]));
+
+ // natural switching
+ $mode = ($x + $y) & 1;
+
+ // override if it requires it
+ if ($diag_down != $diag_up)
+ {
+ $mode = $diag_up;
+ }
+
+ if ($mode)
+ {
+ // +-/ /
+ // 1 |/ 2 /|
+ // / /-+
+ $poly1 = array_merge($img_buffer[$buffer_cur][$x - 1], $img_buffer[$buffer_prev][$x - 1], $img_buffer[$buffer_prev][$x]);
+ $poly2 = array_merge($img_buffer[$buffer_cur][$x - 1], $img_buffer[$buffer_cur][$x], $img_buffer[$buffer_prev][$x]);
+ }
+ else
+ {
+ // \ \-+
+ // 1 |\ 2 \|
+ // +-\ \
+ $poly1 = array_merge($img_buffer[$buffer_cur][$x - 1], $img_buffer[$buffer_prev][$x - 1], $img_buffer[$buffer_cur][$x]);
+ $poly2 = array_merge($img_buffer[$buffer_prev][$x - 1], $img_buffer[$buffer_prev][$x], $img_buffer[$buffer_cur][$x]);
+ }
+
+ imagefilledpolygon($img, $poly1, 3, $color);
+ imagefilledpolygon($img, $poly2, 3, $color);
+ }
+ }
+
+ // Output image
+ header('Content-Type: image/png');
+ header('Cache-control: no-cache, no-store');
+ //$mtime = explode(' ', microtime());
+ //$totaltime = $mtime[0] + $mtime[1] - $starttime;
+
+ //echo $totaltime . "<br />\n";
+ //echo memory_get_usage() - $tmp;
+ imagepng($img);
+ imagedestroy($img);
+ }
+
+ function wave_height($x, $y, $factor = 1, $tweak = 0.7)
+ {
+ // stretch the wave. TODO: pretty it up
+ $x = $x/5 + 180;
+ $y = $y/4;
+ return ((sin($x / (3 * $factor)) + sin($y / (3 * $factor))) * 10 * $tweak);
+ }
+
+ function grid_height($x, $y, $factor = 1, $x_grid, $y_grid)
+ {
+ return ((!($x % ($x_grid * $factor)) || !($y % ($y_grid * $factor))) ? 3 : 0);
+ }
+
+ function captcha_bitmaps()
+ {
+ return array(
+ 'width' => 9,
+ 'height' => 13,
+ 'data' => array(
+ 'A' => array(
+ array(0,0,1,1,1,1,0,0,0),
+ array(0,1,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'B' => array(
+ array(1,1,1,1,1,1,0,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,1,1,1,1,1,0,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,1,1,1,1,1,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'C' => array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'D' => array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'E' => array(
+ array(0,0,1,1,1,1,1,1,1),
+ array(0,1,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,0,1,1,1,1,1,1,1),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'F' => array(
+ array(0,0,1,1,1,1,1,1,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,1,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'G' => array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'H' => array(
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'I' => array(
+ array(0,1,1,1,1,1,1,1,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,1,1,1,1,1,1,1,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'J' => array(
+ array(0,0,0,0,0,0,1,1,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,0,1,0,0,0,0,1,0),
+ array(0,0,0,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'K' => array(
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,1,0,0,0,0),
+ array(1,0,0,1,0,0,0,0,0),
+ array(1,0,1,0,0,0,0,0,0),
+ array(1,1,0,0,0,0,0,0,0),
+ array(1,0,1,0,0,0,0,0,0),
+ array(1,0,0,1,0,0,0,0,0),
+ array(1,0,0,0,1,0,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'L' => array(
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,0,1,1,1,1,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'M' => array(
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,1,0,1,0,1,0,1,0),
+ array(0,1,0,0,1,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'N' => array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,1,0,0,0,0,0,0,1),
+ array(1,0,1,0,0,0,0,0,1),
+ array(1,0,0,1,0,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,0,1,0,0,1),
+ array(1,0,0,0,0,0,1,0,1),
+ array(1,0,0,0,0,0,0,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'O' => array(
+ array(0,0,0,1,1,1,0,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,1,1,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'P' => array(
+ array(1,1,1,1,1,1,0,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,1,1,1,1,1,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'Q' => array(
+ array(0,0,1,1,1,1,0,0,0),
+ array(0,1,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,1,0,0,1,0),
+ array(1,0,0,0,0,1,0,1,0),
+ array(0,1,0,0,0,0,1,0,0),
+ array(0,0,1,1,1,1,0,1,0),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'R' => array(
+ array(1,1,1,1,1,1,0,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,1,1,1,1,1,0,0,0),
+ array(1,0,1,0,0,0,0,0,0),
+ array(1,0,0,1,0,0,0,0,0),
+ array(1,0,0,0,1,0,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'S' => array(
+ array(0,0,1,1,1,1,1,1,1),
+ array(0,1,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'T' => array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'U' => array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'V' => array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'W' => array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,1,0,1,0,0,1),
+ array(1,0,1,0,0,0,1,0,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'X' => array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'Y' => array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ 'Z' => array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,1,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,0,0,0,0,0),
+ array(0,0,1,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ '1' => array(
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,1,0,0,0,0),
+ array(0,0,1,0,1,0,0,0,0),
+ array(0,1,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,1,1,1,1,1,1,1,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ '2' => array(
+ array(0,0,0,1,1,1,0,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,1,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,0,0,0,0,0),
+ array(0,0,1,0,0,0,0,0,0),
+ array(0,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ '3' => array(
+ array(0,0,0,1,1,1,1,0,0),
+ array(0,0,1,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,1,1,0,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,0,1,0,0,0,0,1,0),
+ array(0,0,0,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ '4' => array(
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,1,1,0),
+ array(0,0,0,0,0,1,0,1,0),
+ array(0,0,0,0,1,0,0,1,0),
+ array(0,0,0,1,0,0,0,1,0),
+ array(0,0,1,0,0,0,0,1,0),
+ array(0,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ '5' => array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ '6' => array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,1,1,1,1,0,0),
+ array(1,0,1,0,0,0,0,1,0),
+ array(1,1,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ '7' => array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,1,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ '8' => array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ '9' => array(
+ array(0,0,0,1,1,1,1,0,0),
+ array(0,0,1,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,1),
+ array(0,0,1,1,1,1,1,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,0,1,0,0,0,0,1,0),
+ array(0,0,0,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ )
+ );
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/captcha_non_gd.php b/phpBB/includes/captcha/captcha_non_gd.php
new file mode 100644
index 0000000000..f82896f628
--- /dev/null
+++ b/phpBB/includes/captcha/captcha_non_gd.php
@@ -0,0 +1,392 @@
+<?php
+/**
+*
+* @package VC
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Main non-gd captcha class
+* @ignore
+* @package VC
+*/
+class captcha
+{
+ var $filtered_pngs;
+ var $width = 320;
+ var $height = 50;
+
+ /**
+ * Define filtered pngs on init
+ */
+ function captcha()
+ {
+ // If we can we will generate a single filtered png, we avoid nastiness via emulation of some Zlib stuff
+ $this->define_filtered_pngs();
+ }
+
+ /**
+ * Create the image containing $code with a seed of $seed
+ */
+ function execute($code, $seed)
+ {
+ $img_height = $this->height - 10;
+ $img_width = 0;
+
+ mt_srand($seed);
+
+ $char_widths = $hold_chars = array();
+ $code_len = strlen($code);
+
+ for ($i = 0; $i < $code_len; $i++)
+ {
+ $char = $code[$i];
+
+ $width = mt_rand(0, 4);
+ $raw_width = $this->filtered_pngs[$char]['width'];
+ $char_widths[$i] = $width;
+ $img_width += $raw_width - $width;
+
+ // Split the char into chunks of $raw_width + 1 length
+ if (empty($hold_chars[$char]))
+ {
+ $hold_chars[$char] = str_split(base64_decode($this->filtered_pngs[$char]['data']), $raw_width + 1);
+ }
+ }
+
+ $offset_x = mt_rand(0, $this->width - $img_width);
+ $offset_y = mt_rand(0, $this->height - $img_height);
+
+ $image = '';
+ for ($i = 0; $i < $this->height; $i++)
+ {
+ $image .= chr(0);
+
+ if ($i > $offset_y && $i < $offset_y + $img_height)
+ {
+ for ($j = 0; $j < $offset_x; $j++)
+ {
+ $image .= chr(mt_rand(140, 255));
+ }
+
+ for ($j = 0; $j < $code_len; $j++)
+ {
+ $image .= $this->randomise(substr($hold_chars[$code{$j}][$i - $offset_y - 1], 1), $char_widths[$j]);
+ }
+
+ for ($j = $offset_x + $img_width; $j < $this->width; $j++)
+ {
+ $image .= chr(mt_rand(140, 255));
+ }
+ }
+ else
+ {
+ for ($j = 0; $j < $this->width; $j++)
+ {
+ $image .= chr(mt_rand(140, 255));
+ }
+ }
+ }
+ unset($hold_chars);
+
+ $image = $this->create_png($image, $this->width, $this->height);
+
+ // Output image
+ header('Content-Type: image/png');
+ header('Cache-control: no-cache, no-store');
+ echo $image;
+ exit;
+ }
+
+ /**
+ * This is designed to randomise the pixels of the image data within
+ * certain limits so as to keep it readable. It also varies the image
+ * width a little
+ */
+ function randomise($scanline, $width)
+ {
+ $new_line = '';
+
+ $end = strlen($scanline) - ceil($width/2);
+ for ($i = floor($width/2); $i < $end; $i++)
+ {
+ $pixel = ord($scanline{$i});
+
+ if ($pixel < 190)
+ {
+ $new_line .= chr(mt_rand(0, 205));
+ }
+ else if ($pixel > 190)
+ {
+ $new_line .= chr(mt_rand(145, 255));
+ }
+ else
+ {
+ $new_line .= $scanline{$i};
+ }
+ }
+
+ return $new_line;
+ }
+
+ /**
+ * This creates a chunk of the given type, with the given data
+ * of the given length adding the relevant crc
+ */
+ function png_chunk($length, $type, $data)
+ {
+ $raw = $type . $data;
+
+ return pack('N', $length) . $raw . pack('N', crc32($raw));
+ }
+
+ /**
+ * Creates greyscale 8bit png - The PNG spec can be found at
+ * http://www.libpng.org/pub/png/spec/PNG-Contents.html we use
+ * png because it's a fully recognised open standard and supported
+ * by practically all modern browsers and OSs
+ */
+ function create_png($raw_image, $width, $height)
+ {
+ // SIG
+ $image = pack('C8', 137, 80, 78, 71, 13, 10, 26, 10);
+
+ // IHDR
+ $raw = pack('N2', $width, $height);
+ $raw .= pack('C5', 8, 0, 0, 0, 0);
+ $image .= $this->png_chunk(13, 'IHDR', $raw);
+
+ // IDAT
+ if (@extension_loaded('zlib'))
+ {
+ $raw_image = gzcompress($raw_image);
+ $length = strlen($raw_image);
+ }
+ else
+ {
+ // The total length of this image, uncompressed, is just a calculation of pixels
+ $length = ($width + 1) * $height;
+
+ // Adler-32 hash generation
+ // Note: The hash is _backwards_ so we must reverse it
+
+ if (@extension_loaded('hash'))
+ {
+ $adler_hash = strrev(hash('adler32', $raw_image, true));
+ }
+ else if (@extension_loaded('mhash'))
+ {
+ $adler_hash = strrev(mhash(MHASH_ADLER32, $raw_image));
+ }
+ else
+ {
+ // Optimized Adler-32 loop ported from the GNU Classpath project
+ $temp_length = $length;
+ $s1 = 1;
+ $s2 = $index = 0;
+
+ while ($temp_length > 0)
+ {
+ // We can defer the modulo operation:
+ // s1 maximally grows from 65521 to 65521 + 255 * 3800
+ // s2 maximally grows by 3800 * median(s1) = 2090079800 < 2^31
+ $substract_value = ($temp_length < 3800) ? $temp_length : 3800;
+ $temp_length -= $substract_value;
+
+ while (--$substract_value >= 0)
+ {
+ $s1 += ord($raw_image[$index]);
+ $s2 += $s1;
+
+ $index++;
+ }
+
+ $s1 %= 65521;
+ $s2 %= 65521;
+ }
+ $adler_hash = pack('N', ($s2 << 16) | $s1);
+ }
+
+ // This is the same thing as gzcompress($raw_image, 0) but does not need zlib
+ $raw_image = pack('C3v2', 0x78, 0x01, 0x01, $length, ~$length) . $raw_image . $adler_hash;
+
+ // The Zlib header + Adler hash make us add on 11
+ $length += 11;
+ }
+
+ // IDAT
+ $image .= $this->png_chunk($length, 'IDAT', $raw_image);
+
+ // IEND
+ $image .= $this->png_chunk(0, 'IEND', '');
+
+ return $image;
+ }
+
+ /**
+ * png image data
+ * Each 'data' element is base64_encoded uncompressed IDAT
+ */
+ function define_filtered_pngs()
+ {
+ $this->filtered_pngs = array(
+ '0' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A///////////////////olFAkBAAAGDyA4P///M31/////////////wD////////////////0dAgAAAAAAAAAAAAEcPipFGHn////////////AP//////////////6DAAAAAAAAAAAAAAAAAALSEAN+T///////////8A//////////////xAAAAAAAAAAAAAAAAAAAAAACPA/////////////wD/////////////oAAAAAAAAAAAAAAAAAAAAAAAev//////////////AP////////////8oAAAAAAAAPNj/zDAAAAAAAABD//////////////8A////////////1AAAAAAAABjw////5BAAAAAAAADo/////////////wD///////////+QAAAAAAAAbP//////QgAAAAAAAKj/////////////AP///////////1wAAAAAAACs/////8AXAAAAAAAAcP////////////8A////////////OAAAAAAAAND////dNwAAAAAAAABI/////////////wD///////////8gAAAAAAAA4P//7koACwAAAAAAACT/////////////AP///////////wgAAAAAAAD///VqAwaPAAAAAAAAEP////////////8A////////////AAAAAAAAAP/8kQYDavUAAAAAAAAA/////////////wD///////////8AAAAAAAAA/6kNAEru/wAAAAAAAAD/////////////AP///////////wAAAAAAAADAIwA33f//AAAAAAAAAP////////////8A////////////FAAAAAAAADYAI8D///8AAAAAAAAQ/////////////wD///////////8kAAAAAAAAAA2p////5AAAAAAAACD/////////////AP///////////0gAAAAAAAAFkfz////UAAAAAAAAQP////////////8A////////////cAAAAAAAAET1/////7AAAAAAAABo/////////////wD///////////+oAAAAAAAAXfX/////sAAAAAAAAGj/////////////AAAAALgAAAAAAAAwAAAAAAAAAAAAAAD////////////oAAAAAAAACOT////oEAAAAAAAAOD/////////////AP////////////8+AAAAAAAAKMz/zDQAAAAAAAA0//////////////8A////////////7jgAAAAAAAAAAAAAAAAAAAAAAKT//////////////wD///////////VqAwIAAAAAAAAAAAAAAAAAAAA8////////////////AP//////////rQcDaVEAAAAAAAAAAAAAAAAAKOj///////////////8A///////////nblnu/IAIAAAAAAAAAAAAAFzw/////////////////wD////////////79////+iITCAAAAAgSITg////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////w==',
+ 'width' => 40
+ ),
+ '1' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////8BAAAAAAAP//////////////////AP////////////////////////9sAAAAAAAA//////////////////8A////////////////////////pAAAAAAAAAD//////////////////wD//////////////////////6wEAAAAAAAAAP//////////////////AP////////////////////h4AAAAAAAAAAAA//////////////////8A//////////////////ygJAAAAAAAAAAAAAD//////////////////wD//////////////9x8HAAAAAAAAAAAAAAAAP//////////////////AP//////////////AAAAAAAAAAAAAAAAAAAA//////////////////8A//////////////8AAAAAAAAAAAAAAAAAAAD//////////////////wD//////////////wAAAAAAAAR4AAAAAAAAAP//////////////////AP//////////////AAAAAAA4zP8AAAAAAAAA//////////////////8A//////////////8AAAA4sP///wAAAAAAAAD//////////////////wD//////////////yR80P//////AAAAAAAAAP//////////////////AP////////////////////////8AAAAAAAAA//////////////////8A/////////////////////////wAAAAAAAAD//////////////////wD/////////////////////////AAAAAAAAAP//////////////////AP////////////////////////8AAAAAAAAA//////////////////8A/////////////////////////wAAAAAAAAD//////////////////wD/////////////////////////AAAAAAAAAP//////////////////AP////////////////////////8AAAAAAAAA//////////////////8A/////////////////////////wAAAAAAAAD//////////////////wD/////////////////////////AAAAAAAAAP//////////////////AP////////////////////////8AAAAAAAAA//////////////////8A/////////////////////////wAAAAAAAAD//////////////////wD/////////////////////////AAAAAAAAAP//////////////////AP////////////////////////8AAAAAAAAA//////////////////8A/////////////////////////wAAAAAAAAD//////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ '2' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP/////////////////okFAkCAAABCBIfNT///////////////////8A///////////////8hAgAAAAAAAAAAAAAAFTo/////////////////wD//////////////1QAAAAAAAAAAAAAAAAAACjo////////////////AP////////////+MAAAAAAAAAAAAAAAAAAAAADj///////////////8A////////////9BAAAAAAAAAAAAAAAAAAAAAAALD//////////////wD///////////+gAAAAAAAAAHjs+KwMAAAAAAAAVP//////////////AP///////////1gAAAAAAABM/////6QAAAAAAAAU//////////////8A////////////KAAAAAAAALj/////+AAAAAAAAAD//////////////wD///////////+MfGBMOCAI8P/////wAAAAAAAACP//////////////AP///////////////////////////5wAAAAAAAAw//////////////8A///////////////////////////oFAAAAAAAAHz//////////////wD/////////////////////////6CgAAAAAAAAE3P//////////////AP///////////////////////9ggAAAAAAAAAHT///////////////8A//////////////////////+0DAAAAAAAAAA8+P///////////////wD/////////////////////gAAAAAAAAAAAKOj/////////////////AP//////////////////9FAAAAAAAAAAADzw//////////////////8A/////////////////+g4AAAAAAAAAABk/P///////////////////wD////////////////oKAAAAAAAAAAMqP//////////////////////AP//////////////6CgAAAAAAAAAMNz///////////////////////8A//////////////g4AAAAAAAAAFT0/////////////////////////wD/////////////bAAAAAAAAABU/P//////////////////////////AP///////////8wAAAAAAAAAAAAAAAAAAAAAAAAA//////////////8A////////////SAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////wD//////////9wAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////AP//////////hAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////8A//////////9AAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////wD//////////xAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ '3' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD////////////////8sGg0FAAAACA4cLz8////////////////////AP//////////////rBgAAAAAAAAAAAAAACTA//////////////////8A/////////////3QAAAAAAAAAAAAAAAAAAASs/////////////////wD///////////+YAAAAAAAAAAAAAAAAAAAAAAjc////////////////AP//////////6AwAAAAAAAAAAAAAAAAAAAAAAGT///////////////8A//////////94AAAAAAAABJDw/8g4AAAAAAAAHP///////////////wD//////////yAAAAAAAACE/////9gAAAAAAAAA////////////////AP///////////NSwiGQ4FOT//////AAAAAAAABD///////////////8A//////////////////////////+YAAAAAAAAVP///////////////wD//////////////////////P/ggAQAAAAAAATM////////////////AP////////////////////9gAAAAAAAAAAAElP////////////////8A/////////////////////0AAAAAAAAAAHLj//////////////////wD/////////////////////OAAAAAAAAAAwkPj/////////////////AP////////////////////8gAAAAAAAAAAAAINj///////////////8A/////////////////////xAAAAAAAAAAAAAAIPD//////////////wD/////////////////////uOz/4HgEAAAAAAAAhP//////////////AP///////////////////////////3wAAAAAAAAw//////////////8A////////////////////////////6AAAAAAAAAj//////////////wD/////////////////////////////AAAAAAAAAP//////////////AP//////////tJh8YEQoDNz//////+AAAAAAAAAY//////////////8A//////////88AAAAAAAAaP//////dAAAAAAAAEz//////////////wD//////////6QAAAAAAAAAdOD/5HQAAAAAAAAApP//////////////AP///////////CgAAAAAAAAAAAAAAAAAAAAAACD4//////////////8A////////////yAQAAAAAAAAAAAAAAAAAAAAEuP///////////////wD/////////////rAQAAAAAAAAAAAAAAAAABJD/////////////////AP//////////////zDQAAAAAAAAAAAAAACTA//////////////////8A/////////////////8BwOCAAAAAUNGi0/P///////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ '4' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP//////////////////////////nAAAAAAAAAD///////////////8A/////////////////////////8AEAAAAAAAAAP///////////////wD////////////////////////gGAAAAAAAAAAA////////////////AP//////////////////////9DAAAAAAAAAAAAD///////////////8A//////////////////////9UAAAAAAAAAAAAAP///////////////wD/////////////////////hAAAAAAAAAAAAAAA////////////////AP///////////////////7QAAAAAAAAAAAAAAAD///////////////8A///////////////////UDAAAAAAUAAAAAAAAAP///////////////wD/////////////////7CQAAAAABMAAAAAAAAAA////////////////AP////////////////xEAAAAAACU/wAAAAAAAAD///////////////8A////////////////cAAAAAAAZP//AAAAAAAAAP///////////////wD//////////////6AAAAAAADz8//8AAAAAAAAA////////////////AP/////////////IBAAAAAAc6P///wAAAAAAAAD///////////////8A////////////5BgAAAAADMz/////AAAAAAAAAP///////////////wD///////////g0AAAAAACk//////8AAAAAAAAA////////////////AP//////////XAAAAAAAfP///////wAAAAAAAAD///////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////8A////////////////////////////AAAAAAAAAP///////////////wD///////////////////////////8AAAAAAAAA////////////////AP///////////////////////////wAAAAAAAAD///////////////8A////////////////////////////AAAAAAAAAP///////////////wD///////////////////////////8AAAAAAAAA////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ '5' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP//////////////8AAAAAAAAAAAAAAAAAAAAAAA//////////////8A///////////////MAAAAAAAAAAAAAAAAAAAAAAD//////////////wD//////////////6wAAAAAAAAAAAAAAAAAAAAAAP//////////////AP//////////////iAAAAAAAAAAAAAAAAAAAAAAA//////////////8A//////////////9kAAAAAAAAAAAAAAAAAAAAAAD//////////////wD//////////////0QAAAAAAAAAAAAAAAAAAAAAAP//////////////AP//////////////IAAAAAAAYP////////////////////////////8A//////////////wAAAAAAAB8/////////////////////////////wD/////////////3AAAAAAAAIj/////////////////////////////AP////////////+4AAAAAAAAoLRYHAAEKGTE//////////////////8A/////////////5QAAAAAAAAQAAAAAAAAAABY9P///////////////wD/////////////dAAAAAAAAAAAAAAAAAAAAAA89P//////////////AP////////////9QAAAAAAAAAAAAAAAAAAAAAABg//////////////8A/////////////zAAAAAAAAAAAAAAAAAAAAAAAADQ/////////////wD/////////////IAAAAAAAAGjY/+h4BAAAAAAAAGz/////////////AP//////////////9NS0lHSc//////90AAAAAAAALP////////////8A/////////////////////////////9QAAAAAAAAE/////////////wD//////////////////////////////wAAAAAAAAD/////////////AP/////////////////////////////8AAAAAAAAEP////////////8A////////////pIRwWEAgDOD//////8wAAAAAAAA8/////////////wD///////////9EAAAAAAAAaP//////ZAAAAAAAAHz/////////////AP///////////6QAAAAAAAAAaOD/4GQAAAAAAAAE4P////////////8A/////////////CQAAAAAAAAAAAAAAAAAAAAAAGD//////////////wD/////////////yAQAAAAAAAAAAAAAAAAAAAAc7P//////////////AP//////////////rAwAAAAAAAAAAAAAAAAAGNj///////////////8A////////////////0EAAAAAAAAAAAAAAAFTo/////////////////wD//////////////////8h4QCAAAAAcQHzU////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ '6' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD///////////////////+0ZCwMAAAUNGjI////////////////////AP/////////////////EMAAAAAAAAAAAAABM6P////////////////8A////////////////lAQAAAAAAAAAAAAAAAAo6P///////////////wD//////////////6wAAAAAAAAAAAAAAAAAAABI////////////////AP/////////////oEAAAAAAAAAAAAAAAAAAAAACw//////////////8A/////////////3AAAAAAAAAoxP/YPAAAAAAAAEj//////////////wD////////////4EAAAAAAACOD////YDCBAVGiAoP//////////////AP///////////7gAAAAAAABY//////////////////////////////8A////////////eAAAAAAAAJT//////////////////////////////wD///////////9MAAAAAAAAvP/IXBgABCx03P//////////////////AP///////////ygAAAAAAADcdAAAAAAAAAAEiP////////////////8A////////////FAAAAAAAAFAAAAAAAAAAAAAAcP///////////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAlP//////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAAAAAQ8P////////////8A////////////AAAAAAAAAABAyP/kZAAAAAAAAACQ/////////////wD///////////8MAAAAAAAALPj/////WAAAAAAAAET/////////////AP///////////yQAAAAAAACY///////MAAAAAAAAFP////////////8A////////////SAAAAAAAAMD///////wAAAAAAAAA/////////////wD///////////9wAAAAAAAAvP///////wAAAAAAAAD/////////////AP///////////7QAAAAAAACI///////UAAAAAAAAJP////////////8A////////////+AwAAAAAACDw/////2wAAAAAAABY/////////////wD/////////////cAAAAAAAADC8/Ox4AAAAAAAAAKj/////////////AP/////////////oEAAAAAAAAAAAAAAAAAAAAAAk/P////////////8A//////////////+oAAAAAAAAAAAAAAAAAAAABLj//////////////wD///////////////+QAAAAAAAAAAAAAAAAAACQ////////////////AP////////////////+0JAAAAAAAAAAAAAAkuP////////////////8A///////////////////8sGg0FAAADCxgqPz//////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ '7' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAAAAAABP////////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAAAAy4/////////////wD//////////////////////////+QUAAAAAAAEuP//////////////AP/////////////////////////8QAAAAAAAAKT///////////////8A/////////////////////////4wAAAAAAAB0/////////////////wD////////////////////////cCAAAAAAANPz/////////////////AP///////////////////////0QAAAAAAATY//////////////////8A//////////////////////+0AAAAAAAAeP///////////////////wD//////////////////////CQAAAAAABTw////////////////////AP////////////////////+gAAAAAAAAkP////////////////////8A/////////////////////ywAAAAAABDw/////////////////////wD///////////////////+4AAAAAAAAbP//////////////////////AP///////////////////1wAAAAAAADQ//////////////////////8A///////////////////4DAAAAAAAMP///////////////////////wD//////////////////7QAAAAAAAB8////////////////////////AP//////////////////aAAAAAAAAMj///////////////////////8A//////////////////8oAAAAAAAM/P///////////////////////wD/////////////////8AAAAAAAAET/////////////////////////AP////////////////+0AAAAAAAAcP////////////////////////8A/////////////////4wAAAAAAACY/////////////////////////wD/////////////////WAAAAAAAAMD/////////////////////////AP////////////////80AAAAAAAA4P////////////////////////8A/////////////////xAAAAAAAAD4/////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ '8' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD////////////////////IdDQUAAAEIEiA1P//////////////////AP/////////////////gRAAAAAAAAAAAAAAAROD///////////////8A////////////////0BgAAAAAAAAAAAAAAAAAEMj//////////////wD///////////////AcAAAAAAAAAAAAAAAAAAAAHPD/////////////AP//////////////hAAAAAAAAAAAAAAAAAAAAAAAhP////////////8A//////////////8sAAAAAAAAKMz/zCgAAAAAAAAs/////////////wD//////////////wAAAAAAAADM////zAAAAAAAAAD/////////////AP//////////////BAAAAAAAAP//////AAAAAAAABP////////////8A//////////////8sAAAAAAAAzP///9QAAAAAAAAw/////////////wD//////////////3wAAAAAAAAoyP/YNAAAAAAAAIT/////////////AP//////////////7BgAAAAAAAAAAAAAAAAAAAAc8P////////////8A////////////////xBgAAAAAAAAAAAAAAAAAGNj//////////////wD/////////////////tAQAAAAAAAAAAAAAAACo////////////////AP///////////////HAAAAAAAAAAAAAAAAAAAAB8//////////////8A//////////////9gAAAAAAAAAAAAAAAAAAAAAAB8/////////////wD/////////////wAAAAAAAAABk4P/UWAAAAAAAAATQ////////////AP////////////9UAAAAAAAAaP//////XAAAAAAAAGT///////////8A/////////////xgAAAAAAADg///////cAAAAAAAAJP///////////wD/////////////AAAAAAAAAP////////8AAAAAAAAA////////////AP////////////8AAAAAAAAA4P//////3AAAAAAAAAT///////////8A/////////////ygAAAAAAABg//////9cAAAAAAAALP///////////wD/////////////ZAAAAAAAAABY1P/cXAAAAAAAAABw////////////AP/////////////QAAAAAAAAAAAAAAAAAAAAAAAABNz///////////8A//////////////9gAAAAAAAAAAAAAAAAAAAAAAB0/////////////wD///////////////Q8AAAAAAAAAAAAAAAAAAAAUPz/////////////AP////////////////x4CAAAAAAAAAAAAAAAEIT8//////////////8A///////////////////smFQwGAAAABg0ZKT0/////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ '9' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD///////////////////ysYCwMAAAUNGiw/P//////////////////AP////////////////+4JAAAAAAAAAAAAAAkuP////////////////8A////////////////lAQAAAAAAAAAAAAAAAAAkP///////////////wD//////////////8AEAAAAAAAAAAAAAAAAAAAAqP//////////////AP/////////////8JAAAAAAAAAAAAAAAAAAAAAAQ7P////////////8A/////////////6wAAAAAAAAAfOz8vCwAAAAAAABw/////////////wD/////////////WAAAAAAAAHD/////7BgAAAAAAAz4////////////AP////////////8kAAAAAAAA1P//////hAAAAAAAALT///////////8A/////////////wAAAAAAAAD///////+4AAAAAAAAcP///////////wD/////////////AAAAAAAAAPz//////8AAAAAAAABI////////////AP////////////8UAAAAAAAAzP//////lAAAAAAAACT///////////8A/////////////0QAAAAAAABY//////gsAAAAAAAADP///////////wD/////////////kAAAAAAAAABw5P/IPAAAAAAAAAAA////////////AP/////////////wEAAAAAAAAAAAAAAAAAAAAAAAAAD///////////8A//////////////+UAAAAAAAAAAAAAAAAAAAAAAAAAP///////////wD///////////////9wAAAAAAAAAAAAAFAAAAAAAAAU////////////AP////////////////+IBAAAAAAAAABw3AAAAAAAACj///////////8A///////////////////cdCwEABhcxP+8AAAAAAAATP///////////wD//////////////////////////////5AAAAAAAAB4////////////AP//////////////////////////////UAAAAAAAALj///////////8A//////////////+kgGxUQCAM2P///+AIAAAAAAAQ+P///////////wD//////////////0gAAAAAAAA42P/EKAAAAAAAAHD/////////////AP//////////////sAAAAAAAAAAAAAAAAAAAAAAQ6P////////////8A////////////////TAAAAAAAAAAAAAAAAAAAAKz//////////////wD////////////////oKAAAAAAAAAAAAAAAAASU////////////////AP/////////////////sUAAAAAAAAAAAAAAwxP////////////////8A////////////////////yHA0FAAADCxktP///////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'A' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD//////////////////+QAAAAAAAAAAAAAAOT/////////////////AP//////////////////kAAAAAAAAAAAAAAAkP////////////////8A//////////////////88AAAAAAAAAAAAAAA8/////////////////wD/////////////////5AAAAAAAAAAAAAAAAADk////////////////AP////////////////+QAAAAAAAAAAAAAAAAAJD///////////////8A/////////////////zwAAAAAAAAAAAAAAAAAPP///////////////wD////////////////kAAAAAAAAAAgAAAAAAAAA5P//////////////AP///////////////5AAAAAAAAAAgAAAAAAAAACQ//////////////8A////////////////PAAAAAAAAAz8HAAAAAAAADz//////////////wD//////////////+QAAAAAAAAAWP9kAAAAAAAAANz/////////////AP//////////////kAAAAAAAAACk/7wAAAAAAAAAhP////////////8A//////////////88AAAAAAAABOz//BQAAAAAAAAw/////////////wD/////////////4AAAAAAAAAA8////ZAAAAAAAAADc////////////AP////////////+EAAAAAAAAAIj///+8AAAAAAAAAIT///////////8A/////////////zAAAAAAAAAA2P////wQAAAAAAAAMP///////////wD////////////cAAAAAAAAACT//////1wAAAAAAAAA3P//////////AP///////////4QAAAAAAAAAAAAAAAAAAAAAAAAAAACE//////////8A////////////MAAAAAAAAAAAAAAAAAAAAAAAAAAAADD//////////wD//////////9wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANz/////////AP//////////hAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhP////////8A//////////8wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAw/////////wD/////////3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADc////////AP////////+EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIT///////8A/////////zAAAAAAAAAAhP///////////2QAAAAAAAAAMP///////wD////////cAAAAAAAAAADM////////////vAAAAAAAAAAA3P//////AP///////4QAAAAAAAAAHP/////////////4DAAAAAAAAACE//////8A////////MAAAAAAAAABk//////////////9cAAAAAAAAADD//////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'B' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAEDh83P///////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAEhP//////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAeP////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAxP///////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAABY////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAABT///////////8A//////////8AAAAAAAAAAP/////4zEwAAAAAAAAAAP///////////wD//////////wAAAAAAAAAA////////7AAAAAAAAAAQ////////////AP//////////AAAAAAAAAAD////////sAAAAAAAAAEj///////////8A//////////8AAAAAAAAAAP/////4zEQAAAAAAAAAtP///////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAFz/////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAiA/P////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAIjPj//////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAGKz/////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAJT///////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAABNz//////////wD//////////wAAAAAAAAAA///////sqCAAAAAAAAAAbP//////////AP//////////AAAAAAAAAAD/////////yAAAAAAAAAAs//////////8A//////////8AAAAAAAAAAP//////////AAAAAAAAAAT//////////wD//////////wAAAAAAAAAA/////////7wAAAAAAAAAAP//////////AP//////////AAAAAAAAAAD//////+ikGAAAAAAAAAAY//////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFT//////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsP//////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAADj///////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAc6P///////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAATOj/////////////AP//////////AAAAAAAAAAAAAAAAAAAEIEBkkNj///////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'C' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP//////////////////5JRULBAAAAgkTIDQ//////////////////8A////////////////1FAAAAAAAAAAAAAAAABAyP///////////////wD//////////////4gEAAAAAAAAAAAAAAAAAAAElP//////////////AP////////////9wAAAAAAAAAAAAAAAAAAAAAAAAlP////////////8A////////////kAAAAAAAAAAAAAAAAAAAAAAAAAAEyP///////////wD//////////9wIAAAAAAAAAAAAAAAAAAAAAAAAAAAw////////////AP//////////WAAAAAAAAAAAWMz/8JwQAAAAAAAAAACw//////////8A/////////+wEAAAAAAAAAID//////9QMAAAAAAAAAET//////////wD/////////nAAAAAAAAAAo/P///////3wAAAAABDBspP//////////AP////////9gAAAAAAAAAIz/////////3BxQjMT0//////////////8A/////////zQAAAAAAAAAzP///////////////////////////////wD/////////GAAAAAAAAADo////////////////////////////////AP////////8AAAAAAAAAAP////////////////////////////////8A/////////wAAAAAAAAAA/////////////////////////////////wD/////////AAAAAAAAAAD/////////////////////////////////AP////////8cAAAAAAAAAOj///////////////////////////////8A/////////zgAAAAAAAAA0P/////////kIGio7P///////////////wD/////////bAAAAAAAAACg/////////5wAAAAAMHS49P//////////AP////////+oAAAAAAAAAEz/////////PAAAAAAAAAAc//////////8A//////////QIAAAAAAAAALz//////6QAAAAAAAAAAGT//////////wD//////////3AAAAAAAAAADIzo/+SEBAAAAAAAAAAAyP//////////AP//////////7BAAAAAAAAAAAAAAAAAAAAAAAAAAAED///////////8A////////////rAAAAAAAAAAAAAAAAAAAAAAAAAAE0P///////////wD/////////////fAAAAAAAAAAAAAAAAAAAAAAAAJz/////////////AP//////////////iAQAAAAAAAAAAAAAAAAAAASY//////////////8A////////////////yEAAAAAAAAAAAAAAAAA8yP///////////////wD//////////////////9yIUCwQAAAAIEB4yP//////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'D' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD///////////8AAAAAAAAAAAAAAAAADChQkOT/////////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAABGjw//////////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAAACDY/////////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAABjk////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAED///////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAKj//////////wD///////////8AAAAAAAAAAP///+isSAAAAAAAAAAANP//////////AP///////////wAAAAAAAAAA////////hAAAAAAAAAAA2P////////8A////////////AAAAAAAAAAD/////////MAAAAAAAAACQ/////////wD///////////8AAAAAAAAAAP////////+MAAAAAAAAAFj/////////AP///////////wAAAAAAAAAA/////////8gAAAAAAAAAMP////////8A////////////AAAAAAAAAAD/////////5AAAAAAAAAAY/////////wD///////////8AAAAAAAAAAP//////////AAAAAAAAAAD/////////AP///////////wAAAAAAAAAA//////////8AAAAAAAAAAP////////8A////////////AAAAAAAAAAD//////////wAAAAAAAAAA/////////wD///////////8AAAAAAAAAAP/////////wAAAAAAAAABD/////////AP///////////wAAAAAAAAAA/////////9QAAAAAAAAAJP////////8A////////////AAAAAAAAAAD/////////qAAAAAAAAABI/////////wD///////////8AAAAAAAAAAP////////9QAAAAAAAAAHj/////////AP///////////wAAAAAAAAAA////////uAAAAAAAAAAAvP////////8A////////////AAAAAAAAAAD////w0HwEAAAAAAAAACT8/////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAoP//////////AP///////////wAAAAAAAAAAAAAAAAAAAAAAAAAAADz8//////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAY6P///////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAKNz/////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAACHT0//////////////8A////////////AAAAAAAAAAAAAAAAABg4bKj0/////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'E' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP//////////AAAAAAAAAAD///////////////////////////////8A//////////8AAAAAAAAAAP///////////////////////////////wD//////////wAAAAAAAAAA////////////////////////////////AP//////////AAAAAAAAAAD///////////////////////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////8A//////////8AAAAAAAAAAP///////////////////////////////wD//////////wAAAAAAAAAA////////////////////////////////AP//////////AAAAAAAAAAD///////////////////////////////8A//////////8AAAAAAAAAAP///////////////////////////////wD//////////wAAAAAAAAAA////////////////////////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'F' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAA////////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAP///////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAA////////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAP///////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'G' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD//////////////////MB8TCgQAAAACCA4YJzs////////////////AP///////////////JQcAAAAAAAAAAAAAAAAAAhw8P////////////8A/////////////9gwAAAAAAAAAAAAAAAAAAAAAAAk2P///////////wD////////////EDAAAAAAAAAAAAAAAAAAAAAAAAAAc7P//////////AP//////////2AwAAAAAAAAAAAAAAAAAAAAAAAAAAABY//////////8A//////////wwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQ/////////wD/////////kAAAAAAAAAAAEHzQ/P/gmCAAAAAAAAAAAFz/////////AP////////wcAAAAAAAAACjg////////8CwAAAAAAAAgWP////////8A////////vAAAAAAAAAAI2P//////////yBRAcJjI8P///////////wD///////94AAAAAAAAAGD/////////////////////////////////AP///////0AAAAAAAAAAsP////////////////////////////////8A////////IAAAAAAAAADc/////////////////////////////////wD///////8AAAAAAAAAAP///////wAAAAAAAAAAAAAAAAD/////////AP///////wAAAAAAAAAA////////AAAAAAAAAAAAAAAAAP////////8A////////AAAAAAAAAAD///////8AAAAAAAAAAAAAAAAA/////////wD///////8gAAAAAAAAAOD//////wAAAAAAAAAAAAAAAAD/////////AP///////0AAAAAAAAAAtP//////AAAAAAAAAAAAAAAAAP////////8A////////cAAAAAAAAABw//////8AAAAAAAAAAAAAAAAA/////////wD///////+8AAAAAAAAABDs////////////AAAAAAAAAAD/////////AP////////wYAAAAAAAAADz0//////////AAAAAAAAAAAP////////8A/////////5AAAAAAAAAAACCY4P//3KhcCAAAAAAAAAAA/////////wD/////////+CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////AP//////////xAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIP////////8A////////////rAQAAAAAAAAAAAAAAAAAAAAAAAAAAGTw/////////wD/////////////vBQAAAAAAAAAAAAAAAAAAAAAADjI////////////AP//////////////8HAQAAAAAAAAAAAAAAAAAEiw//////////////8A//////////////////iwcEAgBAAABCA4aKDk/////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'H' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////8A/////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////8A/////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'I' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAA////////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAP///////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAA////////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAP///////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAA////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAP///////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAA////////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAP///////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAA////////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'J' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP///////////////////////////wAAAAAAAAAA//////////////8A////////////////////////////AAAAAAAAAAD//////////////wD///////////////////////////8AAAAAAAAAAP//////////////AP///////////////////////////wAAAAAAAAAA//////////////8A////////////////////////////AAAAAAAAAAD//////////////wD///////////////////////////8AAAAAAAAAAP//////////////AP///////////////////////////wAAAAAAAAAA//////////////8A////////////////////////////AAAAAAAAAAD//////////////wD///////////////////////////8AAAAAAAAAAP//////////////AP///////////////////////////wAAAAAAAAAA//////////////8A////////////////////////////AAAAAAAAAAD//////////////wD///////////////////////////8AAAAAAAAAAP//////////////AP///////////////////////////wAAAAAAAAAA//////////////8A////////////////////////////AAAAAAAAAAD//////////////wD///////////////////////////8AAAAAAAAAAP//////////////AP///////////////////////////wAAAAAAAAAA//////////////8A////////////////////////////AAAAAAAAAAj//////////////wD//////////+zMrIxwUDAQ//////wAAAAAAAAAIP//////////////AP//////////DAAAAAAAAADo////2AAAAAAAAAA0//////////////8A//////////8wAAAAAAAAAKj///+YAAAAAAAAAFj//////////////wD//////////2gAAAAAAAAAIND/yBgAAAAAAAAAkP//////////////AP//////////vAAAAAAAAAAAAAAAAAAAAAAAAADc//////////////8A////////////MAAAAAAAAAAAAAAAAAAAAAAAUP///////////////wD////////////EBAAAAAAAAAAAAAAAAAAAABjk////////////////AP////////////+sBAAAAAAAAAAAAAAAAAAY2P////////////////8A///////////////EMAAAAAAAAAAAAAAAVOj//////////////////wD/////////////////vHBAIAAAABg8fNT/////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'K' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD///////8AAAAAAAAAAP//////////wAQAAAAAAAAAAABw////////AP///////wAAAAAAAAAA/////////9AMAAAAAAAAAAAAcP////////8A////////AAAAAAAAAAD////////cGAAAAAAAAAAAAHD//////////wD///////8AAAAAAAAAAP//////6CgAAAAAAAAAAABs////////////AP///////wAAAAAAAAAA//////Q0AAAAAAAAAAAAVPz///////////8A////////AAAAAAAAAAD////8RAAAAAAAAAAAAFT8/////////////wD///////8AAAAAAAAAAP///1gAAAAAAAAAAABU/P//////////////AP///////wAAAAAAAAAA//9wAAAAAAAAAAAASPz///////////////8A////////AAAAAAAAAAD/jAAAAAAAAAAAADz0/////////////////wD///////8AAAAAAAAAAKQAAAAAAAAAAAA89P//////////////////AP///////wAAAAAAAAAABAAAAAAAAAAAFPT///////////////////8A////////AAAAAAAAAAAAAAAAAAAAAAAApP///////////////////wD///////8AAAAAAAAAAAAAAAAAAAAAAAAU8P//////////////////AP///////wAAAAAAAAAAAAAAAAAAAAAAAABk//////////////////8A////////AAAAAAAAAAAAAAAAAAAAAAAAAADE/////////////////wD///////8AAAAAAAAAAAAAAAAoEAAAAAAAACz8////////////////AP///////wAAAAAAAAAAAAAAGNiAAAAAAAAAAIj///////////////8A////////AAAAAAAAAAAAABjY//gYAAAAAAAACOD//////////////wD///////8AAAAAAAAAAAAY2P///5wAAAAAAAAASP//////////////AP///////wAAAAAAAAAAGNj//////CgAAAAAAAAAqP////////////8A////////AAAAAAAAAADI////////sAAAAAAAAAAc8P///////////wD///////8AAAAAAAAAAP//////////QAAAAAAAAABs////////////AP///////wAAAAAAAAAA///////////IAAAAAAAAAATI//////////8A////////AAAAAAAAAAD///////////9YAAAAAAAAADD8/////////wD///////8AAAAAAAAAAP///////////9wEAAAAAAAAAJD/////////AP///////wAAAAAAAAAA/////////////3AAAAAAAAAADOT///////8A////////AAAAAAAAAAD/////////////7BAAAAAAAAAAUP///////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'L' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAD/////////////////////////////AP////////////8AAAAAAAAAAP////////////////////////////8A/////////////wAAAAAAAAAA/////////////////////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A/////////////wAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD/////////////AAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'M' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A//////8AAAAAAAAAAAAAAHz//////3wAAAAAAAAAAAAAAP///////wD//////wAAAAAAAAAAAAAATP//////UAAAAAAAAAAAAAAA////////AP//////AAAAAAAAAAAAAAAc//////8cAAAAAAAAAAAAAAD///////8A//////8AAAAAAAAAAAAAAADw////8AAAAAAAAAAAAAAAAP///////wD//////wAAAAAAAAAAAAAAALz////AAAAAAAAAAAAAAAAA////////AP//////AAAAAAAAAAAAAAAAkP///5AAAAAAAAAAAAAAAAD///////8A//////8AAAAAAAAAAAAAAABc////ZAAAAAAAAAAAAAAAAP///////wD//////wAAAAAAAAAoAAAAADD///8wAAAAACQAAAAAAAAA////////AP//////AAAAAAAAAFwAAAAABPz//AgAAAAAXAAAAAAAAAD///////8A//////8AAAAAAAAAkAAAAAAA0P/UAAAAAACQAAAAAAAAAP///////wD//////wAAAAAAAADMAAAAAACg/6gAAAAAAMQAAAAAAAAA////////AP//////AAAAAAAAAPgEAAAAAHD/dAAAAAAE+AAAAAAAAAD///////8A//////8AAAAAAAAA/zQAAAAAQP9IAAAAADD/AAAAAAAAAP///////wD//////wAAAAAAAAD/bAAAAAAQ/xQAAAAAaP8AAAAAAAAA////////AP//////AAAAAAAAAP+gAAAAAADQAAAAAACc/wAAAAAAAAD///////8A//////8AAAAAAAAA/9QAAAAAAGgAAAAAAND/AAAAAAAAAP///////wD//////wAAAAAAAAD//wwAAAAAFAAAAAAM/P8AAAAAAAAA////////AP//////AAAAAAAAAP//RAAAAAAAAAAAADz//wAAAAAAAAD///////8A//////8AAAAAAAAA//94AAAAAAAAAAAAcP//AAAAAAAAAP///////wD//////wAAAAAAAAD//7AAAAAAAAAAAACo//8AAAAAAAAA////////AP//////AAAAAAAAAP//5AAAAAAAAAAAANz//wAAAAAAAAD///////8A//////8AAAAAAAAA////HAAAAAAAAAAQ////AAAAAAAAAP///////wD//////wAAAAAAAAD///9QAAAAAAAAAEz///8AAAAAAAAA////////AP//////AAAAAAAAAP///4gAAAAAAAAAfP///wAAAAAAAAD///////8A//////8AAAAAAAAA////vAAAAAAAAACw////AAAAAAAAAP///////wD//////wAAAAAAAAD////wAAAAAAAAAOz///8AAAAAAAAA////////AP//////AAAAAAAAAP////8sAAAAAAAc/////wAAAAAAAAD///////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'N' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////AAAAAAAAALD/////////////AAAAAAAAAP//////////AP////////8AAAAAAAAAFOj///////////8AAAAAAAAA//////////8A/////////wAAAAAAAAAASP///////////wAAAAAAAAD//////////wD/////////AAAAAAAAAAAAkP//////////AAAAAAAAAP//////////AP////////8AAAAAAAAAAAAI1P////////8AAAAAAAAA//////////8A/////////wAAAAAAAAAAAAAw+P///////wAAAAAAAAD//////////wD/////////AAAAAAAAAAAAAABw////////AAAAAAAAAP//////////AP////////8AAAAAAAAAAAAAAAC8//////8AAAAAAAAA//////////8A/////////wAAAAAAAAAAAAAAABzs/////wAAAAAAAAD//////////wD/////////AAAAAAAAAAAAAAAAAFD/////AAAAAAAAAP//////////AP////////8AAAAAAAAAAAAAAAAAAJz///8AAAAAAAAA//////////8A/////////wAAAAAAAAAUAAAAAAAADNz//wAAAAAAAAD//////////wD/////////AAAAAAAAALQAAAAAAAAANPz/AAAAAAAAAP//////////AP////////8AAAAAAAAA/2wAAAAAAAAAfP8AAAAAAAAA//////////8A/////////wAAAAAAAAD/+CwAAAAAAAAExAAAAAAAAAD//////////wD/////////AAAAAAAAAP//0AQAAAAAAAAgAAAAAAAAAP//////////AP////////8AAAAAAAAA////jAAAAAAAAAAAAAAAAAAA//////////8A/////////wAAAAAAAAD/////RAAAAAAAAAAAAAAAAAD//////////wD/////////AAAAAAAAAP/////kFAAAAAAAAAAAAAAAAP//////////AP////////8AAAAAAAAA//////+sAAAAAAAAAAAAAAAA//////////8A/////////wAAAAAAAAD///////9kAAAAAAAAAAAAAAD//////////wD/////////AAAAAAAAAP////////QkAAAAAAAAAAAAAP//////////AP////////8AAAAAAAAA/////////8wEAAAAAAAAAAAA//////////8A/////////wAAAAAAAAD//////////4QAAAAAAAAAAAD//////////wD/////////AAAAAAAAAP///////////DwAAAAAAAAAAP//////////AP////////8AAAAAAAAA////////////4BAAAAAAAAAA//////////8A/////////wAAAAAAAAD/////////////qAAAAAAAAAD//////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'O' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A///////////////////0qGw4HAAAABw4aKT0/////////////////wD////////////////wcAwAAAAAAAAAAAAAAAho6P//////////////AP//////////////uBQAAAAAAAAAAAAAAAAAAAAMoP////////////8A/////////////6AEAAAAAAAAAAAAAAAAAAAAAAAAkP///////////wD///////////+4BAAAAAAAAAAAAAAAAAAAAAAAAAAAoP//////////AP//////////8BQAAAAAAAAAAAAAAAAAAAAAAAAAAAAM5P////////8A//////////9wAAAAAAAAAAAsrPD/7KQsAAAAAAAAAABg/////////wD/////////+BAAAAAAAAAAUPj///////hQAAAAAAAAAAjs////////AP////////+sAAAAAAAAABDw//////////AYAAAAAAAAAKD///////8A/////////2wAAAAAAAAAdP///////////3wAAAAAAAAAYP///////wD/////////OAAAAAAAAAC4////////////xAAAAAAAAAAw////////AP////////8cAAAAAAAAAOD////////////oAAAAAAAAABT///////8A/////////wAAAAAAAAAA//////////////8AAAAAAAAAAP///////wD/////////AAAAAAAAAAD//////////////wAAAAAAAAAA////////AP////////8AAAAAAAAAAP/////////////8AAAAAAAAAAD///////8A/////////xwAAAAAAAAA5P///////////+AAAAAAAAAAHP///////wD/////////NAAAAAAAAAC8////////////uAAAAAAAAAA4////////AP////////9oAAAAAAAAAHj///////////98AAAAAAAAAGT///////8A/////////6gAAAAAAAAAGPD/////////+BgAAAAAAAAApP///////wD/////////9AwAAAAAAAAAUPz///////xcAAAAAAAAAAjs////////AP//////////cAAAAAAAAAAALKjs//CwOAAAAAAAAAAAYP////////8A///////////wFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzk/////////wD///////////+4BAAAAAAAAAAAAAAAAAAAAAAAAAAAoP//////////AP////////////+QAAAAAAAAAAAAAAAAAAAAAAAAAJD///////////8A//////////////+sEAAAAAAAAAAAAAAAAAAAAAyg/////////////wD////////////////oZAgAAAAAAAAAAAAAAARg4P//////////////AP//////////////////9KhsOCAAAAAUMFyc7P////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'P' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP///////////wAAAAAAAAAAAAAAAAAACCxguP////////////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAAOOD//////////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAGOD/////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAAAAAARP////////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAxP///////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAAABo////////////AP///////////wAAAAAAAAAA////6JwMAAAAAAAAADD///////////8A////////////AAAAAAAAAAD//////6AAAAAAAAAADP///////////wD///////////8AAAAAAAAAAP//////9AAAAAAAAAAA////////////AP///////////wAAAAAAAAAA///////0AAAAAAAAAAD///////////8A////////////AAAAAAAAAAD//////5gAAAAAAAAAHP///////////wD///////////8AAAAAAAAAAP///9iICAAAAAAAAABI////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAJD///////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAI6P///////////wD///////////8AAAAAAAAAAAAAAAAAAAAAAAAAAIT/////////////AP///////////wAAAAAAAAAAAAAAAAAAAAAAAABU/P////////////8A////////////AAAAAAAAAAAAAAAAAAAAAAAIhPz//////////////wD///////////8AAAAAAAAAAAAAAAAABCRMkOz/////////////////AP///////////wAAAAAAAAAA//////////////////////////////8A////////////AAAAAAAAAAD//////////////////////////////wD///////////8AAAAAAAAAAP//////////////////////////////AP///////////wAAAAAAAAAA//////////////////////////////8A////////////AAAAAAAAAAD//////////////////////////////wD///////////8AAAAAAAAAAP//////////////////////////////AP///////////wAAAAAAAAAA//////////////////////////////8A////////////AAAAAAAAAAD//////////////////////////////wD///////////8AAAAAAAAAAP//////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'Q' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////SoaDQcAAAAHDhoqPT///////////////////8A//////////////BwDAAAAAAAAAAAAAAACHDo/////////////////wD///////////+4FAAAAAAAAAAAAAAAAAAAABCo////////////////AP//////////nAQAAAAAAAAAAAAAAAAAAAAAAACQ//////////////8A/////////7gEAAAAAAAAAAAAAAAAAAAAAAAAAACg/////////////wD////////wFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzo////////////AP///////3AAAAAAAAAAACyo8P/sqCwAAAAAAAAAAGT///////////8A///////4EAAAAAAAAABM+P///////FQAAAAAAAAACPT//////////wD//////7AAAAAAAAAAFPD/////////9BgAAAAAAAAApP//////////AP//////bAAAAAAAAAB4////////////fAAAAAAAAABk//////////8A//////84AAAAAAAAALz///////////+8AAAAAAAAADT//////////wD//////xwAAAAAAAAA6P///////////+QAAAAAAAAAHP//////////AP//////AAAAAAAAAAD//////////////wAAAAAAAAAA//////////8A//////8AAAAAAAAAAP//////////////AAAAAAAAAAD//////////wD//////wAAAAAAAAAA/P////////////8AAAAAAAAAAP//////////AP//////GAAAAAAAAADg////////////4AAAAAAAAAAc//////////8A//////84AAAAAAAAALT////MJHTo//+8AAAAAAAAADT//////////wD//////2wAAAAAAAAAdP///2AAABCg/3wAAAAAAAAAZP//////////AP//////rAAAAAAAAAAY9P/sCAAAAABMGAAAAAAAAACk//////////8A///////4EAAAAAAAAABU/P+0OAAAAAAAAAAAAAAACPT//////////wD///////94AAAAAAAAAAA4sPD/gAAAAAAAAAAAAABk////////////AP////////AcAAAAAAAAAAAAAAAAAAAAAAAAAAAADOT///////////8A/////////7wEAAAAAAAAAAAAAAAAAAAAAAAAAACQ/////////////wD//////////6wEAAAAAAAAAAAAAAAAAAAAAAAAABSs////////////AP///////////7gUAAAAAAAAAAAAAAAAAAAAAAAAAABAwP////////8A//////////////BwDAAAAAAAAAAAAAAABAgAAAAAAAA8/////////wD////////////////0qGg0GAAAABgwXJjkxBgAAAAAALD/////////AP//////////////////////////////////5DQAAAAk/P////////8A////////////////////////////////////+GwAAJD//////////wD//////////////////////////////////////8A49P//////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'R' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////wAAAAAAAAAAAAAAAAAAAAQgOGSk+P///////////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAcuP//////////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAEsP////////////8A/////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ6P///////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8////////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAADD///////////8A/////////wAAAAAAAAAA///////svDgAAAAAAAAACP///////////wD/////////AAAAAAAAAAD/////////7AAAAAAAAAAA////////////AP////////8AAAAAAAAAAP/////////cAAAAAAAAABD///////////8A/////////wAAAAAAAAAA//////DQoCQAAAAAAAAAQP///////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAACU////////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAIPj///////////8A/////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAzU/////////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAA02P//////////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAxctPz///////////////8A/////////wAAAAAAAAAAAAAAAAAAAAAAAEDY/////////////////wD/////////AAAAAAAAAAD/9LAsAAAAAAAAAAzc////////////////AP////////8AAAAAAAAAAP///+wkAAAAAAAAADD8//////////////8A/////////wAAAAAAAAAA/////8QAAAAAAAAAAJD//////////////wD/////////AAAAAAAAAAD//////1QAAAAAAAAAFPD/////////////AP////////8AAAAAAAAAAP//////3AQAAAAAAAAAgP////////////8A/////////wAAAAAAAAAA////////aAAAAAAAAAAM6P///////////wD/////////AAAAAAAAAAD////////oCAAAAAAAAABs////////////AP////////8AAAAAAAAAAP////////+AAAAAAAAAAATc//////////8A/////////wAAAAAAAAAA//////////AUAAAAAAAAAFj//////////wD/////////AAAAAAAAAAD//////////5AAAAAAAAAAAND/////////AP////////8AAAAAAAAAAP//////////+CQAAAAAAAAAQP////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'S' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP/////////////////8vHBEIAgAAAQgQHC8/P////////////////8A////////////////pCQAAAAAAAAAAAAAAAAcoP///////////////wD//////////////FwAAAAAAAAAAAAAAAAAAAAAXP//////////////AP////////////9oAAAAAAAAAAAAAAAAAAAAAAAAhP////////////8A////////////zAAAAAAAAAAAAAAAAAAAAAAAAAAI6P///////////wD///////////9cAAAAAAAAAAAAAAAAAAAAAAAAAACA////////////AP///////////xgAAAAAAAAAUOD/8KwkAAAAAAAAADj///////////8A////////////AAAAAAAAAAD0/////8wABCAgICxASP///////////wD///////////8MAAAAAAAAAMz/////////////////////////////AP///////////0AAAAAAAAAACFiQxPT///////////////////////8A////////////oAAAAAAAAAAAAAAAADBwtPT//////////////////wD////////////8QAAAAAAAAAAAAAAAAAAACFTA////////////////AP/////////////oOAAAAAAAAAAAAAAAAAAAAABM6P////////////8A///////////////4fAgAAAAAAAAAAAAAAAAAAAAY2P///////////wD/////////////////7IwwAAAAAAAAAAAAAAAAAAAo+P//////////AP/////////////////////koGw0BAAAAAAAAAAAAACU//////////8A///////////////////////////4uFgAAAAAAAAAADz//////////wD//////////2BgSEA0IBwA6P///////5QAAAAAAAAADP//////////AP//////////JAAAAAAAAACc/////////AAAAAAAAAAA//////////8A//////////9YAAAAAAAAACDo///////AAAAAAAAAABT//////////wD//////////6QAAAAAAAAAACCk7P/snBQAAAAAAAAAUP//////////AP//////////+BAAAAAAAAAAAAAAAAAAAAAAAAAAAACs//////////8A////////////kAAAAAAAAAAAAAAAAAAAAAAAAAAAOP///////////wD////////////8RAAAAAAAAAAAAAAAAAAAAAAAABjc////////////AP/////////////0PAAAAAAAAAAAAAAAAAAAAAAg2P////////////8A///////////////8hBQAAAAAAAAAAAAAAAAMdPT//////////////wD/////////////////+LRwSCAMAAAAHDhoqPT/////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'T' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////8A/////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////8A/////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD///////////////////8AAAAAAAAAAP//////////////////////AP///////////////////wAAAAAAAAAA//////////////////////8A////////////////////AAAAAAAAAAD//////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'U' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////AAAAAAAAAAD///////////8AAAAAAAAAAP//////////AP////////8AAAAAAAAAAP///////////wAAAAAAAAAA//////////8A/////////wAAAAAAAAAA////////////AAAAAAAAAAD//////////wD/////////JAAAAAAAAADk/////////+gAAAAAAAAAHP//////////AP////////9MAAAAAAAAAJz/////////nAAAAAAAAABE//////////8A/////////4gAAAAAAAAAHOj//////+ggAAAAAAAAAHz//////////wD/////////0AAAAAAAAAAAIJzs/+ykIAAAAAAAAAAA0P//////////AP//////////QAAAAAAAAAAAAAAAAAAAAAAAAAAAAED///////////8A///////////IBAAAAAAAAAAAAAAAAAAAAAAAAAAE0P///////////wD///////////+YAAAAAAAAAAAAAAAAAAAAAAAAAJj/////////////AP////////////+UBAAAAAAAAAAAAAAAAAAAAASU//////////////8A///////////////IPAAAAAAAAAAAAAAAAAAwyP///////////////wD/////////////////0IxYOCAIAAAEIEiAyP//////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'V' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD//////zAAAAAAAAAAYP//////////////ZAAAAAAAAAAw////////AP//////kAAAAAAAAAAU/P////////////8UAAAAAAAAAJD///////8A///////oBAAAAAAAAADE////////////xAAAAAAAAAAE7P///////wD///////9MAAAAAAAAAHD///////////94AAAAAAAAAEz/////////AP///////6gAAAAAAAAAJP///////////yQAAAAAAAAArP////////8A////////+BAAAAAAAAAA1P/////////YAAAAAAAAABT4/////////wD/////////aAAAAAAAAACE/////////4QAAAAAAAAAbP//////////AP/////////EAAAAAAAAADT/////////OAAAAAAAAADM//////////8A//////////8kAAAAAAAAAOT//////+QAAAAAAAAAKP///////////wD//////////4QAAAAAAAAAmP//////nAAAAAAAAACI////////////AP//////////5AAAAAAAAABE//////9EAAAAAAAABOT///////////8A////////////QAAAAAAAAAT0////9AgAAAAAAABI/////////////wD///////////+gAAAAAAAAAKT///+kAAAAAAAAAKj/////////////AP////////////QIAAAAAAAAXP///1wAAAAAAAAM+P////////////8A/////////////1wAAAAAAAAM+P/8DAAAAAAAAGT//////////////wD/////////////vAAAAAAAAAC8/7wAAAAAAAAAxP//////////////AP//////////////HAAAAAAAAGj/aAAAAAAAACT///////////////8A//////////////94AAAAAAAAHP8cAAAAAAAAhP///////////////wD//////////////9gAAAAAAAAAkAAAAAAAAADk////////////////AP///////////////zgAAAAAAAAQAAAAAAAAQP////////////////8A////////////////lAAAAAAAAAAAAAAAAACg/////////////////wD////////////////sCAAAAAAAAAAAAAAADPT/////////////////AP////////////////9QAAAAAAAAAAAAAABg//////////////////8A/////////////////7AAAAAAAAAAAAAAAMD//////////////////wD//////////////////BQAAAAAAAAAAAAc////////////////////AP//////////////////cAAAAAAAAAAAAHz///////////////////8A///////////////////MAAAAAAAAAAAA3P///////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'W' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A//8cAAAAAAAAALz/////4AAAAAAAAAAA6P////+8AAAAAAAAABz//wD//1QAAAAAAAAAjP////+gAAAAAAAAAACo/////4wAAAAAAAAAUP//AP//jAAAAAAAAABU/////2AAAAAAAAAAAGj/////VAAAAAAAAACM//8A///EAAAAAAAAACT/////IAAAAAAAAAAAKP////8kAAAAAAAAAMT//wD///gEAAAAAAAAAPD//+AAAAAAAAAAAAAA6P//8AAAAAAAAAAE9P//AP///zAAAAAAAAAAvP//oAAAAAAAAAAAAACo//+8AAAAAAAAADD///8A////bAAAAAAAAACM//9gAAAAAAAAAAAAAGT//4wAAAAAAAAAaP///wD///+kAAAAAAAAAFT//yAAAAAAAAAAAAAAIP//VAAAAAAAAACc////AP///9gAAAAAAAAAJP/gAAAAAAAAAAAAAAAA4P8kAAAAAAAAANT///8A/////xAAAAAAAAAA8KAAAAAAAAAAAAAAAACg8AAAAAAAAAAQ/////wD/////TAAAAAAAAAC8YAAAAAAAAAAAAAAAAGC8AAAAAAAAAET/////AP////+AAAAAAAAAAIwgAAAAAAAAAAAAAAAAIIwAAAAAAAAAfP////8A/////7gAAAAAAAAANAAAAAAAACwwAAAAAAAANAAAAAAAAACw/////wD/////8AAAAAAAAAAAAAAAAAAAdHgAAAAAAAAAAAAAAAAAAOz/////AP//////KAAAAAAAAAAAAAAAAAC4vAAAAAAAAAAAAAAAAAAg//////8A//////9gAAAAAAAAAAAAAAAACPj4CAAAAAAAAAAAAAAAAFj//////wD//////5QAAAAAAAAAAAAAAABE//9IAAAAAAAAAAAAAAAAkP//////AP//////0AAAAAAAAAAAAAAAAIj//4wAAAAAAAAAAAAAAADI//////8A///////8DAAAAAAAAAAAAAAAzP//1AAAAAAAAAAAAAAABPj//////wD///////88AAAAAAAAAAAAABT/////GAAAAAAAAAAAAAA0////////AP///////3QAAAAAAAAAAAAAWP////9gAAAAAAAAAAAAAHD///////8A////////sAAAAAAAAAAAAACg/////6QAAAAAAAAAAAAApP///////wD////////kAAAAAAAAAAAAAOT/////6AAAAAAAAAAAAADc////////AP////////8cAAAAAAAAAAAo////////MAAAAAAAAAAAEP////////8A/////////1QAAAAAAAAAAHD///////94AAAAAAAAAABM/////////wD/////////jAAAAAAAAAAAtP///////7wAAAAAAAAAAID/////////AP/////////EAAAAAAAAAAT0////////+AgAAAAAAAAAuP////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'X' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD///////9UAAAAAAAAAKz///////////+sAAAAAAAAAFD/////////AP///////+QQAAAAAAAAFOT/////////8BwAAAAAAAAM5P////////8A/////////5gAAAAAAAAATP////////9kAAAAAAAAAJD//////////wD//////////0AAAAAAAAAAoP//////wAAAAAAAAAA0/P//////////AP//////////2AgAAAAAAAAQ4P////gkAAAAAAAABMz///////////8A////////////iAAAAAAAAABA////dAAAAAAAAABw/////////////wD////////////8MAAAAAAAAACU/9AEAAAAAAAAHPD/////////////AP/////////////IBAAAAAAAAAzYMAAAAAAAAACs//////////////8A//////////////90AAAAAAAAABAAAAAAAAAATP///////////////wD///////////////QgAAAAAAAAAAAAAAAAAAzg////////////////AP///////////////7wAAAAAAAAAAAAAAAAAjP////////////////8A/////////////////2AAAAAAAAAAAAAAADD8/////////////////wD/////////////////7BQAAAAAAAAAAAAEyP//////////////////AP/////////////////gDAAAAAAAAAAAAAjY//////////////////8A/////////////////0AAAAAAAAAAAAAAADj8/////////////////wD///////////////+UAAAAAAAAAAAAAAAAAJD/////////////////AP//////////////4AwAAAAAAAAAAAAAAAAADOD///////////////8A//////////////9AAAAAAAAAAAAAAAAAAAAAQP///////////////wD/////////////nAAAAAAAAAAAWAAAAAAAAAAAlP//////////////AP///////////+QQAAAAAAAAAGD/YAAAAAAAAAAM4P////////////8A////////////TAAAAAAAAAAs9P/0LAAAAAAAAABM/////////////wD//////////6AAAAAAAAAADNT////UDAAAAAAAAACg////////////AP/////////kEAAAAAAAAACg//////+gAAAAAAAAABDk//////////8A/////////0wAAAAAAAAAYP////////9gAAAAAAAAAEz//////////wD///////+oAAAAAAAAACz0//////////QsAAAAAAAAAKT/////////AP//////7BQAAAAAAAAM1P///////////9QMAAAAAAAAFOz///////8A//////9UAAAAAAAAAKD//////////////6AAAAAAAAAAVP///////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'Y' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP///////1QAAAAAAAAAAGj//////////2gAAAAAAAAAAFT///////8A////////5BAAAAAAAAAAAMT////////EAAAAAAAAAAAQ5P///////wD/////////mAAAAAAAAAAAKPj/////+CgAAAAAAAAAAJj/////////AP//////////PAAAAAAAAAAAgP////+AAAAAAAAAAAA8//////////8A///////////YCAAAAAAAAAAE2P//2AQAAAAAAAAACNj//////////wD///////////+AAAAAAAAAAAA4//84AAAAAAAAAACA////////////AP////////////woAAAAAAAAAACUlAAAAAAAAAAAKPz///////////8A/////////////8gAAAAAAAAAABAQAAAAAAAAAADI/////////////wD//////////////2wAAAAAAAAAAAAAAAAAAAAAbP//////////////AP//////////////8BwAAAAAAAAAAAAAAAAAABzw//////////////8A////////////////tAAAAAAAAAAAAAAAAAAAtP///////////////wD/////////////////VAAAAAAAAAAAAAAAAFT/////////////////AP/////////////////oEAAAAAAAAAAAAAAQ6P////////////////8A//////////////////+cAAAAAAAAAAAAAJz//////////////////wD///////////////////9AAAAAAAAAAABA////////////////////AP///////////////////9gAAAAAAAAAANj///////////////////8A/////////////////////wAAAAAAAAAA/////////////////////wD/////////////////////AAAAAAAAAAD/////////////////////AP////////////////////8AAAAAAAAAAP////////////////////8A/////////////////////wAAAAAAAAAA/////////////////////wD/////////////////////AAAAAAAAAAD/////////////////////AP////////////////////8AAAAAAAAAAP////////////////////8A/////////////////////wAAAAAAAAAA/////////////////////wD/////////////////////AAAAAAAAAAD/////////////////////AP////////////////////8AAAAAAAAAAP////////////////////8A/////////////////////wAAAAAAAAAA/////////////////////wD/////////////////////AAAAAAAAAAD/////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ 'Z' => array(
+ 'data' => 'AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////8A//////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////wD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////AP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAQ//////////////8A/////////////////////////1AAAAAAAAAABLz//////////////wD///////////////////////98AAAAAAAAAACY////////////////AP//////////////////////pAAAAAAAAAAAaP////////////////8A/////////////////////8QIAAAAAAAAAET8/////////////////wD////////////////////gGAAAAAAAAAAo9P//////////////////AP//////////////////9CwAAAAAAAAAFNz///////////////////8A//////////////////xMAAAAAAAAAATA/////////////////////wD/////////////////eAAAAAAAAAAAnP//////////////////////AP///////////////5wAAAAAAAAAAHT///////////////////////8A///////////////ABAAAAAAAAABM/P///////////////////////wD/////////////3BQAAAAAAAAALPT/////////////////////////AP////////////QoAAAAAAAAABjg//////////////////////////8A///////////8SAAAAAAAAAAExP///////////////////////////wD//////////2wAAAAAAAAAAKD/////////////////////////////AP////////+YAAAAAAAAAAB8//////////////////////////////8A/////////wQAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A/////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////wD/////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////AP////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8A/////////////////////////////////////////////////////wD/////////////////////////////////////////////////////AP////////////////////////////////////////////////////8=',
+ 'width' => 40
+ ),
+ );
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/plugins/captcha_abstract.php b/phpBB/includes/captcha/plugins/captcha_abstract.php
new file mode 100644
index 0000000000..db4b7649c7
--- /dev/null
+++ b/phpBB/includes/captcha/plugins/captcha_abstract.php
@@ -0,0 +1,375 @@
+<?php
+/**
+*
+* @package VC
+* @version $Id$
+* @copyright (c) 2006, 2008 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+
+/**
+* This class holds the code shared by the two default 3.0.x CAPTCHAs.
+*
+* @package VC
+*/
+class phpbb_default_captcha
+{
+ var $confirm_id;
+ var $confirm_code;
+ var $code;
+ var $seed;
+ var $attempts = 0;
+ var $type;
+ var $solved = 0;
+ var $captcha_vars = false;
+
+ function init($type)
+ {
+ global $config, $db, $user;
+
+ // read input
+ $this->confirm_id = request_var('confirm_id', '');
+ $this->confirm_code = request_var('confirm_code', '');
+ $refresh = request_var('refresh_vc', false) && $config['confirm_refresh'];
+
+ $this->type = (int) $type;
+
+ if (!strlen($this->confirm_id) || !$this->load_code())
+ {
+ // we have no confirm ID, better get ready to display something
+ $this->generate_code();
+ }
+ else if ($refresh)
+ {
+ $this->regenerate_code();
+ }
+ }
+
+ function execute_demo()
+ {
+ global $user;
+
+ $this->code = gen_rand_string(mt_rand(CAPTCHA_MIN_CHARS, CAPTCHA_MAX_CHARS));
+ $this->seed = hexdec(substr(unique_id(), 4, 10));
+
+ // compute $seed % 0x7fffffff
+ $this->seed -= 0x7fffffff * floor($this->seed / 0x7fffffff);
+
+ $captcha = new captcha();
+ define('IMAGE_OUTPUT', 1);
+ $captcha->execute($this->code, $this->seed);
+ }
+
+ function execute()
+ {
+ if (empty($this->code))
+ {
+ if (!$this->load_code())
+ {
+ // invalid request, bail out
+ return false;
+ }
+ }
+ $captcha = new captcha();
+ define('IMAGE_OUTPUT', 1);
+ $captcha->execute($this->code, $this->seed);
+ }
+
+ function get_template()
+ {
+ global $config, $user, $template, $phpEx, $phpbb_root_path;
+
+ if ($this->is_solved())
+ {
+ return false;
+ }
+ else
+ {
+ $link = append_sid($phpbb_root_path . 'ucp.' . $phpEx, 'mode=confirm&amp;confirm_id=' . $this->confirm_id . '&amp;type=' . $this->type);
+ $explain = $user->lang(($this->type != CONFIRM_POST) ? 'CONFIRM_EXPLAIN' : 'POST_CONFIRM_EXPLAIN', '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
+
+ $template->assign_vars(array(
+ 'CONFIRM_IMAGE_LINK' => $link,
+ 'CONFIRM_IMAGE' => '<img src="' . $link . '" />',
+ 'CONFIRM_IMG' => '<img src="' . $link . '" />',
+ 'CONFIRM_ID' => $this->confirm_id,
+ 'S_CONFIRM_CODE' => true,
+ 'S_TYPE' => $this->type,
+ 'S_CONFIRM_REFRESH' => ($config['enable_confirm'] && $config['confirm_refresh'] && $this->type == CONFIRM_REG) ? true : false,
+ 'L_CONFIRM_EXPLAIN' => $explain,
+ ));
+
+ return 'captcha_default.html';
+ }
+ }
+
+ function get_demo_template($id)
+ {
+ global $config, $user, $template, $phpbb_admin_path, $phpEx;
+
+ $variables = '';
+
+ if (is_array($this->captcha_vars))
+ {
+ foreach ($this->captcha_vars as $captcha_var => $template_var)
+ {
+ $variables .= '&amp;' . rawurlencode($captcha_var) . '=' . request_var($captcha_var, (int) $config[$captcha_var]);
+ }
+ }
+
+ // acp_captcha has a delivery function; let's use it
+ $template->assign_vars(array(
+ 'CONFIRM_IMAGE' => append_sid($phpbb_admin_path . 'index.' . $phpEx, 'captcha_demo=1&amp;mode=visual&amp;i=' . $id . '&amp;select_captcha=' . $this->get_class_name()) . $variables,
+ 'CONFIRM_ID' => $this->confirm_id,
+ ));
+
+ return 'captcha_default_acp_demo.html';
+ }
+
+ function get_hidden_fields()
+ {
+ $hidden_fields = array();
+
+ // this is required for posting.php - otherwise we would forget about the captcha being already solved
+ if ($this->solved)
+ {
+ $hidden_fields['confirm_code'] = $this->confirm_code;
+ }
+ $hidden_fields['confirm_id'] = $this->confirm_id;
+ return $hidden_fields;
+ }
+
+ function garbage_collect($type)
+ {
+ global $db, $config;
+
+ $sql = 'SELECT DISTINCT c.session_id
+ FROM ' . CONFIRM_TABLE . ' c
+ LEFT JOIN ' . SESSIONS_TABLE . ' s ON (c.session_id = s.session_id)
+ WHERE s.session_id IS NULL' .
+ ((empty($type)) ? '' : ' AND c.confirm_type = ' . (int) $type);
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $sql_in = array();
+ do
+ {
+ $sql_in[] = (string) $row['session_id'];
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ if (sizeof($sql_in))
+ {
+ $sql = 'DELETE FROM ' . CONFIRM_TABLE . '
+ WHERE ' . $db->sql_in_set('session_id', $sql_in);
+ $db->sql_query($sql);
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+
+ function uninstall()
+ {
+ $this->garbage_collect(0);
+ }
+
+ function install()
+ {
+ return;
+ }
+
+ function validate()
+ {
+ global $config, $db, $user;
+
+ $error = '';
+ if (!$this->confirm_id)
+ {
+ $error = $user->lang['CONFIRM_CODE_WRONG'];
+ }
+ else
+ {
+ if ($this->check_code())
+ {
+ // $this->delete_code(); commented out to allow posting.php to repeat the question
+ $this->solved = true;
+ }
+ else
+ {
+ $error = $user->lang['CONFIRM_CODE_WRONG'];
+ }
+ }
+
+ if (strlen($error))
+ {
+ // okay, incorrect answer. Let's ask a new question.
+ $this->new_attempt();
+ return $error;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ /**
+ * The old way to generate code, suitable for GD and non-GD. Resets the internal state.
+ */
+ function generate_code()
+ {
+ global $db, $user;
+
+ $this->code = gen_rand_string(mt_rand(CAPTCHA_MIN_CHARS, CAPTCHA_MAX_CHARS));
+ $this->confirm_id = md5(unique_id($user->ip));
+ $this->seed = hexdec(substr(unique_id(), 4, 10));
+ $this->solved = 0;
+ // compute $seed % 0x7fffffff
+ $this->seed -= 0x7fffffff * floor($this->seed / 0x7fffffff);
+
+ $sql = 'INSERT INTO ' . CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'confirm_id' => (string) $this->confirm_id,
+ 'session_id' => (string) $user->session_id,
+ 'confirm_type' => (int) $this->type,
+ 'code' => (string) $this->code,
+ 'seed' => (int) $this->seed)
+ );
+ $db->sql_query($sql);
+ }
+
+ /**
+ * New Question, if desired.
+ */
+ function regenerate_code()
+ {
+ global $db, $user;
+
+ $this->code = gen_rand_string(mt_rand(CAPTCHA_MIN_CHARS, CAPTCHA_MAX_CHARS));
+ $this->seed = hexdec(substr(unique_id(), 4, 10));
+ $this->solved = 0;
+ // compute $seed % 0x7fffffff
+ $this->seed -= 0x7fffffff * floor($this->seed / 0x7fffffff);
+
+ $sql = 'UPDATE ' . CONFIRM_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array(
+ 'code' => (string) $this->code,
+ 'seed' => (int) $this->seed)) . '
+ WHERE
+ confirm_id = \'' . $db->sql_escape($this->confirm_id) . '\'
+ AND session_id = \'' . $db->sql_escape($user->session_id) . '\'';
+ $db->sql_query($sql);
+ }
+
+ /**
+ * New Question, if desired.
+ */
+ function new_attempt()
+ {
+ global $db, $user;
+
+ $this->code = gen_rand_string(mt_rand(CAPTCHA_MIN_CHARS, CAPTCHA_MAX_CHARS));
+ $this->seed = hexdec(substr(unique_id(), 4, 10));
+ $this->solved = 0;
+ // compute $seed % 0x7fffffff
+ $this->seed -= 0x7fffffff * floor($this->seed / 0x7fffffff);
+
+ $sql = 'UPDATE ' . CONFIRM_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array(
+ 'code' => (string) $this->code,
+ 'seed' => (int) $this->seed)) . '
+ , attempts = attempts + 1
+ WHERE
+ confirm_id = \'' . $db->sql_escape($this->confirm_id) . '\'
+ AND session_id = \'' . $db->sql_escape($user->session_id) . '\'';
+ $db->sql_query($sql);
+ }
+
+ /**
+ * Look up everything we need for painting&checking.
+ */
+ function load_code()
+ {
+ global $db, $user;
+
+ $sql = 'SELECT code, seed, attempts
+ FROM ' . CONFIRM_TABLE . "
+ WHERE confirm_id = '" . $db->sql_escape($this->confirm_id) . "'
+ AND session_id = '" . $db->sql_escape($user->session_id) . "'
+ AND confirm_type = " . $this->type;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ $this->code = $row['code'];
+ $this->seed = $row['seed'];
+ $this->attempts = $row['attempts'];
+ return true;
+ }
+
+ return false;
+ }
+
+ function check_code()
+ {
+ return (strcasecmp($this->code, $this->confirm_code) === 0);
+ }
+
+ function delete_code()
+ {
+ global $db, $user;
+
+ $sql = 'DELETE FROM ' . CONFIRM_TABLE . "
+ WHERE confirm_id = '" . $db->sql_escape($confirm_id) . "'
+ AND session_id = '" . $db->sql_escape($user->session_id) . "'
+ AND confirm_type = " . $this->type;
+ $db->sql_query($sql);
+ }
+
+ function get_attempt_count()
+ {
+ return $this->attempts;
+ }
+
+ function reset()
+ {
+ global $db, $user;
+
+ $sql = 'DELETE FROM ' . CONFIRM_TABLE . "
+ WHERE session_id = '" . $db->sql_escape($user->session_id) . "'
+ AND confirm_type = " . (int) $this->type;
+ $db->sql_query($sql);
+
+ // we leave the class usable by generating a new question
+ $this->generate_code();
+ }
+
+ function is_solved()
+ {
+ if (request_var('confirm_code', false) && $this->solved === 0)
+ {
+ $this->validate();
+ }
+ return (bool) $this->solved;
+ }
+
+ /**
+ * API function
+ */
+ function has_config()
+ {
+ return false;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php
new file mode 100644
index 0000000000..6e899adc16
--- /dev/null
+++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php
@@ -0,0 +1,165 @@
+<?php
+/**
+*
+* @package VC
+* @version $Id$
+* @copyright (c) 2006, 2008 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Placeholder for autoload
+*/
+if (!class_exists('phpbb_default_captcha'))
+{
+ include($phpbb_root_path . 'includes/captcha/plugins/captcha_abstract.' . $phpEx);
+}
+
+/**
+* @package VC
+*/
+class phpbb_captcha_gd extends phpbb_default_captcha
+{
+
+ var $captcha_vars = array(
+ 'captcha_gd_x_grid' => 'CAPTCHA_GD_X_GRID',
+ 'captcha_gd_y_grid' => 'CAPTCHA_GD_Y_GRID',
+ 'captcha_gd_foreground_noise' => 'CAPTCHA_GD_FOREGROUND_NOISE',
+// 'captcha_gd' => 'CAPTCHA_GD_PREVIEWED',
+ 'captcha_gd_wave' => 'CAPTCHA_GD_WAVE',
+ 'captcha_gd_3d_noise' => 'CAPTCHA_GD_3D_NOISE',
+ 'captcha_gd_fonts' => 'CAPTCHA_GD_FONTS',
+ );
+
+ function phpbb_captcha_gd()
+ {
+ global $phpbb_root_path, $phpEx;
+
+ if (!class_exists('captcha'))
+ {
+ include($phpbb_root_path . 'includes/captcha/captcha_gd.' . $phpEx);
+ }
+ }
+
+ function &get_instance()
+ {
+ $instance =& new phpbb_captcha_gd();
+ return $instance;
+ }
+
+ function is_available()
+ {
+ global $phpbb_root_path, $phpEx;
+
+ if (@extension_loaded('gd'))
+ {
+ return true;
+ }
+
+ if (!function_exists('can_load_dll'))
+ {
+ include($phpbb_root_path . 'includes/functions_install.' . $phpEx);
+ }
+
+ return can_load_dll('gd');
+ }
+
+ /**
+ * API function
+ */
+ function has_config()
+ {
+ return true;
+ }
+
+ function get_name()
+ {
+ return 'CAPTCHA_GD';
+ }
+
+ function get_class_name()
+ {
+ return 'phpbb_captcha_gd';
+ }
+
+ function acp_page($id, &$module)
+ {
+ global $db, $user, $auth, $template;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ $user->add_lang('acp/board');
+
+ $config_vars = array(
+ 'enable_confirm' => 'REG_ENABLE',
+ 'enable_post_confirm' => 'POST_ENABLE',
+ 'confirm_refresh' => 'CONFIRM_REFRESH',
+ 'captcha_gd' => 'CAPTCHA_GD',
+ );
+
+ $module->tpl_name = 'captcha_gd_acp';
+ $module->page_title = 'ACP_VC_SETTINGS';
+ $form_key = 'acp_captcha';
+ add_form_key($form_key);
+
+ $submit = request_var('submit', '');
+
+ if ($submit && check_form_key($form_key))
+ {
+ $captcha_vars = array_keys($this->captcha_vars);
+ foreach ($captcha_vars as $captcha_var)
+ {
+ $value = request_var($captcha_var, 0);
+ if ($value >= 0)
+ {
+ set_config($captcha_var, $value);
+ }
+ }
+
+ add_log('admin', 'LOG_CONFIG_VISUAL');
+ trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($module->u_action));
+ }
+ else if ($submit)
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($module->u_action));
+ }
+ else
+ {
+ foreach ($this->captcha_vars as $captcha_var => $template_var)
+ {
+ $var = (isset($_REQUEST[$captcha_var])) ? request_var($captcha_var, 0) : $config[$captcha_var];
+ $template->assign_var($template_var, $var);
+ }
+
+ $template->assign_vars(array(
+ 'CAPTCHA_PREVIEW' => $this->get_demo_template($id),
+ 'CAPTCHA_NAME' => $this->get_class_name(),
+ 'U_ACTION' => $module->u_action,
+ ));
+ }
+ }
+
+ function execute_demo()
+ {
+ global $config;
+
+ $config_old = $config;
+ foreach ($this->captcha_vars as $captcha_var => $template_var)
+ {
+ $config[$captcha_var] = request_var($captcha_var, (int) $config[$captcha_var]);
+ }
+ parent::execute_demo();
+ $config = $config_old;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php
new file mode 100644
index 0000000000..2f55d15efd
--- /dev/null
+++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php
@@ -0,0 +1,83 @@
+<?php
+/**
+*
+* @package VC
+* @version $Id$
+* @copyright (c) 2006, 2008 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Placeholder for autoload
+*/
+if (!class_exists('phpbb_default_captcha'))
+{
+ include($phpbb_root_path . 'includes/captcha/plugins/captcha_abstract.' . $phpEx);
+}
+
+/**
+* @package VC
+*/
+class phpbb_captcha_gd_wave extends phpbb_default_captcha
+{
+
+ function phpbb_captcha_gd_wave()
+ {
+ global $phpbb_root_path, $phpEx;
+
+ if (!class_exists('captcha'))
+ {
+ include_once($phpbb_root_path . 'includes/captcha/captcha_gd_wave.' . $phpEx);
+ }
+ }
+
+ function get_instance()
+ {
+ return new phpbb_captcha_gd_wave();
+ }
+
+ function is_available()
+ {
+ global $phpbb_root_path, $phpEx;
+
+ if (@extension_loaded('gd'))
+ {
+ return true;
+ }
+
+ if (!function_exists('can_load_dll'))
+ {
+ include($phpbb_root_path . 'includes/functions_install.' . $phpEx);
+ }
+
+ return can_load_dll('gd');
+ }
+
+ function get_name()
+ {
+ return 'CAPTCHA_GD_3D';
+ }
+
+ function get_class_name()
+ {
+ return 'phpbb_captcha_gd_wave';
+ }
+
+ function acp_page($id, &$module)
+ {
+ global $config, $db, $template, $user;
+
+ trigger_error($user->lang['CAPTCHA_NO_OPTIONS'] . adm_back_link($module->u_action));
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php
new file mode 100644
index 0000000000..ac30ed4297
--- /dev/null
+++ b/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php
@@ -0,0 +1,72 @@
+<?php
+/**
+*
+* @package VC
+* @version $Id$
+* @copyright (c) 2006, 2008 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Placeholder for autoload
+*/
+if (!class_exists('phpbb_default_captcha'))
+{
+ include($phpbb_root_path . 'includes/captcha/plugins/captcha_abstract.' . $phpEx);
+}
+
+/**
+* @package VC
+*/
+class phpbb_captcha_nogd extends phpbb_default_captcha
+{
+
+ function phpbb_captcha_nogd()
+ {
+ global $phpbb_root_path, $phpEx;
+
+ if (!class_exists('captcha'))
+ {
+ include_once($phpbb_root_path . 'includes/captcha/captcha_non_gd.' . $phpEx);
+ }
+ }
+
+ function &get_instance()
+ {
+ $instance =& new phpbb_captcha_nogd();
+ return $instance;
+ }
+
+ function is_available()
+ {
+ return true;
+ }
+
+ function get_name()
+ {
+ return 'CAPTCHA_NO_GD';
+ }
+
+ function get_class_name()
+ {
+ return 'phpbb_captcha_nogd';
+ }
+
+ function acp_page($id, &$module)
+ {
+ global $user;
+
+ trigger_error($user->lang['CAPTCHA_NO_OPTIONS'] . adm_back_link($module->u_action));
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
new file mode 100644
index 0000000000..c17cfa7bbe
--- /dev/null
+++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
@@ -0,0 +1,945 @@
+<?php
+/**
+*
+* @package VC
+* @version $Id$
+* @copyright (c) 2006, 2008 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+global $table_prefix;
+
+define('CAPTCHA_QUESTIONS_TABLE', $table_prefix . 'captcha_questions');
+define('CAPTCHA_ANSWERS_TABLE', $table_prefix . 'captcha_answers');
+define('CAPTCHA_QA_CONFIRM_TABLE', $table_prefix . 'qa_confirm');
+
+/**
+* And now to something completely different. Let's make a captcha without extending the abstract class.
+* QA CAPTCHA sample implementation
+*
+* @package VC
+*/
+class phpbb_captcha_qa
+{
+ var $confirm_id;
+ var $answer;
+ var $question_ids;
+ var $question_text;
+ var $question_lang;
+ var $question_strict;
+ var $attempts = 0;
+ var $type;
+ // dirty trick: 0 is false, but can still encode that the captcha is not yet validated
+ var $solved = 0;
+
+ /**
+ * @param int $type as per the CAPTCHA API docs, the type
+ */
+ function init($type)
+ {
+ global $config, $db, $user;
+
+ // load our language file
+ $user->add_lang('captcha_qa');
+
+ // read input
+ $this->confirm_id = request_var('qa_confirm_id', '');
+ $this->answer = request_var('qa_answer', '', true);
+
+ $this->type = (int) $type;
+ $this->question_lang = $user->lang_name;
+
+ // we need all defined questions - shouldn't be too many, so we can just grab them
+ // try the user's lang first
+ $sql = 'SELECT question_id
+ FROM ' . CAPTCHA_QUESTIONS_TABLE . "
+ WHERE lang_iso = '" . $db->sql_escape($user->lang_name) . "'";
+ $result = $db->sql_query($sql, 3600);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $this->question_ids[$row['question_id']] = $row['question_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // fallback to the board default lang
+ if (!sizeof($this->question_ids))
+ {
+ $this->question_lang = $config['default_lang'];
+
+ $sql = 'SELECT question_id
+ FROM ' . CAPTCHA_QUESTIONS_TABLE . "
+ WHERE lang_iso = '" . $db->sql_escape($config['default_lang']) . "'";
+ $result = $db->sql_query($sql, 7200);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $this->question_ids[$row['question_id']] = $row['question_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ // okay, if there is a confirm_id, we try to load that confirm's state
+ if (!strlen($this->confirm_id) || !$this->load_answer())
+ {
+ // we have no valid confirm ID, better get ready to ask something
+ $this->select_question();
+ }
+ }
+
+ /**
+ * API function
+ */
+ function &get_instance()
+ {
+ $instance =& new phpbb_captcha_qa();
+
+ return $instance;
+ }
+
+ /**
+ * See if the captcha has created its tables.
+ */
+ function is_installed()
+ {
+ global $db, $phpbb_root_path, $phpEx;
+
+ if (!class_exists('phpbb_db_tools'))
+ {
+ include("$phpbb_root_path/includes/db/db_tools.$phpEx");
+ }
+ $db_tool = new phpbb_db_tools($db);
+
+ return $db_tool->sql_table_exists(CAPTCHA_QUESTIONS_TABLE);
+ }
+
+ /**
+ * API function - for the captcha to be available, it must have installed itself and there has to be at least one question in the board's default lang
+ */
+ function is_available()
+ {
+ global $config, $db, $phpbb_root_path, $phpEx, $user;
+
+ // load language file for pretty display in the ACP dropdown
+ $user->add_lang('captcha_qa');
+
+ if (!phpbb_captcha_qa::is_installed())
+ {
+ return false;
+ }
+
+ $sql = 'SELECT COUNT(question_id) as count
+ FROM ' . CAPTCHA_QUESTIONS_TABLE . "
+ WHERE lang_iso = '" . $db->sql_escape($config['default_lang']) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ return ((bool) $row['count']);
+ }
+
+ /**
+ * API function
+ */
+ function has_config()
+ {
+ return true;
+ }
+
+ /**
+ * API function
+ */
+ function get_name()
+ {
+ return 'CAPTCHA_QA';
+ }
+
+ /**
+ * API function
+ */
+ function get_class_name()
+ {
+ return 'phpbb_captcha_qa';
+ }
+
+ /**
+ * API function - not needed as we don't display an image
+ */
+ function execute_demo()
+ {
+ }
+
+ /**
+ * API function - not needed as we don't display an image
+ */
+ function execute()
+ {
+ }
+
+ /**
+ * API function - send the question to the template
+ */
+ function get_template()
+ {
+ global $template;
+
+ if ($this->is_solved())
+ {
+ return false;
+ }
+ else
+ {
+ $template->assign_vars(array(
+ 'QA_CONFIRM_QUESTION' => $this->question_text,
+ 'QA_CONFIRM_ID' => $this->confirm_id,
+ 'S_CONFIRM_CODE' => true,
+ 'S_TYPE' => $this->type,
+ ));
+
+ return 'captcha_qa.html';
+ }
+ }
+
+ /**
+ * API function - we just display a mockup so that the captcha doesn't need to be installed
+ */
+ function get_demo_template()
+ {
+ return 'captcha_qa_acp_demo.html';
+ }
+
+ /**
+ * API function
+ */
+ function get_hidden_fields()
+ {
+ $hidden_fields = array();
+
+ // this is required - otherwise we would forget about the captcha being already solved
+ if ($this->solved)
+ {
+ $hidden_fields['qa_answer'] = $this->answer;
+ }
+ $hidden_fields['qa_confirm_id'] = $this->confirm_id;
+
+ return $hidden_fields;
+ }
+
+ /**
+ * API function
+ */
+ function garbage_collect($type)
+ {
+ global $db, $config;
+
+ $sql = 'SELECT DISTINCT c.session_id
+ FROM ' . CAPTCHA_QA_CONFIRM_TABLE . ' c
+ LEFT JOIN ' . SESSIONS_TABLE . ' s
+ ON (c.session_id = s.session_id)
+ WHERE s.session_id IS NULL' .
+ ((empty($type)) ? '' : ' AND c.confirm_type = ' . (int) $type);
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $sql_in = array();
+
+ do
+ {
+ $sql_in[] = (string) $row['session_id'];
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ if (sizeof($sql_in))
+ {
+ $sql = 'DELETE FROM ' . CAPTCHA_QA_CONFIRM_TABLE . '
+ WHERE ' . $db->sql_in_set('session_id', $sql_in);
+ $db->sql_query($sql);
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+
+ /**
+ * API function - we don't drop the tables here, as that would cause the loss of all entered questions.
+ */
+ function uninstall()
+ {
+ $this->garbage_collect(0);
+ }
+
+ /**
+ * API function - set up shop
+ */
+ function install()
+ {
+ global $db, $phpbb_root_path, $phpEx;
+
+ if (!class_exists('phpbb_db_tools'))
+ {
+ include("$phpbb_root_path/includes/db/db_tools.$phpEx");
+ }
+ $db_tool = new phpbb_db_tools($db);
+
+ $tables = array(CAPTCHA_QUESTIONS_TABLE, CAPTCHA_ANSWERS_TABLE, CAPTCHA_QA_CONFIRM_TABLE);
+
+ $schemas = array(
+ CAPTCHA_QUESTIONS_TABLE => array (
+ 'COLUMNS' => array(
+ 'question_id' => array('UINT', Null, 'auto_increment'),
+ 'strict' => array('BOOL', 0),
+ 'lang_id' => array('UINT', 0),
+ 'lang_iso' => array('VCHAR:30', ''),
+ 'question_text' => array('TEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'question_id',
+ 'KEYS' => array(
+ 'lang_iso' => array('INDEX', 'lang_iso'),
+ ),
+ ),
+ CAPTCHA_ANSWERS_TABLE => array (
+ 'COLUMNS' => array(
+ 'question_id' => array('UINT', 0),
+ 'answer_text' => array('STEXT_UNI', ''),
+ ),
+ 'KEYS' => array(
+ 'question_id' => array('INDEX', 'question_id'),
+ ),
+ ),
+ CAPTCHA_QA_CONFIRM_TABLE => array (
+ 'COLUMNS' => array(
+ 'session_id' => array('CHAR:32', ''),
+ 'confirm_id' => array('CHAR:32', ''),
+ 'lang_iso' => array('VCHAR:30', ''),
+ 'question_id' => array('UINT', 0),
+ 'attempts' => array('UINT', 0),
+ 'confirm_type' => array('USINT', 0),
+ ),
+ 'KEYS' => array(
+ 'session_id' => array('INDEX', 'session_id'),
+ 'lookup' => array('INDEX', array('confirm_id', 'session_id', 'lang_iso')),
+ ),
+ 'PRIMARY_KEY' => 'confirm_id',
+ ),
+ );
+
+ foreach($schemas as $table => $schema)
+ {
+ if (!$db_tool->sql_table_exists($table))
+ {
+ $db_tool->sql_create_table($table, $schema);
+ }
+ }
+ }
+
+ /**
+ * API function - see what has to be done to validate
+ */
+ function validate()
+ {
+ global $config, $db, $user;
+
+ $error = '';
+
+ if (!sizeof($this->question_ids))
+ {
+ return false;
+ }
+
+ if (!$this->confirm_id)
+ {
+ $error = $user->lang['CONFIRM_QUESTION_WRONG'];
+ }
+ else
+ {
+ if ($this->check_answer())
+ {
+ // $this->delete_code(); commented out to allow posting.php to repeat the question
+ $this->solved = true;
+ }
+ else
+ {
+ $error = $user->lang['CONFIRM_QUESTION_WRONG'];
+ }
+ }
+
+ if (strlen($error))
+ {
+ // okay, incorrect answer. Let's ask a new question.
+ $this->new_attempt();
+ $this->solved = false;
+
+ return $error;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Select a question
+ */
+ function select_question()
+ {
+ global $db, $user;
+
+
+ if (!sizeof($this->question_ids))
+ {
+ return false;
+ }
+ $this->confirm_id = md5(unique_id($user->ip));
+ $this->question = (int) array_rand($this->question_ids);
+
+ $sql = 'INSERT INTO ' . CAPTCHA_QA_CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'confirm_id' => (string) $this->confirm_id,
+ 'session_id' => (string) $user->session_id,
+ 'lang_iso' => (string) $this->question_lang,
+ 'confirm_type' => (int) $this->type,
+ 'question_id' => (int) $this->question,
+ ));
+ $db->sql_query($sql);
+
+ $this->load_answer();
+ }
+
+ /**
+ * New Question, if desired.
+ */
+ function reselect_question()
+ {
+ global $db, $user;
+
+ if (!sizeof($this->question_ids))
+ {
+ return false;
+ }
+
+ $this->question = (int) array_rand($this->question_ids);
+ $this->solved = 0;
+
+ $sql = 'UPDATE ' . CAPTCHA_QA_CONFIRM_TABLE . '
+ SET question_id = ' . (int) $this->question . "
+ WHERE confirm_id = '" . $db->sql_escape($this->confirm_id) . "'
+ AND session_id = '" . $db->sql_escape($user->session_id) . "'";
+ $db->sql_query($sql);
+
+ $this->load_answer();
+ }
+
+ /**
+ * Wrong answer, so we increase the attempts and use a different question.
+ */
+ function new_attempt()
+ {
+ global $db, $user;
+
+ // yah, I would prefer a stronger rand, but this should work
+ $this->question = (int) array_rand($this->question_ids);
+ $this->solved = 0;
+
+ $sql = 'UPDATE ' . CAPTCHA_QA_CONFIRM_TABLE . '
+ SET question_id = ' . (int) $this->question . ",
+ attempts = attempts + 1
+ WHERE confirm_id = '" . $db->sql_escape($this->confirm_id) . "'
+ AND session_id = '" . $db->sql_escape($user->session_id) . "'";
+ $db->sql_query($sql);
+
+ $this->load_answer();
+ }
+
+ /**
+ * Look up everything we need and populate the instance variables.
+ */
+ function load_answer()
+ {
+ global $db, $user;
+
+ if (!sizeof($this->question_ids))
+ {
+ return false;
+ }
+
+ $sql = 'SELECT con.question_id, attempts, question_text, strict
+ FROM ' . CAPTCHA_QA_CONFIRM_TABLE . ' con, ' . CAPTCHA_QUESTIONS_TABLE . " qes
+ WHERE con.question_id = qes.question_id
+ AND confirm_id = '" . $db->sql_escape($this->confirm_id) . "'
+ AND session_id = '" . $db->sql_escape($user->session_id) . "'
+ AND qes.lang_iso = '" . $db->sql_escape($this->question_lang) . "'
+ AND confirm_type = " . $this->type;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ $this->question = $row['question_id'];
+
+ $this->attempts = $row['attempts'];
+ $this->question_strict = $row['strict'];
+ $this->question_text = $row['question_text'];
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * The actual validation
+ */
+ function check_answer()
+ {
+ global $db;
+
+ $answer = ($this->question_strict) ? request_var('qa_answer', '', true) : utf8_clean_string(request_var('qa_answer', '', true));
+
+ $sql = 'SELECT answer_text
+ FROM ' . CAPTCHA_ANSWERS_TABLE . '
+ WHERE question_id = ' . (int) $this->question;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $solution = ($this->question_strict) ? $row['answer_text'] : utf8_clean_string($row['answer_text']);
+
+ if ($solution === $answer)
+ {
+ $this->solved = true;
+
+ break;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ return $this->solved;
+ }
+
+ /**
+ * API function - clean the entry
+ */
+ function delete_code()
+ {
+ global $db, $user;
+
+ $sql = 'DELETE FROM ' . CAPTCHA_QA_CONFIRM_TABLE . "
+ WHERE confirm_id = '" . $db->sql_escape($confirm_id) . "'
+ AND session_id = '" . $db->sql_escape($user->session_id) . "'
+ AND confirm_type = " . $this->type;
+ $db->sql_query($sql);
+ }
+
+ /**
+ * API function
+ */
+ function get_attempt_count()
+ {
+ return $this->attempts;
+ }
+
+ /**
+ * API function
+ */
+ function reset()
+ {
+ global $db, $user;
+
+ $sql = 'DELETE FROM ' . CAPTCHA_QA_CONFIRM_TABLE . "
+ WHERE session_id = '" . $db->sql_escape($user->session_id) . "'
+ AND confirm_type = " . (int) $this->type;
+ $db->sql_query($sql);
+
+ // we leave the class usable by generating a new question
+ $this->select_question();
+ }
+
+ /**
+ * API function
+ */
+ function is_solved()
+ {
+ if (request_var('qa_answer', false) && $this->solved === 0)
+ {
+ $this->validate();
+ }
+
+ return (bool) $this->solved;
+ }
+
+ /**
+ * API function - The ACP backend, this marks the end of the easy methods
+ */
+ function acp_page($id, &$module)
+ {
+ global $db, $user, $auth, $template;
+ global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+
+ $user->add_lang('acp/board');
+ $user->add_lang('captcha_qa');
+
+ if (!$this->is_installed())
+ {
+ $this->install();
+ }
+
+ $module->tpl_name = 'captcha_qa_acp';
+ $module->page_title = 'ACP_VC_SETTINGS';
+ $form_key = 'acp_captcha';
+ add_form_key($form_key);
+
+ $submit = request_var('submit', false);
+ $question_id = request_var('question_id', 0);
+ $action = request_var('action', '');
+
+ // we have two pages, so users might want to navigate from one to the other
+ $list_url = $module->u_action . "&amp;configure=1&amp;select_captcha=" . $this->get_class_name();
+
+ $template->assign_vars(array(
+ 'U_ACTION' => $module->u_action,
+ 'QUESTION_ID' => $question_id ,
+ 'CLASS' => $this->get_class_name(),
+ ));
+
+ // show the list?
+ if (!$question_id && $action != 'add')
+ {
+ $this->acp_question_list($module);
+ }
+ else if ($question_id && $action == 'delete')
+ {
+ if (confirm_box(true))
+ {
+ $this->acp_delete_question($question_id);
+
+ trigger_error($user->lang['QUESTION_DELETED'] . adm_back_link($list_url));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'question_id' => $question_id,
+ 'action' => $action,
+ 'configure' => 1,
+ 'select_captcha' => $this->get_class_name(),
+ ))
+ );
+ }
+ }
+ else
+ {
+ // okay, show the editor
+ $error = false;
+ $input_question = request_var('question_text', '', true);
+ $input_answers = request_var('answers', '', true);
+ $input_lang = request_var('lang_iso', '', true);
+ $input_strict = request_var('strict', false);
+ $langs = $this->get_languages();
+
+ foreach ($langs as $lang => $entry)
+ {
+ $template->assign_block_vars('langs', array(
+ 'ISO' => $lang,
+ 'NAME' => $entry['name'],
+ ));
+ }
+
+ $template->assign_vars(array(
+ 'U_LIST' => $list_url,
+ ));
+
+ if ($question_id)
+ {
+ if ($question = $this->acp_get_question_data($question_id))
+ {
+ $answers = (isset($input_answers[$lang])) ? $input_answers[$lang] : implode("\n", $question['answers']);
+
+ $template->assign_vars(array(
+ 'QUESTION_TEXT' => ($input_question) ? $input_question : $question['question_text'],
+ 'LANG_ISO' => ($input_lang) ? $input_lang : $question['lang_iso'],
+ 'STRICT' => (isset($_REQUEST['strict'])) ? $input_strict : $question['strict'],
+ 'ANSWERS' => $answers,
+ ));
+ }
+ else
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($list_url));
+ }
+ }
+ else
+ {
+ $template->assign_vars(array(
+ 'QUESTION_TEXT' => $input_question,
+ 'LANG_ISO' => $input_lang,
+ 'STRICT' => $input_strict,
+ 'ANSWERS' => $input_answers,
+ ));
+ }
+
+ if ($submit && check_form_key($form_key))
+ {
+ $data = $this->acp_get_question_input();
+
+ if (!$this->validate_input($data))
+ {
+ $template->assign_vars(array(
+ 'S_ERROR' => true,
+ ));
+ }
+ else
+ {
+ if ($question_id)
+ {
+ $this->acp_update_question($data, $question_id);
+ }
+ else
+ {
+ $this->acp_add_question($data);
+ }
+
+ add_log('admin', 'LOG_CONFIG_VISUAL');
+ trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($list_url));
+ }
+ }
+ else if ($submit)
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($list_url));
+ }
+ }
+ }
+
+ /**
+ * This handles the list overview
+ */
+ function acp_question_list(&$module)
+ {
+ global $db, $template;
+
+ $sql = 'SELECT *
+ FROM ' . CAPTCHA_QUESTIONS_TABLE;
+ $result = $db->sql_query($sql);
+
+ $template->assign_vars(array(
+ 'S_LIST' => true,
+ ));
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $url = $module->u_action . "&amp;question_id={$row['question_id']}&amp;configure=1&amp;select_captcha=" . $this->get_class_name() . '&amp;';
+
+ $template->assign_block_vars('questions', array(
+ 'QUESTION_TEXT' => $row['question_text'],
+ 'QUESTION_ID' => $row['question_id'],
+ 'QUESTION_LANG' => $row['lang_iso'],
+ 'U_DELETE' => "{$url}action=delete",
+ 'U_EDIT' => "{$url}action=edit",
+ ));
+ }
+ $db->sql_freeresult($result);
+ }
+
+ /**
+ * Grab a question and bring it into a format the editor understands
+ */
+ function acp_get_question_data($question_id)
+ {
+ global $db;
+
+ if ($question_id)
+ {
+ $sql = 'SELECT *
+ FROM ' . CAPTCHA_QUESTIONS_TABLE . '
+ WHERE question_id = ' . $question_id;
+ $result = $db->sql_query($sql);
+ $question = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$question)
+ {
+ return false;
+ }
+
+ $question['answers'] = array();
+
+ $sql = 'SELECT *
+ FROM ' . CAPTCHA_ANSWERS_TABLE . '
+ WHERE question_id = ' . $question_id;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $question['answers'][] = $row['answer_text'];
+ }
+ $db->sql_freeresult($result);
+
+ return $question;
+ }
+ }
+
+ /**
+ * Grab a question from input and bring it into a format the editor understands
+ */
+ function acp_get_question_input()
+ {
+ $question = array(
+ 'question_text' => request_var('question_text', '', true),
+ 'strict' => request_var('strict', false),
+ 'lang_iso' => request_var('lang_iso', ''),
+ 'answers' => explode("\n", request_var('answers', '', true)),
+ );
+
+ return $question;
+ }
+
+ /**
+ * Update a question.
+ * param mixed $data : an array as created from acp_get_question_input or acp_get_question_data
+ */
+ function acp_update_question($data, $question_id)
+ {
+ global $db, $cache;
+
+ // easier to delete all answers than to figure out which to update
+ $sql = 'DELETE FROM ' . CAPTCHA_ANSWERS_TABLE . " WHERE question_id = $question_id";
+ $db->sql_query($sql);
+
+ $langs = $this->get_languages();
+ $question_ary = $data;
+ $question_ary['lang_id'] = $langs[$question_ary['lang_iso']]['id'];
+ unset($question_ary['answers']);
+
+ $sql = 'UPDATE ' . CAPTCHA_QUESTIONS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $question_ary) . "
+ WHERE question_id = $question_id";
+ $db->sql_query($sql);
+
+ $this->acp_insert_answers($data, $question_id);
+
+ $cache->destroy('sql', CAPTCHA_QUESTIONS_TABLE);
+ }
+
+ /**
+ * Insert a question.
+ * param mixed $data : an array as created from acp_get_question_input or acp_get_question_data
+ */
+ function acp_add_question($data)
+ {
+ global $db, $cache;
+
+ $langs = $this->get_languages();
+ $question_ary = $data;
+
+ $question_ary['lang_id'] = $langs[$data['lang_iso']]['id'];
+ unset($question_ary['answers']);
+
+ $sql = 'INSERT INTO ' . CAPTCHA_QUESTIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $question_ary);
+ $db->sql_query($sql);
+
+ $question_id = $db->sql_nextid();
+
+ $this->acp_insert_answers($data, $question_id);
+
+ $cache->destroy('sql', CAPTCHA_QUESTIONS_TABLE);
+ }
+
+ /**
+ * Insert the answers.
+ * param mixed $data : an array as created from acp_get_question_input or acp_get_question_data
+ */
+ function acp_insert_answers($data, $question_id)
+ {
+ global $db, $cache;
+
+ foreach ($data['answers'] as $answer)
+ {
+ $answer_ary = array(
+ 'question_id' => $question_id,
+ 'answer_text' => $answer,
+ );
+
+ $sql = 'INSERT INTO ' . CAPTCHA_ANSWERS_TABLE . ' ' . $db->sql_build_array('INSERT', $answer_ary);
+ $db->sql_query($sql);
+ }
+
+ $cache->destroy('sql', CAPTCHA_ANSWERS_TABLE);
+ }
+
+ /**
+ * Delete a question.
+ */
+ function acp_delete_question($question_id)
+ {
+ global $db, $cache;
+
+ $tables = array(CAPTCHA_QUESTIONS_TABLE, CAPTCHA_ANSWERS_TABLE);
+
+ foreach ($tables as $table)
+ {
+ $sql = "DELETE FROM $table
+ WHERE question_id = $question_id";
+ $db->sql_query($sql);
+ }
+
+ $cache->destroy('sql', $tables);
+ }
+
+ /**
+ * Check if the entered data can be inserted/used
+ * param mixed $data : an array as created from acp_get_question_input or acp_get_question_data
+ */
+ function validate_input($question_data)
+ {
+ $langs = $this->get_languages();
+
+ if (!isset($question_data['lang_iso']) ||
+ !isset($question_data['question_text']) ||
+ !isset($question_data['strict']) ||
+ !isset($question_data['answers']))
+ {
+ return false;
+ }
+
+ if (!isset($langs[$question_data['lang_iso']]) ||
+ !$question_data['question_text'] ||
+ !sizeof($question_data['answers']))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * List the installed language packs
+ */
+ function get_languages()
+ {
+ global $db;
+
+ $sql = 'SELECT *
+ FROM ' . LANG_TABLE;
+ $result = $db->sql_query($sql);
+
+ $langs = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $langs[$row['lang_iso']] = array(
+ 'name' => $row['lang_local_name'],
+ 'id' => (int) $row['lang_id'],
+ );
+ }
+ $db->sql_freeresult($result);
+
+ return $langs;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
new file mode 100644
index 0000000000..d4543dddfc
--- /dev/null
+++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
@@ -0,0 +1,336 @@
+<?php
+/**
+*
+* @package VC
+* @version $Id$
+* @copyright (c) 2006, 2008 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (!class_exists('phpbb_default_captcha'))
+{
+ // we need the classic captcha code for tracking solutions and attempts
+ include($phpbb_root_path . 'includes/captcha/plugins/captcha_abstract.' . $phpEx);
+}
+
+/**
+* @package VC
+*/
+class phpbb_recaptcha extends phpbb_default_captcha
+{
+ var $recaptcha_server = 'http://api.recaptcha.net';
+ var $recaptcha_verify_server = 'api-verify.recaptcha.net';
+ var $challenge;
+ var $response;
+
+ function init($type)
+ {
+ global $config, $db, $user;
+
+ $user->add_lang('captcha_recaptcha');
+ parent::init($type);
+ $this->challenge = request_var('recaptcha_challenge_field', '');
+ $this->response = request_var('recaptcha_response_field', '');
+ }
+
+ function &get_instance()
+ {
+ $instance =& new phpbb_recaptcha();
+ return $instance;
+ }
+
+ function is_available()
+ {
+ global $config, $user;
+ $user->add_lang('captcha_recaptcha');
+ return (isset($config['recaptcha_pubkey']) && !empty($config['recaptcha_pubkey']));
+ }
+
+ /**
+ * API function
+ */
+ function has_config()
+ {
+ return true;
+ }
+
+ function get_name()
+ {
+ return 'CAPTCHA_RECAPTCHA';
+ }
+
+ function get_class_name()
+ {
+ return 'phpbb_recaptcha';
+ }
+
+ function acp_page($id, &$module)
+ {
+ global $config, $db, $template, $user;
+
+ $captcha_vars = array(
+ 'recaptcha_pubkey' => 'RECAPTCHA_PUBKEY',
+ 'recaptcha_privkey' => 'RECAPTCHA_PRIVKEY',
+ );
+
+ $module->tpl_name = 'captcha_recaptcha_acp';
+ $module->page_title = 'ACP_VC_SETTINGS';
+ $form_key = 'acp_captcha';
+ add_form_key($form_key);
+
+ $submit = request_var('submit', '');
+
+ if ($submit && check_form_key($form_key))
+ {
+ $captcha_vars = array_keys($captcha_vars);
+ foreach ($captcha_vars as $captcha_var)
+ {
+ $value = request_var($captcha_var, '');
+ if ($value)
+ {
+ set_config($captcha_var, $value);
+ }
+ }
+
+ add_log('admin', 'LOG_CONFIG_VISUAL');
+ trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($module->u_action));
+ }
+ else if ($submit)
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($module->u_action));
+ }
+ else
+ {
+ foreach ($captcha_vars as $captcha_var => $template_var)
+ {
+ $var = (isset($_REQUEST[$captcha_var])) ? request_var($captcha_var, '') : ((isset($config[$captcha_var])) ? $config[$captcha_var] : '');
+ $template->assign_var($template_var, $var);
+ }
+
+ $template->assign_vars(array(
+ 'CAPTCHA_PREVIEW' => $this->get_demo_template($id),
+ 'CAPTCHA_NAME' => $this->get_class_name(),
+ 'U_ACTION' => $module->u_action,
+ ));
+
+ }
+ }
+
+ // not needed
+ function execute_demo()
+ {
+ }
+
+ // not needed
+ function execute()
+ {
+ }
+
+ function get_template()
+ {
+ global $config, $user, $template;
+
+ if ($this->is_solved())
+ {
+ return false;
+ }
+ else
+ {
+ $explain = $user->lang(($this->type != CONFIRM_POST) ? 'CONFIRM_EXPLAIN' : 'POST_CONFIRM_EXPLAIN', '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
+
+ $template->assign_vars(array(
+ 'RECAPTCHA_SERVER' => $this->recaptcha_server,
+ 'RECAPTCHA_PUBKEY' => isset($config['recaptcha_pubkey']) ? $config['recaptcha_pubkey'] : '',
+ 'RECAPTCHA_ERRORGET' => '',
+ 'S_RECAPTCHA_AVAILABLE' => $this->is_available(),
+ 'S_CONFIRM_CODE' => true,
+ 'S_TYPE' => $this->type,
+ 'L_CONFIRM_EXPLAIN' => $explain,
+ ));
+
+ return 'captcha_recaptcha.html';
+ }
+ }
+
+ function get_demo_template($id)
+ {
+ return $this->get_template();
+ }
+
+ function get_hidden_fields()
+ {
+ $hidden_fields = array();
+
+ // this is required for posting.php - otherwise we would forget about the captcha being already solved
+ if ($this->solved)
+ {
+ $hidden_fields['confirm_code'] = $this->code;
+ }
+ $hidden_fields['confirm_id'] = $this->confirm_id;
+ return $hidden_fields;
+ }
+
+ function uninstall()
+ {
+ $this->garbage_collect(0);
+ }
+
+ function install()
+ {
+ return;
+ }
+
+ function validate()
+ {
+ if (!parent::validate())
+ {
+ return false;
+ }
+ else
+ {
+ return $this->recaptcha_check_answer();
+ }
+ }
+
+// Code from here on is based on recaptchalib.php
+/*
+ * This is a PHP library that handles calling reCAPTCHA.
+ * - Documentation and latest version
+ * http://recaptcha.net/plugins/php/
+ * - Get a reCAPTCHA API Key
+ * http://recaptcha.net/api/getkey
+ * - Discussion group
+ * http://groups.google.com/group/recaptcha
+ *
+ * Copyright (c) 2007 reCAPTCHA -- http://recaptcha.net
+ * AUTHORS:
+ * Mike Crawford
+ * Ben Maurer
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+ /**
+ * Submits an HTTP POST to a reCAPTCHA server
+ * @param string $host
+ * @param string $path
+ * @param array $data
+ * @param int port
+ * @return array response
+ */
+ function _recaptcha_http_post($host, $path, $data, $port = 80)
+ {
+ $req = $this->_recaptcha_qsencode ($data);
+
+ $http_request = "POST $path HTTP/1.0\r\n";
+ $http_request .= "Host: $host\r\n";
+ $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
+ $http_request .= "Content-Length: " . strlen($req) . "\r\n";
+ $http_request .= "User-Agent: reCAPTCHA/PHP/phpBB\r\n";
+ $http_request .= "\r\n";
+ $http_request .= $req;
+
+ $response = '';
+ if (false == ($fs = @fsockopen($host, $port, $errno, $errstr, 10)))
+ {
+ trigger_error('Could not open socket', E_USER_ERROR);
+ }
+
+ fwrite($fs, $http_request);
+
+ while (!feof($fs))
+ {
+ // One TCP-IP packet
+ $response .= fgets($fs, 1160);
+ }
+ fclose($fs);
+ $response = explode("\r\n\r\n", $response, 2);
+
+ return $response;
+ }
+
+ /**
+ * Calls an HTTP POST function to verify if the user's guess was correct
+ * @param array $extra_params an array of extra variables to post to the server
+ * @return ReCaptchaResponse
+ */
+ function recaptcha_check_answer($extra_params = array())
+ {
+ global $config, $user;
+
+ //discard spam submissions
+ if ($this->challenge == null || strlen($this->challenge) == 0 || $this->response == null || strlen($this->response) == 0)
+ {
+ return $user->lang['RECAPTCHA_INCORRECT'];
+ }
+
+ $response = $this->_recaptcha_http_post($this->recaptcha_verify_server, '/verify',
+ array(
+ 'privatekey' => $config['recaptcha_privkey'],
+ 'remoteip' => $user->ip,
+ 'challenge' => $this->challenge,
+ 'response' => $this->response
+ ) + $extra_params
+ );
+
+ $answers = explode("\n", $response[1]);
+
+ if (trim($answers[0]) === 'true')
+ {
+ $this->solved = true;
+ return false;
+ }
+ else
+ {
+ if ($answers[1] === 'incorrect-captcha-sol')
+ {
+ return $user->lang['RECAPTCHA_INCORRECT'];
+ }
+ }
+ }
+
+ /**
+ * Encodes the given data into a query string format
+ * @param $data - array of string elements to be encoded
+ * @return string - encoded request
+ */
+ function _recaptcha_qsencode($data)
+ {
+ $req = '';
+ foreach ($data as $key => $value)
+ {
+ $req .= $key . '=' . urlencode(stripslashes($value)) . '&';
+ }
+
+ // Cut the last '&'
+ $req = substr($req, 0, strlen($req) - 1);
+ return $req;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
new file mode 100644
index 0000000000..3bb9467bbf
--- /dev/null
+++ b/phpBB/includes/constants.php
@@ -0,0 +1,270 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* valid external constants:
+* PHPBB_MSG_HANDLER
+* PHPBB_DB_NEW_LINK
+* PHPBB_ROOT_PATH
+* PHPBB_ADMIN_PATH
+*/
+
+// phpBB Version
+define('PHPBB_VERSION', '3.0.6-RC2');
+
+// QA-related
+// define('PHPBB_QA', 1);
+
+// User related
+define('ANONYMOUS', 1);
+
+define('USER_ACTIVATION_NONE', 0);
+define('USER_ACTIVATION_SELF', 1);
+define('USER_ACTIVATION_ADMIN', 2);
+define('USER_ACTIVATION_DISABLE', 3);
+
+define('AVATAR_UPLOAD', 1);
+define('AVATAR_REMOTE', 2);
+define('AVATAR_GALLERY', 3);
+
+define('USER_NORMAL', 0);
+define('USER_INACTIVE', 1);
+define('USER_IGNORE', 2);
+define('USER_FOUNDER', 3);
+
+define('INACTIVE_REGISTER', 1);
+define('INACTIVE_PROFILE', 2);
+define('INACTIVE_MANUAL', 3);
+define('INACTIVE_REMIND', 4);
+
+// ACL
+define('ACL_NEVER', 0);
+define('ACL_YES', 1);
+define('ACL_NO', -1);
+
+// Login error codes
+define('LOGIN_CONTINUE', 1);
+define('LOGIN_BREAK', 2);
+define('LOGIN_SUCCESS', 3);
+define('LOGIN_SUCCESS_CREATE_PROFILE', 20);
+define('LOGIN_ERROR_USERNAME', 10);
+define('LOGIN_ERROR_PASSWORD', 11);
+define('LOGIN_ERROR_ACTIVE', 12);
+define('LOGIN_ERROR_ATTEMPTS', 13);
+define('LOGIN_ERROR_EXTERNAL_AUTH', 14);
+define('LOGIN_ERROR_PASSWORD_CONVERT', 15);
+
+// Group settings
+define('GROUP_OPEN', 0);
+define('GROUP_CLOSED', 1);
+define('GROUP_HIDDEN', 2);
+define('GROUP_SPECIAL', 3);
+define('GROUP_FREE', 4);
+
+// Forum/Topic states
+define('FORUM_CAT', 0);
+define('FORUM_POST', 1);
+define('FORUM_LINK', 2);
+define('ITEM_UNLOCKED', 0);
+define('ITEM_LOCKED', 1);
+define('ITEM_MOVED', 2);
+
+// Forum Flags
+define('FORUM_FLAG_LINK_TRACK', 1);
+define('FORUM_FLAG_PRUNE_POLL', 2);
+define('FORUM_FLAG_PRUNE_ANNOUNCE', 4);
+define('FORUM_FLAG_PRUNE_STICKY', 8);
+define('FORUM_FLAG_ACTIVE_TOPICS', 16);
+define('FORUM_FLAG_POST_REVIEW', 32);
+define('FORUM_FLAG_QUICK_REPLY', 64);
+
+// Forum Options... sequential order. Modifications should begin at number 10 (number 29 is maximum)
+define('FORUM_OPTION_FEED_NEWS', 1);
+define('FORUM_OPTION_FEED_EXCLUDE', 2);
+
+// Optional text flags
+define('OPTION_FLAG_BBCODE', 1);
+define('OPTION_FLAG_SMILIES', 2);
+define('OPTION_FLAG_LINKS', 4);
+
+// Topic types
+define('POST_NORMAL', 0);
+define('POST_STICKY', 1);
+define('POST_ANNOUNCE', 2);
+define('POST_GLOBAL', 3);
+
+// Lastread types
+define('TRACK_NORMAL', 0);
+define('TRACK_POSTED', 1);
+
+// Notify methods
+define('NOTIFY_EMAIL', 0);
+define('NOTIFY_IM', 1);
+define('NOTIFY_BOTH', 2);
+
+// Email Priority Settings
+define('MAIL_LOW_PRIORITY', 4);
+define('MAIL_NORMAL_PRIORITY', 3);
+define('MAIL_HIGH_PRIORITY', 2);
+
+// Log types
+define('LOG_ADMIN', 0);
+define('LOG_MOD', 1);
+define('LOG_CRITICAL', 2);
+define('LOG_USERS', 3);
+
+// Private messaging - Do NOT change these values
+define('PRIVMSGS_HOLD_BOX', -4);
+define('PRIVMSGS_NO_BOX', -3);
+define('PRIVMSGS_OUTBOX', -2);
+define('PRIVMSGS_SENTBOX', -1);
+define('PRIVMSGS_INBOX', 0);
+
+// Full Folder Actions
+define('FULL_FOLDER_NONE', -3);
+define('FULL_FOLDER_DELETE', -2);
+define('FULL_FOLDER_HOLD', -1);
+
+// Download Modes - Attachments
+define('INLINE_LINK', 1);
+// This mode is only used internally to allow modders extending the attachment functionality
+define('PHYSICAL_LINK', 2);
+
+// Confirm types
+define('CONFIRM_REG', 1);
+define('CONFIRM_LOGIN', 2);
+define('CONFIRM_POST', 3);
+
+// Categories - Attachments
+define('ATTACHMENT_CATEGORY_NONE', 0);
+define('ATTACHMENT_CATEGORY_IMAGE', 1); // Inline Images
+define('ATTACHMENT_CATEGORY_WM', 2); // Windows Media Files - Streaming
+define('ATTACHMENT_CATEGORY_RM', 3); // Real Media Files - Streaming
+define('ATTACHMENT_CATEGORY_THUMB', 4); // Not used within the database, only while displaying posts
+define('ATTACHMENT_CATEGORY_FLASH', 5); // Flash/SWF files
+define('ATTACHMENT_CATEGORY_QUICKTIME', 6); // Quicktime/Mov files
+
+// BBCode UID length
+define('BBCODE_UID_LEN', 8);
+
+// Number of core BBCodes
+define('NUM_CORE_BBCODES', 12);
+
+// Smiley hard limit
+define('SMILEY_LIMIT', 1000);
+
+// Magic url types
+define('MAGIC_URL_EMAIL', 1);
+define('MAGIC_URL_FULL', 2);
+define('MAGIC_URL_LOCAL', 3);
+define('MAGIC_URL_WWW', 4);
+
+// Profile Field Types
+define('FIELD_INT', 1);
+define('FIELD_STRING', 2);
+define('FIELD_TEXT', 3);
+define('FIELD_BOOL', 4);
+define('FIELD_DROPDOWN', 5);
+define('FIELD_DATE', 6);
+
+// referer validation
+define('REFERER_VALIDATE_NONE', 0);
+define('REFERER_VALIDATE_HOST', 1);
+define('REFERER_VALIDATE_PATH', 2);
+
+// phpbb_chmod() permissions
+@define('CHMOD_ALL', 7);
+@define('CHMOD_READ', 4);
+@define('CHMOD_WRITE', 2);
+@define('CHMOD_EXECUTE', 1);
+
+// Captcha code length
+define('CAPTCHA_MIN_CHARS', 4);
+define('CAPTCHA_MAX_CHARS', 7);
+
+// Additional constants
+define('VOTE_CONVERTED', 127);
+
+// Table names
+define('ACL_GROUPS_TABLE', $table_prefix . 'acl_groups');
+define('ACL_OPTIONS_TABLE', $table_prefix . 'acl_options');
+define('ACL_ROLES_DATA_TABLE', $table_prefix . 'acl_roles_data');
+define('ACL_ROLES_TABLE', $table_prefix . 'acl_roles');
+define('ACL_USERS_TABLE', $table_prefix . 'acl_users');
+define('ATTACHMENTS_TABLE', $table_prefix . 'attachments');
+define('BANLIST_TABLE', $table_prefix . 'banlist');
+define('BBCODES_TABLE', $table_prefix . 'bbcodes');
+define('BOOKMARKS_TABLE', $table_prefix . 'bookmarks');
+define('BOTS_TABLE', $table_prefix . 'bots');
+define('CONFIG_TABLE', $table_prefix . 'config');
+define('CONFIRM_TABLE', $table_prefix . 'confirm');
+define('DISALLOW_TABLE', $table_prefix . 'disallow');
+define('DRAFTS_TABLE', $table_prefix . 'drafts');
+define('EXTENSIONS_TABLE', $table_prefix . 'extensions');
+define('EXTENSION_GROUPS_TABLE', $table_prefix . 'extension_groups');
+define('FORUMS_TABLE', $table_prefix . 'forums');
+define('FORUMS_ACCESS_TABLE', $table_prefix . 'forums_access');
+define('FORUMS_TRACK_TABLE', $table_prefix . 'forums_track');
+define('FORUMS_WATCH_TABLE', $table_prefix . 'forums_watch');
+define('GROUPS_TABLE', $table_prefix . 'groups');
+define('ICONS_TABLE', $table_prefix . 'icons');
+define('LANG_TABLE', $table_prefix . 'lang');
+define('LOG_TABLE', $table_prefix . 'log');
+define('MODERATOR_CACHE_TABLE', $table_prefix . 'moderator_cache');
+define('MODULES_TABLE', $table_prefix . 'modules');
+define('POLL_OPTIONS_TABLE', $table_prefix . 'poll_options');
+define('POLL_VOTES_TABLE', $table_prefix . 'poll_votes');
+define('POSTS_TABLE', $table_prefix . 'posts');
+define('PRIVMSGS_TABLE', $table_prefix . 'privmsgs');
+define('PRIVMSGS_FOLDER_TABLE', $table_prefix . 'privmsgs_folder');
+define('PRIVMSGS_RULES_TABLE', $table_prefix . 'privmsgs_rules');
+define('PRIVMSGS_TO_TABLE', $table_prefix . 'privmsgs_to');
+define('PROFILE_FIELDS_TABLE', $table_prefix . 'profile_fields');
+define('PROFILE_FIELDS_DATA_TABLE', $table_prefix . 'profile_fields_data');
+define('PROFILE_FIELDS_LANG_TABLE', $table_prefix . 'profile_fields_lang');
+define('PROFILE_LANG_TABLE', $table_prefix . 'profile_lang');
+define('RANKS_TABLE', $table_prefix . 'ranks');
+define('REPORTS_TABLE', $table_prefix . 'reports');
+define('REPORTS_REASONS_TABLE', $table_prefix . 'reports_reasons');
+define('SEARCH_RESULTS_TABLE', $table_prefix . 'search_results');
+define('SEARCH_WORDLIST_TABLE', $table_prefix . 'search_wordlist');
+define('SEARCH_WORDMATCH_TABLE', $table_prefix . 'search_wordmatch');
+define('SESSIONS_TABLE', $table_prefix . 'sessions');
+define('SESSIONS_KEYS_TABLE', $table_prefix . 'sessions_keys');
+define('SITELIST_TABLE', $table_prefix . 'sitelist');
+define('SMILIES_TABLE', $table_prefix . 'smilies');
+define('STYLES_TABLE', $table_prefix . 'styles');
+define('STYLES_TEMPLATE_TABLE', $table_prefix . 'styles_template');
+define('STYLES_TEMPLATE_DATA_TABLE',$table_prefix . 'styles_template_data');
+define('STYLES_THEME_TABLE', $table_prefix . 'styles_theme');
+define('STYLES_IMAGESET_TABLE', $table_prefix . 'styles_imageset');
+define('STYLES_IMAGESET_DATA_TABLE',$table_prefix . 'styles_imageset_data');
+define('TOPICS_TABLE', $table_prefix . 'topics');
+define('TOPICS_POSTED_TABLE', $table_prefix . 'topics_posted');
+define('TOPICS_TRACK_TABLE', $table_prefix . 'topics_track');
+define('TOPICS_WATCH_TABLE', $table_prefix . 'topics_watch');
+define('USER_GROUP_TABLE', $table_prefix . 'user_group');
+define('USERS_TABLE', $table_prefix . 'users');
+define('WARNINGS_TABLE', $table_prefix . 'warnings');
+define('WORDS_TABLE', $table_prefix . 'words');
+define('ZEBRA_TABLE', $table_prefix . 'zebra');
+
+// Additional tables
+
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/db/db_tools.php b/phpBB/includes/db/db_tools.php
new file mode 100644
index 0000000000..eabcfd818e
--- /dev/null
+++ b/phpBB/includes/db/db_tools.php
@@ -0,0 +1,2032 @@
+<?php
+/**
+*
+* @package dbal
+* @version $Id$
+* @copyright (c) 2007 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Database Tools for handling cross-db actions such as altering columns, etc.
+* Currently not supported is returning SQL for creating tables.
+*
+* @package dbal
+* @note currently not used within phpBB3, but may be utilized later.
+*/
+class phpbb_db_tools
+{
+ /**
+ * Current sql layer
+ */
+ var $sql_layer = '';
+
+ /**
+ * @var object DB object
+ */
+ var $db = NULL;
+
+ /**
+ * The Column types for every database we support
+ * @var array
+ */
+ var $dbms_type_map = array(
+ 'mysql_41' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'mediumint(8) UNSIGNED',
+ 'UINT:' => 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'smallint(4) UNSIGNED',
+ 'BOOL' => 'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'text',
+ 'XSTEXT_UNI'=> 'varchar(100)',
+ 'STEXT' => 'text',
+ 'STEXT_UNI' => 'varchar(255)',
+ 'TEXT' => 'text',
+ 'TEXT_UNI' => 'text',
+ 'MTEXT' => 'mediumtext',
+ 'MTEXT_UNI' => 'mediumtext',
+ 'TIMESTAMP' => 'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar(255)',
+ 'VARBINARY' => 'varbinary(255)',
+ ),
+
+ 'mysql_40' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'mediumint(8) UNSIGNED',
+ 'UINT:' => 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'smallint(4) UNSIGNED',
+ 'BOOL' => 'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varbinary(255)',
+ 'VCHAR:' => 'varbinary(%d)',
+ 'CHAR:' => 'binary(%d)',
+ 'XSTEXT' => 'blob',
+ 'XSTEXT_UNI'=> 'blob',
+ 'STEXT' => 'blob',
+ 'STEXT_UNI' => 'blob',
+ 'TEXT' => 'blob',
+ 'TEXT_UNI' => 'blob',
+ 'MTEXT' => 'mediumblob',
+ 'MTEXT_UNI' => 'mediumblob',
+ 'TIMESTAMP' => 'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'blob',
+ 'VCHAR_UNI:'=> array('varbinary(%d)', 'limit' => array('mult', 3, 255, 'blob')),
+ 'VCHAR_CI' => 'blob',
+ 'VARBINARY' => 'varbinary(255)',
+ ),
+
+ 'firebird' => array(
+ 'INT:' => 'INTEGER',
+ 'BINT' => 'DOUBLE PRECISION',
+ 'UINT' => 'INTEGER',
+ 'UINT:' => 'INTEGER',
+ 'TINT:' => 'INTEGER',
+ 'USINT' => 'INTEGER',
+ 'BOOL' => 'INTEGER',
+ 'VCHAR' => 'VARCHAR(255) CHARACTER SET NONE',
+ 'VCHAR:' => 'VARCHAR(%d) CHARACTER SET NONE',
+ 'CHAR:' => 'CHAR(%d) CHARACTER SET NONE',
+ 'XSTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
+ 'STEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
+ 'TEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
+ 'MTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
+ 'XSTEXT_UNI'=> 'VARCHAR(100) CHARACTER SET UTF8',
+ 'STEXT_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
+ 'TEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
+ 'MTEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
+ 'TIMESTAMP' => 'INTEGER',
+ 'DECIMAL' => 'DOUBLE PRECISION',
+ 'DECIMAL:' => 'DOUBLE PRECISION',
+ 'PDECIMAL' => 'DOUBLE PRECISION',
+ 'PDECIMAL:' => 'DOUBLE PRECISION',
+ 'VCHAR_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
+ 'VCHAR_UNI:'=> 'VARCHAR(%d) CHARACTER SET UTF8',
+ 'VCHAR_CI' => 'VARCHAR(255) CHARACTER SET UTF8',
+ 'VARBINARY' => 'CHAR(255) CHARACTER SET NONE',
+ ),
+
+ 'mssql' => array(
+ 'INT:' => '[int]',
+ 'BINT' => '[float]',
+ 'UINT' => '[int]',
+ 'UINT:' => '[int]',
+ 'TINT:' => '[int]',
+ 'USINT' => '[int]',
+ 'BOOL' => '[int]',
+ 'VCHAR' => '[varchar] (255)',
+ 'VCHAR:' => '[varchar] (%d)',
+ 'CHAR:' => '[char] (%d)',
+ 'XSTEXT' => '[varchar] (1000)',
+ 'STEXT' => '[varchar] (3000)',
+ 'TEXT' => '[varchar] (8000)',
+ 'MTEXT' => '[text]',
+ 'XSTEXT_UNI'=> '[varchar] (100)',
+ 'STEXT_UNI' => '[varchar] (255)',
+ 'TEXT_UNI' => '[varchar] (4000)',
+ 'MTEXT_UNI' => '[text]',
+ 'TIMESTAMP' => '[int]',
+ 'DECIMAL' => '[float]',
+ 'DECIMAL:' => '[float]',
+ 'PDECIMAL' => '[float]',
+ 'PDECIMAL:' => '[float]',
+ 'VCHAR_UNI' => '[varchar] (255)',
+ 'VCHAR_UNI:'=> '[varchar] (%d)',
+ 'VCHAR_CI' => '[varchar] (255)',
+ 'VARBINARY' => '[varchar] (255)',
+ ),
+
+ 'oracle' => array(
+ 'INT:' => 'number(%d)',
+ 'BINT' => 'number(20)',
+ 'UINT' => 'number(8)',
+ 'UINT:' => 'number(%d)',
+ 'TINT:' => 'number(%d)',
+ 'USINT' => 'number(4)',
+ 'BOOL' => 'number(1)',
+ 'VCHAR' => 'varchar2(255)',
+ 'VCHAR:' => 'varchar2(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'varchar2(1000)',
+ 'STEXT' => 'varchar2(3000)',
+ 'TEXT' => 'clob',
+ 'MTEXT' => 'clob',
+ 'XSTEXT_UNI'=> 'varchar2(300)',
+ 'STEXT_UNI' => 'varchar2(765)',
+ 'TEXT_UNI' => 'clob',
+ 'MTEXT_UNI' => 'clob',
+ 'TIMESTAMP' => 'number(11)',
+ 'DECIMAL' => 'number(5, 2)',
+ 'DECIMAL:' => 'number(%d, 2)',
+ 'PDECIMAL' => 'number(6, 3)',
+ 'PDECIMAL:' => 'number(%d, 3)',
+ 'VCHAR_UNI' => 'varchar2(765)',
+ 'VCHAR_UNI:'=> array('varchar2(%d)', 'limit' => array('mult', 3, 765, 'clob')),
+ 'VCHAR_CI' => 'varchar2(255)',
+ 'VARBINARY' => 'raw(255)',
+ ),
+
+ 'sqlite' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'INTEGER UNSIGNED', //'mediumint(8) UNSIGNED',
+ 'UINT:' => 'INTEGER UNSIGNED', // 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'INTEGER UNSIGNED', //'mediumint(4) UNSIGNED',
+ 'BOOL' => 'INTEGER UNSIGNED', //'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'text(65535)',
+ 'STEXT' => 'text(65535)',
+ 'TEXT' => 'text(65535)',
+ 'MTEXT' => 'mediumtext(16777215)',
+ 'XSTEXT_UNI'=> 'text(65535)',
+ 'STEXT_UNI' => 'text(65535)',
+ 'TEXT_UNI' => 'text(65535)',
+ 'MTEXT_UNI' => 'mediumtext(16777215)',
+ 'TIMESTAMP' => 'INTEGER UNSIGNED', //'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar(255)',
+ 'VARBINARY' => 'blob',
+ ),
+
+ 'postgres' => array(
+ 'INT:' => 'INT4',
+ 'BINT' => 'INT8',
+ 'UINT' => 'INT4', // unsigned
+ 'UINT:' => 'INT4', // unsigned
+ 'USINT' => 'INT2', // unsigned
+ 'BOOL' => 'INT2', // unsigned
+ 'TINT:' => 'INT2',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'varchar(1000)',
+ 'STEXT' => 'varchar(3000)',
+ 'TEXT' => 'varchar(8000)',
+ 'MTEXT' => 'TEXT',
+ 'XSTEXT_UNI'=> 'varchar(100)',
+ 'STEXT_UNI' => 'varchar(255)',
+ 'TEXT_UNI' => 'varchar(4000)',
+ 'MTEXT_UNI' => 'TEXT',
+ 'TIMESTAMP' => 'INT4', // unsigned
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar_ci',
+ 'VARBINARY' => 'bytea',
+ ),
+ );
+
+ /**
+ * A list of types being unsigned for better reference in some db's
+ * @var array
+ */
+ var $unsigned_types = array('UINT', 'UINT:', 'USINT', 'BOOL', 'TIMESTAMP');
+
+ /**
+ * A list of supported DBMS. We change this class to support more DBMS, the DBMS itself only need to follow some rules.
+ * @var array
+ */
+ var $supported_dbms = array('firebird', 'mssql', 'mysql_40', 'mysql_41', 'oracle', 'postgres', 'sqlite');
+
+ /**
+ * This is set to true if user only wants to return the 'to-be-executed' SQL statement(s) (as an array).
+ * This mode has no effect on some methods (inserting of data for example). This is expressed within the methods command.
+ */
+ var $return_statements = false;
+
+ /**
+ * Constructor. Set DB Object and set {@link $return_statements return_statements}.
+ *
+ * @param phpbb_dbal $db DBAL object
+ * @param bool $return_statements True if only statements should be returned and no SQL being executed
+ */
+ function phpbb_db_tools(&$db, $return_statements = false)
+ {
+ $this->db = $db;
+ $this->return_statements = $return_statements;
+
+ // Determine mapping database type
+ switch ($this->db->sql_layer)
+ {
+ case 'mysql':
+ $this->sql_layer = 'mysql_40';
+ break;
+
+ case 'mysql4':
+ if (version_compare($this->db->sql_server_info(true), '4.1.3', '>='))
+ {
+ $this->sql_layer = 'mysql_41';
+ }
+ else
+ {
+ $this->sql_layer = 'mysql_40';
+ }
+ break;
+
+ case 'mysqli':
+ $this->sql_layer = 'mysql_41';
+ break;
+
+ case 'mssql':
+ case 'mssql_odbc':
+ $this->sql_layer = 'mssql';
+ break;
+
+ default:
+ $this->sql_layer = $this->db->sql_layer;
+ break;
+ }
+ }
+
+ /**
+ * Check if table exists
+ *
+ *
+ * @param string $table_name The table name to check for
+ * @return bool true if table exists, else false
+ */
+ function sql_table_exists($table_name)
+ {
+ $this->db->sql_return_on_error(true);
+ $result = $this->db->sql_query_limit('SELECT * FROM ' . $table_name, 1);
+ $this->db->sql_return_on_error(false);
+
+ if ($result)
+ {
+ $this->db->sql_freeresult($result);
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Create SQL Table
+ *
+ * @param string $table_name The table name to create
+ * @param array $table_data Array containing table data.
+ * @return array Statements if $return_statements is true.
+ */
+ function sql_create_table($table_name, $table_data)
+ {
+ // holds the DDL for a column
+ $columns = $statements = array();
+
+ if ($this->sql_table_exists($table_name))
+ {
+ return $this->_sql_run_sql($statements);
+ }
+
+ // Begin transaction
+ $statements[] = 'begin';
+
+ // Determine if we have created a PRIMARY KEY in the earliest
+ $primary_key_gen = false;
+
+ // Determine if the table must be created with TEXTIMAGE
+ $create_textimage = false;
+
+ // Determine if the table requires a sequence
+ $create_sequence = false;
+
+ // Begin table sql statement
+ switch ($this->sql_layer)
+ {
+ case 'mssql':
+ $table_sql = 'CREATE TABLE [' . $table_name . '] (' . "\n";
+ break;
+
+ default:
+ $table_sql = 'CREATE TABLE ' . $table_name . ' (' . "\n";
+ break;
+ }
+
+ // Iterate through the columns to create a table
+ foreach ($table_data['COLUMNS'] as $column_name => $column_data)
+ {
+ // here lies an array, filled with information compiled on the column's data
+ $prepared_column = $this->sql_prepare_column_data($table_name, $column_name, $column_data);
+
+ // here we add the definition of the new column to the list of columns
+ switch ($this->sql_layer)
+ {
+ case 'mssql':
+ $columns[] = "\t [{$column_name}] " . $prepared_column['column_type_sql_default'];
+ break;
+
+ default:
+ $columns[] = "\t {$column_name} " . $prepared_column['column_type_sql'];
+ break;
+ }
+
+ // see if we have found a primary key set due to a column definition if we have found it, we can stop looking
+ if (!$primary_key_gen)
+ {
+ $primary_key_gen = isset($prepared_column['primary_key_set']) && $prepared_column['primary_key_set'];
+ }
+
+ // create textimage DDL based off of the existance of certain column types
+ if (!$create_textimage)
+ {
+ $create_textimage = isset($prepared_column['textimage']) && $prepared_column['textimage'];
+ }
+
+ // create sequence DDL based off of the existance of auto incrementing columns
+ if (!$create_sequence && isset($prepared_column['auto_increment']) && $prepared_column['auto_increment'])
+ {
+ $create_sequence = $column_name;
+ }
+ }
+
+ // this makes up all the columns in the create table statement
+ $table_sql .= implode(",\n", $columns);
+
+ // Close the table for two DBMS and add to the statements
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ $table_sql .= "\n);";
+ $statements[] = $table_sql;
+ break;
+
+ case 'mssql':
+ $table_sql .= "\n) ON [PRIMARY]" . (($create_textimage) ? ' TEXTIMAGE_ON [PRIMARY]' : '');
+ $statements[] = $table_sql;
+ break;
+ }
+
+ // we have yet to create a primary key for this table,
+ // this means that we can add the one we really wanted instead
+ if (!$primary_key_gen)
+ {
+ // Write primary key
+ if (isset($table_data['PRIMARY_KEY']))
+ {
+ if (!is_array($table_data['PRIMARY_KEY']))
+ {
+ $table_data['PRIMARY_KEY'] = array($table_data['PRIMARY_KEY']);
+ }
+
+ switch ($this->sql_layer)
+ {
+ case 'mysql_40':
+ case 'mysql_41':
+ case 'postgres':
+ case 'sqlite':
+ $table_sql .= ",\n\t PRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . ')';
+ break;
+
+ case 'firebird':
+ case 'mssql':
+ $primary_key_stmts = $this->sql_create_primary_key($table_name, $table_data['PRIMARY_KEY']);
+ foreach ($primary_key_stmts as $pk_stmt)
+ {
+ $statements[] = $pk_stmt;
+ }
+ break;
+
+ case 'oracle':
+ $table_sql .= ",\n\t CONSTRAINT pk_{$table_name} PRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . ')';
+ break;
+ }
+ }
+ }
+
+ // close the table
+ switch ($this->sql_layer)
+ {
+ case 'mysql_41':
+ // make sure the table is in UTF-8 mode
+ $table_sql .= "\n) CHARACTER SET `utf8` COLLATE `utf8_bin`;";
+ $statements[] = $table_sql;
+ break;
+
+ case 'mysql_40':
+ case 'sqlite':
+ $table_sql .= "\n);";
+ $statements[] = $table_sql;
+ break;
+
+ case 'postgres':
+ // do we need to add a sequence for auto incrementing columns?
+ if ($create_sequence)
+ {
+ $statements[] = "CREATE SEQUENCE {$table_name}_seq;";
+ }
+
+ $table_sql .= "\n);";
+ $statements[] = $table_sql;
+ break;
+
+ case 'oracle':
+ $table_sql .= "\n);";
+ $statements[] = $table_sql;
+
+ // do we need to add a sequence and a tigger for auto incrementing columns?
+ if ($create_sequence)
+ {
+ // create the actual sequence
+ $statements[] = "CREATE SEQUENCE {$table_name}_seq";
+
+ // the trigger is the mechanism by which we increment the counter
+ $trigger = "CREATE OR REPLACE TRIGGER t_{$table_name}\n";
+ $trigger .= "BEFORE INSERT ON {$table_name}\n";
+ $trigger .= "FOR EACH ROW WHEN (\n";
+ $trigger .= "\tnew.{$create_sequence} IS NULL OR new.{$create_sequence} = 0\n";
+ $trigger .= ")\n";
+ $trigger .= "BEGIN\n";
+ $trigger .= "\tSELECT {$table_name}_seq.nextval\n";
+ $trigger .= "\tINTO :new.{$create_sequence}\n";
+ $trigger .= "\tFROM dual\n";
+ $trigger .= "END;";
+
+ $statements[] = $trigger;
+ }
+ break;
+
+ case 'firebird':
+ if ($create_sequence)
+ {
+ $statements[] = "CREATE SEQUENCE {$table_name}_seq;";
+ }
+ break;
+ }
+
+ // Write Keys
+ if (isset($table_data['KEYS']))
+ {
+ foreach ($table_data['KEYS'] as $key_name => $key_data)
+ {
+ if (!is_array($key_data[1]))
+ {
+ $key_data[1] = array($key_data[1]);
+ }
+
+ $old_return_statements = $this->return_statements;
+ $this->return_statements = true;
+
+ $key_stmts = ($key_data[0] == 'UNIQUE') ? $this->sql_create_unique_index($table_name, $key_name, $key_data[1]) : $this->sql_create_index($table_name, $key_name, $key_data[1]);
+
+ foreach ($key_stmts as $key_stmt)
+ {
+ $statements[] = $key_stmt;
+ }
+
+ $this->return_statements = $old_return_statements;
+ }
+ }
+
+ // Commit Transaction
+ $statements[] = 'commit';
+
+ return $this->_sql_run_sql($statements);
+ }
+
+ /**
+ * Handle passed database update array.
+ * Expected structure...
+ * Key being one of the following
+ * change_columns: Column changes (only type, not name)
+ * add_columns: Add columns to a table
+ * drop_keys: Dropping keys
+ * drop_columns: Removing/Dropping columns
+ * add_primary_keys: adding primary keys
+ * add_unique_index: adding an unique index
+ * add_index: adding an index
+ *
+ * The values are in this format:
+ * {TABLE NAME} => array(
+ * {COLUMN NAME} => array({COLUMN TYPE}, {DEFAULT VALUE}, {OPTIONAL VARIABLES}),
+ * {KEY/INDEX NAME} => array({COLUMN NAMES}),
+ * )
+ *
+ * For more information have a look at /develop/create_schema_files.php (only available through SVN)
+ */
+ function perform_schema_changes($schema_changes)
+ {
+ if (empty($schema_changes))
+ {
+ return;
+ }
+
+ $statements = array();
+ $sqlite = false;
+
+ // For SQLite we need to perform the schema changes in a much more different way
+ if ($this->db->sql_layer == 'sqlite' && $this->return_statements)
+ {
+ $sqlite_data = array();
+ $sqlite = true;
+ }
+
+ // Change columns?
+ if (!empty($schema_changes['change_columns']))
+ {
+ foreach ($schema_changes['change_columns'] as $table => $columns)
+ {
+ foreach ($columns as $column_name => $column_data)
+ {
+ // If the column exists we change it, else we add it ;)
+ if ($column_exists = $this->sql_column_exists($table, $column_name))
+ {
+ $result = $this->sql_column_change($table, $column_name, $column_data, true);
+ }
+ else
+ {
+ $result = $this->sql_column_add($table, $column_name, $column_data, true);
+ }
+
+ if ($sqlite)
+ {
+ if ($column_exists)
+ {
+ $sqlite_data[$table]['change_columns'][] = $result;
+ }
+ else
+ {
+ $sqlite_data[$table]['add_columns'][] = $result;
+ }
+ }
+ else if ($this->return_statements)
+ {
+ $statements = array_merge($statements, $result);
+ }
+ }
+ }
+ }
+
+ // Add columns?
+ if (!empty($schema_changes['add_columns']))
+ {
+ foreach ($schema_changes['add_columns'] as $table => $columns)
+ {
+ foreach ($columns as $column_name => $column_data)
+ {
+ // Only add the column if it does not exist yet, else change it (to be consistent)
+ if ($column_exists = $this->sql_column_exists($table, $column_name))
+ {
+ $result = $this->sql_column_change($table, $column_name, $column_data, true);
+ }
+ else
+ {
+ $result = $this->sql_column_add($table, $column_name, $column_data, true);
+ }
+
+ if ($sqlite)
+ {
+ if ($column_exists)
+ {
+ $sqlite_data[$table]['change_columns'][] = $result;
+ }
+ else
+ {
+ $sqlite_data[$table]['add_columns'][] = $result;
+ }
+ }
+ else if ($this->return_statements)
+ {
+ $statements = array_merge($statements, $result);
+ }
+ }
+ }
+ }
+
+ // Remove keys?
+ if (!empty($schema_changes['drop_keys']))
+ {
+ foreach ($schema_changes['drop_keys'] as $table => $indexes)
+ {
+ foreach ($indexes as $index_name)
+ {
+ $result = $this->sql_index_drop($table, $index_name);
+
+ if ($this->return_statements)
+ {
+ $statements = array_merge($statements, $result);
+ }
+ }
+ }
+ }
+
+ // Drop columns?
+ if (!empty($schema_changes['drop_columns']))
+ {
+ foreach ($schema_changes['drop_columns'] as $table => $columns)
+ {
+ foreach ($columns as $column)
+ {
+ // Only remove the column if it exists...
+ if ($this->sql_column_exists($table, $column))
+ {
+ $result = $this->sql_column_remove($table, $column, true);
+
+ if ($sqlite)
+ {
+ $sqlite_data[$table]['drop_columns'][] = $result;
+ }
+ else if ($this->return_statements)
+ {
+ $statements = array_merge($statements, $result);
+ }
+ }
+ }
+ }
+ }
+
+ // Add primary keys?
+ if (!empty($schema_changes['add_primary_keys']))
+ {
+ foreach ($schema_changes['add_primary_keys'] as $table => $columns)
+ {
+ $result = $this->sql_create_primary_key($table, $columns, true);
+
+ if ($sqlite)
+ {
+ $sqlite_data[$table]['primary_key'] = $result;
+ }
+ else if ($this->return_statements)
+ {
+ $statements = array_merge($statements, $result);
+ }
+ }
+ }
+
+ // Add unqiue indexes?
+ if (!empty($schema_changes['add_unique_index']))
+ {
+ foreach ($schema_changes['add_unique_index'] as $table => $index_array)
+ {
+ foreach ($index_array as $index_name => $column)
+ {
+ $result = $this->sql_create_unique_index($table, $index_name, $column);
+
+ if ($this->return_statements)
+ {
+ $statements = array_merge($statements, $result);
+ }
+ }
+ }
+ }
+
+ // Add indexes?
+ if (!empty($schema_changes['add_index']))
+ {
+ foreach ($schema_changes['add_index'] as $table => $index_array)
+ {
+ foreach ($index_array as $index_name => $column)
+ {
+ $result = $this->sql_create_index($table, $index_name, $column);
+
+ if ($this->return_statements)
+ {
+ $statements = array_merge($statements, $result);
+ }
+ }
+ }
+ }
+
+ if ($sqlite)
+ {
+ foreach ($sqlite_data as $table_name => $sql_schema_changes)
+ {
+ // Create temporary table with original data
+ $statements[] = 'begin';
+
+ $sql = "SELECT sql
+ FROM sqlite_master
+ WHERE type = 'table'
+ AND name = '{$table_name}'
+ ORDER BY type DESC, name;";
+ $result = $this->db->sql_query($sql);
+
+ if (!$result)
+ {
+ continue;
+ }
+
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ // Create a backup table and populate it, destroy the existing one
+ $statements[] = preg_replace('#CREATE\s+TABLE\s+"?' . $table_name . '"?#i', 'CREATE TEMPORARY TABLE ' . $table_name . '_temp', $row['sql']);
+ $statements[] = 'INSERT INTO ' . $table_name . '_temp SELECT * FROM ' . $table_name;
+ $statements[] = 'DROP TABLE ' . $table_name;
+
+ // Get the columns...
+ preg_match('#\((.*)\)#s', $row['sql'], $matches);
+
+ $plain_table_cols = trim($matches[1]);
+ $new_table_cols = preg_split('/,(?![\s\w]+\))/m', $plain_table_cols);
+ $column_list = array();
+
+ foreach ($new_table_cols as $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if ($entities[0] == 'PRIMARY')
+ {
+ continue;
+ }
+ $column_list[] = $entities[0];
+ }
+
+ // note down the primary key notation because sqlite only supports adding it to the end for the new table
+ $primary_key = false;
+ $_new_cols = array();
+
+ foreach ($new_table_cols as $key => $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if ($entities[0] == 'PRIMARY')
+ {
+ $primary_key = $declaration;
+ continue;
+ }
+ $_new_cols[] = $declaration;
+ }
+
+ $new_table_cols = $_new_cols;
+
+ // First of all... change columns
+ if (!empty($sql_schema_changes['change_columns']))
+ {
+ foreach ($sql_schema_changes['change_columns'] as $column_sql)
+ {
+ foreach ($new_table_cols as $key => $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if (strpos($column_sql, $entities[0] . ' ') === 0)
+ {
+ $new_table_cols[$key] = $column_sql;
+ }
+ }
+ }
+ }
+
+ if (!empty($sql_schema_changes['add_columns']))
+ {
+ foreach ($sql_schema_changes['add_columns'] as $column_sql)
+ {
+ $new_table_cols[] = $column_sql;
+ }
+ }
+
+ // Now drop them...
+ if (!empty($sql_schema_changes['drop_columns']))
+ {
+ foreach ($sql_schema_changes['drop_columns'] as $column_name)
+ {
+ // Remove from column list...
+ $new_column_list = array();
+ foreach ($column_list as $key => $value)
+ {
+ if ($value === $column_name)
+ {
+ continue;
+ }
+
+ $new_column_list[] = $value;
+ }
+
+ $column_list = $new_column_list;
+
+ // Remove from table...
+ $_new_cols = array();
+ foreach ($new_table_cols as $key => $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if (strpos($column_name . ' ', $entities[0] . ' ') === 0)
+ {
+ continue;
+ }
+ $_new_cols[] = $declaration;
+ }
+ $new_table_cols = $_new_cols;
+ }
+ }
+
+ // Primary key...
+ if (!empty($sql_schema_changes['primary_key']))
+ {
+ $new_table_cols[] = 'PRIMARY KEY (' . implode(', ', $sql_schema_changes['primary_key']) . ')';
+ }
+ // Add a new one or the old primary key
+ else if ($primary_key !== false)
+ {
+ $new_table_cols[] = $primary_key;
+ }
+
+ $columns = implode(',', $column_list);
+
+ // create a new table and fill it up. destroy the temp one
+ $statements[] = 'CREATE TABLE ' . $table_name . ' (' . implode(',', $new_table_cols) . ');';
+ $statements[] = 'INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;';
+ $statements[] = 'DROP TABLE ' . $table_name . '_temp';
+
+ $statements[] = 'commit';
+ }
+ }
+
+ if ($this->return_statements)
+ {
+ return $statements;
+ }
+ }
+
+ /**
+ * Check if a specified column exist
+ *
+ * @param string $table Table to check the column at
+ * @param string $column_name The column to check
+ *
+ * @return bool True if column exists, else false
+ */
+ function sql_column_exists($table, $column_name)
+ {
+ switch ($this->sql_layer)
+ {
+ case 'mysql_40':
+ case 'mysql_41':
+
+ $sql = "SHOW COLUMNS FROM $table";
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // lower case just in case
+ if (strtolower($row['Field']) == $column_name)
+ {
+ $this->db->sql_freeresult($result);
+ return true;
+ }
+ }
+ $this->db->sql_freeresult($result);
+ return false;
+ break;
+
+ // PostgreSQL has a way of doing this in a much simpler way but would
+ // not allow us to support all versions of PostgreSQL
+ case 'postgres':
+ $sql = "SELECT a.attname
+ FROM pg_class c, pg_attribute a
+ WHERE c.relname = '{$table}'
+ AND a.attnum > 0
+ AND a.attrelid = c.oid";
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // lower case just in case
+ if (strtolower($row['attname']) == $column_name)
+ {
+ $this->db->sql_freeresult($result);
+ return true;
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ return false;
+ break;
+
+ // same deal with PostgreSQL, we must perform more complex operations than
+ // we technically could
+ case 'mssql':
+ $sql = "SELECT c.name
+ FROM syscolumns c
+ LEFT JOIN sysobjects o ON c.id = o.id
+ WHERE o.name = '{$table}'";
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // lower case just in case
+ if (strtolower($row['name']) == $column_name)
+ {
+ $this->db->sql_freeresult($result);
+ return true;
+ }
+ }
+ $this->db->sql_freeresult($result);
+ return false;
+ break;
+
+ case 'oracle':
+ $sql = "SELECT column_name
+ FROM user_tab_columns
+ WHERE LOWER(table_name) = '" . strtolower($table) . "'";
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // lower case just in case
+ if (strtolower($row['column_name']) == $column_name)
+ {
+ $this->db->sql_freeresult($result);
+ return true;
+ }
+ }
+ $this->db->sql_freeresult($result);
+ return false;
+ break;
+
+ case 'firebird':
+ $sql = "SELECT RDB\$FIELD_NAME as FNAME
+ FROM RDB\$RELATION_FIELDS
+ WHERE RDB\$RELATION_NAME = '" . strtoupper($table) . "'";
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // lower case just in case
+ if (strtolower($row['fname']) == $column_name)
+ {
+ $this->db->sql_freeresult($result);
+ return true;
+ }
+ }
+ $this->db->sql_freeresult($result);
+ return false;
+ break;
+
+ // ugh, SQLite
+ case 'sqlite':
+ $sql = "SELECT sql
+ FROM sqlite_master
+ WHERE type = 'table'
+ AND name = '{$table}'";
+ $result = $this->db->sql_query($sql);
+
+ if (!$result)
+ {
+ return false;
+ }
+
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ preg_match('#\((.*)\)#s', $row['sql'], $matches);
+
+ $cols = trim($matches[1]);
+ $col_array = preg_split('/,(?![\s\w]+\))/m', $cols);
+
+ foreach ($col_array as $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if ($entities[0] == 'PRIMARY')
+ {
+ continue;
+ }
+
+ if (strtolower($entities[0]) == $column_name)
+ {
+ return true;
+ }
+ }
+ return false;
+ break;
+ }
+ }
+
+ /**
+ * Private method for performing sql statements (either execute them or return them)
+ * @access private
+ */
+ function _sql_run_sql($statements)
+ {
+ if ($this->return_statements)
+ {
+ return $statements;
+ }
+
+ // We could add error handling here...
+ foreach ($statements as $sql)
+ {
+ if ($sql === 'begin')
+ {
+ $this->db->sql_transaction('begin');
+ }
+ else if ($sql === 'commit')
+ {
+ $this->db->sql_transaction('commit');
+ }
+ else
+ {
+ $this->db->sql_query($sql);
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Function to prepare some column information for better usage
+ * @access private
+ */
+ function sql_prepare_column_data($table_name, $column_name, $column_data)
+ {
+ // Get type
+ if (strpos($column_data[0], ':') !== false)
+ {
+ list($orig_column_type, $column_length) = explode(':', $column_data[0]);
+ if (!is_array($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']))
+ {
+ $column_type = sprintf($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':'], $column_length);
+ }
+ else
+ {
+ if (isset($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['rule']))
+ {
+ switch ($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['rule'][0])
+ {
+ case 'div':
+ $column_length /= $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['rule'][1];
+ $column_length = ceil($column_length);
+ $column_type = sprintf($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':'][0], $column_length);
+ break;
+ }
+ }
+
+ if (isset($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit']))
+ {
+ switch ($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][0])
+ {
+ case 'mult':
+ $column_length *= $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][1];
+ if ($column_length > $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][2])
+ {
+ $column_type = $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][3];
+ }
+ else
+ {
+ $column_type = sprintf($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':'][0], $column_length);
+ }
+ break;
+ }
+ }
+ }
+ $orig_column_type .= ':';
+ }
+ else
+ {
+ $orig_column_type = $column_data[0];
+ $column_type = $this->dbms_type_map[$this->sql_layer][$column_data[0]];
+ }
+
+ // Adjust default value if db-dependant specified
+ if (is_array($column_data[1]))
+ {
+ $column_data[1] = (isset($column_data[1][$this->sql_layer])) ? $column_data[1][$this->sql_layer] : $column_data[1]['default'];
+ }
+
+ $sql = '';
+
+ $return_array = array();
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ $sql .= " {$column_type} ";
+ $return_array['column_type_sql_type'] = " {$column_type} ";
+
+ if (!is_null($column_data[1]))
+ {
+ $sql .= 'DEFAULT ' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ' ';
+ $return_array['column_type_sql_default'] = ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ' ';
+ }
+
+ $sql .= 'NOT NULL';
+
+ // This is a UNICODE column and thus should be given it's fair share
+ if (preg_match('/^X?STEXT_UNI|VCHAR_(CI|UNI:?)/', $column_data[0]))
+ {
+ $sql .= ' COLLATE UNICODE';
+ }
+
+ $return_array['auto_increment'] = false;
+ if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
+ {
+ $return_array['auto_increment'] = true;
+ }
+
+ break;
+
+ case 'mssql':
+ $sql .= " {$column_type} ";
+ $sql_default = " {$column_type} ";
+
+ // For adding columns we need the default definition
+ if (!is_null($column_data[1]))
+ {
+ // For hexadecimal values do not use single quotes
+ if (strpos($column_data[1], '0x') === 0)
+ {
+ $return_array['default'] = 'DEFAULT (' . $column_data[1] . ') ';
+ $sql_default .= $return_array['default'];
+ }
+ else
+ {
+ $return_array['default'] = 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') ';
+ $sql_default .= $return_array['default'];
+ }
+ }
+
+ if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
+ {
+// $sql .= 'IDENTITY (1, 1) ';
+ $sql_default .= 'IDENTITY (1, 1) ';
+ }
+
+ $return_array['textimage'] = $column_type === '[text]';
+
+ $sql .= 'NOT NULL';
+ $sql_default .= 'NOT NULL';
+
+ $return_array['column_type_sql_default'] = $sql_default;
+
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $sql .= " {$column_type} ";
+
+ // For hexadecimal values do not use single quotes
+ if (!is_null($column_data[1]) && substr($column_type, -4) !== 'text' && substr($column_type, -4) !== 'blob')
+ {
+ $sql .= (strpos($column_data[1], '0x') === 0) ? "DEFAULT {$column_data[1]} " : "DEFAULT '{$column_data[1]}' ";
+ }
+ $sql .= 'NOT NULL';
+
+ if (isset($column_data[2]))
+ {
+ if ($column_data[2] == 'auto_increment')
+ {
+ $sql .= ' auto_increment';
+ }
+ else if ($this->sql_layer === 'mysql_41' && $column_data[2] == 'true_sort')
+ {
+ $sql .= ' COLLATE utf8_unicode_ci';
+ }
+ }
+
+ break;
+
+ case 'oracle':
+ $sql .= " {$column_type} ";
+ $sql .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}' " : '';
+
+ // In Oracle empty strings ('') are treated as NULL.
+ // Therefore in oracle we allow NULL's for all DEFAULT '' entries
+ // Oracle does not like setting NOT NULL on a column that is already NOT NULL (this happens only on number fields)
+ if (!preg_match('/number/i', $column_type))
+ {
+ $sql .= ($column_data[1] === '') ? '' : 'NOT NULL';
+ }
+
+ $return_array['auto_increment'] = false;
+ if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
+ {
+ $return_array['auto_increment'] = true;
+ }
+
+ break;
+
+ case 'postgres':
+ $return_array['column_type'] = $column_type;
+
+ $sql .= " {$column_type} ";
+
+ $return_array['auto_increment'] = false;
+ if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
+ {
+ $default_val = "nextval('{$table_name}_seq')";
+ $return_array['auto_increment'] = true;
+ }
+ else if (!is_null($column_data[1]))
+ {
+ $default_val = "'" . $column_data[1] . "'";
+ $return_array['null'] = 'NOT NULL';
+ $sql .= 'NOT NULL ';
+ }
+
+ $return_array['default'] = $default_val;
+
+ $sql .= "DEFAULT {$default_val}";
+
+ // Unsigned? Then add a CHECK contraint
+ if (in_array($orig_column_type, $this->unsigned_types))
+ {
+ $return_array['constraint'] = "CHECK ({$column_name} >= 0)";
+ $sql .= " CHECK ({$column_name} >= 0)";
+ }
+
+ break;
+
+ case 'sqlite':
+ $return_array['primary_key_set'] = false;
+ if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
+ {
+ $sql .= ' INTEGER PRIMARY KEY';
+ $return_array['primary_key_set'] = true;
+ }
+ else
+ {
+ $sql .= ' ' . $column_type;
+ }
+
+ $sql .= ' NOT NULL ';
+ $sql .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}'" : '';
+
+ break;
+ }
+
+ $return_array['column_type_sql'] = $sql;
+
+ return $return_array;
+ }
+
+ /**
+ * Add new column
+ */
+ function sql_column_add($table_name, $column_name, $column_data, $inline = false)
+ {
+ $column_data = $this->sql_prepare_column_data($table_name, $column_name, $column_data);
+ $statements = array();
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ADD "' . strtoupper($column_name) . '" ' . $column_data['column_type_sql'];
+ break;
+
+ case 'mssql':
+ $statements[] = 'ALTER TABLE [' . $table_name . '] ADD [' . $column_name . '] ' . $column_data['column_type_sql_default'];
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $statements[] = 'ALTER TABLE `' . $table_name . '` ADD COLUMN `' . $column_name . '` ' . $column_data['column_type_sql'];
+ break;
+
+ case 'oracle':
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ADD ' . $column_name . ' ' . $column_data['column_type_sql'];
+ break;
+
+ case 'postgres':
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ADD COLUMN "' . $column_name . '" ' . $column_data['column_type_sql'];
+ break;
+
+ case 'sqlite':
+
+ if ($inline && $this->return_statements)
+ {
+ return $column_name . ' ' . $column_data['column_type_sql'];
+ }
+
+ if (version_compare(sqlite_libversion(), '3.0') == -1)
+ {
+ $sql = "SELECT sql
+ FROM sqlite_master
+ WHERE type = 'table'
+ AND name = '{$table_name}'
+ ORDER BY type DESC, name;";
+ $result = $this->db->sql_query($sql);
+
+ if (!$result)
+ {
+ break;
+ }
+
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $statements[] = 'begin';
+
+ // Create a backup table and populate it, destroy the existing one
+ $statements[] = preg_replace('#CREATE\s+TABLE\s+"?' . $table_name . '"?#i', 'CREATE TEMPORARY TABLE ' . $table_name . '_temp', $row['sql']);
+ $statements[] = 'INSERT INTO ' . $table_name . '_temp SELECT * FROM ' . $table_name;
+ $statements[] = 'DROP TABLE ' . $table_name;
+
+ preg_match('#\((.*)\)#s', $row['sql'], $matches);
+
+ $new_table_cols = trim($matches[1]);
+ $old_table_cols = preg_split('/,(?![\s\w]+\))/m', $new_table_cols);
+ $column_list = array();
+
+ foreach ($old_table_cols as $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if ($entities[0] == 'PRIMARY')
+ {
+ continue;
+ }
+ $column_list[] = $entities[0];
+ }
+
+ $columns = implode(',', $column_list);
+
+ $new_table_cols = $column_name . ' ' . $column_data['column_type_sql'] . ',' . $new_table_cols;
+
+ // create a new table and fill it up. destroy the temp one
+ $statements[] = 'CREATE TABLE ' . $table_name . ' (' . $new_table_cols . ');';
+ $statements[] = 'INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;';
+ $statements[] = 'DROP TABLE ' . $table_name . '_temp';
+
+ $statements[] = 'commit';
+ }
+ else
+ {
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ADD ' . $column_name . ' [' . $column_data['column_type_sql'] . ']';
+ }
+ break;
+ }
+
+ return $this->_sql_run_sql($statements);
+ }
+
+ /**
+ * Drop column
+ */
+ function sql_column_remove($table_name, $column_name, $inline = false)
+ {
+ $statements = array();
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ $statements[] = 'ALTER TABLE ' . $table_name . ' DROP "' . strtoupper($column_name) . '"';
+ break;
+
+ case 'mssql':
+ $statements[] = 'ALTER TABLE [' . $table_name . '] DROP COLUMN [' . $column_name . ']';
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $statements[] = 'ALTER TABLE `' . $table_name . '` DROP COLUMN `' . $column_name . '`';
+ break;
+
+ case 'oracle':
+ $statements[] = 'ALTER TABLE ' . $table_name . ' DROP ' . $column_name;
+ break;
+
+ case 'postgres':
+ $statements[] = 'ALTER TABLE ' . $table_name . ' DROP COLUMN "' . $column_name . '"';
+ break;
+
+ case 'sqlite':
+
+ if ($inline && $this->return_statements)
+ {
+ return $column_name;
+ }
+
+ if (version_compare(sqlite_libversion(), '3.0') == -1)
+ {
+ $sql = "SELECT sql
+ FROM sqlite_master
+ WHERE type = 'table'
+ AND name = '{$table_name}'
+ ORDER BY type DESC, name;";
+ $result = $this->db->sql_query($sql);
+
+ if (!$result)
+ {
+ break;
+ }
+
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $statements[] = 'begin';
+
+ // Create a backup table and populate it, destroy the existing one
+ $statements[] = preg_replace('#CREATE\s+TABLE\s+"?' . $table_name . '"?#i', 'CREATE TEMPORARY TABLE ' . $table_name . '_temp', $row['sql']);
+ $statements[] = 'INSERT INTO ' . $table_name . '_temp SELECT * FROM ' . $table_name;
+ $statements[] = 'DROP TABLE ' . $table_name;
+
+ preg_match('#\((.*)\)#s', $row['sql'], $matches);
+
+ $new_table_cols = trim($matches[1]);
+ $old_table_cols = preg_split('/,(?![\s\w]+\))/m', $new_table_cols);
+ $column_list = array();
+
+ foreach ($old_table_cols as $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if ($entities[0] == 'PRIMARY' || $entities[0] === $column_name)
+ {
+ continue;
+ }
+ $column_list[] = $entities[0];
+ }
+
+ $columns = implode(',', $column_list);
+
+ $new_table_cols = preg_replace('/' . $column_name . '[^,]+(?:,|$)/m', '', $new_table_cols);
+
+ // create a new table and fill it up. destroy the temp one
+ $statements[] = 'CREATE TABLE ' . $table_name . ' (' . $new_table_cols . ');';
+ $statements[] = 'INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;';
+ $statements[] = 'DROP TABLE ' . $table_name . '_temp';
+
+ $statements[] = 'commit';
+ }
+ else
+ {
+ $statements[] = 'ALTER TABLE ' . $table_name . ' DROP COLUMN ' . $column_name;
+ }
+ break;
+ }
+
+ return $this->_sql_run_sql($statements);
+ }
+
+ /**
+ * Drop Index
+ */
+ function sql_index_drop($table_name, $index_name)
+ {
+ $statements = array();
+
+ switch ($this->sql_layer)
+ {
+ case 'mssql':
+ $statements[] = 'DROP INDEX ' . $table_name . '.' . $index_name;
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $statements[] = 'DROP INDEX ' . $index_name . ' ON ' . $table_name;
+ break;
+
+ case 'firebird':
+ case 'oracle':
+ case 'postgres':
+ case 'sqlite':
+ $statements[] = 'DROP INDEX ' . $table_name . '_' . $index_name;
+ break;
+ }
+
+ return $this->_sql_run_sql($statements);
+ }
+
+ /**
+ * Drop Table
+ */
+ function sql_table_drop($table_name)
+ {
+ $statements = array();
+
+ if (!$this->sql_table_exists($table_name))
+ {
+ return $this->_sql_run_sql($statements);
+ }
+
+ // the most basic operation, get rid of the table
+ $statements[] = 'DROP TABLE ' . $table_name;
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ $sql = 'SELECT RDB$GENERATOR_NAME as gen
+ FROM RDB$GENERATORS
+ WHERE RDB$SYSTEM_FLAG = 0
+ AND RDB$GENERATOR_NAME = \'' . strtoupper($table_name) . "_GEN'";
+ $result = $this->db->sql_query($sql);
+
+ // does a generator exist?
+ if ($row = $this->db->sql_fetchrow($result))
+ {
+ $statements[] = "DROP GENERATOR {$row['gen']};";
+ }
+ $this->db->sql_freeresult($result);
+ break;
+
+ case 'oracle':
+ $sql = 'SELECT A.REFERENCED_NAME
+ FROM USER_DEPENDENCIES A, USER_TRIGGERS B
+ WHERE A.REFERENCED_TYPE = \'SEQUENCE\'
+ AND A.NAME = B.TRIGGER_NAME
+ AND B.TABLE_NAME = \'' . strtoupper($table_name) . "'";
+ $result = $this->db->sql_query($sql);
+
+ // any sequences ref'd to this table's triggers?
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $statements[] = "DROP SEQUENCE {$row['referenced_name']}";
+ }
+ $this->db->sql_freeresult($result);
+
+ case 'postgres':
+ // PGSQL does not "tightly" bind sequences and tables, we must guess...
+ $sql = "SELECT relname
+ FROM pg_class
+ WHERE relkind = 'S'
+ AND relname = '{$table_name}_seq'";
+ $result = $this->db->sql_query($sql);
+
+ // We don't even care about storing the results. We already know the answer if we get rows back.
+ if ($this->db->sql_fetchrow($result))
+ {
+ $statements[] = "DROP SEQUENCE {$table_name}_seq;\n";
+ }
+ $this->db->sql_freeresult($result);
+ break;
+ }
+
+ return $this->_sql_run_sql($statements);
+ }
+
+ /**
+ * Add primary key
+ */
+ function sql_create_primary_key($table_name, $column, $inline = false)
+ {
+ $statements = array();
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ case 'postgres':
+ case 'mysql_40':
+ case 'mysql_41':
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ADD PRIMARY KEY (' . implode(', ', $column) . ')';
+ break;
+
+ case 'mssql':
+ $sql = "ALTER TABLE [{$table_name}] WITH NOCHECK ADD ";
+ $sql .= "CONSTRAINT [PK_{$table_name}] PRIMARY KEY CLUSTERED (";
+ $sql .= '[' . implode("],\n\t\t[", $column) . ']';
+ $sql .= ') ON [PRIMARY]';
+
+ $statements[] = $sql;
+ break;
+
+ case 'oracle':
+ $statements[] = 'ALTER TABLE ' . $table_name . 'add CONSTRAINT pk_' . $table_name . ' PRIMARY KEY (' . implode(', ', $column) . ')';
+ break;
+
+ case 'sqlite':
+
+ if ($inline && $this->return_statements)
+ {
+ return $column;
+ }
+
+ $sql = "SELECT sql
+ FROM sqlite_master
+ WHERE type = 'table'
+ AND name = '{$table_name}'
+ ORDER BY type DESC, name;";
+ $result = $this->db->sql_query($sql);
+
+ if (!$result)
+ {
+ break;
+ }
+
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $statements[] = 'begin';
+
+ // Create a backup table and populate it, destroy the existing one
+ $statements[] = preg_replace('#CREATE\s+TABLE\s+"?' . $table_name . '"?#i', 'CREATE TEMPORARY TABLE ' . $table_name . '_temp', $row['sql']);
+ $statements[] = 'INSERT INTO ' . $table_name . '_temp SELECT * FROM ' . $table_name;
+ $statements[] = 'DROP TABLE ' . $table_name;
+
+ preg_match('#\((.*)\)#s', $row['sql'], $matches);
+
+ $new_table_cols = trim($matches[1]);
+ $old_table_cols = preg_split('/,(?![\s\w]+\))/m', $new_table_cols);
+ $column_list = array();
+
+ foreach ($old_table_cols as $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if ($entities[0] == 'PRIMARY')
+ {
+ continue;
+ }
+ $column_list[] = $entities[0];
+ }
+
+ $columns = implode(',', $column_list);
+
+ // create a new table and fill it up. destroy the temp one
+ $statements[] = 'CREATE TABLE ' . $table_name . ' (' . $new_table_cols . ', PRIMARY KEY (' . implode(', ', $column) . '));';
+ $statements[] = 'INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;';
+ $statements[] = 'DROP TABLE ' . $table_name . '_temp';
+
+ $statements[] = 'commit';
+ break;
+ }
+
+ return $this->_sql_run_sql($statements);
+ }
+
+ /**
+ * Add unique index
+ */
+ function sql_create_unique_index($table_name, $index_name, $column)
+ {
+ $statements = array();
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ case 'postgres':
+ case 'oracle':
+ case 'sqlite':
+ $statements[] = 'CREATE UNIQUE INDEX ' . $table_name . '_' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')';
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $statements[] = 'CREATE UNIQUE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')';
+ break;
+
+ case 'mssql':
+ $statements[] = 'CREATE UNIQUE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ') ON [PRIMARY]';
+ break;
+ }
+
+ return $this->_sql_run_sql($statements);
+ }
+
+ /**
+ * Add index
+ */
+ function sql_create_index($table_name, $index_name, $column)
+ {
+ $statements = array();
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ case 'postgres':
+ case 'oracle':
+ case 'sqlite':
+ $statements[] = 'CREATE INDEX ' . $table_name . '_' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')';
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $statements[] = 'CREATE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')';
+ break;
+
+ case 'mssql':
+ $statements[] = 'CREATE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ') ON [PRIMARY]';
+ break;
+ }
+
+ return $this->_sql_run_sql($statements);
+ }
+
+ /**
+ * List all of the indices that belong to a table,
+ * does not count:
+ * * UNIQUE indices
+ * * PRIMARY keys
+ */
+ function sql_list_index($table_name)
+ {
+ $index_array = array();
+
+ if ($this->sql_layer == 'mssql')
+ {
+ $sql = "EXEC sp_statistics '$table_name'";
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if ($row['TYPE'] == 3)
+ {
+ $index_array[] = $row['INDEX_NAME'];
+ }
+ }
+ $this->db->sql_freeresult($result);
+ }
+ else
+ {
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ $sql = "SELECT LOWER(RDB\$INDEX_NAME) as index_name
+ FROM RDB\$INDICES
+ WHERE RDB\$RELATION_NAME = '" . strtoupper($table_name) . "'
+ AND RDB\$UNIQUE_FLAG IS NULL
+ AND RDB\$FOREIGN_KEY IS NULL";
+ $col = 'index_name';
+ break;
+
+ case 'postgres':
+ $sql = "SELECT ic.relname as index_name
+ FROM pg_class bc, pg_class ic, pg_index i
+ WHERE (bc.oid = i.indrelid)
+ AND (ic.oid = i.indexrelid)
+ AND (bc.relname = '" . $table_name . "')
+ AND (i.indisunique != 't')
+ AND (i.indisprimary != 't')";
+ $col = 'index_name';
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $sql = 'SHOW KEYS
+ FROM ' . $table_name;
+ $col = 'Key_name';
+ break;
+
+ case 'oracle':
+ $sql = "SELECT index_name
+ FROM user_indexes
+ WHERE table_name = '" . strtoupper($table_name) . "'
+ AND generated = 'N'
+ AND uniqueness = 'NONUNIQUE'";
+ $col = 'index_name';
+ break;
+
+ case 'sqlite':
+ $sql = "PRAGMA index_info('" . $table_name . "');";
+ $col = 'name';
+ break;
+ }
+
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if (($this->sql_layer == 'mysql_40' || $this->sql_layer == 'mysql_41') && !$row['Non_unique'])
+ {
+ continue;
+ }
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ case 'oracle':
+ case 'postgres':
+ case 'sqlite':
+ $row[$col] = substr($row[$col], strlen($table_name) + 1);
+ break;
+ }
+
+ $index_array[] = $row[$col];
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ return array_map('strtolower', $index_array);
+ }
+
+ /**
+ * Change column type (not name!)
+ */
+ function sql_column_change($table_name, $column_name, $column_data, $inline = false)
+ {
+ $column_data = $this->sql_prepare_column_data($table_name, $column_name, $column_data);
+ $statements = array();
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ // Change type...
+ if (!empty($column_data['column_type_sql_default']))
+ {
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql_type'];
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" SET DEFAULT ' . ' ' . $column_data['column_type_sql_default'];
+ }
+ else
+ {
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql'];
+ }
+ break;
+
+ case 'mssql':
+ $statements[] = 'ALTER TABLE [' . $table_name . '] ALTER COLUMN [' . $column_name . '] ' . $column_data['column_type_sql'];
+
+ if (!empty($column_data['default']))
+ {
+ // Using TRANSACT-SQL for this statement because we do not want to have colliding data if statements are executed at a later stage
+ $statements[] = "DECLARE @drop_default_name VARCHAR(100), @cmd VARCHAR(1000)
+ SET @drop_default_name =
+ (SELECT so.name FROM sysobjects so
+ JOIN sysconstraints sc ON so.id = sc.constid
+ WHERE object_name(so.parent_obj) = '{$table_name}'
+ AND so.xtype = 'D'
+ AND sc.colid = (SELECT colid FROM syscolumns
+ WHERE id = object_id('{$table_name}')
+ AND name = '{$column_name}'))
+ IF @drop_default_name <> ''
+ BEGIN
+ SET @cmd = 'ALTER TABLE [{$table_name}] DROP CONSTRAINT [' + @drop_default_name + ']'
+ EXEC(@cmd)
+ END
+ SET @cmd = 'ALTER TABLE [{$table_name}] ADD CONSTRAINT [DF_{$table_name}_{$column_name}_1] {$column_data['default']} FOR [{$column_name}]'
+ EXEC(@cmd)";
+ }
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $statements[] = 'ALTER TABLE `' . $table_name . '` CHANGE `' . $column_name . '` `' . $column_name . '` ' . $column_data['column_type_sql'];
+ break;
+
+ case 'oracle':
+ $statements[] = 'ALTER TABLE ' . $table_name . ' MODIFY ' . $column_name . ' ' . $column_data['column_type_sql'];
+ break;
+
+ case 'postgres':
+ $sql = 'ALTER TABLE ' . $table_name . ' ';
+
+ $sql_array = array();
+ $sql_array[] = 'ALTER COLUMN ' . $column_name . ' TYPE ' . $column_data['column_type'];
+
+ if (isset($column_data['null']))
+ {
+ if ($column_data['null'] == 'NOT NULL')
+ {
+ $sql_array[] = 'ALTER COLUMN ' . $column_name . ' SET NOT NULL';
+ }
+ else if ($column_data['null'] == 'NULL')
+ {
+ $sql_array[] = 'ALTER COLUMN ' . $column_name . ' DROP NOT NULL';
+ }
+ }
+
+ if (isset($column_data['default']))
+ {
+ $sql_array[] = 'ALTER COLUMN ' . $column_name . ' SET DEFAULT ' . $column_data['default'];
+ }
+
+ // we don't want to double up on constraints if we change different number data types
+ if (isset($column_data['constraint']))
+ {
+ $constraint_sql = "SELECT consrc as constraint_data
+ FROM pg_constraint, pg_class bc
+ WHERE conrelid = bc.oid
+ AND bc.relname = '{$table_name}'
+ AND NOT EXISTS (
+ SELECT *
+ FROM pg_constraint as c, pg_inherits as i
+ WHERE i.inhrelid = pg_constraint.conrelid
+ AND c.conname = pg_constraint.conname
+ AND c.consrc = pg_constraint.consrc
+ AND c.conrelid = i.inhparent
+ )";
+
+ $constraint_exists = false;
+
+ $result = $this->db->sql_query($constraint_sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if (trim($row['constraint_data']) == trim($column_data['constraint']))
+ {
+ $constraint_exists = true;
+ break;
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ if (!$constraint_exists)
+ {
+ $sql_array[] = 'ADD ' . $column_data['constraint'];
+ }
+ }
+
+ $sql .= implode(', ', $sql_array);
+
+ $statements[] = $sql;
+ break;
+
+ case 'sqlite':
+
+ if ($inline && $this->return_statements)
+ {
+ return $column_name . ' ' . $column_data['column_type_sql'];
+ }
+
+ $sql = "SELECT sql
+ FROM sqlite_master
+ WHERE type = 'table'
+ AND name = '{$table_name}'
+ ORDER BY type DESC, name;";
+ $result = $this->db->sql_query($sql);
+
+ if (!$result)
+ {
+ break;
+ }
+
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $statements[] = 'begin';
+
+ // Create a temp table and populate it, destroy the existing one
+ $statements[] = preg_replace('#CREATE\s+TABLE\s+"?' . $table_name . '"?#i', 'CREATE TEMPORARY TABLE ' . $table_name . '_temp', $row['sql']);
+ $statements[] = 'INSERT INTO ' . $table_name . '_temp SELECT * FROM ' . $table_name;
+ $statements[] = 'DROP TABLE ' . $table_name;
+
+ preg_match('#\((.*)\)#s', $row['sql'], $matches);
+
+ $new_table_cols = trim($matches[1]);
+ $old_table_cols = preg_split('/,(?![\s\w]+\))/m', $new_table_cols);
+ $column_list = array();
+
+ foreach ($old_table_cols as $key => $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ $column_list[] = $entities[0];
+ if ($entities[0] == $column_name)
+ {
+ $old_table_cols[$key] = $column_name . ' ' . $column_data['column_type_sql'];
+ }
+ }
+
+ $columns = implode(',', $column_list);
+
+ // create a new table and fill it up. destroy the temp one
+ $statements[] = 'CREATE TABLE ' . $table_name . ' (' . implode(',', $old_table_cols) . ');';
+ $statements[] = 'INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;';
+ $statements[] = 'DROP TABLE ' . $table_name . '_temp';
+
+ $statements[] = 'commit';
+
+ break;
+ }
+
+ return $this->_sql_run_sql($statements);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
new file mode 100644
index 0000000000..a962696bb8
--- /dev/null
+++ b/phpBB/includes/db/dbal.php
@@ -0,0 +1,887 @@
+<?php
+/**
+*
+* @package dbal
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Database Abstraction Layer
+* @package dbal
+*/
+class dbal
+{
+ var $db_connect_id;
+ var $query_result;
+ var $return_on_error = false;
+ var $transaction = false;
+ var $sql_time = 0;
+ var $num_queries = array();
+ var $open_queries = array();
+
+ var $curtime = 0;
+ var $query_hold = '';
+ var $html_hold = '';
+ var $sql_report = '';
+
+ var $persistency = false;
+ var $user = '';
+ var $server = '';
+ var $dbname = '';
+
+ // Set to true if error triggered
+ var $sql_error_triggered = false;
+
+ // Holding the last sql query on sql error
+ var $sql_error_sql = '';
+ // Holding the error information - only populated if sql_error_triggered is set
+ var $sql_error_returned = array();
+
+ // Holding transaction count
+ var $transactions = 0;
+
+ // Supports multi inserts?
+ var $multi_insert = false;
+
+ /**
+ * Current sql layer
+ */
+ var $sql_layer = '';
+
+ /**
+ * Wildcards for matching any (%) or exactly one (_) character within LIKE expressions
+ */
+ var $any_char;
+ var $one_char;
+
+ /**
+ * Exact version of the DBAL, directly queried
+ */
+ var $sql_server_version = false;
+
+ /**
+ * Constructor
+ */
+ function dbal()
+ {
+ $this->num_queries = array(
+ 'cached' => 0,
+ 'normal' => 0,
+ 'total' => 0,
+ );
+
+ // Fill default sql layer based on the class being called.
+ // This can be changed by the specified layer itself later if needed.
+ $this->sql_layer = substr(get_class($this), 5);
+
+ // Do not change this please! This variable is used to easy the use of it - and is hardcoded.
+ $this->any_char = chr(0) . '%';
+ $this->one_char = chr(0) . '_';
+ }
+
+ /**
+ * return on error or display error message
+ */
+ function sql_return_on_error($fail = false)
+ {
+ $this->sql_error_triggered = false;
+ $this->sql_error_sql = '';
+
+ $this->return_on_error = $fail;
+ }
+
+ /**
+ * Return number of sql queries and cached sql queries used
+ */
+ function sql_num_queries($cached = false)
+ {
+ return ($cached) ? $this->num_queries['cached'] : $this->num_queries['normal'];
+ }
+
+ /**
+ * Add to query count
+ */
+ function sql_add_num_queries($cached = false)
+ {
+ $this->num_queries['cached'] += ($cached !== false) ? 1 : 0;
+ $this->num_queries['normal'] += ($cached !== false) ? 0 : 1;
+ $this->num_queries['total'] += 1;
+ }
+
+ /**
+ * DBAL garbage collection, close sql connection
+ */
+ function sql_close()
+ {
+ if (!$this->db_connect_id)
+ {
+ return false;
+ }
+
+ if ($this->transaction)
+ {
+ do
+ {
+ $this->sql_transaction('commit');
+ }
+ while ($this->transaction);
+ }
+
+ foreach ($this->open_queries as $query_id)
+ {
+ $this->sql_freeresult($query_id);
+ }
+
+ // Connection closed correctly. Set db_connect_id to false to prevent errors
+ if ($result = $this->_sql_close())
+ {
+ $this->db_connect_id = false;
+ }
+
+ return $result;
+ }
+
+ /**
+ * Build LIMIT query
+ * Doing some validation here.
+ */
+ function sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
+ {
+ if (empty($query))
+ {
+ return false;
+ }
+
+ // Never use a negative total or offset
+ $total = ($total < 0) ? 0 : $total;
+ $offset = ($offset < 0) ? 0 : $offset;
+
+ return $this->_sql_query_limit($query, $total, $offset, $cache_ttl);
+ }
+
+ /**
+ * Fetch all rows
+ */
+ function sql_fetchrowset($query_id = false)
+ {
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if ($query_id !== false)
+ {
+ $result = array();
+ while ($row = $this->sql_fetchrow($query_id))
+ {
+ $result[] = $row;
+ }
+
+ return $result;
+ }
+
+ return false;
+ }
+
+ /**
+ * Fetch field
+ * if rownum is false, the current row is used, else it is pointing to the row (zero-based)
+ */
+ function sql_fetchfield($field, $rownum = false, $query_id = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if ($query_id !== false)
+ {
+ if ($rownum !== false)
+ {
+ $this->sql_rowseek($rownum, $query_id);
+ }
+
+ if (!is_object($query_id) && isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_fetchfield($query_id, $field);
+ }
+
+ $row = $this->sql_fetchrow($query_id);
+ return (isset($row[$field])) ? $row[$field] : false;
+ }
+
+ return false;
+ }
+
+ /**
+ * Correctly adjust LIKE expression for special characters
+ * Some DBMS are handling them in a different way
+ *
+ * @param string $expression The expression to use. Every wildcard is escaped, except $this->any_char and $this->one_char
+ * @return string LIKE expression including the keyword!
+ */
+ function sql_like_expression($expression)
+ {
+ $expression = utf8_str_replace(array('_', '%'), array("\_", "\%"), $expression);
+ $expression = utf8_str_replace(array(chr(0) . "\_", chr(0) . "\%"), array('_', '%'), $expression);
+
+ return $this->_sql_like_expression('LIKE \'' . $this->sql_escape($expression) . '\'');
+ }
+
+ /**
+ * SQL Transaction
+ * @access private
+ */
+ function sql_transaction($status = 'begin')
+ {
+ switch ($status)
+ {
+ case 'begin':
+ // If we are within a transaction we will not open another one, but enclose the current one to not loose data (prevening auto commit)
+ if ($this->transaction)
+ {
+ $this->transactions++;
+ return true;
+ }
+
+ $result = $this->_sql_transaction('begin');
+
+ if (!$result)
+ {
+ $this->sql_error();
+ }
+
+ $this->transaction = true;
+ break;
+
+ case 'commit':
+ // If there was a previously opened transaction we do not commit yet... but count back the number of inner transactions
+ if ($this->transaction && $this->transactions)
+ {
+ $this->transactions--;
+ return true;
+ }
+
+ // Check if there is a transaction (no transaction can happen if there was an error, with a combined rollback and error returning enabled)
+ // This implies we have transaction always set for autocommit db's
+ if (!$this->transaction)
+ {
+ return false;
+ }
+
+ $result = $this->_sql_transaction('commit');
+
+ if (!$result)
+ {
+ $this->sql_error();
+ }
+
+ $this->transaction = false;
+ $this->transactions = 0;
+ break;
+
+ case 'rollback':
+ $result = $this->_sql_transaction('rollback');
+ $this->transaction = false;
+ $this->transactions = 0;
+ break;
+
+ default:
+ $result = $this->_sql_transaction($status);
+ break;
+ }
+
+ return $result;
+ }
+
+ /**
+ * Build sql statement from array for insert/update/select statements
+ *
+ * Idea for this from Ikonboard
+ * Possible query values: INSERT, INSERT_SELECT, UPDATE, SELECT
+ *
+ */
+ function sql_build_array($query, $assoc_ary = false)
+ {
+ if (!is_array($assoc_ary))
+ {
+ return false;
+ }
+
+ $fields = $values = array();
+
+ if ($query == 'INSERT' || $query == 'INSERT_SELECT')
+ {
+ foreach ($assoc_ary as $key => $var)
+ {
+ $fields[] = $key;
+
+ if (is_array($var) && is_string($var[0]))
+ {
+ // This is used for INSERT_SELECT(s)
+ $values[] = $var[0];
+ }
+ else
+ {
+ $values[] = $this->_sql_validate_value($var);
+ }
+ }
+
+ $query = ($query == 'INSERT') ? ' (' . implode(', ', $fields) . ') VALUES (' . implode(', ', $values) . ')' : ' (' . implode(', ', $fields) . ') SELECT ' . implode(', ', $values) . ' ';
+ }
+ else if ($query == 'MULTI_INSERT')
+ {
+ trigger_error('The MULTI_INSERT query value is no longer supported. Please use sql_multi_insert() instead.', E_USER_ERROR);
+ }
+ else if ($query == 'UPDATE' || $query == 'SELECT')
+ {
+ $values = array();
+ foreach ($assoc_ary as $key => $var)
+ {
+ $values[] = "$key = " . $this->_sql_validate_value($var);
+ }
+ $query = implode(($query == 'UPDATE') ? ', ' : ' AND ', $values);
+ }
+
+ return $query;
+ }
+
+ /**
+ * Build IN or NOT IN sql comparison string, uses <> or = on single element
+ * arrays to improve comparison speed
+ *
+ * @access public
+ * @param string $field name of the sql column that shall be compared
+ * @param array $array array of values that are allowed (IN) or not allowed (NOT IN)
+ * @param bool $negate true for NOT IN (), false for IN () (default)
+ * @param bool $allow_empty_set If true, allow $array to be empty, this function will return 1=1 or 1=0 then. Default to false.
+ */
+ function sql_in_set($field, $array, $negate = false, $allow_empty_set = false)
+ {
+ if (!sizeof($array))
+ {
+ if (!$allow_empty_set)
+ {
+ // Print the backtrace to help identifying the location of the problematic code
+ $this->sql_error('No values specified for SQL IN comparison');
+ }
+ else
+ {
+ // NOT IN () actually means everything so use a tautology
+ if ($negate)
+ {
+ return '1=1';
+ }
+ // IN () actually means nothing so use a contradiction
+ else
+ {
+ return '1=0';
+ }
+ }
+ }
+
+ if (!is_array($array))
+ {
+ $array = array($array);
+ }
+
+ if (sizeof($array) == 1)
+ {
+ @reset($array);
+ $var = current($array);
+
+ return $field . ($negate ? ' <> ' : ' = ') . $this->_sql_validate_value($var);
+ }
+ else
+ {
+ return $field . ($negate ? ' NOT IN ' : ' IN ') . '(' . implode(', ', array_map(array($this, '_sql_validate_value'), $array)) . ')';
+ }
+ }
+
+ /**
+ * Run binary AND operator on DB column.
+ * Results in sql statement: "{$column_name} & (1 << {$bit}) {$compare}"
+ *
+ * @param string $column_name The column name to use
+ * @param int $bit The value to use for the AND operator, will be converted to (1 << $bit). Is used by options, using the number schema... 0, 1, 2...29
+ * @param string $compare Any custom SQL code after the check (for example "= 0")
+ */
+ function sql_bit_and($column_name, $bit, $compare = '')
+ {
+ if (method_exists($this, '_sql_bit_and'))
+ {
+ return $this->_sql_bit_and($column_name, $bit, $compare);
+ }
+
+ return $column_name . ' & ' . (1 << $bit) . (($compare) ? ' ' . $compare : '');
+ }
+
+ /**
+ * Run more than one insert statement.
+ *
+ * @param string $table table name to run the statements on
+ * @param array &$sql_ary multi-dimensional array holding the statement data.
+ *
+ * @return bool false if no statements were executed.
+ * @access public
+ */
+ function sql_multi_insert($table, &$sql_ary)
+ {
+ if (!sizeof($sql_ary))
+ {
+ return false;
+ }
+
+ if ($this->multi_insert)
+ {
+ $ary = array();
+ foreach ($sql_ary as $id => $_sql_ary)
+ {
+ // If by accident the sql array is only one-dimensional we build a normal insert statement
+ if (!is_array($_sql_ary))
+ {
+ return $this->sql_query('INSERT INTO ' . $table . ' ' . $this->sql_build_array('INSERT', $sql_ary));
+ }
+
+ $values = array();
+ foreach ($_sql_ary as $key => $var)
+ {
+ $values[] = $this->_sql_validate_value($var);
+ }
+ $ary[] = '(' . implode(', ', $values) . ')';
+ }
+
+ return $this->sql_query('INSERT INTO ' . $table . ' ' . ' (' . implode(', ', array_keys($sql_ary[0])) . ') VALUES ' . implode(', ', $ary));
+ }
+ else
+ {
+ foreach ($sql_ary as $ary)
+ {
+ if (!is_array($ary))
+ {
+ return false;
+ }
+
+ $result = $this->sql_query('INSERT INTO ' . $table . ' ' . $this->sql_build_array('INSERT', $ary));
+
+ if (!$result)
+ {
+ return false;
+ }
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Function for validating values
+ * @access private
+ */
+ function _sql_validate_value($var)
+ {
+ if (is_null($var))
+ {
+ return 'NULL';
+ }
+ else if (is_string($var))
+ {
+ return "'" . $this->sql_escape($var) . "'";
+ }
+ else
+ {
+ return (is_bool($var)) ? intval($var) : $var;
+ }
+ }
+
+ /**
+ * Build sql statement from array for select and select distinct statements
+ *
+ * Possible query values: SELECT, SELECT_DISTINCT
+ */
+ function sql_build_query($query, $array)
+ {
+ $sql = '';
+ switch ($query)
+ {
+ case 'SELECT':
+ case 'SELECT_DISTINCT';
+
+ $sql = str_replace('_', ' ', $query) . ' ' . $array['SELECT'] . ' FROM ';
+
+ // Build table array. We also build an alias array for later checks.
+ $table_array = $aliases = array();
+ $used_multi_alias = false;
+
+ foreach ($array['FROM'] as $table_name => $alias)
+ {
+ if (is_array($alias))
+ {
+ $used_multi_alias = true;
+
+ foreach ($alias as $multi_alias)
+ {
+ $table_array[] = $table_name . ' ' . $multi_alias;
+ $aliases[] = $multi_alias;
+ }
+ }
+ else
+ {
+ $table_array[] = $table_name . ' ' . $alias;
+ $aliases[] = $alias;
+ }
+ }
+
+ // We run the following code to determine if we need to re-order the table array. ;)
+ // The reason for this is that for multi-aliased tables (two equal tables) in the FROM statement the last table need to match the first comparison.
+ // DBMS who rely on this: Oracle, PostgreSQL and MSSQL. For all other DBMS it makes absolutely no difference in which order the table is.
+ if (!empty($array['LEFT_JOIN']) && sizeof($array['FROM']) > 1 && $used_multi_alias !== false)
+ {
+ // Take first LEFT JOIN
+ $join = current($array['LEFT_JOIN']);
+
+ // Determine the table used there (even if there are more than one used, we only want to have one
+ preg_match('/(' . implode('|', $aliases) . ')\.[^\s]+/U', str_replace(array('(', ')', 'AND', 'OR', ' '), '', $join['ON']), $matches);
+
+ // If there is a first join match, we need to make sure the table order is correct
+ if (!empty($matches[1]))
+ {
+ $first_join_match = trim($matches[1]);
+ $table_array = $last = array();
+
+ foreach ($array['FROM'] as $table_name => $alias)
+ {
+ if (is_array($alias))
+ {
+ foreach ($alias as $multi_alias)
+ {
+ ($multi_alias === $first_join_match) ? $last[] = $table_name . ' ' . $multi_alias : $table_array[] = $table_name . ' ' . $multi_alias;
+ }
+ }
+ else
+ {
+ ($alias === $first_join_match) ? $last[] = $table_name . ' ' . $alias : $table_array[] = $table_name . ' ' . $alias;
+ }
+ }
+
+ $table_array = array_merge($table_array, $last);
+ }
+ }
+
+ $sql .= $this->_sql_custom_build('FROM', implode(', ', $table_array));
+
+ if (!empty($array['LEFT_JOIN']))
+ {
+ foreach ($array['LEFT_JOIN'] as $join)
+ {
+ $sql .= ' LEFT JOIN ' . key($join['FROM']) . ' ' . current($join['FROM']) . ' ON (' . $join['ON'] . ')';
+ }
+ }
+
+ if (!empty($array['WHERE']))
+ {
+ $sql .= ' WHERE ' . $this->_sql_custom_build('WHERE', $array['WHERE']);
+ }
+
+ if (!empty($array['GROUP_BY']))
+ {
+ $sql .= ' GROUP BY ' . $array['GROUP_BY'];
+ }
+
+ if (!empty($array['ORDER_BY']))
+ {
+ $sql .= ' ORDER BY ' . $array['ORDER_BY'];
+ }
+
+ break;
+ }
+
+ return $sql;
+ }
+
+ /**
+ * display sql error page
+ */
+ function sql_error($sql = '')
+ {
+ global $auth, $user, $config;
+
+ // Set var to retrieve errored status
+ $this->sql_error_triggered = true;
+ $this->sql_error_sql = $sql;
+
+ $this->sql_error_returned = $this->_sql_error();
+
+ if (!$this->return_on_error)
+ {
+ $message = 'SQL ERROR [ ' . $this->sql_layer . ' ]<br /><br />' . $this->sql_error_returned['message'] . ' [' . $this->sql_error_returned['code'] . ']';
+
+ // Show complete SQL error and path to administrators only
+ // Additionally show complete error on installation or if extended debug mode is enabled
+ // The DEBUG_EXTRA constant is for development only!
+ if ((isset($auth) && $auth->acl_get('a_')) || defined('IN_INSTALL') || defined('DEBUG_EXTRA'))
+ {
+ // Print out a nice backtrace...
+ $backtrace = get_backtrace();
+
+ $message .= ($sql) ? '<br /><br />SQL<br /><br />' . htmlspecialchars($sql) : '';
+ $message .= ($backtrace) ? '<br /><br />BACKTRACE<br />' . $backtrace : '';
+ $message .= '<br />';
+ }
+ else
+ {
+ // If error occurs in initiating the session we need to use a pre-defined language string
+ // This could happen if the connection could not be established for example (then we are not able to grab the default language)
+ if (!isset($user->lang['SQL_ERROR_OCCURRED']))
+ {
+ $message .= '<br /><br />An sql error occurred while fetching this page. Please contact an administrator if this problem persists.';
+ }
+ else
+ {
+ if (!empty($config['board_contact']))
+ {
+ $message .= '<br /><br />' . sprintf($user->lang['SQL_ERROR_OCCURRED'], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
+ }
+ else
+ {
+ $message .= '<br /><br />' . sprintf($user->lang['SQL_ERROR_OCCURRED'], '', '');
+ }
+ }
+ }
+
+ if ($this->transaction)
+ {
+ $this->sql_transaction('rollback');
+ }
+
+ if (strlen($message) > 1024)
+ {
+ // We need to define $msg_long_text here to circumvent text stripping.
+ global $msg_long_text;
+ $msg_long_text = $message;
+
+ trigger_error(false, E_USER_ERROR);
+ }
+
+ trigger_error($message, E_USER_ERROR);
+ }
+
+ if ($this->transaction)
+ {
+ $this->sql_transaction('rollback');
+ }
+
+ return $this->sql_error_returned;
+ }
+
+ /**
+ * Explain queries
+ */
+ function sql_report($mode, $query = '')
+ {
+ global $cache, $starttime, $phpbb_root_path, $user;
+
+ if (empty($_REQUEST['explain']))
+ {
+ return false;
+ }
+
+ if (!$query && $this->query_hold != '')
+ {
+ $query = $this->query_hold;
+ }
+
+ switch ($mode)
+ {
+ case 'display':
+ if (!empty($cache))
+ {
+ $cache->unload();
+ }
+ $this->sql_close();
+
+ $mtime = explode(' ', microtime());
+ $totaltime = $mtime[0] + $mtime[1] - $starttime;
+
+ echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+ <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Style-Type" content="text/css" />
+ <meta http-equiv="imagetoolbar" content="no" />
+ <title>SQL Report</title>
+ <link href="' . $phpbb_root_path . 'adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+ </head>
+ <body id="errorpage">
+ <div id="wrap">
+ <div id="page-header">
+ <a href="' . build_url('explain') . '">Return to previous page</a>
+ </div>
+ <div id="page-body">
+ <div id="acp">
+ <div class="panel">
+ <span class="corners-top"><span></span></span>
+ <div id="content">
+ <h1>SQL Report</h1>
+ <br />
+ <p><b>Page generated in ' . round($totaltime, 4) . " seconds with {$this->num_queries['normal']} queries" . (($this->num_queries['cached']) ? " + {$this->num_queries['cached']} " . (($this->num_queries['cached'] == 1) ? 'query' : 'queries') . ' returning data from cache' : '') . '</b></p>
+
+ <p>Time spent on ' . $this->sql_layer . ' queries: <b>' . round($this->sql_time, 5) . 's</b> | Time spent on PHP: <b>' . round($totaltime - $this->sql_time, 5) . 's</b></p>
+
+ <br /><br />
+ ' . $this->sql_report . '
+ </div>
+ <span class="corners-bottom"><span></span></span>
+ </div>
+ </div>
+ </div>
+ <div id="page-footer">
+ Powered by phpBB &copy; 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>
+ </div>
+ </div>
+ </body>
+ </html>';
+
+ exit_handler();
+
+ break;
+
+ case 'stop':
+ $endtime = explode(' ', microtime());
+ $endtime = $endtime[0] + $endtime[1];
+
+ $this->sql_report .= '
+
+ <table cellspacing="1">
+ <thead>
+ <tr>
+ <th>Query #' . $this->num_queries['total'] . '</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="row3"><textarea style="font-family:\'Courier New\',monospace;width:99%" rows="5" cols="10">' . preg_replace('/\t(AND|OR)(\W)/', "\$1\$2", htmlspecialchars(preg_replace('/[\s]*[\n\r\t]+[\n\r\s\t]*/', "\n", $query))) . '</textarea></td>
+ </tr>
+ </tbody>
+ </table>
+
+ ' . $this->html_hold . '
+
+ <p style="text-align: center;">
+ ';
+
+ if ($this->query_result)
+ {
+ if (preg_match('/^(UPDATE|DELETE|REPLACE)/', $query))
+ {
+ $this->sql_report .= 'Affected rows: <b>' . $this->sql_affectedrows($this->query_result) . '</b> | ';
+ }
+ $this->sql_report .= 'Before: ' . sprintf('%.5f', $this->curtime - $starttime) . 's | After: ' . sprintf('%.5f', $endtime - $starttime) . 's | Elapsed: <b>' . sprintf('%.5f', $endtime - $this->curtime) . 's</b>';
+ }
+ else
+ {
+ $error = $this->sql_error();
+ $this->sql_report .= '<b style="color: red">FAILED</b> - ' . $this->sql_layer . ' Error ' . $error['code'] . ': ' . htmlspecialchars($error['message']);
+ }
+
+ $this->sql_report .= '</p><br /><br />';
+
+ $this->sql_time += $endtime - $this->curtime;
+ break;
+
+ case 'start':
+ $this->query_hold = $query;
+ $this->html_hold = '';
+
+ $this->_sql_report($mode, $query);
+
+ $this->curtime = explode(' ', microtime());
+ $this->curtime = $this->curtime[0] + $this->curtime[1];
+
+ break;
+
+ case 'add_select_row':
+
+ $html_table = func_get_arg(2);
+ $row = func_get_arg(3);
+
+ if (!$html_table && sizeof($row))
+ {
+ $html_table = true;
+ $this->html_hold .= '<table cellspacing="1"><tr>';
+
+ foreach (array_keys($row) as $val)
+ {
+ $this->html_hold .= '<th>' . (($val) ? ucwords(str_replace('_', ' ', $val)) : '&nbsp;') . '</th>';
+ }
+ $this->html_hold .= '</tr>';
+ }
+ $this->html_hold .= '<tr>';
+
+ $class = 'row1';
+ foreach (array_values($row) as $val)
+ {
+ $class = ($class == 'row1') ? 'row2' : 'row1';
+ $this->html_hold .= '<td class="' . $class . '">' . (($val) ? $val : '&nbsp;') . '</td>';
+ }
+ $this->html_hold .= '</tr>';
+
+ return $html_table;
+
+ break;
+
+ case 'fromcache':
+
+ $this->_sql_report($mode, $query);
+
+ break;
+
+ case 'record_fromcache':
+
+ $endtime = func_get_arg(2);
+ $splittime = func_get_arg(3);
+
+ $time_cache = $endtime - $this->curtime;
+ $time_db = $splittime - $endtime;
+ $color = ($time_db > $time_cache) ? 'green' : 'red';
+
+ $this->sql_report .= '<table cellspacing="1"><thead><tr><th>Query results obtained from the cache</th></tr></thead><tbody><tr>';
+ $this->sql_report .= '<td class="row3"><textarea style="font-family:\'Courier New\',monospace;width:99%" rows="5" cols="10">' . preg_replace('/\t(AND|OR)(\W)/', "\$1\$2", htmlspecialchars(preg_replace('/[\s]*[\n\r\t]+[\n\r\s\t]*/', "\n", $query))) . '</textarea></td></tr></tbody></table>';
+ $this->sql_report .= '<p style="text-align: center;">';
+ $this->sql_report .= 'Before: ' . sprintf('%.5f', $this->curtime - $starttime) . 's | After: ' . sprintf('%.5f', $endtime - $starttime) . 's | Elapsed [cache]: <b style="color: ' . $color . '">' . sprintf('%.5f', ($time_cache)) . 's</b> | Elapsed [db]: <b>' . sprintf('%.5f', $time_db) . 's</b></p><br /><br />';
+
+ // Pad the start time to not interfere with page timing
+ $starttime += $time_db;
+
+ break;
+
+ default:
+
+ $this->_sql_report($mode, $query);
+
+ break;
+ }
+
+ return true;
+ }
+}
+
+/**
+* This variable holds the class name to use later
+*/
+$sql_db = (!empty($dbms)) ? 'dbal_' . basename($dbms) : 'dbal';
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php
new file mode 100644
index 0000000000..fb1ef44c55
--- /dev/null
+++ b/phpBB/includes/db/firebird.php
@@ -0,0 +1,512 @@
+<?php
+/**
+*
+* @package dbal
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
+
+/**
+* Firebird/Interbase Database Abstraction Layer
+* Minimum Requirement is Firebird 2.1
+* @package dbal
+*/
+class dbal_firebird extends dbal
+{
+ var $last_query_text = '';
+ var $service_handle = false;
+ var $affected_rows = 0;
+
+ /**
+ * Connect to server
+ */
+ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
+ {
+ $this->persistency = $persistency;
+ $this->user = $sqluser;
+ $this->server = $sqlserver . (($port) ? ':' . $port : '');
+ $this->dbname = str_replace('\\', '/', $database);
+
+ // There are three possibilities to connect to an interbase db
+ if (!$this->server)
+ {
+ $use_database = $this->dbname;
+ }
+ else if (strpos($this->server, '//') === 0)
+ {
+ $use_database = $this->server . $this->dbname;
+ }
+ else
+ {
+ $use_database = $this->server . ':' . $this->dbname;
+ }
+
+ $this->db_connect_id = ($this->persistency) ? @ibase_pconnect($use_database, $this->user, $sqlpassword, false, false, 3) : @ibase_connect($use_database, $this->user, $sqlpassword, false, false, 3);
+
+ $this->service_handle = (function_exists('ibase_service_attach') && $this->server) ? @ibase_service_attach($this->server, $this->user, $sqlpassword) : false;
+
+ return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
+ }
+
+ /**
+ * Version information about used database
+ * @param bool $raw if true, only return the fetched sql_server_version
+ * @return string sql server version
+ */
+ function sql_server_info($raw = false)
+ {
+ if ($this->service_handle !== false && function_exists('ibase_server_info'))
+ {
+ return @ibase_server_info($this->service_handle, IBASE_SVC_SERVER_VERSION);
+ }
+
+ return ($raw) ? '2.1' : 'Firebird/Interbase';
+ }
+
+ /**
+ * SQL Transaction
+ * @access private
+ */
+ function _sql_transaction($status = 'begin')
+ {
+ switch ($status)
+ {
+ case 'begin':
+ return true;
+ break;
+
+ case 'commit':
+ return @ibase_commit();
+ break;
+
+ case 'rollback':
+ return @ibase_rollback();
+ break;
+ }
+
+ return true;
+ }
+
+ /**
+ * Base query method
+ *
+ * @param string $query Contains the SQL query which shall be executed
+ * @param int $cache_ttl Either 0 to avoid caching or the time in seconds which the result shall be kept in cache
+ * @return mixed When casted to bool the returned value returns true on success and false on failure
+ *
+ * @access public
+ */
+ function sql_query($query = '', $cache_ttl = 0)
+ {
+ if ($query != '')
+ {
+ global $cache;
+
+ // EXPLAIN only in extra debug mode
+ if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('start', $query);
+ }
+
+ $this->last_query_text = $query;
+ $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->sql_add_num_queries($this->query_result);
+
+ if ($this->query_result === false)
+ {
+ $array = array();
+ // We overcome Firebird's 32767 char limit by binding vars
+ if (strlen($query) > 32767)
+ {
+ if (preg_match('/^(INSERT INTO[^(]++)\\(([^()]+)\\) VALUES[^(]++\\((.*?)\\)$/s', $query, $regs))
+ {
+ if (strlen($regs[3]) > 32767)
+ {
+ preg_match_all('/\'(?:[^\']++|\'\')*+\'|[\d-.]+/', $regs[3], $vals, PREG_PATTERN_ORDER);
+
+ $inserts = $vals[0];
+ unset($vals);
+
+ foreach ($inserts as $key => $value)
+ {
+ if (!empty($value) && $value[0] === "'" && strlen($value) > 32769) // check to see if this thing is greater than the max + 'x2
+ {
+ $inserts[$key] = '?';
+ $array[] = str_replace("''", "'", substr($value, 1, -1));
+ }
+ }
+
+ $query = $regs[1] . '(' . $regs[2] . ') VALUES (' . implode(', ', $inserts) . ')';
+ }
+ }
+ else if (preg_match('/^(UPDATE ([\\w_]++)\\s+SET )([\\w_]++\\s*=\\s*(?:\'(?:[^\']++|\'\')*+\'|\\d+)(?:,\\s*[\\w_]++\\s*=\\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]+))*+)\\s+(WHERE.*)$/s', $query, $data))
+ {
+ if (strlen($data[3]) > 32767)
+ {
+ $update = $data[1];
+ $where = $data[4];
+ preg_match_all('/(\\w++)\\s*=\\s*(\'(?:[^\']++|\'\')*+\'|[\d-.]++)/', $data[3], $temp, PREG_SET_ORDER);
+ unset($data);
+
+ $cols = array();
+ foreach ($temp as $value)
+ {
+ if (!empty($value[2]) && $value[2][0] === "'" && strlen($value[2]) > 32769) // check to see if this thing is greater than the max + 'x2
+ {
+ $array[] = str_replace("''", "'", substr($value[2], 1, -1));
+ $cols[] = $value[1] . '=?';
+ }
+ else
+ {
+ $cols[] = $value[1] . '=' . $value[2];
+ }
+ }
+
+ $query = $update . implode(', ', $cols) . ' ' . $where;
+ unset($cols);
+ }
+ }
+ }
+
+ if (!function_exists('ibase_affected_rows') && (preg_match('/^UPDATE ([\w_]++)\s+SET [\w_]++\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]+)(?:,\s*[\w_]++\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]+))*+\s+(WHERE.*)?$/s', $query, $regs) || preg_match('/^DELETE FROM ([\w_]++)\s*(WHERE\s*.*)?$/s', $query, $regs)))
+ {
+ $affected_sql = 'SELECT COUNT(*) as num_rows_affected FROM ' . $regs[1];
+ if (!empty($regs[2]))
+ {
+ $affected_sql .= ' ' . $regs[2];
+ }
+
+ if (!($temp_q_id = @ibase_query($this->db_connect_id, $affected_sql)))
+ {
+ return false;
+ }
+
+ $temp_result = @ibase_fetch_assoc($temp_q_id);
+ @ibase_free_result($temp_q_id);
+
+ $this->affected_rows = ($temp_result) ? $temp_result['NUM_ROWS_AFFECTED'] : false;
+ }
+
+ if (sizeof($array))
+ {
+ $p_query = @ibase_prepare($this->db_connect_id, $query);
+ array_unshift($array, $p_query);
+ $this->query_result = call_user_func_array('ibase_execute', $array);
+ unset($array);
+
+ if ($this->query_result === false)
+ {
+ $this->sql_error($query);
+ }
+ }
+ else if (($this->query_result = @ibase_query($this->db_connect_id, $query)) === false)
+ {
+ $this->sql_error($query);
+ }
+
+ if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('stop', $query);
+ }
+
+ if (!$this->transaction)
+ {
+ if (function_exists('ibase_commit_ret'))
+ {
+ @ibase_commit_ret();
+ }
+ else
+ {
+ // way cooler than ibase_commit_ret :D
+ @ibase_query('COMMIT RETAIN;');
+ }
+ }
+
+ if ($cache_ttl && method_exists($cache, 'sql_save'))
+ {
+ $this->open_queries[(int) $this->query_result] = $this->query_result;
+ $cache->sql_save($query, $this->query_result, $cache_ttl);
+ }
+ else if (strpos($query, 'SELECT') === 0 && $this->query_result)
+ {
+ $this->open_queries[(int) $this->query_result] = $this->query_result;
+ }
+ }
+ else if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('fromcache', $query);
+ }
+ }
+ else
+ {
+ return false;
+ }
+
+ return $this->query_result;
+ }
+
+ /**
+ * Build LIMIT query
+ */
+ function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
+ {
+ $this->query_result = false;
+
+ $query = 'SELECT FIRST ' . $total . ((!empty($offset)) ? ' SKIP ' . $offset : '') . substr($query, 6);
+
+ return $this->sql_query($query, $cache_ttl);
+ }
+
+ /**
+ * Return number of affected rows
+ */
+ function sql_affectedrows()
+ {
+ // PHP 5+ function
+ if (function_exists('ibase_affected_rows'))
+ {
+ return ($this->db_connect_id) ? @ibase_affected_rows($this->db_connect_id) : false;
+ }
+ else
+ {
+ return $this->affected_rows;
+ }
+ }
+
+ /**
+ * Fetch current row
+ */
+ function sql_fetchrow($query_id = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_fetchrow($query_id);
+ }
+
+ if ($query_id === false)
+ {
+ return false;
+ }
+
+ $row = array();
+ $cur_row = @ibase_fetch_object($query_id, IBASE_TEXT);
+
+ if (!$cur_row)
+ {
+ return false;
+ }
+
+ foreach (get_object_vars($cur_row) as $key => $value)
+ {
+ $row[strtolower($key)] = (is_string($value)) ? trim(str_replace(array("\\0", "\\n"), array("\0", "\n"), $value)) : $value;
+ }
+
+ return (sizeof($row)) ? $row : false;
+ }
+
+ /**
+ * Seek to given row number
+ * rownum is zero-based
+ */
+ function sql_rowseek($rownum, &$query_id)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_rowseek($rownum, $query_id);
+ }
+
+ if ($query_id === false)
+ {
+ return;
+ }
+
+ $this->sql_freeresult($query_id);
+ $query_id = $this->sql_query($this->last_query_text);
+
+ if ($query_id === false)
+ {
+ return false;
+ }
+
+ // We do not fetch the row for rownum == 0 because then the next resultset would be the second row
+ for ($i = 0; $i < $rownum; $i++)
+ {
+ if (!$this->sql_fetchrow($query_id))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Get last inserted id after insert statement
+ */
+ function sql_nextid()
+ {
+ $query_id = $this->query_result;
+
+ if ($query_id !== false && $this->last_query_text != '')
+ {
+ if ($this->query_result && preg_match('#^INSERT[\t\n ]+INTO[\t\n ]+([a-z0-9\_\-]+)#i', $this->last_query_text, $tablename))
+ {
+ $sql = 'SELECT GEN_ID(' . $tablename[1] . '_gen, 0) AS new_id FROM RDB$DATABASE';
+
+ if (!($temp_q_id = @ibase_query($this->db_connect_id, $sql)))
+ {
+ return false;
+ }
+
+ $temp_result = @ibase_fetch_assoc($temp_q_id);
+ @ibase_free_result($temp_q_id);
+
+ return ($temp_result) ? $temp_result['NEW_ID'] : false;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Free sql result
+ */
+ function sql_freeresult($query_id = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_freeresult($query_id);
+ }
+
+ if (isset($this->open_queries[(int) $query_id]))
+ {
+ unset($this->open_queries[(int) $query_id]);
+ return @ibase_free_result($query_id);
+ }
+
+ return false;
+ }
+
+ /**
+ * Escape string used in sql query
+ */
+ function sql_escape($msg)
+ {
+ return str_replace(array("'", "\0"), array("''", ''), $msg);
+ }
+
+ /**
+ * Build LIKE expression
+ * @access private
+ */
+ function _sql_like_expression($expression)
+ {
+ return $expression . " ESCAPE '\\'";
+ }
+
+ /**
+ * Build db-specific query data
+ * @access private
+ */
+ function _sql_custom_build($stage, $data)
+ {
+ return $data;
+ }
+
+ function _sql_bit_and($column_name, $bit, $compare = '')
+ {
+ return 'BIN_AND(' . $column_name . ', ' . (1 << $bit) . ')' . (($compare) ? ' ' . $compare : '');
+ }
+
+ /**
+ * return sql error array
+ * @access private
+ */
+ function _sql_error()
+ {
+ return array(
+ 'message' => @ibase_errmsg(),
+ 'code' => (@function_exists('ibase_errcode') ? @ibase_errcode() : '')
+ );
+ }
+
+ /**
+ * Close sql connection
+ * @access private
+ */
+ function _sql_close()
+ {
+ if ($this->service_handle !== false)
+ {
+ @ibase_service_detach($this->service_handle);
+ }
+
+ return @ibase_close($this->db_connect_id);
+ }
+
+ /**
+ * Build db-specific report
+ * @access private
+ */
+ function _sql_report($mode, $query = '')
+ {
+ switch ($mode)
+ {
+ case 'start':
+ break;
+
+ case 'fromcache':
+ $endtime = explode(' ', microtime());
+ $endtime = $endtime[0] + $endtime[1];
+
+ $result = @ibase_query($this->db_connect_id, $query);
+ while ($void = @ibase_fetch_object($result, IBASE_TEXT))
+ {
+ // Take the time spent on parsing rows into account
+ }
+ @ibase_free_result($result);
+
+ $splittime = explode(' ', microtime());
+ $splittime = $splittime[0] + $splittime[1];
+
+ $this->sql_report('record_fromcache', $query, $endtime, $splittime);
+
+ break;
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/db/index.htm b/phpBB/includes/db/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/includes/db/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php
new file mode 100644
index 0000000000..7134574691
--- /dev/null
+++ b/phpBB/includes/db/mssql.php
@@ -0,0 +1,449 @@
+<?php
+/**
+*
+* @package dbal
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
+
+/**
+* MSSQL Database Abstraction Layer
+* Minimum Requirement is MSSQL 2000+
+* @package dbal
+*/
+class dbal_mssql extends dbal
+{
+ /**
+ * Connect to server
+ */
+ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
+ {
+ $this->persistency = $persistency;
+ $this->user = $sqluser;
+ $this->dbname = $database;
+
+ $port_delimiter = (defined('PHP_OS') && substr(PHP_OS, 0, 3) === 'WIN') ? ',' : ':';
+ $this->server = $sqlserver . (($port) ? $port_delimiter . $port : '');
+
+ @ini_set('mssql.charset', 'UTF-8');
+ @ini_set('mssql.textlimit', 2147483647);
+ @ini_set('mssql.textsize', 2147483647);
+
+ if (version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.1', '>=')))
+ {
+ $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mssql_connect($this->server, $this->user, $sqlpassword, $new_link);
+ }
+ else
+ {
+ $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword) : @mssql_connect($this->server, $this->user, $sqlpassword);
+ }
+
+ if ($this->db_connect_id && $this->dbname != '')
+ {
+ if (!@mssql_select_db($this->dbname, $this->db_connect_id))
+ {
+ @mssql_close($this->db_connect_id);
+ return false;
+ }
+ }
+
+ return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
+ }
+
+ /**
+ * Version information about used database
+ * @param bool $raw if true, only return the fetched sql_server_version
+ * @return string sql server version
+ */
+ function sql_server_info($raw = false)
+ {
+ global $cache;
+
+ if (empty($cache) || ($this->sql_server_version = $cache->get('mssql_version')) === false)
+ {
+ $result_id = @mssql_query("SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY('productlevel'), SERVERPROPERTY('edition')", $this->db_connect_id);
+
+ $row = false;
+ if ($result_id)
+ {
+ $row = @mssql_fetch_assoc($result_id);
+ @mssql_free_result($result_id);
+ }
+
+ $this->sql_server_version = ($row) ? trim(implode(' ', $row)) : 0;
+
+ if (!empty($cache))
+ {
+ $cache->put('mssql_version', $this->sql_server_version);
+ }
+ }
+
+ if ($raw)
+ {
+ return $this->sql_server_version;
+ }
+
+ return ($this->sql_server_version) ? 'MSSQL<br />' . $this->sql_server_version : 'MSSQL';
+ }
+
+ /**
+ * SQL Transaction
+ * @access private
+ */
+ function _sql_transaction($status = 'begin')
+ {
+ switch ($status)
+ {
+ case 'begin':
+ return @mssql_query('BEGIN TRANSACTION', $this->db_connect_id);
+ break;
+
+ case 'commit':
+ return @mssql_query('COMMIT TRANSACTION', $this->db_connect_id);
+ break;
+
+ case 'rollback':
+ return @mssql_query('ROLLBACK TRANSACTION', $this->db_connect_id);
+ break;
+ }
+
+ return true;
+ }
+
+ /**
+ * Base query method
+ *
+ * @param string $query Contains the SQL query which shall be executed
+ * @param int $cache_ttl Either 0 to avoid caching or the time in seconds which the result shall be kept in cache
+ * @return mixed When casted to bool the returned value returns true on success and false on failure
+ *
+ * @access public
+ */
+ function sql_query($query = '', $cache_ttl = 0)
+ {
+ if ($query != '')
+ {
+ global $cache;
+
+ // EXPLAIN only in extra debug mode
+ if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('start', $query);
+ }
+
+ $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->sql_add_num_queries($this->query_result);
+
+ if ($this->query_result === false)
+ {
+ if (($this->query_result = @mssql_query($query, $this->db_connect_id)) === false)
+ {
+ $this->sql_error($query);
+ }
+
+ if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('stop', $query);
+ }
+
+ if ($cache_ttl && method_exists($cache, 'sql_save'))
+ {
+ $this->open_queries[(int) $this->query_result] = $this->query_result;
+ $cache->sql_save($query, $this->query_result, $cache_ttl);
+ }
+ else if (strpos($query, 'SELECT') === 0 && $this->query_result)
+ {
+ $this->open_queries[(int) $this->query_result] = $this->query_result;
+ }
+ }
+ else if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('fromcache', $query);
+ }
+ }
+ else
+ {
+ return false;
+ }
+
+ return $this->query_result;
+ }
+
+ /**
+ * Build LIMIT query
+ */
+ function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
+ {
+ $this->query_result = false;
+
+ // Since TOP is only returning a set number of rows we won't need it if total is set to 0 (return all rows)
+ if ($total)
+ {
+ // We need to grab the total number of rows + the offset number of rows to get the correct result
+ if (strpos($query, 'SELECT DISTINCT') === 0)
+ {
+ $query = 'SELECT DISTINCT TOP ' . ($total + $offset) . ' ' . substr($query, 15);
+ }
+ else
+ {
+ $query = 'SELECT TOP ' . ($total + $offset) . ' ' . substr($query, 6);
+ }
+ }
+
+ $result = $this->sql_query($query, $cache_ttl);
+
+ // Seek by $offset rows
+ if ($offset)
+ {
+ $this->sql_rowseek($offset, $result);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Return number of affected rows
+ */
+ function sql_affectedrows()
+ {
+ return ($this->db_connect_id) ? @mssql_rows_affected($this->db_connect_id) : false;
+ }
+
+ /**
+ * Fetch current row
+ */
+ function sql_fetchrow($query_id = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_fetchrow($query_id);
+ }
+
+ if ($query_id === false)
+ {
+ return false;
+ }
+
+ $row = @mssql_fetch_assoc($query_id);
+
+ // I hope i am able to remove this later... hopefully only a PHP or MSSQL bug
+ if ($row)
+ {
+ foreach ($row as $key => $value)
+ {
+ $row[$key] = ($value === ' ' || $value === NULL) ? '' : $value;
+ }
+ }
+
+ return $row;
+ }
+
+ /**
+ * Seek to given row number
+ * rownum is zero-based
+ */
+ function sql_rowseek($rownum, &$query_id)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_rowseek($rownum, $query_id);
+ }
+
+ return ($query_id !== false) ? @mssql_data_seek($query_id, $rownum) : false;
+ }
+
+ /**
+ * Get last inserted id after insert statement
+ */
+ function sql_nextid()
+ {
+ $result_id = @mssql_query('SELECT SCOPE_IDENTITY()', $this->db_connect_id);
+ if ($result_id)
+ {
+ if ($row = @mssql_fetch_assoc($result_id))
+ {
+ @mssql_free_result($result_id);
+ return $row['computed'];
+ }
+ @mssql_free_result($result_id);
+ }
+
+ return false;
+ }
+
+ /**
+ * Free sql result
+ */
+ function sql_freeresult($query_id = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_freeresult($query_id);
+ }
+
+ if (isset($this->open_queries[$query_id]))
+ {
+ unset($this->open_queries[$query_id]);
+ return @mssql_free_result($query_id);
+ }
+
+ return false;
+ }
+
+ /**
+ * Escape string used in sql query
+ */
+ function sql_escape($msg)
+ {
+ return str_replace(array("'", "\0"), array("''", ''), $msg);
+ }
+
+ /**
+ * Build LIKE expression
+ * @access private
+ */
+ function _sql_like_expression($expression)
+ {
+ return $expression . " ESCAPE '\\'";
+ }
+
+ /**
+ * return sql error array
+ * @access private
+ */
+ function _sql_error()
+ {
+ $error = array(
+ 'message' => @mssql_get_last_message(),
+ 'code' => ''
+ );
+
+ // Get error code number
+ $result_id = @mssql_query('SELECT @@ERROR as code', $this->db_connect_id);
+ if ($result_id)
+ {
+ $row = @mssql_fetch_assoc($result_id);
+ $error['code'] = $row['code'];
+ @mssql_free_result($result_id);
+ }
+
+ // Get full error message if possible
+ $sql = 'SELECT CAST(description as varchar(255)) as message
+ FROM master.dbo.sysmessages
+ WHERE error = ' . $error['code'];
+ $result_id = @mssql_query($sql);
+
+ if ($result_id)
+ {
+ $row = @mssql_fetch_assoc($result_id);
+ if (!empty($row['message']))
+ {
+ $error['message'] .= '<br />' . $row['message'];
+ }
+ @mssql_free_result($result_id);
+ }
+
+ return $error;
+ }
+
+ /**
+ * Build db-specific query data
+ * @access private
+ */
+ function _sql_custom_build($stage, $data)
+ {
+ return $data;
+ }
+
+ /**
+ * Close sql connection
+ * @access private
+ */
+ function _sql_close()
+ {
+ return @mssql_close($this->db_connect_id);
+ }
+
+ /**
+ * Build db-specific report
+ * @access private
+ */
+ function _sql_report($mode, $query = '')
+ {
+ switch ($mode)
+ {
+ case 'start':
+ $html_table = false;
+ @mssql_query('SET SHOWPLAN_TEXT ON;', $this->db_connect_id);
+ if ($result = @mssql_query($query, $this->db_connect_id))
+ {
+ @mssql_next_result($result);
+ while ($row = @mssql_fetch_row($result))
+ {
+ $html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
+ }
+ }
+ @mssql_query('SET SHOWPLAN_TEXT OFF;', $this->db_connect_id);
+ @mssql_free_result($result);
+
+ if ($html_table)
+ {
+ $this->html_hold .= '</table>';
+ }
+ break;
+
+ case 'fromcache':
+ $endtime = explode(' ', microtime());
+ $endtime = $endtime[0] + $endtime[1];
+
+ $result = @mssql_query($query, $this->db_connect_id);
+ while ($void = @mssql_fetch_assoc($result))
+ {
+ // Take the time spent on parsing rows into account
+ }
+ @mssql_free_result($result);
+
+ $splittime = explode(' ', microtime());
+ $splittime = $splittime[0] + $splittime[1];
+
+ $this->sql_report('record_fromcache', $query, $endtime, $splittime);
+
+ break;
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/db/mssql_odbc.php b/phpBB/includes/db/mssql_odbc.php
new file mode 100644
index 0000000000..14c4831010
--- /dev/null
+++ b/phpBB/includes/db/mssql_odbc.php
@@ -0,0 +1,426 @@
+<?php
+/**
+*
+* @package dbal
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
+
+/**
+* Unified ODBC functions
+* Unified ODBC functions support any database having ODBC driver, for example Adabas D, IBM DB2, iODBC, Solid, Sybase SQL Anywhere...
+* Here we only support MSSQL Server 2000+ because of the provided schema
+*
+* @note number of bytes returned for returning data depends on odbc.defaultlrl php.ini setting.
+* If it is limited to 4K for example only 4K of data is returned max, resulting in incomplete theme data for example.
+* @note odbc.defaultbinmode may affect UTF8 characters
+*
+* @package dbal
+*/
+class dbal_mssql_odbc extends dbal
+{
+ var $last_query_text = '';
+
+ /**
+ * Connect to server
+ */
+ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
+ {
+ $this->persistency = $persistency;
+ $this->user = $sqluser;
+ $this->dbname = $database;
+
+ $port_delimiter = (defined('PHP_OS') && substr(PHP_OS, 0, 3) === 'WIN') ? ',' : ':';
+ $this->server = $sqlserver . (($port) ? $port_delimiter . $port : '');
+
+ $max_size = @ini_get('odbc.defaultlrl');
+ if (!empty($max_size))
+ {
+ $unit = strtolower(substr($max_size, -1, 1));
+ $max_size = (int) $max_size;
+
+ if ($unit == 'k')
+ {
+ $max_size = floor($max_size / 1024);
+ }
+ else if ($unit == 'g')
+ {
+ $max_size *= 1024;
+ }
+ else if (is_numeric($unit))
+ {
+ $max_size = floor((int) ($max_size . $unit) / 1048576);
+ }
+ $max_size = max(8, $max_size) . 'M';
+
+ @ini_set('odbc.defaultlrl', $max_size);
+ }
+
+ $this->db_connect_id = ($this->persistency) ? @odbc_pconnect($this->server, $this->user, $sqlpassword) : @odbc_connect($this->server, $this->user, $sqlpassword);
+
+ return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
+ }
+
+ /**
+ * Version information about used database
+ * @param bool $raw if true, only return the fetched sql_server_version
+ * @return string sql server version
+ */
+ function sql_server_info($raw = false)
+ {
+ global $cache;
+
+ if (empty($cache) || ($this->sql_server_version = $cache->get('mssqlodbc_version')) === false)
+ {
+ $result_id = @odbc_exec($this->db_connect_id, "SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY('productlevel'), SERVERPROPERTY('edition')");
+
+ $row = false;
+ if ($result_id)
+ {
+ $row = @odbc_fetch_array($result_id);
+ @odbc_free_result($result_id);
+ }
+
+ $this->sql_server_version = ($row) ? trim(implode(' ', $row)) : 0;
+
+ if (!empty($cache))
+ {
+ $cache->put('mssqlodbc_version', $this->sql_server_version);
+ }
+ }
+
+ if ($raw)
+ {
+ return $this->sql_server_version;
+ }
+
+ return ($this->sql_server_version) ? 'MSSQL (ODBC)<br />' . $this->sql_server_version : 'MSSQL (ODBC)';
+ }
+
+ /**
+ * SQL Transaction
+ * @access private
+ */
+ function _sql_transaction($status = 'begin')
+ {
+ switch ($status)
+ {
+ case 'begin':
+ return @odbc_exec($this->db_connect_id, 'BEGIN TRANSACTION');
+ break;
+
+ case 'commit':
+ return @odbc_exec($this->db_connect_id, 'COMMIT TRANSACTION');
+ break;
+
+ case 'rollback':
+ return @odbc_exec($this->db_connect_id, 'ROLLBACK TRANSACTION');
+ break;
+ }
+
+ return true;
+ }
+
+ /**
+ * Base query method
+ *
+ * @param string $query Contains the SQL query which shall be executed
+ * @param int $cache_ttl Either 0 to avoid caching or the time in seconds which the result shall be kept in cache
+ * @return mixed When casted to bool the returned value returns true on success and false on failure
+ *
+ * @access public
+ */
+ function sql_query($query = '', $cache_ttl = 0)
+ {
+ if ($query != '')
+ {
+ global $cache;
+
+ // EXPLAIN only in extra debug mode
+ if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('start', $query);
+ }
+
+ $this->last_query_text = $query;
+ $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->sql_add_num_queries($this->query_result);
+
+ if ($this->query_result === false)
+ {
+ if (($this->query_result = @odbc_exec($this->db_connect_id, $query)) === false)
+ {
+ $this->sql_error($query);
+ }
+
+ if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('stop', $query);
+ }
+
+ if ($cache_ttl && method_exists($cache, 'sql_save'))
+ {
+ $this->open_queries[(int) $this->query_result] = $this->query_result;
+ $cache->sql_save($query, $this->query_result, $cache_ttl);
+ }
+ else if (strpos($query, 'SELECT') === 0 && $this->query_result)
+ {
+ $this->open_queries[(int) $this->query_result] = $this->query_result;
+ }
+ }
+ else if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('fromcache', $query);
+ }
+ }
+ else
+ {
+ return false;
+ }
+
+ return $this->query_result;
+ }
+
+ /**
+ * Build LIMIT query
+ */
+ function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
+ {
+ $this->query_result = false;
+
+ // Since TOP is only returning a set number of rows we won't need it if total is set to 0 (return all rows)
+ if ($total)
+ {
+ // We need to grab the total number of rows + the offset number of rows to get the correct result
+ if (strpos($query, 'SELECT DISTINCT') === 0)
+ {
+ $query = 'SELECT DISTINCT TOP ' . ($total + $offset) . ' ' . substr($query, 15);
+ }
+ else
+ {
+ $query = 'SELECT TOP ' . ($total + $offset) . ' ' . substr($query, 6);
+ }
+ }
+
+ $result = $this->sql_query($query, $cache_ttl);
+
+ // Seek by $offset rows
+ if ($offset)
+ {
+ $this->sql_rowseek($offset, $result);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Return number of affected rows
+ */
+ function sql_affectedrows()
+ {
+ return ($this->db_connect_id) ? @odbc_num_rows($this->query_result) : false;
+ }
+
+ /**
+ * Fetch current row
+ * @note number of bytes returned depends on odbc.defaultlrl php.ini setting. If it is limited to 4K for example only 4K of data is returned max.
+ */
+ function sql_fetchrow($query_id = false, $debug = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_fetchrow($query_id);
+ }
+
+ return ($query_id !== false) ? @odbc_fetch_array($query_id) : false;
+ }
+
+ /**
+ * Seek to given row number
+ * rownum is zero-based
+ */
+ function sql_rowseek($rownum, &$query_id)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_rowseek($rownum, $query_id);
+ }
+
+ if ($query_id === false)
+ {
+ return false;
+ }
+
+ $this->sql_freeresult($query_id);
+ $query_id = $this->sql_query($this->last_query_text);
+
+ if ($query_id === false)
+ {
+ return false;
+ }
+
+ // We do not fetch the row for rownum == 0 because then the next resultset would be the second row
+ for ($i = 0; $i < $rownum; $i++)
+ {
+ if (!$this->sql_fetchrow($query_id))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Get last inserted id after insert statement
+ */
+ function sql_nextid()
+ {
+ $result_id = @odbc_exec($this->db_connect_id, 'SELECT @@IDENTITY');
+
+ if ($result_id)
+ {
+ if (@odbc_fetch_array($result_id))
+ {
+ $id = @odbc_result($result_id, 1);
+ @odbc_free_result($result_id);
+ return $id;
+ }
+ @odbc_free_result($result_id);
+ }
+
+ return false;
+ }
+
+ /**
+ * Free sql result
+ */
+ function sql_freeresult($query_id = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_freeresult($query_id);
+ }
+
+ if (isset($this->open_queries[(int) $query_id]))
+ {
+ unset($this->open_queries[(int) $query_id]);
+ return @odbc_free_result($query_id);
+ }
+
+ return false;
+ }
+
+ /**
+ * Escape string used in sql query
+ */
+ function sql_escape($msg)
+ {
+ return str_replace(array("'", "\0"), array("''", ''), $msg);
+ }
+
+ /**
+ * Build LIKE expression
+ * @access private
+ */
+ function _sql_like_expression($expression)
+ {
+ return $expression . " ESCAPE '\\'";
+ }
+
+ /**
+ * Build db-specific query data
+ * @access private
+ */
+ function _sql_custom_build($stage, $data)
+ {
+ return $data;
+ }
+
+ /**
+ * return sql error array
+ * @access private
+ */
+ function _sql_error()
+ {
+ return array(
+ 'message' => @odbc_errormsg(),
+ 'code' => @odbc_error()
+ );
+ }
+
+ /**
+ * Close sql connection
+ * @access private
+ */
+ function _sql_close()
+ {
+ return @odbc_close($this->db_connect_id);
+ }
+
+ /**
+ * Build db-specific report
+ * @access private
+ */
+ function _sql_report($mode, $query = '')
+ {
+ switch ($mode)
+ {
+ case 'start':
+ break;
+
+ case 'fromcache':
+ $endtime = explode(' ', microtime());
+ $endtime = $endtime[0] + $endtime[1];
+
+ $result = @odbc_exec($this->db_connect_id, $query);
+ while ($void = @odbc_fetch_array($result))
+ {
+ // Take the time spent on parsing rows into account
+ }
+ @odbc_free_result($result);
+
+ $splittime = explode(' ', microtime());
+ $splittime = $splittime[0] + $splittime[1];
+
+ $this->sql_report('record_fromcache', $query, $endtime, $splittime);
+
+ break;
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php
new file mode 100644
index 0000000000..c03b38708c
--- /dev/null
+++ b/phpBB/includes/db/mysql.php
@@ -0,0 +1,491 @@
+<?php
+/**
+*
+* @package dbal
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
+
+/**
+* MySQL4 Database Abstraction Layer
+* Compatible with:
+* MySQL 3.23+
+* MySQL 4.0+
+* MySQL 4.1+
+* MySQL 5.0+
+* @package dbal
+*/
+class dbal_mysql extends dbal
+{
+ var $multi_insert = true;
+
+ /**
+ * Connect to server
+ * @access public
+ */
+ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
+ {
+ $this->persistency = $persistency;
+ $this->user = $sqluser;
+ $this->server = $sqlserver . (($port) ? ':' . $port : '');
+ $this->dbname = $database;
+
+ $this->sql_layer = 'mysql4';
+
+ $this->db_connect_id = ($this->persistency) ? @mysql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mysql_connect($this->server, $this->user, $sqlpassword, $new_link);
+
+ if ($this->db_connect_id && $this->dbname != '')
+ {
+ if (@mysql_select_db($this->dbname, $this->db_connect_id))
+ {
+ // Determine what version we are using and if it natively supports UNICODE
+ if (version_compare($this->sql_server_info(true), '4.1.0', '>='))
+ {
+ @mysql_query("SET NAMES 'utf8'", $this->db_connect_id);
+
+ // enforce strict mode on databases that support it
+ if (version_compare($this->sql_server_info(true), '5.0.2', '>='))
+ {
+ $result = @mysql_query('SELECT @@session.sql_mode AS sql_mode', $this->db_connect_id);
+ $row = @mysql_fetch_assoc($result);
+ @mysql_free_result($result);
+ $modes = array_map('trim', explode(',', $row['sql_mode']));
+
+ // TRADITIONAL includes STRICT_ALL_TABLES and STRICT_TRANS_TABLES
+ if (!in_array('TRADITIONAL', $modes))
+ {
+ if (!in_array('STRICT_ALL_TABLES', $modes))
+ {
+ $modes[] = 'STRICT_ALL_TABLES';
+ }
+
+ if (!in_array('STRICT_TRANS_TABLES', $modes))
+ {
+ $modes[] = 'STRICT_TRANS_TABLES';
+ }
+ }
+
+ $mode = implode(',', $modes);
+ @mysql_query("SET SESSION sql_mode='{$mode}'", $this->db_connect_id);
+ }
+ }
+ else if (version_compare($this->sql_server_info(true), '4.0.0', '<'))
+ {
+ $this->sql_layer = 'mysql';
+ }
+
+ return $this->db_connect_id;
+ }
+ }
+
+ return $this->sql_error('');
+ }
+
+ /**
+ * Version information about used database
+ * @param bool $raw if true, only return the fetched sql_server_version
+ * @return string sql server version
+ */
+ function sql_server_info($raw = false)
+ {
+ global $cache;
+
+ if (empty($cache) || ($this->sql_server_version = $cache->get('mysql_version')) === false)
+ {
+ $result = @mysql_query('SELECT VERSION() AS version', $this->db_connect_id);
+ $row = @mysql_fetch_assoc($result);
+ @mysql_free_result($result);
+
+ $this->sql_server_version = $row['version'];
+
+ if (!empty($cache))
+ {
+ $cache->put('mysql_version', $this->sql_server_version);
+ }
+ }
+
+ return ($raw) ? $this->sql_server_version : 'MySQL ' . $this->sql_server_version;
+ }
+
+ /**
+ * SQL Transaction
+ * @access private
+ */
+ function _sql_transaction($status = 'begin')
+ {
+ switch ($status)
+ {
+ case 'begin':
+ return @mysql_query('BEGIN', $this->db_connect_id);
+ break;
+
+ case 'commit':
+ return @mysql_query('COMMIT', $this->db_connect_id);
+ break;
+
+ case 'rollback':
+ return @mysql_query('ROLLBACK', $this->db_connect_id);
+ break;
+ }
+
+ return true;
+ }
+
+ /**
+ * Base query method
+ *
+ * @param string $query Contains the SQL query which shall be executed
+ * @param int $cache_ttl Either 0 to avoid caching or the time in seconds which the result shall be kept in cache
+ * @return mixed When casted to bool the returned value returns true on success and false on failure
+ *
+ * @access public
+ */
+ function sql_query($query = '', $cache_ttl = 0)
+ {
+ if ($query != '')
+ {
+ global $cache;
+
+ // EXPLAIN only in extra debug mode
+ if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('start', $query);
+ }
+
+ $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->sql_add_num_queries($this->query_result);
+
+ if ($this->query_result === false)
+ {
+ if (($this->query_result = @mysql_query($query, $this->db_connect_id)) === false)
+ {
+ $this->sql_error($query);
+ }
+
+ if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('stop', $query);
+ }
+
+ if ($cache_ttl && method_exists($cache, 'sql_save'))
+ {
+ $this->open_queries[(int) $this->query_result] = $this->query_result;
+ $cache->sql_save($query, $this->query_result, $cache_ttl);
+ }
+ else if (strpos($query, 'SELECT') === 0 && $this->query_result)
+ {
+ $this->open_queries[(int) $this->query_result] = $this->query_result;
+ }
+ }
+ else if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('fromcache', $query);
+ }
+ }
+ else
+ {
+ return false;
+ }
+
+ return $this->query_result;
+ }
+
+ /**
+ * Build LIMIT query
+ */
+ function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
+ {
+ $this->query_result = false;
+
+ // if $total is set to 0 we do not want to limit the number of rows
+ if ($total == 0)
+ {
+ // Having a value of -1 was always a bug
+ $total = '18446744073709551615';
+ }
+
+ $query .= "\n LIMIT " . ((!empty($offset)) ? $offset . ', ' . $total : $total);
+
+ return $this->sql_query($query, $cache_ttl);
+ }
+
+ /**
+ * Return number of affected rows
+ */
+ function sql_affectedrows()
+ {
+ return ($this->db_connect_id) ? @mysql_affected_rows($this->db_connect_id) : false;
+ }
+
+ /**
+ * Fetch current row
+ */
+ function sql_fetchrow($query_id = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_fetchrow($query_id);
+ }
+
+ return ($query_id !== false) ? @mysql_fetch_assoc($query_id) : false;
+ }
+
+ /**
+ * Seek to given row number
+ * rownum is zero-based
+ */
+ function sql_rowseek($rownum, &$query_id)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_rowseek($rownum, $query_id);
+ }
+
+ return ($query_id !== false) ? @mysql_data_seek($query_id, $rownum) : false;
+ }
+
+ /**
+ * Get last inserted id after insert statement
+ */
+ function sql_nextid()
+ {
+ return ($this->db_connect_id) ? @mysql_insert_id($this->db_connect_id) : false;
+ }
+
+ /**
+ * Free sql result
+ */
+ function sql_freeresult($query_id = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_freeresult($query_id);
+ }
+
+ if (isset($this->open_queries[(int) $query_id]))
+ {
+ unset($this->open_queries[(int) $query_id]);
+ return @mysql_free_result($query_id);
+ }
+
+ return false;
+ }
+
+ /**
+ * Escape string used in sql query
+ */
+ function sql_escape($msg)
+ {
+ if (!$this->db_connect_id)
+ {
+ return @mysql_real_escape_string($msg);
+ }
+
+ return @mysql_real_escape_string($msg, $this->db_connect_id);
+ }
+
+ /**
+ * Build LIKE expression
+ * @access private
+ */
+ function _sql_like_expression($expression)
+ {
+ return $expression;
+ }
+
+ /**
+ * Build db-specific query data
+ * @access private
+ */
+ function _sql_custom_build($stage, $data)
+ {
+ switch ($stage)
+ {
+ case 'FROM':
+ $data = '(' . $data . ')';
+ break;
+ }
+
+ return $data;
+ }
+
+ /**
+ * return sql error array
+ * @access private
+ */
+ function _sql_error()
+ {
+ if (!$this->db_connect_id)
+ {
+ return array(
+ 'message' => @mysql_error(),
+ 'code' => @mysql_errno()
+ );
+ }
+
+ return array(
+ 'message' => @mysql_error($this->db_connect_id),
+ 'code' => @mysql_errno($this->db_connect_id)
+ );
+ }
+
+ /**
+ * Close sql connection
+ * @access private
+ */
+ function _sql_close()
+ {
+ return @mysql_close($this->db_connect_id);
+ }
+
+ /**
+ * Build db-specific report
+ * @access private
+ */
+ function _sql_report($mode, $query = '')
+ {
+ static $test_prof;
+
+ // current detection method, might just switch to see the existance of INFORMATION_SCHEMA.PROFILING
+ if ($test_prof === null)
+ {
+ $test_prof = false;
+ if (version_compare($this->sql_server_info(true), '5.0.37', '>=') && version_compare($this->sql_server_info(true), '5.1', '<'))
+ {
+ $test_prof = true;
+ }
+ }
+
+ switch ($mode)
+ {
+ case 'start':
+
+ $explain_query = $query;
+ if (preg_match('/UPDATE ([a-z0-9_]+).*?WHERE(.*)/s', $query, $m))
+ {
+ $explain_query = 'SELECT * FROM ' . $m[1] . ' WHERE ' . $m[2];
+ }
+ else if (preg_match('/DELETE FROM ([a-z0-9_]+).*?WHERE(.*)/s', $query, $m))
+ {
+ $explain_query = 'SELECT * FROM ' . $m[1] . ' WHERE ' . $m[2];
+ }
+
+ if (preg_match('/^SELECT/', $explain_query))
+ {
+ $html_table = false;
+
+ // begin profiling
+ if ($test_prof)
+ {
+ @mysql_query('SET profiling = 1;', $this->db_connect_id);
+ }
+
+ if ($result = @mysql_query("EXPLAIN $explain_query", $this->db_connect_id))
+ {
+ while ($row = @mysql_fetch_assoc($result))
+ {
+ $html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
+ }
+ }
+ @mysql_free_result($result);
+
+ if ($html_table)
+ {
+ $this->html_hold .= '</table>';
+ }
+
+ if ($test_prof)
+ {
+ $html_table = false;
+
+ // get the last profile
+ if ($result = @mysql_query('SHOW PROFILE ALL;', $this->db_connect_id))
+ {
+ $this->html_hold .= '<br />';
+ while ($row = @mysql_fetch_assoc($result))
+ {
+ // make <unknown> HTML safe
+ if (!empty($row['Source_function']))
+ {
+ $row['Source_function'] = str_replace(array('<', '>'), array('&lt;', '&gt;'), $row['Source_function']);
+ }
+
+ // remove unsupported features
+ foreach ($row as $key => $val)
+ {
+ if ($val === null)
+ {
+ unset($row[$key]);
+ }
+ }
+ $html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
+ }
+ }
+ @mysql_free_result($result);
+
+ if ($html_table)
+ {
+ $this->html_hold .= '</table>';
+ }
+
+ @mysql_query('SET profiling = 0;', $this->db_connect_id);
+ }
+ }
+
+ break;
+
+ case 'fromcache':
+ $endtime = explode(' ', microtime());
+ $endtime = $endtime[0] + $endtime[1];
+
+ $result = @mysql_query($query, $this->db_connect_id);
+ while ($void = @mysql_fetch_assoc($result))
+ {
+ // Take the time spent on parsing rows into account
+ }
+ @mysql_free_result($result);
+
+ $splittime = explode(' ', microtime());
+ $splittime = $splittime[0] + $splittime[1];
+
+ $this->sql_report('record_fromcache', $query, $endtime, $splittime);
+
+ break;
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/mysqli.php
new file mode 100644
index 0000000000..f0e58fd148
--- /dev/null
+++ b/phpBB/includes/db/mysqli.php
@@ -0,0 +1,468 @@
+<?php
+/**
+*
+* @package dbal
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
+
+/**
+* MySQLi Database Abstraction Layer
+* mysqli-extension has to be compiled with:
+* MySQL 4.1+ or MySQL 5.0+
+* @package dbal
+*/
+class dbal_mysqli extends dbal
+{
+ var $multi_insert = true;
+
+ /**
+ * Connect to server
+ */
+ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false , $new_link = false)
+ {
+ $this->persistency = $persistency;
+ $this->user = $sqluser;
+ $this->server = $sqlserver;
+ $this->dbname = $database;
+ $port = (!$port) ? NULL : $port;
+
+ // Persistant connections not supported by the mysqli extension?
+ $this->db_connect_id = @mysqli_connect($this->server, $this->user, $sqlpassword, $this->dbname, $port);
+
+ if ($this->db_connect_id && $this->dbname != '')
+ {
+ @mysqli_query($this->db_connect_id, "SET NAMES 'utf8'");
+
+ // enforce strict mode on databases that support it
+ if (version_compare($this->sql_server_info(true), '5.0.2', '>='))
+ {
+ $result = @mysqli_query($this->db_connect_id, 'SELECT @@session.sql_mode AS sql_mode');
+ $row = @mysqli_fetch_assoc($result);
+ @mysqli_free_result($result);
+
+ $modes = array_map('trim', explode(',', $row['sql_mode']));
+
+ // TRADITIONAL includes STRICT_ALL_TABLES and STRICT_TRANS_TABLES
+ if (!in_array('TRADITIONAL', $modes))
+ {
+ if (!in_array('STRICT_ALL_TABLES', $modes))
+ {
+ $modes[] = 'STRICT_ALL_TABLES';
+ }
+
+ if (!in_array('STRICT_TRANS_TABLES', $modes))
+ {
+ $modes[] = 'STRICT_TRANS_TABLES';
+ }
+ }
+
+ $mode = implode(',', $modes);
+ @mysqli_query($this->db_connect_id, "SET SESSION sql_mode='{$mode}'");
+ }
+ return $this->db_connect_id;
+ }
+
+ return $this->sql_error('');
+ }
+
+ /**
+ * Version information about used database
+ * @param bool $raw if true, only return the fetched sql_server_version
+ * @return string sql server version
+ */
+ function sql_server_info($raw = false)
+ {
+ global $cache;
+
+ if (empty($cache) || ($this->sql_server_version = $cache->get('mysqli_version')) === false)
+ {
+ $result = @mysqli_query($this->db_connect_id, 'SELECT VERSION() AS version');
+ $row = @mysqli_fetch_assoc($result);
+ @mysqli_free_result($result);
+
+ $this->sql_server_version = $row['version'];
+
+ if (!empty($cache))
+ {
+ $cache->put('mysqli_version', $this->sql_server_version);
+ }
+ }
+
+ return ($raw) ? $this->sql_server_version : 'MySQL(i) ' . $this->sql_server_version;
+ }
+
+ /**
+ * SQL Transaction
+ * @access private
+ */
+ function _sql_transaction($status = 'begin')
+ {
+ switch ($status)
+ {
+ case 'begin':
+ return @mysqli_autocommit($this->db_connect_id, false);
+ break;
+
+ case 'commit':
+ $result = @mysqli_commit($this->db_connect_id);
+ @mysqli_autocommit($this->db_connect_id, true);
+ return $result;
+ break;
+
+ case 'rollback':
+ $result = @mysqli_rollback($this->db_connect_id);
+ @mysqli_autocommit($this->db_connect_id, true);
+ return $result;
+ break;
+ }
+
+ return true;
+ }
+
+ /**
+ * Base query method
+ *
+ * @param string $query Contains the SQL query which shall be executed
+ * @param int $cache_ttl Either 0 to avoid caching or the time in seconds which the result shall be kept in cache
+ * @return mixed When casted to bool the returned value returns true on success and false on failure
+ *
+ * @access public
+ */
+ function sql_query($query = '', $cache_ttl = 0)
+ {
+ if ($query != '')
+ {
+ global $cache;
+
+ // EXPLAIN only in extra debug mode
+ if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('start', $query);
+ }
+
+ $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->sql_add_num_queries($this->query_result);
+
+ if ($this->query_result === false)
+ {
+ if (($this->query_result = @mysqli_query($this->db_connect_id, $query)) === false)
+ {
+ $this->sql_error($query);
+ }
+
+ if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('stop', $query);
+ }
+
+ if ($cache_ttl && method_exists($cache, 'sql_save'))
+ {
+ $cache->sql_save($query, $this->query_result, $cache_ttl);
+ }
+ }
+ else if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('fromcache', $query);
+ }
+ }
+ else
+ {
+ return false;
+ }
+
+ return $this->query_result;
+ }
+
+ /**
+ * Build LIMIT query
+ */
+ function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
+ {
+ $this->query_result = false;
+
+ // if $total is set to 0 we do not want to limit the number of rows
+ if ($total == 0)
+ {
+ // MySQL 4.1+ no longer supports -1 in limit queries
+ $total = '18446744073709551615';
+ }
+
+ $query .= "\n LIMIT " . ((!empty($offset)) ? $offset . ', ' . $total : $total);
+
+ return $this->sql_query($query, $cache_ttl);
+ }
+
+ /**
+ * Return number of affected rows
+ */
+ function sql_affectedrows()
+ {
+ return ($this->db_connect_id) ? @mysqli_affected_rows($this->db_connect_id) : false;
+ }
+
+ /**
+ * Fetch current row
+ */
+ function sql_fetchrow($query_id = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (!is_object($query_id) && isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_fetchrow($query_id);
+ }
+
+ return ($query_id !== false) ? @mysqli_fetch_assoc($query_id) : false;
+ }
+
+ /**
+ * Seek to given row number
+ * rownum is zero-based
+ */
+ function sql_rowseek($rownum, &$query_id)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (!is_object($query_id) && isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_rowseek($rownum, $query_id);
+ }
+
+ return ($query_id !== false) ? @mysqli_data_seek($query_id, $rownum) : false;
+ }
+
+ /**
+ * Get last inserted id after insert statement
+ */
+ function sql_nextid()
+ {
+ return ($this->db_connect_id) ? @mysqli_insert_id($this->db_connect_id) : false;
+ }
+
+ /**
+ * Free sql result
+ */
+ function sql_freeresult($query_id = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (!is_object($query_id) && isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_freeresult($query_id);
+ }
+
+ return @mysqli_free_result($query_id);
+ }
+
+ /**
+ * Escape string used in sql query
+ */
+ function sql_escape($msg)
+ {
+ return @mysqli_real_escape_string($this->db_connect_id, $msg);
+ }
+
+ /**
+ * Build LIKE expression
+ * @access private
+ */
+ function _sql_like_expression($expression)
+ {
+ return $expression;
+ }
+
+ /**
+ * Build db-specific query data
+ * @access private
+ */
+ function _sql_custom_build($stage, $data)
+ {
+ switch ($stage)
+ {
+ case 'FROM':
+ $data = '(' . $data . ')';
+ break;
+ }
+
+ return $data;
+ }
+
+ /**
+ * return sql error array
+ * @access private
+ */
+ function _sql_error()
+ {
+ if (!$this->db_connect_id)
+ {
+ return array(
+ 'message' => @mysqli_connect_error(),
+ 'code' => @mysqli_connect_errno()
+ );
+ }
+
+ return array(
+ 'message' => @mysqli_error($this->db_connect_id),
+ 'code' => @mysqli_errno($this->db_connect_id)
+ );
+ }
+
+ /**
+ * Close sql connection
+ * @access private
+ */
+ function _sql_close()
+ {
+ return @mysqli_close($this->db_connect_id);
+ }
+
+ /**
+ * Build db-specific report
+ * @access private
+ */
+ function _sql_report($mode, $query = '')
+ {
+ static $test_prof;
+
+ // current detection method, might just switch to see the existance of INFORMATION_SCHEMA.PROFILING
+ if ($test_prof === null)
+ {
+ $test_prof = false;
+ if (strpos(mysqli_get_server_info($this->db_connect_id), 'community') !== false)
+ {
+ $ver = mysqli_get_server_version($this->db_connect_id);
+ if ($ver >= 50037 && $ver < 50100)
+ {
+ $test_prof = true;
+ }
+ }
+ }
+
+ switch ($mode)
+ {
+ case 'start':
+
+ $explain_query = $query;
+ if (preg_match('/UPDATE ([a-z0-9_]+).*?WHERE(.*)/s', $query, $m))
+ {
+ $explain_query = 'SELECT * FROM ' . $m[1] . ' WHERE ' . $m[2];
+ }
+ else if (preg_match('/DELETE FROM ([a-z0-9_]+).*?WHERE(.*)/s', $query, $m))
+ {
+ $explain_query = 'SELECT * FROM ' . $m[1] . ' WHERE ' . $m[2];
+ }
+
+ if (preg_match('/^SELECT/', $explain_query))
+ {
+ $html_table = false;
+
+ // begin profiling
+ if ($test_prof)
+ {
+ @mysqli_query($this->db_connect_id, 'SET profiling = 1;');
+ }
+
+ if ($result = @mysqli_query($this->db_connect_id, "EXPLAIN $explain_query"))
+ {
+ while ($row = @mysqli_fetch_assoc($result))
+ {
+ $html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
+ }
+ }
+ @mysqli_free_result($result);
+
+ if ($html_table)
+ {
+ $this->html_hold .= '</table>';
+ }
+
+ if ($test_prof)
+ {
+ $html_table = false;
+
+ // get the last profile
+ if ($result = @mysqli_query($this->db_connect_id, 'SHOW PROFILE ALL;'))
+ {
+ $this->html_hold .= '<br />';
+ while ($row = @mysqli_fetch_assoc($result))
+ {
+ // make <unknown> HTML safe
+ if (!empty($row['Source_function']))
+ {
+ $row['Source_function'] = str_replace(array('<', '>'), array('&lt;', '&gt;'), $row['Source_function']);
+ }
+
+ // remove unsupported features
+ foreach ($row as $key => $val)
+ {
+ if ($val === null)
+ {
+ unset($row[$key]);
+ }
+ }
+ $html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
+ }
+ }
+ @mysqli_free_result($result);
+
+ if ($html_table)
+ {
+ $this->html_hold .= '</table>';
+ }
+
+ @mysqli_query($this->db_connect_id, 'SET profiling = 0;');
+ }
+ }
+
+ break;
+
+ case 'fromcache':
+ $endtime = explode(' ', microtime());
+ $endtime = $endtime[0] + $endtime[1];
+
+ $result = @mysqli_query($this->db_connect_id, $query);
+ while ($void = @mysqli_fetch_assoc($result))
+ {
+ // Take the time spent on parsing rows into account
+ }
+ @mysqli_free_result($result);
+
+ $splittime = explode(' ', microtime());
+ $splittime = $splittime[0] + $splittime[1];
+
+ $this->sql_report('record_fromcache', $query, $endtime, $splittime);
+
+ break;
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php
new file mode 100644
index 0000000000..f7180029b5
--- /dev/null
+++ b/phpBB/includes/db/oracle.php
@@ -0,0 +1,752 @@
+<?php
+/**
+*
+* @package dbal
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
+
+/**
+* Oracle Database Abstraction Layer
+* @package dbal
+*/
+class dbal_oracle extends dbal
+{
+ var $last_query_text = '';
+
+ /**
+ * Connect to server
+ */
+ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
+ {
+ $this->persistency = $persistency;
+ $this->user = $sqluser;
+ $this->server = $sqlserver . (($port) ? ':' . $port : '');
+ $this->dbname = $database;
+
+ $connect = $database;
+
+ // support for "easy connect naming"
+ if ($sqlserver !== '' && $sqlserver !== '/')
+ {
+ if (substr($sqlserver, -1, 1) == '/')
+ {
+ $sqlserver == substr($sqlserver, 0, -1);
+ }
+ $connect = $sqlserver . (($port) ? ':' . $port : '') . '/' . $database;
+ }
+
+ $this->db_connect_id = ($new_link) ? @ocinlogon($this->user, $sqlpassword, $connect, 'UTF8') : (($this->persistency) ? @ociplogon($this->user, $sqlpassword, $connect, 'UTF8') : @ocilogon($this->user, $sqlpassword, $connect, 'UTF8'));
+
+ return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
+ }
+
+ /**
+ * Version information about used database
+ * @param bool $raw if true, only return the fetched sql_server_version
+ * @return string sql server version
+ */
+ function sql_server_info($raw = false)
+ {
+/*
+ global $cache;
+
+ if (empty($cache) || ($this->sql_server_version = $cache->get('oracle_version')) === false)
+ {
+ $result = @ociparse($this->db_connect_id, 'SELECT * FROM v$version WHERE banner LIKE \'Oracle%\'');
+ @ociexecute($result, OCI_DEFAULT);
+ @ocicommit($this->db_connect_id);
+
+ $row = array();
+ @ocifetchinto($result, $row, OCI_ASSOC + OCI_RETURN_NULLS);
+ @ocifreestatement($result);
+ $this->sql_server_version = trim($row['BANNER']);
+
+ $cache->put('oracle_version', $this->sql_server_version);
+ }
+*/
+ $this->sql_server_version = @ociserverversion($this->db_connect_id);
+
+ return $this->sql_server_version;
+ }
+
+ /**
+ * SQL Transaction
+ * @access private
+ */
+ function _sql_transaction($status = 'begin')
+ {
+ switch ($status)
+ {
+ case 'begin':
+ return true;
+ break;
+
+ case 'commit':
+ return @ocicommit($this->db_connect_id);
+ break;
+
+ case 'rollback':
+ return @ocirollback($this->db_connect_id);
+ break;
+ }
+
+ return true;
+ }
+
+ /**
+ * Oracle specific code to handle the fact that it does not compare columns properly
+ * @access private
+ */
+ function _rewrite_col_compare($args)
+ {
+ if (sizeof($args) == 4)
+ {
+ if ($args[2] == '=')
+ {
+ return '(' . $args[0] . ' OR (' . $args[1] . ' is NULL AND ' . $args[3] . ' is NULL))';
+ }
+ else if ($args[2] == '<>')
+ {
+ // really just a fancy way of saying foo <> bar or (foo is NULL XOR bar is NULL) but SQL has no XOR :P
+ return '(' . $args[0] . ' OR ((' . $args[1] . ' is NULL AND ' . $args[3] . ' is NOT NULL) OR (' . $args[1] . ' is NOT NULL AND ' . $args[3] . ' is NULL)))';
+ }
+ }
+ else
+ {
+ return $this->_rewrite_where($args[0]);
+ }
+ }
+
+ /**
+ * Oracle specific code to handle it's lack of sanity
+ * @access private
+ */
+ function _rewrite_where($where_clause)
+ {
+ preg_match_all('/\s*(AND|OR)?\s*([\w_.]++)\s*(?:(=|<[=>]?|>=?)\s*((?>\'(?>[^\']++|\'\')*+\'|[\d-.]+))|((NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]+,? ?)*+\)))/', $where_clause, $result, PREG_SET_ORDER);
+ $out = '';
+ foreach ($result as $val)
+ {
+ if (!isset($val[5]))
+ {
+ if ($val[4] !== "''")
+ {
+ $out .= $val[0];
+ }
+ else
+ {
+ $out .= ' ' . $val[1] . ' ' . $val[2];
+ if ($val[3] == '=')
+ {
+ $out .= ' is NULL';
+ }
+ else if ($val[3] == '<>')
+ {
+ $out .= ' is NOT NULL';
+ }
+ }
+ }
+ else
+ {
+ $in_clause = array();
+ $sub_exp = substr($val[5], strpos($val[5], '(') + 1, -1);
+ $extra = false;
+ preg_match_all('/\'(?>[^\']++|\'\')*+\'|[\d-.]++/', $sub_exp, $sub_vals, PREG_PATTERN_ORDER);
+ $i = 0;
+ foreach ($sub_vals[0] as $sub_val)
+ {
+ // two things:
+ // 1) This determines if an empty string was in the IN clausing, making us turn it into a NULL comparison
+ // 2) This fixes the 1000 list limit that Oracle has (ORA-01795)
+ if ($sub_val !== "''")
+ {
+ $in_clause[(int) $i++/1000][] = $sub_val;
+ }
+ else
+ {
+ $extra = true;
+ }
+ }
+ if (!$extra && $i < 1000)
+ {
+ $out .= $val[0];
+ }
+ else
+ {
+ $out .= ' ' . $val[1] . '(';
+ $in_array = array();
+
+ // constuct each IN() clause
+ foreach ($in_clause as $in_values)
+ {
+ $in_array[] = $val[2] . ' ' . (isset($val[6]) ? $val[6] : '') . 'IN(' . implode(', ', $in_values) . ')';
+ }
+
+ // Join the IN() clauses against a few ORs (IN is just a nicer OR anyway)
+ $out .= implode(' OR ', $in_array);
+
+ // handle the empty string case
+ if ($extra)
+ {
+ $out .= ' OR ' . $val[2] . ' is ' . (isset($val[6]) ? $val[6] : '') . 'NULL';
+ }
+ $out .= ')';
+
+ unset($in_array, $in_clause);
+ }
+ }
+ }
+
+ return $out;
+ }
+
+ /**
+ * Base query method
+ *
+ * @param string $query Contains the SQL query which shall be executed
+ * @param int $cache_ttl Either 0 to avoid caching or the time in seconds which the result shall be kept in cache
+ * @return mixed When casted to bool the returned value returns true on success and false on failure
+ *
+ * @access public
+ */
+ function sql_query($query = '', $cache_ttl = 0)
+ {
+ if ($query != '')
+ {
+ global $cache;
+
+ // EXPLAIN only in extra debug mode
+ if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('start', $query);
+ }
+
+ $this->last_query_text = $query;
+ $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->sql_add_num_queries($this->query_result);
+
+ if ($this->query_result === false)
+ {
+ $in_transaction = false;
+ if (!$this->transaction)
+ {
+ $this->sql_transaction('begin');
+ }
+ else
+ {
+ $in_transaction = true;
+ }
+
+ $array = array();
+
+ // We overcome Oracle's 4000 char limit by binding vars
+ if (strlen($query) > 4000)
+ {
+ if (preg_match('/^(INSERT INTO[^(]++)\\(([^()]+)\\) VALUES[^(]++\\((.*?)\\)$/sU', $query, $regs))
+ {
+ if (strlen($regs[3]) > 4000)
+ {
+ $cols = explode(', ', $regs[2]);
+
+ preg_match_all('/\'(?:[^\']++|\'\')*+\'|[\d-.]+/', $regs[3], $vals, PREG_PATTERN_ORDER);
+
+ if (sizeof($cols) !== sizeof($vals))
+ {
+ // Try to replace some common data we know is from our restore script or from other sources
+ $regs[3] = str_replace("'||chr(47)||'", '/', $regs[3]);
+ $_vals = explode(', ', $regs[3]);
+
+ $vals = array();
+ $is_in_val = false;
+ $i = 0;
+ $string = '';
+
+ foreach ($_vals as $value)
+ {
+ if (strpos($value, "'") === false && !$is_in_val)
+ {
+ $vals[$i++] = $value;
+ continue;
+ }
+
+ if (substr($value, -1) === "'")
+ {
+ $vals[$i] = $string . (($is_in_val) ? ', ' : '') . $value;
+ $string = '';
+ $is_in_val = false;
+
+ if ($vals[$i][0] !== "'")
+ {
+ $vals[$i] = "''" . $vals[$i];
+ }
+ $i++;
+ continue;
+ }
+ else
+ {
+ $string .= (($is_in_val) ? ', ' : '') . $value;
+ $is_in_val = true;
+ }
+ }
+
+ if ($string)
+ {
+ // New value if cols != value
+ $vals[(sizeof($cols) !== sizeof($vals)) ? $i : $i - 1] .= $string;
+ }
+
+ $vals = array(0 => $vals);
+ }
+
+ $inserts = $vals[0];
+ unset($vals);
+
+ foreach ($inserts as $key => $value)
+ {
+ if (!empty($value) && $value[0] === "'" && strlen($value) > 4002) // check to see if this thing is greater than the max + 'x2
+ {
+ $inserts[$key] = ':' . strtoupper($cols[$key]);
+ $array[$inserts[$key]] = str_replace("''", "'", substr($value, 1, -1));
+ }
+ }
+
+ $query = $regs[1] . '(' . $regs[2] . ') VALUES (' . implode(', ', $inserts) . ')';
+ }
+ }
+ else if (preg_match_all('/^(UPDATE [\\w_]++\\s+SET )([\\w_]++\\s*=\\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]+)(?:,\\s*[\\w_]++\\s*=\\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]+))*+)\\s+(WHERE.*)$/s', $query, $data, PREG_SET_ORDER))
+ {
+ if (strlen($data[0][2]) > 4000)
+ {
+ $update = $data[0][1];
+ $where = $data[0][3];
+ preg_match_all('/([\\w_]++)\\s*=\\s*(\'(?:[^\']++|\'\')*+\'|[\d-.]++)/', $data[0][2], $temp, PREG_SET_ORDER);
+ unset($data);
+
+ $cols = array();
+ foreach ($temp as $value)
+ {
+ if (!empty($value[2]) && $value[2][0] === "'" && strlen($value[2]) > 4002) // check to see if this thing is greater than the max + 'x2
+ {
+ $cols[] = $value[1] . '=:' . strtoupper($value[1]);
+ $array[$value[1]] = str_replace("''", "'", substr($value[2], 1, -1));
+ }
+ else
+ {
+ $cols[] = $value[1] . '=' . $value[2];
+ }
+ }
+
+ $query = $update . implode(', ', $cols) . ' ' . $where;
+ unset($cols);
+ }
+ }
+ }
+
+ switch (substr($query, 0, 6))
+ {
+ case 'DELETE':
+ if (preg_match('/^(DELETE FROM [\w_]++ WHERE)((?:\s*(?:AND|OR)?\s*[\w_]+\s*(?:(?:=|<>)\s*(?>\'(?>[^\']++|\'\')*+\'|[\d-.]+)|(?:NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]+,? ?)*+\)))*+)$/', $query, $regs))
+ {
+ $query = $regs[1] . $this->_rewrite_where($regs[2]);
+ unset($regs);
+ }
+ break;
+
+ case 'UPDATE':
+ if (preg_match('/^(UPDATE [\\w_]++\\s+SET [\\w_]+\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]++|:\w++)(?:, [\\w_]+\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]++|:\w++))*+\\s+WHERE)(.*)$/s', $query, $regs))
+ {
+ $query = $regs[1] . $this->_rewrite_where($regs[2]);
+ unset($regs);
+ }
+ break;
+
+ case 'SELECT':
+ $query = preg_replace_callback('/([\w_.]++)\s*(?:(=|<>)\s*(?>\'(?>[^\']++|\'\')*+\'|[\d-.]++|([\w_.]++))|(?:NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]++,? ?)*+\))/', array($this, '_rewrite_col_compare'), $query);
+ break;
+ }
+
+ $this->query_result = @ociparse($this->db_connect_id, $query);
+
+ foreach ($array as $key => $value)
+ {
+ @ocibindbyname($this->query_result, $key, $array[$key], -1);
+ }
+
+ $success = @ociexecute($this->query_result, OCI_DEFAULT);
+
+ if (!$success)
+ {
+ $this->sql_error($query);
+ $this->query_result = false;
+ }
+ else
+ {
+ if (!$in_transaction)
+ {
+ $this->sql_transaction('commit');
+ }
+ }
+
+ if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('stop', $query);
+ }
+
+ if ($cache_ttl && method_exists($cache, 'sql_save'))
+ {
+ $this->open_queries[(int) $this->query_result] = $this->query_result;
+ $cache->sql_save($query, $this->query_result, $cache_ttl);
+ }
+ else if (strpos($query, 'SELECT') === 0 && $this->query_result)
+ {
+ $this->open_queries[(int) $this->query_result] = $this->query_result;
+ }
+ }
+ else if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('fromcache', $query);
+ }
+ }
+ else
+ {
+ return false;
+ }
+
+ return $this->query_result;
+ }
+
+ /**
+ * Build LIMIT query
+ */
+ function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
+ {
+ $this->query_result = false;
+
+ $query = 'SELECT * FROM (SELECT /*+ FIRST_ROWS */ rownum AS xrownum, a.* FROM (' . $query . ') a WHERE rownum <= ' . ($offset + $total) . ') WHERE xrownum >= ' . $offset;
+
+ return $this->sql_query($query, $cache_ttl);
+ }
+
+ /**
+ * Return number of affected rows
+ */
+ function sql_affectedrows()
+ {
+ return ($this->query_result) ? @ocirowcount($this->query_result) : false;
+ }
+
+ /**
+ * Fetch current row
+ */
+ function sql_fetchrow($query_id = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_fetchrow($query_id);
+ }
+
+ if ($query_id !== false)
+ {
+ $row = array();
+ $result = @ocifetchinto($query_id, $row, OCI_ASSOC + OCI_RETURN_NULLS);
+
+ if (!$result || !$row)
+ {
+ return false;
+ }
+
+ $result_row = array();
+ foreach ($row as $key => $value)
+ {
+ // Oracle treats empty strings as null
+ if (is_null($value))
+ {
+ $value = '';
+ }
+
+ // OCI->CLOB?
+ if (is_object($value))
+ {
+ $value = $value->load();
+ }
+
+ $result_row[strtolower($key)] = $value;
+ }
+
+ return $result_row;
+ }
+
+ return false;
+ }
+
+ /**
+ * Seek to given row number
+ * rownum is zero-based
+ */
+ function sql_rowseek($rownum, &$query_id)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_rowseek($rownum, $query_id);
+ }
+
+ if ($query_id === false)
+ {
+ return false;
+ }
+
+ // Reset internal pointer
+ @ociexecute($query_id, OCI_DEFAULT);
+
+ // We do not fetch the row for rownum == 0 because then the next resultset would be the second row
+ for ($i = 0; $i < $rownum; $i++)
+ {
+ if (!$this->sql_fetchrow($query_id))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Get last inserted id after insert statement
+ */
+ function sql_nextid()
+ {
+ $query_id = $this->query_result;
+
+ if ($query_id !== false && $this->last_query_text != '')
+ {
+ if (preg_match('#^INSERT[\t\n ]+INTO[\t\n ]+([a-z0-9\_\-]+)#is', $this->last_query_text, $tablename))
+ {
+ $query = 'SELECT ' . $tablename[1] . '_seq.currval FROM DUAL';
+ $stmt = @ociparse($this->db_connect_id, $query);
+ @ociexecute($stmt, OCI_DEFAULT);
+
+ $temp_result = @ocifetchinto($stmt, $temp_array, OCI_ASSOC + OCI_RETURN_NULLS);
+ @ocifreestatement($stmt);
+
+ if ($temp_result)
+ {
+ return $temp_array['CURRVAL'];
+ }
+ else
+ {
+ return false;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Free sql result
+ */
+ function sql_freeresult($query_id = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_freeresult($query_id);
+ }
+
+ if (isset($this->open_queries[(int) $query_id]))
+ {
+ unset($this->open_queries[(int) $query_id]);
+ return @ocifreestatement($query_id);
+ }
+
+ return false;
+ }
+
+ /**
+ * Escape string used in sql query
+ */
+ function sql_escape($msg)
+ {
+ return str_replace(array("'", "\0"), array("''", ''), $msg);
+ }
+
+ /**
+ * Build LIKE expression
+ * @access private
+ */
+ function _sql_like_expression($expression)
+ {
+ return $expression . " ESCAPE '\\'";
+ }
+
+ function _sql_custom_build($stage, $data)
+ {
+ return $data;
+ }
+
+ function _sql_bit_and($column_name, $bit, $compare = '')
+ {
+ return 'BITAND(' . $column_name . ', ' . (1 << $bit) . ')' . (($compare) ? ' ' . $compare : '');
+ }
+
+ /**
+ * return sql error array
+ * @access private
+ */
+ function _sql_error()
+ {
+ $error = @ocierror();
+ $error = (!$error) ? @ocierror($this->query_result) : $error;
+ $error = (!$error) ? @ocierror($this->db_connect_id) : $error;
+
+ if ($error)
+ {
+ $this->last_error_result = $error;
+ }
+ else
+ {
+ $error = (isset($this->last_error_result) && $this->last_error_result) ? $this->last_error_result : array();
+ }
+
+ return $error;
+ }
+
+ /**
+ * Close sql connection
+ * @access private
+ */
+ function _sql_close()
+ {
+ return @ocilogoff($this->db_connect_id);
+ }
+
+ /**
+ * Build db-specific report
+ * @access private
+ */
+ function _sql_report($mode, $query = '')
+ {
+ switch ($mode)
+ {
+ case 'start':
+
+ $html_table = false;
+
+ // Grab a plan table, any will do
+ $sql = "SELECT table_name
+ FROM USER_TABLES
+ WHERE table_name LIKE '%PLAN_TABLE%'";
+ $stmt = ociparse($this->db_connect_id, $sql);
+ ociexecute($stmt);
+ $result = array();
+
+ if (ocifetchinto($stmt, $result, OCI_ASSOC + OCI_RETURN_NULLS))
+ {
+ $table = $result['TABLE_NAME'];
+
+ // This is the statement_id that will allow us to track the plan
+ $statement_id = substr(md5($query), 0, 30);
+
+ // Remove any stale plans
+ $stmt2 = ociparse($this->db_connect_id, "DELETE FROM $table WHERE statement_id='$statement_id'");
+ ociexecute($stmt2);
+ ocifreestatement($stmt2);
+
+ // Explain the plan
+ $sql = "EXPLAIN PLAN
+ SET STATEMENT_ID = '$statement_id'
+ FOR $query";
+ $stmt2 = ociparse($this->db_connect_id, $sql);
+ ociexecute($stmt2);
+ ocifreestatement($stmt2);
+
+ // Get the data from the plan
+ $sql = "SELECT operation, options, object_name, object_type, cardinality, cost
+ FROM plan_table
+ START WITH id = 0 AND statement_id = '$statement_id'
+ CONNECT BY PRIOR id = parent_id
+ AND statement_id = '$statement_id'";
+ $stmt2 = ociparse($this->db_connect_id, $sql);
+ ociexecute($stmt2);
+
+ $row = array();
+ while (ocifetchinto($stmt2, $row, OCI_ASSOC + OCI_RETURN_NULLS))
+ {
+ $html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
+ }
+
+ ocifreestatement($stmt2);
+
+ // Remove the plan we just made, we delete them on request anyway
+ $stmt2 = ociparse($this->db_connect_id, "DELETE FROM $table WHERE statement_id='$statement_id'");
+ ociexecute($stmt2);
+ ocifreestatement($stmt2);
+ }
+
+ ocifreestatement($stmt);
+
+ if ($html_table)
+ {
+ $this->html_hold .= '</table>';
+ }
+
+ break;
+
+ case 'fromcache':
+ $endtime = explode(' ', microtime());
+ $endtime = $endtime[0] + $endtime[1];
+
+ $result = @ociparse($this->db_connect_id, $query);
+ $success = @ociexecute($result, OCI_DEFAULT);
+ $row = array();
+
+ while (@ocifetchinto($result, $row, OCI_ASSOC + OCI_RETURN_NULLS))
+ {
+ // Take the time spent on parsing rows into account
+ }
+ @ocifreestatement($result);
+
+ $splittime = explode(' ', microtime());
+ $splittime = $splittime[0] + $splittime[1];
+
+ $this->sql_report('record_fromcache', $query, $endtime, $splittime);
+
+ break;
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php
new file mode 100644
index 0000000000..d117e8c948
--- /dev/null
+++ b/phpBB/includes/db/postgres.php
@@ -0,0 +1,440 @@
+<?php
+/**
+*
+* @package dbal
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
+
+/**
+* PostgreSQL Database Abstraction Layer
+* Minimum Requirement is Version 7.3+
+* @package dbal
+*/
+class dbal_postgres extends dbal
+{
+ var $last_query_text = '';
+
+ /**
+ * Connect to server
+ */
+ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
+ {
+ $connect_string = '';
+
+ if ($sqluser)
+ {
+ $connect_string .= "user=$sqluser ";
+ }
+
+ if ($sqlpassword)
+ {
+ $connect_string .= "password=$sqlpassword ";
+ }
+
+ if ($sqlserver)
+ {
+ if (strpos($sqlserver, ':') !== false)
+ {
+ list($sqlserver, $port) = explode(':', $sqlserver);
+ }
+
+ if ($sqlserver !== 'localhost')
+ {
+ $connect_string .= "host=$sqlserver ";
+ }
+
+ if ($port)
+ {
+ $connect_string .= "port=$port ";
+ }
+ }
+
+ $schema = '';
+
+ if ($database)
+ {
+ $this->dbname = $database;
+ if (strpos($database, '.') !== false)
+ {
+ list($database, $schema) = explode('.', $database);
+ }
+ $connect_string .= "dbname=$database";
+ }
+
+ $this->persistency = $persistency;
+
+ $this->db_connect_id = ($this->persistency) ? @pg_pconnect($connect_string, $new_link) : @pg_connect($connect_string, $new_link);
+
+ if ($this->db_connect_id)
+ {
+ if (version_compare($this->sql_server_info(true), '8.2', '>='))
+ {
+ $this->multi_insert = true;
+ }
+
+ if ($schema !== '')
+ {
+ @pg_query($this->db_connect_id, 'SET search_path TO ' . $schema);
+ }
+ return $this->db_connect_id;
+ }
+
+ return $this->sql_error('');
+ }
+
+ /**
+ * Version information about used database
+ * @param bool $raw if true, only return the fetched sql_server_version
+ * @return string sql server version
+ */
+ function sql_server_info($raw = false)
+ {
+ global $cache;
+
+ if (empty($cache) || ($this->sql_server_version = $cache->get('pgsql_version')) === false)
+ {
+ $query_id = @pg_query($this->db_connect_id, 'SELECT VERSION() AS version');
+ $row = @pg_fetch_assoc($query_id, null);
+ @pg_free_result($query_id);
+
+ $this->sql_server_version = (!empty($row['version'])) ? trim(substr($row['version'], 10)) : 0;
+
+ if (!empty($cache))
+ {
+ $cache->put('pgsql_version', $this->sql_server_version);
+ }
+ }
+
+ return ($raw) ? $this->sql_server_version : 'PostgreSQL ' . $this->sql_server_version;
+ }
+
+ /**
+ * SQL Transaction
+ * @access private
+ */
+ function _sql_transaction($status = 'begin')
+ {
+ switch ($status)
+ {
+ case 'begin':
+ return @pg_query($this->db_connect_id, 'BEGIN');
+ break;
+
+ case 'commit':
+ return @pg_query($this->db_connect_id, 'COMMIT');
+ break;
+
+ case 'rollback':
+ return @pg_query($this->db_connect_id, 'ROLLBACK');
+ break;
+ }
+
+ return true;
+ }
+
+ /**
+ * Base query method
+ *
+ * @param string $query Contains the SQL query which shall be executed
+ * @param int $cache_ttl Either 0 to avoid caching or the time in seconds which the result shall be kept in cache
+ * @return mixed When casted to bool the returned value returns true on success and false on failure
+ *
+ * @access public
+ */
+ function sql_query($query = '', $cache_ttl = 0)
+ {
+ if ($query != '')
+ {
+ global $cache;
+
+ // EXPLAIN only in extra debug mode
+ if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('start', $query);
+ }
+
+ $this->last_query_text = $query;
+ $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->sql_add_num_queries($this->query_result);
+
+ if ($this->query_result === false)
+ {
+ if (($this->query_result = @pg_query($this->db_connect_id, $query)) === false)
+ {
+ $this->sql_error($query);
+ }
+
+ if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('stop', $query);
+ }
+
+ if ($cache_ttl && method_exists($cache, 'sql_save'))
+ {
+ $this->open_queries[(int) $this->query_result] = $this->query_result;
+ $cache->sql_save($query, $this->query_result, $cache_ttl);
+ }
+ else if (strpos($query, 'SELECT') === 0 && $this->query_result)
+ {
+ $this->open_queries[(int) $this->query_result] = $this->query_result;
+ }
+ }
+ else if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('fromcache', $query);
+ }
+ }
+ else
+ {
+ return false;
+ }
+
+ return $this->query_result;
+ }
+
+ /**
+ * Build db-specific query data
+ * @access private
+ */
+ function _sql_custom_build($stage, $data)
+ {
+ return $data;
+ }
+
+ /**
+ * Build LIMIT query
+ */
+ function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
+ {
+ $this->query_result = false;
+
+ // if $total is set to 0 we do not want to limit the number of rows
+ if ($total == 0)
+ {
+ $total = 'ALL';
+ }
+
+ $query .= "\n LIMIT $total OFFSET $offset";
+
+ return $this->sql_query($query, $cache_ttl);
+ }
+
+ /**
+ * Return number of affected rows
+ */
+ function sql_affectedrows()
+ {
+ return ($this->query_result) ? @pg_affected_rows($this->query_result) : false;
+ }
+
+ /**
+ * Fetch current row
+ */
+ function sql_fetchrow($query_id = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_fetchrow($query_id);
+ }
+
+ return ($query_id !== false) ? @pg_fetch_assoc($query_id, null) : false;
+ }
+
+ /**
+ * Seek to given row number
+ * rownum is zero-based
+ */
+ function sql_rowseek($rownum, &$query_id)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_rowseek($rownum, $query_id);
+ }
+
+ return ($query_id !== false) ? @pg_result_seek($query_id, $rownum) : false;
+ }
+
+ /**
+ * Get last inserted id after insert statement
+ */
+ function sql_nextid()
+ {
+ $query_id = $this->query_result;
+
+ if ($query_id !== false && $this->last_query_text != '')
+ {
+ if (preg_match("/^INSERT[\t\n ]+INTO[\t\n ]+([a-z0-9\_\-]+)/is", $this->last_query_text, $tablename))
+ {
+ $query = "SELECT currval('" . $tablename[1] . "_seq') AS last_value";
+ $temp_q_id = @pg_query($this->db_connect_id, $query);
+
+ if (!$temp_q_id)
+ {
+ return false;
+ }
+
+ $temp_result = @pg_fetch_assoc($temp_q_id, NULL);
+ @pg_free_result($query_id);
+
+ return ($temp_result) ? $temp_result['last_value'] : false;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Free sql result
+ */
+ function sql_freeresult($query_id = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_freeresult($query_id);
+ }
+
+ if (isset($this->open_queries[(int) $query_id]))
+ {
+ unset($this->open_queries[(int) $query_id]);
+ return @pg_free_result($query_id);
+ }
+
+ return false;
+ }
+
+ /**
+ * Escape string used in sql query
+ * Note: Do not use for bytea values if we may use them at a later stage
+ */
+ function sql_escape($msg)
+ {
+ return @pg_escape_string($msg);
+ }
+
+ /**
+ * Build LIKE expression
+ * @access private
+ */
+ function _sql_like_expression($expression)
+ {
+ return $expression;
+ }
+
+ /**
+ * return sql error array
+ * @access private
+ */
+ function _sql_error()
+ {
+ return array(
+ 'message' => (!$this->db_connect_id) ? @pg_last_error() : @pg_last_error($this->db_connect_id),
+ 'code' => ''
+ );
+ }
+
+ /**
+ * Close sql connection
+ * @access private
+ */
+ function _sql_close()
+ {
+ return @pg_close($this->db_connect_id);
+ }
+
+ /**
+ * Build db-specific report
+ * @access private
+ */
+ function _sql_report($mode, $query = '')
+ {
+ switch ($mode)
+ {
+ case 'start':
+
+ $explain_query = $query;
+ if (preg_match('/UPDATE ([a-z0-9_]+).*?WHERE(.*)/s', $query, $m))
+ {
+ $explain_query = 'SELECT * FROM ' . $m[1] . ' WHERE ' . $m[2];
+ }
+ else if (preg_match('/DELETE FROM ([a-z0-9_]+).*?WHERE(.*)/s', $query, $m))
+ {
+ $explain_query = 'SELECT * FROM ' . $m[1] . ' WHERE ' . $m[2];
+ }
+
+ if (preg_match('/^SELECT/', $explain_query))
+ {
+ $html_table = false;
+
+ if ($result = @pg_query($this->db_connect_id, "EXPLAIN $explain_query"))
+ {
+ while ($row = @pg_fetch_assoc($result, NULL))
+ {
+ $html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
+ }
+ }
+ @pg_free_result($result);
+
+ if ($html_table)
+ {
+ $this->html_hold .= '</table>';
+ }
+ }
+
+ break;
+
+ case 'fromcache':
+ $endtime = explode(' ', microtime());
+ $endtime = $endtime[0] + $endtime[1];
+
+ $result = @pg_query($this->db_connect_id, $query);
+ while ($void = @pg_fetch_assoc($result, NULL))
+ {
+ // Take the time spent on parsing rows into account
+ }
+ @pg_free_result($result);
+
+ $splittime = explode(' ', microtime());
+ $splittime = $splittime[0] + $splittime[1];
+
+ $this->sql_report('record_fromcache', $query, $endtime, $splittime);
+
+ break;
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/sqlite.php
new file mode 100644
index 0000000000..288f6e0992
--- /dev/null
+++ b/phpBB/includes/db/sqlite.php
@@ -0,0 +1,334 @@
+<?php
+/**
+*
+* @package dbal
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
+
+/**
+* Sqlite Database Abstraction Layer
+* Minimum Requirement: 2.8.2+
+* @package dbal
+*/
+class dbal_sqlite extends dbal
+{
+ /**
+ * Connect to server
+ */
+ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
+ {
+ $this->persistency = $persistency;
+ $this->user = $sqluser;
+ $this->server = $sqlserver . (($port) ? ':' . $port : '');
+ $this->dbname = $database;
+
+ $error = '';
+ $this->db_connect_id = ($this->persistency) ? @sqlite_popen($this->server, 0666, $error) : @sqlite_open($this->server, 0666, $error);
+
+ if ($this->db_connect_id)
+ {
+ @sqlite_query('PRAGMA short_column_names = 1', $this->db_connect_id);
+// @sqlite_query('PRAGMA encoding = "UTF-8"', $this->db_connect_id);
+ }
+
+ return ($this->db_connect_id) ? true : array('message' => $error);
+ }
+
+ /**
+ * Version information about used database
+ * @param bool $raw if true, only return the fetched sql_server_version
+ * @return string sql server version
+ */
+ function sql_server_info($raw = false)
+ {
+ global $cache;
+
+ if (empty($cache) || ($this->sql_server_version = $cache->get('sqlite_version')) === false)
+ {
+ $result = @sqlite_query('SELECT sqlite_version() AS version', $this->db_connect_id);
+ $row = @sqlite_fetch_array($result, SQLITE_ASSOC);
+
+ $this->sql_server_version = (!empty($row['version'])) ? $row['version'] : 0;
+ $cache->put('sqlite_version', $this->sql_server_version);
+ }
+
+ return ($raw) ? $this->sql_server_version : 'SQLite ' . $this->sql_server_version;
+ }
+
+ /**
+ * SQL Transaction
+ * @access private
+ */
+ function _sql_transaction($status = 'begin')
+ {
+ switch ($status)
+ {
+ case 'begin':
+ return @sqlite_query('BEGIN', $this->db_connect_id);
+ break;
+
+ case 'commit':
+ return @sqlite_query('COMMIT', $this->db_connect_id);
+ break;
+
+ case 'rollback':
+ return @sqlite_query('ROLLBACK', $this->db_connect_id);
+ break;
+ }
+
+ return true;
+ }
+
+ /**
+ * Base query method
+ *
+ * @param string $query Contains the SQL query which shall be executed
+ * @param int $cache_ttl Either 0 to avoid caching or the time in seconds which the result shall be kept in cache
+ * @return mixed When casted to bool the returned value returns true on success and false on failure
+ *
+ * @access public
+ */
+ function sql_query($query = '', $cache_ttl = 0)
+ {
+ if ($query != '')
+ {
+ global $cache;
+
+ // EXPLAIN only in extra debug mode
+ if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('start', $query);
+ }
+
+ $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->sql_add_num_queries($this->query_result);
+
+ if ($this->query_result === false)
+ {
+ if (($this->query_result = @sqlite_query($query, $this->db_connect_id)) === false)
+ {
+ $this->sql_error($query);
+ }
+
+ if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('stop', $query);
+ }
+
+ if ($cache_ttl && method_exists($cache, 'sql_save'))
+ {
+ $this->open_queries[(int) $this->query_result] = $this->query_result;
+ $cache->sql_save($query, $this->query_result, $cache_ttl);
+ }
+ else if (strpos($query, 'SELECT') === 0 && $this->query_result)
+ {
+ $this->open_queries[(int) $this->query_result] = $this->query_result;
+ }
+ }
+ else if (defined('DEBUG_EXTRA'))
+ {
+ $this->sql_report('fromcache', $query);
+ }
+ }
+ else
+ {
+ return false;
+ }
+
+ return $this->query_result;
+ }
+
+ /**
+ * Build LIMIT query
+ */
+ function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
+ {
+ $this->query_result = false;
+
+ // if $total is set to 0 we do not want to limit the number of rows
+ if ($total == 0)
+ {
+ $total = -1;
+ }
+
+ $query .= "\n LIMIT " . ((!empty($offset)) ? $offset . ', ' . $total : $total);
+
+ return $this->sql_query($query, $cache_ttl);
+ }
+
+ /**
+ * Return number of affected rows
+ */
+ function sql_affectedrows()
+ {
+ return ($this->db_connect_id) ? @sqlite_changes($this->db_connect_id) : false;
+ }
+
+ /**
+ * Fetch current row
+ */
+ function sql_fetchrow($query_id = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_fetchrow($query_id);
+ }
+
+ return ($query_id !== false) ? @sqlite_fetch_array($query_id, SQLITE_ASSOC) : false;
+ }
+
+ /**
+ * Seek to given row number
+ * rownum is zero-based
+ */
+ function sql_rowseek($rownum, &$query_id)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_rowseek($rownum, $query_id);
+ }
+
+ return ($query_id !== false) ? @sqlite_seek($query_id, $rownum) : false;
+ }
+
+ /**
+ * Get last inserted id after insert statement
+ */
+ function sql_nextid()
+ {
+ return ($this->db_connect_id) ? @sqlite_last_insert_rowid($this->db_connect_id) : false;
+ }
+
+ /**
+ * Free sql result
+ */
+ function sql_freeresult($query_id = false)
+ {
+ global $cache;
+
+ if ($query_id === false)
+ {
+ $query_id = $this->query_result;
+ }
+
+ if (isset($cache->sql_rowset[$query_id]))
+ {
+ return $cache->sql_freeresult($query_id);
+ }
+
+ return true;
+ }
+
+ /**
+ * Escape string used in sql query
+ */
+ function sql_escape($msg)
+ {
+ return @sqlite_escape_string($msg);
+ }
+
+ /**
+ * Correctly adjust LIKE expression for special characters
+ * For SQLite an underscore is a not-known character... this may change with SQLite3
+ */
+ function sql_like_expression($expression)
+ {
+ // Unlike LIKE, GLOB is case sensitive (unfortunatly). SQLite users need to live with it!
+ // We only catch * and ? here, not the character map possible on file globbing.
+ $expression = str_replace(array(chr(0) . '_', chr(0) . '%'), array(chr(0) . '?', chr(0) . '*'), $expression);
+
+ $expression = str_replace(array('?', '*'), array("\?", "\*"), $expression);
+ $expression = str_replace(array(chr(0) . "\?", chr(0) . "\*"), array('?', '*'), $expression);
+
+ return 'GLOB \'' . $this->sql_escape($expression) . '\'';
+ }
+
+ /**
+ * return sql error array
+ * @access private
+ */
+ function _sql_error()
+ {
+ return array(
+ 'message' => @sqlite_error_string(@sqlite_last_error($this->db_connect_id)),
+ 'code' => @sqlite_last_error($this->db_connect_id)
+ );
+ }
+
+ /**
+ * Build db-specific query data
+ * @access private
+ */
+ function _sql_custom_build($stage, $data)
+ {
+ return $data;
+ }
+
+ /**
+ * Close sql connection
+ * @access private
+ */
+ function _sql_close()
+ {
+ return @sqlite_close($this->db_connect_id);
+ }
+
+ /**
+ * Build db-specific report
+ * @access private
+ */
+ function _sql_report($mode, $query = '')
+ {
+ switch ($mode)
+ {
+ case 'start':
+ break;
+
+ case 'fromcache':
+ $endtime = explode(' ', microtime());
+ $endtime = $endtime[0] + $endtime[1];
+
+ $result = @sqlite_query($query, $this->db_connect_id);
+ while ($void = @sqlite_fetch_array($result, SQLITE_ASSOC))
+ {
+ // Take the time spent on parsing rows into account
+ }
+
+ $splittime = explode(' ', microtime());
+ $splittime = $splittime[0] + $splittime[1];
+
+ $this->sql_report('record_fromcache', $query, $endtime, $splittime);
+
+ break;
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/diff/diff.php b/phpBB/includes/diff/diff.php
new file mode 100644
index 0000000000..60af574b78
--- /dev/null
+++ b/phpBB/includes/diff/diff.php
@@ -0,0 +1,1148 @@
+<?php
+/**
+*
+* @package diff
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Code from pear.php.net, Text_Diff-1.1.0 package
+* http://pear.php.net/package/Text_Diff/
+*
+* Modified by phpBB Group to meet our coding standards
+* and being able to integrate into phpBB
+*
+* General API for generating and formatting diffs - the differences between
+* two sequences of strings.
+*
+* Copyright 2004 Geoffrey T. Dairiki <dairiki@dairiki.org>
+* Copyright 2004-2008 The Horde Project (http://www.horde.org/)
+*
+* @package diff
+* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
+*/
+class diff
+{
+ /**
+ * Array of changes.
+ * @var array
+ */
+ var $_edits;
+
+ /**
+ * Computes diffs between sequences of strings.
+ *
+ * @param array $from_lines An array of strings. Typically these are lines from a file.
+ * @param array $to_lines An array of strings.
+ */
+ function diff(&$from_content, &$to_content, $preserve_cr = true)
+ {
+ $diff_engine = new diff_engine();
+ $this->_edits = $diff_engine->diff($from_content, $to_content, $preserve_cr);
+ }
+
+ /**
+ * Returns the array of differences.
+ */
+ function get_diff()
+ {
+ return $this->_edits;
+ }
+
+ /**
+ * returns the number of new (added) lines in a given diff.
+ *
+ * @since Text_Diff 1.1.0
+ *
+ * @return integer The number of new lines
+ */
+ function count_added_lines()
+ {
+ $count = 0;
+
+ for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
+ {
+ $edit = $this->_edits[$i];
+
+ if (is_a($edit, 'diff_op_add') || is_a($edit, 'diff_op_change'))
+ {
+ $count += $edit->nfinal();
+ }
+ }
+ return $count;
+ }
+
+ /**
+ * Returns the number of deleted (removed) lines in a given diff.
+ *
+ * @since Text_Diff 1.1.0
+ *
+ * @return integer The number of deleted lines
+ */
+ function count_deleted_lines()
+ {
+ $count = 0;
+
+ for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
+ {
+ $edit = $this->_edits[$i];
+
+ if (is_a($edit, 'diff_op_delete') || is_a($edit, 'diff_op_change'))
+ {
+ $count += $edit->norig();
+ }
+ }
+ return $count;
+ }
+
+ /**
+ * Computes a reversed diff.
+ *
+ * Example:
+ * <code>
+ * $diff = new diff($lines1, $lines2);
+ * $rev = $diff->reverse();
+ * </code>
+ *
+ * @return diff A Diff object representing the inverse of the original diff.
+ * Note that we purposely don't return a reference here, since
+ * this essentially is a clone() method.
+ */
+ function reverse()
+ {
+ if (version_compare(zend_version(), '2', '>'))
+ {
+ $rev = clone($this);
+ }
+ else
+ {
+ $rev = $this;
+ }
+
+ $rev->_edits = array();
+
+ for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
+ {
+ $edit = $this->_edits[$i];
+ $rev->_edits[] = $edit->reverse();
+ }
+
+ return $rev;
+ }
+
+ /**
+ * Checks for an empty diff.
+ *
+ * @return boolean True if two sequences were identical.
+ */
+ function is_empty()
+ {
+ for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
+ {
+ $edit = $this->_edits[$i];
+
+ // skip diff_op_copy
+ if (is_a($edit, 'diff_op_copy'))
+ {
+ continue;
+ }
+
+ if (is_a($edit, 'diff_op_delete') || is_a($edit, 'diff_op_add'))
+ {
+ $orig = $edit->orig;
+ $final = $edit->final;
+
+ // We can simplify one case where the array is usually supposed to be empty...
+ if (sizeof($orig) == 1 && trim($orig[0]) === '') $orig = array();
+ if (sizeof($final) == 1 && trim($final[0]) === '') $final = array();
+
+ if (!$orig && !$final)
+ {
+ continue;
+ }
+
+ return false;
+ }
+
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Computes the length of the Longest Common Subsequence (LCS).
+ *
+ * This is mostly for diagnostic purposes.
+ *
+ * @return integer The length of the LCS.
+ */
+ function lcs()
+ {
+ $lcs = 0;
+
+ for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
+ {
+ $edit = $this->_edits[$i];
+
+ if (is_a($edit, 'diff_op_copy'))
+ {
+ $lcs += sizeof($edit->orig);
+ }
+ }
+ return $lcs;
+ }
+
+ /**
+ * Gets the original set of lines.
+ *
+ * This reconstructs the $from_lines parameter passed to the constructor.
+ *
+ * @return array The original sequence of strings.
+ */
+ function get_original()
+ {
+ $lines = array();
+
+ for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
+ {
+ $edit = $this->_edits[$i];
+
+ if ($edit->orig)
+ {
+ array_splice($lines, sizeof($lines), 0, $edit->orig);
+ }
+ }
+ return $lines;
+ }
+
+ /**
+ * Gets the final set of lines.
+ *
+ * This reconstructs the $to_lines parameter passed to the constructor.
+ *
+ * @return array The sequence of strings.
+ */
+ function get_final()
+ {
+ $lines = array();
+
+ for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
+ {
+ $edit = $this->_edits[$i];
+
+ if ($edit->final)
+ {
+ array_splice($lines, sizeof($lines), 0, $edit->final);
+ }
+ }
+ return $lines;
+ }
+
+ /**
+ * Removes trailing newlines from a line of text. This is meant to be used with array_walk().
+ *
+ * @param string &$line The line to trim.
+ * @param integer $key The index of the line in the array. Not used.
+ */
+ function trim_newlines(&$line, $key)
+ {
+ $line = str_replace(array("\n", "\r"), '', $line);
+ }
+
+ /**
+ * Checks a diff for validity.
+ *
+ * This is here only for debugging purposes.
+ */
+ function _check($from_lines, $to_lines)
+ {
+ if (serialize($from_lines) != serialize($this->get_original()))
+ {
+ trigger_error("[diff] Reconstructed original doesn't match", E_USER_ERROR);
+ }
+
+ if (serialize($to_lines) != serialize($this->get_final()))
+ {
+ trigger_error("[diff] Reconstructed final doesn't match", E_USER_ERROR);
+ }
+
+ $rev = $this->reverse();
+
+ if (serialize($to_lines) != serialize($rev->get_original()))
+ {
+ trigger_error("[diff] Reversed original doesn't match", E_USER_ERROR);
+ }
+
+ if (serialize($from_lines) != serialize($rev->get_final()))
+ {
+ trigger_error("[diff] Reversed final doesn't match", E_USER_ERROR);
+ }
+
+ $prevtype = null;
+
+ for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
+ {
+ $edit = $this->_edits[$i];
+
+ if ($prevtype == get_class($edit))
+ {
+ trigger_error("[diff] Edit sequence is non-optimal", E_USER_ERROR);
+ }
+ $prevtype = get_class($edit);
+ }
+
+ return true;
+ }
+}
+
+/**
+* @package diff
+* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
+*/
+class mapped_diff extends diff
+{
+ /**
+ * Computes a diff between sequences of strings.
+ *
+ * This can be used to compute things like case-insensitve diffs, or diffs
+ * which ignore changes in white-space.
+ *
+ * @param array $from_lines An array of strings.
+ * @param array $to_lines An array of strings.
+ * @param array $mapped_from_lines This array should have the same size number of elements as $from_lines.
+ * The elements in $mapped_from_lines and $mapped_to_lines are what is actually
+ * compared when computing the diff.
+ * @param array $mapped_to_lines This array should have the same number of elements as $to_lines.
+ */
+ function mapped_diff(&$from_lines, &$to_lines, &$mapped_from_lines, &$mapped_to_lines)
+ {
+ if (sizeof($from_lines) != sizeof($mapped_from_lines) || sizeof($to_lines) != sizeof($mapped_to_lines))
+ {
+ return false;
+ }
+
+ parent::diff($mapped_from_lines, $mapped_to_lines);
+
+ $xi = $yi = 0;
+ for ($i = 0; $i < sizeof($this->_edits); $i++)
+ {
+ $orig = &$this->_edits[$i]->orig;
+ if (is_array($orig))
+ {
+ $orig = array_slice($from_lines, $xi, sizeof($orig));
+ $xi += sizeof($orig);
+ }
+
+ $final = &$this->_edits[$i]->final;
+ if (is_array($final))
+ {
+ $final = array_slice($to_lines, $yi, sizeof($final));
+ $yi += sizeof($final);
+ }
+ }
+ }
+}
+
+/**
+* @package diff
+* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
+*
+* @access private
+*/
+class diff_op
+{
+ var $orig;
+ var $final;
+
+ function &reverse()
+ {
+ trigger_error('[diff] Abstract method', E_USER_ERROR);
+ }
+
+ function norig()
+ {
+ return ($this->orig) ? sizeof($this->orig) : 0;
+ }
+
+ function nfinal()
+ {
+ return ($this->final) ? sizeof($this->final) : 0;
+ }
+}
+
+/**
+* @package diff
+* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
+*
+* @access private
+*/
+class diff_op_copy extends diff_op
+{
+ function diff_op_copy($orig, $final = false)
+ {
+ if (!is_array($final))
+ {
+ $final = $orig;
+ }
+ $this->orig = $orig;
+ $this->final = $final;
+ }
+
+ function &reverse()
+ {
+ $reverse = new diff_op_copy($this->final, $this->orig);
+ return $reverse;
+ }
+}
+
+/**
+* @package diff
+* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
+*
+* @access private
+*/
+class diff_op_delete extends diff_op
+{
+ function diff_op_delete($lines)
+ {
+ $this->orig = $lines;
+ $this->final = false;
+ }
+
+ function &reverse()
+ {
+ $reverse = new diff_op_add($this->orig);
+ return $reverse;
+ }
+}
+
+/**
+* @package diff
+* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
+*
+* @access private
+*/
+class diff_op_add extends diff_op
+{
+ function diff_op_add($lines)
+ {
+ $this->final = $lines;
+ $this->orig = false;
+ }
+
+ function &reverse()
+ {
+ $reverse = new diff_op_delete($this->final);
+ return $reverse;
+ }
+}
+
+/**
+* @package diff
+* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
+*
+* @access private
+*/
+class diff_op_change extends diff_op
+{
+ function diff_op_change($orig, $final)
+ {
+ $this->orig = $orig;
+ $this->final = $final;
+ }
+
+ function &reverse()
+ {
+ $reverse = new diff_op_change($this->final, $this->orig);
+ return $reverse;
+ }
+}
+
+
+/**
+* A class for computing three way diffs.
+*
+* @package diff
+* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
+*/
+class diff3 extends diff
+{
+ /**
+ * Conflict counter.
+ * @var integer
+ */
+ var $_conflicting_blocks = 0;
+
+ /**
+ * Computes diff between 3 sequences of strings.
+ *
+ * @param array $orig The original lines to use.
+ * @param array $final1 The first version to compare to.
+ * @param array $final2 The second version to compare to.
+ */
+ function diff3(&$orig, &$final1, &$final2, $preserve_cr = true)
+ {
+ $diff_engine = new diff_engine();
+
+ $diff_1 = $diff_engine->diff($orig, $final1, $preserve_cr);
+ $diff_2 = $diff_engine->diff($orig, $final2, $preserve_cr);
+
+ unset($diff_engine);
+
+ $this->_edits = $this->_diff3($diff_1, $diff_2);
+ }
+
+ /**
+ * Return number of conflicts
+ */
+ function get_num_conflicts()
+ {
+ $conflicts = 0;
+
+ for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
+ {
+ $edit = $this->_edits[$i];
+
+ if ($edit->is_conflict())
+ {
+ $conflicts++;
+ }
+ }
+
+ return $conflicts;
+ }
+
+ /**
+ * Get conflicts content for download. This is generally a merged file, but preserving conflicts and adding explanations to it.
+ * A user could then go through this file, search for the conflicts and changes the code accordingly.
+ *
+ * @param string $label1 the cvs file version/label from the original set of lines
+ * @param string $label2 the cvs file version/label from the new set of lines
+ * @param string $label_sep the explanation between label1 and label2 - more of a helper for the user
+ *
+ * @return mixed the merged output
+ */
+ function get_conflicts_content($label1 = 'CURRENT_FILE', $label2 = 'NEW_FILE', $label_sep = 'DIFF_SEP_EXPLAIN')
+ {
+ global $user;
+
+ $label1 = (!empty($user->lang[$label1])) ? $user->lang[$label1] : $label1;
+ $label2 = (!empty($user->lang[$label2])) ? $user->lang[$label2] : $label2;
+ $label_sep = (!empty($user->lang[$label_sep])) ? $user->lang[$label_sep] : $label_sep;
+
+ $lines = array();
+
+ for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
+ {
+ $edit = $this->_edits[$i];
+
+ if ($edit->is_conflict())
+ {
+ // Start conflict label
+ $label_start = array('<<<<<<< ' . $label1);
+ $label_mid = array('======= ' . $label_sep);
+ $label_end = array('>>>>>>> ' . $label2);
+
+ $lines = array_merge($lines, $label_start, $edit->final1, $label_mid, $edit->final2, $label_end);
+ $this->_conflicting_blocks++;
+ }
+ else
+ {
+ $lines = array_merge($lines, $edit->merged());
+ }
+ }
+
+ return $lines;
+ }
+
+ /**
+ * Return merged output (used by the renderer)
+ *
+ * @return mixed the merged output
+ */
+ function merged_output()
+ {
+ return $this->get_conflicts_content();
+ }
+
+ /**
+ * Merge the output and use the new file code for conflicts
+ */
+ function merged_new_output()
+ {
+ $lines = array();
+
+ for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
+ {
+ $edit = $this->_edits[$i];
+
+ if ($edit->is_conflict())
+ {
+ $lines = array_merge($lines, $edit->final2);
+ }
+ else
+ {
+ $lines = array_merge($lines, $edit->merged());
+ }
+ }
+
+ return $lines;
+ }
+
+ /**
+ * Merge the output and use the original file code for conflicts
+ */
+ function merged_orig_output()
+ {
+ $lines = array();
+
+ for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
+ {
+ $edit = $this->_edits[$i];
+
+ if ($edit->is_conflict())
+ {
+ $lines = array_merge($lines, $edit->final1);
+ }
+ else
+ {
+ $lines = array_merge($lines, $edit->merged());
+ }
+ }
+
+ return $lines;
+ }
+
+ /**
+ * Get conflicting block(s)
+ */
+ function get_conflicts()
+ {
+ $conflicts = array();
+
+ for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
+ {
+ $edit = $this->_edits[$i];
+
+ if ($edit->is_conflict())
+ {
+ $conflicts[] = array($edit->final1, $edit->final2);
+ }
+ }
+
+ return $conflicts;
+ }
+
+ /**
+ * @access private
+ */
+ function _diff3(&$edits1, &$edits2)
+ {
+ $edits = array();
+ $bb = new diff3_block_builder();
+
+ $e1 = current($edits1);
+ $e2 = current($edits2);
+
+ while ($e1 || $e2)
+ {
+ if ($e1 && $e2 && is_a($e1, 'diff_op_copy') && is_a($e2, 'diff_op_copy'))
+ {
+ // We have copy blocks from both diffs. This is the (only) time we want to emit a diff3 copy block.
+ // Flush current diff3 diff block, if any.
+ if ($edit = $bb->finish())
+ {
+ $edits[] = $edit;
+ }
+
+ $ncopy = min($e1->norig(), $e2->norig());
+ $edits[] = new diff3_op_copy(array_slice($e1->orig, 0, $ncopy));
+
+ if ($e1->norig() > $ncopy)
+ {
+ array_splice($e1->orig, 0, $ncopy);
+ array_splice($e1->final, 0, $ncopy);
+ }
+ else
+ {
+ $e1 = next($edits1);
+ }
+
+ if ($e2->norig() > $ncopy)
+ {
+ array_splice($e2->orig, 0, $ncopy);
+ array_splice($e2->final, 0, $ncopy);
+ }
+ else
+ {
+ $e2 = next($edits2);
+ }
+ }
+ else
+ {
+ if ($e1 && $e2)
+ {
+ if ($e1->orig && $e2->orig)
+ {
+ $norig = min($e1->norig(), $e2->norig());
+ $orig = array_splice($e1->orig, 0, $norig);
+ array_splice($e2->orig, 0, $norig);
+ $bb->input($orig);
+ }
+ else
+ {
+ $norig = 0;
+ }
+
+ if (is_a($e1, 'diff_op_copy'))
+ {
+ $bb->out1(array_splice($e1->final, 0, $norig));
+ }
+
+ if (is_a($e2, 'diff_op_copy'))
+ {
+ $bb->out2(array_splice($e2->final, 0, $norig));
+ }
+ }
+
+ if ($e1 && ! $e1->orig)
+ {
+ $bb->out1($e1->final);
+ $e1 = next($edits1);
+ }
+
+ if ($e2 && ! $e2->orig)
+ {
+ $bb->out2($e2->final);
+ $e2 = next($edits2);
+ }
+ }
+ }
+
+ if ($edit = $bb->finish())
+ {
+ $edits[] = $edit;
+ }
+
+ return $edits;
+ }
+}
+
+/**
+* @package diff
+* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
+*
+* @access private
+*/
+class diff3_op
+{
+ function diff3_op($orig = false, $final1 = false, $final2 = false)
+ {
+ $this->orig = $orig ? $orig : array();
+ $this->final1 = $final1 ? $final1 : array();
+ $this->final2 = $final2 ? $final2 : array();
+ }
+
+ function merged()
+ {
+ if (!isset($this->_merged))
+ {
+ // Prepare the arrays before we compare them. ;)
+ $this->solve_prepare();
+
+ if ($this->final1 === $this->final2)
+ {
+ $this->_merged = &$this->final1;
+ }
+ else if ($this->final1 === $this->orig)
+ {
+ $this->_merged = &$this->final2;
+ }
+ else if ($this->final2 === $this->orig)
+ {
+ $this->_merged = &$this->final1;
+ }
+ else
+ {
+ // The following tries to aggressively solve conflicts...
+ $this->_merged = false;
+ $this->solve_conflict();
+ }
+ }
+
+ return $this->_merged;
+ }
+
+ function is_conflict()
+ {
+ return ($this->merged() === false) ? true : false;
+ }
+
+ /**
+ * Function to prepare the arrays for comparing - we want to skip over newline changes
+ * @author acydburn
+ */
+ function solve_prepare()
+ {
+ // We can simplify one case where the array is usually supposed to be empty...
+ if (sizeof($this->orig) == 1 && trim($this->orig[0]) === '') $this->orig = array();
+ if (sizeof($this->final1) == 1 && trim($this->final1[0]) === '') $this->final1 = array();
+ if (sizeof($this->final2) == 1 && trim($this->final2[0]) === '') $this->final2 = array();
+
+ // Now we only can have the case where the only difference between arrays are newlines, so compare all cases
+
+ // First, some strings we can compare...
+ $orig = $final1 = $final2 = '';
+
+ foreach ($this->orig as $null => $line) $orig .= trim($line);
+ foreach ($this->final1 as $null => $line) $final1 .= trim($line);
+ foreach ($this->final2 as $null => $line) $final2 .= trim($line);
+
+ // final1 === final2
+ if ($final1 === $final2)
+ {
+ // We preserve the part which will be used in the merge later
+ $this->final2 = $this->final1;
+ }
+ // final1 === orig
+ else if ($final1 === $orig)
+ {
+ // Here it does not really matter what we choose, but we will use the new code
+ $this->orig = $this->final1;
+ }
+ // final2 === orig
+ else if ($final2 === $orig)
+ {
+ // Here it does not really matter too (final1 will be used), but we will use the new code
+ $this->orig = $this->final2;
+ }
+ }
+
+ /**
+ * Find code portions from $orig in $final1 and use $final2 as merged instance if provided
+ * @author acydburn
+ */
+ function _compare_conflict_seq($orig, $final1, $final2 = false)
+ {
+ $result = array('merge_found' => false, 'merge' => array());
+
+ $_orig = &$this->$orig;
+ $_final1 = &$this->$final1;
+
+ // Ok, we basically search for $orig in $final1
+ $compare_seq = sizeof($_orig);
+
+ // Go through the conflict code
+ for ($i = 0, $j = 0, $size = sizeof($_final1); $i < $size; $i++, $j = $i)
+ {
+ $line = $_final1[$i];
+ $skip = 0;
+
+ for ($x = 0; $x < $compare_seq; $x++)
+ {
+ // Try to skip all matching lines
+ if (trim($line) === trim($_orig[$x]))
+ {
+ $line = (++$j < $size) ? $_final1[$j] : $line;
+ $skip++;
+ }
+ }
+
+ if ($skip === $compare_seq)
+ {
+ $result['merge_found'] = true;
+
+ if ($final2 !== false)
+ {
+ $result['merge'] = array_merge($result['merge'], $this->$final2);
+ }
+ $i += ($skip - 1);
+ }
+ else if ($final2 !== false)
+ {
+ $result['merge'][] = $line;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Tries to solve conflicts aggressively based on typical "assumptions"
+ * @author acydburn
+ */
+ function solve_conflict()
+ {
+ $this->_merged = false;
+
+ // CASE ONE: orig changed into final2, but modified/unknown code in final1.
+ // IF orig is found "as is" in final1 we replace the code directly in final1 and populate this as final2/merge
+ if (sizeof($this->orig) && sizeof($this->final2))
+ {
+ $result = $this->_compare_conflict_seq('orig', 'final1', 'final2');
+
+ if ($result['merge_found'])
+ {
+ $this->final2 = $result['merge'];
+ $this->_merged = &$this->final2;
+ return;
+ }
+
+ $result = $this->_compare_conflict_seq('final2', 'final1');
+
+ if ($result['merge_found'])
+ {
+ $this->_merged = &$this->final1;
+ return;
+ }
+
+ // Try to solve $Id$ issues. ;)
+ if (sizeof($this->orig) == 1 && sizeof($this->final1) == 1 && sizeof($this->final2) == 1)
+ {
+ $match = '#^' . preg_quote('* @version $Id: ', '#') . '[a-z\._\- ]+[0-9]+ [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9\:Z]+ [a-z0-9_\- ]+\$$#';
+
+ if (preg_match($match, $this->orig[0]) && preg_match($match, $this->final1[0]) && preg_match($match, $this->final2[0]))
+ {
+ $this->_merged = &$this->final2;
+ return;
+ }
+ }
+
+ $second_run = false;
+
+ // Try to solve issues where the only reason why the above did not work is a newline being removed in the final1 code but exist in the orig/final2 code
+ if (trim($this->orig[0]) === '' && trim($this->final2[0]) === '')
+ {
+ unset($this->orig[0], $this->final2[0]);
+ $this->orig = array_values($this->orig);
+ $this->final2 = array_values($this->final2);
+
+ $second_run = true;
+ }
+
+ // The same is true for a line at the end. ;)
+ if (sizeof($this->orig) && sizeof($this->final2) && sizeof($this->orig) === sizeof($this->final2) && trim($this->orig[sizeof($this->orig)-1]) === '' && trim($this->final2[sizeof($this->final2)-1]) === '')
+ {
+ unset($this->orig[sizeof($this->orig)-1], $this->final2[sizeof($this->final2)-1]);
+ $this->orig = array_values($this->orig);
+ $this->final2 = array_values($this->final2);
+
+ $second_run = true;
+ }
+
+ if ($second_run)
+ {
+ $result = $this->_compare_conflict_seq('orig', 'final1', 'final2');
+
+ if ($result['merge_found'])
+ {
+ $this->final2 = $result['merge'];
+ $this->_merged = &$this->final2;
+ return;
+ }
+
+ $result = $this->_compare_conflict_seq('final2', 'final1');
+
+ if ($result['merge_found'])
+ {
+ $this->_merged = &$this->final1;
+ return;
+ }
+ }
+
+ return;
+ }
+
+ // CASE TWO: Added lines from orig to final2 but final1 had added lines too. Just merge them.
+ if (!sizeof($this->orig) && $this->final1 !== $this->final2 && sizeof($this->final1) && sizeof($this->final2))
+ {
+ $result = $this->_compare_conflict_seq('final2', 'final1');
+
+ if ($result['merge_found'])
+ {
+ $this->final2 = $this->final1;
+ $this->_merged = &$this->final1;
+ }
+ else
+ {
+ $result = $this->_compare_conflict_seq('final1', 'final2');
+
+ if (!$result['merge_found'])
+ {
+ $this->final2 = array_merge($this->final1, $this->final2);
+ $this->_merged = &$this->final2;
+ }
+ else
+ {
+ $this->final2 = $this->final1;
+ $this->_merged = &$this->final1;
+ }
+ }
+
+ return;
+ }
+
+ // CASE THREE: Removed lines (orig has the to-remove line(s), but final1 has additional lines which does not need to be removed). Just remove orig from final1 and then use final1 as final2/merge
+ if (!sizeof($this->final2) && sizeof($this->orig) && sizeof($this->final1) && $this->orig !== $this->final1)
+ {
+ $result = $this->_compare_conflict_seq('orig', 'final1');
+
+ if (!$result['merge_found'])
+ {
+ return;
+ }
+
+ // First of all, try to find the code in orig in final1. ;)
+ $compare_seq = sizeof($this->orig);
+ $begin = $end = -1;
+ $j = 0;
+
+ for ($i = 0, $size = sizeof($this->final1); $i < $size; $i++)
+ {
+ $line = $this->final1[$i];
+
+ if (trim($line) === trim($this->orig[$j]))
+ {
+ // Mark begin
+ if ($begin === -1)
+ {
+ $begin = $i;
+ }
+
+ // End is always $i, the last found line
+ $end = $i;
+
+ if (isset($this->orig[$j+1]))
+ {
+ $j++;
+ }
+ }
+ }
+
+ if ($begin !== -1 && $begin + ($compare_seq - 1) == $end)
+ {
+ foreach ($this->final1 as $i => $line)
+ {
+ if ($i < $begin || $i > $end)
+ {
+ $merged[] = $line;
+ }
+ }
+
+ $this->final2 = $merged;
+ $this->_merged = &$this->final2;
+ }
+
+ return;
+ }
+
+ return;
+ }
+}
+
+/**
+* @package diff
+* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
+*
+* @access private
+*/
+class diff3_op_copy extends diff3_op
+{
+ function diff3_op_copy($lines = false)
+ {
+ $this->orig = $lines ? $lines : array();
+ $this->final1 = &$this->orig;
+ $this->final2 = &$this->orig;
+ }
+
+ function merged()
+ {
+ return $this->orig;
+ }
+
+ function is_conflict()
+ {
+ return false;
+ }
+}
+
+/**
+* @package diff
+* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
+*
+* @access private
+*/
+class diff3_block_builder
+{
+ function diff3_block_builder()
+ {
+ $this->_init();
+ }
+
+ function input($lines)
+ {
+ if ($lines)
+ {
+ $this->_append($this->orig, $lines);
+ }
+ }
+
+ function out1($lines)
+ {
+ if ($lines)
+ {
+ $this->_append($this->final1, $lines);
+ }
+ }
+
+ function out2($lines)
+ {
+ if ($lines)
+ {
+ $this->_append($this->final2, $lines);
+ }
+ }
+
+ function is_empty()
+ {
+ return !$this->orig && !$this->final1 && !$this->final2;
+ }
+
+ function finish()
+ {
+ if ($this->is_empty())
+ {
+ return false;
+ }
+ else
+ {
+ $edit = new diff3_op($this->orig, $this->final1, $this->final2);
+ $this->_init();
+ return $edit;
+ }
+ }
+
+ function _init()
+ {
+ $this->orig = $this->final1 = $this->final2 = array();
+ }
+
+ function _append(&$array, $lines)
+ {
+ array_splice($array, sizeof($array), 0, $lines);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/diff/engine.php b/phpBB/includes/diff/engine.php
new file mode 100644
index 0000000000..982149457d
--- /dev/null
+++ b/phpBB/includes/diff/engine.php
@@ -0,0 +1,554 @@
+<?php
+/**
+*
+* @package diff
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Code from pear.php.net, Text_Diff-1.1.0 package
+* http://pear.php.net/package/Text_Diff/ (native engine)
+*
+* Modified by phpBB Group to meet our coding standards
+* and being able to integrate into phpBB
+*
+* Class used internally by Text_Diff to actually compute the diffs. This
+* class is implemented using native PHP code.
+*
+* The algorithm used here is mostly lifted from the perl module
+* Algorithm::Diff (version 1.06) by Ned Konz, which is available at:
+* http://www.perl.com/CPAN/authors/id/N/NE/NEDKONZ/Algorithm-Diff-1.06.zip
+*
+* More ideas are taken from: http://www.ics.uci.edu/~eppstein/161/960229.html
+*
+* Some ideas (and a bit of code) are taken from analyze.c, of GNU
+* diffutils-2.7, which can be found at:
+* ftp://gnudist.gnu.org/pub/gnu/diffutils/diffutils-2.7.tar.gz
+*
+* Some ideas (subdivision by NCHUNKS > 2, and some optimizations) are from
+* Geoffrey T. Dairiki <dairiki@dairiki.org>. The original PHP version of this
+* code was written by him, and is used/adapted with his permission.
+*
+* Copyright 2004-2008 The Horde Project (http://www.horde.org/)
+*
+* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
+* @package diff
+*
+* @access private
+*/
+class diff_engine
+{
+ /**
+ * If set to true we trim all lines before we compare them. This ensures that sole space/tab changes do not trigger diffs.
+ */
+ var $skip_whitespace_changes = true;
+
+ function diff(&$from_lines, &$to_lines, $preserve_cr = true)
+ {
+ // Remove empty lines...
+ // If preserve_cr is true, we basically only change \r\n and bare \r to \n to get the same carriage returns for both files
+ // If it is false, we try to only use \n once per line and ommit all empty lines to be able to get a proper data diff
+
+ if (is_array($from_lines))
+ {
+ $from_lines = implode("\n", $from_lines);
+ }
+
+ if (is_array($to_lines))
+ {
+ $to_lines = implode("\n", $to_lines);
+ }
+
+ if ($preserve_cr)
+ {
+ $from_lines = explode("\n", str_replace("\r", "\n", str_replace("\r\n", "\n", $from_lines)));
+ $to_lines = explode("\n", str_replace("\r", "\n", str_replace("\r\n", "\n", $to_lines)));
+ }
+ else
+ {
+ $from_lines = explode("\n", preg_replace('#[\n\r]+#', "\n", $from_lines));
+ $to_lines = explode("\n", preg_replace('#[\n\r]+#', "\n", $to_lines));
+ }
+
+ $n_from = sizeof($from_lines);
+ $n_to = sizeof($to_lines);
+
+ $this->xchanged = $this->ychanged = $this->xv = $this->yv = $this->xind = $this->yind = array();
+ unset($this->seq, $this->in_seq, $this->lcs);
+
+ // Skip leading common lines.
+ for ($skip = 0; $skip < $n_from && $skip < $n_to; $skip++)
+ {
+ if (trim($from_lines[$skip]) !== trim($to_lines[$skip]))
+ {
+ break;
+ }
+ $this->xchanged[$skip] = $this->ychanged[$skip] = false;
+ }
+
+ // Skip trailing common lines.
+ $xi = $n_from;
+ $yi = $n_to;
+
+ for ($endskip = 0; --$xi > $skip && --$yi > $skip; $endskip++)
+ {
+ if (trim($from_lines[$xi]) !== trim($to_lines[$yi]))
+ {
+ break;
+ }
+ $this->xchanged[$xi] = $this->ychanged[$yi] = false;
+ }
+
+ // Ignore lines which do not exist in both files.
+ for ($xi = $skip; $xi < $n_from - $endskip; $xi++)
+ {
+ if ($this->skip_whitespace_changes) $xhash[trim($from_lines[$xi])] = 1; else $xhash[$from_lines[$xi]] = 1;
+ }
+
+ for ($yi = $skip; $yi < $n_to - $endskip; $yi++)
+ {
+ $line = ($this->skip_whitespace_changes) ? trim($to_lines[$yi]) : $to_lines[$yi];
+
+ if (($this->ychanged[$yi] = empty($xhash[$line])))
+ {
+ continue;
+ }
+ $yhash[$line] = 1;
+ $this->yv[] = $line;
+ $this->yind[] = $yi;
+ }
+
+ for ($xi = $skip; $xi < $n_from - $endskip; $xi++)
+ {
+ $line = ($this->skip_whitespace_changes) ? trim($from_lines[$xi]) : $from_lines[$xi];
+
+ if (($this->xchanged[$xi] = empty($yhash[$line])))
+ {
+ continue;
+ }
+ $this->xv[] = $line;
+ $this->xind[] = $xi;
+ }
+
+ // Find the LCS.
+ $this->_compareseq(0, sizeof($this->xv), 0, sizeof($this->yv));
+
+ // Merge edits when possible.
+ if ($this->skip_whitespace_changes)
+ {
+ $from_lines_clean = array_map('trim', $from_lines);
+ $to_lines_clean = array_map('trim', $to_lines);
+
+ $this->_shift_boundaries($from_lines_clean, $this->xchanged, $this->ychanged);
+ $this->_shift_boundaries($to_lines_clean, $this->ychanged, $this->xchanged);
+
+ unset($from_lines_clean, $to_lines_clean);
+ }
+ else
+ {
+ $this->_shift_boundaries($from_lines, $this->xchanged, $this->ychanged);
+ $this->_shift_boundaries($to_lines, $this->ychanged, $this->xchanged);
+ }
+
+ // Compute the edit operations.
+ $edits = array();
+ $xi = $yi = 0;
+
+ while ($xi < $n_from || $yi < $n_to)
+ {
+ // Skip matching "snake".
+ $copy = array();
+
+ while ($xi < $n_from && $yi < $n_to && !$this->xchanged[$xi] && !$this->ychanged[$yi])
+ {
+ $copy[] = $from_lines[$xi++];
+ $yi++;
+ }
+
+ if ($copy)
+ {
+ $edits[] = new diff_op_copy($copy);
+ }
+
+ // Find deletes & adds.
+ $delete = array();
+ while ($xi < $n_from && $this->xchanged[$xi])
+ {
+ $delete[] = $from_lines[$xi++];
+ }
+
+ $add = array();
+ while ($yi < $n_to && $this->ychanged[$yi])
+ {
+ $add[] = $to_lines[$yi++];
+ }
+
+ if ($delete && $add)
+ {
+ $edits[] = new diff_op_change($delete, $add);
+ }
+ else if ($delete)
+ {
+ $edits[] = new diff_op_delete($delete);
+ }
+ else if ($add)
+ {
+ $edits[] = new diff_op_add($add);
+ }
+ }
+
+ return $edits;
+ }
+
+ /**
+ * Divides the Largest Common Subsequence (LCS) of the sequences (XOFF,
+ * XLIM) and (YOFF, YLIM) into NCHUNKS approximately equally sized segments.
+ *
+ * Returns (LCS, PTS). LCS is the length of the LCS. PTS is an array of
+ * NCHUNKS+1 (X, Y) indexes giving the diving points between sub
+ * sequences. The first sub-sequence is contained in (X0, X1), (Y0, Y1),
+ * the second in (X1, X2), (Y1, Y2) and so on. Note that (X0, Y0) ==
+ * (XOFF, YOFF) and (X[NCHUNKS], Y[NCHUNKS]) == (XLIM, YLIM).
+ *
+ * This function assumes that the first lines of the specified portions of
+ * the two files do not match, and likewise that the last lines do not
+ * match. The caller must trim matching lines from the beginning and end
+ * of the portions it is going to specify.
+ */
+ function _diag($xoff, $xlim, $yoff, $ylim, $nchunks)
+ {
+ $flip = false;
+
+ if ($xlim - $xoff > $ylim - $yoff)
+ {
+ // Things seems faster (I'm not sure I understand why) when the shortest sequence is in X.
+ $flip = true;
+ list($xoff, $xlim, $yoff, $ylim) = array($yoff, $ylim, $xoff, $xlim);
+ }
+
+ if ($flip)
+ {
+ for ($i = $ylim - 1; $i >= $yoff; $i--)
+ {
+ $ymatches[$this->xv[$i]][] = $i;
+ }
+ }
+ else
+ {
+ for ($i = $ylim - 1; $i >= $yoff; $i--)
+ {
+ $ymatches[$this->yv[$i]][] = $i;
+ }
+ }
+
+ $this->lcs = 0;
+ $this->seq[0]= $yoff - 1;
+ $this->in_seq = array();
+ $ymids[0] = array();
+
+ $numer = $xlim - $xoff + $nchunks - 1;
+ $x = $xoff;
+
+ for ($chunk = 0; $chunk < $nchunks; $chunk++)
+ {
+ if ($chunk > 0)
+ {
+ for ($i = 0; $i <= $this->lcs; $i++)
+ {
+ $ymids[$i][$chunk - 1] = $this->seq[$i];
+ }
+ }
+
+ $x1 = $xoff + (int)(($numer + ($xlim - $xoff) * $chunk) / $nchunks);
+
+ for (; $x < $x1; $x++)
+ {
+ $line = $flip ? $this->yv[$x] : $this->xv[$x];
+ if (empty($ymatches[$line]))
+ {
+ continue;
+ }
+ $matches = $ymatches[$line];
+
+ reset($matches);
+ while (list(, $y) = each($matches))
+ {
+ if (empty($this->in_seq[$y]))
+ {
+ $k = $this->_lcs_pos($y);
+ $ymids[$k] = $ymids[$k - 1];
+ break;
+ }
+ }
+
+ // no reset() here
+ while (list(, $y) = each($matches))
+ {
+ if ($y > $this->seq[$k - 1])
+ {
+ // Optimization: this is a common case: next match is just replacing previous match.
+ $this->in_seq[$this->seq[$k]] = false;
+ $this->seq[$k] = $y;
+ $this->in_seq[$y] = 1;
+ }
+ else if (empty($this->in_seq[$y]))
+ {
+ $k = $this->_lcs_pos($y);
+ $ymids[$k] = $ymids[$k - 1];
+ }
+ }
+ }
+ }
+
+ $seps[] = $flip ? array($yoff, $xoff) : array($xoff, $yoff);
+ $ymid = $ymids[$this->lcs];
+
+ for ($n = 0; $n < $nchunks - 1; $n++)
+ {
+ $x1 = $xoff + (int)(($numer + ($xlim - $xoff) * $n) / $nchunks);
+ $y1 = $ymid[$n] + 1;
+ $seps[] = $flip ? array($y1, $x1) : array($x1, $y1);
+ }
+ $seps[] = $flip ? array($ylim, $xlim) : array($xlim, $ylim);
+
+ return array($this->lcs, $seps);
+ }
+
+ function _lcs_pos($ypos)
+ {
+ $end = $this->lcs;
+
+ if ($end == 0 || $ypos > $this->seq[$end])
+ {
+ $this->seq[++$this->lcs] = $ypos;
+ $this->in_seq[$ypos] = 1;
+ return $this->lcs;
+ }
+
+ $beg = 1;
+ while ($beg < $end)
+ {
+ $mid = (int)(($beg + $end) / 2);
+ if ($ypos > $this->seq[$mid])
+ {
+ $beg = $mid + 1;
+ }
+ else
+ {
+ $end = $mid;
+ }
+ }
+
+ $this->in_seq[$this->seq[$end]] = false;
+ $this->seq[$end] = $ypos;
+ $this->in_seq[$ypos] = 1;
+
+ return $end;
+ }
+
+ /**
+ * Finds LCS of two sequences.
+ *
+ * The results are recorded in the vectors $this->{x,y}changed[], by
+ * storing a 1 in the element for each line that is an insertion or
+ * deletion (ie. is not in the LCS).
+ *
+ * The subsequence of file 0 is (XOFF, XLIM) and likewise for file 1.
+ *
+ * Note that XLIM, YLIM are exclusive bounds. All line numbers are
+ * origin-0 and discarded lines are not counted.
+ */
+ function _compareseq($xoff, $xlim, $yoff, $ylim)
+ {
+ // Slide down the bottom initial diagonal.
+ while ($xoff < $xlim && $yoff < $ylim && $this->xv[$xoff] == $this->yv[$yoff])
+ {
+ ++$xoff;
+ ++$yoff;
+ }
+
+ // Slide up the top initial diagonal.
+ while ($xlim > $xoff && $ylim > $yoff && $this->xv[$xlim - 1] == $this->yv[$ylim - 1])
+ {
+ --$xlim;
+ --$ylim;
+ }
+
+ if ($xoff == $xlim || $yoff == $ylim)
+ {
+ $lcs = 0;
+ }
+ else
+ {
+ // This is ad hoc but seems to work well.
+ // $nchunks = sqrt(min($xlim - $xoff, $ylim - $yoff) / 2.5);
+ // $nchunks = max(2,min(8,(int)$nchunks));
+ $nchunks = min(7, $xlim - $xoff, $ylim - $yoff) + 1;
+ list($lcs, $seps) = $this->_diag($xoff, $xlim, $yoff, $ylim, $nchunks);
+ }
+
+ if ($lcs == 0)
+ {
+ // X and Y sequences have no common subsequence: mark all changed.
+ while ($yoff < $ylim)
+ {
+ $this->ychanged[$this->yind[$yoff++]] = 1;
+ }
+
+ while ($xoff < $xlim)
+ {
+ $this->xchanged[$this->xind[$xoff++]] = 1;
+ }
+ }
+ else
+ {
+ // Use the partitions to split this problem into subproblems.
+ reset($seps);
+ $pt1 = $seps[0];
+
+ while ($pt2 = next($seps))
+ {
+ $this->_compareseq($pt1[0], $pt2[0], $pt1[1], $pt2[1]);
+ $pt1 = $pt2;
+ }
+ }
+ }
+
+ /**
+ * Adjusts inserts/deletes of identical lines to join changes as much as possible.
+ *
+ * We do something when a run of changed lines include a line at one end
+ * and has an excluded, identical line at the other. We are free to
+ * choose which identical line is included. 'compareseq' usually chooses
+ * the one at the beginning, but usually it is cleaner to consider the
+ * following identical line to be the "change".
+ *
+ * This is extracted verbatim from analyze.c (GNU diffutils-2.7).
+ */
+ function _shift_boundaries($lines, &$changed, $other_changed)
+ {
+ $i = 0;
+ $j = 0;
+
+ $len = sizeof($lines);
+ $other_len = sizeof($other_changed);
+
+ while (1)
+ {
+ // Scan forward to find the beginning of another run of
+ // changes. Also keep track of the corresponding point in the other file.
+ //
+ // Throughout this code, $i and $j are adjusted together so that
+ // the first $i elements of $changed and the first $j elements of
+ // $other_changed both contain the same number of zeros (unchanged lines).
+ //
+ // Furthermore, $j is always kept so that $j == $other_len or $other_changed[$j] == false.
+ while ($j < $other_len && $other_changed[$j])
+ {
+ $j++;
+ }
+
+ while ($i < $len && ! $changed[$i])
+ {
+ $i++;
+ $j++;
+
+ while ($j < $other_len && $other_changed[$j])
+ {
+ $j++;
+ }
+ }
+
+ if ($i == $len)
+ {
+ break;
+ }
+
+ $start = $i;
+
+ // Find the end of this run of changes.
+ while (++$i < $len && $changed[$i])
+ {
+ continue;
+ }
+
+ do
+ {
+ // Record the length of this run of changes, so that we can later determine whether the run has grown.
+ $runlength = $i - $start;
+
+ // Move the changed region back, so long as the previous unchanged line matches the last changed one.
+ // This merges with previous changed regions.
+ while ($start > 0 && $lines[$start - 1] == $lines[$i - 1])
+ {
+ $changed[--$start] = 1;
+ $changed[--$i] = false;
+
+ while ($start > 0 && $changed[$start - 1])
+ {
+ $start--;
+ }
+
+ while ($other_changed[--$j])
+ {
+ continue;
+ }
+ }
+
+ // Set CORRESPONDING to the end of the changed run, at the last point where it corresponds to a changed run in the
+ // other file. CORRESPONDING == LEN means no such point has been found.
+ $corresponding = $j < $other_len ? $i : $len;
+
+ // Move the changed region forward, so long as the first changed line matches the following unchanged one.
+ // This merges with following changed regions.
+ // Do this second, so that if there are no merges, the changed region is moved forward as far as possible.
+ while ($i < $len && $lines[$start] == $lines[$i])
+ {
+ $changed[$start++] = false;
+ $changed[$i++] = 1;
+
+ while ($i < $len && $changed[$i])
+ {
+ $i++;
+ }
+
+ $j++;
+ if ($j < $other_len && $other_changed[$j])
+ {
+ $corresponding = $i;
+ while ($j < $other_len && $other_changed[$j])
+ {
+ $j++;
+ }
+ }
+ }
+ }
+ while ($runlength != $i - $start);
+
+ // If possible, move the fully-merged run of changes back to a corresponding run in the other file.
+ while ($corresponding < $i)
+ {
+ $changed[--$start] = 1;
+ $changed[--$i] = 0;
+
+ while ($other_changed[--$j])
+ {
+ continue;
+ }
+ }
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/diff/renderer.php b/phpBB/includes/diff/renderer.php
new file mode 100644
index 0000000000..5cb1b6ada9
--- /dev/null
+++ b/phpBB/includes/diff/renderer.php
@@ -0,0 +1,860 @@
+<?php
+/**
+*
+* @package diff
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Code from pear.php.net, Text_Diff-1.1.0 package
+* http://pear.php.net/package/Text_Diff/
+*
+* Modified by phpBB Group to meet our coding standards
+* and being able to integrate into phpBB
+*
+* A class to render Diffs in different formats.
+*
+* This class renders the diff in classic diff format. It is intended that
+* this class be customized via inheritance, to obtain fancier outputs.
+*
+* Copyright 2004-2008 The Horde Project (http://www.horde.org/)
+*
+* @package diff
+*/
+class diff_renderer
+{
+ /**
+ * Number of leading context "lines" to preserve.
+ *
+ * This should be left at zero for this class, but subclasses may want to
+ * set this to other values.
+ */
+ var $_leading_context_lines = 0;
+
+ /**
+ * Number of trailing context "lines" to preserve.
+ *
+ * This should be left at zero for this class, but subclasses may want to
+ * set this to other values.
+ */
+ var $_trailing_context_lines = 0;
+
+ /**
+ * Constructor.
+ */
+ function diff_renderer($params = array())
+ {
+ foreach ($params as $param => $value)
+ {
+ $v = '_' . $param;
+ if (isset($this->$v))
+ {
+ $this->$v = $value;
+ }
+ }
+ }
+
+ /**
+ * Get any renderer parameters.
+ *
+ * @return array All parameters of this renderer object.
+ */
+ function get_params()
+ {
+ $params = array();
+ foreach (get_object_vars($this) as $k => $v)
+ {
+ if ($k[0] == '_')
+ {
+ $params[substr($k, 1)] = $v;
+ }
+ }
+
+ return $params;
+ }
+
+ /**
+ * Renders a diff.
+ *
+ * @param diff &$diff A diff object.
+ *
+ * @return string The formatted output.
+ */
+ function render(&$diff)
+ {
+ $xi = $yi = 1;
+ $block = false;
+ $context = array();
+
+ // Create a new diff object if it is a 3-way diff
+ if (is_a($diff, 'diff3'))
+ {
+ $diff3 = &$diff;
+
+ $diff_1 = $diff3->get_original();
+ $diff_2 = $diff3->merged_output();
+
+ unset($diff3);
+
+ $diff = new diff($diff_1, $diff_2);
+ }
+
+ $nlead = $this->_leading_context_lines;
+ $ntrail = $this->_trailing_context_lines;
+
+ $output = $this->_start_diff();
+ $diffs = $diff->get_diff();
+
+ foreach ($diffs as $i => $edit)
+ {
+ // If these are unchanged (copied) lines, and we want to keep leading or trailing context lines, extract them from the copy block.
+ if (is_a($edit, 'diff_op_copy'))
+ {
+ // Do we have any diff blocks yet?
+ if (is_array($block))
+ {
+ // How many lines to keep as context from the copy block.
+ $keep = ($i == sizeof($diffs) - 1) ? $ntrail : $nlead + $ntrail;
+ if (sizeof($edit->orig) <= $keep)
+ {
+ // We have less lines in the block than we want for context => keep the whole block.
+ $block[] = $edit;
+ }
+ else
+ {
+ if ($ntrail)
+ {
+ // Create a new block with as many lines as we need for the trailing context.
+ $context = array_slice($edit->orig, 0, $ntrail);
+ $block[] = new diff_op_copy($context);
+ }
+
+ $output .= $this->_block($x0, $ntrail + $xi - $x0, $y0, $ntrail + $yi - $y0, $block);
+ $block = false;
+ }
+ }
+ // Keep the copy block as the context for the next block.
+ $context = $edit->orig;
+ }
+ else
+ {
+ // Don't we have any diff blocks yet?
+ if (!is_array($block))
+ {
+ // Extract context lines from the preceding copy block.
+ $context = array_slice($context, sizeof($context) - $nlead);
+ $x0 = $xi - sizeof($context);
+ $y0 = $yi - sizeof($context);
+ $block = array();
+
+ if ($context)
+ {
+ $block[] = new diff_op_copy($context);
+ }
+ }
+ $block[] = $edit;
+ }
+
+ $xi += ($edit->orig) ? sizeof($edit->orig) : 0;
+ $yi += ($edit->final) ? sizeof($edit->final) : 0;
+ }
+
+ if (is_array($block))
+ {
+ $output .= $this->_block($x0, $xi - $x0, $y0, $yi - $y0, $block);
+ }
+
+ return $output . $this->_end_diff();
+ }
+
+ function _block($xbeg, $xlen, $ybeg, $ylen, &$edits)
+ {
+ $output = $this->_start_block($this->_block_header($xbeg, $xlen, $ybeg, $ylen));
+
+ foreach ($edits as $edit)
+ {
+ switch (get_class($edit))
+ {
+ case 'diff_op_copy':
+ $output .= $this->_context($edit->orig);
+ break;
+
+ case 'diff_op_add':
+ $output .= $this->_added($edit->final);
+ break;
+
+ case 'diff_op_delete':
+ $output .= $this->_deleted($edit->orig);
+ break;
+
+ case 'diff_op_change':
+ $output .= $this->_changed($edit->orig, $edit->final);
+ break;
+ }
+ }
+
+ return $output . $this->_end_block();
+ }
+
+ function _start_diff()
+ {
+ return '';
+ }
+
+ function _end_diff()
+ {
+ return '';
+ }
+
+ function _block_header($xbeg, $xlen, $ybeg, $ylen)
+ {
+ if ($xlen > 1)
+ {
+ $xbeg .= ',' . ($xbeg + $xlen - 1);
+ }
+
+ if ($ylen > 1)
+ {
+ $ybeg .= ',' . ($ybeg + $ylen - 1);
+ }
+
+ // this matches the GNU Diff behaviour
+ if ($xlen && !$ylen)
+ {
+ $ybeg--;
+ }
+ else if (!$xlen)
+ {
+ $xbeg--;
+ }
+
+ return $xbeg . ($xlen ? ($ylen ? 'c' : 'd') : 'a') . $ybeg;
+ }
+
+ function _start_block($header)
+ {
+ return $header . "\n";
+ }
+
+ function _end_block()
+ {
+ return '';
+ }
+
+ function _lines($lines, $prefix = ' ')
+ {
+ return $prefix . implode("\n$prefix", $lines) . "\n";
+ }
+
+ function _context($lines)
+ {
+ return $this->_lines($lines, ' ');
+ }
+
+ function _added($lines)
+ {
+ return $this->_lines($lines, '> ');
+ }
+
+ function _deleted($lines)
+ {
+ return $this->_lines($lines, '< ');
+ }
+
+ function _changed($orig, $final)
+ {
+ return $this->_deleted($orig) . "---\n" . $this->_added($final);
+ }
+
+ /**
+ * Our function to get the diff
+ */
+ function get_diff_content($diff)
+ {
+ return $this->render($diff);
+ }
+}
+
+/**
+* Renders a unified diff
+* @package diff
+*/
+class diff_renderer_unified extends diff_renderer
+{
+ var $_leading_context_lines = 4;
+ var $_trailing_context_lines = 4;
+
+ /**
+ * Our function to get the diff
+ */
+ function get_diff_content($diff)
+ {
+ return nl2br($this->render($diff));
+ }
+
+ function _block_header($xbeg, $xlen, $ybeg, $ylen)
+ {
+ if ($xlen != 1)
+ {
+ $xbeg .= ',' . $xlen;
+ }
+
+ if ($ylen != 1)
+ {
+ $ybeg .= ',' . $ylen;
+ }
+ return '<div class="diff"><big class="info">@@ -' . $xbeg . ' +' . $ybeg . ' @@</big></div>';
+ }
+
+ function _context($lines)
+ {
+ return '<pre class="diff context">' . htmlspecialchars($this->_lines($lines, ' ')) . '<br /></pre>';
+ }
+
+ function _added($lines)
+ {
+ return '<pre class="diff added">' . htmlspecialchars($this->_lines($lines, '+')) . '<br /></pre>';
+ }
+
+ function _deleted($lines)
+ {
+ return '<pre class="diff removed">' . htmlspecialchars($this->_lines($lines, '-')) . '<br /></pre>';
+ }
+
+ function _changed($orig, $final)
+ {
+ return $this->_deleted($orig) . $this->_added($final);
+ }
+
+ function _start_diff()
+ {
+ $start = '<div class="file">';
+
+ return $start;
+ }
+
+ function _end_diff()
+ {
+ return '</div>';
+ }
+
+ function _end_block()
+ {
+ return '';
+ }
+}
+
+/**
+* "Inline" diff renderer.
+*
+* This class renders diffs in the Wiki-style "inline" format.
+*
+* @author Ciprian Popovici
+* @package diff
+*/
+class diff_renderer_inline extends diff_renderer
+{
+ var $_leading_context_lines = 10000;
+ var $_trailing_context_lines = 10000;
+
+ // Prefix and suffix for inserted text
+ var $_ins_prefix = '<span class="ins">';
+ var $_ins_suffix = '</span>';
+
+ // Prefix and suffix for deleted text
+ var $_del_prefix = '<span class="del">';
+ var $_del_suffix = '</span>';
+
+ var $_block_head = '';
+
+ // What are we currently splitting on? Used to recurse to show word-level
+ var $_split_level = 'lines';
+
+ /**
+ * Our function to get the diff
+ */
+ function get_diff_content($diff)
+ {
+ return '<pre>' . nl2br($this->render($diff)) . '<br /></pre>';
+ }
+
+ function _start_diff()
+ {
+ return '';
+ }
+
+ function _end_diff()
+ {
+ return '';
+ }
+
+ function _block_header($xbeg, $xlen, $ybeg, $ylen)
+ {
+ return $this->_block_head;
+ }
+
+ function _start_block($header)
+ {
+ return $header;
+ }
+
+ function _lines($lines, $prefix = ' ', $encode = true)
+ {
+ if ($encode)
+ {
+ array_walk($lines, array(&$this, '_encode'));
+ }
+
+ if ($this->_split_level == 'words')
+ {
+ return implode('', $lines);
+ }
+ else
+ {
+ return implode("\n", $lines) . "\n";
+ }
+ }
+
+ function _added($lines)
+ {
+ array_walk($lines, array(&$this, '_encode'));
+ $lines[0] = $this->_ins_prefix . $lines[0];
+ $lines[sizeof($lines) - 1] .= $this->_ins_suffix;
+ return $this->_lines($lines, ' ', false);
+ }
+
+ function _deleted($lines, $words = false)
+ {
+ array_walk($lines, array(&$this, '_encode'));
+ $lines[0] = $this->_del_prefix . $lines[0];
+ $lines[sizeof($lines) - 1] .= $this->_del_suffix;
+ return $this->_lines($lines, ' ', false);
+ }
+
+ function _changed($orig, $final)
+ {
+ // If we've already split on words, don't try to do so again - just display.
+ if ($this->_split_level == 'words')
+ {
+ $prefix = '';
+ while ($orig[0] !== false && $final[0] !== false && substr($orig[0], 0, 1) == ' ' && substr($final[0], 0, 1) == ' ')
+ {
+ $prefix .= substr($orig[0], 0, 1);
+ $orig[0] = substr($orig[0], 1);
+ $final[0] = substr($final[0], 1);
+ }
+
+ return $prefix . $this->_deleted($orig) . $this->_added($final);
+ }
+
+ $text1 = implode("\n", $orig);
+ $text2 = implode("\n", $final);
+
+ // Non-printing newline marker.
+ $nl = "\0";
+
+ // We want to split on word boundaries, but we need to preserve whitespace as well.
+ // Therefore we split on words, but include all blocks of whitespace in the wordlist.
+ $splitted_text_1 = $this->_split_on_words($text1, $nl);
+ $splitted_text_2 = $this->_split_on_words($text2, $nl);
+
+ $diff = new diff($splitted_text_1, $splitted_text_2);
+ unset($splitted_text_1, $splitted_text_2);
+
+ // Get the diff in inline format.
+ $renderer = new diff_renderer_inline(array_merge($this->get_params(), array('split_level' => 'words')));
+
+ // Run the diff and get the output.
+ return str_replace($nl, "\n", $renderer->render($diff)) . "\n";
+ }
+
+ function _split_on_words($string, $newline_escape = "\n")
+ {
+ // Ignore \0; otherwise the while loop will never finish.
+ $string = str_replace("\0", '', $string);
+
+ $words = array();
+ $length = strlen($string);
+ $pos = 0;
+
+ $tab_there = true;
+ while ($pos < $length)
+ {
+ // Check for tabs... do not include them
+ if ($tab_there && substr($string, $pos, 1) === "\t")
+ {
+ $words[] = "\t";
+ $pos++;
+
+ continue;
+ }
+ else
+ {
+ $tab_there = false;
+ }
+
+ // Eat a word with any preceding whitespace.
+ $spaces = strspn(substr($string, $pos), " \n");
+ $nextpos = strcspn(substr($string, $pos + $spaces), " \n");
+ $words[] = str_replace("\n", $newline_escape, substr($string, $pos, $spaces + $nextpos));
+ $pos += $spaces + $nextpos;
+ }
+
+ return $words;
+ }
+
+ function _encode(&$string)
+ {
+ $string = htmlspecialchars($string);
+ }
+}
+
+/**
+* "raw" diff renderer.
+* This class could be used to output a raw unified patch file
+*
+* @package diff
+*/
+class diff_renderer_raw extends diff_renderer
+{
+ var $_leading_context_lines = 4;
+ var $_trailing_context_lines = 4;
+
+ /**
+ * Our function to get the diff
+ */
+ function get_diff_content($diff)
+ {
+ return '<textarea style="height: 290px;" rows="15" cols="76" class="full">' . htmlspecialchars($this->render($diff)) . '</textarea>';
+ }
+
+ function _block_header($xbeg, $xlen, $ybeg, $ylen)
+ {
+ if ($xlen != 1)
+ {
+ $xbeg .= ',' . $xlen;
+ }
+
+ if ($ylen != 1)
+ {
+ $ybeg .= ',' . $ylen;
+ }
+ return '@@ -' . $xbeg . ' +' . $ybeg . ' @@';
+ }
+
+ function _context($lines)
+ {
+ return $this->_lines($lines, ' ');
+ }
+
+ function _added($lines)
+ {
+ return $this->_lines($lines, '+');
+ }
+
+ function _deleted($lines)
+ {
+ return $this->_lines($lines, '-');
+ }
+
+ function _changed($orig, $final)
+ {
+ return $this->_deleted($orig) . $this->_added($final);
+ }
+}
+
+/**
+* "chora (Horde)" diff renderer - similar style.
+* This renderer class is a modified human_readable function from the Horde Framework.
+*
+* @package diff
+*/
+class diff_renderer_side_by_side extends diff_renderer
+{
+ var $_leading_context_lines = 3;
+ var $_trailing_context_lines = 3;
+
+ var $lines = array();
+
+ // Hold the left and right columns of lines for change blocks.
+ var $cols;
+ var $state;
+
+ var $data = false;
+
+ /**
+ * Our function to get the diff
+ */
+ function get_diff_content($diff)
+ {
+ global $user;
+
+ $output = '';
+ $output .= '<table cellspacing="0" class="hrdiff">
+<caption>
+ <span class="unmodified">&nbsp;</span> ' . $user->lang['LINE_UNMODIFIED'] . '
+ <span class="added">&nbsp;</span> ' . $user->lang['LINE_ADDED'] . '
+ <span class="modified">&nbsp;</span> ' . $user->lang['LINE_MODIFIED'] . '
+ <span class="removed">&nbsp;</span> ' . $user->lang['LINE_REMOVED'] . '
+</caption>
+<tbody>
+';
+
+ $this->render($diff);
+
+ // Is the diff empty?
+ if (!sizeof($this->lines))
+ {
+ $output .= '<tr><th colspan="2">' . $user->lang['NO_VISIBLE_CHANGES'] . '</th></tr>';
+ }
+ else
+ {
+ // Iterate through every header block of changes
+ foreach ($this->lines as $header)
+ {
+ $output .= '<tr><th>' . $user->lang['LINE'] . ' ' . $header['oldline'] . '</th><th>' . $user->lang['LINE'] . ' ' . $header['newline'] . '</th></tr>';
+
+ // Each header block consists of a number of changes (add, remove, change).
+ $current_context = '';
+
+ foreach ($header['contents'] as $change)
+ {
+ if (!empty($current_context) && $change['type'] != 'empty')
+ {
+ $line = $current_context;
+ $current_context = '';
+
+ $output .= '<tr class="unmodified"><td><pre>' . ((strlen($line)) ? $line : '&nbsp;') . '<br /></pre></td>
+ <td><pre>' . ((strlen($line)) ? $line : '&nbsp;') . '<br /></pre></td></tr>';
+ }
+
+ switch ($change['type'])
+ {
+ case 'add':
+ $line = '';
+
+ foreach ($change['lines'] as $_line)
+ {
+ $line .= htmlspecialchars($_line) . '<br />';
+ }
+
+ $output .= '<tr><td class="added_empty">&nbsp;</td><td class="added"><pre>' . ((strlen($line)) ? $line : '&nbsp;') . '<br /></pre></td></tr>';
+ break;
+
+ case 'remove':
+ $line = '';
+
+ foreach ($change['lines'] as $_line)
+ {
+ $line .= htmlspecialchars($_line) . '<br />';
+ }
+
+ $output .= '<tr><td class="removed"><pre>' . ((strlen($line)) ? $line : '&nbsp;') . '<br /></pre></td><td class="removed_empty">&nbsp;</td></tr>';
+ break;
+
+ case 'empty':
+ $current_context .= htmlspecialchars($change['line']) . '<br />';
+ break;
+
+ case 'change':
+ // Pop the old/new stacks one by one, until both are empty.
+ $oldsize = sizeof($change['old']);
+ $newsize = sizeof($change['new']);
+ $left = $right = '';
+
+ for ($row = 0, $row_max = max($oldsize, $newsize); $row < $row_max; ++$row)
+ {
+ $left .= isset($change['old'][$row]) ? htmlspecialchars($change['old'][$row]) : '';
+ $left .= '<br />';
+ $right .= isset($change['new'][$row]) ? htmlspecialchars($change['new'][$row]) : '';
+ $right .= '<br />';
+ }
+
+ $output .= '<tr>';
+
+ if (!empty($left))
+ {
+ $output .= '<td class="modified"><pre>' . $left . '<br /></pre></td>';
+ }
+ else if ($row < $oldsize)
+ {
+ $output .= '<td class="modified">&nbsp;</td>';
+ }
+ else
+ {
+ $output .= '<td class="unmodified">&nbsp;</td>';
+ }
+
+ if (!empty($right))
+ {
+ $output .= '<td class="modified"><pre>' . $right . '<br /></pre></td>';
+ }
+ else if ($row < $newsize)
+ {
+ $output .= '<td class="modified">&nbsp;</td>';
+ }
+ else
+ {
+ $output .= '<td class="unmodified">&nbsp;</td>';
+ }
+
+ $output .= '</tr>';
+ break;
+ }
+ }
+
+ if (!empty($current_context))
+ {
+ $line = $current_context;
+ $current_context = '';
+
+ $output .= '<tr class="unmodified"><td><pre>' . ((strlen($line)) ? $line : '&nbsp;') . '<br /></pre></td>';
+ $output .= '<td><pre>' . ((strlen($line)) ? $line : '&nbsp;') . '<br /></pre></td></tr>';
+ }
+ }
+ }
+
+ $output .= '</tbody></table>';
+
+ return $output;
+ }
+
+ function _start_diff()
+ {
+ $this->lines = array();
+
+ $this->data = false;
+ $this->cols = array(array(), array());
+ $this->state = 'empty';
+
+ return '';
+ }
+
+ function _end_diff()
+ {
+ // Just flush any remaining entries in the columns stack.
+ switch ($this->state)
+ {
+ case 'add':
+ $this->data['contents'][] = array('type' => 'add', 'lines' => $this->cols[0]);
+ break;
+
+ case 'remove':
+ // We have some removal lines pending in our stack, so flush them.
+ $this->data['contents'][] = array('type' => 'remove', 'lines' => $this->cols[0]);
+ break;
+
+ case 'change':
+ // We have both remove and addition lines, so this is a change block.
+ $this->data['contents'][] = array('type' => 'change', 'old' => $this->cols[0], 'new' => $this->cols[1]);
+ break;
+ }
+
+ if ($this->data !== false)
+ {
+ $this->lines[] = $this->data;
+ }
+
+ return '';
+ }
+
+ function _block_header($xbeg, $xlen, $ybeg, $ylen)
+ {
+ // Push any previous header information to the return stack.
+ if ($this->data !== false)
+ {
+ $this->lines[] = $this->data;
+ }
+
+ $this->data = array('type' => 'header', 'oldline' => $xbeg, 'newline' => $ybeg, 'contents' => array());
+ $this->state = 'dump';
+ }
+
+ function _added($lines)
+ {
+ array_walk($lines, array(&$this, '_perform_add'));
+ }
+
+ function _perform_add($line)
+ {
+ if ($this->state == 'empty')
+ {
+ return '';
+ }
+
+ // This is just an addition line.
+ if ($this->state == 'dump' || $this->state == 'add')
+ {
+ // Start adding to the addition stack.
+ $this->cols[0][] = $line;
+ $this->state = 'add';
+ }
+ else
+ {
+ // This is inside a change block, so start accumulating lines.
+ $this->state = 'change';
+ $this->cols[1][] = $line;
+ }
+ }
+
+ function _deleted($lines)
+ {
+ array_walk($lines, array(&$this, '_perform_delete'));
+ }
+
+ function _perform_delete($line)
+ {
+ // This is a removal line.
+ $this->state = 'remove';
+ $this->cols[0][] = $line;
+ }
+
+ function _context($lines)
+ {
+ array_walk($lines, array(&$this, '_perform_context'));
+ }
+
+ function _perform_context($line)
+ {
+ // An empty block with no action.
+ switch ($this->state)
+ {
+ case 'add':
+ $this->data['contents'][] = array('type' => 'add', 'lines' => $this->cols[0]);
+ break;
+
+ case 'remove':
+ // We have some removal lines pending in our stack, so flush them.
+ $this->data['contents'][] = array('type' => 'remove', 'lines' => $this->cols[0]);
+ break;
+
+ case 'change':
+ // We have both remove and addition lines, so this is a change block.
+ $this->data['contents'][] = array('type' => 'change', 'old' => $this->cols[0], 'new' => $this->cols[1]);
+ break;
+ }
+
+ $this->cols = array(array(), array());
+ $this->data['contents'][] = array('type' => 'empty', 'line' => $line);
+ $this->state = 'dump';
+ }
+
+ function _changed($orig, $final)
+ {
+ return $this->_deleted($orig) . $this->_added($final);
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
new file mode 100644
index 0000000000..e787932441
--- /dev/null
+++ b/phpBB/includes/functions.php
@@ -0,0 +1,4367 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+// Common global functions
+
+/**
+* set_var
+*
+* Set variable, used by {@link request_var the request_var function}
+*
+* @access private
+*/
+function set_var(&$result, $var, $type, $multibyte = false)
+{
+ settype($var, $type);
+ $result = $var;
+
+ if ($type == 'string')
+ {
+ $result = trim(htmlspecialchars(str_replace(array("\r\n", "\r", "\0"), array("\n", "\n", ''), $result), ENT_COMPAT, 'UTF-8'));
+
+ if (!empty($result))
+ {
+ // Make sure multibyte characters are wellformed
+ if ($multibyte)
+ {
+ if (!preg_match('/^./u', $result))
+ {
+ $result = '';
+ }
+ }
+ else
+ {
+ // no multibyte, allow only ASCII (0-127)
+ $result = preg_replace('/[\x80-\xFF]/', '?', $result);
+ }
+ }
+
+ $result = (STRIP) ? stripslashes($result) : $result;
+ }
+}
+
+/**
+* request_var
+*
+* Used to get passed variable
+*/
+function request_var($var_name, $default, $multibyte = false, $cookie = false)
+{
+ if (!$cookie && isset($_COOKIE[$var_name]))
+ {
+ if (!isset($_GET[$var_name]) && !isset($_POST[$var_name]))
+ {
+ return (is_array($default)) ? array() : $default;
+ }
+ $_REQUEST[$var_name] = isset($_POST[$var_name]) ? $_POST[$var_name] : $_GET[$var_name];
+ }
+
+ $super_global = ($cookie) ? '_COOKIE' : '_REQUEST';
+ if (!isset($GLOBALS[$super_global][$var_name]) || is_array($GLOBALS[$super_global][$var_name]) != is_array($default))
+ {
+ return (is_array($default)) ? array() : $default;
+ }
+
+ $var = $GLOBALS[$super_global][$var_name];
+ if (!is_array($default))
+ {
+ $type = gettype($default);
+ }
+ else
+ {
+ list($key_type, $type) = each($default);
+ $type = gettype($type);
+ $key_type = gettype($key_type);
+ if ($type == 'array')
+ {
+ reset($default);
+ $default = current($default);
+ list($sub_key_type, $sub_type) = each($default);
+ $sub_type = gettype($sub_type);
+ $sub_type = ($sub_type == 'array') ? 'NULL' : $sub_type;
+ $sub_key_type = gettype($sub_key_type);
+ }
+ }
+
+ if (is_array($var))
+ {
+ $_var = $var;
+ $var = array();
+
+ foreach ($_var as $k => $v)
+ {
+ set_var($k, $k, $key_type);
+ if ($type == 'array' && is_array($v))
+ {
+ foreach ($v as $_k => $_v)
+ {
+ if (is_array($_v))
+ {
+ $_v = null;
+ }
+ set_var($_k, $_k, $sub_key_type);
+ set_var($var[$k][$_k], $_v, $sub_type, $multibyte);
+ }
+ }
+ else
+ {
+ if ($type == 'array' || is_array($v))
+ {
+ $v = null;
+ }
+ set_var($var[$k], $v, $type, $multibyte);
+ }
+ }
+ }
+ else
+ {
+ set_var($var, $var, $type, $multibyte);
+ }
+
+ return $var;
+}
+
+/**
+* Set config value. Creates missing config entry.
+*/
+function set_config($config_name, $config_value, $is_dynamic = false)
+{
+ global $db, $cache, $config;
+
+ $sql = 'UPDATE ' . CONFIG_TABLE . "
+ SET config_value = '" . $db->sql_escape($config_value) . "'
+ WHERE config_name = '" . $db->sql_escape($config_name) . "'";
+ $db->sql_query($sql);
+
+ if (!$db->sql_affectedrows() && !isset($config[$config_name]))
+ {
+ $sql = 'INSERT INTO ' . CONFIG_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'config_name' => $config_name,
+ 'config_value' => $config_value,
+ 'is_dynamic' => ($is_dynamic) ? 1 : 0));
+ $db->sql_query($sql);
+ }
+
+ $config[$config_name] = $config_value;
+
+ if (!$is_dynamic)
+ {
+ $cache->destroy('config');
+ }
+}
+
+/**
+* Set dynamic config value with arithmetic operation.
+*/
+function set_config_count($config_name, $increment, $is_dynamic = false)
+{
+ global $db, $cache;
+
+ switch ($db->sql_layer)
+ {
+ case 'firebird':
+ $sql_update = 'CAST(CAST(config_value as integer) + ' . (int) $increment . ' as VARCHAR(255))';
+ break;
+
+ case 'postgres':
+ $sql_update = 'int4(config_value) + ' . (int) $increment;
+ break;
+
+ // MySQL, SQlite, mssql, mssql_odbc, oracle
+ default:
+ $sql_update = 'config_value + ' . (int) $increment;
+ break;
+ }
+
+ $db->sql_query('UPDATE ' . CONFIG_TABLE . ' SET config_value = ' . $sql_update . " WHERE config_name = '" . $db->sql_escape($config_name) . "'");
+
+ if (!$is_dynamic)
+ {
+ $cache->destroy('config');
+ }
+}
+
+/**
+* Generates an alphanumeric random string of given length
+*/
+function gen_rand_string($num_chars = 8)
+{
+ $rand_str = unique_id();
+ $rand_str = str_replace('0', 'Z', strtoupper(base_convert($rand_str, 16, 35)));
+
+ return substr($rand_str, 0, $num_chars);
+}
+
+/**
+* Return unique id
+* @param string $extra additional entropy
+*/
+function unique_id($extra = 'c')
+{
+ static $dss_seeded = false;
+ global $config;
+
+ $val = $config['rand_seed'] . microtime();
+ $val = md5($val);
+ $config['rand_seed'] = md5($config['rand_seed'] . $val . $extra);
+
+ if ($dss_seeded !== true && ($config['rand_seed_last_update'] < time() - rand(1,10)))
+ {
+ set_config('rand_seed', $config['rand_seed'], true);
+ set_config('rand_seed_last_update', time(), true);
+ $dss_seeded = true;
+ }
+
+ return substr($val, 4, 16);
+}
+
+/**
+* Return formatted string for filesizes
+*
+* @param int $value filesize in bytes
+* @param bool $string_only true if language string should be returned
+* @param array $allowed_units only allow these units (data array indexes)
+*
+* @return mixed data array if $string_only is false
+* @author bantu
+*/
+function get_formatted_filesize($value, $string_only = true, $allowed_units = false)
+{
+ global $user;
+
+ $available_units = array(
+ 'gb' => array(
+ 'min' => 1073741824, // pow(2, 30)
+ 'index' => 3,
+ 'si_unit' => 'GB',
+ 'iec_unit' => 'GIB',
+ ),
+ 'mb' => array(
+ 'min' => 1048576, // pow(2, 20)
+ 'index' => 2,
+ 'si_unit' => 'MB',
+ 'iec_unit' => 'MIB',
+ ),
+ 'kb' => array(
+ 'min' => 1024, // pow(2, 10)
+ 'index' => 1,
+ 'si_unit' => 'KB',
+ 'iec_unit' => 'KIB',
+ ),
+ 'b' => array(
+ 'min' => 0,
+ 'index' => 0,
+ 'si_unit' => 'BYTES', // Language index
+ 'iec_unit' => 'BYTES', // Language index
+ ),
+ );
+
+ foreach ($available_units as $si_identifier => $unit_info)
+ {
+ if (!empty($allowed_units) && $si_identifier != 'b' && !in_array($si_identifier, $allowed_units))
+ {
+ continue;
+ }
+
+ if ($value >= $unit_info['min'])
+ {
+ $unit_info['si_identifier'] = $si_identifier;
+
+ break;
+ }
+ }
+ unset($available_units);
+
+ for ($i = 0; $i < $unit_info['index']; $i++)
+ {
+ $value /= 1024;
+ }
+ $value = round($value, 2);
+
+ // Lookup units in language dictionary
+ $unit_info['si_unit'] = (isset($user->lang[$unit_info['si_unit']])) ? $user->lang[$unit_info['si_unit']] : $unit_info['si_unit'];
+ $unit_info['iec_unit'] = (isset($user->lang[$unit_info['iec_unit']])) ? $user->lang[$unit_info['iec_unit']] : $unit_info['iec_unit'];
+
+ // Default to IEC
+ $unit_info['unit'] = $unit_info['iec_unit'];
+
+ if (!$string_only)
+ {
+ $unit_info['value'] = $value;
+
+ return $unit_info;
+ }
+
+ return $value . ' ' . $unit_info['unit'];
+}
+
+/**
+* Determine whether we are approaching the maximum execution time. Should be called once
+* at the beginning of the script in which it's used.
+* @return bool Either true if the maximum execution time is nearly reached, or false
+* if some time is still left.
+*/
+function still_on_time($extra_time = 15)
+{
+ static $max_execution_time, $start_time;
+
+ $time = explode(' ', microtime());
+ $current_time = $time[0] + $time[1];
+
+ if (empty($max_execution_time))
+ {
+ $max_execution_time = (function_exists('ini_get')) ? (int) @ini_get('max_execution_time') : (int) @get_cfg_var('max_execution_time');
+
+ // If zero, then set to something higher to not let the user catch the ten seconds barrier.
+ if ($max_execution_time === 0)
+ {
+ $max_execution_time = 50 + $extra_time;
+ }
+
+ $max_execution_time = min(max(10, ($max_execution_time - $extra_time)), 50);
+
+ // For debugging purposes
+ // $max_execution_time = 10;
+
+ global $starttime;
+ $start_time = (empty($starttime)) ? $current_time : $starttime;
+ }
+
+ return (ceil($current_time - $start_time) < $max_execution_time) ? true : false;
+}
+
+/**
+*
+* @version Version 0.1 / slightly modified for phpBB 3.0.x (using $H$ as hash type identifier)
+*
+* Portable PHP password hashing framework.
+*
+* Written by Solar Designer <solar at openwall.com> in 2004-2006 and placed in
+* the public domain.
+*
+* There's absolutely no warranty.
+*
+* The homepage URL for this framework is:
+*
+* http://www.openwall.com/phpass/
+*
+* Please be sure to update the Version line if you edit this file in any way.
+* It is suggested that you leave the main version number intact, but indicate
+* your project name (after the slash) and add your own revision information.
+*
+* Please do not change the "private" password hashing method implemented in
+* here, thereby making your hashes incompatible. However, if you must, please
+* change the hash type identifier (the "$P$") to something different.
+*
+* Obviously, since this code is in the public domain, the above are not
+* requirements (there can be none), but merely suggestions.
+*
+*
+* Hash the password
+*/
+function phpbb_hash($password)
+{
+ $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
+
+ $random_state = unique_id();
+ $random = '';
+ $count = 6;
+
+ if (($fh = @fopen('/dev/urandom', 'rb')))
+ {
+ $random = fread($fh, $count);
+ fclose($fh);
+ }
+
+ if (strlen($random) < $count)
+ {
+ $random = '';
+
+ for ($i = 0; $i < $count; $i += 16)
+ {
+ $random_state = md5(unique_id() . $random_state);
+ $random .= pack('H*', md5($random_state));
+ }
+ $random = substr($random, 0, $count);
+ }
+
+ $hash = _hash_crypt_private($password, _hash_gensalt_private($random, $itoa64), $itoa64);
+
+ if (strlen($hash) == 34)
+ {
+ return $hash;
+ }
+
+ return md5($password);
+}
+
+/**
+* Check for correct password
+*
+* @param string $password The password in plain text
+* @param string $hash The stored password hash
+*
+* @return bool Returns true if the password is correct, false if not.
+*/
+function phpbb_check_hash($password, $hash)
+{
+ $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
+ if (strlen($hash) == 34)
+ {
+ return (_hash_crypt_private($password, $hash, $itoa64) === $hash) ? true : false;
+ }
+
+ return (md5($password) === $hash) ? true : false;
+}
+
+/**
+* Generate salt for hash generation
+*/
+function _hash_gensalt_private($input, &$itoa64, $iteration_count_log2 = 6)
+{
+ if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31)
+ {
+ $iteration_count_log2 = 8;
+ }
+
+ $output = '$H$';
+ $output .= $itoa64[min($iteration_count_log2 + ((PHP_VERSION >= 5) ? 5 : 3), 30)];
+ $output .= _hash_encode64($input, 6, $itoa64);
+
+ return $output;
+}
+
+/**
+* Encode hash
+*/
+function _hash_encode64($input, $count, &$itoa64)
+{
+ $output = '';
+ $i = 0;
+
+ do
+ {
+ $value = ord($input[$i++]);
+ $output .= $itoa64[$value & 0x3f];
+
+ if ($i < $count)
+ {
+ $value |= ord($input[$i]) << 8;
+ }
+
+ $output .= $itoa64[($value >> 6) & 0x3f];
+
+ if ($i++ >= $count)
+ {
+ break;
+ }
+
+ if ($i < $count)
+ {
+ $value |= ord($input[$i]) << 16;
+ }
+
+ $output .= $itoa64[($value >> 12) & 0x3f];
+
+ if ($i++ >= $count)
+ {
+ break;
+ }
+
+ $output .= $itoa64[($value >> 18) & 0x3f];
+ }
+ while ($i < $count);
+
+ return $output;
+}
+
+/**
+* The crypt function/replacement
+*/
+function _hash_crypt_private($password, $setting, &$itoa64)
+{
+ $output = '*';
+
+ // Check for correct hash
+ if (substr($setting, 0, 3) != '$H$')
+ {
+ return $output;
+ }
+
+ $count_log2 = strpos($itoa64, $setting[3]);
+
+ if ($count_log2 < 7 || $count_log2 > 30)
+ {
+ return $output;
+ }
+
+ $count = 1 << $count_log2;
+ $salt = substr($setting, 4, 8);
+
+ if (strlen($salt) != 8)
+ {
+ return $output;
+ }
+
+ /**
+ * We're kind of forced to use MD5 here since it's the only
+ * cryptographic primitive available in all versions of PHP
+ * currently in use. To implement our own low-level crypto
+ * in PHP would result in much worse performance and
+ * consequently in lower iteration counts and hashes that are
+ * quicker to crack (by non-PHP code).
+ */
+ if (PHP_VERSION >= 5)
+ {
+ $hash = md5($salt . $password, true);
+ do
+ {
+ $hash = md5($hash . $password, true);
+ }
+ while (--$count);
+ }
+ else
+ {
+ $hash = pack('H*', md5($salt . $password));
+ do
+ {
+ $hash = pack('H*', md5($hash . $password));
+ }
+ while (--$count);
+ }
+
+ $output = substr($setting, 0, 12);
+ $output .= _hash_encode64($hash, 16, $itoa64);
+
+ return $output;
+}
+
+/**
+* Hashes an email address to a big integer
+*
+* @param string $email Email address
+*
+* @return string Big Integer
+*/
+function phpbb_email_hash($email)
+{
+ return crc32(strtolower($email)) . strlen($email);
+}
+
+/**
+* Global function for chmodding directories and files for internal use
+*
+* This function determines owner and group whom the file belongs to and user and group of PHP and then set safest possible file permissions.
+* The function determines owner and group from common.php file and sets the same to the provided file.
+* The function uses bit fields to build the permissions.
+* The function sets the appropiate execute bit on directories.
+*
+* Supported constants representing bit fields are:
+*
+* CHMOD_ALL - all permissions (7)
+* CHMOD_READ - read permission (4)
+* CHMOD_WRITE - write permission (2)
+* CHMOD_EXECUTE - execute permission (1)
+*
+* NOTE: The function uses POSIX extension and fileowner()/filegroup() functions. If any of them is disabled, this function tries to build proper permissions, by calling is_readable() and is_writable() functions.
+*
+* @param string $filename The file/directory to be chmodded
+* @param int $perms Permissions to set
+*
+* @return bool true on success, otherwise false
+* @author faw, phpBB Group
+*/
+function phpbb_chmod($filename, $perms = CHMOD_READ)
+{
+ static $_chmod_info;
+
+ // Return if the file no longer exists.
+ if (!file_exists($filename))
+ {
+ return false;
+ }
+
+ // Determine some common vars
+ if (empty($_chmod_info))
+ {
+ if (!function_exists('fileowner') || !function_exists('filegroup'))
+ {
+ // No need to further determine owner/group - it is unknown
+ $_chmod_info['process'] = false;
+ }
+ else
+ {
+ global $phpbb_root_path, $phpEx;
+
+ // Determine owner/group of common.php file and the filename we want to change here
+ $common_php_owner = @fileowner($phpbb_root_path . 'common.' . $phpEx);
+ $common_php_group = @filegroup($phpbb_root_path . 'common.' . $phpEx);
+
+ // And the owner and the groups PHP is running under.
+ $php_uid = (function_exists('posix_getuid')) ? @posix_getuid() : false;
+ $php_gids = (function_exists('posix_getgroups')) ? @posix_getgroups() : false;
+
+ // If we are unable to get owner/group, then do not try to set them by guessing
+ if (!$php_uid || empty($php_gids) || !$common_php_owner || !$common_php_group)
+ {
+ $_chmod_info['process'] = false;
+ }
+ else
+ {
+ $_chmod_info = array(
+ 'process' => true,
+ 'common_owner' => $common_php_owner,
+ 'common_group' => $common_php_group,
+ 'php_uid' => $php_uid,
+ 'php_gids' => $php_gids,
+ );
+ }
+ }
+ }
+
+ if ($_chmod_info['process'])
+ {
+ $file_uid = @fileowner($filename);
+ $file_gid = @filegroup($filename);
+
+ // Change owner
+ if (@chown($filename, $_chmod_info['common_owner']))
+ {
+ clearstatcache();
+ $file_uid = @fileowner($filename);
+ }
+
+ // Change group
+ if (@chgrp($filename, $_chmod_info['common_group']))
+ {
+ clearstatcache();
+ $file_gid = @filegroup($filename);
+ }
+
+ // If the file_uid/gid now match the one from common.php we can process further, else we are not able to change something
+ if ($file_uid != $_chmod_info['common_owner'] || $file_gid != $_chmod_info['common_group'])
+ {
+ $_chmod_info['process'] = false;
+ }
+ }
+
+ // Still able to process?
+ if ($_chmod_info['process'])
+ {
+ if ($file_uid == $_chmod_info['php_uid'])
+ {
+ $php = 'owner';
+ }
+ else if (in_array($file_gid, $_chmod_info['php_gids']))
+ {
+ $php = 'group';
+ }
+ else
+ {
+ // Since we are setting the everyone bit anyway, no need to do expensive operations
+ $_chmod_info['process'] = false;
+ }
+ }
+
+ // We are not able to determine or change something
+ if (!$_chmod_info['process'])
+ {
+ $php = 'other';
+ }
+
+ // Owner always has read/write permission
+ $owner = CHMOD_READ | CHMOD_WRITE;
+ if (is_dir($filename))
+ {
+ $owner |= CHMOD_EXECUTE;
+
+ // Only add execute bit to the permission if the dir needs to be readable
+ if ($perms & CHMOD_READ)
+ {
+ $perms |= CHMOD_EXECUTE;
+ }
+ }
+
+ switch ($php)
+ {
+ case 'owner':
+ $result = @chmod($filename, ($owner << 6) + (0 << 3) + (0 << 0));
+
+ clearstatcache();
+
+ if (is_readable($filename) && is_writable($filename))
+ {
+ break;
+ }
+
+ case 'group':
+ $result = @chmod($filename, ($owner << 6) + ($perms << 3) + (0 << 0));
+
+ clearstatcache();
+
+ if ((!($perms & CHMOD_READ) || is_readable($filename)) && (!($perms & CHMOD_WRITE) || is_writable($filename)))
+ {
+ break;
+ }
+
+ case 'other':
+ $result = @chmod($filename, ($owner << 6) + ($perms << 3) + ($perms << 0));
+
+ clearstatcache();
+
+ if ((!($perms & CHMOD_READ) || is_readable($filename)) && (!($perms & CHMOD_WRITE) || is_writable($filename)))
+ {
+ break;
+ }
+
+ default:
+ return false;
+ break;
+ }
+
+ return $result;
+}
+
+/**
+* Test if a file/directory is writable
+*
+* This function calls the native is_writable() when not running under
+* Windows and it is not disabled.
+*
+* @param string $file Path to perform write test on
+* @return bool True when the path is writable, otherwise false.
+*/
+function phpbb_is_writable($file)
+{
+ if (strtolower(substr(PHP_OS, 0, 3)) === 'win' || !function_exists('is_writable'))
+ {
+ if (file_exists($file))
+ {
+ // Canonicalise path to absolute path
+ $file = phpbb_realpath($file);
+
+ if (is_dir($file))
+ {
+ // Test directory by creating a file inside the directory
+ $result = @tempnam($file, 'i_w');
+
+ if (is_string($result) && file_exists($result))
+ {
+ unlink($result);
+
+ // Ensure the file is actually in the directory (returned realpathed)
+ return (strpos($result, $file) === 0) ? true : false;
+ }
+ }
+ else
+ {
+ $handle = @fopen($file, 'r+');
+
+ if (is_resource($handle))
+ {
+ fclose($handle);
+ return true;
+ }
+ }
+ }
+ else
+ {
+ // file does not exist test if we can write to the directory
+ $dir = dirname($file);
+
+ if (file_exists($dir) && is_dir($dir) && phpbb_is_writable($dir))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+ else
+ {
+ return is_writable($file);
+ }
+}
+
+// Compatibility functions
+
+if (!function_exists('array_combine'))
+{
+ /**
+ * A wrapper for the PHP5 function array_combine()
+ * @param array $keys contains keys for the resulting array
+ * @param array $values contains values for the resulting array
+ *
+ * @return Returns an array by using the values from the keys array as keys and the
+ * values from the values array as the corresponding values. Returns false if the
+ * number of elements for each array isn't equal or if the arrays are empty.
+ */
+ function array_combine($keys, $values)
+ {
+ $keys = array_values($keys);
+ $values = array_values($values);
+
+ $n = sizeof($keys);
+ $m = sizeof($values);
+ if (!$n || !$m || ($n != $m))
+ {
+ return false;
+ }
+
+ $combined = array();
+ for ($i = 0; $i < $n; $i++)
+ {
+ $combined[$keys[$i]] = $values[$i];
+ }
+ return $combined;
+ }
+}
+
+if (!function_exists('str_split'))
+{
+ /**
+ * A wrapper for the PHP5 function str_split()
+ * @param array $string contains the string to be converted
+ * @param array $split_length contains the length of each chunk
+ *
+ * @return Converts a string to an array. If the optional split_length parameter is specified,
+ * the returned array will be broken down into chunks with each being split_length in length,
+ * otherwise each chunk will be one character in length. FALSE is returned if split_length is
+ * less than 1. If the split_length length exceeds the length of string, the entire string is
+ * returned as the first (and only) array element.
+ */
+ function str_split($string, $split_length = 1)
+ {
+ if ($split_length < 1)
+ {
+ return false;
+ }
+ else if ($split_length >= strlen($string))
+ {
+ return array($string);
+ }
+ else
+ {
+ preg_match_all('#.{1,' . $split_length . '}#s', $string, $matches);
+ return $matches[0];
+ }
+ }
+}
+
+if (!function_exists('stripos'))
+{
+ /**
+ * A wrapper for the PHP5 function stripos
+ * Find position of first occurrence of a case-insensitive string
+ *
+ * @param string $haystack is the string to search in
+ * @param string $needle is the string to search for
+ *
+ * @return mixed Returns the numeric position of the first occurrence of needle in the haystack string. Unlike strpos(), stripos() is case-insensitive.
+ * Note that the needle may be a string of one or more characters.
+ * If needle is not found, stripos() will return boolean FALSE.
+ */
+ function stripos($haystack, $needle)
+ {
+ if (preg_match('#' . preg_quote($needle, '#') . '#i', $haystack, $m))
+ {
+ return strpos($haystack, $m[0]);
+ }
+
+ return false;
+ }
+}
+
+/**
+* Checks if a path ($path) is absolute or relative
+*
+* @param string $path Path to check absoluteness of
+* @return boolean
+*/
+function is_absolute($path)
+{
+ return ($path[0] == '/' || (DIRECTORY_SEPARATOR == '\\' && preg_match('#^[a-z]:[/\\\]#i', $path))) ? true : false;
+}
+
+/**
+* @author Chris Smith <chris@project-minerva.org>
+* @copyright 2006 Project Minerva Team
+* @param string $path The path which we should attempt to resolve.
+* @return mixed
+*/
+function phpbb_own_realpath($path)
+{
+ // Now to perform funky shizzle
+
+ // Switch to use UNIX slashes
+ $path = str_replace(DIRECTORY_SEPARATOR, '/', $path);
+ $path_prefix = '';
+
+ // Determine what sort of path we have
+ if (is_absolute($path))
+ {
+ $absolute = true;
+
+ if ($path[0] == '/')
+ {
+ // Absolute path, *NIX style
+ $path_prefix = '';
+ }
+ else
+ {
+ // Absolute path, Windows style
+ // Remove the drive letter and colon
+ $path_prefix = $path[0] . ':';
+ $path = substr($path, 2);
+ }
+ }
+ else
+ {
+ // Relative Path
+ // Prepend the current working directory
+ if (function_exists('getcwd'))
+ {
+ // This is the best method, hopefully it is enabled!
+ $path = str_replace(DIRECTORY_SEPARATOR, '/', getcwd()) . '/' . $path;
+ $absolute = true;
+ if (preg_match('#^[a-z]:#i', $path))
+ {
+ $path_prefix = $path[0] . ':';
+ $path = substr($path, 2);
+ }
+ else
+ {
+ $path_prefix = '';
+ }
+ }
+ else if (isset($_SERVER['SCRIPT_FILENAME']) && !empty($_SERVER['SCRIPT_FILENAME']))
+ {
+ // Warning: If chdir() has been used this will lie!
+ // Warning: This has some problems sometime (CLI can create them easily)
+ $path = str_replace(DIRECTORY_SEPARATOR, '/', dirname($_SERVER['SCRIPT_FILENAME'])) . '/' . $path;
+ $absolute = true;
+ $path_prefix = '';
+ }
+ else
+ {
+ // We have no way of getting the absolute path, just run on using relative ones.
+ $absolute = false;
+ $path_prefix = '.';
+ }
+ }
+
+ // Remove any repeated slashes
+ $path = preg_replace('#/{2,}#', '/', $path);
+
+ // Remove the slashes from the start and end of the path
+ $path = trim($path, '/');
+
+ // Break the string into little bits for us to nibble on
+ $bits = explode('/', $path);
+
+ // Remove any . in the path, renumber array for the loop below
+ $bits = array_values(array_diff($bits, array('.')));
+
+ // Lets get looping, run over and resolve any .. (up directory)
+ for ($i = 0, $max = sizeof($bits); $i < $max; $i++)
+ {
+ // @todo Optimise
+ if ($bits[$i] == '..' )
+ {
+ if (isset($bits[$i - 1]))
+ {
+ if ($bits[$i - 1] != '..')
+ {
+ // We found a .. and we are able to traverse upwards, lets do it!
+ unset($bits[$i]);
+ unset($bits[$i - 1]);
+ $i -= 2;
+ $max -= 2;
+ $bits = array_values($bits);
+ }
+ }
+ else if ($absolute) // ie. !isset($bits[$i - 1]) && $absolute
+ {
+ // We have an absolute path trying to descend above the root of the filesystem
+ // ... Error!
+ return false;
+ }
+ }
+ }
+
+ // Prepend the path prefix
+ array_unshift($bits, $path_prefix);
+
+ $resolved = '';
+
+ $max = sizeof($bits) - 1;
+
+ // Check if we are able to resolve symlinks, Windows cannot.
+ $symlink_resolve = (function_exists('readlink')) ? true : false;
+
+ foreach ($bits as $i => $bit)
+ {
+ if (@is_dir("$resolved/$bit") || ($i == $max && @is_file("$resolved/$bit")))
+ {
+ // Path Exists
+ if ($symlink_resolve && is_link("$resolved/$bit") && ($link = readlink("$resolved/$bit")))
+ {
+ // Resolved a symlink.
+ $resolved = $link . (($i == $max) ? '' : '/');
+ continue;
+ }
+ }
+ else
+ {
+ // Something doesn't exist here!
+ // This is correct realpath() behaviour but sadly open_basedir and safe_mode make this problematic
+ // return false;
+ }
+ $resolved .= $bit . (($i == $max) ? '' : '/');
+ }
+
+ // @todo If the file exists fine and open_basedir only has one path we should be able to prepend it
+ // because we must be inside that basedir, the question is where...
+ // @internal The slash in is_dir() gets around an open_basedir restriction
+ if (!@file_exists($resolved) || (!is_dir($resolved . '/') && !is_file($resolved)))
+ {
+ return false;
+ }
+
+ // Put the slashes back to the native operating systems slashes
+ $resolved = str_replace('/', DIRECTORY_SEPARATOR, $resolved);
+
+ // Check for DIRECTORY_SEPARATOR at the end (and remove it!)
+ if (substr($resolved, -1) == DIRECTORY_SEPARATOR)
+ {
+ return substr($resolved, 0, -1);
+ }
+
+ return $resolved; // We got here, in the end!
+}
+
+if (!function_exists('realpath'))
+{
+ /**
+ * A wrapper for realpath
+ * @ignore
+ */
+ function phpbb_realpath($path)
+ {
+ return phpbb_own_realpath($path);
+ }
+}
+else
+{
+ /**
+ * A wrapper for realpath
+ */
+ function phpbb_realpath($path)
+ {
+ $realpath = realpath($path);
+
+ // Strangely there are provider not disabling realpath but returning strange values. :o
+ // We at least try to cope with them.
+ if ($realpath === $path || $realpath === false)
+ {
+ return phpbb_own_realpath($path);
+ }
+
+ // Check for DIRECTORY_SEPARATOR at the end (and remove it!)
+ if (substr($realpath, -1) == DIRECTORY_SEPARATOR)
+ {
+ $realpath = substr($realpath, 0, -1);
+ }
+
+ return $realpath;
+ }
+}
+
+if (!function_exists('htmlspecialchars_decode'))
+{
+ /**
+ * A wrapper for htmlspecialchars_decode
+ * @ignore
+ */
+ function htmlspecialchars_decode($string, $quote_style = ENT_COMPAT)
+ {
+ return strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style)));
+ }
+}
+
+// functions used for building option fields
+
+/**
+* Pick a language, any language ...
+*/
+function language_select($default = '')
+{
+ global $db;
+
+ $sql = 'SELECT lang_iso, lang_local_name
+ FROM ' . LANG_TABLE . '
+ ORDER BY lang_english_name';
+ $result = $db->sql_query($sql);
+
+ $lang_options = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $selected = ($row['lang_iso'] == $default) ? ' selected="selected"' : '';
+ $lang_options .= '<option value="' . $row['lang_iso'] . '"' . $selected . '>' . $row['lang_local_name'] . '</option>';
+ }
+ $db->sql_freeresult($result);
+
+ return $lang_options;
+}
+
+/**
+* Pick a template/theme combo,
+*/
+function style_select($default = '', $all = false)
+{
+ global $db;
+
+ $sql_where = (!$all) ? 'WHERE style_active = 1 ' : '';
+ $sql = 'SELECT style_id, style_name
+ FROM ' . STYLES_TABLE . "
+ $sql_where
+ ORDER BY style_name";
+ $result = $db->sql_query($sql);
+
+ $style_options = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $selected = ($row['style_id'] == $default) ? ' selected="selected"' : '';
+ $style_options .= '<option value="' . $row['style_id'] . '"' . $selected . '>' . $row['style_name'] . '</option>';
+ }
+ $db->sql_freeresult($result);
+
+ return $style_options;
+}
+
+/**
+* Pick a timezone
+*/
+function tz_select($default = '', $truncate = false)
+{
+ global $user;
+
+ $tz_select = '';
+ foreach ($user->lang['tz_zones'] as $offset => $zone)
+ {
+ if ($truncate)
+ {
+ $zone_trunc = truncate_string($zone, 50, 255, false, '...');
+ }
+ else
+ {
+ $zone_trunc = $zone;
+ }
+
+ if (is_numeric($offset))
+ {
+ $selected = ($offset == $default) ? ' selected="selected"' : '';
+ $tz_select .= '<option title="' . $zone . '" value="' . $offset . '"' . $selected . '>' . $zone_trunc . '</option>';
+ }
+ }
+
+ return $tz_select;
+}
+
+// Functions handling topic/post tracking/marking
+
+/**
+* Marks a topic/forum as read
+* Marks a topic as posted to
+*
+* @param int $user_id can only be used with $mode == 'post'
+*/
+function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $user_id = 0)
+{
+ global $db, $user, $config;
+
+ if ($mode == 'all')
+ {
+ if ($forum_id === false || !sizeof($forum_id))
+ {
+ if ($config['load_db_lastread'] && $user->data['is_registered'])
+ {
+ // Mark all forums read (index page)
+ $db->sql_query('DELETE FROM ' . TOPICS_TRACK_TABLE . " WHERE user_id = {$user->data['user_id']}");
+ $db->sql_query('DELETE FROM ' . FORUMS_TRACK_TABLE . " WHERE user_id = {$user->data['user_id']}");
+ $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_lastmark = ' . time() . " WHERE user_id = {$user->data['user_id']}");
+ }
+ else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
+
+ unset($tracking_topics['tf']);
+ unset($tracking_topics['t']);
+ unset($tracking_topics['f']);
+ $tracking_topics['l'] = base_convert(time() - $config['board_startdate'], 10, 36);
+
+ $user->set_cookie('track', tracking_serialize($tracking_topics), time() + 31536000);
+ $_COOKIE[$config['cookie_name'] . '_track'] = (STRIP) ? addslashes(tracking_serialize($tracking_topics)) : tracking_serialize($tracking_topics);
+
+ unset($tracking_topics);
+
+ if ($user->data['is_registered'])
+ {
+ $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_lastmark = ' . time() . " WHERE user_id = {$user->data['user_id']}");
+ }
+ }
+ }
+
+ return;
+ }
+ else if ($mode == 'topics')
+ {
+ // Mark all topics in forums read
+ if (!is_array($forum_id))
+ {
+ $forum_id = array($forum_id);
+ }
+
+ // Add 0 to forums array to mark global announcements correctly
+ // $forum_id[] = 0;
+
+ if ($config['load_db_lastread'] && $user->data['is_registered'])
+ {
+ $sql = 'DELETE FROM ' . TOPICS_TRACK_TABLE . "
+ WHERE user_id = {$user->data['user_id']}
+ AND " . $db->sql_in_set('forum_id', $forum_id);
+ $db->sql_query($sql);
+
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TRACK_TABLE . "
+ WHERE user_id = {$user->data['user_id']}
+ AND " . $db->sql_in_set('forum_id', $forum_id);
+ $result = $db->sql_query($sql);
+
+ $sql_update = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $sql_update[] = (int) $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($sql_update))
+ {
+ $sql = 'UPDATE ' . FORUMS_TRACK_TABLE . '
+ SET mark_time = ' . time() . "
+ WHERE user_id = {$user->data['user_id']}
+ AND " . $db->sql_in_set('forum_id', $sql_update);
+ $db->sql_query($sql);
+ }
+
+ if ($sql_insert = array_diff($forum_id, $sql_update))
+ {
+ $sql_ary = array();
+ foreach ($sql_insert as $f_id)
+ {
+ $sql_ary[] = array(
+ 'user_id' => (int) $user->data['user_id'],
+ 'forum_id' => (int) $f_id,
+ 'mark_time' => time()
+ );
+ }
+
+ $db->sql_multi_insert(FORUMS_TRACK_TABLE, $sql_ary);
+ }
+ }
+ else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ $tracking = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking = ($tracking) ? tracking_unserialize($tracking) : array();
+
+ foreach ($forum_id as $f_id)
+ {
+ $topic_ids36 = (isset($tracking['tf'][$f_id])) ? $tracking['tf'][$f_id] : array();
+
+ if (isset($tracking['tf'][$f_id]))
+ {
+ unset($tracking['tf'][$f_id]);
+ }
+
+ foreach ($topic_ids36 as $topic_id36)
+ {
+ unset($tracking['t'][$topic_id36]);
+ }
+
+ if (isset($tracking['f'][$f_id]))
+ {
+ unset($tracking['f'][$f_id]);
+ }
+
+ $tracking['f'][$f_id] = base_convert(time() - $config['board_startdate'], 10, 36);
+ }
+
+ if (isset($tracking['tf']) && empty($tracking['tf']))
+ {
+ unset($tracking['tf']);
+ }
+
+ $user->set_cookie('track', tracking_serialize($tracking), time() + 31536000);
+ $_COOKIE[$config['cookie_name'] . '_track'] = (STRIP) ? addslashes(tracking_serialize($tracking)) : tracking_serialize($tracking);
+
+ unset($tracking);
+ }
+
+ return;
+ }
+ else if ($mode == 'topic')
+ {
+ if ($topic_id === false || $forum_id === false)
+ {
+ return;
+ }
+
+ if ($config['load_db_lastread'] && $user->data['is_registered'])
+ {
+ $sql = 'UPDATE ' . TOPICS_TRACK_TABLE . '
+ SET mark_time = ' . (($post_time) ? $post_time : time()) . "
+ WHERE user_id = {$user->data['user_id']}
+ AND topic_id = $topic_id";
+ $db->sql_query($sql);
+
+ // insert row
+ if (!$db->sql_affectedrows())
+ {
+ $db->sql_return_on_error(true);
+
+ $sql_ary = array(
+ 'user_id' => (int) $user->data['user_id'],
+ 'topic_id' => (int) $topic_id,
+ 'forum_id' => (int) $forum_id,
+ 'mark_time' => ($post_time) ? (int) $post_time : time(),
+ );
+
+ $db->sql_query('INSERT INTO ' . TOPICS_TRACK_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+
+ $db->sql_return_on_error(false);
+ }
+ }
+ else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ $tracking = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking = ($tracking) ? tracking_unserialize($tracking) : array();
+
+ $topic_id36 = base_convert($topic_id, 10, 36);
+
+ if (!isset($tracking['t'][$topic_id36]))
+ {
+ $tracking['tf'][$forum_id][$topic_id36] = true;
+ }
+
+ $post_time = ($post_time) ? $post_time : time();
+ $tracking['t'][$topic_id36] = base_convert($post_time - $config['board_startdate'], 10, 36);
+
+ // If the cookie grows larger than 10000 characters we will remove the smallest value
+ // This can result in old topics being unread - but most of the time it should be accurate...
+ if (isset($_COOKIE[$config['cookie_name'] . '_track']) && strlen($_COOKIE[$config['cookie_name'] . '_track']) > 10000)
+ {
+ //echo 'Cookie grown too large' . print_r($tracking, true);
+
+ // We get the ten most minimum stored time offsets and its associated topic ids
+ $time_keys = array();
+ for ($i = 0; $i < 10 && sizeof($tracking['t']); $i++)
+ {
+ $min_value = min($tracking['t']);
+ $m_tkey = array_search($min_value, $tracking['t']);
+ unset($tracking['t'][$m_tkey]);
+
+ $time_keys[$m_tkey] = $min_value;
+ }
+
+ // Now remove the topic ids from the array...
+ foreach ($tracking['tf'] as $f_id => $topic_id_ary)
+ {
+ foreach ($time_keys as $m_tkey => $min_value)
+ {
+ if (isset($topic_id_ary[$m_tkey]))
+ {
+ $tracking['f'][$f_id] = $min_value;
+ unset($tracking['tf'][$f_id][$m_tkey]);
+ }
+ }
+ }
+
+ if ($user->data['is_registered'])
+ {
+ $user->data['user_lastmark'] = intval(base_convert(max($time_keys) + $config['board_startdate'], 36, 10));
+ $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_lastmark = ' . $user->data['user_lastmark'] . " WHERE user_id = {$user->data['user_id']}");
+ }
+ else
+ {
+ $tracking['l'] = max($time_keys);
+ }
+ }
+
+ $user->set_cookie('track', tracking_serialize($tracking), time() + 31536000);
+ $_COOKIE[$config['cookie_name'] . '_track'] = (STRIP) ? addslashes(tracking_serialize($tracking)) : tracking_serialize($tracking);
+ }
+
+ return;
+ }
+ else if ($mode == 'post')
+ {
+ if ($topic_id === false)
+ {
+ return;
+ }
+
+ $use_user_id = (!$user_id) ? $user->data['user_id'] : $user_id;
+
+ if ($config['load_db_track'] && $use_user_id != ANONYMOUS)
+ {
+ $db->sql_return_on_error(true);
+
+ $sql_ary = array(
+ 'user_id' => (int) $use_user_id,
+ 'topic_id' => (int) $topic_id,
+ 'topic_posted' => 1
+ );
+
+ $db->sql_query('INSERT INTO ' . TOPICS_POSTED_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+
+ $db->sql_return_on_error(false);
+ }
+
+ return;
+ }
+}
+
+/**
+* Get topic tracking info by using already fetched info
+*/
+function get_topic_tracking($forum_id, $topic_ids, &$rowset, $forum_mark_time, $global_announce_list = false)
+{
+ global $config, $user;
+
+ $last_read = array();
+
+ if (!is_array($topic_ids))
+ {
+ $topic_ids = array($topic_ids);
+ }
+
+ foreach ($topic_ids as $topic_id)
+ {
+ if (!empty($rowset[$topic_id]['mark_time']))
+ {
+ $last_read[$topic_id] = $rowset[$topic_id]['mark_time'];
+ }
+ }
+
+ $topic_ids = array_diff($topic_ids, array_keys($last_read));
+
+ if (sizeof($topic_ids))
+ {
+ $mark_time = array();
+
+ // Get global announcement info
+ if ($global_announce_list && sizeof($global_announce_list))
+ {
+ if (!isset($forum_mark_time[0]))
+ {
+ global $db;
+
+ $sql = 'SELECT mark_time
+ FROM ' . FORUMS_TRACK_TABLE . "
+ WHERE user_id = {$user->data['user_id']}
+ AND forum_id = 0";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ $mark_time[0] = $row['mark_time'];
+ }
+ }
+ else
+ {
+ if ($forum_mark_time[0] !== false)
+ {
+ $mark_time[0] = $forum_mark_time[0];
+ }
+ }
+ }
+
+ if (!empty($forum_mark_time[$forum_id]) && $forum_mark_time[$forum_id] !== false)
+ {
+ $mark_time[$forum_id] = $forum_mark_time[$forum_id];
+ }
+
+ $user_lastmark = (isset($mark_time[$forum_id])) ? $mark_time[$forum_id] : $user->data['user_lastmark'];
+
+ foreach ($topic_ids as $topic_id)
+ {
+ if ($global_announce_list && isset($global_announce_list[$topic_id]))
+ {
+ $last_read[$topic_id] = (isset($mark_time[0])) ? $mark_time[0] : $user_lastmark;
+ }
+ else
+ {
+ $last_read[$topic_id] = $user_lastmark;
+ }
+ }
+ }
+
+ return $last_read;
+}
+
+/**
+* Get topic tracking info from db (for cookie based tracking only this function is used)
+*/
+function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_list = false)
+{
+ global $config, $user;
+
+ $last_read = array();
+
+ if (!is_array($topic_ids))
+ {
+ $topic_ids = array($topic_ids);
+ }
+
+ if ($config['load_db_lastread'] && $user->data['is_registered'])
+ {
+ global $db;
+
+ $sql = 'SELECT topic_id, mark_time
+ FROM ' . TOPICS_TRACK_TABLE . "
+ WHERE user_id = {$user->data['user_id']}
+ AND " . $db->sql_in_set('topic_id', $topic_ids);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $last_read[$row['topic_id']] = $row['mark_time'];
+ }
+ $db->sql_freeresult($result);
+
+ $topic_ids = array_diff($topic_ids, array_keys($last_read));
+
+ if (sizeof($topic_ids))
+ {
+ $sql = 'SELECT forum_id, mark_time
+ FROM ' . FORUMS_TRACK_TABLE . "
+ WHERE user_id = {$user->data['user_id']}
+ AND forum_id " .
+ (($global_announce_list && sizeof($global_announce_list)) ? "IN (0, $forum_id)" : "= $forum_id");
+ $result = $db->sql_query($sql);
+
+ $mark_time = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $mark_time[$row['forum_id']] = $row['mark_time'];
+ }
+ $db->sql_freeresult($result);
+
+ $user_lastmark = (isset($mark_time[$forum_id])) ? $mark_time[$forum_id] : $user->data['user_lastmark'];
+
+ foreach ($topic_ids as $topic_id)
+ {
+ if ($global_announce_list && isset($global_announce_list[$topic_id]))
+ {
+ $last_read[$topic_id] = (isset($mark_time[0])) ? $mark_time[0] : $user_lastmark;
+ }
+ else
+ {
+ $last_read[$topic_id] = $user_lastmark;
+ }
+ }
+ }
+ }
+ else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ global $tracking_topics;
+
+ if (!isset($tracking_topics) || !sizeof($tracking_topics))
+ {
+ $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
+ }
+
+ if (!$user->data['is_registered'])
+ {
+ $user_lastmark = (isset($tracking_topics['l'])) ? base_convert($tracking_topics['l'], 36, 10) + $config['board_startdate'] : 0;
+ }
+ else
+ {
+ $user_lastmark = $user->data['user_lastmark'];
+ }
+
+ foreach ($topic_ids as $topic_id)
+ {
+ $topic_id36 = base_convert($topic_id, 10, 36);
+
+ if (isset($tracking_topics['t'][$topic_id36]))
+ {
+ $last_read[$topic_id] = base_convert($tracking_topics['t'][$topic_id36], 36, 10) + $config['board_startdate'];
+ }
+ }
+
+ $topic_ids = array_diff($topic_ids, array_keys($last_read));
+
+ if (sizeof($topic_ids))
+ {
+ $mark_time = array();
+ if ($global_announce_list && sizeof($global_announce_list))
+ {
+ if (isset($tracking_topics['f'][0]))
+ {
+ $mark_time[0] = base_convert($tracking_topics['f'][0], 36, 10) + $config['board_startdate'];
+ }
+ }
+
+ if (isset($tracking_topics['f'][$forum_id]))
+ {
+ $mark_time[$forum_id] = base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate'];
+ }
+
+ $user_lastmark = (isset($mark_time[$forum_id])) ? $mark_time[$forum_id] : $user_lastmark;
+
+ foreach ($topic_ids as $topic_id)
+ {
+ if ($global_announce_list && isset($global_announce_list[$topic_id]))
+ {
+ $last_read[$topic_id] = (isset($mark_time[0])) ? $mark_time[0] : $user_lastmark;
+ }
+ else
+ {
+ $last_read[$topic_id] = $user_lastmark;
+ }
+ }
+ }
+ }
+
+ return $last_read;
+}
+
+/**
+* Get list of unread topics
+*
+* @param int $user_id User ID (or false for current user)
+* @param string $sql_extra Extra WHERE SQL statement
+* @param string $sql_sort ORDER BY SQL sorting statement
+* @param string $sql_limit Limits the size of unread topics list, 0 for unlimited query
+*
+* @return array[int][int] Topic ids as keys, mark_time of topic as value
+*/
+function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $sql_limit = 1001)
+{
+ global $config, $db, $user;
+
+ $user_id = ($user_id === false) ? (int) $user->data['user_id'] : (int) $user_id;
+
+ // Data array we're going to return
+ $unread_topics = array();
+
+ if (empty($sql_sort))
+ {
+ $sql_sort = 'ORDER BY t.topic_last_post_time DESC';
+ }
+
+ if ($config['load_db_lastread'] && $user->data['is_registered'])
+ {
+ // Get list of the unread topics
+ $last_mark = $user->data['user_lastmark'];
+
+ $sql_array = array(
+ 'SELECT' => 't.topic_id, t.topic_last_post_time, tt.mark_time as topic_mark_time, ft.mark_time as forum_mark_time',
+
+ 'FROM' => array(TOPICS_TABLE => 't'),
+
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(TOPICS_TRACK_TABLE => 'tt'),
+ 'ON' => "tt.user_id = $user_id AND t.topic_id = tt.topic_id",
+ ),
+ array(
+ 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
+ 'ON' => "ft.user_id = $user_id AND t.forum_id = ft.forum_id",
+ ),
+ ),
+
+ 'WHERE' => "
+ (
+ (tt.mark_time IS NOT NULL AND t.topic_last_post_time > tt.mark_time) OR
+ (tt.mark_time IS NULL AND ft.mark_time IS NOT NULL AND t.topic_last_post_time > ft.mark_time) OR
+ (tt.mark_time IS NULL AND ft.mark_time IS NULL AND t.topic_last_post_time > $last_mark)
+ )
+ $sql_extra
+ $sql_sort",
+ );
+
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $result = $db->sql_query_limit($sql, $sql_limit);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_id = (int) $row['topic_id'];
+ $unread_topics[$topic_id] = ($row['topic_mark_time']) ? (int) $row['topic_mark_time'] : (($row['forum_mark_time']) ? (int) $row['forum_mark_time'] : $last_mark);
+ }
+ $db->sql_freeresult($result);
+ }
+ else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ global $tracking_topics;
+
+ if (empty($tracking_topics))
+ {
+ $tracking_topics = request_var($config['cookie_name'] . '_track', '', false, true);
+ $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
+ }
+
+ if (!$user->data['is_registered'])
+ {
+ $user_lastmark = (isset($tracking_topics['l'])) ? base_convert($tracking_topics['l'], 36, 10) + $config['board_startdate'] : 0;
+ }
+ else
+ {
+ $user_lastmark = (int) $user->data['user_lastmark'];
+ }
+
+ $sql = 'SELECT t.topic_id, t.forum_id, t.topic_last_post_time
+ FROM ' . TOPICS_TABLE . ' t
+ WHERE t.topic_last_post_time > ' . $user_lastmark . "
+ $sql_extra
+ $sql_sort";
+ $result = $db->sql_query_limit($sql, $sql_limit);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_id = (int) $row['forum_id'];
+ $topic_id = (int) $row['topic_id'];
+ $topic_id36 = base_convert($topic_id, 10, 36);
+
+ if (isset($tracking_topics['t'][$topic_id36]))
+ {
+ $last_read = base_convert($tracking_topics['t'][$topic_id36], 36, 10) + $config['board_startdate'];
+
+ if ($row['topic_last_post_time'] > $last_read)
+ {
+ $unread_topics[$topic_id] = $last_read;
+ }
+ }
+ else if (isset($tracking_topics['f'][$forum_id]))
+ {
+ $mark_time = base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate'];
+
+ if ($row['topic_last_post_time'] > $mark_time)
+ {
+ $unread_topics[$topic_id] = $mark_time;
+ }
+ }
+ else
+ {
+ $unread_topics[$topic_id] = $user_lastmark;
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+
+ return $unread_topics;
+}
+
+/**
+* Check for read forums and update topic tracking info accordingly
+*
+* @param int $forum_id the forum id to check
+* @param int $forum_last_post_time the forums last post time
+* @param int $f_mark_time the forums last mark time if user is registered and load_db_lastread enabled
+* @param int $mark_time_forum false if the mark time needs to be obtained, else the last users forum mark time
+*
+* @return true if complete forum got marked read, else false.
+*/
+function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_time = false, $mark_time_forum = false)
+{
+ global $db, $tracking_topics, $user, $config;
+
+ // Determine the users last forum mark time if not given.
+ if ($mark_time_forum === false)
+ {
+ if ($config['load_db_lastread'] && $user->data['is_registered'])
+ {
+ $mark_time_forum = (!empty($f_mark_time)) ? $f_mark_time : $user->data['user_lastmark'];
+ }
+ else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
+
+ if (!$user->data['is_registered'])
+ {
+ $user->data['user_lastmark'] = (isset($tracking_topics['l'])) ? (int) (base_convert($tracking_topics['l'], 36, 10) + $config['board_startdate']) : 0;
+ }
+
+ $mark_time_forum = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate']) : $user->data['user_lastmark'];
+ }
+ }
+
+ // Check the forum for any left unread topics.
+ // If there are none, we mark the forum as read.
+ if ($config['load_db_lastread'] && $user->data['is_registered'])
+ {
+ if ($mark_time_forum >= $forum_last_post_time)
+ {
+ // We do not need to mark read, this happened before. Therefore setting this to true
+ $row = true;
+ }
+ else
+ {
+ $sql = 'SELECT t.forum_id FROM ' . TOPICS_TABLE . ' t
+ LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id'] . ')
+ WHERE t.forum_id = ' . $forum_id . '
+ AND t.topic_last_post_time > ' . $mark_time_forum . '
+ AND t.topic_moved_id = 0
+ AND (tt.topic_id IS NULL OR tt.mark_time < t.topic_last_post_time)
+ GROUP BY t.forum_id';
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+ }
+ else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ // Get information from cookie
+ $row = false;
+
+ if (!isset($tracking_topics['tf'][$forum_id]))
+ {
+ // We do not need to mark read, this happened before. Therefore setting this to true
+ $row = true;
+ }
+ else
+ {
+ $sql = 'SELECT topic_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE forum_id = ' . $forum_id . '
+ AND topic_last_post_time > ' . $mark_time_forum . '
+ AND topic_moved_id = 0';
+ $result = $db->sql_query($sql);
+
+ $check_forum = $tracking_topics['tf'][$forum_id];
+ $unread = false;
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!isset($check_forum[base_convert($row['topic_id'], 10, 36)]))
+ {
+ $unread = true;
+ break;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $row = $unread;
+ }
+ }
+ else
+ {
+ $row = true;
+ }
+
+ if (!$row)
+ {
+ markread('topics', $forum_id);
+ return true;
+ }
+
+ return false;
+}
+
+/**
+* Transform an array into a serialized format
+*/
+function tracking_serialize($input)
+{
+ $out = '';
+ foreach ($input as $key => $value)
+ {
+ if (is_array($value))
+ {
+ $out .= $key . ':(' . tracking_serialize($value) . ');';
+ }
+ else
+ {
+ $out .= $key . ':' . $value . ';';
+ }
+ }
+ return $out;
+}
+
+/**
+* Transform a serialized array into an actual array
+*/
+function tracking_unserialize($string, $max_depth = 3)
+{
+ $n = strlen($string);
+ if ($n > 10010)
+ {
+ die('Invalid data supplied');
+ }
+ $data = $stack = array();
+ $key = '';
+ $mode = 0;
+ $level = &$data;
+ for ($i = 0; $i < $n; ++$i)
+ {
+ switch ($mode)
+ {
+ case 0:
+ switch ($string[$i])
+ {
+ case ':':
+ $level[$key] = 0;
+ $mode = 1;
+ break;
+ case ')':
+ unset($level);
+ $level = array_pop($stack);
+ $mode = 3;
+ break;
+ default:
+ $key .= $string[$i];
+ }
+ break;
+
+ case 1:
+ switch ($string[$i])
+ {
+ case '(':
+ if (sizeof($stack) >= $max_depth)
+ {
+ die('Invalid data supplied');
+ }
+ $stack[] = &$level;
+ $level[$key] = array();
+ $level = &$level[$key];
+ $key = '';
+ $mode = 0;
+ break;
+ default:
+ $level[$key] = $string[$i];
+ $mode = 2;
+ break;
+ }
+ break;
+
+ case 2:
+ switch ($string[$i])
+ {
+ case ')':
+ unset($level);
+ $level = array_pop($stack);
+ $mode = 3;
+ break;
+ case ';':
+ $key = '';
+ $mode = 0;
+ break;
+ default:
+ $level[$key] .= $string[$i];
+ break;
+ }
+ break;
+
+ case 3:
+ switch ($string[$i])
+ {
+ case ')':
+ unset($level);
+ $level = array_pop($stack);
+ break;
+ case ';':
+ $key = '';
+ $mode = 0;
+ break;
+ default:
+ die('Invalid data supplied');
+ break;
+ }
+ break;
+ }
+ }
+
+ if (sizeof($stack) != 0 || ($mode != 0 && $mode != 3))
+ {
+ die('Invalid data supplied');
+ }
+
+ return $level;
+}
+
+// Pagination functions
+
+/**
+* Pagination routine, generates page number sequence
+* tpl_prefix is for using different pagination blocks at one page
+*/
+function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = false, $tpl_prefix = '')
+{
+ global $template, $user;
+
+ // Make sure $per_page is a valid value
+ $per_page = ($per_page <= 0) ? 1 : $per_page;
+
+ $seperator = '<span class="page-sep">' . $user->lang['COMMA_SEPARATOR'] . '</span>';
+ $total_pages = ceil($num_items / $per_page);
+
+ if ($total_pages == 1 || !$num_items)
+ {
+ return false;
+ }
+
+ $on_page = floor($start_item / $per_page) + 1;
+ $url_delim = (strpos($base_url, '?') === false) ? '?' : ((strpos($base_url, '?') === strlen($base_url) - 1) ? '' : '&amp;');
+
+ $page_string = ($on_page == 1) ? '<strong>1</strong>' : '<a href="' . $base_url . '">1</a>';
+
+ if ($total_pages > 5)
+ {
+ $start_cnt = min(max(1, $on_page - 4), $total_pages - 5);
+ $end_cnt = max(min($total_pages, $on_page + 4), 6);
+
+ $page_string .= ($start_cnt > 1) ? ' ... ' : $seperator;
+
+ for ($i = $start_cnt + 1; $i < $end_cnt; $i++)
+ {
+ $page_string .= ($i == $on_page) ? '<strong>' . $i . '</strong>' : '<a href="' . $base_url . "{$url_delim}start=" . (($i - 1) * $per_page) . '">' . $i . '</a>';
+ if ($i < $end_cnt - 1)
+ {
+ $page_string .= $seperator;
+ }
+ }
+
+ $page_string .= ($end_cnt < $total_pages) ? ' ... ' : $seperator;
+ }
+ else
+ {
+ $page_string .= $seperator;
+
+ for ($i = 2; $i < $total_pages; $i++)
+ {
+ $page_string .= ($i == $on_page) ? '<strong>' . $i . '</strong>' : '<a href="' . $base_url . "{$url_delim}start=" . (($i - 1) * $per_page) . '">' . $i . '</a>';
+ if ($i < $total_pages)
+ {
+ $page_string .= $seperator;
+ }
+ }
+ }
+
+ $page_string .= ($on_page == $total_pages) ? '<strong>' . $total_pages . '</strong>' : '<a href="' . $base_url . "{$url_delim}start=" . (($total_pages - 1) * $per_page) . '">' . $total_pages . '</a>';
+
+ if ($add_prevnext_text)
+ {
+ if ($on_page != 1)
+ {
+ $page_string = '<a href="' . $base_url . "{$url_delim}start=" . (($on_page - 2) * $per_page) . '">' . $user->lang['PREVIOUS'] . '</a>&nbsp;&nbsp;' . $page_string;
+ }
+
+ if ($on_page != $total_pages)
+ {
+ $page_string .= '&nbsp;&nbsp;<a href="' . $base_url . "{$url_delim}start=" . ($on_page * $per_page) . '">' . $user->lang['NEXT'] . '</a>';
+ }
+ }
+
+ $template->assign_vars(array(
+ $tpl_prefix . 'BASE_URL' => $base_url,
+ 'A_' . $tpl_prefix . 'BASE_URL' => addslashes($base_url),
+ $tpl_prefix . 'PER_PAGE' => $per_page,
+
+ $tpl_prefix . 'PREVIOUS_PAGE' => ($on_page == 1) ? '' : $base_url . "{$url_delim}start=" . (($on_page - 2) * $per_page),
+ $tpl_prefix . 'NEXT_PAGE' => ($on_page == $total_pages) ? '' : $base_url . "{$url_delim}start=" . ($on_page * $per_page),
+ $tpl_prefix . 'TOTAL_PAGES' => $total_pages,
+ ));
+
+ return $page_string;
+}
+
+/**
+* Return current page (pagination)
+*/
+function on_page($num_items, $per_page, $start)
+{
+ global $template, $user;
+
+ // Make sure $per_page is a valid value
+ $per_page = ($per_page <= 0) ? 1 : $per_page;
+
+ $on_page = floor($start / $per_page) + 1;
+
+ $template->assign_vars(array(
+ 'ON_PAGE' => $on_page)
+ );
+
+ return sprintf($user->lang['PAGE_OF'], $on_page, max(ceil($num_items / $per_page), 1));
+}
+
+// Server functions (building urls, redirecting...)
+
+/**
+* Append session id to url.
+* This function supports hooks.
+*
+* @param string $url The url the session id needs to be appended to (can have params)
+* @param mixed $params String or array of additional url parameters
+* @param bool $is_amp Is url using &amp; (true) or & (false)
+* @param string $session_id Possibility to use a custom session id instead of the global one
+*
+* Examples:
+* <code>
+* append_sid("{$phpbb_root_path}viewtopic.$phpEx?t=1&amp;f=2");
+* append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1&amp;f=2');
+* append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1&f=2', false);
+* append_sid("{$phpbb_root_path}viewtopic.$phpEx", array('t' => 1, 'f' => 2));
+* </code>
+*
+*/
+function append_sid($url, $params = false, $is_amp = true, $session_id = false)
+{
+ global $_SID, $_EXTRA_URL, $phpbb_hook;
+
+ // Developers using the hook function need to globalise the $_SID and $_EXTRA_URL on their own and also handle it appropiatly.
+ // They could mimick most of what is within this function
+ if (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__, $url, $params, $is_amp, $session_id))
+ {
+ if ($phpbb_hook->hook_return(__FUNCTION__))
+ {
+ return $phpbb_hook->hook_return_result(__FUNCTION__);
+ }
+ }
+
+ $params_is_array = is_array($params);
+
+ // Get anchor
+ $anchor = '';
+ if (strpos($url, '#') !== false)
+ {
+ list($url, $anchor) = explode('#', $url, 2);
+ $anchor = '#' . $anchor;
+ }
+ else if (!$params_is_array && strpos($params, '#') !== false)
+ {
+ list($params, $anchor) = explode('#', $params, 2);
+ $anchor = '#' . $anchor;
+ }
+
+ // Handle really simple cases quickly
+ if ($_SID == '' && $session_id === false && empty($_EXTRA_URL) && !$params_is_array && !$anchor)
+ {
+ if ($params === false)
+ {
+ return $url;
+ }
+
+ $url_delim = (strpos($url, '?') === false) ? '?' : (($is_amp) ? '&amp;' : '&');
+ return $url . ($params !== false ? $url_delim. $params : '');
+ }
+
+ // Assign sid if session id is not specified
+ if ($session_id === false)
+ {
+ $session_id = $_SID;
+ }
+
+ $amp_delim = ($is_amp) ? '&amp;' : '&';
+ $url_delim = (strpos($url, '?') === false) ? '?' : $amp_delim;
+
+ // Appending custom url parameter?
+ $append_url = (!empty($_EXTRA_URL)) ? implode($amp_delim, $_EXTRA_URL) : '';
+
+ // Use the short variant if possible ;)
+ if ($params === false)
+ {
+ // Append session id
+ if (!$session_id)
+ {
+ return $url . (($append_url) ? $url_delim . $append_url : '') . $anchor;
+ }
+ else
+ {
+ return $url . (($append_url) ? $url_delim . $append_url . $amp_delim : $url_delim) . 'sid=' . $session_id . $anchor;
+ }
+ }
+
+ // Build string if parameters are specified as array
+ if (is_array($params))
+ {
+ $output = array();
+
+ foreach ($params as $key => $item)
+ {
+ if ($item === NULL)
+ {
+ continue;
+ }
+
+ if ($key == '#')
+ {
+ $anchor = '#' . $item;
+ continue;
+ }
+
+ $output[] = $key . '=' . $item;
+ }
+
+ $params = implode($amp_delim, $output);
+ }
+
+ // Append session id and parameters (even if they are empty)
+ // If parameters are empty, the developer can still append his/her parameters without caring about the delimiter
+ return $url . (($append_url) ? $url_delim . $append_url . $amp_delim : $url_delim) . $params . ((!$session_id) ? '' : $amp_delim . 'sid=' . $session_id) . $anchor;
+}
+
+/**
+* Generate board url (example: http://www.example.com/phpBB)
+* @param bool $without_script_path if set to true the script path gets not appended (example: http://www.example.com)
+*/
+function generate_board_url($without_script_path = false)
+{
+ global $config, $user;
+
+ $server_name = $user->host;
+ $server_port = (!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT');
+
+ // Forcing server vars is the only way to specify/override the protocol
+ if ($config['force_server_vars'] || !$server_name)
+ {
+ $server_protocol = ($config['server_protocol']) ? $config['server_protocol'] : (($config['cookie_secure']) ? 'https://' : 'http://');
+ $server_name = $config['server_name'];
+ $server_port = (int) $config['server_port'];
+ $script_path = $config['script_path'];
+
+ $url = $server_protocol . $server_name;
+ $cookie_secure = $config['cookie_secure'];
+ }
+ else
+ {
+ // Do not rely on cookie_secure, users seem to think that it means a secured cookie instead of an encrypted connection
+ $cookie_secure = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 1 : 0;
+ $url = (($cookie_secure) ? 'https://' : 'http://') . $server_name;
+
+ $script_path = $user->page['root_script_path'];
+ }
+
+ if ($server_port && (($cookie_secure && $server_port <> 443) || (!$cookie_secure && $server_port <> 80)))
+ {
+ // HTTP HOST can carry a port number (we fetch $user->host, but for old versions this may be true)
+ if (strpos($server_name, ':') === false)
+ {
+ $url .= ':' . $server_port;
+ }
+ }
+
+ if (!$without_script_path)
+ {
+ $url .= $script_path;
+ }
+
+ // Strip / from the end
+ if (substr($url, -1, 1) == '/')
+ {
+ $url = substr($url, 0, -1);
+ }
+
+ return $url;
+}
+
+/**
+* Redirects the user to another page then exits the script nicely
+* This function is intended for urls within the board. It's not meant to redirect to cross-domains.
+*
+* @param string $url The url to redirect to
+* @param bool $return If true, do not redirect but return the sanitized URL. Default is no return.
+* @param bool $disable_cd_check If true, redirect() will redirect to an external domain. If false, the redirect point to the boards url if it does not match the current domain. Default is false.
+*/
+function redirect($url, $return = false, $disable_cd_check = false)
+{
+ global $db, $cache, $config, $user, $phpbb_root_path;
+
+ if (empty($user->lang))
+ {
+ $user->add_lang('common');
+ }
+
+ if (!$return)
+ {
+ garbage_collection();
+ }
+
+ // Make sure no &amp;'s are in, this will break the redirect
+ $url = str_replace('&amp;', '&', $url);
+
+ // Determine which type of redirect we need to handle...
+ $url_parts = @parse_url($url);
+
+ if ($url_parts === false)
+ {
+ // Malformed url, redirect to current page...
+ $url = generate_board_url() . '/' . $user->page['page'];
+ }
+ else if (!empty($url_parts['scheme']) && !empty($url_parts['host']))
+ {
+ // Attention: only able to redirect within the same domain if $disable_cd_check is false (yourdomain.com -> www.yourdomain.com will not work)
+ if (!$disable_cd_check && $url_parts['host'] !== $user->host)
+ {
+ $url = generate_board_url();
+ }
+ }
+ else if ($url[0] == '/')
+ {
+ // Absolute uri, prepend direct url...
+ $url = generate_board_url(true) . $url;
+ }
+ else
+ {
+ // Relative uri
+ $pathinfo = pathinfo($url);
+
+ // Is the uri pointing to the current directory?
+ if ($pathinfo['dirname'] == '.')
+ {
+ $url = str_replace('./', '', $url);
+
+ // Strip / from the beginning
+ if ($url && substr($url, 0, 1) == '/')
+ {
+ $url = substr($url, 1);
+ }
+
+ if ($user->page['page_dir'])
+ {
+ $url = generate_board_url() . '/' . $user->page['page_dir'] . '/' . $url;
+ }
+ else
+ {
+ $url = generate_board_url() . '/' . $url;
+ }
+ }
+ else
+ {
+ // Used ./ before, but $phpbb_root_path is working better with urls within another root path
+ $root_dirs = explode('/', str_replace('\\', '/', phpbb_realpath($phpbb_root_path)));
+ $page_dirs = explode('/', str_replace('\\', '/', phpbb_realpath($pathinfo['dirname'])));
+ $intersection = array_intersect_assoc($root_dirs, $page_dirs);
+
+ $root_dirs = array_diff_assoc($root_dirs, $intersection);
+ $page_dirs = array_diff_assoc($page_dirs, $intersection);
+
+ $dir = str_repeat('../', sizeof($root_dirs)) . implode('/', $page_dirs);
+
+ // Strip / from the end
+ if ($dir && substr($dir, -1, 1) == '/')
+ {
+ $dir = substr($dir, 0, -1);
+ }
+
+ // Strip / from the beginning
+ if ($dir && substr($dir, 0, 1) == '/')
+ {
+ $dir = substr($dir, 1);
+ }
+
+ $url = str_replace($pathinfo['dirname'] . '/', '', $url);
+
+ // Strip / from the beginning
+ if (substr($url, 0, 1) == '/')
+ {
+ $url = substr($url, 1);
+ }
+
+ $url = (!empty($dir) ? $dir . '/' : '') . $url;
+ $url = generate_board_url() . '/' . $url;
+ }
+ }
+
+ // Make sure no linebreaks are there... to prevent http response splitting for PHP < 4.4.2
+ if (strpos(urldecode($url), "\n") !== false || strpos(urldecode($url), "\r") !== false || strpos($url, ';') !== false)
+ {
+ trigger_error('Tried to redirect to potentially insecure url.', E_USER_ERROR);
+ }
+
+ // Now, also check the protocol and for a valid url the last time...
+ $allowed_protocols = array('http', 'https', 'ftp', 'ftps');
+ $url_parts = parse_url($url);
+
+ if ($url_parts === false || empty($url_parts['scheme']) || !in_array($url_parts['scheme'], $allowed_protocols))
+ {
+ trigger_error('Tried to redirect to potentially insecure url.', E_USER_ERROR);
+ }
+
+ if ($return)
+ {
+ return $url;
+ }
+
+ // Redirect via an HTML form for PITA webservers
+ if (@preg_match('#Microsoft|WebSTAR|Xitami#', getenv('SERVER_SOFTWARE')))
+ {
+ header('Refresh: 0; URL=' . $url);
+
+ echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
+ echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="' . $user->lang['DIRECTION'] . '" lang="' . $user->lang['USER_LANG'] . '" xml:lang="' . $user->lang['USER_LANG'] . '">';
+ echo '<head>';
+ echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
+ echo '<meta http-equiv="refresh" content="0; url=' . str_replace('&', '&amp;', $url) . '" />';
+ echo '<title>' . $user->lang['REDIRECT'] . '</title>';
+ echo '</head>';
+ echo '<body>';
+ echo '<div style="text-align: center;">' . sprintf($user->lang['URL_REDIRECT'], '<a href="' . str_replace('&', '&amp;', $url) . '">', '</a>') . '</div>';
+ echo '</body>';
+ echo '</html>';
+
+ exit;
+ }
+
+ // Behave as per HTTP/1.1 spec for others
+ header('Location: ' . $url);
+ exit;
+}
+
+/**
+* Re-Apply session id after page reloads
+*/
+function reapply_sid($url)
+{
+ global $phpEx, $phpbb_root_path;
+
+ if ($url === "index.$phpEx")
+ {
+ return append_sid("index.$phpEx");
+ }
+ else if ($url === "{$phpbb_root_path}index.$phpEx")
+ {
+ return append_sid("{$phpbb_root_path}index.$phpEx");
+ }
+
+ // Remove previously added sid
+ if (strpos($url, 'sid=') !== false)
+ {
+ // All kind of links
+ $url = preg_replace('/(\?)?(&amp;|&)?sid=[a-z0-9]+/', '', $url);
+ // if the sid was the first param, make the old second as first ones
+ $url = preg_replace("/$phpEx(&amp;|&)+?/", "$phpEx?", $url);
+ }
+
+ return append_sid($url);
+}
+
+/**
+* Returns url from the session/current page with an re-appended SID with optionally stripping vars from the url
+*/
+function build_url($strip_vars = false)
+{
+ global $user, $phpbb_root_path;
+
+ // Append SID
+ $redirect = append_sid($user->page['page'], false, false);
+
+ // Add delimiter if not there...
+ if (strpos($redirect, '?') === false)
+ {
+ $redirect .= '?';
+ }
+
+ // Strip vars...
+ if ($strip_vars !== false && strpos($redirect, '?') !== false)
+ {
+ if (!is_array($strip_vars))
+ {
+ $strip_vars = array($strip_vars);
+ }
+
+ $query = $_query = array();
+
+ $args = substr($redirect, strpos($redirect, '?') + 1);
+ $args = ($args) ? explode('&', $args) : array();
+ $redirect = substr($redirect, 0, strpos($redirect, '?'));
+
+ foreach ($args as $argument)
+ {
+ $arguments = explode('=', $argument);
+ $key = $arguments[0];
+ unset($arguments[0]);
+
+ $query[$key] = implode('=', $arguments);
+ }
+
+ // Strip the vars off
+ foreach ($strip_vars as $strip)
+ {
+ if (isset($query[$strip]))
+ {
+ unset($query[$strip]);
+ }
+ }
+
+ // Glue the remaining parts together... already urlencoded
+ foreach ($query as $key => $value)
+ {
+ $_query[] = $key . '=' . $value;
+ }
+ $query = implode('&', $_query);
+
+ $redirect .= ($query) ? '?' . $query : '';
+ }
+
+ // We need to be cautious here.
+ // On some situations, the redirect path is an absolute URL, sometimes a relative path
+ // For a relative path, let's prefix it with $phpbb_root_path to point to the correct location,
+ // else we use the URL directly.
+ $url_parts = @parse_url($redirect);
+
+ // URL
+ if ($url_parts !== false && !empty($url_parts['scheme']) && !empty($url_parts['host']))
+ {
+ return str_replace('&', '&amp;', $redirect);
+ }
+
+ return $phpbb_root_path . str_replace('&', '&amp;', $redirect);
+}
+
+/**
+* Meta refresh assignment
+* Adds META template variable with meta http tag.
+*
+* @param int $time Time in seconds for meta refresh tag
+* @param string $url URL to redirect to. The url will go through redirect() first before the template variable is assigned
+* @param bool $disable_cd_check If true, meta_refresh() will redirect to an external domain. If false, the redirect point to the boards url if it does not match the current domain. Default is false.
+*/
+function meta_refresh($time, $url, $disable_cd_check = false)
+{
+ global $template;
+
+ $url = redirect($url, true, $disable_cd_check);
+ $url = str_replace('&', '&amp;', $url);
+
+ // For XHTML compatibility we change back & to &amp;
+ $template->assign_vars(array(
+ 'META' => '<meta http-equiv="refresh" content="' . $time . ';url=' . $url . '" />')
+ );
+
+ return $url;
+}
+
+//Form validation
+
+
+/**
+* Add a secret hash for use in links/GET requests
+* @param string $link_name The name of the link; has to match the name used in check_link_hash, otherwise no restrictions apply
+* @return string the hash
+
+*/
+function generate_link_hash($link_name)
+{
+ global $user;
+
+ if (!isset($user->data["hash_$link_name"]))
+ {
+ $user->data["hash_$link_name"] = substr(sha1($user->data['user_form_salt'] . $link_name), 0, 8);
+ }
+
+ return $user->data["hash_$link_name"];
+}
+
+
+/**
+* checks a link hash - for GET requests
+* @param string $token the submitted token
+* @param string $link_name The name of the link
+* @return boolean true if all is fine
+*/
+function check_link_hash($token, $link_name)
+{
+ return $token === generate_link_hash($link_name);
+}
+
+/**
+* Add a secret token to the form (requires the S_FORM_TOKEN template variable)
+* @param string $form_name The name of the form; has to match the name used in check_form_key, otherwise no restrictions apply
+*/
+function add_form_key($form_name)
+{
+ global $config, $template, $user;
+
+ $now = time();
+ $token_sid = ($user->data['user_id'] == ANONYMOUS && !empty($config['form_token_sid_guests'])) ? $user->session_id : '';
+ $token = sha1($now . $user->data['user_form_salt'] . $form_name . $token_sid);
+
+ $s_fields = build_hidden_fields(array(
+ 'creation_time' => $now,
+ 'form_token' => $token,
+ ));
+
+ $template->assign_vars(array(
+ 'S_FORM_TOKEN' => $s_fields,
+ ));
+}
+
+/**
+* Check the form key. Required for all altering actions not secured by confirm_box
+* @param string $form_name The name of the form; has to match the name used in add_form_key, otherwise no restrictions apply
+* @param int $timespan The maximum acceptable age for a submitted form in seconds. Defaults to the config setting.
+* @param string $return_page The address for the return link
+* @param bool $trigger If true, the function will triger an error when encountering an invalid form
+*/
+function check_form_key($form_name, $timespan = false, $return_page = '', $trigger = false)
+{
+ global $config, $user;
+
+ if ($timespan === false)
+ {
+ // we enforce a minimum value of half a minute here.
+ $timespan = ($config['form_token_lifetime'] == -1) ? -1 : max(30, $config['form_token_lifetime']);
+ }
+
+ if (isset($_POST['creation_time']) && isset($_POST['form_token']))
+ {
+ $creation_time = abs(request_var('creation_time', 0));
+ $token = request_var('form_token', '');
+
+ $diff = time() - $creation_time;
+
+ // If creation_time and the time() now is zero we can assume it was not a human doing this (the check for if ($diff)...
+ if ($diff && ($diff <= $timespan || $timespan === -1))
+ {
+ $token_sid = ($user->data['user_id'] == ANONYMOUS && !empty($config['form_token_sid_guests'])) ? $user->session_id : '';
+ $key = sha1($creation_time . $user->data['user_form_salt'] . $form_name . $token_sid);
+
+ if ($key === $token)
+ {
+ return true;
+ }
+ }
+ }
+
+ if ($trigger)
+ {
+ trigger_error($user->lang['FORM_INVALID'] . $return_page);
+ }
+
+ return false;
+}
+
+// Message/Login boxes
+
+/**
+* Build Confirm box
+* @param boolean $check True for checking if confirmed (without any additional parameters) and false for displaying the confirm box
+* @param string $title Title/Message used for confirm box.
+* message text is _CONFIRM appended to title.
+* If title cannot be found in user->lang a default one is displayed
+* If title_CONFIRM cannot be found in user->lang the text given is used.
+* @param string $hidden Hidden variables
+* @param string $html_body Template used for confirm box
+* @param string $u_action Custom form action
+*/
+function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_body.html', $u_action = '')
+{
+ global $user, $template, $db;
+ global $phpEx, $phpbb_root_path;
+
+ if (isset($_POST['cancel']))
+ {
+ return false;
+ }
+
+ $confirm = false;
+ if (isset($_POST['confirm']))
+ {
+ // language frontier
+ if ($_POST['confirm'] === $user->lang['YES'])
+ {
+ $confirm = true;
+ }
+ }
+
+ if ($check && $confirm)
+ {
+ $user_id = request_var('confirm_uid', 0);
+ $session_id = request_var('sess', '');
+ $confirm_key = request_var('confirm_key', '');
+
+ if ($user_id != $user->data['user_id'] || $session_id != $user->session_id || !$confirm_key || !$user->data['user_last_confirm_key'] || $confirm_key != $user->data['user_last_confirm_key'])
+ {
+ return false;
+ }
+
+ // Reset user_last_confirm_key
+ $sql = 'UPDATE ' . USERS_TABLE . " SET user_last_confirm_key = ''
+ WHERE user_id = " . $user->data['user_id'];
+ $db->sql_query($sql);
+
+ return true;
+ }
+ else if ($check)
+ {
+ return false;
+ }
+
+ $s_hidden_fields = build_hidden_fields(array(
+ 'confirm_uid' => $user->data['user_id'],
+ 'sess' => $user->session_id,
+ 'sid' => $user->session_id,
+ ));
+
+ // generate activation key
+ $confirm_key = gen_rand_string(10);
+
+ if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])
+ {
+ adm_page_header((!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title]);
+ }
+ else
+ {
+ page_header(((!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title]), false);
+ }
+
+ $template->set_filenames(array(
+ 'body' => $html_body)
+ );
+
+ // If activation key already exist, we better do not re-use the key (something very strange is going on...)
+ if (request_var('confirm_key', ''))
+ {
+ // This should not occur, therefore we cancel the operation to safe the user
+ return false;
+ }
+
+ // re-add sid / transform & to &amp; for user->page (user->page is always using &)
+ $use_page = ($u_action) ? $phpbb_root_path . $u_action : $phpbb_root_path . str_replace('&', '&amp;', $user->page['page']);
+ $u_action = reapply_sid($use_page);
+ $u_action .= ((strpos($u_action, '?') === false) ? '?' : '&amp;') . 'confirm_key=' . $confirm_key;
+
+ $template->assign_vars(array(
+ 'MESSAGE_TITLE' => (!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title],
+ 'MESSAGE_TEXT' => (!isset($user->lang[$title . '_CONFIRM'])) ? $title : $user->lang[$title . '_CONFIRM'],
+
+ 'YES_VALUE' => $user->lang['YES'],
+ 'S_CONFIRM_ACTION' => $u_action,
+ 'S_HIDDEN_FIELDS' => $hidden . $s_hidden_fields)
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . " SET user_last_confirm_key = '" . $db->sql_escape($confirm_key) . "'
+ WHERE user_id = " . $user->data['user_id'];
+ $db->sql_query($sql);
+
+ if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])
+ {
+ adm_page_footer();
+ }
+ else
+ {
+ page_footer();
+ }
+}
+
+/**
+* Generate login box or verify password
+*/
+function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true)
+{
+ global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config;
+
+ if (!class_exists('phpbb_captcha_factory'))
+ {
+ include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
+ }
+
+ $err = '';
+
+ // Make sure user->setup() has been called
+ if (empty($user->lang))
+ {
+ $user->setup();
+ }
+
+ // Print out error if user tries to authenticate as an administrator without having the privileges...
+ if ($admin && !$auth->acl_get('a_'))
+ {
+ // Not authd
+ // anonymous/inactive users are never able to go to the ACP even if they have the relevant permissions
+ if ($user->data['is_registered'])
+ {
+ add_log('admin', 'LOG_ADMIN_AUTH_FAIL');
+ }
+ trigger_error('NO_AUTH_ADMIN');
+ }
+
+ if (isset($_POST['login']))
+ {
+ // Get credential
+ if ($admin)
+ {
+ $credential = request_var('credential', '');
+
+ if (strspn($credential, 'abcdef0123456789') !== strlen($credential) || strlen($credential) != 32)
+ {
+ if ($user->data['is_registered'])
+ {
+ add_log('admin', 'LOG_ADMIN_AUTH_FAIL');
+ }
+ trigger_error('NO_AUTH_ADMIN');
+ }
+
+ $password = request_var('password_' . $credential, '', true);
+ }
+ else
+ {
+ $password = request_var('password', '', true);
+ }
+
+ $username = request_var('username', '', true);
+ $autologin = (!empty($_POST['autologin'])) ? true : false;
+ $viewonline = (!empty($_POST['viewonline'])) ? 0 : 1;
+ $admin = ($admin) ? 1 : 0;
+ $viewonline = ($admin) ? $user->data['session_viewonline'] : $viewonline;
+
+ // Check if the supplied username is equal to the one stored within the database if re-authenticating
+ if ($admin && utf8_clean_string($username) != utf8_clean_string($user->data['username']))
+ {
+ // We log the attempt to use a different username...
+ add_log('admin', 'LOG_ADMIN_AUTH_FAIL');
+ trigger_error('NO_AUTH_ADMIN_USER_DIFFER');
+ }
+
+ // If authentication is successful we redirect user to previous page
+ $result = $auth->login($username, $password, $autologin, $viewonline, $admin);
+
+ // If admin authentication and login, we will log if it was a success or not...
+ // We also break the operation on the first non-success login - it could be argued that the user already knows
+ if ($admin)
+ {
+ if ($result['status'] == LOGIN_SUCCESS)
+ {
+ add_log('admin', 'LOG_ADMIN_AUTH_SUCCESS');
+ }
+ else
+ {
+ // Only log the failed attempt if a real user tried to.
+ // anonymous/inactive users are never able to go to the ACP even if they have the relevant permissions
+ if ($user->data['is_registered'])
+ {
+ add_log('admin', 'LOG_ADMIN_AUTH_FAIL');
+ }
+ }
+ }
+
+ // The result parameter is always an array, holding the relevant information...
+ if ($result['status'] == LOGIN_SUCCESS)
+ {
+ $redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx");
+ $message = ($l_success) ? $l_success : $user->lang['LOGIN_REDIRECT'];
+ $l_redirect = ($admin) ? $user->lang['PROCEED_TO_ACP'] : (($redirect === "{$phpbb_root_path}index.$phpEx" || $redirect === "index.$phpEx") ? $user->lang['RETURN_INDEX'] : $user->lang['RETURN_PAGE']);
+
+ // append/replace SID (may change during the session for AOL users)
+ $redirect = reapply_sid($redirect);
+
+ // Special case... the user is effectively banned, but we allow founders to login
+ if (defined('IN_CHECK_BAN') && $result['user_row']['user_type'] != USER_FOUNDER)
+ {
+ return;
+ }
+
+ $redirect = meta_refresh(3, $redirect);
+ trigger_error($message . '<br /><br />' . sprintf($l_redirect, '<a href="' . $redirect . '">', '</a>'));
+ }
+
+ // Something failed, determine what...
+ if ($result['status'] == LOGIN_BREAK)
+ {
+ trigger_error($result['error_msg']);
+ }
+
+ // Special cases... determine
+ switch ($result['status'])
+ {
+ case LOGIN_ERROR_ATTEMPTS:
+
+ $captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $captcha->init(CONFIRM_LOGIN);
+ // $captcha->reset();
+
+ $template->assign_vars(array(
+ 'CAPTCHA_TEMPLATE' => $captcha->get_template(),
+ ));
+
+ $err = $user->lang[$result['error_msg']];
+ break;
+
+ case LOGIN_ERROR_PASSWORD_CONVERT:
+ $err = sprintf(
+ $user->lang[$result['error_msg']],
+ ($config['email_enable']) ? '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') . '">' : '',
+ ($config['email_enable']) ? '</a>' : '',
+ ($config['board_contact']) ? '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">' : '',
+ ($config['board_contact']) ? '</a>' : ''
+ );
+ break;
+
+ // Username, password, etc...
+ default:
+ $err = $user->lang[$result['error_msg']];
+
+ // Assign admin contact to some error messages
+ if ($result['error_msg'] == 'LOGIN_ERROR_USERNAME' || $result['error_msg'] == 'LOGIN_ERROR_PASSWORD')
+ {
+ $err = (!$config['board_contact']) ? sprintf($user->lang[$result['error_msg']], '', '') : sprintf($user->lang[$result['error_msg']], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
+ }
+
+ break;
+ }
+ }
+
+ // Assign credential for username/password pair
+ $credential = ($admin) ? md5(unique_id()) : false;
+
+ $s_hidden_fields = array(
+ 'sid' => $user->session_id,
+ );
+
+ if ($redirect)
+ {
+ $s_hidden_fields['redirect'] = $redirect;
+ }
+
+ if ($admin)
+ {
+ $s_hidden_fields['credential'] = $credential;
+ }
+
+ $s_hidden_fields = build_hidden_fields($s_hidden_fields);
+
+ $template->assign_vars(array(
+ 'LOGIN_ERROR' => $err,
+ 'LOGIN_EXPLAIN' => $l_explain,
+
+ 'U_SEND_PASSWORD' => ($config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') : '',
+ 'U_RESEND_ACTIVATION' => ($config['require_activation'] == USER_ACTIVATION_SELF && $config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=resend_act') : '',
+ 'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'),
+ 'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'),
+
+ 'S_DISPLAY_FULL_LOGIN' => ($s_display) ? true : false,
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields,
+
+ 'S_ADMIN_AUTH' => $admin,
+ 'USERNAME' => ($admin) ? $user->data['username'] : '',
+
+ 'USERNAME_CREDENTIAL' => 'username',
+ 'PASSWORD_CREDENTIAL' => ($admin) ? 'password_' . $credential : 'password',
+ ));
+
+ page_header($user->lang['LOGIN'], false);
+
+ $template->set_filenames(array(
+ 'body' => 'login_body.html')
+ );
+ make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
+
+ page_footer();
+}
+
+/**
+* Generate forum login box
+*/
+function login_forum_box($forum_data)
+{
+ global $db, $config, $user, $template, $phpEx;
+
+ $password = request_var('password', '', true);
+
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_ACCESS_TABLE . '
+ WHERE forum_id = ' . $forum_data['forum_id'] . '
+ AND user_id = ' . $user->data['user_id'] . "
+ AND session_id = '" . $db->sql_escape($user->session_id) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ return true;
+ }
+
+ if ($password)
+ {
+ // Remove expired authorised sessions
+ $sql = 'SELECT f.session_id
+ FROM ' . FORUMS_ACCESS_TABLE . ' f
+ LEFT JOIN ' . SESSIONS_TABLE . ' s ON (f.session_id = s.session_id)
+ WHERE s.session_id IS NULL';
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $sql_in = array();
+ do
+ {
+ $sql_in[] = (string) $row['session_id'];
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ // Remove expired sessions
+ $sql = 'DELETE FROM ' . FORUMS_ACCESS_TABLE . '
+ WHERE ' . $db->sql_in_set('session_id', $sql_in);
+ $db->sql_query($sql);
+ }
+ $db->sql_freeresult($result);
+
+ if (phpbb_check_hash($password, $forum_data['forum_password']))
+ {
+ $sql_ary = array(
+ 'forum_id' => (int) $forum_data['forum_id'],
+ 'user_id' => (int) $user->data['user_id'],
+ 'session_id' => (string) $user->session_id,
+ );
+
+ $db->sql_query('INSERT INTO ' . FORUMS_ACCESS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+
+ return true;
+ }
+
+ $template->assign_var('LOGIN_ERROR', $user->lang['WRONG_PASSWORD']);
+ }
+
+ page_header($user->lang['LOGIN'], false);
+
+ $template->assign_vars(array(
+ 'S_LOGIN_ACTION' => build_url(array('f')),
+ 'S_HIDDEN_FIELDS' => build_hidden_fields(array('f' => $forum_data['forum_id'])))
+ );
+
+ $template->set_filenames(array(
+ 'body' => 'login_forum.html')
+ );
+
+ page_footer();
+}
+
+// Little helpers
+
+/**
+* Little helper for the build_hidden_fields function
+*/
+function _build_hidden_fields($key, $value, $specialchar, $stripslashes)
+{
+ $hidden_fields = '';
+
+ if (!is_array($value))
+ {
+ $value = ($stripslashes) ? stripslashes($value) : $value;
+ $value = ($specialchar) ? htmlspecialchars($value, ENT_COMPAT, 'UTF-8') : $value;
+
+ $hidden_fields .= '<input type="hidden" name="' . $key . '" value="' . $value . '" />' . "\n";
+ }
+ else
+ {
+ foreach ($value as $_key => $_value)
+ {
+ $_key = ($stripslashes) ? stripslashes($_key) : $_key;
+ $_key = ($specialchar) ? htmlspecialchars($_key, ENT_COMPAT, 'UTF-8') : $_key;
+
+ $hidden_fields .= _build_hidden_fields($key . '[' . $_key . ']', $_value, $specialchar, $stripslashes);
+ }
+ }
+
+ return $hidden_fields;
+}
+
+/**
+* Build simple hidden fields from array
+*
+* @param array $field_ary an array of values to build the hidden field from
+* @param bool $specialchar if true, keys and values get specialchared
+* @param bool $stripslashes if true, keys and values get stripslashed
+*
+* @return string the hidden fields
+*/
+function build_hidden_fields($field_ary, $specialchar = false, $stripslashes = false)
+{
+ $s_hidden_fields = '';
+
+ foreach ($field_ary as $name => $vars)
+ {
+ $name = ($stripslashes) ? stripslashes($name) : $name;
+ $name = ($specialchar) ? htmlspecialchars($name, ENT_COMPAT, 'UTF-8') : $name;
+
+ $s_hidden_fields .= _build_hidden_fields($name, $vars, $specialchar, $stripslashes);
+ }
+
+ return $s_hidden_fields;
+}
+
+/**
+* Parse cfg file
+*/
+function parse_cfg_file($filename, $lines = false)
+{
+ $parsed_items = array();
+
+ if ($lines === false)
+ {
+ $lines = file($filename);
+ }
+
+ foreach ($lines as $line)
+ {
+ $line = trim($line);
+
+ if (!$line || $line[0] == '#' || ($delim_pos = strpos($line, '=')) === false)
+ {
+ continue;
+ }
+
+ // Determine first occurrence, since in values the equal sign is allowed
+ $key = strtolower(trim(substr($line, 0, $delim_pos)));
+ $value = trim(substr($line, $delim_pos + 1));
+
+ if (in_array($value, array('off', 'false', '0')))
+ {
+ $value = false;
+ }
+ else if (in_array($value, array('on', 'true', '1')))
+ {
+ $value = true;
+ }
+ else if (!trim($value))
+ {
+ $value = '';
+ }
+ else if (($value[0] == "'" && $value[sizeof($value) - 1] == "'") || ($value[0] == '"' && $value[sizeof($value) - 1] == '"'))
+ {
+ $value = substr($value, 1, sizeof($value)-2);
+ }
+
+ $parsed_items[$key] = $value;
+ }
+
+ return $parsed_items;
+}
+
+/**
+* Add log event
+*/
+function add_log()
+{
+ global $db, $user;
+
+ // In phpBB 3.1.x i want to have logging in a class to be able to control it
+ // For now, we need a quite hakish approach to circumvent logging for some actions
+ // @todo implement cleanly
+ if (!empty($GLOBALS['skip_add_log']))
+ {
+ return false;
+ }
+
+ $args = func_get_args();
+
+ $mode = array_shift($args);
+ $reportee_id = ($mode == 'user') ? intval(array_shift($args)) : '';
+ $forum_id = ($mode == 'mod') ? intval(array_shift($args)) : '';
+ $topic_id = ($mode == 'mod') ? intval(array_shift($args)) : '';
+ $action = array_shift($args);
+ $data = (!sizeof($args)) ? '' : serialize($args);
+
+ $sql_ary = array(
+ 'user_id' => (empty($user->data)) ? ANONYMOUS : $user->data['user_id'],
+ 'log_ip' => $user->ip,
+ 'log_time' => time(),
+ 'log_operation' => $action,
+ 'log_data' => $data,
+ );
+
+ switch ($mode)
+ {
+ case 'admin':
+ $sql_ary['log_type'] = LOG_ADMIN;
+ break;
+
+ case 'mod':
+ $sql_ary += array(
+ 'log_type' => LOG_MOD,
+ 'forum_id' => $forum_id,
+ 'topic_id' => $topic_id
+ );
+ break;
+
+ case 'user':
+ $sql_ary += array(
+ 'log_type' => LOG_USERS,
+ 'reportee_id' => $reportee_id
+ );
+ break;
+
+ case 'critical':
+ $sql_ary['log_type'] = LOG_CRITICAL;
+ break;
+
+ default:
+ return false;
+ }
+
+ $db->sql_query('INSERT INTO ' . LOG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+
+ return $db->sql_nextid();
+}
+
+/**
+* Return a nicely formatted backtrace (parts from the php manual by diz at ysagoon dot com)
+*/
+function get_backtrace()
+{
+ global $phpbb_root_path;
+
+ $output = '<div style="font-family: monospace;">';
+ $backtrace = debug_backtrace();
+ $path = phpbb_realpath($phpbb_root_path);
+
+ foreach ($backtrace as $number => $trace)
+ {
+ // We skip the first one, because it only shows this file/function
+ if ($number == 0)
+ {
+ continue;
+ }
+
+ // Strip the current directory from path
+ if (empty($trace['file']))
+ {
+ $trace['file'] = '';
+ }
+ else
+ {
+ $trace['file'] = str_replace(array($path, '\\'), array('', '/'), $trace['file']);
+ $trace['file'] = substr($trace['file'], 1);
+ }
+ $args = array();
+
+ // If include/require/include_once is not called, do not show arguments - they may contain sensible information
+ if (!in_array($trace['function'], array('include', 'require', 'include_once')))
+ {
+ unset($trace['args']);
+ }
+ else
+ {
+ // Path...
+ if (!empty($trace['args'][0]))
+ {
+ $argument = htmlspecialchars($trace['args'][0]);
+ $argument = str_replace(array($path, '\\'), array('', '/'), $argument);
+ $argument = substr($argument, 1);
+ $args[] = "'{$argument}'";
+ }
+ }
+
+ $trace['class'] = (!isset($trace['class'])) ? '' : $trace['class'];
+ $trace['type'] = (!isset($trace['type'])) ? '' : $trace['type'];
+
+ $output .= '<br />';
+ $output .= '<b>FILE:</b> ' . htmlspecialchars($trace['file']) . '<br />';
+ $output .= '<b>LINE:</b> ' . ((!empty($trace['line'])) ? $trace['line'] : '') . '<br />';
+
+ $output .= '<b>CALL:</b> ' . htmlspecialchars($trace['class'] . $trace['type'] . $trace['function']) . '(' . ((sizeof($args)) ? implode(', ', $args) : '') . ')<br />';
+ }
+ $output .= '</div>';
+ return $output;
+}
+
+/**
+* This function returns a regular expression pattern for commonly used expressions
+* Use with / as delimiter for email mode and # for url modes
+* mode can be: email|bbcode_htm|url|url_inline|www_url|www_url_inline|relative_url|relative_url_inline|ipv4|ipv6
+*/
+function get_preg_expression($mode)
+{
+ switch ($mode)
+ {
+ case 'email':
+ return '(?:[a-z0-9\'\.\-_\+\|]++|&amp;)+@[a-z0-9\-]+\.(?:[a-z0-9\-]+\.)*[a-z]+';
+ break;
+
+ case 'bbcode_htm':
+ return array(
+ '#<!\-\- e \-\-><a href="mailto:(.*?)">.*?</a><!\-\- e \-\->#',
+ '#<!\-\- l \-\-><a (?:class="[\w-]+" )?href="(.*?)(?:(&amp;|\?)sid=[0-9a-f]{32})?">.*?</a><!\-\- l \-\->#',
+ '#<!\-\- ([mw]) \-\-><a (?:class="[\w-]+" )?href="(.*?)">.*?</a><!\-\- \1 \-\->#',
+ '#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#',
+ '#<!\-\- .*? \-\->#s',
+ '#<.*?>#s',
+ );
+ break;
+
+ // Whoa these look impressive!
+ // The code to generate the following two regular expressions which match valid IPv4/IPv6 addresses
+ // can be found in the develop directory
+ case 'ipv4':
+ return '#^(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$#';
+ break;
+
+ case 'ipv6':
+ return '#^(?:(?:(?:[\dA-F]{1,4}:){6}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:::(?:[\dA-F]{1,4}:){5}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:):(?:[\dA-F]{1,4}:){4}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,2}:(?:[\dA-F]{1,4}:){3}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,3}:(?:[\dA-F]{1,4}:){2}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,4}:(?:[\dA-F]{1,4}:)(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,5}:(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,6}:[\dA-F]{1,4})|(?:(?:[\dA-F]{1,4}:){1,7}:))$#i';
+ break;
+
+ case 'url':
+ case 'url_inline':
+ $inline = ($mode == 'url') ? ')' : '';
+ $scheme = ($mode == 'url') ? '[a-z\d+\-.]' : '[a-z\d+]'; // avoid automatic parsing of "word" in "last word.http://..."
+ // generated with regex generation file in the develop folder
+ return "[a-z]$scheme*:/{2}(?:(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
+ break;
+
+ case 'www_url':
+ case 'www_url_inline':
+ $inline = ($mode == 'www_url') ? ')' : '';
+ return "www\.(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})+(?::\d*)?(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
+ break;
+
+ case 'relative_url':
+ case 'relative_url_inline':
+ $inline = ($mode == 'relative_url') ? ')' : '';
+ return "(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
+ break;
+ }
+
+ return '';
+}
+
+/**
+* Returns the first block of the specified IPv6 address and as many additional
+* ones as specified in the length paramater.
+* If length is zero, then an empty string is returned.
+* If length is greater than 3 the complete IP will be returned
+*/
+function short_ipv6($ip, $length)
+{
+ if ($length < 1)
+ {
+ return '';
+ }
+
+ // extend IPv6 addresses
+ $blocks = substr_count($ip, ':') + 1;
+ if ($blocks < 9)
+ {
+ $ip = str_replace('::', ':' . str_repeat('0000:', 9 - $blocks), $ip);
+ }
+ if ($ip[0] == ':')
+ {
+ $ip = '0000' . $ip;
+ }
+ if ($length < 4)
+ {
+ $ip = implode(':', array_slice(explode(':', $ip), 0, 1 + $length));
+ }
+
+ return $ip;
+}
+
+/**
+* Wrapper for php's checkdnsrr function.
+*
+* The windows failover is from the php manual
+* Please make sure to check the return value for === true and === false, since NULL could
+* be returned too.
+*
+* @return true if entry found, false if not, NULL if this function is not supported by this environment
+*/
+function phpbb_checkdnsrr($host, $type = '')
+{
+ $type = (!$type) ? 'MX' : $type;
+
+ if (DIRECTORY_SEPARATOR == '\\')
+ {
+ if (!function_exists('exec'))
+ {
+ return NULL;
+ }
+
+ // @exec('nslookup -retry=1 -timout=1 -type=' . escapeshellarg($type) . ' ' . escapeshellarg($host), $output);
+ @exec('nslookup -type=' . escapeshellarg($type) . ' ' . escapeshellarg($host) . '.', $output);
+
+ // If output is empty, the nslookup failed
+ if (empty($output))
+ {
+ return NULL;
+ }
+
+ foreach ($output as $line)
+ {
+ if (!trim($line))
+ {
+ continue;
+ }
+
+ // Valid records begin with host name:
+ if (strpos($line, $host) === 0)
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+ else if (function_exists('checkdnsrr'))
+ {
+ // The dot indicates to search the DNS root (helps those having DNS prefixes on the same domain)
+ return (checkdnsrr($host . '.', $type)) ? true : false;
+ }
+
+ return NULL;
+}
+
+// Handler, header and footer
+
+/**
+* Error and message handler, call with trigger_error if reqd
+*/
+function msg_handler($errno, $msg_text, $errfile, $errline)
+{
+ global $cache, $db, $auth, $template, $config, $user;
+ global $phpEx, $phpbb_root_path, $msg_title, $msg_long_text;
+
+ // Do not display notices if we suppress them via @
+ if (error_reporting() == 0 && $errno != E_USER_ERROR && $errno != E_USER_WARNING && $errno != E_USER_NOTICE)
+ {
+ return;
+ }
+
+ // Message handler is stripping text. In case we need it, we are possible to define long text...
+ if (isset($msg_long_text) && $msg_long_text && !$msg_text)
+ {
+ $msg_text = $msg_long_text;
+ }
+
+ if (!defined('E_DEPRECATED'))
+ {
+ define('E_DEPRECATED', 8192);
+ }
+
+ switch ($errno)
+ {
+ case E_NOTICE:
+ case E_WARNING:
+
+ // Check the error reporting level and return if the error level does not match
+ // If DEBUG is defined the default level is E_ALL
+ if (($errno & ((defined('DEBUG')) ? E_ALL : error_reporting())) == 0)
+ {
+ return;
+ }
+
+ if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.') === false)
+ {
+ // flush the content, else we get a white page if output buffering is on
+ if ((int) @ini_get('output_buffering') === 1 || strtolower(@ini_get('output_buffering')) === 'on')
+ {
+ @ob_flush();
+ }
+
+ // Another quick fix for those having gzip compression enabled, but do not flush if the coder wants to catch "something". ;)
+ if (!empty($config['gzip_compress']))
+ {
+ if (@extension_loaded('zlib') && !headers_sent() && !ob_get_level())
+ {
+ @ob_flush();
+ }
+ }
+
+ // remove complete path to installation, with the risk of changing backslashes meant to be there
+ $errfile = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $errfile);
+ $msg_text = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $msg_text);
+ echo '<b>[phpBB Debug] PHP Notice</b>: in file <b>' . $errfile . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n";
+
+ // we are writing an image - the user won't see the debug, so let's place it in the log
+ if (defined('IMAGE_OUTPUT') || defined('IN_CRON'))
+ {
+ add_log('critical', 'LOG_IMAGE_GENERATION_ERROR', $errfile, $errline, $msg_text);
+ }
+ // echo '<br /><br />BACKTRACE<br />' . get_backtrace() . '<br />' . "\n";
+ }
+
+ return;
+
+ break;
+
+ case E_USER_ERROR:
+
+ if (!empty($user) && !empty($user->lang))
+ {
+ $msg_text = (!empty($user->lang[$msg_text])) ? $user->lang[$msg_text] : $msg_text;
+ $msg_title = (!isset($msg_title)) ? $user->lang['GENERAL_ERROR'] : ((!empty($user->lang[$msg_title])) ? $user->lang[$msg_title] : $msg_title);
+
+ $l_return_index = sprintf($user->lang['RETURN_INDEX'], '<a href="' . $phpbb_root_path . '">', '</a>');
+ $l_notify = '';
+
+ if (!empty($config['board_contact']))
+ {
+ $l_notify = '<p>' . sprintf($user->lang['NOTIFY_ADMIN_EMAIL'], $config['board_contact']) . '</p>';
+ }
+ }
+ else
+ {
+ $msg_title = 'General Error';
+ $l_return_index = '<a href="' . $phpbb_root_path . '">Return to index page</a>';
+ $l_notify = '';
+
+ if (!empty($config['board_contact']))
+ {
+ $l_notify = '<p>Please notify the board administrator or webmaster: <a href="mailto:' . $config['board_contact'] . '">' . $config['board_contact'] . '</a></p>';
+ }
+ }
+
+ if (defined('DEBUG') || defined('IN_CRON') || defined('IMAGE_OUTPUT'))
+ {
+ // let's avoid loops
+ $db->sql_return_on_error(true);
+ add_log('critical', 'LOG_GENERAL_ERROR', $msg_title, $msg_text);
+ $db->sql_return_on_error(false);
+ }
+
+ // Do not send 200 OK, but service unavailable on errors
+ header('HTTP/1.1 503 Service Unavailable');
+
+ garbage_collection();
+
+ // Try to not call the adm page data...
+
+ echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
+ echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">';
+ echo '<head>';
+ echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
+ echo '<title>' . $msg_title . '</title>';
+ echo '<style type="text/css">' . "\n" . '/* <![CDATA[ */' . "\n";
+ echo '* { margin: 0; padding: 0; } html { font-size: 100%; height: 100%; margin-bottom: 1px; background-color: #E4EDF0; } body { font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; color: #536482; background: #E4EDF0; font-size: 62.5%; margin: 0; } ';
+ echo 'a:link, a:active, a:visited { color: #006699; text-decoration: none; } a:hover { color: #DD6900; text-decoration: underline; } ';
+ echo '#wrap { padding: 0 20px 15px 20px; min-width: 615px; } #page-header { text-align: right; height: 40px; } #page-footer { clear: both; font-size: 1em; text-align: center; } ';
+ echo '.panel { margin: 4px 0; background-color: #FFFFFF; border: solid 1px #A9B8C2; } ';
+ echo '#errorpage #page-header a { font-weight: bold; line-height: 6em; } #errorpage #content { padding: 10px; } #errorpage #content h1 { line-height: 1.2em; margin-bottom: 0; color: #DF075C; } ';
+ echo '#errorpage #content div { margin-top: 20px; margin-bottom: 5px; border-bottom: 1px solid #CCCCCC; padding-bottom: 5px; color: #333333; font: bold 1.2em "Lucida Grande", Arial, Helvetica, sans-serif; text-decoration: none; line-height: 120%; text-align: left; } ';
+ echo "\n" . '/* ]]> */' . "\n";
+ echo '</style>';
+ echo '</head>';
+ echo '<body id="errorpage">';
+ echo '<div id="wrap">';
+ echo ' <div id="page-header">';
+ echo ' ' . $l_return_index;
+ echo ' </div>';
+ echo ' <div id="acp">';
+ echo ' <div class="panel">';
+ echo ' <div id="content">';
+ echo ' <h1>' . $msg_title . '</h1>';
+
+ echo ' <div>' . $msg_text . '</div>';
+
+ echo $l_notify;
+
+ echo ' </div>';
+ echo ' </div>';
+ echo ' </div>';
+ echo ' <div id="page-footer">';
+ echo ' Powered by phpBB &copy; 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>';
+ echo ' </div>';
+ echo '</div>';
+ echo '</body>';
+ echo '</html>';
+
+ exit_handler();
+
+ // On a fatal error (and E_USER_ERROR *is* fatal) we never want other scripts to continue and force an exit here.
+ exit;
+ break;
+
+ case E_USER_WARNING:
+ case E_USER_NOTICE:
+
+ define('IN_ERROR_HANDLER', true);
+
+ if (empty($user->data))
+ {
+ $user->session_begin();
+ }
+
+ // We re-init the auth array to get correct results on login/logout
+ $auth->acl($user->data);
+
+ if (empty($user->lang))
+ {
+ $user->setup();
+ }
+
+ $msg_text = (!empty($user->lang[$msg_text])) ? $user->lang[$msg_text] : $msg_text;
+ $msg_title = (!isset($msg_title)) ? $user->lang['INFORMATION'] : ((!empty($user->lang[$msg_title])) ? $user->lang[$msg_title] : $msg_title);
+
+ if (!defined('HEADER_INC'))
+ {
+ if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])
+ {
+ adm_page_header($msg_title);
+ }
+ else
+ {
+ page_header($msg_title, false);
+ }
+ }
+
+ $template->set_filenames(array(
+ 'body' => 'message_body.html')
+ );
+
+ $template->assign_vars(array(
+ 'MESSAGE_TITLE' => $msg_title,
+ 'MESSAGE_TEXT' => $msg_text,
+ 'S_USER_WARNING' => ($errno == E_USER_WARNING) ? true : false,
+ 'S_USER_NOTICE' => ($errno == E_USER_NOTICE) ? true : false)
+ );
+
+ // We do not want the cron script to be called on error messages
+ define('IN_CRON', true);
+
+ if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])
+ {
+ adm_page_footer();
+ }
+ else
+ {
+ page_footer();
+ }
+
+ exit_handler();
+ break;
+
+ // PHP4 compatibility
+ case E_DEPRECATED:
+ return true;
+ break;
+ }
+
+ // If we notice an error not handled here we pass this back to PHP by returning false
+ // This may not work for all php versions
+ return false;
+}
+
+/**
+* Queries the session table to get information about online guests
+* @param int $item_id Limits the search to the item with this id
+* @param string $item The name of the item which is stored in the session table as session_{$item}_id
+* @return int The number of active distinct guest sessions
+*/
+function obtain_guest_count($item_id = 0, $item = 'forum')
+{
+ global $db, $config;
+
+ if ($item_id)
+ {
+ $reading_sql = ' AND s.session_' . $item . '_id = ' . (int) $item_id;
+ }
+ else
+ {
+ $reading_sql = '';
+ }
+ $time = (time() - (intval($config['load_online_time']) * 60));
+
+ // Get number of online guests
+
+ if ($db->sql_layer === 'sqlite')
+ {
+ $sql = 'SELECT COUNT(session_ip) as num_guests
+ FROM (
+ SELECT DISTINCT s.session_ip
+ FROM ' . SESSIONS_TABLE . ' s
+ WHERE s.session_user_id = ' . ANONYMOUS . '
+ AND s.session_time >= ' . ($time - ((int) ($time % 60))) .
+ $reading_sql .
+ ')';
+ }
+ else
+ {
+ $sql = 'SELECT COUNT(DISTINCT s.session_ip) as num_guests
+ FROM ' . SESSIONS_TABLE . ' s
+ WHERE s.session_user_id = ' . ANONYMOUS . '
+ AND s.session_time >= ' . ($time - ((int) ($time % 60))) .
+ $reading_sql;
+ }
+ $result = $db->sql_query($sql);
+ $guests_online = (int) $db->sql_fetchfield('num_guests');
+ $db->sql_freeresult($result);
+
+ return $guests_online;
+}
+
+/**
+* Queries the session table to get information about online users
+* @param int $item_id Limits the search to the item with this id
+* @param string $item The name of the item which is stored in the session table as session_{$item}_id
+* @return array An array containing the ids of online, hidden and visible users, as well as statistical info
+*/
+function obtain_users_online($item_id = 0, $item = 'forum')
+{
+ global $db, $config, $user;
+
+ $reading_sql = '';
+ if ($item_id !== 0)
+ {
+ $reading_sql = ' AND s.session_' . $item . '_id = ' . (int) $item_id;
+ }
+
+ $online_users = array(
+ 'online_users' => array(),
+ 'hidden_users' => array(),
+ 'total_online' => 0,
+ 'visible_online' => 0,
+ 'hidden_online' => 0,
+ 'guests_online' => 0,
+ );
+
+ if ($config['load_online_guests'])
+ {
+ $online_users['guests_online'] = obtain_guest_count($item_id, $item);
+ }
+
+ // a little discrete magic to cache this for 30 seconds
+ $time = (time() - (intval($config['load_online_time']) * 60));
+
+ $sql = 'SELECT s.session_user_id, s.session_ip, s.session_viewonline
+ FROM ' . SESSIONS_TABLE . ' s
+ WHERE s.session_time >= ' . ($time - ((int) ($time % 30))) .
+ $reading_sql .
+ ' AND s.session_user_id <> ' . ANONYMOUS;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // Skip multiple sessions for one user
+ if (!isset($online_users['online_users'][$row['session_user_id']]))
+ {
+ $online_users['online_users'][$row['session_user_id']] = (int) $row['session_user_id'];
+ if ($row['session_viewonline'])
+ {
+ $online_users['visible_online']++;
+ }
+ else
+ {
+ $online_users['hidden_users'][$row['session_user_id']] = (int) $row['session_user_id'];
+ $online_users['hidden_online']++;
+ }
+ }
+ }
+ $online_users['total_online'] = $online_users['guests_online'] + $online_users['visible_online'] + $online_users['hidden_online'];
+ $db->sql_freeresult($result);
+
+ return $online_users;
+}
+
+/**
+* Uses the result of obtain_users_online to generate a localized, readable representation.
+* @param mixed $online_users result of obtain_users_online - array with user_id lists for total, hidden and visible users, and statistics
+* @param int $item_id Indicate that the data is limited to one item and not global
+* @param string $item The name of the item which is stored in the session table as session_{$item}_id
+* @return array An array containing the string for output to the template
+*/
+function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum')
+{
+ global $config, $db, $user, $auth;
+
+ $user_online_link = $online_userlist = '';
+ // Need caps version of $item for language-strings
+ $item_caps = strtoupper($item);
+
+ if (sizeof($online_users['online_users']))
+ {
+ $sql = 'SELECT username, username_clean, user_id, user_type, user_allow_viewonline, user_colour
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $online_users['online_users']) . '
+ ORDER BY username_clean ASC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // User is logged in and therefore not a guest
+ if ($row['user_id'] != ANONYMOUS)
+ {
+ if (isset($online_users['hidden_users'][$row['user_id']]))
+ {
+ $row['username'] = '<em>' . $row['username'] . '</em>';
+ }
+
+ if (!isset($online_users['hidden_users'][$row['user_id']]) || $auth->acl_get('u_viewonline'))
+ {
+ $user_online_link = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
+ $online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (!$online_userlist)
+ {
+ $online_userlist = $user->lang['NO_ONLINE_USERS'];
+ }
+
+ if ($item_id === 0)
+ {
+ $online_userlist = $user->lang['REGISTERED_USERS'] . ' ' . $online_userlist;
+ }
+ else if ($config['load_online_guests'])
+ {
+ $l_online = ($online_users['guests_online'] === 1) ? $user->lang['BROWSING_' . $item_caps . '_GUEST'] : $user->lang['BROWSING_' . $item_caps . '_GUESTS'];
+ $online_userlist = sprintf($l_online, $online_userlist, $online_users['guests_online']);
+ }
+ else
+ {
+ $online_userlist = sprintf($user->lang['BROWSING_' . $item_caps], $online_userlist);
+ }
+ // Build online listing
+ $vars_online = array(
+ 'ONLINE' => array('total_online', 'l_t_user_s', 0),
+ 'REG' => array('visible_online', 'l_r_user_s', !$config['load_online_guests']),
+ 'HIDDEN' => array('hidden_online', 'l_h_user_s', $config['load_online_guests']),
+ 'GUEST' => array('guests_online', 'l_g_user_s', 0)
+ );
+
+ foreach ($vars_online as $l_prefix => $var_ary)
+ {
+ if ($var_ary[2])
+ {
+ $l_suffix = '_AND';
+ }
+ else
+ {
+ $l_suffix = '';
+ }
+ switch ($online_users[$var_ary[0]])
+ {
+ case 0:
+ ${$var_ary[1]} = $user->lang[$l_prefix . '_USERS_ZERO_TOTAL' . $l_suffix];
+ break;
+
+ case 1:
+ ${$var_ary[1]} = $user->lang[$l_prefix . '_USER_TOTAL' . $l_suffix];
+ break;
+
+ default:
+ ${$var_ary[1]} = $user->lang[$l_prefix . '_USERS_TOTAL' . $l_suffix];
+ break;
+ }
+ }
+ unset($vars_online);
+
+ $l_online_users = sprintf($l_t_user_s, $online_users['total_online']);
+ $l_online_users .= sprintf($l_r_user_s, $online_users['visible_online']);
+ $l_online_users .= sprintf($l_h_user_s, $online_users['hidden_online']);
+
+ if ($config['load_online_guests'])
+ {
+ $l_online_users .= sprintf($l_g_user_s, $online_users['guests_online']);
+ }
+
+
+
+ return array(
+ 'online_userlist' => $online_userlist,
+ 'l_online_users' => $l_online_users,
+ );
+}
+
+/**
+* Get option bitfield from custom data
+*
+* @param int $bit The bit/value to get
+* @param int $data Current bitfield to check
+* @return bool Returns true if value of constant is set in bitfield, else false
+*/
+function phpbb_optionget($bit, $data)
+{
+ return ($data & 1 << (int) $bit) ? true : false;
+}
+
+/**
+* Set option bitfield
+*
+* @param int $bit The bit/value to set/unset
+* @param bool $set True if option should be set, false if option should be unset.
+* @param int $data Current bitfield to change
+*
+* @return int The new bitfield
+*/
+function phpbb_optionset($bit, $set, $data)
+{
+ if ($set && !($data & 1 << $bit))
+ {
+ $data += 1 << $bit;
+ }
+ else if (!$set && ($data & 1 << $bit))
+ {
+ $data -= 1 << $bit;
+ }
+
+ return $data;
+}
+
+/**
+* Generate page header
+*/
+function page_header($page_title = '', $display_online_list = true, $item_id = 0, $item = 'forum')
+{
+ global $db, $config, $template, $SID, $_SID, $user, $auth, $phpEx, $phpbb_root_path;
+
+ if (defined('HEADER_INC'))
+ {
+ return;
+ }
+
+ define('HEADER_INC', true);
+
+ // gzip_compression
+ if ($config['gzip_compress'])
+ {
+ if (@extension_loaded('zlib') && !headers_sent())
+ {
+ ob_start('ob_gzhandler');
+ }
+ }
+
+ // Generate logged in/logged out status
+ if ($user->data['user_id'] != ANONYMOUS)
+ {
+ $u_login_logout = append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout', true, $user->session_id);
+ $l_login_logout = sprintf($user->lang['LOGOUT_USER'], $user->data['username']);
+ }
+ else
+ {
+ $u_login_logout = append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login');
+ $l_login_logout = $user->lang['LOGIN'];
+ }
+
+ // Last visit date/time
+ $s_last_visit = ($user->data['user_id'] != ANONYMOUS) ? $user->format_date($user->data['session_last_visit']) : '';
+
+ // Get users online list ... if required
+ $l_online_users = $online_userlist = $l_online_record = '';
+
+ if ($config['load_online'] && $config['load_online_time'] && $display_online_list)
+ {
+ /**
+ * Load online data:
+ * For obtaining another session column use $item and $item_id in the function-parameter, whereby the column is session_{$item}_id.
+ */
+ $item_id = max($item_id, 0);
+
+ $online_users = obtain_users_online($item_id, $item);
+ $user_online_strings = obtain_users_online_string($online_users, $item_id, $item);
+
+ $l_online_users = $user_online_strings['l_online_users'];
+ $online_userlist = $user_online_strings['online_userlist'];
+ $total_online_users = $online_users['total_online'];
+
+ if ($total_online_users > $config['record_online_users'])
+ {
+ set_config('record_online_users', $total_online_users, true);
+ set_config('record_online_date', time(), true);
+ }
+
+ $l_online_record = sprintf($user->lang['RECORD_ONLINE_USERS'], $config['record_online_users'], $user->format_date($config['record_online_date']));
+
+ $l_online_time = ($config['load_online_time'] == 1) ? 'VIEW_ONLINE_TIME' : 'VIEW_ONLINE_TIMES';
+ $l_online_time = sprintf($user->lang[$l_online_time], $config['load_online_time']);
+ }
+ else
+ {
+ $l_online_time = '';
+ }
+
+ $l_privmsgs_text = $l_privmsgs_text_unread = '';
+ $s_privmsg_new = false;
+
+ // Obtain number of new private messages if user is logged in
+ if (!empty($user->data['is_registered']))
+ {
+ if ($user->data['user_new_privmsg'])
+ {
+ $l_message_new = ($user->data['user_new_privmsg'] == 1) ? $user->lang['NEW_PM'] : $user->lang['NEW_PMS'];
+ $l_privmsgs_text = sprintf($l_message_new, $user->data['user_new_privmsg']);
+
+ if (!$user->data['user_last_privmsg'] || $user->data['user_last_privmsg'] > $user->data['session_last_visit'])
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_last_privmsg = ' . $user->data['session_last_visit'] . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+
+ $s_privmsg_new = true;
+ }
+ else
+ {
+ $s_privmsg_new = false;
+ }
+ }
+ else
+ {
+ $l_privmsgs_text = $user->lang['NO_NEW_PM'];
+ $s_privmsg_new = false;
+ }
+
+ $l_privmsgs_text_unread = '';
+
+ if ($user->data['user_unread_privmsg'] && $user->data['user_unread_privmsg'] != $user->data['user_new_privmsg'])
+ {
+ $l_message_unread = ($user->data['user_unread_privmsg'] == 1) ? $user->lang['UNREAD_PM'] : $user->lang['UNREAD_PMS'];
+ $l_privmsgs_text_unread = sprintf($l_message_unread, $user->data['user_unread_privmsg']);
+ }
+ }
+
+ $forum_id = request_var('f', 0);
+ $topic_id = request_var('t', 0);
+
+ $s_feed_news = false;
+
+ // Get option for news
+ if ($config['feed_enable'])
+ {
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db->sql_bit_and('forum_options', FORUM_OPTION_FEED_NEWS, '<> 0');
+ $result = $db->sql_query_limit($sql, 1, 0, 600);
+ $s_feed_news = (int) $db->sql_fetchfield('forum_id');
+ $db->sql_freeresult($result);
+ }
+
+ // Determine board url - we may need it later
+ $board_url = generate_board_url() . '/';
+ $web_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? $board_url : $phpbb_root_path;
+
+ // Which timezone?
+ $tz = ($user->data['user_id'] != ANONYMOUS) ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone']));
+
+ // Send a proper content-language to the output
+ $user_lang = $user->lang['USER_LANG'];
+ if (strpos($user_lang, '-x-') !== false)
+ {
+ $user_lang = substr($user_lang, 0, strpos($user_lang, '-x-'));
+ }
+
+ // The following assigns all _common_ variables that may be used at any point in a template.
+ $template->assign_vars(array(
+ 'SITENAME' => $config['sitename'],
+ 'SITE_DESCRIPTION' => $config['site_desc'],
+ 'PAGE_TITLE' => $page_title,
+ 'SCRIPT_NAME' => str_replace('.' . $phpEx, '', $user->page['page_name']),
+ 'LAST_VISIT_DATE' => sprintf($user->lang['YOU_LAST_VISIT'], $s_last_visit),
+ 'LAST_VISIT_YOU' => $s_last_visit,
+ 'CURRENT_TIME' => sprintf($user->lang['CURRENT_TIME'], $user->format_date(time(), false, true)),
+ 'TOTAL_USERS_ONLINE' => $l_online_users,
+ 'LOGGED_IN_USER_LIST' => $online_userlist,
+ 'RECORD_USERS' => $l_online_record,
+ 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text,
+ 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread,
+
+ 'S_USER_NEW_PRIVMSG' => $user->data['user_new_privmsg'],
+ 'S_USER_UNREAD_PRIVMSG' => $user->data['user_unread_privmsg'],
+ 'S_USER_NEW' => $user->data['user_new'],
+
+ 'SID' => $SID,
+ '_SID' => $_SID,
+ 'SESSION_ID' => $user->session_id,
+ 'ROOT_PATH' => $phpbb_root_path,
+ 'BOARD_URL' => $board_url,
+
+ 'L_LOGIN_LOGOUT' => $l_login_logout,
+ 'L_INDEX' => $user->lang['FORUM_INDEX'],
+ 'L_ONLINE_EXPLAIN' => $l_online_time,
+
+ 'U_PRIVATEMSGS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=inbox'),
+ 'U_RETURN_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=inbox'),
+ 'U_POPUP_PM' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=popup'),
+ 'UA_POPUP_PM' => addslashes(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=popup')),
+ 'U_MEMBERLIST' => append_sid("{$phpbb_root_path}memberlist.$phpEx"),
+ 'U_VIEWONLINE' => ($auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) ? append_sid("{$phpbb_root_path}viewonline.$phpEx") : '',
+ 'U_LOGIN_LOGOUT' => $u_login_logout,
+ 'U_INDEX' => append_sid("{$phpbb_root_path}index.$phpEx"),
+ 'U_SEARCH' => append_sid("{$phpbb_root_path}search.$phpEx"),
+ 'U_REGISTER' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'),
+ 'U_PROFILE' => append_sid("{$phpbb_root_path}ucp.$phpEx"),
+ 'U_MODCP' => append_sid("{$phpbb_root_path}mcp.$phpEx", false, true, $user->session_id),
+ 'U_FAQ' => append_sid("{$phpbb_root_path}faq.$phpEx"),
+ 'U_SEARCH_SELF' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=egosearch'),
+ 'U_SEARCH_NEW' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=newposts'),
+ 'U_SEARCH_UNANSWERED' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=unanswered'),
+ 'U_SEARCH_UNREAD' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=unreadposts'),
+ 'U_SEARCH_ACTIVE_TOPICS'=> append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=active_topics'),
+ 'U_DELETE_COOKIES' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=delete_cookies'),
+ 'U_TEAM' => ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=leaders'),
+ 'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'),
+ 'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'),
+ 'U_RESTORE_PERMISSIONS' => ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '',
+ 'U_FEED' => generate_board_url() . "/feed.$phpEx",
+
+ 'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS) ? true : false,
+ 'S_AUTOLOGIN_ENABLED' => ($config['allow_autologin']) ? true : false,
+ 'S_BOARD_DISABLED' => ($config['board_disable']) ? true : false,
+ 'S_REGISTERED_USER' => (!empty($user->data['is_registered'])) ? true : false,
+ 'S_IS_BOT' => (!empty($user->data['is_bot'])) ? true : false,
+ 'S_USER_PM_POPUP' => $user->optionget('popuppm'),
+ 'S_USER_LANG' => $user_lang,
+ 'S_USER_BROWSER' => (isset($user->data['session_browser'])) ? $user->data['session_browser'] : $user->lang['UNKNOWN_BROWSER'],
+ 'S_USERNAME' => $user->data['username'],
+ 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
+ 'S_CONTENT_FLOW_BEGIN' => ($user->lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
+ 'S_CONTENT_FLOW_END' => ($user->lang['DIRECTION'] == 'ltr') ? 'right' : 'left',
+ 'S_CONTENT_ENCODING' => 'UTF-8',
+ 'S_TIMEZONE' => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $config['board_dst'])) ? sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], ''),
+ 'S_DISPLAY_ONLINE_LIST' => ($l_online_time) ? 1 : 0,
+ 'S_DISPLAY_SEARCH' => (!$config['load_search']) ? 0 : (isset($auth) ? ($auth->acl_get('u_search') && $auth->acl_getf_global('f_search')) : 1),
+ 'S_DISPLAY_PM' => ($config['allow_privmsg'] && !empty($user->data['is_registered']) && ($auth->acl_get('u_readpm') || $auth->acl_get('u_sendpm'))) ? true : false,
+ 'S_DISPLAY_MEMBERLIST' => (isset($auth)) ? $auth->acl_get('u_viewprofile') : 0,
+ 'S_NEW_PM' => ($s_privmsg_new) ? 1 : 0,
+ 'S_REGISTER_ENABLED' => ($config['require_activation'] != USER_ACTIVATION_DISABLE) ? true : false,
+ 'S_FORUM_ID' => $forum_id,
+ 'S_TOPIC_ID' => $topic_id,
+
+ 'S_LOGIN_ACTION' => (!defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') . '&amp;redirect=' . urlencode(str_replace('&amp;', '&', build_url())) : append_sid("index.$phpEx", false, true, $user->session_id) . '&amp;redirect=' . urlencode(str_replace('&amp;', '&', build_url())),
+
+ 'S_ENABLE_FEEDS' => ($config['feed_enable']) ? true : false,
+ 'S_ENABLE_FEEDS_FORUMS' => ($config['feed_overall_forums']) ? true : false,
+ 'S_ENABLE_FEEDS_TOPICS' => ($config['feed_overall_topics']) ? true : false,
+ 'S_ENABLE_FEEDS_NEWS' => ($s_feed_news) ? true : false,
+
+ 'T_THEME_PATH' => "{$web_path}styles/" . $user->theme['theme_path'] . '/theme',
+ 'T_TEMPLATE_PATH' => "{$web_path}styles/" . $user->theme['template_path'] . '/template',
+ 'T_SUPER_TEMPLATE_PATH' => (isset($user->theme['template_inherit_path']) && $user->theme['template_inherit_path']) ? "{$web_path}styles/" . $user->theme['template_inherit_path'] . '/template' : "{$web_path}styles/" . $user->theme['template_path'] . '/template',
+ 'T_IMAGESET_PATH' => "{$web_path}styles/" . $user->theme['imageset_path'] . '/imageset',
+ 'T_IMAGESET_LANG_PATH' => "{$web_path}styles/" . $user->theme['imageset_path'] . '/imageset/' . $user->data['user_lang'],
+ 'T_IMAGES_PATH' => "{$web_path}images/",
+ 'T_SMILIES_PATH' => "{$web_path}{$config['smilies_path']}/",
+ 'T_AVATAR_PATH' => "{$web_path}{$config['avatar_path']}/",
+ 'T_AVATAR_GALLERY_PATH' => "{$web_path}{$config['avatar_gallery_path']}/",
+ 'T_ICONS_PATH' => "{$web_path}{$config['icons_path']}/",
+ 'T_RANKS_PATH' => "{$web_path}{$config['ranks_path']}/",
+ 'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/",
+ 'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.$phpEx", 'id=' . $user->theme['style_id'] . '&amp;lang=' . $user->data['user_lang']),
+ 'T_STYLESHEET_NAME' => $user->theme['theme_name'],
+
+ 'T_THEME_NAME' => $user->theme['theme_path'],
+ 'T_TEMPLATE_NAME' => $user->theme['template_path'],
+ 'T_SUPER_TEMPLATE_NAME' => (isset($user->theme['template_inherit_path']) && $user->theme['template_inherit_path']) ? $user->theme['template_inherit_path'] : $user->theme['template_path'],
+ 'T_IMAGESET_NAME' => $user->theme['imageset_path'],
+ 'T_IMAGESET_LANG_NAME' => $user->data['user_lang'],
+ 'T_IMAGES' => 'images',
+ 'T_SMILIES' => $config['smilies_path'],
+ 'T_AVATAR' => $config['avatar_path'],
+ 'T_AVATAR_GALLERY' => $config['avatar_gallery_path'],
+ 'T_ICONS' => $config['icons_path'],
+ 'T_RANKS' => $config['ranks_path'],
+ 'T_UPLOAD' => $config['upload_path'],
+
+ 'SITE_LOGO_IMG' => $user->img('site_logo'),
+
+ 'A_COOKIE_SETTINGS' => addslashes('; path=' . $config['cookie_path'] . ((!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain']) . ((!$config['cookie_secure']) ? '' : '; secure')),
+ ));
+
+ // application/xhtml+xml not used because of IE
+ header('Content-type: text/html; charset=UTF-8');
+
+ header('Cache-Control: private, no-cache="set-cookie"');
+ header('Expires: 0');
+ header('Pragma: no-cache');
+
+ return;
+}
+
+/**
+* Generate page footer
+*/
+function page_footer($run_cron = true)
+{
+ global $db, $config, $template, $user, $auth, $cache, $starttime, $phpbb_root_path, $phpEx;
+
+ // Output page creation time
+ if (defined('DEBUG'))
+ {
+ $mtime = explode(' ', microtime());
+ $totaltime = $mtime[0] + $mtime[1] - $starttime;
+
+ if (!empty($_REQUEST['explain']) && $auth->acl_get('a_') && defined('DEBUG_EXTRA') && method_exists($db, 'sql_report'))
+ {
+ $db->sql_report('display');
+ }
+
+ $debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress'] && @extension_loaded('zlib')) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime);
+
+ if ($auth->acl_get('a_') && defined('DEBUG_EXTRA'))
+ {
+ if (function_exists('memory_get_usage'))
+ {
+ if ($memory_usage = memory_get_usage())
+ {
+ global $base_memory_usage;
+ $memory_usage -= $base_memory_usage;
+ $memory_usage = get_formatted_filesize($memory_usage);
+
+ $debug_output .= ' | Memory Usage: ' . $memory_usage;
+ }
+ }
+
+ $debug_output .= ' | <a href="' . build_url() . '&amp;explain=1">Explain</a>';
+ }
+ }
+
+ $template->assign_vars(array(
+ 'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '',
+ 'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
+
+ 'U_ACP' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", false, true, $user->session_id) : '')
+ );
+
+ // Call cron-type script
+ $call_cron = false;
+ if (!defined('IN_CRON') && $run_cron && !$config['board_disable'])
+ {
+ $call_cron = true;
+ $time_now = (!empty($user->time_now) && is_int($user->time_now)) ? $user->time_now : time();
+
+ // Any old lock present?
+ if (!empty($config['cron_lock']))
+ {
+ $cron_time = explode(' ', $config['cron_lock']);
+
+ // If 1 hour lock is present we do not call cron.php
+ if ($cron_time[0] + 3600 >= $time_now)
+ {
+ $call_cron = false;
+ }
+ }
+ }
+
+ // Call cron job?
+ if ($call_cron)
+ {
+ $cron_type = '';
+
+ if ($time_now - $config['queue_interval'] > $config['last_queue_run'] && !defined('IN_ADMIN') && file_exists($phpbb_root_path . 'cache/queue.' . $phpEx))
+ {
+ // Process email queue
+ $cron_type = 'queue';
+ }
+ else if (method_exists($cache, 'tidy') && $time_now - $config['cache_gc'] > $config['cache_last_gc'])
+ {
+ // Tidy the cache
+ $cron_type = 'tidy_cache';
+ }
+ else if ($config['warnings_expire_days'] && ($time_now - $config['warnings_gc'] > $config['warnings_last_gc']))
+ {
+ $cron_type = 'tidy_warnings';
+ }
+ else if ($time_now - $config['database_gc'] > $config['database_last_gc'])
+ {
+ // Tidy the database
+ $cron_type = 'tidy_database';
+ }
+ else if ($time_now - $config['search_gc'] > $config['search_last_gc'])
+ {
+ // Tidy the search
+ $cron_type = 'tidy_search';
+ }
+ else if ($time_now - $config['session_gc'] > $config['session_last_gc'])
+ {
+ $cron_type = 'tidy_sessions';
+ }
+
+ if ($cron_type)
+ {
+ $template->assign_var('RUN_CRON_TASK', '<img src="' . append_sid($phpbb_root_path . 'cron.' . $phpEx, 'cron_type=' . $cron_type) . '" width="1" height="1" alt="cron" />');
+ }
+ }
+
+ $template->display('body');
+
+ garbage_collection();
+ exit_handler();
+}
+
+/**
+* Closing the cache object and the database
+* Cool function name, eh? We might want to add operations to it later
+*/
+function garbage_collection()
+{
+ global $cache, $db;
+
+ // Unload cache, must be done before the DB connection if closed
+ if (!empty($cache))
+ {
+ $cache->unload();
+ }
+
+ // Close our DB connection.
+ if (!empty($db))
+ {
+ $db->sql_close();
+ }
+}
+
+/**
+* Handler for exit calls in phpBB.
+* This function supports hooks.
+*
+* Note: This function is called after the template has been outputted.
+*/
+function exit_handler()
+{
+ global $phpbb_hook, $config;
+
+ if (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__))
+ {
+ if ($phpbb_hook->hook_return(__FUNCTION__))
+ {
+ return $phpbb_hook->hook_return_result(__FUNCTION__);
+ }
+ }
+
+ // As a pre-caution... some setups display a blank page if the flush() is not there.
+ (empty($config['gzip_compress'])) ? @flush() : @ob_flush();
+
+ exit;
+}
+
+/**
+* Handler for init calls in phpBB. This function is called in user::setup();
+* This function supports hooks.
+*/
+function phpbb_user_session_handler()
+{
+ global $phpbb_hook;
+
+ if (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__))
+ {
+ if ($phpbb_hook->hook_return(__FUNCTION__))
+ {
+ return $phpbb_hook->hook_return_result(__FUNCTION__);
+ }
+ }
+
+ return;
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
new file mode 100644
index 0000000000..c0db64dbfb
--- /dev/null
+++ b/phpBB/includes/functions_admin.php
@@ -0,0 +1,3303 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Recalculate Nested Sets
+*
+* @param int $new_id first left_id (should start with 1)
+* @param string $pkey primary key-column (containing the id for the parent_id of the children)
+* @param string $table constant or fullname of the table
+* @param int $parent_id parent_id of the current set (default = 0)
+* @param array $where contains strings to compare closer on the where statement (additional)
+*
+* @author EXreaction
+*/
+function recalc_nested_sets(&$new_id, $pkey, $table, $parent_id = 0, $where = array())
+{
+ global $db;
+
+ $sql = 'SELECT *
+ FROM ' . $table . '
+ WHERE parent_id = ' . (int) $parent_id .
+ ((!empty($where)) ? ' AND ' . implode(' AND ', $where) : '') . '
+ ORDER BY left_id ASC';
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // First we update the left_id for this module
+ if ($row['left_id'] != $new_id)
+ {
+ $db->sql_query('UPDATE ' . $table . ' SET ' . $db->sql_build_array('UPDATE', array('left_id' => $new_id)) . " WHERE $pkey = {$row[$pkey]}");
+ }
+ $new_id++;
+
+ // Then we go through any children and update their left/right id's
+ recalc_nested_sets($new_id, $pkey, $table, $row[$pkey], $where);
+
+ // Then we come back and update the right_id for this module
+ if ($row['right_id'] != $new_id)
+ {
+ $db->sql_query('UPDATE ' . $table . ' SET ' . $db->sql_build_array('UPDATE', array('right_id' => $new_id)) . " WHERE $pkey = {$row[$pkey]}");
+ }
+ $new_id++;
+ }
+ $db->sql_freeresult($result);
+}
+
+/**
+* Simple version of jumpbox, just lists authed forums
+*/
+function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = false, $ignore_nonpost = false, $ignore_emptycat = true, $only_acl_post = false, $return_array = false)
+{
+ global $db, $user, $auth;
+
+ $acl = ($ignore_acl) ? '' : (($only_acl_post) ? 'f_post' : array('f_list', 'a_forum', 'a_forumadd', 'a_forumdel'));
+
+ // This query is identical to the jumpbox one
+ $sql = 'SELECT forum_id, forum_name, parent_id, forum_type, forum_flags, forum_options, left_id, right_id
+ FROM ' . FORUMS_TABLE . '
+ ORDER BY left_id ASC';
+ $result = $db->sql_query($sql, 600);
+
+ $right = 0;
+ $padding_store = array('0' => '');
+ $padding = '';
+ $forum_list = ($return_array) ? array() : '';
+
+ // Sometimes it could happen that forums will be displayed here not be displayed within the index page
+ // This is the result of forums not displayed at index, having list permissions and a parent of a forum with no permissions.
+ // If this happens, the padding could be "broken"
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['left_id'] < $right)
+ {
+ $padding .= '&nbsp; &nbsp;';
+ $padding_store[$row['parent_id']] = $padding;
+ }
+ else if ($row['left_id'] > $right + 1)
+ {
+ $padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : '';
+ }
+
+ $right = $row['right_id'];
+ $disabled = false;
+
+ if ($acl && !$auth->acl_gets($acl, $row['forum_id']))
+ {
+ // List permission?
+ if ($auth->acl_get('f_list', $row['forum_id']))
+ {
+ $disabled = true;
+ }
+ else
+ {
+ continue;
+ }
+ }
+
+ if (
+ ((is_array($ignore_id) && in_array($row['forum_id'], $ignore_id)) || $row['forum_id'] == $ignore_id)
+ ||
+ // Non-postable forum with no subforums, don't display
+ ($row['forum_type'] == FORUM_CAT && ($row['left_id'] + 1 == $row['right_id']) && $ignore_emptycat)
+ ||
+ ($row['forum_type'] != FORUM_POST && $ignore_nonpost)
+ )
+ {
+ $disabled = true;
+ }
+
+ if ($return_array)
+ {
+ // Include some more information...
+ $selected = (is_array($select_id)) ? ((in_array($row['forum_id'], $select_id)) ? true : false) : (($row['forum_id'] == $select_id) ? true : false);
+ $forum_list[$row['forum_id']] = array_merge(array('padding' => $padding, 'selected' => ($selected && !$disabled), 'disabled' => $disabled), $row);
+ }
+ else
+ {
+ $selected = (is_array($select_id)) ? ((in_array($row['forum_id'], $select_id)) ? ' selected="selected"' : '') : (($row['forum_id'] == $select_id) ? ' selected="selected"' : '');
+ $forum_list .= '<option value="' . $row['forum_id'] . '"' . (($disabled) ? ' disabled="disabled" class="disabled-option"' : $selected) . '>' . $padding . $row['forum_name'] . '</option>';
+ }
+ }
+ $db->sql_freeresult($result);
+ unset($padding_store);
+
+ return $forum_list;
+}
+
+/**
+* Generate size select options
+*/
+function size_select_options($size_compare)
+{
+ global $user;
+
+ $size_types_text = array($user->lang['BYTES'], $user->lang['KIB'], $user->lang['MIB']);
+ $size_types = array('b', 'kb', 'mb');
+
+ $s_size_options = '';
+
+ for ($i = 0, $size = sizeof($size_types_text); $i < $size; $i++)
+ {
+ $selected = ($size_compare == $size_types[$i]) ? ' selected="selected"' : '';
+ $s_size_options .= '<option value="' . $size_types[$i] . '"' . $selected . '>' . $size_types_text[$i] . '</option>';
+ }
+
+ return $s_size_options;
+}
+
+/**
+* Generate list of groups (option fields without select)
+*
+* @param int $group_id The default group id to mark as selected
+* @param array $exclude_ids The group ids to exclude from the list, false (default) if you whish to exclude no id
+* @param int $manage_founder If set to false (default) all groups are returned, if 0 only those groups returned not being managed by founders only, if 1 only those groups returned managed by founders only.
+*
+* @return string The list of options.
+*/
+function group_select_options($group_id, $exclude_ids = false, $manage_founder = false)
+{
+ global $db, $user, $config;
+
+ $exclude_sql = ($exclude_ids !== false && sizeof($exclude_ids)) ? 'WHERE ' . $db->sql_in_set('group_id', array_map('intval', $exclude_ids), true) : '';
+ $sql_and = (!$config['coppa_enable']) ? (($exclude_sql) ? ' AND ' : ' WHERE ') . "group_name <> 'REGISTERED_COPPA'" : '';
+ $sql_founder = ($manage_founder !== false) ? (($exclude_sql || $sql_and) ? ' AND ' : ' WHERE ') . 'group_founder_manage = ' . (int) $manage_founder : '';
+
+ $sql = 'SELECT group_id, group_name, group_type
+ FROM ' . GROUPS_TABLE . "
+ $exclude_sql
+ $sql_and
+ $sql_founder
+ ORDER BY group_type DESC, group_name ASC";
+ $result = $db->sql_query($sql);
+
+ $s_group_options = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $selected = ($row['group_id'] == $group_id) ? ' selected="selected"' : '';
+ $s_group_options .= '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '') . ' value="' . $row['group_id'] . '"' . $selected . '>' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
+ }
+ $db->sql_freeresult($result);
+
+ return $s_group_options;
+}
+
+/**
+* Obtain authed forums list
+*/
+function get_forum_list($acl_list = 'f_list', $id_only = true, $postable_only = false, $no_cache = false)
+{
+ global $db, $auth;
+ static $forum_rows;
+
+ if (!isset($forum_rows))
+ {
+ // This query is identical to the jumpbox one
+ $expire_time = ($no_cache) ? 0 : 600;
+
+ $sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id
+ FROM ' . FORUMS_TABLE . '
+ ORDER BY left_id ASC';
+ $result = $db->sql_query($sql, $expire_time);
+
+ $forum_rows = array();
+
+ $right = $padding = 0;
+ $padding_store = array('0' => 0);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['left_id'] < $right)
+ {
+ $padding++;
+ $padding_store[$row['parent_id']] = $padding;
+ }
+ else if ($row['left_id'] > $right + 1)
+ {
+ // Ok, if the $padding_store for this parent is empty there is something wrong. For now we will skip over it.
+ // @todo digging deep to find out "how" this can happen.
+ $padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : $padding;
+ }
+
+ $right = $row['right_id'];
+ $row['padding'] = $padding;
+
+ $forum_rows[] = $row;
+ }
+ $db->sql_freeresult($result);
+ unset($padding_store);
+ }
+
+ $rowset = array();
+ foreach ($forum_rows as $row)
+ {
+ if ($postable_only && $row['forum_type'] != FORUM_POST)
+ {
+ continue;
+ }
+
+ if ($acl_list == '' || ($acl_list != '' && $auth->acl_gets($acl_list, $row['forum_id'])))
+ {
+ $rowset[] = ($id_only) ? (int) $row['forum_id'] : $row;
+ }
+ }
+
+ return $rowset;
+}
+
+/**
+* Get forum branch
+*/
+function get_forum_branch($forum_id, $type = 'all', $order = 'descending', $include_forum = true)
+{
+ global $db;
+
+ switch ($type)
+ {
+ case 'parents':
+ $condition = 'f1.left_id BETWEEN f2.left_id AND f2.right_id';
+ break;
+
+ case 'children':
+ $condition = 'f2.left_id BETWEEN f1.left_id AND f1.right_id';
+ break;
+
+ default:
+ $condition = 'f2.left_id BETWEEN f1.left_id AND f1.right_id OR f1.left_id BETWEEN f2.left_id AND f2.right_id';
+ break;
+ }
+
+ $rows = array();
+
+ $sql = 'SELECT f2.*
+ FROM ' . FORUMS_TABLE . ' f1
+ LEFT JOIN ' . FORUMS_TABLE . " f2 ON ($condition)
+ WHERE f1.forum_id = $forum_id
+ ORDER BY f2.left_id " . (($order == 'descending') ? 'ASC' : 'DESC');
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!$include_forum && $row['forum_id'] == $forum_id)
+ {
+ continue;
+ }
+
+ $rows[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ return $rows;
+}
+
+/**
+* Copies permissions from one forum to others
+*
+* @param int $src_forum_id The source forum we want to copy permissions from
+* @param array $dest_forum_ids The destination forum(s) we want to copy to
+* @param bool $clear_dest_perms True if destination permissions should be deleted
+* @param bool $add_log True if log entry should be added
+*
+* @return bool False on error
+*
+* @author bantu
+*/
+function copy_forum_permissions($src_forum_id, $dest_forum_ids, $clear_dest_perms = true, $add_log = true)
+{
+ global $db;
+
+ // Only one forum id specified
+ if (!is_array($dest_forum_ids))
+ {
+ $dest_forum_ids = array($dest_forum_ids);
+ }
+
+ // Make sure forum ids are integers
+ $src_forum_id = (int) $src_forum_id;
+ $dest_forum_ids = array_map('intval', $dest_forum_ids);
+
+ // No source forum or no destination forums specified
+ if (empty($src_forum_id) || empty($dest_forum_ids))
+ {
+ return false;
+ }
+
+ // Check if source forum exists
+ $sql = 'SELECT forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $src_forum_id;
+ $result = $db->sql_query($sql);
+ $src_forum_name = $db->sql_fetchfield('forum_name');
+ $db->sql_freeresult($result);
+
+ // Source forum doesn't exist
+ if (empty($src_forum_name))
+ {
+ return false;
+ }
+
+ // Check if destination forums exists
+ $sql = 'SELECT forum_id, forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $dest_forum_ids);
+ $result = $db->sql_query($sql);
+
+ $dest_forum_ids = $dest_forum_names = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $dest_forum_ids[] = (int) $row['forum_id'];
+ $dest_forum_names[] = $row['forum_name'];
+ }
+ $db->sql_freeresult($result);
+
+ // No destination forum exists
+ if (empty($dest_forum_ids))
+ {
+ return false;
+ }
+
+ // From the mysql documentation:
+ // Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear
+ // in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14.
+ // Due to this we stay on the safe side if we do the insertion "the manual way"
+
+ // Rowsets we're going to insert
+ $users_sql_ary = $groups_sql_ary = array();
+
+ // Query acl users table for source forum data
+ $sql = 'SELECT user_id, auth_option_id, auth_role_id, auth_setting
+ FROM ' . ACL_USERS_TABLE . '
+ WHERE forum_id = ' . $src_forum_id;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $row = array(
+ 'user_id' => (int) $row['user_id'],
+ 'auth_option_id' => (int) $row['auth_option_id'],
+ 'auth_role_id' => (int) $row['auth_role_id'],
+ 'auth_setting' => (int) $row['auth_setting'],
+ );
+
+ foreach ($dest_forum_ids as $dest_forum_id)
+ {
+ $users_sql_ary[] = $row + array('forum_id' => $dest_forum_id);
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // Query acl groups table for source forum data
+ $sql = 'SELECT group_id, auth_option_id, auth_role_id, auth_setting
+ FROM ' . ACL_GROUPS_TABLE . '
+ WHERE forum_id = ' . $src_forum_id;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $row = array(
+ 'group_id' => (int) $row['group_id'],
+ 'auth_option_id' => (int) $row['auth_option_id'],
+ 'auth_role_id' => (int) $row['auth_role_id'],
+ 'auth_setting' => (int) $row['auth_setting'],
+ );
+
+ foreach ($dest_forum_ids as $dest_forum_id)
+ {
+ $groups_sql_ary[] = $row + array('forum_id' => $dest_forum_id);
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $db->sql_transaction('begin');
+
+ // Clear current permissions of destination forums
+ if ($clear_dest_perms)
+ {
+ $sql = 'DELETE FROM ' . ACL_USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $dest_forum_ids);
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $dest_forum_ids);
+ $db->sql_query($sql);
+ }
+
+ $db->sql_multi_insert(ACL_USERS_TABLE, $users_sql_ary);
+ $db->sql_multi_insert(ACL_GROUPS_TABLE, $groups_sql_ary);
+
+ if ($add_log)
+ {
+ add_log('admin', 'LOG_FORUM_COPIED_PERMISSIONS', $src_forum_name, implode(', ', $dest_forum_names));
+ }
+
+ $db->sql_transaction('commit');
+
+ return true;
+}
+
+/**
+* Get physical file listing
+*/
+function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png')
+{
+ $matches = array($dir => array());
+
+ // Remove initial / if present
+ $rootdir = (substr($rootdir, 0, 1) == '/') ? substr($rootdir, 1) : $rootdir;
+ // Add closing / if not present
+ $rootdir = ($rootdir && substr($rootdir, -1) != '/') ? $rootdir . '/' : $rootdir;
+
+ // Remove initial / if present
+ $dir = (substr($dir, 0, 1) == '/') ? substr($dir, 1) : $dir;
+ // Add closing / if not present
+ $dir = ($dir && substr($dir, -1) != '/') ? $dir . '/' : $dir;
+
+ if (!is_dir($rootdir . $dir))
+ {
+ return $matches;
+ }
+
+ $dh = @opendir($rootdir . $dir);
+
+ if (!$dh)
+ {
+ return $matches;
+ }
+
+ while (($fname = readdir($dh)) !== false)
+ {
+ if (is_file("$rootdir$dir$fname"))
+ {
+ if (filesize("$rootdir$dir$fname") && preg_match('#\.' . $type . '$#i', $fname))
+ {
+ $matches[$dir][] = $fname;
+ }
+ }
+ else if ($fname[0] != '.' && is_dir("$rootdir$dir$fname"))
+ {
+ $matches += filelist($rootdir, "$dir$fname", $type);
+ }
+ }
+ closedir($dh);
+
+ return $matches;
+}
+
+/**
+* Move topic(s)
+*/
+function move_topics($topic_ids, $forum_id, $auto_sync = true)
+{
+ global $db;
+
+ if (empty($topic_ids))
+ {
+ return;
+ }
+
+ $forum_ids = array($forum_id);
+
+ if (!is_array($topic_ids))
+ {
+ $topic_ids = array($topic_ids);
+ }
+
+ $sql = 'DELETE FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_moved_id', $topic_ids) . '
+ AND forum_id = ' . $forum_id;
+ $db->sql_query($sql);
+
+ if ($auto_sync)
+ {
+ $sql = 'SELECT DISTINCT forum_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_ids[] = $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ $table_ary = array(TOPICS_TABLE, POSTS_TABLE, LOG_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
+ foreach ($table_ary as $table)
+ {
+ $sql = "UPDATE $table
+ SET forum_id = $forum_id
+ WHERE " . $db->sql_in_set('topic_id', $topic_ids);
+ $db->sql_query($sql);
+ }
+ unset($table_ary);
+
+ if ($auto_sync)
+ {
+ sync('forum', 'forum_id', $forum_ids, true, true);
+ unset($forum_ids);
+ }
+}
+
+/**
+* Move post(s)
+*/
+function move_posts($post_ids, $topic_id, $auto_sync = true)
+{
+ global $db;
+
+ if (!is_array($post_ids))
+ {
+ $post_ids = array($post_ids);
+ }
+
+ $forum_ids = array();
+ $topic_ids = array($topic_id);
+
+ $sql = 'SELECT DISTINCT topic_id, forum_id
+ FROM ' . POSTS_TABLE . '
+ WHERE ' . $db->sql_in_set('post_id', $post_ids);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_ids[] = $row['forum_id'];
+ $topic_ids[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT forum_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_id = ' . $topic_id;
+ $result = $db->sql_query($sql);
+ $forum_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$forum_row)
+ {
+ trigger_error('NO_TOPIC');
+ }
+
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET forum_id = ' . $forum_row['forum_id'] . ", topic_id = $topic_id
+ WHERE " . $db->sql_in_set('post_id', $post_ids);
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . ATTACHMENTS_TABLE . "
+ SET topic_id = $topic_id, in_message = 0
+ WHERE " . $db->sql_in_set('post_msg_id', $post_ids);
+ $db->sql_query($sql);
+
+ if ($auto_sync)
+ {
+ $forum_ids[] = $forum_row['forum_id'];
+
+ sync('topic_reported', 'topic_id', $topic_ids);
+ sync('topic_attachment', 'topic_id', $topic_ids);
+ sync('topic', 'topic_id', $topic_ids, true);
+ sync('forum', 'forum_id', $forum_ids, true, true);
+ }
+
+ // Update posted information
+ update_posted_info($topic_ids);
+}
+
+/**
+* Remove topic(s)
+*/
+function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_sync = true, $call_delete_posts = true)
+{
+ global $db, $config;
+
+ $approved_topics = 0;
+ $forum_ids = $topic_ids = array();
+
+ if ($where_type === 'range')
+ {
+ $where_clause = $where_ids;
+ }
+ else
+ {
+ $where_ids = (is_array($where_ids)) ? array_unique($where_ids) : array($where_ids);
+
+ if (!sizeof($where_ids))
+ {
+ return array('topics' => 0, 'posts' => 0);
+ }
+
+ $where_clause = $db->sql_in_set($where_type, $where_ids);
+ }
+
+ // Making sure that delete_posts does not call delete_topics again...
+ $return = array(
+ 'posts' => ($call_delete_posts) ? delete_posts($where_type, $where_ids, false, true, $post_count_sync, false) : 0,
+ );
+
+ $sql = 'SELECT topic_id, forum_id, topic_approved, topic_moved_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $where_clause;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_ids[] = $row['forum_id'];
+ $topic_ids[] = $row['topic_id'];
+
+ if ($row['topic_approved'] && !$row['topic_moved_id'])
+ {
+ $approved_topics++;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $return['topics'] = sizeof($topic_ids);
+
+ if (!sizeof($topic_ids))
+ {
+ return $return;
+ }
+
+ $db->sql_transaction('begin');
+
+ $table_ary = array(TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, POLL_VOTES_TABLE, POLL_OPTIONS_TABLE, TOPICS_WATCH_TABLE, TOPICS_TABLE);
+
+ foreach ($table_ary as $table)
+ {
+ $sql = "DELETE FROM $table
+ WHERE " . $db->sql_in_set('topic_id', $topic_ids);
+ $db->sql_query($sql);
+ }
+ unset($table_ary);
+
+ $moved_topic_ids = array();
+
+ // update the other forums
+ $sql = 'SELECT topic_id, forum_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_moved_id', $topic_ids);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_ids[] = $row['forum_id'];
+ $moved_topic_ids[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($moved_topic_ids))
+ {
+ $sql = 'DELETE FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $moved_topic_ids);
+ $db->sql_query($sql);
+ }
+
+ $db->sql_transaction('commit');
+
+ if ($auto_sync)
+ {
+ sync('forum', 'forum_id', array_unique($forum_ids), true, true);
+ sync('topic_reported', $where_type, $where_ids);
+ }
+
+ if ($approved_topics)
+ {
+ set_config_count('num_topics', $approved_topics * (-1), true);
+ }
+
+ return $return;
+}
+
+/**
+* Remove post(s)
+*/
+function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = true, $post_count_sync = true, $call_delete_topics = true)
+{
+ global $db, $config, $phpbb_root_path, $phpEx;
+
+ if ($where_type === 'range')
+ {
+ $where_clause = $where_ids;
+ }
+ else
+ {
+ if (is_array($where_ids))
+ {
+ $where_ids = array_unique($where_ids);
+ }
+ else
+ {
+ $where_ids = array($where_ids);
+ }
+
+ if (!sizeof($where_ids))
+ {
+ return false;
+ }
+
+ $where_ids = array_map('intval', $where_ids);
+
+/* Possible code for splitting post deletion
+ if (sizeof($where_ids) >= 1001)
+ {
+ // Split into chunks of 1000
+ $chunks = array_chunk($where_ids, 1000);
+
+ foreach ($chunks as $_where_ids)
+ {
+ delete_posts($where_type, $_where_ids, $auto_sync, $posted_sync, $post_count_sync, $call_delete_topics);
+ }
+
+ return;
+ }*/
+
+ $where_clause = $db->sql_in_set($where_type, $where_ids);
+ }
+
+ $approved_posts = 0;
+ $post_ids = $topic_ids = $forum_ids = $post_counts = $remove_topics = array();
+
+ $sql = 'SELECT post_id, poster_id, post_approved, post_postcount, topic_id, forum_id
+ FROM ' . POSTS_TABLE . '
+ WHERE ' . $where_clause;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_ids[] = (int) $row['post_id'];
+ $poster_ids[] = (int) $row['poster_id'];
+ $topic_ids[] = (int) $row['topic_id'];
+ $forum_ids[] = (int) $row['forum_id'];
+
+ if ($row['post_postcount'] && $post_count_sync && $row['post_approved'])
+ {
+ $post_counts[$row['poster_id']] = (!empty($post_counts[$row['poster_id']])) ? $post_counts[$row['poster_id']] + 1 : 1;
+ }
+
+ if ($row['post_approved'])
+ {
+ $approved_posts++;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($post_ids))
+ {
+ return false;
+ }
+
+ $db->sql_transaction('begin');
+
+ $table_ary = array(POSTS_TABLE, REPORTS_TABLE);
+
+ foreach ($table_ary as $table)
+ {
+ $sql = "DELETE FROM $table
+ WHERE " . $db->sql_in_set('post_id', $post_ids);
+ $db->sql_query($sql);
+ }
+ unset($table_ary);
+
+ // Adjust users post counts
+ if (sizeof($post_counts) && $post_count_sync)
+ {
+ foreach ($post_counts as $poster_id => $substract)
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_posts = 0
+ WHERE user_id = ' . $poster_id . '
+ AND user_posts < ' . $substract;
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_posts = user_posts - ' . $substract . '
+ WHERE user_id = ' . $poster_id . '
+ AND user_posts >= ' . $substract;
+ $db->sql_query($sql);
+ }
+ }
+
+ // Remove topics now having no posts?
+ if (sizeof($topic_ids))
+ {
+ $sql = 'SELECT topic_id
+ FROM ' . POSTS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids) . '
+ GROUP BY topic_id';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $remove_topics[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // Actually, those not within remove_topics should be removed. ;)
+ $remove_topics = array_diff($topic_ids, $remove_topics);
+ }
+
+ // Remove the message from the search index
+ $search_type = basename($config['search_type']);
+
+ if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
+ {
+ trigger_error('NO_SUCH_SEARCH_MODULE');
+ }
+
+ include_once("{$phpbb_root_path}includes/search/$search_type.$phpEx");
+
+ $error = false;
+ $search = new $search_type($error);
+
+ if ($error)
+ {
+ trigger_error($error);
+ }
+
+ $search->index_remove($post_ids, $poster_ids, $forum_ids);
+
+ delete_attachments('post', $post_ids, false);
+
+ $db->sql_transaction('commit');
+
+ // Resync topics_posted table
+ if ($posted_sync)
+ {
+ update_posted_info($topic_ids);
+ }
+
+ if ($auto_sync)
+ {
+ sync('topic_reported', 'topic_id', $topic_ids);
+ sync('topic', 'topic_id', $topic_ids, true);
+ sync('forum', 'forum_id', $forum_ids, true, true);
+ }
+
+ if ($approved_posts)
+ {
+ set_config_count('num_posts', $approved_posts * (-1), true);
+ }
+
+ // We actually remove topics now to not be inconsistent (the delete_topics function calls this function too)
+ if (sizeof($remove_topics) && $call_delete_topics)
+ {
+ delete_topics('topic_id', $remove_topics, $auto_sync, $post_count_sync, false);
+ }
+
+ return sizeof($post_ids);
+}
+
+/**
+* Delete Attachments
+*
+* @param string $mode can be: post|message|topic|attach|user
+* @param mixed $ids can be: post_ids, message_ids, topic_ids, attach_ids, user_ids
+* @param bool $resync set this to false if you are deleting posts or topics
+*/
+function delete_attachments($mode, $ids, $resync = true)
+{
+ global $db, $config;
+
+ if (is_array($ids) && sizeof($ids))
+ {
+ $ids = array_unique($ids);
+ $ids = array_map('intval', $ids);
+ }
+ else
+ {
+ $ids = array((int) $ids);
+ }
+
+ if (!sizeof($ids))
+ {
+ return false;
+ }
+
+ $sql_where = '';
+
+ switch ($mode)
+ {
+ case 'post':
+ case 'message':
+ $sql_id = 'post_msg_id';
+ $sql_where = ' AND in_message = ' . ($mode == 'message' ? 1 : 0);
+ break;
+
+ case 'topic':
+ $sql_id = 'topic_id';
+ break;
+
+ case 'user':
+ $sql_id = 'poster_id';
+ break;
+
+ case 'attach':
+ default:
+ $sql_id = 'attach_id';
+ $mode = 'attach';
+ break;
+ }
+
+ $post_ids = $message_ids = $topic_ids = $physical = array();
+
+ // Collect post and topic ids for later use if we need to touch remaining entries (if resync is enabled)
+ $sql = 'SELECT post_msg_id, topic_id, in_message, physical_filename, thumbnail, filesize, is_orphan
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set($sql_id, $ids);
+
+ $sql .= $sql_where;
+
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // We only need to store post/message/topic ids if resync is enabled and the file is not orphaned
+ if ($resync && !$row['is_orphan'])
+ {
+ if (!$row['in_message'])
+ {
+ $post_ids[] = $row['post_msg_id'];
+ $topic_ids[] = $row['topic_id'];
+ }
+ else
+ {
+ $message_ids[] = $row['post_msg_id'];
+ }
+ }
+
+ $physical[] = array('filename' => $row['physical_filename'], 'thumbnail' => $row['thumbnail'], 'filesize' => $row['filesize'], 'is_orphan' => $row['is_orphan']);
+ }
+ $db->sql_freeresult($result);
+
+ // Delete attachments
+ $sql = 'DELETE FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set($sql_id, $ids);
+
+ $sql .= $sql_where;
+
+ $db->sql_query($sql);
+ $num_deleted = $db->sql_affectedrows();
+
+ if (!$num_deleted)
+ {
+ return 0;
+ }
+
+ // Delete attachments from filesystem
+ $space_removed = $files_removed = 0;
+ foreach ($physical as $file_ary)
+ {
+ if (phpbb_unlink($file_ary['filename'], 'file', true) && !$file_ary['is_orphan'])
+ {
+ // Only non-orphaned files count to the file size
+ $space_removed += $file_ary['filesize'];
+ $files_removed++;
+ }
+
+ if ($file_ary['thumbnail'])
+ {
+ phpbb_unlink($file_ary['filename'], 'thumbnail', true);
+ }
+ }
+
+ if ($space_removed || $files_removed)
+ {
+ set_config_count('upload_dir_size', $space_removed * (-1), true);
+ set_config_count('num_files', $files_removed * (-1), true);
+ }
+
+ // If we do not resync, we do not need to adjust any message, post, topic or user entries
+ if (!$resync)
+ {
+ return $num_deleted;
+ }
+
+ // No more use for the original ids
+ unset($ids);
+
+ // Now, we need to resync posts, messages, topics. We go through every one of them
+ $post_ids = array_unique($post_ids);
+ $message_ids = array_unique($message_ids);
+ $topic_ids = array_unique($topic_ids);
+
+ // Update post indicators for posts now no longer having attachments
+ if (sizeof($post_ids))
+ {
+ // Just check which posts are still having an assigned attachment not orphaned by querying the attachments table
+ $sql = 'SELECT post_msg_id
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('post_msg_id', $post_ids) . '
+ AND in_message = 0
+ AND is_orphan = 0';
+ $result = $db->sql_query($sql);
+
+ $remaining_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $remaining_ids[] = $row['post_msg_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // Now only unset those ids remaining
+ $post_ids = array_diff($post_ids, $remaining_ids);
+
+ if (sizeof($post_ids))
+ {
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET post_attachment = 0
+ WHERE ' . $db->sql_in_set('post_id', $post_ids);
+ $db->sql_query($sql);
+ }
+ }
+
+ // Update message table if messages are affected
+ if (sizeof($message_ids))
+ {
+ // Just check which messages are still having an assigned attachment not orphaned by querying the attachments table
+ $sql = 'SELECT post_msg_id
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('post_msg_id', $message_ids) . '
+ AND in_message = 1
+ AND is_orphan = 0';
+ $result = $db->sql_query($sql);
+
+ $remaining_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $remaining_ids[] = $row['post_msg_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // Now only unset those ids remaining
+ $message_ids = array_diff($message_ids, $remaining_ids);
+
+ if (sizeof($message_ids))
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . '
+ SET message_attachment = 0
+ WHERE ' . $db->sql_in_set('msg_id', $message_ids);
+ $db->sql_query($sql);
+ }
+ }
+
+ // Now update the topics. This is a bit trickier, because there could be posts still having attachments within the topic
+ if (sizeof($topic_ids))
+ {
+ // Just check which topics are still having an assigned attachment not orphaned by querying the attachments table (much less entries expected)
+ $sql = 'SELECT topic_id
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids) . '
+ AND is_orphan = 0';
+ $result = $db->sql_query($sql);
+
+ $remaining_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $remaining_ids[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // Now only unset those ids remaining
+ $topic_ids = array_diff($topic_ids, $remaining_ids);
+
+ if (sizeof($topic_ids))
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_attachment = 0
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
+ $db->sql_query($sql);
+ }
+ }
+
+ return $num_deleted;
+}
+
+/**
+* Remove topic shadows
+*/
+function delete_topic_shadows($max_age, $forum_id = '', $auto_sync = true)
+{
+ $where = (is_array($forum_id)) ? 'AND ' . $db->sql_in_set('t.forum_id', array_map('intval', $forum_id)) : (($forum_id) ? 'AND t.forum_id = ' . (int) $forum_id : '');
+
+ switch ($db->sql_layer)
+ {
+ case 'mysql4':
+ case 'mysqli':
+ $sql = 'DELETE t.*
+ FROM ' . TOPICS_TABLE . ' t, ' . TOPICS_TABLE . ' t2
+ WHERE t.topic_moved_id = t2.topic_id
+ AND t.topic_time < ' . (time() - $max_age)
+ . $where;
+ $db->sql_query($sql);
+ break;
+
+ default:
+ $sql = 'SELECT t.topic_id
+ FROM ' . TOPICS_TABLE . ' t, ' . TOPICS_TABLE . ' t2
+ WHERE t.topic_moved_id = t2.topic_id
+ AND t.topic_time < ' . (time() - $max_age)
+ . $where;
+ $result = $db->sql_query($sql);
+
+ $topic_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_ids[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($topic_ids))
+ {
+ $sql = 'DELETE FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
+ $db->sql_query($sql);
+ }
+ break;
+ }
+
+ if ($auto_sync)
+ {
+ $where_type = ($forum_id) ? 'forum_id' : '';
+ sync('forum', $where_type, $forum_id, true, true);
+ }
+}
+
+/**
+* Update/Sync posted information for topics
+*/
+function update_posted_info(&$topic_ids)
+{
+ global $db, $config;
+
+ if (empty($topic_ids) || !$config['load_db_track'])
+ {
+ return;
+ }
+
+ // First of all, let us remove any posted information for these topics
+ $sql = 'DELETE FROM ' . TOPICS_POSTED_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
+ $db->sql_query($sql);
+
+ // Now, let us collect the user/topic combos for rebuilding the information
+ $sql = 'SELECT poster_id, topic_id
+ FROM ' . POSTS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids) . '
+ AND poster_id <> ' . ANONYMOUS . '
+ GROUP BY poster_id, topic_id';
+ $result = $db->sql_query($sql);
+
+ $posted = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // Add as key to make them unique (grouping by) and circumvent empty keys on array_unique
+ $posted[$row['poster_id']][] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // Now add the information...
+ $sql_ary = array();
+ foreach ($posted as $user_id => $topic_row)
+ {
+ foreach ($topic_row as $topic_id)
+ {
+ $sql_ary[] = array(
+ 'user_id' => (int) $user_id,
+ 'topic_id' => (int) $topic_id,
+ 'topic_posted' => 1,
+ );
+ }
+ }
+ unset($posted);
+
+ $db->sql_multi_insert(TOPICS_POSTED_TABLE, $sql_ary);
+}
+
+/**
+* Delete attached file
+*/
+function phpbb_unlink($filename, $mode = 'file', $entry_removed = false)
+{
+ global $db, $phpbb_root_path, $config;
+
+ // Because of copying topics or modifications a physical filename could be assigned more than once. If so, do not remove the file itself.
+ $sql = 'SELECT COUNT(attach_id) AS num_entries
+ FROM ' . ATTACHMENTS_TABLE . "
+ WHERE physical_filename = '" . $db->sql_escape(utf8_basename($filename)) . "'";
+ $result = $db->sql_query($sql);
+ $num_entries = (int) $db->sql_fetchfield('num_entries');
+ $db->sql_freeresult($result);
+
+ // Do not remove file if at least one additional entry with the same name exist.
+ if (($entry_removed && $num_entries > 0) || (!$entry_removed && $num_entries > 1))
+ {
+ return false;
+ }
+
+ $filename = ($mode == 'thumbnail') ? 'thumb_' . utf8_basename($filename) : utf8_basename($filename);
+ return @unlink($phpbb_root_path . $config['upload_path'] . '/' . $filename);
+}
+
+/**
+* All-encompasing sync function
+*
+* Exaples:
+* <code>
+* sync('topic', 'topic_id', 123); // resync topic #123
+* sync('topic', 'forum_id', array(2, 3)); // resync topics from forum #2 and #3
+* sync('topic'); // resync all topics
+* sync('topic', 'range', 'topic_id BETWEEN 1 AND 60'); // resync a range of topics/forums (only available for 'topic' and 'forum' modes)
+* </code>
+*
+* Modes:
+* - forum Resync complete forum
+* - topic Resync topics
+* - topic_moved Removes topic shadows that would be in the same forum as the topic they link to
+* - topic_approved Resyncs the topic_approved flag according to the status of the first post
+* - post_reported Resyncs the post_reported flag, relying on actual reports
+* - topic_reported Resyncs the topic_reported flag, relying on post_reported flags
+* - post_attachement Same as post_reported, but with attachment flags
+* - topic_attachement Same as topic_reported, but with attachment flags
+*/
+function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, $sync_extra = false)
+{
+ global $db;
+
+ if (is_array($where_ids))
+ {
+ $where_ids = array_unique($where_ids);
+ $where_ids = array_map('intval', $where_ids);
+ }
+ else if ($where_type != 'range')
+ {
+ $where_ids = ($where_ids) ? array((int) $where_ids) : array();
+ }
+
+ if ($mode == 'forum' || $mode == 'topic' || $mode == 'topic_approved' || $mode == 'topic_reported' || $mode == 'post_reported')
+ {
+ if (!$where_type)
+ {
+ $where_sql = '';
+ $where_sql_and = 'WHERE';
+ }
+ else if ($where_type == 'range')
+ {
+ // Only check a range of topics/forums. For instance: 'topic_id BETWEEN 1 AND 60'
+ $where_sql = 'WHERE (' . $mode[0] . ".$where_ids)";
+ $where_sql_and = $where_sql . "\n\tAND";
+ }
+ else
+ {
+ // Do not sync the "global forum"
+ $where_ids = array_diff($where_ids, array(0));
+
+ if (!sizeof($where_ids))
+ {
+ // Empty array with IDs. This means that we don't have any work to do. Just return.
+ return;
+ }
+
+ // Limit the topics/forums we are syncing, use specific topic/forum IDs.
+ // $where_type contains the field for the where clause (forum_id, topic_id)
+ $where_sql = 'WHERE ' . $db->sql_in_set($mode[0] . '.' . $where_type, $where_ids);
+ $where_sql_and = $where_sql . "\n\tAND";
+ }
+ }
+ else
+ {
+ if (!sizeof($where_ids))
+ {
+ return;
+ }
+
+ // $where_type contains the field for the where clause (forum_id, topic_id)
+ $where_sql = 'WHERE ' . $db->sql_in_set($mode[0] . '.' . $where_type, $where_ids);
+ $where_sql_and = $where_sql . "\n\tAND";
+ }
+
+ switch ($mode)
+ {
+ case 'topic_moved':
+ $db->sql_transaction('begin');
+ switch ($db->sql_layer)
+ {
+ case 'mysql4':
+ case 'mysqli':
+ $sql = 'DELETE FROM ' . TOPICS_TABLE . '
+ USING ' . TOPICS_TABLE . ' t1, ' . TOPICS_TABLE . " t2
+ WHERE t1.topic_moved_id = t2.topic_id
+ AND t1.forum_id = t2.forum_id";
+ $db->sql_query($sql);
+ break;
+
+ default:
+ $sql = 'SELECT t1.topic_id
+ FROM ' .TOPICS_TABLE . ' t1, ' . TOPICS_TABLE . " t2
+ WHERE t1.topic_moved_id = t2.topic_id
+ AND t1.forum_id = t2.forum_id";
+ $result = $db->sql_query($sql);
+
+ $topic_id_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_id_ary[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($topic_id_ary))
+ {
+ return;
+ }
+
+ $sql = 'DELETE FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $topic_id_ary);
+ $db->sql_query($sql);
+
+ break;
+ }
+
+ $db->sql_transaction('commit');
+ break;
+
+ case 'topic_approved':
+
+ $db->sql_transaction('begin');
+ switch ($db->sql_layer)
+ {
+ case 'mysql4':
+ case 'mysqli':
+ $sql = 'UPDATE ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
+ SET t.topic_approved = p.post_approved
+ $where_sql_and t.topic_first_post_id = p.post_id";
+ $db->sql_query($sql);
+ break;
+
+ default:
+ $sql = 'SELECT t.topic_id, p.post_approved
+ FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
+ $where_sql_and p.post_id = t.topic_first_post_id
+ AND p.post_approved <> t.topic_approved";
+ $result = $db->sql_query($sql);
+
+ $topic_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_ids[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($topic_ids))
+ {
+ return;
+ }
+
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_approved = 1 - topic_approved
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
+ $db->sql_query($sql);
+ break;
+ }
+
+ $db->sql_transaction('commit');
+ break;
+
+ case 'post_reported':
+ $post_ids = $post_reported = array();
+
+ $db->sql_transaction('begin');
+
+ $sql = 'SELECT p.post_id, p.post_reported
+ FROM ' . POSTS_TABLE . " p
+ $where_sql
+ GROUP BY p.post_id, p.post_reported";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_ids[$row['post_id']] = $row['post_id'];
+ if ($row['post_reported'])
+ {
+ $post_reported[$row['post_id']] = 1;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT DISTINCT(post_id)
+ FROM ' . REPORTS_TABLE . '
+ WHERE ' . $db->sql_in_set('post_id', $post_ids) . '
+ AND report_closed = 0';
+ $result = $db->sql_query($sql);
+
+ $post_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!isset($post_reported[$row['post_id']]))
+ {
+ $post_ids[] = $row['post_id'];
+ }
+ else
+ {
+ unset($post_reported[$row['post_id']]);
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // $post_reported should be empty by now, if it's not it contains
+ // posts that are falsely flagged as reported
+ foreach ($post_reported as $post_id => $void)
+ {
+ $post_ids[] = $post_id;
+ }
+
+ if (sizeof($post_ids))
+ {
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET post_reported = 1 - post_reported
+ WHERE ' . $db->sql_in_set('post_id', $post_ids);
+ $db->sql_query($sql);
+ }
+
+ $db->sql_transaction('commit');
+ break;
+
+ case 'topic_reported':
+ if ($sync_extra)
+ {
+ sync('post_reported', $where_type, $where_ids);
+ }
+
+ $topic_ids = $topic_reported = array();
+
+ $db->sql_transaction('begin');
+
+ $sql = 'SELECT DISTINCT(t.topic_id)
+ FROM ' . POSTS_TABLE . " t
+ $where_sql_and t.post_reported = 1";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_reported[$row['topic_id']] = 1;
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT t.topic_id, t.topic_reported
+ FROM ' . TOPICS_TABLE . " t
+ $where_sql";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['topic_reported'] ^ isset($topic_reported[$row['topic_id']]))
+ {
+ $topic_ids[] = $row['topic_id'];
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($topic_ids))
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_reported = 1 - topic_reported
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
+ $db->sql_query($sql);
+ }
+
+ $db->sql_transaction('commit');
+ break;
+
+ case 'post_attachment':
+ $post_ids = $post_attachment = array();
+
+ $db->sql_transaction('begin');
+
+ $sql = 'SELECT p.post_id, p.post_attachment
+ FROM ' . POSTS_TABLE . " p
+ $where_sql
+ GROUP BY p.post_id, p.post_attachment";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_ids[$row['post_id']] = $row['post_id'];
+ if ($row['post_attachment'])
+ {
+ $post_attachment[$row['post_id']] = 1;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT DISTINCT(post_msg_id)
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('post_msg_id', $post_ids) . '
+ AND in_message = 0';
+ $result = $db->sql_query($sql);
+
+ $post_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!isset($post_attachment[$row['post_msg_id']]))
+ {
+ $post_ids[] = $row['post_msg_id'];
+ }
+ else
+ {
+ unset($post_attachment[$row['post_msg_id']]);
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // $post_attachment should be empty by now, if it's not it contains
+ // posts that are falsely flagged as having attachments
+ foreach ($post_attachment as $post_id => $void)
+ {
+ $post_ids[] = $post_id;
+ }
+
+ if (sizeof($post_ids))
+ {
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET post_attachment = 1 - post_attachment
+ WHERE ' . $db->sql_in_set('post_id', $post_ids);
+ $db->sql_query($sql);
+ }
+
+ $db->sql_transaction('commit');
+ break;
+
+ case 'topic_attachment':
+ if ($sync_extra)
+ {
+ sync('post_attachment', $where_type, $where_ids);
+ }
+
+ $topic_ids = $topic_attachment = array();
+
+ $db->sql_transaction('begin');
+
+ $sql = 'SELECT DISTINCT(t.topic_id)
+ FROM ' . POSTS_TABLE . " t
+ $where_sql_and t.post_attachment = 1";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_attachment[$row['topic_id']] = 1;
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT t.topic_id, t.topic_attachment
+ FROM ' . TOPICS_TABLE . " t
+ $where_sql";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['topic_attachment'] ^ isset($topic_attachment[$row['topic_id']]))
+ {
+ $topic_ids[] = $row['topic_id'];
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($topic_ids))
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_attachment = 1 - topic_attachment
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
+ $db->sql_query($sql);
+ }
+
+ $db->sql_transaction('commit');
+
+ break;
+
+ case 'forum':
+
+ $db->sql_transaction('begin');
+
+ // 1: Get the list of all forums
+ $sql = 'SELECT f.*
+ FROM ' . FORUMS_TABLE . " f
+ $where_sql";
+ $result = $db->sql_query($sql);
+
+ $forum_data = $forum_ids = $post_ids = $last_post_id = $post_info = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['forum_type'] == FORUM_LINK)
+ {
+ continue;
+ }
+
+ $forum_id = (int) $row['forum_id'];
+ $forum_ids[$forum_id] = $forum_id;
+
+ $forum_data[$forum_id] = $row;
+ if ($sync_extra)
+ {
+ $forum_data[$forum_id]['posts'] = 0;
+ $forum_data[$forum_id]['topics'] = 0;
+ $forum_data[$forum_id]['topics_real'] = 0;
+ }
+ $forum_data[$forum_id]['last_post_id'] = 0;
+ $forum_data[$forum_id]['last_post_subject'] = '';
+ $forum_data[$forum_id]['last_post_time'] = 0;
+ $forum_data[$forum_id]['last_poster_id'] = 0;
+ $forum_data[$forum_id]['last_poster_name'] = '';
+ $forum_data[$forum_id]['last_poster_colour'] = '';
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($forum_ids))
+ {
+ break;
+ }
+
+ $forum_ids = array_values($forum_ids);
+
+ // 2: Get topic counts for each forum (optional)
+ if ($sync_extra)
+ {
+ $sql = 'SELECT forum_id, topic_approved, COUNT(topic_id) AS forum_topics
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_ids) . '
+ GROUP BY forum_id, topic_approved';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_id = (int) $row['forum_id'];
+ $forum_data[$forum_id]['topics_real'] += $row['forum_topics'];
+
+ if ($row['topic_approved'])
+ {
+ $forum_data[$forum_id]['topics'] = $row['forum_topics'];
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+
+ // 3: Get post count for each forum (optional)
+ if ($sync_extra)
+ {
+ if (sizeof($forum_ids) == 1)
+ {
+ $sql = 'SELECT SUM(t.topic_replies + 1) AS forum_posts
+ FROM ' . TOPICS_TABLE . ' t
+ WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
+ AND t.topic_approved = 1
+ AND t.topic_status <> ' . ITEM_MOVED;
+ }
+ else
+ {
+ $sql = 'SELECT t.forum_id, SUM(t.topic_replies + 1) AS forum_posts
+ FROM ' . TOPICS_TABLE . ' t
+ WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
+ AND t.topic_approved = 1
+ AND t.topic_status <> ' . ITEM_MOVED . '
+ GROUP BY t.forum_id';
+ }
+
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_id = (sizeof($forum_ids) == 1) ? (int) $forum_ids[0] : (int) $row['forum_id'];
+
+ $forum_data[$forum_id]['posts'] = (int) $row['forum_posts'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ // 4: Get last_post_id for each forum
+ if (sizeof($forum_ids) == 1)
+ {
+ $sql = 'SELECT MAX(t.topic_last_post_id) as last_post_id
+ FROM ' . TOPICS_TABLE . ' t
+ WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
+ AND t.topic_approved = 1';
+ }
+ else
+ {
+ $sql = 'SELECT t.forum_id, MAX(t.topic_last_post_id) as last_post_id
+ FROM ' . TOPICS_TABLE . ' t
+ WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
+ AND t.topic_approved = 1
+ GROUP BY t.forum_id';
+ }
+
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_id = (sizeof($forum_ids) == 1) ? (int) $forum_ids[0] : (int) $row['forum_id'];
+
+ $forum_data[$forum_id]['last_post_id'] = (int) $row['last_post_id'];
+
+ $post_ids[] = $row['last_post_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // 5: Retrieve last_post infos
+ if (sizeof($post_ids))
+ {
+ $sql = 'SELECT p.post_id, p.poster_id, p.post_subject, p.post_time, p.post_username, u.username, u.user_colour
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
+ WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
+ AND p.poster_id = u.user_id';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_info[$row['post_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($forum_data as $forum_id => $data)
+ {
+ if ($data['last_post_id'])
+ {
+ if (isset($post_info[$data['last_post_id']]))
+ {
+ $forum_data[$forum_id]['last_post_subject'] = $post_info[$data['last_post_id']]['post_subject'];
+ $forum_data[$forum_id]['last_post_time'] = $post_info[$data['last_post_id']]['post_time'];
+ $forum_data[$forum_id]['last_poster_id'] = $post_info[$data['last_post_id']]['poster_id'];
+ $forum_data[$forum_id]['last_poster_name'] = ($post_info[$data['last_post_id']]['poster_id'] != ANONYMOUS) ? $post_info[$data['last_post_id']]['username'] : $post_info[$data['last_post_id']]['post_username'];
+ $forum_data[$forum_id]['last_poster_colour'] = $post_info[$data['last_post_id']]['user_colour'];
+ }
+ else
+ {
+ // For some reason we did not find the post in the db
+ $forum_data[$forum_id]['last_post_id'] = 0;
+ $forum_data[$forum_id]['last_post_subject'] = '';
+ $forum_data[$forum_id]['last_post_time'] = 0;
+ $forum_data[$forum_id]['last_poster_id'] = 0;
+ $forum_data[$forum_id]['last_poster_name'] = '';
+ $forum_data[$forum_id]['last_poster_colour'] = '';
+ }
+ }
+ }
+ unset($post_info);
+ }
+
+ // 6: Now do that thing
+ $fieldnames = array('last_post_id', 'last_post_subject', 'last_post_time', 'last_poster_id', 'last_poster_name', 'last_poster_colour');
+
+ if ($sync_extra)
+ {
+ array_push($fieldnames, 'posts', 'topics', 'topics_real');
+ }
+
+ foreach ($forum_data as $forum_id => $row)
+ {
+ $sql_ary = array();
+
+ foreach ($fieldnames as $fieldname)
+ {
+ if ($row['forum_' . $fieldname] != $row[$fieldname])
+ {
+ if (preg_match('#(name|colour|subject)$#', $fieldname))
+ {
+ $sql_ary['forum_' . $fieldname] = (string) $row[$fieldname];
+ }
+ else
+ {
+ $sql_ary['forum_' . $fieldname] = (int) $row[$fieldname];
+ }
+ }
+ }
+
+ if (sizeof($sql_ary))
+ {
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE forum_id = ' . $forum_id;
+ $db->sql_query($sql);
+ }
+ }
+
+ $db->sql_transaction('commit');
+ break;
+
+ case 'topic':
+ $topic_data = $post_ids = $approved_unapproved_ids = $resync_forums = $delete_topics = $delete_posts = $moved_topics = array();
+
+ $db->sql_transaction('begin');
+
+ $sql = 'SELECT t.topic_id, t.forum_id, t.topic_moved_id, t.topic_approved, ' . (($sync_extra) ? 't.topic_attachment, t.topic_reported, ' : '') . 't.topic_poster, t.topic_time, t.topic_replies, t.topic_replies_real, t.topic_first_post_id, t.topic_first_poster_name, t.topic_first_poster_colour, t.topic_last_post_id, t.topic_last_post_subject, t.topic_last_poster_id, t.topic_last_poster_name, t.topic_last_poster_colour, t.topic_last_post_time
+ FROM ' . TOPICS_TABLE . " t
+ $where_sql";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['topic_moved_id'])
+ {
+ $moved_topics[] = $row['topic_id'];
+ continue;
+ }
+
+ $topic_id = (int) $row['topic_id'];
+ $topic_data[$topic_id] = $row;
+ $topic_data[$topic_id]['replies_real'] = -1;
+ $topic_data[$topic_id]['replies'] = 0;
+ $topic_data[$topic_id]['first_post_id'] = 0;
+ $topic_data[$topic_id]['last_post_id'] = 0;
+ unset($topic_data[$topic_id]['topic_id']);
+
+ // This array holds all topic_ids
+ $delete_topics[$topic_id] = '';
+
+ if ($sync_extra)
+ {
+ $topic_data[$topic_id]['reported'] = 0;
+ $topic_data[$topic_id]['attachment'] = 0;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // Use "t" as table alias because of the $where_sql clause
+ // NOTE: 't.post_approved' in the GROUP BY is causing a major slowdown.
+ $sql = 'SELECT t.topic_id, t.post_approved, COUNT(t.post_id) AS total_posts, MIN(t.post_id) AS first_post_id, MAX(t.post_id) AS last_post_id
+ FROM ' . POSTS_TABLE . " t
+ $where_sql
+ GROUP BY t.topic_id, t.post_approved";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_id = (int) $row['topic_id'];
+
+ $row['first_post_id'] = (int) $row['first_post_id'];
+ $row['last_post_id'] = (int) $row['last_post_id'];
+
+ if (!isset($topic_data[$topic_id]))
+ {
+ // Hey, these posts come from a topic that does not exist
+ $delete_posts[$topic_id] = '';
+ }
+ else
+ {
+ // Unset the corresponding entry in $delete_topics
+ // When we'll be done, only topics with no posts will remain
+ unset($delete_topics[$topic_id]);
+
+ $topic_data[$topic_id]['replies_real'] += $row['total_posts'];
+ $topic_data[$topic_id]['first_post_id'] = (!$topic_data[$topic_id]['first_post_id']) ? $row['first_post_id'] : min($topic_data[$topic_id]['first_post_id'], $row['first_post_id']);
+
+ if ($row['post_approved'] || !$topic_data[$topic_id]['last_post_id'])
+ {
+ $topic_data[$topic_id]['replies'] = $row['total_posts'] - 1;
+ $topic_data[$topic_id]['last_post_id'] = $row['last_post_id'];
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($topic_data as $topic_id => $row)
+ {
+ $post_ids[] = $row['first_post_id'];
+ if ($row['first_post_id'] != $row['last_post_id'])
+ {
+ $post_ids[] = $row['last_post_id'];
+ }
+ }
+
+ // Now we delete empty topics and orphan posts
+ if (sizeof($delete_posts))
+ {
+ delete_posts('topic_id', array_keys($delete_posts), false);
+ unset($delete_posts);
+ }
+
+ if (!sizeof($topic_data))
+ {
+ // If we get there, topic ids were invalid or topics did not contain any posts
+ delete_topics($where_type, $where_ids, true);
+ return;
+ }
+
+ if (sizeof($delete_topics))
+ {
+ $delete_topic_ids = array();
+ foreach ($delete_topics as $topic_id => $void)
+ {
+ unset($topic_data[$topic_id]);
+ $delete_topic_ids[] = $topic_id;
+ }
+
+ delete_topics('topic_id', $delete_topic_ids, false);
+ unset($delete_topics, $delete_topic_ids);
+ }
+
+ $sql = 'SELECT p.post_id, p.topic_id, p.post_approved, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
+ WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
+ AND u.user_id = p.poster_id';
+ $result = $db->sql_query($sql);
+
+ $post_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_id = intval($row['topic_id']);
+
+ if ($row['post_id'] == $topic_data[$topic_id]['first_post_id'])
+ {
+ if ($topic_data[$topic_id]['topic_approved'] != $row['post_approved'])
+ {
+ $approved_unapproved_ids[] = $topic_id;
+ }
+ $topic_data[$topic_id]['time'] = $row['post_time'];
+ $topic_data[$topic_id]['poster'] = $row['poster_id'];
+ $topic_data[$topic_id]['first_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'];
+ $topic_data[$topic_id]['first_poster_colour'] = $row['user_colour'];
+ }
+
+ if ($row['post_id'] == $topic_data[$topic_id]['last_post_id'])
+ {
+ $topic_data[$topic_id]['last_poster_id'] = $row['poster_id'];
+ $topic_data[$topic_id]['last_post_subject'] = $row['post_subject'];
+ $topic_data[$topic_id]['last_post_time'] = $row['post_time'];
+ $topic_data[$topic_id]['last_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'];
+ $topic_data[$topic_id]['last_poster_colour'] = $row['user_colour'];
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // Make sure shadow topics do link to existing topics
+ if (sizeof($moved_topics))
+ {
+ $delete_topics = array();
+
+ $sql = 'SELECT t1.topic_id, t1.topic_moved_id
+ FROM ' . TOPICS_TABLE . ' t1
+ LEFT JOIN ' . TOPICS_TABLE . ' t2 ON (t2.topic_id = t1.topic_moved_id)
+ WHERE ' . $db->sql_in_set('t1.topic_id', $moved_topics) . '
+ AND t2.topic_id IS NULL';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $delete_topics[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($delete_topics))
+ {
+ delete_topics('topic_id', $delete_topics, false);
+ }
+ unset($delete_topics);
+
+ // Make sure shadow topics having no last post data being updated (this only rarely happens...)
+ $sql = 'SELECT topic_id, topic_moved_id, topic_last_post_id, topic_first_post_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $moved_topics) . '
+ AND topic_last_post_time = 0';
+ $result = $db->sql_query($sql);
+
+ $shadow_topic_data = $post_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $shadow_topic_data[$row['topic_moved_id']] = $row;
+ $post_ids[] = $row['topic_last_post_id'];
+ $post_ids[] = $row['topic_first_post_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $sync_shadow_topics = array();
+ if (sizeof($post_ids))
+ {
+ $sql = 'SELECT p.post_id, p.topic_id, p.post_approved, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
+ WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
+ AND u.user_id = p.poster_id';
+ $result = $db->sql_query($sql);
+
+ $post_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_id = (int) $row['topic_id'];
+
+ // Ok, there should be a shadow topic. If there isn't, then there's something wrong with the db.
+ // However, there's not much we can do about it.
+ if (!empty($shadow_topic_data[$topic_id]))
+ {
+ if ($row['post_id'] == $shadow_topic_data[$topic_id]['topic_first_post_id'])
+ {
+ $orig_topic_id = $shadow_topic_data[$topic_id]['topic_id'];
+
+ if (!isset($sync_shadow_topics[$orig_topic_id]))
+ {
+ $sync_shadow_topics[$orig_topic_id] = array();
+ }
+
+ $sync_shadow_topics[$orig_topic_id]['topic_time'] = $row['post_time'];
+ $sync_shadow_topics[$orig_topic_id]['topic_poster'] = $row['poster_id'];
+ $sync_shadow_topics[$orig_topic_id]['topic_first_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'];
+ $sync_shadow_topics[$orig_topic_id]['topic_first_poster_colour'] = $row['user_colour'];
+ }
+
+ if ($row['post_id'] == $shadow_topic_data[$topic_id]['topic_last_post_id'])
+ {
+ $orig_topic_id = $shadow_topic_data[$topic_id]['topic_id'];
+
+ if (!isset($sync_shadow_topics[$orig_topic_id]))
+ {
+ $sync_shadow_topics[$orig_topic_id] = array();
+ }
+
+ $sync_shadow_topics[$orig_topic_id]['topic_last_poster_id'] = $row['poster_id'];
+ $sync_shadow_topics[$orig_topic_id]['topic_last_post_subject'] = $row['post_subject'];
+ $sync_shadow_topics[$orig_topic_id]['topic_last_post_time'] = $row['post_time'];
+ $sync_shadow_topics[$orig_topic_id]['topic_last_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'];
+ $sync_shadow_topics[$orig_topic_id]['topic_last_poster_colour'] = $row['user_colour'];
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $shadow_topic_data = array();
+
+ // Update the information we collected
+ if (sizeof($sync_shadow_topics))
+ {
+ foreach ($sync_shadow_topics as $sync_topic_id => $sql_ary)
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE topic_id = ' . $sync_topic_id;
+ $db->sql_query($sql);
+ }
+ }
+ }
+
+ unset($sync_shadow_topics, $shadow_topic_data);
+ }
+
+ // approved becomes unapproved, and vice-versa
+ if (sizeof($approved_unapproved_ids))
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_approved = 1 - topic_approved
+ WHERE ' . $db->sql_in_set('topic_id', $approved_unapproved_ids);
+ $db->sql_query($sql);
+ }
+ unset($approved_unapproved_ids);
+
+ // These are fields that will be synchronised
+ $fieldnames = array('time', 'replies', 'replies_real', 'poster', 'first_post_id', 'first_poster_name', 'first_poster_colour', 'last_post_id', 'last_post_subject', 'last_post_time', 'last_poster_id', 'last_poster_name', 'last_poster_colour');
+
+ if ($sync_extra)
+ {
+ // This routine assumes that post_reported values are correct
+ // if they are not, use sync('post_reported') first
+ $sql = 'SELECT t.topic_id, p.post_id
+ FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
+ $where_sql_and p.topic_id = t.topic_id
+ AND p.post_reported = 1
+ GROUP BY t.topic_id, p.post_id";
+ $result = $db->sql_query($sql);
+
+ $fieldnames[] = 'reported';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_data[intval($row['topic_id'])]['reported'] = 1;
+ }
+ $db->sql_freeresult($result);
+
+ // This routine assumes that post_attachment values are correct
+ // if they are not, use sync('post_attachment') first
+ $sql = 'SELECT t.topic_id, p.post_id
+ FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
+ $where_sql_and p.topic_id = t.topic_id
+ AND p.post_attachment = 1
+ GROUP BY t.topic_id, p.post_id";
+ $result = $db->sql_query($sql);
+
+ $fieldnames[] = 'attachment';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_data[intval($row['topic_id'])]['attachment'] = 1;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ foreach ($topic_data as $topic_id => $row)
+ {
+ $sql_ary = array();
+
+ foreach ($fieldnames as $fieldname)
+ {
+ if (isset($row[$fieldname]) && isset($row['topic_' . $fieldname]) && $row['topic_' . $fieldname] != $row[$fieldname])
+ {
+ $sql_ary['topic_' . $fieldname] = $row[$fieldname];
+ }
+ }
+
+ if (sizeof($sql_ary))
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE topic_id = ' . $topic_id;
+ $db->sql_query($sql);
+
+ $resync_forums[$row['forum_id']] = $row['forum_id'];
+ }
+ }
+ unset($topic_data);
+
+ $db->sql_transaction('commit');
+
+ // if some topics have been resync'ed then resync parent forums
+ // except when we're only syncing a range, we don't want to sync forums during
+ // batch processing.
+ if ($resync_parents && sizeof($resync_forums) && $where_type != 'range')
+ {
+ sync('forum', 'forum_id', array_values($resync_forums), true, true);
+ }
+ break;
+ }
+
+ return;
+}
+
+/**
+* Prune function
+*/
+function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true)
+{
+ global $db;
+
+ if (!is_array($forum_id))
+ {
+ $forum_id = array($forum_id);
+ }
+
+ if (!sizeof($forum_id))
+ {
+ return;
+ }
+
+ $sql_and = '';
+
+ if (!($prune_flags & FORUM_FLAG_PRUNE_ANNOUNCE))
+ {
+ $sql_and .= ' AND topic_type <> ' . POST_ANNOUNCE;
+ }
+
+ if (!($prune_flags & FORUM_FLAG_PRUNE_STICKY))
+ {
+ $sql_and .= ' AND topic_type <> ' . POST_STICKY;
+ }
+
+ if ($prune_mode == 'posted')
+ {
+ $sql_and .= " AND topic_last_post_time < $prune_date";
+ }
+
+ if ($prune_mode == 'viewed')
+ {
+ $sql_and .= " AND topic_last_view_time < $prune_date";
+ }
+
+ $sql = 'SELECT topic_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_id) . "
+ AND poll_start = 0
+ $sql_and";
+ $result = $db->sql_query($sql);
+
+ $topic_list = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_list[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if ($prune_flags & FORUM_FLAG_PRUNE_POLL)
+ {
+ $sql = 'SELECT topic_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_id) . "
+ AND poll_start > 0
+ AND poll_last_vote < $prune_date
+ $sql_and";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_list[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $topic_list = array_unique($topic_list);
+ }
+
+ return delete_topics('topic_id', $topic_list, $auto_sync, false);
+}
+
+/**
+* Function auto_prune(), this function now relies on passed vars
+*/
+function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_freq)
+{
+ global $db;
+
+ $sql = 'SELECT forum_name
+ FROM ' . FORUMS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $result = $db->sql_query($sql, 3600);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ $prune_date = time() - ($prune_days * 86400);
+ $next_prune = time() + ($prune_freq * 86400);
+
+ prune($forum_id, $prune_mode, $prune_date, $prune_flags, true);
+
+ $sql = 'UPDATE ' . FORUMS_TABLE . "
+ SET prune_next = $next_prune
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_AUTO_PRUNE', $row['forum_name']);
+ }
+
+ return;
+}
+
+/**
+* remove_comments will strip the sql comment lines out of an uploaded sql file
+* specifically for mssql and postgres type files in the install....
+*/
+function remove_comments(&$output)
+{
+ $lines = explode("\n", $output);
+ $output = '';
+
+ // try to keep mem. use down
+ $linecount = sizeof($lines);
+
+ $in_comment = false;
+ for ($i = 0; $i < $linecount; $i++)
+ {
+ if (trim($lines[$i]) == '/*')
+ {
+ $in_comment = true;
+ }
+
+ if (!$in_comment)
+ {
+ $output .= $lines[$i] . "\n";
+ }
+
+ if (trim($lines[$i]) == '*/')
+ {
+ $in_comment = false;
+ }
+ }
+
+ unset($lines);
+ return $output;
+}
+
+/**
+* Cache moderators, called whenever permissions are changed via admin_permissions. Changes of username
+* and group names must be carried through for the moderators table
+*/
+function cache_moderators()
+{
+ global $db, $cache, $auth, $phpbb_root_path, $phpEx;
+
+ // Remove cached sql results
+ $cache->destroy('sql', MODERATOR_CACHE_TABLE);
+
+ // Clear table
+ switch ($db->sql_layer)
+ {
+ case 'sqlite':
+ case 'firebird':
+ $db->sql_query('DELETE FROM ' . MODERATOR_CACHE_TABLE);
+ break;
+
+ default:
+ $db->sql_query('TRUNCATE TABLE ' . MODERATOR_CACHE_TABLE);
+ break;
+ }
+
+ // We add moderators who have forum moderator permissions without an explicit ACL_NEVER setting
+ $hold_ary = $ug_id_ary = $sql_ary = array();
+
+ // Grab all users having moderative options...
+ $hold_ary = $auth->acl_user_raw_data(false, 'm_%', false);
+
+ // Add users?
+ if (sizeof($hold_ary))
+ {
+ // At least one moderative option warrants a display
+ $ug_id_ary = array_keys($hold_ary);
+
+ // Remove users who have group memberships with DENY moderator permissions
+ $sql = $db->sql_build_query('SELECT', array(
+ 'SELECT' => 'a.forum_id, ug.user_id, g.group_id',
+
+ 'FROM' => array(
+ ACL_OPTIONS_TABLE => 'o',
+ USER_GROUP_TABLE => 'ug',
+ ACL_GROUPS_TABLE => 'a',
+ GROUPS_TABLE => 'g',
+ ),
+
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(ACL_ROLES_DATA_TABLE => 'r'),
+ 'ON' => 'a.auth_role_id = r.role_id'
+ )
+ ),
+
+ 'WHERE' => '(o.auth_option_id = a.auth_option_id OR o.auth_option_id = r.auth_option_id)
+ AND ((a.auth_setting = ' . ACL_NEVER . ' AND r.auth_setting IS NULL)
+ OR r.auth_setting = ' . ACL_NEVER . ')
+ AND a.group_id = ug.group_id
+ AND g.group_id = ug.group_id
+ AND NOT (ug.group_leader = 1 AND g.group_skip_auth = 1)
+ AND ' . $db->sql_in_set('ug.user_id', $ug_id_ary) . "
+ AND ug.user_pending = 0
+ AND o.auth_option " . $db->sql_like_expression('m_' . $db->any_char),
+ ));
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (isset($hold_ary[$row['user_id']][$row['forum_id']]))
+ {
+ unset($hold_ary[$row['user_id']][$row['forum_id']]);
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($hold_ary))
+ {
+ // Get usernames...
+ $sql = 'SELECT user_id, username
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', array_keys($hold_ary));
+ $result = $db->sql_query($sql);
+
+ $usernames_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $usernames_ary[$row['user_id']] = $row['username'];
+ }
+
+ foreach ($hold_ary as $user_id => $forum_id_ary)
+ {
+ // Do not continue if user does not exist
+ if (!isset($usernames_ary[$user_id]))
+ {
+ continue;
+ }
+
+ foreach ($forum_id_ary as $forum_id => $auth_ary)
+ {
+ $sql_ary[] = array(
+ 'forum_id' => (int) $forum_id,
+ 'user_id' => (int) $user_id,
+ 'username' => (string) $usernames_ary[$user_id],
+ 'group_id' => 0,
+ 'group_name' => ''
+ );
+ }
+ }
+ }
+ }
+
+ // Now to the groups...
+ $hold_ary = $auth->acl_group_raw_data(false, 'm_%', false);
+
+ if (sizeof($hold_ary))
+ {
+ $ug_id_ary = array_keys($hold_ary);
+
+ // Make sure not hidden or special groups are involved...
+ $sql = 'SELECT group_name, group_id, group_type
+ FROM ' . GROUPS_TABLE . '
+ WHERE ' . $db->sql_in_set('group_id', $ug_id_ary);
+ $result = $db->sql_query($sql);
+
+ $groupnames_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['group_type'] == GROUP_HIDDEN || $row['group_type'] == GROUP_SPECIAL)
+ {
+ unset($hold_ary[$row['group_id']]);
+ }
+
+ $groupnames_ary[$row['group_id']] = $row['group_name'];
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($hold_ary as $group_id => $forum_id_ary)
+ {
+ // If there is no group, we do not assign it...
+ if (!isset($groupnames_ary[$group_id]))
+ {
+ continue;
+ }
+
+ foreach ($forum_id_ary as $forum_id => $auth_ary)
+ {
+ $flag = false;
+ foreach ($auth_ary as $auth_option => $setting)
+ {
+ // Make sure at least one ACL_YES option is set...
+ if ($setting == ACL_YES)
+ {
+ $flag = true;
+ break;
+ }
+ }
+
+ if (!$flag)
+ {
+ continue;
+ }
+
+ $sql_ary[] = array(
+ 'forum_id' => (int) $forum_id,
+ 'user_id' => 0,
+ 'username' => '',
+ 'group_id' => (int) $group_id,
+ 'group_name' => (string) $groupnames_ary[$group_id]
+ );
+ }
+ }
+ }
+
+ $db->sql_multi_insert(MODERATOR_CACHE_TABLE, $sql_ary);
+}
+
+/**
+* View log
+*/
+function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $limit_days = 0, $sort_by = 'l.log_time DESC', $keywords = '')
+{
+ global $db, $user, $auth, $phpEx, $phpbb_root_path, $phpbb_admin_path;
+
+ $topic_id_list = $reportee_id_list = $is_auth = $is_mod = array();
+
+ $profile_url = (defined('IN_ADMIN')) ? append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&amp;mode=overview') : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile');
+
+ switch ($mode)
+ {
+ case 'admin':
+ $log_type = LOG_ADMIN;
+ $sql_forum = '';
+ break;
+
+ case 'mod':
+ $log_type = LOG_MOD;
+ $sql_forum = '';
+
+ if ($topic_id)
+ {
+ $sql_forum = 'AND l.topic_id = ' . (int) $topic_id;
+ }
+ else if (is_array($forum_id))
+ {
+ $sql_forum = 'AND ' . $db->sql_in_set('l.forum_id', array_map('intval', $forum_id));
+ }
+ else if ($forum_id)
+ {
+ $sql_forum = 'AND l.forum_id = ' . (int) $forum_id;
+ }
+ break;
+
+ case 'user':
+ $log_type = LOG_USERS;
+ $sql_forum = 'AND l.reportee_id = ' . (int) $user_id;
+ break;
+
+ case 'users':
+ $log_type = LOG_USERS;
+ $sql_forum = '';
+ break;
+
+ case 'critical':
+ $log_type = LOG_CRITICAL;
+ $sql_forum = '';
+ break;
+
+ default:
+ return;
+ }
+
+ $keywords = preg_split('#[\s+\-|*()]+#u', utf8_strtolower(preg_quote($keywords, '#')), 0, PREG_SPLIT_NO_EMPTY);
+ $sql_keywords = '';
+
+ if (!empty($keywords))
+ {
+ $keywords_pattern = '#' . implode('|', $keywords) . '#ui';
+ for ($i = 0, $num_keywords = sizeof($keywords); $i < $num_keywords; $i++)
+ {
+ $keywords[$i] = $db->sql_like_expression($db->any_char . $keywords[$i] . $db->any_char);
+ }
+
+ $operations = array();
+ foreach ($user->lang as $key => $value)
+ {
+ if (substr($key, 0, 4) == 'LOG_' && preg_match($keywords_pattern, $value))
+ {
+ $operations[] = $key;
+ }
+ }
+
+ $sql_keywords = 'AND (';
+ if (!empty($operations))
+ {
+ $sql_keywords .= $db->sql_in_set('l.log_operation', $operations) . ' OR ';
+ }
+ $sql_keywords .= 'LOWER(l.log_data) ' . implode(' OR LOWER(l.log_data) ', $keywords) . ')';
+ }
+
+ $sql = "SELECT l.*, u.username, u.username_clean, u.user_colour
+ FROM " . LOG_TABLE . " l, " . USERS_TABLE . " u
+ WHERE l.log_type = $log_type
+ AND u.user_id = l.user_id
+ " . (($limit_days) ? "AND l.log_time >= $limit_days" : '') . "
+ $sql_keywords
+ $sql_forum
+ ORDER BY $sort_by";
+ $result = $db->sql_query_limit($sql, $limit, $offset);
+
+ $i = 0;
+ $log = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['topic_id'])
+ {
+ $topic_id_list[] = $row['topic_id'];
+ }
+
+ if ($row['reportee_id'])
+ {
+ $reportee_id_list[] = $row['reportee_id'];
+ }
+
+ $log[$i] = array(
+ 'id' => $row['log_id'],
+
+ 'reportee_id' => $row['reportee_id'],
+ 'reportee_username' => '',
+ 'reportee_username_full'=> '',
+
+ 'user_id' => $row['user_id'],
+ 'username' => $row['username'],
+ 'username_full' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, $profile_url),
+
+ 'ip' => $row['log_ip'],
+ 'time' => $row['log_time'],
+ 'forum_id' => $row['forum_id'],
+ 'topic_id' => $row['topic_id'],
+
+ 'viewforum' => ($row['forum_id'] && $auth->acl_get('f_read', $row['forum_id'])) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : false,
+ 'action' => (isset($user->lang[$row['log_operation']])) ? $user->lang[$row['log_operation']] : '{' . ucfirst(str_replace('_', ' ', $row['log_operation'])) . '}',
+ );
+
+ if (!empty($row['log_data']))
+ {
+ $log_data_ary = @unserialize($row['log_data']);
+ $log_data_ary = ($log_data_ary === false) ? array() : $log_data_ary;
+
+ if (isset($user->lang[$row['log_operation']]))
+ {
+ // Check if there are more occurrences of % than arguments, if there are we fill out the arguments array
+ // It doesn't matter if we add more arguments than placeholders
+ if ((substr_count($log[$i]['action'], '%') - sizeof($log_data_ary)) > 0)
+ {
+ $log_data_ary = array_merge($log_data_ary, array_fill(0, substr_count($log[$i]['action'], '%') - sizeof($log_data_ary), ''));
+ }
+
+ $log[$i]['action'] = vsprintf($log[$i]['action'], $log_data_ary);
+
+ // If within the admin panel we do not censor text out
+ if (defined('IN_ADMIN'))
+ {
+ $log[$i]['action'] = bbcode_nl2br($log[$i]['action']);
+ }
+ else
+ {
+ $log[$i]['action'] = bbcode_nl2br(censor_text($log[$i]['action']));
+ }
+ }
+ else if (!empty($log_data_ary))
+ {
+ $log[$i]['action'] .= '<br />' . implode('', $log_data_ary);
+ }
+
+ /* Apply make_clickable... has to be seen if it is for good. :/
+ // Seems to be not for the moment, reconsider later...
+ $log[$i]['action'] = make_clickable($log[$i]['action']);
+ */
+ }
+
+ $i++;
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($topic_id_list))
+ {
+ $topic_id_list = array_unique($topic_id_list);
+
+ // This query is not really needed if move_topics() updates the forum_id field,
+ // although it's also used to determine if the topic still exists in the database
+ $sql = 'SELECT topic_id, forum_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', array_map('intval', $topic_id_list));
+ $result = $db->sql_query($sql);
+
+ $default_forum_id = 0;
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!$row['forum_id'])
+ {
+ if ($auth->acl_getf_global('f_read'))
+ {
+ if (!$default_forum_id)
+ {
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_type = ' . FORUM_POST;
+ $f_result = $db->sql_query_limit($sql, 1);
+ $default_forum_id = (int) $db->sql_fetchfield('forum_id', false, $f_result);
+ $db->sql_freeresult($f_result);
+ }
+
+ $is_auth[$row['topic_id']] = $default_forum_id;
+ }
+ }
+ else
+ {
+ if ($auth->acl_get('f_read', $row['forum_id']))
+ {
+ $is_auth[$row['topic_id']] = $row['forum_id'];
+ }
+ }
+
+ if ($auth->acl_gets('a_', 'm_', $row['forum_id']))
+ {
+ $is_mod[$row['topic_id']] = $row['forum_id'];
+ }
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($log as $key => $row)
+ {
+ $log[$key]['viewtopic'] = (isset($is_auth[$row['topic_id']])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $is_auth[$row['topic_id']] . '&amp;t=' . $row['topic_id']) : false;
+ $log[$key]['viewlogs'] = (isset($is_mod[$row['topic_id']])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=logs&amp;mode=topic_logs&amp;t=' . $row['topic_id'], true, $user->session_id) : false;
+ }
+ }
+
+ if (sizeof($reportee_id_list))
+ {
+ $reportee_id_list = array_unique($reportee_id_list);
+ $reportee_names_list = array();
+
+ $sql = 'SELECT user_id, username, user_colour
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $reportee_id_list);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $reportee_names_list[$row['user_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($log as $key => $row)
+ {
+ if (!isset($reportee_names_list[$row['reportee_id']]))
+ {
+ continue;
+ }
+
+ $log[$key]['reportee_username'] = $reportee_names_list[$row['reportee_id']]['username'];
+ $log[$key]['reportee_username_full'] = get_username_string('full', $row['reportee_id'], $reportee_names_list[$row['reportee_id']]['username'], $reportee_names_list[$row['reportee_id']]['user_colour'], false, $profile_url);
+ }
+ }
+
+ $sql = 'SELECT COUNT(l.log_id) AS total_entries
+ FROM ' . LOG_TABLE . ' l, ' . USERS_TABLE . " u
+ WHERE l.log_type = $log_type
+ AND l.user_id = u.user_id
+ AND l.log_time >= $limit_days
+ $sql_keywords
+ $sql_forum";
+ $result = $db->sql_query($sql);
+ $log_count = (int) $db->sql_fetchfield('total_entries');
+ $db->sql_freeresult($result);
+
+ return;
+}
+
+/**
+* Update foes - remove moderators and administrators from foe lists...
+*/
+function update_foes($group_id = false, $user_id = false)
+{
+ global $db, $auth;
+
+ // update foes for some user
+ if (is_array($user_id) && sizeof($user_id))
+ {
+ $sql = 'DELETE FROM ' . ZEBRA_TABLE . '
+ WHERE ' . $db->sql_in_set('zebra_id', $user_id) . '
+ AND foe = 1';
+ $db->sql_query($sql);
+ return;
+ }
+
+ // update foes for some group
+ if (is_array($group_id) && sizeof($group_id))
+ {
+ // Grab group settings...
+ $sql = $db->sql_build_query('SELECT', array(
+ 'SELECT' => 'a.group_id',
+
+ 'FROM' => array(
+ ACL_OPTIONS_TABLE => 'ao',
+ ACL_GROUPS_TABLE => 'a'
+ ),
+
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(ACL_ROLES_DATA_TABLE => 'r'),
+ 'ON' => 'a.auth_role_id = r.role_id'
+ ),
+ ),
+
+ 'WHERE' => '(ao.auth_option_id = a.auth_option_id OR ao.auth_option_id = r.auth_option_id)
+ AND ' . $db->sql_in_set('a.group_id', $group_id) . "
+ AND ao.auth_option IN ('a_', 'm_')",
+
+ 'GROUP_BY' => 'a.group_id'
+ ));
+ $result = $db->sql_query($sql);
+
+ $groups = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $groups[] = (int) $row['group_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($groups))
+ {
+ return;
+ }
+
+ switch ($db->sql_layer)
+ {
+ case 'mysqli':
+ case 'mysql4':
+ $sql = 'DELETE ' . (($db->sql_layer === 'mysqli' || version_compare($db->sql_server_info(true), '4.1', '>=')) ? 'z.*' : ZEBRA_TABLE) . '
+ FROM ' . ZEBRA_TABLE . ' z, ' . USER_GROUP_TABLE . ' ug
+ WHERE z.zebra_id = ug.user_id
+ AND z.foe = 1
+ AND ' . $db->sql_in_set('ug.group_id', $groups);
+ $db->sql_query($sql);
+ break;
+
+ default:
+ $sql = 'SELECT user_id
+ FROM ' . USER_GROUP_TABLE . '
+ WHERE ' . $db->sql_in_set('group_id', $groups);
+ $result = $db->sql_query($sql);
+
+ $users = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $users[] = (int) $row['user_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($users))
+ {
+ $sql = 'DELETE FROM ' . ZEBRA_TABLE . '
+ WHERE ' . $db->sql_in_set('zebra_id', $users) . '
+ AND foe = 1';
+ $db->sql_query($sql);
+ }
+ break;
+ }
+
+ return;
+ }
+
+ // update foes for everyone
+ $perms = array();
+ foreach ($auth->acl_get_list(false, array('a_', 'm_'), false) as $forum_id => $forum_ary)
+ {
+ foreach ($forum_ary as $auth_option => $user_ary)
+ {
+ $perms = array_merge($perms, $user_ary);
+ }
+ }
+
+ if (sizeof($perms))
+ {
+ $sql = 'DELETE FROM ' . ZEBRA_TABLE . '
+ WHERE ' . $db->sql_in_set('zebra_id', array_unique($perms)) . '
+ AND foe = 1';
+ $db->sql_query($sql);
+ }
+ unset($perms);
+}
+
+/**
+* Lists inactive users
+*/
+function view_inactive_users(&$users, &$user_count, $limit = 0, $offset = 0, $limit_days = 0, $sort_by = 'user_inactive_time DESC')
+{
+ global $db, $user;
+
+ $sql = 'SELECT COUNT(user_id) AS user_count
+ FROM ' . USERS_TABLE . '
+ WHERE user_type = ' . USER_INACTIVE .
+ (($limit_days) ? " AND user_inactive_time >= $limit_days" : '');
+ $result = $db->sql_query($sql);
+ $user_count = (int) $db->sql_fetchfield('user_count');
+ $db->sql_freeresult($result);
+
+ if ($offset >= $user_count)
+ {
+ $offset = ($offset - $limit < 0) ? 0 : $offset - $limit;
+ }
+
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . '
+ WHERE user_type = ' . USER_INACTIVE .
+ (($limit_days) ? " AND user_inactive_time >= $limit_days" : '') . "
+ ORDER BY $sort_by";
+ $result = $db->sql_query_limit($sql, $limit, $offset);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $row['inactive_reason'] = $user->lang['INACTIVE_REASON_UNKNOWN'];
+ switch ($row['user_inactive_reason'])
+ {
+ case INACTIVE_REGISTER:
+ $row['inactive_reason'] = $user->lang['INACTIVE_REASON_REGISTER'];
+ break;
+
+ case INACTIVE_PROFILE:
+ $row['inactive_reason'] = $user->lang['INACTIVE_REASON_PROFILE'];
+ break;
+
+ case INACTIVE_MANUAL:
+ $row['inactive_reason'] = $user->lang['INACTIVE_REASON_MANUAL'];
+ break;
+
+ case INACTIVE_REMIND:
+ $row['inactive_reason'] = $user->lang['INACTIVE_REASON_REMIND'];
+ break;
+ }
+
+ $users[] = $row;
+ }
+
+ return $offset;
+}
+
+/**
+* Lists warned users
+*/
+function view_warned_users(&$users, &$user_count, $limit = 0, $offset = 0, $limit_days = 0, $sort_by = 'user_warnings DESC')
+{
+ global $db;
+
+ $sql = 'SELECT user_id, username, user_colour, user_warnings, user_last_warning
+ FROM ' . USERS_TABLE . '
+ WHERE user_warnings > 0
+ ' . (($limit_days) ? "AND user_last_warning >= $limit_days" : '') . "
+ ORDER BY $sort_by";
+ $result = $db->sql_query_limit($sql, $limit, $offset);
+ $users = $db->sql_fetchrowset($result);
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT count(user_id) AS user_count
+ FROM ' . USERS_TABLE . '
+ WHERE user_warnings > 0
+ ' . (($limit_days) ? "AND user_last_warning >= $limit_days" : '');
+ $result = $db->sql_query($sql);
+ $user_count = (int) $db->sql_fetchfield('user_count');
+ $db->sql_freeresult($result);
+
+ return;
+}
+
+/**
+* Get database size
+* Currently only mysql and mssql are supported
+*/
+function get_database_size()
+{
+ global $db, $user, $table_prefix;
+
+ $database_size = false;
+
+ // This code is heavily influenced by a similar routine in phpMyAdmin 2.2.0
+ switch ($db->sql_layer)
+ {
+ case 'mysql':
+ case 'mysql4':
+ case 'mysqli':
+ $sql = 'SELECT VERSION() AS mysql_version';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ $version = $row['mysql_version'];
+
+ if (preg_match('#(3\.23|[45]\.)#', $version))
+ {
+ $db_name = (preg_match('#^(?:3\.23\.(?:[6-9]|[1-9]{2}))|[45]\.#', $version)) ? "`{$db->dbname}`" : $db->dbname;
+
+ $sql = 'SHOW TABLE STATUS
+ FROM ' . $db_name;
+ $result = $db->sql_query($sql, 7200);
+
+ $database_size = 0;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ((isset($row['Type']) && $row['Type'] != 'MRG_MyISAM') || (isset($row['Engine']) && ($row['Engine'] == 'MyISAM' || $row['Engine'] == 'InnoDB')))
+ {
+ if ($table_prefix != '')
+ {
+ if (strpos($row['Name'], $table_prefix) !== false)
+ {
+ $database_size += $row['Data_length'] + $row['Index_length'];
+ }
+ }
+ else
+ {
+ $database_size += $row['Data_length'] + $row['Index_length'];
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+ }
+ break;
+
+ case 'firebird':
+ global $dbname;
+
+ // if it on the local machine, we can get lucky
+ if (file_exists($dbname))
+ {
+ $database_size = filesize($dbname);
+ }
+
+ break;
+
+ case 'sqlite':
+ global $dbhost;
+
+ if (file_exists($dbhost))
+ {
+ $database_size = filesize($dbhost);
+ }
+
+ break;
+
+ case 'mssql':
+ case 'mssql_odbc':
+ $sql = 'SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize
+ FROM sysfiles';
+ $result = $db->sql_query($sql, 7200);
+ $database_size = ($row = $db->sql_fetchrow($result)) ? $row['dbsize'] : false;
+ $db->sql_freeresult($result);
+ break;
+
+ case 'postgres':
+ $sql = "SELECT proname
+ FROM pg_proc
+ WHERE proname = 'pg_database_size'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row['proname'] == 'pg_database_size')
+ {
+ $database = $db->dbname;
+ if (strpos($database, '.') !== false)
+ {
+ list($database, ) = explode('.', $database);
+ }
+
+ $sql = "SELECT oid
+ FROM pg_database
+ WHERE datname = '$database'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $oid = $row['oid'];
+
+ $sql = 'SELECT pg_database_size(' . $oid . ') as size';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $database_size = $row['size'];
+ }
+ break;
+
+ case 'oracle':
+ $sql = 'SELECT SUM(bytes) as dbsize
+ FROM user_segments';
+ $result = $db->sql_query($sql, 7200);
+ $database_size = ($row = $db->sql_fetchrow($result)) ? $row['dbsize'] : false;
+ $db->sql_freeresult($result);
+ break;
+ }
+
+ $database_size = ($database_size !== false) ? get_formatted_filesize($database_size) : $user->lang['NOT_AVAILABLE'];
+
+ return $database_size;
+}
+
+/**
+* Retrieve contents from remotely stored file
+*/
+function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port = 80, $timeout = 10)
+{
+ global $user;
+
+ if ($fsock = @fsockopen($host, $port, $errno, $errstr, $timeout))
+ {
+ @fputs($fsock, "GET $directory/$filename HTTP/1.1\r\n");
+ @fputs($fsock, "HOST: $host\r\n");
+ @fputs($fsock, "Connection: close\r\n\r\n");
+
+ $file_info = '';
+ $get_info = false;
+
+ while (!@feof($fsock))
+ {
+ if ($get_info)
+ {
+ $file_info .= @fread($fsock, 1024);
+ }
+ else
+ {
+ $line = @fgets($fsock, 1024);
+ if ($line == "\r\n")
+ {
+ $get_info = true;
+ }
+ else if (stripos($line, '404 not found') !== false)
+ {
+ $errstr = $user->lang['FILE_NOT_FOUND'] . ': ' . $filename;
+ return false;
+ }
+ }
+ }
+ @fclose($fsock);
+ }
+ else
+ {
+ if ($errstr)
+ {
+ $errstr = utf8_convert_message($errstr);
+ return false;
+ }
+ else
+ {
+ $errstr = $user->lang['FSOCK_DISABLED'];
+ return false;
+ }
+ }
+
+ return $file_info;
+}
+
+/**
+* Tidy Warnings
+* Remove all warnings which have now expired from the database
+* The duration of a warning can be defined by the administrator
+* This only removes the warning and reduces the associated count,
+* it does not remove the user note recording the contents of the warning
+*/
+function tidy_warnings()
+{
+ global $db, $config;
+
+ $expire_date = time() - ($config['warnings_expire_days'] * 86400);
+ $warning_list = $user_list = array();
+
+ $sql = 'SELECT * FROM ' . WARNINGS_TABLE . "
+ WHERE warning_time < $expire_date";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $warning_list[] = $row['warning_id'];
+ $user_list[$row['user_id']] = isset($user_list[$row['user_id']]) ? ++$user_list[$row['user_id']] : 1;
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($warning_list))
+ {
+ $db->sql_transaction('begin');
+
+ $sql = 'DELETE FROM ' . WARNINGS_TABLE . '
+ WHERE ' . $db->sql_in_set('warning_id', $warning_list);
+ $db->sql_query($sql);
+
+ foreach ($user_list as $user_id => $value)
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . " SET user_warnings = user_warnings - $value
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
+ }
+
+ $db->sql_transaction('commit');
+ }
+
+ set_config('warnings_last_gc', time(), true);
+}
+
+/**
+* Tidy database, doing some maintanance tasks
+*/
+function tidy_database()
+{
+ global $db;
+
+ // Here we check permission consistency
+
+ // Sometimes, it can happen permission tables having forums listed which do not exist
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE;
+ $result = $db->sql_query($sql);
+
+ $forum_ids = array(0);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_ids[] = $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // Delete those rows from the acl tables not having listed the forums above
+ $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_ids, true);
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_ids, true);
+ $db->sql_query($sql);
+
+ set_config('database_last_gc', time(), true);
+}
+
+/**
+* Add permission language - this will make sure custom files will be included
+*/
+function add_permission_language()
+{
+ global $user, $phpEx;
+
+ // First of all, our own file. We need to include it as the first file because it presets all relevant variables.
+ $user->add_lang('acp/permissions_phpbb');
+
+ $files_to_add = array();
+
+ // Now search in acp and mods folder for permissions_ files.
+ foreach (array('acp/', 'mods/') as $path)
+ {
+ $dh = @opendir($user->lang_path . $user->lang_name . '/' . $path);
+
+ if ($dh)
+ {
+ while (($file = readdir($dh)) !== false)
+ {
+ if ($file !== 'permissions_phpbb.' . $phpEx && strpos($file, 'permissions_') === 0 && substr($file, -(strlen($phpEx) + 1)) === '.' . $phpEx)
+ {
+ $files_to_add[] = $path . substr($file, 0, -(strlen($phpEx) + 1));
+ }
+ }
+ closedir($dh);
+ }
+ }
+
+ if (!sizeof($files_to_add))
+ {
+ return false;
+ }
+
+ $user->add_lang($files_to_add);
+ return true;
+}
+
+/**
+ * Obtains the latest version information
+ *
+ * @param bool $force_update Ignores cached data. Defaults to false.
+ * @param bool $warn_fail Trigger a warning if obtaining the latest version information fails. Defaults to false.
+ * @param int $ttl Cache version information for $ttl seconds. Defaults to 86400 (24 hours).
+ *
+ * @return string | false Version info on success, false on failure.
+ */
+function obtain_latest_version_info($force_update = false, $warn_fail = false, $ttl = 86400)
+{
+ global $cache;
+
+ $info = $cache->get('versioncheck');
+
+ if ($info === false || $force_update)
+ {
+ $errstr = '';
+ $errno = 0;
+
+ $info = get_remote_file('www.phpbb.com', '/updatecheck',
+ ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno);
+
+ if ($info === false)
+ {
+ $cache->destroy('versioncheck');
+ if ($warn_fail)
+ {
+ trigger_error($errstr, E_USER_WARNING);
+ }
+ return false;
+ }
+
+ $cache->put('versioncheck', $info, $ttl);
+ }
+
+ return $info;
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php
new file mode 100644
index 0000000000..590daabf1d
--- /dev/null
+++ b/phpBB/includes/functions_compress.php
@@ -0,0 +1,723 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Class for handling archives (compression/decompression)
+* @package phpBB3
+*/
+class compress
+{
+ var $fp = 0;
+
+ /**
+ * Add file to archive
+ */
+ function add_file($src, $src_rm_prefix = '', $src_add_prefix = '', $skip_files = '')
+ {
+ global $phpbb_root_path;
+
+ $skip_files = explode(',', $skip_files);
+
+ // Remove rm prefix from src path
+ $src_path = ($src_rm_prefix) ? preg_replace('#^(' . preg_quote($src_rm_prefix, '#') . ')#', '', $src) : $src;
+ // Add src prefix
+ $src_path = ($src_add_prefix) ? ($src_add_prefix . ((substr($src_add_prefix, -1) != '/') ? '/' : '') . $src_path) : $src_path;
+ // Remove initial "/" if present
+ $src_path = (substr($src_path, 0, 1) == '/') ? substr($src_path, 1) : $src_path;
+
+ if (is_file($phpbb_root_path . $src))
+ {
+ $this->data($src_path, file_get_contents("$phpbb_root_path$src"), false, stat("$phpbb_root_path$src"));
+ }
+ else if (is_dir($phpbb_root_path . $src))
+ {
+ // Clean up path, add closing / if not present
+ $src_path = ($src_path && substr($src_path, -1) != '/') ? $src_path . '/' : $src_path;
+
+ $filelist = array();
+ $filelist = filelist("$phpbb_root_path$src", '', '*');
+ krsort($filelist);
+
+ if ($src_path)
+ {
+ $this->data($src_path, '', true, stat("$phpbb_root_path$src"));
+ }
+
+ foreach ($filelist as $path => $file_ary)
+ {
+ if ($path)
+ {
+ // Same as for src_path
+ $path = (substr($path, 0, 1) == '/') ? substr($path, 1) : $path;
+ $path = ($path && substr($path, -1) != '/') ? $path . '/' : $path;
+
+ $this->data("$src_path$path", '', true, stat("$phpbb_root_path$src$path"));
+ }
+
+ foreach ($file_ary as $file)
+ {
+ if (in_array($path . $file, $skip_files))
+ {
+ continue;
+ }
+
+ $this->data("$src_path$path$file", file_get_contents("$phpbb_root_path$src$path$file"), false, stat("$phpbb_root_path$src$path$file"));
+ }
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Add custom file (the filepath will not be adjusted)
+ */
+ function add_custom_file($src, $filename)
+ {
+ $this->data($filename, file_get_contents($src), false, stat($src));
+ return true;
+ }
+
+ /**
+ * Add file data
+ */
+ function add_data($src, $name)
+ {
+ $stat = array();
+ $stat[2] = 436; //384
+ $stat[4] = $stat[5] = 0;
+ $stat[7] = strlen($src);
+ $stat[9] = time();
+ $this->data($name, $src, false, $stat);
+ return true;
+ }
+
+ /**
+ * Return available methods
+ */
+ function methods()
+ {
+ $methods = array('.tar');
+ $available_methods = array('.tar.gz' => 'zlib', '.tar.bz2' => 'bz2', '.zip' => 'zlib');
+
+ foreach ($available_methods as $type => $module)
+ {
+ if (!@extension_loaded($module))
+ {
+ continue;
+ }
+ $methods[] = $type;
+ }
+
+ return $methods;
+ }
+}
+
+/**
+* Zip creation class from phpMyAdmin 2.3.0 (c) Tobias Ratschiller, Olivier Müller, Loïc Chapeaux,
+* Marc Delisle, http://www.phpmyadmin.net/
+*
+* Zip extraction function by Alexandre Tedeschi, alexandrebr at gmail dot com
+*
+* Modified extensively by psoTFX and DavidMJ, (c) phpBB Group, 2003
+*
+* Based on work by Eric Mueller and Denis125
+* Official ZIP file format: http://www.pkware.com/appnote.txt
+*
+* @package phpBB3
+*/
+class compress_zip extends compress
+{
+ var $datasec = array();
+ var $ctrl_dir = array();
+ var $eof_cdh = "\x50\x4b\x05\x06\x00\x00\x00\x00";
+
+ var $old_offset = 0;
+ var $datasec_len = 0;
+
+ /**
+ * Constructor
+ */
+ function compress_zip($mode, $file)
+ {
+ $this->fp = @fopen($file, $mode . 'b');
+
+ if (!$this->fp)
+ {
+ trigger_error('Unable to open file ' . $file . ' [' . $mode . 'b]');
+ }
+ }
+
+ /**
+ * Convert unix to dos time
+ */
+ function unix_to_dos_time($time)
+ {
+ $timearray = (!$time) ? getdate() : getdate($time);
+
+ if ($timearray['year'] < 1980)
+ {
+ $timearray['year'] = 1980;
+ $timearray['mon'] = $timearray['mday'] = 1;
+ $timearray['hours'] = $timearray['minutes'] = $timearray['seconds'] = 0;
+ }
+
+ return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) | ($timearray['hours'] << 11) | ($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1);
+ }
+
+ /**
+ * Extract archive
+ */
+ function extract($dst)
+ {
+ // Loop the file, looking for files and folders
+ $dd_try = false;
+ rewind($this->fp);
+
+ while (!feof($this->fp))
+ {
+ // Check if the signature is valid...
+ $signature = fread($this->fp, 4);
+
+ switch ($signature)
+ {
+ // 'Local File Header'
+ case "\x50\x4b\x03\x04":
+ // Lets get everything we need.
+ // We don't store the version needed to extract, the general purpose bit flag or the date and time fields
+ $data = unpack("@4/vc_method/@10/Vcrc/Vc_size/Vuc_size/vname_len/vextra_field", fread($this->fp, 26));
+ $file_name = fread($this->fp, $data['name_len']); // filename
+
+ if ($data['extra_field'])
+ {
+ fread($this->fp, $data['extra_field']); // extra field
+ }
+
+ $target_filename = "$dst$file_name";
+
+ if (!$data['uc_size'] && !$data['crc'] && substr($file_name, -1, 1) == '/')
+ {
+ if (!is_dir($target_filename))
+ {
+ $str = '';
+ $folders = explode('/', $target_filename);
+
+ // Create and folders and subfolders if they do not exist
+ foreach ($folders as $folder)
+ {
+ $folder = trim($folder);
+ if (!$folder)
+ {
+ continue;
+ }
+
+ $str = (!empty($str)) ? $str . '/' . $folder : $folder;
+ if (!is_dir($str))
+ {
+ if (!@mkdir($str, 0777))
+ {
+ trigger_error("Could not create directory $folder");
+ }
+ phpbb_chmod($str, CHMOD_READ | CHMOD_WRITE);
+ }
+ }
+ }
+ // This is a directory, we are not writting files
+ continue;
+ }
+ else
+ {
+ // Some archivers are punks, they don't include folders in their archives!
+ $str = '';
+ $folders = explode('/', pathinfo($target_filename, PATHINFO_DIRNAME));
+
+ // Create and folders and subfolders if they do not exist
+ foreach ($folders as $folder)
+ {
+ $folder = trim($folder);
+ if (!$folder)
+ {
+ continue;
+ }
+
+ $str = (!empty($str)) ? $str . '/' . $folder : $folder;
+ if (!is_dir($str))
+ {
+ if (!@mkdir($str, 0777))
+ {
+ trigger_error("Could not create directory $folder");
+ }
+ phpbb_chmod($str, CHMOD_READ | CHMOD_WRITE);
+ }
+ }
+ }
+
+ if (!$data['uc_size'])
+ {
+ $content = '';
+ }
+ else
+ {
+ $content = fread($this->fp, $data['c_size']);
+ }
+
+ $fp = fopen($target_filename, "w");
+
+ switch ($data['c_method'])
+ {
+ case 0:
+ // Not compressed
+ fwrite($fp, $content);
+ break;
+
+ case 8:
+ // Deflate
+ fwrite($fp, gzinflate($content, $data['uc_size']));
+ break;
+
+ case 12:
+ // Bzip2
+ fwrite($fp, bzdecompress($content));
+ break;
+ }
+
+ fclose($fp);
+ break;
+
+ // We hit the 'Central Directory Header', we can stop because nothing else in here requires our attention
+ // or we hit the end of the central directory record, we can safely end the loop as we are totally finished with looking for files and folders
+ case "\x50\x4b\x01\x02":
+ // This case should simply never happen.. but it does exist..
+ case "\x50\x4b\x05\x06":
+ break 2;
+
+ // 'Packed to Removable Disk', ignore it and look for the next signature...
+ case 'PK00':
+ continue 2;
+
+ // We have encountered a header that is weird. Lets look for better data...
+ default:
+ if (!$dd_try)
+ {
+ // Unexpected header. Trying to detect wrong placed 'Data Descriptor';
+ $dd_try = true;
+ fseek($this->fp, 8, SEEK_CUR); // Jump over 'crc-32'(4) 'compressed-size'(4), 'uncompressed-size'(4)
+ continue 2;
+ }
+ trigger_error("Unexpected header, ending loop");
+ break 2;
+ }
+
+ $dd_try = false;
+ }
+ }
+
+ /**
+ * Close archive
+ */
+ function close()
+ {
+ // Write out central file directory and footer ... if it exists
+ if (sizeof($this->ctrl_dir))
+ {
+ fwrite($this->fp, $this->file());
+ }
+ fclose($this->fp);
+ }
+
+ /**
+ * Create the structures ... note we assume version made by is MSDOS
+ */
+ function data($name, $data, $is_dir = false, $stat)
+ {
+ $name = str_replace('\\', '/', $name);
+
+ $hexdtime = pack('V', $this->unix_to_dos_time($stat[9]));
+
+ if ($is_dir)
+ {
+ $unc_len = $c_len = $crc = 0;
+ $zdata = '';
+ $var_ext = 10;
+ }
+ else
+ {
+ $unc_len = strlen($data);
+ $crc = crc32($data);
+ $zdata = gzdeflate($data);
+ $c_len = strlen($zdata);
+ $var_ext = 20;
+
+ // Did we compress? No, then use data as is
+ if ($c_len >= $unc_len)
+ {
+ $zdata = $data;
+ $c_len = $unc_len;
+ $var_ext = 10;
+ }
+ }
+ unset($data);
+
+ // If we didn't compress set method to store, else deflate
+ $c_method = ($c_len == $unc_len) ? "\x00\x00" : "\x08\x00";
+
+ // Are we a file or a directory? Set archive for file
+ $attrib = ($is_dir) ? 16 : 32;
+
+ // File Record Header
+ $fr = "\x50\x4b\x03\x04"; // Local file header 4bytes
+ $fr .= pack('v', $var_ext); // ver needed to extract 2bytes
+ $fr .= "\x00\x00"; // gen purpose bit flag 2bytes
+ $fr .= $c_method; // compression method 2bytes
+ $fr .= $hexdtime; // last mod time and date 2+2bytes
+ $fr .= pack('V', $crc); // crc32 4bytes
+ $fr .= pack('V', $c_len); // compressed filesize 4bytes
+ $fr .= pack('V', $unc_len); // uncompressed filesize 4bytes
+ $fr .= pack('v', strlen($name));// length of filename 2bytes
+
+ $fr .= pack('v', 0); // extra field length 2bytes
+ $fr .= $name;
+ $fr .= $zdata;
+ unset($zdata);
+
+ $this->datasec_len += strlen($fr);
+
+ // Add data to file ... by writing data out incrementally we save some memory
+ fwrite($this->fp, $fr);
+ unset($fr);
+
+ // Central Directory Header
+ $cdrec = "\x50\x4b\x01\x02"; // header 4bytes
+ $cdrec .= "\x00\x00"; // version made by
+ $cdrec .= pack('v', $var_ext); // version needed to extract
+ $cdrec .= "\x00\x00"; // gen purpose bit flag
+ $cdrec .= $c_method; // compression method
+ $cdrec .= $hexdtime; // last mod time & date
+ $cdrec .= pack('V', $crc); // crc32
+ $cdrec .= pack('V', $c_len); // compressed filesize
+ $cdrec .= pack('V', $unc_len); // uncompressed filesize
+ $cdrec .= pack('v', strlen($name)); // length of filename
+ $cdrec .= pack('v', 0); // extra field length
+ $cdrec .= pack('v', 0); // file comment length
+ $cdrec .= pack('v', 0); // disk number start
+ $cdrec .= pack('v', 0); // internal file attributes
+ $cdrec .= pack('V', $attrib); // external file attributes
+ $cdrec .= pack('V', $this->old_offset); // relative offset of local header
+ $cdrec .= $name;
+
+ // Save to central directory
+ $this->ctrl_dir[] = $cdrec;
+
+ $this->old_offset = $this->datasec_len;
+ }
+
+ /**
+ * file
+ */
+ function file()
+ {
+ $ctrldir = implode('', $this->ctrl_dir);
+
+ return $ctrldir . $this->eof_cdh .
+ pack('v', sizeof($this->ctrl_dir)) . // total # of entries "on this disk"
+ pack('v', sizeof($this->ctrl_dir)) . // total # of entries overall
+ pack('V', strlen($ctrldir)) . // size of central dir
+ pack('V', $this->datasec_len) . // offset to start of central dir
+ "\x00\x00"; // .zip file comment length
+ }
+
+ /**
+ * Download archive
+ */
+ function download($filename, $download_name = false)
+ {
+ global $phpbb_root_path;
+
+ if ($download_name === false)
+ {
+ $download_name = $filename;
+ }
+
+ $mimetype = 'application/zip';
+
+ header('Pragma: no-cache');
+ header("Content-Type: $mimetype; name=\"$download_name.zip\"");
+ header("Content-disposition: attachment; filename=$download_name.zip");
+
+ $fp = @fopen("{$phpbb_root_path}store/$filename.zip", 'rb');
+ if ($fp)
+ {
+ while ($buffer = fread($fp, 1024))
+ {
+ echo $buffer;
+ }
+ fclose($fp);
+ }
+ }
+}
+
+/**
+* Tar/tar.gz compression routine
+* Header/checksum creation derived from tarfile.pl, (c) Tom Horsley, 1994
+*
+* @package phpBB3
+*/
+class compress_tar extends compress
+{
+ var $isgz = false;
+ var $isbz = false;
+ var $filename = '';
+ var $mode = '';
+ var $type = '';
+ var $wrote = false;
+
+ /**
+ * Constructor
+ */
+ function compress_tar($mode, $file, $type = '')
+ {
+ $type = (!$type) ? $file : $type;
+ $this->isgz = (strpos($type, '.tar.gz') !== false || strpos($type, '.tgz') !== false) ? true : false;
+ $this->isbz = (strpos($type, '.tar.bz2') !== false) ? true : false;
+
+ $this->mode = &$mode;
+ $this->file = &$file;
+ $this->type = &$type;
+ $this->open();
+ }
+
+ /**
+ * Extract archive
+ */
+ function extract($dst)
+ {
+ $fzread = ($this->isbz && function_exists('bzread')) ? 'bzread' : (($this->isgz && @extension_loaded('zlib')) ? 'gzread' : 'fread');
+
+ // Run through the file and grab directory entries
+ while ($buffer = $fzread($this->fp, 512))
+ {
+ $tmp = unpack('A6magic', substr($buffer, 257, 6));
+
+ if (trim($tmp['magic']) == 'ustar')
+ {
+ $tmp = unpack('A100name', $buffer);
+ $filename = trim($tmp['name']);
+
+ $tmp = unpack('Atype', substr($buffer, 156, 1));
+ $filetype = (int) trim($tmp['type']);
+
+ $tmp = unpack('A12size', substr($buffer, 124, 12));
+ $filesize = octdec((int) trim($tmp['size']));
+
+ $target_filename = "$dst$filename";
+
+ if ($filetype == 5)
+ {
+ if (!is_dir($target_filename))
+ {
+ $str = '';
+ $folders = explode('/', $target_filename);
+
+ // Create and folders and subfolders if they do not exist
+ foreach ($folders as $folder)
+ {
+ $folder = trim($folder);
+ if (!$folder)
+ {
+ continue;
+ }
+
+ $str = (!empty($str)) ? $str . '/' . $folder : $folder;
+ if (!is_dir($str))
+ {
+ if (!@mkdir($str, 0777))
+ {
+ trigger_error("Could not create directory $folder");
+ }
+ phpbb_chmod($str, CHMOD_READ | CHMOD_WRITE);
+ }
+ }
+ }
+ }
+ else if ($filesize >= 0 && ($filetype == 0 || $filetype == "\0"))
+ {
+ // Some archivers are punks, they don't properly order the folders in their archives!
+ $str = '';
+ $folders = explode('/', pathinfo($target_filename, PATHINFO_DIRNAME));
+
+ // Create and folders and subfolders if they do not exist
+ foreach ($folders as $folder)
+ {
+ $folder = trim($folder);
+ if (!$folder)
+ {
+ continue;
+ }
+
+ $str = (!empty($str)) ? $str . '/' . $folder : $folder;
+ if (!is_dir($str))
+ {
+ if (!@mkdir($str, 0777))
+ {
+ trigger_error("Could not create directory $folder");
+ }
+ phpbb_chmod($str, CHMOD_READ | CHMOD_WRITE);
+ }
+ }
+
+ // Write out the files
+ if (!($fp = fopen($target_filename, 'wb')))
+ {
+ trigger_error("Couldn't create file $filename");
+ }
+ phpbb_chmod($target_filename, CHMOD_READ);
+
+ // Grab the file contents
+ fwrite($fp, ($filesize) ? $fzread($this->fp, ($filesize + 511) &~ 511) : '', $filesize);
+ fclose($fp);
+ }
+ }
+ }
+ }
+
+ /**
+ * Close archive
+ */
+ function close()
+ {
+ $fzclose = ($this->isbz && function_exists('bzclose')) ? 'bzclose' : (($this->isgz && @extension_loaded('zlib')) ? 'gzclose' : 'fclose');
+
+ if ($this->wrote)
+ {
+ $fzwrite = ($this->isbz && function_exists('bzwrite')) ? 'bzwrite' : (($this->isgz && @extension_loaded('zlib')) ? 'gzwrite' : 'fwrite');
+
+ // The end of a tar archive ends in two records of all NULLs (1024 bytes of \0)
+ $fzwrite($this->fp, str_repeat("\0", 1024));
+ }
+
+ $fzclose($this->fp);
+ }
+
+ /**
+ * Create the structures
+ */
+ function data($name, $data, $is_dir = false, $stat)
+ {
+ $this->wrote = true;
+ $fzwrite = ($this->isbz && function_exists('bzwrite')) ? 'bzwrite' : (($this->isgz && @extension_loaded('zlib')) ? 'gzwrite' : 'fwrite');
+
+ $typeflag = ($is_dir) ? '5' : '';
+
+ // This is the header data, it contains all the info we know about the file or folder that we are about to archive
+ $header = '';
+ $header .= pack('a100', $name); // file name
+ $header .= pack('a8', sprintf("%07o", $stat[2])); // file mode
+ $header .= pack('a8', sprintf("%07o", $stat[4])); // owner id
+ $header .= pack('a8', sprintf("%07o", $stat[5])); // group id
+ $header .= pack('a12', sprintf("%011o", $stat[7])); // file size
+ $header .= pack('a12', sprintf("%011o", $stat[9])); // last mod time
+
+ // Checksum
+ $checksum = 0;
+ for ($i = 0; $i < 148; $i++)
+ {
+ $checksum += ord($header[$i]);
+ }
+
+ // We precompute the rest of the hash, this saves us time in the loop and allows us to insert our hash without resorting to string functions
+ $checksum += 2415 + (($is_dir) ? 53 : 0);
+
+ $header .= pack('a8', sprintf("%07o", $checksum)); // checksum
+ $header .= pack('a1', $typeflag); // link indicator
+ $header .= pack('a100', ''); // name of linked file
+ $header .= pack('a6', 'ustar'); // ustar indicator
+ $header .= pack('a2', '00'); // ustar version
+ $header .= pack('a32', 'Unknown'); // owner name
+ $header .= pack('a32', 'Unknown'); // group name
+ $header .= pack('a8', ''); // device major number
+ $header .= pack('a8', ''); // device minor number
+ $header .= pack('a155', ''); // filename prefix
+ $header .= pack('a12', ''); // end
+
+ // This writes the entire file in one shot. Header, followed by data and then null padded to a multiple of 512
+ $fzwrite($this->fp, $header . (($stat[7] !== 0 && !$is_dir) ? $data . str_repeat("\0", (($stat[7] + 511) &~ 511) - $stat[7]) : ''));
+ unset($data);
+ }
+
+ /**
+ * Open archive
+ */
+ function open()
+ {
+ $fzopen = ($this->isbz && function_exists('bzopen')) ? 'bzopen' : (($this->isgz && @extension_loaded('zlib')) ? 'gzopen' : 'fopen');
+ $this->fp = @$fzopen($this->file, $this->mode . (($fzopen == 'bzopen') ? '' : 'b') . (($fzopen == 'gzopen') ? '9' : ''));
+
+ if (!$this->fp)
+ {
+ trigger_error('Unable to open file ' . $this->file . ' [' . $fzopen . ' - ' . $this->mode . 'b]');
+ }
+ }
+
+ /**
+ * Download archive
+ */
+ function download($filename, $download_name = false)
+ {
+ global $phpbb_root_path;
+
+ if ($download_name === false)
+ {
+ $download_name = $filename;
+ }
+
+ switch ($this->type)
+ {
+ case '.tar':
+ $mimetype = 'application/x-tar';
+ break;
+
+ case '.tar.gz':
+ $mimetype = 'application/x-gzip';
+ break;
+
+ case '.tar.bz2':
+ $mimetype = 'application/x-bzip2';
+ break;
+
+ default:
+ $mimetype = 'application/octet-stream';
+ break;
+ }
+
+ header('Pragma: no-cache');
+ header("Content-Type: $mimetype; name=\"$download_name$this->type\"");
+ header("Content-disposition: attachment; filename=$download_name$this->type");
+
+ $fp = @fopen("{$phpbb_root_path}store/$filename$this->type", 'rb');
+ if ($fp)
+ {
+ while ($buffer = fread($fp, 1024))
+ {
+ echo $buffer;
+ }
+ fclose($fp);
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
new file mode 100644
index 0000000000..c265d0ae41
--- /dev/null
+++ b/phpBB/includes/functions_content.php
@@ -0,0 +1,1357 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* gen_sort_selects()
+* make_jumpbox()
+* bump_topic_allowed()
+* get_context()
+* decode_message()
+* strip_bbcode()
+* generate_text_for_display()
+* generate_text_for_storage()
+* generate_text_for_edit()
+* make_clickable_callback()
+* make_clickable()
+* censor_text()
+* bbcode_nl2br()
+* smiley_text()
+* parse_attachments()
+* extension_allowed()
+* truncate_string()
+* get_username_string()
+* class bitfield
+*/
+
+/**
+* Generate sort selection fields
+*/
+function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key, &$sort_dir, &$s_limit_days, &$s_sort_key, &$s_sort_dir, &$u_sort_param, $def_st = false, $def_sk = false, $def_sd = false)
+{
+ global $user;
+
+ $sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
+
+ $sorts = array(
+ 'st' => array(
+ 'key' => 'sort_days',
+ 'default' => $def_st,
+ 'options' => $limit_days,
+ 'output' => &$s_limit_days,
+ ),
+
+ 'sk' => array(
+ 'key' => 'sort_key',
+ 'default' => $def_sk,
+ 'options' => $sort_by_text,
+ 'output' => &$s_sort_key,
+ ),
+
+ 'sd' => array(
+ 'key' => 'sort_dir',
+ 'default' => $def_sd,
+ 'options' => $sort_dir_text,
+ 'output' => &$s_sort_dir,
+ ),
+ );
+ $u_sort_param = '';
+
+ foreach ($sorts as $name => $sort_ary)
+ {
+ $key = $sort_ary['key'];
+ $selected = $$sort_ary['key'];
+
+ // Check if the key is selectable. If not, we reset to the default or first key found.
+ // This ensures the values are always valid. We also set $sort_dir/sort_key/etc. to the
+ // correct value, else the protection is void. ;)
+ if (!isset($sort_ary['options'][$selected]))
+ {
+ if ($sort_ary['default'] !== false)
+ {
+ $selected = $$key = $sort_ary['default'];
+ }
+ else
+ {
+ @reset($sort_ary['options']);
+ $selected = $$key = key($sort_ary['options']);
+ }
+ }
+
+ $sort_ary['output'] = '<select name="' . $name . '" id="' . $name . '">';
+ foreach ($sort_ary['options'] as $option => $text)
+ {
+ $sort_ary['output'] .= '<option value="' . $option . '"' . (($selected == $option) ? ' selected="selected"' : '') . '>' . $text . '</option>';
+ }
+ $sort_ary['output'] .= '</select>';
+
+ $u_sort_param .= ($selected !== $sort_ary['default']) ? ((strlen($u_sort_param)) ? '&amp;' : '') . "{$name}={$selected}" : '';
+ }
+
+ return;
+}
+
+/**
+* Generate Jumpbox
+*/
+function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list = false, $force_display = false)
+{
+ global $config, $auth, $template, $user, $db;
+
+ // We only return if the jumpbox is not forced to be displayed (in case it is needed for functionality)
+ if (!$config['load_jumpbox'] && $force_display === false)
+ {
+ return;
+ }
+
+ $sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id
+ FROM ' . FORUMS_TABLE . '
+ ORDER BY left_id ASC';
+ $result = $db->sql_query($sql, 600);
+
+ $right = $padding = 0;
+ $padding_store = array('0' => 0);
+ $display_jumpbox = false;
+ $iteration = 0;
+
+ // Sometimes it could happen that forums will be displayed here not be displayed within the index page
+ // This is the result of forums not displayed at index, having list permissions and a parent of a forum with no permissions.
+ // If this happens, the padding could be "broken"
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['left_id'] < $right)
+ {
+ $padding++;
+ $padding_store[$row['parent_id']] = $padding;
+ }
+ else if ($row['left_id'] > $right + 1)
+ {
+ // Ok, if the $padding_store for this parent is empty there is something wrong. For now we will skip over it.
+ // @todo digging deep to find out "how" this can happen.
+ $padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : $padding;
+ }
+
+ $right = $row['right_id'];
+
+ if ($row['forum_type'] == FORUM_CAT && ($row['left_id'] + 1 == $row['right_id']))
+ {
+ // Non-postable forum with no subforums, don't display
+ continue;
+ }
+
+ if (!$auth->acl_get('f_list', $row['forum_id']))
+ {
+ // if the user does not have permissions to list this forum skip
+ continue;
+ }
+
+ if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
+ {
+ continue;
+ }
+
+ if (!$display_jumpbox)
+ {
+ $template->assign_block_vars('jumpbox_forums', array(
+ 'FORUM_ID' => ($select_all) ? 0 : -1,
+ 'FORUM_NAME' => ($select_all) ? $user->lang['ALL_FORUMS'] : $user->lang['SELECT_FORUM'],
+ 'S_FORUM_COUNT' => $iteration)
+ );
+
+ $iteration++;
+ $display_jumpbox = true;
+ }
+
+ $template->assign_block_vars('jumpbox_forums', array(
+ 'FORUM_ID' => $row['forum_id'],
+ 'FORUM_NAME' => $row['forum_name'],
+ 'SELECTED' => ($row['forum_id'] == $forum_id) ? ' selected="selected"' : '',
+ 'S_FORUM_COUNT' => $iteration,
+ 'S_IS_CAT' => ($row['forum_type'] == FORUM_CAT) ? true : false,
+ 'S_IS_LINK' => ($row['forum_type'] == FORUM_LINK) ? true : false,
+ 'S_IS_POST' => ($row['forum_type'] == FORUM_POST) ? true : false)
+ );
+
+ for ($i = 0; $i < $padding; $i++)
+ {
+ $template->assign_block_vars('jumpbox_forums.level', array());
+ }
+ $iteration++;
+ }
+ $db->sql_freeresult($result);
+ unset($padding_store);
+
+ $template->assign_vars(array(
+ 'S_DISPLAY_JUMPBOX' => $display_jumpbox,
+ 'S_JUMPBOX_ACTION' => $action)
+ );
+
+ return;
+}
+
+/**
+* Bump Topic Check - used by posting and viewtopic
+*/
+function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_poster, $last_topic_poster)
+{
+ global $config, $auth, $user;
+
+ // Check permission and make sure the last post was not already bumped
+ if (!$auth->acl_get('f_bump', $forum_id) || $topic_bumped)
+ {
+ return false;
+ }
+
+ // Check bump time range, is the user really allowed to bump the topic at this time?
+ $bump_time = ($config['bump_type'] == 'm') ? $config['bump_interval'] * 60 : (($config['bump_type'] == 'h') ? $config['bump_interval'] * 3600 : $config['bump_interval'] * 86400);
+
+ // Check bump time
+ if ($last_post_time + $bump_time > time())
+ {
+ return false;
+ }
+
+ // Check bumper, only topic poster and last poster are allowed to bump
+ if ($topic_poster != $user->data['user_id'] && $last_topic_poster != $user->data['user_id'])
+ {
+ return false;
+ }
+
+ // A bump time of 0 will completely disable the bump feature... not intended but might be useful.
+ return $bump_time;
+}
+
+/**
+* Generates a text with approx. the specified length which contains the specified words and their context
+*
+* @param string $text The full text from which context shall be extracted
+* @param string $words An array of words which should be contained in the result, has to be a valid part of a PCRE pattern (escape with preg_quote!)
+* @param int $length The desired length of the resulting text, however the result might be shorter or longer than this value
+*
+* @return string Context of the specified words separated by "..."
+*/
+function get_context($text, $words, $length = 400)
+{
+ // first replace all whitespaces with single spaces
+ $text = preg_replace('/ +/', ' ', strtr($text, "\t\n\r\x0C ", ' '));
+
+ // we need to turn the entities back into their original form, to not cut the message in between them
+ $entities = array('&lt;', '&gt;', '&#91;', '&#93;', '&#46;', '&#58;', '&#058;');
+ $characters = array('<', '>', '[', ']', '.', ':', ':');
+ $text = str_replace($entities, $characters, $text);
+
+ $word_indizes = array();
+ if (sizeof($words))
+ {
+ $match = '';
+ // find the starting indizes of all words
+ foreach ($words as $word)
+ {
+ if ($word)
+ {
+ if (preg_match('#(?:[^\w]|^)(' . $word . ')(?:[^\w]|$)#i', $text, $match))
+ {
+ if (empty($match[1]))
+ {
+ continue;
+ }
+
+ $pos = utf8_strpos($text, $match[1]);
+ if ($pos !== false)
+ {
+ $word_indizes[] = $pos;
+ }
+ }
+ }
+ }
+ unset($match);
+
+ if (sizeof($word_indizes))
+ {
+ $word_indizes = array_unique($word_indizes);
+ sort($word_indizes);
+
+ $wordnum = sizeof($word_indizes);
+ // number of characters on the right and left side of each word
+ $sequence_length = (int) ($length / (2 * $wordnum)) - 2;
+ $final_text = '';
+ $word = $j = 0;
+ $final_text_index = -1;
+
+ // cycle through every character in the original text
+ for ($i = $word_indizes[$word], $n = utf8_strlen($text); $i < $n; $i++)
+ {
+ // if the current position is the start of one of the words then append $sequence_length characters to the final text
+ if (isset($word_indizes[$word]) && ($i == $word_indizes[$word]))
+ {
+ if ($final_text_index < $i - $sequence_length - 1)
+ {
+ $final_text .= '... ' . preg_replace('#^([^ ]*)#', '', utf8_substr($text, $i - $sequence_length, $sequence_length));
+ }
+ else
+ {
+ // if the final text is already nearer to the current word than $sequence_length we only append the text
+ // from its current index on and distribute the unused length to all other sequenes
+ $sequence_length += (int) (($final_text_index - $i + $sequence_length + 1) / (2 * $wordnum));
+ $final_text .= utf8_substr($text, $final_text_index + 1, $i - $final_text_index - 1);
+ }
+ $final_text_index = $i - 1;
+
+ // add the following characters to the final text (see below)
+ $word++;
+ $j = 1;
+ }
+
+ if ($j > 0)
+ {
+ // add the character to the final text and increment the sequence counter
+ $final_text .= utf8_substr($text, $i, 1);
+ $final_text_index++;
+ $j++;
+
+ // if this is a whitespace then check whether we are done with this sequence
+ if (utf8_substr($text, $i, 1) == ' ')
+ {
+ // only check whether we have to exit the context generation completely if we haven't already reached the end anyway
+ if ($i + 4 < $n)
+ {
+ if (($j > $sequence_length && $word >= $wordnum) || utf8_strlen($final_text) > $length)
+ {
+ $final_text .= ' ...';
+ break;
+ }
+ }
+ else
+ {
+ // make sure the text really reaches the end
+ $j -= 4;
+ }
+
+ // stop context generation and wait for the next word
+ if ($j > $sequence_length)
+ {
+ $j = 0;
+ }
+ }
+ }
+ }
+ return str_replace($characters, $entities, $final_text);
+ }
+ }
+
+ if (!sizeof($words) || !sizeof($word_indizes))
+ {
+ return str_replace($characters, $entities, ((utf8_strlen($text) >= $length + 3) ? utf8_substr($text, 0, $length) . '...' : $text));
+ }
+}
+
+/**
+* Decode text whereby text is coming from the db and expected to be pre-parsed content
+* We are placing this outside of the message parser because we are often in need of it...
+*/
+function decode_message(&$message, $bbcode_uid = '')
+{
+ global $config;
+
+ if ($bbcode_uid)
+ {
+ $match = array('<br />', "[/*:m:$bbcode_uid]", ":u:$bbcode_uid", ":o:$bbcode_uid", ":$bbcode_uid");
+ $replace = array("\n", '', '', '', '');
+ }
+ else
+ {
+ $match = array('<br />');
+ $replace = array("\n");
+ }
+
+ $message = str_replace($match, $replace, $message);
+
+ $match = get_preg_expression('bbcode_htm');
+ $replace = array('\1', '\1', '\2', '\1', '', '');
+
+ $message = preg_replace($match, $replace, $message);
+}
+
+/**
+* Strips all bbcode from a text and returns the plain content
+*/
+function strip_bbcode(&$text, $uid = '')
+{
+ if (!$uid)
+ {
+ $uid = '[0-9a-z]{5,}';
+ }
+
+ $text = preg_replace("#\[\/?[a-z0-9\*\+\-]+(?:=(?:&quot;.*&quot;|[^\]]*))?(?::[a-z])?(\:$uid)\]#", ' ', $text);
+
+ $match = get_preg_expression('bbcode_htm');
+ $replace = array('\1', '\1', '\2', '\1', '', '');
+
+ $text = preg_replace($match, $replace, $text);
+}
+
+/**
+* For display of custom parsed text on user-facing pages
+* Expects $text to be the value directly from the database (stored value)
+*/
+function generate_text_for_display($text, $uid, $bitfield, $flags)
+{
+ static $bbcode;
+
+ if (!$text)
+ {
+ return '';
+ }
+
+ $text = censor_text($text);
+
+ // Parse bbcode if bbcode uid stored and bbcode enabled
+ if ($uid && ($flags & OPTION_FLAG_BBCODE))
+ {
+ if (!class_exists('bbcode'))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+ }
+
+ if (empty($bbcode))
+ {
+ $bbcode = new bbcode($bitfield);
+ }
+ else
+ {
+ $bbcode->bbcode($bitfield);
+ }
+
+ $bbcode->bbcode_second_pass($text, $uid);
+ }
+
+ $text = bbcode_nl2br($text);
+ $text = smiley_text($text, !($flags & OPTION_FLAG_SMILIES));
+
+ return $text;
+}
+
+/**
+* For parsing custom parsed text to be stored within the database.
+* This function additionally returns the uid and bitfield that needs to be stored.
+* Expects $text to be the value directly from request_var() and in it's non-parsed form
+*/
+function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bbcode = false, $allow_urls = false, $allow_smilies = false)
+{
+ global $phpbb_root_path, $phpEx;
+
+ $uid = $bitfield = '';
+ $flags = (($allow_bbcode) ? OPTION_FLAG_BBCODE : 0) + (($allow_smilies) ? OPTION_FLAG_SMILIES : 0) + (($allow_urls) ? OPTION_FLAG_LINKS : 0);
+
+ if (!$text)
+ {
+ return;
+ }
+
+ if (!class_exists('parse_message'))
+ {
+ include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
+ }
+
+ $message_parser = new parse_message($text);
+ $message_parser->parse($allow_bbcode, $allow_urls, $allow_smilies);
+
+ $text = $message_parser->message;
+ $uid = $message_parser->bbcode_uid;
+
+ // If the bbcode_bitfield is empty, there is no need for the uid to be stored.
+ if (!$message_parser->bbcode_bitfield)
+ {
+ $uid = '';
+ }
+
+ $bitfield = $message_parser->bbcode_bitfield;
+
+ return;
+}
+
+/**
+* For decoding custom parsed text for edits as well as extracting the flags
+* Expects $text to be the value directly from the database (pre-parsed content)
+*/
+function generate_text_for_edit($text, $uid, $flags)
+{
+ global $phpbb_root_path, $phpEx;
+
+ decode_message($text, $uid);
+
+ return array(
+ 'allow_bbcode' => ($flags & OPTION_FLAG_BBCODE) ? 1 : 0,
+ 'allow_smilies' => ($flags & OPTION_FLAG_SMILIES) ? 1 : 0,
+ 'allow_urls' => ($flags & OPTION_FLAG_LINKS) ? 1 : 0,
+ 'text' => $text
+ );
+}
+
+/**
+* A subroutine of make_clickable used with preg_replace
+* It places correct HTML around an url, shortens the displayed text
+* and makes sure no entities are inside URLs
+*/
+function make_clickable_callback($type, $whitespace, $url, $relative_url, $class)
+{
+ $orig_url = $url;
+ $orig_relative = $relative_url;
+ $append = '';
+ $url = htmlspecialchars_decode($url);
+ $relative_url = htmlspecialchars_decode($relative_url);
+
+ // make sure no HTML entities were matched
+ $chars = array('<', '>', '"');
+ $split = false;
+
+ foreach ($chars as $char)
+ {
+ $next_split = strpos($url, $char);
+ if ($next_split !== false)
+ {
+ $split = ($split !== false) ? min($split, $next_split) : $next_split;
+ }
+ }
+
+ if ($split !== false)
+ {
+ // an HTML entity was found, so the URL has to end before it
+ $append = substr($url, $split) . $relative_url;
+ $url = substr($url, 0, $split);
+ $relative_url = '';
+ }
+ else if ($relative_url)
+ {
+ // same for $relative_url
+ $split = false;
+ foreach ($chars as $char)
+ {
+ $next_split = strpos($relative_url, $char);
+ if ($next_split !== false)
+ {
+ $split = ($split !== false) ? min($split, $next_split) : $next_split;
+ }
+ }
+
+ if ($split !== false)
+ {
+ $append = substr($relative_url, $split);
+ $relative_url = substr($relative_url, 0, $split);
+ }
+ }
+
+ // if the last character of the url is a punctuation mark, exclude it from the url
+ $last_char = ($relative_url) ? $relative_url[strlen($relative_url) - 1] : $url[strlen($url) - 1];
+
+ switch ($last_char)
+ {
+ case '.':
+ case '?':
+ case '!':
+ case ':':
+ case ',':
+ $append = $last_char;
+ if ($relative_url)
+ {
+ $relative_url = substr($relative_url, 0, -1);
+ }
+ else
+ {
+ $url = substr($url, 0, -1);
+ }
+ break;
+
+ // set last_char to empty here, so the variable can be used later to
+ // check whether a character was removed
+ default:
+ $last_char = '';
+ break;
+ }
+
+ $short_url = (strlen($url) > 55) ? substr($url, 0, 39) . ' ... ' . substr($url, -10) : $url;
+
+ switch ($type)
+ {
+ case MAGIC_URL_LOCAL:
+ $tag = 'l';
+ $relative_url = preg_replace('/[&?]sid=[0-9a-f]{32}$/', '', preg_replace('/([&?])sid=[0-9a-f]{32}&/', '$1', $relative_url));
+ $url = $url . '/' . $relative_url;
+ $text = $relative_url;
+
+ // this url goes to http://domain.tld/path/to/board/ which
+ // would result in an empty link if treated as local so
+ // don't touch it and let MAGIC_URL_FULL take care of it.
+ if (!$relative_url)
+ {
+ return $whitespace . $orig_url . '/' . $orig_relative; // slash is taken away by relative url pattern
+ }
+ break;
+
+ case MAGIC_URL_FULL:
+ $tag = 'm';
+ $text = $short_url;
+ break;
+
+ case MAGIC_URL_WWW:
+ $tag = 'w';
+ $url = 'http://' . $url;
+ $text = $short_url;
+ break;
+
+ case MAGIC_URL_EMAIL:
+ $tag = 'e';
+ $text = $short_url;
+ $url = 'mailto:' . $url;
+ break;
+ }
+
+ $url = htmlspecialchars($url);
+ $text = htmlspecialchars($text);
+ $append = htmlspecialchars($append);
+
+ $html = "$whitespace<!-- $tag --><a$class href=\"$url\">$text</a><!-- $tag -->$append";
+
+ return $html;
+}
+
+/**
+* make_clickable function
+*
+* Replace magic urls of form http://xxx.xxx., www.xxx. and xxx@xxx.xxx.
+* Cuts down displayed size of link if over 50 chars, turns absolute links
+* into relative versions when the server/script path matches the link
+*/
+function make_clickable($text, $server_url = false, $class = 'postlink')
+{
+ if ($server_url === false)
+ {
+ $server_url = generate_board_url();
+ }
+
+ static $magic_url_match;
+ static $magic_url_replace;
+ static $static_class;
+
+ if (!is_array($magic_url_match) || $static_class != $class)
+ {
+ $static_class = $class;
+ $class = ($static_class) ? ' class="' . $static_class . '"' : '';
+ $local_class = ($static_class) ? ' class="' . $static_class . '-local"' : '';
+
+ $magic_url_match = $magic_url_replace = array();
+ // Be sure to not let the matches cross over. ;)
+
+ // relative urls for this board
+ $magic_url_match[] = '#(^|[\n\t (>.])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#ie';
+ $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_LOCAL, '\$1', '\$2', '\$3', '$local_class')";
+
+ // matches a xxxx://aaaaa.bbb.cccc. ...
+ $magic_url_match[] = '#(^|[\n\t (>.])(' . get_preg_expression('url_inline') . ')#ie';
+ $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_FULL, '\$1', '\$2', '', '$class')";
+
+ // matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
+ $magic_url_match[] = '#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#ie';
+ $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_WWW, '\$1', '\$2', '', '$class')";
+
+ // matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode.
+ $magic_url_match[] = '/(^|[\n\t (>])(' . get_preg_expression('email') . ')/ie';
+ $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_EMAIL, '\$1', '\$2', '', '')";
+ }
+
+ return preg_replace($magic_url_match, $magic_url_replace, $text);
+}
+
+/**
+* Censoring
+*/
+function censor_text($text)
+{
+ static $censors;
+
+ // Nothing to do?
+ if ($text === '')
+ {
+ return '';
+ }
+
+ // We moved the word censor checks in here because we call this function quite often - and then only need to do the check once
+ if (!isset($censors) || !is_array($censors))
+ {
+ global $config, $user, $auth, $cache;
+
+ // We check here if the user is having viewing censors disabled (and also allowed to do so).
+ if (!$user->optionget('viewcensors') && $config['allow_nocensors'] && $auth->acl_get('u_chgcensors'))
+ {
+ $censors = array();
+ }
+ else
+ {
+ $censors = $cache->obtain_word_list();
+ }
+ }
+
+ if (sizeof($censors))
+ {
+ return preg_replace($censors['match'], $censors['replace'], $text);
+ }
+
+ return $text;
+}
+
+/**
+* custom version of nl2br which takes custom BBCodes into account
+*/
+function bbcode_nl2br($text)
+{
+ // custom BBCodes might contain carriage returns so they
+ // are not converted into <br /> so now revert that
+ $text = str_replace(array("\n", "\r"), array('<br />', "\n"), $text);
+ return $text;
+}
+
+/**
+* Smiley processing
+*/
+function smiley_text($text, $force_option = false)
+{
+ global $config, $user, $phpbb_root_path;
+
+ if ($force_option || !$config['allow_smilies'] || !$user->optionget('viewsmilies'))
+ {
+ return preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $text);
+ }
+ else
+ {
+ $root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_root_path;
+ return preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/(.*?) \/><!\-\- s\1 \-\->#', '<img src="' . $root_path . $config['smilies_path'] . '/\2 />', $text);
+ }
+}
+
+/**
+* General attachment parsing
+*
+* @param mixed $forum_id The forum id the attachments are displayed in (false if in private message)
+* @param string &$message The post/private message
+* @param array &$attachments The attachments to parse for (inline) display. The attachments array will hold templated data after parsing.
+* @param array &$update_count The attachment counts to be updated - will be filled
+* @param bool $preview If set to true the attachments are parsed for preview. Within preview mode the comments are fetched from the given $attachments array and not fetched from the database.
+*/
+function parse_attachments($forum_id, &$message, &$attachments, &$update_count, $preview = false)
+{
+ if (!sizeof($attachments))
+ {
+ return;
+ }
+
+ global $template, $cache, $user;
+ global $extensions, $config, $phpbb_root_path, $phpEx;
+
+ //
+ $compiled_attachments = array();
+
+ if (!isset($template->filename['attachment_tpl']))
+ {
+ $template->set_filenames(array(
+ 'attachment_tpl' => 'attachment.html')
+ );
+ }
+
+ if (empty($extensions) || !is_array($extensions))
+ {
+ $extensions = $cache->obtain_attach_extensions($forum_id);
+ }
+
+ // Look for missing attachment information...
+ $attach_ids = array();
+ foreach ($attachments as $pos => $attachment)
+ {
+ // If is_orphan is set, we need to retrieve the attachments again...
+ if (!isset($attachment['extension']) && !isset($attachment['physical_filename']))
+ {
+ $attach_ids[(int) $attachment['attach_id']] = $pos;
+ }
+ }
+
+ // Grab attachments (security precaution)
+ if (sizeof($attach_ids))
+ {
+ global $db;
+
+ $new_attachment_data = array();
+
+ $sql = 'SELECT *
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('attach_id', array_keys($attach_ids));
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!isset($attach_ids[$row['attach_id']]))
+ {
+ continue;
+ }
+
+ // If we preview attachments we will set some retrieved values here
+ if ($preview)
+ {
+ $row['attach_comment'] = $attachments[$attach_ids[$row['attach_id']]]['attach_comment'];
+ }
+
+ $new_attachment_data[$attach_ids[$row['attach_id']]] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ $attachments = $new_attachment_data;
+ unset($new_attachment_data);
+ }
+
+ // Sort correctly
+ if ($config['display_order'])
+ {
+ // Ascending sort
+ krsort($attachments);
+ }
+ else
+ {
+ // Descending sort
+ ksort($attachments);
+ }
+
+ foreach ($attachments as $attachment)
+ {
+ if (!sizeof($attachment))
+ {
+ continue;
+ }
+
+ // We need to reset/empty the _file block var, because this function might be called more than once
+ $template->destroy_block_vars('_file');
+
+ $block_array = array();
+
+ // Some basics...
+ $attachment['extension'] = strtolower(trim($attachment['extension']));
+ $filename = $phpbb_root_path . $config['upload_path'] . '/' . utf8_basename($attachment['physical_filename']);
+ $thumbnail_filename = $phpbb_root_path . $config['upload_path'] . '/thumb_' . utf8_basename($attachment['physical_filename']);
+
+ $upload_icon = '';
+
+ if (isset($extensions[$attachment['extension']]))
+ {
+ if ($user->img('icon_topic_attach', '') && !$extensions[$attachment['extension']]['upload_icon'])
+ {
+ $upload_icon = $user->img('icon_topic_attach', '');
+ }
+ else if ($extensions[$attachment['extension']]['upload_icon'])
+ {
+ $upload_icon = '<img src="' . $phpbb_root_path . $config['upload_icons_path'] . '/' . trim($extensions[$attachment['extension']]['upload_icon']) . '" alt="" />';
+ }
+ }
+
+ $filesize = get_formatted_filesize($attachment['filesize'], false);
+
+ $comment = bbcode_nl2br(censor_text($attachment['attach_comment']));
+
+ $block_array += array(
+ 'UPLOAD_ICON' => $upload_icon,
+ 'FILESIZE' => $filesize['value'],
+ 'SIZE_LANG' => $filesize['unit'],
+ 'DOWNLOAD_NAME' => utf8_basename($attachment['real_filename']),
+ 'COMMENT' => $comment,
+ );
+
+ $denied = false;
+
+ if (!extension_allowed($forum_id, $attachment['extension'], $extensions))
+ {
+ $denied = true;
+
+ $block_array += array(
+ 'S_DENIED' => true,
+ 'DENIED_MESSAGE' => sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension'])
+ );
+ }
+
+ if (!$denied)
+ {
+ $l_downloaded_viewed = $download_link = '';
+ $display_cat = $extensions[$attachment['extension']]['display_cat'];
+
+ if ($display_cat == ATTACHMENT_CATEGORY_IMAGE)
+ {
+ if ($attachment['thumbnail'])
+ {
+ $display_cat = ATTACHMENT_CATEGORY_THUMB;
+ }
+ else
+ {
+ if ($config['img_display_inlined'])
+ {
+ if ($config['img_link_width'] || $config['img_link_height'])
+ {
+ $dimension = @getimagesize($filename);
+
+ // If the dimensions could not be determined or the image being 0x0 we display it as a link for safety purposes
+ if ($dimension === false || empty($dimension[0]) || empty($dimension[1]))
+ {
+ $display_cat = ATTACHMENT_CATEGORY_NONE;
+ }
+ else
+ {
+ $display_cat = ($dimension[0] <= $config['img_link_width'] && $dimension[1] <= $config['img_link_height']) ? ATTACHMENT_CATEGORY_IMAGE : ATTACHMENT_CATEGORY_NONE;
+ }
+ }
+ }
+ else
+ {
+ $display_cat = ATTACHMENT_CATEGORY_NONE;
+ }
+ }
+ }
+
+ // Make some descisions based on user options being set.
+ if (($display_cat == ATTACHMENT_CATEGORY_IMAGE || $display_cat == ATTACHMENT_CATEGORY_THUMB) && !$user->optionget('viewimg'))
+ {
+ $display_cat = ATTACHMENT_CATEGORY_NONE;
+ }
+
+ if ($display_cat == ATTACHMENT_CATEGORY_FLASH && !$user->optionget('viewflash'))
+ {
+ $display_cat = ATTACHMENT_CATEGORY_NONE;
+ }
+
+ $download_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $attachment['attach_id']);
+
+ switch ($display_cat)
+ {
+ // Images
+ case ATTACHMENT_CATEGORY_IMAGE:
+ $l_downloaded_viewed = 'VIEWED_COUNT';
+ $inline_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $attachment['attach_id']);
+ $download_link .= '&amp;mode=view';
+
+ $block_array += array(
+ 'S_IMAGE' => true,
+ 'U_INLINE_LINK' => $inline_link,
+ );
+
+ $update_count[] = $attachment['attach_id'];
+ break;
+
+ // Images, but display Thumbnail
+ case ATTACHMENT_CATEGORY_THUMB:
+ $l_downloaded_viewed = 'VIEWED_COUNT';
+ $thumbnail_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $attachment['attach_id'] . '&amp;t=1');
+ $download_link .= '&amp;mode=view';
+
+ $block_array += array(
+ 'S_THUMBNAIL' => true,
+ 'THUMB_IMAGE' => $thumbnail_link,
+ );
+
+ $update_count[] = $attachment['attach_id'];
+ break;
+
+ // Windows Media Streams
+ case ATTACHMENT_CATEGORY_WM:
+ $l_downloaded_viewed = 'VIEWED_COUNT';
+
+ // Giving the filename directly because within the wm object all variables are in local context making it impossible
+ // to validate against a valid session (all params can differ)
+ // $download_link = $filename;
+
+ $block_array += array(
+ 'U_FORUM' => generate_board_url(),
+ 'ATTACH_ID' => $attachment['attach_id'],
+ 'S_WM_FILE' => true,
+ );
+
+ // Viewed/Heared File ... update the download count
+ $update_count[] = $attachment['attach_id'];
+ break;
+
+ // Real Media Streams
+ case ATTACHMENT_CATEGORY_RM:
+ case ATTACHMENT_CATEGORY_QUICKTIME:
+ $l_downloaded_viewed = 'VIEWED_COUNT';
+
+ $block_array += array(
+ 'S_RM_FILE' => ($display_cat == ATTACHMENT_CATEGORY_RM) ? true : false,
+ 'S_QUICKTIME_FILE' => ($display_cat == ATTACHMENT_CATEGORY_QUICKTIME) ? true : false,
+ 'U_FORUM' => generate_board_url(),
+ 'ATTACH_ID' => $attachment['attach_id'],
+ );
+
+ // Viewed/Heared File ... update the download count
+ $update_count[] = $attachment['attach_id'];
+ break;
+
+ // Macromedia Flash Files
+ case ATTACHMENT_CATEGORY_FLASH:
+ list($width, $height) = @getimagesize($filename);
+
+ $l_downloaded_viewed = 'VIEWED_COUNT';
+
+ $block_array += array(
+ 'S_FLASH_FILE' => true,
+ 'WIDTH' => $width,
+ 'HEIGHT' => $height,
+ 'U_VIEW_LINK' => $download_link . '&amp;view=1',
+ );
+
+ // Viewed/Heared File ... update the download count
+ $update_count[] = $attachment['attach_id'];
+ break;
+
+ default:
+ $l_downloaded_viewed = 'DOWNLOAD_COUNT';
+
+ $block_array += array(
+ 'S_FILE' => true,
+ );
+ break;
+ }
+
+ $l_download_count = (!isset($attachment['download_count']) || $attachment['download_count'] == 0) ? $user->lang[$l_downloaded_viewed . '_NONE'] : (($attachment['download_count'] == 1) ? sprintf($user->lang[$l_downloaded_viewed], $attachment['download_count']) : sprintf($user->lang[$l_downloaded_viewed . 'S'], $attachment['download_count']));
+
+ $block_array += array(
+ 'U_DOWNLOAD_LINK' => $download_link,
+ 'L_DOWNLOAD_COUNT' => $l_download_count
+ );
+ }
+
+ $template->assign_block_vars('_file', $block_array);
+
+ $compiled_attachments[] = $template->assign_display('attachment_tpl');
+ }
+
+ $attachments = $compiled_attachments;
+ unset($compiled_attachments);
+
+ $tpl_size = sizeof($attachments);
+
+ $unset_tpl = array();
+
+ preg_match_all('#<!\-\- ia([0-9]+) \-\->(.*?)<!\-\- ia\1 \-\->#', $message, $matches, PREG_PATTERN_ORDER);
+
+ $replace = array();
+ foreach ($matches[0] as $num => $capture)
+ {
+ // Flip index if we are displaying the reverse way
+ $index = ($config['display_order']) ? ($tpl_size-($matches[1][$num] + 1)) : $matches[1][$num];
+
+ $replace['from'][] = $matches[0][$num];
+ $replace['to'][] = (isset($attachments[$index])) ? $attachments[$index] : sprintf($user->lang['MISSING_INLINE_ATTACHMENT'], $matches[2][array_search($index, $matches[1])]);
+
+ $unset_tpl[] = $index;
+ }
+
+ if (isset($replace['from']))
+ {
+ $message = str_replace($replace['from'], $replace['to'], $message);
+ }
+
+ $unset_tpl = array_unique($unset_tpl);
+
+ // Needed to let not display the inlined attachments at the end of the post again
+ foreach ($unset_tpl as $index)
+ {
+ unset($attachments[$index]);
+ }
+}
+
+/**
+* Check if extension is allowed to be posted.
+*
+* @param mixed $forum_id The forum id to check or false if private message
+* @param string $extension The extension to check, for example zip.
+* @param array &$extensions The extension array holding the information from the cache (will be obtained if empty)
+*
+* @return bool False if the extension is not allowed to be posted, else true.
+*/
+function extension_allowed($forum_id, $extension, &$extensions)
+{
+ if (empty($extensions))
+ {
+ global $cache;
+ $extensions = $cache->obtain_attach_extensions($forum_id);
+ }
+
+ return (!isset($extensions['_allowed_'][$extension])) ? false : true;
+}
+
+/**
+* Truncates string while retaining special characters if going over the max length
+* The default max length is 60 at the moment
+* The maximum storage length is there to fit the string within the given length. The string may be further truncated due to html entities.
+* For example: string given is 'a "quote"' (length: 9), would be a stored as 'a &quot;quote&quot;' (length: 19)
+*
+* @param string $string The text to truncate to the given length. String is specialchared.
+* @param int $max_length Maximum length of string (multibyte character count as 1 char / Html entity count as 1 char)
+* @param int $max_store_length Maximum character length of string (multibyte character count as 1 char / Html entity count as entity chars).
+* @param bool $allow_reply Allow Re: in front of string
+* @param string $append String to be appended
+*/
+function truncate_string($string, $max_length = 60, $max_store_length = 255, $allow_reply = true, $append = '')
+{
+ $chars = array();
+
+ $strip_reply = false;
+ $stripped = false;
+ if ($allow_reply && strpos($string, 'Re: ') === 0)
+ {
+ $strip_reply = true;
+ $string = substr($string, 4);
+ }
+
+ $_chars = utf8_str_split(htmlspecialchars_decode($string));
+ $chars = array_map('utf8_htmlspecialchars', $_chars);
+
+ // Now check the length ;)
+ if (sizeof($chars) > $max_length)
+ {
+ // Cut off the last elements from the array
+ $string = implode('', array_slice($chars, 0, $max_length - utf8_strlen($append)));
+ $stripped = true;
+ }
+
+ // Due to specialchars, we may not be able to store the string...
+ if (utf8_strlen($string) > $max_store_length)
+ {
+ // let's split again, we do not want half-baked strings where entities are split
+ $_chars = utf8_str_split(htmlspecialchars_decode($string));
+ $chars = array_map('utf8_htmlspecialchars', $_chars);
+
+ do
+ {
+ array_pop($chars);
+ $string = implode('', $chars);
+ }
+ while (!empty($chars) && utf8_strlen($string) > $max_store_length);
+ }
+
+ if ($strip_reply)
+ {
+ $string = 'Re: ' . $string;
+ }
+
+ if ($append != '' && $stripped)
+ {
+ $string = $string . $append;
+ }
+
+ return $string;
+}
+
+/**
+* Get username details for placing into templates.
+* This function caches all modes on first call, except for no_profile and anonymous user - determined by $user_id.
+*
+* @param string $mode Can be profile (for getting an url to the profile), username (for obtaining the username), colour (for obtaining the user colour), full (for obtaining a html string representing a coloured link to the users profile) or no_profile (the same as full but forcing no profile link)
+* @param int $user_id The users id
+* @param string $username The users name
+* @param string $username_colour The users colour
+* @param string $guest_username optional parameter to specify the guest username. It will be used in favor of the GUEST language variable then.
+* @param string $custom_profile_url optional parameter to specify a profile url. The user id get appended to this url as &amp;u={user_id}
+*
+* @return string A string consisting of what is wanted based on $mode.
+* @author BartVB, Acyd Burn
+*/
+function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false)
+{
+ static $_profile_cache;
+
+ // We cache some common variables we need within this function
+ if (empty($_profile_cache))
+ {
+ global $phpbb_root_path, $phpEx;
+
+ $_profile_cache['base_url'] = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u={USER_ID}');
+ $_profile_cache['tpl_noprofile'] = '{USERNAME}';
+ $_profile_cache['tpl_noprofile_colour'] = '<span style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</span>';
+ $_profile_cache['tpl_profile'] = '<a href="{PROFILE_URL}">{USERNAME}</a>';
+ $_profile_cache['tpl_profile_colour'] = '<a href="{PROFILE_URL}" style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</a>';
+ }
+
+ global $user, $auth;
+
+ // This switch makes sure we only run code required for the mode
+ switch ($mode)
+ {
+ case 'full':
+ case 'no_profile':
+ case 'colour':
+
+ // Build correct username colour
+ $username_colour = ($username_colour) ? '#' . $username_colour : '';
+
+ // Return colour
+ if ($mode == 'colour')
+ {
+ return $username_colour;
+ }
+
+ // no break;
+
+ case 'username':
+
+ // Build correct username
+ if ($guest_username === false)
+ {
+ $username = ($username) ? $username : $user->lang['GUEST'];
+ }
+ else
+ {
+ $username = ($user_id && $user_id != ANONYMOUS) ? $username : ((!empty($guest_username)) ? $guest_username : $user->lang['GUEST']);
+ }
+
+ // Return username
+ if ($mode == 'username')
+ {
+ return $username;
+ }
+
+ // no break;
+
+ case 'profile':
+
+ // Build correct profile url - only show if not anonymous and permission to view profile if registered user
+ // For anonymous the link leads to a login page.
+ if ($user_id && $user_id != ANONYMOUS && ($user->data['user_id'] == ANONYMOUS || $auth->acl_get('u_viewprofile')))
+ {
+ $profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&amp;u=' . (int) $user_id : str_replace(array('={USER_ID}', '=%7BUSER_ID%7D'), '=' . (int) $user_id, $_profile_cache['base_url']);
+ }
+ else
+ {
+ $profile_url = '';
+ }
+
+ // Return profile
+ if ($mode == 'profile')
+ {
+ return $profile_url;
+ }
+
+ // no break;
+ }
+
+ if (($mode == 'full' && !$profile_url) || $mode == 'no_profile')
+ {
+ return str_replace(array('{USERNAME_COLOUR}', '{USERNAME}'), array($username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_noprofile'] : $_profile_cache['tpl_noprofile_colour']);
+ }
+
+ return str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_profile'] : $_profile_cache['tpl_profile_colour']);
+}
+
+/**
+* @package phpBB3
+*/
+class bitfield
+{
+ var $data;
+
+ function bitfield($bitfield = '')
+ {
+ $this->data = base64_decode($bitfield);
+ }
+
+ /**
+ */
+ function get($n)
+ {
+ // Get the ($n / 8)th char
+ $byte = $n >> 3;
+
+ if (strlen($this->data) >= $byte + 1)
+ {
+ $c = $this->data[$byte];
+
+ // Lookup the ($n % 8)th bit of the byte
+ $bit = 7 - ($n & 7);
+ return (bool) (ord($c) & (1 << $bit));
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ function set($n)
+ {
+ $byte = $n >> 3;
+ $bit = 7 - ($n & 7);
+
+ if (strlen($this->data) >= $byte + 1)
+ {
+ $this->data[$byte] = $this->data[$byte] | chr(1 << $bit);
+ }
+ else
+ {
+ $this->data .= str_repeat("\0", $byte - strlen($this->data));
+ $this->data .= chr(1 << $bit);
+ }
+ }
+
+ function clear($n)
+ {
+ $byte = $n >> 3;
+
+ if (strlen($this->data) >= $byte + 1)
+ {
+ $bit = 7 - ($n & 7);
+ $this->data[$byte] = $this->data[$byte] &~ chr(1 << $bit);
+ }
+ }
+
+ function get_blob()
+ {
+ return $this->data;
+ }
+
+ function get_base64()
+ {
+ return base64_encode($this->data);
+ }
+
+ function get_bin()
+ {
+ $bin = '';
+ $len = strlen($this->data);
+
+ for ($i = 0; $i < $len; ++$i)
+ {
+ $bin .= str_pad(decbin(ord($this->data[$i])), 8, '0', STR_PAD_LEFT);
+ }
+
+ return $bin;
+ }
+
+ function get_all_set()
+ {
+ return array_keys(array_filter(str_split($this->get_bin())));
+ }
+
+ function merge($bitfield)
+ {
+ $this->data = $this->data | $bitfield->get_blob();
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
new file mode 100644
index 0000000000..82ec114c09
--- /dev/null
+++ b/phpBB/includes/functions_convert.php
@@ -0,0 +1,2454 @@
+<?php
+/**
+*
+* @package install
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Default avatar width/height
+* @ignore
+*/
+define('DEFAULT_AVATAR_X', 80);
+define('DEFAULT_AVATAR_Y', 80);
+
+// Global functions - all functions can be used by convertors
+
+// SIMPLE FUNCTIONS
+
+/**
+* Return the preceding value
+*/
+function dec($var)
+{
+ return --$var;
+}
+
+/**
+* Return the next value
+*/
+function inc($var)
+{
+ return ++$var;
+}
+
+/**
+* Return whether the value is positive
+*/
+function is_positive($n)
+{
+ return ($n > 0) ? 1 : 0;
+}
+
+/**
+* Boolean inverse of the value
+*/
+function not($var)
+{
+ return ($var) ? 0 : 1;
+}
+
+/**
+* Convert a textual value to it's equivalent boolean value
+*
+* @param string $str String to convert (converts yes, on, y, 1 and true to boolean true)
+* @return boolean The equivalent value
+*/
+function str_to_bool($str)
+{
+ $str = strtolower($str);
+ return ($str == 'yes' || $str == 'on' || $str == 'y' || $str == 'true' || $str == '1') ? true : false;
+}
+
+/**
+* Function to mimic php's empty() function (it is the same)
+*/
+function is_empty($mixed)
+{
+ return empty($mixed);
+}
+
+/**
+* Convert the name of a user's primary group to the appropriate equivalent phpBB group id
+*
+* @param string $status The name of the group
+* @return int The group_id corresponding to the equivalent group
+*/
+function str_to_primary_group($status)
+{
+ switch (ucfirst(strtolower($status)))
+ {
+ case 'Administrator':
+ return get_group_id('administrators');
+ break;
+
+ case 'Super moderator':
+ case 'Global moderator':
+ case 'Moderator':
+ return get_group_id('global_moderators');
+ break;
+
+ case 'Guest':
+ case 'Anonymous':
+ return get_group_id('guests');
+ break;
+
+ default:
+ return get_group_id('registered');
+ break;
+ }
+}
+
+/**
+* Convert a boolean into the appropriate phpBB constant indicating whether the item is locked
+*/
+function is_item_locked($bool)
+{
+ return ($bool) ? ITEM_LOCKED : ITEM_UNLOCKED;
+}
+
+/**
+* Convert a value from days to seconds
+*/
+function days_to_seconds($days)
+{
+ return ($days * 86400);
+}
+
+/**
+* Determine whether a user is anonymous and return the appropriate new user_id
+*/
+function is_user_anonymous($user_id)
+{
+ return ($user_id > ANONYMOUS) ? $user_id : ANONYMOUS;
+}
+
+/**
+* Generate a key value based on existing values
+*
+* @param int $pad Amount to add to the maximum value
+* @return int Key value
+*/
+function auto_id($pad = 0)
+{
+ global $auto_id, $convert_row;
+
+ if (!empty($convert_row['max_id']))
+ {
+ return $convert_row['max_id'] + $pad;
+ }
+
+ return $auto_id + $pad;
+}
+
+/**
+* Convert a boolean into the appropriate phpBB constant indicating whether the user is active
+*/
+function set_user_type($user_active)
+{
+ return ($user_active) ? USER_NORMAL : USER_INACTIVE;
+}
+
+/**
+* Convert a value from minutes to hours
+*/
+function minutes_to_hours($minutes)
+{
+ return ($minutes / 3600);
+}
+
+/**
+* Return the group_id for a given group name
+*/
+function get_group_id($group_name)
+{
+ global $db, $group_mapping;
+
+ if (empty($group_mapping))
+ {
+ $sql = 'SELECT group_name, group_id
+ FROM ' . GROUPS_TABLE;
+ $result = $db->sql_query($sql);
+
+ $group_mapping = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $group_mapping[strtoupper($row['group_name'])] = (int) $row['group_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (!sizeof($group_mapping))
+ {
+ add_default_groups();
+ return get_group_id($group_name);
+ }
+
+ if (isset($group_mapping[strtoupper($group_name)]))
+ {
+ return $group_mapping[strtoupper($group_name)];
+ }
+
+ return $group_mapping['REGISTERED'];
+}
+
+/**
+* Generate the email hash stored in the users table
+*/
+function gen_email_hash($email)
+{
+ return (crc32(strtolower($email)) . strlen($email));
+}
+
+/**
+* Convert a boolean into the appropriate phpBB constant indicating whether the topic is locked
+*/
+function is_topic_locked($bool)
+{
+ return (!empty($bool)) ? ITEM_LOCKED : ITEM_UNLOCKED;
+}
+
+/**
+* Generate a bbcode_uid value
+*/
+function make_uid($timestamp)
+{
+ static $last_timestamp, $last_uid;
+
+ if (empty($last_timestamp) || $timestamp != $last_timestamp)
+ {
+ $last_uid = substr(base_convert(unique_id(), 16, 36), 0, BBCODE_UID_LEN);
+ }
+ $last_timestamp = $timestamp;
+ return $last_uid;
+}
+
+
+/**
+* Validate a website address
+*/
+function validate_website($url)
+{
+ if ($url === 'http://')
+ {
+ return '';
+ }
+ else if (!preg_match('#^[a-z0-9]+://#i', $url) && strlen($url) > 0)
+ {
+ return 'http://' . $url;
+ }
+ return $url;
+}
+
+/**
+* Convert nulls to zeros for fields which allowed a NULL value in the source but not the destination
+*/
+function null_to_zero($value)
+{
+ return ($value === NULL) ? 0 : $value;
+}
+
+/**
+* Convert nulls to empty strings for fields which allowed a NULL value in the source but not the destination
+*/
+function null_to_str($value)
+{
+ return ($value === NULL) ? '' : $value;
+}
+
+// EXTENDED FUNCTIONS
+
+/**
+* Get old config value
+*/
+function get_config_value($config_name)
+{
+ static $convert_config;
+
+ if (!isset($convert_config))
+ {
+ $convert_config = get_config();
+ }
+
+ if (!isset($convert_config[$config_name]))
+ {
+ return false;
+ }
+
+ return (empty($convert_config[$config_name])) ? '' : $convert_config[$config_name];
+}
+
+/**
+* Convert an IP address from the hexadecimal notation to normal dotted-quad notation
+*/
+function decode_ip($int_ip)
+{
+ if (!$int_ip)
+ {
+ return $int_ip;
+ }
+
+ $hexipbang = explode('.', chunk_split($int_ip, 2, '.'));
+
+ // Any mod changing the way ips are stored? Then we are not able to convert and enter the ip "as is" to not "destroy" anything...
+ if (sizeof($hexipbang) < 4)
+ {
+ return $int_ip;
+ }
+
+ return hexdec($hexipbang[0]) . '.' . hexdec($hexipbang[1]) . '.' . hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]);
+}
+
+/**
+* Reverse the encoding of wild-carded bans
+*/
+function decode_ban_ip($int_ip)
+{
+ return str_replace('255', '*', decode_ip($int_ip));
+}
+
+/**
+* Determine the MIME-type of a specified filename
+* This does not actually inspect the file, but simply uses the file extension
+*/
+function mimetype($filename)
+{
+ if (!preg_match('/\.([a-z0-9]+)$/i', $filename, $m))
+ {
+ return 'application/octet-stream';
+ }
+
+ switch (strtolower($m[1]))
+ {
+ case 'zip': return 'application/zip';
+ case 'jpeg': return 'image/jpeg';
+ case 'jpg': return 'image/jpeg';
+ case 'jpe': return 'image/jpeg';
+ case 'png': return 'image/png';
+ case 'gif': return 'image/gif';
+ case 'htm':
+ case 'html': return 'text/html';
+ case 'tif': return 'image/tiff';
+ case 'tiff': return 'image/tiff';
+ case 'ras': return 'image/x-cmu-raster';
+ case 'pnm': return 'image/x-portable-anymap';
+ case 'pbm': return 'image/x-portable-bitmap';
+ case 'pgm': return 'image/x-portable-graymap';
+ case 'ppm': return 'image/x-portable-pixmap';
+ case 'rgb': return 'image/x-rgb';
+ case 'xbm': return 'image/x-xbitmap';
+ case 'xpm': return 'image/x-xpixmap';
+ case 'xwd': return 'image/x-xwindowdump';
+ case 'z': return 'application/x-compress';
+ case 'gtar': return 'application/x-gtar';
+ case 'tgz': return 'application/x-gtar';
+ case 'gz': return 'application/x-gzip';
+ case 'tar': return 'application/x-tar';
+ case 'xls': return 'application/excel';
+ case 'pdf': return 'application/pdf';
+ case 'ppt': return 'application/powerpoint';
+ case 'rm': return 'application/vnd.rn-realmedia';
+ case 'wma': return 'audio/x-ms-wma';
+ case 'swf': return 'application/x-shockwave-flash';
+ case 'ief': return 'image/ief';
+ case 'doc':
+ case 'dot':
+ case 'wrd': return 'application/msword';
+ case 'ai':
+ case 'eps':
+ case 'ps': return 'application/postscript';
+ case 'asc':
+ case 'txt':
+ case 'c':
+ case 'cc':
+ case 'h':
+ case 'hh':
+ case 'cpp':
+ case 'hpp':
+ case 'php':
+ case 'php3': return 'text/plain';
+ default: return 'application/octet-stream';
+ }
+}
+
+/**
+* Obtain the dimensions of all remotely hosted avatars
+* This should only be called from execute_last
+* There can be significant network overhead if there are a large number of remote avatars
+* @todo Look at the option of allowing the user to decide whether this is called or to force the dimensions
+*/
+function remote_avatar_dims()
+{
+ global $db;
+
+ $sql = 'SELECT user_id, user_avatar
+ FROM ' . USERS_TABLE . '
+ WHERE user_avatar_type = ' . AVATAR_REMOTE;
+ $result = $db->sql_query($sql);
+
+ $remote_avatars = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $remote_avatars[(int) $row['user_id']] = $row['user_avatar'];
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($remote_avatars as $user_id => $avatar)
+ {
+ $width = (int) get_remote_avatar_dim($avatar, 0);
+ $height = (int) get_remote_avatar_dim($avatar, 1);
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_avatar_width = ' . (int) $width . ', user_avatar_height = ' . (int) $height . '
+ WHERE user_id = ' . $user_id;
+ $db->sql_query($sql);
+ }
+}
+
+function import_avatar_gallery($gallery_name = '', $subdirs_as_galleries = false)
+{
+ global $config, $convert, $phpbb_root_path, $user;
+
+ $relative_path = empty($convert->convertor['source_path_absolute']);
+
+ if (empty($convert->convertor['avatar_gallery_path']))
+ {
+ $convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_GALLERY_PATH'], 'import_avatar_gallery()'), __LINE__, __FILE__);
+ }
+
+ $src_path = relative_base(path($convert->convertor['avatar_gallery_path'], $relative_path), $relative_path);
+
+ if (is_dir($src_path))
+ {
+ // Do not die on failure... safe mode restrictions may be in effect.
+ copy_dir($convert->convertor['avatar_gallery_path'], path($config['avatar_gallery_path']) . $gallery_name, !$subdirs_as_galleries, false, false, $relative_path);
+
+ // only doing 1 level deep. (ibf 1.x)
+ // notes: ibf has 2 tiers: directly in the avatar directory for base gallery (handled in the above statement), plus subdirs(handled below).
+ // recursive subdirs ignored. -- i don't know if other forums support recursive galleries. if they do, this following code could be upgraded to be recursive.
+ if ($subdirs_as_galleries)
+ {
+ $dirlist = array();
+ if ($handle = @opendir($src_path))
+ {
+ while ($entry = readdir($handle))
+ {
+ if ($entry[0] == '.' || $entry == 'CVS' || $entry == 'index.htm')
+ {
+ continue;
+ }
+
+ if (is_dir($src_path . $entry))
+ {
+ $dirlist[] = $entry;
+ }
+ }
+ closedir($handle);
+ }
+ else if ($dir = @dir($src_path))
+ {
+ while ($entry = $dir->read())
+ {
+ if ($entry[0] == '.' || $entry == 'CVS' || $entry == 'index.htm')
+ {
+ continue;
+ }
+
+ if (is_dir($src_path . $entry))
+ {
+ $dirlist[] = $entry;
+ }
+ }
+ $dir->close();
+ }
+
+ for ($i = 0; $i < sizeof($dirlist); ++$i)
+ {
+ $dir = $dirlist[$i];
+
+ // Do not die on failure... safe mode restrictions may be in effect.
+ copy_dir(path($convert->convertor['avatar_gallery_path'], $relative_path) . $dir, path($config['avatar_gallery_path']) . $dir, true, false, false, $relative_path);
+ }
+ }
+ }
+}
+
+function import_attachment_files($category_name = '')
+{
+ global $config, $convert, $phpbb_root_path, $db, $user;
+
+ $sql = 'SELECT config_value AS upload_path
+ FROM ' . CONFIG_TABLE . "
+ WHERE config_name = 'upload_path'";
+ $result = $db->sql_query($sql);
+ $config['upload_path'] = $db->sql_fetchfield('upload_path');
+ $db->sql_freeresult($result);
+
+ $relative_path = empty($convert->convertor['source_path_absolute']);
+
+ if (empty($convert->convertor['upload_path']))
+ {
+ $convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_UPLOAD_DIR'], 'import_attachment_files()'), __LINE__, __FILE__);
+ }
+
+ if (is_dir(relative_base(path($convert->convertor['upload_path'], $relative_path), $relative_path)))
+ {
+ copy_dir($convert->convertor['upload_path'], path($config['upload_path']) . $category_name, true, false, true, $relative_path);
+ }
+}
+
+function attachment_forum_perms($forum_id)
+{
+ if (!is_array($forum_id))
+ {
+ $forum_id = array($forum_id);
+ }
+
+ return serialize($forum_id);
+}
+
+// base64todec function
+// -> from php manual?
+function base64_unpack($string)
+{
+ $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+-';
+ $base = strlen($chars);
+
+ $length = strlen($string);
+ $number = 0;
+
+ for ($i = 1; $i <= $length; $i++)
+ {
+ $pos = $length - $i;
+ $operand = strpos($chars, substr($string, $pos, 1));
+ $exponent = pow($base, $i-1);
+ $dec_value = $operand * $exponent;
+ $number += $dec_value;
+ }
+
+ return $number;
+}
+
+function _import_check($config_var, $source, $use_target)
+{
+ global $convert, $config;
+
+ $result = array(
+ 'orig_source' => $source,
+ 'copied' => false,
+ 'relative_path' => (empty($convert->convertor['source_path_absolute'])) ? true : false,
+ );
+
+ // copy file will prepend $phpBB_root_path
+ $target = $config[$config_var] . '/' . utf8_basename(($use_target === false) ? $source : $use_target);
+
+ if (!empty($convert->convertor[$config_var]) && strpos($source, $convert->convertor[$config_var]) !== 0)
+ {
+ $source = $convert->convertor[$config_var] . $source;
+ }
+
+ $result['source'] = $source;
+
+ if (file_exists(relative_base($source, $result['relative_path'], __LINE__, __FILE__)))
+ {
+ $result['copied'] = copy_file($source, $target, false, false, $result['relative_path']);
+ }
+
+ if ($result['copied'])
+ {
+ $result['target'] = utf8_basename($target);
+ }
+ else
+ {
+ $result['target'] = ($use_target !== false) ? $result['orig_source'] : utf8_basename($target);
+ }
+
+ return $result;
+}
+
+function import_attachment($source, $use_target = false)
+{
+ if (empty($source))
+ {
+ return '';
+ }
+
+ global $convert, $phpbb_root_path, $config, $user;
+
+ if (empty($convert->convertor['upload_path']))
+ {
+ $convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_UPLOAD_DIR'], 'import_attachment()'), __LINE__, __FILE__);
+ }
+
+ $result = _import_check('upload_path', $source, $use_target);
+
+ if ($result['copied'])
+ {
+ // Thumbnails?
+ if (is_array($convert->convertor['thumbnails']))
+ {
+ $thumb_dir = $convert->convertor['thumbnails'][0];
+ $thumb_prefix = $convert->convertor['thumbnails'][1];
+ $thumb_source = $thumb_dir . $thumb_prefix . utf8_basename($result['source']);
+
+ if (strpos($thumb_source, $convert->convertor['upload_path']) !== 0)
+ {
+ $thumb_source = $convert->convertor['upload_path'] . $thumb_source;
+ }
+ $thumb_target = $config['upload_path'] . '/thumb_' . $result['target'];
+
+ if (file_exists(relative_base($thumb_source, $result['relative_path'], __LINE__, __FILE__)))
+ {
+ copy_file($thumb_source, $thumb_target, false, false, $result['relative_path']);
+ }
+ }
+ }
+
+ return $result['target'];
+}
+
+function import_rank($source, $use_target = false)
+{
+ if (empty($source))
+ {
+ return '';
+ }
+
+ global $convert, $phpbb_root_path, $config, $user;
+
+ if (!isset($convert->convertor['ranks_path']))
+ {
+ $convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_RANKS_PATH'], 'import_rank()'), __LINE__, __FILE__);
+ }
+
+ $result = _import_check('ranks_path', $source, $use_target);
+ return $result['target'];
+}
+
+function import_smiley($source, $use_target = false)
+{
+ if (empty($source))
+ {
+ return '';
+ }
+
+ global $convert, $phpbb_root_path, $config, $user;
+
+ if (!isset($convert->convertor['smilies_path']))
+ {
+ $convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_SMILIES_PATH'], 'import_smiley()'), __LINE__, __FILE__);
+ }
+
+ $result = _import_check('smilies_path', $source, $use_target);
+ return $result['target'];
+}
+
+/*
+*/
+function import_avatar($source, $use_target = false, $user_id = false)
+{
+ if (empty($source) || preg_match('#^https?:#i', $source) || preg_match('#blank\.(gif|png)$#i', $source))
+ {
+ return;
+ }
+
+ global $convert, $phpbb_root_path, $config, $user;
+
+ if (!isset($convert->convertor['avatar_path']))
+ {
+ $convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_AVATAR_PATH'], 'import_avatar()'), __LINE__, __FILE__);
+ }
+
+ if ($use_target === false && $user_id !== false)
+ {
+ $use_target = $config['avatar_salt'] . '_' . $user_id . '.' . substr(strrchr($source, '.'), 1);
+ }
+
+ $result = _import_check('avatar_path', $source, $use_target);
+
+ return ((!empty($user_id)) ? $user_id : $use_target) . '.' . substr(strrchr($source, '.'), 1);
+}
+
+/**
+* @todo all image dimension functions below (there are a *lot*) should get revisited and converted to one or two functions (no more needed, really).
+*/
+
+/**
+* Calculate the size of the specified image
+* Called from the following functions for calculating the size of specific image types
+*/
+function get_image_dim($source)
+{
+ if (empty($source))
+ {
+ return array(0, 0);
+ }
+
+ global $convert;
+
+ $relative_path = empty($convert->convertor['source_path_absolute']);
+
+ if (file_exists(relative_base($source, $relative_path)))
+ {
+ $image = relative_base($source, $relative_path);
+ return @getimagesize($image);
+ }
+
+ return false;
+}
+
+/**
+* Obtain the width of the specified smilie
+*/
+function get_smiley_width($src)
+{
+ return get_smiley_dim($src, 0);
+}
+
+/**
+* Obtain the height of the specified smilie
+*/
+function get_smiley_height($src)
+{
+ return get_smiley_dim($src, 1);
+}
+
+/**
+* Obtain the size of the specified smilie (using the cache if possible) and cache the value
+*/
+function get_smiley_dim($source, $axis)
+{
+ if (empty($source))
+ {
+ return 15;
+ }
+
+ static $smiley_cache = array();
+
+ if (isset($smiley_cache[$source]))
+ {
+ return $smiley_cache[$source][$axis];
+ }
+
+ global $convert, $phpbb_root_path, $config, $user;
+
+ $orig_source = $source;
+
+ if (!isset($convert->convertor['smilies_path']))
+ {
+ $convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_SMILIES_PATH'], 'get_smiley_dim()'), __LINE__, __FILE__);
+ }
+
+ if (!empty($convert->convertor['smilies_path']) && strpos($source, $convert->convertor['smilies_path']) !== 0)
+ {
+ $source = $convert->convertor['smilies_path'] . $source;
+ }
+
+ $smiley_cache[$orig_source] = get_image_dim($source);
+
+ if (empty($smiley_cache[$orig_source]) || empty($smiley_cache[$orig_source][0]) || empty($smiley_cache[$orig_source][1]))
+ {
+ $smiley_cache[$orig_source] = array(15, 15);
+ return 15;
+ }
+
+ return $smiley_cache[$orig_source][$axis];
+}
+
+/**
+* Obtain the width of the specified avatar
+*/
+function get_avatar_width($src, $func = false, $arg1 = false, $arg2 = false)
+{
+ return get_avatar_dim($src, 0, $func, $arg1, $arg2);
+}
+
+/**
+* Obtain the height of the specified avatar
+*/
+function get_avatar_height($src, $func = false, $arg1 = false, $arg2 = false)
+{
+ return get_avatar_dim($src, 1, $func, $arg1, $arg2);
+}
+
+/**
+*/
+function get_avatar_dim($src, $axis, $func = false, $arg1 = false, $arg2 = false)
+{
+ $avatar_type = AVATAR_UPLOAD;
+
+ if ($func)
+ {
+ if ($arg1 || $arg2)
+ {
+ $ary = array($arg1);
+
+ if ($arg2)
+ {
+ $ary[] = $arg2;
+ }
+
+ $avatar_type = call_user_func_array($func, $ary);
+ }
+ else
+ {
+ $avatar_type = call_user_func($func);
+ }
+ }
+
+ switch ($avatar_type)
+ {
+ case AVATAR_UPLOAD:
+ return get_upload_avatar_dim($src, $axis);
+ break;
+
+ case AVATAR_GALLERY:
+ return get_gallery_avatar_dim($src, $axis);
+ break;
+
+ case AVATAR_REMOTE:
+ // see notes on this functions usage and (hopefully) model $func to avoid this accordingly
+ return get_remote_avatar_dim($src, $axis);
+ break;
+
+ default:
+ $default_x = (defined('DEFAULT_AVATAR_X_CUSTOM')) ? DEFAULT_AVATAR_X_CUSTOM : DEFAULT_AVATAR_X;
+ $default_y = (defined('DEFAULT_AVATAR_Y_CUSTOM')) ? DEFAULT_AVATAR_Y_CUSTOM : DEFAULT_AVATAR_Y;
+
+ return $axis ? $default_y : $default_x;
+ break;
+ }
+}
+
+/**
+* Obtain the size of the specified uploaded avatar (using the cache if possible) and cache the value
+*/
+function get_upload_avatar_dim($source, $axis)
+{
+ static $cachedims = false;
+ static $cachekey = false;
+
+ if (empty($source))
+ {
+ return 0;
+ }
+
+ if ($cachekey == $source)
+ {
+ return $cachedims[$axis];
+ }
+
+ $orig_source = $source;
+
+ if (substr($source, 0, 7) == 'upload:')
+ {
+ $source = substr($source, 7);
+ }
+
+ global $convert, $phpbb_root_path, $config, $user;
+
+ if (!isset($convert->convertor['avatar_path']))
+ {
+ $convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_AVATAR_PATH'], 'get_upload_avatar_dim()'), __LINE__, __FILE__);
+ }
+
+ if (!empty($convert->convertor['avatar_path']) && strpos($source, $convert->convertor['avatar_path']) !== 0)
+ {
+ $source = path($convert->convertor['avatar_path'], empty($convert->convertor['source_path_absolute'])) . $source;
+ }
+
+ $cachedims = get_image_dim($source);
+
+ if (empty($cachedims) || empty($cachedims[0]) || empty($cachedims[1]))
+ {
+ $default_x = (defined('DEFAULT_AVATAR_X_CUSTOM')) ? DEFAULT_AVATAR_X_CUSTOM : DEFAULT_AVATAR_X;
+ $default_y = (defined('DEFAULT_AVATAR_Y_CUSTOM')) ? DEFAULT_AVATAR_Y_CUSTOM : DEFAULT_AVATAR_Y;
+
+ $cachedims = array($default_x, $default_y);
+ }
+
+ return $cachedims[$axis];
+}
+
+/**
+* Obtain the size of the specified gallery avatar (using the cache if possible) and cache the value
+*/
+function get_gallery_avatar_dim($source, $axis)
+{
+ if (empty($source))
+ {
+ return 0;
+ }
+
+ static $avatar_cache = array();
+
+ if (isset($avatar_cache[$source]))
+ {
+ return $avatar_cache[$source][$axis];
+ }
+
+ global $convert, $phpbb_root_path, $config, $user;
+
+ $orig_source = $source;
+
+ if (!isset($convert->convertor['avatar_gallery_path']))
+ {
+ $convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_GALLERY_PATH'], 'get_gallery_avatar_dim()'), __LINE__, __FILE__);
+ }
+
+ if (!empty($convert->convertor['avatar_gallery_path']) && strpos($source, $convert->convertor['avatar_gallery_path']) !== 0)
+ {
+ $source = path($convert->convertor['avatar_gallery_path'], empty($convert->convertor['source_path_absolute'])) . $source;
+ }
+
+ $avatar_cache[$orig_source] = get_image_dim($source);
+
+ if (empty($avatar_cache[$orig_source]) || empty($avatar_cache[$orig_source][0]) || empty($avatar_cache[$orig_source][1]))
+ {
+ $default_x = (defined('DEFAULT_AVATAR_X_CUSTOM')) ? DEFAULT_AVATAR_X_CUSTOM : DEFAULT_AVATAR_X;
+ $default_y = (defined('DEFAULT_AVATAR_Y_CUSTOM')) ? DEFAULT_AVATAR_Y_CUSTOM : DEFAULT_AVATAR_Y;
+
+ $avatar_cache[$orig_source] = array($default_x, $default_y);
+ }
+
+ return $avatar_cache[$orig_source][$axis];
+}
+
+/**
+* Obtain the size of the specified remote avatar (using the cache if possible) and cache the value
+* Whilst it's unlikely that remote avatars will be duplicated, it is possible so caching seems the best option
+* This should only be called from a post processing step due to the possibility of network timeouts
+*/
+function get_remote_avatar_dim($src, $axis)
+{
+ if (empty($src))
+ {
+ return 0;
+ }
+
+ static $remote_avatar_cache = array();
+
+ // an ugly hack: we assume that the dimensions of each remote avatar are accessed exactly twice (x and y)
+ if (isset($remote_avatar_cache[$src]))
+ {
+ $retval = $remote_avatar_cache[$src][$axis];
+ unset($remote_avatar_cache);
+ return $retval;
+ }
+
+ $url_info = @parse_url($src);
+ if (empty($url_info['host']))
+ {
+ return 0;
+ }
+ $host = $url_info['host'];
+ $port = (isset($url_info['port'])) ? $url_info['port'] : 0;
+ $protocol = (isset($url_info['scheme'])) ? $url_info['scheme'] : 'http';
+ if (empty($port))
+ {
+ switch(strtolower($protocol))
+ {
+ case 'ftp':
+ $port = 21;
+ break;
+
+ case 'https':
+ $port = 443;
+ break;
+
+ default:
+ $port = 80;
+ }
+ }
+
+ $timeout = @ini_get('default_socket_timeout');
+ @ini_set('default_socket_timeout', 2);
+
+ // We're just trying to reach the server to avoid timeouts
+ $fp = @fsockopen($host, $port, $errno, $errstr, 1);
+ if ($fp)
+ {
+ $remote_avatar_cache[$src] = @getimagesize($src);
+ fclose($fp);
+ }
+
+ $default_x = (defined('DEFAULT_AVATAR_X_CUSTOM')) ? DEFAULT_AVATAR_X_CUSTOM : DEFAULT_AVATAR_X;
+ $default_y = (defined('DEFAULT_AVATAR_Y_CUSTOM')) ? DEFAULT_AVATAR_Y_CUSTOM : DEFAULT_AVATAR_Y;
+ $default = array($default_x, $default_y);
+
+ if (empty($remote_avatar_cache[$src]) || empty($remote_avatar_cache[$src][0]) || empty($remote_avatar_cache[$src][1]))
+ {
+ $remote_avatar_cache[$src] = $default;
+ }
+ else
+ {
+ // We trust gallery and uploaded avatars to conform to the size settings; we might have to adjust here
+ if ($remote_avatar_cache[$src][0] > $default_x || $remote_avatar_cache[$src][1] > $default_y)
+ {
+ $bigger = ($remote_avatar_cache[$src][0] > $remote_avatar_cache[$src][1]) ? 0 : 1;
+ $ratio = $default[$bigger] / $remote_avatar_cache[$src][$bigger];
+ $remote_avatar_cache[$src][0] = (int)($remote_avatar_cache[$src][0] * $ratio);
+ $remote_avatar_cache[$src][1] = (int)($remote_avatar_cache[$src][1] * $ratio);
+ }
+ }
+
+ @ini_set('default_socket_timeout', $timeout);
+ return $remote_avatar_cache[$src][$axis];
+}
+
+function set_user_options()
+{
+ global $convert_row;
+
+ // Key need to be set in row, else default value is chosen
+ $keyoptions = array(
+ 'viewimg' => array('bit' => 0, 'default' => 1),
+ 'viewflash' => array('bit' => 1, 'default' => 1),
+ 'viewsmilies' => array('bit' => 2, 'default' => 1),
+ 'viewsigs' => array('bit' => 3, 'default' => 1),
+ 'viewavatars' => array('bit' => 4, 'default' => 1),
+ 'viewcensors' => array('bit' => 5, 'default' => 1),
+ 'attachsig' => array('bit' => 6, 'default' => 0),
+ 'bbcode' => array('bit' => 8, 'default' => 1),
+ 'smilies' => array('bit' => 9, 'default' => 1),
+ 'popuppm' => array('bit' => 10, 'default' => 0),
+ );
+
+ $option_field = 0;
+
+ foreach ($keyoptions as $key => $key_ary)
+ {
+ $value = (isset($convert_row[$key])) ? (int) $convert_row[$key] : $key_ary['default'];
+
+ if ($value && !($option_field & 1 << $key_ary['bit']))
+ {
+ $option_field += 1 << $key_ary['bit'];
+ }
+ }
+
+ return $option_field;
+}
+
+/**
+* Index messages on the fly as we convert them
+* @todo naderman, can you check that this works with the new search plugins as it's use is currently disabled (and thus untested)
+function search_indexing($message = '')
+{
+ global $fulltext_search, $convert_row;
+
+ if (!isset($convert_row['post_id']))
+ {
+ return;
+ }
+
+ if (!$message)
+ {
+ if (!isset($convert_row['message']))
+ {
+ return;
+ }
+
+ $message = $convert_row['message'];
+ }
+
+ $title = (isset($convert_row['title'])) ? $convert_row['title'] : '';
+
+ $fulltext_search->index('post', $convert_row['post_id'], $message, $title, $convert_row['poster_id'], $convert_row['forum_id']);
+}
+*/
+
+function make_unique_filename($filename)
+{
+ if (!strlen($filename))
+ {
+ $filename = md5(unique_id()) . '.dat';
+ }
+ else if ($filename[0] == '.')
+ {
+ $filename = md5(unique_id()) . $filename;
+ }
+ else if (preg_match('/\.([a-z]+)$/i', $filename, $m))
+ {
+ $filename = preg_replace('/\.([a-z]+)$/i', '_' . md5(unique_id()) . '.\1', $filename);
+ }
+ else
+ {
+ $filename .= '_' . md5(unique_id()) . '.dat';
+ }
+
+ return $filename;
+}
+
+function words_unique(&$words)
+{
+ reset($words);
+ $return_array = array();
+
+ $word = current($words);
+ do
+ {
+ $return_array[$word] = $word;
+ }
+ while ($word = next($words));
+
+ return $return_array;
+}
+
+/**
+* Adds a user to the specified group and optionally makes them a group leader
+* This function does not create the group if it does not exist and so should only be called after the groups have been created
+*/
+function add_user_group($group_id, $user_id, $group_leader=false)
+{
+ global $convert, $phpbb_root_path, $config, $user, $db;
+
+ $sql = 'INSERT INTO ' . USER_GROUP_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'group_id' => $group_id,
+ 'user_id' => $user_id,
+ 'group_leader' => ($group_leader) ? 1 : 0,
+ 'user_pending' => 0));
+ $db->sql_query($sql);
+}
+
+// STANDALONE FUNCTIONS
+
+/**
+* Add users to the pre-defined "special" groups
+*
+* @param string $group The name of the special group to add to
+* @param string $select_query An SQL query to retrieve the user(s) to add to the group
+*/
+function user_group_auth($group, $select_query, $use_src_db)
+{
+ global $convert, $phpbb_root_path, $config, $user, $db, $src_db, $same_db;
+
+ if (!in_array($group, array('guests', 'registered', 'registered_coppa', 'global_moderators', 'administrators', 'bots')))
+ {
+ $convert->p_master->error(sprintf($user->lang['CONV_ERROR_WRONG_GROUP'], $group, 'user_group_auth()'), __LINE__, __FILE__, true);
+ return;
+ }
+
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = '" . $db->sql_escape(strtoupper($group)) . "'";
+ $result = $db->sql_query($sql);
+ $group_id = (int) $db->sql_fetchfield('group_id');
+ $db->sql_freeresult($result);
+
+ if (!$group_id)
+ {
+ $convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_GROUP'], $group, 'user_group_auth()'), __LINE__, __FILE__, true);
+ return;
+ }
+
+ if ($same_db || !$use_src_db)
+ {
+ $sql = 'INSERT INTO ' . USER_GROUP_TABLE . ' (user_id, group_id, user_pending)
+ ' . str_replace('{' . strtoupper($group) . '}', $group_id . ', 0', $select_query);
+ $db->sql_query($sql);
+ }
+ else
+ {
+ $result = $src_db->sql_query(str_replace('{' . strtoupper($group) . '}', $group_id . ' ', $select_query));
+ while ($row = $src_db->sql_fetchrow($result))
+ {
+ // this might become quite a lot of INSERTS unfortunately
+ $sql = 'INSERT INTO ' . USER_GROUP_TABLE . " (user_id, group_id, user_pending)
+ VALUES ({$row['user_id']}, $group_id, 0)";
+ $db->sql_query($sql);
+ }
+ $src_db->sql_freeresult($result);
+ }
+}
+
+/**
+* Retrieves configuration information from the source forum and caches it as an array
+* Both database and file driven configuration formats can be handled
+* (the type used is specified in $config_schema, see convert_phpbb20.php for more details)
+*/
+function get_config()
+{
+ static $convert_config;
+ global $user;
+
+ if (isset($convert_config))
+ {
+ return $convert_config;
+ }
+
+ global $src_db, $same_db, $phpbb_root_path, $config;
+ global $convert;
+
+ if ($convert->config_schema['table_format'] != 'file')
+ {
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+
+ $sql = 'SELECT * FROM ' . $convert->src_table_prefix . $convert->config_schema['table_name'];
+ $result = $src_db->sql_query($sql);
+ $row = $src_db->sql_fetchrow($result);
+
+ if (!$row)
+ {
+ $convert->p_master->error($user->lang['CONV_ERROR_GET_CONFIG'], __LINE__, __FILE__);
+ }
+ }
+
+ if (is_array($convert->config_schema['table_format']))
+ {
+ $convert_config = array();
+ list($key, $val) = each($convert->config_schema['table_format']);
+
+ do
+ {
+ $convert_config[$row[$key]] = $row[$val];
+ }
+ while ($row = $src_db->sql_fetchrow($result));
+ $src_db->sql_freeresult($result);
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+ }
+ else if ($convert->config_schema['table_format'] == 'file')
+ {
+ $filename = $convert->options['forum_path'] . '/' . $convert->config_schema['filename'];
+ if (!file_exists($filename))
+ {
+ $convert->p_master->error($user->lang['FILE_NOT_FOUND'] . ': ' . $filename, __LINE__, __FILE__);
+ }
+
+ $convert_config = extract_variables_from_file($filename);
+ if (!empty($convert->config_schema['array_name']))
+ {
+ $convert_config = $convert_config[$convert->config_schema['array_name']];
+ }
+ }
+ else
+ {
+ $convert_config = $row;
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+ }
+
+ if (!sizeof($convert_config))
+ {
+ $convert->p_master->error($user->lang['CONV_ERROR_CONFIG_EMPTY'], __LINE__, __FILE__);
+ }
+
+ return $convert_config;
+}
+
+/**
+* Transfers the relevant configuration information from the source forum
+* The mapping of fields is specified in $config_schema, see convert_phpbb20.php for more details
+*/
+function restore_config($schema)
+{
+ global $db, $config;
+
+ $convert_config = get_config();
+ foreach ($schema['settings'] as $config_name => $src)
+ {
+ if (preg_match('/(.*)\((.*)\)/', $src, $m))
+ {
+ $var = (empty($m[2]) || empty($convert_config[$m[2]])) ? "''" : "'" . addslashes($convert_config[$m[2]]) . "'";
+ $exec = '$config_value = ' . $m[1] . '(' . $var . ');';
+ eval($exec);
+ }
+ else
+ {
+ $config_value = (isset($convert_config[$src])) ? $convert_config[$src] : '';
+ }
+
+ if ($config_value !== '')
+ {
+ // Most are...
+ if (is_string($config_value))
+ {
+ $config_value = truncate_string(utf8_htmlspecialchars($config_value), 255, 255, false);
+ }
+
+ set_config($config_name, $config_value);
+ }
+ }
+}
+
+/**
+* Update the count of PM's in custom folders for all users
+*/
+function update_folder_pm_count()
+{
+ global $db, $convert, $user;
+
+ $sql = 'SELECT user_id, folder_id, COUNT(msg_id) as num_messages
+ FROM ' . PRIVMSGS_TO_TABLE . '
+ WHERE folder_id NOT IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ', ' . PRIVMSGS_INBOX . ', ' . PRIVMSGS_OUTBOX . ', ' . PRIVMSGS_SENTBOX . ')
+ GROUP BY folder_id, user_id';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $db->sql_query('UPDATE ' . PRIVMSGS_FOLDER_TABLE . ' SET pm_count = ' . $row['num_messages'] . '
+ WHERE user_id = ' . $row['user_id'] . ' AND folder_id = ' . $row['folder_id']);
+ }
+ $db->sql_freeresult($result);
+}
+
+// Functions mainly used by the main convertor script
+
+function path($path, $path_relative = true)
+{
+ if ($path === false)
+ {
+ return '';
+ }
+
+ if (substr($path, -1) != '/')
+ {
+ $path .= '/';
+ }
+
+ if (!$path_relative)
+ {
+ return $path;
+ }
+
+ if (substr($path, 0, 1) == '/')
+ {
+ $path = substr($path, 1);
+ }
+
+ return $path;
+}
+
+/**
+* Extract the variables defined in a configuration file
+* @todo As noted by Xore we need to look at this from a security perspective
+*/
+function extract_variables_from_file($_filename)
+{
+ include($_filename);
+
+ $vars = get_defined_vars();
+ unset($vars['_filename']);
+
+ return $vars;
+}
+
+function get_path($src_path, $src_url, $test_file)
+{
+ global $config, $phpbb_root_path, $phpEx;
+
+ $board_config = get_config();
+
+ $test_file = preg_replace('/\.php$/i', ".$phpEx", $test_file);
+ $src_path = path($src_path);
+
+ if (@file_exists($phpbb_root_path . $src_path . $test_file))
+ {
+ return $src_path;
+ }
+
+ if (!empty($src_url) && !empty($board_config['server_name']))
+ {
+ if (!preg_match('#https?://([^/]+)(.*)#i', $src_url, $m))
+ {
+ return false;
+ }
+
+ if ($m[1] != $board_config['server_name'])
+ {
+ return false;
+ }
+
+ $url_parts = explode('/', $m[2]);
+ if (substr($src_url, -1) != '/')
+ {
+ if (preg_match('/.*\.([a-z0-9]{3,4})$/i', $url_parts[sizeof($url_parts) - 1]))
+ {
+ $url_parts[sizeof($url_parts) - 1] = '';
+ }
+ else
+ {
+ $url_parts[] = '';
+ }
+ }
+
+ $script_path = $board_config['script_path'];
+ if (substr($script_path, -1) == '/')
+ {
+ $script_path = substr($script_path, 0, -1);
+ }
+
+ $path_array = array();
+
+ $phpbb_parts = explode('/', $script_path);
+ for ($i = 0; $i < sizeof($url_parts); ++$i)
+ {
+ if ($i < sizeof($phpbb_parts[$i]) && $url_parts[$i] == $phpbb_parts[$i])
+ {
+ $path_array[] = $url_parts[$i];
+ unset($url_parts[$i]);
+ }
+ else
+ {
+ $path = '';
+ for ($j = $i; $j < sizeof($phpbb_parts); ++$j)
+ {
+ $path .= '../';
+ }
+ $path .= implode('/', $url_parts);
+ break;
+ }
+ }
+
+ if (!empty($path))
+ {
+ if (@file_exists($phpbb_root_path . $path . $test_file))
+ {
+ return $path;
+ }
+ }
+ }
+
+ return false;
+}
+
+function compare_table($tables, $tablename, &$prefixes)
+{
+ for ($i = 0, $table_size = sizeof($tables); $i < $table_size; ++$i)
+ {
+ if (preg_match('/(.*)' . $tables[$i] . '$/', $tablename, $m))
+ {
+ if (empty($m[1]))
+ {
+ $m[1] = '*';
+ }
+
+ if (isset($prefixes[$m[1]]))
+ {
+ $prefixes[$m[1]]++;
+ }
+ else
+ {
+ $prefixes[$m[1]] = 1;
+ }
+ }
+ }
+}
+
+/**
+* Grant permissions to a specified user or group
+*
+* @param string $ug_type user|group|user_role|group_role
+* @param mixed $forum_id forum ids (array|int|0) -> 0 == all forums
+* @param mixed $ug_id [int] user_id|group_id : [string] usergroup name
+* @param mixed $acl_list [string] acl entry : [array] acl entries : [string] role entry
+* @param int $setting ACL_YES|ACL_NO|ACL_NEVER
+*/
+function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO)
+{
+ global $db, $convert, $user, $config;
+ static $acl_option_ids, $group_ids;
+
+ if (($ug_type == 'group' || $ug_type == 'group_role') && is_string($ug_id))
+ {
+ if (!isset($group_ids[$ug_id]))
+ {
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = '" . $db->sql_escape(strtoupper($ug_id)) . "'";
+ $result = $db->sql_query_limit($sql, 1);
+ $id = (int) $db->sql_fetchfield('group_id');
+ $db->sql_freeresult($result);
+
+ if (!$id)
+ {
+ return;
+ }
+
+ $group_ids[$ug_id] = $id;
+ }
+
+ $ug_id = (int) $group_ids[$ug_id];
+ }
+
+ $table = ($ug_type == 'user' || $ug_type == 'user_role') ? ACL_USERS_TABLE : ACL_GROUPS_TABLE;
+ $id_field = ($ug_type == 'user' || $ug_type == 'user_role') ? 'user_id' : 'group_id';
+
+ // Role based permissions are the simplest to handle so check for them first
+ if ($ug_type == 'user_role' || $ug_type == 'group_role')
+ {
+ if (is_numeric($forum_id))
+ {
+ $sql = 'SELECT role_id
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_name = 'ROLE_" . $db->sql_escape($acl_list) . "'";
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // If we have no role id there is something wrong here
+ if ($row)
+ {
+ $sql = "INSERT INTO $table ($id_field, forum_id, auth_role_id) VALUES ($ug_id, $forum_id, " . $row['role_id'] . ')';
+ $db->sql_query($sql);
+ }
+ }
+
+ return;
+ }
+
+ // Build correct parameters
+ $auth = array();
+
+ if (!is_array($acl_list))
+ {
+ $auth = array($acl_list => $setting);
+ }
+ else
+ {
+ foreach ($acl_list as $auth_option)
+ {
+ $auth[$auth_option] = $setting;
+ }
+ }
+ unset($acl_list);
+
+ if (!is_array($forum_id))
+ {
+ $forum_id = array($forum_id);
+ }
+
+ // Set any flags as required
+ foreach ($auth as $auth_option => $acl_setting)
+ {
+ $flag = substr($auth_option, 0, strpos($auth_option, '_') + 1);
+ if (empty($auth[$flag]))
+ {
+ $auth[$flag] = $acl_setting;
+ }
+ }
+
+ if (!is_array($acl_option_ids) || empty($acl_option_ids))
+ {
+ $sql = 'SELECT auth_option_id, auth_option
+ FROM ' . ACL_OPTIONS_TABLE;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $acl_option_ids[$row['auth_option']] = $row['auth_option_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ $sql_forum = 'AND ' . $db->sql_in_set('a.forum_id', array_map('intval', $forum_id), false, true);
+
+ $sql = ($ug_type == 'user') ? 'SELECT o.auth_option_id, o.auth_option, a.forum_id, a.auth_setting FROM ' . ACL_USERS_TABLE . ' a, ' . ACL_OPTIONS_TABLE . " o WHERE a.auth_option_id = o.auth_option_id $sql_forum AND a.user_id = $ug_id" : 'SELECT o.auth_option_id, o.auth_option, a.forum_id, a.auth_setting FROM ' . ACL_GROUPS_TABLE . ' a, ' . ACL_OPTIONS_TABLE . " o WHERE a.auth_option_id = o.auth_option_id $sql_forum AND a.group_id = $ug_id";
+ $result = $db->sql_query($sql);
+
+ $cur_auth = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $cur_auth[$row['forum_id']][$row['auth_option_id']] = $row['auth_setting'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql_ary = array();
+ foreach ($forum_id as $forum)
+ {
+ foreach ($auth as $auth_option => $setting)
+ {
+ $auth_option_id = $acl_option_ids[$auth_option];
+
+ if (!$auth_option_id)
+ {
+ continue;
+ }
+
+ switch ($setting)
+ {
+ case ACL_NO:
+ if (isset($cur_auth[$forum][$auth_option_id]))
+ {
+ $sql_ary['delete'][] = "DELETE FROM $table
+ WHERE forum_id = $forum
+ AND auth_option_id = $auth_option_id
+ AND $id_field = $ug_id";
+ }
+ break;
+
+ default:
+ if (!isset($cur_auth[$forum][$auth_option_id]))
+ {
+ $sql_ary['insert'][] = "$ug_id, $forum, $auth_option_id, $setting";
+ }
+ else if ($cur_auth[$forum][$auth_option_id] != $setting)
+ {
+ $sql_ary['update'][] = "UPDATE " . $table . "
+ SET auth_setting = $setting
+ WHERE $id_field = $ug_id
+ AND forum_id = $forum
+ AND auth_option_id = $auth_option_id";
+ }
+ }
+ }
+ }
+ unset($cur_auth);
+
+ $sql = '';
+ foreach ($sql_ary as $sql_type => $sql_subary)
+ {
+ switch ($sql_type)
+ {
+ case 'insert':
+ switch ($db->sql_layer)
+ {
+ case 'mysql':
+ case 'mysql4':
+ $sql = 'VALUES ' . implode(', ', preg_replace('#^(.*?)$#', '(\1)', $sql_subary));
+ break;
+
+ case 'mssql':
+ case 'sqlite':
+ $sql = implode(' UNION ALL ', preg_replace('#^(.*?)$#', 'SELECT \1', $sql_subary));
+ break;
+
+ default:
+ foreach ($sql_subary as $sql)
+ {
+ $sql = "INSERT INTO $table ($id_field, forum_id, auth_option_id, auth_setting) VALUES ($sql)";
+ $db->sql_query($sql);
+ $sql = '';
+ }
+ }
+
+ if ($sql != '')
+ {
+ $sql = "INSERT INTO $table ($id_field, forum_id, auth_option_id, auth_setting) $sql";
+ $db->sql_query($sql);
+ }
+ break;
+
+ case 'update':
+ case 'delete':
+ foreach ($sql_subary as $sql)
+ {
+ $db->sql_query($sql);
+ $sql = '';
+ }
+ break;
+ }
+ unset($sql_ary[$sql_type]);
+ }
+ unset($sql_ary);
+
+}
+
+/**
+* Update the count of unread private messages for all users
+*/
+function update_unread_count()
+{
+ global $db;
+
+ $sql = 'SELECT user_id, COUNT(msg_id) as num_messages
+ FROM ' . PRIVMSGS_TO_TABLE . '
+ WHERE pm_unread = 1
+ AND folder_id <> ' . PRIVMSGS_OUTBOX . '
+ GROUP BY user_id';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_unread_privmsg = ' . $row['num_messages'] . '
+ WHERE user_id = ' . $row['user_id']);
+ }
+ $db->sql_freeresult($result);
+}
+
+/**
+* Add any of the pre-defined "special" groups which are missing from the database
+*/
+function add_default_groups()
+{
+ global $db;
+
+ $default_groups = array(
+ 'GUESTS' => array('', 0, 0),
+ 'REGISTERED' => array('', 0, 0),
+ 'REGISTERED_COPPA' => array('', 0, 0),
+ 'GLOBAL_MODERATORS' => array('00AA00', 1, 0),
+ 'ADMINISTRATORS' => array('AA0000', 1, 1),
+ 'BOTS' => array('9E8DA7', 0, 0),
+ 'NEWLY_REGISTERED' => array('', 0, 0),
+ );
+
+ $sql = 'SELECT *
+ FROM ' . GROUPS_TABLE . '
+ WHERE ' . $db->sql_in_set('group_name', array_keys($default_groups));
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ unset($default_groups[strtoupper($row['group_name'])]);
+ }
+ $db->sql_freeresult($result);
+
+ $sql_ary = array();
+
+ foreach ($default_groups as $name => $data)
+ {
+ $sql_ary[] = array(
+ 'group_name' => (string) $name,
+ 'group_desc' => '',
+ 'group_desc_uid' => '',
+ 'group_desc_bitfield' => '',
+ 'group_type' => GROUP_SPECIAL,
+ 'group_colour' => (string) $data[0],
+ 'group_legend' => (int) $data[1],
+ 'group_founder_manage' => (int) $data[2]
+ );
+ }
+
+ if (sizeof($sql_ary))
+ {
+ $db->sql_multi_insert(GROUPS_TABLE, $sql_ary);
+ }
+}
+
+
+/**
+* Sync post count. We might need to do this in batches.
+*/
+function sync_post_count($offset, $limit)
+{
+ global $db;
+ $sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
+ FROM ' . POSTS_TABLE . '
+ WHERE post_postcount = 1
+ AND post_approved = 1
+ GROUP BY poster_id
+ ORDER BY poster_id';
+ $result = $db->sql_query_limit($sql, $limit, $offset);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $db->sql_query('UPDATE ' . USERS_TABLE . " SET user_posts = {$row['num_posts']} WHERE user_id = {$row['poster_id']}");
+ }
+ $db->sql_freeresult($result);
+}
+
+/**
+* Add the search bots into the database
+* This code should be used in execute_last if the source database did not have bots
+* If you are converting bots this function should not be called
+* @todo We might want to look at sharing the bot list between the install code and this code for consistancy
+*/
+function add_bots()
+{
+ global $db, $convert, $user, $config, $phpbb_root_path, $phpEx;
+
+ $db->sql_query($convert->truncate_statement . BOTS_TABLE);
+
+ $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
+ $result = $db->sql_query($sql);
+ $group_id = (int) $db->sql_fetchfield('group_id', false, $result);
+ $db->sql_freeresult($result);
+
+ if (!$group_id)
+ {
+ add_default_groups();
+
+ $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
+ $result = $db->sql_query($sql);
+ $group_id = (int) $db->sql_fetchfield('group_id', false, $result);
+ $db->sql_freeresult($result);
+
+ if (!$group_id)
+ {
+ global $install;
+ $install->error($user->lang['CONV_ERROR_INCONSISTENT_GROUPS'], __LINE__, __FILE__);
+ }
+ }
+
+ $bots = array(
+ 'AdsBot [Google]' => array('AdsBot-Google', ''),
+ 'Alexa [Bot]' => array('ia_archiver', ''),
+ 'Alta Vista [Bot]' => array('Scooter/', ''),
+ 'Ask Jeeves [Bot]' => array('Ask Jeeves', ''),
+ 'Baidu [Spider]' => array('Baiduspider+(', ''),
+ 'Exabot [Bot]' => array('Exabot/', ''),
+ 'FAST Enterprise [Crawler]' => array('FAST Enterprise Crawler', ''),
+ 'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''),
+ 'Francis [Bot]' => array('http://www.neomo.de/', ''),
+ 'Gigabot [Bot]' => array('Gigabot/', ''),
+ 'Google Adsense [Bot]' => array('Mediapartners-Google', ''),
+ 'Google Desktop' => array('Google Desktop', ''),
+ 'Google Feedfetcher' => array('Feedfetcher-Google', ''),
+ 'Google [Bot]' => array('Googlebot', ''),
+ 'Heise IT-Markt [Crawler]' => array('heise-IT-Markt-Crawler', ''),
+ 'Heritrix [Crawler]' => array('heritrix/1.', ''),
+ 'IBM Research [Bot]' => array('ibm.com/cs/crawler', ''),
+ 'ICCrawler - ICjobs' => array('ICCrawler - ICjobs', ''),
+ 'ichiro [Crawler]' => array('ichiro/2', ''),
+ 'Majestic-12 [Bot]' => array('MJ12bot/', ''),
+ 'Metager [Bot]' => array('MetagerBot/', ''),
+ 'MSN NewsBlogs' => array('msnbot-NewsBlogs/', ''),
+ 'MSN [Bot]' => array('msnbot/', ''),
+ 'MSNbot Media' => array('msnbot-media/', ''),
+ 'NG-Search [Bot]' => array('NG-Search/', ''),
+ 'Nutch [Bot]' => array('http://lucene.apache.org/nutch/', ''),
+ 'Nutch/CVS [Bot]' => array('NutchCVS/', ''),
+ 'OmniExplorer [Bot]' => array('OmniExplorer_Bot/', ''),
+ 'Online link [Validator]' => array('online link validator', ''),
+ 'psbot [Picsearch]' => array('psbot/0', ''),
+ 'Seekport [Bot]' => array('Seekbot/', ''),
+ 'Sensis [Crawler]' => array('Sensis Web Crawler', ''),
+ 'SEO Crawler' => array('SEO search Crawler/', ''),
+ 'Seoma [Crawler]' => array('Seoma [SEO Crawler]', ''),
+ 'SEOSearch [Crawler]' => array('SEOsearch/', ''),
+ 'Snappy [Bot]' => array('Snappy/1.1 ( http://www.urltrends.com/ )', ''),
+ 'Steeler [Crawler]' => array('http://www.tkl.iis.u-tokyo.ac.jp/~crawler/', ''),
+ 'Synoo [Bot]' => array('SynooBot/', ''),
+ 'Telekom [Bot]' => array('crawleradmin.t-info@telekom.de', ''),
+ 'TurnitinBot [Bot]' => array('TurnitinBot/', ''),
+ 'Voyager [Bot]' => array('voyager/1.0', ''),
+ 'W3 [Sitesearch]' => array('W3 SiteSearch Crawler', ''),
+ 'W3C [Linkcheck]' => array('W3C-checklink/', ''),
+ 'W3C [Validator]' => array('W3C_*Validator', ''),
+ 'WiseNut [Bot]' => array('http://www.WISEnutbot.com', ''),
+ 'YaCy [Bot]' => array('yacybot', ''),
+ 'Yahoo MMCrawler [Bot]' => array('Yahoo-MMCrawler/', ''),
+ 'Yahoo Slurp [Bot]' => array('Yahoo! DE Slurp', ''),
+ 'Yahoo [Bot]' => array('Yahoo! Slurp', ''),
+ 'YahooSeeker [Bot]' => array('YahooSeeker/', ''),
+ );
+
+ if (!function_exists('user_add'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
+
+ foreach ($bots as $bot_name => $bot_ary)
+ {
+ $user_row = array(
+ 'user_type' => USER_IGNORE,
+ 'group_id' => $group_id,
+ 'username' => $bot_name,
+ 'user_regdate' => time(),
+ 'user_password' => '',
+ 'user_colour' => '9E8DA7',
+ 'user_email' => '',
+ 'user_lang' => $config['default_lang'],
+ 'user_style' => 1,
+ 'user_timezone' => 0,
+ 'user_allow_massemail' => 0,
+ );
+
+ $user_id = user_add($user_row);
+
+ if ($user_id)
+ {
+ $sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'bot_active' => 1,
+ 'bot_name' => $bot_name,
+ 'user_id' => $user_id,
+ 'bot_agent' => $bot_ary[0],
+ 'bot_ip' => $bot_ary[1])
+ );
+ $db->sql_query($sql);
+ }
+ }
+}
+
+/**
+* Update any dynamic configuration variables after the conversion is finished
+* @todo Confirm that this updates all relevant values since it has not necessarily been kept in sync with all changes
+*/
+function update_dynamic_config()
+{
+ global $db, $config;
+
+ // Get latest username
+ $sql = 'SELECT user_id, username, user_colour
+ FROM ' . USERS_TABLE . '
+ WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')';
+
+ if (!empty($config['increment_user_id']))
+ {
+ $sql .= ' AND user_id <> ' . $config['increment_user_id'];
+ }
+
+ $sql .= ' ORDER BY user_id DESC';
+
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ set_config('newest_user_id', $row['user_id'], true);
+ set_config('newest_username', $row['username'], true);
+ set_config('newest_user_colour', $row['user_colour'], true);
+ }
+
+// Also do not reset record online user/date. There will be old data or the fresh data from the schema.
+// set_config('record_online_users', 1, true);
+// set_config('record_online_date', time(), true);
+
+ $sql = 'SELECT COUNT(post_id) AS stat
+ FROM ' . POSTS_TABLE . '
+ WHERE post_approved = 1';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ set_config('num_posts', (int) $row['stat'], true);
+
+ $sql = 'SELECT COUNT(topic_id) AS stat
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_approved = 1';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ set_config('num_topics', (int) $row['stat'], true);
+
+ $sql = 'SELECT COUNT(user_id) AS stat
+ FROM ' . USERS_TABLE . '
+ WHERE user_type IN (' . USER_NORMAL . ',' . USER_FOUNDER . ')';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ set_config('num_users', (int) $row['stat'], true);
+
+ $sql = 'SELECT COUNT(attach_id) as stat
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE is_orphan = 0';
+ $result = $db->sql_query($sql);
+ set_config('num_files', (int) $db->sql_fetchfield('stat'), true);
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT SUM(filesize) as stat
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE is_orphan = 0';
+ $result = $db->sql_query($sql);
+ set_config('upload_dir_size', (float) $db->sql_fetchfield('stat'), true);
+ $db->sql_freeresult($result);
+
+ /**
+ * We do not resync users post counts - this can be done by the admin after conversion if wanted.
+ $sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
+ FROM ' . POSTS_TABLE . '
+ WHERE post_postcount = 1
+ GROUP BY poster_id';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $db->sql_query('UPDATE ' . USERS_TABLE . " SET user_posts = {$row['num_posts']} WHERE user_id = {$row['poster_id']}");
+ }
+ $db->sql_freeresult($result);
+ */
+}
+
+/**
+* Updates topics_posted entries
+*/
+function update_topics_posted()
+{
+ global $db, $config;
+
+ switch ($db->sql_layer)
+ {
+ case 'sqlite':
+ case 'firebird':
+ $db->sql_query('DELETE FROM ' . TOPICS_POSTED_TABLE);
+ break;
+
+ default:
+ $db->sql_query('TRUNCATE TABLE ' . TOPICS_POSTED_TABLE);
+ break;
+ }
+
+ // This can get really nasty... therefore we only do the last six months
+ $get_from_time = time() - (6 * 4 * 7 * 24 * 60 * 60);
+
+ // Select forum ids, do not include categories
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_type <> ' . FORUM_CAT;
+ $result = $db->sql_query($sql);
+
+ $forum_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_ids[] = $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // Any global announcements? ;)
+ $forum_ids[] = 0;
+
+ // Now go through the forums and get us some topics...
+ foreach ($forum_ids as $forum_id)
+ {
+ $sql = 'SELECT p.poster_id, p.topic_id
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t
+ WHERE t.forum_id = ' . $forum_id . '
+ AND t.topic_moved_id = 0
+ AND t.topic_last_post_time > ' . $get_from_time . '
+ AND t.topic_id = p.topic_id
+ AND p.poster_id <> ' . ANONYMOUS . '
+ GROUP BY p.poster_id, p.topic_id';
+ $result = $db->sql_query($sql);
+
+ $posted = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $posted[$row['poster_id']][] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql_ary = array();
+ foreach ($posted as $user_id => $topic_row)
+ {
+ foreach ($topic_row as $topic_id)
+ {
+ $sql_ary[] = array(
+ 'user_id' => (int) $user_id,
+ 'topic_id' => (int) $topic_id,
+ 'topic_posted' => 1,
+ );
+ }
+ }
+ unset($posted);
+
+ if (sizeof($sql_ary))
+ {
+ $db->sql_multi_insert(TOPICS_POSTED_TABLE, $sql_ary);
+ }
+ }
+}
+
+/**
+* Ensure that all users have a default group specified and update related information such as their colour
+*/
+function fix_empty_primary_groups()
+{
+ global $db;
+
+ // Set group ids for users not already having it
+ $sql = 'UPDATE ' . USERS_TABLE . ' SET group_id = ' . get_group_id('registered') . '
+ WHERE group_id = 0 AND user_type = ' . USER_INACTIVE;
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . USERS_TABLE . ' SET group_id = ' . get_group_id('registered') . '
+ WHERE group_id = 0 AND user_type = ' . USER_NORMAL;
+ $db->sql_query($sql);
+
+ $db->sql_query('UPDATE ' . USERS_TABLE . ' SET group_id = ' . get_group_id('guests') . ' WHERE user_id = ' . ANONYMOUS);
+
+ $sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . ' WHERE group_id = ' . get_group_id('administrators');
+ $result = $db->sql_query($sql);
+
+ $user_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $user_ids[] = $row['user_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($user_ids))
+ {
+ $db->sql_query('UPDATE ' . USERS_TABLE . ' SET group_id = ' . get_group_id('administrators') . '
+ WHERE group_id = 0 AND ' . $db->sql_in_set('user_id', $user_ids));
+ }
+
+ $sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . ' WHERE group_id = ' . get_group_id('global_moderators');
+
+ $user_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $user_ids[] = $row['user_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($user_ids))
+ {
+ $db->sql_query('UPDATE ' . USERS_TABLE . ' SET group_id = ' . get_group_id('global_moderators') . '
+ WHERE group_id = 0 AND ' . $db->sql_in_set('user_id', $user_ids));
+ }
+
+ // Set user colour
+ $sql = 'SELECT group_id, group_colour FROM ' . GROUPS_TABLE . "
+ WHERE group_colour <> ''";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $db->sql_query('UPDATE ' . USERS_TABLE . " SET user_colour = '{$row['group_colour']}' WHERE group_id = {$row['group_id']}");
+ }
+ $db->sql_freeresult($result);
+}
+
+/**
+* Cleanly remove invalid user entries after converting the users table...
+*/
+function remove_invalid_users()
+{
+ global $convert, $db, $phpEx, $phpbb_root_path;
+
+ // username_clean is UNIQUE
+ $sql = 'SELECT user_id
+ FROM ' . USERS_TABLE . "
+ WHERE username_clean = ''";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ if (!function_exists('user_delete'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
+
+ user_delete('remove', $row['user_id']);
+ }
+}
+
+function convert_bbcode($message, $convert_size = true, $extended_bbcodes = false)
+{
+ static $orig, $repl, $origx, $replx, $str_from, $str_to;
+
+ if (empty($orig))
+ {
+ $orig = $repl = array();
+
+ $orig[] = '#\[(php|sql)\](.*?)\[/(php|sql)\]#is';
+ $repl[] = '[code]\2[/code]';
+
+ $orig[] = '#\[font=[^\]]+\](.*?)\[/font\]#is';
+ $repl[] = '\1';
+
+ $orig[] = '#\[align=[a-z]+\](.*?)\[/align\]#is';
+ $repl[] = '\1';
+
+ $orig[] = '#\[/list=.*?\]#is';
+ $repl[] = '[/list]';
+
+ $origx = array(
+ '#\[glow[^\]]+\](.*?)\[/glow\]#is',
+ '#\[shadow[^\]]+\](.*?)\[/shadow\]#is',
+ '#\[flash[^\]]+\](.*?)\[/flash\]#is'
+ );
+
+ $replx = array(
+ '\1',
+ '\1',
+ '[url=\1]Flash[/url]'
+ );
+
+ $str_from = array(
+ '[ftp]', '[/ftp]',
+ '[ftp=', '[/ftp]',
+ '[pre]', '[/pre]',
+ '[table]', '[/table]',
+ '[td]', '[/td]',
+ '[tr]', '[/tr]',
+ '[s]', '[/s]',
+ '[left]', '[/left]',
+ '[right]', '[/right]',
+ '[center]', '[/center]',
+ '[sub]', '[/sub]',
+ '[sup]', '[/sup]',
+ '[tt]', '[/tt]',
+ '[move]', '[/move]',
+ '[hr]'
+ );
+
+ $str_to = array(
+ '[url]', '[/url]',
+ '[url=', '[/url]',
+ '[code]', '[/code]',
+ "\n", '',
+ '', '',
+ "\n", '',
+ '', '',
+ '', '',
+ '', '',
+ '', '',
+ '', '',
+ '', '',
+ '', '',
+ '', '',
+ "\n\n"
+ );
+
+ for ($i = 0; $i < sizeof($str_from); ++$i)
+ {
+ $origx[] = '#\\' . str_replace(']', '\\]', $str_from[$i]) . '#is';
+ $replx[] = $str_to[$i];
+ }
+ }
+
+ if (preg_match_all('#\[email=([^\]]+)\](.*?)\[/email\]#i', $message, $m))
+ {
+ for ($i = 0; $i < sizeof($m[1]); ++$i)
+ {
+ if ($m[1][$i] == $m[2][$i])
+ {
+ $message = str_replace($m[0][$i], '[email]' . $m[1][$i] . '[/email]', $message);
+ }
+ else
+ {
+ $message = str_replace($m[0][$i], $m[2][$i] . ' ([email]' . $m[1][$i] . '[/email])', $message);
+ }
+ }
+ }
+
+ if ($convert_size && preg_match('#\[size=[0-9]+\].*?\[/size\]#i', $message))
+ {
+ $size = array(9, 9, 12, 15, 18, 24, 29, 29, 29, 29);
+ $message = preg_replace('#\[size=([0-9]+)\](.*?)\[/size\]#i', '[size=\1]\2[/size]', $message);
+ $message = preg_replace('#\[size=[0-9]{2,}\](.*?)\[/size\]#i', '[size=29]\1[/size]', $message);
+
+ for ($i = sizeof($size); $i; )
+ {
+ $i--;
+ $message = str_replace('[size=' . $i . ']', '[size=' . $size[$i] . ']', $message);
+ }
+ }
+
+ if ($extended_bbcodes)
+ {
+ $message = preg_replace($origx, $replx, $message);
+ }
+
+ $message = preg_replace($orig, $repl, $message);
+ return $message;
+}
+
+
+function copy_file($src, $trg, $overwrite = false, $die_on_failure = true, $source_relative_path = true)
+{
+ global $convert, $phpbb_root_path, $config, $user, $db;
+
+ if (substr($trg, -1) == '/')
+ {
+ $trg .= utf8_basename($src);
+ }
+ $src_path = relative_base($src, $source_relative_path, __LINE__, __FILE__);
+ $trg_path = $trg;
+
+ if (!$overwrite && @file_exists($trg_path))
+ {
+ return true;
+ }
+
+ if (!@file_exists($src_path))
+ {
+ return;
+ }
+
+ $path = $phpbb_root_path;
+ $parts = explode('/', $trg);
+ unset($parts[sizeof($parts) - 1]);
+
+ for ($i = 0; $i < sizeof($parts); ++$i)
+ {
+ $path .= $parts[$i] . '/';
+
+ if (!is_dir($path))
+ {
+ @mkdir($path, 0777);
+ }
+ }
+
+ if (!is_writable($path))
+ {
+ @chmod($path, 0777);
+ }
+
+ if (!@copy($src_path, $phpbb_root_path . $trg_path))
+ {
+ $convert->p_master->error(sprintf($user->lang['COULD_NOT_COPY'], $src_path, $phpbb_root_path . $trg_path), __LINE__, __FILE__, !$die_on_failure);
+ return;
+ }
+
+ if ($perm = @fileperms($src_path))
+ {
+ @chmod($phpbb_root_path . $trg_path, $perm);
+ }
+
+ return true;
+}
+
+function copy_dir($src, $trg, $copy_subdirs = true, $overwrite = false, $die_on_failure = true, $source_relative_path = true)
+{
+ global $convert, $phpbb_root_path, $config, $user, $db;
+
+ $dirlist = $filelist = $bad_dirs = array();
+ $src = path($src, $source_relative_path);
+ $trg = path($trg);
+ $src_path = relative_base($src, $source_relative_path, __LINE__, __FILE__);
+ $trg_path = $phpbb_root_path . $trg;
+
+ if (!is_dir($trg_path))
+ {
+ @mkdir($trg_path, 0777);
+ @chmod($trg_path, 0777);
+ }
+
+ if (!@is_writable($trg_path))
+ {
+ $bad_dirs[] = path($config['script_path']) . $trg;
+ }
+
+ if ($handle = @opendir($src_path))
+ {
+ while ($entry = readdir($handle))
+ {
+ if ($entry[0] == '.' || $entry == 'CVS' || $entry == 'index.htm')
+ {
+ continue;
+ }
+
+ if (is_dir($src_path . $entry))
+ {
+ $dirlist[] = $entry;
+ }
+ else
+ {
+ $filelist[] = $entry;
+ }
+ }
+ closedir($handle);
+ }
+ else if ($dir = @dir($src_path))
+ {
+ while ($entry = $dir->read())
+ {
+ if ($entry[0] == '.' || $entry == 'CVS' || $entry == 'index.htm')
+ {
+ continue;
+ }
+
+ if (is_dir($src_path . $entry))
+ {
+ $dirlist[] = $entry;
+ }
+ else
+ {
+ $filelist[] = $entry;
+ }
+ }
+ $dir->close();
+ }
+ else
+ {
+ $convert->p_master->error(sprintf($user->lang['CONV_ERROR_COULD_NOT_READ'], relative_base($src, $source_relative_path)), __LINE__, __FILE__);
+ }
+
+ if ($copy_subdirs)
+ {
+ for ($i = 0; $i < sizeof($dirlist); ++$i)
+ {
+ $dir = $dirlist[$i];
+
+ if ($dir == 'CVS')
+ {
+ continue;
+ }
+
+ if (!is_dir($trg_path . $dir))
+ {
+ @mkdir($trg_path . $dir, 0777);
+ @chmod($trg_path . $dir, 0777);
+ }
+
+ if (!@is_writable($trg_path . $dir))
+ {
+ $bad_dirs[] = $trg . $dir;
+ $bad_dirs[] = $trg_path . $dir;
+ }
+
+ if (!sizeof($bad_dirs))
+ {
+ copy_dir($src . $dir, $trg . $dir, true, $overwrite, $die_on_failure, $source_relative_path);
+ }
+ }
+ }
+
+ if (sizeof($bad_dirs))
+ {
+ $str = (sizeof($bad_dirs) == 1) ? $user->lang['MAKE_FOLDER_WRITABLE'] : $user->lang['MAKE_FOLDERS_WRITABLE'];
+ sort($bad_dirs);
+ $convert->p_master->error(sprintf($str, implode('<br />', $bad_dirs)), __LINE__, __FILE__);
+ }
+
+ for ($i = 0; $i < sizeof($filelist); ++$i)
+ {
+ copy_file($src . $filelist[$i], $trg . $filelist[$i], $overwrite, $die_on_failure, $source_relative_path);
+ }
+}
+
+function relative_base($path, $is_relative = true, $line = false, $file = false)
+{
+ global $convert, $phpbb_root_path, $config, $user, $db;
+
+ if (!$is_relative)
+ {
+ return $path;
+ }
+
+ if (empty($convert->options['forum_path']) && $is_relative)
+ {
+ $line = $line ? $line : __LINE__;
+ $file = $file ? $file : __FILE__;
+
+ $convert->p_master->error($user->lang['CONV_ERROR_NO_FORUM_PATH'], $line, $file);
+ }
+
+ return $convert->options['forum_path'] . '/' . $path;
+}
+
+function get_smiley_display()
+{
+ static $smiley_count = 0;
+ $smiley_count++;
+ return ($smiley_count < 50) ? 1 : 0;
+}
+
+
+function fill_dateformat($user_dateformat)
+{
+ global $config;
+
+ return ((empty($user_dateformat)) ? $config['default_dateformat'] : $user_dateformat);
+}
+
+
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
new file mode 100644
index 0000000000..cec1becb6e
--- /dev/null
+++ b/phpBB/includes/functions_display.php
@@ -0,0 +1,1277 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Display Forums
+*/
+function display_forums($root_data = '', $display_moderators = true, $return_moderators = false)
+{
+ global $db, $auth, $user, $template;
+ global $phpbb_root_path, $phpEx, $config;
+
+ $forum_rows = $subforums = $forum_ids = $forum_ids_moderator = $forum_moderators = $active_forum_ary = array();
+ $parent_id = $visible_forums = 0;
+ $sql_from = '';
+
+ // Mark forums read?
+ $mark_read = request_var('mark', '');
+
+ if ($mark_read == 'all')
+ {
+ $mark_read = '';
+ }
+
+ if (!$root_data)
+ {
+ if ($mark_read == 'forums')
+ {
+ $mark_read = 'all';
+ }
+
+ $root_data = array('forum_id' => 0);
+ $sql_where = '';
+ }
+ else
+ {
+ $sql_where = 'left_id > ' . $root_data['left_id'] . ' AND left_id < ' . $root_data['right_id'];
+ }
+
+ // Display list of active topics for this category?
+ $show_active = (isset($root_data['forum_flags']) && ($root_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS)) ? true : false;
+
+ $sql_array = array(
+ 'SELECT' => 'f.*',
+ 'FROM' => array(
+ FORUMS_TABLE => 'f'
+ ),
+ 'LEFT_JOIN' => array(),
+ );
+
+ if ($config['load_db_lastread'] && $user->data['is_registered'])
+ {
+ $sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TRACK_TABLE => 'ft'), 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id');
+ $sql_array['SELECT'] .= ', ft.mark_time';
+ }
+ else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
+
+ if (!$user->data['is_registered'])
+ {
+ $user->data['user_lastmark'] = (isset($tracking_topics['l'])) ? (int) (base_convert($tracking_topics['l'], 36, 10) + $config['board_startdate']) : 0;
+ }
+ }
+
+ if ($show_active)
+ {
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(FORUMS_ACCESS_TABLE => 'fa'),
+ 'ON' => "fa.forum_id = f.forum_id AND fa.session_id = '" . $db->sql_escape($user->session_id) . "'"
+ );
+
+ $sql_array['SELECT'] .= ', fa.user_id';
+ }
+
+ $sql = $db->sql_build_query('SELECT', array(
+ 'SELECT' => $sql_array['SELECT'],
+ 'FROM' => $sql_array['FROM'],
+ 'LEFT_JOIN' => $sql_array['LEFT_JOIN'],
+
+ 'WHERE' => $sql_where,
+
+ 'ORDER_BY' => 'f.left_id',
+ ));
+
+ $result = $db->sql_query($sql);
+
+ $forum_tracking_info = array();
+ $branch_root_id = $root_data['forum_id'];
+
+ // Check for unread global announcements (index page only)
+ $ga_unread = false;
+ if ($root_data['forum_id'] == 0)
+ {
+ $unread_ga_list = get_unread_topics($user->data['user_id'], 'AND t.forum_id = 0', '', 1);
+
+ if (!empty($unread_ga_list))
+ {
+ $ga_unread = true;
+ }
+ }
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_id = $row['forum_id'];
+
+ // Mark forums read?
+ if ($mark_read == 'forums' || $mark_read == 'all')
+ {
+ if ($auth->acl_get('f_list', $forum_id))
+ {
+ $forum_ids[] = $forum_id;
+ continue;
+ }
+ }
+
+ // Category with no members
+ if ($row['forum_type'] == FORUM_CAT && ($row['left_id'] + 1 == $row['right_id']))
+ {
+ continue;
+ }
+
+ // Skip branch
+ if (isset($right_id))
+ {
+ if ($row['left_id'] < $right_id)
+ {
+ continue;
+ }
+ unset($right_id);
+ }
+
+ if (!$auth->acl_get('f_list', $forum_id))
+ {
+ // if the user does not have permissions to list this forum, skip everything until next branch
+ $right_id = $row['right_id'];
+ continue;
+ }
+
+ $forum_ids[] = $forum_id;
+
+ if ($config['load_db_lastread'] && $user->data['is_registered'])
+ {
+ $forum_tracking_info[$forum_id] = (!empty($row['mark_time'])) ? $row['mark_time'] : $user->data['user_lastmark'];
+ }
+ else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ if (!$user->data['is_registered'])
+ {
+ $user->data['user_lastmark'] = (isset($tracking_topics['l'])) ? (int) (base_convert($tracking_topics['l'], 36, 10) + $config['board_startdate']) : 0;
+ }
+ $forum_tracking_info[$forum_id] = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate']) : $user->data['user_lastmark'];
+ }
+
+ // Count the difference of real to public topics, so we can display an information to moderators
+ $row['forum_id_unapproved_topics'] = ($auth->acl_get('m_approve', $forum_id) && ($row['forum_topics_real'] != $row['forum_topics'])) ? $forum_id : 0;
+ $row['forum_topics'] = ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] : $row['forum_topics'];
+
+ // Display active topics from this forum?
+ if ($show_active && $row['forum_type'] == FORUM_POST && $auth->acl_get('f_read', $forum_id) && ($row['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS))
+ {
+ if (!isset($active_forum_ary['forum_topics']))
+ {
+ $active_forum_ary['forum_topics'] = 0;
+ }
+
+ if (!isset($active_forum_ary['forum_posts']))
+ {
+ $active_forum_ary['forum_posts'] = 0;
+ }
+
+ $active_forum_ary['forum_id'][] = $forum_id;
+ $active_forum_ary['enable_icons'][] = $row['enable_icons'];
+ $active_forum_ary['forum_topics'] += $row['forum_topics'];
+ $active_forum_ary['forum_posts'] += $row['forum_posts'];
+
+ // If this is a passworded forum we do not show active topics from it if the user is not authorised to view it...
+ if ($row['forum_password'] && $row['user_id'] != $user->data['user_id'])
+ {
+ $active_forum_ary['exclude_forum_id'][] = $forum_id;
+ }
+ }
+
+ //
+ if ($row['parent_id'] == $root_data['forum_id'] || $row['parent_id'] == $branch_root_id)
+ {
+ if ($row['forum_type'] != FORUM_CAT)
+ {
+ $forum_ids_moderator[] = (int) $forum_id;
+ }
+
+ // Direct child of current branch
+ $parent_id = $forum_id;
+ $forum_rows[$forum_id] = $row;
+
+ if ($row['forum_type'] == FORUM_CAT && $row['parent_id'] == $root_data['forum_id'])
+ {
+ $branch_root_id = $forum_id;
+ }
+ $forum_rows[$parent_id]['forum_id_last_post'] = $row['forum_id'];
+ $forum_rows[$parent_id]['orig_forum_last_post_time'] = $row['forum_last_post_time'];
+ }
+ else if ($row['forum_type'] != FORUM_CAT)
+ {
+ $subforums[$parent_id][$forum_id]['display'] = ($row['display_on_index']) ? true : false;
+ $subforums[$parent_id][$forum_id]['name'] = $row['forum_name'];
+ $subforums[$parent_id][$forum_id]['orig_forum_last_post_time'] = $row['forum_last_post_time'];
+ $subforums[$parent_id][$forum_id]['children'] = array();
+
+ if (isset($subforums[$parent_id][$row['parent_id']]) && !$row['display_on_index'])
+ {
+ $subforums[$parent_id][$row['parent_id']]['children'][] = $forum_id;
+ }
+
+ if (!$forum_rows[$parent_id]['forum_id_unapproved_topics'] && $row['forum_id_unapproved_topics'])
+ {
+ $forum_rows[$parent_id]['forum_id_unapproved_topics'] = $forum_id;
+ }
+
+ $forum_rows[$parent_id]['forum_topics'] += $row['forum_topics'];
+
+ // Do not list redirects in LINK Forums as Posts.
+ if ($row['forum_type'] != FORUM_LINK)
+ {
+ $forum_rows[$parent_id]['forum_posts'] += $row['forum_posts'];
+ }
+
+ if ($row['forum_last_post_time'] > $forum_rows[$parent_id]['forum_last_post_time'])
+ {
+ $forum_rows[$parent_id]['forum_last_post_id'] = $row['forum_last_post_id'];
+ $forum_rows[$parent_id]['forum_last_post_subject'] = $row['forum_last_post_subject'];
+ $forum_rows[$parent_id]['forum_last_post_time'] = $row['forum_last_post_time'];
+ $forum_rows[$parent_id]['forum_last_poster_id'] = $row['forum_last_poster_id'];
+ $forum_rows[$parent_id]['forum_last_poster_name'] = $row['forum_last_poster_name'];
+ $forum_rows[$parent_id]['forum_last_poster_colour'] = $row['forum_last_poster_colour'];
+ $forum_rows[$parent_id]['forum_id_last_post'] = $forum_id;
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // Handle marking posts
+ if ($mark_read == 'forums' || $mark_read == 'all')
+ {
+ $redirect = build_url(array('mark', 'hash'));
+ $token = request_var('hash', '');
+ if (check_link_hash($token, 'global'))
+ {
+ if ($mark_read == 'all')
+ {
+ markread('all');
+ $message = sprintf($user->lang['RETURN_INDEX'], '<a href="' . $redirect . '">', '</a>');
+ }
+ else
+ {
+ // Add 0 to forums array to mark global announcements correctly
+ $forum_ids[] = 0;
+ markread('topics', $forum_ids);
+ $message = sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect . '">', '</a>');
+ }
+ meta_refresh(3, $redirect);
+ trigger_error($user->lang['FORUMS_MARKED'] . '<br /><br />' . $message);
+ }
+ else
+ {
+ $message = sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>');
+ meta_refresh(3, $redirect);
+ trigger_error($message);
+ }
+
+ }
+
+ // Grab moderators ... if necessary
+ if ($display_moderators)
+ {
+ if ($return_moderators)
+ {
+ $forum_ids_moderator[] = $root_data['forum_id'];
+ }
+ get_moderators($forum_moderators, $forum_ids_moderator);
+ }
+
+ // Used to tell whatever we have to create a dummy category or not.
+ $last_catless = true;
+ foreach ($forum_rows as $row)
+ {
+ // Empty category
+ if ($row['parent_id'] == $root_data['forum_id'] && $row['forum_type'] == FORUM_CAT)
+ {
+ $template->assign_block_vars('forumrow', array(
+ 'S_IS_CAT' => true,
+ 'FORUM_ID' => $row['forum_id'],
+ 'FORUM_NAME' => $row['forum_name'],
+ 'FORUM_DESC' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']),
+ 'FORUM_FOLDER_IMG' => '',
+ 'FORUM_FOLDER_IMG_SRC' => '',
+ 'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang['FORUM_CAT'] . '" />' : '',
+ 'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
+ 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']))
+ );
+
+ continue;
+ }
+
+ $visible_forums++;
+ $forum_id = $row['forum_id'];
+
+ $forum_unread = (isset($forum_tracking_info[$forum_id]) && $row['orig_forum_last_post_time'] > $forum_tracking_info[$forum_id]) ? true : false;
+
+ // Mark the first visible forum on index as unread if there's any unread global announcement
+ if (($forum_id == $forum_ids_moderator[0]) && ($root_data['forum_id'] == 0) && $ga_unread)
+ {
+ $forum_unread = true;
+ }
+
+ $folder_image = $folder_alt = $l_subforums = '';
+ $subforums_list = array();
+
+ // Generate list of subforums if we need to
+ if (isset($subforums[$forum_id]))
+ {
+ foreach ($subforums[$forum_id] as $subforum_id => $subforum_row)
+ {
+ $subforum_unread = (isset($forum_tracking_info[$subforum_id]) && $subforum_row['orig_forum_last_post_time'] > $forum_tracking_info[$subforum_id]) ? true : false;
+
+ if (!$subforum_unread && !empty($subforum_row['children']))
+ {
+ foreach ($subforum_row['children'] as $child_id)
+ {
+ if (isset($forum_tracking_info[$child_id]) && $subforums[$forum_id][$child_id]['orig_forum_last_post_time'] > $forum_tracking_info[$child_id])
+ {
+ // Once we found an unread child forum, we can drop out of this loop
+ $subforum_unread = true;
+ break;
+ }
+ }
+ }
+
+ if ($subforum_row['display'] && $subforum_row['name'])
+ {
+ $subforums_list[] = array(
+ 'link' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $subforum_id),
+ 'name' => $subforum_row['name'],
+ 'unread' => $subforum_unread,
+ );
+ }
+ else
+ {
+ unset($subforums[$forum_id][$subforum_id]);
+ }
+
+ // If one subforum is unread the forum gets unread too...
+ if ($subforum_unread)
+ {
+ $forum_unread = true;
+ }
+ }
+
+ $l_subforums = (sizeof($subforums[$forum_id]) == 1) ? $user->lang['SUBFORUM'] . ': ' : $user->lang['SUBFORUMS'] . ': ';
+ $folder_image = ($forum_unread) ? 'forum_unread_subforum' : 'forum_read_subforum';
+ }
+ else
+ {
+ switch ($row['forum_type'])
+ {
+ case FORUM_POST:
+ $folder_image = ($forum_unread) ? 'forum_unread' : 'forum_read';
+ break;
+
+ case FORUM_LINK:
+ $folder_image = 'forum_link';
+ break;
+ }
+ }
+
+ // Which folder should we display?
+ if ($row['forum_status'] == ITEM_LOCKED)
+ {
+ $folder_image = ($forum_unread) ? 'forum_unread_locked' : 'forum_read_locked';
+ $folder_alt = 'FORUM_LOCKED';
+ }
+ else
+ {
+ $folder_alt = ($forum_unread) ? 'NEW_POSTS' : 'NO_NEW_POSTS';
+ }
+
+ // Create last post link information, if appropriate
+ if ($row['forum_last_post_id'])
+ {
+ $last_post_subject = $row['forum_last_post_subject'];
+ $last_post_time = $user->format_date($row['forum_last_post_time']);
+ $last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&amp;p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
+ }
+ else
+ {
+ $last_post_subject = $last_post_time = $last_post_url = '';
+ }
+
+ // Output moderator listing ... if applicable
+ $l_moderator = $moderators_list = '';
+ if ($display_moderators && !empty($forum_moderators[$forum_id]))
+ {
+ $l_moderator = (sizeof($forum_moderators[$forum_id]) == 1) ? $user->lang['MODERATOR'] : $user->lang['MODERATORS'];
+ $moderators_list = implode(', ', $forum_moderators[$forum_id]);
+ }
+
+ $l_post_click_count = ($row['forum_type'] == FORUM_LINK) ? 'CLICKS' : 'POSTS';
+ $post_click_count = ($row['forum_type'] != FORUM_LINK || $row['forum_flags'] & FORUM_FLAG_LINK_TRACK) ? $row['forum_posts'] : '';
+
+ $s_subforums_list = array();
+ foreach ($subforums_list as $subforum)
+ {
+ $s_subforums_list[] = '<a href="' . $subforum['link'] . '" class="subforum ' . (($subforum['unread']) ? 'unread' : 'read') . '" title="' . (($subforum['unread']) ? $user->lang['NEW_POSTS'] : $user->lang['NO_NEW_POSTS']) . '">' . $subforum['name'] . '</a>';
+ }
+ $s_subforums_list = (string) implode(', ', $s_subforums_list);
+ $catless = ($row['parent_id'] == $root_data['forum_id']) ? true : false;
+
+ if ($row['forum_type'] != FORUM_LINK)
+ {
+ $u_viewforum = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']);
+ }
+ else
+ {
+ // If the forum is a link and we count redirects we need to visit it
+ // If the forum is having a password or no read access we do not expose the link, but instead handle it in viewforum
+ if (($row['forum_flags'] & FORUM_FLAG_LINK_TRACK) || $row['forum_password'] || !$auth->acl_get('f_read', $forum_id))
+ {
+ $u_viewforum = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']);
+ }
+ else
+ {
+ $u_viewforum = $row['forum_link'];
+ }
+ }
+
+ $template->assign_block_vars('forumrow', array(
+ 'S_IS_CAT' => false,
+ 'S_NO_CAT' => $catless && !$last_catless,
+ 'S_IS_LINK' => ($row['forum_type'] == FORUM_LINK) ? true : false,
+ 'S_UNREAD_FORUM' => $forum_unread,
+ 'S_LOCKED_FORUM' => ($row['forum_status'] == ITEM_LOCKED) ? true : false,
+ 'S_LIST_SUBFORUMS' => ($row['display_subforum_list']) ? true : false,
+ 'S_SUBFORUMS' => (sizeof($subforums_list)) ? true : false,
+ 'S_FEED_ENABLED' => ($config['feed_forum'] && !phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $row['forum_options'])) ? true : false,
+
+ 'FORUM_ID' => $row['forum_id'],
+ 'FORUM_NAME' => $row['forum_name'],
+ 'FORUM_DESC' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']),
+ 'TOPICS' => $row['forum_topics'],
+ $l_post_click_count => $post_click_count,
+ 'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
+ 'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'),
+ 'FORUM_FOLDER_IMG_ALT' => isset($user->lang[$folder_alt]) ? $user->lang[$folder_alt] : '',
+ 'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
+ 'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
+ 'LAST_POST_SUBJECT' => censor_text($last_post_subject),
+ 'LAST_POST_TIME' => $last_post_time,
+ 'LAST_POSTER' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'LAST_POSTER_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'LAST_POSTER_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'MODERATORS' => $moderators_list,
+ 'SUBFORUMS' => $s_subforums_list,
+
+ 'L_SUBFORUM_STR' => $l_subforums,
+ 'L_FORUM_FOLDER_ALT' => $folder_alt,
+ 'L_MODERATOR_STR' => $l_moderator,
+
+ 'U_UNAPPROVED_TOPICS' => ($row['forum_id_unapproved_topics']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=unapproved_topics&amp;f=' . $row['forum_id_unapproved_topics']) : '',
+ 'U_VIEWFORUM' => $u_viewforum,
+ 'U_LAST_POSTER' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'U_LAST_POST' => $last_post_url)
+ );
+
+ // Assign subforums loop for style authors
+ foreach ($subforums_list as $subforum)
+ {
+ $template->assign_block_vars('forumrow.subforum', array(
+ 'U_SUBFORUM' => $subforum['link'],
+ 'SUBFORUM_NAME' => $subforum['name'],
+ 'S_UNREAD' => $subforum['unread'])
+ );
+ }
+
+ $last_catless = $catless;
+ }
+
+ $template->assign_vars(array(
+ 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&amp;f=' . $root_data['forum_id'] . '&amp;mark=forums') : '',
+ 'S_HAS_SUBFORUM' => ($visible_forums) ? true : false,
+ 'L_SUBFORUM' => ($visible_forums == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'],
+ 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
+ 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPICS_UNAPPROVED'),
+ ));
+
+ if ($return_moderators)
+ {
+ return array($active_forum_ary, $forum_moderators);
+ }
+
+ return array($active_forum_ary, array());
+}
+
+/**
+* Create forum rules for given forum
+*/
+function generate_forum_rules(&$forum_data)
+{
+ if (!$forum_data['forum_rules'] && !$forum_data['forum_rules_link'])
+ {
+ return;
+ }
+
+ global $template, $phpbb_root_path, $phpEx;
+
+ if ($forum_data['forum_rules'])
+ {
+ $forum_data['forum_rules'] = generate_text_for_display($forum_data['forum_rules'], $forum_data['forum_rules_uid'], $forum_data['forum_rules_bitfield'], $forum_data['forum_rules_options']);
+ }
+
+ $template->assign_vars(array(
+ 'S_FORUM_RULES' => true,
+ 'U_FORUM_RULES' => $forum_data['forum_rules_link'],
+ 'FORUM_RULES' => $forum_data['forum_rules'])
+ );
+}
+
+/**
+* Create forum navigation links for given forum, create parent
+* list if currently null, assign basic forum info to template
+*/
+function generate_forum_nav(&$forum_data)
+{
+ global $db, $user, $template, $auth, $config;
+ global $phpEx, $phpbb_root_path;
+
+ if (!$auth->acl_get('f_list', $forum_data['forum_id']))
+ {
+ return;
+ }
+
+ // Get forum parents
+ $forum_parents = get_forum_parents($forum_data);
+
+ // Build navigation links
+ if (!empty($forum_parents))
+ {
+ foreach ($forum_parents as $parent_forum_id => $parent_data)
+ {
+ list($parent_name, $parent_type) = array_values($parent_data);
+
+ // Skip this parent if the user does not have the permission to view it
+ if (!$auth->acl_get('f_list', $parent_forum_id))
+ {
+ continue;
+ }
+
+ $template->assign_block_vars('navlinks', array(
+ 'S_IS_CAT' => ($parent_type == FORUM_CAT) ? true : false,
+ 'S_IS_LINK' => ($parent_type == FORUM_LINK) ? true : false,
+ 'S_IS_POST' => ($parent_type == FORUM_POST) ? true : false,
+ 'FORUM_NAME' => $parent_name,
+ 'FORUM_ID' => $parent_forum_id,
+ 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $parent_forum_id))
+ );
+ }
+ }
+
+ $template->assign_block_vars('navlinks', array(
+ 'S_IS_CAT' => ($forum_data['forum_type'] == FORUM_CAT) ? true : false,
+ 'S_IS_LINK' => ($forum_data['forum_type'] == FORUM_LINK) ? true : false,
+ 'S_IS_POST' => ($forum_data['forum_type'] == FORUM_POST) ? true : false,
+ 'FORUM_NAME' => $forum_data['forum_name'],
+ 'FORUM_ID' => $forum_data['forum_id'],
+ 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_data['forum_id']))
+ );
+
+ $template->assign_vars(array(
+ 'FORUM_ID' => $forum_data['forum_id'],
+ 'FORUM_NAME' => $forum_data['forum_name'],
+ 'FORUM_DESC' => generate_text_for_display($forum_data['forum_desc'], $forum_data['forum_desc_uid'], $forum_data['forum_desc_bitfield'], $forum_data['forum_desc_options']),
+
+ 'S_ENABLE_FEEDS_FORUM' => ($config['feed_forum'] && !phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $forum_data['forum_options'])) ? true : false,
+ ));
+
+ return;
+}
+
+/**
+* Returns forum parents as an array. Get them from forum_data if available, or update the database otherwise
+*/
+function get_forum_parents(&$forum_data)
+{
+ global $db;
+
+ $forum_parents = array();
+
+ if ($forum_data['parent_id'] > 0)
+ {
+ if ($forum_data['forum_parents'] == '')
+ {
+ $sql = 'SELECT forum_id, forum_name, forum_type
+ FROM ' . FORUMS_TABLE . '
+ WHERE left_id < ' . $forum_data['left_id'] . '
+ AND right_id > ' . $forum_data['right_id'] . '
+ ORDER BY left_id ASC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_parents[$row['forum_id']] = array($row['forum_name'], (int) $row['forum_type']);
+ }
+ $db->sql_freeresult($result);
+
+ $forum_data['forum_parents'] = serialize($forum_parents);
+
+ $sql = 'UPDATE ' . FORUMS_TABLE . "
+ SET forum_parents = '" . $db->sql_escape($forum_data['forum_parents']) . "'
+ WHERE parent_id = " . $forum_data['parent_id'];
+ $db->sql_query($sql);
+ }
+ else
+ {
+ $forum_parents = unserialize($forum_data['forum_parents']);
+ }
+ }
+
+ return $forum_parents;
+}
+
+/**
+* Generate topic pagination
+*/
+function topic_generate_pagination($replies, $url)
+{
+ global $config, $user;
+
+ // Make sure $per_page is a valid value
+ $per_page = ($config['posts_per_page'] <= 0) ? 1 : $config['posts_per_page'];
+
+ if (($replies + 1) > $per_page)
+ {
+ $total_pages = ceil(($replies + 1) / $per_page);
+ $pagination = '';
+
+ $times = 1;
+ for ($j = 0; $j < $replies + 1; $j += $per_page)
+ {
+ $pagination .= '<a href="' . $url . '&amp;start=' . $j . '">' . $times . '</a>';
+ if ($times == 1 && $total_pages > 5)
+ {
+ $pagination .= ' ... ';
+
+ // Display the last three pages
+ $times = $total_pages - 3;
+ $j += ($total_pages - 4) * $per_page;
+ }
+ else if ($times < $total_pages)
+ {
+ $pagination .= '<span class="page-sep">' . $user->lang['COMMA_SEPARATOR'] . '</span>';
+ }
+ $times++;
+ }
+ }
+ else
+ {
+ $pagination = '';
+ }
+
+ return $pagination;
+}
+
+/**
+* Obtain list of moderators of each forum
+*/
+function get_moderators(&$forum_moderators, $forum_id = false)
+{
+ global $config, $template, $db, $phpbb_root_path, $phpEx, $user, $auth;
+
+ $forum_id_ary = array();
+
+ if ($forum_id !== false)
+ {
+ if (!is_array($forum_id))
+ {
+ $forum_id = array($forum_id);
+ }
+
+ // Exchange key/value pair to be able to faster check for the forum id existence
+ $forum_id_ary = array_flip($forum_id);
+ }
+
+ $sql_array = array(
+ 'SELECT' => 'm.*, u.user_colour, g.group_colour, g.group_type',
+
+ 'FROM' => array(
+ MODERATOR_CACHE_TABLE => 'm',
+ ),
+
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(USERS_TABLE => 'u'),
+ 'ON' => 'm.user_id = u.user_id',
+ ),
+ array(
+ 'FROM' => array(GROUPS_TABLE => 'g'),
+ 'ON' => 'm.group_id = g.group_id',
+ ),
+ ),
+
+ 'WHERE' => 'm.display_on_index = 1',
+ );
+
+ // We query every forum here because for caching we should not have any parameter.
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $result = $db->sql_query($sql, 3600);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $f_id = (int) $row['forum_id'];
+
+ if (!isset($forum_id_ary[$f_id]))
+ {
+ continue;
+ }
+
+ if (!empty($row['user_id']))
+ {
+ $forum_moderators[$f_id][] = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
+ }
+ else
+ {
+ $group_name = (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']);
+
+ if ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile'))
+ {
+ $forum_moderators[$f_id][] = '<span' . (($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . ';"' : '') . '>' . $group_name . '</span>';
+ }
+ else
+ {
+ $forum_moderators[$f_id][] = '<a' . (($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . ';"' : '') . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']) . '">' . $group_name . '</a>';
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+
+ return;
+}
+
+/**
+* User authorisation levels output
+*
+* @param string $mode Can be forum or topic. Not in use at the moment.
+* @param int $forum_id The current forum the user is in.
+* @param int $forum_status The forums status bit.
+*/
+function gen_forum_auth_level($mode, $forum_id, $forum_status)
+{
+ global $template, $auth, $user, $config;
+
+ $locked = ($forum_status == ITEM_LOCKED && !$auth->acl_get('m_edit', $forum_id)) ? true : false;
+
+ $rules = array(
+ ($auth->acl_get('f_post', $forum_id) && !$locked) ? $user->lang['RULES_POST_CAN'] : $user->lang['RULES_POST_CANNOT'],
+ ($auth->acl_get('f_reply', $forum_id) && !$locked) ? $user->lang['RULES_REPLY_CAN'] : $user->lang['RULES_REPLY_CANNOT'],
+ ($user->data['is_registered'] && $auth->acl_gets('f_edit', 'm_edit', $forum_id) && !$locked) ? $user->lang['RULES_EDIT_CAN'] : $user->lang['RULES_EDIT_CANNOT'],
+ ($user->data['is_registered'] && $auth->acl_gets('f_delete', 'm_delete', $forum_id) && !$locked) ? $user->lang['RULES_DELETE_CAN'] : $user->lang['RULES_DELETE_CANNOT'],
+ );
+
+ if ($config['allow_attachments'])
+ {
+ $rules[] = ($auth->acl_get('f_attach', $forum_id) && $auth->acl_get('u_attach') && !$locked) ? $user->lang['RULES_ATTACH_CAN'] : $user->lang['RULES_ATTACH_CANNOT'];
+ }
+
+ foreach ($rules as $rule)
+ {
+ $template->assign_block_vars('rules', array('RULE' => $rule));
+ }
+
+ return;
+}
+
+/**
+* Generate topic status
+*/
+function topic_status(&$topic_row, $replies, $unread_topic, &$folder_img, &$folder_alt, &$topic_type)
+{
+ global $user, $config;
+
+ $folder = $folder_new = '';
+
+ if ($topic_row['topic_status'] == ITEM_MOVED)
+ {
+ $topic_type = $user->lang['VIEW_TOPIC_MOVED'];
+ $folder_img = 'topic_moved';
+ $folder_alt = 'TOPIC_MOVED';
+ }
+ else
+ {
+ switch ($topic_row['topic_type'])
+ {
+ case POST_GLOBAL:
+ $topic_type = $user->lang['VIEW_TOPIC_GLOBAL'];
+ $folder = 'global_read';
+ $folder_new = 'global_unread';
+ break;
+
+ case POST_ANNOUNCE:
+ $topic_type = $user->lang['VIEW_TOPIC_ANNOUNCEMENT'];
+ $folder = 'announce_read';
+ $folder_new = 'announce_unread';
+ break;
+
+ case POST_STICKY:
+ $topic_type = $user->lang['VIEW_TOPIC_STICKY'];
+ $folder = 'sticky_read';
+ $folder_new = 'sticky_unread';
+ break;
+
+ default:
+ $topic_type = '';
+ $folder = 'topic_read';
+ $folder_new = 'topic_unread';
+
+ // Hot topic threshold is for posts in a topic, which is replies + the first post. ;)
+ if ($config['hot_threshold'] && ($replies + 1) >= $config['hot_threshold'] && $topic_row['topic_status'] != ITEM_LOCKED)
+ {
+ $folder .= '_hot';
+ $folder_new .= '_hot';
+ }
+ break;
+ }
+
+ if ($topic_row['topic_status'] == ITEM_LOCKED)
+ {
+ $topic_type = $user->lang['VIEW_TOPIC_LOCKED'];
+ $folder .= '_locked';
+ $folder_new .= '_locked';
+ }
+
+
+ $folder_img = ($unread_topic) ? $folder_new : $folder;
+ $folder_alt = ($unread_topic) ? 'NEW_POSTS' : (($topic_row['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'NO_NEW_POSTS');
+
+ // Posted image?
+ if (!empty($topic_row['topic_posted']) && $topic_row['topic_posted'])
+ {
+ $folder_img .= '_mine';
+ }
+ }
+
+ if ($topic_row['poll_start'] && $topic_row['topic_status'] != ITEM_MOVED)
+ {
+ $topic_type = $user->lang['VIEW_TOPIC_POLL'];
+ }
+}
+
+/**
+* Assign/Build custom bbcodes for display in screens supporting using of bbcodes
+* The custom bbcodes buttons will be placed within the template block 'custom_codes'
+*/
+function display_custom_bbcodes()
+{
+ global $db, $template, $user;
+
+ // Start counting from 22 for the bbcode ids (every bbcode takes two ids - opening/closing)
+ $num_predefined_bbcodes = 22;
+
+ $sql = 'SELECT bbcode_id, bbcode_tag, bbcode_helpline
+ FROM ' . BBCODES_TABLE . '
+ WHERE display_on_posting = 1
+ ORDER BY bbcode_tag';
+ $result = $db->sql_query($sql);
+
+ $i = 0;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // If the helpline is defined within the language file, we will use the localised version, else just use the database entry...
+ if (isset($user->lang[strtoupper($row['bbcode_helpline'])]))
+ {
+ $row['bbcode_helpline'] = $user->lang[strtoupper($row['bbcode_helpline'])];
+ }
+
+ $template->assign_block_vars('custom_tags', array(
+ 'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'",
+ 'BBCODE_ID' => $num_predefined_bbcodes + ($i * 2),
+ 'BBCODE_TAG' => $row['bbcode_tag'],
+ 'BBCODE_HELPLINE' => $row['bbcode_helpline'],
+ 'A_BBCODE_HELPLINE' => str_replace(array('&amp;', '&quot;', "'", '&lt;', '&gt;'), array('&', '"', "\'", '<', '>'), $row['bbcode_helpline']),
+ ));
+
+ $i++;
+ }
+ $db->sql_freeresult($result);
+}
+
+/**
+* Display reasons
+*/
+function display_reasons($reason_id = 0)
+{
+ global $db, $user, $template;
+
+ $sql = 'SELECT *
+ FROM ' . REPORTS_REASONS_TABLE . '
+ ORDER BY reason_order ASC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // If the reason is defined within the language file, we will use the localized version, else just use the database entry...
+ if (isset($user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])]) && isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])]))
+ {
+ $row['reason_description'] = $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])];
+ $row['reason_title'] = $user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])];
+ }
+
+ $template->assign_block_vars('reason', array(
+ 'ID' => $row['reason_id'],
+ 'TITLE' => $row['reason_title'],
+ 'DESCRIPTION' => $row['reason_description'],
+ 'S_SELECTED' => ($row['reason_id'] == $reason_id) ? true : false)
+ );
+ }
+ $db->sql_freeresult($result);
+}
+
+/**
+* Display user activity (action forum/topic)
+*/
+function display_user_activity(&$userdata)
+{
+ global $auth, $template, $db, $user;
+ global $phpbb_root_path, $phpEx;
+
+ // Do not display user activity for users having more than 5000 posts...
+ if ($userdata['user_posts'] > 5000)
+ {
+ return;
+ }
+
+ $forum_ary = array();
+
+ // Do not include those forums the user is not having read access to...
+ $forum_read_ary = $auth->acl_getf('!f_read');
+
+ foreach ($forum_read_ary as $forum_id => $not_allowed)
+ {
+ if ($not_allowed['f_read'])
+ {
+ $forum_ary[] = (int) $forum_id;
+ }
+ }
+
+ $forum_ary = array_unique($forum_ary);
+ $forum_sql = (sizeof($forum_ary)) ? 'AND ' . $db->sql_in_set('forum_id', $forum_ary, true) : '';
+
+ // Obtain active forum
+ $sql = 'SELECT forum_id, COUNT(post_id) AS num_posts
+ FROM ' . POSTS_TABLE . '
+ WHERE poster_id = ' . $userdata['user_id'] . "
+ AND post_postcount = 1
+ $forum_sql
+ GROUP BY forum_id
+ ORDER BY num_posts DESC";
+ $result = $db->sql_query_limit($sql, 1);
+ $active_f_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!empty($active_f_row))
+ {
+ $sql = 'SELECT forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $active_f_row['forum_id'];
+ $result = $db->sql_query($sql, 3600);
+ $active_f_row['forum_name'] = (string) $db->sql_fetchfield('forum_name');
+ $db->sql_freeresult($result);
+ }
+
+ // Obtain active topic
+ $sql = 'SELECT topic_id, COUNT(post_id) AS num_posts
+ FROM ' . POSTS_TABLE . '
+ WHERE poster_id = ' . $userdata['user_id'] . "
+ AND post_postcount = 1
+ $forum_sql
+ GROUP BY topic_id
+ ORDER BY num_posts DESC";
+ $result = $db->sql_query_limit($sql, 1);
+ $active_t_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!empty($active_t_row))
+ {
+ $sql = 'SELECT topic_title
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_id = ' . $active_t_row['topic_id'];
+ $result = $db->sql_query($sql);
+ $active_t_row['topic_title'] = (string) $db->sql_fetchfield('topic_title');
+ $db->sql_freeresult($result);
+ }
+
+ $userdata['active_t_row'] = $active_t_row;
+ $userdata['active_f_row'] = $active_f_row;
+
+ $active_f_name = $active_f_id = $active_f_count = $active_f_pct = '';
+ if (!empty($active_f_row['num_posts']))
+ {
+ $active_f_name = $active_f_row['forum_name'];
+ $active_f_id = $active_f_row['forum_id'];
+ $active_f_count = $active_f_row['num_posts'];
+ $active_f_pct = ($userdata['user_posts']) ? ($active_f_count / $userdata['user_posts']) * 100 : 0;
+ }
+
+ $active_t_name = $active_t_id = $active_t_count = $active_t_pct = '';
+ if (!empty($active_t_row['num_posts']))
+ {
+ $active_t_name = $active_t_row['topic_title'];
+ $active_t_id = $active_t_row['topic_id'];
+ $active_t_count = $active_t_row['num_posts'];
+ $active_t_pct = ($userdata['user_posts']) ? ($active_t_count / $userdata['user_posts']) * 100 : 0;
+ }
+
+ $l_active_pct = ($userdata['user_id'] != ANONYMOUS && $userdata['user_id'] == $user->data['user_id']) ? $user->lang['POST_PCT_ACTIVE_OWN'] : $user->lang['POST_PCT_ACTIVE'];
+
+ $template->assign_vars(array(
+ 'ACTIVE_FORUM' => $active_f_name,
+ 'ACTIVE_FORUM_POSTS' => ($active_f_count == 1) ? sprintf($user->lang['USER_POST'], 1) : sprintf($user->lang['USER_POSTS'], $active_f_count),
+ 'ACTIVE_FORUM_PCT' => sprintf($l_active_pct, $active_f_pct),
+ 'ACTIVE_TOPIC' => censor_text($active_t_name),
+ 'ACTIVE_TOPIC_POSTS' => ($active_t_count == 1) ? sprintf($user->lang['USER_POST'], 1) : sprintf($user->lang['USER_POSTS'], $active_t_count),
+ 'ACTIVE_TOPIC_PCT' => sprintf($l_active_pct, $active_t_pct),
+ 'U_ACTIVE_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $active_f_id),
+ 'U_ACTIVE_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $active_t_id),
+ 'S_SHOW_ACTIVITY' => true)
+ );
+}
+
+/**
+* Topic and forum watching common code
+*/
+function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id, $notify_status = 'unset', $start = 0)
+{
+ global $template, $db, $user, $phpEx, $start, $phpbb_root_path;
+
+ $table_sql = ($mode == 'forum') ? FORUMS_WATCH_TABLE : TOPICS_WATCH_TABLE;
+ $where_sql = ($mode == 'forum') ? 'forum_id' : 'topic_id';
+ $match_id = ($mode == 'forum') ? $forum_id : $topic_id;
+ $u_url = "uid={$user->data['user_id']}";
+ $u_url .= ($mode == 'forum') ? '&amp;f' : '&amp;f=' . $forum_id . '&amp;t';
+
+ // Is user watching this thread?
+ if ($user_id != ANONYMOUS)
+ {
+ $can_watch = true;
+
+ if ($notify_status == 'unset')
+ {
+ $sql = "SELECT notify_status
+ FROM $table_sql
+ WHERE $where_sql = $match_id
+ AND user_id = $user_id";
+ $result = $db->sql_query($sql);
+
+ $notify_status = ($row = $db->sql_fetchrow($result)) ? $row['notify_status'] : NULL;
+ $db->sql_freeresult($result);
+ }
+
+ if (!is_null($notify_status) && $notify_status !== '')
+ {
+
+ if (isset($_GET['unwatch']))
+ {
+ $uid = request_var('uid', 0);
+ if ($uid != $user_id)
+ {
+ $redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;start=$start");
+ $message = $user->lang['ERR_UNWATCHING'] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
+ trigger_error($message);
+ }
+ if ($_GET['unwatch'] == $mode)
+ {
+ $is_watching = 0;
+
+ $sql = 'DELETE FROM ' . $table_sql . "
+ WHERE $where_sql = $match_id
+ AND user_id = $user_id";
+ $db->sql_query($sql);
+ }
+
+ $redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;start=$start");
+
+ meta_refresh(3, $redirect_url);
+
+ $message = $user->lang['NOT_WATCHING_' . strtoupper($mode)] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
+ trigger_error($message);
+ }
+ else
+ {
+ $is_watching = true;
+
+ if ($notify_status)
+ {
+ $sql = 'UPDATE ' . $table_sql . "
+ SET notify_status = 0
+ WHERE $where_sql = $match_id
+ AND user_id = $user_id";
+ $db->sql_query($sql);
+ }
+ }
+ }
+ else
+ {
+ if (isset($_GET['watch']))
+ {
+ $token = request_var('hash', '');
+ $redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;start=$start");
+
+ if ($_GET['watch'] == $mode && check_link_hash($token, "{$mode}_$match_id"))
+ {
+ $is_watching = true;
+
+ $sql = 'INSERT INTO ' . $table_sql . " (user_id, $where_sql, notify_status)
+ VALUES ($user_id, $match_id, 0)";
+ $db->sql_query($sql);
+ $message = $user->lang['ARE_WATCHING_' . strtoupper($mode)] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
+ }
+ else
+ {
+ $message = $user->lang['ERR_WATCHING'] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
+ }
+
+ meta_refresh(3, $redirect_url);
+
+ trigger_error($message);
+ }
+ else
+ {
+ $is_watching = 0;
+ }
+ }
+ }
+ else
+ {
+ if (isset($_GET['unwatch']) && $_GET['unwatch'] == $mode)
+ {
+ login_box();
+ }
+ else
+ {
+ $can_watch = 0;
+ $is_watching = 0;
+ }
+ }
+
+ if ($can_watch)
+ {
+ $s_watching['link'] = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;" . (($is_watching) ? 'unwatch' : 'watch') . "=$mode&amp;start=$start&amp;hash=" . generate_link_hash("{$mode}_$match_id"));
+ $s_watching['title'] = $user->lang[(($is_watching) ? 'STOP' : 'START') . '_WATCHING_' . strtoupper($mode)];
+ $s_watching['is_watching'] = $is_watching;
+ }
+
+ return;
+}
+
+/**
+* Get user rank title and image
+*
+* @param int $user_rank the current stored users rank id
+* @param int $user_posts the users number of posts
+* @param string &$rank_title the rank title will be stored here after execution
+* @param string &$rank_img the rank image as full img tag is stored here after execution
+* @param string &$rank_img_src the rank image source is stored here after execution
+*
+* Note: since we do not want to break backwards-compatibility, this function will only properly assign ranks to guests if you call it for them with user_posts == false
+*/
+function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src)
+{
+ global $ranks, $config, $phpbb_root_path;
+
+ if (empty($ranks))
+ {
+ global $cache;
+ $ranks = $cache->obtain_ranks();
+ }
+
+ if (!empty($user_rank))
+ {
+ $rank_title = (isset($ranks['special'][$user_rank]['rank_title'])) ? $ranks['special'][$user_rank]['rank_title'] : '';
+ $rank_img = (!empty($ranks['special'][$user_rank]['rank_image'])) ? '<img src="' . $phpbb_root_path . $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image'] . '" alt="' . $ranks['special'][$user_rank]['rank_title'] . '" title="' . $ranks['special'][$user_rank]['rank_title'] . '" />' : '';
+ $rank_img_src = (!empty($ranks['special'][$user_rank]['rank_image'])) ? $phpbb_root_path . $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image'] : '';
+ }
+ else if ($user_posts !== false)
+ {
+ if (!empty($ranks['normal']))
+ {
+ foreach ($ranks['normal'] as $rank)
+ {
+ if ($user_posts >= $rank['rank_min'])
+ {
+ $rank_title = $rank['rank_title'];
+ $rank_img = (!empty($rank['rank_image'])) ? '<img src="' . $phpbb_root_path . $config['ranks_path'] . '/' . $rank['rank_image'] . '" alt="' . $rank['rank_title'] . '" title="' . $rank['rank_title'] . '" />' : '';
+ $rank_img_src = (!empty($rank['rank_image'])) ? $phpbb_root_path . $config['ranks_path'] . '/' . $rank['rank_image'] : '';
+ break;
+ }
+ }
+ }
+ }
+}
+
+/**
+* Get user avatar
+*
+* @param string $avatar Users assigned avatar name
+* @param int $avatar_type Type of avatar
+* @param string $avatar_width Width of users avatar
+* @param string $avatar_height Height of users avatar
+* @param string $alt Optional language string for alt tag within image, can be a language key or text
+* @param bool $ignore_config Ignores the config-setting, to be still able to view the avatar in the UCP
+*
+* @return string Avatar image
+*/
+function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR', $ignore_config = false)
+{
+ global $user, $config, $phpbb_root_path, $phpEx;
+
+ if (empty($avatar) || !$avatar_type || (!$config['allow_avatar'] && !$ignore_config))
+ {
+ return '';
+ }
+
+ $avatar_img = '';
+
+ switch ($avatar_type)
+ {
+ case AVATAR_UPLOAD:
+ if (!$config['allow_avatar_upload'] && !$ignore_config)
+ {
+ return '';
+ }
+ $avatar_img = $phpbb_root_path . "download/file.$phpEx?avatar=";
+ break;
+
+ case AVATAR_GALLERY:
+ if (!$config['allow_avatar_local'] && !$ignore_config)
+ {
+ return '';
+ }
+ $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/';
+ break;
+
+ case AVATAR_REMOTE:
+ if (!$config['allow_avatar_remote'] && !$ignore_config)
+ {
+ return '';
+ }
+ break;
+ }
+
+ $avatar_img .= $avatar;
+ return '<img src="' . (str_replace(' ', '%20', $avatar_img)) . '" width="' . $avatar_width . '" height="' . $avatar_height . '" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php
new file mode 100644
index 0000000000..a5889224a1
--- /dev/null
+++ b/phpBB/includes/functions_install.php
@@ -0,0 +1,540 @@
+<?php
+/**
+*
+* @package install
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Determine if we are able to load a specified PHP module and do so if possible
+*/
+function can_load_dll($dll)
+{
+ // SQLite2 is a tricky thing, from 5.0.0 it requires PDO; if PDO is not loaded we must state that SQLite is unavailable
+ // as the installer doesn't understand that the extension has a prerequisite.
+ if ($dll == 'sqlite' && version_compare(PHP_VERSION, '5.0.0', '>=') && !extension_loaded('pdo'))
+ {
+ return false;
+ }
+ return ((@ini_get('enable_dl') || strtolower(@ini_get('enable_dl')) == 'on') && (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') && function_exists('dl') && @dl($dll . '.' . PHP_SHLIB_SUFFIX)) ? true : false;
+}
+
+/**
+* Returns an array of available DBMS with some data, if a DBMS is specified it will only
+* return data for that DBMS and will load its extension if necessary.
+*/
+function get_available_dbms($dbms = false, $return_unavailable = false, $only_20x_options = false)
+{
+ global $lang;
+ $available_dbms = array(
+ 'firebird' => array(
+ 'LABEL' => 'FireBird',
+ 'SCHEMA' => 'firebird',
+ 'MODULE' => 'interbase',
+ 'DELIM' => ';;',
+ 'COMMENTS' => 'remove_remarks',
+ 'DRIVER' => 'firebird',
+ 'AVAILABLE' => true,
+ '2.0.x' => false,
+ ),
+ 'mysqli' => array(
+ 'LABEL' => 'MySQL with MySQLi Extension',
+ 'SCHEMA' => 'mysql_41',
+ 'MODULE' => 'mysqli',
+ 'DELIM' => ';',
+ 'COMMENTS' => 'remove_remarks',
+ 'DRIVER' => 'mysqli',
+ 'AVAILABLE' => true,
+ '2.0.x' => true,
+ ),
+ 'mysql' => array(
+ 'LABEL' => 'MySQL',
+ 'SCHEMA' => 'mysql',
+ 'MODULE' => 'mysql',
+ 'DELIM' => ';',
+ 'COMMENTS' => 'remove_remarks',
+ 'DRIVER' => 'mysql',
+ 'AVAILABLE' => true,
+ '2.0.x' => true,
+ ),
+ 'mssql' => array(
+ 'LABEL' => 'MS SQL Server 2000+',
+ 'SCHEMA' => 'mssql',
+ 'MODULE' => 'mssql',
+ 'DELIM' => 'GO',
+ 'COMMENTS' => 'remove_comments',
+ 'DRIVER' => 'mssql',
+ 'AVAILABLE' => true,
+ '2.0.x' => true,
+ ),
+ 'mssql_odbc'=> array(
+ 'LABEL' => 'MS SQL Server [ ODBC ]',
+ 'SCHEMA' => 'mssql',
+ 'MODULE' => 'odbc',
+ 'DELIM' => 'GO',
+ 'COMMENTS' => 'remove_comments',
+ 'DRIVER' => 'mssql_odbc',
+ 'AVAILABLE' => true,
+ '2.0.x' => true,
+ ),
+ 'oracle' => array(
+ 'LABEL' => 'Oracle',
+ 'SCHEMA' => 'oracle',
+ 'MODULE' => 'oci8',
+ 'DELIM' => '/',
+ 'COMMENTS' => 'remove_comments',
+ 'DRIVER' => 'oracle',
+ 'AVAILABLE' => true,
+ '2.0.x' => false,
+ ),
+ 'postgres' => array(
+ 'LABEL' => 'PostgreSQL 7.x/8.x',
+ 'SCHEMA' => 'postgres',
+ 'MODULE' => 'pgsql',
+ 'DELIM' => ';',
+ 'COMMENTS' => 'remove_comments',
+ 'DRIVER' => 'postgres',
+ 'AVAILABLE' => true,
+ '2.0.x' => true,
+ ),
+ 'sqlite' => array(
+ 'LABEL' => 'SQLite',
+ 'SCHEMA' => 'sqlite',
+ 'MODULE' => 'sqlite',
+ 'DELIM' => ';',
+ 'COMMENTS' => 'remove_remarks',
+ 'DRIVER' => 'sqlite',
+ 'AVAILABLE' => true,
+ '2.0.x' => false,
+ ),
+ );
+
+ if ($dbms)
+ {
+ if (isset($available_dbms[$dbms]))
+ {
+ $available_dbms = array($dbms => $available_dbms[$dbms]);
+ }
+ else
+ {
+ return array();
+ }
+ }
+
+ // now perform some checks whether they are really available
+ foreach ($available_dbms as $db_name => $db_ary)
+ {
+ if ($only_20x_options && !$db_ary['2.0.x'])
+ {
+ if ($return_unavailable)
+ {
+ $available_dbms[$db_name]['AVAILABLE'] = false;
+ }
+ else
+ {
+ unset($available_dbms[$db_name]);
+ }
+ continue;
+ }
+
+ $dll = $db_ary['MODULE'];
+
+ if (!@extension_loaded($dll))
+ {
+ if (!can_load_dll($dll))
+ {
+ if ($return_unavailable)
+ {
+ $available_dbms[$db_name]['AVAILABLE'] = false;
+ }
+ else
+ {
+ unset($available_dbms[$db_name]);
+ }
+ continue;
+ }
+ }
+ $any_db_support = true;
+ }
+
+ if ($return_unavailable)
+ {
+ $available_dbms['ANY_DB_SUPPORT'] = $any_db_support;
+ }
+ return $available_dbms;
+}
+
+/**
+* Generate the drop down of available database options
+*/
+function dbms_select($default = '', $only_20x_options = false)
+{
+ global $lang;
+
+ $available_dbms = get_available_dbms(false, false, $only_20x_options);
+ $dbms_options = '';
+ foreach ($available_dbms as $dbms_name => $details)
+ {
+ $selected = ($dbms_name == $default) ? ' selected="selected"' : '';
+ $dbms_options .= '<option value="' . $dbms_name . '"' . $selected .'>' . $lang['DLL_' . strtoupper($dbms_name)] . '</option>';
+ }
+ return $dbms_options;
+}
+
+/**
+* Get tables of a database
+*/
+function get_tables($db)
+{
+ switch ($db->sql_layer)
+ {
+ case 'mysql':
+ case 'mysql4':
+ case 'mysqli':
+ $sql = 'SHOW TABLES';
+ break;
+
+ case 'sqlite':
+ $sql = 'SELECT name
+ FROM sqlite_master
+ WHERE type = "table"';
+ break;
+
+ case 'mssql':
+ case 'mssql_odbc':
+ $sql = "SELECT name
+ FROM sysobjects
+ WHERE type='U'";
+ break;
+
+ case 'postgres':
+ $sql = 'SELECT relname
+ FROM pg_stat_user_tables';
+ break;
+
+ case 'firebird':
+ $sql = 'SELECT rdb$relation_name
+ FROM rdb$relations
+ WHERE rdb$view_source is null
+ AND rdb$system_flag = 0';
+ break;
+
+ case 'oracle':
+ $sql = 'SELECT table_name
+ FROM USER_TABLES';
+ break;
+ }
+
+ $result = $db->sql_query($sql);
+
+ $tables = array();
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $tables[] = current($row);
+ }
+
+ $db->sql_freeresult($result);
+
+ return $tables;
+}
+
+/**
+* Used to test whether we are able to connect to the database the user has specified
+* and identify any problems (eg there are already tables with the names we want to use
+* @param array $dbms should be of the format of an element of the array returned by {@link get_available_dbms get_available_dbms()}
+* necessary extensions should be loaded already
+*/
+function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix, $dbhost, $dbuser, $dbpasswd, $dbname, $dbport, $prefix_may_exist = false, $load_dbal = true, $unicode_check = true)
+{
+ global $phpbb_root_path, $phpEx, $config, $lang;
+
+ $dbms = $dbms_details['DRIVER'];
+
+ if ($load_dbal)
+ {
+ // Include the DB layer
+ include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
+ }
+
+ // Instantiate it and set return on error true
+ $sql_db = 'dbal_' . $dbms;
+ $db = new $sql_db();
+ $db->sql_return_on_error(true);
+
+ // Check that we actually have a database name before going any further.....
+ if ($dbms_details['DRIVER'] != 'sqlite' && $dbms_details['DRIVER'] != 'oracle' && $dbname === '')
+ {
+ $error[] = $lang['INST_ERR_DB_NO_NAME'];
+ return false;
+ }
+
+ // Make sure we don't have a daft user who thinks having the SQLite database in the forum directory is a good idea
+ if ($dbms_details['DRIVER'] == 'sqlite' && stripos(phpbb_realpath($dbhost), phpbb_realpath('../')) === 0)
+ {
+ $error[] = $lang['INST_ERR_DB_FORUM_PATH'];
+ return false;
+ }
+
+ // Check the prefix length to ensure that index names are not too long and does not contain invalid characters
+ switch ($dbms_details['DRIVER'])
+ {
+ case 'mysql':
+ case 'mysqli':
+ if (strspn($table_prefix, '-./\\') !== 0)
+ {
+ $error[] = $lang['INST_ERR_PREFIX_INVALID'];
+ return false;
+ }
+
+ // no break;
+
+ case 'postgres':
+ $prefix_length = 36;
+ break;
+
+ case 'mssql':
+ case 'mssql_odbc':
+ $prefix_length = 90;
+ break;
+
+ case 'sqlite':
+ $prefix_length = 200;
+ break;
+
+ case 'firebird':
+ case 'oracle':
+ $prefix_length = 6;
+ break;
+ }
+
+ if (strlen($table_prefix) > $prefix_length)
+ {
+ $error[] = sprintf($lang['INST_ERR_PREFIX_TOO_LONG'], $prefix_length);
+ return false;
+ }
+
+ // Try and connect ...
+ if (is_array($db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true)))
+ {
+ $db_error = $db->sql_error();
+ $error[] = $lang['INST_ERR_DB_CONNECT'] . '<br />' . (($db_error['message']) ? $db_error['message'] : $lang['INST_ERR_DB_NO_ERROR']);
+ }
+ else
+ {
+ // Likely matches for an existing phpBB installation
+ if (!$prefix_may_exist)
+ {
+ $temp_prefix = strtolower($table_prefix);
+ $table_ary = array($temp_prefix . 'attachments', $temp_prefix . 'config', $temp_prefix . 'sessions', $temp_prefix . 'topics', $temp_prefix . 'users');
+
+ $tables = get_tables($db);
+ $tables = array_map('strtolower', $tables);
+ $table_intersect = array_intersect($tables, $table_ary);
+
+ if (sizeof($table_intersect))
+ {
+ $error[] = $lang['INST_ERR_PREFIX'];
+ }
+ }
+
+ // Make sure that the user has selected a sensible DBAL for the DBMS actually installed
+ switch ($dbms_details['DRIVER'])
+ {
+ case 'mysqli':
+ if (version_compare(mysqli_get_server_info($db->db_connect_id), '4.1.3', '<'))
+ {
+ $error[] = $lang['INST_ERR_DB_NO_MYSQLI'];
+ }
+ break;
+
+ case 'sqlite':
+ if (version_compare(sqlite_libversion(), '2.8.2', '<'))
+ {
+ $error[] = $lang['INST_ERR_DB_NO_SQLITE'];
+ }
+ break;
+
+ case 'firebird':
+ // check the version of FB, use some hackery if we can't get access to the server info
+ if ($db->service_handle !== false && function_exists('ibase_server_info'))
+ {
+ $val = @ibase_server_info($db->service_handle, IBASE_SVC_SERVER_VERSION);
+ preg_match('#V([\d.]+)#', $val, $match);
+ if ($match[1] < 2)
+ {
+ $error[] = $lang['INST_ERR_DB_NO_FIREBIRD'];
+ }
+ $db_info = @ibase_db_info($db->service_handle, $dbname, IBASE_STS_HDR_PAGES);
+
+ preg_match('/^\\s*Page size\\s*(\\d+)/m', $db_info, $regs);
+ $page_size = intval($regs[1]);
+ if ($page_size < 8192)
+ {
+ $error[] = $lang['INST_ERR_DB_NO_FIREBIRD_PS'];
+ }
+ }
+ else
+ {
+ $sql = "SELECT *
+ FROM RDB$FUNCTIONS
+ WHERE RDB$SYSTEM_FLAG IS NULL
+ AND RDB$FUNCTION_NAME = 'CHAR_LENGTH'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // if its a UDF, its too old
+ if ($row)
+ {
+ $error[] = $lang['INST_ERR_DB_NO_FIREBIRD'];
+ }
+ else
+ {
+ $sql = 'SELECT 1 FROM RDB$DATABASE
+ WHERE BIN_AND(10, 1) = 0';
+ $result = $db->sql_query($sql);
+ if (!$result) // This can only fail if BIN_AND is not defined
+ {
+ $error[] = $lang['INST_ERR_DB_NO_FIREBIRD'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ // Setup the stuff for our random table
+ $char_array = array_merge(range('A', 'Z'), range('0', '9'));
+ $char_len = mt_rand(7, 9);
+ $char_array_len = sizeof($char_array) - 1;
+
+ $final = '';
+
+ for ($i = 0; $i < $char_len; $i++)
+ {
+ $final .= $char_array[mt_rand(0, $char_array_len)];
+ }
+
+ // Create some random table
+ $sql = 'CREATE TABLE ' . $final . " (
+ FIELD1 VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ FIELD2 INTEGER DEFAULT 0 NOT NULL);";
+ $db->sql_query($sql);
+
+ // Create an index that should fail if the page size is less than 8192
+ $sql = 'CREATE INDEX ' . $final . ' ON ' . $final . '(FIELD1, FIELD2);';
+ $db->sql_query($sql);
+
+ if (ibase_errmsg() !== false)
+ {
+ $error[] = $lang['INST_ERR_DB_NO_FIREBIRD_PS'];
+ }
+ else
+ {
+ // Kill the old table
+ $db->sql_query('DROP TABLE ' . $final . ';');
+ }
+ unset($final);
+ }
+ break;
+
+ case 'oracle':
+ if ($unicode_check)
+ {
+ $sql = "SELECT *
+ FROM NLS_DATABASE_PARAMETERS
+ WHERE PARAMETER = 'NLS_RDBMS_VERSION'
+ OR PARAMETER = 'NLS_CHARACTERSET'";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $stats[$row['parameter']] = $row['value'];
+ }
+ $db->sql_freeresult($result);
+
+ if (version_compare($stats['NLS_RDBMS_VERSION'], '9.2', '<') && $stats['NLS_CHARACTERSET'] !== 'UTF8')
+ {
+ $error[] = $lang['INST_ERR_DB_NO_ORACLE'];
+ }
+ }
+ break;
+
+ case 'postgres':
+ if ($unicode_check)
+ {
+ $sql = "SHOW server_encoding;";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row['server_encoding'] !== 'UNICODE' && $row['server_encoding'] !== 'UTF8')
+ {
+ $error[] = $lang['INST_ERR_DB_NO_POSTGRES'];
+ }
+ }
+ break;
+ }
+
+ }
+
+ if ($error_connect && (!isset($error) || !sizeof($error)))
+ {
+ return true;
+ }
+ return false;
+}
+
+/**
+* remove_remarks will strip the sql comment lines out of an uploaded sql file
+*/
+function remove_remarks(&$sql)
+{
+ $sql = preg_replace('/\n{2,}/', "\n", preg_replace('/^#.*$/m', "\n", $sql));
+}
+
+/**
+* split_sql_file will split an uploaded sql file into single sql statements.
+* Note: expects trim() to have already been run on $sql.
+*/
+function split_sql_file($sql, $delimiter)
+{
+ $sql = str_replace("\r" , '', $sql);
+ $data = preg_split('/' . preg_quote($delimiter, '/') . '$/m', $sql);
+
+ $data = array_map('trim', $data);
+
+ // The empty case
+ $end_data = end($data);
+
+ if (empty($end_data))
+ {
+ unset($data[key($data)]);
+ }
+
+ return $data;
+}
+
+/**
+* For replacing {L_*} strings with preg_replace_callback
+*/
+function adjust_language_keys_callback($matches)
+{
+ if (!empty($matches[1]))
+ {
+ global $lang, $db;
+
+ return (!empty($lang[$matches[1]])) ? $db->sql_escape($lang[$matches[1]]) : $db->sql_escape($matches[1]);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php
new file mode 100644
index 0000000000..6d5021b9aa
--- /dev/null
+++ b/phpBB/includes/functions_jabber.php
@@ -0,0 +1,872 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2007 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+*
+* Jabber class from Flyspray project
+*
+* @version class.jabber2.php 1595 2008-09-19 (0.9.9)
+* @copyright 2006 Flyspray.org
+* @author Florian Schmitz (floele)
+*
+* Only slightly modified by Acyd Burn
+*
+* @package phpBB3
+*/
+class jabber
+{
+ var $connection = null;
+ var $session = array();
+ var $timeout = 10;
+
+ var $server;
+ var $connect_server;
+ var $port;
+ var $username;
+ var $password;
+ var $use_ssl;
+ var $resource = 'functions_jabber.phpbb.php';
+
+ var $enable_logging;
+ var $log_array;
+
+ var $features = array();
+
+ /**
+ */
+ function jabber($server, $port, $username, $password, $use_ssl = false)
+ {
+ $this->connect_server = ($server) ? $server : 'localhost';
+ $this->port = ($port) ? $port : 5222;
+
+ // Get the server and the username
+ if (strpos($username, '@') === false)
+ {
+ $this->server = $this->connect_server;
+ $this->username = $username;
+ }
+ else
+ {
+ $jid = explode('@', $username, 2);
+
+ $this->username = $jid[0];
+ $this->server = $jid[1];
+ }
+
+ $this->password = $password;
+ $this->use_ssl = ($use_ssl && $this->can_use_ssl()) ? true : false;
+
+ // Change port if we use SSL
+ if ($this->port == 5222 && $this->use_ssl)
+ {
+ $this->port = 5223;
+ }
+
+ $this->enable_logging = true;
+ $this->log_array = array();
+ }
+
+ /**
+ * Able to use the SSL functionality?
+ */
+ function can_use_ssl()
+ {
+ // Will not work with PHP >= 5.2.1 or < 5.2.3RC2 until timeout problem with ssl hasn't been fixed (http://bugs.php.net/41236)
+ return ((version_compare(PHP_VERSION, '5.2.1', '<') || version_compare(PHP_VERSION, '5.2.3RC2', '>=')) && @extension_loaded('openssl')) ? true : false;
+ }
+
+ /**
+ * Able to use TLS?
+ */
+ function can_use_tls()
+ {
+ if (!@extension_loaded('openssl') || !function_exists('stream_socket_enable_crypto') || !function_exists('stream_get_meta_data') || !function_exists('socket_set_blocking') || !function_exists('stream_get_wrappers'))
+ {
+ return false;
+ }
+
+ /**
+ * Make sure the encryption stream is supported
+ * Also seem to work without the crypto stream if correctly compiled
+
+ $streams = stream_get_wrappers();
+
+ if (!in_array('streams.crypto', $streams))
+ {
+ return false;
+ }
+ */
+
+ return true;
+ }
+
+ /**
+ * Sets the resource which is used. No validation is done here, only escaping.
+ * @param string $name
+ * @access public
+ */
+ function set_resource($name)
+ {
+ $this->resource = $name;
+ }
+
+ /**
+ * Connect
+ */
+ function connect()
+ {
+/* if (!$this->check_jid($this->username . '@' . $this->server))
+ {
+ $this->add_to_log('Error: Jabber ID is not valid: ' . $this->username . '@' . $this->server);
+ return false;
+ }*/
+
+ $this->session['ssl'] = $this->use_ssl;
+
+ if ($this->open_socket($this->connect_server, $this->port, $this->use_ssl))
+ {
+ $this->send("<?xml version='1.0' encoding='UTF-8' ?" . ">\n");
+ $this->send("<stream:stream to='{$this->server}' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>\n");
+ }
+ else
+ {
+ $this->add_to_log('Error: connect() #2');
+ return false;
+ }
+
+ // Now we listen what the server has to say...and give appropriate responses
+ $this->response($this->listen());
+ return true;
+ }
+
+ /**
+ * Disconnect
+ */
+ function disconnect()
+ {
+ if ($this->connected())
+ {
+ // disconnect gracefully
+ if (isset($this->session['sent_presence']))
+ {
+ $this->send_presence('offline', '', true);
+ }
+
+ $this->send('</stream:stream>');
+ $this->session = array();
+ return fclose($this->connection);
+ }
+
+ return false;
+ }
+
+ /**
+ * Connected?
+ */
+ function connected()
+ {
+ return (is_resource($this->connection) && !feof($this->connection)) ? true : false;
+ }
+
+
+ /**
+ * Initiates login (using data from contructor, after calling connect())
+ * @access public
+ * @return bool
+ */
+ function login()
+ {
+ if (!sizeof($this->features))
+ {
+ $this->add_to_log('Error: No feature information from server available.');
+ return false;
+ }
+
+ return $this->response($this->features);
+ }
+
+ /**
+ * Send data to the Jabber server
+ * @param string $xml
+ * @access public
+ * @return bool
+ */
+ function send($xml)
+ {
+ if ($this->connected())
+ {
+ $xml = trim($xml);
+ $this->add_to_log('SEND: '. $xml);
+ return fwrite($this->connection, $xml);
+ }
+ else
+ {
+ $this->add_to_log('Error: Could not send, connection lost (flood?).');
+ return false;
+ }
+ }
+
+ /**
+ * OpenSocket
+ * @param string $server host to connect to
+ * @param int $port port number
+ * @param bool $use_ssl use ssl or not
+ * @access public
+ * @return bool
+ */
+ function open_socket($server, $port, $use_ssl = false)
+ {
+ if (@function_exists('dns_get_record'))
+ {
+ $record = @dns_get_record("_xmpp-client._tcp.$server", DNS_SRV);
+ if (!empty($record) && !empty($record[0]['target']))
+ {
+ $server = $record[0]['target'];
+ }
+ }
+
+ $server = $use_ssl ? 'ssl://' . $server : $server;
+
+ if ($this->connection = @fsockopen($server, $port, $errorno, $errorstr, $this->timeout))
+ {
+ socket_set_blocking($this->connection, 0);
+ socket_set_timeout($this->connection, 60);
+
+ return true;
+ }
+
+ // Apparently an error occured...
+ $this->add_to_log('Error: open_socket() - ' . $errorstr);
+ return false;
+ }
+
+ /**
+ * Return log
+ */
+ function get_log()
+ {
+ if ($this->enable_logging && sizeof($this->log_array))
+ {
+ return implode("<br /><br />", $this->log_array);
+ }
+
+ return '';
+ }
+
+ /**
+ * Add information to log
+ */
+ function add_to_log($string)
+ {
+ if ($this->enable_logging)
+ {
+ $this->log_array[] = utf8_htmlspecialchars($string);
+ }
+ }
+
+ /**
+ * Listens to the connection until it gets data or the timeout is reached.
+ * Thus, it should only be called if data is expected to be received.
+ * @access public
+ * @return mixed either false for timeout or an array with the received data
+ */
+ function listen($timeout = 10, $wait = false)
+ {
+ if (!$this->connected())
+ {
+ return false;
+ }
+
+ // Wait for a response until timeout is reached
+ $start = time();
+ $data = '';
+
+ do
+ {
+ $read = trim(fread($this->connection, 4096));
+ $data .= $read;
+ }
+ while (time() <= $start + $timeout && !feof($this->connection) && ($wait || $data == '' || $read != '' || (substr(rtrim($data), -1) != '>')));
+
+ if ($data != '')
+ {
+ $this->add_to_log('RECV: '. $data);
+ return $this->xmlize($data);
+ }
+ else
+ {
+ $this->add_to_log('Timeout, no response from server.');
+ return false;
+ }
+ }
+
+ /**
+ * Initiates account registration (based on data used for contructor)
+ * @access public
+ * @return bool
+ */
+ function register()
+ {
+ if (!isset($this->session['id']) || isset($this->session['jid']))
+ {
+ $this->add_to_log('Error: Cannot initiate registration.');
+ return false;
+ }
+
+ $this->send("<iq type='get' id='reg_1'><query xmlns='jabber:iq:register'/></iq>");
+ return $this->response($this->listen());
+ }
+
+ /**
+ * Sets account presence. No additional info required (default is "online" status)
+ * @param $message online, offline...
+ * @param $type dnd, away, chat, xa or nothing
+ * @param $unavailable set this to true if you want to become unavailable
+ * @access public
+ * @return bool
+ */
+ function send_presence($message = '', $type = '', $unavailable = false)
+ {
+ if (!isset($this->session['jid']))
+ {
+ $this->add_to_log('ERROR: send_presence() - Cannot set presence at this point, no jid given.');
+ return false;
+ }
+
+ $type = strtolower($type);
+ $type = (in_array($type, array('dnd', 'away', 'chat', 'xa'))) ? '<show>'. $type .'</show>' : '';
+
+ $unavailable = ($unavailable) ? " type='unavailable'" : '';
+ $message = ($message) ? '<status>' . utf8_htmlspecialchars($message) .'</status>' : '';
+
+ $this->session['sent_presence'] = !$unavailable;
+
+ return $this->send("<presence$unavailable>" . $type . $message . '</presence>');
+ }
+
+ /**
+ * This handles all the different XML elements
+ * @param array $xml
+ * @access public
+ * @return bool
+ */
+ function response($xml)
+ {
+ if (!is_array($xml) || !sizeof($xml))
+ {
+ return false;
+ }
+
+ // did we get multiple elements? do one after another
+ // array('message' => ..., 'presence' => ...)
+ if (sizeof($xml) > 1)
+ {
+ foreach ($xml as $key => $value)
+ {
+ $this->response(array($key => $value));
+ }
+ return;
+ }
+ else
+ {
+ // or even multiple elements of the same type?
+ // array('message' => array(0 => ..., 1 => ...))
+ if (sizeof(reset($xml)) > 1)
+ {
+ foreach (reset($xml) as $value)
+ {
+ $this->response(array(key($xml) => array(0 => $value)));
+ }
+ return;
+ }
+ }
+
+ switch (key($xml))
+ {
+ case 'stream:stream':
+ // Connection initialised (or after authentication). Not much to do here...
+
+ if (isset($xml['stream:stream'][0]['#']['stream:features']))
+ {
+ // we already got all info we need
+ $this->features = $xml['stream:stream'][0]['#'];
+ }
+ else
+ {
+ $this->features = $this->listen();
+ }
+
+ $second_time = isset($this->session['id']);
+ $this->session['id'] = $xml['stream:stream'][0]['@']['id'];
+
+ if ($second_time)
+ {
+ // If we are here for the second time after TLS, we need to continue logging in
+ return $this->login();
+ }
+
+ // go on with authentication?
+ if (isset($this->features['stream:features'][0]['#']['bind']) || !empty($this->session['tls']))
+ {
+ return $this->response($this->features);
+ }
+ break;
+
+ case 'stream:features':
+ // Resource binding after successful authentication
+ if (isset($this->session['authenticated']))
+ {
+ // session required?
+ $this->session['sess_required'] = isset($xml['stream:features'][0]['#']['session']);
+
+ $this->send("<iq type='set' id='bind_1'>
+ <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
+ <resource>" . utf8_htmlspecialchars($this->resource) . '</resource>
+ </bind>
+ </iq>');
+ return $this->response($this->listen());
+ }
+
+ // Let's use TLS if SSL is not enabled and we can actually use it
+ if (!$this->session['ssl'] && $this->can_use_tls() && $this->can_use_ssl() && isset($xml['stream:features'][0]['#']['starttls']))
+ {
+ $this->add_to_log('Switching to TLS.');
+ $this->send("<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>\n");
+ return $this->response($this->listen());
+ }
+
+ // Does the server support SASL authentication?
+
+ // I hope so, because we do (and no other method).
+ if (isset($xml['stream:features'][0]['#']['mechanisms'][0]['@']['xmlns']) && $xml['stream:features'][0]['#']['mechanisms'][0]['@']['xmlns'] == 'urn:ietf:params:xml:ns:xmpp-sasl')
+ {
+ // Now decide on method
+ $methods = array();
+
+ foreach ($xml['stream:features'][0]['#']['mechanisms'][0]['#']['mechanism'] as $value)
+ {
+ $methods[] = $value['#'];
+ }
+
+ // we prefer DIGEST-MD5
+ // we don't want to use plain authentication (neither does the server usually) if no encryption is in place
+
+ // http://www.xmpp.org/extensions/attic/jep-0078-1.7.html
+ // The plaintext mechanism SHOULD NOT be used unless the underlying stream is encrypted (using SSL or TLS)
+ // and the client has verified that the server certificate is signed by a trusted certificate authority.
+
+ if (in_array('DIGEST-MD5', $methods))
+ {
+ $this->send("<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'/>");
+ }
+ else if (in_array('PLAIN', $methods) && ($this->session['ssl'] || !empty($this->session['tls'])))
+ {
+ $this->send("<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>"
+ . base64_encode(chr(0) . $this->username . '@' . $this->server . chr(0) . $this->password) .
+ '</auth>');
+ }
+ else if (in_array('ANONYMOUS', $methods))
+ {
+ $this->send("<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='ANONYMOUS'/>");
+ }
+ else
+ {
+ // not good...
+ $this->add_to_log('Error: No authentication method supported.');
+ $this->disconnect();
+ return false;
+ }
+
+ return $this->response($this->listen());
+ }
+ else
+ {
+ // ok, this is it. bye.
+ $this->add_to_log('Error: Server does not offer SASL authentication.');
+ $this->disconnect();
+ return false;
+ }
+ break;
+
+ case 'challenge':
+ // continue with authentication...a challenge literally -_-
+ $decoded = base64_decode($xml['challenge'][0]['#']);
+ $decoded = $this->parse_data($decoded);
+
+ if (!isset($decoded['digest-uri']))
+ {
+ $decoded['digest-uri'] = 'xmpp/'. $this->server;
+ }
+
+ // better generate a cnonce, maybe it's needed
+ $decoded['cnonce'] = base64_encode(md5(uniqid(mt_rand(), true)));
+
+ // second challenge?
+ if (isset($decoded['rspauth']))
+ {
+ $this->send("<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>");
+ }
+ else
+ {
+ // Make sure we only use 'auth' for qop (relevant for $this->encrypt_password())
+ // If the <response> is choking up on the changed parameter we may need to adjust encrypt_password() directly
+ if (isset($decoded['qop']) && $decoded['qop'] != 'auth' && strpos($decoded['qop'], 'auth') !== false)
+ {
+ $decoded['qop'] = 'auth';
+ }
+
+ $response = array(
+ 'username' => $this->username,
+ 'response' => $this->encrypt_password(array_merge($decoded, array('nc' => '00000001'))),
+ 'charset' => 'utf-8',
+ 'nc' => '00000001',
+ 'qop' => 'auth', // only auth being supported
+ );
+
+ foreach (array('nonce', 'digest-uri', 'realm', 'cnonce') as $key)
+ {
+ if (isset($decoded[$key]))
+ {
+ $response[$key] = $decoded[$key];
+ }
+ }
+
+ $this->send("<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>" . base64_encode($this->implode_data($response)) . '</response>');
+ }
+
+ return $this->response($this->listen());
+ break;
+
+ case 'failure':
+ $this->add_to_log('Error: Server sent "failure".');
+ $this->disconnect();
+ return false;
+ break;
+
+ case 'proceed':
+ // continue switching to TLS
+ $meta = stream_get_meta_data($this->connection);
+ socket_set_blocking($this->connection, 1);
+
+ if (!stream_socket_enable_crypto($this->connection, true, STREAM_CRYPTO_METHOD_TLS_CLIENT))
+ {
+ $this->add_to_log('Error: TLS mode change failed.');
+ return false;
+ }
+
+ socket_set_blocking($this->connection, $meta['blocked']);
+ $this->session['tls'] = true;
+
+ // new stream
+ $this->send("<?xml version='1.0' encoding='UTF-8' ?" . ">\n");
+ $this->send("<stream:stream to='{$this->server}' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>\n");
+
+ return $this->response($this->listen());
+ break;
+
+ case 'success':
+ // Yay, authentication successful.
+ $this->send("<stream:stream to='{$this->server}' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>\n");
+ $this->session['authenticated'] = true;
+
+ // we have to wait for another response
+ return $this->response($this->listen());
+ break;
+
+ case 'iq':
+ // we are not interested in IQs we did not expect
+ if (!isset($xml['iq'][0]['@']['id']))
+ {
+ return false;
+ }
+
+ // multiple possibilities here
+ switch ($xml['iq'][0]['@']['id'])
+ {
+ case 'bind_1':
+ $this->session['jid'] = $xml['iq'][0]['#']['bind'][0]['#']['jid'][0]['#'];
+
+ // and (maybe) yet another request to be able to send messages *finally*
+ if ($this->session['sess_required'])
+ {
+ $this->send("<iq to='{$this->server}' type='set' id='sess_1'>
+ <session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
+ </iq>");
+ return $this->response($this->listen());
+ }
+
+ return true;
+ break;
+
+ case 'sess_1':
+ return true;
+ break;
+
+ case 'reg_1':
+ $this->send("<iq type='set' id='reg_2'>
+ <query xmlns='jabber:iq:register'>
+ <username>" . utf8_htmlspecialchars($this->username) . "</username>
+ <password>" . utf8_htmlspecialchars($this->password) . "</password>
+ </query>
+ </iq>");
+ return $this->response($this->listen());
+ break;
+
+ case 'reg_2':
+ // registration end
+ if (isset($xml['iq'][0]['#']['error']))
+ {
+ $this->add_to_log('Warning: Registration failed.');
+ return false;
+ }
+ return true;
+ break;
+
+ case 'unreg_1':
+ return true;
+ break;
+
+ default:
+ $this->add_to_log('Notice: Received unexpected IQ.');
+ return false;
+ break;
+ }
+ break;
+
+ case 'message':
+ // we are only interested in content...
+ if (!isset($xml['message'][0]['#']['body']))
+ {
+ return false;
+ }
+
+ $message['body'] = $xml['message'][0]['#']['body'][0]['#'];
+ $message['from'] = $xml['message'][0]['@']['from'];
+
+ if (isset($xml['message'][0]['#']['subject']))
+ {
+ $message['subject'] = $xml['message'][0]['#']['subject'][0]['#'];
+ }
+ $this->session['messages'][] = $message;
+ break;
+
+ default:
+ // hm...don't know this response
+ $this->add_to_log('Notice: Unknown server response (' . key($xml) . ')');
+ return false;
+ break;
+ }
+ }
+
+ function send_message($to, $text, $subject = '', $type = 'normal')
+ {
+ if (!isset($this->session['jid']))
+ {
+ return false;
+ }
+
+ if (!in_array($type, array('chat', 'normal', 'error', 'groupchat', 'headline')))
+ {
+ $type = 'normal';
+ }
+
+ return $this->send("<message from='" . utf8_htmlspecialchars($this->session['jid']) . "' to='" . utf8_htmlspecialchars($to) . "' type='$type' id='" . uniqid('msg') . "'>
+ <subject>" . utf8_htmlspecialchars($subject) . "</subject>
+ <body>" . utf8_htmlspecialchars($text) . "</body>
+ </message>"
+ );
+ }
+
+ /**
+ * Encrypts a password as in RFC 2831
+ * @param array $data Needs data from the client-server connection
+ * @access public
+ * @return string
+ */
+ function encrypt_password($data)
+ {
+ // let's me think about <challenge> again...
+ foreach (array('realm', 'cnonce', 'digest-uri') as $key)
+ {
+ if (!isset($data[$key]))
+ {
+ $data[$key] = '';
+ }
+ }
+
+ $pack = md5($this->username . ':' . $data['realm'] . ':' . $this->password);
+
+ if (isset($data['authzid']))
+ {
+ $a1 = pack('H32', $pack) . sprintf(':%s:%s:%s', $data['nonce'], $data['cnonce'], $data['authzid']);
+ }
+ else
+ {
+ $a1 = pack('H32', $pack) . sprintf(':%s:%s', $data['nonce'], $data['cnonce']);
+ }
+
+ // should be: qop = auth
+ $a2 = 'AUTHENTICATE:'. $data['digest-uri'];
+
+ return md5(sprintf('%s:%s:%s:%s:%s:%s', md5($a1), $data['nonce'], $data['nc'], $data['cnonce'], $data['qop'], md5($a2)));
+ }
+
+ /**
+ * parse_data like a="b",c="d",... or like a="a, b", c, d="e", f=g,...
+ * @param string $data
+ * @access public
+ * @return array a => b ...
+ */
+ function parse_data($data)
+ {
+ $data = explode(',', $data);
+ $pairs = array();
+ $key = false;
+
+ foreach ($data as $pair)
+ {
+ $dd = strpos($pair, '=');
+
+ if ($dd)
+ {
+ $key = trim(substr($pair, 0, $dd));
+ $pairs[$key] = trim(trim(substr($pair, $dd + 1)), '"');
+ }
+ else if (strpos(strrev(trim($pair)), '"') === 0 && $key)
+ {
+ // We are actually having something left from "a, b" values, add it to the last one we handled.
+ $pairs[$key] .= ',' . trim(trim($pair), '"');
+ continue;
+ }
+ }
+
+ return $pairs;
+ }
+
+ /**
+ * opposite of jabber::parse_data()
+ * @param array $data
+ * @access public
+ * @return string
+ */
+ function implode_data($data)
+ {
+ $return = array();
+ foreach ($data as $key => $value)
+ {
+ $return[] = $key . '="' . $value . '"';
+ }
+ return implode(',', $return);
+ }
+
+ /**
+ * xmlize()
+ * @author Hans Anderson
+ * @copyright Hans Anderson / http://www.hansanderson.com/php/xml/
+ */
+ function xmlize($data, $skip_white = 1, $encoding = 'UTF-8')
+ {
+ $data = trim($data);
+
+ if (substr($data, 0, 5) != '<?xml')
+ {
+ // mod
+ $data = '<root>'. $data . '</root>';
+ }
+
+ $vals = $index = $array = array();
+ $parser = xml_parser_create($encoding);
+ xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
+ xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, $skip_white);
+ xml_parse_into_struct($parser, $data, $vals, $index);
+ xml_parser_free($parser);
+
+ $i = 0;
+ $tagname = $vals[$i]['tag'];
+
+ $array[$tagname][0]['@'] = (isset($vals[$i]['attributes'])) ? $vals[$i]['attributes'] : array();
+ $array[$tagname][0]['#'] = $this->_xml_depth($vals, $i);
+
+ if (substr($data, 0, 5) != '<?xml')
+ {
+ $array = $array['root'][0]['#'];
+ }
+
+ return $array;
+ }
+
+ /**
+ * _xml_depth()
+ * @author Hans Anderson
+ * @copyright Hans Anderson / http://www.hansanderson.com/php/xml/
+ */
+ function _xml_depth($vals, &$i)
+ {
+ $children = array();
+
+ if (isset($vals[$i]['value']))
+ {
+ array_push($children, $vals[$i]['value']);
+ }
+
+ while (++$i < sizeof($vals))
+ {
+ switch ($vals[$i]['type'])
+ {
+ case 'open':
+
+ $tagname = (isset($vals[$i]['tag'])) ? $vals[$i]['tag'] : '';
+ $size = (isset($children[$tagname])) ? sizeof($children[$tagname]) : 0;
+
+ if (isset($vals[$i]['attributes']))
+ {
+ $children[$tagname][$size]['@'] = $vals[$i]['attributes'];
+ }
+
+ $children[$tagname][$size]['#'] = $this->_xml_depth($vals, $i);
+
+ break;
+
+ case 'cdata':
+ array_push($children, $vals[$i]['value']);
+ break;
+
+ case 'complete':
+
+ $tagname = $vals[$i]['tag'];
+ $size = (isset($children[$tagname])) ? sizeof($children[$tagname]) : 0;
+ $children[$tagname][$size]['#'] = (isset($vals[$i]['value'])) ? $vals[$i]['value'] : array();
+
+ if (isset($vals[$i]['attributes']))
+ {
+ $children[$tagname][$size]['@'] = $vals[$i]['attributes'];
+ }
+
+ break;
+
+ case 'close':
+ return $children;
+ break;
+ }
+ }
+
+ return $children;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
new file mode 100644
index 0000000000..8f4e582b3c
--- /dev/null
+++ b/phpBB/includes/functions_messenger.php
@@ -0,0 +1,1558 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Messenger
+* @package phpBB3
+*/
+class messenger
+{
+ var $vars, $msg, $extra_headers, $replyto, $from, $subject;
+ var $addresses = array();
+
+ var $mail_priority = MAIL_NORMAL_PRIORITY;
+ var $use_queue = true;
+
+ var $tpl_obj = NULL;
+ var $tpl_msg = array();
+ var $eol = "\n";
+
+ /**
+ * Constructor
+ */
+ function messenger($use_queue = true)
+ {
+ global $config;
+
+ $this->use_queue = (!$config['email_package_size']) ? false : $use_queue;
+ $this->subject = '';
+
+ // Determine EOL character (\n for UNIX, \r\n for Windows and \r for Mac)
+ $this->eol = (!defined('PHP_EOL')) ? (($eol = strtolower(substr(PHP_OS, 0, 3))) == 'win') ? "\r\n" : (($eol == 'mac') ? "\r" : "\n") : PHP_EOL;
+ $this->eol = (!$this->eol) ? "\n" : $this->eol;
+ }
+
+ /**
+ * Resets all the data (address, template file, etc etc) to default
+ */
+ function reset()
+ {
+ $this->addresses = $this->extra_headers = array();
+ $this->vars = $this->msg = $this->replyto = $this->from = '';
+ $this->mail_priority = MAIL_NORMAL_PRIORITY;
+ }
+
+ /**
+ * Sets an email address to send to
+ */
+ function to($address, $realname = '')
+ {
+ global $config;
+
+ if (!trim($address))
+ {
+ return;
+ }
+
+ $pos = isset($this->addresses['to']) ? sizeof($this->addresses['to']) : 0;
+
+ $this->addresses['to'][$pos]['email'] = trim($address);
+
+ // If empty sendmail_path on windows, PHP changes the to line
+ if (!$config['smtp_delivery'] && DIRECTORY_SEPARATOR == '\\')
+ {
+ $this->addresses['to'][$pos]['name'] = '';
+ }
+ else
+ {
+ $this->addresses['to'][$pos]['name'] = trim($realname);
+ }
+ }
+
+ /**
+ * Sets an cc address to send to
+ */
+ function cc($address, $realname = '')
+ {
+ if (!trim($address))
+ {
+ return;
+ }
+
+ $pos = isset($this->addresses['cc']) ? sizeof($this->addresses['cc']) : 0;
+ $this->addresses['cc'][$pos]['email'] = trim($address);
+ $this->addresses['cc'][$pos]['name'] = trim($realname);
+ }
+
+ /**
+ * Sets an bcc address to send to
+ */
+ function bcc($address, $realname = '')
+ {
+ if (!trim($address))
+ {
+ return;
+ }
+
+ $pos = isset($this->addresses['bcc']) ? sizeof($this->addresses['bcc']) : 0;
+ $this->addresses['bcc'][$pos]['email'] = trim($address);
+ $this->addresses['bcc'][$pos]['name'] = trim($realname);
+ }
+
+ /**
+ * Sets a im contact to send to
+ */
+ function im($address, $realname = '')
+ {
+ // IM-Addresses could be empty
+ if (!trim($address))
+ {
+ return;
+ }
+
+ $pos = isset($this->addresses['im']) ? sizeof($this->addresses['im']) : 0;
+ $this->addresses['im'][$pos]['uid'] = trim($address);
+ $this->addresses['im'][$pos]['name'] = trim($realname);
+ }
+
+ /**
+ * Set the reply to address
+ */
+ function replyto($address)
+ {
+ $this->replyto = trim($address);
+ }
+
+ /**
+ * Set the from address
+ */
+ function from($address)
+ {
+ $this->from = trim($address);
+ }
+
+ /**
+ * set up subject for mail
+ */
+ function subject($subject = '')
+ {
+ $this->subject = trim($subject);
+ }
+
+ /**
+ * set up extra mail headers
+ */
+ function headers($headers)
+ {
+ $this->extra_headers[] = trim($headers);
+ }
+
+ /**
+ * Set the email priority
+ */
+ function set_mail_priority($priority = MAIL_NORMAL_PRIORITY)
+ {
+ $this->mail_priority = $priority;
+ }
+
+ /**
+ * Set email template to use
+ */
+ function template($template_file, $template_lang = '', $template_path = '')
+ {
+ global $config, $phpbb_root_path, $user;
+
+ if (!trim($template_file))
+ {
+ trigger_error('No template file for emailing set.', E_USER_ERROR);
+ }
+
+ if (!trim($template_lang))
+ {
+ $template_lang = basename($config['default_lang']);
+ }
+
+ // tpl_msg now holds a template object we can use to parse the template file
+ if (!isset($this->tpl_msg[$template_lang . $template_file]))
+ {
+ $this->tpl_msg[$template_lang . $template_file] = new template();
+ $tpl = &$this->tpl_msg[$template_lang . $template_file];
+
+ if (!$template_path)
+ {
+ $template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
+ $template_path .= $template_lang . '/email';
+ }
+
+ $tpl->set_custom_template($template_path, $template_lang . '_email', 'email');
+
+ $tpl->set_filenames(array(
+ 'body' => $template_file . '.txt',
+ ));
+ }
+
+ $this->tpl_obj = &$this->tpl_msg[$template_lang . $template_file];
+ $this->vars = &$this->tpl_obj->_rootref;
+ $this->tpl_msg = '';
+
+ return true;
+ }
+
+ /**
+ * assign variables to email template
+ */
+ function assign_vars($vars)
+ {
+ if (!is_object($this->tpl_obj))
+ {
+ return;
+ }
+
+ $this->tpl_obj->assign_vars($vars);
+ }
+
+ function assign_block_vars($blockname, $vars)
+ {
+ if (!is_object($this->tpl_obj))
+ {
+ return;
+ }
+
+ $this->tpl_obj->assign_block_vars($blockname, $vars);
+ }
+
+ /**
+ * Send the mail out to the recipients set previously in var $this->addresses
+ */
+ function send($method = NOTIFY_EMAIL, $break = false)
+ {
+ global $config, $user;
+
+ // We add some standard variables we always use, no need to specify them always
+ if (!isset($this->vars['U_BOARD']))
+ {
+ $this->assign_vars(array(
+ 'U_BOARD' => generate_board_url(),
+ ));
+ }
+
+ if (!isset($this->vars['EMAIL_SIG']))
+ {
+ $this->assign_vars(array(
+ 'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . htmlspecialchars_decode($config['board_email_sig'])),
+ ));
+ }
+
+ if (!isset($this->vars['SITENAME']))
+ {
+ $this->assign_vars(array(
+ 'SITENAME' => htmlspecialchars_decode($config['sitename']),
+ ));
+ }
+
+ // Parse message through template
+ $this->msg = trim($this->tpl_obj->assign_display('body'));
+
+ // Because we use \n for newlines in the body message we need to fix line encoding errors for those admins who uploaded email template files in the wrong encoding
+ $this->msg = str_replace("\r\n", "\n", $this->msg);
+
+ // We now try and pull a subject from the email body ... if it exists,
+ // do this here because the subject may contain a variable
+ $drop_header = '';
+ $match = array();
+ if (preg_match('#^(Subject:(.*?))$#m', $this->msg, $match))
+ {
+ $this->subject = (trim($match[2]) != '') ? trim($match[2]) : (($this->subject != '') ? $this->subject : $user->lang['NO_EMAIL_SUBJECT']);
+ $drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
+ }
+ else
+ {
+ $this->subject = (($this->subject != '') ? $this->subject : $user->lang['NO_EMAIL_SUBJECT']);
+ }
+
+ if ($drop_header)
+ {
+ $this->msg = trim(preg_replace('#' . $drop_header . '#s', '', $this->msg));
+ }
+
+ if ($break)
+ {
+ return true;
+ }
+
+ switch ($method)
+ {
+ case NOTIFY_EMAIL:
+ $result = $this->msg_email();
+ break;
+
+ case NOTIFY_IM:
+ $result = $this->msg_jabber();
+ break;
+
+ case NOTIFY_BOTH:
+ $result = $this->msg_email();
+ $this->msg_jabber();
+ break;
+ }
+
+ $this->reset();
+ return $result;
+ }
+
+ /**
+ * Add error message to log
+ */
+ function error($type, $msg)
+ {
+ global $user, $phpEx, $phpbb_root_path, $config;
+
+ // Session doesn't exist, create it
+ if (!isset($user->session_id) || $user->session_id === '')
+ {
+ $user->session_begin();
+ }
+
+ $calling_page = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : $_ENV['PHP_SELF'];
+
+ $message = '';
+ switch ($type)
+ {
+ case 'EMAIL':
+ $message = '<strong>EMAIL/' . (($config['smtp_delivery']) ? 'SMTP' : 'PHP/' . $config['email_function_name'] . '()') . '</strong>';
+ break;
+
+ default:
+ $message = "<strong>$type</strong>";
+ break;
+ }
+
+ $message .= '<br /><em>' . htmlspecialchars($calling_page) . '</em><br /><br />' . $msg . '<br />';
+ add_log('critical', 'LOG_ERROR_' . $type, $message);
+ }
+
+ /**
+ * Save to queue
+ */
+ function save_queue()
+ {
+ global $config;
+
+ if ($config['email_package_size'] && $this->use_queue && !empty($this->queue))
+ {
+ $this->queue->save();
+ return;
+ }
+ }
+
+ /**
+ * Return email header
+ */
+ function build_header($to, $cc, $bcc)
+ {
+ global $config;
+
+ // We could use keys here, but we won't do this for 3.0.x to retain backwards compatibility
+ $headers = array();
+
+ $headers[] = 'From: ' . $this->from;
+
+ if ($cc)
+ {
+ $headers[] = 'Cc: ' . $cc;
+ }
+
+ if ($bcc)
+ {
+ $headers[] = 'Bcc: ' . $bcc;
+ }
+
+ $headers[] = 'Reply-To: ' . $this->replyto;
+ $headers[] = 'Return-Path: <' . $config['board_email'] . '>';
+ $headers[] = 'Sender: <' . $config['board_email'] . '>';
+ $headers[] = 'MIME-Version: 1.0';
+ $headers[] = 'Message-ID: <' . md5(unique_id(time())) . '@' . $config['server_name'] . '>';
+ $headers[] = 'Date: ' . date('r', time());
+ $headers[] = 'Content-Type: text/plain; charset=UTF-8'; // format=flowed
+ $headers[] = 'Content-Transfer-Encoding: 8bit'; // 7bit
+
+ $headers[] = 'X-Priority: ' . $this->mail_priority;
+ $headers[] = 'X-MSMail-Priority: ' . (($this->mail_priority == MAIL_LOW_PRIORITY) ? 'Low' : (($this->mail_priority == MAIL_NORMAL_PRIORITY) ? 'Normal' : 'High'));
+ $headers[] = 'X-Mailer: phpBB3';
+ $headers[] = 'X-MimeOLE: phpBB3';
+ $headers[] = 'X-phpBB-Origin: phpbb://' . str_replace(array('http://', 'https://'), array('', ''), generate_board_url());
+
+ if (sizeof($this->extra_headers))
+ {
+ $headers = array_merge($headers, $this->extra_headers);
+ }
+
+ return $headers;
+ }
+
+ /**
+ * Send out emails
+ */
+ function msg_email()
+ {
+ global $config, $user;
+
+ if (empty($config['email_enable']))
+ {
+ return false;
+ }
+
+ // Addresses to send to?
+ if (empty($this->addresses) || (empty($this->addresses['to']) && empty($this->addresses['cc']) && empty($this->addresses['bcc'])))
+ {
+ // Send was successful. ;)
+ return true;
+ }
+
+ $use_queue = false;
+ if ($config['email_package_size'] && $this->use_queue)
+ {
+ if (empty($this->queue))
+ {
+ $this->queue = new queue();
+ $this->queue->init('email', $config['email_package_size']);
+ }
+ $use_queue = true;
+ }
+
+ if (empty($this->replyto))
+ {
+ $this->replyto = '<' . $config['board_contact'] . '>';
+ }
+
+ if (empty($this->from))
+ {
+ $this->from = '<' . $config['board_contact'] . '>';
+ }
+
+ $encode_eol = ($config['smtp_delivery']) ? "\r\n" : $this->eol;
+
+ // Build to, cc and bcc strings
+ $to = $cc = $bcc = '';
+ foreach ($this->addresses as $type => $address_ary)
+ {
+ if ($type == 'im')
+ {
+ continue;
+ }
+
+ foreach ($address_ary as $which_ary)
+ {
+ $$type .= (($$type != '') ? ', ' : '') . (($which_ary['name'] != '') ? mail_encode($which_ary['name'], $encode_eol) . ' <' . $which_ary['email'] . '>' : $which_ary['email']);
+ }
+ }
+
+ // Build header
+ $headers = $this->build_header($to, $cc, $bcc);
+
+ // Send message ...
+ if (!$use_queue)
+ {
+ $mail_to = ($to == '') ? 'undisclosed-recipients:;' : $to;
+ $err_msg = '';
+
+ if ($config['smtp_delivery'])
+ {
+ $result = smtpmail($this->addresses, mail_encode($this->subject), wordwrap(utf8_wordwrap($this->msg), 997, "\n", true), $err_msg, $headers);
+ }
+ else
+ {
+ $result = phpbb_mail($mail_to, $this->subject, $this->msg, $headers, $this->eol, $err_msg);
+ }
+
+ if (!$result)
+ {
+ $this->error('EMAIL', $err_msg);
+ return false;
+ }
+ }
+ else
+ {
+ $this->queue->put('email', array(
+ 'to' => $to,
+ 'addresses' => $this->addresses,
+ 'subject' => $this->subject,
+ 'msg' => $this->msg,
+ 'headers' => $headers)
+ );
+ }
+
+ return true;
+ }
+
+ /**
+ * Send jabber message out
+ */
+ function msg_jabber()
+ {
+ global $config, $db, $user, $phpbb_root_path, $phpEx;
+
+ if (empty($config['jab_enable']) || empty($config['jab_host']) || empty($config['jab_username']) || empty($config['jab_password']))
+ {
+ return false;
+ }
+
+ if (empty($this->addresses['im']))
+ {
+ // Send was successful. ;)
+ return true;
+ }
+
+ $use_queue = false;
+ if ($config['jab_package_size'] && $this->use_queue)
+ {
+ if (empty($this->queue))
+ {
+ $this->queue = new queue();
+ $this->queue->init('jabber', $config['jab_package_size']);
+ }
+ $use_queue = true;
+ }
+
+ $addresses = array();
+ foreach ($this->addresses['im'] as $type => $uid_ary)
+ {
+ $addresses[] = $uid_ary['uid'];
+ }
+ $addresses = array_unique($addresses);
+
+ if (!$use_queue)
+ {
+ include_once($phpbb_root_path . 'includes/functions_jabber.' . $phpEx);
+ $this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_use_ssl']);
+
+ if (!$this->jabber->connect())
+ {
+ $this->error('JABBER', $user->lang['ERR_JAB_CONNECT'] . '<br />' . $this->jabber->get_log());
+ return false;
+ }
+
+ if (!$this->jabber->login())
+ {
+ $this->error('JABBER', $user->lang['ERR_JAB_AUTH'] . '<br />' . $this->jabber->get_log());
+ return false;
+ }
+
+ foreach ($addresses as $address)
+ {
+ $this->jabber->send_message($address, $this->msg, $this->subject);
+ }
+
+ $this->jabber->disconnect();
+ }
+ else
+ {
+ $this->queue->put('jabber', array(
+ 'addresses' => $addresses,
+ 'subject' => $this->subject,
+ 'msg' => $this->msg)
+ );
+ }
+ unset($addresses);
+ return true;
+ }
+}
+
+/**
+* handling email and jabber queue
+* @package phpBB3
+*/
+class queue
+{
+ var $data = array();
+ var $queue_data = array();
+ var $package_size = 0;
+ var $cache_file = '';
+ var $eol = "\n";
+
+ /**
+ * constructor
+ */
+ function queue()
+ {
+ global $phpEx, $phpbb_root_path;
+
+ $this->data = array();
+ $this->cache_file = "{$phpbb_root_path}cache/queue.$phpEx";
+
+ // Determine EOL character (\n for UNIX, \r\n for Windows and \r for Mac)
+ $this->eol = (!defined('PHP_EOL')) ? (($eol = strtolower(substr(PHP_OS, 0, 3))) == 'win') ? "\r\n" : (($eol == 'mac') ? "\r" : "\n") : PHP_EOL;
+ $this->eol = (!$this->eol) ? "\n" : $this->eol;
+ }
+
+ /**
+ * Init a queue object
+ */
+ function init($object, $package_size)
+ {
+ $this->data[$object] = array();
+ $this->data[$object]['package_size'] = $package_size;
+ $this->data[$object]['data'] = array();
+ }
+
+ /**
+ * Put object in queue
+ */
+ function put($object, $scope)
+ {
+ $this->data[$object]['data'][] = $scope;
+ }
+
+ /**
+ * Process queue
+ * Using lock file
+ */
+ function process()
+ {
+ global $db, $config, $phpEx, $phpbb_root_path, $user;
+
+ set_config('last_queue_run', time(), true);
+
+ // Delete stale lock file
+ if (file_exists($this->cache_file . '.lock') && !file_exists($this->cache_file))
+ {
+ @unlink($this->cache_file . '.lock');
+ return;
+ }
+
+ if (!file_exists($this->cache_file) || (file_exists($this->cache_file . '.lock') && filemtime($this->cache_file) > time() - $config['queue_interval']))
+ {
+ return;
+ }
+
+ $fp = @fopen($this->cache_file . '.lock', 'wb');
+ fclose($fp);
+ @chmod($this->cache_file . '.lock', 0777);
+
+ include($this->cache_file);
+
+ foreach ($this->queue_data as $object => $data_ary)
+ {
+ @set_time_limit(0);
+
+ if (!isset($data_ary['package_size']))
+ {
+ $data_ary['package_size'] = 0;
+ }
+
+ $package_size = $data_ary['package_size'];
+ $num_items = (!$package_size || sizeof($data_ary['data']) < $package_size) ? sizeof($data_ary['data']) : $package_size;
+
+ // If the amount of emails to be sent is way more than package_size than we need to increase it to prevent backlogs...
+ if (sizeof($data_ary['data']) > $package_size * 2.5)
+ {
+ $num_items = sizeof($data_ary['data']);
+ }
+
+ switch ($object)
+ {
+ case 'email':
+ // Delete the email queued objects if mailing is disabled
+ if (!$config['email_enable'])
+ {
+ unset($this->queue_data['email']);
+ continue 2;
+ }
+ break;
+
+ case 'jabber':
+ if (!$config['jab_enable'])
+ {
+ unset($this->queue_data['jabber']);
+ continue 2;
+ }
+
+ include_once($phpbb_root_path . 'includes/functions_jabber.' . $phpEx);
+ $this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_use_ssl']);
+
+ if (!$this->jabber->connect())
+ {
+ messenger::error('JABBER', $user->lang['ERR_JAB_CONNECT']);
+ continue 2;
+ }
+
+ if (!$this->jabber->login())
+ {
+ messenger::error('JABBER', $user->lang['ERR_JAB_AUTH']);
+ continue 2;
+ }
+
+ break;
+
+ default:
+ return;
+ }
+
+ for ($i = 0; $i < $num_items; $i++)
+ {
+ // Make variables available...
+ extract(array_shift($this->queue_data[$object]['data']));
+
+ switch ($object)
+ {
+ case 'email':
+ $err_msg = '';
+ $to = (!$to) ? 'undisclosed-recipients:;' : $to;
+
+ if ($config['smtp_delivery'])
+ {
+ $result = smtpmail($addresses, mail_encode($subject), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $err_msg, $headers);
+ }
+ else
+ {
+ $result = phpbb_mail($to, $subject, $msg, $headers, $this->eol, $err_msg);
+ }
+
+ if (!$result)
+ {
+ @unlink($this->cache_file . '.lock');
+
+ messenger::error('EMAIL', $err_msg);
+ continue 2;
+ }
+ break;
+
+ case 'jabber':
+ foreach ($addresses as $address)
+ {
+ if ($this->jabber->send_message($address, $msg, $subject) === false)
+ {
+ messenger::error('JABBER', $this->jabber->get_log());
+ continue 3;
+ }
+ }
+ break;
+ }
+ }
+
+ // No more data for this object? Unset it
+ if (!sizeof($this->queue_data[$object]['data']))
+ {
+ unset($this->queue_data[$object]);
+ }
+
+ // Post-object processing
+ switch ($object)
+ {
+ case 'jabber':
+ // Hang about a couple of secs to ensure the messages are
+ // handled, then disconnect
+ $this->jabber->disconnect();
+ break;
+ }
+ }
+
+ if (!sizeof($this->queue_data))
+ {
+ @unlink($this->cache_file);
+ }
+ else
+ {
+ if ($fp = @fopen($this->cache_file, 'wb'))
+ {
+ @flock($fp, LOCK_EX);
+ fwrite($fp, "<?php\nif (!defined('IN_PHPBB')) exit;\n\$this->queue_data = unserialize(" . var_export(serialize($this->queue_data), true) . ");\n\n?>");
+ @flock($fp, LOCK_UN);
+ fclose($fp);
+
+ phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE);
+ }
+ }
+
+ @unlink($this->cache_file . '.lock');
+ }
+
+ /**
+ * Save queue
+ */
+ function save()
+ {
+ if (!sizeof($this->data))
+ {
+ return;
+ }
+
+ if (file_exists($this->cache_file))
+ {
+ include($this->cache_file);
+
+ foreach ($this->queue_data as $object => $data_ary)
+ {
+ if (isset($this->data[$object]) && sizeof($this->data[$object]))
+ {
+ $this->data[$object]['data'] = array_merge($data_ary['data'], $this->data[$object]['data']);
+ }
+ else
+ {
+ $this->data[$object]['data'] = $data_ary['data'];
+ }
+ }
+ }
+
+ if ($fp = @fopen($this->cache_file, 'w'))
+ {
+ @flock($fp, LOCK_EX);
+ fwrite($fp, "<?php\nif (!defined('IN_PHPBB')) exit;\n\$this->queue_data = unserialize(" . var_export(serialize($this->data), true) . ");\n\n?>");
+ @flock($fp, LOCK_UN);
+ fclose($fp);
+
+ phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE);
+ }
+ }
+}
+
+/**
+* Replacement or substitute for PHP's mail command
+*/
+function smtpmail($addresses, $subject, $message, &$err_msg, $headers = false)
+{
+ global $config, $user;
+
+ // Fix any bare linefeeds in the message to make it RFC821 Compliant.
+ $message = preg_replace("#(?<!\r)\n#si", "\r\n", $message);
+
+ if ($headers !== false)
+ {
+ if (!is_array($headers))
+ {
+ // Make sure there are no bare linefeeds in the headers
+ $headers = preg_replace('#(?<!\r)\n#si', "\n", $headers);
+ $headers = explode("\n", $headers);
+ }
+
+ // Ok this is rather confusing all things considered,
+ // but we have to grab bcc and cc headers and treat them differently
+ // Something we really didn't take into consideration originally
+ $headers_used = array();
+
+ foreach ($headers as $header)
+ {
+ if (strpos(strtolower($header), 'cc:') === 0 || strpos(strtolower($header), 'bcc:') === 0)
+ {
+ continue;
+ }
+ $headers_used[] = trim($header);
+ }
+
+ $headers = chop(implode("\r\n", $headers_used));
+ }
+
+ if (trim($subject) == '')
+ {
+ $err_msg = (isset($user->lang['NO_EMAIL_SUBJECT'])) ? $user->lang['NO_EMAIL_SUBJECT'] : 'No email subject specified';
+ return false;
+ }
+
+ if (trim($message) == '')
+ {
+ $err_msg = (isset($user->lang['NO_EMAIL_MESSAGE'])) ? $user->lang['NO_EMAIL_MESSAGE'] : 'Email message was blank';
+ return false;
+ }
+
+ $mail_rcpt = $mail_to = $mail_cc = array();
+
+ // Build correct addresses for RCPT TO command and the client side display (TO, CC)
+ if (isset($addresses['to']) && sizeof($addresses['to']))
+ {
+ foreach ($addresses['to'] as $which_ary)
+ {
+ $mail_to[] = ($which_ary['name'] != '') ? mail_encode(trim($which_ary['name'])) . ' <' . trim($which_ary['email']) . '>' : '<' . trim($which_ary['email']) . '>';
+ $mail_rcpt['to'][] = '<' . trim($which_ary['email']) . '>';
+ }
+ }
+
+ if (isset($addresses['bcc']) && sizeof($addresses['bcc']))
+ {
+ foreach ($addresses['bcc'] as $which_ary)
+ {
+ $mail_rcpt['bcc'][] = '<' . trim($which_ary['email']) . '>';
+ }
+ }
+
+ if (isset($addresses['cc']) && sizeof($addresses['cc']))
+ {
+ foreach ($addresses['cc'] as $which_ary)
+ {
+ $mail_cc[] = ($which_ary['name'] != '') ? mail_encode(trim($which_ary['name'])) . ' <' . trim($which_ary['email']) . '>' : '<' . trim($which_ary['email']) . '>';
+ $mail_rcpt['cc'][] = '<' . trim($which_ary['email']) . '>';
+ }
+ }
+
+ $smtp = new smtp_class();
+
+ $errno = 0;
+ $errstr = '';
+
+ $smtp->add_backtrace('Connecting to ' . $config['smtp_host'] . ':' . $config['smtp_port']);
+
+ // Ok we have error checked as much as we can to this point let's get on it already.
+ ob_start();
+ $smtp->socket = fsockopen($config['smtp_host'], $config['smtp_port'], $errno, $errstr, 20);
+ $error_contents = ob_get_clean();
+
+ if (!$smtp->socket)
+ {
+ if ($errstr)
+ {
+ $errstr = utf8_convert_message($errstr);
+ }
+
+ $err_msg = (isset($user->lang['NO_CONNECT_TO_SMTP_HOST'])) ? sprintf($user->lang['NO_CONNECT_TO_SMTP_HOST'], $errno, $errstr) : "Could not connect to smtp host : $errno : $errstr";
+ $err_msg .= ($error_contents) ? '<br /><br />' . htmlspecialchars($error_contents) : '';
+ return false;
+ }
+
+ // Wait for reply
+ if ($err_msg = $smtp->server_parse('220', __LINE__))
+ {
+ $smtp->close_session($err_msg);
+ return false;
+ }
+
+ // Let me in. This function handles the complete authentication process
+ if ($err_msg = $smtp->log_into_server($config['smtp_host'], $config['smtp_username'], $config['smtp_password'], $config['smtp_auth_method']))
+ {
+ $smtp->close_session($err_msg);
+ return false;
+ }
+
+ // From this point onward most server response codes should be 250
+ // Specify who the mail is from....
+ $smtp->server_send('MAIL FROM:<' . $config['board_email'] . '>');
+ if ($err_msg = $smtp->server_parse('250', __LINE__))
+ {
+ $smtp->close_session($err_msg);
+ return false;
+ }
+
+ // Specify each user to send to and build to header.
+ $to_header = implode(', ', $mail_to);
+ $cc_header = implode(', ', $mail_cc);
+
+ // Now tell the MTA to send the Message to the following people... [TO, BCC, CC]
+ $rcpt = false;
+ foreach ($mail_rcpt as $type => $mail_to_addresses)
+ {
+ foreach ($mail_to_addresses as $mail_to_address)
+ {
+ // Add an additional bit of error checking to the To field.
+ if (preg_match('#[^ ]+\@[^ ]+#', $mail_to_address))
+ {
+ $smtp->server_send("RCPT TO:$mail_to_address");
+ if ($err_msg = $smtp->server_parse('250', __LINE__))
+ {
+ // We continue... if users are not resolved we do not care
+ if ($smtp->numeric_response_code != 550)
+ {
+ $smtp->close_session($err_msg);
+ return false;
+ }
+ }
+ else
+ {
+ $rcpt = true;
+ }
+ }
+ }
+ }
+
+ // We try to send messages even if a few people do not seem to have valid email addresses, but if no one has, we have to exit here.
+ if (!$rcpt)
+ {
+ $user->session_begin();
+ $err_msg .= '<br /><br />';
+ $err_msg .= (isset($user->lang['INVALID_EMAIL_LOG'])) ? sprintf($user->lang['INVALID_EMAIL_LOG'], htmlspecialchars($mail_to_address)) : '<strong>' . htmlspecialchars($mail_to_address) . '</strong> possibly an invalid email address?';
+ $smtp->close_session($err_msg);
+ return false;
+ }
+
+ // Ok now we tell the server we are ready to start sending data
+ $smtp->server_send('DATA');
+
+ // This is the last response code we look for until the end of the message.
+ if ($err_msg = $smtp->server_parse('354', __LINE__))
+ {
+ $smtp->close_session($err_msg);
+ return false;
+ }
+
+ // Send the Subject Line...
+ $smtp->server_send("Subject: $subject");
+
+ // Now the To Header.
+ $to_header = ($to_header == '') ? 'undisclosed-recipients:;' : $to_header;
+ $smtp->server_send("To: $to_header");
+
+ // Now the CC Header.
+ if ($cc_header != '')
+ {
+ $smtp->server_send("CC: $cc_header");
+ }
+
+ // Now any custom headers....
+ if ($headers !== false)
+ {
+ $smtp->server_send("$headers\r\n");
+ }
+
+ // Ok now we are ready for the message...
+ $smtp->server_send($message);
+
+ // Ok the all the ingredients are mixed in let's cook this puppy...
+ $smtp->server_send('.');
+ if ($err_msg = $smtp->server_parse('250', __LINE__))
+ {
+ $smtp->close_session($err_msg);
+ return false;
+ }
+
+ // Now tell the server we are done and close the socket...
+ $smtp->server_send('QUIT');
+ $smtp->close_session($err_msg);
+
+ return true;
+}
+
+/**
+* SMTP Class
+* Auth Mechanisms originally taken from the AUTH Modules found within the PHP Extension and Application Repository (PEAR)
+* See docs/AUTHORS for more details
+* @package phpBB3
+*/
+class smtp_class
+{
+ var $server_response = '';
+ var $socket = 0;
+ var $responses = array();
+ var $commands = array();
+ var $numeric_response_code = 0;
+
+ var $backtrace = false;
+ var $backtrace_log = array();
+
+ function smtp_class()
+ {
+ // Always create a backtrace for admins to identify SMTP problems
+ $this->backtrace = true;
+ $this->backtrace_log = array();
+ }
+
+ /**
+ * Add backtrace message for debugging
+ */
+ function add_backtrace($message)
+ {
+ if ($this->backtrace)
+ {
+ $this->backtrace_log[] = utf8_htmlspecialchars($message);
+ }
+ }
+
+ /**
+ * Send command to smtp server
+ */
+ function server_send($command, $private_info = false)
+ {
+ fputs($this->socket, $command . "\r\n");
+
+ (!$private_info) ? $this->add_backtrace("# $command") : $this->add_backtrace('# Omitting sensitive information');
+
+ // We could put additional code here
+ }
+
+ /**
+ * We use the line to give the support people an indication at which command the error occurred
+ */
+ function server_parse($response, $line)
+ {
+ global $user;
+
+ $this->server_response = '';
+ $this->responses = array();
+ $this->numeric_response_code = 0;
+
+ while (substr($this->server_response, 3, 1) != ' ')
+ {
+ if (!($this->server_response = fgets($this->socket, 256)))
+ {
+ return (isset($user->lang['NO_EMAIL_RESPONSE_CODE'])) ? $user->lang['NO_EMAIL_RESPONSE_CODE'] : 'Could not get mail server response codes';
+ }
+ $this->responses[] = substr(rtrim($this->server_response), 4);
+ $this->numeric_response_code = (int) substr($this->server_response, 0, 3);
+
+ $this->add_backtrace("LINE: $line <- {$this->server_response}");
+ }
+
+ if (!(substr($this->server_response, 0, 3) == $response))
+ {
+ $this->numeric_response_code = (int) substr($this->server_response, 0, 3);
+ return (isset($user->lang['EMAIL_SMTP_ERROR_RESPONSE'])) ? sprintf($user->lang['EMAIL_SMTP_ERROR_RESPONSE'], $line, $this->server_response) : "Ran into problems sending Mail at <strong>Line $line</strong>. Response: $this->server_response";
+ }
+
+ return 0;
+ }
+
+ /**
+ * Close session
+ */
+ function close_session(&$err_msg)
+ {
+ fclose($this->socket);
+
+ if ($this->backtrace)
+ {
+ $message = '<h1>Backtrace</h1><p>' . implode('<br />', $this->backtrace_log) . '</p>';
+ $err_msg .= $message;
+ }
+ }
+
+ /**
+ * Log into server and get possible auth codes if neccessary
+ */
+ function log_into_server($hostname, $username, $password, $default_auth_method)
+ {
+ global $user;
+
+ $err_msg = '';
+
+ // Here we try to determine the *real* hostname (reverse DNS entry preferrably)
+ $local_host = $user->host;
+
+ if (function_exists('php_uname'))
+ {
+ $local_host = php_uname('n');
+
+ // Able to resolve name to IP
+ if (($addr = @gethostbyname($local_host)) !== $local_host)
+ {
+ // Able to resolve IP back to name
+ if (($name = @gethostbyaddr($addr)) !== $addr)
+ {
+ $local_host = $name;
+ }
+ }
+ }
+
+ // If we are authenticating through pop-before-smtp, we
+ // have to login ones before we get authenticated
+ // NOTE: on some configurations the time between an update of the auth database takes so
+ // long that the first email send does not work. This is not a biggie on a live board (only
+ // the install mail will most likely fail) - but on a dynamic ip connection this might produce
+ // severe problems and is not fixable!
+ if ($default_auth_method == 'POP-BEFORE-SMTP' && $username && $password)
+ {
+ global $config;
+
+ $errno = 0;
+ $errstr = '';
+
+ $this->server_send("QUIT");
+ fclose($this->socket);
+
+ $result = $this->pop_before_smtp($hostname, $username, $password);
+ $username = $password = $default_auth_method = '';
+
+ // We need to close the previous session, else the server is not
+ // able to get our ip for matching...
+ if (!$this->socket = @fsockopen($config['smtp_host'], $config['smtp_port'], $errno, $errstr, 10))
+ {
+ if ($errstr)
+ {
+ $errstr = utf8_convert_message($errstr);
+ }
+
+ $err_msg = (isset($user->lang['NO_CONNECT_TO_SMTP_HOST'])) ? sprintf($user->lang['NO_CONNECT_TO_SMTP_HOST'], $errno, $errstr) : "Could not connect to smtp host : $errno : $errstr";
+ return $err_msg;
+ }
+
+ // Wait for reply
+ if ($err_msg = $this->server_parse('220', __LINE__))
+ {
+ $this->close_session($err_msg);
+ return $err_msg;
+ }
+ }
+
+ // Try EHLO first
+ $this->server_send("EHLO {$local_host}");
+ if ($err_msg = $this->server_parse('250', __LINE__))
+ {
+ // a 503 response code means that we're already authenticated
+ if ($this->numeric_response_code == 503)
+ {
+ return false;
+ }
+
+ // If EHLO fails, we try HELO
+ $this->server_send("HELO {$local_host}");
+ if ($err_msg = $this->server_parse('250', __LINE__))
+ {
+ return ($this->numeric_response_code == 503) ? false : $err_msg;
+ }
+ }
+
+ foreach ($this->responses as $response)
+ {
+ $response = explode(' ', $response);
+ $response_code = $response[0];
+ unset($response[0]);
+ $this->commands[$response_code] = implode(' ', $response);
+ }
+
+ // If we are not authenticated yet, something might be wrong if no username and passwd passed
+ if (!$username || !$password)
+ {
+ return false;
+ }
+
+ if (!isset($this->commands['AUTH']))
+ {
+ return (isset($user->lang['SMTP_NO_AUTH_SUPPORT'])) ? $user->lang['SMTP_NO_AUTH_SUPPORT'] : 'SMTP server does not support authentication';
+ }
+
+ // Get best authentication method
+ $available_methods = explode(' ', $this->commands['AUTH']);
+
+ // Define the auth ordering if the default auth method was not found
+ $auth_methods = array('PLAIN', 'LOGIN', 'CRAM-MD5', 'DIGEST-MD5');
+ $method = '';
+
+ if (in_array($default_auth_method, $available_methods))
+ {
+ $method = $default_auth_method;
+ }
+ else
+ {
+ foreach ($auth_methods as $_method)
+ {
+ if (in_array($_method, $available_methods))
+ {
+ $method = $_method;
+ break;
+ }
+ }
+ }
+
+ if (!$method)
+ {
+ return (isset($user->lang['NO_SUPPORTED_AUTH_METHODS'])) ? $user->lang['NO_SUPPORTED_AUTH_METHODS'] : 'No supported authentication methods';
+ }
+
+ $method = strtolower(str_replace('-', '_', $method));
+ return $this->$method($username, $password);
+ }
+
+ /**
+ * Pop before smtp authentication
+ */
+ function pop_before_smtp($hostname, $username, $password)
+ {
+ global $user;
+
+ if (!$this->socket = @fsockopen($hostname, 110, $errno, $errstr, 10))
+ {
+ if ($errstr)
+ {
+ $errstr = utf8_convert_message($errstr);
+ }
+
+ return (isset($user->lang['NO_CONNECT_TO_SMTP_HOST'])) ? sprintf($user->lang['NO_CONNECT_TO_SMTP_HOST'], $errno, $errstr) : "Could not connect to smtp host : $errno : $errstr";
+ }
+
+ $this->server_send("USER $username", true);
+ if ($err_msg = $this->server_parse('+OK', __LINE__))
+ {
+ return $err_msg;
+ }
+
+ $this->server_send("PASS $password", true);
+ if ($err_msg = $this->server_parse('+OK', __LINE__))
+ {
+ return $err_msg;
+ }
+
+ $this->server_send('QUIT');
+ fclose($this->socket);
+
+ return false;
+ }
+
+ /**
+ * Plain authentication method
+ */
+ function plain($username, $password)
+ {
+ $this->server_send('AUTH PLAIN');
+ if ($err_msg = $this->server_parse('334', __LINE__))
+ {
+ return ($this->numeric_response_code == 503) ? false : $err_msg;
+ }
+
+ $base64_method_plain = base64_encode("\0" . $username . "\0" . $password);
+ $this->server_send($base64_method_plain, true);
+ if ($err_msg = $this->server_parse('235', __LINE__))
+ {
+ return $err_msg;
+ }
+
+ return false;
+ }
+
+ /**
+ * Login authentication method
+ */
+ function login($username, $password)
+ {
+ $this->server_send('AUTH LOGIN');
+ if ($err_msg = $this->server_parse('334', __LINE__))
+ {
+ return ($this->numeric_response_code == 503) ? false : $err_msg;
+ }
+
+ $this->server_send(base64_encode($username), true);
+ if ($err_msg = $this->server_parse('334', __LINE__))
+ {
+ return $err_msg;
+ }
+
+ $this->server_send(base64_encode($password), true);
+ if ($err_msg = $this->server_parse('235', __LINE__))
+ {
+ return $err_msg;
+ }
+
+ return false;
+ }
+
+ /**
+ * cram_md5 authentication method
+ */
+ function cram_md5($username, $password)
+ {
+ $this->server_send('AUTH CRAM-MD5');
+ if ($err_msg = $this->server_parse('334', __LINE__))
+ {
+ return ($this->numeric_response_code == 503) ? false : $err_msg;
+ }
+
+ $md5_challenge = base64_decode($this->responses[0]);
+ $password = (strlen($password) > 64) ? pack('H32', md5($password)) : ((strlen($password) < 64) ? str_pad($password, 64, chr(0)) : $password);
+ $md5_digest = md5((substr($password, 0, 64) ^ str_repeat(chr(0x5C), 64)) . (pack('H32', md5((substr($password, 0, 64) ^ str_repeat(chr(0x36), 64)) . $md5_challenge))));
+
+ $base64_method_cram_md5 = base64_encode($username . ' ' . $md5_digest);
+
+ $this->server_send($base64_method_cram_md5, true);
+ if ($err_msg = $this->server_parse('235', __LINE__))
+ {
+ return $err_msg;
+ }
+
+ return false;
+ }
+
+ /**
+ * digest_md5 authentication method
+ * A real pain in the ***
+ */
+ function digest_md5($username, $password)
+ {
+ global $config, $user;
+
+ $this->server_send('AUTH DIGEST-MD5');
+ if ($err_msg = $this->server_parse('334', __LINE__))
+ {
+ return ($this->numeric_response_code == 503) ? false : $err_msg;
+ }
+
+ $md5_challenge = base64_decode($this->responses[0]);
+
+ // Parse the md5 challenge - from AUTH_SASL (PEAR)
+ $tokens = array();
+ while (preg_match('/^([a-z-]+)=("[^"]+(?<!\\\)"|[^,]+)/i', $md5_challenge, $matches))
+ {
+ // Ignore these as per rfc2831
+ if ($matches[1] == 'opaque' || $matches[1] == 'domain')
+ {
+ $md5_challenge = substr($md5_challenge, strlen($matches[0]) + 1);
+ continue;
+ }
+
+ // Allowed multiple "realm" and "auth-param"
+ if (!empty($tokens[$matches[1]]) && ($matches[1] == 'realm' || $matches[1] == 'auth-param'))
+ {
+ if (is_array($tokens[$matches[1]]))
+ {
+ $tokens[$matches[1]][] = preg_replace('/^"(.*)"$/', '\\1', $matches[2]);
+ }
+ else
+ {
+ $tokens[$matches[1]] = array($tokens[$matches[1]], preg_replace('/^"(.*)"$/', '\\1', $matches[2]));
+ }
+ }
+ else if (!empty($tokens[$matches[1]])) // Any other multiple instance = failure
+ {
+ $tokens = array();
+ break;
+ }
+ else
+ {
+ $tokens[$matches[1]] = preg_replace('/^"(.*)"$/', '\\1', $matches[2]);
+ }
+
+ // Remove the just parsed directive from the challenge
+ $md5_challenge = substr($md5_challenge, strlen($matches[0]) + 1);
+ }
+
+ // Realm
+ if (empty($tokens['realm']))
+ {
+ $tokens['realm'] = (function_exists('php_uname')) ? php_uname('n') : $user->host;
+ }
+
+ // Maxbuf
+ if (empty($tokens['maxbuf']))
+ {
+ $tokens['maxbuf'] = 65536;
+ }
+
+ // Required: nonce, algorithm
+ if (empty($tokens['nonce']) || empty($tokens['algorithm']))
+ {
+ $tokens = array();
+ }
+ $md5_challenge = $tokens;
+
+ if (!empty($md5_challenge))
+ {
+ $str = '';
+ for ($i = 0; $i < 32; $i++)
+ {
+ $str .= chr(mt_rand(0, 255));
+ }
+ $cnonce = base64_encode($str);
+
+ $digest_uri = 'smtp/' . $config['smtp_host'];
+
+ $auth_1 = sprintf('%s:%s:%s', pack('H32', md5(sprintf('%s:%s:%s', $username, $md5_challenge['realm'], $password))), $md5_challenge['nonce'], $cnonce);
+ $auth_2 = 'AUTHENTICATE:' . $digest_uri;
+ $response_value = md5(sprintf('%s:%s:00000001:%s:auth:%s', md5($auth_1), $md5_challenge['nonce'], $cnonce, md5($auth_2)));
+
+ $input_string = sprintf('username="%s",realm="%s",nonce="%s",cnonce="%s",nc="00000001",qop=auth,digest-uri="%s",response=%s,%d', $username, $md5_challenge['realm'], $md5_challenge['nonce'], $cnonce, $digest_uri, $response_value, $md5_challenge['maxbuf']);
+ }
+ else
+ {
+ return (isset($user->lang['INVALID_DIGEST_CHALLENGE'])) ? $user->lang['INVALID_DIGEST_CHALLENGE'] : 'Invalid digest challenge';
+ }
+
+ $base64_method_digest_md5 = base64_encode($input_string);
+ $this->server_send($base64_method_digest_md5, true);
+ if ($err_msg = $this->server_parse('334', __LINE__))
+ {
+ return $err_msg;
+ }
+
+ $this->server_send(' ');
+ if ($err_msg = $this->server_parse('235', __LINE__))
+ {
+ return $err_msg;
+ }
+
+ return false;
+ }
+}
+
+/**
+* Encodes the given string for proper display in UTF-8.
+*
+* This version is using base64 encoded data. The downside of this
+* is if the mail client does not understand this encoding the user
+* is basically doomed with an unreadable subject.
+*
+* Please note that this version fully supports RFC 2045 section 6.8.
+*
+* @param string $eol End of line we are using (optional to be backwards compatible)
+*/
+function mail_encode($str, $eol = "\r\n")
+{
+ // define start delimimter, end delimiter and spacer
+ $start = "=?UTF-8?B?";
+ $end = "?=";
+ $delimiter = "$eol ";
+
+ // Maximum length is 75. $split_length *must* be a multiple of 4, but <= 75 - strlen($start . $delimiter . $end)!!!
+ $split_length = 60;
+ $encoded_str = base64_encode($str);
+
+ // If encoded string meets the limits, we just return with the correct data.
+ if (strlen($encoded_str) <= $split_length)
+ {
+ return $start . $encoded_str . $end;
+ }
+
+ // If there is only ASCII data, we just return what we want, correctly splitting the lines.
+ if (strlen($str) === utf8_strlen($str))
+ {
+ return $start . implode($end . $delimiter . $start, str_split($encoded_str, $split_length)) . $end;
+ }
+
+ // UTF-8 data, compose encoded lines
+ $array = utf8_str_split($str);
+ $str = '';
+
+ while (sizeof($array))
+ {
+ $text = '';
+
+ while (sizeof($array) && intval((strlen($text . $array[0]) + 2) / 3) << 2 <= $split_length)
+ {
+ $text .= array_shift($array);
+ }
+
+ $str .= $start . base64_encode($text) . $end . $delimiter;
+ }
+
+ return substr($str, 0, -strlen($delimiter));
+}
+
+/**
+* Wrapper for sending out emails with the PHP's mail function
+*/
+function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg)
+{
+ global $config;
+
+ // We use the EOL character for the OS here because the PHP mail function does not correctly transform line endings. On Windows SMTP is used (SMTP is \r\n), on UNIX a command is used...
+ // Reference: http://bugs.php.net/bug.php?id=15841
+ $headers = implode($eol, $headers);
+
+ ob_start();
+ // On some PHP Versions mail() *may* fail if there are newlines within the subject.
+ // Newlines are used as a delimiter for lines in mail_encode() according to RFC 2045 section 6.8.
+ // Because PHP can't decide what is wanted we revert back to the non-RFC-compliant way of separating by one space (Use '' as parameter to mail_encode() results in SPACE used)
+ $result = $config['email_function_name']($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers);
+ $err_msg = ob_get_clean();
+
+ return $result;
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php
new file mode 100644
index 0000000000..d0e7c8cfc8
--- /dev/null
+++ b/phpBB/includes/functions_module.php
@@ -0,0 +1,883 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Class handling all types of 'plugins' (a future term)
+* @package phpBB3
+*/
+class p_master
+{
+ var $p_id;
+ var $p_class;
+ var $p_name;
+ var $p_mode;
+ var $p_parent;
+
+ var $include_path = false;
+ var $active_module = false;
+ var $active_module_row_id = false;
+ var $acl_forum_id = false;
+ var $module_ary = array();
+
+ /**
+ * Constuctor
+ * Set module include path
+ */
+ function p_master($include_path = false)
+ {
+ global $phpbb_root_path;
+
+ $this->include_path = ($include_path !== false) ? $include_path : $phpbb_root_path . 'includes/';
+
+ // Make sure the path ends with /
+ if (substr($this->include_path, -1) !== '/')
+ {
+ $this->include_path .= '/';
+ }
+ }
+
+ /**
+ * Set custom include path for modules
+ * Schema for inclusion is include_path . modulebase
+ *
+ * @param string $include_path include path to be used.
+ * @access public
+ */
+ function set_custom_include_path($include_path)
+ {
+ $this->include_path = $include_path;
+
+ // Make sure the path ends with /
+ if (substr($this->include_path, -1) !== '/')
+ {
+ $this->include_path .= '/';
+ }
+ }
+
+ /**
+ * List modules
+ *
+ * This creates a list, stored in $this->module_ary of all available
+ * modules for the given class (ucp, mcp and acp). Additionally
+ * $this->module_y_ary is created with indentation information for
+ * displaying the module list appropriately. Only modules for which
+ * the user has access rights are included in these lists.
+ */
+ function list_modules($p_class)
+ {
+ global $auth, $db, $user, $cache;
+ global $config, $phpbb_root_path, $phpEx;
+
+ // Sanitise for future path use, it's escaped as appropriate for queries
+ $this->p_class = str_replace(array('.', '/', '\\'), '', basename($p_class));
+
+ // Get cached modules
+ if (($this->module_cache = $cache->get('_modules_' . $this->p_class)) === false)
+ {
+ // Get modules
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = '" . $db->sql_escape($this->p_class) . "'
+ ORDER BY left_id ASC";
+ $result = $db->sql_query($sql);
+
+ $rows = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $rows[$row['module_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ $this->module_cache = array();
+ foreach ($rows as $module_id => $row)
+ {
+ $this->module_cache['modules'][] = $row;
+ $this->module_cache['parents'][$row['module_id']] = $this->get_parents($row['parent_id'], $row['left_id'], $row['right_id'], $rows);
+ }
+ unset($rows);
+
+ $cache->put('_modules_' . $this->p_class, $this->module_cache);
+ }
+
+ if (empty($this->module_cache))
+ {
+ $this->module_cache = array('modules' => array(), 'parents' => array());
+ }
+
+ // We "could" build a true tree with this function - maybe mod authors want to use this...
+ // Functions for traversing and manipulating the tree are not available though
+ // We might re-structure the module system to use true trees in 3.2.x...
+ // $tree = $this->build_tree($this->module_cache['modules'], $this->module_cache['parents']);
+
+ // Clean up module cache array to only let survive modules the user can access
+ $right_id = false;
+ foreach ($this->module_cache['modules'] as $key => $row)
+ {
+ // Not allowed to view module?
+ if (!$this->module_auth($row['module_auth']))
+ {
+ unset($this->module_cache['modules'][$key]);
+ continue;
+ }
+
+ // Category with no members, ignore
+ if (!$row['module_basename'] && ($row['left_id'] + 1 == $row['right_id']))
+ {
+ unset($this->module_cache['modules'][$key]);
+ continue;
+ }
+
+ // Skip branch
+ if ($right_id !== false)
+ {
+ if ($row['left_id'] < $right_id)
+ {
+ unset($this->module_cache['modules'][$key]);
+ continue;
+ }
+
+ $right_id = false;
+ }
+
+ // Not enabled?
+ if (!$row['module_enabled'])
+ {
+ // If category is disabled then disable every child too
+ unset($this->module_cache['modules'][$key]);
+ $right_id = $row['right_id'];
+ continue;
+ }
+ }
+
+ // Re-index (this is needed, else we are not able to array_slice later)
+ $this->module_cache['modules'] = array_merge($this->module_cache['modules']);
+
+ // Include MOD _info files for populating language entries within the menus
+ $this->add_mod_info($this->p_class);
+
+ // Now build the module array, but exclude completely empty categories...
+ $right_id = false;
+ $names = array();
+
+ foreach ($this->module_cache['modules'] as $key => $row)
+ {
+ // Skip branch
+ if ($right_id !== false)
+ {
+ if ($row['left_id'] < $right_id)
+ {
+ continue;
+ }
+
+ $right_id = false;
+ }
+
+ // Category with no members on their way down (we have to check every level)
+ if (!$row['module_basename'])
+ {
+ $empty_category = true;
+
+ // We go through the branch and look for an activated module
+ foreach (array_slice($this->module_cache['modules'], $key + 1) as $temp_row)
+ {
+ if ($temp_row['left_id'] > $row['left_id'] && $temp_row['left_id'] < $row['right_id'])
+ {
+ // Module there
+ if ($temp_row['module_basename'] && $temp_row['module_enabled'])
+ {
+ $empty_category = false;
+ break;
+ }
+ continue;
+ }
+ break;
+ }
+
+ // Skip the branch
+ if ($empty_category)
+ {
+ $right_id = $row['right_id'];
+ continue;
+ }
+ }
+
+ $depth = sizeof($this->module_cache['parents'][$row['module_id']]);
+
+ // We need to prefix the functions to not create a naming conflict
+
+ // Function for building 'url_extra'
+ $url_func = '_module_' . $row['module_basename'] . '_url';
+
+ // Function for building the language name
+ $lang_func = '_module_' . $row['module_basename'] . '_lang';
+
+ // Custom function for calling parameters on module init (for example assigning template variables)
+ $custom_func = '_module_' . $row['module_basename'];
+
+ $names[$row['module_basename'] . '_' . $row['module_mode']][] = true;
+
+ $module_row = array(
+ 'depth' => $depth,
+
+ 'id' => (int) $row['module_id'],
+ 'parent' => (int) $row['parent_id'],
+ 'cat' => ($row['right_id'] > $row['left_id'] + 1) ? true : false,
+
+ 'is_duplicate' => ($row['module_basename'] && sizeof($names[$row['module_basename'] . '_' . $row['module_mode']]) > 1) ? true : false,
+
+ 'name' => (string) $row['module_basename'],
+ 'mode' => (string) $row['module_mode'],
+ 'display' => (int) $row['module_display'],
+
+ 'url_extra' => (function_exists($url_func)) ? $url_func($row['module_mode'], $row) : '',
+
+ 'lang' => ($row['module_basename'] && function_exists($lang_func)) ? $lang_func($row['module_mode'], $row['module_langname']) : ((!empty($user->lang[$row['module_langname']])) ? $user->lang[$row['module_langname']] : $row['module_langname']),
+ 'langname' => $row['module_langname'],
+
+ 'left' => $row['left_id'],
+ 'right' => $row['right_id'],
+ );
+
+ if (function_exists($custom_func))
+ {
+ $custom_func($row['module_mode'], $module_row);
+ }
+
+ $this->module_ary[] = $module_row;
+ }
+
+ unset($this->module_cache['modules'], $names);
+ }
+
+ /**
+ * Check if a certain main module is accessible/loaded
+ * By giving the module mode you are able to additionally check for only one mode within the main module
+ *
+ * @param string $module_basename The module base name, for example logs, reports, main (for the mcp).
+ * @param mixed $module_mode The module mode to check. If provided the mode will be checked in addition for presence.
+ *
+ * @return bool Returns true if module is loaded and accessible, else returns false
+ */
+ function loaded($module_basename, $module_mode = false)
+ {
+ if (empty($this->loaded_cache))
+ {
+ $this->loaded_cache = array();
+
+ foreach ($this->module_ary as $row)
+ {
+ if (!$row['name'])
+ {
+ continue;
+ }
+
+ if (!isset($this->loaded_cache[$row['name']]))
+ {
+ $this->loaded_cache[$row['name']] = array();
+ }
+
+ if (!$row['mode'])
+ {
+ continue;
+ }
+
+ $this->loaded_cache[$row['name']][$row['mode']] = true;
+ }
+ }
+
+ if ($module_mode === false)
+ {
+ return (isset($this->loaded_cache[$module_basename])) ? true : false;
+ }
+
+ return (!empty($this->loaded_cache[$module_basename][$module_mode])) ? true : false;
+ }
+
+ /**
+ * Check module authorisation
+ */
+ function module_auth($module_auth, $forum_id = false)
+ {
+ global $auth, $config;
+
+ $module_auth = trim($module_auth);
+
+ // Generally allowed to access module if module_auth is empty
+ if (!$module_auth)
+ {
+ return true;
+ }
+
+ // With the code below we make sure only those elements get eval'd we really want to be checked
+ preg_match_all('/(?:
+ "[^"\\\\]*(?:\\\\.[^"\\\\]*)*" |
+ \'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' |
+ [(),] |
+ [^\s(),]+)/x', $module_auth, $match);
+
+ $tokens = $match[0];
+ for ($i = 0, $size = sizeof($tokens); $i < $size; $i++)
+ {
+ $token = &$tokens[$i];
+
+ switch ($token)
+ {
+ case ')':
+ case '(':
+ case '&&':
+ case '||':
+ case ',':
+ break;
+
+ default:
+ if (!preg_match('#(?:acl_([a-z0-9_]+)(,\$id)?)|(?:\$id)|(?:aclf_([a-z0-9_]+))|(?:cfg_([a-z0-9_]+))|(?:request_([a-zA-Z0-9_]+))#', $token))
+ {
+ $token = '';
+ }
+ break;
+ }
+ }
+
+ $module_auth = implode(' ', $tokens);
+
+ // Make sure $id seperation is working fine
+ $module_auth = str_replace(' , ', ',', $module_auth);
+
+ $forum_id = ($forum_id === false) ? $this->acl_forum_id : $forum_id;
+
+ $is_auth = false;
+ eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z0-9_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z0-9_]+)#', '#cfg_([a-z0-9_]+)#', '#request_([a-zA-Z0-9_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']', '!empty($_REQUEST[\'\\1\'])'), $module_auth) . ');');
+
+ return $is_auth;
+ }
+
+ /**
+ * Set active module
+ */
+ function set_active($id = false, $mode = false)
+ {
+ $icat = false;
+ $this->active_module = false;
+
+ if (request_var('icat', ''))
+ {
+ $icat = $id;
+ $id = request_var('icat', '');
+ }
+
+ $category = false;
+ foreach ($this->module_ary as $row_id => $item_ary)
+ {
+ // If this is a module and it's selected, active
+ // If this is a category and the module is the first within it, active
+ // If this is a module and no mode selected, select first mode
+ // If no category or module selected, go active for first module in first category
+ if (
+ (($item_ary['name'] === $id || $item_ary['id'] === (int) $id) && (($item_ary['mode'] == $mode && !$item_ary['cat']) || ($icat && $item_ary['cat']))) ||
+ ($item_ary['parent'] === $category && !$item_ary['cat'] && !$icat && $item_ary['display']) ||
+ (($item_ary['name'] === $id || $item_ary['id'] === (int) $id) && !$mode && !$item_ary['cat']) ||
+ (!$id && !$mode && !$item_ary['cat'] && $item_ary['display'])
+ )
+ {
+ if ($item_ary['cat'])
+ {
+ $id = $icat;
+ $icat = false;
+
+ continue;
+ }
+
+ $this->p_id = $item_ary['id'];
+ $this->p_parent = $item_ary['parent'];
+ $this->p_name = $item_ary['name'];
+ $this->p_mode = $item_ary['mode'];
+ $this->p_left = $item_ary['left'];
+ $this->p_right = $item_ary['right'];
+
+ $this->module_cache['parents'] = $this->module_cache['parents'][$this->p_id];
+ $this->active_module = $item_ary['id'];
+ $this->active_module_row_id = $row_id;
+
+ break;
+ }
+ else if (($item_ary['cat'] && $item_ary['id'] === (int) $id) || ($item_ary['parent'] === $category && $item_ary['cat']))
+ {
+ $category = $item_ary['id'];
+ }
+ }
+ }
+
+ /**
+ * Loads currently active module
+ *
+ * This method loads a given module, passing it the relevant id and mode.
+ */
+ function load_active($mode = false, $module_url = false, $execute_module = true)
+ {
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx, $user;
+
+ $module_path = $this->include_path . $this->p_class;
+ $icat = request_var('icat', '');
+
+ if ($this->active_module === false)
+ {
+ trigger_error('Module not accessible', E_USER_ERROR);
+ }
+
+ if (!class_exists("{$this->p_class}_$this->p_name"))
+ {
+ if (!file_exists("$module_path/{$this->p_class}_$this->p_name.$phpEx"))
+ {
+ trigger_error("Cannot find module $module_path/{$this->p_class}_$this->p_name.$phpEx", E_USER_ERROR);
+ }
+
+ include("$module_path/{$this->p_class}_$this->p_name.$phpEx");
+
+ if (!class_exists("{$this->p_class}_$this->p_name"))
+ {
+ trigger_error("Module file $module_path/{$this->p_class}_$this->p_name.$phpEx does not contain correct class [{$this->p_class}_$this->p_name]", E_USER_ERROR);
+ }
+
+ if (!empty($mode))
+ {
+ $this->p_mode = $mode;
+ }
+
+ // Create a new instance of the desired module ... if it has a
+ // constructor it will of course be executed
+ $instance = "{$this->p_class}_$this->p_name";
+
+ $this->module = new $instance($this);
+
+ // We pre-define the action parameter we are using all over the place
+ if (defined('IN_ADMIN'))
+ {
+ // Is first module automatically enabled a duplicate and the category not passed yet?
+ if (!$icat && $this->module_ary[$this->active_module_row_id]['is_duplicate'])
+ {
+ $icat = $this->module_ary[$this->active_module_row_id]['parent'];
+ }
+
+ // Not being able to overwrite ;)
+ $this->module->u_action = append_sid("{$phpbb_admin_path}index.$phpEx", "i={$this->p_name}") . (($icat) ? '&amp;icat=' . $icat : '') . "&amp;mode={$this->p_mode}";
+ }
+ else
+ {
+ // If user specified the module url we will use it...
+ if ($module_url !== false)
+ {
+ $this->module->u_action = $module_url;
+ }
+ else
+ {
+ $this->module->u_action = $phpbb_root_path . (($user->page['page_dir']) ? $user->page['page_dir'] . '/' : '') . $user->page['page_name'];
+ }
+
+ $this->module->u_action = append_sid($this->module->u_action, "i={$this->p_name}") . (($icat) ? '&amp;icat=' . $icat : '') . "&amp;mode={$this->p_mode}";
+ }
+
+ // Add url_extra parameter to u_action url
+ if (!empty($this->module_ary) && $this->active_module !== false && $this->module_ary[$this->active_module_row_id]['url_extra'])
+ {
+ $this->module->u_action .= $this->module_ary[$this->active_module_row_id]['url_extra'];
+ }
+
+ // Assign the module path for re-usage
+ $this->module->module_path = $module_path . '/';
+
+ // Execute the main method for the new instance, we send the module id and mode as parameters
+ // Users are able to call the main method after this function to be able to assign additional parameters manually
+ if ($execute_module)
+ {
+ $this->module->main($this->p_name, $this->p_mode);
+ }
+
+ return;
+ }
+ }
+
+ /**
+ * Appending url parameter to the currently active module.
+ *
+ * This function is called for adding specific url parameters while executing the current module.
+ * It is doing the same as the _module_{name}_url() function, apart from being able to be called after
+ * having dynamically parsed specific parameters. This allows more freedom in choosing additional parameters.
+ * One example can be seen in /includes/mcp/mcp_notes.php - $this->p_master->adjust_url() call.
+ *
+ * @param string $url_extra Extra url parameters, e.g.: &amp;u=$user_id
+ *
+ */
+ function adjust_url($url_extra)
+ {
+ if (empty($this->module_ary[$this->active_module_row_id]))
+ {
+ return;
+ }
+
+ $row = &$this->module_ary[$this->active_module_row_id];
+
+ // We check for the same url_extra in $row['url_extra'] to overcome doubled additions...
+ if (strpos($row['url_extra'], $url_extra) === false)
+ {
+ $row['url_extra'] .= $url_extra;
+ }
+ }
+
+ /**
+ * Check if a module is active
+ */
+ function is_active($id, $mode = false)
+ {
+ // If we find a name by this id and being enabled we have our active one...
+ foreach ($this->module_ary as $row_id => $item_ary)
+ {
+ if (($item_ary['name'] === $id || $item_ary['id'] === (int) $id) && $item_ary['display'])
+ {
+ if ($mode === false || $mode === $item_ary['mode'])
+ {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Get parents
+ */
+ function get_parents($parent_id, $left_id, $right_id, &$all_parents)
+ {
+ global $db;
+
+ $parents = array();
+
+ if ($parent_id > 0)
+ {
+ foreach ($all_parents as $module_id => $row)
+ {
+ if ($row['left_id'] < $left_id && $row['right_id'] > $right_id)
+ {
+ $parents[$module_id] = $row['parent_id'];
+ }
+
+ if ($row['left_id'] > $left_id)
+ {
+ break;
+ }
+ }
+ }
+
+ return $parents;
+ }
+
+ /**
+ * Get tree branch
+ */
+ function get_branch($left_id, $right_id, $remaining)
+ {
+ $branch = array();
+
+ foreach ($remaining as $key => $row)
+ {
+ if ($row['left_id'] > $left_id && $row['left_id'] < $right_id)
+ {
+ $branch[] = $row;
+ continue;
+ }
+ break;
+ }
+
+ return $branch;
+ }
+
+ /**
+ * Build true binary tree from given array
+ * Not in use
+ */
+ function build_tree(&$modules, &$parents)
+ {
+ $tree = array();
+
+ foreach ($modules as $row)
+ {
+ $branch = &$tree;
+
+ if ($row['parent_id'])
+ {
+ // Go through the tree to find our branch
+ $parent_tree = $parents[$row['module_id']];
+
+ foreach ($parent_tree as $id => $value)
+ {
+ if (!isset($branch[$id]) && isset($branch['child']))
+ {
+ $branch = &$branch['child'];
+ }
+ $branch = &$branch[$id];
+ }
+ $branch = &$branch['child'];
+ }
+
+ $branch[$row['module_id']] = $row;
+ if (!isset($branch[$row['module_id']]['child']))
+ {
+ $branch[$row['module_id']]['child'] = array();
+ }
+ }
+
+ return $tree;
+ }
+
+ /**
+ * Build navigation structure
+ */
+ function assign_tpl_vars($module_url)
+ {
+ global $template;
+
+ $current_id = $right_id = false;
+
+ // Make sure the module_url has a question mark set, effectively determining the delimiter to use
+ $delim = (strpos($module_url, '?') === false) ? '?' : '&amp;';
+
+ $current_padding = $current_depth = 0;
+ $linear_offset = 'l_block1';
+ $tabular_offset = 't_block2';
+
+ // Generate the list of modules, we'll do this in two ways ...
+ // 1) In a linear fashion
+ // 2) In a combined tabbed + linear fashion ... tabs for the categories
+ // and a linear list for subcategories/items
+ foreach ($this->module_ary as $row_id => $item_ary)
+ {
+ // Skip hidden modules
+ if (!$item_ary['display'])
+ {
+ continue;
+ }
+
+ // Skip branch
+ if ($right_id !== false)
+ {
+ if ($item_ary['left'] < $right_id)
+ {
+ continue;
+ }
+
+ $right_id = false;
+ }
+
+ // Category with no members on their way down (we have to check every level)
+ if (!$item_ary['name'])
+ {
+ $empty_category = true;
+
+ // We go through the branch and look for an activated module
+ foreach (array_slice($this->module_ary, $row_id + 1) as $temp_row)
+ {
+ if ($temp_row['left'] > $item_ary['left'] && $temp_row['left'] < $item_ary['right'])
+ {
+ // Module there and displayed?
+ if ($temp_row['name'] && $temp_row['display'])
+ {
+ $empty_category = false;
+ break;
+ }
+ continue;
+ }
+ break;
+ }
+
+ // Skip the branch
+ if ($empty_category)
+ {
+ $right_id = $item_ary['right'];
+ continue;
+ }
+ }
+
+ // Select first id we can get
+ if (!$current_id && (isset($this->module_cache['parents'][$item_ary['id']]) || $item_ary['id'] == $this->p_id))
+ {
+ $current_id = $item_ary['id'];
+ }
+
+ $depth = $item_ary['depth'];
+
+ if ($depth > $current_depth)
+ {
+ $linear_offset = $linear_offset . '.l_block' . ($depth + 1);
+ $tabular_offset = ($depth + 1 > 2) ? $tabular_offset . '.t_block' . ($depth + 1) : $tabular_offset;
+ }
+ else if ($depth < $current_depth)
+ {
+ for ($i = $current_depth - $depth; $i > 0; $i--)
+ {
+ $linear_offset = substr($linear_offset, 0, strrpos($linear_offset, '.'));
+ $tabular_offset = ($i + $depth > 1) ? substr($tabular_offset, 0, strrpos($tabular_offset, '.')) : $tabular_offset;
+ }
+ }
+
+ $u_title = $module_url . $delim . 'i=' . (($item_ary['cat']) ? $item_ary['id'] : $item_ary['name'] . (($item_ary['is_duplicate']) ? '&amp;icat=' . $current_id : '') . '&amp;mode=' . $item_ary['mode']);
+
+ // Was not allowed in categories before - /*!$item_ary['cat'] && */
+ $u_title .= (isset($item_ary['url_extra'])) ? $item_ary['url_extra'] : '';
+
+ // Only output a categories items if it's currently selected
+ if (!$depth || ($depth && (in_array($item_ary['parent'], array_values($this->module_cache['parents'])) || $item_ary['parent'] == $this->p_parent)))
+ {
+ $use_tabular_offset = (!$depth) ? 't_block1' : $tabular_offset;
+
+ $tpl_ary = array(
+ 'L_TITLE' => $item_ary['lang'],
+ 'S_SELECTED' => (isset($this->module_cache['parents'][$item_ary['id']]) || $item_ary['id'] == $this->p_id) ? true : false,
+ 'U_TITLE' => $u_title
+ );
+
+ $template->assign_block_vars($use_tabular_offset, array_merge($tpl_ary, array_change_key_case($item_ary, CASE_UPPER)));
+ }
+
+ $tpl_ary = array(
+ 'L_TITLE' => $item_ary['lang'],
+ 'S_SELECTED' => (isset($this->module_cache['parents'][$item_ary['id']]) || $item_ary['id'] == $this->p_id) ? true : false,
+ 'U_TITLE' => $u_title
+ );
+
+ $template->assign_block_vars($linear_offset, array_merge($tpl_ary, array_change_key_case($item_ary, CASE_UPPER)));
+
+ $current_depth = $depth;
+ }
+ }
+
+ /**
+ * Returns desired template name
+ */
+ function get_tpl_name()
+ {
+ return $this->module->tpl_name . '.html';
+ }
+
+ /**
+ * Returns the desired page title
+ */
+ function get_page_title()
+ {
+ global $user;
+
+ if (!isset($this->module->page_title))
+ {
+ return '';
+ }
+
+ return (isset($user->lang[$this->module->page_title])) ? $user->lang[$this->module->page_title] : $this->module->page_title;
+ }
+
+ /**
+ * Load module as the current active one without the need for registering it
+ */
+ function load($class, $name, $mode = false)
+ {
+ $this->p_class = $class;
+ $this->p_name = $name;
+
+ // Set active module to true instead of using the id
+ $this->active_module = true;
+
+ $this->load_active($mode);
+ }
+
+ /**
+ * Display module
+ */
+ function display($page_title, $display_online_list = true)
+ {
+ global $template, $user;
+
+ // Generate the page
+ if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])
+ {
+ adm_page_header($page_title);
+ }
+ else
+ {
+ page_header($page_title, $display_online_list);
+ }
+
+ $template->set_filenames(array(
+ 'body' => $this->get_tpl_name())
+ );
+
+ if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])
+ {
+ adm_page_footer();
+ }
+ else
+ {
+ page_footer();
+ }
+ }
+
+ /**
+ * Toggle whether this module will be displayed or not
+ */
+ function set_display($id, $mode = false, $display = true)
+ {
+ foreach ($this->module_ary as $row_id => $item_ary)
+ {
+ if (($item_ary['name'] === $id || $item_ary['id'] === (int) $id) && (!$mode || $item_ary['mode'] === $mode))
+ {
+ $this->module_ary[$row_id]['display'] = (int) $display;
+ }
+ }
+ }
+
+ /**
+ * Add custom MOD info language file
+ */
+ function add_mod_info($module_class)
+ {
+ global $user, $phpEx;
+
+ if (file_exists($user->lang_path . $user->lang_name . '/mods'))
+ {
+ $add_files = array();
+
+ $dir = @opendir($user->lang_path . $user->lang_name . '/mods');
+
+ if ($dir)
+ {
+ while (($entry = readdir($dir)) !== false)
+ {
+ if (strpos($entry, 'info_' . strtolower($module_class) . '_') === 0 && substr(strrchr($entry, '.'), 1) == $phpEx)
+ {
+ $add_files[] = 'mods/' . substr(basename($entry), 0, -(strlen($phpEx) + 1));
+ }
+ }
+ closedir($dir);
+ }
+
+ if (sizeof($add_files))
+ {
+ $user->add_lang($add_files);
+ }
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
new file mode 100644
index 0000000000..069740ebda
--- /dev/null
+++ b/phpBB/includes/functions_posting.php
@@ -0,0 +1,2614 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Fill smiley templates (or just the variables) with smilies, either in a window or inline
+*/
+function generate_smilies($mode, $forum_id)
+{
+ global $auth, $db, $user, $config, $template;
+ global $phpEx, $phpbb_root_path;
+
+ $start = request_var('start', 0);
+
+ if ($mode == 'window')
+ {
+ if ($forum_id)
+ {
+ $sql = 'SELECT forum_style
+ FROM ' . FORUMS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $user->setup('posting', (int) $row['forum_style']);
+ }
+ else
+ {
+ $user->setup('posting');
+ }
+
+ page_header($user->lang['SMILIES']);
+
+ $sql = 'SELECT COUNT(smiley_id) AS count
+ FROM ' . SMILIES_TABLE . '
+ GROUP BY smiley_url';
+ $result = $db->sql_query($sql, 3600);
+
+ $smiley_count = 0;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ ++$smiley_count;
+ }
+ $db->sql_freeresult($result);
+
+ $template->set_filenames(array(
+ 'body' => 'posting_smilies.html')
+ );
+
+ $template->assign_var('PAGINATION',
+ generate_pagination(append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&amp;f=' . $forum_id),
+ $smiley_count, $config['smilies_per_page'], $start, true)
+ );
+ }
+
+ $display_link = false;
+ if ($mode == 'inline')
+ {
+ $sql = 'SELECT smiley_id
+ FROM ' . SMILIES_TABLE . '
+ WHERE display_on_posting = 0';
+ $result = $db->sql_query_limit($sql, 1, 0, 3600);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $display_link = true;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if ($mode == 'window')
+ {
+ $sql = 'SELECT smiley_url, MIN(emotion) as emotion, MIN(code) AS code, smiley_width, smiley_height
+ FROM ' . SMILIES_TABLE . '
+ GROUP BY smiley_url, smiley_width, smiley_height
+ ORDER BY smiley_order';
+ $result = $db->sql_query_limit($sql, $config['smilies_per_page'], $start, 3600);
+ }
+ else
+ {
+ $sql = 'SELECT *
+ FROM ' . SMILIES_TABLE . '
+ WHERE display_on_posting = 1
+ ORDER BY smiley_order';
+ $result = $db->sql_query($sql, 3600);
+ }
+
+ $smilies = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (empty($smilies[$row['smiley_url']]))
+ {
+ $smilies[$row['smiley_url']] = $row;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($smilies))
+ {
+ $root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_root_path;
+
+ foreach ($smilies as $row)
+ {
+ $template->assign_block_vars('smiley', array(
+ 'SMILEY_CODE' => $row['code'],
+ 'A_SMILEY_CODE' => addslashes($row['code']),
+ 'SMILEY_IMG' => $root_path . $config['smilies_path'] . '/' . $row['smiley_url'],
+ 'SMILEY_WIDTH' => $row['smiley_width'],
+ 'SMILEY_HEIGHT' => $row['smiley_height'],
+ 'SMILEY_DESC' => $row['emotion'])
+ );
+ }
+ }
+
+ if ($mode == 'inline' && $display_link)
+ {
+ $template->assign_vars(array(
+ 'S_SHOW_SMILEY_LINK' => true,
+ 'U_MORE_SMILIES' => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&amp;f=' . $forum_id))
+ );
+ }
+
+ if ($mode == 'window')
+ {
+ page_footer();
+ }
+}
+
+/**
+* Update last post information
+* Should be used instead of sync() if only the last post information are out of sync... faster
+*
+* @param string $type Can be forum|topic
+* @param mixed $ids topic/forum ids
+* @param bool $return_update_sql true: SQL query shall be returned, false: execute SQL
+*/
+function update_post_information($type, $ids, $return_update_sql = false)
+{
+ global $db;
+
+ if (empty($ids))
+ {
+ return;
+ }
+ if (!is_array($ids))
+ {
+ $ids = array($ids);
+ }
+
+
+ $update_sql = $empty_forums = $not_empty_forums = array();
+
+ if ($type != 'topic')
+ {
+ $topic_join = ', ' . TOPICS_TABLE . ' t';
+ $topic_condition = 'AND t.topic_id = p.topic_id AND t.topic_approved = 1';
+ }
+ else
+ {
+ $topic_join = '';
+ $topic_condition = '';
+ }
+
+ if (sizeof($ids) == 1)
+ {
+ $sql = 'SELECT MAX(p.post_id) as last_post_id
+ FROM ' . POSTS_TABLE . " p $topic_join
+ WHERE " . $db->sql_in_set('p.' . $type . '_id', $ids) . "
+ $topic_condition
+ AND p.post_approved = 1";
+ }
+ else
+ {
+ $sql = 'SELECT p.' . $type . '_id, MAX(p.post_id) as last_post_id
+ FROM ' . POSTS_TABLE . " p $topic_join
+ WHERE " . $db->sql_in_set('p.' . $type . '_id', $ids) . "
+ $topic_condition
+ AND p.post_approved = 1
+ GROUP BY p.{$type}_id";
+ }
+ $result = $db->sql_query($sql);
+
+ $last_post_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (sizeof($ids) == 1)
+ {
+ $row[$type . '_id'] = $ids[0];
+ }
+
+ if ($type == 'forum')
+ {
+ $not_empty_forums[] = $row['forum_id'];
+
+ if (empty($row['last_post_id']))
+ {
+ $empty_forums[] = $row['forum_id'];
+ }
+ }
+
+ $last_post_ids[] = $row['last_post_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if ($type == 'forum')
+ {
+ $empty_forums = array_merge($empty_forums, array_diff($ids, $not_empty_forums));
+
+ foreach ($empty_forums as $void => $forum_id)
+ {
+ $update_sql[$forum_id][] = 'forum_last_post_id = 0';
+ $update_sql[$forum_id][] = "forum_last_post_subject = ''";
+ $update_sql[$forum_id][] = 'forum_last_post_time = 0';
+ $update_sql[$forum_id][] = 'forum_last_poster_id = 0';
+ $update_sql[$forum_id][] = "forum_last_poster_name = ''";
+ $update_sql[$forum_id][] = "forum_last_poster_colour = ''";
+ }
+ }
+
+ if (sizeof($last_post_ids))
+ {
+ $sql = 'SELECT p.' . $type . '_id, p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
+ WHERE p.poster_id = u.user_id
+ AND ' . $db->sql_in_set('p.post_id', $last_post_ids);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $update_sql[$row["{$type}_id"]][] = $type . '_last_post_id = ' . (int) $row['post_id'];
+ $update_sql[$row["{$type}_id"]][] = "{$type}_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
+ $update_sql[$row["{$type}_id"]][] = $type . '_last_post_time = ' . (int) $row['post_time'];
+ $update_sql[$row["{$type}_id"]][] = $type . '_last_poster_id = ' . (int) $row['poster_id'];
+ $update_sql[$row["{$type}_id"]][] = "{$type}_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
+ $update_sql[$row["{$type}_id"]][] = "{$type}_last_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'";
+ }
+ $db->sql_freeresult($result);
+ }
+ unset($empty_forums, $ids, $last_post_ids);
+
+ if ($return_update_sql || !sizeof($update_sql))
+ {
+ return $update_sql;
+ }
+
+ $table = ($type == 'forum') ? FORUMS_TABLE : TOPICS_TABLE;
+
+ foreach ($update_sql as $update_id => $update_sql_ary)
+ {
+ $sql = "UPDATE $table
+ SET " . implode(', ', $update_sql_ary) . "
+ WHERE {$type}_id = $update_id";
+ $db->sql_query($sql);
+ }
+
+ return;
+}
+
+/**
+* Generate Topic Icons for display
+*/
+function posting_gen_topic_icons($mode, $icon_id)
+{
+ global $phpbb_root_path, $config, $template, $cache;
+
+ // Grab icons
+ $icons = $cache->obtain_icons();
+
+ if (!$icon_id)
+ {
+ $template->assign_var('S_NO_ICON_CHECKED', ' checked="checked"');
+ }
+
+ if (sizeof($icons))
+ {
+ foreach ($icons as $id => $data)
+ {
+ if ($data['display'])
+ {
+ $template->assign_block_vars('topic_icon', array(
+ 'ICON_ID' => $id,
+ 'ICON_IMG' => $phpbb_root_path . $config['icons_path'] . '/' . $data['img'],
+ 'ICON_WIDTH' => $data['width'],
+ 'ICON_HEIGHT' => $data['height'],
+
+ 'S_CHECKED' => ($id == $icon_id) ? true : false,
+ 'S_ICON_CHECKED' => ($id == $icon_id) ? ' checked="checked"' : '')
+ );
+ }
+ }
+
+ return true;
+ }
+
+ return false;
+}
+
+/**
+* Build topic types able to be selected
+*/
+function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
+{
+ global $auth, $user, $template, $topic_type;
+
+ $toggle = false;
+
+ $topic_types = array(
+ 'sticky' => array('const' => POST_STICKY, 'lang' => 'POST_STICKY'),
+ 'announce' => array('const' => POST_ANNOUNCE, 'lang' => 'POST_ANNOUNCEMENT'),
+ 'global' => array('const' => POST_GLOBAL, 'lang' => 'POST_GLOBAL')
+ );
+
+ $topic_type_array = array();
+
+ foreach ($topic_types as $auth_key => $topic_value)
+ {
+ // We do not have a special post global announcement permission
+ $auth_key = ($auth_key == 'global') ? 'announce' : $auth_key;
+
+ if ($auth->acl_get('f_' . $auth_key, $forum_id))
+ {
+ $toggle = true;
+
+ $topic_type_array[] = array(
+ 'VALUE' => $topic_value['const'],
+ 'S_CHECKED' => ($cur_topic_type == $topic_value['const'] || ($forum_id == 0 && $topic_value['const'] == POST_GLOBAL)) ? ' checked="checked"' : '',
+ 'L_TOPIC_TYPE' => $user->lang[$topic_value['lang']]
+ );
+ }
+ }
+
+ if ($toggle)
+ {
+ $topic_type_array = array_merge(array(0 => array(
+ 'VALUE' => POST_NORMAL,
+ 'S_CHECKED' => ($topic_type == POST_NORMAL) ? ' checked="checked"' : '',
+ 'L_TOPIC_TYPE' => $user->lang['POST_NORMAL'])),
+
+ $topic_type_array
+ );
+
+ foreach ($topic_type_array as $array)
+ {
+ $template->assign_block_vars('topic_type', $array);
+ }
+
+ $template->assign_vars(array(
+ 'S_TOPIC_TYPE_STICKY' => ($auth->acl_get('f_sticky', $forum_id)),
+ 'S_TOPIC_TYPE_ANNOUNCE' => ($auth->acl_get('f_announce', $forum_id)))
+ );
+ }
+
+ return $toggle;
+}
+
+//
+// Attachment related functions
+//
+
+/**
+* Upload Attachment - filedata is generated here
+* Uses upload class
+*/
+function upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false, $local_filedata = false)
+{
+ global $auth, $user, $config, $db, $cache;
+ global $phpbb_root_path, $phpEx;
+
+ $filedata = array(
+ 'error' => array()
+ );
+
+ include_once($phpbb_root_path . 'includes/functions_upload.' . $phpEx);
+ $upload = new fileupload();
+
+ if ($config['check_attachment_content'])
+ {
+ $upload->set_disallowed_content(explode('|', $config['mime_triggers']));
+ }
+
+ if (!$local)
+ {
+ $filedata['post_attach'] = ($upload->is_valid($form_name)) ? true : false;
+ }
+ else
+ {
+ $filedata['post_attach'] = true;
+ }
+
+ if (!$filedata['post_attach'])
+ {
+ $filedata['error'][] = $user->lang['NO_UPLOAD_FORM_FOUND'];
+ return $filedata;
+ }
+
+ $extensions = $cache->obtain_attach_extensions((($is_message) ? false : (int) $forum_id));
+ $upload->set_allowed_extensions(array_keys($extensions['_allowed_']));
+
+ $file = ($local) ? $upload->local_upload($local_storage, $local_filedata) : $upload->form_upload($form_name);
+
+ if ($file->init_error)
+ {
+ $filedata['post_attach'] = false;
+ return $filedata;
+ }
+
+ $cat_id = (isset($extensions[$file->get('extension')]['display_cat'])) ? $extensions[$file->get('extension')]['display_cat'] : ATTACHMENT_CATEGORY_NONE;
+
+ // Make sure the image category only holds valid images...
+ if ($cat_id == ATTACHMENT_CATEGORY_IMAGE && !$file->is_image())
+ {
+ $file->remove();
+
+ // If this error occurs a user tried to exploit an IE Bug by renaming extensions
+ // Since the image category is displaying content inline we need to catch this.
+ trigger_error($user->lang['ATTACHED_IMAGE_NOT_IMAGE']);
+ }
+
+ // Do we have to create a thumbnail?
+ $filedata['thumbnail'] = ($cat_id == ATTACHMENT_CATEGORY_IMAGE && $config['img_create_thumbnail']) ? 1 : 0;
+
+ // Check Image Size, if it is an image
+ if (!$auth->acl_get('a_') && !$auth->acl_get('m_', $forum_id) && $cat_id == ATTACHMENT_CATEGORY_IMAGE)
+ {
+ $file->upload->set_allowed_dimensions(0, 0, $config['img_max_width'], $config['img_max_height']);
+ }
+
+ // Admins and mods are allowed to exceed the allowed filesize
+ if (!$auth->acl_get('a_') && !$auth->acl_get('m_', $forum_id))
+ {
+ if (!empty($extensions[$file->get('extension')]['max_filesize']))
+ {
+ $allowed_filesize = $extensions[$file->get('extension')]['max_filesize'];
+ }
+ else
+ {
+ $allowed_filesize = ($is_message) ? $config['max_filesize_pm'] : $config['max_filesize'];
+ }
+
+ $file->upload->set_max_filesize($allowed_filesize);
+ }
+
+ $file->clean_filename('unique', $user->data['user_id'] . '_');
+
+ // Are we uploading an image *and* this image being within the image category? Only then perform additional image checks.
+ $no_image = ($cat_id == ATTACHMENT_CATEGORY_IMAGE) ? false : true;
+
+ $file->move_file($config['upload_path'], false, $no_image);
+
+ if (sizeof($file->error))
+ {
+ $file->remove();
+ $filedata['error'] = array_merge($filedata['error'], $file->error);
+ $filedata['post_attach'] = false;
+
+ return $filedata;
+ }
+
+ $filedata['filesize'] = $file->get('filesize');
+ $filedata['mimetype'] = $file->get('mimetype');
+ $filedata['extension'] = $file->get('extension');
+ $filedata['physical_filename'] = $file->get('realname');
+ $filedata['real_filename'] = $file->get('uploadname');
+ $filedata['filetime'] = time();
+
+ // Check our complete quota
+ if ($config['attachment_quota'])
+ {
+ if ($config['upload_dir_size'] + $file->get('filesize') > $config['attachment_quota'])
+ {
+ $filedata['error'][] = $user->lang['ATTACH_QUOTA_REACHED'];
+ $filedata['post_attach'] = false;
+
+ $file->remove();
+
+ return $filedata;
+ }
+ }
+
+ // Check free disk space
+ if ($free_space = @disk_free_space($phpbb_root_path . $config['upload_path']))
+ {
+ if ($free_space <= $file->get('filesize'))
+ {
+ $filedata['error'][] = $user->lang['ATTACH_QUOTA_REACHED'];
+ $filedata['post_attach'] = false;
+
+ $file->remove();
+
+ return $filedata;
+ }
+ }
+
+ // Create Thumbnail
+ if ($filedata['thumbnail'])
+ {
+ $source = $file->get('destination_file');
+ $destination = $file->get('destination_path') . '/thumb_' . $file->get('realname');
+
+ if (!create_thumbnail($source, $destination, $file->get('mimetype')))
+ {
+ $filedata['thumbnail'] = 0;
+ }
+ }
+
+ return $filedata;
+}
+
+/**
+* Calculate the needed size for Thumbnail
+*/
+function get_img_size_format($width, $height)
+{
+ global $config;
+
+ // Maximum Width the Image can take
+ $max_width = ($config['img_max_thumb_width']) ? $config['img_max_thumb_width'] : 400;
+
+ if ($width > $height)
+ {
+ return array(
+ round($width * ($max_width / $width)),
+ round($height * ($max_width / $width))
+ );
+ }
+ else
+ {
+ return array(
+ round($width * ($max_width / $height)),
+ round($height * ($max_width / $height))
+ );
+ }
+}
+
+/**
+* Return supported image types
+*/
+function get_supported_image_types($type = false)
+{
+ if (@extension_loaded('gd'))
+ {
+ $format = imagetypes();
+ $new_type = 0;
+
+ if ($type !== false)
+ {
+ // Type is one of the IMAGETYPE constants - it is fetched from getimagesize()
+ // We do not use the constants here, because some were not available in PHP 4.3.x
+ switch ($type)
+ {
+ // GIF
+ case 1:
+ $new_type = ($format & IMG_GIF) ? IMG_GIF : false;
+ break;
+
+ // JPG, JPC, JP2
+ case 2:
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ $new_type = ($format & IMG_JPG) ? IMG_JPG : false;
+ break;
+
+ // PNG
+ case 3:
+ $new_type = ($format & IMG_PNG) ? IMG_PNG : false;
+ break;
+
+ // WBMP
+ case 15:
+ $new_type = ($format & IMG_WBMP) ? IMG_WBMP : false;
+ break;
+ }
+ }
+ else
+ {
+ $new_type = array();
+ $go_through_types = array(IMG_GIF, IMG_JPG, IMG_PNG, IMG_WBMP);
+
+ foreach ($go_through_types as $check_type)
+ {
+ if ($format & $check_type)
+ {
+ $new_type[] = $check_type;
+ }
+ }
+ }
+
+ return array(
+ 'gd' => ($new_type) ? true : false,
+ 'format' => $new_type,
+ 'version' => (function_exists('imagecreatetruecolor')) ? 2 : 1
+ );
+ }
+
+ return array('gd' => false);
+}
+
+/**
+* Create Thumbnail
+*/
+function create_thumbnail($source, $destination, $mimetype)
+{
+ global $config;
+
+ $min_filesize = (int) $config['img_min_thumb_filesize'];
+ $img_filesize = (file_exists($source)) ? @filesize($source) : false;
+
+ if (!$img_filesize || $img_filesize <= $min_filesize)
+ {
+ return false;
+ }
+
+ $dimension = @getimagesize($source);
+
+ if ($dimension === false)
+ {
+ return false;
+ }
+
+ list($width, $height, $type, ) = $dimension;
+
+ if (empty($width) || empty($height))
+ {
+ return false;
+ }
+
+ list($new_width, $new_height) = get_img_size_format($width, $height);
+
+ // Do not create a thumbnail if the resulting width/height is bigger than the original one
+ if ($new_width >= $width && $new_height >= $height)
+ {
+ return false;
+ }
+
+ $used_imagick = false;
+
+ // Only use imagemagick if defined and the passthru function not disabled
+ if ($config['img_imagick'] && function_exists('passthru'))
+ {
+ if (substr($config['img_imagick'], -1) !== '/')
+ {
+ $config['img_imagick'] .= '/';
+ }
+
+ @passthru(escapeshellcmd($config['img_imagick']) . 'convert' . ((defined('PHP_OS') && preg_match('#^win#i', PHP_OS)) ? '.exe' : '') . ' -quality 85 -geometry ' . $new_width . 'x' . $new_height . ' "' . str_replace('\\', '/', $source) . '" "' . str_replace('\\', '/', $destination) . '"');
+
+ if (file_exists($destination))
+ {
+ $used_imagick = true;
+ }
+ }
+
+ if (!$used_imagick)
+ {
+ $type = get_supported_image_types($type);
+
+ if ($type['gd'])
+ {
+ // If the type is not supported, we are not able to create a thumbnail
+ if ($type['format'] === false)
+ {
+ return false;
+ }
+
+ switch ($type['format'])
+ {
+ case IMG_GIF:
+ $image = @imagecreatefromgif($source);
+ break;
+
+ case IMG_JPG:
+ @ini_set('gd.jpeg_ignore_warning', 1);
+ $image = @imagecreatefromjpeg($source);
+ break;
+
+ case IMG_PNG:
+ $image = @imagecreatefrompng($source);
+ break;
+
+ case IMG_WBMP:
+ $image = @imagecreatefromwbmp($source);
+ break;
+ }
+
+ if (empty($image))
+ {
+ return false;
+ }
+
+ if ($type['version'] == 1)
+ {
+ $new_image = imagecreate($new_width, $new_height);
+
+ if ($new_image === false)
+ {
+ return false;
+ }
+
+ imagecopyresized($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
+ }
+ else
+ {
+ $new_image = imagecreatetruecolor($new_width, $new_height);
+
+ if ($new_image === false)
+ {
+ return false;
+ }
+
+ // Preserve alpha transparency (png for example)
+ @imagealphablending($new_image, false);
+ @imagesavealpha($new_image, true);
+
+ imagecopyresampled($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
+ }
+
+ // If we are in safe mode create the destination file prior to using the gd functions to circumvent a PHP bug
+ if (@ini_get('safe_mode') || @strtolower(ini_get('safe_mode')) == 'on')
+ {
+ @touch($destination);
+ }
+
+ switch ($type['format'])
+ {
+ case IMG_GIF:
+ imagegif($new_image, $destination);
+ break;
+
+ case IMG_JPG:
+ imagejpeg($new_image, $destination, 90);
+ break;
+
+ case IMG_PNG:
+ imagepng($new_image, $destination);
+ break;
+
+ case IMG_WBMP:
+ imagewbmp($new_image, $destination);
+ break;
+ }
+
+ imagedestroy($new_image);
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ if (!file_exists($destination))
+ {
+ return false;
+ }
+
+ phpbb_chmod($destination, CHMOD_READ | CHMOD_WRITE);
+
+ return true;
+}
+
+/**
+* Assign Inline attachments (build option fields)
+*/
+function posting_gen_inline_attachments(&$attachment_data)
+{
+ global $template;
+
+ if (sizeof($attachment_data))
+ {
+ $s_inline_attachment_options = '';
+
+ foreach ($attachment_data as $i => $attachment)
+ {
+ $s_inline_attachment_options .= '<option value="' . $i . '">' . utf8_basename($attachment['real_filename']) . '</option>';
+ }
+
+ $template->assign_var('S_INLINE_ATTACHMENT_OPTIONS', $s_inline_attachment_options);
+
+ return true;
+ }
+
+ return false;
+}
+
+/**
+* Generate inline attachment entry
+*/
+function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true)
+{
+ global $template, $config, $phpbb_root_path, $phpEx, $user, $auth;
+
+ // Some default template variables
+ $template->assign_vars(array(
+ 'S_SHOW_ATTACH_BOX' => $show_attach_box,
+ 'S_HAS_ATTACHMENTS' => sizeof($attachment_data),
+ 'FILESIZE' => $config['max_filesize'],
+ 'FILE_COMMENT' => (isset($filename_data['filecomment'])) ? $filename_data['filecomment'] : '',
+ ));
+
+ if (sizeof($attachment_data))
+ {
+ // We display the posted attachments within the desired order.
+ ($config['display_order']) ? krsort($attachment_data) : ksort($attachment_data);
+
+ foreach ($attachment_data as $count => $attach_row)
+ {
+ $hidden = '';
+ $attach_row['real_filename'] = utf8_basename($attach_row['real_filename']);
+
+ foreach ($attach_row as $key => $value)
+ {
+ $hidden .= '<input type="hidden" name="attachment_data[' . $count . '][' . $key . ']" value="' . $value . '" />';
+ }
+
+ $download_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'mode=view&amp;id=' . (int) $attach_row['attach_id'], true, ($attach_row['is_orphan']) ? $user->session_id : false);
+
+ $template->assign_block_vars('attach_row', array(
+ 'FILENAME' => utf8_basename($attach_row['real_filename']),
+ 'A_FILENAME' => addslashes(utf8_basename($attach_row['real_filename'])),
+ 'FILE_COMMENT' => $attach_row['attach_comment'],
+ 'ATTACH_ID' => $attach_row['attach_id'],
+ 'S_IS_ORPHAN' => $attach_row['is_orphan'],
+ 'ASSOC_INDEX' => $count,
+
+ 'U_VIEW_ATTACHMENT' => $download_link,
+ 'S_HIDDEN' => $hidden)
+ );
+ }
+ }
+
+ return sizeof($attachment_data);
+}
+
+//
+// General Post functions
+//
+
+/**
+* Load Drafts
+*/
+function load_drafts($topic_id = 0, $forum_id = 0, $id = 0, $pm_action = '', $msg_id = 0)
+{
+ global $user, $db, $template, $auth;
+ global $phpbb_root_path, $phpEx;
+
+ $topic_ids = $forum_ids = $draft_rows = array();
+
+ // Load those drafts not connected to forums/topics
+ // If forum_id == 0 AND topic_id == 0 then this is a PM draft
+ if (!$topic_id && !$forum_id)
+ {
+ $sql_and = ' AND d.forum_id = 0 AND d.topic_id = 0';
+ }
+ else
+ {
+ $sql_and = '';
+ $sql_and .= ($forum_id) ? ' AND d.forum_id = ' . (int) $forum_id : '';
+ $sql_and .= ($topic_id) ? ' AND d.topic_id = ' . (int) $topic_id : '';
+ }
+
+ $sql = 'SELECT d.*, f.forum_id, f.forum_name
+ FROM ' . DRAFTS_TABLE . ' d
+ LEFT JOIN ' . FORUMS_TABLE . ' f ON (f.forum_id = d.forum_id)
+ WHERE d.user_id = ' . $user->data['user_id'] . "
+ $sql_and
+ ORDER BY d.save_time DESC";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['topic_id'])
+ {
+ $topic_ids[] = (int) $row['topic_id'];
+ }
+ $draft_rows[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($draft_rows))
+ {
+ return;
+ }
+
+ $topic_rows = array();
+ if (sizeof($topic_ids))
+ {
+ $sql = 'SELECT topic_id, forum_id, topic_title
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', array_unique($topic_ids));
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_rows[$row['topic_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+ unset($topic_ids);
+
+ $template->assign_var('S_SHOW_DRAFTS', true);
+
+ foreach ($draft_rows as $draft)
+ {
+ $link_topic = $link_forum = $link_pm = false;
+ $insert_url = $view_url = $title = '';
+
+ if (isset($topic_rows[$draft['topic_id']])
+ && (
+ ($topic_rows[$draft['topic_id']]['forum_id'] && $auth->acl_get('f_read', $topic_rows[$draft['topic_id']]['forum_id']))
+ ||
+ (!$topic_rows[$draft['topic_id']]['forum_id'] && $auth->acl_getf_global('f_read'))
+ ))
+ {
+ $topic_forum_id = ($topic_rows[$draft['topic_id']]['forum_id']) ? $topic_rows[$draft['topic_id']]['forum_id'] : $forum_id;
+
+ $link_topic = true;
+ $view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_forum_id . '&amp;t=' . $draft['topic_id']);
+ $title = $topic_rows[$draft['topic_id']]['topic_title'];
+
+ $insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'f=' . $topic_forum_id . '&amp;t=' . $draft['topic_id'] . '&amp;mode=reply&amp;d=' . $draft['draft_id']);
+ }
+ else if ($draft['forum_id'] && $auth->acl_get('f_read', $draft['forum_id']))
+ {
+ $link_forum = true;
+ $view_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $draft['forum_id']);
+ $title = $draft['forum_name'];
+
+ $insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'f=' . $draft['forum_id'] . '&amp;mode=post&amp;d=' . $draft['draft_id']);
+ }
+ else
+ {
+ // Either display as PM draft if forum_id and topic_id are empty or if access to the forums has been denied afterwards...
+ $link_pm = true;
+ $insert_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=$id&amp;mode=compose&amp;d={$draft['draft_id']}" . (($pm_action) ? "&amp;action=$pm_action" : '') . (($msg_id) ? "&amp;p=$msg_id" : ''));
+ }
+
+ $template->assign_block_vars('draftrow', array(
+ 'DRAFT_ID' => $draft['draft_id'],
+ 'DATE' => $user->format_date($draft['save_time']),
+ 'DRAFT_SUBJECT' => $draft['draft_subject'],
+
+ 'TITLE' => $title,
+ 'U_VIEW' => $view_url,
+ 'U_INSERT' => $insert_url,
+
+ 'S_LINK_PM' => $link_pm,
+ 'S_LINK_TOPIC' => $link_topic,
+ 'S_LINK_FORUM' => $link_forum)
+ );
+ }
+}
+
+/**
+* Topic Review
+*/
+function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id = 0, $show_quote_button = true)
+{
+ global $user, $auth, $db, $template, $bbcode, $cache;
+ global $config, $phpbb_root_path, $phpEx;
+
+ // Go ahead and pull all data for this topic
+ $sql = 'SELECT p.post_id
+ FROM ' . POSTS_TABLE . ' p' . "
+ WHERE p.topic_id = $topic_id
+ " . ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND p.post_approved = 1' : '') . '
+ ' . (($mode == 'post_review') ? " AND p.post_id > $cur_post_id" : '') . '
+ ' . (($mode == 'post_review_edit') ? " AND p.post_id = $cur_post_id" : '') . '
+ ORDER BY p.post_time ';
+ $sql .= ($mode == 'post_review') ? 'ASC' : 'DESC';
+ $result = $db->sql_query_limit($sql, $config['posts_per_page']);
+
+ $post_list = array();
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_list[] = $row['post_id'];
+ }
+
+ $db->sql_freeresult($result);
+
+ if (!sizeof($post_list))
+ {
+ return false;
+ }
+
+ // Handle 'post_review_edit' like 'post_review' from now on
+ if ($mode == 'post_review_edit')
+ {
+ $mode = 'post_review';
+ }
+
+ $sql = $db->sql_build_query('SELECT', array(
+ 'SELECT' => 'u.username, u.user_id, u.user_colour, p.*, z.friend, z.foe',
+
+ 'FROM' => array(
+ USERS_TABLE => 'u',
+ POSTS_TABLE => 'p',
+ ),
+
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(ZEBRA_TABLE => 'z'),
+ 'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id'
+ )
+ ),
+
+ 'WHERE' => $db->sql_in_set('p.post_id', $post_list) . '
+ AND u.user_id = p.poster_id'
+ ));
+
+ $result = $db->sql_query($sql);
+
+ $bbcode_bitfield = '';
+ $rowset = array();
+ $has_attachments = false;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $rowset[$row['post_id']] = $row;
+ $bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
+
+ if ($row['post_attachment'])
+ {
+ $has_attachments = true;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // Instantiate BBCode class
+ if (!isset($bbcode) && $bbcode_bitfield !== '')
+ {
+ include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+ $bbcode = new bbcode(base64_encode($bbcode_bitfield));
+ }
+
+ // Grab extensions
+ $extensions = $attachments = array();
+ if ($has_attachments && $auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id))
+ {
+ $extensions = $cache->obtain_attach_extensions($forum_id);
+
+ // Get attachments...
+ $sql = 'SELECT *
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('post_msg_id', $post_list) . '
+ AND in_message = 0
+ ORDER BY filetime DESC, post_msg_id ASC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $attachments[$row['post_msg_id']][] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
+ {
+ // A non-existing rowset only happens if there was no user present for the entered poster_id
+ // This could be a broken posts table.
+ if (!isset($rowset[$post_list[$i]]))
+ {
+ continue;
+ }
+
+ $row =& $rowset[$post_list[$i]];
+
+ $poster_id = $row['user_id'];
+ $post_subject = $row['post_subject'];
+ $message = censor_text($row['post_text']);
+
+ $decoded_message = false;
+
+ if ($show_quote_button && $auth->acl_get('f_reply', $forum_id))
+ {
+ $decoded_message = $message;
+ decode_message($decoded_message, $row['bbcode_uid']);
+
+ $decoded_message = bbcode_nl2br($decoded_message);
+ }
+
+ if ($row['bbcode_bitfield'])
+ {
+ $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
+ }
+
+ $message = bbcode_nl2br($message);
+ $message = smiley_text($message, !$row['enable_smilies']);
+
+ if (!empty($attachments[$row['post_id']]))
+ {
+ $update_count = array();
+ parse_attachments($forum_id, $message, $attachments[$row['post_id']], $update_count);
+ }
+
+ $post_subject = censor_text($post_subject);
+
+ $post_anchor = ($mode == 'post_review') ? 'ppr' . $row['post_id'] : 'pr' . $row['post_id'];
+ $u_show_post = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, "f=$forum_id&amp;t=$topic_id&amp;p={$row['post_id']}&amp;view=show#p{$row['post_id']}");
+
+ $template->assign_block_vars($mode . '_row', array(
+ 'POST_AUTHOR_FULL' => get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
+
+ 'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
+ 'S_FRIEND' => ($row['friend']) ? true : false,
+ 'S_IGNORE_POST' => ($row['foe']) ? true : false,
+ 'L_IGNORE_POST' => ($row['foe']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), "<a href=\"{$u_show_post}\" onclick=\"dE('{$post_anchor}', 1); return false;\">", '</a>') : '',
+
+ 'POST_SUBJECT' => $post_subject,
+ 'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['POST']),
+ 'POST_DATE' => $user->format_date($row['post_time']),
+ 'MESSAGE' => $message,
+ 'DECODED_MESSAGE' => $decoded_message,
+ 'POST_ID' => $row['post_id'],
+ 'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'],
+ 'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=post_details&amp;f=' . $forum_id . '&amp;p=' . $row['post_id'], true, $user->session_id) : '',
+ 'POSTER_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '')
+ );
+
+ // Display not already displayed Attachments for this post, we already parsed them. ;)
+ if (!empty($attachments[$row['post_id']]))
+ {
+ foreach ($attachments[$row['post_id']] as $attachment)
+ {
+ $template->assign_block_vars($mode . '_row.attachment', array(
+ 'DISPLAY_ATTACHMENT' => $attachment)
+ );
+ }
+ }
+
+ unset($rowset[$i]);
+ }
+
+ if ($mode == 'topic_review')
+ {
+ $template->assign_var('QUOTE_IMG', $user->img('icon_post_quote', $user->lang['REPLY_WITH_QUOTE']));
+ }
+
+ return true;
+}
+
+/**
+* User Notification
+*/
+function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id, $topic_id, $post_id)
+{
+ global $db, $user, $config, $phpbb_root_path, $phpEx, $auth;
+
+ $topic_notification = ($mode == 'reply' || $mode == 'quote') ? true : false;
+ $forum_notification = ($mode == 'post') ? true : false;
+
+ if (!$topic_notification && !$forum_notification)
+ {
+ trigger_error('NO_MODE');
+ }
+
+ if (($topic_notification && !$config['allow_topic_notify']) || ($forum_notification && !$config['allow_forum_notify']))
+ {
+ return;
+ }
+
+ $topic_title = ($topic_notification) ? $topic_title : $subject;
+ $topic_title = censor_text($topic_title);
+
+ // Get banned User ID's
+ $sql = 'SELECT ban_userid
+ FROM ' . BANLIST_TABLE . '
+ WHERE ban_userid <> 0
+ AND ban_exclude <> 1';
+ $result = $db->sql_query($sql);
+
+ $sql_ignore_users = ANONYMOUS . ', ' . $user->data['user_id'];
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $sql_ignore_users .= ', ' . (int) $row['ban_userid'];
+ }
+ $db->sql_freeresult($result);
+
+ $notify_rows = array();
+
+ // -- get forum_userids || topic_userids
+ $sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber
+ FROM ' . (($topic_notification) ? TOPICS_WATCH_TABLE : FORUMS_WATCH_TABLE) . ' w, ' . USERS_TABLE . ' u
+ WHERE w.' . (($topic_notification) ? 'topic_id' : 'forum_id') . ' = ' . (($topic_notification) ? $topic_id : $forum_id) . "
+ AND w.user_id NOT IN ($sql_ignore_users)
+ AND w.notify_status = 0
+ AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')
+ AND u.user_id = w.user_id';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $notify_rows[$row['user_id']] = array(
+ 'user_id' => $row['user_id'],
+ 'username' => $row['username'],
+ 'user_email' => $row['user_email'],
+ 'user_jabber' => $row['user_jabber'],
+ 'user_lang' => $row['user_lang'],
+ 'notify_type' => ($topic_notification) ? 'topic' : 'forum',
+ 'template' => ($topic_notification) ? 'topic_notify' : 'newtopic_notify',
+ 'method' => $row['user_notify_type'],
+ 'allowed' => false
+ );
+ }
+ $db->sql_freeresult($result);
+
+ // forum notification is sent to those not already receiving topic notifications
+ if ($topic_notification)
+ {
+ if (sizeof($notify_rows))
+ {
+ $sql_ignore_users .= ', ' . implode(', ', array_keys($notify_rows));
+ }
+
+ $sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber
+ FROM ' . FORUMS_WATCH_TABLE . ' fw, ' . USERS_TABLE . " u
+ WHERE fw.forum_id = $forum_id
+ AND fw.user_id NOT IN ($sql_ignore_users)
+ AND fw.notify_status = 0
+ AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')
+ AND u.user_id = fw.user_id';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $notify_rows[$row['user_id']] = array(
+ 'user_id' => $row['user_id'],
+ 'username' => $row['username'],
+ 'user_email' => $row['user_email'],
+ 'user_jabber' => $row['user_jabber'],
+ 'user_lang' => $row['user_lang'],
+ 'notify_type' => 'forum',
+ 'template' => 'forum_notify',
+ 'method' => $row['user_notify_type'],
+ 'allowed' => false
+ );
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (!sizeof($notify_rows))
+ {
+ return;
+ }
+
+ // Make sure users are allowed to read the forum
+ foreach ($auth->acl_get_list(array_keys($notify_rows), 'f_read', $forum_id) as $forum_id => $forum_ary)
+ {
+ foreach ($forum_ary as $auth_option => $user_ary)
+ {
+ foreach ($user_ary as $user_id)
+ {
+ $notify_rows[$user_id]['allowed'] = true;
+ }
+ }
+ }
+
+
+ // Now, we have to do a little step before really sending, we need to distinguish our users a little bit. ;)
+ $msg_users = $delete_ids = $update_notification = array();
+ foreach ($notify_rows as $user_id => $row)
+ {
+ if (!$row['allowed'] || !trim($row['user_email']))
+ {
+ $delete_ids[$row['notify_type']][] = $row['user_id'];
+ }
+ else
+ {
+ $msg_users[] = $row;
+ $update_notification[$row['notify_type']][] = $row['user_id'];
+ }
+ }
+ unset($notify_rows);
+
+ // Now, we are able to really send out notifications
+ if (sizeof($msg_users))
+ {
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ $messenger = new messenger();
+
+ $msg_list_ary = array();
+ foreach ($msg_users as $row)
+ {
+ $pos = (!isset($msg_list_ary[$row['template']])) ? 0 : sizeof($msg_list_ary[$row['template']]);
+
+ $msg_list_ary[$row['template']][$pos]['method'] = $row['method'];
+ $msg_list_ary[$row['template']][$pos]['email'] = $row['user_email'];
+ $msg_list_ary[$row['template']][$pos]['jabber'] = $row['user_jabber'];
+ $msg_list_ary[$row['template']][$pos]['name'] = $row['username'];
+ $msg_list_ary[$row['template']][$pos]['lang'] = $row['user_lang'];
+ $msg_list_ary[$row['template']][$pos]['user_id']= $row['user_id'];
+ }
+ unset($msg_users);
+
+ foreach ($msg_list_ary as $email_template => $email_list)
+ {
+ foreach ($email_list as $addr)
+ {
+ $messenger->template($email_template, $addr['lang']);
+
+ $messenger->to($addr['email'], $addr['name']);
+ $messenger->im($addr['jabber'], $addr['name']);
+
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($addr['name']),
+ 'TOPIC_TITLE' => htmlspecialchars_decode($topic_title),
+ 'FORUM_NAME' => htmlspecialchars_decode($forum_name),
+
+ 'U_FORUM' => generate_board_url() . "/viewforum.$phpEx?f=$forum_id",
+ 'U_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id",
+ 'U_NEWEST_POST' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&p=$post_id&e=$post_id",
+ 'U_STOP_WATCHING_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?uid={$addr['user_id']}&f=$forum_id&t=$topic_id&unwatch=topic",
+ 'U_STOP_WATCHING_FORUM' => generate_board_url() . "/viewforum.$phpEx?uid={$addr['user_id']}&f=$forum_id&unwatch=forum",
+ ));
+
+ $messenger->send($addr['method']);
+ }
+ }
+ unset($msg_list_ary);
+
+ $messenger->save_queue();
+ }
+
+ // Handle the DB updates
+ $db->sql_transaction('begin');
+
+ if (!empty($update_notification['topic']))
+ {
+ $sql = 'UPDATE ' . TOPICS_WATCH_TABLE . "
+ SET notify_status = 1
+ WHERE topic_id = $topic_id
+ AND " . $db->sql_in_set('user_id', $update_notification['topic']);
+ $db->sql_query($sql);
+ }
+
+ if (!empty($update_notification['forum']))
+ {
+ $sql = 'UPDATE ' . FORUMS_WATCH_TABLE . "
+ SET notify_status = 1
+ WHERE forum_id = $forum_id
+ AND " . $db->sql_in_set('user_id', $update_notification['forum']);
+ $db->sql_query($sql);
+ }
+
+ // Now delete the user_ids not authorised to receive notifications on this topic/forum
+ if (!empty($delete_ids['topic']))
+ {
+ $sql = 'DELETE FROM ' . TOPICS_WATCH_TABLE . "
+ WHERE topic_id = $topic_id
+ AND " . $db->sql_in_set('user_id', $delete_ids['topic']);
+ $db->sql_query($sql);
+ }
+
+ if (!empty($delete_ids['forum']))
+ {
+ $sql = 'DELETE FROM ' . FORUMS_WATCH_TABLE . "
+ WHERE forum_id = $forum_id
+ AND " . $db->sql_in_set('user_id', $delete_ids['forum']);
+ $db->sql_query($sql);
+ }
+
+ $db->sql_transaction('commit');
+}
+
+//
+// Post handling functions
+//
+
+/**
+* Delete Post
+*/
+function delete_post($forum_id, $topic_id, $post_id, &$data)
+{
+ global $db, $user, $auth;
+ global $config, $phpEx, $phpbb_root_path;
+
+ // Specify our post mode
+ $post_mode = 'delete';
+ if (($data['topic_first_post_id'] === $data['topic_last_post_id']) && $data['topic_replies_real'] == 0)
+ {
+ $post_mode = 'delete_topic';
+ }
+ else if ($data['topic_first_post_id'] == $post_id)
+ {
+ $post_mode = 'delete_first_post';
+ }
+ else if ($data['topic_last_post_id'] == $post_id)
+ {
+ $post_mode = 'delete_last_post';
+ }
+ $sql_data = array();
+ $next_post_id = false;
+
+ include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+
+ $db->sql_transaction('begin');
+
+ // we must make sure to update forums that contain the shadow'd topic
+ if ($post_mode == 'delete_topic')
+ {
+ $shadow_forum_ids = array();
+
+ $sql = 'SELECT forum_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_moved_id', $topic_id);
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!isset($shadow_forum_ids[(int) $row['forum_id']]))
+ {
+ $shadow_forum_ids[(int) $row['forum_id']] = 1;
+ }
+ else
+ {
+ $shadow_forum_ids[(int) $row['forum_id']]++;
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (!delete_posts('post_id', array($post_id), false, false))
+ {
+ // Try to delete topic, we may had an previous error causing inconsistency
+ if ($post_mode == 'delete_topic')
+ {
+ delete_topics('topic_id', array($topic_id), false);
+ }
+ trigger_error('ALREADY_DELETED');
+ }
+
+ $db->sql_transaction('commit');
+
+ // Collect the necessary information for updating the tables
+ $sql_data[FORUMS_TABLE] = '';
+ switch ($post_mode)
+ {
+ case 'delete_topic':
+
+ foreach ($shadow_forum_ids as $updated_forum => $topic_count)
+ {
+ // counting is fun! we only have to do sizeof($forum_ids) number of queries,
+ // even if the topic is moved back to where its shadow lives (we count how many times it is in a forum)
+ $db->sql_query('UPDATE ' . FORUMS_TABLE . ' SET forum_topics_real = forum_topics_real - ' . $topic_count . ', forum_topics = forum_topics - ' . $topic_count . ' WHERE forum_id = ' . $updated_forum);
+ update_post_information('forum', $updated_forum);
+ }
+
+ delete_topics('topic_id', array($topic_id), false);
+
+ if ($data['topic_type'] != POST_GLOBAL)
+ {
+ $sql_data[FORUMS_TABLE] .= 'forum_topics_real = forum_topics_real - 1';
+ $sql_data[FORUMS_TABLE] .= ($data['topic_approved']) ? ', forum_posts = forum_posts - 1, forum_topics = forum_topics - 1' : '';
+ }
+
+ $update_sql = update_post_information('forum', $forum_id, true);
+ if (sizeof($update_sql))
+ {
+ $sql_data[FORUMS_TABLE] .= ($sql_data[FORUMS_TABLE]) ? ', ' : '';
+ $sql_data[FORUMS_TABLE] .= implode(', ', $update_sql[$forum_id]);
+ }
+ break;
+
+ case 'delete_first_post':
+ $sql = 'SELECT p.post_id, p.poster_id, p.post_username, u.username, u.user_colour
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
+ WHERE p.topic_id = $topic_id
+ AND p.poster_id = u.user_id
+ ORDER BY p.post_time ASC";
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($data['topic_type'] != POST_GLOBAL)
+ {
+ $sql_data[FORUMS_TABLE] = ($data['post_approved']) ? 'forum_posts = forum_posts - 1' : '';
+ }
+
+ $sql_data[TOPICS_TABLE] = 'topic_poster = ' . intval($row['poster_id']) . ', topic_first_post_id = ' . intval($row['post_id']) . ", topic_first_poster_colour = '" . $db->sql_escape($row['user_colour']) . "', topic_first_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'";
+
+ // Decrementing topic_replies here is fine because this case only happens if there is more than one post within the topic - basically removing one "reply"
+ $sql_data[TOPICS_TABLE] .= ', topic_replies_real = topic_replies_real - 1' . (($data['post_approved']) ? ', topic_replies = topic_replies - 1' : '');
+
+ $next_post_id = (int) $row['post_id'];
+ break;
+
+ case 'delete_last_post':
+ if ($data['topic_type'] != POST_GLOBAL)
+ {
+ $sql_data[FORUMS_TABLE] = ($data['post_approved']) ? 'forum_posts = forum_posts - 1' : '';
+ }
+
+ $update_sql = update_post_information('forum', $forum_id, true);
+ if (sizeof($update_sql))
+ {
+ $sql_data[FORUMS_TABLE] .= ($sql_data[FORUMS_TABLE]) ? ', ' : '';
+ $sql_data[FORUMS_TABLE] .= implode(', ', $update_sql[$forum_id]);
+ }
+
+ $sql_data[TOPICS_TABLE] = 'topic_bumped = 0, topic_bumper = 0, topic_replies_real = topic_replies_real - 1' . (($data['post_approved']) ? ', topic_replies = topic_replies - 1' : '');
+
+ $update_sql = update_post_information('topic', $topic_id, true);
+ if (sizeof($update_sql))
+ {
+ $sql_data[TOPICS_TABLE] .= ', ' . implode(', ', $update_sql[$topic_id]);
+ $next_post_id = (int) str_replace('topic_last_post_id = ', '', $update_sql[$topic_id][0]);
+ }
+ else
+ {
+ $sql = 'SELECT MAX(post_id) as last_post_id
+ FROM ' . POSTS_TABLE . "
+ WHERE topic_id = $topic_id " .
+ ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND post_approved = 1' : '');
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $next_post_id = (int) $row['last_post_id'];
+ }
+ break;
+
+ case 'delete':
+ $sql = 'SELECT post_id
+ FROM ' . POSTS_TABLE . "
+ WHERE topic_id = $topic_id " .
+ ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND post_approved = 1' : '') . '
+ AND post_time > ' . $data['post_time'] . '
+ ORDER BY post_time ASC';
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($data['topic_type'] != POST_GLOBAL)
+ {
+ $sql_data[FORUMS_TABLE] = ($data['post_approved']) ? 'forum_posts = forum_posts - 1' : '';
+ }
+
+ $sql_data[TOPICS_TABLE] = 'topic_replies_real = topic_replies_real - 1' . (($data['post_approved']) ? ', topic_replies = topic_replies - 1' : '');
+ $next_post_id = (int) $row['post_id'];
+ break;
+ }
+
+ if (($post_mode == 'delete') || ($post_mode == 'delete_last_post') || ($post_mode == 'delete_first_post'))
+ {
+ $sql = 'SELECT 1 AS has_attachments
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE topic_id = ' . $topic_id;
+ $result = $db->sql_query_limit($sql, 1);
+ $has_attachments = (int) $db->sql_fetchfield('has_attachments');
+ $db->sql_freeresult($result);
+
+ if (!$has_attachments)
+ {
+ $sql_data[TOPICS_TABLE] .= ', topic_attachment = 0';
+ }
+ }
+
+// $sql_data[USERS_TABLE] = ($data['post_postcount']) ? 'user_posts = user_posts - 1' : '';
+
+ $db->sql_transaction('begin');
+
+ $where_sql = array(
+ FORUMS_TABLE => "forum_id = $forum_id",
+ TOPICS_TABLE => "topic_id = $topic_id",
+ USERS_TABLE => 'user_id = ' . $data['poster_id']
+ );
+
+ foreach ($sql_data as $table => $update_sql)
+ {
+ if ($update_sql)
+ {
+ $db->sql_query("UPDATE $table SET $update_sql WHERE " . $where_sql[$table]);
+ }
+ }
+
+ // Adjust posted info for this user by looking for a post by him/her within this topic...
+ if ($post_mode != 'delete_topic' && $config['load_db_track'] && $data['poster_id'] != ANONYMOUS)
+ {
+ $sql = 'SELECT poster_id
+ FROM ' . POSTS_TABLE . '
+ WHERE topic_id = ' . $topic_id . '
+ AND poster_id = ' . $data['poster_id'];
+ $result = $db->sql_query_limit($sql, 1);
+ $poster_id = (int) $db->sql_fetchfield('poster_id');
+ $db->sql_freeresult($result);
+
+ // The user is not having any more posts within this topic
+ if (!$poster_id)
+ {
+ $sql = 'DELETE FROM ' . TOPICS_POSTED_TABLE . '
+ WHERE topic_id = ' . $topic_id . '
+ AND user_id = ' . $data['poster_id'];
+ $db->sql_query($sql);
+ }
+ }
+
+ $db->sql_transaction('commit');
+
+ if ($data['post_reported'] && ($post_mode != 'delete_topic'))
+ {
+ sync('topic_reported', 'topic_id', array($topic_id));
+ }
+
+ return $next_post_id;
+}
+
+/**
+* Submit Post
+* @todo Split up and create lightweight, simple API for this.
+*/
+function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $update_message = true, $update_search_index = true)
+{
+ global $db, $auth, $user, $config, $phpEx, $template, $phpbb_root_path;
+
+ // We do not handle erasing posts here
+ if ($mode == 'delete')
+ {
+ return false;
+ }
+
+ $current_time = time();
+
+ if ($mode == 'post')
+ {
+ $post_mode = 'post';
+ $update_message = true;
+ }
+ else if ($mode != 'edit')
+ {
+ $post_mode = 'reply';
+ $update_message = true;
+ }
+ else if ($mode == 'edit')
+ {
+ $post_mode = ($data['topic_replies_real'] == 0) ? 'edit_topic' : (($data['topic_first_post_id'] == $data['post_id']) ? 'edit_first_post' : (($data['topic_last_post_id'] == $data['post_id']) ? 'edit_last_post' : 'edit'));
+ }
+
+ // First of all make sure the subject and topic title are having the correct length.
+ // To achieve this without cutting off between special chars we convert to an array and then count the elements.
+ $subject = truncate_string($subject);
+ $data['topic_title'] = truncate_string($data['topic_title']);
+
+ // Collect some basic information about which tables and which rows to update/insert
+ $sql_data = $topic_row = array();
+ $poster_id = ($mode == 'edit') ? $data['poster_id'] : (int) $user->data['user_id'];
+
+ // Retrieve some additional information if not present
+ if ($mode == 'edit' && (!isset($data['post_approved']) || !isset($data['topic_approved']) || $data['post_approved'] === false || $data['topic_approved'] === false))
+ {
+ $sql = 'SELECT p.post_approved, t.topic_type, t.topic_replies, t.topic_replies_real, t.topic_approved
+ FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p
+ WHERE t.topic_id = p.topic_id
+ AND p.post_id = ' . $data['post_id'];
+ $result = $db->sql_query($sql);
+ $topic_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $data['topic_approved'] = $topic_row['topic_approved'];
+ $data['post_approved'] = $topic_row['post_approved'];
+ }
+
+ // This variable indicates if the user is able to post or put into the queue - it is used later for all code decisions regarding approval
+ // The variable name should be $post_approved, because it indicates if the post is approved or not
+ $post_approval = 1;
+
+ // Check the permissions for post approval. Moderators are not affected.
+ if (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id']))
+ {
+ // Post not approved, but in queue
+ $post_approval = 0;
+ }
+
+ // Mods are able to force approved/unapproved posts. True means the post is approved, false the post is unapproved
+ if (isset($data['force_approved_state']))
+ {
+ $post_approval = ($data['force_approved_state']) ? 1 : 0;
+ }
+
+ // Start the transaction here
+ $db->sql_transaction('begin');
+
+ // Collect Information
+ switch ($post_mode)
+ {
+ case 'post':
+ case 'reply':
+ $sql_data[POSTS_TABLE]['sql'] = array(
+ 'forum_id' => ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id'],
+ 'poster_id' => (int) $user->data['user_id'],
+ 'icon_id' => $data['icon_id'],
+ 'poster_ip' => $user->ip,
+ 'post_time' => $current_time,
+ 'post_approved' => $post_approval,
+ 'enable_bbcode' => $data['enable_bbcode'],
+ 'enable_smilies' => $data['enable_smilies'],
+ 'enable_magic_url' => $data['enable_urls'],
+ 'enable_sig' => $data['enable_sig'],
+ 'post_username' => (!$user->data['is_registered']) ? $username : '',
+ 'post_subject' => $subject,
+ 'post_text' => $data['message'],
+ 'post_checksum' => $data['message_md5'],
+ 'post_attachment' => (!empty($data['attachment_data'])) ? 1 : 0,
+ 'bbcode_bitfield' => $data['bbcode_bitfield'],
+ 'bbcode_uid' => $data['bbcode_uid'],
+ 'post_postcount' => ($auth->acl_get('f_postcount', $data['forum_id'])) ? 1 : 0,
+ 'post_edit_locked' => $data['post_edit_locked']
+ );
+ break;
+
+ case 'edit_first_post':
+ case 'edit':
+
+ case 'edit_last_post':
+ case 'edit_topic':
+
+ // If edit reason is given always display edit info
+
+ // If editing last post then display no edit info
+ // If m_edit permission then display no edit info
+ // If normal edit display edit info
+
+ // Display edit info if edit reason given or user is editing his post, which is not the last within the topic.
+ if ($data['post_edit_reason'] || (!$auth->acl_get('m_edit', $data['forum_id']) && ($post_mode == 'edit' || $post_mode == 'edit_first_post')))
+ {
+ $data['post_edit_reason'] = truncate_string($data['post_edit_reason'], 255, 255, false);
+
+ $sql_data[POSTS_TABLE]['sql'] = array(
+ 'post_edit_time' => $current_time,
+ 'post_edit_reason' => $data['post_edit_reason'],
+ 'post_edit_user' => (int) $data['post_edit_user'],
+ );
+
+ $sql_data[POSTS_TABLE]['stat'][] = 'post_edit_count = post_edit_count + 1';
+ }
+ else if (!$data['post_edit_reason'] && $mode == 'edit' && $auth->acl_get('m_edit', $data['forum_id']))
+ {
+ $sql_data[POSTS_TABLE]['sql'] = array(
+ 'post_edit_reason' => '',
+ );
+ }
+
+ // If the person editing this post is different to the one having posted then we will add a log entry stating the edit
+ // Could be simplified by only adding to the log if the edit is not tracked - but this may confuse admins/mods
+ if ($user->data['user_id'] != $poster_id)
+ {
+ $log_subject = ($subject) ? $subject : $data['topic_title'];
+ add_log('mod', $data['forum_id'], $data['topic_id'], 'LOG_POST_EDITED', $log_subject, (!empty($username)) ? $username : $user->lang['GUEST']);
+ }
+
+ if (!isset($sql_data[POSTS_TABLE]['sql']))
+ {
+ $sql_data[POSTS_TABLE]['sql'] = array();
+ }
+
+ $sql_data[POSTS_TABLE]['sql'] = array_merge($sql_data[POSTS_TABLE]['sql'], array(
+ 'forum_id' => ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id'],
+ 'poster_id' => $data['poster_id'],
+ 'icon_id' => $data['icon_id'],
+ 'post_approved' => (!$post_approval) ? 0 : $data['post_approved'],
+ 'enable_bbcode' => $data['enable_bbcode'],
+ 'enable_smilies' => $data['enable_smilies'],
+ 'enable_magic_url' => $data['enable_urls'],
+ 'enable_sig' => $data['enable_sig'],
+ 'post_username' => ($username && $data['poster_id'] == ANONYMOUS) ? $username : '',
+ 'post_subject' => $subject,
+ 'post_checksum' => $data['message_md5'],
+ 'post_attachment' => (!empty($data['attachment_data'])) ? 1 : 0,
+ 'bbcode_bitfield' => $data['bbcode_bitfield'],
+ 'bbcode_uid' => $data['bbcode_uid'],
+ 'post_edit_locked' => $data['post_edit_locked'])
+ );
+
+ if ($update_message)
+ {
+ $sql_data[POSTS_TABLE]['sql']['post_text'] = $data['message'];
+ }
+
+ break;
+ }
+
+ $post_approved = $sql_data[POSTS_TABLE]['sql']['post_approved'];
+ $topic_row = array();
+
+ // And the topic ladies and gentlemen
+ switch ($post_mode)
+ {
+ case 'post':
+ $sql_data[TOPICS_TABLE]['sql'] = array(
+ 'topic_poster' => (int) $user->data['user_id'],
+ 'topic_time' => $current_time,
+ 'topic_last_view_time' => $current_time,
+ 'forum_id' => ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id'],
+ 'icon_id' => $data['icon_id'],
+ 'topic_approved' => $post_approval,
+ 'topic_title' => $subject,
+ 'topic_first_poster_name' => (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : ''),
+ 'topic_first_poster_colour' => $user->data['user_colour'],
+ 'topic_type' => $topic_type,
+ 'topic_time_limit' => ($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE) ? ($data['topic_time_limit'] * 86400) : 0,
+ 'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : 0,
+ );
+
+ if (isset($poll['poll_options']) && !empty($poll['poll_options']))
+ {
+ $poll_start = ($poll['poll_start']) ? $poll['poll_start'] : $current_time;
+ $poll_length = $poll['poll_length'] * 86400;
+ if ($poll_length < 0)
+ {
+ $poll_start = $poll_start + $poll_length;
+ if ($poll_start < 0)
+ {
+ $poll_start = 0;
+ }
+ $poll_length = 1;
+ }
+
+ $sql_data[TOPICS_TABLE]['sql'] = array_merge($sql_data[TOPICS_TABLE]['sql'], array(
+ 'poll_title' => $poll['poll_title'],
+ 'poll_start' => $poll_start,
+ 'poll_max_options' => $poll['poll_max_options'],
+ 'poll_length' => $poll_length,
+ 'poll_vote_change' => $poll['poll_vote_change'])
+ );
+ }
+
+ $sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id']) && $post_approval) ? ', user_posts = user_posts + 1' : '');
+
+ if ($topic_type != POST_GLOBAL)
+ {
+ if ($post_approval)
+ {
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts + 1';
+ }
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_real = forum_topics_real + 1' . (($post_approval) ? ', forum_topics = forum_topics + 1' : '');
+ }
+ break;
+
+ case 'reply':
+ $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_view_time = ' . $current_time . ',
+ topic_replies_real = topic_replies_real + 1,
+ topic_bumped = 0,
+ topic_bumper = 0' .
+ (($post_approval) ? ', topic_replies = topic_replies + 1' : '') .
+ ((!empty($data['attachment_data']) || (isset($data['topic_attachment']) && $data['topic_attachment'])) ? ', topic_attachment = 1' : '');
+
+ $sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id']) && $post_approval) ? ', user_posts = user_posts + 1' : '');
+
+ if ($post_approval && $topic_type != POST_GLOBAL)
+ {
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts + 1';
+ }
+ break;
+
+ case 'edit_topic':
+ case 'edit_first_post':
+ if (isset($poll['poll_options']) && !empty($poll['poll_options']))
+ {
+ $poll_start = ($poll['poll_start']) ? $poll['poll_start'] : $current_time;
+ $poll_length = $poll['poll_length'] * 86400;
+ if ($poll_length < 0)
+ {
+ $poll_start = $poll_start + $poll_length;
+ if ($poll_start < 0)
+ {
+ $poll_start = 0;
+ }
+ $poll_length = 1;
+ }
+ }
+
+ $sql_data[TOPICS_TABLE]['sql'] = array(
+ 'forum_id' => ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id'],
+ 'icon_id' => $data['icon_id'],
+ 'topic_approved' => (!$post_approval) ? 0 : $data['topic_approved'],
+ 'topic_title' => $subject,
+ 'topic_first_poster_name' => $username,
+ 'topic_type' => $topic_type,
+ 'topic_time_limit' => ($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE) ? ($data['topic_time_limit'] * 86400) : 0,
+ 'poll_title' => (isset($poll['poll_options'])) ? $poll['poll_title'] : '',
+ 'poll_start' => (isset($poll['poll_options'])) ? $poll_start : 0,
+ 'poll_max_options' => (isset($poll['poll_options'])) ? $poll['poll_max_options'] : 1,
+ 'poll_length' => (isset($poll['poll_options'])) ? $poll_length : 0,
+ 'poll_vote_change' => (isset($poll['poll_vote_change'])) ? $poll['poll_vote_change'] : 0,
+ 'topic_last_view_time' => $current_time,
+
+ 'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : (isset($data['topic_attachment']) ? $data['topic_attachment'] : 0),
+ );
+
+ // Correctly set back the topic replies and forum posts... only if the topic was approved before and now gets disapproved
+ if (!$post_approval && $data['topic_approved'])
+ {
+ // Do we need to grab some topic informations?
+ if (!sizeof($topic_row))
+ {
+ $sql = 'SELECT topic_type, topic_replies, topic_replies_real, topic_approved
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_id = ' . $data['topic_id'];
+ $result = $db->sql_query($sql);
+ $topic_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+
+ // If this is the only post remaining we do not need to decrement topic_replies.
+ // Also do not decrement if first post - then the topic_replies will not be adjusted if approving the topic again.
+
+ // If this is an edited topic or the first post the topic gets completely disapproved later on...
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics = forum_topics - 1';
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - ' . ($topic_row['topic_replies'] + 1);
+
+ set_config_count('num_topics', -1, true);
+ set_config_count('num_posts', ($topic_row['topic_replies'] + 1) * (-1), true);
+
+ // Only decrement this post, since this is the one non-approved now
+ if ($auth->acl_get('f_postcount', $data['forum_id']))
+ {
+ $sql_data[USERS_TABLE]['stat'][] = 'user_posts = user_posts - 1';
+ }
+ }
+
+ break;
+
+ case 'edit':
+ case 'edit_last_post':
+
+ // Correctly set back the topic replies and forum posts... but only if the post was approved before.
+ if (!$post_approval && $data['post_approved'])
+ {
+ $sql_data[TOPICS_TABLE]['stat'][] = 'topic_replies = topic_replies - 1, topic_last_view_time = ' . $current_time;
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - 1';
+
+ set_config_count('num_posts', -1, true);
+
+ if ($auth->acl_get('f_postcount', $data['forum_id']))
+ {
+ $sql_data[USERS_TABLE]['stat'][] = 'user_posts = user_posts - 1';
+ }
+ }
+
+ break;
+ }
+
+ // Submit new topic
+ if ($post_mode == 'post')
+ {
+ $sql = 'INSERT INTO ' . TOPICS_TABLE . ' ' .
+ $db->sql_build_array('INSERT', $sql_data[TOPICS_TABLE]['sql']);
+ $db->sql_query($sql);
+
+ $data['topic_id'] = $db->sql_nextid();
+
+ $sql_data[POSTS_TABLE]['sql'] = array_merge($sql_data[POSTS_TABLE]['sql'], array(
+ 'topic_id' => $data['topic_id'])
+ );
+ unset($sql_data[TOPICS_TABLE]['sql']);
+ }
+
+ // Submit new post
+ if ($post_mode == 'post' || $post_mode == 'reply')
+ {
+ if ($post_mode == 'reply')
+ {
+ $sql_data[POSTS_TABLE]['sql'] = array_merge($sql_data[POSTS_TABLE]['sql'], array(
+ 'topic_id' => $data['topic_id'])
+ );
+ }
+
+ $sql = 'INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_data[POSTS_TABLE]['sql']);
+ $db->sql_query($sql);
+ $data['post_id'] = $db->sql_nextid();
+
+ if ($post_mode == 'post')
+ {
+ $sql_data[TOPICS_TABLE]['sql'] = array(
+ 'topic_first_post_id' => $data['post_id'],
+ 'topic_last_post_id' => $data['post_id'],
+ 'topic_last_post_time' => $current_time,
+ 'topic_last_poster_id' => (int) $user->data['user_id'],
+ 'topic_last_poster_name' => (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : ''),
+ 'topic_last_poster_colour' => $user->data['user_colour'],
+ 'topic_last_post_subject' => (string) $subject,
+ );
+ }
+
+ unset($sql_data[POSTS_TABLE]['sql']);
+ }
+
+ $make_global = false;
+
+ // Are we globalising or unglobalising?
+ if ($post_mode == 'edit_first_post' || $post_mode == 'edit_topic')
+ {
+ if (!sizeof($topic_row))
+ {
+ $sql = 'SELECT topic_type, topic_replies, topic_replies_real, topic_approved, topic_last_post_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_id = ' . $data['topic_id'];
+ $result = $db->sql_query($sql);
+ $topic_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+
+ // globalise/unglobalise?
+ if (($topic_row['topic_type'] != POST_GLOBAL && $topic_type == POST_GLOBAL) || ($topic_row['topic_type'] == POST_GLOBAL && $topic_type != POST_GLOBAL))
+ {
+ if (!empty($sql_data[FORUMS_TABLE]['stat']) && implode('', $sql_data[FORUMS_TABLE]['stat']))
+ {
+ $db->sql_query('UPDATE ' . FORUMS_TABLE . ' SET ' . implode(', ', $sql_data[FORUMS_TABLE]['stat']) . ' WHERE forum_id = ' . $data['forum_id']);
+ }
+
+ $make_global = true;
+ $sql_data[FORUMS_TABLE]['stat'] = array();
+ }
+
+ // globalise
+ if ($topic_row['topic_type'] != POST_GLOBAL && $topic_type == POST_GLOBAL)
+ {
+ // Decrement topic/post count
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - ' . ($topic_row['topic_replies_real'] + 1);
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_real = forum_topics_real - 1' . (($topic_row['topic_approved']) ? ', forum_topics = forum_topics - 1' : '');
+
+ // Update forum_ids for all posts
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET forum_id = 0
+ WHERE topic_id = ' . $data['topic_id'];
+ $db->sql_query($sql);
+ }
+ // unglobalise
+ else if ($topic_row['topic_type'] == POST_GLOBAL && $topic_type != POST_GLOBAL)
+ {
+ // Increment topic/post count
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts + ' . ($topic_row['topic_replies_real'] + 1);
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_real = forum_topics_real + 1' . (($topic_row['topic_approved']) ? ', forum_topics = forum_topics + 1' : '');
+
+ // Update forum_ids for all posts
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET forum_id = ' . $data['forum_id'] . '
+ WHERE topic_id = ' . $data['topic_id'];
+ $db->sql_query($sql);
+ }
+ }
+
+ // Update the topics table
+ if (isset($sql_data[TOPICS_TABLE]['sql']))
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_data[TOPICS_TABLE]['sql']) . '
+ WHERE topic_id = ' . $data['topic_id'];
+ $db->sql_query($sql);
+ }
+
+ // Update the posts table
+ if (isset($sql_data[POSTS_TABLE]['sql']))
+ {
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_data[POSTS_TABLE]['sql']) . '
+ WHERE post_id = ' . $data['post_id'];
+ $db->sql_query($sql);
+ }
+
+ // Update Poll Tables
+ if (isset($poll['poll_options']) && !empty($poll['poll_options']))
+ {
+ $cur_poll_options = array();
+
+ if ($poll['poll_start'] && $mode == 'edit')
+ {
+ $sql = 'SELECT *
+ FROM ' . POLL_OPTIONS_TABLE . '
+ WHERE topic_id = ' . $data['topic_id'] . '
+ ORDER BY poll_option_id';
+ $result = $db->sql_query($sql);
+
+ $cur_poll_options = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $cur_poll_options[] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ $sql_insert_ary = array();
+
+ for ($i = 0, $size = sizeof($poll['poll_options']); $i < $size; $i++)
+ {
+ if (strlen(trim($poll['poll_options'][$i])))
+ {
+ if (empty($cur_poll_options[$i]))
+ {
+ // If we add options we need to put them to the end to be able to preserve votes...
+ $sql_insert_ary[] = array(
+ 'poll_option_id' => (int) sizeof($cur_poll_options) + 1 + sizeof($sql_insert_ary),
+ 'topic_id' => (int) $data['topic_id'],
+ 'poll_option_text' => (string) $poll['poll_options'][$i]
+ );
+ }
+ else if ($poll['poll_options'][$i] != $cur_poll_options[$i])
+ {
+ $sql = 'UPDATE ' . POLL_OPTIONS_TABLE . "
+ SET poll_option_text = '" . $db->sql_escape($poll['poll_options'][$i]) . "'
+ WHERE poll_option_id = " . $cur_poll_options[$i]['poll_option_id'] . '
+ AND topic_id = ' . $data['topic_id'];
+ $db->sql_query($sql);
+ }
+ }
+ }
+
+ $db->sql_multi_insert(POLL_OPTIONS_TABLE, $sql_insert_ary);
+
+ if (sizeof($poll['poll_options']) < sizeof($cur_poll_options))
+ {
+ $sql = 'DELETE FROM ' . POLL_OPTIONS_TABLE . '
+ WHERE poll_option_id > ' . sizeof($poll['poll_options']) . '
+ AND topic_id = ' . $data['topic_id'];
+ $db->sql_query($sql);
+ }
+
+ // If edited, we would need to reset votes (since options can be re-ordered above, you can't be sure if the change is for changing the text or adding an option
+ if ($mode == 'edit' && sizeof($poll['poll_options']) != sizeof($cur_poll_options))
+ {
+ $db->sql_query('DELETE FROM ' . POLL_VOTES_TABLE . ' WHERE topic_id = ' . $data['topic_id']);
+ $db->sql_query('UPDATE ' . POLL_OPTIONS_TABLE . ' SET poll_option_total = 0 WHERE topic_id = ' . $data['topic_id']);
+ }
+ }
+
+ // Submit Attachments
+ if (!empty($data['attachment_data']) && $data['post_id'] && in_array($mode, array('post', 'reply', 'quote', 'edit')))
+ {
+ $space_taken = $files_added = 0;
+ $orphan_rows = array();
+
+ foreach ($data['attachment_data'] as $pos => $attach_row)
+ {
+ $orphan_rows[(int) $attach_row['attach_id']] = array();
+ }
+
+ if (sizeof($orphan_rows))
+ {
+ $sql = 'SELECT attach_id, filesize, physical_filename
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('attach_id', array_keys($orphan_rows)) . '
+ AND is_orphan = 1
+ AND poster_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+
+ $orphan_rows = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $orphan_rows[$row['attach_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ foreach ($data['attachment_data'] as $pos => $attach_row)
+ {
+ if ($attach_row['is_orphan'] && !isset($orphan_rows[$attach_row['attach_id']]))
+ {
+ continue;
+ }
+
+ if (!$attach_row['is_orphan'])
+ {
+ // update entry in db if attachment already stored in db and filespace
+ $sql = 'UPDATE ' . ATTACHMENTS_TABLE . "
+ SET attach_comment = '" . $db->sql_escape($attach_row['attach_comment']) . "'
+ WHERE attach_id = " . (int) $attach_row['attach_id'] . '
+ AND is_orphan = 0';
+ $db->sql_query($sql);
+ }
+ else
+ {
+ // insert attachment into db
+ if (!@file_exists($phpbb_root_path . $config['upload_path'] . '/' . utf8_basename($orphan_rows[$attach_row['attach_id']]['physical_filename'])))
+ {
+ continue;
+ }
+
+ $space_taken += $orphan_rows[$attach_row['attach_id']]['filesize'];
+ $files_added++;
+
+ $attach_sql = array(
+ 'post_msg_id' => $data['post_id'],
+ 'topic_id' => $data['topic_id'],
+ 'is_orphan' => 0,
+ 'poster_id' => $poster_id,
+ 'attach_comment' => $attach_row['attach_comment'],
+ );
+
+ $sql = 'UPDATE ' . ATTACHMENTS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $attach_sql) . '
+ WHERE attach_id = ' . $attach_row['attach_id'] . '
+ AND is_orphan = 1
+ AND poster_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+ }
+ }
+
+ if ($space_taken && $files_added)
+ {
+ set_config_count('upload_dir_size', $space_taken, true);
+ set_config_count('num_files', $files_added, true);
+ }
+ }
+
+ // we need to update the last forum information
+ // only applicable if the topic is not global and it is approved
+ // we also check to make sure we are not dealing with globaling the latest topic (pretty rare but still needs to be checked)
+ if ($topic_type != POST_GLOBAL && !$make_global && ($post_approved || !$data['post_approved']))
+ {
+ // the last post makes us update the forum table. This can happen if...
+ // We make a new topic
+ // We reply to a topic
+ // We edit the last post in a topic and this post is the latest in the forum (maybe)
+ // We edit the only post in the topic
+ // We edit the first post in the topic and all the other posts are not approved
+ if (($post_mode == 'post' || $post_mode == 'reply') && $post_approved)
+ {
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . $data['post_id'];
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($subject) . "'";
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . $current_time;
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $user->data['user_id'];
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape((!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '')) . "'";
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($user->data['user_colour']) . "'";
+ }
+ else if ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || ($post_mode == 'edit_first_post' && !$data['topic_replies']))
+ {
+ // this does not _necessarily_ mean that we must update the info again,
+ // it just means that we might have to
+ $sql = 'SELECT forum_last_post_id, forum_last_post_subject
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . (int) $data['forum_id'];
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // this post is the latest post in the forum, better update
+ if ($row['forum_last_post_id'] == $data['post_id'])
+ {
+ // If post approved and subject changed, or poster is anonymous, we need to update the forum_last* rows
+ if ($post_approved && ($row['forum_last_post_subject'] !== $subject || $data['poster_id'] == ANONYMOUS))
+ {
+ // the post's subject changed
+ if ($row['forum_last_post_subject'] !== $subject)
+ {
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_subject = \'' . $db->sql_escape($subject) . '\'';
+ }
+
+ // Update the user name if poster is anonymous... just in case an admin changed it
+ if ($data['poster_id'] == ANONYMOUS)
+ {
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape($username) . "'";
+ }
+ }
+ else if ($data['post_approved'] !== $post_approved)
+ {
+ // we need a fresh change of socks, everything has become invalidated
+ $sql = 'SELECT MAX(topic_last_post_id) as last_post_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE forum_id = ' . (int) $data['forum_id'] . '
+ AND topic_approved = 1';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // any posts left in this forum?
+ if (!empty($row['last_post_id']))
+ {
+ $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
+ WHERE p.poster_id = u.user_id
+ AND p.post_id = ' . (int) $row['last_post_id'];
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // salvation, a post is found! jam it into the forums table
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . (int) $row['post_id'];
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . (int) $row['post_time'];
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $row['poster_id'];
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'";
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
+ }
+ else
+ {
+ // just our luck, the last topic in the forum has just been turned unapproved...
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = 0';
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = ''";
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = 0';
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = 0';
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = ''";
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = ''";
+ }
+ }
+ }
+ }
+ }
+ else if ($make_global)
+ {
+ // somebody decided to be a party pooper, we must recalculate the whole shebang (maybe)
+ $sql = 'SELECT forum_last_post_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . (int) $data['forum_id'];
+ $result = $db->sql_query($sql);
+ $forum_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // we made a topic global, go get new data
+ if ($topic_row['topic_type'] != POST_GLOBAL && $topic_type == POST_GLOBAL && $forum_row['forum_last_post_id'] == $topic_row['topic_last_post_id'])
+ {
+ // we need a fresh change of socks, everything has become invalidated
+ $sql = 'SELECT MAX(topic_last_post_id) as last_post_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE forum_id = ' . (int) $data['forum_id'] . '
+ AND topic_approved = 1';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // any posts left in this forum?
+ if (!empty($row['last_post_id']))
+ {
+ $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
+ WHERE p.poster_id = u.user_id
+ AND p.post_id = ' . (int) $row['last_post_id'];
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // salvation, a post is found! jam it into the forums table
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . (int) $row['post_id'];
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . (int) $row['post_time'];
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $row['poster_id'];
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'";
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
+ }
+ else
+ {
+ // just our luck, the last topic in the forum has just been globalized...
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = 0';
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = ''";
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = 0';
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = 0';
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = ''";
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = ''";
+ }
+ }
+ else if ($topic_row['topic_type'] == POST_GLOBAL && $topic_type != POST_GLOBAL && $forum_row['forum_last_post_id'] < $topic_row['topic_last_post_id'])
+ {
+ // this post has a higher id, it is newer
+ $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
+ WHERE p.poster_id = u.user_id
+ AND p.post_id = ' . (int) $topic_row['topic_last_post_id'];
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // salvation, a post is found! jam it into the forums table
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . (int) $row['post_id'];
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . (int) $row['post_time'];
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $row['poster_id'];
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'";
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
+ }
+ }
+
+ // topic sync time!
+ // simply, we update if it is a reply or the last post is edited
+ if ($post_approved)
+ {
+ // reply requires the whole thing
+ if ($post_mode == 'reply')
+ {
+ $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_id = ' . (int) $data['post_id'];
+ $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_poster_id = ' . (int) $user->data['user_id'];
+ $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_name = '" . $db->sql_escape((!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '')) . "'";
+ $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_colour = '" . (($user->data['user_id'] != ANONYMOUS) ? $db->sql_escape($user->data['user_colour']) : '') . "'";
+ $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($subject) . "'";
+ $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_time = ' . (int) $current_time;
+ }
+ else if ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || ($post_mode == 'edit_first_post' && !$data['topic_replies']))
+ {
+ // only the subject can be changed from edit
+ $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($subject) . "'";
+
+ // Maybe not only the subject, but also changing anonymous usernames. ;)
+ if ($data['poster_id'] == ANONYMOUS)
+ {
+ $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_name = '" . $db->sql_escape($username) . "'";
+ }
+ }
+ }
+ else if (!$data['post_approved'] && ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || ($post_mode == 'edit_first_post' && !$data['topic_replies'])))
+ {
+ // like having the rug pulled from under us
+ $sql = 'SELECT MAX(post_id) as last_post_id
+ FROM ' . POSTS_TABLE . '
+ WHERE topic_id = ' . (int) $data['topic_id'] . '
+ AND post_approved = 1';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // any posts left in this forum?
+ if (!empty($row['last_post_id']))
+ {
+ $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
+ WHERE p.poster_id = u.user_id
+ AND p.post_id = ' . (int) $row['last_post_id'];
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // salvation, a post is found! jam it into the topics table
+ $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_id = ' . (int) $row['post_id'];
+ $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
+ $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_time = ' . (int) $row['post_time'];
+ $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_poster_id = ' . (int) $row['poster_id'];
+ $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'";
+ $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
+ }
+ }
+
+ // Update total post count, do not consider moderated posts/topics
+ if ($post_approval)
+ {
+ if ($post_mode == 'post')
+ {
+ set_config_count('num_topics', 1, true);
+ set_config_count('num_posts', 1, true);
+ }
+
+ if ($post_mode == 'reply')
+ {
+ set_config_count('num_posts', 1, true);
+ }
+ }
+
+ // Update forum stats
+ $where_sql = array(POSTS_TABLE => 'post_id = ' . $data['post_id'], TOPICS_TABLE => 'topic_id = ' . $data['topic_id'], FORUMS_TABLE => 'forum_id = ' . $data['forum_id'], USERS_TABLE => 'user_id = ' . $poster_id);
+
+ foreach ($sql_data as $table => $update_ary)
+ {
+ if (isset($update_ary['stat']) && implode('', $update_ary['stat']))
+ {
+ $sql = "UPDATE $table SET " . implode(', ', $update_ary['stat']) . ' WHERE ' . $where_sql[$table];
+ $db->sql_query($sql);
+ }
+ }
+
+ // Delete topic shadows (if any exist). We do not need a shadow topic for an global announcement
+ if ($make_global)
+ {
+ $sql = 'DELETE FROM ' . TOPICS_TABLE . '
+ WHERE topic_moved_id = ' . $data['topic_id'];
+ $db->sql_query($sql);
+ }
+
+ // Committing the transaction before updating search index
+ $db->sql_transaction('commit');
+
+ // Delete draft if post was loaded...
+ $draft_id = request_var('draft_loaded', 0);
+ if ($draft_id)
+ {
+ $sql = 'DELETE FROM ' . DRAFTS_TABLE . "
+ WHERE draft_id = $draft_id
+ AND user_id = {$user->data['user_id']}";
+ $db->sql_query($sql);
+ }
+
+ // Index message contents
+ if ($update_search_index && $data['enable_indexing'])
+ {
+ // Select the search method and do some additional checks to ensure it can actually be utilised
+ $search_type = basename($config['search_type']);
+
+ if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
+ {
+ trigger_error('NO_SUCH_SEARCH_MODULE');
+ }
+
+ if (!class_exists($search_type))
+ {
+ include("{$phpbb_root_path}includes/search/$search_type.$phpEx");
+ }
+
+ $error = false;
+ $search = new $search_type($error);
+
+ if ($error)
+ {
+ trigger_error($error);
+ }
+
+ $search->index($mode, $data['post_id'], $data['message'], $subject, $poster_id, ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id']);
+ }
+
+ // Topic Notification, do not change if moderator is changing other users posts...
+ if ($user->data['user_id'] == $poster_id)
+ {
+ if (!$data['notify_set'] && $data['notify'])
+ {
+ $sql = 'INSERT INTO ' . TOPICS_WATCH_TABLE . ' (user_id, topic_id)
+ VALUES (' . $user->data['user_id'] . ', ' . $data['topic_id'] . ')';
+ $db->sql_query($sql);
+ }
+ else if ($data['notify_set'] && !$data['notify'])
+ {
+ $sql = 'DELETE FROM ' . TOPICS_WATCH_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'] . '
+ AND topic_id = ' . $data['topic_id'];
+ $db->sql_query($sql);
+ }
+ }
+
+ if ($mode == 'post' || $mode == 'reply' || $mode == 'quote')
+ {
+ // Mark this topic as posted to
+ markread('post', $data['forum_id'], $data['topic_id'], $data['post_time']);
+ }
+
+ // Mark this topic as read
+ // We do not use post_time here, this is intended (post_time can have a date in the past if editing a message)
+ markread('topic', (($topic_type == POST_GLOBAL) ? 0 : $data['forum_id']), $data['topic_id'], time());
+
+ //
+ if ($config['load_db_lastread'] && $user->data['is_registered'])
+ {
+ $sql = 'SELECT mark_time
+ FROM ' . FORUMS_TRACK_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'] . '
+ AND forum_id = ' . (($topic_type == POST_GLOBAL) ? 0 : $data['forum_id']);
+ $result = $db->sql_query($sql);
+ $f_mark_time = (int) $db->sql_fetchfield('mark_time');
+ $db->sql_freeresult($result);
+ }
+ else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ $f_mark_time = false;
+ }
+
+ if (($config['load_db_lastread'] && $user->data['is_registered']) || $config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ // Update forum info
+ if ($topic_type == POST_GLOBAL)
+ {
+ $sql = 'SELECT MAX(topic_last_post_time) as forum_last_post_time
+ FROM ' . TOPICS_TABLE . '
+ WHERE forum_id = 0';
+ }
+ else
+ {
+ $sql = 'SELECT forum_last_post_time
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $data['forum_id'];
+ }
+ $result = $db->sql_query($sql);
+ $forum_last_post_time = (int) $db->sql_fetchfield('forum_last_post_time');
+ $db->sql_freeresult($result);
+
+ update_forum_tracking_info((($topic_type == POST_GLOBAL) ? 0 : $data['forum_id']), $forum_last_post_time, $f_mark_time, false);
+ }
+
+ // Send Notifications
+ if ($mode != 'edit' && $mode != 'delete' && $post_approval)
+ {
+ user_notification($mode, $subject, $data['topic_title'], $data['forum_name'], $data['forum_id'], $data['topic_id'], $data['post_id']);
+ }
+
+ $params = $add_anchor = '';
+
+ if ($post_approval)
+ {
+ $params .= '&amp;t=' . $data['topic_id'];
+
+ if ($mode != 'post')
+ {
+ $params .= '&amp;p=' . $data['post_id'];
+ $add_anchor = '#p' . $data['post_id'];
+ }
+ }
+ else if ($mode != 'post' && $post_mode != 'edit_first_post' && $post_mode != 'edit_topic')
+ {
+ $params .= '&amp;t=' . $data['topic_id'];
+ }
+
+ $url = (!$params) ? "{$phpbb_root_path}viewforum.$phpEx" : "{$phpbb_root_path}viewtopic.$phpEx";
+ $url = append_sid($url, 'f=' . $data['forum_id'] . $params) . $add_anchor;
+
+ return $url;
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
new file mode 100644
index 0000000000..c93b6a6bba
--- /dev/null
+++ b/phpBB/includes/functions_privmsgs.php
@@ -0,0 +1,1981 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/*
+ Ability to simply add own rules by doing three things:
+ 1) Add an appropriate constant
+ 2) Add a new check array to the global_privmsgs_rules variable and the condition array (if one is required)
+ 3) Add a new language variable to ucp.php
+
+ The user is then able to select the new rule. It will be checked against and handled as specified.
+ To add new actions (yes, checks can be added here too) to the rule management, the core code has to be modified.
+*/
+
+define('RULE_IS_LIKE', 1); // Is Like
+define('RULE_IS_NOT_LIKE', 2); // Is Not Like
+define('RULE_IS', 3); // Is
+define('RULE_IS_NOT', 4); // Is Not
+define('RULE_BEGINS_WITH', 5); // Begins with
+define('RULE_ENDS_WITH', 6); // Ends with
+define('RULE_IS_FRIEND', 7); // Is Friend
+define('RULE_IS_FOE', 8); // Is Foe
+define('RULE_IS_USER', 9); // Is User
+define('RULE_IS_GROUP', 10); // Is In Usergroup
+define('RULE_ANSWERED', 11); // Answered
+define('RULE_FORWARDED', 12); // Forwarded
+define('RULE_TO_GROUP', 14); // Usergroup
+define('RULE_TO_ME', 15); // Me
+
+define('ACTION_PLACE_INTO_FOLDER', 1);
+define('ACTION_MARK_AS_READ', 2);
+define('ACTION_MARK_AS_IMPORTANT', 3);
+define('ACTION_DELETE_MESSAGE', 4);
+
+define('CHECK_SUBJECT', 1);
+define('CHECK_SENDER', 2);
+define('CHECK_MESSAGE', 3);
+define('CHECK_STATUS', 4);
+define('CHECK_TO', 5);
+
+/**
+* Global private message rules
+* These rules define what to do if a rule is hit
+*/
+$global_privmsgs_rules = array(
+ CHECK_SUBJECT => array(
+ RULE_IS_LIKE => array('check0' => 'message_subject', 'function' => 'preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0})'),
+ RULE_IS_NOT_LIKE => array('check0' => 'message_subject', 'function' => '!(preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0}))'),
+ RULE_IS => array('check0' => 'message_subject', 'function' => '{CHECK0} == {STRING}'),
+ RULE_IS_NOT => array('check0' => 'message_subject', 'function' => '{CHECK0} != {STRING}'),
+ RULE_BEGINS_WITH => array('check0' => 'message_subject', 'function' => 'preg_match("/^" . preg_quote({STRING}, "/") . "/i", {CHECK0})'),
+ RULE_ENDS_WITH => array('check0' => 'message_subject', 'function' => 'preg_match("/" . preg_quote({STRING}, "/") . "$/i", {CHECK0})'),
+ ),
+
+ CHECK_SENDER => array(
+ RULE_IS_LIKE => array('check0' => 'username', 'function' => 'preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0})'),
+ RULE_IS_NOT_LIKE => array('check0' => 'username', 'function' => '!(preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0}))'),
+ RULE_IS => array('check0' => 'username', 'function' => '{CHECK0} == {STRING}'),
+ RULE_IS_NOT => array('check0' => 'username', 'function' => '{CHECK0} != {STRING}'),
+ RULE_BEGINS_WITH => array('check0' => 'username', 'function' => 'preg_match("/^" . preg_quote({STRING}, "/") . "/i", {CHECK0})'),
+ RULE_ENDS_WITH => array('check0' => 'username', 'function' => 'preg_match("/" . preg_quote({STRING}, "/") . "$/i", {CHECK0})'),
+ RULE_IS_FRIEND => array('check0' => 'friend', 'function' => '{CHECK0} == 1'),
+ RULE_IS_FOE => array('check0' => 'foe', 'function' => '{CHECK0} == 1'),
+ RULE_IS_USER => array('check0' => 'author_id', 'function' => '{CHECK0} == {USER_ID}'),
+ RULE_IS_GROUP => array('check0' => 'author_in_group', 'function' => 'in_array({GROUP_ID}, {CHECK0})'),
+ ),
+
+ CHECK_MESSAGE => array(
+ RULE_IS_LIKE => array('check0' => 'message_text', 'function' => 'preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0})'),
+ RULE_IS_NOT_LIKE => array('check0' => 'message_text', 'function' => '!(preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0}))'),
+ RULE_IS => array('check0' => 'message_text', 'function' => '{CHECK0} == {STRING}'),
+ RULE_IS_NOT => array('check0' => 'message_text', 'function' => '{CHECK0} != {STRING}'),
+ ),
+
+ CHECK_STATUS => array(
+ RULE_ANSWERED => array('check0' => 'pm_replied', 'function' => '{CHECK0} == 1'),
+ RULE_FORWARDED => array('check0' => 'pm_forwarded', 'function' => '{CHECK0} == 1'),
+ ),
+
+ CHECK_TO => array(
+ RULE_TO_GROUP => array('check0' => 'to', 'check1' => 'bcc', 'check2' => 'user_in_group', 'function' => 'in_array("g_" . {CHECK2}, {CHECK0}) || in_array("g_" . {CHECK2}, {CHECK1})'),
+ RULE_TO_ME => array('check0' => 'to', 'check1' => 'bcc', 'function' => 'in_array("u_" . $user_id, {CHECK0}) || in_array("u_" . $user_id, {CHECK1})'),
+ )
+);
+
+/**
+* This is for defining which condition fields to show for which Rule
+*/
+$global_rule_conditions = array(
+ RULE_IS_LIKE => 'text',
+ RULE_IS_NOT_LIKE => 'text',
+ RULE_IS => 'text',
+ RULE_IS_NOT => 'text',
+ RULE_BEGINS_WITH => 'text',
+ RULE_ENDS_WITH => 'text',
+ RULE_IS_USER => 'user',
+ RULE_IS_GROUP => 'group'
+);
+
+/**
+* Get all folder
+*/
+function get_folder($user_id, $folder_id = false)
+{
+ global $db, $user, $template;
+ global $phpbb_root_path, $phpEx;
+
+ $folder = array();
+
+ // Get folder information
+ $sql = 'SELECT folder_id, COUNT(msg_id) as num_messages, SUM(pm_unread) as num_unread
+ FROM ' . PRIVMSGS_TO_TABLE . "
+ WHERE user_id = $user_id
+ AND folder_id <> " . PRIVMSGS_NO_BOX . '
+ GROUP BY folder_id';
+ $result = $db->sql_query($sql);
+
+ $num_messages = $num_unread = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $num_messages[(int) $row['folder_id']] = $row['num_messages'];
+ $num_unread[(int) $row['folder_id']] = $row['num_unread'];
+ }
+ $db->sql_freeresult($result);
+
+ // Make sure the default boxes are defined
+ $available_folder = array(PRIVMSGS_INBOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX);
+
+ foreach ($available_folder as $default_folder)
+ {
+ if (!isset($num_messages[$default_folder]))
+ {
+ $num_messages[$default_folder] = 0;
+ }
+
+ if (!isset($num_unread[$default_folder]))
+ {
+ $num_unread[$default_folder] = 0;
+ }
+ }
+
+ // Adjust unread status for outbox
+ $num_unread[PRIVMSGS_OUTBOX] = $num_messages[PRIVMSGS_OUTBOX];
+
+ $folder[PRIVMSGS_INBOX] = array(
+ 'folder_name' => $user->lang['PM_INBOX'],
+ 'num_messages' => $num_messages[PRIVMSGS_INBOX],
+ 'unread_messages' => $num_unread[PRIVMSGS_INBOX]
+ );
+
+ // Custom Folder
+ $sql = 'SELECT folder_id, folder_name, pm_count
+ FROM ' . PRIVMSGS_FOLDER_TABLE . "
+ WHERE user_id = $user_id";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $folder[$row['folder_id']] = array(
+ 'folder_name' => $row['folder_name'],
+ 'num_messages' => $row['pm_count'],
+ 'unread_messages' => ((isset($num_unread[$row['folder_id']])) ? $num_unread[$row['folder_id']] : 0)
+ );
+ }
+ $db->sql_freeresult($result);
+
+ $folder[PRIVMSGS_OUTBOX] = array(
+ 'folder_name' => $user->lang['PM_OUTBOX'],
+ 'num_messages' => $num_messages[PRIVMSGS_OUTBOX],
+ 'unread_messages' => $num_unread[PRIVMSGS_OUTBOX]
+ );
+
+ $folder[PRIVMSGS_SENTBOX] = array(
+ 'folder_name' => $user->lang['PM_SENTBOX'],
+ 'num_messages' => $num_messages[PRIVMSGS_SENTBOX],
+ 'unread_messages' => $num_unread[PRIVMSGS_SENTBOX]
+ );
+
+ // Define Folder Array for template designers (and for making custom folders usable by the template too)
+ foreach ($folder as $f_id => $folder_ary)
+ {
+ $folder_id_name = ($f_id == PRIVMSGS_INBOX) ? 'inbox' : (($f_id == PRIVMSGS_OUTBOX) ? 'outbox' : 'sentbox');
+
+ $template->assign_block_vars('folder', array(
+ 'FOLDER_ID' => $f_id,
+ 'FOLDER_NAME' => $folder_ary['folder_name'],
+ 'NUM_MESSAGES' => $folder_ary['num_messages'],
+ 'UNREAD_MESSAGES' => $folder_ary['unread_messages'],
+
+ 'U_FOLDER' => ($f_id > 0) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=' . $f_id) : append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=' . $folder_id_name),
+
+ 'S_CUR_FOLDER' => ($f_id === $folder_id) ? true : false,
+ 'S_UNREAD_MESSAGES' => ($folder_ary['unread_messages']) ? true : false,
+ 'S_CUSTOM_FOLDER' => ($f_id > 0) ? true : false)
+ );
+ }
+
+ if ($folder_id !== false && !isset($folder[$folder_id]))
+ {
+ trigger_error('UNKNOWN_FOLDER');
+ }
+
+ return $folder;
+}
+
+/**
+* Delete Messages From Sentbox
+* we are doing this here because this saves us a bunch of checks and queries
+*/
+function clean_sentbox($num_sentbox_messages)
+{
+ global $db, $user, $config;
+
+ // Check Message Limit
+ if ($user->data['message_limit'] && $num_sentbox_messages > $user->data['message_limit'])
+ {
+ // Delete old messages
+ $sql = 'SELECT t.msg_id
+ FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p
+ WHERE t.msg_id = p.msg_id
+ AND t.user_id = ' . $user->data['user_id'] . '
+ AND t.folder_id = ' . PRIVMSGS_SENTBOX . '
+ ORDER BY p.message_time ASC';
+ $result = $db->sql_query_limit($sql, ($num_sentbox_messages - $user->data['message_limit']));
+
+ $delete_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $delete_ids[] = $row['msg_id'];
+ }
+ $db->sql_freeresult($result);
+ delete_pm($user->data['user_id'], $delete_ids, PRIVMSGS_SENTBOX);
+ }
+}
+
+/**
+* Check Rule against Message Information
+*/
+function check_rule(&$rules, &$rule_row, &$message_row, $user_id)
+{
+ global $user, $config;
+
+ if (!isset($rules[$rule_row['rule_check']][$rule_row['rule_connection']]))
+ {
+ return false;
+ }
+
+ $check_ary = $rules[$rule_row['rule_check']][$rule_row['rule_connection']];
+
+ // Replace Check Literals
+ $evaluate = $check_ary['function'];
+ $evaluate = preg_replace('/{(CHECK[0-9])}/', '$message_row[$check_ary[strtolower("\1")]]', $evaluate);
+
+ // Replace Rule Literals
+ $evaluate = preg_replace('/{(STRING|USER_ID|GROUP_ID)}/', '$rule_row["rule_" . strtolower("\1")]', $evaluate);
+
+ // Evil Statement
+ $result = false;
+ eval('$result = (' . $evaluate . ') ? true : false;');
+
+ if (!$result)
+ {
+ return false;
+ }
+
+ switch ($rule_row['rule_action'])
+ {
+ case ACTION_PLACE_INTO_FOLDER:
+ return array('action' => $rule_row['rule_action'], 'folder_id' => $rule_row['rule_folder_id']);
+ break;
+
+ case ACTION_MARK_AS_READ:
+ case ACTION_MARK_AS_IMPORTANT:
+ return array('action' => $rule_row['rule_action'], 'pm_unread' => $message_row['pm_unread'], 'pm_marked' => $message_row['pm_marked']);
+ break;
+
+ case ACTION_DELETE_MESSAGE:
+ global $db, $auth;
+
+ // Check for admins/mods - users are not allowed to remove those messages...
+ // We do the check here to make sure the data we use is consistent
+ $sql = 'SELECT user_id, user_type, user_permissions
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . (int) $message_row['author_id'];
+ $result = $db->sql_query($sql);
+ $userdata = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $auth2 = new auth();
+ $auth2->acl($userdata);
+
+ if (!$auth2->acl_get('a_') && !$auth2->acl_get('m_') && !$auth2->acl_getf_global('m_'))
+ {
+ return array('action' => $rule_row['rule_action'], 'pm_unread' => $message_row['pm_unread'], 'pm_marked' => $message_row['pm_marked']);
+ }
+
+ return false;
+ break;
+
+ default:
+ return false;
+ }
+
+ return false;
+}
+
+/**
+* Update user PM count
+*/
+function update_pm_counts()
+{
+ global $user, $db;
+
+ // Update unread count
+ $sql = 'SELECT COUNT(msg_id) as num_messages
+ FROM ' . PRIVMSGS_TO_TABLE . '
+ WHERE pm_unread = 1
+ AND folder_id <> ' . PRIVMSGS_OUTBOX . '
+ AND user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+ $user->data['user_unread_privmsg'] = (int) $db->sql_fetchfield('num_messages');
+ $db->sql_freeresult($result);
+
+ // Update new pm count
+ $sql = 'SELECT COUNT(msg_id) as num_messages
+ FROM ' . PRIVMSGS_TO_TABLE . '
+ WHERE pm_new = 1
+ AND folder_id IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ')
+ AND user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+ $user->data['user_new_privmsg'] = (int) $db->sql_fetchfield('num_messages');
+ $db->sql_freeresult($result);
+
+ $db->sql_query('UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array(
+ 'user_unread_privmsg' => (int) $user->data['user_unread_privmsg'],
+ 'user_new_privmsg' => (int) $user->data['user_new_privmsg'],
+ )) . ' WHERE user_id = ' . $user->data['user_id']);
+
+ // Ok, here we need to repair something, other boxes than privmsgs_no_box and privmsgs_hold_box should not carry the pm_new flag.
+ if (!$user->data['user_new_privmsg'])
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
+ SET pm_new = 0
+ WHERE pm_new = 1
+ AND folder_id NOT IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ')
+ AND user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+ }
+}
+
+/**
+* Place new messages into appropriate folder
+*/
+function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
+{
+ global $db, $user, $config;
+
+ if (!$user->data['user_new_privmsg'])
+ {
+ return array('not_moved' => 0, 'removed' => 0);
+ }
+
+ $user_message_rules = (int) $user->data['user_message_rules'];
+ $user_id = (int) $user->data['user_id'];
+
+ $action_ary = $move_into_folder = array();
+ $num_removed = 0;
+
+ // Newly processing on-hold messages
+ if ($release)
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
+ SET folder_id = ' . PRIVMSGS_NO_BOX . '
+ WHERE folder_id = ' . PRIVMSGS_HOLD_BOX . "
+ AND user_id = $user_id";
+ $db->sql_query($sql);
+ }
+
+ // Get those messages not yet placed into any box
+ $retrieve_sql = 'SELECT t.*, p.*, u.username, u.user_id, u.group_id
+ FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . " u
+ WHERE t.user_id = $user_id
+ AND p.author_id = u.user_id
+ AND t.folder_id = " . PRIVMSGS_NO_BOX . '
+ AND t.msg_id = p.msg_id';
+
+ // Just place into the appropriate arrays if no rules need to be checked
+ if (!$user_message_rules)
+ {
+ $result = $db->sql_query($retrieve_sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $action_ary[$row['msg_id']][] = array('action' => false);
+ }
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $user_rules = $zebra = $check_rows = array();
+ $user_ids = $memberships = array();
+
+ // First of all, grab all rules and retrieve friends/foes
+ $sql = 'SELECT *
+ FROM ' . PRIVMSGS_RULES_TABLE . "
+ WHERE user_id = $user_id";
+ $result = $db->sql_query($sql);
+ $user_rules = $db->sql_fetchrowset($result);
+ $db->sql_freeresult($result);
+
+ if (sizeof($user_rules))
+ {
+ $sql = 'SELECT zebra_id, friend, foe
+ FROM ' . ZEBRA_TABLE . "
+ WHERE user_id = $user_id";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $zebra[$row['zebra_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ // Now build a bare-bone check_row array
+ $result = $db->sql_query($retrieve_sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $check_rows[] = array_merge($row, array(
+ 'to' => explode(':', $row['to_address']),
+ 'bcc' => explode(':', $row['bcc_address']),
+ 'friend' => (isset($zebra[$row['author_id']])) ? $zebra[$row['author_id']]['friend'] : 0,
+ 'foe' => (isset($zebra[$row['author_id']])) ? $zebra[$row['author_id']]['foe'] : 0,
+ 'user_in_group' => array($user->data['group_id']),
+ 'author_in_group' => array())
+ );
+
+ $user_ids[] = $row['user_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // Retrieve user memberships
+ if (sizeof($user_ids))
+ {
+ $sql = 'SELECT *
+ FROM ' . USER_GROUP_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $user_ids) . '
+ AND user_pending = 0';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $memberships[$row['user_id']][] = $row['group_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ // Now place into the appropriate folder
+ foreach ($check_rows as $row)
+ {
+ // Add membership if set
+ if (isset($memberships[$row['author_id']]))
+ {
+ $row['author_in_group'] = $memberships[$row['user_id']];
+ }
+
+ // Check Rule - this should be very quick since we have all information we need
+ $is_match = false;
+ foreach ($user_rules as $rule_row)
+ {
+ if (($action = check_rule($global_privmsgs_rules, $rule_row, $row, $user_id)) !== false)
+ {
+ $is_match = true;
+ $action_ary[$row['msg_id']][] = $action;
+ }
+ }
+
+ if (!$is_match)
+ {
+ $action_ary[$row['msg_id']][] = array('action' => false);
+ }
+ }
+
+ unset($user_rules, $zebra, $check_rows, $user_ids, $memberships);
+ }
+
+ // We place actions into arrays, to save queries.
+ $sql = $unread_ids = $delete_ids = $important_ids = array();
+
+ foreach ($action_ary as $msg_id => $msg_ary)
+ {
+ // It is allowed to execute actions more than once, except placing messages into folder
+ $folder_action = $message_removed = false;
+
+ foreach ($msg_ary as $pos => $rule_ary)
+ {
+ if ($folder_action && $rule_ary['action'] == ACTION_PLACE_INTO_FOLDER)
+ {
+ continue;
+ }
+
+ switch ($rule_ary['action'])
+ {
+ case ACTION_PLACE_INTO_FOLDER:
+ // Folder actions have precedence, so we will remove any other ones
+ $folder_action = true;
+ $move_into_folder[(int) $rule_ary['folder_id']][] = $msg_id;
+ break;
+
+ case ACTION_MARK_AS_READ:
+ if ($rule_ary['pm_unread'])
+ {
+ $unread_ids[] = $msg_id;
+ }
+ break;
+
+ case ACTION_DELETE_MESSAGE:
+ $delete_ids[] = $msg_id;
+ $message_removed = true;
+ break;
+
+ case ACTION_MARK_AS_IMPORTANT:
+ if (!$rule_ary['pm_marked'])
+ {
+ $important_ids[] = $msg_id;
+ }
+ break;
+ }
+ }
+
+ // We place this here because it could happen that the messages are doubled if a rule marks a message and then moves it into a specific
+ // folder. Here we simply move the message into the INBOX if it gets not removed and also not put into a custom folder.
+ if (!$folder_action && !$message_removed)
+ {
+ $move_into_folder[PRIVMSGS_INBOX][] = $msg_id;
+ }
+ }
+
+ // Do not change the order of processing
+ // The number of queries needed to be executed here highly depends on the defined rules and are
+ // only gone through if new messages arrive.
+
+ // Delete messages
+ if (sizeof($delete_ids))
+ {
+ $num_removed += sizeof($delete_ids);
+ delete_pm($user_id, $delete_ids, PRIVMSGS_NO_BOX);
+ }
+
+ // Set messages to Unread
+ if (sizeof($unread_ids))
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
+ SET pm_unread = 0
+ WHERE ' . $db->sql_in_set('msg_id', $unread_ids) . "
+ AND user_id = $user_id
+ AND folder_id = " . PRIVMSGS_NO_BOX;
+ $db->sql_query($sql);
+ }
+
+ // mark messages as important
+ if (sizeof($important_ids))
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
+ SET pm_marked = 1 - pm_marked
+ WHERE folder_id = ' . PRIVMSGS_NO_BOX . "
+ AND user_id = $user_id
+ AND " . $db->sql_in_set('msg_id', $important_ids);
+ $db->sql_query($sql);
+ }
+
+ // Move into folder
+ $folder = array();
+
+ if (sizeof($move_into_folder))
+ {
+ // Determine Full Folder Action - we need the move to folder id later eventually
+ $full_folder_action = ($user->data['user_full_folder'] == FULL_FOLDER_NONE) ? ($config['full_folder_action'] - (FULL_FOLDER_NONE*(-1))) : $user->data['user_full_folder'];
+
+ $sql_folder = array_keys($move_into_folder);
+ if ($full_folder_action >= 0)
+ {
+ $sql_folder[] = $full_folder_action;
+ }
+
+ $sql = 'SELECT folder_id, pm_count
+ FROM ' . PRIVMSGS_FOLDER_TABLE . '
+ WHERE ' . $db->sql_in_set('folder_id', $sql_folder) . "
+ AND user_id = $user_id";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $folder[(int) $row['folder_id']] = (int) $row['pm_count'];
+ }
+ $db->sql_freeresult($result);
+
+ unset($sql_folder);
+
+ if (isset($move_into_folder[PRIVMSGS_INBOX]))
+ {
+ $sql = 'SELECT COUNT(msg_id) as num_messages
+ FROM ' . PRIVMSGS_TO_TABLE . "
+ WHERE user_id = $user_id
+ AND folder_id = " . PRIVMSGS_INBOX;
+ $result = $db->sql_query($sql);
+ $folder[PRIVMSGS_INBOX] = (int) $db->sql_fetchfield('num_messages');
+ $db->sql_freeresult($result);
+ }
+ }
+
+ // Here we have ideally only one folder to move into
+ foreach ($move_into_folder as $folder_id => $msg_ary)
+ {
+ $dest_folder = $folder_id;
+ $full_folder_action = FULL_FOLDER_NONE;
+
+ // Check Message Limit - we calculate with the complete array, most of the time it is one message
+ // But we are making sure that the other way around works too (more messages in queue than allowed to be stored)
+ if ($user->data['message_limit'] && $folder[$folder_id] && ($folder[$folder_id] + sizeof($msg_ary)) > $user->data['message_limit'])
+ {
+ $full_folder_action = ($user->data['user_full_folder'] == FULL_FOLDER_NONE) ? ($config['full_folder_action'] - (FULL_FOLDER_NONE*(-1))) : $user->data['user_full_folder'];
+
+ // If destination folder itself is full...
+ if ($full_folder_action >= 0 && ($folder[$full_folder_action] + sizeof($msg_ary)) > $user->data['message_limit'])
+ {
+ $full_folder_action = $config['full_folder_action'] - (FULL_FOLDER_NONE*(-1));
+ }
+
+ // If Full Folder Action is to move to another folder, we simply adjust the destination folder
+ if ($full_folder_action >= 0)
+ {
+ $dest_folder = $full_folder_action;
+ }
+ else if ($full_folder_action == FULL_FOLDER_DELETE)
+ {
+ // Delete some messages. NOTE: Ordered by msg_id here instead of message_time!
+ $sql = 'SELECT msg_id
+ FROM ' . PRIVMSGS_TO_TABLE . "
+ WHERE user_id = $user_id
+ AND folder_id = $dest_folder
+ ORDER BY msg_id ASC";
+ $result = $db->sql_query_limit($sql, (($folder[$dest_folder] + sizeof($msg_ary)) - $user->data['message_limit']));
+
+ $delete_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $delete_ids[] = $row['msg_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $num_removed += sizeof($delete_ids);
+ delete_pm($user_id, $delete_ids, $dest_folder);
+ }
+ }
+
+ //
+ if ($full_folder_action == FULL_FOLDER_HOLD)
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
+ SET folder_id = ' . PRIVMSGS_HOLD_BOX . '
+ WHERE folder_id = ' . PRIVMSGS_NO_BOX . "
+ AND user_id = $user_id
+ AND " . $db->sql_in_set('msg_id', $msg_ary);
+ $db->sql_query($sql);
+ }
+ else
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . "
+ SET folder_id = $dest_folder, pm_new = 0
+ WHERE folder_id = " . PRIVMSGS_NO_BOX . "
+ AND user_id = $user_id
+ AND pm_new = 1
+ AND " . $db->sql_in_set('msg_id', $msg_ary);
+ $db->sql_query($sql);
+
+ if ($dest_folder != PRIVMSGS_INBOX)
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_FOLDER_TABLE . '
+ SET pm_count = pm_count + ' . (int) $db->sql_affectedrows() . "
+ WHERE folder_id = $dest_folder
+ AND user_id = $user_id";
+ $db->sql_query($sql);
+ }
+ }
+ }
+
+ if (sizeof($action_ary))
+ {
+ // Move from OUTBOX to SENTBOX
+ // We are not checking any full folder status here... SENTBOX is a special treatment (old messages get deleted)
+ $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
+ SET folder_id = ' . PRIVMSGS_SENTBOX . '
+ WHERE folder_id = ' . PRIVMSGS_OUTBOX . '
+ AND ' . $db->sql_in_set('msg_id', array_keys($action_ary));
+ $db->sql_query($sql);
+ }
+
+ // Update new/unread count
+ update_pm_counts();
+
+ // Now check how many messages got not moved...
+ $sql = 'SELECT COUNT(msg_id) as num_messages
+ FROM ' . PRIVMSGS_TO_TABLE . "
+ WHERE user_id = $user_id
+ AND folder_id = " . PRIVMSGS_HOLD_BOX;
+ $result = $db->sql_query($sql);
+ $num_not_moved = (int) $db->sql_fetchfield('num_messages');
+ $db->sql_freeresult($result);
+
+ return array('not_moved' => $num_not_moved, 'removed' => $num_removed);
+}
+
+/**
+* Move PM from one to another folder
+*/
+function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_folder_id)
+{
+ global $db, $user;
+ global $phpbb_root_path, $phpEx;
+
+ $num_moved = 0;
+
+ if (!is_array($move_msg_ids))
+ {
+ $move_msg_ids = array($move_msg_ids);
+ }
+
+ if (sizeof($move_msg_ids) && !in_array($dest_folder, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX)) &&
+ !in_array($cur_folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)) && $cur_folder_id != $dest_folder)
+ {
+ // We have to check the destination folder ;)
+ if ($dest_folder != PRIVMSGS_INBOX)
+ {
+ $sql = 'SELECT folder_id, folder_name, pm_count
+ FROM ' . PRIVMSGS_FOLDER_TABLE . "
+ WHERE folder_id = $dest_folder
+ AND user_id = $user_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error('NOT_AUTHORISED');
+ }
+
+ if ($message_limit && $row['pm_count'] + sizeof($move_msg_ids) > $message_limit)
+ {
+ $message = sprintf($user->lang['NOT_ENOUGH_SPACE_FOLDER'], $row['folder_name']) . '<br /><br />';
+ $message .= sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=' . $row['folder_id']) . '">', '</a>', $row['folder_name']);
+ trigger_error($message);
+ }
+ }
+ else
+ {
+ $sql = 'SELECT COUNT(msg_id) as num_messages
+ FROM ' . PRIVMSGS_TO_TABLE . '
+ WHERE folder_id = ' . PRIVMSGS_INBOX . "
+ AND user_id = $user_id";
+ $result = $db->sql_query($sql);
+ $num_messages = (int) $db->sql_fetchfield('num_messages');
+ $db->sql_freeresult($result);
+
+ if ($message_limit && $num_messages + sizeof($move_msg_ids) > $message_limit)
+ {
+ $message = sprintf($user->lang['NOT_ENOUGH_SPACE_FOLDER'], $user->lang['PM_INBOX']) . '<br /><br />';
+ $message .= sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=inbox') . '">', '</a>', $user->lang['PM_INBOX']);
+ trigger_error($message);
+ }
+ }
+
+ $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . "
+ SET folder_id = $dest_folder
+ WHERE folder_id = $cur_folder_id
+ AND user_id = $user_id
+ AND " . $db->sql_in_set('msg_id', $move_msg_ids);
+ $db->sql_query($sql);
+ $num_moved = $db->sql_affectedrows();
+
+ // Update pm counts
+ if ($num_moved)
+ {
+ if (!in_array($cur_folder_id, array(PRIVMSGS_INBOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX)))
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_FOLDER_TABLE . "
+ SET pm_count = pm_count - $num_moved
+ WHERE folder_id = $cur_folder_id
+ AND user_id = $user_id";
+ $db->sql_query($sql);
+ }
+
+ if ($dest_folder != PRIVMSGS_INBOX)
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_FOLDER_TABLE . "
+ SET pm_count = pm_count + $num_moved
+ WHERE folder_id = $dest_folder
+ AND user_id = $user_id";
+ $db->sql_query($sql);
+ }
+ }
+ }
+ else if (in_array($cur_folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)))
+ {
+ trigger_error('CANNOT_MOVE_SPECIAL');
+ }
+
+ return $num_moved;
+}
+
+/**
+* Update unread message status
+*/
+function update_unread_status($unread, $msg_id, $user_id, $folder_id)
+{
+ if (!$unread)
+ {
+ return;
+ }
+
+ global $db, $user;
+
+ $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . "
+ SET pm_unread = 0
+ WHERE msg_id = $msg_id
+ AND user_id = $user_id
+ AND folder_id = $folder_id";
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_unread_privmsg = user_unread_privmsg - 1
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
+
+ if ($user->data['user_id'] == $user_id)
+ {
+ $user->data['user_unread_privmsg']--;
+
+ // Try to cope with previous wrong conversions...
+ if ($user->data['user_unread_privmsg'] < 0)
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_unread_privmsg = 0
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
+
+ $user->data['user_unread_privmsg'] = 0;
+ }
+ }
+}
+
+/**
+* Handle all actions possible with marked messages
+*/
+function handle_mark_actions($user_id, $mark_action)
+{
+ global $db, $user, $phpbb_root_path, $phpEx;
+
+ $msg_ids = request_var('marked_msg_id', array(0));
+ $cur_folder_id = request_var('cur_folder_id', PRIVMSGS_NO_BOX);
+ $confirm = (isset($_POST['confirm'])) ? true : false;
+
+ if (!sizeof($msg_ids))
+ {
+ return false;
+ }
+
+ switch ($mark_action)
+ {
+ case 'mark_important':
+
+ $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . "
+ SET pm_marked = 1 - pm_marked
+ WHERE folder_id = $cur_folder_id
+ AND user_id = $user_id
+ AND " . $db->sql_in_set('msg_id', $msg_ids);
+ $db->sql_query($sql);
+
+ break;
+
+ case 'delete_marked':
+
+ if (confirm_box(true))
+ {
+ delete_pm($user_id, $msg_ids, $cur_folder_id);
+
+ $success_msg = (sizeof($msg_ids) == 1) ? 'MESSAGE_DELETED' : 'MESSAGES_DELETED';
+ $redirect = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=' . $cur_folder_id);
+
+ meta_refresh(3, $redirect);
+ trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_FOLDER'], '<a href="' . $redirect . '">', '</a>'));
+ }
+ else
+ {
+ $s_hidden_fields = array(
+ 'cur_folder_id' => $cur_folder_id,
+ 'mark_option' => 'delete_marked',
+ 'submit_mark' => true,
+ 'marked_msg_id' => $msg_ids
+ );
+
+ confirm_box(false, 'DELETE_MARKED_PM', build_hidden_fields($s_hidden_fields));
+ }
+
+ break;
+
+ default:
+ return false;
+ }
+
+ return true;
+}
+
+/**
+* Delete PM(s)
+*/
+function delete_pm($user_id, $msg_ids, $folder_id)
+{
+ global $db, $user, $phpbb_root_path, $phpEx;
+
+ $user_id = (int) $user_id;
+ $folder_id = (int) $folder_id;
+
+ if (!$user_id)
+ {
+ return false;
+ }
+
+ if (!is_array($msg_ids))
+ {
+ if (!$msg_ids)
+ {
+ return false;
+ }
+ $msg_ids = array($msg_ids);
+ }
+
+ if (!sizeof($msg_ids))
+ {
+ return false;
+ }
+
+ // Get PM Information for later deleting
+ $sql = 'SELECT msg_id, pm_unread, pm_new
+ FROM ' . PRIVMSGS_TO_TABLE . '
+ WHERE ' . $db->sql_in_set('msg_id', array_map('intval', $msg_ids)) . "
+ AND folder_id = $folder_id
+ AND user_id = $user_id";
+ $result = $db->sql_query($sql);
+
+ $delete_rows = array();
+ $num_unread = $num_new = $num_deleted = 0;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $num_unread += (int) $row['pm_unread'];
+ $num_new += (int) $row['pm_new'];
+
+ $delete_rows[$row['msg_id']] = 1;
+ }
+ $db->sql_freeresult($result);
+ unset($msg_ids);
+
+ if (!sizeof($delete_rows))
+ {
+ return false;
+ }
+
+ $db->sql_transaction('begin');
+
+ // if no one has read the message yet (meaning it is in users outbox)
+ // then mark the message as deleted...
+ if ($folder_id == PRIVMSGS_OUTBOX)
+ {
+ // Remove PM from Outbox
+ $sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . "
+ WHERE user_id = $user_id AND folder_id = " . PRIVMSGS_OUTBOX . '
+ AND ' . $db->sql_in_set('msg_id', array_keys($delete_rows));
+ $db->sql_query($sql);
+
+ // Update PM Information for safety
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET message_text = ''
+ WHERE " . $db->sql_in_set('msg_id', array_keys($delete_rows));
+ $db->sql_query($sql);
+
+ // Set delete flag for those intended to receive the PM
+ // We do not remove the message actually, to retain some basic information (sent time for example)
+ $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
+ SET pm_deleted = 1
+ WHERE ' . $db->sql_in_set('msg_id', array_keys($delete_rows));
+ $db->sql_query($sql);
+
+ $num_deleted = $db->sql_affectedrows();
+ }
+ else
+ {
+ // Delete private message data
+ $sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . "
+ WHERE user_id = $user_id
+ AND folder_id = $folder_id
+ AND " . $db->sql_in_set('msg_id', array_keys($delete_rows));
+ $db->sql_query($sql);
+ $num_deleted = $db->sql_affectedrows();
+ }
+
+ // if folder id is user defined folder then decrease pm_count
+ if (!in_array($folder_id, array(PRIVMSGS_INBOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX, PRIVMSGS_NO_BOX)))
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_FOLDER_TABLE . "
+ SET pm_count = pm_count - $num_deleted
+ WHERE folder_id = $folder_id";
+ $db->sql_query($sql);
+ }
+
+ // Update unread and new status field
+ if ($num_unread || $num_new)
+ {
+ $set_sql = ($num_unread) ? 'user_unread_privmsg = user_unread_privmsg - ' . $num_unread : '';
+
+ if ($num_new)
+ {
+ $set_sql .= ($set_sql != '') ? ', ' : '';
+ $set_sql .= 'user_new_privmsg = user_new_privmsg - ' . $num_new;
+ }
+
+ $db->sql_query('UPDATE ' . USERS_TABLE . " SET $set_sql WHERE user_id = $user_id");
+
+ $user->data['user_new_privmsg'] -= $num_new;
+ $user->data['user_unread_privmsg'] -= $num_unread;
+ }
+
+ // Now we have to check which messages we can delete completely
+ $sql = 'SELECT msg_id
+ FROM ' . PRIVMSGS_TO_TABLE . '
+ WHERE ' . $db->sql_in_set('msg_id', array_keys($delete_rows));
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ unset($delete_rows[$row['msg_id']]);
+ }
+ $db->sql_freeresult($result);
+
+ $delete_ids = array_keys($delete_rows);
+
+ if (sizeof($delete_ids))
+ {
+ // Check if there are any attachments we need to remove
+ if (!function_exists('delete_attachments'))
+ {
+ include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+ }
+
+ delete_attachments('message', $delete_ids, false);
+
+ $sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
+ WHERE ' . $db->sql_in_set('msg_id', $delete_ids);
+ $db->sql_query($sql);
+ }
+
+ $db->sql_transaction('commit');
+
+ return true;
+}
+
+/**
+* Rebuild message header
+*/
+function rebuild_header($check_ary)
+{
+ global $db;
+
+ $address = array();
+
+ foreach ($check_ary as $check_type => $address_field)
+ {
+ // Split Addresses into users and groups
+ preg_match_all('/:?(u|g)_([0-9]+):?/', $address_field, $match);
+
+ $u = $g = array();
+ foreach ($match[1] as $id => $type)
+ {
+ ${$type}[] = (int) $match[2][$id];
+ }
+
+ $_types = array('u', 'g');
+ foreach ($_types as $type)
+ {
+ if (sizeof($$type))
+ {
+ foreach ($$type as $id)
+ {
+ $address[$type][$id] = $check_type;
+ }
+ }
+ }
+ }
+
+ return $address;
+}
+
+/**
+* Print out/assign recipient information
+*/
+function write_pm_addresses($check_ary, $author_id, $plaintext = false)
+{
+ global $db, $user, $template, $phpbb_root_path, $phpEx;
+
+ $addresses = array();
+
+ foreach ($check_ary as $check_type => $address_field)
+ {
+ if (!is_array($address_field))
+ {
+ // Split Addresses into users and groups
+ preg_match_all('/:?(u|g)_([0-9]+):?/', $address_field, $match);
+
+ $u = $g = array();
+ foreach ($match[1] as $id => $type)
+ {
+ ${$type}[] = (int) $match[2][$id];
+ }
+ }
+ else
+ {
+ $u = $address_field['u'];
+ $g = $address_field['g'];
+ }
+
+ $address = array();
+ if (sizeof($u))
+ {
+ $sql = 'SELECT user_id, username, user_colour
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $u);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($check_type == 'to' || $author_id == $user->data['user_id'] || $row['user_id'] == $user->data['user_id'])
+ {
+ if ($plaintext)
+ {
+ $address[] = $row['username'];
+ }
+ else
+ {
+ $address['user'][$row['user_id']] = array('name' => $row['username'], 'colour' => $row['user_colour']);
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (sizeof($g))
+ {
+ if ($plaintext)
+ {
+ $sql = 'SELECT group_name, group_type
+ FROM ' . GROUPS_TABLE . '
+ WHERE ' . $db->sql_in_set('group_id', $g);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($check_type == 'to' || $author_id == $user->data['user_id'] || $row['user_id'] == $user->data['user_id'])
+ {
+ $address[] = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type, ug.user_id
+ FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . ' ug
+ WHERE ' . $db->sql_in_set('g.group_id', $g) . '
+ AND g.group_id = ug.group_id
+ AND ug.user_pending = 0';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!isset($address['group'][$row['group_id']]))
+ {
+ if ($check_type == 'to' || $author_id == $user->data['user_id'] || $row['user_id'] == $user->data['user_id'])
+ {
+ $row['group_name'] = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
+ $address['group'][$row['group_id']] = array('name' => $row['group_name'], 'colour' => $row['group_colour']);
+ }
+ }
+
+ if (isset($address['user'][$row['user_id']]))
+ {
+ $address['user'][$row['user_id']]['in_group'] = $row['group_id'];
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+ }
+
+ if (sizeof($address) && !$plaintext)
+ {
+ $template->assign_var('S_' . strtoupper($check_type) . '_RECIPIENT', true);
+
+ foreach ($address as $type => $adr_ary)
+ {
+ foreach ($adr_ary as $id => $row)
+ {
+ $tpl_ary = array(
+ 'IS_GROUP' => ($type == 'group') ? true : false,
+ 'IS_USER' => ($type == 'user') ? true : false,
+ 'UG_ID' => $id,
+ 'NAME' => $row['name'],
+ 'COLOUR' => ($row['colour']) ? '#' . $row['colour'] : '',
+ 'TYPE' => $type,
+ );
+
+ if ($type == 'user')
+ {
+ $tpl_ary = array_merge($tpl_ary, array(
+ 'U_VIEW' => get_username_string('profile', $id, $row['name'], $row['colour']),
+ 'NAME_FULL' => get_username_string('full', $id, $row['name'], $row['colour']),
+ ));
+ }
+ else
+ {
+ $tpl_ary = array_merge($tpl_ary, array(
+ 'U_VIEW' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $id),
+ ));
+ }
+
+ $template->assign_block_vars($check_type . '_recipient', $tpl_ary);
+ }
+ }
+ }
+
+ $addresses[$check_type] = $address;
+ }
+
+ return $addresses;
+}
+
+/**
+* Get folder status
+*/
+function get_folder_status($folder_id, $folder)
+{
+ global $db, $user, $config;
+
+ if (isset($folder[$folder_id]))
+ {
+ $folder = $folder[$folder_id];
+ }
+ else
+ {
+ return false;
+ }
+
+ $return = array(
+ 'folder_name' => $folder['folder_name'],
+ 'cur' => $folder['num_messages'],
+ 'remaining' => ($user->data['message_limit']) ? $user->data['message_limit'] - $folder['num_messages'] : 0,
+ 'max' => $user->data['message_limit'],
+ 'percent' => ($user->data['message_limit']) ? (($user->data['message_limit'] > 0) ? round(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100) : 0,
+ );
+
+ $return['message'] = sprintf($user->lang['FOLDER_STATUS_MSG'], $return['percent'], $return['cur'], $return['max']);
+
+ return $return;
+}
+
+//
+// COMPOSE MESSAGES
+//
+
+/**
+* Submit PM
+*/
+function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
+{
+ global $db, $auth, $config, $phpEx, $template, $user, $phpbb_root_path;
+
+ // We do not handle erasing pms here
+ if ($mode == 'delete')
+ {
+ return false;
+ }
+
+ $current_time = time();
+
+ // Collect some basic information about which tables and which rows to update/insert
+ $sql_data = array();
+ $root_level = 0;
+
+ // Recipient Information
+ $recipients = $to = $bcc = array();
+
+ if ($mode != 'edit')
+ {
+ // Build Recipient List
+ // u|g => array($user_id => 'to'|'bcc')
+ $_types = array('u', 'g');
+ foreach ($_types as $ug_type)
+ {
+ if (isset($data['address_list'][$ug_type]) && sizeof($data['address_list'][$ug_type]))
+ {
+ foreach ($data['address_list'][$ug_type] as $id => $field)
+ {
+ $id = (int) $id;
+
+ // Do not rely on the address list being "valid"
+ if (!$id || ($ug_type == 'u' && $id == ANONYMOUS))
+ {
+ continue;
+ }
+
+ $field = ($field == 'to') ? 'to' : 'bcc';
+ if ($ug_type == 'u')
+ {
+ $recipients[$id] = $field;
+ }
+ ${$field}[] = $ug_type . '_' . $id;
+ }
+ }
+ }
+
+ if (isset($data['address_list']['g']) && sizeof($data['address_list']['g']))
+ {
+ // We need to check the PM status of group members (do they want to receive PM's?)
+ // Only check if not a moderator or admin, since they are allowed to override this user setting
+ $sql_allow_pm = (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) ? ' AND u.user_allow_pm = 1' : '';
+
+ $sql = 'SELECT u.user_type, ug.group_id, ug.user_id
+ FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . ' ug
+ WHERE ' . $db->sql_in_set('ug.group_id', array_keys($data['address_list']['g'])) . '
+ AND ug.user_pending = 0
+ AND u.user_id = ug.user_id
+ AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')' .
+ $sql_allow_pm;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // Additionally, do not include the sender if he is in the group he wants to send to. ;)
+ if ($row['user_id'] === $user->data['user_id'])
+ {
+ continue;
+ }
+
+ $field = ($data['address_list']['g'][$row['group_id']] == 'to') ? 'to' : 'bcc';
+ $recipients[$row['user_id']] = $field;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (!sizeof($recipients))
+ {
+ trigger_error('NO_RECIPIENT');
+ }
+ }
+
+ $db->sql_transaction('begin');
+
+ $sql = '';
+
+ switch ($mode)
+ {
+ case 'reply':
+ case 'quote':
+ $root_level = ($data['reply_from_root_level']) ? $data['reply_from_root_level'] : $data['reply_from_msg_id'];
+
+ // Set message_replied switch for this user
+ $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
+ SET pm_replied = 1
+ WHERE user_id = ' . $data['from_user_id'] . '
+ AND msg_id = ' . $data['reply_from_msg_id'];
+
+ // no break
+
+ case 'forward':
+ case 'post':
+ case 'quotepost':
+ $sql_data = array(
+ 'root_level' => $root_level,
+ 'author_id' => $data['from_user_id'],
+ 'icon_id' => $data['icon_id'],
+ 'author_ip' => $data['from_user_ip'],
+ 'message_time' => $current_time,
+ 'enable_bbcode' => $data['enable_bbcode'],
+ 'enable_smilies' => $data['enable_smilies'],
+ 'enable_magic_url' => $data['enable_urls'],
+ 'enable_sig' => $data['enable_sig'],
+ 'message_subject' => $subject,
+ 'message_text' => $data['message'],
+ 'message_attachment'=> (!empty($data['attachment_data'])) ? 1 : 0,
+ 'bbcode_bitfield' => $data['bbcode_bitfield'],
+ 'bbcode_uid' => $data['bbcode_uid'],
+ 'to_address' => implode(':', $to),
+ 'bcc_address' => implode(':', $bcc),
+ 'message_reported' => 0,
+ );
+ break;
+
+ case 'edit':
+ $sql_data = array(
+ 'icon_id' => $data['icon_id'],
+ 'message_edit_time' => $current_time,
+ 'enable_bbcode' => $data['enable_bbcode'],
+ 'enable_smilies' => $data['enable_smilies'],
+ 'enable_magic_url' => $data['enable_urls'],
+ 'enable_sig' => $data['enable_sig'],
+ 'message_subject' => $subject,
+ 'message_text' => $data['message'],
+ 'message_attachment'=> (!empty($data['attachment_data'])) ? 1 : 0,
+ 'bbcode_bitfield' => $data['bbcode_bitfield'],
+ 'bbcode_uid' => $data['bbcode_uid']
+ );
+ break;
+ }
+
+ if (sizeof($sql_data))
+ {
+ $query = '';
+
+ if ($mode == 'post' || $mode == 'reply' || $mode == 'quote' || $mode == 'quotepost' || $mode == 'forward')
+ {
+ $db->sql_query('INSERT INTO ' . PRIVMSGS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_data));
+ $data['msg_id'] = $db->sql_nextid();
+ }
+ else if ($mode == 'edit')
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . '
+ SET message_edit_count = message_edit_count + 1, ' . $db->sql_build_array('UPDATE', $sql_data) . '
+ WHERE msg_id = ' . $data['msg_id'];
+ $db->sql_query($sql);
+ }
+ }
+
+ if ($mode != 'edit')
+ {
+ if ($sql)
+ {
+ $db->sql_query($sql);
+ }
+ unset($sql);
+
+ $sql_ary = array();
+ foreach ($recipients as $user_id => $type)
+ {
+ $sql_ary[] = array(
+ 'msg_id' => (int) $data['msg_id'],
+ 'user_id' => (int) $user_id,
+ 'author_id' => (int) $data['from_user_id'],
+ 'folder_id' => PRIVMSGS_NO_BOX,
+ 'pm_new' => 1,
+ 'pm_unread' => 1,
+ 'pm_forwarded' => ($mode == 'forward') ? 1 : 0
+ );
+ }
+
+ $db->sql_multi_insert(PRIVMSGS_TO_TABLE, $sql_ary);
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_new_privmsg = user_new_privmsg + 1, user_unread_privmsg = user_unread_privmsg + 1, user_last_privmsg = ' . time() . '
+ WHERE ' . $db->sql_in_set('user_id', array_keys($recipients));
+ $db->sql_query($sql);
+
+ // Put PM into outbox
+ if ($put_in_outbox)
+ {
+ $db->sql_query('INSERT INTO ' . PRIVMSGS_TO_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'msg_id' => (int) $data['msg_id'],
+ 'user_id' => (int) $data['from_user_id'],
+ 'author_id' => (int) $data['from_user_id'],
+ 'folder_id' => PRIVMSGS_OUTBOX,
+ 'pm_new' => 0,
+ 'pm_unread' => 0,
+ 'pm_forwarded' => ($mode == 'forward') ? 1 : 0))
+ );
+ }
+ }
+
+ // Set user last post time
+ if ($mode == 'reply' || $mode == 'quote' || $mode == 'quotepost' || $mode == 'forward' || $mode == 'post')
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_lastpost_time = $current_time
+ WHERE user_id = " . $data['from_user_id'];
+ $db->sql_query($sql);
+ }
+
+ // Submit Attachments
+ if (!empty($data['attachment_data']) && $data['msg_id'] && in_array($mode, array('post', 'reply', 'quote', 'quotepost', 'edit', 'forward')))
+ {
+ $space_taken = $files_added = 0;
+ $orphan_rows = array();
+
+ foreach ($data['attachment_data'] as $pos => $attach_row)
+ {
+ $orphan_rows[(int) $attach_row['attach_id']] = array();
+ }
+
+ if (sizeof($orphan_rows))
+ {
+ $sql = 'SELECT attach_id, filesize, physical_filename
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('attach_id', array_keys($orphan_rows)) . '
+ AND in_message = 1
+ AND is_orphan = 1
+ AND poster_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+
+ $orphan_rows = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $orphan_rows[$row['attach_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ foreach ($data['attachment_data'] as $pos => $attach_row)
+ {
+ if ($attach_row['is_orphan'] && !isset($orphan_rows[$attach_row['attach_id']]))
+ {
+ continue;
+ }
+
+ if (!$attach_row['is_orphan'])
+ {
+ // update entry in db if attachment already stored in db and filespace
+ $sql = 'UPDATE ' . ATTACHMENTS_TABLE . "
+ SET attach_comment = '" . $db->sql_escape($attach_row['attach_comment']) . "'
+ WHERE attach_id = " . (int) $attach_row['attach_id'] . '
+ AND is_orphan = 0';
+ $db->sql_query($sql);
+ }
+ else
+ {
+ // insert attachment into db
+ if (!@file_exists($phpbb_root_path . $config['upload_path'] . '/' . utf8_basename($orphan_rows[$attach_row['attach_id']]['physical_filename'])))
+ {
+ continue;
+ }
+
+ $space_taken += $orphan_rows[$attach_row['attach_id']]['filesize'];
+ $files_added++;
+
+ $attach_sql = array(
+ 'post_msg_id' => $data['msg_id'],
+ 'topic_id' => 0,
+ 'is_orphan' => 0,
+ 'poster_id' => $data['from_user_id'],
+ 'attach_comment' => $attach_row['attach_comment'],
+ );
+
+ $sql = 'UPDATE ' . ATTACHMENTS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $attach_sql) . '
+ WHERE attach_id = ' . $attach_row['attach_id'] . '
+ AND is_orphan = 1
+ AND poster_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+ }
+ }
+
+ if ($space_taken && $files_added)
+ {
+ set_config_count('upload_dir_size', $space_taken, true);
+ set_config_count('num_files', $files_added, true);
+ }
+ }
+
+ // Delete draft if post was loaded...
+ $draft_id = request_var('draft_loaded', 0);
+ if ($draft_id)
+ {
+ $sql = 'DELETE FROM ' . DRAFTS_TABLE . "
+ WHERE draft_id = $draft_id
+ AND user_id = " . $data['from_user_id'];
+ $db->sql_query($sql);
+ }
+
+ $db->sql_transaction('commit');
+
+ // Send Notifications
+ if ($mode != 'edit')
+ {
+ pm_notification($mode, $data['from_username'], $recipients, $subject, $data['message']);
+ }
+
+ return $data['msg_id'];
+}
+
+/**
+* PM Notification
+*/
+function pm_notification($mode, $author, $recipients, $subject, $message)
+{
+ global $db, $user, $config, $phpbb_root_path, $phpEx, $auth;
+
+ $subject = censor_text($subject);
+
+ unset($recipients[ANONYMOUS], $recipients[$user->data['user_id']]);
+
+ if (!sizeof($recipients))
+ {
+ return;
+ }
+
+ // Get banned User ID's
+ $sql = 'SELECT ban_userid
+ FROM ' . BANLIST_TABLE . '
+ WHERE ' . $db->sql_in_set('ban_userid', array_map('intval', array_keys($recipients))) . '
+ AND ban_exclude = 0';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ unset($recipients[$row['ban_userid']]);
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($recipients))
+ {
+ return;
+ }
+
+ $sql = 'SELECT user_id, username, user_email, user_lang, user_notify_pm, user_notify_type, user_jabber
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', array_map('intval', array_keys($recipients)));
+ $result = $db->sql_query($sql);
+
+ $msg_list_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['user_notify_pm'] == 1 && trim($row['user_email']))
+ {
+ $msg_list_ary[] = array(
+ 'method' => $row['user_notify_type'],
+ 'email' => $row['user_email'],
+ 'jabber' => $row['user_jabber'],
+ 'name' => $row['username'],
+ 'lang' => $row['user_lang']
+ );
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($msg_list_ary))
+ {
+ return;
+ }
+
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ $messenger = new messenger();
+
+ foreach ($msg_list_ary as $pos => $addr)
+ {
+ $messenger->template('privmsg_notify', $addr['lang']);
+
+ $messenger->to($addr['email'], $addr['name']);
+ $messenger->im($addr['jabber'], $addr['name']);
+
+ $messenger->assign_vars(array(
+ 'SUBJECT' => htmlspecialchars_decode($subject),
+ 'AUTHOR_NAME' => htmlspecialchars_decode($author),
+ 'USERNAME' => htmlspecialchars_decode($addr['name']),
+
+ 'U_INBOX' => generate_board_url() . "/ucp.$phpEx?i=pm&folder=inbox")
+ );
+
+ $messenger->send($addr['method']);
+ }
+ unset($msg_list_ary);
+
+ $messenger->save_queue();
+
+ unset($messenger);
+}
+
+/**
+* Display Message History
+*/
+function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode = false)
+{
+ global $db, $user, $config, $template, $phpbb_root_path, $phpEx, $auth, $bbcode;
+
+ // Select all receipts and the author from the pm we currently view, to only display their pm-history
+ $sql = 'SELECT author_id, user_id
+ FROM ' . PRIVMSGS_TO_TABLE . "
+ WHERE msg_id = $msg_id
+ AND folder_id <> " . PRIVMSGS_HOLD_BOX;
+ $result = $db->sql_query($sql);
+
+ $recipients = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $recipients[] = (int) $row['user_id'];
+ $recipients[] = (int) $row['author_id'];
+ }
+ $db->sql_freeresult($result);
+ $recipients = array_unique($recipients);
+
+ // Get History Messages (could be newer)
+ $sql = 'SELECT t.*, p.*, u.*
+ FROM ' . PRIVMSGS_TABLE . ' p, ' . PRIVMSGS_TO_TABLE . ' t, ' . USERS_TABLE . ' u
+ WHERE t.msg_id = p.msg_id
+ AND p.author_id = u.user_id
+ AND t.folder_id NOT IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ')
+ AND ' . $db->sql_in_set('t.author_id', $recipients, false, true) . "
+ AND t.user_id = $user_id";
+
+ // We no longer need those.
+ unset($recipients);
+
+ if (!$message_row['root_level'])
+ {
+ $sql .= " AND (p.root_level = $msg_id OR (p.root_level = 0 AND p.msg_id = $msg_id))";
+ }
+ else
+ {
+ $sql .= " AND (p.root_level = " . $message_row['root_level'] . ' OR p.msg_id = ' . $message_row['root_level'] . ')';
+ }
+ $sql .= ' ORDER BY p.message_time DESC';
+
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+
+ if (!$row)
+ {
+ $db->sql_freeresult($result);
+ return false;
+ }
+
+ $rowset = array();
+ $bbcode_bitfield = '';
+ $folder_url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm') . '&amp;folder=';
+
+ do
+ {
+ $folder_id = (int) $row['folder_id'];
+
+ $row['folder'][] = (isset($folder[$folder_id])) ? '<a href="' . $folder_url . $folder_id . '">' . $folder[$folder_id]['folder_name'] . '</a>' : $user->lang['UNKNOWN_FOLDER'];
+
+ if (isset($rowset[$row['msg_id']]))
+ {
+ $rowset[$row['msg_id']]['folder'][] = (isset($folder[$folder_id])) ? '<a href="' . $folder_url . $folder_id . '">' . $folder[$folder_id]['folder_name'] . '</a>' : $user->lang['UNKNOWN_FOLDER'];
+ }
+ else
+ {
+ $rowset[$row['msg_id']] = $row;
+ $bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
+ }
+ }
+ while ($row = $db->sql_fetchrow($result));
+ $db->sql_freeresult($result);
+
+ $title = $row['message_subject'];
+
+ if (sizeof($rowset) == 1 && !$in_post_mode)
+ {
+ return false;
+ }
+
+ // Instantiate BBCode class
+ if ((empty($bbcode) || $bbcode === false) && $bbcode_bitfield !== '')
+ {
+ if (!class_exists('bbcode'))
+ {
+ include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+ }
+ $bbcode = new bbcode(base64_encode($bbcode_bitfield));
+ }
+
+ $title = censor_text($title);
+
+ $url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm');
+ $next_history_pm = $previous_history_pm = $prev_id = 0;
+
+ // Re-order rowset to be able to get the next/prev message rows...
+ $rowset = array_values($rowset);
+
+ for ($i = 0, $size = sizeof($rowset); $i < $size; $i++)
+ {
+ $row = &$rowset[$i];
+ $id = (int) $row['msg_id'];
+
+ $author_id = $row['author_id'];
+ $folder_id = (int) $row['folder_id'];
+
+ $subject = $row['message_subject'];
+ $message = $row['message_text'];
+
+ $message = censor_text($message);
+
+ $decoded_message = false;
+
+ if ($in_post_mode && $auth->acl_get('u_sendpm') && $author_id != ANONYMOUS)
+ {
+ $decoded_message = $message;
+ decode_message($decoded_message, $row['bbcode_uid']);
+
+ $decoded_message = bbcode_nl2br($decoded_message);
+ }
+
+ if ($row['bbcode_bitfield'])
+ {
+ $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
+ }
+
+ $message = bbcode_nl2br($message);
+ $message = smiley_text($message, !$row['enable_smilies']);
+
+ $subject = censor_text($subject);
+
+ if ($id == $msg_id)
+ {
+ $next_history_pm = (isset($rowset[$i + 1])) ? (int) $rowset[$i + 1]['msg_id'] : 0;
+ $previous_history_pm = $prev_id;
+ }
+
+ $template->assign_block_vars('history_row', array(
+ 'MESSAGE_AUTHOR_QUOTE' => (($decoded_message) ? addslashes(get_username_string('username', $author_id, $row['username'], $row['user_colour'], $row['username'])) : ''),
+ 'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $row['username'], $row['user_colour'], $row['username']),
+ 'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $row['username'], $row['user_colour'], $row['username']),
+ 'MESSAGE_AUTHOR' => get_username_string('username', $author_id, $row['username'], $row['user_colour'], $row['username']),
+ 'U_MESSAGE_AUTHOR' => get_username_string('profile', $author_id, $row['username'], $row['user_colour'], $row['username']),
+
+ 'SUBJECT' => $subject,
+ 'SENT_DATE' => $user->format_date($row['message_time']),
+ 'MESSAGE' => $message,
+ 'FOLDER' => implode(', ', $row['folder']),
+ 'DECODED_MESSAGE' => $decoded_message,
+
+ 'S_CURRENT_MSG' => ($row['msg_id'] == $msg_id),
+ 'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false,
+ 'S_IN_POST_MODE' => $in_post_mode,
+
+ 'MSG_ID' => $row['msg_id'],
+ 'U_VIEW_MESSAGE' => "$url&amp;f=$folder_id&amp;p=" . $row['msg_id'],
+ 'U_QUOTE' => (!$in_post_mode && $auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&amp;mode=compose&amp;action=quote&amp;f=" . $folder_id . "&amp;p=" . $row['msg_id'] : '',
+ 'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $author_id != ANONYMOUS && $auth->acl_get('u_sendpm')) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;p=" . $row['msg_id'] : '')
+ );
+ unset($rowset[$i]);
+ $prev_id = $id;
+ }
+
+ $template->assign_vars(array(
+ 'QUOTE_IMG' => $user->img('icon_post_quote', $user->lang['REPLY_WITH_QUOTE']),
+ 'HISTORY_TITLE' => $title,
+
+ 'U_VIEW_NEXT_HISTORY' => ($next_history_pm) ? "$url&amp;p=" . $next_history_pm : '',
+ 'U_VIEW_PREVIOUS_HISTORY' => ($previous_history_pm) ? "$url&amp;p=" . $previous_history_pm : '',
+ ));
+
+ return true;
+}
+
+/**
+* Set correct users max messages in PM folder.
+* If several group memberships define different amount of messages, the highest will be chosen.
+*/
+function set_user_message_limit()
+{
+ global $user, $db, $config;
+
+ // Get maximum about from user memberships - if it is 0, there is no limit set and we use the maximum value within the config.
+ $sql = 'SELECT MAX(g.group_message_limit) as max_message_limit
+ FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . ' ug
+ WHERE ug.user_id = ' . $user->data['user_id'] . '
+ AND ug.user_pending = 0
+ AND ug.group_id = g.group_id';
+ $result = $db->sql_query($sql);
+ $message_limit = (int) $db->sql_fetchfield('max_message_limit');
+ $db->sql_freeresult($result);
+
+ $user->data['message_limit'] = (!$message_limit) ? $config['pm_max_msgs'] : $message_limit;
+}
+
+/**
+* Generates an array of coloured recipient names from a list of PMs - (groups & users)
+*
+* @param array $pm_by_id An array of rows from PRIVMSGS_TABLE, keys are the msg_ids.
+*
+* @return array 2D Array: array(msg_id => array('username or group string', ...), ...)
+* Usernames are generated with {@link get_username_string get_username_string}
+* Groups are coloured and have a link to the membership page
+*/
+function get_recipient_strings($pm_by_id)
+{
+ global $db, $phpbb_root_path, $phpEx, $user;
+
+ $address_list = $recipient_list = $address = array();
+
+ $_types = array('u', 'g');
+
+ foreach ($pm_by_id as $message_id => $row)
+ {
+ $address[$message_id] = rebuild_header(array('to' => $row['to_address'], 'bcc' => $row['bcc_address']));
+
+ foreach ($_types as $ug_type)
+ {
+ if (isset($address[$message_id][$ug_type]) && sizeof($address[$message_id][$ug_type]))
+ {
+ foreach ($address[$message_id][$ug_type] as $ug_id => $in_to)
+ {
+ $recipient_list[$ug_type][$ug_id] = array('name' => $user->lang['NA'], 'colour' => '');
+ }
+ }
+ }
+ }
+
+ foreach ($_types as $ug_type)
+ {
+ if (!empty($recipient_list[$ug_type]))
+ {
+ if ($ug_type == 'u')
+ {
+ $sql = 'SELECT user_id as id, username as name, user_colour as colour
+ FROM ' . USERS_TABLE . '
+ WHERE ';
+ }
+ else
+ {
+ $sql = 'SELECT group_id as id, group_name as name, group_colour as colour, group_type
+ FROM ' . GROUPS_TABLE . '
+ WHERE ';
+ }
+ $sql .= $db->sql_in_set(($ug_type == 'u') ? 'user_id' : 'group_id', array_map('intval', array_keys($recipient_list[$ug_type])));
+
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($ug_type == 'g')
+ {
+ $row['name'] = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['name']] : $row['name'];
+ }
+
+ $recipient_list[$ug_type][$row['id']] = array('name' => $row['name'], 'colour' => $row['colour']);
+ }
+ $db->sql_freeresult($result);
+ }
+ }
+
+ foreach ($address as $message_id => $adr_ary)
+ {
+ foreach ($adr_ary as $type => $id_ary)
+ {
+ foreach ($id_ary as $ug_id => $_id)
+ {
+ if ($type == 'u')
+ {
+ $address_list[$message_id][] = get_username_string('full', $ug_id, $recipient_list[$type][$ug_id]['name'], $recipient_list[$type][$ug_id]['colour']);
+ }
+ else
+ {
+ $user_colour = ($recipient_list[$type][$ug_id]['colour']) ? ' style="font-weight: bold; color:#' . $recipient_list[$type][$ug_id]['colour'] . '"' : '';
+ $link = '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $ug_id) . '"' . $user_colour . '>';
+ $address_list[$message_id][] = $link . $recipient_list[$type][$ug_id]['name'] . (($link) ? '</a>' : '');
+ }
+ }
+ }
+ }
+
+ return $address_list;
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
new file mode 100644
index 0000000000..9e356414a9
--- /dev/null
+++ b/phpBB/includes/functions_profile_fields.php
@@ -0,0 +1,1143 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Custom Profile Fields
+* @package phpBB3
+*/
+class custom_profile
+{
+ var $profile_types = array(FIELD_INT => 'int', FIELD_STRING => 'string', FIELD_TEXT => 'text', FIELD_BOOL => 'bool', FIELD_DROPDOWN => 'dropdown', FIELD_DATE => 'date');
+ var $profile_cache = array();
+ var $options_lang = array();
+
+ /**
+ * Assign editable fields to template, mode can be profile (for profile change) or register (for registration)
+ * Called by ucp_profile and ucp_register
+ * @access public
+ */
+ function generate_profile_fields($mode, $lang_id)
+ {
+ global $db, $template, $auth;
+
+ $sql_where = '';
+ switch ($mode)
+ {
+ case 'register':
+ // If the field is required we show it on the registration page
+ $sql_where .= ' AND f.field_show_on_reg = 1';
+ break;
+
+ case 'profile':
+ // Show hidden fields to moderators/admins
+ if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
+ {
+ $sql_where .= ' AND f.field_show_profile = 1';
+ }
+ break;
+
+ default:
+ trigger_error('Wrong profile mode specified', E_USER_ERROR);
+ break;
+ }
+
+ $sql = 'SELECT l.*, f.*
+ FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . " f
+ WHERE f.field_active = 1
+ $sql_where
+ AND l.lang_id = $lang_id
+ AND l.field_id = f.field_id
+ ORDER BY f.field_order";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // Return templated field
+ $tpl_snippet = $this->process_field_row('change', $row);
+
+ // Some types are multivalue, we can't give them a field_id as we would not know which to pick
+ $type = (int) $row['field_type'];
+
+ $template->assign_block_vars('profile_fields', array(
+ 'LANG_NAME' => $row['lang_name'],
+ 'LANG_EXPLAIN' => $row['lang_explain'],
+ 'FIELD' => $tpl_snippet,
+ 'FIELD_ID' => ($type == FIELD_DATE || ($type == FIELD_BOOL && $row['field_length'] == '1')) ? '' : 'pf_' . $row['field_ident'],
+ 'S_REQUIRED' => ($row['field_required']) ? true : false)
+ );
+ }
+ $db->sql_freeresult($result);
+ }
+
+ /**
+ * Validate entered profile field data
+ * @access public
+ */
+ function validate_profile_field($field_type, &$field_value, $field_data)
+ {
+ switch ($field_type)
+ {
+ case FIELD_DATE:
+ $field_validate = explode('-', $field_value);
+
+ $day = (isset($field_validate[0])) ? (int) $field_validate[0] : 0;
+ $month = (isset($field_validate[1])) ? (int) $field_validate[1] : 0;
+ $year = (isset($field_validate[2])) ? (int) $field_validate[2] : 0;
+
+ if ((!$day || !$month || !$year) && !$field_data['field_required'])
+ {
+ return false;
+ }
+
+ if ((!$day || !$month || !$year) && $field_data['field_required'])
+ {
+ return 'FIELD_REQUIRED';
+ }
+
+ if ($day < 0 || $day > 31 || $month < 0 || $month > 12 || ($year < 1901 && $year > 0) || $year > gmdate('Y', time()) + 50)
+ {
+ return 'FIELD_INVALID_DATE';
+ }
+
+ if (checkdate($month, $day, $year) === false)
+ {
+ return 'FIELD_INVALID_DATE';
+ }
+ break;
+
+ case FIELD_BOOL:
+ $field_value = (bool) $field_value;
+
+ if (!$field_value && $field_data['field_required'])
+ {
+ return 'FIELD_REQUIRED';
+ }
+ break;
+
+ case FIELD_INT:
+ if (trim($field_value) === '' && !$field_data['field_required'])
+ {
+ return false;
+ }
+
+ $field_value = (int) $field_value;
+
+ if ($field_value < $field_data['field_minlen'])
+ {
+ return 'FIELD_TOO_SMALL';
+ }
+ else if ($field_value > $field_data['field_maxlen'])
+ {
+ return 'FIELD_TOO_LARGE';
+ }
+ break;
+
+ case FIELD_DROPDOWN:
+ $field_value = (int) $field_value;
+
+ if ($field_value == $field_data['field_novalue'] && $field_data['field_required'])
+ {
+ return 'FIELD_REQUIRED';
+ }
+ break;
+
+ case FIELD_STRING:
+ case FIELD_TEXT:
+ if (empty($field_value) && !$field_data['field_required'])
+ {
+ return false;
+ }
+ else if (empty($field_value) && $field_data['field_required'])
+ {
+ return 'FIELD_REQUIRED';
+ }
+
+ if ($field_data['field_minlen'] && utf8_strlen($field_value) < $field_data['field_minlen'])
+ {
+ return 'FIELD_TOO_SHORT';
+ }
+ else if ($field_data['field_maxlen'] && utf8_strlen($field_value) > $field_data['field_maxlen'])
+ {
+ return 'FIELD_TOO_LONG';
+ }
+
+ if (!empty($field_data['field_validation']) && $field_data['field_validation'] != '.*')
+ {
+ $field_validate = ($field_type == FIELD_STRING) ? $field_value : bbcode_nl2br($field_value);
+ if (!preg_match('#^' . str_replace('\\\\', '\\', $field_data['field_validation']) . '$#i', $field_validate))
+ {
+ return 'FIELD_INVALID_CHARS';
+ }
+ }
+ break;
+ }
+
+ return false;
+ }
+
+ /**
+ * Build profile cache, used for display
+ * @access private
+ */
+ function build_cache()
+ {
+ global $db, $user, $auth;
+
+ $this->profile_cache = array();
+
+ // Display hidden/no_view fields for admin/moderator
+ $sql = 'SELECT l.*, f.*
+ FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f
+ WHERE l.lang_id = ' . $user->get_iso_lang_id() . '
+ AND f.field_active = 1 ' .
+ ((!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) ? ' AND f.field_hide = 0 ' : '') . '
+ AND f.field_no_view = 0
+ AND l.field_id = f.field_id
+ ORDER BY f.field_order';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $this->profile_cache[$row['field_ident']] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ /**
+ * Get language entries for options and store them here for later use
+ */
+ function get_option_lang($field_id, $lang_id, $field_type, $preview)
+ {
+ global $db;
+
+ if ($preview)
+ {
+ $lang_options = (!is_array($this->vars['lang_options'])) ? explode("\n", $this->vars['lang_options']) : $this->vars['lang_options'];
+
+ foreach ($lang_options as $num => $var)
+ {
+ $this->options_lang[$field_id][$lang_id][($num + 1)] = $var;
+ }
+ }
+ else
+ {
+ $sql = 'SELECT option_id, lang_value
+ FROM ' . PROFILE_FIELDS_LANG_TABLE . "
+ WHERE field_id = $field_id
+ AND lang_id = $lang_id
+ AND field_type = $field_type
+ ORDER BY option_id";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $this->options_lang[$field_id][$lang_id][($row['option_id'] + 1)] = $row['lang_value'];
+ }
+ $db->sql_freeresult($result);
+ }
+ }
+
+ /**
+ * Submit profile field for validation
+ * @access public
+ */
+ function submit_cp_field($mode, $lang_id, &$cp_data, &$cp_error)
+ {
+ global $auth, $db, $user;
+
+ $sql_where = '';
+ switch ($mode)
+ {
+ case 'register':
+ // If the field is required we show it on the registration page
+ $sql_where .= ' AND f.field_show_on_reg = 1';
+ break;
+
+ case 'profile':
+ // Show hidden fields to moderators/admins
+ if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
+ {
+ $sql_where .= ' AND f.field_show_profile = 1';
+ }
+ break;
+
+ default:
+ trigger_error('Wrong profile mode specified', E_USER_ERROR);
+ break;
+ }
+
+ $sql = 'SELECT l.*, f.*
+ FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . " f
+ WHERE l.lang_id = $lang_id
+ AND f.field_active = 1
+ $sql_where
+ AND l.field_id = f.field_id
+ ORDER BY f.field_order";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $cp_data['pf_' . $row['field_ident']] = $this->get_profile_field($row);
+ $check_value = $cp_data['pf_' . $row['field_ident']];
+
+ if (($cp_result = $this->validate_profile_field($row['field_type'], $check_value, $row)) !== false)
+ {
+ // If not and only showing common error messages, use this one
+ $error = '';
+ switch ($cp_result)
+ {
+ case 'FIELD_INVALID_DATE':
+ case 'FIELD_REQUIRED':
+ $error = sprintf($user->lang[$cp_result], $row['lang_name']);
+ break;
+
+ case 'FIELD_TOO_SHORT':
+ case 'FIELD_TOO_SMALL':
+ $error = sprintf($user->lang[$cp_result], $row['lang_name'], $row['field_minlen']);
+ break;
+
+ case 'FIELD_TOO_LONG':
+ case 'FIELD_TOO_LARGE':
+ $error = sprintf($user->lang[$cp_result], $row['lang_name'], $row['field_maxlen']);
+ break;
+
+ case 'FIELD_INVALID_CHARS':
+ switch ($row['field_validation'])
+ {
+ case '[0-9]+':
+ $error = sprintf($user->lang[$cp_result . '_NUMBERS_ONLY'], $row['lang_name']);
+ break;
+
+ case '[\w]+':
+ $error = sprintf($user->lang[$cp_result . '_ALPHA_ONLY'], $row['lang_name']);
+ break;
+
+ case '[\w_\+\. \-\[\]]+':
+ $error = sprintf($user->lang[$cp_result . '_SPACERS_ONLY'], $row['lang_name']);
+ break;
+ }
+ break;
+ }
+
+ if ($error != '')
+ {
+ $cp_error[] = $error;
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+
+ /**
+ * Update profile field data directly
+ */
+ function update_profile_field_data($user_id, &$cp_data)
+ {
+ global $db;
+
+ if (!sizeof($cp_data))
+ {
+ return;
+ }
+
+ switch ($db->sql_layer)
+ {
+ case 'oracle':
+ case 'firebird':
+ case 'postgres':
+ $right_delim = $left_delim = '"';
+ break;
+
+ case 'sqlite':
+ case 'mssql':
+ case 'mssql_odbc':
+ $right_delim = ']';
+ $left_delim = '[';
+ break;
+
+ case 'mysql':
+ case 'mysql4':
+ case 'mysqli':
+ $right_delim = $left_delim = '`';
+ break;
+ }
+
+ // use new array for the UPDATE; changes in the key do not affect the original array
+ $cp_data_sql = array();
+ foreach ($cp_data as $key => $value)
+ {
+ // Firebird is case sensitive with delimiter
+ $cp_data_sql[$left_delim . (($db->sql_layer == 'firebird' || $db->sql_layer == 'oracle') ? strtoupper($key) : $key) . $right_delim] = $value;
+ }
+
+ $sql = 'UPDATE ' . PROFILE_FIELDS_DATA_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $cp_data_sql) . "
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
+
+ if (!$db->sql_affectedrows())
+ {
+ $cp_data_sql['user_id'] = (int) $user_id;
+
+ $db->sql_return_on_error(true);
+
+ $sql = 'INSERT INTO ' . PROFILE_FIELDS_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $cp_data_sql);
+ $db->sql_query($sql);
+
+ $db->sql_return_on_error(false);
+ }
+ }
+
+ /**
+ * Assign fields to template, used for viewprofile, viewtopic and memberlist (if load setting is enabled)
+ * This is directly connected to the user -> mode == grab is to grab the user specific fields, mode == show is for assigning the row to the template
+ * @access public
+ */
+ function generate_profile_fields_template($mode, $user_id = 0, $profile_row = false)
+ {
+ global $db;
+
+ if ($mode == 'grab')
+ {
+ if (!is_array($user_id))
+ {
+ $user_id = array($user_id);
+ }
+
+ if (!sizeof($this->profile_cache))
+ {
+ $this->build_cache();
+ }
+
+ if (!sizeof($user_id))
+ {
+ return array();
+ }
+
+ $sql = 'SELECT *
+ FROM ' . PROFILE_FIELDS_DATA_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', array_map('intval', $user_id));
+ $result = $db->sql_query($sql);
+
+ $field_data = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $field_data[$row['user_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ $user_fields = array();
+
+ // Go through the fields in correct order
+ foreach (array_keys($this->profile_cache) as $used_ident)
+ {
+ foreach ($field_data as $user_id => $row)
+ {
+ $user_fields[$user_id][$used_ident]['value'] = $row['pf_' . $used_ident];
+ $user_fields[$user_id][$used_ident]['data'] = $this->profile_cache[$used_ident];
+ }
+ }
+
+ return $user_fields;
+ }
+ else if ($mode == 'show')
+ {
+ // $profile_row == $user_fields[$row['user_id']];
+ $tpl_fields = array();
+ $tpl_fields['row'] = $tpl_fields['blockrow'] = array();
+
+ foreach ($profile_row as $ident => $ident_ary)
+ {
+ $value = $this->get_profile_value($ident_ary);
+
+ if ($value === NULL)
+ {
+ continue;
+ }
+
+ $tpl_fields['row'] += array(
+ 'PROFILE_' . strtoupper($ident) . '_VALUE' => $value,
+ 'PROFILE_' . strtoupper($ident) . '_TYPE' => $ident_ary['data']['field_type'],
+ 'PROFILE_' . strtoupper($ident) . '_NAME' => $ident_ary['data']['lang_name'],
+ 'PROFILE_' . strtoupper($ident) . '_EXPLAIN'=> $ident_ary['data']['lang_explain'],
+
+ 'S_PROFILE_' . strtoupper($ident) => true
+ );
+
+ $tpl_fields['blockrow'][] = array(
+ 'PROFILE_FIELD_VALUE' => $value,
+ 'PROFILE_FIELD_TYPE' => $ident_ary['data']['field_type'],
+ 'PROFILE_FIELD_NAME' => $ident_ary['data']['lang_name'],
+ 'PROFILE_FIELD_EXPLAIN' => $ident_ary['data']['lang_explain'],
+
+ 'S_PROFILE_' . strtoupper($ident) => true
+ );
+ }
+
+ return $tpl_fields;
+ }
+ else
+ {
+ trigger_error('Wrong mode for custom profile', E_USER_ERROR);
+ }
+ }
+
+ /**
+ * Get Profile Value for display
+ */
+ function get_profile_value($ident_ary)
+ {
+ $value = $ident_ary['value'];
+ $field_type = $ident_ary['data']['field_type'];
+
+ switch ($this->profile_types[$field_type])
+ {
+ case 'int':
+ if ($value === '')
+ {
+ return NULL;
+ }
+ return (int) $value;
+ break;
+
+ case 'string':
+ case 'text':
+ if (!$value)
+ {
+ return NULL;
+ }
+
+ $value = make_clickable($value);
+ $value = censor_text($value);
+ $value = bbcode_nl2br($value);
+ return $value;
+ break;
+
+ // case 'datetime':
+ case 'date':
+ $date = explode('-', $value);
+ $day = (isset($date[0])) ? (int) $date[0] : 0;
+ $month = (isset($date[1])) ? (int) $date[1] : 0;
+ $year = (isset($date[2])) ? (int) $date[2] : 0;
+
+ if (!$day && !$month && !$year)
+ {
+ return NULL;
+ }
+ else if ($day && $month && $year)
+ {
+ global $user;
+ // d/m/y 00:00 GMT isn't necessarily on the same d/m/y in the user's timezone, so add the timezone seconds
+ return $user->format_date(gmmktime(0, 0, 0, $month, $day, $year) + $user->timezone + $user->dst, $user->lang['DATE_FORMAT'], true);
+ }
+
+ return $value;
+ break;
+
+ case 'dropdown':
+ $field_id = $ident_ary['data']['field_id'];
+ $lang_id = $ident_ary['data']['lang_id'];
+ if (!isset($this->options_lang[$field_id][$lang_id]))
+ {
+ $this->get_option_lang($field_id, $lang_id, FIELD_DROPDOWN, false);
+ }
+
+ if ($value == $ident_ary['data']['field_novalue'])
+ {
+ return NULL;
+ }
+
+ $value = (int) $value;
+
+ // User not having a value assigned
+ if (!isset($this->options_lang[$field_id][$lang_id][$value]))
+ {
+ return NULL;
+ }
+
+ return $this->options_lang[$field_id][$lang_id][$value];
+ break;
+
+ case 'bool':
+ $field_id = $ident_ary['data']['field_id'];
+ $lang_id = $ident_ary['data']['lang_id'];
+ if (!isset($this->options_lang[$field_id][$lang_id]))
+ {
+ $this->get_option_lang($field_id, $lang_id, FIELD_BOOL, false);
+ }
+
+ if ($ident_ary['data']['field_length'] == 1)
+ {
+ return (isset($this->options_lang[$field_id][$lang_id][(int) $value])) ? $this->options_lang[$field_id][$lang_id][(int) $value] : NULL;
+ }
+ else if (!$value)
+ {
+ return NULL;
+ }
+ else
+ {
+ return $this->options_lang[$field_id][$lang_id][(int) ($value) + 1];
+ }
+ break;
+
+ default:
+ trigger_error('Unknown profile type', E_USER_ERROR);
+ break;
+ }
+ }
+
+ /**
+ * Get field value for registration/profile
+ * @access private
+ */
+ function get_var($field_validation, &$profile_row, $default_value, $preview)
+ {
+ global $user;
+
+ $profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
+ $user_ident = $profile_row['field_ident'];
+ // checkbox - only testing for isset
+ if ($profile_row['field_type'] == FIELD_BOOL && $profile_row['field_length'] == 2)
+ {
+ $value = (isset($_REQUEST[$profile_row['field_ident']])) ? true : ((!isset($user->profile_fields[$user_ident]) || $preview) ? $default_value : $user->profile_fields[$user_ident]);
+ }
+ else if ($profile_row['field_type'] == FIELD_INT)
+ {
+ if (isset($_REQUEST[$profile_row['field_ident']]))
+ {
+ $value = ($_REQUEST[$profile_row['field_ident']] === '') ? NULL : request_var($profile_row['field_ident'], $default_value);
+ }
+ else
+ {
+ if (!$preview && isset($user->profile_fields[$user_ident]) && is_null($user->profile_fields[$user_ident]))
+ {
+ $value = NULL;
+ }
+ else if (!isset($user->profile_fields[$user_ident]) || $preview)
+ {
+ $value = $default_value;
+ }
+ else
+ {
+ $value = $user->profile_fields[$user_ident];
+ }
+ }
+
+ return (is_null($value) || $value === '') ? '' : (int) $value;
+ }
+ else
+ {
+ $value = (isset($_REQUEST[$profile_row['field_ident']])) ? request_var($profile_row['field_ident'], $default_value, true) : ((!isset($user->profile_fields[$user_ident]) || $preview) ? $default_value : $user->profile_fields[$user_ident]);
+
+ if (gettype($value) == 'string')
+ {
+ $value = utf8_normalize_nfc($value);
+ }
+ }
+
+ switch ($field_validation)
+ {
+ case 'int':
+ return (int) $value;
+ break;
+ }
+
+ return $value;
+ }
+
+ /**
+ * Process int-type
+ * @access private
+ */
+ function generate_int($profile_row, $preview = false)
+ {
+ global $template;
+
+ $profile_row['field_value'] = $this->get_var('int', $profile_row, $profile_row['field_default_value'], $preview);
+ $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
+ }
+
+ /**
+ * Process date-type
+ * @access private
+ */
+ function generate_date($profile_row, $preview = false)
+ {
+ global $user, $template;
+
+ $profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
+ $user_ident = $profile_row['field_ident'];
+
+ $now = getdate();
+
+ if (!isset($_REQUEST[$profile_row['field_ident'] . '_day']))
+ {
+ if ($profile_row['field_default_value'] == 'now')
+ {
+ $profile_row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']);
+ }
+ list($day, $month, $year) = explode('-', ((!isset($user->profile_fields[$user_ident]) || $preview) ? $profile_row['field_default_value'] : $user->profile_fields[$user_ident]));
+ }
+ else
+ {
+ if ($preview && $profile_row['field_default_value'] == 'now')
+ {
+ $profile_row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']);
+ list($day, $month, $year) = explode('-', ((!isset($user->profile_fields[$user_ident]) || $preview) ? $profile_row['field_default_value'] : $user->profile_fields[$user_ident]));
+ }
+ else
+ {
+ $day = request_var($profile_row['field_ident'] . '_day', 0);
+ $month = request_var($profile_row['field_ident'] . '_month', 0);
+ $year = request_var($profile_row['field_ident'] . '_year', 0);
+ }
+ }
+
+ $profile_row['s_day_options'] = '<option value="0"' . ((!$day) ? ' selected="selected"' : '') . '>--</option>';
+ for ($i = 1; $i < 32; $i++)
+ {
+ $profile_row['s_day_options'] .= '<option value="' . $i . '"' . (($i == $day) ? ' selected="selected"' : '') . ">$i</option>";
+ }
+
+ $profile_row['s_month_options'] = '<option value="0"' . ((!$month) ? ' selected="selected"' : '') . '>--</option>';
+ for ($i = 1; $i < 13; $i++)
+ {
+ $profile_row['s_month_options'] .= '<option value="' . $i . '"' . (($i == $month) ? ' selected="selected"' : '') . ">$i</option>";
+ }
+
+ $profile_row['s_year_options'] = '<option value="0"' . ((!$year) ? ' selected="selected"' : '') . '>--</option>';
+ for ($i = $now['year'] - 100; $i <= $now['year'] + 100; $i++)
+ {
+ $profile_row['s_year_options'] .= '<option value="' . $i . '"' . (($i == $year) ? ' selected="selected"' : '') . ">$i</option>";
+ }
+ unset($now);
+
+ $profile_row['field_value'] = 0;
+ $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
+ }
+
+ /**
+ * Process bool-type
+ * @access private
+ */
+ function generate_bool($profile_row, $preview = false)
+ {
+ global $template;
+
+ $value = $this->get_var('int', $profile_row, $profile_row['field_default_value'], $preview);
+
+ $profile_row['field_value'] = $value;
+ $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
+
+ if ($profile_row['field_length'] == 1)
+ {
+ if (!isset($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']]) || !sizeof($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']]))
+ {
+ $this->get_option_lang($profile_row['field_id'], $profile_row['lang_id'], FIELD_BOOL, $preview);
+ }
+
+ foreach ($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']] as $option_id => $option_value)
+ {
+ $template->assign_block_vars('bool.options', array(
+ 'OPTION_ID' => $option_id,
+ 'CHECKED' => ($value == $option_id) ? ' checked="checked"' : '',
+ 'VALUE' => $option_value)
+ );
+ }
+ }
+ }
+
+ /**
+ * Process string-type
+ * @access private
+ */
+ function generate_string($profile_row, $preview = false)
+ {
+ global $template;
+
+ $profile_row['field_value'] = $this->get_var('string', $profile_row, $profile_row['lang_default_value'], $preview);
+ $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
+ }
+
+ /**
+ * Process text-type
+ * @access private
+ */
+ function generate_text($profile_row, $preview = false)
+ {
+ global $template;
+ global $user, $phpEx, $phpbb_root_path;
+
+ $field_length = explode('|', $profile_row['field_length']);
+ $profile_row['field_rows'] = $field_length[0];
+ $profile_row['field_cols'] = $field_length[1];
+
+ $profile_row['field_value'] = $this->get_var('string', $profile_row, $profile_row['lang_default_value'], $preview);
+ $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
+ }
+
+ /**
+ * Process dropdown-type
+ * @access private
+ */
+ function generate_dropdown($profile_row, $preview = false)
+ {
+ global $user, $template;
+
+ $value = $this->get_var('int', $profile_row, $profile_row['field_default_value'], $preview);
+
+ if (!isset($this->options_lang[$profile_row['field_id']]) || !isset($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']]) || !sizeof($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']]))
+ {
+ $this->get_option_lang($profile_row['field_id'], $profile_row['lang_id'], FIELD_DROPDOWN, $preview);
+ }
+
+ $profile_row['field_value'] = $value;
+ $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
+
+ foreach ($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']] as $option_id => $option_value)
+ {
+ $template->assign_block_vars('dropdown.options', array(
+ 'OPTION_ID' => $option_id,
+ 'SELECTED' => ($value == $option_id) ? ' selected="selected"' : '',
+ 'VALUE' => $option_value)
+ );
+ }
+ }
+
+ /**
+ * Return Templated value/field. Possible values for $mode are:
+ * change == user is able to set/enter profile values; preview == just show the value
+ * @access private
+ */
+ function process_field_row($mode, $profile_row)
+ {
+ global $template;
+
+ $preview = ($mode == 'preview') ? true : false;
+
+ // set template filename
+ $template->set_filenames(array(
+ 'cp_body' => 'custom_profile_fields.html')
+ );
+
+ // empty previously filled blockvars
+ foreach ($this->profile_types as $field_case => $field_type)
+ {
+ $template->destroy_block_vars($field_type);
+ }
+
+ // Assign template variables
+ $type_func = 'generate_' . $this->profile_types[$profile_row['field_type']];
+ $this->$type_func($profile_row, $preview);
+
+ // Return templated data
+ return $template->assign_display('cp_body');
+ }
+
+ /**
+ * Build Array for user insertion into custom profile fields table
+ */
+ function build_insert_sql_array($cp_data)
+ {
+ global $db, $user, $auth;
+
+ $sql_not_in = array();
+ foreach ($cp_data as $key => $null)
+ {
+ $sql_not_in[] = (strncmp($key, 'pf_', 3) === 0) ? substr($key, 3) : $key;
+ }
+
+ $sql = 'SELECT f.field_type, f.field_ident, f.field_default_value, l.lang_default_value
+ FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f
+ WHERE l.lang_id = ' . $user->get_iso_lang_id() . '
+ ' . ((sizeof($sql_not_in)) ? ' AND ' . $db->sql_in_set('f.field_ident', $sql_not_in, true) : '') . '
+ AND l.field_id = f.field_id';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['field_default_value'] == 'now' && $row['field_type'] == FIELD_DATE)
+ {
+ $now = getdate();
+ $row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']);
+ }
+
+ $cp_data['pf_' . $row['field_ident']] = (in_array($row['field_type'], array(FIELD_TEXT, FIELD_STRING))) ? $row['lang_default_value'] : $row['field_default_value'];
+ }
+ $db->sql_freeresult($result);
+
+ return $cp_data;
+ }
+
+ /**
+ * Get profile field value on submit
+ * @access private
+ */
+ function get_profile_field($profile_row)
+ {
+ global $phpbb_root_path, $phpEx;
+ global $config;
+
+ $var_name = 'pf_' . $profile_row['field_ident'];
+
+ switch ($profile_row['field_type'])
+ {
+ case FIELD_DATE:
+
+ if (!isset($_REQUEST[$var_name . '_day']))
+ {
+ if ($profile_row['field_default_value'] == 'now')
+ {
+ $now = getdate();
+ $profile_row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']);
+ }
+ list($day, $month, $year) = explode('-', $profile_row['field_default_value']);
+ }
+ else
+ {
+ $day = request_var($var_name . '_day', 0);
+ $month = request_var($var_name . '_month', 0);
+ $year = request_var($var_name . '_year', 0);
+ }
+
+ $var = sprintf('%2d-%2d-%4d', $day, $month, $year);
+ break;
+
+ case FIELD_BOOL:
+ // Checkbox
+ if ($profile_row['field_length'] == 2)
+ {
+ $var = (isset($_REQUEST[$var_name])) ? 1 : 0;
+ }
+ else
+ {
+ $var = request_var($var_name, (int) $profile_row['field_default_value']);
+ }
+ break;
+
+ case FIELD_STRING:
+ case FIELD_TEXT:
+ $var = utf8_normalize_nfc(request_var($var_name, (string) $profile_row['field_default_value'], true));
+ break;
+
+ case FIELD_INT:
+ if (isset($_REQUEST[$var_name]) && $_REQUEST[$var_name] === '')
+ {
+ $var = NULL;
+ }
+ else
+ {
+ $var = request_var($var_name, (int) $profile_row['field_default_value']);
+ }
+ break;
+
+ case FIELD_DROPDOWN:
+ $var = request_var($var_name, (int) $profile_row['field_default_value']);
+ break;
+
+ default:
+ $var = request_var($var_name, $profile_row['field_default_value']);
+ break;
+ }
+
+ return $var;
+ }
+}
+
+/**
+* Custom Profile Fields ACP
+* @package phpBB3
+*/
+class custom_profile_admin extends custom_profile
+{
+ var $vars = array();
+
+ /**
+ * Return possible validation options
+ */
+ function validate_options()
+ {
+ global $user;
+
+ $validate_ary = array('CHARS_ANY' => '.*', 'NUMBERS_ONLY' => '[0-9]+', 'ALPHA_ONLY' => '[\w]+', 'ALPHA_SPACERS' => '[\w_\+\. \-\[\]]+');
+
+ $validate_options = '';
+ foreach ($validate_ary as $lang => $value)
+ {
+ $selected = ($this->vars['field_validation'] == $value) ? ' selected="selected"' : '';
+ $validate_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$lang] . '</option>';
+ }
+
+ return $validate_options;
+ }
+
+ /**
+ * Get string options for second step in ACP
+ */
+ function get_string_options()
+ {
+ global $user;
+
+ $options = array(
+ 0 => array('TITLE' => $user->lang['FIELD_LENGTH'], 'FIELD' => '<input type="text" name="field_length" size="5" value="' . $this->vars['field_length'] . '" />'),
+ 1 => array('TITLE' => $user->lang['MIN_FIELD_CHARS'], 'FIELD' => '<input type="text" name="field_minlen" size="5" value="' . $this->vars['field_minlen'] . '" />'),
+ 2 => array('TITLE' => $user->lang['MAX_FIELD_CHARS'], 'FIELD' => '<input type="text" name="field_maxlen" size="5" value="' . $this->vars['field_maxlen'] . '" />'),
+ 3 => array('TITLE' => $user->lang['FIELD_VALIDATION'], 'FIELD' => '<select name="field_validation">' . $this->validate_options() . '</select>')
+ );
+
+ return $options;
+ }
+
+ /**
+ * Get text options for second step in ACP
+ */
+ function get_text_options()
+ {
+ global $user;
+
+ $options = array(
+ 0 => array('TITLE' => $user->lang['FIELD_LENGTH'], 'FIELD' => '<input name="rows" size="5" value="' . $this->vars['rows'] . '" /> ' . $user->lang['ROWS'] . '</dd><dd><input name="columns" size="5" value="' . $this->vars['columns'] . '" /> ' . $user->lang['COLUMNS'] . ' <input type="hidden" name="field_length" value="' . $this->vars['field_length'] . '" />'),
+ 1 => array('TITLE' => $user->lang['MIN_FIELD_CHARS'], 'FIELD' => '<input type="text" name="field_minlen" size="10" value="' . $this->vars['field_minlen'] . '" />'),
+ 2 => array('TITLE' => $user->lang['MAX_FIELD_CHARS'], 'FIELD' => '<input type="text" name="field_maxlen" size="10" value="' . $this->vars['field_maxlen'] . '" />'),
+ 3 => array('TITLE' => $user->lang['FIELD_VALIDATION'], 'FIELD' => '<select name="field_validation">' . $this->validate_options() . '</select>')
+ );
+
+ return $options;
+ }
+
+ /**
+ * Get int options for second step in ACP
+ */
+ function get_int_options()
+ {
+ global $user;
+
+ $options = array(
+ 0 => array('TITLE' => $user->lang['FIELD_LENGTH'], 'FIELD' => '<input type="text" name="field_length" size="5" value="' . $this->vars['field_length'] . '" />'),
+ 1 => array('TITLE' => $user->lang['MIN_FIELD_NUMBER'], 'FIELD' => '<input type="text" name="field_minlen" size="5" value="' . $this->vars['field_minlen'] . '" />'),
+ 2 => array('TITLE' => $user->lang['MAX_FIELD_NUMBER'], 'FIELD' => '<input type="text" name="field_maxlen" size="5" value="' . $this->vars['field_maxlen'] . '" />'),
+ 3 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => '<input type="post" name="field_default_value" value="' . $this->vars['field_default_value'] . '" />')
+ );
+
+ return $options;
+ }
+
+ /**
+ * Get bool options for second step in ACP
+ */
+ function get_bool_options()
+ {
+ global $user, $config, $lang_defs;
+
+ $default_lang_id = $lang_defs['iso'][$config['default_lang']];
+
+ $profile_row = array(
+ 'var_name' => 'field_default_value',
+ 'field_id' => 1,
+ 'lang_name' => $this->vars['lang_name'],
+ 'lang_explain' => $this->vars['lang_explain'],
+ 'lang_id' => $default_lang_id,
+ 'field_default_value' => $this->vars['field_default_value'],
+ 'field_ident' => 'field_default_value',
+ 'field_type' => FIELD_BOOL,
+ 'field_length' => $this->vars['field_length'],
+ 'lang_options' => $this->vars['lang_options']
+ );
+
+ $options = array(
+ 0 => array('TITLE' => $user->lang['FIELD_TYPE'], 'EXPLAIN' => $user->lang['BOOL_TYPE_EXPLAIN'], 'FIELD' => '<label><input type="radio" class="radio" name="field_length" value="1"' . (($this->vars['field_length'] == 1) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $user->lang['RADIO_BUTTONS'] . '</label><label><input type="radio" class="radio" name="field_length" value="2"' . (($this->vars['field_length'] == 2) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $user->lang['CHECKBOX'] . '</label>'),
+ 1 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row))
+ );
+
+ return $options;
+ }
+
+ /**
+ * Get dropdown options for second step in ACP
+ */
+ function get_dropdown_options()
+ {
+ global $user, $config, $lang_defs;
+
+ $default_lang_id = $lang_defs['iso'][$config['default_lang']];
+
+ $profile_row[0] = array(
+ 'var_name' => 'field_default_value',
+ 'field_id' => 1,
+ 'lang_name' => $this->vars['lang_name'],
+ 'lang_explain' => $this->vars['lang_explain'],
+ 'lang_id' => $default_lang_id,
+ 'field_default_value' => $this->vars['field_default_value'],
+ 'field_ident' => 'field_default_value',
+ 'field_type' => FIELD_DROPDOWN,
+ 'lang_options' => $this->vars['lang_options']
+ );
+
+ $profile_row[1] = $profile_row[0];
+ $profile_row[1]['var_name'] = 'field_novalue';
+ $profile_row[1]['field_ident'] = 'field_novalue';
+ $profile_row[1]['field_default_value'] = $this->vars['field_novalue'];
+
+ $options = array(
+ 0 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row[0])),
+ 1 => array('TITLE' => $user->lang['NO_VALUE_OPTION'], 'EXPLAIN' => $user->lang['NO_VALUE_OPTION_EXPLAIN'], 'FIELD' => $this->process_field_row('preview', $profile_row[1]))
+ );
+
+ return $options;
+ }
+
+ /**
+ * Get date options for second step in ACP
+ */
+ function get_date_options()
+ {
+ global $user, $config, $lang_defs;
+
+ $default_lang_id = $lang_defs['iso'][$config['default_lang']];
+
+ $profile_row = array(
+ 'var_name' => 'field_default_value',
+ 'lang_name' => $this->vars['lang_name'],
+ 'lang_explain' => $this->vars['lang_explain'],
+ 'lang_id' => $default_lang_id,
+ 'field_default_value' => $this->vars['field_default_value'],
+ 'field_ident' => 'field_default_value',
+ 'field_type' => FIELD_DATE,
+ 'field_length' => $this->vars['field_length']
+ );
+
+ $always_now = request_var('always_now', -1);
+ if ($always_now == -1)
+ {
+ $s_checked = ($this->vars['field_default_value'] == 'now') ? true : false;
+ }
+ else
+ {
+ $s_checked = ($always_now) ? true : false;
+ }
+
+ $options = array(
+ 0 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row)),
+ 1 => array('TITLE' => $user->lang['ALWAYS_TODAY'], 'FIELD' => '<label><input type="radio" class="radio" name="always_now" value="1"' . (($s_checked) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $user->lang['YES'] . '</label><label><input type="radio" class="radio" name="always_now" value="0"' . ((!$s_checked) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $user->lang['NO'] . '</label>'),
+ );
+
+ return $options;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php
new file mode 100644
index 0000000000..1d3a4d74f8
--- /dev/null
+++ b/phpBB/includes/functions_template.php
@@ -0,0 +1,814 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group, sections (c) 2001 ispi of Lincoln Inc
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Extension of template class - Functions needed for compiling templates only.
+*
+* psoTFX, phpBB Development Team - Completion of file caching, decompilation
+* routines and implementation of conditionals/keywords and associated changes
+*
+* The interface was inspired by PHPLib templates, and the template file (formats are
+* quite similar)
+*
+* The keyword/conditional implementation is currently based on sections of code from
+* the Smarty templating engine (c) 2001 ispi of Lincoln, Inc. which is released
+* (on its own and in whole) under the LGPL. Section 3 of the LGPL states that any code
+* derived from an LGPL application may be relicenced under the GPL, this applies
+* to this source
+*
+* DEFINE directive inspired by a request by Cyberalien
+*
+* @package phpBB3
+*/
+class template_compile
+{
+ var $template;
+
+ // Various storage arrays
+ var $block_names = array();
+ var $block_else_level = array();
+
+ /**
+ * constuctor
+ */
+ function template_compile(&$template)
+ {
+ $this->template = &$template;
+ }
+
+ /**
+ * Load template source from file
+ * @access private
+ */
+ function _tpl_load_file($handle, $store_in_db = false)
+ {
+ // Try and open template for read
+ if (!file_exists($this->template->files[$handle]))
+ {
+ trigger_error("template->_tpl_load_file(): File {$this->template->files[$handle]} does not exist or is empty", E_USER_ERROR);
+ }
+
+ $this->template->compiled_code[$handle] = $this->compile(trim(@file_get_contents($this->template->files[$handle])));
+
+ // Actually compile the code now.
+ $this->compile_write($handle, $this->template->compiled_code[$handle]);
+
+ // Store in database if required...
+ if ($store_in_db)
+ {
+ global $db, $user;
+
+ $sql_ary = array(
+ 'template_id' => $this->template->files_template[$handle],
+ 'template_filename' => $this->template->filename[$handle],
+ 'template_included' => '',
+ 'template_mtime' => time(),
+ 'template_data' => trim(@file_get_contents($this->template->files[$handle])),
+ );
+
+ $sql = 'INSERT INTO ' . STYLES_TEMPLATE_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ $db->sql_query($sql);
+ }
+ }
+
+ /**
+ * Remove any PHP tags that do not belong, these regular expressions are derived from
+ * the ones that exist in zend_language_scanner.l
+ * @access private
+ */
+ function remove_php_tags(&$code)
+ {
+ // This matches the information gathered from the internal PHP lexer
+ $match = array(
+ '#<([\?%])=?.*?\1>#s',
+ '#<script\s+language\s*=\s*(["\']?)php\1\s*>.*?</script\s*>#s',
+ '#<\?php(?:\r\n?|[ \n\t]).*?\?>#s'
+ );
+
+ $code = preg_replace($match, '', $code);
+ }
+
+ /**
+ * The all seeing all doing compile method. Parts are inspired by or directly from Smarty
+ * @access private
+ */
+ function compile($code, $no_echo = false, $echo_var = '')
+ {
+ global $config;
+
+ if ($echo_var)
+ {
+ global $$echo_var;
+ }
+
+ // Remove any "loose" php ... we want to give admins the ability
+ // to switch on/off PHP for a given template. Allowing unchecked
+ // php is a no-no. There is a potential issue here in that non-php
+ // content may be removed ... however designers should use entities
+ // if they wish to display < and >
+ $this->remove_php_tags($code);
+
+ // Pull out all block/statement level elements and separate plain text
+ preg_match_all('#<!-- PHP -->(.*?)<!-- ENDPHP -->#s', $code, $matches);
+ $php_blocks = $matches[1];
+ $code = preg_replace('#<!-- PHP -->.*?<!-- ENDPHP -->#s', '<!-- PHP -->', $code);
+
+ preg_match_all('#<!-- INCLUDE (\{\$?[A-Z0-9\-_]+\}|[a-zA-Z0-9\_\-\+\./]+) -->#', $code, $matches);
+ $include_blocks = $matches[1];
+ $code = preg_replace('#<!-- INCLUDE (?:\{\$?[A-Z0-9\-_]+\}|[a-zA-Z0-9\_\-\+\./]+) -->#', '<!-- INCLUDE -->', $code);
+
+ preg_match_all('#<!-- INCLUDEPHP ([a-zA-Z0-9\_\-\+\./]+) -->#', $code, $matches);
+ $includephp_blocks = $matches[1];
+ $code = preg_replace('#<!-- INCLUDEPHP [a-zA-Z0-9\_\-\+\./]+ -->#', '<!-- INCLUDEPHP -->', $code);
+
+ preg_match_all('#<!-- ([^<].*?) (.*?)? ?-->#', $code, $blocks, PREG_SET_ORDER);
+
+ $text_blocks = preg_split('#<!-- [^<].*? (?:.*?)? ?-->#', $code);
+
+ for ($i = 0, $j = sizeof($text_blocks); $i < $j; $i++)
+ {
+ $this->compile_var_tags($text_blocks[$i]);
+ }
+ $compile_blocks = array();
+
+ for ($curr_tb = 0, $tb_size = sizeof($blocks); $curr_tb < $tb_size; $curr_tb++)
+ {
+ $block_val = &$blocks[$curr_tb];
+
+ switch ($block_val[1])
+ {
+ case 'BEGIN':
+ $this->block_else_level[] = false;
+ $compile_blocks[] = '<?php ' . $this->compile_tag_block($block_val[2]) . ' ?>';
+ break;
+
+ case 'BEGINELSE':
+ $this->block_else_level[sizeof($this->block_else_level) - 1] = true;
+ $compile_blocks[] = '<?php }} else { ?>';
+ break;
+
+ case 'END':
+ array_pop($this->block_names);
+ $compile_blocks[] = '<?php ' . ((array_pop($this->block_else_level)) ? '}' : '}}') . ' ?>';
+ break;
+
+ case 'IF':
+ $compile_blocks[] = '<?php ' . $this->compile_tag_if($block_val[2], false) . ' ?>';
+ break;
+
+ case 'ELSE':
+ $compile_blocks[] = '<?php } else { ?>';
+ break;
+
+ case 'ELSEIF':
+ $compile_blocks[] = '<?php ' . $this->compile_tag_if($block_val[2], true) . ' ?>';
+ break;
+
+ case 'ENDIF':
+ $compile_blocks[] = '<?php } ?>';
+ break;
+
+ case 'DEFINE':
+ $compile_blocks[] = '<?php ' . $this->compile_tag_define($block_val[2], true) . ' ?>';
+ break;
+
+ case 'UNDEFINE':
+ $compile_blocks[] = '<?php ' . $this->compile_tag_define($block_val[2], false) . ' ?>';
+ break;
+
+ case 'INCLUDE':
+ $temp = array_shift($include_blocks);
+
+ // Dynamic includes
+ // Cheap match rather than a full blown regexp, we already know
+ // the format of the input so just use string manipulation.
+ if ($temp[0] == '{')
+ {
+ $file = false;
+
+ if ($temp[1] == '$')
+ {
+ $var = substr($temp, 2, -1);
+ //$file = $this->template->_tpldata['DEFINE']['.'][$var];
+ $temp = "\$this->_tpldata['DEFINE']['.']['$var']";
+ }
+ else
+ {
+ $var = substr($temp, 1, -1);
+ //$file = $this->template->_rootref[$var];
+ $temp = "\$this->_rootref['$var']";
+ }
+ }
+ else
+ {
+ $file = $temp;
+ }
+
+ $compile_blocks[] = '<?php ' . $this->compile_tag_include($temp) . ' ?>';
+
+ // No point in checking variable includes
+ if ($file)
+ {
+ $this->template->_tpl_include($file, false);
+ }
+ break;
+
+ case 'INCLUDEPHP':
+ $compile_blocks[] = ($config['tpl_allow_php']) ? '<?php ' . $this->compile_tag_include_php(array_shift($includephp_blocks)) . ' ?>' : '';
+ break;
+
+ case 'PHP':
+ $compile_blocks[] = ($config['tpl_allow_php']) ? '<?php ' . array_shift($php_blocks) . ' ?>' : '';
+ break;
+
+ default:
+ $this->compile_var_tags($block_val[0]);
+ $trim_check = trim($block_val[0]);
+ $compile_blocks[] = (!$no_echo) ? ((!empty($trim_check)) ? $block_val[0] : '') : ((!empty($trim_check)) ? $block_val[0] : '');
+ break;
+ }
+ }
+
+ $template_php = '';
+ for ($i = 0, $size = sizeof($text_blocks); $i < $size; $i++)
+ {
+ $trim_check_text = trim($text_blocks[$i]);
+ $template_php .= (!$no_echo) ? (($trim_check_text != '') ? $text_blocks[$i] : '') . ((isset($compile_blocks[$i])) ? $compile_blocks[$i] : '') : (($trim_check_text != '') ? $text_blocks[$i] : '') . ((isset($compile_blocks[$i])) ? $compile_blocks[$i] : '');
+ }
+
+ // Remove unused opening/closing tags
+ $template_php = str_replace(' ?><?php ', ' ', $template_php);
+
+ // Now add a newline after each php closing tag which already has a newline
+ // PHP itself strips a newline if a closing tag is used (this is documented behaviour) and it is mostly not intended by style authors to remove newlines
+ $template_php = preg_replace('#\?\>([\r\n])#', '?>\1\1', $template_php);
+
+ // There will be a number of occasions where we switch into and out of
+ // PHP mode instantaneously. Rather than "burden" the parser with this
+ // we'll strip out such occurences, minimising such switching
+ if ($no_echo)
+ {
+ return "\$$echo_var .= '" . $template_php . "'";
+ }
+
+ return $template_php;
+ }
+
+ /**
+ * Compile variables
+ * @access private
+ */
+ function compile_var_tags(&$text_blocks)
+ {
+ // change template varrefs into PHP varrefs
+ $varrefs = array();
+
+ // This one will handle varrefs WITH namespaces
+ preg_match_all('#\{((?:[a-z0-9\-_]+\.)+)(\$)?([A-Z0-9\-_]+)\}#', $text_blocks, $varrefs, PREG_SET_ORDER);
+
+ foreach ($varrefs as $var_val)
+ {
+ $namespace = $var_val[1];
+ $varname = $var_val[3];
+ $new = $this->generate_block_varref($namespace, $varname, true, $var_val[2]);
+
+ $text_blocks = str_replace($var_val[0], $new, $text_blocks);
+ }
+
+ // This will handle the remaining root-level varrefs
+ // transform vars prefixed by L_ into their language variable pendant if nothing is set within the tpldata array
+ if (strpos($text_blocks, '{L_') !== false)
+ {
+ $text_blocks = preg_replace('#\{L_([A-Z0-9\-_]+)\}#', "<?php echo ((isset(\$this->_rootref['L_\\1'])) ? \$this->_rootref['L_\\1'] : ((isset(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '{ \\1 }')); ?>", $text_blocks);
+ }
+
+ // Handle addslashed language variables prefixed with LA_
+ // If a template variable already exist, it will be used in favor of it...
+ if (strpos($text_blocks, '{LA_') !== false)
+ {
+ $text_blocks = preg_replace('#\{LA_([A-Z0-9\-_]+)\}#', "<?php echo ((isset(\$this->_rootref['LA_\\1'])) ? \$this->_rootref['LA_\\1'] : ((isset(\$this->_rootref['L_\\1'])) ? addslashes(\$this->_rootref['L_\\1']) : ((isset(\$user->lang['\\1'])) ? addslashes(\$user->lang['\\1']) : '{ \\1 }'))); ?>", $text_blocks);
+ }
+
+ // Handle remaining varrefs
+ $text_blocks = preg_replace('#\{([A-Z0-9\-_]+)\}#', "<?php echo (isset(\$this->_rootref['\\1'])) ? \$this->_rootref['\\1'] : ''; ?>", $text_blocks);
+ $text_blocks = preg_replace('#\{\$([A-Z0-9\-_]+)\}#', "<?php echo (isset(\$this->_tpldata['DEFINE']['.']['\\1'])) ? \$this->_tpldata['DEFINE']['.']['\\1'] : ''; ?>", $text_blocks);
+
+ return;
+ }
+
+ /**
+ * Compile blocks
+ * @access private
+ */
+ function compile_tag_block($tag_args)
+ {
+ $no_nesting = false;
+
+ // Is the designer wanting to call another loop in a loop?
+ if (strpos($tag_args, '!') === 0)
+ {
+ // Count the number if ! occurrences (not allowed in vars)
+ $no_nesting = substr_count($tag_args, '!');
+ $tag_args = substr($tag_args, $no_nesting);
+ }
+
+ // Allow for control of looping (indexes start from zero):
+ // foo(2) : Will start the loop on the 3rd entry
+ // foo(-2) : Will start the loop two entries from the end
+ // foo(3,4) : Will start the loop on the fourth entry and end it on the fifth
+ // foo(3,-4) : Will start the loop on the fourth entry and end it four from last
+ if (preg_match('#^([^()]*)\(([\-\d]+)(?:,([\-\d]+))?\)$#', $tag_args, $match))
+ {
+ $tag_args = $match[1];
+
+ if ($match[2] < 0)
+ {
+ $loop_start = '($_' . $tag_args . '_count ' . $match[2] . ' < 0 ? 0 : $_' . $tag_args . '_count ' . $match[2] . ')';
+ }
+ else
+ {
+ $loop_start = '($_' . $tag_args . '_count < ' . $match[2] . ' ? $_' . $tag_args . '_count : ' . $match[2] . ')';
+ }
+
+ if (strlen($match[3]) < 1 || $match[3] == -1)
+ {
+ $loop_end = '$_' . $tag_args . '_count';
+ }
+ else if ($match[3] >= 0)
+ {
+ $loop_end = '(' . ($match[3] + 1) . ' > $_' . $tag_args . '_count ? $_' . $tag_args . '_count : ' . ($match[3] + 1) . ')';
+ }
+ else //if ($match[3] < -1)
+ {
+ $loop_end = '$_' . $tag_args . '_count' . ($match[3] + 1);
+ }
+ }
+ else
+ {
+ $loop_start = 0;
+ $loop_end = '$_' . $tag_args . '_count';
+ }
+
+ $tag_template_php = '';
+ array_push($this->block_names, $tag_args);
+
+ if ($no_nesting !== false)
+ {
+ // We need to implode $no_nesting times from the end...
+ $block = array_slice($this->block_names, -$no_nesting);
+ }
+ else
+ {
+ $block = $this->block_names;
+ }
+
+ if (sizeof($block) < 2)
+ {
+ // Block is not nested.
+ $tag_template_php = '$_' . $tag_args . "_count = (isset(\$this->_tpldata['$tag_args'])) ? sizeof(\$this->_tpldata['$tag_args']) : 0;";
+ $varref = "\$this->_tpldata['$tag_args']";
+ }
+ else
+ {
+ // This block is nested.
+ // Generate a namespace string for this block.
+ $namespace = implode('.', $block);
+
+ // Get a reference to the data array for this block that depends on the
+ // current indices of all parent blocks.
+ $varref = $this->generate_block_data_ref($namespace, false);
+
+ // Create the for loop code to iterate over this block.
+ $tag_template_php = '$_' . $tag_args . '_count = (isset(' . $varref . ')) ? sizeof(' . $varref . ') : 0;';
+ }
+
+ $tag_template_php .= 'if ($_' . $tag_args . '_count) {';
+
+ /**
+ * The following uses foreach for iteration instead of a for loop, foreach is faster but requires PHP to make a copy of the contents of the array which uses more memory
+ * <code>
+ * if (!$offset)
+ * {
+ * $tag_template_php .= 'foreach (' . $varref . ' as $_' . $tag_args . '_i => $_' . $tag_args . '_val){';
+ * }
+ * </code>
+ */
+
+ $tag_template_php .= 'for ($_' . $tag_args . '_i = ' . $loop_start . '; $_' . $tag_args . '_i < ' . $loop_end . '; ++$_' . $tag_args . '_i){';
+ $tag_template_php .= '$_'. $tag_args . '_val = &' . $varref . '[$_'. $tag_args. '_i];';
+
+ return $tag_template_php;
+ }
+
+ /**
+ * Compile IF tags - much of this is from Smarty with
+ * some adaptions for our block level methods
+ * @access private
+ */
+ function compile_tag_if($tag_args, $elseif)
+ {
+ // Tokenize args for 'if' tag.
+ preg_match_all('/(?:
+ "[^"\\\\]*(?:\\\\.[^"\\\\]*)*" |
+ \'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' |
+ [(),] |
+ [^\s(),]+)/x', $tag_args, $match);
+
+ $tokens = $match[0];
+ $is_arg_stack = array();
+
+ for ($i = 0, $size = sizeof($tokens); $i < $size; $i++)
+ {
+ $token = &$tokens[$i];
+
+ switch ($token)
+ {
+ case '!==':
+ case '===':
+ case '<<':
+ case '>>':
+ case '|':
+ case '^':
+ case '&':
+ case '~':
+ case ')':
+ case ',':
+ case '+':
+ case '-':
+ case '*':
+ case '/':
+ case '@':
+ break;
+
+ case '==':
+ case 'eq':
+ $token = '==';
+ break;
+
+ case '!=':
+ case '<>':
+ case 'ne':
+ case 'neq':
+ $token = '!=';
+ break;
+
+ case '<':
+ case 'lt':
+ $token = '<';
+ break;
+
+ case '<=':
+ case 'le':
+ case 'lte':
+ $token = '<=';
+ break;
+
+ case '>':
+ case 'gt':
+ $token = '>';
+ break;
+
+ case '>=':
+ case 'ge':
+ case 'gte':
+ $token = '>=';
+ break;
+
+ case '&&':
+ case 'and':
+ $token = '&&';
+ break;
+
+ case '||':
+ case 'or':
+ $token = '||';
+ break;
+
+ case '!':
+ case 'not':
+ $token = '!';
+ break;
+
+ case '%':
+ case 'mod':
+ $token = '%';
+ break;
+
+ case '(':
+ array_push($is_arg_stack, $i);
+ break;
+
+ case 'is':
+ $is_arg_start = ($tokens[$i-1] == ')') ? array_pop($is_arg_stack) : $i-1;
+ $is_arg = implode(' ', array_slice($tokens, $is_arg_start, $i - $is_arg_start));
+
+ $new_tokens = $this->_parse_is_expr($is_arg, array_slice($tokens, $i+1));
+
+ array_splice($tokens, $is_arg_start, sizeof($tokens), $new_tokens);
+
+ $i = $is_arg_start;
+
+ // no break
+
+ default:
+ if (preg_match('#^((?:[a-z0-9\-_]+\.)+)?(\$)?(?=[A-Z])([A-Z0-9\-_]+)#s', $token, $varrefs))
+ {
+ $token = (!empty($varrefs[1])) ? $this->generate_block_data_ref(substr($varrefs[1], 0, -1), true, $varrefs[2]) . '[\'' . $varrefs[3] . '\']' : (($varrefs[2]) ? '$this->_tpldata[\'DEFINE\'][\'.\'][\'' . $varrefs[3] . '\']' : '$this->_rootref[\'' . $varrefs[3] . '\']');
+ }
+ else if (preg_match('#^\.((?:[a-z0-9\-_]+\.?)+)$#s', $token, $varrefs))
+ {
+ // Allow checking if loops are set with .loopname
+ // It is also possible to check the loop count by doing <!-- IF .loopname > 1 --> for example
+ $blocks = explode('.', $varrefs[1]);
+
+ // If the block is nested, we have a reference that we can grab.
+ // If the block is not nested, we just go and grab the block from _tpldata
+ if (sizeof($blocks) > 1)
+ {
+ $block = array_pop($blocks);
+ $namespace = implode('.', $blocks);
+ $varref = $this->generate_block_data_ref($namespace, true);
+
+ // Add the block reference for the last child.
+ $varref .= "['" . $block . "']";
+ }
+ else
+ {
+ $varref = '$this->_tpldata';
+
+ // Add the block reference for the last child.
+ $varref .= "['" . $blocks[0] . "']";
+ }
+ $token = "sizeof($varref)";
+ }
+ else if (!empty($token))
+ {
+ $token = '(' . $token . ')';
+ }
+
+ break;
+ }
+ }
+
+ // If there are no valid tokens left or only control/compare characters left, we do skip this statement
+ if (!sizeof($tokens) || str_replace(array(' ', '=', '!', '<', '>', '&', '|', '%', '(', ')'), '', implode('', $tokens)) == '')
+ {
+ $tokens = array('false');
+ }
+ return (($elseif) ? '} else if (' : 'if (') . (implode(' ', $tokens) . ') { ');
+ }
+
+ /**
+ * Compile DEFINE tags
+ * @access private
+ */
+ function compile_tag_define($tag_args, $op)
+ {
+ preg_match('#^((?:[a-z0-9\-_]+\.)+)?\$(?=[A-Z])([A-Z0-9_\-]*)(?: = (\'?)([^\']*)(\'?))?$#', $tag_args, $match);
+
+ if (empty($match[2]) || (!isset($match[4]) && $op))
+ {
+ return '';
+ }
+
+ if (!$op)
+ {
+ return 'unset(' . (($match[1]) ? $this->generate_block_data_ref(substr($match[1], 0, -1), true, true) . '[\'' . $match[2] . '\']' : '$this->_tpldata[\'DEFINE\'][\'.\'][\'' . $match[2] . '\']') . ');';
+ }
+
+ // Are we a string?
+ if ($match[3] && $match[5])
+ {
+ $match[4] = str_replace(array('\\\'', '\\\\', '\''), array('\'', '\\', '\\\''), $match[4]);
+
+ // Compile reference, we allow template variables in defines...
+ $match[4] = $this->compile($match[4]);
+
+ // Now replace the php code
+ $match[4] = "'" . str_replace(array('<?php echo ', '; ?>'), array("' . ", " . '"), $match[4]) . "'";
+ }
+ else
+ {
+ preg_match('#true|false|\.#i', $match[4], $type);
+
+ switch (strtolower($type[0]))
+ {
+ case 'true':
+ case 'false':
+ $match[4] = strtoupper($match[4]);
+ break;
+
+ case '.':
+ $match[4] = doubleval($match[4]);
+ break;
+
+ default:
+ $match[4] = intval($match[4]);
+ break;
+ }
+ }
+
+ return (($match[1]) ? $this->generate_block_data_ref(substr($match[1], 0, -1), true, true) . '[\'' . $match[2] . '\']' : '$this->_tpldata[\'DEFINE\'][\'.\'][\'' . $match[2] . '\']') . ' = ' . $match[4] . ';';
+ }
+
+ /**
+ * Compile INCLUDE tag
+ * @access private
+ */
+ function compile_tag_include($tag_args)
+ {
+ // Process dynamic includes
+ if ($tag_args[0] == '$')
+ {
+ return "if (isset($tag_args)) { \$this->_tpl_include($tag_args); }";
+ }
+
+ return "\$this->_tpl_include('$tag_args');";
+ }
+
+ /**
+ * Compile INCLUDE_PHP tag
+ * @access private
+ */
+ function compile_tag_include_php($tag_args)
+ {
+ return "\$this->_php_include('$tag_args');";
+ }
+
+ /**
+ * parse expression
+ * This is from Smarty
+ * @access private
+ */
+ function _parse_is_expr($is_arg, $tokens)
+ {
+ $expr_end = 0;
+ $negate_expr = false;
+
+ if (($first_token = array_shift($tokens)) == 'not')
+ {
+ $negate_expr = true;
+ $expr_type = array_shift($tokens);
+ }
+ else
+ {
+ $expr_type = $first_token;
+ }
+
+ switch ($expr_type)
+ {
+ case 'even':
+ if (@$tokens[$expr_end] == 'by')
+ {
+ $expr_end++;
+ $expr_arg = $tokens[$expr_end++];
+ $expr = "!(($is_arg / $expr_arg) % $expr_arg)";
+ }
+ else
+ {
+ $expr = "!($is_arg & 1)";
+ }
+ break;
+
+ case 'odd':
+ if (@$tokens[$expr_end] == 'by')
+ {
+ $expr_end++;
+ $expr_arg = $tokens[$expr_end++];
+ $expr = "(($is_arg / $expr_arg) % $expr_arg)";
+ }
+ else
+ {
+ $expr = "($is_arg & 1)";
+ }
+ break;
+
+ case 'div':
+ if (@$tokens[$expr_end] == 'by')
+ {
+ $expr_end++;
+ $expr_arg = $tokens[$expr_end++];
+ $expr = "!($is_arg % $expr_arg)";
+ }
+ break;
+ }
+
+ if ($negate_expr)
+ {
+ $expr = "!($expr)";
+ }
+
+ array_splice($tokens, 0, $expr_end, $expr);
+
+ return $tokens;
+ }
+
+ /**
+ * Generates a reference to the given variable inside the given (possibly nested)
+ * block namespace. This is a string of the form:
+ * ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . '
+ * It's ready to be inserted into an "echo" line in one of the templates.
+ * NOTE: expects a trailing "." on the namespace.
+ * @access private
+ */
+ function generate_block_varref($namespace, $varname, $echo = true, $defop = false)
+ {
+ // Strip the trailing period.
+ $namespace = substr($namespace, 0, -1);
+
+ // Get a reference to the data block for this namespace.
+ $varref = $this->generate_block_data_ref($namespace, true, $defop);
+ // Prepend the necessary code to stick this in an echo line.
+
+ // Append the variable reference.
+ $varref .= "['$varname']";
+ $varref = ($echo) ? "<?php echo $varref; ?>" : ((isset($varref)) ? $varref : '');
+
+ return $varref;
+ }
+
+ /**
+ * Generates a reference to the array of data values for the given
+ * (possibly nested) block namespace. This is a string of the form:
+ * $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN']
+ *
+ * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above.
+ * NOTE: does not expect a trailing "." on the blockname.
+ * @access private
+ */
+ function generate_block_data_ref($blockname, $include_last_iterator, $defop = false)
+ {
+ // Get an array of the blocks involved.
+ $blocks = explode('.', $blockname);
+ $blockcount = sizeof($blocks) - 1;
+
+ // DEFINE is not an element of any referenced variable, we must use _tpldata to access it
+ if ($defop)
+ {
+ $varref = '$this->_tpldata[\'DEFINE\']';
+ // Build up the string with everything but the last child.
+ for ($i = 0; $i < $blockcount; $i++)
+ {
+ $varref .= "['" . $blocks[$i] . "'][\$_" . $blocks[$i] . '_i]';
+ }
+ // Add the block reference for the last child.
+ $varref .= "['" . $blocks[$blockcount] . "']";
+ // Add the iterator for the last child if requried.
+ if ($include_last_iterator)
+ {
+ $varref .= '[$_' . $blocks[$blockcount] . '_i]';
+ }
+ return $varref;
+ }
+ else if ($include_last_iterator)
+ {
+ return '$_'. $blocks[$blockcount] . '_val';
+ }
+ else
+ {
+ return '$_'. $blocks[$blockcount - 1] . '_val[\''. $blocks[$blockcount]. '\']';
+ }
+ }
+
+ /**
+ * Write compiled file to cache directory
+ * @access private
+ */
+ function compile_write($handle, $data)
+ {
+ global $phpEx;
+
+ $filename = $this->template->cachepath . str_replace('/', '.', $this->template->filename[$handle]) . '.' . $phpEx;
+
+ $data = "<?php if (!defined('IN_PHPBB')) exit;" . ((strpos($data, '<?php') === 0) ? substr($data, 5) : ' ?>' . $data);
+
+ if ($fp = @fopen($filename, 'wb'))
+ {
+ @flock($fp, LOCK_EX);
+ @fwrite ($fp, $data);
+ @flock($fp, LOCK_UN);
+ @fclose($fp);
+
+ phpbb_chmod($filename, CHMOD_READ | CHMOD_WRITE);
+ }
+
+ return;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php
new file mode 100644
index 0000000000..046abede8e
--- /dev/null
+++ b/phpBB/includes/functions_transfer.php
@@ -0,0 +1,873 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Transfer class, wrapper for ftp/sftp/ssh
+* @package phpBB3
+*/
+class transfer
+{
+ var $connection;
+ var $host;
+ var $port;
+ var $username;
+ var $password;
+ var $timeout;
+ var $root_path;
+ var $tmp_path;
+ var $file_perms;
+ var $dir_perms;
+
+ /**
+ * Constructor - init some basic values
+ */
+ function transfer()
+ {
+ global $phpbb_root_path;
+
+ $this->file_perms = 0644;
+ $this->dir_perms = 0777;
+
+ // We use the store directory as temporary path to circumvent open basedir restrictions
+ $this->tmp_path = $phpbb_root_path . 'store/';
+ }
+
+ /**
+ * Write file to location
+ */
+ function write_file($destination_file = '', $contents = '')
+ {
+ global $phpbb_root_path;
+
+ $destination_file = $this->root_path . str_replace($phpbb_root_path, '', $destination_file);
+
+ // need to create a temp file and then move that temp file.
+ // ftp functions can only move files around and can't create.
+ // This means that the users will need to have access to write
+ // temporary files or have write access on a folder within phpBB
+ // like the cache folder. If the user can't do either, then
+ // he/she needs to use the fsock ftp method
+ $temp_name = tempnam($this->tmp_path, 'transfer_');
+ @unlink($temp_name);
+
+ $fp = @fopen($temp_name, 'w');
+
+ if (!$fp)
+ {
+ trigger_error('Unable to create temporary file ' . $temp_name, E_USER_ERROR);
+ }
+
+ @fwrite($fp, $contents);
+ @fclose($fp);
+
+ $result = $this->overwrite_file($temp_name, $destination_file);
+
+ // remove temporary file now
+ @unlink($temp_name);
+
+ return $result;
+ }
+
+ /**
+ * Moving file into location. If the destination file already exists it gets overwritten
+ */
+ function overwrite_file($source_file, $destination_file)
+ {
+ /**
+ * @todo generally think about overwriting files in another way, by creating a temporary file and then renaming it
+ * @todo check for the destination file existance too
+ */
+ $this->_delete($destination_file);
+ $result = $this->_put($source_file, $destination_file);
+ $this->_chmod($destination_file, $this->file_perms);
+
+ return $result;
+ }
+
+ /**
+ * Create directory structure
+ */
+ function make_dir($dir)
+ {
+ global $phpbb_root_path;
+
+ $dir = str_replace($phpbb_root_path, '', $dir);
+ $dir = explode('/', $dir);
+ $dirs = '';
+
+ for ($i = 0, $total = sizeof($dir); $i < $total; $i++)
+ {
+ $result = true;
+
+ if (strpos($dir[$i], '.') === 0)
+ {
+ continue;
+ }
+ $cur_dir = $dir[$i] . '/';
+
+ if (!file_exists($phpbb_root_path . $dirs . $cur_dir))
+ {
+ // create the directory
+ $result = $this->_mkdir($dir[$i]);
+ $this->_chmod($dir[$i], $this->dir_perms);
+ }
+
+ $this->_chdir($this->root_path . $dirs . $dir[$i]);
+ $dirs .= $cur_dir;
+ }
+
+ $this->_chdir($this->root_path);
+
+ /**
+ * @todo stack result into array to make sure every path creation has been taken care of
+ */
+ return $result;
+ }
+
+ /**
+ * Copy file from source location to destination location
+ */
+ function copy_file($from_loc, $to_loc)
+ {
+ global $phpbb_root_path;
+
+ $from_loc = ((strpos($from_loc, $phpbb_root_path) !== 0) ? $phpbb_root_path : '') . $from_loc;
+ $to_loc = $this->root_path . str_replace($phpbb_root_path, '', $to_loc);
+
+ if (!file_exists($from_loc))
+ {
+ return false;
+ }
+
+ $result = $this->overwrite_file($from_loc, $to_loc);
+
+ return $result;
+ }
+
+ /**
+ * Remove file
+ */
+ function delete_file($file)
+ {
+ global $phpbb_root_path;
+
+ $file = $this->root_path . str_replace($phpbb_root_path, '', $file);
+
+ return $this->_delete($file);
+ }
+
+ /**
+ * Remove directory
+ * @todo remove child directories?
+ */
+ function remove_dir($dir)
+ {
+ global $phpbb_root_path;
+
+ $dir = $this->root_path . str_replace($phpbb_root_path, '', $dir);
+
+ return $this->_rmdir($dir);
+ }
+
+ /**
+ * Rename a file or folder
+ */
+ function rename($old_handle, $new_handle)
+ {
+ global $phpbb_root_path;
+
+ $old_handle = $this->root_path . str_replace($phpbb_root_path, '', $old_handle);
+
+ return $this->_rename($old_handle, $new_handle);
+ }
+
+ /**
+ * Check if a specified file exist...
+ */
+ function file_exists($directory, $filename)
+ {
+ global $phpbb_root_path;
+
+ $directory = $this->root_path . str_replace($phpbb_root_path, '', $directory);
+
+ $this->_chdir($directory);
+ $result = $this->_ls();
+
+ if ($result !== false && is_array($result))
+ {
+ return (in_array($filename, $result)) ? true : false;
+ }
+
+ return false;
+ }
+
+ /**
+ * Open session
+ */
+ function open_session()
+ {
+ return $this->_init();
+ }
+
+ /**
+ * Close current session
+ */
+ function close_session()
+ {
+ return $this->_close();
+ }
+
+ /**
+ * Determine methods able to be used
+ */
+ function methods()
+ {
+ $methods = array();
+ $disabled_functions = explode(',', @ini_get('disable_functions'));
+
+ if (@extension_loaded('ftp'))
+ {
+ $methods[] = 'ftp';
+ }
+
+ if (!in_array('fsockopen', $disabled_functions))
+ {
+ $methods[] = 'ftp_fsock';
+ }
+
+ return $methods;
+ }
+}
+
+/**
+* FTP transfer class
+* @package phpBB3
+*/
+class ftp extends transfer
+{
+ /**
+ * Standard parameters for FTP session
+ */
+ function ftp($host, $username, $password, $root_path, $port = 21, $timeout = 10)
+ {
+ $this->host = $host;
+ $this->port = $port;
+ $this->username = $username;
+ $this->password = $password;
+ $this->timeout = $timeout;
+
+ // Make sure $this->root_path is layed out the same way as the $user->page['root_script_path'] value (/ at the end)
+ $this->root_path = str_replace('\\', '/', $this->root_path);
+
+ if (!empty($root_path))
+ {
+ $this->root_path = (($root_path[0] != '/' ) ? '/' : '') . $root_path . ((substr($root_path, -1, 1) == '/') ? '' : '/');
+ }
+
+ // Init some needed values
+ transfer::transfer();
+
+ return;
+ }
+
+ /**
+ * Requests data
+ */
+ function data()
+ {
+ global $user;
+
+ return array(
+ 'host' => 'localhost',
+ 'username' => 'anonymous',
+ 'password' => '',
+ 'root_path' => $user->page['root_script_path'],
+ 'port' => 21,
+ 'timeout' => 10
+ );
+ }
+
+ /**
+ * Init FTP Session
+ * @access private
+ */
+ function _init()
+ {
+ // connect to the server
+ $this->connection = @ftp_connect($this->host, $this->port, $this->timeout);
+
+ if (!$this->connection)
+ {
+ return 'ERR_CONNECTING_SERVER';
+ }
+
+ // login to the server
+ if (!@ftp_login($this->connection, $this->username, $this->password))
+ {
+ return 'ERR_UNABLE_TO_LOGIN';
+ }
+
+ // attempt to turn pasv mode on
+ @ftp_pasv($this->connection, true);
+
+ // change to the root directory
+ if (!$this->_chdir($this->root_path))
+ {
+ return 'ERR_CHANGING_DIRECTORY';
+ }
+
+ return true;
+ }
+
+ /**
+ * Create Directory (MKDIR)
+ * @access private
+ */
+ function _mkdir($dir)
+ {
+ return @ftp_mkdir($this->connection, $dir);
+ }
+
+ /**
+ * Remove directory (RMDIR)
+ * @access private
+ */
+ function _rmdir($dir)
+ {
+ return @ftp_rmdir($this->connection, $dir);
+ }
+
+ /**
+ * Rename file
+ * @access private
+ */
+ function _rename($old_handle, $new_handle)
+ {
+ return @ftp_rename($this->connection, $old_handle, $new_handle);
+ }
+
+ /**
+ * Change current working directory (CHDIR)
+ * @access private
+ */
+ function _chdir($dir = '')
+ {
+ if ($dir && $dir !== '/')
+ {
+ if (substr($dir, -1, 1) == '/')
+ {
+ $dir = substr($dir, 0, -1);
+ }
+ }
+
+ return @ftp_chdir($this->connection, $dir);
+ }
+
+ /**
+ * change file permissions (CHMOD)
+ * @access private
+ */
+ function _chmod($file, $perms)
+ {
+ if (function_exists('ftp_chmod'))
+ {
+ $err = @ftp_chmod($this->connection, $perms, $file);
+ }
+ else
+ {
+ // Unfortunatly CHMOD is not expecting an octal value...
+ // We need to transform the integer (which was an octal) to an octal representation (to get the int) and then pass as is. ;)
+ $chmod_cmd = 'CHMOD ' . base_convert($perms, 10, 8) . ' ' . $file;
+ $err = $this->_site($chmod_cmd);
+ }
+
+ return $err;
+ }
+
+ /**
+ * Upload file to location (PUT)
+ * @access private
+ */
+ function _put($from_file, $to_file)
+ {
+ // get the file extension
+ $file_extension = strtolower(substr(strrchr($to_file, '.'), 1));
+
+ // We only use the BINARY file mode to cicumvent rewrite actions from ftp server (mostly linefeeds being replaced)
+ $mode = FTP_BINARY;
+
+ $to_dir = dirname($to_file);
+ $to_file = basename($to_file);
+ $this->_chdir($to_dir);
+
+ $result = @ftp_put($this->connection, $to_file, $from_file, $mode);
+ $this->_chdir($this->root_path);
+
+ return $result;
+ }
+
+ /**
+ * Delete file (DELETE)
+ * @access private
+ */
+ function _delete($file)
+ {
+ return @ftp_delete($this->connection, $file);
+ }
+
+ /**
+ * Close ftp session (CLOSE)
+ * @access private
+ */
+ function _close()
+ {
+ if (!$this->connection)
+ {
+ return false;
+ }
+
+ return @ftp_quit($this->connection);
+ }
+
+ /**
+ * Return current working directory (CWD)
+ * At the moment not used by parent class
+ * @access private
+ */
+ function _cwd()
+ {
+ return @ftp_pwd($this->connection);
+ }
+
+ /**
+ * Return list of files in a given directory (LS)
+ * @access private
+ */
+ function _ls($dir = './')
+ {
+ $list = @ftp_nlist($this->connection, $dir);
+
+ // See bug #46295 - Some FTP daemons don't like './'
+ if ($dir === './')
+ {
+ // Let's try some alternatives
+ $list = (empty($list)) ? @ftp_nlist($this->connection, '.') : $list;
+ $list = (empty($list)) ? @ftp_nlist($this->connection, '') : $list;
+ }
+
+ // Return on error
+ if ($list === false)
+ {
+ return false;
+ }
+
+ // Remove path if prepended
+ foreach ($list as $key => $item)
+ {
+ // Use same separator for item and dir
+ $item = str_replace('\\', '/', $item);
+ $dir = str_replace('\\', '/', $dir);
+
+ if (!empty($dir) && strpos($item, $dir) === 0)
+ {
+ $item = substr($item, strlen($dir));
+ }
+
+ $list[$key] = $item;
+ }
+
+ return $list;
+ }
+
+ /**
+ * FTP SITE command (ftp-only function)
+ * @access private
+ */
+ function _site($command)
+ {
+ return @ftp_site($this->connection, $command);
+ }
+}
+
+/**
+* FTP fsock transfer class
+*
+* @author wGEric
+* @package phpBB3
+*/
+class ftp_fsock extends transfer
+{
+ var $data_connection;
+
+ /**
+ * Standard parameters for FTP session
+ */
+ function ftp_fsock($host, $username, $password, $root_path, $port = 21, $timeout = 10)
+ {
+ $this->host = $host;
+ $this->port = $port;
+ $this->username = $username;
+ $this->password = $password;
+ $this->timeout = $timeout;
+
+ // Make sure $this->root_path is layed out the same way as the $user->page['root_script_path'] value (/ at the end)
+ $this->root_path = str_replace('\\', '/', $this->root_path);
+
+ if (!empty($root_path))
+ {
+ $this->root_path = (($root_path[0] != '/' ) ? '/' : '') . $root_path . ((substr($root_path, -1, 1) == '/') ? '' : '/');
+ }
+
+ // Init some needed values
+ transfer::transfer();
+
+ return;
+ }
+
+ /**
+ * Requests data
+ */
+ function data()
+ {
+ global $user;
+
+ return array(
+ 'host' => 'localhost',
+ 'username' => 'anonymous',
+ 'password' => '',
+ 'root_path' => $user->page['root_script_path'],
+ 'port' => 21,
+ 'timeout' => 10
+ );
+ }
+
+ /**
+ * Init FTP Session
+ * @access private
+ */
+ function _init()
+ {
+ $errno = 0;
+ $errstr = '';
+
+ // connect to the server
+ $this->connection = @fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout);
+
+ if (!$this->connection || !$this->_check_command())
+ {
+ return 'ERR_CONNECTING_SERVER';
+ }
+
+ @stream_set_timeout($this->connection, $this->timeout);
+
+ // login
+ if (!$this->_send_command('USER', $this->username))
+ {
+ return 'ERR_UNABLE_TO_LOGIN';
+ }
+
+ if (!$this->_send_command('PASS', $this->password))
+ {
+ return 'ERR_UNABLE_TO_LOGIN';
+ }
+
+ // change to the root directory
+ if (!$this->_chdir($this->root_path))
+ {
+ return 'ERR_CHANGING_DIRECTORY';
+ }
+
+ return true;
+ }
+
+ /**
+ * Create Directory (MKDIR)
+ * @access private
+ */
+ function _mkdir($dir)
+ {
+ return $this->_send_command('MKD', $dir);
+ }
+
+ /**
+ * Remove directory (RMDIR)
+ * @access private
+ */
+ function _rmdir($dir)
+ {
+ return $this->_send_command('RMD', $dir);
+ }
+
+ /**
+ * Rename File
+ * @access private
+ */
+ function _rename($old_handle, $new_handle)
+ {
+ $this->_send_command('RNFR', $old_handle);
+ return $this->_send_command('RNTO', $new_handle);
+ }
+
+ /**
+ * Change current working directory (CHDIR)
+ * @access private
+ */
+ function _chdir($dir = '')
+ {
+ if ($dir && $dir !== '/')
+ {
+ if (substr($dir, -1, 1) == '/')
+ {
+ $dir = substr($dir, 0, -1);
+ }
+ }
+
+ return $this->_send_command('CWD', $dir);
+ }
+
+ /**
+ * change file permissions (CHMOD)
+ * @access private
+ */
+ function _chmod($file, $perms)
+ {
+ // Unfortunatly CHMOD is not expecting an octal value...
+ // We need to transform the integer (which was an octal) to an octal representation (to get the int) and then pass as is. ;)
+ return $this->_send_command('SITE CHMOD', base_convert($perms, 10, 8) . ' ' . $file);
+ }
+
+ /**
+ * Upload file to location (PUT)
+ * @access private
+ */
+ function _put($from_file, $to_file)
+ {
+ // We only use the BINARY file mode to cicumvent rewrite actions from ftp server (mostly linefeeds being replaced)
+ // 'I' == BINARY
+ // 'A' == ASCII
+ if (!$this->_send_command('TYPE', 'I'))
+ {
+ return false;
+ }
+
+ // open the connection to send file over
+ if (!$this->_open_data_connection())
+ {
+ return false;
+ }
+
+ $this->_send_command('STOR', $to_file, false);
+
+ // send the file
+ $fp = @fopen($from_file, 'rb');
+ while (!@feof($fp))
+ {
+ @fwrite($this->data_connection, @fread($fp, 4096));
+ }
+ @fclose($fp);
+
+ // close connection
+ $this->_close_data_connection();
+
+ return $this->_check_command();
+ }
+
+ /**
+ * Delete file (DELETE)
+ * @access private
+ */
+ function _delete($file)
+ {
+ return $this->_send_command('DELE', $file);
+ }
+
+ /**
+ * Close ftp session (CLOSE)
+ * @access private
+ */
+ function _close()
+ {
+ if (!$this->connection)
+ {
+ return false;
+ }
+
+ return $this->_send_command('QUIT');
+ }
+
+ /**
+ * Return current working directory (CWD)
+ * At the moment not used by parent class
+ * @access private
+ */
+ function _cwd()
+ {
+ $this->_send_command('PWD', '', false);
+ return preg_replace('#^[0-9]{3} "(.+)" .+\r\n#', '\\1', $this->_check_command(true));
+ }
+
+ /**
+ * Return list of files in a given directory (LS)
+ * @access private
+ */
+ function _ls($dir = './')
+ {
+ if (!$this->_open_data_connection())
+ {
+ return false;
+ }
+
+ $this->_send_command('NLST', $dir);
+
+ $list = array();
+ while (!@feof($this->data_connection))
+ {
+ $filename = preg_replace('#[\r\n]#', '', @fgets($this->data_connection, 512));
+
+ if ($filename !== '')
+ {
+ $list[] = $filename;
+ }
+ }
+ $this->_close_data_connection();
+
+ // Clear buffer
+ $this->_check_command();
+
+ // See bug #46295 - Some FTP daemons don't like './'
+ if ($dir === './' && empty($list))
+ {
+ // Let's try some alternatives
+ $list = $this->_ls('.');
+
+ if (empty($list))
+ {
+ $list = $this->_ls('');
+ }
+
+ return $list;
+ }
+
+ // Remove path if prepended
+ foreach ($list as $key => $item)
+ {
+ // Use same separator for item and dir
+ $item = str_replace('\\', '/', $item);
+ $dir = str_replace('\\', '/', $dir);
+
+ if (!empty($dir) && strpos($item, $dir) === 0)
+ {
+ $item = substr($item, strlen($dir));
+ }
+
+ $list[$key] = $item;
+ }
+
+ return $list;
+ }
+
+ /**
+ * Send a command to server (FTP fsock only function)
+ * @access private
+ */
+ function _send_command($command, $args = '', $check = true)
+ {
+ if (!empty($args))
+ {
+ $command = "$command $args";
+ }
+
+ fwrite($this->connection, $command . "\r\n");
+
+ if ($check === true && !$this->_check_command())
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Opens a connection to send data (FTP fosck only function)
+ * @access private
+ */
+ function _open_data_connection()
+ {
+ $this->_send_command('PASV', '', false);
+
+ if (!$ip_port = $this->_check_command(true))
+ {
+ return false;
+ }
+
+ // open the connection to start sending the file
+ if (!preg_match('#[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+#', $ip_port, $temp))
+ {
+ // bad ip and port
+ return false;
+ }
+
+ $temp = explode(',', $temp[0]);
+ $server_ip = $temp[0] . '.' . $temp[1] . '.' . $temp[2] . '.' . $temp[3];
+ $server_port = $temp[4] * 256 + $temp[5];
+ $errno = 0;
+ $errstr = '';
+
+ if (!$this->data_connection = @fsockopen($server_ip, $server_port, $errno, $errstr, $this->timeout))
+ {
+ return false;
+ }
+ @stream_set_timeout($this->data_connection, $this->timeout);
+
+ return true;
+ }
+
+ /**
+ * Closes a connection used to send data
+ * @access private
+ */
+ function _close_data_connection()
+ {
+ return @fclose($this->data_connection);
+ }
+
+ /**
+ * Check to make sure command was successful (FTP fsock only function)
+ * @access private
+ */
+ function _check_command($return = false)
+ {
+ $response = '';
+
+ do
+ {
+ $result = @fgets($this->connection, 512);
+ $response .= $result;
+ }
+ while (substr($result, 3, 1) !== ' ');
+
+ if (!preg_match('#^[123]#', $response))
+ {
+ return false;
+ }
+
+ return ($return) ? $response : true;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
new file mode 100644
index 0000000000..054af29045
--- /dev/null
+++ b/phpBB/includes/functions_upload.php
@@ -0,0 +1,988 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Responsible for holding all file relevant information, as well as doing file-specific operations.
+* The {@link fileupload fileupload class} can be used to upload several files, each of them being this object to operate further on.
+* @package phpBB3
+*/
+class filespec
+{
+ var $filename = '';
+ var $realname = '';
+ var $uploadname = '';
+ var $mimetype = '';
+ var $extension = '';
+ var $filesize = 0;
+ var $width = 0;
+ var $height = 0;
+ var $image_info = array();
+
+ var $destination_file = '';
+ var $destination_path = '';
+
+ var $file_moved = false;
+ var $init_error = false;
+ var $local = false;
+
+ var $error = array();
+
+ var $upload = '';
+
+ /**
+ * File Class
+ * @access private
+ */
+ function filespec($upload_ary, $upload_namespace)
+ {
+ if (!isset($upload_ary))
+ {
+ $this->init_error = true;
+ return;
+ }
+
+ $this->filename = $upload_ary['tmp_name'];
+ $this->filesize = $upload_ary['size'];
+ $name = trim(utf8_htmlspecialchars(utf8_basename($upload_ary['name'])));
+ $this->realname = $this->uploadname = (STRIP) ? stripslashes($name) : $name;
+ $this->mimetype = $upload_ary['type'];
+
+ // Opera adds the name to the mime type
+ $this->mimetype = (strpos($this->mimetype, '; name') !== false) ? str_replace(strstr($this->mimetype, '; name'), '', $this->mimetype) : $this->mimetype;
+
+ if (!$this->mimetype)
+ {
+ $this->mimetype = 'application/octetstream';
+ }
+
+ $this->extension = strtolower($this->get_extension($this->realname));
+
+ // Try to get real filesize from temporary folder (not always working) ;)
+ $this->filesize = (@filesize($this->filename)) ? @filesize($this->filename) : $this->filesize;
+
+ $this->width = $this->height = 0;
+ $this->file_moved = false;
+
+ $this->local = (isset($upload_ary['local_mode'])) ? true : false;
+ $this->upload = $upload_namespace;
+ }
+
+ /**
+ * Cleans destination filename
+ *
+ * @param real|unique|unique_ext $mode real creates a realname, filtering some characters, lowering every character. Unique creates an unique filename
+ * @param string $prefix Prefix applied to filename
+ * @access public
+ */
+ function clean_filename($mode = 'unique', $prefix = '', $user_id = '')
+ {
+ if ($this->init_error)
+ {
+ return;
+ }
+
+ switch ($mode)
+ {
+ case 'real':
+ // Remove every extension from filename (to not let the mime bug being exposed)
+ if (strpos($this->realname, '.') !== false)
+ {
+ $this->realname = substr($this->realname, 0, strpos($this->realname, '.'));
+ }
+
+ // Replace any chars which may cause us problems with _
+ $bad_chars = array("'", "\\", ' ', '/', ':', '*', '?', '"', '<', '>', '|');
+
+ $this->realname = rawurlencode(str_replace($bad_chars, '_', strtolower($this->realname)));
+ $this->realname = preg_replace("/%(\w{2})/", '_', $this->realname);
+
+ $this->realname = $prefix . $this->realname . '.' . $this->extension;
+ break;
+
+ case 'unique':
+ $this->realname = $prefix . md5(unique_id());
+ break;
+
+ case 'avatar':
+ $this->extension = strtolower($this->extension);
+ $this->realname = $prefix . $user_id . '.' . $this->extension;
+
+ break;
+
+ case 'unique_ext':
+ default:
+ $this->realname = $prefix . md5(unique_id()) . '.' . $this->extension;
+ break;
+ }
+ }
+
+ /**
+ * Get property from file object
+ */
+ function get($property)
+ {
+ if ($this->init_error || !isset($this->$property))
+ {
+ return false;
+ }
+
+ return $this->$property;
+ }
+
+ /**
+ * Check if file is an image (mimetype)
+ *
+ * @return true if it is an image, false if not
+ */
+ function is_image()
+ {
+ return (strpos($this->mimetype, 'image/') !== false) ? true : false;
+ }
+
+ /**
+ * Check if the file got correctly uploaded
+ *
+ * @return true if it is a valid upload, false if not
+ */
+ function is_uploaded()
+ {
+ if (!$this->local && !is_uploaded_file($this->filename))
+ {
+ return false;
+ }
+
+ if ($this->local && !file_exists($this->filename))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Remove file
+ */
+ function remove()
+ {
+ if ($this->file_moved)
+ {
+ @unlink($this->destination_file);
+ }
+ }
+
+ /**
+ * Get file extension
+ */
+ function get_extension($filename)
+ {
+ if (strpos($filename, '.') === false)
+ {
+ return '';
+ }
+
+ $filename = explode('.', $filename);
+ return array_pop($filename);
+ }
+
+ /**
+ * Get mimetype. Utilize mime_content_type if the function exist.
+ * Not used at the moment...
+ */
+ function get_mimetype($filename)
+ {
+ $mimetype = '';
+
+ if (function_exists('mime_content_type'))
+ {
+ $mimetype = mime_content_type($filename);
+ }
+
+ // Some browsers choke on a mimetype of application/octet-stream
+ if (!$mimetype || $mimetype == 'application/octet-stream')
+ {
+ $mimetype = 'application/octetstream';
+ }
+
+ return $mimetype;
+ }
+
+ /**
+ * Get filesize
+ */
+ function get_filesize($filename)
+ {
+ return @filesize($filename);
+ }
+
+
+ /**
+ * Check the first 256 bytes for forbidden content
+ */
+ function check_content($disallowed_content)
+ {
+ if (empty($disallowed_content))
+ {
+ return true;
+ }
+
+ $fp = @fopen($this->filename, 'rb');
+
+ if ($fp !== false)
+ {
+ $ie_mime_relevant = fread($fp, 256);
+ fclose($fp);
+ foreach ($disallowed_content as $forbidden)
+ {
+ if (stripos($ie_mime_relevant, '<' . $forbidden) !== false)
+ {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Move file to destination folder
+ * The phpbb_root_path variable will be applied to the destination path
+ *
+ * @param string $destination_path Destination path, for example $config['avatar_path']
+ * @param bool $overwrite If set to true, an already existing file will be overwritten
+ * @param string $chmod Permission mask for chmodding the file after a successful move. The mode entered here reflects the mode defined by {@link phpbb_chmod()}
+ *
+ * @access public
+ */
+ function move_file($destination, $overwrite = false, $skip_image_check = false, $chmod = false)
+ {
+ global $user, $phpbb_root_path;
+
+ if (sizeof($this->error))
+ {
+ return false;
+ }
+
+ $chmod = ($chmod === false) ? CHMOD_READ | CHMOD_WRITE : $chmod;
+
+ // We need to trust the admin in specifying valid upload directories and an attacker not being able to overwrite it...
+ $this->destination_path = $phpbb_root_path . $destination;
+
+ // Check if the destination path exist...
+ if (!file_exists($this->destination_path))
+ {
+ @unlink($this->filename);
+ return false;
+ }
+
+ $upload_mode = (@ini_get('open_basedir') || @ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'on') ? 'move' : 'copy';
+ $upload_mode = ($this->local) ? 'local' : $upload_mode;
+ $this->destination_file = $this->destination_path . '/' . utf8_basename($this->realname);
+
+ // Check if the file already exist, else there is something wrong...
+ if (file_exists($this->destination_file) && !$overwrite)
+ {
+ @unlink($this->filename);
+ }
+ else
+ {
+ if (file_exists($this->destination_file))
+ {
+ @unlink($this->destination_file);
+ }
+
+ switch ($upload_mode)
+ {
+ case 'copy':
+
+ if (!@copy($this->filename, $this->destination_file))
+ {
+ if (!@move_uploaded_file($this->filename, $this->destination_file))
+ {
+ $this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'GENERAL_UPLOAD_ERROR'], $this->destination_file);
+ }
+ }
+
+ break;
+
+ case 'move':
+
+ if (!@move_uploaded_file($this->filename, $this->destination_file))
+ {
+ if (!@copy($this->filename, $this->destination_file))
+ {
+ $this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'GENERAL_UPLOAD_ERROR'], $this->destination_file);
+ }
+ }
+
+ break;
+
+ case 'local':
+
+ if (!@copy($this->filename, $this->destination_file))
+ {
+ $this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'GENERAL_UPLOAD_ERROR'], $this->destination_file);
+ }
+
+ break;
+ }
+
+ // Remove temporary filename
+ @unlink($this->filename);
+
+ if (sizeof($this->error))
+ {
+ return false;
+ }
+
+ phpbb_chmod($this->destination_file, $chmod);
+ }
+
+ // Try to get real filesize from destination folder
+ $this->filesize = (@filesize($this->destination_file)) ? @filesize($this->destination_file) : $this->filesize;
+
+ if ($this->is_image() && !$skip_image_check)
+ {
+ $this->width = $this->height = 0;
+
+ if (($this->image_info = @getimagesize($this->destination_file)) !== false)
+ {
+ $this->width = $this->image_info[0];
+ $this->height = $this->image_info[1];
+
+ if (!empty($this->image_info['mime']))
+ {
+ $this->mimetype = $this->image_info['mime'];
+ }
+
+ // Check image type
+ $types = $this->upload->image_types();
+
+ if (!isset($types[$this->image_info[2]]) || !in_array($this->extension, $types[$this->image_info[2]]))
+ {
+ if (!isset($types[$this->image_info[2]]))
+ {
+ $this->error[] = sprintf($user->lang['IMAGE_FILETYPE_INVALID'], $this->image_info[2], $this->mimetype);
+ }
+ else
+ {
+ $this->error[] = sprintf($user->lang['IMAGE_FILETYPE_MISMATCH'], $types[$this->image_info[2]][0], $this->extension);
+ }
+ }
+
+ // Make sure the dimensions match a valid image
+ if (empty($this->width) || empty($this->height))
+ {
+ $this->error[] = $user->lang['ATTACHED_IMAGE_NOT_IMAGE'];
+ }
+ }
+ else
+ {
+ $this->error[] = $user->lang['UNABLE_GET_IMAGE_SIZE'];
+ }
+ }
+
+ $this->file_moved = true;
+ $this->additional_checks();
+ unset($this->upload);
+
+ return true;
+ }
+
+ /**
+ * Performing additional checks
+ */
+ function additional_checks()
+ {
+ global $user;
+
+ if (!$this->file_moved)
+ {
+ return false;
+ }
+
+ // Filesize is too big or it's 0 if it was larger than the maxsize in the upload form
+ if ($this->upload->max_filesize && ($this->get('filesize') > $this->upload->max_filesize || $this->filesize == 0))
+ {
+ $max_filesize = get_formatted_filesize($this->upload->max_filesize, false);
+
+ $this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'WRONG_FILESIZE'], $max_filesize['value'], $max_filesize['unit']);
+
+ return false;
+ }
+
+ if (!$this->upload->valid_dimensions($this))
+ {
+ $this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'WRONG_SIZE'], $this->upload->min_width, $this->upload->min_height, $this->upload->max_width, $this->upload->max_height, $this->width, $this->height);
+
+ return false;
+ }
+
+ return true;
+ }
+}
+
+/**
+* Class for assigning error messages before a real filespec class can be assigned
+*
+* @package phpBB3
+*/
+class fileerror extends filespec
+{
+ function fileerror($error_msg)
+ {
+ $this->error[] = $error_msg;
+ }
+}
+
+/**
+* File upload class
+* Init class (all parameters optional and able to be set/overwritten separately) - scope is global and valid for all uploads
+*
+* @package phpBB3
+*/
+class fileupload
+{
+ var $allowed_extensions = array();
+ var $disallowed_content = array();
+ var $max_filesize = 0;
+ var $min_width = 0;
+ var $min_height = 0;
+ var $max_width = 0;
+ var $max_height = 0;
+ var $error_prefix = '';
+
+ /**
+ * Init file upload class.
+ *
+ * @param string $error_prefix Used error messages will get prefixed by this string
+ * @param array $allowed_extensions Array of allowed extensions, for example array('jpg', 'jpeg', 'gif', 'png')
+ * @param int $max_filesize Maximum filesize
+ * @param int $min_width Minimum image width (only checked for images)
+ * @param int $min_height Minimum image height (only checked for images)
+ * @param int $max_width Maximum image width (only checked for images)
+ * @param int $max_height Maximum image height (only checked for images)
+ *
+ */
+ function fileupload($error_prefix = '', $allowed_extensions = false, $max_filesize = false, $min_width = false, $min_height = false, $max_width = false, $max_height = false, $disallowed_content = false)
+ {
+ $this->set_allowed_extensions($allowed_extensions);
+ $this->set_max_filesize($max_filesize);
+ $this->set_allowed_dimensions($min_width, $min_height, $max_width, $max_height);
+ $this->set_error_prefix($error_prefix);
+ $this->set_disallowed_content($disallowed_content);
+ }
+
+ /**
+ * Reset vars
+ */
+ function reset_vars()
+ {
+ $this->max_filesize = 0;
+ $this->min_width = $this->min_height = $this->max_width = $this->max_height = 0;
+ $this->error_prefix = '';
+ $this->allowed_extensions = array();
+ $this->disallowed_content = array();
+ }
+
+ /**
+ * Set allowed extensions
+ */
+ function set_allowed_extensions($allowed_extensions)
+ {
+ if ($allowed_extensions !== false && is_array($allowed_extensions))
+ {
+ $this->allowed_extensions = $allowed_extensions;
+ }
+ }
+
+ /**
+ * Set allowed dimensions
+ */
+ function set_allowed_dimensions($min_width, $min_height, $max_width, $max_height)
+ {
+ $this->min_width = (int) $min_width;
+ $this->min_height = (int) $min_height;
+ $this->max_width = (int) $max_width;
+ $this->max_height = (int) $max_height;
+ }
+
+ /**
+ * Set maximum allowed filesize
+ */
+ function set_max_filesize($max_filesize)
+ {
+ if ($max_filesize !== false && (int) $max_filesize)
+ {
+ $this->max_filesize = (int) $max_filesize;
+ }
+ }
+
+ /**
+ * Set disallowed strings
+ */
+ function set_disallowed_content($disallowed_content)
+ {
+ if ($disallowed_content !== false && is_array($disallowed_content))
+ {
+ $this->disallowed_content = $disallowed_content;
+ }
+ }
+
+ /**
+ * Set error prefix
+ */
+ function set_error_prefix($error_prefix)
+ {
+ $this->error_prefix = $error_prefix;
+ }
+
+ /**
+ * Form upload method
+ * Upload file from users harddisk
+ *
+ * @param string $form_name Form name assigned to the file input field (if it is an array, the key has to be specified)
+ * @return object $file Object "filespec" is returned, all further operations can be done with this object
+ * @access public
+ */
+ function form_upload($form_name)
+ {
+ global $user;
+
+ unset($_FILES[$form_name]['local_mode']);
+ $file = new filespec($_FILES[$form_name], $this);
+
+ if ($file->init_error)
+ {
+ $file->error[] = '';
+ return $file;
+ }
+
+ // Error array filled?
+ if (isset($_FILES[$form_name]['error']))
+ {
+ $error = $this->assign_internal_error($_FILES[$form_name]['error']);
+
+ if ($error !== false)
+ {
+ $file->error[] = $error;
+ return $file;
+ }
+ }
+
+ // Check if empty file got uploaded (not catched by is_uploaded_file)
+ if (isset($_FILES[$form_name]['size']) && $_FILES[$form_name]['size'] == 0)
+ {
+ $file->error[] = $user->lang[$this->error_prefix . 'EMPTY_FILEUPLOAD'];
+ return $file;
+ }
+
+ // PHP Upload filesize exceeded
+ if ($file->get('filename') == 'none')
+ {
+ $max_filesize = @ini_get('upload_max_filesize');
+ $unit = 'MB';
+
+ if (!empty($max_filesize))
+ {
+ $unit = strtolower(substr($max_filesize, -1, 1));
+ $max_filesize = (int) $max_filesize;
+
+ $unit = ($unit == 'k') ? 'KB' : (($unit == 'g') ? 'GB' : 'MB');
+ }
+
+ $file->error[] = (empty($max_filesize)) ? $user->lang[$this->error_prefix . 'PHP_SIZE_NA'] : sprintf($user->lang[$this->error_prefix . 'PHP_SIZE_OVERRUN'], $max_filesize, $user->lang[$unit]);
+ return $file;
+ }
+
+ // Not correctly uploaded
+ if (!$file->is_uploaded())
+ {
+ $file->error[] = $user->lang[$this->error_prefix . 'NOT_UPLOADED'];
+ return $file;
+ }
+
+ $this->common_checks($file);
+
+ return $file;
+ }
+
+ /**
+ * Move file from another location to phpBB
+ */
+ function local_upload($source_file, $filedata = false)
+ {
+ global $user;
+
+ $form_name = 'local';
+
+ $_FILES[$form_name]['local_mode'] = true;
+ $_FILES[$form_name]['tmp_name'] = $source_file;
+
+ if ($filedata === false)
+ {
+ $_FILES[$form_name]['name'] = utf8_basename($source_file);
+ $_FILES[$form_name]['size'] = 0;
+ $mimetype = '';
+
+ if (function_exists('mime_content_type'))
+ {
+ $mimetype = mime_content_type($source_file);
+ }
+
+ // Some browsers choke on a mimetype of application/octet-stream
+ if (!$mimetype || $mimetype == 'application/octet-stream')
+ {
+ $mimetype = 'application/octetstream';
+ }
+
+ $_FILES[$form_name]['type'] = $mimetype;
+ }
+ else
+ {
+ $_FILES[$form_name]['name'] = $filedata['realname'];
+ $_FILES[$form_name]['size'] = $filedata['size'];
+ $_FILES[$form_name]['type'] = $filedata['type'];
+ }
+
+ $file = new filespec($_FILES[$form_name], $this);
+
+ if ($file->init_error)
+ {
+ $file->error[] = '';
+ return $file;
+ }
+
+ if (isset($_FILES[$form_name]['error']))
+ {
+ $error = $this->assign_internal_error($_FILES[$form_name]['error']);
+
+ if ($error !== false)
+ {
+ $file->error[] = $error;
+ return $file;
+ }
+ }
+
+ // PHP Upload filesize exceeded
+ if ($file->get('filename') == 'none')
+ {
+ $max_filesize = @ini_get('upload_max_filesize');
+ $unit = 'MB';
+
+ if (!empty($max_filesize))
+ {
+ $unit = strtolower(substr($max_filesize, -1, 1));
+ $max_filesize = (int) $max_filesize;
+
+ $unit = ($unit == 'k') ? 'KB' : (($unit == 'g') ? 'GB' : 'MB');
+ }
+
+ $file->error[] = (empty($max_filesize)) ? $user->lang[$this->error_prefix . 'PHP_SIZE_NA'] : sprintf($user->lang[$this->error_prefix . 'PHP_SIZE_OVERRUN'], $max_filesize, $user->lang[$unit]);
+ return $file;
+ }
+
+ // Not correctly uploaded
+ if (!$file->is_uploaded())
+ {
+ $file->error[] = $user->lang[$this->error_prefix . 'NOT_UPLOADED'];
+ return $file;
+ }
+
+ $this->common_checks($file);
+
+ return $file;
+ }
+
+ /**
+ * Remote upload method
+ * Uploads file from given url
+ *
+ * @param string $upload_url URL pointing to file to upload, for example http://www.foobar.com/example.gif
+ * @return object $file Object "filespec" is returned, all further operations can be done with this object
+ * @access public
+ */
+ function remote_upload($upload_url)
+ {
+ global $user, $phpbb_root_path;
+
+ $upload_ary = array();
+ $upload_ary['local_mode'] = true;
+
+ if (!preg_match('#^(https?://).*?\.(' . implode('|', $this->allowed_extensions) . ')$#i', $upload_url, $match))
+ {
+ $file = new fileerror($user->lang[$this->error_prefix . 'URL_INVALID']);
+ return $file;
+ }
+
+ if (empty($match[2]))
+ {
+ $file = new fileerror($user->lang[$this->error_prefix . 'URL_INVALID']);
+ return $file;
+ }
+
+ $url = parse_url($upload_url);
+
+ $host = $url['host'];
+ $path = $url['path'];
+ $port = (!empty($url['port'])) ? (int) $url['port'] : 80;
+
+ $upload_ary['type'] = 'application/octet-stream';
+
+ $url['path'] = explode('.', $url['path']);
+ $ext = array_pop($url['path']);
+
+ $url['path'] = implode('', $url['path']);
+ $upload_ary['name'] = utf8_basename($url['path']) . (($ext) ? '.' . $ext : '');
+ $filename = $url['path'];
+ $filesize = 0;
+
+ $errno = 0;
+ $errstr = '';
+
+ if (!($fsock = @fsockopen($host, $port, $errno, $errstr)))
+ {
+ $file = new fileerror($user->lang[$this->error_prefix . 'NOT_UPLOADED']);
+ return $file;
+ }
+
+ // Make sure $path not beginning with /
+ if (strpos($path, '/') === 0)
+ {
+ $path = substr($path, 1);
+ }
+
+ fputs($fsock, 'GET /' . $path . " HTTP/1.1\r\n");
+ fputs($fsock, "HOST: " . $host . "\r\n");
+ fputs($fsock, "Connection: close\r\n\r\n");
+
+ $get_info = false;
+ $data = '';
+ while (!@feof($fsock))
+ {
+ if ($get_info)
+ {
+ $data .= @fread($fsock, 1024);
+ }
+ else
+ {
+ $line = @fgets($fsock, 1024);
+
+ if ($line == "\r\n")
+ {
+ $get_info = true;
+ }
+ else
+ {
+ if (stripos($line, 'content-type: ') !== false)
+ {
+ $upload_ary['type'] = rtrim(str_replace('content-type: ', '', strtolower($line)));
+ }
+ else if (stripos($line, '404 not found') !== false)
+ {
+ $file = new fileerror($user->lang[$this->error_prefix . 'URL_NOT_FOUND']);
+ return $file;
+ }
+ }
+ }
+ }
+ @fclose($fsock);
+
+ if (empty($data))
+ {
+ $file = new fileerror($user->lang[$this->error_prefix . 'EMPTY_REMOTE_DATA']);
+ return $file;
+ }
+
+ $tmp_path = (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') ? false : $phpbb_root_path . 'cache';
+ $filename = tempnam($tmp_path, unique_id() . '-');
+
+ if (!($fp = @fopen($filename, 'wb')))
+ {
+ $file = new fileerror($user->lang[$this->error_prefix . 'NOT_UPLOADED']);
+ return $file;
+ }
+
+ $upload_ary['size'] = fwrite($fp, $data);
+ fclose($fp);
+ unset($data);
+
+ $upload_ary['tmp_name'] = $filename;
+
+ $file = new filespec($upload_ary, $this);
+ $this->common_checks($file);
+
+ return $file;
+ }
+
+ /**
+ * Assign internal error
+ * @access private
+ */
+ function assign_internal_error($errorcode)
+ {
+ global $user;
+
+ switch ($errorcode)
+ {
+ case 1:
+ $max_filesize = @ini_get('upload_max_filesize');
+ $unit = 'MB';
+
+ if (!empty($max_filesize))
+ {
+ $unit = strtolower(substr($max_filesize, -1, 1));
+ $max_filesize = (int) $max_filesize;
+
+ $unit = ($unit == 'k') ? 'KB' : (($unit == 'g') ? 'GB' : 'MB');
+ }
+
+ $error = (empty($max_filesize)) ? $user->lang[$this->error_prefix . 'PHP_SIZE_NA'] : sprintf($user->lang[$this->error_prefix . 'PHP_SIZE_OVERRUN'], $max_filesize, $user->lang[$unit]);
+ break;
+
+ case 2:
+ $max_filesize = get_formatted_filesize($this->max_filesize, false);
+
+ $error = sprintf($user->lang[$this->error_prefix . 'WRONG_FILESIZE'], $max_filesize['value'], $max_filesize['unit']);
+ break;
+
+ case 3:
+ $error = $user->lang[$this->error_prefix . 'PARTIAL_UPLOAD'];
+ break;
+
+ case 4:
+ $error = $user->lang[$this->error_prefix . 'NOT_UPLOADED'];
+ break;
+
+ case 6:
+ $error = 'Temporary folder could not be found. Please check your PHP installation.';
+ break;
+
+ default:
+ $error = false;
+ break;
+ }
+
+ return $error;
+ }
+
+ /**
+ * Perform common checks
+ */
+ function common_checks(&$file)
+ {
+ global $user;
+
+ // Filesize is too big or it's 0 if it was larger than the maxsize in the upload form
+ if ($this->max_filesize && ($file->get('filesize') > $this->max_filesize || $file->get('filesize') == 0))
+ {
+ $max_filesize = get_formatted_filesize($this->max_filesize, false);
+
+ $file->error[] = sprintf($user->lang[$this->error_prefix . 'WRONG_FILESIZE'], $max_filesize['value'], $max_filesize['unit']);
+ }
+
+ // check Filename
+ if (preg_match("#[\\/:*?\"<>|]#i", $file->get('realname')))
+ {
+ $file->error[] = sprintf($user->lang[$this->error_prefix . 'INVALID_FILENAME'], $file->get('realname'));
+ }
+
+ // Invalid Extension
+ if (!$this->valid_extension($file))
+ {
+ $file->error[] = sprintf($user->lang[$this->error_prefix . 'DISALLOWED_EXTENSION'], $file->get('extension'));
+ }
+
+ // MIME Sniffing
+ if (!$this->valid_content($file))
+ {
+ $file->error[] = sprintf($user->lang[$this->error_prefix . 'DISALLOWED_CONTENT']);
+ }
+ }
+
+ /**
+ * Check for allowed extension
+ */
+ function valid_extension(&$file)
+ {
+ return (in_array($file->get('extension'), $this->allowed_extensions)) ? true : false;
+ }
+
+ /**
+ * Check for allowed dimension
+ */
+ function valid_dimensions(&$file)
+ {
+ if (!$this->max_width && !$this->max_height && !$this->min_width && !$this->min_height)
+ {
+ return true;
+ }
+
+ if (($file->get('width') > $this->max_width && $this->max_width) ||
+ ($file->get('height') > $this->max_height && $this->max_height) ||
+ ($file->get('width') < $this->min_width && $this->min_width) ||
+ ($file->get('height') < $this->min_height && $this->min_height))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Check if form upload is valid
+ */
+ function is_valid($form_name)
+ {
+ return (isset($_FILES[$form_name]) && $_FILES[$form_name]['name'] != 'none') ? true : false;
+ }
+
+
+ /**
+ * Check for allowed extension
+ */
+ function valid_content(&$file)
+ {
+ return ($file->check_content($this->disallowed_content));
+ }
+
+ /**
+ * Return image type/extension mapping
+ */
+ function image_types()
+ {
+ return array(
+ 1 => array('gif'),
+ 2 => array('jpg', 'jpeg'),
+ 3 => array('png'),
+ 4 => array('swf'),
+ 5 => array('psd'),
+ 6 => array('bmp'),
+ 7 => array('tif', 'tiff'),
+ 8 => array('tif', 'tiff'),
+ 9 => array('jpg', 'jpeg'),
+ 10 => array('jpg', 'jpeg'),
+ 11 => array('jpg', 'jpeg'),
+ 12 => array('jpg', 'jpeg'),
+ 13 => array('swc'),
+ 14 => array('iff'),
+ 15 => array('wbmp'),
+ 16 => array('xbm'),
+ );
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
new file mode 100644
index 0000000000..7255d138ab
--- /dev/null
+++ b/phpBB/includes/functions_user.php
@@ -0,0 +1,3582 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Obtain user_ids from usernames or vice versa. Returns false on
+* success else the error string
+*
+* @param array &$user_id_ary The user ids to check or empty if usernames used
+* @param array &$username_ary The usernames to check or empty if user ids used
+* @param mixed $user_type Array of user types to check, false if not restricting by user type
+*/
+function user_get_id_name(&$user_id_ary, &$username_ary, $user_type = false)
+{
+ global $db;
+
+ // Are both arrays already filled? Yep, return else
+ // are neither array filled?
+ if ($user_id_ary && $username_ary)
+ {
+ return false;
+ }
+ else if (!$user_id_ary && !$username_ary)
+ {
+ return 'NO_USERS';
+ }
+
+ $which_ary = ($user_id_ary) ? 'user_id_ary' : 'username_ary';
+
+ if ($$which_ary && !is_array($$which_ary))
+ {
+ $$which_ary = array($$which_ary);
+ }
+
+ $sql_in = ($which_ary == 'user_id_ary') ? array_map('intval', $$which_ary) : array_map('utf8_clean_string', $$which_ary);
+ unset($$which_ary);
+
+ $user_id_ary = $username_ary = array();
+
+ // Grab the user id/username records
+ $sql_where = ($which_ary == 'user_id_ary') ? 'user_id' : 'username_clean';
+ $sql = 'SELECT user_id, username
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set($sql_where, $sql_in);
+
+ if ($user_type !== false && !empty($user_type))
+ {
+ $sql .= ' AND ' . $db->sql_in_set('user_type', $user_type);
+ }
+
+ $result = $db->sql_query($sql);
+
+ if (!($row = $db->sql_fetchrow($result)))
+ {
+ $db->sql_freeresult($result);
+ return 'NO_USERS';
+ }
+
+ do
+ {
+ $username_ary[$row['user_id']] = $row['username'];
+ $user_id_ary[] = $row['user_id'];
+ }
+ while ($row = $db->sql_fetchrow($result));
+ $db->sql_freeresult($result);
+
+ return false;
+}
+
+/**
+* Get latest registered username and update database to reflect it
+*/
+function update_last_username()
+{
+ global $db;
+
+ // Get latest username
+ $sql = 'SELECT user_id, username, user_colour
+ FROM ' . USERS_TABLE . '
+ WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
+ ORDER BY user_id DESC';
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ set_config('newest_user_id', $row['user_id'], true);
+ set_config('newest_username', $row['username'], true);
+ set_config('newest_user_colour', $row['user_colour'], true);
+ }
+}
+
+/**
+* Updates a username across all relevant tables/fields
+*
+* @param string $old_name the old/current username
+* @param string $new_name the new username
+*/
+function user_update_name($old_name, $new_name)
+{
+ global $config, $db, $cache;
+
+ $update_ary = array(
+ FORUMS_TABLE => array('forum_last_poster_name'),
+ MODERATOR_CACHE_TABLE => array('username'),
+ POSTS_TABLE => array('post_username'),
+ TOPICS_TABLE => array('topic_first_poster_name', 'topic_last_poster_name'),
+ );
+
+ foreach ($update_ary as $table => $field_ary)
+ {
+ foreach ($field_ary as $field)
+ {
+ $sql = "UPDATE $table
+ SET $field = '" . $db->sql_escape($new_name) . "'
+ WHERE $field = '" . $db->sql_escape($old_name) . "'";
+ $db->sql_query($sql);
+ }
+ }
+
+ if ($config['newest_username'] == $old_name)
+ {
+ set_config('newest_username', $new_name, true);
+ }
+
+ // Because some tables/caches use username-specific data we need to purge this here.
+ $cache->destroy('sql', MODERATOR_CACHE_TABLE);
+}
+
+/**
+* Adds an user
+*
+* @param mixed $user_row An array containing the following keys (and the appropriate values): username, group_id (the group to place the user in), user_email and the user_type(usually 0). Additional entries not overridden by defaults will be forwarded.
+* @param string $cp_data custom profile fields, see custom_profile::build_insert_sql_array
+* @return the new user's ID.
+*/
+function user_add($user_row, $cp_data = false)
+{
+ global $db, $user, $auth, $config, $phpbb_root_path, $phpEx;
+
+ if (empty($user_row['username']) || !isset($user_row['group_id']) || !isset($user_row['user_email']) || !isset($user_row['user_type']))
+ {
+ return false;
+ }
+
+ $username_clean = utf8_clean_string($user_row['username']);
+
+ if (empty($username_clean))
+ {
+ return false;
+ }
+
+ $sql_ary = array(
+ 'username' => $user_row['username'],
+ 'username_clean' => $username_clean,
+ 'user_password' => (isset($user_row['user_password'])) ? $user_row['user_password'] : '',
+ 'user_pass_convert' => 0,
+ 'user_email' => strtolower($user_row['user_email']),
+ 'user_email_hash' => phpbb_email_hash($user_row['user_email']),
+ 'group_id' => $user_row['group_id'],
+ 'user_type' => $user_row['user_type'],
+ );
+
+ // These are the additional vars able to be specified
+ $additional_vars = array(
+ 'user_permissions' => '',
+ 'user_timezone' => $config['board_timezone'],
+ 'user_dateformat' => $config['default_dateformat'],
+ 'user_lang' => $config['default_lang'],
+ 'user_style' => (int) $config['default_style'],
+ 'user_actkey' => '',
+ 'user_ip' => '',
+ 'user_regdate' => time(),
+ 'user_passchg' => time(),
+ 'user_options' => 230271,
+ // We do not set the new flag here - registration scripts need to specify it
+ 'user_new' => 0,
+
+ 'user_inactive_reason' => 0,
+ 'user_inactive_time' => 0,
+ 'user_lastmark' => time(),
+ 'user_lastvisit' => 0,
+ 'user_lastpost_time' => 0,
+ 'user_lastpage' => '',
+ 'user_posts' => 0,
+ 'user_dst' => (int) $config['board_dst'],
+ 'user_colour' => '',
+ 'user_occ' => '',
+ 'user_interests' => '',
+ 'user_avatar' => '',
+ 'user_avatar_type' => 0,
+ 'user_avatar_width' => 0,
+ 'user_avatar_height' => 0,
+ 'user_new_privmsg' => 0,
+ 'user_unread_privmsg' => 0,
+ 'user_last_privmsg' => 0,
+ 'user_message_rules' => 0,
+ 'user_full_folder' => PRIVMSGS_NO_BOX,
+ 'user_emailtime' => 0,
+
+ 'user_notify' => 0,
+ 'user_notify_pm' => 1,
+ 'user_notify_type' => NOTIFY_EMAIL,
+ 'user_allow_pm' => 1,
+ 'user_allow_viewonline' => 1,
+ 'user_allow_viewemail' => 1,
+ 'user_allow_massemail' => 1,
+
+ 'user_sig' => '',
+ 'user_sig_bbcode_uid' => '',
+ 'user_sig_bbcode_bitfield' => '',
+
+ 'user_form_salt' => unique_id(),
+ );
+
+ // Now fill the sql array with not required variables
+ foreach ($additional_vars as $key => $default_value)
+ {
+ $sql_ary[$key] = (isset($user_row[$key])) ? $user_row[$key] : $default_value;
+ }
+
+ // Any additional variables in $user_row not covered above?
+ $remaining_vars = array_diff(array_keys($user_row), array_keys($sql_ary));
+
+ // Now fill our sql array with the remaining vars
+ if (sizeof($remaining_vars))
+ {
+ foreach ($remaining_vars as $key)
+ {
+ $sql_ary[$key] = $user_row[$key];
+ }
+ }
+
+ $sql = 'INSERT INTO ' . USERS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ $db->sql_query($sql);
+
+ $user_id = $db->sql_nextid();
+
+ // Insert Custom Profile Fields
+ if ($cp_data !== false && sizeof($cp_data))
+ {
+ $cp_data['user_id'] = (int) $user_id;
+
+ if (!class_exists('custom_profile'))
+ {
+ include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
+ }
+
+ $sql = 'INSERT INTO ' . PROFILE_FIELDS_DATA_TABLE . ' ' .
+ $db->sql_build_array('INSERT', custom_profile::build_insert_sql_array($cp_data));
+ $db->sql_query($sql);
+ }
+
+ // Place into appropriate group...
+ $sql = 'INSERT INTO ' . USER_GROUP_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'user_id' => (int) $user_id,
+ 'group_id' => (int) $user_row['group_id'],
+ 'user_pending' => 0)
+ );
+ $db->sql_query($sql);
+
+ // Now make it the users default group...
+ group_set_user_default($user_row['group_id'], array($user_id), false);
+
+ // Add to newly registered users group if user_new is 1
+ if ($config['new_member_post_limit'] && $sql_ary['user_new'])
+ {
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = 'NEWLY_REGISTERED'
+ AND group_type = " . GROUP_SPECIAL;
+ $result = $db->sql_query($sql);
+ $add_group_id = (int) $db->sql_fetchfield('group_id');
+ $db->sql_freeresult($result);
+
+ if ($add_group_id)
+ {
+ // Because these actions only fill the log unneccessarily we skip the add_log() entry with a little hack. :/
+ $GLOBALS['skip_add_log'] = true;
+
+ // Add user to "newly registered users" group and set to default group if admin specified so.
+ if ($config['new_member_group_default'])
+ {
+ group_user_add($add_group_id, $user_id, false, false, true);
+ }
+ else
+ {
+ group_user_add($add_group_id, $user_id);
+ }
+
+ unset($GLOBALS['skip_add_log']);
+ }
+ }
+
+ // set the newest user and adjust the user count if the user is a normal user and no activation mail is sent
+ if ($user_row['user_type'] == USER_NORMAL || $user_row['user_type'] == USER_FOUNDER)
+ {
+ set_config('newest_user_id', $user_id, true);
+ set_config('newest_username', $user_row['username'], true);
+ set_config_count('num_users', 1, true);
+
+ $sql = 'SELECT group_colour
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_id = ' . (int) $user_row['group_id'];
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ set_config('newest_user_colour', $row['group_colour'], true);
+ }
+
+ return $user_id;
+}
+
+/**
+* Remove User
+*/
+function user_delete($mode, $user_id, $post_username = false)
+{
+ global $cache, $config, $db, $user, $auth;
+ global $phpbb_root_path, $phpEx;
+
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . $user_id;
+ $result = $db->sql_query($sql);
+ $user_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$user_row)
+ {
+ return false;
+ }
+
+ // Before we begin, we will remove the reports the user issued.
+ $sql = 'SELECT r.post_id, p.topic_id
+ FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p
+ WHERE r.user_id = ' . $user_id . '
+ AND p.post_id = r.post_id';
+ $result = $db->sql_query($sql);
+
+ $report_posts = $report_topics = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $report_posts[] = $row['post_id'];
+ $report_topics[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($report_posts))
+ {
+ $report_posts = array_unique($report_posts);
+ $report_topics = array_unique($report_topics);
+
+ // Get a list of topics that still contain reported posts
+ $sql = 'SELECT DISTINCT topic_id
+ FROM ' . POSTS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $report_topics) . '
+ AND post_reported = 1
+ AND ' . $db->sql_in_set('post_id', $report_posts, true);
+ $result = $db->sql_query($sql);
+
+ $keep_report_topics = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $keep_report_topics[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($keep_report_topics))
+ {
+ $report_topics = array_diff($report_topics, $keep_report_topics);
+ }
+ unset($keep_report_topics);
+
+ // Now set the flags back
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET post_reported = 0
+ WHERE ' . $db->sql_in_set('post_id', $report_posts);
+ $db->sql_query($sql);
+
+ if (sizeof($report_topics))
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_reported = 0
+ WHERE ' . $db->sql_in_set('topic_id', $report_topics);
+ $db->sql_query($sql);
+ }
+ }
+
+ // Remove reports
+ $db->sql_query('DELETE FROM ' . REPORTS_TABLE . ' WHERE user_id = ' . $user_id);
+
+ if ($user_row['user_avatar'] && $user_row['user_avatar_type'] == AVATAR_UPLOAD)
+ {
+ avatar_delete('user', $user_row);
+ }
+
+ switch ($mode)
+ {
+ case 'retain':
+
+ $db->sql_transaction('begin');
+
+ if ($post_username === false)
+ {
+ $post_username = $user->lang['GUEST'];
+ }
+
+ // If the user is inactive and newly registered we assume no posts from this user being there...
+ if ($user_row['user_type'] == USER_INACTIVE && $user_row['user_inactive_reason'] == INACTIVE_REGISTER && !$user_row['user_posts'])
+ {
+ }
+ else
+ {
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET forum_last_poster_id = ' . ANONYMOUS . ", forum_last_poster_name = '" . $db->sql_escape($post_username) . "', forum_last_poster_colour = ''
+ WHERE forum_last_poster_id = $user_id";
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET poster_id = ' . ANONYMOUS . ", post_username = '" . $db->sql_escape($post_username) . "'
+ WHERE poster_id = $user_id";
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET post_edit_user = ' . ANONYMOUS . "
+ WHERE post_edit_user = $user_id";
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_poster = ' . ANONYMOUS . ", topic_first_poster_name = '" . $db->sql_escape($post_username) . "', topic_first_poster_colour = ''
+ WHERE topic_poster = $user_id";
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_last_poster_id = ' . ANONYMOUS . ", topic_last_poster_name = '" . $db->sql_escape($post_username) . "', topic_last_poster_colour = ''
+ WHERE topic_last_poster_id = $user_id";
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
+ SET poster_id = ' . ANONYMOUS . "
+ WHERE poster_id = $user_id";
+ $db->sql_query($sql);
+
+ // Since we change every post by this author, we need to count this amount towards the anonymous user
+
+ // Update the post count for the anonymous user
+ if ($user_row['user_posts'])
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_posts = user_posts + ' . $user_row['user_posts'] . '
+ WHERE user_id = ' . ANONYMOUS;
+ $db->sql_query($sql);
+ }
+ }
+
+ $db->sql_transaction('commit');
+
+ break;
+
+ case 'remove':
+
+ if (!function_exists('delete_posts'))
+ {
+ include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+ }
+
+ $sql = 'SELECT topic_id, COUNT(post_id) AS total_posts
+ FROM ' . POSTS_TABLE . "
+ WHERE poster_id = $user_id
+ GROUP BY topic_id";
+ $result = $db->sql_query($sql);
+
+ $topic_id_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_id_ary[$row['topic_id']] = $row['total_posts'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($topic_id_ary))
+ {
+ $sql = 'SELECT topic_id, topic_replies, topic_replies_real
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', array_keys($topic_id_ary));
+ $result = $db->sql_query($sql);
+
+ $del_topic_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (max($row['topic_replies'], $row['topic_replies_real']) + 1 == $topic_id_ary[$row['topic_id']])
+ {
+ $del_topic_ary[] = $row['topic_id'];
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($del_topic_ary))
+ {
+ $sql = 'DELETE FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $del_topic_ary);
+ $db->sql_query($sql);
+ }
+ }
+
+ // Delete posts, attachments, etc.
+ delete_posts('poster_id', $user_id);
+
+ break;
+ }
+
+ $db->sql_transaction('begin');
+
+ $table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE, SESSIONS_KEYS_TABLE);
+
+ foreach ($table_ary as $table)
+ {
+ $sql = "DELETE FROM $table
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
+ }
+
+ $cache->destroy('sql', MODERATOR_CACHE_TABLE);
+
+ // Delete user log entries about this user
+ $sql = 'DELETE FROM ' . LOG_TABLE . '
+ WHERE reportee_id = ' . $user_id;
+ $db->sql_query($sql);
+
+ // Change user_id to anonymous for this users triggered events
+ $sql = 'UPDATE ' . LOG_TABLE . '
+ SET user_id = ' . ANONYMOUS . '
+ WHERE user_id = ' . $user_id;
+ $db->sql_query($sql);
+
+ // Delete the user_id from the zebra table
+ $sql = 'DELETE FROM ' . ZEBRA_TABLE . '
+ WHERE user_id = ' . $user_id . '
+ OR zebra_id = ' . $user_id;
+ $db->sql_query($sql);
+
+ // Delete the user_id from the banlist
+ $sql = 'DELETE FROM ' . BANLIST_TABLE . '
+ WHERE ban_userid = ' . $user_id;
+ $db->sql_query($sql);
+
+ // Delete the user_id from the session table
+ $sql = 'DELETE FROM ' . SESSIONS_TABLE . '
+ WHERE session_user_id = ' . $user_id;
+ $db->sql_query($sql);
+
+ // Remove any undelivered mails...
+ $sql = 'SELECT msg_id, user_id
+ FROM ' . PRIVMSGS_TO_TABLE . '
+ WHERE author_id = ' . $user_id . '
+ AND folder_id = ' . PRIVMSGS_NO_BOX;
+ $result = $db->sql_query($sql);
+
+ $undelivered_msg = $undelivered_user = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $undelivered_msg[] = $row['msg_id'];
+ $undelivered_user[$row['user_id']][] = true;
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($undelivered_msg))
+ {
+ $sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
+ WHERE ' . $db->sql_in_set('msg_id', $undelivered_msg);
+ $db->sql_query($sql);
+ }
+
+ $sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . '
+ WHERE author_id = ' . $user_id . '
+ AND folder_id = ' . PRIVMSGS_NO_BOX;
+ $db->sql_query($sql);
+
+ // Delete all to-information
+ $sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . '
+ WHERE user_id = ' . $user_id;
+ $db->sql_query($sql);
+
+ // Set the remaining author id to anonymous - this way users are still able to read messages from users being removed
+ $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
+ SET author_id = ' . ANONYMOUS . '
+ WHERE author_id = ' . $user_id;
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . '
+ SET author_id = ' . ANONYMOUS . '
+ WHERE author_id = ' . $user_id;
+ $db->sql_query($sql);
+
+ foreach ($undelivered_user as $_user_id => $ary)
+ {
+ if ($_user_id == $user_id)
+ {
+ continue;
+ }
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_new_privmsg = user_new_privmsg - ' . sizeof($ary) . ',
+ user_unread_privmsg = user_unread_privmsg - ' . sizeof($ary) . '
+ WHERE user_id = ' . $_user_id;
+ $db->sql_query($sql);
+ }
+
+ $db->sql_transaction('commit');
+
+ // Reset newest user info if appropriate
+ if ($config['newest_user_id'] == $user_id)
+ {
+ update_last_username();
+ }
+
+ // Decrement number of users if this user is active
+ if ($user_row['user_type'] != USER_INACTIVE && $user_row['user_type'] != USER_IGNORE)
+ {
+ set_config_count('num_users', -1, true);
+ }
+
+ return false;
+}
+
+/**
+* Flips user_type from active to inactive and vice versa, handles group membership updates
+*
+* @param string $mode can be flip for flipping from active/inactive, activate or deactivate
+*/
+function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
+{
+ global $config, $db, $user, $auth;
+
+ $deactivated = $activated = 0;
+ $sql_statements = array();
+
+ if (!is_array($user_id_ary))
+ {
+ $user_id_ary = array($user_id_ary);
+ }
+
+ if (!sizeof($user_id_ary))
+ {
+ return;
+ }
+
+ $sql = 'SELECT user_id, group_id, user_type, user_inactive_reason
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $user_id_ary);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $sql_ary = array();
+
+ if ($row['user_type'] == USER_IGNORE || $row['user_type'] == USER_FOUNDER ||
+ ($mode == 'activate' && $row['user_type'] != USER_INACTIVE) ||
+ ($mode == 'deactivate' && $row['user_type'] == USER_INACTIVE))
+ {
+ continue;
+ }
+
+ if ($row['user_type'] == USER_INACTIVE)
+ {
+ $activated++;
+ }
+ else
+ {
+ $deactivated++;
+
+ // Remove the users session key...
+ $user->reset_login_keys($row['user_id']);
+ }
+
+ $sql_ary += array(
+ 'user_type' => ($row['user_type'] == USER_NORMAL) ? USER_INACTIVE : USER_NORMAL,
+ 'user_inactive_time' => ($row['user_type'] == USER_NORMAL) ? time() : 0,
+ 'user_inactive_reason' => ($row['user_type'] == USER_NORMAL) ? $reason : 0,
+ );
+
+ $sql_statements[$row['user_id']] = $sql_ary;
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($sql_statements))
+ {
+ foreach ($sql_statements as $user_id => $sql_ary)
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . $user_id;
+ $db->sql_query($sql);
+ }
+
+ $auth->acl_clear_prefetch(array_keys($sql_statements));
+ }
+
+ if ($deactivated)
+ {
+ set_config_count('num_users', $deactivated * (-1), true);
+ }
+
+ if ($activated)
+ {
+ set_config_count('num_users', $activated, true);
+ }
+
+ // Update latest username
+ update_last_username();
+}
+
+/**
+* Add a ban or ban exclusion to the banlist. Bans either a user, an IP or an email address
+*
+* @param string $mode Type of ban. One of the following: user, ip, email
+* @param mixed $ban Banned entity. Either string or array with usernames, ips or email addresses
+* @param int $ban_len Ban length in minutes
+* @param string $ban_len_other Ban length as a date (YYYY-MM-DD)
+* @param boolean $ban_exclude Exclude these entities from banning?
+* @param string $ban_reason String describing the reason for this ban
+* @return boolean
+*/
+function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason = '')
+{
+ global $db, $user, $auth, $cache;
+
+ // Delete stale bans
+ $sql = 'DELETE FROM ' . BANLIST_TABLE . '
+ WHERE ban_end < ' . time() . '
+ AND ban_end <> 0';
+ $db->sql_query($sql);
+
+ $ban_list = (!is_array($ban)) ? array_unique(explode("\n", $ban)) : $ban;
+ $ban_list_log = implode(', ', $ban_list);
+
+ $current_time = time();
+
+ // Set $ban_end to the unix time when the ban should end. 0 is a permanent ban.
+ if ($ban_len)
+ {
+ if ($ban_len != -1 || !$ban_len_other)
+ {
+ $ban_end = max($current_time, $current_time + ($ban_len) * 60);
+ }
+ else
+ {
+ $ban_other = explode('-', $ban_len_other);
+ if (sizeof($ban_other) == 3 && ((int)$ban_other[0] < 9999) &&
+ (strlen($ban_other[0]) == 4) && (strlen($ban_other[1]) == 2) && (strlen($ban_other[2]) == 2))
+ {
+ $ban_end = max($current_time, gmmktime(0, 0, 0, (int)$ban_other[1], (int)$ban_other[2], (int)$ban_other[0]));
+ }
+ else
+ {
+ trigger_error('LENGTH_BAN_INVALID');
+ }
+ }
+ }
+ else
+ {
+ $ban_end = 0;
+ }
+
+ $founder = $founder_names = array();
+
+ if (!$ban_exclude)
+ {
+ // Create a list of founder...
+ $sql = 'SELECT user_id, user_email, username_clean
+ FROM ' . USERS_TABLE . '
+ WHERE user_type = ' . USER_FOUNDER;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $founder[$row['user_id']] = $row['user_email'];
+ $founder_names[$row['user_id']] = $row['username_clean'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ $banlist_ary = array();
+
+ switch ($mode)
+ {
+ case 'user':
+ $type = 'ban_userid';
+
+ // At the moment we do not support wildcard username banning
+
+ // Select the relevant user_ids.
+ $sql_usernames = array();
+
+ foreach ($ban_list as $username)
+ {
+ $username = trim($username);
+ if ($username != '')
+ {
+ $clean_name = utf8_clean_string($username);
+ if ($clean_name == $user->data['username_clean'])
+ {
+ trigger_error('CANNOT_BAN_YOURSELF', E_USER_WARNING);
+ }
+ if (in_array($clean_name, $founder_names))
+ {
+ trigger_error('CANNOT_BAN_FOUNDER', E_USER_WARNING);
+ }
+ $sql_usernames[] = $clean_name;
+ }
+ }
+
+ // Make sure we have been given someone to ban
+ if (!sizeof($sql_usernames))
+ {
+ trigger_error('NO_USER_SPECIFIED');
+ }
+
+ $sql = 'SELECT user_id
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('username_clean', $sql_usernames);
+
+ // Do not allow banning yourself
+ if (sizeof($founder))
+ {
+ $sql .= ' AND ' . $db->sql_in_set('user_id', array_merge(array_keys($founder), array($user->data['user_id'])), true);
+ }
+ else
+ {
+ $sql .= ' AND user_id <> ' . $user->data['user_id'];
+ }
+
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ do
+ {
+ $banlist_ary[] = (int) $row['user_id'];
+ }
+ while ($row = $db->sql_fetchrow($result));
+ }
+ else
+ {
+ $db->sql_freeresult($result);
+ trigger_error('NO_USERS');
+ }
+ $db->sql_freeresult($result);
+ break;
+
+ case 'ip':
+ $type = 'ban_ip';
+
+ foreach ($ban_list as $ban_item)
+ {
+ if (preg_match('#^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})[ ]*\-[ ]*([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$#', trim($ban_item), $ip_range_explode))
+ {
+ // This is an IP range
+ // Don't ask about all this, just don't ask ... !
+ $ip_1_counter = $ip_range_explode[1];
+ $ip_1_end = $ip_range_explode[5];
+
+ while ($ip_1_counter <= $ip_1_end)
+ {
+ $ip_2_counter = ($ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[2] : 0;
+ $ip_2_end = ($ip_1_counter < $ip_1_end) ? 254 : $ip_range_explode[6];
+
+ if ($ip_2_counter == 0 && $ip_2_end == 254)
+ {
+ $ip_2_counter = 256;
+ $ip_2_fragment = 256;
+
+ $banlist_ary[] = "$ip_1_counter.*";
+ }
+
+ while ($ip_2_counter <= $ip_2_end)
+ {
+ $ip_3_counter = ($ip_2_counter == $ip_range_explode[2] && $ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[3] : 0;
+ $ip_3_end = ($ip_2_counter < $ip_2_end || $ip_1_counter < $ip_1_end) ? 254 : $ip_range_explode[7];
+
+ if ($ip_3_counter == 0 && $ip_3_end == 254)
+ {
+ $ip_3_counter = 256;
+ $ip_3_fragment = 256;
+
+ $banlist_ary[] = "$ip_1_counter.$ip_2_counter.*";
+ }
+
+ while ($ip_3_counter <= $ip_3_end)
+ {
+ $ip_4_counter = ($ip_3_counter == $ip_range_explode[3] && $ip_2_counter == $ip_range_explode[2] && $ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[4] : 0;
+ $ip_4_end = ($ip_3_counter < $ip_3_end || $ip_2_counter < $ip_2_end) ? 254 : $ip_range_explode[8];
+
+ if ($ip_4_counter == 0 && $ip_4_end == 254)
+ {
+ $ip_4_counter = 256;
+ $ip_4_fragment = 256;
+
+ $banlist_ary[] = "$ip_1_counter.$ip_2_counter.$ip_3_counter.*";
+ }
+
+ while ($ip_4_counter <= $ip_4_end)
+ {
+ $banlist_ary[] = "$ip_1_counter.$ip_2_counter.$ip_3_counter.$ip_4_counter";
+ $ip_4_counter++;
+ }
+ $ip_3_counter++;
+ }
+ $ip_2_counter++;
+ }
+ $ip_1_counter++;
+ }
+ }
+ else if (preg_match('#^([0-9]{1,3})\.([0-9\*]{1,3})\.([0-9\*]{1,3})\.([0-9\*]{1,3})$#', trim($ban_item)) || preg_match('#^[a-f0-9:]+\*?$#i', trim($ban_item)))
+ {
+ // Normal IP address
+ $banlist_ary[] = trim($ban_item);
+ }
+ else if (preg_match('#^\*$#', trim($ban_item)))
+ {
+ // Ban all IPs
+ $banlist_ary[] = '*';
+ }
+ else if (preg_match('#^([\w\-_]\.?){2,}$#is', trim($ban_item)))
+ {
+ // hostname
+ $ip_ary = gethostbynamel(trim($ban_item));
+
+ if (!empty($ip_ary))
+ {
+ foreach ($ip_ary as $ip)
+ {
+ if ($ip)
+ {
+ if (strlen($ip) > 40)
+ {
+ continue;
+ }
+
+ $banlist_ary[] = $ip;
+ }
+ }
+ }
+ }
+
+ if (empty($banlist_ary))
+ {
+ trigger_error('NO_IPS_DEFINED');
+ }
+ }
+ break;
+
+ case 'email':
+ $type = 'ban_email';
+
+ foreach ($ban_list as $ban_item)
+ {
+ $ban_item = trim($ban_item);
+
+ if (preg_match('#^.*?@*|(([a-z0-9\-]+\.)+([a-z]{2,3}))$#i', $ban_item))
+ {
+ if (strlen($ban_item) > 100)
+ {
+ continue;
+ }
+
+ if (!sizeof($founder) || !in_array($ban_item, $founder))
+ {
+ $banlist_ary[] = $ban_item;
+ }
+ }
+ }
+
+ if (sizeof($ban_list) == 0)
+ {
+ trigger_error('NO_EMAILS_DEFINED');
+ }
+ break;
+
+ default:
+ trigger_error('NO_MODE');
+ break;
+ }
+
+ // Fetch currently set bans of the specified type and exclude state. Prevent duplicate bans.
+ $sql_where = ($type == 'ban_userid') ? 'ban_userid <> 0' : "$type <> ''";
+
+ $sql = "SELECT $type
+ FROM " . BANLIST_TABLE . "
+ WHERE $sql_where
+ AND ban_exclude = " . (int) $ban_exclude;
+ $result = $db->sql_query($sql);
+
+ // Reset $sql_where, because we use it later...
+ $sql_where = '';
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $banlist_ary_tmp = array();
+ do
+ {
+ switch ($mode)
+ {
+ case 'user':
+ $banlist_ary_tmp[] = $row['ban_userid'];
+ break;
+
+ case 'ip':
+ $banlist_ary_tmp[] = $row['ban_ip'];
+ break;
+
+ case 'email':
+ $banlist_ary_tmp[] = $row['ban_email'];
+ break;
+ }
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ $banlist_ary_tmp = array_intersect($banlist_ary, $banlist_ary_tmp);
+
+ if (sizeof($banlist_ary_tmp))
+ {
+ // One or more entities are already banned/excluded, delete the existing bans, so they can be re-inserted with the given new length
+ $sql = 'DELETE FROM ' . BANLIST_TABLE . '
+ WHERE ' . $db->sql_in_set($type, $banlist_ary_tmp) . '
+ AND ban_exclude = ' . (int) $ban_exclude;
+ $db->sql_query($sql);
+ }
+
+ unset($banlist_ary_tmp);
+ }
+ $db->sql_freeresult($result);
+
+ // We have some entities to ban
+ if (sizeof($banlist_ary))
+ {
+ $sql_ary = array();
+
+ foreach ($banlist_ary as $ban_entry)
+ {
+ $sql_ary[] = array(
+ $type => $ban_entry,
+ 'ban_start' => (int) $current_time,
+ 'ban_end' => (int) $ban_end,
+ 'ban_exclude' => (int) $ban_exclude,
+ 'ban_reason' => (string) $ban_reason,
+ 'ban_give_reason' => (string) $ban_give_reason,
+ );
+ }
+
+ $db->sql_multi_insert(BANLIST_TABLE, $sql_ary);
+
+ // If we are banning we want to logout anyone matching the ban
+ if (!$ban_exclude)
+ {
+ switch ($mode)
+ {
+ case 'user':
+ $sql_where = 'WHERE ' . $db->sql_in_set('session_user_id', $banlist_ary);
+ break;
+
+ case 'ip':
+ $sql_where = 'WHERE ' . $db->sql_in_set('session_ip', $banlist_ary);
+ break;
+
+ case 'email':
+ $banlist_ary_sql = array();
+
+ foreach ($banlist_ary as $ban_entry)
+ {
+ $banlist_ary_sql[] = (string) str_replace('*', '%', $ban_entry);
+ }
+
+ $sql = 'SELECT user_id
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_email', $banlist_ary_sql);
+ $result = $db->sql_query($sql);
+
+ $sql_in = array();
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ do
+ {
+ $sql_in[] = $row['user_id'];
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ $sql_where = 'WHERE ' . $db->sql_in_set('session_user_id', $sql_in);
+ }
+ $db->sql_freeresult($result);
+ break;
+ }
+
+ if (isset($sql_where) && $sql_where)
+ {
+ $sql = 'DELETE FROM ' . SESSIONS_TABLE . "
+ $sql_where";
+ $db->sql_query($sql);
+
+ if ($mode == 'user')
+ {
+ $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . ' ' . ((in_array('*', $banlist_ary)) ? '' : 'WHERE ' . $db->sql_in_set('user_id', $banlist_ary));
+ $db->sql_query($sql);
+ }
+ }
+ }
+
+ // Update log
+ $log_entry = ($ban_exclude) ? 'LOG_BAN_EXCLUDE_' : 'LOG_BAN_';
+
+ // Add to moderator log, admin log and user notes
+ add_log('admin', $log_entry . strtoupper($mode), $ban_reason, $ban_list_log);
+ add_log('mod', 0, 0, $log_entry . strtoupper($mode), $ban_reason, $ban_list_log);
+ if ($mode == 'user')
+ {
+ foreach ($banlist_ary as $user_id)
+ {
+ add_log('user', $user_id, $log_entry . strtoupper($mode), $ban_reason, $ban_list_log);
+ }
+ }
+
+ $cache->destroy('sql', BANLIST_TABLE);
+
+ return true;
+ }
+
+ // There was nothing to ban/exclude. But destroying the cache because of the removal of stale bans.
+ $cache->destroy('sql', BANLIST_TABLE);
+
+ return false;
+}
+
+/**
+* Unban User
+*/
+function user_unban($mode, $ban)
+{
+ global $db, $user, $auth, $cache;
+
+ // Delete stale bans
+ $sql = 'DELETE FROM ' . BANLIST_TABLE . '
+ WHERE ban_end < ' . time() . '
+ AND ban_end <> 0';
+ $db->sql_query($sql);
+
+ if (!is_array($ban))
+ {
+ $ban = array($ban);
+ }
+
+ $unban_sql = array_map('intval', $ban);
+
+ if (sizeof($unban_sql))
+ {
+ // Grab details of bans for logging information later
+ switch ($mode)
+ {
+ case 'user':
+ $sql = 'SELECT u.username AS unban_info, u.user_id
+ FROM ' . USERS_TABLE . ' u, ' . BANLIST_TABLE . ' b
+ WHERE ' . $db->sql_in_set('b.ban_id', $unban_sql) . '
+ AND u.user_id = b.ban_userid';
+ break;
+
+ case 'email':
+ $sql = 'SELECT ban_email AS unban_info
+ FROM ' . BANLIST_TABLE . '
+ WHERE ' . $db->sql_in_set('ban_id', $unban_sql);
+ break;
+
+ case 'ip':
+ $sql = 'SELECT ban_ip AS unban_info
+ FROM ' . BANLIST_TABLE . '
+ WHERE ' . $db->sql_in_set('ban_id', $unban_sql);
+ break;
+ }
+ $result = $db->sql_query($sql);
+
+ $l_unban_list = '';
+ $user_ids_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $l_unban_list .= (($l_unban_list != '') ? ', ' : '') . $row['unban_info'];
+ if ($mode == 'user')
+ {
+ $user_ids_ary[] = $row['user_id'];
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'DELETE FROM ' . BANLIST_TABLE . '
+ WHERE ' . $db->sql_in_set('ban_id', $unban_sql);
+ $db->sql_query($sql);
+
+ // Add to moderator log, admin log and user notes
+ add_log('admin', 'LOG_UNBAN_' . strtoupper($mode), $l_unban_list);
+ add_log('mod', 0, 0, 'LOG_UNBAN_' . strtoupper($mode), $l_unban_list);
+ if ($mode == 'user')
+ {
+ foreach ($user_ids_ary as $user_id)
+ {
+ add_log('user', $user_id, 'LOG_UNBAN_' . strtoupper($mode), $l_unban_list);
+ }
+ }
+ }
+
+ $cache->destroy('sql', BANLIST_TABLE);
+
+ return false;
+}
+
+/**
+* Whois facility
+*
+* @link http://tools.ietf.org/html/rfc3912 RFC3912: WHOIS Protocol Specification
+*/
+function user_ipwhois($ip)
+{
+ $ipwhois = '';
+
+ // Check IP
+ // Only supporting IPv4 at the moment...
+ if (empty($ip) || !preg_match(get_preg_expression('ipv4'), $ip))
+ {
+ return '';
+ }
+
+ if (($fsk = @fsockopen('whois.arin.net', 43)))
+ {
+ // CRLF as per RFC3912
+ fputs($fsk, "$ip\r\n");
+ while (!feof($fsk))
+ {
+ $ipwhois .= fgets($fsk, 1024);
+ }
+ @fclose($fsk);
+ }
+
+ $match = array();
+
+ // Test for referrals from ARIN to other whois databases, roll on rwhois
+ if (preg_match('#ReferralServer: whois://(.+)#im', $ipwhois, $match))
+ {
+ if (strpos($match[1], ':') !== false)
+ {
+ $pos = strrpos($match[1], ':');
+ $server = substr($match[1], 0, $pos);
+ $port = (int) substr($match[1], $pos + 1);
+ unset($pos);
+ }
+ else
+ {
+ $server = $match[1];
+ $port = 43;
+ }
+
+ $buffer = '';
+
+ if (($fsk = @fsockopen($server, $port)))
+ {
+ fputs($fsk, "$ip\r\n");
+ while (!feof($fsk))
+ {
+ $buffer .= fgets($fsk, 1024);
+ }
+ @fclose($fsk);
+ }
+
+ // Use the result from ARIN if we don't get any result here
+ $ipwhois = (empty($buffer)) ? $ipwhois : $buffer;
+ }
+
+ $ipwhois = htmlspecialchars($ipwhois);
+
+ // Magic URL ;)
+ return trim(make_clickable($ipwhois, false, ''));
+}
+
+/**
+* Data validation ... used primarily but not exclusively by ucp modules
+*
+* "Master" function for validating a range of data types
+*/
+function validate_data($data, $val_ary)
+{
+ global $user;
+
+ $error = array();
+
+ foreach ($val_ary as $var => $val_seq)
+ {
+ if (!is_array($val_seq[0]))
+ {
+ $val_seq = array($val_seq);
+ }
+
+ foreach ($val_seq as $validate)
+ {
+ $function = array_shift($validate);
+ array_unshift($validate, $data[$var]);
+
+ if ($result = call_user_func_array('validate_' . $function, $validate))
+ {
+ // Since errors are checked later for their language file existence, we need to make sure custom errors are not adjusted.
+ $error[] = (empty($user->lang[$result . '_' . strtoupper($var)])) ? $result : $result . '_' . strtoupper($var);
+ }
+ }
+ }
+
+ return $error;
+}
+
+/**
+* Validate String
+*
+* @return boolean|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
+*/
+function validate_string($string, $optional = false, $min = 0, $max = 0)
+{
+ if (empty($string) && $optional)
+ {
+ return false;
+ }
+
+ if ($min && utf8_strlen(htmlspecialchars_decode($string)) < $min)
+ {
+ return 'TOO_SHORT';
+ }
+ else if ($max && utf8_strlen(htmlspecialchars_decode($string)) > $max)
+ {
+ return 'TOO_LONG';
+ }
+
+ return false;
+}
+
+/**
+* Validate Number
+*
+* @return boolean|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
+*/
+function validate_num($num, $optional = false, $min = 0, $max = 1E99)
+{
+ if (empty($num) && $optional)
+ {
+ return false;
+ }
+
+ if ($num < $min)
+ {
+ return 'TOO_SMALL';
+ }
+ else if ($num > $max)
+ {
+ return 'TOO_LARGE';
+ }
+
+ return false;
+}
+
+/**
+* Validate Date
+* @param String $string a date in the dd-mm-yyyy format
+* @return boolean
+*/
+function validate_date($date_string, $optional = false)
+{
+ $date = explode('-', $date_string);
+ if ((empty($date) || sizeof($date) != 3) && $optional)
+ {
+ return false;
+ }
+ else if ($optional)
+ {
+ for ($field = 0; $field <= 1; $field++)
+ {
+ $date[$field] = (int) $date[$field];
+ if (empty($date[$field]))
+ {
+ $date[$field] = 1;
+ }
+ }
+ $date[2] = (int) $date[2];
+ // assume an arbitrary leap year
+ if (empty($date[2]))
+ {
+ $date[2] = 1980;
+ }
+ }
+
+ if (sizeof($date) != 3 || !checkdate($date[1], $date[0], $date[2]))
+ {
+ return 'INVALID';
+ }
+
+ return false;
+}
+
+
+/**
+* Validate Match
+*
+* @return boolean|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
+*/
+function validate_match($string, $optional = false, $match = '')
+{
+ if (empty($string) && $optional)
+ {
+ return false;
+ }
+
+ if (empty($match))
+ {
+ return false;
+ }
+
+ if (!preg_match($match, $string))
+ {
+ return 'WRONG_DATA';
+ }
+
+ return false;
+}
+
+/**
+* Check to see if the username has been taken, or if it is disallowed.
+* Also checks if it includes the " character, which we don't allow in usernames.
+* Used for registering, changing names, and posting anonymously with a username
+*
+* @param string $username The username to check
+* @param string $allowed_username An allowed username, default being $user->data['username']
+*
+* @return mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
+*/
+function validate_username($username, $allowed_username = false)
+{
+ global $config, $db, $user, $cache;
+
+ $clean_username = utf8_clean_string($username);
+ $allowed_username = ($allowed_username === false) ? $user->data['username_clean'] : utf8_clean_string($allowed_username);
+
+ if ($allowed_username == $clean_username)
+ {
+ return false;
+ }
+
+ // ... fast checks first.
+ if (strpos($username, '&quot;') !== false || strpos($username, '"') !== false || empty($clean_username))
+ {
+ return 'INVALID_CHARS';
+ }
+
+ $mbstring = $pcre = false;
+
+ // generic UTF-8 character types supported?
+ if ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false)
+ {
+ $pcre = true;
+ }
+ else if (function_exists('mb_ereg_match'))
+ {
+ mb_regex_encoding('UTF-8');
+ $mbstring = true;
+ }
+
+ switch ($config['allow_name_chars'])
+ {
+ case 'USERNAME_CHARS_ANY':
+ $pcre = true;
+ $regex = '.+';
+ break;
+
+ case 'USERNAME_ALPHA_ONLY':
+ $pcre = true;
+ $regex = '[A-Za-z0-9]+';
+ break;
+
+ case 'USERNAME_ALPHA_SPACERS':
+ $pcre = true;
+ $regex = '[A-Za-z0-9-[\]_+ ]+';
+ break;
+
+ case 'USERNAME_LETTER_NUM':
+ if ($pcre)
+ {
+ $regex = '[\p{Lu}\p{Ll}\p{N}]+';
+ }
+ else if ($mbstring)
+ {
+ $regex = '[[:upper:][:lower:][:digit:]]+';
+ }
+ else
+ {
+ $pcre = true;
+ $regex = '[a-zA-Z0-9]+';
+ }
+ break;
+
+ case 'USERNAME_LETTER_NUM_SPACERS':
+ if ($pcre)
+ {
+ $regex = '[-\]_+ [\p{Lu}\p{Ll}\p{N}]+';
+ }
+ else if ($mbstring)
+ {
+ $regex = '[-\]_+ \[[:upper:][:lower:][:digit:]]+';
+ }
+ else
+ {
+ $pcre = true;
+ $regex = '[-\]_+ [a-zA-Z0-9]+';
+ }
+ break;
+
+ case 'USERNAME_ASCII':
+ default:
+ $pcre = true;
+ $regex = '[\x01-\x7F]+';
+ break;
+ }
+
+ if ($pcre)
+ {
+ if (!preg_match('#^' . $regex . '$#u', $username))
+ {
+ return 'INVALID_CHARS';
+ }
+ }
+ else if ($mbstring)
+ {
+ mb_ereg_search_init($username, '^' . $regex . '$');
+ if (!mb_ereg_search())
+ {
+ return 'INVALID_CHARS';
+ }
+ }
+
+ $sql = 'SELECT username
+ FROM ' . USERS_TABLE . "
+ WHERE username_clean = '" . $db->sql_escape($clean_username) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ return 'USERNAME_TAKEN';
+ }
+
+ $sql = 'SELECT group_name
+ FROM ' . GROUPS_TABLE . "
+ WHERE LOWER(group_name) = '" . $db->sql_escape(utf8_strtolower($username)) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ return 'USERNAME_TAKEN';
+ }
+
+ $bad_usernames = $cache->obtain_disallowed_usernames();
+
+ foreach ($bad_usernames as $bad_username)
+ {
+ if (preg_match('#^' . $bad_username . '$#', $clean_username))
+ {
+ return 'USERNAME_DISALLOWED';
+ }
+ }
+
+ return false;
+}
+
+/**
+* Check to see if the password meets the complexity settings
+*
+* @return boolean|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
+*/
+function validate_password($password)
+{
+ global $config, $db, $user;
+
+ if (!$password)
+ {
+ return false;
+ }
+
+ $pcre = $mbstring = false;
+
+ // generic UTF-8 character types supported?
+ if ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false)
+ {
+ $upp = '\p{Lu}';
+ $low = '\p{Ll}';
+ $let = '\p{L}';
+ $num = '\p{N}';
+ $sym = '[^\p{Lu}\p{Ll}\p{N}]';
+ $pcre = true;
+ }
+ else if (function_exists('mb_ereg_match'))
+ {
+ mb_regex_encoding('UTF-8');
+ $upp = '[[:upper:]]';
+ $low = '[[:lower:]]';
+ $let = '[[:lower:][:upper:]]';
+ $num = '[[:digit:]]';
+ $sym = '[^[:upper:][:lower:][:digit:]]';
+ $mbstring = true;
+ }
+ else
+ {
+ $upp = '[A-Z]';
+ $low = '[a-z]';
+ $let = '[a-zA-Z]';
+ $num = '[0-9]';
+ $sym = '[^A-Za-z0-9]';
+ $pcre = true;
+ }
+
+ $chars = array();
+
+ switch ($config['pass_complex'])
+ {
+ case 'PASS_TYPE_CASE':
+ $chars[] = $low;
+ $chars[] = $upp;
+ break;
+
+ case 'PASS_TYPE_ALPHA':
+ $chars[] = $let;
+ $chars[] = $num;
+ break;
+
+ case 'PASS_TYPE_SYMBOL':
+ $chars[] = $low;
+ $chars[] = $upp;
+ $chars[] = $num;
+ $chars[] = $sym;
+ break;
+ }
+
+ if ($pcre)
+ {
+ foreach ($chars as $char)
+ {
+ if (!preg_match('#' . $char . '#u', $password))
+ {
+ return 'INVALID_CHARS';
+ }
+ }
+ }
+ else if ($mbstring)
+ {
+ foreach ($chars as $char)
+ {
+ if (mb_ereg($char, $password) === false)
+ {
+ return 'INVALID_CHARS';
+ }
+ }
+ }
+
+ return false;
+}
+
+/**
+* Check to see if email address is banned or already present in the DB
+*
+* @param string $email The email to check
+* @param string $allowed_email An allowed email, default being $user->data['user_email']
+*
+* @return mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
+*/
+function validate_email($email, $allowed_email = false)
+{
+ global $config, $db, $user;
+
+ $email = strtolower($email);
+ $allowed_email = ($allowed_email === false) ? strtolower($user->data['user_email']) : strtolower($allowed_email);
+
+ if ($allowed_email == $email)
+ {
+ return false;
+ }
+
+ if (!preg_match('/^' . get_preg_expression('email') . '$/i', $email))
+ {
+ return 'EMAIL_INVALID';
+ }
+
+ // Check MX record.
+ // The idea for this is from reading the UseBB blog/announcement. :)
+ if ($config['email_check_mx'])
+ {
+ list(, $domain) = explode('@', $email);
+
+ if (phpbb_checkdnsrr($domain, 'A') === false && phpbb_checkdnsrr($domain, 'MX') === false)
+ {
+ return 'DOMAIN_NO_MX_RECORD';
+ }
+ }
+
+ if (($ban_reason = $user->check_ban(false, false, $email, true)) !== false)
+ {
+ return ($ban_reason === true) ? 'EMAIL_BANNED' : $ban_reason;
+ }
+
+ if (!$config['allow_emailreuse'])
+ {
+ $sql = 'SELECT user_email_hash
+ FROM ' . USERS_TABLE . "
+ WHERE user_email_hash = " . $db->sql_escape(phpbb_email_hash($email));
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ return 'EMAIL_TAKEN';
+ }
+ }
+
+ return false;
+}
+
+/**
+* Validate jabber address
+* Taken from the jabber class within flyspray (see author notes)
+*
+* @author flyspray.org
+*/
+function validate_jabber($jid)
+{
+ if (!$jid)
+ {
+ return false;
+ }
+
+ $seperator_pos = strpos($jid, '@');
+
+ if ($seperator_pos === false)
+ {
+ return 'WRONG_DATA';
+ }
+
+ $username = substr($jid, 0, $seperator_pos);
+ $realm = substr($jid, $seperator_pos + 1);
+
+ if (strlen($username) == 0 || strlen($realm) < 3)
+ {
+ return 'WRONG_DATA';
+ }
+
+ $arr = explode('.', $realm);
+
+ if (sizeof($arr) == 0)
+ {
+ return 'WRONG_DATA';
+ }
+
+ foreach ($arr as $part)
+ {
+ if (substr($part, 0, 1) == '-' || substr($part, -1, 1) == '-')
+ {
+ return 'WRONG_DATA';
+ }
+
+ if (!preg_match("@^[a-zA-Z0-9-.]+$@", $part))
+ {
+ return 'WRONG_DATA';
+ }
+ }
+
+ $boundary = array(array(0, 127), array(192, 223), array(224, 239), array(240, 247), array(248, 251), array(252, 253));
+
+ // Prohibited Characters RFC3454 + RFC3920
+ $prohibited = array(
+ // Table C.1.1
+ array(0x0020, 0x0020), // SPACE
+ // Table C.1.2
+ array(0x00A0, 0x00A0), // NO-BREAK SPACE
+ array(0x1680, 0x1680), // OGHAM SPACE MARK
+ array(0x2000, 0x2001), // EN QUAD
+ array(0x2001, 0x2001), // EM QUAD
+ array(0x2002, 0x2002), // EN SPACE
+ array(0x2003, 0x2003), // EM SPACE
+ array(0x2004, 0x2004), // THREE-PER-EM SPACE
+ array(0x2005, 0x2005), // FOUR-PER-EM SPACE
+ array(0x2006, 0x2006), // SIX-PER-EM SPACE
+ array(0x2007, 0x2007), // FIGURE SPACE
+ array(0x2008, 0x2008), // PUNCTUATION SPACE
+ array(0x2009, 0x2009), // THIN SPACE
+ array(0x200A, 0x200A), // HAIR SPACE
+ array(0x200B, 0x200B), // ZERO WIDTH SPACE
+ array(0x202F, 0x202F), // NARROW NO-BREAK SPACE
+ array(0x205F, 0x205F), // MEDIUM MATHEMATICAL SPACE
+ array(0x3000, 0x3000), // IDEOGRAPHIC SPACE
+ // Table C.2.1
+ array(0x0000, 0x001F), // [CONTROL CHARACTERS]
+ array(0x007F, 0x007F), // DELETE
+ // Table C.2.2
+ array(0x0080, 0x009F), // [CONTROL CHARACTERS]
+ array(0x06DD, 0x06DD), // ARABIC END OF AYAH
+ array(0x070F, 0x070F), // SYRIAC ABBREVIATION MARK
+ array(0x180E, 0x180E), // MONGOLIAN VOWEL SEPARATOR
+ array(0x200C, 0x200C), // ZERO WIDTH NON-JOINER
+ array(0x200D, 0x200D), // ZERO WIDTH JOINER
+ array(0x2028, 0x2028), // LINE SEPARATOR
+ array(0x2029, 0x2029), // PARAGRAPH SEPARATOR
+ array(0x2060, 0x2060), // WORD JOINER
+ array(0x2061, 0x2061), // FUNCTION APPLICATION
+ array(0x2062, 0x2062), // INVISIBLE TIMES
+ array(0x2063, 0x2063), // INVISIBLE SEPARATOR
+ array(0x206A, 0x206F), // [CONTROL CHARACTERS]
+ array(0xFEFF, 0xFEFF), // ZERO WIDTH NO-BREAK SPACE
+ array(0xFFF9, 0xFFFC), // [CONTROL CHARACTERS]
+ array(0x1D173, 0x1D17A), // [MUSICAL CONTROL CHARACTERS]
+ // Table C.3
+ array(0xE000, 0xF8FF), // [PRIVATE USE, PLANE 0]
+ array(0xF0000, 0xFFFFD), // [PRIVATE USE, PLANE 15]
+ array(0x100000, 0x10FFFD), // [PRIVATE USE, PLANE 16]
+ // Table C.4
+ array(0xFDD0, 0xFDEF), // [NONCHARACTER CODE POINTS]
+ array(0xFFFE, 0xFFFF), // [NONCHARACTER CODE POINTS]
+ array(0x1FFFE, 0x1FFFF), // [NONCHARACTER CODE POINTS]
+ array(0x2FFFE, 0x2FFFF), // [NONCHARACTER CODE POINTS]
+ array(0x3FFFE, 0x3FFFF), // [NONCHARACTER CODE POINTS]
+ array(0x4FFFE, 0x4FFFF), // [NONCHARACTER CODE POINTS]
+ array(0x5FFFE, 0x5FFFF), // [NONCHARACTER CODE POINTS]
+ array(0x6FFFE, 0x6FFFF), // [NONCHARACTER CODE POINTS]
+ array(0x7FFFE, 0x7FFFF), // [NONCHARACTER CODE POINTS]
+ array(0x8FFFE, 0x8FFFF), // [NONCHARACTER CODE POINTS]
+ array(0x9FFFE, 0x9FFFF), // [NONCHARACTER CODE POINTS]
+ array(0xAFFFE, 0xAFFFF), // [NONCHARACTER CODE POINTS]
+ array(0xBFFFE, 0xBFFFF), // [NONCHARACTER CODE POINTS]
+ array(0xCFFFE, 0xCFFFF), // [NONCHARACTER CODE POINTS]
+ array(0xDFFFE, 0xDFFFF), // [NONCHARACTER CODE POINTS]
+ array(0xEFFFE, 0xEFFFF), // [NONCHARACTER CODE POINTS]
+ array(0xFFFFE, 0xFFFFF), // [NONCHARACTER CODE POINTS]
+ array(0x10FFFE, 0x10FFFF), // [NONCHARACTER CODE POINTS]
+ // Table C.5
+ array(0xD800, 0xDFFF), // [SURROGATE CODES]
+ // Table C.6
+ array(0xFFF9, 0xFFF9), // INTERLINEAR ANNOTATION ANCHOR
+ array(0xFFFA, 0xFFFA), // INTERLINEAR ANNOTATION SEPARATOR
+ array(0xFFFB, 0xFFFB), // INTERLINEAR ANNOTATION TERMINATOR
+ array(0xFFFC, 0xFFFC), // OBJECT REPLACEMENT CHARACTER
+ array(0xFFFD, 0xFFFD), // REPLACEMENT CHARACTER
+ // Table C.7
+ array(0x2FF0, 0x2FFB), // [IDEOGRAPHIC DESCRIPTION CHARACTERS]
+ // Table C.8
+ array(0x0340, 0x0340), // COMBINING GRAVE TONE MARK
+ array(0x0341, 0x0341), // COMBINING ACUTE TONE MARK
+ array(0x200E, 0x200E), // LEFT-TO-RIGHT MARK
+ array(0x200F, 0x200F), // RIGHT-TO-LEFT MARK
+ array(0x202A, 0x202A), // LEFT-TO-RIGHT EMBEDDING
+ array(0x202B, 0x202B), // RIGHT-TO-LEFT EMBEDDING
+ array(0x202C, 0x202C), // POP DIRECTIONAL FORMATTING
+ array(0x202D, 0x202D), // LEFT-TO-RIGHT OVERRIDE
+ array(0x202E, 0x202E), // RIGHT-TO-LEFT OVERRIDE
+ array(0x206A, 0x206A), // INHIBIT SYMMETRIC SWAPPING
+ array(0x206B, 0x206B), // ACTIVATE SYMMETRIC SWAPPING
+ array(0x206C, 0x206C), // INHIBIT ARABIC FORM SHAPING
+ array(0x206D, 0x206D), // ACTIVATE ARABIC FORM SHAPING
+ array(0x206E, 0x206E), // NATIONAL DIGIT SHAPES
+ array(0x206F, 0x206F), // NOMINAL DIGIT SHAPES
+ // Table C.9
+ array(0xE0001, 0xE0001), // LANGUAGE TAG
+ array(0xE0020, 0xE007F), // [TAGGING CHARACTERS]
+ // RFC3920
+ array(0x22, 0x22), // "
+ array(0x26, 0x26), // &
+ array(0x27, 0x27), // '
+ array(0x2F, 0x2F), // /
+ array(0x3A, 0x3A), // :
+ array(0x3C, 0x3C), // <
+ array(0x3E, 0x3E), // >
+ array(0x40, 0x40) // @
+ );
+
+ $pos = 0;
+ $result = true;
+
+ while ($pos < strlen($username))
+ {
+ $len = $uni = 0;
+ for ($i = 0; $i <= 5; $i++)
+ {
+ if (ord($username[$pos]) >= $boundary[$i][0] && ord($username[$pos]) <= $boundary[$i][1])
+ {
+ $len = $i + 1;
+ $uni = (ord($username[$pos]) - $boundary[$i][0]) * pow(2, $i * 6);
+
+ for ($k = 1; $k < $len; $k++)
+ {
+ $uni += (ord($username[$pos + $k]) - 128) * pow(2, ($i - $k) * 6);
+ }
+
+ break;
+ }
+ }
+
+ if ($len == 0)
+ {
+ return 'WRONG_DATA';
+ }
+
+ foreach ($prohibited as $pval)
+ {
+ if ($uni >= $pval[0] && $uni <= $pval[1])
+ {
+ $result = false;
+ break 2;
+ }
+ }
+
+ $pos = $pos + $len;
+ }
+
+ if (!$result)
+ {
+ return 'WRONG_DATA';
+ }
+
+ return false;
+}
+
+/**
+* Remove avatar
+*/
+function avatar_delete($mode, $row, $clean_db = false)
+{
+ global $phpbb_root_path, $config, $db, $user;
+
+ // Check if the users avatar is actually *not* a group avatar
+ if ($mode == 'user')
+ {
+ if (strpos($row['user_avatar'], 'g') === 0 || (((int)$row['user_avatar'] !== 0) && ((int)$row['user_avatar'] !== (int)$row['user_id'])))
+ {
+ return false;
+ }
+ }
+
+ if ($clean_db)
+ {
+ avatar_remove_db($row[$mode . '_avatar']);
+ }
+ $filename = get_avatar_filename($row[$mode . '_avatar']);
+ if (file_exists($phpbb_root_path . $config['avatar_path'] . '/' . $filename))
+ {
+ @unlink($phpbb_root_path . $config['avatar_path'] . '/' . $filename);
+ return true;
+ }
+
+ return false;
+}
+
+/**
+* Remote avatar linkage
+*/
+function avatar_remote($data, &$error)
+{
+ global $config, $db, $user, $phpbb_root_path, $phpEx;
+
+ if (!preg_match('#^(http|https|ftp)://#i', $data['remotelink']))
+ {
+ $data['remotelink'] = 'http://' . $data['remotelink'];
+ }
+ if (!preg_match('#^(http|https|ftp)://(?:(.*?\.)*?[a-z0-9\-]+?\.[a-z]{2,4}|(?:\d{1,3}\.){3,5}\d{1,3}):?([0-9]*?).*?\.(gif|jpg|jpeg|png)$#i', $data['remotelink']))
+ {
+ $error[] = $user->lang['AVATAR_URL_INVALID'];
+ return false;
+ }
+
+ // Make sure getimagesize works...
+ if (($image_data = @getimagesize($data['remotelink'])) === false && (empty($data['width']) || empty($data['height'])))
+ {
+ $error[] = $user->lang['UNABLE_GET_IMAGE_SIZE'];
+ return false;
+ }
+
+ if (!empty($image_data) && ($image_data[0] < 2 || $image_data[1] < 2))
+ {
+ $error[] = $user->lang['AVATAR_NO_SIZE'];
+ return false;
+ }
+
+ $width = ($data['width'] && $data['height']) ? $data['width'] : $image_data[0];
+ $height = ($data['width'] && $data['height']) ? $data['height'] : $image_data[1];
+
+ if ($width < 2 || $height < 2)
+ {
+ $error[] = $user->lang['AVATAR_NO_SIZE'];
+ return false;
+ }
+
+ // Check image type
+ include_once($phpbb_root_path . 'includes/functions_upload.' . $phpEx);
+ $types = fileupload::image_types();
+ $extension = strtolower(filespec::get_extension($data['remotelink']));
+
+ if (!empty($image_data) && (!isset($types[$image_data[2]]) || !in_array($extension, $types[$image_data[2]])))
+ {
+ if (!isset($types[$image_data[2]]))
+ {
+ $error[] = $user->lang['UNABLE_GET_IMAGE_SIZE'];
+ }
+ else
+ {
+ $error[] = sprintf($user->lang['IMAGE_FILETYPE_MISMATCH'], $types[$image_data[2]][0], $extension);
+ }
+ return false;
+ }
+
+ if ($config['avatar_max_width'] || $config['avatar_max_height'])
+ {
+ if ($width > $config['avatar_max_width'] || $height > $config['avatar_max_height'])
+ {
+ $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $width, $height);
+ return false;
+ }
+ }
+
+ if ($config['avatar_min_width'] || $config['avatar_min_height'])
+ {
+ if ($width < $config['avatar_min_width'] || $height < $config['avatar_min_height'])
+ {
+ $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $width, $height);
+ return false;
+ }
+ }
+
+ return array(AVATAR_REMOTE, $data['remotelink'], $width, $height);
+}
+
+/**
+* Avatar upload using the upload class
+*/
+function avatar_upload($data, &$error)
+{
+ global $phpbb_root_path, $config, $db, $user, $phpEx;
+
+ // Init upload class
+ include_once($phpbb_root_path . 'includes/functions_upload.' . $phpEx);
+ $upload = new fileupload('AVATAR_', array('jpg', 'jpeg', 'gif', 'png'), $config['avatar_filesize'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], explode('|', $config['mime_triggers']));
+
+ if (!empty($_FILES['uploadfile']['name']))
+ {
+ $file = $upload->form_upload('uploadfile');
+ }
+ else
+ {
+ $file = $upload->remote_upload($data['uploadurl']);
+ }
+
+ $prefix = $config['avatar_salt'] . '_';
+ $file->clean_filename('avatar', $prefix, $data['user_id']);
+
+ $destination = $config['avatar_path'];
+
+ // Adjust destination path (no trailing slash)
+ if (substr($destination, -1, 1) == '/' || substr($destination, -1, 1) == '\\')
+ {
+ $destination = substr($destination, 0, -1);
+ }
+
+ $destination = str_replace(array('../', '..\\', './', '.\\'), '', $destination);
+ if ($destination && ($destination[0] == '/' || $destination[0] == "\\"))
+ {
+ $destination = '';
+ }
+
+ // Move file and overwrite any existing image
+ $file->move_file($destination, true);
+
+ if (sizeof($file->error))
+ {
+ $file->remove();
+ $error = array_merge($error, $file->error);
+ }
+
+ return array(AVATAR_UPLOAD, $data['user_id'] . '_' . time() . '.' . $file->get('extension'), $file->get('width'), $file->get('height'));
+}
+
+/**
+* Generates avatar filename from the database entry
+*/
+function get_avatar_filename($avatar_entry)
+{
+ global $config;
+
+
+ if ($avatar_entry[0] === 'g')
+ {
+ $avatar_group = true;
+ $avatar_entry = substr($avatar_entry, 1);
+ }
+ else
+ {
+ $avatar_group = false;
+ }
+ $ext = substr(strrchr($avatar_entry, '.'), 1);
+ $avatar_entry = intval($avatar_entry);
+ return $config['avatar_salt'] . '_' . (($avatar_group) ? 'g' : '') . $avatar_entry . '.' . $ext;
+}
+
+/**
+* Avatar Gallery
+*/
+function avatar_gallery($category, $avatar_select, $items_per_column, $block_var = 'avatar_row')
+{
+ global $user, $cache, $template;
+ global $config, $phpbb_root_path;
+
+ $avatar_list = array();
+
+ $path = $phpbb_root_path . $config['avatar_gallery_path'];
+
+ if (!file_exists($path) || !is_dir($path))
+ {
+ $avatar_list = array($user->lang['NO_AVATAR_CATEGORY'] => array());
+ }
+ else
+ {
+ // Collect images
+ $dp = @opendir($path);
+
+ if (!$dp)
+ {
+ return array($user->lang['NO_AVATAR_CATEGORY'] => array());
+ }
+
+ while (($file = readdir($dp)) !== false)
+ {
+ if ($file[0] != '.' && preg_match('#^[^&"\'<>]+$#i', $file) && is_dir("$path/$file"))
+ {
+ $avatar_row_count = $avatar_col_count = 0;
+
+ if ($dp2 = @opendir("$path/$file"))
+ {
+ while (($sub_file = readdir($dp2)) !== false)
+ {
+ if (preg_match('#^[^&\'"<>]+\.(?:gif|png|jpe?g)$#i', $sub_file))
+ {
+ $avatar_list[$file][$avatar_row_count][$avatar_col_count] = array(
+ 'file' => rawurlencode($file) . '/' . rawurlencode($sub_file),
+ 'filename' => rawurlencode($sub_file),
+ 'name' => ucfirst(str_replace('_', ' ', preg_replace('#^(.*)\..*$#', '\1', $sub_file))),
+ );
+ $avatar_col_count++;
+ if ($avatar_col_count == $items_per_column)
+ {
+ $avatar_row_count++;
+ $avatar_col_count = 0;
+ }
+ }
+ }
+ closedir($dp2);
+ }
+ }
+ }
+ closedir($dp);
+ }
+
+ if (!sizeof($avatar_list))
+ {
+ $avatar_list = array($user->lang['NO_AVATAR_CATEGORY'] => array());
+ }
+
+ @ksort($avatar_list);
+
+ $category = (!$category) ? key($avatar_list) : $category;
+ $avatar_categories = array_keys($avatar_list);
+
+ $s_category_options = '';
+ foreach ($avatar_categories as $cat)
+ {
+ $s_category_options .= '<option value="' . $cat . '"' . (($cat == $category) ? ' selected="selected"' : '') . '>' . $cat . '</option>';
+ }
+
+ $template->assign_vars(array(
+ 'S_AVATARS_ENABLED' => true,
+ 'S_IN_AVATAR_GALLERY' => true,
+ 'S_CAT_OPTIONS' => $s_category_options)
+ );
+
+ $avatar_list = (isset($avatar_list[$category])) ? $avatar_list[$category] : array();
+
+ foreach ($avatar_list as $avatar_row_ary)
+ {
+ $template->assign_block_vars($block_var, array());
+
+ foreach ($avatar_row_ary as $avatar_col_ary)
+ {
+ $template->assign_block_vars($block_var . '.avatar_column', array(
+ 'AVATAR_IMAGE' => $phpbb_root_path . $config['avatar_gallery_path'] . '/' . $avatar_col_ary['file'],
+ 'AVATAR_NAME' => $avatar_col_ary['name'],
+ 'AVATAR_FILE' => $avatar_col_ary['filename'])
+ );
+
+ $template->assign_block_vars($block_var . '.avatar_option_column', array(
+ 'AVATAR_IMAGE' => $phpbb_root_path . $config['avatar_gallery_path'] . '/' . $avatar_col_ary['file'],
+ 'S_OPTIONS_AVATAR' => $avatar_col_ary['filename'])
+ );
+ }
+ }
+
+ return $avatar_list;
+}
+
+
+/**
+* Tries to (re-)establish avatar dimensions
+*/
+function avatar_get_dimensions($avatar, $avatar_type, &$error, $current_x = 0, $current_y = 0)
+{
+ global $config, $phpbb_root_path, $user;
+
+ switch ($avatar_type)
+ {
+ case AVATAR_REMOTE :
+ break;
+
+ case AVATAR_UPLOAD :
+ $avatar = $phpbb_root_path . $config['avatar_path'] . '/' . get_avatar_filename($avatar);
+ break;
+
+ case AVATAR_GALLERY :
+ $avatar = $phpbb_root_path . $config['avatar_gallery_path'] . '/' . $avatar ;
+ break;
+ }
+
+ // Make sure getimagesize works...
+ if (($image_data = @getimagesize($avatar)) === false)
+ {
+ $error[] = $user->lang['UNABLE_GET_IMAGE_SIZE'];
+ return false;
+ }
+
+ if ($image_data[0] < 2 || $image_data[1] < 2)
+ {
+ $error[] = $user->lang['AVATAR_NO_SIZE'];
+ return false;
+ }
+
+ // try to maintain ratio
+ if (!(empty($current_x) && empty($current_y)))
+ {
+ if ($current_x != 0)
+ {
+ $image_data[1] = (int) floor(($current_x / $image_data[0]) * $image_data[1]);
+ $image_data[1] = min($config['avatar_max_height'], $image_data[1]);
+ $image_data[1] = max($config['avatar_min_height'], $image_data[1]);
+ }
+ if ($current_y != 0)
+ {
+ $image_data[0] = (int) floor(($current_y / $image_data[1]) * $image_data[0]);
+ $image_data[0] = min($config['avatar_max_width'], $image_data[1]);
+ $image_data[0] = max($config['avatar_min_width'], $image_data[1]);
+ }
+ }
+ return array($image_data[0], $image_data[1]);
+}
+
+/**
+* Uploading/Changing user avatar
+*/
+function avatar_process_user(&$error, $custom_userdata = false)
+{
+ global $config, $phpbb_root_path, $auth, $user, $db;
+
+ $data = array(
+ 'uploadurl' => request_var('uploadurl', ''),
+ 'remotelink' => request_var('remotelink', ''),
+ 'width' => request_var('width', 0),
+ 'height' => request_var('height', 0),
+ );
+
+ $error = validate_data($data, array(
+ 'uploadurl' => array('string', true, 5, 255),
+ 'remotelink' => array('string', true, 5, 255),
+ 'width' => array('string', true, 1, 3),
+ 'height' => array('string', true, 1, 3),
+ ));
+
+ if (sizeof($error))
+ {
+ return false;
+ }
+
+ $sql_ary = array();
+
+ if ($custom_userdata === false)
+ {
+ $userdata = &$user->data;
+ }
+ else
+ {
+ $userdata = &$custom_userdata;
+ }
+
+ $data['user_id'] = $userdata['user_id'];
+ $change_avatar = ($custom_userdata === false) ? $auth->acl_get('u_chgavatar') : true;
+ $avatar_select = basename(request_var('avatar_select', ''));
+
+ // Can we upload?
+ $can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $change_avatar && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false;
+
+ if ((!empty($_FILES['uploadfile']['name']) || $data['uploadurl']) && $can_upload)
+ {
+ list($sql_ary['user_avatar_type'], $sql_ary['user_avatar'], $sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = avatar_upload($data, $error);
+ }
+ else if ($data['remotelink'] && $change_avatar && $config['allow_avatar_remote'])
+ {
+ list($sql_ary['user_avatar_type'], $sql_ary['user_avatar'], $sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = avatar_remote($data, $error);
+ }
+ else if ($avatar_select && $change_avatar && $config['allow_avatar_local'])
+ {
+ $category = basename(request_var('category', ''));
+
+ $sql_ary['user_avatar_type'] = AVATAR_GALLERY;
+ $sql_ary['user_avatar'] = $avatar_select;
+
+ // check avatar gallery
+ if (!is_dir($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category))
+ {
+ $sql_ary['user_avatar'] = '';
+ $sql_ary['user_avatar_type'] = $sql_ary['user_avatar_width'] = $sql_ary['user_avatar_height'] = 0;
+ }
+ else
+ {
+ list($sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . $sql_ary['user_avatar']);
+ $sql_ary['user_avatar'] = $category . '/' . $sql_ary['user_avatar'];
+ }
+ }
+ else if (isset($_POST['delete']) && $change_avatar)
+ {
+ $sql_ary['user_avatar'] = '';
+ $sql_ary['user_avatar_type'] = $sql_ary['user_avatar_width'] = $sql_ary['user_avatar_height'] = 0;
+ }
+ else if (!empty($userdata['user_avatar']))
+ {
+ // Only update the dimensions
+
+ if (empty($data['width']) || empty($data['height']))
+ {
+ if ($dims = avatar_get_dimensions($userdata['user_avatar'], $userdata['user_avatar_type'], $error, $data['width'], $data['height']))
+ {
+ list($guessed_x, $guessed_y) = $dims;
+ if (empty($data['width']))
+ {
+ $data['width'] = $guessed_x;
+ }
+ if (empty($data['height']))
+ {
+ $data['height'] = $guessed_y;
+ }
+ }
+ }
+ if (($config['avatar_max_width'] || $config['avatar_max_height']) &&
+ (($data['width'] != $userdata['user_avatar_width']) || $data['height'] != $userdata['user_avatar_height']))
+ {
+ if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
+ {
+ $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ }
+ }
+
+ if (!sizeof($error))
+ {
+ if ($config['avatar_min_width'] || $config['avatar_min_height'])
+ {
+ if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
+ {
+ $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ }
+ }
+ }
+
+ if (!sizeof($error))
+ {
+ $sql_ary['user_avatar_width'] = $data['width'];
+ $sql_ary['user_avatar_height'] = $data['height'];
+ }
+ }
+
+ if (!sizeof($error))
+ {
+ // Do we actually have any data to update?
+ if (sizeof($sql_ary))
+ {
+ $ext_new = $ext_old = '';
+ if (isset($sql_ary['user_avatar']))
+ {
+ $userdata = ($custom_userdata === false) ? $user->data : $custom_userdata;
+ $ext_new = (empty($sql_ary['user_avatar'])) ? '' : substr(strrchr($sql_ary['user_avatar'], '.'), 1);
+ $ext_old = (empty($userdata['user_avatar'])) ? '' : substr(strrchr($userdata['user_avatar'], '.'), 1);
+
+ if ($userdata['user_avatar_type'] == AVATAR_UPLOAD)
+ {
+ // Delete old avatar if present
+ if ((!empty($userdata['user_avatar']) && empty($sql_ary['user_avatar']))
+ || ( !empty($userdata['user_avatar']) && !empty($sql_ary['user_avatar']) && $ext_new !== $ext_old))
+ {
+ avatar_delete('user', $userdata);
+ }
+ }
+ }
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . (($custom_userdata === false) ? $user->data['user_id'] : $custom_userdata['user_id']);
+ $db->sql_query($sql);
+
+ }
+ }
+
+ return (sizeof($error)) ? false : true;
+}
+
+//
+// Usergroup functions
+//
+
+/**
+* Add or edit a group. If we're editing a group we only update user
+* parameters such as rank, etc. if they are changed
+*/
+function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow_desc_bbcode = false, $allow_desc_urls = false, $allow_desc_smilies = false)
+{
+ global $phpbb_root_path, $config, $db, $user, $file_upload;
+
+ $error = array();
+
+ // Attributes which also affect the users table
+ $user_attribute_ary = array('group_colour', 'group_rank', 'group_avatar', 'group_avatar_type', 'group_avatar_width', 'group_avatar_height');
+
+ // Check data. Limit group name length.
+ if (!utf8_strlen($name) || utf8_strlen($name) > 60)
+ {
+ $error[] = (!utf8_strlen($name)) ? $user->lang['GROUP_ERR_USERNAME'] : $user->lang['GROUP_ERR_USER_LONG'];
+ }
+
+ $err = group_validate_groupname($group_id, $name);
+ if (!empty($err))
+ {
+ $error[] = $user->lang[$err];
+ }
+
+ if (!in_array($type, array(GROUP_OPEN, GROUP_CLOSED, GROUP_HIDDEN, GROUP_SPECIAL, GROUP_FREE)))
+ {
+ $error[] = $user->lang['GROUP_ERR_TYPE'];
+ }
+
+ if (!sizeof($error))
+ {
+ $user_ary = array();
+ $sql_ary = array(
+ 'group_name' => (string) $name,
+ 'group_desc' => (string) $desc,
+ 'group_desc_uid' => '',
+ 'group_desc_bitfield' => '',
+ 'group_type' => (int) $type,
+ );
+
+ // Parse description
+ if ($desc)
+ {
+ generate_text_for_storage($sql_ary['group_desc'], $sql_ary['group_desc_uid'], $sql_ary['group_desc_bitfield'], $sql_ary['group_desc_options'], $allow_desc_bbcode, $allow_desc_urls, $allow_desc_smilies);
+ }
+
+ if (sizeof($group_attributes))
+ {
+ // Merge them with $sql_ary to properly update the group
+ $sql_ary = array_merge($sql_ary, $group_attributes);
+ }
+
+ // Setting the log message before we set the group id (if group gets added)
+ $log = ($group_id) ? 'LOG_GROUP_UPDATED' : 'LOG_GROUP_CREATED';
+
+ $query = '';
+
+ if ($group_id)
+ {
+ $sql = 'SELECT user_id
+ FROM ' . USERS_TABLE . '
+ WHERE group_id = ' . $group_id;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $user_ary[] = $row['user_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (isset($sql_ary['group_avatar']) && !$sql_ary['group_avatar'])
+ {
+ remove_default_avatar($group_id, $user_ary);
+ }
+
+ if (isset($sql_ary['group_rank']) && !$sql_ary['group_rank'])
+ {
+ remove_default_rank($group_id, $user_ary);
+ }
+
+ $sql = 'UPDATE ' . GROUPS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE group_id = $group_id";
+ $db->sql_query($sql);
+
+ // Since we may update the name too, we need to do this on other tables too...
+ $sql = 'UPDATE ' . MODERATOR_CACHE_TABLE . "
+ SET group_name = '" . $db->sql_escape($sql_ary['group_name']) . "'
+ WHERE group_id = $group_id";
+ $db->sql_query($sql);
+
+ // One special case is the group skip auth setting. If this was changed we need to purge permissions for this group
+ if (isset($group_attributes['group_skip_auth']))
+ {
+ // Get users within this group...
+ $sql = 'SELECT user_id
+ FROM ' . USER_GROUP_TABLE . '
+ WHERE group_id = ' . $group_id . '
+ AND user_pending = 0';
+ $result = $db->sql_query($sql);
+
+ $user_id_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $user_id_ary[] = $row['user_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (!empty($user_id_ary))
+ {
+ global $auth;
+
+ // Clear permissions cache of relevant users
+ $auth->acl_clear_prefetch($user_id_ary);
+ }
+ }
+ }
+ else
+ {
+ $sql = 'INSERT INTO ' . GROUPS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ $db->sql_query($sql);
+ }
+
+ if (!$group_id)
+ {
+ $group_id = $db->sql_nextid();
+
+ if (isset($sql_ary['group_avatar_type']) && $sql_ary['group_avatar_type'] == AVATAR_UPLOAD)
+ {
+ group_correct_avatar($group_id, $sql_ary['group_avatar']);
+ }
+ }
+
+ // Set user attributes
+ $sql_ary = array();
+ if (sizeof($group_attributes))
+ {
+ // Go through the user attributes array, check if a group attribute matches it and then set it. ;)
+ foreach ($user_attribute_ary as $attribute)
+ {
+ if (!isset($group_attributes[$attribute]))
+ {
+ continue;
+ }
+
+ // If we are about to set an avatar, we will not overwrite user avatars if no group avatar is set...
+ if (strpos($attribute, 'group_avatar') === 0 && !$group_attributes[$attribute])
+ {
+ continue;
+ }
+
+ $sql_ary[$attribute] = $group_attributes[$attribute];
+ }
+ }
+
+ if (sizeof($sql_ary) && sizeof($user_ary))
+ {
+ group_set_user_default($group_id, $user_ary, $sql_ary);
+ }
+
+ $name = ($type == GROUP_SPECIAL) ? $user->lang['G_' . $name] : $name;
+ add_log('admin', $log, $name);
+
+ group_update_listings($group_id);
+ }
+
+ return (sizeof($error)) ? $error : false;
+}
+
+
+/**
+* Changes a group avatar's filename to conform to the naming scheme
+*/
+function group_correct_avatar($group_id, $old_entry)
+{
+ global $config, $db, $phpbb_root_path;
+
+ $group_id = (int)$group_id;
+ $ext = substr(strrchr($old_entry, '.'), 1);
+ $old_filename = get_avatar_filename($old_entry);
+ $new_filename = $config['avatar_salt'] . "_g$group_id.$ext";
+ $new_entry = 'g' . $group_id . '_' . substr(time(), -5) . ".$ext";
+
+ $avatar_path = $phpbb_root_path . $config['avatar_path'];
+ if (@rename($avatar_path . '/'. $old_filename, $avatar_path . '/' . $new_filename))
+ {
+ $sql = 'UPDATE ' . GROUPS_TABLE . '
+ SET group_avatar = \'' . $db->sql_escape($new_entry) . "'
+ WHERE group_id = $group_id";
+ $db->sql_query($sql);
+ }
+}
+
+
+/**
+* Remove avatar also for users not having the group as default
+*/
+function avatar_remove_db($avatar_name)
+{
+ global $config, $db;
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_avatar = '',
+ user_avatar_type = 0
+ WHERE user_avatar = '" . $db->sql_escape($avatar_name) . '\'';
+ $db->sql_query($sql);
+}
+
+
+/**
+* Group Delete
+*/
+function group_delete($group_id, $group_name = false)
+{
+ global $db, $phpbb_root_path, $phpEx;
+
+ if (!$group_name)
+ {
+ $group_name = get_group_name($group_id);
+ }
+
+ $start = 0;
+
+ do
+ {
+ $user_id_ary = $username_ary = array();
+
+ // Batch query for group members, call group_user_del
+ $sql = 'SELECT u.user_id, u.username
+ FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . " u
+ WHERE ug.group_id = $group_id
+ AND u.user_id = ug.user_id";
+ $result = $db->sql_query_limit($sql, 200, $start);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ do
+ {
+ $user_id_ary[] = $row['user_id'];
+ $username_ary[] = $row['username'];
+
+ $start++;
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ group_user_del($group_id, $user_id_ary, $username_ary, $group_name);
+ }
+ else
+ {
+ $start = 0;
+ }
+ $db->sql_freeresult($result);
+ }
+ while ($start);
+
+ // Delete group
+ $sql = 'DELETE FROM ' . GROUPS_TABLE . "
+ WHERE group_id = $group_id";
+ $db->sql_query($sql);
+
+ // Delete auth entries from the groups table
+ $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . "
+ WHERE group_id = $group_id";
+ $db->sql_query($sql);
+
+ // Re-cache moderators
+ if (!function_exists('cache_moderators'))
+ {
+ include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+ }
+
+ cache_moderators();
+
+ add_log('admin', 'LOG_GROUP_DELETE', $group_name);
+
+ // Return false - no error
+ return false;
+}
+
+/**
+* Add user(s) to group
+*
+* @return mixed false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER'
+*/
+function group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0, $pending = 0, $group_attributes = false)
+{
+ global $db, $auth;
+
+ // We need both username and user_id info
+ $result = user_get_id_name($user_id_ary, $username_ary);
+
+ if (!sizeof($user_id_ary) || $result !== false)
+ {
+ return 'NO_USER';
+ }
+
+ // Remove users who are already members of this group
+ $sql = 'SELECT user_id, group_leader
+ FROM ' . USER_GROUP_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $user_id_ary) . "
+ AND group_id = $group_id";
+ $result = $db->sql_query($sql);
+
+ $add_id_ary = $update_id_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $add_id_ary[] = (int) $row['user_id'];
+
+ if ($leader && !$row['group_leader'])
+ {
+ $update_id_ary[] = (int) $row['user_id'];
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // Do all the users exist in this group?
+ $add_id_ary = array_diff($user_id_ary, $add_id_ary);
+
+ // If we have no users
+ if (!sizeof($add_id_ary) && !sizeof($update_id_ary))
+ {
+ return 'GROUP_USERS_EXIST';
+ }
+
+ $db->sql_transaction('begin');
+
+ // Insert the new users
+ if (sizeof($add_id_ary))
+ {
+ $sql_ary = array();
+
+ foreach ($add_id_ary as $user_id)
+ {
+ $sql_ary[] = array(
+ 'user_id' => (int) $user_id,
+ 'group_id' => (int) $group_id,
+ 'group_leader' => (int) $leader,
+ 'user_pending' => (int) $pending,
+ );
+ }
+
+ $db->sql_multi_insert(USER_GROUP_TABLE, $sql_ary);
+ }
+
+ if (sizeof($update_id_ary))
+ {
+ $sql = 'UPDATE ' . USER_GROUP_TABLE . '
+ SET group_leader = 1
+ WHERE ' . $db->sql_in_set('user_id', $update_id_ary) . "
+ AND group_id = $group_id";
+ $db->sql_query($sql);
+ }
+
+ if ($default)
+ {
+ group_user_attributes('default', $group_id, $user_id_ary, false, $group_name, $group_attributes);
+ }
+
+ $db->sql_transaction('commit');
+
+ // Clear permissions cache of relevant users
+ $auth->acl_clear_prefetch($user_id_ary);
+
+ if (!$group_name)
+ {
+ $group_name = get_group_name($group_id);
+ }
+
+ $log = ($leader) ? 'LOG_MODS_ADDED' : (($pending) ? 'LOG_USERS_PENDING' : 'LOG_USERS_ADDED');
+
+ add_log('admin', $log, $group_name, implode(', ', $username_ary));
+
+ group_update_listings($group_id);
+
+ // Return false - no error
+ return false;
+}
+
+/**
+* Remove a user/s from a given group. When we remove users we update their
+* default group_id. We do this by examining which "special" groups they belong
+* to. The selection is made based on a reasonable priority system
+*
+* @return false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER'
+*/
+function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false)
+{
+ global $db, $auth, $config;
+
+ if ($config['coppa_enable'])
+ {
+ $group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'REGISTERED_COPPA', 'REGISTERED', 'BOTS', 'GUESTS');
+ }
+ else
+ {
+ $group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'REGISTERED', 'BOTS', 'GUESTS');
+ }
+
+ // We need both username and user_id info
+ $result = user_get_id_name($user_id_ary, $username_ary);
+
+ if (!sizeof($user_id_ary) || $result !== false)
+ {
+ return 'NO_USER';
+ }
+
+ $sql = 'SELECT *
+ FROM ' . GROUPS_TABLE . '
+ WHERE ' . $db->sql_in_set('group_name', $group_order);
+ $result = $db->sql_query($sql);
+
+ $group_order_id = $special_group_data = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $group_order_id[$row['group_name']] = $row['group_id'];
+
+ $special_group_data[$row['group_id']] = array(
+ 'group_colour' => $row['group_colour'],
+ 'group_rank' => $row['group_rank'],
+ );
+
+ // Only set the group avatar if one is defined...
+ if ($row['group_avatar'])
+ {
+ $special_group_data[$row['group_id']] = array_merge($special_group_data[$row['group_id']], array(
+ 'group_avatar' => $row['group_avatar'],
+ 'group_avatar_type' => $row['group_avatar_type'],
+ 'group_avatar_width' => $row['group_avatar_width'],
+ 'group_avatar_height' => $row['group_avatar_height'])
+ );
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // Get users default groups - we only need to reset default group membership if the group from which the user gets removed is set as default
+ $sql = 'SELECT user_id, group_id
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $user_id_ary);
+ $result = $db->sql_query($sql);
+
+ $default_groups = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $default_groups[$row['user_id']] = $row['group_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // What special group memberships exist for these users?
+ $sql = 'SELECT g.group_id, g.group_name, ug.user_id
+ FROM ' . USER_GROUP_TABLE . ' ug, ' . GROUPS_TABLE . ' g
+ WHERE ' . $db->sql_in_set('ug.user_id', $user_id_ary) . "
+ AND g.group_id = ug.group_id
+ AND g.group_id <> $group_id
+ AND g.group_type = " . GROUP_SPECIAL . '
+ ORDER BY ug.user_id, g.group_id';
+ $result = $db->sql_query($sql);
+
+ $temp_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($default_groups[$row['user_id']] == $group_id && (!isset($temp_ary[$row['user_id']]) || $group_order_id[$row['group_name']] < $temp_ary[$row['user_id']]))
+ {
+ $temp_ary[$row['user_id']] = $row['group_id'];
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // sql_where_ary holds the new default groups and their users
+ $sql_where_ary = array();
+ foreach ($temp_ary as $uid => $gid)
+ {
+ $sql_where_ary[$gid][] = $uid;
+ }
+ unset($temp_ary);
+
+ foreach ($special_group_data as $gid => $default_data_ary)
+ {
+ if (isset($sql_where_ary[$gid]) && sizeof($sql_where_ary[$gid]))
+ {
+ remove_default_rank($group_id, $sql_where_ary[$gid]);
+ remove_default_avatar($group_id, $sql_where_ary[$gid]);
+ group_set_user_default($gid, $sql_where_ary[$gid], $default_data_ary);
+ }
+ }
+ unset($special_group_data);
+
+ $sql = 'DELETE FROM ' . USER_GROUP_TABLE . "
+ WHERE group_id = $group_id
+ AND " . $db->sql_in_set('user_id', $user_id_ary);
+ $db->sql_query($sql);
+
+ // Clear permissions cache of relevant users
+ $auth->acl_clear_prefetch($user_id_ary);
+
+ if (!$group_name)
+ {
+ $group_name = get_group_name($group_id);
+ }
+
+ $log = 'LOG_GROUP_REMOVE';
+
+ if ($group_name)
+ {
+ add_log('admin', $log, $group_name, implode(', ', $username_ary));
+ }
+
+ group_update_listings($group_id);
+
+ // Return false - no error
+ return false;
+}
+
+
+/**
+* Removes the group avatar of the default group from the users in user_ids who have that group as default.
+*/
+function remove_default_avatar($group_id, $user_ids)
+{
+ global $db;
+
+ if (!is_array($user_ids))
+ {
+ $user_ids = array($user_ids);
+ }
+ if (empty($user_ids))
+ {
+ return false;
+ }
+
+ $user_ids = array_map('intval', $user_ids);
+
+ $sql = 'SELECT *
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_id = ' . (int)$group_id;
+ $result = $db->sql_query($sql);
+ if (!$row = $db->sql_fetchrow($result))
+ {
+ $db->sql_freeresult($result);
+ return false;
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_avatar = '',
+ user_avatar_type = 0,
+ user_avatar_width = 0,
+ user_avatar_height = 0
+ WHERE group_id = " . (int) $group_id . "
+ AND user_avatar = '" . $db->sql_escape($row['group_avatar']) . "'
+ AND " . $db->sql_in_set('user_id', $user_ids);
+
+ $db->sql_query($sql);
+}
+
+/**
+* Removes the group rank of the default group from the users in user_ids who have that group as default.
+*/
+function remove_default_rank($group_id, $user_ids)
+{
+ global $db;
+
+ if (!is_array($user_ids))
+ {
+ $user_ids = array($user_ids);
+ }
+ if (empty($user_ids))
+ {
+ return false;
+ }
+
+ $user_ids = array_map('intval', $user_ids);
+
+ $sql = 'SELECT *
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_id = ' . (int)$group_id;
+ $result = $db->sql_query($sql);
+ if (!$row = $db->sql_fetchrow($result))
+ {
+ $db->sql_freeresult($result);
+ return false;
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_rank = 0
+ WHERE group_id = ' . (int)$group_id . '
+ AND user_rank <> 0
+ AND user_rank = ' . (int)$row['group_rank'] . '
+ AND ' . $db->sql_in_set('user_id', $user_ids);
+ $db->sql_query($sql);
+}
+
+/**
+* This is used to promote (to leader), demote or set as default a member/s
+*/
+function group_user_attributes($action, $group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $group_attributes = false)
+{
+ global $db, $auth, $phpbb_root_path, $phpEx, $config;
+
+ // We need both username and user_id info
+ $result = user_get_id_name($user_id_ary, $username_ary);
+
+ if (!sizeof($user_id_ary) || $result !== false)
+ {
+ return 'NO_USERS';
+ }
+
+ if (!$group_name)
+ {
+ $group_name = get_group_name($group_id);
+ }
+
+ switch ($action)
+ {
+ case 'demote':
+ case 'promote':
+
+ $sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . "
+ WHERE group_id = $group_id
+ AND user_pending = 1
+ AND " . $db->sql_in_set('user_id', $user_id_ary);
+ $result = $db->sql_query_limit($sql, 1);
+ $not_empty = ($db->sql_fetchrow($result));
+ $db->sql_freeresult($result);
+ if ($not_empty)
+ {
+ return 'NO_VALID_USERS';
+ }
+
+ $sql = 'UPDATE ' . USER_GROUP_TABLE . '
+ SET group_leader = ' . (($action == 'promote') ? 1 : 0) . "
+ WHERE group_id = $group_id
+ AND user_pending = 0
+ AND " . $db->sql_in_set('user_id', $user_id_ary);
+ $db->sql_query($sql);
+
+ $log = ($action == 'promote') ? 'LOG_GROUP_PROMOTED' : 'LOG_GROUP_DEMOTED';
+ break;
+
+ case 'approve':
+ // Make sure we only approve those which are pending ;)
+ $sql = 'SELECT u.user_id, u.user_email, u.username, u.username_clean, u.user_notify_type, u.user_jabber, u.user_lang
+ FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . ' ug
+ WHERE ug.group_id = ' . $group_id . '
+ AND ug.user_pending = 1
+ AND ug.user_id = u.user_id
+ AND ' . $db->sql_in_set('ug.user_id', $user_id_ary);
+ $result = $db->sql_query($sql);
+
+ $user_id_ary = $email_users = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $user_id_ary[] = $row['user_id'];
+ $email_users[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($user_id_ary))
+ {
+ return false;
+ }
+
+ $sql = 'UPDATE ' . USER_GROUP_TABLE . "
+ SET user_pending = 0
+ WHERE group_id = $group_id
+ AND " . $db->sql_in_set('user_id', $user_id_ary);
+ $db->sql_query($sql);
+
+ // Send approved email to users...
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ $messenger = new messenger();
+
+ foreach ($email_users as $row)
+ {
+ $messenger->template('group_approved', $row['user_lang']);
+
+ $messenger->to($row['user_email'], $row['username']);
+ $messenger->im($row['user_jabber'], $row['username']);
+
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($row['username']),
+ 'GROUP_NAME' => htmlspecialchars_decode($group_name),
+ 'U_GROUP' => generate_board_url() . "/ucp.$phpEx?i=groups&mode=membership")
+ );
+
+ $messenger->send($row['user_notify_type']);
+ }
+
+ $messenger->save_queue();
+
+ $log = 'LOG_USERS_APPROVED';
+ break;
+
+ case 'default':
+ // We only set default group for approved members of the group
+ $sql = 'SELECT user_id
+ FROM ' . USER_GROUP_TABLE . "
+ WHERE group_id = $group_id
+ AND user_pending = 0
+ AND " . $db->sql_in_set('user_id', $user_id_ary);
+ $result = $db->sql_query($sql);
+
+ $user_id_ary = $username_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $user_id_ary[] = $row['user_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $result = user_get_id_name($user_id_ary, $username_ary);
+ if (!sizeof($user_id_ary) || $result !== false)
+ {
+ return 'NO_USERS';
+ }
+
+ $sql = 'SELECT user_id, group_id FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $user_id_ary, false, true);
+ $result = $db->sql_query($sql);
+
+ $groups = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!isset($groups[$row['group_id']]))
+ {
+ $groups[$row['group_id']] = array();
+ }
+ $groups[$row['group_id']][] = $row['user_id'];
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($groups as $gid => $uids)
+ {
+ remove_default_rank($gid, $uids);
+ remove_default_avatar($gid, $uids);
+ }
+ group_set_user_default($group_id, $user_id_ary, $group_attributes);
+ $log = 'LOG_GROUP_DEFAULTS';
+ break;
+ }
+
+ // Clear permissions cache of relevant users
+ $auth->acl_clear_prefetch($user_id_ary);
+
+ add_log('admin', $log, $group_name, implode(', ', $username_ary));
+
+ group_update_listings($group_id);
+
+ return false;
+}
+
+/**
+* A small version of validate_username to check for a group name's existence. To be called directly.
+*/
+function group_validate_groupname($group_id, $group_name)
+{
+ global $config, $db;
+
+ $group_name = utf8_clean_string($group_name);
+
+ if (!empty($group_id))
+ {
+ $sql = 'SELECT group_name
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_id = ' . (int) $group_id;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ return false;
+ }
+
+ $allowed_groupname = utf8_clean_string($row['group_name']);
+
+ if ($allowed_groupname == $group_name)
+ {
+ return false;
+ }
+ }
+
+ $sql = 'SELECT group_name
+ FROM ' . GROUPS_TABLE . "
+ WHERE LOWER(group_name) = '" . $db->sql_escape(utf8_strtolower($group_name)) . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ return 'GROUP_NAME_TAKEN';
+ }
+
+ return false;
+}
+
+/**
+* Set users default group
+*
+* @access private
+*/
+function group_set_user_default($group_id, $user_id_ary, $group_attributes = false, $update_listing = false)
+{
+ global $cache, $db;
+
+ if (empty($user_id_ary))
+ {
+ return;
+ }
+
+ $attribute_ary = array(
+ 'group_colour' => 'string',
+ 'group_rank' => 'int',
+ 'group_avatar' => 'string',
+ 'group_avatar_type' => 'int',
+ 'group_avatar_width' => 'int',
+ 'group_avatar_height' => 'int',
+ );
+
+ $sql_ary = array(
+ 'group_id' => $group_id
+ );
+
+ // Were group attributes passed to the function? If not we need to obtain them
+ if ($group_attributes === false)
+ {
+ $sql = 'SELECT ' . implode(', ', array_keys($attribute_ary)) . '
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_id = $group_id";
+ $result = $db->sql_query($sql);
+ $group_attributes = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+
+ foreach ($attribute_ary as $attribute => $type)
+ {
+ if (isset($group_attributes[$attribute]))
+ {
+ // If we are about to set an avatar or rank, we will not overwrite with empty, unless we are not actually changing the default group
+ if ((strpos($attribute, 'group_avatar') === 0 || strpos($attribute, 'group_rank') === 0) && !$group_attributes[$attribute])
+ {
+ continue;
+ }
+
+ settype($group_attributes[$attribute], $type);
+ $sql_ary[str_replace('group_', 'user_', $attribute)] = $group_attributes[$attribute];
+ }
+ }
+
+ // Before we update the user attributes, we will make a list of those having now the group avatar assigned
+ if (isset($sql_ary['user_avatar']))
+ {
+ // Ok, get the original avatar data from users having an uploaded one (we need to remove these from the filesystem)
+ $sql = 'SELECT user_id, group_id, user_avatar
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $user_id_ary) . '
+ AND user_avatar_type = ' . AVATAR_UPLOAD;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ avatar_delete('user', $row);
+ }
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ unset($sql_ary['user_avatar_type']);
+ unset($sql_ary['user_avatar_height']);
+ unset($sql_ary['user_avatar_width']);
+ }
+
+ $sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE ' . $db->sql_in_set('user_id', $user_id_ary);
+ $db->sql_query($sql);
+
+ if (isset($sql_ary['user_colour']))
+ {
+ // Update any cached colour information for these users
+ $sql = 'UPDATE ' . FORUMS_TABLE . " SET forum_last_poster_colour = '" . $db->sql_escape($sql_ary['user_colour']) . "'
+ WHERE " . $db->sql_in_set('forum_last_poster_id', $user_id_ary);
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . TOPICS_TABLE . " SET topic_first_poster_colour = '" . $db->sql_escape($sql_ary['user_colour']) . "'
+ WHERE " . $db->sql_in_set('topic_poster', $user_id_ary);
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . TOPICS_TABLE . " SET topic_last_poster_colour = '" . $db->sql_escape($sql_ary['user_colour']) . "'
+ WHERE " . $db->sql_in_set('topic_last_poster_id', $user_id_ary);
+ $db->sql_query($sql);
+
+ global $config;
+
+ if (in_array($config['newest_user_id'], $user_id_ary))
+ {
+ set_config('newest_user_colour', $sql_ary['user_colour'], true);
+ }
+ }
+
+ if ($update_listing)
+ {
+ group_update_listings($group_id);
+ }
+
+ // Because some tables/caches use usercolour-specific data we need to purge this here.
+ $cache->destroy('sql', MODERATOR_CACHE_TABLE);
+}
+
+/**
+* Get group name
+*/
+function get_group_name($group_id)
+{
+ global $db, $user;
+
+ $sql = 'SELECT group_name, group_type
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_id = ' . (int) $group_id;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row || ($row['group_type'] == GROUP_SPECIAL && empty($user->lang)))
+ {
+ return '';
+ }
+
+ return ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
+}
+
+/**
+* Obtain either the members of a specified group, the groups the specified user is subscribed to
+* or checking if a specified user is in a specified group. This function does not return pending memberships.
+*
+* Note: Never use this more than once... first group your users/groups
+*/
+function group_memberships($group_id_ary = false, $user_id_ary = false, $return_bool = false)
+{
+ global $db;
+
+ if (!$group_id_ary && !$user_id_ary)
+ {
+ return true;
+ }
+
+ if ($user_id_ary)
+ {
+ $user_id_ary = (!is_array($user_id_ary)) ? array($user_id_ary) : $user_id_ary;
+ }
+
+ if ($group_id_ary)
+ {
+ $group_id_ary = (!is_array($group_id_ary)) ? array($group_id_ary) : $group_id_ary;
+ }
+
+ $sql = 'SELECT ug.*, u.username, u.username_clean, u.user_email
+ FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u
+ WHERE ug.user_id = u.user_id
+ AND ug.user_pending = 0 AND ';
+
+ if ($group_id_ary)
+ {
+ $sql .= ' ' . $db->sql_in_set('ug.group_id', $group_id_ary);
+ }
+
+ if ($user_id_ary)
+ {
+ $sql .= ($group_id_ary) ? ' AND ' : ' ';
+ $sql .= $db->sql_in_set('ug.user_id', $user_id_ary);
+ }
+
+ $result = ($return_bool) ? $db->sql_query_limit($sql, 1) : $db->sql_query($sql);
+
+ $row = $db->sql_fetchrow($result);
+
+ if ($return_bool)
+ {
+ $db->sql_freeresult($result);
+ return ($row) ? true : false;
+ }
+
+ if (!$row)
+ {
+ return false;
+ }
+
+ $return = array();
+
+ do
+ {
+ $return[] = $row;
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ $db->sql_freeresult($result);
+
+ return $return;
+}
+
+/**
+* Re-cache moderators and foes if group has a_ or m_ permissions
+*/
+function group_update_listings($group_id)
+{
+ global $auth;
+
+ $hold_ary = $auth->acl_group_raw_data($group_id, array('a_', 'm_'));
+
+ if (!sizeof($hold_ary))
+ {
+ return;
+ }
+
+ $mod_permissions = $admin_permissions = false;
+
+ foreach ($hold_ary as $g_id => $forum_ary)
+ {
+ foreach ($forum_ary as $forum_id => $auth_ary)
+ {
+ foreach ($auth_ary as $auth_option => $setting)
+ {
+ if ($mod_permissions && $admin_permissions)
+ {
+ break 3;
+ }
+
+ if ($setting != ACL_YES)
+ {
+ continue;
+ }
+
+ if ($auth_option == 'm_')
+ {
+ $mod_permissions = true;
+ }
+
+ if ($auth_option == 'a_')
+ {
+ $admin_permissions = true;
+ }
+ }
+ }
+ }
+
+ if ($mod_permissions)
+ {
+ if (!function_exists('cache_moderators'))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+ }
+ cache_moderators();
+ }
+
+ if ($mod_permissions || $admin_permissions)
+ {
+ if (!function_exists('update_foes'))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+ }
+ update_foes(array($group_id));
+ }
+}
+
+
+
+/**
+* Funtion to make a user leave the NEWLY_REGISTERED system group.
+* @access public
+* @param $user_id The id of the user to remove from the group
+*/
+function remove_newly_registered($user_id, $user_data = false)
+{
+ global $db;
+
+ if ($user_data === false)
+ {
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . $user_id;
+ $result = $db->sql_query($sql);
+ $user_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$user_row)
+ {
+ return false;
+ }
+ else
+ {
+ $user_data = $user_row;
+ }
+ }
+
+ if (empty($user_data['user_new']))
+ {
+ return false;
+ }
+
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = 'NEWLY_REGISTERED'
+ AND group_type = " . GROUP_SPECIAL;
+ $result = $db->sql_query($sql);
+ $group_id = (int) $db->sql_fetchfield('group_id');
+ $db->sql_freeresult($result);
+
+ if (!$group_id)
+ {
+ return false;
+ }
+
+ // We need to call group_user_del here, because this function makes sure everything is correctly changed.
+ // A downside for a call within the session handler is that the language is not set up yet - so no log entry
+ group_user_del($group_id, $user_id);
+
+ // Set user_new to 0 to let this not be triggered again
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_new = 0
+ WHERE user_id = ' . $user_id;
+ $db->sql_query($sql);
+
+ // The new users group was the users default group?
+ if ($user_data['group_id'] == $group_id)
+ {
+ // Which group is now the users default one?
+ $sql = 'SELECT group_id
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . $user_id;
+ $result = $db->sql_query($sql);
+ $user_data['group_id'] = $db->sql_fetchfield('group_id');
+ $db->sql_freeresult($result);
+ }
+
+ return $user_data['group_id'];
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/hooks/index.php b/phpBB/includes/hooks/index.php
new file mode 100644
index 0000000000..aa85e63f32
--- /dev/null
+++ b/phpBB/includes/hooks/index.php
@@ -0,0 +1,250 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2007 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* phpBB Hook Class
+* @package phpBB3
+*/
+class phpbb_hook
+{
+ /**
+ * Registered hooks
+ */
+ var $hooks = array();
+
+ /**
+ * Results returned by functions called
+ */
+ var $hook_result = array();
+
+ /**
+ * internal pointer
+ */
+ var $current_hook = NULL;
+
+ /**
+ * Initialize hook class.
+ *
+ * @param array $valid_hooks array containing the hookable functions/methods
+ */
+ function phpbb_hook($valid_hooks)
+ {
+ foreach ($valid_hooks as $_null => $method)
+ {
+ $this->add_hook($method);
+ }
+
+ if (function_exists('phpbb_hook_register'))
+ {
+ phpbb_hook_register($this);
+ }
+ }
+
+ /**
+ * Register function/method to be called within hook
+ * This function is normally called by the modification/application to attach/register the functions.
+ *
+ * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
+ * @param mixed $hook The replacement function/method to be called. Passing function name or array with object/class definition
+ * @param string $mode Specify the priority/chain mode. 'normal' -> hook gets appended to the chain. 'standalone' -> only the specified hook gets called - later hooks are not able to overwrite this (E_NOTICE is triggered then). 'first' -> hook is called as the first one within the chain. 'last' -> hook is called as the last one within the chain.
+ */
+ function register($definition, $hook, $mode = 'normal')
+ {
+ $class = (!is_array($definition)) ? '__global' : $definition[0];
+ $function = (!is_array($definition)) ? $definition : $definition[1];
+
+ // Method able to be hooked?
+ if (isset($this->hooks[$class][$function]))
+ {
+ switch ($mode)
+ {
+ case 'standalone':
+ if (!isset($this->hooks[$class][$function]['standalone']))
+ {
+ $this->hooks[$class][$function] = array('standalone' => $hook);
+ }
+ else
+ {
+ trigger_error('Hook not able to be called standalone, previous hook already standalone.', E_NOTICE);
+ }
+ break;
+
+ case 'first':
+ case 'last':
+ $this->hooks[$class][$function][$mode][] = $hook;
+ break;
+
+ case 'normal':
+ default:
+ $this->hooks[$class][$function]['normal'][] = $hook;
+ break;
+ }
+ }
+ }
+
+ /**
+ * Calling all functions/methods attached to a specified hook.
+ * Called by the function allowing hooks...
+ *
+ * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
+ * @return bool False if no hook got executed, true otherwise
+ */
+ function call_hook($definition)
+ {
+ $class = (!is_array($definition)) ? '__global' : $definition[0];
+ $function = (!is_array($definition)) ? $definition : $definition[1];
+
+ if (!empty($this->hooks[$class][$function]))
+ {
+ // Developer tries to call a hooked function within the hooked function...
+ if ($this->current_hook !== NULL && $this->current_hook['class'] === $class && $this->current_hook['function'] === $function)
+ {
+ return false;
+ }
+
+ // Call the hook with the arguments attached and store result
+ $arguments = func_get_args();
+ $this->current_hook = array('class' => $class, 'function' => $function);
+ $arguments[0] = &$this;
+
+ // Call the hook chain...
+ if (isset($this->hooks[$class][$function]['standalone']))
+ {
+ $this->hook_result[$class][$function] = call_user_func_array($this->hooks[$class][$function]['standalone'], $arguments);
+ }
+ else
+ {
+ foreach (array('first', 'normal', 'last') as $mode)
+ {
+ if (!isset($this->hooks[$class][$function][$mode]))
+ {
+ continue;
+ }
+
+ foreach ($this->hooks[$class][$function][$mode] as $hook)
+ {
+ $this->hook_result[$class][$function] = call_user_func_array($hook, $arguments);
+ }
+ }
+ }
+
+ $this->current_hook = NULL;
+ return true;
+ }
+
+ $this->current_hook = NULL;
+ return false;
+ }
+
+ /**
+ * Get result from previously called functions/methods for the same hook
+ *
+ * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
+ * @return mixed False if nothing returned if there is no result, else array('result' => ... )
+ */
+ function previous_hook_result($definition)
+ {
+ $class = (!is_array($definition)) ? '__global' : $definition[0];
+ $function = (!is_array($definition)) ? $definition : $definition[1];
+
+ if (!empty($this->hooks[$class][$function]) && isset($this->hook_result[$class][$function]))
+ {
+ return array('result' => $this->hook_result[$class][$function]);
+ }
+
+ return false;
+ }
+
+ /**
+ * Check if the called functions/methods returned something.
+ *
+ * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
+ * @return bool True if results are there, false if not
+ */
+ function hook_return($definition)
+ {
+ $class = (!is_array($definition)) ? '__global' : $definition[0];
+ $function = (!is_array($definition)) ? $definition : $definition[1];
+
+ if (!empty($this->hooks[$class][$function]) && isset($this->hook_result[$class][$function]))
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Give actual result from called functions/methods back.
+ *
+ * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
+ * @return mixed The result
+ */
+ function hook_return_result($definition)
+ {
+ $class = (!is_array($definition)) ? '__global' : $definition[0];
+ $function = (!is_array($definition)) ? $definition : $definition[1];
+
+ if (!empty($this->hooks[$class][$function]) && isset($this->hook_result[$class][$function]))
+ {
+ $result = $this->hook_result[$class][$function];
+ unset($this->hook_result[$class][$function]);
+ return $result;
+ }
+
+ return;
+ }
+
+ /**
+ * Add new function to the allowed hooks.
+ *
+ * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
+ */
+ function add_hook($definition)
+ {
+ if (!is_array($definition))
+ {
+ $definition = array('__global', $definition);
+ }
+
+ $this->hooks[$definition[0]][$definition[1]] = array();
+ }
+
+ /**
+ * Remove function from the allowed hooks.
+ *
+ * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
+ */
+ function remove_hook($definition)
+ {
+ $class = (!is_array($definition)) ? '__global' : $definition[0];
+ $function = (!is_array($definition)) ? $definition : $definition[1];
+
+ if (isset($this->hooks[$class][$function]))
+ {
+ unset($this->hooks[$class][$function]);
+
+ if (isset($this->hook_result[$class][$function]))
+ {
+ unset($this->hook_result[$class][$function]);
+ }
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/index.htm b/phpBB/includes/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/includes/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/includes/mcp/info/mcp_ban.php b/phpBB/includes/mcp/info/mcp_ban.php
new file mode 100644
index 0000000000..383df30498
--- /dev/null
+++ b/phpBB/includes/mcp/info/mcp_ban.php
@@ -0,0 +1,39 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class mcp_ban_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'mcp_ban',
+ 'title' => 'MCP_BAN',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'user' => array('title' => 'MCP_BAN_USERNAMES', 'auth' => 'acl_m_ban', 'cat' => array('MCP_BAN')),
+ 'ip' => array('title' => 'MCP_BAN_IPS', 'auth' => 'acl_m_ban', 'cat' => array('MCP_BAN')),
+ 'email' => array('title' => 'MCP_BAN_EMAILS', 'auth' => 'acl_m_ban', 'cat' => array('MCP_BAN')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/info/mcp_logs.php b/phpBB/includes/mcp/info/mcp_logs.php
new file mode 100644
index 0000000000..fe2f9fa1d7
--- /dev/null
+++ b/phpBB/includes/mcp/info/mcp_logs.php
@@ -0,0 +1,39 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class mcp_logs_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'mcp_logs',
+ 'title' => 'MCP_LOGS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'front' => array('title' => 'MCP_LOGS_FRONT', 'auth' => 'acl_m_ || aclf_m_', 'cat' => array('MCP_LOGS')),
+ 'forum_logs' => array('title' => 'MCP_LOGS_FORUM_VIEW', 'auth' => 'acl_m_,$id', 'cat' => array('MCP_LOGS')),
+ 'topic_logs' => array('title' => 'MCP_LOGS_TOPIC_VIEW', 'auth' => 'acl_m_,$id', 'cat' => array('MCP_LOGS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/info/mcp_main.php b/phpBB/includes/mcp/info/mcp_main.php
new file mode 100644
index 0000000000..9755cdfc07
--- /dev/null
+++ b/phpBB/includes/mcp/info/mcp_main.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class mcp_main_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'mcp_main',
+ 'title' => 'MCP_MAIN',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'front' => array('title' => 'MCP_MAIN_FRONT', 'auth' => '', 'cat' => array('MCP_MAIN')),
+ 'forum_view' => array('title' => 'MCP_MAIN_FORUM_VIEW', 'auth' => 'acl_m_,$id', 'cat' => array('MCP_MAIN')),
+ 'topic_view' => array('title' => 'MCP_MAIN_TOPIC_VIEW', 'auth' => 'acl_m_,$id', 'cat' => array('MCP_MAIN')),
+ 'post_details' => array('title' => 'MCP_MAIN_POST_DETAILS', 'auth' => 'acl_m_,$id || (!$id && aclf_m_)', 'cat' => array('MCP_MAIN')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/info/mcp_notes.php b/phpBB/includes/mcp/info/mcp_notes.php
new file mode 100644
index 0000000000..afe232e5b5
--- /dev/null
+++ b/phpBB/includes/mcp/info/mcp_notes.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class mcp_notes_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'mcp_notes',
+ 'title' => 'MCP_NOTES',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'front' => array('title' => 'MCP_NOTES_FRONT', 'auth' => '', 'cat' => array('MCP_NOTES')),
+ 'user_notes' => array('title' => 'MCP_NOTES_USER', 'auth' => '', 'cat' => array('MCP_NOTES')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/info/mcp_pm_reports.php b/phpBB/includes/mcp/info/mcp_pm_reports.php
new file mode 100644
index 0000000000..103f560597
--- /dev/null
+++ b/phpBB/includes/mcp/info/mcp_pm_reports.php
@@ -0,0 +1,39 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class mcp_pm_reports_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'mcp_pm_reports',
+ 'title' => 'MCP_PM_REPORTS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'pm_reports' => array('title' => 'MCP_PM_REPORTS_OPEN', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
+ 'pm_reports_closed' => array('title' => 'MCP_PM_REPORTS_CLOSED', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
+ 'pm_report_details' => array('title' => 'MCP_PM_REPORT_DETAILS', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/info/mcp_queue.php b/phpBB/includes/mcp/info/mcp_queue.php
new file mode 100644
index 0000000000..7a256642b9
--- /dev/null
+++ b/phpBB/includes/mcp/info/mcp_queue.php
@@ -0,0 +1,39 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class mcp_queue_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'mcp_queue',
+ 'title' => 'MCP_QUEUE',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'unapproved_topics' => array('title' => 'MCP_QUEUE_UNAPPROVED_TOPICS', 'auth' => 'aclf_m_approve', 'cat' => array('MCP_QUEUE')),
+ 'unapproved_posts' => array('title' => 'MCP_QUEUE_UNAPPROVED_POSTS', 'auth' => 'aclf_m_approve', 'cat' => array('MCP_QUEUE')),
+ 'approve_details' => array('title' => 'MCP_QUEUE_APPROVE_DETAILS', 'auth' => 'acl_m_approve,$id || (!$id && aclf_m_approve)', 'cat' => array('MCP_QUEUE')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/info/mcp_reports.php b/phpBB/includes/mcp/info/mcp_reports.php
new file mode 100644
index 0000000000..3893ba5abb
--- /dev/null
+++ b/phpBB/includes/mcp/info/mcp_reports.php
@@ -0,0 +1,39 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class mcp_reports_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'mcp_reports',
+ 'title' => 'MCP_REPORTS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'reports' => array('title' => 'MCP_REPORTS_OPEN', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
+ 'reports_closed' => array('title' => 'MCP_REPORTS_CLOSED', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
+ 'report_details' => array('title' => 'MCP_REPORT_DETAILS', 'auth' => 'acl_m_report,$id || (!$id && aclf_m_report)', 'cat' => array('MCP_REPORTS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/info/mcp_warn.php b/phpBB/includes/mcp/info/mcp_warn.php
new file mode 100644
index 0000000000..2b0b09f75a
--- /dev/null
+++ b/phpBB/includes/mcp/info/mcp_warn.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class mcp_warn_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'mcp_warn',
+ 'title' => 'MCP_WARN',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'front' => array('title' => 'MCP_WARN_FRONT', 'auth' => 'aclf_m_warn', 'cat' => array('MCP_WARN')),
+ 'list' => array('title' => 'MCP_WARN_LIST', 'auth' => 'aclf_m_warn', 'cat' => array('MCP_WARN')),
+ 'warn_user' => array('title' => 'MCP_WARN_USER', 'auth' => 'aclf_m_warn', 'cat' => array('MCP_WARN')),
+ 'warn_post' => array('title' => 'MCP_WARN_POST', 'auth' => 'acl_m_warn && acl_f_read,$id', 'cat' => array('MCP_WARN')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_ban.php b/phpBB/includes/mcp/mcp_ban.php
new file mode 100644
index 0000000000..d9f5eb8f22
--- /dev/null
+++ b/phpBB/includes/mcp/mcp_ban.php
@@ -0,0 +1,219 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package mcp
+*/
+class mcp_ban
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template, $cache;
+ global $phpbb_root_path, $phpEx;
+
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ // Include the admin banning interface...
+ include($phpbb_root_path . 'includes/acp/acp_ban.' . $phpEx);
+
+ $bansubmit = (isset($_POST['bansubmit'])) ? true : false;
+ $unbansubmit = (isset($_POST['unbansubmit'])) ? true : false;
+ $current_time = time();
+
+ $user->add_lang(array('acp/ban', 'acp/users'));
+ $this->tpl_name = 'mcp_ban';
+
+ // Ban submitted?
+ if ($bansubmit)
+ {
+ // Grab the list of entries
+ $ban = request_var('ban', '', ($mode === 'user') ? true : false);
+
+ if ($mode === 'user')
+ {
+ $ban = utf8_normalize_nfc($ban);
+ }
+
+ $ban_len = request_var('banlength', 0);
+ $ban_len_other = request_var('banlengthother', '');
+ $ban_exclude = request_var('banexclude', 0);
+ $ban_reason = utf8_normalize_nfc(request_var('banreason', '', true));
+ $ban_give_reason = utf8_normalize_nfc(request_var('bangivereason', '', true));
+
+ if ($ban)
+ {
+ if (confirm_box(true))
+ {
+ user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
+
+ trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . '<br /><br /><a href="' . $this->u_action . '">&laquo; ' . $user->lang['BACK_TO_PREV'] . '</a>');
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'mode' => $mode,
+ 'ban' => $ban,
+ 'bansubmit' => true,
+ 'banlength' => $ban_len,
+ 'banlengthother' => $ban_len_other,
+ 'banexclude' => $ban_exclude,
+ 'banreason' => $ban_reason,
+ 'bangivereason' => $ban_give_reason)));
+ }
+ }
+ }
+ else if ($unbansubmit)
+ {
+ $ban = request_var('unban', array(''));
+
+ if ($ban)
+ {
+ if (confirm_box(true))
+ {
+ user_unban($mode, $ban);
+
+ trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . '<br /><br /><a href="' . $this->u_action . '">&laquo; ' . $user->lang['BACK_TO_PREV'] . '</a>');
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'mode' => $mode,
+ 'unbansubmit' => true,
+ 'unban' => $ban)));
+ }
+ }
+ }
+
+ // Ban length options
+ $ban_end_text = array(0 => $user->lang['PERMANENT'], 30 => $user->lang['30_MINS'], 60 => $user->lang['1_HOUR'], 360 => $user->lang['6_HOURS'], 1440 => $user->lang['1_DAY'], 10080 => $user->lang['7_DAYS'], 20160 => $user->lang['2_WEEKS'], 40320 => $user->lang['1_MONTH'], -1 => $user->lang['UNTIL'] . ' -&gt; ');
+
+ $ban_end_options = '';
+ foreach ($ban_end_text as $length => $text)
+ {
+ $ban_end_options .= '<option value="' . $length . '">' . $text . '</option>';
+ }
+
+ // Define language vars
+ $this->page_title = $user->lang[strtoupper($mode) . '_BAN'];
+
+ $l_ban_explain = $user->lang[strtoupper($mode) . '_BAN_EXPLAIN'];
+ $l_ban_exclude_explain = $user->lang[strtoupper($mode) . '_BAN_EXCLUDE_EXPLAIN'];
+ $l_unban_title = $user->lang[strtoupper($mode) . '_UNBAN'];
+ $l_unban_explain = $user->lang[strtoupper($mode) . '_UNBAN_EXPLAIN'];
+ $l_no_ban_cell = $user->lang[strtoupper($mode) . '_NO_BANNED'];
+
+ switch ($mode)
+ {
+ case 'user':
+ $l_ban_cell = $user->lang['USERNAME'];
+ break;
+
+ case 'ip':
+ $l_ban_cell = $user->lang['IP_HOSTNAME'];
+ break;
+
+ case 'email':
+ $l_ban_cell = $user->lang['EMAIL_ADDRESS'];
+ break;
+ }
+
+ acp_ban::display_ban_options($mode);
+
+ $template->assign_vars(array(
+ 'L_TITLE' => $this->page_title,
+ 'L_EXPLAIN' => $l_ban_explain,
+ 'L_UNBAN_TITLE' => $l_unban_title,
+ 'L_UNBAN_EXPLAIN' => $l_unban_explain,
+ 'L_BAN_CELL' => $l_ban_cell,
+ 'L_BAN_EXCLUDE_EXPLAIN' => $l_ban_exclude_explain,
+ 'L_NO_BAN_CELL' => $l_no_ban_cell,
+
+ 'S_USERNAME_BAN' => ($mode == 'user') ? true : false,
+
+ 'U_ACTION' => $this->u_action,
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=mcp_ban&amp;field=ban'),
+ ));
+
+ if ($mode === 'email' && !$auth->acl_get('a_user'))
+ {
+ return;
+ }
+
+ // As a "service" we will check if any post id is specified and populate the username of the poster id if given
+ $post_id = request_var('p', 0);
+ $user_id = request_var('u', 0);
+ $username = $pre_fill = false;
+
+ if ($user_id && $user_id <> ANONYMOUS)
+ {
+ $sql = 'SELECT username, user_email, user_ip
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . $user_id;
+ $result = $db->sql_query($sql);
+ switch ($mode)
+ {
+ case 'user':
+ $pre_fill = (string) $db->sql_fetchfield('username');
+ break;
+
+ case 'ip':
+ $pre_fill = (string) $db->sql_fetchfield('user_ip');
+ break;
+
+ case 'email':
+ $pre_fill = (string) $db->sql_fetchfield('user_email');
+ break;
+ }
+ $db->sql_freeresult($result);
+ }
+ else if ($post_id)
+ {
+ $post_info = get_post_data($post_id, 'm_ban');
+
+ if (sizeof($post_info) && !empty($post_info[$post_id]))
+ {
+ switch ($mode)
+ {
+ case 'user':
+ $pre_fill = $post_info[$post_id]['username'];
+ break;
+
+ case 'ip':
+ $pre_fill = $post_info[$post_id]['poster_ip'];
+ break;
+
+ case 'email':
+ $pre_fill = $post_info[$post_id]['user_email'];
+ break;
+ }
+
+ }
+ }
+
+ if ($pre_fill)
+ {
+ // left for legacy template compatibility
+ $template->assign_var('USERNAMES', $pre_fill);
+ $template->assign_var('BAN_QUANTIFIER', $pre_fill);
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php
new file mode 100644
index 0000000000..b70601b479
--- /dev/null
+++ b/phpBB/includes/mcp/mcp_forum.php
@@ -0,0 +1,447 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* MCP Forum View
+*/
+function mcp_forum_view($id, $mode, $action, $forum_info)
+{
+ global $template, $db, $user, $auth, $cache, $module;
+ global $phpEx, $phpbb_root_path, $config;
+
+ $user->add_lang(array('viewtopic', 'viewforum'));
+
+ include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+
+ // merge_topic is the quickmod action, merge_topics is the mcp_forum action, and merge_select is the mcp_topic action
+ $merge_select = ($action == 'merge_select' || $action == 'merge_topic' || $action == 'merge_topics') ? true : false;
+
+ if ($merge_select)
+ {
+ // Fixes a "bug" that makes forum_view use the same ordering as topic_view
+ unset($_POST['sk'], $_POST['sd'], $_REQUEST['sk'], $_REQUEST['sd']);
+ }
+
+ $forum_id = $forum_info['forum_id'];
+ $start = request_var('start', 0);
+ $topic_id_list = request_var('topic_id_list', array(0));
+ $post_id_list = request_var('post_id_list', array(0));
+ $source_topic_ids = array(request_var('t', 0));
+ $to_topic_id = request_var('to_topic_id', 0);
+
+ $url_extra = '';
+ $url_extra .= ($forum_id) ? "&amp;f=$forum_id" : '';
+ $url_extra .= ($GLOBALS['topic_id']) ? '&amp;t=' . $GLOBALS['topic_id'] : '';
+ $url_extra .= ($GLOBALS['post_id']) ? '&amp;p=' . $GLOBALS['post_id'] : '';
+ $url_extra .= ($GLOBALS['user_id']) ? '&amp;u=' . $GLOBALS['user_id'] : '';
+
+ $url = append_sid("{$phpbb_root_path}mcp.$phpEx?$url_extra");
+
+ // Resync Topics
+ switch ($action)
+ {
+ case 'resync':
+ $topic_ids = request_var('topic_id_list', array(0));
+ mcp_resync_topics($topic_ids);
+ break;
+
+ case 'merge_topics':
+ $source_topic_ids = $topic_id_list;
+ case 'merge_topic':
+ if ($to_topic_id)
+ {
+ merge_topics($forum_id, $source_topic_ids, $to_topic_id);
+ }
+ break;
+ }
+
+ $selected_ids = '';
+ if (sizeof($post_id_list) && $action != 'merge_topics')
+ {
+ foreach ($post_id_list as $num => $post_id)
+ {
+ $selected_ids .= '&amp;post_id_list[' . $num . ']=' . $post_id;
+ }
+ }
+ else if (sizeof($topic_id_list) && $action == 'merge_topics')
+ {
+ foreach ($topic_id_list as $num => $topic_id)
+ {
+ $selected_ids .= '&amp;topic_id_list[' . $num . ']=' . $topic_id;
+ }
+ }
+
+ make_jumpbox($url . "&amp;i=$id&amp;action=$action&amp;mode=$mode" . (($merge_select) ? $selected_ids : ''), $forum_id, false, 'm_', true);
+
+ $topics_per_page = ($forum_info['forum_topics_per_page']) ? $forum_info['forum_topics_per_page'] : $config['topics_per_page'];
+
+ $sort_days = $total = 0;
+ $sort_key = $sort_dir = '';
+ $sort_by_sql = $sort_order_sql = array();
+ mcp_sorting('viewforum', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id);
+
+ $forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total;
+ $limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
+
+ $template->assign_vars(array(
+ 'ACTION' => $action,
+ 'FORUM_NAME' => $forum_info['forum_name'],
+ 'FORUM_DESCRIPTION' => generate_text_for_display($forum_info['forum_desc'], $forum_info['forum_desc_uid'], $forum_info['forum_desc_bitfield'], $forum_info['forum_desc_options']),
+
+ 'REPORTED_IMG' => $user->img('icon_topic_reported', 'TOPIC_REPORTED'),
+ 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPIC_UNAPPROVED'),
+ 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
+ 'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
+
+ 'S_CAN_REPORT' => $auth->acl_get('m_report', $forum_id),
+ 'S_CAN_DELETE' => $auth->acl_get('m_delete', $forum_id),
+ 'S_CAN_MERGE' => $auth->acl_get('m_merge', $forum_id),
+ 'S_CAN_MOVE' => $auth->acl_get('m_move', $forum_id),
+ 'S_CAN_FORK' => $auth->acl_get('m_', $forum_id),
+ 'S_CAN_LOCK' => $auth->acl_get('m_lock', $forum_id),
+ 'S_CAN_SYNC' => $auth->acl_get('m_', $forum_id),
+ 'S_CAN_APPROVE' => $auth->acl_get('m_approve', $forum_id),
+ 'S_MERGE_SELECT' => ($merge_select) ? true : false,
+ 'S_CAN_MAKE_NORMAL' => $auth->acl_gets('f_sticky', 'f_announce', $forum_id),
+ 'S_CAN_MAKE_STICKY' => $auth->acl_get('f_sticky', $forum_id),
+ 'S_CAN_MAKE_ANNOUNCE' => $auth->acl_get('f_announce', $forum_id),
+
+ 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
+ 'U_VIEW_FORUM_LOGS' => ($auth->acl_gets('a_', 'm_', $forum_id) && $module->loaded('logs')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=logs&amp;mode=forum_logs&amp;f=' . $forum_id) : '',
+
+ 'S_MCP_ACTION' => $url . "&amp;i=$id&amp;forum_action=$action&amp;mode=$mode&amp;start=$start" . (($merge_select) ? $selected_ids : ''),
+
+ 'PAGINATION' => generate_pagination($url . "&amp;i=$id&amp;action=$action&amp;mode=$mode&amp;sd=$sort_dir&amp;sk=$sort_key&amp;st=$sort_days" . (($merge_select) ? $selected_ids : ''), $forum_topics, $topics_per_page, $start),
+ 'PAGE_NUMBER' => on_page($forum_topics, $topics_per_page, $start),
+ 'TOTAL_TOPICS' => ($forum_topics == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $forum_topics),
+ ));
+
+ // Grab icons
+ $icons = $cache->obtain_icons();
+
+ $topic_rows = array();
+
+ if ($config['load_db_lastread'])
+ {
+ $read_tracking_join = ' LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id'] . ')';
+ $read_tracking_select = ', tt.mark_time';
+ }
+ else
+ {
+ $read_tracking_join = $read_tracking_select = '';
+ }
+
+ $sql = "SELECT t.topic_id
+ FROM " . TOPICS_TABLE . " t
+ WHERE t.forum_id IN($forum_id, 0)
+ " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1') . "
+ $limit_time_sql
+ ORDER BY t.topic_type DESC, $sort_order_sql";
+ $result = $db->sql_query_limit($sql, $topics_per_page, $start);
+
+ $topic_list = $topic_tracking_info = array();
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_list[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = "SELECT t.*$read_tracking_select
+ FROM " . TOPICS_TABLE . " t $read_tracking_join
+ WHERE " . $db->sql_in_set('t.topic_id', $topic_list, false, true);
+
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_rows[$row['topic_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ // If there is more than one page, but we have no topic list, then the start parameter is... erm... out of sync
+ if (!sizeof($topic_list) && $forum_topics && $start > 0)
+ {
+ redirect($url . "&amp;i=$id&amp;action=$action&amp;mode=$mode");
+ }
+
+ // Get topic tracking info
+ if (sizeof($topic_list))
+ {
+ if ($config['load_db_lastread'])
+ {
+ $topic_tracking_info = get_topic_tracking($forum_id, $topic_list, $topic_rows, array($forum_id => $forum_info['mark_time']), array());
+ }
+ else
+ {
+ $topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_list, array());
+ }
+ }
+
+ foreach ($topic_list as $topic_id)
+ {
+ $topic_title = '';
+
+ $row = &$topic_rows[$topic_id];
+
+ $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
+
+ if ($row['topic_status'] == ITEM_MOVED)
+ {
+ $unread_topic = false;
+ }
+ else
+ {
+ $unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
+ }
+
+ // Get folder img, topic status/type related information
+ $folder_img = $folder_alt = $topic_type = '';
+ topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type);
+
+ $topic_title = censor_text($row['topic_title']);
+
+ $topic_unapproved = (!$row['topic_approved'] && $auth->acl_get('m_approve', $row['forum_id'])) ? true : false;
+ $posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $row['forum_id'])) ? true : false;
+ $u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? $url . '&amp;i=queue&amp;mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . '&amp;t=' . $row['topic_id'] : '';
+
+ $topic_row = array(
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
+ 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
+ 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
+ 'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
+ 'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
+ 'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
+ 'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? $user->img('icon_topic_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '',
+
+ 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+
+ 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+
+ 'TOPIC_TYPE' => $topic_type,
+ 'TOPIC_TITLE' => $topic_title,
+ 'REPLIES' => ($auth->acl_get('m_approve', $row['forum_id'])) ? $row['topic_replies_real'] : $row['topic_replies'],
+ 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
+ 'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
+ 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
+ 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
+
+ 'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && empty($row['topic_moved_id']) && $auth->acl_get('m_report', $row['forum_id'])) ? true : false,
+ 'S_TOPIC_UNAPPROVED' => $topic_unapproved,
+ 'S_POSTS_UNAPPROVED' => $posts_unapproved,
+ 'S_UNREAD_TOPIC' => $unread_topic,
+ );
+
+ if ($row['topic_status'] == ITEM_MOVED)
+ {
+ $topic_row = array_merge($topic_row, array(
+ 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_moved_id']}"),
+ 'U_DELETE_TOPIC' => ($auth->acl_get('m_delete', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;f=$forum_id&amp;topic_id_list[]={$row['topic_id']}&amp;mode=forum_view&amp;action=delete_topic") : '',
+ 'S_MOVED_TOPIC' => true,
+ 'TOPIC_ID' => $row['topic_moved_id'],
+ ));
+ }
+ else
+ {
+ if ($action == 'merge_topic' || $action == 'merge_topics')
+ {
+ $u_select_topic = $url . "&amp;i=$id&amp;mode=forum_view&amp;action=$action&amp;to_topic_id=" . $row['topic_id'] . $selected_ids;
+ }
+ else
+ {
+ $u_select_topic = $url . "&amp;i=$id&amp;mode=topic_view&amp;action=merge&amp;to_topic_id=" . $row['topic_id'] . $selected_ids;
+ }
+ $topic_row = array_merge($topic_row, array(
+ 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;f=$forum_id&amp;t={$row['topic_id']}&amp;mode=topic_view"),
+
+ 'S_SELECT_TOPIC' => ($merge_select && !in_array($row['topic_id'], $source_topic_ids)) ? true : false,
+ 'U_SELECT_TOPIC' => $u_select_topic,
+ 'U_MCP_QUEUE' => $u_mcp_queue,
+ 'U_MCP_REPORT' => ($auth->acl_get('m_report', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=topic_view&amp;t=' . $row['topic_id'] . '&amp;action=reports') : '',
+ 'TOPIC_ID' => $row['topic_id'],
+ 'S_TOPIC_CHECKED' => ($topic_id_list && in_array($row['topic_id'], $topic_id_list)) ? true : false,
+ ));
+ }
+
+ $template->assign_block_vars('topicrow', $topic_row);
+ }
+ unset($topic_rows);
+}
+
+/**
+* Resync topics
+*/
+function mcp_resync_topics($topic_ids)
+{
+ global $auth, $db, $template, $phpEx, $user, $phpbb_root_path;
+
+ if (!sizeof($topic_ids))
+ {
+ trigger_error('NO_TOPIC_SELECTED');
+ }
+
+ if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))
+ {
+ return;
+ }
+
+ // Sync everything and perform extra checks separately
+ sync('topic_reported', 'topic_id', $topic_ids, false, true);
+ sync('topic_attachment', 'topic_id', $topic_ids, false, true);
+ sync('topic', 'topic_id', $topic_ids, true, false);
+
+ $sql = 'SELECT topic_id, forum_id, topic_title
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
+ $result = $db->sql_query($sql);
+
+ // Log this action
+ while ($row = $db->sql_fetchrow($result))
+ {
+ add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_TOPIC_RESYNC', $row['topic_title']);
+ }
+ $db->sql_freeresult($result);
+
+ $msg = (sizeof($topic_ids) == 1) ? $user->lang['TOPIC_RESYNC_SUCCESS'] : $user->lang['TOPICS_RESYNC_SUCCESS'];
+
+ $redirect = request_var('redirect', $user->data['session_page']);
+
+ meta_refresh(3, $redirect);
+ trigger_error($msg . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
+
+ return;
+}
+
+/**
+* Merge selected topics into selected topic
+*/
+function merge_topics($forum_id, $topic_ids, $to_topic_id)
+{
+ global $db, $template, $user, $phpEx, $phpbb_root_path, $auth;
+
+ if (!sizeof($topic_ids))
+ {
+ $template->assign_var('MESSAGE', $user->lang['NO_TOPIC_SELECTED']);
+ return;
+ }
+ if (!$to_topic_id)
+ {
+ $template->assign_var('MESSAGE', $user->lang['NO_FINAL_TOPIC_SELECTED']);
+ return;
+ }
+
+ $topic_data = get_topic_data(array($to_topic_id), 'm_merge');
+
+ if (!sizeof($topic_data))
+ {
+ $template->assign_var('MESSAGE', $user->lang['NO_FINAL_TOPIC_SELECTED']);
+ return;
+ }
+
+ $topic_data = $topic_data[$to_topic_id];
+
+ $post_id_list = request_var('post_id_list', array(0));
+ $start = request_var('start', 0);
+
+ if (!sizeof($post_id_list) && sizeof($topic_ids))
+ {
+ $sql = 'SELECT post_id
+ FROM ' . POSTS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
+ $result = $db->sql_query($sql);
+
+ $post_id_list = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_id_list[] = $row['post_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (!sizeof($post_id_list))
+ {
+ $template->assign_var('MESSAGE', $user->lang['NO_POST_SELECTED']);
+ return;
+ }
+
+ if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_merge')))
+ {
+ return;
+ }
+
+ $redirect = request_var('redirect', build_url(array('quickmod')));
+
+ $s_hidden_fields = build_hidden_fields(array(
+ 'i' => 'main',
+ 'f' => $forum_id,
+ 'post_id_list' => $post_id_list,
+ 'to_topic_id' => $to_topic_id,
+ 'mode' => 'forum_view',
+ 'action' => 'merge_topics',
+ 'start' => $start,
+ 'redirect' => $redirect,
+ 'topic_id_list' => $topic_ids)
+ );
+ $success_msg = $return_link = '';
+
+ if (confirm_box(true))
+ {
+ $to_forum_id = $topic_data['forum_id'];
+
+ move_posts($post_id_list, $to_topic_id);
+ add_log('mod', $to_forum_id, $to_topic_id, 'LOG_MERGE', $topic_data['topic_title']);
+
+ // Message and return links
+ $success_msg = 'POSTS_MERGED_SUCCESS';
+
+ // If the topic no longer exist, we will update the topic watch table.
+ // To not let it error out on users watching both topics, we just return on an error...
+ $db->sql_return_on_error(true);
+ $db->sql_query('UPDATE ' . TOPICS_WATCH_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
+ $db->sql_return_on_error(false);
+
+ $db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
+
+ // Link to the new topic
+ $return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
+ }
+ else
+ {
+ confirm_box(false, 'MERGE_TOPICS', $s_hidden_fields);
+ }
+
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
+
+ if (!$success_msg)
+ {
+ return;
+ }
+ else
+ {
+ meta_refresh(3, append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$to_forum_id&amp;t=$to_topic_id"));
+ trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php
new file mode 100644
index 0000000000..50e14b9336
--- /dev/null
+++ b/phpBB/includes/mcp/mcp_front.php
@@ -0,0 +1,380 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* MCP Front Panel
+*/
+function mcp_front_view($id, $mode, $action)
+{
+ global $phpEx, $phpbb_root_path, $config;
+ global $template, $db, $user, $auth, $module;
+
+ // Latest 5 unapproved
+ if ($module->loaded('queue'))
+ {
+ $forum_list = array_values(array_intersect(get_forum_list('f_read'), get_forum_list('m_approve')));
+ $post_list = array();
+ $forum_names = array();
+
+ $forum_id = request_var('f', 0);
+
+ $template->assign_var('S_SHOW_UNAPPROVED', (!empty($forum_list)) ? true : false);
+
+ if (!empty($forum_list))
+ {
+ $sql = 'SELECT COUNT(post_id) AS total
+ FROM ' . POSTS_TABLE . '
+ WHERE forum_id IN (0, ' . implode(', ', $forum_list) . ')
+ AND post_approved = 0';
+ $result = $db->sql_query($sql);
+ $total = (int) $db->sql_fetchfield('total');
+ $db->sql_freeresult($result);
+
+ if ($total)
+ {
+ $global_id = $forum_list[0];
+
+ $sql = 'SELECT forum_id, forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_list);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_names[$row['forum_id']] = $row['forum_name'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT post_id
+ FROM ' . POSTS_TABLE . '
+ WHERE forum_id IN (0, ' . implode(', ', $forum_list) . ')
+ AND post_approved = 0
+ ORDER BY post_time DESC';
+ $result = $db->sql_query_limit($sql, 5);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_list[] = $row['post_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (empty($post_list))
+ {
+ $total = 0;
+ }
+ }
+
+ if ($total)
+ {
+ $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.username, u.username_clean, u.user_colour, t.topic_id, t.topic_title, t.topic_first_post_id, p.forum_id
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u
+ WHERE ' . $db->sql_in_set('p.post_id', $post_list) . '
+ AND t.topic_id = p.topic_id
+ AND p.poster_id = u.user_id
+ ORDER BY p.post_time DESC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $global_topic = ($row['forum_id']) ? false : true;
+ if ($global_topic)
+ {
+ $row['forum_id'] = $global_id;
+ }
+
+ $template->assign_block_vars('unapproved', array(
+ 'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $row['forum_id'] . '&amp;p=' . $row['post_id']),
+ 'U_MCP_FORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=forum_view&amp;f=' . $row['forum_id']) : '',
+ 'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=topic_view&amp;f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']),
+ 'U_FORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '',
+ 'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']),
+
+ 'AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour']),
+ 'AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour']),
+ 'AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour']),
+ 'U_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour']),
+
+ 'FORUM_NAME' => (!$global_topic) ? $forum_names[$row['forum_id']] : $user->lang['GLOBAL_ANNOUNCEMENT'],
+ 'POST_ID' => $row['post_id'],
+ 'TOPIC_TITLE' => $row['topic_title'],
+ 'SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'],
+ 'POST_TIME' => $user->format_date($row['post_time']))
+ );
+ }
+ $db->sql_freeresult($result);
+ }
+
+ $s_hidden_fields = build_hidden_fields(array(
+ 'redirect' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main' . (($forum_id) ? '&amp;f=' . $forum_id : ''))
+ ));
+
+ $template->assign_vars(array(
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields,
+ 'S_MCP_QUEUE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue"),
+ ));
+
+ if ($total == 0)
+ {
+ $template->assign_vars(array(
+ 'L_UNAPPROVED_TOTAL' => $user->lang['UNAPPROVED_POSTS_ZERO_TOTAL'],
+ 'S_HAS_UNAPPROVED_POSTS' => false)
+ );
+ }
+ else
+ {
+ $template->assign_vars(array(
+ 'L_UNAPPROVED_TOTAL' => ($total == 1) ? $user->lang['UNAPPROVED_POST_TOTAL'] : sprintf($user->lang['UNAPPROVED_POSTS_TOTAL'], $total),
+ 'S_HAS_UNAPPROVED_POSTS' => true)
+ );
+ }
+ }
+ }
+
+ // Latest 5 reported
+ if ($module->loaded('reports'))
+ {
+ $forum_list = array_values(array_intersect(get_forum_list('f_read'), get_forum_list('m_report')));
+
+ $template->assign_var('S_SHOW_REPORTS', (!empty($forum_list)) ? true : false);
+
+ if (!empty($forum_list))
+ {
+ $sql = 'SELECT COUNT(r.report_id) AS total
+ FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p
+ WHERE r.post_id = p.post_id
+ AND r.pm_id = 0
+ AND r.report_closed = 0
+ AND p.forum_id IN (0, ' . implode(', ', $forum_list) . ')';
+ $result = $db->sql_query($sql);
+ $total = (int) $db->sql_fetchfield('total');
+ $db->sql_freeresult($result);
+
+ if ($total)
+ {
+ $global_id = $forum_list[0];
+
+ $sql = $db->sql_build_query('SELECT', array(
+ 'SELECT' => 'r.report_time, p.post_id, p.post_subject, p.post_time, u.username, u.username_clean, u.user_colour, u.user_id, u2.username as author_name, u2.username_clean as author_name_clean, u2.user_colour as author_colour, u2.user_id as author_id, t.topic_id, t.topic_title, f.forum_id, f.forum_name',
+
+ 'FROM' => array(
+ REPORTS_TABLE => 'r',
+ REPORTS_REASONS_TABLE => 'rr',
+ TOPICS_TABLE => 't',
+ USERS_TABLE => array('u', 'u2'),
+ POSTS_TABLE => 'p'
+ ),
+
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(FORUMS_TABLE => 'f'),
+ 'ON' => 'f.forum_id = p.forum_id'
+ )
+ ),
+
+ 'WHERE' => 'r.post_id = p.post_id
+ AND r.pm_id = 0
+ AND r.report_closed = 0
+ AND r.reason_id = rr.reason_id
+ AND p.topic_id = t.topic_id
+ AND r.user_id = u.user_id
+ AND p.poster_id = u2.user_id
+ AND p.forum_id IN (0, ' . implode(', ', $forum_list) . ')',
+
+ 'ORDER_BY' => 'p.post_time DESC'
+ ));
+ $result = $db->sql_query_limit($sql, 5);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $global_topic = ($row['forum_id']) ? false : true;
+ if ($global_topic)
+ {
+ $row['forum_id'] = $global_id;
+ }
+
+ $template->assign_block_vars('report', array(
+ 'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . '&amp;p=' . $row['post_id'] . "&amp;i=reports&amp;mode=report_details"),
+ 'U_MCP_FORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . "&amp;i=$id&amp;mode=forum_view") : '',
+ 'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id'] . "&amp;i=$id&amp;mode=topic_view"),
+ 'U_FORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '',
+ 'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']),
+
+ 'REPORTER_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
+ 'REPORTER' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
+ 'REPORTER_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
+ 'U_REPORTER' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
+
+ 'AUTHOR_FULL' => get_username_string('full', $row['author_id'], $row['author_name'], $row['author_colour']),
+ 'AUTHOR' => get_username_string('username', $row['author_id'], $row['author_name'], $row['author_colour']),
+ 'AUTHOR_COLOUR' => get_username_string('colour', $row['author_id'], $row['author_name'], $row['author_colour']),
+ 'U_AUTHOR' => get_username_string('profile', $row['author_id'], $row['author_name'], $row['author_colour']),
+
+ 'FORUM_NAME' => (!$global_topic) ? $row['forum_name'] : $user->lang['GLOBAL_ANNOUNCEMENT'],
+ 'TOPIC_TITLE' => $row['topic_title'],
+ 'SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'],
+ 'REPORT_TIME' => $user->format_date($row['report_time']),
+ 'POST_TIME' => $user->format_date($row['post_time']),
+ ));
+ }
+ }
+
+ if ($total == 0)
+ {
+ $template->assign_vars(array(
+ 'L_REPORTS_TOTAL' => $user->lang['REPORTS_ZERO_TOTAL'],
+ 'S_HAS_REPORTS' => false)
+ );
+ }
+ else
+ {
+ $template->assign_vars(array(
+ 'L_REPORTS_TOTAL' => ($total == 1) ? $user->lang['REPORT_TOTAL'] : sprintf($user->lang['REPORTS_TOTAL'], $total),
+ 'S_HAS_REPORTS' => true)
+ );
+ }
+ }
+ }
+
+ // Latest 5 reported PMs
+ if ($module->loaded('pm_reports') && $auth->acl_getf_global('m_report'))
+ {
+ $template->assign_var('S_SHOW_PM_REPORTS', true);
+ $user->add_lang(array('ucp'));
+
+ $sql = 'SELECT COUNT(r.report_id) AS total
+ FROM ' . REPORTS_TABLE . ' r, ' . PRIVMSGS_TABLE . ' p
+ WHERE r.post_id = 0
+ AND r.pm_id = p.msg_id
+ AND r.report_closed = 0';
+ $result = $db->sql_query($sql);
+ $total = (int) $db->sql_fetchfield('total');
+ $db->sql_freeresult($result);
+
+ if ($total)
+ {
+ include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
+
+ $sql = $db->sql_build_query('SELECT', array(
+ 'SELECT' => 'r.report_id, r.report_time, p.msg_id, p.message_subject, p.message_time, p.to_address, p.bcc_address, u.username, u.username_clean, u.user_colour, u.user_id, u2.username as author_name, u2.username_clean as author_name_clean, u2.user_colour as author_colour, u2.user_id as author_id',
+
+ 'FROM' => array(
+ REPORTS_TABLE => 'r',
+ REPORTS_REASONS_TABLE => 'rr',
+ USERS_TABLE => array('u', 'u2'),
+ PRIVMSGS_TABLE => 'p'
+ ),
+
+ 'WHERE' => 'r.pm_id = p.msg_id
+ AND r.post_id = 0
+ AND r.report_closed = 0
+ AND r.reason_id = rr.reason_id
+ AND r.user_id = u.user_id
+ AND p.author_id = u2.user_id',
+
+ 'ORDER_BY' => 'p.message_time DESC'
+ ));
+ $result = $db->sql_query_limit($sql, 5);
+
+ $pm_by_id = $pm_list = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $pm_by_id[(int) $row['msg_id']] = $row;
+ $pm_list[] = (int) $row['msg_id'];
+ }
+
+ $address_list = get_recipient_strings($pm_by_id);
+
+ foreach ($pm_list as $message_id)
+ {
+ $row = $pm_by_id[$message_id];
+
+ $template->assign_block_vars('pm_report', array(
+ 'U_PM_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'r=' . $row['report_id'] . "&amp;i=pm_reports&amp;mode=pm_report_details"),
+
+ 'REPORTER_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
+ 'REPORTER' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
+ 'REPORTER_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
+ 'U_REPORTER' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
+
+ 'PM_AUTHOR_FULL' => get_username_string('full', $row['author_id'], $row['author_name'], $row['author_colour']),
+ 'PM_AUTHOR' => get_username_string('username', $row['author_id'], $row['author_name'], $row['author_colour']),
+ 'PM_AUTHOR_COLOUR' => get_username_string('colour', $row['author_id'], $row['author_name'], $row['author_colour']),
+ 'U_PM_AUTHOR' => get_username_string('profile', $row['author_id'], $row['author_name'], $row['author_colour']),
+
+ 'PM_SUBJECT' => $row['message_subject'],
+ 'REPORT_TIME' => $user->format_date($row['report_time']),
+ 'PM_TIME' => $user->format_date($row['message_time']),
+ 'RECIPIENTS' => implode(', ', $address_list[$row['msg_id']]),
+ ));
+ }
+ }
+
+ if ($total == 0)
+ {
+ $template->assign_vars(array(
+ 'L_PM_REPORTS_TOTAL' => $user->lang['PM_REPORTS_ZERO_TOTAL'],
+ 'S_HAS_PM_REPORTS' => false)
+ );
+ }
+ else
+ {
+ $template->assign_vars(array(
+ 'L_PM_REPORTS_TOTAL' => ($total == 1) ? $user->lang['PM_REPORT_TOTAL'] : sprintf($user->lang['PM_REPORTS_TOTAL'], $total),
+ 'S_HAS_PM_REPORTS' => true)
+ );
+ }
+ }
+
+ // Latest 5 logs
+ if ($module->loaded('logs'))
+ {
+ $forum_list = array_values(array_intersect(get_forum_list('f_read'), get_forum_list('m_')));
+
+ if (!empty($forum_list))
+ {
+ // Add forum_id 0 for global announcements
+ $forum_list[] = 0;
+
+ $log_count = 0;
+ $log = array();
+ view_log('mod', $log, $log_count, 5, 0, $forum_list);
+
+ foreach ($log as $row)
+ {
+ $template->assign_block_vars('log', array(
+ 'USERNAME' => $row['username_full'],
+ 'IP' => $row['ip'],
+ 'TIME' => $user->format_date($row['time']),
+ 'ACTION' => $row['action'],
+ 'U_VIEW_TOPIC' => (!empty($row['viewtopic'])) ? $row['viewtopic'] : '',
+ 'U_VIEWLOGS' => (!empty($row['viewlogs'])) ? $row['viewlogs'] : '')
+ );
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_SHOW_LOGS' => (!empty($forum_list)) ? true : false,
+ 'S_HAS_LOGS' => (!empty($log)) ? true : false)
+ );
+ }
+
+ $template->assign_var('S_MCP_ACTION', append_sid("{$phpbb_root_path}mcp.$phpEx"));
+ make_jumpbox(append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=forum_view'), 0, false, 'm_', true);
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php
new file mode 100644
index 0000000000..429e19b668
--- /dev/null
+++ b/phpBB/includes/mcp/mcp_logs.php
@@ -0,0 +1,218 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* mcp_logs
+* Handling warning the users
+* @package mcp
+*/
+class mcp_logs
+{
+ var $u_action;
+ var $p_master;
+
+ function mcp_logs(&$p_master)
+ {
+ $this->p_master = &$p_master;
+ }
+
+ function main($id, $mode)
+ {
+ global $auth, $db, $user, $template;
+ global $config, $phpbb_root_path, $phpEx;
+
+ $user->add_lang('acp/common');
+
+ $action = request_var('action', array('' => ''));
+
+ if (is_array($action))
+ {
+ list($action, ) = each($action);
+ }
+ else
+ {
+ $action = request_var('action', '');
+ }
+
+ // Set up general vars
+ $start = request_var('start', 0);
+ $deletemark = ($action == 'del_marked') ? true : false;
+ $deleteall = ($action == 'del_all') ? true : false;
+ $marked = request_var('mark', array(0));
+
+ // Sort keys
+ $sort_days = request_var('st', 0);
+ $sort_key = request_var('sk', 't');
+ $sort_dir = request_var('sd', 'd');
+
+ $this->tpl_name = 'mcp_logs';
+ $this->page_title = 'MCP_LOGS';
+
+ $forum_list = array_values(array_intersect(get_forum_list('f_read'), get_forum_list('m_')));
+ $forum_list[] = 0;
+
+ $forum_id = $topic_id = 0;
+
+ switch ($mode)
+ {
+ case 'front':
+ break;
+
+ case 'forum_logs':
+ $forum_id = request_var('f', 0);
+
+ if (!in_array($forum_id, $forum_list))
+ {
+ trigger_error('NOT_AUTHORISED');
+ }
+
+ $forum_list = array($forum_id);
+ break;
+
+ case 'topic_logs':
+ $topic_id = request_var('t', 0);
+
+ $sql = 'SELECT forum_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_id = ' . $topic_id;
+ $result = $db->sql_query($sql);
+ $forum_id = (int) $db->sql_fetchfield('forum_id');
+ $db->sql_freeresult($result);
+
+ if (!in_array($forum_id, $forum_list))
+ {
+ trigger_error('NOT_AUTHORISED');
+ }
+
+ $forum_list = array($forum_id);
+ break;
+ }
+
+ // Delete entries if requested and able
+ if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
+ {
+ if (confirm_box(true))
+ {
+ if ($deletemark && sizeof($marked))
+ {
+ $sql = 'DELETE FROM ' . LOG_TABLE . '
+ WHERE log_type = ' . LOG_MOD . '
+ AND ' . $db->sql_in_set('forum_id', $forum_list) . '
+ AND ' . $db->sql_in_set('log_id', $marked);
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_CLEAR_MOD');
+ }
+ else if ($deleteall)
+ {
+ $sql = 'DELETE FROM ' . LOG_TABLE . '
+ WHERE log_type = ' . LOG_MOD . '
+ AND ' . $db->sql_in_set('forum_id', $forum_list);
+
+ if ($mode == 'topic_logs')
+ {
+ $sql .= ' AND topic_id = ' . $topic_id;
+ }
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_CLEAR_MOD');
+ }
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'f' => $forum_id,
+ 't' => $topic_id,
+ 'start' => $start,
+ 'delmarked' => $deletemark,
+ 'delall' => $deleteall,
+ 'mark' => $marked,
+ 'st' => $sort_days,
+ 'sk' => $sort_key,
+ 'sd' => $sort_dir,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => request_var('action', array('' => ''))))
+ );
+ }
+ }
+
+ // Sorting
+ $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_text = array('u' => $user->lang['SORT_USERNAME'], 't' => $user->lang['SORT_DATE'], 'i' => $user->lang['SORT_IP'], 'o' => $user->lang['SORT_ACTION']);
+ $sort_by_sql = array('u' => 'u.username_clean', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation');
+
+ $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
+ gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
+
+ // Define where and sort sql for use in displaying logs
+ $sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0;
+ $sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
+
+ $keywords = utf8_normalize_nfc(request_var('keywords', '', true));
+ $keywords_param = !empty($keywords) ? '&amp;keywords=' . urlencode(htmlspecialchars_decode($keywords)) : '';
+
+ // Grab log data
+ $log_data = array();
+ $log_count = 0;
+ view_log('mod', $log_data, $log_count, $config['topics_per_page'], $start, $forum_list, $topic_id, 0, $sql_where, $sql_sort, $keywords);
+
+ $template->assign_vars(array(
+ 'PAGE_NUMBER' => on_page($log_count, $config['topics_per_page'], $start),
+ 'TOTAL' => ($log_count == 1) ? $user->lang['TOTAL_LOG'] : sprintf($user->lang['TOTAL_LOGS'], $log_count),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param$keywords_param", $log_count, $config['topics_per_page'], $start, true),
+
+ 'L_TITLE' => $user->lang['MCP_LOGS'],
+
+ 'U_POST_ACTION' => $this->u_action,
+ 'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,
+ 'S_SELECT_SORT_DIR' => $s_sort_dir,
+ 'S_SELECT_SORT_KEY' => $s_sort_key,
+ 'S_SELECT_SORT_DAYS' => $s_limit_days,
+ 'S_LOGS' => ($log_count > 0),
+ 'S_KEYWORDS' => $keywords,
+ )
+ );
+
+ foreach ($log_data as $row)
+ {
+ $data = array();
+
+ $checks = array('viewtopic', 'viewforum');
+ foreach ($checks as $check)
+ {
+ if (isset($row[$check]) && $row[$check])
+ {
+ $data[] = '<a href="' . $row[$check] . '">' . $user->lang['LOGVIEW_' . strtoupper($check)] . '</a>';
+ }
+ }
+
+ $template->assign_block_vars('log', array(
+ 'USERNAME' => $row['username_full'],
+ 'IP' => $row['ip'],
+ 'DATE' => $user->format_date($row['time']),
+ 'ACTION' => $row['action'],
+ 'DATA' => (sizeof($data)) ? implode(' | ', $data) : '',
+ 'ID' => $row['id'],
+ )
+ );
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
new file mode 100644
index 0000000000..50b05e989f
--- /dev/null
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -0,0 +1,1282 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* mcp_main
+* Handling mcp actions
+* @package mcp
+*/
+class mcp_main
+{
+ var $p_master;
+ var $u_action;
+
+ function mcp_main(&$p_master)
+ {
+ $this->p_master = &$p_master;
+ }
+
+ function main($id, $mode)
+ {
+ global $auth, $db, $user, $template, $action;
+ global $config, $phpbb_root_path, $phpEx;
+
+ $quickmod = ($mode == 'quickmod') ? true : false;
+
+ switch ($action)
+ {
+ case 'lock':
+ case 'unlock':
+ $topic_ids = (!$quickmod) ? request_var('topic_id_list', array(0)) : array(request_var('t', 0));
+
+ if (!sizeof($topic_ids))
+ {
+ trigger_error('NO_TOPIC_SELECTED');
+ }
+
+ lock_unlock($action, $topic_ids);
+ break;
+
+ case 'lock_post':
+ case 'unlock_post':
+
+ $post_ids = (!$quickmod) ? request_var('post_id_list', array(0)) : array(request_var('p', 0));
+
+ if (!sizeof($post_ids))
+ {
+ trigger_error('NO_POST_SELECTED');
+ }
+
+ lock_unlock($action, $post_ids);
+ break;
+
+ case 'make_announce':
+ case 'make_sticky':
+ case 'make_global':
+ case 'make_normal':
+
+ $topic_ids = (!$quickmod) ? request_var('topic_id_list', array(0)) : array(request_var('t', 0));
+
+ if (!sizeof($topic_ids))
+ {
+ trigger_error('NO_TOPIC_SELECTED');
+ }
+
+ change_topic_type($action, $topic_ids);
+ break;
+
+ case 'move':
+ $user->add_lang('viewtopic');
+
+ $topic_ids = (!$quickmod) ? request_var('topic_id_list', array(0)) : array(request_var('t', 0));
+
+ if (!sizeof($topic_ids))
+ {
+ trigger_error('NO_TOPIC_SELECTED');
+ }
+
+ mcp_move_topic($topic_ids);
+ break;
+
+ case 'fork':
+ $user->add_lang('viewtopic');
+
+ $topic_ids = (!$quickmod) ? request_var('topic_id_list', array(0)) : array(request_var('t', 0));
+
+ if (!sizeof($topic_ids))
+ {
+ trigger_error('NO_TOPIC_SELECTED');
+ }
+
+ mcp_fork_topic($topic_ids);
+ break;
+
+ case 'delete_topic':
+ $user->add_lang('viewtopic');
+
+ $topic_ids = (!$quickmod) ? request_var('topic_id_list', array(0)) : array(request_var('t', 0));
+
+ if (!sizeof($topic_ids))
+ {
+ trigger_error('NO_TOPIC_SELECTED');
+ }
+
+ mcp_delete_topic($topic_ids);
+ break;
+
+ case 'delete_post':
+ $user->add_lang('posting');
+
+ $post_ids = (!$quickmod) ? request_var('post_id_list', array(0)) : array(request_var('p', 0));
+
+ if (!sizeof($post_ids))
+ {
+ trigger_error('NO_POST_SELECTED');
+ }
+
+ mcp_delete_post($post_ids);
+ break;
+ }
+
+ switch ($mode)
+ {
+ case 'front':
+ include($phpbb_root_path . 'includes/mcp/mcp_front.' . $phpEx);
+
+ $user->add_lang('acp/common');
+
+ mcp_front_view($id, $mode, $action);
+
+ $this->tpl_name = 'mcp_front';
+ $this->page_title = 'MCP_MAIN';
+ break;
+
+ case 'forum_view':
+ include($phpbb_root_path . 'includes/mcp/mcp_forum.' . $phpEx);
+
+ $user->add_lang('viewforum');
+
+ $forum_id = request_var('f', 0);
+
+ $forum_info = get_forum_data($forum_id, 'm_', true);
+
+ if (!sizeof($forum_info))
+ {
+ $this->main('main', 'front');
+ return;
+ }
+
+ $forum_info = $forum_info[$forum_id];
+
+ mcp_forum_view($id, $mode, $action, $forum_info);
+
+ $this->tpl_name = 'mcp_forum';
+ $this->page_title = 'MCP_MAIN_FORUM_VIEW';
+ break;
+
+ case 'topic_view':
+ include($phpbb_root_path . 'includes/mcp/mcp_topic.' . $phpEx);
+
+ mcp_topic_view($id, $mode, $action);
+
+ $this->tpl_name = 'mcp_topic';
+ $this->page_title = 'MCP_MAIN_TOPIC_VIEW';
+ break;
+
+ case 'post_details':
+ include($phpbb_root_path . 'includes/mcp/mcp_post.' . $phpEx);
+
+ mcp_post_details($id, $mode, $action);
+
+ $this->tpl_name = ($action == 'whois') ? 'mcp_whois' : 'mcp_post';
+ $this->page_title = 'MCP_MAIN_POST_DETAILS';
+ break;
+
+ default:
+ trigger_error('NO_MODE', E_USER_ERROR);
+ break;
+ }
+ }
+}
+
+/**
+* Lock/Unlock Topic/Post
+*/
+function lock_unlock($action, $ids)
+{
+ global $auth, $user, $db, $phpEx, $phpbb_root_path;
+
+ if ($action == 'lock' || $action == 'unlock')
+ {
+ $table = TOPICS_TABLE;
+ $sql_id = 'topic_id';
+ $set_id = 'topic_status';
+ $l_prefix = 'TOPIC';
+ }
+ else
+ {
+ $table = POSTS_TABLE;
+ $sql_id = 'post_id';
+ $set_id = 'post_edit_locked';
+ $l_prefix = 'POST';
+ }
+
+ $orig_ids = $ids;
+
+ if (!check_ids($ids, $table, $sql_id, array('m_lock')))
+ {
+ // Make sure that for f_user_lock only the lock action is triggered.
+ if ($action != 'lock')
+ {
+ return;
+ }
+
+ $ids = $orig_ids;
+
+ if (!check_ids($ids, $table, $sql_id, array('f_user_lock')))
+ {
+ return;
+ }
+ }
+ unset($orig_ids);
+
+ $redirect = request_var('redirect', build_url(array('action', 'quickmod')));
+
+ $s_hidden_fields = build_hidden_fields(array(
+ $sql_id . '_list' => $ids,
+ 'action' => $action,
+ 'redirect' => $redirect)
+ );
+ $success_msg = '';
+
+ if (confirm_box(true))
+ {
+ $sql = "UPDATE $table
+ SET $set_id = " . (($action == 'lock' || $action == 'lock_post') ? ITEM_LOCKED : ITEM_UNLOCKED) . '
+ WHERE ' . $db->sql_in_set($sql_id, $ids);
+ $db->sql_query($sql);
+
+ $data = ($action == 'lock' || $action == 'unlock') ? get_topic_data($ids) : get_post_data($ids);
+
+ foreach ($data as $id => $row)
+ {
+ add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_' . strtoupper($action), $row['topic_title']);
+ }
+
+ $success_msg = $l_prefix . ((sizeof($ids) == 1) ? '' : 'S') . '_' . (($action == 'lock' || $action == 'lock_post') ? 'LOCKED' : 'UNLOCKED') . '_SUCCESS';
+ }
+ else
+ {
+ confirm_box(false, strtoupper($action) . '_' . $l_prefix . ((sizeof($ids) == 1) ? '' : 'S'), $s_hidden_fields);
+ }
+
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
+
+ if (!$success_msg)
+ {
+ redirect($redirect);
+ }
+ else
+ {
+ meta_refresh(2, $redirect);
+ trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
+ }
+}
+
+/**
+* Change Topic Type
+*/
+function change_topic_type($action, $topic_ids)
+{
+ global $auth, $user, $db, $phpEx, $phpbb_root_path;
+
+ // For changing topic types, we only allow operations in one forum.
+ $forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('f_announce', 'f_sticky', 'm_'), true);
+
+ if ($forum_id === false)
+ {
+ return;
+ }
+
+ switch ($action)
+ {
+ case 'make_announce':
+ $new_topic_type = POST_ANNOUNCE;
+ $check_acl = 'f_announce';
+ $l_new_type = (sizeof($topic_ids) == 1) ? 'MCP_MAKE_ANNOUNCEMENT' : 'MCP_MAKE_ANNOUNCEMENTS';
+ break;
+
+ case 'make_global':
+ $new_topic_type = POST_GLOBAL;
+ $check_acl = 'f_announce';
+ $l_new_type = (sizeof($topic_ids) == 1) ? 'MCP_MAKE_GLOBAL' : 'MCP_MAKE_GLOBALS';
+ break;
+
+ case 'make_sticky':
+ $new_topic_type = POST_STICKY;
+ $check_acl = 'f_sticky';
+ $l_new_type = (sizeof($topic_ids) == 1) ? 'MCP_MAKE_STICKY' : 'MCP_MAKE_STICKIES';
+ break;
+
+ default:
+ $new_topic_type = POST_NORMAL;
+ $check_acl = '';
+ $l_new_type = (sizeof($topic_ids) == 1) ? 'MCP_MAKE_NORMAL' : 'MCP_MAKE_NORMALS';
+ break;
+ }
+
+ $redirect = request_var('redirect', build_url(array('action', 'quickmod')));
+
+ $s_hidden_fields = array(
+ 'topic_id_list' => $topic_ids,
+ 'f' => $forum_id,
+ 'action' => $action,
+ 'redirect' => $redirect,
+ );
+ $success_msg = '';
+
+ if (confirm_box(true))
+ {
+ if ($new_topic_type != POST_GLOBAL)
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . "
+ SET topic_type = $new_topic_type
+ WHERE " . $db->sql_in_set('topic_id', $topic_ids) . '
+ AND forum_id <> 0';
+ $db->sql_query($sql);
+
+ // Reset forum id if a global topic is within the array
+ $to_forum_id = request_var('to_forum_id', 0);
+
+ if ($to_forum_id)
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . "
+ SET topic_type = $new_topic_type, forum_id = $to_forum_id
+ WHERE " . $db->sql_in_set('topic_id', $topic_ids) . '
+ AND forum_id = 0';
+ $db->sql_query($sql);
+
+ // Update forum_ids for all posts
+ $sql = 'UPDATE ' . POSTS_TABLE . "
+ SET forum_id = $to_forum_id
+ WHERE " . $db->sql_in_set('topic_id', $topic_ids) . '
+ AND forum_id = 0';
+ $db->sql_query($sql);
+
+ // Do a little forum sync stuff
+ $sql = 'SELECT SUM(t.topic_replies + t.topic_approved) as topic_posts, COUNT(t.topic_approved) as topics_authed
+ FROM ' . TOPICS_TABLE . ' t
+ WHERE ' . $db->sql_in_set('t.topic_id', $topic_ids);
+ $result = $db->sql_query($sql);
+ $row_data = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $sync_sql = array();
+
+ if ($row_data['topic_posts'])
+ {
+ $sync_sql[$to_forum_id][] = 'forum_posts = forum_posts + ' . (int) $row_data['topic_posts'];
+ }
+
+ if ($row_data['topics_authed'])
+ {
+ $sync_sql[$to_forum_id][] = 'forum_topics = forum_topics + ' . (int) $row_data['topics_authed'];
+ }
+
+ $sync_sql[$to_forum_id][] = 'forum_topics_real = forum_topics_real + ' . (int) sizeof($topic_ids);
+
+ foreach ($sync_sql as $forum_id_key => $array)
+ {
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET ' . implode(', ', $array) . '
+ WHERE forum_id = ' . $forum_id_key;
+ $db->sql_query($sql);
+ }
+
+ sync('forum', 'forum_id', $to_forum_id);
+ }
+ }
+ else
+ {
+ // Get away with those topics already being a global announcement by re-calculating $topic_ids
+ $sql = 'SELECT topic_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids) . '
+ AND forum_id <> 0';
+ $result = $db->sql_query($sql);
+
+ $topic_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_ids[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($topic_ids))
+ {
+ // Delete topic shadows for global announcements
+ $sql = 'DELETE FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_moved_id', $topic_ids);
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . TOPICS_TABLE . "
+ SET topic_type = $new_topic_type, forum_id = 0
+ WHERE " . $db->sql_in_set('topic_id', $topic_ids);
+ $db->sql_query($sql);
+
+ // Update forum_ids for all posts
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET forum_id = 0
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
+ $db->sql_query($sql);
+
+ // Do a little forum sync stuff
+ $sql = 'SELECT SUM(t.topic_replies + t.topic_approved) as topic_posts, COUNT(t.topic_approved) as topics_authed
+ FROM ' . TOPICS_TABLE . ' t
+ WHERE ' . $db->sql_in_set('t.topic_id', $topic_ids);
+ $result = $db->sql_query($sql);
+ $row_data = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $sync_sql = array();
+
+ if ($row_data['topic_posts'])
+ {
+ $sync_sql[$forum_id][] = 'forum_posts = forum_posts - ' . (int) $row_data['topic_posts'];
+ }
+
+ if ($row_data['topics_authed'])
+ {
+ $sync_sql[$forum_id][] = 'forum_topics = forum_topics - ' . (int) $row_data['topics_authed'];
+ }
+
+ $sync_sql[$forum_id][] = 'forum_topics_real = forum_topics_real - ' . (int) sizeof($topic_ids);
+
+ foreach ($sync_sql as $forum_id_key => $array)
+ {
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET ' . implode(', ', $array) . '
+ WHERE forum_id = ' . $forum_id_key;
+ $db->sql_query($sql);
+ }
+
+ sync('forum', 'forum_id', $forum_id);
+ }
+ }
+
+ $success_msg = (sizeof($topic_ids) == 1) ? 'TOPIC_TYPE_CHANGED' : 'TOPICS_TYPE_CHANGED';
+
+ if (sizeof($topic_ids))
+ {
+ $data = get_topic_data($topic_ids);
+
+ foreach ($data as $topic_id => $row)
+ {
+ add_log('mod', $forum_id, $topic_id, 'LOG_TOPIC_TYPE_CHANGED', $row['topic_title']);
+ }
+ }
+ }
+ else
+ {
+ // Global topic involved?
+ $global_involved = false;
+
+ if ($new_topic_type != POST_GLOBAL)
+ {
+ $sql = 'SELECT forum_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids) . '
+ AND forum_id = 0';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ $global_involved = true;
+ }
+ }
+
+ if ($global_involved)
+ {
+ global $template;
+
+ $template->assign_vars(array(
+ 'S_FORUM_SELECT' => make_forum_select(request_var('f', $forum_id), false, false, true, true),
+ 'S_CAN_LEAVE_SHADOW' => false,
+ 'ADDITIONAL_MSG' => (sizeof($topic_ids) == 1) ? $user->lang['SELECT_FORUM_GLOBAL_ANNOUNCEMENT'] : $user->lang['SELECT_FORUM_GLOBAL_ANNOUNCEMENTS'])
+ );
+
+ confirm_box(false, $l_new_type, build_hidden_fields($s_hidden_fields), 'mcp_move.html');
+ }
+ else
+ {
+ confirm_box(false, $l_new_type, build_hidden_fields($s_hidden_fields));
+ }
+ }
+
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
+
+ if (!$success_msg)
+ {
+ redirect($redirect);
+ }
+ else
+ {
+ meta_refresh(2, $redirect);
+ trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
+ }
+}
+
+/**
+* Move Topic
+*/
+function mcp_move_topic($topic_ids)
+{
+ global $auth, $user, $db, $template;
+ global $phpEx, $phpbb_root_path;
+
+ // Here we limit the operation to one forum only
+ $forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_move'), true);
+
+ if ($forum_id === false)
+ {
+ return;
+ }
+
+ $to_forum_id = request_var('to_forum_id', 0);
+ $redirect = request_var('redirect', build_url(array('action', 'quickmod')));
+ $additional_msg = $success_msg = '';
+
+ $s_hidden_fields = build_hidden_fields(array(
+ 'topic_id_list' => $topic_ids,
+ 'f' => $forum_id,
+ 'action' => 'move',
+ 'redirect' => $redirect)
+ );
+
+ if ($to_forum_id)
+ {
+ $forum_data = get_forum_data($to_forum_id, 'f_post');
+
+ if (!sizeof($forum_data))
+ {
+ $additional_msg = $user->lang['FORUM_NOT_EXIST'];
+ }
+ else
+ {
+ $forum_data = $forum_data[$to_forum_id];
+
+ if ($forum_data['forum_type'] != FORUM_POST)
+ {
+ $additional_msg = $user->lang['FORUM_NOT_POSTABLE'];
+ }
+ else if (!$auth->acl_get('f_post', $to_forum_id))
+ {
+ $additional_msg = $user->lang['USER_CANNOT_POST'];
+ }
+ else if ($forum_id == $to_forum_id)
+ {
+ $additional_msg = $user->lang['CANNOT_MOVE_SAME_FORUM'];
+ }
+ }
+ }
+ else if (isset($_POST['confirm']))
+ {
+ $additional_msg = $user->lang['FORUM_NOT_EXIST'];
+ }
+
+ if (!$to_forum_id || $additional_msg)
+ {
+ unset($_POST['confirm']);
+ unset($_REQUEST['confirm_key']);
+ }
+
+ if (confirm_box(true))
+ {
+ $topic_data = get_topic_data($topic_ids);
+ $leave_shadow = (isset($_POST['move_leave_shadow'])) ? true : false;
+
+ $forum_sync_data = array();
+
+ $forum_sync_data[$forum_id] = current($topic_data);
+ $forum_sync_data[$to_forum_id] = $forum_data;
+
+ // Real topics added to target forum
+ $topics_moved = sizeof($topic_data);
+
+ // Approved topics added to target forum
+ $topics_authed_moved = 0;
+
+ // Posts (topic replies + topic post if approved) added to target forum
+ $topic_posts_added = 0;
+
+ // Posts (topic replies + topic post if approved and not global announcement) removed from source forum
+ $topic_posts_removed = 0;
+
+ // Real topics removed from source forum (all topics without global announcements)
+ $topics_removed = 0;
+
+ // Approved topics removed from source forum (except global announcements)
+ $topics_authed_removed = 0;
+
+ foreach ($topic_data as $topic_id => $topic_info)
+ {
+ if ($topic_info['topic_approved'])
+ {
+ $topics_authed_moved++;
+ $topic_posts_added++;
+ }
+
+ $topic_posts_added += $topic_info['topic_replies'];
+
+ if ($topic_info['topic_type'] != POST_GLOBAL)
+ {
+ $topics_removed++;
+ $topic_posts_removed += $topic_info['topic_replies'];
+
+ if ($topic_info['topic_approved'])
+ {
+ $topics_authed_removed++;
+ $topic_posts_removed++;
+ }
+ }
+ }
+
+ $db->sql_transaction('begin');
+
+ $sync_sql = array();
+
+ if ($topic_posts_added)
+ {
+ $sync_sql[$to_forum_id][] = 'forum_posts = forum_posts + ' . $topic_posts_added;
+ }
+
+ if ($topics_authed_moved)
+ {
+ $sync_sql[$to_forum_id][] = 'forum_topics = forum_topics + ' . (int) $topics_authed_moved;
+ }
+
+ $sync_sql[$to_forum_id][] = 'forum_topics_real = forum_topics_real + ' . (int) $topics_moved;
+
+ // Move topics, but do not resync yet
+ move_topics($topic_ids, $to_forum_id, false);
+
+ $forum_ids = array($to_forum_id);
+ foreach ($topic_data as $topic_id => $row)
+ {
+ // Get the list of forums to resync, add a log entry
+ $forum_ids[] = $row['forum_id'];
+ add_log('mod', $to_forum_id, $topic_id, 'LOG_MOVE', $row['forum_name'], $forum_data['forum_name']);
+
+ // If we have moved a global announcement, we need to correct the topic type
+ if ($row['topic_type'] == POST_GLOBAL)
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_type = ' . POST_ANNOUNCE . '
+ WHERE topic_id = ' . (int) $row['topic_id'];
+ $db->sql_query($sql);
+ }
+
+ // Leave a redirection if required and only if the topic is visible to users
+ if ($leave_shadow && $row['topic_approved'] && $row['topic_type'] != POST_GLOBAL)
+ {
+ $shadow = array(
+ 'forum_id' => (int) $row['forum_id'],
+ 'icon_id' => (int) $row['icon_id'],
+ 'topic_attachment' => (int) $row['topic_attachment'],
+ 'topic_approved' => 1, // a shadow topic is always approved
+ 'topic_reported' => 0, // a shadow topic is never reported
+ 'topic_title' => (string) $row['topic_title'],
+ 'topic_poster' => (int) $row['topic_poster'],
+ 'topic_time' => (int) $row['topic_time'],
+ 'topic_time_limit' => (int) $row['topic_time_limit'],
+ 'topic_views' => (int) $row['topic_views'],
+ 'topic_replies' => (int) $row['topic_replies'],
+ 'topic_replies_real' => (int) $row['topic_replies_real'],
+ 'topic_status' => ITEM_MOVED,
+ 'topic_type' => POST_NORMAL,
+ 'topic_first_post_id' => (int) $row['topic_first_post_id'],
+ 'topic_first_poster_colour'=>(string) $row['topic_first_poster_colour'],
+ 'topic_first_poster_name'=> (string) $row['topic_first_poster_name'],
+ 'topic_last_post_id' => (int) $row['topic_last_post_id'],
+ 'topic_last_poster_id' => (int) $row['topic_last_poster_id'],
+ 'topic_last_poster_colour'=>(string) $row['topic_last_poster_colour'],
+ 'topic_last_poster_name'=> (string) $row['topic_last_poster_name'],
+ 'topic_last_post_subject'=> (string) $row['topic_last_post_subject'],
+ 'topic_last_post_time' => (int) $row['topic_last_post_time'],
+ 'topic_last_view_time' => (int) $row['topic_last_view_time'],
+ 'topic_moved_id' => (int) $row['topic_id'],
+ 'topic_bumped' => (int) $row['topic_bumped'],
+ 'topic_bumper' => (int) $row['topic_bumper'],
+ 'poll_title' => (string) $row['poll_title'],
+ 'poll_start' => (int) $row['poll_start'],
+ 'poll_length' => (int) $row['poll_length'],
+ 'poll_max_options' => (int) $row['poll_max_options'],
+ 'poll_last_vote' => (int) $row['poll_last_vote']
+ );
+
+ $db->sql_query('INSERT INTO ' . TOPICS_TABLE . $db->sql_build_array('INSERT', $shadow));
+
+ // Shadow topics only count on new "topics" and not posts... a shadow topic alone has 0 posts
+ $topics_removed--;
+ $topics_authed_removed--;
+ }
+ }
+ unset($topic_data);
+
+ if ($topic_posts_removed)
+ {
+ $sync_sql[$forum_id][] = 'forum_posts = forum_posts - ' . $topic_posts_removed;
+ }
+
+ if ($topics_removed)
+ {
+ $sync_sql[$forum_id][] = 'forum_topics_real = forum_topics_real - ' . (int) $topics_removed;
+ }
+
+ if ($topics_authed_removed)
+ {
+ $sync_sql[$forum_id][] = 'forum_topics = forum_topics - ' . (int) $topics_authed_removed;
+ }
+
+ $success_msg = (sizeof($topic_ids) == 1) ? 'TOPIC_MOVED_SUCCESS' : 'TOPICS_MOVED_SUCCESS';
+
+ foreach ($sync_sql as $forum_id_key => $array)
+ {
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET ' . implode(', ', $array) . '
+ WHERE forum_id = ' . $forum_id_key;
+ $db->sql_query($sql);
+ }
+
+ $db->sql_transaction('commit');
+
+ sync('forum', 'forum_id', array($forum_id, $to_forum_id));
+ }
+ else
+ {
+ $template->assign_vars(array(
+ 'S_FORUM_SELECT' => make_forum_select($to_forum_id, $forum_id, false, true, true, true),
+ 'S_CAN_LEAVE_SHADOW' => true,
+ 'ADDITIONAL_MSG' => $additional_msg)
+ );
+
+ confirm_box(false, 'MOVE_TOPIC' . ((sizeof($topic_ids) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_move.html');
+ }
+
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
+
+ if (!$success_msg)
+ {
+ redirect($redirect);
+ }
+ else
+ {
+ meta_refresh(3, $redirect);
+
+ $message = $user->lang[$success_msg];
+ $message .= '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>');
+ $message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id") . '">', '</a>');
+ $message .= '<br /><br />' . sprintf($user->lang['RETURN_NEW_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$to_forum_id") . '">', '</a>');
+
+ trigger_error($message);
+ }
+}
+
+/**
+* Delete Topics
+*/
+function mcp_delete_topic($topic_ids)
+{
+ global $auth, $user, $db, $phpEx, $phpbb_root_path;
+
+ if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_delete')))
+ {
+ return;
+ }
+
+ $redirect = request_var('redirect', build_url(array('action', 'quickmod')));
+ $forum_id = request_var('f', 0);
+
+ $s_hidden_fields = build_hidden_fields(array(
+ 'topic_id_list' => $topic_ids,
+ 'f' => $forum_id,
+ 'action' => 'delete_topic',
+ 'redirect' => $redirect)
+ );
+ $success_msg = '';
+
+ if (confirm_box(true))
+ {
+ $success_msg = (sizeof($topic_ids) == 1) ? 'TOPIC_DELETED_SUCCESS' : 'TOPICS_DELETED_SUCCESS';
+
+ $data = get_topic_data($topic_ids);
+
+ foreach ($data as $topic_id => $row)
+ {
+ if ($row['topic_moved_id'])
+ {
+ add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_SHADOW_TOPIC', $row['topic_title']);
+ }
+ else
+ {
+ add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']);
+ }
+ }
+
+ $return = delete_topics('topic_id', $topic_ids);
+ }
+ else
+ {
+ confirm_box(false, (sizeof($topic_ids) == 1) ? 'DELETE_TOPIC' : 'DELETE_TOPICS', $s_hidden_fields);
+ }
+
+ if (!isset($_REQUEST['quickmod']))
+ {
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
+ $redirect_message = 'PAGE';
+ }
+ else
+ {
+ $redirect = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id);
+ $redirect_message = 'FORUM';
+ }
+
+ if (!$success_msg)
+ {
+ redirect($redirect);
+ }
+ else
+ {
+ meta_refresh(3, $redirect);
+ trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_' . $redirect_message], '<a href="' . $redirect . '">', '</a>'));
+ }
+}
+
+/**
+* Delete Posts
+*/
+function mcp_delete_post($post_ids)
+{
+ global $auth, $user, $db, $phpEx, $phpbb_root_path;
+
+ if (!check_ids($post_ids, POSTS_TABLE, 'post_id', array('m_delete')))
+ {
+ return;
+ }
+
+ $redirect = request_var('redirect', build_url(array('action', 'quickmod')));
+ $forum_id = request_var('f', 0);
+
+ $s_hidden_fields = build_hidden_fields(array(
+ 'post_id_list' => $post_ids,
+ 'f' => $forum_id,
+ 'action' => 'delete_post',
+ 'redirect' => $redirect)
+ );
+ $success_msg = '';
+
+ if (confirm_box(true))
+ {
+ if (!function_exists('delete_posts'))
+ {
+ include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+ }
+
+ // Count the number of topics that are affected
+ // I did not use COUNT(DISTINCT ...) because I remember having problems
+ // with it on older versions of MySQL -- Ashe
+
+ $sql = 'SELECT DISTINCT topic_id
+ FROM ' . POSTS_TABLE . '
+ WHERE ' . $db->sql_in_set('post_id', $post_ids);
+ $result = $db->sql_query($sql);
+
+ $topic_id_list = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_id_list[] = $row['topic_id'];
+ }
+ $affected_topics = sizeof($topic_id_list);
+ $db->sql_freeresult($result);
+
+ $post_data = get_post_data($post_ids);
+
+ foreach ($post_data as $id => $row)
+ {
+ $post_username = ($row['poster_id'] == ANONYMOUS && !empty($row['post_username'])) ? $row['post_username'] : $row['username'];
+ add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_DELETE_POST', $row['post_subject'], $post_username);
+ }
+
+ // Now delete the posts, topics and forums are automatically resync'ed
+ delete_posts('post_id', $post_ids);
+
+ $sql = 'SELECT COUNT(topic_id) AS topics_left
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $topic_id_list);
+ $result = $db->sql_query_limit($sql, 1);
+
+ $deleted_topics = ($row = $db->sql_fetchrow($result)) ? ($affected_topics - $row['topics_left']) : $affected_topics;
+ $db->sql_freeresult($result);
+
+ $topic_id = request_var('t', 0);
+
+ // Return links
+ $return_link = array();
+ if ($affected_topics == 1 && !$deleted_topics && $topic_id)
+ {
+ $return_link[] = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id") . '">', '</a>');
+ }
+ $return_link[] = sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
+
+ if (sizeof($post_ids) == 1)
+ {
+ if ($deleted_topics)
+ {
+ // We deleted the only post of a topic, which in turn has
+ // been removed from the database
+ $success_msg = $user->lang['TOPIC_DELETED_SUCCESS'];
+ }
+ else
+ {
+ $success_msg = $user->lang['POST_DELETED_SUCCESS'];
+ }
+ }
+ else
+ {
+ if ($deleted_topics)
+ {
+ // Some of topics disappeared
+ $success_msg = $user->lang['POSTS_DELETED_SUCCESS'] . '<br /><br />' . $user->lang['EMPTY_TOPICS_REMOVED_WARNING'];
+ }
+ else
+ {
+ $success_msg = $user->lang['POSTS_DELETED_SUCCESS'];
+ }
+ }
+ }
+ else
+ {
+ confirm_box(false, (sizeof($post_ids) == 1) ? 'DELETE_POST' : 'DELETE_POSTS', $s_hidden_fields);
+ }
+
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
+
+ if (!$success_msg)
+ {
+ redirect($redirect);
+ }
+ else
+ {
+ if ($affected_topics != 1 || $deleted_topics || !$topic_id)
+ {
+ $redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&i=main&mode=forum_view", false);
+ }
+
+ meta_refresh(3, $redirect);
+ trigger_error($success_msg . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>') . '<br /><br />' . implode('<br /><br />', $return_link));
+ }
+}
+
+/**
+* Fork Topic
+*/
+function mcp_fork_topic($topic_ids)
+{
+ global $auth, $user, $db, $template, $config;
+ global $phpEx, $phpbb_root_path;
+
+ if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))
+ {
+ return;
+ }
+
+ $to_forum_id = request_var('to_forum_id', 0);
+ $forum_id = request_var('f', 0);
+ $redirect = request_var('redirect', build_url(array('action', 'quickmod')));
+ $additional_msg = $success_msg = '';
+
+ $s_hidden_fields = build_hidden_fields(array(
+ 'topic_id_list' => $topic_ids,
+ 'f' => $forum_id,
+ 'action' => 'fork',
+ 'redirect' => $redirect)
+ );
+
+ if ($to_forum_id)
+ {
+ $forum_data = get_forum_data($to_forum_id, 'f_post');
+
+ if (!sizeof($topic_ids))
+ {
+ $additional_msg = $user->lang['NO_TOPIC_SELECTED'];
+ }
+ else if (!sizeof($forum_data))
+ {
+ $additional_msg = $user->lang['FORUM_NOT_EXIST'];
+ }
+ else
+ {
+ $forum_data = $forum_data[$to_forum_id];
+
+ if ($forum_data['forum_type'] != FORUM_POST)
+ {
+ $additional_msg = $user->lang['FORUM_NOT_POSTABLE'];
+ }
+ else if (!$auth->acl_get('f_post', $to_forum_id))
+ {
+ $additional_msg = $user->lang['USER_CANNOT_POST'];
+ }
+ }
+ }
+ else if (isset($_POST['confirm']))
+ {
+ $additional_msg = $user->lang['FORUM_NOT_EXIST'];
+ }
+
+ if ($additional_msg)
+ {
+ unset($_POST['confirm']);
+ unset($_REQUEST['confirm_key']);
+ }
+
+ if (confirm_box(true))
+ {
+ $topic_data = get_topic_data($topic_ids, 'f_post');
+
+ $total_posts = 0;
+ $new_topic_id_list = array();
+
+ foreach ($topic_data as $topic_id => $topic_row)
+ {
+ $sql_ary = array(
+ 'forum_id' => (int) $to_forum_id,
+ 'icon_id' => (int) $topic_row['icon_id'],
+ 'topic_attachment' => (int) $topic_row['topic_attachment'],
+ 'topic_approved' => 1,
+ 'topic_reported' => 0,
+ 'topic_title' => (string) $topic_row['topic_title'],
+ 'topic_poster' => (int) $topic_row['topic_poster'],
+ 'topic_time' => (int) $topic_row['topic_time'],
+ 'topic_replies' => (int) $topic_row['topic_replies_real'],
+ 'topic_replies_real' => (int) $topic_row['topic_replies_real'],
+ 'topic_status' => (int) $topic_row['topic_status'],
+ 'topic_type' => (int) $topic_row['topic_type'],
+ 'topic_first_poster_name' => (string) $topic_row['topic_first_poster_name'],
+ 'topic_last_poster_id' => (int) $topic_row['topic_last_poster_id'],
+ 'topic_last_poster_name' => (string) $topic_row['topic_last_poster_name'],
+ 'topic_last_post_time' => (int) $topic_row['topic_last_post_time'],
+ 'topic_last_view_time' => (int) $topic_row['topic_last_view_time'],
+ 'topic_bumped' => (int) $topic_row['topic_bumped'],
+ 'topic_bumper' => (int) $topic_row['topic_bumper'],
+ 'poll_title' => (string) $topic_row['poll_title'],
+ 'poll_start' => (int) $topic_row['poll_start'],
+ 'poll_length' => (int) $topic_row['poll_length'],
+ 'poll_max_options' => (int) $topic_row['poll_max_options'],
+ 'poll_vote_change' => (int) $topic_row['poll_vote_change'],
+ );
+
+ $db->sql_query('INSERT INTO ' . TOPICS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+ $new_topic_id = $db->sql_nextid();
+ $new_topic_id_list[$topic_id] = $new_topic_id;
+
+ if ($topic_row['poll_start'])
+ {
+ $poll_rows = array();
+
+ $sql = 'SELECT *
+ FROM ' . POLL_OPTIONS_TABLE . "
+ WHERE topic_id = $topic_id";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $sql_ary = array(
+ 'poll_option_id' => (int) $row['poll_option_id'],
+ 'topic_id' => (int) $new_topic_id,
+ 'poll_option_text' => (string) $row['poll_option_text'],
+ 'poll_option_total' => 0
+ );
+
+ $db->sql_query('INSERT INTO ' . POLL_OPTIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+ }
+ }
+
+ $sql = 'SELECT *
+ FROM ' . POSTS_TABLE . "
+ WHERE topic_id = $topic_id
+ ORDER BY post_time ASC";
+ $result = $db->sql_query($sql);
+
+ $post_rows = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_rows[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($post_rows))
+ {
+ continue;
+ }
+
+ $total_posts += sizeof($post_rows);
+ foreach ($post_rows as $row)
+ {
+ $sql_ary = array(
+ 'topic_id' => (int) $new_topic_id,
+ 'forum_id' => (int) $to_forum_id,
+ 'poster_id' => (int) $row['poster_id'],
+ 'icon_id' => (int) $row['icon_id'],
+ 'poster_ip' => (string) $row['poster_ip'],
+ 'post_time' => (int) $row['post_time'],
+ 'post_approved' => 1,
+ 'post_reported' => 0,
+ 'enable_bbcode' => (int) $row['enable_bbcode'],
+ 'enable_smilies' => (int) $row['enable_smilies'],
+ 'enable_magic_url' => (int) $row['enable_magic_url'],
+ 'enable_sig' => (int) $row['enable_sig'],
+ 'post_username' => (string) $row['post_username'],
+ 'post_subject' => (string) $row['post_subject'],
+ 'post_text' => (string) $row['post_text'],
+ 'post_edit_reason' => (string) $row['post_edit_reason'],
+ 'post_edit_user' => (int) $row['post_edit_user'],
+ 'post_checksum' => (string) $row['post_checksum'],
+ 'post_attachment' => (int) $row['post_attachment'],
+ 'bbcode_bitfield' => $row['bbcode_bitfield'],
+ 'bbcode_uid' => (string) $row['bbcode_uid'],
+ 'post_edit_time' => (int) $row['post_edit_time'],
+ 'post_edit_count' => (int) $row['post_edit_count'],
+ 'post_edit_locked' => (int) $row['post_edit_locked'],
+ 'post_postcount' => 0,
+ );
+
+ $db->sql_query('INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+ $new_post_id = $db->sql_nextid();
+
+ // Copy whether the topic is dotted
+ markread('post', $to_forum_id, $new_topic_id, 0, $row['poster_id']);
+
+ // Copy Attachments
+ if ($row['post_attachment'])
+ {
+ $sql = 'SELECT * FROM ' . ATTACHMENTS_TABLE . "
+ WHERE post_msg_id = {$row['post_id']}
+ AND topic_id = $topic_id
+ AND in_message = 0";
+ $result = $db->sql_query($sql);
+
+ $sql_ary = array();
+ while ($attach_row = $db->sql_fetchrow($result))
+ {
+ $sql_ary[] = array(
+ 'post_msg_id' => (int) $new_post_id,
+ 'topic_id' => (int) $new_topic_id,
+ 'in_message' => 0,
+ 'is_orphan' => (int) $attach_row['is_orphan'],
+ 'poster_id' => (int) $attach_row['poster_id'],
+ 'physical_filename' => (string) utf8_basename($attach_row['physical_filename']),
+ 'real_filename' => (string) utf8_basename($attach_row['real_filename']),
+ 'download_count' => (int) $attach_row['download_count'],
+ 'attach_comment' => (string) $attach_row['attach_comment'],
+ 'extension' => (string) $attach_row['extension'],
+ 'mimetype' => (string) $attach_row['mimetype'],
+ 'filesize' => (int) $attach_row['filesize'],
+ 'filetime' => (int) $attach_row['filetime'],
+ 'thumbnail' => (int) $attach_row['thumbnail']
+ );
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($sql_ary))
+ {
+ $db->sql_multi_insert(ATTACHMENTS_TABLE, $sql_ary);
+ }
+ }
+ }
+
+ $sql = 'SELECT user_id, notify_status
+ FROM ' . TOPICS_WATCH_TABLE . '
+ WHERE topic_id = ' . $topic_id;
+ $result = $db->sql_query($sql);
+
+ $sql_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $sql_ary[] = array(
+ 'topic_id' => (int) $new_topic_id,
+ 'user_id' => (int) $row['user_id'],
+ 'notify_status' => (int) $row['notify_status'],
+ );
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($sql_ary))
+ {
+ $db->sql_multi_insert(TOPICS_WATCH_TABLE, $sql_ary);
+ }
+ }
+
+ // Sync new topics, parent forums and board stats
+ sync('topic', 'topic_id', $new_topic_id_list);
+
+ $sync_sql = array();
+
+ $sync_sql[$to_forum_id][] = 'forum_posts = forum_posts + ' . $total_posts;
+ $sync_sql[$to_forum_id][] = 'forum_topics = forum_topics + ' . sizeof($new_topic_id_list);
+ $sync_sql[$to_forum_id][] = 'forum_topics_real = forum_topics_real + ' . sizeof($new_topic_id_list);
+
+ foreach ($sync_sql as $forum_id_key => $array)
+ {
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET ' . implode(', ', $array) . '
+ WHERE forum_id = ' . $forum_id_key;
+ $db->sql_query($sql);
+ }
+
+ sync('forum', 'forum_id', $to_forum_id);
+ set_config_count('num_topics', sizeof($new_topic_id_list), true);
+ set_config_count('num_posts', $total_posts, true);
+
+ foreach ($new_topic_id_list as $topic_id => $new_topic_id)
+ {
+ add_log('mod', $to_forum_id, $new_topic_id, 'LOG_FORK', $topic_row['forum_name']);
+ }
+
+ $success_msg = (sizeof($topic_ids) == 1) ? 'TOPIC_FORKED_SUCCESS' : 'TOPICS_FORKED_SUCCESS';
+ }
+ else
+ {
+ $template->assign_vars(array(
+ 'S_FORUM_SELECT' => make_forum_select($to_forum_id, false, false, true, true, true),
+ 'S_CAN_LEAVE_SHADOW' => false,
+ 'ADDITIONAL_MSG' => $additional_msg)
+ );
+
+ confirm_box(false, 'FORK_TOPIC' . ((sizeof($topic_ids) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_move.html');
+ }
+
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
+
+ if (!$success_msg)
+ {
+ redirect($redirect);
+ }
+ else
+ {
+ $redirect_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id);
+ meta_refresh(3, $redirect_url);
+ $return_link = sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect_url . '">', '</a>');
+
+ if ($forum_id != $to_forum_id)
+ {
+ $return_link .= '<br /><br />' . sprintf($user->lang['RETURN_NEW_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $to_forum_id) . '">', '</a>');
+ }
+
+ trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php
new file mode 100644
index 0000000000..757860e1af
--- /dev/null
+++ b/phpBB/includes/mcp/mcp_notes.php
@@ -0,0 +1,251 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* mcp_notes
+* Displays notes about a user
+* @package mcp
+*/
+class mcp_notes
+{
+ var $p_master;
+ var $u_action;
+
+ function mcp_notes(&$p_master)
+ {
+ $this->p_master = &$p_master;
+ }
+
+ function main($id, $mode)
+ {
+ global $auth, $db, $user, $template;
+ global $config, $phpbb_root_path, $phpEx;
+
+ $action = request_var('action', array('' => ''));
+
+ if (is_array($action))
+ {
+ list($action, ) = each($action);
+ }
+
+ $this->page_title = 'MCP_NOTES';
+
+ switch ($mode)
+ {
+ case 'front':
+ $template->assign_vars(array(
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=mcp&amp;field=username&amp;select_single=true'),
+ 'U_POST_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes'),
+
+ 'L_TITLE' => $user->lang['MCP_NOTES'],
+ ));
+
+ $this->tpl_name = 'mcp_notes_front';
+ break;
+
+ case 'user_notes':
+ $user->add_lang('acp/common');
+
+ $this->mcp_notes_user_view($action);
+ $this->tpl_name = 'mcp_notes_user';
+ break;
+ }
+ }
+
+ /**
+ * Display user notes
+ */
+ function mcp_notes_user_view($action)
+ {
+ global $phpEx, $phpbb_root_path, $config;
+ global $template, $db, $user, $auth;
+
+ $user_id = request_var('u', 0);
+ $username = request_var('username', '', true);
+ $start = request_var('start', 0);
+ $st = request_var('st', 0);
+ $sk = request_var('sk', 'b');
+ $sd = request_var('sd', 'd');
+
+ add_form_key('mcp_notes');
+
+ $sql_where = ($user_id) ? "user_id = $user_id" : "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
+
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . "
+ WHERE $sql_where";
+ $result = $db->sql_query($sql);
+ $userrow = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$userrow)
+ {
+ trigger_error('NO_USER');
+ }
+
+ $user_id = $userrow['user_id'];
+
+ // Populate user id to the currently active module (this module)
+ // The following method is another way of adjusting module urls. It is the easy variant if we want
+ // to directly adjust the current module url based on data retrieved within the same module.
+ if (strpos($this->u_action, "&amp;u=$user_id") === false)
+ {
+ $this->p_master->adjust_url('&amp;u=' . $user_id);
+ $this->u_action .= "&amp;u=$user_id";
+ }
+
+ $deletemark = ($action == 'del_marked') ? true : false;
+ $deleteall = ($action == 'del_all') ? true : false;
+ $marked = request_var('marknote', array(0));
+ $usernote = utf8_normalize_nfc(request_var('usernote', '', true));
+
+ // Handle any actions
+ if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
+ {
+ $where_sql = '';
+ if ($deletemark && $marked)
+ {
+ $sql_in = array();
+ foreach ($marked as $mark)
+ {
+ $sql_in[] = $mark;
+ }
+ $where_sql = ' AND ' . $db->sql_in_set('log_id', $sql_in);
+ unset($sql_in);
+ }
+
+ if ($where_sql || $deleteall)
+ {
+ if (check_form_key('mcp_notes'))
+ {
+ $sql = 'DELETE FROM ' . LOG_TABLE . '
+ WHERE log_type = ' . LOG_USERS . "
+ AND reportee_id = $user_id
+ $where_sql";
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_CLEAR_USER', $userrow['username']);
+
+ $msg = ($deletemark) ? 'MARKED_NOTES_DELETED' : 'ALL_NOTES_DELETED';
+ }
+ else
+ {
+ $msg = 'FORM_INVALID';
+ }
+ $redirect = $this->u_action . '&amp;u=' . $user_id;
+ meta_refresh(3, $redirect);
+ trigger_error($user->lang[$msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
+ }
+ }
+
+ if ($usernote && $action == 'add_feedback')
+ {
+ if (check_form_key('mcp_notes'))
+ {
+ add_log('admin', 'LOG_USER_FEEDBACK', $userrow['username']);
+ add_log('mod', 0, 0, 'LOG_USER_FEEDBACK', $userrow['username']);
+
+ add_log('user', $user_id, 'LOG_USER_GENERAL', $usernote);
+ $msg = $user->lang['USER_FEEDBACK_ADDED'];
+ }
+ else
+ {
+ $msg = $user->lang['FORM_INVALID'];
+ }
+ $redirect = $this->u_action;
+ meta_refresh(3, $redirect);
+
+ trigger_error($msg . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
+ }
+
+ // Generate the appropriate user information for the user we are looking at
+ if (!function_exists('get_user_avatar'))
+ {
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ }
+
+ $rank_title = $rank_img = '';
+ $avatar_img = get_user_avatar($userrow['user_avatar'], $userrow['user_avatar_type'], $userrow['user_avatar_width'], $userrow['user_avatar_height']);
+
+ $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_DATE'], 'c' => $user->lang['SORT_IP'], 'd' => $user->lang['SORT_ACTION']);
+ $sort_by_sql = array('a' => 'u.username_clean', 'b' => 'l.log_time', 'c' => 'l.log_ip', 'd' => 'l.log_operation');
+
+ $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
+ gen_sort_selects($limit_days, $sort_by_text, $st, $sk, $sd, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
+
+ // Define where and sort sql for use in displaying logs
+ $sql_where = ($st) ? (time() - ($st * 86400)) : 0;
+ $sql_sort = $sort_by_sql[$sk] . ' ' . (($sd == 'd') ? 'DESC' : 'ASC');
+
+ $keywords = utf8_normalize_nfc(request_var('keywords', '', true));
+ $keywords_param = !empty($keywords) ? '&amp;keywords=' . urlencode(htmlspecialchars_decode($keywords)) : '';
+
+ $log_data = array();
+ $log_count = 0;
+ view_log('user', $log_data, $log_count, $config['posts_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort, $keywords);
+
+ if ($log_count)
+ {
+ $template->assign_var('S_USER_NOTES', true);
+
+ foreach ($log_data as $row)
+ {
+ $template->assign_block_vars('usernotes', array(
+ 'REPORT_BY' => $row['username_full'],
+ 'REPORT_AT' => $user->format_date($row['time']),
+ 'ACTION' => $row['action'],
+ 'IP' => $row['ip'],
+ 'ID' => $row['id'])
+ );
+ }
+ }
+
+ $template->assign_vars(array(
+ 'U_POST_ACTION' => $this->u_action,
+ 'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,
+ 'S_SELECT_SORT_DIR' => $s_sort_dir,
+ 'S_SELECT_SORT_KEY' => $s_sort_key,
+ 'S_SELECT_SORT_DAYS' => $s_limit_days,
+ 'S_KEYWORDS' => $keywords,
+
+ 'L_TITLE' => $user->lang['MCP_NOTES_USER'],
+
+ 'PAGE_NUMBER' => on_page($log_count, $config['posts_per_page'], $start),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param$keywords_param", $log_count, $config['topics_per_page'], $start, true),
+ 'TOTAL_REPORTS' => ($log_count == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $log_count),
+
+ 'RANK_TITLE' => $rank_title,
+ 'JOINED' => $user->format_date($userrow['user_regdate']),
+ 'POSTS' => ($userrow['user_posts']) ? $userrow['user_posts'] : 0,
+ 'WARNINGS' => ($userrow['user_warnings']) ? $userrow['user_warnings'] : 0,
+
+ 'USERNAME_FULL' => get_username_string('full', $userrow['user_id'], $userrow['username'], $userrow['user_colour']),
+ 'USERNAME_COLOUR' => get_username_string('colour', $userrow['user_id'], $userrow['username'], $userrow['user_colour']),
+ 'USERNAME' => get_username_string('username', $userrow['user_id'], $userrow['username'], $userrow['user_colour']),
+ 'U_PROFILE' => get_username_string('profile', $userrow['user_id'], $userrow['username'], $userrow['user_colour']),
+
+ 'AVATAR_IMG' => $avatar_img,
+ 'RANK_IMG' => $rank_img,
+ )
+ );
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_pm_reports.php b/phpBB/includes/mcp/mcp_pm_reports.php
new file mode 100644
index 0000000000..72f77fae7c
--- /dev/null
+++ b/phpBB/includes/mcp/mcp_pm_reports.php
@@ -0,0 +1,323 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* mcp_reports
+* Handling the reports queue
+* @package mcp
+*/
+class mcp_pm_reports
+{
+ var $p_master;
+ var $u_action;
+
+ function mcp_pm_reports(&$p_master)
+ {
+ $this->p_master = &$p_master;
+ }
+
+ function main($id, $mode)
+ {
+ global $auth, $db, $user, $template, $cache;
+ global $config, $phpbb_root_path, $phpEx, $action;
+
+ include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+ include_once($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
+
+ $start = request_var('start', 0);
+
+ $this->page_title = 'MCP_PM_REPORTS';
+
+ switch ($action)
+ {
+ case 'close':
+ case 'delete':
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+
+ $report_id_list = request_var('report_id_list', array(0));
+
+ if (!sizeof($report_id_list))
+ {
+ trigger_error('NO_REPORT_SELECTED');
+ }
+
+ if (!function_exists('close_report'))
+ {
+ include($phpbb_root_path . 'includes/mcp/mcp_reports.' . $phpEx);
+ }
+
+ close_report($report_id_list, $mode, $action, true);
+
+ break;
+ }
+
+ switch ($mode)
+ {
+ case 'pm_report_details':
+
+ $user->add_lang(array('posting', 'viewforum', 'viewtopic', 'ucp'));
+
+ $report_id = request_var('r', 0);
+
+ $sql = 'SELECT r.pm_id, r.user_id, r.report_id, r.report_closed, report_time, r.report_text, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour
+ FROM ' . REPORTS_TABLE . ' r, ' . REPORTS_REASONS_TABLE . ' rr, ' . USERS_TABLE . ' u
+ WHERE r.report_id = ' . $report_id . '
+ AND rr.reason_id = r.reason_id
+ AND r.user_id = u.user_id
+ AND r.post_id = 0
+ ORDER BY report_closed ASC';
+ $result = $db->sql_query_limit($sql, 1);
+ $report = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$report_id || !$report)
+ {
+ trigger_error('NO_REPORT');
+ }
+
+ $pm_id = $report['pm_id'];
+ $report_id = $report['report_id'];
+
+ $pm_info = get_pm_data(array($pm_id));
+
+ if (!sizeof($pm_info))
+ {
+ trigger_error('NO_REPORT_SELECTED');
+ }
+
+ $pm_info = $pm_info[$pm_id];
+
+ write_pm_addresses(array('to' => $pm_info['to_address'], 'bcc' => $pm_info['bcc_address']), (int) $pm_info['author_id']);
+
+ $reason = array('title' => $report['reason_title'], 'description' => $report['reason_description']);
+ if (isset($user->lang['report_reasons']['TITLE'][strtoupper($reason['title'])]) && isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($reason['title'])]))
+ {
+ $reason['description'] = $user->lang['report_reasons']['DESCRIPTION'][strtoupper($reason['title'])];
+ $reason['title'] = $user->lang['report_reasons']['TITLE'][strtoupper($reason['title'])];
+ }
+
+ // Process message, leave it uncensored
+ $message = $pm_info['message_text'];
+
+ if ($pm_info['bbcode_bitfield'])
+ {
+ include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+ $bbcode = new bbcode($pm_info['bbcode_bitfield']);
+ $bbcode->bbcode_second_pass($message, $pm_info['bbcode_uid'], $pm_info['bbcode_bitfield']);
+ }
+
+ $message = bbcode_nl2br($message);
+ $message = smiley_text($message);
+
+ if ($pm_info['message_attachment'] && $auth->acl_get('u_pm_download'))
+ {
+ $sql = 'SELECT *
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE post_msg_id = ' . $pm_id . '
+ AND in_message = 1
+ ORDER BY filetime DESC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $attachments[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($attachments))
+ {
+ $update_count = array();
+ parse_attachments(0, $message, $attachments, $update_count);
+ }
+
+ // Display not already displayed Attachments for this post, we already parsed them. ;)
+ if (!empty($attachments))
+ {
+ $template->assign_var('S_HAS_ATTACHMENTS', true);
+
+ foreach ($attachments as $attachment)
+ {
+ $template->assign_block_vars('attachment', array(
+ 'DISPLAY_ATTACHMENT' => $attachment)
+ );
+ }
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_MCP_REPORT' => true,
+ 'S_PM' => true,
+ 'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=pm_reports&amp;mode=pm_report_details&amp;r=' . $report_id),
+ 'S_CAN_VIEWIP' => $auth->acl_getf_global('m_info'),
+ 'S_POST_REPORTED' => $pm_info['message_reported'],
+ 'S_USER_NOTES' => true,
+
+ 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=pm_reports&amp;mode=pm_report_details&amp;r=' . $report_id),
+ 'U_MCP_REPORTER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $report['user_id']),
+ 'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $pm_info['author_id']),
+ 'U_MCP_WARN_REPORTER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $report['user_id']) : '',
+ 'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $pm_info['author_id']) : '',
+
+ 'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']),
+ 'MINI_POST_IMG' => $user->img('icon_post_target', 'POST'),
+
+ 'RETURN_REPORTS' => sprintf($user->lang['RETURN_REPORTS'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=pm_reports' . (($pm_info['message_reported']) ? '&amp;mode=pm_reports' : '&amp;mode=pm_reports_closed') . '&amp;start=' . $start) . '">', '</a>'),
+ 'REPORTED_IMG' => $user->img('icon_topic_reported', $user->lang['POST_REPORTED']),
+ 'REPORT_DATE' => $user->format_date($report['report_time']),
+ 'REPORT_ID' => $report_id,
+ 'REPORT_REASON_TITLE' => $reason['title'],
+ 'REPORT_REASON_DESCRIPTION' => $reason['description'],
+ 'REPORT_TEXT' => $report['report_text'],
+
+ 'POST_AUTHOR_FULL' => get_username_string('full', $pm_info['author_id'], $pm_info['username'], $pm_info['user_colour']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $pm_info['author_id'], $pm_info['username'], $pm_info['user_colour']),
+ 'POST_AUTHOR' => get_username_string('username', $pm_info['author_id'], $pm_info['username'], $pm_info['user_colour']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $pm_info['author_id'], $pm_info['username'], $pm_info['user_colour']),
+
+ 'REPORTER_FULL' => get_username_string('full', $report['user_id'], $report['username'], $report['user_colour']),
+ 'REPORTER_COLOUR' => get_username_string('colour', $report['user_id'], $report['username'], $report['user_colour']),
+ 'REPORTER_NAME' => get_username_string('username', $report['user_id'], $report['username'], $report['user_colour']),
+ 'U_VIEW_REPORTER_PROFILE' => get_username_string('profile', $report['user_id'], $report['username'], $report['user_colour']),
+
+ 'POST_PREVIEW' => $message,
+ 'POST_SUBJECT' => ($pm_info['message_subject']) ? $pm_info['message_subject'] : $user->lang['NO_SUBJECT'],
+ 'POST_DATE' => $user->format_date($pm_info['message_time']),
+ 'POST_IP' => $pm_info['author_ip'],
+ 'POST_IPADDR' => ($auth->acl_getf_global('m_info') && request_var('lookup', '')) ? @gethostbyaddr($pm_info['author_ip']) : '',
+ 'POST_ID' => $pm_info['msg_id'],
+
+ 'U_LOOKUP_IP' => ($auth->acl_getf_global('m_info')) ? $this->u_action . '&amp;r=' . $report_id . '&amp;pm=' . $pm_id . '&amp;lookup=' . $pm_info['author_ip'] . '#ip' : '',
+ ));
+
+ $this->tpl_name = 'mcp_post';
+
+ break;
+
+ case 'pm_reports':
+ case 'pm_reports_closed':
+ $user->add_lang(array('ucp'));
+
+ $sort_days = $total = 0;
+ $sort_key = $sort_dir = '';
+ $sort_by_sql = $sort_order_sql = array();
+ mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total);
+
+ $limit_time_sql = ($sort_days) ? 'AND r.report_time >= ' . (time() - ($sort_days * 86400)) : '';
+
+ if ($mode == 'pm_reports')
+ {
+ $report_state = 'p.message_reported = 1 AND r.report_closed = 0';
+ }
+ else
+ {
+ $report_state = 'r.report_closed = 1';
+ }
+
+ $sql = 'SELECT r.report_id
+ FROM ' . PRIVMSGS_TABLE . ' p, ' . REPORTS_TABLE . ' r ' . (($sort_order_sql[0] == 'u') ? ', ' . USERS_TABLE . ' u' : '') . (($sort_order_sql[0] == 'r') ? ', ' . USERS_TABLE . ' ru' : '') . "
+ WHERE $report_state
+ AND r.pm_id = p.msg_id
+ " . (($sort_order_sql[0] == 'u') ? 'AND u.user_id = p.author_id' : '') . '
+ ' . (($sort_order_sql[0] == 'r') ? 'AND ru.user_id = r.user_id' : '') . "
+ AND r.post_id = 0
+ $limit_time_sql
+ ORDER BY $sort_order_sql";
+ $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
+
+ $i = 0;
+ $report_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $report_ids[] = $row['report_id'];
+ $row_num[$row['report_id']] = $i++;
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($report_ids))
+ {
+ $sql = 'SELECT p.*, u.username, u.username_clean, u.user_colour, r.user_id as reporter_id, ru.username as reporter_name, ru.user_colour as reporter_colour, r.report_time, r.report_id
+ FROM ' . REPORTS_TABLE . ' r, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . ' u, ' . USERS_TABLE . ' ru
+ WHERE ' . $db->sql_in_set('r.report_id', $report_ids) . "
+ AND r.pm_id = p.msg_id
+ AND p.author_id = u.user_id
+ AND ru.user_id = r.user_id
+ ORDER BY $sort_order_sql";
+ $result = $db->sql_query($sql);
+
+ $pm_list = $pm_by_id = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $pm_by_id[(int) $row['msg_id']] = $row;
+ $pm_list[] = (int) $row['msg_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($pm_list))
+ {
+ $address_list = get_recipient_strings($pm_by_id);
+
+ foreach ($pm_list as $message_id)
+ {
+ $row = $pm_by_id[$message_id];
+ $template->assign_block_vars('postrow', array(
+ 'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=pm_reports&amp;mode=pm_report_details&amp;r={$row['report_id']}"),
+
+ 'PM_AUTHOR_FULL' => get_username_string('full', $row['author_id'], $row['username'], $row['user_colour']),
+ 'PM_AUTHOR_COLOUR' => get_username_string('colour', $row['author_id'], $row['username'], $row['user_colour']),
+ 'PM_AUTHOR' => get_username_string('username', $row['author_id'], $row['username'], $row['user_colour']),
+ 'U_PM_AUTHOR' => get_username_string('profile', $row['author_id'], $row['username'], $row['user_colour']),
+
+ 'REPORTER_FULL' => get_username_string('full', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']),
+ 'REPORTER_COLOUR' => get_username_string('colour', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']),
+ 'REPORTER' => get_username_string('username', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']),
+ 'U_REPORTER' => get_username_string('profile', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']),
+
+ 'PM_SUBJECT' => ($row['message_subject']) ? $row['message_subject'] : $user->lang['NO_SUBJECT'],
+ 'PM_TIME' => $user->format_date($row['message_time']),
+ 'REPORT_ID' => $row['report_id'],
+ 'REPORT_TIME' => $user->format_date($row['report_time']),
+
+ 'RECIPIENTS' => implode(', ', $address_list[$row['msg_id']]),
+ ));
+ }
+ }
+ }
+
+ // Now display the page
+ $template->assign_vars(array(
+ 'L_EXPLAIN' => ($mode == 'pm_reports') ? $user->lang['MCP_PM_REPORTS_OPEN_EXPLAIN'] : $user->lang['MCP_PM_REPORTS_CLOSED_EXPLAIN'],
+ 'L_TITLE' => ($mode == 'pm_reports') ? $user->lang['MCP_PM_REPORTS_OPEN'] : $user->lang['MCP_PM_REPORTS_CLOSED'],
+
+ 'S_PM' => true,
+ 'S_MCP_ACTION' => $this->u_action,
+ 'S_CLOSED' => ($mode == 'pm_reports_closed') ? true : false,
+
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir", $total, $config['topics_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start),
+ 'TOTAL' => $total,
+ 'TOTAL_REPORTS' => ($total == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $total),
+ )
+ );
+
+ $this->tpl_name = 'mcp_reports';
+ break;
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php
new file mode 100644
index 0000000000..fa44e006dd
--- /dev/null
+++ b/phpBB/includes/mcp/mcp_post.php
@@ -0,0 +1,501 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Handling actions in post details screen
+*/
+function mcp_post_details($id, $mode, $action)
+{
+ global $phpEx, $phpbb_root_path, $config;
+ global $template, $db, $user, $auth, $cache;
+
+ $user->add_lang('posting');
+
+ $post_id = request_var('p', 0);
+ $start = request_var('start', 0);
+
+ // Get post data
+ $post_info = get_post_data(array($post_id), false, true);
+
+ add_form_key('mcp_post_details');
+
+ if (!sizeof($post_info))
+ {
+ trigger_error('POST_NOT_EXIST');
+ }
+
+ $post_info = $post_info[$post_id];
+ $url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . extra_url());
+
+ switch ($action)
+ {
+ case 'whois':
+
+ if ($auth->acl_get('m_info', $post_info['forum_id']))
+ {
+ $ip = request_var('ip', '');
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ $template->assign_vars(array(
+ 'RETURN_POST' => sprintf($user->lang['RETURN_POST'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;mode=$mode&amp;p=$post_id") . '">', '</a>'),
+ 'U_RETURN_POST' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;mode=$mode&amp;p=$post_id"),
+ 'L_RETURN_POST' => sprintf($user->lang['RETURN_POST'], '', ''),
+ 'WHOIS' => user_ipwhois($ip),
+ ));
+ }
+
+ // We're done with the whois page so return
+ return;
+
+ break;
+
+ case 'chgposter':
+ case 'chgposter_ip':
+
+ if ($action == 'chgposter')
+ {
+ $username = request_var('username', '', true);
+ $sql_where = "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
+ }
+ else
+ {
+ $new_user_id = request_var('u', 0);
+ $sql_where = 'user_id = ' . $new_user_id;
+ }
+
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $sql_where;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error('NO_USER');
+ }
+
+ if ($auth->acl_get('m_chgposter', $post_info['forum_id']))
+ {
+ if (check_form_key('mcp_post_details'))
+ {
+ change_poster($post_info, $row);
+ }
+ else
+ {
+ trigger_error('FORM_INVALID');
+ }
+ }
+
+ break;
+ }
+
+ // Set some vars
+ $users_ary = $usernames_ary = array();
+ $attachments = $extensions = array();
+ $post_id = $post_info['post_id'];
+ $topic_tracking_info = array();
+
+ // Get topic tracking info
+ if ($config['load_db_lastread'])
+ {
+ $tmp_topic_data = array($post_info['topic_id'] => $post_info);
+ $topic_tracking_info = get_topic_tracking($post_info['forum_id'], $post_info['topic_id'], $tmp_topic_data, array($post_info['forum_id'] => $post_info['forum_mark_time']));
+ unset($tmp_topic_data);
+ }
+ else
+ {
+ $topic_tracking_info = get_complete_topic_tracking($post_info['forum_id'], $post_info['topic_id']);
+ }
+
+ $post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false;
+
+ // Process message, leave it uncensored
+ $message = $post_info['post_text'];
+
+ if ($post_info['bbcode_bitfield'])
+ {
+ include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+ $bbcode = new bbcode($post_info['bbcode_bitfield']);
+ $bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']);
+ }
+
+ $message = bbcode_nl2br($message);
+ $message = smiley_text($message);
+
+ if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
+ {
+ $extensions = $cache->obtain_attach_extensions($post_info['forum_id']);
+
+ $sql = 'SELECT *
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE post_msg_id = ' . $post_id . '
+ AND in_message = 0
+ ORDER BY filetime DESC, post_msg_id ASC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $attachments[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($attachments))
+ {
+ $update_count = array();
+ parse_attachments($post_info['forum_id'], $message, $attachments, $update_count);
+ }
+
+ // Display not already displayed Attachments for this post, we already parsed them. ;)
+ if (!empty($attachments))
+ {
+ $template->assign_var('S_HAS_ATTACHMENTS', true);
+
+ foreach ($attachments as $attachment)
+ {
+ $template->assign_block_vars('attachment', array(
+ 'DISPLAY_ATTACHMENT' => $attachment)
+ );
+ }
+ }
+ }
+
+ $template->assign_vars(array(
+ 'U_MCP_ACTION' => "$url&amp;i=main&amp;quickmod=1", // Use this for mode paramaters
+ 'U_POST_ACTION' => "$url&amp;i=$id&amp;mode=post_details", // Use this for action parameters
+ 'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;p=$post_id&amp;f={$post_info['forum_id']}"),
+
+ 'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
+ 'S_CAN_CHGPOSTER' => $auth->acl_get('m_chgposter', $post_info['forum_id']),
+ 'S_CAN_LOCK_POST' => $auth->acl_get('m_lock', $post_info['forum_id']),
+ 'S_CAN_DELETE_POST' => $auth->acl_get('m_delete', $post_info['forum_id']),
+
+ 'S_POST_REPORTED' => ($post_info['post_reported']) ? true : false,
+ 'S_POST_UNAPPROVED' => (!$post_info['post_approved']) ? true : false,
+ 'S_POST_LOCKED' => ($post_info['post_edit_locked']) ? true : false,
+ 'S_USER_NOTES' => true,
+ 'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,
+
+ 'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&amp;f={$post_info['forum_id']}&amp;p={$post_info['post_id']}") : '',
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=mcp_chgposter&amp;field=username&amp;select_single=true'),
+ 'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
+ 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
+ 'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $post_info['user_id']),
+ 'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $post_info['user_id']) : '',
+ 'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
+ 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']),
+
+ 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'NEW_POST') : $user->img('icon_post_target', 'POST'),
+
+ 'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$post_info['forum_id']}&amp;p=$post_id") . "#p$post_id\">", '</a>'),
+ 'RETURN_FORUM' => sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", "f={$post_info['forum_id']}&amp;start={$start}") . '">', '</a>'),
+ 'REPORTED_IMG' => $user->img('icon_topic_reported', $user->lang['POST_REPORTED']),
+ 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', $user->lang['POST_UNAPPROVED']),
+ 'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']),
+ 'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
+
+ 'POST_AUTHOR_FULL' => get_username_string('full', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+
+ 'POST_PREVIEW' => $message,
+ 'POST_SUBJECT' => $post_info['post_subject'],
+ 'POST_DATE' => $user->format_date($post_info['post_time']),
+ 'POST_IP' => $post_info['poster_ip'],
+ 'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
+ 'POST_ID' => $post_info['post_id'],
+
+ 'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? "$url&amp;i=$id&amp;mode=$mode&amp;lookup={$post_info['poster_ip']}#ip" : '',
+ 'U_WHOIS' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;mode=$mode&amp;action=whois&amp;p=$post_id&amp;ip={$post_info['poster_ip']}") : '',
+ ));
+
+ // Get User Notes
+ $log_data = array();
+ $log_count = 0;
+ view_log('user', $log_data, $log_count, $config['posts_per_page'], 0, 0, 0, $post_info['user_id']);
+
+ if ($log_count)
+ {
+ $template->assign_var('S_USER_NOTES', true);
+
+ foreach ($log_data as $row)
+ {
+ $template->assign_block_vars('usernotes', array(
+ 'REPORT_BY' => $row['username_full'],
+ 'REPORT_AT' => $user->format_date($row['time']),
+ 'ACTION' => $row['action'],
+ 'ID' => $row['id'])
+ );
+ }
+ }
+
+ // Get Reports
+ if ($auth->acl_get('m_', $post_info['forum_id']))
+ {
+ $sql = 'SELECT r.*, re.*, u.user_id, u.username
+ FROM ' . REPORTS_TABLE . ' r, ' . USERS_TABLE . ' u, ' . REPORTS_REASONS_TABLE . " re
+ WHERE r.post_id = $post_id
+ AND r.reason_id = re.reason_id
+ AND u.user_id = r.user_id
+ ORDER BY r.report_time DESC";
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $template->assign_var('S_SHOW_REPORTS', true);
+
+ do
+ {
+ // If the reason is defined within the language file, we will use the localized version, else just use the database entry...
+ if (isset($user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])]) && isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])]))
+ {
+ $row['reson_description'] = $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])];
+ $row['reason_title'] = $user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])];
+ }
+
+ $template->assign_block_vars('reports', array(
+ 'REPORT_ID' => $row['report_id'],
+ 'REASON_TITLE' => $row['reason_title'],
+ 'REASON_DESC' => $row['reason_description'],
+ 'REPORTER' => ($row['user_id'] != ANONYMOUS) ? $row['username'] : $user->lang['GUEST'],
+ 'U_REPORTER' => ($row['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']) : '',
+ 'USER_NOTIFY' => ($row['user_notify']) ? true : false,
+ 'REPORT_TIME' => $user->format_date($row['report_time']),
+ 'REPORT_TEXT' => bbcode_nl2br(trim($row['report_text'])),
+ ));
+ }
+ while ($row = $db->sql_fetchrow($result));
+ }
+ $db->sql_freeresult($result);
+ }
+
+ // Get IP
+ if ($auth->acl_get('m_info', $post_info['forum_id']))
+ {
+ $rdns_ip_num = request_var('rdns', '');
+
+ if ($rdns_ip_num != 'all')
+ {
+ $template->assign_vars(array(
+ 'U_LOOKUP_ALL' => "$url&amp;i=main&amp;mode=post_details&amp;rdns=all")
+ );
+ }
+
+ // Get other users who've posted under this IP
+ $sql = 'SELECT poster_id, COUNT(poster_id) as postings
+ FROM ' . POSTS_TABLE . "
+ WHERE poster_ip = '" . $db->sql_escape($post_info['poster_ip']) . "'
+ GROUP BY poster_id
+ ORDER BY postings DESC";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // Fill the user select list with users who have posted under this IP
+ if ($row['poster_id'] != $post_info['poster_id'])
+ {
+ $users_ary[$row['poster_id']] = $row;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($users_ary))
+ {
+ // Get the usernames
+ $sql = 'SELECT user_id, username
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', array_keys($users_ary));
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $users_ary[$row['user_id']]['username'] = $row['username'];
+ $usernames_ary[utf8_clean_string($row['username'])] = $users_ary[$row['user_id']];
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($users_ary as $user_id => $user_row)
+ {
+ $template->assign_block_vars('userrow', array(
+ 'USERNAME' => ($user_id == ANONYMOUS) ? $user->lang['GUEST'] : $user_row['username'],
+ 'NUM_POSTS' => $user_row['postings'],
+ 'L_POST_S' => ($user_row['postings'] == 1) ? $user->lang['POST'] : $user->lang['POSTS'],
+
+ 'U_PROFILE' => ($user_id == ANONYMOUS) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $user_id),
+ 'U_SEARCHPOSTS' => append_sid("{$phpbb_root_path}search.$phpEx", 'author_id=' . $user_id . '&amp;sr=topics'))
+ );
+ }
+ }
+
+ // Get other IP's this user has posted under
+
+ // A compound index on poster_id, poster_ip (posts table) would help speed up this query a lot,
+ // but the extra size is only valuable if there are persons having more than a thousands posts.
+ // This is better left to the really really big forums.
+
+ $sql = 'SELECT poster_ip, COUNT(poster_ip) AS postings
+ FROM ' . POSTS_TABLE . '
+ WHERE poster_id = ' . $post_info['poster_id'] . "
+ GROUP BY poster_ip
+ ORDER BY postings DESC";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $hostname = (($rdns_ip_num == $row['poster_ip'] || $rdns_ip_num == 'all') && $row['poster_ip']) ? @gethostbyaddr($row['poster_ip']) : '';
+
+ $template->assign_block_vars('iprow', array(
+ 'IP' => $row['poster_ip'],
+ 'HOSTNAME' => $hostname,
+ 'NUM_POSTS' => $row['postings'],
+ 'L_POST_S' => ($row['postings'] == 1) ? $user->lang['POST'] : $user->lang['POSTS'],
+
+ 'U_LOOKUP_IP' => ($rdns_ip_num == $row['poster_ip'] || $rdns_ip_num == 'all') ? '' : "$url&amp;i=$id&amp;mode=post_details&amp;rdns={$row['poster_ip']}#ip",
+ 'U_WHOIS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;mode=$mode&amp;action=whois&amp;p=$post_id&amp;ip={$row['poster_ip']}"))
+ );
+ }
+ $db->sql_freeresult($result);
+
+ $user_select = '';
+
+ if (sizeof($usernames_ary))
+ {
+ ksort($usernames_ary);
+
+ foreach ($usernames_ary as $row)
+ {
+ $user_select .= '<option value="' . $row['poster_id'] . '">' . $row['username'] . "</option>\n";
+ }
+ }
+
+ $template->assign_var('S_USER_SELECT', $user_select);
+ }
+
+}
+
+/**
+* Change a post's poster
+*/
+function change_poster(&$post_info, $userdata)
+{
+ global $auth, $db, $config, $phpbb_root_path, $phpEx;
+
+ if (empty($userdata) || $userdata['user_id'] == $post_info['user_id'])
+ {
+ return;
+ }
+
+ $post_id = $post_info['post_id'];
+
+ $sql = 'UPDATE ' . POSTS_TABLE . "
+ SET poster_id = {$userdata['user_id']}
+ WHERE post_id = $post_id";
+ $db->sql_query($sql);
+
+ // Resync topic/forum if needed
+ if ($post_info['topic_last_post_id'] == $post_id || $post_info['forum_last_post_id'] == $post_id || $post_info['topic_first_post_id'] == $post_id)
+ {
+ sync('topic', 'topic_id', $post_info['topic_id'], false, false);
+ sync('forum', 'forum_id', $post_info['forum_id'], false, false);
+ }
+
+ // Adjust post counts... only if the post is approved (else, it was not added the users post count anyway)
+ if ($post_info['post_postcount'] && $post_info['post_approved'])
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_posts = user_posts - 1
+ WHERE user_id = ' . $post_info['user_id'] .'
+ AND user_posts > 0';
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_posts = user_posts + 1
+ WHERE user_id = ' . $userdata['user_id'];
+ $db->sql_query($sql);
+ }
+
+ // Add posted to information for this topic for the new user
+ markread('post', $post_info['forum_id'], $post_info['topic_id'], time(), $userdata['user_id']);
+
+ // Remove the dotted topic option if the old user has no more posts within this topic
+ if ($config['load_db_track'] && $post_info['user_id'] != ANONYMOUS)
+ {
+ $sql = 'SELECT topic_id
+ FROM ' . POSTS_TABLE . '
+ WHERE topic_id = ' . $post_info['topic_id'] . '
+ AND poster_id = ' . $post_info['user_id'];
+ $result = $db->sql_query_limit($sql, 1);
+ $topic_id = (int) $db->sql_fetchfield('topic_id');
+ $db->sql_freeresult($result);
+
+ if (!$topic_id)
+ {
+ $sql = 'DELETE FROM ' . TOPICS_POSTED_TABLE . '
+ WHERE user_id = ' . $post_info['user_id'] . '
+ AND topic_id = ' . $post_info['topic_id'];
+ $db->sql_query($sql);
+ }
+ }
+
+ // change the poster_id within the attachments table, else the data becomes out of sync and errors displayed because of wrong ownership
+ if ($post_info['post_attachment'])
+ {
+ $sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
+ SET poster_id = ' . $userdata['user_id'] . '
+ WHERE poster_id = ' . $post_info['user_id'] . '
+ AND post_msg_id = ' . $post_info['post_id'] . '
+ AND topic_id = ' . $post_info['topic_id'];
+ $db->sql_query($sql);
+ }
+
+ // refresh search cache of this post
+ $search_type = basename($config['search_type']);
+
+ if (file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
+ {
+ require("{$phpbb_root_path}includes/search/$search_type.$phpEx");
+
+ // We do some additional checks in the module to ensure it can actually be utilised
+ $error = false;
+ $search = new $search_type($error);
+
+ if (!$error && method_exists($search, 'destroy_cache'))
+ {
+ $search->destroy_cache(array(), array($post_info['user_id'], $userdata['user_id']));
+ }
+ }
+
+ $from_username = $post_info['username'];
+ $to_username = $userdata['username'];
+
+ // Renew post info
+ $post_info = get_post_data(array($post_id), false, true);
+
+ if (!sizeof($post_info))
+ {
+ trigger_error('POST_NOT_EXIST');
+ }
+
+ $post_info = $post_info[$post_id];
+
+ // Now add log entry
+ add_log('mod', $post_info['forum_id'], $post_info['topic_id'], 'LOG_MCP_CHANGE_POSTER', $post_info['topic_title'], $from_username, $to_username);
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
new file mode 100644
index 0000000000..3783aadab5
--- /dev/null
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -0,0 +1,992 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* mcp_queue
+* Handling the moderation queue
+* @package mcp
+*/
+class mcp_queue
+{
+ var $p_master;
+ var $u_action;
+
+ function mcp_queue(&$p_master)
+ {
+ $this->p_master = &$p_master;
+ }
+
+ function main($id, $mode)
+ {
+ global $auth, $db, $user, $template, $cache;
+ global $config, $phpbb_root_path, $phpEx, $action;
+
+ include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+
+ $forum_id = request_var('f', 0);
+ $start = request_var('start', 0);
+
+ $this->page_title = 'MCP_QUEUE';
+
+ switch ($action)
+ {
+ case 'approve':
+ case 'disapprove':
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+
+ $post_id_list = request_var('post_id_list', array(0));
+
+ if (!sizeof($post_id_list))
+ {
+ trigger_error('NO_POST_SELECTED');
+ }
+
+ if ($action == 'approve')
+ {
+ approve_post($post_id_list, 'queue', $mode);
+ }
+ else
+ {
+ disapprove_post($post_id_list, 'queue', $mode);
+ }
+
+ break;
+ }
+
+ switch ($mode)
+ {
+ case 'approve_details':
+
+ $this->tpl_name = 'mcp_post';
+
+ $user->add_lang(array('posting', 'viewtopic'));
+
+ $post_id = request_var('p', 0);
+ $topic_id = request_var('t', 0);
+
+ if ($topic_id)
+ {
+ $topic_info = get_topic_data(array($topic_id), 'm_approve');
+ if (isset($topic_info[$topic_id]['topic_first_post_id']))
+ {
+ $post_id = (int) $topic_info[$topic_id]['topic_first_post_id'];
+ }
+ else
+ {
+ $topic_id = 0;
+ }
+ }
+
+ $post_info = get_post_data(array($post_id), 'm_approve', true);
+
+ if (!sizeof($post_info))
+ {
+ trigger_error('NO_POST_SELECTED');
+ }
+
+ $post_info = $post_info[$post_id];
+
+ if ($post_info['topic_first_post_id'] != $post_id && topic_review($post_info['topic_id'], $post_info['forum_id'], 'topic_review', 0, false))
+ {
+ $template->assign_vars(array(
+ 'S_TOPIC_REVIEW' => true,
+ 'TOPIC_TITLE' => $post_info['topic_title'])
+ );
+ }
+
+ $extensions = $attachments = $topic_tracking_info = array();
+
+ // Get topic tracking info
+ if ($config['load_db_lastread'])
+ {
+ $tmp_topic_data = array($post_info['topic_id'] => $post_info);
+ $topic_tracking_info = get_topic_tracking($post_info['forum_id'], $post_info['topic_id'], $tmp_topic_data, array($post_info['forum_id'] => $post_info['forum_mark_time']));
+ unset($tmp_topic_data);
+ }
+ else
+ {
+ $topic_tracking_info = get_complete_topic_tracking($post_info['forum_id'], $post_info['topic_id']);
+ }
+
+ $post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false;
+
+ // Process message, leave it uncensored
+ $message = $post_info['post_text'];
+
+ if ($post_info['bbcode_bitfield'])
+ {
+ include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+ $bbcode = new bbcode($post_info['bbcode_bitfield']);
+ $bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']);
+ }
+
+ $message = bbcode_nl2br($message);
+ $message = smiley_text($message);
+
+ if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
+ {
+ $extensions = $cache->obtain_attach_extensions($post_info['forum_id']);
+
+ $sql = 'SELECT *
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE post_msg_id = ' . $post_id . '
+ AND in_message = 0
+ ORDER BY filetime DESC, post_msg_id ASC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $attachments[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($attachments))
+ {
+ $update_count = array();
+ parse_attachments($post_info['forum_id'], $message, $attachments, $update_count);
+ }
+
+ // Display not already displayed Attachments for this post, we already parsed them. ;)
+ if (!empty($attachments))
+ {
+ $template->assign_var('S_HAS_ATTACHMENTS', true);
+
+ foreach ($attachments as $attachment)
+ {
+ $template->assign_block_vars('attachment', array(
+ 'DISPLAY_ATTACHMENT' => $attachment)
+ );
+ }
+ }
+ }
+
+ $post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;p=' . $post_info['post_id'] . '#p' . $post_info['post_id']);
+ $topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']);
+
+ $template->assign_vars(array(
+ 'S_MCP_QUEUE' => true,
+ 'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;p=$post_id&amp;f=$forum_id"),
+ 'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
+ 'S_POST_REPORTED' => $post_info['post_reported'],
+ 'S_POST_UNAPPROVED' => !$post_info['post_approved'],
+ 'S_POST_LOCKED' => $post_info['post_edit_locked'],
+ 'S_USER_NOTES' => true,
+
+ 'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&amp;f={$post_info['forum_id']}&amp;p={$post_info['post_id']}") : '',
+ 'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
+ 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
+ 'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $post_info['user_id']),
+ 'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $post_info['user_id']) : '',
+ 'U_VIEW_POST' => $post_url,
+ 'U_VIEW_TOPIC' => $topic_url,
+
+ 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'NEW_POST') : $user->img('icon_post_target', 'POST'),
+
+ 'RETURN_QUEUE' => sprintf($user->lang['RETURN_QUEUE'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue' . (($topic_id) ? '&amp;mode=unapproved_topics' : '&amp;mode=unapproved_posts')) . "&amp;start=$start\">", '</a>'),
+ 'RETURN_POST' => sprintf($user->lang['RETURN_POST'], '<a href="' . $post_url . '">', '</a>'),
+ 'RETURN_TOPIC_SIMPLE' => sprintf($user->lang['RETURN_TOPIC_SIMPLE'], '<a href="' . $topic_url . '">', '</a>'),
+ 'REPORTED_IMG' => $user->img('icon_topic_reported', $user->lang['POST_REPORTED']),
+ 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', $user->lang['POST_UNAPPROVED']),
+ 'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']),
+
+ 'POST_AUTHOR_FULL' => get_username_string('full', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+
+ 'POST_PREVIEW' => $message,
+ 'POST_SUBJECT' => $post_info['post_subject'],
+ 'POST_DATE' => $user->format_date($post_info['post_time']),
+ 'POST_IP' => $post_info['poster_ip'],
+ 'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
+ 'POST_ID' => $post_info['post_id'],
+
+ 'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id . '&amp;lookup=' . $post_info['poster_ip']) . '#ip' : '',
+ ));
+
+ break;
+
+ case 'unapproved_topics':
+ case 'unapproved_posts':
+ $user->add_lang(array('viewtopic', 'viewforum'));
+
+ $topic_id = request_var('t', 0);
+ $forum_info = array();
+
+ if ($topic_id)
+ {
+ $topic_info = get_topic_data(array($topic_id));
+
+ if (!sizeof($topic_info))
+ {
+ trigger_error('TOPIC_NOT_EXIST');
+ }
+
+ $topic_info = $topic_info[$topic_id];
+ $forum_id = $topic_info['forum_id'];
+ }
+
+ $forum_list_approve = get_forum_list('m_approve', false, true);
+ $forum_list_read = array_flip(get_forum_list('f_read', true, true)); // Flipped so we can isset() the forum IDs
+
+ // Remove forums we cannot read
+ foreach ($forum_list_approve as $k => $forum_data)
+ {
+ if (!isset($forum_list_read[$forum_data['forum_id']]))
+ {
+ unset($forum_list_approve[$k]);
+ }
+ }
+ unset($forum_list_read);
+
+ if (!$forum_id)
+ {
+ $forum_list = array();
+ foreach ($forum_list_approve as $row)
+ {
+ $forum_list[] = $row['forum_id'];
+ }
+
+ if (!sizeof($forum_list))
+ {
+ trigger_error('NOT_MODERATOR');
+ }
+
+ $global_id = $forum_list[0];
+
+ $forum_list = implode(', ', $forum_list);
+
+ $sql = 'SELECT SUM(forum_topics) as sum_forum_topics
+ FROM ' . FORUMS_TABLE . "
+ WHERE forum_id IN (0, $forum_list)";
+ $result = $db->sql_query($sql);
+ $forum_info['forum_topics'] = (int) $db->sql_fetchfield('sum_forum_topics');
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $forum_info = get_forum_data(array($forum_id), 'm_approve');
+
+ if (!sizeof($forum_info))
+ {
+ trigger_error('NOT_MODERATOR');
+ }
+
+ $forum_info = $forum_info[$forum_id];
+ $forum_list = $forum_id;
+ $global_id = $forum_id;
+ }
+
+ $forum_options = '<option value="0"' . (($forum_id == 0) ? ' selected="selected"' : '') . '>' . $user->lang['ALL_FORUMS'] . '</option>';
+ foreach ($forum_list_approve as $row)
+ {
+ $forum_options .= '<option value="' . $row['forum_id'] . '"' . (($forum_id == $row['forum_id']) ? ' selected="selected"' : '') . '>' . str_repeat('&nbsp; &nbsp;', $row['padding']) . $row['forum_name'] . '</option>';
+ }
+
+ $sort_days = $total = 0;
+ $sort_key = $sort_dir = '';
+ $sort_by_sql = $sort_order_sql = array();
+ mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
+
+ $forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total;
+ $limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
+
+ $forum_names = array();
+
+ if ($mode == 'unapproved_posts')
+ {
+ $sql = 'SELECT p.post_id
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t' . (($sort_order_sql[0] == 'u') ? ', ' . USERS_TABLE . ' u' : '') . "
+ WHERE p.forum_id IN (0, $forum_list)
+ AND p.post_approved = 0
+ " . (($sort_order_sql[0] == 'u') ? 'AND u.user_id = p.poster_id' : '') . '
+ ' . (($topic_id) ? 'AND p.topic_id = ' . $topic_id : '') . "
+ AND t.topic_id = p.topic_id
+ AND t.topic_first_post_id <> p.post_id
+ $limit_time_sql
+ ORDER BY $sort_order_sql";
+ $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
+
+ $i = 0;
+ $post_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_ids[] = $row['post_id'];
+ $row_num[$row['post_id']] = $i++;
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($post_ids))
+ {
+ $sql = 'SELECT t.topic_id, t.topic_title, t.forum_id, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, u.username_clean, u.user_colour
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u
+ WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
+ AND t.topic_id = p.topic_id
+ AND u.user_id = p.poster_id
+ ORDER BY ' . $sort_order_sql;
+ $result = $db->sql_query($sql);
+
+ $post_data = $rowset = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['forum_id'])
+ {
+ $forum_names[] = $row['forum_id'];
+ }
+ $post_data[$row['post_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($post_ids as $post_id)
+ {
+ $rowset[] = $post_data[$post_id];
+ }
+ unset($post_data, $post_ids);
+ }
+ else
+ {
+ $rowset = array();
+ }
+ }
+ else
+ {
+ $sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, t.topic_title AS post_subject, t.topic_time AS post_time, t.topic_poster AS poster_id, t.topic_first_post_id AS post_id, t.topic_first_poster_name AS username, t.topic_first_poster_colour AS user_colour
+ FROM ' . TOPICS_TABLE . " t
+ WHERE forum_id IN (0, $forum_list)
+ AND topic_approved = 0
+ $limit_time_sql
+ ORDER BY $sort_order_sql";
+ $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
+
+ $rowset = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['forum_id'])
+ {
+ $forum_names[] = $row['forum_id'];
+ }
+ $rowset[] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (sizeof($forum_names))
+ {
+ // Select the names for the forum_ids
+ $sql = 'SELECT forum_id, forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_names);
+ $result = $db->sql_query($sql, 3600);
+
+ $forum_names = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_names[$row['forum_id']] = $row['forum_name'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ foreach ($rowset as $row)
+ {
+ $global_topic = ($row['forum_id']) ? false : true;
+ if ($global_topic)
+ {
+ $row['forum_id'] = $global_id;
+ }
+
+ if (empty($row['post_username']))
+ {
+ $row['post_username'] = $user->lang['GUEST'];
+ }
+
+ $template->assign_block_vars('postrow', array(
+ 'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']),
+ 'U_VIEWFORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '',
+ 'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;p=' . $row['post_id']) . (($mode == 'unapproved_posts') ? '#p' . $row['post_id'] : ''),
+ 'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;start=$start&amp;mode=approve_details&amp;f={$row['forum_id']}&amp;p={$row['post_id']}" . (($mode == 'unapproved_topics') ? "&amp;t={$row['topic_id']}" : '')),
+
+ 'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+
+ 'POST_ID' => $row['post_id'],
+ 'FORUM_NAME' => (!$global_topic) ? $forum_names[$row['forum_id']] : $user->lang['GLOBAL_ANNOUNCEMENT'],
+ 'POST_SUBJECT' => $row['post_subject'],
+ 'TOPIC_TITLE' => $row['topic_title'],
+ 'POST_TIME' => $user->format_date($row['post_time']))
+ );
+ }
+ unset($rowset, $forum_names);
+
+ // Now display the page
+ $template->assign_vars(array(
+ 'L_DISPLAY_ITEMS' => ($mode == 'unapproved_posts') ? $user->lang['DISPLAY_POSTS'] : $user->lang['DISPLAY_TOPICS'],
+ 'L_EXPLAIN' => ($mode == 'unapproved_posts') ? $user->lang['MCP_QUEUE_UNAPPROVED_POSTS_EXPLAIN'] : $user->lang['MCP_QUEUE_UNAPPROVED_TOPICS_EXPLAIN'],
+ 'L_TITLE' => ($mode == 'unapproved_posts') ? $user->lang['MCP_QUEUE_UNAPPROVED_POSTS'] : $user->lang['MCP_QUEUE_UNAPPROVED_TOPICS'],
+ 'L_ONLY_TOPIC' => ($topic_id) ? sprintf($user->lang['ONLY_TOPIC'], $topic_info['topic_title']) : '',
+
+ 'S_FORUM_OPTIONS' => $forum_options,
+ 'S_MCP_ACTION' => build_url(array('t', 'f', 'sd', 'st', 'sk')),
+ 'S_TOPICS' => ($mode == 'unapproved_posts') ? false : true,
+
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;f=$forum_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir", $total, $config['topics_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start),
+ 'TOPIC_ID' => $topic_id,
+ 'TOTAL' => ($total == 1) ? (($mode == 'unapproved_posts') ? $user->lang['VIEW_TOPIC_POST'] : $user->lang['VIEW_FORUM_TOPIC']) : sprintf((($mode == 'unapproved_posts') ? $user->lang['VIEW_TOPIC_POSTS'] : $user->lang['VIEW_FORUM_TOPICS']), $total),
+ ));
+
+ $this->tpl_name = 'mcp_queue';
+ break;
+ }
+ }
+}
+
+/**
+* Approve Post/Topic
+*/
+function approve_post($post_id_list, $id, $mode)
+{
+ global $db, $template, $user, $config;
+ global $phpEx, $phpbb_root_path;
+
+ if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
+ {
+ trigger_error('NOT_AUTHORISED');
+ }
+
+ $redirect = request_var('redirect', build_url(array('quickmod')));
+ $success_msg = '';
+
+ $s_hidden_fields = build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'post_id_list' => $post_id_list,
+ 'action' => 'approve',
+ 'redirect' => $redirect)
+ );
+
+ $post_info = get_post_data($post_id_list, 'm_approve');
+
+ if (confirm_box(true))
+ {
+ $notify_poster = (isset($_REQUEST['notify_poster'])) ? true : false;
+
+ // If Topic -> total_topics = total_topics+1, total_posts = total_posts+1, forum_topics = forum_topics+1, forum_posts = forum_posts+1
+ // If Post -> total_posts = total_posts+1, forum_posts = forum_posts+1, topic_replies = topic_replies+1
+
+ $total_topics = $total_posts = 0;
+ $topic_approve_sql = $post_approve_sql = $topic_id_list = $forum_id_list = $approve_log = array();
+ $user_posts_sql = $post_approved_list = array();
+
+ foreach ($post_info as $post_id => $post_data)
+ {
+ if ($post_data['post_approved'])
+ {
+ $post_approved_list[] = $post_id;
+ continue;
+ }
+
+ $topic_id_list[$post_data['topic_id']] = 1;
+
+ if ($post_data['forum_id'])
+ {
+ $forum_id_list[$post_data['forum_id']] = 1;
+ }
+
+ // User post update (we do not care about topic or post, since user posts are strictly connected to posts)
+ // But we care about forums where post counts get not increased. ;)
+ if ($post_data['post_postcount'])
+ {
+ $user_posts_sql[$post_data['poster_id']] = (empty($user_posts_sql[$post_data['poster_id']])) ? 1 : $user_posts_sql[$post_data['poster_id']] + 1;
+ }
+
+ // Topic or Post. ;)
+ if ($post_data['topic_first_post_id'] == $post_id)
+ {
+ if ($post_data['forum_id'])
+ {
+ $total_topics++;
+ }
+ $topic_approve_sql[] = $post_data['topic_id'];
+
+ $approve_log[] = array(
+ 'type' => 'topic',
+ 'post_subject' => $post_data['post_subject'],
+ 'forum_id' => $post_data['forum_id'],
+ 'topic_id' => $post_data['topic_id'],
+ );
+ }
+ else
+ {
+ $approve_log[] = array(
+ 'type' => 'post',
+ 'post_subject' => $post_data['post_subject'],
+ 'forum_id' => $post_data['forum_id'],
+ 'topic_id' => $post_data['topic_id'],
+ );
+ }
+
+ if ($post_data['forum_id'])
+ {
+ $total_posts++;
+
+ // Increment by topic_replies if we approve a topic...
+ // This works because we do not adjust the topic_replies when re-approving a topic after an edit.
+ if ($post_data['topic_first_post_id'] == $post_id && $post_data['topic_replies'])
+ {
+ $total_posts += $post_data['topic_replies'];
+ }
+ }
+
+ $post_approve_sql[] = $post_id;
+ }
+
+ $post_id_list = array_values(array_diff($post_id_list, $post_approved_list));
+ for ($i = 0, $size = sizeof($post_approved_list); $i < $size; $i++)
+ {
+ unset($post_info[$post_approved_list[$i]]);
+ }
+
+ if (sizeof($topic_approve_sql))
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_approved = 1
+ WHERE ' . $db->sql_in_set('topic_id', $topic_approve_sql);
+ $db->sql_query($sql);
+ }
+
+ if (sizeof($post_approve_sql))
+ {
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET post_approved = 1
+ WHERE ' . $db->sql_in_set('post_id', $post_approve_sql);
+ $db->sql_query($sql);
+ }
+
+ unset($topic_approve_sql, $post_approve_sql);
+
+ foreach ($approve_log as $log_data)
+ {
+ add_log('mod', $log_data['forum_id'], $log_data['topic_id'], ($log_data['type'] == 'topic') ? 'LOG_TOPIC_APPROVED' : 'LOG_POST_APPROVED', $log_data['post_subject']);
+ }
+
+ if (sizeof($user_posts_sql))
+ {
+ // Try to minimize the query count by merging users with the same post count additions
+ $user_posts_update = array();
+
+ foreach ($user_posts_sql as $user_id => $user_posts)
+ {
+ $user_posts_update[$user_posts][] = $user_id;
+ }
+
+ foreach ($user_posts_update as $user_posts => $user_id_ary)
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_posts = user_posts + ' . $user_posts . '
+ WHERE ' . $db->sql_in_set('user_id', $user_id_ary);
+ $db->sql_query($sql);
+ }
+ }
+
+ if ($total_topics)
+ {
+ set_config_count('num_topics', $total_topics, true);
+ }
+
+ if ($total_posts)
+ {
+ set_config_count('num_posts', $total_posts, true);
+ }
+
+ sync('topic', 'topic_id', array_keys($topic_id_list), true);
+ sync('forum', 'forum_id', array_keys($forum_id_list), true, true);
+ unset($topic_id_list, $forum_id_list);
+
+ $messenger = new messenger();
+
+ // Notify Poster?
+ if ($notify_poster)
+ {
+ foreach ($post_info as $post_id => $post_data)
+ {
+ if ($post_data['poster_id'] == ANONYMOUS)
+ {
+ continue;
+ }
+
+ $email_template = ($post_data['post_id'] == $post_data['topic_first_post_id'] && $post_data['post_id'] == $post_data['topic_last_post_id']) ? 'topic_approved' : 'post_approved';
+
+ $messenger->template($email_template, $post_data['user_lang']);
+
+ $messenger->to($post_data['user_email'], $post_data['username']);
+ $messenger->im($post_data['user_jabber'], $post_data['username']);
+
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($post_data['username']),
+ 'POST_SUBJECT' => htmlspecialchars_decode(censor_text($post_data['post_subject'])),
+ 'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($post_data['topic_title'])),
+
+ 'U_VIEW_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f={$post_data['forum_id']}&t={$post_data['topic_id']}&e=0",
+ 'U_VIEW_POST' => generate_board_url() . "/viewtopic.$phpEx?f={$post_data['forum_id']}&t={$post_data['topic_id']}&p=$post_id&e=$post_id")
+ );
+
+ $messenger->send($post_data['user_notify_type']);
+ }
+ }
+
+ $messenger->save_queue();
+
+ // Send out normal user notifications
+ $email_sig = str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']);
+
+ foreach ($post_info as $post_id => $post_data)
+ {
+ if ($post_id == $post_data['topic_first_post_id'] && $post_id == $post_data['topic_last_post_id'])
+ {
+ // Forum Notifications
+ user_notification('post', $post_data['topic_title'], $post_data['topic_title'], $post_data['forum_name'], $post_data['forum_id'], $post_data['topic_id'], $post_id);
+ }
+ else
+ {
+ // Topic Notifications
+ user_notification('reply', $post_data['post_subject'], $post_data['topic_title'], $post_data['forum_name'], $post_data['forum_id'], $post_data['topic_id'], $post_id);
+ }
+ }
+
+ if (sizeof($post_id_list) == 1)
+ {
+ $post_data = $post_info[$post_id_list[0]];
+ $post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$post_data['forum_id']}&amp;t={$post_data['topic_id']}&amp;p={$post_data['post_id']}") . '#p' . $post_data['post_id'];
+ }
+ unset($post_info);
+
+ if ($total_topics)
+ {
+ $success_msg = ($total_topics == 1) ? 'TOPIC_APPROVED_SUCCESS' : 'TOPICS_APPROVED_SUCCESS';
+ }
+ else
+ {
+ $success_msg = (sizeof($post_id_list) + sizeof($post_approved_list) == 1) ? 'POST_APPROVED_SUCCESS' : 'POSTS_APPROVED_SUCCESS';
+ }
+ }
+ else
+ {
+ $show_notify = false;
+
+ foreach ($post_info as $post_data)
+ {
+ if ($post_data['poster_id'] == ANONYMOUS)
+ {
+ continue;
+ }
+ else
+ {
+ $show_notify = true;
+ break;
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_NOTIFY_POSTER' => $show_notify,
+ 'S_APPROVE' => true)
+ );
+
+ confirm_box(false, 'APPROVE_POST' . ((sizeof($post_id_list) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_approve.html');
+ }
+
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
+
+ if (!$success_msg)
+ {
+ redirect($redirect);
+ }
+ else
+ {
+ meta_refresh(3, $redirect);
+
+ // If approving one post, also give links back to post...
+ $add_message = '';
+ if (sizeof($post_id_list) == 1 && !empty($post_url))
+ {
+ $add_message = '<br /><br />' . sprintf($user->lang['RETURN_POST'], '<a href="' . $post_url . '">', '</a>');
+ }
+
+ trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], "<a href=\"$redirect\">", '</a>') . $add_message);
+ }
+}
+
+/**
+* Disapprove Post/Topic
+*/
+function disapprove_post($post_id_list, $id, $mode)
+{
+ global $db, $template, $user, $config;
+ global $phpEx, $phpbb_root_path;
+
+ if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
+ {
+ trigger_error('NOT_AUTHORISED');
+ }
+
+ $redirect = request_var('redirect', build_url(array('t', 'mode', 'quickmod')) . "&amp;mode=$mode");
+ $reason = utf8_normalize_nfc(request_var('reason', '', true));
+ $reason_id = request_var('reason_id', 0);
+ $success_msg = $additional_msg = '';
+
+ $s_hidden_fields = build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'post_id_list' => $post_id_list,
+ 'action' => 'disapprove',
+ 'redirect' => $redirect)
+ );
+
+ $notify_poster = (isset($_REQUEST['notify_poster'])) ? true : false;
+ $disapprove_reason = '';
+
+ if ($reason_id)
+ {
+ $sql = 'SELECT reason_title, reason_description
+ FROM ' . REPORTS_REASONS_TABLE . "
+ WHERE reason_id = $reason_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row || (!$reason && strtolower($row['reason_title']) == 'other'))
+ {
+ $additional_msg = $user->lang['NO_REASON_DISAPPROVAL'];
+ unset($_POST['confirm']);
+ }
+ else
+ {
+ // If the reason is defined within the language file, we will use the localized version, else just use the database entry...
+ $disapprove_reason = (strtolower($row['reason_title']) != 'other') ? ((isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])])) ? $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])] : $row['reason_description']) : '';
+ $disapprove_reason .= ($reason) ? "\n\n" . $reason : '';
+
+ if (isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])]))
+ {
+ $disapprove_reason_lang = strtoupper($row['reason_title']);
+ }
+
+ $email_disapprove_reason = $disapprove_reason;
+ }
+ }
+
+ $post_info = get_post_data($post_id_list, 'm_approve');
+
+ if (confirm_box(true))
+ {
+ $disapprove_log = $disapprove_log_topics = $disapprove_log_posts = array();
+ $topic_replies_real = $post_disapprove_list = array();
+
+ // Build a list of posts to be unapproved and get the related topics real replies count
+ foreach ($post_info as $post_id => $post_data)
+ {
+ $post_disapprove_list[$post_id] = $post_data['topic_id'];
+ if (!isset($topic_replies_real[$post_data['topic_id']]))
+ {
+ $topic_replies_real[$post_data['topic_id']] = $post_data['topic_replies_real'];
+ }
+ }
+
+ // Now we build the log array
+ foreach ($post_disapprove_list as $post_id => $topic_id)
+ {
+ // If the count of disapproved posts for the topic is greater
+ // than topic's real replies count, the whole topic is disapproved/deleted
+ if (sizeof(array_keys($post_disapprove_list, $topic_id)) > $topic_replies_real[$topic_id])
+ {
+ // Don't write the log more than once for every topic
+ if (!isset($disapprove_log_topics[$topic_id]))
+ {
+ // Build disapproved topics log
+ $disapprove_log_topics[$topic_id] = array(
+ 'type' => 'topic',
+ 'post_subject' => $post_info[$post_id]['topic_title'],
+ 'forum_id' => $post_info[$post_id]['forum_id'],
+ 'topic_id' => 0, // useless to log a topic id, as it will be deleted
+ );
+ }
+ }
+ else
+ {
+ // Build disapproved posts log
+ $disapprove_log_posts[] = array(
+ 'type' => 'post',
+ 'post_subject' => $post_info[$post_id]['post_subject'],
+ 'forum_id' => $post_info[$post_id]['forum_id'],
+ 'topic_id' => $post_info[$post_id]['topic_id'],
+ );
+
+ }
+ }
+
+ // Get disapproved posts/topics counts separately
+ $num_disapproved_topics = sizeof($disapprove_log_topics);
+ $num_disapproved_posts = sizeof($disapprove_log_posts);
+
+ // Build the whole log
+ $disapprove_log = array_merge($disapprove_log_topics, $disapprove_log_posts);
+
+ // Unset unneeded arrays
+ unset($post_data, $disapprove_log_topics, $disapprove_log_posts);
+
+ // Let's do the job - delete disapproved posts
+ if (sizeof($post_disapprove_list))
+ {
+ if (!function_exists('delete_posts'))
+ {
+ include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+ }
+
+ // We do not check for permissions here, because the moderator allowed approval/disapproval should be allowed to delete the disapproved posts
+ // Note: function delete_posts triggers related forums/topics sync,
+ // so we don't need to call update_post_information later and to adjust real topic replies or forum topics count manually
+ delete_posts('post_id', array_keys($post_disapprove_list));
+
+ foreach ($disapprove_log as $log_data)
+ {
+ add_log('mod', $log_data['forum_id'], $log_data['topic_id'], ($log_data['type'] == 'topic') ? 'LOG_TOPIC_DISAPPROVED' : 'LOG_POST_DISAPPROVED', $log_data['post_subject'], $disapprove_reason);
+ }
+ }
+
+ $messenger = new messenger();
+
+ // Notify Poster?
+ if ($notify_poster)
+ {
+ $lang_reasons = array();
+
+ foreach ($post_info as $post_id => $post_data)
+ {
+ if ($post_data['poster_id'] == ANONYMOUS)
+ {
+ continue;
+ }
+
+ if (isset($disapprove_reason_lang))
+ {
+ // Okay we need to get the reason from the posters language
+ if (!isset($lang_reasons[$post_data['user_lang']]))
+ {
+ // Assign the current users translation as the default, this is not ideal but getting the board default adds another layer of complexity.
+ $lang_reasons[$post_data['user_lang']] = $user->lang['report_reasons']['DESCRIPTION'][$disapprove_reason_lang];
+
+ // Only load up the language pack if the language is different to the current one
+ if ($post_data['user_lang'] != $user->lang_name && file_exists($phpbb_root_path . '/language/' . $post_data['user_lang'] . '/mcp.' . $phpEx))
+ {
+ // Load up the language pack
+ $lang = array();
+ @include($phpbb_root_path . '/language/' . basename($post_data['user_lang']) . '/mcp.' . $phpEx);
+
+ // If we find the reason in this language pack use it
+ if (isset($lang['report_reasons']['DESCRIPTION'][$disapprove_reason_lang]))
+ {
+ $lang_reasons[$post_data['user_lang']] = $lang['report_reasons']['DESCRIPTION'][$disapprove_reason_lang];
+ }
+
+ unset($lang); // Free memory
+ }
+ }
+
+ $email_disapprove_reason = $lang_reasons[$post_data['user_lang']];
+ $email_disapprove_reason .= ($reason) ? "\n\n" . $reason : '';
+ }
+
+ $email_template = ($post_data['post_id'] == $post_data['topic_first_post_id'] && $post_data['post_id'] == $post_data['topic_last_post_id']) ? 'topic_disapproved' : 'post_disapproved';
+
+ $messenger->template($email_template, $post_data['user_lang']);
+
+ $messenger->to($post_data['user_email'], $post_data['username']);
+ $messenger->im($post_data['user_jabber'], $post_data['username']);
+
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($post_data['username']),
+ 'REASON' => htmlspecialchars_decode($email_disapprove_reason),
+ 'POST_SUBJECT' => htmlspecialchars_decode(censor_text($post_data['post_subject'])),
+ 'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($post_data['topic_title'])))
+ );
+
+ $messenger->send($post_data['user_notify_type']);
+ }
+
+ unset($lang_reasons);
+ }
+ unset($post_info, $disapprove_reason, $email_disapprove_reason, $disapprove_reason_lang);
+
+ $messenger->save_queue();
+
+ if ($num_disapproved_topics)
+ {
+ $success_msg = ($num_disapproved_topics == 1) ? 'TOPIC_DISAPPROVED_SUCCESS' : 'TOPICS_DISAPPROVED_SUCCESS';
+ }
+ else
+ {
+ $success_msg = ($num_disapproved_posts == 1) ? 'POST_DISAPPROVED_SUCCESS' : 'POSTS_DISAPPROVED_SUCCESS';
+ }
+ }
+ else
+ {
+ include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+
+ display_reasons($reason_id);
+
+ $show_notify = false;
+
+ foreach ($post_info as $post_data)
+ {
+ if ($post_data['poster_id'] == ANONYMOUS)
+ {
+ continue;
+ }
+ else
+ {
+ $show_notify = true;
+ break;
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_NOTIFY_POSTER' => $show_notify,
+ 'S_APPROVE' => false,
+ 'REASON' => $reason,
+ 'ADDITIONAL_MSG' => $additional_msg)
+ );
+
+ confirm_box(false, 'DISAPPROVE_POST' . ((sizeof($post_id_list) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_approve.html');
+ }
+
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
+
+ if (!$success_msg)
+ {
+ redirect($redirect);
+ }
+ else
+ {
+ meta_refresh(3, $redirect);
+ trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], "<a href=\"$redirect\">", '</a>'));
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
new file mode 100644
index 0000000000..7bed20187a
--- /dev/null
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -0,0 +1,726 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* mcp_reports
+* Handling the reports queue
+* @package mcp
+*/
+class mcp_reports
+{
+ var $p_master;
+ var $u_action;
+
+ function mcp_reports(&$p_master)
+ {
+ $this->p_master = &$p_master;
+ }
+
+ function main($id, $mode)
+ {
+ global $auth, $db, $user, $template, $cache;
+ global $config, $phpbb_root_path, $phpEx, $action;
+
+ include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+
+ $forum_id = request_var('f', 0);
+ $start = request_var('start', 0);
+
+ $this->page_title = 'MCP_REPORTS';
+
+ switch ($action)
+ {
+ case 'close':
+ case 'delete':
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+
+ $report_id_list = request_var('report_id_list', array(0));
+
+ if (!sizeof($report_id_list))
+ {
+ trigger_error('NO_REPORT_SELECTED');
+ }
+
+ close_report($report_id_list, $mode, $action);
+
+ break;
+ }
+
+ switch ($mode)
+ {
+ case 'report_details':
+
+ $user->add_lang(array('posting', 'viewforum', 'viewtopic'));
+
+ $post_id = request_var('p', 0);
+
+ // closed reports are accessed by report id
+ $report_id = request_var('r', 0);
+
+ $sql = 'SELECT r.post_id, r.user_id, r.report_id, r.report_closed, report_time, r.report_text, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour
+ FROM ' . REPORTS_TABLE . ' r, ' . REPORTS_REASONS_TABLE . ' rr, ' . USERS_TABLE . ' u
+ WHERE ' . (($report_id) ? 'r.report_id = ' . $report_id : "r.post_id = $post_id") . '
+ AND rr.reason_id = r.reason_id
+ AND r.user_id = u.user_id
+ AND r.pm_id = 0
+ ORDER BY report_closed ASC';
+ $result = $db->sql_query_limit($sql, 1);
+ $report = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$report)
+ {
+ trigger_error('NO_REPORT');
+ }
+
+ if (!$report_id && $report['report_closed'])
+ {
+ trigger_error('REPORT_CLOSED');
+ }
+
+ $post_id = $report['post_id'];
+ $report_id = $report['report_id'];
+
+ $post_info = get_post_data(array($post_id), 'm_report', true);
+
+ if (!sizeof($post_info))
+ {
+ trigger_error('NO_REPORT_SELECTED');
+ }
+
+ $post_info = $post_info[$post_id];
+
+ $reason = array('title' => $report['reason_title'], 'description' => $report['reason_description']);
+ if (isset($user->lang['report_reasons']['TITLE'][strtoupper($reason['title'])]) && isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($reason['title'])]))
+ {
+ $reason['description'] = $user->lang['report_reasons']['DESCRIPTION'][strtoupper($reason['title'])];
+ $reason['title'] = $user->lang['report_reasons']['TITLE'][strtoupper($reason['title'])];
+ }
+
+ if (topic_review($post_info['topic_id'], $post_info['forum_id'], 'topic_review', 0, false))
+ {
+ $template->assign_vars(array(
+ 'S_TOPIC_REVIEW' => true,
+ 'TOPIC_TITLE' => $post_info['topic_title'])
+ );
+ }
+
+ $topic_tracking_info = $extensions = $attachments = array();
+ // Get topic tracking info
+ if ($config['load_db_lastread'])
+ {
+ $tmp_topic_data = array($post_info['topic_id'] => $post_info);
+ $topic_tracking_info = get_topic_tracking($post_info['forum_id'], $post_info['topic_id'], $tmp_topic_data, array($post_info['forum_id'] => $post_info['forum_mark_time']));
+ unset($tmp_topic_data);
+ }
+ else
+ {
+ $topic_tracking_info = get_complete_topic_tracking($post_info['forum_id'], $post_info['topic_id']);
+ }
+
+ $post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false;
+
+ // Process message, leave it uncensored
+ $message = $post_info['post_text'];
+
+ if ($post_info['bbcode_bitfield'])
+ {
+ include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+ $bbcode = new bbcode($post_info['bbcode_bitfield']);
+ $bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']);
+ }
+
+ $message = bbcode_nl2br($message);
+ $message = smiley_text($message);
+
+ if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
+ {
+ $sql = 'SELECT *
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE post_msg_id = ' . $post_id . '
+ AND in_message = 0
+ ORDER BY filetime DESC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $attachments[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($attachments))
+ {
+ $update_count = array();
+ parse_attachments($post_info['forum_id'], $message, $attachments, $update_count);
+ }
+
+ // Display not already displayed Attachments for this post, we already parsed them. ;)
+ if (!empty($attachments))
+ {
+ $template->assign_var('S_HAS_ATTACHMENTS', true);
+
+ foreach ($attachments as $attachment)
+ {
+ $template->assign_block_vars('attachment', array(
+ 'DISPLAY_ATTACHMENT' => $attachment)
+ );
+ }
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_MCP_REPORT' => true,
+ 'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
+ 'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
+ 'S_POST_REPORTED' => $post_info['post_reported'],
+ 'S_POST_UNAPPROVED' => !$post_info['post_approved'],
+ 'S_POST_LOCKED' => $post_info['post_edit_locked'],
+ 'S_USER_NOTES' => true,
+
+ 'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&amp;f={$post_info['forum_id']}&amp;p={$post_info['post_id']}") : '',
+ 'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
+ 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
+ 'U_MCP_REPORTER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $report['user_id']),
+ 'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $post_info['user_id']),
+ 'U_MCP_WARN_REPORTER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $report['user_id']) : '',
+ 'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $post_info['user_id']) : '',
+ 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $post_info['forum_id']),
+ 'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
+ 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']),
+
+ 'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']),
+ 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'NEW_POST') : $user->img('icon_post_target', 'POST'),
+ 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', $user->lang['POST_UNAPPROVED']),
+
+ 'RETURN_REPORTS' => sprintf($user->lang['RETURN_REPORTS'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports' . (($post_info['post_reported']) ? '&amp;mode=reports' : '&amp;mode=reports_closed') . '&amp;start=' . $start . '&amp;f=' . $post_info['forum_id']) . '">', '</a>'),
+ 'REPORTED_IMG' => $user->img('icon_topic_reported', $user->lang['POST_REPORTED']),
+ 'REPORT_DATE' => $user->format_date($report['report_time']),
+ 'REPORT_ID' => $report_id,
+ 'REPORT_REASON_TITLE' => $reason['title'],
+ 'REPORT_REASON_DESCRIPTION' => $reason['description'],
+ 'REPORT_TEXT' => $report['report_text'],
+
+ 'POST_AUTHOR_FULL' => get_username_string('full', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']),
+
+ 'REPORTER_FULL' => get_username_string('full', $report['user_id'], $report['username'], $report['user_colour']),
+ 'REPORTER_COLOUR' => get_username_string('colour', $report['user_id'], $report['username'], $report['user_colour']),
+ 'REPORTER_NAME' => get_username_string('username', $report['user_id'], $report['username'], $report['user_colour']),
+ 'U_VIEW_REPORTER_PROFILE' => get_username_string('profile', $report['user_id'], $report['username'], $report['user_colour']),
+
+ 'POST_PREVIEW' => $message,
+ 'POST_SUBJECT' => ($post_info['post_subject']) ? $post_info['post_subject'] : $user->lang['NO_SUBJECT'],
+ 'POST_DATE' => $user->format_date($post_info['post_time']),
+ 'POST_IP' => $post_info['poster_ip'],
+ 'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
+ 'POST_ID' => $post_info['post_id'],
+
+ 'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&amp;r=' . $report_id . '&amp;p=' . $post_id . '&amp;f=' . $forum_id . '&amp;lookup=' . $post_info['poster_ip'] . '#ip' : '',
+ ));
+
+ $this->tpl_name = 'mcp_post';
+
+ break;
+
+ case 'reports':
+ case 'reports_closed':
+ $topic_id = request_var('t', 0);
+
+ $forum_info = array();
+ $forum_list_reports = get_forum_list('m_report', false, true);
+ $forum_list_read = array_flip(get_forum_list('f_read', true, true)); // Flipped so we can isset() the forum IDs
+
+ // Remove forums we cannot read
+ foreach ($forum_list_reports as $k => $forum_data)
+ {
+ if (!isset($forum_list_read[$forum_data['forum_id']]))
+ {
+ unset($forum_list_reports[$k]);
+ }
+ }
+ unset($forum_list_read);
+
+ if ($topic_id)
+ {
+ $topic_info = get_topic_data(array($topic_id));
+
+ if (!sizeof($topic_info))
+ {
+ trigger_error('TOPIC_NOT_EXIST');
+ }
+
+ if ($forum_id != $topic_info[$topic_id]['forum_id'])
+ {
+ $topic_id = 0;
+ }
+ else
+ {
+ $topic_info = $topic_info[$topic_id];
+ $forum_id = (int) $topic_info['forum_id'];
+ }
+ }
+
+ $forum_list = array();
+
+ if (!$forum_id)
+ {
+ foreach ($forum_list_reports as $row)
+ {
+ $forum_list[] = $row['forum_id'];
+ }
+
+ if (!sizeof($forum_list))
+ {
+ trigger_error('NOT_MODERATOR');
+ }
+
+ $global_id = $forum_list[0];
+
+ $sql = 'SELECT SUM(forum_topics) as sum_forum_topics
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_list);
+ $result = $db->sql_query($sql);
+ $forum_info['forum_topics'] = (int) $db->sql_fetchfield('sum_forum_topics');
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $forum_info = get_forum_data(array($forum_id), 'm_report');
+
+ if (!sizeof($forum_info))
+ {
+ trigger_error('NOT_MODERATOR');
+ }
+
+ $forum_info = $forum_info[$forum_id];
+ $forum_list = array($forum_id);
+ $global_id = $forum_id;
+ }
+
+ $forum_list[] = 0;
+ $forum_data = array();
+
+ $forum_options = '<option value="0"' . (($forum_id == 0) ? ' selected="selected"' : '') . '>' . $user->lang['ALL_FORUMS'] . '</option>';
+ foreach ($forum_list_reports as $row)
+ {
+ $forum_options .= '<option value="' . $row['forum_id'] . '"' . (($forum_id == $row['forum_id']) ? ' selected="selected"' : '') . '>' . str_repeat('&nbsp; &nbsp;', $row['padding']) . $row['forum_name'] . '</option>';
+ $forum_data[$row['forum_id']] = $row;
+ }
+ unset($forum_list_reports);
+
+ $sort_days = $total = 0;
+ $sort_key = $sort_dir = '';
+ $sort_by_sql = $sort_order_sql = array();
+ mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
+
+ $forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total;
+ $limit_time_sql = ($sort_days) ? 'AND r.report_time >= ' . (time() - ($sort_days * 86400)) : '';
+
+ if ($mode == 'reports')
+ {
+ $report_state = 'AND p.post_reported = 1 AND r.report_closed = 0';
+ }
+ else
+ {
+ $report_state = 'AND r.report_closed = 1';
+ }
+
+ $sql = 'SELECT r.report_id
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . REPORTS_TABLE . ' r ' . (($sort_order_sql[0] == 'u') ? ', ' . USERS_TABLE . ' u' : '') . (($sort_order_sql[0] == 'r') ? ', ' . USERS_TABLE . ' ru' : '') . '
+ WHERE ' . $db->sql_in_set('p.forum_id', $forum_list) . "
+ $report_state
+ AND r.post_id = p.post_id
+ " . (($sort_order_sql[0] == 'u') ? 'AND u.user_id = p.poster_id' : '') . '
+ ' . (($sort_order_sql[0] == 'r') ? 'AND ru.user_id = r.user_id' : '') . '
+ ' . (($topic_id) ? 'AND p.topic_id = ' . $topic_id : '') . "
+ AND t.topic_id = p.topic_id
+ AND r.pm_id = 0
+ $limit_time_sql
+ ORDER BY $sort_order_sql";
+ $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
+
+ $i = 0;
+ $report_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $report_ids[] = $row['report_id'];
+ $row_num[$row['report_id']] = $i++;
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($report_ids))
+ {
+ $sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, u.username_clean, u.user_colour, r.user_id as reporter_id, ru.username as reporter_name, ru.user_colour as reporter_colour, r.report_time, r.report_id
+ FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u, ' . USERS_TABLE . ' ru
+ WHERE ' . $db->sql_in_set('r.report_id', $report_ids) . '
+ AND t.topic_id = p.topic_id
+ AND r.post_id = p.post_id
+ AND u.user_id = p.poster_id
+ AND ru.user_id = r.user_id
+ AND r.pm_id = 0
+ ORDER BY ' . $sort_order_sql;
+ $result = $db->sql_query($sql);
+
+ $report_data = $rowset = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $global_topic = ($row['forum_id']) ? false : true;
+ if ($global_topic)
+ {
+ $row['forum_id'] = $global_id;
+ }
+
+ $template->assign_block_vars('postrow', array(
+ 'U_VIEWFORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '',
+ 'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;p=' . $row['post_id']) . '#p' . $row['post_id'],
+ 'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=reports&amp;start=$start&amp;mode=report_details&amp;f={$row['forum_id']}&amp;r={$row['report_id']}"),
+
+ 'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+
+ 'REPORTER_FULL' => get_username_string('full', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']),
+ 'REPORTER_COLOUR' => get_username_string('colour', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']),
+ 'REPORTER' => get_username_string('username', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']),
+ 'U_REPORTER' => get_username_string('profile', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']),
+
+ 'FORUM_NAME' => (!$global_topic) ? $forum_data[$row['forum_id']]['forum_name'] : $user->lang['GLOBAL_ANNOUNCEMENT'],
+ 'POST_ID' => $row['post_id'],
+ 'POST_SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'],
+ 'POST_TIME' => $user->format_date($row['post_time']),
+ 'REPORT_ID' => $row['report_id'],
+ 'REPORT_TIME' => $user->format_date($row['report_time']),
+ 'TOPIC_TITLE' => $row['topic_title'])
+ );
+ }
+ $db->sql_freeresult($result);
+ unset($report_ids, $row);
+ }
+
+ // Now display the page
+ $template->assign_vars(array(
+ 'L_EXPLAIN' => ($mode == 'reports') ? $user->lang['MCP_REPORTS_OPEN_EXPLAIN'] : $user->lang['MCP_REPORTS_CLOSED_EXPLAIN'],
+ 'L_TITLE' => ($mode == 'reports') ? $user->lang['MCP_REPORTS_OPEN'] : $user->lang['MCP_REPORTS_CLOSED'],
+ 'L_ONLY_TOPIC' => ($topic_id) ? sprintf($user->lang['ONLY_TOPIC'], $topic_info['topic_title']) : '',
+
+ 'S_MCP_ACTION' => $this->u_action,
+ 'S_FORUM_OPTIONS' => $forum_options,
+ 'S_CLOSED' => ($mode == 'reports_closed') ? true : false,
+
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;f=$forum_id&amp;t=$topic_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir", $total, $config['topics_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start),
+ 'TOPIC_ID' => $topic_id,
+ 'TOTAL' => $total,
+ 'TOTAL_REPORTS' => ($total == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $total),
+ )
+ );
+
+ $this->tpl_name = 'mcp_reports';
+ break;
+ }
+ }
+}
+
+/**
+* Closes a report
+*/
+function close_report($report_id_list, $mode, $action, $pm = false)
+{
+ global $db, $template, $user, $config, $auth;
+ global $phpEx, $phpbb_root_path;
+
+ $pm_where = ($pm) ? ' AND r.post_id = 0 ' : ' AND r.pm_id = 0 ';
+ $id_column = ($pm) ? 'pm_id' : 'post_id';
+ $module = ($pm) ? 'pm_reports' : 'reports';
+ $pm_prefix = ($pm) ? 'PM_' : '';
+
+ $sql = "SELECT r.$id_column
+ FROM " . REPORTS_TABLE . ' r
+ WHERE ' . $db->sql_in_set('r.report_id', $report_id_list) . $pm_where;
+ $result = $db->sql_query($sql);
+
+ $post_id_list = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_id_list[] = $row[$id_column];
+ }
+ $post_id_list = array_unique($post_id_list);
+
+ if ($pm)
+ {
+ if (!$auth->acl_getf_global('m_report'))
+ {
+ trigger_error('NOT_AUTHORISED');
+ }
+ }
+ else
+ {
+ if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_report')))
+ {
+ trigger_error('NOT_AUTHORISED');
+ }
+ }
+
+ if ($action == 'delete' && strpos($user->data['session_page'], 'mode=report_details') !== false)
+ {
+ $redirect = request_var('redirect', build_url(array('mode', 'r', 'quickmod')) . '&amp;mode=reports');
+ }
+ elseif ($action == 'delete' && strpos($user->data['session_page'], 'mode=pm_report_details') !== false)
+ {
+ $redirect = request_var('redirect', build_url(array('mode', 'r', 'quickmod')) . '&amp;mode=pm_reports');
+ }
+ else if ($action == 'close' && !request_var('r', 0))
+ {
+ $redirect = request_var('redirect', build_url(array('mode', 'p', 'quickmod')) . '&amp;mode=' . $module);
+ }
+ else
+ {
+ $redirect = request_var('redirect', build_url(array('quickmod')));
+ }
+ $success_msg = '';
+ $forum_ids = array();
+ $topic_ids = array();
+
+ $s_hidden_fields = build_hidden_fields(array(
+ 'i' => $module,
+ 'mode' => $mode,
+ 'report_id_list' => $report_id_list,
+ 'action' => $action,
+ 'redirect' => $redirect)
+ );
+
+ if (confirm_box(true))
+ {
+ $post_info = ($pm) ? get_pm_data($post_id_list) : get_post_data($post_id_list, 'm_report');
+
+ $sql = "SELECT r.report_id, r.$id_column, r.report_closed, r.user_id, r.user_notify, u.username, u.username_clean, u.user_email, u.user_jabber, u.user_lang, u.user_notify_type
+ FROM " . REPORTS_TABLE . ' r, ' . USERS_TABLE . ' u
+ WHERE ' . $db->sql_in_set('r.report_id', $report_id_list) . '
+ ' . (($action == 'close') ? 'AND r.report_closed = 0' : '') . '
+ AND r.user_id = u.user_id' . $pm_where;
+ $result = $db->sql_query($sql);
+
+ $reports = $close_report_posts = $close_report_topics = $notify_reporters = $report_id_list = array();
+ while ($report = $db->sql_fetchrow($result))
+ {
+ $reports[$report['report_id']] = $report;
+ $report_id_list[] = $report['report_id'];
+
+ if (!$report['report_closed'])
+ {
+ $close_report_posts[] = $report[$id_column];
+
+ if (!$pm)
+ {
+ $close_report_topics[] = $post_info[$report['post_id']]['topic_id'];
+ }
+ }
+
+ if ($report['user_notify'] && !$report['report_closed'])
+ {
+ $notify_reporters[$report['report_id']] = &$reports[$report['report_id']];
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($reports))
+ {
+ $close_report_posts = array_unique($close_report_posts);
+ $close_report_topics = array_unique($close_report_topics);
+
+ if (!$pm && sizeof($close_report_posts))
+ {
+ // Get a list of topics that still contain reported posts
+ $sql = 'SELECT DISTINCT topic_id
+ FROM ' . POSTS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $close_report_topics) . '
+ AND post_reported = 1
+ AND ' . $db->sql_in_set('post_id', $close_report_posts, true);
+ $result = $db->sql_query($sql);
+
+ $keep_report_topics = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $keep_report_topics[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $close_report_topics = array_diff($close_report_topics, $keep_report_topics);
+ unset($keep_report_topics);
+ }
+
+ $db->sql_transaction('begin');
+
+ if ($action == 'close')
+ {
+ $sql = 'UPDATE ' . REPORTS_TABLE . '
+ SET report_closed = 1
+ WHERE ' . $db->sql_in_set('report_id', $report_id_list);
+ }
+ else
+ {
+ $sql = 'DELETE FROM ' . REPORTS_TABLE . '
+ WHERE ' . $db->sql_in_set('report_id', $report_id_list);
+ }
+ $db->sql_query($sql);
+
+
+ if (sizeof($close_report_posts))
+ {
+ if ($pm)
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . '
+ SET message_reported = 0
+ WHERE ' . $db->sql_in_set('msg_id', $close_report_posts);
+ $db->sql_query($sql);
+
+ if ($action == 'delete')
+ {
+ delete_pm(ANONYMOUS, $close_report_posts, PRIVMSGS_INBOX);
+ }
+ }
+ else
+ {
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET post_reported = 0
+ WHERE ' . $db->sql_in_set('post_id', $close_report_posts);
+ $db->sql_query($sql);
+
+ if (sizeof($close_report_topics))
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_reported = 0
+ WHERE ' . $db->sql_in_set('topic_id', $close_report_topics) . '
+ OR ' . $db->sql_in_set('topic_moved_id', $close_report_topics);
+ $db->sql_query($sql);
+ }
+ }
+ }
+
+ $db->sql_transaction('commit');
+ }
+ unset($close_report_posts, $close_report_topics);
+
+ foreach ($reports as $report)
+ {
+ if ($pm)
+ {
+ add_log('mod', 0, 0, 'LOG_PM_REPORT_' . strtoupper($action) . 'D', $post_info[$report['pm_id']]['message_subject']);
+ }
+ else
+ {
+ add_log('mod', $post_info[$report['post_id']]['forum_id'], $post_info[$report['post_id']]['topic_id'], 'LOG_REPORT_' . strtoupper($action) . 'D', $post_info[$report['post_id']]['post_subject']);
+ }
+ }
+
+ $messenger = new messenger();
+
+ // Notify reporters
+ if (sizeof($notify_reporters))
+ {
+ foreach ($notify_reporters as $report_id => $reporter)
+ {
+ if ($reporter['user_id'] == ANONYMOUS)
+ {
+ continue;
+ }
+
+ $post_id = $reporter[$id_column];
+
+ $messenger->template((($pm) ? 'pm_report_' : 'report_') . $action . 'd', $reporter['user_lang']);
+
+ $messenger->to($reporter['user_email'], $reporter['username']);
+ $messenger->im($reporter['user_jabber'], $reporter['username']);
+
+ if ($pm)
+ {
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($reporter['username']),
+ 'CLOSER_NAME' => htmlspecialchars_decode($user->data['username']),
+ 'PM_SUBJECT' => htmlspecialchars_decode(censor_text($post_info[$post_id]['message_subject'])),
+ ));
+ }
+ else
+ {
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($reporter['username']),
+ 'CLOSER_NAME' => htmlspecialchars_decode($user->data['username']),
+ 'POST_SUBJECT' => htmlspecialchars_decode(censor_text($post_info[$post_id]['post_subject'])),
+ 'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($post_info[$post_id]['topic_title'])))
+ );
+ }
+
+ $messenger->send($reporter['user_notify_type']);
+ }
+ }
+
+ if (!$pm)
+ {
+ foreach ($post_info as $post)
+ {
+ $forum_ids[$post['forum_id']] = $post['forum_id'];
+ $topic_ids[$post['topic_id']] = $post['topic_id'];
+ }
+ }
+
+ unset($notify_reporters, $post_info, $reports);
+
+ $messenger->save_queue();
+
+ $success_msg = (sizeof($report_id_list) == 1) ? "{$pm_prefix}REPORT_" . strtoupper($action) . 'D_SUCCESS' : "{$pm_prefix}REPORTS_" . strtoupper($action) . 'D_SUCCESS';
+ }
+ else
+ {
+ confirm_box(false, $user->lang[strtoupper($action) . "_{$pm_prefix}REPORT" . ((sizeof($report_id_list) == 1) ? '' : 'S') . '_CONFIRM'], $s_hidden_fields);
+ }
+
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
+
+ if (!$success_msg)
+ {
+ redirect($redirect);
+ }
+ else
+ {
+ meta_refresh(3, $redirect);
+
+ $return_forum = '';
+ $return_topic = '';
+
+ if (!$pm)
+ {
+ if (sizeof($forum_ids) === 1)
+ {
+ $return_forum = sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . current($forum_ids)) . '">', '</a>') . '<br /><br />';
+ }
+
+ if (sizeof($topic_ids) === 1)
+ {
+ $return_topic = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . current($topic_ids) . '&amp;f=' . current($forum_ids)) . '">', '</a>') . '<br /><br />';
+ }
+ }
+
+ trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_forum . $return_topic . sprintf($user->lang['RETURN_PAGE'], "<a href=\"$redirect\">", '</a>'));
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
new file mode 100644
index 0000000000..abdb839e7b
--- /dev/null
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -0,0 +1,635 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* View topic in MCP
+*/
+function mcp_topic_view($id, $mode, $action)
+{
+ global $phpEx, $phpbb_root_path, $config;
+ global $template, $db, $user, $auth, $cache;
+
+ $url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . extra_url());
+
+ $user->add_lang('viewtopic');
+
+ $topic_id = request_var('t', 0);
+ $topic_info = get_topic_data(array($topic_id), false, true);
+
+ if (!sizeof($topic_info))
+ {
+ trigger_error('TOPIC_NOT_EXIST');
+ }
+
+ $topic_info = $topic_info[$topic_id];
+
+ // Set up some vars
+ $icon_id = request_var('icon', 0);
+ $subject = utf8_normalize_nfc(request_var('subject', '', true));
+ $start = request_var('start', 0);
+ $sort_days_old = request_var('st_old', 0);
+ $forum_id = request_var('f', 0);
+ $to_topic_id = request_var('to_topic_id', 0);
+ $to_forum_id = request_var('to_forum_id', 0);
+ $sort = isset($_POST['sort']) ? true : false;
+ $submitted_id_list = request_var('post_ids', array(0));
+ $checked_ids = $post_id_list = request_var('post_id_list', array(0));
+
+ // Split Topic?
+ if ($action == 'split_all' || $action == 'split_beyond')
+ {
+ if (!$sort)
+ {
+ split_topic($action, $topic_id, $to_forum_id, $subject);
+ }
+ $action = 'split';
+ }
+
+ // Merge Posts?
+ if ($action == 'merge_posts')
+ {
+ if (!$sort)
+ {
+ merge_posts($topic_id, $to_topic_id);
+ }
+ $action = 'merge';
+ }
+
+ if ($action == 'split' && !$subject)
+ {
+ $subject = $topic_info['topic_title'];
+ }
+
+ // Approve posts?
+ if ($action == 'approve' && $auth->acl_get('m_approve', $topic_info['forum_id']))
+ {
+ include($phpbb_root_path . 'includes/mcp/mcp_queue.' . $phpEx);
+ include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+
+ if (!sizeof($post_id_list))
+ {
+ trigger_error('NO_POST_SELECTED');
+ }
+
+ if (!$sort)
+ {
+ approve_post($post_id_list, $id, $mode);
+ }
+ }
+
+ // Jumpbox, sort selects and that kind of things
+ make_jumpbox($url . "&amp;i=$id&amp;mode=forum_view", $topic_info['forum_id'], false, 'm_', true);
+ $where_sql = ($action == 'reports') ? 'WHERE post_reported = 1 AND ' : 'WHERE';
+
+ $sort_days = $total = 0;
+ $sort_key = $sort_dir = '';
+ $sort_by_sql = $sort_order_sql = array();
+ mcp_sorting('viewtopic', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $topic_info['forum_id'], $topic_id, $where_sql);
+
+ $limit_time_sql = ($sort_days) ? 'AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
+
+ if ($total == -1)
+ {
+ $total = $topic_info['topic_replies'] + 1;
+ }
+
+ $posts_per_page = max(0, request_var('posts_per_page', intval($config['posts_per_page'])));
+ if ($posts_per_page == 0)
+ {
+ $posts_per_page = $total;
+ }
+
+ if ((!empty($sort_days_old) && $sort_days_old != $sort_days) || $total <= $posts_per_page)
+ {
+ $start = 0;
+ }
+
+ // Make sure $start is set to the last page if it exceeds the amount
+ if ($start < 0 || $start >= $total)
+ {
+ $start = ($start < 0) ? 0 : floor(($total - 1) / $posts_per_page) * $posts_per_page;
+ }
+
+ $sql = 'SELECT u.username, u.username_clean, u.user_colour, p.*
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
+ WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . '
+ p.topic_id = ' . $topic_id . ' ' .
+ ((!$auth->acl_get('m_approve', $topic_info['forum_id'])) ? ' AND p.post_approved = 1 ' : '') . '
+ AND p.poster_id = u.user_id ' .
+ $limit_time_sql . '
+ ORDER BY ' . $sort_order_sql;
+ $result = $db->sql_query_limit($sql, $posts_per_page, $start);
+
+ $rowset = $post_id_list = array();
+ $bbcode_bitfield = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $rowset[] = $row;
+ $post_id_list[] = $row['post_id'];
+ $bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
+ }
+ $db->sql_freeresult($result);
+
+ if ($bbcode_bitfield !== '')
+ {
+ include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+ $bbcode = new bbcode(base64_encode($bbcode_bitfield));
+ }
+
+ $topic_tracking_info = array();
+
+ // Get topic tracking info
+ if ($config['load_db_lastread'])
+ {
+ $tmp_topic_data = array($topic_id => $topic_info);
+ $topic_tracking_info = get_topic_tracking($topic_info['forum_id'], $topic_id, $tmp_topic_data, array($topic_info['forum_id'] => $topic_info['forum_mark_time']));
+ unset($tmp_topic_data);
+ }
+ else
+ {
+ $topic_tracking_info = get_complete_topic_tracking($topic_info['forum_id'], $topic_id);
+ }
+
+ $has_unapproved_posts = false;
+
+ // Grab extensions
+ $extensions = $attachments = array();
+ if ($topic_info['topic_attachment'] && sizeof($post_id_list))
+ {
+ $extensions = $cache->obtain_attach_extensions($topic_info['forum_id']);
+
+ // Get attachments...
+ if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $topic_info['forum_id']))
+ {
+ $sql = 'SELECT *
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('post_msg_id', $post_id_list) . '
+ AND in_message = 0
+ ORDER BY filetime DESC, post_msg_id ASC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $attachments[$row['post_msg_id']][] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+ }
+
+ foreach ($rowset as $i => $row)
+ {
+ $message = $row['post_text'];
+ $post_subject = ($row['post_subject'] != '') ? $row['post_subject'] : $topic_info['topic_title'];
+
+ if ($row['bbcode_bitfield'])
+ {
+ $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
+ }
+
+ $message = bbcode_nl2br($message);
+ $message = smiley_text($message);
+
+ if (!empty($attachments[$row['post_id']]))
+ {
+ $update_count = array();
+ parse_attachments($topic_info['forum_id'], $message, $attachments[$row['post_id']], $update_count);
+ }
+
+ if (!$row['post_approved'])
+ {
+ $has_unapproved_posts = true;
+ }
+
+ $post_unread = (isset($topic_tracking_info[$topic_id]) && $row['post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
+
+ $template->assign_block_vars('postrow', array(
+ 'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+
+ 'POST_DATE' => $user->format_date($row['post_time']),
+ 'POST_SUBJECT' => $post_subject,
+ 'MESSAGE' => $message,
+ 'POST_ID' => $row['post_id'],
+ 'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id) . '">', '</a>'),
+
+ 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'NEW_POST') : $user->img('icon_post_target', 'POST'),
+
+ 'S_POST_REPORTED' => ($row['post_reported']) ? true : false,
+ 'S_POST_UNAPPROVED' => ($row['post_approved']) ? false : true,
+ 'S_CHECKED' => (($submitted_id_list && !in_array(intval($row['post_id']), $submitted_id_list)) || in_array(intval($row['post_id']), $checked_ids)) ? true : false,
+ 'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
+
+ 'U_POST_DETAILS' => "$url&amp;i=$id&amp;p={$row['post_id']}&amp;mode=post_details" . (($forum_id) ? "&amp;f=$forum_id" : ''),
+ 'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $topic_info['forum_id'] . '&amp;p=' . $row['post_id']) : '',
+ 'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $topic_info['forum_id'] . '&amp;p=' . $row['post_id']) : '')
+ );
+
+ // Display not already displayed Attachments for this post, we already parsed them. ;)
+ if (!empty($attachments[$row['post_id']]))
+ {
+ foreach ($attachments[$row['post_id']] as $attachment)
+ {
+ $template->assign_block_vars('postrow.attachment', array(
+ 'DISPLAY_ATTACHMENT' => $attachment)
+ );
+ }
+ }
+
+ unset($rowset[$i]);
+ }
+
+ // Display topic icons for split topic
+ $s_topic_icons = false;
+
+ if ($auth->acl_gets('m_split', 'm_merge', (int) $topic_info['forum_id']))
+ {
+ include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+ $s_topic_icons = posting_gen_topic_icons('', $icon_id);
+
+ // Has the user selected a topic for merge?
+ if ($to_topic_id)
+ {
+ $to_topic_info = get_topic_data(array($to_topic_id), 'm_merge');
+
+ if (!sizeof($to_topic_info))
+ {
+ $to_topic_id = 0;
+ }
+ else
+ {
+ $to_topic_info = $to_topic_info[$to_topic_id];
+
+ if (!$to_topic_info['enable_icons'] || $auth->acl_get('!f_icons', $topic_info['forum_id']))
+ {
+ $s_topic_icons = false;
+ }
+ }
+ }
+ }
+
+ $s_hidden_fields = build_hidden_fields(array(
+ 'st_old' => $sort_days,
+ 'post_ids' => $post_id_list,
+ ));
+
+ $template->assign_vars(array(
+ 'TOPIC_TITLE' => $topic_info['topic_title'],
+ 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_info['forum_id'] . '&amp;t=' . $topic_info['topic_id']),
+
+ 'TO_TOPIC_ID' => $to_topic_id,
+ 'TO_TOPIC_INFO' => ($to_topic_id) ? sprintf($user->lang['YOU_SELECTED_TOPIC'], $to_topic_id, '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_topic_info['forum_id'] . '&amp;t=' . $to_topic_id) . '">' . $to_topic_info['topic_title'] . '</a>') : '',
+
+ 'SPLIT_SUBJECT' => $subject,
+ 'POSTS_PER_PAGE' => $posts_per_page,
+ 'ACTION' => $action,
+
+ 'REPORTED_IMG' => $user->img('icon_topic_reported', 'POST_REPORTED'),
+ 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'POST_UNAPPROVED'),
+ 'INFO_IMG' => $user->img('icon_post_info', 'VIEW_INFO'),
+
+ 'S_MCP_ACTION' => "$url&amp;i=$id&amp;mode=$mode&amp;action=$action&amp;start=$start",
+ 'S_FORUM_SELECT' => ($to_forum_id) ? make_forum_select($to_forum_id, false, false, true, true, true) : make_forum_select($topic_info['forum_id'], false, false, true, true, true),
+ 'S_CAN_SPLIT' => ($auth->acl_get('m_split', $topic_info['forum_id'])) ? true : false,
+ 'S_CAN_MERGE' => ($auth->acl_get('m_merge', $topic_info['forum_id'])) ? true : false,
+ 'S_CAN_DELETE' => ($auth->acl_get('m_delete', $topic_info['forum_id'])) ? true : false,
+ 'S_CAN_APPROVE' => ($has_unapproved_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false,
+ 'S_CAN_LOCK' => ($auth->acl_get('m_lock', $topic_info['forum_id'])) ? true : false,
+ 'S_CAN_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? true : false,
+ 'S_REPORT_VIEW' => ($action == 'reports') ? true : false,
+ 'S_MERGE_VIEW' => ($action == 'merge') ? true : false,
+ 'S_SPLIT_VIEW' => ($action == 'split') ? true : false,
+
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields,
+
+ 'S_SHOW_TOPIC_ICONS' => $s_topic_icons,
+ 'S_TOPIC_ICON' => $icon_id,
+
+ 'U_SELECT_TOPIC' => "$url&amp;i=$id&amp;mode=forum_view&amp;action=merge_select" . (($forum_id) ? "&amp;f=$forum_id" : ''),
+
+ 'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$topic_info['forum_id']}&amp;t={$topic_info['topic_id']}&amp;start=$start") . '">', '</a>'),
+ 'RETURN_FORUM' => sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", "f={$topic_info['forum_id']}&amp;start=$start") . '">', '</a>'),
+
+ 'PAGE_NUMBER' => on_page($total, $posts_per_page, $start),
+ 'PAGINATION' => (!$posts_per_page) ? '' : generate_pagination(append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;t={$topic_info['topic_id']}&amp;mode=$mode&amp;action=$action&amp;to_topic_id=$to_topic_id&amp;posts_per_page=$posts_per_page&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir"), $total, $posts_per_page, $start),
+ 'TOTAL_POSTS' => ($total == 1) ? $user->lang['VIEW_TOPIC_POST'] : sprintf($user->lang['VIEW_TOPIC_POSTS'], $total),
+ ));
+}
+
+/**
+* Split topic
+*/
+function split_topic($action, $topic_id, $to_forum_id, $subject)
+{
+ global $db, $template, $user, $phpEx, $phpbb_root_path, $auth, $config;
+
+ $post_id_list = request_var('post_id_list', array(0));
+ $forum_id = request_var('forum_id', 0);
+ $start = request_var('start', 0);
+
+ if (!sizeof($post_id_list))
+ {
+ $template->assign_var('MESSAGE', $user->lang['NO_POST_SELECTED']);
+ return;
+ }
+
+ if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_split')))
+ {
+ return;
+ }
+
+ $post_id = $post_id_list[0];
+ $post_info = get_post_data(array($post_id));
+
+ if (!sizeof($post_info))
+ {
+ $template->assign_var('MESSAGE', $user->lang['NO_POST_SELECTED']);
+ return;
+ }
+
+ $post_info = $post_info[$post_id];
+ $subject = trim($subject);
+
+ // Make some tests
+ if (!$subject)
+ {
+ $template->assign_var('MESSAGE', $user->lang['EMPTY_SUBJECT']);
+ return;
+ }
+
+ if ($to_forum_id <= 0)
+ {
+ $template->assign_var('MESSAGE', $user->lang['NO_DESTINATION_FORUM']);
+ return;
+ }
+
+ $forum_info = get_forum_data(array($to_forum_id), 'f_post');
+
+ if (!sizeof($forum_info))
+ {
+ $template->assign_var('MESSAGE', $user->lang['USER_CANNOT_POST']);
+ return;
+ }
+
+ $forum_info = $forum_info[$to_forum_id];
+
+ if ($forum_info['forum_type'] != FORUM_POST)
+ {
+ $template->assign_var('MESSAGE', $user->lang['FORUM_NOT_POSTABLE']);
+ return;
+ }
+
+ $redirect = request_var('redirect', build_url(array('quickmod')));
+
+ $s_hidden_fields = build_hidden_fields(array(
+ 'i' => 'main',
+ 'post_id_list' => $post_id_list,
+ 'f' => $forum_id,
+ 'mode' => 'topic_view',
+ 'start' => $start,
+ 'action' => $action,
+ 't' => $topic_id,
+ 'redirect' => $redirect,
+ 'subject' => $subject,
+ 'to_forum_id' => $to_forum_id,
+ 'icon' => request_var('icon', 0))
+ );
+ $success_msg = $return_link = '';
+
+ if (confirm_box(true))
+ {
+ if ($action == 'split_beyond')
+ {
+ $sort_days = $total = 0;
+ $sort_key = $sort_dir = '';
+ $sort_by_sql = $sort_order_sql = array();
+ mcp_sorting('viewtopic', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
+
+ $limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
+
+ if ($sort_order_sql[0] == 'u')
+ {
+ $sql = 'SELECT p.post_id, p.forum_id, p.post_approved
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
+ WHERE p.topic_id = $topic_id
+ AND p.poster_id = u.user_id
+ $limit_time_sql
+ ORDER BY $sort_order_sql";
+ }
+ else
+ {
+ $sql = 'SELECT p.post_id, p.forum_id, p.post_approved
+ FROM ' . POSTS_TABLE . " p
+ WHERE p.topic_id = $topic_id
+ $limit_time_sql
+ ORDER BY $sort_order_sql";
+ }
+ $result = $db->sql_query_limit($sql, 0, $start);
+
+ $store = false;
+ $post_id_list = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // If split from selected post (split_beyond), we split the unapproved items too.
+ if (!$row['post_approved'] && !$auth->acl_get('m_approve', $row['forum_id']))
+ {
+// continue;
+ }
+
+ // Start to store post_ids as soon as we see the first post that was selected
+ if ($row['post_id'] == $post_id)
+ {
+ $store = true;
+ }
+
+ if ($store)
+ {
+ $post_id_list[] = $row['post_id'];
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (!sizeof($post_id_list))
+ {
+ trigger_error('NO_POST_SELECTED');
+ }
+
+ $icon_id = request_var('icon', 0);
+
+ $sql_ary = array(
+ 'forum_id' => $to_forum_id,
+ 'topic_title' => $subject,
+ 'icon_id' => $icon_id,
+ 'topic_approved'=> 1
+ );
+
+ $sql = 'INSERT INTO ' . TOPICS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ $db->sql_query($sql);
+
+ $to_topic_id = $db->sql_nextid();
+ move_posts($post_id_list, $to_topic_id);
+
+ $topic_info = get_topic_data(array($topic_id));
+ $topic_info = $topic_info[$topic_id];
+
+ add_log('mod', $to_forum_id, $to_topic_id, 'LOG_SPLIT_DESTINATION', $subject);
+ add_log('mod', $forum_id, $topic_id, 'LOG_SPLIT_SOURCE', $topic_info['topic_title']);
+
+ // Change topic title of first post
+ $sql = 'UPDATE ' . POSTS_TABLE . "
+ SET post_subject = '" . $db->sql_escape($subject) . "'
+ WHERE post_id = {$post_id_list[0]}";
+ $db->sql_query($sql);
+
+ $success_msg = 'TOPIC_SPLIT_SUCCESS';
+
+ // Update forum statistics
+ set_config_count('num_topics', 1, true);
+
+ // Link back to both topics
+ $return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
+ }
+ else
+ {
+ confirm_box(false, ($action == 'split_all') ? 'SPLIT_TOPIC_ALL' : 'SPLIT_TOPIC_BEYOND', $s_hidden_fields);
+ }
+
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
+
+ if (!$success_msg)
+ {
+ return;
+ }
+ else
+ {
+ meta_refresh(3, append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$to_forum_id&amp;t=$to_topic_id"));
+ trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
+ }
+}
+
+/**
+* Merge selected posts into selected topic
+*/
+function merge_posts($topic_id, $to_topic_id)
+{
+ global $db, $template, $user, $phpEx, $phpbb_root_path, $auth;
+
+ if (!$to_topic_id)
+ {
+ $template->assign_var('MESSAGE', $user->lang['NO_FINAL_TOPIC_SELECTED']);
+ return;
+ }
+
+ $topic_data = get_topic_data(array($to_topic_id), 'm_merge');
+
+ if (!sizeof($topic_data))
+ {
+ $template->assign_var('MESSAGE', $user->lang['NO_FINAL_TOPIC_SELECTED']);
+ return;
+ }
+
+ $topic_data = $topic_data[$to_topic_id];
+
+ $post_id_list = request_var('post_id_list', array(0));
+ $start = request_var('start', 0);
+
+ if (!sizeof($post_id_list))
+ {
+ $template->assign_var('MESSAGE', $user->lang['NO_POST_SELECTED']);
+ return;
+ }
+
+ if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_merge')))
+ {
+ return;
+ }
+
+ $redirect = request_var('redirect', build_url(array('quickmod')));
+
+ $s_hidden_fields = build_hidden_fields(array(
+ 'i' => 'main',
+ 'post_id_list' => $post_id_list,
+ 'to_topic_id' => $to_topic_id,
+ 'mode' => 'topic_view',
+ 'action' => 'merge_posts',
+ 'start' => $start,
+ 'redirect' => $redirect,
+ 't' => $topic_id)
+ );
+ $success_msg = $return_link = '';
+
+ if (confirm_box(true))
+ {
+ $to_forum_id = $topic_data['forum_id'];
+
+ move_posts($post_id_list, $to_topic_id);
+ add_log('mod', $to_forum_id, $to_topic_id, 'LOG_MERGE', $topic_data['topic_title']);
+
+ // Message and return links
+ $success_msg = 'POSTS_MERGED_SUCCESS';
+
+ // Does the original topic still exist? If yes, link back to it
+ $sql = 'SELECT forum_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_id = ' . $topic_id;
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ $return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $topic_id) . '">', '</a>');
+ }
+ else
+ {
+ // If the topic no longer exist, we will update the topic watch table.
+ // To not let it error out on users watching both topics, we just return on an error...
+ $db->sql_return_on_error(true);
+ $db->sql_query('UPDATE ' . TOPICS_WATCH_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE topic_id = ' . (int) $topic_id);
+ $db->sql_return_on_error(false);
+
+ $db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE topic_id = ' . (int) $topic_id);
+ }
+
+ // Link to the new topic
+ $return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
+ }
+ else
+ {
+ confirm_box(false, 'MERGE_POSTS', $s_hidden_fields);
+ }
+
+ $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
+
+ if (!$success_msg)
+ {
+ return;
+ }
+ else
+ {
+ meta_refresh(3, append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$to_forum_id&amp;t=$to_topic_id"));
+ trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php
new file mode 100644
index 0000000000..63e5b19155
--- /dev/null
+++ b/phpBB/includes/mcp/mcp_warn.php
@@ -0,0 +1,511 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* mcp_warn
+* Handling warning the users
+* @package mcp
+*/
+class mcp_warn
+{
+ var $p_master;
+ var $u_action;
+
+ function mcp_warn(&$p_master)
+ {
+ $this->p_master = &$p_master;
+ }
+
+ function main($id, $mode)
+ {
+ global $auth, $db, $user, $template;
+ global $config, $phpbb_root_path, $phpEx;
+
+ $action = request_var('action', array('' => ''));
+
+ if (is_array($action))
+ {
+ list($action, ) = each($action);
+ }
+
+ $this->page_title = 'MCP_WARN';
+
+ add_form_key('mcp_warn');
+
+ switch ($mode)
+ {
+ case 'front':
+ $this->mcp_warn_front_view();
+ $this->tpl_name = 'mcp_warn_front';
+ break;
+
+ case 'list':
+ $this->mcp_warn_list_view($action);
+ $this->tpl_name = 'mcp_warn_list';
+ break;
+
+ case 'warn_post':
+ $this->mcp_warn_post_view($action);
+ $this->tpl_name = 'mcp_warn_post';
+ break;
+
+ case 'warn_user':
+ $this->mcp_warn_user_view($action);
+ $this->tpl_name = 'mcp_warn_user';
+ break;
+ }
+ }
+
+ /**
+ * Generates the summary on the main page of the warning module
+ */
+ function mcp_warn_front_view()
+ {
+ global $phpEx, $phpbb_root_path, $config;
+ global $template, $db, $user, $auth;
+
+ $template->assign_vars(array(
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=mcp&amp;field=username&amp;select_single=true'),
+ 'U_POST_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user'),
+ ));
+
+ // Obtain a list of the 5 naughtiest users....
+ // These are the 5 users with the highest warning count
+ $highest = array();
+ $count = 0;
+
+ view_warned_users($highest, $count, 5);
+
+ foreach ($highest as $row)
+ {
+ $template->assign_block_vars('highest', array(
+ 'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $row['user_id']),
+
+ 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USERNAME' => $row['username'],
+ 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '',
+ 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']),
+
+ 'WARNING_TIME' => $user->format_date($row['user_last_warning']),
+ 'WARNINGS' => $row['user_warnings'],
+ ));
+ }
+
+ // And now the 5 most recent users to get in trouble
+ $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_warnings, w.warning_time
+ FROM ' . USERS_TABLE . ' u, ' . WARNINGS_TABLE . ' w
+ WHERE u.user_id = w.user_id
+ ORDER BY w.warning_time DESC';
+ $result = $db->sql_query_limit($sql, 5);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $template->assign_block_vars('latest', array(
+ 'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $row['user_id']),
+
+ 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USERNAME' => $row['username'],
+ 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '',
+ 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']),
+
+ 'WARNING_TIME' => $user->format_date($row['warning_time']),
+ 'WARNINGS' => $row['user_warnings'],
+ ));
+ }
+ $db->sql_freeresult($result);
+ }
+
+ /**
+ * Lists all users with warnings
+ */
+ function mcp_warn_list_view($action)
+ {
+ global $phpEx, $phpbb_root_path, $config;
+ global $template, $db, $user, $auth;
+
+ $user->add_lang('memberlist');
+
+ $start = request_var('start', 0);
+ $st = request_var('st', 0);
+ $sk = request_var('sk', 'b');
+ $sd = request_var('sd', 'd');
+
+ $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_DATE'], 'c' => $user->lang['SORT_WARNINGS']);
+ $sort_by_sql = array('a' => 'username_clean', 'b' => 'user_last_warning', 'c' => 'user_warnings');
+
+ $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
+ gen_sort_selects($limit_days, $sort_by_text, $st, $sk, $sd, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
+
+ // Define where and sort sql for use in displaying logs
+ $sql_where = ($st) ? (time() - ($st * 86400)) : 0;
+ $sql_sort = $sort_by_sql[$sk] . ' ' . (($sd == 'd') ? 'DESC' : 'ASC');
+
+ $users = array();
+ $user_count = 0;
+
+ view_warned_users($users, $user_count, $config['topics_per_page'], $start, $sql_where, $sql_sort);
+
+ foreach ($users as $row)
+ {
+ $template->assign_block_vars('user', array(
+ 'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $row['user_id']),
+
+ 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USERNAME' => $row['username'],
+ 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '',
+ 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']),
+
+ 'WARNING_TIME' => $user->format_date($row['user_last_warning']),
+ 'WARNINGS' => $row['user_warnings'],
+ ));
+ }
+
+ $template->assign_vars(array(
+ 'U_POST_ACTION' => $this->u_action,
+ 'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,
+ 'S_SELECT_SORT_DIR' => $s_sort_dir,
+ 'S_SELECT_SORT_KEY' => $s_sort_key,
+ 'S_SELECT_SORT_DAYS' => $s_limit_days,
+
+ 'PAGE_NUMBER' => on_page($user_count, $config['topics_per_page'], $start),
+ 'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}mcp.$phpEx", "i=warn&amp;mode=list&amp;st=$st&amp;sk=$sk&amp;sd=$sd"), $user_count, $config['topics_per_page'], $start),
+ 'TOTAL_USERS' => ($user_count == 1) ? $user->lang['LIST_USER'] : sprintf($user->lang['LIST_USERS'], $user_count),
+ ));
+ }
+
+ /**
+ * Handles warning the user when the warning is for a specific post
+ */
+ function mcp_warn_post_view($action)
+ {
+ global $phpEx, $phpbb_root_path, $config;
+ global $template, $db, $user, $auth;
+
+ $post_id = request_var('p', 0);
+ $forum_id = request_var('f', 0);
+ $notify = (isset($_REQUEST['notify_user'])) ? true : false;
+ $warning = utf8_normalize_nfc(request_var('warning', '', true));
+
+ $sql = 'SELECT u.*, p.*
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
+ WHERE p.post_id = $post_id
+ AND u.user_id = p.poster_id";
+ $result = $db->sql_query($sql);
+ $user_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$user_row)
+ {
+ trigger_error('NO_POST');
+ }
+
+ // There is no point issuing a warning to ignored users (ie anonymous and bots)
+ if ($user_row['user_type'] == USER_IGNORE)
+ {
+ trigger_error('CANNOT_WARN_ANONYMOUS');
+ }
+
+ // Prevent someone from warning themselves
+ if ($user_row['user_id'] == $user->data['user_id'])
+ {
+ trigger_error('CANNOT_WARN_SELF');
+ }
+
+ // Check if there is already a warning for this post to prevent multiple
+ // warnings for the same offence
+ $sql = 'SELECT post_id
+ FROM ' . WARNINGS_TABLE . "
+ WHERE post_id = $post_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ trigger_error('ALREADY_WARNED');
+ }
+
+ $user_id = $user_row['user_id'];
+
+ if (strpos($this->u_action, "&amp;f=$forum_id&amp;p=$post_id") === false)
+ {
+ $this->p_master->adjust_url("&amp;f=$forum_id&amp;p=$post_id");
+ $this->u_action .= "&amp;f=$forum_id&amp;p=$post_id";
+ }
+
+ // Check if can send a notification
+ if ($config['allow_privmsg'])
+ {
+ $auth2 = new auth();
+ $auth2->acl($user_row);
+ $s_can_notify = ($auth2->acl_get('u_readpm')) ? true : false;
+ unset($auth2);
+ }
+ else
+ {
+ $s_can_notify = false;
+ }
+
+ // Prevent against clever people
+ if ($notify && !$s_can_notify)
+ {
+ $notify = false;
+ }
+
+ if ($warning && $action == 'add_warning')
+ {
+ if (check_form_key('mcp_warn'))
+ {
+ add_warning($user_row, $warning, $notify, $post_id);
+ $msg = $user->lang['USER_WARNING_ADDED'];
+ }
+ else
+ {
+ $msg = $user->lang['FORM_INVALID'];
+ }
+ $redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=notes&amp;mode=user_notes&amp;u=$user_id");
+ meta_refresh(2, $redirect);
+ trigger_error($msg . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
+ }
+
+ // OK, they didn't submit a warning so lets build the page for them to do so
+
+ // We want to make the message available here as a reminder
+ // Parse the message and subject
+ $message = censor_text($user_row['post_text']);
+
+ // Second parse bbcode here
+ if ($user_row['bbcode_bitfield'])
+ {
+ include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+
+ $bbcode = new bbcode($user_row['bbcode_bitfield']);
+ $bbcode->bbcode_second_pass($message, $user_row['bbcode_uid'], $user_row['bbcode_bitfield']);
+ }
+
+ $message = bbcode_nl2br($message);
+ $message = smiley_text($message);
+
+ // Generate the appropriate user information for the user we are looking at
+ if (!function_exists('get_user_avatar'))
+ {
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ }
+
+ $rank_title = $rank_img = '';
+ $avatar_img = get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']);
+
+ $template->assign_vars(array(
+ 'U_POST_ACTION' => $this->u_action,
+
+ 'POST' => $message,
+ 'USERNAME' => $user_row['username'],
+ 'USER_COLOR' => (!empty($user_row['user_colour'])) ? $user_row['user_colour'] : '',
+ 'RANK_TITLE' => $rank_title,
+ 'JOINED' => $user->format_date($user_row['user_regdate']),
+ 'POSTS' => ($user_row['user_posts']) ? $user_row['user_posts'] : 0,
+ 'WARNINGS' => ($user_row['user_warnings']) ? $user_row['user_warnings'] : 0,
+
+ 'AVATAR_IMG' => $avatar_img,
+ 'RANK_IMG' => $rank_img,
+
+ 'L_WARNING_POST_DEFAULT' => sprintf($user->lang['WARNING_POST_DEFAULT'], generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&amp;p=$post_id#p$post_id"),
+
+ 'S_CAN_NOTIFY' => $s_can_notify,
+ ));
+ }
+
+ /**
+ * Handles warning the user
+ */
+ function mcp_warn_user_view($action)
+ {
+ global $phpEx, $phpbb_root_path, $config, $module;
+ global $template, $db, $user, $auth;
+
+ $user_id = request_var('u', 0);
+ $username = request_var('username', '', true);
+ $notify = (isset($_REQUEST['notify_user'])) ? true : false;
+ $warning = utf8_normalize_nfc(request_var('warning', '', true));
+
+ $sql_where = ($user_id) ? "user_id = $user_id" : "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
+
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $sql_where;
+ $result = $db->sql_query($sql);
+ $user_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$user_row)
+ {
+ trigger_error('NO_USER');
+ }
+
+ // Prevent someone from warning themselves
+ if ($user_row['user_id'] == $user->data['user_id'])
+ {
+ trigger_error('CANNOT_WARN_SELF');
+ }
+
+ $user_id = $user_row['user_id'];
+
+ if (strpos($this->u_action, "&amp;u=$user_id") === false)
+ {
+ $this->p_master->adjust_url('&amp;u=' . $user_id);
+ $this->u_action .= "&amp;u=$user_id";
+ }
+
+ // Check if can send a notification
+ if ($config['allow_privmsg'])
+ {
+ $auth2 = new auth();
+ $auth2->acl($user_row);
+ $s_can_notify = ($auth2->acl_get('u_readpm')) ? true : false;
+ unset($auth2);
+ }
+ else
+ {
+ $s_can_notify = false;
+ }
+
+ // Prevent against clever people
+ if ($notify && !$s_can_notify)
+ {
+ $notify = false;
+ }
+
+ if ($warning && $action == 'add_warning')
+ {
+ if (check_form_key('mcp_warn'))
+ {
+ add_warning($user_row, $warning, $notify);
+ $msg = $user->lang['USER_WARNING_ADDED'];
+ }
+ else
+ {
+ $msg = $user->lang['FORM_INVALID'];
+ }
+ $redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=notes&amp;mode=user_notes&amp;u=$user_id");
+ meta_refresh(2, $redirect);
+ trigger_error($msg . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
+ }
+
+ // Generate the appropriate user information for the user we are looking at
+ if (!function_exists('get_user_avatar'))
+ {
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ }
+
+ $rank_title = $rank_img = '';
+ $avatar_img = get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']);
+
+ // OK, they didn't submit a warning so lets build the page for them to do so
+ $template->assign_vars(array(
+ 'U_POST_ACTION' => $this->u_action,
+
+ 'RANK_TITLE' => $rank_title,
+ 'JOINED' => $user->format_date($user_row['user_regdate']),
+ 'POSTS' => ($user_row['user_posts']) ? $user_row['user_posts'] : 0,
+ 'WARNINGS' => ($user_row['user_warnings']) ? $user_row['user_warnings'] : 0,
+
+ 'USERNAME_FULL' => get_username_string('full', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),
+ 'USERNAME_COLOUR' => get_username_string('colour', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),
+ 'USERNAME' => get_username_string('username', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),
+ 'U_PROFILE' => get_username_string('profile', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),
+
+ 'AVATAR_IMG' => $avatar_img,
+ 'RANK_IMG' => $rank_img,
+
+ 'S_CAN_NOTIFY' => $s_can_notify,
+ ));
+
+ return $user_id;
+ }
+}
+
+/**
+* Insert the warning into the database
+*/
+function add_warning($user_row, $warning, $send_pm = true, $post_id = 0)
+{
+ global $phpEx, $phpbb_root_path, $config;
+ global $template, $db, $user, $auth;
+
+ if ($send_pm)
+ {
+ include_once($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
+ include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx);
+
+ $user_row['user_lang'] = (file_exists($phpbb_root_path . 'language/' . $user_row['user_lang'] . "/mcp.$phpEx")) ? $user_row['user_lang'] : $config['default_lang'];
+ include($phpbb_root_path . 'language/' . basename($user_row['user_lang']) . "/mcp.$phpEx");
+
+ $message_parser = new parse_message();
+
+ $message_parser->message = sprintf($lang['WARNING_PM_BODY'], $warning);
+ $message_parser->parse(true, true, true, false, false, true, true);
+
+ $pm_data = array(
+ 'from_user_id' => $user->data['user_id'],
+ 'from_user_ip' => $user->ip,
+ 'from_username' => $user->data['username'],
+ 'enable_sig' => false,
+ 'enable_bbcode' => true,
+ 'enable_smilies' => true,
+ 'enable_urls' => false,
+ 'icon_id' => 0,
+ 'bbcode_bitfield' => $message_parser->bbcode_bitfield,
+ 'bbcode_uid' => $message_parser->bbcode_uid,
+ 'message' => $message_parser->message,
+ 'address_list' => array('u' => array($user_row['user_id'] => 'to')),
+ );
+
+ submit_pm('post', $lang['WARNING_PM_SUBJECT'], $pm_data, false);
+ }
+
+ add_log('admin', 'LOG_USER_WARNING', $user_row['username']);
+ $log_id = add_log('user', $user_row['user_id'], 'LOG_USER_WARNING_BODY', $warning);
+
+ $sql_ary = array(
+ 'user_id' => $user_row['user_id'],
+ 'post_id' => $post_id,
+ 'log_id' => $log_id,
+ 'warning_time' => time(),
+ );
+
+ $db->sql_query('INSERT INTO ' . WARNINGS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_warnings = user_warnings + 1,
+ user_last_warning = ' . time() . '
+ WHERE user_id = ' . $user_row['user_id'];
+ $db->sql_query($sql);
+
+ // We add this to the mod log too for moderators to see that a specific user got warned.
+ $sql = 'SELECT forum_id, topic_id
+ FROM ' . POSTS_TABLE . '
+ WHERE post_id = ' . $post_id;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_USER_WARNING', $user_row['username']);
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
new file mode 100644
index 0000000000..3df582d640
--- /dev/null
+++ b/phpBB/includes/message_parser.php
@@ -0,0 +1,1685 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (!class_exists('bbcode'))
+{
+ include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+}
+
+/**
+* BBCODE FIRSTPASS
+* BBCODE first pass class (functions for parsing messages for db storage)
+* @package phpBB3
+*/
+class bbcode_firstpass extends bbcode
+{
+ var $message = '';
+ var $warn_msg = array();
+ var $parsed_items = array();
+
+ /**
+ * Parse BBCode
+ */
+ function parse_bbcode()
+ {
+ if (!$this->bbcodes)
+ {
+ $this->bbcode_init();
+ }
+
+ global $user;
+
+ $this->bbcode_bitfield = '';
+ $bitfield = new bitfield();
+
+ foreach ($this->bbcodes as $bbcode_name => $bbcode_data)
+ {
+ if (isset($bbcode_data['disabled']) && $bbcode_data['disabled'])
+ {
+ foreach ($bbcode_data['regexp'] as $regexp => $replacement)
+ {
+ if (preg_match($regexp, $this->message))
+ {
+ $this->warn_msg[] = sprintf($user->lang['UNAUTHORISED_BBCODE'] , '[' . $bbcode_name . ']');
+ continue;
+ }
+ }
+ }
+ else
+ {
+ foreach ($bbcode_data['regexp'] as $regexp => $replacement)
+ {
+ // The pattern gets compiled and cached by the PCRE extension,
+ // it should not demand recompilation
+ if (preg_match($regexp, $this->message))
+ {
+ $this->message = preg_replace($regexp, $replacement, $this->message);
+ $bitfield->set($bbcode_data['bbcode_id']);
+ }
+ }
+ }
+ }
+
+ $this->bbcode_bitfield = $bitfield->get_base64();
+ }
+
+ /**
+ * Prepare some bbcodes for better parsing
+ */
+ function prepare_bbcodes()
+ {
+ // Ok, seems like users instead want the no-parsing of urls, smilies, etc. after and before and within quote tags being tagged as "not a bug".
+ // Fine by me ;) Will ease our live... but do not come back and cry at us, we won't hear you.
+
+ /* Add newline at the end and in front of each quote block to prevent parsing errors (urls, smilies, etc.)
+ if (strpos($this->message, '[quote') !== false && strpos($this->message, '[/quote]') !== false)
+ {
+ $this->message = str_replace("\r\n", "\n", $this->message);
+
+ // We strip newlines and spaces after and before quotes in quotes (trimming) and then add exactly one newline
+ $this->message = preg_replace('#\[quote(=&quot;.*?&quot;)?\]\s*(.*?)\s*\[/quote\]#siu', '[quote\1]' . "\n" . '\2' ."\n[/quote]", $this->message);
+ }
+ */
+
+ // Add other checks which needs to be placed before actually parsing anything (be it bbcodes, smilies, urls...)
+ }
+
+ /**
+ * Init bbcode data for later parsing
+ */
+ function bbcode_init()
+ {
+ static $rowset;
+
+ // This array holds all bbcode data. BBCodes will be processed in this
+ // order, so it is important to keep [code] in first position and
+ // [quote] in second position.
+ $this->bbcodes = array(
+ 'code' => array('bbcode_id' => 8, 'regexp' => array('#\[code(?:=([a-z]+))?\](.+\[/code\])#ise' => "\$this->bbcode_code('\$1', '\$2')")),
+ 'quote' => array('bbcode_id' => 0, 'regexp' => array('#\[quote(?:=&quot;(.*?)&quot;)?\](.+)\[/quote\]#ise' => "\$this->bbcode_quote('\$0')")),
+ 'attachment' => array('bbcode_id' => 12, 'regexp' => array('#\[attachment=([0-9]+)\](.*?)\[/attachment\]#ise' => "\$this->bbcode_attachment('\$1', '\$2')")),
+ 'b' => array('bbcode_id' => 1, 'regexp' => array('#\[b\](.*?)\[/b\]#ise' => "\$this->bbcode_strong('\$1')")),
+ 'i' => array('bbcode_id' => 2, 'regexp' => array('#\[i\](.*?)\[/i\]#ise' => "\$this->bbcode_italic('\$1')")),
+ 'url' => array('bbcode_id' => 3, 'regexp' => array('#\[url(=(.*))?\]((?s).*)\[/url\]#iUe' => "\$this->validate_url('\$2', '\$3')")),
+ 'img' => array('bbcode_id' => 4, 'regexp' => array('#\[img\](.*)\[/img\]#iUe' => "\$this->bbcode_img('\$1')")),
+ 'size' => array('bbcode_id' => 5, 'regexp' => array('#\[size=([\-\+]?\d+)\](.*?)\[/size\]#ise' => "\$this->bbcode_size('\$1', '\$2')")),
+ 'color' => array('bbcode_id' => 6, 'regexp' => array('!\[color=(#[0-9a-f]{3}|#[0-9a-f]{6}|[a-z\-]+)\](.*?)\[/color\]!ise' => "\$this->bbcode_color('\$1', '\$2')")),
+ 'u' => array('bbcode_id' => 7, 'regexp' => array('#\[u\](.*?)\[/u\]#ise' => "\$this->bbcode_underline('\$1')")),
+ 'list' => array('bbcode_id' => 9, 'regexp' => array('#\[list(?:=(?:[a-z0-9]|disc|circle|square))?].*\[/list]#ise' => "\$this->bbcode_parse_list('\$0')")),
+ 'email' => array('bbcode_id' => 10, 'regexp' => array('#\[email=?(.*?)?\](.*?)\[/email\]#ise' => "\$this->validate_email('\$1', '\$2')")),
+ 'flash' => array('bbcode_id' => 11, 'regexp' => array('#\[flash=([0-9]+),([0-9]+)\](.*?)\[/flash\]#ie' => "\$this->bbcode_flash('\$1', '\$2', '\$3')"))
+ );
+
+ // Zero the parsed items array
+ $this->parsed_items = array();
+
+ foreach ($this->bbcodes as $tag => $bbcode_data)
+ {
+ $this->parsed_items[$tag] = 0;
+ }
+
+ if (!is_array($rowset))
+ {
+ global $db;
+ $rowset = array();
+
+ $sql = 'SELECT *
+ FROM ' . BBCODES_TABLE;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $rowset[] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ foreach ($rowset as $row)
+ {
+ $this->bbcodes[$row['bbcode_tag']] = array(
+ 'bbcode_id' => (int) $row['bbcode_id'],
+ 'regexp' => array($row['first_pass_match'] => str_replace('$uid', $this->bbcode_uid, $row['first_pass_replace']))
+ );
+ }
+ }
+
+ /**
+ * Making some pre-checks for bbcodes as well as increasing the number of parsed items
+ */
+ function check_bbcode($bbcode, &$in)
+ {
+ // when using the /e modifier, preg_replace slashes double-quotes but does not
+ // seem to slash anything else
+ $in = str_replace("\r\n", "\n", str_replace('\"', '"', $in));
+
+ // Trimming here to make sure no empty bbcodes are parsed accidently
+ if (trim($in) == '')
+ {
+ return false;
+ }
+
+ $this->parsed_items[$bbcode]++;
+
+ return true;
+ }
+
+ /**
+ * Transform some characters in valid bbcodes
+ */
+ function bbcode_specialchars($text)
+ {
+ $str_from = array('<', '>', '[', ']', '.', ':');
+ $str_to = array('&lt;', '&gt;', '&#91;', '&#93;', '&#46;', '&#58;');
+
+ return str_replace($str_from, $str_to, $text);
+ }
+
+ /**
+ * Parse size tag
+ */
+ function bbcode_size($stx, $in)
+ {
+ global $user, $config;
+
+ if (!$this->check_bbcode('size', $in))
+ {
+ return $in;
+ }
+
+ if ($config['max_' . $this->mode . '_font_size'] && $config['max_' . $this->mode . '_font_size'] < $stx)
+ {
+ $this->warn_msg[] = sprintf($user->lang['MAX_FONT_SIZE_EXCEEDED'], $config['max_' . $this->mode . '_font_size']);
+
+ return '[size=' . $stx . ']' . $in . '[/size]';
+ }
+
+ // Do not allow size=0
+ if ($stx <= 0)
+ {
+ return '[size=' . $stx . ']' . $in . '[/size]';
+ }
+
+ return '[size=' . $stx . ':' . $this->bbcode_uid . ']' . $in . '[/size:' . $this->bbcode_uid . ']';
+ }
+
+ /**
+ * Parse color tag
+ */
+ function bbcode_color($stx, $in)
+ {
+ if (!$this->check_bbcode('color', $in))
+ {
+ return $in;
+ }
+
+ return '[color=' . $stx . ':' . $this->bbcode_uid . ']' . $in . '[/color:' . $this->bbcode_uid . ']';
+ }
+
+ /**
+ * Parse u tag
+ */
+ function bbcode_underline($in)
+ {
+ if (!$this->check_bbcode('u', $in))
+ {
+ return $in;
+ }
+
+ return '[u:' . $this->bbcode_uid . ']' . $in . '[/u:' . $this->bbcode_uid . ']';
+ }
+
+ /**
+ * Parse b tag
+ */
+ function bbcode_strong($in)
+ {
+ if (!$this->check_bbcode('b', $in))
+ {
+ return $in;
+ }
+
+ return '[b:' . $this->bbcode_uid . ']' . $in . '[/b:' . $this->bbcode_uid . ']';
+ }
+
+ /**
+ * Parse i tag
+ */
+ function bbcode_italic($in)
+ {
+ if (!$this->check_bbcode('i', $in))
+ {
+ return $in;
+ }
+
+ return '[i:' . $this->bbcode_uid . ']' . $in . '[/i:' . $this->bbcode_uid . ']';
+ }
+
+ /**
+ * Parse img tag
+ */
+ function bbcode_img($in)
+ {
+ global $user, $config;
+
+ if (!$this->check_bbcode('img', $in))
+ {
+ return $in;
+ }
+
+ $in = trim($in);
+ $error = false;
+
+ $in = str_replace(' ', '%20', $in);
+
+ // Checking urls
+ if (!preg_match('#^' . get_preg_expression('url') . '$#i', $in) && !preg_match('#^' . get_preg_expression('www_url') . '$#i', $in))
+ {
+ return '[img]' . $in . '[/img]';
+ }
+
+ // Try to cope with a common user error... not specifying a protocol but only a subdomain
+ if (!preg_match('#^[a-z0-9]+://#i', $in))
+ {
+ $in = 'http://' . $in;
+ }
+
+ if ($config['max_' . $this->mode . '_img_height'] || $config['max_' . $this->mode . '_img_width'])
+ {
+ $stats = @getimagesize($in);
+
+ if ($stats === false)
+ {
+ $error = true;
+ $this->warn_msg[] = $user->lang['UNABLE_GET_IMAGE_SIZE'];
+ }
+ else
+ {
+ if ($config['max_' . $this->mode . '_img_height'] && $config['max_' . $this->mode . '_img_height'] < $stats[1])
+ {
+ $error = true;
+ $this->warn_msg[] = sprintf($user->lang['MAX_IMG_HEIGHT_EXCEEDED'], $config['max_' . $this->mode . '_img_height']);
+ }
+
+ if ($config['max_' . $this->mode . '_img_width'] && $config['max_' . $this->mode . '_img_width'] < $stats[0])
+ {
+ $error = true;
+ $this->warn_msg[] = sprintf($user->lang['MAX_IMG_WIDTH_EXCEEDED'], $config['max_' . $this->mode . '_img_width']);
+ }
+ }
+ }
+
+ if ($error || $this->path_in_domain($in))
+ {
+ return '[img]' . $in . '[/img]';
+ }
+
+ return '[img:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($in) . '[/img:' . $this->bbcode_uid . ']';
+ }
+
+ /**
+ * Parse flash tag
+ */
+ function bbcode_flash($width, $height, $in)
+ {
+ global $user, $config;
+
+ if (!$this->check_bbcode('flash', $in))
+ {
+ return $in;
+ }
+
+ $in = trim($in);
+ $error = false;
+
+ // Do not allow 0-sizes generally being entered
+ if ($width <= 0 || $height <= 0)
+ {
+ return '[flash=' . $width . ',' . $height . ']' . $in . '[/flash]';
+ }
+
+ // Apply the same size checks on flash files as on images
+ if ($config['max_' . $this->mode . '_img_height'] || $config['max_' . $this->mode . '_img_width'])
+ {
+ if ($config['max_' . $this->mode . '_img_height'] && $config['max_' . $this->mode . '_img_height'] < $height)
+ {
+ $error = true;
+ $this->warn_msg[] = sprintf($user->lang['MAX_FLASH_HEIGHT_EXCEEDED'], $config['max_' . $this->mode . '_img_height']);
+ }
+
+ if ($config['max_' . $this->mode . '_img_width'] && $config['max_' . $this->mode . '_img_width'] < $width)
+ {
+ $error = true;
+ $this->warn_msg[] = sprintf($user->lang['MAX_FLASH_WIDTH_EXCEEDED'], $config['max_' . $this->mode . '_img_width']);
+ }
+ }
+
+ if ($error || $this->path_in_domain($in))
+ {
+ return '[flash=' . $width . ',' . $height . ']' . $in . '[/flash]';
+ }
+
+ return '[flash=' . $width . ',' . $height . ':' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($in) . '[/flash:' . $this->bbcode_uid . ']';
+ }
+
+ /**
+ * Parse inline attachments [ia]
+ */
+ function bbcode_attachment($stx, $in)
+ {
+ if (!$this->check_bbcode('attachment', $in))
+ {
+ return $in;
+ }
+
+ return '[attachment=' . $stx . ':' . $this->bbcode_uid . ']<!-- ia' . $stx . ' -->' . trim($in) . '<!-- ia' . $stx . ' -->[/attachment:' . $this->bbcode_uid . ']';
+ }
+
+ /**
+ * Parse code text from code tag
+ * @access private
+ */
+ function bbcode_parse_code($stx, &$code)
+ {
+ switch (strtolower($stx))
+ {
+ case 'php':
+
+ $remove_tags = false;
+
+ $str_from = array('&lt;', '&gt;', '&#91;', '&#93;', '&#46;', '&#58;', '&#058;');
+ $str_to = array('<', '>', '[', ']', '.', ':', ':');
+ $code = str_replace($str_from, $str_to, $code);
+
+ if (!preg_match('/\<\?.*?\?\>/is', $code))
+ {
+ $remove_tags = true;
+ $code = "<?php $code ?>";
+ }
+
+ $conf = array('highlight.bg', 'highlight.comment', 'highlight.default', 'highlight.html', 'highlight.keyword', 'highlight.string');
+ foreach ($conf as $ini_var)
+ {
+ @ini_set($ini_var, str_replace('highlight.', 'syntax', $ini_var));
+ }
+
+ // Because highlight_string is specialcharing the text (but we already did this before), we have to reverse this in order to get correct results
+ $code = htmlspecialchars_decode($code);
+ $code = highlight_string($code, true);
+
+ $str_from = array('<span style="color: ', '<font color="syntax', '</font>', '<code>', '</code>','[', ']', '.', ':');
+ $str_to = array('<span class="', '<span class="syntax', '</span>', '', '', '&#91;', '&#93;', '&#46;', '&#58;');
+
+ if ($remove_tags)
+ {
+ $str_from[] = '<span class="syntaxdefault">&lt;?php </span>';
+ $str_to[] = '';
+ $str_from[] = '<span class="syntaxdefault">&lt;?php&nbsp;';
+ $str_to[] = '<span class="syntaxdefault">';
+ }
+
+ $code = str_replace($str_from, $str_to, $code);
+ $code = preg_replace('#^(<span class="[a-z_]+">)\n?(.*?)\n?(</span>)$#is', '$1$2$3', $code);
+
+ if ($remove_tags)
+ {
+ $code = preg_replace('#(<span class="[a-z]+">)?\?&gt;(</span>)#', '$1&nbsp;$2', $code);
+ }
+
+ $code = preg_replace('#^<span class="[a-z]+"><span class="([a-z]+)">(.*)</span></span>#s', '<span class="$1">$2</span>', $code);
+ $code = preg_replace('#(?:\s++|&nbsp;)*+</span>$#u', '</span>', $code);
+
+ // remove newline at the end
+ if (!empty($code) && substr($code, -1) == "\n")
+ {
+ $code = substr($code, 0, -1);
+ }
+
+ return "[code=$stx:" . $this->bbcode_uid . ']' . $code . '[/code:' . $this->bbcode_uid . ']';
+ break;
+
+ default:
+ return '[code:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($code) . '[/code:' . $this->bbcode_uid . ']';
+ break;
+ }
+ }
+
+ /**
+ * Parse code tag
+ * Expects the argument to start right after the opening [code] tag and to end with [/code]
+ */
+ function bbcode_code($stx, $in)
+ {
+ if (!$this->check_bbcode('code', $in))
+ {
+ return $in;
+ }
+
+ // We remove the hardcoded elements from the code block here because it is not used in code blocks
+ // Having it here saves us one preg_replace per message containing [code] blocks
+ // Additionally, magic url parsing should go after parsing bbcodes, but for safety those are stripped out too...
+ $htm_match = get_preg_expression('bbcode_htm');
+ unset($htm_match[4], $htm_match[5]);
+ $htm_replace = array('\1', '\1', '\2', '\1');
+
+ $out = $code_block = '';
+ $open = 1;
+
+ while ($in)
+ {
+ // Determine position and tag length of next code block
+ preg_match('#(.*?)(\[code(?:=([a-z]+))?\])(.+)#is', $in, $buffer);
+ $pos = (isset($buffer[1])) ? strlen($buffer[1]) : false;
+ $tag_length = (isset($buffer[2])) ? strlen($buffer[2]) : false;
+
+ // Determine position of ending code tag
+ $pos2 = stripos($in, '[/code]');
+
+ // Which is the next block, ending code or code block
+ if ($pos !== false && $pos < $pos2)
+ {
+ // Open new block
+ if (!$open)
+ {
+ $out .= substr($in, 0, $pos);
+ $in = substr($in, $pos);
+ $stx = (isset($buffer[3])) ? $buffer[3] : '';
+ $code_block = '';
+ }
+ else
+ {
+ // Already opened block, just append to the current block
+ $code_block .= substr($in, 0, $pos) . ((isset($buffer[2])) ? $buffer[2] : '');
+ $in = substr($in, $pos);
+ }
+
+ $in = substr($in, $tag_length);
+ $open++;
+ }
+ else
+ {
+ // Close the block
+ if ($open == 1)
+ {
+ $code_block .= substr($in, 0, $pos2);
+ $code_block = preg_replace($htm_match, $htm_replace, $code_block);
+
+ // Parse this code block
+ $out .= $this->bbcode_parse_code($stx, $code_block);
+ $code_block = '';
+ $open--;
+ }
+ else if ($open)
+ {
+ // Close one open tag... add to the current code block
+ $code_block .= substr($in, 0, $pos2 + 7);
+ $open--;
+ }
+ else
+ {
+ // end code without opening code... will be always outside code block
+ $out .= substr($in, 0, $pos2 + 7);
+ }
+
+ $in = substr($in, $pos2 + 7);
+ }
+ }
+
+ // if now $code_block has contents we need to parse the remaining code while removing the last closing tag to match up.
+ if ($code_block)
+ {
+ $code_block = substr($code_block, 0, -7);
+ $code_block = preg_replace($htm_match, $htm_replace, $code_block);
+
+ $out .= $this->bbcode_parse_code($stx, $code_block);
+ }
+
+ return $out;
+ }
+
+ /**
+ * Parse list bbcode
+ * Expects the argument to start with a tag
+ */
+ function bbcode_parse_list($in)
+ {
+ if (!$this->check_bbcode('list', $in))
+ {
+ return $in;
+ }
+
+ // $tok holds characters to stop at. Since the string starts with a '[' we'll get everything up to the first ']' which should be the opening [list] tag
+ $tok = ']';
+ $out = '[';
+
+ // First character is [
+ $in = substr($in, 1);
+ $list_end_tags = $item_end_tags = array();
+
+ do
+ {
+ $pos = strlen($in);
+
+ for ($i = 0, $tok_len = strlen($tok); $i < $tok_len; ++$i)
+ {
+ $tmp_pos = strpos($in, $tok[$i]);
+
+ if ($tmp_pos !== false && $tmp_pos < $pos)
+ {
+ $pos = $tmp_pos;
+ }
+ }
+
+ $buffer = substr($in, 0, $pos);
+ $tok = $in[$pos];
+
+ $in = substr($in, $pos + 1);
+
+ if ($tok == ']')
+ {
+ // if $tok is ']' the buffer holds a tag
+ if (strtolower($buffer) == '/list' && sizeof($list_end_tags))
+ {
+ // valid [/list] tag, check nesting so that we don't hit false positives
+ if (sizeof($item_end_tags) && sizeof($item_end_tags) >= sizeof($list_end_tags))
+ {
+ // current li tag has not been closed
+ $out = preg_replace('/\n?\[$/', '[', $out) . array_pop($item_end_tags) . '][';
+ }
+
+ $out .= array_pop($list_end_tags) . ']';
+ $tok = '[';
+ }
+ else if (preg_match('#^list(=[0-9a-z]+)?$#i', $buffer, $m))
+ {
+ // sub-list, add a closing tag
+ if (empty($m[1]) || preg_match('/^=(?:disc|square|circle)$/i', $m[1]))
+ {
+ array_push($list_end_tags, '/list:u:' . $this->bbcode_uid);
+ }
+ else
+ {
+ array_push($list_end_tags, '/list:o:' . $this->bbcode_uid);
+ }
+ $out .= 'list' . substr($buffer, 4) . ':' . $this->bbcode_uid . ']';
+ $tok = '[';
+ }
+ else
+ {
+ if (($buffer == '*' || substr($buffer, -2) == '[*') && sizeof($list_end_tags))
+ {
+ // the buffer holds a bullet tag and we have a [list] tag open
+ if (sizeof($item_end_tags) >= sizeof($list_end_tags))
+ {
+ if (substr($buffer, -2) == '[*')
+ {
+ $out .= substr($buffer, 0, -2) . '[';
+ }
+ // current li tag has not been closed
+ if (preg_match('/\n\[$/', $out, $m))
+ {
+ $out = preg_replace('/\n\[$/', '[', $out);
+ $buffer = array_pop($item_end_tags) . "]\n[*:" . $this->bbcode_uid;
+ }
+ else
+ {
+ $buffer = array_pop($item_end_tags) . '][*:' . $this->bbcode_uid;
+ }
+ }
+ else
+ {
+ $buffer = '*:' . $this->bbcode_uid;
+ }
+
+ $item_end_tags[] = '/*:m:' . $this->bbcode_uid;
+ }
+ else if ($buffer == '/*')
+ {
+ array_pop($item_end_tags);
+ $buffer = '/*:' . $this->bbcode_uid;
+ }
+
+ $out .= $buffer . $tok;
+ $tok = '[]';
+ }
+ }
+ else
+ {
+ // Not within a tag, just add buffer to the return string
+ $out .= $buffer . $tok;
+ $tok = ($tok == '[') ? ']' : '[]';
+ }
+ }
+ while ($in);
+
+ // do we have some tags open? close them now
+ if (sizeof($item_end_tags))
+ {
+ $out .= '[' . implode('][', $item_end_tags) . ']';
+ }
+ if (sizeof($list_end_tags))
+ {
+ $out .= '[' . implode('][', $list_end_tags) . ']';
+ }
+
+ return $out;
+ }
+
+ /**
+ * Parse quote bbcode
+ * Expects the argument to start with a tag
+ */
+ function bbcode_quote($in)
+ {
+ global $config, $user;
+
+ /**
+ * If you change this code, make sure the cases described within the following reports are still working:
+ * #3572 - [quote="[test]test"]test [ test[/quote] - (correct: parsed)
+ * #14667 - [quote]test[/quote] test ] and [ test [quote]test[/quote] (correct: parsed)
+ * #14770 - [quote="["]test[/quote] (correct: parsed)
+ * [quote="[i]test[/i]"]test[/quote] (correct: parsed)
+ * [quote="[quote]test[/quote]"]test[/quote] (correct: parsed - Username displayed as [quote]test[/quote])
+ * #20735 - [quote]test[/[/b]quote] test [/quote][/quote] test - (correct: quoted: "test[/[/b]quote] test" / non-quoted: "[/quote] test" - also failed if layout distorted)
+ * #40565 - [quote="a"]a[/quote][quote="a]a[/quote] (correct: first quote tag parsed, second quote tag unparsed)
+ */
+
+ $in = str_replace("\r\n", "\n", str_replace('\"', '"', trim($in)));
+
+ if (!$in)
+ {
+ return '';
+ }
+
+ // To let the parser not catch tokens within quote_username quotes we encode them before we start this...
+ $in = preg_replace('#quote=&quot;(.*?)&quot;\]#ie', "'quote=&quot;' . str_replace(array('[', ']', '\\\"'), array('&#91;', '&#93;', '\"'), '\$1') . '&quot;]'", $in);
+
+ $tok = ']';
+ $out = '[';
+
+ $in = substr($in, 1);
+ $close_tags = $error_ary = array();
+ $buffer = '';
+
+ do
+ {
+ $pos = strlen($in);
+ for ($i = 0, $tok_len = strlen($tok); $i < $tok_len; ++$i)
+ {
+ $tmp_pos = strpos($in, $tok[$i]);
+ if ($tmp_pos !== false && $tmp_pos < $pos)
+ {
+ $pos = $tmp_pos;
+ }
+ }
+
+ $buffer .= substr($in, 0, $pos);
+ $tok = $in[$pos];
+ $in = substr($in, $pos + 1);
+
+ if ($tok == ']')
+ {
+ if (strtolower($buffer) == '/quote' && sizeof($close_tags) && substr($out, -1, 1) == '[')
+ {
+ // we have found a closing tag
+ $out .= array_pop($close_tags) . ']';
+ $tok = '[';
+ $buffer = '';
+
+ /* Add space at the end of the closing tag if not happened before to allow following urls/smilies to be parsed correctly
+ * Do not try to think for the user. :/ Do not parse urls/smilies if there is no space - is the same as with other bbcodes too.
+ * Also, we won't have any spaces within $in anyway, only adding up spaces -> #10982
+ if (!$in || $in[0] !== ' ')
+ {
+ $out .= ' ';
+ }*/
+ }
+ else if (preg_match('#^quote(?:=&quot;(.*?)&quot;)?$#is', $buffer, $m) && substr($out, -1, 1) == '[')
+ {
+ $this->parsed_items['quote']++;
+
+ // the buffer holds a valid opening tag
+ if ($config['max_quote_depth'] && sizeof($close_tags) >= $config['max_quote_depth'])
+ {
+ // there are too many nested quotes
+ $error_ary['quote_depth'] = sprintf($user->lang['QUOTE_DEPTH_EXCEEDED'], $config['max_quote_depth']);
+
+ $out .= $buffer . $tok;
+ $tok = '[]';
+ $buffer = '';
+
+ continue;
+ }
+
+ array_push($close_tags, '/quote:' . $this->bbcode_uid);
+
+ if (isset($m[1]) && $m[1])
+ {
+ $username = str_replace(array('&#91;', '&#93;'), array('[', ']'), $m[1]);
+ $username = preg_replace('#\[(?!b|i|u|color|url|email|/b|/i|/u|/color|/url|/email)#iU', '&#91;$1', $username);
+
+ $end_tags = array();
+ $error = false;
+
+ preg_match_all('#\[((?:/)?(?:[a-z]+))#i', $username, $tags);
+ foreach ($tags[1] as $tag)
+ {
+ if ($tag[0] != '/')
+ {
+ $end_tags[] = '/' . $tag;
+ }
+ else
+ {
+ $end_tag = array_pop($end_tags);
+ $error = ($end_tag != $tag) ? true : false;
+ }
+ }
+
+ if ($error)
+ {
+ $username = $m[1];
+ }
+
+ $out .= 'quote=&quot;' . $username . '&quot;:' . $this->bbcode_uid . ']';
+ }
+ else
+ {
+ $out .= 'quote:' . $this->bbcode_uid . ']';
+ }
+
+ $tok = '[';
+ $buffer = '';
+ }
+ else if (preg_match('#^quote=&quot;(.*?)#is', $buffer, $m))
+ {
+ // the buffer holds an invalid opening tag
+ $buffer .= ']';
+ }
+ else
+ {
+ $out .= $buffer . $tok;
+ $tok = '[]';
+ $buffer = '';
+ }
+ }
+ else
+ {
+/**
+* Old quote code working fine, but having errors listed in bug #3572
+*
+* $out .= $buffer . $tok;
+* $tok = ($tok == '[') ? ']' : '[]';
+* $buffer = '';
+*/
+
+ $out .= $buffer . $tok;
+
+ if ($tok == '[')
+ {
+ // Search the text for the next tok... if an ending quote comes first, then change tok to []
+ $pos1 = stripos($in, '[/quote');
+ // If the token ] comes first, we change it to ]
+ $pos2 = strpos($in, ']');
+ // If the token [ comes first, we change it to [
+ $pos3 = strpos($in, '[');
+
+ if ($pos1 !== false && ($pos2 === false || $pos1 < $pos2) && ($pos3 === false || $pos1 < $pos3))
+ {
+ $tok = '[]';
+ }
+ else if ($pos3 !== false && ($pos2 === false || $pos3 < $pos2))
+ {
+ $tok = '[';
+ }
+ else
+ {
+ $tok = ']';
+ }
+ }
+ else
+ {
+ $tok = '[]';
+ }
+ $buffer = '';
+ }
+ }
+ while ($in);
+
+ $out .= $buffer;
+
+ if (sizeof($close_tags))
+ {
+ $out .= '[' . implode('][', $close_tags) . ']';
+ }
+
+ foreach ($error_ary as $error_msg)
+ {
+ $this->warn_msg[] = $error_msg;
+ }
+
+ return $out;
+ }
+
+ /**
+ * Validate email
+ */
+ function validate_email($var1, $var2)
+ {
+ $var1 = str_replace("\r\n", "\n", str_replace('\"', '"', trim($var1)));
+ $var2 = str_replace("\r\n", "\n", str_replace('\"', '"', trim($var2)));
+
+ $txt = $var2;
+ $email = ($var1) ? $var1 : $var2;
+
+ $validated = true;
+
+ if (!preg_match('/^' . get_preg_expression('email') . '$/i', $email))
+ {
+ $validated = false;
+ }
+
+ if (!$validated)
+ {
+ return '[email' . (($var1) ? "=$var1" : '') . ']' . $var2 . '[/email]';
+ }
+
+ $this->parsed_items['email']++;
+
+ if ($var1)
+ {
+ $retval = '[email=' . $this->bbcode_specialchars($email) . ':' . $this->bbcode_uid . ']' . $txt . '[/email:' . $this->bbcode_uid . ']';
+ }
+ else
+ {
+ $retval = '[email:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($email) . '[/email:' . $this->bbcode_uid . ']';
+ }
+
+ return $retval;
+ }
+
+ /**
+ * Validate url
+ *
+ * @param string $var1 optional url parameter for url bbcode: [url(=$var1)]$var2[/url]
+ * @param string $var2 url bbcode content: [url(=$var1)]$var2[/url]
+ */
+ function validate_url($var1, $var2)
+ {
+ global $config;
+
+ $var1 = str_replace("\r\n", "\n", str_replace('\"', '"', trim($var1)));
+ $var2 = str_replace("\r\n", "\n", str_replace('\"', '"', trim($var2)));
+
+ $url = ($var1) ? $var1 : $var2;
+
+ if ($var1 && !$var2)
+ {
+ $var2 = $var1;
+ }
+
+ if (!$url)
+ {
+ return '[url' . (($var1) ? '=' . $var1 : '') . ']' . $var2 . '[/url]';
+ }
+
+ $valid = false;
+
+ $url = str_replace(' ', '%20', $url);
+
+ // Checking urls
+ if (preg_match('#^' . get_preg_expression('url') . '$#i', $url) ||
+ preg_match('#^' . get_preg_expression('www_url') . '$#i', $url) ||
+ preg_match('#^' . preg_quote(generate_board_url(), '#') . get_preg_expression('relative_url') . '$#i', $url))
+ {
+ $valid = true;
+ }
+
+ if ($valid)
+ {
+ $this->parsed_items['url']++;
+
+ // if there is no scheme, then add http schema
+ if (!preg_match('#^[a-z][a-z\d+\-.]*:/{2}#i', $url))
+ {
+ $url = 'http://' . $url;
+ }
+
+ // Is this a link to somewhere inside this board? If so then remove the session id from the url
+ if (strpos($url, generate_board_url()) !== false && strpos($url, 'sid=') !== false)
+ {
+ $url = preg_replace('/(&amp;|\?)sid=[0-9a-f]{32}&amp;/', '\1', $url);
+ $url = preg_replace('/(&amp;|\?)sid=[0-9a-f]{32}$/', '', $url);
+ $url = append_sid($url);
+ }
+
+ return ($var1) ? '[url=' . $this->bbcode_specialchars($url) . ':' . $this->bbcode_uid . ']' . $var2 . '[/url:' . $this->bbcode_uid . ']' : '[url:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($url) . '[/url:' . $this->bbcode_uid . ']';
+ }
+
+ return '[url' . (($var1) ? '=' . $var1 : '') . ']' . $var2 . '[/url]';
+ }
+
+ /**
+ * Check if url is pointing to this domain/script_path/php-file
+ *
+ * @param string $url the url to check
+ * @return true if the url is pointing to this domain/script_path/php-file, false if not
+ *
+ * @access private
+ */
+ function path_in_domain($url)
+ {
+ global $config, $phpEx, $user;
+
+ if ($config['force_server_vars'])
+ {
+ $check_path = $config['script_path'];
+ }
+ else
+ {
+ $check_path = ($user->page['root_script_path'] != '/') ? substr($user->page['root_script_path'], 0, -1) : '/';
+ }
+
+ // Is the user trying to link to a php file in this domain and script path?
+ if (strpos($url, ".{$phpEx}") !== false && strpos($url, $check_path) !== false)
+ {
+ $server_name = $user->host;
+
+ // Forcing server vars is the only way to specify/override the protocol
+ if ($config['force_server_vars'] || !$server_name)
+ {
+ $server_name = $config['server_name'];
+ }
+
+ // Check again in correct order...
+ $pos_ext = strpos($url, ".{$phpEx}");
+ $pos_path = strpos($url, $check_path);
+ $pos_domain = strpos($url, $server_name);
+
+ if ($pos_domain !== false && $pos_path >= $pos_domain && $pos_ext >= $pos_path)
+ {
+ // Ok, actually we allow linking to some files (this may be able to be extended in some way later...)
+ if (strpos($url, '/' . $check_path . '/download/file.' . $phpEx) !== 0)
+ {
+ return false;
+ }
+
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
+
+/**
+* Main message parser for posting, pm, etc. takes raw message
+* and parses it for attachments, bbcode and smilies
+* @package phpBB3
+*/
+class parse_message extends bbcode_firstpass
+{
+ var $attachment_data = array();
+ var $filename_data = array();
+
+ // Helps ironing out user error
+ var $message_status = '';
+
+ var $allow_img_bbcode = true;
+ var $allow_flash_bbcode = true;
+ var $allow_quote_bbcode = true;
+ var $allow_url_bbcode = true;
+
+ var $mode;
+
+ /**
+ * Init - give message here or manually
+ */
+ function parse_message($message = '')
+ {
+ // Init BBCode UID
+ $this->bbcode_uid = substr(base_convert(unique_id(), 16, 36), 0, BBCODE_UID_LEN);
+ $this->message = $message;
+ }
+
+ /**
+ * Parse Message
+ */
+ function parse($allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $update_this_message = true, $mode = 'post')
+ {
+ global $config, $db, $user;
+
+ $this->mode = $mode;
+
+ if (!isset($config['max_' . $mode . '_chars']))
+ {
+ $config['max_' . $mode . '_chars'] = 0;
+ }
+ if (!isset($config['max_' . $mode . '_smilies']))
+ {
+ $config['max_' . $mode . '_smilies'] = 0;
+ }
+ if (!isset($config['max_' . $mode . '_urls']))
+ {
+ $config['max_' . $mode . '_urls'] = 0;
+ }
+
+ $this->allow_img_bbcode = $allow_img_bbcode;
+ $this->allow_flash_bbcode = $allow_flash_bbcode;
+ $this->allow_quote_bbcode = $allow_quote_bbcode;
+ $this->allow_url_bbcode = $allow_url_bbcode;
+
+ // If false, then $this->message won't be altered, the text will be returned instead.
+ if (!$update_this_message)
+ {
+ $tmp_message = $this->message;
+ $return_message = &$this->message;
+ }
+
+ if ($this->message_status == 'display')
+ {
+ $this->decode_message();
+ }
+
+ // Do some general 'cleanup' first before processing message,
+ // e.g. remove excessive newlines(?), smilies(?)
+ $match = array('#(script|about|applet|activex|chrome):#i');
+ $replace = array("\\1&#058;");
+ $this->message = preg_replace($match, $replace, trim($this->message));
+
+ // Store message length...
+ $message_length = ($mode == 'post') ? utf8_strlen($this->message) : utf8_strlen(preg_replace('#\[\/?[a-z\*\+\-]+(=[\S]+)?\]#ius', ' ', $this->message));
+
+ // Maximum message length check. 0 disables this check completely.
+ if ((int) $config['max_' . $mode . '_chars'] > 0 && $message_length > (int) $config['max_' . $mode . '_chars'])
+ {
+ $this->warn_msg[] = sprintf($user->lang['TOO_MANY_CHARS_' . strtoupper($mode)], $message_length, (int) $config['max_' . $mode . '_chars']);
+ return (!$update_this_message) ? $return_message : $this->warn_msg;
+ }
+
+ // Minimum message length check for post only
+ if ($mode === 'post')
+ {
+ if (!$message_length || $message_length < (int) $config['min_post_chars'])
+ {
+ $this->warn_msg[] = (!$message_length) ? $user->lang['TOO_FEW_CHARS'] : sprintf($user->lang['TOO_FEW_CHARS_LIMIT'], $message_length, (int) $config['min_post_chars']);
+ return (!$update_this_message) ? $return_message : $this->warn_msg;
+ }
+ }
+
+ // Prepare BBcode (just prepares some tags for better parsing)
+ if ($allow_bbcode && strpos($this->message, '[') !== false)
+ {
+ $this->bbcode_init();
+ $disallow = array('img', 'flash', 'quote', 'url');
+ foreach ($disallow as $bool)
+ {
+ if (!${'allow_' . $bool . '_bbcode'})
+ {
+ $this->bbcodes[$bool]['disabled'] = true;
+ }
+ }
+
+ $this->prepare_bbcodes();
+ }
+
+ // Parse smilies
+ if ($allow_smilies)
+ {
+ $this->smilies($config['max_' . $mode . '_smilies']);
+ }
+
+ $num_urls = 0;
+
+ // Parse BBCode
+ if ($allow_bbcode && strpos($this->message, '[') !== false)
+ {
+ $this->parse_bbcode();
+ $num_urls += $this->parsed_items['url'];
+ }
+
+ // Parse URL's
+ if ($allow_magic_url)
+ {
+ $this->magic_url(generate_board_url());
+
+ if ($config['max_' . $mode . '_urls'])
+ {
+ $num_urls += preg_match_all('#\<!-- ([lmwe]) --\>.*?\<!-- \1 --\>#', $this->message, $matches);
+ }
+ }
+
+ // Check for "empty" message. We do not check here for maximum length, because bbcode, smilies, etc. can add to the length.
+ // The maximum length check happened before any parsings.
+ if ($mode === 'post' && utf8_clean_string($this->message) === '')
+ {
+ $this->warn_msg[] = $user->lang['TOO_FEW_CHARS'];
+ return (!$update_this_message) ? $return_message : $this->warn_msg;
+ }
+
+ // Check number of links
+ if ($config['max_' . $mode . '_urls'] && $num_urls > $config['max_' . $mode . '_urls'])
+ {
+ $this->warn_msg[] = sprintf($user->lang['TOO_MANY_URLS'], $config['max_' . $mode . '_urls']);
+ return (!$update_this_message) ? $return_message : $this->warn_msg;
+ }
+
+ if (!$update_this_message)
+ {
+ unset($this->message);
+ $this->message = $tmp_message;
+ return $return_message;
+ }
+
+ $this->message_status = 'parsed';
+ return false;
+ }
+
+ /**
+ * Formatting text for display
+ */
+ function format_display($allow_bbcode, $allow_magic_url, $allow_smilies, $update_this_message = true)
+ {
+ // If false, then the parsed message get returned but internal message not processed.
+ if (!$update_this_message)
+ {
+ $tmp_message = $this->message;
+ $return_message = &$this->message;
+ }
+
+ if ($this->message_status == 'plain')
+ {
+ // Force updating message - of course.
+ $this->parse($allow_bbcode, $allow_magic_url, $allow_smilies, $this->allow_img_bbcode, $this->allow_flash_bbcode, $this->allow_quote_bbcode, $this->allow_url_bbcode, true);
+ }
+
+ // Replace naughty words such as farty pants
+ $this->message = censor_text($this->message);
+
+ // Parse BBcode
+ if ($allow_bbcode)
+ {
+ $this->bbcode_cache_init();
+
+ // We are giving those parameters to be able to use the bbcode class on its own
+ $this->bbcode_second_pass($this->message, $this->bbcode_uid);
+ }
+
+ $this->message = bbcode_nl2br($this->message);
+ $this->message = smiley_text($this->message, !$allow_smilies);
+
+ if (!$update_this_message)
+ {
+ unset($this->message);
+ $this->message = $tmp_message;
+ return $return_message;
+ }
+
+ $this->message_status = 'display';
+ return false;
+ }
+
+ /**
+ * Decode message to be placed back into form box
+ */
+ function decode_message($custom_bbcode_uid = '', $update_this_message = true)
+ {
+ // If false, then the parsed message get returned but internal message not processed.
+ if (!$update_this_message)
+ {
+ $tmp_message = $this->message;
+ $return_message = &$this->message;
+ }
+
+ ($custom_bbcode_uid) ? decode_message($this->message, $custom_bbcode_uid) : decode_message($this->message, $this->bbcode_uid);
+
+ if (!$update_this_message)
+ {
+ unset($this->message);
+ $this->message = $tmp_message;
+ return $return_message;
+ }
+
+ $this->message_status = 'plain';
+ return false;
+ }
+
+ /**
+ * Replace magic urls of form http://xxx.xxx., www.xxx. and xxx@xxx.xxx.
+ * Cuts down displayed size of link if over 50 chars, turns absolute links
+ * into relative versions when the server/script path matches the link
+ */
+ function magic_url($server_url)
+ {
+ // We use the global make_clickable function
+ $this->message = make_clickable($this->message, $server_url);
+ }
+
+ /**
+ * Parse Smilies
+ */
+ function smilies($max_smilies = 0)
+ {
+ global $db, $user;
+ static $match;
+ static $replace;
+
+ // See if the static arrays have already been filled on an earlier invocation
+ if (!is_array($match))
+ {
+ $match = $replace = array();
+
+ // NOTE: obtain_* function? chaching the table contents?
+
+ // For now setting the ttl to 10 minutes
+ switch ($db->sql_layer)
+ {
+ case 'mssql':
+ case 'mssql_odbc':
+ $sql = 'SELECT *
+ FROM ' . SMILIES_TABLE . '
+ ORDER BY LEN(code) DESC';
+ break;
+
+ case 'firebird':
+ $sql = 'SELECT *
+ FROM ' . SMILIES_TABLE . '
+ ORDER BY CHAR_LENGTH(code) DESC';
+ break;
+
+ // LENGTH supported by MySQL, IBM DB2, Oracle and Access for sure...
+ default:
+ $sql = 'SELECT *
+ FROM ' . SMILIES_TABLE . '
+ ORDER BY LENGTH(code) DESC';
+ break;
+ }
+ $result = $db->sql_query($sql, 600);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (empty($row['code']))
+ {
+ continue;
+ }
+
+ // (assertion)
+ $match[] = preg_quote($row['code'], '#');
+ $replace[] = '<!-- s' . $row['code'] . ' --><img src="{SMILIES_PATH}/' . $row['smiley_url'] . '" alt="' . $row['code'] . '" title="' . $row['emotion'] . '" /><!-- s' . $row['code'] . ' -->';
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (sizeof($match))
+ {
+ if ($max_smilies)
+ {
+ $num_matches = preg_match_all('#(?<=^|[\n .])(?:' . implode('|', $match) . ')(?![^<>]*>)#', $this->message, $matches);
+ unset($matches);
+
+ if ($num_matches !== false && $num_matches > $max_smilies)
+ {
+ $this->warn_msg[] = sprintf($user->lang['TOO_MANY_SMILIES'], $max_smilies);
+ return;
+ }
+ }
+
+ // Make sure the delimiter # is added in front and at the end of every element within $match
+ $this->message = trim(preg_replace(explode(chr(0), '#(?<=^|[\n .])' . implode('(?![^<>]*>)#' . chr(0) . '#(?<=^|[\n .])', $match) . '(?![^<>]*>)#'), $replace, $this->message));
+ }
+ }
+
+ /**
+ * Parse Attachments
+ */
+ function parse_attachments($form_name, $mode, $forum_id, $submit, $preview, $refresh, $is_message = false)
+ {
+ global $config, $auth, $user, $phpbb_root_path, $phpEx, $db;
+
+ $error = array();
+
+ $num_attachments = sizeof($this->attachment_data);
+ $this->filename_data['filecomment'] = utf8_normalize_nfc(request_var('filecomment', '', true));
+ $upload_file = (isset($_FILES[$form_name]) && $_FILES[$form_name]['name'] != 'none' && trim($_FILES[$form_name]['name'])) ? true : false;
+
+ $add_file = (isset($_POST['add_file'])) ? true : false;
+ $delete_file = (isset($_POST['delete_file'])) ? true : false;
+
+ // First of all adjust comments if changed
+ $actual_comment_list = utf8_normalize_nfc(request_var('comment_list', array(''), true));
+
+ foreach ($actual_comment_list as $comment_key => $comment)
+ {
+ if (!isset($this->attachment_data[$comment_key]))
+ {
+ continue;
+ }
+
+ if ($this->attachment_data[$comment_key]['attach_comment'] != $actual_comment_list[$comment_key])
+ {
+ $this->attachment_data[$comment_key]['attach_comment'] = $actual_comment_list[$comment_key];
+ }
+ }
+
+ $cfg = array();
+ $cfg['max_attachments'] = ($is_message) ? $config['max_attachments_pm'] : $config['max_attachments'];
+ $forum_id = ($is_message) ? 0 : $forum_id;
+
+ if ($submit && in_array($mode, array('post', 'reply', 'quote', 'edit')) && $upload_file)
+ {
+ if ($num_attachments < $cfg['max_attachments'] || $auth->acl_get('a_') || $auth->acl_get('m_', $forum_id))
+ {
+ $filedata = upload_attachment($form_name, $forum_id, false, '', $is_message);
+ $error = $filedata['error'];
+
+ if ($filedata['post_attach'] && !sizeof($error))
+ {
+ $sql_ary = array(
+ 'physical_filename' => $filedata['physical_filename'],
+ 'attach_comment' => $this->filename_data['filecomment'],
+ 'real_filename' => $filedata['real_filename'],
+ 'extension' => $filedata['extension'],
+ 'mimetype' => $filedata['mimetype'],
+ 'filesize' => $filedata['filesize'],
+ 'filetime' => $filedata['filetime'],
+ 'thumbnail' => $filedata['thumbnail'],
+ 'is_orphan' => 1,
+ 'in_message' => ($is_message) ? 1 : 0,
+ 'poster_id' => $user->data['user_id'],
+ );
+
+ $db->sql_query('INSERT INTO ' . ATTACHMENTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+
+ $new_entry = array(
+ 'attach_id' => $db->sql_nextid(),
+ 'is_orphan' => 1,
+ 'real_filename' => $filedata['real_filename'],
+ 'attach_comment'=> $this->filename_data['filecomment'],
+ );
+
+ $this->attachment_data = array_merge(array(0 => $new_entry), $this->attachment_data);
+ $this->message = preg_replace('#\[attachment=([0-9]+)\](.*?)\[\/attachment\]#e', "'[attachment='.(\\1 + 1).']\\2[/attachment]'", $this->message);
+
+ $this->filename_data['filecomment'] = '';
+
+ // This Variable is set to false here, because Attachments are entered into the
+ // Database in two modes, one if the id_list is 0 and the second one if post_attach is true
+ // Since post_attach is automatically switched to true if an Attachment got added to the filesystem,
+ // but we are assigning an id of 0 here, we have to reset the post_attach variable to false.
+ //
+ // This is very relevant, because it could happen that the post got not submitted, but we do not
+ // know this circumstance here. We could be at the posting page or we could be redirected to the entered
+ // post. :)
+ $filedata['post_attach'] = false;
+ }
+ }
+ else
+ {
+ $error[] = sprintf($user->lang['TOO_MANY_ATTACHMENTS'], $cfg['max_attachments']);
+ }
+ }
+
+ if ($preview || $refresh || sizeof($error))
+ {
+ // Perform actions on temporary attachments
+ if ($delete_file)
+ {
+ include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+
+ $index = array_keys(request_var('delete_file', array(0 => 0)));
+ $index = (!empty($index)) ? $index[0] : false;
+
+ if ($index !== false && !empty($this->attachment_data[$index]))
+ {
+ // delete selected attachment
+ if ($this->attachment_data[$index]['is_orphan'])
+ {
+ $sql = 'SELECT attach_id, physical_filename, thumbnail
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE attach_id = ' . (int) $this->attachment_data[$index]['attach_id'] . '
+ AND is_orphan = 1
+ AND poster_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ phpbb_unlink($row['physical_filename'], 'file');
+
+ if ($row['thumbnail'])
+ {
+ phpbb_unlink($row['physical_filename'], 'thumbnail');
+ }
+
+ $db->sql_query('DELETE FROM ' . ATTACHMENTS_TABLE . ' WHERE attach_id = ' . (int) $this->attachment_data[$index]['attach_id']);
+ }
+ }
+ else
+ {
+ delete_attachments('attach', array(intval($this->attachment_data[$index]['attach_id'])));
+ }
+
+ unset($this->attachment_data[$index]);
+ $this->message = preg_replace('#\[attachment=([0-9]+)\](.*?)\[\/attachment\]#e', "(\\1 == \$index) ? '' : ((\\1 > \$index) ? '[attachment=' . (\\1 - 1) . ']\\2[/attachment]' : '\\0')", $this->message);
+
+ // Reindex Array
+ $this->attachment_data = array_values($this->attachment_data);
+ }
+ }
+ else if (($add_file || $preview) && $upload_file)
+ {
+ if ($num_attachments < $cfg['max_attachments'] || $auth->acl_gets('m_', 'a_', $forum_id))
+ {
+ $filedata = upload_attachment($form_name, $forum_id, false, '', $is_message);
+ $error = array_merge($error, $filedata['error']);
+
+ if (!sizeof($error))
+ {
+ $sql_ary = array(
+ 'physical_filename' => $filedata['physical_filename'],
+ 'attach_comment' => $this->filename_data['filecomment'],
+ 'real_filename' => $filedata['real_filename'],
+ 'extension' => $filedata['extension'],
+ 'mimetype' => $filedata['mimetype'],
+ 'filesize' => $filedata['filesize'],
+ 'filetime' => $filedata['filetime'],
+ 'thumbnail' => $filedata['thumbnail'],
+ 'is_orphan' => 1,
+ 'in_message' => ($is_message) ? 1 : 0,
+ 'poster_id' => $user->data['user_id'],
+ );
+
+ $db->sql_query('INSERT INTO ' . ATTACHMENTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+
+ $new_entry = array(
+ 'attach_id' => $db->sql_nextid(),
+ 'is_orphan' => 1,
+ 'real_filename' => $filedata['real_filename'],
+ 'attach_comment'=> $this->filename_data['filecomment'],
+ );
+
+ $this->attachment_data = array_merge(array(0 => $new_entry), $this->attachment_data);
+ $this->message = preg_replace('#\[attachment=([0-9]+)\](.*?)\[\/attachment\]#e', "'[attachment='.(\\1 + 1).']\\2[/attachment]'", $this->message);
+ $this->filename_data['filecomment'] = '';
+ }
+ }
+ else
+ {
+ $error[] = sprintf($user->lang['TOO_MANY_ATTACHMENTS'], $cfg['max_attachments']);
+ }
+ }
+ }
+
+ foreach ($error as $error_msg)
+ {
+ $this->warn_msg[] = $error_msg;
+ }
+ }
+
+ /**
+ * Get Attachment Data
+ */
+ function get_submitted_attachment_data($check_user_id = false)
+ {
+ global $user, $db, $phpbb_root_path, $phpEx, $config;
+
+ $this->filename_data['filecomment'] = utf8_normalize_nfc(request_var('filecomment', '', true));
+ $attachment_data = (isset($_POST['attachment_data'])) ? $_POST['attachment_data'] : array();
+ $this->attachment_data = array();
+
+ $check_user_id = ($check_user_id === false) ? $user->data['user_id'] : $check_user_id;
+
+ if (!sizeof($attachment_data))
+ {
+ return;
+ }
+
+ $not_orphan = $orphan = array();
+
+ foreach ($attachment_data as $pos => $var_ary)
+ {
+ if ($var_ary['is_orphan'])
+ {
+ $orphan[(int) $var_ary['attach_id']] = $pos;
+ }
+ else
+ {
+ $not_orphan[(int) $var_ary['attach_id']] = $pos;
+ }
+ }
+
+ // Regenerate already posted attachments
+ if (sizeof($not_orphan))
+ {
+ // Get the attachment data, based on the poster id...
+ $sql = 'SELECT attach_id, is_orphan, real_filename, attach_comment
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('attach_id', array_keys($not_orphan)) . '
+ AND poster_id = ' . $check_user_id;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $pos = $not_orphan[$row['attach_id']];
+ $this->attachment_data[$pos] = $row;
+ set_var($this->attachment_data[$pos]['attach_comment'], $_POST['attachment_data'][$pos]['attach_comment'], 'string', true);
+
+ unset($not_orphan[$row['attach_id']]);
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (sizeof($not_orphan))
+ {
+ trigger_error('NO_ACCESS_ATTACHMENT', E_USER_ERROR);
+ }
+
+ // Regenerate newly uploaded attachments
+ if (sizeof($orphan))
+ {
+ $sql = 'SELECT attach_id, is_orphan, real_filename, attach_comment
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('attach_id', array_keys($orphan)) . '
+ AND poster_id = ' . $user->data['user_id'] . '
+ AND is_orphan = 1';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $pos = $orphan[$row['attach_id']];
+ $this->attachment_data[$pos] = $row;
+ set_var($this->attachment_data[$pos]['attach_comment'], $_POST['attachment_data'][$pos]['attach_comment'], 'string', true);
+
+ unset($orphan[$row['attach_id']]);
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (sizeof($orphan))
+ {
+ trigger_error('NO_ACCESS_ATTACHMENT', E_USER_ERROR);
+ }
+
+ ksort($this->attachment_data);
+ }
+
+ /**
+ * Parse Poll
+ */
+ function parse_poll(&$poll)
+ {
+ global $auth, $user, $config;
+
+ $poll_max_options = $poll['poll_max_options'];
+
+ // Parse Poll Option text ;)
+ $tmp_message = $this->message;
+ $this->message = $poll['poll_option_text'];
+ $bbcode_bitfield = $this->bbcode_bitfield;
+
+ $poll['poll_option_text'] = $this->parse($poll['enable_bbcode'], ($config['allow_post_links']) ? $poll['enable_urls'] : false, $poll['enable_smilies'], $poll['img_status'], false, false, $config['allow_post_links'], false, 'poll');
+
+ $bbcode_bitfield = base64_encode(base64_decode($bbcode_bitfield) | base64_decode($this->bbcode_bitfield));
+ $this->message = $tmp_message;
+
+ // Parse Poll Title
+ $tmp_message = $this->message;
+ $this->message = $poll['poll_title'];
+ $this->bbcode_bitfield = $bbcode_bitfield;
+
+ $poll['poll_options'] = explode("\n", trim($poll['poll_option_text']));
+ $poll['poll_options_size'] = sizeof($poll['poll_options']);
+
+ if (!$poll['poll_title'] && $poll['poll_options_size'])
+ {
+ $this->warn_msg[] = $user->lang['NO_POLL_TITLE'];
+ }
+ else
+ {
+ if (utf8_strlen(preg_replace('#\[\/?[a-z\*\+\-]+(=[\S]+)?\]#ius', ' ', $this->message)) > 100)
+ {
+ $this->warn_msg[] = $user->lang['POLL_TITLE_TOO_LONG'];
+ }
+ $poll['poll_title'] = $this->parse($poll['enable_bbcode'], ($config['allow_post_links']) ? $poll['enable_urls'] : false, $poll['enable_smilies'], $poll['img_status'], false, false, $config['allow_post_links'], false, 'poll');
+ if (strlen($poll['poll_title']) > 255)
+ {
+ $this->warn_msg[] = $user->lang['POLL_TITLE_COMP_TOO_LONG'];
+ }
+ }
+
+ $this->bbcode_bitfield = base64_encode(base64_decode($bbcode_bitfield) | base64_decode($this->bbcode_bitfield));
+ $this->message = $tmp_message;
+ unset($tmp_message);
+
+ if (sizeof($poll['poll_options']) == 1)
+ {
+ $this->warn_msg[] = $user->lang['TOO_FEW_POLL_OPTIONS'];
+ }
+ else if ($poll['poll_options_size'] > (int) $config['max_poll_options'])
+ {
+ $this->warn_msg[] = $user->lang['TOO_MANY_POLL_OPTIONS'];
+ }
+ else if ($poll_max_options > $poll['poll_options_size'])
+ {
+ $this->warn_msg[] = $user->lang['TOO_MANY_USER_OPTIONS'];
+ }
+
+ $poll['poll_max_options'] = ($poll['poll_max_options'] < 1) ? 1 : (($poll['poll_max_options'] > $config['max_poll_options']) ? $config['max_poll_options'] : $poll['poll_max_options']);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php
new file mode 100644
index 0000000000..1d015576a7
--- /dev/null
+++ b/phpBB/includes/questionnaire/questionnaire.php
@@ -0,0 +1,471 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* This class collects data which is used to create some usage statistics.
+*
+* The collected data is - after authorization of the administrator - submitted
+* to a central server. For privacy reasons we try to collect only data which aren't private
+* or don't give any information which might help to identify the user.
+*
+* @author Johannes Schlueter <johannes@php.net>
+* @copyright (c) 2007-2008 Johannes Schlueter
+*/
+class phpbb_questionnaire_data_collector
+{
+ var $providers;
+ var $data = null;
+ var $install_id = '';
+
+ /**
+ * Constructor.
+ *
+ * @param string
+ */
+ function phpbb_questionnaire_data_collector($install_id)
+ {
+ $this->install_id = $install_id;
+ $this->providers = array();
+ }
+
+ function add_data_provider(&$provider)
+ {
+ $this->providers[] = &$provider;
+ }
+
+ /**
+ * Get data as an array.
+ *
+ * @return array All Data
+ */
+ function get_data_raw()
+ {
+ if (!$this->data)
+ {
+ $this->collect();
+ }
+
+ return $this->data;
+ }
+
+ function get_data_for_form()
+ {
+ return base64_encode(serialize($this->get_data_raw()));
+ }
+
+ /**
+ * Collect info into the data property.
+ *
+ * @return void
+ */
+ function collect()
+ {
+ foreach (array_keys($this->providers) as $key)
+ {
+ $provider = &$this->providers[$key];
+ $this->data[$provider->get_identifier()] = $provider->get_data();
+ }
+ $this->data['install_id'] = $this->install_id;
+ }
+}
+
+/** interface: get_indentifier(), get_data() */
+
+/**
+* Questionnaire PHP data provider
+* @package phpBB3
+*/
+class phpbb_questionnaire_php_data_provider
+{
+ function get_identifier()
+ {
+ return 'PHP';
+ }
+
+ /**
+ * Get data about the PHP runtime setup.
+ *
+ * @return array
+ */
+ function get_data()
+ {
+ return array(
+ 'version' => PHP_VERSION,
+ 'sapi' => PHP_SAPI,
+ 'int_size' => defined('PHP_INT_SIZE') ? PHP_INT_SIZE : '',
+ 'safe_mode' => (int) @ini_get('safe_mode'),
+ 'open_basedir' => (int) @ini_get('open_basedir'),
+ 'memory_limit' => @ini_get('memory_limit'),
+ 'allow_url_fopen' => (int) @ini_get('allow_url_fopen'),
+ 'allow_url_include' => (int) @ini_get('allow_url_include'),
+ 'file_uploads' => (int) @ini_get('file_uploads'),
+ 'upload_max_filesize' => @ini_get('upload_max_filesize'),
+ 'post_max_size' => @ini_get('post_max_size'),
+ 'disable_functions' => @ini_get('disable_functions'),
+ 'disable_classes' => @ini_get('disable_classes'),
+ 'enable_dl' => (int) @ini_get('enable_dl'),
+ 'magic_quotes_gpc' => (int) @ini_get('magic_quotes_gpc'),
+ 'register_globals' => (int) @ini_get('register_globals'),
+ 'filter.default' => @ini_get('filter.default'),
+ 'zend.ze1_compatibility_mode' => (int) @ini_get('zend.ze1_compatibility_mode'),
+ 'unicode.semantics' => (int) @ini_get('unicode.semantics'),
+ 'zend_thread_safty' => (int) function_exists('zend_thread_id'),
+ 'extensions' => get_loaded_extensions(),
+ );
+ }
+}
+
+/**
+* Questionnaire System data provider
+* @package phpBB3
+*/
+class phpbb_questionnaire_system_data_provider
+{
+ function get_identifier()
+ {
+ return 'System';
+ }
+
+ /**
+ * Get data about the general system information, like OS or IP (shortened).
+ *
+ * @return array
+ */
+ function get_data()
+ {
+ // Start discovering the IPV4 server address, if available
+ $server_address = '0.0.0.0';
+
+ if (!empty($_SERVER['SERVER_ADDR']))
+ {
+ $server_address = $_SERVER['SERVER_ADDR'];
+ }
+
+ // Running on IIS?
+ if (!empty($_SERVER['LOCAL_ADDR']))
+ {
+ $server_address = $_SERVER['LOCAL_ADDR'];
+ }
+
+ $ip_address_ary = explode('.', $server_address);
+
+ // build ip
+ if (!isset($ip_address_ary[0]) || !isset($ip_address_ary[1]))
+ {
+ $ip_address_ary = explode('.', '0.0.0.0');
+ }
+
+ return array(
+ 'os' => PHP_OS,
+ 'httpd' => $_SERVER['SERVER_SOFTWARE'],
+ // we don't want the real IP address (for privacy policy reasons) but only
+ // a network address to see whether your installation is running on a private or public network.
+ // IANA reserved addresses for private networks (RFC 1918) are:
+ // - 10.0.0.0/8
+ // - 172.16.0.0/12
+ // - 192.168.0.0/16
+ 'ip' => $ip_address_ary[0] . '.' . $ip_address_ary[1] . '.XXX.YYY',
+ );
+ }
+}
+
+/**
+* Questionnaire phpBB data provider
+* @package phpBB3
+*/
+class phpbb_questionnaire_phpbb_data_provider
+{
+ var $config;
+ var $unique_id;
+
+ /**
+ * Constructor.
+ *
+ * @param array $config
+ */
+ function phpbb_questionnaire_phpbb_data_provider($config)
+ {
+ // generate a unique id if necessary
+ if (empty($config['questionnaire_unique_id']))
+ {
+ $this->unique_id = unique_id();
+ set_config('questionnaire_unique_id', $this->unique_id);
+ }
+ else
+ {
+ $this->unique_id = $config['questionnaire_unique_id'];
+ }
+
+ $this->config = $config;
+ }
+
+ /**
+ * Returns a string identifier for this data provider
+ *
+ * @return string "phpBB"
+ */
+ function get_identifier()
+ {
+ return 'phpBB';
+ }
+
+ /**
+ * Get data about this phpBB installation.
+ *
+ * @return array Relevant anonymous config options
+ */
+ function get_data()
+ {
+ global $phpbb_root_path, $phpEx;
+ include("{$phpbb_root_path}config.$phpEx");
+
+ // Only send certain config vars
+ $config_vars = array(
+ 'active_sessions' => true,
+ 'allow_attachments' => true,
+ 'allow_autologin' => true,
+ 'allow_avatar' => true,
+ 'allow_avatar_local' => true,
+ 'allow_avatar_remote' => true,
+ 'allow_avatar_upload' => true,
+ 'allow_bbcode' => true,
+ 'allow_birthdays' => true,
+ 'allow_bookmarks' => true,
+ 'allow_emailreuse' => true,
+ 'allow_forum_notify' => true,
+ 'allow_mass_pm' => true,
+ 'allow_name_chars' => true,
+ 'allow_namechange' => true,
+ 'allow_nocensors' => true,
+ 'allow_pm_attach' => true,
+ 'allow_pm_report' => true,
+ 'allow_post_flash' => true,
+ 'allow_post_links' => true,
+ 'allow_privmsg' => true,
+ 'allow_quick_reply' => true,
+ 'allow_sig' => true,
+ 'allow_sig_bbcode' => true,
+ 'allow_sig_flash' => true,
+ 'allow_sig_img' => true,
+ 'allow_sig_links' => true,
+ 'allow_sig_pm' => true,
+ 'allow_sig_smilies' => true,
+ 'allow_smilies' => true,
+ 'allow_topic_notify' => true,
+ 'attachment_quota' => true,
+ 'auth_bbcode_pm' => true,
+ 'auth_flash_pm' => true,
+ 'auth_img_pm' => true,
+ 'auth_method' => true,
+ 'auth_smilies_pm' => true,
+ 'avatar_filesize' => true,
+ 'avatar_max_height' => true,
+ 'avatar_max_width' => true,
+ 'avatar_min_height' => true,
+ 'avatar_min_width' => true,
+ 'board_dst' => true,
+ 'board_email_form' => true,
+ 'board_hide_emails' => true,
+ 'board_timezone' => true,
+ 'browser_check' => true,
+ 'bump_interval' => true,
+ 'bump_type' => true,
+ 'cache_gc' => true,
+ 'captcha_plugin' => true,
+ 'captcha_gd' => true,
+ 'captcha_gd_foreground_noise' => true,
+ 'captcha_gd_x_grid' => true,
+ 'captcha_gd_y_grid' => true,
+ 'captcha_gd_wave' => true,
+ 'captcha_gd_3d_noise' => true,
+ 'captcha_gd_fonts' => true,
+ 'confirm_refresh' => true,
+ 'check_attachment_content' => true,
+ 'check_dnsbl' => true,
+ 'chg_passforce' => true,
+ 'cookie_secure' => true,
+ 'coppa_enable' => true,
+ 'database_gc' => true,
+ 'dbms_version' => true,
+ 'default_dateformat' => true,
+ 'display_last_edited' => true,
+ 'display_order' => true,
+ 'edit_time' => true,
+ 'email_check_mx' => true,
+ 'email_enable' => true,
+ 'email_function_name' => true,
+ 'email_package_size' => true,
+ 'enable_confirm' => true,
+ 'enable_pm_icons' => true,
+ 'enable_post_confirm' => true,
+ 'feed_enable' => true,
+ 'feed_limit' => true,
+ 'feed_overall_forums' => true,
+ 'feed_overall_forums_limit' => true,
+ 'feed_overall_topics' => true,
+ 'feed_overall_topics_limit' => true,
+ 'feed_forum' => true,
+ 'feed_topic' => true,
+ 'feed_item_statistics' => true,
+ 'flood_interval' => true,
+ 'force_server_vars' => true,
+ 'form_token_lifetime' => true,
+ 'form_token_mintime' => true,
+ 'form_token_sid_guests' => true,
+ 'forward_pm' => true,
+ 'forwarded_for_check' => true,
+ 'full_folder_action' => true,
+ 'fulltext_native_common_thres' => true,
+ 'fulltext_native_load_upd' => true,
+ 'fulltext_native_max_chars' => true,
+ 'fulltext_native_min_chars' => true,
+ 'gzip_compress' => true,
+ 'hot_threshold' => true,
+ 'img_create_thumbnail' => true,
+ 'img_display_inlined' => true,
+ 'img_imagick' => true,
+ 'img_link_height' => true,
+ 'img_link_width' => true,
+ 'img_max_height' => true,
+ 'img_max_thumb_width' => true,
+ 'img_max_width' => true,
+ 'img_min_thumb_filesize' => true,
+ 'ip_check' => true,
+ 'jab_enable' => true,
+ 'jab_package_size' => true,
+ 'jab_use_ssl' => true,
+ 'limit_load' => true,
+ 'limit_search_load' => true,
+ 'load_anon_lastread' => true,
+ 'load_birthdays' => true,
+ 'load_cpf_memberlist' => true,
+ 'load_cpf_viewprofile' => true,
+ 'load_cpf_viewtopic' => true,
+ 'load_db_lastread' => true,
+ 'load_db_track' => true,
+ 'load_jumpbox' => true,
+ 'load_moderators' => true,
+ 'load_online' => true,
+ 'load_online_guests' => true,
+ 'load_online_time' => true,
+ 'load_onlinetrack' => true,
+ 'load_search' => true,
+ 'load_tplcompile' => true,
+ 'load_user_activity' => true,
+ 'max_attachments' => true,
+ 'max_attachments_pm' => true,
+ 'max_autologin_time' => true,
+ 'max_filesize' => true,
+ 'max_filesize_pm' => true,
+ 'max_login_attempts' => true,
+ 'max_name_chars' => true,
+ 'max_num_search_keywords' => true,
+ 'max_pass_chars' => true,
+ 'max_poll_options' => true,
+ 'max_post_chars' => true,
+ 'max_post_font_size' => true,
+ 'max_post_img_height' => true,
+ 'max_post_img_width' => true,
+ 'max_post_smilies' => true,
+ 'max_post_urls' => true,
+ 'max_quote_depth' => true,
+ 'max_reg_attempts' => true,
+ 'max_sig_chars' => true,
+ 'max_sig_font_size' => true,
+ 'max_sig_img_height' => true,
+ 'max_sig_img_width' => true,
+ 'max_sig_smilies' => true,
+ 'max_sig_urls' => true,
+ 'min_name_chars' => true,
+ 'min_pass_chars' => true,
+ 'min_post_chars' => true,
+ 'min_search_author_chars' => true,
+ 'mime_triggers' => true,
+ 'new_member_post_limit' => true,
+ 'new_member_group_default' => true,
+ 'override_user_style' => true,
+ 'pass_complex' => true,
+ 'pm_edit_time' => true,
+ 'pm_max_boxes' => true,
+ 'pm_max_msgs' => true,
+ 'pm_max_recipients' => true,
+ 'posts_per_page' => true,
+ 'print_pm' => true,
+ 'queue_interval' => true,
+ 'require_activation' => true,
+ 'referer_validation' => true,
+ 'search_block_size' => true,
+ 'search_gc' => true,
+ 'search_interval' => true,
+ 'search_anonymous_interval' => true,
+ 'search_type' => true,
+ 'search_store_results' => true,
+ 'secure_allow_deny' => true,
+ 'secure_allow_empty_referer' => true,
+ 'secure_downloads' => true,
+ 'session_gc' => true,
+ 'session_length' => true,
+ 'smtp_auth_method' => true,
+ 'smtp_delivery' => true,
+ 'topics_per_page' => true,
+ 'tpl_allow_php' => true,
+ 'version' => true,
+ 'warnings_expire_days' => true,
+ 'warnings_gc' => true,
+
+ 'num_files' => true,
+ 'num_posts' => true,
+ 'num_topics' => true,
+ 'num_users' => true,
+ 'record_online_users' => true,
+ );
+
+ $result = array();
+ foreach ($config_vars as $name => $void)
+ {
+ if (isset($this->config[$name]))
+ {
+ $result['config_' . $name] = $this->config[$name];
+ }
+ }
+
+ $result['dbms'] = $dbms;
+ $result['acm_type'] = $acm_type;
+ $result['load_extensions'] = $load_extensions;
+ $result['user_agent'] = 'Unknown';
+
+ // Try to get user agent vendor and version
+ $match = array();
+ $user_agent = (!empty($_SERVER['HTTP_USER_AGENT'])) ? (string) $_SERVER['HTTP_USER_AGENT'] : '';
+ $agents = array('firefox', 'msie', 'opera', 'chrome', 'safari', 'mozilla', 'seamonkey', 'konqueror', 'netscape', 'gecko', 'navigator', 'mosaic', 'lynx', 'amaya', 'omniweb', 'avant', 'camino', 'flock', 'aol');
+
+ // We check here 1 by 1 because some strings occur after others (for example Mozilla [...] Firefox/)
+ foreach ($agents as $agent)
+ {
+ if (preg_match('#(' . $agent . ')[/ ]?([0-9.]*)#i', $user_agent, $match))
+ {
+ $result['user_agent'] = $match[1] . ' ' . $match[2];
+ break;
+ }
+ }
+
+ return $result;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php
new file mode 100644
index 0000000000..d1c1ff00d1
--- /dev/null
+++ b/phpBB/includes/search/fulltext_mysql.php
@@ -0,0 +1,932 @@
+<?php
+/**
+*
+* @package search
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @ignore
+*/
+include_once($phpbb_root_path . 'includes/search/search.' . $phpEx);
+
+/**
+* fulltext_mysql
+* Fulltext search for MySQL
+* @package search
+*/
+class fulltext_mysql extends search_backend
+{
+ var $stats = array();
+ var $word_length = array();
+ var $split_words = array();
+ var $search_query;
+ var $common_words = array();
+ var $pcre_properties = false;
+ var $mbstring_regex = false;
+
+ function fulltext_mysql(&$error)
+ {
+ global $config;
+
+ $this->word_length = array('min' => $config['fulltext_mysql_min_word_len'], 'max' => $config['fulltext_mysql_max_word_len']);
+
+ if (version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>=')))
+ {
+ // While this is the proper range of PHP versions, PHP may not be linked with the bundled PCRE lib and instead with an older version
+ if (@preg_match('/\p{L}/u', 'a') !== false)
+ {
+ $this->pcre_properties = true;
+ }
+ }
+
+ if (function_exists('mb_ereg'))
+ {
+ $this->mbstring_regex = true;
+ mb_regex_encoding('UTF-8');
+ }
+
+ $error = false;
+ }
+
+ /**
+ * Checks for correct MySQL version and stores min/max word length in the config
+ */
+ function init()
+ {
+ global $db, $user;
+
+ if ($db->sql_layer != 'mysql4' && $db->sql_layer != 'mysqli')
+ {
+ return $user->lang['FULLTEXT_MYSQL_INCOMPATIBLE_VERSION'];
+ }
+
+ $result = $db->sql_query('SHOW TABLE STATUS LIKE \'' . POSTS_TABLE . '\'');
+ $info = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $engine = '';
+ if (isset($info['Engine']))
+ {
+ $engine = $info['Engine'];
+ }
+ else if (isset($info['Type']))
+ {
+ $engine = $info['Type'];
+ }
+
+ if ($engine != 'MyISAM')
+ {
+ return $user->lang['FULLTEXT_MYSQL_NOT_MYISAM'];
+ }
+
+ $sql = 'SHOW VARIABLES
+ LIKE \'ft\_%\'';
+ $result = $db->sql_query($sql);
+
+ $mysql_info = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $mysql_info[$row['Variable_name']] = $row['Value'];
+ }
+ $db->sql_freeresult($result);
+
+ set_config('fulltext_mysql_max_word_len', $mysql_info['ft_max_word_len']);
+ set_config('fulltext_mysql_min_word_len', $mysql_info['ft_min_word_len']);
+
+ return false;
+ }
+
+ /**
+ * Splits keywords entered by a user into an array of words stored in $this->split_words
+ * Stores the tidied search query in $this->search_query
+ *
+ * @param string &$keywords Contains the keyword as entered by the user
+ * @param string $terms is either 'all' or 'any'
+ * @return bool false if no valid keywords were found and otherwise true
+ */
+ function split_keywords(&$keywords, $terms)
+ {
+ global $config, $user;
+
+ if ($terms == 'all')
+ {
+ $match = array('#\sand\s#iu', '#\sor\s#iu', '#\snot\s#iu', '#\+#', '#-#', '#\|#');
+ $replace = array(' +', ' |', ' -', ' +', ' -', ' |');
+
+ $keywords = preg_replace($match, $replace, $keywords);
+ }
+
+ // Filter out as above
+ $split_keywords = preg_replace("#[\n\r\t]+#", ' ', trim(htmlspecialchars_decode($keywords)));
+
+ // Split words
+ if ($this->pcre_properties)
+ {
+ $split_keywords = preg_replace('#([^\p{L}\p{N}\'*"()])#u', '$1$1', str_replace('\'\'', '\' \'', trim($split_keywords)));
+ }
+ else if ($this->mbstring_regex)
+ {
+ $split_keywords = mb_ereg_replace('([^\w\'*"()])', '\\1\\1', str_replace('\'\'', '\' \'', trim($split_keywords)));
+ }
+ else
+ {
+ $split_keywords = preg_replace('#([^\w\'*"()])#u', '$1$1', str_replace('\'\'', '\' \'', trim($split_keywords)));
+ }
+
+ if ($this->pcre_properties)
+ {
+ $matches = array();
+ preg_match_all('#(?:[^\p{L}\p{N}*"()]|^)([+\-|]?(?:[\p{L}\p{N}*"()]+\'?)*[\p{L}\p{N}*"()])(?:[^\p{L}\p{N}*"()]|$)#u', $split_keywords, $matches);
+ $this->split_words = $matches[1];
+ }
+ else if ($this->mbstring_regex)
+ {
+ mb_ereg_search_init($split_keywords, '(?:[^\w*"()]|^)([+\-|]?(?:[\w*"()]+\'?)*[\w*"()])(?:[^\w*"()]|$)');
+
+ while (($word = mb_ereg_search_regs()))
+ {
+ $this->split_words[] = $word[1];
+ }
+ }
+ else
+ {
+ $matches = array();
+ preg_match_all('#(?:[^\w*"()]|^)([+\-|]?(?:[\w*"()]+\'?)*[\w*"()])(?:[^\w*"()]|$)#u', $split_keywords, $matches);
+ $this->split_words = $matches[1];
+ }
+
+ // We limit the number of allowed keywords to minimize load on the database
+ if ($config['max_num_search_keywords'] && sizeof($this->split_words) > $config['max_num_search_keywords'])
+ {
+ trigger_error($user->lang('MAX_NUM_SEARCH_KEYWORDS_REFINE', $config['max_num_search_keywords'], sizeof($this->split_words)));
+ }
+
+ // to allow phrase search, we need to concatenate quoted words
+ $tmp_split_words = array();
+ $phrase = '';
+ foreach ($this->split_words as $word)
+ {
+ if ($phrase)
+ {
+ $phrase .= ' ' . $word;
+ if (strpos($word, '"') !== false && substr_count($word, '"') % 2 == 1)
+ {
+ $tmp_split_words[] = $phrase;
+ $phrase = '';
+ }
+ }
+ else if (strpos($word, '"') !== false && substr_count($word, '"') % 2 == 1)
+ {
+ $phrase = $word;
+ }
+ else
+ {
+ $tmp_split_words[] = $word . ' ';
+ }
+ }
+ if ($phrase)
+ {
+ $tmp_split_words[] = $phrase;
+ }
+
+ $this->split_words = $tmp_split_words;
+
+ unset($tmp_split_words);
+ unset($phrase);
+
+ foreach ($this->split_words as $i => $word)
+ {
+ $clean_word = preg_replace('#^[+\-|"]#', '', $word);
+
+ // check word length
+ $clean_len = utf8_strlen(str_replace('*', '', $clean_word));
+ if (($clean_len < $config['fulltext_mysql_min_word_len']) || ($clean_len > $config['fulltext_mysql_max_word_len']))
+ {
+ $this->common_words[] = $word;
+ unset($this->split_words[$i]);
+ }
+ }
+
+ if ($terms == 'any')
+ {
+ $this->search_query = '';
+ foreach ($this->split_words as $word)
+ {
+ if ((strpos($word, '+') === 0) || (strpos($word, '-') === 0) || (strpos($word, '|') === 0))
+ {
+ $word = substr($word, 1);
+ }
+ $this->search_query .= $word . ' ';
+ }
+ }
+ else
+ {
+ $this->search_query = '';
+ foreach ($this->split_words as $word)
+ {
+ if ((strpos($word, '+') === 0) || (strpos($word, '-') === 0))
+ {
+ $this->search_query .= $word . ' ';
+ }
+ else if (strpos($word, '|') === 0)
+ {
+ $this->search_query .= substr($word, 1) . ' ';
+ }
+ else
+ {
+ $this->search_query .= '+' . $word . ' ';
+ }
+ }
+ }
+
+ $this->search_query = utf8_htmlspecialchars($this->search_query);
+
+ if ($this->search_query)
+ {
+ $this->split_words = array_values($this->split_words);
+ sort($this->split_words);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Turns text into an array of words
+ */
+ function split_message($text)
+ {
+ global $config;
+
+ // Split words
+ if ($this->pcre_properties)
+ {
+ $text = preg_replace('#([^\p{L}\p{N}\'*])#u', '$1$1', str_replace('\'\'', '\' \'', trim($text)));
+ }
+ else if ($this->mbstring_regex)
+ {
+ $text = mb_ereg_replace('([^\w\'*])', '\\1\\1', str_replace('\'\'', '\' \'', trim($text)));
+ }
+ else
+ {
+ $text = preg_replace('#([^\w\'*])#u', '$1$1', str_replace('\'\'', '\' \'', trim($text)));
+ }
+
+ if ($this->pcre_properties)
+ {
+ $matches = array();
+ preg_match_all('#(?:[^\p{L}\p{N}*]|^)([+\-|]?(?:[\p{L}\p{N}*]+\'?)*[\p{L}\p{N}*])(?:[^\p{L}\p{N}*]|$)#u', $text, $matches);
+ $text = $matches[1];
+ }
+ else if ($this->mbstring_regex)
+ {
+ mb_ereg_search_init($text, '(?:[^\w*]|^)([+\-|]?(?:[\w*]+\'?)*[\w*])(?:[^\w*]|$)');
+
+ $text = array();
+ while (($word = mb_ereg_search_regs()))
+ {
+ $text[] = $word[1];
+ }
+ }
+ else
+ {
+ $matches = array();
+ preg_match_all('#(?:[^\w*]|^)([+\-|]?(?:[\w*]+\'?)*[\w*])(?:[^\w*]|$)#u', $text, $matches);
+ $text = $matches[1];
+ }
+
+ // remove too short or too long words
+ $text = array_values($text);
+ for ($i = 0, $n = sizeof($text); $i < $n; $i++)
+ {
+ $text[$i] = trim($text[$i]);
+ if (utf8_strlen($text[$i]) < $config['fulltext_mysql_min_word_len'] || utf8_strlen($text[$i]) > $config['fulltext_mysql_max_word_len'])
+ {
+ unset($text[$i]);
+ }
+ }
+
+ return array_values($text);
+ }
+
+ /**
+ * Performs a search on keywords depending on display specific params. You have to run split_keywords() first.
+ *
+ * @param string $type contains either posts or topics depending on what should be searched for
+ * @param string $fields contains either titleonly (topic titles should be searched), msgonly (only message bodies should be searched), firstpost (only subject and body of the first post should be searched) or all (all post bodies and subjects should be searched)
+ * @param string $terms is either 'all' (use query as entered, words without prefix should default to "have to be in field") or 'any' (ignore search query parts and just return all posts that contain any of the specified words)
+ * @param array $sort_by_sql contains SQL code for the ORDER BY part of a query
+ * @param string $sort_key is the key of $sort_by_sql for the selected sorting
+ * @param string $sort_dir is either a or d representing ASC and DESC
+ * @param string $sort_days specifies the maximum amount of days a post may be old
+ * @param array $ex_fid_ary specifies an array of forum ids which should not be searched
+ * @param array $m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts
+ * @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
+ * @param array $author_ary an array of author ids if the author should be ignored during the search the array is empty
+ * @param string $author_name specifies the author match, when ANONYMOUS is also a search-match
+ * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
+ * @param int $start indicates the first index of the page
+ * @param int $per_page number of ids each page is supposed to contain
+ * @return boolean|int total number of results
+ *
+ * @access public
+ */
+ function keyword_search($type, $fields, $terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_ary, $author_name, &$id_ary, $start, $per_page)
+ {
+ global $config, $db;
+
+ // No keywords? No posts.
+ if (!$this->search_query)
+ {
+ return false;
+ }
+
+ // generate a search_key from all the options to identify the results
+ $search_key = md5(implode('#', array(
+ implode(', ', $this->split_words),
+ $type,
+ $fields,
+ $terms,
+ $sort_days,
+ $sort_key,
+ $topic_id,
+ implode(',', $ex_fid_ary),
+ implode(',', $m_approve_fid_ary),
+ implode(',', $author_ary)
+ )));
+
+ // try reading the results from cache
+ $result_count = 0;
+ if ($this->obtain_ids($search_key, $result_count, $id_ary, $start, $per_page, $sort_dir) == SEARCH_RESULT_IN_CACHE)
+ {
+ return $result_count;
+ }
+
+ $id_ary = array();
+
+ $join_topic = ($type == 'posts') ? false : true;
+
+ // Build sql strings for sorting
+ $sql_sort = $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
+ $sql_sort_table = $sql_sort_join = '';
+
+ switch ($sql_sort[0])
+ {
+ case 'u':
+ $sql_sort_table = USERS_TABLE . ' u, ';
+ $sql_sort_join = ($type == 'posts') ? ' AND u.user_id = p.poster_id ' : ' AND u.user_id = t.topic_poster ';
+ break;
+
+ case 't':
+ $join_topic = true;
+ break;
+
+ case 'f':
+ $sql_sort_table = FORUMS_TABLE . ' f, ';
+ $sql_sort_join = ' AND f.forum_id = p.forum_id ';
+ break;
+ }
+
+ // Build some display specific sql strings
+ switch ($fields)
+ {
+ case 'titleonly':
+ $sql_match = 'p.post_subject';
+ $sql_match_where = ' AND p.post_id = t.topic_first_post_id';
+ $join_topic = true;
+ break;
+
+ case 'msgonly':
+ $sql_match = 'p.post_text';
+ $sql_match_where = '';
+ break;
+
+ case 'firstpost':
+ $sql_match = 'p.post_subject, p.post_text';
+ $sql_match_where = ' AND p.post_id = t.topic_first_post_id';
+ $join_topic = true;
+ break;
+
+ default:
+ $sql_match = 'p.post_subject, p.post_text';
+ $sql_match_where = '';
+ break;
+ }
+
+ if (!sizeof($m_approve_fid_ary))
+ {
+ $m_approve_fid_sql = ' AND p.post_approved = 1';
+ }
+ else if ($m_approve_fid_ary === array(-1))
+ {
+ $m_approve_fid_sql = '';
+ }
+ else
+ {
+ $m_approve_fid_sql = ' AND (p.post_approved = 1 OR ' . $db->sql_in_set('p.forum_id', $m_approve_fid_ary, true) . ')';
+ }
+
+ $sql_select = (!$result_count) ? 'SQL_CALC_FOUND_ROWS ' : '';
+ $sql_select = ($type == 'posts') ? $sql_select . 'p.post_id' : 'DISTINCT ' . $sql_select . 't.topic_id';
+ $sql_from = ($join_topic) ? TOPICS_TABLE . ' t, ' : '';
+ $field = ($type == 'posts') ? 'post_id' : 'topic_id';
+ if (sizeof($author_ary) && $author_name)
+ {
+ // first one matches post of registered users, second one guests and deleted users
+ $sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
+ }
+ else if (sizeof($author_ary))
+ {
+ $sql_author = ' AND ' . $db->sql_in_set('p.poster_id', $author_ary);
+ }
+ else
+ {
+ $sql_author = '';
+ }
+
+ $sql_where_options = $sql_sort_join;
+ $sql_where_options .= ($topic_id) ? ' AND p.topic_id = ' . $topic_id : '';
+ $sql_where_options .= ($join_topic) ? ' AND t.topic_id = p.topic_id' : '';
+ $sql_where_options .= (sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '';
+ $sql_where_options .= $m_approve_fid_sql;
+ $sql_where_options .= $sql_author;
+ $sql_where_options .= ($sort_days) ? ' AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
+ $sql_where_options .= $sql_match_where;
+
+ $sql = "SELECT $sql_select
+ FROM $sql_from$sql_sort_table" . POSTS_TABLE . " p
+ WHERE MATCH ($sql_match) AGAINST ('" . $db->sql_escape(htmlspecialchars_decode($this->search_query)) . "' IN BOOLEAN MODE)
+ $sql_where_options
+ ORDER BY $sql_sort";
+ $result = $db->sql_query_limit($sql, $config['search_block_size'], $start);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $id_ary[] = $row[$field];
+ }
+ $db->sql_freeresult($result);
+
+ $id_ary = array_unique($id_ary);
+
+ if (!sizeof($id_ary))
+ {
+ return false;
+ }
+
+ // if the total result count is not cached yet, retrieve it from the db
+ if (!$result_count)
+ {
+ $sql = 'SELECT FOUND_ROWS() as result_count';
+ $result = $db->sql_query($sql);
+ $result_count = (int) $db->sql_fetchfield('result_count');
+ $db->sql_freeresult($result);
+
+ if (!$result_count)
+ {
+ return false;
+ }
+ }
+
+ // store the ids, from start on then delete anything that isn't on the current page because we only need ids for one page
+ $this->save_ids($search_key, implode(' ', $this->split_words), $author_ary, $result_count, $id_ary, $start, $sort_dir);
+ $id_ary = array_slice($id_ary, 0, (int) $per_page);
+
+ return $result_count;
+ }
+
+ /**
+ * Performs a search on an author's posts without caring about message contents. Depends on display specific params
+ *
+ * @param string $type contains either posts or topics depending on what should be searched for
+ * @param boolean $firstpost_only if true, only topic starting posts will be considered
+ * @param array $sort_by_sql contains SQL code for the ORDER BY part of a query
+ * @param string $sort_key is the key of $sort_by_sql for the selected sorting
+ * @param string $sort_dir is either a or d representing ASC and DESC
+ * @param string $sort_days specifies the maximum amount of days a post may be old
+ * @param array $ex_fid_ary specifies an array of forum ids which should not be searched
+ * @param array $m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts
+ * @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
+ * @param array $author_ary an array of author ids
+ * @param string $author_name specifies the author match, when ANONYMOUS is also a search-match
+ * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
+ * @param int $start indicates the first index of the page
+ * @param int $per_page number of ids each page is supposed to contain
+ * @return boolean|int total number of results
+ *
+ * @access public
+ */
+ function author_search($type, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_ary, $author_name, &$id_ary, $start, $per_page)
+ {
+ global $config, $db;
+
+ // No author? No posts.
+ if (!sizeof($author_ary))
+ {
+ return 0;
+ }
+
+ // generate a search_key from all the options to identify the results
+ $search_key = md5(implode('#', array(
+ '',
+ $type,
+ ($firstpost_only) ? 'firstpost' : '',
+ '',
+ '',
+ $sort_days,
+ $sort_key,
+ $topic_id,
+ implode(',', $ex_fid_ary),
+ implode(',', $m_approve_fid_ary),
+ implode(',', $author_ary),
+ $author_name,
+ )));
+
+ // try reading the results from cache
+ $result_count = 0;
+ if ($this->obtain_ids($search_key, $result_count, $id_ary, $start, $per_page, $sort_dir) == SEARCH_RESULT_IN_CACHE)
+ {
+ return $result_count;
+ }
+
+ $id_ary = array();
+
+ // Create some display specific sql strings
+ if ($author_name)
+ {
+ // first one matches post of registered users, second one guests and deleted users
+ $sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
+ }
+ else
+ {
+ $sql_author = $db->sql_in_set('p.poster_id', $author_ary);
+ }
+ $sql_fora = (sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '';
+ $sql_topic_id = ($topic_id) ? ' AND p.topic_id = ' . (int) $topic_id : '';
+ $sql_time = ($sort_days) ? ' AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
+ $sql_firstpost = ($firstpost_only) ? ' AND p.post_id = t.topic_first_post_id' : '';
+
+ // Build sql strings for sorting
+ $sql_sort = $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
+ $sql_sort_table = $sql_sort_join = '';
+ switch ($sql_sort[0])
+ {
+ case 'u':
+ $sql_sort_table = USERS_TABLE . ' u, ';
+ $sql_sort_join = ($type == 'posts') ? ' AND u.user_id = p.poster_id ' : ' AND u.user_id = t.topic_poster ';
+ break;
+
+ case 't':
+ $sql_sort_table = ($type == 'posts' && !$firstpost_only) ? TOPICS_TABLE . ' t, ' : '';
+ $sql_sort_join = ($type == 'posts' && !$firstpost_only) ? ' AND t.topic_id = p.topic_id ' : '';
+ break;
+
+ case 'f':
+ $sql_sort_table = FORUMS_TABLE . ' f, ';
+ $sql_sort_join = ' AND f.forum_id = p.forum_id ';
+ break;
+ }
+
+ if (!sizeof($m_approve_fid_ary))
+ {
+ $m_approve_fid_sql = ' AND p.post_approved = 1';
+ }
+ else if ($m_approve_fid_ary == array(-1))
+ {
+ $m_approve_fid_sql = '';
+ }
+ else
+ {
+ $m_approve_fid_sql = ' AND (p.post_approved = 1 OR ' . $db->sql_in_set('p.forum_id', $m_approve_fid_ary, true) . ')';
+ }
+
+ // If the cache was completely empty count the results
+ $calc_results = ($result_count) ? '' : 'SQL_CALC_FOUND_ROWS ';
+
+ // Build the query for really selecting the post_ids
+ if ($type == 'posts')
+ {
+ $sql = "SELECT {$calc_results}p.post_id
+ FROM " . $sql_sort_table . POSTS_TABLE . ' p' . (($firstpost_only) ? ', ' . TOPICS_TABLE . ' t ' : ' ') . "
+ WHERE $sql_author
+ $sql_topic_id
+ $sql_firstpost
+ $m_approve_fid_sql
+ $sql_fora
+ $sql_sort_join
+ $sql_time
+ ORDER BY $sql_sort";
+ $field = 'post_id';
+ }
+ else
+ {
+ $sql = "SELECT {$calc_results}t.topic_id
+ FROM " . $sql_sort_table . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
+ WHERE $sql_author
+ $sql_topic_id
+ $sql_firstpost
+ $m_approve_fid_sql
+ $sql_fora
+ AND t.topic_id = p.topic_id
+ $sql_sort_join
+ $sql_time
+ GROUP BY t.topic_id
+ ORDER BY $sql_sort";
+ $field = 'topic_id';
+ }
+
+ // Only read one block of posts from the db and then cache it
+ $result = $db->sql_query_limit($sql, $config['search_block_size'], $start);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $id_ary[] = $row[$field];
+ }
+ $db->sql_freeresult($result);
+
+ // retrieve the total result count if needed
+ if (!$result_count)
+ {
+ $sql = 'SELECT FOUND_ROWS() as result_count';
+ $result = $db->sql_query($sql);
+ $result_count = (int) $db->sql_fetchfield('result_count');
+ $db->sql_freeresult($result);
+
+ if (!$result_count)
+ {
+ return false;
+ }
+ }
+
+ if (sizeof($id_ary))
+ {
+ $this->save_ids($search_key, '', $author_ary, $result_count, $id_ary, $start, $sort_dir);
+ $id_ary = array_slice($id_ary, 0, $per_page);
+
+ return $result_count;
+ }
+ return false;
+ }
+
+ /**
+ * Destroys cached search results, that contained one of the new words in a post so the results won't be outdated.
+ *
+ * @param string $mode contains the post mode: edit, post, reply, quote ...
+ */
+ function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id)
+ {
+ global $db;
+
+ // Split old and new post/subject to obtain array of words
+ $split_text = $this->split_message($message);
+ $split_title = ($subject) ? $this->split_message($subject) : array();
+
+ $words = array_unique(array_merge($split_text, $split_title));
+
+ unset($split_text);
+ unset($split_title);
+
+ // destroy cached search results containing any of the words removed or added
+ $this->destroy_cache($words, array($poster_id));
+
+ unset($words);
+ }
+
+ /**
+ * Destroy cached results, that might be outdated after deleting a post
+ */
+ function index_remove($post_ids, $author_ids, $forum_ids)
+ {
+ $this->destroy_cache(array(), $author_ids);
+ }
+
+ /**
+ * Destroy old cache entries
+ */
+ function tidy()
+ {
+ global $db, $config;
+
+ // destroy too old cached search results
+ $this->destroy_cache(array());
+
+ set_config('search_last_gc', time(), true);
+ }
+
+ /**
+ * Create fulltext index
+ */
+ function create_index($acp_module, $u_action)
+ {
+ global $db;
+
+ // Make sure we can actually use MySQL with fulltext indexes
+ if ($error = $this->init())
+ {
+ return $error;
+ }
+
+ if (empty($this->stats))
+ {
+ $this->get_stats();
+ }
+
+ $alter = array();
+
+ if (!isset($this->stats['post_subject']))
+ {
+ if ($db->sql_layer == 'mysqli' || version_compare($db->sql_server_info(true), '4.1.3', '>='))
+ {
+ //$alter[] = 'MODIFY post_subject varchar(100) COLLATE utf8_unicode_ci DEFAULT \'\' NOT NULL';
+ }
+ else
+ {
+ $alter[] = 'MODIFY post_subject text NOT NULL';
+ }
+ $alter[] = 'ADD FULLTEXT (post_subject)';
+ }
+
+ if (!isset($this->stats['post_text']))
+ {
+ if ($db->sql_layer == 'mysqli' || version_compare($db->sql_server_info(true), '4.1.3', '>='))
+ {
+ $alter[] = 'MODIFY post_text mediumtext COLLATE utf8_unicode_ci NOT NULL';
+ }
+ else
+ {
+ $alter[] = 'MODIFY post_text mediumtext NOT NULL';
+ }
+ $alter[] = 'ADD FULLTEXT (post_text)';
+ }
+
+ if (!isset($this->stats['post_content']))
+ {
+ $alter[] = 'ADD FULLTEXT post_content (post_subject, post_text)';
+ }
+
+ if (sizeof($alter))
+ {
+ $db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' ' . implode(', ', $alter));
+ }
+
+ $db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE);
+
+ return false;
+ }
+
+ /**
+ * Drop fulltext index
+ */
+ function delete_index($acp_module, $u_action)
+ {
+ global $db;
+
+ // Make sure we can actually use MySQL with fulltext indexes
+ if ($error = $this->init())
+ {
+ return $error;
+ }
+
+ if (empty($this->stats))
+ {
+ $this->get_stats();
+ }
+
+ $alter = array();
+
+ if (isset($this->stats['post_subject']))
+ {
+ $alter[] = 'DROP INDEX post_subject';
+ }
+
+ if (isset($this->stats['post_text']))
+ {
+ $alter[] = 'DROP INDEX post_text';
+ }
+
+ if (isset($this->stats['post_content']))
+ {
+ $alter[] = 'DROP INDEX post_content';
+ }
+
+ if (sizeof($alter))
+ {
+ $db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' ' . implode(', ', $alter));
+ }
+
+ $db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE);
+
+ return false;
+ }
+
+ /**
+ * Returns true if both FULLTEXT indexes exist
+ */
+ function index_created()
+ {
+ if (empty($this->stats))
+ {
+ $this->get_stats();
+ }
+
+ return (isset($this->stats['post_text']) && isset($this->stats['post_subject']) && isset($this->stats['post_content'])) ? true : false;
+ }
+
+ /**
+ * Returns an associative array containing information about the indexes
+ */
+ function index_stats()
+ {
+ global $user;
+
+ if (empty($this->stats))
+ {
+ $this->get_stats();
+ }
+
+ return array(
+ $user->lang['FULLTEXT_MYSQL_TOTAL_POSTS'] => ($this->index_created()) ? $this->stats['total_posts'] : 0,
+ );
+ }
+
+ function get_stats()
+ {
+ global $db;
+
+ if (strpos($db->sql_layer, 'mysql') === false)
+ {
+ $this->stats = array();
+ return;
+ }
+
+ $sql = 'SHOW INDEX
+ FROM ' . POSTS_TABLE;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // deal with older MySQL versions which didn't use Index_type
+ $index_type = (isset($row['Index_type'])) ? $row['Index_type'] : $row['Comment'];
+
+ if ($index_type == 'FULLTEXT')
+ {
+ if ($row['Key_name'] == 'post_text')
+ {
+ $this->stats['post_text'] = $row;
+ }
+ else if ($row['Key_name'] == 'post_subject')
+ {
+ $this->stats['post_subject'] = $row;
+ }
+ else if ($row['Key_name'] == 'post_content')
+ {
+ $this->stats['post_content'] = $row;
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT COUNT(post_id) as total_posts
+ FROM ' . POSTS_TABLE;
+ $result = $db->sql_query($sql);
+ $this->stats['total_posts'] = (int) $db->sql_fetchfield('total_posts');
+ $db->sql_freeresult($result);
+ }
+
+ /**
+ * Display a note, that UTF-8 support is not available with certain versions of PHP
+ */
+ function acp()
+ {
+ global $user, $config;
+
+ $tpl = '
+ <dl>
+ <dt><label>' . $user->lang['FULLTEXT_MYSQL_PCRE'] . '</label><br /><span>' . $user->lang['FULLTEXT_MYSQL_PCRE_EXPLAIN'] . '</span></dt>
+ <dd>' . (($this->pcre_properties) ? $user->lang['YES'] : $user->lang['NO']) . ' (PHP ' . PHP_VERSION . ')</dd>
+ </dl>
+ <dl>
+ <dt><label>' . $user->lang['FULLTEXT_MYSQL_MBSTRING'] . '</label><br /><span>' . $user->lang['FULLTEXT_MYSQL_MBSTRING_EXPLAIN'] . '</span></dt>
+ <dd>' . (($this->mbstring_regex) ? $user->lang['YES'] : $user->lang['NO']). '</dd>
+ </dl>
+ ';
+
+ // These are fields required in the config table
+ return array(
+ 'tpl' => $tpl,
+ 'config' => array()
+ );
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php
new file mode 100644
index 0000000000..5af3929ccd
--- /dev/null
+++ b/phpBB/includes/search/fulltext_native.php
@@ -0,0 +1,1742 @@
+<?php
+/**
+*
+* @package search
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @ignore
+*/
+include_once($phpbb_root_path . 'includes/search/search.' . $phpEx);
+
+/**
+* fulltext_native
+* phpBB's own db driven fulltext search, version 2
+* @package search
+*/
+class fulltext_native extends search_backend
+{
+ var $stats = array();
+ var $word_length = array();
+ var $search_query;
+ var $common_words = array();
+
+ var $must_contain_ids = array();
+ var $must_not_contain_ids = array();
+ var $must_exclude_one_ids = array();
+
+ /**
+ * Initialises the fulltext_native search backend with min/max word length and makes sure the UTF-8 normalizer is loaded.
+ *
+ * @param boolean|string &$error is passed by reference and should either be set to false on success or an error message on failure.
+ *
+ * @access public
+ */
+ function fulltext_native(&$error)
+ {
+ global $phpbb_root_path, $phpEx, $config;
+
+ $this->word_length = array('min' => $config['fulltext_native_min_chars'], 'max' => $config['fulltext_native_max_chars']);
+
+ /**
+ * Load the UTF tools
+ */
+ if (!class_exists('utf_normalizer'))
+ {
+ include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
+ }
+
+
+ $error = false;
+ }
+
+ /**
+ * This function fills $this->search_query with the cleaned user search query.
+ *
+ * If $terms is 'any' then the words will be extracted from the search query
+ * and combined with | inside brackets. They will afterwards be treated like
+ * an standard search query.
+ *
+ * Then it analyses the query and fills the internal arrays $must_not_contain_ids,
+ * $must_contain_ids and $must_exclude_one_ids which are later used by keyword_search().
+ *
+ * @param string $keywords contains the search query string as entered by the user
+ * @param string $terms is either 'all' (use search query as entered, default words to 'must be contained in post')
+ * or 'any' (find all posts containing at least one of the given words)
+ * @return boolean false if no valid keywords were found and otherwise true
+ *
+ * @access public
+ */
+ function split_keywords($keywords, $terms)
+ {
+ global $db, $user, $config;
+
+ $keywords = trim($this->cleanup($keywords, '+-|()*'));
+
+ // allow word|word|word without brackets
+ if ((strpos($keywords, ' ') === false) && (strpos($keywords, '|') !== false) && (strpos($keywords, '(') === false))
+ {
+ $keywords = '(' . $keywords . ')';
+ }
+
+ $open_bracket = $space = false;
+ for ($i = 0, $n = strlen($keywords); $i < $n; $i++)
+ {
+ if ($open_bracket !== false)
+ {
+ switch ($keywords[$i])
+ {
+ case ')':
+ if ($open_bracket + 1 == $i)
+ {
+ $keywords[$i - 1] = '|';
+ $keywords[$i] = '|';
+ }
+ $open_bracket = false;
+ break;
+ case '(':
+ $keywords[$i] = '|';
+ break;
+ case '+':
+ case '-':
+ case ' ':
+ $keywords[$i] = '|';
+ break;
+ }
+ }
+ else
+ {
+ switch ($keywords[$i])
+ {
+ case ')':
+ $keywords[$i] = ' ';
+ break;
+ case '(':
+ $open_bracket = $i;
+ $space = false;
+ break;
+ case '|':
+ $keywords[$i] = ' ';
+ break;
+ case '-':
+ case '+':
+ $space = $keywords[$i];
+ break;
+ case ' ':
+ if ($space !== false)
+ {
+ $keywords[$i] = $space;
+ }
+ break;
+ default:
+ $space = false;
+ }
+ }
+ }
+
+ if ($open_bracket)
+ {
+ $keywords .= ')';
+ }
+
+ $match = array(
+ '# +#',
+ '#\|\|+#',
+ '#(\+|\-)(?:\+|\-)+#',
+ '#\(\|#',
+ '#\|\)#',
+ );
+ $replace = array(
+ ' ',
+ '|',
+ '$1',
+ '(',
+ ')',
+ );
+
+ $keywords = preg_replace($match, $replace, $keywords);
+ $num_keywords = sizeof(explode(' ', $keywords));
+
+ // We limit the number of allowed keywords to minimize load on the database
+ if ($config['max_num_search_keywords'] && $num_keywords > $config['max_num_search_keywords'])
+ {
+ trigger_error($user->lang('MAX_NUM_SEARCH_KEYWORDS_REFINE', $config['max_num_search_keywords'], $num_keywords));
+ }
+
+ // $keywords input format: each word separated by a space, words in a bracket are not separated
+
+ // the user wants to search for any word, convert the search query
+ if ($terms == 'any')
+ {
+ $words = array();
+
+ preg_match_all('#([^\\s+\\-|()]+)(?:$|[\\s+\\-|()])#u', $keywords, $words);
+ if (sizeof($words[1]))
+ {
+ $keywords = '(' . implode('|', $words[1]) . ')';
+ }
+ }
+
+ // set the search_query which is shown to the user
+ $this->search_query = $keywords;
+
+ $exact_words = array();
+ preg_match_all('#([^\\s+\\-|*()]+)(?:$|[\\s+\\-|()])#u', $keywords, $exact_words);
+ $exact_words = $exact_words[1];
+
+ $common_ids = $words = array();
+
+ if (sizeof($exact_words))
+ {
+ $sql = 'SELECT word_id, word_text, word_common
+ FROM ' . SEARCH_WORDLIST_TABLE . '
+ WHERE ' . $db->sql_in_set('word_text', $exact_words);
+ $result = $db->sql_query($sql);
+
+ // store an array of words and ids, remove common words
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['word_common'])
+ {
+ $this->common_words[] = $row['word_text'];
+ $common_ids[$row['word_text']] = (int) $row['word_id'];
+ continue;
+ }
+
+ $words[$row['word_text']] = (int) $row['word_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+ unset($exact_words);
+
+ // now analyse the search query, first split it using the spaces
+ $query = explode(' ', $keywords);
+
+ $this->must_contain_ids = array();
+ $this->must_not_contain_ids = array();
+ $this->must_exclude_one_ids = array();
+
+ $mode = '';
+ $ignore_no_id = true;
+
+ foreach ($query as $word)
+ {
+ if (empty($word))
+ {
+ continue;
+ }
+
+ // words which should not be included
+ if ($word[0] == '-')
+ {
+ $word = substr($word, 1);
+
+ // a group of which at least one may not be in the resulting posts
+ if ($word[0] == '(')
+ {
+ $word = array_unique(explode('|', substr($word, 1, -1)));
+ $mode = 'must_exclude_one';
+ }
+ // one word which should not be in the resulting posts
+ else
+ {
+ $mode = 'must_not_contain';
+ }
+ $ignore_no_id = true;
+ }
+ // words which have to be included
+ else
+ {
+ // no prefix is the same as a +prefix
+ if ($word[0] == '+')
+ {
+ $word = substr($word, 1);
+ }
+
+ // a group of words of which at least one word should be in every resulting post
+ if ($word[0] == '(')
+ {
+ $word = array_unique(explode('|', substr($word, 1, -1)));
+ }
+ $ignore_no_id = false;
+ $mode = 'must_contain';
+ }
+
+ if (empty($word))
+ {
+ continue;
+ }
+
+ // if this is an array of words then retrieve an id for each
+ if (is_array($word))
+ {
+ $non_common_words = array();
+ $id_words = array();
+ foreach ($word as $i => $word_part)
+ {
+ if (strpos($word_part, '*') !== false)
+ {
+ $id_words[] = '\'' . $db->sql_escape(str_replace('*', '%', $word_part)) . '\'';
+ $non_common_words[] = $word_part;
+ }
+ else if (isset($words[$word_part]))
+ {
+ $id_words[] = $words[$word_part];
+ $non_common_words[] = $word_part;
+ }
+ else
+ {
+ $len = utf8_strlen($word_part);
+ if ($len < $this->word_length['min'] || $len > $this->word_length['max'])
+ {
+ $this->common_words[] = $word_part;
+ }
+ }
+ }
+ if (sizeof($id_words))
+ {
+ sort($id_words);
+ if (sizeof($id_words) > 1)
+ {
+ $this->{$mode . '_ids'}[] = $id_words;
+ }
+ else
+ {
+ $mode = ($mode == 'must_exclude_one') ? 'must_not_contain' : $mode;
+ $this->{$mode . '_ids'}[] = $id_words[0];
+ }
+ }
+ // throw an error if we shall not ignore unexistant words
+ else if (!$ignore_no_id && sizeof($non_common_words))
+ {
+ trigger_error(sprintf($user->lang['WORDS_IN_NO_POST'], implode(', ', $non_common_words)));
+ }
+ unset($non_common_words);
+ }
+ // else we only need one id
+ else if (($wildcard = strpos($word, '*') !== false) || isset($words[$word]))
+ {
+ if ($wildcard)
+ {
+ $len = utf8_strlen(str_replace('*', '', $word));
+ if ($len >= $this->word_length['min'] && $len <= $this->word_length['max'])
+ {
+ $this->{$mode . '_ids'}[] = '\'' . $db->sql_escape(str_replace('*', '%', $word)) . '\'';
+ }
+ else
+ {
+ $this->common_words[] = $word;
+ }
+ }
+ else
+ {
+ $this->{$mode . '_ids'}[] = $words[$word];
+ }
+ }
+ // throw an error if we shall not ignore unexistant words
+ else if (!$ignore_no_id)
+ {
+ if (!isset($common_ids[$word]))
+ {
+ $len = utf8_strlen($word);
+ if ($len >= $this->word_length['min'] && $len <= $this->word_length['max'])
+ {
+ trigger_error(sprintf($user->lang['WORD_IN_NO_POST'], $word));
+ }
+ else
+ {
+ $this->common_words[] = $word;
+ }
+ }
+ }
+ else
+ {
+ $len = utf8_strlen($word);
+ if ($len < $this->word_length['min'] || $len > $this->word_length['max'])
+ {
+ $this->common_words[] = $word;
+ }
+ }
+ }
+
+ // we can't search for negatives only
+ if (!sizeof($this->must_contain_ids))
+ {
+ return false;
+ }
+
+ sort($this->must_contain_ids);
+ sort($this->must_not_contain_ids);
+ sort($this->must_exclude_one_ids);
+
+ if (!empty($this->search_query))
+ {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Performs a search on keywords depending on display specific params. You have to run split_keywords() first.
+ *
+ * @param string $type contains either posts or topics depending on what should be searched for
+ * @param string $fields contains either titleonly (topic titles should be searched), msgonly (only message bodies should be searched), firstpost (only subject and body of the first post should be searched) or all (all post bodies and subjects should be searched)
+ * @param string $terms is either 'all' (use query as entered, words without prefix should default to "have to be in field") or 'any' (ignore search query parts and just return all posts that contain any of the specified words)
+ * @param array $sort_by_sql contains SQL code for the ORDER BY part of a query
+ * @param string $sort_key is the key of $sort_by_sql for the selected sorting
+ * @param string $sort_dir is either a or d representing ASC and DESC
+ * @param string $sort_days specifies the maximum amount of days a post may be old
+ * @param array $ex_fid_ary specifies an array of forum ids which should not be searched
+ * @param array $m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts
+ * @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
+ * @param array $author_ary an array of author ids if the author should be ignored during the search the array is empty
+ * @param string $author_name specifies the author match, when ANONYMOUS is also a search-match
+ * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
+ * @param int $start indicates the first index of the page
+ * @param int $per_page number of ids each page is supposed to contain
+ * @return boolean|int total number of results
+ *
+ * @access public
+ */
+ function keyword_search($type, $fields, $terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_ary, $author_name, &$id_ary, $start, $per_page)
+ {
+ global $config, $db;
+
+ // No keywords? No posts.
+ if (empty($this->search_query))
+ {
+ return false;
+ }
+
+ // generate a search_key from all the options to identify the results
+ $search_key = md5(implode('#', array(
+ serialize($this->must_contain_ids),
+ serialize($this->must_not_contain_ids),
+ serialize($this->must_exclude_one_ids),
+ $type,
+ $fields,
+ $terms,
+ $sort_days,
+ $sort_key,
+ $topic_id,
+ implode(',', $ex_fid_ary),
+ implode(',', $m_approve_fid_ary),
+ implode(',', $author_ary),
+ $author_name,
+ )));
+
+ // try reading the results from cache
+ $total_results = 0;
+ if ($this->obtain_ids($search_key, $total_results, $id_ary, $start, $per_page, $sort_dir) == SEARCH_RESULT_IN_CACHE)
+ {
+ return $total_results;
+ }
+
+ $id_ary = array();
+
+ $sql_where = array();
+ $group_by = false;
+ $m_num = 0;
+ $w_num = 0;
+
+ $sql_array = array(
+ 'SELECT' => ($type == 'posts') ? 'p.post_id' : 'p.topic_id',
+ 'FROM' => array(
+ SEARCH_WORDMATCH_TABLE => array(),
+ SEARCH_WORDLIST_TABLE => array(),
+ ),
+ 'LEFT_JOIN' => array(array(
+ 'FROM' => array(POSTS_TABLE => 'p'),
+ 'ON' => 'm0.post_id = p.post_id',
+ )),
+ );
+
+ $title_match = '';
+ $left_join_topics = false;
+ $group_by = true;
+ // Build some display specific sql strings
+ switch ($fields)
+ {
+ case 'titleonly':
+ $title_match = 'title_match = 1';
+ $group_by = false;
+ // no break
+ case 'firstpost':
+ $left_join_topics = true;
+ $sql_where[] = 'p.post_id = t.topic_first_post_id';
+ break;
+
+ case 'msgonly':
+ $title_match = 'title_match = 0';
+ $group_by = false;
+ break;
+ }
+
+ if ($type == 'topics')
+ {
+ $left_join_topics = true;
+ $group_by = true;
+ }
+
+ /**
+ * @todo Add a query optimizer (handle stuff like "+(4|3) +4")
+ */
+
+ foreach ($this->must_contain_ids as $subquery)
+ {
+ if (is_array($subquery))
+ {
+ $group_by = true;
+
+ $word_id_sql = array();
+ $word_ids = array();
+ foreach ($subquery as $id)
+ {
+ if (is_string($id))
+ {
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(SEARCH_WORDLIST_TABLE => 'w' . $w_num),
+ 'ON' => "w$w_num.word_text LIKE $id"
+ );
+ $word_ids[] = "w$w_num.word_id";
+
+ $w_num++;
+ }
+ else
+ {
+ $word_ids[] = $id;
+ }
+ }
+
+ $sql_where[] = $db->sql_in_set("m$m_num.word_id", $word_ids);
+
+ unset($word_id_sql);
+ unset($word_ids);
+ }
+ else if (is_string($subquery))
+ {
+ $sql_array['FROM'][SEARCH_WORDLIST_TABLE][] = 'w' . $w_num;
+
+ $sql_where[] = "w$w_num.word_text LIKE $subquery";
+ $sql_where[] = "m$m_num.word_id = w$w_num.word_id";
+
+ $group_by = true;
+ $w_num++;
+ }
+ else
+ {
+ $sql_where[] = "m$m_num.word_id = $subquery";
+ }
+
+ $sql_array['FROM'][SEARCH_WORDMATCH_TABLE][] = 'm' . $m_num;
+
+ if ($title_match)
+ {
+ $sql_where[] = "m$m_num.$title_match";
+ }
+
+ if ($m_num != 0)
+ {
+ $sql_where[] = "m$m_num.post_id = m0.post_id";
+ }
+ $m_num++;
+ }
+
+ foreach ($this->must_not_contain_ids as $key => $subquery)
+ {
+ if (is_string($subquery))
+ {
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(SEARCH_WORDLIST_TABLE => 'w' . $w_num),
+ 'ON' => "w$w_num.word_text LIKE $subquery"
+ );
+
+ $this->must_not_contain_ids[$key] = "w$w_num.word_id";
+
+ $group_by = true;
+ $w_num++;
+ }
+ }
+
+ if (sizeof($this->must_not_contain_ids))
+ {
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(SEARCH_WORDMATCH_TABLE => 'm' . $m_num),
+ 'ON' => $db->sql_in_set("m$m_num.word_id", $this->must_not_contain_ids) . (($title_match) ? " AND m$m_num.$title_match" : '') . " AND m$m_num.post_id = m0.post_id"
+ );
+
+ $sql_where[] = "m$m_num.word_id IS NULL";
+ $m_num++;
+ }
+
+ foreach ($this->must_exclude_one_ids as $ids)
+ {
+ $is_null_joins = array();
+ foreach ($ids as $id)
+ {
+ if (is_string($id))
+ {
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(SEARCH_WORDLIST_TABLE => 'w' . $w_num),
+ 'ON' => "w$w_num.word_text LIKE $id"
+ );
+ $id = "w$w_num.word_id";
+
+ $group_by = true;
+ $w_num++;
+ }
+
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(SEARCH_WORDMATCH_TABLE => 'm' . $m_num),
+ 'ON' => "m$m_num.word_id = $id AND m$m_num.post_id = m0.post_id" . (($title_match) ? " AND m$m_num.$title_match" : '')
+ );
+ $is_null_joins[] = "m$m_num.word_id IS NULL";
+
+ $m_num++;
+ }
+ $sql_where[] = '(' . implode(' OR ', $is_null_joins) . ')';
+ }
+
+ if (!sizeof($m_approve_fid_ary))
+ {
+ $sql_where[] = 'p.post_approved = 1';
+ }
+ else if ($m_approve_fid_ary !== array(-1))
+ {
+ $sql_where[] = '(p.post_approved = 1 OR ' . $db->sql_in_set('p.forum_id', $m_approve_fid_ary, true) . ')';
+ }
+
+ if ($topic_id)
+ {
+ $sql_where[] = 'p.topic_id = ' . $topic_id;
+ }
+
+ if (sizeof($author_ary))
+ {
+ if ($author_name)
+ {
+ // first one matches post of registered users, second one guests and deleted users
+ $sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
+ }
+ else
+ {
+ $sql_author = $db->sql_in_set('p.poster_id', $author_ary);
+ }
+ $sql_where[] = $sql_author;
+ }
+
+ if (sizeof($ex_fid_ary))
+ {
+ $sql_where[] = $db->sql_in_set('p.forum_id', $ex_fid_ary, true);
+ }
+
+ if ($sort_days)
+ {
+ $sql_where[] = 'p.post_time >= ' . (time() - ($sort_days * 86400));
+ }
+
+ $sql_array['WHERE'] = implode(' AND ', $sql_where);
+
+ $is_mysql = false;
+ // if the total result count is not cached yet, retrieve it from the db
+ if (!$total_results)
+ {
+ $sql = '';
+ $sql_array_count = $sql_array;
+
+ if ($left_join_topics)
+ {
+ $sql_array_count['LEFT_JOIN'][] = array(
+ 'FROM' => array(TOPICS_TABLE => 't'),
+ 'ON' => 'p.topic_id = t.topic_id'
+ );
+ }
+
+ switch ($db->sql_layer)
+ {
+ case 'mysql4':
+ case 'mysqli':
+
+ // 3.x does not support SQL_CALC_FOUND_ROWS
+ // $sql_array['SELECT'] = 'SQL_CALC_FOUND_ROWS ' . $sql_array['SELECT'];
+ $is_mysql = true;
+
+ break;
+
+ case 'sqlite':
+ $sql_array_count['SELECT'] = ($type == 'posts') ? 'DISTINCT p.post_id' : 'DISTINCT p.topic_id';
+ $sql = 'SELECT COUNT(' . (($type == 'posts') ? 'post_id' : 'topic_id') . ') as total_results
+ FROM (' . $db->sql_build_query('SELECT', $sql_array_count) . ')';
+
+ // no break
+
+ default:
+ $sql_array_count['SELECT'] = ($type == 'posts') ? 'COUNT(DISTINCT p.post_id) AS total_results' : 'COUNT(DISTINCT p.topic_id) AS total_results';
+ $sql = (!$sql) ? $db->sql_build_query('SELECT', $sql_array_count) : $sql;
+
+ $result = $db->sql_query($sql);
+ $total_results = (int) $db->sql_fetchfield('total_results');
+ $db->sql_freeresult($result);
+
+ if (!$total_results)
+ {
+ return false;
+ }
+ break;
+ }
+
+ unset($sql_array_count, $sql);
+ }
+
+ // Build sql strings for sorting
+ $sql_sort = $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
+
+ switch ($sql_sort[0])
+ {
+ case 'u':
+ $sql_array['FROM'][USERS_TABLE] = 'u';
+ $sql_where[] = 'u.user_id = p.poster_id ';
+ break;
+
+ case 't':
+ $left_join_topics = true;
+ break;
+
+ case 'f':
+ $sql_array['FROM'][FORUMS_TABLE] = 'f';
+ $sql_where[] = 'f.forum_id = p.forum_id';
+ break;
+ }
+
+ if ($left_join_topics)
+ {
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(TOPICS_TABLE => 't'),
+ 'ON' => 'p.topic_id = t.topic_id'
+ );
+ }
+
+ $sql_array['WHERE'] = implode(' AND ', $sql_where);
+ $sql_array['GROUP_BY'] = ($group_by) ? (($type == 'posts') ? 'p.post_id' : 'p.topic_id') . ', ' . $sort_by_sql[$sort_key] : '';
+ $sql_array['ORDER_BY'] = $sql_sort;
+
+ unset($sql_where, $sql_sort, $group_by);
+
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $result = $db->sql_query_limit($sql, $config['search_block_size'], $start);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $id_ary[] = $row[(($type == 'posts') ? 'post_id' : 'topic_id')];
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($id_ary))
+ {
+ return false;
+ }
+
+ // if we use mysql and the total result count is not cached yet, retrieve it from the db
+ if (!$total_results && $is_mysql)
+ {
+ // Count rows for the executed queries. Replace $select within $sql with SQL_CALC_FOUND_ROWS, and run it.
+ $sql_array_copy = $sql_array;
+ $sql_array_copy['SELECT'] = 'SQL_CALC_FOUND_ROWS p.post_id ';
+
+ $sql = $db->sql_build_query('SELECT', $sql_array_copy);
+ unset($sql_array_copy);
+
+ $db->sql_query($sql);
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT FOUND_ROWS() as total_results';
+ $result = $db->sql_query($sql);
+ $total_results = (int) $db->sql_fetchfield('total_results');
+ $db->sql_freeresult($result);
+
+ if (!$total_results)
+ {
+ return false;
+ }
+ }
+
+ // store the ids, from start on then delete anything that isn't on the current page because we only need ids for one page
+ $this->save_ids($search_key, $this->search_query, $author_ary, $total_results, $id_ary, $start, $sort_dir);
+ $id_ary = array_slice($id_ary, 0, (int) $per_page);
+
+ return $total_results;
+ }
+
+ /**
+ * Performs a search on an author's posts without caring about message contents. Depends on display specific params
+ *
+ * @param string $type contains either posts or topics depending on what should be searched for
+ * @param boolean $firstpost_only if true, only topic starting posts will be considered
+ * @param array $sort_by_sql contains SQL code for the ORDER BY part of a query
+ * @param string $sort_key is the key of $sort_by_sql for the selected sorting
+ * @param string $sort_dir is either a or d representing ASC and DESC
+ * @param string $sort_days specifies the maximum amount of days a post may be old
+ * @param array $ex_fid_ary specifies an array of forum ids which should not be searched
+ * @param array $m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts
+ * @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
+ * @param array $author_ary an array of author ids
+ * @param string $author_name specifies the author match, when ANONYMOUS is also a search-match
+ * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
+ * @param int $start indicates the first index of the page
+ * @param int $per_page number of ids each page is supposed to contain
+ * @return boolean|int total number of results
+ *
+ * @access public
+ */
+ function author_search($type, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_ary, $author_name, &$id_ary, $start, $per_page)
+ {
+ global $config, $db;
+
+ // No author? No posts.
+ if (!sizeof($author_ary))
+ {
+ return 0;
+ }
+
+ // generate a search_key from all the options to identify the results
+ $search_key = md5(implode('#', array(
+ '',
+ $type,
+ ($firstpost_only) ? 'firstpost' : '',
+ '',
+ '',
+ $sort_days,
+ $sort_key,
+ $topic_id,
+ implode(',', $ex_fid_ary),
+ implode(',', $m_approve_fid_ary),
+ implode(',', $author_ary),
+ $author_name,
+ )));
+
+ // try reading the results from cache
+ $total_results = 0;
+ if ($this->obtain_ids($search_key, $total_results, $id_ary, $start, $per_page, $sort_dir) == SEARCH_RESULT_IN_CACHE)
+ {
+ return $total_results;
+ }
+
+ $id_ary = array();
+
+ // Create some display specific sql strings
+ if ($author_name)
+ {
+ // first one matches post of registered users, second one guests and deleted users
+ $sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
+ }
+ else
+ {
+ $sql_author = $db->sql_in_set('p.poster_id', $author_ary);
+ }
+ $sql_fora = (sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '';
+ $sql_time = ($sort_days) ? ' AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
+ $sql_topic_id = ($topic_id) ? ' AND p.topic_id = ' . (int) $topic_id : '';
+ $sql_firstpost = ($firstpost_only) ? ' AND p.post_id = t.topic_first_post_id' : '';
+
+ // Build sql strings for sorting
+ $sql_sort = $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
+ $sql_sort_table = $sql_sort_join = '';
+ switch ($sql_sort[0])
+ {
+ case 'u':
+ $sql_sort_table = USERS_TABLE . ' u, ';
+ $sql_sort_join = ' AND u.user_id = p.poster_id ';
+ break;
+
+ case 't':
+ $sql_sort_table = ($type == 'posts' && !$firstpost_only) ? TOPICS_TABLE . ' t, ' : '';
+ $sql_sort_join = ($type == 'posts' && !$firstpost_only) ? ' AND t.topic_id = p.topic_id ' : '';
+ break;
+
+ case 'f':
+ $sql_sort_table = FORUMS_TABLE . ' f, ';
+ $sql_sort_join = ' AND f.forum_id = p.forum_id ';
+ break;
+ }
+
+ if (!sizeof($m_approve_fid_ary))
+ {
+ $m_approve_fid_sql = ' AND p.post_approved = 1';
+ }
+ else if ($m_approve_fid_ary == array(-1))
+ {
+ $m_approve_fid_sql = '';
+ }
+ else
+ {
+ $m_approve_fid_sql = ' AND (p.post_approved = 1 OR ' . $db->sql_in_set('p.forum_id', $m_approve_fid_ary, true) . ')';
+ }
+
+ $select = ($type == 'posts') ? 'p.post_id' : 't.topic_id';
+ $is_mysql = false;
+
+ // If the cache was completely empty count the results
+ if (!$total_results)
+ {
+ switch ($db->sql_layer)
+ {
+ case 'mysql4':
+ case 'mysqli':
+// $select = 'SQL_CALC_FOUND_ROWS ' . $select;
+ $is_mysql = true;
+ break;
+
+ default:
+ if ($type == 'posts')
+ {
+ $sql = 'SELECT COUNT(p.post_id) as total_results
+ FROM ' . POSTS_TABLE . ' p' . (($firstpost_only) ? ', ' . TOPICS_TABLE . ' t ' : ' ') . "
+ WHERE $sql_author
+ $sql_topic_id
+ $sql_firstpost
+ $m_approve_fid_sql
+ $sql_fora
+ $sql_time";
+ }
+ else
+ {
+ if ($db->sql_layer == 'sqlite')
+ {
+ $sql = 'SELECT COUNT(topic_id) as total_results
+ FROM (SELECT DISTINCT t.topic_id';
+ }
+ else
+ {
+ $sql = 'SELECT COUNT(DISTINCT t.topic_id) as total_results';
+ }
+
+ $sql .= ' FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
+ WHERE $sql_author
+ $sql_topic_id
+ $sql_firstpost
+ $m_approve_fid_sql
+ $sql_fora
+ AND t.topic_id = p.topic_id
+ $sql_time" . (($db->sql_layer == 'sqlite') ? ')' : '');
+ }
+ $result = $db->sql_query($sql);
+
+ $total_results = (int) $db->sql_fetchfield('total_results');
+ $db->sql_freeresult($result);
+
+ if (!$total_results)
+ {
+ return false;
+ }
+ break;
+ }
+ }
+
+ // Build the query for really selecting the post_ids
+ if ($type == 'posts')
+ {
+ $sql = "SELECT $select
+ FROM " . $sql_sort_table . POSTS_TABLE . ' p' . (($firstpost_only) ? ', ' . TOPICS_TABLE . ' t' : '') . "
+ WHERE $sql_author
+ $sql_topic_id
+ $sql_firstpost
+ $m_approve_fid_sql
+ $sql_fora
+ $sql_sort_join
+ $sql_time
+ ORDER BY $sql_sort";
+ $field = 'post_id';
+ }
+ else
+ {
+ $sql = "SELECT $select
+ FROM " . $sql_sort_table . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
+ WHERE $sql_author
+ $sql_topic_id
+ $sql_firstpost
+ $m_approve_fid_sql
+ $sql_fora
+ AND t.topic_id = p.topic_id
+ $sql_sort_join
+ $sql_time
+ GROUP BY t.topic_id, " . $sort_by_sql[$sort_key] . '
+ ORDER BY ' . $sql_sort;
+ $field = 'topic_id';
+ }
+
+ // Only read one block of posts from the db and then cache it
+ $result = $db->sql_query_limit($sql, $config['search_block_size'], $start);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $id_ary[] = $row[$field];
+ }
+ $db->sql_freeresult($result);
+
+ if (!$total_results && $is_mysql)
+ {
+ // Count rows for the executed queries. Replace $select within $sql with SQL_CALC_FOUND_ROWS, and run it.
+ $sql = str_replace('SELECT ' . $select, 'SELECT DISTINCT SQL_CALC_FOUND_ROWS p.post_id', $sql);
+
+ $db->sql_query($sql);
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT FOUND_ROWS() as total_results';
+ $result = $db->sql_query($sql);
+ $total_results = (int) $db->sql_fetchfield('total_results');
+ $db->sql_freeresult($result);
+
+ if (!$total_results)
+ {
+ return false;
+ }
+ }
+
+ if (sizeof($id_ary))
+ {
+ $this->save_ids($search_key, '', $author_ary, $total_results, $id_ary, $start, $sort_dir);
+ $id_ary = array_slice($id_ary, 0, $per_page);
+
+ return $total_results;
+ }
+ return false;
+ }
+
+ /**
+ * Split a text into words of a given length
+ *
+ * The text is converted to UTF-8, cleaned up, and split. Then, words that
+ * conform to the defined length range are returned in an array.
+ *
+ * NOTE: duplicates are NOT removed from the return array
+ *
+ * @param string $text Text to split, encoded in UTF-8
+ * @return array Array of UTF-8 words
+ *
+ * @access private
+ */
+ function split_message($text)
+ {
+ global $phpbb_root_path, $phpEx, $user;
+
+ $match = $words = array();
+
+ /**
+ * Taken from the original code
+ */
+ // Do not index code
+ $match[] = '#\[code(?:=.*?)?(\:?[0-9a-z]{5,})\].*?\[\/code(\:?[0-9a-z]{5,})\]#is';
+ // BBcode
+ $match[] = '#\[\/?[a-z0-9\*\+\-]+(?:=.*?)?(?::[a-z])?(\:?[0-9a-z]{5,})\]#';
+
+ $min = $this->word_length['min'];
+ $max = $this->word_length['max'];
+
+ $isset_min = $min - 1;
+
+ /**
+ * Clean up the string, remove HTML tags, remove BBCodes
+ */
+ $word = strtok($this->cleanup(preg_replace($match, ' ', strip_tags($text)), -1), ' ');
+
+ while (strlen($word))
+ {
+ if (strlen($word) > 255 || strlen($word) <= $isset_min)
+ {
+ /**
+ * Words longer than 255 bytes are ignored. This will have to be
+ * changed whenever we change the length of search_wordlist.word_text
+ *
+ * Words shorter than $isset_min bytes are ignored, too
+ */
+ $word = strtok(' ');
+ continue;
+ }
+
+ $len = utf8_strlen($word);
+
+ /**
+ * Test whether the word is too short to be indexed.
+ *
+ * Note that this limit does NOT apply to CJK and Hangul
+ */
+ if ($len < $min)
+ {
+ /**
+ * Note: this could be optimized. If the codepoint is lower than Hangul's range
+ * we know that it will also be lower than CJK ranges
+ */
+ if ((strncmp($word, UTF8_HANGUL_FIRST, 3) < 0 || strncmp($word, UTF8_HANGUL_LAST, 3) > 0)
+ && (strncmp($word, UTF8_CJK_FIRST, 3) < 0 || strncmp($word, UTF8_CJK_LAST, 3) > 0)
+ && (strncmp($word, UTF8_CJK_B_FIRST, 4) < 0 || strncmp($word, UTF8_CJK_B_LAST, 4) > 0))
+ {
+ $word = strtok(' ');
+ continue;
+ }
+ }
+
+ $words[] = $word;
+ $word = strtok(' ');
+ }
+
+ return $words;
+ }
+
+ /**
+ * Updates wordlist and wordmatch tables when a message is posted or changed
+ *
+ * @param string $mode Contains the post mode: edit, post, reply, quote
+ * @param int $post_id The id of the post which is modified/created
+ * @param string &$message New or updated post content
+ * @param string &$subject New or updated post subject
+ * @param int $poster_id Post author's user id
+ * @param int $forum_id The id of the forum in which the post is located
+ *
+ * @access public
+ */
+ function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id)
+ {
+ global $config, $db, $user;
+
+ if (!$config['fulltext_native_load_upd'])
+ {
+ /**
+ * The search indexer is disabled, return
+ */
+ return;
+ }
+
+ // Split old and new post/subject to obtain array of 'words'
+ $split_text = $this->split_message($message);
+ $split_title = $this->split_message($subject);
+
+ $cur_words = array('post' => array(), 'title' => array());
+
+ $words = array();
+ if ($mode == 'edit')
+ {
+ $words['add']['post'] = array();
+ $words['add']['title'] = array();
+ $words['del']['post'] = array();
+ $words['del']['title'] = array();
+
+ $sql = 'SELECT w.word_id, w.word_text, m.title_match
+ FROM ' . SEARCH_WORDLIST_TABLE . ' w, ' . SEARCH_WORDMATCH_TABLE . " m
+ WHERE m.post_id = $post_id
+ AND w.word_id = m.word_id";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $which = ($row['title_match']) ? 'title' : 'post';
+ $cur_words[$which][$row['word_text']] = $row['word_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $words['add']['post'] = array_diff($split_text, array_keys($cur_words['post']));
+ $words['add']['title'] = array_diff($split_title, array_keys($cur_words['title']));
+ $words['del']['post'] = array_diff(array_keys($cur_words['post']), $split_text);
+ $words['del']['title'] = array_diff(array_keys($cur_words['title']), $split_title);
+ }
+ else
+ {
+ $words['add']['post'] = $split_text;
+ $words['add']['title'] = $split_title;
+ $words['del']['post'] = array();
+ $words['del']['title'] = array();
+ }
+ unset($split_text);
+ unset($split_title);
+
+ // Get unique words from the above arrays
+ $unique_add_words = array_unique(array_merge($words['add']['post'], $words['add']['title']));
+
+ // We now have unique arrays of all words to be added and removed and
+ // individual arrays of added and removed words for text and title. What
+ // we need to do now is add the new words (if they don't already exist)
+ // and then add (or remove) matches between the words and this post
+ if (sizeof($unique_add_words))
+ {
+ $sql = 'SELECT word_id, word_text
+ FROM ' . SEARCH_WORDLIST_TABLE . '
+ WHERE ' . $db->sql_in_set('word_text', $unique_add_words);
+ $result = $db->sql_query($sql);
+
+ $word_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $word_ids[$row['word_text']] = $row['word_id'];
+ }
+ $db->sql_freeresult($result);
+ $new_words = array_diff($unique_add_words, array_keys($word_ids));
+
+ $db->sql_transaction('begin');
+ if (sizeof($new_words))
+ {
+ $sql_ary = array();
+
+ foreach ($new_words as $word)
+ {
+ $sql_ary[] = array('word_text' => (string) $word, 'word_count' => 0);
+ }
+ $db->sql_return_on_error(true);
+ $db->sql_multi_insert(SEARCH_WORDLIST_TABLE, $sql_ary);
+ $db->sql_return_on_error(false);
+ }
+ unset($new_words, $sql_ary);
+ }
+ else
+ {
+ $db->sql_transaction('begin');
+ }
+
+ // now update the search match table, remove links to removed words and add links to new words
+ foreach ($words['del'] as $word_in => $word_ary)
+ {
+ $title_match = ($word_in == 'title') ? 1 : 0;
+
+ if (sizeof($word_ary))
+ {
+ $sql_in = array();
+ foreach ($word_ary as $word)
+ {
+ $sql_in[] = $cur_words[$word_in][$word];
+ }
+
+ $sql = 'DELETE FROM ' . SEARCH_WORDMATCH_TABLE . '
+ WHERE ' . $db->sql_in_set('word_id', $sql_in) . '
+ AND post_id = ' . intval($post_id) . "
+ AND title_match = $title_match";
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . '
+ SET word_count = word_count - 1
+ WHERE ' . $db->sql_in_set('word_id', $sql_in) . '
+ AND word_count > 0';
+ $db->sql_query($sql);
+
+ unset($sql_in);
+ }
+ }
+
+ $db->sql_return_on_error(true);
+ foreach ($words['add'] as $word_in => $word_ary)
+ {
+ $title_match = ($word_in == 'title') ? 1 : 0;
+
+ if (sizeof($word_ary))
+ {
+ $sql = 'INSERT INTO ' . SEARCH_WORDMATCH_TABLE . ' (post_id, word_id, title_match)
+ SELECT ' . (int) $post_id . ', word_id, ' . (int) $title_match . '
+ FROM ' . SEARCH_WORDLIST_TABLE . '
+ WHERE ' . $db->sql_in_set('word_text', $word_ary);
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . '
+ SET word_count = word_count + 1
+ WHERE ' . $db->sql_in_set('word_text', $word_ary);
+ $db->sql_query($sql);
+ }
+ }
+ $db->sql_return_on_error(false);
+
+ $db->sql_transaction('commit');
+
+ // destroy cached search results containing any of the words removed or added
+ $this->destroy_cache(array_unique(array_merge($words['add']['post'], $words['add']['title'], $words['del']['post'], $words['del']['title'])), array($poster_id));
+
+ unset($unique_add_words);
+ unset($words);
+ unset($cur_words);
+ }
+
+ /**
+ * Removes entries from the wordmatch table for the specified post_ids
+ */
+ function index_remove($post_ids, $author_ids, $forum_ids)
+ {
+ global $db;
+
+ if (sizeof($post_ids))
+ {
+ $sql = 'SELECT w.word_id, w.word_text, m.title_match
+ FROM ' . SEARCH_WORDMATCH_TABLE . ' m, ' . SEARCH_WORDLIST_TABLE . ' w
+ WHERE ' . $db->sql_in_set('m.post_id', $post_ids) . '
+ AND w.word_id = m.word_id';
+ $result = $db->sql_query($sql);
+
+ $message_word_ids = $title_word_ids = $word_texts = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['title_match'])
+ {
+ $title_word_ids[] = $row['word_id'];
+ }
+ else
+ {
+ $message_word_ids[] = $row['word_id'];
+ }
+ $word_texts[] = $row['word_text'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($title_word_ids))
+ {
+ $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . '
+ SET word_count = word_count - 1
+ WHERE ' . $db->sql_in_set('word_id', $title_word_ids) . '
+ AND word_count > 0';
+ $db->sql_query($sql);
+ }
+
+ if (sizeof($message_word_ids))
+ {
+ $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . '
+ SET word_count = word_count - 1
+ WHERE ' . $db->sql_in_set('word_id', $message_word_ids) . '
+ AND word_count > 0';
+ $db->sql_query($sql);
+ }
+
+ unset($title_word_ids);
+ unset($message_word_ids);
+
+ $sql = 'DELETE FROM ' . SEARCH_WORDMATCH_TABLE . '
+ WHERE ' . $db->sql_in_set('post_id', $post_ids);
+ $db->sql_query($sql);
+ }
+
+ $this->destroy_cache(array_unique($word_texts), $author_ids);
+ }
+
+ /**
+ * Tidy up indexes: Tag 'common words' and remove
+ * words no longer referenced in the match table
+ */
+ function tidy()
+ {
+ global $db, $config;
+
+ // Is the fulltext indexer disabled? If yes then we need not
+ // carry on ... it's okay ... I know when I'm not wanted boo hoo
+ if (!$config['fulltext_native_load_upd'])
+ {
+ set_config('search_last_gc', time(), true);
+ return;
+ }
+
+ $destroy_cache_words = array();
+
+ // Remove common words
+ if ($config['num_posts'] >= 100 && $config['fulltext_native_common_thres'])
+ {
+ $common_threshold = ((double) $config['fulltext_native_common_thres']) / 100.0;
+ // First, get the IDs of common words
+ $sql = 'SELECT word_id, word_text
+ FROM ' . SEARCH_WORDLIST_TABLE . '
+ WHERE word_count > ' . floor($config['num_posts'] * $common_threshold) . '
+ OR word_common = 1';
+ $result = $db->sql_query($sql);
+
+ $sql_in = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $sql_in[] = $row['word_id'];
+ $destroy_cache_words[] = $row['word_text'];
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($sql_in))
+ {
+ // Flag the words
+ $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . '
+ SET word_common = 1
+ WHERE ' . $db->sql_in_set('word_id', $sql_in);
+ $db->sql_query($sql);
+
+ // by setting search_last_gc to the new time here we make sure that if a user reloads because the
+ // following query takes too long, he won't run into it again
+ set_config('search_last_gc', time(), true);
+
+ // Delete the matches
+ $sql = 'DELETE FROM ' . SEARCH_WORDMATCH_TABLE . '
+ WHERE ' . $db->sql_in_set('word_id', $sql_in);
+ $db->sql_query($sql);
+ }
+ unset($sql_in);
+ }
+
+ if (sizeof($destroy_cache_words))
+ {
+ // destroy cached search results containing any of the words that are now common or were removed
+ $this->destroy_cache(array_unique($destroy_cache_words));
+ }
+
+ set_config('search_last_gc', time(), true);
+ }
+
+ /**
+ * Deletes all words from the index
+ */
+ function delete_index($acp_module, $u_action)
+ {
+ global $db;
+
+ switch ($db->sql_layer)
+ {
+ case 'sqlite':
+ case 'firebird':
+ $db->sql_query('DELETE FROM ' . SEARCH_WORDLIST_TABLE);
+ $db->sql_query('DELETE FROM ' . SEARCH_WORDMATCH_TABLE);
+ $db->sql_query('DELETE FROM ' . SEARCH_RESULTS_TABLE);
+ break;
+
+ default:
+ $db->sql_query('TRUNCATE TABLE ' . SEARCH_WORDLIST_TABLE);
+ $db->sql_query('TRUNCATE TABLE ' . SEARCH_WORDMATCH_TABLE);
+ $db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE);
+ break;
+ }
+ }
+
+ /**
+ * Returns true if both FULLTEXT indexes exist
+ */
+ function index_created()
+ {
+ if (!sizeof($this->stats))
+ {
+ $this->get_stats();
+ }
+
+ return ($this->stats['total_words'] && $this->stats['total_matches']) ? true : false;
+ }
+
+ /**
+ * Returns an associative array containing information about the indexes
+ */
+ function index_stats()
+ {
+ global $user;
+
+ if (!sizeof($this->stats))
+ {
+ $this->get_stats();
+ }
+
+ return array(
+ $user->lang['TOTAL_WORDS'] => $this->stats['total_words'],
+ $user->lang['TOTAL_MATCHES'] => $this->stats['total_matches']);
+ }
+
+ function get_stats()
+ {
+ global $db;
+
+ $sql = 'SELECT COUNT(*) as total_words
+ FROM ' . SEARCH_WORDLIST_TABLE;
+ $result = $db->sql_query($sql);
+ $this->stats['total_words'] = (int) $db->sql_fetchfield('total_words');
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT COUNT(*) as total_matches
+ FROM ' . SEARCH_WORDMATCH_TABLE;
+ $result = $db->sql_query($sql);
+ $this->stats['total_matches'] = (int) $db->sql_fetchfield('total_matches');
+ $db->sql_freeresult($result);
+ }
+
+ /**
+ * Clean up a text to remove non-alphanumeric characters
+ *
+ * This method receives a UTF-8 string, normalizes and validates it, replaces all
+ * non-alphanumeric characters with strings then returns the result.
+ *
+ * Any number of "allowed chars" can be passed as a UTF-8 string in NFC.
+ *
+ * @param string $text Text to split, in UTF-8 (not normalized or sanitized)
+ * @param string $allowed_chars String of special chars to allow
+ * @param string $encoding Text encoding
+ * @return string Cleaned up text, only alphanumeric chars are left
+ *
+ * @todo normalizer::cleanup being able to be used?
+ */
+ function cleanup($text, $allowed_chars = null, $encoding = 'utf-8')
+ {
+ global $phpbb_root_path, $phpEx;
+ static $conv = array(), $conv_loaded = array();
+ $words = $allow = array();
+
+ // Convert the text to UTF-8
+ $encoding = strtolower($encoding);
+ if ($encoding != 'utf-8')
+ {
+ $text = utf8_recode($text, $encoding);
+ }
+
+ $utf_len_mask = array(
+ "\xC0" => 2,
+ "\xD0" => 2,
+ "\xE0" => 3,
+ "\xF0" => 4
+ );
+
+ /**
+ * Replace HTML entities and NCRs
+ */
+ $text = htmlspecialchars_decode(utf8_decode_ncr($text), ENT_QUOTES);
+
+ /**
+ * Load the UTF-8 normalizer
+ *
+ * If we use it more widely, an instance of that class should be held in a
+ * a global variable instead
+ */
+ utf_normalizer::nfc($text);
+
+ /**
+ * The first thing we do is:
+ *
+ * - convert ASCII-7 letters to lowercase
+ * - remove the ASCII-7 non-alpha characters
+ * - remove the bytes that should not appear in a valid UTF-8 string: 0xC0,
+ * 0xC1 and 0xF5-0xFF
+ *
+ * @todo in theory, the third one is already taken care of during normalization and those chars should have been replaced by Unicode replacement chars
+ */
+ $sb_match = "ISTCPAMELRDOJBNHFGVWUQKYXZ\r\n\t!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\xC0\xC1\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF";
+ $sb_replace = 'istcpamelrdojbnhfgvwuqkyxz ';
+
+ /**
+ * This is the list of legal ASCII chars, it is automatically extended
+ * with ASCII chars from $allowed_chars
+ */
+ $legal_ascii = ' eaisntroludcpmghbfvq10xy2j9kw354867z';
+
+ /**
+ * Prepare an array containing the extra chars to allow
+ */
+ if (isset($allowed_chars[0]))
+ {
+ $pos = 0;
+ $len = strlen($allowed_chars);
+ do
+ {
+ $c = $allowed_chars[$pos];
+
+ if ($c < "\x80")
+ {
+ /**
+ * ASCII char
+ */
+ $sb_pos = strpos($sb_match, $c);
+ if (is_int($sb_pos))
+ {
+ /**
+ * Remove the char from $sb_match and its corresponding
+ * replacement in $sb_replace
+ */
+ $sb_match = substr($sb_match, 0, $sb_pos) . substr($sb_match, $sb_pos + 1);
+ $sb_replace = substr($sb_replace, 0, $sb_pos) . substr($sb_replace, $sb_pos + 1);
+ $legal_ascii .= $c;
+ }
+
+ ++$pos;
+ }
+ else
+ {
+ /**
+ * UTF-8 char
+ */
+ $utf_len = $utf_len_mask[$c & "\xF0"];
+ $allow[substr($allowed_chars, $pos, $utf_len)] = 1;
+ $pos += $utf_len;
+ }
+ }
+ while ($pos < $len);
+ }
+
+ $text = strtr($text, $sb_match, $sb_replace);
+ $ret = '';
+
+ $pos = 0;
+ $len = strlen($text);
+
+ do
+ {
+ /**
+ * Do all consecutive ASCII chars at once
+ */
+ if ($spn = strspn($text, $legal_ascii, $pos))
+ {
+ $ret .= substr($text, $pos, $spn);
+ $pos += $spn;
+ }
+
+ if ($pos >= $len)
+ {
+ return $ret;
+ }
+
+ /**
+ * Capture the UTF char
+ */
+ $utf_len = $utf_len_mask[$text[$pos] & "\xF0"];
+ $utf_char = substr($text, $pos, $utf_len);
+ $pos += $utf_len;
+
+ if (($utf_char >= UTF8_HANGUL_FIRST && $utf_char <= UTF8_HANGUL_LAST)
+ || ($utf_char >= UTF8_CJK_FIRST && $utf_char <= UTF8_CJK_LAST)
+ || ($utf_char >= UTF8_CJK_B_FIRST && $utf_char <= UTF8_CJK_B_LAST))
+ {
+ /**
+ * All characters within these ranges are valid
+ *
+ * We separate them with a space in order to index each character
+ * individually
+ */
+ $ret .= ' ' . $utf_char . ' ';
+ continue;
+ }
+
+ if (isset($allow[$utf_char]))
+ {
+ /**
+ * The char is explicitly allowed
+ */
+ $ret .= $utf_char;
+ continue;
+ }
+
+ if (isset($conv[$utf_char]))
+ {
+ /**
+ * The char is mapped to something, maybe to itself actually
+ */
+ $ret .= $conv[$utf_char];
+ continue;
+ }
+
+ /**
+ * The char isn't mapped, but did we load its conversion table?
+ *
+ * The search indexer table is split into blocks. The block number of
+ * each char is equal to its codepoint right-shifted for 11 bits. It
+ * means that out of the 11, 16 or 21 meaningful bits of a 2-, 3- or
+ * 4- byte sequence we only keep the leftmost 0, 5 or 10 bits. Thus,
+ * all UTF chars encoded in 2 bytes are in the same first block.
+ */
+ if (isset($utf_char[2]))
+ {
+ if (isset($utf_char[3]))
+ {
+ /**
+ * 1111 0nnn 10nn nnnn 10nx xxxx 10xx xxxx
+ * 0000 0111 0011 1111 0010 0000
+ */
+ $idx = ((ord($utf_char[0]) & 0x07) << 7) | ((ord($utf_char[1]) & 0x3F) << 1) | ((ord($utf_char[2]) & 0x20) >> 5);
+ }
+ else
+ {
+ /**
+ * 1110 nnnn 10nx xxxx 10xx xxxx
+ * 0000 0111 0010 0000
+ */
+ $idx = ((ord($utf_char[0]) & 0x07) << 1) | ((ord($utf_char[1]) & 0x20) >> 5);
+ }
+ }
+ else
+ {
+ /**
+ * 110x xxxx 10xx xxxx
+ * 0000 0000 0000 0000
+ */
+ $idx = 0;
+ }
+
+ /**
+ * Check if the required conv table has been loaded already
+ */
+ if (!isset($conv_loaded[$idx]))
+ {
+ $conv_loaded[$idx] = 1;
+ $file = $phpbb_root_path . 'includes/utf/data/search_indexer_' . $idx . '.' . $phpEx;
+
+ if (file_exists($file))
+ {
+ $conv += include($file);
+ }
+ }
+
+ if (isset($conv[$utf_char]))
+ {
+ $ret .= $conv[$utf_char];
+ }
+ else
+ {
+ /**
+ * We add an entry to the conversion table so that we
+ * don't have to convert to codepoint and perform the checks
+ * that are above this block
+ */
+ $conv[$utf_char] = ' ';
+ $ret .= ' ';
+ }
+ }
+ while (1);
+
+ return $ret;
+ }
+
+ /**
+ * Returns a list of options for the ACP to display
+ */
+ function acp()
+ {
+ global $user, $config;
+
+
+ /**
+ * if we need any options, copied from fulltext_native for now, will have to be adjusted or removed
+ */
+
+ $tpl = '
+ <dl>
+ <dt><label for="fulltext_native_load_upd">' . $user->lang['YES_SEARCH_UPDATE'] . ':</label><br /><span>' . $user->lang['YES_SEARCH_UPDATE_EXPLAIN'] . '</span></dt>
+ <dd><label><input type="radio" id="fulltext_native_load_upd" name="config[fulltext_native_load_upd]" value="1"' . (($config['fulltext_native_load_upd']) ? ' checked="checked"' : '') . ' class="radio" /> ' . $user->lang['YES'] . '</label><label><input type="radio" name="config[fulltext_native_load_upd]" value="0"' . ((!$config['fulltext_native_load_upd']) ? ' checked="checked"' : '') . ' class="radio" /> ' . $user->lang['NO'] . '</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="fulltext_native_min_chars">' . $user->lang['MIN_SEARCH_CHARS'] . ':</label><br /><span>' . $user->lang['MIN_SEARCH_CHARS_EXPLAIN'] . '</span></dt>
+ <dd><input id="fulltext_native_min_chars" type="text" size="3" maxlength="3" name="config[fulltext_native_min_chars]" value="' . (int) $config['fulltext_native_min_chars'] . '" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="fulltext_native_max_chars">' . $user->lang['MAX_SEARCH_CHARS'] . ':</label><br /><span>' . $user->lang['MAX_SEARCH_CHARS_EXPLAIN'] . '</span></dt>
+ <dd><input id="fulltext_native_max_chars" type="text" size="3" maxlength="3" name="config[fulltext_native_max_chars]" value="' . (int) $config['fulltext_native_max_chars'] . '" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="fulltext_native_common_thres">' . $user->lang['COMMON_WORD_THRESHOLD'] . ':</label><br /><span>' . $user->lang['COMMON_WORD_THRESHOLD_EXPLAIN'] . '</span></dt>
+ <dd><input id="fulltext_native_common_thres" type="text" size="3" maxlength="3" name="config[fulltext_native_common_thres]" value="' . (double) $config['fulltext_native_common_thres'] . '" /> %</dd>
+ </dl>
+ ';
+
+ // These are fields required in the config table
+ return array(
+ 'tpl' => $tpl,
+ 'config' => array('fulltext_native_load_upd' => 'bool', 'fulltext_native_min_chars' => 'integer:0:255', 'fulltext_native_max_chars' => 'integer:0:255', 'fulltext_native_common_thres' => 'double:0:100')
+ );
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/search/index.htm b/phpBB/includes/search/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/includes/search/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/includes/search/search.php b/phpBB/includes/search/search.php
new file mode 100644
index 0000000000..2f20d11495
--- /dev/null
+++ b/phpBB/includes/search/search.php
@@ -0,0 +1,320 @@
+<?php
+/**
+*
+* @package search
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @ignore
+*/
+define('SEARCH_RESULT_NOT_IN_CACHE', 0);
+define('SEARCH_RESULT_IN_CACHE', 1);
+define('SEARCH_RESULT_INCOMPLETE', 2);
+
+/**
+* search_backend
+* optional base class for search plugins providing simple caching based on ACM
+* and functions to retrieve ignore_words and synonyms
+* @package search
+*/
+class search_backend
+{
+ var $ignore_words = array();
+ var $match_synonym = array();
+ var $replace_synonym = array();
+
+ function search_backend(&$error)
+ {
+ // This class cannot be used as a search plugin
+ $error = true;
+ }
+
+ /**
+ * Retrieves a language dependend list of words that should be ignored by the search
+ */
+ function get_ignore_words()
+ {
+ if (!sizeof($this->ignore_words))
+ {
+ global $user, $phpEx;
+
+ $words = array();
+
+ if (file_exists("{$user->lang_path}{$user->lang_name}/search_ignore_words.$phpEx"))
+ {
+ // include the file containing ignore words
+ include("{$user->lang_path}{$user->lang_name}/search_ignore_words.$phpEx");
+ }
+
+ $this->ignore_words = $words;
+ unset($words);
+ }
+ }
+
+ /**
+ * Stores a list of synonyms that should be replaced in $this->match_synonym and $this->replace_synonym and caches them
+ */
+ function get_synonyms()
+ {
+ if (!sizeof($this->match_synonym))
+ {
+ global $user, $phpEx;
+
+ $synonyms = array();
+
+ if (file_exists("{$user->lang_path}{$user->lang_name}/search_synonyms.$phpEx"))
+ {
+ // include the file containing synonyms
+ include("{$user->lang_path}{$user->lang_name}/search_synonyms.$phpEx");
+ }
+
+ $this->match_synonym = array_keys($synonyms);
+ $this->replace_synonym = array_values($synonyms);
+
+ unset($synonyms);
+ }
+ }
+
+ /**
+ * Retrieves cached search results
+ *
+ * @param int &$result_count will contain the number of all results for the search (not only for the current page)
+ * @param array &$id_ary is filled with the ids belonging to the requested page that are stored in the cache
+ *
+ * @return int SEARCH_RESULT_NOT_IN_CACHE or SEARCH_RESULT_IN_CACHE or SEARCH_RESULT_INCOMPLETE
+ */
+ function obtain_ids($search_key, &$result_count, &$id_ary, $start, $per_page, $sort_dir)
+ {
+ global $cache;
+
+ if (!($stored_ids = $cache->get('_search_results_' . $search_key)))
+ {
+ // no search results cached for this search_key
+ return SEARCH_RESULT_NOT_IN_CACHE;
+ }
+ else
+ {
+ $result_count = $stored_ids[-1];
+ $reverse_ids = ($stored_ids[-2] != $sort_dir) ? true : false;
+ $complete = true;
+
+ // change the start to the actual end of the current request if the sort direction differs
+ // from the dirction in the cache and reverse the ids later
+ if ($reverse_ids)
+ {
+ $start = $result_count - $start - $per_page;
+
+ // the user requested a page past the last index
+ if ($start < 0)
+ {
+ return SEARCH_RESULT_NOT_IN_CACHE;
+ }
+ }
+
+ for ($i = $start, $n = $start + $per_page; ($i < $n) && ($i < $result_count); $i++)
+ {
+ if (!isset($stored_ids[$i]))
+ {
+ $complete = false;
+ }
+ else
+ {
+ $id_ary[] = $stored_ids[$i];
+ }
+ }
+ unset($stored_ids);
+
+ if ($reverse_ids)
+ {
+ $id_ary = array_reverse($id_ary);
+ }
+
+ if (!$complete)
+ {
+ return SEARCH_RESULT_INCOMPLETE;
+ }
+ return SEARCH_RESULT_IN_CACHE;
+ }
+ }
+
+ /**
+ * Caches post/topic ids
+ *
+ * @param array &$id_ary contains a list of post or topic ids that shall be cached, the first element
+ * must have the absolute index $start in the result set.
+ */
+ function save_ids($search_key, $keywords, $author_ary, $result_count, &$id_ary, $start, $sort_dir)
+ {
+ global $cache, $config, $db, $user;
+
+ $length = min(sizeof($id_ary), $config['search_block_size']);
+
+ // nothing to cache so exit
+ if (!$length)
+ {
+ return;
+ }
+
+ $store_ids = array_slice($id_ary, 0, $length);
+
+ // create a new resultset if there is none for this search_key yet
+ // or add the ids to the existing resultset
+ if (!($store = $cache->get('_search_results_' . $search_key)))
+ {
+ // add the current keywords to the recent searches in the cache which are listed on the search page
+ if (!empty($keywords) || sizeof($author_ary))
+ {
+ $sql = 'SELECT search_time
+ FROM ' . SEARCH_RESULTS_TABLE . '
+ WHERE search_key = \'' . $db->sql_escape($search_key) . '\'';
+ $result = $db->sql_query($sql);
+
+ if (!$db->sql_fetchrow($result))
+ {
+ $sql_ary = array(
+ 'search_key' => $search_key,
+ 'search_time' => time(),
+ 'search_keywords' => $keywords,
+ 'search_authors' => ' ' . implode(' ', $author_ary) . ' '
+ );
+
+ $sql = 'INSERT INTO ' . SEARCH_RESULTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ $db->sql_query($sql);
+ }
+ $db->sql_freeresult($result);
+ }
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_last_search = ' . time() . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+
+ $store = array(-1 => $result_count, -2 => $sort_dir);
+ $id_range = range($start, $start + $length - 1);
+ }
+ else
+ {
+ // we use one set of results for both sort directions so we have to calculate the indizes
+ // for the reversed array and we also have to reverse the ids themselves
+ if ($store[-2] != $sort_dir)
+ {
+ $store_ids = array_reverse($store_ids);
+ $id_range = range($store[-1] - $start - $length, $store[-1] - $start - 1);
+ }
+ else
+ {
+ $id_range = range($start, $start + $length - 1);
+ }
+ }
+
+ $store_ids = array_combine($id_range, $store_ids);
+
+ // append the ids
+ if (is_array($store_ids))
+ {
+ $store += $store_ids;
+
+ // if the cache is too big
+ if (sizeof($store) - 2 > 20 * $config['search_block_size'])
+ {
+ // remove everything in front of two blocks in front of the current start index
+ for ($i = 0, $n = $id_range[0] - 2 * $config['search_block_size']; $i < $n; $i++)
+ {
+ if (isset($store[$i]))
+ {
+ unset($store[$i]);
+ }
+ }
+
+ // remove everything after two blocks after the current stop index
+ end($id_range);
+ for ($i = $store[-1] - 1, $n = current($id_range) + 2 * $config['search_block_size']; $i > $n; $i--)
+ {
+ if (isset($store[$i]))
+ {
+ unset($store[$i]);
+ }
+ }
+ }
+ $cache->put('_search_results_' . $search_key, $store, $config['search_store_results']);
+
+ $sql = 'UPDATE ' . SEARCH_RESULTS_TABLE . '
+ SET search_time = ' . time() . '
+ WHERE search_key = \'' . $db->sql_escape($search_key) . '\'';
+ $db->sql_query($sql);
+ }
+
+ unset($store);
+ unset($store_ids);
+ unset($id_range);
+ }
+
+ /**
+ * Removes old entries from the search results table and removes searches with keywords that contain a word in $words.
+ */
+ function destroy_cache($words, $authors = false)
+ {
+ global $db, $cache, $config;
+
+ // clear all searches that searched for the specified words
+ if (sizeof($words))
+ {
+ $sql_where = '';
+ foreach ($words as $word)
+ {
+ $sql_where .= " OR search_keywords " . $db->sql_like_expression($db->any_char . $word . $db->any_char);
+ }
+
+ $sql = 'SELECT search_key
+ FROM ' . SEARCH_RESULTS_TABLE . "
+ WHERE search_keywords LIKE '%*%' $sql_where";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $cache->destroy('_search_results_' . $row['search_key']);
+ }
+ $db->sql_freeresult($result);
+ }
+
+ // clear all searches that searched for the specified authors
+ if (is_array($authors) && sizeof($authors))
+ {
+ $sql_where = '';
+ foreach ($authors as $author)
+ {
+ $sql_where .= (($sql_where) ? ' OR ' : '') . 'search_authors LIKE \'% ' . (int) $author . ' %\'';
+ }
+
+ $sql = 'SELECT search_key
+ FROM ' . SEARCH_RESULTS_TABLE . "
+ WHERE $sql_where";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $cache->destroy('_search_results_' . $row['search_key']);
+ }
+ $db->sql_freeresult($result);
+ }
+
+ $sql = 'DELETE
+ FROM ' . SEARCH_RESULTS_TABLE . '
+ WHERE search_time < ' . (time() - $config['search_store_results']);
+ $db->sql_query($sql);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
new file mode 100644
index 0000000000..bf41fea7de
--- /dev/null
+++ b/phpBB/includes/session.php
@@ -0,0 +1,2342 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Session class
+* @package phpBB3
+*/
+class session
+{
+ var $cookie_data = array();
+ var $page = array();
+ var $data = array();
+ var $browser = '';
+ var $forwarded_for = '';
+ var $host = '';
+ var $session_id = '';
+ var $ip = '';
+ var $load = 0;
+ var $time_now = 0;
+ var $update_session_page = true;
+
+ /**
+ * Extract current session page
+ *
+ * @param string $root_path current root path (phpbb_root_path)
+ */
+ function extract_current_page($root_path)
+ {
+ $page_array = array();
+
+ // First of all, get the request uri...
+ $script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
+ $args = (!empty($_SERVER['QUERY_STRING'])) ? explode('&', $_SERVER['QUERY_STRING']) : explode('&', getenv('QUERY_STRING'));
+
+ // If we are unable to get the script name we use REQUEST_URI as a failover and note it within the page array for easier support...
+ if (!$script_name)
+ {
+ $script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
+ $script_name = (($pos = strpos($script_name, '?')) !== false) ? substr($script_name, 0, $pos) : $script_name;
+ $page_array['failover'] = 1;
+ }
+
+ // Replace backslashes and doubled slashes (could happen on some proxy setups)
+ $script_name = str_replace(array('\\', '//'), '/', $script_name);
+
+ // Now, remove the sid and let us get a clean query string...
+ $use_args = array();
+
+ // Since some browser do not encode correctly we need to do this with some "special" characters...
+ // " -> %22, ' => %27, < -> %3C, > -> %3E
+ $find = array('"', "'", '<', '>');
+ $replace = array('%22', '%27', '%3C', '%3E');
+
+ foreach ($args as $key => $argument)
+ {
+ if (strpos($argument, 'sid=') === 0)
+ {
+ continue;
+ }
+
+ $use_args[] = str_replace($find, $replace, $argument);
+ }
+ unset($args);
+
+ // The following examples given are for an request uri of {path to the phpbb directory}/adm/index.php?i=10&b=2
+
+ // The current query string
+ $query_string = trim(implode('&', $use_args));
+
+ // basenamed page name (for example: index.php)
+ $page_name = basename($script_name);
+ $page_name = urlencode(htmlspecialchars($page_name));
+
+ // current directory within the phpBB root (for example: adm)
+ $root_dirs = explode('/', str_replace('\\', '/', phpbb_realpath($root_path)));
+ $page_dirs = explode('/', str_replace('\\', '/', phpbb_realpath('./')));
+ $intersection = array_intersect_assoc($root_dirs, $page_dirs);
+
+ $root_dirs = array_diff_assoc($root_dirs, $intersection);
+ $page_dirs = array_diff_assoc($page_dirs, $intersection);
+
+ $page_dir = str_repeat('../', sizeof($root_dirs)) . implode('/', $page_dirs);
+
+ if ($page_dir && substr($page_dir, -1, 1) == '/')
+ {
+ $page_dir = substr($page_dir, 0, -1);
+ }
+
+ // Current page from phpBB root (for example: adm/index.php?i=10&b=2)
+ $page = (($page_dir) ? $page_dir . '/' : '') . $page_name . (($query_string) ? "?$query_string" : '');
+
+ // The script path from the webroot to the current directory (for example: /phpBB3/adm/) : always prefixed with / and ends in /
+ $script_path = trim(str_replace('\\', '/', dirname($script_name)));
+
+ // The script path from the webroot to the phpBB root (for example: /phpBB3/)
+ $script_dirs = explode('/', $script_path);
+ array_splice($script_dirs, -sizeof($page_dirs));
+ $root_script_path = implode('/', $script_dirs) . (sizeof($root_dirs) ? '/' . implode('/', $root_dirs) : '');
+
+ // We are on the base level (phpBB root == webroot), lets adjust the variables a bit...
+ if (!$root_script_path)
+ {
+ $root_script_path = ($page_dir) ? str_replace($page_dir, '', $script_path) : $script_path;
+ }
+
+ $script_path .= (substr($script_path, -1, 1) == '/') ? '' : '/';
+ $root_script_path .= (substr($root_script_path, -1, 1) == '/') ? '' : '/';
+
+ $page_array += array(
+ 'page_name' => $page_name,
+ 'page_dir' => $page_dir,
+
+ 'query_string' => $query_string,
+ 'script_path' => str_replace(' ', '%20', htmlspecialchars($script_path)),
+ 'root_script_path' => str_replace(' ', '%20', htmlspecialchars($root_script_path)),
+
+ 'page' => $page,
+ 'forum' => (isset($_REQUEST['f']) && $_REQUEST['f'] > 0) ? (int) $_REQUEST['f'] : 0,
+ );
+
+ return $page_array;
+ }
+
+ /**
+ * Get valid hostname/port. HTTP_HOST is used, SERVER_NAME if HTTP_HOST not present.
+ */
+ function extract_current_hostname()
+ {
+ global $config;
+
+ // Get hostname
+ $host = (!empty($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
+
+ // Should be a string and lowered
+ $host = (string) strtolower($host);
+
+ // If host is equal the cookie domain or the server name (if config is set), then we assume it is valid
+ if ((isset($config['cookie_domain']) && $host === $config['cookie_domain']) || (isset($config['server_name']) && $host === $config['server_name']))
+ {
+ return $host;
+ }
+
+ // Is the host actually a IP? If so, we use the IP... (IPv4)
+ if (long2ip(ip2long($host)) === $host)
+ {
+ return $host;
+ }
+
+ // Now return the hostname (this also removes any port definition). The http:// is prepended to construct a valid URL, hosts never have a scheme assigned
+ $host = @parse_url('http://' . $host);
+ $host = (!empty($host['host'])) ? $host['host'] : '';
+
+ // Remove any portions not removed by parse_url (#)
+ $host = str_replace('#', '', $host);
+
+ // If, by any means, the host is now empty, we will use a "best approach" way to guess one
+ if (empty($host))
+ {
+ if (!empty($config['server_name']))
+ {
+ $host = $config['server_name'];
+ }
+ else if (!empty($config['cookie_domain']))
+ {
+ $host = (strpos($config['cookie_domain'], '.') === 0) ? substr($config['cookie_domain'], 1) : $config['cookie_domain'];
+ }
+ else
+ {
+ // Set to OS hostname or localhost
+ $host = (function_exists('php_uname')) ? php_uname('n') : 'localhost';
+ }
+ }
+
+ // It may be still no valid host, but for sure only a hostname (we may further expand on the cookie domain... if set)
+ return $host;
+ }
+
+ /**
+ * Start session management
+ *
+ * This is where all session activity begins. We gather various pieces of
+ * information from the client and server. We test to see if a session already
+ * exists. If it does, fine and dandy. If it doesn't we'll go on to create a
+ * new one ... pretty logical heh? We also examine the system load (if we're
+ * running on a system which makes such information readily available) and
+ * halt if it's above an admin definable limit.
+ *
+ * @param bool $update_session_page if true the session page gets updated.
+ * This can be set to circumvent certain scripts to update the users last visited page.
+ */
+ function session_begin($update_session_page = true)
+ {
+ global $phpEx, $SID, $_SID, $_EXTRA_URL, $db, $config, $phpbb_root_path;
+
+ // Give us some basic information
+ $this->time_now = time();
+ $this->cookie_data = array('u' => 0, 'k' => '');
+ $this->update_session_page = $update_session_page;
+ $this->browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : '';
+ $this->referer = (!empty($_SERVER['HTTP_REFERER'])) ? htmlspecialchars((string) $_SERVER['HTTP_REFERER']) : '';
+ $this->forwarded_for = (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ? htmlspecialchars((string) $_SERVER['HTTP_X_FORWARDED_FOR']) : '';
+
+ $this->host = $this->extract_current_hostname();
+ $this->page = $this->extract_current_page($phpbb_root_path);
+
+ // if the forwarded for header shall be checked we have to validate its contents
+ if ($config['forwarded_for_check'])
+ {
+ $this->forwarded_for = preg_replace('#[ ]{2,}#', ' ', str_replace(array(',', ' '), ' ', $this->forwarded_for));
+
+ // split the list of IPs
+ $ips = explode(' ', $this->forwarded_for);
+ foreach ($ips as $ip)
+ {
+ // check IPv4 first, the IPv6 is hopefully only going to be used very seldomly
+ if (!empty($ip) && !preg_match(get_preg_expression('ipv4'), $ip) && !preg_match(get_preg_expression('ipv6'), $ip))
+ {
+ // contains invalid data, don't use the forwarded for header
+ $this->forwarded_for = '';
+ break;
+ }
+ }
+ }
+ else
+ {
+ $this->forwarded_for = '';
+ }
+
+ if (isset($_COOKIE[$config['cookie_name'] . '_sid']) || isset($_COOKIE[$config['cookie_name'] . '_u']))
+ {
+ $this->cookie_data['u'] = request_var($config['cookie_name'] . '_u', 0, false, true);
+ $this->cookie_data['k'] = request_var($config['cookie_name'] . '_k', '', false, true);
+ $this->session_id = request_var($config['cookie_name'] . '_sid', '', false, true);
+
+ $SID = (defined('NEED_SID')) ? '?sid=' . $this->session_id : '?sid=';
+ $_SID = (defined('NEED_SID')) ? $this->session_id : '';
+
+ if (empty($this->session_id))
+ {
+ $this->session_id = $_SID = request_var('sid', '');
+ $SID = '?sid=' . $this->session_id;
+ $this->cookie_data = array('u' => 0, 'k' => '');
+ }
+ }
+ else
+ {
+ $this->session_id = $_SID = request_var('sid', '');
+ $SID = '?sid=' . $this->session_id;
+ }
+
+ $_EXTRA_URL = array();
+
+ // Why no forwarded_for et al? Well, too easily spoofed. With the results of my recent requests
+ // it's pretty clear that in the majority of cases you'll at least be left with a proxy/cache ip.
+ $this->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars((string) $_SERVER['REMOTE_ADDR']) : '';
+ $this->ip = preg_replace('#[ ]{2,}#', ' ', str_replace(array(',', ' '), ' ', $this->ip));
+
+ // split the list of IPs
+ $ips = explode(' ', $this->ip);
+
+ // Default IP if REMOTE_ADDR is invalid
+ $this->ip = '127.0.0.1';
+
+ foreach ($ips as $ip)
+ {
+ // check IPv4 first, the IPv6 is hopefully only going to be used very seldomly
+ if (!empty($ip) && !preg_match(get_preg_expression('ipv4'), $ip) && !preg_match(get_preg_expression('ipv6'), $ip))
+ {
+ // Just break
+ break;
+ }
+
+ // Use the last in chain
+ $this->ip = $ip;
+ }
+
+ $this->load = false;
+
+ // Load limit check (if applicable)
+ if ($config['limit_load'] || $config['limit_search_load'])
+ {
+ if ((function_exists('sys_getloadavg') && $load = sys_getloadavg()) || ($load = explode(' ', @file_get_contents('/proc/loadavg'))))
+ {
+ $this->load = array_slice($load, 0, 1);
+ $this->load = floatval($this->load[0]);
+ }
+ else
+ {
+ set_config('limit_load', '0');
+ set_config('limit_search_load', '0');
+ }
+ }
+
+ // Is session_id is set or session_id is set and matches the url param if required
+ if (!empty($this->session_id) && (!defined('NEED_SID') || (isset($_GET['sid']) && $this->session_id === $_GET['sid'])))
+ {
+ $sql = 'SELECT u.*, s.*
+ FROM ' . SESSIONS_TABLE . ' s, ' . USERS_TABLE . " u
+ WHERE s.session_id = '" . $db->sql_escape($this->session_id) . "'
+ AND u.user_id = s.session_user_id";
+ $result = $db->sql_query($sql);
+ $this->data = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // Did the session exist in the DB?
+ if (isset($this->data['user_id']))
+ {
+ // Validate IP length according to admin ... enforces an IP
+ // check on bots if admin requires this
+// $quadcheck = ($config['ip_check_bot'] && $this->data['user_type'] & USER_BOT) ? 4 : $config['ip_check'];
+
+ if (strpos($this->ip, ':') !== false && strpos($this->data['session_ip'], ':') !== false)
+ {
+ $s_ip = short_ipv6($this->data['session_ip'], $config['ip_check']);
+ $u_ip = short_ipv6($this->ip, $config['ip_check']);
+ }
+ else
+ {
+ $s_ip = implode('.', array_slice(explode('.', $this->data['session_ip']), 0, $config['ip_check']));
+ $u_ip = implode('.', array_slice(explode('.', $this->ip), 0, $config['ip_check']));
+ }
+
+ $s_browser = ($config['browser_check']) ? trim(strtolower(substr($this->data['session_browser'], 0, 149))) : '';
+ $u_browser = ($config['browser_check']) ? trim(strtolower(substr($this->browser, 0, 149))) : '';
+
+ $s_forwarded_for = ($config['forwarded_for_check']) ? substr($this->data['session_forwarded_for'], 0, 254) : '';
+ $u_forwarded_for = ($config['forwarded_for_check']) ? substr($this->forwarded_for, 0, 254) : '';
+
+ // referer checks
+ // The @ before $config['referer_validation'] suppresses notices present while running the updater
+ $check_referer_path = (@$config['referer_validation'] == REFERER_VALIDATE_PATH);
+ $referer_valid = true;
+
+ // we assume HEAD and TRACE to be foul play and thus only whitelist GET
+ if (@$config['referer_validation'] && isset($_SERVER['REQUEST_METHOD']) && strtolower($_SERVER['REQUEST_METHOD']) !== 'get')
+ {
+ $referer_valid = $this->validate_referer($check_referer_path);
+ }
+
+ if ($u_ip === $s_ip && $s_browser === $u_browser && $s_forwarded_for === $u_forwarded_for && $referer_valid)
+ {
+ $session_expired = false;
+
+ // Check whether the session is still valid if we have one
+ $method = basename(trim($config['auth_method']));
+ include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
+
+ $method = 'validate_session_' . $method;
+ if (function_exists($method))
+ {
+ if (!$method($this->data))
+ {
+ $session_expired = true;
+ }
+ }
+
+ if (!$session_expired)
+ {
+ // Check the session length timeframe if autologin is not enabled.
+ // Else check the autologin length... and also removing those having autologin enabled but no longer allowed board-wide.
+ if (!$this->data['session_autologin'])
+ {
+ if ($this->data['session_time'] < $this->time_now - ($config['session_length'] + 60))
+ {
+ $session_expired = true;
+ }
+ }
+ else if (!$config['allow_autologin'] || ($config['max_autologin_time'] && $this->data['session_time'] < $this->time_now - (86400 * (int) $config['max_autologin_time']) + 60))
+ {
+ $session_expired = true;
+ }
+ }
+
+ if (!$session_expired)
+ {
+ // Only update session DB a minute or so after last update or if page changes
+ if ($this->time_now - $this->data['session_time'] > 60 || ($this->update_session_page && $this->data['session_page'] != $this->page['page']))
+ {
+ $sql_ary = array('session_time' => $this->time_now);
+
+ if ($this->update_session_page)
+ {
+ $sql_ary['session_page'] = substr($this->page['page'], 0, 199);
+ $sql_ary['session_forum_id'] = $this->page['forum'];
+ }
+
+ $db->sql_return_on_error(true);
+
+ $sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE session_id = '" . $db->sql_escape($this->session_id) . "'";
+ $result = $db->sql_query($sql);
+
+ $db->sql_return_on_error(false);
+
+ // If the database is not yet updated, there will be an error due to the session_forum_id
+ // @todo REMOVE for 3.0.2
+ if ($result === false)
+ {
+ unset($sql_ary['session_forum_id']);
+
+ $sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE session_id = '" . $db->sql_escape($this->session_id) . "'";
+ $db->sql_query($sql);
+ }
+
+ if ($this->data['user_id'] != ANONYMOUS && !empty($config['new_member_post_limit']) && $this->data['user_new'] && $config['new_member_post_limit'] <= $this->data['user_posts'])
+ {
+ $this->leave_newly_registered();
+ }
+ }
+
+ $this->data['is_registered'] = ($this->data['user_id'] != ANONYMOUS && ($this->data['user_type'] == USER_NORMAL || $this->data['user_type'] == USER_FOUNDER)) ? true : false;
+ $this->data['is_bot'] = (!$this->data['is_registered'] && $this->data['user_id'] != ANONYMOUS) ? true : false;
+ $this->data['user_lang'] = basename($this->data['user_lang']);
+
+ return true;
+ }
+ }
+ else
+ {
+ // Added logging temporarly to help debug bugs...
+ if (defined('DEBUG_EXTRA') && $this->data['user_id'] != ANONYMOUS)
+ {
+ if ($referer_valid)
+ {
+ add_log('critical', 'LOG_IP_BROWSER_FORWARDED_CHECK', $u_ip, $s_ip, $u_browser, $s_browser, htmlspecialchars($u_forwarded_for), htmlspecialchars($s_forwarded_for));
+ }
+ else
+ {
+ add_log('critical', 'LOG_REFERER_INVALID', $this->referer);
+ }
+ }
+ }
+ }
+ }
+
+ // If we reach here then no (valid) session exists. So we'll create a new one
+ return $this->session_create();
+ }
+
+ /**
+ * Create a new session
+ *
+ * If upon trying to start a session we discover there is nothing existing we
+ * jump here. Additionally this method is called directly during login to regenerate
+ * the session for the specific user. In this method we carry out a number of tasks;
+ * garbage collection, (search)bot checking, banned user comparison. Basically
+ * though this method will result in a new session for a specific user.
+ */
+ function session_create($user_id = false, $set_admin = false, $persist_login = false, $viewonline = true)
+ {
+ global $SID, $_SID, $db, $config, $cache, $phpbb_root_path, $phpEx;
+
+ $this->data = array();
+
+ /* Garbage collection ... remove old sessions updating user information
+ // if necessary. It means (potentially) 11 queries but only infrequently
+ if ($this->time_now > $config['session_last_gc'] + $config['session_gc'])
+ {
+ $this->session_gc();
+ }*/
+
+ // Do we allow autologin on this board? No? Then override anything
+ // that may be requested here
+ if (!$config['allow_autologin'])
+ {
+ $this->cookie_data['k'] = $persist_login = false;
+ }
+
+ /**
+ * Here we do a bot check, oh er saucy! No, not that kind of bot
+ * check. We loop through the list of bots defined by the admin and
+ * see if we have any useragent and/or IP matches. If we do, this is a
+ * bot, act accordingly
+ */
+ $bot = false;
+ $active_bots = $cache->obtain_bots();
+
+ foreach ($active_bots as $row)
+ {
+ if ($row['bot_agent'] && preg_match('#' . str_replace('\*', '.*?', preg_quote($row['bot_agent'], '#')) . '#i', $this->browser))
+ {
+ $bot = $row['user_id'];
+ }
+
+ // If ip is supplied, we will make sure the ip is matching too...
+ if ($row['bot_ip'] && ($bot || !$row['bot_agent']))
+ {
+ // Set bot to false, then we only have to set it to true if it is matching
+ $bot = false;
+
+ foreach (explode(',', $row['bot_ip']) as $bot_ip)
+ {
+ $bot_ip = trim($bot_ip);
+
+ if (!$bot_ip)
+ {
+ continue;
+ }
+
+ if (strpos($this->ip, $bot_ip) === 0)
+ {
+ $bot = (int) $row['user_id'];
+ break;
+ }
+ }
+ }
+
+ if ($bot)
+ {
+ break;
+ }
+ }
+
+ $method = basename(trim($config['auth_method']));
+ include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
+
+ $method = 'autologin_' . $method;
+ if (function_exists($method))
+ {
+ $this->data = $method();
+
+ if (sizeof($this->data))
+ {
+ $this->cookie_data['k'] = '';
+ $this->cookie_data['u'] = $this->data['user_id'];
+ }
+ }
+
+ // If we're presented with an autologin key we'll join against it.
+ // Else if we've been passed a user_id we'll grab data based on that
+ if (isset($this->cookie_data['k']) && $this->cookie_data['k'] && $this->cookie_data['u'] && !sizeof($this->data))
+ {
+ $sql = 'SELECT u.*
+ FROM ' . USERS_TABLE . ' u, ' . SESSIONS_KEYS_TABLE . ' k
+ WHERE u.user_id = ' . (int) $this->cookie_data['u'] . '
+ AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ")
+ AND k.user_id = u.user_id
+ AND k.key_id = '" . $db->sql_escape(md5($this->cookie_data['k'])) . "'";
+ $result = $db->sql_query($sql);
+ $this->data = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ $bot = false;
+ }
+ else if ($user_id !== false && !sizeof($this->data))
+ {
+ $this->cookie_data['k'] = '';
+ $this->cookie_data['u'] = $user_id;
+
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . (int) $this->cookie_data['u'] . '
+ AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')';
+ $result = $db->sql_query($sql);
+ $this->data = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ $bot = false;
+ }
+
+ // If no data was returned one or more of the following occurred:
+ // Key didn't match one in the DB
+ // User does not exist
+ // User is inactive
+ // User is bot
+ if (!sizeof($this->data) || !is_array($this->data))
+ {
+ $this->cookie_data['k'] = '';
+ $this->cookie_data['u'] = ($bot) ? $bot : ANONYMOUS;
+
+ if (!$bot)
+ {
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . (int) $this->cookie_data['u'];
+ }
+ else
+ {
+ // We give bots always the same session if it is not yet expired.
+ $sql = 'SELECT u.*, s.*
+ FROM ' . USERS_TABLE . ' u
+ LEFT JOIN ' . SESSIONS_TABLE . ' s ON (s.session_user_id = u.user_id)
+ WHERE u.user_id = ' . (int) $bot;
+ }
+
+ $result = $db->sql_query($sql);
+ $this->data = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+
+ if ($this->data['user_id'] != ANONYMOUS && !$bot)
+ {
+ $this->data['session_last_visit'] = (isset($this->data['session_time']) && $this->data['session_time']) ? $this->data['session_time'] : (($this->data['user_lastvisit']) ? $this->data['user_lastvisit'] : time());
+ }
+ else
+ {
+ $this->data['session_last_visit'] = $this->time_now;
+ }
+
+ // Force user id to be integer...
+ $this->data['user_id'] = (int) $this->data['user_id'];
+
+ // At this stage we should have a filled data array, defined cookie u and k data.
+ // data array should contain recent session info if we're a real user and a recent
+ // session exists in which case session_id will also be set
+
+ // Is user banned? Are they excluded? Won't return on ban, exists within method
+ if ($this->data['user_type'] != USER_FOUNDER)
+ {
+ if (!$config['forwarded_for_check'])
+ {
+ $this->check_ban($this->data['user_id'], $this->ip);
+ }
+ else
+ {
+ $ips = explode(' ', $this->forwarded_for);
+ $ips[] = $this->ip;
+ $this->check_ban($this->data['user_id'], $ips);
+ }
+ }
+
+ $this->data['is_registered'] = (!$bot && $this->data['user_id'] != ANONYMOUS && ($this->data['user_type'] == USER_NORMAL || $this->data['user_type'] == USER_FOUNDER)) ? true : false;
+ $this->data['is_bot'] = ($bot) ? true : false;
+
+ // If our friend is a bot, we re-assign a previously assigned session
+ if ($this->data['is_bot'] && $bot == $this->data['user_id'] && $this->data['session_id'])
+ {
+ // Only assign the current session if the ip, browser and forwarded_for match...
+ if (strpos($this->ip, ':') !== false && strpos($this->data['session_ip'], ':') !== false)
+ {
+ $s_ip = short_ipv6($this->data['session_ip'], $config['ip_check']);
+ $u_ip = short_ipv6($this->ip, $config['ip_check']);
+ }
+ else
+ {
+ $s_ip = implode('.', array_slice(explode('.', $this->data['session_ip']), 0, $config['ip_check']));
+ $u_ip = implode('.', array_slice(explode('.', $this->ip), 0, $config['ip_check']));
+ }
+
+ $s_browser = ($config['browser_check']) ? trim(strtolower(substr($this->data['session_browser'], 0, 149))) : '';
+ $u_browser = ($config['browser_check']) ? trim(strtolower(substr($this->browser, 0, 149))) : '';
+
+ $s_forwarded_for = ($config['forwarded_for_check']) ? substr($this->data['session_forwarded_for'], 0, 254) : '';
+ $u_forwarded_for = ($config['forwarded_for_check']) ? substr($this->forwarded_for, 0, 254) : '';
+
+ if ($u_ip === $s_ip && $s_browser === $u_browser && $s_forwarded_for === $u_forwarded_for)
+ {
+ $this->session_id = $this->data['session_id'];
+
+ // Only update session DB a minute or so after last update or if page changes
+ if ($this->time_now - $this->data['session_time'] > 60 || ($this->update_session_page && $this->data['session_page'] != $this->page['page']))
+ {
+ $this->data['session_time'] = $this->data['session_last_visit'] = $this->time_now;
+
+ $sql_ary = array('session_time' => $this->time_now, 'session_last_visit' => $this->time_now, 'session_admin' => 0);
+
+ if ($this->update_session_page)
+ {
+ $sql_ary['session_page'] = substr($this->page['page'], 0, 199);
+ $sql_ary['session_forum_id'] = $this->page['forum'];
+ }
+
+ $sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE session_id = '" . $db->sql_escape($this->session_id) . "'";
+ $db->sql_query($sql);
+
+ // Update the last visit time
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_lastvisit = ' . (int) $this->data['session_time'] . '
+ WHERE user_id = ' . (int) $this->data['user_id'];
+ $db->sql_query($sql);
+ }
+
+ $SID = '?sid=';
+ $_SID = '';
+ return true;
+ }
+ else
+ {
+ // If the ip and browser does not match make sure we only have one bot assigned to one session
+ $db->sql_query('DELETE FROM ' . SESSIONS_TABLE . ' WHERE session_user_id = ' . $this->data['user_id']);
+ }
+ }
+
+ $session_autologin = (($this->cookie_data['k'] || $persist_login) && $this->data['is_registered']) ? true : false;
+ $set_admin = ($set_admin && $this->data['is_registered']) ? true : false;
+
+ // Create or update the session
+ $sql_ary = array(
+ 'session_user_id' => (int) $this->data['user_id'],
+ 'session_start' => (int) $this->time_now,
+ 'session_last_visit' => (int) $this->data['session_last_visit'],
+ 'session_time' => (int) $this->time_now,
+ 'session_browser' => (string) trim(substr($this->browser, 0, 149)),
+ 'session_forwarded_for' => (string) $this->forwarded_for,
+ 'session_ip' => (string) $this->ip,
+ 'session_autologin' => ($session_autologin) ? 1 : 0,
+ 'session_admin' => ($set_admin) ? 1 : 0,
+ 'session_viewonline' => ($viewonline) ? 1 : 0,
+ );
+
+ if ($this->update_session_page)
+ {
+ $sql_ary['session_page'] = (string) substr($this->page['page'], 0, 199);
+ $sql_ary['session_forum_id'] = $this->page['forum'];
+ }
+
+ $db->sql_return_on_error(true);
+
+ $sql = 'DELETE
+ FROM ' . SESSIONS_TABLE . '
+ WHERE session_id = \'' . $db->sql_escape($this->session_id) . '\'
+ AND session_user_id = ' . ANONYMOUS;
+
+ if (!defined('IN_ERROR_HANDLER') && (!$this->session_id || !$db->sql_query($sql) || !$db->sql_affectedrows()))
+ {
+ // Limit new sessions in 1 minute period (if required)
+ if (empty($this->data['session_time']) && $config['active_sessions'])
+ {
+// $db->sql_return_on_error(false);
+
+ $sql = 'SELECT COUNT(session_id) AS sessions
+ FROM ' . SESSIONS_TABLE . '
+ WHERE session_time >= ' . ($this->time_now - 60);
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ((int) $row['sessions'] > (int) $config['active_sessions'])
+ {
+ header('HTTP/1.1 503 Service Unavailable');
+ trigger_error('BOARD_UNAVAILABLE');
+ }
+ }
+ }
+
+ // Since we re-create the session id here, the inserted row must be unique. Therefore, we display potential errors.
+ // Commented out because it will not allow forums to update correctly
+// $db->sql_return_on_error(false);
+
+ // Something quite important: session_page always holds the *last* page visited, except for the *first* visit.
+ // We are not able to simply have an empty session_page btw, therefore we need to tell phpBB how to detect this special case.
+ // If the session id is empty, we have a completely new one and will set an "identifier" here. This identifier is able to be checked later.
+ if (empty($this->data['session_id']))
+ {
+ // This is a temporary variable, only set for the very first visit
+ $this->data['session_created'] = true;
+ }
+
+ $this->session_id = $this->data['session_id'] = md5(unique_id());
+
+ $sql_ary['session_id'] = (string) $this->session_id;
+ $sql_ary['session_page'] = (string) substr($this->page['page'], 0, 199);
+ $sql_ary['session_forum_id'] = $this->page['forum'];
+
+ $sql = 'INSERT INTO ' . SESSIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ $db->sql_query($sql);
+
+ $db->sql_return_on_error(false);
+
+ // Regenerate autologin/persistent login key
+ if ($session_autologin)
+ {
+ $this->set_login_key();
+ }
+
+ // refresh data
+ $SID = '?sid=' . $this->session_id;
+ $_SID = $this->session_id;
+ $this->data = array_merge($this->data, $sql_ary);
+
+ if (!$bot)
+ {
+ $cookie_expire = $this->time_now + (($config['max_autologin_time']) ? 86400 * (int) $config['max_autologin_time'] : 31536000);
+
+ $this->set_cookie('u', $this->cookie_data['u'], $cookie_expire);
+ $this->set_cookie('k', $this->cookie_data['k'], $cookie_expire);
+ $this->set_cookie('sid', $this->session_id, $cookie_expire);
+
+ unset($cookie_expire);
+
+ $sql = 'SELECT COUNT(session_id) AS sessions
+ FROM ' . SESSIONS_TABLE . '
+ WHERE session_user_id = ' . (int) $this->data['user_id'] . '
+ AND session_time >= ' . (int) ($this->time_now - (max($config['session_length'], $config['form_token_lifetime'])));
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ((int) $row['sessions'] <= 1 || empty($this->data['user_form_salt']))
+ {
+ $this->data['user_form_salt'] = unique_id();
+ // Update the form key
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_form_salt = \'' . $db->sql_escape($this->data['user_form_salt']) . '\'
+ WHERE user_id = ' . (int) $this->data['user_id'];
+ $db->sql_query($sql);
+ }
+ }
+ else
+ {
+ $this->data['session_time'] = $this->data['session_last_visit'] = $this->time_now;
+
+ // Update the last visit time
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_lastvisit = ' . (int) $this->data['session_time'] . '
+ WHERE user_id = ' . (int) $this->data['user_id'];
+ $db->sql_query($sql);
+
+ $SID = '?sid=';
+ $_SID = '';
+ }
+
+ return true;
+ }
+
+ /**
+ * Kills a session
+ *
+ * This method does what it says on the tin. It will delete a pre-existing session.
+ * It resets cookie information (destroying any autologin key within that cookie data)
+ * and update the users information from the relevant session data. It will then
+ * grab guest user information.
+ */
+ function session_kill($new_session = true)
+ {
+ global $SID, $_SID, $db, $config, $phpbb_root_path, $phpEx;
+
+ $sql = 'DELETE FROM ' . SESSIONS_TABLE . "
+ WHERE session_id = '" . $db->sql_escape($this->session_id) . "'
+ AND session_user_id = " . (int) $this->data['user_id'];
+ $db->sql_query($sql);
+
+ // Allow connecting logout with external auth method logout
+ $method = basename(trim($config['auth_method']));
+ include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
+
+ $method = 'logout_' . $method;
+ if (function_exists($method))
+ {
+ $method($this->data, $new_session);
+ }
+
+ if ($this->data['user_id'] != ANONYMOUS)
+ {
+ // Delete existing session, update last visit info first!
+ if (!isset($this->data['session_time']))
+ {
+ $this->data['session_time'] = time();
+ }
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_lastvisit = ' . (int) $this->data['session_time'] . '
+ WHERE user_id = ' . (int) $this->data['user_id'];
+ $db->sql_query($sql);
+
+ if ($this->cookie_data['k'])
+ {
+ $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '
+ WHERE user_id = ' . (int) $this->data['user_id'] . "
+ AND key_id = '" . $db->sql_escape(md5($this->cookie_data['k'])) . "'";
+ $db->sql_query($sql);
+ }
+
+ // Reset the data array
+ $this->data = array();
+
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . ANONYMOUS;
+ $result = $db->sql_query($sql);
+ $this->data = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+
+ $cookie_expire = $this->time_now - 31536000;
+ $this->set_cookie('u', '', $cookie_expire);
+ $this->set_cookie('k', '', $cookie_expire);
+ $this->set_cookie('sid', '', $cookie_expire);
+ unset($cookie_expire);
+
+ $SID = '?sid=';
+ $this->session_id = $_SID = '';
+
+ // To make sure a valid session is created we create one for the anonymous user
+ if ($new_session)
+ {
+ $this->session_create(ANONYMOUS);
+ }
+
+ return true;
+ }
+
+ /**
+ * Session garbage collection
+ *
+ * This looks a lot more complex than it really is. Effectively we are
+ * deleting any sessions older than an admin definable limit. Due to the
+ * way in which we maintain session data we have to ensure we update user
+ * data before those sessions are destroyed. In addition this method
+ * removes autologin key information that is older than an admin defined
+ * limit.
+ */
+ function session_gc()
+ {
+ global $db, $config, $phpbb_root_path, $phpEx;
+
+ $batch_size = 10;
+
+ if (!$this->time_now)
+ {
+ $this->time_now = time();
+ }
+
+ // Firstly, delete guest sessions
+ $sql = 'DELETE FROM ' . SESSIONS_TABLE . '
+ WHERE session_user_id = ' . ANONYMOUS . '
+ AND session_time < ' . (int) ($this->time_now - $config['session_length']);
+ $db->sql_query($sql);
+
+ // Get expired sessions, only most recent for each user
+ $sql = 'SELECT session_user_id, session_page, MAX(session_time) AS recent_time
+ FROM ' . SESSIONS_TABLE . '
+ WHERE session_time < ' . ($this->time_now - $config['session_length']) . '
+ GROUP BY session_user_id, session_page';
+ $result = $db->sql_query_limit($sql, $batch_size);
+
+ $del_user_id = array();
+ $del_sessions = 0;
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_lastvisit = ' . (int) $row['recent_time'] . ", user_lastpage = '" . $db->sql_escape($row['session_page']) . "'
+ WHERE user_id = " . (int) $row['session_user_id'];
+ $db->sql_query($sql);
+
+ $del_user_id[] = (int) $row['session_user_id'];
+ $del_sessions++;
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($del_user_id))
+ {
+ // Delete expired sessions
+ $sql = 'DELETE FROM ' . SESSIONS_TABLE . '
+ WHERE ' . $db->sql_in_set('session_user_id', $del_user_id) . '
+ AND session_time < ' . ($this->time_now - $config['session_length']);
+ $db->sql_query($sql);
+ }
+
+ if ($del_sessions < $batch_size)
+ {
+ // Less than 10 users, update gc timer ... else we want gc
+ // called again to delete other sessions
+ set_config('session_last_gc', $this->time_now, true);
+
+ if ($config['max_autologin_time'])
+ {
+ $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '
+ WHERE last_login < ' . (time() - (86400 * (int) $config['max_autologin_time']));
+ $db->sql_query($sql);
+ }
+
+ // only called from CRON; should be a safe workaround until the infrastructure gets going
+ if (!class_exists('captcha_factory'))
+ {
+ include($phpbb_root_path . "includes/captcha/captcha_factory." . $phpEx);
+ }
+ phpbb_captcha_factory::garbage_collect($config['captcha_plugin']);
+ }
+
+ return;
+ }
+
+ /**
+ * Sets a cookie
+ *
+ * Sets a cookie of the given name with the specified data for the given length of time. If no time is specified, a session cookie will be set.
+ *
+ * @param string $name Name of the cookie, will be automatically prefixed with the phpBB cookie name. track becomes [cookie_name]_track then.
+ * @param string $cookiedata The data to hold within the cookie
+ * @param int $cookietime The expiration time as UNIX timestamp. If 0 is provided, a session cookie is set.
+ */
+ function set_cookie($name, $cookiedata, $cookietime)
+ {
+ global $config;
+
+ $name_data = rawurlencode($config['cookie_name'] . '_' . $name) . '=' . rawurlencode($cookiedata);
+ $expire = gmdate('D, d-M-Y H:i:s \\G\\M\\T', $cookietime);
+ $domain = (!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain'];
+
+ header('Set-Cookie: ' . $name_data . (($cookietime) ? '; expires=' . $expire : '') . '; path=' . $config['cookie_path'] . $domain . ((!$config['cookie_secure']) ? '' : '; secure') . '; HttpOnly', false);
+ }
+
+ /**
+ * Check for banned user
+ *
+ * Checks whether the supplied user is banned by id, ip or email. If no parameters
+ * are passed to the method pre-existing session data is used. If $return is false
+ * this routine does not return on finding a banned user, it outputs a relevant
+ * message and stops execution.
+ *
+ * @param string|array $user_ips Can contain a string with one IP or an array of multiple IPs
+ */
+ function check_ban($user_id = false, $user_ips = false, $user_email = false, $return = false)
+ {
+ global $config, $db;
+
+ if (defined('IN_CHECK_BAN'))
+ {
+ return;
+ }
+
+ $banned = false;
+ $cache_ttl = 3600;
+ $where_sql = array();
+
+ $sql = 'SELECT ban_ip, ban_userid, ban_email, ban_exclude, ban_give_reason, ban_end
+ FROM ' . BANLIST_TABLE . '
+ WHERE ';
+
+ // Determine which entries to check, only return those
+ if ($user_email === false)
+ {
+ $where_sql[] = "ban_email = ''";
+ }
+
+ if ($user_ips === false)
+ {
+ $where_sql[] = "(ban_ip = '' OR ban_exclude = 1)";
+ }
+
+ if ($user_id === false)
+ {
+ $where_sql[] = '(ban_userid = 0 OR ban_exclude = 1)';
+ }
+ else
+ {
+ $cache_ttl = ($user_id == ANONYMOUS) ? 3600 : 0;
+ $_sql = '(ban_userid = ' . $user_id;
+
+ if ($user_email !== false)
+ {
+ $_sql .= " OR ban_email <> ''";
+ }
+
+ if ($user_ips !== false)
+ {
+ $_sql .= " OR ban_ip <> ''";
+ }
+
+ $_sql .= ')';
+
+ $where_sql[] = $_sql;
+ }
+
+ $sql .= (sizeof($where_sql)) ? implode(' AND ', $where_sql) : '';
+ $result = $db->sql_query($sql, $cache_ttl);
+
+ $ban_triggered_by = 'user';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['ban_end'] && $row['ban_end'] < time())
+ {
+ continue;
+ }
+
+ $ip_banned = false;
+ if (!empty($row['ban_ip']))
+ {
+ if (!is_array($user_ips))
+ {
+ $ip_banned = preg_match('#^' . str_replace('\*', '.*?', preg_quote($row['ban_ip'], '#')) . '$#i', $user_ips);
+ }
+ else
+ {
+ foreach ($user_ips as $user_ip)
+ {
+ if (preg_match('#^' . str_replace('\*', '.*?', preg_quote($row['ban_ip'], '#')) . '$#i', $user_ip))
+ {
+ $ip_banned = true;
+ break;
+ }
+ }
+ }
+ }
+
+ if ((!empty($row['ban_userid']) && intval($row['ban_userid']) == $user_id) ||
+ $ip_banned ||
+ (!empty($row['ban_email']) && preg_match('#^' . str_replace('\*', '.*?', preg_quote($row['ban_email'], '#')) . '$#i', $user_email)))
+ {
+ if (!empty($row['ban_exclude']))
+ {
+ $banned = false;
+ break;
+ }
+ else
+ {
+ $banned = true;
+ $ban_row = $row;
+
+ if (!empty($row['ban_userid']) && intval($row['ban_userid']) == $user_id)
+ {
+ $ban_triggered_by = 'user';
+ }
+ else if ($ip_banned)
+ {
+ $ban_triggered_by = 'ip';
+ }
+ else
+ {
+ $ban_triggered_by = 'email';
+ }
+
+ // Don't break. Check if there is an exclude rule for this user
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if ($banned && !$return)
+ {
+ global $template;
+
+ // If the session is empty we need to create a valid one...
+ if (empty($this->session_id))
+ {
+ // This seems to be no longer needed? - #14971
+// $this->session_create(ANONYMOUS);
+ }
+
+ // Initiate environment ... since it won't be set at this stage
+ $this->setup();
+
+ // Logout the user, banned users are unable to use the normal 'logout' link
+ if ($this->data['user_id'] != ANONYMOUS)
+ {
+ $this->session_kill();
+ }
+
+ // We show a login box here to allow founders accessing the board if banned by IP
+ if (defined('IN_LOGIN') && $this->data['user_id'] == ANONYMOUS)
+ {
+ global $phpEx;
+
+ $this->setup('ucp');
+ $this->data['is_registered'] = $this->data['is_bot'] = false;
+
+ // Set as a precaution to allow login_box() handling this case correctly as well as this function not being executed again.
+ define('IN_CHECK_BAN', 1);
+
+ login_box("index.$phpEx");
+
+ // The false here is needed, else the user is able to circumvent the ban.
+ $this->session_kill(false);
+ }
+
+ // Ok, we catch the case of an empty session id for the anonymous user...
+ // This can happen if the user is logging in, banned by username and the login_box() being called "again".
+ if (empty($this->session_id) && defined('IN_CHECK_BAN'))
+ {
+ $this->session_create(ANONYMOUS);
+ }
+
+
+ // Determine which message to output
+ $till_date = ($ban_row['ban_end']) ? $this->format_date($ban_row['ban_end']) : '';
+ $message = ($ban_row['ban_end']) ? 'BOARD_BAN_TIME' : 'BOARD_BAN_PERM';
+
+ $message = sprintf($this->lang[$message], $till_date, '<a href="mailto:' . $config['board_contact'] . '">', '</a>');
+ $message .= ($ban_row['ban_give_reason']) ? '<br /><br />' . sprintf($this->lang['BOARD_BAN_REASON'], $ban_row['ban_give_reason']) : '';
+ $message .= '<br /><br /><em>' . $this->lang['BAN_TRIGGERED_BY_' . strtoupper($ban_triggered_by)] . '</em>';
+
+ // To circumvent session_begin returning a valid value and the check_ban() not called on second page view, we kill the session again
+ $this->session_kill(false);
+
+ // A very special case... we are within the cron script which is not supposed to print out the ban message... show blank page
+ if (defined('IN_CRON'))
+ {
+ garbage_collection();
+ exit_handler();
+ exit;
+ }
+
+ trigger_error($message);
+ }
+
+ return ($banned && $ban_row['ban_give_reason']) ? $ban_row['ban_give_reason'] : $banned;
+ }
+
+ /**
+ * Check if ip is blacklisted
+ * This should be called only where absolutly necessary
+ *
+ * Only IPv4 (rbldns does not support AAAA records/IPv6 lookups)
+ *
+ * @author satmd (from the php manual)
+ * @param string $mode register/post - spamcop for example is ommitted for posting
+ * @return false if ip is not blacklisted, else an array([checked server], [lookup])
+ */
+ function check_dnsbl($mode, $ip = false)
+ {
+ if ($ip === false)
+ {
+ $ip = $this->ip;
+ }
+
+ $dnsbl_check = array(
+ 'sbl.spamhaus.org' => 'http://www.spamhaus.org/query/bl?ip=',
+ );
+
+ if ($mode == 'register')
+ {
+ $dnsbl_check['bl.spamcop.net'] = 'http://spamcop.net/bl.shtml?';
+ }
+
+ if ($ip)
+ {
+ $quads = explode('.', $ip);
+ $reverse_ip = $quads[3] . '.' . $quads[2] . '.' . $quads[1] . '.' . $quads[0];
+
+ // Need to be listed on all servers...
+ $listed = true;
+ $info = array();
+
+ foreach ($dnsbl_check as $dnsbl => $lookup)
+ {
+ if (phpbb_checkdnsrr($reverse_ip . '.' . $dnsbl . '.', 'A') === true)
+ {
+ $info = array($dnsbl, $lookup . $ip);
+ }
+ else
+ {
+ $listed = false;
+ }
+ }
+
+ if ($listed)
+ {
+ return $info;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Check if URI is blacklisted
+ * This should be called only where absolutly necessary, for example on the submitted website field
+ * This function is not in use at the moment and is only included for testing purposes, it may not work at all!
+ * This means it is untested at the moment and therefore commented out
+ *
+ * @param string $uri URI to check
+ * @return true if uri is on blacklist, else false. Only blacklist is checked (~zero FP), no grey lists
+ function check_uribl($uri)
+ {
+ // Normally parse_url() is not intended to parse uris
+ // We need to get the top-level domain name anyway... change.
+ $uri = parse_url($uri);
+
+ if ($uri === false || empty($uri['host']))
+ {
+ return false;
+ }
+
+ $uri = trim($uri['host']);
+
+ if ($uri)
+ {
+ // One problem here... the return parameter for the "windows" method is different from what
+ // we expect... this may render this check useless...
+ if (phpbb_checkdnsrr($uri . '.multi.uribl.com.', 'A') === true)
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+ */
+
+ /**
+ * Set/Update a persistent login key
+ *
+ * This method creates or updates a persistent session key. When a user makes
+ * use of persistent (formerly auto-) logins a key is generated and stored in the
+ * DB. When they revisit with the same key it's automatically updated in both the
+ * DB and cookie. Multiple keys may exist for each user representing different
+ * browsers or locations. As with _any_ non-secure-socket no passphrase login this
+ * remains vulnerable to exploit.
+ */
+ function set_login_key($user_id = false, $key = false, $user_ip = false)
+ {
+ global $config, $db;
+
+ $user_id = ($user_id === false) ? $this->data['user_id'] : $user_id;
+ $user_ip = ($user_ip === false) ? $this->ip : $user_ip;
+ $key = ($key === false) ? (($this->cookie_data['k']) ? $this->cookie_data['k'] : false) : $key;
+
+ $key_id = unique_id(hexdec(substr($this->session_id, 0, 8)));
+
+ $sql_ary = array(
+ 'key_id' => (string) md5($key_id),
+ 'last_ip' => (string) $this->ip,
+ 'last_login' => (int) time()
+ );
+
+ if (!$key)
+ {
+ $sql_ary += array(
+ 'user_id' => (int) $user_id
+ );
+ }
+
+ if ($key)
+ {
+ $sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . (int) $user_id . "
+ AND key_id = '" . $db->sql_escape(md5($key)) . "'";
+ }
+ else
+ {
+ $sql = 'INSERT INTO ' . SESSIONS_KEYS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ }
+ $db->sql_query($sql);
+
+ $this->cookie_data['k'] = $key_id;
+
+ return false;
+ }
+
+ /**
+ * Reset all login keys for the specified user
+ *
+ * This method removes all current login keys for a specified (or the current)
+ * user. It will be called on password change to render old keys unusable
+ */
+ function reset_login_keys($user_id = false)
+ {
+ global $config, $db;
+
+ $user_id = ($user_id === false) ? $this->data['user_id'] : $user_id;
+
+ $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '
+ WHERE user_id = ' . (int) $user_id;
+ $db->sql_query($sql);
+
+ // Update last visit info first before deleting sessions
+ $sql = 'SELECT session_time, session_page
+ FROM ' . SESSIONS_TABLE . '
+ WHERE session_user_id = ' . (int) $user_id . '
+ ORDER BY session_time DESC';
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_lastvisit = ' . (int) $row['session_time'] . ", user_lastpage = '" . $db->sql_escape($row['session_page']) . "'
+ WHERE user_id = " . (int) $user_id;
+ $db->sql_query($sql);
+
+ // Let's also clear any current sessions for the specified user_id
+ // If it's the current user then we'll leave this session intact
+ $sql_where = 'session_user_id = ' . (int) $user_id;
+ $sql_where .= ($user_id === $this->data['user_id']) ? " AND session_id <> '" . $db->sql_escape($this->session_id) . "'" : '';
+
+ $sql = 'DELETE FROM ' . SESSIONS_TABLE . "
+ WHERE $sql_where";
+ $db->sql_query($sql);
+
+ // We're changing the password of the current user and they have a key
+ // Lets regenerate it to be safe
+ if ($user_id === $this->data['user_id'] && $this->cookie_data['k'])
+ {
+ $this->set_login_key($user_id);
+ }
+ }
+
+
+ /**
+ * Check if the request originated from the same page.
+ * @param bool $check_script_path If true, the path will be checked as well
+ */
+ function validate_referer($check_script_path = false)
+ {
+ global $config;
+
+ // no referer - nothing to validate, user's fault for turning it off (we only check on POST; so meta can't be the reason)
+ if (empty($this->referer) || empty($this->host))
+ {
+ return true;
+ }
+
+ $host = htmlspecialchars($this->host);
+ $ref = substr($this->referer, strpos($this->referer, '://') + 3);
+
+ if (!(stripos($ref, $host) === 0) && (!$config['force_server_vars'] || !(stripos($ref, $config['server_name']) === 0)))
+ {
+ return false;
+ }
+ else if ($check_script_path && rtrim($this->page['root_script_path'], '/') !== '')
+ {
+ $ref = substr($ref, strlen($host));
+ $server_port = (!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT');
+
+ if ($server_port !== 80 && $server_port !== 443 && stripos($ref, ":$server_port") === 0)
+ {
+ $ref = substr($ref, strlen(":$server_port"));
+ }
+
+ if (!(stripos(rtrim($ref, '/'), rtrim($this->page['root_script_path'], '/')) === 0))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+
+ function unset_admin()
+ {
+ global $db;
+ $sql = 'UPDATE ' . SESSIONS_TABLE . '
+ SET session_admin = 0
+ WHERE session_id = \'' . $db->sql_escape($this->session_id) . '\'';
+ $db->sql_query($sql);
+ }
+}
+
+
+/**
+* Base user class
+*
+* This is the overarching class which contains (through session extend)
+* all methods utilised for user functionality during a session.
+*
+* @package phpBB3
+*/
+class user extends session
+{
+ var $lang = array();
+ var $help = array();
+ var $theme = array();
+ var $date_format;
+ var $timezone;
+ var $dst;
+
+ var $lang_name = false;
+ var $lang_id = false;
+ var $lang_path;
+ var $img_lang;
+ var $img_array = array();
+
+ // Able to add new options (up to id 31)
+ var $keyoptions = array('viewimg' => 0, 'viewflash' => 1, 'viewsmilies' => 2, 'viewsigs' => 3, 'viewavatars' => 4, 'viewcensors' => 5, 'attachsig' => 6, 'bbcode' => 8, 'smilies' => 9, 'popuppm' => 10, 'sig_bbcode' => 15, 'sig_smilies' => 16, 'sig_links' => 17);
+ var $keyvalues = array();
+
+ /**
+ * Constructor to set the lang path
+ */
+ function user()
+ {
+ global $phpbb_root_path;
+
+ $this->lang_path = $phpbb_root_path . 'language/';
+ }
+
+ /**
+ * Function to set custom language path (able to use directory outside of phpBB)
+ *
+ * @param string $lang_path New language path used.
+ * @access public
+ */
+ function set_custom_lang_path($lang_path)
+ {
+ $this->lang_path = $lang_path;
+
+ if (substr($this->lang_path, -1) != '/')
+ {
+ $this->lang_path .= '/';
+ }
+ }
+
+ /**
+ * Setup basic user-specific items (style, language, ...)
+ */
+ function setup($lang_set = false, $style = false)
+ {
+ global $db, $template, $config, $auth, $phpEx, $phpbb_root_path, $cache;
+
+ if ($this->data['user_id'] != ANONYMOUS)
+ {
+ $this->lang_name = (file_exists($this->lang_path . $this->data['user_lang'] . "/common.$phpEx")) ? $this->data['user_lang'] : basename($config['default_lang']);
+
+ $this->date_format = $this->data['user_dateformat'];
+ $this->timezone = $this->data['user_timezone'] * 3600;
+ $this->dst = $this->data['user_dst'] * 3600;
+ }
+ else
+ {
+ $this->lang_name = basename($config['default_lang']);
+ $this->date_format = $config['default_dateformat'];
+ $this->timezone = $config['board_timezone'] * 3600;
+ $this->dst = $config['board_dst'] * 3600;
+
+ /**
+ * If a guest user is surfing, we try to guess his/her language first by obtaining the browser language
+ * If re-enabled we need to make sure only those languages installed are checked
+ * Commented out so we do not loose the code.
+
+ if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
+ {
+ $accept_lang_ary = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
+
+ foreach ($accept_lang_ary as $accept_lang)
+ {
+ // Set correct format ... guess full xx_YY form
+ $accept_lang = substr($accept_lang, 0, 2) . '_' . strtoupper(substr($accept_lang, 3, 2));
+ $accept_lang = basename($accept_lang);
+
+ if (file_exists($this->lang_path . $accept_lang . "/common.$phpEx"))
+ {
+ $this->lang_name = $config['default_lang'] = $accept_lang;
+ break;
+ }
+ else
+ {
+ // No match on xx_YY so try xx
+ $accept_lang = substr($accept_lang, 0, 2);
+ $accept_lang = basename($accept_lang);
+
+ if (file_exists($this->lang_path . $accept_lang . "/common.$phpEx"))
+ {
+ $this->lang_name = $config['default_lang'] = $accept_lang;
+ break;
+ }
+ }
+ }
+ }
+ */
+ }
+
+ // We include common language file here to not load it every time a custom language file is included
+ $lang = &$this->lang;
+
+ // Do not suppress error if in DEBUG_EXTRA mode
+ $include_result = (defined('DEBUG_EXTRA')) ? (include $this->lang_path . $this->lang_name . "/common.$phpEx") : (@include $this->lang_path . $this->lang_name . "/common.$phpEx");
+
+ if ($include_result === false)
+ {
+ die('Language file ' . $this->lang_path . $this->lang_name . "/common.$phpEx" . " couldn't be opened.");
+ }
+
+ $this->add_lang($lang_set);
+ unset($lang_set);
+
+ if (!empty($_GET['style']) && $auth->acl_get('a_styles') && !defined('ADMIN_START'))
+ {
+ global $SID, $_EXTRA_URL;
+
+ $style = request_var('style', 0);
+ $SID .= '&amp;style=' . $style;
+ $_EXTRA_URL = array('style=' . $style);
+ }
+ else
+ {
+ // Set up style
+ $style = ($style) ? $style : ((!$config['override_user_style']) ? $this->data['user_style'] : $config['default_style']);
+ }
+
+ $sql = 'SELECT s.style_id, t.template_storedb, t.template_path, t.template_id, t.bbcode_bitfield, t.template_inherits_id, t.template_inherit_path, c.theme_path, c.theme_name, c.theme_storedb, c.theme_id, i.imageset_path, i.imageset_id, i.imageset_name
+ FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c, ' . STYLES_IMAGESET_TABLE . " i
+ WHERE s.style_id = $style
+ AND t.template_id = s.template_id
+ AND c.theme_id = s.theme_id
+ AND i.imageset_id = s.imageset_id";
+ $result = $db->sql_query($sql, 3600);
+ $this->theme = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // User has wrong style
+ if (!$this->theme && $style == $this->data['user_style'])
+ {
+ $style = $this->data['user_style'] = $config['default_style'];
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_style = $style
+ WHERE user_id = {$this->data['user_id']}";
+ $db->sql_query($sql);
+
+ $sql = 'SELECT s.style_id, t.template_storedb, t.template_path, t.template_id, t.bbcode_bitfield, c.theme_path, c.theme_name, c.theme_storedb, c.theme_id, i.imageset_path, i.imageset_id, i.imageset_name
+ FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c, ' . STYLES_IMAGESET_TABLE . " i
+ WHERE s.style_id = $style
+ AND t.template_id = s.template_id
+ AND c.theme_id = s.theme_id
+ AND i.imageset_id = s.imageset_id";
+ $result = $db->sql_query($sql, 3600);
+ $this->theme = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+
+ if (!$this->theme)
+ {
+ trigger_error('Could not get style data', E_USER_ERROR);
+ }
+
+ // Now parse the cfg file and cache it
+ $parsed_items = $cache->obtain_cfg_items($this->theme);
+
+ // We are only interested in the theme configuration for now
+ $parsed_items = $parsed_items['theme'];
+
+ $check_for = array(
+ 'parse_css_file' => (int) 0,
+ 'pagination_sep' => (string) ', '
+ );
+
+ foreach ($check_for as $key => $default_value)
+ {
+ $this->theme[$key] = (isset($parsed_items[$key])) ? $parsed_items[$key] : $default_value;
+ settype($this->theme[$key], gettype($default_value));
+
+ if (is_string($default_value))
+ {
+ $this->theme[$key] = htmlspecialchars($this->theme[$key]);
+ }
+ }
+
+ // If the style author specified the theme needs to be cached
+ // (because of the used paths and variables) than make sure it is the case.
+ // For example, if the theme uses language-specific images it needs to be stored in db.
+ if (!$this->theme['theme_storedb'] && $this->theme['parse_css_file'])
+ {
+ $this->theme['theme_storedb'] = 1;
+
+ $stylesheet = file_get_contents("{$phpbb_root_path}styles/{$this->theme['theme_path']}/theme/stylesheet.css");
+ // Match CSS imports
+ $matches = array();
+ preg_match_all('/@import url\(["\'](.*)["\']\);/i', $stylesheet, $matches);
+
+ if (sizeof($matches))
+ {
+ $content = '';
+ foreach ($matches[0] as $idx => $match)
+ {
+ if ($content = @file_get_contents("{$phpbb_root_path}styles/{$this->theme['theme_path']}/theme/" . $matches[1][$idx]))
+ {
+ $content = trim($content);
+ }
+ else
+ {
+ $content = '';
+ }
+ $stylesheet = str_replace($match, $content, $stylesheet);
+ }
+ unset($content);
+ }
+
+ $stylesheet = str_replace('./', 'styles/' . $this->theme['theme_path'] . '/theme/', $stylesheet);
+
+ $sql_ary = array(
+ 'theme_data' => $stylesheet,
+ 'theme_mtime' => time(),
+ 'theme_storedb' => 1
+ );
+
+ $sql = 'UPDATE ' . STYLES_THEME_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE theme_id = ' . $this->theme['theme_id'];
+ $db->sql_query($sql);
+
+ unset($sql_ary);
+ }
+
+ $template->set_template();
+
+ $this->img_lang = (file_exists($phpbb_root_path . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . $this->lang_name)) ? $this->lang_name : $config['default_lang'];
+
+ // Same query in style.php
+ $sql = 'SELECT *
+ FROM ' . STYLES_IMAGESET_DATA_TABLE . '
+ WHERE imageset_id = ' . $this->theme['imageset_id'] . "
+ AND image_filename <> ''
+ AND image_lang IN ('" . $db->sql_escape($this->img_lang) . "', '')";
+ $result = $db->sql_query($sql, 3600);
+
+ $localised_images = false;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['image_lang'])
+ {
+ $localised_images = true;
+ }
+
+ $row['image_filename'] = rawurlencode($row['image_filename']);
+ $this->img_array[$row['image_name']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ // there were no localised images, try to refresh the localised imageset for the user's language
+ if (!$localised_images)
+ {
+ // Attention: this code ignores the image definition list from acp_styles and just takes everything
+ // that the config file contains
+ $sql_ary = array();
+
+ $db->sql_transaction('begin');
+
+ $sql = 'DELETE FROM ' . STYLES_IMAGESET_DATA_TABLE . '
+ WHERE imageset_id = ' . $this->theme['imageset_id'] . '
+ AND image_lang = \'' . $db->sql_escape($this->img_lang) . '\'';
+ $result = $db->sql_query($sql);
+
+ if (@file_exists("{$phpbb_root_path}styles/{$this->theme['imageset_path']}/imageset/{$this->img_lang}/imageset.cfg"))
+ {
+ $cfg_data_imageset_data = parse_cfg_file("{$phpbb_root_path}styles/{$this->theme['imageset_path']}/imageset/{$this->img_lang}/imageset.cfg");
+ foreach ($cfg_data_imageset_data as $image_name => $value)
+ {
+ if (strpos($value, '*') !== false)
+ {
+ if (substr($value, -1, 1) === '*')
+ {
+ list($image_filename, $image_height) = explode('*', $value);
+ $image_width = 0;
+ }
+ else
+ {
+ list($image_filename, $image_height, $image_width) = explode('*', $value);
+ }
+ }
+ else
+ {
+ $image_filename = $value;
+ $image_height = $image_width = 0;
+ }
+
+ if (strpos($image_name, 'img_') === 0 && $image_filename)
+ {
+ $image_name = substr($image_name, 4);
+ $sql_ary[] = array(
+ 'image_name' => (string) $image_name,
+ 'image_filename' => (string) $image_filename,
+ 'image_height' => (int) $image_height,
+ 'image_width' => (int) $image_width,
+ 'imageset_id' => (int) $this->theme['imageset_id'],
+ 'image_lang' => (string) $this->img_lang,
+ );
+ }
+ }
+ }
+
+ if (sizeof($sql_ary))
+ {
+ $db->sql_multi_insert(STYLES_IMAGESET_DATA_TABLE, $sql_ary);
+ $db->sql_transaction('commit');
+ $cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE);
+
+ add_log('admin', 'LOG_IMAGESET_LANG_REFRESHED', $this->theme['imageset_name'], $this->img_lang);
+ }
+ else
+ {
+ $db->sql_transaction('commit');
+ add_log('admin', 'LOG_IMAGESET_LANG_MISSING', $this->theme['imageset_name'], $this->img_lang);
+ }
+ }
+
+ // Call phpbb_user_session_handler() in case external application want to "bend" some variables or replace classes...
+ // After calling it we continue script execution...
+ phpbb_user_session_handler();
+
+ // If this function got called from the error handler we are finished here.
+ if (defined('IN_ERROR_HANDLER'))
+ {
+ return;
+ }
+
+ // Disable board if the install/ directory is still present
+ // For the brave development army we do not care about this, else we need to comment out this everytime we develop locally
+ if (!defined('DEBUG_EXTRA') && !defined('ADMIN_START') && !defined('IN_INSTALL') && !defined('IN_LOGIN') && file_exists($phpbb_root_path . 'install') && !is_file($phpbb_root_path . 'install'))
+ {
+ // Adjust the message slightly according to the permissions
+ if ($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))
+ {
+ $message = 'REMOVE_INSTALL';
+ }
+ else
+ {
+ $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE';
+ }
+ trigger_error($message);
+ }
+
+ // Is board disabled and user not an admin or moderator?
+ if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
+ {
+ if ($this->data['is_bot'])
+ {
+ header('HTTP/1.1 503 Service Unavailable');
+ }
+
+ $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE';
+ trigger_error($message);
+ }
+
+ // Is load exceeded?
+ if ($config['limit_load'] && $this->load !== false)
+ {
+ if ($this->load > floatval($config['limit_load']) && !defined('IN_LOGIN'))
+ {
+ // Set board disabled to true to let the admins/mods get the proper notification
+ $config['board_disable'] = '1';
+
+ if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
+ {
+ if ($this->data['is_bot'])
+ {
+ header('HTTP/1.1 503 Service Unavailable');
+ }
+ trigger_error('BOARD_UNAVAILABLE');
+ }
+ }
+ }
+
+ if (isset($this->data['session_viewonline']))
+ {
+ // Make sure the user is able to hide his session
+ if (!$this->data['session_viewonline'])
+ {
+ // Reset online status if not allowed to hide the session...
+ if (!$auth->acl_get('u_hideonline'))
+ {
+ $sql = 'UPDATE ' . SESSIONS_TABLE . '
+ SET session_viewonline = 1
+ WHERE session_user_id = ' . $this->data['user_id'];
+ $db->sql_query($sql);
+ $this->data['session_viewonline'] = 1;
+ }
+ }
+ else if (!$this->data['user_allow_viewonline'])
+ {
+ // the user wants to hide and is allowed to -> cloaking device on.
+ if ($auth->acl_get('u_hideonline'))
+ {
+ $sql = 'UPDATE ' . SESSIONS_TABLE . '
+ SET session_viewonline = 0
+ WHERE session_user_id = ' . $this->data['user_id'];
+ $db->sql_query($sql);
+ $this->data['session_viewonline'] = 0;
+ }
+ }
+ }
+
+
+ // Does the user need to change their password? If so, redirect to the
+ // ucp profile reg_details page ... of course do not redirect if we're already in the ucp
+ if (!defined('IN_ADMIN') && !defined('ADMIN_START') && $config['chg_passforce'] && !empty($this->data['is_registered']) && $auth->acl_get('u_chgpasswd') && $this->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400))
+ {
+ if (strpos($this->page['query_string'], 'mode=reg_details') === false && $this->page['page_name'] != "ucp.$phpEx")
+ {
+ redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=profile&amp;mode=reg_details'));
+ }
+ }
+
+ return;
+ }
+
+ /**
+ * More advanced language substitution
+ * Function to mimic sprintf() with the possibility of using phpBB's language system to substitute nullar/singular/plural forms.
+ * Params are the language key and the parameters to be substituted.
+ * This function/functionality is inspired by SHS` and Ashe.
+ *
+ * Example call: <samp>$user->lang('NUM_POSTS_IN_QUEUE', 1);</samp>
+ */
+ function lang()
+ {
+ $args = func_get_args();
+ $key = $args[0];
+
+ if (is_array($key))
+ {
+ $lang = &$this->lang[array_shift($key)];
+
+ foreach ($key as $_key)
+ {
+ $lang = &$lang[$_key];
+ }
+ }
+ else
+ {
+ $lang = &$this->lang[$key];
+ }
+
+ // Return if language string does not exist
+ if (!isset($lang) || (!is_string($lang) && !is_array($lang)))
+ {
+ return $key;
+ }
+
+ // If the language entry is a string, we simply mimic sprintf() behaviour
+ if (is_string($lang))
+ {
+ if (sizeof($args) == 1)
+ {
+ return $lang;
+ }
+
+ // Replace key with language entry and simply pass along...
+ $args[0] = $lang;
+ return call_user_func_array('sprintf', $args);
+ }
+
+ // It is an array... now handle different nullar/singular/plural forms
+ $key_found = false;
+
+ // We now get the first number passed and will select the key based upon this number
+ for ($i = 1, $num_args = sizeof($args); $i < $num_args; $i++)
+ {
+ if (is_int($args[$i]))
+ {
+ $numbers = array_keys($lang);
+
+ foreach ($numbers as $num)
+ {
+ if ($num > $args[$i])
+ {
+ break;
+ }
+
+ $key_found = $num;
+ }
+ }
+ }
+
+ // Ok, let's check if the key was found, else use the last entry (because it is mostly the plural form)
+ if ($key_found === false)
+ {
+ $numbers = array_keys($lang);
+ $key_found = end($numbers);
+ }
+
+ // Use the language string we determined and pass it to sprintf()
+ $args[0] = $lang[$key_found];
+ return call_user_func_array('sprintf', $args);
+ }
+
+ /**
+ * Add Language Items - use_db and use_help are assigned where needed (only use them to force inclusion)
+ *
+ * @param mixed $lang_set specifies the language entries to include
+ * @param bool $use_db internal variable for recursion, do not use
+ * @param bool $use_help internal variable for recursion, do not use
+ *
+ * Examples:
+ * <code>
+ * $lang_set = array('posting', 'help' => 'faq');
+ * $lang_set = array('posting', 'viewtopic', 'help' => array('bbcode', 'faq'))
+ * $lang_set = array(array('posting', 'viewtopic'), 'help' => array('bbcode', 'faq'))
+ * $lang_set = 'posting'
+ * $lang_set = array('help' => 'faq', 'db' => array('help:faq', 'posting'))
+ * </code>
+ */
+ function add_lang($lang_set, $use_db = false, $use_help = false)
+ {
+ global $phpEx;
+
+ if (is_array($lang_set))
+ {
+ foreach ($lang_set as $key => $lang_file)
+ {
+ // Please do not delete this line.
+ // We have to force the type here, else [array] language inclusion will not work
+ $key = (string) $key;
+
+ if ($key == 'db')
+ {
+ $this->add_lang($lang_file, true, $use_help);
+ }
+ else if ($key == 'help')
+ {
+ $this->add_lang($lang_file, $use_db, true);
+ }
+ else if (!is_array($lang_file))
+ {
+ $this->set_lang($this->lang, $this->help, $lang_file, $use_db, $use_help);
+ }
+ else
+ {
+ $this->add_lang($lang_file, $use_db, $use_help);
+ }
+ }
+ unset($lang_set);
+ }
+ else if ($lang_set)
+ {
+ $this->set_lang($this->lang, $this->help, $lang_set, $use_db, $use_help);
+ }
+ }
+
+ /**
+ * Set language entry (called by add_lang)
+ * @access private
+ */
+ function set_lang(&$lang, &$help, $lang_file, $use_db = false, $use_help = false)
+ {
+ global $phpEx;
+
+ // Make sure the language name is set (if the user setup did not happen it is not set)
+ if (!$this->lang_name)
+ {
+ global $config;
+ $this->lang_name = basename($config['default_lang']);
+ }
+
+ // $lang == $this->lang
+ // $help == $this->help
+ // - add appropriate variables here, name them as they are used within the language file...
+ if (!$use_db)
+ {
+ if ($use_help && strpos($lang_file, '/') !== false)
+ {
+ $language_filename = $this->lang_path . $this->lang_name . '/' . substr($lang_file, 0, stripos($lang_file, '/') + 1) . 'help_' . substr($lang_file, stripos($lang_file, '/') + 1) . '.' . $phpEx;
+ }
+ else
+ {
+ $language_filename = $this->lang_path . $this->lang_name . '/' . (($use_help) ? 'help_' : '') . $lang_file . '.' . $phpEx;
+ }
+
+ if (!file_exists($language_filename))
+ {
+ global $config;
+
+ if ($this->lang_name == 'en')
+ {
+ // The user's selected language is missing the file, the board default's language is missing the file, and the file doesn't exist in /en.
+ $language_filename = str_replace($this->lang_path . 'en', $this->lang_path . $this->data['user_lang'], $language_filename);
+ trigger_error('Language file ' . $language_filename . ' couldn\'t be opened.', E_USER_ERROR);
+ }
+ else if ($this->lang_name == basename($config['default_lang']))
+ {
+ // Fall back to the English Language
+ $this->lang_name = 'en';
+ $this->set_lang($lang, $help, $lang_file, $use_db, $use_help);
+ }
+ else if ($this->lang_name == $this->data['user_lang'])
+ {
+ // Fall back to the board default language
+ $this->lang_name = basename($config['default_lang']);
+ $this->set_lang($lang, $help, $lang_file, $use_db, $use_help);
+ }
+
+ // Reset the lang name
+ $this->lang_name = (file_exists($this->lang_path . $this->data['user_lang'] . "/common.$phpEx")) ? $this->data['user_lang'] : basename($config['default_lang']);
+ return;
+ }
+
+ // Do not suppress error if in DEBUG_EXTRA mode
+ $include_result = (defined('DEBUG_EXTRA')) ? (include $language_filename) : (@include $language_filename);
+
+ if ($include_result === false)
+ {
+ trigger_error('Language file ' . $language_filename . ' couldn\'t be opened.', E_USER_ERROR);
+ }
+ }
+ else if ($use_db)
+ {
+ // Get Database Language Strings
+ // Put them into $lang if nothing is prefixed, put them into $help if help: is prefixed
+ // For example: help:faq, posting
+ }
+ }
+
+ /**
+ * Format user date
+ *
+ * @param int $gmepoch unix timestamp
+ * @param string $format date format in date() notation. | used to indicate relative dates, for example |d m Y|, h:i is translated to Today, h:i.
+ * @param bool $forcedate force non-relative date format.
+ *
+ * @return mixed translated date
+ */
+ function format_date($gmepoch, $format = false, $forcedate = false)
+ {
+ static $midnight;
+ static $date_cache;
+
+ $format = (!$format) ? $this->date_format : $format;
+ $now = time();
+ $delta = $now - $gmepoch;
+
+ if (!isset($date_cache[$format]))
+ {
+ // Is the user requesting a friendly date format (i.e. 'Today 12:42')?
+ $date_cache[$format] = array(
+ 'is_short' => strpos($format, '|'),
+ 'format_short' => substr($format, 0, strpos($format, '|')) . '||' . substr(strrchr($format, '|'), 1),
+ 'format_long' => str_replace('|', '', $format),
+ 'lang' => $this->lang['datetime'],
+ );
+
+ // Short representation of month in format? Some languages use different terms for the long and short format of May
+ if ((strpos($format, '\M') === false && strpos($format, 'M') !== false) || (strpos($format, '\r') === false && strpos($format, 'r') !== false))
+ {
+ $date_cache[$format]['lang']['May'] = $this->lang['datetime']['May_short'];
+ }
+ }
+
+ // Zone offset
+ $zone_offset = $this->timezone + $this->dst;
+
+ // Show date <= 1 hour ago as 'xx min ago'
+ // A small tolerence is given for times in the future but in the same minute are displayed as '< than a minute ago'
+ if ($delta <= 3600 && ($delta >= -5 || (($now / 60) % 60) == (($gmepoch / 60) % 60)) && $date_cache[$format]['is_short'] !== false && !$forcedate && isset($this->lang['datetime']['AGO']))
+ {
+ return $this->lang(array('datetime', 'AGO'), max(0, (int) floor($delta / 60)));
+ }
+
+ if (!$midnight)
+ {
+ list($d, $m, $y) = explode(' ', gmdate('j n Y', time() + $zone_offset));
+ $midnight = gmmktime(0, 0, 0, $m, $d, $y) - $zone_offset;
+ }
+
+ if ($date_cache[$format]['is_short'] !== false && !$forcedate && !($gmepoch < $midnight - 86400 || $gmepoch > $midnight + 172800))
+ {
+ $day = false;
+
+ if ($gmepoch > $midnight + 86400)
+ {
+ $day = 'TOMORROW';
+ }
+ else if ($gmepoch > $midnight)
+ {
+ $day = 'TODAY';
+ }
+ else if ($gmepoch > $midnight - 86400)
+ {
+ $day = 'YESTERDAY';
+ }
+
+ if ($day !== false)
+ {
+ return str_replace('||', $this->lang['datetime'][$day], strtr(@gmdate($date_cache[$format]['format_short'], $gmepoch + $zone_offset), $date_cache[$format]['lang']));
+ }
+ }
+
+ return strtr(@gmdate($date_cache[$format]['format_long'], $gmepoch + $zone_offset), $date_cache[$format]['lang']);
+ }
+
+ /**
+ * Get language id currently used by the user
+ */
+ function get_iso_lang_id()
+ {
+ global $config, $db;
+
+ if (!empty($this->lang_id))
+ {
+ return $this->lang_id;
+ }
+
+ if (!$this->lang_name)
+ {
+ $this->lang_name = $config['default_lang'];
+ }
+
+ $sql = 'SELECT lang_id
+ FROM ' . LANG_TABLE . "
+ WHERE lang_iso = '" . $db->sql_escape($this->lang_name) . "'";
+ $result = $db->sql_query($sql);
+ $this->lang_id = (int) $db->sql_fetchfield('lang_id');
+ $db->sql_freeresult($result);
+
+ return $this->lang_id;
+ }
+
+ /**
+ * Get users profile fields
+ */
+ function get_profile_fields($user_id)
+ {
+ global $db;
+
+ if (isset($this->profile_fields))
+ {
+ return;
+ }
+
+ $sql = 'SELECT *
+ FROM ' . PROFILE_FIELDS_DATA_TABLE . "
+ WHERE user_id = $user_id";
+ $result = $db->sql_query_limit($sql, 1);
+ $this->profile_fields = (!($row = $db->sql_fetchrow($result))) ? array() : $row;
+ $db->sql_freeresult($result);
+ }
+
+ /**
+ * Specify/Get image
+ * $suffix is no longer used - we know it. ;) It is there for backward compatibility.
+ */
+ function img($img, $alt = '', $width = false, $suffix = '', $type = 'full_tag')
+ {
+ static $imgs;
+ global $phpbb_root_path;
+
+ $img_data = &$imgs[$img];
+
+ if (empty($img_data))
+ {
+ if (!isset($this->img_array[$img]))
+ {
+ // Do not fill the image to let designers decide what to do if the image is empty
+ $img_data = '';
+ return $img_data;
+ }
+
+ // Use URL if told so
+ $root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_root_path;
+
+ $img_data['src'] = $root_path . 'styles/' . rawurlencode($this->theme['imageset_path']) . '/imageset/' . ($this->img_array[$img]['image_lang'] ? $this->img_array[$img]['image_lang'] .'/' : '') . $this->img_array[$img]['image_filename'];
+ $img_data['width'] = $this->img_array[$img]['image_width'];
+ $img_data['height'] = $this->img_array[$img]['image_height'];
+ }
+
+ $alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : $alt;
+
+ switch ($type)
+ {
+ case 'src':
+ return $img_data['src'];
+ break;
+
+ case 'width':
+ return ($width === false) ? $img_data['width'] : $width;
+ break;
+
+ case 'height':
+ return $img_data['height'];
+ break;
+
+ default:
+ $use_width = ($width === false) ? $img_data['width'] : $width;
+
+ return '<img src="' . $img_data['src'] . '"' . (($use_width) ? ' width="' . $use_width . '"' : '') . (($img_data['height']) ? ' height="' . $img_data['height'] . '"' : '') . ' alt="' . $alt . '" title="' . $alt . '" />';
+ break;
+ }
+ }
+
+ /**
+ * Get option bit field from user options
+ */
+ function optionget($key, $data = false)
+ {
+ if (!isset($this->keyvalues[$key]))
+ {
+ $var = ($data) ? $data : $this->data['user_options'];
+ $this->keyvalues[$key] = ($var & 1 << $this->keyoptions[$key]) ? true : false;
+ }
+
+ return $this->keyvalues[$key];
+ }
+
+ /**
+ * Set option bit field for user options
+ */
+ function optionset($key, $value, $data = false)
+ {
+ $var = ($data) ? $data : $this->data['user_options'];
+
+ if ($value && !($var & 1 << $this->keyoptions[$key]))
+ {
+ $var += 1 << $this->keyoptions[$key];
+ }
+ else if (!$value && ($var & 1 << $this->keyoptions[$key]))
+ {
+ $var -= 1 << $this->keyoptions[$key];
+ }
+ else
+ {
+ return ($data) ? $var : false;
+ }
+
+ if (!$data)
+ {
+ $this->data['user_options'] = $var;
+ return true;
+ }
+ else
+ {
+ return $var;
+ }
+ }
+
+ /**
+ * Funtion to make the user leave the NEWLY_REGISTERED system group.
+ * @access public
+ */
+ function leave_newly_registered()
+ {
+ global $db;
+
+ if (empty($this->data['user_new']))
+ {
+ return false;
+ }
+
+ if (!function_exists('remove_newly_registered'))
+ {
+ global $phpbb_root_path, $phpEx;
+
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
+ if ($group = remove_newly_registered($this->data['user_id'], $this->data))
+ {
+ $this->data['group_id'] = $group;
+
+ }
+ $this->data['user_permissions'] = '';
+ $this->data['user_new'] = 0;
+
+ return true;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
new file mode 100644
index 0000000000..648af61c00
--- /dev/null
+++ b/phpBB/includes/template.php
@@ -0,0 +1,668 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group, sections (c) 2001 ispi of Lincoln Inc
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Base Template class.
+* @package phpBB3
+*/
+class template
+{
+ /** variable that holds all the data we'll be substituting into
+ * the compiled templates. Takes form:
+ * --> $this->_tpldata[block][iteration#][child][iteration#][child2][iteration#][variablename] == value
+ * if it's a root-level variable, it'll be like this:
+ * --> $this->_tpldata[.][0][varname] == value
+ */
+ var $_tpldata = array('.' => array(0 => array()));
+ var $_rootref;
+
+ // Root dir and hash of filenames for each template handle.
+ var $root = '';
+ var $cachepath = '';
+ var $files = array();
+ var $filename = array();
+ var $files_inherit = array();
+ var $files_template = array();
+ var $inherit_root = '';
+ var $orig_tpl_storedb;
+ var $orig_tpl_inherits_id;
+
+ // this will hash handle names to the compiled/uncompiled code for that handle.
+ var $compiled_code = array();
+
+ /**
+ * Set template location
+ * @access public
+ */
+ function set_template()
+ {
+ global $phpbb_root_path, $user;
+
+ if (file_exists($phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template'))
+ {
+ $this->root = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template';
+ $this->cachepath = $phpbb_root_path . 'cache/tpl_' . str_replace('_', '-', $user->theme['template_path']) . '_';
+
+ if ($this->orig_tpl_storedb === null)
+ {
+ $this->orig_tpl_storedb = $user->theme['template_storedb'];
+ }
+
+ if ($this->orig_tpl_inherits_id === null)
+ {
+ $this->orig_tpl_inherits_id = $user->theme['template_inherits_id'];
+ }
+
+ $user->theme['template_storedb'] = $this->orig_tpl_storedb;
+ $user->theme['template_inherits_id'] = $this->orig_tpl_inherits_id;
+
+ if ($user->theme['template_inherits_id'])
+ {
+ $this->inherit_root = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template';
+ }
+ }
+ else
+ {
+ trigger_error('Template path could not be found: styles/' . $user->theme['template_path'] . '/template', E_USER_ERROR);
+ }
+
+ $this->_rootref = &$this->_tpldata['.'][0];
+
+ return true;
+ }
+
+ /**
+ * Set custom template location (able to use directory outside of phpBB)
+ * @access public
+ */
+ function set_custom_template($template_path, $template_name, $template_mode = 'template')
+ {
+ global $phpbb_root_path, $user;
+
+ // Make sure $template_path has no ending slash
+ if (substr($template_path, -1) == '/')
+ {
+ $template_path = substr($template_path, 0, -1);
+ }
+
+ $this->root = $template_path;
+ $this->cachepath = $phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $template_name) . '_';
+
+ // As the template-engine is used for more than the template (emails, etc.), we should not set $user->theme in all cases, but only on the real template.
+ if ($template_mode == 'template')
+ {
+ $user->theme['template_storedb'] = false;
+ $user->theme['template_inherits_id'] = false;
+ }
+
+ $this->_rootref = &$this->_tpldata['.'][0];
+
+ return true;
+ }
+
+ /**
+ * Sets the template filenames for handles. $filename_array
+ * should be a hash of handle => filename pairs.
+ * @access public
+ */
+ function set_filenames($filename_array)
+ {
+ if (!is_array($filename_array))
+ {
+ return false;
+ }
+ foreach ($filename_array as $handle => $filename)
+ {
+ if (empty($filename))
+ {
+ trigger_error("template->set_filenames: Empty filename specified for $handle", E_USER_ERROR);
+ }
+
+ $this->filename[$handle] = $filename;
+ $this->files[$handle] = $this->root . '/' . $filename;
+
+ if ($this->inherit_root)
+ {
+ $this->files_inherit[$handle] = $this->inherit_root . '/' . $filename;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Destroy template data set
+ * @access public
+ */
+ function destroy()
+ {
+ $this->_tpldata = array('.' => array(0 => array()));
+ }
+
+ /**
+ * Reset/empty complete block
+ * @access public
+ */
+ function destroy_block_vars($blockname)
+ {
+ if (strpos($blockname, '.') !== false)
+ {
+ // Nested block.
+ $blocks = explode('.', $blockname);
+ $blockcount = sizeof($blocks) - 1;
+
+ $str = &$this->_tpldata;
+ for ($i = 0; $i < $blockcount; $i++)
+ {
+ $str = &$str[$blocks[$i]];
+ $str = &$str[sizeof($str) - 1];
+ }
+
+ unset($str[$blocks[$blockcount]]);
+ }
+ else
+ {
+ // Top-level block.
+ unset($this->_tpldata[$blockname]);
+ }
+
+ return true;
+ }
+
+ /**
+ * Display handle
+ * @access public
+ */
+ function display($handle, $include_once = true)
+ {
+ global $user, $phpbb_hook;
+
+ if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array(__CLASS__, __FUNCTION__), $handle, $include_once))
+ {
+ if ($phpbb_hook->hook_return(array(__CLASS__, __FUNCTION__)))
+ {
+ return $phpbb_hook->hook_return_result(array(__CLASS__, __FUNCTION__));
+ }
+ }
+
+ if (defined('IN_ERROR_HANDLER'))
+ {
+ if ((E_NOTICE & error_reporting()) == E_NOTICE)
+ {
+ error_reporting(error_reporting() ^ E_NOTICE);
+ }
+ }
+
+ if ($filename = $this->_tpl_load($handle))
+ {
+ ($include_once) ? include_once($filename) : include($filename);
+ }
+ else
+ {
+ eval(' ?>' . $this->compiled_code[$handle] . '<?php ');
+ }
+
+ return true;
+ }
+
+ /**
+ * Display the handle and assign the output to a template variable or return the compiled result.
+ * @access public
+ */
+ function assign_display($handle, $template_var = '', $return_content = true, $include_once = false)
+ {
+ ob_start();
+ $this->display($handle, $include_once);
+ $contents = ob_get_clean();
+
+ if ($return_content)
+ {
+ return $contents;
+ }
+
+ $this->assign_var($template_var, $contents);
+
+ return true;
+ }
+
+ /**
+ * Load a compiled template if possible, if not, recompile it
+ * @access private
+ */
+ function _tpl_load(&$handle)
+ {
+ global $user, $phpEx, $config;
+
+ $filename = $this->cachepath . str_replace('/', '.', $this->filename[$handle]) . '.' . $phpEx;
+ $this->files_template[$handle] = $user->theme['template_id'];
+
+ $recompile = false;
+ if (!file_exists($filename) || @filesize($filename) === 0)
+ {
+ $recompile = true;
+ }
+ else if ($config['load_tplcompile'])
+ {
+ // No way around it: we need to check inheritance here
+ if ($user->theme['template_inherits_id'] && !file_exists($this->files[$handle]))
+ {
+ $this->files[$handle] = $this->files_inherit[$handle];
+ $this->files_template[$handle] = $user->theme['template_inherits_id'];
+ }
+ $recompile = (@filemtime($filename) < filemtime($this->files[$handle])) ? true : false;
+ }
+
+ // Recompile page if the original template is newer, otherwise load the compiled version
+ if (!$recompile)
+ {
+ return $filename;
+ }
+
+ global $db, $phpbb_root_path;
+
+ if (!class_exists('template_compile'))
+ {
+ include($phpbb_root_path . 'includes/functions_template.' . $phpEx);
+ }
+
+ // Inheritance - we point to another template file for this one. Equality is also used for store_db
+ if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'] && !file_exists($this->files[$handle]))
+ {
+ $this->files[$handle] = $this->files_inherit[$handle];
+ $this->files_template[$handle] = $user->theme['template_inherits_id'];
+ }
+
+ $compile = new template_compile($this);
+
+ // If we don't have a file assigned to this handle, die.
+ if (!isset($this->files[$handle]))
+ {
+ trigger_error("template->_tpl_load(): No file specified for handle $handle", E_USER_ERROR);
+ }
+
+ // Just compile if no user object is present (happens within the installer)
+ if (!$user)
+ {
+ $compile->_tpl_load_file($handle);
+ return false;
+ }
+
+ if (isset($user->theme['template_storedb']) && $user->theme['template_storedb'])
+ {
+ $rows = array();
+ $ids = array();
+ // Inheritance
+ if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'])
+ {
+ $ids[] = $user->theme['template_inherits_id'];
+ }
+ $ids[] = $user->theme['template_id'];
+
+ foreach ($ids as $id)
+ {
+ $sql = 'SELECT *
+ FROM ' . STYLES_TEMPLATE_DATA_TABLE . '
+ WHERE template_id = ' . $id . "
+ AND (template_filename = '" . $db->sql_escape($this->filename[$handle]) . "'
+ OR template_included " . $db->sql_like_expression($db->any_char . $this->filename[$handle] . ':' . $db->any_char) . ')';
+
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $rows[$row['template_filename']] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (sizeof($rows))
+ {
+ foreach ($rows as $row)
+ {
+ $file = $this->root . '/' . $row['template_filename'];
+ $force_reload = false;
+ if ($row['template_id'] != $user->theme['template_id'])
+ {
+ // make sure that we are not overlooking a file not in the db yet
+ if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'] && !file_exists($file))
+ {
+ $file = $this->inherit_root . '/' . $row['template_filename'];
+ $this->files[$row['template_filename']] = $file;
+ $this->files_inherit[$row['template_filename']] = $file;
+ $this->files_template[$row['template_filename']] = $user->theme['template_inherits_id'];
+ }
+ else if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'])
+ {
+ // Ok, we have a situation. There is a file in the subtemplate, but nothing in the DB. We have to fix that.
+ $force_reload = true;
+ $this->files_template[$row['template_filename']] = $user->theme['template_inherits_id'];
+ }
+ }
+ else
+ {
+ $this->files_template[$row['template_filename']] = $user->theme['template_id'];
+ }
+
+ if ($force_reload || $row['template_mtime'] < filemtime($file))
+ {
+ if ($row['template_filename'] == $this->filename[$handle])
+ {
+ $compile->_tpl_load_file($handle, true);
+ }
+ else
+ {
+ $this->files[$row['template_filename']] = $file;
+ $this->filename[$row['template_filename']] = $row['template_filename'];
+ $compile->_tpl_load_file($row['template_filename'], true);
+ unset($this->compiled_code[$row['template_filename']]);
+ unset($this->files[$row['template_filename']]);
+ unset($this->filename[$row['template_filename']]);
+ }
+ }
+
+ if ($row['template_filename'] == $this->filename[$handle])
+ {
+ $this->compiled_code[$handle] = $compile->compile(trim($row['template_data']));
+ $compile->compile_write($handle, $this->compiled_code[$handle]);
+ }
+ else
+ {
+ // Only bother compiling if it doesn't already exist
+ if (!file_exists($this->cachepath . str_replace('/', '.', $row['template_filename']) . '.' . $phpEx))
+ {
+ $this->filename[$row['template_filename']] = $row['template_filename'];
+ $compile->compile_write($row['template_filename'], $compile->compile(trim($row['template_data'])));
+ unset($this->filename[$row['template_filename']]);
+ }
+ }
+ }
+ }
+ else
+ {
+ $file = $this->root . '/' . $row['template_filename'];
+
+ if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'] && !file_exists($file))
+ {
+ $file = $this->inherit_root . '/' . $row['template_filename'];
+ $this->files[$row['template_filename']] = $file;
+ $this->files_inherit[$row['template_filename']] = $file;
+ $this->files_template[$row['template_filename']] = $user->theme['template_inherits_id'];
+ }
+ // Try to load from filesystem and instruct to insert into the styles table...
+ $compile->_tpl_load_file($handle, true);
+ return false;
+ }
+
+ return false;
+ }
+
+ $compile->_tpl_load_file($handle);
+ return false;
+ }
+
+ /**
+ * Assign key variable pairs from an array
+ * @access public
+ */
+ function assign_vars($vararray)
+ {
+ foreach ($vararray as $key => $val)
+ {
+ $this->_rootref[$key] = $val;
+ }
+
+ return true;
+ }
+
+ /**
+ * Assign a single variable to a single key
+ * @access public
+ */
+ function assign_var($varname, $varval)
+ {
+ $this->_rootref[$varname] = $varval;
+
+ return true;
+ }
+
+ /**
+ * Assign key variable pairs from an array to a specified block
+ * @access public
+ */
+ function assign_block_vars($blockname, $vararray)
+ {
+ if (strpos($blockname, '.') !== false)
+ {
+ // Nested block.
+ $blocks = explode('.', $blockname);
+ $blockcount = sizeof($blocks) - 1;
+
+ $str = &$this->_tpldata;
+ for ($i = 0; $i < $blockcount; $i++)
+ {
+ $str = &$str[$blocks[$i]];
+ $str = &$str[sizeof($str) - 1];
+ }
+
+ $s_row_count = isset($str[$blocks[$blockcount]]) ? sizeof($str[$blocks[$blockcount]]) : 0;
+ $vararray['S_ROW_COUNT'] = $s_row_count;
+
+ // Assign S_FIRST_ROW
+ if (!$s_row_count)
+ {
+ $vararray['S_FIRST_ROW'] = true;
+ }
+
+ // Now the tricky part, we always assign S_LAST_ROW and remove the entry before
+ // This is much more clever than going through the complete template data on display (phew)
+ $vararray['S_LAST_ROW'] = true;
+ if ($s_row_count > 0)
+ {
+ unset($str[$blocks[$blockcount]][($s_row_count - 1)]['S_LAST_ROW']);
+ }
+
+ // Now we add the block that we're actually assigning to.
+ // We're adding a new iteration to this block with the given
+ // variable assignments.
+ $str[$blocks[$blockcount]][] = $vararray;
+ }
+ else
+ {
+ // Top-level block.
+ $s_row_count = (isset($this->_tpldata[$blockname])) ? sizeof($this->_tpldata[$blockname]) : 0;
+ $vararray['S_ROW_COUNT'] = $s_row_count;
+
+ // Assign S_FIRST_ROW
+ if (!$s_row_count)
+ {
+ $vararray['S_FIRST_ROW'] = true;
+ }
+
+ // We always assign S_LAST_ROW and remove the entry before
+ $vararray['S_LAST_ROW'] = true;
+ if ($s_row_count > 0)
+ {
+ unset($this->_tpldata[$blockname][($s_row_count - 1)]['S_LAST_ROW']);
+ }
+
+ // Add a new iteration to this block with the variable assignments we were given.
+ $this->_tpldata[$blockname][] = $vararray;
+ }
+
+ return true;
+ }
+
+ /**
+ * Change already assigned key variable pair (one-dimensional - single loop entry)
+ *
+ * An example of how to use this function:
+ * {@example alter_block_array.php}
+ *
+ * @param string $blockname the blockname, for example 'loop'
+ * @param array $vararray the var array to insert/add or merge
+ * @param mixed $key Key to search for
+ *
+ * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position]
+ *
+ * int: Position [the position to change or insert at directly given]
+ *
+ * If key is false the position is set to 0
+ * If key is true the position is set to the last entry
+ *
+ * @param string $mode Mode to execute (valid modes are 'insert' and 'change')
+ *
+ * If insert, the vararray is inserted at the given position (position counting from zero).
+ * If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new value).
+ *
+ * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array)
+ * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars)
+ *
+ * @return bool false on error, true on success
+ * @access public
+ */
+ function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert')
+ {
+ if (strpos($blockname, '.') !== false)
+ {
+ // Nested blocks are not supported
+ return false;
+ }
+
+ // Change key to zero (change first position) if false and to last position if true
+ if ($key === false || $key === true)
+ {
+ $key = ($key === false) ? 0 : sizeof($this->_tpldata[$blockname]);
+ }
+
+ // Get correct position if array given
+ if (is_array($key))
+ {
+ // Search array to get correct position
+ list($search_key, $search_value) = @each($key);
+
+ $key = NULL;
+ foreach ($this->_tpldata[$blockname] as $i => $val_ary)
+ {
+ if ($val_ary[$search_key] === $search_value)
+ {
+ $key = $i;
+ break;
+ }
+ }
+
+ // key/value pair not found
+ if ($key === NULL)
+ {
+ return false;
+ }
+ }
+
+ // Insert Block
+ if ($mode == 'insert')
+ {
+ // Make sure we are not exceeding the last iteration
+ if ($key >= sizeof($this->_tpldata[$blockname]))
+ {
+ $key = sizeof($this->_tpldata[$blockname]);
+ unset($this->_tpldata[$blockname][($key - 1)]['S_LAST_ROW']);
+ $vararray['S_LAST_ROW'] = true;
+ }
+ else if ($key === 0)
+ {
+ unset($this->_tpldata[$blockname][0]['S_FIRST_ROW']);
+ $vararray['S_FIRST_ROW'] = true;
+ }
+
+ // Re-position template blocks
+ for ($i = sizeof($this->_tpldata[$blockname]); $i > $key; $i--)
+ {
+ $this->_tpldata[$blockname][$i] = $this->_tpldata[$blockname][$i-1];
+ $this->_tpldata[$blockname][$i]['S_ROW_COUNT'] = $i;
+ }
+
+ // Insert vararray at given position
+ $vararray['S_ROW_COUNT'] = $key;
+ $this->_tpldata[$blockname][$key] = $vararray;
+
+ return true;
+ }
+
+ // Which block to change?
+ if ($mode == 'change')
+ {
+ if ($key == sizeof($this->_tpldata[$blockname]))
+ {
+ $key--;
+ }
+
+ $this->_tpldata[$blockname][$key] = array_merge($this->_tpldata[$blockname][$key], $vararray);
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Include a separate template
+ * @access private
+ */
+ function _tpl_include($filename, $include = true)
+ {
+ $handle = $filename;
+ $this->filename[$handle] = $filename;
+ $this->files[$handle] = $this->root . '/' . $filename;
+ if ($this->inherit_root)
+ {
+ $this->files_inherit[$handle] = $this->inherit_root . '/' . $filename;
+ }
+
+ $filename = $this->_tpl_load($handle);
+
+ if ($include)
+ {
+ global $user;
+
+ if ($filename)
+ {
+ include($filename);
+ return;
+ }
+ eval(' ?>' . $this->compiled_code[$handle] . '<?php ');
+ }
+ }
+
+ /**
+ * Include a php-file
+ * @access private
+ */
+ function _php_include($filename)
+ {
+ global $phpbb_root_path;
+
+ $file = $phpbb_root_path . $filename;
+
+ if (!file_exists($file))
+ {
+ // trigger_error cannot be used here, as the output already started
+ echo 'template->_php_include(): File ' . htmlspecialchars($file) . ' does not exist or is empty';
+ return;
+ }
+ include($file);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/info/ucp_attachments.php b/phpBB/includes/ucp/info/ucp_attachments.php
new file mode 100644
index 0000000000..84edce446c
--- /dev/null
+++ b/phpBB/includes/ucp/info/ucp_attachments.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class ucp_attachments_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'ucp_attachments',
+ 'title' => 'UCP_ATTACHMENTS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'attachments' => array('title' => 'UCP_MAIN_ATTACHMENTS', 'auth' => 'acl_u_attach', 'cat' => array('UCP_MAIN')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/info/ucp_groups.php b/phpBB/includes/ucp/info/ucp_groups.php
new file mode 100644
index 0000000000..2002123c50
--- /dev/null
+++ b/phpBB/includes/ucp/info/ucp_groups.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class ucp_groups_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'ucp_groups',
+ 'title' => 'UCP_USERGROUPS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'membership' => array('title' => 'UCP_USERGROUPS_MEMBER', 'auth' => '', 'cat' => array('UCP_USERGROUPS')),
+ 'manage' => array('title' => 'UCP_USERGROUPS_MANAGE', 'auth' => '', 'cat' => array('UCP_USERGROUPS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/info/ucp_main.php b/phpBB/includes/ucp/info/ucp_main.php
new file mode 100644
index 0000000000..722b7865e6
--- /dev/null
+++ b/phpBB/includes/ucp/info/ucp_main.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class ucp_main_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'ucp_main',
+ 'title' => 'UCP_MAIN',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'front' => array('title' => 'UCP_MAIN_FRONT', 'auth' => '', 'cat' => array('UCP_MAIN')),
+ 'subscribed' => array('title' => 'UCP_MAIN_SUBSCRIBED', 'auth' => '', 'cat' => array('UCP_MAIN')),
+ 'bookmarks' => array('title' => 'UCP_MAIN_BOOKMARKS', 'auth' => 'cfg_allow_bookmarks', 'cat' => array('UCP_MAIN')),
+ 'drafts' => array('title' => 'UCP_MAIN_DRAFTS', 'auth' => '', 'cat' => array('UCP_MAIN')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/info/ucp_pm.php b/phpBB/includes/ucp/info/ucp_pm.php
new file mode 100644
index 0000000000..ade12005c0
--- /dev/null
+++ b/phpBB/includes/ucp/info/ucp_pm.php
@@ -0,0 +1,40 @@
+<?php
+/**
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class ucp_pm_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'ucp_pm',
+ 'title' => 'UCP_PM',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'view' => array('title' => 'UCP_PM_VIEW', 'auth' => 'cfg_allow_privmsg', 'display' => false, 'cat' => array('UCP_PM')),
+ 'compose' => array('title' => 'UCP_PM_COMPOSE', 'auth' => 'cfg_allow_privmsg', 'cat' => array('UCP_PM')),
+ 'drafts' => array('title' => 'UCP_PM_DRAFTS', 'auth' => 'cfg_allow_privmsg', 'cat' => array('UCP_PM')),
+ 'options' => array('title' => 'UCP_PM_OPTIONS', 'auth' => 'cfg_allow_privmsg', 'cat' => array('UCP_PM')),
+ 'popup' => array('title' => 'UCP_PM_POPUP_TITLE', 'auth' => 'cfg_allow_privmsg', 'display' => false, 'cat' => array('UCP_PM')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/info/ucp_prefs.php b/phpBB/includes/ucp/info/ucp_prefs.php
new file mode 100644
index 0000000000..58359e8a19
--- /dev/null
+++ b/phpBB/includes/ucp/info/ucp_prefs.php
@@ -0,0 +1,39 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class ucp_prefs_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'ucp_prefs',
+ 'title' => 'UCP_PREFS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'personal' => array('title' => 'UCP_PREFS_PERSONAL', 'auth' => '', 'cat' => array('UCP_PREFS')),
+ 'post' => array('title' => 'UCP_PREFS_POST', 'auth' => '', 'cat' => array('UCP_PREFS')),
+ 'view' => array('title' => 'UCP_PREFS_VIEW', 'auth' => '', 'cat' => array('UCP_PREFS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/info/ucp_profile.php b/phpBB/includes/ucp/info/ucp_profile.php
new file mode 100644
index 0000000000..03a4c81f46
--- /dev/null
+++ b/phpBB/includes/ucp/info/ucp_profile.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class ucp_profile_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'ucp_profile',
+ 'title' => 'UCP_PROFILE',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'profile_info' => array('title' => 'UCP_PROFILE_PROFILE_INFO', 'auth' => '', 'cat' => array('UCP_PROFILE')),
+ 'signature' => array('title' => 'UCP_PROFILE_SIGNATURE', 'auth' => '', 'cat' => array('UCP_PROFILE')),
+ 'avatar' => array('title' => 'UCP_PROFILE_AVATAR', 'auth' => '', 'cat' => array('UCP_PROFILE')),
+ 'reg_details' => array('title' => 'UCP_PROFILE_REG_DETAILS', 'auth' => '', 'cat' => array('UCP_PROFILE')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/info/ucp_zebra.php b/phpBB/includes/ucp/info/ucp_zebra.php
new file mode 100644
index 0000000000..5fc1f8bee7
--- /dev/null
+++ b/phpBB/includes/ucp/info/ucp_zebra.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package module_install
+*/
+class ucp_zebra_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'ucp_zebra',
+ 'title' => 'UCP_ZEBRA',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'friends' => array('title' => 'UCP_ZEBRA_FRIENDS', 'auth' => '', 'cat' => array('UCP_ZEBRA')),
+ 'foes' => array('title' => 'UCP_ZEBRA_FOES', 'auth' => '', 'cat' => array('UCP_ZEBRA')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php
new file mode 100644
index 0000000000..8debaabf31
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_activate.php
@@ -0,0 +1,143 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* ucp_activate
+* User activation
+* @package ucp
+*/
+class ucp_activate
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $config, $phpbb_root_path, $phpEx;
+ global $db, $user, $auth, $template;
+
+ $user_id = request_var('u', 0);
+ $key = request_var('k', '');
+
+ $sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_notify_type, user_actkey, user_inactive_reason
+ FROM ' . USERS_TABLE . "
+ WHERE user_id = $user_id";
+ $result = $db->sql_query($sql);
+ $user_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$user_row)
+ {
+ trigger_error('NO_USER');
+ }
+
+ if ($user_row['user_type'] <> USER_INACTIVE && !$user_row['user_newpasswd'])
+ {
+ meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
+ trigger_error('ALREADY_ACTIVATED');
+ }
+
+ if (($user_row['user_inactive_reason'] == INACTIVE_MANUAL) || $user_row['user_actkey'] != $key)
+ {
+ trigger_error('WRONG_ACTIVATION');
+ }
+
+ // Do not allow activating by non administrators when admin activation is on
+ // Only activation type the user should be able to do is INACTIVE_REMIND
+ // or activate a new password which is not an activation state :@
+ if (!$user_row['user_newpasswd'] && $user_row['user_inactive_reason'] != INACTIVE_REMIND && $config['require_activation'] == USER_ACTIVATION_ADMIN && !$auth->acl_get('a_user'))
+ {
+ if (!$user->data['is_registered'])
+ {
+ login_box('', $user->lang['NO_AUTH_OPERATION']);
+ }
+ trigger_error('NO_AUTH_OPERATION');
+ }
+
+ $update_password = ($user_row['user_newpasswd']) ? true : false;
+
+ if ($update_password)
+ {
+ $sql_ary = array(
+ 'user_actkey' => '',
+ 'user_password' => $user_row['user_newpasswd'],
+ 'user_newpasswd' => '',
+ 'user_pass_convert' => 0,
+ 'user_login_attempts' => 0,
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . $user_row['user_id'];
+ $db->sql_query($sql);
+
+ add_log('user', $user_row['user_id'], 'LOG_USER_NEW_PASSWORD', $user_row['username']);
+ }
+
+ if (!$update_password)
+ {
+ include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ user_active_flip('activate', $user_row['user_id']);
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_actkey = ''
+ WHERE user_id = {$user_row['user_id']}";
+ $db->sql_query($sql);
+ }
+
+ if ($config['require_activation'] == USER_ACTIVATION_ADMIN && !$update_password)
+ {
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+
+ $messenger = new messenger(false);
+
+ $messenger->template('admin_welcome_activated', $user_row['user_lang']);
+
+ $messenger->to($user_row['user_email'], $user_row['username']);
+
+ $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
+ $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
+ $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
+ $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
+
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($user_row['username']))
+ );
+
+ $messenger->send($user_row['user_notify_type']);
+
+ $message = 'ACCOUNT_ACTIVE_ADMIN';
+ }
+ else
+ {
+ if (!$update_password)
+ {
+ $message = ($user_row['user_inactive_reason'] == INACTIVE_PROFILE) ? 'ACCOUNT_ACTIVE_PROFILE' : 'ACCOUNT_ACTIVE';
+ }
+ else
+ {
+ $message = 'PASSWORD_ACTIVATED';
+ }
+ }
+
+ meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
+ trigger_error($user->lang[$message]);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php
new file mode 100644
index 0000000000..b011b4f75d
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_attachments.php
@@ -0,0 +1,201 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* ucp_attachments
+* User attachments
+* @package ucp
+*/
+class ucp_attachments
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $template, $user, $db, $config, $phpEx, $phpbb_root_path;
+
+ $start = request_var('start', 0);
+ $sort_key = request_var('sk', 'a');
+ $sort_dir = request_var('sd', 'a');
+
+ $delete = (isset($_POST['delete'])) ? true : false;
+ $confirm = (isset($_POST['confirm'])) ? true : false;
+ $delete_ids = array_keys(request_var('attachment', array(0)));
+
+ if ($delete && sizeof($delete_ids))
+ {
+ // Validate $delete_ids...
+ $sql = 'SELECT attach_id
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE poster_id = ' . $user->data['user_id'] . '
+ AND is_orphan = 0
+ AND ' . $db->sql_in_set('attach_id', $delete_ids);
+ $result = $db->sql_query($sql);
+
+ $delete_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $delete_ids[] = $row['attach_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if ($delete && sizeof($delete_ids))
+ {
+ $s_hidden_fields = array(
+ 'delete' => 1
+ );
+
+ foreach ($delete_ids as $attachment_id)
+ {
+ $s_hidden_fields['attachment'][$attachment_id] = 1;
+ }
+
+ if (confirm_box(true))
+ {
+ if (!function_exists('delete_attachments'))
+ {
+ include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+ }
+
+ delete_attachments('attach', $delete_ids);
+
+ meta_refresh(3, $this->u_action);
+ $message = ((sizeof($delete_ids) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED']) . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
+ trigger_error($message);
+ }
+ else
+ {
+ confirm_box(false, (sizeof($delete_ids) == 1) ? 'DELETE_ATTACHMENT' : 'DELETE_ATTACHMENTS', build_hidden_fields($s_hidden_fields));
+ }
+ }
+
+ // Select box eventually
+ $sort_key_text = array('a' => $user->lang['SORT_FILENAME'], 'b' => $user->lang['SORT_COMMENT'], 'c' => $user->lang['SORT_EXTENSION'], 'd' => $user->lang['SORT_SIZE'], 'e' => $user->lang['SORT_DOWNLOADS'], 'f' => $user->lang['SORT_POST_TIME'], 'g' => $user->lang['SORT_TOPIC_TITLE']);
+ $sort_key_sql = array('a' => 'a.real_filename', 'b' => 'a.attach_comment', 'c' => 'a.extension', 'd' => 'a.filesize', 'e' => 'a.download_count', 'f' => 'a.filetime', 'g' => 't.topic_title');
+
+ $sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
+
+ $s_sort_key = '';
+ foreach ($sort_key_text as $key => $value)
+ {
+ $selected = ($sort_key == $key) ? ' selected="selected"' : '';
+ $s_sort_key .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
+ }
+
+ $s_sort_dir = '';
+ foreach ($sort_dir_text as $key => $value)
+ {
+ $selected = ($sort_dir == $key) ? ' selected="selected"' : '';
+ $s_sort_dir .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
+ }
+
+ if (!isset($sort_key_sql[$sort_key]))
+ {
+ $sort_key = 'a';
+ }
+
+ $order_by = $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
+
+ $sql = 'SELECT COUNT(attach_id) as num_attachments
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE poster_id = ' . $user->data['user_id'] . '
+ AND is_orphan = 0';
+ $result = $db->sql_query($sql);
+ $num_attachments = $db->sql_fetchfield('num_attachments');
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT a.*, t.topic_title, p.message_subject as message_title
+ FROM ' . ATTACHMENTS_TABLE . ' a
+ LEFT JOIN ' . TOPICS_TABLE . ' t ON (a.topic_id = t.topic_id AND a.in_message = 0)
+ LEFT JOIN ' . PRIVMSGS_TABLE . ' p ON (a.post_msg_id = p.msg_id AND a.in_message = 1)
+ WHERE a.poster_id = ' . $user->data['user_id'] . "
+ AND a.is_orphan = 0
+ ORDER BY $order_by";
+ $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
+
+ $row_count = 0;
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $template->assign_var('S_ATTACHMENT_ROWS', true);
+
+ do
+ {
+ if ($row['in_message'])
+ {
+ $view_topic = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&amp;p={$row['post_msg_id']}");
+ }
+ else
+ {
+ $view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_id']}&amp;p={$row['post_msg_id']}") . "#p{$row['post_msg_id']}";
+ }
+
+ $template->assign_block_vars('attachrow', array(
+ 'ROW_NUMBER' => $row_count + ($start + 1),
+ 'FILENAME' => $row['real_filename'],
+ 'COMMENT' => bbcode_nl2br($row['attach_comment']),
+ 'EXTENSION' => $row['extension'],
+ 'SIZE' => get_formatted_filesize($row['filesize']),
+ 'DOWNLOAD_COUNT' => $row['download_count'],
+ 'POST_TIME' => $user->format_date($row['filetime']),
+ 'TOPIC_TITLE' => ($row['in_message']) ? $row['message_title'] : $row['topic_title'],
+
+ 'ATTACH_ID' => $row['attach_id'],
+ 'POST_ID' => $row['post_msg_id'],
+ 'TOPIC_ID' => $row['topic_id'],
+
+ 'S_IN_MESSAGE' => $row['in_message'],
+
+ 'U_VIEW_ATTACHMENT' => append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $row['attach_id']),
+ 'U_VIEW_TOPIC' => $view_topic)
+ );
+
+ $row_count++;
+ }
+ while ($row = $db->sql_fetchrow($result));
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'PAGE_NUMBER' => on_page($num_attachments, $config['topics_per_page'], $start),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;sk=$sort_key&amp;sd=$sort_dir", $num_attachments, $config['topics_per_page'], $start),
+ 'TOTAL_ATTACHMENTS' => $num_attachments,
+
+ 'L_TITLE' => $user->lang['UCP_ATTACHMENTS'],
+
+ 'U_SORT_FILENAME' => $this->u_action . "&amp;sk=a&amp;sd=" . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_FILE_COMMENT' => $this->u_action . "&amp;sk=b&amp;sd=" . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_EXTENSION' => $this->u_action . "&amp;sk=c&amp;sd=" . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_FILESIZE' => $this->u_action . "&amp;sk=d&amp;sd=" . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_DOWNLOADS' => $this->u_action . "&amp;sk=e&amp;sd=" . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_POST_TIME' => $this->u_action . "&amp;sk=f&amp;sd=" . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_TOPIC_TITLE' => $this->u_action . "&amp;sk=g&amp;sd=" . (($sort_key == 'g' && $sort_dir == 'a') ? 'd' : 'a'),
+
+ 'S_DISPLAY_MARK_ALL' => ($num_attachments) ? true : false,
+ 'S_DISPLAY_PAGINATION' => ($num_attachments) ? true : false,
+ 'S_UCP_ACTION' => $this->u_action,
+ 'S_SORT_OPTIONS' => $s_sort_key,
+ 'S_ORDER_SELECT' => $s_sort_dir)
+ );
+
+ $this->tpl_name = 'ucp_attachments';
+ $this->page_title = 'UCP_ATTACHMENTS';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_confirm.php b/phpBB/includes/ucp/ucp_confirm.php
new file mode 100644
index 0000000000..445f7c7d2a
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_confirm.php
@@ -0,0 +1,50 @@
+<?php
+/**
+*
+* @package VC
+* @version $Id$
+* @copyright (c) 2005 2008 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* ucp_confirm
+* Visual confirmation
+*
+* Note to potential users of this code ...
+*
+* Remember this is released under the _GPL_ and is subject
+* to that licence. Do not incorporate this within software
+* released or distributed in any way under a licence other
+* than the GPL. We will be watching ... ;)
+*
+* @package VC
+*/
+class ucp_confirm
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $db, $user, $phpbb_root_path, $config, $phpEx;
+
+ include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
+ $captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $captcha->init(request_var('type', 0));
+ $captcha->execute();
+
+ garbage_collection();
+ exit_handler();
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php
new file mode 100644
index 0000000000..423d9b718a
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_groups.php
@@ -0,0 +1,1117 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* ucp_groups
+* @package ucp
+*/
+class ucp_groups
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $config, $phpbb_root_path, $phpEx;
+ global $db, $user, $auth, $cache, $template;
+
+ $user->add_lang('groups');
+
+ $return_page = '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '">', '</a>');
+
+ $mark_ary = request_var('mark', array(0));
+ $submit = (!empty($_POST['submit'])) ? true : false;
+ $delete = (!empty($_POST['delete'])) ? true : false;
+ $error = $data = array();
+
+ switch ($mode)
+ {
+ case 'membership':
+
+ $this->page_title = 'UCP_USERGROUPS_MEMBER';
+
+ if ($submit || isset($_POST['change_default']))
+ {
+ $action = (isset($_POST['change_default'])) ? 'change_default' : request_var('action', '');
+ $group_id = ($action == 'change_default') ? request_var('default', 0) : request_var('selected', 0);
+
+ if (!$group_id)
+ {
+ trigger_error('NO_GROUP_SELECTED');
+ }
+
+ $sql = 'SELECT group_id, group_name, group_type
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_id IN ($group_id, {$user->data['group_id']})";
+ $result = $db->sql_query($sql);
+
+ $group_row = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $row['group_name'] = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
+ $group_row[$row['group_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($group_row))
+ {
+ trigger_error('GROUP_NOT_EXIST');
+ }
+
+ switch ($action)
+ {
+ case 'change_default':
+ // User already having this group set as default?
+ if ($group_id == $user->data['group_id'])
+ {
+ trigger_error($user->lang['ALREADY_DEFAULT_GROUP'] . $return_page);
+ }
+
+ if (!$auth->acl_get('u_chggrp'))
+ {
+ trigger_error($user->lang['NOT_AUTHORISED'] . $return_page);
+ }
+
+ // User needs to be member of the group in order to make it default
+ if (!group_memberships($group_id, $user->data['user_id'], true))
+ {
+ trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
+ }
+
+ if (confirm_box(true))
+ {
+ group_user_attributes('default', $group_id, $user->data['user_id']);
+
+ add_log('user', $user->data['user_id'], 'LOG_USER_GROUP_CHANGE', sprintf($user->lang['USER_GROUP_CHANGE'], $group_row[$user->data['group_id']]['group_name'], $group_row[$group_id]['group_name']));
+
+ meta_refresh(3, $this->u_action);
+ trigger_error($user->lang['CHANGED_DEFAULT_GROUP'] . $return_page);
+ }
+ else
+ {
+ $s_hidden_fields = array(
+ 'default' => $group_id,
+ 'change_default'=> true
+ );
+
+ confirm_box(false, sprintf($user->lang['GROUP_CHANGE_DEFAULT'], $group_row[$group_id]['group_name']), build_hidden_fields($s_hidden_fields));
+ }
+
+ break;
+
+ case 'resign':
+
+ // User tries to resign from default group but is not allowed to change it?
+ if ($group_id == $user->data['group_id'] && !$auth->acl_get('u_chggrp'))
+ {
+ trigger_error($user->lang['NOT_RESIGN_FROM_DEFAULT_GROUP'] . $return_page);
+ }
+
+ if (!($row = group_memberships($group_id, $user->data['user_id'])))
+ {
+ trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
+ }
+ list(, $row) = each($row);
+
+ $sql = 'SELECT group_type
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_id = ' . $group_id;
+ $result = $db->sql_query($sql);
+ $group_type = (int) $db->sql_fetchfield('group_type');
+ $db->sql_freeresult($result);
+
+ if ($group_type != GROUP_OPEN && $group_type != GROUP_FREE)
+ {
+ trigger_error($user->lang['CANNOT_RESIGN_GROUP'] . $return_page);
+ }
+
+ if (confirm_box(true))
+ {
+ group_user_del($group_id, $user->data['user_id']);
+
+ add_log('user', $user->data['user_id'], 'LOG_USER_GROUP_RESIGN', $group_row[$group_id]['group_name']);
+
+ meta_refresh(3, $this->u_action);
+ trigger_error($user->lang[($row['user_pending']) ? 'GROUP_RESIGNED_PENDING' : 'GROUP_RESIGNED_MEMBERSHIP'] . $return_page);
+ }
+ else
+ {
+ $s_hidden_fields = array(
+ 'selected' => $group_id,
+ 'action' => 'resign',
+ 'submit' => true
+ );
+
+ confirm_box(false, ($row['user_pending']) ? 'GROUP_RESIGN_PENDING' : 'GROUP_RESIGN_MEMBERSHIP', build_hidden_fields($s_hidden_fields));
+ }
+
+ break;
+
+ case 'join':
+
+ $sql = 'SELECT ug.*, u.username, u.username_clean, u.user_email
+ FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u
+ WHERE ug.user_id = u.user_id
+ AND ug.group_id = ' . $group_id . '
+ AND ug.user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ if ($row['user_pending'])
+ {
+ trigger_error($user->lang['ALREADY_IN_GROUP_PENDING'] . $return_page);
+ }
+
+ trigger_error($user->lang['ALREADY_IN_GROUP'] . $return_page);
+ }
+
+ // Check permission to join (open group or request)
+ if ($group_row[$group_id]['group_type'] != GROUP_OPEN && $group_row[$group_id]['group_type'] != GROUP_FREE)
+ {
+ trigger_error($user->lang['CANNOT_JOIN_GROUP'] . $return_page);
+ }
+
+ if (confirm_box(true))
+ {
+ if ($group_row[$group_id]['group_type'] == GROUP_FREE)
+ {
+ group_user_add($group_id, $user->data['user_id']);
+
+ $email_template = 'group_added';
+ }
+ else
+ {
+ group_user_add($group_id, $user->data['user_id'], false, false, false, 0, 1);
+
+ $email_template = 'group_request';
+ }
+
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ $messenger = new messenger();
+
+ $sql = 'SELECT u.username, u.username_clean, u.user_email, u.user_notify_type, u.user_jabber, u.user_lang
+ FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u
+ WHERE ug.user_id = u.user_id
+ AND ' . (($group_row[$group_id]['group_type'] == GROUP_FREE) ? "ug.user_id = {$user->data['user_id']}" : 'ug.group_leader = 1') . "
+ AND ug.group_id = $group_id";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $messenger->template($email_template, $row['user_lang']);
+
+ $messenger->to($row['user_email'], $row['username']);
+ $messenger->im($row['user_jabber'], $row['username']);
+
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($row['username']),
+ 'GROUP_NAME' => htmlspecialchars_decode($group_row[$group_id]['group_name']),
+ 'REQUEST_USERNAME' => $user->data['username'],
+
+ 'U_PENDING' => generate_board_url() . "/ucp.$phpEx?i=groups&mode=manage&action=list&g=$group_id",
+ 'U_GROUP' => generate_board_url() . "/memberlist.$phpEx?mode=group&g=$group_id")
+ );
+
+ $messenger->send($row['user_notify_type']);
+ }
+ $db->sql_freeresult($result);
+
+ $messenger->save_queue();
+
+ add_log('user', $user->data['user_id'], 'LOG_USER_GROUP_JOIN' . (($group_row[$group_id]['group_type'] == GROUP_FREE) ? '' : '_PENDING'), $group_row[$group_id]['group_name']);
+
+ meta_refresh(3, $this->u_action);
+ trigger_error($user->lang[($group_row[$group_id]['group_type'] == GROUP_FREE) ? 'GROUP_JOINED' : 'GROUP_JOINED_PENDING'] . $return_page);
+ }
+ else
+ {
+ $s_hidden_fields = array(
+ 'selected' => $group_id,
+ 'action' => 'join',
+ 'submit' => true
+ );
+
+ confirm_box(false, ($group_row[$group_id]['group_type'] == GROUP_FREE) ? 'GROUP_JOIN' : 'GROUP_JOIN_PENDING', build_hidden_fields($s_hidden_fields));
+ }
+
+ break;
+
+ case 'demote':
+
+ if (!($row = group_memberships($group_id, $user->data['user_id'])))
+ {
+ trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
+ }
+ list(, $row) = each($row);
+
+ if (!$row['group_leader'])
+ {
+ trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
+ }
+
+ if (confirm_box(true))
+ {
+ group_user_attributes('demote', $group_id, $user->data['user_id']);
+
+ add_log('user', $user->data['user_id'], 'LOG_USER_GROUP_DEMOTE', $group_row[$group_id]['group_name']);
+
+ meta_refresh(3, $this->u_action);
+ trigger_error($user->lang['USER_GROUP_DEMOTED'] . $return_page);
+ }
+ else
+ {
+ $s_hidden_fields = array(
+ 'selected' => $group_id,
+ 'action' => 'demote',
+ 'submit' => true
+ );
+
+ confirm_box(false, 'USER_GROUP_DEMOTE', build_hidden_fields($s_hidden_fields));
+ }
+
+ break;
+ }
+ }
+
+ $sql = 'SELECT g.*, ug.group_leader, ug.user_pending
+ FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . ' ug
+ WHERE ug.user_id = ' . $user->data['user_id'] . '
+ AND g.group_id = ug.group_id
+ ORDER BY g.group_type DESC, g.group_name';
+ $result = $db->sql_query($sql);
+
+ $group_id_ary = array();
+ $leader_count = $member_count = $pending_count = 0;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $block = ($row['group_leader']) ? 'leader' : (($row['user_pending']) ? 'pending' : 'member');
+
+ switch ($row['group_type'])
+ {
+ case GROUP_OPEN:
+ $group_status = 'OPEN';
+ break;
+
+ case GROUP_CLOSED:
+ $group_status = 'CLOSED';
+ break;
+
+ case GROUP_HIDDEN:
+ $group_status = 'HIDDEN';
+ break;
+
+ case GROUP_SPECIAL:
+ $group_status = 'SPECIAL';
+ break;
+
+ case GROUP_FREE:
+ $group_status = 'FREE';
+ break;
+ }
+
+ $template->assign_block_vars($block, array(
+ 'GROUP_ID' => $row['group_id'],
+ 'GROUP_NAME' => ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'],
+ 'GROUP_DESC' => ($row['group_type'] <> GROUP_SPECIAL) ? generate_text_for_display($row['group_desc'], $row['group_desc_uid'], $row['group_desc_bitfield'], $row['group_desc_options']) : $user->lang['GROUP_IS_SPECIAL'],
+ 'GROUP_SPECIAL' => ($row['group_type'] <> GROUP_SPECIAL) ? false : true,
+ 'GROUP_STATUS' => $user->lang['GROUP_IS_' . $group_status],
+ 'GROUP_COLOUR' => $row['group_colour'],
+
+ 'U_VIEW_GROUP' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']),
+
+ 'S_GROUP_DEFAULT' => ($row['group_id'] == $user->data['group_id']) ? true : false,
+ 'S_ROW_COUNT' => ${$block . '_count'}++)
+ );
+
+ $group_id_ary[] = (int) $row['group_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // Hide hidden groups unless user is an admin with group privileges
+ $sql_and = ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? '<> ' . GROUP_SPECIAL : 'NOT IN (' . GROUP_SPECIAL . ', ' . GROUP_HIDDEN . ')';
+
+ $sql = 'SELECT group_id, group_name, group_colour, group_desc, group_desc_uid, group_desc_bitfield, group_desc_options, group_type, group_founder_manage
+ FROM ' . GROUPS_TABLE . '
+ WHERE ' . ((sizeof($group_id_ary)) ? $db->sql_in_set('group_id', $group_id_ary, true) . ' AND ' : '') . "
+ group_type $sql_and
+ ORDER BY group_type DESC, group_name";
+ $result = $db->sql_query($sql);
+
+ $nonmember_count = 0;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ switch ($row['group_type'])
+ {
+ case GROUP_OPEN:
+ $group_status = 'OPEN';
+ break;
+
+ case GROUP_CLOSED:
+ $group_status = 'CLOSED';
+ break;
+
+ case GROUP_HIDDEN:
+ $group_status = 'HIDDEN';
+ break;
+
+ case GROUP_SPECIAL:
+ $group_status = 'SPECIAL';
+ break;
+
+ case GROUP_FREE:
+ $group_status = 'FREE';
+ break;
+ }
+
+ $template->assign_block_vars('nonmember', array(
+ 'GROUP_ID' => $row['group_id'],
+ 'GROUP_NAME' => ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'],
+ 'GROUP_DESC' => ($row['group_type'] <> GROUP_SPECIAL) ? generate_text_for_display($row['group_desc'], $row['group_desc_uid'], $row['group_desc_bitfield'], $row['group_desc_options']) : $user->lang['GROUP_IS_SPECIAL'],
+ 'GROUP_SPECIAL' => ($row['group_type'] <> GROUP_SPECIAL) ? false : true,
+ 'GROUP_CLOSED' => ($row['group_type'] <> GROUP_CLOSED || $auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? false : true,
+ 'GROUP_STATUS' => $user->lang['GROUP_IS_' . $group_status],
+ 'S_CAN_JOIN' => ($row['group_type'] == GROUP_OPEN || $row['group_type'] == GROUP_FREE) ? true : false,
+ 'GROUP_COLOUR' => $row['group_colour'],
+
+ 'U_VIEW_GROUP' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']),
+
+ 'S_ROW_COUNT' => $nonmember_count++)
+ );
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'S_CHANGE_DEFAULT' => ($auth->acl_get('u_chggrp')) ? true : false,
+ 'S_LEADER_COUNT' => $leader_count,
+ 'S_MEMBER_COUNT' => $member_count,
+ 'S_PENDING_COUNT' => $pending_count,
+ 'S_NONMEMBER_COUNT' => $nonmember_count,
+
+ 'S_UCP_ACTION' => $this->u_action)
+ );
+
+ break;
+
+ case 'manage':
+
+ $this->page_title = 'UCP_USERGROUPS_MANAGE';
+ $action = (isset($_POST['addusers'])) ? 'addusers' : request_var('action', '');
+ $group_id = request_var('g', 0);
+
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+
+ add_form_key('ucp_groups');
+
+ if ($group_id)
+ {
+ $sql = 'SELECT *
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_id = $group_id";
+ $result = $db->sql_query($sql);
+ $group_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$group_row)
+ {
+ trigger_error($user->lang['NO_GROUP'] . $return_page);
+ }
+
+ // Check if the user is allowed to manage this group if set to founder only.
+ if ($user->data['user_type'] != USER_FOUNDER && $group_row['group_founder_manage'])
+ {
+ trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . $return_page, E_USER_WARNING);
+ }
+
+ $group_name = $group_row['group_name'];
+ $group_type = $group_row['group_type'];
+
+ $avatar_img = (!empty($group_row['group_avatar'])) ? get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR') : '<img src="' . $phpbb_root_path . 'adm/images/no_avatar.gif" alt="" />';
+
+ $template->assign_vars(array(
+ 'GROUP_NAME' => ($group_type == GROUP_SPECIAL) ? $user->lang['G_' . $group_name] : $group_name,
+ 'GROUP_INTERNAL_NAME' => $group_name,
+ 'GROUP_COLOUR' => (isset($group_row['group_colour'])) ? $group_row['group_colour'] : '',
+ 'GROUP_DESC_DISP' => generate_text_for_display($group_row['group_desc'], $group_row['group_desc_uid'], $group_row['group_desc_bitfield'], $group_row['group_desc_options']),
+ 'GROUP_TYPE' => $group_row['group_type'],
+
+ 'AVATAR' => $avatar_img,
+ 'AVATAR_IMAGE' => $avatar_img,
+ 'AVATAR_WIDTH' => (isset($group_row['group_avatar_width'])) ? $group_row['group_avatar_width'] : '',
+ 'AVATAR_HEIGHT' => (isset($group_row['group_avatar_height'])) ? $group_row['group_avatar_height'] : '',
+ ));
+ }
+
+ switch ($action)
+ {
+ case 'edit':
+
+ if (!$group_id)
+ {
+ trigger_error($user->lang['NO_GROUP'] . $return_page);
+ }
+
+ if (!($row = group_memberships($group_id, $user->data['user_id'])))
+ {
+ trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
+ }
+ list(, $row) = each($row);
+
+ if (!$row['group_leader'])
+ {
+ trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
+ }
+
+ $file_uploads = (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false;
+ $user->add_lang(array('acp/groups', 'acp/common'));
+
+ $data = $submit_ary = array();
+
+ $update = (isset($_POST['update'])) ? true : false;
+
+ $error = array();
+
+ $avatar_select = basename(request_var('avatar_select', ''));
+ $category = basename(request_var('category', ''));
+
+ $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false;
+
+ // Did we submit?
+ if ($update)
+ {
+ $group_name = utf8_normalize_nfc(request_var('group_name', '', true));
+ $group_desc = utf8_normalize_nfc(request_var('group_desc', '', true));
+ $group_type = request_var('group_type', GROUP_FREE);
+
+ $allow_desc_bbcode = request_var('desc_parse_bbcode', false);
+ $allow_desc_urls = request_var('desc_parse_urls', false);
+ $allow_desc_smilies = request_var('desc_parse_smilies', false);
+
+ $submit_ary = array(
+ 'colour' => request_var('group_colour', ''),
+ 'rank' => request_var('group_rank', 0),
+ 'receive_pm' => isset($_REQUEST['group_receive_pm']) ? 1 : 0,
+ 'message_limit' => request_var('group_message_limit', 0),
+ 'max_recipients'=> request_var('group_max_recipients', 0),
+ );
+
+ $data['uploadurl'] = request_var('uploadurl', '');
+ $data['remotelink'] = request_var('remotelink', '');
+ $data['width'] = request_var('width', '');
+ $data['height'] = request_var('height', '');
+ $delete = request_var('delete', '');
+
+ if (!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl'] || $data['remotelink'])
+ {
+ // Avatar stuff
+ $var_ary = array(
+ 'uploadurl' => array('string', true, 5, 255),
+ 'remotelink' => array('string', true, 5, 255),
+ 'width' => array('string', true, 1, 3),
+ 'height' => array('string', true, 1, 3),
+ );
+
+ if (!($error = validate_data($data, $var_ary)))
+ {
+ $data['user_id'] = "g$group_id";
+
+ if ((!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl']) && $can_upload)
+ {
+ list($submit_ary['avatar_type'], $submit_ary['avatar'], $submit_ary['avatar_width'], $submit_ary['avatar_height']) = avatar_upload($data, $error);
+ }
+ else if ($data['remotelink'])
+ {
+ list($submit_ary['avatar_type'], $submit_ary['avatar'], $submit_ary['avatar_width'], $submit_ary['avatar_height']) = avatar_remote($data, $error);
+ }
+ }
+ }
+ else if ($avatar_select && $config['allow_avatar_local'])
+ {
+ // check avatar gallery
+ if (is_dir($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category))
+ {
+ $submit_ary['avatar_type'] = AVATAR_GALLERY;
+
+ list($submit_ary['avatar_width'], $submit_ary['avatar_height']) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . $avatar_select);
+ $submit_ary['avatar'] = $category . '/' . $avatar_select;
+ }
+ }
+ else if ($delete)
+ {
+ $submit_ary['avatar'] = '';
+ $submit_ary['avatar_type'] = $submit_ary['avatar_width'] = $submit_ary['avatar_height'] = 0;
+ }
+ else if ($data['width'] && $data['height'])
+ {
+ // Only update the dimensions?
+ if ($config['avatar_max_width'] || $config['avatar_max_height'])
+ {
+ if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
+ {
+ $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ }
+ }
+
+ if (!sizeof($error))
+ {
+ if ($config['avatar_min_width'] || $config['avatar_min_height'])
+ {
+ if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
+ {
+ $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ }
+ }
+ }
+
+ if (!sizeof($error))
+ {
+ $submit_ary['avatar_width'] = $data['width'];
+ $submit_ary['avatar_height'] = $data['height'];
+ }
+ }
+
+ if ((isset($submit_ary['avatar']) && $submit_ary['avatar'] && (!isset($group_row['group_avatar']))) || $delete)
+ {
+ if (isset($group_row['group_avatar']) && $group_row['group_avatar'])
+ {
+ avatar_delete('group', $group_row, true);
+ }
+ }
+
+ if (!check_form_key('ucp_groups'))
+ {
+ $error[] = $user->lang['FORM_INVALID'];
+ }
+
+ if (!sizeof($error))
+ {
+ // Only set the rank, colour, etc. if it's changed or if we're adding a new
+ // group. This prevents existing group members being updated if no changes
+ // were made.
+
+ $group_attributes = array();
+ $test_variables = array(
+ 'rank' => 'int',
+ 'colour' => 'string',
+ 'avatar' => 'string',
+ 'avatar_type' => 'int',
+ 'avatar_width' => 'int',
+ 'avatar_height' => 'int',
+ 'receive_pm' => 'int',
+ 'legend' => 'int',
+ 'message_limit' => 'int',
+ 'max_recipients'=> 'int',
+ );
+
+ foreach ($test_variables as $test => $type)
+ {
+ if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test]))
+ {
+ settype($submit_ary[$test], $type);
+ $group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test];
+ }
+ }
+
+ if (!($error = group_create($group_id, $group_type, $group_name, $group_desc, $group_attributes, $allow_desc_bbcode, $allow_desc_urls, $allow_desc_smilies)))
+ {
+ $cache->destroy('sql', GROUPS_TABLE);
+
+ $message = ($action == 'edit') ? 'GROUP_UPDATED' : 'GROUP_CREATED';
+ trigger_error($user->lang[$message] . $return_page);
+ }
+ }
+
+ if (sizeof($error))
+ {
+ $group_rank = $submit_ary['rank'];
+
+ $group_desc_data = array(
+ 'text' => $group_desc,
+ 'allow_bbcode' => $allow_desc_bbcode,
+ 'allow_smilies' => $allow_desc_smilies,
+ 'allow_urls' => $allow_desc_urls
+ );
+ }
+ }
+ else if (!$group_id)
+ {
+ $group_name = utf8_normalize_nfc(request_var('group_name', '', true));
+ $group_desc_data = array(
+ 'text' => '',
+ 'allow_bbcode' => true,
+ 'allow_smilies' => true,
+ 'allow_urls' => true
+ );
+ $group_rank = 0;
+ $group_type = GROUP_OPEN;
+ }
+ else
+ {
+ $group_desc_data = generate_text_for_edit($group_row['group_desc'], $group_row['group_desc_uid'], $group_row['group_desc_options']);
+ $group_rank = $group_row['group_rank'];
+ }
+
+ $sql = 'SELECT *
+ FROM ' . RANKS_TABLE . '
+ WHERE rank_special = 1
+ ORDER BY rank_title';
+ $result = $db->sql_query($sql);
+
+ $rank_options = '<option value="0"' . ((!$group_rank) ? ' selected="selected"' : '') . '>' . $user->lang['USER_DEFAULT'] . '</option>';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $selected = ($group_rank && $row['rank_id'] == $group_rank) ? ' selected="selected"' : '';
+ $rank_options .= '<option value="' . $row['rank_id'] . '"' . $selected . '>' . $row['rank_title'] . '</option>';
+ }
+ $db->sql_freeresult($result);
+
+ $type_free = ($group_type == GROUP_FREE) ? ' checked="checked"' : '';
+ $type_open = ($group_type == GROUP_OPEN) ? ' checked="checked"' : '';
+ $type_closed = ($group_type == GROUP_CLOSED) ? ' checked="checked"' : '';
+ $type_hidden = ($group_type == GROUP_HIDDEN) ? ' checked="checked"' : '';
+
+ $display_gallery = (isset($_POST['display_gallery'])) ? true : false;
+
+ if ($config['allow_avatar'] && $config['allow_avatar_local'] && $display_gallery)
+ {
+ avatar_gallery($category, $avatar_select, 4);
+ }
+
+ $avatars_enabled = ($config['allow_avatar'] && (($can_upload && ($config['allow_avatar_upload'] || $config['allow_avatar_remote_upload'])) || ($config['allow_avatar_local'] || $config['allow_avatar_remote']))) ? true : false;
+
+ $template->assign_vars(array(
+ 'S_EDIT' => true,
+ 'S_INCLUDE_SWATCH' => true,
+ 'S_FORM_ENCTYPE' => ($config['allow_avatar'] && $can_upload && ($config['allow_avatar_upload'] || $config['allow_avatar_remote_upload'])) ? ' enctype="multipart/form-data"' : '',
+ 'S_ERROR' => (sizeof($error)) ? true : false,
+ 'S_SPECIAL_GROUP' => ($group_type == GROUP_SPECIAL) ? true : false,
+ 'S_AVATARS_ENABLED' => $avatars_enabled,
+ 'S_DISPLAY_GALLERY' => ($config['allow_avatar'] && $config['allow_avatar_local'] && !$display_gallery) ? true : false,
+ 'S_IN_GALLERY' => ($config['allow_avatar_local'] && $display_gallery) ? true : false,
+
+ 'S_UPLOAD_AVATAR_FILE' => ($config['allow_avatar'] && $config['allow_avatar_upload'] && $can_upload) ? true : false,
+ 'S_UPLOAD_AVATAR_URL' => ($config['allow_avatar'] && $config['allow_avatar_remote_upload'] && $can_upload) ? true : false,
+ 'S_LINK_AVATAR' => ($config['allow_avatar'] && $config['allow_avatar_remote']) ? true : false,
+
+ 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'GROUP_RECEIVE_PM' => (isset($group_row['group_receive_pm']) && $group_row['group_receive_pm']) ? ' checked="checked"' : '',
+ 'GROUP_MESSAGE_LIMIT' => (isset($group_row['group_message_limit'])) ? $group_row['group_message_limit'] : 0,
+ 'GROUP_MAX_RECIPIENTS' => (isset($group_row['group_max_recipients'])) ? $group_row['group_max_recipients'] : 0,
+
+ 'GROUP_DESC' => $group_desc_data['text'],
+ 'S_DESC_BBCODE_CHECKED' => $group_desc_data['allow_bbcode'],
+ 'S_DESC_URLS_CHECKED' => $group_desc_data['allow_urls'],
+ 'S_DESC_SMILIES_CHECKED'=> $group_desc_data['allow_smilies'],
+
+ 'S_RANK_OPTIONS' => $rank_options,
+ 'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'],
+
+ 'GROUP_TYPE_FREE' => GROUP_FREE,
+ 'GROUP_TYPE_OPEN' => GROUP_OPEN,
+ 'GROUP_TYPE_CLOSED' => GROUP_CLOSED,
+ 'GROUP_TYPE_HIDDEN' => GROUP_HIDDEN,
+ 'GROUP_TYPE_SPECIAL' => GROUP_SPECIAL,
+
+ 'GROUP_FREE' => $type_free,
+ 'GROUP_OPEN' => $type_open,
+ 'GROUP_CLOSED' => $type_closed,
+ 'GROUP_HIDDEN' => $type_hidden,
+
+ 'U_SWATCH' => append_sid("{$phpbb_root_path}adm/swatch.$phpEx", 'form=ucp&amp;name=group_colour'),
+ 'S_UCP_ACTION' => $this->u_action . "&amp;action=$action&amp;g=$group_id",
+ 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
+ ));
+
+ break;
+
+ case 'list':
+
+ if (!$group_id)
+ {
+ trigger_error($user->lang['NO_GROUP'] . $return_page);
+ }
+
+ if (!($row = group_memberships($group_id, $user->data['user_id'])))
+ {
+ trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
+ }
+ list(, $row) = each($row);
+
+ if (!$row['group_leader'])
+ {
+ trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
+ }
+
+ $user->add_lang(array('acp/groups', 'acp/common'));
+ $start = request_var('start', 0);
+
+ // Grab the leaders - always, on every page...
+ $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
+ FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
+ WHERE ug.group_id = $group_id
+ AND u.user_id = ug.user_id
+ AND ug.group_leader = 1
+ ORDER BY ug.user_pending DESC, u.username_clean";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $template->assign_block_vars('leader', array(
+ 'USERNAME' => $row['username'],
+ 'USERNAME_COLOUR' => $row['user_colour'],
+ 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
+ 'U_USER_VIEW' => get_username_string('profile', $row['user_id'], $row['username']),
+ 'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
+ 'JOINED' => ($row['user_regdate']) ? $user->format_date($row['user_regdate']) : ' - ',
+ 'USER_POSTS' => $row['user_posts'],
+ 'USER_ID' => $row['user_id'])
+ );
+ }
+ $db->sql_freeresult($result);
+
+ // Total number of group members (non-leaders)
+ $sql = 'SELECT COUNT(user_id) AS total_members
+ FROM ' . USER_GROUP_TABLE . "
+ WHERE group_id = $group_id
+ AND group_leader = 0";
+ $result = $db->sql_query($sql);
+ $total_members = (int) $db->sql_fetchfield('total_members');
+ $db->sql_freeresult($result);
+
+ // Grab the members
+ $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
+ FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
+ WHERE ug.group_id = $group_id
+ AND u.user_id = ug.user_id
+ AND ug.group_leader = 0
+ ORDER BY ug.user_pending DESC, u.username_clean";
+ $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
+
+ $pending = false;
+ $approved = false;
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['user_pending'] && !$pending)
+ {
+ $template->assign_block_vars('member', array(
+ 'S_PENDING' => true)
+ );
+ $template->assign_var('S_PENDING_SET', true);
+
+ $pending = true;
+ }
+ else if (!$row['user_pending'] && !$approved)
+ {
+ $template->assign_block_vars('member', array(
+ 'S_APPROVED' => true)
+ );
+ $template->assign_var('S_APPROVED_SET', true);
+
+ $approved = true;
+ }
+
+ $template->assign_block_vars('member', array(
+ 'USERNAME' => $row['username'],
+ 'USERNAME_COLOUR' => $row['user_colour'],
+ 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
+ 'U_USER_VIEW' => get_username_string('profile', $row['user_id'], $row['username']),
+ 'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
+ 'JOINED' => ($row['user_regdate']) ? $user->format_date($row['user_regdate']) : ' - ',
+ 'USER_POSTS' => $row['user_posts'],
+ 'USER_ID' => $row['user_id'])
+ );
+ }
+ $db->sql_freeresult($result);
+
+ $s_action_options = '';
+ $options = array('default' => 'DEFAULT', 'approve' => 'APPROVE', 'deleteusers' => 'DELETE');
+
+ foreach ($options as $option => $lang)
+ {
+ $s_action_options .= '<option value="' . $option . '">' . $user->lang['GROUP_' . $lang] . '</option>';
+ }
+
+ $template->assign_vars(array(
+ 'S_LIST' => true,
+ 'S_ACTION_OPTIONS' => $s_action_options,
+ 'S_ON_PAGE' => on_page($total_members, $config['topics_per_page'], $start),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;action=$action&amp;g=$group_id", $total_members, $config['topics_per_page'], $start),
+
+ 'U_ACTION' => $this->u_action . "&amp;g=$group_id",
+ 'S_UCP_ACTION' => $this->u_action . "&amp;g=$group_id",
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=ucp&amp;field=usernames'),
+ ));
+
+ break;
+
+ case 'approve':
+
+ if (!$group_id)
+ {
+ trigger_error($user->lang['NO_GROUP'] . $return_page);
+ }
+
+ if (!($row = group_memberships($group_id, $user->data['user_id'])))
+ {
+ trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
+ }
+ list(, $row) = each($row);
+
+ if (!$row['group_leader'])
+ {
+ trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
+ }
+
+ $user->add_lang('acp/groups');
+
+ // Approve, demote or promote
+ group_user_attributes('approve', $group_id, $mark_ary, false, false);
+
+ trigger_error($user->lang['USERS_APPROVED'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&amp;action=list&amp;g=' . $group_id . '">', '</a>'));
+
+ break;
+
+ case 'default':
+
+ if (!$group_id)
+ {
+ trigger_error($user->lang['NO_GROUP'] . $return_page);
+ }
+
+ if (!($row = group_memberships($group_id, $user->data['user_id'])))
+ {
+ trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
+ }
+ list(, $row) = each($row);
+
+ if (!$row['group_leader'])
+ {
+ trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
+ }
+
+ $group_row['group_name'] = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
+
+ if (confirm_box(true))
+ {
+ if (!sizeof($mark_ary))
+ {
+ $start = 0;
+
+ do
+ {
+ $sql = 'SELECT user_id
+ FROM ' . USER_GROUP_TABLE . "
+ WHERE group_id = $group_id
+ ORDER BY user_id";
+ $result = $db->sql_query_limit($sql, 200, $start);
+
+ $mark_ary = array();
+ if ($row = $db->sql_fetchrow($result))
+ {
+ do
+ {
+ $mark_ary[] = $row['user_id'];
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ group_user_attributes('default', $group_id, $mark_ary, false, $group_row['group_name'], $group_row);
+
+ $start = (sizeof($mark_ary) < 200) ? 0 : $start + 200;
+ }
+ else
+ {
+ $start = 0;
+ }
+ $db->sql_freeresult($result);
+ }
+ while ($start);
+ }
+ else
+ {
+ group_user_attributes('default', $group_id, $mark_ary, false, $group_row['group_name'], $group_row);
+ }
+
+ $user->add_lang('acp/groups');
+
+ trigger_error($user->lang['GROUP_DEFS_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&amp;action=list&amp;g=' . $group_id . '">', '</a>'));
+ }
+ else
+ {
+ $user->add_lang('acp/common');
+
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'mark' => $mark_ary,
+ 'g' => $group_id,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action))
+ );
+ }
+
+ // redirect to last screen
+ redirect($this->u_action . '&amp;action=list&amp;g=' . $group_id);
+
+ break;
+
+ case 'deleteusers':
+
+ $user->add_lang(array('acp/groups', 'acp/common'));
+
+ if (!($row = group_memberships($group_id, $user->data['user_id'])))
+ {
+ trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
+ }
+ list(, $row) = each($row);
+
+ if (!$row['group_leader'])
+ {
+ trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
+ }
+
+ $group_row['group_name'] = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
+
+ if (confirm_box(true))
+ {
+ if (!$group_id)
+ {
+ trigger_error($user->lang['NO_GROUP'] . $return_page);
+ }
+
+ $error = group_user_del($group_id, $mark_ary, false, $group_row['group_name']);
+
+ if ($error)
+ {
+ trigger_error($user->lang[$error] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&amp;action=list&amp;g=' . $group_id . '">', '</a>'));
+ }
+
+ trigger_error($user->lang['GROUP_USERS_REMOVE'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&amp;action=list&amp;g=' . $group_id . '">', '</a>'));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'mark' => $mark_ary,
+ 'g' => $group_id,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action))
+ );
+ }
+
+ // redirect to last screen
+ redirect($this->u_action . '&amp;action=list&amp;g=' . $group_id);
+
+ break;
+
+ case 'addusers':
+
+ $user->add_lang(array('acp/groups', 'acp/common'));
+
+ $names = utf8_normalize_nfc(request_var('usernames', '', true));
+
+ if (!$group_id)
+ {
+ trigger_error($user->lang['NO_GROUP'] . $return_page);
+ }
+
+ if (!$names)
+ {
+ trigger_error($user->lang['NO_USERS'] . $return_page);
+ }
+
+ if (!($row = group_memberships($group_id, $user->data['user_id'])))
+ {
+ trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
+ }
+ list(, $row) = each($row);
+
+ if (!$row['group_leader'])
+ {
+ trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
+ }
+
+ $name_ary = array_unique(explode("\n", $names));
+ $group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
+
+ $default = request_var('default', 0);
+
+ if (confirm_box(true))
+ {
+ // Add user/s to group
+ if ($error = group_user_add($group_id, false, $name_ary, $group_name, $default, 0, 0, $group_row))
+ {
+ trigger_error($user->lang[$error] . $return_page);
+ }
+
+ trigger_error($user->lang['GROUP_USERS_ADDED'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&amp;action=list&amp;g=' . $group_id . '">', '</a>'));
+ }
+ else
+ {
+ $s_hidden_fields = array(
+ 'default' => $default,
+ 'usernames' => $names,
+ 'g' => $group_id,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action
+ );
+ confirm_box(false, sprintf($user->lang['GROUP_CONFIRM_ADD_USER' . ((sizeof($name_ary) == 1) ? '' : 'S')], implode(', ', $name_ary)), build_hidden_fields($s_hidden_fields));
+ }
+
+ trigger_error($user->lang['NO_USERS_ADDED'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&amp;action=list&amp;g=' . $group_id . '">', '</a>'));
+
+ break;
+
+ default:
+ $user->add_lang('acp/common');
+
+ $sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_desc, g.group_desc_uid, g.group_desc_bitfield, g.group_desc_options, g.group_type, ug.group_leader
+ FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . ' ug
+ WHERE ug.user_id = ' . $user->data['user_id'] . '
+ AND g.group_id = ug.group_id
+ AND ug.group_leader = 1
+ ORDER BY g.group_type DESC, g.group_name';
+ $result = $db->sql_query($sql);
+
+ while ($value = $db->sql_fetchrow($result))
+ {
+ $template->assign_block_vars('leader', array(
+ 'GROUP_NAME' => ($value['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $value['group_name']] : $value['group_name'],
+ 'GROUP_DESC' => generate_text_for_display($value['group_desc'], $value['group_desc_uid'], $value['group_desc_bitfield'], $value['group_desc_options']),
+ 'GROUP_TYPE' => $value['group_type'],
+ 'GROUP_ID' => $value['group_id'],
+ 'GROUP_COLOUR' => $value['group_colour'],
+
+ 'U_LIST' => $this->u_action . "&amp;action=list&amp;g={$value['group_id']}",
+ 'U_EDIT' => $this->u_action . "&amp;action=edit&amp;g={$value['group_id']}")
+ );
+ }
+ $db->sql_freeresult($result);
+
+ break;
+ }
+
+ break;
+ }
+
+ $this->tpl_name = 'ucp_groups_' . $mode;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
new file mode 100644
index 0000000000..6ac2412ef0
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -0,0 +1,835 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* ucp_main
+* UCP Front Panel
+* @package ucp
+*/
+class ucp_main
+{
+ var $p_master;
+ var $u_action;
+
+ function ucp_main(&$p_master)
+ {
+ $this->p_master = &$p_master;
+ }
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
+
+ switch ($mode)
+ {
+ case 'front':
+
+ $user->add_lang('memberlist');
+
+ $sql_from = TOPICS_TABLE . ' t ';
+ $sql_select = '';
+
+ if ($config['load_db_track'])
+ {
+ $sql_from .= ' LEFT JOIN ' . TOPICS_POSTED_TABLE . ' tp ON (tp.topic_id = t.topic_id
+ AND tp.user_id = ' . $user->data['user_id'] . ')';
+ $sql_select .= ', tp.topic_posted';
+ }
+
+ if ($config['load_db_lastread'])
+ {
+ $sql_from .= ' LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.topic_id = t.topic_id
+ AND tt.user_id = ' . $user->data['user_id'] . ')';
+ $sql_select .= ', tt.mark_time';
+ }
+
+ $topic_type = $user->lang['VIEW_TOPIC_GLOBAL'];
+ $folder = 'global_read';
+ $folder_new = 'global_unread';
+
+ // Get cleaned up list... return only those forums not having the f_read permission
+ $forum_ary = $auth->acl_getf('!f_read', true);
+ $forum_ary = array_unique(array_keys($forum_ary));
+
+ // Determine first forum the user is able to read into - for global announcement link
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_type = ' . FORUM_POST;
+
+ if (sizeof($forum_ary))
+ {
+ $sql .= ' AND ' . $db->sql_in_set('forum_id', $forum_ary, true);
+ }
+ $result = $db->sql_query_limit($sql, 1);
+ $g_forum_id = (int) $db->sql_fetchfield('forum_id');
+ $db->sql_freeresult($result);
+
+ $sql = "SELECT t.* $sql_select
+ FROM $sql_from
+ WHERE t.forum_id = 0
+ AND t.topic_type = " . POST_GLOBAL . '
+ ORDER BY t.topic_last_post_time DESC';
+
+ $topic_list = $rowset = array();
+ // If the user can't see any forums, he can't read any posts because fid of 0 is invalid
+ if ($g_forum_id)
+ {
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_list[] = $row['topic_id'];
+ $rowset[$row['topic_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ $topic_tracking_info = array();
+ if ($config['load_db_lastread'])
+ {
+ $topic_tracking_info = get_topic_tracking(0, $topic_list, $rowset, false, $topic_list);
+ }
+ else
+ {
+ $topic_tracking_info = get_complete_topic_tracking(0, $topic_list, $topic_list);
+ }
+
+ foreach ($topic_list as $topic_id)
+ {
+ $row = &$rowset[$topic_id];
+
+ $forum_id = $row['forum_id'];
+ $topic_id = $row['topic_id'];
+
+ $unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
+
+ $folder_img = ($unread_topic) ? $folder_new : $folder;
+ $folder_alt = ($unread_topic) ? 'NEW_POSTS' : (($row['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'NO_NEW_POSTS');
+
+ if ($row['topic_status'] == ITEM_LOCKED)
+ {
+ $folder_img .= '_locked';
+ }
+
+ // Posted image?
+ if (!empty($row['topic_posted']) && $row['topic_posted'])
+ {
+ $folder_img .= '_mine';
+ }
+
+ $template->assign_block_vars('topicrow', array(
+ 'FORUM_ID' => $forum_id,
+ 'TOPIC_ID' => $topic_id,
+ 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
+ 'LAST_POST_SUBJECT' => censor_text($row['topic_last_post_subject']),
+ 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
+ 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
+ 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'TOPIC_TITLE' => censor_text($row['topic_title']),
+ 'TOPIC_TYPE' => $topic_type,
+
+ 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
+ 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', '') : '',
+
+ 'S_USER_POSTED' => (!empty($row['topic_posted']) && $row['topic_posted']) ? true : false,
+ 'S_UNREAD' => $unread_topic,
+
+ 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&amp;t=$topic_id&amp;p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
+ 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
+ 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&amp;t=$topic_id"))
+ );
+ }
+
+ if ($config['load_user_activity'])
+ {
+ if (!function_exists('display_user_activity'))
+ {
+ include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ }
+ display_user_activity($user->data);
+ }
+
+ // Do the relevant calculations
+ $memberdays = max(1, round((time() - $user->data['user_regdate']) / 86400));
+ $posts_per_day = $user->data['user_posts'] / $memberdays;
+ $percentage = ($config['num_posts']) ? min(100, ($user->data['user_posts'] / $config['num_posts']) * 100) : 0;
+
+ $template->assign_vars(array(
+ 'USER_COLOR' => (!empty($user->data['user_colour'])) ? $user->data['user_colour'] : '',
+ 'JOINED' => $user->format_date($user->data['user_regdate']),
+ 'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit),
+ 'WARNINGS' => ($user->data['user_warnings']) ? $user->data['user_warnings'] : 0,
+ 'POSTS' => ($user->data['user_posts']) ? $user->data['user_posts'] : 0,
+ 'POSTS_DAY' => sprintf($user->lang['POST_DAY'], $posts_per_day),
+ 'POSTS_PCT' => sprintf($user->lang['POST_PCT'], $percentage),
+
+ 'OCCUPATION' => (!empty($row['user_occ'])) ? $row['user_occ'] : '',
+ 'INTERESTS' => (!empty($row['user_interests'])) ? $row['user_interests'] : '',
+
+// 'S_GROUP_OPTIONS' => $group_options,
+
+ 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'author_id=' . $user->data['user_id'] . '&amp;sr=posts') : '',
+ ));
+
+ break;
+
+ case 'subscribed':
+
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+
+ $user->add_lang('viewforum');
+
+ add_form_key('ucp_front_subscribed');
+
+ $unwatch = (isset($_POST['unwatch'])) ? true : false;
+
+ if ($unwatch)
+ {
+ if (check_form_key('ucp_front_subscribed'))
+ {
+ $forums = array_keys(request_var('f', array(0 => 0)));
+ $topics = array_keys(request_var('t', array(0 => 0)));
+ $msg = '';
+
+ if (sizeof($forums) || sizeof($topics))
+ {
+ $l_unwatch = '';
+ if (sizeof($forums))
+ {
+ $sql = 'DELETE FROM ' . FORUMS_WATCH_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forums) . '
+ AND user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+
+ $l_unwatch .= '_FORUMS';
+ }
+
+ if (sizeof($topics))
+ {
+ $sql = 'DELETE FROM ' . TOPICS_WATCH_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $topics) . '
+ AND user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+
+ $l_unwatch .= '_TOPICS';
+ }
+ $msg = $user->lang['UNWATCHED' . $l_unwatch];
+ }
+ else
+ {
+ $msg = $user->lang['NO_WATCHED_SELECTED'];
+ }
+ }
+ else
+ {
+ $msg = $user->lang['FORM_INVALID'];
+ }
+ $message = $msg . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", "i=$id&amp;mode=subscribed") . '">', '</a>');
+ meta_refresh(3, append_sid("{$phpbb_root_path}ucp.$phpEx", "i=$id&amp;mode=subscribed"));
+ trigger_error($message);
+ }
+
+ $forbidden_forums = array();
+
+ if ($config['allow_forum_notify'])
+ {
+ $forbidden_forums = $auth->acl_getf('!f_read', true);
+ $forbidden_forums = array_unique(array_keys($forbidden_forums));
+
+ $sql_array = array(
+ 'SELECT' => 'f.*',
+
+ 'FROM' => array(
+ FORUMS_WATCH_TABLE => 'fw',
+ FORUMS_TABLE => 'f'
+ ),
+
+ 'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . '
+ AND f.forum_id = fw.forum_id
+ AND ' . $db->sql_in_set('f.forum_id', $forbidden_forums, true, true),
+
+ 'ORDER_BY' => 'left_id'
+ );
+
+ if ($config['load_db_lastread'])
+ {
+ $sql_array['LEFT_JOIN'] = array(
+ array(
+ 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
+ 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id'
+ )
+ );
+
+ $sql_array['SELECT'] .= ', ft.mark_time ';
+ }
+ else
+ {
+ $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
+ }
+
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_id = $row['forum_id'];
+
+ if ($config['load_db_lastread'])
+ {
+ $forum_check = (!empty($row['mark_time'])) ? $row['mark_time'] : $user->data['user_lastmark'];
+ }
+ else
+ {
+ $forum_check = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate']) : $user->data['user_lastmark'];
+ }
+
+ $unread_forum = ($row['forum_last_post_time'] > $forum_check) ? true : false;
+
+ // Which folder should we display?
+ if ($row['forum_status'] == ITEM_LOCKED)
+ {
+ $folder_image = ($unread_forum) ? 'forum_unread_locked' : 'forum_read_locked';
+ $folder_alt = 'FORUM_LOCKED';
+ }
+ else
+ {
+ $folder_image = ($unread_forum) ? 'forum_unread' : 'forum_read';
+ $folder_alt = ($unread_forum) ? 'NEW_POSTS' : 'NO_NEW_POSTS';
+ }
+
+ // Create last post link information, if appropriate
+ if ($row['forum_last_post_id'])
+ {
+ $last_post_time = $user->format_date($row['forum_last_post_time']);
+ $last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;p=" . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
+ }
+ else
+ {
+ $last_post_time = $last_post_url = '';
+ }
+
+ $template->assign_block_vars('forumrow', array(
+ 'FORUM_ID' => $forum_id,
+ 'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
+ 'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'),
+ 'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
+ 'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
+ 'FORUM_NAME' => $row['forum_name'],
+ 'FORUM_DESC' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']),
+ 'LAST_POST_SUBJECT' => $row['forum_last_post_subject'],
+ 'LAST_POST_TIME' => $last_post_time,
+
+ 'LAST_POST_AUTHOR' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+
+ 'U_LAST_POST' => $last_post_url,
+ 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']))
+ );
+ }
+ $db->sql_freeresult($result);
+ }
+
+ // Subscribed Topics
+ if ($config['allow_topic_notify'])
+ {
+ if (empty($forbidden_forums))
+ {
+ $forbidden_forums = $auth->acl_getf('!f_read', true);
+ $forbidden_forums = array_unique(array_keys($forbidden_forums));
+ }
+ $this->assign_topiclist('subscribed', $forbidden_forums);
+ }
+
+ $template->assign_vars(array(
+ 'S_TOPIC_NOTIFY' => $config['allow_topic_notify'],
+ 'S_FORUM_NOTIFY' => $config['allow_forum_notify'],
+ ));
+
+ break;
+
+ case 'bookmarks':
+
+ if (!$config['allow_bookmarks'])
+ {
+ $template->assign_vars(array(
+ 'S_NO_DISPLAY_BOOKMARKS' => true)
+ );
+ break;
+ }
+
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+
+ $user->add_lang('viewforum');
+
+ if (isset($_POST['unbookmark']))
+ {
+ $s_hidden_fields = array('unbookmark' => 1);
+ $topics = (isset($_POST['t'])) ? array_keys(request_var('t', array(0 => 0))) : array();
+ $url = $this->u_action;
+
+ if (!sizeof($topics))
+ {
+ trigger_error('NO_BOOKMARKS_SELECTED');
+ }
+
+ foreach ($topics as $topic_id)
+ {
+ $s_hidden_fields['t'][$topic_id] = 1;
+ }
+
+ if (confirm_box(true))
+ {
+ $sql = 'DELETE FROM ' . BOOKMARKS_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'] . '
+ AND ' . $db->sql_in_set('topic_id', $topics);
+ $db->sql_query($sql);
+
+ meta_refresh(3, $url);
+ $message = $user->lang['BOOKMARKS_REMOVED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $url . '">', '</a>');
+ trigger_error($message);
+ }
+ else
+ {
+ confirm_box(false, 'REMOVE_SELECTED_BOOKMARKS', build_hidden_fields($s_hidden_fields));
+ }
+ }
+ $forbidden_forums = $auth->acl_getf('!f_read', true);
+ $forbidden_forums = array_unique(array_keys($forbidden_forums));
+
+ $this->assign_topiclist('bookmarks', $forbidden_forums);
+
+ break;
+
+ case 'drafts':
+
+ $pm_drafts = ($this->p_master->p_name == 'pm') ? true : false;
+ $template->assign_var('S_SHOW_DRAFTS', true);
+
+ $user->add_lang('posting');
+
+ $edit = (isset($_REQUEST['edit'])) ? true : false;
+ $submit = (isset($_POST['submit'])) ? true : false;
+ $draft_id = ($edit) ? intval($_REQUEST['edit']) : 0;
+ $delete = (isset($_POST['delete'])) ? true : false;
+
+ $s_hidden_fields = ($edit) ? '<input type="hidden" name="edit" value="' . $draft_id . '" />' : '';
+ $draft_subject = $draft_message = '';
+ add_form_key('ucp_draft');
+
+ if ($delete)
+ {
+ if (check_form_key('ucp_draft'))
+ {
+ $drafts = array_keys(request_var('d', array(0 => 0)));
+
+ if (sizeof($drafts))
+ {
+ $sql = 'DELETE FROM ' . DRAFTS_TABLE . '
+ WHERE ' . $db->sql_in_set('draft_id', $drafts) . '
+ AND user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+ }
+ $msg = $user->lang['DRAFTS_DELETED'];
+ unset($drafts);
+ }
+ else
+ {
+ $msg = $user->lang['FORM_INVALID'];
+ }
+ $message = $msg . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
+ meta_refresh(3, $this->u_action);
+ trigger_error($message);
+ }
+
+ if ($submit && $edit)
+ {
+ $draft_subject = utf8_normalize_nfc(request_var('subject', '', true));
+ $draft_message = utf8_normalize_nfc(request_var('message', '', true));
+ if (check_form_key('ucp_draft'))
+ {
+ if ($draft_message && $draft_subject)
+ {
+ $draft_row = array(
+ 'draft_subject' => $draft_subject,
+ 'draft_message' => $draft_message
+ );
+
+ $sql = 'UPDATE ' . DRAFTS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $draft_row) . "
+ WHERE draft_id = $draft_id
+ AND user_id = " . $user->data['user_id'];
+ $db->sql_query($sql);
+
+ $message = $user->lang['DRAFT_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
+
+ meta_refresh(3, $this->u_action);
+ trigger_error($message);
+ }
+ else
+ {
+ $template->assign_var('ERROR', ($draft_message == '') ? $user->lang['EMPTY_DRAFT'] : (($draft_subject == '') ? $user->lang['EMPTY_DRAFT_TITLE'] : ''));
+ }
+ }
+ else
+ {
+ $template->assign_var('ERROR', $user->lang['FORM_INVALID']);
+ }
+ }
+
+ if (!$pm_drafts)
+ {
+ $sql = 'SELECT d.*, f.forum_name
+ FROM ' . DRAFTS_TABLE . ' d, ' . FORUMS_TABLE . ' f
+ WHERE d.user_id = ' . $user->data['user_id'] . ' ' .
+ (($edit) ? "AND d.draft_id = $draft_id" : '') . '
+ AND f.forum_id = d.forum_id
+ ORDER BY d.save_time DESC';
+ }
+ else
+ {
+ $sql = 'SELECT * FROM ' . DRAFTS_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'] . ' ' .
+ (($edit) ? "AND draft_id = $draft_id" : '') . '
+ AND forum_id = 0
+ AND topic_id = 0
+ ORDER BY save_time DESC';
+ }
+ $result = $db->sql_query($sql);
+
+ $draftrows = $topic_ids = array();
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['topic_id'])
+ {
+ $topic_ids[] = (int) $row['topic_id'];
+ }
+ $draftrows[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($topic_ids))
+ {
+ $sql = 'SELECT topic_id, forum_id, topic_title
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', array_unique($topic_ids));
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_rows[$row['topic_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+ unset($topic_ids);
+
+ $template->assign_var('S_EDIT_DRAFT', $edit);
+
+ $row_count = 0;
+ foreach ($draftrows as $draft)
+ {
+ $link_topic = $link_forum = $link_pm = false;
+ $insert_url = $view_url = $title = '';
+
+ if (isset($topic_rows[$draft['topic_id']]) && $auth->acl_get('f_read', $topic_rows[$draft['topic_id']]['forum_id']))
+ {
+ $link_topic = true;
+ $view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_rows[$draft['topic_id']]['forum_id'] . '&amp;t=' . $draft['topic_id']);
+ $title = $topic_rows[$draft['topic_id']]['topic_title'];
+
+ $insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'f=' . $topic_rows[$draft['topic_id']]['forum_id'] . '&amp;t=' . $draft['topic_id'] . '&amp;mode=reply&amp;d=' . $draft['draft_id']);
+ }
+ else if ($auth->acl_get('f_read', $draft['forum_id']))
+ {
+ $link_forum = true;
+ $view_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $draft['forum_id']);
+ $title = $draft['forum_name'];
+
+ $insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'f=' . $draft['forum_id'] . '&amp;mode=post&amp;d=' . $draft['draft_id']);
+ }
+ else if ($pm_drafts)
+ {
+ $link_pm = true;
+ $insert_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=$id&amp;mode=compose&amp;d=" . $draft['draft_id']);
+ }
+
+ $template_row = array(
+ 'DATE' => $user->format_date($draft['save_time']),
+ 'DRAFT_MESSAGE' => ($submit) ? $draft_message : $draft['draft_message'],
+ 'DRAFT_SUBJECT' => ($submit) ? $draft_subject : $draft['draft_subject'],
+ 'TITLE' => $title,
+
+ 'DRAFT_ID' => $draft['draft_id'],
+ 'FORUM_ID' => $draft['forum_id'],
+ 'TOPIC_ID' => $draft['topic_id'],
+
+ 'U_VIEW' => $view_url,
+ 'U_VIEW_EDIT' => $this->u_action . '&amp;edit=' . $draft['draft_id'],
+ 'U_INSERT' => $insert_url,
+
+ 'S_LINK_TOPIC' => $link_topic,
+ 'S_LINK_FORUM' => $link_forum,
+ 'S_LINK_PM' => $link_pm,
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields
+ );
+ $row_count++;
+
+ ($edit) ? $template->assign_vars($template_row) : $template->assign_block_vars('draftrow', $template_row);
+ }
+
+ if (!$edit)
+ {
+ $template->assign_var('S_DRAFT_ROWS', $row_count);
+ }
+
+ break;
+ }
+
+
+ $template->assign_vars(array(
+ 'L_TITLE' => $user->lang['UCP_MAIN_' . strtoupper($mode)],
+
+ 'S_DISPLAY_MARK_ALL' => ($mode == 'watched' || ($mode == 'drafts' && !isset($_GET['edit']))) ? true : false,
+ 'S_HIDDEN_FIELDS' => (isset($s_hidden_fields)) ? $s_hidden_fields : '',
+ 'S_UCP_ACTION' => $this->u_action,
+
+ 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
+ 'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
+ ));
+
+ // Set desired template
+ $this->tpl_name = 'ucp_main_' . $mode;
+ $this->page_title = 'UCP_MAIN_' . strtoupper($mode);
+ }
+
+ /**
+ * Build and assign topiclist for bookmarks/subscribed topics
+ */
+ function assign_topiclist($mode = 'subscribed', $forbidden_forum_ary = array())
+ {
+ global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx;
+
+ $table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE;
+ $start = request_var('start', 0);
+
+ // Grab icons
+ $icons = $cache->obtain_icons();
+
+ $sql_array = array(
+ 'SELECT' => 'COUNT(t.topic_id) as topics_count',
+
+ 'FROM' => array(
+ $table => 'i',
+ TOPICS_TABLE => 't'
+ ),
+
+ 'WHERE' => 'i.topic_id = t.topic_id
+ AND i.user_id = ' . $user->data['user_id'] . '
+ AND ' . $db->sql_in_set('t.forum_id', $forbidden_forum_ary, true, true),
+ );
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $result = $db->sql_query($sql);
+ $topics_count = (int) $db->sql_fetchfield('topics_count');
+ $db->sql_freeresult($result);
+
+ if ($topics_count)
+ {
+ $template->assign_vars(array(
+ 'PAGINATION' => generate_pagination($this->u_action, $topics_count, $config['topics_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start),
+ 'TOTAL_TOPICS' => ($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count))
+ );
+ }
+
+ if ($mode == 'subscribed')
+ {
+ $sql_array = array(
+ 'SELECT' => 't.*, f.forum_name',
+
+ 'FROM' => array(
+ TOPICS_WATCH_TABLE => 'tw',
+ TOPICS_TABLE => 't'
+ ),
+
+ 'WHERE' => 'tw.user_id = ' . $user->data['user_id'] . '
+ AND t.topic_id = tw.topic_id
+ AND ' . $db->sql_in_set('t.forum_id', $forbidden_forum_ary, true, true),
+
+
+ 'ORDER_BY' => 't.topic_last_post_time DESC'
+ );
+
+ $sql_array['LEFT_JOIN'] = array();
+ }
+ else
+ {
+ $sql_array = array(
+ 'SELECT' => 't.*, f.forum_name, b.topic_id as b_topic_id',
+
+ 'FROM' => array(
+ BOOKMARKS_TABLE => 'b',
+ ),
+
+ 'WHERE' => 'b.user_id = ' . $user->data['user_id'] . '
+ AND ' . $db->sql_in_set('f.forum_id', $forbidden_forum_ary, true, true),
+
+ 'ORDER_BY' => 't.topic_last_post_time DESC'
+ );
+
+ $sql_array['LEFT_JOIN'] = array();
+ $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_TABLE => 't'), 'ON' => 'b.topic_id = t.topic_id');
+ }
+
+ $sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TABLE => 'f'), 'ON' => 't.forum_id = f.forum_id');
+
+ if ($config['load_db_lastread'])
+ {
+ $sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TRACK_TABLE => 'ft'), 'ON' => 'ft.forum_id = t.forum_id AND ft.user_id = ' . $user->data['user_id']);
+ $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_TRACK_TABLE => 'tt'), 'ON' => 'tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id']);
+ $sql_array['SELECT'] .= ', tt.mark_time, ft.mark_time AS forum_mark_time';
+ }
+
+ if ($config['load_db_track'])
+ {
+ $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_POSTED_TABLE => 'tp'), 'ON' => 'tp.topic_id = t.topic_id AND tp.user_id = ' . $user->data['user_id']);
+ $sql_array['SELECT'] .= ', tp.topic_posted';
+ }
+
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
+
+ $topic_list = $topic_forum_list = $global_announce_list = $rowset = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_id = (isset($row['b_topic_id'])) ? $row['b_topic_id'] : $row['topic_id'];
+
+ $topic_list[] = $topic_id;
+ $rowset[$topic_id] = $row;
+
+ $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread']) ? $row['forum_mark_time'] : 0;
+ $topic_forum_list[$row['forum_id']]['topics'][] = $topic_id;
+
+ if ($row['topic_type'] == POST_GLOBAL)
+ {
+ $global_announce_list[] = $topic_id;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $topic_tracking_info = array();
+ if ($config['load_db_lastread'])
+ {
+ foreach ($topic_forum_list as $f_id => $topic_row)
+ {
+ $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']), ($f_id == 0) ? $global_announce_list : false);
+ }
+ }
+ else
+ {
+ foreach ($topic_forum_list as $f_id => $topic_row)
+ {
+ $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics'], $global_announce_list);
+ }
+ }
+
+ foreach ($topic_list as $topic_id)
+ {
+ $row = &$rowset[$topic_id];
+
+ $forum_id = $row['forum_id'];
+ $topic_id = (isset($row['b_topic_id'])) ? $row['b_topic_id'] : $row['topic_id'];
+
+ $unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
+
+ // Replies
+ $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
+
+ if ($row['topic_status'] == ITEM_MOVED && !empty($row['topic_moved_id']))
+ {
+ $topic_id = $row['topic_moved_id'];
+ }
+
+ // Get folder img, topic status/type related information
+ $folder_img = $folder_alt = $topic_type = '';
+ topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type);
+
+ $view_topic_url_params = "f=$forum_id&amp;t=$topic_id";
+ $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);
+
+ // Send vars to template
+ $template->assign_block_vars('topicrow', array(
+ 'FORUM_ID' => $forum_id,
+ 'TOPIC_ID' => $topic_id,
+ 'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
+ 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
+ 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
+ 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
+
+ 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+
+ 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+
+ 'S_DELETED_TOPIC' => (!$row['topic_id']) ? true : false,
+ 'S_GLOBAL_TOPIC' => (!$forum_id) ? true : false,
+
+ 'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&amp;t=$topic_id")),
+ 'REPLIES' => $replies,
+ 'VIEWS' => $row['topic_views'],
+ 'TOPIC_TITLE' => censor_text($row['topic_title']),
+ 'TOPIC_TYPE' => $topic_type,
+ 'FORUM_NAME' => $row['forum_name'],
+
+ 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
+ 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
+ 'TOPIC_FOLDER_IMG_ALT' => $user->lang[$folder_alt],
+ 'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
+ 'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
+ 'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
+
+ 'S_TOPIC_TYPE' => $row['topic_type'],
+ 'S_USER_POSTED' => (!empty($row['topic_posted'])) ? true : false,
+ 'S_UNREAD_TOPIC' => $unread_topic,
+
+ 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&amp;view=unread') . '#unread',
+ 'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&amp;p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
+ 'U_VIEW_TOPIC' => $view_topic_url,
+ 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
+ ));
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php
new file mode 100644
index 0000000000..e1c51170db
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_pm.php
@@ -0,0 +1,416 @@
+<?php
+/**
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Private Message Class
+*
+* $_REQUEST['folder'] display folder with the id used
+* $_REQUEST['folder'] inbox|outbox|sentbox display folder with the associated name
+*
+* Display Messages (default to inbox) - mode=view
+* Display single message - mode=view&p=[msg_id] or &p=[msg_id] (short linkage)
+*
+* if the folder id with (&f=[folder_id]) is used when displaying messages, one query will be saved. If it is not used, phpBB needs to grab
+* the folder id first in order to display the input boxes and folder names and such things. ;) phpBB always checks this against the database to make
+* sure the user is able to view the message.
+*
+* Composing Messages (mode=compose):
+* To specific user (u=[user_id])
+* To specific group (g=[group_id])
+* Quoting a post (action=quotepost&p=[post_id])
+* Quoting a PM (action=quote&p=[msg_id])
+* Forwarding a PM (action=forward&p=[msg_id])
+*
+* @package ucp
+*/
+class ucp_pm
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $user, $template, $phpbb_root_path, $auth, $phpEx, $db, $config;
+
+ if (!$user->data['is_registered'])
+ {
+ trigger_error('NO_MESSAGE');
+ }
+
+ // Is PM disabled?
+ if (!$config['allow_privmsg'])
+ {
+ trigger_error('PM_DISABLED');
+ }
+
+ $user->add_lang('posting');
+ $template->assign_var('S_PRIVMSGS', true);
+
+ // Folder directly specified?
+ $folder_specified = request_var('folder', '');
+
+ if (!in_array($folder_specified, array('inbox', 'outbox', 'sentbox')))
+ {
+ $folder_specified = (int) $folder_specified;
+ }
+ else
+ {
+ $folder_specified = ($folder_specified == 'inbox') ? PRIVMSGS_INBOX : (($folder_specified == 'outbox') ? PRIVMSGS_OUTBOX : PRIVMSGS_SENTBOX);
+ }
+
+ if (!$folder_specified)
+ {
+ $mode = (!$mode) ? request_var('mode', 'view') : $mode;
+ }
+ else
+ {
+ $mode = 'view';
+ }
+
+ include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
+
+ switch ($mode)
+ {
+ // New private messages popup
+ case 'popup':
+
+ $l_new_message = '';
+ if ($user->data['is_registered'])
+ {
+ if ($user->data['user_new_privmsg'])
+ {
+ $l_new_message = ($user->data['user_new_privmsg'] == 1) ? $user->lang['YOU_NEW_PM'] : $user->lang['YOU_NEW_PMS'];
+ }
+ else
+ {
+ $l_new_message = $user->lang['YOU_NO_NEW_PM'];
+ }
+ }
+
+ $template->assign_vars(array(
+ 'MESSAGE' => $l_new_message,
+ 'S_NOT_LOGGED_IN' => ($user->data['user_id'] == ANONYMOUS) ? true : false,
+ 'CLICK_TO_VIEW' => sprintf($user->lang['CLICK_VIEW_PRIVMSG'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=inbox') . '" onclick="jump_to_inbox(this.href); return false;">', '</a>'),
+ 'U_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=inbox'),
+ 'UA_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox', false))
+ );
+
+ $tpl_file = 'ucp_pm_popup';
+ break;
+
+ // Compose message
+ case 'compose':
+ $action = request_var('action', 'post');
+
+ get_folder($user->data['user_id']);
+
+ if (!$auth->acl_get('u_sendpm'))
+ {
+ // trigger_error('NO_AUTH_SEND_MESSAGE');
+ $template->assign_vars(array(
+ 'S_NO_AUTH_SEND_MESSAGE' => true,
+ 'S_COMPOSE_PM_VIEW' => true,
+ ));
+
+ $tpl_file = 'ucp_pm_viewfolder';
+ break;
+ }
+
+ include($phpbb_root_path . 'includes/ucp/ucp_pm_compose.' . $phpEx);
+ compose_pm($id, $mode, $action);
+
+ $tpl_file = 'posting_body';
+ break;
+
+ case 'options':
+ set_user_message_limit();
+ get_folder($user->data['user_id']);
+
+ include($phpbb_root_path . 'includes/ucp/ucp_pm_options.' . $phpEx);
+ message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions);
+
+ $tpl_file = 'ucp_pm_options';
+ break;
+
+ case 'drafts':
+
+ get_folder($user->data['user_id']);
+ $this->p_name = 'pm';
+
+ // Call another module... please do not try this at home... Hoochie Coochie Man
+ include($phpbb_root_path . 'includes/ucp/ucp_main.' . $phpEx);
+
+ $module = new ucp_main($this);
+ $module->u_action = $this->u_action;
+ $module->main($id, $mode);
+
+ $this->tpl_name = $module->tpl_name;
+ $this->page_title = 'UCP_PM_DRAFTS';
+
+ unset($module);
+ return;
+
+ break;
+
+ case 'view':
+
+ set_user_message_limit();
+
+ if ($folder_specified)
+ {
+ $folder_id = $folder_specified;
+ $action = 'view_folder';
+ }
+ else
+ {
+ $folder_id = request_var('f', PRIVMSGS_NO_BOX);
+ $action = request_var('action', 'view_folder');
+ }
+
+ $msg_id = request_var('p', 0);
+ $view = request_var('view', '');
+
+ // View message if specified
+ if ($msg_id)
+ {
+ $action = 'view_message';
+ }
+
+ if (!$auth->acl_get('u_readpm'))
+ {
+ trigger_error('NO_AUTH_READ_MESSAGE');
+ }
+
+ // Do not allow hold messages to be seen
+ if ($folder_id == PRIVMSGS_HOLD_BOX)
+ {
+ trigger_error('NO_AUTH_READ_HOLD_MESSAGE');
+ }
+
+
+ // First Handle Mark actions and moving messages
+ $submit_mark = (isset($_POST['submit_mark'])) ? true : false;
+ $move_pm = (isset($_POST['move_pm'])) ? true : false;
+ $mark_option = request_var('mark_option', '');
+ $dest_folder = request_var('dest_folder', PRIVMSGS_NO_BOX);
+
+ // Is moving PM triggered through mark options?
+ if (!in_array($mark_option, array('mark_important', 'delete_marked')) && $submit_mark)
+ {
+ $move_pm = true;
+ $dest_folder = (int) $mark_option;
+ $submit_mark = false;
+ }
+
+ // Move PM
+ if ($move_pm)
+ {
+ $move_msg_ids = (isset($_POST['marked_msg_id'])) ? request_var('marked_msg_id', array(0)) : array();
+ $cur_folder_id = request_var('cur_folder_id', PRIVMSGS_NO_BOX);
+
+ if (move_pm($user->data['user_id'], $user->data['message_limit'], $move_msg_ids, $dest_folder, $cur_folder_id))
+ {
+ // Return to folder view if single message moved
+ if ($action == 'view_message')
+ {
+ $msg_id = 0;
+ $folder_id = request_var('cur_folder_id', PRIVMSGS_NO_BOX);
+ $action = 'view_folder';
+ }
+ }
+ }
+
+ // Message Mark Options
+ if ($submit_mark)
+ {
+ handle_mark_actions($user->data['user_id'], $mark_option);
+ }
+
+ // If new messages arrived, place them into the appropriate folder
+ $num_not_moved = $num_removed = 0;
+ $release = request_var('release', 0);
+
+ if ($user->data['user_new_privmsg'] && $action == 'view_folder')
+ {
+ $return = place_pm_into_folder($global_privmsgs_rules, $release);
+ $num_not_moved = $return['not_moved'];
+ $num_removed = $return['removed'];
+ }
+
+ if (!$msg_id && $folder_id == PRIVMSGS_NO_BOX)
+ {
+ $folder_id = PRIVMSGS_INBOX;
+ }
+ else if ($msg_id && $folder_id == PRIVMSGS_NO_BOX)
+ {
+ $sql = 'SELECT folder_id
+ FROM ' . PRIVMSGS_TO_TABLE . "
+ WHERE msg_id = $msg_id
+ AND folder_id <> " . PRIVMSGS_NO_BOX . '
+ AND user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error('NO_MESSAGE');
+ }
+ $folder_id = (int) $row['folder_id'];
+ }
+
+ $message_row = array();
+ if ($action == 'view_message' && $msg_id)
+ {
+ // Get Message user want to see
+ if ($view == 'next' || $view == 'previous')
+ {
+ $sql_condition = ($view == 'next') ? '>' : '<';
+ $sql_ordering = ($view == 'next') ? 'ASC' : 'DESC';
+
+ $sql = 'SELECT t.msg_id
+ FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . PRIVMSGS_TABLE . " p2
+ WHERE p2.msg_id = $msg_id
+ AND t.folder_id = $folder_id
+ AND t.user_id = " . $user->data['user_id'] . "
+ AND t.msg_id = p.msg_id
+ AND p.message_time $sql_condition p2.message_time
+ ORDER BY p.message_time $sql_ordering";
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ $message = ($view == 'next') ? 'NO_NEWER_PM' : 'NO_OLDER_PM';
+ trigger_error($message);
+ }
+ else
+ {
+ $msg_id = $row['msg_id'];
+ }
+ }
+
+ $sql = 'SELECT t.*, p.*, u.*
+ FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . ' u
+ WHERE t.user_id = ' . $user->data['user_id'] . "
+ AND p.author_id = u.user_id
+ AND t.folder_id = $folder_id
+ AND t.msg_id = p.msg_id
+ AND p.msg_id = $msg_id";
+ $result = $db->sql_query($sql);
+ $message_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$message_row)
+ {
+ trigger_error('NO_MESSAGE');
+ }
+
+ // Update unread status
+ update_unread_status($message_row['pm_unread'], $message_row['msg_id'], $user->data['user_id'], $folder_id);
+ }
+
+ $folder = get_folder($user->data['user_id'], $folder_id);
+
+ $s_folder_options = $s_to_folder_options = '';
+ foreach ($folder as $f_id => $folder_ary)
+ {
+ $option = '<option' . ((!in_array($f_id, array(PRIVMSGS_INBOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX))) ? ' class="sep"' : '') . ' value="' . $f_id . '"' . (($f_id == $folder_id) ? ' selected="selected"' : '') . '>' . $folder_ary['folder_name'] . (($folder_ary['unread_messages']) ? ' [' . $folder_ary['unread_messages'] . '] ' : '') . '</option>';
+
+ $s_to_folder_options .= ($f_id != PRIVMSGS_OUTBOX && $f_id != PRIVMSGS_SENTBOX) ? $option : '';
+ $s_folder_options .= $option;
+ }
+ clean_sentbox($folder[PRIVMSGS_SENTBOX]['num_messages']);
+
+ // Header for message view - folder and so on
+ $folder_status = get_folder_status($folder_id, $folder);
+
+ $template->assign_vars(array(
+ 'CUR_FOLDER_ID' => $folder_id,
+ 'CUR_FOLDER_NAME' => $folder_status['folder_name'],
+ 'NUM_NOT_MOVED' => $num_not_moved,
+ 'NUM_REMOVED' => $num_removed,
+ 'RELEASE_MESSAGE_INFO' => sprintf($user->lang['RELEASE_MESSAGES'], '<a href="' . $this->u_action . '&amp;folder=' . $folder_id . '&amp;release=1">', '</a>'),
+ 'NOT_MOVED_MESSAGES' => ($num_not_moved == 1) ? $user->lang['NOT_MOVED_MESSAGE'] : sprintf($user->lang['NOT_MOVED_MESSAGES'], $num_not_moved),
+ 'RULE_REMOVED_MESSAGES' => ($num_removed == 1) ? $user->lang['RULE_REMOVED_MESSAGE'] : sprintf($user->lang['RULE_REMOVED_MESSAGES'], $num_removed),
+
+ 'S_FOLDER_OPTIONS' => $s_folder_options,
+ 'S_TO_FOLDER_OPTIONS' => $s_to_folder_options,
+ 'S_FOLDER_ACTION' => $this->u_action . '&amp;action=view_folder',
+ 'S_PM_ACTION' => $this->u_action . '&amp;action=' . $action,
+
+ 'U_INBOX' => $this->u_action . '&amp;folder=inbox',
+ 'U_OUTBOX' => $this->u_action . '&amp;folder=outbox',
+ 'U_SENTBOX' => $this->u_action . '&amp;folder=sentbox',
+ 'U_CREATE_FOLDER' => $this->u_action . '&amp;mode=options',
+ 'U_CURRENT_FOLDER' => $this->u_action . '&amp;folder=' . $folder_id,
+
+ 'S_IN_INBOX' => ($folder_id == PRIVMSGS_INBOX) ? true : false,
+ 'S_IN_OUTBOX' => ($folder_id == PRIVMSGS_OUTBOX) ? true : false,
+ 'S_IN_SENTBOX' => ($folder_id == PRIVMSGS_SENTBOX) ? true : false,
+
+ 'FOLDER_STATUS' => $folder_status['message'],
+ 'FOLDER_MAX_MESSAGES' => $folder_status['max'],
+ 'FOLDER_CUR_MESSAGES' => $folder_status['cur'],
+ 'FOLDER_REMAINING_MESSAGES' => $folder_status['remaining'],
+ 'FOLDER_PERCENT' => $folder_status['percent'])
+ );
+
+ if ($action == 'view_folder')
+ {
+ include($phpbb_root_path . 'includes/ucp/ucp_pm_viewfolder.' . $phpEx);
+ view_folder($id, $mode, $folder_id, $folder);
+
+ $tpl_file = 'ucp_pm_viewfolder';
+ }
+ else if ($action == 'view_message')
+ {
+ $template->assign_vars(array(
+ 'S_VIEW_MESSAGE' => true,
+ 'MSG_ID' => $msg_id)
+ );
+
+ if (!$msg_id)
+ {
+ trigger_error('NO_MESSAGE');
+ }
+
+ include($phpbb_root_path . 'includes/ucp/ucp_pm_viewmessage.' . $phpEx);
+ view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row);
+
+ $tpl_file = ($view == 'print') ? 'ucp_pm_viewmessage_print' : 'ucp_pm_viewmessage';
+ }
+
+ break;
+
+ default:
+ trigger_error('NO_ACTION_MODE', E_USER_ERROR);
+ break;
+ }
+
+ $template->assign_vars(array(
+ 'L_TITLE' => $user->lang['UCP_PM_' . strtoupper($mode)],
+ 'S_UCP_ACTION' => $this->u_action . ((isset($action)) ? "&amp;action=$action" : ''))
+ );
+
+ // Set desired template
+ $this->tpl_name = $tpl_file;
+ $this->page_title = 'UCP_PM_' . strtoupper($mode);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
new file mode 100644
index 0000000000..2f56bcdf7a
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -0,0 +1,1290 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Compose private message
+* Called from ucp_pm with mode == 'compose'
+*/
+function compose_pm($id, $mode, $action)
+{
+ global $template, $db, $auth, $user;
+ global $phpbb_root_path, $phpEx, $config;
+
+ // Damn php and globals - i know, this is horrible
+ // Needed for handle_message_list_actions()
+ global $refresh, $submit, $preview;
+
+ include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
+
+ if (!$action)
+ {
+ $action = 'post';
+ }
+ add_form_key('ucp_pm_compose');
+
+ // Grab only parameters needed here
+ $to_user_id = request_var('u', 0);
+ $to_group_id = request_var('g', 0);
+ $msg_id = request_var('p', 0);
+ $draft_id = request_var('d', 0);
+ $lastclick = request_var('lastclick', 0);
+
+ // Reply to all triggered (quote/reply)
+ $reply_to_all = request_var('reply_to_all', 0);
+
+ // Do NOT use request_var or specialchars here
+ $address_list = isset($_REQUEST['address_list']) ? $_REQUEST['address_list'] : array();
+
+ if (!is_array($address_list))
+ {
+ $address_list = array();
+ }
+
+ $submit = (isset($_POST['post'])) ? true : false;
+ $preview = (isset($_POST['preview'])) ? true : false;
+ $save = (isset($_POST['save'])) ? true : false;
+ $load = (isset($_POST['load'])) ? true : false;
+ $cancel = (isset($_POST['cancel']) && !isset($_POST['save'])) ? true : false;
+ $delete = (isset($_POST['delete'])) ? true : false;
+
+ $remove_u = (isset($_REQUEST['remove_u'])) ? true : false;
+ $remove_g = (isset($_REQUEST['remove_g'])) ? true : false;
+ $add_to = (isset($_REQUEST['add_to'])) ? true : false;
+ $add_bcc = (isset($_REQUEST['add_bcc'])) ? true : false;
+
+ $refresh = isset($_POST['add_file']) || isset($_POST['delete_file']) || $save || $load
+ || $remove_u || $remove_g || $add_to || $add_bcc;
+
+ $action = ($delete && !$preview && !$refresh && $submit) ? 'delete' : $action;
+ $select_single = ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? false : true;
+
+ $error = array();
+ $current_time = time();
+
+ // Was cancel pressed? If so then redirect to the appropriate page
+ if ($cancel || ($current_time - $lastclick < 2 && $submit))
+ {
+ if ($msg_id)
+ {
+ redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=view&amp;action=view_message&amp;p=' . $msg_id));
+ }
+ redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm'));
+ }
+
+ // Since viewtopic.php language entries are used in several modes,
+ // we include the language file here
+ $user->add_lang('viewtopic');
+
+ // Output PM_TO box if message composing
+ if ($action != 'edit')
+ {
+ // Add groups to PM box
+ if ($config['allow_mass_pm'] && $auth->acl_get('u_masspm_group'))
+ {
+ $sql = 'SELECT g.group_id, g.group_name, g.group_type
+ FROM ' . GROUPS_TABLE . ' g';
+
+ if (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
+ {
+ $sql .= ' LEFT JOIN ' . USER_GROUP_TABLE . ' ug
+ ON (
+ g.group_id = ug.group_id
+ AND ug.user_id = ' . $user->data['user_id'] . '
+ AND ug.user_pending = 0
+ )
+ WHERE (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')';
+ }
+
+ $sql .= ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' WHERE ' : ' AND ';
+
+ $sql .= 'g.group_receive_pm = 1
+ ORDER BY g.group_type DESC, g.group_name ASC';
+ $result = $db->sql_query($sql);
+
+ $group_options = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $group_options .= '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '') . ' value="' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
+ }
+ $db->sql_freeresult($result);
+ }
+
+ $template->assign_vars(array(
+ 'S_SHOW_PM_BOX' => true,
+ 'S_ALLOW_MASS_PM' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? true : false,
+ 'S_GROUP_OPTIONS' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm_group')) ? $group_options : '',
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&amp;form=postform&amp;field=username_list&amp;select_single=$select_single"),
+ ));
+ }
+
+ $sql = '';
+
+ // What is all this following SQL for? Well, we need to know
+ // some basic information in all cases before we do anything.
+ switch ($action)
+ {
+ case 'post':
+ if (!$auth->acl_get('u_sendpm'))
+ {
+ trigger_error('NO_AUTH_SEND_MESSAGE');
+ }
+ break;
+
+ case 'reply':
+ case 'quote':
+ case 'forward':
+ case 'quotepost':
+ if (!$msg_id)
+ {
+ trigger_error('NO_MESSAGE');
+ }
+
+ if (!$auth->acl_get('u_sendpm'))
+ {
+ trigger_error('NO_AUTH_SEND_MESSAGE');
+ }
+
+ if ($action == 'quotepost')
+ {
+ $sql = 'SELECT p.post_id as msg_id, p.forum_id, p.post_text as message_text, p.poster_id as author_id, p.post_time as message_time, p.bbcode_bitfield, p.bbcode_uid, p.enable_sig, p.enable_smilies, p.enable_magic_url, t.topic_title as message_subject, u.username as quote_username
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . " u
+ WHERE p.post_id = $msg_id
+ AND t.topic_id = p.topic_id
+ AND u.user_id = p.poster_id";
+ }
+ else
+ {
+ $sql = 'SELECT t.folder_id, p.*, u.username as quote_username
+ FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . ' u
+ WHERE t.user_id = ' . $user->data['user_id'] . "
+ AND p.author_id = u.user_id
+ AND t.msg_id = p.msg_id
+ AND p.msg_id = $msg_id";
+ }
+ break;
+
+ case 'edit':
+ if (!$msg_id)
+ {
+ trigger_error('NO_MESSAGE');
+ }
+
+ // check for outbox (not read) status, we do not allow editing if one user already having the message
+ $sql = 'SELECT p.*, t.folder_id
+ FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p
+ WHERE t.user_id = ' . $user->data['user_id'] . '
+ AND t.folder_id = ' . PRIVMSGS_OUTBOX . "
+ AND t.msg_id = $msg_id
+ AND t.msg_id = p.msg_id";
+ break;
+
+ case 'delete':
+ if (!$auth->acl_get('u_pm_delete'))
+ {
+ trigger_error('NO_AUTH_DELETE_MESSAGE');
+ }
+
+ if (!$msg_id)
+ {
+ trigger_error('NO_MESSAGE');
+ }
+
+ $sql = 'SELECT msg_id, pm_unread, pm_new, author_id, folder_id
+ FROM ' . PRIVMSGS_TO_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'] . "
+ AND msg_id = $msg_id";
+ break;
+
+ case 'smilies':
+ generate_smilies('window', 0);
+ break;
+
+ default:
+ trigger_error('NO_ACTION_MODE', E_USER_ERROR);
+ break;
+ }
+
+ if ($action == 'forward' && (!$config['forward_pm'] || !$auth->acl_get('u_pm_forward')))
+ {
+ trigger_error('NO_AUTH_FORWARD_MESSAGE');
+ }
+
+ if ($action == 'edit' && !$auth->acl_get('u_pm_edit'))
+ {
+ trigger_error('NO_AUTH_EDIT_MESSAGE');
+ }
+
+ if ($sql)
+ {
+ $result = $db->sql_query($sql);
+ $post = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$post)
+ {
+ // If editing it could be the recipient already read the message...
+ if ($action == 'edit')
+ {
+ $sql = 'SELECT p.*, t.folder_id
+ FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p
+ WHERE t.user_id = ' . $user->data['user_id'] . "
+ AND t.msg_id = $msg_id
+ AND t.msg_id = p.msg_id";
+ $result = $db->sql_query($sql);
+ $post = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($post)
+ {
+ trigger_error('NO_EDIT_READ_MESSAGE');
+ }
+ }
+
+ trigger_error('NO_MESSAGE');
+ }
+
+ if ($action == 'quotepost')
+ {
+ if (($post['forum_id'] && !$auth->acl_get('f_read', $post['forum_id'])) || (!$post['forum_id'] && !$auth->acl_getf_global('f_read')))
+ {
+ trigger_error('NOT_AUTHORISED');
+ }
+
+ // Passworded forum?
+ if ($post['forum_id'])
+ {
+ $sql = 'SELECT forum_password
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . (int) $post['forum_id'];
+ $result = $db->sql_query($sql);
+ $forum_password = (string) $db->sql_fetchfield('forum_password');
+ $db->sql_freeresult($result);
+
+ if ($forum_password)
+ {
+ login_forum_box(array(
+ 'forum_id' => $post['forum_id'],
+ 'forum_password' => $forum_password,
+ ));
+ }
+ }
+ }
+
+ $msg_id = (int) $post['msg_id'];
+ $folder_id = (isset($post['folder_id'])) ? $post['folder_id'] : 0;
+ $message_text = (isset($post['message_text'])) ? $post['message_text'] : '';
+
+ if ((!$post['author_id'] || ($post['author_id'] == ANONYMOUS && $action != 'delete')) && $msg_id)
+ {
+ trigger_error('NO_AUTHOR');
+ }
+
+ if ($action == 'quotepost')
+ {
+ // Decode text for message display
+ decode_message($message_text, $post['bbcode_uid']);
+ }
+
+ if ($action != 'delete')
+ {
+ $enable_urls = $post['enable_magic_url'];
+ $enable_sig = (isset($post['enable_sig'])) ? $post['enable_sig'] : 0;
+
+ $message_attachment = (isset($post['message_attachment'])) ? $post['message_attachment'] : 0;
+ $message_subject = $post['message_subject'];
+ $message_time = $post['message_time'];
+ $bbcode_uid = $post['bbcode_uid'];
+
+ $quote_username = (isset($post['quote_username'])) ? $post['quote_username'] : '';
+ $icon_id = (isset($post['icon_id'])) ? $post['icon_id'] : 0;
+
+ if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !sizeof($address_list) && !$refresh && !$submit && !$preview)
+ {
+ // Add the original author as the recipient if quoting a post or only replying and not having checked "reply to all"
+ if ($action == 'quotepost' || !$reply_to_all)
+ {
+ $address_list = array('u' => array($post['author_id'] => 'to'));
+ }
+ else
+ {
+ // We try to include every previously listed member from the TO Header - Reply to all
+ $address_list = rebuild_header(array('to' => $post['to_address']));
+
+ // Add the author (if he is already listed then this is no shame (it will be overwritten))
+ $address_list['u'][$post['author_id']] = 'to';
+
+ // Now, make sure the user itself is not listed. ;)
+ if (isset($address_list['u'][$user->data['user_id']]))
+ {
+ unset($address_list['u'][$user->data['user_id']]);
+ }
+ }
+ }
+ else if ($action == 'edit' && !sizeof($address_list) && !$refresh && !$submit && !$preview)
+ {
+ // Rebuild TO and BCC Header
+ $address_list = rebuild_header(array('to' => $post['to_address'], 'bcc' => $post['bcc_address']));
+ }
+
+ if ($action == 'quotepost')
+ {
+ $check_value = 0;
+ }
+ else
+ {
+ $check_value = (($post['enable_bbcode']+1) << 8) + (($post['enable_smilies']+1) << 4) + (($enable_urls+1) << 2) + (($post['enable_sig']+1) << 1);
+ }
+ }
+ }
+ else
+ {
+ $message_attachment = 0;
+ $message_text = $message_subject = '';
+
+ if ($to_user_id && $action == 'post')
+ {
+ $address_list['u'][$to_user_id] = 'to';
+ }
+ else if ($to_group_id && $action == 'post')
+ {
+ $address_list['g'][$to_group_id] = 'to';
+ }
+ $check_value = 0;
+ }
+
+ if (($to_group_id || isset($address_list['g'])) && (!$config['allow_mass_pm'] || !$auth->acl_get('u_masspm_group')))
+ {
+ trigger_error('NO_AUTH_GROUP_MESSAGE');
+ }
+
+ if ($action == 'edit' && !$refresh && !$preview && !$submit)
+ {
+ if (!($message_time > time() - ($config['pm_edit_time'] * 60) || !$config['pm_edit_time']))
+ {
+ trigger_error('CANNOT_EDIT_MESSAGE_TIME');
+ }
+ }
+
+ if ($action == 'post')
+ {
+ $template->assign_var('S_NEW_MESSAGE', true);
+ }
+
+ if (!isset($icon_id))
+ {
+ $icon_id = 0;
+ }
+
+ $message_parser = new parse_message();
+
+ $message_parser->message = ($action == 'reply') ? '' : $message_text;
+ unset($message_text);
+
+ $s_action = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=$id&amp;mode=$mode&amp;action=$action", true, $user->session_id);
+ $s_action .= ($msg_id) ? "&amp;p=$msg_id" : '';
+
+ // Delete triggered ?
+ if ($action == 'delete')
+ {
+ // Folder id has been determined by the SQL Statement
+ // $folder_id = request_var('f', PRIVMSGS_NO_BOX);
+
+ // Do we need to confirm ?
+ if (confirm_box(true))
+ {
+ delete_pm($user->data['user_id'], $msg_id, $folder_id);
+
+ // jump to next message in "history"? nope, not for the moment. But able to be included later.
+ $meta_info = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&amp;folder=$folder_id");
+ $message = $user->lang['MESSAGE_DELETED'];
+
+ meta_refresh(3, $meta_info);
+ $message .= '<br /><br />' . sprintf($user->lang['RETURN_FOLDER'], '<a href="' . $meta_info . '">', '</a>');
+ trigger_error($message);
+ }
+ else
+ {
+ $s_hidden_fields = array(
+ 'p' => $msg_id,
+ 'f' => $folder_id,
+ 'action' => 'delete'
+ );
+
+ // "{$phpbb_root_path}ucp.$phpEx?i=pm&amp;mode=compose"
+ confirm_box(false, 'DELETE_MESSAGE', build_hidden_fields($s_hidden_fields));
+ }
+
+ redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=view&amp;action=view_message&amp;p=' . $msg_id));
+ }
+
+ // Get maximum number of allowed recipients
+ $sql = 'SELECT MAX(g.group_max_recipients) as max_recipients
+ FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . ' ug
+ WHERE ug.user_id = ' . $user->data['user_id'] . '
+ AND ug.user_pending = 0
+ AND ug.group_id = g.group_id';
+ $result = $db->sql_query($sql);
+ $max_recipients = (int) $db->sql_fetchfield('max_recipients');
+ $db->sql_freeresult($result);
+
+ $max_recipients = (!$max_recipients) ? $config['pm_max_recipients'] : $max_recipients;
+
+ // If this is a quote/reply "to all"... we may increase the max_recpients to the number of original recipients
+ if (($action == 'reply' || $action == 'quote') && $max_recipients && $reply_to_all)
+ {
+ // We try to include every previously listed member from the TO Header
+ $list = rebuild_header(array('to' => $post['to_address']));
+
+ // Can be an empty array too ;)
+ $list = (!empty($list['u'])) ? $list['u'] : array();
+ $list[$post['author_id']] = 'to';
+
+ if (isset($list[$user->data['user_id']]))
+ {
+ unset($list[$user->data['user_id']]);
+ }
+
+ $max_recipients = ($max_recipients < sizeof($list)) ? sizeof($list) : $max_recipients;
+
+ unset($list);
+ }
+
+ // Handle User/Group adding/removing
+ handle_message_list_actions($address_list, $error, $remove_u, $remove_g, $add_to, $add_bcc);
+
+ // Check mass pm to group permission
+ if ((!$config['allow_mass_pm'] || !$auth->acl_get('u_masspm_group')) && !empty($address_list['g']))
+ {
+ $address_list = array();
+ $error[] = $user->lang['NO_AUTH_GROUP_MESSAGE'];
+ }
+
+ // Check mass pm to users permission
+ if ((!$config['allow_mass_pm'] || !$auth->acl_get('u_masspm')) && num_recipients($address_list) > 1)
+ {
+ $address_list = get_recipients($address_list, 1);
+ $error[] = $user->lang('TOO_MANY_RECIPIENTS', 1);
+ }
+
+ // Check for too many recipients
+ if (!empty($address_list['u']) && $max_recipients && sizeof($address_list['u']) > $max_recipients)
+ {
+ $address_list = get_recipients($address_list, $max_recipients);
+ $error[] = $user->lang('TOO_MANY_RECIPIENTS', $max_recipients);
+ }
+
+ // Always check if the submitted attachment data is valid and belongs to the user.
+ // Further down (especially in submit_post()) we do not check this again.
+ $message_parser->get_submitted_attachment_data();
+
+ if ($message_attachment && !$submit && !$refresh && !$preview && $action == 'edit')
+ {
+ // Do not change to SELECT *
+ $sql = 'SELECT attach_id, is_orphan, attach_comment, real_filename
+ FROM ' . ATTACHMENTS_TABLE . "
+ WHERE post_msg_id = $msg_id
+ AND in_message = 1
+ AND is_orphan = 0
+ ORDER BY filetime DESC";
+ $result = $db->sql_query($sql);
+ $message_parser->attachment_data = array_merge($message_parser->attachment_data, $db->sql_fetchrowset($result));
+ $db->sql_freeresult($result);
+ }
+
+ if (!in_array($action, array('quote', 'edit', 'delete', 'forward')))
+ {
+ $enable_sig = ($config['allow_sig'] && $config['allow_sig_pm'] && $auth->acl_get('u_sig') && $user->optionget('attachsig'));
+ $enable_smilies = ($config['allow_smilies'] && $auth->acl_get('u_pm_smilies') && $user->optionget('smilies'));
+ $enable_bbcode = ($config['allow_bbcode'] && $auth->acl_get('u_pm_bbcode') && $user->optionget('bbcode'));
+ $enable_urls = true;
+ }
+
+ $enable_magic_url = $drafts = false;
+
+ // User own some drafts?
+ if ($auth->acl_get('u_savedrafts') && $action != 'delete')
+ {
+ $sql = 'SELECT draft_id
+ FROM ' . DRAFTS_TABLE . '
+ WHERE forum_id = 0
+ AND topic_id = 0
+ AND user_id = ' . $user->data['user_id'] .
+ (($draft_id) ? " AND draft_id <> $draft_id" : '');
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ $drafts = true;
+ }
+ }
+
+ if ($action == 'edit')
+ {
+ $message_parser->bbcode_uid = $bbcode_uid;
+ }
+
+ $bbcode_status = ($config['allow_bbcode'] && $config['auth_bbcode_pm'] && $auth->acl_get('u_pm_bbcode')) ? true : false;
+ $smilies_status = ($config['allow_smilies'] && $config['auth_smilies_pm'] && $auth->acl_get('u_pm_smilies')) ? true : false;
+ $img_status = ($config['auth_img_pm'] && $auth->acl_get('u_pm_img')) ? true : false;
+ $flash_status = ($config['auth_flash_pm'] && $auth->acl_get('u_pm_flash')) ? true : false;
+ $url_status = ($config['allow_post_links']) ? true : false;
+
+ // Save Draft
+ if ($save && $auth->acl_get('u_savedrafts'))
+ {
+ $subject = utf8_normalize_nfc(request_var('subject', '', true));
+ $subject = (!$subject && $action != 'post') ? $user->lang['NEW_MESSAGE'] : $subject;
+ $message = utf8_normalize_nfc(request_var('message', '', true));
+
+ if ($subject && $message)
+ {
+ if (confirm_box(true))
+ {
+ $sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'user_id' => $user->data['user_id'],
+ 'topic_id' => 0,
+ 'forum_id' => 0,
+ 'save_time' => $current_time,
+ 'draft_subject' => $subject,
+ 'draft_message' => $message
+ )
+ );
+ $db->sql_query($sql);
+
+ $redirect_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&amp;mode=$mode");
+
+ meta_refresh(3, $redirect_url);
+ $message = $user->lang['DRAFT_SAVED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $redirect_url . '">', '</a>');
+
+ trigger_error($message);
+ }
+ else
+ {
+ $s_hidden_fields = build_hidden_fields(array(
+ 'mode' => $mode,
+ 'action' => $action,
+ 'save' => true,
+ 'subject' => $subject,
+ 'message' => $message,
+ 'u' => $to_user_id,
+ 'g' => $to_group_id,
+ 'p' => $msg_id)
+ );
+ $s_hidden_fields .= build_address_field($address_list);
+
+
+ confirm_box(false, 'SAVE_DRAFT', $s_hidden_fields);
+ }
+ }
+ else
+ {
+ if (utf8_clean_string($subject) === '')
+ {
+ $error[] = $user->lang['EMPTY_MESSAGE_SUBJECT'];
+ }
+
+ if (utf8_clean_string($message) === '')
+ {
+ $error[] = $user->lang['TOO_FEW_CHARS'];
+ }
+ }
+
+ unset($subject, $message);
+ }
+
+ // Load Draft
+ if ($draft_id && $auth->acl_get('u_savedrafts'))
+ {
+ $sql = 'SELECT draft_subject, draft_message
+ FROM ' . DRAFTS_TABLE . "
+ WHERE draft_id = $draft_id
+ AND topic_id = 0
+ AND forum_id = 0
+ AND user_id = " . $user->data['user_id'];
+ $result = $db->sql_query_limit($sql, 1);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $message_parser->message = $row['draft_message'];
+ $message_subject = $row['draft_subject'];
+
+ $template->assign_var('S_DRAFT_LOADED', true);
+ }
+ else
+ {
+ $draft_id = 0;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ // Load Drafts
+ if ($load && $drafts)
+ {
+ load_drafts(0, 0, $id, $action, $msg_id);
+ }
+
+ if ($submit || $preview || $refresh)
+ {
+ if (($submit || $preview) && !check_form_key('ucp_pm_compose'))
+ {
+ $error[] = $user->lang['FORM_INVALID'];
+ }
+ $subject = utf8_normalize_nfc(request_var('subject', '', true));
+ $message_parser->message = utf8_normalize_nfc(request_var('message', '', true));
+
+ $icon_id = request_var('icon', 0);
+
+ $enable_bbcode = (!$bbcode_status || isset($_POST['disable_bbcode'])) ? false : true;
+ $enable_smilies = (!$smilies_status || isset($_POST['disable_smilies'])) ? false : true;
+ $enable_urls = (isset($_POST['disable_magic_url'])) ? 0 : 1;
+ $enable_sig = (!$config['allow_sig'] ||!$config['allow_sig_pm']) ? false : ((isset($_POST['attach_sig'])) ? true : false);
+
+ if ($submit)
+ {
+ $status_switch = (($enable_bbcode+1) << 8) + (($enable_smilies+1) << 4) + (($enable_urls+1) << 2) + (($enable_sig+1) << 1);
+ $status_switch = ($status_switch != $check_value);
+ }
+ else
+ {
+ $status_switch = 1;
+ }
+
+ // Parse Attachments - before checksum is calculated
+ $message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true);
+
+ if (sizeof($message_parser->warn_msg) && !($remove_u || $remove_g || $add_to || $add_bcc))
+ {
+ $error[] = implode('<br />', $message_parser->warn_msg);
+ $message_parser->warn_msg = array();
+ }
+
+ // Parse message
+ $message_parser->parse($enable_bbcode, ($config['allow_post_links']) ? $enable_urls : false, $enable_smilies, $img_status, $flash_status, true, $config['allow_post_links']);
+
+ // On a refresh we do not care about message parsing errors
+ if (sizeof($message_parser->warn_msg) && !$refresh)
+ {
+ $error[] = implode('<br />', $message_parser->warn_msg);
+ }
+
+ if ($action != 'edit' && !$preview && !$refresh && $config['flood_interval'] && !$auth->acl_get('u_ignoreflood'))
+ {
+ // Flood check
+ $last_post_time = $user->data['user_lastpost_time'];
+
+ if ($last_post_time)
+ {
+ if ($last_post_time && ($current_time - $last_post_time) < intval($config['flood_interval']))
+ {
+ $error[] = $user->lang['FLOOD_ERROR'];
+ }
+ }
+ }
+
+ // Subject defined
+ if ($submit)
+ {
+ if (utf8_clean_string($subject) === '')
+ {
+ $error[] = $user->lang['EMPTY_MESSAGE_SUBJECT'];
+ }
+
+ if (!sizeof($address_list))
+ {
+ $error[] = $user->lang['NO_RECIPIENT'];
+ }
+ }
+
+ // Store message, sync counters
+ if (!sizeof($error) && $submit)
+ {
+ $pm_data = array(
+ 'msg_id' => (int) $msg_id,
+ 'from_user_id' => $user->data['user_id'],
+ 'from_user_ip' => $user->ip,
+ 'from_username' => $user->data['username'],
+ 'reply_from_root_level' => (isset($post['root_level'])) ? (int) $post['root_level'] : 0,
+ 'reply_from_msg_id' => (int) $msg_id,
+ 'icon_id' => (int) $icon_id,
+ 'enable_sig' => (bool) $enable_sig,
+ 'enable_bbcode' => (bool) $enable_bbcode,
+ 'enable_smilies' => (bool) $enable_smilies,
+ 'enable_urls' => (bool) $enable_urls,
+ 'bbcode_bitfield' => $message_parser->bbcode_bitfield,
+ 'bbcode_uid' => $message_parser->bbcode_uid,
+ 'message' => $message_parser->message,
+ 'attachment_data' => $message_parser->attachment_data,
+ 'filename_data' => $message_parser->filename_data,
+ 'address_list' => $address_list
+ );
+
+ // ((!$message_subject) ? $subject : $message_subject)
+ $msg_id = submit_pm($action, $subject, $pm_data);
+
+ $return_message_url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=view&amp;p=' . $msg_id);
+ $return_folder_url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=outbox');
+ meta_refresh(3, $return_message_url);
+
+ $message = $user->lang['MESSAGE_STORED'] . '<br /><br />' . sprintf($user->lang['VIEW_PRIVATE_MESSAGE'], '<a href="' . $return_message_url . '">', '</a>') . '<br /><br />' . sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . $return_folder_url . '">', '</a>', $user->lang['PM_OUTBOX']);
+ trigger_error($message);
+ }
+
+ $message_subject = $subject;
+ }
+
+ // Preview
+ if (!sizeof($error) && $preview)
+ {
+ $preview_message = $message_parser->format_display($enable_bbcode, $enable_urls, $enable_smilies, false);
+
+ $preview_signature = $user->data['user_sig'];
+ $preview_signature_uid = $user->data['user_sig_bbcode_uid'];
+ $preview_signature_bitfield = $user->data['user_sig_bbcode_bitfield'];
+
+ // Signature
+ if ($enable_sig && $config['allow_sig'] && $preview_signature)
+ {
+ $parse_sig = new parse_message($preview_signature);
+ $parse_sig->bbcode_uid = $preview_signature_uid;
+ $parse_sig->bbcode_bitfield = $preview_signature_bitfield;
+
+ $parse_sig->format_display($enable_bbcode, $enable_urls, $enable_smilies);
+ $preview_signature = $parse_sig->message;
+ unset($parse_sig);
+ }
+ else
+ {
+ $preview_signature = '';
+ }
+
+ // Attachment Preview
+ if (sizeof($message_parser->attachment_data))
+ {
+ $template->assign_var('S_HAS_ATTACHMENTS', true);
+
+ $update_count = array();
+ $attachment_data = $message_parser->attachment_data;
+
+ parse_attachments(false, $preview_message, $attachment_data, $update_count, true);
+
+ foreach ($attachment_data as $i => $attachment)
+ {
+ $template->assign_block_vars('attachment', array(
+ 'DISPLAY_ATTACHMENT' => $attachment)
+ );
+ }
+ unset($attachment_data);
+ }
+
+ $preview_subject = censor_text($subject);
+
+ if (!sizeof($error))
+ {
+ $template->assign_vars(array(
+ 'PREVIEW_SUBJECT' => $preview_subject,
+ 'PREVIEW_MESSAGE' => $preview_message,
+ 'PREVIEW_SIGNATURE' => $preview_signature,
+
+ 'S_DISPLAY_PREVIEW' => true)
+ );
+ }
+ unset($message_text);
+ }
+
+ // Decode text for message display
+ $bbcode_uid = (($action == 'quote' || $action == 'forward') && !$preview && !$refresh) ? $bbcode_uid : $message_parser->bbcode_uid;
+
+ $message_parser->decode_message($bbcode_uid);
+
+ if (($action == 'quote' || $action == 'quotepost') && !$preview && !$refresh && !$submit)
+ {
+ if ($action == 'quotepost')
+ {
+ $post_id = request_var('p', 0);
+ if ($config['allow_post_links'])
+ {
+ $message_link = "[url=" . generate_board_url() . "/viewtopic.$phpEx?p={$post_id}#p{$post_id}]{$user->lang['SUBJECT']}: {$message_subject}[/url]\n\n";
+ }
+ else
+ {
+ $message_link = $user->lang['SUBJECT'] . ': ' . $message_subject . " (" . generate_board_url() . "/viewtopic.$phpEx?p={$post_id}#p{$post_id})\n\n";
+ }
+ }
+ else
+ {
+ $message_link = '';
+ }
+ $message_parser->message = $message_link . '[quote=&quot;' . $quote_username . '&quot;]' . censor_text(trim($message_parser->message)) . "[/quote]\n";
+ }
+
+ if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !$preview && !$refresh)
+ {
+ $message_subject = ((!preg_match('/^Re:/', $message_subject)) ? 'Re: ' : '') . censor_text($message_subject);
+ }
+
+ if ($action == 'forward' && !$preview && !$refresh && !$submit)
+ {
+ $fwd_to_field = write_pm_addresses(array('to' => $post['to_address']), 0, true);
+
+ if ($config['allow_post_links'])
+ {
+ $quote_username_text = '[url=' . generate_board_url() . "/memberlist.$phpEx?mode=viewprofile&amp;u={$post['author_id']}]{$quote_username}[/url]";
+ }
+ else
+ {
+ $quote_username_text = $quote_username . ' (' . generate_board_url() . "/memberlist.$phpEx?mode=viewprofile&amp;u={$post['author_id']})";
+ }
+
+ $forward_text = array();
+ $forward_text[] = $user->lang['FWD_ORIGINAL_MESSAGE'];
+ $forward_text[] = sprintf($user->lang['FWD_SUBJECT'], censor_text($message_subject));
+ $forward_text[] = sprintf($user->lang['FWD_DATE'], $user->format_date($message_time, false, true));
+ $forward_text[] = sprintf($user->lang['FWD_FROM'], $quote_username_text);
+ $forward_text[] = sprintf($user->lang['FWD_TO'], implode(', ', $fwd_to_field['to']));
+
+ $message_parser->message = implode("\n", $forward_text) . "\n\n[quote=&quot;{$quote_username}&quot;]\n" . censor_text(trim($message_parser->message)) . "\n[/quote]";
+ $message_subject = ((!preg_match('/^Fwd:/', $message_subject)) ? 'Fwd: ' : '') . censor_text($message_subject);
+ }
+
+ $attachment_data = $message_parser->attachment_data;
+ $filename_data = $message_parser->filename_data;
+ $message_text = $message_parser->message;
+
+ // MAIN PM PAGE BEGINS HERE
+
+ // Generate smiley listing
+ generate_smilies('inline', 0);
+
+ // Generate PM Icons
+ $s_pm_icons = false;
+ if ($config['enable_pm_icons'])
+ {
+ $s_pm_icons = posting_gen_topic_icons($action, $icon_id);
+ }
+
+ // Generate inline attachment select box
+ posting_gen_inline_attachments($attachment_data);
+
+ // Build address list for display
+ // array('u' => array($author_id => 'to'));
+ if (sizeof($address_list))
+ {
+ // Get Usernames and Group Names
+ $result = array();
+ if (!empty($address_list['u']))
+ {
+ $sql = 'SELECT user_id as id, username as name, user_colour as colour
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', array_map('intval', array_keys($address_list['u']))) . '
+ ORDER BY username_clean ASC';
+ $result['u'] = $db->sql_query($sql);
+ }
+
+ if (!empty($address_list['g']))
+ {
+ $sql = 'SELECT g.group_id AS id, g.group_name AS name, g.group_colour AS colour, g.group_type
+ FROM ' . GROUPS_TABLE . ' g';
+
+ if (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
+ {
+ $sql .= ' LEFT JOIN ' . USER_GROUP_TABLE . ' ug
+ ON (
+ g.group_id = ug.group_id
+ AND ug.user_id = ' . $user->data['user_id'] . '
+ AND ug.user_pending = 0
+ )
+ WHERE (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')';
+ }
+
+ $sql .= ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' WHERE ' : ' AND ';
+
+ $sql .= 'g.group_receive_pm = 1
+ AND ' . $db->sql_in_set('g.group_id', array_map('intval', array_keys($address_list['g']))) . '
+ ORDER BY g.group_name ASC';
+
+ $result['g'] = $db->sql_query($sql);
+ }
+
+ $u = $g = array();
+ $_types = array('u', 'g');
+ foreach ($_types as $type)
+ {
+ if (isset($result[$type]) && $result[$type])
+ {
+ while ($row = $db->sql_fetchrow($result[$type]))
+ {
+ if ($type == 'g')
+ {
+ $row['name'] = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['name']] : $row['name'];
+ }
+
+ ${$type}[$row['id']] = array('name' => $row['name'], 'colour' => $row['colour']);
+ }
+ $db->sql_freeresult($result[$type]);
+ }
+ }
+
+ // Now Build the address list
+ $plain_address_field = '';
+ foreach ($address_list as $type => $adr_ary)
+ {
+ foreach ($adr_ary as $id => $field)
+ {
+ if (!isset(${$type}[$id]))
+ {
+ unset($address_list[$type][$id]);
+ continue;
+ }
+
+ $field = ($field == 'to') ? 'to' : 'bcc';
+ $type = ($type == 'u') ? 'u' : 'g';
+ $id = (int) $id;
+
+ $tpl_ary = array(
+ 'IS_GROUP' => ($type == 'g') ? true : false,
+ 'IS_USER' => ($type == 'u') ? true : false,
+ 'UG_ID' => $id,
+ 'NAME' => ${$type}[$id]['name'],
+ 'COLOUR' => (${$type}[$id]['colour']) ? '#' . ${$type}[$id]['colour'] : '',
+ 'TYPE' => $type,
+ );
+
+ if ($type == 'u')
+ {
+ $tpl_ary = array_merge($tpl_ary, array(
+ 'U_VIEW' => get_username_string('profile', $id, ${$type}[$id]['name'], ${$type}[$id]['colour']),
+ 'NAME_FULL' => get_username_string('full', $id, ${$type}[$id]['name'], ${$type}[$id]['colour']),
+ ));
+ }
+ else
+ {
+ $tpl_ary = array_merge($tpl_ary, array(
+ 'U_VIEW' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $id),
+ ));
+ }
+
+ $template->assign_block_vars($field . '_recipient', $tpl_ary);
+ }
+ }
+ }
+
+ // Build hidden address list
+ $s_hidden_address_field = build_address_field($address_list);
+
+
+ $bbcode_checked = (isset($enable_bbcode)) ? !$enable_bbcode : (($config['allow_bbcode'] && $auth->acl_get('u_pm_bbcode')) ? !$user->optionget('bbcode') : 1);
+ $smilies_checked = (isset($enable_smilies)) ? !$enable_smilies : (($config['allow_smilies'] && $auth->acl_get('u_pm_smilies')) ? !$user->optionget('smilies') : 1);
+ $urls_checked = (isset($enable_urls)) ? !$enable_urls : 0;
+ $sig_checked = $enable_sig;
+
+ switch ($action)
+ {
+ case 'post':
+ $page_title = $user->lang['POST_NEW_PM'];
+ break;
+
+ case 'quote':
+ $page_title = $user->lang['POST_QUOTE_PM'];
+ break;
+
+ case 'quotepost':
+ $page_title = $user->lang['POST_PM_POST'];
+ break;
+
+ case 'reply':
+ $page_title = $user->lang['POST_REPLY_PM'];
+ break;
+
+ case 'edit':
+ $page_title = $user->lang['POST_EDIT_PM'];
+ break;
+
+ case 'forward':
+ $page_title = $user->lang['POST_FORWARD_PM'];
+ break;
+
+ default:
+ trigger_error('NO_ACTION_MODE', E_USER_ERROR);
+ break;
+ }
+
+ $s_hidden_fields = '<input type="hidden" name="lastclick" value="' . $current_time . '" />';
+ $s_hidden_fields .= (isset($check_value)) ? '<input type="hidden" name="status_switch" value="' . $check_value . '" />' : '';
+ $s_hidden_fields .= ($draft_id || isset($_REQUEST['draft_loaded'])) ? '<input type="hidden" name="draft_loaded" value="' . ((isset($_REQUEST['draft_loaded'])) ? intval($_REQUEST['draft_loaded']) : $draft_id) . '" />' : '';
+
+ $form_enctype = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !$config['allow_pm_attach'] || !$auth->acl_get('u_pm_attach')) ? '' : ' enctype="multipart/form-data"';
+
+ // Start assigning vars for main posting page ...
+ $template->assign_vars(array(
+ 'L_POST_A' => $page_title,
+ 'L_ICON' => $user->lang['PM_ICON'],
+ 'L_MESSAGE_BODY_EXPLAIN' => (intval($config['max_post_chars'])) ? sprintf($user->lang['MESSAGE_BODY_EXPLAIN'], intval($config['max_post_chars'])) : '',
+
+ 'SUBJECT' => (isset($message_subject)) ? $message_subject : '',
+ 'MESSAGE' => $message_text,
+ 'BBCODE_STATUS' => ($bbcode_status) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>'),
+ 'IMG_STATUS' => ($img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
+ 'FLASH_STATUS' => ($flash_status) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
+ 'SMILIES_STATUS' => ($smilies_status) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
+ 'URL_STATUS' => ($url_status) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
+ 'MAX_FONT_SIZE' => (int) $config['max_post_font_size'],
+ 'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['PM']),
+ 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'MAX_RECIPIENTS' => ($config['allow_mass_pm'] && ($auth->acl_get('u_masspm') || $auth->acl_get('u_masspm_group'))) ? $max_recipients : 0,
+
+ 'S_COMPOSE_PM' => true,
+ 'S_EDIT_POST' => ($action == 'edit'),
+ 'S_SHOW_PM_ICONS' => $s_pm_icons,
+ 'S_BBCODE_ALLOWED' => $bbcode_status,
+ 'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '',
+ 'S_SMILIES_ALLOWED' => $smilies_status,
+ 'S_SMILIES_CHECKED' => ($smilies_checked) ? ' checked="checked"' : '',
+ 'S_SIG_ALLOWED' => ($config['allow_sig'] && $config['allow_sig_pm'] && $auth->acl_get('u_sig')),
+ 'S_SIGNATURE_CHECKED' => ($sig_checked) ? ' checked="checked"' : '',
+ 'S_LINKS_ALLOWED' => $url_status,
+ 'S_MAGIC_URL_CHECKED' => ($urls_checked) ? ' checked="checked"' : '',
+ 'S_SAVE_ALLOWED' => ($auth->acl_get('u_savedrafts') && $action != 'edit') ? true : false,
+ 'S_HAS_DRAFTS' => ($auth->acl_get('u_savedrafts') && $drafts),
+ 'S_FORM_ENCTYPE' => $form_enctype,
+
+ 'S_BBCODE_IMG' => $img_status,
+ 'S_BBCODE_FLASH' => $flash_status,
+ 'S_BBCODE_QUOTE' => true,
+ 'S_BBCODE_URL' => $url_status,
+
+ 'S_POST_ACTION' => $s_action,
+ 'S_HIDDEN_ADDRESS_FIELD' => $s_hidden_address_field,
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields,
+
+ 'S_CLOSE_PROGRESS_WINDOW' => isset($_POST['add_file']),
+ 'U_PROGRESS_BAR' => append_sid("{$phpbb_root_path}posting.$phpEx", 'f=0&amp;mode=popup'),
+ 'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_root_path}posting.$phpEx", 'f=0&amp;mode=popup')),
+ ));
+
+ // Build custom bbcodes array
+ display_custom_bbcodes();
+
+ // Show attachment box for adding attachments if true
+ $allowed = ($auth->acl_get('u_pm_attach') && $config['allow_pm_attach'] && $form_enctype);
+
+ // Attachment entry
+ posting_gen_attachment_entry($attachment_data, $filename_data, $allowed);
+
+ // Message History
+ if ($action == 'reply' || $action == 'quote' || $action == 'forward')
+ {
+ if (message_history($msg_id, $user->data['user_id'], $post, array(), true))
+ {
+ $template->assign_var('S_DISPLAY_HISTORY', true);
+ }
+ }
+}
+
+/**
+* For composing messages, handle list actions
+*/
+function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove_g, $add_to, $add_bcc)
+{
+ global $auth, $db, $user;
+
+ // Delete User [TO/BCC]
+ if ($remove_u && !empty($_REQUEST['remove_u']) && is_array($_REQUEST['remove_u']))
+ {
+ $remove_user_id = array_keys($_REQUEST['remove_u']);
+
+ if (isset($remove_user_id[0]))
+ {
+ unset($address_list['u'][(int) $remove_user_id[0]]);
+ }
+ }
+
+ // Delete Group [TO/BCC]
+ if ($remove_g && !empty($_REQUEST['remove_g']) && is_array($_REQUEST['remove_g']))
+ {
+ $remove_group_id = array_keys($_REQUEST['remove_g']);
+
+ if (isset($remove_group_id[0]))
+ {
+ unset($address_list['g'][(int) $remove_group_id[0]]);
+ }
+ }
+
+ // Add Selected Groups
+ $group_list = request_var('group_list', array(0));
+
+ // Build usernames to add
+ $usernames = request_var('username', '', true);
+ $usernames = (empty($usernames)) ? array() : array($usernames);
+
+ $username_list = request_var('username_list', '', true);
+ if ($username_list)
+ {
+ $usernames = array_merge($usernames, explode("\n", $username_list));
+ }
+
+ // If add to or add bcc not pressed, users could still have usernames listed they want to add...
+ if (!$add_to && !$add_bcc && (sizeof($group_list) || sizeof($usernames)))
+ {
+ $add_to = true;
+
+ global $refresh, $submit, $preview;
+
+ $refresh = true;
+ $submit = false;
+
+ // Preview is only true if there was also a message entered
+ if (request_var('message', ''))
+ {
+ $preview = true;
+ }
+ }
+
+ // Add User/Group [TO]
+ if ($add_to || $add_bcc)
+ {
+ $type = ($add_to) ? 'to' : 'bcc';
+
+ if (sizeof($group_list))
+ {
+ foreach ($group_list as $group_id)
+ {
+ $address_list['g'][$group_id] = $type;
+ }
+ }
+
+ // User ID's to add...
+ $user_id_ary = array();
+
+ // Reveal the correct user_ids
+ if (sizeof($usernames))
+ {
+ $user_id_ary = array();
+ user_get_id_name($user_id_ary, $usernames, array(USER_NORMAL, USER_FOUNDER, USER_INACTIVE));
+
+ // If there are users not existing, we will at least print a notice...
+ if (!sizeof($user_id_ary))
+ {
+ $error[] = $user->lang['PM_NO_USERS'];
+ }
+ }
+
+ // Add Friends if specified
+ $friend_list = (isset($_REQUEST['add_' . $type]) && is_array($_REQUEST['add_' . $type])) ? array_map('intval', array_keys($_REQUEST['add_' . $type])) : array();
+ $user_id_ary = array_merge($user_id_ary, $friend_list);
+
+ foreach ($user_id_ary as $user_id)
+ {
+ if ($user_id == ANONYMOUS)
+ {
+ continue;
+ }
+
+ $address_list['u'][$user_id] = $type;
+ }
+ }
+
+ // Check for disallowed recipients
+ if (!empty($address_list['u']))
+ {
+ // We need to check their PM status (do they want to receive PM's?)
+ // Only check if not a moderator or admin, since they are allowed to override this user setting
+ if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
+ {
+ $sql = 'SELECT user_id
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', array_keys($address_list['u'])) . '
+ AND user_allow_pm = 0';
+ $result = $db->sql_query($sql);
+
+ $removed = false;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $removed = true;
+ unset($address_list['u'][$row['user_id']]);
+ }
+ $db->sql_freeresult($result);
+
+ // print a notice about users not being added who do not want to receive pms
+ if ($removed)
+ {
+ $error[] = $user->lang['PM_USERS_REMOVED_NO_PM'];
+ }
+ }
+ }
+}
+
+/**
+* Build the hidden field for the recipients. Needed, as the variable is not read via request_var.
+*/
+function build_address_field($address_list)
+{
+ $s_hidden_address_field = '';
+ foreach ($address_list as $type => $adr_ary)
+ {
+ foreach ($adr_ary as $id => $field)
+ {
+ $s_hidden_address_field .= '<input type="hidden" name="address_list[' . (($type == 'u') ? 'u' : 'g') . '][' . (int) $id . ']" value="' . (($field == 'to') ? 'to' : 'bcc') . '" />';
+ }
+ }
+ return $s_hidden_address_field;
+}
+
+/**
+* Return number of private message recipients
+*/
+function num_recipients($address_list)
+{
+ $num_recipients = 0;
+
+ foreach ($address_list as $field => $adr_ary)
+ {
+ $num_recipients += sizeof($adr_ary);
+ }
+
+ return $num_recipients;
+}
+
+/**
+* Get number of 'num_recipients' recipients from first position
+*/
+function get_recipients($address_list, $num_recipients = 1)
+{
+ $recipient = array();
+
+ $count = 0;
+ foreach ($address_list as $field => $adr_ary)
+ {
+ foreach ($adr_ary as $id => $type)
+ {
+ if ($count >= $num_recipients)
+ {
+ break 2;
+ }
+ $recipient[$field][$id] = $type;
+ $count++;
+ }
+ }
+
+ return $recipient;
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php
new file mode 100644
index 0000000000..e80c0672cf
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_pm_options.php
@@ -0,0 +1,836 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Execute message options
+*/
+function message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions)
+{
+ global $phpbb_root_path, $phpEx, $user, $template, $auth, $config, $db;
+
+ $redirect_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&amp;mode=options");
+
+ add_form_key('ucp_pm_options');
+ // Change "full folder" setting - what to do if folder is full
+ if (isset($_POST['fullfolder']))
+ {
+ check_form_key('ucp_pm_options', $config['form_token_lifetime'], $redirect_url);
+ $full_action = request_var('full_action', 0);
+
+ $set_folder_id = 0;
+ switch ($full_action)
+ {
+ case 1:
+ $set_folder_id = FULL_FOLDER_DELETE;
+ break;
+
+ case 2:
+ $set_folder_id = request_var('full_move_to', PRIVMSGS_INBOX);
+ break;
+
+ case 3:
+ $set_folder_id = FULL_FOLDER_HOLD;
+ break;
+
+ default:
+ $full_action = 0;
+ break;
+ }
+
+ if ($full_action)
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_full_folder = ' . $set_folder_id . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+
+ $user->data['user_full_folder'] = $set_folder_id;
+
+ $message = $user->lang['FULL_FOLDER_OPTION_CHANGED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $redirect_url . '">', '</a>');
+ meta_refresh(3, $redirect_url);
+ trigger_error($message);
+ }
+ }
+
+ // Add Folder
+ if (isset($_POST['addfolder']))
+ {
+ if (check_form_key('ucp_pm_options'))
+ {
+ $folder_name = utf8_normalize_nfc(request_var('foldername', '', true));
+ $msg = '';
+
+ if ($folder_name)
+ {
+ $sql = 'SELECT folder_name
+ FROM ' . PRIVMSGS_FOLDER_TABLE . "
+ WHERE folder_name = '" . $db->sql_escape($folder_name) . "'
+ AND user_id = " . $user->data['user_id'];
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ trigger_error(sprintf($user->lang['FOLDER_NAME_EXIST'], $folder_name));
+ }
+
+ $sql = 'SELECT COUNT(folder_id) as num_folder
+ FROM ' . PRIVMSGS_FOLDER_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+ $num_folder = (int) $db->sql_fetchfield('num_folder');
+ $db->sql_freeresult($result);
+
+ if ($num_folder >= $config['pm_max_boxes'])
+ {
+ trigger_error('MAX_FOLDER_REACHED');
+ }
+
+ $sql = 'INSERT INTO ' . PRIVMSGS_FOLDER_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'user_id' => (int) $user->data['user_id'],
+ 'folder_name' => $folder_name)
+ );
+ $db->sql_query($sql);
+ $msg = $user->lang['FOLDER_ADDED'];
+ }
+ else
+ {
+ $msg = $user->lang['FOLDER_NAME_EMPTY'];
+ }
+ }
+ else
+ {
+ $msg = $user->lang['FORM_INVALID'];
+ }
+ $message = $msg . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $redirect_url . '">', '</a>');
+ meta_refresh(3, $redirect_url);
+ trigger_error($message);
+ }
+
+ // Rename folder
+ if (isset($_POST['rename_folder']))
+ {
+ if (check_form_key('ucp_pm_options'))
+ {
+ $new_folder_name = utf8_normalize_nfc(request_var('new_folder_name', '', true));
+ $rename_folder_id= request_var('rename_folder_id', 0);
+
+ if (!$new_folder_name)
+ {
+ trigger_error('NO_NEW_FOLDER_NAME');
+ }
+
+ // Select custom folder
+ $sql = 'SELECT folder_name, pm_count
+ FROM ' . PRIVMSGS_FOLDER_TABLE . "
+ WHERE user_id = {$user->data['user_id']}
+ AND folder_id = $rename_folder_id";
+ $result = $db->sql_query_limit($sql, 1);
+ $folder_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$folder_row)
+ {
+ trigger_error('CANNOT_RENAME_FOLDER');
+ }
+
+ $sql = 'UPDATE ' . PRIVMSGS_FOLDER_TABLE . "
+ SET folder_name = '" . $db->sql_escape($new_folder_name) . "'
+ WHERE folder_id = $rename_folder_id
+ AND user_id = {$user->data['user_id']}";
+ $db->sql_query($sql);
+ $msg = $user->lang['FOLDER_RENAMED'];
+ }
+ else
+ {
+ $msg = $user->lang['FORM_INVALID'];
+ }
+
+ $message = $msg . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $redirect_url . '">', '</a>');
+
+ meta_refresh(3, $redirect_url);
+ trigger_error($message);
+ }
+
+ // Remove Folder
+ if (isset($_POST['remove_folder']))
+ {
+ $remove_folder_id = request_var('remove_folder_id', 0);
+
+ // Default to "move all messages to inbox"
+ $remove_action = request_var('remove_action', 1);
+ $move_to = request_var('move_to', PRIVMSGS_INBOX);
+
+ // Move to same folder?
+ if ($remove_action == 1 && $remove_folder_id == $move_to)
+ {
+ trigger_error('CANNOT_MOVE_TO_SAME_FOLDER');
+ }
+
+ // Select custom folder
+ $sql = 'SELECT folder_name, pm_count
+ FROM ' . PRIVMSGS_FOLDER_TABLE . "
+ WHERE user_id = {$user->data['user_id']}
+ AND folder_id = $remove_folder_id";
+ $result = $db->sql_query_limit($sql, 1);
+ $folder_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$folder_row)
+ {
+ trigger_error('CANNOT_REMOVE_FOLDER');
+ }
+
+ $s_hidden_fields = array(
+ 'remove_folder_id' => $remove_folder_id,
+ 'remove_action' => $remove_action,
+ 'move_to' => $move_to,
+ 'remove_folder' => 1
+ );
+
+ // Do we need to confirm?
+ if (confirm_box(true))
+ {
+ // Gather message ids
+ $sql = 'SELECT msg_id
+ FROM ' . PRIVMSGS_TO_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'] . "
+ AND folder_id = $remove_folder_id";
+ $result = $db->sql_query($sql);
+
+ $msg_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $msg_ids[] = (int) $row['msg_id'];
+ }
+ $db->sql_freeresult($result);
+
+ // First of all, copy all messages to another folder... or delete all messages
+ switch ($remove_action)
+ {
+ // Move Messages
+ case 1:
+ $num_moved = move_pm($user->data['user_id'], $user->data['message_limit'], $msg_ids, $move_to, $remove_folder_id);
+
+ // Something went wrong, only partially moved?
+ if ($num_moved != $folder_row['pm_count'])
+ {
+ trigger_error(sprintf($user->lang['MOVE_PM_ERROR'], $num_moved, $folder_row['pm_count']));
+ }
+ break;
+
+ // Remove Messages
+ case 2:
+ delete_pm($user->data['user_id'], $msg_ids, $remove_folder_id);
+ break;
+ }
+
+ // Remove folder
+ $sql = 'DELETE FROM ' . PRIVMSGS_FOLDER_TABLE . "
+ WHERE user_id = {$user->data['user_id']}
+ AND folder_id = $remove_folder_id";
+ $db->sql_query($sql);
+
+ // Check full folder option. If the removed folder has been specified as destination switch back to inbox
+ if ($user->data['user_full_folder'] == $remove_folder_id)
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_full_folder = ' . PRIVMSGS_INBOX . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+
+ $user->data['user_full_folder'] = PRIVMSGS_INBOX;
+ }
+
+ // Now make sure the folder is not used for rules
+ // We assign another folder id (the one the messages got moved to) or assign the INBOX (to not have to remove any rule)
+ $sql = 'UPDATE ' . PRIVMSGS_RULES_TABLE . ' SET rule_folder_id = ';
+ $sql .= ($remove_action == 1) ? $move_to : PRIVMSGS_INBOX;
+ $sql .= ' WHERE rule_folder_id = ' . $remove_folder_id;
+
+ $db->sql_query($sql);
+
+ $meta_info = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&amp;mode=$mode");
+ $message = $user->lang['FOLDER_REMOVED'];
+
+ meta_refresh(3, $meta_info);
+ $message .= '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $meta_info . '">', '</a>');
+ trigger_error($message);
+ }
+ else
+ {
+ confirm_box(false, 'REMOVE_FOLDER', build_hidden_fields($s_hidden_fields));
+ }
+ }
+
+ // Add Rule
+ if (isset($_POST['add_rule']))
+ {
+ if (check_form_key('ucp_pm_options'))
+ {
+ $check_option = request_var('check_option', 0);
+ $rule_option = request_var('rule_option', 0);
+ $cond_option = request_var('cond_option', '');
+ $action_option = explode('|', request_var('action_option', ''));
+ $rule_string = ($cond_option != 'none') ? utf8_normalize_nfc(request_var('rule_string', '', true)) : '';
+ $rule_user_id = ($cond_option != 'none') ? request_var('rule_user_id', 0) : 0;
+ $rule_group_id = ($cond_option != 'none') ? request_var('rule_group_id', 0) : 0;
+
+ $action = (int) $action_option[0];
+ $folder_id = (int) $action_option[1];
+
+ if (!$action || !$check_option || !$rule_option || !$cond_option || ($cond_option != 'none' && !$rule_string))
+ {
+ trigger_error('RULE_NOT_DEFINED');
+ }
+
+ if (($cond_option == 'user' && !$rule_user_id) || ($cond_option == 'group' && !$rule_group_id))
+ {
+ trigger_error('RULE_NOT_DEFINED');
+ }
+
+ $rule_ary = array(
+ 'user_id' => $user->data['user_id'],
+ 'rule_check' => $check_option,
+ 'rule_connection' => $rule_option,
+ 'rule_string' => $rule_string,
+ 'rule_user_id' => $rule_user_id,
+ 'rule_group_id' => $rule_group_id,
+ 'rule_action' => $action,
+ 'rule_folder_id' => $folder_id
+ );
+
+ $sql = 'SELECT rule_id
+ FROM ' . PRIVMSGS_RULES_TABLE . '
+ WHERE ' . $db->sql_build_array('SELECT', $rule_ary);
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ trigger_error('RULE_ALREADY_DEFINED');
+ }
+
+ $sql = 'INSERT INTO ' . PRIVMSGS_RULES_TABLE . ' ' . $db->sql_build_array('INSERT', $rule_ary);
+ $db->sql_query($sql);
+
+ // Update users message rules
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_message_rules = 1
+ WHERE user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+
+ $msg = $user->lang['RULE_ADDED'];
+ }
+ else
+ {
+ $msg = $user->lang['FORM_INVALID'];
+ }
+ $message = $msg . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $redirect_url . '">', '</a>');
+ meta_refresh(3, $redirect_url);
+ trigger_error($message);
+ }
+
+ // Remove Rule
+ if (isset($_POST['delete_rule']) && !isset($_POST['cancel']))
+ {
+ $delete_id = array_keys(request_var('delete_rule', array(0 => 0)));
+ $delete_id = (!empty($delete_id[0])) ? $delete_id[0] : 0;
+
+ if (!$delete_id)
+ {
+ redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=' . $mode));
+ }
+
+ // Do we need to confirm?
+ if (confirm_box(true))
+ {
+ $sql = 'DELETE FROM ' . PRIVMSGS_RULES_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'] . "
+ AND rule_id = $delete_id";
+ $db->sql_query($sql);
+
+ $meta_info = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=' . $mode);
+ $message = $user->lang['RULE_DELETED'];
+
+ // Reset user_message_rules if no more assigned
+ $sql = 'SELECT rule_id
+ FROM ' . PRIVMSGS_RULES_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // Update users message rules
+ if (!$row)
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_message_rules = 0
+ WHERE user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+ }
+
+ meta_refresh(3, $meta_info);
+ $message .= '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $meta_info . '">', '</a>');
+ trigger_error($message);
+ }
+ else
+ {
+ confirm_box(false, 'DELETE_RULE', build_hidden_fields(array('delete_rule' => array($delete_id => 1))));
+ }
+ }
+
+ $folder = array();
+
+ $sql = 'SELECT COUNT(msg_id) as num_messages
+ FROM ' . PRIVMSGS_TO_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'] . '
+ AND folder_id = ' . PRIVMSGS_INBOX;
+ $result = $db->sql_query($sql);
+ $num_messages = (int) $db->sql_fetchfield('num_messages');
+ $db->sql_freeresult($result);
+
+ $folder[PRIVMSGS_INBOX] = array(
+ 'folder_name' => $user->lang['PM_INBOX'],
+ 'message_status' => sprintf($user->lang['FOLDER_MESSAGE_STATUS'], $num_messages, $user->data['message_limit'])
+ );
+
+ $sql = 'SELECT folder_id, folder_name, pm_count
+ FROM ' . PRIVMSGS_FOLDER_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+
+ $num_user_folder = 0;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $num_user_folder++;
+ $folder[$row['folder_id']] = array(
+ 'folder_name' => $row['folder_name'],
+ 'message_status' => sprintf($user->lang['FOLDER_MESSAGE_STATUS'], $row['pm_count'], $user->data['message_limit'])
+ );
+ }
+ $db->sql_freeresult($result);
+
+ $s_full_folder_options = $s_to_folder_options = $s_folder_options = '';
+
+ if ($user->data['user_full_folder'] == FULL_FOLDER_NONE)
+ {
+ // -3 here to let the correct folder id be selected
+ $to_folder_id = $config['full_folder_action'] - 3;
+ }
+ else
+ {
+ $to_folder_id = $user->data['user_full_folder'];
+ }
+
+ foreach ($folder as $folder_id => $folder_ary)
+ {
+ $s_full_folder_options .= '<option value="' . $folder_id . '"' . (($user->data['user_full_folder'] == $folder_id) ? ' selected="selected"' : '') . '>' . $folder_ary['folder_name'] . ' (' . $folder_ary['message_status'] . ')</option>';
+ $s_to_folder_options .= '<option value="' . $folder_id . '"' . (($to_folder_id == $folder_id) ? ' selected="selected"' : '') . '>' . $folder_ary['folder_name'] . ' (' . $folder_ary['message_status'] . ')</option>';
+
+ if ($folder_id != PRIVMSGS_INBOX)
+ {
+ $s_folder_options .= '<option value="' . $folder_id . '">' . $folder_ary['folder_name'] . ' (' . $folder_ary['message_status'] . ')</option>';
+ }
+ }
+
+ $s_delete_checked = ($user->data['user_full_folder'] == FULL_FOLDER_DELETE) ? ' checked="checked"' : '';
+ $s_hold_checked = ($user->data['user_full_folder'] == FULL_FOLDER_HOLD) ? ' checked="checked"' : '';
+ $s_move_checked = ($user->data['user_full_folder'] >= 0) ? ' checked="checked"' : '';
+
+ if ($user->data['user_full_folder'] == FULL_FOLDER_NONE)
+ {
+ switch ($config['full_folder_action'])
+ {
+ case 1:
+ $s_delete_checked = ' checked="checked"';
+ break;
+
+ case 2:
+ $s_hold_checked = ' checked="checked"';
+ break;
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_FULL_FOLDER_OPTIONS' => $s_full_folder_options,
+ 'S_TO_FOLDER_OPTIONS' => $s_to_folder_options,
+ 'S_FOLDER_OPTIONS' => $s_folder_options,
+ 'S_DELETE_CHECKED' => $s_delete_checked,
+ 'S_HOLD_CHECKED' => $s_hold_checked,
+ 'S_MOVE_CHECKED' => $s_move_checked,
+ 'S_MAX_FOLDER_REACHED' => ($num_user_folder >= $config['pm_max_boxes']) ? true : false,
+ 'S_MAX_FOLDER_ZERO' => ($config['pm_max_boxes'] == 0) ? true : false,
+
+ 'DEFAULT_ACTION' => ($config['full_folder_action'] == 1) ? $user->lang['DELETE_OLDEST_MESSAGES'] : $user->lang['HOLD_NEW_MESSAGES'],
+
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=ucp&amp;field=rule_string&amp;select_single=true'),
+ ));
+
+ $rule_lang = $action_lang = $check_lang = array();
+
+ // Build all three language arrays
+ preg_replace('#^((RULE|ACTION|CHECK)_([A-Z0-9_]+))$#e', "\${strtolower('\\2') . '_lang'}[constant('\\1')] = \$user->lang['PM_\\2']['\\3']", array_keys(get_defined_constants()));
+
+ /*
+ Rule Ordering:
+ -> CHECK_* -> RULE_* [IN $global_privmsgs_rules:CHECK_*] -> [IF $rule_conditions[RULE_*] [|text|bool|user|group|own_group]] -> ACTION_*
+ */
+
+ $check_option = request_var('check_option', 0);
+ $rule_option = request_var('rule_option', 0);
+ $cond_option = request_var('cond_option', '');
+ $action_option = request_var('action_option', '');
+ $back = (isset($_REQUEST['back'])) ? request_var('back', array('' => 0)) : array();
+
+ if (sizeof($back))
+ {
+ if ($action_option)
+ {
+ $action_option = '';
+ }
+ else if ($cond_option)
+ {
+ $cond_option = '';
+ }
+ else if ($rule_option)
+ {
+ $rule_option = 0;
+ }
+ else if ($check_option)
+ {
+ $check_option = 0;
+ }
+ }
+
+ if (isset($back['action']) && $cond_option == 'none')
+ {
+ $back['cond'] = true;
+ }
+
+ // Check
+ if (!isset($global_privmsgs_rules[$check_option]))
+ {
+ $check_option = 0;
+ }
+
+ define_check_option(($check_option && !isset($back['rule'])) ? true : false, $check_option, $check_lang);
+
+ if ($check_option && !isset($back['rule']))
+ {
+ define_rule_option(($rule_option && !isset($back['cond'])) ? true : false, $rule_option, $rule_lang, $global_privmsgs_rules[$check_option]);
+ }
+
+ if ($rule_option && !isset($back['cond']))
+ {
+ if (!isset($global_rule_conditions[$rule_option]))
+ {
+ $cond_option = 'none';
+ $template->assign_var('NONE_CONDITION', true);
+ }
+ else
+ {
+ define_cond_option(($cond_option && !isset($back['action'])) ? true : false, $cond_option, $rule_option, $global_rule_conditions);
+ }
+ }
+
+ if ($cond_option && !isset($back['action']))
+ {
+ define_action_option(false, $action_option, $action_lang, $folder);
+ }
+
+ show_defined_rules($user->data['user_id'], $check_lang, $rule_lang, $action_lang, $folder);
+}
+
+/**
+* Defining check option for message rules
+*/
+function define_check_option($hardcoded, $check_option, $check_lang)
+{
+ global $template;
+
+ $s_check_options = '';
+ if (!$hardcoded)
+ {
+ foreach ($check_lang as $value => $lang)
+ {
+ $s_check_options .= '<option value="' . $value . '"' . (($value == $check_option) ? ' selected="selected"' : '') . '>' . $lang . '</option>';
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_CHECK_DEFINED' => true,
+ 'S_CHECK_SELECT' => ($hardcoded) ? false : true,
+ 'CHECK_CURRENT' => isset($check_lang[$check_option]) ? $check_lang[$check_option] : '',
+ 'S_CHECK_OPTIONS' => $s_check_options,
+ 'CHECK_OPTION' => $check_option)
+ );
+}
+
+/**
+* Defining action option for message rules
+*/
+function define_action_option($hardcoded, $action_option, $action_lang, $folder)
+{
+ global $db, $template, $user;
+
+ $l_action = $s_action_options = '';
+ if ($hardcoded)
+ {
+ $option = explode('|', $action_option);
+ $action = (int) $option[0];
+ $folder_id = (int) $option[1];
+
+ $l_action = $action_lang[$action];
+ if ($action == ACTION_PLACE_INTO_FOLDER)
+ {
+ $l_action .= ' -> ' . $folder[$folder_id]['folder_name'];
+ }
+ }
+ else
+ {
+ foreach ($action_lang as $action => $lang)
+ {
+ if ($action == ACTION_PLACE_INTO_FOLDER)
+ {
+ foreach ($folder as $folder_id => $folder_ary)
+ {
+ $s_action_options .= '<option value="' . $action . '|' . $folder_id . '"' . (($action_option == $action . '|' . $folder_id) ? ' selected="selected"' : '') . '>' . $lang . ' -> ' . $folder_ary['folder_name'] . '</option>';
+ }
+ }
+ else
+ {
+ $s_action_options .= '<option value="' . $action . '|0"' . (($action_option == $action . '|0') ? ' selected="selected"' : '') . '>' . $lang . '</option>';
+ }
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_ACTION_DEFINED' => true,
+ 'S_ACTION_SELECT' => ($hardcoded) ? false : true,
+ 'ACTION_CURRENT' => $l_action,
+ 'S_ACTION_OPTIONS' => $s_action_options,
+ 'ACTION_OPTION' => $action_option)
+ );
+}
+
+/**
+* Defining rule option for message rules
+*/
+function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary)
+{
+ global $template;
+
+ $s_rule_options = '';
+ if (!$hardcoded)
+ {
+ foreach ($check_ary as $value => $_check)
+ {
+ $s_rule_options .= '<option value="' . $value . '"' . (($value == $rule_option) ? ' selected="selected"' : '') . '>' . $rule_lang[$value] . '</option>';
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_RULE_DEFINED' => true,
+ 'S_RULE_SELECT' => !$hardcoded,
+ 'RULE_CURRENT' => isset($rule_lang[$rule_option]) ? $rule_lang[$rule_option] : '',
+ 'S_RULE_OPTIONS' => $s_rule_options,
+ 'RULE_OPTION' => $rule_option)
+ );
+}
+
+/**
+* Defining condition option for message rules
+*/
+function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule_conditions)
+{
+ global $db, $template, $auth, $user;
+
+ $template->assign_vars(array(
+ 'S_COND_DEFINED' => true,
+ 'S_COND_SELECT' => (!$hardcoded && isset($global_rule_conditions[$rule_option])) ? true : false)
+ );
+
+ // Define COND_OPTION
+ if (!isset($global_rule_conditions[$rule_option]))
+ {
+ $template->assign_vars(array(
+ 'COND_OPTION' => 'none',
+ 'COND_CURRENT' => false)
+ );
+ return;
+ }
+
+ // Define Condition
+ $condition = $global_rule_conditions[$rule_option];
+ $current_value = '';
+
+ switch ($condition)
+ {
+ case 'text':
+ $rule_string = utf8_normalize_nfc(request_var('rule_string', '', true));
+
+ $template->assign_vars(array(
+ 'S_TEXT_CONDITION' => true,
+ 'CURRENT_STRING' => $rule_string,
+ 'CURRENT_USER_ID' => 0,
+ 'CURRENT_GROUP_ID' => 0)
+ );
+
+ $current_value = $rule_string;
+ break;
+
+ case 'user':
+ $rule_user_id = request_var('rule_user_id', 0);
+ $rule_string = utf8_normalize_nfc(request_var('rule_string', '', true));
+
+ if ($rule_string && !$rule_user_id)
+ {
+ $sql = 'SELECT user_id
+ FROM ' . USERS_TABLE . "
+ WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($rule_string)) . "'";
+ $result = $db->sql_query($sql);
+ $rule_user_id = (int) $db->sql_fetchfield('user_id');
+ $db->sql_freeresult($result);
+
+ if (!$rule_user_id)
+ {
+ $rule_string = '';
+ }
+ }
+ else if (!$rule_string && $rule_user_id)
+ {
+ $sql = 'SELECT username
+ FROM ' . USERS_TABLE . "
+ WHERE user_id = $rule_user_id";
+ $result = $db->sql_query($sql);
+ $rule_string = $db->sql_fetchfield('username');
+ $db->sql_freeresult($result);
+
+ if (!$rule_string)
+ {
+ $rule_user_id = 0;
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_USER_CONDITION' => true,
+ 'CURRENT_STRING' => $rule_string,
+ 'CURRENT_USER_ID' => $rule_user_id,
+ 'CURRENT_GROUP_ID' => 0)
+ );
+
+ $current_value = $rule_string;
+ break;
+
+ case 'group':
+ $rule_group_id = request_var('rule_group_id', 0);
+ $rule_string = utf8_normalize_nfc(request_var('rule_string', '', true));
+
+ $sql = 'SELECT g.group_id, g.group_name, g.group_type
+ FROM ' . GROUPS_TABLE . ' g ';
+
+ if (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
+ {
+ $sql .= 'LEFT JOIN ' . USER_GROUP_TABLE . ' ug
+ ON (
+ g.group_id = ug.group_id
+ AND ug.user_id = ' . $user->data['user_id'] . '
+ AND ug.user_pending = 0
+ )
+ WHERE (ug.user_id = ' . $user->data['user_id'] . ' OR g.group_type <> ' . GROUP_HIDDEN . ')
+ AND';
+ }
+ else
+ {
+ $sql .= 'WHERE';
+ }
+
+ $sql .= " (g.group_name NOT IN ('GUESTS', 'BOTS') OR g.group_type <> " . GROUP_SPECIAL . ')
+ ORDER BY g.group_type DESC, g.group_name ASC';
+
+ $result = $db->sql_query($sql);
+
+ $s_group_options = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($rule_group_id && ($row['group_id'] == $rule_group_id))
+ {
+ $rule_string = (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']);
+ }
+
+ $s_class = ($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '';
+ $s_selected = ($row['group_id'] == $rule_group_id) ? ' selected="selected"' : '';
+
+ $s_group_options .= '<option value="' . $row['group_id'] . '"' . $s_class . $s_selected . '>' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'S_GROUP_CONDITION' => true,
+ 'S_GROUP_OPTIONS' => $s_group_options,
+ 'CURRENT_STRING' => $rule_string,
+ 'CURRENT_USER_ID' => 0,
+ 'CURRENT_GROUP_ID' => $rule_group_id)
+ );
+
+ $current_value = $rule_string;
+ break;
+
+ default:
+ return;
+ }
+
+ $template->assign_vars(array(
+ 'COND_OPTION' => $condition,
+ 'COND_CURRENT' => $current_value)
+ );
+}
+
+/**
+* Display defined message rules
+*/
+function show_defined_rules($user_id, $check_lang, $rule_lang, $action_lang, $folder)
+{
+ global $db, $template;
+
+ $sql = 'SELECT *
+ FROM ' . PRIVMSGS_RULES_TABLE . '
+ WHERE user_id = ' . $user_id . '
+ ORDER BY rule_id ASC';
+ $result = $db->sql_query($sql);
+
+ $count = 0;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $template->assign_block_vars('rule', array(
+ 'COUNT' => ++$count,
+ 'RULE_ID' => $row['rule_id'],
+ 'CHECK' => $check_lang[$row['rule_check']],
+ 'RULE' => $rule_lang[$row['rule_connection']],
+ 'STRING' => $row['rule_string'],
+ 'ACTION' => $action_lang[$row['rule_action']],
+ 'FOLDER' => ($row['rule_action'] == ACTION_PLACE_INTO_FOLDER) ? $folder[$row['rule_folder_id']]['folder_name'] : '')
+ );
+ }
+ $db->sql_freeresult($result);
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
new file mode 100644
index 0000000000..33d2c9fb6f
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -0,0 +1,509 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* View message folder
+* Called from ucp_pm with mode == 'view' && action == 'view_folder'
+*/
+function view_folder($id, $mode, $folder_id, $folder)
+{
+ global $user, $template, $auth, $db, $cache;
+ global $phpbb_root_path, $config, $phpEx;
+
+ $submit_export = (isset($_POST['submit_export'])) ? true : false;
+
+ $folder_info = get_pm_from($folder_id, $folder, $user->data['user_id']);
+
+ if (!$submit_export)
+ {
+ $user->add_lang('viewforum');
+
+ // Grab icons
+ $icons = $cache->obtain_icons();
+
+ $color_rows = array('marked', 'replied');
+
+ // only show the friend/foe color rows if the module is enabled
+ $zebra_enabled = false;
+
+ $_module = new p_master();
+ $_module->list_modules('ucp');
+ $_module->set_active('zebra');
+
+ $zebra_enabled = ($_module->active_module === false) ? false : true;
+
+ unset($_module);
+
+ if ($zebra_enabled)
+ {
+ $color_rows = array_merge($color_rows, array('friend', 'foe'));
+ }
+
+ foreach ($color_rows as $var)
+ {
+ $template->assign_block_vars('pm_colour_info', array(
+ 'IMG' => $user->img("pm_{$var}", ''),
+ 'CLASS' => "pm_{$var}_colour",
+ 'LANG' => $user->lang[strtoupper($var) . '_MESSAGE'])
+ );
+ }
+
+ $mark_options = array('mark_important', 'delete_marked');
+
+ $s_mark_options = '';
+ foreach ($mark_options as $mark_option)
+ {
+ $s_mark_options .= '<option value="' . $mark_option . '">' . $user->lang[strtoupper($mark_option)] . '</option>';
+ }
+
+ // We do the folder moving options here too, for template authors to use...
+ $s_folder_move_options = '';
+ if ($folder_id != PRIVMSGS_NO_BOX && $folder_id != PRIVMSGS_OUTBOX)
+ {
+ foreach ($folder as $f_id => $folder_ary)
+ {
+ if ($f_id == PRIVMSGS_OUTBOX || $f_id == PRIVMSGS_SENTBOX || $f_id == $folder_id)
+ {
+ continue;
+ }
+
+ $s_folder_move_options .= '<option' . (($f_id != PRIVMSGS_INBOX) ? ' class="sep"' : '') . ' value="' . $f_id . '">';
+ $s_folder_move_options .= sprintf($user->lang['MOVE_MARKED_TO_FOLDER'], $folder_ary['folder_name']);
+ $s_folder_move_options .= (($folder_ary['unread_messages']) ? ' [' . $folder_ary['unread_messages'] . '] ' : '') . '</option>';
+ }
+ }
+ $friend = $foe = array();
+
+ // Get friends and foes
+ $sql = 'SELECT *
+ FROM ' . ZEBRA_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $friend[$row['zebra_id']] = $row['friend'];
+ $foe[$row['zebra_id']] = $row['foe'];
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'S_MARK_OPTIONS' => $s_mark_options,
+ 'S_MOVE_MARKED_OPTIONS' => $s_folder_move_options)
+ );
+
+ // Okay, lets dump out the page ...
+ if (sizeof($folder_info['pm_list']))
+ {
+ $address_list = array();
+
+ // Build Recipient List if in outbox/sentbox - max two additional queries
+ if ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX)
+ {
+ $address_list = get_recipient_strings($folder_info['rowset']);
+ }
+
+ foreach ($folder_info['pm_list'] as $message_id)
+ {
+ $row = &$folder_info['rowset'][$message_id];
+
+ $folder_img = ($row['pm_unread']) ? 'pm_unread' : 'pm_read';
+ $folder_alt = ($row['pm_unread']) ? 'NEW_MESSAGES' : 'NO_NEW_MESSAGES';
+
+ // Generate all URIs ...
+ $view_message_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=$id&amp;mode=view&amp;f=$folder_id&amp;p=$message_id");
+ $remove_message_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=$id&amp;mode=compose&amp;action=delete&amp;p=$message_id");
+
+ $row_indicator = '';
+ foreach ($color_rows as $var)
+ {
+ if (($var != 'friend' && $var != 'foe' && $row['pm_' . $var])
+ ||
+ (($var == 'friend' || $var == 'foe') && isset(${$var}[$row['author_id']]) && ${$var}[$row['author_id']]))
+ {
+ $row_indicator = $var;
+ break;
+ }
+ }
+
+ // Send vars to template
+ $template->assign_block_vars('messagerow', array(
+ 'PM_CLASS' => ($row_indicator) ? 'pm_' . $row_indicator . '_colour' : '',
+
+ 'MESSAGE_AUTHOR_FULL' => get_username_string('full', $row['author_id'], $row['username'], $row['user_colour'], $row['username']),
+ 'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $row['author_id'], $row['username'], $row['user_colour'], $row['username']),
+ 'MESSAGE_AUTHOR' => get_username_string('username', $row['author_id'], $row['username'], $row['user_colour'], $row['username']),
+ 'U_MESSAGE_AUTHOR' => get_username_string('profile', $row['author_id'], $row['username'], $row['user_colour'], $row['username']),
+
+ 'FOLDER_ID' => $folder_id,
+ 'MESSAGE_ID' => $message_id,
+ 'SENT_TIME' => $user->format_date($row['message_time']),
+ 'SUBJECT' => censor_text($row['message_subject']),
+ 'FOLDER' => (isset($folder[$row['folder_id']])) ? $folder[$row['folder_id']]['folder_name'] : '',
+ 'U_FOLDER' => (isset($folder[$row['folder_id']])) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'folder=' . $row['folder_id']) : '',
+ 'PM_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? '<img src="' . $config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] . '" width="' . $icons[$row['icon_id']]['width'] . '" height="' . $icons[$row['icon_id']]['height'] . '" alt="" title="" />' : '',
+ 'PM_ICON_URL' => (!empty($icons[$row['icon_id']])) ? $config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] : '',
+ 'FOLDER_IMG' => $user->img($folder_img, $folder_alt),
+ 'FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
+ 'PM_IMG' => ($row_indicator) ? $user->img('pm_' . $row_indicator, '') : '',
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('u_pm_download') && $row['message_attachment'] && $config['allow_pm_attach']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
+
+ 'S_PM_DELETED' => ($row['pm_deleted']) ? true : false,
+ 'S_AUTHOR_DELETED' => ($row['author_id'] == ANONYMOUS) ? true : false,
+
+ 'U_VIEW_PM' => ($row['pm_deleted']) ? '' : $view_message_url,
+ 'U_REMOVE_PM' => ($row['pm_deleted']) ? $remove_message_url : '',
+ 'RECIPIENTS' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? implode(', ', $address_list[$message_id]) : '')
+ );
+ }
+ unset($folder_info['rowset']);
+
+ $template->assign_vars(array(
+ 'S_SHOW_RECIPIENTS' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? true : false,
+ 'S_SHOW_COLOUR_LEGEND' => true,
+
+ 'S_PM_ICONS' => ($config['enable_pm_icons']) ? true : false)
+ );
+ }
+ }
+ else
+ {
+ $export_type = request_var('export_option', '');
+ $enclosure = request_var('enclosure', '');
+ $delimiter = request_var('delimiter', '');
+
+ if ($export_type == 'CSV' && ($delimiter === '' || $enclosure === ''))
+ {
+ $template->assign_var('PROMPT', true);
+ }
+ else
+ {
+ // Build Recipient List if in outbox/sentbox
+ $address = $data = array();
+
+ if ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX)
+ {
+ foreach ($folder_info['rowset'] as $message_id => $row)
+ {
+ $address[$message_id] = rebuild_header(array('to' => $row['to_address'], 'bcc' => $row['bcc_address']));
+ }
+ }
+
+ foreach ($folder_info['pm_list'] as $message_id)
+ {
+ $row = &$folder_info['rowset'][$message_id];
+
+ include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+
+ $sql = 'SELECT p.message_text, p.bbcode_uid
+ FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . ' u
+ WHERE t.user_id = ' . $user->data['user_id'] . "
+ AND p.author_id = u.user_id
+ AND t.folder_id = $folder_id
+ AND t.msg_id = p.msg_id
+ AND p.msg_id = $message_id";
+ $result = $db->sql_query_limit($sql, 1);
+ $message_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $_types = array('u', 'g');
+ foreach ($_types as $ug_type)
+ {
+ if (isset($address[$message_id][$ug_type]) && sizeof($address[$message_id][$ug_type]))
+ {
+ if ($ug_type == 'u')
+ {
+ $sql = 'SELECT user_id as id, username as name
+ FROM ' . USERS_TABLE . '
+ WHERE ';
+ }
+ else
+ {
+ $sql = 'SELECT group_id as id, group_name as name
+ FROM ' . GROUPS_TABLE . '
+ WHERE ';
+ }
+ $sql .= $db->sql_in_set(($ug_type == 'u') ? 'user_id' : 'group_id', array_map('intval', array_keys($address[$message_id][$ug_type])));
+
+ $result = $db->sql_query($sql);
+
+ while ($info_row = $db->sql_fetchrow($result))
+ {
+ $address[$message_id][$ug_type][$address[$message_id][$ug_type][$info_row['id']]][] = $info_row['name'];
+ unset($address[$message_id][$ug_type][$info_row['id']]);
+ }
+ $db->sql_freeresult($result);
+ }
+ }
+
+ decode_message($message_row['message_text'], $message_row['bbcode_uid']);
+
+ $data[] = array(
+ 'subject' => censor_text($row['message_subject']),
+ 'sender' => $row['username'],
+ // ISO 8601 date. For PHP4 we are able to hardcode the timezone because $user->format_date() does not set it.
+ 'date' => $user->format_date($row['message_time'], (PHP_VERSION >= 5) ? 'c' : "Y-m-d\TH:i:s+00:00", true),
+ 'to' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? $address[$message_id] : '',
+ 'message' => $message_row['message_text']
+ );
+ }
+
+ switch ($export_type)
+ {
+ case 'CSV':
+ case 'CSV_EXCEL':
+ $mimetype = 'text/csv';
+ $filetype = 'csv';
+
+ if ($export_type == 'CSV_EXCEL')
+ {
+ $enclosure = '"';
+ $delimiter = ',';
+ $newline = "\r\n";
+ }
+ else
+ {
+ $newline = "\n";
+ }
+
+ $string = '';
+ foreach ($data as $value)
+ {
+ $recipients = $value['to'];
+ $value['to'] = $value['bcc'] = '';
+
+ if (is_array($recipients))
+ {
+ foreach ($recipients as $values)
+ {
+ $value['bcc'] .= (isset($values['bcc']) && is_array($values['bcc'])) ? ',' . implode(',', $values['bcc']) : '';
+ $value['to'] .= (isset($values['to']) && is_array($values['to'])) ? ',' . implode(',', $values['to']) : '';
+ }
+
+ // Remove the commas which will appear before the first entry.
+ $value['to'] = substr($value['to'], 1);
+ $value['bcc'] = substr($value['bcc'], 1);
+ }
+
+ foreach ($value as $tag => $text)
+ {
+ $cell = str_replace($enclosure, $enclosure . $enclosure, $text);
+
+ if (strpos($cell, $enclosure) !== false || strpos($cell, $delimiter) !== false || strpos($cell, $newline) !== false)
+ {
+ $string .= $enclosure . $text . $enclosure . $delimiter;
+ }
+ else
+ {
+ $string .= $cell . $delimiter;
+ }
+ }
+ $string = substr($string, 0, -1) . $newline;
+ }
+ break;
+
+ case 'XML':
+ $mimetype = 'application/xml';
+ $filetype = 'xml';
+ $string = '<?xml version="1.0"?>' . "\n";
+ $string .= "<phpbb>\n";
+
+ foreach ($data as $value)
+ {
+ $string .= "\t<privmsg>\n";
+
+ if (is_array($value['to']))
+ {
+ foreach ($value['to'] as $key => $values)
+ {
+ foreach ($values as $type => $types)
+ {
+ foreach ($types as $name)
+ {
+ $string .= "\t\t<recipient type=\"$type\" status=\"$key\">$name</recipient>\n";
+ }
+ }
+ }
+ }
+
+ unset($value['to']);
+
+ foreach ($value as $tag => $text)
+ {
+ $string .= "\t\t<$tag>$text</$tag>\n";
+ }
+
+ $string .= "\t</privmsg>\n";
+ }
+ $string .= '</phpbb>';
+ break;
+ }
+
+ header('Pragma: no-cache');
+ header("Content-Type: $mimetype; name=\"data.$filetype\"");
+ header("Content-disposition: attachment; filename=data.$filetype");
+ echo $string;
+ exit;
+ }
+ }
+}
+
+/**
+* Get Messages from folder/user
+*/
+function get_pm_from($folder_id, $folder, $user_id)
+{
+ global $user, $db, $template, $config, $auth, $phpbb_root_path, $phpEx;
+
+ $start = request_var('start', 0);
+
+ // Additional vars later, pm ordering is mostly different from post ordering. :/
+ $sort_days = request_var('st', 0);
+ $sort_key = request_var('sk', 't');
+ $sort_dir = request_var('sd', 'd');
+
+ // PM ordering options
+ $limit_days = array(0 => $user->lang['ALL_MESSAGES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+
+ // No sort by Author for sentbox/outbox (already only author available)
+ // Also, sort by msg_id for the time - private messages are not as prone to errors as posts are.
+ if ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX)
+ {
+ $sort_by_text = array('t' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']);
+ $sort_by_sql = array('t' => 'p.message_time', 's' => array('p.message_subject', 'p.message_time'));
+ }
+ else
+ {
+ $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']);
+ $sort_by_sql = array('a' => array('u.username_clean', 'p.message_time'), 't' => 'p.message_time', 's' => array('p.message_subject', 'p.message_time'));
+ }
+
+ $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
+ gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
+
+ $folder_sql = 't.folder_id = ' . (int) $folder_id;
+
+ // Limit pms to certain time frame, obtain correct pm count
+ if ($sort_days)
+ {
+ $min_post_time = time() - ($sort_days * 86400);
+
+ if (isset($_POST['sort']))
+ {
+ $start = 0;
+ }
+
+ $sql = 'SELECT COUNT(t.msg_id) AS pm_count
+ FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . " p
+ WHERE $folder_sql
+ AND t.user_id = $user_id
+ AND t.msg_id = p.msg_id
+ AND p.message_time >= $min_post_time";
+ $result = $db->sql_query_limit($sql, 1);
+ $pm_count = (int) $db->sql_fetchfield('pm_count');
+ $db->sql_freeresult($result);
+
+ $sql_limit_time = "AND p.message_time >= $min_post_time";
+ }
+ else
+ {
+ $pm_count = (!empty($folder[$folder_id]['num_messages'])) ? $folder[$folder_id]['num_messages'] : 0;
+ $sql_limit_time = '';
+ }
+
+ $template->assign_vars(array(
+ 'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&amp;mode=view&amp;action=view_folder&amp;f=$folder_id&amp;$u_sort_param"), $pm_count, $config['topics_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($pm_count, $config['topics_per_page'], $start),
+ 'TOTAL_MESSAGES' => (($pm_count == 1) ? $user->lang['VIEW_PM_MESSAGE'] : sprintf($user->lang['VIEW_PM_MESSAGES'], $pm_count)),
+
+ 'POST_IMG' => (!$auth->acl_get('u_sendpm')) ? $user->img('button_topic_locked', 'POST_PM_LOCKED') : $user->img('button_pm_new', 'POST_NEW_PM'),
+
+ 'S_NO_AUTH_SEND_MESSAGE' => !$auth->acl_get('u_sendpm'),
+
+ 'S_SELECT_SORT_DIR' => $s_sort_dir,
+ 'S_SELECT_SORT_KEY' => $s_sort_key,
+ 'S_SELECT_SORT_DAYS' => $s_limit_days,
+ 'S_TOPIC_ICONS' => ($config['enable_pm_icons']) ? true : false,
+
+ 'U_POST_NEW_TOPIC' => ($auth->acl_get('u_sendpm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose') : '',
+ 'S_PM_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&amp;mode=view&amp;action=view_folder&amp;f=$folder_id" . (($start !== 0) ? "&amp;start=$start" : '')),
+ ));
+
+ // Grab all pm data
+ $rowset = $pm_list = array();
+
+ // If the user is trying to reach late pages, start searching from the end
+ $store_reverse = false;
+ $sql_limit = $config['topics_per_page'];
+ if ($start > $pm_count / 2)
+ {
+ $store_reverse = true;
+
+ if ($start + $config['topics_per_page'] > $pm_count)
+ {
+ $sql_limit = min($config['topics_per_page'], max(1, $pm_count - $start));
+ }
+
+ // Select the sort order
+ $direction = ($sort_dir == 'd') ? 'ASC' : 'DESC';
+ $sql_start = max(0, $pm_count - $sql_limit - $start);
+ }
+ else
+ {
+ // Select the sort order
+ $direction = ($sort_dir == 'd') ? 'DESC' : 'ASC';
+ $sql_start = $start;
+ }
+
+ // Sql sort order
+ if (is_array($sort_by_sql[$sort_key]))
+ {
+ $sql_sort_order = implode(' ' . $direction . ', ', $sort_by_sql[$sort_key]) . ' ' . $direction;
+ }
+ else
+ {
+ $sql_sort_order = $sort_by_sql[$sort_key] . ' ' . $direction;
+ }
+
+ $sql = 'SELECT t.*, p.root_level, p.message_time, p.message_subject, p.icon_id, p.to_address, p.message_attachment, p.bcc_address, u.username, u.username_clean, u.user_colour
+ FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . " u
+ WHERE t.user_id = $user_id
+ AND p.author_id = u.user_id
+ AND $folder_sql
+ AND t.msg_id = p.msg_id
+ $sql_limit_time
+ ORDER BY $sql_sort_order";
+ $result = $db->sql_query_limit($sql, $sql_limit, $sql_start);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $rowset[$row['msg_id']] = $row;
+ $pm_list[] = $row['msg_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $pm_list = ($store_reverse) ? array_reverse($pm_list) : $pm_list;
+
+ return array(
+ 'pm_count' => $pm_count,
+ 'pm_list' => $pm_list,
+ 'rowset' => $rowset
+ );
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
new file mode 100644
index 0000000000..26968e1382
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -0,0 +1,320 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* View private message
+*/
+function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
+{
+ global $user, $template, $auth, $db, $cache;
+ global $phpbb_root_path, $phpEx, $config;
+
+ $user->add_lang(array('viewtopic', 'memberlist'));
+
+ $msg_id = (int) $msg_id;
+ $folder_id = (int) $folder_id;
+ $author_id = (int) $message_row['author_id'];
+ $view = request_var('view', '');
+
+ // Not able to view message, it was deleted by the sender
+ if ($message_row['pm_deleted'])
+ {
+ $meta_info = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&amp;folder=$folder_id");
+ $message = $user->lang['NO_AUTH_READ_REMOVED_MESSAGE'];
+
+ $message .= '<br /><br />' . sprintf($user->lang['RETURN_FOLDER'], '<a href="' . $meta_info . '">', '</a>');
+ trigger_error($message);
+ }
+
+ // Do not allow hold messages to be seen
+ if ($folder_id == PRIVMSGS_HOLD_BOX)
+ {
+ trigger_error('NO_AUTH_READ_HOLD_MESSAGE');
+ }
+
+ // Grab icons
+ $icons = $cache->obtain_icons();
+
+ $bbcode = false;
+
+ // Instantiate BBCode if need be
+ if ($message_row['bbcode_bitfield'])
+ {
+ include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+ $bbcode = new bbcode($message_row['bbcode_bitfield']);
+ }
+
+ // Assign TO/BCC Addresses to template
+ write_pm_addresses(array('to' => $message_row['to_address'], 'bcc' => $message_row['bcc_address']), $author_id);
+
+ $user_info = get_user_information($author_id, $message_row);
+
+ // Parse the message and subject
+ $message = censor_text($message_row['message_text']);
+
+ // Second parse bbcode here
+ if ($message_row['bbcode_bitfield'])
+ {
+ $bbcode->bbcode_second_pass($message, $message_row['bbcode_uid'], $message_row['bbcode_bitfield']);
+ }
+
+ // Always process smilies after parsing bbcodes
+ $message = bbcode_nl2br($message);
+ $message = smiley_text($message);
+
+ // Replace naughty words such as farty pants
+ $message_row['message_subject'] = censor_text($message_row['message_subject']);
+
+ // Editing information
+ if ($message_row['message_edit_count'] && $config['display_last_edited'])
+ {
+ $l_edit_time_total = ($message_row['message_edit_count'] == 1) ? $user->lang['EDITED_TIME_TOTAL'] : $user->lang['EDITED_TIMES_TOTAL'];
+ $l_edited_by = '<br /><br />' . sprintf($l_edit_time_total, (!$message_row['message_edit_user']) ? $message_row['username'] : $message_row['message_edit_user'], $user->format_date($message_row['message_edit_time'], false, true), $message_row['message_edit_count']);
+ }
+ else
+ {
+ $l_edited_by = '';
+ }
+
+ // Pull attachment data
+ $display_notice = false;
+ $attachments = array();
+
+ if ($message_row['message_attachment'] && $config['allow_pm_attach'])
+ {
+ if ($auth->acl_get('u_pm_download'))
+ {
+ $sql = 'SELECT *
+ FROM ' . ATTACHMENTS_TABLE . "
+ WHERE post_msg_id = $msg_id
+ AND in_message = 1
+ ORDER BY filetime DESC, post_msg_id ASC";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $attachments[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ // No attachments exist, but message table thinks they do so go ahead and reset attach flags
+ if (!sizeof($attachments))
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . "
+ SET message_attachment = 0
+ WHERE msg_id = $msg_id";
+ $db->sql_query($sql);
+ }
+ }
+ else
+ {
+ $display_notice = true;
+ }
+ }
+
+ // Assign inline attachments
+ if (!empty($attachments))
+ {
+ $update_count = array();
+ parse_attachments(false, $message, $attachments, $update_count);
+
+ // Update the attachment download counts
+ if (sizeof($update_count))
+ {
+ $sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
+ SET download_count = download_count + 1
+ WHERE ' . $db->sql_in_set('attach_id', array_unique($update_count));
+ $db->sql_query($sql);
+ }
+ }
+
+ $user_info['sig'] = '';
+
+ $signature = ($message_row['enable_sig'] && $config['allow_sig'] && $auth->acl_get('u_sig') && $user->optionget('viewsigs')) ? $user_info['user_sig'] : '';
+
+ // End signature parsing, only if needed
+ if ($signature)
+ {
+ $signature = censor_text($signature);
+
+ if ($user_info['user_sig_bbcode_bitfield'])
+ {
+ if ($bbcode === false)
+ {
+ include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+ $bbcode = new bbcode($user_info['user_sig_bbcode_bitfield']);
+ }
+
+ $bbcode->bbcode_second_pass($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield']);
+ }
+
+ $signature = bbcode_nl2br($signature);
+ $signature = smiley_text($signature);
+ }
+
+ $url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm');
+
+ // Number of "to" recipients
+ $num_recipients = (int) preg_match_all('/:?(u|g)_([0-9]+):?/', $message_row['to_address'], $match);
+
+ $template->assign_vars(array(
+ 'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
+ 'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
+ 'MESSAGE_AUTHOR' => get_username_string('username', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
+ 'U_MESSAGE_AUTHOR' => get_username_string('profile', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
+
+ 'RANK_TITLE' => $user_info['rank_title'],
+ 'RANK_IMG' => $user_info['rank_image'],
+ 'AUTHOR_AVATAR' => (isset($user_info['avatar'])) ? $user_info['avatar'] : '',
+ 'AUTHOR_JOINED' => $user->format_date($user_info['user_regdate']),
+ 'AUTHOR_POSTS' => (int) $user_info['user_posts'],
+ 'AUTHOR_FROM' => (!empty($user_info['user_from'])) ? $user_info['user_from'] : '',
+
+ 'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : ((isset($user_info['online']) && $user_info['online']) ? $user->img('icon_user_online', $user->lang['ONLINE']) : $user->img('icon_user_offline', $user->lang['OFFLINE'])),
+ 'S_ONLINE' => (!$config['load_onlinetrack']) ? false : ((isset($user_info['online']) && $user_info['online']) ? true : false),
+ 'DELETE_IMG' => $user->img('icon_post_delete', $user->lang['DELETE_MESSAGE']),
+ 'INFO_IMG' => $user->img('icon_post_info', $user->lang['VIEW_PM_INFO']),
+ 'PROFILE_IMG' => $user->img('icon_user_profile', $user->lang['READ_PROFILE']),
+ 'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['SEND_EMAIL']),
+ 'QUOTE_IMG' => $user->img('icon_post_quote', $user->lang['POST_QUOTE_PM']),
+ 'REPLY_IMG' => $user->img('button_pm_reply', $user->lang['POST_REPLY_PM']),
+ 'REPORT_IMG' => $user->img('icon_post_report', 'REPORT_PM'),
+ 'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['POST_EDIT_PM']),
+ 'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['PM']),
+
+ 'SENT_DATE' => ($view == 'print') ? $user->format_date($message_row['message_time'], false, true) : $user->format_date($message_row['message_time']),
+ 'SUBJECT' => $message_row['message_subject'],
+ 'MESSAGE' => $message,
+ 'SIGNATURE' => ($message_row['enable_sig']) ? $signature : '',
+ 'EDITED_MESSAGE' => $l_edited_by,
+ 'MESSAGE_ID' => $message_row['msg_id'],
+
+ 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $author_id) : '',
+ 'U_WWW' => (!empty($user_info['user_website'])) ? $user_info['user_website'] : '',
+ 'U_ICQ' => ($user_info['user_icq']) ? 'http://www.icq.com/people/webmsg.php?to=' . urlencode($user_info['user_icq']) : '',
+ 'U_AIM' => ($user_info['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=aim&amp;u=' . $author_id) : '',
+ 'U_YIM' => ($user_info['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($user_info['user_yim']) . '&amp;.src=pg' : '',
+ 'U_MSN' => ($user_info['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=msnm&amp;u=' . $author_id) : '',
+ 'U_JABBER' => ($user_info['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=jabber&amp;u=' . $author_id) : '',
+
+ 'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&amp;mode=compose&amp;action=delete&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
+ 'U_EMAIL' => $user_info['email'],
+ 'U_REPORT' => ($config['allow_pm_report']) ? append_sid("{$phpbb_root_path}report.$phpEx", "pm=" . $message_row['msg_id']) : '',
+ 'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&amp;mode=compose&amp;action=quote&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
+ 'U_EDIT' => (($message_row['message_time'] > time() - ($config['pm_edit_time'] * 60) || !$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit')) ? "$url&amp;mode=compose&amp;action=edit&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
+ 'U_POST_REPLY_PM' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
+ 'U_POST_REPLY_ALL' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;reply_to_all=1&amp;p=" . $message_row['msg_id'] : '',
+ 'U_PREVIOUS_PM' => "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=previous",
+ 'U_NEXT_PM' => "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=next",
+
+ 'U_PM_ACTION' => $url . '&amp;mode=compose&amp;f=' . $folder_id . '&amp;p=' . $message_row['msg_id'],
+
+ 'S_HAS_ATTACHMENTS' => (sizeof($attachments)) ? true : false,
+ 'S_DISPLAY_NOTICE' => $display_notice && $message_row['message_attachment'],
+ 'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false,
+ 'S_SPECIAL_FOLDER' => in_array($folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)),
+ 'S_PM_RECIPIENTS' => $num_recipients,
+
+ 'U_PRINT_PM' => ($config['print_pm'] && $auth->acl_get('u_pm_printpm')) ? "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=print" : '',
+ 'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_sendpm') && $auth->acl_get('u_pm_forward')) ? "$url&amp;mode=compose&amp;action=forward&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '')
+ );
+
+ // Display not already displayed Attachments for this post, we already parsed them. ;)
+ if (isset($attachments) && sizeof($attachments))
+ {
+ foreach ($attachments as $attachment)
+ {
+ $template->assign_block_vars('attachment', array(
+ 'DISPLAY_ATTACHMENT' => $attachment)
+ );
+ }
+ }
+
+ if (!isset($_REQUEST['view']) || $_REQUEST['view'] != 'print')
+ {
+ // Message History
+ if (message_history($msg_id, $user->data['user_id'], $message_row, $folder))
+ {
+ $template->assign_var('S_DISPLAY_HISTORY', true);
+ }
+ }
+}
+
+/**
+* Get user information (only for message display)
+*/
+function get_user_information($user_id, $user_row)
+{
+ global $db, $auth, $user, $cache;
+ global $phpbb_root_path, $phpEx, $config;
+
+ if (!$user_id)
+ {
+ return array();
+ }
+
+ if (empty($user_row))
+ {
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . (int) $user_id;
+ $result = $db->sql_query($sql);
+ $user_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+
+ // Some standard values
+ $user_row['online'] = false;
+ $user_row['rank_title'] = $user_row['rank_image'] = $user_row['rank_image_src'] = $user_row['email'] = '';
+
+ // Generate online information for user
+ if ($config['load_onlinetrack'])
+ {
+ $sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
+ FROM ' . SESSIONS_TABLE . "
+ WHERE session_user_id = $user_id
+ GROUP BY session_user_id";
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $update_time = $config['load_online_time'] * 60;
+ if ($row)
+ {
+ $user_row['online'] = (time() - $update_time < $row['online_time'] && ($row['viewonline'] || $auth->acl_get('u_viewonline'))) ? true : false;
+ }
+ }
+
+ if (!function_exists('get_user_avatar'))
+ {
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ }
+
+ $user_row['avatar'] = ($user->optionget('viewavatars')) ? get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']) : '';
+
+ get_user_rank($user_row['user_rank'], $user_row['user_posts'], $user_row['rank_title'], $user_row['rank_image'], $user_row['rank_image_src']);
+
+ if (!empty($user_row['user_allow_viewemail']) || $auth->acl_get('a_email'))
+ {
+ $user_row['email'] = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=email&amp;u=$user_id") : ((($config['board_hide_emails'] && !$auth->acl_get('a_email')) || empty($user_row['user_email'])) ? '' : 'mailto:' . $user_row['user_email']);
+ }
+
+ return $user_row;
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
new file mode 100644
index 0000000000..cc8565e69d
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -0,0 +1,357 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* ucp_prefs
+* Changing user preferences
+* @package ucp
+*/
+class ucp_prefs
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
+
+ $submit = (isset($_POST['submit'])) ? true : false;
+ $error = $data = array();
+ $s_hidden_fields = '';
+
+ switch ($mode)
+ {
+ case 'personal':
+ add_form_key('ucp_prefs_personal');
+ $data = array(
+ 'notifymethod' => request_var('notifymethod', $user->data['user_notify_type']),
+ 'dateformat' => request_var('dateformat', $user->data['user_dateformat'], true),
+ 'lang' => basename(request_var('lang', $user->data['user_lang'])),
+ 'style' => request_var('style', (int) $user->data['user_style']),
+ 'tz' => request_var('tz', (float) $user->data['user_timezone']),
+
+ 'dst' => request_var('dst', (bool) $user->data['user_dst']),
+ 'viewemail' => request_var('viewemail', (bool) $user->data['user_allow_viewemail']),
+ 'massemail' => request_var('massemail', (bool) $user->data['user_allow_massemail']),
+ 'hideonline' => request_var('hideonline', (bool) !$user->data['user_allow_viewonline']),
+ 'notifypm' => request_var('notifypm', (bool) $user->data['user_notify_pm']),
+ 'popuppm' => request_var('popuppm', (bool) $user->optionget('popuppm')),
+ 'allowpm' => request_var('allowpm', (bool) $user->data['user_allow_pm']),
+ );
+
+ if ($data['notifymethod'] == NOTIFY_IM && (!$config['jab_enable'] || !$user->data['user_jabber'] || !@extension_loaded('xml')))
+ {
+ // Jabber isnt enabled, or no jabber field filled in. Update the users table to be sure its correct.
+ $data['notifymethod'] = NOTIFY_BOTH;
+ }
+
+ if ($submit)
+ {
+ $data['style'] = ($config['override_user_style']) ? $config['default_style'] : $data['style'];
+
+ $error = validate_data($data, array(
+ 'dateformat' => array('string', false, 1, 30),
+ 'lang' => array('match', false, '#^[a-z0-9_\-]{2,}$#i'),
+ 'tz' => array('num', false, -14, 14),
+ ));
+
+ if (!check_form_key('ucp_prefs_personal'))
+ {
+ $error[] = 'FORM_INVALID';
+ }
+
+ if (!sizeof($error))
+ {
+ $user->optionset('popuppm', $data['popuppm']);
+
+ $sql_ary = array(
+ 'user_allow_pm' => $data['allowpm'],
+ 'user_allow_viewemail' => $data['viewemail'],
+ 'user_allow_massemail' => $data['massemail'],
+ 'user_allow_viewonline' => ($auth->acl_get('u_hideonline')) ? !$data['hideonline'] : $user->data['user_allow_viewonline'],
+ 'user_notify_type' => $data['notifymethod'],
+ 'user_notify_pm' => $data['notifypm'],
+ 'user_options' => $user->data['user_options'],
+
+ 'user_dst' => $data['dst'],
+ 'user_dateformat' => $data['dateformat'],
+ 'user_lang' => $data['lang'],
+ 'user_timezone' => $data['tz'],
+ 'user_style' => $data['style'],
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+
+ meta_refresh(3, $this->u_action);
+ $message = $user->lang['PREFERENCES_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
+ trigger_error($message);
+ }
+
+ // Replace "error" strings with their real, localised form
+ $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ }
+
+ $dateformat_options = '';
+
+ foreach ($user->lang['dateformats'] as $format => $null)
+ {
+ $dateformat_options .= '<option value="' . $format . '"' . (($format == $data['dateformat']) ? ' selected="selected"' : '') . '>';
+ $dateformat_options .= $user->format_date(time(), $format, false) . ((strpos($format, '|') !== false) ? $user->lang['VARIANT_DATE_SEPARATOR'] . $user->format_date(time(), $format, true) : '');
+ $dateformat_options .= '</option>';
+ }
+
+ $s_custom = false;
+
+ $dateformat_options .= '<option value="custom"';
+ if (!isset($user->lang['dateformats'][$data['dateformat']]))
+ {
+ $dateformat_options .= ' selected="selected"';
+ $s_custom = true;
+ }
+ $dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
+
+ $template->assign_vars(array(
+ 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
+
+ 'S_NOTIFY_EMAIL' => ($data['notifymethod'] == NOTIFY_EMAIL) ? true : false,
+ 'S_NOTIFY_IM' => ($data['notifymethod'] == NOTIFY_IM) ? true : false,
+ 'S_NOTIFY_BOTH' => ($data['notifymethod'] == NOTIFY_BOTH) ? true : false,
+ 'S_VIEW_EMAIL' => $data['viewemail'],
+ 'S_MASS_EMAIL' => $data['massemail'],
+ 'S_ALLOW_PM' => $data['allowpm'],
+ 'S_HIDE_ONLINE' => $data['hideonline'],
+ 'S_NOTIFY_PM' => $data['notifypm'],
+ 'S_POPUP_PM' => $data['popuppm'],
+ 'S_DST' => $data['dst'],
+
+ 'DATE_FORMAT' => $data['dateformat'],
+ 'A_DATE_FORMAT' => addslashes($data['dateformat']),
+ 'S_DATEFORMAT_OPTIONS' => $dateformat_options,
+ 'S_CUSTOM_DATEFORMAT' => $s_custom,
+ 'DEFAULT_DATEFORMAT' => $config['default_dateformat'],
+ 'A_DEFAULT_DATEFORMAT' => addslashes($config['default_dateformat']),
+
+ 'S_LANG_OPTIONS' => language_select($data['lang']),
+ 'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['style']),
+ 'S_TZ_OPTIONS' => tz_select($data['tz'], true),
+ 'S_CAN_HIDE_ONLINE' => ($auth->acl_get('u_hideonline')) ? true : false,
+ 'S_SELECT_NOTIFY' => ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')) ? true : false)
+ );
+
+ break;
+
+ case 'view':
+
+ add_form_key('ucp_prefs_view');
+
+ $data = array(
+ 'topic_sk' => request_var('topic_sk', (!empty($user->data['user_topic_sortby_type'])) ? $user->data['user_topic_sortby_type'] : 't'),
+ 'topic_sd' => request_var('topic_sd', (!empty($user->data['user_topic_sortby_dir'])) ? $user->data['user_topic_sortby_dir'] : 'd'),
+ 'topic_st' => request_var('topic_st', (!empty($user->data['user_topic_show_days'])) ? $user->data['user_topic_show_days'] : 0),
+
+ 'post_sk' => request_var('post_sk', (!empty($user->data['user_post_sortby_type'])) ? $user->data['user_post_sortby_type'] : 't'),
+ 'post_sd' => request_var('post_sd', (!empty($user->data['user_post_sortby_dir'])) ? $user->data['user_post_sortby_dir'] : 'a'),
+ 'post_st' => request_var('post_st', (!empty($user->data['user_post_show_days'])) ? $user->data['user_post_show_days'] : 0),
+
+ 'images' => request_var('images', (bool) $user->optionget('viewimg')),
+ 'flash' => request_var('flash', (bool) $user->optionget('viewflash')),
+ 'smilies' => request_var('smilies', (bool) $user->optionget('viewsmilies')),
+ 'sigs' => request_var('sigs', (bool) $user->optionget('viewsigs')),
+ 'avatars' => request_var('avatars', (bool) $user->optionget('viewavatars')),
+ 'wordcensor' => request_var('wordcensor', (bool) $user->optionget('viewcensors')),
+ );
+
+ if ($submit)
+ {
+ $error = validate_data($data, array(
+ 'topic_sk' => array('string', false, 1, 1),
+ 'topic_sd' => array('string', false, 1, 1),
+ 'post_sk' => array('string', false, 1, 1),
+ 'post_sd' => array('string', false, 1, 1),
+ ));
+
+ if (!check_form_key('ucp_prefs_view'))
+ {
+ $error[] = 'FORM_INVALID';
+ }
+
+ if (!sizeof($error))
+ {
+ $user->optionset('viewimg', $data['images']);
+ $user->optionset('viewflash', $data['flash']);
+ $user->optionset('viewsmilies', $data['smilies']);
+ $user->optionset('viewsigs', $data['sigs']);
+ $user->optionset('viewavatars', $data['avatars']);
+
+ if ($auth->acl_get('u_chgcensors'))
+ {
+ $user->optionset('viewcensors', $data['wordcensor']);
+ }
+
+ $sql_ary = array(
+ 'user_options' => $user->data['user_options'],
+ 'user_topic_sortby_type' => $data['topic_sk'],
+ 'user_post_sortby_type' => $data['post_sk'],
+ 'user_topic_sortby_dir' => $data['topic_sd'],
+ 'user_post_sortby_dir' => $data['post_sd'],
+
+ 'user_topic_show_days' => $data['topic_st'],
+ 'user_post_show_days' => $data['post_st'],
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+
+ meta_refresh(3, $this->u_action);
+ $message = $user->lang['PREFERENCES_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
+ trigger_error($message);
+ }
+
+ // Replace "error" strings with their real, localised form
+ $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ }
+
+ $sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
+
+ // Topic ordering options
+ $limit_topic_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+
+ $sort_by_topic_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']);
+ $sort_by_topic_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views');
+
+ // Post ordering options
+ $limit_post_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+
+ $sort_by_post_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']);
+ $sort_by_post_sql = array('a' => 'u.username_clean', 't' => 'p.post_id', 's' => 'p.post_subject');
+
+ $_options = array('topic', 'post');
+ foreach ($_options as $sort_option)
+ {
+ ${'s_limit_' . $sort_option . '_days'} = '<select name="' . $sort_option . '_st">';
+ foreach (${'limit_' . $sort_option . '_days'} as $day => $text)
+ {
+ $selected = ($data[$sort_option . '_st'] == $day) ? ' selected="selected"' : '';
+ ${'s_limit_' . $sort_option . '_days'} .= '<option value="' . $day . '"' . $selected . '>' . $text . '</option>';
+ }
+ ${'s_limit_' . $sort_option . '_days'} .= '</select>';
+
+ ${'s_sort_' . $sort_option . '_key'} = '<select name="' . $sort_option . '_sk">';
+ foreach (${'sort_by_' . $sort_option . '_text'} as $key => $text)
+ {
+ $selected = ($data[$sort_option . '_sk'] == $key) ? ' selected="selected"' : '';
+ ${'s_sort_' . $sort_option . '_key'} .= '<option value="' . $key . '"' . $selected . '>' . $text . '</option>';
+ }
+ ${'s_sort_' . $sort_option . '_key'} .= '</select>';
+
+ ${'s_sort_' . $sort_option . '_dir'} = '<select name="' . $sort_option . '_sd">';
+ foreach ($sort_dir_text as $key => $value)
+ {
+ $selected = ($data[$sort_option . '_sd'] == $key) ? ' selected="selected"' : '';
+ ${'s_sort_' . $sort_option . '_dir'} .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
+ }
+ ${'s_sort_' . $sort_option . '_dir'} .= '</select>';
+ }
+
+ $template->assign_vars(array(
+ 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
+
+ 'S_IMAGES' => $data['images'],
+ 'S_FLASH' => $data['flash'],
+ 'S_SMILIES' => $data['smilies'],
+ 'S_SIGS' => $data['sigs'],
+ 'S_AVATARS' => $data['avatars'],
+ 'S_DISABLE_CENSORS' => $data['wordcensor'],
+
+ 'S_CHANGE_CENSORS' => ($auth->acl_get('u_chgcensors') && $config['allow_nocensors']) ? true : false,
+
+ 'S_TOPIC_SORT_DAYS' => $s_limit_topic_days,
+ 'S_TOPIC_SORT_KEY' => $s_sort_topic_key,
+ 'S_TOPIC_SORT_DIR' => $s_sort_topic_dir,
+ 'S_POST_SORT_DAYS' => $s_limit_post_days,
+ 'S_POST_SORT_KEY' => $s_sort_post_key,
+ 'S_POST_SORT_DIR' => $s_sort_post_dir)
+ );
+
+ break;
+
+ case 'post':
+
+ $data = array(
+ 'bbcode' => request_var('bbcode', $user->optionget('bbcode')),
+ 'smilies' => request_var('smilies', $user->optionget('smilies')),
+ 'sig' => request_var('sig', $user->optionget('attachsig')),
+ 'notify' => request_var('notify', (bool) $user->data['user_notify']),
+ );
+ add_form_key('ucp_prefs_post');
+
+ if ($submit)
+ {
+ if (check_form_key('ucp_prefs_post'))
+ {
+ $user->optionset('bbcode', $data['bbcode']);
+ $user->optionset('smilies', $data['smilies']);
+ $user->optionset('attachsig', $data['sig']);
+
+ $sql_ary = array(
+ 'user_options' => $user->data['user_options'],
+ 'user_notify' => $data['notify'],
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+
+ $msg = $user->lang['PREFERENCES_UPDATED'];
+ }
+ else
+ {
+ $msg = $user->lang['FORM_INVALID'];
+ }
+ meta_refresh(3, $this->u_action);
+ $message = $msg . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
+ trigger_error($message);
+ }
+
+ $template->assign_vars(array(
+ 'S_BBCODE' => $data['bbcode'],
+ 'S_SMILIES' => $data['smilies'],
+ 'S_SIG' => $data['sig'],
+ 'S_NOTIFY' => $data['notify'])
+ );
+ break;
+ }
+
+ $template->assign_vars(array(
+ 'L_TITLE' => $user->lang['UCP_PREFS_' . strtoupper($mode)],
+
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields,
+ 'S_UCP_ACTION' => $this->u_action)
+ );
+
+ $this->tpl_name = 'ucp_prefs_' . $mode;
+ $this->page_title = 'UCP_PREFS_' . strtoupper($mode);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
new file mode 100644
index 0000000000..e24acd89fc
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -0,0 +1,649 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* ucp_profile
+* Changing profile settings
+*
+* @todo what about pertaining user_sig_options?
+* @package ucp
+*/
+class ucp_profile
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
+
+ $user->add_lang('posting');
+
+ $preview = (!empty($_POST['preview'])) ? true : false;
+ $submit = (!empty($_POST['submit'])) ? true : false;
+ $delete = (!empty($_POST['delete'])) ? true : false;
+ $error = $data = array();
+ $s_hidden_fields = '';
+
+ switch ($mode)
+ {
+ case 'reg_details':
+
+ $data = array(
+ 'username' => utf8_normalize_nfc(request_var('username', $user->data['username'], true)),
+ 'email' => strtolower(request_var('email', $user->data['user_email'])),
+ 'email_confirm' => strtolower(request_var('email_confirm', '')),
+ 'new_password' => request_var('new_password', '', true),
+ 'cur_password' => request_var('cur_password', '', true),
+ 'password_confirm' => request_var('password_confirm', '', true),
+ );
+
+ add_form_key('ucp_reg_details');
+
+ if ($submit)
+ {
+ // Do not check cur_password, it is the old one.
+ $check_ary = array(
+ 'new_password' => array(
+ array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
+ array('password')),
+ 'password_confirm' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
+ 'email' => array(
+ array('string', false, 6, 60),
+ array('email')),
+ 'email_confirm' => array('string', true, 6, 60),
+ );
+
+ if ($auth->acl_get('u_chgname') && $config['allow_namechange'])
+ {
+ $check_ary['username'] = array(
+ array('string', false, $config['min_name_chars'], $config['max_name_chars']),
+ array('username'),
+ );
+ }
+
+ $error = validate_data($data, $check_ary);
+
+ if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && $data['password_confirm'] != $data['new_password'])
+ {
+ $error[] = 'NEW_PASSWORD_ERROR';
+ }
+
+ if (($data['new_password'] || ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email']) || ($data['username'] != $user->data['username'] && $auth->acl_get('u_chgname') && $config['allow_namechange'])) && !phpbb_check_hash($data['cur_password'], $user->data['user_password']))
+ {
+ $error[] = 'CUR_PASSWORD_ERROR';
+ }
+
+ // Only check the new password against the previous password if there have been no errors
+ if (!sizeof($error) && $auth->acl_get('u_chgpasswd') && $data['new_password'] && phpbb_check_hash($data['new_password'], $user->data['user_password']))
+ {
+ $error[] = 'SAME_PASSWORD_ERROR';
+ }
+
+ if ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email'] && $data['email_confirm'] != $data['email'])
+ {
+ $error[] = 'NEW_EMAIL_ERROR';
+ }
+
+ if (!check_form_key('ucp_reg_details'))
+ {
+ $error[] = 'FORM_INVALID';
+ }
+
+ if (!sizeof($error))
+ {
+ $sql_ary = array(
+ 'username' => ($auth->acl_get('u_chgname') && $config['allow_namechange']) ? $data['username'] : $user->data['username'],
+ 'username_clean' => ($auth->acl_get('u_chgname') && $config['allow_namechange']) ? utf8_clean_string($data['username']) : $user->data['username_clean'],
+ 'user_email' => ($auth->acl_get('u_chgemail')) ? $data['email'] : $user->data['user_email'],
+ 'user_email_hash' => ($auth->acl_get('u_chgemail')) ? phpbb_email_hash($data['email']) : $user->data['user_email_hash'],
+ 'user_password' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? phpbb_hash($data['new_password']) : $user->data['user_password'],
+ 'user_passchg' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? time() : 0,
+ );
+
+ if ($auth->acl_get('u_chgname') && $config['allow_namechange'] && $data['username'] != $user->data['username'])
+ {
+ add_log('user', $user->data['user_id'], 'LOG_USER_UPDATE_NAME', $user->data['username'], $data['username']);
+ }
+
+ if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && !phpbb_check_hash($data['new_password'], $user->data['user_password']))
+ {
+ $user->reset_login_keys();
+ add_log('user', $user->data['user_id'], 'LOG_USER_NEW_PASSWORD', $data['username']);
+ }
+
+ if ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email'])
+ {
+ add_log('user', $user->data['user_id'], 'LOG_USER_UPDATE_EMAIL', $data['username'], $user->data['user_email'], $data['email']);
+ }
+
+ $message = 'PROFILE_UPDATED';
+
+ if ($config['email_enable'] && $data['email'] != $user->data['user_email'] && $user->data['user_type'] != USER_FOUNDER && ($config['require_activation'] == USER_ACTIVATION_SELF || $config['require_activation'] == USER_ACTIVATION_ADMIN))
+ {
+ $message = ($config['require_activation'] == USER_ACTIVATION_SELF) ? 'ACCOUNT_EMAIL_CHANGED' : 'ACCOUNT_EMAIL_CHANGED_ADMIN';
+
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+
+ $server_url = generate_board_url();
+
+ $user_actkey = gen_rand_string(10);
+ $key_len = 54 - (strlen($server_url));
+ $key_len = ($key_len > 6) ? $key_len : 6;
+ $user_actkey = substr($user_actkey, 0, $key_len);
+
+ $messenger = new messenger(false);
+
+ $template_file = ($config['require_activation'] == USER_ACTIVATION_ADMIN) ? 'user_activate_inactive' : 'user_activate';
+ $messenger->template($template_file, $user->data['user_lang']);
+
+ $messenger->to($data['email'], $data['username']);
+
+ $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
+ $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
+ $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
+ $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
+
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($data['username']),
+ 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user->data['user_id']}&k=$user_actkey")
+ );
+
+ $messenger->send(NOTIFY_EMAIL);
+
+ if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
+ {
+ // Grab an array of user_id's with a_user permissions ... these users can activate a user
+ $admin_ary = $auth->acl_get_list(false, 'a_user', false);
+ $admin_ary = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array();
+
+ // Also include founders
+ $where_sql = ' WHERE user_type = ' . USER_FOUNDER;
+
+ if (sizeof($admin_ary))
+ {
+ $where_sql .= ' OR ' . $db->sql_in_set('user_id', $admin_ary);
+ }
+
+ $sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
+ FROM ' . USERS_TABLE . ' ' .
+ $where_sql;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $messenger->template('admin_activate', $row['user_lang']);
+ $messenger->to($row['user_email'], $row['username']);
+ $messenger->im($row['user_jabber'], $row['username']);
+
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($data['username']),
+ 'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u={$user->data['user_id']}",
+ 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user->data['user_id']}&k=$user_actkey")
+ );
+
+ $messenger->send($row['user_notify_type']);
+ }
+ $db->sql_freeresult($result);
+ }
+
+ user_active_flip('deactivate', $user->data['user_id'], INACTIVE_PROFILE);
+
+ // Because we want the profile to be reactivated we set user_newpasswd to empty (else the reactivation will fail)
+ $sql_ary['user_actkey'] = $user_actkey;
+ $sql_ary['user_newpasswd'] = '';
+ }
+
+ if (sizeof($sql_ary))
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+ }
+
+ // Need to update config, forum, topic, posting, messages, etc.
+ if ($data['username'] != $user->data['username'] && $auth->acl_get('u_chgname') && $config['allow_namechange'])
+ {
+ user_update_name($user->data['username'], $data['username']);
+ }
+
+ // Now, we can remove the user completely (kill the session) - NOT BEFORE!!!
+ if (!empty($sql_ary['user_actkey']))
+ {
+ meta_refresh(5, append_sid($phpbb_root_path . 'index.' . $phpEx));
+ $message = $user->lang[$message] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid($phpbb_root_path . 'index.' . $phpEx) . '">', '</a>');
+
+ // Because the user gets deactivated we log him out too, killing his session
+ $user->session_kill();
+ }
+ else
+ {
+ meta_refresh(3, $this->u_action);
+ $message = $user->lang[$message] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
+ }
+
+ trigger_error($message);
+ }
+
+ // Replace "error" strings with their real, localised form
+ $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ }
+
+ $template->assign_vars(array(
+ 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
+
+ 'USERNAME' => $data['username'],
+ 'EMAIL' => $data['email'],
+ 'PASSWORD_CONFIRM' => $data['password_confirm'],
+ 'NEW_PASSWORD' => $data['new_password'],
+ 'CUR_PASSWORD' => '',
+
+ 'L_USERNAME_EXPLAIN' => sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
+ 'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
+
+ 'S_FORCE_PASSWORD' => ($auth->acl_get('u_chgpasswd') && $config['chg_passforce'] && $user->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400)) ? true : false,
+ 'S_CHANGE_USERNAME' => ($config['allow_namechange'] && $auth->acl_get('u_chgname')) ? true : false,
+ 'S_CHANGE_EMAIL' => ($auth->acl_get('u_chgemail')) ? true : false,
+ 'S_CHANGE_PASSWORD' => ($auth->acl_get('u_chgpasswd')) ? true : false)
+ );
+ break;
+
+ case 'profile_info':
+
+ include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
+
+ $cp = new custom_profile();
+
+ $cp_data = $cp_error = array();
+
+ $data = array(
+ 'icq' => request_var('icq', $user->data['user_icq']),
+ 'aim' => request_var('aim', $user->data['user_aim']),
+ 'msn' => request_var('msn', $user->data['user_msnm']),
+ 'yim' => request_var('yim', $user->data['user_yim']),
+ 'jabber' => utf8_normalize_nfc(request_var('jabber', $user->data['user_jabber'], true)),
+ 'website' => request_var('website', $user->data['user_website']),
+ 'location' => utf8_normalize_nfc(request_var('location', $user->data['user_from'], true)),
+ 'occupation' => utf8_normalize_nfc(request_var('occupation', $user->data['user_occ'], true)),
+ 'interests' => utf8_normalize_nfc(request_var('interests', $user->data['user_interests'], true)),
+ );
+
+ if ($config['allow_birthdays'])
+ {
+ $data['bday_day'] = $data['bday_month'] = $data['bday_year'] = 0;
+
+ if ($user->data['user_birthday'])
+ {
+ list($data['bday_day'], $data['bday_month'], $data['bday_year']) = explode('-', $user->data['user_birthday']);
+ }
+
+ $data['bday_day'] = request_var('bday_day', $data['bday_day']);
+ $data['bday_month'] = request_var('bday_month', $data['bday_month']);
+ $data['bday_year'] = request_var('bday_year', $data['bday_year']);
+ $data['user_birthday'] = sprintf('%2d-%2d-%4d', $data['bday_day'], $data['bday_month'], $data['bday_year']);
+ }
+
+ add_form_key('ucp_profile_info');
+
+ if ($submit)
+ {
+ $validate_array = array(
+ 'icq' => array(
+ array('string', true, 3, 15),
+ array('match', true, '#^[0-9]+$#i')),
+ 'aim' => array('string', true, 3, 255),
+ 'msn' => array('string', true, 5, 255),
+ 'jabber' => array(
+ array('string', true, 5, 255),
+ array('jabber')),
+ 'yim' => array('string', true, 5, 255),
+ 'website' => array(
+ array('string', true, 12, 255),
+ array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
+ 'location' => array('string', true, 2, 100),
+ 'occupation' => array('string', true, 2, 500),
+ 'interests' => array('string', true, 2, 500),
+ );
+
+ if ($config['allow_birthdays'])
+ {
+ $validate_array = array_merge($validate_array, array(
+ 'bday_day' => array('num', true, 1, 31),
+ 'bday_month' => array('num', true, 1, 12),
+ 'bday_year' => array('num', true, 1901, gmdate('Y', time()) + 50),
+ 'user_birthday' => array('date', true),
+ ));
+ }
+
+ $error = validate_data($data, $validate_array);
+
+ // validate custom profile fields
+ $cp->submit_cp_field('profile', $user->get_iso_lang_id(), $cp_data, $cp_error);
+
+ if (sizeof($cp_error))
+ {
+ $error = array_merge($error, $cp_error);
+ }
+
+ if (!check_form_key('ucp_profile_info'))
+ {
+ $error[] = 'FORM_INVALID';
+ }
+
+ if (!sizeof($error))
+ {
+ $data['notify'] = $user->data['user_notify_type'];
+
+ if ($data['notify'] == NOTIFY_IM && (!$config['jab_enable'] || !$data['jabber'] || !@extension_loaded('xml')))
+ {
+ // User has not filled in a jabber address (Or one of the modules is disabled or jabber is disabled)
+ // Disable notify by Jabber now for this user.
+ $data['notify'] = NOTIFY_EMAIL;
+ }
+
+ $sql_ary = array(
+ 'user_icq' => $data['icq'],
+ 'user_aim' => $data['aim'],
+ 'user_msnm' => $data['msn'],
+ 'user_yim' => $data['yim'],
+ 'user_jabber' => $data['jabber'],
+ 'user_website' => $data['website'],
+ 'user_from' => $data['location'],
+ 'user_occ' => $data['occupation'],
+ 'user_interests'=> $data['interests'],
+ 'user_notify_type' => $data['notify'],
+ );
+
+ if ($config['allow_birthdays'])
+ {
+ $sql_ary['user_birthday'] = $data['user_birthday'];
+ }
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+
+ // Update Custom Fields
+ $cp->update_profile_field_data($user->data['user_id'], $cp_data);
+
+ meta_refresh(3, $this->u_action);
+ $message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
+ trigger_error($message);
+ }
+
+ // Replace "error" strings with their real, localised form
+ $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ }
+
+ if ($config['allow_birthdays'])
+ {
+ $s_birthday_day_options = '<option value="0"' . ((!$data['bday_day']) ? ' selected="selected"' : '') . '>--</option>';
+ for ($i = 1; $i < 32; $i++)
+ {
+ $selected = ($i == $data['bday_day']) ? ' selected="selected"' : '';
+ $s_birthday_day_options .= "<option value=\"$i\"$selected>$i</option>";
+ }
+
+ $s_birthday_month_options = '<option value="0"' . ((!$data['bday_month']) ? ' selected="selected"' : '') . '>--</option>';
+ for ($i = 1; $i < 13; $i++)
+ {
+ $selected = ($i == $data['bday_month']) ? ' selected="selected"' : '';
+ $s_birthday_month_options .= "<option value=\"$i\"$selected>$i</option>";
+ }
+ $s_birthday_year_options = '';
+
+ $now = getdate();
+ $s_birthday_year_options = '<option value="0"' . ((!$data['bday_year']) ? ' selected="selected"' : '') . '>--</option>';
+ for ($i = $now['year'] - 100; $i <= $now['year']; $i++)
+ {
+ $selected = ($i == $data['bday_year']) ? ' selected="selected"' : '';
+ $s_birthday_year_options .= "<option value=\"$i\"$selected>$i</option>";
+ }
+ unset($now);
+
+ $template->assign_vars(array(
+ 'S_BIRTHDAY_DAY_OPTIONS' => $s_birthday_day_options,
+ 'S_BIRTHDAY_MONTH_OPTIONS' => $s_birthday_month_options,
+ 'S_BIRTHDAY_YEAR_OPTIONS' => $s_birthday_year_options,
+ 'S_BIRTHDAYS_ENABLED' => true,
+ ));
+ }
+
+ $template->assign_vars(array(
+ 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
+
+ 'ICQ' => $data['icq'],
+ 'YIM' => $data['yim'],
+ 'AIM' => $data['aim'],
+ 'MSN' => $data['msn'],
+ 'JABBER' => $data['jabber'],
+ 'WEBSITE' => $data['website'],
+ 'LOCATION' => $data['location'],
+ 'OCCUPATION'=> $data['occupation'],
+ 'INTERESTS' => $data['interests'],
+ ));
+
+ // Get additional profile fields and assign them to the template block var 'profile_fields'
+ $user->get_profile_fields($user->data['user_id']);
+
+ $cp->generate_profile_fields('profile', $user->get_iso_lang_id());
+
+ break;
+
+ case 'signature':
+
+ if (!$auth->acl_get('u_sig'))
+ {
+ trigger_error('NO_AUTH_SIGNATURE');
+ }
+
+ include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+
+ $enable_bbcode = ($config['allow_sig_bbcode']) ? (bool) $user->optionget('sig_bbcode') : false;
+ $enable_smilies = ($config['allow_sig_smilies']) ? (bool) $user->optionget('sig_smilies') : false;
+ $enable_urls = ($config['allow_sig_links']) ? (bool) $user->optionget('sig_links') : false;
+
+ $signature = utf8_normalize_nfc(request_var('signature', (string) $user->data['user_sig'], true));
+
+ add_form_key('ucp_sig');
+
+ if ($submit || $preview)
+ {
+ include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
+
+ $enable_bbcode = ($config['allow_sig_bbcode']) ? ((request_var('disable_bbcode', false)) ? false : true) : false;
+ $enable_smilies = ($config['allow_sig_smilies']) ? ((request_var('disable_smilies', false)) ? false : true) : false;
+ $enable_urls = ($config['allow_sig_links']) ? ((request_var('disable_magic_url', false)) ? false : true) : false;
+
+ if (!sizeof($error))
+ {
+ $message_parser = new parse_message($signature);
+
+ // Allowing Quote BBCode
+ $message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig');
+
+ if (sizeof($message_parser->warn_msg))
+ {
+ $error[] = implode('<br />', $message_parser->warn_msg);
+ }
+
+ if (!check_form_key('ucp_sig'))
+ {
+ $error[] = 'FORM_INVALID';
+ }
+
+ if (!sizeof($error) && $submit)
+ {
+ $user->optionset('sig_bbcode', $enable_bbcode);
+ $user->optionset('sig_smilies', $enable_smilies);
+ $user->optionset('sig_links', $enable_urls);
+
+ $sql_ary = array(
+ 'user_sig' => (string) $message_parser->message,
+ 'user_options' => $user->data['user_options'],
+ 'user_sig_bbcode_uid' => (string) $message_parser->bbcode_uid,
+ 'user_sig_bbcode_bitfield' => $message_parser->bbcode_bitfield
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+
+ $message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
+ trigger_error($message);
+ }
+ }
+
+ // Replace "error" strings with their real, localised form
+ $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ }
+
+ $signature_preview = '';
+ if ($preview)
+ {
+ // Now parse it for displaying
+ $signature_preview = $message_parser->format_display($enable_bbcode, $enable_urls, $enable_smilies, false);
+ unset($message_parser);
+ }
+
+ decode_message($signature, $user->data['user_sig_bbcode_uid']);
+
+ $template->assign_vars(array(
+ 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'SIGNATURE' => $signature,
+ 'SIGNATURE_PREVIEW' => $signature_preview,
+
+ 'S_BBCODE_CHECKED' => (!$enable_bbcode) ? ' checked="checked"' : '',
+ 'S_SMILIES_CHECKED' => (!$enable_smilies) ? ' checked="checked"' : '',
+ 'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? ' checked="checked"' : '',
+
+ 'BBCODE_STATUS' => ($config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>'),
+ 'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
+ 'IMG_STATUS' => ($config['allow_sig_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
+ 'FLASH_STATUS' => ($config['allow_sig_flash']) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
+ 'URL_STATUS' => ($config['allow_sig_links']) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
+ 'MAX_FONT_SIZE' => (int) $config['max_sig_font_size'],
+
+ 'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']),
+
+ 'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
+ 'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],
+ 'S_BBCODE_IMG' => ($config['allow_sig_img']) ? true : false,
+ 'S_BBCODE_FLASH' => ($config['allow_sig_flash']) ? true : false,
+ 'S_LINKS_ALLOWED' => ($config['allow_sig_links']) ? true : false)
+ );
+
+ // Build custom bbcodes array
+ display_custom_bbcodes();
+
+ break;
+
+ case 'avatar':
+
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+
+ $display_gallery = request_var('display_gallery', '0');
+ $avatar_select = basename(request_var('avatar_select', ''));
+ $category = basename(request_var('category', ''));
+
+ $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false;
+
+ add_form_key('ucp_avatar');
+
+ if ($submit)
+ {
+ if (check_form_key('ucp_avatar'))
+ {
+ if (avatar_process_user($error))
+ {
+ meta_refresh(3, $this->u_action);
+ $message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
+ trigger_error($message);
+ }
+ }
+ else
+ {
+ $error[] = 'FORM_INVALID';
+ }
+ // Replace "error" strings with their real, localised form
+ $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ }
+
+ if (!$config['allow_avatar'] && $user->data['user_avatar_type'])
+ {
+ $error[] = $user->lang['AVATAR_NOT_ALLOWED'];
+ }
+ else if ((($user->data['user_avatar_type'] == AVATAR_UPLOAD) && !$config['allow_avatar_upload']) ||
+ (($user->data['user_avatar_type'] == AVATAR_REMOTE) && !$config['allow_avatar_remote']) ||
+ (($user->data['user_avatar_type'] == AVATAR_GALLERY) && !$config['allow_avatar_local']))
+ {
+ $error[] = $user->lang['AVATAR_TYPE_NOT_ALLOWED'];
+ }
+
+ $template->assign_vars(array(
+ 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'AVATAR' => get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height'], 'USER_AVATAR', true),
+ 'AVATAR_SIZE' => $config['avatar_filesize'],
+
+ 'U_GALLERY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=profile&amp;mode=avatar&amp;display_gallery=1'),
+
+ 'S_FORM_ENCTYPE' => ($can_upload && ($config['allow_avatar_upload'] || $config['allow_avatar_remote_upload'])) ? ' enctype="multipart/form-data"' : '',
+
+ 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
+ ));
+
+ if ($config['allow_avatar'] && $display_gallery && $auth->acl_get('u_chgavatar') && $config['allow_avatar_local'])
+ {
+ avatar_gallery($category, $avatar_select, 4);
+ }
+ else if ($config['allow_avatar'])
+ {
+ $avatars_enabled = (($can_upload && ($config['allow_avatar_upload'] || $config['allow_avatar_remote_upload'])) || ($auth->acl_get('u_chgavatar') && ($config['allow_avatar_local'] || $config['allow_avatar_remote']))) ? true : false;
+
+ $template->assign_vars(array(
+ 'AVATAR_WIDTH' => request_var('width', $user->data['user_avatar_width']),
+ 'AVATAR_HEIGHT' => request_var('height', $user->data['user_avatar_height']),
+
+ 'S_AVATARS_ENABLED' => $avatars_enabled,
+ 'S_UPLOAD_AVATAR_FILE' => ($can_upload && $config['allow_avatar_upload']) ? true : false,
+ 'S_UPLOAD_AVATAR_URL' => ($can_upload && $config['allow_avatar_remote_upload']) ? true : false,
+ 'S_LINK_AVATAR' => ($auth->acl_get('u_chgavatar') && $config['allow_avatar_remote']) ? true : false,
+ 'S_DISPLAY_GALLERY' => ($auth->acl_get('u_chgavatar') && $config['allow_avatar_local']) ? true : false)
+ );
+ }
+
+ break;
+ }
+
+ $template->assign_vars(array(
+ 'L_TITLE' => $user->lang['UCP_PROFILE_' . strtoupper($mode)],
+
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields,
+ 'S_UCP_ACTION' => $this->u_action)
+ );
+
+ // Set desired template
+ $this->tpl_name = 'ucp_profile_' . $mode;
+ $this->page_title = 'UCP_PROFILE_' . strtoupper($mode);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
new file mode 100644
index 0000000000..8359c223e0
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -0,0 +1,503 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* ucp_register
+* Board registration
+* @package ucp
+*/
+class ucp_register
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
+
+ //
+ if ($config['require_activation'] == USER_ACTIVATION_DISABLE)
+ {
+ trigger_error('UCP_REGISTER_DISABLE');
+ }
+
+ include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
+
+ $coppa = (isset($_REQUEST['coppa'])) ? ((!empty($_REQUEST['coppa'])) ? 1 : 0) : false;
+ $agreed = (!empty($_POST['agreed'])) ? 1 : 0;
+ $submit = (isset($_POST['submit'])) ? true : false;
+ $change_lang = request_var('change_lang', '');
+ $user_lang = request_var('lang', $user->lang_name);
+
+ if ($agreed)
+ {
+ add_form_key('ucp_register');
+ }
+ else
+ {
+ add_form_key('ucp_register_terms');
+ }
+
+ if ($change_lang || $user_lang != $config['default_lang'])
+ {
+ $use_lang = ($change_lang) ? basename($change_lang) : basename($user_lang);
+
+ if (file_exists($user->lang_path . $use_lang . '/'))
+ {
+ if ($change_lang)
+ {
+ $submit = false;
+
+ // Setting back agreed to let the user view the agreement in his/her language
+ $agreed = (empty($_GET['change_lang'])) ? 0 : $agreed;
+ }
+
+ $user->lang_name = $user_lang = $use_lang;
+ $user->lang = array();
+ $user->data['user_lang'] = $user->lang_name;
+ $user->add_lang(array('common', 'ucp'));
+ }
+ else
+ {
+ $change_lang = '';
+ $user_lang = $user->lang_name;
+ }
+ }
+
+
+ $cp = new custom_profile();
+
+ $error = $cp_data = $cp_error = array();
+
+ if (!$agreed || ($coppa === false && $config['coppa_enable']) || ($coppa && !$config['coppa_enable']))
+ {
+ $add_lang = ($change_lang) ? '&amp;change_lang=' . urlencode($change_lang) : '';
+ $add_coppa = ($coppa !== false) ? '&amp;coppa=' . $coppa : '';
+
+ $s_hidden_fields = array(
+ 'change_lang' => $change_lang,
+ );
+
+ // If we change the language, we want to pass on some more possible parameter.
+ if ($change_lang)
+ {
+ // We do not include the password
+ $s_hidden_fields = array_merge($s_hidden_fields, array(
+ 'username' => utf8_normalize_nfc(request_var('username', '', true)),
+ 'email' => strtolower(request_var('email', '')),
+ 'email_confirm' => strtolower(request_var('email_confirm', '')),
+ 'lang' => $user->lang_name,
+ 'tz' => request_var('tz', (float) $config['board_timezone']),
+ ));
+
+ }
+
+ // Checking amount of available languages
+ $sql = 'SELECT lang_id
+ FROM ' . LANG_TABLE;
+ $result = $db->sql_query($sql);
+
+ $lang_row = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $lang_row[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ if ($coppa === false && $config['coppa_enable'])
+ {
+ $now = getdate();
+ $coppa_birthday = $user->format_date(mktime($now['hours'] + $user->data['user_dst'], $now['minutes'], $now['seconds'], $now['mon'], $now['mday'] - 1, $now['year'] - 13), $user->lang['DATE_FORMAT']);
+ unset($now);
+
+ $template->assign_vars(array(
+ 'S_LANG_OPTIONS' => (sizeof($lang_row) > 1) ? language_select($user_lang) : '',
+ 'L_COPPA_NO' => sprintf($user->lang['UCP_COPPA_BEFORE'], $coppa_birthday),
+ 'L_COPPA_YES' => sprintf($user->lang['UCP_COPPA_ON_AFTER'], $coppa_birthday),
+
+ 'U_COPPA_NO' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&amp;coppa=0' . $add_lang),
+ 'U_COPPA_YES' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&amp;coppa=1' . $add_lang),
+
+ 'S_SHOW_COPPA' => true,
+ 'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields),
+ 'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang),
+ ));
+ }
+ else
+ {
+ $template->assign_vars(array(
+ 'S_LANG_OPTIONS' => (sizeof($lang_row) > 1) ? language_select($user_lang) : '',
+ 'L_TERMS_OF_USE' => sprintf($user->lang['TERMS_OF_USE_CONTENT'], $config['sitename'], generate_board_url()),
+
+ 'S_SHOW_COPPA' => false,
+ 'S_REGISTRATION' => true,
+ 'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields),
+ 'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang . $add_coppa),
+ )
+ );
+ }
+ unset($lang_row);
+
+ $this->tpl_name = 'ucp_agreement';
+ return;
+ }
+
+
+ // The CAPTCHA kicks in here. We can't help that the information gets lost on language change.
+ if ($config['enable_confirm'])
+ {
+ include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
+ $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $captcha->init(CONFIRM_REG);
+ }
+
+ // Try to manually determine the timezone and adjust the dst if the server date/time complies with the default setting +/- 1
+ $timezone = date('Z') / 3600;
+ $is_dst = date('I');
+
+ if ($config['board_timezone'] == $timezone || $config['board_timezone'] == ($timezone - 1))
+ {
+ $timezone = ($is_dst) ? $timezone - 1 : $timezone;
+
+ if (!isset($user->lang['tz_zones'][(string) $timezone]))
+ {
+ $timezone = $config['board_timezone'];
+ }
+ }
+ else
+ {
+ $is_dst = $config['board_dst'];
+ $timezone = $config['board_timezone'];
+ }
+
+ $data = array(
+ 'username' => utf8_normalize_nfc(request_var('username', '', true)),
+ 'new_password' => request_var('new_password', '', true),
+ 'password_confirm' => request_var('password_confirm', '', true),
+ 'email' => strtolower(request_var('email', '')),
+ 'email_confirm' => strtolower(request_var('email_confirm', '')),
+ 'lang' => basename(request_var('lang', $user->lang_name)),
+ 'tz' => request_var('tz', (float) $timezone),
+ );
+
+ // Check and initialize some variables if needed
+ if ($submit)
+ {
+ $error = validate_data($data, array(
+ 'username' => array(
+ array('string', false, $config['min_name_chars'], $config['max_name_chars']),
+ array('username', '')),
+ 'new_password' => array(
+ array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
+ array('password')),
+ 'password_confirm' => array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
+ 'email' => array(
+ array('string', false, 6, 60),
+ array('email')),
+ 'email_confirm' => array('string', false, 6, 60),
+ 'tz' => array('num', false, -14, 14),
+ 'lang' => array('match', false, '#^[a-z_\-]{2,}$#i'),
+ ));
+
+ if (!check_form_key('ucp_register'))
+ {
+ $error[] = $user->lang['FORM_INVALID'];
+ }
+
+ // Replace "error" strings with their real, localised form
+ $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+
+ if ($config['enable_confirm'])
+ {
+ $vc_response = $captcha->validate($data);
+ if ($vc_response !== false)
+ {
+ $error[] = $vc_response;
+ }
+
+ if ($config['max_reg_attempts'] && $captcha->get_attempt_count() > $config['max_reg_attempts'])
+ {
+ $error[] = $user->lang['TOO_MANY_REGISTERS'];
+ }
+ }
+
+ // DNSBL check
+ if ($config['check_dnsbl'])
+ {
+ if (($dnsbl = $user->check_dnsbl('register')) !== false)
+ {
+ $error[] = sprintf($user->lang['IP_BLACKLISTED'], $user->ip, $dnsbl[1]);
+ }
+ }
+
+ // validate custom profile fields
+ $cp->submit_cp_field('register', $user->get_iso_lang_id(), $cp_data, $error);
+
+ if (!sizeof($error))
+ {
+ if ($data['new_password'] != $data['password_confirm'])
+ {
+ $error[] = $user->lang['NEW_PASSWORD_ERROR'];
+ }
+
+ if ($data['email'] != $data['email_confirm'])
+ {
+ $error[] = $user->lang['NEW_EMAIL_ERROR'];
+ }
+ }
+
+ if (!sizeof($error))
+ {
+ $server_url = generate_board_url();
+
+ // Which group by default?
+ $group_name = ($coppa) ? 'REGISTERED_COPPA' : 'REGISTERED';
+
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = '" . $db->sql_escape($group_name) . "'
+ AND group_type = " . GROUP_SPECIAL;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error('NO_GROUP');
+ }
+
+ $group_id = $row['group_id'];
+
+ if (($coppa ||
+ $config['require_activation'] == USER_ACTIVATION_SELF ||
+ $config['require_activation'] == USER_ACTIVATION_ADMIN) && $config['email_enable'])
+ {
+ $user_actkey = gen_rand_string(10);
+ $key_len = 54 - (strlen($server_url));
+ $key_len = ($key_len < 6) ? 6 : $key_len;
+ $user_actkey = substr($user_actkey, 0, $key_len);
+
+ $user_type = USER_INACTIVE;
+ $user_inactive_reason = INACTIVE_REGISTER;
+ $user_inactive_time = time();
+ }
+ else
+ {
+ $user_type = USER_NORMAL;
+ $user_actkey = '';
+ $user_inactive_reason = 0;
+ $user_inactive_time = 0;
+ }
+
+ $user_row = array(
+ 'username' => $data['username'],
+ 'user_password' => phpbb_hash($data['new_password']),
+ 'user_email' => $data['email'],
+ 'group_id' => (int) $group_id,
+ 'user_timezone' => (float) $data['tz'],
+ 'user_dst' => $is_dst,
+ 'user_lang' => $data['lang'],
+ 'user_type' => $user_type,
+ 'user_actkey' => $user_actkey,
+ 'user_ip' => $user->ip,
+ 'user_regdate' => time(),
+ 'user_inactive_reason' => $user_inactive_reason,
+ 'user_inactive_time' => $user_inactive_time,
+ );
+
+ if ($config['new_member_post_limit'])
+ {
+ $user_row['user_new'] = 1;
+ }
+
+ // Register user...
+ $user_id = user_add($user_row, $cp_data);
+
+ // This should not happen, because the required variables are listed above...
+ if ($user_id === false)
+ {
+ trigger_error('NO_USER', E_USER_ERROR);
+ }
+
+ if ($coppa && $config['email_enable'])
+ {
+ $message = $user->lang['ACCOUNT_COPPA'];
+ $email_template = 'coppa_welcome_inactive';
+ }
+ else if ($config['require_activation'] == USER_ACTIVATION_SELF && $config['email_enable'])
+ {
+ $message = $user->lang['ACCOUNT_INACTIVE'];
+ $email_template = 'user_welcome_inactive';
+ }
+ else if ($config['require_activation'] == USER_ACTIVATION_ADMIN && $config['email_enable'])
+ {
+ $message = $user->lang['ACCOUNT_INACTIVE_ADMIN'];
+ $email_template = 'admin_welcome_inactive';
+ }
+ else
+ {
+ $message = $user->lang['ACCOUNT_ADDED'];
+ $email_template = 'user_welcome';
+ }
+
+ if ($config['email_enable'])
+ {
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+
+ $messenger = new messenger(false);
+
+ $messenger->template($email_template, $data['lang']);
+
+ $messenger->to($data['email'], $data['username']);
+
+ $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
+ $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
+ $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
+ $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
+
+ $messenger->assign_vars(array(
+ 'WELCOME_MSG' => htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename'])),
+ 'USERNAME' => htmlspecialchars_decode($data['username']),
+ 'PASSWORD' => htmlspecialchars_decode($data['new_password']),
+ 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u=$user_id&k=$user_actkey")
+ );
+
+ if ($coppa)
+ {
+ $messenger->assign_vars(array(
+ 'FAX_INFO' => $config['coppa_fax'],
+ 'MAIL_INFO' => $config['coppa_mail'],
+ 'EMAIL_ADDRESS' => $data['email'])
+ );
+ }
+
+ $messenger->send(NOTIFY_EMAIL);
+
+ if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
+ {
+ // Grab an array of user_id's with a_user permissions ... these users can activate a user
+ $admin_ary = $auth->acl_get_list(false, 'a_user', false);
+ $admin_ary = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array();
+
+ // Also include founders
+ $where_sql = ' WHERE user_type = ' . USER_FOUNDER;
+
+ if (sizeof($admin_ary))
+ {
+ $where_sql .= ' OR ' . $db->sql_in_set('user_id', $admin_ary);
+ }
+
+ $sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
+ FROM ' . USERS_TABLE . ' ' .
+ $where_sql;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $messenger->template('admin_activate', $row['user_lang']);
+ $messenger->to($row['user_email'], $row['username']);
+ $messenger->im($row['user_jabber'], $row['username']);
+
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($data['username']),
+ 'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u=$user_id",
+ 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u=$user_id&k=$user_actkey")
+ );
+
+ $messenger->send($row['user_notify_type']);
+ }
+ $db->sql_freeresult($result);
+ }
+ }
+
+ $message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
+ trigger_error($message);
+ }
+ }
+
+ $s_hidden_fields = array(
+ 'agreed' => 'true',
+ 'change_lang' => 0,
+ );
+
+ if ($config['coppa_enable'])
+ {
+ $s_hidden_fields['coppa'] = $coppa;
+ }
+
+ if ($config['enable_confirm'])
+ {
+ $s_hidden_fields = array_merge($s_hidden_fields, $captcha->get_hidden_fields());
+ }
+ $s_hidden_fields = build_hidden_fields($s_hidden_fields);
+ $confirm_image = '';
+
+ // Visual Confirmation - Show images
+ if ($config['enable_confirm'])
+ {
+ $template->assign_vars(array(
+ 'CAPTCHA_TEMPLATE' => $captcha->get_template(),
+ ));
+ }
+
+ //
+ $l_reg_cond = '';
+ switch ($config['require_activation'])
+ {
+ case USER_ACTIVATION_SELF:
+ $l_reg_cond = $user->lang['UCP_EMAIL_ACTIVATE'];
+ break;
+
+ case USER_ACTIVATION_ADMIN:
+ $l_reg_cond = $user->lang['UCP_ADMIN_ACTIVATE'];
+ break;
+ }
+
+ $template->assign_vars(array(
+ 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'USERNAME' => $data['username'],
+ 'PASSWORD' => $data['new_password'],
+ 'PASSWORD_CONFIRM' => $data['password_confirm'],
+ 'EMAIL' => $data['email'],
+ 'EMAIL_CONFIRM' => $data['email_confirm'],
+
+ 'L_REG_COND' => $l_reg_cond,
+ 'L_USERNAME_EXPLAIN' => sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
+ 'L_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
+
+ 'S_LANG_OPTIONS' => language_select($data['lang']),
+ 'S_TZ_OPTIONS' => tz_select($data['tz']),
+ 'S_CONFIRM_REFRESH' => ($config['enable_confirm'] && $config['confirm_refresh']) ? true : false,
+ 'S_REGISTRATION' => true,
+ 'S_COPPA' => $coppa,
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields,
+ 'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'),
+ ));
+
+ //
+ $user->profile_fields = array();
+
+ // Generate profile fields -> Template Block Variable profile_fields
+ $cp->generate_profile_fields('register', $user->get_iso_lang_id());
+
+ //
+ $this->tpl_name = 'ucp_register';
+ $this->page_title = 'UCP_REGISTRATION';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php
new file mode 100644
index 0000000000..df6733d038
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_remind.php
@@ -0,0 +1,125 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* ucp_remind
+* Sending password reminders
+* @package ucp
+*/
+class ucp_remind
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $config, $phpbb_root_path, $phpEx;
+ global $db, $user, $auth, $template;
+
+ $username = request_var('username', '', true);
+ $email = strtolower(request_var('email', ''));
+ $submit = (isset($_POST['submit'])) ? true : false;
+
+ if ($submit)
+ {
+ $sql = 'SELECT user_id, username, user_permissions, user_email, user_jabber, user_notify_type, user_type, user_lang, user_inactive_reason
+ FROM ' . USERS_TABLE . "
+ WHERE user_email_hash = '" . $db->sql_escape(phpbb_email_hash($email)) . "'
+ AND username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
+ $result = $db->sql_query($sql);
+ $user_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$user_row)
+ {
+ trigger_error('NO_EMAIL_USER');
+ }
+
+ if ($user_row['user_type'] == USER_IGNORE)
+ {
+ trigger_error('NO_USER');
+ }
+
+ if ($user_row['user_type'] == USER_INACTIVE)
+ {
+ if ($user_row['user_inactive_reason'] == INACTIVE_MANUAL)
+ {
+ trigger_error('ACCOUNT_DEACTIVATED');
+ }
+ else
+ {
+ trigger_error('ACCOUNT_NOT_ACTIVATED');
+ }
+ }
+
+ // Check users permissions
+ $auth2 = new auth();
+ $auth2->acl($user_row);
+
+ if (!$auth2->acl_get('u_chgpasswd'))
+ {
+ trigger_error('NO_AUTH_PASSWORD_REMINDER');
+ }
+
+ $server_url = generate_board_url();
+
+ $key_len = 54 - strlen($server_url);
+ $key_len = max(6, $key_len); // we want at least 6
+ $key_len = ($config['max_pass_chars']) ? min($key_len, $config['max_pass_chars']) : $key_len; // we want at most $config['max_pass_chars']
+ $user_actkey = substr(gen_rand_string(10), 0, $key_len);
+ $user_password = gen_rand_string(8);
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_newpasswd = '" . $db->sql_escape(phpbb_hash($user_password)) . "', user_actkey = '" . $db->sql_escape($user_actkey) . "'
+ WHERE user_id = " . $user_row['user_id'];
+ $db->sql_query($sql);
+
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+
+ $messenger = new messenger(false);
+
+ $messenger->template('user_activate_passwd', $user_row['user_lang']);
+
+ $messenger->to($user_row['user_email'], $user_row['username']);
+ $messenger->im($user_row['user_jabber'], $user_row['username']);
+
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($user_row['username']),
+ 'PASSWORD' => htmlspecialchars_decode($user_password),
+ 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user_row['user_id']}&k=$user_actkey")
+ );
+
+ $messenger->send($user_row['user_notify_type']);
+
+ meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
+
+ $message = $user->lang['PASSWORD_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
+ trigger_error($message);
+ }
+
+ $template->assign_vars(array(
+ 'USERNAME' => $username,
+ 'EMAIL' => $email,
+ 'S_PROFILE_ACTION' => append_sid($phpbb_root_path . 'ucp.' . $phpEx, 'mode=sendpassword'))
+ );
+
+ $this->tpl_name = 'ucp_remind';
+ $this->page_title = 'UCP_REMIND';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_resend.php b/phpBB/includes/ucp/ucp_resend.php
new file mode 100644
index 0000000000..39e9be24a1
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_resend.php
@@ -0,0 +1,170 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* ucp_resend
+* Resending activation emails
+* @package ucp
+*/
+class ucp_resend
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $config, $phpbb_root_path, $phpEx;
+ global $db, $user, $auth, $template;
+
+ $username = request_var('username', '', true);
+ $email = strtolower(request_var('email', ''));
+ $submit = (isset($_POST['submit'])) ? true : false;
+
+ add_form_key('ucp_resend');
+
+ if ($submit)
+ {
+ if (!check_form_key('ucp_resend'))
+ {
+ trigger_error('FORM_INVALID');
+ }
+
+ $sql = 'SELECT user_id, group_id, username, user_email, user_type, user_lang, user_actkey, user_inactive_reason
+ FROM ' . USERS_TABLE . "
+ WHERE user_email_hash = '" . $db->sql_escape(phpbb_email_hash($email)) . "'
+ AND username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
+ $result = $db->sql_query($sql);
+ $user_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$user_row)
+ {
+ trigger_error('NO_EMAIL_USER');
+ }
+
+ if ($user_row['user_type'] == USER_IGNORE)
+ {
+ trigger_error('NO_USER');
+ }
+
+ if (!$user_row['user_actkey'] && $user_row['user_type'] != USER_INACTIVE)
+ {
+ trigger_error('ACCOUNT_ALREADY_ACTIVATED');
+ }
+
+ if (!$user_row['user_actkey'] || ($user_row['user_type'] == USER_INACTIVE && $user_row['user_inactive_reason'] == INACTIVE_MANUAL))
+ {
+ trigger_error('ACCOUNT_DEACTIVATED');
+ }
+
+ // Determine coppa status on group (REGISTERED(_COPPA))
+ $sql = 'SELECT group_name, group_type
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_id = ' . $user_row['group_id'];
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error('NO_GROUP');
+ }
+
+ $coppa = ($row['group_name'] == 'REGISTERED_COPPA' && $row['group_type'] == GROUP_SPECIAL) ? true : false;
+
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ $messenger = new messenger(false);
+
+ if ($config['require_activation'] == USER_ACTIVATION_SELF || $coppa)
+ {
+ $messenger->template(($coppa) ? 'coppa_resend_inactive' : 'user_resend_inactive', $user_row['user_lang']);
+ $messenger->to($user_row['user_email'], $user_row['username']);
+
+ $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
+ $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
+ $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
+ $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
+
+ $messenger->assign_vars(array(
+ 'WELCOME_MSG' => htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename'])),
+ 'USERNAME' => htmlspecialchars_decode($user_row['username']),
+ 'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u={$user_row['user_id']}&k={$user_row['user_actkey']}")
+ );
+
+ if ($coppa)
+ {
+ $messenger->assign_vars(array(
+ 'FAX_INFO' => $config['coppa_fax'],
+ 'MAIL_INFO' => $config['coppa_mail'],
+ 'EMAIL_ADDRESS' => $user_row['user_email'])
+ );
+ }
+
+ $messenger->send(NOTIFY_EMAIL);
+ }
+
+ if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
+ {
+ // Grab an array of user_id's with a_user permissions ... these users can activate a user
+ $admin_ary = $auth->acl_get_list(false, 'a_user', false);
+
+ $sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $admin_ary[0]['a_user']);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $messenger->template('admin_activate', $row['user_lang']);
+ $messenger->to($row['user_email'], $row['username']);
+ $messenger->im($row['user_jabber'], $row['username']);
+
+ $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
+ $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
+ $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
+ $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
+
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($user_row['username']),
+ 'U_USER_DETAILS' => generate_board_url() . "/memberlist.$phpEx?mode=viewprofile&u={$user_row['user_id']}",
+ 'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u={$user_row['user_id']}&k={$user_row['user_actkey']}")
+ );
+
+ $messenger->send($row['user_notify_type']);
+ }
+ $db->sql_freeresult($result);
+ }
+
+ meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
+
+ $message = ($config['require_activation'] == USER_ACTIVATION_ADMIN) ? $user->lang['ACTIVATION_EMAIL_SENT_ADMIN'] : $user->lang['ACTIVATION_EMAIL_SENT'];
+ $message .= '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
+ trigger_error($message);
+ }
+
+ $template->assign_vars(array(
+ 'USERNAME' => $username,
+ 'EMAIL' => $email,
+ 'S_PROFILE_ACTION' => append_sid($phpbb_root_path . 'ucp.' . $phpEx, 'mode=resend_act'))
+ );
+
+ $this->tpl_name = 'ucp_resend';
+ $this->page_title = 'UCP_RESEND';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php
new file mode 100644
index 0000000000..5ed4db7520
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_zebra.php
@@ -0,0 +1,257 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* ucp_zebra
+* @package ucp
+*/
+class ucp_zebra
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
+
+ $submit = (isset($_POST['submit']) || isset($_GET['add']) || isset($_GET['remove'])) ? true : false;
+ $s_hidden_fields = '';
+
+ $l_mode = strtoupper($mode);
+
+ if ($submit)
+ {
+ $data = $error = array();
+ $updated = false;
+
+ $var_ary = array(
+ 'usernames' => array(0),
+ 'add' => '',
+ );
+
+ foreach ($var_ary as $var => $default)
+ {
+ $data[$var] = request_var($var, $default, true);
+ }
+
+ if (!empty($data['add']) || sizeof($data['usernames']))
+ {
+ if (confirm_box(true))
+ {
+ // Remove users
+ if (!empty($data['usernames']))
+ {
+ $sql = 'DELETE FROM ' . ZEBRA_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'] . '
+ AND ' . $db->sql_in_set('zebra_id', $data['usernames']);
+ $db->sql_query($sql);
+
+ $updated = true;
+ }
+
+ // Add users
+ if ($data['add'])
+ {
+ $data['add'] = array_map('trim', array_map('utf8_clean_string', explode("\n", $data['add'])));
+
+ // Do these name/s exist on a list already? If so, ignore ... we could be
+ // 'nice' and automatically handle names added to one list present on
+ // the other (by removing the existing one) ... but I have a feeling this
+ // may lead to complaints
+ $sql = 'SELECT z.*, u.username, u.username_clean
+ FROM ' . ZEBRA_TABLE . ' z, ' . USERS_TABLE . ' u
+ WHERE z.user_id = ' . $user->data['user_id'] . '
+ AND u.user_id = z.zebra_id';
+ $result = $db->sql_query($sql);
+
+ $friends = $foes = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['friend'])
+ {
+ $friends[] = utf8_clean_string($row['username']);
+ }
+ else
+ {
+ $foes[] = utf8_clean_string($row['username']);
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // remove friends from the username array
+ $n = sizeof($data['add']);
+ $data['add'] = array_diff($data['add'], $friends);
+
+ if (sizeof($data['add']) < $n && $mode == 'foes')
+ {
+ $error[] = $user->lang['NOT_ADDED_FOES_FRIENDS'];
+ }
+
+ // remove foes from the username array
+ $n = sizeof($data['add']);
+ $data['add'] = array_diff($data['add'], $foes);
+
+ if (sizeof($data['add']) < $n && $mode == 'friends')
+ {
+ $error[] = $user->lang['NOT_ADDED_FRIENDS_FOES'];
+ }
+
+ // remove the user himself from the username array
+ $n = sizeof($data['add']);
+ $data['add'] = array_diff($data['add'], array(utf8_clean_string($user->data['username'])));
+
+ if (sizeof($data['add']) < $n)
+ {
+ $error[] = $user->lang['NOT_ADDED_' . $l_mode . '_SELF'];
+ }
+
+ unset($friends, $foes, $n);
+
+ if (sizeof($data['add']))
+ {
+ $sql = 'SELECT user_id, user_type
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('username_clean', $data['add']) . '
+ AND user_type <> ' . USER_INACTIVE;
+ $result = $db->sql_query($sql);
+
+ $user_id_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['user_id'] != ANONYMOUS && $row['user_type'] != USER_IGNORE)
+ {
+ $user_id_ary[] = $row['user_id'];
+ }
+ else if ($row['user_id'] != ANONYMOUS)
+ {
+ $error[] = $user->lang['NOT_ADDED_' . $l_mode . '_BOTS'];
+ }
+ else
+ {
+ $error[] = $user->lang['NOT_ADDED_' . $l_mode . '_ANONYMOUS'];
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($user_id_ary))
+ {
+ // Remove users from foe list if they are admins or moderators
+ if ($mode == 'foes')
+ {
+ $perms = array();
+ foreach ($auth->acl_get_list($user_id_ary, array('a_', 'm_')) as $forum_id => $forum_ary)
+ {
+ foreach ($forum_ary as $auth_option => $user_ary)
+ {
+ $perms = array_merge($perms, $user_ary);
+ }
+ }
+
+ $perms = array_unique($perms);
+
+ if (sizeof($perms))
+ {
+ $error[] = $user->lang['NOT_ADDED_FOES_MOD_ADMIN'];
+ }
+
+ // This may not be right ... it may yield true when perms equate to deny
+ $user_id_ary = array_diff($user_id_ary, $perms);
+ unset($perms);
+ }
+
+ if (sizeof($user_id_ary))
+ {
+ $sql_mode = ($mode == 'friends') ? 'friend' : 'foe';
+
+ $sql_ary = array();
+ foreach ($user_id_ary as $zebra_id)
+ {
+ $sql_ary[] = array(
+ 'user_id' => (int) $user->data['user_id'],
+ 'zebra_id' => (int) $zebra_id,
+ $sql_mode => 1
+ );
+ }
+
+ $db->sql_multi_insert(ZEBRA_TABLE, $sql_ary);
+
+ $updated = true;
+ }
+ unset($user_id_ary);
+ }
+ else if (!sizeof($error))
+ {
+ $error[] = $user->lang['USER_NOT_FOUND_OR_INACTIVE'];
+ }
+ }
+ }
+
+ if ($updated)
+ {
+ meta_refresh(3, $this->u_action);
+ $message = $user->lang[$l_mode . '_UPDATED'] . '<br />' . implode('<br />', $error) . ((sizeof($error)) ? '<br />' : '') . '<br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
+ trigger_error($message);
+ }
+ else
+ {
+ $template->assign_var('ERROR', implode('<br />', $error));
+ }
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'mode' => $mode,
+ 'submit' => true,
+ 'usernames' => $data['usernames'],
+ 'add' => $data['add']))
+ );
+ }
+ }
+ }
+
+ $sql_and = ($mode == 'friends') ? 'z.friend = 1' : 'z.foe = 1';
+ $sql = 'SELECT z.*, u.username, u.username_clean
+ FROM ' . ZEBRA_TABLE . ' z, ' . USERS_TABLE . ' u
+ WHERE z.user_id = ' . $user->data['user_id'] . "
+ AND $sql_and
+ AND u.user_id = z.zebra_id
+ ORDER BY u.username_clean ASC";
+ $result = $db->sql_query($sql);
+
+ $s_username_options = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $s_username_options .= '<option value="' . $row['zebra_id'] . '">' . $row['username'] . '</option>';
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'L_TITLE' => $user->lang['UCP_ZEBRA_' . $l_mode],
+
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=ucp&amp;field=add'),
+
+ 'S_USERNAME_OPTIONS' => $s_username_options,
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields,
+ 'S_UCP_ACTION' => $this->u_action)
+ );
+
+ $this->tpl_name = 'ucp_zebra_' . $mode;
+ $this->page_title = 'UCP_ZEBRA_' . $l_mode;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/utf/data/case_fold_c.php b/phpBB/includes/utf/data/case_fold_c.php
new file mode 100644
index 0000000000..00de1ba349
--- /dev/null
+++ b/phpBB/includes/utf/data/case_fold_c.php
@@ -0,0 +1 @@
+<?php return array('A'=>'a','B'=>'b','C'=>'c','D'=>'d','E'=>'e','F'=>'f','G'=>'g','H'=>'h','I'=>'i','J'=>'j','K'=>'k','L'=>'l','M'=>'m','N'=>'n','O'=>'o','P'=>'p','Q'=>'q','R'=>'r','S'=>'s','T'=>'t','U'=>'u','V'=>'v','W'=>'w','X'=>'x','Y'=>'y','Z'=>'z','µ'=>'μ','À'=>'à','Ã'=>'á','Â'=>'â','Ã'=>'ã','Ä'=>'ä','Ã…'=>'Ã¥','Æ'=>'æ','Ç'=>'ç','È'=>'è','É'=>'é','Ê'=>'ê','Ë'=>'ë','ÃŒ'=>'ì','Ã'=>'í','ÃŽ'=>'î','Ã'=>'ï','Ã'=>'ð','Ñ'=>'ñ','Ã’'=>'ò','Ó'=>'ó','Ô'=>'ô','Õ'=>'õ','Ö'=>'ö','Ø'=>'ø','Ù'=>'ù','Ú'=>'ú','Û'=>'û','Ãœ'=>'ü','Ã'=>'ý','Þ'=>'þ','Ä€'=>'Ä','Ä‚'=>'ă','Ä„'=>'Ä…','Ć'=>'ć','Ĉ'=>'ĉ','ÄŠ'=>'Ä‹','ÄŒ'=>'Ä','ÄŽ'=>'Ä','Ä'=>'Ä‘','Ä’'=>'Ä“','Ä”'=>'Ä•','Ä–'=>'Ä—','Ę'=>'Ä™','Äš'=>'Ä›','Äœ'=>'Ä','Äž'=>'ÄŸ','Ä '=>'Ä¡','Ä¢'=>'Ä£','Ĥ'=>'Ä¥','Ħ'=>'ħ','Ĩ'=>'Ä©','Ī'=>'Ä«','Ĭ'=>'Ä­','Ä®'=>'į','IJ'=>'ij','Ä´'=>'ĵ','Ķ'=>'Ä·','Ĺ'=>'ĺ','Ä»'=>'ļ','Ľ'=>'ľ','Ä¿'=>'Å€','Å'=>'Å‚','Ń'=>'Å„','Å…'=>'ņ','Ň'=>'ň','ÅŠ'=>'Å‹','ÅŒ'=>'Å','ÅŽ'=>'Å','Å'=>'Å‘','Å’'=>'Å“','Å”'=>'Å•','Å–'=>'Å—','Ř'=>'Å™','Åš'=>'Å›','Åœ'=>'Å','Åž'=>'ÅŸ','Å '=>'Å¡','Å¢'=>'Å£','Ť'=>'Å¥','Ŧ'=>'ŧ','Ũ'=>'Å©','Ū'=>'Å«','Ŭ'=>'Å­','Å®'=>'ů','Å°'=>'ű','Ų'=>'ų','Å´'=>'ŵ','Ŷ'=>'Å·','Ÿ'=>'ÿ','Ź'=>'ź','Å»'=>'ż','Ž'=>'ž','Å¿'=>'s','Æ'=>'É“','Æ‚'=>'ƃ','Æ„'=>'Æ…','Ɔ'=>'É”','Ƈ'=>'ƈ','Ɖ'=>'É–','ÆŠ'=>'É—','Æ‹'=>'ÆŒ','ÆŽ'=>'Ç','Æ'=>'É™','Æ'=>'É›','Æ‘'=>'Æ’','Æ“'=>'É ','Æ”'=>'É£','Æ–'=>'É©','Æ—'=>'ɨ','Ƙ'=>'Æ™','Æœ'=>'ɯ','Æ'=>'ɲ','ÆŸ'=>'ɵ','Æ '=>'Æ¡','Æ¢'=>'Æ£','Ƥ'=>'Æ¥','Ʀ'=>'Ê€','Ƨ'=>'ƨ','Æ©'=>'ʃ','Ƭ'=>'Æ­','Æ®'=>'ʈ','Ư'=>'Æ°','Ʊ'=>'ÊŠ','Ʋ'=>'Ê‹','Ƴ'=>'Æ´','Ƶ'=>'ƶ','Æ·'=>'Ê’','Ƹ'=>'ƹ','Ƽ'=>'ƽ','Ç„'=>'dž','Ç…'=>'dž','LJ'=>'lj','Lj'=>'lj','ÇŠ'=>'ÇŒ','Ç‹'=>'ÇŒ','Ç'=>'ÇŽ','Ç'=>'Ç','Ç‘'=>'Ç’','Ç“'=>'Ç”','Ç•'=>'Ç–','Ç—'=>'ǘ','Ç™'=>'Çš','Ç›'=>'Çœ','Çž'=>'ÇŸ','Ç '=>'Ç¡','Ç¢'=>'Ç£','Ǥ'=>'Ç¥','Ǧ'=>'ǧ','Ǩ'=>'Ç©','Ǫ'=>'Ç«','Ǭ'=>'Ç­','Ç®'=>'ǯ','DZ'=>'dz','Dz'=>'dz','Ç´'=>'ǵ','Ƕ'=>'Æ•','Ç·'=>'Æ¿','Ǹ'=>'ǹ','Ǻ'=>'Ç»','Ǽ'=>'ǽ','Ǿ'=>'Ç¿','È€'=>'È','È‚'=>'ȃ','È„'=>'È…','Ȇ'=>'ȇ','Ȉ'=>'ȉ','ÈŠ'=>'È‹','ÈŒ'=>'È','ÈŽ'=>'È','È'=>'È‘','È’'=>'È“','È”'=>'È•','È–'=>'È—','Ș'=>'È™','Èš'=>'È›','Èœ'=>'È','Èž'=>'ÈŸ','È '=>'Æž','È¢'=>'È£','Ȥ'=>'È¥','Ȧ'=>'ȧ','Ȩ'=>'È©','Ȫ'=>'È«','Ȭ'=>'È­','È®'=>'ȯ','È°'=>'ȱ','Ȳ'=>'ȳ','Ⱥ'=>'â±¥','È»'=>'ȼ','Ƚ'=>'Æš','Ⱦ'=>'ⱦ','É'=>'É‚','Ƀ'=>'Æ€','É„'=>'ʉ','É…'=>'ÊŒ','Ɇ'=>'ɇ','Ɉ'=>'ɉ','ÉŠ'=>'É‹','ÉŒ'=>'É','ÉŽ'=>'É','Í…'=>'ι','Ά'=>'ά','Έ'=>'έ','Ή'=>'ή','Ί'=>'ί','ÎŒ'=>'ÏŒ','ÎŽ'=>'Ï','Î'=>'ÏŽ','Α'=>'α','Î’'=>'β','Γ'=>'γ','Δ'=>'δ','Ε'=>'ε','Ζ'=>'ζ','Η'=>'η','Θ'=>'θ','Ι'=>'ι','Κ'=>'κ','Λ'=>'λ','Îœ'=>'μ','Î'=>'ν','Ξ'=>'ξ','Ο'=>'ο','Π'=>'Ï€','Ρ'=>'Ï','Σ'=>'σ','Τ'=>'Ï„','Î¥'=>'Ï…','Φ'=>'φ','Χ'=>'χ','Ψ'=>'ψ','Ω'=>'ω','Ϊ'=>'ÏŠ','Ϋ'=>'Ï‹','Ï‚'=>'σ','Ï'=>'β','Ï‘'=>'θ','Ï•'=>'φ','Ï–'=>'Ï€','Ϙ'=>'Ï™','Ïš'=>'Ï›','Ïœ'=>'Ï','Ïž'=>'ÏŸ','Ï '=>'Ï¡','Ï¢'=>'Ï£','Ϥ'=>'Ï¥','Ϧ'=>'ϧ','Ϩ'=>'Ï©','Ϫ'=>'Ï«','Ϭ'=>'Ï­','Ï®'=>'ϯ','Ï°'=>'κ','ϱ'=>'Ï','Ï´'=>'θ','ϵ'=>'ε','Ï·'=>'ϸ','Ϲ'=>'ϲ','Ϻ'=>'Ï»','Ͻ'=>'Í»','Ͼ'=>'ͼ','Ï¿'=>'ͽ','Ѐ'=>'Ñ','Ð'=>'Ñ‘','Ђ'=>'Ñ’','Ѓ'=>'Ñ“','Є'=>'Ñ”','Ð…'=>'Ñ•','І'=>'Ñ–','Ї'=>'Ñ—','Ј'=>'ј','Љ'=>'Ñ™','Њ'=>'Ñš','Ћ'=>'Ñ›','ÐŒ'=>'Ñœ','Ð'=>'Ñ','ÐŽ'=>'Ñž','Ð'=>'ÑŸ','Ð'=>'а','Б'=>'б','Ð’'=>'в','Г'=>'г','Д'=>'д','Е'=>'е','Ж'=>'ж','З'=>'з','И'=>'и','Й'=>'й','К'=>'к','Л'=>'л','Ðœ'=>'м','Ð'=>'н','О'=>'о','П'=>'п','Р'=>'Ñ€','С'=>'Ñ','Т'=>'Ñ‚','У'=>'у','Ф'=>'Ñ„','Ð¥'=>'Ñ…','Ц'=>'ц','Ч'=>'ч','Ш'=>'ш','Щ'=>'щ','Ъ'=>'ÑŠ','Ы'=>'Ñ‹','Ь'=>'ÑŒ','Э'=>'Ñ','Ю'=>'ÑŽ','Я'=>'Ñ','Ñ '=>'Ñ¡','Ñ¢'=>'Ñ£','Ѥ'=>'Ñ¥','Ѧ'=>'ѧ','Ѩ'=>'Ñ©','Ѫ'=>'Ñ«','Ѭ'=>'Ñ­','Ñ®'=>'ѯ','Ñ°'=>'ѱ','Ѳ'=>'ѳ','Ñ´'=>'ѵ','Ѷ'=>'Ñ·','Ѹ'=>'ѹ','Ѻ'=>'Ñ»','Ѽ'=>'ѽ','Ѿ'=>'Ñ¿','Ò€'=>'Ò','ÒŠ'=>'Ò‹','ÒŒ'=>'Ò','ÒŽ'=>'Ò','Ò'=>'Ò‘','Ò’'=>'Ò“','Ò”'=>'Ò•','Ò–'=>'Ò—','Ò˜'=>'Ò™','Òš'=>'Ò›','Òœ'=>'Ò','Òž'=>'ÒŸ','Ò '=>'Ò¡','Ò¢'=>'Ò£','Ò¤'=>'Ò¥','Ò¦'=>'Ò§','Ò¨'=>'Ò©','Òª'=>'Ò«','Ò¬'=>'Ò­','Ò®'=>'Ò¯','Ò°'=>'Ò±','Ò²'=>'Ò³','Ò´'=>'Òµ','Ò¶'=>'Ò·','Ò¸'=>'Ò¹','Òº'=>'Ò»','Ò¼'=>'Ò½','Ò¾'=>'Ò¿','Ó€'=>'Ó','Ó'=>'Ó‚','Óƒ'=>'Ó„','Ó…'=>'Ó†','Ó‡'=>'Óˆ','Ó‰'=>'ÓŠ','Ó‹'=>'ÓŒ','Ó'=>'ÓŽ','Ó'=>'Ó‘','Ó’'=>'Ó“','Ó”'=>'Ó•','Ó–'=>'Ó—','Ó˜'=>'Ó™','Óš'=>'Ó›','Óœ'=>'Ó','Óž'=>'ÓŸ','Ó '=>'Ó¡','Ó¢'=>'Ó£','Ó¤'=>'Ó¥','Ó¦'=>'Ó§','Ó¨'=>'Ó©','Óª'=>'Ó«','Ó¬'=>'Ó­','Ó®'=>'Ó¯','Ó°'=>'Ó±','Ó²'=>'Ó³','Ó´'=>'Óµ','Ó¶'=>'Ó·','Ó¸'=>'Ó¹','Óº'=>'Ó»','Ó¼'=>'Ó½','Ó¾'=>'Ó¿','Ô€'=>'Ô','Ô‚'=>'Ôƒ','Ô„'=>'Ô…','Ô†'=>'Ô‡','Ôˆ'=>'Ô‰','ÔŠ'=>'Ô‹','ÔŒ'=>'Ô','ÔŽ'=>'Ô','Ô'=>'Ô‘','Ô’'=>'Ô“','Ô±'=>'Õ¡','Ô²'=>'Õ¢','Ô³'=>'Õ£','Ô´'=>'Õ¤','Ôµ'=>'Õ¥','Ô¶'=>'Õ¦','Ô·'=>'Õ§','Ô¸'=>'Õ¨','Ô¹'=>'Õ©','Ôº'=>'Õª','Ô»'=>'Õ«','Ô¼'=>'Õ¬','Ô½'=>'Õ­','Ô¾'=>'Õ®','Ô¿'=>'Õ¯','Õ€'=>'Õ°','Õ'=>'Õ±','Õ‚'=>'Õ²','Õƒ'=>'Õ³','Õ„'=>'Õ´','Õ…'=>'Õµ','Õ†'=>'Õ¶','Õ‡'=>'Õ·','Õˆ'=>'Õ¸','Õ‰'=>'Õ¹','ÕŠ'=>'Õº','Õ‹'=>'Õ»','ÕŒ'=>'Õ¼','Õ'=>'Õ½','ÕŽ'=>'Õ¾','Õ'=>'Õ¿','Õ'=>'Ö€','Õ‘'=>'Ö','Õ’'=>'Ö‚','Õ“'=>'Öƒ','Õ”'=>'Ö„','Õ•'=>'Ö…','Õ–'=>'Ö†','á‚ '=>'â´€','á‚¡'=>'â´','á‚¢'=>'â´‚','á‚£'=>'â´ƒ','Ⴄ'=>'â´„','á‚¥'=>'â´…','Ⴆ'=>'â´†','Ⴇ'=>'â´‡','Ⴈ'=>'â´ˆ','á‚©'=>'â´‰','Ⴊ'=>'â´Š','á‚«'=>'â´‹','Ⴌ'=>'â´Œ','á‚­'=>'â´','á‚®'=>'â´Ž','Ⴏ'=>'â´','á‚°'=>'â´','Ⴑ'=>'â´‘','Ⴒ'=>'â´’','Ⴓ'=>'â´“','á‚´'=>'â´”','Ⴕ'=>'â´•','Ⴖ'=>'â´–','á‚·'=>'â´—','Ⴘ'=>'â´˜','Ⴙ'=>'â´™','Ⴚ'=>'â´š','á‚»'=>'â´›','Ⴜ'=>'â´œ','Ⴝ'=>'â´','Ⴞ'=>'â´ž','á‚¿'=>'â´Ÿ','Ⴠ'=>'â´ ','áƒ'=>'â´¡','Ⴢ'=>'â´¢','Ⴣ'=>'â´£','Ⴤ'=>'â´¤','Ⴥ'=>'â´¥','Ḁ'=>'á¸','Ḃ'=>'ḃ','Ḅ'=>'ḅ','Ḇ'=>'ḇ','Ḉ'=>'ḉ','Ḋ'=>'ḋ','Ḍ'=>'á¸','Ḏ'=>'á¸','á¸'=>'ḑ','Ḓ'=>'ḓ','Ḕ'=>'ḕ','Ḗ'=>'ḗ','Ḙ'=>'ḙ','Ḛ'=>'ḛ','Ḝ'=>'á¸','Ḟ'=>'ḟ','Ḡ'=>'ḡ','Ḣ'=>'ḣ','Ḥ'=>'ḥ','Ḧ'=>'ḧ','Ḩ'=>'ḩ','Ḫ'=>'ḫ','Ḭ'=>'ḭ','Ḯ'=>'ḯ','Ḱ'=>'ḱ','Ḳ'=>'ḳ','Ḵ'=>'ḵ','Ḷ'=>'ḷ','Ḹ'=>'ḹ','Ḻ'=>'ḻ','Ḽ'=>'ḽ','Ḿ'=>'ḿ','á¹€'=>'á¹','Ṃ'=>'ṃ','Ṅ'=>'á¹…','Ṇ'=>'ṇ','Ṉ'=>'ṉ','Ṋ'=>'ṋ','Ṍ'=>'á¹','Ṏ'=>'á¹','á¹'=>'ṑ','á¹’'=>'ṓ','á¹”'=>'ṕ','á¹–'=>'á¹—','Ṙ'=>'á¹™','Ṛ'=>'á¹›','Ṝ'=>'á¹','Ṟ'=>'ṟ','á¹ '=>'ṡ','á¹¢'=>'á¹£','Ṥ'=>'á¹¥','Ṧ'=>'ṧ','Ṩ'=>'ṩ','Ṫ'=>'ṫ','Ṭ'=>'á¹­','á¹®'=>'ṯ','á¹°'=>'á¹±','á¹²'=>'á¹³','á¹´'=>'á¹µ','Ṷ'=>'á¹·','Ṹ'=>'á¹¹','Ṻ'=>'á¹»','á¹¼'=>'á¹½','á¹¾'=>'ṿ','Ẁ'=>'áº','Ẃ'=>'ẃ','Ẅ'=>'ẅ','Ẇ'=>'ẇ','Ẉ'=>'ẉ','Ẋ'=>'ẋ','Ẍ'=>'áº','Ẏ'=>'áº','áº'=>'ẑ','Ẓ'=>'ẓ','Ẕ'=>'ẕ','ẛ'=>'ṡ','Ạ'=>'ạ','Ả'=>'ả','Ấ'=>'ấ','Ầ'=>'ầ','Ẩ'=>'ẩ','Ẫ'=>'ẫ','Ậ'=>'ậ','Ắ'=>'ắ','Ằ'=>'ằ','Ẳ'=>'ẳ','Ẵ'=>'ẵ','Ặ'=>'ặ','Ẹ'=>'ẹ','Ẻ'=>'ẻ','Ẽ'=>'ẽ','Ế'=>'ế','Ề'=>'á»','Ể'=>'ể','Ễ'=>'á»…','Ệ'=>'ệ','Ỉ'=>'ỉ','Ị'=>'ị','Ọ'=>'á»','Ỏ'=>'á»','á»'=>'ố','á»’'=>'ồ','á»”'=>'ổ','á»–'=>'á»—','Ộ'=>'á»™','Ớ'=>'á»›','Ờ'=>'á»','Ở'=>'ở','á» '=>'ỡ','Ợ'=>'ợ','Ụ'=>'ụ','Ủ'=>'ủ','Ứ'=>'ứ','Ừ'=>'ừ','Ử'=>'á»­','á»®'=>'ữ','á»°'=>'á»±','Ỳ'=>'ỳ','á»´'=>'ỵ','Ỷ'=>'á»·','Ỹ'=>'ỹ','Ἀ'=>'á¼€','Ἁ'=>'á¼','Ἂ'=>'ἂ','Ἃ'=>'ἃ','Ἄ'=>'ἄ','á¼'=>'á¼…','Ἆ'=>'ἆ','á¼'=>'ἇ','Ἐ'=>'á¼','á¼™'=>'ἑ','Ἒ'=>'á¼’','á¼›'=>'ἓ','Ἔ'=>'á¼”','á¼'=>'ἕ','Ἠ'=>'á¼ ','Ἡ'=>'ἡ','Ἢ'=>'á¼¢','Ἣ'=>'á¼£','Ἤ'=>'ἤ','á¼­'=>'á¼¥','á¼®'=>'ἦ','Ἧ'=>'ἧ','Ἰ'=>'á¼°','á¼¹'=>'á¼±','Ἲ'=>'á¼²','á¼»'=>'á¼³','á¼¼'=>'á¼´','á¼½'=>'á¼µ','á¼¾'=>'ἶ','Ἷ'=>'á¼·','Ὀ'=>'á½€','Ὁ'=>'á½','Ὂ'=>'ὂ','Ὃ'=>'ὃ','Ὄ'=>'ὄ','á½'=>'á½…','á½™'=>'ὑ','á½›'=>'ὓ','á½'=>'ὕ','Ὗ'=>'á½—','Ὠ'=>'á½ ','Ὡ'=>'ὡ','Ὢ'=>'á½¢','Ὣ'=>'á½£','Ὤ'=>'ὤ','á½­'=>'á½¥','á½®'=>'ὦ','Ὧ'=>'ὧ','Ᾰ'=>'á¾°','á¾¹'=>'á¾±','Ὰ'=>'á½°','á¾»'=>'á½±','á¾¾'=>'ι','Ὲ'=>'á½²','Έ'=>'á½³','á¿Š'=>'á½´','á¿‹'=>'á½µ','Ῐ'=>'á¿','á¿™'=>'á¿‘','á¿š'=>'ὶ','á¿›'=>'á½·','Ῠ'=>'á¿ ','á¿©'=>'á¿¡','Ὺ'=>'ὺ','á¿«'=>'á½»','Ῥ'=>'á¿¥','Ὸ'=>'ὸ','Ό'=>'á½¹','Ὼ'=>'á½¼','á¿»'=>'á½½','Ω'=>'ω','K'=>'k','â„«'=>'Ã¥','Ⅎ'=>'â…Ž','â… '=>'â…°','â…¡'=>'â…±','â…¢'=>'â…²','â…£'=>'â…³','â…¤'=>'â…´','â…¥'=>'â…µ','â…¦'=>'â…¶','â…§'=>'â…·','â…¨'=>'â…¸','â…©'=>'â…¹','â…ª'=>'â…º','â…«'=>'â…»','â…¬'=>'â…¼','â…­'=>'â…½','â…®'=>'â…¾','â…¯'=>'â…¿','Ↄ'=>'ↄ','â’¶'=>'â“','â’·'=>'â“‘','â’¸'=>'â“’','â’¹'=>'â““','â’º'=>'â“”','â’»'=>'â“•','â’¼'=>'â“–','â’½'=>'â“—','â’¾'=>'ⓘ','â’¿'=>'â“™','â“€'=>'â“š','â“'=>'â“›','â“‚'=>'â“œ','Ⓝ'=>'â“','â“„'=>'â“ž','â“…'=>'â“Ÿ','Ⓠ'=>'â“ ','Ⓡ'=>'â“¡','Ⓢ'=>'â“¢','Ⓣ'=>'â“£','â“Š'=>'ⓤ','â“‹'=>'â“¥','â“Œ'=>'ⓦ','â“'=>'ⓧ','â“Ž'=>'ⓨ','â“'=>'â“©','â°€'=>'â°°','â°'=>'â°±','â°‚'=>'â°²','â°ƒ'=>'â°³','â°„'=>'â°´','â°…'=>'â°µ','â°†'=>'â°¶','â°‡'=>'â°·','â°ˆ'=>'â°¸','â°‰'=>'â°¹','â°Š'=>'â°º','â°‹'=>'â°»','â°Œ'=>'â°¼','â°'=>'â°½','â°Ž'=>'â°¾','â°'=>'â°¿','â°'=>'â±€','â°‘'=>'â±','â°’'=>'ⱂ','â°“'=>'ⱃ','â°”'=>'ⱄ','â°•'=>'â±…','â°–'=>'ⱆ','â°—'=>'ⱇ','â°˜'=>'ⱈ','â°™'=>'ⱉ','â°š'=>'ⱊ','â°›'=>'ⱋ','â°œ'=>'ⱌ','â°'=>'â±','â°ž'=>'ⱎ','â°Ÿ'=>'â±','â° '=>'â±','â°¡'=>'ⱑ','â°¢'=>'â±’','â°£'=>'ⱓ','â°¤'=>'â±”','â°¥'=>'ⱕ','â°¦'=>'â±–','â°§'=>'â±—','â°¨'=>'ⱘ','â°©'=>'â±™','â°ª'=>'ⱚ','â°«'=>'â±›','â°¬'=>'ⱜ','â°­'=>'â±','â°®'=>'ⱞ','â± '=>'ⱡ','â±¢'=>'É«','â±£'=>'áµ½','Ɽ'=>'ɽ','Ⱨ'=>'ⱨ','Ⱪ'=>'ⱪ','Ⱬ'=>'ⱬ','â±µ'=>'ⱶ','â²€'=>'â²','Ⲃ'=>'ⲃ','Ⲅ'=>'â²…','Ⲇ'=>'ⲇ','Ⲉ'=>'ⲉ','Ⲋ'=>'ⲋ','Ⲍ'=>'â²','Ⲏ'=>'â²','â²'=>'ⲑ','â²’'=>'ⲓ','â²”'=>'ⲕ','â²–'=>'â²—','Ⲙ'=>'â²™','Ⲛ'=>'â²›','Ⲝ'=>'â²','Ⲟ'=>'ⲟ','â² '=>'ⲡ','â²¢'=>'â²£','Ⲥ'=>'â²¥','Ⲧ'=>'ⲧ','Ⲩ'=>'ⲩ','Ⲫ'=>'ⲫ','Ⲭ'=>'â²­','â²®'=>'ⲯ','â²°'=>'â²±','â²²'=>'â²³','â²´'=>'â²µ','Ⲷ'=>'â²·','Ⲹ'=>'â²¹','Ⲻ'=>'â²»','â²¼'=>'â²½','â²¾'=>'ⲿ','â³€'=>'â³','Ⳃ'=>'ⳃ','Ⳅ'=>'â³…','Ⳇ'=>'ⳇ','Ⳉ'=>'ⳉ','Ⳋ'=>'ⳋ','Ⳍ'=>'â³','Ⳏ'=>'â³','â³'=>'ⳑ','â³’'=>'ⳓ','â³”'=>'ⳕ','â³–'=>'â³—','Ⳙ'=>'â³™','Ⳛ'=>'â³›','Ⳝ'=>'â³','Ⳟ'=>'ⳟ','â³ '=>'ⳡ','â³¢'=>'â³£','A'=>'ï½','ï¼¢'=>'b','ï¼£'=>'c','D'=>'d','ï¼¥'=>'ï½…','F'=>'f','G'=>'g','H'=>'h','I'=>'i','J'=>'j','K'=>'k','L'=>'l','ï¼­'=>'ï½','ï¼®'=>'n','O'=>'ï½','ï¼°'=>'ï½','ï¼±'=>'q','ï¼²'=>'ï½’','ï¼³'=>'s','ï¼´'=>'ï½”','ï¼µ'=>'u','V'=>'ï½–','ï¼·'=>'ï½—','X'=>'x','ï¼¹'=>'ï½™','Z'=>'z','ð€'=>'ð¨','ð'=>'ð©','ð‚'=>'ðª','ðƒ'=>'ð«','ð„'=>'ð¬','ð…'=>'ð­','ð†'=>'ð®','ð‡'=>'ð¯','ðˆ'=>'ð°','ð‰'=>'ð±','ðŠ'=>'ð²','ð‹'=>'ð³','ðŒ'=>'ð´','ð'=>'ðµ','ðŽ'=>'ð¶','ð'=>'ð·','ð'=>'ð¸','ð‘'=>'ð¹','ð’'=>'ðº','ð“'=>'ð»','ð”'=>'ð¼','ð•'=>'ð½','ð–'=>'ð¾','ð—'=>'ð¿','ð˜'=>'ð‘€','ð™'=>'ð‘','ðš'=>'ð‘‚','ð›'=>'ð‘ƒ','ðœ'=>'ð‘„','ð'=>'ð‘…','ðž'=>'ð‘†','ðŸ'=>'ð‘‡','ð '=>'ð‘ˆ','ð¡'=>'ð‘‰','ð¢'=>'ð‘Š','ð£'=>'ð‘‹','ð¤'=>'ð‘Œ','ð¥'=>'ð‘','ð¦'=>'ð‘Ž','ð§'=>'ð‘'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/case_fold_f.php b/phpBB/includes/utf/data/case_fold_f.php
new file mode 100644
index 0000000000..7e2ffb25ec
--- /dev/null
+++ b/phpBB/includes/utf/data/case_fold_f.php
@@ -0,0 +1 @@
+<?php return array('ß'=>'ss','Ä°'=>'i̇','ʼn'=>'ʼn','Ç°'=>'jÌŒ','Î'=>'ϊÌ','ΰ'=>'ϋÌ','Ö‡'=>'Õ¥Ö‚','ẖ'=>'ẖ','ẗ'=>'ẗ','ẘ'=>'wÌŠ','ẙ'=>'yÌŠ','ẚ'=>'aʾ','á½'=>'Ï…Ì“','á½’'=>'Ï…Ì“Ì€','á½”'=>'Ï…Ì“Ì','á½–'=>'Ï…Ì“Í‚','á¾€'=>'ἀι','á¾'=>'á¼Î¹','ᾂ'=>'ἂι','ᾃ'=>'ἃι','ᾄ'=>'ἄι','á¾…'=>'ἅι','ᾆ'=>'ἆι','ᾇ'=>'ἇι','ᾈ'=>'ἀι','ᾉ'=>'á¼Î¹','ᾊ'=>'ἂι','ᾋ'=>'ἃι','ᾌ'=>'ἄι','á¾'=>'ἅι','ᾎ'=>'ἆι','á¾'=>'ἇι','á¾'=>'ἠι','ᾑ'=>'ἡι','á¾’'=>'ἢι','ᾓ'=>'ἣι','á¾”'=>'ἤι','ᾕ'=>'ἥι','á¾–'=>'ἦι','á¾—'=>'ἧι','ᾘ'=>'ἠι','á¾™'=>'ἡι','ᾚ'=>'ἢι','á¾›'=>'ἣι','ᾜ'=>'ἤι','á¾'=>'ἥι','ᾞ'=>'ἦι','ᾟ'=>'ἧι','á¾ '=>'ὠι','ᾡ'=>'ὡι','á¾¢'=>'ὢι','á¾£'=>'ὣι','ᾤ'=>'ὤι','á¾¥'=>'ὥι','ᾦ'=>'ὦι','ᾧ'=>'ὧι','ᾨ'=>'ὠι','ᾩ'=>'ὡι','ᾪ'=>'ὢι','ᾫ'=>'ὣι','ᾬ'=>'ὤι','á¾­'=>'ὥι','á¾®'=>'ὦι','ᾯ'=>'ὧι','á¾²'=>'ὰι','á¾³'=>'αι','á¾´'=>'άι','ᾶ'=>'ᾶ','á¾·'=>'ᾶι','á¾¼'=>'αι','á¿‚'=>'ὴι','ῃ'=>'ηι','á¿„'=>'ήι','ῆ'=>'ῆ','ῇ'=>'ῆι','á¿Œ'=>'ηι','á¿’'=>'ῒ','á¿“'=>'ϊÌ','á¿–'=>'ῖ','á¿—'=>'ῗ','á¿¢'=>'ῢ','á¿£'=>'ϋÌ','ῤ'=>'ÏÌ“','ῦ'=>'Ï…Í‚','ῧ'=>'ῧ','ῲ'=>'ὼι','ῳ'=>'ωι','á¿´'=>'ώι','ῶ'=>'ῶ','á¿·'=>'ῶι','ῼ'=>'ωι','ff'=>'ff','ï¬'=>'fi','fl'=>'fl','ffi'=>'ffi','ffl'=>'ffl','ſt'=>'st','st'=>'st','ﬓ'=>'Õ´Õ¶','ﬔ'=>'Õ´Õ¥','ﬕ'=>'Õ´Õ«','ﬖ'=>'Õ¾Õ¶','ﬗ'=>'Õ´Õ­'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/case_fold_s.php b/phpBB/includes/utf/data/case_fold_s.php
new file mode 100644
index 0000000000..5f09ffa1dd
--- /dev/null
+++ b/phpBB/includes/utf/data/case_fold_s.php
@@ -0,0 +1 @@
+<?php return array('ᾈ'=>'á¾€','ᾉ'=>'á¾','ᾊ'=>'ᾂ','ᾋ'=>'ᾃ','ᾌ'=>'ᾄ','á¾'=>'á¾…','ᾎ'=>'ᾆ','á¾'=>'ᾇ','ᾘ'=>'á¾','á¾™'=>'ᾑ','ᾚ'=>'á¾’','á¾›'=>'ᾓ','ᾜ'=>'á¾”','á¾'=>'ᾕ','ᾞ'=>'á¾–','ᾟ'=>'á¾—','ᾨ'=>'á¾ ','ᾩ'=>'ᾡ','ᾪ'=>'á¾¢','ᾫ'=>'á¾£','ᾬ'=>'ᾤ','á¾­'=>'á¾¥','á¾®'=>'ᾦ','ᾯ'=>'ᾧ','á¾¼'=>'á¾³','á¿Œ'=>'ῃ','ῼ'=>'ῳ'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/confusables.php b/phpBB/includes/utf/data/confusables.php
new file mode 100644
index 0000000000..7564978a26
--- /dev/null
+++ b/phpBB/includes/utf/data/confusables.php
@@ -0,0 +1 @@
+<?php return array('¡'=>'i','ǃ'=>'!','α'=>'a',' '=>' ','­'=>'','Û'=>'','Ü'=>'','á †'=>'','á Ž'=>'','​'=>'','‌'=>'','â€'=>'','
'=>'','
'=>'','â '=>'','â¡'=>'','â¢'=>'','â£'=>'','âª'=>'','â«'=>'','â¬'=>'','â­'=>'','â®'=>'','â¯'=>'',''=>'',''=>'',''=>'','ï¿»'=>'',''=>'','ð…³'=>'','ð…´'=>'','ð…µ'=>'','ð…¶'=>'','ð…·'=>'','ð…¸'=>'','ð…¹'=>'','ð…º'=>'','Û¬'=>'ÛŸ','̓'=>'Ì“','Ù'=>'Ì“','Öœ'=>'Ì','Í'=>'Ì','݇'=>'Ì','॔'=>'Ì','Í€'=>'Ì€','॓'=>'Ì€','ÌŒ'=>'̆','Ì‘'=>'Ì‚','Ö¯'=>'ÌŠ','ஂ'=>'ÌŠ','à¹'=>'ÌŠ','à»'=>'ÌŠ','ံ'=>'ÌŠ','ំ'=>'ÌŠ','៓'=>'ÌŠ','ã‚š'=>'ÌŠ','゚'=>'ÌŠ','ͦ'=>'ÌŠ','Í‚'=>'̃','ׄ'=>'̇','Ö¹'=>'̇','ׂ'=>'̇','×'=>'̇','Ý'=>'̇','ं'=>'̇','ਂ'=>'̇','ં'=>'̇','à¯'=>'̇','Ì…'=>'Ì„','〬'=>'̉','̱'=>'Ì ','॒'=>'Ì ','̧'=>'Ì¡','̦'=>'Ì¡','̨'=>'Ì¢','़'=>'Ì£','়'=>'Ì£','਼'=>'Ì£','઼'=>'Ì£','଼'=>'Ì£','͇'=>'̳','̶'=>'̵','ﱞ'=>'ï¹²Ù‘','ﱟ'=>'ï¹´Ù‘','ï³²'=>'ï¹·Ù‘','ï± '=>'ﹶّ','ï³³'=>'ï¹¹Ù‘','ﱡ'=>'ﹸّ','ï³´'=>'ï¹»Ù‘','ï±¢'=>'ﹺّ','ï±£'=>'ï¹¼Ù°','Ù´'=>'Ù”','Ý‚'=>'ܼ','౦'=>'o','೦'=>'o','゙'=>'ã‚™',' '=>' ',' '=>' ','â€'=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ','âŸ'=>' ',' '=>' ',' '=>' ',' '=>' ','`'=>'`','ï½€'=>'`','á¿€'=>'Ëœ','ï¼¾'=>'^','︿'=>'^','_'=>'_','ï¹'=>'_','﹎'=>'_','ï¹'=>'_','⌇'=>'︴','ï¼'=>'-','â€'=>'-','‑'=>'-','‒'=>'-','–'=>'-','﹘'=>'-','∼'=>'â“','ï½¥'=>'・','•'=>'・',','=>',','‚'=>',','Ù¬'=>'ØŒ','、'=>'ã€',';'=>';','ï¼›'=>';',':'=>':','Ö‰'=>':','︰'=>':','׃'=>':','â©´'=>'::=','.'=>'.','․'=>'.','Ü‚'=>'.','‥'=>'..','…'=>'...','。'=>'。','·'=>'·','‧'=>'·','∙'=>'·','â‹…'=>'·','á§'=>'·','ᔯ'=>'·4','áŒ'=>'·á','áŽ'=>'·áƒ','á'=>'·á„','á’'=>'·á…','á”'=>'·á†','á—'=>'·áŠ','á™'=>'·á‹','á·'=>'·á³','á‘€'=>'·á³','á‘‚'=>'·á´','á‘„'=>'·á¸','ᑆ'=>'·á¹','á‘—'=>'·ᑌ','á‘™'=>'·ᑎ','á‘›'=>'·á‘','á‘”'=>'·á‘','á‘'=>'·á‘','á‘Ÿ'=>'·ᑑ','á‘¡'=>'·ᑕ','á‘£'=>'·ᑖ','á‘´'=>'·ᑫ','ᑸ'=>'·ᑮ','ᑼ'=>'·ᑰ','ᑾ'=>'·ᑲ','á’€'=>'·ᑳ','á’’'=>'·ᒉ','á’”'=>'·ᒋ','á’–'=>'·ᒌ','á’š'=>'·ᒎ','á’œ'=>'·á’','á’ž'=>'·ᒑ','á’¬'=>'·ᒣ','á’®'=>'·ᒥ','á’°'=>'·ᒦ','á’²'=>'·ᒧ','á’´'=>'·ᒨ','á’¶'=>'·L','á’¸'=>'·ᒫ','ᓉ'=>'·ᓀ','á“‹'=>'·ᓇ','á“'=>'·ᓈ','á“œ'=>'·ᓓ','á“ž'=>'·ᓕ','á“ '=>'·ᓖ','á“¢'=>'·ᓗ','ᓤ'=>'·ᓘ','ᓦ'=>'·ᓚ','ᓨ'=>'·ᓛ','ᓶ'=>'·ᓭ','ᓸ'=>'·ᓯ','ᓺ'=>'·ᓰ','ᓼ'=>'·ᓱ','ᓾ'=>'·ᓲ','ᔀ'=>'·ᓴ','ᔂ'=>'·ᓵ','á”—'=>'·á”','á”™'=>'·ᔑ','á”›'=>'·ᔒ','á”'=>'·ᔓ','ᔟ'=>'·ᔔ','ᔡ'=>'·ᔕ','ᔣ'=>'·ᔖ','á”±'=>'·ᔨ','ᔳ'=>'·ᔩ','ᔵ'=>'·ᔪ','á”·'=>'·ᔫ','ᔹ'=>'·ᔭ','á”»'=>'·ᔮ','á•Ž'=>'·ᕌ','á•›'=>'·ᕚ','ᕨ'=>'·ᕧ','('=>'(','â‘´'=>'(1)','â’§'=>'(l)','⑽'=>'(10)','⑾'=>'(11)','â‘¿'=>'(12)','â’€'=>'(13)','â’'=>'(14)','â’‚'=>'(15)','â’ƒ'=>'(16)','â’„'=>'(17)','â’…'=>'(18)','â’†'=>'(19)','⑵'=>'(2)','â’‡'=>'(20)','⑶'=>'(3)','â‘·'=>'(4)','⑸'=>'(5)','⑹'=>'(6)','⑺'=>'(7)','â‘»'=>'(8)','⑼'=>'(9)','â’œ'=>'(a)','â’'=>'(b)','â’ž'=>'(c)','â’Ÿ'=>'(d)','â’ '=>'(e)','â’¡'=>'(f)','â’¢'=>'(g)','â’£'=>'(h)','â’¤'=>'(i)','â’¥'=>'(j)','â’¦'=>'(k)','â’¨'=>'(m)','â’©'=>'(n)','â’ª'=>'(o)','â’«'=>'(p)','â’¬'=>'(q)','â’­'=>'(r)','â’®'=>'(s)','â’¯'=>'(t)','â’°'=>'(u)','â’±'=>'(v)','â’²'=>'(w)','â’³'=>'(x)','â’´'=>'(y)','â’µ'=>'(z)','㈀'=>'(á„€)','㈎'=>'(ê°€)','ãˆ'=>'(á„‚)','ãˆ'=>'(나)','㈂'=>'(ᄃ)','ãˆ'=>'(다)','㈃'=>'(á„…)','㈑'=>'(ë¼)','㈄'=>'(ᄆ)','㈒'=>'(마)','㈅'=>'(ᄇ)','㈓'=>'(ë°”)','㈆'=>'(ᄉ)','㈔'=>'(사)','㈇'=>'(á„‹)','㈕'=>'(ì•„)','ãˆ'=>'(오전)','㈞'=>'(오후)','㈈'=>'(á„Œ)','㈖'=>'(ìž)','㈜'=>'(주)','㈉'=>'(á„Ž)','㈗'=>'(ì°¨)','㈊'=>'(á„)','㈘'=>'(ì¹´)','㈋'=>'(á„)','㈙'=>'(타)','㈌'=>'(á„‘)','㈚'=>'(파)','ãˆ'=>'(á„’)','㈛'=>'(하)','㈠'=>'(一)','㈦'=>'(七)','㈢'=>'(三)','㈨'=>'(ä¹)','㈡'=>'(二)','㈤'=>'(五)','㈹'=>'(代)','㈽'=>'(ä¼)','ã‰'=>'(休)','㈧'=>'(å…«)','㈥'=>'(å…­)','㈸'=>'(労)','㈩'=>'(å)','㈿'=>'(å”)','㈴'=>'(å)','㈺'=>'(呼)','㈣'=>'(å››)','㈯'=>'(土)','㈻'=>'(å­¦)','㈰'=>'(æ—¥)','㈪'=>'(月)','㈲'=>'(有)','㈭'=>'(木)','㈱'=>'(æ ª)','㈬'=>'(æ°´)','㈫'=>'(ç«)','㈵'=>'(特)','㈼'=>'(監)','㈳'=>'(社)','㈷'=>'(ç¥)','㉀'=>'(祭)','㉂'=>'(自)','㉃'=>'(至)','㈶'=>'(財)','㈾'=>'(資)','㈮'=>'(金)',')'=>')','ï¼»'=>'[','〔'=>'[','ï¼½'=>']','〕'=>']','ï½›'=>'{','ï½'=>'}','⦅'=>'⦅','ï½ '=>'⦆','ï½¢'=>'「','ï½£'=>'ã€','ï¼ '=>'@','*'=>'*','ï¼'=>'/','â„'=>'/','∕'=>'/','ï¼¼'=>'\\','&'=>'&','#'=>'#','ï¼…'=>'%','‶'=>'‵‵','‷'=>'‵‵‵','༌'=>'་','´'=>'ʹ','΄'=>'ʹ','´'=>'ʹ','\''=>'ʹ','''=>'ʹ','′'=>'ʹ','׳'=>'ʹ','Í´'=>'ʹ','ËŠ'=>'ʹ','"'=>'ʹʹ','"'=>'ʹʹ','″'=>'ʹʹ','〃'=>'ʹʹ','×´'=>'ʹʹ','ʺ'=>'ʹʹ','‴'=>'ʹʹʹ','â—'=>'ʹʹʹʹ','¯'=>'ˉ','ï¿£'=>'ˉ','‾'=>'ˉ','﹉'=>'ˉ','﹊'=>'ˉ','﹋'=>'ˉ','﹌'=>'ˉ','Ëš'=>'°','௵'=>'௳','ï¿©'=>'â†','ï¿«'=>'→','↑'=>'↑','↓'=>'↓','↵'=>'↲','⨡'=>'↾','ð››'=>'∂','ðœ•'=>'∂','ð'=>'∂','ðž‰'=>'∂','ðŸƒ'=>'∂','ð›'=>'∇','ð›»'=>'∇','ðœµ'=>'∇','ð¯'=>'∇','ðž©'=>'∇','+'=>'+','﬩'=>'+','‹'=>'<','<'=>'<','ï¼'=>'=','⩵'=>'==','⩶'=>'===','›'=>'>','>'=>'>','ï¿¢'=>'¬','¦'=>'¦','〜'=>'~','~'=>'~','﹨'=>'∖','â‹€'=>'∧','â‹'=>'∨','â‹‚'=>'∩','⋃'=>'∪','∯'=>'∮∮','∰'=>'∮∮∮','≣'=>'≡','â™'=>'⊕','☉'=>'⊙','⟂'=>'⊥','â–·'=>'⊲','â¨'=>'⋈','⨽'=>'⌙','☸'=>'⎈','⎮'=>'⎥','│'=>'│','â–'=>'â–Œ','ï¿­'=>'â– ','â˜'=>'â–¡','ï¿®'=>'â—‹','⦾'=>'â—Ž','〛'=>'⟧','〈'=>'⟨','〈'=>'⟨','〉'=>'⟩','〉'=>'⟩','⧙'=>'⦚','〶'=>'〒','ï½°'=>'ー','ï¿ '=>'¢','$'=>'$','ï¿¡'=>'£','ï¿¥'=>'Y̵','₩'=>'W̵','ï¼'=>'0','ðŸŽ'=>'0','ðŸ˜'=>'0','ðŸ¢'=>'0','ðŸ¬'=>'0','ðŸ¶'=>'0','০'=>'0','à­¦'=>'0','௦'=>'0','á '=>'0','〇'=>'0','ðŽ'=>'0','ð‘‚'=>'0','ð‘¶'=>'0','ð’ª'=>'0','ð“ž'=>'0','ð”’'=>'0','ð•†'=>'0','ð•º'=>'0','ð–®'=>'0','ð—¢'=>'0','ð˜–'=>'0','ð™Š'=>'0','ð™¾'=>'0','ðš¶'=>'0','ð›°'=>'0','ðœª'=>'0','ð¤'=>'0','ðžž'=>'0','âµ”'=>'0','à´ '=>'0','⊖'=>'0̵','ðš¯'=>'0̵','ðš¹'=>'0̵','ð›©'=>'0̵','ð›³'=>'0̵','ðœ£'=>'0̵','ðœ­'=>'0̵','ð'=>'0̵','ð§'=>'0̵','ðž—'=>'0̵','ðž¡'=>'0̵','â´±'=>'0̵','Ꮎ'=>'0̵','Û°'=>'Ù ','á­œ'=>'á­','ã˜'=>'0点','1'=>'1','ðŸ'=>'1','ðŸ™'=>'1','ðŸ£'=>'1','ðŸ­'=>'1','ðŸ·'=>'1','â„'=>'1','â„‘'=>'1','ðˆ'=>'1','ð¼'=>'1','ð‘°'=>'1','ð“˜'=>'1','ð•€'=>'1','ð•´'=>'1','ð–¨'=>'1','ð—œ'=>'1','ð˜'=>'1','ð™„'=>'1','ð™¸'=>'1','l'=>'l','l'=>'l','â…¼'=>'1','â„“'=>'l','ð¥'=>'l','ð‘™'=>'l','ð’'=>'l','ð“'=>'l','ð“µ'=>'l','ð”©'=>'l','ð•'=>'l','ð–‘'=>'l','ð—…'=>'l','ð—¹'=>'l','ð˜­'=>'l','ð™¡'=>'l','ðš•'=>'l','ðš°'=>'l','ð›ª'=>'l','ðœ¤'=>'l','ðž'=>'l','ðž˜'=>'l','â‘ '=>'➀','É­'=>'lÌ¢','É«'=>'lÌ´','Æš'=>'l̵','Å‚'=>'lÌ·','Û±'=>'Ù¡','â’ˆ'=>'1.','Å€'=>'l·','á’·'=>'1·','â‘©'=>'➉','â’‘'=>'10.','ã©'=>'10æ—¥','㋉'=>'10月','ã¢'=>'10点','â’’'=>'11.','ãª'=>'11æ—¥','ã‹Š'=>'11月','ã£'=>'11点','â’“'=>'12.','ã«'=>'12æ—¥','ã‹‹'=>'12月','ã¤'=>'12点','â’”'=>'13.','ã¬'=>'13æ—¥','ã¥'=>'13点','â’•'=>'14.','ã­'=>'14æ—¥','ã¦'=>'14点','â’–'=>'15.','ã®'=>'15æ—¥','ã§'=>'15点','â’—'=>'16.','ã¯'=>'16æ—¥','ã¨'=>'16点','â’˜'=>'17.','ã°'=>'17æ—¥','ã©'=>'17点','â’™'=>'18.','ã±'=>'18æ—¥','ãª'=>'18点','â’š'=>'19.','ã²'=>'19æ—¥','ã«'=>'19点','lj'=>'lj','ã '=>'1æ—¥','ã‹€'=>'1月','ã™'=>'1点','ï¼’'=>'2','ðŸ'=>'2','ðŸš'=>'2','ðŸ¤'=>'2','ðŸ®'=>'2','ðŸ¸'=>'2','á’¿'=>'2','â‘¡'=>'âž','Û²'=>'Ù¢','â’‰'=>'2.','â’›'=>'20.','ã³'=>'20æ—¥','ã¬'=>'20点','ã´'=>'21æ—¥','ã­'=>'21点','ãµ'=>'22æ—¥','ã®'=>'22点','ã¶'=>'23æ—¥','ã¯'=>'23点','ã·'=>'24æ—¥','ã°'=>'24点','ã¸'=>'25æ—¥','ã¹'=>'26æ—¥','ãº'=>'27æ—¥','ã»'=>'28æ—¥','ã¼'=>'29æ—¥','ã¡'=>'2æ—¥','ã‹'=>'2月','ãš'=>'2点','3'=>'3','ðŸ‘'=>'3','ðŸ›'=>'3','ðŸ¥'=>'3','ðŸ¯'=>'3','ðŸ¹'=>'3','â‘¢'=>'âž‚','Û³'=>'Ù£','â’Š'=>'3.','ã½'=>'30æ—¥','ã¾'=>'31æ—¥','ã¢'=>'3æ—¥','ã‹‚'=>'3月','ã›'=>'3点','ï¼”'=>'4','ðŸ’'=>'4','ðŸœ'=>'4','ðŸ¦'=>'4','ðŸ°'=>'4','ðŸº'=>'4','áŽ'=>'4','â‘£'=>'➃','â’‹'=>'4.','á”°'=>'4·','ã£'=>'4æ—¥','㋃'=>'4月','ãœ'=>'4点','5'=>'5','ðŸ“'=>'5','ðŸ'=>'5','ðŸ§'=>'5','ðŸ±'=>'5','ðŸ»'=>'5','⑤'=>'âž„','â’Œ'=>'5.','ã¤'=>'5æ—¥','ã‹„'=>'5月','ã'=>'5点','ï¼–'=>'6','ðŸ”'=>'6','ðŸž'=>'6','ðŸ¨'=>'6','ðŸ²'=>'6','ðŸ¼'=>'6','б'=>'6','â‘¥'=>'âž…','â’'=>'6.','ã¥'=>'6æ—¥','ã‹…'=>'6月','ãž'=>'6点','ï¼—'=>'7','ðŸ•'=>'7','ðŸŸ'=>'7','ðŸ©'=>'7','ðŸ³'=>'7','ðŸ½'=>'7','⑦'=>'➆','Û·'=>'Ù§','â’Ž'=>'7.','ã¦'=>'7æ—¥','㋆'=>'7月','ãŸ'=>'7点','ଃ'=>'8','৪'=>'8','੪'=>'8','8'=>'8','ðŸ–'=>'8','ðŸ '=>'8','ðŸª'=>'8','ðŸ´'=>'8','ðŸ¾'=>'8','È£'=>'8','⑧'=>'➇','Û¸'=>'Ù¨','â’'=>'8.','ã§'=>'8æ—¥','㋇'=>'8月','ã '=>'8点','੧'=>'9','à­¨'=>'9','৭'=>'9','ï¼™'=>'9','ðŸ—'=>'9','ðŸ¡'=>'9','ðŸ«'=>'9','ðŸµ'=>'9','ðŸ¿'=>'9','⑨'=>'➈','Û¹'=>'Ù©','â’'=>'9.','ã¨'=>'9æ—¥','㋈'=>'9月','ã¡'=>'9点','ï½'=>'a','ðš'=>'a','ð‘Ž'=>'a','ð’‚'=>'a','ð’¶'=>'a','ð“ª'=>'a','ð”ž'=>'a','ð•’'=>'a','ð–†'=>'a','ð–º'=>'a','ð—®'=>'a','ð˜¢'=>'a','ð™–'=>'a','ðšŠ'=>'a','â„€'=>'a/c','â„'=>'a/s','æ'=>'ae','b'=>'b','ð›'=>'b','ð‘'=>'b','ð’ƒ'=>'b','ð’·'=>'b','ð“«'=>'b','ð”Ÿ'=>'b','ð•“'=>'b','ð–‡'=>'b','ð–»'=>'b','ð—¯'=>'b','ð˜£'=>'b','ð™—'=>'b','ðš‹'=>'b','É“'=>'bÌ”','ƃ'=>'bÌ„','Æ€'=>'b̵','c'=>'c','â…½'=>'c','ðœ'=>'c','ð‘'=>'c','ð’„'=>'c','ð’¸'=>'c','ð“¬'=>'c','ð” '=>'c','ð•”'=>'c','ð–ˆ'=>'c','ð–¼'=>'c','ð—°'=>'c','ð˜¤'=>'c','ð™˜'=>'c','ðšŒ'=>'c','ð›“'=>'c','ðœ'=>'c','ð‡'=>'c','ðž'=>'c','ðž»'=>'c','â„…'=>'c/o','℆'=>'c/u','d'=>'d','â…¾'=>'d','â…†'=>'d','ð'=>'d','ð‘‘'=>'d','ð’…'=>'d','ð’¹'=>'d','ð“­'=>'d','ð”¡'=>'d','ð••'=>'d','ð–‰'=>'d','ð–½'=>'d','ð—±'=>'d','ð˜¥'=>'d','ð™™'=>'d','ðš'=>'d','É—'=>'dÌ”','ÆŒ'=>'dÌ„','É–'=>'dÌ¢','Ä‘'=>'d̵','dz'=>'dz','dž'=>'dž','ï½…'=>'e','ℯ'=>'e','â…‡'=>'e','ðž'=>'e','ð‘’'=>'e','ð’†'=>'e','ð“®'=>'e','ð”¢'=>'e','ð•–'=>'e','ð–Š'=>'e','ð–¾'=>'e','ð—²'=>'e','ð˜¦'=>'e','ð™š'=>'e','ðšŽ'=>'e','â´¹'=>'E','É™'=>'Ç','Éš'=>'ÇËž','â‹´'=>'É›','ð›†'=>'É›','ð›œ'=>'É›','ðœ€'=>'É›','ðœ–'=>'É›','ðœº'=>'É›','ð'=>'É›','ð´'=>'É›','ðžŠ'=>'É›','ðž®'=>'É›','ðŸ„'=>'É›','f'=>'f','ðŸ'=>'f','ð‘“'=>'f','ð’‡'=>'f','ð’»'=>'f','ð“¯'=>'f','ð”£'=>'f','ð•—'=>'f','ð–‹'=>'f','ð–¿'=>'f','ð—³'=>'f','ð˜§'=>'f','ð™›'=>'f','ðš'=>'f','Æ’'=>'fÌ¡','g'=>'g','â„Š'=>'g','ð '=>'g','ð‘”'=>'g','ð’ˆ'=>'g','ð“°'=>'g','ð”¤'=>'g','ð•˜'=>'g','ð–Œ'=>'g','ð—€'=>'g','ð—´'=>'g','ð˜¨'=>'g','ð™œ'=>'g','ðš'=>'g','É¡'=>'g','É '=>'gÌ”','Ç¥'=>'g̵','h'=>'h','â„Ž'=>'h','ð¡'=>'h','ð’‰'=>'h','ð’½'=>'h','ð“±'=>'h','ð”¥'=>'h','ð•™'=>'h','ð–'=>'h','ð—'=>'h','ð—µ'=>'h','ð˜©'=>'h','ð™'=>'h','ðš‘'=>'h','ɦ'=>'hÌ”','ħ'=>'h̵','â„'=>'h̵','῾'=>'Ê»','‘'=>'Ê»','‛'=>'Ê»','ʽ'=>'Ê»','â³'=>'i','i'=>'i','â…°'=>'i','ℹ'=>'i','â…ˆ'=>'i','ð¢'=>'i','ð‘–'=>'i','ð’Š'=>'i','ð’¾'=>'i','ð“²'=>'i','ð”¦'=>'i','ð•š'=>'i','ð–Ž'=>'i','ð—‚'=>'i','ð—¶'=>'i','ð˜ª'=>'i','ð™ž'=>'i','ðš’'=>'i','ı'=>'i','ðš¤'=>'i','ɪ'=>'i','É©'=>'i','ð›Š'=>'i','ðœ„'=>'i','ðœ¾'=>'i','ð¸'=>'i','ðž²'=>'i','ɨ'=>'i̵','â…±'=>'ii','â…²'=>'iii','ij'=>'ij','â…³'=>'iv','â…¸'=>'ix','j'=>'j','â…‰'=>'j','ð£'=>'j','ð‘—'=>'j','ð’‹'=>'j','ð’¿'=>'j','ð“³'=>'j','ð”§'=>'j','ð•›'=>'j','ð–'=>'j','ð—ƒ'=>'j','ð—·'=>'j','ð˜«'=>'j','ð™Ÿ'=>'j','ðš“'=>'j','ϳ'=>'j','ðš¥'=>'È·','k'=>'k','ð¤'=>'k','ð‘˜'=>'k','ð’Œ'=>'k','ð“€'=>'k','ð“´'=>'k','ð”¨'=>'k','ð•œ'=>'k','ð–'=>'k','ð—„'=>'k','ð—¸'=>'k','ð˜¬'=>'k','ð™ '=>'k','ðš”'=>'k','Æ™'=>'kÌ”','ï½'=>'m','â…¿'=>'m','ð¦'=>'m','ð‘š'=>'m','ð’Ž'=>'m','ð“‚'=>'m','ð“¶'=>'m','ð”ª'=>'m','ð•ž'=>'m','ð–’'=>'m','ð—†'=>'m','ð—º'=>'m','ð˜®'=>'m','ð™¢'=>'m','ðš–'=>'m','ɱ'=>'mÌ¡','n'=>'n','ð§'=>'n','ð‘›'=>'n','ð’'=>'n','ð“ƒ'=>'n','ð“·'=>'n','ð”«'=>'n','ð•Ÿ'=>'n','ð–“'=>'n','ð—‡'=>'n','ð—»'=>'n','ð˜¯'=>'n','ð™£'=>'n','ðš—'=>'n','ð'=>'N','ð‘'=>'N','ð‘µ'=>'N','ð’©'=>'N','ð“'=>'N','ð”‘'=>'N','ð•¹'=>'N','ð–­'=>'N','ð—¡'=>'N','ð˜•'=>'N','ð™‰'=>'N','ð™½'=>'N','ðš´'=>'N','ð›®'=>'N','ðœ¨'=>'N','ð¢'=>'N','ðžœ'=>'N','ɲ'=>'ņ','ɳ'=>'nÌ¢','Æž'=>'nÌ©','ð›ˆ'=>'nÌ©','ðœ‚'=>'nÌ©','ðœ¼'=>'nÌ©','ð¶'=>'nÌ©','ðž°'=>'nÌ©','ÇŒ'=>'nj','ï½'=>'o','â„´'=>'o','ð¨'=>'o','ð‘œ'=>'o','ð’'=>'o','ð“¸'=>'o','ð”¬'=>'o','ð• '=>'o','ð–”'=>'o','ð—ˆ'=>'o','ð—¼'=>'o','ð˜°'=>'o','ð™¤'=>'o','ðš˜'=>'o','á´'=>'o','ð›'=>'o','ðœŠ'=>'o','ð„'=>'o','ð¾'=>'o','ðž¸'=>'o','ɵ'=>'o̵','Ç¿'=>'o̵Ì','ø'=>'oÌ·','Å“'=>'oe','Æ¡'=>'oʼ','â´'=>'p','ï½'=>'p','ð©'=>'p','ð‘'=>'p','ð’‘'=>'p','ð“…'=>'p','ð“¹'=>'p','ð”­'=>'p','ð•¡'=>'p','ð–•'=>'p','ð—‰'=>'p','ð—½'=>'p','ð˜±'=>'p','ð™¥'=>'p','ðš™'=>'p','ð›’'=>'p','ð› '=>'p','ðœŒ'=>'p','ðœš'=>'p','ð†'=>'p','ð”'=>'p','ðž€'=>'p','ðžŽ'=>'p','ðžº'=>'p','ðŸˆ'=>'p','Æ¥'=>'pÌ”','q'=>'q','ðª'=>'q','ð‘ž'=>'q','ð’’'=>'q','ð“†'=>'q','ð“º'=>'q','ð”®'=>'q','ð•¢'=>'q','ð––'=>'q','ð—Š'=>'q','ð—¾'=>'q','ð˜²'=>'q','ð™¦'=>'q','ðšš'=>'q','ð'=>'Q','ð‘„'=>'Q','ð‘¸'=>'Q','ð’¬'=>'Q','ð“ '=>'Q','ð””'=>'Q','ð•¼'=>'Q','ð–°'=>'Q','ð—¤'=>'Q','ð˜˜'=>'Q','ð™Œ'=>'Q','ðš€'=>'Q','Ê '=>'qÌ”','ð›‹'=>'ĸ','ð›ž'=>'ĸ','ðœ…'=>'ĸ','ðœ˜'=>'ĸ','ðœ¿'=>'ĸ','ð’'=>'ĸ','ð¹'=>'ĸ','ðžŒ'=>'ĸ','ðž³'=>'ĸ','ðŸ†'=>'ĸ','ï½’'=>'r','ð«'=>'r','ð‘Ÿ'=>'r','ð’“'=>'r','ð“‡'=>'r','ð“»'=>'r','ð”¯'=>'r','ð•£'=>'r','ð–—'=>'r','ð—‹'=>'r','ð—¿'=>'r','ð˜³'=>'r','ð™§'=>'r','ðš›'=>'r','ɽ'=>'rÌ¢','ɼ'=>'rÌ©','s'=>'s','ð¬'=>'s','ð‘ '=>'s','ð’”'=>'s','ð“ˆ'=>'s','ð“¼'=>'s','ð”°'=>'s','ð•¤'=>'s','ð–˜'=>'s','ð—Œ'=>'s','ð˜€'=>'s','ð˜´'=>'s','ð™¨'=>'s','ðšœ'=>'s','ƽ'=>'s','Ê‚'=>'sÌ¢','∫'=>'ʃ','∬'=>'ʃʃ','∭'=>'ʃʃʃ','⨌'=>'ʃʃʃʃ','ï½”'=>'t','ð­'=>'t','ð‘¡'=>'t','ð’•'=>'t','ð“‰'=>'t','ð“½'=>'t','ð”±'=>'t','ð•¥'=>'t','ð–™'=>'t','ð—'=>'t','ð˜'=>'t','ð˜µ'=>'t','ð™©'=>'t','ðš'=>'t','ð‘‡'=>'T','ð‘»'=>'T','ð’¯'=>'T','ð“£'=>'T','ð”—'=>'T','ð•‹'=>'T','ð•¿'=>'T','ð–³'=>'T','ð—§'=>'T','ð˜›'=>'T','ð™'=>'T','ðšƒ'=>'T','ðš»'=>'T','ð›µ'=>'T','ðœ¯'=>'T','ð©'=>'T','ðž£'=>'T','Æ­'=>'tÌ”','È›'=>'Å£','Æ«'=>'Å£','ŧ'=>'t̵','u'=>'u','ð®'=>'u','ð‘¢'=>'u','ð’–'=>'u','ð“Š'=>'u','ð“¾'=>'u','ð”²'=>'u','ð•¦'=>'u','ð–š'=>'u','ð—Ž'=>'u','ð˜‚'=>'u','ð˜¶'=>'u','ð™ª'=>'u','ðšž'=>'u','ÊŠ'=>'u','Ê‹'=>'u','ð›–'=>'u','ðœ'=>'u','ðŠ'=>'u','ðž„'=>'u','ðž¾'=>'u','ð‘ˆ'=>'U','ð‘¼'=>'U','ð’°'=>'U','ð“¤'=>'U','ð”˜'=>'U','ð•Œ'=>'U','ð–€'=>'U','ð–´'=>'U','ð—¨'=>'U','ð˜œ'=>'U','ð™'=>'U','ðš„'=>'U','ï½–'=>'v','â…´'=>'v','ð¯'=>'v','ð‘£'=>'v','ð’—'=>'v','ð“‹'=>'v','ð“¿'=>'v','ð”³'=>'v','ð•§'=>'v','ð–›'=>'v','ð—'=>'v','ð˜ƒ'=>'v','ð˜·'=>'v','ð™«'=>'v','ðšŸ'=>'v','ð›Ž'=>'v','ðœˆ'=>'v','ð‚'=>'v','ð¼'=>'v','ðž¶'=>'v','â…µ'=>'vi','â…¶'=>'vii','â…·'=>'viii','ɯ'=>'w','ï½—'=>'w','ð°'=>'w','ð‘¤'=>'w','ð’˜'=>'w','ð“Œ'=>'w','ð”€'=>'w','ð”´'=>'w','ð•¨'=>'w','ð–œ'=>'w','ð—'=>'w','ð˜„'=>'w','ð˜¸'=>'w','ð™¬'=>'w','ðš '=>'w','ð‘Š'=>'W','ð‘¾'=>'W','ð’²'=>'W','ð“¦'=>'W','ð”š'=>'W','ð•Ž'=>'W','ð–‚'=>'W','ð–¶'=>'W','ð—ª'=>'W','ð˜ž'=>'W','ð™’'=>'W','ðš†'=>'W','×'=>'x','x'=>'x','â…¹'=>'x','ð±'=>'x','ð‘¥'=>'x','ð’™'=>'x','ð“'=>'x','ð”'=>'x','ð”µ'=>'x','ð•©'=>'x','ð–'=>'x','ð—‘'=>'x','ð˜…'=>'x','ð˜¹'=>'x','ð™­'=>'x','ðš¡'=>'x','á™­'=>'X','ð‘‹'=>'X','ð‘¿'=>'X','ð’³'=>'X','ð“§'=>'X','ð”›'=>'X','ð•'=>'X','ð–ƒ'=>'X','ð–·'=>'X','ð—«'=>'X','ð˜Ÿ'=>'X','ð™“'=>'X','ðš‡'=>'X','ðš¾'=>'X','ð›¸'=>'X','ðœ²'=>'X','ð¬'=>'X','ðž¦'=>'X','â…º'=>'xi','â…»'=>'xii','ï½™'=>'y','ð²'=>'y','ð‘¦'=>'y','ð’š'=>'y','ð“Ž'=>'y','ð”‚'=>'y','ð”¶'=>'y','ð•ª'=>'y','ð–ž'=>'y','ð—’'=>'y','ð˜†'=>'y','ð˜º'=>'y','ð™®'=>'y','ðš¢'=>'y','Æ´'=>'yÌ”','z'=>'z','ð³'=>'z','ð‘§'=>'z','ð’›'=>'z','ð“'=>'z','ð”ƒ'=>'z','ð”·'=>'z','ð•«'=>'z','ð–Ÿ'=>'z','ð—“'=>'z','ð˜‡'=>'z','ð˜»'=>'z','ð™¯'=>'z','ðš£'=>'z','È¥'=>'zÌ¡','Ê'=>'zÌ¢','ƶ'=>'z̵','È'=>'Ê’','?'=>'Ê”','?'=>'Ê”','â‡'=>'ʔʔ','âˆ'=>'ʔǃ','á¾½'=>'ʼ','᾿'=>'ʼ','’'=>'ʼ','ʾ'=>'ʼ','!'=>'ǃ','ï¼'=>'ǃ','â‰'=>'ǃʔ','‼'=>'ǃǃ','âº'=>'α','ð›‚'=>'α','ð›¼'=>'α','ðœ¶'=>'α','ð°'=>'α','ðžª'=>'α','ð›ƒ'=>'β','ð›½'=>'β','ðœ·'=>'β','ð±'=>'β','ðž«'=>'β','ℽ'=>'γ','ð›„'=>'γ','ð›¾'=>'γ','ðœ¸'=>'γ','ð²'=>'γ','ðž¬'=>'γ','ð›…'=>'δ','ð›¿'=>'δ','ðœ¹'=>'δ','ð³'=>'δ','ðž­'=>'δ','ðŸ‹'=>'Ï','ð›‡'=>'ζ','ðœ'=>'ζ','ðœ»'=>'ζ','ðµ'=>'ζ','ðž¯'=>'ζ','â¬'=>'θ','ð›‰'=>'θ','ð›'=>'θ','ðœƒ'=>'θ','ðœ—'=>'θ','ðœ½'=>'θ','ð‘'=>'θ','ð·'=>'θ','ðž‹'=>'θ','ðž±'=>'θ','ðŸ…'=>'θ','ð›Œ'=>'λ','ðœ†'=>'λ','ð€'=>'λ','ðº'=>'λ','ðž´'=>'λ','ð›¬'=>'Λ','ðœ¦'=>'Λ','ð '=>'Λ','ðžš'=>'Λ','ð›'=>'μ','ðœ‡'=>'μ','ð'=>'μ','ð»'=>'μ','ðžµ'=>'μ','ð›'=>'ξ','ðœ‰'=>'ξ','ðƒ'=>'ξ','ð½'=>'ξ','ðž·'=>'ξ','ð›¯'=>'Ξ','ðœ©'=>'Ξ','ð£'=>'Ξ','ðž'=>'Ξ','ℼ'=>'Ï€','ð›‘'=>'Ï€','ð›¡'=>'Ï€','ðœ‹'=>'Ï€','ðœ›'=>'Ï€','ð…'=>'Ï€','ð•'=>'Ï€','ð¿'=>'Ï€','ðž'=>'Ï€','ðž¹'=>'Ï€','ðŸ‰'=>'Ï€','á´¨'=>'Ï€','âˆ'=>'Π','ðš·'=>'Π','ð›±'=>'Π','ðœ«'=>'Π','ð¥'=>'Π','ðžŸ'=>'Π','ð›”'=>'σ','ðœŽ'=>'σ','ðˆ'=>'σ','ðž‚'=>'σ','ðž¼'=>'σ','ð›•'=>'Ï„','ðœ'=>'Ï„','ð‰'=>'Ï„','ðžƒ'=>'Ï„','ðž½'=>'Ï„','ð˜'=>'Y','ð‘Œ'=>'Y','ð’€'=>'Y','ð’´'=>'Y','ð“¨'=>'Y','ð”œ'=>'Y','ð•'=>'Y','ð–„'=>'Y','ð–¸'=>'Y','ð—¬'=>'Y','ð˜ '=>'Y','ð™”'=>'Y','ðšˆ'=>'Y','ðš¼'=>'Y','ð›¶'=>'Y','ðœ°'=>'Y','ðª'=>'Y','ðž¤'=>'Y','ð›—'=>'φ','ð›Ÿ'=>'φ','ðœ‘'=>'φ','ðœ™'=>'φ','ð‹'=>'φ','ð“'=>'φ','ðž…'=>'φ','ðž'=>'φ','ðž¿'=>'φ','ðŸ‡'=>'φ','ð›·'=>'Φ','ðœ±'=>'Φ','ð«'=>'Φ','ðž¥'=>'Φ','ð›˜'=>'χ','ðœ’'=>'χ','ðŒ'=>'χ','ðž†'=>'χ','ðŸ€'=>'χ','ð›™'=>'ψ','ðœ“'=>'ψ','ð'=>'ψ','ðž‡'=>'ψ','ðŸ'=>'ψ','ð›¹'=>'Ψ','ðœ³'=>'Ψ','ð­'=>'Ψ','ðž§'=>'Ψ','âµ'=>'ω','ð›š'=>'ω','ðœ”'=>'ω','ðŽ'=>'ω','ðžˆ'=>'ω','ðŸ‚'=>'ω','Ó•'=>'ae','Ò“'=>'r̵','Ò‘'=>'rá‘Š','Ò—'=>'ж̩','Ò™'=>'з̡','Ó'=>'i','Ò‹'=>'й̡','Ò›'=>'ĸ̩','ÒŸ'=>'ĸ̵','á´«'=>'л','Ó†'=>'л̡','ÓŽ'=>'м̡','ÓŠ'=>'н̡','Óˆ'=>'н̡','Ò£'=>'н̩','Ó©'=>'o̵','ѳ'=>'o̵','Ò«'=>'cÌ¡','Ò­'=>'Ñ‚Ì©','Ò¯'=>'y','Ò±'=>'y̵','Ñ›'=>'h̵','ѽ'=>'Ñ¡Òƒ','ÓŒ'=>'Ò·','Ò¿'=>'ҽ̢','Ò'=>'Ь̵','Õ¦'=>'q','Õ¼'=>'n','ℵ'=>'×','ﬡ'=>'×','אָ'=>'אַ','אּ'=>'אַ','ï­'=>'×ל','ℶ'=>'ב','â„·'=>'×’','ℸ'=>'ד','ﬢ'=>'ד','ﬣ'=>'×”','ﬤ'=>'×›','ﬥ'=>'ל','ﬦ'=>'×','ﬠ'=>'×¢','ﬧ'=>'ר','ﬨ'=>'ת','ﺀ'=>'Ø¡','ﺂ'=>'Ø¢','ïº'=>'Ø¢','ﺄ'=>'Ø£','ﺃ'=>'Ø£','Ùµ'=>'أ','ï­‘'=>'Ù±','ï­'=>'Ù±','ﺆ'=>'ؤ','ﺅ'=>'ؤ','Ù¶'=>'ÙˆÙ”','ﺈ'=>'Ø¥','ﺇ'=>'Ø¥','ﺋ'=>'ئ','ﺌ'=>'ئ','ﺊ'=>'ئ','ﺉ'=>'ئ','ﯫ'=>'ئا','ﯪ'=>'ئا','ﯸ'=>'ئٻ','ﯷ'=>'ئٻ','ﯶ'=>'ئٻ','ï²—'=>'ئج','ï°€'=>'ئج','ﲘ'=>'ئح','ï°'=>'ئح','ï²™'=>'ئخ','ﱤ'=>'ئر','ï±¥'=>'ئز','ﲚ'=>'ئم','ﳟ'=>'ئم','ﱦ'=>'ئم','ï°‚'=>'ئم','ﱧ'=>'ئن','ï²›'=>'ئه','ï³ '=>'ئه','ﯭ'=>'ئه','ﯬ'=>'ئه','ﯯ'=>'ئو','ﯮ'=>'ئو','ﯳ'=>'ئۆ','ﯲ'=>'ئۆ','ﯱ'=>'ئۇ','ﯰ'=>'ئۇ','ﯵ'=>'ئۈ','ﯴ'=>'ئۈ','ﯻ'=>'ئى','ﯺ'=>'ئى','ﱨ'=>'ئى','ﯹ'=>'ئى','ï°ƒ'=>'ئى','ﱩ'=>'ئى','ï°„'=>'ئى','ﺎ'=>'ا','ïº'=>'ا','ï´¼'=>'اً','ï´½'=>'اً','ï·³'=>'اكبر','ï·²'=>'الله','ﺑ'=>'ب','ﺒ'=>'ب','ïº'=>'ب','ïº'=>'ب','ﲜ'=>'بج','ï°…'=>'بج','ï²'=>'بح','ï°†'=>'بح','ï·‚'=>'بحى','ﲞ'=>'بخ','ï°‡'=>'بخ','ﶞ'=>'بخى','ﱪ'=>'بر','ﱫ'=>'بز','ﲟ'=>'بم','ﳡ'=>'بم','ﱬ'=>'بم','ï°ˆ'=>'بم','ï±­'=>'بن','ï² '=>'به','ï³¢'=>'به','ï±®'=>'بى','ï°‰'=>'بى','ﱯ'=>'بى','ï°Š'=>'بى','ï­”'=>'Ù»','ï­•'=>'Ù»','ï­“'=>'Ù»','ï­’'=>'Ù»','Û'=>'Ù»','ﯦ'=>'Ù»','ﯧ'=>'Ù»','ﯥ'=>'Ù»','ﯤ'=>'Ù»','ï­˜'=>'Ù¾','ï­™'=>'Ù¾','ï­—'=>'Ù¾','ï­–'=>'Ù¾','ï­œ'=>'Ú€','ï­'=>'Ú€','ï­›'=>'Ú€','ï­š'=>'Ú€','ﺔ'=>'Ø©','ﺓ'=>'Ø©','ﺗ'=>'ت','ﺘ'=>'ت','ﺖ'=>'ت','ﺕ'=>'ت','ﲡ'=>'تج','ï°‹'=>'تج','ïµ'=>'تجم','ﶠ'=>'تجى','ﶟ'=>'تجى','ï²¢'=>'تح','ï°Œ'=>'تح','ïµ’'=>'تحج','ﵑ'=>'تحج','ﵓ'=>'تحم','ï²£'=>'تخ','ï°'=>'تخ','ïµ”'=>'تخم','ﶢ'=>'تخى','ﶡ'=>'تخى','ï±°'=>'تر','ï±±'=>'تز','ﲤ'=>'تم','ï³£'=>'تم','ï±²'=>'تم','ï°Ž'=>'تم','ﵕ'=>'تمج','ïµ–'=>'تمح','ïµ—'=>'تمخ','ﶤ'=>'تمى','ﶣ'=>'تمى','ï±³'=>'تن','ï²¥'=>'ته','ﳤ'=>'ته','ï±´'=>'تى','ï°'=>'تى','ï±µ'=>'تى','ï°'=>'تى','ﺛ'=>'Ø«','ﺜ'=>'Ø«','ﺚ'=>'Ø«','ﺙ'=>'Ø«','ï°‘'=>'ثج','ﱶ'=>'ثر','ï±·'=>'ثز','ﲦ'=>'ثم','ï³¥'=>'ثم','ﱸ'=>'ثم','ï°’'=>'ثم','ï±¹'=>'ثن','ﳦ'=>'ثه','ﱺ'=>'ثى','ï°“'=>'ثى','ï±»'=>'ثى','ï°”'=>'ثى','ï­¨'=>'Ù¹','ï­©'=>'Ù¹','ï­§'=>'Ù¹','ï­¦'=>'Ù¹','Ú»'=>'Ù¹','ﮢ'=>'Ù¹','ﮣ'=>'Ù¹','ﮡ'=>'Ù¹','ï® '=>'Ù¹','ï­ '=>'Ùº','ï­¡'=>'Ùº','ï­Ÿ'=>'Ùº','ï­ž'=>'Ùº','ï­¤'=>'Ù¿','ï­¥'=>'Ù¿','ï­£'=>'Ù¿','ï­¢'=>'Ù¿','ﺟ'=>'ج','ﺠ'=>'ج','ﺞ'=>'ج','ïº'=>'ج','ﲧ'=>'جح','ï°•'=>'جح','ﶦ'=>'جحى','ﶾ'=>'جحى','ï·»'=>'جل جلاله','ﲨ'=>'جم','ï°–'=>'جم','ïµ™'=>'جمح','ﵘ'=>'جمح','ﶧ'=>'جمى','ﶥ'=>'جمى','ï´'=>'جى','ï´'=>'جى','ï´ž'=>'جى','ï´‚'=>'جى','ï­¸'=>'Úƒ','ï­¹'=>'Úƒ','ï­·'=>'Úƒ','ï­¶'=>'Úƒ','ï­´'=>'Ú„','ï­µ'=>'Ú„','ï­³'=>'Ú„','ï­²'=>'Ú„','ï­¼'=>'Ú†','ï­½'=>'Ú†','ï­»'=>'Ú†','ï­º'=>'Ú†','ﮀ'=>'Ú‡','ï®'=>'Ú‡','ï­¿'=>'Ú‡','ï­¾'=>'Ú‡','ﺣ'=>'Ø­','ﺤ'=>'Ø­','ﺢ'=>'Ø­','ﺡ'=>'Ø­','ﲩ'=>'حج','ï°—'=>'حج','ﶿ'=>'حجى','ﲪ'=>'حم','ï°˜'=>'حم','ïµ›'=>'حمى','ﵚ'=>'حمى','ï´›'=>'حى','ﳿ'=>'حى','ï´œ'=>'حى','ï´€'=>'حى','ﺧ'=>'Ø®','ﺨ'=>'Ø®','ﺦ'=>'Ø®','ﺥ'=>'Ø®','ﲫ'=>'خج','ï°™'=>'خج','ï°š'=>'خح','ﲬ'=>'خم','ï°›'=>'خم','ï´Ÿ'=>'خى','ï´ƒ'=>'خى','ï´ '=>'خى','ï´„'=>'خى','ﺪ'=>'د','ﺩ'=>'د','ﺬ'=>'Ø°','ﺫ'=>'Ø°','ï±›'=>'ذٰ','ﮉ'=>'Úˆ','ﮈ'=>'Úˆ','ï®…'=>'ÚŒ','ﮄ'=>'ÚŒ','ﮃ'=>'Ú','ﮂ'=>'Ú','ﮇ'=>'ÚŽ','ﮆ'=>'ÚŽ','ﺮ'=>'ر','ﺭ'=>'ر','ﱜ'=>'رٰ','ï·¶'=>'رسول','ï·¼'=>'رىال','ﺰ'=>'ز','ﺯ'=>'ز','ï®'=>'Ú‘','ﮌ'=>'Ú‘','ﮋ'=>'Ú˜','ﮊ'=>'Ú˜','ﺳ'=>'س','ﺴ'=>'س','ﺲ'=>'س','ﺱ'=>'س','ï²­'=>'سج','ï´´'=>'سج','ï°œ'=>'سج','ïµ'=>'سجح','ﵞ'=>'سجى','ï²®'=>'سح','ï´µ'=>'سح','ï°'=>'سح','ﵜ'=>'سحج','ﲯ'=>'سخ','ï´¶'=>'سخ','ï°ž'=>'سخ','ﶨ'=>'سخى','ï·†'=>'سخى','ï´ª'=>'سر','ï´Ž'=>'سر','ï²°'=>'سم','ﳧ'=>'سم','ï°Ÿ'=>'سم','ﵡ'=>'سمج','ïµ '=>'سمح','ﵟ'=>'سمح','ïµ£'=>'سمم','ïµ¢'=>'سمم','ï´±'=>'سه','ﳨ'=>'سه','ï´—'=>'سى','ï³»'=>'سى','ï´˜'=>'سى','ï³¼'=>'سى','ﺷ'=>'Ø´','ﺸ'=>'Ø´','ﺶ'=>'Ø´','ﺵ'=>'Ø´','ï´­'=>'شج','ï´·'=>'شج','ï´¥'=>'شج','ï´‰'=>'شج','ﵩ'=>'شجى','ï´®'=>'شح','ï´¸'=>'شح','ï´¦'=>'شح','ï´Š'=>'شح','ﵨ'=>'شحم','ﵧ'=>'شحم','ﶪ'=>'شحى','ï´¯'=>'شخ','ï´¹'=>'شخ','ï´§'=>'شخ','ï´‹'=>'شخ','ï´©'=>'شر','ï´'=>'شر','ï´°'=>'شم','ﳩ'=>'شم','ï´¨'=>'شم','ï´Œ'=>'شم','ﵫ'=>'شمخ','ﵪ'=>'شمخ','ïµ­'=>'شمم','ﵬ'=>'شمم','ï´²'=>'شه','ﳪ'=>'شه','ï´™'=>'شى','ï³½'=>'شى','ï´š'=>'شى','ï³¾'=>'شى','ﺻ'=>'ص','ﺼ'=>'ص','ﺺ'=>'ص','ﺹ'=>'ص','ï²±'=>'صح','ï° '=>'صح','ïµ¥'=>'صحح','ﵤ'=>'صحح','ﶩ'=>'صحى','ï²²'=>'صخ','ï´«'=>'صر','ï´'=>'صر','ï·µ'=>'صلعم','ï·¹'=>'صلى','ï·º'=>'صلى الله علىه وسلم','ï·°'=>'صلے','ï²³'=>'صم','ï°¡'=>'صم','ï·…'=>'صمم','ﵦ'=>'صمم','ï´¡'=>'صى','ï´…'=>'صى','ï´¢'=>'صى','ï´†'=>'صى','ﺿ'=>'ض','ﻀ'=>'ض','ﺾ'=>'ض','ﺽ'=>'ض','ï²´'=>'ضج','ï°¢'=>'ضج','ï²µ'=>'ضح','ï°£'=>'ضح','ïµ®'=>'ضحى','ﶫ'=>'ضحى','ﲶ'=>'ضخ','ï°¤'=>'ضخ','ïµ°'=>'ضخم','ﵯ'=>'ضخم','ï´¬'=>'ضر','ï´'=>'ضر','ï²·'=>'ضم','ï°¥'=>'ضم','ï´£'=>'ضى','ï´‡'=>'ضى','ï´¤'=>'ضى','ï´ˆ'=>'ضى','ﻃ'=>'Ø·','ﻄ'=>'Ø·','ﻂ'=>'Ø·','ï»'=>'Ø·','ﲸ'=>'طح','ï°¦'=>'طح','ï´³'=>'طم','ï´º'=>'طم','ï°§'=>'طم','ïµ²'=>'طمح','ïµ±'=>'طمح','ïµ³'=>'طمم','ïµ´'=>'طمى','ï´‘'=>'طى','ï³µ'=>'طى','ï´’'=>'طى','ﳶ'=>'طى','ﻇ'=>'ظ','ﻈ'=>'ظ','ﻆ'=>'ظ','ï»…'=>'ظ','ï²¹'=>'ظم','ï´»'=>'ظم','ï°¨'=>'ظم','ﻋ'=>'ع','ﻌ'=>'ع','ﻊ'=>'ع','ﻉ'=>'ع','ﲺ'=>'عج','ï°©'=>'عج','ï·„'=>'عجم','ïµµ'=>'عجم','ï··'=>'علىه','ï²»'=>'عم','ï°ª'=>'عم','ïµ·'=>'عمم','ﵶ'=>'عمم','ﵸ'=>'عمى','ﶶ'=>'عمى','ï´“'=>'عى','ï³·'=>'عى','ï´”'=>'عى','ﳸ'=>'عى','ï»'=>'غ','ï»'=>'غ','ﻎ'=>'غ','ï»'=>'غ','ï²¼'=>'غج','ï°«'=>'غج','ï²½'=>'غم','ï°¬'=>'غم','ïµ¹'=>'غمم','ïµ»'=>'غمى','ﵺ'=>'غمى','ï´•'=>'غى','ï³¹'=>'غى','ï´–'=>'غى','ﳺ'=>'غى','ﻓ'=>'Ù','ï»”'=>'Ù','ï»’'=>'Ù','ﻑ'=>'Ù','ï²¾'=>'Ùج','ï°­'=>'Ùج','ﲿ'=>'ÙØ­','ï°®'=>'ÙØ­','ï³€'=>'ÙØ®','ï°¯'=>'ÙØ®','ïµ½'=>'Ùخم','ïµ¼'=>'Ùخم','ï³'=>'ÙÙ…','ï°°'=>'ÙÙ…','ï·'=>'Ùمى','ï±¼'=>'ÙÙ‰','ï°±'=>'ÙÙ‰','ï±½'=>'ÙÙ‰','ï°²'=>'ÙÙ‰','ï­¬'=>'Ú¤','ï­­'=>'Ú¤','ï­«'=>'Ú¤','ï­ª'=>'Ú¤','ï­°'=>'Ú¦','ï­±'=>'Ú¦','ï­¯'=>'Ú¦','ï­®'=>'Ú¦','ï»—'=>'Ù‚','ﻘ'=>'Ù‚','ï»–'=>'Ù‚','ﻕ'=>'Ù‚','ﳂ'=>'قح','ï°³'=>'قح','ï·±'=>'قلے','ﳃ'=>'قم','ï°´'=>'قم','ﶴ'=>'قمح','ïµ¾'=>'قمح','ﵿ'=>'قمم','ﶲ'=>'قمى','ï±¾'=>'قى','ï°µ'=>'قى','ﱿ'=>'قى','ï°¶'=>'قى','ï»›'=>'Ùƒ','ﻜ'=>'Ùƒ','ﻚ'=>'Ùƒ','ï»™'=>'Ùƒ','Ú©'=>'Ùƒ','ï®'=>'Ùƒ','ﮑ'=>'Ùƒ','ï®'=>'Ùƒ','ﮎ'=>'Ùƒ','ï²€'=>'كا','ï°·'=>'كا','ﳄ'=>'كج','ï°¸'=>'كج','ï³…'=>'كح','ï°¹'=>'كح','ﳆ'=>'كخ','ï°º'=>'كخ','ﳇ'=>'كل','ﳫ'=>'كل','ï²'=>'كل','ï°»'=>'كل','ﳈ'=>'كم','ﳬ'=>'كم','ﲂ'=>'كم','ï°¼'=>'كم','ï·ƒ'=>'كمم','ﶻ'=>'كمم','ﶷ'=>'كمى','ﲃ'=>'كى','ï°½'=>'كى','ﲄ'=>'كى','ï°¾'=>'كى','ﯕ'=>'Ú­','ﯖ'=>'Ú­','ﯔ'=>'Ú­','ﯓ'=>'Ú­','ï®”'=>'Ú¯','ﮕ'=>'Ú¯','ﮓ'=>'Ú¯','ï®’'=>'Ú¯','ﮜ'=>'Ú±','ï®'=>'Ú±','ï®›'=>'Ú±','ﮚ'=>'Ú±','ﮘ'=>'Ú³','ï®™'=>'Ú³','ï®—'=>'Ú³','ï®–'=>'Ú³','ﻟ'=>'Ù„','ï» '=>'Ù„','ﻞ'=>'Ù„','ï»'=>'Ù„','ﻶ'=>'لآ','ﻵ'=>'لآ','ﻸ'=>'لأ','ï»·'=>'لأ','ﻺ'=>'لإ','ﻹ'=>'لإ','ﻼ'=>'لا','ï»»'=>'لا','ﳉ'=>'لج','ï°¿'=>'لج','ﶃ'=>'لجج','ﶄ'=>'لجج','ﶺ'=>'لجم','ﶼ'=>'لجم','ﶬ'=>'لجى','ﳊ'=>'لح','ï±€'=>'لح','ﶵ'=>'لحم','ﶀ'=>'لحم','ﶂ'=>'لحى','ï¶'=>'لحى','ﳋ'=>'لخ','ï±'=>'لخ','ﶆ'=>'لخم','ﶅ'=>'لخم','ﳌ'=>'لم','ï³­'=>'لم','ï²…'=>'لم','ﱂ'=>'لم','ﶈ'=>'لمح','ﶇ'=>'لمح','ﶭ'=>'لمى','ï³'=>'له','ﲆ'=>'لى','ﱃ'=>'لى','ﲇ'=>'لى','ﱄ'=>'لى','ﻣ'=>'Ù…','ﻤ'=>'Ù…','ﻢ'=>'Ù…','ﻡ'=>'Ù…','ﲈ'=>'ما','ﳎ'=>'مج','ï±…'=>'مج','ﶌ'=>'مجح','ﶒ'=>'مجخ','ï¶'=>'مجم','ï·€'=>'مجى','ï³'=>'مح','ﱆ'=>'مح','ﶉ'=>'محج','ﶊ'=>'محم','ï·´'=>'محمد','ﶋ'=>'محى','ï³'=>'مخ','ﱇ'=>'مخ','ﶎ'=>'مخج','ï¶'=>'مخم','ﶹ'=>'مخى','ﳑ'=>'مم','ﲉ'=>'مم','ﱈ'=>'مم','ﶱ'=>'ممى','ﱉ'=>'مى','ﱊ'=>'مى','ﻧ'=>'Ù†','ﻨ'=>'Ù†','ﻦ'=>'Ù†','ﻥ'=>'Ù†','ï³’'=>'نج','ﱋ'=>'نج','ﶸ'=>'نجح','ﶽ'=>'نجح','ﶘ'=>'نجم','ﶗ'=>'نجم','ﶙ'=>'نجى','ï·‡'=>'نجى','ﳓ'=>'نح','ﱌ'=>'نح','ﶕ'=>'نحم','ﶖ'=>'نحى','ﶳ'=>'نحى','ï³”'=>'نخ','ï±'=>'نخ','ﲊ'=>'نر','ﲋ'=>'نز','ﳕ'=>'نم','ï³®'=>'نم','ﲌ'=>'نم','ﱎ'=>'نم','ﶛ'=>'نمى','ﶚ'=>'نمى','ï²'=>'نن','ï³–'=>'نه','ﳯ'=>'نه','ﲎ'=>'نى','ï±'=>'نى','ï²'=>'نى','ï±'=>'نى','ﮟ'=>'Úº','ﮞ'=>'Úº','ﻫ'=>'Ù‡','ﻬ'=>'Ù‡','ﻪ'=>'Ù‡','ﻩ'=>'Ù‡','Ú¾'=>'Ù‡','ﮬ'=>'Ù‡','ï®­'=>'Ù‡','ﮫ'=>'Ù‡','ﮪ'=>'Ù‡','Û'=>'Ù‡','ﮨ'=>'Ù‡','ﮩ'=>'Ù‡','ﮧ'=>'Ù‡','ﮦ'=>'Ù‡','Û•'=>'Ù‡','ï³™'=>'هٰ','ï³—'=>'هج','ﱑ'=>'هج','ﳘ'=>'هم','ï±’'=>'هم','ﶓ'=>'همج','ﶔ'=>'همم','ﱓ'=>'هى','ï±”'=>'هى','ﮥ'=>'Û€','ﮤ'=>'Û€','ï»®'=>'Ùˆ','ï»­'=>'Ùˆ','ï·¸'=>'وسلم','ﯡ'=>'Û…','ﯠ'=>'Û…','ﯚ'=>'Û†','ﯙ'=>'Û†','ﯘ'=>'Û‡','ﯗ'=>'Û‡','Ù·'=>'Û‡Ù”','ï¯'=>'Û‡Ù”','ﯜ'=>'Ûˆ','ﯛ'=>'Ûˆ','ﯣ'=>'Û‰','ﯢ'=>'Û‰','ﯟ'=>'Û‹','ﯞ'=>'Û‹','ﯨ'=>'Ù‰','ﯩ'=>'Ù‰','ï»°'=>'Ù‰','ﻯ'=>'Ù‰','ÙŠ'=>'Ù‰','ﻳ'=>'Ù‰','ï»´'=>'Ù‰','ﻲ'=>'Ù‰','ï»±'=>'Ù‰','ÛŒ'=>'Ù‰','ﯾ'=>'Ù‰','ﯿ'=>'Ù‰','ﯽ'=>'Ù‰','ﯼ'=>'Ù‰','Ù¸'=>'Ù‰Ù”','ï²'=>'ىٰ','ï±'=>'ىٰ','ﳚ'=>'ىج','ﱕ'=>'ىج','ﶯ'=>'ىجى','ï³›'=>'ىح','ï±–'=>'ىح','ﶮ'=>'ىحى','ﳜ'=>'ىخ','ï±—'=>'ىخ','ﲑ'=>'ىر','ï²’'=>'ىز','ï³'=>'ىم','ï³°'=>'ىم','ﲓ'=>'ىم','ﱘ'=>'ىم','ï¶'=>'ىمم','ﶜ'=>'ىمم','ﶰ'=>'ىمى','ï²”'=>'ىن','ﳞ'=>'ىه','ï³±'=>'ىه','ﲕ'=>'ىى','ï±™'=>'ىى','ï²–'=>'ىى','ﱚ'=>'ىى','Û§'=>'Û¦','ﮯ'=>'Û’','ï®®'=>'Û’','ï®±'=>'Û“','ï®°'=>'Û“','∃'=>'â´º','आ'=>'अा','ऒ'=>'अाॆ','ओ'=>'अाे','औ'=>'अाै','ऄ'=>'अॆ','ऑ'=>'अॉ','à¤'=>'à¤à¥…','ऎ'=>'à¤à¥†','à¤'=>'à¤à¥‡','ई'=>'रà¥à¤‡','আ'=>'অা','ৠ'=>'ঋৃ','ৡ'=>'ঌৢ','ਉ'=>'ੳà©','ਊ'=>'ੳੂ','ਆ'=>'ਅਾ','à¨'=>'ਅੈ','ਔ'=>'ਅੌ','ਇ'=>'ੲਿ','ਈ'=>'ੲੀ','à¨'=>'ੲੇ','આ'=>'અા','ઑ'=>'અાૅ','ઓ'=>'અાે','ઔ'=>'અાૈ','àª'=>'અૅ','àª'=>'અે','àª'=>'અૈ','ଆ'=>'ଅା','௮'=>'à®…','à®°'=>'ஈ','ா'=>'ஈ','௫'=>'ஈà¯','௨'=>'உ','ஊ'=>'உள','௭'=>'எ','௷'=>'எவ','ஜ'=>'à®','௧'=>'க','௪'=>'ச','௬'=>'சà¯','௲'=>'சூ','௺'=>'நீ','ை'=>'ன','௴'=>'மீ','௰'=>'ய','ௗ'=>'ள','௸'=>'à®·','ொ'=>'ெஈ','ௌ'=>'ெள','ோ'=>'ேஈ','à± '=>'à°‹à°¾','ౡ'=>'ఌా','à°”'=>'ఒౌ','à°“'=>'ఒౕ','à°¢'=>'à°¡Ì£','à°­'=>'బ̣','à°·'=>'వ̣','à°¹'=>'వా','à°®'=>'à°µà±','ూ'=>'à±à°¾','ౄ'=>'ృా','ೡ'=>'ಌಾ','ಔ'=>'ఒౌ','à´ˆ'=>'ഇൗ','à´Š'=>'உൗ','à´'=>'എെ','à´“'=>'à´’à´¾','à´”'=>'ഒൗ','ൡ'=>'à´ž','൫'=>'à´¦àµà´°','à´Œ'=>'നூ','à´™'=>'നூ','൯'=>'à´¨àµ','à´±'=>'à´°','൪'=>'à´°àµ','൮'=>'à´µàµ','ീ'=>'ி','ൂ'=>'ூ','ൃ'=>'ூ','ൈ'=>'െെ','ฃ'=>'ข','ด'=>'ค','ต'=>'ค','ม'=>'ฆ','ซ'=>'ช','à¸'=>'ฎ','ท'=>'ฑ','ๅ'=>'า','ำ'=>'̊า','à¹'=>'เเ','ໜ'=>'ຫນ','à»'=>'ຫມ','ຳ'=>'̊າ','ཷ'=>'ྲཱྀ','ཹ'=>'ླཱྀ','á€'=>'o','ឣ'=>'អ','á§'=>'ᦞ','á­’'=>'á¬','á­“'=>'ᬑ','á­˜'=>'ᬨ','ᢖ'=>'á¡œ','á¡•'=>'á µ','á’'=>'Ꭱ','Ꮍ'=>'y','ð€'=>'A','ð´'=>'A','ð‘¨'=>'A','ð’œ'=>'A','ð“'=>'A','ð”„'=>'A','ð”¸'=>'A','ð•¬'=>'A','ð– '=>'A','ð—”'=>'A','ð˜ˆ'=>'A','ð˜¼'=>'A','ð™°'=>'A','ðš¨'=>'A','ð›¢'=>'A','ðœœ'=>'A','ð–'=>'A','ðž'=>'A','ð‰'=>'J','ð½'=>'J','ð‘±'=>'J','ð’¥'=>'J','ð“™'=>'J','ð”'=>'J','ð•'=>'J','ð•µ'=>'J','ð–©'=>'J','ð—'=>'J','ð˜‘'=>'J','ð™…'=>'J','ð™¹'=>'J','á§'=>'J','â‹¿'=>'E','â„°'=>'E','ð„'=>'E','ð¸'=>'E','ð‘¬'=>'E','ð“”'=>'E','ð”ˆ'=>'E','ð”¼'=>'E','ð•°'=>'E','ð–¤'=>'E','ð—˜'=>'E','ð˜Œ'=>'E','ð™€'=>'E','ð™´'=>'E','ðš¬'=>'E','ð›¦'=>'E','ðœ '=>'E','ðš'=>'E','ðž”'=>'E','ℾ'=>'Ꮁ','ðšª'=>'Ꮁ','ð›¤'=>'Ꮁ','ðœž'=>'Ꮁ','ð˜'=>'Ꮁ','ðž’'=>'Ꮁ','á”'=>'w','ℳ'=>'M','ðŒ'=>'M','ð‘€'=>'M','ð‘´'=>'M','ð“œ'=>'M','ð”'=>'M','ð•„'=>'M','ð•¸'=>'M','ð–¬'=>'M','ð— '=>'M','ð˜”'=>'M','ð™ˆ'=>'M','ð™¼'=>'M','ðš³'=>'M','ð›­'=>'M','ðœ§'=>'M','ð¡'=>'M','ðž›'=>'M','â„‹'=>'H','â„Œ'=>'H','â„'=>'H','ð‡'=>'H','ð»'=>'H','ð‘¯'=>'H','ð“—'=>'H','ð•³'=>'H','ð–§'=>'H','ð—›'=>'H','ð˜'=>'H','ð™ƒ'=>'H','ð™·'=>'H','ðš®'=>'H','ð›¨'=>'H','ðœ¢'=>'H','ðœ'=>'H','ðž–'=>'H','ð†'=>'G','ðº'=>'G','ð‘®'=>'G','ð’¢'=>'G','ð“–'=>'G','ð”Š'=>'G','ð”¾'=>'G','ð•²'=>'G','ð–¦'=>'G','ð—š'=>'G','ð˜Ž'=>'G','ð™‚'=>'G','ð™¶'=>'G','á³'=>'G','ℤ'=>'Z','ℨ'=>'Z','ð™'=>'Z','ð‘'=>'Z','ð’'=>'Z','ð’µ'=>'Z','ð“©'=>'Z','ð–…'=>'Z','ð–¹'=>'Z','ð—­'=>'Z','ð˜¡'=>'Z','ð™•'=>'Z','ðš‰'=>'Z','ðš­'=>'Z','ð›§'=>'Z','ðœ¡'=>'Z','ð›'=>'Z','ðž•'=>'Z','ð’'=>'S','ð‘†'=>'S','ð‘º'=>'S','ð’®'=>'S','ð“¢'=>'S','ð”–'=>'S','ð•Š'=>'S','ð•¾'=>'S','ð–²'=>'S','ð—¦'=>'S','ð˜š'=>'S','ð™Ž'=>'S','ðš‚'=>'S','áš'=>'S','ð•'=>'V','ð‘‰'=>'V','ð‘½'=>'V','ð’±'=>'V','ð“¥'=>'V','ð”™'=>'V','ð•'=>'V','ð–'=>'V','ð–µ'=>'V','ð—©'=>'V','ð˜'=>'V','ð™‘'=>'V','ðš…'=>'V','â„’'=>'L','ð‹'=>'L','ð¿'=>'L','ð‘³'=>'L','ð“›'=>'L','ð”'=>'L','ð•ƒ'=>'L','ð•·'=>'L','ð–«'=>'L','ð—Ÿ'=>'L','ð˜“'=>'L','ð™‡'=>'L','ð™»'=>'L','∑'=>'C','â…€'=>'C','â„‚'=>'C','â„­'=>'C','ð‚'=>'C','ð¶'=>'C','ð‘ª'=>'C','ð’ž'=>'C','ð“’'=>'C','ð•®'=>'C','ð–¢'=>'C','ð—–'=>'C','ð˜Š'=>'C','ð˜¾'=>'C','ð™²'=>'C','ðšº'=>'C','ð›´'=>'C','ðœ®'=>'C','ð¨'=>'C','ðž¢'=>'C','â„™'=>'P','ð'=>'P','ð‘ƒ'=>'P','ð‘·'=>'P','ð’«'=>'P','ð“Ÿ'=>'P','ð”“'=>'P','ð•»'=>'P','ð–¯'=>'P','ð—£'=>'P','ð˜—'=>'P','ð™‹'=>'P','ð™¿'=>'P','ðš¸'=>'P','ð›²'=>'P','ðœ¬'=>'P','ð¦'=>'P','ðž '=>'P','ðŠ'=>'K','ð¾'=>'K','ð‘²'=>'K','ð’¦'=>'K','ð“š'=>'K','ð”Ž'=>'K','ð•‚'=>'K','ð•¶'=>'K','ð–ª'=>'K','ð—ž'=>'K','ð˜’'=>'K','ð™†'=>'K','ð™º'=>'K','ðš±'=>'K','ð›«'=>'K','ðœ¥'=>'K','ðŸ'=>'K','ðž™'=>'K','ℬ'=>'B','ð'=>'B','ðµ'=>'B','ð‘©'=>'B','ð“‘'=>'B','ð”…'=>'B','ð”¹'=>'B','ð•­'=>'B','ð–¡'=>'B','ð—•'=>'B','ð˜‰'=>'B','ð˜½'=>'B','ð™±'=>'B','ðš©'=>'B','ð›£'=>'B','ðœ'=>'B','ð—'=>'B','ðž‘'=>'B','á'=>'á·','∆'=>'áƒ','ðš«'=>'áƒ','ð›¥'=>'áƒ','ðœŸ'=>'áƒ','ð™'=>'áƒ','ðž“'=>'áƒ','á'=>'áƒÂ·','á‘'=>'á„·','á“'=>'á…·','á•'=>'á†Â·','á˜'=>'áŠÂ·','áš'=>'á‹Â·','á“‘'=>'á¡','ᑶ'=>'·P','ᑺ'=>'·d','á’˜'=>'·J','á‘'=>'á³Â·','ᑃ'=>'á´Â·','á‘…'=>'á¸Â·','ᑇ'=>'á¹Â·','ˈ'=>'á‘Š','ᑘ'=>'ᑌ·','ᑧ'=>'ᑌᑊ','á‘š'=>'ᑎ·','ᑨ'=>'á‘Žá‘Š','á‘œ'=>'á‘·','á‘ž'=>'á‘·','á‘©'=>'á‘á‘Š','á‘ '=>'ᑑ·','á‘¢'=>'ᑕ·','ᑪ'=>'á‘•á‘Š','ᑤ'=>'ᑖ·','ᑵ'=>'ᑫ·','á’…'=>'á‘«á‘Š','á‘·'=>'P·','á’†'=>'Pá‘Š','ᑹ'=>'ᑮ·','á‘»'=>'d·','á’‡'=>'dá‘Š','ᑽ'=>'ᑰ·','á‘¿'=>'ᑲ·','á’ˆ'=>'ᑲᑊ','á’'=>'ᑳ·','ᘃ'=>'á’‰','á’“'=>'ᒉ·','á’•'=>'ᒋ·','á’—'=>'ᒌ·','á’™'=>'J·','á’›'=>'ᒎ·','ᘂ'=>'á’','á’'=>'á’·','á’Ÿ'=>'ᒑ·','á’­'=>'ᒣ·','á’¯'=>'ᒥ·','á’±'=>'ᒦ·','á’³'=>'ᒧ·','á’µ'=>'ᒨ·','á’¹'=>'ᒫ·','á“Š'=>'ᓀ·','á“Œ'=>'ᓇ·','á“Ž'=>'ᓈᒫ','ᘄ'=>'á““','á“'=>'ᓓ·','á“Ÿ'=>'ᓕ·','á“¡'=>'ᓖ·','á“£'=>'ᓗ·','á“¥'=>'ᓘ·','ᘇ'=>'á“š','ᓧ'=>'ᓚ·','á“©'=>'ᓛ·','á“·'=>'ᓭ·','ᓹ'=>'ᓯ·','á“»'=>'ᓰ·','ᓽ'=>'ᓱ·','á“¿'=>'ᓲ·','á”'=>'ᓴ·','ᔃ'=>'ᓵ·','ᔌ'=>'ᔋá¸','á”'=>'ᔋᑕ','ᔎ'=>'ᔋᑲ','á”'=>'ᔋá’','ᔘ'=>'á”·','ᔚ'=>'ᔑ·','ᔜ'=>'ᔒ·','ᔞ'=>'ᔓ·','á” '=>'ᔔ·','ᔢ'=>'ᔕ·','ᔤ'=>'ᔖ·','ᔲ'=>'ᔨ·','á”´'=>'ᔩ·','ᔶ'=>'ᔪ·','ᔸ'=>'ᔫ·','ᔺ'=>'ᔭ·','ᔼ'=>'ᔮ·','á™®'=>'x','ᕽ'=>'x','ᘢ'=>'ᕃ','ᘣ'=>'ᕆ','ᘤ'=>'á•Š','á•'=>'ᕌ·','ᙯ'=>'á•á‘«','ᕾ'=>'á•á‘¬','á•¿'=>'á•P','á–€'=>'á•á‘®','á–'=>'á•d','á–‚'=>'á•á‘°','á–ƒ'=>'á•á‘²','á–„'=>'á•á‘³','á–…'=>'á•á’ƒ','á•œ'=>'ᕚ·','á•©'=>'ᕧ·','â„›'=>'R','â„œ'=>'R','â„'=>'R','ð‘'=>'R','ð‘…'=>'R','ð‘¹'=>'R','ð“¡'=>'R','ð•½'=>'R','ð–±'=>'R','ð—¥'=>'R','ð˜™'=>'R','ð™'=>'R','ðš'=>'R','á™°'=>'á–•á’‰','á–Ž'=>'á–•á’Š','á–'=>'á–•á’‹','á–'=>'á–•á’Œ','á–‘'=>'á–•J','á–’'=>'á–•á’Ž','á–“'=>'á–•á’','á–”'=>'á–•á’‘','á™±'=>'á––á’‹','ᙲ'=>'á––á’Œ','ᙳ'=>'á––J','á™´'=>'á––á’Ž','ᙵ'=>'á––á’','ᙶ'=>'á––á’‘','ℱ'=>'F','ð…'=>'F','ð¹'=>'F','ð‘­'=>'F','ð“•'=>'F','ð”‰'=>'F','ð”½'=>'F','ð•±'=>'F','ð–¥'=>'F','ð—™'=>'F','ð˜'=>'F','ð™'=>'F','ð™µ'=>'F','ðŸŠ'=>'F','â……'=>'D','ðƒ'=>'D','ð·'=>'D','ð‘«'=>'D','ð’Ÿ'=>'D','ð““'=>'D','ð”‡'=>'D','ð”»'=>'D','ð•¯'=>'D','ð–£'=>'D','ð——'=>'D','ð˜‹'=>'D','ð˜¿'=>'D','ð™³'=>'D','á—ª'=>'D','℧'=>'ᘮ','ᘴ'=>'ᘮ','ð›€'=>'ᘯ','ð›º'=>'ᘯ','ðœ´'=>'ᘯ','ð®'=>'ᘯ','ðž¨'=>'ᘯ','ᘵ'=>'ᘯ','ㄱ'=>'á„€','ᄀ'=>'á„€','ᆨ'=>'á„€','ㄲ'=>'á„','ï¾¢'=>'á„','ᆩ'=>'á„','ã„´'=>'á„‚','ᄂ'=>'á„‚','ᆫ'=>'á„‚','ã„·'=>'ᄃ','ᄃ'=>'ᄃ','ᆮ'=>'ᄃ','ㄸ'=>'á„„','ᄄ'=>'á„„','ㄹ'=>'á„…','ᄅ'=>'á„…','ᆯ'=>'á„…','ã…'=>'ᄆ','ï¾±'=>'ᄆ','ᆷ'=>'ᄆ','ã…‚'=>'ᄇ','ï¾²'=>'ᄇ','ᆸ'=>'ᄇ','ã…ƒ'=>'ᄈ','ï¾³'=>'ᄈ','ã……'=>'ᄉ','ï¾µ'=>'ᄉ','ᆺ'=>'ᄉ','ã…†'=>'á„Š','ᄊ'=>'á„Š','ᆻ'=>'á„Š','ã…‡'=>'á„‹','ï¾·'=>'á„‹','ᆼ'=>'á„‹','ã…ˆ'=>'á„Œ','ᄌ'=>'á„Œ','ᆽ'=>'á„Œ','ã…‰'=>'á„','ï¾¹'=>'á„','ã…Š'=>'á„Ž','ᄎ'=>'á„Ž','ᆾ'=>'á„Ž','ã…‹'=>'á„','ï¾»'=>'á„','ᆿ'=>'á„','ã…Œ'=>'á„','ï¾¼'=>'á„','ᇀ'=>'á„','ã…'=>'á„‘','ï¾½'=>'á„‘','á‡'=>'á„‘','ã…Ž'=>'á„’','ï¾¾'=>'á„’','ᇂ'=>'á„’','ᇅ'=>'á„“','ã…¥'=>'á„”','ã…¦'=>'á„•','ᇆ'=>'á„•','ᇊ'=>'á„—','á‡'=>'ᄘ','á‡'=>'á„™','ã…€'=>'á„š','ï¾°'=>'á„š','á„»'=>'á„š','ᆶ'=>'á„š','ã…®'=>'á„œ','ᇜ'=>'á„œ','ã…±'=>'á„','ᇢ'=>'á„','ã…²'=>'á„ž','ã…³'=>'á„ ','ã…„'=>'á„¡','ï¾´'=>'á„¡','ᆹ'=>'á„¡','ã…´'=>'á„¢','ã…µ'=>'á„£','ã…¶'=>'ᄧ','ã…·'=>'á„©','ã…¸'=>'á„«','ᇦ'=>'á„«','ã…¹'=>'ᄬ','ã…º'=>'á„­','ᇧ'=>'á„­','ã…»'=>'á„®','ã…¼'=>'ᄯ','ᇨ'=>'ᄯ','ᇩ'=>'á„°','ã…½'=>'ᄲ','ᇪ'=>'ᄲ','ã…¾'=>'ᄶ','ã…¿'=>'á…€','ᇫ'=>'á…€','ᇬ'=>'á…','ᇱ'=>'á……','ㆂ'=>'á……','ᇲ'=>'á…†','ㆃ'=>'á…†','ㆀ'=>'á…‡','ᇮ'=>'á…‡','ã†'=>'á…Œ','ᇰ'=>'á…Œ','ᇳ'=>'á…–','ㆄ'=>'á…—','ᇴ'=>'á…—','ㆅ'=>'á…˜','ㆆ'=>'á…™','ᇹ'=>'á…™','ã…¤'=>'á… ','ï¾ '=>'á… ','ã…'=>'á…¡','ï¿‚'=>'á…¡','ã…'=>'á…¢','ᅢ'=>'á…¢','ã…‘'=>'á…£','ï¿„'=>'á…£','ã…’'=>'á…¤','ï¿…'=>'á…¤','ã…“'=>'á…¥','ᅥ'=>'á…¥','ã…”'=>'á…¦','ᅦ'=>'á…¦','ã…•'=>'á…§','ï¿Š'=>'á…§','ã…–'=>'á…¨','ï¿‹'=>'á…¨','ã…—'=>'á…©','ï¿Œ'=>'á…©','ã…˜'=>'á…ª','ï¿'=>'á…ª','ã…™'=>'á…«','ï¿Ž'=>'á…«','ã…š'=>'á…¬','ï¿'=>'á…¬','ã…›'=>'á…­','ï¿’'=>'á…­','ã…œ'=>'á…®','ï¿“'=>'á…®','ã…'=>'á…¯','ï¿”'=>'á…¯','ã…ž'=>'á…°','ï¿•'=>'á…°','ã…Ÿ'=>'á…±','ï¿–'=>'á…±','ã… '=>'á…²','ï¿—'=>'á…²','ã…¡'=>'一','ï¿š'=>'一','ã…¢'=>'á…´','ï¿›'=>'á…´','ã…£'=>'丨','ï¿œ'=>'丨','ㆇ'=>'ᆄ','ᆆ'=>'ᆄ','ㆈ'=>'ᆅ','ㆉ'=>'ᆈ','ㆊ'=>'ᆑ','ㆋ'=>'ᆒ','ㆌ'=>'ᆔ','ã†'=>'ᆞ','ㆎ'=>'ᆡ','ㄳ'=>'ᆪ','ï¾£'=>'ᆪ','ㄵ'=>'ᆬ','ï¾¥'=>'ᆬ','ㄶ'=>'ᆭ','ᆭ'=>'ᆭ','ㄺ'=>'ᆰ','ᆰ'=>'ᆰ','ã„»'=>'ᆱ','ᆱ'=>'ᆱ','ㄼ'=>'ᆲ','ᆲ'=>'ᆲ','ㄽ'=>'ᆳ','ï¾­'=>'ᆳ','ㄾ'=>'ᆴ','ï¾®'=>'ᆴ','ã„¿'=>'ᆵ','ᆵ'=>'ᆵ','ã…§'=>'ᇇ','ã…¨'=>'ᇈ','ã…©'=>'ᇌ','ã…ª'=>'ᇎ','ã…«'=>'ᇓ','ã…¬'=>'ᇗ','ã…­'=>'ᇙ','ã…¯'=>'á‡','ã…°'=>'ᇟ','ァ'=>'ã‚¡','ï½±'=>'ã‚¢','ィ'=>'ã‚£','ï½²'=>'イ','ゥ'=>'ã‚¥','ï½³'=>'ウ','ェ'=>'ェ','ï½´'=>'エ','ォ'=>'ã‚©','ï½µ'=>'オ','カ'=>'ã‚«','ï½·'=>'ã‚­','ク'=>'ク','ï½¹'=>'ケ','コ'=>'コ','ï½»'=>'サ','ï½¼'=>'ã‚·','ï½½'=>'ス','ï½¾'=>'ã‚»','ソ'=>'ソ','ï¾€'=>'ã‚¿','ï¾'=>'ãƒ','ッ'=>'ッ','ツ'=>'ツ','テ'=>'テ','ト'=>'ト','ï¾…'=>'ナ','ニ'=>'ニ','ヌ'=>'ヌ','ネ'=>'ãƒ','ノ'=>'ノ','ハ'=>'ãƒ','ヒ'=>'ヒ','フ'=>'フ','ï¾'=>'ã¸','ホ'=>'ホ','ï¾'=>'マ','⧄'=>'〼','ï¾'=>'ミ','ム'=>'ム','ï¾’'=>'メ','モ'=>'モ','ャ'=>'ャ','ï¾”'=>'ヤ','ï½­'=>'ュ','ユ'=>'ユ','ï½®'=>'ョ','ï¾–'=>'ヨ','ï¾—'=>'ラ','リ'=>'リ','ï¾™'=>'ル','レ'=>'レ','ï¾›'=>'ロ','ワ'=>'ワ','ヲ'=>'ヲ','ï¾'=>'ン','ê’ž'=>'êŠ','ê’¬'=>'ê','ê’œ'=>'ꃀ','ê’¿'=>'ꉙ','ê’¾'=>'ꊱ','ê“€'=>'ꎫ','ê“‚'=>'ꎵ','ê’º'=>'ꎿ','ê’°'=>'ê‚','ð’ '=>'ð’†','—'=>'一','―'=>'一','−'=>'一','─'=>'一','â¼€'=>'一','不'=>'ä¸','ï©°'=>'並','|'=>'丨','|'=>'丨','∣'=>'丨','â¼'=>'丨','‖'=>'丨丨','∥'=>'丨丨','串'=>'串','⼂'=>'丶','ð¯ '=>'丸','丹'=>'丹','丽'=>'丽','⼃'=>'丿','乁'=>'ä¹','⼄'=>'ä¹™','亂'=>'亂','â¼…'=>'亅','了'=>'了','⼆'=>'二','⼇'=>'亠','亮'=>'亮','⼈'=>'人','什'=>'什','仌'=>'仌','令'=>'令','你'=>'ä½ ','倂'=>'ä½µ','倂'=>'ä½µ','侀'=>'ä¾€','來'=>'來','例'=>'例','侮'=>'ä¾®','侮'=>'ä¾®','侻'=>'ä¾»','便'=>'便','值'=>'値','倫'=>'倫','偺'=>'åº','備'=>'å‚™','像'=>'åƒ','僚'=>'僚','僧'=>'僧','僧'=>'僧','⼉'=>'å„¿','兀'=>'å…€','ï©´'=>'å……','免'=>'å…','免'=>'å…','ð¯ '=>'å…”','ð¯ '=>'å…¤','⼊'=>'å…¥','內'=>'å…§','全'=>'å…¨','兩'=>'å…©','⼋'=>'å…«','六'=>'å…­','具'=>'å…·','冀'=>'冀','⼌'=>'冂','再'=>'å†','冒'=>'冒','冕'=>'冕','â¼'=>'冖','冗'=>'冗','冤'=>'冤','⼎'=>'冫','冬'=>'冬','况'=>'况','况'=>'况','冷'=>'冷','凉'=>'凉','凌'=>'凌','凜'=>'凜','凞'=>'凞','â¼'=>'几','ð¯ '=>'凵','â¼'=>'凵','⼑'=>'刀','刃'=>'刃','切'=>'切','ð¯¡'=>'切','列'=>'列','ï§'=>'利','刺'=>'刺','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','劉'=>'劉','力'=>'力','â¼’'=>'力','ï¦'=>'劣','劳'=>'劳','勇'=>'勇','勇'=>'勇','勉'=>'勉','勉'=>'勉','勒'=>'å‹’','勞'=>'å‹ž','勤'=>'勤','勤'=>'勤','勵'=>'勵','⼓'=>'勹','ï©·'=>'勺','勺'=>'勺','包'=>'包','匆'=>'匆','â¼”'=>'匕','北'=>'北','北'=>'北','⼕'=>'匚','â¼–'=>'匸','匿'=>'匿','â¼—'=>'å','〸'=>'å','〹'=>'å„','〺'=>'å…','卉'=>'å‰','卑'=>'å‘','卑'=>'å‘','博'=>'åš','⼘'=>'åœ','â¼™'=>'å©','即'=>'å³','卵'=>'åµ','卽'=>'å½','卿'=>'å¿','卿'=>'å¿','卿'=>'å¿','⼚'=>'厂','â¼›'=>'厶','參'=>'åƒ','⼜'=>'åˆ','及'=>'åŠ','叟'=>'åŸ','â¼'=>'å£','句'=>'å¥','叫'=>'å«','叱'=>'å±','吆'=>'å†','吏'=>'å','吝'=>'å','吸'=>'å¸','呂'=>'å‘‚','呈'=>'呈','周'=>'周','咞'=>'å’ž','咢'=>'å’¢','咽'=>'å’½','ð¯¡'=>'哶','唐'=>'å”','啓'=>'å•“','å•Ÿ'=>'å•“','啕'=>'å••','啣'=>'å•£','善'=>'å–„','善'=>'å–„','喇'=>'å–‡','喙'=>'å–™','喙'=>'å–™','喝'=>'å–','喝'=>'å–','喫'=>'å–«','喳'=>'å–³','ï¨'=>'å—€','嗂'=>'å—‚','ï©»'=>'å—¢','嘆'=>'嘆','嘆'=>'嘆','噑'=>'噑','器'=>'器','ð¯¡'=>'å™´','⼞'=>'å›—','囹'=>'囹','圖'=>'圖','ð¯¡'=>'圗','⼟'=>'土','型'=>'åž‹','城'=>'城','埴'=>'埴','堍'=>'å ','報'=>'å ±','堲'=>'å ²','塀'=>'å¡€','ï¨'=>'å¡š','塚'=>'å¡š','塞'=>'å¡ž','å¡«'=>'å¡¡','墨'=>'墨','壿'=>'墫','墬'=>'墬','墳'=>'墳','壘'=>'壘','壟'=>'壟','â¼ '=>'士','壮'=>'壮','売'=>'売','壷'=>'壷','⼡'=>'夂','夆'=>'夆','â¼¢'=>'夊','â¼£'=>'夕','ð¯¡'=>'多','夢'=>'夢','⼤'=>'大','奄'=>'奄','奈'=>'奈','契'=>'契','ï©¿'=>'奔','奢'=>'奢','ï¦'=>'女','â¼¥'=>'女','姘'=>'姘','姬'=>'姬','娛'=>'娛','娧'=>'娧','婢'=>'å©¢','婦'=>'婦','嬀'=>'媯','媵'=>'媵','嬈'=>'嬈','ïª'=>'嬨','嬾'=>'嬾','嬾'=>'嬾','⼦'=>'å­','⼧'=>'宀','宅'=>'å®…','寃'=>'寃','寘'=>'寘','寧'=>'寧','寧'=>'寧','寧'=>'寧','寮'=>'寮','寳'=>'寳','⼨'=>'寸','寿'=>'寿','将'=>'å°†','⼩'=>'å°','尢'=>'å°¢','⼪'=>'å°¢','⼫'=>'å°¸','尿'=>'å°¿','屠'=>'å± ','屢'=>'å±¢','層'=>'層','履'=>'å±¥','屮'=>'å±®','屮'=>'å±®','⼬'=>'å±®','â¼­'=>'å±±','岍'=>'å²','峀'=>'å³€','崙'=>'å´™','嵃'=>'嵃','嵐'=>'åµ','嵫'=>'嵫','嵮'=>'åµ®','嵼'=>'åµ¼','嶲'=>'嶲','嶺'=>'嶺','â¼®'=>'å·›','ð¯¢'=>'å·¡','巢'=>'å·¢','⼯'=>'å·¥','â¼°'=>'å·±','巽'=>'å·½','â¼±'=>'å·¾','帲'=>'帡','帨'=>'帨','帽'=>'帽','幩'=>'幩','â¼²'=>'å¹²','年'=>'å¹´','â¼³'=>'幺','â¼´'=>'广','ï¨'=>'度','庰'=>'庰','庳'=>'庳','ð¯¢'=>'庶','廉'=>'廉','廊'=>'廊','廊'=>'廊','廒'=>'å»’','廓'=>'廓','廙'=>'å»™','廬'=>'廬','â¼µ'=>'å»´','ð¯¢'=>'廾','⼶'=>'廾','弄'=>'弄','â¼·'=>'弋','⼸'=>'弓','弢'=>'å¼¢','弢'=>'å¼¢','â¼¹'=>'å½','当'=>'当','⼺'=>'彡','形'=>'å½¢','彩'=>'彩','彫'=>'彫','â¼»'=>'å½³','律'=>'律','徚'=>'徚','復'=>'復','徭'=>'å¾­','â¼¼'=>'心','ð¯¢'=>'å¿','志'=>'å¿—','念'=>'念','忹'=>'忹','怒'=>'怒','怜'=>'怜','悁'=>'æ‚','悔'=>'æ‚”','悔'=>'æ‚”','惇'=>'惇','惘'=>'惘','惡'=>'惡','愈'=>'愈','慄'=>'æ…„','慈'=>'æ…ˆ','慌'=>'æ…Œ','慌'=>'æ…Œ','慎'=>'æ…Ž','慎'=>'æ…Ž','慠'=>'æ… ','慨'=>'æ…¨','慺'=>'æ…º','憎'=>'憎','憎'=>'憎','憎'=>'憎','ï¦'=>'æ†','憤'=>'憤','憯'=>'憯','憲'=>'憲','懞'=>'懞','ï©€'=>'懲','懲'=>'懲','懲'=>'懲','ï¤'=>'懶','懶'=>'懶','ï¦'=>'戀','â¼½'=>'戈','成'=>'æˆ','戛'=>'戛','戮'=>'戮','戴'=>'戴','â¼¾'=>'戶','⼿'=>'手','扝'=>'æ‰','抱'=>'抱','拉'=>'拉','拏'=>'æ‹','拓'=>'æ‹“','拔'=>'æ‹”','拼'=>'拼','拾'=>'拾','挽'=>'挽','捐'=>'æ','捨'=>'æ¨','捻'=>'æ»','掃'=>'掃','掠'=>'掠','ð¯£'=>'掩','ïª'=>'æ„','揅'=>'æ…','揤'=>'æ¤','ã©'=>'æ‰','搜'=>'æœ','搢'=>'æ¢','ïª'=>'æ‘’','摩'=>'æ‘©','摷'=>'æ‘·','摾'=>'摾','撚'=>'æ’š','撝'=>'æ’','擄'=>'æ“„','â½€'=>'支','â½'=>'æ”´','ï©'=>'æ•','敏'=>'æ•','ïª'=>'æ•–','敬'=>'敬','數'=>'數','⽂'=>'æ–‡','⽃'=>'æ–—','料'=>'æ–™','⽄'=>'æ–¤','â½…'=>'æ–¹','旅'=>'æ—…','⽆'=>'æ— ','ï©‚'=>'æ—¢','旣'=>'æ—£','⽇'=>'æ—¥','易'=>'易','ð¯£'=>'晉','晩'=>'晚','䀿'=>'晣','晴'=>'æ™´','晴'=>'æ™´','暈'=>'暈','暑'=>'æš‘','ð¯£'=>'æš‘','暜'=>'æšœ','暴'=>'æš´','曆'=>'曆','⽈'=>'æ›°','ï¤'=>'æ›´','ã«š'=>'曶','書'=>'書','最'=>'最','⽉'=>'月','肦'=>'朌','èƒ'=>'æœ','胊'=>'æœ','è„'=>'朓','朗'=>'朗','朗'=>'朗','朗'=>'朗','脧'=>'朘','望'=>'望','望'=>'望','朡'=>'朡','膧'=>'朣','⽊'=>'木','李'=>'æŽ','杓'=>'æ“','杖'=>'æ–','杞'=>'æž','柿'=>'æ®','杻'=>'æ»','枅'=>'æž…','林'=>'æž—','柳'=>'柳','柺'=>'柺','栗'=>'æ —','栟'=>'æ Ÿ','桒'=>'æ¡’','梁'=>'æ¢','ï©„'=>'梅','梅'=>'梅','梎'=>'梎','梨'=>'梨','椔'=>'椔','楂'=>'楂','樧'=>'æ¦','榣'=>'榣','槪'=>'槪','樂'=>'樂','樂'=>'樂','樂'=>'樂','樓'=>'樓','檨'=>'檨','櫓'=>'æ«“','櫛'=>'æ«›','ï¤'=>'欄','⽋'=>'欠','次'=>'次','歔'=>'æ­”','⽌'=>'æ­¢','歲'=>'æ­²','歷'=>'æ­·','歹'=>'æ­¹','â½'=>'æ­¹','殟'=>'殟','殮'=>'æ®®','⽎'=>'殳','殺'=>'殺','殺'=>'殺','殺'=>'殺','殻'=>'æ®»','â½'=>'毋','⺟'=>'æ¯','â½'=>'比','⽑'=>'毛','â½’'=>'æ°','⽓'=>'æ°”','â½”'=>'æ°´','汎'=>'汎','汧'=>'汧','沈'=>'沈','沿'=>'沿','泌'=>'泌','泍'=>'æ³','泥'=>'æ³¥','洖'=>'æ´–','洛'=>'æ´›','洞'=>'æ´ž','洴'=>'æ´´','派'=>'æ´¾','流'=>'æµ','流'=>'æµ','流'=>'æµ','浩'=>'浩','浪'=>'浪','ï©…'=>'æµ·','ð¯¤'=>'æµ·','浸'=>'浸','涅'=>'涅','淋'=>'æ·‹','ï¥'=>'æ·š','淪'=>'æ·ª','淹'=>'æ·¹','渚'=>'渚','港'=>'港','湮'=>'æ¹®','æ½™'=>'溈','溜'=>'溜','溺'=>'溺','滇'=>'滇','滋'=>'滋','滋'=>'滋','滑'=>'滑','滛'=>'æ»›','漏'=>'æ¼','漢'=>'æ¼¢','漢'=>'æ¼¢','漣'=>'æ¼£','ð¯¤'=>'æ½®','濆'=>'濆','濫'=>'æ¿«','濾'=>'濾','瀛'=>'瀛','瀞'=>'瀞','瀞'=>'瀞','瀹'=>'瀹','灊'=>'çŠ','⽕'=>'ç«','灰'=>'ç°','灷'=>'ç·','災'=>'ç½','炙'=>'ç‚™','炭'=>'ç‚­','烈'=>'烈','烙'=>'烙','煅'=>'ç……','煉'=>'ç…‰','煮'=>'ç…®','煮'=>'ç…®','熜'=>'熜','燎'=>'燎','燐'=>'ç‡','爐'=>'çˆ','爛'=>'爛','爨'=>'爨','â½–'=>'爪','爫'=>'爫','⺤'=>'爫','爵'=>'爵','爵'=>'爵','â½—'=>'父','⽘'=>'爻','â½™'=>'爿','⽚'=>'片','牐'=>'ç‰','â½›'=>'牙','⽜'=>'牛','牢'=>'牢','犀'=>'犀','犕'=>'犕','â½'=>'犬','犯'=>'犯','狀'=>'ç‹€','狼'=>'狼','猪'=>'猪','猪'=>'猪','獵'=>'çµ','獺'=>'çº','⽞'=>'玄','率'=>'率','率'=>'率','⽟'=>'玉','王'=>'王','玥'=>'玥','玲'=>'玲','珞'=>'çž','理'=>'ç†','琉'=>'ç‰','ï©Š'=>'ç¢','瑇'=>'瑇','瑜'=>'ç‘œ','瑩'=>'ç‘©','瑱'=>'瑱','瑱'=>'瑱','璅'=>'ç’…','璉'=>'ç’‰','璘'=>'ç’˜','瓊'=>'ç“Š','â½ '=>'ç“œ','⽡'=>'瓦','甆'=>'甆','â½¢'=>'甘','â½£'=>'生','甤'=>'甤','⽤'=>'用','â½¥'=>'ç”°','画'=>'ç”»','甾'=>'甾','ï§'=>'ç•™','略'=>'ç•¥','異'=>'ç•°','異'=>'ç•°','⽦'=>'ç–‹','⽧'=>'ç–’','痢'=>'ç—¢','瘐'=>'ç˜','瘝'=>'ç˜','瘟'=>'瘟','ï§'=>'療','癩'=>'癩','⽨'=>'癶','⽩'=>'白','⽪'=>'çš®','⽫'=>'çš¿','益'=>'益','益'=>'益','盛'=>'ç››','盧'=>'盧','⽬'=>'ç›®','直'=>'ç›´','直'=>'ç›´','省'=>'çœ','眞'=>'眞','真'=>'真','真'=>'真','着'=>'ç€','睊'=>'çŠ','睊'=>'çŠ','瞋'=>'çž‹','ïª'=>'瞧','â½­'=>'矛','â½®'=>'矢','⽯'=>'石','ç¡'=>'ç ”','硎'=>'ç¡Ž','硫'=>'ç¡«','碌'=>'碌','ð¯¥'=>'碌','ï©‹'=>'碑','磊'=>'磊','磌'=>'磌','ð¯¥'=>'磌','磻'=>'磻','礪'=>'礪','â½°'=>'示','礼'=>'礼','ï©Œ'=>'社','ï©Ž'=>'祈','ï©'=>'祉','ï©'=>'ç¥','ï©'=>'祖','祖'=>'祖','ï©‘'=>'ç¥','神'=>'神','祥'=>'祥','祿'=>'祿','ï©’'=>'ç¦','ï©“'=>'禎','福'=>'ç¦','福'=>'ç¦','禮'=>'禮','â½±'=>'禸','â½²'=>'禾','秊'=>'秊','秫'=>'秫','稜'=>'稜','ï©”'=>'ç©€','穀'=>'ç©€','穊'=>'ç©Š','穏'=>'ç©','â½³'=>'ç©´','ï©•'=>'çª','窱'=>'窱','立'=>'ç«‹','â½´'=>'ç«‹','竮'=>'ç«®','â½µ'=>'竹','笠'=>'笠','ï©–'=>'節','節'=>'節','篆'=>'篆','築'=>'築','簾'=>'ç°¾','籠'=>'ç± ','⽶'=>'ç±³','类'=>'ç±»','粒'=>'ç²’','ï¨'=>'ç²¾','糒'=>'ç³’','糖'=>'ç³–','糣'=>'ç³£','糧'=>'糧','糨'=>'糨','â½·'=>'糸','紀'=>'ç´€','ï§'=>'ç´','索'=>'ç´¢','ï¥'=>'ç´¯','絶'=>'絕','絛'=>'çµ›','絣'=>'çµ£','綠'=>'綠','綾'=>'綾','緇'=>'ç·‡','練'=>'ç·´','ï©—'=>'ç·´','練'=>'ç·´','縂'=>'縂','縉'=>'縉','ï¥'=>'縷','ï©™'=>'ç¹','繅'=>'ç¹…','⽸'=>'缶','缾'=>'ç¼¾','â½¹'=>'网','⺫'=>'ç½’','ï©š'=>'ç½²','罹'=>'ç½¹','罺'=>'罺','ï¤'=>'ç¾…','⽺'=>'羊','羕'=>'羕','羚'=>'羚','羽'=>'ç¾½','â½»'=>'ç¾½','翺'=>'翺','老'=>'è€','â½¼'=>'è€','ï©›'=>'者','者'=>'者','者'=>'者','â½½'=>'而','â½¾'=>'耒','⽿'=>'耳','聆'=>'è†','聠'=>'è ','聯'=>'è¯','聰'=>'è°','聾'=>'è¾','â¾€'=>'è¿','â¾'=>'肉','肋'=>'è‚‹','肭'=>'è‚­','育'=>'育','㬵'=>'胶','è…'=>'胼','脃'=>'脃','脾'=>'脾','臘'=>'臘','⾂'=>'臣','臨'=>'臨','⾃'=>'自','ï©œ'=>'臭','⾄'=>'至','â¾…'=>'臼','舁'=>'èˆ','舁'=>'èˆ','舄'=>'舄','⾆'=>'舌','⾇'=>'舛','⾈'=>'舟','⾉'=>'艮','良'=>'良','⾊'=>'色','⾋'=>'艸','ï©'=>'艹','ï©ž'=>'艹','ð¯¦'=>'芋','ð¯¦'=>'芑','芝'=>'èŠ','花'=>'花','芳'=>'芳','芽'=>'芽','若'=>'è‹¥','若'=>'è‹¥','苦'=>'苦','茝'=>'èŒ','茣'=>'茣','茶'=>'茶','荒'=>'è’','荓'=>'è“','荣'=>'è£','莭'=>'莭','ð¯¦'=>'莽','菉'=>'è‰','菊'=>'èŠ','菌'=>'èŒ','菜'=>'èœ','菧'=>'è§','華'=>'è¯','菱'=>'è±','落'=>'è½','葉'=>'葉','ï©Ÿ'=>'è‘—','著'=>'è‘—','蔿'=>'è’','蓮'=>'è“®','蓱'=>'蓱','蓳'=>'蓳','蓼'=>'蓼','蔖'=>'è”–','蕤'=>'蕤','藍'=>'è—','藺'=>'è—º','蘆'=>'蘆','蘒'=>'蘒','蘭'=>'蘭','è™'=>'蘷','ï¤'=>'蘿','⾌'=>'è™','虐'=>'è™','虜'=>'虜','虜'=>'虜','虧'=>'虧','虩'=>'虩','â¾'=>'虫','蚈'=>'蚈','蚩'=>'èš©','蛢'=>'蛢','蜎'=>'蜎','蜨'=>'蜨','蝫'=>'è«','蝹'=>'è¹','蝹'=>'è¹','螆'=>'螆','螺'=>'螺','蟡'=>'蟡','ð¯§'=>'è ','蠟'=>'è Ÿ','⾎'=>'è¡€','行'=>'è¡Œ','â¾'=>'è¡Œ','衠'=>'è¡ ','衣'=>'è¡£','â¾'=>'è¡£','裂'=>'裂','裏'=>'è£','裗'=>'裗','裞'=>'裞','裡'=>'裡','裸'=>'裸','裺'=>'裺','ï© '=>'è¤','襁'=>'è¥','襤'=>'襤','⾑'=>'襾','覆'=>'覆','見'=>'見','â¾’'=>'見','ï©¡'=>'視','視'=>'視','⾓'=>'角','â¾”'=>'言','䚶'=>'訞','詽'=>'訮','ð¯§'=>'誠','說'=>'說','說'=>'說','調'=>'調','請'=>'è«‹','諒'=>'è«’','ï¥'=>'è«–','諭'=>'è«­','ð¯§'=>'è«­','諸'=>'諸','諸'=>'諸','ï¥'=>'諾','諾'=>'諾','ï©¢'=>'è¬','謁'=>'è¬','ï©£'=>'謹','謹'=>'謹','識'=>'è­˜','讀'=>'讀','è®'=>'讆','ï«€'=>'變','變'=>'變','⾕'=>'è°·','â¾–'=>'豆','豈'=>'豈','豕'=>'豕','â¾—'=>'豕','⾘'=>'豸','â¾™'=>'è²','貫'=>'貫','賁'=>'è³','賂'=>'賂','賈'=>'賈','賓'=>'賓','ï©¥'=>'è´ˆ','ï«'=>'è´ˆ','贛'=>'è´›','⾚'=>'赤','â¾›'=>'èµ°','起'=>'èµ·','趆'=>'赿','⾜'=>'足','趼'=>'趼','跋'=>'è·‹','è·º'=>'è·¥','路'=>'è·¯','跰'=>'è·°','躛'=>'躗','â¾'=>'身','車'=>'車','⾞'=>'車','軔'=>'è»”','輧'=>'軿','輦'=>'輦','輪'=>'輪','ï«‚'=>'輸','輸'=>'輸','輻'=>'è¼»','ï¦'=>'è½¢','⾟'=>'è¾›','ð¯¦'=>'辞','辰'=>'è¾°','â¾ '=>'è¾°','⾡'=>'è¾µ','辶'=>'辶','⻌'=>'辶','連'=>'連','逸'=>'逸','逸'=>'逸','遲'=>'é²','遼'=>'é¼','邏'=>'é‚','â¾¢'=>'é‚‘','邔'=>'é‚”','郎'=>'郎','郱'=>'郱','都'=>'都','鄑'=>'é„‘','鄛'=>'é„›','â¾£'=>'é…‰','酪'=>'é…ª','ï«„'=>'醙','醴'=>'醴','⾤'=>'釆','里'=>'里','â¾¥'=>'里','量'=>'é‡','金'=>'金','⾦'=>'金','鈴'=>'鈴','鈸'=>'鈸','ï«…'=>'鉶','鉼'=>'鉼','鋗'=>'é‹—','鋘'=>'鋘','錄'=>'錄','鍊'=>'éŠ','鎮'=>'鎭','鏹'=>'é¹','鐕'=>'é•','⾧'=>'é•·','⾨'=>'é–€','開'=>'é–‹','閭'=>'é–­','閷'=>'é–·','⾩'=>'阜','阮'=>'阮','陋'=>'陋','降'=>'é™','陵'=>'陵','陸'=>'陸','陼'=>'陼','隆'=>'隆','隣'=>'隣','⾪'=>'隶','隸'=>'隸','⾫'=>'éš¹','雃'=>'雃','離'=>'離','難'=>'難','難'=>'難','⾬'=>'雨','零'=>'零','雷'=>'é›·','霣'=>'霣','露'=>'露','靈'=>'éˆ','â¾­'=>'é‘','靖'=>'é–','靖'=>'é–','â¾®'=>'éž','⾯'=>'é¢','â¾°'=>'é©','â¾±'=>'韋','韛'=>'韛','韠'=>'韠','â¾²'=>'韭','â¾³'=>'音','ï©©'=>'響','ï«Š'=>'響','â¾´'=>'é ','ï«‹'=>'é ‹','頋'=>'é ‹','頋'=>'é ‹','領'=>'é ˜','頩'=>'é ©','頻'=>'é »','ï«Œ'=>'é »','ï§'=>'é¡ž','â¾µ'=>'風','⾶'=>'飛','â»'=>'食','â¾·'=>'食','飢'=>'飢','飯'=>'飯','飼'=>'飼','館'=>'館','餩'=>'餩','⾸'=>'首','â¾¹'=>'香','馧'=>'馧','⾺'=>'馬','駂'=>'駂','駱'=>'駱','駾'=>'駾','驪'=>'驪','â¾»'=>'骨','â¾¼'=>'高','â¾½'=>'é«Ÿ','ï«'=>'鬒','鬒'=>'鬒','â¾¾'=>'鬥','⾿'=>'鬯','â¿€'=>'鬲','â¿'=>'鬼','â¿‚'=>'é­š','魯'=>'é­¯','鱀'=>'é±€','鱗'=>'é±—','⿃'=>'é³¥','鳽'=>'é³½','ð¯¨'=>'鵧','鶴'=>'鶴','鷺'=>'é·º','鸞'=>'鸞','鹃'=>'鹂','â¿„'=>'é¹µ','鹿'=>'鹿','â¿…'=>'鹿','麗'=>'麗','麟'=>'麟','⿆'=>'麥','麻'=>'麻','⿇'=>'麻','⿈'=>'黃','⿉'=>'é»','黎'=>'黎','â¿Š'=>'黑','黹'=>'黹','â¿‹'=>'黹','â¿Œ'=>'黽','黾'=>'黾','鼅'=>'é¼…','â¿'=>'鼎','鼏'=>'é¼','â¿Ž'=>'鼓','鼖'=>'é¼–','â¿'=>'é¼ ','鼻'=>'é¼»','â¿'=>'é¼»','齃'=>'齃','â¿‘'=>'齊','â¿’'=>'é½’','龍'=>'é¾','â¿“'=>'é¾','ï«™'=>'龎','龜'=>'龜','龜'=>'龜','ï«Ž'=>'龜','â¿”'=>'龜','⻳'=>'龟','â¿•'=>'é¾ ','㒞'=>'ã’ž','㒹'=>'ã’¹','㒻'=>'ã’»','㓟'=>'ã“Ÿ','㔕'=>'㔕','䎛'=>'ã–ˆ','㛮'=>'ã›®','㛼'=>'㛼','㞁'=>'ãž','㠯'=>'ã ¯','㡢'=>'ã¡¢','㡼'=>'㡼','㣇'=>'㣇','㣣'=>'㣣','㤜'=>'㤜','㤺'=>'㤺','㨮'=>'㨮','㩬'=>'㩬','㫤'=>'㫤','ð¯£'=>'㬈','㬙'=>'㬙','ä '=>'㬻','㭉'=>'ã­‰','ï«’'=>'ã®','㮝'=>'ã®','㰘'=>'ã°˜','㱎'=>'㱎','㴳'=>'ã´³','㶖'=>'㶖','㺬'=>'㺬','㺸'=>'㺸','㺸'=>'㺸','㼛'=>'ã¼›','㿼'=>'㿼','䀈'=>'䀈','ï«“'=>'䀘','ï«”'=>'䀹','䀹'=>'䀹','䁆'=>'ä†','䂖'=>'ä‚–','䃣'=>'䃣','䄯'=>'䄯','䈂'=>'䈂','䈧'=>'䈧','䊠'=>'䊠','䌁'=>'äŒ','䌴'=>'䌴','䍙'=>'ä™','ð¯¦'=>'ä•','䏙'=>'ä™','䐋'=>'ä‹','䑫'=>'ä‘«','䔫'=>'䔫','䕝'=>'ä•','䕡'=>'ä•¡','䕫'=>'ä•«','䗗'=>'ä——','䗹'=>'ä—¹','䘵'=>'䘵','ð¯§'=>'äš¾','䛇'=>'䛇','䦕'=>'䦕','䧦'=>'䧦','䩮'=>'ä©®','䩶'=>'䩶','䪲'=>'䪲','䬳'=>'䬳','䯎'=>'䯎','ð¯¨'=>'䳎','䳭'=>'ä³­','䳸'=>'䳸','䵖'=>'äµ–','𠄢'=>'ð „¢','𠔜'=>'𠔜','𠔥'=>'𠔥','𠕋'=>'ð •‹','ð¯ '=>'𠘺','𠠄'=>'ð  „','ð¯§'=>'𠣞','𠨬'=>'𠨬','𠭣'=>'ð ­£','𡓤'=>'𡓤','𡚨'=>'𡚨','𡛪'=>'𡛪','𡧈'=>'𡧈','𡬘'=>'𡬘','𡴋'=>'ð¡´‹','𡷤'=>'ð¡·¤','𡷦'=>'ð¡·¦','𢆃'=>'𢆃','𢆟'=>'𢆟','𢌱'=>'𢌱','𢌱'=>'𢌱','𢛔'=>'𢛔','ï«'=>'𢡄','ï«'=>'𢡊','𢬌'=>'𢬌','𢯱'=>'𢯱','𣀊'=>'𣀊','𣊸'=>'𣊸','𣍟'=>'ð£Ÿ','𣎓'=>'𣎓','𣎜'=>'𣎜','ð¯£'=>'ð£ƒ','ï«‘'=>'ð£•','𣑭'=>'𣑭','𣚣'=>'𣚣','𣢧'=>'𣢧','𣪍'=>'ð£ª','𣫺'=>'𣫺','𣲼'=>'𣲼','𣴞'=>'𣴞','ð¯¤'=>'𣻑','ð¯¤'=>'𣽞','𣾎'=>'𣾎','ð¯¤'=>'𤉣','𤎫'=>'𤎫','𤘈'=>'𤘈','𤜵'=>'𤜵','𤠔'=>'𤠔','𤰶'=>'𤰶','𤲒'=>'𤲒','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'ð¥„','𥃲'=>'𥃲','ð¯¥'=>'𥃳','𥄙'=>'𥄙','𥄳'=>'𥄳','ï«•'=>'𥉉','ð¯¥'=>'ð¥','𥘦'=>'𥘦','𥚚'=>'𥚚','𥛅'=>'𥛅','𥥼'=>'𥥼','ð¯¥'=>'𥪧','𥪧'=>'𥪧','𥮫'=>'𥮫','𥲀'=>'𥲀','ï«–'=>'ð¥³','𥾆'=>'𥾆','𦇚'=>'𦇚','𦈨'=>'𦈨','𦉇'=>'𦉇','𦋙'=>'𦋙','𦌾'=>'𦌾','𦓚'=>'𦓚','𦔣'=>'𦔣','𦖨'=>'𦖨','𦞧'=>'𦞧','𦞵'=>'𦞵','𦬼'=>'𦬼','𦰶'=>'𦰶','𦳕'=>'𦳕','𦵫'=>'𦵫','𦼬'=>'𦼬','𦾱'=>'𦾱','𧃒'=>'𧃒','𧏊'=>'ð§Š','𧙧'=>'𧙧','𧢮'=>'𧢮','𧥦'=>'𧥦','𧲨'=>'𧲨','ï«—'=>'𧻓','𧼯'=>'𧼯','𨗒'=>'𨗒','𨗭'=>'𨗭','𨜮'=>'𨜮','𨯺'=>'𨯺','𨵷'=>'𨵷','𩅅'=>'ð©……','𩇟'=>'𩇟','𩈚'=>'𩈚','𩐊'=>'ð©Š','𩒖'=>'ð©’–','ð¯¨'=>'ð©–¶','𩬰'=>'𩬰','ð¯¨'=>'𪃎','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','ð¯¢'=>'𪎒','ð¯¨'=>'𪘀','℃'=>'°C','℉'=>'°F','ℇ'=>'Æ','â„»'=>'FAX','â„•'=>'N','â„–'=>'No','â„š'=>'Q','₨'=>'Rs','ð“'=>'T','â„¡'=>'TEL','ð”'=>'U','ð–'=>'W','â‚©'=>'W̵','ð—'=>'X','Â¥'=>'Y̵','ðš²'=>'Λ','ðšµ'=>'Ξ','â„¿'=>'Π','ϲ'=>'c','Ï’'=>'Y','ðš½'=>'Φ','ðš¿'=>'Ψ','Ñ£'=>'Ь̵','ਃ'=>'ঃ','ಃ'=>'à°ƒ','່'=>'่','់'=>'่','້'=>'้','໊'=>'๊','໋'=>'๋','៕'=>'๚','៚'=>'๛','ÑŠ'=>'ˉb','៙'=>'à¹','೧'=>'౧','૨'=>'२','೨'=>'౨','à«©'=>'३','૪'=>'४','à«®'=>'८','೯'=>'౯','а'=>'a','á'=>'b','á–¯'=>'b','Ñ'=>'c','Ô'=>'d','ᑯ'=>'d','е'=>'e','Ó™'=>'Ç','ε'=>'É›','Ñ”'=>'É›','Ö„'=>'f','Ö'=>'g','Ò»'=>'h','Õ°'=>'h','á‚'=>'h','á²'=>'hÌ”','ι'=>'i','Ñ–'=>'i','Ꭵ'=>'i','ј'=>'j','Õµ'=>'j','á—°'=>'m','Õ¸'=>'n','η'=>'nÌ©','à°‚'=>'o','ಂ'=>'o','à´‚'=>'o','०'=>'o','੦'=>'o','૦'=>'o','à¹'=>'o','à»'=>'o','ο'=>'o','о'=>'o','Ö…'=>'o','á€'=>'o','Ï'=>'p','Ñ€'=>'p','á´©'=>'á´˜','Õ£'=>'q','κ'=>'ĸ','к'=>'ĸ','á´¦'=>'r','г'=>'r','Ñ•'=>'s','Ï…'=>'u','Õ½'=>'u','ν'=>'v','ѵ'=>'v','Ꮃ'=>'w','á—¯'=>'w','Ñ…'=>'x','á•'=>'x','у'=>'y','Ꭹ'=>'y','Ó¡'=>'Ê’','ჳ'=>'Ê’','Ï©'=>'ƨ','ÑŒ'=>'Æ…','Ñ‹'=>'Æ…i','É‘'=>'α','Õ®'=>'δ','á•·'=>'δ','п'=>'Ï€','ɸ'=>'φ','Ñ„'=>'φ','Ê™'=>'в','Éœ'=>'з','á´'=>'м','Êœ'=>'н','É¢'=>'Ô','á´›'=>'Ñ‚','á´™'=>'Ñ','ઽ'=>'ऽ','à«'=>'à¥','à«‚'=>'ू','à©‹'=>'ॆ','à©'=>'à¥','à«'=>'à¥','à´‰'=>'உ','à´œ'=>'à®','à´£'=>'ண','à´´'=>'à®´','à´¿'=>'ி','àµ'=>'ூ','ಅ'=>'à°…','ಆ'=>'à°†','ಇ'=>'à°‡','ಒ'=>'à°’','ಓ'=>'ఒౕ','ಜ'=>'à°œ','ಞ'=>'à°ž','ಣ'=>'à°£','à°¥'=>'à°§Ö¼','ಯ'=>'à°¯','à° '=>'à°°Ö¼','ಱ'=>'à°±','ಲ'=>'à°²','ඌ'=>'à´¨àµà´¨','ஶ'=>'à´¶','ຈ'=>'จ','ບ'=>'บ','ປ'=>'ป','àº'=>'à¸','ພ'=>'พ','ຟ'=>'ฟ','àº'=>'ย','។'=>'ฯ','áž·'=>'ิ','ី'=>'ี','áž¹'=>'ึ','ឺ'=>'ื','ຸ'=>'ุ','ູ'=>'ู','á—…'=>'A','á’'=>'J','ᕼ'=>'H','á¯'=>'V','á‘­'=>'P','á—·'=>'B','ヘ'=>'ã¸','ð‘'=>'ðŽ‚','ð“'=>'ðŽ“','𒀸'=>'ðŽš','á…³'=>'一','Ç€'=>'丨','á…µ'=>'丨','Ꭺ'=>'A','á´'=>'B','áŸ'=>'C','á—ž'=>'D','Ꭼ'=>'E','á–´'=>'F','á€'=>'G','Ꮋ'=>'H','Ꭻ'=>'J','á¦'=>'K','áž'=>'L','Ꮇ'=>'M','á¢'=>'P','á–‡'=>'R','á•'=>'S','á™'=>'V','áƒ'=>'Z'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/recode_basic.php b/phpBB/includes/utf/data/recode_basic.php
new file mode 100644
index 0000000000..02e44d3e0d
--- /dev/null
+++ b/phpBB/includes/utf/data/recode_basic.php
@@ -0,0 +1,1543 @@
+<?php
+function iso_8859_1($string)
+{
+ return utf8_encode($string);
+}
+
+function iso_8859_2($string)
+{
+ static $transform = array(
+ "\x80" => "\xC2\x80",
+ "\x81" => "\xC2\x81",
+ "\x82" => "\xC2\x82",
+ "\x83" => "\xC2\x83",
+ "\x84" => "\xC2\x84",
+ "\x85" => "\xC2\x85",
+ "\x86" => "\xC2\x86",
+ "\x87" => "\xC2\x87",
+ "\x88" => "\xC2\x88",
+ "\x89" => "\xC2\x89",
+ "\x8A" => "\xC2\x8A",
+ "\x8B" => "\xC2\x8B",
+ "\x8C" => "\xC2\x8C",
+ "\x8D" => "\xC2\x8D",
+ "\x8E" => "\xC2\x8E",
+ "\x8F" => "\xC2\x8F",
+ "\x90" => "\xC2\x90",
+ "\x91" => "\xC2\x91",
+ "\x92" => "\xC2\x92",
+ "\x93" => "\xC2\x93",
+ "\x94" => "\xC2\x94",
+ "\x95" => "\xC2\x95",
+ "\x96" => "\xC2\x96",
+ "\x97" => "\xC2\x97",
+ "\x98" => "\xC2\x98",
+ "\x99" => "\xC2\x99",
+ "\x9A" => "\xC2\x9A",
+ "\x9B" => "\xC2\x9B",
+ "\x9C" => "\xC2\x9C",
+ "\x9D" => "\xC2\x9D",
+ "\x9E" => "\xC2\x9E",
+ "\x9F" => "\xC2\x9F",
+ "\xA0" => "\xC2\xA0",
+ "\xA1" => "\xC4\x84",
+ "\xA2" => "\xCB\x98",
+ "\xA3" => "\xC5\x81",
+ "\xA4" => "\xC2\xA4",
+ "\xA5" => "\xC4\xBD",
+ "\xA6" => "\xC5\x9A",
+ "\xA7" => "\xC2\xA7",
+ "\xA8" => "\xC2\xA8",
+ "\xA9" => "\xC5\xA0",
+ "\xAA" => "\xC5\x9E",
+ "\xAB" => "\xC5\xA4",
+ "\xAC" => "\xC5\xB9",
+ "\xAD" => "\xC2\xAD",
+ "\xAE" => "\xC5\xBD",
+ "\xAF" => "\xC5\xBB",
+ "\xB0" => "\xC2\xB0",
+ "\xB1" => "\xC4\x85",
+ "\xB2" => "\xCB\x9B",
+ "\xB3" => "\xC5\x82",
+ "\xB4" => "\xC2\xB4",
+ "\xB5" => "\xC4\xBE",
+ "\xB6" => "\xC5\x9B",
+ "\xB7" => "\xCB\x87",
+ "\xB8" => "\xC2\xB8",
+ "\xB9" => "\xC5\xA1",
+ "\xBA" => "\xC5\x9F",
+ "\xBB" => "\xC5\xA5",
+ "\xBC" => "\xC5\xBA",
+ "\xBD" => "\xCB\x9D",
+ "\xBE" => "\xC5\xBE",
+ "\xBF" => "\xC5\xBC",
+ "\xC0" => "\xC5\x94",
+ "\xC1" => "\xC3\x81",
+ "\xC2" => "\xC3\x82",
+ "\xC3" => "\xC4\x82",
+ "\xC4" => "\xC3\x84",
+ "\xC5" => "\xC4\xB9",
+ "\xC6" => "\xC4\x86",
+ "\xC7" => "\xC3\x87",
+ "\xC8" => "\xC4\x8C",
+ "\xC9" => "\xC3\x89",
+ "\xCA" => "\xC4\x98",
+ "\xCB" => "\xC3\x8B",
+ "\xCC" => "\xC4\x9A",
+ "\xCD" => "\xC3\x8D",
+ "\xCE" => "\xC3\x8E",
+ "\xCF" => "\xC4\x8E",
+ "\xD0" => "\xC4\x90",
+ "\xD1" => "\xC5\x83",
+ "\xD2" => "\xC5\x87",
+ "\xD3" => "\xC3\x93",
+ "\xD4" => "\xC3\x94",
+ "\xD5" => "\xC5\x90",
+ "\xD6" => "\xC3\x96",
+ "\xD7" => "\xC3\x97",
+ "\xD8" => "\xC5\x98",
+ "\xD9" => "\xC5\xAE",
+ "\xDA" => "\xC3\x9A",
+ "\xDB" => "\xC5\xB0",
+ "\xDC" => "\xC3\x9C",
+ "\xDD" => "\xC3\x9D",
+ "\xDE" => "\xC5\xA2",
+ "\xDF" => "\xC3\x9F",
+ "\xE0" => "\xC5\x95",
+ "\xE1" => "\xC3\xA1",
+ "\xE2" => "\xC3\xA2",
+ "\xE3" => "\xC4\x83",
+ "\xE4" => "\xC3\xA4",
+ "\xE5" => "\xC4\xBA",
+ "\xE6" => "\xC4\x87",
+ "\xE7" => "\xC3\xA7",
+ "\xE8" => "\xC4\x8D",
+ "\xE9" => "\xC3\xA9",
+ "\xEA" => "\xC4\x99",
+ "\xEB" => "\xC3\xAB",
+ "\xEC" => "\xC4\x9B",
+ "\xED" => "\xC3\xAD",
+ "\xEE" => "\xC3\xAE",
+ "\xEF" => "\xC4\x8F",
+ "\xF0" => "\xC4\x91",
+ "\xF1" => "\xC5\x84",
+ "\xF2" => "\xC5\x88",
+ "\xF3" => "\xC3\xB3",
+ "\xF4" => "\xC3\xB4",
+ "\xF5" => "\xC5\x91",
+ "\xF6" => "\xC3\xB6",
+ "\xF7" => "\xC3\xB7",
+ "\xF8" => "\xC5\x99",
+ "\xF9" => "\xC5\xAF",
+ "\xFA" => "\xC3\xBA",
+ "\xFB" => "\xC5\xB1",
+ "\xFC" => "\xC3\xBC",
+ "\xFD" => "\xC3\xBD",
+ "\xFE" => "\xC5\xA3",
+ "\xFF" => "\xCB\x99",
+ );
+ return strtr($string, $transform);
+}
+
+function iso_8859_4($string)
+{
+ static $transform = array(
+ "\x80" => "\xC2\x80",
+ "\x81" => "\xC2\x81",
+ "\x82" => "\xC2\x82",
+ "\x83" => "\xC2\x83",
+ "\x84" => "\xC2\x84",
+ "\x85" => "\xC2\x85",
+ "\x86" => "\xC2\x86",
+ "\x87" => "\xC2\x87",
+ "\x88" => "\xC2\x88",
+ "\x89" => "\xC2\x89",
+ "\x8A" => "\xC2\x8A",
+ "\x8B" => "\xC2\x8B",
+ "\x8C" => "\xC2\x8C",
+ "\x8D" => "\xC2\x8D",
+ "\x8E" => "\xC2\x8E",
+ "\x8F" => "\xC2\x8F",
+ "\x90" => "\xC2\x90",
+ "\x91" => "\xC2\x91",
+ "\x92" => "\xC2\x92",
+ "\x93" => "\xC2\x93",
+ "\x94" => "\xC2\x94",
+ "\x95" => "\xC2\x95",
+ "\x96" => "\xC2\x96",
+ "\x97" => "\xC2\x97",
+ "\x98" => "\xC2\x98",
+ "\x99" => "\xC2\x99",
+ "\x9A" => "\xC2\x9A",
+ "\x9B" => "\xC2\x9B",
+ "\x9C" => "\xC2\x9C",
+ "\x9D" => "\xC2\x9D",
+ "\x9E" => "\xC2\x9E",
+ "\x9F" => "\xC2\x9F",
+ "\xA0" => "\xC2\xA0",
+ "\xA1" => "\xC4\x84",
+ "\xA2" => "\xC4\xB8",
+ "\xA3" => "\xC5\x96",
+ "\xA4" => "\xC2\xA4",
+ "\xA5" => "\xC4\xA8",
+ "\xA6" => "\xC4\xBB",
+ "\xA7" => "\xC2\xA7",
+ "\xA8" => "\xC2\xA8",
+ "\xA9" => "\xC5\xA0",
+ "\xAA" => "\xC4\x92",
+ "\xAB" => "\xC4\xA2",
+ "\xAC" => "\xC5\xA6",
+ "\xAD" => "\xC2\xAD",
+ "\xAE" => "\xC5\xBD",
+ "\xAF" => "\xC2\xAF",
+ "\xB0" => "\xC2\xB0",
+ "\xB1" => "\xC4\x85",
+ "\xB2" => "\xCB\x9B",
+ "\xB3" => "\xC5\x97",
+ "\xB4" => "\xC2\xB4",
+ "\xB5" => "\xC4\xA9",
+ "\xB6" => "\xC4\xBC",
+ "\xB7" => "\xCB\x87",
+ "\xB8" => "\xC2\xB8",
+ "\xB9" => "\xC5\xA1",
+ "\xBA" => "\xC4\x93",
+ "\xBB" => "\xC4\xA3",
+ "\xBC" => "\xC5\xA7",
+ "\xBD" => "\xC5\x8A",
+ "\xBE" => "\xC5\xBE",
+ "\xBF" => "\xC5\x8B",
+ "\xC0" => "\xC4\x80",
+ "\xC1" => "\xC3\x81",
+ "\xC2" => "\xC3\x82",
+ "\xC3" => "\xC3\x83",
+ "\xC4" => "\xC3\x84",
+ "\xC5" => "\xC3\x85",
+ "\xC6" => "\xC3\x86",
+ "\xC7" => "\xC4\xAE",
+ "\xC8" => "\xC4\x8C",
+ "\xC9" => "\xC3\x89",
+ "\xCA" => "\xC4\x98",
+ "\xCB" => "\xC3\x8B",
+ "\xCC" => "\xC4\x96",
+ "\xCD" => "\xC3\x8D",
+ "\xCE" => "\xC3\x8E",
+ "\xCF" => "\xC4\xAA",
+ "\xD0" => "\xC4\x90",
+ "\xD1" => "\xC5\x85",
+ "\xD2" => "\xC5\x8C",
+ "\xD3" => "\xC4\xB6",
+ "\xD4" => "\xC3\x94",
+ "\xD5" => "\xC3\x95",
+ "\xD6" => "\xC3\x96",
+ "\xD7" => "\xC3\x97",
+ "\xD8" => "\xC3\x98",
+ "\xD9" => "\xC5\xB2",
+ "\xDA" => "\xC3\x9A",
+ "\xDB" => "\xC3\x9B",
+ "\xDC" => "\xC3\x9C",
+ "\xDD" => "\xC5\xA8",
+ "\xDE" => "\xC5\xAA",
+ "\xDF" => "\xC3\x9F",
+ "\xE0" => "\xC4\x81",
+ "\xE1" => "\xC3\xA1",
+ "\xE2" => "\xC3\xA2",
+ "\xE3" => "\xC3\xA3",
+ "\xE4" => "\xC3\xA4",
+ "\xE5" => "\xC3\xA5",
+ "\xE6" => "\xC3\xA6",
+ "\xE7" => "\xC4\xAF",
+ "\xE8" => "\xC4\x8D",
+ "\xE9" => "\xC3\xA9",
+ "\xEA" => "\xC4\x99",
+ "\xEB" => "\xC3\xAB",
+ "\xEC" => "\xC4\x97",
+ "\xED" => "\xC3\xAD",
+ "\xEE" => "\xC3\xAE",
+ "\xEF" => "\xC4\xAB",
+ "\xF0" => "\xC4\x91",
+ "\xF1" => "\xC5\x86",
+ "\xF2" => "\xC5\x8D",
+ "\xF3" => "\xC4\xB7",
+ "\xF4" => "\xC3\xB4",
+ "\xF5" => "\xC3\xB5",
+ "\xF6" => "\xC3\xB6",
+ "\xF7" => "\xC3\xB7",
+ "\xF8" => "\xC3\xB8",
+ "\xF9" => "\xC5\xB3",
+ "\xFA" => "\xC3\xBA",
+ "\xFB" => "\xC3\xBB",
+ "\xFC" => "\xC3\xBC",
+ "\xFD" => "\xC5\xA9",
+ "\xFE" => "\xC5\xAB",
+ "\xFF" => "\xCB\x99",
+ );
+ return strtr($string, $transform);
+}
+
+function iso_8859_7($string)
+{
+ static $transform = array(
+ "\x80" => "\xC2\x80",
+ "\x81" => "\xC2\x81",
+ "\x82" => "\xC2\x82",
+ "\x83" => "\xC2\x83",
+ "\x84" => "\xC2\x84",
+ "\x85" => "\xC2\x85",
+ "\x86" => "\xC2\x86",
+ "\x87" => "\xC2\x87",
+ "\x88" => "\xC2\x88",
+ "\x89" => "\xC2\x89",
+ "\x8A" => "\xC2\x8A",
+ "\x8B" => "\xC2\x8B",
+ "\x8C" => "\xC2\x8C",
+ "\x8D" => "\xC2\x8D",
+ "\x8E" => "\xC2\x8E",
+ "\x8F" => "\xC2\x8F",
+ "\x90" => "\xC2\x90",
+ "\x91" => "\xC2\x91",
+ "\x92" => "\xC2\x92",
+ "\x93" => "\xC2\x93",
+ "\x94" => "\xC2\x94",
+ "\x95" => "\xC2\x95",
+ "\x96" => "\xC2\x96",
+ "\x97" => "\xC2\x97",
+ "\x98" => "\xC2\x98",
+ "\x99" => "\xC2\x99",
+ "\x9A" => "\xC2\x9A",
+ "\x9B" => "\xC2\x9B",
+ "\x9C" => "\xC2\x9C",
+ "\x9D" => "\xC2\x9D",
+ "\x9E" => "\xC2\x9E",
+ "\x9F" => "\xC2\x9F",
+ "\xA0" => "\xC2\xA0",
+ "\xA1" => "\xE2\x80\x98",
+ "\xA2" => "\xE2\x80\x99",
+ "\xA3" => "\xC2\xA3",
+ "\xA4" => "\xE2\x82\xAC",
+ "\xA5" => "\xE2\x82\xAF",
+ "\xA6" => "\xC2\xA6",
+ "\xA7" => "\xC2\xA7",
+ "\xA8" => "\xC2\xA8",
+ "\xA9" => "\xC2\xA9",
+ "\xAA" => "\xCD\xBA",
+ "\xAB" => "\xC2\xAB",
+ "\xAC" => "\xC2\xAC",
+ "\xAD" => "\xC2\xAD",
+ "\xAF" => "\xE2\x80\x95",
+ "\xB0" => "\xC2\xB0",
+ "\xB1" => "\xC2\xB1",
+ "\xB2" => "\xC2\xB2",
+ "\xB3" => "\xC2\xB3",
+ "\xB4" => "\xCE\x84",
+ "\xB5" => "\xCE\x85",
+ "\xB6" => "\xCE\x86",
+ "\xB7" => "\xC2\xB7",
+ "\xB8" => "\xCE\x88",
+ "\xB9" => "\xCE\x89",
+ "\xBA" => "\xCE\x8A",
+ "\xBB" => "\xC2\xBB",
+ "\xBC" => "\xCE\x8C",
+ "\xBD" => "\xC2\xBD",
+ "\xBE" => "\xCE\x8E",
+ "\xBF" => "\xCE\x8F",
+ "\xC0" => "\xCE\x90",
+ "\xC1" => "\xCE\x91",
+ "\xC2" => "\xCE\x92",
+ "\xC3" => "\xCE\x93",
+ "\xC4" => "\xCE\x94",
+ "\xC5" => "\xCE\x95",
+ "\xC6" => "\xCE\x96",
+ "\xC7" => "\xCE\x97",
+ "\xC8" => "\xCE\x98",
+ "\xC9" => "\xCE\x99",
+ "\xCA" => "\xCE\x9A",
+ "\xCB" => "\xCE\x9B",
+ "\xCC" => "\xCE\x9C",
+ "\xCD" => "\xCE\x9D",
+ "\xCE" => "\xCE\x9E",
+ "\xCF" => "\xCE\x9F",
+ "\xD0" => "\xCE\xA0",
+ "\xD1" => "\xCE\xA1",
+ "\xD3" => "\xCE\xA3",
+ "\xD4" => "\xCE\xA4",
+ "\xD5" => "\xCE\xA5",
+ "\xD6" => "\xCE\xA6",
+ "\xD7" => "\xCE\xA7",
+ "\xD8" => "\xCE\xA8",
+ "\xD9" => "\xCE\xA9",
+ "\xDA" => "\xCE\xAA",
+ "\xDB" => "\xCE\xAB",
+ "\xDC" => "\xCE\xAC",
+ "\xDD" => "\xCE\xAD",
+ "\xDE" => "\xCE\xAE",
+ "\xDF" => "\xCE\xAF",
+ "\xE0" => "\xCE\xB0",
+ "\xE1" => "\xCE\xB1",
+ "\xE2" => "\xCE\xB2",
+ "\xE3" => "\xCE\xB3",
+ "\xE4" => "\xCE\xB4",
+ "\xE5" => "\xCE\xB5",
+ "\xE6" => "\xCE\xB6",
+ "\xE7" => "\xCE\xB7",
+ "\xE8" => "\xCE\xB8",
+ "\xE9" => "\xCE\xB9",
+ "\xEA" => "\xCE\xBA",
+ "\xEB" => "\xCE\xBB",
+ "\xEC" => "\xCE\xBC",
+ "\xED" => "\xCE\xBD",
+ "\xEE" => "\xCE\xBE",
+ "\xEF" => "\xCE\xBF",
+ "\xF0" => "\xCF\x80",
+ "\xF1" => "\xCF\x81",
+ "\xF2" => "\xCF\x82",
+ "\xF3" => "\xCF\x83",
+ "\xF4" => "\xCF\x84",
+ "\xF5" => "\xCF\x85",
+ "\xF6" => "\xCF\x86",
+ "\xF7" => "\xCF\x87",
+ "\xF8" => "\xCF\x88",
+ "\xF9" => "\xCF\x89",
+ "\xFA" => "\xCF\x8A",
+ "\xFB" => "\xCF\x8B",
+ "\xFC" => "\xCF\x8C",
+ "\xFD" => "\xCF\x8D",
+ "\xFE" => "\xCF\x8E",
+ );
+ return strtr($string, $transform);
+}
+
+function iso_8859_8($string)
+{
+ static $transform = array(
+ "\xC2\xAA" => "\xC3\x97",
+ "\xC2\xBA" => "\xC3\xB7",
+ "\xC3\x9F" => "\xE2\x80\x97",
+ "\xC3\xA0" => "\xD7\x90",
+ "\xC3\xA1" => "\xD7\x91",
+ "\xC3\xA2" => "\xD7\x92",
+ "\xC3\xA3" => "\xD7\x93",
+ "\xC3\xA4" => "\xD7\x94",
+ "\xC3\xA5" => "\xD7\x95",
+ "\xC3\xA6" => "\xD7\x96",
+ "\xC3\xA7" => "\xD7\x97",
+ "\xC3\xA8" => "\xD7\x98",
+ "\xC3\xA9" => "\xD7\x99",
+ "\xC3\xAA" => "\xD7\x9A",
+ "\xC3\xAB" => "\xD7\x9B",
+ "\xC3\xAC" => "\xD7\x9C",
+ "\xC3\xAD" => "\xD7\x9D",
+ "\xC3\xAE" => "\xD7\x9E",
+ "\xC3\xAF" => "\xD7\x9F",
+ "\xC3\xB0" => "\xD7\xA0",
+ "\xC3\xB1" => "\xD7\xA1",
+ "\xC3\xB2" => "\xD7\xA2",
+ "\xC3\xB3" => "\xD7\xA3",
+ "\xC3\xB4" => "\xD7\xA4",
+ "\xC3\xB5" => "\xD7\xA5",
+ "\xC3\xB6" => "\xD7\xA6",
+ "\xC3\xB7" => "\xD7\xA7",
+ "\xC3\xB8" => "\xD7\xA8",
+ "\xC3\xB9" => "\xD7\xA9",
+ "\xC3\xBA" => "\xD7\xAA",
+ "\xC3\xBD" => "\xE2\x80\x8E",
+ "\xC3\xBE" => "\xE2\x80\x8F",
+ );
+ return strtr(utf8_encode($string), $transform);
+}
+
+function iso_8859_9($string)
+{
+ static $transform = array(
+ "\xC3\x90" => "\xC4\x9E",
+ "\xC3\x9D" => "\xC4\xB0",
+ "\xC3\x9E" => "\xC5\x9E",
+ "\xC3\xB0" => "\xC4\x9F",
+ "\xC3\xBD" => "\xC4\xB1",
+ "\xC3\xBE" => "\xC5\x9F",
+ );
+ return strtr(utf8_encode($string), $transform);
+}
+
+function iso_8859_15($string)
+{
+ static $transform = array(
+ "\xC2\xA4" => "\xE2\x82\xAC",
+ "\xC2\xA6" => "\xC5\xA0",
+ "\xC2\xA8" => "\xC5\xA1",
+ "\xC2\xB4" => "\xC5\xBD",
+ "\xC2\xB8" => "\xC5\xBE",
+ "\xC2\xBC" => "\xC5\x92",
+ "\xC2\xBD" => "\xC5\x93",
+ "\xC2\xBE" => "\xC5\xB8",
+ );
+ return strtr(utf8_encode($string), $transform);
+}
+
+// nearly the same as iso-8859-11
+function tis_620($string)
+{
+ static $transform = array(
+ "\x80" => "\xC2\x80",
+ "\x81" => "\xC2\x81",
+ "\x82" => "\xC2\x82",
+ "\x83" => "\xC2\x83",
+ "\x84" => "\xC2\x84",
+ "\x85" => "\xC2\x85",
+ "\x86" => "\xC2\x86",
+ "\x87" => "\xC2\x87",
+ "\x88" => "\xC2\x88",
+ "\x89" => "\xC2\x89",
+ "\x8A" => "\xC2\x8A",
+ "\x8B" => "\xC2\x8B",
+ "\x8C" => "\xC2\x8C",
+ "\x8D" => "\xC2\x8D",
+ "\x8E" => "\xC2\x8E",
+ "\x8F" => "\xC2\x8F",
+ "\x90" => "\xC2\x90",
+ "\x91" => "\xC2\x91",
+ "\x92" => "\xC2\x92",
+ "\x93" => "\xC2\x93",
+ "\x94" => "\xC2\x94",
+ "\x95" => "\xC2\x95",
+ "\x96" => "\xC2\x96",
+ "\x97" => "\xC2\x97",
+ "\x98" => "\xC2\x98",
+ "\x99" => "\xC2\x99",
+ "\x9A" => "\xC2\x9A",
+ "\x9B" => "\xC2\x9B",
+ "\x9C" => "\xC2\x9C",
+ "\x9D" => "\xC2\x9D",
+ "\x9E" => "\xC2\x9E",
+ "\x9F" => "\xC2\x9F",
+ "\xA1" => "\xE0\xB8\x81",
+ "\xA2" => "\xE0\xB8\x82",
+ "\xA3" => "\xE0\xB8\x83",
+ "\xA4" => "\xE0\xB8\x84",
+ "\xA5" => "\xE0\xB8\x85",
+ "\xA6" => "\xE0\xB8\x86",
+ "\xA7" => "\xE0\xB8\x87",
+ "\xA8" => "\xE0\xB8\x88",
+ "\xA9" => "\xE0\xB8\x89",
+ "\xAA" => "\xE0\xB8\x8A",
+ "\xAB" => "\xE0\xB8\x8B",
+ "\xAC" => "\xE0\xB8\x8C",
+ "\xAD" => "\xE0\xB8\x8D",
+ "\xAE" => "\xE0\xB8\x8E",
+ "\xAF" => "\xE0\xB8\x8F",
+ "\xB0" => "\xE0\xB8\x90",
+ "\xB1" => "\xE0\xB8\x91",
+ "\xB2" => "\xE0\xB8\x92",
+ "\xB3" => "\xE0\xB8\x93",
+ "\xB4" => "\xE0\xB8\x94",
+ "\xB5" => "\xE0\xB8\x95",
+ "\xB6" => "\xE0\xB8\x96",
+ "\xB7" => "\xE0\xB8\x97",
+ "\xB8" => "\xE0\xB8\x98",
+ "\xB9" => "\xE0\xB8\x99",
+ "\xBA" => "\xE0\xB8\x9A",
+ "\xBB" => "\xE0\xB8\x9B",
+ "\xBC" => "\xE0\xB8\x9C",
+ "\xBD" => "\xE0\xB8\x9D",
+ "\xBE" => "\xE0\xB8\x9E",
+ "\xBF" => "\xE0\xB8\x9F",
+ "\xC0" => "\xE0\xB8\xA0",
+ "\xC1" => "\xE0\xB8\xA1",
+ "\xC2" => "\xE0\xB8\xA2",
+ "\xC3" => "\xE0\xB8\xA3",
+ "\xC4" => "\xE0\xB8\xA4",
+ "\xC5" => "\xE0\xB8\xA5",
+ "\xC6" => "\xE0\xB8\xA6",
+ "\xC7" => "\xE0\xB8\xA7",
+ "\xC8" => "\xE0\xB8\xA8",
+ "\xC9" => "\xE0\xB8\xA9",
+ "\xCA" => "\xE0\xB8\xAA",
+ "\xCB" => "\xE0\xB8\xAB",
+ "\xCC" => "\xE0\xB8\xAC",
+ "\xCD" => "\xE0\xB8\xAD",
+ "\xCE" => "\xE0\xB8\xAE",
+ "\xCF" => "\xE0\xB8\xAF",
+ "\xD0" => "\xE0\xB8\xB0",
+ "\xD1" => "\xE0\xB8\xB1",
+ "\xD2" => "\xE0\xB8\xB2",
+ "\xD3" => "\xE0\xB8\xB3",
+ "\xD4" => "\xE0\xB8\xB4",
+ "\xD5" => "\xE0\xB8\xB5",
+ "\xD6" => "\xE0\xB8\xB6",
+ "\xD7" => "\xE0\xB8\xB7",
+ "\xD8" => "\xE0\xB8\xB8",
+ "\xD9" => "\xE0\xB8\xB9",
+ "\xDA" => "\xE0\xB8\xBA",
+ "\xDF" => "\xE0\xB8\xBF",
+ "\xE0" => "\xE0\xB9\x80",
+ "\xE1" => "\xE0\xB9\x81",
+ "\xE2" => "\xE0\xB9\x82",
+ "\xE3" => "\xE0\xB9\x83",
+ "\xE4" => "\xE0\xB9\x84",
+ "\xE5" => "\xE0\xB9\x85",
+ "\xE6" => "\xE0\xB9\x86",
+ "\xE7" => "\xE0\xB9\x87",
+ "\xE8" => "\xE0\xB9\x88",
+ "\xE9" => "\xE0\xB9\x89",
+ "\xEA" => "\xE0\xB9\x8A",
+ "\xEB" => "\xE0\xB9\x8B",
+ "\xEC" => "\xE0\xB9\x8C",
+ "\xED" => "\xE0\xB9\x8D",
+ "\xEE" => "\xE0\xB9\x8E",
+ "\xEF" => "\xE0\xB9\x8F",
+ "\xF0" => "\xE0\xB9\x90",
+ "\xF1" => "\xE0\xB9\x91",
+ "\xF2" => "\xE0\xB9\x92",
+ "\xF3" => "\xE0\xB9\x93",
+ "\xF4" => "\xE0\xB9\x94",
+ "\xF5" => "\xE0\xB9\x95",
+ "\xF6" => "\xE0\xB9\x96",
+ "\xF7" => "\xE0\xB9\x97",
+ "\xF8" => "\xE0\xB9\x98",
+ "\xF9" => "\xE0\xB9\x99",
+ "\xFA" => "\xE0\xB9\x9A",
+ "\xFB" => "\xE0\xB9\x9B",
+ );
+ return strtr($string, $transform);
+}
+
+function cp874($string)
+{
+ static $transform = array(
+ "\x80" => "\xE2\x82\xAC",
+ "\x85" => "\xE2\x80\xA6",
+ "\x91" => "\xE2\x80\x98",
+ "\x92" => "\xE2\x80\x99",
+ "\x93" => "\xE2\x80\x9C",
+ "\x94" => "\xE2\x80\x9D",
+ "\x95" => "\xE2\x80\xA2",
+ "\x96" => "\xE2\x80\x93",
+ "\x97" => "\xE2\x80\x94",
+ "\xA0" => "\xC2\xA0",
+ "\xA1" => "\xE0\xB8\x81",
+ "\xA2" => "\xE0\xB8\x82",
+ "\xA3" => "\xE0\xB8\x83",
+ "\xA4" => "\xE0\xB8\x84",
+ "\xA5" => "\xE0\xB8\x85",
+ "\xA6" => "\xE0\xB8\x86",
+ "\xA7" => "\xE0\xB8\x87",
+ "\xA8" => "\xE0\xB8\x88",
+ "\xA9" => "\xE0\xB8\x89",
+ "\xAA" => "\xE0\xB8\x8A",
+ "\xAB" => "\xE0\xB8\x8B",
+ "\xAC" => "\xE0\xB8\x8C",
+ "\xAD" => "\xE0\xB8\x8D",
+ "\xAE" => "\xE0\xB8\x8E",
+ "\xAF" => "\xE0\xB8\x8F",
+ "\xB0" => "\xE0\xB8\x90",
+ "\xB1" => "\xE0\xB8\x91",
+ "\xB2" => "\xE0\xB8\x92",
+ "\xB3" => "\xE0\xB8\x93",
+ "\xB4" => "\xE0\xB8\x94",
+ "\xB5" => "\xE0\xB8\x95",
+ "\xB6" => "\xE0\xB8\x96",
+ "\xB7" => "\xE0\xB8\x97",
+ "\xB8" => "\xE0\xB8\x98",
+ "\xB9" => "\xE0\xB8\x99",
+ "\xBA" => "\xE0\xB8\x9A",
+ "\xBB" => "\xE0\xB8\x9B",
+ "\xBC" => "\xE0\xB8\x9C",
+ "\xBD" => "\xE0\xB8\x9D",
+ "\xBE" => "\xE0\xB8\x9E",
+ "\xBF" => "\xE0\xB8\x9F",
+ "\xC0" => "\xE0\xB8\xA0",
+ "\xC1" => "\xE0\xB8\xA1",
+ "\xC2" => "\xE0\xB8\xA2",
+ "\xC3" => "\xE0\xB8\xA3",
+ "\xC4" => "\xE0\xB8\xA4",
+ "\xC5" => "\xE0\xB8\xA5",
+ "\xC6" => "\xE0\xB8\xA6",
+ "\xC7" => "\xE0\xB8\xA7",
+ "\xC8" => "\xE0\xB8\xA8",
+ "\xC9" => "\xE0\xB8\xA9",
+ "\xCA" => "\xE0\xB8\xAA",
+ "\xCB" => "\xE0\xB8\xAB",
+ "\xCC" => "\xE0\xB8\xAC",
+ "\xCD" => "\xE0\xB8\xAD",
+ "\xCE" => "\xE0\xB8\xAE",
+ "\xCF" => "\xE0\xB8\xAF",
+ "\xD0" => "\xE0\xB8\xB0",
+ "\xD1" => "\xE0\xB8\xB1",
+ "\xD2" => "\xE0\xB8\xB2",
+ "\xD3" => "\xE0\xB8\xB3",
+ "\xD4" => "\xE0\xB8\xB4",
+ "\xD5" => "\xE0\xB8\xB5",
+ "\xD6" => "\xE0\xB8\xB6",
+ "\xD7" => "\xE0\xB8\xB7",
+ "\xD8" => "\xE0\xB8\xB8",
+ "\xD9" => "\xE0\xB8\xB9",
+ "\xDA" => "\xE0\xB8\xBA",
+ "\xDF" => "\xE0\xB8\xBF",
+ "\xE0" => "\xE0\xB9\x80",
+ "\xE1" => "\xE0\xB9\x81",
+ "\xE2" => "\xE0\xB9\x82",
+ "\xE3" => "\xE0\xB9\x83",
+ "\xE4" => "\xE0\xB9\x84",
+ "\xE5" => "\xE0\xB9\x85",
+ "\xE6" => "\xE0\xB9\x86",
+ "\xE7" => "\xE0\xB9\x87",
+ "\xE8" => "\xE0\xB9\x88",
+ "\xE9" => "\xE0\xB9\x89",
+ "\xEA" => "\xE0\xB9\x8A",
+ "\xEB" => "\xE0\xB9\x8B",
+ "\xEC" => "\xE0\xB9\x8C",
+ "\xED" => "\xE0\xB9\x8D",
+ "\xEE" => "\xE0\xB9\x8E",
+ "\xEF" => "\xE0\xB9\x8F",
+ "\xF0" => "\xE0\xB9\x90",
+ "\xF1" => "\xE0\xB9\x91",
+ "\xF2" => "\xE0\xB9\x92",
+ "\xF3" => "\xE0\xB9\x93",
+ "\xF4" => "\xE0\xB9\x94",
+ "\xF5" => "\xE0\xB9\x95",
+ "\xF6" => "\xE0\xB9\x96",
+ "\xF7" => "\xE0\xB9\x97",
+ "\xF8" => "\xE0\xB9\x98",
+ "\xF9" => "\xE0\xB9\x99",
+ "\xFA" => "\xE0\xB9\x9A",
+ "\xFB" => "\xE0\xB9\x9B",
+ );
+ return strtr($string, $transform);
+}
+
+function cp1250($string)
+{
+ static $transform = array(
+ "\x80" => "\xE2\x82\xAC",
+ "\x82" => "\xE2\x80\x9A",
+ "\x84" => "\xE2\x80\x9E",
+ "\x85" => "\xE2\x80\xA6",
+ "\x86" => "\xE2\x80\xA0",
+ "\x87" => "\xE2\x80\xA1",
+ "\x89" => "\xE2\x80\xB0",
+ "\x8A" => "\xC5\xA0",
+ "\x8B" => "\xE2\x80\xB9",
+ "\x8C" => "\xC5\x9A",
+ "\x8D" => "\xC5\xA4",
+ "\x8E" => "\xC5\xBD",
+ "\x8F" => "\xC5\xB9",
+ "\x91" => "\xE2\x80\x98",
+ "\x92" => "\xE2\x80\x99",
+ "\x93" => "\xE2\x80\x9C",
+ "\x94" => "\xE2\x80\x9D",
+ "\x95" => "\xE2\x80\xA2",
+ "\x96" => "\xE2\x80\x93",
+ "\x97" => "\xE2\x80\x94",
+ "\x99" => "\xE2\x84\xA2",
+ "\x9A" => "\xC5\xA1",
+ "\x9B" => "\xE2\x80\xBA",
+ "\x9C" => "\xC5\x9B",
+ "\x9D" => "\xC5\xA5",
+ "\x9E" => "\xC5\xBE",
+ "\x9F" => "\xC5\xBA",
+ "\xA0" => "\xC2\xA0",
+ "\xA1" => "\xCB\x87",
+ "\xA2" => "\xCB\x98",
+ "\xA3" => "\xC5\x81",
+ "\xA4" => "\xC2\xA4",
+ "\xA5" => "\xC4\x84",
+ "\xA6" => "\xC2\xA6",
+ "\xA7" => "\xC2\xA7",
+ "\xA8" => "\xC2\xA8",
+ "\xA9" => "\xC2\xA9",
+ "\xAA" => "\xC5\x9E",
+ "\xAB" => "\xC2\xAB",
+ "\xAC" => "\xC2\xAC",
+ "\xAD" => "\xC2\xAD",
+ "\xAE" => "\xC2\xAE",
+ "\xAF" => "\xC5\xBB",
+ "\xB0" => "\xC2\xB0",
+ "\xB1" => "\xC2\xB1",
+ "\xB2" => "\xCB\x9B",
+ "\xB3" => "\xC5\x82",
+ "\xB4" => "\xC2\xB4",
+ "\xB5" => "\xC2\xB5",
+ "\xB6" => "\xC2\xB6",
+ "\xB7" => "\xC2\xB7",
+ "\xB8" => "\xC2\xB8",
+ "\xB9" => "\xC4\x85",
+ "\xBA" => "\xC5\x9F",
+ "\xBB" => "\xC2\xBB",
+ "\xBC" => "\xC4\xBD",
+ "\xBD" => "\xCB\x9D",
+ "\xBE" => "\xC4\xBE",
+ "\xBF" => "\xC5\xBC",
+ "\xC0" => "\xC5\x94",
+ "\xC1" => "\xC3\x81",
+ "\xC2" => "\xC3\x82",
+ "\xC3" => "\xC4\x82",
+ "\xC4" => "\xC3\x84",
+ "\xC5" => "\xC4\xB9",
+ "\xC6" => "\xC4\x86",
+ "\xC7" => "\xC3\x87",
+ "\xC8" => "\xC4\x8C",
+ "\xC9" => "\xC3\x89",
+ "\xCA" => "\xC4\x98",
+ "\xCB" => "\xC3\x8B",
+ "\xCC" => "\xC4\x9A",
+ "\xCD" => "\xC3\x8D",
+ "\xCE" => "\xC3\x8E",
+ "\xCF" => "\xC4\x8E",
+ "\xD0" => "\xC4\x90",
+ "\xD1" => "\xC5\x83",
+ "\xD2" => "\xC5\x87",
+ "\xD3" => "\xC3\x93",
+ "\xD4" => "\xC3\x94",
+ "\xD5" => "\xC5\x90",
+ "\xD6" => "\xC3\x96",
+ "\xD7" => "\xC3\x97",
+ "\xD8" => "\xC5\x98",
+ "\xD9" => "\xC5\xAE",
+ "\xDA" => "\xC3\x9A",
+ "\xDB" => "\xC5\xB0",
+ "\xDC" => "\xC3\x9C",
+ "\xDD" => "\xC3\x9D",
+ "\xDE" => "\xC5\xA2",
+ "\xDF" => "\xC3\x9F",
+ "\xE0" => "\xC5\x95",
+ "\xE1" => "\xC3\xA1",
+ "\xE2" => "\xC3\xA2",
+ "\xE3" => "\xC4\x83",
+ "\xE4" => "\xC3\xA4",
+ "\xE5" => "\xC4\xBA",
+ "\xE6" => "\xC4\x87",
+ "\xE7" => "\xC3\xA7",
+ "\xE8" => "\xC4\x8D",
+ "\xE9" => "\xC3\xA9",
+ "\xEA" => "\xC4\x99",
+ "\xEB" => "\xC3\xAB",
+ "\xEC" => "\xC4\x9B",
+ "\xED" => "\xC3\xAD",
+ "\xEE" => "\xC3\xAE",
+ "\xEF" => "\xC4\x8F",
+ "\xF0" => "\xC4\x91",
+ "\xF1" => "\xC5\x84",
+ "\xF2" => "\xC5\x88",
+ "\xF3" => "\xC3\xB3",
+ "\xF4" => "\xC3\xB4",
+ "\xF5" => "\xC5\x91",
+ "\xF6" => "\xC3\xB6",
+ "\xF7" => "\xC3\xB7",
+ "\xF8" => "\xC5\x99",
+ "\xF9" => "\xC5\xAF",
+ "\xFA" => "\xC3\xBA",
+ "\xFB" => "\xC5\xB1",
+ "\xFC" => "\xC3\xBC",
+ "\xFD" => "\xC3\xBD",
+ "\xFE" => "\xC5\xA3",
+ "\xFF" => "\xCB\x99",
+ );
+ return strtr($string, $transform);
+}
+
+function cp1251($string)
+{
+ static $transform = array(
+ "\x80" => "\xD0\x82",
+ "\x81" => "\xD0\x83",
+ "\x82" => "\xE2\x80\x9A",
+ "\x83" => "\xD1\x93",
+ "\x84" => "\xE2\x80\x9E",
+ "\x85" => "\xE2\x80\xA6",
+ "\x86" => "\xE2\x80\xA0",
+ "\x87" => "\xE2\x80\xA1",
+ "\x88" => "\xE2\x82\xAC",
+ "\x89" => "\xE2\x80\xB0",
+ "\x8A" => "\xD0\x89",
+ "\x8B" => "\xE2\x80\xB9",
+ "\x8C" => "\xD0\x8A",
+ "\x8D" => "\xD0\x8C",
+ "\x8E" => "\xD0\x8B",
+ "\x8F" => "\xD0\x8F",
+ "\x90" => "\xD1\x92",
+ "\x91" => "\xE2\x80\x98",
+ "\x92" => "\xE2\x80\x99",
+ "\x93" => "\xE2\x80\x9C",
+ "\x94" => "\xE2\x80\x9D",
+ "\x95" => "\xE2\x80\xA2",
+ "\x96" => "\xE2\x80\x93",
+ "\x97" => "\xE2\x80\x94",
+ "\x99" => "\xE2\x84\xA2",
+ "\x9A" => "\xD1\x99",
+ "\x9B" => "\xE2\x80\xBA",
+ "\x9C" => "\xD1\x9A",
+ "\x9D" => "\xD1\x9C",
+ "\x9E" => "\xD1\x9B",
+ "\x9F" => "\xD1\x9F",
+ "\xA0" => "\xC2\xA0",
+ "\xA1" => "\xD0\x8E",
+ "\xA2" => "\xD1\x9E",
+ "\xA3" => "\xD0\x88",
+ "\xA4" => "\xC2\xA4",
+ "\xA5" => "\xD2\x90",
+ "\xA6" => "\xC2\xA6",
+ "\xA7" => "\xC2\xA7",
+ "\xA8" => "\xD0\x81",
+ "\xA9" => "\xC2\xA9",
+ "\xAA" => "\xD0\x84",
+ "\xAB" => "\xC2\xAB",
+ "\xAC" => "\xC2\xAC",
+ "\xAD" => "\xC2\xAD",
+ "\xAE" => "\xC2\xAE",
+ "\xAF" => "\xD0\x87",
+ "\xB0" => "\xC2\xB0",
+ "\xB1" => "\xC2\xB1",
+ "\xB2" => "\xD0\x86",
+ "\xB3" => "\xD1\x96",
+ "\xB4" => "\xD2\x91",
+ "\xB5" => "\xC2\xB5",
+ "\xB6" => "\xC2\xB6",
+ "\xB7" => "\xC2\xB7",
+ "\xB8" => "\xD1\x91",
+ "\xB9" => "\xE2\x84\x96",
+ "\xBA" => "\xD1\x94",
+ "\xBB" => "\xC2\xBB",
+ "\xBC" => "\xD1\x98",
+ "\xBD" => "\xD0\x85",
+ "\xBE" => "\xD1\x95",
+ "\xBF" => "\xD1\x97",
+ "\xC0" => "\xD0\x90",
+ "\xC1" => "\xD0\x91",
+ "\xC2" => "\xD0\x92",
+ "\xC3" => "\xD0\x93",
+ "\xC4" => "\xD0\x94",
+ "\xC5" => "\xD0\x95",
+ "\xC6" => "\xD0\x96",
+ "\xC7" => "\xD0\x97",
+ "\xC8" => "\xD0\x98",
+ "\xC9" => "\xD0\x99",
+ "\xCA" => "\xD0\x9A",
+ "\xCB" => "\xD0\x9B",
+ "\xCC" => "\xD0\x9C",
+ "\xCD" => "\xD0\x9D",
+ "\xCE" => "\xD0\x9E",
+ "\xCF" => "\xD0\x9F",
+ "\xD0" => "\xD0\xA0",
+ "\xD1" => "\xD0\xA1",
+ "\xD2" => "\xD0\xA2",
+ "\xD3" => "\xD0\xA3",
+ "\xD4" => "\xD0\xA4",
+ "\xD5" => "\xD0\xA5",
+ "\xD6" => "\xD0\xA6",
+ "\xD7" => "\xD0\xA7",
+ "\xD8" => "\xD0\xA8",
+ "\xD9" => "\xD0\xA9",
+ "\xDA" => "\xD0\xAA",
+ "\xDB" => "\xD0\xAB",
+ "\xDC" => "\xD0\xAC",
+ "\xDD" => "\xD0\xAD",
+ "\xDE" => "\xD0\xAE",
+ "\xDF" => "\xD0\xAF",
+ "\xE0" => "\xD0\xB0",
+ "\xE1" => "\xD0\xB1",
+ "\xE2" => "\xD0\xB2",
+ "\xE3" => "\xD0\xB3",
+ "\xE4" => "\xD0\xB4",
+ "\xE5" => "\xD0\xB5",
+ "\xE6" => "\xD0\xB6",
+ "\xE7" => "\xD0\xB7",
+ "\xE8" => "\xD0\xB8",
+ "\xE9" => "\xD0\xB9",
+ "\xEA" => "\xD0\xBA",
+ "\xEB" => "\xD0\xBB",
+ "\xEC" => "\xD0\xBC",
+ "\xED" => "\xD0\xBD",
+ "\xEE" => "\xD0\xBE",
+ "\xEF" => "\xD0\xBF",
+ "\xF0" => "\xD1\x80",
+ "\xF1" => "\xD1\x81",
+ "\xF2" => "\xD1\x82",
+ "\xF3" => "\xD1\x83",
+ "\xF4" => "\xD1\x84",
+ "\xF5" => "\xD1\x85",
+ "\xF6" => "\xD1\x86",
+ "\xF7" => "\xD1\x87",
+ "\xF8" => "\xD1\x88",
+ "\xF9" => "\xD1\x89",
+ "\xFA" => "\xD1\x8A",
+ "\xFB" => "\xD1\x8B",
+ "\xFC" => "\xD1\x8C",
+ "\xFD" => "\xD1\x8D",
+ "\xFE" => "\xD1\x8E",
+ "\xFF" => "\xD1\x8F",
+ );
+ return strtr($string, $transform);
+}
+
+function cp1252($string)
+{
+ static $transform = array(
+ "\xC2\x80" => "\xE2\x82\xAC",
+ "\xC2\x82" => "\xE2\x80\x9A",
+ "\xC2\x83" => "\xC6\x92",
+ "\xC2\x84" => "\xE2\x80\x9E",
+ "\xC2\x85" => "\xE2\x80\xA6",
+ "\xC2\x86" => "\xE2\x80\xA0",
+ "\xC2\x87" => "\xE2\x80\xA1",
+ "\xC2\x88" => "\xCB\x86",
+ "\xC2\x89" => "\xE2\x80\xB0",
+ "\xC2\x8A" => "\xC5\xA0",
+ "\xC2\x8B" => "\xE2\x80\xB9",
+ "\xC2\x8C" => "\xC5\x92",
+ "\xC2\x8E" => "\xC5\xBD",
+ "\xC2\x91" => "\xE2\x80\x98",
+ "\xC2\x92" => "\xE2\x80\x99",
+ "\xC2\x93" => "\xE2\x80\x9C",
+ "\xC2\x94" => "\xE2\x80\x9D",
+ "\xC2\x95" => "\xE2\x80\xA2",
+ "\xC2\x96" => "\xE2\x80\x93",
+ "\xC2\x97" => "\xE2\x80\x94",
+ "\xC2\x98" => "\xCB\x9C",
+ "\xC2\x99" => "\xE2\x84\xA2",
+ "\xC2\x9A" => "\xC5\xA1",
+ "\xC2\x9B" => "\xE2\x80\xBA",
+ "\xC2\x9C" => "\xC5\x93",
+ "\xC2\x9E" => "\xC5\xBE",
+ "\xC2\x9F" => "\xC5\xB8"
+ );
+ return strtr(utf8_encode($string), $transform);
+}
+
+function cp1254($string)
+{
+ static $transform = array(
+ "\xC2\x80" => "\xE2\x82\xAC",
+ "\xC2\x82" => "\xE2\x80\x9A",
+ "\xC2\x83" => "\xC6\x92",
+ "\xC2\x84" => "\xE2\x80\x9E",
+ "\xC2\x85" => "\xE2\x80\xA6",
+ "\xC2\x86" => "\xE2\x80\xA0",
+ "\xC2\x87" => "\xE2\x80\xA1",
+ "\xC2\x88" => "\xCB\x86",
+ "\xC2\x89" => "\xE2\x80\xB0",
+ "\xC2\x8A" => "\xC5\xA0",
+ "\xC2\x8B" => "\xE2\x80\xB9",
+ "\xC2\x8C" => "\xC5\x92",
+ "\xC2\x91" => "\xE2\x80\x98",
+ "\xC2\x92" => "\xE2\x80\x99",
+ "\xC2\x93" => "\xE2\x80\x9C",
+ "\xC2\x94" => "\xE2\x80\x9D",
+ "\xC2\x95" => "\xE2\x80\xA2",
+ "\xC2\x96" => "\xE2\x80\x93",
+ "\xC2\x97" => "\xE2\x80\x94",
+ "\xC2\x98" => "\xCB\x9C",
+ "\xC2\x99" => "\xE2\x84\xA2",
+ "\xC2\x9A" => "\xC5\xA1",
+ "\xC2\x9B" => "\xE2\x80\xBA",
+ "\xC2\x9C" => "\xC5\x93",
+ "\xC2\x9F" => "\xC5\xB8",
+ "\xC3\x90" => "\xC4\x9E",
+ "\xC3\x9D" => "\xC4\xB0",
+ "\xC3\x9E" => "\xC5\x9E",
+ "\xC3\xB0" => "\xC4\x9F",
+ "\xC3\xBD" => "\xC4\xB1",
+ "\xC3\xBE" => "\xC5\x9F",
+ );
+ return strtr(utf8_encode($string), $transform);
+}
+
+function cp1255($string)
+{
+ static $transform = array(
+ "\x80" => "\xE2\x82\xAC",
+ "\x82" => "\xE2\x80\x9A",
+ "\x83" => "\xC6\x92",
+ "\x84" => "\xE2\x80\x9E",
+ "\x85" => "\xE2\x80\xA6",
+ "\x86" => "\xE2\x80\xA0",
+ "\x87" => "\xE2\x80\xA1",
+ "\x88" => "\xCB\x86",
+ "\x89" => "\xE2\x80\xB0",
+ "\x8B" => "\xE2\x80\xB9",
+ "\x91" => "\xE2\x80\x98",
+ "\x92" => "\xE2\x80\x99",
+ "\x93" => "\xE2\x80\x9C",
+ "\x94" => "\xE2\x80\x9D",
+ "\x95" => "\xE2\x80\xA2",
+ "\x96" => "\xE2\x80\x93",
+ "\x97" => "\xE2\x80\x94",
+ "\x98" => "\xCB\x9C",
+ "\x99" => "\xE2\x84\xA2",
+ "\x9B" => "\xE2\x80\xBA",
+ "\xA0" => "\xC2\xA0",
+ "\xA1" => "\xC2\xA1",
+ "\xA2" => "\xC2\xA2",
+ "\xA3" => "\xC2\xA3",
+ "\xA4" => "\xE2\x82\xAA",
+ "\xA5" => "\xC2\xA5",
+ "\xA6" => "\xC2\xA6",
+ "\xA7" => "\xC2\xA7",
+ "\xA8" => "\xC2\xA8",
+ "\xA9" => "\xC2\xA9",
+ "\xAA" => "\xC3\x97",
+ "\xAB" => "\xC2\xAB",
+ "\xAC" => "\xC2\xAC",
+ "\xAD" => "\xC2\xAD",
+ "\xAE" => "\xC2\xAE",
+ "\xAF" => "\xC2\xAF",
+ "\xB0" => "\xC2\xB0",
+ "\xB1" => "\xC2\xB1",
+ "\xB2" => "\xC2\xB2",
+ "\xB3" => "\xC2\xB3",
+ "\xB4" => "\xC2\xB4",
+ "\xB5" => "\xC2\xB5",
+ "\xB6" => "\xC2\xB6",
+ "\xB7" => "\xC2\xB7",
+ "\xB8" => "\xC2\xB8",
+ "\xB9" => "\xC2\xB9",
+ "\xBA" => "\xC3\xB7",
+ "\xBB" => "\xC2\xBB",
+ "\xBC" => "\xC2\xBC",
+ "\xBD" => "\xC2\xBD",
+ "\xBE" => "\xC2\xBE",
+ "\xBF" => "\xC2\xBF",
+ "\xC0" => "\xD6\xB0",
+ "\xC1" => "\xD6\xB1",
+ "\xC2" => "\xD6\xB2",
+ "\xC3" => "\xD6\xB3",
+ "\xC4" => "\xD6\xB4",
+ "\xC5" => "\xD6\xB5",
+ "\xC6" => "\xD6\xB6",
+ "\xC7" => "\xD6\xB7",
+ "\xC8" => "\xD6\xB8",
+ "\xC9" => "\xD6\xB9",
+ "\xCB" => "\xD6\xBB",
+ "\xCC" => "\xD6\xBC",
+ "\xCD" => "\xD6\xBD",
+ "\xCE" => "\xD6\xBE",
+ "\xCF" => "\xD6\xBF",
+ "\xD0" => "\xD7\x80",
+ "\xD1" => "\xD7\x81",
+ "\xD2" => "\xD7\x82",
+ "\xD3" => "\xD7\x83",
+ "\xD4" => "\xD7\xB0",
+ "\xD5" => "\xD7\xB1",
+ "\xD6" => "\xD7\xB2",
+ "\xD7" => "\xD7\xB3",
+ "\xD8" => "\xD7\xB4",
+ "\xE0" => "\xD7\x90",
+ "\xE1" => "\xD7\x91",
+ "\xE2" => "\xD7\x92",
+ "\xE3" => "\xD7\x93",
+ "\xE4" => "\xD7\x94",
+ "\xE5" => "\xD7\x95",
+ "\xE6" => "\xD7\x96",
+ "\xE7" => "\xD7\x97",
+ "\xE8" => "\xD7\x98",
+ "\xE9" => "\xD7\x99",
+ "\xEA" => "\xD7\x9A",
+ "\xEB" => "\xD7\x9B",
+ "\xEC" => "\xD7\x9C",
+ "\xED" => "\xD7\x9D",
+ "\xEE" => "\xD7\x9E",
+ "\xEF" => "\xD7\x9F",
+ "\xF0" => "\xD7\xA0",
+ "\xF1" => "\xD7\xA1",
+ "\xF2" => "\xD7\xA2",
+ "\xF3" => "\xD7\xA3",
+ "\xF4" => "\xD7\xA4",
+ "\xF5" => "\xD7\xA5",
+ "\xF6" => "\xD7\xA6",
+ "\xF7" => "\xD7\xA7",
+ "\xF8" => "\xD7\xA8",
+ "\xF9" => "\xD7\xA9",
+ "\xFA" => "\xD7\xAA",
+ "\xFD" => "\xE2\x80\x8E",
+ "\xFE" => "\xE2\x80\x8F",
+ );
+ return strtr($string, $transform);
+}
+
+function cp1256($string)
+{
+ static $transform = array(
+ "\x80" => "\xE2\x82\xAC",
+ "\x81" => "\xD9\xBE",
+ "\x82" => "\xE2\x80\x9A",
+ "\x83" => "\xC6\x92",
+ "\x84" => "\xE2\x80\x9E",
+ "\x85" => "\xE2\x80\xA6",
+ "\x86" => "\xE2\x80\xA0",
+ "\x87" => "\xE2\x80\xA1",
+ "\x88" => "\xCB\x86",
+ "\x89" => "\xE2\x80\xB0",
+ "\x8A" => "\xD9\xB9",
+ "\x8B" => "\xE2\x80\xB9",
+ "\x8C" => "\xC5\x92",
+ "\x8D" => "\xDA\x86",
+ "\x8E" => "\xDA\x98",
+ "\x8F" => "\xDA\x88",
+ "\x90" => "\xDA\xAF",
+ "\x91" => "\xE2\x80\x98",
+ "\x92" => "\xE2\x80\x99",
+ "\x93" => "\xE2\x80\x9C",
+ "\x94" => "\xE2\x80\x9D",
+ "\x95" => "\xE2\x80\xA2",
+ "\x96" => "\xE2\x80\x93",
+ "\x97" => "\xE2\x80\x94",
+ "\x98" => "\xDA\xA9",
+ "\x99" => "\xE2\x84\xA2",
+ "\x9A" => "\xDA\x91",
+ "\x9B" => "\xE2\x80\xBA",
+ "\x9C" => "\xC5\x93",
+ "\x9D" => "\xE2\x80\x8C",
+ "\x9E" => "\xE2\x80\x8D",
+ "\x9F" => "\xDA\xBA",
+ "\xA0" => "\xC2\xA0",
+ "\xA1" => "\xD8\x8C",
+ "\xA2" => "\xC2\xA2",
+ "\xA3" => "\xC2\xA3",
+ "\xA4" => "\xC2\xA4",
+ "\xA5" => "\xC2\xA5",
+ "\xA6" => "\xC2\xA6",
+ "\xA7" => "\xC2\xA7",
+ "\xA8" => "\xC2\xA8",
+ "\xA9" => "\xC2\xA9",
+ "\xAA" => "\xDA\xBE",
+ "\xAB" => "\xC2\xAB",
+ "\xAC" => "\xC2\xAC",
+ "\xAD" => "\xC2\xAD",
+ "\xAE" => "\xC2\xAE",
+ "\xAF" => "\xC2\xAF",
+ "\xB0" => "\xC2\xB0",
+ "\xB1" => "\xC2\xB1",
+ "\xB2" => "\xC2\xB2",
+ "\xB3" => "\xC2\xB3",
+ "\xB4" => "\xC2\xB4",
+ "\xB5" => "\xC2\xB5",
+ "\xB6" => "\xC2\xB6",
+ "\xB7" => "\xC2\xB7",
+ "\xB8" => "\xC2\xB8",
+ "\xB9" => "\xC2\xB9",
+ "\xBA" => "\xD8\x9B",
+ "\xBB" => "\xC2\xBB",
+ "\xBC" => "\xC2\xBC",
+ "\xBD" => "\xC2\xBD",
+ "\xBE" => "\xC2\xBE",
+ "\xBF" => "\xD8\x9F",
+ "\xC0" => "\xDB\x81",
+ "\xC1" => "\xD8\xA1",
+ "\xC2" => "\xD8\xA2",
+ "\xC3" => "\xD8\xA3",
+ "\xC4" => "\xD8\xA4",
+ "\xC5" => "\xD8\xA5",
+ "\xC6" => "\xD8\xA6",
+ "\xC7" => "\xD8\xA7",
+ "\xC8" => "\xD8\xA8",
+ "\xC9" => "\xD8\xA9",
+ "\xCA" => "\xD8\xAA",
+ "\xCB" => "\xD8\xAB",
+ "\xCC" => "\xD8\xAC",
+ "\xCD" => "\xD8\xAD",
+ "\xCE" => "\xD8\xAE",
+ "\xCF" => "\xD8\xAF",
+ "\xD0" => "\xD8\xB0",
+ "\xD1" => "\xD8\xB1",
+ "\xD2" => "\xD8\xB2",
+ "\xD3" => "\xD8\xB3",
+ "\xD4" => "\xD8\xB4",
+ "\xD5" => "\xD8\xB5",
+ "\xD6" => "\xD8\xB6",
+ "\xD7" => "\xC3\x97",
+ "\xD8" => "\xD8\xB7",
+ "\xD9" => "\xD8\xB8",
+ "\xDA" => "\xD8\xB9",
+ "\xDB" => "\xD8\xBA",
+ "\xDC" => "\xD9\x80",
+ "\xDD" => "\xD9\x81",
+ "\xDE" => "\xD9\x82",
+ "\xDF" => "\xD9\x83",
+ "\xE0" => "\xC3\xA0",
+ "\xE1" => "\xD9\x84",
+ "\xE2" => "\xC3\xA2",
+ "\xE3" => "\xD9\x85",
+ "\xE4" => "\xD9\x86",
+ "\xE5" => "\xD9\x87",
+ "\xE6" => "\xD9\x88",
+ "\xE7" => "\xC3\xA7",
+ "\xE8" => "\xC3\xA8",
+ "\xE9" => "\xC3\xA9",
+ "\xEA" => "\xC3\xAA",
+ "\xEB" => "\xC3\xAB",
+ "\xEC" => "\xD9\x89",
+ "\xED" => "\xD9\x8A",
+ "\xEE" => "\xC3\xAE",
+ "\xEF" => "\xC3\xAF",
+ "\xF0" => "\xD9\x8B",
+ "\xF1" => "\xD9\x8C",
+ "\xF2" => "\xD9\x8D",
+ "\xF3" => "\xD9\x8E",
+ "\xF4" => "\xC3\xB4",
+ "\xF5" => "\xD9\x8F",
+ "\xF6" => "\xD9\x90",
+ "\xF7" => "\xC3\xB7",
+ "\xF8" => "\xD9\x91",
+ "\xF9" => "\xC3\xB9",
+ "\xFA" => "\xD9\x92",
+ "\xFB" => "\xC3\xBB",
+ "\xFC" => "\xC3\xBC",
+ "\xFD" => "\xE2\x80\x8E",
+ "\xFE" => "\xE2\x80\x8F",
+ "\xFF" => "\xDB\x92",
+ );
+ return strtr($string, $transform);
+}
+
+function cp1257($string)
+{
+ static $transform = array(
+ "\x80" => "\xE2\x82\xAC",
+ "\x82" => "\xE2\x80\x9A",
+ "\x84" => "\xE2\x80\x9E",
+ "\x85" => "\xE2\x80\xA6",
+ "\x86" => "\xE2\x80\xA0",
+ "\x87" => "\xE2\x80\xA1",
+ "\x89" => "\xE2\x80\xB0",
+ "\x8B" => "\xE2\x80\xB9",
+ "\x8D" => "\xC2\xA8",
+ "\x8E" => "\xCB\x87",
+ "\x8F" => "\xC2\xB8",
+ "\x91" => "\xE2\x80\x98",
+ "\x92" => "\xE2\x80\x99",
+ "\x93" => "\xE2\x80\x9C",
+ "\x94" => "\xE2\x80\x9D",
+ "\x95" => "\xE2\x80\xA2",
+ "\x96" => "\xE2\x80\x93",
+ "\x97" => "\xE2\x80\x94",
+ "\x99" => "\xE2\x84\xA2",
+ "\x9B" => "\xE2\x80\xBA",
+ "\x9D" => "\xC2\xAF",
+ "\x9E" => "\xCB\x9B",
+ "\xA0" => "\xC2\xA0",
+ "\xA2" => "\xC2\xA2",
+ "\xA3" => "\xC2\xA3",
+ "\xA4" => "\xC2\xA4",
+ "\xA6" => "\xC2\xA6",
+ "\xA7" => "\xC2\xA7",
+ "\xA8" => "\xC3\x98",
+ "\xA9" => "\xC2\xA9",
+ "\xAA" => "\xC5\x96",
+ "\xAB" => "\xC2\xAB",
+ "\xAC" => "\xC2\xAC",
+ "\xAD" => "\xC2\xAD",
+ "\xAE" => "\xC2\xAE",
+ "\xAF" => "\xC3\x86",
+ "\xB0" => "\xC2\xB0",
+ "\xB1" => "\xC2\xB1",
+ "\xB2" => "\xC2\xB2",
+ "\xB3" => "\xC2\xB3",
+ "\xB4" => "\xC2\xB4",
+ "\xB5" => "\xC2\xB5",
+ "\xB6" => "\xC2\xB6",
+ "\xB7" => "\xC2\xB7",
+ "\xB8" => "\xC3\xB8",
+ "\xB9" => "\xC2\xB9",
+ "\xBA" => "\xC5\x97",
+ "\xBB" => "\xC2\xBB",
+ "\xBC" => "\xC2\xBC",
+ "\xBD" => "\xC2\xBD",
+ "\xBE" => "\xC2\xBE",
+ "\xBF" => "\xC3\xA6",
+ "\xC0" => "\xC4\x84",
+ "\xC1" => "\xC4\xAE",
+ "\xC2" => "\xC4\x80",
+ "\xC3" => "\xC4\x86",
+ "\xC4" => "\xC3\x84",
+ "\xC5" => "\xC3\x85",
+ "\xC6" => "\xC4\x98",
+ "\xC7" => "\xC4\x92",
+ "\xC8" => "\xC4\x8C",
+ "\xC9" => "\xC3\x89",
+ "\xCA" => "\xC5\xB9",
+ "\xCB" => "\xC4\x96",
+ "\xCC" => "\xC4\xA2",
+ "\xCD" => "\xC4\xB6",
+ "\xCE" => "\xC4\xAA",
+ "\xCF" => "\xC4\xBB",
+ "\xD0" => "\xC5\xA0",
+ "\xD1" => "\xC5\x83",
+ "\xD2" => "\xC5\x85",
+ "\xD3" => "\xC3\x93",
+ "\xD4" => "\xC5\x8C",
+ "\xD5" => "\xC3\x95",
+ "\xD6" => "\xC3\x96",
+ "\xD7" => "\xC3\x97",
+ "\xD8" => "\xC5\xB2",
+ "\xD9" => "\xC5\x81",
+ "\xDA" => "\xC5\x9A",
+ "\xDB" => "\xC5\xAA",
+ "\xDC" => "\xC3\x9C",
+ "\xDD" => "\xC5\xBB",
+ "\xDE" => "\xC5\xBD",
+ "\xDF" => "\xC3\x9F",
+ "\xE0" => "\xC4\x85",
+ "\xE1" => "\xC4\xAF",
+ "\xE2" => "\xC4\x81",
+ "\xE3" => "\xC4\x87",
+ "\xE4" => "\xC3\xA4",
+ "\xE5" => "\xC3\xA5",
+ "\xE6" => "\xC4\x99",
+ "\xE7" => "\xC4\x93",
+ "\xE8" => "\xC4\x8D",
+ "\xE9" => "\xC3\xA9",
+ "\xEA" => "\xC5\xBA",
+ "\xEB" => "\xC4\x97",
+ "\xEC" => "\xC4\xA3",
+ "\xED" => "\xC4\xB7",
+ "\xEE" => "\xC4\xAB",
+ "\xEF" => "\xC4\xBC",
+ "\xF0" => "\xC5\xA1",
+ "\xF1" => "\xC5\x84",
+ "\xF2" => "\xC5\x86",
+ "\xF3" => "\xC3\xB3",
+ "\xF4" => "\xC5\x8D",
+ "\xF5" => "\xC3\xB5",
+ "\xF6" => "\xC3\xB6",
+ "\xF7" => "\xC3\xB7",
+ "\xF8" => "\xC5\xB3",
+ "\xF9" => "\xC5\x82",
+ "\xFA" => "\xC5\x9B",
+ "\xFB" => "\xC5\xAB",
+ "\xFC" => "\xC3\xBC",
+ "\xFD" => "\xC5\xBC",
+ "\xFE" => "\xC5\xBE",
+ "\xFF" => "\xCB\x99",
+ );
+ return strtr($string, $transform);
+}
+
+function utf8_to_cp1252($string)
+{
+ static $transform = array(
+ "\xE2\x82\xAC" => "\x80",
+ "\xE2\x80\x9A" => "\x82",
+ "\xC6\x92" => "\x83",
+ "\xE2\x80\x9E" => "\x84",
+ "\xE2\x80\xA6" => "\x85",
+ "\xE2\x80\xA0" => "\x86",
+ "\xE2\x80\xA1" => "\x87",
+ "\xCB\x86" => "\x88",
+ "\xE2\x80\xB0" => "\x89",
+ "\xC5\xA0" => "\x8A",
+ "\xE2\x80\xB9" => "\x8B",
+ "\xC5\x92" => "\x8C",
+ "\xC5\xBD" => "\x8E",
+ "\xE2\x80\x98" => "\x91",
+ "\xE2\x80\x99" => "\x92",
+ "\xE2\x80\x9C" => "\x93",
+ "\xE2\x80\x9D" => "\x94",
+ "\xE2\x80\xA2" => "\x95",
+ "\xE2\x80\x93" => "\x96",
+ "\xE2\x80\x94" => "\x97",
+ "\xCB\x9C" => "\x98",
+ "\xE2\x84\xA2" => "\x99",
+ "\xC5\xA1" => "\x9A",
+ "\xE2\x80\xBA" => "\x9B",
+ "\xC5\x93" => "\x9C",
+ "\xC5\xBE" => "\x9E",
+ "\xC5\xB8" => "\x9F",
+ "\xC2\xA0" => "\xA0",
+ "\xC2\xA1" => "\xA1",
+ "\xC2\xA2" => "\xA2",
+ "\xC2\xA3" => "\xA3",
+ "\xC2\xA4" => "\xA4",
+ "\xC2\xA5" => "\xA5",
+ "\xC2\xA6" => "\xA6",
+ "\xC2\xA7" => "\xA7",
+ "\xC2\xA8" => "\xA8",
+ "\xC2\xA9" => "\xA9",
+ "\xC2\xAA" => "\xAA",
+ "\xC2\xAB" => "\xAB",
+ "\xC2\xAC" => "\xAC",
+ "\xC2\xAD" => "\xAD",
+ "\xC2\xAE" => "\xAE",
+ "\xC2\xAF" => "\xAF",
+ "\xC2\xB0" => "\xB0",
+ "\xC2\xB1" => "\xB1",
+ "\xC2\xB2" => "\xB2",
+ "\xC2\xB3" => "\xB3",
+ "\xC2\xB4" => "\xB4",
+ "\xC2\xB5" => "\xB5",
+ "\xC2\xB6" => "\xB6",
+ "\xC2\xB7" => "\xB7",
+ "\xC2\xB8" => "\xB8",
+ "\xC2\xB9" => "\xB9",
+ "\xC2\xBA" => "\xBA",
+ "\xC2\xBB" => "\xBB",
+ "\xC2\xBC" => "\xBC",
+ "\xC2\xBD" => "\xBD",
+ "\xC2\xBE" => "\xBE",
+ "\xC2\xBF" => "\xBF",
+ "\xC3\x80" => "\xC0",
+ "\xC3\x81" => "\xC1",
+ "\xC3\x82" => "\xC2",
+ "\xC3\x83" => "\xC3",
+ "\xC3\x84" => "\xC4",
+ "\xC3\x85" => "\xC5",
+ "\xC3\x86" => "\xC6",
+ "\xC3\x87" => "\xC7",
+ "\xC3\x88" => "\xC8",
+ "\xC3\x89" => "\xC9",
+ "\xC3\x8A" => "\xCA",
+ "\xC3\x8B" => "\xCB",
+ "\xC3\x8C" => "\xCC",
+ "\xC3\x8D" => "\xCD",
+ "\xC3\x8E" => "\xCE",
+ "\xC3\x8F" => "\xCF",
+ "\xC3\x90" => "\xD0",
+ "\xC3\x91" => "\xD1",
+ "\xC3\x92" => "\xD2",
+ "\xC3\x93" => "\xD3",
+ "\xC3\x94" => "\xD4",
+ "\xC3\x95" => "\xD5",
+ "\xC3\x96" => "\xD6",
+ "\xC3\x97" => "\xD7",
+ "\xC3\x98" => "\xD8",
+ "\xC3\x99" => "\xD9",
+ "\xC3\x9A" => "\xDA",
+ "\xC3\x9B" => "\xDB",
+ "\xC3\x9C" => "\xDC",
+ "\xC3\x9D" => "\xDD",
+ "\xC3\x9E" => "\xDE",
+ "\xC3\x9F" => "\xDF",
+ "\xC3\xA0" => "\xE0",
+ "\xC3\xA1" => "\xE1",
+ "\xC3\xA2" => "\xE2",
+ "\xC3\xA3" => "\xE3",
+ "\xC3\xA4" => "\xE4",
+ "\xC3\xA5" => "\xE5",
+ "\xC3\xA6" => "\xE6",
+ "\xC3\xA7" => "\xE7",
+ "\xC3\xA8" => "\xE8",
+ "\xC3\xA9" => "\xE9",
+ "\xC3\xAA" => "\xEA",
+ "\xC3\xAB" => "\xEB",
+ "\xC3\xAC" => "\xEC",
+ "\xC3\xAD" => "\xED",
+ "\xC3\xAE" => "\xEE",
+ "\xC3\xAF" => "\xEF",
+ "\xC3\xB0" => "\xF0",
+ "\xC3\xB1" => "\xF1",
+ "\xC3\xB2" => "\xF2",
+ "\xC3\xB3" => "\xF3",
+ "\xC3\xB4" => "\xF4",
+ "\xC3\xB5" => "\xF5",
+ "\xC3\xB6" => "\xF6",
+ "\xC3\xB7" => "\xF7",
+ "\xC3\xB8" => "\xF8",
+ "\xC3\xB9" => "\xF9",
+ "\xC3\xBA" => "\xFA",
+ "\xC3\xBB" => "\xFB",
+ "\xC3\xBC" => "\xFC",
+ "\xC3\xBD" => "\xFD",
+ "\xC3\xBE" => "\xFE",
+ "\xC3\xBF" => "\xFF"
+ );
+ return strtr($string, $transform);
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/utf/data/recode_cjk.php b/phpBB/includes/utf/data/recode_cjk.php
new file mode 100644
index 0000000000..f3f9a256d7
--- /dev/null
+++ b/phpBB/includes/utf/data/recode_cjk.php
@@ -0,0 +1,45179 @@
+<?php
+// Not inluded within the standard distribution
+
+function gb2312($string)
+{
+ static $transform = array(
+ "\xA1\xA1" => "\xE3\x80\x80",
+ "\xA1\xA2" => "\xE3\x80\x81",
+ "\xA1\xA3" => "\xE3\x80\x82",
+ "\xA1\xA4" => "\xE3\x83\xBB",
+ "\xA1\xA5" => "\xCB\x89",
+ "\xA1\xA6" => "\xCB\x87",
+ "\xA1\xA7" => "\xC2\xA8",
+ "\xA1\xA8" => "\xE3\x80\x83",
+ "\xA1\xA9" => "\xE3\x80\x85",
+ "\xA1\xAA" => "\xE2\x80\x95",
+ "\xA1\xAB" => "\xEF\xBD\x9E",
+ "\xA1\xAC" => "\xE2\x80\x96",
+ "\xA1\xAD" => "\xE2\x80\xA6",
+ "\xA1\xAE" => "\xE2\x80\x98",
+ "\xA1\xAF" => "\xE2\x80\x99",
+ "\xA1\xB0" => "\xE2\x80\x9C",
+ "\xA1\xB1" => "\xE2\x80\x9D",
+ "\xA1\xB2" => "\xE3\x80\x94",
+ "\xA1\xB3" => "\xE3\x80\x95",
+ "\xA1\xB4" => "\xE3\x80\x88",
+ "\xA1\xB5" => "\xE3\x80\x89",
+ "\xA1\xB6" => "\xE3\x80\x8A",
+ "\xA1\xB7" => "\xE3\x80\x8B",
+ "\xA1\xB8" => "\xE3\x80\x8C",
+ "\xA1\xB9" => "\xE3\x80\x8D",
+ "\xA1\xBA" => "\xE3\x80\x8E",
+ "\xA1\xBB" => "\xE3\x80\x8F",
+ "\xA1\xBC" => "\xE3\x80\x96",
+ "\xA1\xBD" => "\xE3\x80\x97",
+ "\xA1\xBE" => "\xE3\x80\x90",
+ "\xA1\xBF" => "\xE3\x80\x91",
+ "\xA1\xC0" => "\xC2\xB1",
+ "\xA1\xC1" => "\xC3\x97",
+ "\xA1\xC2" => "\xC3\xB7",
+ "\xA1\xC3" => "\xE2\x88\xB6",
+ "\xA1\xC4" => "\xE2\x88\xA7",
+ "\xA1\xC5" => "\xE2\x88\xA8",
+ "\xA1\xC6" => "\xE2\x88\x91",
+ "\xA1\xC7" => "\xE2\x88\x8F",
+ "\xA1\xC8" => "\xE2\x88\xAA",
+ "\xA1\xC9" => "\xE2\x88\xA9",
+ "\xA1\xCA" => "\xE2\x88\x88",
+ "\xA1\xCB" => "\xE2\x88\xB7",
+ "\xA1\xCC" => "\xE2\x88\x9A",
+ "\xA1\xCD" => "\xE2\x8A\xA5",
+ "\xA1\xCE" => "\xE2\x88\xA5",
+ "\xA1\xCF" => "\xE2\x88\xA0",
+ "\xA1\xD0" => "\xE2\x8C\x92",
+ "\xA1\xD1" => "\xE2\x8A\x99",
+ "\xA1\xD2" => "\xE2\x88\xAB",
+ "\xA1\xD3" => "\xE2\x88\xAE",
+ "\xA1\xD4" => "\xE2\x89\xA1",
+ "\xA1\xD5" => "\xE2\x89\x8C",
+ "\xA1\xD6" => "\xE2\x89\x88",
+ "\xA1\xD7" => "\xE2\x88\xBD",
+ "\xA1\xD8" => "\xE2\x88\x9D",
+ "\xA1\xD9" => "\xE2\x89\xA0",
+ "\xA1\xDA" => "\xE2\x89\xAE",
+ "\xA1\xDB" => "\xE2\x89\xAF",
+ "\xA1\xDC" => "\xE2\x89\xA4",
+ "\xA1\xDD" => "\xE2\x89\xA5",
+ "\xA1\xDE" => "\xE2\x88\x9E",
+ "\xA1\xDF" => "\xE2\x88\xB5",
+ "\xA1\xE0" => "\xE2\x88\xB4",
+ "\xA1\xE1" => "\xE2\x99\x82",
+ "\xA1\xE2" => "\xE2\x99\x80",
+ "\xA1\xE3" => "\xC2\xB0",
+ "\xA1\xE4" => "\xE2\x80\xB2",
+ "\xA1\xE5" => "\xE2\x80\xB3",
+ "\xA1\xE6" => "\xE2\x84\x83",
+ "\xA1\xE7" => "\xEF\xBC\x84",
+ "\xA1\xE8" => "\xC2\xA4",
+ "\xA1\xE9" => "\xEF\xBF\xA0",
+ "\xA1\xEA" => "\xEF\xBF\xA1",
+ "\xA1\xEB" => "\xE2\x80\xB0",
+ "\xA1\xEC" => "\xC2\xA7",
+ "\xA1\xED" => "\xE2\x84\x96",
+ "\xA1\xEE" => "\xE2\x98\x86",
+ "\xA1\xEF" => "\xE2\x98\x85",
+ "\xA1\xF0" => "\xE2\x97\x8B",
+ "\xA1\xF1" => "\xE2\x97\x8F",
+ "\xA1\xF2" => "\xE2\x97\x8E",
+ "\xA1\xF3" => "\xE2\x97\x87",
+ "\xA1\xF4" => "\xE2\x97\x86",
+ "\xA1\xF5" => "\xE2\x96\xA1",
+ "\xA1\xF6" => "\xE2\x96\xA0",
+ "\xA1\xF7" => "\xE2\x96\xB3",
+ "\xA1\xF8" => "\xE2\x96\xB2",
+ "\xA1\xF9" => "\xE2\x80\xBB",
+ "\xA1\xFA" => "\xE2\x86\x92",
+ "\xA1\xFB" => "\xE2\x86\x90",
+ "\xA1\xFC" => "\xE2\x86\x91",
+ "\xA1\xFD" => "\xE2\x86\x93",
+ "\xA1\xFE" => "\xE3\x80\x93",
+ "\xA2\xB1" => "\xE2\x92\x88",
+ "\xA2\xB2" => "\xE2\x92\x89",
+ "\xA2\xB3" => "\xE2\x92\x8A",
+ "\xA2\xB4" => "\xE2\x92\x8B",
+ "\xA2\xB5" => "\xE2\x92\x8C",
+ "\xA2\xB6" => "\xE2\x92\x8D",
+ "\xA2\xB7" => "\xE2\x92\x8E",
+ "\xA2\xB8" => "\xE2\x92\x8F",
+ "\xA2\xB9" => "\xE2\x92\x90",
+ "\xA2\xBA" => "\xE2\x92\x91",
+ "\xA2\xBB" => "\xE2\x92\x92",
+ "\xA2\xBC" => "\xE2\x92\x93",
+ "\xA2\xBD" => "\xE2\x92\x94",
+ "\xA2\xBE" => "\xE2\x92\x95",
+ "\xA2\xBF" => "\xE2\x92\x96",
+ "\xA2\xC0" => "\xE2\x92\x97",
+ "\xA2\xC1" => "\xE2\x92\x98",
+ "\xA2\xC2" => "\xE2\x92\x99",
+ "\xA2\xC3" => "\xE2\x92\x9A",
+ "\xA2\xC4" => "\xE2\x92\x9B",
+ "\xA2\xC5" => "\xE2\x91\xB4",
+ "\xA2\xC6" => "\xE2\x91\xB5",
+ "\xA2\xC7" => "\xE2\x91\xB6",
+ "\xA2\xC8" => "\xE2\x91\xB7",
+ "\xA2\xC9" => "\xE2\x91\xB8",
+ "\xA2\xCA" => "\xE2\x91\xB9",
+ "\xA2\xCB" => "\xE2\x91\xBA",
+ "\xA2\xCC" => "\xE2\x91\xBB",
+ "\xA2\xCD" => "\xE2\x91\xBC",
+ "\xA2\xCE" => "\xE2\x91\xBD",
+ "\xA2\xCF" => "\xE2\x91\xBE",
+ "\xA2\xD0" => "\xE2\x91\xBF",
+ "\xA2\xD1" => "\xE2\x92\x80",
+ "\xA2\xD2" => "\xE2\x92\x81",
+ "\xA2\xD3" => "\xE2\x92\x82",
+ "\xA2\xD4" => "\xE2\x92\x83",
+ "\xA2\xD5" => "\xE2\x92\x84",
+ "\xA2\xD6" => "\xE2\x92\x85",
+ "\xA2\xD7" => "\xE2\x92\x86",
+ "\xA2\xD8" => "\xE2\x92\x87",
+ "\xA2\xD9" => "\xE2\x91\xA0",
+ "\xA2\xDA" => "\xE2\x91\xA1",
+ "\xA2\xDB" => "\xE2\x91\xA2",
+ "\xA2\xDC" => "\xE2\x91\xA3",
+ "\xA2\xDD" => "\xE2\x91\xA4",
+ "\xA2\xDE" => "\xE2\x91\xA5",
+ "\xA2\xDF" => "\xE2\x91\xA6",
+ "\xA2\xE0" => "\xE2\x91\xA7",
+ "\xA2\xE1" => "\xE2\x91\xA8",
+ "\xA2\xE2" => "\xE2\x91\xA9",
+ "\xA2\xE5" => "\xE3\x88\xA0",
+ "\xA2\xE6" => "\xE3\x88\xA1",
+ "\xA2\xE7" => "\xE3\x88\xA2",
+ "\xA2\xE8" => "\xE3\x88\xA3",
+ "\xA2\xE9" => "\xE3\x88\xA4",
+ "\xA2\xEA" => "\xE3\x88\xA5",
+ "\xA2\xEB" => "\xE3\x88\xA6",
+ "\xA2\xEC" => "\xE3\x88\xA7",
+ "\xA2\xED" => "\xE3\x88\xA8",
+ "\xA2\xEE" => "\xE3\x88\xA9",
+ "\xA2\xF1" => "\xE2\x85\xA0",
+ "\xA2\xF2" => "\xE2\x85\xA1",
+ "\xA2\xF3" => "\xE2\x85\xA2",
+ "\xA2\xF4" => "\xE2\x85\xA3",
+ "\xA2\xF5" => "\xE2\x85\xA4",
+ "\xA2\xF6" => "\xE2\x85\xA5",
+ "\xA2\xF7" => "\xE2\x85\xA6",
+ "\xA2\xF8" => "\xE2\x85\xA7",
+ "\xA2\xF9" => "\xE2\x85\xA8",
+ "\xA2\xFA" => "\xE2\x85\xA9",
+ "\xA2\xFB" => "\xE2\x85\xAA",
+ "\xA2\xFC" => "\xE2\x85\xAB",
+ "\xA3\xA1" => "\xEF\xBC\x81",
+ "\xA3\xA2" => "\xEF\xBC\x82",
+ "\xA3\xA3" => "\xEF\xBC\x83",
+ "\xA3\xA4" => "\xEF\xBF\xA5",
+ "\xA3\xA5" => "\xEF\xBC\x85",
+ "\xA3\xA6" => "\xEF\xBC\x86",
+ "\xA3\xA7" => "\xEF\xBC\x87",
+ "\xA3\xA8" => "\xEF\xBC\x88",
+ "\xA3\xA9" => "\xEF\xBC\x89",
+ "\xA3\xAA" => "\xEF\xBC\x8A",
+ "\xA3\xAB" => "\xEF\xBC\x8B",
+ "\xA3\xAC" => "\xEF\xBC\x8C",
+ "\xA3\xAD" => "\xEF\xBC\x8D",
+ "\xA3\xAE" => "\xEF\xBC\x8E",
+ "\xA3\xAF" => "\xEF\xBC\x8F",
+ "\xA3\xB0" => "\xEF\xBC\x90",
+ "\xA3\xB1" => "\xEF\xBC\x91",
+ "\xA3\xB2" => "\xEF\xBC\x92",
+ "\xA3\xB3" => "\xEF\xBC\x93",
+ "\xA3\xB4" => "\xEF\xBC\x94",
+ "\xA3\xB5" => "\xEF\xBC\x95",
+ "\xA3\xB6" => "\xEF\xBC\x96",
+ "\xA3\xB7" => "\xEF\xBC\x97",
+ "\xA3\xB8" => "\xEF\xBC\x98",
+ "\xA3\xB9" => "\xEF\xBC\x99",
+ "\xA3\xBA" => "\xEF\xBC\x9A",
+ "\xA3\xBB" => "\xEF\xBC\x9B",
+ "\xA3\xBC" => "\xEF\xBC\x9C",
+ "\xA3\xBD" => "\xEF\xBC\x9D",
+ "\xA3\xBE" => "\xEF\xBC\x9E",
+ "\xA3\xBF" => "\xEF\xBC\x9F",
+ "\xA3\xC0" => "\xEF\xBC\xA0",
+ "\xA3\xC1" => "\xEF\xBC\xA1",
+ "\xA3\xC2" => "\xEF\xBC\xA2",
+ "\xA3\xC3" => "\xEF\xBC\xA3",
+ "\xA3\xC4" => "\xEF\xBC\xA4",
+ "\xA3\xC5" => "\xEF\xBC\xA5",
+ "\xA3\xC6" => "\xEF\xBC\xA6",
+ "\xA3\xC7" => "\xEF\xBC\xA7",
+ "\xA3\xC8" => "\xEF\xBC\xA8",
+ "\xA3\xC9" => "\xEF\xBC\xA9",
+ "\xA3\xCA" => "\xEF\xBC\xAA",
+ "\xA3\xCB" => "\xEF\xBC\xAB",
+ "\xA3\xCC" => "\xEF\xBC\xAC",
+ "\xA3\xCD" => "\xEF\xBC\xAD",
+ "\xA3\xCE" => "\xEF\xBC\xAE",
+ "\xA3\xCF" => "\xEF\xBC\xAF",
+ "\xA3\xD0" => "\xEF\xBC\xB0",
+ "\xA3\xD1" => "\xEF\xBC\xB1",
+ "\xA3\xD2" => "\xEF\xBC\xB2",
+ "\xA3\xD3" => "\xEF\xBC\xB3",
+ "\xA3\xD4" => "\xEF\xBC\xB4",
+ "\xA3\xD5" => "\xEF\xBC\xB5",
+ "\xA3\xD6" => "\xEF\xBC\xB6",
+ "\xA3\xD7" => "\xEF\xBC\xB7",
+ "\xA3\xD8" => "\xEF\xBC\xB8",
+ "\xA3\xD9" => "\xEF\xBC\xB9",
+ "\xA3\xDA" => "\xEF\xBC\xBA",
+ "\xA3\xDB" => "\xEF\xBC\xBB",
+ "\xA3\xDC" => "\xEF\xBC\xBC",
+ "\xA3\xDD" => "\xEF\xBC\xBD",
+ "\xA3\xDE" => "\xEF\xBC\xBE",
+ "\xA3\xDF" => "\xEF\xBC\xBF",
+ "\xA3\xE0" => "\xEF\xBD\x80",
+ "\xA3\xE1" => "\xEF\xBD\x81",
+ "\xA3\xE2" => "\xEF\xBD\x82",
+ "\xA3\xE3" => "\xEF\xBD\x83",
+ "\xA3\xE4" => "\xEF\xBD\x84",
+ "\xA3\xE5" => "\xEF\xBD\x85",
+ "\xA3\xE6" => "\xEF\xBD\x86",
+ "\xA3\xE7" => "\xEF\xBD\x87",
+ "\xA3\xE8" => "\xEF\xBD\x88",
+ "\xA3\xE9" => "\xEF\xBD\x89",
+ "\xA3\xEA" => "\xEF\xBD\x8A",
+ "\xA3\xEB" => "\xEF\xBD\x8B",
+ "\xA3\xEC" => "\xEF\xBD\x8C",
+ "\xA3\xED" => "\xEF\xBD\x8D",
+ "\xA3\xEE" => "\xEF\xBD\x8E",
+ "\xA3\xEF" => "\xEF\xBD\x8F",
+ "\xA3\xF0" => "\xEF\xBD\x90",
+ "\xA3\xF1" => "\xEF\xBD\x91",
+ "\xA3\xF2" => "\xEF\xBD\x92",
+ "\xA3\xF3" => "\xEF\xBD\x93",
+ "\xA3\xF4" => "\xEF\xBD\x94",
+ "\xA3\xF5" => "\xEF\xBD\x95",
+ "\xA3\xF6" => "\xEF\xBD\x96",
+ "\xA3\xF7" => "\xEF\xBD\x97",
+ "\xA3\xF8" => "\xEF\xBD\x98",
+ "\xA3\xF9" => "\xEF\xBD\x99",
+ "\xA3\xFA" => "\xEF\xBD\x9A",
+ "\xA3\xFB" => "\xEF\xBD\x9B",
+ "\xA3\xFC" => "\xEF\xBD\x9C",
+ "\xA3\xFD" => "\xEF\xBD\x9D",
+ "\xA3\xFE" => "\xEF\xBF\xA3",
+ "\xA4\xA1" => "\xE3\x81\x81",
+ "\xA4\xA2" => "\xE3\x81\x82",
+ "\xA4\xA3" => "\xE3\x81\x83",
+ "\xA4\xA4" => "\xE3\x81\x84",
+ "\xA4\xA5" => "\xE3\x81\x85",
+ "\xA4\xA6" => "\xE3\x81\x86",
+ "\xA4\xA7" => "\xE3\x81\x87",
+ "\xA4\xA8" => "\xE3\x81\x88",
+ "\xA4\xA9" => "\xE3\x81\x89",
+ "\xA4\xAA" => "\xE3\x81\x8A",
+ "\xA4\xAB" => "\xE3\x81\x8B",
+ "\xA4\xAC" => "\xE3\x81\x8C",
+ "\xA4\xAD" => "\xE3\x81\x8D",
+ "\xA4\xAE" => "\xE3\x81\x8E",
+ "\xA4\xAF" => "\xE3\x81\x8F",
+ "\xA4\xB0" => "\xE3\x81\x90",
+ "\xA4\xB1" => "\xE3\x81\x91",
+ "\xA4\xB2" => "\xE3\x81\x92",
+ "\xA4\xB3" => "\xE3\x81\x93",
+ "\xA4\xB4" => "\xE3\x81\x94",
+ "\xA4\xB5" => "\xE3\x81\x95",
+ "\xA4\xB6" => "\xE3\x81\x96",
+ "\xA4\xB7" => "\xE3\x81\x97",
+ "\xA4\xB8" => "\xE3\x81\x98",
+ "\xA4\xB9" => "\xE3\x81\x99",
+ "\xA4\xBA" => "\xE3\x81\x9A",
+ "\xA4\xBB" => "\xE3\x81\x9B",
+ "\xA4\xBC" => "\xE3\x81\x9C",
+ "\xA4\xBD" => "\xE3\x81\x9D",
+ "\xA4\xBE" => "\xE3\x81\x9E",
+ "\xA4\xBF" => "\xE3\x81\x9F",
+ "\xA4\xC0" => "\xE3\x81\xA0",
+ "\xA4\xC1" => "\xE3\x81\xA1",
+ "\xA4\xC2" => "\xE3\x81\xA2",
+ "\xA4\xC3" => "\xE3\x81\xA3",
+ "\xA4\xC4" => "\xE3\x81\xA4",
+ "\xA4\xC5" => "\xE3\x81\xA5",
+ "\xA4\xC6" => "\xE3\x81\xA6",
+ "\xA4\xC7" => "\xE3\x81\xA7",
+ "\xA4\xC8" => "\xE3\x81\xA8",
+ "\xA4\xC9" => "\xE3\x81\xA9",
+ "\xA4\xCA" => "\xE3\x81\xAA",
+ "\xA4\xCB" => "\xE3\x81\xAB",
+ "\xA4\xCC" => "\xE3\x81\xAC",
+ "\xA4\xCD" => "\xE3\x81\xAD",
+ "\xA4\xCE" => "\xE3\x81\xAE",
+ "\xA4\xCF" => "\xE3\x81\xAF",
+ "\xA4\xD0" => "\xE3\x81\xB0",
+ "\xA4\xD1" => "\xE3\x81\xB1",
+ "\xA4\xD2" => "\xE3\x81\xB2",
+ "\xA4\xD3" => "\xE3\x81\xB3",
+ "\xA4\xD4" => "\xE3\x81\xB4",
+ "\xA4\xD5" => "\xE3\x81\xB5",
+ "\xA4\xD6" => "\xE3\x81\xB6",
+ "\xA4\xD7" => "\xE3\x81\xB7",
+ "\xA4\xD8" => "\xE3\x81\xB8",
+ "\xA4\xD9" => "\xE3\x81\xB9",
+ "\xA4\xDA" => "\xE3\x81\xBA",
+ "\xA4\xDB" => "\xE3\x81\xBB",
+ "\xA4\xDC" => "\xE3\x81\xBC",
+ "\xA4\xDD" => "\xE3\x81\xBD",
+ "\xA4\xDE" => "\xE3\x81\xBE",
+ "\xA4\xDF" => "\xE3\x81\xBF",
+ "\xA4\xE0" => "\xE3\x82\x80",
+ "\xA4\xE1" => "\xE3\x82\x81",
+ "\xA4\xE2" => "\xE3\x82\x82",
+ "\xA4\xE3" => "\xE3\x82\x83",
+ "\xA4\xE4" => "\xE3\x82\x84",
+ "\xA4\xE5" => "\xE3\x82\x85",
+ "\xA4\xE6" => "\xE3\x82\x86",
+ "\xA4\xE7" => "\xE3\x82\x87",
+ "\xA4\xE8" => "\xE3\x82\x88",
+ "\xA4\xE9" => "\xE3\x82\x89",
+ "\xA4\xEA" => "\xE3\x82\x8A",
+ "\xA4\xEB" => "\xE3\x82\x8B",
+ "\xA4\xEC" => "\xE3\x82\x8C",
+ "\xA4\xED" => "\xE3\x82\x8D",
+ "\xA4\xEE" => "\xE3\x82\x8E",
+ "\xA4\xEF" => "\xE3\x82\x8F",
+ "\xA4\xF0" => "\xE3\x82\x90",
+ "\xA4\xF1" => "\xE3\x82\x91",
+ "\xA4\xF2" => "\xE3\x82\x92",
+ "\xA4\xF3" => "\xE3\x82\x93",
+ "\xA5\xA1" => "\xE3\x82\xA1",
+ "\xA5\xA2" => "\xE3\x82\xA2",
+ "\xA5\xA3" => "\xE3\x82\xA3",
+ "\xA5\xA4" => "\xE3\x82\xA4",
+ "\xA5\xA5" => "\xE3\x82\xA5",
+ "\xA5\xA6" => "\xE3\x82\xA6",
+ "\xA5\xA7" => "\xE3\x82\xA7",
+ "\xA5\xA8" => "\xE3\x82\xA8",
+ "\xA5\xA9" => "\xE3\x82\xA9",
+ "\xA5\xAA" => "\xE3\x82\xAA",
+ "\xA5\xAB" => "\xE3\x82\xAB",
+ "\xA5\xAC" => "\xE3\x82\xAC",
+ "\xA5\xAD" => "\xE3\x82\xAD",
+ "\xA5\xAE" => "\xE3\x82\xAE",
+ "\xA5\xAF" => "\xE3\x82\xAF",
+ "\xA5\xB0" => "\xE3\x82\xB0",
+ "\xA5\xB1" => "\xE3\x82\xB1",
+ "\xA5\xB2" => "\xE3\x82\xB2",
+ "\xA5\xB3" => "\xE3\x82\xB3",
+ "\xA5\xB4" => "\xE3\x82\xB4",
+ "\xA5\xB5" => "\xE3\x82\xB5",
+ "\xA5\xB6" => "\xE3\x82\xB6",
+ "\xA5\xB7" => "\xE3\x82\xB7",
+ "\xA5\xB8" => "\xE3\x82\xB8",
+ "\xA5\xB9" => "\xE3\x82\xB9",
+ "\xA5\xBA" => "\xE3\x82\xBA",
+ "\xA5\xBB" => "\xE3\x82\xBB",
+ "\xA5\xBC" => "\xE3\x82\xBC",
+ "\xA5\xBD" => "\xE3\x82\xBD",
+ "\xA5\xBE" => "\xE3\x82\xBE",
+ "\xA5\xBF" => "\xE3\x82\xBF",
+ "\xA5\xC0" => "\xE3\x83\x80",
+ "\xA5\xC1" => "\xE3\x83\x81",
+ "\xA5\xC2" => "\xE3\x83\x82",
+ "\xA5\xC3" => "\xE3\x83\x83",
+ "\xA5\xC4" => "\xE3\x83\x84",
+ "\xA5\xC5" => "\xE3\x83\x85",
+ "\xA5\xC6" => "\xE3\x83\x86",
+ "\xA5\xC7" => "\xE3\x83\x87",
+ "\xA5\xC8" => "\xE3\x83\x88",
+ "\xA5\xC9" => "\xE3\x83\x89",
+ "\xA5\xCA" => "\xE3\x83\x8A",
+ "\xA5\xCB" => "\xE3\x83\x8B",
+ "\xA5\xCC" => "\xE3\x83\x8C",
+ "\xA5\xCD" => "\xE3\x83\x8D",
+ "\xA5\xCE" => "\xE3\x83\x8E",
+ "\xA5\xCF" => "\xE3\x83\x8F",
+ "\xA5\xD0" => "\xE3\x83\x90",
+ "\xA5\xD1" => "\xE3\x83\x91",
+ "\xA5\xD2" => "\xE3\x83\x92",
+ "\xA5\xD3" => "\xE3\x83\x93",
+ "\xA5\xD4" => "\xE3\x83\x94",
+ "\xA5\xD5" => "\xE3\x83\x95",
+ "\xA5\xD6" => "\xE3\x83\x96",
+ "\xA5\xD7" => "\xE3\x83\x97",
+ "\xA5\xD8" => "\xE3\x83\x98",
+ "\xA5\xD9" => "\xE3\x83\x99",
+ "\xA5\xDA" => "\xE3\x83\x9A",
+ "\xA5\xDB" => "\xE3\x83\x9B",
+ "\xA5\xDC" => "\xE3\x83\x9C",
+ "\xA5\xDD" => "\xE3\x83\x9D",
+ "\xA5\xDE" => "\xE3\x83\x9E",
+ "\xA5\xDF" => "\xE3\x83\x9F",
+ "\xA5\xE0" => "\xE3\x83\xA0",
+ "\xA5\xE1" => "\xE3\x83\xA1",
+ "\xA5\xE2" => "\xE3\x83\xA2",
+ "\xA5\xE3" => "\xE3\x83\xA3",
+ "\xA5\xE4" => "\xE3\x83\xA4",
+ "\xA5\xE5" => "\xE3\x83\xA5",
+ "\xA5\xE6" => "\xE3\x83\xA6",
+ "\xA5\xE7" => "\xE3\x83\xA7",
+ "\xA5\xE8" => "\xE3\x83\xA8",
+ "\xA5\xE9" => "\xE3\x83\xA9",
+ "\xA5\xEA" => "\xE3\x83\xAA",
+ "\xA5\xEB" => "\xE3\x83\xAB",
+ "\xA5\xEC" => "\xE3\x83\xAC",
+ "\xA5\xED" => "\xE3\x83\xAD",
+ "\xA5\xEE" => "\xE3\x83\xAE",
+ "\xA5\xEF" => "\xE3\x83\xAF",
+ "\xA5\xF0" => "\xE3\x83\xB0",
+ "\xA5\xF1" => "\xE3\x83\xB1",
+ "\xA5\xF2" => "\xE3\x83\xB2",
+ "\xA5\xF3" => "\xE3\x83\xB3",
+ "\xA5\xF4" => "\xE3\x83\xB4",
+ "\xA5\xF5" => "\xE3\x83\xB5",
+ "\xA5\xF6" => "\xE3\x83\xB6",
+ "\xA6\xA1" => "\xCE\x91",
+ "\xA6\xA2" => "\xCE\x92",
+ "\xA6\xA3" => "\xCE\x93",
+ "\xA6\xA4" => "\xCE\x94",
+ "\xA6\xA5" => "\xCE\x95",
+ "\xA6\xA6" => "\xCE\x96",
+ "\xA6\xA7" => "\xCE\x97",
+ "\xA6\xA8" => "\xCE\x98",
+ "\xA6\xA9" => "\xCE\x99",
+ "\xA6\xAA" => "\xCE\x9A",
+ "\xA6\xAB" => "\xCE\x9B",
+ "\xA6\xAC" => "\xCE\x9C",
+ "\xA6\xAD" => "\xCE\x9D",
+ "\xA6\xAE" => "\xCE\x9E",
+ "\xA6\xAF" => "\xCE\x9F",
+ "\xA6\xB0" => "\xCE\xA0",
+ "\xA6\xB1" => "\xCE\xA1",
+ "\xA6\xB2" => "\xCE\xA3",
+ "\xA6\xB3" => "\xCE\xA4",
+ "\xA6\xB4" => "\xCE\xA5",
+ "\xA6\xB5" => "\xCE\xA6",
+ "\xA6\xB6" => "\xCE\xA7",
+ "\xA6\xB7" => "\xCE\xA8",
+ "\xA6\xB8" => "\xCE\xA9",
+ "\xA6\xC1" => "\xCE\xB1",
+ "\xA6\xC2" => "\xCE\xB2",
+ "\xA6\xC3" => "\xCE\xB3",
+ "\xA6\xC4" => "\xCE\xB4",
+ "\xA6\xC5" => "\xCE\xB5",
+ "\xA6\xC6" => "\xCE\xB6",
+ "\xA6\xC7" => "\xCE\xB7",
+ "\xA6\xC8" => "\xCE\xB8",
+ "\xA6\xC9" => "\xCE\xB9",
+ "\xA6\xCA" => "\xCE\xBA",
+ "\xA6\xCB" => "\xCE\xBB",
+ "\xA6\xCC" => "\xCE\xBC",
+ "\xA6\xCD" => "\xCE\xBD",
+ "\xA6\xCE" => "\xCE\xBE",
+ "\xA6\xCF" => "\xCE\xBF",
+ "\xA6\xD0" => "\xCF\x80",
+ "\xA6\xD1" => "\xCF\x81",
+ "\xA6\xD2" => "\xCF\x83",
+ "\xA6\xD3" => "\xCF\x84",
+ "\xA6\xD4" => "\xCF\x85",
+ "\xA6\xD5" => "\xCF\x86",
+ "\xA6\xD6" => "\xCF\x87",
+ "\xA6\xD7" => "\xCF\x88",
+ "\xA6\xD8" => "\xCF\x89",
+ "\xA7\xA1" => "\xD0\x90",
+ "\xA7\xA2" => "\xD0\x91",
+ "\xA7\xA3" => "\xD0\x92",
+ "\xA7\xA4" => "\xD0\x93",
+ "\xA7\xA5" => "\xD0\x94",
+ "\xA7\xA6" => "\xD0\x95",
+ "\xA7\xA7" => "\xD0\x81",
+ "\xA7\xA8" => "\xD0\x96",
+ "\xA7\xA9" => "\xD0\x97",
+ "\xA7\xAA" => "\xD0\x98",
+ "\xA7\xAB" => "\xD0\x99",
+ "\xA7\xAC" => "\xD0\x9A",
+ "\xA7\xAD" => "\xD0\x9B",
+ "\xA7\xAE" => "\xD0\x9C",
+ "\xA7\xAF" => "\xD0\x9D",
+ "\xA7\xB0" => "\xD0\x9E",
+ "\xA7\xB1" => "\xD0\x9F",
+ "\xA7\xB2" => "\xD0\xA0",
+ "\xA7\xB3" => "\xD0\xA1",
+ "\xA7\xB4" => "\xD0\xA2",
+ "\xA7\xB5" => "\xD0\xA3",
+ "\xA7\xB6" => "\xD0\xA4",
+ "\xA7\xB7" => "\xD0\xA5",
+ "\xA7\xB8" => "\xD0\xA6",
+ "\xA7\xB9" => "\xD0\xA7",
+ "\xA7\xBA" => "\xD0\xA8",
+ "\xA7\xBB" => "\xD0\xA9",
+ "\xA7\xBC" => "\xD0\xAA",
+ "\xA7\xBD" => "\xD0\xAB",
+ "\xA7\xBE" => "\xD0\xAC",
+ "\xA7\xBF" => "\xD0\xAD",
+ "\xA7\xC0" => "\xD0\xAE",
+ "\xA7\xC1" => "\xD0\xAF",
+ "\xA7\xD1" => "\xD0\xB0",
+ "\xA7\xD2" => "\xD0\xB1",
+ "\xA7\xD3" => "\xD0\xB2",
+ "\xA7\xD4" => "\xD0\xB3",
+ "\xA7\xD5" => "\xD0\xB4",
+ "\xA7\xD6" => "\xD0\xB5",
+ "\xA7\xD7" => "\xD1\x91",
+ "\xA7\xD8" => "\xD0\xB6",
+ "\xA7\xD9" => "\xD0\xB7",
+ "\xA7\xDA" => "\xD0\xB8",
+ "\xA7\xDB" => "\xD0\xB9",
+ "\xA7\xDC" => "\xD0\xBA",
+ "\xA7\xDD" => "\xD0\xBB",
+ "\xA7\xDE" => "\xD0\xBC",
+ "\xA7\xDF" => "\xD0\xBD",
+ "\xA7\xE0" => "\xD0\xBE",
+ "\xA7\xE1" => "\xD0\xBF",
+ "\xA7\xE2" => "\xD1\x80",
+ "\xA7\xE3" => "\xD1\x81",
+ "\xA7\xE4" => "\xD1\x82",
+ "\xA7\xE5" => "\xD1\x83",
+ "\xA7\xE6" => "\xD1\x84",
+ "\xA7\xE7" => "\xD1\x85",
+ "\xA7\xE8" => "\xD1\x86",
+ "\xA7\xE9" => "\xD1\x87",
+ "\xA7\xEA" => "\xD1\x88",
+ "\xA7\xEB" => "\xD1\x89",
+ "\xA7\xEC" => "\xD1\x8A",
+ "\xA7\xED" => "\xD1\x8B",
+ "\xA7\xEE" => "\xD1\x8C",
+ "\xA7\xEF" => "\xD1\x8D",
+ "\xA7\xF0" => "\xD1\x8E",
+ "\xA7\xF1" => "\xD1\x8F",
+ "\xA8\xA1" => "\xC4\x81",
+ "\xA8\xA2" => "\xC3\xA1",
+ "\xA8\xA3" => "\xC7\x8E",
+ "\xA8\xA4" => "\xC3\xA0",
+ "\xA8\xA5" => "\xC4\x93",
+ "\xA8\xA6" => "\xC3\xA9",
+ "\xA8\xA7" => "\xC4\x9B",
+ "\xA8\xA8" => "\xC3\xA8",
+ "\xA8\xA9" => "\xC4\xAB",
+ "\xA8\xAA" => "\xC3\xAD",
+ "\xA8\xAB" => "\xC7\x90",
+ "\xA8\xAC" => "\xC3\xAC",
+ "\xA8\xAD" => "\xC5\x8D",
+ "\xA8\xAE" => "\xC3\xB3",
+ "\xA8\xAF" => "\xC7\x92",
+ "\xA8\xB0" => "\xC3\xB2",
+ "\xA8\xB1" => "\xC5\xAB",
+ "\xA8\xB2" => "\xC3\xBA",
+ "\xA8\xB3" => "\xC7\x94",
+ "\xA8\xB4" => "\xC3\xB9",
+ "\xA8\xB5" => "\xC7\x96",
+ "\xA8\xB6" => "\xC7\x98",
+ "\xA8\xB7" => "\xC7\x9A",
+ "\xA8\xB8" => "\xC7\x9C",
+ "\xA8\xB9" => "\xC3\xBC",
+ "\xA8\xBA" => "\xC3\xAA",
+ "\xA8\xC5" => "\xE3\x84\x85",
+ "\xA8\xC6" => "\xE3\x84\x86",
+ "\xA8\xC7" => "\xE3\x84\x87",
+ "\xA8\xC8" => "\xE3\x84\x88",
+ "\xA8\xC9" => "\xE3\x84\x89",
+ "\xA8\xCA" => "\xE3\x84\x8A",
+ "\xA8\xCB" => "\xE3\x84\x8B",
+ "\xA8\xCC" => "\xE3\x84\x8C",
+ "\xA8\xCD" => "\xE3\x84\x8D",
+ "\xA8\xCE" => "\xE3\x84\x8E",
+ "\xA8\xCF" => "\xE3\x84\x8F",
+ "\xA8\xD0" => "\xE3\x84\x90",
+ "\xA8\xD1" => "\xE3\x84\x91",
+ "\xA8\xD2" => "\xE3\x84\x92",
+ "\xA8\xD3" => "\xE3\x84\x93",
+ "\xA8\xD4" => "\xE3\x84\x94",
+ "\xA8\xD5" => "\xE3\x84\x95",
+ "\xA8\xD6" => "\xE3\x84\x96",
+ "\xA8\xD7" => "\xE3\x84\x97",
+ "\xA8\xD8" => "\xE3\x84\x98",
+ "\xA8\xD9" => "\xE3\x84\x99",
+ "\xA8\xDA" => "\xE3\x84\x9A",
+ "\xA8\xDB" => "\xE3\x84\x9B",
+ "\xA8\xDC" => "\xE3\x84\x9C",
+ "\xA8\xDD" => "\xE3\x84\x9D",
+ "\xA8\xDE" => "\xE3\x84\x9E",
+ "\xA8\xDF" => "\xE3\x84\x9F",
+ "\xA8\xE0" => "\xE3\x84\xA0",
+ "\xA8\xE1" => "\xE3\x84\xA1",
+ "\xA8\xE2" => "\xE3\x84\xA2",
+ "\xA8\xE3" => "\xE3\x84\xA3",
+ "\xA8\xE4" => "\xE3\x84\xA4",
+ "\xA8\xE5" => "\xE3\x84\xA5",
+ "\xA8\xE6" => "\xE3\x84\xA6",
+ "\xA8\xE7" => "\xE3\x84\xA7",
+ "\xA8\xE8" => "\xE3\x84\xA8",
+ "\xA8\xE9" => "\xE3\x84\xA9",
+ "\xA9\xA4" => "\xE2\x94\x80",
+ "\xA9\xA5" => "\xE2\x94\x81",
+ "\xA9\xA6" => "\xE2\x94\x82",
+ "\xA9\xA7" => "\xE2\x94\x83",
+ "\xA9\xA8" => "\xE2\x94\x84",
+ "\xA9\xA9" => "\xE2\x94\x85",
+ "\xA9\xAA" => "\xE2\x94\x86",
+ "\xA9\xAB" => "\xE2\x94\x87",
+ "\xA9\xAC" => "\xE2\x94\x88",
+ "\xA9\xAD" => "\xE2\x94\x89",
+ "\xA9\xAE" => "\xE2\x94\x8A",
+ "\xA9\xAF" => "\xE2\x94\x8B",
+ "\xA9\xB0" => "\xE2\x94\x8C",
+ "\xA9\xB1" => "\xE2\x94\x8D",
+ "\xA9\xB2" => "\xE2\x94\x8E",
+ "\xA9\xB3" => "\xE2\x94\x8F",
+ "\xA9\xB4" => "\xE2\x94\x90",
+ "\xA9\xB5" => "\xE2\x94\x91",
+ "\xA9\xB6" => "\xE2\x94\x92",
+ "\xA9\xB7" => "\xE2\x94\x93",
+ "\xA9\xB8" => "\xE2\x94\x94",
+ "\xA9\xB9" => "\xE2\x94\x95",
+ "\xA9\xBA" => "\xE2\x94\x96",
+ "\xA9\xBB" => "\xE2\x94\x97",
+ "\xA9\xBC" => "\xE2\x94\x98",
+ "\xA9\xBD" => "\xE2\x94\x99",
+ "\xA9\xBE" => "\xE2\x94\x9A",
+ "\xA9\xBF" => "\xE2\x94\x9B",
+ "\xA9\xC0" => "\xE2\x94\x9C",
+ "\xA9\xC1" => "\xE2\x94\x9D",
+ "\xA9\xC2" => "\xE2\x94\x9E",
+ "\xA9\xC3" => "\xE2\x94\x9F",
+ "\xA9\xC4" => "\xE2\x94\xA0",
+ "\xA9\xC5" => "\xE2\x94\xA1",
+ "\xA9\xC6" => "\xE2\x94\xA2",
+ "\xA9\xC7" => "\xE2\x94\xA3",
+ "\xA9\xC8" => "\xE2\x94\xA4",
+ "\xA9\xC9" => "\xE2\x94\xA5",
+ "\xA9\xCA" => "\xE2\x94\xA6",
+ "\xA9\xCB" => "\xE2\x94\xA7",
+ "\xA9\xCC" => "\xE2\x94\xA8",
+ "\xA9\xCD" => "\xE2\x94\xA9",
+ "\xA9\xCE" => "\xE2\x94\xAA",
+ "\xA9\xCF" => "\xE2\x94\xAB",
+ "\xA9\xD0" => "\xE2\x94\xAC",
+ "\xA9\xD1" => "\xE2\x94\xAD",
+ "\xA9\xD2" => "\xE2\x94\xAE",
+ "\xA9\xD3" => "\xE2\x94\xAF",
+ "\xA9\xD4" => "\xE2\x94\xB0",
+ "\xA9\xD5" => "\xE2\x94\xB1",
+ "\xA9\xD6" => "\xE2\x94\xB2",
+ "\xA9\xD7" => "\xE2\x94\xB3",
+ "\xA9\xD8" => "\xE2\x94\xB4",
+ "\xA9\xD9" => "\xE2\x94\xB5",
+ "\xA9\xDA" => "\xE2\x94\xB6",
+ "\xA9\xDB" => "\xE2\x94\xB7",
+ "\xA9\xDC" => "\xE2\x94\xB8",
+ "\xA9\xDD" => "\xE2\x94\xB9",
+ "\xA9\xDE" => "\xE2\x94\xBA",
+ "\xA9\xDF" => "\xE2\x94\xBB",
+ "\xA9\xE0" => "\xE2\x94\xBC",
+ "\xA9\xE1" => "\xE2\x94\xBD",
+ "\xA9\xE2" => "\xE2\x94\xBE",
+ "\xA9\xE3" => "\xE2\x94\xBF",
+ "\xA9\xE4" => "\xE2\x95\x80",
+ "\xA9\xE5" => "\xE2\x95\x81",
+ "\xA9\xE6" => "\xE2\x95\x82",
+ "\xA9\xE7" => "\xE2\x95\x83",
+ "\xA9\xE8" => "\xE2\x95\x84",
+ "\xA9\xE9" => "\xE2\x95\x85",
+ "\xA9\xEA" => "\xE2\x95\x86",
+ "\xA9\xEB" => "\xE2\x95\x87",
+ "\xA9\xEC" => "\xE2\x95\x88",
+ "\xA9\xED" => "\xE2\x95\x89",
+ "\xA9\xEE" => "\xE2\x95\x8A",
+ "\xA9\xEF" => "\xE2\x95\x8B",
+ "\xB0\xA1" => "\xE5\x95\x8A",
+ "\xB0\xA2" => "\xE9\x98\xBF",
+ "\xB0\xA3" => "\xE5\x9F\x83",
+ "\xB0\xA4" => "\xE6\x8C\xA8",
+ "\xB0\xA5" => "\xE5\x93\x8E",
+ "\xB0\xA6" => "\xE5\x94\x89",
+ "\xB0\xA7" => "\xE5\x93\x80",
+ "\xB0\xA8" => "\xE7\x9A\x91",
+ "\xB0\xA9" => "\xE7\x99\x8C",
+ "\xB0\xAA" => "\xE8\x94\xBC",
+ "\xB0\xAB" => "\xE7\x9F\xAE",
+ "\xB0\xAC" => "\xE8\x89\xBE",
+ "\xB0\xAD" => "\xE7\xA2\x8D",
+ "\xB0\xAE" => "\xE7\x88\xB1",
+ "\xB0\xAF" => "\xE9\x9A\x98",
+ "\xB0\xB0" => "\xE9\x9E\x8D",
+ "\xB0\xB1" => "\xE6\xB0\xA8",
+ "\xB0\xB2" => "\xE5\xAE\x89",
+ "\xB0\xB3" => "\xE4\xBF\xBA",
+ "\xB0\xB4" => "\xE6\x8C\x89",
+ "\xB0\xB5" => "\xE6\x9A\x97",
+ "\xB0\xB6" => "\xE5\xB2\xB8",
+ "\xB0\xB7" => "\xE8\x83\xBA",
+ "\xB0\xB8" => "\xE6\xA1\x88",
+ "\xB0\xB9" => "\xE8\x82\xAE",
+ "\xB0\xBA" => "\xE6\x98\x82",
+ "\xB0\xBB" => "\xE7\x9B\x8E",
+ "\xB0\xBC" => "\xE5\x87\xB9",
+ "\xB0\xBD" => "\xE6\x95\x96",
+ "\xB0\xBE" => "\xE7\x86\xAC",
+ "\xB0\xBF" => "\xE7\xBF\xB1",
+ "\xB0\xC0" => "\xE8\xA2\x84",
+ "\xB0\xC1" => "\xE5\x82\xB2",
+ "\xB0\xC2" => "\xE5\xA5\xA5",
+ "\xB0\xC3" => "\xE6\x87\x8A",
+ "\xB0\xC4" => "\xE6\xBE\xB3",
+ "\xB0\xC5" => "\xE8\x8A\xAD",
+ "\xB0\xC6" => "\xE6\x8D\x8C",
+ "\xB0\xC7" => "\xE6\x89\x92",
+ "\xB0\xC8" => "\xE5\x8F\xAD",
+ "\xB0\xC9" => "\xE5\x90\xA7",
+ "\xB0\xCA" => "\xE7\xAC\x86",
+ "\xB0\xCB" => "\xE5\x85\xAB",
+ "\xB0\xCC" => "\xE7\x96\xA4",
+ "\xB0\xCD" => "\xE5\xB7\xB4",
+ "\xB0\xCE" => "\xE6\x8B\x94",
+ "\xB0\xCF" => "\xE8\xB7\x8B",
+ "\xB0\xD0" => "\xE9\x9D\xB6",
+ "\xB0\xD1" => "\xE6\x8A\x8A",
+ "\xB0\xD2" => "\xE8\x80\x99",
+ "\xB0\xD3" => "\xE5\x9D\x9D",
+ "\xB0\xD4" => "\xE9\x9C\xB8",
+ "\xB0\xD5" => "\xE7\xBD\xA2",
+ "\xB0\xD6" => "\xE7\x88\xB8",
+ "\xB0\xD7" => "\xE7\x99\xBD",
+ "\xB0\xD8" => "\xE6\x9F\x8F",
+ "\xB0\xD9" => "\xE7\x99\xBE",
+ "\xB0\xDA" => "\xE6\x91\x86",
+ "\xB0\xDB" => "\xE4\xBD\xB0",
+ "\xB0\xDC" => "\xE8\xB4\xA5",
+ "\xB0\xDD" => "\xE6\x8B\x9C",
+ "\xB0\xDE" => "\xE7\xA8\x97",
+ "\xB0\xDF" => "\xE6\x96\x91",
+ "\xB0\xE0" => "\xE7\x8F\xAD",
+ "\xB0\xE1" => "\xE6\x90\xAC",
+ "\xB0\xE2" => "\xE6\x89\xB3",
+ "\xB0\xE3" => "\xE8\x88\xAC",
+ "\xB0\xE4" => "\xE9\xA2\x81",
+ "\xB0\xE5" => "\xE6\x9D\xBF",
+ "\xB0\xE6" => "\xE7\x89\x88",
+ "\xB0\xE7" => "\xE6\x89\xAE",
+ "\xB0\xE8" => "\xE6\x8B\x8C",
+ "\xB0\xE9" => "\xE4\xBC\xB4",
+ "\xB0\xEA" => "\xE7\x93\xA3",
+ "\xB0\xEB" => "\xE5\x8D\x8A",
+ "\xB0\xEC" => "\xE5\x8A\x9E",
+ "\xB0\xED" => "\xE7\xBB\x8A",
+ "\xB0\xEE" => "\xE9\x82\xA6",
+ "\xB0\xEF" => "\xE5\xB8\xAE",
+ "\xB0\xF0" => "\xE6\xA2\x86",
+ "\xB0\xF1" => "\xE6\xA6\x9C",
+ "\xB0\xF2" => "\xE8\x86\x80",
+ "\xB0\xF3" => "\xE7\xBB\x91",
+ "\xB0\xF4" => "\xE6\xA3\x92",
+ "\xB0\xF5" => "\xE7\xA3\x85",
+ "\xB0\xF6" => "\xE8\x9A\x8C",
+ "\xB0\xF7" => "\xE9\x95\x91",
+ "\xB0\xF8" => "\xE5\x82\x8D",
+ "\xB0\xF9" => "\xE8\xB0\xA4",
+ "\xB0\xFA" => "\xE8\x8B\x9E",
+ "\xB0\xFB" => "\xE8\x83\x9E",
+ "\xB0\xFC" => "\xE5\x8C\x85",
+ "\xB0\xFD" => "\xE8\xA4\x92",
+ "\xB0\xFE" => "\xE5\x89\xA5",
+ "\xB1\xA1" => "\xE8\x96\x84",
+ "\xB1\xA2" => "\xE9\x9B\xB9",
+ "\xB1\xA3" => "\xE4\xBF\x9D",
+ "\xB1\xA4" => "\xE5\xA0\xA1",
+ "\xB1\xA5" => "\xE9\xA5\xB1",
+ "\xB1\xA6" => "\xE5\xAE\x9D",
+ "\xB1\xA7" => "\xE6\x8A\xB1",
+ "\xB1\xA8" => "\xE6\x8A\xA5",
+ "\xB1\xA9" => "\xE6\x9A\xB4",
+ "\xB1\xAA" => "\xE8\xB1\xB9",
+ "\xB1\xAB" => "\xE9\xB2\x8D",
+ "\xB1\xAC" => "\xE7\x88\x86",
+ "\xB1\xAD" => "\xE6\x9D\xAF",
+ "\xB1\xAE" => "\xE7\xA2\x91",
+ "\xB1\xAF" => "\xE6\x82\xB2",
+ "\xB1\xB0" => "\xE5\x8D\x91",
+ "\xB1\xB1" => "\xE5\x8C\x97",
+ "\xB1\xB2" => "\xE8\xBE\x88",
+ "\xB1\xB3" => "\xE8\x83\x8C",
+ "\xB1\xB4" => "\xE8\xB4\x9D",
+ "\xB1\xB5" => "\xE9\x92\xA1",
+ "\xB1\xB6" => "\xE5\x80\x8D",
+ "\xB1\xB7" => "\xE7\x8B\x88",
+ "\xB1\xB8" => "\xE5\xA4\x87",
+ "\xB1\xB9" => "\xE6\x83\xAB",
+ "\xB1\xBA" => "\xE7\x84\x99",
+ "\xB1\xBB" => "\xE8\xA2\xAB",
+ "\xB1\xBC" => "\xE5\xA5\x94",
+ "\xB1\xBD" => "\xE8\x8B\xAF",
+ "\xB1\xBE" => "\xE6\x9C\xAC",
+ "\xB1\xBF" => "\xE7\xAC\xA8",
+ "\xB1\xC0" => "\xE5\xB4\xA9",
+ "\xB1\xC1" => "\xE7\xBB\xB7",
+ "\xB1\xC2" => "\xE7\x94\xAD",
+ "\xB1\xC3" => "\xE6\xB3\xB5",
+ "\xB1\xC4" => "\xE8\xB9\xA6",
+ "\xB1\xC5" => "\xE8\xBF\xB8",
+ "\xB1\xC6" => "\xE9\x80\xBC",
+ "\xB1\xC7" => "\xE9\xBC\xBB",
+ "\xB1\xC8" => "\xE6\xAF\x94",
+ "\xB1\xC9" => "\xE9\x84\x99",
+ "\xB1\xCA" => "\xE7\xAC\x94",
+ "\xB1\xCB" => "\xE5\xBD\xBC",
+ "\xB1\xCC" => "\xE7\xA2\xA7",
+ "\xB1\xCD" => "\xE8\x93\x96",
+ "\xB1\xCE" => "\xE8\x94\xBD",
+ "\xB1\xCF" => "\xE6\xAF\x95",
+ "\xB1\xD0" => "\xE6\xAF\x99",
+ "\xB1\xD1" => "\xE6\xAF\x96",
+ "\xB1\xD2" => "\xE5\xB8\x81",
+ "\xB1\xD3" => "\xE5\xBA\x87",
+ "\xB1\xD4" => "\xE7\x97\xB9",
+ "\xB1\xD5" => "\xE9\x97\xAD",
+ "\xB1\xD6" => "\xE6\x95\x9D",
+ "\xB1\xD7" => "\xE5\xBC\x8A",
+ "\xB1\xD8" => "\xE5\xBF\x85",
+ "\xB1\xD9" => "\xE8\xBE\x9F",
+ "\xB1\xDA" => "\xE5\xA3\x81",
+ "\xB1\xDB" => "\xE8\x87\x82",
+ "\xB1\xDC" => "\xE9\x81\xBF",
+ "\xB1\xDD" => "\xE9\x99\x9B",
+ "\xB1\xDE" => "\xE9\x9E\xAD",
+ "\xB1\xDF" => "\xE8\xBE\xB9",
+ "\xB1\xE0" => "\xE7\xBC\x96",
+ "\xB1\xE1" => "\xE8\xB4\xAC",
+ "\xB1\xE2" => "\xE6\x89\x81",
+ "\xB1\xE3" => "\xE4\xBE\xBF",
+ "\xB1\xE4" => "\xE5\x8F\x98",
+ "\xB1\xE5" => "\xE5\x8D\x9E",
+ "\xB1\xE6" => "\xE8\xBE\xA8",
+ "\xB1\xE7" => "\xE8\xBE\xA9",
+ "\xB1\xE8" => "\xE8\xBE\xAB",
+ "\xB1\xE9" => "\xE9\x81\x8D",
+ "\xB1\xEA" => "\xE6\xA0\x87",
+ "\xB1\xEB" => "\xE5\xBD\xAA",
+ "\xB1\xEC" => "\xE8\x86\x98",
+ "\xB1\xED" => "\xE8\xA1\xA8",
+ "\xB1\xEE" => "\xE9\xB3\x96",
+ "\xB1\xEF" => "\xE6\x86\x8B",
+ "\xB1\xF0" => "\xE5\x88\xAB",
+ "\xB1\xF1" => "\xE7\x98\xAA",
+ "\xB1\xF2" => "\xE5\xBD\xAC",
+ "\xB1\xF3" => "\xE6\x96\x8C",
+ "\xB1\xF4" => "\xE6\xBF\x92",
+ "\xB1\xF5" => "\xE6\xBB\xA8",
+ "\xB1\xF6" => "\xE5\xAE\xBE",
+ "\xB1\xF7" => "\xE6\x91\x88",
+ "\xB1\xF8" => "\xE5\x85\xB5",
+ "\xB1\xF9" => "\xE5\x86\xB0",
+ "\xB1\xFA" => "\xE6\x9F\x84",
+ "\xB1\xFB" => "\xE4\xB8\x99",
+ "\xB1\xFC" => "\xE7\xA7\x89",
+ "\xB1\xFD" => "\xE9\xA5\xBC",
+ "\xB1\xFE" => "\xE7\x82\xB3",
+ "\xB2\xA1" => "\xE7\x97\x85",
+ "\xB2\xA2" => "\xE5\xB9\xB6",
+ "\xB2\xA3" => "\xE7\x8E\xBB",
+ "\xB2\xA4" => "\xE8\x8F\xA0",
+ "\xB2\xA5" => "\xE6\x92\xAD",
+ "\xB2\xA6" => "\xE6\x8B\xA8",
+ "\xB2\xA7" => "\xE9\x92\xB5",
+ "\xB2\xA8" => "\xE6\xB3\xA2",
+ "\xB2\xA9" => "\xE5\x8D\x9A",
+ "\xB2\xAA" => "\xE5\x8B\x83",
+ "\xB2\xAB" => "\xE6\x90\x8F",
+ "\xB2\xAC" => "\xE9\x93\x82",
+ "\xB2\xAD" => "\xE7\xAE\x94",
+ "\xB2\xAE" => "\xE4\xBC\xAF",
+ "\xB2\xAF" => "\xE5\xB8\x9B",
+ "\xB2\xB0" => "\xE8\x88\xB6",
+ "\xB2\xB1" => "\xE8\x84\x96",
+ "\xB2\xB2" => "\xE8\x86\x8A",
+ "\xB2\xB3" => "\xE6\xB8\xA4",
+ "\xB2\xB4" => "\xE6\xB3\x8A",
+ "\xB2\xB5" => "\xE9\xA9\xB3",
+ "\xB2\xB6" => "\xE6\x8D\x95",
+ "\xB2\xB7" => "\xE5\x8D\x9C",
+ "\xB2\xB8" => "\xE5\x93\xBA",
+ "\xB2\xB9" => "\xE8\xA1\xA5",
+ "\xB2\xBA" => "\xE5\x9F\xA0",
+ "\xB2\xBB" => "\xE4\xB8\x8D",
+ "\xB2\xBC" => "\xE5\xB8\x83",
+ "\xB2\xBD" => "\xE6\xAD\xA5",
+ "\xB2\xBE" => "\xE7\xB0\xBF",
+ "\xB2\xBF" => "\xE9\x83\xA8",
+ "\xB2\xC0" => "\xE6\x80\x96",
+ "\xB2\xC1" => "\xE6\x93\xA6",
+ "\xB2\xC2" => "\xE7\x8C\x9C",
+ "\xB2\xC3" => "\xE8\xA3\x81",
+ "\xB2\xC4" => "\xE6\x9D\x90",
+ "\xB2\xC5" => "\xE6\x89\x8D",
+ "\xB2\xC6" => "\xE8\xB4\xA2",
+ "\xB2\xC7" => "\xE7\x9D\xAC",
+ "\xB2\xC8" => "\xE8\xB8\xA9",
+ "\xB2\xC9" => "\xE9\x87\x87",
+ "\xB2\xCA" => "\xE5\xBD\xA9",
+ "\xB2\xCB" => "\xE8\x8F\x9C",
+ "\xB2\xCC" => "\xE8\x94\xA1",
+ "\xB2\xCD" => "\xE9\xA4\x90",
+ "\xB2\xCE" => "\xE5\x8F\x82",
+ "\xB2\xCF" => "\xE8\x9A\x95",
+ "\xB2\xD0" => "\xE6\xAE\x8B",
+ "\xB2\xD1" => "\xE6\x83\xAD",
+ "\xB2\xD2" => "\xE6\x83\xA8",
+ "\xB2\xD3" => "\xE7\x81\xBF",
+ "\xB2\xD4" => "\xE8\x8B\x8D",
+ "\xB2\xD5" => "\xE8\x88\xB1",
+ "\xB2\xD6" => "\xE4\xBB\x93",
+ "\xB2\xD7" => "\xE6\xB2\xA7",
+ "\xB2\xD8" => "\xE8\x97\x8F",
+ "\xB2\xD9" => "\xE6\x93\x8D",
+ "\xB2\xDA" => "\xE7\xB3\x99",
+ "\xB2\xDB" => "\xE6\xA7\xBD",
+ "\xB2\xDC" => "\xE6\x9B\xB9",
+ "\xB2\xDD" => "\xE8\x8D\x89",
+ "\xB2\xDE" => "\xE5\x8E\x95",
+ "\xB2\xDF" => "\xE7\xAD\x96",
+ "\xB2\xE0" => "\xE4\xBE\xA7",
+ "\xB2\xE1" => "\xE5\x86\x8C",
+ "\xB2\xE2" => "\xE6\xB5\x8B",
+ "\xB2\xE3" => "\xE5\xB1\x82",
+ "\xB2\xE4" => "\xE8\xB9\xAD",
+ "\xB2\xE5" => "\xE6\x8F\x92",
+ "\xB2\xE6" => "\xE5\x8F\x89",
+ "\xB2\xE7" => "\xE8\x8C\xAC",
+ "\xB2\xE8" => "\xE8\x8C\xB6",
+ "\xB2\xE9" => "\xE6\x9F\xA5",
+ "\xB2\xEA" => "\xE7\xA2\xB4",
+ "\xB2\xEB" => "\xE6\x90\xBD",
+ "\xB2\xEC" => "\xE5\xAF\x9F",
+ "\xB2\xED" => "\xE5\xB2\x94",
+ "\xB2\xEE" => "\xE5\xB7\xAE",
+ "\xB2\xEF" => "\xE8\xAF\xA7",
+ "\xB2\xF0" => "\xE6\x8B\x86",
+ "\xB2\xF1" => "\xE6\x9F\xB4",
+ "\xB2\xF2" => "\xE8\xB1\xBA",
+ "\xB2\xF3" => "\xE6\x90\x80",
+ "\xB2\xF4" => "\xE6\x8E\xBA",
+ "\xB2\xF5" => "\xE8\x9D\x89",
+ "\xB2\xF6" => "\xE9\xA6\x8B",
+ "\xB2\xF7" => "\xE8\xB0\x97",
+ "\xB2\xF8" => "\xE7\xBC\xA0",
+ "\xB2\xF9" => "\xE9\x93\xB2",
+ "\xB2\xFA" => "\xE4\xBA\xA7",
+ "\xB2\xFB" => "\xE9\x98\x90",
+ "\xB2\xFC" => "\xE9\xA2\xA4",
+ "\xB2\xFD" => "\xE6\x98\x8C",
+ "\xB2\xFE" => "\xE7\x8C\x96",
+ "\xB3\xA1" => "\xE5\x9C\xBA",
+ "\xB3\xA2" => "\xE5\xB0\x9D",
+ "\xB3\xA3" => "\xE5\xB8\xB8",
+ "\xB3\xA4" => "\xE9\x95\xBF",
+ "\xB3\xA5" => "\xE5\x81\xBF",
+ "\xB3\xA6" => "\xE8\x82\xA0",
+ "\xB3\xA7" => "\xE5\x8E\x82",
+ "\xB3\xA8" => "\xE6\x95\x9E",
+ "\xB3\xA9" => "\xE7\x95\x85",
+ "\xB3\xAA" => "\xE5\x94\xB1",
+ "\xB3\xAB" => "\xE5\x80\xA1",
+ "\xB3\xAC" => "\xE8\xB6\x85",
+ "\xB3\xAD" => "\xE6\x8A\x84",
+ "\xB3\xAE" => "\xE9\x92\x9E",
+ "\xB3\xAF" => "\xE6\x9C\x9D",
+ "\xB3\xB0" => "\xE5\x98\xB2",
+ "\xB3\xB1" => "\xE6\xBD\xAE",
+ "\xB3\xB2" => "\xE5\xB7\xA2",
+ "\xB3\xB3" => "\xE5\x90\xB5",
+ "\xB3\xB4" => "\xE7\x82\x92",
+ "\xB3\xB5" => "\xE8\xBD\xA6",
+ "\xB3\xB6" => "\xE6\x89\xAF",
+ "\xB3\xB7" => "\xE6\x92\xA4",
+ "\xB3\xB8" => "\xE6\x8E\xA3",
+ "\xB3\xB9" => "\xE5\xBD\xBB",
+ "\xB3\xBA" => "\xE6\xBE\x88",
+ "\xB3\xBB" => "\xE9\x83\xB4",
+ "\xB3\xBC" => "\xE8\x87\xA3",
+ "\xB3\xBD" => "\xE8\xBE\xB0",
+ "\xB3\xBE" => "\xE5\xB0\x98",
+ "\xB3\xBF" => "\xE6\x99\xA8",
+ "\xB3\xC0" => "\xE5\xBF\xB1",
+ "\xB3\xC1" => "\xE6\xB2\x89",
+ "\xB3\xC2" => "\xE9\x99\x88",
+ "\xB3\xC3" => "\xE8\xB6\x81",
+ "\xB3\xC4" => "\xE8\xA1\xAC",
+ "\xB3\xC5" => "\xE6\x92\x91",
+ "\xB3\xC6" => "\xE7\xA7\xB0",
+ "\xB3\xC7" => "\xE5\x9F\x8E",
+ "\xB3\xC8" => "\xE6\xA9\x99",
+ "\xB3\xC9" => "\xE6\x88\x90",
+ "\xB3\xCA" => "\xE5\x91\x88",
+ "\xB3\xCB" => "\xE4\xB9\x98",
+ "\xB3\xCC" => "\xE7\xA8\x8B",
+ "\xB3\xCD" => "\xE6\x83\xA9",
+ "\xB3\xCE" => "\xE6\xBE\x84",
+ "\xB3\xCF" => "\xE8\xAF\x9A",
+ "\xB3\xD0" => "\xE6\x89\xBF",
+ "\xB3\xD1" => "\xE9\x80\x9E",
+ "\xB3\xD2" => "\xE9\xAA\x8B",
+ "\xB3\xD3" => "\xE7\xA7\xA4",
+ "\xB3\xD4" => "\xE5\x90\x83",
+ "\xB3\xD5" => "\xE7\x97\xB4",
+ "\xB3\xD6" => "\xE6\x8C\x81",
+ "\xB3\xD7" => "\xE5\x8C\x99",
+ "\xB3\xD8" => "\xE6\xB1\xA0",
+ "\xB3\xD9" => "\xE8\xBF\x9F",
+ "\xB3\xDA" => "\xE5\xBC\x9B",
+ "\xB3\xDB" => "\xE9\xA9\xB0",
+ "\xB3\xDC" => "\xE8\x80\xBB",
+ "\xB3\xDD" => "\xE9\xBD\xBF",
+ "\xB3\xDE" => "\xE4\xBE\x88",
+ "\xB3\xDF" => "\xE5\xB0\xBA",
+ "\xB3\xE0" => "\xE8\xB5\xA4",
+ "\xB3\xE1" => "\xE7\xBF\x85",
+ "\xB3\xE2" => "\xE6\x96\xA5",
+ "\xB3\xE3" => "\xE7\x82\xBD",
+ "\xB3\xE4" => "\xE5\x85\x85",
+ "\xB3\xE5" => "\xE5\x86\xB2",
+ "\xB3\xE6" => "\xE8\x99\xAB",
+ "\xB3\xE7" => "\xE5\xB4\x87",
+ "\xB3\xE8" => "\xE5\xAE\xA0",
+ "\xB3\xE9" => "\xE6\x8A\xBD",
+ "\xB3\xEA" => "\xE9\x85\xAC",
+ "\xB3\xEB" => "\xE7\x95\xB4",
+ "\xB3\xEC" => "\xE8\xB8\x8C",
+ "\xB3\xED" => "\xE7\xA8\xA0",
+ "\xB3\xEE" => "\xE6\x84\x81",
+ "\xB3\xEF" => "\xE7\xAD\xB9",
+ "\xB3\xF0" => "\xE4\xBB\x87",
+ "\xB3\xF1" => "\xE7\xBB\xB8",
+ "\xB3\xF2" => "\xE7\x9E\x85",
+ "\xB3\xF3" => "\xE4\xB8\x91",
+ "\xB3\xF4" => "\xE8\x87\xAD",
+ "\xB3\xF5" => "\xE5\x88\x9D",
+ "\xB3\xF6" => "\xE5\x87\xBA",
+ "\xB3\xF7" => "\xE6\xA9\xB1",
+ "\xB3\xF8" => "\xE5\x8E\xA8",
+ "\xB3\xF9" => "\xE8\xBA\x87",
+ "\xB3\xFA" => "\xE9\x94\x84",
+ "\xB3\xFB" => "\xE9\x9B\x8F",
+ "\xB3\xFC" => "\xE6\xBB\x81",
+ "\xB3\xFD" => "\xE9\x99\xA4",
+ "\xB3\xFE" => "\xE6\xA5\x9A",
+ "\xB4\xA1" => "\xE7\xA1\x80",
+ "\xB4\xA2" => "\xE5\x82\xA8",
+ "\xB4\xA3" => "\xE7\x9F\x97",
+ "\xB4\xA4" => "\xE6\x90\x90",
+ "\xB4\xA5" => "\xE8\xA7\xA6",
+ "\xB4\xA6" => "\xE5\xA4\x84",
+ "\xB4\xA7" => "\xE6\x8F\xA3",
+ "\xB4\xA8" => "\xE5\xB7\x9D",
+ "\xB4\xA9" => "\xE7\xA9\xBF",
+ "\xB4\xAA" => "\xE6\xA4\xBD",
+ "\xB4\xAB" => "\xE4\xBC\xA0",
+ "\xB4\xAC" => "\xE8\x88\xB9",
+ "\xB4\xAD" => "\xE5\x96\x98",
+ "\xB4\xAE" => "\xE4\xB8\xB2",
+ "\xB4\xAF" => "\xE7\x96\xAE",
+ "\xB4\xB0" => "\xE7\xAA\x97",
+ "\xB4\xB1" => "\xE5\xB9\xA2",
+ "\xB4\xB2" => "\xE5\xBA\x8A",
+ "\xB4\xB3" => "\xE9\x97\xAF",
+ "\xB4\xB4" => "\xE5\x88\x9B",
+ "\xB4\xB5" => "\xE5\x90\xB9",
+ "\xB4\xB6" => "\xE7\x82\x8A",
+ "\xB4\xB7" => "\xE6\x8D\xB6",
+ "\xB4\xB8" => "\xE9\x94\xA4",
+ "\xB4\xB9" => "\xE5\x9E\x82",
+ "\xB4\xBA" => "\xE6\x98\xA5",
+ "\xB4\xBB" => "\xE6\xA4\xBF",
+ "\xB4\xBC" => "\xE9\x86\x87",
+ "\xB4\xBD" => "\xE5\x94\x87",
+ "\xB4\xBE" => "\xE6\xB7\xB3",
+ "\xB4\xBF" => "\xE7\xBA\xAF",
+ "\xB4\xC0" => "\xE8\xA0\xA2",
+ "\xB4\xC1" => "\xE6\x88\xB3",
+ "\xB4\xC2" => "\xE7\xBB\xB0",
+ "\xB4\xC3" => "\xE7\x96\xB5",
+ "\xB4\xC4" => "\xE8\x8C\xA8",
+ "\xB4\xC5" => "\xE7\xA3\x81",
+ "\xB4\xC6" => "\xE9\x9B\x8C",
+ "\xB4\xC7" => "\xE8\xBE\x9E",
+ "\xB4\xC8" => "\xE6\x85\x88",
+ "\xB4\xC9" => "\xE7\x93\xB7",
+ "\xB4\xCA" => "\xE8\xAF\x8D",
+ "\xB4\xCB" => "\xE6\xAD\xA4",
+ "\xB4\xCC" => "\xE5\x88\xBA",
+ "\xB4\xCD" => "\xE8\xB5\x90",
+ "\xB4\xCE" => "\xE6\xAC\xA1",
+ "\xB4\xCF" => "\xE8\x81\xAA",
+ "\xB4\xD0" => "\xE8\x91\xB1",
+ "\xB4\xD1" => "\xE5\x9B\xB1",
+ "\xB4\xD2" => "\xE5\x8C\x86",
+ "\xB4\xD3" => "\xE4\xBB\x8E",
+ "\xB4\xD4" => "\xE4\xB8\x9B",
+ "\xB4\xD5" => "\xE5\x87\x91",
+ "\xB4\xD6" => "\xE7\xB2\x97",
+ "\xB4\xD7" => "\xE9\x86\x8B",
+ "\xB4\xD8" => "\xE7\xB0\x87",
+ "\xB4\xD9" => "\xE4\xBF\x83",
+ "\xB4\xDA" => "\xE8\xB9\xBF",
+ "\xB4\xDB" => "\xE7\xAF\xA1",
+ "\xB4\xDC" => "\xE7\xAA\x9C",
+ "\xB4\xDD" => "\xE6\x91\xA7",
+ "\xB4\xDE" => "\xE5\xB4\x94",
+ "\xB4\xDF" => "\xE5\x82\xAC",
+ "\xB4\xE0" => "\xE8\x84\x86",
+ "\xB4\xE1" => "\xE7\x98\x81",
+ "\xB4\xE2" => "\xE7\xB2\xB9",
+ "\xB4\xE3" => "\xE6\xB7\xAC",
+ "\xB4\xE4" => "\xE7\xBF\xA0",
+ "\xB4\xE5" => "\xE6\x9D\x91",
+ "\xB4\xE6" => "\xE5\xAD\x98",
+ "\xB4\xE7" => "\xE5\xAF\xB8",
+ "\xB4\xE8" => "\xE7\xA3\x8B",
+ "\xB4\xE9" => "\xE6\x92\xAE",
+ "\xB4\xEA" => "\xE6\x90\x93",
+ "\xB4\xEB" => "\xE6\x8E\xAA",
+ "\xB4\xEC" => "\xE6\x8C\xAB",
+ "\xB4\xED" => "\xE9\x94\x99",
+ "\xB4\xEE" => "\xE6\x90\xAD",
+ "\xB4\xEF" => "\xE8\xBE\xBE",
+ "\xB4\xF0" => "\xE7\xAD\x94",
+ "\xB4\xF1" => "\xE7\x98\xA9",
+ "\xB4\xF2" => "\xE6\x89\x93",
+ "\xB4\xF3" => "\xE5\xA4\xA7",
+ "\xB4\xF4" => "\xE5\x91\x86",
+ "\xB4\xF5" => "\xE6\xAD\xB9",
+ "\xB4\xF6" => "\xE5\x82\xA3",
+ "\xB4\xF7" => "\xE6\x88\xB4",
+ "\xB4\xF8" => "\xE5\xB8\xA6",
+ "\xB4\xF9" => "\xE6\xAE\x86",
+ "\xB4\xFA" => "\xE4\xBB\xA3",
+ "\xB4\xFB" => "\xE8\xB4\xB7",
+ "\xB4\xFC" => "\xE8\xA2\x8B",
+ "\xB4\xFD" => "\xE5\xBE\x85",
+ "\xB4\xFE" => "\xE9\x80\xAE",
+ "\xB5\xA1" => "\xE6\x80\xA0",
+ "\xB5\xA2" => "\xE8\x80\xBD",
+ "\xB5\xA3" => "\xE6\x8B\x85",
+ "\xB5\xA4" => "\xE4\xB8\xB9",
+ "\xB5\xA5" => "\xE5\x8D\x95",
+ "\xB5\xA6" => "\xE9\x83\xB8",
+ "\xB5\xA7" => "\xE6\x8E\xB8",
+ "\xB5\xA8" => "\xE8\x83\x86",
+ "\xB5\xA9" => "\xE6\x97\xA6",
+ "\xB5\xAA" => "\xE6\xB0\xAE",
+ "\xB5\xAB" => "\xE4\xBD\x86",
+ "\xB5\xAC" => "\xE6\x83\xAE",
+ "\xB5\xAD" => "\xE6\xB7\xA1",
+ "\xB5\xAE" => "\xE8\xAF\x9E",
+ "\xB5\xAF" => "\xE5\xBC\xB9",
+ "\xB5\xB0" => "\xE8\x9B\x8B",
+ "\xB5\xB1" => "\xE5\xBD\x93",
+ "\xB5\xB2" => "\xE6\x8C\xA1",
+ "\xB5\xB3" => "\xE5\x85\x9A",
+ "\xB5\xB4" => "\xE8\x8D\xA1",
+ "\xB5\xB5" => "\xE6\xA1\xA3",
+ "\xB5\xB6" => "\xE5\x88\x80",
+ "\xB5\xB7" => "\xE6\x8D\xA3",
+ "\xB5\xB8" => "\xE8\xB9\x88",
+ "\xB5\xB9" => "\xE5\x80\x92",
+ "\xB5\xBA" => "\xE5\xB2\x9B",
+ "\xB5\xBB" => "\xE7\xA5\xB7",
+ "\xB5\xBC" => "\xE5\xAF\xBC",
+ "\xB5\xBD" => "\xE5\x88\xB0",
+ "\xB5\xBE" => "\xE7\xA8\xBB",
+ "\xB5\xBF" => "\xE6\x82\xBC",
+ "\xB5\xC0" => "\xE9\x81\x93",
+ "\xB5\xC1" => "\xE7\x9B\x97",
+ "\xB5\xC2" => "\xE5\xBE\xB7",
+ "\xB5\xC3" => "\xE5\xBE\x97",
+ "\xB5\xC4" => "\xE7\x9A\x84",
+ "\xB5\xC5" => "\xE8\xB9\xAC",
+ "\xB5\xC6" => "\xE7\x81\xAF",
+ "\xB5\xC7" => "\xE7\x99\xBB",
+ "\xB5\xC8" => "\xE7\xAD\x89",
+ "\xB5\xC9" => "\xE7\x9E\xAA",
+ "\xB5\xCA" => "\xE5\x87\xB3",
+ "\xB5\xCB" => "\xE9\x82\x93",
+ "\xB5\xCC" => "\xE5\xA0\xA4",
+ "\xB5\xCD" => "\xE4\xBD\x8E",
+ "\xB5\xCE" => "\xE6\xBB\xB4",
+ "\xB5\xCF" => "\xE8\xBF\xAA",
+ "\xB5\xD0" => "\xE6\x95\x8C",
+ "\xB5\xD1" => "\xE7\xAC\x9B",
+ "\xB5\xD2" => "\xE7\x8B\x84",
+ "\xB5\xD3" => "\xE6\xB6\xA4",
+ "\xB5\xD4" => "\xE7\xBF\x9F",
+ "\xB5\xD5" => "\xE5\xAB\xA1",
+ "\xB5\xD6" => "\xE6\x8A\xB5",
+ "\xB5\xD7" => "\xE5\xBA\x95",
+ "\xB5\xD8" => "\xE5\x9C\xB0",
+ "\xB5\xD9" => "\xE8\x92\x82",
+ "\xB5\xDA" => "\xE7\xAC\xAC",
+ "\xB5\xDB" => "\xE5\xB8\x9D",
+ "\xB5\xDC" => "\xE5\xBC\x9F",
+ "\xB5\xDD" => "\xE9\x80\x92",
+ "\xB5\xDE" => "\xE7\xBC\x94",
+ "\xB5\xDF" => "\xE9\xA2\xA0",
+ "\xB5\xE0" => "\xE6\x8E\x82",
+ "\xB5\xE1" => "\xE6\xBB\x87",
+ "\xB5\xE2" => "\xE7\xA2\x98",
+ "\xB5\xE3" => "\xE7\x82\xB9",
+ "\xB5\xE4" => "\xE5\x85\xB8",
+ "\xB5\xE5" => "\xE9\x9D\x9B",
+ "\xB5\xE6" => "\xE5\x9E\xAB",
+ "\xB5\xE7" => "\xE7\x94\xB5",
+ "\xB5\xE8" => "\xE4\xBD\x83",
+ "\xB5\xE9" => "\xE7\x94\xB8",
+ "\xB5\xEA" => "\xE5\xBA\x97",
+ "\xB5\xEB" => "\xE6\x83\xA6",
+ "\xB5\xEC" => "\xE5\xA5\xA0",
+ "\xB5\xED" => "\xE6\xB7\x80",
+ "\xB5\xEE" => "\xE6\xAE\xBF",
+ "\xB5\xEF" => "\xE7\xA2\x89",
+ "\xB5\xF0" => "\xE5\x8F\xBC",
+ "\xB5\xF1" => "\xE9\x9B\x95",
+ "\xB5\xF2" => "\xE5\x87\x8B",
+ "\xB5\xF3" => "\xE5\x88\x81",
+ "\xB5\xF4" => "\xE6\x8E\x89",
+ "\xB5\xF5" => "\xE5\x90\x8A",
+ "\xB5\xF6" => "\xE9\x92\x93",
+ "\xB5\xF7" => "\xE8\xB0\x83",
+ "\xB5\xF8" => "\xE8\xB7\x8C",
+ "\xB5\xF9" => "\xE7\x88\xB9",
+ "\xB5\xFA" => "\xE7\xA2\x9F",
+ "\xB5\xFB" => "\xE8\x9D\xB6",
+ "\xB5\xFC" => "\xE8\xBF\xAD",
+ "\xB5\xFD" => "\xE8\xB0\x8D",
+ "\xB5\xFE" => "\xE5\x8F\xA0",
+ "\xB6\xA1" => "\xE4\xB8\x81",
+ "\xB6\xA2" => "\xE7\x9B\xAF",
+ "\xB6\xA3" => "\xE5\x8F\xAE",
+ "\xB6\xA4" => "\xE9\x92\x89",
+ "\xB6\xA5" => "\xE9\xA1\xB6",
+ "\xB6\xA6" => "\xE9\xBC\x8E",
+ "\xB6\xA7" => "\xE9\x94\xAD",
+ "\xB6\xA8" => "\xE5\xAE\x9A",
+ "\xB6\xA9" => "\xE8\xAE\xA2",
+ "\xB6\xAA" => "\xE4\xB8\xA2",
+ "\xB6\xAB" => "\xE4\xB8\x9C",
+ "\xB6\xAC" => "\xE5\x86\xAC",
+ "\xB6\xAD" => "\xE8\x91\xA3",
+ "\xB6\xAE" => "\xE6\x87\x82",
+ "\xB6\xAF" => "\xE5\x8A\xA8",
+ "\xB6\xB0" => "\xE6\xA0\x8B",
+ "\xB6\xB1" => "\xE4\xBE\x97",
+ "\xB6\xB2" => "\xE6\x81\xAB",
+ "\xB6\xB3" => "\xE5\x86\xBB",
+ "\xB6\xB4" => "\xE6\xB4\x9E",
+ "\xB6\xB5" => "\xE5\x85\x9C",
+ "\xB6\xB6" => "\xE6\x8A\x96",
+ "\xB6\xB7" => "\xE6\x96\x97",
+ "\xB6\xB8" => "\xE9\x99\xA1",
+ "\xB6\xB9" => "\xE8\xB1\x86",
+ "\xB6\xBA" => "\xE9\x80\x97",
+ "\xB6\xBB" => "\xE7\x97\x98",
+ "\xB6\xBC" => "\xE9\x83\xBD",
+ "\xB6\xBD" => "\xE7\x9D\xA3",
+ "\xB6\xBE" => "\xE6\xAF\x92",
+ "\xB6\xBF" => "\xE7\x8A\x8A",
+ "\xB6\xC0" => "\xE7\x8B\xAC",
+ "\xB6\xC1" => "\xE8\xAF\xBB",
+ "\xB6\xC2" => "\xE5\xA0\xB5",
+ "\xB6\xC3" => "\xE7\x9D\xB9",
+ "\xB6\xC4" => "\xE8\xB5\x8C",
+ "\xB6\xC5" => "\xE6\x9D\x9C",
+ "\xB6\xC6" => "\xE9\x95\x80",
+ "\xB6\xC7" => "\xE8\x82\x9A",
+ "\xB6\xC8" => "\xE5\xBA\xA6",
+ "\xB6\xC9" => "\xE6\xB8\xA1",
+ "\xB6\xCA" => "\xE5\xA6\x92",
+ "\xB6\xCB" => "\xE7\xAB\xAF",
+ "\xB6\xCC" => "\xE7\x9F\xAD",
+ "\xB6\xCD" => "\xE9\x94\xBB",
+ "\xB6\xCE" => "\xE6\xAE\xB5",
+ "\xB6\xCF" => "\xE6\x96\xAD",
+ "\xB6\xD0" => "\xE7\xBC\x8E",
+ "\xB6\xD1" => "\xE5\xA0\x86",
+ "\xB6\xD2" => "\xE5\x85\x91",
+ "\xB6\xD3" => "\xE9\x98\x9F",
+ "\xB6\xD4" => "\xE5\xAF\xB9",
+ "\xB6\xD5" => "\xE5\xA2\xA9",
+ "\xB6\xD6" => "\xE5\x90\xA8",
+ "\xB6\xD7" => "\xE8\xB9\xB2",
+ "\xB6\xD8" => "\xE6\x95\xA6",
+ "\xB6\xD9" => "\xE9\xA1\xBF",
+ "\xB6\xDA" => "\xE5\x9B\xA4",
+ "\xB6\xDB" => "\xE9\x92\x9D",
+ "\xB6\xDC" => "\xE7\x9B\xBE",
+ "\xB6\xDD" => "\xE9\x81\x81",
+ "\xB6\xDE" => "\xE6\x8E\x87",
+ "\xB6\xDF" => "\xE5\x93\x86",
+ "\xB6\xE0" => "\xE5\xA4\x9A",
+ "\xB6\xE1" => "\xE5\xA4\xBA",
+ "\xB6\xE2" => "\xE5\x9E\x9B",
+ "\xB6\xE3" => "\xE8\xBA\xB2",
+ "\xB6\xE4" => "\xE6\x9C\xB5",
+ "\xB6\xE5" => "\xE8\xB7\xBA",
+ "\xB6\xE6" => "\xE8\x88\xB5",
+ "\xB6\xE7" => "\xE5\x89\x81",
+ "\xB6\xE8" => "\xE6\x83\xB0",
+ "\xB6\xE9" => "\xE5\xA0\x95",
+ "\xB6\xEA" => "\xE8\x9B\xBE",
+ "\xB6\xEB" => "\xE5\xB3\xA8",
+ "\xB6\xEC" => "\xE9\xB9\x85",
+ "\xB6\xED" => "\xE4\xBF\x84",
+ "\xB6\xEE" => "\xE9\xA2\x9D",
+ "\xB6\xEF" => "\xE8\xAE\xB9",
+ "\xB6\xF0" => "\xE5\xA8\xA5",
+ "\xB6\xF1" => "\xE6\x81\xB6",
+ "\xB6\xF2" => "\xE5\x8E\x84",
+ "\xB6\xF3" => "\xE6\x89\xBC",
+ "\xB6\xF4" => "\xE9\x81\x8F",
+ "\xB6\xF5" => "\xE9\x84\x82",
+ "\xB6\xF6" => "\xE9\xA5\xBF",
+ "\xB6\xF7" => "\xE6\x81\xA9",
+ "\xB6\xF8" => "\xE8\x80\x8C",
+ "\xB6\xF9" => "\xE5\x84\xBF",
+ "\xB6\xFA" => "\xE8\x80\xB3",
+ "\xB6\xFB" => "\xE5\xB0\x94",
+ "\xB6\xFC" => "\xE9\xA5\xB5",
+ "\xB6\xFD" => "\xE6\xB4\xB1",
+ "\xB6\xFE" => "\xE4\xBA\x8C",
+ "\xB7\xA1" => "\xE8\xB4\xB0",
+ "\xB7\xA2" => "\xE5\x8F\x91",
+ "\xB7\xA3" => "\xE7\xBD\x9A",
+ "\xB7\xA4" => "\xE7\xAD\x8F",
+ "\xB7\xA5" => "\xE4\xBC\x90",
+ "\xB7\xA6" => "\xE4\xB9\x8F",
+ "\xB7\xA7" => "\xE9\x98\x80",
+ "\xB7\xA8" => "\xE6\xB3\x95",
+ "\xB7\xA9" => "\xE7\x8F\x90",
+ "\xB7\xAA" => "\xE8\x97\xA9",
+ "\xB7\xAB" => "\xE5\xB8\x86",
+ "\xB7\xAC" => "\xE7\x95\xAA",
+ "\xB7\xAD" => "\xE7\xBF\xBB",
+ "\xB7\xAE" => "\xE6\xA8\x8A",
+ "\xB7\xAF" => "\xE7\x9F\xBE",
+ "\xB7\xB0" => "\xE9\x92\x92",
+ "\xB7\xB1" => "\xE7\xB9\x81",
+ "\xB7\xB2" => "\xE5\x87\xA1",
+ "\xB7\xB3" => "\xE7\x83\xA6",
+ "\xB7\xB4" => "\xE5\x8F\x8D",
+ "\xB7\xB5" => "\xE8\xBF\x94",
+ "\xB7\xB6" => "\xE8\x8C\x83",
+ "\xB7\xB7" => "\xE8\xB4\xA9",
+ "\xB7\xB8" => "\xE7\x8A\xAF",
+ "\xB7\xB9" => "\xE9\xA5\xAD",
+ "\xB7\xBA" => "\xE6\xB3\x9B",
+ "\xB7\xBB" => "\xE5\x9D\x8A",
+ "\xB7\xBC" => "\xE8\x8A\xB3",
+ "\xB7\xBD" => "\xE6\x96\xB9",
+ "\xB7\xBE" => "\xE8\x82\xAA",
+ "\xB7\xBF" => "\xE6\x88\xBF",
+ "\xB7\xC0" => "\xE9\x98\xB2",
+ "\xB7\xC1" => "\xE5\xA6\xA8",
+ "\xB7\xC2" => "\xE4\xBB\xBF",
+ "\xB7\xC3" => "\xE8\xAE\xBF",
+ "\xB7\xC4" => "\xE7\xBA\xBA",
+ "\xB7\xC5" => "\xE6\x94\xBE",
+ "\xB7\xC6" => "\xE8\x8F\xB2",
+ "\xB7\xC7" => "\xE9\x9D\x9E",
+ "\xB7\xC8" => "\xE5\x95\xA1",
+ "\xB7\xC9" => "\xE9\xA3\x9E",
+ "\xB7\xCA" => "\xE8\x82\xA5",
+ "\xB7\xCB" => "\xE5\x8C\xAA",
+ "\xB7\xCC" => "\xE8\xAF\xBD",
+ "\xB7\xCD" => "\xE5\x90\xA0",
+ "\xB7\xCE" => "\xE8\x82\xBA",
+ "\xB7\xCF" => "\xE5\xBA\x9F",
+ "\xB7\xD0" => "\xE6\xB2\xB8",
+ "\xB7\xD1" => "\xE8\xB4\xB9",
+ "\xB7\xD2" => "\xE8\x8A\xAC",
+ "\xB7\xD3" => "\xE9\x85\x9A",
+ "\xB7\xD4" => "\xE5\x90\xA9",
+ "\xB7\xD5" => "\xE6\xB0\x9B",
+ "\xB7\xD6" => "\xE5\x88\x86",
+ "\xB7\xD7" => "\xE7\xBA\xB7",
+ "\xB7\xD8" => "\xE5\x9D\x9F",
+ "\xB7\xD9" => "\xE7\x84\x9A",
+ "\xB7\xDA" => "\xE6\xB1\xBE",
+ "\xB7\xDB" => "\xE7\xB2\x89",
+ "\xB7\xDC" => "\xE5\xA5\x8B",
+ "\xB7\xDD" => "\xE4\xBB\xBD",
+ "\xB7\xDE" => "\xE5\xBF\xBF",
+ "\xB7\xDF" => "\xE6\x84\xA4",
+ "\xB7\xE0" => "\xE7\xB2\xAA",
+ "\xB7\xE1" => "\xE4\xB8\xB0",
+ "\xB7\xE2" => "\xE5\xB0\x81",
+ "\xB7\xE3" => "\xE6\x9E\xAB",
+ "\xB7\xE4" => "\xE8\x9C\x82",
+ "\xB7\xE5" => "\xE5\xB3\xB0",
+ "\xB7\xE6" => "\xE9\x94\x8B",
+ "\xB7\xE7" => "\xE9\xA3\x8E",
+ "\xB7\xE8" => "\xE7\x96\xAF",
+ "\xB7\xE9" => "\xE7\x83\xBD",
+ "\xB7\xEA" => "\xE9\x80\xA2",
+ "\xB7\xEB" => "\xE5\x86\xAF",
+ "\xB7\xEC" => "\xE7\xBC\x9D",
+ "\xB7\xED" => "\xE8\xAE\xBD",
+ "\xB7\xEE" => "\xE5\xA5\x89",
+ "\xB7\xEF" => "\xE5\x87\xA4",
+ "\xB7\xF0" => "\xE4\xBD\x9B",
+ "\xB7\xF1" => "\xE5\x90\xA6",
+ "\xB7\xF2" => "\xE5\xA4\xAB",
+ "\xB7\xF3" => "\xE6\x95\xB7",
+ "\xB7\xF4" => "\xE8\x82\xA4",
+ "\xB7\xF5" => "\xE5\xAD\xB5",
+ "\xB7\xF6" => "\xE6\x89\xB6",
+ "\xB7\xF7" => "\xE6\x8B\x82",
+ "\xB7\xF8" => "\xE8\xBE\x90",
+ "\xB7\xF9" => "\xE5\xB9\x85",
+ "\xB7\xFA" => "\xE6\xB0\x9F",
+ "\xB7\xFB" => "\xE7\xAC\xA6",
+ "\xB7\xFC" => "\xE4\xBC\x8F",
+ "\xB7\xFD" => "\xE4\xBF\x98",
+ "\xB7\xFE" => "\xE6\x9C\x8D",
+ "\xB8\xA1" => "\xE6\xB5\xAE",
+ "\xB8\xA2" => "\xE6\xB6\xAA",
+ "\xB8\xA3" => "\xE7\xA6\x8F",
+ "\xB8\xA4" => "\xE8\xA2\xB1",
+ "\xB8\xA5" => "\xE5\xBC\x97",
+ "\xB8\xA6" => "\xE7\x94\xAB",
+ "\xB8\xA7" => "\xE6\x8A\x9A",
+ "\xB8\xA8" => "\xE8\xBE\x85",
+ "\xB8\xA9" => "\xE4\xBF\xAF",
+ "\xB8\xAA" => "\xE9\x87\x9C",
+ "\xB8\xAB" => "\xE6\x96\xA7",
+ "\xB8\xAC" => "\xE8\x84\xAF",
+ "\xB8\xAD" => "\xE8\x85\x91",
+ "\xB8\xAE" => "\xE5\xBA\x9C",
+ "\xB8\xAF" => "\xE8\x85\x90",
+ "\xB8\xB0" => "\xE8\xB5\xB4",
+ "\xB8\xB1" => "\xE5\x89\xAF",
+ "\xB8\xB2" => "\xE8\xA6\x86",
+ "\xB8\xB3" => "\xE8\xB5\x8B",
+ "\xB8\xB4" => "\xE5\xA4\x8D",
+ "\xB8\xB5" => "\xE5\x82\x85",
+ "\xB8\xB6" => "\xE4\xBB\x98",
+ "\xB8\xB7" => "\xE9\x98\x9C",
+ "\xB8\xB8" => "\xE7\x88\xB6",
+ "\xB8\xB9" => "\xE8\x85\xB9",
+ "\xB8\xBA" => "\xE8\xB4\x9F",
+ "\xB8\xBB" => "\xE5\xAF\x8C",
+ "\xB8\xBC" => "\xE8\xAE\xA3",
+ "\xB8\xBD" => "\xE9\x99\x84",
+ "\xB8\xBE" => "\xE5\xA6\x87",
+ "\xB8\xBF" => "\xE7\xBC\x9A",
+ "\xB8\xC0" => "\xE5\x92\x90",
+ "\xB8\xC1" => "\xE5\x99\xB6",
+ "\xB8\xC2" => "\xE5\x98\x8E",
+ "\xB8\xC3" => "\xE8\xAF\xA5",
+ "\xB8\xC4" => "\xE6\x94\xB9",
+ "\xB8\xC5" => "\xE6\xA6\x82",
+ "\xB8\xC6" => "\xE9\x92\x99",
+ "\xB8\xC7" => "\xE7\x9B\x96",
+ "\xB8\xC8" => "\xE6\xBA\x89",
+ "\xB8\xC9" => "\xE5\xB9\xB2",
+ "\xB8\xCA" => "\xE7\x94\x98",
+ "\xB8\xCB" => "\xE6\x9D\x86",
+ "\xB8\xCC" => "\xE6\x9F\x91",
+ "\xB8\xCD" => "\xE7\xAB\xBF",
+ "\xB8\xCE" => "\xE8\x82\x9D",
+ "\xB8\xCF" => "\xE8\xB5\xB6",
+ "\xB8\xD0" => "\xE6\x84\x9F",
+ "\xB8\xD1" => "\xE7\xA7\x86",
+ "\xB8\xD2" => "\xE6\x95\xA2",
+ "\xB8\xD3" => "\xE8\xB5\xA3",
+ "\xB8\xD4" => "\xE5\x86\x88",
+ "\xB8\xD5" => "\xE5\x88\x9A",
+ "\xB8\xD6" => "\xE9\x92\xA2",
+ "\xB8\xD7" => "\xE7\xBC\xB8",
+ "\xB8\xD8" => "\xE8\x82\x9B",
+ "\xB8\xD9" => "\xE7\xBA\xB2",
+ "\xB8\xDA" => "\xE5\xB2\x97",
+ "\xB8\xDB" => "\xE6\xB8\xAF",
+ "\xB8\xDC" => "\xE6\x9D\xA0",
+ "\xB8\xDD" => "\xE7\xAF\x99",
+ "\xB8\xDE" => "\xE7\x9A\x8B",
+ "\xB8\xDF" => "\xE9\xAB\x98",
+ "\xB8\xE0" => "\xE8\x86\x8F",
+ "\xB8\xE1" => "\xE7\xBE\x94",
+ "\xB8\xE2" => "\xE7\xB3\x95",
+ "\xB8\xE3" => "\xE6\x90\x9E",
+ "\xB8\xE4" => "\xE9\x95\x90",
+ "\xB8\xE5" => "\xE7\xA8\xBF",
+ "\xB8\xE6" => "\xE5\x91\x8A",
+ "\xB8\xE7" => "\xE5\x93\xA5",
+ "\xB8\xE8" => "\xE6\xAD\x8C",
+ "\xB8\xE9" => "\xE6\x90\x81",
+ "\xB8\xEA" => "\xE6\x88\x88",
+ "\xB8\xEB" => "\xE9\xB8\xBD",
+ "\xB8\xEC" => "\xE8\x83\xB3",
+ "\xB8\xED" => "\xE7\x96\x99",
+ "\xB8\xEE" => "\xE5\x89\xB2",
+ "\xB8\xEF" => "\xE9\x9D\xA9",
+ "\xB8\xF0" => "\xE8\x91\x9B",
+ "\xB8\xF1" => "\xE6\xA0\xBC",
+ "\xB8\xF2" => "\xE8\x9B\xA4",
+ "\xB8\xF3" => "\xE9\x98\x81",
+ "\xB8\xF4" => "\xE9\x9A\x94",
+ "\xB8\xF5" => "\xE9\x93\xAC",
+ "\xB8\xF6" => "\xE4\xB8\xAA",
+ "\xB8\xF7" => "\xE5\x90\x84",
+ "\xB8\xF8" => "\xE7\xBB\x99",
+ "\xB8\xF9" => "\xE6\xA0\xB9",
+ "\xB8\xFA" => "\xE8\xB7\x9F",
+ "\xB8\xFB" => "\xE8\x80\x95",
+ "\xB8\xFC" => "\xE6\x9B\xB4",
+ "\xB8\xFD" => "\xE5\xBA\x9A",
+ "\xB8\xFE" => "\xE7\xBE\xB9",
+ "\xB9\xA1" => "\xE5\x9F\x82",
+ "\xB9\xA2" => "\xE8\x80\xBF",
+ "\xB9\xA3" => "\xE6\xA2\x97",
+ "\xB9\xA4" => "\xE5\xB7\xA5",
+ "\xB9\xA5" => "\xE6\x94\xBB",
+ "\xB9\xA6" => "\xE5\x8A\x9F",
+ "\xB9\xA7" => "\xE6\x81\xAD",
+ "\xB9\xA8" => "\xE9\xBE\x9A",
+ "\xB9\xA9" => "\xE4\xBE\x9B",
+ "\xB9\xAA" => "\xE8\xBA\xAC",
+ "\xB9\xAB" => "\xE5\x85\xAC",
+ "\xB9\xAC" => "\xE5\xAE\xAB",
+ "\xB9\xAD" => "\xE5\xBC\x93",
+ "\xB9\xAE" => "\xE5\xB7\xA9",
+ "\xB9\xAF" => "\xE6\xB1\x9E",
+ "\xB9\xB0" => "\xE6\x8B\xB1",
+ "\xB9\xB1" => "\xE8\xB4\xA1",
+ "\xB9\xB2" => "\xE5\x85\xB1",
+ "\xB9\xB3" => "\xE9\x92\xA9",
+ "\xB9\xB4" => "\xE5\x8B\xBE",
+ "\xB9\xB5" => "\xE6\xB2\x9F",
+ "\xB9\xB6" => "\xE8\x8B\x9F",
+ "\xB9\xB7" => "\xE7\x8B\x97",
+ "\xB9\xB8" => "\xE5\x9E\xA2",
+ "\xB9\xB9" => "\xE6\x9E\x84",
+ "\xB9\xBA" => "\xE8\xB4\xAD",
+ "\xB9\xBB" => "\xE5\xA4\x9F",
+ "\xB9\xBC" => "\xE8\xBE\x9C",
+ "\xB9\xBD" => "\xE8\x8F\x87",
+ "\xB9\xBE" => "\xE5\x92\x95",
+ "\xB9\xBF" => "\xE7\xAE\x8D",
+ "\xB9\xC0" => "\xE4\xBC\xB0",
+ "\xB9\xC1" => "\xE6\xB2\xBD",
+ "\xB9\xC2" => "\xE5\xAD\xA4",
+ "\xB9\xC3" => "\xE5\xA7\x91",
+ "\xB9\xC4" => "\xE9\xBC\x93",
+ "\xB9\xC5" => "\xE5\x8F\xA4",
+ "\xB9\xC6" => "\xE8\x9B\x8A",
+ "\xB9\xC7" => "\xE9\xAA\xA8",
+ "\xB9\xC8" => "\xE8\xB0\xB7",
+ "\xB9\xC9" => "\xE8\x82\xA1",
+ "\xB9\xCA" => "\xE6\x95\x85",
+ "\xB9\xCB" => "\xE9\xA1\xBE",
+ "\xB9\xCC" => "\xE5\x9B\xBA",
+ "\xB9\xCD" => "\xE9\x9B\x87",
+ "\xB9\xCE" => "\xE5\x88\xAE",
+ "\xB9\xCF" => "\xE7\x93\x9C",
+ "\xB9\xD0" => "\xE5\x89\x90",
+ "\xB9\xD1" => "\xE5\xAF\xA1",
+ "\xB9\xD2" => "\xE6\x8C\x82",
+ "\xB9\xD3" => "\xE8\xA4\x82",
+ "\xB9\xD4" => "\xE4\xB9\x96",
+ "\xB9\xD5" => "\xE6\x8B\x90",
+ "\xB9\xD6" => "\xE6\x80\xAA",
+ "\xB9\xD7" => "\xE6\xA3\xBA",
+ "\xB9\xD8" => "\xE5\x85\xB3",
+ "\xB9\xD9" => "\xE5\xAE\x98",
+ "\xB9\xDA" => "\xE5\x86\xA0",
+ "\xB9\xDB" => "\xE8\xA7\x82",
+ "\xB9\xDC" => "\xE7\xAE\xA1",
+ "\xB9\xDD" => "\xE9\xA6\x86",
+ "\xB9\xDE" => "\xE7\xBD\x90",
+ "\xB9\xDF" => "\xE6\x83\xAF",
+ "\xB9\xE0" => "\xE7\x81\x8C",
+ "\xB9\xE1" => "\xE8\xB4\xAF",
+ "\xB9\xE2" => "\xE5\x85\x89",
+ "\xB9\xE3" => "\xE5\xB9\xBF",
+ "\xB9\xE4" => "\xE9\x80\x9B",
+ "\xB9\xE5" => "\xE7\x91\xB0",
+ "\xB9\xE6" => "\xE8\xA7\x84",
+ "\xB9\xE7" => "\xE5\x9C\xAD",
+ "\xB9\xE8" => "\xE7\xA1\x85",
+ "\xB9\xE9" => "\xE5\xBD\x92",
+ "\xB9\xEA" => "\xE9\xBE\x9F",
+ "\xB9\xEB" => "\xE9\x97\xBA",
+ "\xB9\xEC" => "\xE8\xBD\xA8",
+ "\xB9\xED" => "\xE9\xAC\xBC",
+ "\xB9\xEE" => "\xE8\xAF\xA1",
+ "\xB9\xEF" => "\xE7\x99\xB8",
+ "\xB9\xF0" => "\xE6\xA1\x82",
+ "\xB9\xF1" => "\xE6\x9F\x9C",
+ "\xB9\xF2" => "\xE8\xB7\xAA",
+ "\xB9\xF3" => "\xE8\xB4\xB5",
+ "\xB9\xF4" => "\xE5\x88\xBD",
+ "\xB9\xF5" => "\xE8\xBE\x8A",
+ "\xB9\xF6" => "\xE6\xBB\x9A",
+ "\xB9\xF7" => "\xE6\xA3\x8D",
+ "\xB9\xF8" => "\xE9\x94\x85",
+ "\xB9\xF9" => "\xE9\x83\xAD",
+ "\xB9\xFA" => "\xE5\x9B\xBD",
+ "\xB9\xFB" => "\xE6\x9E\x9C",
+ "\xB9\xFC" => "\xE8\xA3\xB9",
+ "\xB9\xFD" => "\xE8\xBF\x87",
+ "\xB9\xFE" => "\xE5\x93\x88",
+ "\xBA\xA1" => "\xE9\xAA\xB8",
+ "\xBA\xA2" => "\xE5\xAD\xA9",
+ "\xBA\xA3" => "\xE6\xB5\xB7",
+ "\xBA\xA4" => "\xE6\xB0\xA6",
+ "\xBA\xA5" => "\xE4\xBA\xA5",
+ "\xBA\xA6" => "\xE5\xAE\xB3",
+ "\xBA\xA7" => "\xE9\xAA\x87",
+ "\xBA\xA8" => "\xE9\x85\xA3",
+ "\xBA\xA9" => "\xE6\x86\xA8",
+ "\xBA\xAA" => "\xE9\x82\xAF",
+ "\xBA\xAB" => "\xE9\x9F\xA9",
+ "\xBA\xAC" => "\xE5\x90\xAB",
+ "\xBA\xAD" => "\xE6\xB6\xB5",
+ "\xBA\xAE" => "\xE5\xAF\x92",
+ "\xBA\xAF" => "\xE5\x87\xBD",
+ "\xBA\xB0" => "\xE5\x96\x8A",
+ "\xBA\xB1" => "\xE7\xBD\x95",
+ "\xBA\xB2" => "\xE7\xBF\xB0",
+ "\xBA\xB3" => "\xE6\x92\xBC",
+ "\xBA\xB4" => "\xE6\x8D\x8D",
+ "\xBA\xB5" => "\xE6\x97\xB1",
+ "\xBA\xB6" => "\xE6\x86\xBE",
+ "\xBA\xB7" => "\xE6\x82\x8D",
+ "\xBA\xB8" => "\xE7\x84\x8A",
+ "\xBA\xB9" => "\xE6\xB1\x97",
+ "\xBA\xBA" => "\xE6\xB1\x89",
+ "\xBA\xBB" => "\xE5\xA4\xAF",
+ "\xBA\xBC" => "\xE6\x9D\xAD",
+ "\xBA\xBD" => "\xE8\x88\xAA",
+ "\xBA\xBE" => "\xE5\xA3\x95",
+ "\xBA\xBF" => "\xE5\x9A\x8E",
+ "\xBA\xC0" => "\xE8\xB1\xAA",
+ "\xBA\xC1" => "\xE6\xAF\xAB",
+ "\xBA\xC2" => "\xE9\x83\x9D",
+ "\xBA\xC3" => "\xE5\xA5\xBD",
+ "\xBA\xC4" => "\xE8\x80\x97",
+ "\xBA\xC5" => "\xE5\x8F\xB7",
+ "\xBA\xC6" => "\xE6\xB5\xA9",
+ "\xBA\xC7" => "\xE5\x91\xB5",
+ "\xBA\xC8" => "\xE5\x96\x9D",
+ "\xBA\xC9" => "\xE8\x8D\xB7",
+ "\xBA\xCA" => "\xE8\x8F\x8F",
+ "\xBA\xCB" => "\xE6\xA0\xB8",
+ "\xBA\xCC" => "\xE7\xA6\xBE",
+ "\xBA\xCD" => "\xE5\x92\x8C",
+ "\xBA\xCE" => "\xE4\xBD\x95",
+ "\xBA\xCF" => "\xE5\x90\x88",
+ "\xBA\xD0" => "\xE7\x9B\x92",
+ "\xBA\xD1" => "\xE8\xB2\x89",
+ "\xBA\xD2" => "\xE9\x98\x82",
+ "\xBA\xD3" => "\xE6\xB2\xB3",
+ "\xBA\xD4" => "\xE6\xB6\xB8",
+ "\xBA\xD5" => "\xE8\xB5\xAB",
+ "\xBA\xD6" => "\xE8\xA4\x90",
+ "\xBA\xD7" => "\xE9\xB9\xA4",
+ "\xBA\xD8" => "\xE8\xB4\xBA",
+ "\xBA\xD9" => "\xE5\x98\xBF",
+ "\xBA\xDA" => "\xE9\xBB\x91",
+ "\xBA\xDB" => "\xE7\x97\x95",
+ "\xBA\xDC" => "\xE5\xBE\x88",
+ "\xBA\xDD" => "\xE7\x8B\xA0",
+ "\xBA\xDE" => "\xE6\x81\xA8",
+ "\xBA\xDF" => "\xE5\x93\xBC",
+ "\xBA\xE0" => "\xE4\xBA\xA8",
+ "\xBA\xE1" => "\xE6\xA8\xAA",
+ "\xBA\xE2" => "\xE8\xA1\xA1",
+ "\xBA\xE3" => "\xE6\x81\x92",
+ "\xBA\xE4" => "\xE8\xBD\xB0",
+ "\xBA\xE5" => "\xE5\x93\x84",
+ "\xBA\xE6" => "\xE7\x83\x98",
+ "\xBA\xE7" => "\xE8\x99\xB9",
+ "\xBA\xE8" => "\xE9\xB8\xBF",
+ "\xBA\xE9" => "\xE6\xB4\xAA",
+ "\xBA\xEA" => "\xE5\xAE\x8F",
+ "\xBA\xEB" => "\xE5\xBC\x98",
+ "\xBA\xEC" => "\xE7\xBA\xA2",
+ "\xBA\xED" => "\xE5\x96\x89",
+ "\xBA\xEE" => "\xE4\xBE\xAF",
+ "\xBA\xEF" => "\xE7\x8C\xB4",
+ "\xBA\xF0" => "\xE5\x90\xBC",
+ "\xBA\xF1" => "\xE5\x8E\x9A",
+ "\xBA\xF2" => "\xE5\x80\x99",
+ "\xBA\xF3" => "\xE5\x90\x8E",
+ "\xBA\xF4" => "\xE5\x91\xBC",
+ "\xBA\xF5" => "\xE4\xB9\x8E",
+ "\xBA\xF6" => "\xE5\xBF\xBD",
+ "\xBA\xF7" => "\xE7\x91\x9A",
+ "\xBA\xF8" => "\xE5\xA3\xB6",
+ "\xBA\xF9" => "\xE8\x91\xAB",
+ "\xBA\xFA" => "\xE8\x83\xA1",
+ "\xBA\xFB" => "\xE8\x9D\xB4",
+ "\xBA\xFC" => "\xE7\x8B\x90",
+ "\xBA\xFD" => "\xE7\xB3\x8A",
+ "\xBA\xFE" => "\xE6\xB9\x96",
+ "\xBB\xA1" => "\xE5\xBC\xA7",
+ "\xBB\xA2" => "\xE8\x99\x8E",
+ "\xBB\xA3" => "\xE5\x94\xAC",
+ "\xBB\xA4" => "\xE6\x8A\xA4",
+ "\xBB\xA5" => "\xE4\xBA\x92",
+ "\xBB\xA6" => "\xE6\xB2\xAA",
+ "\xBB\xA7" => "\xE6\x88\xB7",
+ "\xBB\xA8" => "\xE8\x8A\xB1",
+ "\xBB\xA9" => "\xE5\x93\x97",
+ "\xBB\xAA" => "\xE5\x8D\x8E",
+ "\xBB\xAB" => "\xE7\x8C\xBE",
+ "\xBB\xAC" => "\xE6\xBB\x91",
+ "\xBB\xAD" => "\xE7\x94\xBB",
+ "\xBB\xAE" => "\xE5\x88\x92",
+ "\xBB\xAF" => "\xE5\x8C\x96",
+ "\xBB\xB0" => "\xE8\xAF\x9D",
+ "\xBB\xB1" => "\xE6\xA7\x90",
+ "\xBB\xB2" => "\xE5\xBE\x8A",
+ "\xBB\xB3" => "\xE6\x80\x80",
+ "\xBB\xB4" => "\xE6\xB7\xAE",
+ "\xBB\xB5" => "\xE5\x9D\x8F",
+ "\xBB\xB6" => "\xE6\xAC\xA2",
+ "\xBB\xB7" => "\xE7\x8E\xAF",
+ "\xBB\xB8" => "\xE6\xA1\x93",
+ "\xBB\xB9" => "\xE8\xBF\x98",
+ "\xBB\xBA" => "\xE7\xBC\x93",
+ "\xBB\xBB" => "\xE6\x8D\xA2",
+ "\xBB\xBC" => "\xE6\x82\xA3",
+ "\xBB\xBD" => "\xE5\x94\xA4",
+ "\xBB\xBE" => "\xE7\x97\xAA",
+ "\xBB\xBF" => "\xE8\xB1\xA2",
+ "\xBB\xC0" => "\xE7\x84\x95",
+ "\xBB\xC1" => "\xE6\xB6\xA3",
+ "\xBB\xC2" => "\xE5\xAE\xA6",
+ "\xBB\xC3" => "\xE5\xB9\xBB",
+ "\xBB\xC4" => "\xE8\x8D\x92",
+ "\xBB\xC5" => "\xE6\x85\x8C",
+ "\xBB\xC6" => "\xE9\xBB\x84",
+ "\xBB\xC7" => "\xE7\xA3\xBA",
+ "\xBB\xC8" => "\xE8\x9D\x97",
+ "\xBB\xC9" => "\xE7\xB0\xA7",
+ "\xBB\xCA" => "\xE7\x9A\x87",
+ "\xBB\xCB" => "\xE5\x87\xB0",
+ "\xBB\xCC" => "\xE6\x83\xB6",
+ "\xBB\xCD" => "\xE7\x85\x8C",
+ "\xBB\xCE" => "\xE6\x99\x83",
+ "\xBB\xCF" => "\xE5\xB9\x8C",
+ "\xBB\xD0" => "\xE6\x81\x8D",
+ "\xBB\xD1" => "\xE8\xB0\x8E",
+ "\xBB\xD2" => "\xE7\x81\xB0",
+ "\xBB\xD3" => "\xE6\x8C\xA5",
+ "\xBB\xD4" => "\xE8\xBE\x89",
+ "\xBB\xD5" => "\xE5\xBE\xBD",
+ "\xBB\xD6" => "\xE6\x81\xA2",
+ "\xBB\xD7" => "\xE8\x9B\x94",
+ "\xBB\xD8" => "\xE5\x9B\x9E",
+ "\xBB\xD9" => "\xE6\xAF\x81",
+ "\xBB\xDA" => "\xE6\x82\x94",
+ "\xBB\xDB" => "\xE6\x85\xA7",
+ "\xBB\xDC" => "\xE5\x8D\x89",
+ "\xBB\xDD" => "\xE6\x83\xA0",
+ "\xBB\xDE" => "\xE6\x99\xA6",
+ "\xBB\xDF" => "\xE8\xB4\xBF",
+ "\xBB\xE0" => "\xE7\xA7\xBD",
+ "\xBB\xE1" => "\xE4\xBC\x9A",
+ "\xBB\xE2" => "\xE7\x83\xA9",
+ "\xBB\xE3" => "\xE6\xB1\x87",
+ "\xBB\xE4" => "\xE8\xAE\xB3",
+ "\xBB\xE5" => "\xE8\xAF\xB2",
+ "\xBB\xE6" => "\xE7\xBB\x98",
+ "\xBB\xE7" => "\xE8\x8D\xA4",
+ "\xBB\xE8" => "\xE6\x98\x8F",
+ "\xBB\xE9" => "\xE5\xA9\x9A",
+ "\xBB\xEA" => "\xE9\xAD\x82",
+ "\xBB\xEB" => "\xE6\xB5\x91",
+ "\xBB\xEC" => "\xE6\xB7\xB7",
+ "\xBB\xED" => "\xE8\xB1\x81",
+ "\xBB\xEE" => "\xE6\xB4\xBB",
+ "\xBB\xEF" => "\xE4\xBC\x99",
+ "\xBB\xF0" => "\xE7\x81\xAB",
+ "\xBB\xF1" => "\xE8\x8E\xB7",
+ "\xBB\xF2" => "\xE6\x88\x96",
+ "\xBB\xF3" => "\xE6\x83\x91",
+ "\xBB\xF4" => "\xE9\x9C\x8D",
+ "\xBB\xF5" => "\xE8\xB4\xA7",
+ "\xBB\xF6" => "\xE7\xA5\xB8",
+ "\xBB\xF7" => "\xE5\x87\xBB",
+ "\xBB\xF8" => "\xE5\x9C\xBE",
+ "\xBB\xF9" => "\xE5\x9F\xBA",
+ "\xBB\xFA" => "\xE6\x9C\xBA",
+ "\xBB\xFB" => "\xE7\x95\xB8",
+ "\xBB\xFC" => "\xE7\xA8\xBD",
+ "\xBB\xFD" => "\xE7\xA7\xAF",
+ "\xBB\xFE" => "\xE7\xAE\x95",
+ "\xBC\xA1" => "\xE8\x82\x8C",
+ "\xBC\xA2" => "\xE9\xA5\xA5",
+ "\xBC\xA3" => "\xE8\xBF\xB9",
+ "\xBC\xA4" => "\xE6\xBF\x80",
+ "\xBC\xA5" => "\xE8\xAE\xA5",
+ "\xBC\xA6" => "\xE9\xB8\xA1",
+ "\xBC\xA7" => "\xE5\xA7\xAC",
+ "\xBC\xA8" => "\xE7\xBB\xA9",
+ "\xBC\xA9" => "\xE7\xBC\x89",
+ "\xBC\xAA" => "\xE5\x90\x89",
+ "\xBC\xAB" => "\xE6\x9E\x81",
+ "\xBC\xAC" => "\xE6\xA3\x98",
+ "\xBC\xAD" => "\xE8\xBE\x91",
+ "\xBC\xAE" => "\xE7\xB1\x8D",
+ "\xBC\xAF" => "\xE9\x9B\x86",
+ "\xBC\xB0" => "\xE5\x8F\x8A",
+ "\xBC\xB1" => "\xE6\x80\xA5",
+ "\xBC\xB2" => "\xE7\x96\xBE",
+ "\xBC\xB3" => "\xE6\xB1\xB2",
+ "\xBC\xB4" => "\xE5\x8D\xB3",
+ "\xBC\xB5" => "\xE5\xAB\x89",
+ "\xBC\xB6" => "\xE7\xBA\xA7",
+ "\xBC\xB7" => "\xE6\x8C\xA4",
+ "\xBC\xB8" => "\xE5\x87\xA0",
+ "\xBC\xB9" => "\xE8\x84\x8A",
+ "\xBC\xBA" => "\xE5\xB7\xB1",
+ "\xBC\xBB" => "\xE8\x93\x9F",
+ "\xBC\xBC" => "\xE6\x8A\x80",
+ "\xBC\xBD" => "\xE5\x86\x80",
+ "\xBC\xBE" => "\xE5\xAD\xA3",
+ "\xBC\xBF" => "\xE4\xBC\x8E",
+ "\xBC\xC0" => "\xE7\xA5\xAD",
+ "\xBC\xC1" => "\xE5\x89\x82",
+ "\xBC\xC2" => "\xE6\x82\xB8",
+ "\xBC\xC3" => "\xE6\xB5\x8E",
+ "\xBC\xC4" => "\xE5\xAF\x84",
+ "\xBC\xC5" => "\xE5\xAF\x82",
+ "\xBC\xC6" => "\xE8\xAE\xA1",
+ "\xBC\xC7" => "\xE8\xAE\xB0",
+ "\xBC\xC8" => "\xE6\x97\xA2",
+ "\xBC\xC9" => "\xE5\xBF\x8C",
+ "\xBC\xCA" => "\xE9\x99\x85",
+ "\xBC\xCB" => "\xE5\xA6\x93",
+ "\xBC\xCC" => "\xE7\xBB\xA7",
+ "\xBC\xCD" => "\xE7\xBA\xAA",
+ "\xBC\xCE" => "\xE5\x98\x89",
+ "\xBC\xCF" => "\xE6\x9E\xB7",
+ "\xBC\xD0" => "\xE5\xA4\xB9",
+ "\xBC\xD1" => "\xE4\xBD\xB3",
+ "\xBC\xD2" => "\xE5\xAE\xB6",
+ "\xBC\xD3" => "\xE5\x8A\xA0",
+ "\xBC\xD4" => "\xE8\x8D\x9A",
+ "\xBC\xD5" => "\xE9\xA2\x8A",
+ "\xBC\xD6" => "\xE8\xB4\xBE",
+ "\xBC\xD7" => "\xE7\x94\xB2",
+ "\xBC\xD8" => "\xE9\x92\xBE",
+ "\xBC\xD9" => "\xE5\x81\x87",
+ "\xBC\xDA" => "\xE7\xA8\xBC",
+ "\xBC\xDB" => "\xE4\xBB\xB7",
+ "\xBC\xDC" => "\xE6\x9E\xB6",
+ "\xBC\xDD" => "\xE9\xA9\xBE",
+ "\xBC\xDE" => "\xE5\xAB\x81",
+ "\xBC\xDF" => "\xE6\xAD\xBC",
+ "\xBC\xE0" => "\xE7\x9B\x91",
+ "\xBC\xE1" => "\xE5\x9D\x9A",
+ "\xBC\xE2" => "\xE5\xB0\x96",
+ "\xBC\xE3" => "\xE7\xAC\xBA",
+ "\xBC\xE4" => "\xE9\x97\xB4",
+ "\xBC\xE5" => "\xE7\x85\x8E",
+ "\xBC\xE6" => "\xE5\x85\xBC",
+ "\xBC\xE7" => "\xE8\x82\xA9",
+ "\xBC\xE8" => "\xE8\x89\xB0",
+ "\xBC\xE9" => "\xE5\xA5\xB8",
+ "\xBC\xEA" => "\xE7\xBC\x84",
+ "\xBC\xEB" => "\xE8\x8C\xA7",
+ "\xBC\xEC" => "\xE6\xA3\x80",
+ "\xBC\xED" => "\xE6\x9F\xAC",
+ "\xBC\xEE" => "\xE7\xA2\xB1",
+ "\xBC\xEF" => "\xE7\xA1\xB7",
+ "\xBC\xF0" => "\xE6\x8B\xA3",
+ "\xBC\xF1" => "\xE6\x8D\xA1",
+ "\xBC\xF2" => "\xE7\xAE\x80",
+ "\xBC\xF3" => "\xE4\xBF\xAD",
+ "\xBC\xF4" => "\xE5\x89\xAA",
+ "\xBC\xF5" => "\xE5\x87\x8F",
+ "\xBC\xF6" => "\xE8\x8D\x90",
+ "\xBC\xF7" => "\xE6\xA7\x9B",
+ "\xBC\xF8" => "\xE9\x89\xB4",
+ "\xBC\xF9" => "\xE8\xB7\xB5",
+ "\xBC\xFA" => "\xE8\xB4\xB1",
+ "\xBC\xFB" => "\xE8\xA7\x81",
+ "\xBC\xFC" => "\xE9\x94\xAE",
+ "\xBC\xFD" => "\xE7\xAE\xAD",
+ "\xBC\xFE" => "\xE4\xBB\xB6",
+ "\xBD\xA1" => "\xE5\x81\xA5",
+ "\xBD\xA2" => "\xE8\x88\xB0",
+ "\xBD\xA3" => "\xE5\x89\x91",
+ "\xBD\xA4" => "\xE9\xA5\xAF",
+ "\xBD\xA5" => "\xE6\xB8\x90",
+ "\xBD\xA6" => "\xE6\xBA\x85",
+ "\xBD\xA7" => "\xE6\xB6\xA7",
+ "\xBD\xA8" => "\xE5\xBB\xBA",
+ "\xBD\xA9" => "\xE5\x83\xB5",
+ "\xBD\xAA" => "\xE5\xA7\x9C",
+ "\xBD\xAB" => "\xE5\xB0\x86",
+ "\xBD\xAC" => "\xE6\xB5\x86",
+ "\xBD\xAD" => "\xE6\xB1\x9F",
+ "\xBD\xAE" => "\xE7\x96\x86",
+ "\xBD\xAF" => "\xE8\x92\x8B",
+ "\xBD\xB0" => "\xE6\xA1\xA8",
+ "\xBD\xB1" => "\xE5\xA5\x96",
+ "\xBD\xB2" => "\xE8\xAE\xB2",
+ "\xBD\xB3" => "\xE5\x8C\xA0",
+ "\xBD\xB4" => "\xE9\x85\xB1",
+ "\xBD\xB5" => "\xE9\x99\x8D",
+ "\xBD\xB6" => "\xE8\x95\x89",
+ "\xBD\xB7" => "\xE6\xA4\x92",
+ "\xBD\xB8" => "\xE7\xA4\x81",
+ "\xBD\xB9" => "\xE7\x84\xA6",
+ "\xBD\xBA" => "\xE8\x83\xB6",
+ "\xBD\xBB" => "\xE4\xBA\xA4",
+ "\xBD\xBC" => "\xE9\x83\x8A",
+ "\xBD\xBD" => "\xE6\xB5\x87",
+ "\xBD\xBE" => "\xE9\xAA\x84",
+ "\xBD\xBF" => "\xE5\xA8\x87",
+ "\xBD\xC0" => "\xE5\x9A\xBC",
+ "\xBD\xC1" => "\xE6\x90\x85",
+ "\xBD\xC2" => "\xE9\x93\xB0",
+ "\xBD\xC3" => "\xE7\x9F\xAB",
+ "\xBD\xC4" => "\xE4\xBE\xA5",
+ "\xBD\xC5" => "\xE8\x84\x9A",
+ "\xBD\xC6" => "\xE7\x8B\xA1",
+ "\xBD\xC7" => "\xE8\xA7\x92",
+ "\xBD\xC8" => "\xE9\xA5\xBA",
+ "\xBD\xC9" => "\xE7\xBC\xB4",
+ "\xBD\xCA" => "\xE7\xBB\x9E",
+ "\xBD\xCB" => "\xE5\x89\xBF",
+ "\xBD\xCC" => "\xE6\x95\x99",
+ "\xBD\xCD" => "\xE9\x85\xB5",
+ "\xBD\xCE" => "\xE8\xBD\xBF",
+ "\xBD\xCF" => "\xE8\xBE\x83",
+ "\xBD\xD0" => "\xE5\x8F\xAB",
+ "\xBD\xD1" => "\xE7\xAA\x96",
+ "\xBD\xD2" => "\xE6\x8F\xAD",
+ "\xBD\xD3" => "\xE6\x8E\xA5",
+ "\xBD\xD4" => "\xE7\x9A\x86",
+ "\xBD\xD5" => "\xE7\xA7\xB8",
+ "\xBD\xD6" => "\xE8\xA1\x97",
+ "\xBD\xD7" => "\xE9\x98\xB6",
+ "\xBD\xD8" => "\xE6\x88\xAA",
+ "\xBD\xD9" => "\xE5\x8A\xAB",
+ "\xBD\xDA" => "\xE8\x8A\x82",
+ "\xBD\xDB" => "\xE6\xA1\x94",
+ "\xBD\xDC" => "\xE6\x9D\xB0",
+ "\xBD\xDD" => "\xE6\x8D\xB7",
+ "\xBD\xDE" => "\xE7\x9D\xAB",
+ "\xBD\xDF" => "\xE7\xAB\xAD",
+ "\xBD\xE0" => "\xE6\xB4\x81",
+ "\xBD\xE1" => "\xE7\xBB\x93",
+ "\xBD\xE2" => "\xE8\xA7\xA3",
+ "\xBD\xE3" => "\xE5\xA7\x90",
+ "\xBD\xE4" => "\xE6\x88\x92",
+ "\xBD\xE5" => "\xE8\x97\x89",
+ "\xBD\xE6" => "\xE8\x8A\xA5",
+ "\xBD\xE7" => "\xE7\x95\x8C",
+ "\xBD\xE8" => "\xE5\x80\x9F",
+ "\xBD\xE9" => "\xE4\xBB\x8B",
+ "\xBD\xEA" => "\xE7\x96\xA5",
+ "\xBD\xEB" => "\xE8\xAF\xAB",
+ "\xBD\xEC" => "\xE5\xB1\x8A",
+ "\xBD\xED" => "\xE5\xB7\xBE",
+ "\xBD\xEE" => "\xE7\xAD\x8B",
+ "\xBD\xEF" => "\xE6\x96\xA4",
+ "\xBD\xF0" => "\xE9\x87\x91",
+ "\xBD\xF1" => "\xE4\xBB\x8A",
+ "\xBD\xF2" => "\xE6\xB4\xA5",
+ "\xBD\xF3" => "\xE8\xA5\x9F",
+ "\xBD\xF4" => "\xE7\xB4\xA7",
+ "\xBD\xF5" => "\xE9\x94\xA6",
+ "\xBD\xF6" => "\xE4\xBB\x85",
+ "\xBD\xF7" => "\xE8\xB0\xA8",
+ "\xBD\xF8" => "\xE8\xBF\x9B",
+ "\xBD\xF9" => "\xE9\x9D\xB3",
+ "\xBD\xFA" => "\xE6\x99\x8B",
+ "\xBD\xFB" => "\xE7\xA6\x81",
+ "\xBD\xFC" => "\xE8\xBF\x91",
+ "\xBD\xFD" => "\xE7\x83\xAC",
+ "\xBD\xFE" => "\xE6\xB5\xB8",
+ "\xBE\xA1" => "\xE5\xB0\xBD",
+ "\xBE\xA2" => "\xE5\x8A\xB2",
+ "\xBE\xA3" => "\xE8\x8D\x86",
+ "\xBE\xA4" => "\xE5\x85\xA2",
+ "\xBE\xA5" => "\xE8\x8C\x8E",
+ "\xBE\xA6" => "\xE7\x9D\x9B",
+ "\xBE\xA7" => "\xE6\x99\xB6",
+ "\xBE\xA8" => "\xE9\xB2\xB8",
+ "\xBE\xA9" => "\xE4\xBA\xAC",
+ "\xBE\xAA" => "\xE6\x83\x8A",
+ "\xBE\xAB" => "\xE7\xB2\xBE",
+ "\xBE\xAC" => "\xE7\xB2\xB3",
+ "\xBE\xAD" => "\xE7\xBB\x8F",
+ "\xBE\xAE" => "\xE4\xBA\x95",
+ "\xBE\xAF" => "\xE8\xAD\xA6",
+ "\xBE\xB0" => "\xE6\x99\xAF",
+ "\xBE\xB1" => "\xE9\xA2\x88",
+ "\xBE\xB2" => "\xE9\x9D\x99",
+ "\xBE\xB3" => "\xE5\xA2\x83",
+ "\xBE\xB4" => "\xE6\x95\xAC",
+ "\xBE\xB5" => "\xE9\x95\x9C",
+ "\xBE\xB6" => "\xE5\xBE\x84",
+ "\xBE\xB7" => "\xE7\x97\x89",
+ "\xBE\xB8" => "\xE9\x9D\x96",
+ "\xBE\xB9" => "\xE7\xAB\x9F",
+ "\xBE\xBA" => "\xE7\xAB\x9E",
+ "\xBE\xBB" => "\xE5\x87\x80",
+ "\xBE\xBC" => "\xE7\x82\xAF",
+ "\xBE\xBD" => "\xE7\xAA\x98",
+ "\xBE\xBE" => "\xE6\x8F\xAA",
+ "\xBE\xBF" => "\xE7\xA9\xB6",
+ "\xBE\xC0" => "\xE7\xBA\xA0",
+ "\xBE\xC1" => "\xE7\x8E\x96",
+ "\xBE\xC2" => "\xE9\x9F\xAD",
+ "\xBE\xC3" => "\xE4\xB9\x85",
+ "\xBE\xC4" => "\xE7\x81\xB8",
+ "\xBE\xC5" => "\xE4\xB9\x9D",
+ "\xBE\xC6" => "\xE9\x85\x92",
+ "\xBE\xC7" => "\xE5\x8E\xA9",
+ "\xBE\xC8" => "\xE6\x95\x91",
+ "\xBE\xC9" => "\xE6\x97\xA7",
+ "\xBE\xCA" => "\xE8\x87\xBC",
+ "\xBE\xCB" => "\xE8\x88\x85",
+ "\xBE\xCC" => "\xE5\x92\x8E",
+ "\xBE\xCD" => "\xE5\xB0\xB1",
+ "\xBE\xCE" => "\xE7\x96\x9A",
+ "\xBE\xCF" => "\xE9\x9E\xA0",
+ "\xBE\xD0" => "\xE6\x8B\x98",
+ "\xBE\xD1" => "\xE7\x8B\x99",
+ "\xBE\xD2" => "\xE7\x96\xBD",
+ "\xBE\xD3" => "\xE5\xB1\x85",
+ "\xBE\xD4" => "\xE9\xA9\xB9",
+ "\xBE\xD5" => "\xE8\x8F\x8A",
+ "\xBE\xD6" => "\xE5\xB1\x80",
+ "\xBE\xD7" => "\xE5\x92\x80",
+ "\xBE\xD8" => "\xE7\x9F\xA9",
+ "\xBE\xD9" => "\xE4\xB8\xBE",
+ "\xBE\xDA" => "\xE6\xB2\xAE",
+ "\xBE\xDB" => "\xE8\x81\x9A",
+ "\xBE\xDC" => "\xE6\x8B\x92",
+ "\xBE\xDD" => "\xE6\x8D\xAE",
+ "\xBE\xDE" => "\xE5\xB7\xA8",
+ "\xBE\xDF" => "\xE5\x85\xB7",
+ "\xBE\xE0" => "\xE8\xB7\x9D",
+ "\xBE\xE1" => "\xE8\xB8\x9E",
+ "\xBE\xE2" => "\xE9\x94\xAF",
+ "\xBE\xE3" => "\xE4\xBF\xB1",
+ "\xBE\xE4" => "\xE5\x8F\xA5",
+ "\xBE\xE5" => "\xE6\x83\xA7",
+ "\xBE\xE6" => "\xE7\x82\xAC",
+ "\xBE\xE7" => "\xE5\x89\xA7",
+ "\xBE\xE8" => "\xE6\x8D\x90",
+ "\xBE\xE9" => "\xE9\xB9\x83",
+ "\xBE\xEA" => "\xE5\xA8\x9F",
+ "\xBE\xEB" => "\xE5\x80\xA6",
+ "\xBE\xEC" => "\xE7\x9C\xB7",
+ "\xBE\xED" => "\xE5\x8D\xB7",
+ "\xBE\xEE" => "\xE7\xBB\xA2",
+ "\xBE\xEF" => "\xE6\x92\x85",
+ "\xBE\xF0" => "\xE6\x94\xAB",
+ "\xBE\xF1" => "\xE6\x8A\x89",
+ "\xBE\xF2" => "\xE6\x8E\x98",
+ "\xBE\xF3" => "\xE5\x80\x94",
+ "\xBE\xF4" => "\xE7\x88\xB5",
+ "\xBE\xF5" => "\xE8\xA7\x89",
+ "\xBE\xF6" => "\xE5\x86\xB3",
+ "\xBE\xF7" => "\xE8\xAF\x80",
+ "\xBE\xF8" => "\xE7\xBB\x9D",
+ "\xBE\xF9" => "\xE5\x9D\x87",
+ "\xBE\xFA" => "\xE8\x8F\x8C",
+ "\xBE\xFB" => "\xE9\x92\xA7",
+ "\xBE\xFC" => "\xE5\x86\x9B",
+ "\xBE\xFD" => "\xE5\x90\x9B",
+ "\xBE\xFE" => "\xE5\xB3\xBB",
+ "\xBF\xA1" => "\xE4\xBF\x8A",
+ "\xBF\xA2" => "\xE7\xAB\xA3",
+ "\xBF\xA3" => "\xE6\xB5\x9A",
+ "\xBF\xA4" => "\xE9\x83\xA1",
+ "\xBF\xA5" => "\xE9\xAA\x8F",
+ "\xBF\xA6" => "\xE5\x96\x80",
+ "\xBF\xA7" => "\xE5\x92\x96",
+ "\xBF\xA8" => "\xE5\x8D\xA1",
+ "\xBF\xA9" => "\xE5\x92\xAF",
+ "\xBF\xAA" => "\xE5\xBC\x80",
+ "\xBF\xAB" => "\xE6\x8F\xA9",
+ "\xBF\xAC" => "\xE6\xA5\xB7",
+ "\xBF\xAD" => "\xE5\x87\xAF",
+ "\xBF\xAE" => "\xE6\x85\xA8",
+ "\xBF\xAF" => "\xE5\x88\x8A",
+ "\xBF\xB0" => "\xE5\xA0\xAA",
+ "\xBF\xB1" => "\xE5\x8B\x98",
+ "\xBF\xB2" => "\xE5\x9D\x8E",
+ "\xBF\xB3" => "\xE7\xA0\x8D",
+ "\xBF\xB4" => "\xE7\x9C\x8B",
+ "\xBF\xB5" => "\xE5\xBA\xB7",
+ "\xBF\xB6" => "\xE6\x85\xB7",
+ "\xBF\xB7" => "\xE7\xB3\xA0",
+ "\xBF\xB8" => "\xE6\x89\x9B",
+ "\xBF\xB9" => "\xE6\x8A\x97",
+ "\xBF\xBA" => "\xE4\xBA\xA2",
+ "\xBF\xBB" => "\xE7\x82\x95",
+ "\xBF\xBC" => "\xE8\x80\x83",
+ "\xBF\xBD" => "\xE6\x8B\xB7",
+ "\xBF\xBE" => "\xE7\x83\xA4",
+ "\xBF\xBF" => "\xE9\x9D\xA0",
+ "\xBF\xC0" => "\xE5\x9D\xB7",
+ "\xBF\xC1" => "\xE8\x8B\x9B",
+ "\xBF\xC2" => "\xE6\x9F\xAF",
+ "\xBF\xC3" => "\xE6\xA3\xB5",
+ "\xBF\xC4" => "\xE7\xA3\x95",
+ "\xBF\xC5" => "\xE9\xA2\x97",
+ "\xBF\xC6" => "\xE7\xA7\x91",
+ "\xBF\xC7" => "\xE5\xA3\xB3",
+ "\xBF\xC8" => "\xE5\x92\xB3",
+ "\xBF\xC9" => "\xE5\x8F\xAF",
+ "\xBF\xCA" => "\xE6\xB8\xB4",
+ "\xBF\xCB" => "\xE5\x85\x8B",
+ "\xBF\xCC" => "\xE5\x88\xBB",
+ "\xBF\xCD" => "\xE5\xAE\xA2",
+ "\xBF\xCE" => "\xE8\xAF\xBE",
+ "\xBF\xCF" => "\xE8\x82\xAF",
+ "\xBF\xD0" => "\xE5\x95\x83",
+ "\xBF\xD1" => "\xE5\x9E\xA6",
+ "\xBF\xD2" => "\xE6\x81\xB3",
+ "\xBF\xD3" => "\xE5\x9D\x91",
+ "\xBF\xD4" => "\xE5\x90\xAD",
+ "\xBF\xD5" => "\xE7\xA9\xBA",
+ "\xBF\xD6" => "\xE6\x81\x90",
+ "\xBF\xD7" => "\xE5\xAD\x94",
+ "\xBF\xD8" => "\xE6\x8E\xA7",
+ "\xBF\xD9" => "\xE6\x8A\xA0",
+ "\xBF\xDA" => "\xE5\x8F\xA3",
+ "\xBF\xDB" => "\xE6\x89\xA3",
+ "\xBF\xDC" => "\xE5\xAF\x87",
+ "\xBF\xDD" => "\xE6\x9E\xAF",
+ "\xBF\xDE" => "\xE5\x93\xAD",
+ "\xBF\xDF" => "\xE7\xAA\x9F",
+ "\xBF\xE0" => "\xE8\x8B\xA6",
+ "\xBF\xE1" => "\xE9\x85\xB7",
+ "\xBF\xE2" => "\xE5\xBA\x93",
+ "\xBF\xE3" => "\xE8\xA3\xA4",
+ "\xBF\xE4" => "\xE5\xA4\xB8",
+ "\xBF\xE5" => "\xE5\x9E\xAE",
+ "\xBF\xE6" => "\xE6\x8C\x8E",
+ "\xBF\xE7" => "\xE8\xB7\xA8",
+ "\xBF\xE8" => "\xE8\x83\xAF",
+ "\xBF\xE9" => "\xE5\x9D\x97",
+ "\xBF\xEA" => "\xE7\xAD\xB7",
+ "\xBF\xEB" => "\xE4\xBE\xA9",
+ "\xBF\xEC" => "\xE5\xBF\xAB",
+ "\xBF\xED" => "\xE5\xAE\xBD",
+ "\xBF\xEE" => "\xE6\xAC\xBE",
+ "\xBF\xEF" => "\xE5\x8C\xA1",
+ "\xBF\xF0" => "\xE7\xAD\x90",
+ "\xBF\xF1" => "\xE7\x8B\x82",
+ "\xBF\xF2" => "\xE6\xA1\x86",
+ "\xBF\xF3" => "\xE7\x9F\xBF",
+ "\xBF\xF4" => "\xE7\x9C\xB6",
+ "\xBF\xF5" => "\xE6\x97\xB7",
+ "\xBF\xF6" => "\xE5\x86\xB5",
+ "\xBF\xF7" => "\xE4\xBA\x8F",
+ "\xBF\xF8" => "\xE7\x9B\x94",
+ "\xBF\xF9" => "\xE5\xB2\xBF",
+ "\xBF\xFA" => "\xE7\xAA\xA5",
+ "\xBF\xFB" => "\xE8\x91\xB5",
+ "\xBF\xFC" => "\xE5\xA5\x8E",
+ "\xBF\xFD" => "\xE9\xAD\x81",
+ "\xBF\xFE" => "\xE5\x82\x80",
+ "\xC0\xA1" => "\xE9\xA6\x88",
+ "\xC0\xA2" => "\xE6\x84\xA7",
+ "\xC0\xA3" => "\xE6\xBA\x83",
+ "\xC0\xA4" => "\xE5\x9D\xA4",
+ "\xC0\xA5" => "\xE6\x98\x86",
+ "\xC0\xA6" => "\xE6\x8D\x86",
+ "\xC0\xA7" => "\xE5\x9B\xB0",
+ "\xC0\xA8" => "\xE6\x8B\xAC",
+ "\xC0\xA9" => "\xE6\x89\xA9",
+ "\xC0\xAA" => "\xE5\xBB\x93",
+ "\xC0\xAB" => "\xE9\x98\x94",
+ "\xC0\xAC" => "\xE5\x9E\x83",
+ "\xC0\xAD" => "\xE6\x8B\x89",
+ "\xC0\xAE" => "\xE5\x96\x87",
+ "\xC0\xAF" => "\xE8\x9C\xA1",
+ "\xC0\xB0" => "\xE8\x85\x8A",
+ "\xC0\xB1" => "\xE8\xBE\xA3",
+ "\xC0\xB2" => "\xE5\x95\xA6",
+ "\xC0\xB3" => "\xE8\x8E\xB1",
+ "\xC0\xB4" => "\xE6\x9D\xA5",
+ "\xC0\xB5" => "\xE8\xB5\x96",
+ "\xC0\xB6" => "\xE8\x93\x9D",
+ "\xC0\xB7" => "\xE5\xA9\xAA",
+ "\xC0\xB8" => "\xE6\xA0\x8F",
+ "\xC0\xB9" => "\xE6\x8B\xA6",
+ "\xC0\xBA" => "\xE7\xAF\xAE",
+ "\xC0\xBB" => "\xE9\x98\x91",
+ "\xC0\xBC" => "\xE5\x85\xB0",
+ "\xC0\xBD" => "\xE6\xBE\x9C",
+ "\xC0\xBE" => "\xE8\xB0\xB0",
+ "\xC0\xBF" => "\xE6\x8F\xBD",
+ "\xC0\xC0" => "\xE8\xA7\x88",
+ "\xC0\xC1" => "\xE6\x87\x92",
+ "\xC0\xC2" => "\xE7\xBC\x86",
+ "\xC0\xC3" => "\xE7\x83\x82",
+ "\xC0\xC4" => "\xE6\xBB\xA5",
+ "\xC0\xC5" => "\xE7\x90\x85",
+ "\xC0\xC6" => "\xE6\xA6\x94",
+ "\xC0\xC7" => "\xE7\x8B\xBC",
+ "\xC0\xC8" => "\xE5\xBB\x8A",
+ "\xC0\xC9" => "\xE9\x83\x8E",
+ "\xC0\xCA" => "\xE6\x9C\x97",
+ "\xC0\xCB" => "\xE6\xB5\xAA",
+ "\xC0\xCC" => "\xE6\x8D\x9E",
+ "\xC0\xCD" => "\xE5\x8A\xB3",
+ "\xC0\xCE" => "\xE7\x89\xA2",
+ "\xC0\xCF" => "\xE8\x80\x81",
+ "\xC0\xD0" => "\xE4\xBD\xAC",
+ "\xC0\xD1" => "\xE5\xA7\xA5",
+ "\xC0\xD2" => "\xE9\x85\xAA",
+ "\xC0\xD3" => "\xE7\x83\x99",
+ "\xC0\xD4" => "\xE6\xB6\x9D",
+ "\xC0\xD5" => "\xE5\x8B\x92",
+ "\xC0\xD6" => "\xE4\xB9\x90",
+ "\xC0\xD7" => "\xE9\x9B\xB7",
+ "\xC0\xD8" => "\xE9\x95\xAD",
+ "\xC0\xD9" => "\xE8\x95\xBE",
+ "\xC0\xDA" => "\xE7\xA3\x8A",
+ "\xC0\xDB" => "\xE7\xB4\xAF",
+ "\xC0\xDC" => "\xE5\x84\xA1",
+ "\xC0\xDD" => "\xE5\x9E\x92",
+ "\xC0\xDE" => "\xE6\x93\x82",
+ "\xC0\xDF" => "\xE8\x82\x8B",
+ "\xC0\xE0" => "\xE7\xB1\xBB",
+ "\xC0\xE1" => "\xE6\xB3\xAA",
+ "\xC0\xE2" => "\xE6\xA3\xB1",
+ "\xC0\xE3" => "\xE6\xA5\x9E",
+ "\xC0\xE4" => "\xE5\x86\xB7",
+ "\xC0\xE5" => "\xE5\x8E\x98",
+ "\xC0\xE6" => "\xE6\xA2\xA8",
+ "\xC0\xE7" => "\xE7\x8A\x81",
+ "\xC0\xE8" => "\xE9\xBB\x8E",
+ "\xC0\xE9" => "\xE7\xAF\xB1",
+ "\xC0\xEA" => "\xE7\x8B\xB8",
+ "\xC0\xEB" => "\xE7\xA6\xBB",
+ "\xC0\xEC" => "\xE6\xBC\x93",
+ "\xC0\xED" => "\xE7\x90\x86",
+ "\xC0\xEE" => "\xE6\x9D\x8E",
+ "\xC0\xEF" => "\xE9\x87\x8C",
+ "\xC0\xF0" => "\xE9\xB2\xA4",
+ "\xC0\xF1" => "\xE7\xA4\xBC",
+ "\xC0\xF2" => "\xE8\x8E\x89",
+ "\xC0\xF3" => "\xE8\x8D\x94",
+ "\xC0\xF4" => "\xE5\x90\x8F",
+ "\xC0\xF5" => "\xE6\xA0\x97",
+ "\xC0\xF6" => "\xE4\xB8\xBD",
+ "\xC0\xF7" => "\xE5\x8E\x89",
+ "\xC0\xF8" => "\xE5\x8A\xB1",
+ "\xC0\xF9" => "\xE7\xA0\xBE",
+ "\xC0\xFA" => "\xE5\x8E\x86",
+ "\xC0\xFB" => "\xE5\x88\xA9",
+ "\xC0\xFC" => "\xE5\x82\x88",
+ "\xC0\xFD" => "\xE4\xBE\x8B",
+ "\xC0\xFE" => "\xE4\xBF\x90",
+ "\xC1\xA1" => "\xE7\x97\xA2",
+ "\xC1\xA2" => "\xE7\xAB\x8B",
+ "\xC1\xA3" => "\xE7\xB2\x92",
+ "\xC1\xA4" => "\xE6\xB2\xA5",
+ "\xC1\xA5" => "\xE9\x9A\xB6",
+ "\xC1\xA6" => "\xE5\x8A\x9B",
+ "\xC1\xA7" => "\xE7\x92\x83",
+ "\xC1\xA8" => "\xE5\x93\xA9",
+ "\xC1\xA9" => "\xE4\xBF\xA9",
+ "\xC1\xAA" => "\xE8\x81\x94",
+ "\xC1\xAB" => "\xE8\x8E\xB2",
+ "\xC1\xAC" => "\xE8\xBF\x9E",
+ "\xC1\xAD" => "\xE9\x95\xB0",
+ "\xC1\xAE" => "\xE5\xBB\x89",
+ "\xC1\xAF" => "\xE6\x80\x9C",
+ "\xC1\xB0" => "\xE6\xB6\x9F",
+ "\xC1\xB1" => "\xE5\xB8\x98",
+ "\xC1\xB2" => "\xE6\x95\x9B",
+ "\xC1\xB3" => "\xE8\x84\xB8",
+ "\xC1\xB4" => "\xE9\x93\xBE",
+ "\xC1\xB5" => "\xE6\x81\x8B",
+ "\xC1\xB6" => "\xE7\x82\xBC",
+ "\xC1\xB7" => "\xE7\xBB\x83",
+ "\xC1\xB8" => "\xE7\xB2\xAE",
+ "\xC1\xB9" => "\xE5\x87\x89",
+ "\xC1\xBA" => "\xE6\xA2\x81",
+ "\xC1\xBB" => "\xE7\xB2\xB1",
+ "\xC1\xBC" => "\xE8\x89\xAF",
+ "\xC1\xBD" => "\xE4\xB8\xA4",
+ "\xC1\xBE" => "\xE8\xBE\x86",
+ "\xC1\xBF" => "\xE9\x87\x8F",
+ "\xC1\xC0" => "\xE6\x99\xBE",
+ "\xC1\xC1" => "\xE4\xBA\xAE",
+ "\xC1\xC2" => "\xE8\xB0\x85",
+ "\xC1\xC3" => "\xE6\x92\xA9",
+ "\xC1\xC4" => "\xE8\x81\x8A",
+ "\xC1\xC5" => "\xE5\x83\x9A",
+ "\xC1\xC6" => "\xE7\x96\x97",
+ "\xC1\xC7" => "\xE7\x87\x8E",
+ "\xC1\xC8" => "\xE5\xAF\xA5",
+ "\xC1\xC9" => "\xE8\xBE\xBD",
+ "\xC1\xCA" => "\xE6\xBD\xA6",
+ "\xC1\xCB" => "\xE4\xBA\x86",
+ "\xC1\xCC" => "\xE6\x92\x82",
+ "\xC1\xCD" => "\xE9\x95\xA3",
+ "\xC1\xCE" => "\xE5\xBB\x96",
+ "\xC1\xCF" => "\xE6\x96\x99",
+ "\xC1\xD0" => "\xE5\x88\x97",
+ "\xC1\xD1" => "\xE8\xA3\x82",
+ "\xC1\xD2" => "\xE7\x83\x88",
+ "\xC1\xD3" => "\xE5\x8A\xA3",
+ "\xC1\xD4" => "\xE7\x8C\x8E",
+ "\xC1\xD5" => "\xE7\x90\xB3",
+ "\xC1\xD6" => "\xE6\x9E\x97",
+ "\xC1\xD7" => "\xE7\xA3\xB7",
+ "\xC1\xD8" => "\xE9\x9C\x96",
+ "\xC1\xD9" => "\xE4\xB8\xB4",
+ "\xC1\xDA" => "\xE9\x82\xBB",
+ "\xC1\xDB" => "\xE9\xB3\x9E",
+ "\xC1\xDC" => "\xE6\xB7\x8B",
+ "\xC1\xDD" => "\xE5\x87\x9B",
+ "\xC1\xDE" => "\xE8\xB5\x81",
+ "\xC1\xDF" => "\xE5\x90\x9D",
+ "\xC1\xE0" => "\xE6\x8B\x8E",
+ "\xC1\xE1" => "\xE7\x8E\xB2",
+ "\xC1\xE2" => "\xE8\x8F\xB1",
+ "\xC1\xE3" => "\xE9\x9B\xB6",
+ "\xC1\xE4" => "\xE9\xBE\x84",
+ "\xC1\xE5" => "\xE9\x93\x83",
+ "\xC1\xE6" => "\xE4\xBC\xB6",
+ "\xC1\xE7" => "\xE7\xBE\x9A",
+ "\xC1\xE8" => "\xE5\x87\x8C",
+ "\xC1\xE9" => "\xE7\x81\xB5",
+ "\xC1\xEA" => "\xE9\x99\xB5",
+ "\xC1\xEB" => "\xE5\xB2\xAD",
+ "\xC1\xEC" => "\xE9\xA2\x86",
+ "\xC1\xED" => "\xE5\x8F\xA6",
+ "\xC1\xEE" => "\xE4\xBB\xA4",
+ "\xC1\xEF" => "\xE6\xBA\x9C",
+ "\xC1\xF0" => "\xE7\x90\x89",
+ "\xC1\xF1" => "\xE6\xA6\xB4",
+ "\xC1\xF2" => "\xE7\xA1\xAB",
+ "\xC1\xF3" => "\xE9\xA6\x8F",
+ "\xC1\xF4" => "\xE7\x95\x99",
+ "\xC1\xF5" => "\xE5\x88\x98",
+ "\xC1\xF6" => "\xE7\x98\xA4",
+ "\xC1\xF7" => "\xE6\xB5\x81",
+ "\xC1\xF8" => "\xE6\x9F\xB3",
+ "\xC1\xF9" => "\xE5\x85\xAD",
+ "\xC1\xFA" => "\xE9\xBE\x99",
+ "\xC1\xFB" => "\xE8\x81\x8B",
+ "\xC1\xFC" => "\xE5\x92\x99",
+ "\xC1\xFD" => "\xE7\xAC\xBC",
+ "\xC1\xFE" => "\xE7\xAA\xBF",
+ "\xC2\xA1" => "\xE9\x9A\x86",
+ "\xC2\xA2" => "\xE5\x9E\x84",
+ "\xC2\xA3" => "\xE6\x8B\xA2",
+ "\xC2\xA4" => "\xE9\x99\x87",
+ "\xC2\xA5" => "\xE6\xA5\xBC",
+ "\xC2\xA6" => "\xE5\xA8\x84",
+ "\xC2\xA7" => "\xE6\x90\x82",
+ "\xC2\xA8" => "\xE7\xAF\x93",
+ "\xC2\xA9" => "\xE6\xBC\x8F",
+ "\xC2\xAA" => "\xE9\x99\x8B",
+ "\xC2\xAB" => "\xE8\x8A\xA6",
+ "\xC2\xAC" => "\xE5\x8D\xA2",
+ "\xC2\xAD" => "\xE9\xA2\x85",
+ "\xC2\xAE" => "\xE5\xBA\x90",
+ "\xC2\xAF" => "\xE7\x82\x89",
+ "\xC2\xB0" => "\xE6\x8E\xB3",
+ "\xC2\xB1" => "\xE5\x8D\xA4",
+ "\xC2\xB2" => "\xE8\x99\x8F",
+ "\xC2\xB3" => "\xE9\xB2\x81",
+ "\xC2\xB4" => "\xE9\xBA\x93",
+ "\xC2\xB5" => "\xE7\xA2\x8C",
+ "\xC2\xB6" => "\xE9\x9C\xB2",
+ "\xC2\xB7" => "\xE8\xB7\xAF",
+ "\xC2\xB8" => "\xE8\xB5\x82",
+ "\xC2\xB9" => "\xE9\xB9\xBF",
+ "\xC2\xBA" => "\xE6\xBD\x9E",
+ "\xC2\xBB" => "\xE7\xA6\x84",
+ "\xC2\xBC" => "\xE5\xBD\x95",
+ "\xC2\xBD" => "\xE9\x99\x86",
+ "\xC2\xBE" => "\xE6\x88\xAE",
+ "\xC2\xBF" => "\xE9\xA9\xB4",
+ "\xC2\xC0" => "\xE5\x90\x95",
+ "\xC2\xC1" => "\xE9\x93\x9D",
+ "\xC2\xC2" => "\xE4\xBE\xA3",
+ "\xC2\xC3" => "\xE6\x97\x85",
+ "\xC2\xC4" => "\xE5\xB1\xA5",
+ "\xC2\xC5" => "\xE5\xB1\xA1",
+ "\xC2\xC6" => "\xE7\xBC\x95",
+ "\xC2\xC7" => "\xE8\x99\x91",
+ "\xC2\xC8" => "\xE6\xB0\xAF",
+ "\xC2\xC9" => "\xE5\xBE\x8B",
+ "\xC2\xCA" => "\xE7\x8E\x87",
+ "\xC2\xCB" => "\xE6\xBB\xA4",
+ "\xC2\xCC" => "\xE7\xBB\xBF",
+ "\xC2\xCD" => "\xE5\xB3\xA6",
+ "\xC2\xCE" => "\xE6\x8C\x9B",
+ "\xC2\xCF" => "\xE5\xAD\xAA",
+ "\xC2\xD0" => "\xE6\xBB\xA6",
+ "\xC2\xD1" => "\xE5\x8D\xB5",
+ "\xC2\xD2" => "\xE4\xB9\xB1",
+ "\xC2\xD3" => "\xE6\x8E\xA0",
+ "\xC2\xD4" => "\xE7\x95\xA5",
+ "\xC2\xD5" => "\xE6\x8A\xA1",
+ "\xC2\xD6" => "\xE8\xBD\xAE",
+ "\xC2\xD7" => "\xE4\xBC\xA6",
+ "\xC2\xD8" => "\xE4\xBB\x91",
+ "\xC2\xD9" => "\xE6\xB2\xA6",
+ "\xC2\xDA" => "\xE7\xBA\xB6",
+ "\xC2\xDB" => "\xE8\xAE\xBA",
+ "\xC2\xDC" => "\xE8\x90\x9D",
+ "\xC2\xDD" => "\xE8\x9E\xBA",
+ "\xC2\xDE" => "\xE7\xBD\x97",
+ "\xC2\xDF" => "\xE9\x80\xBB",
+ "\xC2\xE0" => "\xE9\x94\xA3",
+ "\xC2\xE1" => "\xE7\xAE\xA9",
+ "\xC2\xE2" => "\xE9\xAA\xA1",
+ "\xC2\xE3" => "\xE8\xA3\xB8",
+ "\xC2\xE4" => "\xE8\x90\xBD",
+ "\xC2\xE5" => "\xE6\xB4\x9B",
+ "\xC2\xE6" => "\xE9\xAA\x86",
+ "\xC2\xE7" => "\xE7\xBB\x9C",
+ "\xC2\xE8" => "\xE5\xA6\x88",
+ "\xC2\xE9" => "\xE9\xBA\xBB",
+ "\xC2\xEA" => "\xE7\x8E\x9B",
+ "\xC2\xEB" => "\xE7\xA0\x81",
+ "\xC2\xEC" => "\xE8\x9A\x82",
+ "\xC2\xED" => "\xE9\xA9\xAC",
+ "\xC2\xEE" => "\xE9\xAA\x82",
+ "\xC2\xEF" => "\xE5\x98\x9B",
+ "\xC2\xF0" => "\xE5\x90\x97",
+ "\xC2\xF1" => "\xE5\x9F\x8B",
+ "\xC2\xF2" => "\xE4\xB9\xB0",
+ "\xC2\xF3" => "\xE9\xBA\xA6",
+ "\xC2\xF4" => "\xE5\x8D\x96",
+ "\xC2\xF5" => "\xE8\xBF\x88",
+ "\xC2\xF6" => "\xE8\x84\x89",
+ "\xC2\xF7" => "\xE7\x9E\x92",
+ "\xC2\xF8" => "\xE9\xA6\x92",
+ "\xC2\xF9" => "\xE8\x9B\xAE",
+ "\xC2\xFA" => "\xE6\xBB\xA1",
+ "\xC2\xFB" => "\xE8\x94\x93",
+ "\xC2\xFC" => "\xE6\x9B\xBC",
+ "\xC2\xFD" => "\xE6\x85\xA2",
+ "\xC2\xFE" => "\xE6\xBC\xAB",
+ "\xC3\xA1" => "\xE8\xB0\xA9",
+ "\xC3\xA2" => "\xE8\x8A\x92",
+ "\xC3\xA3" => "\xE8\x8C\xAB",
+ "\xC3\xA4" => "\xE7\x9B\xB2",
+ "\xC3\xA5" => "\xE6\xB0\x93",
+ "\xC3\xA6" => "\xE5\xBF\x99",
+ "\xC3\xA7" => "\xE8\x8E\xBD",
+ "\xC3\xA8" => "\xE7\x8C\xAB",
+ "\xC3\xA9" => "\xE8\x8C\x85",
+ "\xC3\xAA" => "\xE9\x94\x9A",
+ "\xC3\xAB" => "\xE6\xAF\x9B",
+ "\xC3\xAC" => "\xE7\x9F\x9B",
+ "\xC3\xAD" => "\xE9\x93\x86",
+ "\xC3\xAE" => "\xE5\x8D\xAF",
+ "\xC3\xAF" => "\xE8\x8C\x82",
+ "\xC3\xB0" => "\xE5\x86\x92",
+ "\xC3\xB1" => "\xE5\xB8\xBD",
+ "\xC3\xB2" => "\xE8\xB2\x8C",
+ "\xC3\xB3" => "\xE8\xB4\xB8",
+ "\xC3\xB4" => "\xE4\xB9\x88",
+ "\xC3\xB5" => "\xE7\x8E\xAB",
+ "\xC3\xB6" => "\xE6\x9E\x9A",
+ "\xC3\xB7" => "\xE6\xA2\x85",
+ "\xC3\xB8" => "\xE9\x85\xB6",
+ "\xC3\xB9" => "\xE9\x9C\x89",
+ "\xC3\xBA" => "\xE7\x85\xA4",
+ "\xC3\xBB" => "\xE6\xB2\xA1",
+ "\xC3\xBC" => "\xE7\x9C\x89",
+ "\xC3\xBD" => "\xE5\xAA\x92",
+ "\xC3\xBE" => "\xE9\x95\x81",
+ "\xC3\xBF" => "\xE6\xAF\x8F",
+ "\xC3\xC0" => "\xE7\xBE\x8E",
+ "\xC3\xC1" => "\xE6\x98\xA7",
+ "\xC3\xC2" => "\xE5\xAF\x90",
+ "\xC3\xC3" => "\xE5\xA6\xB9",
+ "\xC3\xC4" => "\xE5\xAA\x9A",
+ "\xC3\xC5" => "\xE9\x97\xA8",
+ "\xC3\xC6" => "\xE9\x97\xB7",
+ "\xC3\xC7" => "\xE4\xBB\xAC",
+ "\xC3\xC8" => "\xE8\x90\x8C",
+ "\xC3\xC9" => "\xE8\x92\x99",
+ "\xC3\xCA" => "\xE6\xAA\xAC",
+ "\xC3\xCB" => "\xE7\x9B\x9F",
+ "\xC3\xCC" => "\xE9\x94\xB0",
+ "\xC3\xCD" => "\xE7\x8C\x9B",
+ "\xC3\xCE" => "\xE6\xA2\xA6",
+ "\xC3\xCF" => "\xE5\xAD\x9F",
+ "\xC3\xD0" => "\xE7\x9C\xAF",
+ "\xC3\xD1" => "\xE9\x86\x9A",
+ "\xC3\xD2" => "\xE9\x9D\xA1",
+ "\xC3\xD3" => "\xE7\xB3\x9C",
+ "\xC3\xD4" => "\xE8\xBF\xB7",
+ "\xC3\xD5" => "\xE8\xB0\x9C",
+ "\xC3\xD6" => "\xE5\xBC\xA5",
+ "\xC3\xD7" => "\xE7\xB1\xB3",
+ "\xC3\xD8" => "\xE7\xA7\x98",
+ "\xC3\xD9" => "\xE8\xA7\x85",
+ "\xC3\xDA" => "\xE6\xB3\x8C",
+ "\xC3\xDB" => "\xE8\x9C\x9C",
+ "\xC3\xDC" => "\xE5\xAF\x86",
+ "\xC3\xDD" => "\xE5\xB9\x82",
+ "\xC3\xDE" => "\xE6\xA3\x89",
+ "\xC3\xDF" => "\xE7\x9C\xA0",
+ "\xC3\xE0" => "\xE7\xBB\xB5",
+ "\xC3\xE1" => "\xE5\x86\x95",
+ "\xC3\xE2" => "\xE5\x85\x8D",
+ "\xC3\xE3" => "\xE5\x8B\x89",
+ "\xC3\xE4" => "\xE5\xA8\xA9",
+ "\xC3\xE5" => "\xE7\xBC\x85",
+ "\xC3\xE6" => "\xE9\x9D\xA2",
+ "\xC3\xE7" => "\xE8\x8B\x97",
+ "\xC3\xE8" => "\xE6\x8F\x8F",
+ "\xC3\xE9" => "\xE7\x9E\x84",
+ "\xC3\xEA" => "\xE8\x97\x90",
+ "\xC3\xEB" => "\xE7\xA7\x92",
+ "\xC3\xEC" => "\xE6\xB8\xBA",
+ "\xC3\xED" => "\xE5\xBA\x99",
+ "\xC3\xEE" => "\xE5\xA6\x99",
+ "\xC3\xEF" => "\xE8\x94\x91",
+ "\xC3\xF0" => "\xE7\x81\xAD",
+ "\xC3\xF1" => "\xE6\xB0\x91",
+ "\xC3\xF2" => "\xE6\x8A\xBF",
+ "\xC3\xF3" => "\xE7\x9A\xBF",
+ "\xC3\xF4" => "\xE6\x95\x8F",
+ "\xC3\xF5" => "\xE6\x82\xAF",
+ "\xC3\xF6" => "\xE9\x97\xBD",
+ "\xC3\xF7" => "\xE6\x98\x8E",
+ "\xC3\xF8" => "\xE8\x9E\x9F",
+ "\xC3\xF9" => "\xE9\xB8\xA3",
+ "\xC3\xFA" => "\xE9\x93\xAD",
+ "\xC3\xFB" => "\xE5\x90\x8D",
+ "\xC3\xFC" => "\xE5\x91\xBD",
+ "\xC3\xFD" => "\xE8\xB0\xAC",
+ "\xC3\xFE" => "\xE6\x91\xB8",
+ "\xC4\xA1" => "\xE6\x91\xB9",
+ "\xC4\xA2" => "\xE8\x98\x91",
+ "\xC4\xA3" => "\xE6\xA8\xA1",
+ "\xC4\xA4" => "\xE8\x86\x9C",
+ "\xC4\xA5" => "\xE7\xA3\xA8",
+ "\xC4\xA6" => "\xE6\x91\xA9",
+ "\xC4\xA7" => "\xE9\xAD\x94",
+ "\xC4\xA8" => "\xE6\x8A\xB9",
+ "\xC4\xA9" => "\xE6\x9C\xAB",
+ "\xC4\xAA" => "\xE8\x8E\xAB",
+ "\xC4\xAB" => "\xE5\xA2\xA8",
+ "\xC4\xAC" => "\xE9\xBB\x98",
+ "\xC4\xAD" => "\xE6\xB2\xAB",
+ "\xC4\xAE" => "\xE6\xBC\xA0",
+ "\xC4\xAF" => "\xE5\xAF\x9E",
+ "\xC4\xB0" => "\xE9\x99\x8C",
+ "\xC4\xB1" => "\xE8\xB0\x8B",
+ "\xC4\xB2" => "\xE7\x89\x9F",
+ "\xC4\xB3" => "\xE6\x9F\x90",
+ "\xC4\xB4" => "\xE6\x8B\x87",
+ "\xC4\xB5" => "\xE7\x89\xA1",
+ "\xC4\xB6" => "\xE4\xBA\xA9",
+ "\xC4\xB7" => "\xE5\xA7\x86",
+ "\xC4\xB8" => "\xE6\xAF\x8D",
+ "\xC4\xB9" => "\xE5\xA2\x93",
+ "\xC4\xBA" => "\xE6\x9A\xAE",
+ "\xC4\xBB" => "\xE5\xB9\x95",
+ "\xC4\xBC" => "\xE5\x8B\x9F",
+ "\xC4\xBD" => "\xE6\x85\x95",
+ "\xC4\xBE" => "\xE6\x9C\xA8",
+ "\xC4\xBF" => "\xE7\x9B\xAE",
+ "\xC4\xC0" => "\xE7\x9D\xA6",
+ "\xC4\xC1" => "\xE7\x89\xA7",
+ "\xC4\xC2" => "\xE7\xA9\x86",
+ "\xC4\xC3" => "\xE6\x8B\xBF",
+ "\xC4\xC4" => "\xE5\x93\xAA",
+ "\xC4\xC5" => "\xE5\x91\x90",
+ "\xC4\xC6" => "\xE9\x92\xA0",
+ "\xC4\xC7" => "\xE9\x82\xA3",
+ "\xC4\xC8" => "\xE5\xA8\x9C",
+ "\xC4\xC9" => "\xE7\xBA\xB3",
+ "\xC4\xCA" => "\xE6\xB0\x96",
+ "\xC4\xCB" => "\xE4\xB9\x83",
+ "\xC4\xCC" => "\xE5\xA5\xB6",
+ "\xC4\xCD" => "\xE8\x80\x90",
+ "\xC4\xCE" => "\xE5\xA5\x88",
+ "\xC4\xCF" => "\xE5\x8D\x97",
+ "\xC4\xD0" => "\xE7\x94\xB7",
+ "\xC4\xD1" => "\xE9\x9A\xBE",
+ "\xC4\xD2" => "\xE5\x9B\x8A",
+ "\xC4\xD3" => "\xE6\x8C\xA0",
+ "\xC4\xD4" => "\xE8\x84\x91",
+ "\xC4\xD5" => "\xE6\x81\xBC",
+ "\xC4\xD6" => "\xE9\x97\xB9",
+ "\xC4\xD7" => "\xE6\xB7\x96",
+ "\xC4\xD8" => "\xE5\x91\xA2",
+ "\xC4\xD9" => "\xE9\xA6\x81",
+ "\xC4\xDA" => "\xE5\x86\x85",
+ "\xC4\xDB" => "\xE5\xAB\xA9",
+ "\xC4\xDC" => "\xE8\x83\xBD",
+ "\xC4\xDD" => "\xE5\xA6\xAE",
+ "\xC4\xDE" => "\xE9\x9C\x93",
+ "\xC4\xDF" => "\xE5\x80\xAA",
+ "\xC4\xE0" => "\xE6\xB3\xA5",
+ "\xC4\xE1" => "\xE5\xB0\xBC",
+ "\xC4\xE2" => "\xE6\x8B\x9F",
+ "\xC4\xE3" => "\xE4\xBD\xA0",
+ "\xC4\xE4" => "\xE5\x8C\xBF",
+ "\xC4\xE5" => "\xE8\x85\xBB",
+ "\xC4\xE6" => "\xE9\x80\x86",
+ "\xC4\xE7" => "\xE6\xBA\xBA",
+ "\xC4\xE8" => "\xE8\x94\xAB",
+ "\xC4\xE9" => "\xE6\x8B\x88",
+ "\xC4\xEA" => "\xE5\xB9\xB4",
+ "\xC4\xEB" => "\xE7\xA2\xBE",
+ "\xC4\xEC" => "\xE6\x92\xB5",
+ "\xC4\xED" => "\xE6\x8D\xBB",
+ "\xC4\xEE" => "\xE5\xBF\xB5",
+ "\xC4\xEF" => "\xE5\xA8\x98",
+ "\xC4\xF0" => "\xE9\x85\xBF",
+ "\xC4\xF1" => "\xE9\xB8\x9F",
+ "\xC4\xF2" => "\xE5\xB0\xBF",
+ "\xC4\xF3" => "\xE6\x8D\x8F",
+ "\xC4\xF4" => "\xE8\x81\x82",
+ "\xC4\xF5" => "\xE5\xAD\xBD",
+ "\xC4\xF6" => "\xE5\x95\xAE",
+ "\xC4\xF7" => "\xE9\x95\x8A",
+ "\xC4\xF8" => "\xE9\x95\x8D",
+ "\xC4\xF9" => "\xE6\xB6\x85",
+ "\xC4\xFA" => "\xE6\x82\xA8",
+ "\xC4\xFB" => "\xE6\x9F\xA0",
+ "\xC4\xFC" => "\xE7\x8B\x9E",
+ "\xC4\xFD" => "\xE5\x87\x9D",
+ "\xC4\xFE" => "\xE5\xAE\x81",
+ "\xC5\xA1" => "\xE6\x8B\xA7",
+ "\xC5\xA2" => "\xE6\xB3\x9E",
+ "\xC5\xA3" => "\xE7\x89\x9B",
+ "\xC5\xA4" => "\xE6\x89\xAD",
+ "\xC5\xA5" => "\xE9\x92\xAE",
+ "\xC5\xA6" => "\xE7\xBA\xBD",
+ "\xC5\xA7" => "\xE8\x84\x93",
+ "\xC5\xA8" => "\xE6\xB5\x93",
+ "\xC5\xA9" => "\xE5\x86\x9C",
+ "\xC5\xAA" => "\xE5\xBC\x84",
+ "\xC5\xAB" => "\xE5\xA5\xB4",
+ "\xC5\xAC" => "\xE5\x8A\xAA",
+ "\xC5\xAD" => "\xE6\x80\x92",
+ "\xC5\xAE" => "\xE5\xA5\xB3",
+ "\xC5\xAF" => "\xE6\x9A\x96",
+ "\xC5\xB0" => "\xE8\x99\x90",
+ "\xC5\xB1" => "\xE7\x96\x9F",
+ "\xC5\xB2" => "\xE6\x8C\xAA",
+ "\xC5\xB3" => "\xE6\x87\xA6",
+ "\xC5\xB4" => "\xE7\xB3\xAF",
+ "\xC5\xB5" => "\xE8\xAF\xBA",
+ "\xC5\xB6" => "\xE5\x93\xA6",
+ "\xC5\xB7" => "\xE6\xAC\xA7",
+ "\xC5\xB8" => "\xE9\xB8\xA5",
+ "\xC5\xB9" => "\xE6\xAE\xB4",
+ "\xC5\xBA" => "\xE8\x97\x95",
+ "\xC5\xBB" => "\xE5\x91\x95",
+ "\xC5\xBC" => "\xE5\x81\xB6",
+ "\xC5\xBD" => "\xE6\xB2\xA4",
+ "\xC5\xBE" => "\xE5\x95\xAA",
+ "\xC5\xBF" => "\xE8\xB6\xB4",
+ "\xC5\xC0" => "\xE7\x88\xAC",
+ "\xC5\xC1" => "\xE5\xB8\x95",
+ "\xC5\xC2" => "\xE6\x80\x95",
+ "\xC5\xC3" => "\xE7\x90\xB6",
+ "\xC5\xC4" => "\xE6\x8B\x8D",
+ "\xC5\xC5" => "\xE6\x8E\x92",
+ "\xC5\xC6" => "\xE7\x89\x8C",
+ "\xC5\xC7" => "\xE5\xBE\x98",
+ "\xC5\xC8" => "\xE6\xB9\x83",
+ "\xC5\xC9" => "\xE6\xB4\xBE",
+ "\xC5\xCA" => "\xE6\x94\x80",
+ "\xC5\xCB" => "\xE6\xBD\x98",
+ "\xC5\xCC" => "\xE7\x9B\x98",
+ "\xC5\xCD" => "\xE7\xA3\x90",
+ "\xC5\xCE" => "\xE7\x9B\xBC",
+ "\xC5\xCF" => "\xE7\x95\x94",
+ "\xC5\xD0" => "\xE5\x88\xA4",
+ "\xC5\xD1" => "\xE5\x8F\x9B",
+ "\xC5\xD2" => "\xE4\xB9\x93",
+ "\xC5\xD3" => "\xE5\xBA\x9E",
+ "\xC5\xD4" => "\xE6\x97\x81",
+ "\xC5\xD5" => "\xE8\x80\xAA",
+ "\xC5\xD6" => "\xE8\x83\x96",
+ "\xC5\xD7" => "\xE6\x8A\x9B",
+ "\xC5\xD8" => "\xE5\x92\x86",
+ "\xC5\xD9" => "\xE5\x88\xA8",
+ "\xC5\xDA" => "\xE7\x82\xAE",
+ "\xC5\xDB" => "\xE8\xA2\x8D",
+ "\xC5\xDC" => "\xE8\xB7\x91",
+ "\xC5\xDD" => "\xE6\xB3\xA1",
+ "\xC5\xDE" => "\xE5\x91\xB8",
+ "\xC5\xDF" => "\xE8\x83\x9A",
+ "\xC5\xE0" => "\xE5\x9F\xB9",
+ "\xC5\xE1" => "\xE8\xA3\xB4",
+ "\xC5\xE2" => "\xE8\xB5\x94",
+ "\xC5\xE3" => "\xE9\x99\xAA",
+ "\xC5\xE4" => "\xE9\x85\x8D",
+ "\xC5\xE5" => "\xE4\xBD\xA9",
+ "\xC5\xE6" => "\xE6\xB2\x9B",
+ "\xC5\xE7" => "\xE5\x96\xB7",
+ "\xC5\xE8" => "\xE7\x9B\x86",
+ "\xC5\xE9" => "\xE7\xA0\xB0",
+ "\xC5\xEA" => "\xE6\x8A\xA8",
+ "\xC5\xEB" => "\xE7\x83\xB9",
+ "\xC5\xEC" => "\xE6\xBE\x8E",
+ "\xC5\xED" => "\xE5\xBD\xAD",
+ "\xC5\xEE" => "\xE8\x93\xAC",
+ "\xC5\xEF" => "\xE6\xA3\x9A",
+ "\xC5\xF0" => "\xE7\xA1\xBC",
+ "\xC5\xF1" => "\xE7\xAF\xB7",
+ "\xC5\xF2" => "\xE8\x86\xA8",
+ "\xC5\xF3" => "\xE6\x9C\x8B",
+ "\xC5\xF4" => "\xE9\xB9\x8F",
+ "\xC5\xF5" => "\xE6\x8D\xA7",
+ "\xC5\xF6" => "\xE7\xA2\xB0",
+ "\xC5\xF7" => "\xE5\x9D\xAF",
+ "\xC5\xF8" => "\xE7\xA0\x92",
+ "\xC5\xF9" => "\xE9\x9C\xB9",
+ "\xC5\xFA" => "\xE6\x89\xB9",
+ "\xC5\xFB" => "\xE6\x8A\xAB",
+ "\xC5\xFC" => "\xE5\x8A\x88",
+ "\xC5\xFD" => "\xE7\x90\xB5",
+ "\xC5\xFE" => "\xE6\xAF\x97",
+ "\xC6\xA1" => "\xE5\x95\xA4",
+ "\xC6\xA2" => "\xE8\x84\xBE",
+ "\xC6\xA3" => "\xE7\x96\xB2",
+ "\xC6\xA4" => "\xE7\x9A\xAE",
+ "\xC6\xA5" => "\xE5\x8C\xB9",
+ "\xC6\xA6" => "\xE7\x97\x9E",
+ "\xC6\xA7" => "\xE5\x83\xBB",
+ "\xC6\xA8" => "\xE5\xB1\x81",
+ "\xC6\xA9" => "\xE8\xAD\xAC",
+ "\xC6\xAA" => "\xE7\xAF\x87",
+ "\xC6\xAB" => "\xE5\x81\x8F",
+ "\xC6\xAC" => "\xE7\x89\x87",
+ "\xC6\xAD" => "\xE9\xAA\x97",
+ "\xC6\xAE" => "\xE9\xA3\x98",
+ "\xC6\xAF" => "\xE6\xBC\x82",
+ "\xC6\xB0" => "\xE7\x93\xA2",
+ "\xC6\xB1" => "\xE7\xA5\xA8",
+ "\xC6\xB2" => "\xE6\x92\x87",
+ "\xC6\xB3" => "\xE7\x9E\xA5",
+ "\xC6\xB4" => "\xE6\x8B\xBC",
+ "\xC6\xB5" => "\xE9\xA2\x91",
+ "\xC6\xB6" => "\xE8\xB4\xAB",
+ "\xC6\xB7" => "\xE5\x93\x81",
+ "\xC6\xB8" => "\xE8\x81\x98",
+ "\xC6\xB9" => "\xE4\xB9\x92",
+ "\xC6\xBA" => "\xE5\x9D\xAA",
+ "\xC6\xBB" => "\xE8\x8B\xB9",
+ "\xC6\xBC" => "\xE8\x90\x8D",
+ "\xC6\xBD" => "\xE5\xB9\xB3",
+ "\xC6\xBE" => "\xE5\x87\xAD",
+ "\xC6\xBF" => "\xE7\x93\xB6",
+ "\xC6\xC0" => "\xE8\xAF\x84",
+ "\xC6\xC1" => "\xE5\xB1\x8F",
+ "\xC6\xC2" => "\xE5\x9D\xA1",
+ "\xC6\xC3" => "\xE6\xB3\xBC",
+ "\xC6\xC4" => "\xE9\xA2\x87",
+ "\xC6\xC5" => "\xE5\xA9\x86",
+ "\xC6\xC6" => "\xE7\xA0\xB4",
+ "\xC6\xC7" => "\xE9\xAD\x84",
+ "\xC6\xC8" => "\xE8\xBF\xAB",
+ "\xC6\xC9" => "\xE7\xB2\x95",
+ "\xC6\xCA" => "\xE5\x89\x96",
+ "\xC6\xCB" => "\xE6\x89\x91",
+ "\xC6\xCC" => "\xE9\x93\xBA",
+ "\xC6\xCD" => "\xE4\xBB\x86",
+ "\xC6\xCE" => "\xE8\x8E\x86",
+ "\xC6\xCF" => "\xE8\x91\xA1",
+ "\xC6\xD0" => "\xE8\x8F\xA9",
+ "\xC6\xD1" => "\xE8\x92\xB2",
+ "\xC6\xD2" => "\xE5\x9F\x94",
+ "\xC6\xD3" => "\xE6\x9C\xB4",
+ "\xC6\xD4" => "\xE5\x9C\x83",
+ "\xC6\xD5" => "\xE6\x99\xAE",
+ "\xC6\xD6" => "\xE6\xB5\xA6",
+ "\xC6\xD7" => "\xE8\xB0\xB1",
+ "\xC6\xD8" => "\xE6\x9B\x9D",
+ "\xC6\xD9" => "\xE7\x80\x91",
+ "\xC6\xDA" => "\xE6\x9C\x9F",
+ "\xC6\xDB" => "\xE6\xAC\xBA",
+ "\xC6\xDC" => "\xE6\xA0\x96",
+ "\xC6\xDD" => "\xE6\x88\x9A",
+ "\xC6\xDE" => "\xE5\xA6\xBB",
+ "\xC6\xDF" => "\xE4\xB8\x83",
+ "\xC6\xE0" => "\xE5\x87\x84",
+ "\xC6\xE1" => "\xE6\xBC\x86",
+ "\xC6\xE2" => "\xE6\x9F\x92",
+ "\xC6\xE3" => "\xE6\xB2\x8F",
+ "\xC6\xE4" => "\xE5\x85\xB6",
+ "\xC6\xE5" => "\xE6\xA3\x8B",
+ "\xC6\xE6" => "\xE5\xA5\x87",
+ "\xC6\xE7" => "\xE6\xAD\xA7",
+ "\xC6\xE8" => "\xE7\x95\xA6",
+ "\xC6\xE9" => "\xE5\xB4\x8E",
+ "\xC6\xEA" => "\xE8\x84\x90",
+ "\xC6\xEB" => "\xE9\xBD\x90",
+ "\xC6\xEC" => "\xE6\x97\x97",
+ "\xC6\xED" => "\xE7\xA5\x88",
+ "\xC6\xEE" => "\xE7\xA5\x81",
+ "\xC6\xEF" => "\xE9\xAA\x91",
+ "\xC6\xF0" => "\xE8\xB5\xB7",
+ "\xC6\xF1" => "\xE5\xB2\x82",
+ "\xC6\xF2" => "\xE4\xB9\x9E",
+ "\xC6\xF3" => "\xE4\xBC\x81",
+ "\xC6\xF4" => "\xE5\x90\xAF",
+ "\xC6\xF5" => "\xE5\xA5\x91",
+ "\xC6\xF6" => "\xE7\xA0\x8C",
+ "\xC6\xF7" => "\xE5\x99\xA8",
+ "\xC6\xF8" => "\xE6\xB0\x94",
+ "\xC6\xF9" => "\xE8\xBF\x84",
+ "\xC6\xFA" => "\xE5\xBC\x83",
+ "\xC6\xFB" => "\xE6\xB1\xBD",
+ "\xC6\xFC" => "\xE6\xB3\xA3",
+ "\xC6\xFD" => "\xE8\xAE\xAB",
+ "\xC6\xFE" => "\xE6\x8E\x90",
+ "\xC7\xA1" => "\xE6\x81\xB0",
+ "\xC7\xA2" => "\xE6\xB4\xBD",
+ "\xC7\xA3" => "\xE7\x89\xB5",
+ "\xC7\xA4" => "\xE6\x89\xA6",
+ "\xC7\xA5" => "\xE9\x92\x8E",
+ "\xC7\xA6" => "\xE9\x93\x85",
+ "\xC7\xA7" => "\xE5\x8D\x83",
+ "\xC7\xA8" => "\xE8\xBF\x81",
+ "\xC7\xA9" => "\xE7\xAD\xBE",
+ "\xC7\xAA" => "\xE4\xBB\x9F",
+ "\xC7\xAB" => "\xE8\xB0\xA6",
+ "\xC7\xAC" => "\xE4\xB9\xBE",
+ "\xC7\xAD" => "\xE9\xBB\x94",
+ "\xC7\xAE" => "\xE9\x92\xB1",
+ "\xC7\xAF" => "\xE9\x92\xB3",
+ "\xC7\xB0" => "\xE5\x89\x8D",
+ "\xC7\xB1" => "\xE6\xBD\x9C",
+ "\xC7\xB2" => "\xE9\x81\xA3",
+ "\xC7\xB3" => "\xE6\xB5\x85",
+ "\xC7\xB4" => "\xE8\xB0\xB4",
+ "\xC7\xB5" => "\xE5\xA0\x91",
+ "\xC7\xB6" => "\xE5\xB5\x8C",
+ "\xC7\xB7" => "\xE6\xAC\xA0",
+ "\xC7\xB8" => "\xE6\xAD\x89",
+ "\xC7\xB9" => "\xE6\x9E\xAA",
+ "\xC7\xBA" => "\xE5\x91\x9B",
+ "\xC7\xBB" => "\xE8\x85\x94",
+ "\xC7\xBC" => "\xE7\xBE\x8C",
+ "\xC7\xBD" => "\xE5\xA2\x99",
+ "\xC7\xBE" => "\xE8\x94\xB7",
+ "\xC7\xBF" => "\xE5\xBC\xBA",
+ "\xC7\xC0" => "\xE6\x8A\xA2",
+ "\xC7\xC1" => "\xE6\xA9\x87",
+ "\xC7\xC2" => "\xE9\x94\xB9",
+ "\xC7\xC3" => "\xE6\x95\xB2",
+ "\xC7\xC4" => "\xE6\x82\x84",
+ "\xC7\xC5" => "\xE6\xA1\xA5",
+ "\xC7\xC6" => "\xE7\x9E\xA7",
+ "\xC7\xC7" => "\xE4\xB9\x94",
+ "\xC7\xC8" => "\xE4\xBE\xA8",
+ "\xC7\xC9" => "\xE5\xB7\xA7",
+ "\xC7\xCA" => "\xE9\x9E\x98",
+ "\xC7\xCB" => "\xE6\x92\xAC",
+ "\xC7\xCC" => "\xE7\xBF\x98",
+ "\xC7\xCD" => "\xE5\xB3\xAD",
+ "\xC7\xCE" => "\xE4\xBF\x8F",
+ "\xC7\xCF" => "\xE7\xAA\x8D",
+ "\xC7\xD0" => "\xE5\x88\x87",
+ "\xC7\xD1" => "\xE8\x8C\x84",
+ "\xC7\xD2" => "\xE4\xB8\x94",
+ "\xC7\xD3" => "\xE6\x80\xAF",
+ "\xC7\xD4" => "\xE7\xAA\x83",
+ "\xC7\xD5" => "\xE9\x92\xA6",
+ "\xC7\xD6" => "\xE4\xBE\xB5",
+ "\xC7\xD7" => "\xE4\xBA\xB2",
+ "\xC7\xD8" => "\xE7\xA7\xA6",
+ "\xC7\xD9" => "\xE7\x90\xB4",
+ "\xC7\xDA" => "\xE5\x8B\xA4",
+ "\xC7\xDB" => "\xE8\x8A\xB9",
+ "\xC7\xDC" => "\xE6\x93\x92",
+ "\xC7\xDD" => "\xE7\xA6\xBD",
+ "\xC7\xDE" => "\xE5\xAF\x9D",
+ "\xC7\xDF" => "\xE6\xB2\x81",
+ "\xC7\xE0" => "\xE9\x9D\x92",
+ "\xC7\xE1" => "\xE8\xBD\xBB",
+ "\xC7\xE2" => "\xE6\xB0\xA2",
+ "\xC7\xE3" => "\xE5\x80\xBE",
+ "\xC7\xE4" => "\xE5\x8D\xBF",
+ "\xC7\xE5" => "\xE6\xB8\x85",
+ "\xC7\xE6" => "\xE6\x93\x8E",
+ "\xC7\xE7" => "\xE6\x99\xB4",
+ "\xC7\xE8" => "\xE6\xB0\xB0",
+ "\xC7\xE9" => "\xE6\x83\x85",
+ "\xC7\xEA" => "\xE9\xA1\xB7",
+ "\xC7\xEB" => "\xE8\xAF\xB7",
+ "\xC7\xEC" => "\xE5\xBA\x86",
+ "\xC7\xED" => "\xE7\x90\xBC",
+ "\xC7\xEE" => "\xE7\xA9\xB7",
+ "\xC7\xEF" => "\xE7\xA7\x8B",
+ "\xC7\xF0" => "\xE4\xB8\x98",
+ "\xC7\xF1" => "\xE9\x82\xB1",
+ "\xC7\xF2" => "\xE7\x90\x83",
+ "\xC7\xF3" => "\xE6\xB1\x82",
+ "\xC7\xF4" => "\xE5\x9B\x9A",
+ "\xC7\xF5" => "\xE9\x85\x8B",
+ "\xC7\xF6" => "\xE6\xB3\x85",
+ "\xC7\xF7" => "\xE8\xB6\x8B",
+ "\xC7\xF8" => "\xE5\x8C\xBA",
+ "\xC7\xF9" => "\xE8\x9B\x86",
+ "\xC7\xFA" => "\xE6\x9B\xB2",
+ "\xC7\xFB" => "\xE8\xBA\xAF",
+ "\xC7\xFC" => "\xE5\xB1\x88",
+ "\xC7\xFD" => "\xE9\xA9\xB1",
+ "\xC7\xFE" => "\xE6\xB8\xA0",
+ "\xC8\xA1" => "\xE5\x8F\x96",
+ "\xC8\xA2" => "\xE5\xA8\xB6",
+ "\xC8\xA3" => "\xE9\xBE\x8B",
+ "\xC8\xA4" => "\xE8\xB6\xA3",
+ "\xC8\xA5" => "\xE5\x8E\xBB",
+ "\xC8\xA6" => "\xE5\x9C\x88",
+ "\xC8\xA7" => "\xE9\xA2\xA7",
+ "\xC8\xA8" => "\xE6\x9D\x83",
+ "\xC8\xA9" => "\xE9\x86\x9B",
+ "\xC8\xAA" => "\xE6\xB3\x89",
+ "\xC8\xAB" => "\xE5\x85\xA8",
+ "\xC8\xAC" => "\xE7\x97\x8A",
+ "\xC8\xAD" => "\xE6\x8B\xB3",
+ "\xC8\xAE" => "\xE7\x8A\xAC",
+ "\xC8\xAF" => "\xE5\x88\xB8",
+ "\xC8\xB0" => "\xE5\x8A\x9D",
+ "\xC8\xB1" => "\xE7\xBC\xBA",
+ "\xC8\xB2" => "\xE7\x82\x94",
+ "\xC8\xB3" => "\xE7\x98\xB8",
+ "\xC8\xB4" => "\xE5\x8D\xB4",
+ "\xC8\xB5" => "\xE9\xB9\x8A",
+ "\xC8\xB6" => "\xE6\xA6\xB7",
+ "\xC8\xB7" => "\xE7\xA1\xAE",
+ "\xC8\xB8" => "\xE9\x9B\x80",
+ "\xC8\xB9" => "\xE8\xA3\x99",
+ "\xC8\xBA" => "\xE7\xBE\xA4",
+ "\xC8\xBB" => "\xE7\x84\xB6",
+ "\xC8\xBC" => "\xE7\x87\x83",
+ "\xC8\xBD" => "\xE5\x86\x89",
+ "\xC8\xBE" => "\xE6\x9F\x93",
+ "\xC8\xBF" => "\xE7\x93\xA4",
+ "\xC8\xC0" => "\xE5\xA3\xA4",
+ "\xC8\xC1" => "\xE6\x94\x98",
+ "\xC8\xC2" => "\xE5\x9A\xB7",
+ "\xC8\xC3" => "\xE8\xAE\xA9",
+ "\xC8\xC4" => "\xE9\xA5\xB6",
+ "\xC8\xC5" => "\xE6\x89\xB0",
+ "\xC8\xC6" => "\xE7\xBB\x95",
+ "\xC8\xC7" => "\xE6\x83\xB9",
+ "\xC8\xC8" => "\xE7\x83\xAD",
+ "\xC8\xC9" => "\xE5\xA3\xAC",
+ "\xC8\xCA" => "\xE4\xBB\x81",
+ "\xC8\xCB" => "\xE4\xBA\xBA",
+ "\xC8\xCC" => "\xE5\xBF\x8D",
+ "\xC8\xCD" => "\xE9\x9F\xA7",
+ "\xC8\xCE" => "\xE4\xBB\xBB",
+ "\xC8\xCF" => "\xE8\xAE\xA4",
+ "\xC8\xD0" => "\xE5\x88\x83",
+ "\xC8\xD1" => "\xE5\xA6\x8A",
+ "\xC8\xD2" => "\xE7\xBA\xAB",
+ "\xC8\xD3" => "\xE6\x89\x94",
+ "\xC8\xD4" => "\xE4\xBB\x8D",
+ "\xC8\xD5" => "\xE6\x97\xA5",
+ "\xC8\xD6" => "\xE6\x88\x8E",
+ "\xC8\xD7" => "\xE8\x8C\xB8",
+ "\xC8\xD8" => "\xE8\x93\x89",
+ "\xC8\xD9" => "\xE8\x8D\xA3",
+ "\xC8\xDA" => "\xE8\x9E\x8D",
+ "\xC8\xDB" => "\xE7\x86\x94",
+ "\xC8\xDC" => "\xE6\xBA\xB6",
+ "\xC8\xDD" => "\xE5\xAE\xB9",
+ "\xC8\xDE" => "\xE7\xBB\x92",
+ "\xC8\xDF" => "\xE5\x86\x97",
+ "\xC8\xE0" => "\xE6\x8F\x89",
+ "\xC8\xE1" => "\xE6\x9F\x94",
+ "\xC8\xE2" => "\xE8\x82\x89",
+ "\xC8\xE3" => "\xE8\x8C\xB9",
+ "\xC8\xE4" => "\xE8\xA0\x95",
+ "\xC8\xE5" => "\xE5\x84\x92",
+ "\xC8\xE6" => "\xE5\xAD\xBA",
+ "\xC8\xE7" => "\xE5\xA6\x82",
+ "\xC8\xE8" => "\xE8\xBE\xB1",
+ "\xC8\xE9" => "\xE4\xB9\xB3",
+ "\xC8\xEA" => "\xE6\xB1\x9D",
+ "\xC8\xEB" => "\xE5\x85\xA5",
+ "\xC8\xEC" => "\xE8\xA4\xA5",
+ "\xC8\xED" => "\xE8\xBD\xAF",
+ "\xC8\xEE" => "\xE9\x98\xAE",
+ "\xC8\xEF" => "\xE8\x95\x8A",
+ "\xC8\xF0" => "\xE7\x91\x9E",
+ "\xC8\xF1" => "\xE9\x94\x90",
+ "\xC8\xF2" => "\xE9\x97\xB0",
+ "\xC8\xF3" => "\xE6\xB6\xA6",
+ "\xC8\xF4" => "\xE8\x8B\xA5",
+ "\xC8\xF5" => "\xE5\xBC\xB1",
+ "\xC8\xF6" => "\xE6\x92\x92",
+ "\xC8\xF7" => "\xE6\xB4\x92",
+ "\xC8\xF8" => "\xE8\x90\xA8",
+ "\xC8\xF9" => "\xE8\x85\xAE",
+ "\xC8\xFA" => "\xE9\xB3\x83",
+ "\xC8\xFB" => "\xE5\xA1\x9E",
+ "\xC8\xFC" => "\xE8\xB5\x9B",
+ "\xC8\xFD" => "\xE4\xB8\x89",
+ "\xC8\xFE" => "\xE5\x8F\x81",
+ "\xC9\xA1" => "\xE4\xBC\x9E",
+ "\xC9\xA2" => "\xE6\x95\xA3",
+ "\xC9\xA3" => "\xE6\xA1\x91",
+ "\xC9\xA4" => "\xE5\x97\x93",
+ "\xC9\xA5" => "\xE4\xB8\xA7",
+ "\xC9\xA6" => "\xE6\x90\x94",
+ "\xC9\xA7" => "\xE9\xAA\x9A",
+ "\xC9\xA8" => "\xE6\x89\xAB",
+ "\xC9\xA9" => "\xE5\xAB\x82",
+ "\xC9\xAA" => "\xE7\x91\x9F",
+ "\xC9\xAB" => "\xE8\x89\xB2",
+ "\xC9\xAC" => "\xE6\xB6\xA9",
+ "\xC9\xAD" => "\xE6\xA3\xAE",
+ "\xC9\xAE" => "\xE5\x83\xA7",
+ "\xC9\xAF" => "\xE8\x8E\x8E",
+ "\xC9\xB0" => "\xE7\xA0\x82",
+ "\xC9\xB1" => "\xE6\x9D\x80",
+ "\xC9\xB2" => "\xE5\x88\xB9",
+ "\xC9\xB3" => "\xE6\xB2\x99",
+ "\xC9\xB4" => "\xE7\xBA\xB1",
+ "\xC9\xB5" => "\xE5\x82\xBB",
+ "\xC9\xB6" => "\xE5\x95\xA5",
+ "\xC9\xB7" => "\xE7\x85\x9E",
+ "\xC9\xB8" => "\xE7\xAD\x9B",
+ "\xC9\xB9" => "\xE6\x99\x92",
+ "\xC9\xBA" => "\xE7\x8F\x8A",
+ "\xC9\xBB" => "\xE8\x8B\xAB",
+ "\xC9\xBC" => "\xE6\x9D\x89",
+ "\xC9\xBD" => "\xE5\xB1\xB1",
+ "\xC9\xBE" => "\xE5\x88\xA0",
+ "\xC9\xBF" => "\xE7\x85\xBD",
+ "\xC9\xC0" => "\xE8\xA1\xAB",
+ "\xC9\xC1" => "\xE9\x97\xAA",
+ "\xC9\xC2" => "\xE9\x99\x95",
+ "\xC9\xC3" => "\xE6\x93\x85",
+ "\xC9\xC4" => "\xE8\xB5\xA1",
+ "\xC9\xC5" => "\xE8\x86\xB3",
+ "\xC9\xC6" => "\xE5\x96\x84",
+ "\xC9\xC7" => "\xE6\xB1\x95",
+ "\xC9\xC8" => "\xE6\x89\x87",
+ "\xC9\xC9" => "\xE7\xBC\xAE",
+ "\xC9\xCA" => "\xE5\xA2\x92",
+ "\xC9\xCB" => "\xE4\xBC\xA4",
+ "\xC9\xCC" => "\xE5\x95\x86",
+ "\xC9\xCD" => "\xE8\xB5\x8F",
+ "\xC9\xCE" => "\xE6\x99\x8C",
+ "\xC9\xCF" => "\xE4\xB8\x8A",
+ "\xC9\xD0" => "\xE5\xB0\x9A",
+ "\xC9\xD1" => "\xE8\xA3\xB3",
+ "\xC9\xD2" => "\xE6\xA2\xA2",
+ "\xC9\xD3" => "\xE6\x8D\x8E",
+ "\xC9\xD4" => "\xE7\xA8\x8D",
+ "\xC9\xD5" => "\xE7\x83\xA7",
+ "\xC9\xD6" => "\xE8\x8A\x8D",
+ "\xC9\xD7" => "\xE5\x8B\xBA",
+ "\xC9\xD8" => "\xE9\x9F\xB6",
+ "\xC9\xD9" => "\xE5\xB0\x91",
+ "\xC9\xDA" => "\xE5\x93\xA8",
+ "\xC9\xDB" => "\xE9\x82\xB5",
+ "\xC9\xDC" => "\xE7\xBB\x8D",
+ "\xC9\xDD" => "\xE5\xA5\xA2",
+ "\xC9\xDE" => "\xE8\xB5\x8A",
+ "\xC9\xDF" => "\xE8\x9B\x87",
+ "\xC9\xE0" => "\xE8\x88\x8C",
+ "\xC9\xE1" => "\xE8\x88\x8D",
+ "\xC9\xE2" => "\xE8\xB5\xA6",
+ "\xC9\xE3" => "\xE6\x91\x84",
+ "\xC9\xE4" => "\xE5\xB0\x84",
+ "\xC9\xE5" => "\xE6\x85\x91",
+ "\xC9\xE6" => "\xE6\xB6\x89",
+ "\xC9\xE7" => "\xE7\xA4\xBE",
+ "\xC9\xE8" => "\xE8\xAE\xBE",
+ "\xC9\xE9" => "\xE7\xA0\xB7",
+ "\xC9\xEA" => "\xE7\x94\xB3",
+ "\xC9\xEB" => "\xE5\x91\xBB",
+ "\xC9\xEC" => "\xE4\xBC\xB8",
+ "\xC9\xED" => "\xE8\xBA\xAB",
+ "\xC9\xEE" => "\xE6\xB7\xB1",
+ "\xC9\xEF" => "\xE5\xA8\xA0",
+ "\xC9\xF0" => "\xE7\xBB\x85",
+ "\xC9\xF1" => "\xE7\xA5\x9E",
+ "\xC9\xF2" => "\xE6\xB2\x88",
+ "\xC9\xF3" => "\xE5\xAE\xA1",
+ "\xC9\xF4" => "\xE5\xA9\xB6",
+ "\xC9\xF5" => "\xE7\x94\x9A",
+ "\xC9\xF6" => "\xE8\x82\xBE",
+ "\xC9\xF7" => "\xE6\x85\x8E",
+ "\xC9\xF8" => "\xE6\xB8\x97",
+ "\xC9\xF9" => "\xE5\xA3\xB0",
+ "\xC9\xFA" => "\xE7\x94\x9F",
+ "\xC9\xFB" => "\xE7\x94\xA5",
+ "\xC9\xFC" => "\xE7\x89\xB2",
+ "\xC9\xFD" => "\xE5\x8D\x87",
+ "\xC9\xFE" => "\xE7\xBB\xB3",
+ "\xCA\xA1" => "\xE7\x9C\x81",
+ "\xCA\xA2" => "\xE7\x9B\x9B",
+ "\xCA\xA3" => "\xE5\x89\xA9",
+ "\xCA\xA4" => "\xE8\x83\x9C",
+ "\xCA\xA5" => "\xE5\x9C\xA3",
+ "\xCA\xA6" => "\xE5\xB8\x88",
+ "\xCA\xA7" => "\xE5\xA4\xB1",
+ "\xCA\xA8" => "\xE7\x8B\xAE",
+ "\xCA\xA9" => "\xE6\x96\xBD",
+ "\xCA\xAA" => "\xE6\xB9\xBF",
+ "\xCA\xAB" => "\xE8\xAF\x97",
+ "\xCA\xAC" => "\xE5\xB0\xB8",
+ "\xCA\xAD" => "\xE8\x99\xB1",
+ "\xCA\xAE" => "\xE5\x8D\x81",
+ "\xCA\xAF" => "\xE7\x9F\xB3",
+ "\xCA\xB0" => "\xE6\x8B\xBE",
+ "\xCA\xB1" => "\xE6\x97\xB6",
+ "\xCA\xB2" => "\xE4\xBB\x80",
+ "\xCA\xB3" => "\xE9\xA3\x9F",
+ "\xCA\xB4" => "\xE8\x9A\x80",
+ "\xCA\xB5" => "\xE5\xAE\x9E",
+ "\xCA\xB6" => "\xE8\xAF\x86",
+ "\xCA\xB7" => "\xE5\x8F\xB2",
+ "\xCA\xB8" => "\xE7\x9F\xA2",
+ "\xCA\xB9" => "\xE4\xBD\xBF",
+ "\xCA\xBA" => "\xE5\xB1\x8E",
+ "\xCA\xBB" => "\xE9\xA9\xB6",
+ "\xCA\xBC" => "\xE5\xA7\x8B",
+ "\xCA\xBD" => "\xE5\xBC\x8F",
+ "\xCA\xBE" => "\xE7\xA4\xBA",
+ "\xCA\xBF" => "\xE5\xA3\xAB",
+ "\xCA\xC0" => "\xE4\xB8\x96",
+ "\xCA\xC1" => "\xE6\x9F\xBF",
+ "\xCA\xC2" => "\xE4\xBA\x8B",
+ "\xCA\xC3" => "\xE6\x8B\xAD",
+ "\xCA\xC4" => "\xE8\xAA\x93",
+ "\xCA\xC5" => "\xE9\x80\x9D",
+ "\xCA\xC6" => "\xE5\x8A\xBF",
+ "\xCA\xC7" => "\xE6\x98\xAF",
+ "\xCA\xC8" => "\xE5\x97\x9C",
+ "\xCA\xC9" => "\xE5\x99\xAC",
+ "\xCA\xCA" => "\xE9\x80\x82",
+ "\xCA\xCB" => "\xE4\xBB\x95",
+ "\xCA\xCC" => "\xE4\xBE\x8D",
+ "\xCA\xCD" => "\xE9\x87\x8A",
+ "\xCA\xCE" => "\xE9\xA5\xB0",
+ "\xCA\xCF" => "\xE6\xB0\x8F",
+ "\xCA\xD0" => "\xE5\xB8\x82",
+ "\xCA\xD1" => "\xE6\x81\x83",
+ "\xCA\xD2" => "\xE5\xAE\xA4",
+ "\xCA\xD3" => "\xE8\xA7\x86",
+ "\xCA\xD4" => "\xE8\xAF\x95",
+ "\xCA\xD5" => "\xE6\x94\xB6",
+ "\xCA\xD6" => "\xE6\x89\x8B",
+ "\xCA\xD7" => "\xE9\xA6\x96",
+ "\xCA\xD8" => "\xE5\xAE\x88",
+ "\xCA\xD9" => "\xE5\xAF\xBF",
+ "\xCA\xDA" => "\xE6\x8E\x88",
+ "\xCA\xDB" => "\xE5\x94\xAE",
+ "\xCA\xDC" => "\xE5\x8F\x97",
+ "\xCA\xDD" => "\xE7\x98\xA6",
+ "\xCA\xDE" => "\xE5\x85\xBD",
+ "\xCA\xDF" => "\xE8\x94\xAC",
+ "\xCA\xE0" => "\xE6\x9E\xA2",
+ "\xCA\xE1" => "\xE6\xA2\xB3",
+ "\xCA\xE2" => "\xE6\xAE\x8A",
+ "\xCA\xE3" => "\xE6\x8A\x92",
+ "\xCA\xE4" => "\xE8\xBE\x93",
+ "\xCA\xE5" => "\xE5\x8F\x94",
+ "\xCA\xE6" => "\xE8\x88\x92",
+ "\xCA\xE7" => "\xE6\xB7\x91",
+ "\xCA\xE8" => "\xE7\x96\x8F",
+ "\xCA\xE9" => "\xE4\xB9\xA6",
+ "\xCA\xEA" => "\xE8\xB5\x8E",
+ "\xCA\xEB" => "\xE5\xAD\xB0",
+ "\xCA\xEC" => "\xE7\x86\x9F",
+ "\xCA\xED" => "\xE8\x96\xAF",
+ "\xCA\xEE" => "\xE6\x9A\x91",
+ "\xCA\xEF" => "\xE6\x9B\x99",
+ "\xCA\xF0" => "\xE7\xBD\xB2",
+ "\xCA\xF1" => "\xE8\x9C\x80",
+ "\xCA\xF2" => "\xE9\xBB\x8D",
+ "\xCA\xF3" => "\xE9\xBC\xA0",
+ "\xCA\xF4" => "\xE5\xB1\x9E",
+ "\xCA\xF5" => "\xE6\x9C\xAF",
+ "\xCA\xF6" => "\xE8\xBF\xB0",
+ "\xCA\xF7" => "\xE6\xA0\x91",
+ "\xCA\xF8" => "\xE6\x9D\x9F",
+ "\xCA\xF9" => "\xE6\x88\x8D",
+ "\xCA\xFA" => "\xE7\xAB\x96",
+ "\xCA\xFB" => "\xE5\xA2\x85",
+ "\xCA\xFC" => "\xE5\xBA\xB6",
+ "\xCA\xFD" => "\xE6\x95\xB0",
+ "\xCA\xFE" => "\xE6\xBC\xB1",
+ "\xCB\xA1" => "\xE6\x81\x95",
+ "\xCB\xA2" => "\xE5\x88\xB7",
+ "\xCB\xA3" => "\xE8\x80\x8D",
+ "\xCB\xA4" => "\xE6\x91\x94",
+ "\xCB\xA5" => "\xE8\xA1\xB0",
+ "\xCB\xA6" => "\xE7\x94\xA9",
+ "\xCB\xA7" => "\xE5\xB8\x85",
+ "\xCB\xA8" => "\xE6\xA0\x93",
+ "\xCB\xA9" => "\xE6\x8B\xB4",
+ "\xCB\xAA" => "\xE9\x9C\x9C",
+ "\xCB\xAB" => "\xE5\x8F\x8C",
+ "\xCB\xAC" => "\xE7\x88\xBD",
+ "\xCB\xAD" => "\xE8\xB0\x81",
+ "\xCB\xAE" => "\xE6\xB0\xB4",
+ "\xCB\xAF" => "\xE7\x9D\xA1",
+ "\xCB\xB0" => "\xE7\xA8\x8E",
+ "\xCB\xB1" => "\xE5\x90\xAE",
+ "\xCB\xB2" => "\xE7\x9E\xAC",
+ "\xCB\xB3" => "\xE9\xA1\xBA",
+ "\xCB\xB4" => "\xE8\x88\x9C",
+ "\xCB\xB5" => "\xE8\xAF\xB4",
+ "\xCB\xB6" => "\xE7\xA1\x95",
+ "\xCB\xB7" => "\xE6\x9C\x94",
+ "\xCB\xB8" => "\xE7\x83\x81",
+ "\xCB\xB9" => "\xE6\x96\xAF",
+ "\xCB\xBA" => "\xE6\x92\x95",
+ "\xCB\xBB" => "\xE5\x98\xB6",
+ "\xCB\xBC" => "\xE6\x80\x9D",
+ "\xCB\xBD" => "\xE7\xA7\x81",
+ "\xCB\xBE" => "\xE5\x8F\xB8",
+ "\xCB\xBF" => "\xE4\xB8\x9D",
+ "\xCB\xC0" => "\xE6\xAD\xBB",
+ "\xCB\xC1" => "\xE8\x82\x86",
+ "\xCB\xC2" => "\xE5\xAF\xBA",
+ "\xCB\xC3" => "\xE5\x97\xA3",
+ "\xCB\xC4" => "\xE5\x9B\x9B",
+ "\xCB\xC5" => "\xE4\xBC\xBA",
+ "\xCB\xC6" => "\xE4\xBC\xBC",
+ "\xCB\xC7" => "\xE9\xA5\xB2",
+ "\xCB\xC8" => "\xE5\xB7\xB3",
+ "\xCB\xC9" => "\xE6\x9D\xBE",
+ "\xCB\xCA" => "\xE8\x80\xB8",
+ "\xCB\xCB" => "\xE6\x80\x82",
+ "\xCB\xCC" => "\xE9\xA2\x82",
+ "\xCB\xCD" => "\xE9\x80\x81",
+ "\xCB\xCE" => "\xE5\xAE\x8B",
+ "\xCB\xCF" => "\xE8\xAE\xBC",
+ "\xCB\xD0" => "\xE8\xAF\xB5",
+ "\xCB\xD1" => "\xE6\x90\x9C",
+ "\xCB\xD2" => "\xE8\x89\x98",
+ "\xCB\xD3" => "\xE6\x93\x9E",
+ "\xCB\xD4" => "\xE5\x97\xBD",
+ "\xCB\xD5" => "\xE8\x8B\x8F",
+ "\xCB\xD6" => "\xE9\x85\xA5",
+ "\xCB\xD7" => "\xE4\xBF\x97",
+ "\xCB\xD8" => "\xE7\xB4\xA0",
+ "\xCB\xD9" => "\xE9\x80\x9F",
+ "\xCB\xDA" => "\xE7\xB2\x9F",
+ "\xCB\xDB" => "\xE5\x83\xB3",
+ "\xCB\xDC" => "\xE5\xA1\x91",
+ "\xCB\xDD" => "\xE6\xBA\xAF",
+ "\xCB\xDE" => "\xE5\xAE\xBF",
+ "\xCB\xDF" => "\xE8\xAF\x89",
+ "\xCB\xE0" => "\xE8\x82\x83",
+ "\xCB\xE1" => "\xE9\x85\xB8",
+ "\xCB\xE2" => "\xE8\x92\x9C",
+ "\xCB\xE3" => "\xE7\xAE\x97",
+ "\xCB\xE4" => "\xE8\x99\xBD",
+ "\xCB\xE5" => "\xE9\x9A\x8B",
+ "\xCB\xE6" => "\xE9\x9A\x8F",
+ "\xCB\xE7" => "\xE7\xBB\xA5",
+ "\xCB\xE8" => "\xE9\xAB\x93",
+ "\xCB\xE9" => "\xE7\xA2\x8E",
+ "\xCB\xEA" => "\xE5\xB2\x81",
+ "\xCB\xEB" => "\xE7\xA9\x97",
+ "\xCB\xEC" => "\xE9\x81\x82",
+ "\xCB\xED" => "\xE9\x9A\xA7",
+ "\xCB\xEE" => "\xE7\xA5\x9F",
+ "\xCB\xEF" => "\xE5\xAD\x99",
+ "\xCB\xF0" => "\xE6\x8D\x9F",
+ "\xCB\xF1" => "\xE7\xAC\x8B",
+ "\xCB\xF2" => "\xE8\x93\x91",
+ "\xCB\xF3" => "\xE6\xA2\xAD",
+ "\xCB\xF4" => "\xE5\x94\x86",
+ "\xCB\xF5" => "\xE7\xBC\xA9",
+ "\xCB\xF6" => "\xE7\x90\x90",
+ "\xCB\xF7" => "\xE7\xB4\xA2",
+ "\xCB\xF8" => "\xE9\x94\x81",
+ "\xCB\xF9" => "\xE6\x89\x80",
+ "\xCB\xFA" => "\xE5\xA1\x8C",
+ "\xCB\xFB" => "\xE4\xBB\x96",
+ "\xCB\xFC" => "\xE5\xAE\x83",
+ "\xCB\xFD" => "\xE5\xA5\xB9",
+ "\xCB\xFE" => "\xE5\xA1\x94",
+ "\xCC\xA1" => "\xE7\x8D\xAD",
+ "\xCC\xA2" => "\xE6\x8C\x9E",
+ "\xCC\xA3" => "\xE8\xB9\x8B",
+ "\xCC\xA4" => "\xE8\xB8\x8F",
+ "\xCC\xA5" => "\xE8\x83\x8E",
+ "\xCC\xA6" => "\xE8\x8B\x94",
+ "\xCC\xA7" => "\xE6\x8A\xAC",
+ "\xCC\xA8" => "\xE5\x8F\xB0",
+ "\xCC\xA9" => "\xE6\xB3\xB0",
+ "\xCC\xAA" => "\xE9\x85\x9E",
+ "\xCC\xAB" => "\xE5\xA4\xAA",
+ "\xCC\xAC" => "\xE6\x80\x81",
+ "\xCC\xAD" => "\xE6\xB1\xB0",
+ "\xCC\xAE" => "\xE5\x9D\x8D",
+ "\xCC\xAF" => "\xE6\x91\x8A",
+ "\xCC\xB0" => "\xE8\xB4\xAA",
+ "\xCC\xB1" => "\xE7\x98\xAB",
+ "\xCC\xB2" => "\xE6\xBB\xA9",
+ "\xCC\xB3" => "\xE5\x9D\x9B",
+ "\xCC\xB4" => "\xE6\xAA\x80",
+ "\xCC\xB5" => "\xE7\x97\xB0",
+ "\xCC\xB6" => "\xE6\xBD\xAD",
+ "\xCC\xB7" => "\xE8\xB0\xAD",
+ "\xCC\xB8" => "\xE8\xB0\x88",
+ "\xCC\xB9" => "\xE5\x9D\xA6",
+ "\xCC\xBA" => "\xE6\xAF\xAF",
+ "\xCC\xBB" => "\xE8\xA2\x92",
+ "\xCC\xBC" => "\xE7\xA2\xB3",
+ "\xCC\xBD" => "\xE6\x8E\xA2",
+ "\xCC\xBE" => "\xE5\x8F\xB9",
+ "\xCC\xBF" => "\xE7\x82\xAD",
+ "\xCC\xC0" => "\xE6\xB1\xA4",
+ "\xCC\xC1" => "\xE5\xA1\x98",
+ "\xCC\xC2" => "\xE6\x90\xAA",
+ "\xCC\xC3" => "\xE5\xA0\x82",
+ "\xCC\xC4" => "\xE6\xA3\xA0",
+ "\xCC\xC5" => "\xE8\x86\x9B",
+ "\xCC\xC6" => "\xE5\x94\x90",
+ "\xCC\xC7" => "\xE7\xB3\x96",
+ "\xCC\xC8" => "\xE5\x80\x98",
+ "\xCC\xC9" => "\xE8\xBA\xBA",
+ "\xCC\xCA" => "\xE6\xB7\x8C",
+ "\xCC\xCB" => "\xE8\xB6\x9F",
+ "\xCC\xCC" => "\xE7\x83\xAB",
+ "\xCC\xCD" => "\xE6\x8E\x8F",
+ "\xCC\xCE" => "\xE6\xB6\x9B",
+ "\xCC\xCF" => "\xE6\xBB\x94",
+ "\xCC\xD0" => "\xE7\xBB\xA6",
+ "\xCC\xD1" => "\xE8\x90\x84",
+ "\xCC\xD2" => "\xE6\xA1\x83",
+ "\xCC\xD3" => "\xE9\x80\x83",
+ "\xCC\xD4" => "\xE6\xB7\x98",
+ "\xCC\xD5" => "\xE9\x99\xB6",
+ "\xCC\xD6" => "\xE8\xAE\xA8",
+ "\xCC\xD7" => "\xE5\xA5\x97",
+ "\xCC\xD8" => "\xE7\x89\xB9",
+ "\xCC\xD9" => "\xE8\x97\xA4",
+ "\xCC\xDA" => "\xE8\x85\xBE",
+ "\xCC\xDB" => "\xE7\x96\xBC",
+ "\xCC\xDC" => "\xE8\xAA\x8A",
+ "\xCC\xDD" => "\xE6\xA2\xAF",
+ "\xCC\xDE" => "\xE5\x89\x94",
+ "\xCC\xDF" => "\xE8\xB8\xA2",
+ "\xCC\xE0" => "\xE9\x94\x91",
+ "\xCC\xE1" => "\xE6\x8F\x90",
+ "\xCC\xE2" => "\xE9\xA2\x98",
+ "\xCC\xE3" => "\xE8\xB9\x84",
+ "\xCC\xE4" => "\xE5\x95\xBC",
+ "\xCC\xE5" => "\xE4\xBD\x93",
+ "\xCC\xE6" => "\xE6\x9B\xBF",
+ "\xCC\xE7" => "\xE5\x9A\x8F",
+ "\xCC\xE8" => "\xE6\x83\x95",
+ "\xCC\xE9" => "\xE6\xB6\x95",
+ "\xCC\xEA" => "\xE5\x89\x83",
+ "\xCC\xEB" => "\xE5\xB1\x89",
+ "\xCC\xEC" => "\xE5\xA4\xA9",
+ "\xCC\xED" => "\xE6\xB7\xBB",
+ "\xCC\xEE" => "\xE5\xA1\xAB",
+ "\xCC\xEF" => "\xE7\x94\xB0",
+ "\xCC\xF0" => "\xE7\x94\x9C",
+ "\xCC\xF1" => "\xE6\x81\xAC",
+ "\xCC\xF2" => "\xE8\x88\x94",
+ "\xCC\xF3" => "\xE8\x85\x86",
+ "\xCC\xF4" => "\xE6\x8C\x91",
+ "\xCC\xF5" => "\xE6\x9D\xA1",
+ "\xCC\xF6" => "\xE8\xBF\xA2",
+ "\xCC\xF7" => "\xE7\x9C\xBA",
+ "\xCC\xF8" => "\xE8\xB7\xB3",
+ "\xCC\xF9" => "\xE8\xB4\xB4",
+ "\xCC\xFA" => "\xE9\x93\x81",
+ "\xCC\xFB" => "\xE5\xB8\x96",
+ "\xCC\xFC" => "\xE5\x8E\x85",
+ "\xCC\xFD" => "\xE5\x90\xAC",
+ "\xCC\xFE" => "\xE7\x83\x83",
+ "\xCD\xA1" => "\xE6\xB1\x80",
+ "\xCD\xA2" => "\xE5\xBB\xB7",
+ "\xCD\xA3" => "\xE5\x81\x9C",
+ "\xCD\xA4" => "\xE4\xBA\xAD",
+ "\xCD\xA5" => "\xE5\xBA\xAD",
+ "\xCD\xA6" => "\xE6\x8C\xBA",
+ "\xCD\xA7" => "\xE8\x89\x87",
+ "\xCD\xA8" => "\xE9\x80\x9A",
+ "\xCD\xA9" => "\xE6\xA1\x90",
+ "\xCD\xAA" => "\xE9\x85\xAE",
+ "\xCD\xAB" => "\xE7\x9E\xB3",
+ "\xCD\xAC" => "\xE5\x90\x8C",
+ "\xCD\xAD" => "\xE9\x93\x9C",
+ "\xCD\xAE" => "\xE5\xBD\xA4",
+ "\xCD\xAF" => "\xE7\xAB\xA5",
+ "\xCD\xB0" => "\xE6\xA1\xB6",
+ "\xCD\xB1" => "\xE6\x8D\x85",
+ "\xCD\xB2" => "\xE7\xAD\x92",
+ "\xCD\xB3" => "\xE7\xBB\x9F",
+ "\xCD\xB4" => "\xE7\x97\x9B",
+ "\xCD\xB5" => "\xE5\x81\xB7",
+ "\xCD\xB6" => "\xE6\x8A\x95",
+ "\xCD\xB7" => "\xE5\xA4\xB4",
+ "\xCD\xB8" => "\xE9\x80\x8F",
+ "\xCD\xB9" => "\xE5\x87\xB8",
+ "\xCD\xBA" => "\xE7\xA7\x83",
+ "\xCD\xBB" => "\xE7\xAA\x81",
+ "\xCD\xBC" => "\xE5\x9B\xBE",
+ "\xCD\xBD" => "\xE5\xBE\x92",
+ "\xCD\xBE" => "\xE9\x80\x94",
+ "\xCD\xBF" => "\xE6\xB6\x82",
+ "\xCD\xC0" => "\xE5\xB1\xA0",
+ "\xCD\xC1" => "\xE5\x9C\x9F",
+ "\xCD\xC2" => "\xE5\x90\x90",
+ "\xCD\xC3" => "\xE5\x85\x94",
+ "\xCD\xC4" => "\xE6\xB9\x8D",
+ "\xCD\xC5" => "\xE5\x9B\xA2",
+ "\xCD\xC6" => "\xE6\x8E\xA8",
+ "\xCD\xC7" => "\xE9\xA2\x93",
+ "\xCD\xC8" => "\xE8\x85\xBF",
+ "\xCD\xC9" => "\xE8\x9C\x95",
+ "\xCD\xCA" => "\xE8\xA4\xAA",
+ "\xCD\xCB" => "\xE9\x80\x80",
+ "\xCD\xCC" => "\xE5\x90\x9E",
+ "\xCD\xCD" => "\xE5\xB1\xAF",
+ "\xCD\xCE" => "\xE8\x87\x80",
+ "\xCD\xCF" => "\xE6\x8B\x96",
+ "\xCD\xD0" => "\xE6\x89\x98",
+ "\xCD\xD1" => "\xE8\x84\xB1",
+ "\xCD\xD2" => "\xE9\xB8\xB5",
+ "\xCD\xD3" => "\xE9\x99\x80",
+ "\xCD\xD4" => "\xE9\xA9\xAE",
+ "\xCD\xD5" => "\xE9\xA9\xBC",
+ "\xCD\xD6" => "\xE6\xA4\xAD",
+ "\xCD\xD7" => "\xE5\xA6\xA5",
+ "\xCD\xD8" => "\xE6\x8B\x93",
+ "\xCD\xD9" => "\xE5\x94\xBE",
+ "\xCD\xDA" => "\xE6\x8C\x96",
+ "\xCD\xDB" => "\xE5\x93\x87",
+ "\xCD\xDC" => "\xE8\x9B\x99",
+ "\xCD\xDD" => "\xE6\xB4\xBC",
+ "\xCD\xDE" => "\xE5\xA8\x83",
+ "\xCD\xDF" => "\xE7\x93\xA6",
+ "\xCD\xE0" => "\xE8\xA2\x9C",
+ "\xCD\xE1" => "\xE6\xAD\xAA",
+ "\xCD\xE2" => "\xE5\xA4\x96",
+ "\xCD\xE3" => "\xE8\xB1\x8C",
+ "\xCD\xE4" => "\xE5\xBC\xAF",
+ "\xCD\xE5" => "\xE6\xB9\xBE",
+ "\xCD\xE6" => "\xE7\x8E\xA9",
+ "\xCD\xE7" => "\xE9\xA1\xBD",
+ "\xCD\xE8" => "\xE4\xB8\xB8",
+ "\xCD\xE9" => "\xE7\x83\xB7",
+ "\xCD\xEA" => "\xE5\xAE\x8C",
+ "\xCD\xEB" => "\xE7\xA2\x97",
+ "\xCD\xEC" => "\xE6\x8C\xBD",
+ "\xCD\xED" => "\xE6\x99\x9A",
+ "\xCD\xEE" => "\xE7\x9A\x96",
+ "\xCD\xEF" => "\xE6\x83\x8B",
+ "\xCD\xF0" => "\xE5\xAE\x9B",
+ "\xCD\xF1" => "\xE5\xA9\x89",
+ "\xCD\xF2" => "\xE4\xB8\x87",
+ "\xCD\xF3" => "\xE8\x85\x95",
+ "\xCD\xF4" => "\xE6\xB1\xAA",
+ "\xCD\xF5" => "\xE7\x8E\x8B",
+ "\xCD\xF6" => "\xE4\xBA\xA1",
+ "\xCD\xF7" => "\xE6\x9E\x89",
+ "\xCD\xF8" => "\xE7\xBD\x91",
+ "\xCD\xF9" => "\xE5\xBE\x80",
+ "\xCD\xFA" => "\xE6\x97\xBA",
+ "\xCD\xFB" => "\xE6\x9C\x9B",
+ "\xCD\xFC" => "\xE5\xBF\x98",
+ "\xCD\xFD" => "\xE5\xA6\x84",
+ "\xCD\xFE" => "\xE5\xA8\x81",
+ "\xCE\xA1" => "\xE5\xB7\x8D",
+ "\xCE\xA2" => "\xE5\xBE\xAE",
+ "\xCE\xA3" => "\xE5\x8D\xB1",
+ "\xCE\xA4" => "\xE9\x9F\xA6",
+ "\xCE\xA5" => "\xE8\xBF\x9D",
+ "\xCE\xA6" => "\xE6\xA1\x85",
+ "\xCE\xA7" => "\xE5\x9B\xB4",
+ "\xCE\xA8" => "\xE5\x94\xAF",
+ "\xCE\xA9" => "\xE6\x83\x9F",
+ "\xCE\xAA" => "\xE4\xB8\xBA",
+ "\xCE\xAB" => "\xE6\xBD\x8D",
+ "\xCE\xAC" => "\xE7\xBB\xB4",
+ "\xCE\xAD" => "\xE8\x8B\x87",
+ "\xCE\xAE" => "\xE8\x90\x8E",
+ "\xCE\xAF" => "\xE5\xA7\x94",
+ "\xCE\xB0" => "\xE4\xBC\x9F",
+ "\xCE\xB1" => "\xE4\xBC\xAA",
+ "\xCE\xB2" => "\xE5\xB0\xBE",
+ "\xCE\xB3" => "\xE7\xBA\xAC",
+ "\xCE\xB4" => "\xE6\x9C\xAA",
+ "\xCE\xB5" => "\xE8\x94\x9A",
+ "\xCE\xB6" => "\xE5\x91\xB3",
+ "\xCE\xB7" => "\xE7\x95\x8F",
+ "\xCE\xB8" => "\xE8\x83\x83",
+ "\xCE\xB9" => "\xE5\x96\x82",
+ "\xCE\xBA" => "\xE9\xAD\x8F",
+ "\xCE\xBB" => "\xE4\xBD\x8D",
+ "\xCE\xBC" => "\xE6\xB8\xAD",
+ "\xCE\xBD" => "\xE8\xB0\x93",
+ "\xCE\xBE" => "\xE5\xB0\x89",
+ "\xCE\xBF" => "\xE6\x85\xB0",
+ "\xCE\xC0" => "\xE5\x8D\xAB",
+ "\xCE\xC1" => "\xE7\x98\x9F",
+ "\xCE\xC2" => "\xE6\xB8\xA9",
+ "\xCE\xC3" => "\xE8\x9A\x8A",
+ "\xCE\xC4" => "\xE6\x96\x87",
+ "\xCE\xC5" => "\xE9\x97\xBB",
+ "\xCE\xC6" => "\xE7\xBA\xB9",
+ "\xCE\xC7" => "\xE5\x90\xBB",
+ "\xCE\xC8" => "\xE7\xA8\xB3",
+ "\xCE\xC9" => "\xE7\xB4\x8A",
+ "\xCE\xCA" => "\xE9\x97\xAE",
+ "\xCE\xCB" => "\xE5\x97\xA1",
+ "\xCE\xCC" => "\xE7\xBF\x81",
+ "\xCE\xCD" => "\xE7\x93\xAE",
+ "\xCE\xCE" => "\xE6\x8C\x9D",
+ "\xCE\xCF" => "\xE8\x9C\x97",
+ "\xCE\xD0" => "\xE6\xB6\xA1",
+ "\xCE\xD1" => "\xE7\xAA\x9D",
+ "\xCE\xD2" => "\xE6\x88\x91",
+ "\xCE\xD3" => "\xE6\x96\xA1",
+ "\xCE\xD4" => "\xE5\x8D\xA7",
+ "\xCE\xD5" => "\xE6\x8F\xA1",
+ "\xCE\xD6" => "\xE6\xB2\x83",
+ "\xCE\xD7" => "\xE5\xB7\xAB",
+ "\xCE\xD8" => "\xE5\x91\x9C",
+ "\xCE\xD9" => "\xE9\x92\xA8",
+ "\xCE\xDA" => "\xE4\xB9\x8C",
+ "\xCE\xDB" => "\xE6\xB1\xA1",
+ "\xCE\xDC" => "\xE8\xAF\xAC",
+ "\xCE\xDD" => "\xE5\xB1\x8B",
+ "\xCE\xDE" => "\xE6\x97\xA0",
+ "\xCE\xDF" => "\xE8\x8A\x9C",
+ "\xCE\xE0" => "\xE6\xA2\xA7",
+ "\xCE\xE1" => "\xE5\x90\xBE",
+ "\xCE\xE2" => "\xE5\x90\xB4",
+ "\xCE\xE3" => "\xE6\xAF\x8B",
+ "\xCE\xE4" => "\xE6\xAD\xA6",
+ "\xCE\xE5" => "\xE4\xBA\x94",
+ "\xCE\xE6" => "\xE6\x8D\x82",
+ "\xCE\xE7" => "\xE5\x8D\x88",
+ "\xCE\xE8" => "\xE8\x88\x9E",
+ "\xCE\xE9" => "\xE4\xBC\x8D",
+ "\xCE\xEA" => "\xE4\xBE\xAE",
+ "\xCE\xEB" => "\xE5\x9D\x9E",
+ "\xCE\xEC" => "\xE6\x88\x8A",
+ "\xCE\xED" => "\xE9\x9B\xBE",
+ "\xCE\xEE" => "\xE6\x99\xA4",
+ "\xCE\xEF" => "\xE7\x89\xA9",
+ "\xCE\xF0" => "\xE5\x8B\xBF",
+ "\xCE\xF1" => "\xE5\x8A\xA1",
+ "\xCE\xF2" => "\xE6\x82\x9F",
+ "\xCE\xF3" => "\xE8\xAF\xAF",
+ "\xCE\xF4" => "\xE6\x98\x94",
+ "\xCE\xF5" => "\xE7\x86\x99",
+ "\xCE\xF6" => "\xE6\x9E\x90",
+ "\xCE\xF7" => "\xE8\xA5\xBF",
+ "\xCE\xF8" => "\xE7\xA1\x92",
+ "\xCE\xF9" => "\xE7\x9F\xBD",
+ "\xCE\xFA" => "\xE6\x99\xB0",
+ "\xCE\xFB" => "\xE5\x98\xBB",
+ "\xCE\xFC" => "\xE5\x90\xB8",
+ "\xCE\xFD" => "\xE9\x94\xA1",
+ "\xCE\xFE" => "\xE7\x89\xBA",
+ "\xCF\xA1" => "\xE7\xA8\x80",
+ "\xCF\xA2" => "\xE6\x81\xAF",
+ "\xCF\xA3" => "\xE5\xB8\x8C",
+ "\xCF\xA4" => "\xE6\x82\x89",
+ "\xCF\xA5" => "\xE8\x86\x9D",
+ "\xCF\xA6" => "\xE5\xA4\x95",
+ "\xCF\xA7" => "\xE6\x83\x9C",
+ "\xCF\xA8" => "\xE7\x86\x84",
+ "\xCF\xA9" => "\xE7\x83\xAF",
+ "\xCF\xAA" => "\xE6\xBA\xAA",
+ "\xCF\xAB" => "\xE6\xB1\x90",
+ "\xCF\xAC" => "\xE7\x8A\x80",
+ "\xCF\xAD" => "\xE6\xAA\x84",
+ "\xCF\xAE" => "\xE8\xA2\xAD",
+ "\xCF\xAF" => "\xE5\xB8\xAD",
+ "\xCF\xB0" => "\xE4\xB9\xA0",
+ "\xCF\xB1" => "\xE5\xAA\xB3",
+ "\xCF\xB2" => "\xE5\x96\x9C",
+ "\xCF\xB3" => "\xE9\x93\xA3",
+ "\xCF\xB4" => "\xE6\xB4\x97",
+ "\xCF\xB5" => "\xE7\xB3\xBB",
+ "\xCF\xB6" => "\xE9\x9A\x99",
+ "\xCF\xB7" => "\xE6\x88\x8F",
+ "\xCF\xB8" => "\xE7\xBB\x86",
+ "\xCF\xB9" => "\xE7\x9E\x8E",
+ "\xCF\xBA" => "\xE8\x99\xBE",
+ "\xCF\xBB" => "\xE5\x8C\xA3",
+ "\xCF\xBC" => "\xE9\x9C\x9E",
+ "\xCF\xBD" => "\xE8\xBE\x96",
+ "\xCF\xBE" => "\xE6\x9A\x87",
+ "\xCF\xBF" => "\xE5\xB3\xA1",
+ "\xCF\xC0" => "\xE4\xBE\xA0",
+ "\xCF\xC1" => "\xE7\x8B\xAD",
+ "\xCF\xC2" => "\xE4\xB8\x8B",
+ "\xCF\xC3" => "\xE5\x8E\xA6",
+ "\xCF\xC4" => "\xE5\xA4\x8F",
+ "\xCF\xC5" => "\xE5\x90\x93",
+ "\xCF\xC6" => "\xE6\x8E\x80",
+ "\xCF\xC7" => "\xE9\x94\xA8",
+ "\xCF\xC8" => "\xE5\x85\x88",
+ "\xCF\xC9" => "\xE4\xBB\x99",
+ "\xCF\xCA" => "\xE9\xB2\x9C",
+ "\xCF\xCB" => "\xE7\xBA\xA4",
+ "\xCF\xCC" => "\xE5\x92\xB8",
+ "\xCF\xCD" => "\xE8\xB4\xA4",
+ "\xCF\xCE" => "\xE8\xA1\x94",
+ "\xCF\xCF" => "\xE8\x88\xB7",
+ "\xCF\xD0" => "\xE9\x97\xB2",
+ "\xCF\xD1" => "\xE6\xB6\x8E",
+ "\xCF\xD2" => "\xE5\xBC\xA6",
+ "\xCF\xD3" => "\xE5\xAB\x8C",
+ "\xCF\xD4" => "\xE6\x98\xBE",
+ "\xCF\xD5" => "\xE9\x99\xA9",
+ "\xCF\xD6" => "\xE7\x8E\xB0",
+ "\xCF\xD7" => "\xE7\x8C\xAE",
+ "\xCF\xD8" => "\xE5\x8E\xBF",
+ "\xCF\xD9" => "\xE8\x85\xBA",
+ "\xCF\xDA" => "\xE9\xA6\x85",
+ "\xCF\xDB" => "\xE7\xBE\xA1",
+ "\xCF\xDC" => "\xE5\xAE\xAA",
+ "\xCF\xDD" => "\xE9\x99\xB7",
+ "\xCF\xDE" => "\xE9\x99\x90",
+ "\xCF\xDF" => "\xE7\xBA\xBF",
+ "\xCF\xE0" => "\xE7\x9B\xB8",
+ "\xCF\xE1" => "\xE5\x8E\xA2",
+ "\xCF\xE2" => "\xE9\x95\xB6",
+ "\xCF\xE3" => "\xE9\xA6\x99",
+ "\xCF\xE4" => "\xE7\xAE\xB1",
+ "\xCF\xE5" => "\xE8\xA5\x84",
+ "\xCF\xE6" => "\xE6\xB9\x98",
+ "\xCF\xE7" => "\xE4\xB9\xA1",
+ "\xCF\xE8" => "\xE7\xBF\x94",
+ "\xCF\xE9" => "\xE7\xA5\xA5",
+ "\xCF\xEA" => "\xE8\xAF\xA6",
+ "\xCF\xEB" => "\xE6\x83\xB3",
+ "\xCF\xEC" => "\xE5\x93\x8D",
+ "\xCF\xED" => "\xE4\xBA\xAB",
+ "\xCF\xEE" => "\xE9\xA1\xB9",
+ "\xCF\xEF" => "\xE5\xB7\xB7",
+ "\xCF\xF0" => "\xE6\xA9\xA1",
+ "\xCF\xF1" => "\xE5\x83\x8F",
+ "\xCF\xF2" => "\xE5\x90\x91",
+ "\xCF\xF3" => "\xE8\xB1\xA1",
+ "\xCF\xF4" => "\xE8\x90\xA7",
+ "\xCF\xF5" => "\xE7\xA1\x9D",
+ "\xCF\xF6" => "\xE9\x9C\x84",
+ "\xCF\xF7" => "\xE5\x89\x8A",
+ "\xCF\xF8" => "\xE5\x93\xAE",
+ "\xCF\xF9" => "\xE5\x9A\xA3",
+ "\xCF\xFA" => "\xE9\x94\x80",
+ "\xCF\xFB" => "\xE6\xB6\x88",
+ "\xCF\xFC" => "\xE5\xAE\xB5",
+ "\xCF\xFD" => "\xE6\xB7\x86",
+ "\xCF\xFE" => "\xE6\x99\x93",
+ "\xD0\xA1" => "\xE5\xB0\x8F",
+ "\xD0\xA2" => "\xE5\xAD\x9D",
+ "\xD0\xA3" => "\xE6\xA0\xA1",
+ "\xD0\xA4" => "\xE8\x82\x96",
+ "\xD0\xA5" => "\xE5\x95\xB8",
+ "\xD0\xA6" => "\xE7\xAC\x91",
+ "\xD0\xA7" => "\xE6\x95\x88",
+ "\xD0\xA8" => "\xE6\xA5\x94",
+ "\xD0\xA9" => "\xE4\xBA\x9B",
+ "\xD0\xAA" => "\xE6\xAD\x87",
+ "\xD0\xAB" => "\xE8\x9D\x8E",
+ "\xD0\xAC" => "\xE9\x9E\x8B",
+ "\xD0\xAD" => "\xE5\x8D\x8F",
+ "\xD0\xAE" => "\xE6\x8C\x9F",
+ "\xD0\xAF" => "\xE6\x90\xBA",
+ "\xD0\xB0" => "\xE9\x82\xAA",
+ "\xD0\xB1" => "\xE6\x96\x9C",
+ "\xD0\xB2" => "\xE8\x83\x81",
+ "\xD0\xB3" => "\xE8\xB0\x90",
+ "\xD0\xB4" => "\xE5\x86\x99",
+ "\xD0\xB5" => "\xE6\xA2\xB0",
+ "\xD0\xB6" => "\xE5\x8D\xB8",
+ "\xD0\xB7" => "\xE8\x9F\xB9",
+ "\xD0\xB8" => "\xE6\x87\x88",
+ "\xD0\xB9" => "\xE6\xB3\x84",
+ "\xD0\xBA" => "\xE6\xB3\xBB",
+ "\xD0\xBB" => "\xE8\xB0\xA2",
+ "\xD0\xBC" => "\xE5\xB1\x91",
+ "\xD0\xBD" => "\xE8\x96\xAA",
+ "\xD0\xBE" => "\xE8\x8A\xAF",
+ "\xD0\xBF" => "\xE9\x94\x8C",
+ "\xD0\xC0" => "\xE6\xAC\xA3",
+ "\xD0\xC1" => "\xE8\xBE\x9B",
+ "\xD0\xC2" => "\xE6\x96\xB0",
+ "\xD0\xC3" => "\xE5\xBF\xBB",
+ "\xD0\xC4" => "\xE5\xBF\x83",
+ "\xD0\xC5" => "\xE4\xBF\xA1",
+ "\xD0\xC6" => "\xE8\xA1\x85",
+ "\xD0\xC7" => "\xE6\x98\x9F",
+ "\xD0\xC8" => "\xE8\x85\xA5",
+ "\xD0\xC9" => "\xE7\x8C\xA9",
+ "\xD0\xCA" => "\xE6\x83\xBA",
+ "\xD0\xCB" => "\xE5\x85\xB4",
+ "\xD0\xCC" => "\xE5\x88\x91",
+ "\xD0\xCD" => "\xE5\x9E\x8B",
+ "\xD0\xCE" => "\xE5\xBD\xA2",
+ "\xD0\xCF" => "\xE9\x82\xA2",
+ "\xD0\xD0" => "\xE8\xA1\x8C",
+ "\xD0\xD1" => "\xE9\x86\x92",
+ "\xD0\xD2" => "\xE5\xB9\xB8",
+ "\xD0\xD3" => "\xE6\x9D\x8F",
+ "\xD0\xD4" => "\xE6\x80\xA7",
+ "\xD0\xD5" => "\xE5\xA7\x93",
+ "\xD0\xD6" => "\xE5\x85\x84",
+ "\xD0\xD7" => "\xE5\x87\xB6",
+ "\xD0\xD8" => "\xE8\x83\xB8",
+ "\xD0\xD9" => "\xE5\x8C\x88",
+ "\xD0\xDA" => "\xE6\xB1\xB9",
+ "\xD0\xDB" => "\xE9\x9B\x84",
+ "\xD0\xDC" => "\xE7\x86\x8A",
+ "\xD0\xDD" => "\xE4\xBC\x91",
+ "\xD0\xDE" => "\xE4\xBF\xAE",
+ "\xD0\xDF" => "\xE7\xBE\x9E",
+ "\xD0\xE0" => "\xE6\x9C\xBD",
+ "\xD0\xE1" => "\xE5\x97\x85",
+ "\xD0\xE2" => "\xE9\x94\x88",
+ "\xD0\xE3" => "\xE7\xA7\x80",
+ "\xD0\xE4" => "\xE8\xA2\x96",
+ "\xD0\xE5" => "\xE7\xBB\xA3",
+ "\xD0\xE6" => "\xE5\xA2\x9F",
+ "\xD0\xE7" => "\xE6\x88\x8C",
+ "\xD0\xE8" => "\xE9\x9C\x80",
+ "\xD0\xE9" => "\xE8\x99\x9A",
+ "\xD0\xEA" => "\xE5\x98\x98",
+ "\xD0\xEB" => "\xE9\xA1\xBB",
+ "\xD0\xEC" => "\xE5\xBE\x90",
+ "\xD0\xED" => "\xE8\xAE\xB8",
+ "\xD0\xEE" => "\xE8\x93\x84",
+ "\xD0\xEF" => "\xE9\x85\x97",
+ "\xD0\xF0" => "\xE5\x8F\x99",
+ "\xD0\xF1" => "\xE6\x97\xAD",
+ "\xD0\xF2" => "\xE5\xBA\x8F",
+ "\xD0\xF3" => "\xE7\x95\x9C",
+ "\xD0\xF4" => "\xE6\x81\xA4",
+ "\xD0\xF5" => "\xE7\xB5\xAE",
+ "\xD0\xF6" => "\xE5\xA9\xBF",
+ "\xD0\xF7" => "\xE7\xBB\xAA",
+ "\xD0\xF8" => "\xE7\xBB\xAD",
+ "\xD0\xF9" => "\xE8\xBD\xA9",
+ "\xD0\xFA" => "\xE5\x96\xA7",
+ "\xD0\xFB" => "\xE5\xAE\xA3",
+ "\xD0\xFC" => "\xE6\x82\xAC",
+ "\xD0\xFD" => "\xE6\x97\x8B",
+ "\xD0\xFE" => "\xE7\x8E\x84",
+ "\xD1\xA1" => "\xE9\x80\x89",
+ "\xD1\xA2" => "\xE7\x99\xA3",
+ "\xD1\xA3" => "\xE7\x9C\xA9",
+ "\xD1\xA4" => "\xE7\xBB\x9A",
+ "\xD1\xA5" => "\xE9\x9D\xB4",
+ "\xD1\xA6" => "\xE8\x96\x9B",
+ "\xD1\xA7" => "\xE5\xAD\xA6",
+ "\xD1\xA8" => "\xE7\xA9\xB4",
+ "\xD1\xA9" => "\xE9\x9B\xAA",
+ "\xD1\xAA" => "\xE8\xA1\x80",
+ "\xD1\xAB" => "\xE5\x8B\x8B",
+ "\xD1\xAC" => "\xE7\x86\x8F",
+ "\xD1\xAD" => "\xE5\xBE\xAA",
+ "\xD1\xAE" => "\xE6\x97\xAC",
+ "\xD1\xAF" => "\xE8\xAF\xA2",
+ "\xD1\xB0" => "\xE5\xAF\xBB",
+ "\xD1\xB1" => "\xE9\xA9\xAF",
+ "\xD1\xB2" => "\xE5\xB7\xA1",
+ "\xD1\xB3" => "\xE6\xAE\x89",
+ "\xD1\xB4" => "\xE6\xB1\x9B",
+ "\xD1\xB5" => "\xE8\xAE\xAD",
+ "\xD1\xB6" => "\xE8\xAE\xAF",
+ "\xD1\xB7" => "\xE9\x80\x8A",
+ "\xD1\xB8" => "\xE8\xBF\x85",
+ "\xD1\xB9" => "\xE5\x8E\x8B",
+ "\xD1\xBA" => "\xE6\x8A\xBC",
+ "\xD1\xBB" => "\xE9\xB8\xA6",
+ "\xD1\xBC" => "\xE9\xB8\xAD",
+ "\xD1\xBD" => "\xE5\x91\x80",
+ "\xD1\xBE" => "\xE4\xB8\xAB",
+ "\xD1\xBF" => "\xE8\x8A\xBD",
+ "\xD1\xC0" => "\xE7\x89\x99",
+ "\xD1\xC1" => "\xE8\x9A\x9C",
+ "\xD1\xC2" => "\xE5\xB4\x96",
+ "\xD1\xC3" => "\xE8\xA1\x99",
+ "\xD1\xC4" => "\xE6\xB6\xAF",
+ "\xD1\xC5" => "\xE9\x9B\x85",
+ "\xD1\xC6" => "\xE5\x93\x91",
+ "\xD1\xC7" => "\xE4\xBA\x9A",
+ "\xD1\xC8" => "\xE8\xAE\xB6",
+ "\xD1\xC9" => "\xE7\x84\x89",
+ "\xD1\xCA" => "\xE5\x92\xBD",
+ "\xD1\xCB" => "\xE9\x98\x89",
+ "\xD1\xCC" => "\xE7\x83\x9F",
+ "\xD1\xCD" => "\xE6\xB7\xB9",
+ "\xD1\xCE" => "\xE7\x9B\x90",
+ "\xD1\xCF" => "\xE4\xB8\xA5",
+ "\xD1\xD0" => "\xE7\xA0\x94",
+ "\xD1\xD1" => "\xE8\x9C\x92",
+ "\xD1\xD2" => "\xE5\xB2\xA9",
+ "\xD1\xD3" => "\xE5\xBB\xB6",
+ "\xD1\xD4" => "\xE8\xA8\x80",
+ "\xD1\xD5" => "\xE9\xA2\x9C",
+ "\xD1\xD6" => "\xE9\x98\x8E",
+ "\xD1\xD7" => "\xE7\x82\x8E",
+ "\xD1\xD8" => "\xE6\xB2\xBF",
+ "\xD1\xD9" => "\xE5\xA5\x84",
+ "\xD1\xDA" => "\xE6\x8E\xA9",
+ "\xD1\xDB" => "\xE7\x9C\xBC",
+ "\xD1\xDC" => "\xE8\xA1\x8D",
+ "\xD1\xDD" => "\xE6\xBC\x94",
+ "\xD1\xDE" => "\xE8\x89\xB3",
+ "\xD1\xDF" => "\xE5\xA0\xB0",
+ "\xD1\xE0" => "\xE7\x87\x95",
+ "\xD1\xE1" => "\xE5\x8E\x8C",
+ "\xD1\xE2" => "\xE7\xA0\x9A",
+ "\xD1\xE3" => "\xE9\x9B\x81",
+ "\xD1\xE4" => "\xE5\x94\x81",
+ "\xD1\xE5" => "\xE5\xBD\xA6",
+ "\xD1\xE6" => "\xE7\x84\xB0",
+ "\xD1\xE7" => "\xE5\xAE\xB4",
+ "\xD1\xE8" => "\xE8\xB0\x9A",
+ "\xD1\xE9" => "\xE9\xAA\x8C",
+ "\xD1\xEA" => "\xE6\xAE\x83",
+ "\xD1\xEB" => "\xE5\xA4\xAE",
+ "\xD1\xEC" => "\xE9\xB8\xAF",
+ "\xD1\xED" => "\xE7\xA7\xA7",
+ "\xD1\xEE" => "\xE6\x9D\xA8",
+ "\xD1\xEF" => "\xE6\x89\xAC",
+ "\xD1\xF0" => "\xE4\xBD\xAF",
+ "\xD1\xF1" => "\xE7\x96\xA1",
+ "\xD1\xF2" => "\xE7\xBE\x8A",
+ "\xD1\xF3" => "\xE6\xB4\x8B",
+ "\xD1\xF4" => "\xE9\x98\xB3",
+ "\xD1\xF5" => "\xE6\xB0\xA7",
+ "\xD1\xF6" => "\xE4\xBB\xB0",
+ "\xD1\xF7" => "\xE7\x97\x92",
+ "\xD1\xF8" => "\xE5\x85\xBB",
+ "\xD1\xF9" => "\xE6\xA0\xB7",
+ "\xD1\xFA" => "\xE6\xBC\xBE",
+ "\xD1\xFB" => "\xE9\x82\x80",
+ "\xD1\xFC" => "\xE8\x85\xB0",
+ "\xD1\xFD" => "\xE5\xA6\x96",
+ "\xD1\xFE" => "\xE7\x91\xB6",
+ "\xD2\xA1" => "\xE6\x91\x87",
+ "\xD2\xA2" => "\xE5\xB0\xA7",
+ "\xD2\xA3" => "\xE9\x81\xA5",
+ "\xD2\xA4" => "\xE7\xAA\x91",
+ "\xD2\xA5" => "\xE8\xB0\xA3",
+ "\xD2\xA6" => "\xE5\xA7\x9A",
+ "\xD2\xA7" => "\xE5\x92\xAC",
+ "\xD2\xA8" => "\xE8\x88\x80",
+ "\xD2\xA9" => "\xE8\x8D\xAF",
+ "\xD2\xAA" => "\xE8\xA6\x81",
+ "\xD2\xAB" => "\xE8\x80\x80",
+ "\xD2\xAC" => "\xE6\xA4\xB0",
+ "\xD2\xAD" => "\xE5\x99\x8E",
+ "\xD2\xAE" => "\xE8\x80\xB6",
+ "\xD2\xAF" => "\xE7\x88\xB7",
+ "\xD2\xB0" => "\xE9\x87\x8E",
+ "\xD2\xB1" => "\xE5\x86\xB6",
+ "\xD2\xB2" => "\xE4\xB9\x9F",
+ "\xD2\xB3" => "\xE9\xA1\xB5",
+ "\xD2\xB4" => "\xE6\x8E\x96",
+ "\xD2\xB5" => "\xE4\xB8\x9A",
+ "\xD2\xB6" => "\xE5\x8F\xB6",
+ "\xD2\xB7" => "\xE6\x9B\xB3",
+ "\xD2\xB8" => "\xE8\x85\x8B",
+ "\xD2\xB9" => "\xE5\xA4\x9C",
+ "\xD2\xBA" => "\xE6\xB6\xB2",
+ "\xD2\xBB" => "\xE4\xB8\x80",
+ "\xD2\xBC" => "\xE5\xA3\xB9",
+ "\xD2\xBD" => "\xE5\x8C\xBB",
+ "\xD2\xBE" => "\xE6\x8F\x96",
+ "\xD2\xBF" => "\xE9\x93\xB1",
+ "\xD2\xC0" => "\xE4\xBE\x9D",
+ "\xD2\xC1" => "\xE4\xBC\x8A",
+ "\xD2\xC2" => "\xE8\xA1\xA3",
+ "\xD2\xC3" => "\xE9\xA2\x90",
+ "\xD2\xC4" => "\xE5\xA4\xB7",
+ "\xD2\xC5" => "\xE9\x81\x97",
+ "\xD2\xC6" => "\xE7\xA7\xBB",
+ "\xD2\xC7" => "\xE4\xBB\xAA",
+ "\xD2\xC8" => "\xE8\x83\xB0",
+ "\xD2\xC9" => "\xE7\x96\x91",
+ "\xD2\xCA" => "\xE6\xB2\x82",
+ "\xD2\xCB" => "\xE5\xAE\x9C",
+ "\xD2\xCC" => "\xE5\xA7\xA8",
+ "\xD2\xCD" => "\xE5\xBD\x9D",
+ "\xD2\xCE" => "\xE6\xA4\x85",
+ "\xD2\xCF" => "\xE8\x9A\x81",
+ "\xD2\xD0" => "\xE5\x80\x9A",
+ "\xD2\xD1" => "\xE5\xB7\xB2",
+ "\xD2\xD2" => "\xE4\xB9\x99",
+ "\xD2\xD3" => "\xE7\x9F\xA3",
+ "\xD2\xD4" => "\xE4\xBB\xA5",
+ "\xD2\xD5" => "\xE8\x89\xBA",
+ "\xD2\xD6" => "\xE6\x8A\x91",
+ "\xD2\xD7" => "\xE6\x98\x93",
+ "\xD2\xD8" => "\xE9\x82\x91",
+ "\xD2\xD9" => "\xE5\xB1\xB9",
+ "\xD2\xDA" => "\xE4\xBA\xBF",
+ "\xD2\xDB" => "\xE5\xBD\xB9",
+ "\xD2\xDC" => "\xE8\x87\x86",
+ "\xD2\xDD" => "\xE9\x80\xB8",
+ "\xD2\xDE" => "\xE8\x82\x84",
+ "\xD2\xDF" => "\xE7\x96\xAB",
+ "\xD2\xE0" => "\xE4\xBA\xA6",
+ "\xD2\xE1" => "\xE8\xA3\x94",
+ "\xD2\xE2" => "\xE6\x84\x8F",
+ "\xD2\xE3" => "\xE6\xAF\x85",
+ "\xD2\xE4" => "\xE5\xBF\x86",
+ "\xD2\xE5" => "\xE4\xB9\x89",
+ "\xD2\xE6" => "\xE7\x9B\x8A",
+ "\xD2\xE7" => "\xE6\xBA\xA2",
+ "\xD2\xE8" => "\xE8\xAF\xA3",
+ "\xD2\xE9" => "\xE8\xAE\xAE",
+ "\xD2\xEA" => "\xE8\xB0\x8A",
+ "\xD2\xEB" => "\xE8\xAF\x91",
+ "\xD2\xEC" => "\xE5\xBC\x82",
+ "\xD2\xED" => "\xE7\xBF\xBC",
+ "\xD2\xEE" => "\xE7\xBF\x8C",
+ "\xD2\xEF" => "\xE7\xBB\x8E",
+ "\xD2\xF0" => "\xE8\x8C\xB5",
+ "\xD2\xF1" => "\xE8\x8D\xAB",
+ "\xD2\xF2" => "\xE5\x9B\xA0",
+ "\xD2\xF3" => "\xE6\xAE\xB7",
+ "\xD2\xF4" => "\xE9\x9F\xB3",
+ "\xD2\xF5" => "\xE9\x98\xB4",
+ "\xD2\xF6" => "\xE5\xA7\xBB",
+ "\xD2\xF7" => "\xE5\x90\x9F",
+ "\xD2\xF8" => "\xE9\x93\xB6",
+ "\xD2\xF9" => "\xE6\xB7\xAB",
+ "\xD2\xFA" => "\xE5\xAF\x85",
+ "\xD2\xFB" => "\xE9\xA5\xAE",
+ "\xD2\xFC" => "\xE5\xB0\xB9",
+ "\xD2\xFD" => "\xE5\xBC\x95",
+ "\xD2\xFE" => "\xE9\x9A\x90",
+ "\xD3\xA1" => "\xE5\x8D\xB0",
+ "\xD3\xA2" => "\xE8\x8B\xB1",
+ "\xD3\xA3" => "\xE6\xA8\xB1",
+ "\xD3\xA4" => "\xE5\xA9\xB4",
+ "\xD3\xA5" => "\xE9\xB9\xB0",
+ "\xD3\xA6" => "\xE5\xBA\x94",
+ "\xD3\xA7" => "\xE7\xBC\xA8",
+ "\xD3\xA8" => "\xE8\x8E\xB9",
+ "\xD3\xA9" => "\xE8\x90\xA4",
+ "\xD3\xAA" => "\xE8\x90\xA5",
+ "\xD3\xAB" => "\xE8\x8D\xA7",
+ "\xD3\xAC" => "\xE8\x9D\x87",
+ "\xD3\xAD" => "\xE8\xBF\x8E",
+ "\xD3\xAE" => "\xE8\xB5\xA2",
+ "\xD3\xAF" => "\xE7\x9B\x88",
+ "\xD3\xB0" => "\xE5\xBD\xB1",
+ "\xD3\xB1" => "\xE9\xA2\x96",
+ "\xD3\xB2" => "\xE7\xA1\xAC",
+ "\xD3\xB3" => "\xE6\x98\xA0",
+ "\xD3\xB4" => "\xE5\x93\x9F",
+ "\xD3\xB5" => "\xE6\x8B\xA5",
+ "\xD3\xB6" => "\xE4\xBD\xA3",
+ "\xD3\xB7" => "\xE8\x87\x83",
+ "\xD3\xB8" => "\xE7\x97\x88",
+ "\xD3\xB9" => "\xE5\xBA\xB8",
+ "\xD3\xBA" => "\xE9\x9B\x8D",
+ "\xD3\xBB" => "\xE8\xB8\x8A",
+ "\xD3\xBC" => "\xE8\x9B\xB9",
+ "\xD3\xBD" => "\xE5\x92\x8F",
+ "\xD3\xBE" => "\xE6\xB3\xB3",
+ "\xD3\xBF" => "\xE6\xB6\x8C",
+ "\xD3\xC0" => "\xE6\xB0\xB8",
+ "\xD3\xC1" => "\xE6\x81\xBF",
+ "\xD3\xC2" => "\xE5\x8B\x87",
+ "\xD3\xC3" => "\xE7\x94\xA8",
+ "\xD3\xC4" => "\xE5\xB9\xBD",
+ "\xD3\xC5" => "\xE4\xBC\x98",
+ "\xD3\xC6" => "\xE6\x82\xA0",
+ "\xD3\xC7" => "\xE5\xBF\xA7",
+ "\xD3\xC8" => "\xE5\xB0\xA4",
+ "\xD3\xC9" => "\xE7\x94\xB1",
+ "\xD3\xCA" => "\xE9\x82\xAE",
+ "\xD3\xCB" => "\xE9\x93\x80",
+ "\xD3\xCC" => "\xE7\x8A\xB9",
+ "\xD3\xCD" => "\xE6\xB2\xB9",
+ "\xD3\xCE" => "\xE6\xB8\xB8",
+ "\xD3\xCF" => "\xE9\x85\x89",
+ "\xD3\xD0" => "\xE6\x9C\x89",
+ "\xD3\xD1" => "\xE5\x8F\x8B",
+ "\xD3\xD2" => "\xE5\x8F\xB3",
+ "\xD3\xD3" => "\xE4\xBD\x91",
+ "\xD3\xD4" => "\xE9\x87\x89",
+ "\xD3\xD5" => "\xE8\xAF\xB1",
+ "\xD3\xD6" => "\xE5\x8F\x88",
+ "\xD3\xD7" => "\xE5\xB9\xBC",
+ "\xD3\xD8" => "\xE8\xBF\x82",
+ "\xD3\xD9" => "\xE6\xB7\xA4",
+ "\xD3\xDA" => "\xE4\xBA\x8E",
+ "\xD3\xDB" => "\xE7\x9B\x82",
+ "\xD3\xDC" => "\xE6\xA6\x86",
+ "\xD3\xDD" => "\xE8\x99\x9E",
+ "\xD3\xDE" => "\xE6\x84\x9A",
+ "\xD3\xDF" => "\xE8\x88\x86",
+ "\xD3\xE0" => "\xE4\xBD\x99",
+ "\xD3\xE1" => "\xE4\xBF\x9E",
+ "\xD3\xE2" => "\xE9\x80\xBE",
+ "\xD3\xE3" => "\xE9\xB1\xBC",
+ "\xD3\xE4" => "\xE6\x84\x89",
+ "\xD3\xE5" => "\xE6\xB8\x9D",
+ "\xD3\xE6" => "\xE6\xB8\x94",
+ "\xD3\xE7" => "\xE9\x9A\x85",
+ "\xD3\xE8" => "\xE4\xBA\x88",
+ "\xD3\xE9" => "\xE5\xA8\xB1",
+ "\xD3\xEA" => "\xE9\x9B\xA8",
+ "\xD3\xEB" => "\xE4\xB8\x8E",
+ "\xD3\xEC" => "\xE5\xB1\xBF",
+ "\xD3\xED" => "\xE7\xA6\xB9",
+ "\xD3\xEE" => "\xE5\xAE\x87",
+ "\xD3\xEF" => "\xE8\xAF\xAD",
+ "\xD3\xF0" => "\xE7\xBE\xBD",
+ "\xD3\xF1" => "\xE7\x8E\x89",
+ "\xD3\xF2" => "\xE5\x9F\x9F",
+ "\xD3\xF3" => "\xE8\x8A\x8B",
+ "\xD3\xF4" => "\xE9\x83\x81",
+ "\xD3\xF5" => "\xE5\x90\x81",
+ "\xD3\xF6" => "\xE9\x81\x87",
+ "\xD3\xF7" => "\xE5\x96\xBB",
+ "\xD3\xF8" => "\xE5\xB3\xAA",
+ "\xD3\xF9" => "\xE5\xBE\xA1",
+ "\xD3\xFA" => "\xE6\x84\x88",
+ "\xD3\xFB" => "\xE6\xAC\xB2",
+ "\xD3\xFC" => "\xE7\x8B\xB1",
+ "\xD3\xFD" => "\xE8\x82\xB2",
+ "\xD3\xFE" => "\xE8\xAA\x89",
+ "\xD4\xA1" => "\xE6\xB5\xB4",
+ "\xD4\xA2" => "\xE5\xAF\x93",
+ "\xD4\xA3" => "\xE8\xA3\x95",
+ "\xD4\xA4" => "\xE9\xA2\x84",
+ "\xD4\xA5" => "\xE8\xB1\xAB",
+ "\xD4\xA6" => "\xE9\xA9\xAD",
+ "\xD4\xA7" => "\xE9\xB8\xB3",
+ "\xD4\xA8" => "\xE6\xB8\x8A",
+ "\xD4\xA9" => "\xE5\x86\xA4",
+ "\xD4\xAA" => "\xE5\x85\x83",
+ "\xD4\xAB" => "\xE5\x9E\xA3",
+ "\xD4\xAC" => "\xE8\xA2\x81",
+ "\xD4\xAD" => "\xE5\x8E\x9F",
+ "\xD4\xAE" => "\xE6\x8F\xB4",
+ "\xD4\xAF" => "\xE8\xBE\x95",
+ "\xD4\xB0" => "\xE5\x9B\xAD",
+ "\xD4\xB1" => "\xE5\x91\x98",
+ "\xD4\xB2" => "\xE5\x9C\x86",
+ "\xD4\xB3" => "\xE7\x8C\xBF",
+ "\xD4\xB4" => "\xE6\xBA\x90",
+ "\xD4\xB5" => "\xE7\xBC\x98",
+ "\xD4\xB6" => "\xE8\xBF\x9C",
+ "\xD4\xB7" => "\xE8\x8B\x91",
+ "\xD4\xB8" => "\xE6\x84\xBF",
+ "\xD4\xB9" => "\xE6\x80\xA8",
+ "\xD4\xBA" => "\xE9\x99\xA2",
+ "\xD4\xBB" => "\xE6\x9B\xB0",
+ "\xD4\xBC" => "\xE7\xBA\xA6",
+ "\xD4\xBD" => "\xE8\xB6\x8A",
+ "\xD4\xBE" => "\xE8\xB7\x83",
+ "\xD4\xBF" => "\xE9\x92\xA5",
+ "\xD4\xC0" => "\xE5\xB2\xB3",
+ "\xD4\xC1" => "\xE7\xB2\xA4",
+ "\xD4\xC2" => "\xE6\x9C\x88",
+ "\xD4\xC3" => "\xE6\x82\xA6",
+ "\xD4\xC4" => "\xE9\x98\x85",
+ "\xD4\xC5" => "\xE8\x80\x98",
+ "\xD4\xC6" => "\xE4\xBA\x91",
+ "\xD4\xC7" => "\xE9\x83\xA7",
+ "\xD4\xC8" => "\xE5\x8C\x80",
+ "\xD4\xC9" => "\xE9\x99\xA8",
+ "\xD4\xCA" => "\xE5\x85\x81",
+ "\xD4\xCB" => "\xE8\xBF\x90",
+ "\xD4\xCC" => "\xE8\x95\xB4",
+ "\xD4\xCD" => "\xE9\x85\x9D",
+ "\xD4\xCE" => "\xE6\x99\x95",
+ "\xD4\xCF" => "\xE9\x9F\xB5",
+ "\xD4\xD0" => "\xE5\xAD\x95",
+ "\xD4\xD1" => "\xE5\x8C\x9D",
+ "\xD4\xD2" => "\xE7\xA0\xB8",
+ "\xD4\xD3" => "\xE6\x9D\x82",
+ "\xD4\xD4" => "\xE6\xA0\xBD",
+ "\xD4\xD5" => "\xE5\x93\x89",
+ "\xD4\xD6" => "\xE7\x81\xBE",
+ "\xD4\xD7" => "\xE5\xAE\xB0",
+ "\xD4\xD8" => "\xE8\xBD\xBD",
+ "\xD4\xD9" => "\xE5\x86\x8D",
+ "\xD4\xDA" => "\xE5\x9C\xA8",
+ "\xD4\xDB" => "\xE5\x92\xB1",
+ "\xD4\xDC" => "\xE6\x94\x92",
+ "\xD4\xDD" => "\xE6\x9A\x82",
+ "\xD4\xDE" => "\xE8\xB5\x9E",
+ "\xD4\xDF" => "\xE8\xB5\x83",
+ "\xD4\xE0" => "\xE8\x84\x8F",
+ "\xD4\xE1" => "\xE8\x91\xAC",
+ "\xD4\xE2" => "\xE9\x81\xAD",
+ "\xD4\xE3" => "\xE7\xB3\x9F",
+ "\xD4\xE4" => "\xE5\x87\xBF",
+ "\xD4\xE5" => "\xE8\x97\xBB",
+ "\xD4\xE6" => "\xE6\x9E\xA3",
+ "\xD4\xE7" => "\xE6\x97\xA9",
+ "\xD4\xE8" => "\xE6\xBE\xA1",
+ "\xD4\xE9" => "\xE8\x9A\xA4",
+ "\xD4\xEA" => "\xE8\xBA\x81",
+ "\xD4\xEB" => "\xE5\x99\xAA",
+ "\xD4\xEC" => "\xE9\x80\xA0",
+ "\xD4\xED" => "\xE7\x9A\x82",
+ "\xD4\xEE" => "\xE7\x81\xB6",
+ "\xD4\xEF" => "\xE7\x87\xA5",
+ "\xD4\xF0" => "\xE8\xB4\xA3",
+ "\xD4\xF1" => "\xE6\x8B\xA9",
+ "\xD4\xF2" => "\xE5\x88\x99",
+ "\xD4\xF3" => "\xE6\xB3\xBD",
+ "\xD4\xF4" => "\xE8\xB4\xBC",
+ "\xD4\xF5" => "\xE6\x80\x8E",
+ "\xD4\xF6" => "\xE5\xA2\x9E",
+ "\xD4\xF7" => "\xE6\x86\x8E",
+ "\xD4\xF8" => "\xE6\x9B\xBE",
+ "\xD4\xF9" => "\xE8\xB5\xA0",
+ "\xD4\xFA" => "\xE6\x89\x8E",
+ "\xD4\xFB" => "\xE5\x96\xB3",
+ "\xD4\xFC" => "\xE6\xB8\xA3",
+ "\xD4\xFD" => "\xE6\x9C\xAD",
+ "\xD4\xFE" => "\xE8\xBD\xA7",
+ "\xD5\xA1" => "\xE9\x93\xA1",
+ "\xD5\xA2" => "\xE9\x97\xB8",
+ "\xD5\xA3" => "\xE7\x9C\xA8",
+ "\xD5\xA4" => "\xE6\xA0\x85",
+ "\xD5\xA5" => "\xE6\xA6\xA8",
+ "\xD5\xA6" => "\xE5\x92\x8B",
+ "\xD5\xA7" => "\xE4\xB9\x8D",
+ "\xD5\xA8" => "\xE7\x82\xB8",
+ "\xD5\xA9" => "\xE8\xAF\x88",
+ "\xD5\xAA" => "\xE6\x91\x98",
+ "\xD5\xAB" => "\xE6\x96\x8B",
+ "\xD5\xAC" => "\xE5\xAE\x85",
+ "\xD5\xAD" => "\xE7\xAA\x84",
+ "\xD5\xAE" => "\xE5\x80\xBA",
+ "\xD5\xAF" => "\xE5\xAF\xA8",
+ "\xD5\xB0" => "\xE7\x9E\xBB",
+ "\xD5\xB1" => "\xE6\xAF\xA1",
+ "\xD5\xB2" => "\xE8\xA9\xB9",
+ "\xD5\xB3" => "\xE7\xB2\x98",
+ "\xD5\xB4" => "\xE6\xB2\xBE",
+ "\xD5\xB5" => "\xE7\x9B\x8F",
+ "\xD5\xB6" => "\xE6\x96\xA9",
+ "\xD5\xB7" => "\xE8\xBE\x97",
+ "\xD5\xB8" => "\xE5\xB4\xAD",
+ "\xD5\xB9" => "\xE5\xB1\x95",
+ "\xD5\xBA" => "\xE8\x98\xB8",
+ "\xD5\xBB" => "\xE6\xA0\x88",
+ "\xD5\xBC" => "\xE5\x8D\xA0",
+ "\xD5\xBD" => "\xE6\x88\x98",
+ "\xD5\xBE" => "\xE7\xAB\x99",
+ "\xD5\xBF" => "\xE6\xB9\x9B",
+ "\xD5\xC0" => "\xE7\xBB\xBD",
+ "\xD5\xC1" => "\xE6\xA8\x9F",
+ "\xD5\xC2" => "\xE7\xAB\xA0",
+ "\xD5\xC3" => "\xE5\xBD\xB0",
+ "\xD5\xC4" => "\xE6\xBC\xB3",
+ "\xD5\xC5" => "\xE5\xBC\xA0",
+ "\xD5\xC6" => "\xE6\x8E\x8C",
+ "\xD5\xC7" => "\xE6\xB6\xA8",
+ "\xD5\xC8" => "\xE6\x9D\x96",
+ "\xD5\xC9" => "\xE4\xB8\x88",
+ "\xD5\xCA" => "\xE5\xB8\x90",
+ "\xD5\xCB" => "\xE8\xB4\xA6",
+ "\xD5\xCC" => "\xE4\xBB\x97",
+ "\xD5\xCD" => "\xE8\x83\x80",
+ "\xD5\xCE" => "\xE7\x98\xB4",
+ "\xD5\xCF" => "\xE9\x9A\x9C",
+ "\xD5\xD0" => "\xE6\x8B\x9B",
+ "\xD5\xD1" => "\xE6\x98\xAD",
+ "\xD5\xD2" => "\xE6\x89\xBE",
+ "\xD5\xD3" => "\xE6\xB2\xBC",
+ "\xD5\xD4" => "\xE8\xB5\xB5",
+ "\xD5\xD5" => "\xE7\x85\xA7",
+ "\xD5\xD6" => "\xE7\xBD\xA9",
+ "\xD5\xD7" => "\xE5\x85\x86",
+ "\xD5\xD8" => "\xE8\x82\x87",
+ "\xD5\xD9" => "\xE5\x8F\xAC",
+ "\xD5\xDA" => "\xE9\x81\xAE",
+ "\xD5\xDB" => "\xE6\x8A\x98",
+ "\xD5\xDC" => "\xE5\x93\xB2",
+ "\xD5\xDD" => "\xE8\x9B\xB0",
+ "\xD5\xDE" => "\xE8\xBE\x99",
+ "\xD5\xDF" => "\xE8\x80\x85",
+ "\xD5\xE0" => "\xE9\x94\x97",
+ "\xD5\xE1" => "\xE8\x94\x97",
+ "\xD5\xE2" => "\xE8\xBF\x99",
+ "\xD5\xE3" => "\xE6\xB5\x99",
+ "\xD5\xE4" => "\xE7\x8F\x8D",
+ "\xD5\xE5" => "\xE6\x96\x9F",
+ "\xD5\xE6" => "\xE7\x9C\x9F",
+ "\xD5\xE7" => "\xE7\x94\x84",
+ "\xD5\xE8" => "\xE7\xA0\xA7",
+ "\xD5\xE9" => "\xE8\x87\xBB",
+ "\xD5\xEA" => "\xE8\xB4\x9E",
+ "\xD5\xEB" => "\xE9\x92\x88",
+ "\xD5\xEC" => "\xE4\xBE\xA6",
+ "\xD5\xED" => "\xE6\x9E\x95",
+ "\xD5\xEE" => "\xE7\x96\xB9",
+ "\xD5\xEF" => "\xE8\xAF\x8A",
+ "\xD5\xF0" => "\xE9\x9C\x87",
+ "\xD5\xF1" => "\xE6\x8C\xAF",
+ "\xD5\xF2" => "\xE9\x95\x87",
+ "\xD5\xF3" => "\xE9\x98\xB5",
+ "\xD5\xF4" => "\xE8\x92\xB8",
+ "\xD5\xF5" => "\xE6\x8C\xA3",
+ "\xD5\xF6" => "\xE7\x9D\x81",
+ "\xD5\xF7" => "\xE5\xBE\x81",
+ "\xD5\xF8" => "\xE7\x8B\xB0",
+ "\xD5\xF9" => "\xE4\xBA\x89",
+ "\xD5\xFA" => "\xE6\x80\x94",
+ "\xD5\xFB" => "\xE6\x95\xB4",
+ "\xD5\xFC" => "\xE6\x8B\xAF",
+ "\xD5\xFD" => "\xE6\xAD\xA3",
+ "\xD5\xFE" => "\xE6\x94\xBF",
+ "\xD6\xA1" => "\xE5\xB8\xA7",
+ "\xD6\xA2" => "\xE7\x97\x87",
+ "\xD6\xA3" => "\xE9\x83\x91",
+ "\xD6\xA4" => "\xE8\xAF\x81",
+ "\xD6\xA5" => "\xE8\x8A\x9D",
+ "\xD6\xA6" => "\xE6\x9E\x9D",
+ "\xD6\xA7" => "\xE6\x94\xAF",
+ "\xD6\xA8" => "\xE5\x90\xB1",
+ "\xD6\xA9" => "\xE8\x9C\x98",
+ "\xD6\xAA" => "\xE7\x9F\xA5",
+ "\xD6\xAB" => "\xE8\x82\xA2",
+ "\xD6\xAC" => "\xE8\x84\x82",
+ "\xD6\xAD" => "\xE6\xB1\x81",
+ "\xD6\xAE" => "\xE4\xB9\x8B",
+ "\xD6\xAF" => "\xE7\xBB\x87",
+ "\xD6\xB0" => "\xE8\x81\x8C",
+ "\xD6\xB1" => "\xE7\x9B\xB4",
+ "\xD6\xB2" => "\xE6\xA4\x8D",
+ "\xD6\xB3" => "\xE6\xAE\x96",
+ "\xD6\xB4" => "\xE6\x89\xA7",
+ "\xD6\xB5" => "\xE5\x80\xBC",
+ "\xD6\xB6" => "\xE4\xBE\x84",
+ "\xD6\xB7" => "\xE5\x9D\x80",
+ "\xD6\xB8" => "\xE6\x8C\x87",
+ "\xD6\xB9" => "\xE6\xAD\xA2",
+ "\xD6\xBA" => "\xE8\xB6\xBE",
+ "\xD6\xBB" => "\xE5\x8F\xAA",
+ "\xD6\xBC" => "\xE6\x97\xA8",
+ "\xD6\xBD" => "\xE7\xBA\xB8",
+ "\xD6\xBE" => "\xE5\xBF\x97",
+ "\xD6\xBF" => "\xE6\x8C\x9A",
+ "\xD6\xC0" => "\xE6\x8E\xB7",
+ "\xD6\xC1" => "\xE8\x87\xB3",
+ "\xD6\xC2" => "\xE8\x87\xB4",
+ "\xD6\xC3" => "\xE7\xBD\xAE",
+ "\xD6\xC4" => "\xE5\xB8\x9C",
+ "\xD6\xC5" => "\xE5\xB3\x99",
+ "\xD6\xC6" => "\xE5\x88\xB6",
+ "\xD6\xC7" => "\xE6\x99\xBA",
+ "\xD6\xC8" => "\xE7\xA7\xA9",
+ "\xD6\xC9" => "\xE7\xA8\x9A",
+ "\xD6\xCA" => "\xE8\xB4\xA8",
+ "\xD6\xCB" => "\xE7\x82\x99",
+ "\xD6\xCC" => "\xE7\x97\x94",
+ "\xD6\xCD" => "\xE6\xBB\x9E",
+ "\xD6\xCE" => "\xE6\xB2\xBB",
+ "\xD6\xCF" => "\xE7\xAA\x92",
+ "\xD6\xD0" => "\xE4\xB8\xAD",
+ "\xD6\xD1" => "\xE7\x9B\x85",
+ "\xD6\xD2" => "\xE5\xBF\xA0",
+ "\xD6\xD3" => "\xE9\x92\x9F",
+ "\xD6\xD4" => "\xE8\xA1\xB7",
+ "\xD6\xD5" => "\xE7\xBB\x88",
+ "\xD6\xD6" => "\xE7\xA7\x8D",
+ "\xD6\xD7" => "\xE8\x82\xBF",
+ "\xD6\xD8" => "\xE9\x87\x8D",
+ "\xD6\xD9" => "\xE4\xBB\xB2",
+ "\xD6\xDA" => "\xE4\xBC\x97",
+ "\xD6\xDB" => "\xE8\x88\x9F",
+ "\xD6\xDC" => "\xE5\x91\xA8",
+ "\xD6\xDD" => "\xE5\xB7\x9E",
+ "\xD6\xDE" => "\xE6\xB4\xB2",
+ "\xD6\xDF" => "\xE8\xAF\x8C",
+ "\xD6\xE0" => "\xE7\xB2\xA5",
+ "\xD6\xE1" => "\xE8\xBD\xB4",
+ "\xD6\xE2" => "\xE8\x82\x98",
+ "\xD6\xE3" => "\xE5\xB8\x9A",
+ "\xD6\xE4" => "\xE5\x92\x92",
+ "\xD6\xE5" => "\xE7\x9A\xB1",
+ "\xD6\xE6" => "\xE5\xAE\x99",
+ "\xD6\xE7" => "\xE6\x98\xBC",
+ "\xD6\xE8" => "\xE9\xAA\xA4",
+ "\xD6\xE9" => "\xE7\x8F\xA0",
+ "\xD6\xEA" => "\xE6\xA0\xAA",
+ "\xD6\xEB" => "\xE8\x9B\x9B",
+ "\xD6\xEC" => "\xE6\x9C\xB1",
+ "\xD6\xED" => "\xE7\x8C\xAA",
+ "\xD6\xEE" => "\xE8\xAF\xB8",
+ "\xD6\xEF" => "\xE8\xAF\x9B",
+ "\xD6\xF0" => "\xE9\x80\x90",
+ "\xD6\xF1" => "\xE7\xAB\xB9",
+ "\xD6\xF2" => "\xE7\x83\x9B",
+ "\xD6\xF3" => "\xE7\x85\xAE",
+ "\xD6\xF4" => "\xE6\x8B\x84",
+ "\xD6\xF5" => "\xE7\x9E\xA9",
+ "\xD6\xF6" => "\xE5\x98\xB1",
+ "\xD6\xF7" => "\xE4\xB8\xBB",
+ "\xD6\xF8" => "\xE8\x91\x97",
+ "\xD6\xF9" => "\xE6\x9F\xB1",
+ "\xD6\xFA" => "\xE5\x8A\xA9",
+ "\xD6\xFB" => "\xE8\x9B\x80",
+ "\xD6\xFC" => "\xE8\xB4\xAE",
+ "\xD6\xFD" => "\xE9\x93\xB8",
+ "\xD6\xFE" => "\xE7\xAD\x91",
+ "\xD7\xA1" => "\xE4\xBD\x8F",
+ "\xD7\xA2" => "\xE6\xB3\xA8",
+ "\xD7\xA3" => "\xE7\xA5\x9D",
+ "\xD7\xA4" => "\xE9\xA9\xBB",
+ "\xD7\xA5" => "\xE6\x8A\x93",
+ "\xD7\xA6" => "\xE7\x88\xAA",
+ "\xD7\xA7" => "\xE6\x8B\xBD",
+ "\xD7\xA8" => "\xE4\xB8\x93",
+ "\xD7\xA9" => "\xE7\xA0\x96",
+ "\xD7\xAA" => "\xE8\xBD\xAC",
+ "\xD7\xAB" => "\xE6\x92\xB0",
+ "\xD7\xAC" => "\xE8\xB5\x9A",
+ "\xD7\xAD" => "\xE7\xAF\x86",
+ "\xD7\xAE" => "\xE6\xA1\xA9",
+ "\xD7\xAF" => "\xE5\xBA\x84",
+ "\xD7\xB0" => "\xE8\xA3\x85",
+ "\xD7\xB1" => "\xE5\xA6\x86",
+ "\xD7\xB2" => "\xE6\x92\x9E",
+ "\xD7\xB3" => "\xE5\xA3\xAE",
+ "\xD7\xB4" => "\xE7\x8A\xB6",
+ "\xD7\xB5" => "\xE6\xA4\x8E",
+ "\xD7\xB6" => "\xE9\x94\xA5",
+ "\xD7\xB7" => "\xE8\xBF\xBD",
+ "\xD7\xB8" => "\xE8\xB5\x98",
+ "\xD7\xB9" => "\xE5\x9D\xA0",
+ "\xD7\xBA" => "\xE7\xBC\x80",
+ "\xD7\xBB" => "\xE8\xB0\x86",
+ "\xD7\xBC" => "\xE5\x87\x86",
+ "\xD7\xBD" => "\xE6\x8D\x89",
+ "\xD7\xBE" => "\xE6\x8B\x99",
+ "\xD7\xBF" => "\xE5\x8D\x93",
+ "\xD7\xC0" => "\xE6\xA1\x8C",
+ "\xD7\xC1" => "\xE7\x90\xA2",
+ "\xD7\xC2" => "\xE8\x8C\x81",
+ "\xD7\xC3" => "\xE9\x85\x8C",
+ "\xD7\xC4" => "\xE5\x95\x84",
+ "\xD7\xC5" => "\xE7\x9D\x80",
+ "\xD7\xC6" => "\xE7\x81\xBC",
+ "\xD7\xC7" => "\xE6\xB5\x8A",
+ "\xD7\xC8" => "\xE5\x85\xB9",
+ "\xD7\xC9" => "\xE5\x92\xA8",
+ "\xD7\xCA" => "\xE8\xB5\x84",
+ "\xD7\xCB" => "\xE5\xA7\xBF",
+ "\xD7\xCC" => "\xE6\xBB\x8B",
+ "\xD7\xCD" => "\xE6\xB7\x84",
+ "\xD7\xCE" => "\xE5\xAD\x9C",
+ "\xD7\xCF" => "\xE7\xB4\xAB",
+ "\xD7\xD0" => "\xE4\xBB\x94",
+ "\xD7\xD1" => "\xE7\xB1\xBD",
+ "\xD7\xD2" => "\xE6\xBB\x93",
+ "\xD7\xD3" => "\xE5\xAD\x90",
+ "\xD7\xD4" => "\xE8\x87\xAA",
+ "\xD7\xD5" => "\xE6\xB8\x8D",
+ "\xD7\xD6" => "\xE5\xAD\x97",
+ "\xD7\xD7" => "\xE9\xAC\x83",
+ "\xD7\xD8" => "\xE6\xA3\x95",
+ "\xD7\xD9" => "\xE8\xB8\xAA",
+ "\xD7\xDA" => "\xE5\xAE\x97",
+ "\xD7\xDB" => "\xE7\xBB\xBC",
+ "\xD7\xDC" => "\xE6\x80\xBB",
+ "\xD7\xDD" => "\xE7\xBA\xB5",
+ "\xD7\xDE" => "\xE9\x82\xB9",
+ "\xD7\xDF" => "\xE8\xB5\xB0",
+ "\xD7\xE0" => "\xE5\xA5\x8F",
+ "\xD7\xE1" => "\xE6\x8F\x8D",
+ "\xD7\xE2" => "\xE7\xA7\x9F",
+ "\xD7\xE3" => "\xE8\xB6\xB3",
+ "\xD7\xE4" => "\xE5\x8D\x92",
+ "\xD7\xE5" => "\xE6\x97\x8F",
+ "\xD7\xE6" => "\xE7\xA5\x96",
+ "\xD7\xE7" => "\xE8\xAF\x85",
+ "\xD7\xE8" => "\xE9\x98\xBB",
+ "\xD7\xE9" => "\xE7\xBB\x84",
+ "\xD7\xEA" => "\xE9\x92\xBB",
+ "\xD7\xEB" => "\xE7\xBA\x82",
+ "\xD7\xEC" => "\xE5\x98\xB4",
+ "\xD7\xED" => "\xE9\x86\x89",
+ "\xD7\xEE" => "\xE6\x9C\x80",
+ "\xD7\xEF" => "\xE7\xBD\xAA",
+ "\xD7\xF0" => "\xE5\xB0\x8A",
+ "\xD7\xF1" => "\xE9\x81\xB5",
+ "\xD7\xF2" => "\xE6\x98\xA8",
+ "\xD7\xF3" => "\xE5\xB7\xA6",
+ "\xD7\xF4" => "\xE4\xBD\x90",
+ "\xD7\xF5" => "\xE6\x9F\x9E",
+ "\xD7\xF6" => "\xE5\x81\x9A",
+ "\xD7\xF7" => "\xE4\xBD\x9C",
+ "\xD7\xF8" => "\xE5\x9D\x90",
+ "\xD7\xF9" => "\xE5\xBA\xA7",
+ "\xD8\xA1" => "\xE4\xBA\x8D",
+ "\xD8\xA2" => "\xE4\xB8\x8C",
+ "\xD8\xA3" => "\xE5\x85\x80",
+ "\xD8\xA4" => "\xE4\xB8\x90",
+ "\xD8\xA5" => "\xE5\xBB\xBF",
+ "\xD8\xA6" => "\xE5\x8D\x85",
+ "\xD8\xA7" => "\xE4\xB8\x95",
+ "\xD8\xA8" => "\xE4\xBA\x98",
+ "\xD8\xA9" => "\xE4\xB8\x9E",
+ "\xD8\xAA" => "\xE9\xAC\xB2",
+ "\xD8\xAB" => "\xE5\xAD\xAC",
+ "\xD8\xAC" => "\xE5\x99\xA9",
+ "\xD8\xAD" => "\xE4\xB8\xA8",
+ "\xD8\xAE" => "\xE7\xA6\xBA",
+ "\xD8\xAF" => "\xE4\xB8\xBF",
+ "\xD8\xB0" => "\xE5\x8C\x95",
+ "\xD8\xB1" => "\xE4\xB9\x87",
+ "\xD8\xB2" => "\xE5\xA4\xAD",
+ "\xD8\xB3" => "\xE7\x88\xBB",
+ "\xD8\xB4" => "\xE5\x8D\xAE",
+ "\xD8\xB5" => "\xE6\xB0\x90",
+ "\xD8\xB6" => "\xE5\x9B\x9F",
+ "\xD8\xB7" => "\xE8\x83\xA4",
+ "\xD8\xB8" => "\xE9\xA6\x97",
+ "\xD8\xB9" => "\xE6\xAF\x93",
+ "\xD8\xBA" => "\xE7\x9D\xBE",
+ "\xD8\xBB" => "\xE9\xBC\x97",
+ "\xD8\xBC" => "\xE4\xB8\xB6",
+ "\xD8\xBD" => "\xE4\xBA\x9F",
+ "\xD8\xBE" => "\xE9\xBC\x90",
+ "\xD8\xBF" => "\xE4\xB9\x9C",
+ "\xD8\xC0" => "\xE4\xB9\xA9",
+ "\xD8\xC1" => "\xE4\xBA\x93",
+ "\xD8\xC2" => "\xE8\x8A\x88",
+ "\xD8\xC3" => "\xE5\xAD\x9B",
+ "\xD8\xC4" => "\xE5\x95\xAC",
+ "\xD8\xC5" => "\xE5\x98\x8F",
+ "\xD8\xC6" => "\xE4\xBB\x84",
+ "\xD8\xC7" => "\xE5\x8E\x8D",
+ "\xD8\xC8" => "\xE5\x8E\x9D",
+ "\xD8\xC9" => "\xE5\x8E\xA3",
+ "\xD8\xCA" => "\xE5\x8E\xA5",
+ "\xD8\xCB" => "\xE5\x8E\xAE",
+ "\xD8\xCC" => "\xE9\x9D\xA5",
+ "\xD8\xCD" => "\xE8\xB5\x9D",
+ "\xD8\xCE" => "\xE5\x8C\x9A",
+ "\xD8\xCF" => "\xE5\x8F\xB5",
+ "\xD8\xD0" => "\xE5\x8C\xA6",
+ "\xD8\xD1" => "\xE5\x8C\xAE",
+ "\xD8\xD2" => "\xE5\x8C\xBE",
+ "\xD8\xD3" => "\xE8\xB5\x9C",
+ "\xD8\xD4" => "\xE5\x8D\xA6",
+ "\xD8\xD5" => "\xE5\x8D\xA3",
+ "\xD8\xD6" => "\xE5\x88\x82",
+ "\xD8\xD7" => "\xE5\x88\x88",
+ "\xD8\xD8" => "\xE5\x88\x8E",
+ "\xD8\xD9" => "\xE5\x88\xAD",
+ "\xD8\xDA" => "\xE5\x88\xB3",
+ "\xD8\xDB" => "\xE5\x88\xBF",
+ "\xD8\xDC" => "\xE5\x89\x80",
+ "\xD8\xDD" => "\xE5\x89\x8C",
+ "\xD8\xDE" => "\xE5\x89\x9E",
+ "\xD8\xDF" => "\xE5\x89\xA1",
+ "\xD8\xE0" => "\xE5\x89\x9C",
+ "\xD8\xE1" => "\xE8\x92\xAF",
+ "\xD8\xE2" => "\xE5\x89\xBD",
+ "\xD8\xE3" => "\xE5\x8A\x82",
+ "\xD8\xE4" => "\xE5\x8A\x81",
+ "\xD8\xE5" => "\xE5\x8A\x90",
+ "\xD8\xE6" => "\xE5\x8A\x93",
+ "\xD8\xE7" => "\xE5\x86\x82",
+ "\xD8\xE8" => "\xE7\xBD\x94",
+ "\xD8\xE9" => "\xE4\xBA\xBB",
+ "\xD8\xEA" => "\xE4\xBB\x83",
+ "\xD8\xEB" => "\xE4\xBB\x89",
+ "\xD8\xEC" => "\xE4\xBB\x82",
+ "\xD8\xED" => "\xE4\xBB\xA8",
+ "\xD8\xEE" => "\xE4\xBB\xA1",
+ "\xD8\xEF" => "\xE4\xBB\xAB",
+ "\xD8\xF0" => "\xE4\xBB\x9E",
+ "\xD8\xF1" => "\xE4\xBC\x9B",
+ "\xD8\xF2" => "\xE4\xBB\xB3",
+ "\xD8\xF3" => "\xE4\xBC\xA2",
+ "\xD8\xF4" => "\xE4\xBD\xA4",
+ "\xD8\xF5" => "\xE4\xBB\xB5",
+ "\xD8\xF6" => "\xE4\xBC\xA5",
+ "\xD8\xF7" => "\xE4\xBC\xA7",
+ "\xD8\xF8" => "\xE4\xBC\x89",
+ "\xD8\xF9" => "\xE4\xBC\xAB",
+ "\xD8\xFA" => "\xE4\xBD\x9E",
+ "\xD8\xFB" => "\xE4\xBD\xA7",
+ "\xD8\xFC" => "\xE6\x94\xB8",
+ "\xD8\xFD" => "\xE4\xBD\x9A",
+ "\xD8\xFE" => "\xE4\xBD\x9D",
+ "\xD9\xA1" => "\xE4\xBD\x9F",
+ "\xD9\xA2" => "\xE4\xBD\x97",
+ "\xD9\xA3" => "\xE4\xBC\xB2",
+ "\xD9\xA4" => "\xE4\xBC\xBD",
+ "\xD9\xA5" => "\xE4\xBD\xB6",
+ "\xD9\xA6" => "\xE4\xBD\xB4",
+ "\xD9\xA7" => "\xE4\xBE\x91",
+ "\xD9\xA8" => "\xE4\xBE\x89",
+ "\xD9\xA9" => "\xE4\xBE\x83",
+ "\xD9\xAA" => "\xE4\xBE\x8F",
+ "\xD9\xAB" => "\xE4\xBD\xBE",
+ "\xD9\xAC" => "\xE4\xBD\xBB",
+ "\xD9\xAD" => "\xE4\xBE\xAA",
+ "\xD9\xAE" => "\xE4\xBD\xBC",
+ "\xD9\xAF" => "\xE4\xBE\xAC",
+ "\xD9\xB0" => "\xE4\xBE\x94",
+ "\xD9\xB1" => "\xE4\xBF\xA6",
+ "\xD9\xB2" => "\xE4\xBF\xA8",
+ "\xD9\xB3" => "\xE4\xBF\xAA",
+ "\xD9\xB4" => "\xE4\xBF\x85",
+ "\xD9\xB5" => "\xE4\xBF\x9A",
+ "\xD9\xB6" => "\xE4\xBF\xA3",
+ "\xD9\xB7" => "\xE4\xBF\x9C",
+ "\xD9\xB8" => "\xE4\xBF\x91",
+ "\xD9\xB9" => "\xE4\xBF\x9F",
+ "\xD9\xBA" => "\xE4\xBF\xB8",
+ "\xD9\xBB" => "\xE5\x80\xA9",
+ "\xD9\xBC" => "\xE5\x81\x8C",
+ "\xD9\xBD" => "\xE4\xBF\xB3",
+ "\xD9\xBE" => "\xE5\x80\xAC",
+ "\xD9\xBF" => "\xE5\x80\x8F",
+ "\xD9\xC0" => "\xE5\x80\xAE",
+ "\xD9\xC1" => "\xE5\x80\xAD",
+ "\xD9\xC2" => "\xE4\xBF\xBE",
+ "\xD9\xC3" => "\xE5\x80\x9C",
+ "\xD9\xC4" => "\xE5\x80\x8C",
+ "\xD9\xC5" => "\xE5\x80\xA5",
+ "\xD9\xC6" => "\xE5\x80\xA8",
+ "\xD9\xC7" => "\xE5\x81\xBE",
+ "\xD9\xC8" => "\xE5\x81\x83",
+ "\xD9\xC9" => "\xE5\x81\x95",
+ "\xD9\xCA" => "\xE5\x81\x88",
+ "\xD9\xCB" => "\xE5\x81\x8E",
+ "\xD9\xCC" => "\xE5\x81\xAC",
+ "\xD9\xCD" => "\xE5\x81\xBB",
+ "\xD9\xCE" => "\xE5\x82\xA5",
+ "\xD9\xCF" => "\xE5\x82\xA7",
+ "\xD9\xD0" => "\xE5\x82\xA9",
+ "\xD9\xD1" => "\xE5\x82\xBA",
+ "\xD9\xD2" => "\xE5\x83\x96",
+ "\xD9\xD3" => "\xE5\x84\x86",
+ "\xD9\xD4" => "\xE5\x83\xAD",
+ "\xD9\xD5" => "\xE5\x83\xAC",
+ "\xD9\xD6" => "\xE5\x83\xA6",
+ "\xD9\xD7" => "\xE5\x83\xAE",
+ "\xD9\xD8" => "\xE5\x84\x87",
+ "\xD9\xD9" => "\xE5\x84\x8B",
+ "\xD9\xDA" => "\xE4\xBB\x9D",
+ "\xD9\xDB" => "\xE6\xB0\xBD",
+ "\xD9\xDC" => "\xE4\xBD\x98",
+ "\xD9\xDD" => "\xE4\xBD\xA5",
+ "\xD9\xDE" => "\xE4\xBF\x8E",
+ "\xD9\xDF" => "\xE9\xBE\xA0",
+ "\xD9\xE0" => "\xE6\xB1\x86",
+ "\xD9\xE1" => "\xE7\xB1\xB4",
+ "\xD9\xE2" => "\xE5\x85\xAE",
+ "\xD9\xE3" => "\xE5\xB7\xBD",
+ "\xD9\xE4" => "\xE9\xBB\x89",
+ "\xD9\xE5" => "\xE9\xA6\x98",
+ "\xD9\xE6" => "\xE5\x86\x81",
+ "\xD9\xE7" => "\xE5\xA4\x94",
+ "\xD9\xE8" => "\xE5\x8B\xB9",
+ "\xD9\xE9" => "\xE5\x8C\x8D",
+ "\xD9\xEA" => "\xE8\xA8\x87",
+ "\xD9\xEB" => "\xE5\x8C\x90",
+ "\xD9\xEC" => "\xE5\x87\xAB",
+ "\xD9\xED" => "\xE5\xA4\x99",
+ "\xD9\xEE" => "\xE5\x85\x95",
+ "\xD9\xEF" => "\xE4\xBA\xA0",
+ "\xD9\xF0" => "\xE5\x85\x96",
+ "\xD9\xF1" => "\xE4\xBA\xB3",
+ "\xD9\xF2" => "\xE8\xA1\xAE",
+ "\xD9\xF3" => "\xE8\xA2\xA4",
+ "\xD9\xF4" => "\xE4\xBA\xB5",
+ "\xD9\xF5" => "\xE8\x84\x94",
+ "\xD9\xF6" => "\xE8\xA3\x92",
+ "\xD9\xF7" => "\xE7\xA6\x80",
+ "\xD9\xF8" => "\xE5\xAC\xB4",
+ "\xD9\xF9" => "\xE8\xA0\x83",
+ "\xD9\xFA" => "\xE7\xBE\xB8",
+ "\xD9\xFB" => "\xE5\x86\xAB",
+ "\xD9\xFC" => "\xE5\x86\xB1",
+ "\xD9\xFD" => "\xE5\x86\xBD",
+ "\xD9\xFE" => "\xE5\x86\xBC",
+ "\xDA\xA1" => "\xE5\x87\x87",
+ "\xDA\xA2" => "\xE5\x86\x96",
+ "\xDA\xA3" => "\xE5\x86\xA2",
+ "\xDA\xA4" => "\xE5\x86\xA5",
+ "\xDA\xA5" => "\xE8\xAE\xA0",
+ "\xDA\xA6" => "\xE8\xAE\xA6",
+ "\xDA\xA7" => "\xE8\xAE\xA7",
+ "\xDA\xA8" => "\xE8\xAE\xAA",
+ "\xDA\xA9" => "\xE8\xAE\xB4",
+ "\xDA\xAA" => "\xE8\xAE\xB5",
+ "\xDA\xAB" => "\xE8\xAE\xB7",
+ "\xDA\xAC" => "\xE8\xAF\x82",
+ "\xDA\xAD" => "\xE8\xAF\x83",
+ "\xDA\xAE" => "\xE8\xAF\x8B",
+ "\xDA\xAF" => "\xE8\xAF\x8F",
+ "\xDA\xB0" => "\xE8\xAF\x8E",
+ "\xDA\xB1" => "\xE8\xAF\x92",
+ "\xDA\xB2" => "\xE8\xAF\x93",
+ "\xDA\xB3" => "\xE8\xAF\x94",
+ "\xDA\xB4" => "\xE8\xAF\x96",
+ "\xDA\xB5" => "\xE8\xAF\x98",
+ "\xDA\xB6" => "\xE8\xAF\x99",
+ "\xDA\xB7" => "\xE8\xAF\x9C",
+ "\xDA\xB8" => "\xE8\xAF\x9F",
+ "\xDA\xB9" => "\xE8\xAF\xA0",
+ "\xDA\xBA" => "\xE8\xAF\xA4",
+ "\xDA\xBB" => "\xE8\xAF\xA8",
+ "\xDA\xBC" => "\xE8\xAF\xA9",
+ "\xDA\xBD" => "\xE8\xAF\xAE",
+ "\xDA\xBE" => "\xE8\xAF\xB0",
+ "\xDA\xBF" => "\xE8\xAF\xB3",
+ "\xDA\xC0" => "\xE8\xAF\xB6",
+ "\xDA\xC1" => "\xE8\xAF\xB9",
+ "\xDA\xC2" => "\xE8\xAF\xBC",
+ "\xDA\xC3" => "\xE8\xAF\xBF",
+ "\xDA\xC4" => "\xE8\xB0\x80",
+ "\xDA\xC5" => "\xE8\xB0\x82",
+ "\xDA\xC6" => "\xE8\xB0\x84",
+ "\xDA\xC7" => "\xE8\xB0\x87",
+ "\xDA\xC8" => "\xE8\xB0\x8C",
+ "\xDA\xC9" => "\xE8\xB0\x8F",
+ "\xDA\xCA" => "\xE8\xB0\x91",
+ "\xDA\xCB" => "\xE8\xB0\x92",
+ "\xDA\xCC" => "\xE8\xB0\x94",
+ "\xDA\xCD" => "\xE8\xB0\x95",
+ "\xDA\xCE" => "\xE8\xB0\x96",
+ "\xDA\xCF" => "\xE8\xB0\x99",
+ "\xDA\xD0" => "\xE8\xB0\x9B",
+ "\xDA\xD1" => "\xE8\xB0\x98",
+ "\xDA\xD2" => "\xE8\xB0\x9D",
+ "\xDA\xD3" => "\xE8\xB0\x9F",
+ "\xDA\xD4" => "\xE8\xB0\xA0",
+ "\xDA\xD5" => "\xE8\xB0\xA1",
+ "\xDA\xD6" => "\xE8\xB0\xA5",
+ "\xDA\xD7" => "\xE8\xB0\xA7",
+ "\xDA\xD8" => "\xE8\xB0\xAA",
+ "\xDA\xD9" => "\xE8\xB0\xAB",
+ "\xDA\xDA" => "\xE8\xB0\xAE",
+ "\xDA\xDB" => "\xE8\xB0\xAF",
+ "\xDA\xDC" => "\xE8\xB0\xB2",
+ "\xDA\xDD" => "\xE8\xB0\xB3",
+ "\xDA\xDE" => "\xE8\xB0\xB5",
+ "\xDA\xDF" => "\xE8\xB0\xB6",
+ "\xDA\xE0" => "\xE5\x8D\xA9",
+ "\xDA\xE1" => "\xE5\x8D\xBA",
+ "\xDA\xE2" => "\xE9\x98\x9D",
+ "\xDA\xE3" => "\xE9\x98\xA2",
+ "\xDA\xE4" => "\xE9\x98\xA1",
+ "\xDA\xE5" => "\xE9\x98\xB1",
+ "\xDA\xE6" => "\xE9\x98\xAA",
+ "\xDA\xE7" => "\xE9\x98\xBD",
+ "\xDA\xE8" => "\xE9\x98\xBC",
+ "\xDA\xE9" => "\xE9\x99\x82",
+ "\xDA\xEA" => "\xE9\x99\x89",
+ "\xDA\xEB" => "\xE9\x99\x94",
+ "\xDA\xEC" => "\xE9\x99\x9F",
+ "\xDA\xED" => "\xE9\x99\xA7",
+ "\xDA\xEE" => "\xE9\x99\xAC",
+ "\xDA\xEF" => "\xE9\x99\xB2",
+ "\xDA\xF0" => "\xE9\x99\xB4",
+ "\xDA\xF1" => "\xE9\x9A\x88",
+ "\xDA\xF2" => "\xE9\x9A\x8D",
+ "\xDA\xF3" => "\xE9\x9A\x97",
+ "\xDA\xF4" => "\xE9\x9A\xB0",
+ "\xDA\xF5" => "\xE9\x82\x97",
+ "\xDA\xF6" => "\xE9\x82\x9B",
+ "\xDA\xF7" => "\xE9\x82\x9D",
+ "\xDA\xF8" => "\xE9\x82\x99",
+ "\xDA\xF9" => "\xE9\x82\xAC",
+ "\xDA\xFA" => "\xE9\x82\xA1",
+ "\xDA\xFB" => "\xE9\x82\xB4",
+ "\xDA\xFC" => "\xE9\x82\xB3",
+ "\xDA\xFD" => "\xE9\x82\xB6",
+ "\xDA\xFE" => "\xE9\x82\xBA",
+ "\xDB\xA1" => "\xE9\x82\xB8",
+ "\xDB\xA2" => "\xE9\x82\xB0",
+ "\xDB\xA3" => "\xE9\x83\x8F",
+ "\xDB\xA4" => "\xE9\x83\x85",
+ "\xDB\xA5" => "\xE9\x82\xBE",
+ "\xDB\xA6" => "\xE9\x83\x90",
+ "\xDB\xA7" => "\xE9\x83\x84",
+ "\xDB\xA8" => "\xE9\x83\x87",
+ "\xDB\xA9" => "\xE9\x83\x93",
+ "\xDB\xAA" => "\xE9\x83\xA6",
+ "\xDB\xAB" => "\xE9\x83\xA2",
+ "\xDB\xAC" => "\xE9\x83\x9C",
+ "\xDB\xAD" => "\xE9\x83\x97",
+ "\xDB\xAE" => "\xE9\x83\x9B",
+ "\xDB\xAF" => "\xE9\x83\xAB",
+ "\xDB\xB0" => "\xE9\x83\xAF",
+ "\xDB\xB1" => "\xE9\x83\xBE",
+ "\xDB\xB2" => "\xE9\x84\x84",
+ "\xDB\xB3" => "\xE9\x84\xA2",
+ "\xDB\xB4" => "\xE9\x84\x9E",
+ "\xDB\xB5" => "\xE9\x84\xA3",
+ "\xDB\xB6" => "\xE9\x84\xB1",
+ "\xDB\xB7" => "\xE9\x84\xAF",
+ "\xDB\xB8" => "\xE9\x84\xB9",
+ "\xDB\xB9" => "\xE9\x85\x83",
+ "\xDB\xBA" => "\xE9\x85\x86",
+ "\xDB\xBB" => "\xE5\x88\x8D",
+ "\xDB\xBC" => "\xE5\xA5\x82",
+ "\xDB\xBD" => "\xE5\x8A\xA2",
+ "\xDB\xBE" => "\xE5\x8A\xAC",
+ "\xDB\xBF" => "\xE5\x8A\xAD",
+ "\xDB\xC0" => "\xE5\x8A\xBE",
+ "\xDB\xC1" => "\xE5\x93\xBF",
+ "\xDB\xC2" => "\xE5\x8B\x90",
+ "\xDB\xC3" => "\xE5\x8B\x96",
+ "\xDB\xC4" => "\xE5\x8B\xB0",
+ "\xDB\xC5" => "\xE5\x8F\x9F",
+ "\xDB\xC6" => "\xE7\x87\xAE",
+ "\xDB\xC7" => "\xE7\x9F\x8D",
+ "\xDB\xC8" => "\xE5\xBB\xB4",
+ "\xDB\xC9" => "\xE5\x87\xB5",
+ "\xDB\xCA" => "\xE5\x87\xBC",
+ "\xDB\xCB" => "\xE9\xAC\xAF",
+ "\xDB\xCC" => "\xE5\x8E\xB6",
+ "\xDB\xCD" => "\xE5\xBC\x81",
+ "\xDB\xCE" => "\xE7\x95\x9A",
+ "\xDB\xCF" => "\xE5\xB7\xAF",
+ "\xDB\xD0" => "\xE5\x9D\x8C",
+ "\xDB\xD1" => "\xE5\x9E\xA9",
+ "\xDB\xD2" => "\xE5\x9E\xA1",
+ "\xDB\xD3" => "\xE5\xA1\xBE",
+ "\xDB\xD4" => "\xE5\xA2\xBC",
+ "\xDB\xD5" => "\xE5\xA3\x85",
+ "\xDB\xD6" => "\xE5\xA3\x91",
+ "\xDB\xD7" => "\xE5\x9C\xA9",
+ "\xDB\xD8" => "\xE5\x9C\xAC",
+ "\xDB\xD9" => "\xE5\x9C\xAA",
+ "\xDB\xDA" => "\xE5\x9C\xB3",
+ "\xDB\xDB" => "\xE5\x9C\xB9",
+ "\xDB\xDC" => "\xE5\x9C\xAE",
+ "\xDB\xDD" => "\xE5\x9C\xAF",
+ "\xDB\xDE" => "\xE5\x9D\x9C",
+ "\xDB\xDF" => "\xE5\x9C\xBB",
+ "\xDB\xE0" => "\xE5\x9D\x82",
+ "\xDB\xE1" => "\xE5\x9D\xA9",
+ "\xDB\xE2" => "\xE5\x9E\x85",
+ "\xDB\xE3" => "\xE5\x9D\xAB",
+ "\xDB\xE4" => "\xE5\x9E\x86",
+ "\xDB\xE5" => "\xE5\x9D\xBC",
+ "\xDB\xE6" => "\xE5\x9D\xBB",
+ "\xDB\xE7" => "\xE5\x9D\xA8",
+ "\xDB\xE8" => "\xE5\x9D\xAD",
+ "\xDB\xE9" => "\xE5\x9D\xB6",
+ "\xDB\xEA" => "\xE5\x9D\xB3",
+ "\xDB\xEB" => "\xE5\x9E\xAD",
+ "\xDB\xEC" => "\xE5\x9E\xA4",
+ "\xDB\xED" => "\xE5\x9E\x8C",
+ "\xDB\xEE" => "\xE5\x9E\xB2",
+ "\xDB\xEF" => "\xE5\x9F\x8F",
+ "\xDB\xF0" => "\xE5\x9E\xA7",
+ "\xDB\xF1" => "\xE5\x9E\xB4",
+ "\xDB\xF2" => "\xE5\x9E\x93",
+ "\xDB\xF3" => "\xE5\x9E\xA0",
+ "\xDB\xF4" => "\xE5\x9F\x95",
+ "\xDB\xF5" => "\xE5\x9F\x98",
+ "\xDB\xF6" => "\xE5\x9F\x9A",
+ "\xDB\xF7" => "\xE5\x9F\x99",
+ "\xDB\xF8" => "\xE5\x9F\x92",
+ "\xDB\xF9" => "\xE5\x9E\xB8",
+ "\xDB\xFA" => "\xE5\x9F\xB4",
+ "\xDB\xFB" => "\xE5\x9F\xAF",
+ "\xDB\xFC" => "\xE5\x9F\xB8",
+ "\xDB\xFD" => "\xE5\x9F\xA4",
+ "\xDB\xFE" => "\xE5\x9F\x9D",
+ "\xDC\xA1" => "\xE5\xA0\x8B",
+ "\xDC\xA2" => "\xE5\xA0\x8D",
+ "\xDC\xA3" => "\xE5\x9F\xBD",
+ "\xDC\xA4" => "\xE5\x9F\xAD",
+ "\xDC\xA5" => "\xE5\xA0\x80",
+ "\xDC\xA6" => "\xE5\xA0\x9E",
+ "\xDC\xA7" => "\xE5\xA0\x99",
+ "\xDC\xA8" => "\xE5\xA1\x84",
+ "\xDC\xA9" => "\xE5\xA0\xA0",
+ "\xDC\xAA" => "\xE5\xA1\xA5",
+ "\xDC\xAB" => "\xE5\xA1\xAC",
+ "\xDC\xAC" => "\xE5\xA2\x81",
+ "\xDC\xAD" => "\xE5\xA2\x89",
+ "\xDC\xAE" => "\xE5\xA2\x9A",
+ "\xDC\xAF" => "\xE5\xA2\x80",
+ "\xDC\xB0" => "\xE9\xA6\xA8",
+ "\xDC\xB1" => "\xE9\xBC\x99",
+ "\xDC\xB2" => "\xE6\x87\xBF",
+ "\xDC\xB3" => "\xE8\x89\xB9",
+ "\xDC\xB4" => "\xE8\x89\xBD",
+ "\xDC\xB5" => "\xE8\x89\xBF",
+ "\xDC\xB6" => "\xE8\x8A\x8F",
+ "\xDC\xB7" => "\xE8\x8A\x8A",
+ "\xDC\xB8" => "\xE8\x8A\xA8",
+ "\xDC\xB9" => "\xE8\x8A\x84",
+ "\xDC\xBA" => "\xE8\x8A\x8E",
+ "\xDC\xBB" => "\xE8\x8A\x91",
+ "\xDC\xBC" => "\xE8\x8A\x97",
+ "\xDC\xBD" => "\xE8\x8A\x99",
+ "\xDC\xBE" => "\xE8\x8A\xAB",
+ "\xDC\xBF" => "\xE8\x8A\xB8",
+ "\xDC\xC0" => "\xE8\x8A\xBE",
+ "\xDC\xC1" => "\xE8\x8A\xB0",
+ "\xDC\xC2" => "\xE8\x8B\x88",
+ "\xDC\xC3" => "\xE8\x8B\x8A",
+ "\xDC\xC4" => "\xE8\x8B\xA3",
+ "\xDC\xC5" => "\xE8\x8A\x98",
+ "\xDC\xC6" => "\xE8\x8A\xB7",
+ "\xDC\xC7" => "\xE8\x8A\xAE",
+ "\xDC\xC8" => "\xE8\x8B\x8B",
+ "\xDC\xC9" => "\xE8\x8B\x8C",
+ "\xDC\xCA" => "\xE8\x8B\x81",
+ "\xDC\xCB" => "\xE8\x8A\xA9",
+ "\xDC\xCC" => "\xE8\x8A\xB4",
+ "\xDC\xCD" => "\xE8\x8A\xA1",
+ "\xDC\xCE" => "\xE8\x8A\xAA",
+ "\xDC\xCF" => "\xE8\x8A\x9F",
+ "\xDC\xD0" => "\xE8\x8B\x84",
+ "\xDC\xD1" => "\xE8\x8B\x8E",
+ "\xDC\xD2" => "\xE8\x8A\xA4",
+ "\xDC\xD3" => "\xE8\x8B\xA1",
+ "\xDC\xD4" => "\xE8\x8C\x89",
+ "\xDC\xD5" => "\xE8\x8B\xB7",
+ "\xDC\xD6" => "\xE8\x8B\xA4",
+ "\xDC\xD7" => "\xE8\x8C\x8F",
+ "\xDC\xD8" => "\xE8\x8C\x87",
+ "\xDC\xD9" => "\xE8\x8B\x9C",
+ "\xDC\xDA" => "\xE8\x8B\xB4",
+ "\xDC\xDB" => "\xE8\x8B\x92",
+ "\xDC\xDC" => "\xE8\x8B\x98",
+ "\xDC\xDD" => "\xE8\x8C\x8C",
+ "\xDC\xDE" => "\xE8\x8B\xBB",
+ "\xDC\xDF" => "\xE8\x8B\x93",
+ "\xDC\xE0" => "\xE8\x8C\x91",
+ "\xDC\xE1" => "\xE8\x8C\x9A",
+ "\xDC\xE2" => "\xE8\x8C\x86",
+ "\xDC\xE3" => "\xE8\x8C\x94",
+ "\xDC\xE4" => "\xE8\x8C\x95",
+ "\xDC\xE5" => "\xE8\x8B\xA0",
+ "\xDC\xE6" => "\xE8\x8B\x95",
+ "\xDC\xE7" => "\xE8\x8C\x9C",
+ "\xDC\xE8" => "\xE8\x8D\x91",
+ "\xDC\xE9" => "\xE8\x8D\x9B",
+ "\xDC\xEA" => "\xE8\x8D\x9C",
+ "\xDC\xEB" => "\xE8\x8C\x88",
+ "\xDC\xEC" => "\xE8\x8E\x92",
+ "\xDC\xED" => "\xE8\x8C\xBC",
+ "\xDC\xEE" => "\xE8\x8C\xB4",
+ "\xDC\xEF" => "\xE8\x8C\xB1",
+ "\xDC\xF0" => "\xE8\x8E\x9B",
+ "\xDC\xF1" => "\xE8\x8D\x9E",
+ "\xDC\xF2" => "\xE8\x8C\xAF",
+ "\xDC\xF3" => "\xE8\x8D\x8F",
+ "\xDC\xF4" => "\xE8\x8D\x87",
+ "\xDC\xF5" => "\xE8\x8D\x83",
+ "\xDC\xF6" => "\xE8\x8D\x9F",
+ "\xDC\xF7" => "\xE8\x8D\x80",
+ "\xDC\xF8" => "\xE8\x8C\x97",
+ "\xDC\xF9" => "\xE8\x8D\xA0",
+ "\xDC\xFA" => "\xE8\x8C\xAD",
+ "\xDC\xFB" => "\xE8\x8C\xBA",
+ "\xDC\xFC" => "\xE8\x8C\xB3",
+ "\xDC\xFD" => "\xE8\x8D\xA6",
+ "\xDC\xFE" => "\xE8\x8D\xA5",
+ "\xDD\xA1" => "\xE8\x8D\xA8",
+ "\xDD\xA2" => "\xE8\x8C\x9B",
+ "\xDD\xA3" => "\xE8\x8D\xA9",
+ "\xDD\xA4" => "\xE8\x8D\xAC",
+ "\xDD\xA5" => "\xE8\x8D\xAA",
+ "\xDD\xA6" => "\xE8\x8D\xAD",
+ "\xDD\xA7" => "\xE8\x8D\xAE",
+ "\xDD\xA8" => "\xE8\x8E\xB0",
+ "\xDD\xA9" => "\xE8\x8D\xB8",
+ "\xDD\xAA" => "\xE8\x8E\xB3",
+ "\xDD\xAB" => "\xE8\x8E\xB4",
+ "\xDD\xAC" => "\xE8\x8E\xA0",
+ "\xDD\xAD" => "\xE8\x8E\xAA",
+ "\xDD\xAE" => "\xE8\x8E\x93",
+ "\xDD\xAF" => "\xE8\x8E\x9C",
+ "\xDD\xB0" => "\xE8\x8E\x85",
+ "\xDD\xB1" => "\xE8\x8D\xBC",
+ "\xDD\xB2" => "\xE8\x8E\xB6",
+ "\xDD\xB3" => "\xE8\x8E\xA9",
+ "\xDD\xB4" => "\xE8\x8D\xBD",
+ "\xDD\xB5" => "\xE8\x8E\xB8",
+ "\xDD\xB6" => "\xE8\x8D\xBB",
+ "\xDD\xB7" => "\xE8\x8E\x98",
+ "\xDD\xB8" => "\xE8\x8E\x9E",
+ "\xDD\xB9" => "\xE8\x8E\xA8",
+ "\xDD\xBA" => "\xE8\x8E\xBA",
+ "\xDD\xBB" => "\xE8\x8E\xBC",
+ "\xDD\xBC" => "\xE8\x8F\x81",
+ "\xDD\xBD" => "\xE8\x90\x81",
+ "\xDD\xBE" => "\xE8\x8F\xA5",
+ "\xDD\xBF" => "\xE8\x8F\x98",
+ "\xDD\xC0" => "\xE5\xA0\x87",
+ "\xDD\xC1" => "\xE8\x90\x98",
+ "\xDD\xC2" => "\xE8\x90\x8B",
+ "\xDD\xC3" => "\xE8\x8F\x9D",
+ "\xDD\xC4" => "\xE8\x8F\xBD",
+ "\xDD\xC5" => "\xE8\x8F\x96",
+ "\xDD\xC6" => "\xE8\x90\x9C",
+ "\xDD\xC7" => "\xE8\x90\xB8",
+ "\xDD\xC8" => "\xE8\x90\x91",
+ "\xDD\xC9" => "\xE8\x90\x86",
+ "\xDD\xCA" => "\xE8\x8F\x94",
+ "\xDD\xCB" => "\xE8\x8F\x9F",
+ "\xDD\xCC" => "\xE8\x90\x8F",
+ "\xDD\xCD" => "\xE8\x90\x83",
+ "\xDD\xCE" => "\xE8\x8F\xB8",
+ "\xDD\xCF" => "\xE8\x8F\xB9",
+ "\xDD\xD0" => "\xE8\x8F\xAA",
+ "\xDD\xD1" => "\xE8\x8F\x85",
+ "\xDD\xD2" => "\xE8\x8F\x80",
+ "\xDD\xD3" => "\xE8\x90\xA6",
+ "\xDD\xD4" => "\xE8\x8F\xB0",
+ "\xDD\xD5" => "\xE8\x8F\xA1",
+ "\xDD\xD6" => "\xE8\x91\x9C",
+ "\xDD\xD7" => "\xE8\x91\x91",
+ "\xDD\xD8" => "\xE8\x91\x9A",
+ "\xDD\xD9" => "\xE8\x91\x99",
+ "\xDD\xDA" => "\xE8\x91\xB3",
+ "\xDD\xDB" => "\xE8\x92\x87",
+ "\xDD\xDC" => "\xE8\x92\x88",
+ "\xDD\xDD" => "\xE8\x91\xBA",
+ "\xDD\xDE" => "\xE8\x92\x89",
+ "\xDD\xDF" => "\xE8\x91\xB8",
+ "\xDD\xE0" => "\xE8\x90\xBC",
+ "\xDD\xE1" => "\xE8\x91\x86",
+ "\xDD\xE2" => "\xE8\x91\xA9",
+ "\xDD\xE3" => "\xE8\x91\xB6",
+ "\xDD\xE4" => "\xE8\x92\x8C",
+ "\xDD\xE5" => "\xE8\x92\x8E",
+ "\xDD\xE6" => "\xE8\x90\xB1",
+ "\xDD\xE7" => "\xE8\x91\xAD",
+ "\xDD\xE8" => "\xE8\x93\x81",
+ "\xDD\xE9" => "\xE8\x93\x8D",
+ "\xDD\xEA" => "\xE8\x93\x90",
+ "\xDD\xEB" => "\xE8\x93\xA6",
+ "\xDD\xEC" => "\xE8\x92\xBD",
+ "\xDD\xED" => "\xE8\x93\x93",
+ "\xDD\xEE" => "\xE8\x93\x8A",
+ "\xDD\xEF" => "\xE8\x92\xBF",
+ "\xDD\xF0" => "\xE8\x92\xBA",
+ "\xDD\xF1" => "\xE8\x93\xA0",
+ "\xDD\xF2" => "\xE8\x92\xA1",
+ "\xDD\xF3" => "\xE8\x92\xB9",
+ "\xDD\xF4" => "\xE8\x92\xB4",
+ "\xDD\xF5" => "\xE8\x92\x97",
+ "\xDD\xF6" => "\xE8\x93\xA5",
+ "\xDD\xF7" => "\xE8\x93\xA3",
+ "\xDD\xF8" => "\xE8\x94\x8C",
+ "\xDD\xF9" => "\xE7\x94\x8D",
+ "\xDD\xFA" => "\xE8\x94\xB8",
+ "\xDD\xFB" => "\xE8\x93\xB0",
+ "\xDD\xFC" => "\xE8\x94\xB9",
+ "\xDD\xFD" => "\xE8\x94\x9F",
+ "\xDD\xFE" => "\xE8\x94\xBA",
+ "\xDE\xA1" => "\xE8\x95\x96",
+ "\xDE\xA2" => "\xE8\x94\xBB",
+ "\xDE\xA3" => "\xE8\x93\xBF",
+ "\xDE\xA4" => "\xE8\x93\xBC",
+ "\xDE\xA5" => "\xE8\x95\x99",
+ "\xDE\xA6" => "\xE8\x95\x88",
+ "\xDE\xA7" => "\xE8\x95\xA8",
+ "\xDE\xA8" => "\xE8\x95\xA4",
+ "\xDE\xA9" => "\xE8\x95\x9E",
+ "\xDE\xAA" => "\xE8\x95\xBA",
+ "\xDE\xAB" => "\xE7\x9E\xA2",
+ "\xDE\xAC" => "\xE8\x95\x83",
+ "\xDE\xAD" => "\xE8\x95\xB2",
+ "\xDE\xAE" => "\xE8\x95\xBB",
+ "\xDE\xAF" => "\xE8\x96\xA4",
+ "\xDE\xB0" => "\xE8\x96\xA8",
+ "\xDE\xB1" => "\xE8\x96\x87",
+ "\xDE\xB2" => "\xE8\x96\x8F",
+ "\xDE\xB3" => "\xE8\x95\xB9",
+ "\xDE\xB4" => "\xE8\x96\xAE",
+ "\xDE\xB5" => "\xE8\x96\x9C",
+ "\xDE\xB6" => "\xE8\x96\x85",
+ "\xDE\xB7" => "\xE8\x96\xB9",
+ "\xDE\xB8" => "\xE8\x96\xB7",
+ "\xDE\xB9" => "\xE8\x96\xB0",
+ "\xDE\xBA" => "\xE8\x97\x93",
+ "\xDE\xBB" => "\xE8\x97\x81",
+ "\xDE\xBC" => "\xE8\x97\x9C",
+ "\xDE\xBD" => "\xE8\x97\xBF",
+ "\xDE\xBE" => "\xE8\x98\xA7",
+ "\xDE\xBF" => "\xE8\x98\x85",
+ "\xDE\xC0" => "\xE8\x98\xA9",
+ "\xDE\xC1" => "\xE8\x98\x96",
+ "\xDE\xC2" => "\xE8\x98\xBC",
+ "\xDE\xC3" => "\xE5\xBB\xBE",
+ "\xDE\xC4" => "\xE5\xBC\x88",
+ "\xDE\xC5" => "\xE5\xA4\xBC",
+ "\xDE\xC6" => "\xE5\xA5\x81",
+ "\xDE\xC7" => "\xE8\x80\xB7",
+ "\xDE\xC8" => "\xE5\xA5\x95",
+ "\xDE\xC9" => "\xE5\xA5\x9A",
+ "\xDE\xCA" => "\xE5\xA5\x98",
+ "\xDE\xCB" => "\xE5\x8C\x8F",
+ "\xDE\xCC" => "\xE5\xB0\xA2",
+ "\xDE\xCD" => "\xE5\xB0\xA5",
+ "\xDE\xCE" => "\xE5\xB0\xAC",
+ "\xDE\xCF" => "\xE5\xB0\xB4",
+ "\xDE\xD0" => "\xE6\x89\x8C",
+ "\xDE\xD1" => "\xE6\x89\xAA",
+ "\xDE\xD2" => "\xE6\x8A\x9F",
+ "\xDE\xD3" => "\xE6\x8A\xBB",
+ "\xDE\xD4" => "\xE6\x8B\x8A",
+ "\xDE\xD5" => "\xE6\x8B\x9A",
+ "\xDE\xD6" => "\xE6\x8B\x97",
+ "\xDE\xD7" => "\xE6\x8B\xAE",
+ "\xDE\xD8" => "\xE6\x8C\xA2",
+ "\xDE\xD9" => "\xE6\x8B\xB6",
+ "\xDE\xDA" => "\xE6\x8C\xB9",
+ "\xDE\xDB" => "\xE6\x8D\x8B",
+ "\xDE\xDC" => "\xE6\x8D\x83",
+ "\xDE\xDD" => "\xE6\x8E\xAD",
+ "\xDE\xDE" => "\xE6\x8F\xB6",
+ "\xDE\xDF" => "\xE6\x8D\xB1",
+ "\xDE\xE0" => "\xE6\x8D\xBA",
+ "\xDE\xE1" => "\xE6\x8E\x8E",
+ "\xDE\xE2" => "\xE6\x8E\xB4",
+ "\xDE\xE3" => "\xE6\x8D\xAD",
+ "\xDE\xE4" => "\xE6\x8E\xAC",
+ "\xDE\xE5" => "\xE6\x8E\x8A",
+ "\xDE\xE6" => "\xE6\x8D\xA9",
+ "\xDE\xE7" => "\xE6\x8E\xAE",
+ "\xDE\xE8" => "\xE6\x8E\xBC",
+ "\xDE\xE9" => "\xE6\x8F\xB2",
+ "\xDE\xEA" => "\xE6\x8F\xB8",
+ "\xDE\xEB" => "\xE6\x8F\xA0",
+ "\xDE\xEC" => "\xE6\x8F\xBF",
+ "\xDE\xED" => "\xE6\x8F\x84",
+ "\xDE\xEE" => "\xE6\x8F\x9E",
+ "\xDE\xEF" => "\xE6\x8F\x8E",
+ "\xDE\xF0" => "\xE6\x91\x92",
+ "\xDE\xF1" => "\xE6\x8F\x86",
+ "\xDE\xF2" => "\xE6\x8E\xBE",
+ "\xDE\xF3" => "\xE6\x91\x85",
+ "\xDE\xF4" => "\xE6\x91\x81",
+ "\xDE\xF5" => "\xE6\x90\x8B",
+ "\xDE\xF6" => "\xE6\x90\x9B",
+ "\xDE\xF7" => "\xE6\x90\xA0",
+ "\xDE\xF8" => "\xE6\x90\x8C",
+ "\xDE\xF9" => "\xE6\x90\xA6",
+ "\xDE\xFA" => "\xE6\x90\xA1",
+ "\xDE\xFB" => "\xE6\x91\x9E",
+ "\xDE\xFC" => "\xE6\x92\x84",
+ "\xDE\xFD" => "\xE6\x91\xAD",
+ "\xDE\xFE" => "\xE6\x92\x96",
+ "\xDF\xA1" => "\xE6\x91\xBA",
+ "\xDF\xA2" => "\xE6\x92\xB7",
+ "\xDF\xA3" => "\xE6\x92\xB8",
+ "\xDF\xA4" => "\xE6\x92\x99",
+ "\xDF\xA5" => "\xE6\x92\xBA",
+ "\xDF\xA6" => "\xE6\x93\x80",
+ "\xDF\xA7" => "\xE6\x93\x90",
+ "\xDF\xA8" => "\xE6\x93\x97",
+ "\xDF\xA9" => "\xE6\x93\xA4",
+ "\xDF\xAA" => "\xE6\x93\xA2",
+ "\xDF\xAB" => "\xE6\x94\x89",
+ "\xDF\xAC" => "\xE6\x94\xA5",
+ "\xDF\xAD" => "\xE6\x94\xAE",
+ "\xDF\xAE" => "\xE5\xBC\x8B",
+ "\xDF\xAF" => "\xE5\xBF\x92",
+ "\xDF\xB0" => "\xE7\x94\x99",
+ "\xDF\xB1" => "\xE5\xBC\x91",
+ "\xDF\xB2" => "\xE5\x8D\x9F",
+ "\xDF\xB3" => "\xE5\x8F\xB1",
+ "\xDF\xB4" => "\xE5\x8F\xBD",
+ "\xDF\xB5" => "\xE5\x8F\xA9",
+ "\xDF\xB6" => "\xE5\x8F\xA8",
+ "\xDF\xB7" => "\xE5\x8F\xBB",
+ "\xDF\xB8" => "\xE5\x90\x92",
+ "\xDF\xB9" => "\xE5\x90\x96",
+ "\xDF\xBA" => "\xE5\x90\x86",
+ "\xDF\xBB" => "\xE5\x91\x8B",
+ "\xDF\xBC" => "\xE5\x91\x92",
+ "\xDF\xBD" => "\xE5\x91\x93",
+ "\xDF\xBE" => "\xE5\x91\x94",
+ "\xDF\xBF" => "\xE5\x91\x96",
+ "\xDF\xC0" => "\xE5\x91\x83",
+ "\xDF\xC1" => "\xE5\x90\xA1",
+ "\xDF\xC2" => "\xE5\x91\x97",
+ "\xDF\xC3" => "\xE5\x91\x99",
+ "\xDF\xC4" => "\xE5\x90\xA3",
+ "\xDF\xC5" => "\xE5\x90\xB2",
+ "\xDF\xC6" => "\xE5\x92\x82",
+ "\xDF\xC7" => "\xE5\x92\x94",
+ "\xDF\xC8" => "\xE5\x91\xB7",
+ "\xDF\xC9" => "\xE5\x91\xB1",
+ "\xDF\xCA" => "\xE5\x91\xA4",
+ "\xDF\xCB" => "\xE5\x92\x9A",
+ "\xDF\xCC" => "\xE5\x92\x9B",
+ "\xDF\xCD" => "\xE5\x92\x84",
+ "\xDF\xCE" => "\xE5\x91\xB6",
+ "\xDF\xCF" => "\xE5\x91\xA6",
+ "\xDF\xD0" => "\xE5\x92\x9D",
+ "\xDF\xD1" => "\xE5\x93\x90",
+ "\xDF\xD2" => "\xE5\x92\xAD",
+ "\xDF\xD3" => "\xE5\x93\x82",
+ "\xDF\xD4" => "\xE5\x92\xB4",
+ "\xDF\xD5" => "\xE5\x93\x92",
+ "\xDF\xD6" => "\xE5\x92\xA7",
+ "\xDF\xD7" => "\xE5\x92\xA6",
+ "\xDF\xD8" => "\xE5\x93\x93",
+ "\xDF\xD9" => "\xE5\x93\x94",
+ "\xDF\xDA" => "\xE5\x91\xB2",
+ "\xDF\xDB" => "\xE5\x92\xA3",
+ "\xDF\xDC" => "\xE5\x93\x95",
+ "\xDF\xDD" => "\xE5\x92\xBB",
+ "\xDF\xDE" => "\xE5\x92\xBF",
+ "\xDF\xDF" => "\xE5\x93\x8C",
+ "\xDF\xE0" => "\xE5\x93\x99",
+ "\xDF\xE1" => "\xE5\x93\x9A",
+ "\xDF\xE2" => "\xE5\x93\x9C",
+ "\xDF\xE3" => "\xE5\x92\xA9",
+ "\xDF\xE4" => "\xE5\x92\xAA",
+ "\xDF\xE5" => "\xE5\x92\xA4",
+ "\xDF\xE6" => "\xE5\x93\x9D",
+ "\xDF\xE7" => "\xE5\x93\x8F",
+ "\xDF\xE8" => "\xE5\x93\x9E",
+ "\xDF\xE9" => "\xE5\x94\x9B",
+ "\xDF\xEA" => "\xE5\x93\xA7",
+ "\xDF\xEB" => "\xE5\x94\xA0",
+ "\xDF\xEC" => "\xE5\x93\xBD",
+ "\xDF\xED" => "\xE5\x94\x94",
+ "\xDF\xEE" => "\xE5\x93\xB3",
+ "\xDF\xEF" => "\xE5\x94\xA2",
+ "\xDF\xF0" => "\xE5\x94\xA3",
+ "\xDF\xF1" => "\xE5\x94\x8F",
+ "\xDF\xF2" => "\xE5\x94\x91",
+ "\xDF\xF3" => "\xE5\x94\xA7",
+ "\xDF\xF4" => "\xE5\x94\xAA",
+ "\xDF\xF5" => "\xE5\x95\xA7",
+ "\xDF\xF6" => "\xE5\x96\x8F",
+ "\xDF\xF7" => "\xE5\x96\xB5",
+ "\xDF\xF8" => "\xE5\x95\x89",
+ "\xDF\xF9" => "\xE5\x95\xAD",
+ "\xDF\xFA" => "\xE5\x95\x81",
+ "\xDF\xFB" => "\xE5\x95\x95",
+ "\xDF\xFC" => "\xE5\x94\xBF",
+ "\xDF\xFD" => "\xE5\x95\x90",
+ "\xDF\xFE" => "\xE5\x94\xBC",
+ "\xE0\xA1" => "\xE5\x94\xB7",
+ "\xE0\xA2" => "\xE5\x95\x96",
+ "\xE0\xA3" => "\xE5\x95\xB5",
+ "\xE0\xA4" => "\xE5\x95\xB6",
+ "\xE0\xA5" => "\xE5\x95\xB7",
+ "\xE0\xA6" => "\xE5\x94\xB3",
+ "\xE0\xA7" => "\xE5\x94\xB0",
+ "\xE0\xA8" => "\xE5\x95\x9C",
+ "\xE0\xA9" => "\xE5\x96\x8B",
+ "\xE0\xAA" => "\xE5\x97\x92",
+ "\xE0\xAB" => "\xE5\x96\x83",
+ "\xE0\xAC" => "\xE5\x96\xB1",
+ "\xE0\xAD" => "\xE5\x96\xB9",
+ "\xE0\xAE" => "\xE5\x96\x88",
+ "\xE0\xAF" => "\xE5\x96\x81",
+ "\xE0\xB0" => "\xE5\x96\x9F",
+ "\xE0\xB1" => "\xE5\x95\xBE",
+ "\xE0\xB2" => "\xE5\x97\x96",
+ "\xE0\xB3" => "\xE5\x96\x91",
+ "\xE0\xB4" => "\xE5\x95\xBB",
+ "\xE0\xB5" => "\xE5\x97\x9F",
+ "\xE0\xB6" => "\xE5\x96\xBD",
+ "\xE0\xB7" => "\xE5\x96\xBE",
+ "\xE0\xB8" => "\xE5\x96\x94",
+ "\xE0\xB9" => "\xE5\x96\x99",
+ "\xE0\xBA" => "\xE5\x97\xAA",
+ "\xE0\xBB" => "\xE5\x97\xB7",
+ "\xE0\xBC" => "\xE5\x97\x89",
+ "\xE0\xBD" => "\xE5\x98\x9F",
+ "\xE0\xBE" => "\xE5\x97\x91",
+ "\xE0\xBF" => "\xE5\x97\xAB",
+ "\xE0\xC0" => "\xE5\x97\xAC",
+ "\xE0\xC1" => "\xE5\x97\x94",
+ "\xE0\xC2" => "\xE5\x97\xA6",
+ "\xE0\xC3" => "\xE5\x97\x9D",
+ "\xE0\xC4" => "\xE5\x97\x84",
+ "\xE0\xC5" => "\xE5\x97\xAF",
+ "\xE0\xC6" => "\xE5\x97\xA5",
+ "\xE0\xC7" => "\xE5\x97\xB2",
+ "\xE0\xC8" => "\xE5\x97\xB3",
+ "\xE0\xC9" => "\xE5\x97\x8C",
+ "\xE0\xCA" => "\xE5\x97\x8D",
+ "\xE0\xCB" => "\xE5\x97\xA8",
+ "\xE0\xCC" => "\xE5\x97\xB5",
+ "\xE0\xCD" => "\xE5\x97\xA4",
+ "\xE0\xCE" => "\xE8\xBE\x94",
+ "\xE0\xCF" => "\xE5\x98\x9E",
+ "\xE0\xD0" => "\xE5\x98\x88",
+ "\xE0\xD1" => "\xE5\x98\x8C",
+ "\xE0\xD2" => "\xE5\x98\x81",
+ "\xE0\xD3" => "\xE5\x98\xA4",
+ "\xE0\xD4" => "\xE5\x98\xA3",
+ "\xE0\xD5" => "\xE5\x97\xBE",
+ "\xE0\xD6" => "\xE5\x98\x80",
+ "\xE0\xD7" => "\xE5\x98\xA7",
+ "\xE0\xD8" => "\xE5\x98\xAD",
+ "\xE0\xD9" => "\xE5\x99\x98",
+ "\xE0\xDA" => "\xE5\x98\xB9",
+ "\xE0\xDB" => "\xE5\x99\x97",
+ "\xE0\xDC" => "\xE5\x98\xAC",
+ "\xE0\xDD" => "\xE5\x99\x8D",
+ "\xE0\xDE" => "\xE5\x99\xA2",
+ "\xE0\xDF" => "\xE5\x99\x99",
+ "\xE0\xE0" => "\xE5\x99\x9C",
+ "\xE0\xE1" => "\xE5\x99\x8C",
+ "\xE0\xE2" => "\xE5\x99\x94",
+ "\xE0\xE3" => "\xE5\x9A\x86",
+ "\xE0\xE4" => "\xE5\x99\xA4",
+ "\xE0\xE5" => "\xE5\x99\xB1",
+ "\xE0\xE6" => "\xE5\x99\xAB",
+ "\xE0\xE7" => "\xE5\x99\xBB",
+ "\xE0\xE8" => "\xE5\x99\xBC",
+ "\xE0\xE9" => "\xE5\x9A\x85",
+ "\xE0\xEA" => "\xE5\x9A\x93",
+ "\xE0\xEB" => "\xE5\x9A\xAF",
+ "\xE0\xEC" => "\xE5\x9B\x94",
+ "\xE0\xED" => "\xE5\x9B\x97",
+ "\xE0\xEE" => "\xE5\x9B\x9D",
+ "\xE0\xEF" => "\xE5\x9B\xA1",
+ "\xE0\xF0" => "\xE5\x9B\xB5",
+ "\xE0\xF1" => "\xE5\x9B\xAB",
+ "\xE0\xF2" => "\xE5\x9B\xB9",
+ "\xE0\xF3" => "\xE5\x9B\xBF",
+ "\xE0\xF4" => "\xE5\x9C\x84",
+ "\xE0\xF5" => "\xE5\x9C\x8A",
+ "\xE0\xF6" => "\xE5\x9C\x89",
+ "\xE0\xF7" => "\xE5\x9C\x9C",
+ "\xE0\xF8" => "\xE5\xB8\x8F",
+ "\xE0\xF9" => "\xE5\xB8\x99",
+ "\xE0\xFA" => "\xE5\xB8\x94",
+ "\xE0\xFB" => "\xE5\xB8\x91",
+ "\xE0\xFC" => "\xE5\xB8\xB1",
+ "\xE0\xFD" => "\xE5\xB8\xBB",
+ "\xE0\xFE" => "\xE5\xB8\xBC",
+ "\xE1\xA1" => "\xE5\xB8\xB7",
+ "\xE1\xA2" => "\xE5\xB9\x84",
+ "\xE1\xA3" => "\xE5\xB9\x94",
+ "\xE1\xA4" => "\xE5\xB9\x9B",
+ "\xE1\xA5" => "\xE5\xB9\x9E",
+ "\xE1\xA6" => "\xE5\xB9\xA1",
+ "\xE1\xA7" => "\xE5\xB2\x8C",
+ "\xE1\xA8" => "\xE5\xB1\xBA",
+ "\xE1\xA9" => "\xE5\xB2\x8D",
+ "\xE1\xAA" => "\xE5\xB2\x90",
+ "\xE1\xAB" => "\xE5\xB2\x96",
+ "\xE1\xAC" => "\xE5\xB2\x88",
+ "\xE1\xAD" => "\xE5\xB2\x98",
+ "\xE1\xAE" => "\xE5\xB2\x99",
+ "\xE1\xAF" => "\xE5\xB2\x91",
+ "\xE1\xB0" => "\xE5\xB2\x9A",
+ "\xE1\xB1" => "\xE5\xB2\x9C",
+ "\xE1\xB2" => "\xE5\xB2\xB5",
+ "\xE1\xB3" => "\xE5\xB2\xA2",
+ "\xE1\xB4" => "\xE5\xB2\xBD",
+ "\xE1\xB5" => "\xE5\xB2\xAC",
+ "\xE1\xB6" => "\xE5\xB2\xAB",
+ "\xE1\xB7" => "\xE5\xB2\xB1",
+ "\xE1\xB8" => "\xE5\xB2\xA3",
+ "\xE1\xB9" => "\xE5\xB3\x81",
+ "\xE1\xBA" => "\xE5\xB2\xB7",
+ "\xE1\xBB" => "\xE5\xB3\x84",
+ "\xE1\xBC" => "\xE5\xB3\x92",
+ "\xE1\xBD" => "\xE5\xB3\xA4",
+ "\xE1\xBE" => "\xE5\xB3\x8B",
+ "\xE1\xBF" => "\xE5\xB3\xA5",
+ "\xE1\xC0" => "\xE5\xB4\x82",
+ "\xE1\xC1" => "\xE5\xB4\x83",
+ "\xE1\xC2" => "\xE5\xB4\xA7",
+ "\xE1\xC3" => "\xE5\xB4\xA6",
+ "\xE1\xC4" => "\xE5\xB4\xAE",
+ "\xE1\xC5" => "\xE5\xB4\xA4",
+ "\xE1\xC6" => "\xE5\xB4\x9E",
+ "\xE1\xC7" => "\xE5\xB4\x86",
+ "\xE1\xC8" => "\xE5\xB4\x9B",
+ "\xE1\xC9" => "\xE5\xB5\x98",
+ "\xE1\xCA" => "\xE5\xB4\xBE",
+ "\xE1\xCB" => "\xE5\xB4\xB4",
+ "\xE1\xCC" => "\xE5\xB4\xBD",
+ "\xE1\xCD" => "\xE5\xB5\xAC",
+ "\xE1\xCE" => "\xE5\xB5\x9B",
+ "\xE1\xCF" => "\xE5\xB5\xAF",
+ "\xE1\xD0" => "\xE5\xB5\x9D",
+ "\xE1\xD1" => "\xE5\xB5\xAB",
+ "\xE1\xD2" => "\xE5\xB5\x8B",
+ "\xE1\xD3" => "\xE5\xB5\x8A",
+ "\xE1\xD4" => "\xE5\xB5\xA9",
+ "\xE1\xD5" => "\xE5\xB5\xB4",
+ "\xE1\xD6" => "\xE5\xB6\x82",
+ "\xE1\xD7" => "\xE5\xB6\x99",
+ "\xE1\xD8" => "\xE5\xB6\x9D",
+ "\xE1\xD9" => "\xE8\xB1\xB3",
+ "\xE1\xDA" => "\xE5\xB6\xB7",
+ "\xE1\xDB" => "\xE5\xB7\x85",
+ "\xE1\xDC" => "\xE5\xBD\xB3",
+ "\xE1\xDD" => "\xE5\xBD\xB7",
+ "\xE1\xDE" => "\xE5\xBE\x82",
+ "\xE1\xDF" => "\xE5\xBE\x87",
+ "\xE1\xE0" => "\xE5\xBE\x89",
+ "\xE1\xE1" => "\xE5\xBE\x8C",
+ "\xE1\xE2" => "\xE5\xBE\x95",
+ "\xE1\xE3" => "\xE5\xBE\x99",
+ "\xE1\xE4" => "\xE5\xBE\x9C",
+ "\xE1\xE5" => "\xE5\xBE\xA8",
+ "\xE1\xE6" => "\xE5\xBE\xAD",
+ "\xE1\xE7" => "\xE5\xBE\xB5",
+ "\xE1\xE8" => "\xE5\xBE\xBC",
+ "\xE1\xE9" => "\xE8\xA1\xA2",
+ "\xE1\xEA" => "\xE5\xBD\xA1",
+ "\xE1\xEB" => "\xE7\x8A\xAD",
+ "\xE1\xEC" => "\xE7\x8A\xB0",
+ "\xE1\xED" => "\xE7\x8A\xB4",
+ "\xE1\xEE" => "\xE7\x8A\xB7",
+ "\xE1\xEF" => "\xE7\x8A\xB8",
+ "\xE1\xF0" => "\xE7\x8B\x83",
+ "\xE1\xF1" => "\xE7\x8B\x81",
+ "\xE1\xF2" => "\xE7\x8B\x8E",
+ "\xE1\xF3" => "\xE7\x8B\x8D",
+ "\xE1\xF4" => "\xE7\x8B\x92",
+ "\xE1\xF5" => "\xE7\x8B\xA8",
+ "\xE1\xF6" => "\xE7\x8B\xAF",
+ "\xE1\xF7" => "\xE7\x8B\xA9",
+ "\xE1\xF8" => "\xE7\x8B\xB2",
+ "\xE1\xF9" => "\xE7\x8B\xB4",
+ "\xE1\xFA" => "\xE7\x8B\xB7",
+ "\xE1\xFB" => "\xE7\x8C\x81",
+ "\xE1\xFC" => "\xE7\x8B\xB3",
+ "\xE1\xFD" => "\xE7\x8C\x83",
+ "\xE1\xFE" => "\xE7\x8B\xBA",
+ "\xE2\xA1" => "\xE7\x8B\xBB",
+ "\xE2\xA2" => "\xE7\x8C\x97",
+ "\xE2\xA3" => "\xE7\x8C\x93",
+ "\xE2\xA4" => "\xE7\x8C\xA1",
+ "\xE2\xA5" => "\xE7\x8C\x8A",
+ "\xE2\xA6" => "\xE7\x8C\x9E",
+ "\xE2\xA7" => "\xE7\x8C\x9D",
+ "\xE2\xA8" => "\xE7\x8C\x95",
+ "\xE2\xA9" => "\xE7\x8C\xA2",
+ "\xE2\xAA" => "\xE7\x8C\xB9",
+ "\xE2\xAB" => "\xE7\x8C\xA5",
+ "\xE2\xAC" => "\xE7\x8C\xAC",
+ "\xE2\xAD" => "\xE7\x8C\xB8",
+ "\xE2\xAE" => "\xE7\x8C\xB1",
+ "\xE2\xAF" => "\xE7\x8D\x90",
+ "\xE2\xB0" => "\xE7\x8D\x8D",
+ "\xE2\xB1" => "\xE7\x8D\x97",
+ "\xE2\xB2" => "\xE7\x8D\xA0",
+ "\xE2\xB3" => "\xE7\x8D\xAC",
+ "\xE2\xB4" => "\xE7\x8D\xAF",
+ "\xE2\xB5" => "\xE7\x8D\xBE",
+ "\xE2\xB6" => "\xE8\x88\x9B",
+ "\xE2\xB7" => "\xE5\xA4\xA5",
+ "\xE2\xB8" => "\xE9\xA3\xA7",
+ "\xE2\xB9" => "\xE5\xA4\xA4",
+ "\xE2\xBA" => "\xE5\xA4\x82",
+ "\xE2\xBB" => "\xE9\xA5\xA3",
+ "\xE2\xBC" => "\xE9\xA5\xA7",
+ "\xE2\xBD" => "\xE9\xA5\xA8",
+ "\xE2\xBE" => "\xE9\xA5\xA9",
+ "\xE2\xBF" => "\xE9\xA5\xAA",
+ "\xE2\xC0" => "\xE9\xA5\xAB",
+ "\xE2\xC1" => "\xE9\xA5\xAC",
+ "\xE2\xC2" => "\xE9\xA5\xB4",
+ "\xE2\xC3" => "\xE9\xA5\xB7",
+ "\xE2\xC4" => "\xE9\xA5\xBD",
+ "\xE2\xC5" => "\xE9\xA6\x80",
+ "\xE2\xC6" => "\xE9\xA6\x84",
+ "\xE2\xC7" => "\xE9\xA6\x87",
+ "\xE2\xC8" => "\xE9\xA6\x8A",
+ "\xE2\xC9" => "\xE9\xA6\x8D",
+ "\xE2\xCA" => "\xE9\xA6\x90",
+ "\xE2\xCB" => "\xE9\xA6\x91",
+ "\xE2\xCC" => "\xE9\xA6\x93",
+ "\xE2\xCD" => "\xE9\xA6\x94",
+ "\xE2\xCE" => "\xE9\xA6\x95",
+ "\xE2\xCF" => "\xE5\xBA\x80",
+ "\xE2\xD0" => "\xE5\xBA\x91",
+ "\xE2\xD1" => "\xE5\xBA\x8B",
+ "\xE2\xD2" => "\xE5\xBA\x96",
+ "\xE2\xD3" => "\xE5\xBA\xA5",
+ "\xE2\xD4" => "\xE5\xBA\xA0",
+ "\xE2\xD5" => "\xE5\xBA\xB9",
+ "\xE2\xD6" => "\xE5\xBA\xB5",
+ "\xE2\xD7" => "\xE5\xBA\xBE",
+ "\xE2\xD8" => "\xE5\xBA\xB3",
+ "\xE2\xD9" => "\xE8\xB5\x93",
+ "\xE2\xDA" => "\xE5\xBB\x92",
+ "\xE2\xDB" => "\xE5\xBB\x91",
+ "\xE2\xDC" => "\xE5\xBB\x9B",
+ "\xE2\xDD" => "\xE5\xBB\xA8",
+ "\xE2\xDE" => "\xE5\xBB\xAA",
+ "\xE2\xDF" => "\xE8\x86\xBA",
+ "\xE2\xE0" => "\xE5\xBF\x84",
+ "\xE2\xE1" => "\xE5\xBF\x89",
+ "\xE2\xE2" => "\xE5\xBF\x96",
+ "\xE2\xE3" => "\xE5\xBF\x8F",
+ "\xE2\xE4" => "\xE6\x80\x83",
+ "\xE2\xE5" => "\xE5\xBF\xAE",
+ "\xE2\xE6" => "\xE6\x80\x84",
+ "\xE2\xE7" => "\xE5\xBF\xA1",
+ "\xE2\xE8" => "\xE5\xBF\xA4",
+ "\xE2\xE9" => "\xE5\xBF\xBE",
+ "\xE2\xEA" => "\xE6\x80\x85",
+ "\xE2\xEB" => "\xE6\x80\x86",
+ "\xE2\xEC" => "\xE5\xBF\xAA",
+ "\xE2\xED" => "\xE5\xBF\xAD",
+ "\xE2\xEE" => "\xE5\xBF\xB8",
+ "\xE2\xEF" => "\xE6\x80\x99",
+ "\xE2\xF0" => "\xE6\x80\xB5",
+ "\xE2\xF1" => "\xE6\x80\xA6",
+ "\xE2\xF2" => "\xE6\x80\x9B",
+ "\xE2\xF3" => "\xE6\x80\x8F",
+ "\xE2\xF4" => "\xE6\x80\x8D",
+ "\xE2\xF5" => "\xE6\x80\xA9",
+ "\xE2\xF6" => "\xE6\x80\xAB",
+ "\xE2\xF7" => "\xE6\x80\x8A",
+ "\xE2\xF8" => "\xE6\x80\xBF",
+ "\xE2\xF9" => "\xE6\x80\xA1",
+ "\xE2\xFA" => "\xE6\x81\xB8",
+ "\xE2\xFB" => "\xE6\x81\xB9",
+ "\xE2\xFC" => "\xE6\x81\xBB",
+ "\xE2\xFD" => "\xE6\x81\xBA",
+ "\xE2\xFE" => "\xE6\x81\x82",
+ "\xE3\xA1" => "\xE6\x81\xAA",
+ "\xE3\xA2" => "\xE6\x81\xBD",
+ "\xE3\xA3" => "\xE6\x82\x96",
+ "\xE3\xA4" => "\xE6\x82\x9A",
+ "\xE3\xA5" => "\xE6\x82\xAD",
+ "\xE3\xA6" => "\xE6\x82\x9D",
+ "\xE3\xA7" => "\xE6\x82\x83",
+ "\xE3\xA8" => "\xE6\x82\x92",
+ "\xE3\xA9" => "\xE6\x82\x8C",
+ "\xE3\xAA" => "\xE6\x82\x9B",
+ "\xE3\xAB" => "\xE6\x83\xAC",
+ "\xE3\xAC" => "\xE6\x82\xBB",
+ "\xE3\xAD" => "\xE6\x82\xB1",
+ "\xE3\xAE" => "\xE6\x83\x9D",
+ "\xE3\xAF" => "\xE6\x83\x98",
+ "\xE3\xB0" => "\xE6\x83\x86",
+ "\xE3\xB1" => "\xE6\x83\x9A",
+ "\xE3\xB2" => "\xE6\x82\xB4",
+ "\xE3\xB3" => "\xE6\x84\xA0",
+ "\xE3\xB4" => "\xE6\x84\xA6",
+ "\xE3\xB5" => "\xE6\x84\x95",
+ "\xE3\xB6" => "\xE6\x84\xA3",
+ "\xE3\xB7" => "\xE6\x83\xB4",
+ "\xE3\xB8" => "\xE6\x84\x80",
+ "\xE3\xB9" => "\xE6\x84\x8E",
+ "\xE3\xBA" => "\xE6\x84\xAB",
+ "\xE3\xBB" => "\xE6\x85\x8A",
+ "\xE3\xBC" => "\xE6\x85\xB5",
+ "\xE3\xBD" => "\xE6\x86\xAC",
+ "\xE3\xBE" => "\xE6\x86\x94",
+ "\xE3\xBF" => "\xE6\x86\xA7",
+ "\xE3\xC0" => "\xE6\x86\xB7",
+ "\xE3\xC1" => "\xE6\x87\x94",
+ "\xE3\xC2" => "\xE6\x87\xB5",
+ "\xE3\xC3" => "\xE5\xBF\x9D",
+ "\xE3\xC4" => "\xE9\x9A\xB3",
+ "\xE3\xC5" => "\xE9\x97\xA9",
+ "\xE3\xC6" => "\xE9\x97\xAB",
+ "\xE3\xC7" => "\xE9\x97\xB1",
+ "\xE3\xC8" => "\xE9\x97\xB3",
+ "\xE3\xC9" => "\xE9\x97\xB5",
+ "\xE3\xCA" => "\xE9\x97\xB6",
+ "\xE3\xCB" => "\xE9\x97\xBC",
+ "\xE3\xCC" => "\xE9\x97\xBE",
+ "\xE3\xCD" => "\xE9\x98\x83",
+ "\xE3\xCE" => "\xE9\x98\x84",
+ "\xE3\xCF" => "\xE9\x98\x86",
+ "\xE3\xD0" => "\xE9\x98\x88",
+ "\xE3\xD1" => "\xE9\x98\x8A",
+ "\xE3\xD2" => "\xE9\x98\x8B",
+ "\xE3\xD3" => "\xE9\x98\x8C",
+ "\xE3\xD4" => "\xE9\x98\x8D",
+ "\xE3\xD5" => "\xE9\x98\x8F",
+ "\xE3\xD6" => "\xE9\x98\x92",
+ "\xE3\xD7" => "\xE9\x98\x95",
+ "\xE3\xD8" => "\xE9\x98\x96",
+ "\xE3\xD9" => "\xE9\x98\x97",
+ "\xE3\xDA" => "\xE9\x98\x99",
+ "\xE3\xDB" => "\xE9\x98\x9A",
+ "\xE3\xDC" => "\xE4\xB8\xAC",
+ "\xE3\xDD" => "\xE7\x88\xBF",
+ "\xE3\xDE" => "\xE6\x88\x95",
+ "\xE3\xDF" => "\xE6\xB0\xB5",
+ "\xE3\xE0" => "\xE6\xB1\x94",
+ "\xE3\xE1" => "\xE6\xB1\x9C",
+ "\xE3\xE2" => "\xE6\xB1\x8A",
+ "\xE3\xE3" => "\xE6\xB2\xA3",
+ "\xE3\xE4" => "\xE6\xB2\x85",
+ "\xE3\xE5" => "\xE6\xB2\x90",
+ "\xE3\xE6" => "\xE6\xB2\x94",
+ "\xE3\xE7" => "\xE6\xB2\x8C",
+ "\xE3\xE8" => "\xE6\xB1\xA8",
+ "\xE3\xE9" => "\xE6\xB1\xA9",
+ "\xE3\xEA" => "\xE6\xB1\xB4",
+ "\xE3\xEB" => "\xE6\xB1\xB6",
+ "\xE3\xEC" => "\xE6\xB2\x86",
+ "\xE3\xED" => "\xE6\xB2\xA9",
+ "\xE3\xEE" => "\xE6\xB3\x90",
+ "\xE3\xEF" => "\xE6\xB3\x94",
+ "\xE3\xF0" => "\xE6\xB2\xAD",
+ "\xE3\xF1" => "\xE6\xB3\xB7",
+ "\xE3\xF2" => "\xE6\xB3\xB8",
+ "\xE3\xF3" => "\xE6\xB3\xB1",
+ "\xE3\xF4" => "\xE6\xB3\x97",
+ "\xE3\xF5" => "\xE6\xB2\xB2",
+ "\xE3\xF6" => "\xE6\xB3\xA0",
+ "\xE3\xF7" => "\xE6\xB3\x96",
+ "\xE3\xF8" => "\xE6\xB3\xBA",
+ "\xE3\xF9" => "\xE6\xB3\xAB",
+ "\xE3\xFA" => "\xE6\xB3\xAE",
+ "\xE3\xFB" => "\xE6\xB2\xB1",
+ "\xE3\xFC" => "\xE6\xB3\x93",
+ "\xE3\xFD" => "\xE6\xB3\xAF",
+ "\xE3\xFE" => "\xE6\xB3\xBE",
+ "\xE4\xA1" => "\xE6\xB4\xB9",
+ "\xE4\xA2" => "\xE6\xB4\xA7",
+ "\xE4\xA3" => "\xE6\xB4\x8C",
+ "\xE4\xA4" => "\xE6\xB5\x83",
+ "\xE4\xA5" => "\xE6\xB5\x88",
+ "\xE4\xA6" => "\xE6\xB4\x87",
+ "\xE4\xA7" => "\xE6\xB4\x84",
+ "\xE4\xA8" => "\xE6\xB4\x99",
+ "\xE4\xA9" => "\xE6\xB4\x8E",
+ "\xE4\xAA" => "\xE6\xB4\xAB",
+ "\xE4\xAB" => "\xE6\xB5\x8D",
+ "\xE4\xAC" => "\xE6\xB4\xAE",
+ "\xE4\xAD" => "\xE6\xB4\xB5",
+ "\xE4\xAE" => "\xE6\xB4\x9A",
+ "\xE4\xAF" => "\xE6\xB5\x8F",
+ "\xE4\xB0" => "\xE6\xB5\x92",
+ "\xE4\xB1" => "\xE6\xB5\x94",
+ "\xE4\xB2" => "\xE6\xB4\xB3",
+ "\xE4\xB3" => "\xE6\xB6\x91",
+ "\xE4\xB4" => "\xE6\xB5\xAF",
+ "\xE4\xB5" => "\xE6\xB6\x9E",
+ "\xE4\xB6" => "\xE6\xB6\xA0",
+ "\xE4\xB7" => "\xE6\xB5\x9E",
+ "\xE4\xB8" => "\xE6\xB6\x93",
+ "\xE4\xB9" => "\xE6\xB6\x94",
+ "\xE4\xBA" => "\xE6\xB5\x9C",
+ "\xE4\xBB" => "\xE6\xB5\xA0",
+ "\xE4\xBC" => "\xE6\xB5\xBC",
+ "\xE4\xBD" => "\xE6\xB5\xA3",
+ "\xE4\xBE" => "\xE6\xB8\x9A",
+ "\xE4\xBF" => "\xE6\xB7\x87",
+ "\xE4\xC0" => "\xE6\xB7\x85",
+ "\xE4\xC1" => "\xE6\xB7\x9E",
+ "\xE4\xC2" => "\xE6\xB8\x8E",
+ "\xE4\xC3" => "\xE6\xB6\xBF",
+ "\xE4\xC4" => "\xE6\xB7\xA0",
+ "\xE4\xC5" => "\xE6\xB8\x91",
+ "\xE4\xC6" => "\xE6\xB7\xA6",
+ "\xE4\xC7" => "\xE6\xB7\x9D",
+ "\xE4\xC8" => "\xE6\xB7\x99",
+ "\xE4\xC9" => "\xE6\xB8\x96",
+ "\xE4\xCA" => "\xE6\xB6\xAB",
+ "\xE4\xCB" => "\xE6\xB8\x8C",
+ "\xE4\xCC" => "\xE6\xB6\xAE",
+ "\xE4\xCD" => "\xE6\xB8\xAB",
+ "\xE4\xCE" => "\xE6\xB9\xAE",
+ "\xE4\xCF" => "\xE6\xB9\x8E",
+ "\xE4\xD0" => "\xE6\xB9\xAB",
+ "\xE4\xD1" => "\xE6\xBA\xB2",
+ "\xE4\xD2" => "\xE6\xB9\x9F",
+ "\xE4\xD3" => "\xE6\xBA\x86",
+ "\xE4\xD4" => "\xE6\xB9\x93",
+ "\xE4\xD5" => "\xE6\xB9\x94",
+ "\xE4\xD6" => "\xE6\xB8\xB2",
+ "\xE4\xD7" => "\xE6\xB8\xA5",
+ "\xE4\xD8" => "\xE6\xB9\x84",
+ "\xE4\xD9" => "\xE6\xBB\x9F",
+ "\xE4\xDA" => "\xE6\xBA\xB1",
+ "\xE4\xDB" => "\xE6\xBA\x98",
+ "\xE4\xDC" => "\xE6\xBB\xA0",
+ "\xE4\xDD" => "\xE6\xBC\xAD",
+ "\xE4\xDE" => "\xE6\xBB\xA2",
+ "\xE4\xDF" => "\xE6\xBA\xA5",
+ "\xE4\xE0" => "\xE6\xBA\xA7",
+ "\xE4\xE1" => "\xE6\xBA\xBD",
+ "\xE4\xE2" => "\xE6\xBA\xBB",
+ "\xE4\xE3" => "\xE6\xBA\xB7",
+ "\xE4\xE4" => "\xE6\xBB\x97",
+ "\xE4\xE5" => "\xE6\xBA\xB4",
+ "\xE4\xE6" => "\xE6\xBB\x8F",
+ "\xE4\xE7" => "\xE6\xBA\x8F",
+ "\xE4\xE8" => "\xE6\xBB\x82",
+ "\xE4\xE9" => "\xE6\xBA\x9F",
+ "\xE4\xEA" => "\xE6\xBD\xA2",
+ "\xE4\xEB" => "\xE6\xBD\x86",
+ "\xE4\xEC" => "\xE6\xBD\x87",
+ "\xE4\xED" => "\xE6\xBC\xA4",
+ "\xE4\xEE" => "\xE6\xBC\x95",
+ "\xE4\xEF" => "\xE6\xBB\xB9",
+ "\xE4\xF0" => "\xE6\xBC\xAF",
+ "\xE4\xF1" => "\xE6\xBC\xB6",
+ "\xE4\xF2" => "\xE6\xBD\x8B",
+ "\xE4\xF3" => "\xE6\xBD\xB4",
+ "\xE4\xF4" => "\xE6\xBC\xAA",
+ "\xE4\xF5" => "\xE6\xBC\x89",
+ "\xE4\xF6" => "\xE6\xBC\xA9",
+ "\xE4\xF7" => "\xE6\xBE\x89",
+ "\xE4\xF8" => "\xE6\xBE\x8D",
+ "\xE4\xF9" => "\xE6\xBE\x8C",
+ "\xE4\xFA" => "\xE6\xBD\xB8",
+ "\xE4\xFB" => "\xE6\xBD\xB2",
+ "\xE4\xFC" => "\xE6\xBD\xBC",
+ "\xE4\xFD" => "\xE6\xBD\xBA",
+ "\xE4\xFE" => "\xE6\xBF\x91",
+ "\xE5\xA1" => "\xE6\xBF\x89",
+ "\xE5\xA2" => "\xE6\xBE\xA7",
+ "\xE5\xA3" => "\xE6\xBE\xB9",
+ "\xE5\xA4" => "\xE6\xBE\xB6",
+ "\xE5\xA5" => "\xE6\xBF\x82",
+ "\xE5\xA6" => "\xE6\xBF\xA1",
+ "\xE5\xA7" => "\xE6\xBF\xAE",
+ "\xE5\xA8" => "\xE6\xBF\x9E",
+ "\xE5\xA9" => "\xE6\xBF\xA0",
+ "\xE5\xAA" => "\xE6\xBF\xAF",
+ "\xE5\xAB" => "\xE7\x80\x9A",
+ "\xE5\xAC" => "\xE7\x80\xA3",
+ "\xE5\xAD" => "\xE7\x80\x9B",
+ "\xE5\xAE" => "\xE7\x80\xB9",
+ "\xE5\xAF" => "\xE7\x80\xB5",
+ "\xE5\xB0" => "\xE7\x81\x8F",
+ "\xE5\xB1" => "\xE7\x81\x9E",
+ "\xE5\xB2" => "\xE5\xAE\x80",
+ "\xE5\xB3" => "\xE5\xAE\x84",
+ "\xE5\xB4" => "\xE5\xAE\x95",
+ "\xE5\xB5" => "\xE5\xAE\x93",
+ "\xE5\xB6" => "\xE5\xAE\xA5",
+ "\xE5\xB7" => "\xE5\xAE\xB8",
+ "\xE5\xB8" => "\xE7\x94\xAF",
+ "\xE5\xB9" => "\xE9\xAA\x9E",
+ "\xE5\xBA" => "\xE6\x90\xB4",
+ "\xE5\xBB" => "\xE5\xAF\xA4",
+ "\xE5\xBC" => "\xE5\xAF\xAE",
+ "\xE5\xBD" => "\xE8\xA4\xB0",
+ "\xE5\xBE" => "\xE5\xAF\xB0",
+ "\xE5\xBF" => "\xE8\xB9\x87",
+ "\xE5\xC0" => "\xE8\xAC\x87",
+ "\xE5\xC1" => "\xE8\xBE\xB6",
+ "\xE5\xC2" => "\xE8\xBF\x93",
+ "\xE5\xC3" => "\xE8\xBF\x95",
+ "\xE5\xC4" => "\xE8\xBF\xA5",
+ "\xE5\xC5" => "\xE8\xBF\xAE",
+ "\xE5\xC6" => "\xE8\xBF\xA4",
+ "\xE5\xC7" => "\xE8\xBF\xA9",
+ "\xE5\xC8" => "\xE8\xBF\xA6",
+ "\xE5\xC9" => "\xE8\xBF\xB3",
+ "\xE5\xCA" => "\xE8\xBF\xA8",
+ "\xE5\xCB" => "\xE9\x80\x85",
+ "\xE5\xCC" => "\xE9\x80\x84",
+ "\xE5\xCD" => "\xE9\x80\x8B",
+ "\xE5\xCE" => "\xE9\x80\xA6",
+ "\xE5\xCF" => "\xE9\x80\x91",
+ "\xE5\xD0" => "\xE9\x80\x8D",
+ "\xE5\xD1" => "\xE9\x80\x96",
+ "\xE5\xD2" => "\xE9\x80\xA1",
+ "\xE5\xD3" => "\xE9\x80\xB5",
+ "\xE5\xD4" => "\xE9\x80\xB6",
+ "\xE5\xD5" => "\xE9\x80\xAD",
+ "\xE5\xD6" => "\xE9\x80\xAF",
+ "\xE5\xD7" => "\xE9\x81\x84",
+ "\xE5\xD8" => "\xE9\x81\x91",
+ "\xE5\xD9" => "\xE9\x81\x92",
+ "\xE5\xDA" => "\xE9\x81\x90",
+ "\xE5\xDB" => "\xE9\x81\xA8",
+ "\xE5\xDC" => "\xE9\x81\x98",
+ "\xE5\xDD" => "\xE9\x81\xA2",
+ "\xE5\xDE" => "\xE9\x81\x9B",
+ "\xE5\xDF" => "\xE6\x9A\xB9",
+ "\xE5\xE0" => "\xE9\x81\xB4",
+ "\xE5\xE1" => "\xE9\x81\xBD",
+ "\xE5\xE2" => "\xE9\x82\x82",
+ "\xE5\xE3" => "\xE9\x82\x88",
+ "\xE5\xE4" => "\xE9\x82\x83",
+ "\xE5\xE5" => "\xE9\x82\x8B",
+ "\xE5\xE6" => "\xE5\xBD\x90",
+ "\xE5\xE7" => "\xE5\xBD\x97",
+ "\xE5\xE8" => "\xE5\xBD\x96",
+ "\xE5\xE9" => "\xE5\xBD\x98",
+ "\xE5\xEA" => "\xE5\xB0\xBB",
+ "\xE5\xEB" => "\xE5\x92\xAB",
+ "\xE5\xEC" => "\xE5\xB1\x90",
+ "\xE5\xED" => "\xE5\xB1\x99",
+ "\xE5\xEE" => "\xE5\xAD\xB1",
+ "\xE5\xEF" => "\xE5\xB1\xA3",
+ "\xE5\xF0" => "\xE5\xB1\xA6",
+ "\xE5\xF1" => "\xE7\xBE\xBC",
+ "\xE5\xF2" => "\xE5\xBC\xAA",
+ "\xE5\xF3" => "\xE5\xBC\xA9",
+ "\xE5\xF4" => "\xE5\xBC\xAD",
+ "\xE5\xF5" => "\xE8\x89\xB4",
+ "\xE5\xF6" => "\xE5\xBC\xBC",
+ "\xE5\xF7" => "\xE9\xAC\xBB",
+ "\xE5\xF8" => "\xE5\xB1\xAE",
+ "\xE5\xF9" => "\xE5\xA6\x81",
+ "\xE5\xFA" => "\xE5\xA6\x83",
+ "\xE5\xFB" => "\xE5\xA6\x8D",
+ "\xE5\xFC" => "\xE5\xA6\xA9",
+ "\xE5\xFD" => "\xE5\xA6\xAA",
+ "\xE5\xFE" => "\xE5\xA6\xA3",
+ "\xE6\xA1" => "\xE5\xA6\x97",
+ "\xE6\xA2" => "\xE5\xA7\x8A",
+ "\xE6\xA3" => "\xE5\xA6\xAB",
+ "\xE6\xA4" => "\xE5\xA6\x9E",
+ "\xE6\xA5" => "\xE5\xA6\xA4",
+ "\xE6\xA6" => "\xE5\xA7\x92",
+ "\xE6\xA7" => "\xE5\xA6\xB2",
+ "\xE6\xA8" => "\xE5\xA6\xAF",
+ "\xE6\xA9" => "\xE5\xA7\x97",
+ "\xE6\xAA" => "\xE5\xA6\xBE",
+ "\xE6\xAB" => "\xE5\xA8\x85",
+ "\xE6\xAC" => "\xE5\xA8\x86",
+ "\xE6\xAD" => "\xE5\xA7\x9D",
+ "\xE6\xAE" => "\xE5\xA8\x88",
+ "\xE6\xAF" => "\xE5\xA7\xA3",
+ "\xE6\xB0" => "\xE5\xA7\x98",
+ "\xE6\xB1" => "\xE5\xA7\xB9",
+ "\xE6\xB2" => "\xE5\xA8\x8C",
+ "\xE6\xB3" => "\xE5\xA8\x89",
+ "\xE6\xB4" => "\xE5\xA8\xB2",
+ "\xE6\xB5" => "\xE5\xA8\xB4",
+ "\xE6\xB6" => "\xE5\xA8\x91",
+ "\xE6\xB7" => "\xE5\xA8\xA3",
+ "\xE6\xB8" => "\xE5\xA8\x93",
+ "\xE6\xB9" => "\xE5\xA9\x80",
+ "\xE6\xBA" => "\xE5\xA9\xA7",
+ "\xE6\xBB" => "\xE5\xA9\x8A",
+ "\xE6\xBC" => "\xE5\xA9\x95",
+ "\xE6\xBD" => "\xE5\xA8\xBC",
+ "\xE6\xBE" => "\xE5\xA9\xA2",
+ "\xE6\xBF" => "\xE5\xA9\xB5",
+ "\xE6\xC0" => "\xE8\x83\xAC",
+ "\xE6\xC1" => "\xE5\xAA\xAA",
+ "\xE6\xC2" => "\xE5\xAA\x9B",
+ "\xE6\xC3" => "\xE5\xA9\xB7",
+ "\xE6\xC4" => "\xE5\xA9\xBA",
+ "\xE6\xC5" => "\xE5\xAA\xBE",
+ "\xE6\xC6" => "\xE5\xAB\xAB",
+ "\xE6\xC7" => "\xE5\xAA\xB2",
+ "\xE6\xC8" => "\xE5\xAB\x92",
+ "\xE6\xC9" => "\xE5\xAB\x94",
+ "\xE6\xCA" => "\xE5\xAA\xB8",
+ "\xE6\xCB" => "\xE5\xAB\xA0",
+ "\xE6\xCC" => "\xE5\xAB\xA3",
+ "\xE6\xCD" => "\xE5\xAB\xB1",
+ "\xE6\xCE" => "\xE5\xAB\x96",
+ "\xE6\xCF" => "\xE5\xAB\xA6",
+ "\xE6\xD0" => "\xE5\xAB\x98",
+ "\xE6\xD1" => "\xE5\xAB\x9C",
+ "\xE6\xD2" => "\xE5\xAC\x89",
+ "\xE6\xD3" => "\xE5\xAC\x97",
+ "\xE6\xD4" => "\xE5\xAC\x96",
+ "\xE6\xD5" => "\xE5\xAC\xB2",
+ "\xE6\xD6" => "\xE5\xAC\xB7",
+ "\xE6\xD7" => "\xE5\xAD\x80",
+ "\xE6\xD8" => "\xE5\xB0\x95",
+ "\xE6\xD9" => "\xE5\xB0\x9C",
+ "\xE6\xDA" => "\xE5\xAD\x9A",
+ "\xE6\xDB" => "\xE5\xAD\xA5",
+ "\xE6\xDC" => "\xE5\xAD\xB3",
+ "\xE6\xDD" => "\xE5\xAD\x91",
+ "\xE6\xDE" => "\xE5\xAD\x93",
+ "\xE6\xDF" => "\xE5\xAD\xA2",
+ "\xE6\xE0" => "\xE9\xA9\xB5",
+ "\xE6\xE1" => "\xE9\xA9\xB7",
+ "\xE6\xE2" => "\xE9\xA9\xB8",
+ "\xE6\xE3" => "\xE9\xA9\xBA",
+ "\xE6\xE4" => "\xE9\xA9\xBF",
+ "\xE6\xE5" => "\xE9\xA9\xBD",
+ "\xE6\xE6" => "\xE9\xAA\x80",
+ "\xE6\xE7" => "\xE9\xAA\x81",
+ "\xE6\xE8" => "\xE9\xAA\x85",
+ "\xE6\xE9" => "\xE9\xAA\x88",
+ "\xE6\xEA" => "\xE9\xAA\x8A",
+ "\xE6\xEB" => "\xE9\xAA\x90",
+ "\xE6\xEC" => "\xE9\xAA\x92",
+ "\xE6\xED" => "\xE9\xAA\x93",
+ "\xE6\xEE" => "\xE9\xAA\x96",
+ "\xE6\xEF" => "\xE9\xAA\x98",
+ "\xE6\xF0" => "\xE9\xAA\x9B",
+ "\xE6\xF1" => "\xE9\xAA\x9C",
+ "\xE6\xF2" => "\xE9\xAA\x9D",
+ "\xE6\xF3" => "\xE9\xAA\x9F",
+ "\xE6\xF4" => "\xE9\xAA\xA0",
+ "\xE6\xF5" => "\xE9\xAA\xA2",
+ "\xE6\xF6" => "\xE9\xAA\xA3",
+ "\xE6\xF7" => "\xE9\xAA\xA5",
+ "\xE6\xF8" => "\xE9\xAA\xA7",
+ "\xE6\xF9" => "\xE7\xBA\x9F",
+ "\xE6\xFA" => "\xE7\xBA\xA1",
+ "\xE6\xFB" => "\xE7\xBA\xA3",
+ "\xE6\xFC" => "\xE7\xBA\xA5",
+ "\xE6\xFD" => "\xE7\xBA\xA8",
+ "\xE6\xFE" => "\xE7\xBA\xA9",
+ "\xE7\xA1" => "\xE7\xBA\xAD",
+ "\xE7\xA2" => "\xE7\xBA\xB0",
+ "\xE7\xA3" => "\xE7\xBA\xBE",
+ "\xE7\xA4" => "\xE7\xBB\x80",
+ "\xE7\xA5" => "\xE7\xBB\x81",
+ "\xE7\xA6" => "\xE7\xBB\x82",
+ "\xE7\xA7" => "\xE7\xBB\x89",
+ "\xE7\xA8" => "\xE7\xBB\x8B",
+ "\xE7\xA9" => "\xE7\xBB\x8C",
+ "\xE7\xAA" => "\xE7\xBB\x90",
+ "\xE7\xAB" => "\xE7\xBB\x94",
+ "\xE7\xAC" => "\xE7\xBB\x97",
+ "\xE7\xAD" => "\xE7\xBB\x9B",
+ "\xE7\xAE" => "\xE7\xBB\xA0",
+ "\xE7\xAF" => "\xE7\xBB\xA1",
+ "\xE7\xB0" => "\xE7\xBB\xA8",
+ "\xE7\xB1" => "\xE7\xBB\xAB",
+ "\xE7\xB2" => "\xE7\xBB\xAE",
+ "\xE7\xB3" => "\xE7\xBB\xAF",
+ "\xE7\xB4" => "\xE7\xBB\xB1",
+ "\xE7\xB5" => "\xE7\xBB\xB2",
+ "\xE7\xB6" => "\xE7\xBC\x8D",
+ "\xE7\xB7" => "\xE7\xBB\xB6",
+ "\xE7\xB8" => "\xE7\xBB\xBA",
+ "\xE7\xB9" => "\xE7\xBB\xBB",
+ "\xE7\xBA" => "\xE7\xBB\xBE",
+ "\xE7\xBB" => "\xE7\xBC\x81",
+ "\xE7\xBC" => "\xE7\xBC\x82",
+ "\xE7\xBD" => "\xE7\xBC\x83",
+ "\xE7\xBE" => "\xE7\xBC\x87",
+ "\xE7\xBF" => "\xE7\xBC\x88",
+ "\xE7\xC0" => "\xE7\xBC\x8B",
+ "\xE7\xC1" => "\xE7\xBC\x8C",
+ "\xE7\xC2" => "\xE7\xBC\x8F",
+ "\xE7\xC3" => "\xE7\xBC\x91",
+ "\xE7\xC4" => "\xE7\xBC\x92",
+ "\xE7\xC5" => "\xE7\xBC\x97",
+ "\xE7\xC6" => "\xE7\xBC\x99",
+ "\xE7\xC7" => "\xE7\xBC\x9C",
+ "\xE7\xC8" => "\xE7\xBC\x9B",
+ "\xE7\xC9" => "\xE7\xBC\x9F",
+ "\xE7\xCA" => "\xE7\xBC\xA1",
+ "\xE7\xCB" => "\xE7\xBC\xA2",
+ "\xE7\xCC" => "\xE7\xBC\xA3",
+ "\xE7\xCD" => "\xE7\xBC\xA4",
+ "\xE7\xCE" => "\xE7\xBC\xA5",
+ "\xE7\xCF" => "\xE7\xBC\xA6",
+ "\xE7\xD0" => "\xE7\xBC\xA7",
+ "\xE7\xD1" => "\xE7\xBC\xAA",
+ "\xE7\xD2" => "\xE7\xBC\xAB",
+ "\xE7\xD3" => "\xE7\xBC\xAC",
+ "\xE7\xD4" => "\xE7\xBC\xAD",
+ "\xE7\xD5" => "\xE7\xBC\xAF",
+ "\xE7\xD6" => "\xE7\xBC\xB0",
+ "\xE7\xD7" => "\xE7\xBC\xB1",
+ "\xE7\xD8" => "\xE7\xBC\xB2",
+ "\xE7\xD9" => "\xE7\xBC\xB3",
+ "\xE7\xDA" => "\xE7\xBC\xB5",
+ "\xE7\xDB" => "\xE5\xB9\xBA",
+ "\xE7\xDC" => "\xE7\x95\xBF",
+ "\xE7\xDD" => "\xE5\xB7\x9B",
+ "\xE7\xDE" => "\xE7\x94\xBE",
+ "\xE7\xDF" => "\xE9\x82\x95",
+ "\xE7\xE0" => "\xE7\x8E\x8E",
+ "\xE7\xE1" => "\xE7\x8E\x91",
+ "\xE7\xE2" => "\xE7\x8E\xAE",
+ "\xE7\xE3" => "\xE7\x8E\xA2",
+ "\xE7\xE4" => "\xE7\x8E\x9F",
+ "\xE7\xE5" => "\xE7\x8F\x8F",
+ "\xE7\xE6" => "\xE7\x8F\x82",
+ "\xE7\xE7" => "\xE7\x8F\x91",
+ "\xE7\xE8" => "\xE7\x8E\xB7",
+ "\xE7\xE9" => "\xE7\x8E\xB3",
+ "\xE7\xEA" => "\xE7\x8F\x80",
+ "\xE7\xEB" => "\xE7\x8F\x89",
+ "\xE7\xEC" => "\xE7\x8F\x88",
+ "\xE7\xED" => "\xE7\x8F\xA5",
+ "\xE7\xEE" => "\xE7\x8F\x99",
+ "\xE7\xEF" => "\xE9\xA1\xBC",
+ "\xE7\xF0" => "\xE7\x90\x8A",
+ "\xE7\xF1" => "\xE7\x8F\xA9",
+ "\xE7\xF2" => "\xE7\x8F\xA7",
+ "\xE7\xF3" => "\xE7\x8F\x9E",
+ "\xE7\xF4" => "\xE7\x8E\xBA",
+ "\xE7\xF5" => "\xE7\x8F\xB2",
+ "\xE7\xF6" => "\xE7\x90\x8F",
+ "\xE7\xF7" => "\xE7\x90\xAA",
+ "\xE7\xF8" => "\xE7\x91\x9B",
+ "\xE7\xF9" => "\xE7\x90\xA6",
+ "\xE7\xFA" => "\xE7\x90\xA5",
+ "\xE7\xFB" => "\xE7\x90\xA8",
+ "\xE7\xFC" => "\xE7\x90\xB0",
+ "\xE7\xFD" => "\xE7\x90\xAE",
+ "\xE7\xFE" => "\xE7\x90\xAC",
+ "\xE8\xA1" => "\xE7\x90\x9B",
+ "\xE8\xA2" => "\xE7\x90\x9A",
+ "\xE8\xA3" => "\xE7\x91\x81",
+ "\xE8\xA4" => "\xE7\x91\x9C",
+ "\xE8\xA5" => "\xE7\x91\x97",
+ "\xE8\xA6" => "\xE7\x91\x95",
+ "\xE8\xA7" => "\xE7\x91\x99",
+ "\xE8\xA8" => "\xE7\x91\xB7",
+ "\xE8\xA9" => "\xE7\x91\xAD",
+ "\xE8\xAA" => "\xE7\x91\xBE",
+ "\xE8\xAB" => "\xE7\x92\x9C",
+ "\xE8\xAC" => "\xE7\x92\x8E",
+ "\xE8\xAD" => "\xE7\x92\x80",
+ "\xE8\xAE" => "\xE7\x92\x81",
+ "\xE8\xAF" => "\xE7\x92\x87",
+ "\xE8\xB0" => "\xE7\x92\x8B",
+ "\xE8\xB1" => "\xE7\x92\x9E",
+ "\xE8\xB2" => "\xE7\x92\xA8",
+ "\xE8\xB3" => "\xE7\x92\xA9",
+ "\xE8\xB4" => "\xE7\x92\x90",
+ "\xE8\xB5" => "\xE7\x92\xA7",
+ "\xE8\xB6" => "\xE7\x93\x92",
+ "\xE8\xB7" => "\xE7\x92\xBA",
+ "\xE8\xB8" => "\xE9\x9F\xAA",
+ "\xE8\xB9" => "\xE9\x9F\xAB",
+ "\xE8\xBA" => "\xE9\x9F\xAC",
+ "\xE8\xBB" => "\xE6\x9D\x8C",
+ "\xE8\xBC" => "\xE6\x9D\x93",
+ "\xE8\xBD" => "\xE6\x9D\x9E",
+ "\xE8\xBE" => "\xE6\x9D\x88",
+ "\xE8\xBF" => "\xE6\x9D\xA9",
+ "\xE8\xC0" => "\xE6\x9E\xA5",
+ "\xE8\xC1" => "\xE6\x9E\x87",
+ "\xE8\xC2" => "\xE6\x9D\xAA",
+ "\xE8\xC3" => "\xE6\x9D\xB3",
+ "\xE8\xC4" => "\xE6\x9E\x98",
+ "\xE8\xC5" => "\xE6\x9E\xA7",
+ "\xE8\xC6" => "\xE6\x9D\xB5",
+ "\xE8\xC7" => "\xE6\x9E\xA8",
+ "\xE8\xC8" => "\xE6\x9E\x9E",
+ "\xE8\xC9" => "\xE6\x9E\xAD",
+ "\xE8\xCA" => "\xE6\x9E\x8B",
+ "\xE8\xCB" => "\xE6\x9D\xB7",
+ "\xE8\xCC" => "\xE6\x9D\xBC",
+ "\xE8\xCD" => "\xE6\x9F\xB0",
+ "\xE8\xCE" => "\xE6\xA0\x89",
+ "\xE8\xCF" => "\xE6\x9F\x98",
+ "\xE8\xD0" => "\xE6\xA0\x8A",
+ "\xE8\xD1" => "\xE6\x9F\xA9",
+ "\xE8\xD2" => "\xE6\x9E\xB0",
+ "\xE8\xD3" => "\xE6\xA0\x8C",
+ "\xE8\xD4" => "\xE6\x9F\x99",
+ "\xE8\xD5" => "\xE6\x9E\xB5",
+ "\xE8\xD6" => "\xE6\x9F\x9A",
+ "\xE8\xD7" => "\xE6\x9E\xB3",
+ "\xE8\xD8" => "\xE6\x9F\x9D",
+ "\xE8\xD9" => "\xE6\xA0\x80",
+ "\xE8\xDA" => "\xE6\x9F\x83",
+ "\xE8\xDB" => "\xE6\x9E\xB8",
+ "\xE8\xDC" => "\xE6\x9F\xA2",
+ "\xE8\xDD" => "\xE6\xA0\x8E",
+ "\xE8\xDE" => "\xE6\x9F\x81",
+ "\xE8\xDF" => "\xE6\x9F\xBD",
+ "\xE8\xE0" => "\xE6\xA0\xB2",
+ "\xE8\xE1" => "\xE6\xA0\xB3",
+ "\xE8\xE2" => "\xE6\xA1\xA0",
+ "\xE8\xE3" => "\xE6\xA1\xA1",
+ "\xE8\xE4" => "\xE6\xA1\x8E",
+ "\xE8\xE5" => "\xE6\xA1\xA2",
+ "\xE8\xE6" => "\xE6\xA1\x84",
+ "\xE8\xE7" => "\xE6\xA1\xA4",
+ "\xE8\xE8" => "\xE6\xA2\x83",
+ "\xE8\xE9" => "\xE6\xA0\x9D",
+ "\xE8\xEA" => "\xE6\xA1\x95",
+ "\xE8\xEB" => "\xE6\xA1\xA6",
+ "\xE8\xEC" => "\xE6\xA1\x81",
+ "\xE8\xED" => "\xE6\xA1\xA7",
+ "\xE8\xEE" => "\xE6\xA1\x80",
+ "\xE8\xEF" => "\xE6\xA0\xBE",
+ "\xE8\xF0" => "\xE6\xA1\x8A",
+ "\xE8\xF1" => "\xE6\xA1\x89",
+ "\xE8\xF2" => "\xE6\xA0\xA9",
+ "\xE8\xF3" => "\xE6\xA2\xB5",
+ "\xE8\xF4" => "\xE6\xA2\x8F",
+ "\xE8\xF5" => "\xE6\xA1\xB4",
+ "\xE8\xF6" => "\xE6\xA1\xB7",
+ "\xE8\xF7" => "\xE6\xA2\x93",
+ "\xE8\xF8" => "\xE6\xA1\xAB",
+ "\xE8\xF9" => "\xE6\xA3\x82",
+ "\xE8\xFA" => "\xE6\xA5\xAE",
+ "\xE8\xFB" => "\xE6\xA3\xBC",
+ "\xE8\xFC" => "\xE6\xA4\x9F",
+ "\xE8\xFD" => "\xE6\xA4\xA0",
+ "\xE8\xFE" => "\xE6\xA3\xB9",
+ "\xE9\xA1" => "\xE6\xA4\xA4",
+ "\xE9\xA2" => "\xE6\xA3\xB0",
+ "\xE9\xA3" => "\xE6\xA4\x8B",
+ "\xE9\xA4" => "\xE6\xA4\x81",
+ "\xE9\xA5" => "\xE6\xA5\x97",
+ "\xE9\xA6" => "\xE6\xA3\xA3",
+ "\xE9\xA7" => "\xE6\xA4\x90",
+ "\xE9\xA8" => "\xE6\xA5\xB1",
+ "\xE9\xA9" => "\xE6\xA4\xB9",
+ "\xE9\xAA" => "\xE6\xA5\xA0",
+ "\xE9\xAB" => "\xE6\xA5\x82",
+ "\xE9\xAC" => "\xE6\xA5\x9D",
+ "\xE9\xAD" => "\xE6\xA6\x84",
+ "\xE9\xAE" => "\xE6\xA5\xAB",
+ "\xE9\xAF" => "\xE6\xA6\x80",
+ "\xE9\xB0" => "\xE6\xA6\x98",
+ "\xE9\xB1" => "\xE6\xA5\xB8",
+ "\xE9\xB2" => "\xE6\xA4\xB4",
+ "\xE9\xB3" => "\xE6\xA7\x8C",
+ "\xE9\xB4" => "\xE6\xA6\x87",
+ "\xE9\xB5" => "\xE6\xA6\x88",
+ "\xE9\xB6" => "\xE6\xA7\x8E",
+ "\xE9\xB7" => "\xE6\xA6\x89",
+ "\xE9\xB8" => "\xE6\xA5\xA6",
+ "\xE9\xB9" => "\xE6\xA5\xA3",
+ "\xE9\xBA" => "\xE6\xA5\xB9",
+ "\xE9\xBB" => "\xE6\xA6\x9B",
+ "\xE9\xBC" => "\xE6\xA6\xA7",
+ "\xE9\xBD" => "\xE6\xA6\xBB",
+ "\xE9\xBE" => "\xE6\xA6\xAB",
+ "\xE9\xBF" => "\xE6\xA6\xAD",
+ "\xE9\xC0" => "\xE6\xA7\x94",
+ "\xE9\xC1" => "\xE6\xA6\xB1",
+ "\xE9\xC2" => "\xE6\xA7\x81",
+ "\xE9\xC3" => "\xE6\xA7\x8A",
+ "\xE9\xC4" => "\xE6\xA7\x9F",
+ "\xE9\xC5" => "\xE6\xA6\x95",
+ "\xE9\xC6" => "\xE6\xA7\xA0",
+ "\xE9\xC7" => "\xE6\xA6\x8D",
+ "\xE9\xC8" => "\xE6\xA7\xBF",
+ "\xE9\xC9" => "\xE6\xA8\xAF",
+ "\xE9\xCA" => "\xE6\xA7\xAD",
+ "\xE9\xCB" => "\xE6\xA8\x97",
+ "\xE9\xCC" => "\xE6\xA8\x98",
+ "\xE9\xCD" => "\xE6\xA9\xA5",
+ "\xE9\xCE" => "\xE6\xA7\xB2",
+ "\xE9\xCF" => "\xE6\xA9\x84",
+ "\xE9\xD0" => "\xE6\xA8\xBE",
+ "\xE9\xD1" => "\xE6\xAA\xA0",
+ "\xE9\xD2" => "\xE6\xA9\x90",
+ "\xE9\xD3" => "\xE6\xA9\x9B",
+ "\xE9\xD4" => "\xE6\xA8\xB5",
+ "\xE9\xD5" => "\xE6\xAA\x8E",
+ "\xE9\xD6" => "\xE6\xA9\xB9",
+ "\xE9\xD7" => "\xE6\xA8\xBD",
+ "\xE9\xD8" => "\xE6\xA8\xA8",
+ "\xE9\xD9" => "\xE6\xA9\x98",
+ "\xE9\xDA" => "\xE6\xA9\xBC",
+ "\xE9\xDB" => "\xE6\xAA\x91",
+ "\xE9\xDC" => "\xE6\xAA\x90",
+ "\xE9\xDD" => "\xE6\xAA\xA9",
+ "\xE9\xDE" => "\xE6\xAA\x97",
+ "\xE9\xDF" => "\xE6\xAA\xAB",
+ "\xE9\xE0" => "\xE7\x8C\xB7",
+ "\xE9\xE1" => "\xE7\x8D\x92",
+ "\xE9\xE2" => "\xE6\xAE\x81",
+ "\xE9\xE3" => "\xE6\xAE\x82",
+ "\xE9\xE4" => "\xE6\xAE\x87",
+ "\xE9\xE5" => "\xE6\xAE\x84",
+ "\xE9\xE6" => "\xE6\xAE\x92",
+ "\xE9\xE7" => "\xE6\xAE\x93",
+ "\xE9\xE8" => "\xE6\xAE\x8D",
+ "\xE9\xE9" => "\xE6\xAE\x9A",
+ "\xE9\xEA" => "\xE6\xAE\x9B",
+ "\xE9\xEB" => "\xE6\xAE\xA1",
+ "\xE9\xEC" => "\xE6\xAE\xAA",
+ "\xE9\xED" => "\xE8\xBD\xAB",
+ "\xE9\xEE" => "\xE8\xBD\xAD",
+ "\xE9\xEF" => "\xE8\xBD\xB1",
+ "\xE9\xF0" => "\xE8\xBD\xB2",
+ "\xE9\xF1" => "\xE8\xBD\xB3",
+ "\xE9\xF2" => "\xE8\xBD\xB5",
+ "\xE9\xF3" => "\xE8\xBD\xB6",
+ "\xE9\xF4" => "\xE8\xBD\xB8",
+ "\xE9\xF5" => "\xE8\xBD\xB7",
+ "\xE9\xF6" => "\xE8\xBD\xB9",
+ "\xE9\xF7" => "\xE8\xBD\xBA",
+ "\xE9\xF8" => "\xE8\xBD\xBC",
+ "\xE9\xF9" => "\xE8\xBD\xBE",
+ "\xE9\xFA" => "\xE8\xBE\x81",
+ "\xE9\xFB" => "\xE8\xBE\x82",
+ "\xE9\xFC" => "\xE8\xBE\x84",
+ "\xE9\xFD" => "\xE8\xBE\x87",
+ "\xE9\xFE" => "\xE8\xBE\x8B",
+ "\xEA\xA1" => "\xE8\xBE\x8D",
+ "\xEA\xA2" => "\xE8\xBE\x8E",
+ "\xEA\xA3" => "\xE8\xBE\x8F",
+ "\xEA\xA4" => "\xE8\xBE\x98",
+ "\xEA\xA5" => "\xE8\xBE\x9A",
+ "\xEA\xA6" => "\xE8\xBB\x8E",
+ "\xEA\xA7" => "\xE6\x88\x8B",
+ "\xEA\xA8" => "\xE6\x88\x97",
+ "\xEA\xA9" => "\xE6\x88\x9B",
+ "\xEA\xAA" => "\xE6\x88\x9F",
+ "\xEA\xAB" => "\xE6\x88\xA2",
+ "\xEA\xAC" => "\xE6\x88\xA1",
+ "\xEA\xAD" => "\xE6\x88\xA5",
+ "\xEA\xAE" => "\xE6\x88\xA4",
+ "\xEA\xAF" => "\xE6\x88\xAC",
+ "\xEA\xB0" => "\xE8\x87\xA7",
+ "\xEA\xB1" => "\xE7\x93\xAF",
+ "\xEA\xB2" => "\xE7\x93\xB4",
+ "\xEA\xB3" => "\xE7\x93\xBF",
+ "\xEA\xB4" => "\xE7\x94\x8F",
+ "\xEA\xB5" => "\xE7\x94\x91",
+ "\xEA\xB6" => "\xE7\x94\x93",
+ "\xEA\xB7" => "\xE6\x94\xB4",
+ "\xEA\xB8" => "\xE6\x97\xAE",
+ "\xEA\xB9" => "\xE6\x97\xAF",
+ "\xEA\xBA" => "\xE6\x97\xB0",
+ "\xEA\xBB" => "\xE6\x98\x8A",
+ "\xEA\xBC" => "\xE6\x98\x99",
+ "\xEA\xBD" => "\xE6\x9D\xB2",
+ "\xEA\xBE" => "\xE6\x98\x83",
+ "\xEA\xBF" => "\xE6\x98\x95",
+ "\xEA\xC0" => "\xE6\x98\x80",
+ "\xEA\xC1" => "\xE7\x82\x85",
+ "\xEA\xC2" => "\xE6\x9B\xB7",
+ "\xEA\xC3" => "\xE6\x98\x9D",
+ "\xEA\xC4" => "\xE6\x98\xB4",
+ "\xEA\xC5" => "\xE6\x98\xB1",
+ "\xEA\xC6" => "\xE6\x98\xB6",
+ "\xEA\xC7" => "\xE6\x98\xB5",
+ "\xEA\xC8" => "\xE8\x80\x86",
+ "\xEA\xC9" => "\xE6\x99\x9F",
+ "\xEA\xCA" => "\xE6\x99\x94",
+ "\xEA\xCB" => "\xE6\x99\x81",
+ "\xEA\xCC" => "\xE6\x99\x8F",
+ "\xEA\xCD" => "\xE6\x99\x96",
+ "\xEA\xCE" => "\xE6\x99\xA1",
+ "\xEA\xCF" => "\xE6\x99\x97",
+ "\xEA\xD0" => "\xE6\x99\xB7",
+ "\xEA\xD1" => "\xE6\x9A\x84",
+ "\xEA\xD2" => "\xE6\x9A\x8C",
+ "\xEA\xD3" => "\xE6\x9A\xA7",
+ "\xEA\xD4" => "\xE6\x9A\x9D",
+ "\xEA\xD5" => "\xE6\x9A\xBE",
+ "\xEA\xD6" => "\xE6\x9B\x9B",
+ "\xEA\xD7" => "\xE6\x9B\x9C",
+ "\xEA\xD8" => "\xE6\x9B\xA6",
+ "\xEA\xD9" => "\xE6\x9B\xA9",
+ "\xEA\xDA" => "\xE8\xB4\xB2",
+ "\xEA\xDB" => "\xE8\xB4\xB3",
+ "\xEA\xDC" => "\xE8\xB4\xB6",
+ "\xEA\xDD" => "\xE8\xB4\xBB",
+ "\xEA\xDE" => "\xE8\xB4\xBD",
+ "\xEA\xDF" => "\xE8\xB5\x80",
+ "\xEA\xE0" => "\xE8\xB5\x85",
+ "\xEA\xE1" => "\xE8\xB5\x86",
+ "\xEA\xE2" => "\xE8\xB5\x88",
+ "\xEA\xE3" => "\xE8\xB5\x89",
+ "\xEA\xE4" => "\xE8\xB5\x87",
+ "\xEA\xE5" => "\xE8\xB5\x8D",
+ "\xEA\xE6" => "\xE8\xB5\x95",
+ "\xEA\xE7" => "\xE8\xB5\x99",
+ "\xEA\xE8" => "\xE8\xA7\x87",
+ "\xEA\xE9" => "\xE8\xA7\x8A",
+ "\xEA\xEA" => "\xE8\xA7\x8B",
+ "\xEA\xEB" => "\xE8\xA7\x8C",
+ "\xEA\xEC" => "\xE8\xA7\x8E",
+ "\xEA\xED" => "\xE8\xA7\x8F",
+ "\xEA\xEE" => "\xE8\xA7\x90",
+ "\xEA\xEF" => "\xE8\xA7\x91",
+ "\xEA\xF0" => "\xE7\x89\xAE",
+ "\xEA\xF1" => "\xE7\x8A\x9F",
+ "\xEA\xF2" => "\xE7\x89\x9D",
+ "\xEA\xF3" => "\xE7\x89\xA6",
+ "\xEA\xF4" => "\xE7\x89\xAF",
+ "\xEA\xF5" => "\xE7\x89\xBE",
+ "\xEA\xF6" => "\xE7\x89\xBF",
+ "\xEA\xF7" => "\xE7\x8A\x84",
+ "\xEA\xF8" => "\xE7\x8A\x8B",
+ "\xEA\xF9" => "\xE7\x8A\x8D",
+ "\xEA\xFA" => "\xE7\x8A\x8F",
+ "\xEA\xFB" => "\xE7\x8A\x92",
+ "\xEA\xFC" => "\xE6\x8C\x88",
+ "\xEA\xFD" => "\xE6\x8C\xB2",
+ "\xEA\xFE" => "\xE6\x8E\xB0",
+ "\xEB\xA1" => "\xE6\x90\xBF",
+ "\xEB\xA2" => "\xE6\x93\x98",
+ "\xEB\xA3" => "\xE8\x80\x84",
+ "\xEB\xA4" => "\xE6\xAF\xAA",
+ "\xEB\xA5" => "\xE6\xAF\xB3",
+ "\xEB\xA6" => "\xE6\xAF\xBD",
+ "\xEB\xA7" => "\xE6\xAF\xB5",
+ "\xEB\xA8" => "\xE6\xAF\xB9",
+ "\xEB\xA9" => "\xE6\xB0\x85",
+ "\xEB\xAA" => "\xE6\xB0\x87",
+ "\xEB\xAB" => "\xE6\xB0\x86",
+ "\xEB\xAC" => "\xE6\xB0\x8D",
+ "\xEB\xAD" => "\xE6\xB0\x95",
+ "\xEB\xAE" => "\xE6\xB0\x98",
+ "\xEB\xAF" => "\xE6\xB0\x99",
+ "\xEB\xB0" => "\xE6\xB0\x9A",
+ "\xEB\xB1" => "\xE6\xB0\xA1",
+ "\xEB\xB2" => "\xE6\xB0\xA9",
+ "\xEB\xB3" => "\xE6\xB0\xA4",
+ "\xEB\xB4" => "\xE6\xB0\xAA",
+ "\xEB\xB5" => "\xE6\xB0\xB2",
+ "\xEB\xB6" => "\xE6\x94\xB5",
+ "\xEB\xB7" => "\xE6\x95\x95",
+ "\xEB\xB8" => "\xE6\x95\xAB",
+ "\xEB\xB9" => "\xE7\x89\x8D",
+ "\xEB\xBA" => "\xE7\x89\x92",
+ "\xEB\xBB" => "\xE7\x89\x96",
+ "\xEB\xBC" => "\xE7\x88\xB0",
+ "\xEB\xBD" => "\xE8\x99\xA2",
+ "\xEB\xBE" => "\xE5\x88\x96",
+ "\xEB\xBF" => "\xE8\x82\x9F",
+ "\xEB\xC0" => "\xE8\x82\x9C",
+ "\xEB\xC1" => "\xE8\x82\x93",
+ "\xEB\xC2" => "\xE8\x82\xBC",
+ "\xEB\xC3" => "\xE6\x9C\x8A",
+ "\xEB\xC4" => "\xE8\x82\xBD",
+ "\xEB\xC5" => "\xE8\x82\xB1",
+ "\xEB\xC6" => "\xE8\x82\xAB",
+ "\xEB\xC7" => "\xE8\x82\xAD",
+ "\xEB\xC8" => "\xE8\x82\xB4",
+ "\xEB\xC9" => "\xE8\x82\xB7",
+ "\xEB\xCA" => "\xE8\x83\xA7",
+ "\xEB\xCB" => "\xE8\x83\xA8",
+ "\xEB\xCC" => "\xE8\x83\xA9",
+ "\xEB\xCD" => "\xE8\x83\xAA",
+ "\xEB\xCE" => "\xE8\x83\x9B",
+ "\xEB\xCF" => "\xE8\x83\x82",
+ "\xEB\xD0" => "\xE8\x83\x84",
+ "\xEB\xD1" => "\xE8\x83\x99",
+ "\xEB\xD2" => "\xE8\x83\x8D",
+ "\xEB\xD3" => "\xE8\x83\x97",
+ "\xEB\xD4" => "\xE6\x9C\x90",
+ "\xEB\xD5" => "\xE8\x83\x9D",
+ "\xEB\xD6" => "\xE8\x83\xAB",
+ "\xEB\xD7" => "\xE8\x83\xB1",
+ "\xEB\xD8" => "\xE8\x83\xB4",
+ "\xEB\xD9" => "\xE8\x83\xAD",
+ "\xEB\xDA" => "\xE8\x84\x8D",
+ "\xEB\xDB" => "\xE8\x84\x8E",
+ "\xEB\xDC" => "\xE8\x83\xB2",
+ "\xEB\xDD" => "\xE8\x83\xBC",
+ "\xEB\xDE" => "\xE6\x9C\x95",
+ "\xEB\xDF" => "\xE8\x84\x92",
+ "\xEB\xE0" => "\xE8\xB1\x9A",
+ "\xEB\xE1" => "\xE8\x84\xB6",
+ "\xEB\xE2" => "\xE8\x84\x9E",
+ "\xEB\xE3" => "\xE8\x84\xAC",
+ "\xEB\xE4" => "\xE8\x84\x98",
+ "\xEB\xE5" => "\xE8\x84\xB2",
+ "\xEB\xE6" => "\xE8\x85\x88",
+ "\xEB\xE7" => "\xE8\x85\x8C",
+ "\xEB\xE8" => "\xE8\x85\x93",
+ "\xEB\xE9" => "\xE8\x85\xB4",
+ "\xEB\xEA" => "\xE8\x85\x99",
+ "\xEB\xEB" => "\xE8\x85\x9A",
+ "\xEB\xEC" => "\xE8\x85\xB1",
+ "\xEB\xED" => "\xE8\x85\xA0",
+ "\xEB\xEE" => "\xE8\x85\xA9",
+ "\xEB\xEF" => "\xE8\x85\xBC",
+ "\xEB\xF0" => "\xE8\x85\xBD",
+ "\xEB\xF1" => "\xE8\x85\xAD",
+ "\xEB\xF2" => "\xE8\x85\xA7",
+ "\xEB\xF3" => "\xE5\xA1\x8D",
+ "\xEB\xF4" => "\xE5\xAA\xB5",
+ "\xEB\xF5" => "\xE8\x86\x88",
+ "\xEB\xF6" => "\xE8\x86\x82",
+ "\xEB\xF7" => "\xE8\x86\x91",
+ "\xEB\xF8" => "\xE6\xBB\x95",
+ "\xEB\xF9" => "\xE8\x86\xA3",
+ "\xEB\xFA" => "\xE8\x86\xAA",
+ "\xEB\xFB" => "\xE8\x87\x8C",
+ "\xEB\xFC" => "\xE6\x9C\xA6",
+ "\xEB\xFD" => "\xE8\x87\x8A",
+ "\xEB\xFE" => "\xE8\x86\xBB",
+ "\xEC\xA1" => "\xE8\x87\x81",
+ "\xEC\xA2" => "\xE8\x86\xA6",
+ "\xEC\xA3" => "\xE6\xAC\xA4",
+ "\xEC\xA4" => "\xE6\xAC\xB7",
+ "\xEC\xA5" => "\xE6\xAC\xB9",
+ "\xEC\xA6" => "\xE6\xAD\x83",
+ "\xEC\xA7" => "\xE6\xAD\x86",
+ "\xEC\xA8" => "\xE6\xAD\x99",
+ "\xEC\xA9" => "\xE9\xA3\x91",
+ "\xEC\xAA" => "\xE9\xA3\x92",
+ "\xEC\xAB" => "\xE9\xA3\x93",
+ "\xEC\xAC" => "\xE9\xA3\x95",
+ "\xEC\xAD" => "\xE9\xA3\x99",
+ "\xEC\xAE" => "\xE9\xA3\x9A",
+ "\xEC\xAF" => "\xE6\xAE\xB3",
+ "\xEC\xB0" => "\xE5\xBD\x80",
+ "\xEC\xB1" => "\xE6\xAF\x82",
+ "\xEC\xB2" => "\xE8\xA7\xB3",
+ "\xEC\xB3" => "\xE6\x96\x90",
+ "\xEC\xB4" => "\xE9\xBD\x91",
+ "\xEC\xB5" => "\xE6\x96\x93",
+ "\xEC\xB6" => "\xE6\x96\xBC",
+ "\xEC\xB7" => "\xE6\x97\x86",
+ "\xEC\xB8" => "\xE6\x97\x84",
+ "\xEC\xB9" => "\xE6\x97\x83",
+ "\xEC\xBA" => "\xE6\x97\x8C",
+ "\xEC\xBB" => "\xE6\x97\x8E",
+ "\xEC\xBC" => "\xE6\x97\x92",
+ "\xEC\xBD" => "\xE6\x97\x96",
+ "\xEC\xBE" => "\xE7\x82\x80",
+ "\xEC\xBF" => "\xE7\x82\x9C",
+ "\xEC\xC0" => "\xE7\x82\x96",
+ "\xEC\xC1" => "\xE7\x82\x9D",
+ "\xEC\xC2" => "\xE7\x82\xBB",
+ "\xEC\xC3" => "\xE7\x83\x80",
+ "\xEC\xC4" => "\xE7\x82\xB7",
+ "\xEC\xC5" => "\xE7\x82\xAB",
+ "\xEC\xC6" => "\xE7\x82\xB1",
+ "\xEC\xC7" => "\xE7\x83\xA8",
+ "\xEC\xC8" => "\xE7\x83\x8A",
+ "\xEC\xC9" => "\xE7\x84\x90",
+ "\xEC\xCA" => "\xE7\x84\x93",
+ "\xEC\xCB" => "\xE7\x84\x96",
+ "\xEC\xCC" => "\xE7\x84\xAF",
+ "\xEC\xCD" => "\xE7\x84\xB1",
+ "\xEC\xCE" => "\xE7\x85\xB3",
+ "\xEC\xCF" => "\xE7\x85\x9C",
+ "\xEC\xD0" => "\xE7\x85\xA8",
+ "\xEC\xD1" => "\xE7\x85\x85",
+ "\xEC\xD2" => "\xE7\x85\xB2",
+ "\xEC\xD3" => "\xE7\x85\x8A",
+ "\xEC\xD4" => "\xE7\x85\xB8",
+ "\xEC\xD5" => "\xE7\x85\xBA",
+ "\xEC\xD6" => "\xE7\x86\x98",
+ "\xEC\xD7" => "\xE7\x86\xB3",
+ "\xEC\xD8" => "\xE7\x86\xB5",
+ "\xEC\xD9" => "\xE7\x86\xA8",
+ "\xEC\xDA" => "\xE7\x86\xA0",
+ "\xEC\xDB" => "\xE7\x87\xA0",
+ "\xEC\xDC" => "\xE7\x87\x94",
+ "\xEC\xDD" => "\xE7\x87\xA7",
+ "\xEC\xDE" => "\xE7\x87\xB9",
+ "\xEC\xDF" => "\xE7\x88\x9D",
+ "\xEC\xE0" => "\xE7\x88\xA8",
+ "\xEC\xE1" => "\xE7\x81\xAC",
+ "\xEC\xE2" => "\xE7\x84\x98",
+ "\xEC\xE3" => "\xE7\x85\xA6",
+ "\xEC\xE4" => "\xE7\x86\xB9",
+ "\xEC\xE5" => "\xE6\x88\xBE",
+ "\xEC\xE6" => "\xE6\x88\xBD",
+ "\xEC\xE7" => "\xE6\x89\x83",
+ "\xEC\xE8" => "\xE6\x89\x88",
+ "\xEC\xE9" => "\xE6\x89\x89",
+ "\xEC\xEA" => "\xE7\xA4\xBB",
+ "\xEC\xEB" => "\xE7\xA5\x80",
+ "\xEC\xEC" => "\xE7\xA5\x86",
+ "\xEC\xED" => "\xE7\xA5\x89",
+ "\xEC\xEE" => "\xE7\xA5\x9B",
+ "\xEC\xEF" => "\xE7\xA5\x9C",
+ "\xEC\xF0" => "\xE7\xA5\x93",
+ "\xEC\xF1" => "\xE7\xA5\x9A",
+ "\xEC\xF2" => "\xE7\xA5\xA2",
+ "\xEC\xF3" => "\xE7\xA5\x97",
+ "\xEC\xF4" => "\xE7\xA5\xA0",
+ "\xEC\xF5" => "\xE7\xA5\xAF",
+ "\xEC\xF6" => "\xE7\xA5\xA7",
+ "\xEC\xF7" => "\xE7\xA5\xBA",
+ "\xEC\xF8" => "\xE7\xA6\x85",
+ "\xEC\xF9" => "\xE7\xA6\x8A",
+ "\xEC\xFA" => "\xE7\xA6\x9A",
+ "\xEC\xFB" => "\xE7\xA6\xA7",
+ "\xEC\xFC" => "\xE7\xA6\xB3",
+ "\xEC\xFD" => "\xE5\xBF\x91",
+ "\xEC\xFE" => "\xE5\xBF\x90",
+ "\xED\xA1" => "\xE6\x80\xBC",
+ "\xED\xA2" => "\xE6\x81\x9D",
+ "\xED\xA3" => "\xE6\x81\x9A",
+ "\xED\xA4" => "\xE6\x81\xA7",
+ "\xED\xA5" => "\xE6\x81\x81",
+ "\xED\xA6" => "\xE6\x81\x99",
+ "\xED\xA7" => "\xE6\x81\xA3",
+ "\xED\xA8" => "\xE6\x82\xAB",
+ "\xED\xA9" => "\xE6\x84\x86",
+ "\xED\xAA" => "\xE6\x84\x8D",
+ "\xED\xAB" => "\xE6\x85\x9D",
+ "\xED\xAC" => "\xE6\x86\xA9",
+ "\xED\xAD" => "\xE6\x86\x9D",
+ "\xED\xAE" => "\xE6\x87\x8B",
+ "\xED\xAF" => "\xE6\x87\x91",
+ "\xED\xB0" => "\xE6\x88\x86",
+ "\xED\xB1" => "\xE8\x82\x80",
+ "\xED\xB2" => "\xE8\x81\xBF",
+ "\xED\xB3" => "\xE6\xB2\x93",
+ "\xED\xB4" => "\xE6\xB3\xB6",
+ "\xED\xB5" => "\xE6\xB7\xBC",
+ "\xED\xB6" => "\xE7\x9F\xB6",
+ "\xED\xB7" => "\xE7\x9F\xB8",
+ "\xED\xB8" => "\xE7\xA0\x80",
+ "\xED\xB9" => "\xE7\xA0\x89",
+ "\xED\xBA" => "\xE7\xA0\x97",
+ "\xED\xBB" => "\xE7\xA0\x98",
+ "\xED\xBC" => "\xE7\xA0\x91",
+ "\xED\xBD" => "\xE6\x96\xAB",
+ "\xED\xBE" => "\xE7\xA0\xAD",
+ "\xED\xBF" => "\xE7\xA0\x9C",
+ "\xED\xC0" => "\xE7\xA0\x9D",
+ "\xED\xC1" => "\xE7\xA0\xB9",
+ "\xED\xC2" => "\xE7\xA0\xBA",
+ "\xED\xC3" => "\xE7\xA0\xBB",
+ "\xED\xC4" => "\xE7\xA0\x9F",
+ "\xED\xC5" => "\xE7\xA0\xBC",
+ "\xED\xC6" => "\xE7\xA0\xA5",
+ "\xED\xC7" => "\xE7\xA0\xAC",
+ "\xED\xC8" => "\xE7\xA0\xA3",
+ "\xED\xC9" => "\xE7\xA0\xA9",
+ "\xED\xCA" => "\xE7\xA1\x8E",
+ "\xED\xCB" => "\xE7\xA1\xAD",
+ "\xED\xCC" => "\xE7\xA1\x96",
+ "\xED\xCD" => "\xE7\xA1\x97",
+ "\xED\xCE" => "\xE7\xA0\xA6",
+ "\xED\xCF" => "\xE7\xA1\x90",
+ "\xED\xD0" => "\xE7\xA1\x87",
+ "\xED\xD1" => "\xE7\xA1\x8C",
+ "\xED\xD2" => "\xE7\xA1\xAA",
+ "\xED\xD3" => "\xE7\xA2\x9B",
+ "\xED\xD4" => "\xE7\xA2\x93",
+ "\xED\xD5" => "\xE7\xA2\x9A",
+ "\xED\xD6" => "\xE7\xA2\x87",
+ "\xED\xD7" => "\xE7\xA2\x9C",
+ "\xED\xD8" => "\xE7\xA2\xA1",
+ "\xED\xD9" => "\xE7\xA2\xA3",
+ "\xED\xDA" => "\xE7\xA2\xB2",
+ "\xED\xDB" => "\xE7\xA2\xB9",
+ "\xED\xDC" => "\xE7\xA2\xA5",
+ "\xED\xDD" => "\xE7\xA3\x94",
+ "\xED\xDE" => "\xE7\xA3\x99",
+ "\xED\xDF" => "\xE7\xA3\x89",
+ "\xED\xE0" => "\xE7\xA3\xAC",
+ "\xED\xE1" => "\xE7\xA3\xB2",
+ "\xED\xE2" => "\xE7\xA4\x85",
+ "\xED\xE3" => "\xE7\xA3\xB4",
+ "\xED\xE4" => "\xE7\xA4\x93",
+ "\xED\xE5" => "\xE7\xA4\xA4",
+ "\xED\xE6" => "\xE7\xA4\x9E",
+ "\xED\xE7" => "\xE7\xA4\xB4",
+ "\xED\xE8" => "\xE9\xBE\x9B",
+ "\xED\xE9" => "\xE9\xBB\xB9",
+ "\xED\xEA" => "\xE9\xBB\xBB",
+ "\xED\xEB" => "\xE9\xBB\xBC",
+ "\xED\xEC" => "\xE7\x9B\xB1",
+ "\xED\xED" => "\xE7\x9C\x84",
+ "\xED\xEE" => "\xE7\x9C\x8D",
+ "\xED\xEF" => "\xE7\x9B\xB9",
+ "\xED\xF0" => "\xE7\x9C\x87",
+ "\xED\xF1" => "\xE7\x9C\x88",
+ "\xED\xF2" => "\xE7\x9C\x9A",
+ "\xED\xF3" => "\xE7\x9C\xA2",
+ "\xED\xF4" => "\xE7\x9C\x99",
+ "\xED\xF5" => "\xE7\x9C\xAD",
+ "\xED\xF6" => "\xE7\x9C\xA6",
+ "\xED\xF7" => "\xE7\x9C\xB5",
+ "\xED\xF8" => "\xE7\x9C\xB8",
+ "\xED\xF9" => "\xE7\x9D\x90",
+ "\xED\xFA" => "\xE7\x9D\x91",
+ "\xED\xFB" => "\xE7\x9D\x87",
+ "\xED\xFC" => "\xE7\x9D\x83",
+ "\xED\xFD" => "\xE7\x9D\x9A",
+ "\xED\xFE" => "\xE7\x9D\xA8",
+ "\xEE\xA1" => "\xE7\x9D\xA2",
+ "\xEE\xA2" => "\xE7\x9D\xA5",
+ "\xEE\xA3" => "\xE7\x9D\xBF",
+ "\xEE\xA4" => "\xE7\x9E\x8D",
+ "\xEE\xA5" => "\xE7\x9D\xBD",
+ "\xEE\xA6" => "\xE7\x9E\x80",
+ "\xEE\xA7" => "\xE7\x9E\x8C",
+ "\xEE\xA8" => "\xE7\x9E\x91",
+ "\xEE\xA9" => "\xE7\x9E\x9F",
+ "\xEE\xAA" => "\xE7\x9E\xA0",
+ "\xEE\xAB" => "\xE7\x9E\xB0",
+ "\xEE\xAC" => "\xE7\x9E\xB5",
+ "\xEE\xAD" => "\xE7\x9E\xBD",
+ "\xEE\xAE" => "\xE7\x94\xBA",
+ "\xEE\xAF" => "\xE7\x95\x80",
+ "\xEE\xB0" => "\xE7\x95\x8E",
+ "\xEE\xB1" => "\xE7\x95\x8B",
+ "\xEE\xB2" => "\xE7\x95\x88",
+ "\xEE\xB3" => "\xE7\x95\x9B",
+ "\xEE\xB4" => "\xE7\x95\xB2",
+ "\xEE\xB5" => "\xE7\x95\xB9",
+ "\xEE\xB6" => "\xE7\x96\x83",
+ "\xEE\xB7" => "\xE7\xBD\x98",
+ "\xEE\xB8" => "\xE7\xBD\xA1",
+ "\xEE\xB9" => "\xE7\xBD\x9F",
+ "\xEE\xBA" => "\xE8\xA9\x88",
+ "\xEE\xBB" => "\xE7\xBD\xA8",
+ "\xEE\xBC" => "\xE7\xBD\xB4",
+ "\xEE\xBD" => "\xE7\xBD\xB1",
+ "\xEE\xBE" => "\xE7\xBD\xB9",
+ "\xEE\xBF" => "\xE7\xBE\x81",
+ "\xEE\xC0" => "\xE7\xBD\xBE",
+ "\xEE\xC1" => "\xE7\x9B\x8D",
+ "\xEE\xC2" => "\xE7\x9B\xA5",
+ "\xEE\xC3" => "\xE8\xA0\xB2",
+ "\xEE\xC4" => "\xE9\x92\x85",
+ "\xEE\xC5" => "\xE9\x92\x86",
+ "\xEE\xC6" => "\xE9\x92\x87",
+ "\xEE\xC7" => "\xE9\x92\x8B",
+ "\xEE\xC8" => "\xE9\x92\x8A",
+ "\xEE\xC9" => "\xE9\x92\x8C",
+ "\xEE\xCA" => "\xE9\x92\x8D",
+ "\xEE\xCB" => "\xE9\x92\x8F",
+ "\xEE\xCC" => "\xE9\x92\x90",
+ "\xEE\xCD" => "\xE9\x92\x94",
+ "\xEE\xCE" => "\xE9\x92\x97",
+ "\xEE\xCF" => "\xE9\x92\x95",
+ "\xEE\xD0" => "\xE9\x92\x9A",
+ "\xEE\xD1" => "\xE9\x92\x9B",
+ "\xEE\xD2" => "\xE9\x92\x9C",
+ "\xEE\xD3" => "\xE9\x92\xA3",
+ "\xEE\xD4" => "\xE9\x92\xA4",
+ "\xEE\xD5" => "\xE9\x92\xAB",
+ "\xEE\xD6" => "\xE9\x92\xAA",
+ "\xEE\xD7" => "\xE9\x92\xAD",
+ "\xEE\xD8" => "\xE9\x92\xAC",
+ "\xEE\xD9" => "\xE9\x92\xAF",
+ "\xEE\xDA" => "\xE9\x92\xB0",
+ "\xEE\xDB" => "\xE9\x92\xB2",
+ "\xEE\xDC" => "\xE9\x92\xB4",
+ "\xEE\xDD" => "\xE9\x92\xB6",
+ "\xEE\xDE" => "\xE9\x92\xB7",
+ "\xEE\xDF" => "\xE9\x92\xB8",
+ "\xEE\xE0" => "\xE9\x92\xB9",
+ "\xEE\xE1" => "\xE9\x92\xBA",
+ "\xEE\xE2" => "\xE9\x92\xBC",
+ "\xEE\xE3" => "\xE9\x92\xBD",
+ "\xEE\xE4" => "\xE9\x92\xBF",
+ "\xEE\xE5" => "\xE9\x93\x84",
+ "\xEE\xE6" => "\xE9\x93\x88",
+ "\xEE\xE7" => "\xE9\x93\x89",
+ "\xEE\xE8" => "\xE9\x93\x8A",
+ "\xEE\xE9" => "\xE9\x93\x8B",
+ "\xEE\xEA" => "\xE9\x93\x8C",
+ "\xEE\xEB" => "\xE9\x93\x8D",
+ "\xEE\xEC" => "\xE9\x93\x8E",
+ "\xEE\xED" => "\xE9\x93\x90",
+ "\xEE\xEE" => "\xE9\x93\x91",
+ "\xEE\xEF" => "\xE9\x93\x92",
+ "\xEE\xF0" => "\xE9\x93\x95",
+ "\xEE\xF1" => "\xE9\x93\x96",
+ "\xEE\xF2" => "\xE9\x93\x97",
+ "\xEE\xF3" => "\xE9\x93\x99",
+ "\xEE\xF4" => "\xE9\x93\x98",
+ "\xEE\xF5" => "\xE9\x93\x9B",
+ "\xEE\xF6" => "\xE9\x93\x9E",
+ "\xEE\xF7" => "\xE9\x93\x9F",
+ "\xEE\xF8" => "\xE9\x93\xA0",
+ "\xEE\xF9" => "\xE9\x93\xA2",
+ "\xEE\xFA" => "\xE9\x93\xA4",
+ "\xEE\xFB" => "\xE9\x93\xA5",
+ "\xEE\xFC" => "\xE9\x93\xA7",
+ "\xEE\xFD" => "\xE9\x93\xA8",
+ "\xEE\xFE" => "\xE9\x93\xAA",
+ "\xEF\xA1" => "\xE9\x93\xA9",
+ "\xEF\xA2" => "\xE9\x93\xAB",
+ "\xEF\xA3" => "\xE9\x93\xAE",
+ "\xEF\xA4" => "\xE9\x93\xAF",
+ "\xEF\xA5" => "\xE9\x93\xB3",
+ "\xEF\xA6" => "\xE9\x93\xB4",
+ "\xEF\xA7" => "\xE9\x93\xB5",
+ "\xEF\xA8" => "\xE9\x93\xB7",
+ "\xEF\xA9" => "\xE9\x93\xB9",
+ "\xEF\xAA" => "\xE9\x93\xBC",
+ "\xEF\xAB" => "\xE9\x93\xBD",
+ "\xEF\xAC" => "\xE9\x93\xBF",
+ "\xEF\xAD" => "\xE9\x94\x83",
+ "\xEF\xAE" => "\xE9\x94\x82",
+ "\xEF\xAF" => "\xE9\x94\x86",
+ "\xEF\xB0" => "\xE9\x94\x87",
+ "\xEF\xB1" => "\xE9\x94\x89",
+ "\xEF\xB2" => "\xE9\x94\x8A",
+ "\xEF\xB3" => "\xE9\x94\x8D",
+ "\xEF\xB4" => "\xE9\x94\x8E",
+ "\xEF\xB5" => "\xE9\x94\x8F",
+ "\xEF\xB6" => "\xE9\x94\x92",
+ "\xEF\xB7" => "\xE9\x94\x93",
+ "\xEF\xB8" => "\xE9\x94\x94",
+ "\xEF\xB9" => "\xE9\x94\x95",
+ "\xEF\xBA" => "\xE9\x94\x96",
+ "\xEF\xBB" => "\xE9\x94\x98",
+ "\xEF\xBC" => "\xE9\x94\x9B",
+ "\xEF\xBD" => "\xE9\x94\x9D",
+ "\xEF\xBE" => "\xE9\x94\x9E",
+ "\xEF\xBF" => "\xE9\x94\x9F",
+ "\xEF\xC0" => "\xE9\x94\xA2",
+ "\xEF\xC1" => "\xE9\x94\xAA",
+ "\xEF\xC2" => "\xE9\x94\xAB",
+ "\xEF\xC3" => "\xE9\x94\xA9",
+ "\xEF\xC4" => "\xE9\x94\xAC",
+ "\xEF\xC5" => "\xE9\x94\xB1",
+ "\xEF\xC6" => "\xE9\x94\xB2",
+ "\xEF\xC7" => "\xE9\x94\xB4",
+ "\xEF\xC8" => "\xE9\x94\xB6",
+ "\xEF\xC9" => "\xE9\x94\xB7",
+ "\xEF\xCA" => "\xE9\x94\xB8",
+ "\xEF\xCB" => "\xE9\x94\xBC",
+ "\xEF\xCC" => "\xE9\x94\xBE",
+ "\xEF\xCD" => "\xE9\x94\xBF",
+ "\xEF\xCE" => "\xE9\x95\x82",
+ "\xEF\xCF" => "\xE9\x94\xB5",
+ "\xEF\xD0" => "\xE9\x95\x84",
+ "\xEF\xD1" => "\xE9\x95\x85",
+ "\xEF\xD2" => "\xE9\x95\x86",
+ "\xEF\xD3" => "\xE9\x95\x89",
+ "\xEF\xD4" => "\xE9\x95\x8C",
+ "\xEF\xD5" => "\xE9\x95\x8E",
+ "\xEF\xD6" => "\xE9\x95\x8F",
+ "\xEF\xD7" => "\xE9\x95\x92",
+ "\xEF\xD8" => "\xE9\x95\x93",
+ "\xEF\xD9" => "\xE9\x95\x94",
+ "\xEF\xDA" => "\xE9\x95\x96",
+ "\xEF\xDB" => "\xE9\x95\x97",
+ "\xEF\xDC" => "\xE9\x95\x98",
+ "\xEF\xDD" => "\xE9\x95\x99",
+ "\xEF\xDE" => "\xE9\x95\x9B",
+ "\xEF\xDF" => "\xE9\x95\x9E",
+ "\xEF\xE0" => "\xE9\x95\x9F",
+ "\xEF\xE1" => "\xE9\x95\x9D",
+ "\xEF\xE2" => "\xE9\x95\xA1",
+ "\xEF\xE3" => "\xE9\x95\xA2",
+ "\xEF\xE4" => "\xE9\x95\xA4",
+ "\xEF\xE5" => "\xE9\x95\xA5",
+ "\xEF\xE6" => "\xE9\x95\xA6",
+ "\xEF\xE7" => "\xE9\x95\xA7",
+ "\xEF\xE8" => "\xE9\x95\xA8",
+ "\xEF\xE9" => "\xE9\x95\xA9",
+ "\xEF\xEA" => "\xE9\x95\xAA",
+ "\xEF\xEB" => "\xE9\x95\xAB",
+ "\xEF\xEC" => "\xE9\x95\xAC",
+ "\xEF\xED" => "\xE9\x95\xAF",
+ "\xEF\xEE" => "\xE9\x95\xB1",
+ "\xEF\xEF" => "\xE9\x95\xB2",
+ "\xEF\xF0" => "\xE9\x95\xB3",
+ "\xEF\xF1" => "\xE9\x94\xBA",
+ "\xEF\xF2" => "\xE7\x9F\xA7",
+ "\xEF\xF3" => "\xE7\x9F\xAC",
+ "\xEF\xF4" => "\xE9\x9B\x89",
+ "\xEF\xF5" => "\xE7\xA7\x95",
+ "\xEF\xF6" => "\xE7\xA7\xAD",
+ "\xEF\xF7" => "\xE7\xA7\xA3",
+ "\xEF\xF8" => "\xE7\xA7\xAB",
+ "\xEF\xF9" => "\xE7\xA8\x86",
+ "\xEF\xFA" => "\xE5\xB5\x87",
+ "\xEF\xFB" => "\xE7\xA8\x83",
+ "\xEF\xFC" => "\xE7\xA8\x82",
+ "\xEF\xFD" => "\xE7\xA8\x9E",
+ "\xEF\xFE" => "\xE7\xA8\x94",
+ "\xF0\xA1" => "\xE7\xA8\xB9",
+ "\xF0\xA2" => "\xE7\xA8\xB7",
+ "\xF0\xA3" => "\xE7\xA9\x91",
+ "\xF0\xA4" => "\xE9\xBB\x8F",
+ "\xF0\xA5" => "\xE9\xA6\xA5",
+ "\xF0\xA6" => "\xE7\xA9\xB0",
+ "\xF0\xA7" => "\xE7\x9A\x88",
+ "\xF0\xA8" => "\xE7\x9A\x8E",
+ "\xF0\xA9" => "\xE7\x9A\x93",
+ "\xF0\xAA" => "\xE7\x9A\x99",
+ "\xF0\xAB" => "\xE7\x9A\xA4",
+ "\xF0\xAC" => "\xE7\x93\x9E",
+ "\xF0\xAD" => "\xE7\x93\xA0",
+ "\xF0\xAE" => "\xE7\x94\xAC",
+ "\xF0\xAF" => "\xE9\xB8\xA0",
+ "\xF0\xB0" => "\xE9\xB8\xA2",
+ "\xF0\xB1" => "\xE9\xB8\xA8",
+ "\xF0\xB2" => "\xE9\xB8\xA9",
+ "\xF0\xB3" => "\xE9\xB8\xAA",
+ "\xF0\xB4" => "\xE9\xB8\xAB",
+ "\xF0\xB5" => "\xE9\xB8\xAC",
+ "\xF0\xB6" => "\xE9\xB8\xB2",
+ "\xF0\xB7" => "\xE9\xB8\xB1",
+ "\xF0\xB8" => "\xE9\xB8\xB6",
+ "\xF0\xB9" => "\xE9\xB8\xB8",
+ "\xF0\xBA" => "\xE9\xB8\xB7",
+ "\xF0\xBB" => "\xE9\xB8\xB9",
+ "\xF0\xBC" => "\xE9\xB8\xBA",
+ "\xF0\xBD" => "\xE9\xB8\xBE",
+ "\xF0\xBE" => "\xE9\xB9\x81",
+ "\xF0\xBF" => "\xE9\xB9\x82",
+ "\xF0\xC0" => "\xE9\xB9\x84",
+ "\xF0\xC1" => "\xE9\xB9\x86",
+ "\xF0\xC2" => "\xE9\xB9\x87",
+ "\xF0\xC3" => "\xE9\xB9\x88",
+ "\xF0\xC4" => "\xE9\xB9\x89",
+ "\xF0\xC5" => "\xE9\xB9\x8B",
+ "\xF0\xC6" => "\xE9\xB9\x8C",
+ "\xF0\xC7" => "\xE9\xB9\x8E",
+ "\xF0\xC8" => "\xE9\xB9\x91",
+ "\xF0\xC9" => "\xE9\xB9\x95",
+ "\xF0\xCA" => "\xE9\xB9\x97",
+ "\xF0\xCB" => "\xE9\xB9\x9A",
+ "\xF0\xCC" => "\xE9\xB9\x9B",
+ "\xF0\xCD" => "\xE9\xB9\x9C",
+ "\xF0\xCE" => "\xE9\xB9\x9E",
+ "\xF0\xCF" => "\xE9\xB9\xA3",
+ "\xF0\xD0" => "\xE9\xB9\xA6",
+ "\xF0\xD1" => "\xE9\xB9\xA7",
+ "\xF0\xD2" => "\xE9\xB9\xA8",
+ "\xF0\xD3" => "\xE9\xB9\xA9",
+ "\xF0\xD4" => "\xE9\xB9\xAA",
+ "\xF0\xD5" => "\xE9\xB9\xAB",
+ "\xF0\xD6" => "\xE9\xB9\xAC",
+ "\xF0\xD7" => "\xE9\xB9\xB1",
+ "\xF0\xD8" => "\xE9\xB9\xAD",
+ "\xF0\xD9" => "\xE9\xB9\xB3",
+ "\xF0\xDA" => "\xE7\x96\x92",
+ "\xF0\xDB" => "\xE7\x96\x94",
+ "\xF0\xDC" => "\xE7\x96\x96",
+ "\xF0\xDD" => "\xE7\x96\xA0",
+ "\xF0\xDE" => "\xE7\x96\x9D",
+ "\xF0\xDF" => "\xE7\x96\xAC",
+ "\xF0\xE0" => "\xE7\x96\xA3",
+ "\xF0\xE1" => "\xE7\x96\xB3",
+ "\xF0\xE2" => "\xE7\x96\xB4",
+ "\xF0\xE3" => "\xE7\x96\xB8",
+ "\xF0\xE4" => "\xE7\x97\x84",
+ "\xF0\xE5" => "\xE7\x96\xB1",
+ "\xF0\xE6" => "\xE7\x96\xB0",
+ "\xF0\xE7" => "\xE7\x97\x83",
+ "\xF0\xE8" => "\xE7\x97\x82",
+ "\xF0\xE9" => "\xE7\x97\x96",
+ "\xF0\xEA" => "\xE7\x97\x8D",
+ "\xF0\xEB" => "\xE7\x97\xA3",
+ "\xF0\xEC" => "\xE7\x97\xA8",
+ "\xF0\xED" => "\xE7\x97\xA6",
+ "\xF0\xEE" => "\xE7\x97\xA4",
+ "\xF0\xEF" => "\xE7\x97\xAB",
+ "\xF0\xF0" => "\xE7\x97\xA7",
+ "\xF0\xF1" => "\xE7\x98\x83",
+ "\xF0\xF2" => "\xE7\x97\xB1",
+ "\xF0\xF3" => "\xE7\x97\xBC",
+ "\xF0\xF4" => "\xE7\x97\xBF",
+ "\xF0\xF5" => "\xE7\x98\x90",
+ "\xF0\xF6" => "\xE7\x98\x80",
+ "\xF0\xF7" => "\xE7\x98\x85",
+ "\xF0\xF8" => "\xE7\x98\x8C",
+ "\xF0\xF9" => "\xE7\x98\x97",
+ "\xF0\xFA" => "\xE7\x98\x8A",
+ "\xF0\xFB" => "\xE7\x98\xA5",
+ "\xF0\xFC" => "\xE7\x98\x98",
+ "\xF0\xFD" => "\xE7\x98\x95",
+ "\xF0\xFE" => "\xE7\x98\x99",
+ "\xF1\xA1" => "\xE7\x98\x9B",
+ "\xF1\xA2" => "\xE7\x98\xBC",
+ "\xF1\xA3" => "\xE7\x98\xA2",
+ "\xF1\xA4" => "\xE7\x98\xA0",
+ "\xF1\xA5" => "\xE7\x99\x80",
+ "\xF1\xA6" => "\xE7\x98\xAD",
+ "\xF1\xA7" => "\xE7\x98\xB0",
+ "\xF1\xA8" => "\xE7\x98\xBF",
+ "\xF1\xA9" => "\xE7\x98\xB5",
+ "\xF1\xAA" => "\xE7\x99\x83",
+ "\xF1\xAB" => "\xE7\x98\xBE",
+ "\xF1\xAC" => "\xE7\x98\xB3",
+ "\xF1\xAD" => "\xE7\x99\x8D",
+ "\xF1\xAE" => "\xE7\x99\x9E",
+ "\xF1\xAF" => "\xE7\x99\x94",
+ "\xF1\xB0" => "\xE7\x99\x9C",
+ "\xF1\xB1" => "\xE7\x99\x96",
+ "\xF1\xB2" => "\xE7\x99\xAB",
+ "\xF1\xB3" => "\xE7\x99\xAF",
+ "\xF1\xB4" => "\xE7\xBF\x8A",
+ "\xF1\xB5" => "\xE7\xAB\xA6",
+ "\xF1\xB6" => "\xE7\xA9\xB8",
+ "\xF1\xB7" => "\xE7\xA9\xB9",
+ "\xF1\xB8" => "\xE7\xAA\x80",
+ "\xF1\xB9" => "\xE7\xAA\x86",
+ "\xF1\xBA" => "\xE7\xAA\x88",
+ "\xF1\xBB" => "\xE7\xAA\x95",
+ "\xF1\xBC" => "\xE7\xAA\xA6",
+ "\xF1\xBD" => "\xE7\xAA\xA0",
+ "\xF1\xBE" => "\xE7\xAA\xAC",
+ "\xF1\xBF" => "\xE7\xAA\xA8",
+ "\xF1\xC0" => "\xE7\xAA\xAD",
+ "\xF1\xC1" => "\xE7\xAA\xB3",
+ "\xF1\xC2" => "\xE8\xA1\xA4",
+ "\xF1\xC3" => "\xE8\xA1\xA9",
+ "\xF1\xC4" => "\xE8\xA1\xB2",
+ "\xF1\xC5" => "\xE8\xA1\xBD",
+ "\xF1\xC6" => "\xE8\xA1\xBF",
+ "\xF1\xC7" => "\xE8\xA2\x82",
+ "\xF1\xC8" => "\xE8\xA2\xA2",
+ "\xF1\xC9" => "\xE8\xA3\x86",
+ "\xF1\xCA" => "\xE8\xA2\xB7",
+ "\xF1\xCB" => "\xE8\xA2\xBC",
+ "\xF1\xCC" => "\xE8\xA3\x89",
+ "\xF1\xCD" => "\xE8\xA3\xA2",
+ "\xF1\xCE" => "\xE8\xA3\x8E",
+ "\xF1\xCF" => "\xE8\xA3\xA3",
+ "\xF1\xD0" => "\xE8\xA3\xA5",
+ "\xF1\xD1" => "\xE8\xA3\xB1",
+ "\xF1\xD2" => "\xE8\xA4\x9A",
+ "\xF1\xD3" => "\xE8\xA3\xBC",
+ "\xF1\xD4" => "\xE8\xA3\xA8",
+ "\xF1\xD5" => "\xE8\xA3\xBE",
+ "\xF1\xD6" => "\xE8\xA3\xB0",
+ "\xF1\xD7" => "\xE8\xA4\xA1",
+ "\xF1\xD8" => "\xE8\xA4\x99",
+ "\xF1\xD9" => "\xE8\xA4\x93",
+ "\xF1\xDA" => "\xE8\xA4\x9B",
+ "\xF1\xDB" => "\xE8\xA4\x8A",
+ "\xF1\xDC" => "\xE8\xA4\xB4",
+ "\xF1\xDD" => "\xE8\xA4\xAB",
+ "\xF1\xDE" => "\xE8\xA4\xB6",
+ "\xF1\xDF" => "\xE8\xA5\x81",
+ "\xF1\xE0" => "\xE8\xA5\xA6",
+ "\xF1\xE1" => "\xE8\xA5\xBB",
+ "\xF1\xE2" => "\xE7\x96\x8B",
+ "\xF1\xE3" => "\xE8\x83\xA5",
+ "\xF1\xE4" => "\xE7\x9A\xB2",
+ "\xF1\xE5" => "\xE7\x9A\xB4",
+ "\xF1\xE6" => "\xE7\x9F\x9C",
+ "\xF1\xE7" => "\xE8\x80\x92",
+ "\xF1\xE8" => "\xE8\x80\x94",
+ "\xF1\xE9" => "\xE8\x80\x96",
+ "\xF1\xEA" => "\xE8\x80\x9C",
+ "\xF1\xEB" => "\xE8\x80\xA0",
+ "\xF1\xEC" => "\xE8\x80\xA2",
+ "\xF1\xED" => "\xE8\x80\xA5",
+ "\xF1\xEE" => "\xE8\x80\xA6",
+ "\xF1\xEF" => "\xE8\x80\xA7",
+ "\xF1\xF0" => "\xE8\x80\xA9",
+ "\xF1\xF1" => "\xE8\x80\xA8",
+ "\xF1\xF2" => "\xE8\x80\xB1",
+ "\xF1\xF3" => "\xE8\x80\x8B",
+ "\xF1\xF4" => "\xE8\x80\xB5",
+ "\xF1\xF5" => "\xE8\x81\x83",
+ "\xF1\xF6" => "\xE8\x81\x86",
+ "\xF1\xF7" => "\xE8\x81\x8D",
+ "\xF1\xF8" => "\xE8\x81\x92",
+ "\xF1\xF9" => "\xE8\x81\xA9",
+ "\xF1\xFA" => "\xE8\x81\xB1",
+ "\xF1\xFB" => "\xE8\xA6\x83",
+ "\xF1\xFC" => "\xE9\xA1\xB8",
+ "\xF1\xFD" => "\xE9\xA2\x80",
+ "\xF1\xFE" => "\xE9\xA2\x83",
+ "\xF2\xA1" => "\xE9\xA2\x89",
+ "\xF2\xA2" => "\xE9\xA2\x8C",
+ "\xF2\xA3" => "\xE9\xA2\x8D",
+ "\xF2\xA4" => "\xE9\xA2\x8F",
+ "\xF2\xA5" => "\xE9\xA2\x94",
+ "\xF2\xA6" => "\xE9\xA2\x9A",
+ "\xF2\xA7" => "\xE9\xA2\x9B",
+ "\xF2\xA8" => "\xE9\xA2\x9E",
+ "\xF2\xA9" => "\xE9\xA2\x9F",
+ "\xF2\xAA" => "\xE9\xA2\xA1",
+ "\xF2\xAB" => "\xE9\xA2\xA2",
+ "\xF2\xAC" => "\xE9\xA2\xA5",
+ "\xF2\xAD" => "\xE9\xA2\xA6",
+ "\xF2\xAE" => "\xE8\x99\x8D",
+ "\xF2\xAF" => "\xE8\x99\x94",
+ "\xF2\xB0" => "\xE8\x99\xAC",
+ "\xF2\xB1" => "\xE8\x99\xAE",
+ "\xF2\xB2" => "\xE8\x99\xBF",
+ "\xF2\xB3" => "\xE8\x99\xBA",
+ "\xF2\xB4" => "\xE8\x99\xBC",
+ "\xF2\xB5" => "\xE8\x99\xBB",
+ "\xF2\xB6" => "\xE8\x9A\xA8",
+ "\xF2\xB7" => "\xE8\x9A\x8D",
+ "\xF2\xB8" => "\xE8\x9A\x8B",
+ "\xF2\xB9" => "\xE8\x9A\xAC",
+ "\xF2\xBA" => "\xE8\x9A\x9D",
+ "\xF2\xBB" => "\xE8\x9A\xA7",
+ "\xF2\xBC" => "\xE8\x9A\xA3",
+ "\xF2\xBD" => "\xE8\x9A\xAA",
+ "\xF2\xBE" => "\xE8\x9A\x93",
+ "\xF2\xBF" => "\xE8\x9A\xA9",
+ "\xF2\xC0" => "\xE8\x9A\xB6",
+ "\xF2\xC1" => "\xE8\x9B\x84",
+ "\xF2\xC2" => "\xE8\x9A\xB5",
+ "\xF2\xC3" => "\xE8\x9B\x8E",
+ "\xF2\xC4" => "\xE8\x9A\xB0",
+ "\xF2\xC5" => "\xE8\x9A\xBA",
+ "\xF2\xC6" => "\xE8\x9A\xB1",
+ "\xF2\xC7" => "\xE8\x9A\xAF",
+ "\xF2\xC8" => "\xE8\x9B\x89",
+ "\xF2\xC9" => "\xE8\x9B\x8F",
+ "\xF2\xCA" => "\xE8\x9A\xB4",
+ "\xF2\xCB" => "\xE8\x9B\xA9",
+ "\xF2\xCC" => "\xE8\x9B\xB1",
+ "\xF2\xCD" => "\xE8\x9B\xB2",
+ "\xF2\xCE" => "\xE8\x9B\xAD",
+ "\xF2\xCF" => "\xE8\x9B\xB3",
+ "\xF2\xD0" => "\xE8\x9B\x90",
+ "\xF2\xD1" => "\xE8\x9C\x93",
+ "\xF2\xD2" => "\xE8\x9B\x9E",
+ "\xF2\xD3" => "\xE8\x9B\xB4",
+ "\xF2\xD4" => "\xE8\x9B\x9F",
+ "\xF2\xD5" => "\xE8\x9B\x98",
+ "\xF2\xD6" => "\xE8\x9B\x91",
+ "\xF2\xD7" => "\xE8\x9C\x83",
+ "\xF2\xD8" => "\xE8\x9C\x87",
+ "\xF2\xD9" => "\xE8\x9B\xB8",
+ "\xF2\xDA" => "\xE8\x9C\x88",
+ "\xF2\xDB" => "\xE8\x9C\x8A",
+ "\xF2\xDC" => "\xE8\x9C\x8D",
+ "\xF2\xDD" => "\xE8\x9C\x89",
+ "\xF2\xDE" => "\xE8\x9C\xA3",
+ "\xF2\xDF" => "\xE8\x9C\xBB",
+ "\xF2\xE0" => "\xE8\x9C\x9E",
+ "\xF2\xE1" => "\xE8\x9C\xA5",
+ "\xF2\xE2" => "\xE8\x9C\xAE",
+ "\xF2\xE3" => "\xE8\x9C\x9A",
+ "\xF2\xE4" => "\xE8\x9C\xBE",
+ "\xF2\xE5" => "\xE8\x9D\x88",
+ "\xF2\xE6" => "\xE8\x9C\xB4",
+ "\xF2\xE7" => "\xE8\x9C\xB1",
+ "\xF2\xE8" => "\xE8\x9C\xA9",
+ "\xF2\xE9" => "\xE8\x9C\xB7",
+ "\xF2\xEA" => "\xE8\x9C\xBF",
+ "\xF2\xEB" => "\xE8\x9E\x82",
+ "\xF2\xEC" => "\xE8\x9C\xA2",
+ "\xF2\xED" => "\xE8\x9D\xBD",
+ "\xF2\xEE" => "\xE8\x9D\xBE",
+ "\xF2\xEF" => "\xE8\x9D\xBB",
+ "\xF2\xF0" => "\xE8\x9D\xA0",
+ "\xF2\xF1" => "\xE8\x9D\xB0",
+ "\xF2\xF2" => "\xE8\x9D\x8C",
+ "\xF2\xF3" => "\xE8\x9D\xAE",
+ "\xF2\xF4" => "\xE8\x9E\x8B",
+ "\xF2\xF5" => "\xE8\x9D\x93",
+ "\xF2\xF6" => "\xE8\x9D\xA3",
+ "\xF2\xF7" => "\xE8\x9D\xBC",
+ "\xF2\xF8" => "\xE8\x9D\xA4",
+ "\xF2\xF9" => "\xE8\x9D\x99",
+ "\xF2\xFA" => "\xE8\x9D\xA5",
+ "\xF2\xFB" => "\xE8\x9E\x93",
+ "\xF2\xFC" => "\xE8\x9E\xAF",
+ "\xF2\xFD" => "\xE8\x9E\xA8",
+ "\xF2\xFE" => "\xE8\x9F\x92",
+ "\xF3\xA1" => "\xE8\x9F\x86",
+ "\xF3\xA2" => "\xE8\x9E\x88",
+ "\xF3\xA3" => "\xE8\x9E\x85",
+ "\xF3\xA4" => "\xE8\x9E\xAD",
+ "\xF3\xA5" => "\xE8\x9E\x97",
+ "\xF3\xA6" => "\xE8\x9E\x83",
+ "\xF3\xA7" => "\xE8\x9E\xAB",
+ "\xF3\xA8" => "\xE8\x9F\xA5",
+ "\xF3\xA9" => "\xE8\x9E\xAC",
+ "\xF3\xAA" => "\xE8\x9E\xB5",
+ "\xF3\xAB" => "\xE8\x9E\xB3",
+ "\xF3\xAC" => "\xE8\x9F\x8B",
+ "\xF3\xAD" => "\xE8\x9F\x93",
+ "\xF3\xAE" => "\xE8\x9E\xBD",
+ "\xF3\xAF" => "\xE8\x9F\x91",
+ "\xF3\xB0" => "\xE8\x9F\x80",
+ "\xF3\xB1" => "\xE8\x9F\x8A",
+ "\xF3\xB2" => "\xE8\x9F\x9B",
+ "\xF3\xB3" => "\xE8\x9F\xAA",
+ "\xF3\xB4" => "\xE8\x9F\xA0",
+ "\xF3\xB5" => "\xE8\x9F\xAE",
+ "\xF3\xB6" => "\xE8\xA0\x96",
+ "\xF3\xB7" => "\xE8\xA0\x93",
+ "\xF3\xB8" => "\xE8\x9F\xBE",
+ "\xF3\xB9" => "\xE8\xA0\x8A",
+ "\xF3\xBA" => "\xE8\xA0\x9B",
+ "\xF3\xBB" => "\xE8\xA0\xA1",
+ "\xF3\xBC" => "\xE8\xA0\xB9",
+ "\xF3\xBD" => "\xE8\xA0\xBC",
+ "\xF3\xBE" => "\xE7\xBC\xB6",
+ "\xF3\xBF" => "\xE7\xBD\x82",
+ "\xF3\xC0" => "\xE7\xBD\x84",
+ "\xF3\xC1" => "\xE7\xBD\x85",
+ "\xF3\xC2" => "\xE8\x88\x90",
+ "\xF3\xC3" => "\xE7\xAB\xBA",
+ "\xF3\xC4" => "\xE7\xAB\xBD",
+ "\xF3\xC5" => "\xE7\xAC\x88",
+ "\xF3\xC6" => "\xE7\xAC\x83",
+ "\xF3\xC7" => "\xE7\xAC\x84",
+ "\xF3\xC8" => "\xE7\xAC\x95",
+ "\xF3\xC9" => "\xE7\xAC\x8A",
+ "\xF3\xCA" => "\xE7\xAC\xAB",
+ "\xF3\xCB" => "\xE7\xAC\x8F",
+ "\xF3\xCC" => "\xE7\xAD\x87",
+ "\xF3\xCD" => "\xE7\xAC\xB8",
+ "\xF3\xCE" => "\xE7\xAC\xAA",
+ "\xF3\xCF" => "\xE7\xAC\x99",
+ "\xF3\xD0" => "\xE7\xAC\xAE",
+ "\xF3\xD1" => "\xE7\xAC\xB1",
+ "\xF3\xD2" => "\xE7\xAC\xA0",
+ "\xF3\xD3" => "\xE7\xAC\xA5",
+ "\xF3\xD4" => "\xE7\xAC\xA4",
+ "\xF3\xD5" => "\xE7\xAC\xB3",
+ "\xF3\xD6" => "\xE7\xAC\xBE",
+ "\xF3\xD7" => "\xE7\xAC\x9E",
+ "\xF3\xD8" => "\xE7\xAD\x98",
+ "\xF3\xD9" => "\xE7\xAD\x9A",
+ "\xF3\xDA" => "\xE7\xAD\x85",
+ "\xF3\xDB" => "\xE7\xAD\xB5",
+ "\xF3\xDC" => "\xE7\xAD\x8C",
+ "\xF3\xDD" => "\xE7\xAD\x9D",
+ "\xF3\xDE" => "\xE7\xAD\xA0",
+ "\xF3\xDF" => "\xE7\xAD\xAE",
+ "\xF3\xE0" => "\xE7\xAD\xBB",
+ "\xF3\xE1" => "\xE7\xAD\xA2",
+ "\xF3\xE2" => "\xE7\xAD\xB2",
+ "\xF3\xE3" => "\xE7\xAD\xB1",
+ "\xF3\xE4" => "\xE7\xAE\x90",
+ "\xF3\xE5" => "\xE7\xAE\xA6",
+ "\xF3\xE6" => "\xE7\xAE\xA7",
+ "\xF3\xE7" => "\xE7\xAE\xB8",
+ "\xF3\xE8" => "\xE7\xAE\xAC",
+ "\xF3\xE9" => "\xE7\xAE\x9D",
+ "\xF3\xEA" => "\xE7\xAE\xA8",
+ "\xF3\xEB" => "\xE7\xAE\x85",
+ "\xF3\xEC" => "\xE7\xAE\xAA",
+ "\xF3\xED" => "\xE7\xAE\x9C",
+ "\xF3\xEE" => "\xE7\xAE\xA2",
+ "\xF3\xEF" => "\xE7\xAE\xAB",
+ "\xF3\xF0" => "\xE7\xAE\xB4",
+ "\xF3\xF1" => "\xE7\xAF\x91",
+ "\xF3\xF2" => "\xE7\xAF\x81",
+ "\xF3\xF3" => "\xE7\xAF\x8C",
+ "\xF3\xF4" => "\xE7\xAF\x9D",
+ "\xF3\xF5" => "\xE7\xAF\x9A",
+ "\xF3\xF6" => "\xE7\xAF\xA5",
+ "\xF3\xF7" => "\xE7\xAF\xA6",
+ "\xF3\xF8" => "\xE7\xAF\xAA",
+ "\xF3\xF9" => "\xE7\xB0\x8C",
+ "\xF3\xFA" => "\xE7\xAF\xBE",
+ "\xF3\xFB" => "\xE7\xAF\xBC",
+ "\xF3\xFC" => "\xE7\xB0\x8F",
+ "\xF3\xFD" => "\xE7\xB0\x96",
+ "\xF3\xFE" => "\xE7\xB0\x8B",
+ "\xF4\xA1" => "\xE7\xB0\x9F",
+ "\xF4\xA2" => "\xE7\xB0\xAA",
+ "\xF4\xA3" => "\xE7\xB0\xA6",
+ "\xF4\xA4" => "\xE7\xB0\xB8",
+ "\xF4\xA5" => "\xE7\xB1\x81",
+ "\xF4\xA6" => "\xE7\xB1\x80",
+ "\xF4\xA7" => "\xE8\x87\xBE",
+ "\xF4\xA8" => "\xE8\x88\x81",
+ "\xF4\xA9" => "\xE8\x88\x82",
+ "\xF4\xAA" => "\xE8\x88\x84",
+ "\xF4\xAB" => "\xE8\x87\xAC",
+ "\xF4\xAC" => "\xE8\xA1\x84",
+ "\xF4\xAD" => "\xE8\x88\xA1",
+ "\xF4\xAE" => "\xE8\x88\xA2",
+ "\xF4\xAF" => "\xE8\x88\xA3",
+ "\xF4\xB0" => "\xE8\x88\xAD",
+ "\xF4\xB1" => "\xE8\x88\xAF",
+ "\xF4\xB2" => "\xE8\x88\xA8",
+ "\xF4\xB3" => "\xE8\x88\xAB",
+ "\xF4\xB4" => "\xE8\x88\xB8",
+ "\xF4\xB5" => "\xE8\x88\xBB",
+ "\xF4\xB6" => "\xE8\x88\xB3",
+ "\xF4\xB7" => "\xE8\x88\xB4",
+ "\xF4\xB8" => "\xE8\x88\xBE",
+ "\xF4\xB9" => "\xE8\x89\x84",
+ "\xF4\xBA" => "\xE8\x89\x89",
+ "\xF4\xBB" => "\xE8\x89\x8B",
+ "\xF4\xBC" => "\xE8\x89\x8F",
+ "\xF4\xBD" => "\xE8\x89\x9A",
+ "\xF4\xBE" => "\xE8\x89\x9F",
+ "\xF4\xBF" => "\xE8\x89\xA8",
+ "\xF4\xC0" => "\xE8\xA1\xBE",
+ "\xF4\xC1" => "\xE8\xA2\x85",
+ "\xF4\xC2" => "\xE8\xA2\x88",
+ "\xF4\xC3" => "\xE8\xA3\x98",
+ "\xF4\xC4" => "\xE8\xA3\x9F",
+ "\xF4\xC5" => "\xE8\xA5\x9E",
+ "\xF4\xC6" => "\xE7\xBE\x9D",
+ "\xF4\xC7" => "\xE7\xBE\x9F",
+ "\xF4\xC8" => "\xE7\xBE\xA7",
+ "\xF4\xC9" => "\xE7\xBE\xAF",
+ "\xF4\xCA" => "\xE7\xBE\xB0",
+ "\xF4\xCB" => "\xE7\xBE\xB2",
+ "\xF4\xCC" => "\xE7\xB1\xBC",
+ "\xF4\xCD" => "\xE6\x95\x89",
+ "\xF4\xCE" => "\xE7\xB2\x91",
+ "\xF4\xCF" => "\xE7\xB2\x9D",
+ "\xF4\xD0" => "\xE7\xB2\x9C",
+ "\xF4\xD1" => "\xE7\xB2\x9E",
+ "\xF4\xD2" => "\xE7\xB2\xA2",
+ "\xF4\xD3" => "\xE7\xB2\xB2",
+ "\xF4\xD4" => "\xE7\xB2\xBC",
+ "\xF4\xD5" => "\xE7\xB2\xBD",
+ "\xF4\xD6" => "\xE7\xB3\x81",
+ "\xF4\xD7" => "\xE7\xB3\x87",
+ "\xF4\xD8" => "\xE7\xB3\x8C",
+ "\xF4\xD9" => "\xE7\xB3\x8D",
+ "\xF4\xDA" => "\xE7\xB3\x88",
+ "\xF4\xDB" => "\xE7\xB3\x85",
+ "\xF4\xDC" => "\xE7\xB3\x97",
+ "\xF4\xDD" => "\xE7\xB3\xA8",
+ "\xF4\xDE" => "\xE8\x89\xAE",
+ "\xF4\xDF" => "\xE6\x9A\xA8",
+ "\xF4\xE0" => "\xE7\xBE\xBF",
+ "\xF4\xE1" => "\xE7\xBF\x8E",
+ "\xF4\xE2" => "\xE7\xBF\x95",
+ "\xF4\xE3" => "\xE7\xBF\xA5",
+ "\xF4\xE4" => "\xE7\xBF\xA1",
+ "\xF4\xE5" => "\xE7\xBF\xA6",
+ "\xF4\xE6" => "\xE7\xBF\xA9",
+ "\xF4\xE7" => "\xE7\xBF\xAE",
+ "\xF4\xE8" => "\xE7\xBF\xB3",
+ "\xF4\xE9" => "\xE7\xB3\xB8",
+ "\xF4\xEA" => "\xE7\xB5\xB7",
+ "\xF4\xEB" => "\xE7\xB6\xA6",
+ "\xF4\xEC" => "\xE7\xB6\xAE",
+ "\xF4\xED" => "\xE7\xB9\x87",
+ "\xF4\xEE" => "\xE7\xBA\x9B",
+ "\xF4\xEF" => "\xE9\xBA\xB8",
+ "\xF4\xF0" => "\xE9\xBA\xB4",
+ "\xF4\xF1" => "\xE8\xB5\xB3",
+ "\xF4\xF2" => "\xE8\xB6\x84",
+ "\xF4\xF3" => "\xE8\xB6\x94",
+ "\xF4\xF4" => "\xE8\xB6\x91",
+ "\xF4\xF5" => "\xE8\xB6\xB1",
+ "\xF4\xF6" => "\xE8\xB5\xA7",
+ "\xF4\xF7" => "\xE8\xB5\xAD",
+ "\xF4\xF8" => "\xE8\xB1\x87",
+ "\xF4\xF9" => "\xE8\xB1\x89",
+ "\xF4\xFA" => "\xE9\x85\x8A",
+ "\xF4\xFB" => "\xE9\x85\x90",
+ "\xF4\xFC" => "\xE9\x85\x8E",
+ "\xF4\xFD" => "\xE9\x85\x8F",
+ "\xF4\xFE" => "\xE9\x85\xA4",
+ "\xF5\xA1" => "\xE9\x85\xA2",
+ "\xF5\xA2" => "\xE9\x85\xA1",
+ "\xF5\xA3" => "\xE9\x85\xB0",
+ "\xF5\xA4" => "\xE9\x85\xA9",
+ "\xF5\xA5" => "\xE9\x85\xAF",
+ "\xF5\xA6" => "\xE9\x85\xBD",
+ "\xF5\xA7" => "\xE9\x85\xBE",
+ "\xF5\xA8" => "\xE9\x85\xB2",
+ "\xF5\xA9" => "\xE9\x85\xB4",
+ "\xF5\xAA" => "\xE9\x85\xB9",
+ "\xF5\xAB" => "\xE9\x86\x8C",
+ "\xF5\xAC" => "\xE9\x86\x85",
+ "\xF5\xAD" => "\xE9\x86\x90",
+ "\xF5\xAE" => "\xE9\x86\x8D",
+ "\xF5\xAF" => "\xE9\x86\x91",
+ "\xF5\xB0" => "\xE9\x86\xA2",
+ "\xF5\xB1" => "\xE9\x86\xA3",
+ "\xF5\xB2" => "\xE9\x86\xAA",
+ "\xF5\xB3" => "\xE9\x86\xAD",
+ "\xF5\xB4" => "\xE9\x86\xAE",
+ "\xF5\xB5" => "\xE9\x86\xAF",
+ "\xF5\xB6" => "\xE9\x86\xB5",
+ "\xF5\xB7" => "\xE9\x86\xB4",
+ "\xF5\xB8" => "\xE9\x86\xBA",
+ "\xF5\xB9" => "\xE8\xB1\x95",
+ "\xF5\xBA" => "\xE9\xB9\xBE",
+ "\xF5\xBB" => "\xE8\xB6\xB8",
+ "\xF5\xBC" => "\xE8\xB7\xAB",
+ "\xF5\xBD" => "\xE8\xB8\x85",
+ "\xF5\xBE" => "\xE8\xB9\x99",
+ "\xF5\xBF" => "\xE8\xB9\xA9",
+ "\xF5\xC0" => "\xE8\xB6\xB5",
+ "\xF5\xC1" => "\xE8\xB6\xBF",
+ "\xF5\xC2" => "\xE8\xB6\xBC",
+ "\xF5\xC3" => "\xE8\xB6\xBA",
+ "\xF5\xC4" => "\xE8\xB7\x84",
+ "\xF5\xC5" => "\xE8\xB7\x96",
+ "\xF5\xC6" => "\xE8\xB7\x97",
+ "\xF5\xC7" => "\xE8\xB7\x9A",
+ "\xF5\xC8" => "\xE8\xB7\x9E",
+ "\xF5\xC9" => "\xE8\xB7\x8E",
+ "\xF5\xCA" => "\xE8\xB7\x8F",
+ "\xF5\xCB" => "\xE8\xB7\x9B",
+ "\xF5\xCC" => "\xE8\xB7\x86",
+ "\xF5\xCD" => "\xE8\xB7\xAC",
+ "\xF5\xCE" => "\xE8\xB7\xB7",
+ "\xF5\xCF" => "\xE8\xB7\xB8",
+ "\xF5\xD0" => "\xE8\xB7\xA3",
+ "\xF5\xD1" => "\xE8\xB7\xB9",
+ "\xF5\xD2" => "\xE8\xB7\xBB",
+ "\xF5\xD3" => "\xE8\xB7\xA4",
+ "\xF5\xD4" => "\xE8\xB8\x89",
+ "\xF5\xD5" => "\xE8\xB7\xBD",
+ "\xF5\xD6" => "\xE8\xB8\x94",
+ "\xF5\xD7" => "\xE8\xB8\x9D",
+ "\xF5\xD8" => "\xE8\xB8\x9F",
+ "\xF5\xD9" => "\xE8\xB8\xAC",
+ "\xF5\xDA" => "\xE8\xB8\xAE",
+ "\xF5\xDB" => "\xE8\xB8\xA3",
+ "\xF5\xDC" => "\xE8\xB8\xAF",
+ "\xF5\xDD" => "\xE8\xB8\xBA",
+ "\xF5\xDE" => "\xE8\xB9\x80",
+ "\xF5\xDF" => "\xE8\xB8\xB9",
+ "\xF5\xE0" => "\xE8\xB8\xB5",
+ "\xF5\xE1" => "\xE8\xB8\xBD",
+ "\xF5\xE2" => "\xE8\xB8\xB1",
+ "\xF5\xE3" => "\xE8\xB9\x89",
+ "\xF5\xE4" => "\xE8\xB9\x81",
+ "\xF5\xE5" => "\xE8\xB9\x82",
+ "\xF5\xE6" => "\xE8\xB9\x91",
+ "\xF5\xE7" => "\xE8\xB9\x92",
+ "\xF5\xE8" => "\xE8\xB9\x8A",
+ "\xF5\xE9" => "\xE8\xB9\xB0",
+ "\xF5\xEA" => "\xE8\xB9\xB6",
+ "\xF5\xEB" => "\xE8\xB9\xBC",
+ "\xF5\xEC" => "\xE8\xB9\xAF",
+ "\xF5\xED" => "\xE8\xB9\xB4",
+ "\xF5\xEE" => "\xE8\xBA\x85",
+ "\xF5\xEF" => "\xE8\xBA\x8F",
+ "\xF5\xF0" => "\xE8\xBA\x94",
+ "\xF5\xF1" => "\xE8\xBA\x90",
+ "\xF5\xF2" => "\xE8\xBA\x9C",
+ "\xF5\xF3" => "\xE8\xBA\x9E",
+ "\xF5\xF4" => "\xE8\xB1\xB8",
+ "\xF5\xF5" => "\xE8\xB2\x82",
+ "\xF5\xF6" => "\xE8\xB2\x8A",
+ "\xF5\xF7" => "\xE8\xB2\x85",
+ "\xF5\xF8" => "\xE8\xB2\x98",
+ "\xF5\xF9" => "\xE8\xB2\x94",
+ "\xF5\xFA" => "\xE6\x96\x9B",
+ "\xF5\xFB" => "\xE8\xA7\x96",
+ "\xF5\xFC" => "\xE8\xA7\x9E",
+ "\xF5\xFD" => "\xE8\xA7\x9A",
+ "\xF5\xFE" => "\xE8\xA7\x9C",
+ "\xF6\xA1" => "\xE8\xA7\xA5",
+ "\xF6\xA2" => "\xE8\xA7\xAB",
+ "\xF6\xA3" => "\xE8\xA7\xAF",
+ "\xF6\xA4" => "\xE8\xA8\xBE",
+ "\xF6\xA5" => "\xE8\xAC\xA6",
+ "\xF6\xA6" => "\xE9\x9D\x93",
+ "\xF6\xA7" => "\xE9\x9B\xA9",
+ "\xF6\xA8" => "\xE9\x9B\xB3",
+ "\xF6\xA9" => "\xE9\x9B\xAF",
+ "\xF6\xAA" => "\xE9\x9C\x86",
+ "\xF6\xAB" => "\xE9\x9C\x81",
+ "\xF6\xAC" => "\xE9\x9C\x88",
+ "\xF6\xAD" => "\xE9\x9C\x8F",
+ "\xF6\xAE" => "\xE9\x9C\x8E",
+ "\xF6\xAF" => "\xE9\x9C\xAA",
+ "\xF6\xB0" => "\xE9\x9C\xAD",
+ "\xF6\xB1" => "\xE9\x9C\xB0",
+ "\xF6\xB2" => "\xE9\x9C\xBE",
+ "\xF6\xB3" => "\xE9\xBE\x80",
+ "\xF6\xB4" => "\xE9\xBE\x83",
+ "\xF6\xB5" => "\xE9\xBE\x85",
+ "\xF6\xB6" => "\xE9\xBE\x86",
+ "\xF6\xB7" => "\xE9\xBE\x87",
+ "\xF6\xB8" => "\xE9\xBE\x88",
+ "\xF6\xB9" => "\xE9\xBE\x89",
+ "\xF6\xBA" => "\xE9\xBE\x8A",
+ "\xF6\xBB" => "\xE9\xBE\x8C",
+ "\xF6\xBC" => "\xE9\xBB\xBE",
+ "\xF6\xBD" => "\xE9\xBC\x8B",
+ "\xF6\xBE" => "\xE9\xBC\x8D",
+ "\xF6\xBF" => "\xE9\x9A\xB9",
+ "\xF6\xC0" => "\xE9\x9A\xBC",
+ "\xF6\xC1" => "\xE9\x9A\xBD",
+ "\xF6\xC2" => "\xE9\x9B\x8E",
+ "\xF6\xC3" => "\xE9\x9B\x92",
+ "\xF6\xC4" => "\xE7\x9E\xBF",
+ "\xF6\xC5" => "\xE9\x9B\xA0",
+ "\xF6\xC6" => "\xE9\x8A\x8E",
+ "\xF6\xC7" => "\xE9\x8A\xAE",
+ "\xF6\xC8" => "\xE9\x8B\x88",
+ "\xF6\xC9" => "\xE9\x8C\xBE",
+ "\xF6\xCA" => "\xE9\x8D\xAA",
+ "\xF6\xCB" => "\xE9\x8F\x8A",
+ "\xF6\xCC" => "\xE9\x8E\x8F",
+ "\xF6\xCD" => "\xE9\x90\xBE",
+ "\xF6\xCE" => "\xE9\x91\xAB",
+ "\xF6\xCF" => "\xE9\xB1\xBF",
+ "\xF6\xD0" => "\xE9\xB2\x82",
+ "\xF6\xD1" => "\xE9\xB2\x85",
+ "\xF6\xD2" => "\xE9\xB2\x86",
+ "\xF6\xD3" => "\xE9\xB2\x87",
+ "\xF6\xD4" => "\xE9\xB2\x88",
+ "\xF6\xD5" => "\xE7\xA8\xA3",
+ "\xF6\xD6" => "\xE9\xB2\x8B",
+ "\xF6\xD7" => "\xE9\xB2\x8E",
+ "\xF6\xD8" => "\xE9\xB2\x90",
+ "\xF6\xD9" => "\xE9\xB2\x91",
+ "\xF6\xDA" => "\xE9\xB2\x92",
+ "\xF6\xDB" => "\xE9\xB2\x94",
+ "\xF6\xDC" => "\xE9\xB2\x95",
+ "\xF6\xDD" => "\xE9\xB2\x9A",
+ "\xF6\xDE" => "\xE9\xB2\x9B",
+ "\xF6\xDF" => "\xE9\xB2\x9E",
+ "\xF6\xE0" => "\xE9\xB2\x9F",
+ "\xF6\xE1" => "\xE9\xB2\xA0",
+ "\xF6\xE2" => "\xE9\xB2\xA1",
+ "\xF6\xE3" => "\xE9\xB2\xA2",
+ "\xF6\xE4" => "\xE9\xB2\xA3",
+ "\xF6\xE5" => "\xE9\xB2\xA5",
+ "\xF6\xE6" => "\xE9\xB2\xA6",
+ "\xF6\xE7" => "\xE9\xB2\xA7",
+ "\xF6\xE8" => "\xE9\xB2\xA8",
+ "\xF6\xE9" => "\xE9\xB2\xA9",
+ "\xF6\xEA" => "\xE9\xB2\xAB",
+ "\xF6\xEB" => "\xE9\xB2\xAD",
+ "\xF6\xEC" => "\xE9\xB2\xAE",
+ "\xF6\xED" => "\xE9\xB2\xB0",
+ "\xF6\xEE" => "\xE9\xB2\xB1",
+ "\xF6\xEF" => "\xE9\xB2\xB2",
+ "\xF6\xF0" => "\xE9\xB2\xB3",
+ "\xF6\xF1" => "\xE9\xB2\xB4",
+ "\xF6\xF2" => "\xE9\xB2\xB5",
+ "\xF6\xF3" => "\xE9\xB2\xB6",
+ "\xF6\xF4" => "\xE9\xB2\xB7",
+ "\xF6\xF5" => "\xE9\xB2\xBA",
+ "\xF6\xF6" => "\xE9\xB2\xBB",
+ "\xF6\xF7" => "\xE9\xB2\xBC",
+ "\xF6\xF8" => "\xE9\xB2\xBD",
+ "\xF6\xF9" => "\xE9\xB3\x84",
+ "\xF6\xFA" => "\xE9\xB3\x85",
+ "\xF6\xFB" => "\xE9\xB3\x86",
+ "\xF6\xFC" => "\xE9\xB3\x87",
+ "\xF6\xFD" => "\xE9\xB3\x8A",
+ "\xF6\xFE" => "\xE9\xB3\x8B",
+ "\xF7\xA1" => "\xE9\xB3\x8C",
+ "\xF7\xA2" => "\xE9\xB3\x8D",
+ "\xF7\xA3" => "\xE9\xB3\x8E",
+ "\xF7\xA4" => "\xE9\xB3\x8F",
+ "\xF7\xA5" => "\xE9\xB3\x90",
+ "\xF7\xA6" => "\xE9\xB3\x93",
+ "\xF7\xA7" => "\xE9\xB3\x94",
+ "\xF7\xA8" => "\xE9\xB3\x95",
+ "\xF7\xA9" => "\xE9\xB3\x97",
+ "\xF7\xAA" => "\xE9\xB3\x98",
+ "\xF7\xAB" => "\xE9\xB3\x99",
+ "\xF7\xAC" => "\xE9\xB3\x9C",
+ "\xF7\xAD" => "\xE9\xB3\x9D",
+ "\xF7\xAE" => "\xE9\xB3\x9F",
+ "\xF7\xAF" => "\xE9\xB3\xA2",
+ "\xF7\xB0" => "\xE9\x9D\xBC",
+ "\xF7\xB1" => "\xE9\x9E\x85",
+ "\xF7\xB2" => "\xE9\x9E\x91",
+ "\xF7\xB3" => "\xE9\x9E\x92",
+ "\xF7\xB4" => "\xE9\x9E\x94",
+ "\xF7\xB5" => "\xE9\x9E\xAF",
+ "\xF7\xB6" => "\xE9\x9E\xAB",
+ "\xF7\xB7" => "\xE9\x9E\xA3",
+ "\xF7\xB8" => "\xE9\x9E\xB2",
+ "\xF7\xB9" => "\xE9\x9E\xB4",
+ "\xF7\xBA" => "\xE9\xAA\xB1",
+ "\xF7\xBB" => "\xE9\xAA\xB0",
+ "\xF7\xBC" => "\xE9\xAA\xB7",
+ "\xF7\xBD" => "\xE9\xB9\x98",
+ "\xF7\xBE" => "\xE9\xAA\xB6",
+ "\xF7\xBF" => "\xE9\xAA\xBA",
+ "\xF7\xC0" => "\xE9\xAA\xBC",
+ "\xF7\xC1" => "\xE9\xAB\x81",
+ "\xF7\xC2" => "\xE9\xAB\x80",
+ "\xF7\xC3" => "\xE9\xAB\x85",
+ "\xF7\xC4" => "\xE9\xAB\x82",
+ "\xF7\xC5" => "\xE9\xAB\x8B",
+ "\xF7\xC6" => "\xE9\xAB\x8C",
+ "\xF7\xC7" => "\xE9\xAB\x91",
+ "\xF7\xC8" => "\xE9\xAD\x85",
+ "\xF7\xC9" => "\xE9\xAD\x83",
+ "\xF7\xCA" => "\xE9\xAD\x87",
+ "\xF7\xCB" => "\xE9\xAD\x89",
+ "\xF7\xCC" => "\xE9\xAD\x88",
+ "\xF7\xCD" => "\xE9\xAD\x8D",
+ "\xF7\xCE" => "\xE9\xAD\x91",
+ "\xF7\xCF" => "\xE9\xA3\xA8",
+ "\xF7\xD0" => "\xE9\xA4\x8D",
+ "\xF7\xD1" => "\xE9\xA4\xAE",
+ "\xF7\xD2" => "\xE9\xA5\x95",
+ "\xF7\xD3" => "\xE9\xA5\x94",
+ "\xF7\xD4" => "\xE9\xAB\x9F",
+ "\xF7\xD5" => "\xE9\xAB\xA1",
+ "\xF7\xD6" => "\xE9\xAB\xA6",
+ "\xF7\xD7" => "\xE9\xAB\xAF",
+ "\xF7\xD8" => "\xE9\xAB\xAB",
+ "\xF7\xD9" => "\xE9\xAB\xBB",
+ "\xF7\xDA" => "\xE9\xAB\xAD",
+ "\xF7\xDB" => "\xE9\xAB\xB9",
+ "\xF7\xDC" => "\xE9\xAC\x88",
+ "\xF7\xDD" => "\xE9\xAC\x8F",
+ "\xF7\xDE" => "\xE9\xAC\x93",
+ "\xF7\xDF" => "\xE9\xAC\x9F",
+ "\xF7\xE0" => "\xE9\xAC\xA3",
+ "\xF7\xE1" => "\xE9\xBA\xBD",
+ "\xF7\xE2" => "\xE9\xBA\xBE",
+ "\xF7\xE3" => "\xE7\xB8\xBB",
+ "\xF7\xE4" => "\xE9\xBA\x82",
+ "\xF7\xE5" => "\xE9\xBA\x87",
+ "\xF7\xE6" => "\xE9\xBA\x88",
+ "\xF7\xE7" => "\xE9\xBA\x8B",
+ "\xF7\xE8" => "\xE9\xBA\x92",
+ "\xF7\xE9" => "\xE9\x8F\x96",
+ "\xF7\xEA" => "\xE9\xBA\x9D",
+ "\xF7\xEB" => "\xE9\xBA\x9F",
+ "\xF7\xEC" => "\xE9\xBB\x9B",
+ "\xF7\xED" => "\xE9\xBB\x9C",
+ "\xF7\xEE" => "\xE9\xBB\x9D",
+ "\xF7\xEF" => "\xE9\xBB\xA0",
+ "\xF7\xF0" => "\xE9\xBB\x9F",
+ "\xF7\xF1" => "\xE9\xBB\xA2",
+ "\xF7\xF2" => "\xE9\xBB\xA9",
+ "\xF7\xF3" => "\xE9\xBB\xA7",
+ "\xF7\xF4" => "\xE9\xBB\xA5",
+ "\xF7\xF5" => "\xE9\xBB\xAA",
+ "\xF7\xF6" => "\xE9\xBB\xAF",
+ "\xF7\xF7" => "\xE9\xBC\xA2",
+ "\xF7\xF8" => "\xE9\xBC\xAC",
+ "\xF7\xF9" => "\xE9\xBC\xAF",
+ "\xF7\xFA" => "\xE9\xBC\xB9",
+ "\xF7\xFB" => "\xE9\xBC\xB7",
+ "\xF7\xFC" => "\xE9\xBC\xBD",
+ "\xF7\xFD" => "\xE9\xBC\xBE",
+ "\xF7\xFE" => "\xE9\xBD\x84",
+ );
+ return strtr($string, $transform);
+}
+
+function sjis($string)
+{
+ static $transform = array(
+ "\x5C"=>"\xC2\xA5",
+ "\x7E"=>"\xE2\x80\xBE",
+ "\x81\x40"=>"\xE3\x80\x80",
+ "\x81\x41"=>"\xE3\x80\x81",
+ "\x81\x42"=>"\xE3\x80\x82",
+ "\x81\x43"=>"\xEF\xBC\x8C",
+ "\x81\x44"=>"\xEF\xBC\x8E",
+ "\x81\x45"=>"\xE3\x83\xBB",
+ "\x81\x46"=>"\xEF\xBC\x9A",
+ "\x81\x47"=>"\xEF\xBC\x9B",
+ "\x81\x48"=>"\xEF\xBC\x9F",
+ "\x81\x49"=>"\xEF\xBC\x81",
+ "\x81\x4A"=>"\xE3\x82\x9B",
+ "\x81\x4B"=>"\xE3\x82\x9C",
+ "\x81\x4C"=>"\xC2\xB4",
+ "\x81\x4D"=>"\xEF\xBD\x80",
+ "\x81\x4E"=>"\xC2\xA8",
+ "\x81\x4F"=>"\xEF\xBC\xBE",
+ "\x81\x50"=>"\xEF\xBF\xA3",
+ "\x81\x51"=>"\xEF\xBC\xBF",
+ "\x81\x52"=>"\xE3\x83\xBD",
+ "\x81\x53"=>"\xE3\x83\xBE",
+ "\x81\x54"=>"\xE3\x82\x9D",
+ "\x81\x55"=>"\xE3\x82\x9E",
+ "\x81\x56"=>"\xE3\x80\x83",
+ "\x81\x57"=>"\xE4\xBB\x9D",
+ "\x81\x58"=>"\xE3\x80\x85",
+ "\x81\x59"=>"\xE3\x80\x86",
+ "\x81\x5A"=>"\xE3\x80\x87",
+ "\x81\x5B"=>"\xE3\x83\xBC",
+ "\x81\x5C"=>"\xE2\x80\x95", // set as U+2015 but could be U+2014
+ "\x81\x5D"=>"\xE2\x80\x90",
+ "\x81\x5E"=>"\xEF\xBC\x8F",
+ "\x81\x5F"=>"\xEF\xBC\xBC", // or U+005C
+ "\x81\x60"=>"\xE3\x80\x9C",
+ "\x81\x61"=>"\xE2\x80\x96",
+ "\x81\x62"=>"\xEF\xBD\x9C",
+ "\x81\x63"=>"\xE2\x80\xA6",
+ "\x81\x64"=>"\xE2\x80\xA5",
+ "\x81\x65"=>"\xE2\x80\x98",
+ "\x81\x66"=>"\xE2\x80\x99",
+ "\x81\x67"=>"\xE2\x80\x9C",
+ "\x81\x68"=>"\xE2\x80\x9D",
+ "\x81\x69"=>"\xEF\xBC\x88",
+ "\x81\x6A"=>"\xEF\xBC\x89",
+ "\x81\x6B"=>"\xE3\x80\x94",
+ "\x81\x6C"=>"\xE3\x80\x95",
+ "\x81\x6D"=>"\xEF\xBC\xBB",
+ "\x81\x6E"=>"\xEF\xBC\xBD",
+ "\x81\x6F"=>"\xEF\xBD\x9B",
+ "\x81\x70"=>"\xEF\xBD\x9D",
+ "\x81\x71"=>"\xE3\x80\x88",
+ "\x81\x72"=>"\xE3\x80\x89",
+ "\x81\x73"=>"\xE3\x80\x8A",
+ "\x81\x74"=>"\xE3\x80\x8B",
+ "\x81\x75"=>"\xE3\x80\x8C",
+ "\x81\x76"=>"\xE3\x80\x8D",
+ "\x81\x77"=>"\xE3\x80\x8E",
+ "\x81\x78"=>"\xE3\x80\x8F",
+ "\x81\x79"=>"\xE3\x80\x90",
+ "\x81\x7A"=>"\xE3\x80\x91",
+ "\x81\x7B"=>"\xEF\xBC\x8B",
+ "\x81\x7C"=>"\xE2\x88\x92",
+ "\x81\x7D"=>"\xC2\xB1",
+ "\x81\x7E"=>"\xC3\x97",
+ "\x81\x80"=>"\xC3\xB7",
+ "\x81\x81"=>"\xEF\xBC\x9D",
+ "\x81\x82"=>"\xE2\x89\xA0",
+ "\x81\x83"=>"\xEF\xBC\x9C",
+ "\x81\x84"=>"\xEF\xBC\x9E",
+ "\x81\x85"=>"\xE2\x89\xA6",
+ "\x81\x86"=>"\xE2\x89\xA7",
+ "\x81\x87"=>"\xE2\x88\x9E",
+ "\x81\x88"=>"\xE2\x88\xB4",
+ "\x81\x89"=>"\xE2\x99\x82",
+ "\x81\x8A"=>"\xE2\x99\x80",
+ "\x81\x8B"=>"\xC2\xB0",
+ "\x81\x8C"=>"\xE2\x80\xB2",
+ "\x81\x8D"=>"\xE2\x80\xB3",
+ "\x81\x8E"=>"\xE2\x84\x83",
+ "\x81\x8F"=>"\xEF\xBF\xA5",
+ "\x81\x90"=>"\xEF\xBC\x84",
+ "\x81\x91"=>"\xC2\xA2",
+ "\x81\x92"=>"\xC2\xA3",
+ "\x81\x93"=>"\xEF\xBC\x85",
+ "\x81\x94"=>"\xEF\xBC\x83",
+ "\x81\x95"=>"\xEF\xBC\x86",
+ "\x81\x96"=>"\xEF\xBC\x8A",
+ "\x81\x97"=>"\xEF\xBC\xA0",
+ "\x81\x98"=>"\xC2\xA7",
+ "\x81\x99"=>"\xE2\x98\x86",
+ "\x81\x9A"=>"\xE2\x98\x85",
+ "\x81\x9B"=>"\xE2\x97\x8B",
+ "\x81\x9C"=>"\xE2\x97\x8F",
+ "\x81\x9D"=>"\xE2\x97\x8E",
+ "\x81\x9E"=>"\xE2\x97\x87",
+ "\x81\x9F"=>"\xE2\x97\x86",
+ "\x81\xA0"=>"\xE2\x96\xA1",
+ "\x81\xA1"=>"\xE2\x96\xA0",
+ "\x81\xA2"=>"\xE2\x96\xB3",
+ "\x81\xA3"=>"\xE2\x96\xB2",
+ "\x81\xA4"=>"\xE2\x96\xBD",
+ "\x81\xA5"=>"\xE2\x96\xBC",
+ "\x81\xA6"=>"\xE2\x80\xBB",
+ "\x81\xA7"=>"\xE3\x80\x92",
+ "\x81\xA8"=>"\xE2\x86\x92",
+ "\x81\xA9"=>"\xE2\x86\x90",
+ "\x81\xAA"=>"\xE2\x86\x91",
+ "\x81\xAB"=>"\xE2\x86\x93",
+ "\x81\xAC"=>"\xE3\x80\x93",
+ "\x81\xAD"=>"\xEF\xBC\x87", // extra?!
+ "\x81\xB8"=>"\xE2\x88\x88",
+ "\x81\xB9"=>"\xE2\x88\x8B",
+ "\x81\xBA"=>"\xE2\x8A\x86",
+ "\x81\xBB"=>"\xE2\x8A\x87",
+ "\x81\xBC"=>"\xE2\x8A\x82",
+ "\x81\xBD"=>"\xE2\x8A\x83",
+ "\x81\xBE"=>"\xE2\x88\xAA",
+ "\x81\xBF"=>"\xE2\x88\xA9",
+ "\x81\xC8"=>"\xE2\x88\xA7",
+ "\x81\xC9"=>"\xE2\x88\xA8",
+ "\x81\xCA"=>"\xC2\xAC",
+ "\x81\xCB"=>"\xE2\x87\x92",
+ "\x81\xCC"=>"\xE2\x87\x94",
+ "\x81\xCD"=>"\xE2\x88\x80",
+ "\x81\xCE"=>"\xE2\x88\x83",
+ "\x81\xDA"=>"\xE2\x88\xA0",
+ "\x81\xDB"=>"\xE2\x8A\xA5",
+ "\x81\xDC"=>"\xE2\x8C\x92",
+ "\x81\xDD"=>"\xE2\x88\x82",
+ "\x81\xDE"=>"\xE2\x88\x87",
+ "\x81\xDF"=>"\xE2\x89\xA1",
+ "\x81\xE0"=>"\xE2\x89\x92",
+ "\x81\xE1"=>"\xE2\x89\xAA",
+ "\x81\xE2"=>"\xE2\x89\xAB",
+ "\x81\xE3"=>"\xE2\x88\x9A",
+ "\x81\xE4"=>"\xE2\x88\xBD",
+ "\x81\xE5"=>"\xE2\x88\x9D",
+ "\x81\xE6"=>"\xE2\x88\xB5",
+ "\x81\xE7"=>"\xE2\x88\xAB",
+ "\x81\xE8"=>"\xE2\x88\xAC",
+ "\x81\xF0"=>"\xE2\x84\xAB",
+ "\x81\xF1"=>"\xE2\x80\xB0",
+ "\x81\xF2"=>"\xE2\x99\xAF",
+ "\x81\xF3"=>"\xE2\x99\xAD",
+ "\x81\xF4"=>"\xE2\x99\xAA",
+ "\x81\xF5"=>"\xE2\x80\xA0",
+ "\x81\xF6"=>"\xE2\x80\xA1",
+ "\x81\xF7"=>"\xC2\xB6",
+ "\x81\xFC"=>"\xE2\x97\xAF",
+ "\x82\x4F"=>"\xEF\xBC\x90",
+ "\x82\x50"=>"\xEF\xBC\x91",
+ "\x82\x51"=>"\xEF\xBC\x92",
+ "\x82\x52"=>"\xEF\xBC\x93",
+ "\x82\x53"=>"\xEF\xBC\x94",
+ "\x82\x54"=>"\xEF\xBC\x95",
+ "\x82\x55"=>"\xEF\xBC\x96",
+ "\x82\x56"=>"\xEF\xBC\x97",
+ "\x82\x57"=>"\xEF\xBC\x98",
+ "\x82\x58"=>"\xEF\xBC\x99",
+ "\x82\x60"=>"\xEF\xBC\xA1",
+ "\x82\x61"=>"\xEF\xBC\xA2",
+ "\x82\x62"=>"\xEF\xBC\xA3",
+ "\x82\x63"=>"\xEF\xBC\xA4",
+ "\x82\x64"=>"\xEF\xBC\xA5",
+ "\x82\x65"=>"\xEF\xBC\xA6",
+ "\x82\x66"=>"\xEF\xBC\xA7",
+ "\x82\x67"=>"\xEF\xBC\xA8",
+ "\x82\x68"=>"\xEF\xBC\xA9",
+ "\x82\x69"=>"\xEF\xBC\xAA",
+ "\x82\x6A"=>"\xEF\xBC\xAB",
+ "\x82\x6B"=>"\xEF\xBC\xAC",
+ "\x82\x6C"=>"\xEF\xBC\xAD",
+ "\x82\x6D"=>"\xEF\xBC\xAE",
+ "\x82\x6E"=>"\xEF\xBC\xAF",
+ "\x82\x6F"=>"\xEF\xBC\xB0",
+ "\x82\x70"=>"\xEF\xBC\xB1",
+ "\x82\x71"=>"\xEF\xBC\xB2",
+ "\x82\x72"=>"\xEF\xBC\xB3",
+ "\x82\x73"=>"\xEF\xBC\xB4",
+ "\x82\x74"=>"\xEF\xBC\xB5",
+ "\x82\x75"=>"\xEF\xBC\xB6",
+ "\x82\x76"=>"\xEF\xBC\xB7",
+ "\x82\x77"=>"\xEF\xBC\xB8",
+ "\x82\x78"=>"\xEF\xBC\xB9",
+ "\x82\x79"=>"\xEF\xBC\xBA",
+ "\x82\x81"=>"\xEF\xBD\x81",
+ "\x82\x82"=>"\xEF\xBD\x82",
+ "\x82\x83"=>"\xEF\xBD\x83",
+ "\x82\x84"=>"\xEF\xBD\x84",
+ "\x82\x85"=>"\xEF\xBD\x85",
+ "\x82\x86"=>"\xEF\xBD\x86",
+ "\x82\x87"=>"\xEF\xBD\x87",
+ "\x82\x88"=>"\xEF\xBD\x88",
+ "\x82\x89"=>"\xEF\xBD\x89",
+ "\x82\x8A"=>"\xEF\xBD\x8A",
+ "\x82\x8B"=>"\xEF\xBD\x8B",
+ "\x82\x8C"=>"\xEF\xBD\x8C",
+ "\x82\x8D"=>"\xEF\xBD\x8D",
+ "\x82\x8E"=>"\xEF\xBD\x8E",
+ "\x82\x8F"=>"\xEF\xBD\x8F",
+ "\x82\x90"=>"\xEF\xBD\x90",
+ "\x82\x91"=>"\xEF\xBD\x91",
+ "\x82\x92"=>"\xEF\xBD\x92",
+ "\x82\x93"=>"\xEF\xBD\x93",
+ "\x82\x94"=>"\xEF\xBD\x94",
+ "\x82\x95"=>"\xEF\xBD\x95",
+ "\x82\x96"=>"\xEF\xBD\x96",
+ "\x82\x97"=>"\xEF\xBD\x97",
+ "\x82\x98"=>"\xEF\xBD\x98",
+ "\x82\x99"=>"\xEF\xBD\x99",
+ "\x82\x9A"=>"\xEF\xBD\x9A",
+ "\x82\x9F"=>"\xE3\x81\x81",
+ "\x82\xA0"=>"\xE3\x81\x82",
+ "\x82\xA1"=>"\xE3\x81\x83",
+ "\x82\xA2"=>"\xE3\x81\x84",
+ "\x82\xA3"=>"\xE3\x81\x85",
+ "\x82\xA4"=>"\xE3\x81\x86",
+ "\x82\xA5"=>"\xE3\x81\x87",
+ "\x82\xA6"=>"\xE3\x81\x88",
+ "\x82\xA7"=>"\xE3\x81\x89",
+ "\x82\xA8"=>"\xE3\x81\x8A",
+ "\x82\xA9"=>"\xE3\x81\x8B",
+ "\x82\xAA"=>"\xE3\x81\x8C",
+ "\x82\xAB"=>"\xE3\x81\x8D",
+ "\x82\xAC"=>"\xE3\x81\x8E",
+ "\x82\xAD"=>"\xE3\x81\x8F",
+ "\x82\xAE"=>"\xE3\x81\x90",
+ "\x82\xAF"=>"\xE3\x81\x91",
+ "\x82\xB0"=>"\xE3\x81\x92",
+ "\x82\xB1"=>"\xE3\x81\x93",
+ "\x82\xB2"=>"\xE3\x81\x94",
+ "\x82\xB3"=>"\xE3\x81\x95",
+ "\x82\xB4"=>"\xE3\x81\x96",
+ "\x82\xB5"=>"\xE3\x81\x97",
+ "\x82\xB6"=>"\xE3\x81\x98",
+ "\x82\xB7"=>"\xE3\x81\x99",
+ "\x82\xB8"=>"\xE3\x81\x9A",
+ "\x82\xB9"=>"\xE3\x81\x9B",
+ "\x82\xBA"=>"\xE3\x81\x9C",
+ "\x82\xBB"=>"\xE3\x81\x9D",
+ "\x82\xBC"=>"\xE3\x81\x9E",
+ "\x82\xBD"=>"\xE3\x81\x9F",
+ "\x82\xBE"=>"\xE3\x81\xA0",
+ "\x82\xBF"=>"\xE3\x81\xA1",
+ "\x82\xC0"=>"\xE3\x81\xA2",
+ "\x82\xC1"=>"\xE3\x81\xA3",
+ "\x82\xC2"=>"\xE3\x81\xA4",
+ "\x82\xC3"=>"\xE3\x81\xA5",
+ "\x82\xC4"=>"\xE3\x81\xA6",
+ "\x82\xC5"=>"\xE3\x81\xA7",
+ "\x82\xC6"=>"\xE3\x81\xA8",
+ "\x82\xC7"=>"\xE3\x81\xA9",
+ "\x82\xC8"=>"\xE3\x81\xAA",
+ "\x82\xC9"=>"\xE3\x81\xAB",
+ "\x82\xCA"=>"\xE3\x81\xAC",
+ "\x82\xCB"=>"\xE3\x81\xAD",
+ "\x82\xCC"=>"\xE3\x81\xAE",
+ "\x82\xCD"=>"\xE3\x81\xAF",
+ "\x82\xCE"=>"\xE3\x81\xB0",
+ "\x82\xCF"=>"\xE3\x81\xB1",
+ "\x82\xD0"=>"\xE3\x81\xB2",
+ "\x82\xD1"=>"\xE3\x81\xB3",
+ "\x82\xD2"=>"\xE3\x81\xB4",
+ "\x82\xD3"=>"\xE3\x81\xB5",
+ "\x82\xD4"=>"\xE3\x81\xB6",
+ "\x82\xD5"=>"\xE3\x81\xB7",
+ "\x82\xD6"=>"\xE3\x81\xB8",
+ "\x82\xD7"=>"\xE3\x81\xB9",
+ "\x82\xD8"=>"\xE3\x81\xBA",
+ "\x82\xD9"=>"\xE3\x81\xBB",
+ "\x82\xDA"=>"\xE3\x81\xBC",
+ "\x82\xDB"=>"\xE3\x81\xBD",
+ "\x82\xDC"=>"\xE3\x81\xBE",
+ "\x82\xDD"=>"\xE3\x81\xBF",
+ "\x82\xDE"=>"\xE3\x82\x80",
+ "\x82\xDF"=>"\xE3\x82\x81",
+ "\x82\xE0"=>"\xE3\x82\x82",
+ "\x82\xE1"=>"\xE3\x82\x83",
+ "\x82\xE2"=>"\xE3\x82\x84",
+ "\x82\xE3"=>"\xE3\x82\x85",
+ "\x82\xE4"=>"\xE3\x82\x86",
+ "\x82\xE5"=>"\xE3\x82\x87",
+ "\x82\xE6"=>"\xE3\x82\x88",
+ "\x82\xE7"=>"\xE3\x82\x89",
+ "\x82\xE8"=>"\xE3\x82\x8A",
+ "\x82\xE9"=>"\xE3\x82\x8B",
+ "\x82\xEA"=>"\xE3\x82\x8C",
+ "\x82\xEB"=>"\xE3\x82\x8D",
+ "\x82\xEC"=>"\xE3\x82\x8E",
+ "\x82\xED"=>"\xE3\x82\x8F",
+ "\x82\xEE"=>"\xE3\x82\x90",
+ "\x82\xEF"=>"\xE3\x82\x91",
+ "\x82\xF0"=>"\xE3\x82\x92",
+ "\x82\xF1"=>"\xE3\x82\x93",
+ "\x83\x40"=>"\xE3\x82\xA1",
+ "\x83\x41"=>"\xE3\x82\xA2",
+ "\x83\x42"=>"\xE3\x82\xA3",
+ "\x83\x43"=>"\xE3\x82\xA4",
+ "\x83\x44"=>"\xE3\x82\xA5",
+ "\x83\x45"=>"\xE3\x82\xA6",
+ "\x83\x46"=>"\xE3\x82\xA7",
+ "\x83\x47"=>"\xE3\x82\xA8",
+ "\x83\x48"=>"\xE3\x82\xA9",
+ "\x83\x49"=>"\xE3\x82\xAA",
+ "\x83\x4A"=>"\xE3\x82\xAB",
+ "\x83\x4B"=>"\xE3\x82\xAC",
+ "\x83\x4C"=>"\xE3\x82\xAD",
+ "\x83\x4D"=>"\xE3\x82\xAE",
+ "\x83\x4E"=>"\xE3\x82\xAF",
+ "\x83\x4F"=>"\xE3\x82\xB0",
+ "\x83\x50"=>"\xE3\x82\xB1",
+ "\x83\x51"=>"\xE3\x82\xB2",
+ "\x83\x52"=>"\xE3\x82\xB3",
+ "\x83\x53"=>"\xE3\x82\xB4",
+ "\x83\x54"=>"\xE3\x82\xB5",
+ "\x83\x55"=>"\xE3\x82\xB6",
+ "\x83\x56"=>"\xE3\x82\xB7",
+ "\x83\x57"=>"\xE3\x82\xB8",
+ "\x83\x58"=>"\xE3\x82\xB9",
+ "\x83\x59"=>"\xE3\x82\xBA",
+ "\x83\x5A"=>"\xE3\x82\xBB",
+ "\x83\x5B"=>"\xE3\x82\xBC",
+ "\x83\x5C"=>"\xE3\x82\xBD",
+ "\x83\x5D"=>"\xE3\x82\xBE",
+ "\x83\x5E"=>"\xE3\x82\xBF",
+ "\x83\x5F"=>"\xE3\x83\x80",
+ "\x83\x60"=>"\xE3\x83\x81",
+ "\x83\x61"=>"\xE3\x83\x82",
+ "\x83\x62"=>"\xE3\x83\x83",
+ "\x83\x63"=>"\xE3\x83\x84",
+ "\x83\x64"=>"\xE3\x83\x85",
+ "\x83\x65"=>"\xE3\x83\x86",
+ "\x83\x66"=>"\xE3\x83\x87",
+ "\x83\x67"=>"\xE3\x83\x88",
+ "\x83\x68"=>"\xE3\x83\x89",
+ "\x83\x69"=>"\xE3\x83\x8A",
+ "\x83\x6A"=>"\xE3\x83\x8B",
+ "\x83\x6B"=>"\xE3\x83\x8C",
+ "\x83\x6C"=>"\xE3\x83\x8D",
+ "\x83\x6D"=>"\xE3\x83\x8E",
+ "\x83\x6E"=>"\xE3\x83\x8F",
+ "\x83\x6F"=>"\xE3\x83\x90",
+ "\x83\x70"=>"\xE3\x83\x91",
+ "\x83\x71"=>"\xE3\x83\x92",
+ "\x83\x72"=>"\xE3\x83\x93",
+ "\x83\x73"=>"\xE3\x83\x94",
+ "\x83\x74"=>"\xE3\x83\x95",
+ "\x83\x75"=>"\xE3\x83\x96",
+ "\x83\x76"=>"\xE3\x83\x97",
+ "\x83\x77"=>"\xE3\x83\x98",
+ "\x83\x78"=>"\xE3\x83\x99",
+ "\x83\x79"=>"\xE3\x83\x9A",
+ "\x83\x7A"=>"\xE3\x83\x9B",
+ "\x83\x7B"=>"\xE3\x83\x9C",
+ "\x83\x7C"=>"\xE3\x83\x9D",
+ "\x83\x7D"=>"\xE3\x83\x9E",
+ "\x83\x7E"=>"\xE3\x83\x9F",
+ "\x83\x80"=>"\xE3\x83\xA0",
+ "\x83\x81"=>"\xE3\x83\xA1",
+ "\x83\x82"=>"\xE3\x83\xA2",
+ "\x83\x83"=>"\xE3\x83\xA3",
+ "\x83\x84"=>"\xE3\x83\xA4",
+ "\x83\x85"=>"\xE3\x83\xA5",
+ "\x83\x86"=>"\xE3\x83\xA6",
+ "\x83\x87"=>"\xE3\x83\xA7",
+ "\x83\x88"=>"\xE3\x83\xA8",
+ "\x83\x89"=>"\xE3\x83\xA9",
+ "\x83\x8A"=>"\xE3\x83\xAA",
+ "\x83\x8B"=>"\xE3\x83\xAB",
+ "\x83\x8C"=>"\xE3\x83\xAC",
+ "\x83\x8D"=>"\xE3\x83\xAD",
+ "\x83\x8E"=>"\xE3\x83\xAE",
+ "\x83\x8F"=>"\xE3\x83\xAF",
+ "\x83\x90"=>"\xE3\x83\xB0",
+ "\x83\x91"=>"\xE3\x83\xB1",
+ "\x83\x92"=>"\xE3\x83\xB2",
+ "\x83\x93"=>"\xE3\x83\xB3",
+ "\x83\x94"=>"\xE3\x83\xB4",
+ "\x83\x95"=>"\xE3\x83\xB5",
+ "\x83\x96"=>"\xE3\x83\xB6",
+ "\x83\x9F"=>"\xCE\x91",
+ "\x83\xA0"=>"\xCE\x92",
+ "\x83\xA1"=>"\xCE\x93",
+ "\x83\xA2"=>"\xCE\x94",
+ "\x83\xA3"=>"\xCE\x95",
+ "\x83\xA4"=>"\xCE\x96",
+ "\x83\xA5"=>"\xCE\x97",
+ "\x83\xA6"=>"\xCE\x98",
+ "\x83\xA7"=>"\xCE\x99",
+ "\x83\xA8"=>"\xCE\x9A",
+ "\x83\xA9"=>"\xCE\x9B",
+ "\x83\xAA"=>"\xCE\x9C",
+ "\x83\xAB"=>"\xCE\x9D",
+ "\x83\xAC"=>"\xCE\x9E",
+ "\x83\xAD"=>"\xCE\x9F",
+ "\x83\xAE"=>"\xCE\xA0",
+ "\x83\xAF"=>"\xCE\xA1",
+ "\x83\xB0"=>"\xCE\xA3",
+ "\x83\xB1"=>"\xCE\xA4",
+ "\x83\xB2"=>"\xCE\xA5",
+ "\x83\xB3"=>"\xCE\xA6",
+ "\x83\xB4"=>"\xCE\xA7",
+ "\x83\xB5"=>"\xCE\xA8",
+ "\x83\xB6"=>"\xCE\xA9",
+ "\x83\xBF"=>"\xCE\xB1",
+ "\x83\xC0"=>"\xCE\xB2",
+ "\x83\xC1"=>"\xCE\xB3",
+ "\x83\xC2"=>"\xCE\xB4",
+ "\x83\xC3"=>"\xCE\xB5",
+ "\x83\xC4"=>"\xCE\xB6",
+ "\x83\xC5"=>"\xCE\xB7",
+ "\x83\xC6"=>"\xCE\xB8",
+ "\x83\xC7"=>"\xCE\xB9",
+ "\x83\xC8"=>"\xCE\xBA",
+ "\x83\xC9"=>"\xCE\xBB",
+ "\x83\xCA"=>"\xCE\xBC",
+ "\x83\xCB"=>"\xCE\xBD",
+ "\x83\xCC"=>"\xCE\xBE",
+ "\x83\xCD"=>"\xCE\xBF",
+ "\x83\xCE"=>"\xCF\x80",
+ "\x83\xCF"=>"\xCF\x81",
+ "\x83\xD0"=>"\xCF\x83",
+ "\x83\xD1"=>"\xCF\x84",
+ "\x83\xD2"=>"\xCF\x85",
+ "\x83\xD3"=>"\xCF\x86",
+ "\x83\xD4"=>"\xCF\x87",
+ "\x83\xD5"=>"\xCF\x88",
+ "\x83\xD6"=>"\xCF\x89",
+ "\x84\x40"=>"\xD0\x90",
+ "\x84\x41"=>"\xD0\x91",
+ "\x84\x42"=>"\xD0\x92",
+ "\x84\x43"=>"\xD0\x93",
+ "\x84\x44"=>"\xD0\x94",
+ "\x84\x45"=>"\xD0\x95",
+ "\x84\x46"=>"\xD0\x81",
+ "\x84\x47"=>"\xD0\x96",
+ "\x84\x48"=>"\xD0\x97",
+ "\x84\x49"=>"\xD0\x98",
+ "\x84\x4A"=>"\xD0\x99",
+ "\x84\x4B"=>"\xD0\x9A",
+ "\x84\x4C"=>"\xD0\x9B",
+ "\x84\x4D"=>"\xD0\x9C",
+ "\x84\x4E"=>"\xD0\x9D",
+ "\x84\x4F"=>"\xD0\x9E",
+ "\x84\x50"=>"\xD0\x9F",
+ "\x84\x51"=>"\xD0\xA0",
+ "\x84\x52"=>"\xD0\xA1",
+ "\x84\x53"=>"\xD0\xA2",
+ "\x84\x54"=>"\xD0\xA3",
+ "\x84\x55"=>"\xD0\xA4",
+ "\x84\x56"=>"\xD0\xA5",
+ "\x84\x57"=>"\xD0\xA6",
+ "\x84\x58"=>"\xD0\xA7",
+ "\x84\x59"=>"\xD0\xA8",
+ "\x84\x5A"=>"\xD0\xA9",
+ "\x84\x5B"=>"\xD0\xAA",
+ "\x84\x5C"=>"\xD0\xAB",
+ "\x84\x5D"=>"\xD0\xAC",
+ "\x84\x5E"=>"\xD0\xAD",
+ "\x84\x5F"=>"\xD0\xAE",
+ "\x84\x60"=>"\xD0\xAF",
+ "\x84\x70"=>"\xD0\xB0",
+ "\x84\x71"=>"\xD0\xB1",
+ "\x84\x72"=>"\xD0\xB2",
+ "\x84\x73"=>"\xD0\xB3",
+ "\x84\x74"=>"\xD0\xB4",
+ "\x84\x75"=>"\xD0\xB5",
+ "\x84\x76"=>"\xD1\x91",
+ "\x84\x77"=>"\xD0\xB6",
+ "\x84\x78"=>"\xD0\xB7",
+ "\x84\x79"=>"\xD0\xB8",
+ "\x84\x7A"=>"\xD0\xB9",
+ "\x84\x7B"=>"\xD0\xBA",
+ "\x84\x7C"=>"\xD0\xBB",
+ "\x84\x7D"=>"\xD0\xBC",
+ "\x84\x7E"=>"\xD0\xBD",
+ "\x84\x80"=>"\xD0\xBE",
+ "\x84\x81"=>"\xD0\xBF",
+ "\x84\x82"=>"\xD1\x80",
+ "\x84\x83"=>"\xD1\x81",
+ "\x84\x84"=>"\xD1\x82",
+ "\x84\x85"=>"\xD1\x83",
+ "\x84\x86"=>"\xD1\x84",
+ "\x84\x87"=>"\xD1\x85",
+ "\x84\x88"=>"\xD1\x86",
+ "\x84\x89"=>"\xD1\x87",
+ "\x84\x8A"=>"\xD1\x88",
+ "\x84\x8B"=>"\xD1\x89",
+ "\x84\x8C"=>"\xD1\x8A",
+ "\x84\x8D"=>"\xD1\x8B",
+ "\x84\x8E"=>"\xD1\x8C",
+ "\x84\x8F"=>"\xD1\x8D",
+ "\x84\x90"=>"\xD1\x8E",
+ "\x84\x91"=>"\xD1\x8F",
+ "\x84\x9F"=>"\xE2\x94\x80",
+ "\x84\xA0"=>"\xE2\x94\x82",
+ "\x84\xA1"=>"\xE2\x94\x8C",
+ "\x84\xA2"=>"\xE2\x94\x90",
+ "\x84\xA3"=>"\xE2\x94\x98",
+ "\x84\xA4"=>"\xE2\x94\x94",
+ "\x84\xA5"=>"\xE2\x94\x9C",
+ "\x84\xA6"=>"\xE2\x94\xAC",
+ "\x84\xA7"=>"\xE2\x94\xA4",
+ "\x84\xA8"=>"\xE2\x94\xB4",
+ "\x84\xA9"=>"\xE2\x94\xBC",
+ "\x84\xAA"=>"\xE2\x94\x81",
+ "\x84\xAB"=>"\xE2\x94\x83",
+ "\x84\xAC"=>"\xE2\x94\x8F",
+ "\x84\xAD"=>"\xE2\x94\x93",
+ "\x84\xAE"=>"\xE2\x94\x9B",
+ "\x84\xAF"=>"\xE2\x94\x97",
+ "\x84\xB0"=>"\xE2\x94\xA3",
+ "\x84\xB1"=>"\xE2\x94\xB3",
+ "\x84\xB2"=>"\xE2\x94\xAB",
+ "\x84\xB3"=>"\xE2\x94\xBB",
+ "\x84\xB4"=>"\xE2\x95\x8B",
+ "\x84\xB5"=>"\xE2\x94\xA0",
+ "\x84\xB6"=>"\xE2\x94\xAF",
+ "\x84\xB7"=>"\xE2\x94\xA8",
+ "\x84\xB8"=>"\xE2\x94\xB7",
+ "\x84\xB9"=>"\xE2\x94\xBF",
+ "\x84\xBA"=>"\xE2\x94\x9D",
+ "\x84\xBB"=>"\xE2\x94\xB0",
+ "\x84\xBC"=>"\xE2\x94\xA5",
+ "\x84\xBD"=>"\xE2\x94\xB8",
+ "\x84\xBE"=>"\xE2\x95\x82",
+ "\x88\x9F"=>"\xE4\xBA\x9C",
+ "\x88\xA0"=>"\xE5\x94\x96",
+ "\x88\xA1"=>"\xE5\xA8\x83",
+ "\x88\xA2"=>"\xE9\x98\xBF",
+ "\x88\xA3"=>"\xE5\x93\x80",
+ "\x88\xA4"=>"\xE6\x84\x9B",
+ "\x88\xA5"=>"\xE6\x8C\xA8",
+ "\x88\xA6"=>"\xE5\xA7\xB6",
+ "\x88\xA7"=>"\xE9\x80\xA2",
+ "\x88\xA8"=>"\xE8\x91\xB5",
+ "\x88\xA9"=>"\xE8\x8C\x9C",
+ "\x88\xAA"=>"\xE7\xA9\x90",
+ "\x88\xAB"=>"\xE6\x82\xAA",
+ "\x88\xAC"=>"\xE6\x8F\xA1",
+ "\x88\xAD"=>"\xE6\xB8\xA5",
+ "\x88\xAE"=>"\xE6\x97\xAD",
+ "\x88\xAF"=>"\xE8\x91\xA6",
+ "\x88\xB0"=>"\xE8\x8A\xA6",
+ "\x88\xB1"=>"\xE9\xAF\xB5",
+ "\x88\xB2"=>"\xE6\xA2\x93",
+ "\x88\xB3"=>"\xE5\x9C\xA7",
+ "\x88\xB4"=>"\xE6\x96\xA1",
+ "\x88\xB5"=>"\xE6\x89\xB1",
+ "\x88\xB6"=>"\xE5\xAE\x9B",
+ "\x88\xB7"=>"\xE5\xA7\x90",
+ "\x88\xB8"=>"\xE8\x99\xBB",
+ "\x88\xB9"=>"\xE9\xA3\xB4",
+ "\x88\xBA"=>"\xE7\xB5\xA2",
+ "\x88\xBB"=>"\xE7\xB6\xBE",
+ "\x88\xBC"=>"\xE9\xAE\x8E",
+ "\x88\xBD"=>"\xE6\x88\x96",
+ "\x88\xBE"=>"\xE7\xB2\x9F",
+ "\x88\xBF"=>"\xE8\xA2\xB7",
+ "\x88\xC0"=>"\xE5\xAE\x89",
+ "\x88\xC1"=>"\xE5\xBA\xB5",
+ "\x88\xC2"=>"\xE6\x8C\x89",
+ "\x88\xC3"=>"\xE6\x9A\x97",
+ "\x88\xC4"=>"\xE6\xA1\x88",
+ "\x88\xC5"=>"\xE9\x97\x87",
+ "\x88\xC6"=>"\xE9\x9E\x8D",
+ "\x88\xC7"=>"\xE6\x9D\x8F",
+ "\x88\xC8"=>"\xE4\xBB\xA5",
+ "\x88\xC9"=>"\xE4\xBC\x8A",
+ "\x88\xCA"=>"\xE4\xBD\x8D",
+ "\x88\xCB"=>"\xE4\xBE\x9D",
+ "\x88\xCC"=>"\xE5\x81\x89",
+ "\x88\xCD"=>"\xE5\x9B\xB2",
+ "\x88\xCE"=>"\xE5\xA4\xB7",
+ "\x88\xCF"=>"\xE5\xA7\x94",
+ "\x88\xD0"=>"\xE5\xA8\x81",
+ "\x88\xD1"=>"\xE5\xB0\x89",
+ "\x88\xD2"=>"\xE6\x83\x9F",
+ "\x88\xD3"=>"\xE6\x84\x8F",
+ "\x88\xD4"=>"\xE6\x85\xB0",
+ "\x88\xD5"=>"\xE6\x98\x93",
+ "\x88\xD6"=>"\xE6\xA4\x85",
+ "\x88\xD7"=>"\xE7\x82\xBA",
+ "\x88\xD8"=>"\xE7\x95\x8F",
+ "\x88\xD9"=>"\xE7\x95\xB0",
+ "\x88\xDA"=>"\xE7\xA7\xBB",
+ "\x88\xDB"=>"\xE7\xB6\xAD",
+ "\x88\xDC"=>"\xE7\xB7\xAF",
+ "\x88\xDD"=>"\xE8\x83\x83",
+ "\x88\xDE"=>"\xE8\x90\x8E",
+ "\x88\xDF"=>"\xE8\xA1\xA3",
+ "\x88\xE0"=>"\xE8\xAC\x82",
+ "\x88\xE1"=>"\xE9\x81\x95",
+ "\x88\xE2"=>"\xE9\x81\xBA",
+ "\x88\xE3"=>"\xE5\x8C\xBB",
+ "\x88\xE4"=>"\xE4\xBA\x95",
+ "\x88\xE5"=>"\xE4\xBA\xA5",
+ "\x88\xE6"=>"\xE5\x9F\x9F",
+ "\x88\xE7"=>"\xE8\x82\xB2",
+ "\x88\xE8"=>"\xE9\x83\x81",
+ "\x88\xE9"=>"\xE7\xA3\xAF",
+ "\x88\xEA"=>"\xE4\xB8\x80",
+ "\x88\xEB"=>"\xE5\xA3\xB1",
+ "\x88\xEC"=>"\xE6\xBA\xA2",
+ "\x88\xED"=>"\xE9\x80\xB8",
+ "\x88\xEE"=>"\xE7\xA8\xB2",
+ "\x88\xEF"=>"\xE8\x8C\xA8",
+ "\x88\xF0"=>"\xE8\x8A\x8B",
+ "\x88\xF1"=>"\xE9\xB0\xAF",
+ "\x88\xF2"=>"\xE5\x85\x81",
+ "\x88\xF3"=>"\xE5\x8D\xB0",
+ "\x88\xF4"=>"\xE5\x92\xBD",
+ "\x88\xF5"=>"\xE5\x93\xA1",
+ "\x88\xF6"=>"\xE5\x9B\xA0",
+ "\x88\xF7"=>"\xE5\xA7\xBB",
+ "\x88\xF8"=>"\xE5\xBC\x95",
+ "\x88\xF9"=>"\xE9\xA3\xB2",
+ "\x88\xFA"=>"\xE6\xB7\xAB",
+ "\x88\xFB"=>"\xE8\x83\xA4",
+ "\x88\xFC"=>"\xE8\x94\xAD",
+ "\x89\x40"=>"\xE9\x99\xA2",
+ "\x89\x41"=>"\xE9\x99\xB0",
+ "\x89\x42"=>"\xE9\x9A\xA0",
+ "\x89\x43"=>"\xE9\x9F\xBB",
+ "\x89\x44"=>"\xE5\x90\x8B",
+ "\x89\x45"=>"\xE5\x8F\xB3",
+ "\x89\x46"=>"\xE5\xAE\x87",
+ "\x89\x47"=>"\xE7\x83\x8F",
+ "\x89\x48"=>"\xE7\xBE\xBD",
+ "\x89\x49"=>"\xE8\xBF\x82",
+ "\x89\x4A"=>"\xE9\x9B\xA8",
+ "\x89\x4B"=>"\xE5\x8D\xAF",
+ "\x89\x4C"=>"\xE9\xB5\x9C",
+ "\x89\x4D"=>"\xE7\xAA\xBA",
+ "\x89\x4E"=>"\xE4\xB8\x91",
+ "\x89\x4F"=>"\xE7\xA2\x93",
+ "\x89\x50"=>"\xE8\x87\xBC",
+ "\x89\x51"=>"\xE6\xB8\xA6",
+ "\x89\x52"=>"\xE5\x98\x98",
+ "\x89\x53"=>"\xE5\x94\x84",
+ "\x89\x54"=>"\xE6\xAC\x9D",
+ "\x89\x55"=>"\xE8\x94\x9A",
+ "\x89\x56"=>"\xE9\xB0\xBB",
+ "\x89\x57"=>"\xE5\xA7\xA5",
+ "\x89\x58"=>"\xE5\x8E\xA9",
+ "\x89\x59"=>"\xE6\xB5\xA6",
+ "\x89\x5A"=>"\xE7\x93\x9C",
+ "\x89\x5B"=>"\xE9\x96\x8F",
+ "\x89\x5C"=>"\xE5\x99\x82",
+ "\x89\x5D"=>"\xE4\xBA\x91",
+ "\x89\x5E"=>"\xE9\x81\x8B",
+ "\x89\x5F"=>"\xE9\x9B\xB2",
+ "\x89\x60"=>"\xE8\x8D\x8F",
+ "\x89\x61"=>"\xE9\xA4\x8C",
+ "\x89\x62"=>"\xE5\x8F\xA1",
+ "\x89\x63"=>"\xE5\x96\xB6",
+ "\x89\x64"=>"\xE5\xAC\xB0",
+ "\x89\x65"=>"\xE5\xBD\xB1",
+ "\x89\x66"=>"\xE6\x98\xA0",
+ "\x89\x67"=>"\xE6\x9B\xB3",
+ "\x89\x68"=>"\xE6\xA0\x84",
+ "\x89\x69"=>"\xE6\xB0\xB8",
+ "\x89\x6A"=>"\xE6\xB3\xB3",
+ "\x89\x6B"=>"\xE6\xB4\xA9",
+ "\x89\x6C"=>"\xE7\x91\x9B",
+ "\x89\x6D"=>"\xE7\x9B\x88",
+ "\x89\x6E"=>"\xE7\xA9\x8E",
+ "\x89\x6F"=>"\xE9\xA0\xB4",
+ "\x89\x70"=>"\xE8\x8B\xB1",
+ "\x89\x71"=>"\xE8\xA1\x9B",
+ "\x89\x72"=>"\xE8\xA9\xA0",
+ "\x89\x73"=>"\xE9\x8B\xAD",
+ "\x89\x74"=>"\xE6\xB6\xB2",
+ "\x89\x75"=>"\xE7\x96\xAB",
+ "\x89\x76"=>"\xE7\x9B\x8A",
+ "\x89\x77"=>"\xE9\xA7\x85",
+ "\x89\x78"=>"\xE6\x82\xA6",
+ "\x89\x79"=>"\xE8\xAC\x81",
+ "\x89\x7A"=>"\xE8\xB6\x8A",
+ "\x89\x7B"=>"\xE9\x96\xB2",
+ "\x89\x7C"=>"\xE6\xA6\x8E",
+ "\x89\x7D"=>"\xE5\x8E\xAD",
+ "\x89\x7E"=>"\xE5\x86\x86",
+ "\x89\x80"=>"\xE5\x9C\x92",
+ "\x89\x81"=>"\xE5\xA0\xB0",
+ "\x89\x82"=>"\xE5\xA5\x84",
+ "\x89\x83"=>"\xE5\xAE\xB4",
+ "\x89\x84"=>"\xE5\xBB\xB6",
+ "\x89\x85"=>"\xE6\x80\xA8",
+ "\x89\x86"=>"\xE6\x8E\xA9",
+ "\x89\x87"=>"\xE6\x8F\xB4",
+ "\x89\x88"=>"\xE6\xB2\xBF",
+ "\x89\x89"=>"\xE6\xBC\x94",
+ "\x89\x8A"=>"\xE7\x82\x8E",
+ "\x89\x8B"=>"\xE7\x84\x94",
+ "\x89\x8C"=>"\xE7\x85\x99",
+ "\x89\x8D"=>"\xE7\x87\x95",
+ "\x89\x8E"=>"\xE7\x8C\xBF",
+ "\x89\x8F"=>"\xE7\xB8\x81",
+ "\x89\x90"=>"\xE8\x89\xB6",
+ "\x89\x91"=>"\xE8\x8B\x91",
+ "\x89\x92"=>"\xE8\x96\x97",
+ "\x89\x93"=>"\xE9\x81\xA0",
+ "\x89\x94"=>"\xE9\x89\x9B",
+ "\x89\x95"=>"\xE9\xB4\x9B",
+ "\x89\x96"=>"\xE5\xA1\xA9",
+ "\x89\x97"=>"\xE6\x96\xBC",
+ "\x89\x98"=>"\xE6\xB1\x9A",
+ "\x89\x99"=>"\xE7\x94\xA5",
+ "\x89\x9A"=>"\xE5\x87\xB9",
+ "\x89\x9B"=>"\xE5\xA4\xAE",
+ "\x89\x9C"=>"\xE5\xA5\xA5",
+ "\x89\x9D"=>"\xE5\xBE\x80",
+ "\x89\x9E"=>"\xE5\xBF\x9C",
+ "\x89\x9F"=>"\xE6\x8A\xBC",
+ "\x89\xA0"=>"\xE6\x97\xBA",
+ "\x89\xA1"=>"\xE6\xA8\xAA",
+ "\x89\xA2"=>"\xE6\xAC\xA7",
+ "\x89\xA3"=>"\xE6\xAE\xB4",
+ "\x89\xA4"=>"\xE7\x8E\x8B",
+ "\x89\xA5"=>"\xE7\xBF\x81",
+ "\x89\xA6"=>"\xE8\xA5\x96",
+ "\x89\xA7"=>"\xE9\xB4\xAC",
+ "\x89\xA8"=>"\xE9\xB4\x8E",
+ "\x89\xA9"=>"\xE9\xBB\x84",
+ "\x89\xAA"=>"\xE5\xB2\xA1",
+ "\x89\xAB"=>"\xE6\xB2\x96",
+ "\x89\xAC"=>"\xE8\x8D\xBB",
+ "\x89\xAD"=>"\xE5\x84\x84",
+ "\x89\xAE"=>"\xE5\xB1\x8B",
+ "\x89\xAF"=>"\xE6\x86\xB6",
+ "\x89\xB0"=>"\xE8\x87\x86",
+ "\x89\xB1"=>"\xE6\xA1\xB6",
+ "\x89\xB2"=>"\xE7\x89\xA1",
+ "\x89\xB3"=>"\xE4\xB9\x99",
+ "\x89\xB4"=>"\xE4\xBF\xBA",
+ "\x89\xB5"=>"\xE5\x8D\xB8",
+ "\x89\xB6"=>"\xE6\x81\xA9",
+ "\x89\xB7"=>"\xE6\xB8\xA9",
+ "\x89\xB8"=>"\xE7\xA9\x8F",
+ "\x89\xB9"=>"\xE9\x9F\xB3",
+ "\x89\xBA"=>"\xE4\xB8\x8B",
+ "\x89\xBB"=>"\xE5\x8C\x96",
+ "\x89\xBC"=>"\xE4\xBB\xAE",
+ "\x89\xBD"=>"\xE4\xBD\x95",
+ "\x89\xBE"=>"\xE4\xBC\xBD",
+ "\x89\xBF"=>"\xE4\xBE\xA1",
+ "\x89\xC0"=>"\xE4\xBD\xB3",
+ "\x89\xC1"=>"\xE5\x8A\xA0",
+ "\x89\xC2"=>"\xE5\x8F\xAF",
+ "\x89\xC3"=>"\xE5\x98\x89",
+ "\x89\xC4"=>"\xE5\xA4\x8F",
+ "\x89\xC5"=>"\xE5\xAB\x81",
+ "\x89\xC6"=>"\xE5\xAE\xB6",
+ "\x89\xC7"=>"\xE5\xAF\xA1",
+ "\x89\xC8"=>"\xE7\xA7\x91",
+ "\x89\xC9"=>"\xE6\x9A\x87",
+ "\x89\xCA"=>"\xE6\x9E\x9C",
+ "\x89\xCB"=>"\xE6\x9E\xB6",
+ "\x89\xCC"=>"\xE6\xAD\x8C",
+ "\x89\xCD"=>"\xE6\xB2\xB3",
+ "\x89\xCE"=>"\xE7\x81\xAB",
+ "\x89\xCF"=>"\xE7\x8F\x82",
+ "\x89\xD0"=>"\xE7\xA6\x8D",
+ "\x89\xD1"=>"\xE7\xA6\xBE",
+ "\x89\xD2"=>"\xE7\xA8\xBC",
+ "\x89\xD3"=>"\xE7\xAE\x87",
+ "\x89\xD4"=>"\xE8\x8A\xB1",
+ "\x89\xD5"=>"\xE8\x8B\x9B",
+ "\x89\xD6"=>"\xE8\x8C\x84",
+ "\x89\xD7"=>"\xE8\x8D\xB7",
+ "\x89\xD8"=>"\xE8\x8F\xAF",
+ "\x89\xD9"=>"\xE8\x8F\x93",
+ "\x89\xDA"=>"\xE8\x9D\xA6",
+ "\x89\xDB"=>"\xE8\xAA\xB2",
+ "\x89\xDC"=>"\xE5\x98\xA9",
+ "\x89\xDD"=>"\xE8\xB2\xA8",
+ "\x89\xDE"=>"\xE8\xBF\xA6",
+ "\x89\xDF"=>"\xE9\x81\x8E",
+ "\x89\xE0"=>"\xE9\x9C\x9E",
+ "\x89\xE1"=>"\xE8\x9A\x8A",
+ "\x89\xE2"=>"\xE4\xBF\x84",
+ "\x89\xE3"=>"\xE5\xB3\xA8",
+ "\x89\xE4"=>"\xE6\x88\x91",
+ "\x89\xE5"=>"\xE7\x89\x99",
+ "\x89\xE6"=>"\xE7\x94\xBB",
+ "\x89\xE7"=>"\xE8\x87\xA5",
+ "\x89\xE8"=>"\xE8\x8A\xBD",
+ "\x89\xE9"=>"\xE8\x9B\xBE",
+ "\x89\xEA"=>"\xE8\xB3\x80",
+ "\x89\xEB"=>"\xE9\x9B\x85",
+ "\x89\xEC"=>"\xE9\xA4\x93",
+ "\x89\xED"=>"\xE9\xA7\x95",
+ "\x89\xEE"=>"\xE4\xBB\x8B",
+ "\x89\xEF"=>"\xE4\xBC\x9A",
+ "\x89\xF0"=>"\xE8\xA7\xA3",
+ "\x89\xF1"=>"\xE5\x9B\x9E",
+ "\x89\xF2"=>"\xE5\xA1\x8A",
+ "\x89\xF3"=>"\xE5\xA3\x8A",
+ "\x89\xF4"=>"\xE5\xBB\xBB",
+ "\x89\xF5"=>"\xE5\xBF\xAB",
+ "\x89\xF6"=>"\xE6\x80\xAA",
+ "\x89\xF7"=>"\xE6\x82\x94",
+ "\x89\xF8"=>"\xE6\x81\xA2",
+ "\x89\xF9"=>"\xE6\x87\x90",
+ "\x89\xFA"=>"\xE6\x88\x92",
+ "\x89\xFB"=>"\xE6\x8B\x90",
+ "\x89\xFC"=>"\xE6\x94\xB9",
+ "\x8A\x40"=>"\xE9\xAD\x81",
+ "\x8A\x41"=>"\xE6\x99\xA6",
+ "\x8A\x42"=>"\xE6\xA2\xB0",
+ "\x8A\x43"=>"\xE6\xB5\xB7",
+ "\x8A\x44"=>"\xE7\x81\xB0",
+ "\x8A\x45"=>"\xE7\x95\x8C",
+ "\x8A\x46"=>"\xE7\x9A\x86",
+ "\x8A\x47"=>"\xE7\xB5\xB5",
+ "\x8A\x48"=>"\xE8\x8A\xA5",
+ "\x8A\x49"=>"\xE8\x9F\xB9",
+ "\x8A\x4A"=>"\xE9\x96\x8B",
+ "\x8A\x4B"=>"\xE9\x9A\x8E",
+ "\x8A\x4C"=>"\xE8\xB2\x9D",
+ "\x8A\x4D"=>"\xE5\x87\xB1",
+ "\x8A\x4E"=>"\xE5\x8A\xBE",
+ "\x8A\x4F"=>"\xE5\xA4\x96",
+ "\x8A\x50"=>"\xE5\x92\xB3",
+ "\x8A\x51"=>"\xE5\xAE\xB3",
+ "\x8A\x52"=>"\xE5\xB4\x96",
+ "\x8A\x53"=>"\xE6\x85\xA8",
+ "\x8A\x54"=>"\xE6\xA6\x82",
+ "\x8A\x55"=>"\xE6\xB6\xAF",
+ "\x8A\x56"=>"\xE7\xA2\x8D",
+ "\x8A\x57"=>"\xE8\x93\x8B",
+ "\x8A\x58"=>"\xE8\xA1\x97",
+ "\x8A\x59"=>"\xE8\xA9\xB2",
+ "\x8A\x5A"=>"\xE9\x8E\xA7",
+ "\x8A\x5B"=>"\xE9\xAA\xB8",
+ "\x8A\x5C"=>"\xE6\xB5\xAC",
+ "\x8A\x5D"=>"\xE9\xA6\xA8",
+ "\x8A\x5E"=>"\xE8\x9B\x99",
+ "\x8A\x5F"=>"\xE5\x9E\xA3",
+ "\x8A\x60"=>"\xE6\x9F\xBF",
+ "\x8A\x61"=>"\xE8\x9B\x8E",
+ "\x8A\x62"=>"\xE9\x88\x8E",
+ "\x8A\x63"=>"\xE5\x8A\x83",
+ "\x8A\x64"=>"\xE5\x9A\x87",
+ "\x8A\x65"=>"\xE5\x90\x84",
+ "\x8A\x66"=>"\xE5\xBB\x93",
+ "\x8A\x67"=>"\xE6\x8B\xA1",
+ "\x8A\x68"=>"\xE6\x92\xB9",
+ "\x8A\x69"=>"\xE6\xA0\xBC",
+ "\x8A\x6A"=>"\xE6\xA0\xB8",
+ "\x8A\x6B"=>"\xE6\xAE\xBB",
+ "\x8A\x6C"=>"\xE7\x8D\xB2",
+ "\x8A\x6D"=>"\xE7\xA2\xBA",
+ "\x8A\x6E"=>"\xE7\xA9\xAB",
+ "\x8A\x6F"=>"\xE8\xA6\x9A",
+ "\x8A\x70"=>"\xE8\xA7\x92",
+ "\x8A\x71"=>"\xE8\xB5\xAB",
+ "\x8A\x72"=>"\xE8\xBC\x83",
+ "\x8A\x73"=>"\xE9\x83\xAD",
+ "\x8A\x74"=>"\xE9\x96\xA3",
+ "\x8A\x75"=>"\xE9\x9A\x94",
+ "\x8A\x76"=>"\xE9\x9D\xA9",
+ "\x8A\x77"=>"\xE5\xAD\xA6",
+ "\x8A\x78"=>"\xE5\xB2\xB3",
+ "\x8A\x79"=>"\xE6\xA5\xBD",
+ "\x8A\x7A"=>"\xE9\xA1\x8D",
+ "\x8A\x7B"=>"\xE9\xA1\x8E",
+ "\x8A\x7C"=>"\xE6\x8E\x9B",
+ "\x8A\x7D"=>"\xE7\xAC\xA0",
+ "\x8A\x7E"=>"\xE6\xA8\xAB",
+ "\x8A\x80"=>"\xE6\xA9\xBF",
+ "\x8A\x81"=>"\xE6\xA2\xB6",
+ "\x8A\x82"=>"\xE9\xB0\x8D",
+ "\x8A\x83"=>"\xE6\xBD\x9F",
+ "\x8A\x84"=>"\xE5\x89\xB2",
+ "\x8A\x85"=>"\xE5\x96\x9D",
+ "\x8A\x86"=>"\xE6\x81\xB0",
+ "\x8A\x87"=>"\xE6\x8B\xAC",
+ "\x8A\x88"=>"\xE6\xB4\xBB",
+ "\x8A\x89"=>"\xE6\xB8\x87",
+ "\x8A\x8A"=>"\xE6\xBB\x91",
+ "\x8A\x8B"=>"\xE8\x91\x9B",
+ "\x8A\x8C"=>"\xE8\xA4\x90",
+ "\x8A\x8D"=>"\xE8\xBD\x84",
+ "\x8A\x8E"=>"\xE4\xB8\x94",
+ "\x8A\x8F"=>"\xE9\xB0\xB9",
+ "\x8A\x90"=>"\xE5\x8F\xB6",
+ "\x8A\x91"=>"\xE6\xA4\x9B",
+ "\x8A\x92"=>"\xE6\xA8\xBA",
+ "\x8A\x93"=>"\xE9\x9E\x84",
+ "\x8A\x94"=>"\xE6\xA0\xAA",
+ "\x8A\x95"=>"\xE5\x85\x9C",
+ "\x8A\x96"=>"\xE7\xAB\x83",
+ "\x8A\x97"=>"\xE8\x92\xB2",
+ "\x8A\x98"=>"\xE9\x87\x9C",
+ "\x8A\x99"=>"\xE9\x8E\x8C",
+ "\x8A\x9A"=>"\xE5\x99\x9B",
+ "\x8A\x9B"=>"\xE9\xB4\xA8",
+ "\x8A\x9C"=>"\xE6\xA0\xA2",
+ "\x8A\x9D"=>"\xE8\x8C\x85",
+ "\x8A\x9E"=>"\xE8\x90\xB1",
+ "\x8A\x9F"=>"\xE7\xB2\xA5",
+ "\x8A\xA0"=>"\xE5\x88\x88",
+ "\x8A\xA1"=>"\xE8\x8B\x85",
+ "\x8A\xA2"=>"\xE7\x93\xA6",
+ "\x8A\xA3"=>"\xE4\xB9\xBE",
+ "\x8A\xA4"=>"\xE4\xBE\x83",
+ "\x8A\xA5"=>"\xE5\x86\xA0",
+ "\x8A\xA6"=>"\xE5\xAF\x92",
+ "\x8A\xA7"=>"\xE5\x88\x8A",
+ "\x8A\xA8"=>"\xE5\x8B\x98",
+ "\x8A\xA9"=>"\xE5\x8B\xA7",
+ "\x8A\xAA"=>"\xE5\xB7\xBB",
+ "\x8A\xAB"=>"\xE5\x96\x9A",
+ "\x8A\xAC"=>"\xE5\xA0\xAA",
+ "\x8A\xAD"=>"\xE5\xA7\xA6",
+ "\x8A\xAE"=>"\xE5\xAE\x8C",
+ "\x8A\xAF"=>"\xE5\xAE\x98",
+ "\x8A\xB0"=>"\xE5\xAF\x9B",
+ "\x8A\xB1"=>"\xE5\xB9\xB2",
+ "\x8A\xB2"=>"\xE5\xB9\xB9",
+ "\x8A\xB3"=>"\xE6\x82\xA3",
+ "\x8A\xB4"=>"\xE6\x84\x9F",
+ "\x8A\xB5"=>"\xE6\x85\xA3",
+ "\x8A\xB6"=>"\xE6\x86\xBE",
+ "\x8A\xB7"=>"\xE6\x8F\x9B",
+ "\x8A\xB8"=>"\xE6\x95\xA2",
+ "\x8A\xB9"=>"\xE6\x9F\x91",
+ "\x8A\xBA"=>"\xE6\xA1\x93",
+ "\x8A\xBB"=>"\xE6\xA3\xBA",
+ "\x8A\xBC"=>"\xE6\xAC\xBE",
+ "\x8A\xBD"=>"\xE6\xAD\x93",
+ "\x8A\xBE"=>"\xE6\xB1\x97",
+ "\x8A\xBF"=>"\xE6\xBC\xA2",
+ "\x8A\xC0"=>"\xE6\xBE\x97",
+ "\x8A\xC1"=>"\xE6\xBD\x85",
+ "\x8A\xC2"=>"\xE7\x92\xB0",
+ "\x8A\xC3"=>"\xE7\x94\x98",
+ "\x8A\xC4"=>"\xE7\x9B\xA3",
+ "\x8A\xC5"=>"\xE7\x9C\x8B",
+ "\x8A\xC6"=>"\xE7\xAB\xBF",
+ "\x8A\xC7"=>"\xE7\xAE\xA1",
+ "\x8A\xC8"=>"\xE7\xB0\xA1",
+ "\x8A\xC9"=>"\xE7\xB7\xA9",
+ "\x8A\xCA"=>"\xE7\xBC\xB6",
+ "\x8A\xCB"=>"\xE7\xBF\xB0",
+ "\x8A\xCC"=>"\xE8\x82\x9D",
+ "\x8A\xCD"=>"\xE8\x89\xA6",
+ "\x8A\xCE"=>"\xE8\x8E\x9E",
+ "\x8A\xCF"=>"\xE8\xA6\xB3",
+ "\x8A\xD0"=>"\xE8\xAB\x8C",
+ "\x8A\xD1"=>"\xE8\xB2\xAB",
+ "\x8A\xD2"=>"\xE9\x82\x84",
+ "\x8A\xD3"=>"\xE9\x91\x91",
+ "\x8A\xD4"=>"\xE9\x96\x93",
+ "\x8A\xD5"=>"\xE9\x96\x91",
+ "\x8A\xD6"=>"\xE9\x96\xA2",
+ "\x8A\xD7"=>"\xE9\x99\xA5",
+ "\x8A\xD8"=>"\xE9\x9F\x93",
+ "\x8A\xD9"=>"\xE9\xA4\xA8",
+ "\x8A\xDA"=>"\xE8\x88\x98",
+ "\x8A\xDB"=>"\xE4\xB8\xB8",
+ "\x8A\xDC"=>"\xE5\x90\xAB",
+ "\x8A\xDD"=>"\xE5\xB2\xB8",
+ "\x8A\xDE"=>"\xE5\xB7\x8C",
+ "\x8A\xDF"=>"\xE7\x8E\xA9",
+ "\x8A\xE0"=>"\xE7\x99\x8C",
+ "\x8A\xE1"=>"\xE7\x9C\xBC",
+ "\x8A\xE2"=>"\xE5\xB2\xA9",
+ "\x8A\xE3"=>"\xE7\xBF\xAB",
+ "\x8A\xE4"=>"\xE8\xB4\x8B",
+ "\x8A\xE5"=>"\xE9\x9B\x81",
+ "\x8A\xE6"=>"\xE9\xA0\x91",
+ "\x8A\xE7"=>"\xE9\xA1\x94",
+ "\x8A\xE8"=>"\xE9\xA1\x98",
+ "\x8A\xE9"=>"\xE4\xBC\x81",
+ "\x8A\xEA"=>"\xE4\xBC\x8E",
+ "\x8A\xEB"=>"\xE5\x8D\xB1",
+ "\x8A\xEC"=>"\xE5\x96\x9C",
+ "\x8A\xED"=>"\xE5\x99\xA8",
+ "\x8A\xEE"=>"\xE5\x9F\xBA",
+ "\x8A\xEF"=>"\xE5\xA5\x87",
+ "\x8A\xF0"=>"\xE5\xAC\x89",
+ "\x8A\xF1"=>"\xE5\xAF\x84",
+ "\x8A\xF2"=>"\xE5\xB2\x90",
+ "\x8A\xF3"=>"\xE5\xB8\x8C",
+ "\x8A\xF4"=>"\xE5\xB9\xBE",
+ "\x8A\xF5"=>"\xE5\xBF\x8C",
+ "\x8A\xF6"=>"\xE6\x8F\xAE",
+ "\x8A\xF7"=>"\xE6\x9C\xBA",
+ "\x8A\xF8"=>"\xE6\x97\x97",
+ "\x8A\xF9"=>"\xE6\x97\xA2",
+ "\x8A\xFA"=>"\xE6\x9C\x9F",
+ "\x8A\xFB"=>"\xE6\xA3\x8B",
+ "\x8A\xFC"=>"\xE6\xA3\x84",
+ "\x8B\x40"=>"\xE6\xA9\x9F",
+ "\x8B\x41"=>"\xE5\xB8\xB0",
+ "\x8B\x42"=>"\xE6\xAF\x85",
+ "\x8B\x43"=>"\xE6\xB0\x97",
+ "\x8B\x44"=>"\xE6\xB1\xBD",
+ "\x8B\x45"=>"\xE7\x95\xBF",
+ "\x8B\x46"=>"\xE7\xA5\x88",
+ "\x8B\x47"=>"\xE5\xAD\xA3",
+ "\x8B\x48"=>"\xE7\xA8\x80",
+ "\x8B\x49"=>"\xE7\xB4\x80",
+ "\x8B\x4A"=>"\xE5\xBE\xBD",
+ "\x8B\x4B"=>"\xE8\xA6\x8F",
+ "\x8B\x4C"=>"\xE8\xA8\x98",
+ "\x8B\x4D"=>"\xE8\xB2\xB4",
+ "\x8B\x4E"=>"\xE8\xB5\xB7",
+ "\x8B\x4F"=>"\xE8\xBB\x8C",
+ "\x8B\x50"=>"\xE8\xBC\x9D",
+ "\x8B\x51"=>"\xE9\xA3\xA2",
+ "\x8B\x52"=>"\xE9\xA8\x8E",
+ "\x8B\x53"=>"\xE9\xAC\xBC",
+ "\x8B\x54"=>"\xE4\xBA\x80",
+ "\x8B\x55"=>"\xE5\x81\xBD",
+ "\x8B\x56"=>"\xE5\x84\x80",
+ "\x8B\x57"=>"\xE5\xA6\x93",
+ "\x8B\x58"=>"\xE5\xAE\x9C",
+ "\x8B\x59"=>"\xE6\x88\xAF",
+ "\x8B\x5A"=>"\xE6\x8A\x80",
+ "\x8B\x5B"=>"\xE6\x93\xAC",
+ "\x8B\x5C"=>"\xE6\xAC\xBA",
+ "\x8B\x5D"=>"\xE7\x8A\xA0",
+ "\x8B\x5E"=>"\xE7\x96\x91",
+ "\x8B\x5F"=>"\xE7\xA5\x87",
+ "\x8B\x60"=>"\xE7\xBE\xA9",
+ "\x8B\x61"=>"\xE8\x9F\xBB",
+ "\x8B\x62"=>"\xE8\xAA\xBC",
+ "\x8B\x63"=>"\xE8\xAD\xB0",
+ "\x8B\x64"=>"\xE6\x8E\xAC",
+ "\x8B\x65"=>"\xE8\x8F\x8A",
+ "\x8B\x66"=>"\xE9\x9E\xA0",
+ "\x8B\x67"=>"\xE5\x90\x89",
+ "\x8B\x68"=>"\xE5\x90\x83",
+ "\x8B\x69"=>"\xE5\x96\xAB",
+ "\x8B\x6A"=>"\xE6\xA1\x94",
+ "\x8B\x6B"=>"\xE6\xA9\x98",
+ "\x8B\x6C"=>"\xE8\xA9\xB0",
+ "\x8B\x6D"=>"\xE7\xA0\xA7",
+ "\x8B\x6E"=>"\xE6\x9D\xB5",
+ "\x8B\x6F"=>"\xE9\xBB\x8D",
+ "\x8B\x70"=>"\xE5\x8D\xB4",
+ "\x8B\x71"=>"\xE5\xAE\xA2",
+ "\x8B\x72"=>"\xE8\x84\x9A",
+ "\x8B\x73"=>"\xE8\x99\x90",
+ "\x8B\x74"=>"\xE9\x80\x86",
+ "\x8B\x75"=>"\xE4\xB8\x98",
+ "\x8B\x76"=>"\xE4\xB9\x85",
+ "\x8B\x77"=>"\xE4\xBB\x87",
+ "\x8B\x78"=>"\xE4\xBC\x91",
+ "\x8B\x79"=>"\xE5\x8F\x8A",
+ "\x8B\x7A"=>"\xE5\x90\xB8",
+ "\x8B\x7B"=>"\xE5\xAE\xAE",
+ "\x8B\x7C"=>"\xE5\xBC\x93",
+ "\x8B\x7D"=>"\xE6\x80\xA5",
+ "\x8B\x7E"=>"\xE6\x95\x91",
+ "\x8B\x80"=>"\xE6\x9C\xBD",
+ "\x8B\x81"=>"\xE6\xB1\x82",
+ "\x8B\x82"=>"\xE6\xB1\xB2",
+ "\x8B\x83"=>"\xE6\xB3\xA3",
+ "\x8B\x84"=>"\xE7\x81\xB8",
+ "\x8B\x85"=>"\xE7\x90\x83",
+ "\x8B\x86"=>"\xE7\xA9\xB6",
+ "\x8B\x87"=>"\xE7\xAA\xAE",
+ "\x8B\x88"=>"\xE7\xAC\x88",
+ "\x8B\x89"=>"\xE7\xB4\x9A",
+ "\x8B\x8A"=>"\xE7\xB3\xBE",
+ "\x8B\x8B"=>"\xE7\xB5\xA6",
+ "\x8B\x8C"=>"\xE6\x97\xA7",
+ "\x8B\x8D"=>"\xE7\x89\x9B",
+ "\x8B\x8E"=>"\xE5\x8E\xBB",
+ "\x8B\x8F"=>"\xE5\xB1\x85",
+ "\x8B\x90"=>"\xE5\xB7\xA8",
+ "\x8B\x91"=>"\xE6\x8B\x92",
+ "\x8B\x92"=>"\xE6\x8B\xA0",
+ "\x8B\x93"=>"\xE6\x8C\x99",
+ "\x8B\x94"=>"\xE6\xB8\xA0",
+ "\x8B\x95"=>"\xE8\x99\x9A",
+ "\x8B\x96"=>"\xE8\xA8\xB1",
+ "\x8B\x97"=>"\xE8\xB7\x9D",
+ "\x8B\x98"=>"\xE9\x8B\xB8",
+ "\x8B\x99"=>"\xE6\xBC\x81",
+ "\x8B\x9A"=>"\xE7\xA6\xA6",
+ "\x8B\x9B"=>"\xE9\xAD\x9A",
+ "\x8B\x9C"=>"\xE4\xBA\xA8",
+ "\x8B\x9D"=>"\xE4\xBA\xAB",
+ "\x8B\x9E"=>"\xE4\xBA\xAC",
+ "\x8B\x9F"=>"\xE4\xBE\x9B",
+ "\x8B\xA0"=>"\xE4\xBE\xA0",
+ "\x8B\xA1"=>"\xE5\x83\x91",
+ "\x8B\xA2"=>"\xE5\x85\x87",
+ "\x8B\xA3"=>"\xE7\xAB\xB6",
+ "\x8B\xA4"=>"\xE5\x85\xB1",
+ "\x8B\xA5"=>"\xE5\x87\xB6",
+ "\x8B\xA6"=>"\xE5\x8D\x94",
+ "\x8B\xA7"=>"\xE5\x8C\xA1",
+ "\x8B\xA8"=>"\xE5\x8D\xBF",
+ "\x8B\xA9"=>"\xE5\x8F\xAB",
+ "\x8B\xAA"=>"\xE5\x96\xAC",
+ "\x8B\xAB"=>"\xE5\xA2\x83",
+ "\x8B\xAC"=>"\xE5\xB3\xA1",
+ "\x8B\xAD"=>"\xE5\xBC\xB7",
+ "\x8B\xAE"=>"\xE5\xBD\x8A",
+ "\x8B\xAF"=>"\xE6\x80\xAF",
+ "\x8B\xB0"=>"\xE6\x81\x90",
+ "\x8B\xB1"=>"\xE6\x81\xAD",
+ "\x8B\xB2"=>"\xE6\x8C\x9F",
+ "\x8B\xB3"=>"\xE6\x95\x99",
+ "\x8B\xB4"=>"\xE6\xA9\x8B",
+ "\x8B\xB5"=>"\xE6\xB3\x81",
+ "\x8B\xB6"=>"\xE7\x8B\x82",
+ "\x8B\xB7"=>"\xE7\x8B\xAD",
+ "\x8B\xB8"=>"\xE7\x9F\xAF",
+ "\x8B\xB9"=>"\xE8\x83\xB8",
+ "\x8B\xBA"=>"\xE8\x84\x85",
+ "\x8B\xBB"=>"\xE8\x88\x88",
+ "\x8B\xBC"=>"\xE8\x95\x8E",
+ "\x8B\xBD"=>"\xE9\x83\xB7",
+ "\x8B\xBE"=>"\xE9\x8F\xA1",
+ "\x8B\xBF"=>"\xE9\x9F\xBF",
+ "\x8B\xC0"=>"\xE9\xA5\x97",
+ "\x8B\xC1"=>"\xE9\xA9\x9A",
+ "\x8B\xC2"=>"\xE4\xBB\xB0",
+ "\x8B\xC3"=>"\xE5\x87\x9D",
+ "\x8B\xC4"=>"\xE5\xB0\xAD",
+ "\x8B\xC5"=>"\xE6\x9A\x81",
+ "\x8B\xC6"=>"\xE6\xA5\xAD",
+ "\x8B\xC7"=>"\xE5\xB1\x80",
+ "\x8B\xC8"=>"\xE6\x9B\xB2",
+ "\x8B\xC9"=>"\xE6\xA5\xB5",
+ "\x8B\xCA"=>"\xE7\x8E\x89",
+ "\x8B\xCB"=>"\xE6\xA1\x90",
+ "\x8B\xCC"=>"\xE7\xB2\x81",
+ "\x8B\xCD"=>"\xE5\x83\x85",
+ "\x8B\xCE"=>"\xE5\x8B\xA4",
+ "\x8B\xCF"=>"\xE5\x9D\x87",
+ "\x8B\xD0"=>"\xE5\xB7\xBE",
+ "\x8B\xD1"=>"\xE9\x8C\xA6",
+ "\x8B\xD2"=>"\xE6\x96\xA4",
+ "\x8B\xD3"=>"\xE6\xAC\xA3",
+ "\x8B\xD4"=>"\xE6\xAC\xBD",
+ "\x8B\xD5"=>"\xE7\x90\xB4",
+ "\x8B\xD6"=>"\xE7\xA6\x81",
+ "\x8B\xD7"=>"\xE7\xA6\xBD",
+ "\x8B\xD8"=>"\xE7\xAD\x8B",
+ "\x8B\xD9"=>"\xE7\xB7\x8A",
+ "\x8B\xDA"=>"\xE8\x8A\xB9",
+ "\x8B\xDB"=>"\xE8\x8F\x8C",
+ "\x8B\xDC"=>"\xE8\xA1\xBF",
+ "\x8B\xDD"=>"\xE8\xA5\x9F",
+ "\x8B\xDE"=>"\xE8\xAC\xB9",
+ "\x8B\xDF"=>"\xE8\xBF\x91",
+ "\x8B\xE0"=>"\xE9\x87\x91",
+ "\x8B\xE1"=>"\xE5\x90\x9F",
+ "\x8B\xE2"=>"\xE9\x8A\x80",
+ "\x8B\xE3"=>"\xE4\xB9\x9D",
+ "\x8B\xE4"=>"\xE5\x80\xB6",
+ "\x8B\xE5"=>"\xE5\x8F\xA5",
+ "\x8B\xE6"=>"\xE5\x8C\xBA",
+ "\x8B\xE7"=>"\xE7\x8B\x97",
+ "\x8B\xE8"=>"\xE7\x8E\x96",
+ "\x8B\xE9"=>"\xE7\x9F\xA9",
+ "\x8B\xEA"=>"\xE8\x8B\xA6",
+ "\x8B\xEB"=>"\xE8\xBA\xAF",
+ "\x8B\xEC"=>"\xE9\xA7\x86",
+ "\x8B\xED"=>"\xE9\xA7\x88",
+ "\x8B\xEE"=>"\xE9\xA7\x92",
+ "\x8B\xEF"=>"\xE5\x85\xB7",
+ "\x8B\xF0"=>"\xE6\x84\x9A",
+ "\x8B\xF1"=>"\xE8\x99\x9E",
+ "\x8B\xF2"=>"\xE5\x96\xB0",
+ "\x8B\xF3"=>"\xE7\xA9\xBA",
+ "\x8B\xF4"=>"\xE5\x81\xB6",
+ "\x8B\xF5"=>"\xE5\xAF\x93",
+ "\x8B\xF6"=>"\xE9\x81\x87",
+ "\x8B\xF7"=>"\xE9\x9A\x85",
+ "\x8B\xF8"=>"\xE4\xB8\xB2",
+ "\x8B\xF9"=>"\xE6\xAB\x9B",
+ "\x8B\xFA"=>"\xE9\x87\xA7",
+ "\x8B\xFB"=>"\xE5\xB1\x91",
+ "\x8B\xFC"=>"\xE5\xB1\x88",
+ "\x8C\x40"=>"\xE6\x8E\x98",
+ "\x8C\x41"=>"\xE7\xAA\x9F",
+ "\x8C\x42"=>"\xE6\xB2\x93",
+ "\x8C\x43"=>"\xE9\x9D\xB4",
+ "\x8C\x44"=>"\xE8\xBD\xA1",
+ "\x8C\x45"=>"\xE7\xAA\xAA",
+ "\x8C\x46"=>"\xE7\x86\x8A",
+ "\x8C\x47"=>"\xE9\x9A\x88",
+ "\x8C\x48"=>"\xE7\xB2\x82",
+ "\x8C\x49"=>"\xE6\xA0\x97",
+ "\x8C\x4A"=>"\xE7\xB9\xB0",
+ "\x8C\x4B"=>"\xE6\xA1\x91",
+ "\x8C\x4C"=>"\xE9\x8D\xAC",
+ "\x8C\x4D"=>"\xE5\x8B\xB2",
+ "\x8C\x4E"=>"\xE5\x90\x9B",
+ "\x8C\x4F"=>"\xE8\x96\xAB",
+ "\x8C\x50"=>"\xE8\xA8\x93",
+ "\x8C\x51"=>"\xE7\xBE\xA4",
+ "\x8C\x52"=>"\xE8\xBB\x8D",
+ "\x8C\x53"=>"\xE9\x83\xA1",
+ "\x8C\x54"=>"\xE5\x8D\xA6",
+ "\x8C\x55"=>"\xE8\xA2\x88",
+ "\x8C\x56"=>"\xE7\xA5\x81",
+ "\x8C\x57"=>"\xE4\xBF\x82",
+ "\x8C\x58"=>"\xE5\x82\xBE",
+ "\x8C\x59"=>"\xE5\x88\x91",
+ "\x8C\x5A"=>"\xE5\x85\x84",
+ "\x8C\x5B"=>"\xE5\x95\x93",
+ "\x8C\x5C"=>"\xE5\x9C\xAD",
+ "\x8C\x5D"=>"\xE7\x8F\xAA",
+ "\x8C\x5E"=>"\xE5\x9E\x8B",
+ "\x8C\x5F"=>"\xE5\xA5\x91",
+ "\x8C\x60"=>"\xE5\xBD\xA2",
+ "\x8C\x61"=>"\xE5\xBE\x84",
+ "\x8C\x62"=>"\xE6\x81\xB5",
+ "\x8C\x63"=>"\xE6\x85\xB6",
+ "\x8C\x64"=>"\xE6\x85\xA7",
+ "\x8C\x65"=>"\xE6\x86\xA9",
+ "\x8C\x66"=>"\xE6\x8E\xB2",
+ "\x8C\x67"=>"\xE6\x90\xBA",
+ "\x8C\x68"=>"\xE6\x95\xAC",
+ "\x8C\x69"=>"\xE6\x99\xAF",
+ "\x8C\x6A"=>"\xE6\xA1\x82",
+ "\x8C\x6B"=>"\xE6\xB8\x93",
+ "\x8C\x6C"=>"\xE7\x95\xA6",
+ "\x8C\x6D"=>"\xE7\xA8\xBD",
+ "\x8C\x6E"=>"\xE7\xB3\xBB",
+ "\x8C\x6F"=>"\xE7\xB5\x8C",
+ "\x8C\x70"=>"\xE7\xB6\x99",
+ "\x8C\x71"=>"\xE7\xB9\x8B",
+ "\x8C\x72"=>"\xE7\xBD\xAB",
+ "\x8C\x73"=>"\xE8\x8C\x8E",
+ "\x8C\x74"=>"\xE8\x8D\x8A",
+ "\x8C\x75"=>"\xE8\x9B\x8D",
+ "\x8C\x76"=>"\xE8\xA8\x88",
+ "\x8C\x77"=>"\xE8\xA9\xA3",
+ "\x8C\x78"=>"\xE8\xAD\xA6",
+ "\x8C\x79"=>"\xE8\xBB\xBD",
+ "\x8C\x7A"=>"\xE9\xA0\x9A",
+ "\x8C\x7B"=>"\xE9\xB6\x8F",
+ "\x8C\x7C"=>"\xE8\x8A\xB8",
+ "\x8C\x7D"=>"\xE8\xBF\x8E",
+ "\x8C\x7E"=>"\xE9\xAF\xA8",
+ "\x8C\x80"=>"\xE5\x8A\x87",
+ "\x8C\x81"=>"\xE6\x88\x9F",
+ "\x8C\x82"=>"\xE6\x92\x83",
+ "\x8C\x83"=>"\xE6\xBF\x80",
+ "\x8C\x84"=>"\xE9\x9A\x99",
+ "\x8C\x85"=>"\xE6\xA1\x81",
+ "\x8C\x86"=>"\xE5\x82\x91",
+ "\x8C\x87"=>"\xE6\xAC\xA0",
+ "\x8C\x88"=>"\xE6\xB1\xBA",
+ "\x8C\x89"=>"\xE6\xBD\x94",
+ "\x8C\x8A"=>"\xE7\xA9\xB4",
+ "\x8C\x8B"=>"\xE7\xB5\x90",
+ "\x8C\x8C"=>"\xE8\xA1\x80",
+ "\x8C\x8D"=>"\xE8\xA8\xA3",
+ "\x8C\x8E"=>"\xE6\x9C\x88",
+ "\x8C\x8F"=>"\xE4\xBB\xB6",
+ "\x8C\x90"=>"\xE5\x80\xB9",
+ "\x8C\x91"=>"\xE5\x80\xA6",
+ "\x8C\x92"=>"\xE5\x81\xA5",
+ "\x8C\x93"=>"\xE5\x85\xBC",
+ "\x8C\x94"=>"\xE5\x88\xB8",
+ "\x8C\x95"=>"\xE5\x89\xA3",
+ "\x8C\x96"=>"\xE5\x96\xA7",
+ "\x8C\x97"=>"\xE5\x9C\x8F",
+ "\x8C\x98"=>"\xE5\xA0\x85",
+ "\x8C\x99"=>"\xE5\xAB\x8C",
+ "\x8C\x9A"=>"\xE5\xBB\xBA",
+ "\x8C\x9B"=>"\xE6\x86\xB2",
+ "\x8C\x9C"=>"\xE6\x87\xB8",
+ "\x8C\x9D"=>"\xE6\x8B\xB3",
+ "\x8C\x9E"=>"\xE6\x8D\xB2",
+ "\x8C\x9F"=>"\xE6\xA4\x9C",
+ "\x8C\xA0"=>"\xE6\xA8\xA9",
+ "\x8C\xA1"=>"\xE7\x89\xBD",
+ "\x8C\xA2"=>"\xE7\x8A\xAC",
+ "\x8C\xA3"=>"\xE7\x8C\xAE",
+ "\x8C\xA4"=>"\xE7\xA0\x94",
+ "\x8C\xA5"=>"\xE7\xA1\xAF",
+ "\x8C\xA6"=>"\xE7\xB5\xB9",
+ "\x8C\xA7"=>"\xE7\x9C\x8C",
+ "\x8C\xA8"=>"\xE8\x82\xA9",
+ "\x8C\xA9"=>"\xE8\xA6\x8B",
+ "\x8C\xAA"=>"\xE8\xAC\x99",
+ "\x8C\xAB"=>"\xE8\xB3\xA2",
+ "\x8C\xAC"=>"\xE8\xBB\x92",
+ "\x8C\xAD"=>"\xE9\x81\xA3",
+ "\x8C\xAE"=>"\xE9\x8D\xB5",
+ "\x8C\xAF"=>"\xE9\x99\xBA",
+ "\x8C\xB0"=>"\xE9\xA1\x95",
+ "\x8C\xB1"=>"\xE9\xA8\x93",
+ "\x8C\xB2"=>"\xE9\xB9\xB8",
+ "\x8C\xB3"=>"\xE5\x85\x83",
+ "\x8C\xB4"=>"\xE5\x8E\x9F",
+ "\x8C\xB5"=>"\xE5\x8E\xB3",
+ "\x8C\xB6"=>"\xE5\xB9\xBB",
+ "\x8C\xB7"=>"\xE5\xBC\xA6",
+ "\x8C\xB8"=>"\xE6\xB8\x9B",
+ "\x8C\xB9"=>"\xE6\xBA\x90",
+ "\x8C\xBA"=>"\xE7\x8E\x84",
+ "\x8C\xBB"=>"\xE7\x8F\xBE",
+ "\x8C\xBC"=>"\xE7\xB5\x83",
+ "\x8C\xBD"=>"\xE8\x88\xB7",
+ "\x8C\xBE"=>"\xE8\xA8\x80",
+ "\x8C\xBF"=>"\xE8\xAB\xBA",
+ "\x8C\xC0"=>"\xE9\x99\x90",
+ "\x8C\xC1"=>"\xE4\xB9\x8E",
+ "\x8C\xC2"=>"\xE5\x80\x8B",
+ "\x8C\xC3"=>"\xE5\x8F\xA4",
+ "\x8C\xC4"=>"\xE5\x91\xBC",
+ "\x8C\xC5"=>"\xE5\x9B\xBA",
+ "\x8C\xC6"=>"\xE5\xA7\x91",
+ "\x8C\xC7"=>"\xE5\xAD\xA4",
+ "\x8C\xC8"=>"\xE5\xB7\xB1",
+ "\x8C\xC9"=>"\xE5\xBA\xAB",
+ "\x8C\xCA"=>"\xE5\xBC\xA7",
+ "\x8C\xCB"=>"\xE6\x88\xB8",
+ "\x8C\xCC"=>"\xE6\x95\x85",
+ "\x8C\xCD"=>"\xE6\x9E\xAF",
+ "\x8C\xCE"=>"\xE6\xB9\x96",
+ "\x8C\xCF"=>"\xE7\x8B\x90",
+ "\x8C\xD0"=>"\xE7\xB3\x8A",
+ "\x8C\xD1"=>"\xE8\xA2\xB4",
+ "\x8C\xD2"=>"\xE8\x82\xA1",
+ "\x8C\xD3"=>"\xE8\x83\xA1",
+ "\x8C\xD4"=>"\xE8\x8F\xB0",
+ "\x8C\xD5"=>"\xE8\x99\x8E",
+ "\x8C\xD6"=>"\xE8\xAA\x87",
+ "\x8C\xD7"=>"\xE8\xB7\xA8",
+ "\x8C\xD8"=>"\xE9\x88\xB7",
+ "\x8C\xD9"=>"\xE9\x9B\x87",
+ "\x8C\xDA"=>"\xE9\xA1\xA7",
+ "\x8C\xDB"=>"\xE9\xBC\x93",
+ "\x8C\xDC"=>"\xE4\xBA\x94",
+ "\x8C\xDD"=>"\xE4\xBA\x92",
+ "\x8C\xDE"=>"\xE4\xBC\x8D",
+ "\x8C\xDF"=>"\xE5\x8D\x88",
+ "\x8C\xE0"=>"\xE5\x91\x89",
+ "\x8C\xE1"=>"\xE5\x90\xBE",
+ "\x8C\xE2"=>"\xE5\xA8\xAF",
+ "\x8C\xE3"=>"\xE5\xBE\x8C",
+ "\x8C\xE4"=>"\xE5\xBE\xA1",
+ "\x8C\xE5"=>"\xE6\x82\x9F",
+ "\x8C\xE6"=>"\xE6\xA2\xA7",
+ "\x8C\xE7"=>"\xE6\xAA\x8E",
+ "\x8C\xE8"=>"\xE7\x91\x9A",
+ "\x8C\xE9"=>"\xE7\xA2\x81",
+ "\x8C\xEA"=>"\xE8\xAA\x9E",
+ "\x8C\xEB"=>"\xE8\xAA\xA4",
+ "\x8C\xEC"=>"\xE8\xAD\xB7",
+ "\x8C\xED"=>"\xE9\x86\x90",
+ "\x8C\xEE"=>"\xE4\xB9\x9E",
+ "\x8C\xEF"=>"\xE9\xAF\x89",
+ "\x8C\xF0"=>"\xE4\xBA\xA4",
+ "\x8C\xF1"=>"\xE4\xBD\xBC",
+ "\x8C\xF2"=>"\xE4\xBE\xAF",
+ "\x8C\xF3"=>"\xE5\x80\x99",
+ "\x8C\xF4"=>"\xE5\x80\x96",
+ "\x8C\xF5"=>"\xE5\x85\x89",
+ "\x8C\xF6"=>"\xE5\x85\xAC",
+ "\x8C\xF7"=>"\xE5\x8A\x9F",
+ "\x8C\xF8"=>"\xE5\x8A\xB9",
+ "\x8C\xF9"=>"\xE5\x8B\xBE",
+ "\x8C\xFA"=>"\xE5\x8E\x9A",
+ "\x8C\xFB"=>"\xE5\x8F\xA3",
+ "\x8C\xFC"=>"\xE5\x90\x91",
+ "\x8D\x40"=>"\xE5\x90\x8E",
+ "\x8D\x41"=>"\xE5\x96\x89",
+ "\x8D\x42"=>"\xE5\x9D\x91",
+ "\x8D\x43"=>"\xE5\x9E\xA2",
+ "\x8D\x44"=>"\xE5\xA5\xBD",
+ "\x8D\x45"=>"\xE5\xAD\x94",
+ "\x8D\x46"=>"\xE5\xAD\x9D",
+ "\x8D\x47"=>"\xE5\xAE\x8F",
+ "\x8D\x48"=>"\xE5\xB7\xA5",
+ "\x8D\x49"=>"\xE5\xB7\xA7",
+ "\x8D\x4A"=>"\xE5\xB7\xB7",
+ "\x8D\x4B"=>"\xE5\xB9\xB8",
+ "\x8D\x4C"=>"\xE5\xBA\x83",
+ "\x8D\x4D"=>"\xE5\xBA\x9A",
+ "\x8D\x4E"=>"\xE5\xBA\xB7",
+ "\x8D\x4F"=>"\xE5\xBC\x98",
+ "\x8D\x50"=>"\xE6\x81\x92",
+ "\x8D\x51"=>"\xE6\x85\x8C",
+ "\x8D\x52"=>"\xE6\x8A\x97",
+ "\x8D\x53"=>"\xE6\x8B\x98",
+ "\x8D\x54"=>"\xE6\x8E\xA7",
+ "\x8D\x55"=>"\xE6\x94\xBB",
+ "\x8D\x56"=>"\xE6\x98\x82",
+ "\x8D\x57"=>"\xE6\x99\x83",
+ "\x8D\x58"=>"\xE6\x9B\xB4",
+ "\x8D\x59"=>"\xE6\x9D\xAD",
+ "\x8D\x5A"=>"\xE6\xA0\xA1",
+ "\x8D\x5B"=>"\xE6\xA2\x97",
+ "\x8D\x5C"=>"\xE6\xA7\x8B",
+ "\x8D\x5D"=>"\xE6\xB1\x9F",
+ "\x8D\x5E"=>"\xE6\xB4\xAA",
+ "\x8D\x5F"=>"\xE6\xB5\xA9",
+ "\x8D\x60"=>"\xE6\xB8\xAF",
+ "\x8D\x61"=>"\xE6\xBA\x9D",
+ "\x8D\x62"=>"\xE7\x94\xB2",
+ "\x8D\x63"=>"\xE7\x9A\x87",
+ "\x8D\x64"=>"\xE7\xA1\xAC",
+ "\x8D\x65"=>"\xE7\xA8\xBF",
+ "\x8D\x66"=>"\xE7\xB3\xA0",
+ "\x8D\x67"=>"\xE7\xB4\x85",
+ "\x8D\x68"=>"\xE7\xB4\x98",
+ "\x8D\x69"=>"\xE7\xB5\x9E",
+ "\x8D\x6A"=>"\xE7\xB6\xB1",
+ "\x8D\x6B"=>"\xE8\x80\x95",
+ "\x8D\x6C"=>"\xE8\x80\x83",
+ "\x8D\x6D"=>"\xE8\x82\xAF",
+ "\x8D\x6E"=>"\xE8\x82\xB1",
+ "\x8D\x6F"=>"\xE8\x85\x94",
+ "\x8D\x70"=>"\xE8\x86\x8F",
+ "\x8D\x71"=>"\xE8\x88\xAA",
+ "\x8D\x72"=>"\xE8\x8D\x92",
+ "\x8D\x73"=>"\xE8\xA1\x8C",
+ "\x8D\x74"=>"\xE8\xA1\xA1",
+ "\x8D\x75"=>"\xE8\xAC\x9B",
+ "\x8D\x76"=>"\xE8\xB2\xA2",
+ "\x8D\x77"=>"\xE8\xB3\xBC",
+ "\x8D\x78"=>"\xE9\x83\x8A",
+ "\x8D\x79"=>"\xE9\x85\xB5",
+ "\x8D\x7A"=>"\xE9\x89\xB1",
+ "\x8D\x7B"=>"\xE7\xA0\xBF",
+ "\x8D\x7C"=>"\xE9\x8B\xBC",
+ "\x8D\x7D"=>"\xE9\x96\xA4",
+ "\x8D\x7E"=>"\xE9\x99\x8D",
+ "\x8D\x80"=>"\xE9\xA0\x85",
+ "\x8D\x81"=>"\xE9\xA6\x99",
+ "\x8D\x82"=>"\xE9\xAB\x98",
+ "\x8D\x83"=>"\xE9\xB4\xBB",
+ "\x8D\x84"=>"\xE5\x89\x9B",
+ "\x8D\x85"=>"\xE5\x8A\xAB",
+ "\x8D\x86"=>"\xE5\x8F\xB7",
+ "\x8D\x87"=>"\xE5\x90\x88",
+ "\x8D\x88"=>"\xE5\xA3\x95",
+ "\x8D\x89"=>"\xE6\x8B\xB7",
+ "\x8D\x8A"=>"\xE6\xBF\xA0",
+ "\x8D\x8B"=>"\xE8\xB1\xAA",
+ "\x8D\x8C"=>"\xE8\xBD\x9F",
+ "\x8D\x8D"=>"\xE9\xBA\xB9",
+ "\x8D\x8E"=>"\xE5\x85\x8B",
+ "\x8D\x8F"=>"\xE5\x88\xBB",
+ "\x8D\x90"=>"\xE5\x91\x8A",
+ "\x8D\x91"=>"\xE5\x9B\xBD",
+ "\x8D\x92"=>"\xE7\xA9\x80",
+ "\x8D\x93"=>"\xE9\x85\xB7",
+ "\x8D\x94"=>"\xE9\xB5\xA0",
+ "\x8D\x95"=>"\xE9\xBB\x92",
+ "\x8D\x96"=>"\xE7\x8D\x84",
+ "\x8D\x97"=>"\xE6\xBC\x89",
+ "\x8D\x98"=>"\xE8\x85\xB0",
+ "\x8D\x99"=>"\xE7\x94\x91",
+ "\x8D\x9A"=>"\xE5\xBF\xBD",
+ "\x8D\x9B"=>"\xE6\x83\x9A",
+ "\x8D\x9C"=>"\xE9\xAA\xA8",
+ "\x8D\x9D"=>"\xE7\x8B\x9B",
+ "\x8D\x9E"=>"\xE8\xBE\xBC",
+ "\x8D\x9F"=>"\xE6\xAD\xA4",
+ "\x8D\xA0"=>"\xE9\xA0\x83",
+ "\x8D\xA1"=>"\xE4\xBB\x8A",
+ "\x8D\xA2"=>"\xE5\x9B\xB0",
+ "\x8D\xA3"=>"\xE5\x9D\xA4",
+ "\x8D\xA4"=>"\xE5\xA2\xBE",
+ "\x8D\xA5"=>"\xE5\xA9\x9A",
+ "\x8D\xA6"=>"\xE6\x81\xA8",
+ "\x8D\xA7"=>"\xE6\x87\x87",
+ "\x8D\xA8"=>"\xE6\x98\x8F",
+ "\x8D\xA9"=>"\xE6\x98\x86",
+ "\x8D\xAA"=>"\xE6\xA0\xB9",
+ "\x8D\xAB"=>"\xE6\xA2\xB1",
+ "\x8D\xAC"=>"\xE6\xB7\xB7",
+ "\x8D\xAD"=>"\xE7\x97\x95",
+ "\x8D\xAE"=>"\xE7\xB4\xBA",
+ "\x8D\xAF"=>"\xE8\x89\xAE",
+ "\x8D\xB0"=>"\xE9\xAD\x82",
+ "\x8D\xB1"=>"\xE4\xBA\x9B",
+ "\x8D\xB2"=>"\xE4\xBD\x90",
+ "\x8D\xB3"=>"\xE5\x8F\x89",
+ "\x8D\xB4"=>"\xE5\x94\x86",
+ "\x8D\xB5"=>"\xE5\xB5\xAF",
+ "\x8D\xB6"=>"\xE5\xB7\xA6",
+ "\x8D\xB7"=>"\xE5\xB7\xAE",
+ "\x8D\xB8"=>"\xE6\x9F\xBB",
+ "\x8D\xB9"=>"\xE6\xB2\x99",
+ "\x8D\xBA"=>"\xE7\x91\xB3",
+ "\x8D\xBB"=>"\xE7\xA0\x82",
+ "\x8D\xBC"=>"\xE8\xA9\x90",
+ "\x8D\xBD"=>"\xE9\x8E\x96",
+ "\x8D\xBE"=>"\xE8\xA3\x9F",
+ "\x8D\xBF"=>"\xE5\x9D\x90",
+ "\x8D\xC0"=>"\xE5\xBA\xA7",
+ "\x8D\xC1"=>"\xE6\x8C\xAB",
+ "\x8D\xC2"=>"\xE5\x82\xB5",
+ "\x8D\xC3"=>"\xE5\x82\xAC",
+ "\x8D\xC4"=>"\xE5\x86\x8D",
+ "\x8D\xC5"=>"\xE6\x9C\x80",
+ "\x8D\xC6"=>"\xE5\x93\x89",
+ "\x8D\xC7"=>"\xE5\xA1\x9E",
+ "\x8D\xC8"=>"\xE5\xA6\xBB",
+ "\x8D\xC9"=>"\xE5\xAE\xB0",
+ "\x8D\xCA"=>"\xE5\xBD\xA9",
+ "\x8D\xCB"=>"\xE6\x89\x8D",
+ "\x8D\xCC"=>"\xE6\x8E\xA1",
+ "\x8D\xCD"=>"\xE6\xA0\xBD",
+ "\x8D\xCE"=>"\xE6\xAD\xB3",
+ "\x8D\xCF"=>"\xE6\xB8\x88",
+ "\x8D\xD0"=>"\xE7\x81\xBD",
+ "\x8D\xD1"=>"\xE9\x87\x87",
+ "\x8D\xD2"=>"\xE7\x8A\x80",
+ "\x8D\xD3"=>"\xE7\xA0\x95",
+ "\x8D\xD4"=>"\xE7\xA0\xA6",
+ "\x8D\xD5"=>"\xE7\xA5\xAD",
+ "\x8D\xD6"=>"\xE6\x96\x8E",
+ "\x8D\xD7"=>"\xE7\xB4\xB0",
+ "\x8D\xD8"=>"\xE8\x8F\x9C",
+ "\x8D\xD9"=>"\xE8\xA3\x81",
+ "\x8D\xDA"=>"\xE8\xBC\x89",
+ "\x8D\xDB"=>"\xE9\x9A\x9B",
+ "\x8D\xDC"=>"\xE5\x89\xA4",
+ "\x8D\xDD"=>"\xE5\x9C\xA8",
+ "\x8D\xDE"=>"\xE6\x9D\x90",
+ "\x8D\xDF"=>"\xE7\xBD\xAA",
+ "\x8D\xE0"=>"\xE8\xB2\xA1",
+ "\x8D\xE1"=>"\xE5\x86\xB4",
+ "\x8D\xE2"=>"\xE5\x9D\x82",
+ "\x8D\xE3"=>"\xE9\x98\xAA",
+ "\x8D\xE4"=>"\xE5\xA0\xBA",
+ "\x8D\xE5"=>"\xE6\xA6\x8A",
+ "\x8D\xE6"=>"\xE8\x82\xB4",
+ "\x8D\xE7"=>"\xE5\x92\xB2",
+ "\x8D\xE8"=>"\xE5\xB4\x8E",
+ "\x8D\xE9"=>"\xE5\x9F\xBC",
+ "\x8D\xEA"=>"\xE7\xA2\x95",
+ "\x8D\xEB"=>"\xE9\xB7\xBA",
+ "\x8D\xEC"=>"\xE4\xBD\x9C",
+ "\x8D\xED"=>"\xE5\x89\x8A",
+ "\x8D\xEE"=>"\xE5\x92\x8B",
+ "\x8D\xEF"=>"\xE6\x90\xBE",
+ "\x8D\xF0"=>"\xE6\x98\xA8",
+ "\x8D\xF1"=>"\xE6\x9C\x94",
+ "\x8D\xF2"=>"\xE6\x9F\xB5",
+ "\x8D\xF3"=>"\xE7\xAA\x84",
+ "\x8D\xF4"=>"\xE7\xAD\x96",
+ "\x8D\xF5"=>"\xE7\xB4\xA2",
+ "\x8D\xF6"=>"\xE9\x8C\xAF",
+ "\x8D\xF7"=>"\xE6\xA1\x9C",
+ "\x8D\xF8"=>"\xE9\xAE\xAD",
+ "\x8D\xF9"=>"\xE7\xAC\xB9",
+ "\x8D\xFA"=>"\xE5\x8C\x99",
+ "\x8D\xFB"=>"\xE5\x86\x8A",
+ "\x8D\xFC"=>"\xE5\x88\xB7",
+ "\x8E\x40"=>"\xE5\xAF\x9F",
+ "\x8E\x41"=>"\xE6\x8B\xB6",
+ "\x8E\x42"=>"\xE6\x92\xAE",
+ "\x8E\x43"=>"\xE6\x93\xA6",
+ "\x8E\x44"=>"\xE6\x9C\xAD",
+ "\x8E\x45"=>"\xE6\xAE\xBA",
+ "\x8E\x46"=>"\xE8\x96\xA9",
+ "\x8E\x47"=>"\xE9\x9B\x91",
+ "\x8E\x48"=>"\xE7\x9A\x90",
+ "\x8E\x49"=>"\xE9\xAF\x96",
+ "\x8E\x4A"=>"\xE6\x8D\x8C",
+ "\x8E\x4B"=>"\xE9\x8C\x86",
+ "\x8E\x4C"=>"\xE9\xAE\xAB",
+ "\x8E\x4D"=>"\xE7\x9A\xBF",
+ "\x8E\x4E"=>"\xE6\x99\x92",
+ "\x8E\x4F"=>"\xE4\xB8\x89",
+ "\x8E\x50"=>"\xE5\x82\x98",
+ "\x8E\x51"=>"\xE5\x8F\x82",
+ "\x8E\x52"=>"\xE5\xB1\xB1",
+ "\x8E\x53"=>"\xE6\x83\xA8",
+ "\x8E\x54"=>"\xE6\x92\x92",
+ "\x8E\x55"=>"\xE6\x95\xA3",
+ "\x8E\x56"=>"\xE6\xA1\x9F",
+ "\x8E\x57"=>"\xE7\x87\xA6",
+ "\x8E\x58"=>"\xE7\x8F\x8A",
+ "\x8E\x59"=>"\xE7\x94\xA3",
+ "\x8E\x5A"=>"\xE7\xAE\x97",
+ "\x8E\x5B"=>"\xE7\xBA\x82",
+ "\x8E\x5C"=>"\xE8\x9A\x95",
+ "\x8E\x5D"=>"\xE8\xAE\x83",
+ "\x8E\x5E"=>"\xE8\xB3\x9B",
+ "\x8E\x5F"=>"\xE9\x85\xB8",
+ "\x8E\x60"=>"\xE9\xA4\x90",
+ "\x8E\x61"=>"\xE6\x96\xAC",
+ "\x8E\x62"=>"\xE6\x9A\xAB",
+ "\x8E\x63"=>"\xE6\xAE\x8B",
+ "\x8E\x64"=>"\xE4\xBB\x95",
+ "\x8E\x65"=>"\xE4\xBB\x94",
+ "\x8E\x66"=>"\xE4\xBC\xBA",
+ "\x8E\x67"=>"\xE4\xBD\xBF",
+ "\x8E\x68"=>"\xE5\x88\xBA",
+ "\x8E\x69"=>"\xE5\x8F\xB8",
+ "\x8E\x6A"=>"\xE5\x8F\xB2",
+ "\x8E\x6B"=>"\xE5\x97\xA3",
+ "\x8E\x6C"=>"\xE5\x9B\x9B",
+ "\x8E\x6D"=>"\xE5\xA3\xAB",
+ "\x8E\x6E"=>"\xE5\xA7\x8B",
+ "\x8E\x6F"=>"\xE5\xA7\x89",
+ "\x8E\x70"=>"\xE5\xA7\xBF",
+ "\x8E\x71"=>"\xE5\xAD\x90",
+ "\x8E\x72"=>"\xE5\xB1\x8D",
+ "\x8E\x73"=>"\xE5\xB8\x82",
+ "\x8E\x74"=>"\xE5\xB8\xAB",
+ "\x8E\x75"=>"\xE5\xBF\x97",
+ "\x8E\x76"=>"\xE6\x80\x9D",
+ "\x8E\x77"=>"\xE6\x8C\x87",
+ "\x8E\x78"=>"\xE6\x94\xAF",
+ "\x8E\x79"=>"\xE5\xAD\x9C",
+ "\x8E\x7A"=>"\xE6\x96\xAF",
+ "\x8E\x7B"=>"\xE6\x96\xBD",
+ "\x8E\x7C"=>"\xE6\x97\xA8",
+ "\x8E\x7D"=>"\xE6\x9E\x9D",
+ "\x8E\x7E"=>"\xE6\xAD\xA2",
+ "\x8E\x80"=>"\xE6\xAD\xBB",
+ "\x8E\x81"=>"\xE6\xB0\x8F",
+ "\x8E\x82"=>"\xE7\x8D\x85",
+ "\x8E\x83"=>"\xE7\xA5\x89",
+ "\x8E\x84"=>"\xE7\xA7\x81",
+ "\x8E\x85"=>"\xE7\xB3\xB8",
+ "\x8E\x86"=>"\xE7\xB4\x99",
+ "\x8E\x87"=>"\xE7\xB4\xAB",
+ "\x8E\x88"=>"\xE8\x82\xA2",
+ "\x8E\x89"=>"\xE8\x84\x82",
+ "\x8E\x8A"=>"\xE8\x87\xB3",
+ "\x8E\x8B"=>"\xE8\xA6\x96",
+ "\x8E\x8C"=>"\xE8\xA9\x9E",
+ "\x8E\x8D"=>"\xE8\xA9\xA9",
+ "\x8E\x8E"=>"\xE8\xA9\xA6",
+ "\x8E\x8F"=>"\xE8\xAA\x8C",
+ "\x8E\x90"=>"\xE8\xAB\xAE",
+ "\x8E\x91"=>"\xE8\xB3\x87",
+ "\x8E\x92"=>"\xE8\xB3\x9C",
+ "\x8E\x93"=>"\xE9\x9B\x8C",
+ "\x8E\x94"=>"\xE9\xA3\xBC",
+ "\x8E\x95"=>"\xE6\xAD\xAF",
+ "\x8E\x96"=>"\xE4\xBA\x8B",
+ "\x8E\x97"=>"\xE4\xBC\xBC",
+ "\x8E\x98"=>"\xE4\xBE\x8D",
+ "\x8E\x99"=>"\xE5\x85\x90",
+ "\x8E\x9A"=>"\xE5\xAD\x97",
+ "\x8E\x9B"=>"\xE5\xAF\xBA",
+ "\x8E\x9C"=>"\xE6\x85\x88",
+ "\x8E\x9D"=>"\xE6\x8C\x81",
+ "\x8E\x9E"=>"\xE6\x99\x82",
+ "\x8E\x9F"=>"\xE6\xAC\xA1",
+ "\x8E\xA0"=>"\xE6\xBB\x8B",
+ "\x8E\xA1"=>"\xE6\xB2\xBB",
+ "\x8E\xA2"=>"\xE7\x88\xBE",
+ "\x8E\xA3"=>"\xE7\x92\xBD",
+ "\x8E\xA4"=>"\xE7\x97\x94",
+ "\x8E\xA5"=>"\xE7\xA3\x81",
+ "\x8E\xA6"=>"\xE7\xA4\xBA",
+ "\x8E\xA7"=>"\xE8\x80\x8C",
+ "\x8E\xA8"=>"\xE8\x80\xB3",
+ "\x8E\xA9"=>"\xE8\x87\xAA",
+ "\x8E\xAA"=>"\xE8\x92\x94",
+ "\x8E\xAB"=>"\xE8\xBE\x9E",
+ "\x8E\xAC"=>"\xE6\xB1\x90",
+ "\x8E\xAD"=>"\xE9\xB9\xBF",
+ "\x8E\xAE"=>"\xE5\xBC\x8F",
+ "\x8E\xAF"=>"\xE8\xAD\x98",
+ "\x8E\xB0"=>"\xE9\xB4\xAB",
+ "\x8E\xB1"=>"\xE7\xAB\xBA",
+ "\x8E\xB2"=>"\xE8\xBB\xB8",
+ "\x8E\xB3"=>"\xE5\xAE\x8D",
+ "\x8E\xB4"=>"\xE9\x9B\xAB",
+ "\x8E\xB5"=>"\xE4\xB8\x83",
+ "\x8E\xB6"=>"\xE5\x8F\xB1",
+ "\x8E\xB7"=>"\xE5\x9F\xB7",
+ "\x8E\xB8"=>"\xE5\xA4\xB1",
+ "\x8E\xB9"=>"\xE5\xAB\x89",
+ "\x8E\xBA"=>"\xE5\xAE\xA4",
+ "\x8E\xBB"=>"\xE6\x82\x89",
+ "\x8E\xBC"=>"\xE6\xB9\xBF",
+ "\x8E\xBD"=>"\xE6\xBC\x86",
+ "\x8E\xBE"=>"\xE7\x96\xBE",
+ "\x8E\xBF"=>"\xE8\xB3\xAA",
+ "\x8E\xC0"=>"\xE5\xAE\x9F",
+ "\x8E\xC1"=>"\xE8\x94\x80",
+ "\x8E\xC2"=>"\xE7\xAF\xA0",
+ "\x8E\xC3"=>"\xE5\x81\xB2",
+ "\x8E\xC4"=>"\xE6\x9F\xB4",
+ "\x8E\xC5"=>"\xE8\x8A\x9D",
+ "\x8E\xC6"=>"\xE5\xB1\xA1",
+ "\x8E\xC7"=>"\xE8\x95\x8A",
+ "\x8E\xC8"=>"\xE7\xB8\x9E",
+ "\x8E\xC9"=>"\xE8\x88\x8E",
+ "\x8E\xCA"=>"\xE5\x86\x99",
+ "\x8E\xCB"=>"\xE5\xB0\x84",
+ "\x8E\xCC"=>"\xE6\x8D\xA8",
+ "\x8E\xCD"=>"\xE8\xB5\xA6",
+ "\x8E\xCE"=>"\xE6\x96\x9C",
+ "\x8E\xCF"=>"\xE7\x85\xAE",
+ "\x8E\xD0"=>"\xE7\xA4\xBE",
+ "\x8E\xD1"=>"\xE7\xB4\x97",
+ "\x8E\xD2"=>"\xE8\x80\x85",
+ "\x8E\xD3"=>"\xE8\xAC\x9D",
+ "\x8E\xD4"=>"\xE8\xBB\x8A",
+ "\x8E\xD5"=>"\xE9\x81\xAE",
+ "\x8E\xD6"=>"\xE8\x9B\x87",
+ "\x8E\xD7"=>"\xE9\x82\xAA",
+ "\x8E\xD8"=>"\xE5\x80\x9F",
+ "\x8E\xD9"=>"\xE5\x8B\xBA",
+ "\x8E\xDA"=>"\xE5\xB0\xBA",
+ "\x8E\xDB"=>"\xE6\x9D\x93",
+ "\x8E\xDC"=>"\xE7\x81\xBC",
+ "\x8E\xDD"=>"\xE7\x88\xB5",
+ "\x8E\xDE"=>"\xE9\x85\x8C",
+ "\x8E\xDF"=>"\xE9\x87\x88",
+ "\x8E\xE0"=>"\xE9\x8C\xAB",
+ "\x8E\xE1"=>"\xE8\x8B\xA5",
+ "\x8E\xE2"=>"\xE5\xAF\x82",
+ "\x8E\xE3"=>"\xE5\xBC\xB1",
+ "\x8E\xE4"=>"\xE6\x83\xB9",
+ "\x8E\xE5"=>"\xE4\xB8\xBB",
+ "\x8E\xE6"=>"\xE5\x8F\x96",
+ "\x8E\xE7"=>"\xE5\xAE\x88",
+ "\x8E\xE8"=>"\xE6\x89\x8B",
+ "\x8E\xE9"=>"\xE6\x9C\xB1",
+ "\x8E\xEA"=>"\xE6\xAE\x8A",
+ "\x8E\xEB"=>"\xE7\x8B\xA9",
+ "\x8E\xEC"=>"\xE7\x8F\xA0",
+ "\x8E\xED"=>"\xE7\xA8\xAE",
+ "\x8E\xEE"=>"\xE8\x85\xAB",
+ "\x8E\xEF"=>"\xE8\xB6\xA3",
+ "\x8E\xF0"=>"\xE9\x85\x92",
+ "\x8E\xF1"=>"\xE9\xA6\x96",
+ "\x8E\xF2"=>"\xE5\x84\x92",
+ "\x8E\xF3"=>"\xE5\x8F\x97",
+ "\x8E\xF4"=>"\xE5\x91\xAA",
+ "\x8E\xF5"=>"\xE5\xAF\xBF",
+ "\x8E\xF6"=>"\xE6\x8E\x88",
+ "\x8E\xF7"=>"\xE6\xA8\xB9",
+ "\x8E\xF8"=>"\xE7\xB6\xAC",
+ "\x8E\xF9"=>"\xE9\x9C\x80",
+ "\x8E\xFA"=>"\xE5\x9B\x9A",
+ "\x8E\xFB"=>"\xE5\x8F\x8E",
+ "\x8E\xFC"=>"\xE5\x91\xA8",
+ "\x8F\x40"=>"\xE5\xAE\x97",
+ "\x8F\x41"=>"\xE5\xB0\xB1",
+ "\x8F\x42"=>"\xE5\xB7\x9E",
+ "\x8F\x43"=>"\xE4\xBF\xAE",
+ "\x8F\x44"=>"\xE6\x84\x81",
+ "\x8F\x45"=>"\xE6\x8B\xBE",
+ "\x8F\x46"=>"\xE6\xB4\xB2",
+ "\x8F\x47"=>"\xE7\xA7\x80",
+ "\x8F\x48"=>"\xE7\xA7\x8B",
+ "\x8F\x49"=>"\xE7\xB5\x82",
+ "\x8F\x4A"=>"\xE7\xB9\x8D",
+ "\x8F\x4B"=>"\xE7\xBF\x92",
+ "\x8F\x4C"=>"\xE8\x87\xAD",
+ "\x8F\x4D"=>"\xE8\x88\x9F",
+ "\x8F\x4E"=>"\xE8\x92\x90",
+ "\x8F\x4F"=>"\xE8\xA1\x86",
+ "\x8F\x50"=>"\xE8\xA5\xB2",
+ "\x8F\x51"=>"\xE8\xAE\x90",
+ "\x8F\x52"=>"\xE8\xB9\xB4",
+ "\x8F\x53"=>"\xE8\xBC\xAF",
+ "\x8F\x54"=>"\xE9\x80\xB1",
+ "\x8F\x55"=>"\xE9\x85\x8B",
+ "\x8F\x56"=>"\xE9\x85\xAC",
+ "\x8F\x57"=>"\xE9\x9B\x86",
+ "\x8F\x58"=>"\xE9\x86\x9C",
+ "\x8F\x59"=>"\xE4\xBB\x80",
+ "\x8F\x5A"=>"\xE4\xBD\x8F",
+ "\x8F\x5B"=>"\xE5\x85\x85",
+ "\x8F\x5C"=>"\xE5\x8D\x81",
+ "\x8F\x5D"=>"\xE5\xBE\x93",
+ "\x8F\x5E"=>"\xE6\x88\x8E",
+ "\x8F\x5F"=>"\xE6\x9F\x94",
+ "\x8F\x60"=>"\xE6\xB1\x81",
+ "\x8F\x61"=>"\xE6\xB8\x8B",
+ "\x8F\x62"=>"\xE7\x8D\xA3",
+ "\x8F\x63"=>"\xE7\xB8\xA6",
+ "\x8F\x64"=>"\xE9\x87\x8D",
+ "\x8F\x65"=>"\xE9\x8A\x83",
+ "\x8F\x66"=>"\xE5\x8F\x94",
+ "\x8F\x67"=>"\xE5\xA4\x99",
+ "\x8F\x68"=>"\xE5\xAE\xBF",
+ "\x8F\x69"=>"\xE6\xB7\x91",
+ "\x8F\x6A"=>"\xE7\xA5\x9D",
+ "\x8F\x6B"=>"\xE7\xB8\xAE",
+ "\x8F\x6C"=>"\xE7\xB2\x9B",
+ "\x8F\x6D"=>"\xE5\xA1\xBE",
+ "\x8F\x6E"=>"\xE7\x86\x9F",
+ "\x8F\x6F"=>"\xE5\x87\xBA",
+ "\x8F\x70"=>"\xE8\xA1\x93",
+ "\x8F\x71"=>"\xE8\xBF\xB0",
+ "\x8F\x72"=>"\xE4\xBF\x8A",
+ "\x8F\x73"=>"\xE5\xB3\xBB",
+ "\x8F\x74"=>"\xE6\x98\xA5",
+ "\x8F\x75"=>"\xE7\x9E\xAC",
+ "\x8F\x76"=>"\xE7\xAB\xA3",
+ "\x8F\x77"=>"\xE8\x88\x9C",
+ "\x8F\x78"=>"\xE9\xA7\xBF",
+ "\x8F\x79"=>"\xE5\x87\x86",
+ "\x8F\x7A"=>"\xE5\xBE\xAA",
+ "\x8F\x7B"=>"\xE6\x97\xAC",
+ "\x8F\x7C"=>"\xE6\xA5\xAF",
+ "\x8F\x7D"=>"\xE6\xAE\x89",
+ "\x8F\x7E"=>"\xE6\xB7\xB3",
+ "\x8F\x80"=>"\xE6\xBA\x96",
+ "\x8F\x81"=>"\xE6\xBD\xA4",
+ "\x8F\x82"=>"\xE7\x9B\xBE",
+ "\x8F\x83"=>"\xE7\xB4\x94",
+ "\x8F\x84"=>"\xE5\xB7\xA1",
+ "\x8F\x85"=>"\xE9\x81\xB5",
+ "\x8F\x86"=>"\xE9\x86\x87",
+ "\x8F\x87"=>"\xE9\xA0\x86",
+ "\x8F\x88"=>"\xE5\x87\xA6",
+ "\x8F\x89"=>"\xE5\x88\x9D",
+ "\x8F\x8A"=>"\xE6\x89\x80",
+ "\x8F\x8B"=>"\xE6\x9A\x91",
+ "\x8F\x8C"=>"\xE6\x9B\x99",
+ "\x8F\x8D"=>"\xE6\xB8\x9A",
+ "\x8F\x8E"=>"\xE5\xBA\xB6",
+ "\x8F\x8F"=>"\xE7\xB7\x92",
+ "\x8F\x90"=>"\xE7\xBD\xB2",
+ "\x8F\x91"=>"\xE6\x9B\xB8",
+ "\x8F\x92"=>"\xE8\x96\xAF",
+ "\x8F\x93"=>"\xE8\x97\xB7",
+ "\x8F\x94"=>"\xE8\xAB\xB8",
+ "\x8F\x95"=>"\xE5\x8A\xA9",
+ "\x8F\x96"=>"\xE5\x8F\x99",
+ "\x8F\x97"=>"\xE5\xA5\xB3",
+ "\x8F\x98"=>"\xE5\xBA\x8F",
+ "\x8F\x99"=>"\xE5\xBE\x90",
+ "\x8F\x9A"=>"\xE6\x81\x95",
+ "\x8F\x9B"=>"\xE9\x8B\xA4",
+ "\x8F\x9C"=>"\xE9\x99\xA4",
+ "\x8F\x9D"=>"\xE5\x82\xB7",
+ "\x8F\x9E"=>"\xE5\x84\x9F",
+ "\x8F\x9F"=>"\xE5\x8B\x9D",
+ "\x8F\xA0"=>"\xE5\x8C\xA0",
+ "\x8F\xA1"=>"\xE5\x8D\x87",
+ "\x8F\xA2"=>"\xE5\x8F\xAC",
+ "\x8F\xA3"=>"\xE5\x93\xA8",
+ "\x8F\xA4"=>"\xE5\x95\x86",
+ "\x8F\xA5"=>"\xE5\x94\xB1",
+ "\x8F\xA6"=>"\xE5\x98\x97",
+ "\x8F\xA7"=>"\xE5\xA5\xA8",
+ "\x8F\xA8"=>"\xE5\xA6\xBE",
+ "\x8F\xA9"=>"\xE5\xA8\xBC",
+ "\x8F\xAA"=>"\xE5\xAE\xB5",
+ "\x8F\xAB"=>"\xE5\xB0\x86",
+ "\x8F\xAC"=>"\xE5\xB0\x8F",
+ "\x8F\xAD"=>"\xE5\xB0\x91",
+ "\x8F\xAE"=>"\xE5\xB0\x9A",
+ "\x8F\xAF"=>"\xE5\xBA\x84",
+ "\x8F\xB0"=>"\xE5\xBA\x8A",
+ "\x8F\xB1"=>"\xE5\xBB\xA0",
+ "\x8F\xB2"=>"\xE5\xBD\xB0",
+ "\x8F\xB3"=>"\xE6\x89\xBF",
+ "\x8F\xB4"=>"\xE6\x8A\x84",
+ "\x8F\xB5"=>"\xE6\x8B\x9B",
+ "\x8F\xB6"=>"\xE6\x8E\x8C",
+ "\x8F\xB7"=>"\xE6\x8D\xB7",
+ "\x8F\xB8"=>"\xE6\x98\x87",
+ "\x8F\xB9"=>"\xE6\x98\x8C",
+ "\x8F\xBA"=>"\xE6\x98\xAD",
+ "\x8F\xBB"=>"\xE6\x99\xB6",
+ "\x8F\xBC"=>"\xE6\x9D\xBE",
+ "\x8F\xBD"=>"\xE6\xA2\xA2",
+ "\x8F\xBE"=>"\xE6\xA8\x9F",
+ "\x8F\xBF"=>"\xE6\xA8\xB5",
+ "\x8F\xC0"=>"\xE6\xB2\xBC",
+ "\x8F\xC1"=>"\xE6\xB6\x88",
+ "\x8F\xC2"=>"\xE6\xB8\x89",
+ "\x8F\xC3"=>"\xE6\xB9\x98",
+ "\x8F\xC4"=>"\xE7\x84\xBC",
+ "\x8F\xC5"=>"\xE7\x84\xA6",
+ "\x8F\xC6"=>"\xE7\x85\xA7",
+ "\x8F\xC7"=>"\xE7\x97\x87",
+ "\x8F\xC8"=>"\xE7\x9C\x81",
+ "\x8F\xC9"=>"\xE7\xA1\x9D",
+ "\x8F\xCA"=>"\xE7\xA4\x81",
+ "\x8F\xCB"=>"\xE7\xA5\xA5",
+ "\x8F\xCC"=>"\xE7\xA7\xB0",
+ "\x8F\xCD"=>"\xE7\xAB\xA0",
+ "\x8F\xCE"=>"\xE7\xAC\x91",
+ "\x8F\xCF"=>"\xE7\xB2\xA7",
+ "\x8F\xD0"=>"\xE7\xB4\xB9",
+ "\x8F\xD1"=>"\xE8\x82\x96",
+ "\x8F\xD2"=>"\xE8\x8F\x96",
+ "\x8F\xD3"=>"\xE8\x92\x8B",
+ "\x8F\xD4"=>"\xE8\x95\x89",
+ "\x8F\xD5"=>"\xE8\xA1\x9D",
+ "\x8F\xD6"=>"\xE8\xA3\xB3",
+ "\x8F\xD7"=>"\xE8\xA8\x9F",
+ "\x8F\xD8"=>"\xE8\xA8\xBC",
+ "\x8F\xD9"=>"\xE8\xA9\x94",
+ "\x8F\xDA"=>"\xE8\xA9\xB3",
+ "\x8F\xDB"=>"\xE8\xB1\xA1",
+ "\x8F\xDC"=>"\xE8\xB3\x9E",
+ "\x8F\xDD"=>"\xE9\x86\xA4",
+ "\x8F\xDE"=>"\xE9\x89\xA6",
+ "\x8F\xDF"=>"\xE9\x8D\xBE",
+ "\x8F\xE0"=>"\xE9\x90\x98",
+ "\x8F\xE1"=>"\xE9\x9A\x9C",
+ "\x8F\xE2"=>"\xE9\x9E\x98",
+ "\x8F\xE3"=>"\xE4\xB8\x8A",
+ "\x8F\xE4"=>"\xE4\xB8\x88",
+ "\x8F\xE5"=>"\xE4\xB8\x9E",
+ "\x8F\xE6"=>"\xE4\xB9\x97",
+ "\x8F\xE7"=>"\xE5\x86\x97",
+ "\x8F\xE8"=>"\xE5\x89\xB0",
+ "\x8F\xE9"=>"\xE5\x9F\x8E",
+ "\x8F\xEA"=>"\xE5\xA0\xB4",
+ "\x8F\xEB"=>"\xE5\xA3\x8C",
+ "\x8F\xEC"=>"\xE5\xAC\xA2",
+ "\x8F\xED"=>"\xE5\xB8\xB8",
+ "\x8F\xEE"=>"\xE6\x83\x85",
+ "\x8F\xEF"=>"\xE6\x93\xBE",
+ "\x8F\xF0"=>"\xE6\x9D\xA1",
+ "\x8F\xF1"=>"\xE6\x9D\x96",
+ "\x8F\xF2"=>"\xE6\xB5\x84",
+ "\x8F\xF3"=>"\xE7\x8A\xB6",
+ "\x8F\xF4"=>"\xE7\x95\xB3",
+ "\x8F\xF5"=>"\xE7\xA9\xA3",
+ "\x8F\xF6"=>"\xE8\x92\xB8",
+ "\x8F\xF7"=>"\xE8\xAD\xB2",
+ "\x8F\xF8"=>"\xE9\x86\xB8",
+ "\x8F\xF9"=>"\xE9\x8C\xA0",
+ "\x8F\xFA"=>"\xE5\x98\xB1",
+ "\x8F\xFB"=>"\xE5\x9F\xB4",
+ "\x8F\xFC"=>"\xE9\xA3\xBE",
+ "\x90\x40"=>"\xE6\x8B\xAD",
+ "\x90\x41"=>"\xE6\xA4\x8D",
+ "\x90\x42"=>"\xE6\xAE\x96",
+ "\x90\x43"=>"\xE7\x87\xAD",
+ "\x90\x44"=>"\xE7\xB9\x94",
+ "\x90\x45"=>"\xE8\x81\xB7",
+ "\x90\x46"=>"\xE8\x89\xB2",
+ "\x90\x47"=>"\xE8\xA7\xA6",
+ "\x90\x48"=>"\xE9\xA3\x9F",
+ "\x90\x49"=>"\xE8\x9D\x95",
+ "\x90\x4A"=>"\xE8\xBE\xB1",
+ "\x90\x4B"=>"\xE5\xB0\xBB",
+ "\x90\x4C"=>"\xE4\xBC\xB8",
+ "\x90\x4D"=>"\xE4\xBF\xA1",
+ "\x90\x4E"=>"\xE4\xBE\xB5",
+ "\x90\x4F"=>"\xE5\x94\x87",
+ "\x90\x50"=>"\xE5\xA8\xA0",
+ "\x90\x51"=>"\xE5\xAF\x9D",
+ "\x90\x52"=>"\xE5\xAF\xA9",
+ "\x90\x53"=>"\xE5\xBF\x83",
+ "\x90\x54"=>"\xE6\x85\x8E",
+ "\x90\x55"=>"\xE6\x8C\xAF",
+ "\x90\x56"=>"\xE6\x96\xB0",
+ "\x90\x57"=>"\xE6\x99\x8B",
+ "\x90\x58"=>"\xE6\xA3\xAE",
+ "\x90\x59"=>"\xE6\xA6\x9B",
+ "\x90\x5A"=>"\xE6\xB5\xB8",
+ "\x90\x5B"=>"\xE6\xB7\xB1",
+ "\x90\x5C"=>"\xE7\x94\xB3",
+ "\x90\x5D"=>"\xE7\x96\xB9",
+ "\x90\x5E"=>"\xE7\x9C\x9F",
+ "\x90\x5F"=>"\xE7\xA5\x9E",
+ "\x90\x60"=>"\xE7\xA7\xA6",
+ "\x90\x61"=>"\xE7\xB4\xB3",
+ "\x90\x62"=>"\xE8\x87\xA3",
+ "\x90\x63"=>"\xE8\x8A\xAF",
+ "\x90\x64"=>"\xE8\x96\xAA",
+ "\x90\x65"=>"\xE8\xA6\xAA",
+ "\x90\x66"=>"\xE8\xA8\xBA",
+ "\x90\x67"=>"\xE8\xBA\xAB",
+ "\x90\x68"=>"\xE8\xBE\x9B",
+ "\x90\x69"=>"\xE9\x80\xB2",
+ "\x90\x6A"=>"\xE9\x87\x9D",
+ "\x90\x6B"=>"\xE9\x9C\x87",
+ "\x90\x6C"=>"\xE4\xBA\xBA",
+ "\x90\x6D"=>"\xE4\xBB\x81",
+ "\x90\x6E"=>"\xE5\x88\x83",
+ "\x90\x6F"=>"\xE5\xA1\xB5",
+ "\x90\x70"=>"\xE5\xA3\xAC",
+ "\x90\x71"=>"\xE5\xB0\x8B",
+ "\x90\x72"=>"\xE7\x94\x9A",
+ "\x90\x73"=>"\xE5\xB0\xBD",
+ "\x90\x74"=>"\xE8\x85\x8E",
+ "\x90\x75"=>"\xE8\xA8\x8A",
+ "\x90\x76"=>"\xE8\xBF\x85",
+ "\x90\x77"=>"\xE9\x99\xA3",
+ "\x90\x78"=>"\xE9\x9D\xAD",
+ "\x90\x79"=>"\xE7\xAC\xA5",
+ "\x90\x7A"=>"\xE8\xAB\x8F",
+ "\x90\x7B"=>"\xE9\xA0\x88",
+ "\x90\x7C"=>"\xE9\x85\xA2",
+ "\x90\x7D"=>"\xE5\x9B\xB3",
+ "\x90\x7E"=>"\xE5\x8E\xA8",
+ "\x90\x80"=>"\xE9\x80\x97",
+ "\x90\x81"=>"\xE5\x90\xB9",
+ "\x90\x82"=>"\xE5\x9E\x82",
+ "\x90\x83"=>"\xE5\xB8\xA5",
+ "\x90\x84"=>"\xE6\x8E\xA8",
+ "\x90\x85"=>"\xE6\xB0\xB4",
+ "\x90\x86"=>"\xE7\x82\x8A",
+ "\x90\x87"=>"\xE7\x9D\xA1",
+ "\x90\x88"=>"\xE7\xB2\x8B",
+ "\x90\x89"=>"\xE7\xBF\xA0",
+ "\x90\x8A"=>"\xE8\xA1\xB0",
+ "\x90\x8B"=>"\xE9\x81\x82",
+ "\x90\x8C"=>"\xE9\x85\x94",
+ "\x90\x8D"=>"\xE9\x8C\x90",
+ "\x90\x8E"=>"\xE9\x8C\x98",
+ "\x90\x8F"=>"\xE9\x9A\x8F",
+ "\x90\x90"=>"\xE7\x91\x9E",
+ "\x90\x91"=>"\xE9\xAB\x84",
+ "\x90\x92"=>"\xE5\xB4\x87",
+ "\x90\x93"=>"\xE5\xB5\xA9",
+ "\x90\x94"=>"\xE6\x95\xB0",
+ "\x90\x95"=>"\xE6\x9E\xA2",
+ "\x90\x96"=>"\xE8\xB6\xA8",
+ "\x90\x97"=>"\xE9\x9B\x9B",
+ "\x90\x98"=>"\xE6\x8D\xAE",
+ "\x90\x99"=>"\xE6\x9D\x89",
+ "\x90\x9A"=>"\xE6\xA4\x99",
+ "\x90\x9B"=>"\xE8\x8F\x85",
+ "\x90\x9C"=>"\xE9\xA0\x97",
+ "\x90\x9D"=>"\xE9\x9B\x80",
+ "\x90\x9E"=>"\xE8\xA3\xBE",
+ "\x90\x9F"=>"\xE6\xBE\x84",
+ "\x90\xA0"=>"\xE6\x91\xBA",
+ "\x90\xA1"=>"\xE5\xAF\xB8",
+ "\x90\xA2"=>"\xE4\xB8\x96",
+ "\x90\xA3"=>"\xE7\x80\xAC",
+ "\x90\xA4"=>"\xE7\x95\x9D",
+ "\x90\xA5"=>"\xE6\x98\xAF",
+ "\x90\xA6"=>"\xE5\x87\x84",
+ "\x90\xA7"=>"\xE5\x88\xB6",
+ "\x90\xA8"=>"\xE5\x8B\xA2",
+ "\x90\xA9"=>"\xE5\xA7\x93",
+ "\x90\xAA"=>"\xE5\xBE\x81",
+ "\x90\xAB"=>"\xE6\x80\xA7",
+ "\x90\xAC"=>"\xE6\x88\x90",
+ "\x90\xAD"=>"\xE6\x94\xBF",
+ "\x90\xAE"=>"\xE6\x95\xB4",
+ "\x90\xAF"=>"\xE6\x98\x9F",
+ "\x90\xB0"=>"\xE6\x99\xB4",
+ "\x90\xB1"=>"\xE6\xA3\xB2",
+ "\x90\xB2"=>"\xE6\xA0\x96",
+ "\x90\xB3"=>"\xE6\xAD\xA3",
+ "\x90\xB4"=>"\xE6\xB8\x85",
+ "\x90\xB5"=>"\xE7\x89\xB2",
+ "\x90\xB6"=>"\xE7\x94\x9F",
+ "\x90\xB7"=>"\xE7\x9B\x9B",
+ "\x90\xB8"=>"\xE7\xB2\xBE",
+ "\x90\xB9"=>"\xE8\x81\x96",
+ "\x90\xBA"=>"\xE5\xA3\xB0",
+ "\x90\xBB"=>"\xE8\xA3\xBD",
+ "\x90\xBC"=>"\xE8\xA5\xBF",
+ "\x90\xBD"=>"\xE8\xAA\xA0",
+ "\x90\xBE"=>"\xE8\xAA\x93",
+ "\x90\xBF"=>"\xE8\xAB\x8B",
+ "\x90\xC0"=>"\xE9\x80\x9D",
+ "\x90\xC1"=>"\xE9\x86\x92",
+ "\x90\xC2"=>"\xE9\x9D\x92",
+ "\x90\xC3"=>"\xE9\x9D\x99",
+ "\x90\xC4"=>"\xE6\x96\x89",
+ "\x90\xC5"=>"\xE7\xA8\x8E",
+ "\x90\xC6"=>"\xE8\x84\x86",
+ "\x90\xC7"=>"\xE9\x9A\xBB",
+ "\x90\xC8"=>"\xE5\xB8\xAD",
+ "\x90\xC9"=>"\xE6\x83\x9C",
+ "\x90\xCA"=>"\xE6\x88\x9A",
+ "\x90\xCB"=>"\xE6\x96\xA5",
+ "\x90\xCC"=>"\xE6\x98\x94",
+ "\x90\xCD"=>"\xE6\x9E\x90",
+ "\x90\xCE"=>"\xE7\x9F\xB3",
+ "\x90\xCF"=>"\xE7\xA9\x8D",
+ "\x90\xD0"=>"\xE7\xB1\x8D",
+ "\x90\xD1"=>"\xE7\xB8\xBE",
+ "\x90\xD2"=>"\xE8\x84\x8A",
+ "\x90\xD3"=>"\xE8\xB2\xAC",
+ "\x90\xD4"=>"\xE8\xB5\xA4",
+ "\x90\xD5"=>"\xE8\xB7\xA1",
+ "\x90\xD6"=>"\xE8\xB9\x9F",
+ "\x90\xD7"=>"\xE7\xA2\xA9",
+ "\x90\xD8"=>"\xE5\x88\x87",
+ "\x90\xD9"=>"\xE6\x8B\x99",
+ "\x90\xDA"=>"\xE6\x8E\xA5",
+ "\x90\xDB"=>"\xE6\x91\x82",
+ "\x90\xDC"=>"\xE6\x8A\x98",
+ "\x90\xDD"=>"\xE8\xA8\xAD",
+ "\x90\xDE"=>"\xE7\xAA\x83",
+ "\x90\xDF"=>"\xE7\xAF\x80",
+ "\x90\xE0"=>"\xE8\xAA\xAC",
+ "\x90\xE1"=>"\xE9\x9B\xAA",
+ "\x90\xE2"=>"\xE7\xB5\xB6",
+ "\x90\xE3"=>"\xE8\x88\x8C",
+ "\x90\xE4"=>"\xE8\x9D\x89",
+ "\x90\xE5"=>"\xE4\xBB\x99",
+ "\x90\xE6"=>"\xE5\x85\x88",
+ "\x90\xE7"=>"\xE5\x8D\x83",
+ "\x90\xE8"=>"\xE5\x8D\xA0",
+ "\x90\xE9"=>"\xE5\xAE\xA3",
+ "\x90\xEA"=>"\xE5\xB0\x82",
+ "\x90\xEB"=>"\xE5\xB0\x96",
+ "\x90\xEC"=>"\xE5\xB7\x9D",
+ "\x90\xED"=>"\xE6\x88\xA6",
+ "\x90\xEE"=>"\xE6\x89\x87",
+ "\x90\xEF"=>"\xE6\x92\xB0",
+ "\x90\xF0"=>"\xE6\xA0\x93",
+ "\x90\xF1"=>"\xE6\xA0\xB4",
+ "\x90\xF2"=>"\xE6\xB3\x89",
+ "\x90\xF3"=>"\xE6\xB5\x85",
+ "\x90\xF4"=>"\xE6\xB4\x97",
+ "\x90\xF5"=>"\xE6\x9F\x93",
+ "\x90\xF6"=>"\xE6\xBD\x9C",
+ "\x90\xF7"=>"\xE7\x85\x8E",
+ "\x90\xF8"=>"\xE7\x85\xBD",
+ "\x90\xF9"=>"\xE6\x97\x8B",
+ "\x90\xFA"=>"\xE7\xA9\xBF",
+ "\x90\xFB"=>"\xE7\xAE\xAD",
+ "\x90\xFC"=>"\xE7\xB7\x9A",
+ "\x91\x40"=>"\xE7\xB9\x8A",
+ "\x91\x41"=>"\xE7\xBE\xA8",
+ "\x91\x42"=>"\xE8\x85\xBA",
+ "\x91\x43"=>"\xE8\x88\x9B",
+ "\x91\x44"=>"\xE8\x88\xB9",
+ "\x91\x45"=>"\xE8\x96\xA6",
+ "\x91\x46"=>"\xE8\xA9\xAE",
+ "\x91\x47"=>"\xE8\xB3\x8E",
+ "\x91\x48"=>"\xE8\xB7\xB5",
+ "\x91\x49"=>"\xE9\x81\xB8",
+ "\x91\x4A"=>"\xE9\x81\xB7",
+ "\x91\x4B"=>"\xE9\x8A\xAD",
+ "\x91\x4C"=>"\xE9\x8A\x91",
+ "\x91\x4D"=>"\xE9\x96\x83",
+ "\x91\x4E"=>"\xE9\xAE\xAE",
+ "\x91\x4F"=>"\xE5\x89\x8D",
+ "\x91\x50"=>"\xE5\x96\x84",
+ "\x91\x51"=>"\xE6\xBC\xB8",
+ "\x91\x52"=>"\xE7\x84\xB6",
+ "\x91\x53"=>"\xE5\x85\xA8",
+ "\x91\x54"=>"\xE7\xA6\x85",
+ "\x91\x55"=>"\xE7\xB9\x95",
+ "\x91\x56"=>"\xE8\x86\xB3",
+ "\x91\x57"=>"\xE7\xB3\x8E",
+ "\x91\x58"=>"\xE5\x99\x8C",
+ "\x91\x59"=>"\xE5\xA1\x91",
+ "\x91\x5A"=>"\xE5\xB2\xA8",
+ "\x91\x5B"=>"\xE6\x8E\xAA",
+ "\x91\x5C"=>"\xE6\x9B\xBE",
+ "\x91\x5D"=>"\xE6\x9B\xBD",
+ "\x91\x5E"=>"\xE6\xA5\x9A",
+ "\x91\x5F"=>"\xE7\x8B\x99",
+ "\x91\x60"=>"\xE7\x96\x8F",
+ "\x91\x61"=>"\xE7\x96\x8E",
+ "\x91\x62"=>"\xE7\xA4\x8E",
+ "\x91\x63"=>"\xE7\xA5\x96",
+ "\x91\x64"=>"\xE7\xA7\x9F",
+ "\x91\x65"=>"\xE7\xB2\x97",
+ "\x91\x66"=>"\xE7\xB4\xA0",
+ "\x91\x67"=>"\xE7\xB5\x84",
+ "\x91\x68"=>"\xE8\x98\x87",
+ "\x91\x69"=>"\xE8\xA8\xB4",
+ "\x91\x6A"=>"\xE9\x98\xBB",
+ "\x91\x6B"=>"\xE9\x81\xA1",
+ "\x91\x6C"=>"\xE9\xBC\xA0",
+ "\x91\x6D"=>"\xE5\x83\xA7",
+ "\x91\x6E"=>"\xE5\x89\xB5",
+ "\x91\x6F"=>"\xE5\x8F\x8C",
+ "\x91\x70"=>"\xE5\x8F\xA2",
+ "\x91\x71"=>"\xE5\x80\x89",
+ "\x91\x72"=>"\xE5\x96\xAA",
+ "\x91\x73"=>"\xE5\xA3\xAE",
+ "\x91\x74"=>"\xE5\xA5\x8F",
+ "\x91\x75"=>"\xE7\x88\xBD",
+ "\x91\x76"=>"\xE5\xAE\x8B",
+ "\x91\x77"=>"\xE5\xB1\xA4",
+ "\x91\x78"=>"\xE5\x8C\x9D",
+ "\x91\x79"=>"\xE6\x83\xA3",
+ "\x91\x7A"=>"\xE6\x83\xB3",
+ "\x91\x7B"=>"\xE6\x8D\x9C",
+ "\x91\x7C"=>"\xE6\x8E\x83",
+ "\x91\x7D"=>"\xE6\x8C\xBF",
+ "\x91\x7E"=>"\xE6\x8E\xBB",
+ "\x91\x80"=>"\xE6\x93\x8D",
+ "\x91\x81"=>"\xE6\x97\xA9",
+ "\x91\x82"=>"\xE6\x9B\xB9",
+ "\x91\x83"=>"\xE5\xB7\xA3",
+ "\x91\x84"=>"\xE6\xA7\x8D",
+ "\x91\x85"=>"\xE6\xA7\xBD",
+ "\x91\x86"=>"\xE6\xBC\x95",
+ "\x91\x87"=>"\xE7\x87\xA5",
+ "\x91\x88"=>"\xE4\xBA\x89",
+ "\x91\x89"=>"\xE7\x97\xA9",
+ "\x91\x8A"=>"\xE7\x9B\xB8",
+ "\x91\x8B"=>"\xE7\xAA\x93",
+ "\x91\x8C"=>"\xE7\xB3\x9F",
+ "\x91\x8D"=>"\xE7\xB7\x8F",
+ "\x91\x8E"=>"\xE7\xB6\x9C",
+ "\x91\x8F"=>"\xE8\x81\xA1",
+ "\x91\x90"=>"\xE8\x8D\x89",
+ "\x91\x91"=>"\xE8\x8D\x98",
+ "\x91\x92"=>"\xE8\x91\xAC",
+ "\x91\x93"=>"\xE8\x92\xBC",
+ "\x91\x94"=>"\xE8\x97\xBB",
+ "\x91\x95"=>"\xE8\xA3\x85",
+ "\x91\x96"=>"\xE8\xB5\xB0",
+ "\x91\x97"=>"\xE9\x80\x81",
+ "\x91\x98"=>"\xE9\x81\xAD",
+ "\x91\x99"=>"\xE9\x8E\x97",
+ "\x91\x9A"=>"\xE9\x9C\x9C",
+ "\x91\x9B"=>"\xE9\xA8\x92",
+ "\x91\x9C"=>"\xE5\x83\x8F",
+ "\x91\x9D"=>"\xE5\xA2\x97",
+ "\x91\x9E"=>"\xE6\x86\x8E",
+ "\x91\x9F"=>"\xE8\x87\x93",
+ "\x91\xA0"=>"\xE8\x94\xB5",
+ "\x91\xA1"=>"\xE8\xB4\x88",
+ "\x91\xA2"=>"\xE9\x80\xA0",
+ "\x91\xA3"=>"\xE4\xBF\x83",
+ "\x91\xA4"=>"\xE5\x81\xB4",
+ "\x91\xA5"=>"\xE5\x89\x87",
+ "\x91\xA6"=>"\xE5\x8D\xB3",
+ "\x91\xA7"=>"\xE6\x81\xAF",
+ "\x91\xA8"=>"\xE6\x8D\x89",
+ "\x91\xA9"=>"\xE6\x9D\x9F",
+ "\x91\xAA"=>"\xE6\xB8\xAC",
+ "\x91\xAB"=>"\xE8\xB6\xB3",
+ "\x91\xAC"=>"\xE9\x80\x9F",
+ "\x91\xAD"=>"\xE4\xBF\x97",
+ "\x91\xAE"=>"\xE5\xB1\x9E",
+ "\x91\xAF"=>"\xE8\xB3\x8A",
+ "\x91\xB0"=>"\xE6\x97\x8F",
+ "\x91\xB1"=>"\xE7\xB6\x9A",
+ "\x91\xB2"=>"\xE5\x8D\x92",
+ "\x91\xB3"=>"\xE8\xA2\x96",
+ "\x91\xB4"=>"\xE5\x85\xB6",
+ "\x91\xB5"=>"\xE6\x8F\x83",
+ "\x91\xB6"=>"\xE5\xAD\x98",
+ "\x91\xB7"=>"\xE5\xAD\xAB",
+ "\x91\xB8"=>"\xE5\xB0\x8A",
+ "\x91\xB9"=>"\xE6\x90\x8D",
+ "\x91\xBA"=>"\xE6\x9D\x91",
+ "\x91\xBB"=>"\xE9\x81\x9C",
+ "\x91\xBC"=>"\xE4\xBB\x96",
+ "\x91\xBD"=>"\xE5\xA4\x9A",
+ "\x91\xBE"=>"\xE5\xA4\xAA",
+ "\x91\xBF"=>"\xE6\xB1\xB0",
+ "\x91\xC0"=>"\xE8\xA9\x91",
+ "\x91\xC1"=>"\xE5\x94\xBE",
+ "\x91\xC2"=>"\xE5\xA0\x95",
+ "\x91\xC3"=>"\xE5\xA6\xA5",
+ "\x91\xC4"=>"\xE6\x83\xB0",
+ "\x91\xC5"=>"\xE6\x89\x93",
+ "\x91\xC6"=>"\xE6\x9F\x81",
+ "\x91\xC7"=>"\xE8\x88\xB5",
+ "\x91\xC8"=>"\xE6\xA5\x95",
+ "\x91\xC9"=>"\xE9\x99\x80",
+ "\x91\xCA"=>"\xE9\xA7\x84",
+ "\x91\xCB"=>"\xE9\xA8\xA8",
+ "\x91\xCC"=>"\xE4\xBD\x93",
+ "\x91\xCD"=>"\xE5\xA0\x86",
+ "\x91\xCE"=>"\xE5\xAF\xBE",
+ "\x91\xCF"=>"\xE8\x80\x90",
+ "\x91\xD0"=>"\xE5\xB2\xB1",
+ "\x91\xD1"=>"\xE5\xB8\xAF",
+ "\x91\xD2"=>"\xE5\xBE\x85",
+ "\x91\xD3"=>"\xE6\x80\xA0",
+ "\x91\xD4"=>"\xE6\x85\x8B",
+ "\x91\xD5"=>"\xE6\x88\xB4",
+ "\x91\xD6"=>"\xE6\x9B\xBF",
+ "\x91\xD7"=>"\xE6\xB3\xB0",
+ "\x91\xD8"=>"\xE6\xBB\x9E",
+ "\x91\xD9"=>"\xE8\x83\x8E",
+ "\x91\xDA"=>"\xE8\x85\xBF",
+ "\x91\xDB"=>"\xE8\x8B\x94",
+ "\x91\xDC"=>"\xE8\xA2\x8B",
+ "\x91\xDD"=>"\xE8\xB2\xB8",
+ "\x91\xDE"=>"\xE9\x80\x80",
+ "\x91\xDF"=>"\xE9\x80\xAE",
+ "\x91\xE0"=>"\xE9\x9A\x8A",
+ "\x91\xE1"=>"\xE9\xBB\x9B",
+ "\x91\xE2"=>"\xE9\xAF\x9B",
+ "\x91\xE3"=>"\xE4\xBB\xA3",
+ "\x91\xE4"=>"\xE5\x8F\xB0",
+ "\x91\xE5"=>"\xE5\xA4\xA7",
+ "\x91\xE6"=>"\xE7\xAC\xAC",
+ "\x91\xE7"=>"\xE9\x86\x8D",
+ "\x91\xE8"=>"\xE9\xA1\x8C",
+ "\x91\xE9"=>"\xE9\xB7\xB9",
+ "\x91\xEA"=>"\xE6\xBB\x9D",
+ "\x91\xEB"=>"\xE7\x80\xA7",
+ "\x91\xEC"=>"\xE5\x8D\x93",
+ "\x91\xED"=>"\xE5\x95\x84",
+ "\x91\xEE"=>"\xE5\xAE\x85",
+ "\x91\xEF"=>"\xE6\x89\x98",
+ "\x91\xF0"=>"\xE6\x8A\x9E",
+ "\x91\xF1"=>"\xE6\x8B\x93",
+ "\x91\xF2"=>"\xE6\xB2\xA2",
+ "\x91\xF3"=>"\xE6\xBF\xAF",
+ "\x91\xF4"=>"\xE7\x90\xA2",
+ "\x91\xF5"=>"\xE8\xA8\x97",
+ "\x91\xF6"=>"\xE9\x90\xB8",
+ "\x91\xF7"=>"\xE6\xBF\x81",
+ "\x91\xF8"=>"\xE8\xAB\xBE",
+ "\x91\xF9"=>"\xE8\x8C\xB8",
+ "\x91\xFA"=>"\xE5\x87\xA7",
+ "\x91\xFB"=>"\xE8\x9B\xB8",
+ "\x91\xFC"=>"\xE5\x8F\xAA",
+ "\x92\x40"=>"\xE5\x8F\xA9",
+ "\x92\x41"=>"\xE4\xBD\x86",
+ "\x92\x42"=>"\xE9\x81\x94",
+ "\x92\x43"=>"\xE8\xBE\xB0",
+ "\x92\x44"=>"\xE5\xA5\xAA",
+ "\x92\x45"=>"\xE8\x84\xB1",
+ "\x92\x46"=>"\xE5\xB7\xBD",
+ "\x92\x47"=>"\xE7\xAB\xAA",
+ "\x92\x48"=>"\xE8\xBE\xBF",
+ "\x92\x49"=>"\xE6\xA3\x9A",
+ "\x92\x4A"=>"\xE8\xB0\xB7",
+ "\x92\x4B"=>"\xE7\x8B\xB8",
+ "\x92\x4C"=>"\xE9\xB1\x88",
+ "\x92\x4D"=>"\xE6\xA8\xBD",
+ "\x92\x4E"=>"\xE8\xAA\xB0",
+ "\x92\x4F"=>"\xE4\xB8\xB9",
+ "\x92\x50"=>"\xE5\x8D\x98",
+ "\x92\x51"=>"\xE5\x98\x86",
+ "\x92\x52"=>"\xE5\x9D\xA6",
+ "\x92\x53"=>"\xE6\x8B\x85",
+ "\x92\x54"=>"\xE6\x8E\xA2",
+ "\x92\x55"=>"\xE6\x97\xA6",
+ "\x92\x56"=>"\xE6\xAD\x8E",
+ "\x92\x57"=>"\xE6\xB7\xA1",
+ "\x92\x58"=>"\xE6\xB9\x9B",
+ "\x92\x59"=>"\xE7\x82\xAD",
+ "\x92\x5A"=>"\xE7\x9F\xAD",
+ "\x92\x5B"=>"\xE7\xAB\xAF",
+ "\x92\x5C"=>"\xE7\xAE\xAA",
+ "\x92\x5D"=>"\xE7\xB6\xBB",
+ "\x92\x5E"=>"\xE8\x80\xBD",
+ "\x92\x5F"=>"\xE8\x83\x86",
+ "\x92\x60"=>"\xE8\x9B\x8B",
+ "\x92\x61"=>"\xE8\xAA\x95",
+ "\x92\x62"=>"\xE9\x8D\x9B",
+ "\x92\x63"=>"\xE5\x9B\xA3",
+ "\x92\x64"=>"\xE5\xA3\x87",
+ "\x92\x65"=>"\xE5\xBC\xBE",
+ "\x92\x66"=>"\xE6\x96\xAD",
+ "\x92\x67"=>"\xE6\x9A\x96",
+ "\x92\x68"=>"\xE6\xAA\x80",
+ "\x92\x69"=>"\xE6\xAE\xB5",
+ "\x92\x6A"=>"\xE7\x94\xB7",
+ "\x92\x6B"=>"\xE8\xAB\x87",
+ "\x92\x6C"=>"\xE5\x80\xA4",
+ "\x92\x6D"=>"\xE7\x9F\xA5",
+ "\x92\x6E"=>"\xE5\x9C\xB0",
+ "\x92\x6F"=>"\xE5\xBC\x9B",
+ "\x92\x70"=>"\xE6\x81\xA5",
+ "\x92\x71"=>"\xE6\x99\xBA",
+ "\x92\x72"=>"\xE6\xB1\xA0",
+ "\x92\x73"=>"\xE7\x97\xB4",
+ "\x92\x74"=>"\xE7\xA8\x9A",
+ "\x92\x75"=>"\xE7\xBD\xAE",
+ "\x92\x76"=>"\xE8\x87\xB4",
+ "\x92\x77"=>"\xE8\x9C\x98",
+ "\x92\x78"=>"\xE9\x81\x85",
+ "\x92\x79"=>"\xE9\xA6\xB3",
+ "\x92\x7A"=>"\xE7\xAF\x89",
+ "\x92\x7B"=>"\xE7\x95\x9C",
+ "\x92\x7C"=>"\xE7\xAB\xB9",
+ "\x92\x7D"=>"\xE7\xAD\x91",
+ "\x92\x7E"=>"\xE8\x93\x84",
+ "\x92\x80"=>"\xE9\x80\x90",
+ "\x92\x81"=>"\xE7\xA7\xA9",
+ "\x92\x82"=>"\xE7\xAA\x92",
+ "\x92\x83"=>"\xE8\x8C\xB6",
+ "\x92\x84"=>"\xE5\xAB\xA1",
+ "\x92\x85"=>"\xE7\x9D\x80",
+ "\x92\x86"=>"\xE4\xB8\xAD",
+ "\x92\x87"=>"\xE4\xBB\xB2",
+ "\x92\x88"=>"\xE5\xAE\x99",
+ "\x92\x89"=>"\xE5\xBF\xA0",
+ "\x92\x8A"=>"\xE6\x8A\xBD",
+ "\x92\x8B"=>"\xE6\x98\xBC",
+ "\x92\x8C"=>"\xE6\x9F\xB1",
+ "\x92\x8D"=>"\xE6\xB3\xA8",
+ "\x92\x8E"=>"\xE8\x99\xAB",
+ "\x92\x8F"=>"\xE8\xA1\xB7",
+ "\x92\x90"=>"\xE8\xA8\xBB",
+ "\x92\x91"=>"\xE9\x85\x8E",
+ "\x92\x92"=>"\xE9\x8B\xB3",
+ "\x92\x93"=>"\xE9\xA7\x90",
+ "\x92\x94"=>"\xE6\xA8\x97",
+ "\x92\x95"=>"\xE7\x80\xA6",
+ "\x92\x96"=>"\xE7\x8C\xAA",
+ "\x92\x97"=>"\xE8\x8B\xA7",
+ "\x92\x98"=>"\xE8\x91\x97",
+ "\x92\x99"=>"\xE8\xB2\xAF",
+ "\x92\x9A"=>"\xE4\xB8\x81",
+ "\x92\x9B"=>"\xE5\x85\x86",
+ "\x92\x9C"=>"\xE5\x87\x8B",
+ "\x92\x9D"=>"\xE5\x96\x8B",
+ "\x92\x9E"=>"\xE5\xAF\xB5",
+ "\x92\x9F"=>"\xE5\xB8\x96",
+ "\x92\xA0"=>"\xE5\xB8\xB3",
+ "\x92\xA1"=>"\xE5\xBA\x81",
+ "\x92\xA2"=>"\xE5\xBC\x94",
+ "\x92\xA3"=>"\xE5\xBC\xB5",
+ "\x92\xA4"=>"\xE5\xBD\xAB",
+ "\x92\xA5"=>"\xE5\xBE\xB4",
+ "\x92\xA6"=>"\xE6\x87\xB2",
+ "\x92\xA7"=>"\xE6\x8C\x91",
+ "\x92\xA8"=>"\xE6\x9A\xA2",
+ "\x92\xA9"=>"\xE6\x9C\x9D",
+ "\x92\xAA"=>"\xE6\xBD\xAE",
+ "\x92\xAB"=>"\xE7\x89\x92",
+ "\x92\xAC"=>"\xE7\x94\xBA",
+ "\x92\xAD"=>"\xE7\x9C\xBA",
+ "\x92\xAE"=>"\xE8\x81\xB4",
+ "\x92\xAF"=>"\xE8\x84\xB9",
+ "\x92\xB0"=>"\xE8\x85\xB8",
+ "\x92\xB1"=>"\xE8\x9D\xB6",
+ "\x92\xB2"=>"\xE8\xAA\xBF",
+ "\x92\xB3"=>"\xE8\xAB\x9C",
+ "\x92\xB4"=>"\xE8\xB6\x85",
+ "\x92\xB5"=>"\xE8\xB7\xB3",
+ "\x92\xB6"=>"\xE9\x8A\x9A",
+ "\x92\xB7"=>"\xE9\x95\xB7",
+ "\x92\xB8"=>"\xE9\xA0\x82",
+ "\x92\xB9"=>"\xE9\xB3\xA5",
+ "\x92\xBA"=>"\xE5\x8B\x85",
+ "\x92\xBB"=>"\xE6\x8D\x97",
+ "\x92\xBC"=>"\xE7\x9B\xB4",
+ "\x92\xBD"=>"\xE6\x9C\x95",
+ "\x92\xBE"=>"\xE6\xB2\x88",
+ "\x92\xBF"=>"\xE7\x8F\x8D",
+ "\x92\xC0"=>"\xE8\xB3\x83",
+ "\x92\xC1"=>"\xE9\x8E\xAE",
+ "\x92\xC2"=>"\xE9\x99\xB3",
+ "\x92\xC3"=>"\xE6\xB4\xA5",
+ "\x92\xC4"=>"\xE5\xA2\x9C",
+ "\x92\xC5"=>"\xE6\xA4\x8E",
+ "\x92\xC6"=>"\xE6\xA7\x8C",
+ "\x92\xC7"=>"\xE8\xBF\xBD",
+ "\x92\xC8"=>"\xE9\x8E\x9A",
+ "\x92\xC9"=>"\xE7\x97\x9B",
+ "\x92\xCA"=>"\xE9\x80\x9A",
+ "\x92\xCB"=>"\xE5\xA1\x9A",
+ "\x92\xCC"=>"\xE6\xA0\x82",
+ "\x92\xCD"=>"\xE6\x8E\xB4",
+ "\x92\xCE"=>"\xE6\xA7\xBB",
+ "\x92\xCF"=>"\xE4\xBD\x83",
+ "\x92\xD0"=>"\xE6\xBC\xAC",
+ "\x92\xD1"=>"\xE6\x9F\x98",
+ "\x92\xD2"=>"\xE8\xBE\xBB",
+ "\x92\xD3"=>"\xE8\x94\xA6",
+ "\x92\xD4"=>"\xE7\xB6\xB4",
+ "\x92\xD5"=>"\xE9\x8D\x94",
+ "\x92\xD6"=>"\xE6\xA4\xBF",
+ "\x92\xD7"=>"\xE6\xBD\xB0",
+ "\x92\xD8"=>"\xE5\x9D\xAA",
+ "\x92\xD9"=>"\xE5\xA3\xB7",
+ "\x92\xDA"=>"\xE5\xAC\xAC",
+ "\x92\xDB"=>"\xE7\xB4\xAC",
+ "\x92\xDC"=>"\xE7\x88\xAA",
+ "\x92\xDD"=>"\xE5\x90\x8A",
+ "\x92\xDE"=>"\xE9\x87\xA3",
+ "\x92\xDF"=>"\xE9\xB6\xB4",
+ "\x92\xE0"=>"\xE4\xBA\xAD",
+ "\x92\xE1"=>"\xE4\xBD\x8E",
+ "\x92\xE2"=>"\xE5\x81\x9C",
+ "\x92\xE3"=>"\xE5\x81\xB5",
+ "\x92\xE4"=>"\xE5\x89\x83",
+ "\x92\xE5"=>"\xE8\xB2\x9E",
+ "\x92\xE6"=>"\xE5\x91\x88",
+ "\x92\xE7"=>"\xE5\xA0\xA4",
+ "\x92\xE8"=>"\xE5\xAE\x9A",
+ "\x92\xE9"=>"\xE5\xB8\x9D",
+ "\x92\xEA"=>"\xE5\xBA\x95",
+ "\x92\xEB"=>"\xE5\xBA\xAD",
+ "\x92\xEC"=>"\xE5\xBB\xB7",
+ "\x92\xED"=>"\xE5\xBC\x9F",
+ "\x92\xEE"=>"\xE6\x82\x8C",
+ "\x92\xEF"=>"\xE6\x8A\xB5",
+ "\x92\xF0"=>"\xE6\x8C\xBA",
+ "\x92\xF1"=>"\xE6\x8F\x90",
+ "\x92\xF2"=>"\xE6\xA2\xAF",
+ "\x92\xF3"=>"\xE6\xB1\x80",
+ "\x92\xF4"=>"\xE7\xA2\x87",
+ "\x92\xF5"=>"\xE7\xA6\x8E",
+ "\x92\xF6"=>"\xE7\xA8\x8B",
+ "\x92\xF7"=>"\xE7\xB7\xA0",
+ "\x92\xF8"=>"\xE8\x89\x87",
+ "\x92\xF9"=>"\xE8\xA8\x82",
+ "\x92\xFA"=>"\xE8\xAB\xA6",
+ "\x92\xFB"=>"\xE8\xB9\x84",
+ "\x92\xFC"=>"\xE9\x80\x93",
+ "\x93\x40"=>"\xE9\x82\xB8",
+ "\x93\x41"=>"\xE9\x84\xAD",
+ "\x93\x42"=>"\xE9\x87\x98",
+ "\x93\x43"=>"\xE9\xBC\x8E",
+ "\x93\x44"=>"\xE6\xB3\xA5",
+ "\x93\x45"=>"\xE6\x91\x98",
+ "\x93\x46"=>"\xE6\x93\xA2",
+ "\x93\x47"=>"\xE6\x95\xB5",
+ "\x93\x48"=>"\xE6\xBB\xB4",
+ "\x93\x49"=>"\xE7\x9A\x84",
+ "\x93\x4A"=>"\xE7\xAC\x9B",
+ "\x93\x4B"=>"\xE9\x81\xA9",
+ "\x93\x4C"=>"\xE9\x8F\x91",
+ "\x93\x4D"=>"\xE6\xBA\xBA",
+ "\x93\x4E"=>"\xE5\x93\xB2",
+ "\x93\x4F"=>"\xE5\xBE\xB9",
+ "\x93\x50"=>"\xE6\x92\xA4",
+ "\x93\x51"=>"\xE8\xBD\x8D",
+ "\x93\x52"=>"\xE8\xBF\xAD",
+ "\x93\x53"=>"\xE9\x89\x84",
+ "\x93\x54"=>"\xE5\x85\xB8",
+ "\x93\x55"=>"\xE5\xA1\xAB",
+ "\x93\x56"=>"\xE5\xA4\xA9",
+ "\x93\x57"=>"\xE5\xB1\x95",
+ "\x93\x58"=>"\xE5\xBA\x97",
+ "\x93\x59"=>"\xE6\xB7\xBB",
+ "\x93\x5A"=>"\xE7\xBA\x8F",
+ "\x93\x5B"=>"\xE7\x94\x9C",
+ "\x93\x5C"=>"\xE8\xB2\xBC",
+ "\x93\x5D"=>"\xE8\xBB\xA2",
+ "\x93\x5E"=>"\xE9\xA1\x9B",
+ "\x93\x5F"=>"\xE7\x82\xB9",
+ "\x93\x60"=>"\xE4\xBC\x9D",
+ "\x93\x61"=>"\xE6\xAE\xBF",
+ "\x93\x62"=>"\xE6\xBE\xB1",
+ "\x93\x63"=>"\xE7\x94\xB0",
+ "\x93\x64"=>"\xE9\x9B\xBB",
+ "\x93\x65"=>"\xE5\x85\x8E",
+ "\x93\x66"=>"\xE5\x90\x90",
+ "\x93\x67"=>"\xE5\xA0\xB5",
+ "\x93\x68"=>"\xE5\xA1\x97",
+ "\x93\x69"=>"\xE5\xA6\xAC",
+ "\x93\x6A"=>"\xE5\xB1\xA0",
+ "\x93\x6B"=>"\xE5\xBE\x92",
+ "\x93\x6C"=>"\xE6\x96\x97",
+ "\x93\x6D"=>"\xE6\x9D\x9C",
+ "\x93\x6E"=>"\xE6\xB8\xA1",
+ "\x93\x6F"=>"\xE7\x99\xBB",
+ "\x93\x70"=>"\xE8\x8F\x9F",
+ "\x93\x71"=>"\xE8\xB3\xAD",
+ "\x93\x72"=>"\xE9\x80\x94",
+ "\x93\x73"=>"\xE9\x83\xBD",
+ "\x93\x74"=>"\xE9\x8D\x8D",
+ "\x93\x75"=>"\xE7\xA0\xA5",
+ "\x93\x76"=>"\xE7\xA0\xBA",
+ "\x93\x77"=>"\xE5\x8A\xAA",
+ "\x93\x78"=>"\xE5\xBA\xA6",
+ "\x93\x79"=>"\xE5\x9C\x9F",
+ "\x93\x7A"=>"\xE5\xA5\xB4",
+ "\x93\x7B"=>"\xE6\x80\x92",
+ "\x93\x7C"=>"\xE5\x80\x92",
+ "\x93\x7D"=>"\xE5\x85\x9A",
+ "\x93\x7E"=>"\xE5\x86\xAC",
+ "\x93\x80"=>"\xE5\x87\x8D",
+ "\x93\x81"=>"\xE5\x88\x80",
+ "\x93\x82"=>"\xE5\x94\x90",
+ "\x93\x83"=>"\xE5\xA1\x94",
+ "\x93\x84"=>"\xE5\xA1\x98",
+ "\x93\x85"=>"\xE5\xA5\x97",
+ "\x93\x86"=>"\xE5\xAE\x95",
+ "\x93\x87"=>"\xE5\xB3\xB6",
+ "\x93\x88"=>"\xE5\xB6\x8B",
+ "\x93\x89"=>"\xE6\x82\xBC",
+ "\x93\x8A"=>"\xE6\x8A\x95",
+ "\x93\x8B"=>"\xE6\x90\xAD",
+ "\x93\x8C"=>"\xE6\x9D\xB1",
+ "\x93\x8D"=>"\xE6\xA1\x83",
+ "\x93\x8E"=>"\xE6\xA2\xBC",
+ "\x93\x8F"=>"\xE6\xA3\x9F",
+ "\x93\x90"=>"\xE7\x9B\x97",
+ "\x93\x91"=>"\xE6\xB7\x98",
+ "\x93\x92"=>"\xE6\xB9\xAF",
+ "\x93\x93"=>"\xE6\xB6\x9B",
+ "\x93\x94"=>"\xE7\x81\xAF",
+ "\x93\x95"=>"\xE7\x87\x88",
+ "\x93\x96"=>"\xE5\xBD\x93",
+ "\x93\x97"=>"\xE7\x97\x98",
+ "\x93\x98"=>"\xE7\xA5\xB7",
+ "\x93\x99"=>"\xE7\xAD\x89",
+ "\x93\x9A"=>"\xE7\xAD\x94",
+ "\x93\x9B"=>"\xE7\xAD\x92",
+ "\x93\x9C"=>"\xE7\xB3\x96",
+ "\x93\x9D"=>"\xE7\xB5\xB1",
+ "\x93\x9E"=>"\xE5\x88\xB0",
+ "\x93\x9F"=>"\xE8\x91\xA3",
+ "\x93\xA0"=>"\xE8\x95\xA9",
+ "\x93\xA1"=>"\xE8\x97\xA4",
+ "\x93\xA2"=>"\xE8\xA8\x8E",
+ "\x93\xA3"=>"\xE8\xAC\x84",
+ "\x93\xA4"=>"\xE8\xB1\x86",
+ "\x93\xA5"=>"\xE8\xB8\x8F",
+ "\x93\xA6"=>"\xE9\x80\x83",
+ "\x93\xA7"=>"\xE9\x80\x8F",
+ "\x93\xA8"=>"\xE9\x90\x99",
+ "\x93\xA9"=>"\xE9\x99\xB6",
+ "\x93\xAA"=>"\xE9\xA0\xAD",
+ "\x93\xAB"=>"\xE9\xA8\xB0",
+ "\x93\xAC"=>"\xE9\x97\x98",
+ "\x93\xAD"=>"\xE5\x83\x8D",
+ "\x93\xAE"=>"\xE5\x8B\x95",
+ "\x93\xAF"=>"\xE5\x90\x8C",
+ "\x93\xB0"=>"\xE5\xA0\x82",
+ "\x93\xB1"=>"\xE5\xB0\x8E",
+ "\x93\xB2"=>"\xE6\x86\xA7",
+ "\x93\xB3"=>"\xE6\x92\x9E",
+ "\x93\xB4"=>"\xE6\xB4\x9E",
+ "\x93\xB5"=>"\xE7\x9E\xB3",
+ "\x93\xB6"=>"\xE7\xAB\xA5",
+ "\x93\xB7"=>"\xE8\x83\xB4",
+ "\x93\xB8"=>"\xE8\x90\x84",
+ "\x93\xB9"=>"\xE9\x81\x93",
+ "\x93\xBA"=>"\xE9\x8A\x85",
+ "\x93\xBB"=>"\xE5\xB3\xA0",
+ "\x93\xBC"=>"\xE9\xB4\x87",
+ "\x93\xBD"=>"\xE5\x8C\xBF",
+ "\x93\xBE"=>"\xE5\xBE\x97",
+ "\x93\xBF"=>"\xE5\xBE\xB3",
+ "\x93\xC0"=>"\xE6\xB6\x9C",
+ "\x93\xC1"=>"\xE7\x89\xB9",
+ "\x93\xC2"=>"\xE7\x9D\xA3",
+ "\x93\xC3"=>"\xE7\xA6\xBF",
+ "\x93\xC4"=>"\xE7\xAF\xA4",
+ "\x93\xC5"=>"\xE6\xAF\x92",
+ "\x93\xC6"=>"\xE7\x8B\xAC",
+ "\x93\xC7"=>"\xE8\xAA\xAD",
+ "\x93\xC8"=>"\xE6\xA0\x83",
+ "\x93\xC9"=>"\xE6\xA9\xA1",
+ "\x93\xCA"=>"\xE5\x87\xB8",
+ "\x93\xCB"=>"\xE7\xAA\x81",
+ "\x93\xCC"=>"\xE6\xA4\xB4",
+ "\x93\xCD"=>"\xE5\xB1\x8A",
+ "\x93\xCE"=>"\xE9\xB3\xB6",
+ "\x93\xCF"=>"\xE8\x8B\xAB",
+ "\x93\xD0"=>"\xE5\xAF\x85",
+ "\x93\xD1"=>"\xE9\x85\x89",
+ "\x93\xD2"=>"\xE7\x80\x9E",
+ "\x93\xD3"=>"\xE5\x99\xB8",
+ "\x93\xD4"=>"\xE5\xB1\xAF",
+ "\x93\xD5"=>"\xE6\x83\x87",
+ "\x93\xD6"=>"\xE6\x95\xA6",
+ "\x93\xD7"=>"\xE6\xB2\x8C",
+ "\x93\xD8"=>"\xE8\xB1\x9A",
+ "\x93\xD9"=>"\xE9\x81\x81",
+ "\x93\xDA"=>"\xE9\xA0\x93",
+ "\x93\xDB"=>"\xE5\x91\x91",
+ "\x93\xDC"=>"\xE6\x9B\x87",
+ "\x93\xDD"=>"\xE9\x88\x8D",
+ "\x93\xDE"=>"\xE5\xA5\x88",
+ "\x93\xDF"=>"\xE9\x82\xA3",
+ "\x93\xE0"=>"\xE5\x86\x85",
+ "\x93\xE1"=>"\xE4\xB9\x8D",
+ "\x93\xE2"=>"\xE5\x87\xAA",
+ "\x93\xE3"=>"\xE8\x96\x99",
+ "\x93\xE4"=>"\xE8\xAC\x8E",
+ "\x93\xE5"=>"\xE7\x81\x98",
+ "\x93\xE6"=>"\xE6\x8D\xBA",
+ "\x93\xE7"=>"\xE9\x8D\x8B",
+ "\x93\xE8"=>"\xE6\xA5\xA2",
+ "\x93\xE9"=>"\xE9\xA6\xB4",
+ "\x93\xEA"=>"\xE7\xB8\x84",
+ "\x93\xEB"=>"\xE7\x95\xB7",
+ "\x93\xEC"=>"\xE5\x8D\x97",
+ "\x93\xED"=>"\xE6\xA5\xA0",
+ "\x93\xEE"=>"\xE8\xBB\x9F",
+ "\x93\xEF"=>"\xE9\x9B\xA3",
+ "\x93\xF0"=>"\xE6\xB1\x9D",
+ "\x93\xF1"=>"\xE4\xBA\x8C",
+ "\x93\xF2"=>"\xE5\xB0\xBC",
+ "\x93\xF3"=>"\xE5\xBC\x90",
+ "\x93\xF4"=>"\xE8\xBF\xA9",
+ "\x93\xF5"=>"\xE5\x8C\x82",
+ "\x93\xF6"=>"\xE8\xB3\x91",
+ "\x93\xF7"=>"\xE8\x82\x89",
+ "\x93\xF8"=>"\xE8\x99\xB9",
+ "\x93\xF9"=>"\xE5\xBB\xBF",
+ "\x93\xFA"=>"\xE6\x97\xA5",
+ "\x93\xFB"=>"\xE4\xB9\xB3",
+ "\x93\xFC"=>"\xE5\x85\xA5",
+ "\x94\x40"=>"\xE5\xA6\x82",
+ "\x94\x41"=>"\xE5\xB0\xBF",
+ "\x94\x42"=>"\xE9\x9F\xAE",
+ "\x94\x43"=>"\xE4\xBB\xBB",
+ "\x94\x44"=>"\xE5\xA6\x8A",
+ "\x94\x45"=>"\xE5\xBF\x8D",
+ "\x94\x46"=>"\xE8\xAA\x8D",
+ "\x94\x47"=>"\xE6\xBF\xA1",
+ "\x94\x48"=>"\xE7\xA6\xB0",
+ "\x94\x49"=>"\xE7\xA5\xA2",
+ "\x94\x4A"=>"\xE5\xAF\xA7",
+ "\x94\x4B"=>"\xE8\x91\xB1",
+ "\x94\x4C"=>"\xE7\x8C\xAB",
+ "\x94\x4D"=>"\xE7\x86\xB1",
+ "\x94\x4E"=>"\xE5\xB9\xB4",
+ "\x94\x4F"=>"\xE5\xBF\xB5",
+ "\x94\x50"=>"\xE6\x8D\xBB",
+ "\x94\x51"=>"\xE6\x92\x9A",
+ "\x94\x52"=>"\xE7\x87\x83",
+ "\x94\x53"=>"\xE7\xB2\x98",
+ "\x94\x54"=>"\xE4\xB9\x83",
+ "\x94\x55"=>"\xE5\xBB\xBC",
+ "\x94\x56"=>"\xE4\xB9\x8B",
+ "\x94\x57"=>"\xE5\x9F\x9C",
+ "\x94\x58"=>"\xE5\x9A\xA2",
+ "\x94\x59"=>"\xE6\x82\xA9",
+ "\x94\x5A"=>"\xE6\xBF\x83",
+ "\x94\x5B"=>"\xE7\xB4\x8D",
+ "\x94\x5C"=>"\xE8\x83\xBD",
+ "\x94\x5D"=>"\xE8\x84\xB3",
+ "\x94\x5E"=>"\xE8\x86\xBF",
+ "\x94\x5F"=>"\xE8\xBE\xB2",
+ "\x94\x60"=>"\xE8\xA6\x97",
+ "\x94\x61"=>"\xE8\x9A\xA4",
+ "\x94\x62"=>"\xE5\xB7\xB4",
+ "\x94\x63"=>"\xE6\x8A\x8A",
+ "\x94\x64"=>"\xE6\x92\xAD",
+ "\x94\x65"=>"\xE8\xA6\x87",
+ "\x94\x66"=>"\xE6\x9D\xB7",
+ "\x94\x67"=>"\xE6\xB3\xA2",
+ "\x94\x68"=>"\xE6\xB4\xBE",
+ "\x94\x69"=>"\xE7\x90\xB6",
+ "\x94\x6A"=>"\xE7\xA0\xB4",
+ "\x94\x6B"=>"\xE5\xA9\x86",
+ "\x94\x6C"=>"\xE7\xBD\xB5",
+ "\x94\x6D"=>"\xE8\x8A\xAD",
+ "\x94\x6E"=>"\xE9\xA6\xAC",
+ "\x94\x6F"=>"\xE4\xBF\xB3",
+ "\x94\x70"=>"\xE5\xBB\x83",
+ "\x94\x71"=>"\xE6\x8B\x9D",
+ "\x94\x72"=>"\xE6\x8E\x92",
+ "\x94\x73"=>"\xE6\x95\x97",
+ "\x94\x74"=>"\xE6\x9D\xAF",
+ "\x94\x75"=>"\xE7\x9B\x83",
+ "\x94\x76"=>"\xE7\x89\x8C",
+ "\x94\x77"=>"\xE8\x83\x8C",
+ "\x94\x78"=>"\xE8\x82\xBA",
+ "\x94\x79"=>"\xE8\xBC\xA9",
+ "\x94\x7A"=>"\xE9\x85\x8D",
+ "\x94\x7B"=>"\xE5\x80\x8D",
+ "\x94\x7C"=>"\xE5\x9F\xB9",
+ "\x94\x7D"=>"\xE5\xAA\x92",
+ "\x94\x7E"=>"\xE6\xA2\x85",
+ "\x94\x80"=>"\xE6\xA5\xB3",
+ "\x94\x81"=>"\xE7\x85\xA4",
+ "\x94\x82"=>"\xE7\x8B\xBD",
+ "\x94\x83"=>"\xE8\xB2\xB7",
+ "\x94\x84"=>"\xE5\xA3\xB2",
+ "\x94\x85"=>"\xE8\xB3\xA0",
+ "\x94\x86"=>"\xE9\x99\xAA",
+ "\x94\x87"=>"\xE9\x80\x99",
+ "\x94\x88"=>"\xE8\x9D\xBF",
+ "\x94\x89"=>"\xE7\xA7\xA4",
+ "\x94\x8A"=>"\xE7\x9F\xA7",
+ "\x94\x8B"=>"\xE8\x90\xA9",
+ "\x94\x8C"=>"\xE4\xBC\xAF",
+ "\x94\x8D"=>"\xE5\x89\xA5",
+ "\x94\x8E"=>"\xE5\x8D\x9A",
+ "\x94\x8F"=>"\xE6\x8B\x8D",
+ "\x94\x90"=>"\xE6\x9F\x8F",
+ "\x94\x91"=>"\xE6\xB3\x8A",
+ "\x94\x92"=>"\xE7\x99\xBD",
+ "\x94\x93"=>"\xE7\xAE\x94",
+ "\x94\x94"=>"\xE7\xB2\x95",
+ "\x94\x95"=>"\xE8\x88\xB6",
+ "\x94\x96"=>"\xE8\x96\x84",
+ "\x94\x97"=>"\xE8\xBF\xAB",
+ "\x94\x98"=>"\xE6\x9B\x9D",
+ "\x94\x99"=>"\xE6\xBC\xA0",
+ "\x94\x9A"=>"\xE7\x88\x86",
+ "\x94\x9B"=>"\xE7\xB8\x9B",
+ "\x94\x9C"=>"\xE8\x8E\xAB",
+ "\x94\x9D"=>"\xE9\xA7\x81",
+ "\x94\x9E"=>"\xE9\xBA\xA6",
+ "\x94\x9F"=>"\xE5\x87\xBD",
+ "\x94\xA0"=>"\xE7\xAE\xB1",
+ "\x94\xA1"=>"\xE7\xA1\xB2",
+ "\x94\xA2"=>"\xE7\xAE\xB8",
+ "\x94\xA3"=>"\xE8\x82\x87",
+ "\x94\xA4"=>"\xE7\xAD\x88",
+ "\x94\xA5"=>"\xE6\xAB\xA8",
+ "\x94\xA6"=>"\xE5\xB9\xA1",
+ "\x94\xA7"=>"\xE8\x82\x8C",
+ "\x94\xA8"=>"\xE7\x95\x91",
+ "\x94\xA9"=>"\xE7\x95\xA0",
+ "\x94\xAA"=>"\xE5\x85\xAB",
+ "\x94\xAB"=>"\xE9\x89\xA2",
+ "\x94\xAC"=>"\xE6\xBA\x8C",
+ "\x94\xAD"=>"\xE7\x99\xBA",
+ "\x94\xAE"=>"\xE9\x86\x97",
+ "\x94\xAF"=>"\xE9\xAB\xAA",
+ "\x94\xB0"=>"\xE4\xBC\x90",
+ "\x94\xB1"=>"\xE7\xBD\xB0",
+ "\x94\xB2"=>"\xE6\x8A\x9C",
+ "\x94\xB3"=>"\xE7\xAD\x8F",
+ "\x94\xB4"=>"\xE9\x96\xA5",
+ "\x94\xB5"=>"\xE9\xB3\xA9",
+ "\x94\xB6"=>"\xE5\x99\xBA",
+ "\x94\xB7"=>"\xE5\xA1\x99",
+ "\x94\xB8"=>"\xE8\x9B\xA4",
+ "\x94\xB9"=>"\xE9\x9A\xBC",
+ "\x94\xBA"=>"\xE4\xBC\xB4",
+ "\x94\xBB"=>"\xE5\x88\xA4",
+ "\x94\xBC"=>"\xE5\x8D\x8A",
+ "\x94\xBD"=>"\xE5\x8F\x8D",
+ "\x94\xBE"=>"\xE5\x8F\x9B",
+ "\x94\xBF"=>"\xE5\xB8\x86",
+ "\x94\xC0"=>"\xE6\x90\xAC",
+ "\x94\xC1"=>"\xE6\x96\x91",
+ "\x94\xC2"=>"\xE6\x9D\xBF",
+ "\x94\xC3"=>"\xE6\xB0\xBE",
+ "\x94\xC4"=>"\xE6\xB1\x8E",
+ "\x94\xC5"=>"\xE7\x89\x88",
+ "\x94\xC6"=>"\xE7\x8A\xAF",
+ "\x94\xC7"=>"\xE7\x8F\xAD",
+ "\x94\xC8"=>"\xE7\x95\x94",
+ "\x94\xC9"=>"\xE7\xB9\x81",
+ "\x94\xCA"=>"\xE8\x88\xAC",
+ "\x94\xCB"=>"\xE8\x97\xA9",
+ "\x94\xCC"=>"\xE8\xB2\xA9",
+ "\x94\xCD"=>"\xE7\xAF\x84",
+ "\x94\xCE"=>"\xE9\x87\x86",
+ "\x94\xCF"=>"\xE7\x85\xA9",
+ "\x94\xD0"=>"\xE9\xA0\x92",
+ "\x94\xD1"=>"\xE9\xA3\xAF",
+ "\x94\xD2"=>"\xE6\x8C\xBD",
+ "\x94\xD3"=>"\xE6\x99\xA9",
+ "\x94\xD4"=>"\xE7\x95\xAA",
+ "\x94\xD5"=>"\xE7\x9B\xA4",
+ "\x94\xD6"=>"\xE7\xA3\x90",
+ "\x94\xD7"=>"\xE8\x95\x83",
+ "\x94\xD8"=>"\xE8\x9B\xAE",
+ "\x94\xD9"=>"\xE5\x8C\xAA",
+ "\x94\xDA"=>"\xE5\x8D\x91",
+ "\x94\xDB"=>"\xE5\x90\xA6",
+ "\x94\xDC"=>"\xE5\xA6\x83",
+ "\x94\xDD"=>"\xE5\xBA\x87",
+ "\x94\xDE"=>"\xE5\xBD\xBC",
+ "\x94\xDF"=>"\xE6\x82\xB2",
+ "\x94\xE0"=>"\xE6\x89\x89",
+ "\x94\xE1"=>"\xE6\x89\xB9",
+ "\x94\xE2"=>"\xE6\x8A\xAB",
+ "\x94\xE3"=>"\xE6\x96\x90",
+ "\x94\xE4"=>"\xE6\xAF\x94",
+ "\x94\xE5"=>"\xE6\xB3\x8C",
+ "\x94\xE6"=>"\xE7\x96\xB2",
+ "\x94\xE7"=>"\xE7\x9A\xAE",
+ "\x94\xE8"=>"\xE7\xA2\x91",
+ "\x94\xE9"=>"\xE7\xA7\x98",
+ "\x94\xEA"=>"\xE7\xB7\x8B",
+ "\x94\xEB"=>"\xE7\xBD\xB7",
+ "\x94\xEC"=>"\xE8\x82\xA5",
+ "\x94\xED"=>"\xE8\xA2\xAB",
+ "\x94\xEE"=>"\xE8\xAA\xB9",
+ "\x94\xEF"=>"\xE8\xB2\xBB",
+ "\x94\xF0"=>"\xE9\x81\xBF",
+ "\x94\xF1"=>"\xE9\x9D\x9E",
+ "\x94\xF2"=>"\xE9\xA3\x9B",
+ "\x94\xF3"=>"\xE6\xA8\x8B",
+ "\x94\xF4"=>"\xE7\xB0\xB8",
+ "\x94\xF5"=>"\xE5\x82\x99",
+ "\x94\xF6"=>"\xE5\xB0\xBE",
+ "\x94\xF7"=>"\xE5\xBE\xAE",
+ "\x94\xF8"=>"\xE6\x9E\x87",
+ "\x94\xF9"=>"\xE6\xAF\x98",
+ "\x94\xFA"=>"\xE7\x90\xB5",
+ "\x94\xFB"=>"\xE7\x9C\x89",
+ "\x94\xFC"=>"\xE7\xBE\x8E",
+ "\x95\x40"=>"\xE9\xBC\xBB",
+ "\x95\x41"=>"\xE6\x9F\x8A",
+ "\x95\x42"=>"\xE7\xA8\x97",
+ "\x95\x43"=>"\xE5\x8C\xB9",
+ "\x95\x44"=>"\xE7\x96\x8B",
+ "\x95\x45"=>"\xE9\xAB\xAD",
+ "\x95\x46"=>"\xE5\xBD\xA6",
+ "\x95\x47"=>"\xE8\x86\x9D",
+ "\x95\x48"=>"\xE8\x8F\xB1",
+ "\x95\x49"=>"\xE8\x82\x98",
+ "\x95\x4A"=>"\xE5\xBC\xBC",
+ "\x95\x4B"=>"\xE5\xBF\x85",
+ "\x95\x4C"=>"\xE7\x95\xA2",
+ "\x95\x4D"=>"\xE7\xAD\x86",
+ "\x95\x4E"=>"\xE9\x80\xBC",
+ "\x95\x4F"=>"\xE6\xA1\xA7",
+ "\x95\x50"=>"\xE5\xA7\xAB",
+ "\x95\x51"=>"\xE5\xAA\x9B",
+ "\x95\x52"=>"\xE7\xB4\x90",
+ "\x95\x53"=>"\xE7\x99\xBE",
+ "\x95\x54"=>"\xE8\xAC\xAC",
+ "\x95\x55"=>"\xE4\xBF\xB5",
+ "\x95\x56"=>"\xE5\xBD\xAA",
+ "\x95\x57"=>"\xE6\xA8\x99",
+ "\x95\x58"=>"\xE6\xB0\xB7",
+ "\x95\x59"=>"\xE6\xBC\x82",
+ "\x95\x5A"=>"\xE7\x93\xA2",
+ "\x95\x5B"=>"\xE7\xA5\xA8",
+ "\x95\x5C"=>"\xE8\xA1\xA8",
+ "\x95\x5D"=>"\xE8\xA9\x95",
+ "\x95\x5E"=>"\xE8\xB1\xB9",
+ "\x95\x5F"=>"\xE5\xBB\x9F",
+ "\x95\x60"=>"\xE6\x8F\x8F",
+ "\x95\x61"=>"\xE7\x97\x85",
+ "\x95\x62"=>"\xE7\xA7\x92",
+ "\x95\x63"=>"\xE8\x8B\x97",
+ "\x95\x64"=>"\xE9\x8C\xA8",
+ "\x95\x65"=>"\xE9\x8B\xB2",
+ "\x95\x66"=>"\xE8\x92\x9C",
+ "\x95\x67"=>"\xE8\x9B\xAD",
+ "\x95\x68"=>"\xE9\xB0\xAD",
+ "\x95\x69"=>"\xE5\x93\x81",
+ "\x95\x6A"=>"\xE5\xBD\xAC",
+ "\x95\x6B"=>"\xE6\x96\x8C",
+ "\x95\x6C"=>"\xE6\xB5\x9C",
+ "\x95\x6D"=>"\xE7\x80\x95",
+ "\x95\x6E"=>"\xE8\xB2\xA7",
+ "\x95\x6F"=>"\xE8\xB3\x93",
+ "\x95\x70"=>"\xE9\xA0\xBB",
+ "\x95\x71"=>"\xE6\x95\x8F",
+ "\x95\x72"=>"\xE7\x93\xB6",
+ "\x95\x73"=>"\xE4\xB8\x8D",
+ "\x95\x74"=>"\xE4\xBB\x98",
+ "\x95\x75"=>"\xE5\x9F\xA0",
+ "\x95\x76"=>"\xE5\xA4\xAB",
+ "\x95\x77"=>"\xE5\xA9\xA6",
+ "\x95\x78"=>"\xE5\xAF\x8C",
+ "\x95\x79"=>"\xE5\x86\xA8",
+ "\x95\x7A"=>"\xE5\xB8\x83",
+ "\x95\x7B"=>"\xE5\xBA\x9C",
+ "\x95\x7C"=>"\xE6\x80\x96",
+ "\x95\x7D"=>"\xE6\x89\xB6",
+ "\x95\x7E"=>"\xE6\x95\xB7",
+ "\x95\x80"=>"\xE6\x96\xA7",
+ "\x95\x81"=>"\xE6\x99\xAE",
+ "\x95\x82"=>"\xE6\xB5\xAE",
+ "\x95\x83"=>"\xE7\x88\xB6",
+ "\x95\x84"=>"\xE7\xAC\xA6",
+ "\x95\x85"=>"\xE8\x85\x90",
+ "\x95\x86"=>"\xE8\x86\x9A",
+ "\x95\x87"=>"\xE8\x8A\x99",
+ "\x95\x88"=>"\xE8\xAD\x9C",
+ "\x95\x89"=>"\xE8\xB2\xA0",
+ "\x95\x8A"=>"\xE8\xB3\xA6",
+ "\x95\x8B"=>"\xE8\xB5\xB4",
+ "\x95\x8C"=>"\xE9\x98\x9C",
+ "\x95\x8D"=>"\xE9\x99\x84",
+ "\x95\x8E"=>"\xE4\xBE\xAE",
+ "\x95\x8F"=>"\xE6\x92\xAB",
+ "\x95\x90"=>"\xE6\xAD\xA6",
+ "\x95\x91"=>"\xE8\x88\x9E",
+ "\x95\x92"=>"\xE8\x91\xA1",
+ "\x95\x93"=>"\xE8\x95\xAA",
+ "\x95\x94"=>"\xE9\x83\xA8",
+ "\x95\x95"=>"\xE5\xB0\x81",
+ "\x95\x96"=>"\xE6\xA5\x93",
+ "\x95\x97"=>"\xE9\xA2\xA8",
+ "\x95\x98"=>"\xE8\x91\xBA",
+ "\x95\x99"=>"\xE8\x95\x97",
+ "\x95\x9A"=>"\xE4\xBC\x8F",
+ "\x95\x9B"=>"\xE5\x89\xAF",
+ "\x95\x9C"=>"\xE5\xBE\xA9",
+ "\x95\x9D"=>"\xE5\xB9\x85",
+ "\x95\x9E"=>"\xE6\x9C\x8D",
+ "\x95\x9F"=>"\xE7\xA6\x8F",
+ "\x95\xA0"=>"\xE8\x85\xB9",
+ "\x95\xA1"=>"\xE8\xA4\x87",
+ "\x95\xA2"=>"\xE8\xA6\x86",
+ "\x95\xA3"=>"\xE6\xB7\xB5",
+ "\x95\xA4"=>"\xE5\xBC\x97",
+ "\x95\xA5"=>"\xE6\x89\x95",
+ "\x95\xA6"=>"\xE6\xB2\xB8",
+ "\x95\xA7"=>"\xE4\xBB\x8F",
+ "\x95\xA8"=>"\xE7\x89\xA9",
+ "\x95\xA9"=>"\xE9\xAE\x92",
+ "\x95\xAA"=>"\xE5\x88\x86",
+ "\x95\xAB"=>"\xE5\x90\xBB",
+ "\x95\xAC"=>"\xE5\x99\xB4",
+ "\x95\xAD"=>"\xE5\xA2\xB3",
+ "\x95\xAE"=>"\xE6\x86\xA4",
+ "\x95\xAF"=>"\xE6\x89\xAE",
+ "\x95\xB0"=>"\xE7\x84\x9A",
+ "\x95\xB1"=>"\xE5\xA5\xAE",
+ "\x95\xB2"=>"\xE7\xB2\x89",
+ "\x95\xB3"=>"\xE7\xB3\x9E",
+ "\x95\xB4"=>"\xE7\xB4\x9B",
+ "\x95\xB5"=>"\xE9\x9B\xB0",
+ "\x95\xB6"=>"\xE6\x96\x87",
+ "\x95\xB7"=>"\xE8\x81\x9E",
+ "\x95\xB8"=>"\xE4\xB8\x99",
+ "\x95\xB9"=>"\xE4\xBD\xB5",
+ "\x95\xBA"=>"\xE5\x85\xB5",
+ "\x95\xBB"=>"\xE5\xA1\x80",
+ "\x95\xBC"=>"\xE5\xB9\xA3",
+ "\x95\xBD"=>"\xE5\xB9\xB3",
+ "\x95\xBE"=>"\xE5\xBC\x8A",
+ "\x95\xBF"=>"\xE6\x9F\x84",
+ "\x95\xC0"=>"\xE4\xB8\xA6",
+ "\x95\xC1"=>"\xE8\x94\xBD",
+ "\x95\xC2"=>"\xE9\x96\x89",
+ "\x95\xC3"=>"\xE9\x99\x9B",
+ "\x95\xC4"=>"\xE7\xB1\xB3",
+ "\x95\xC5"=>"\xE9\xA0\x81",
+ "\x95\xC6"=>"\xE5\x83\xBB",
+ "\x95\xC7"=>"\xE5\xA3\x81",
+ "\x95\xC8"=>"\xE7\x99\x96",
+ "\x95\xC9"=>"\xE7\xA2\xA7",
+ "\x95\xCA"=>"\xE5\x88\xA5",
+ "\x95\xCB"=>"\xE7\x9E\xA5",
+ "\x95\xCC"=>"\xE8\x94\x91",
+ "\x95\xCD"=>"\xE7\xAE\x86",
+ "\x95\xCE"=>"\xE5\x81\x8F",
+ "\x95\xCF"=>"\xE5\xA4\x89",
+ "\x95\xD0"=>"\xE7\x89\x87",
+ "\x95\xD1"=>"\xE7\xAF\x87",
+ "\x95\xD2"=>"\xE7\xB7\xA8",
+ "\x95\xD3"=>"\xE8\xBE\xBA",
+ "\x95\xD4"=>"\xE8\xBF\x94",
+ "\x95\xD5"=>"\xE9\x81\x8D",
+ "\x95\xD6"=>"\xE4\xBE\xBF",
+ "\x95\xD7"=>"\xE5\x8B\x89",
+ "\x95\xD8"=>"\xE5\xA8\xA9",
+ "\x95\xD9"=>"\xE5\xBC\x81",
+ "\x95\xDA"=>"\xE9\x9E\xAD",
+ "\x95\xDB"=>"\xE4\xBF\x9D",
+ "\x95\xDC"=>"\xE8\x88\x97",
+ "\x95\xDD"=>"\xE9\x8B\xAA",
+ "\x95\xDE"=>"\xE5\x9C\x83",
+ "\x95\xDF"=>"\xE6\x8D\x95",
+ "\x95\xE0"=>"\xE6\xAD\xA9",
+ "\x95\xE1"=>"\xE7\x94\xAB",
+ "\x95\xE2"=>"\xE8\xA3\x9C",
+ "\x95\xE3"=>"\xE8\xBC\x94",
+ "\x95\xE4"=>"\xE7\xA9\x82",
+ "\x95\xE5"=>"\xE5\x8B\x9F",
+ "\x95\xE6"=>"\xE5\xA2\x93",
+ "\x95\xE7"=>"\xE6\x85\x95",
+ "\x95\xE8"=>"\xE6\x88\x8A",
+ "\x95\xE9"=>"\xE6\x9A\xAE",
+ "\x95\xEA"=>"\xE6\xAF\x8D",
+ "\x95\xEB"=>"\xE7\xB0\xBF",
+ "\x95\xEC"=>"\xE8\x8F\xA9",
+ "\x95\xED"=>"\xE5\x80\xA3",
+ "\x95\xEE"=>"\xE4\xBF\xB8",
+ "\x95\xEF"=>"\xE5\x8C\x85",
+ "\x95\xF0"=>"\xE5\x91\x86",
+ "\x95\xF1"=>"\xE5\xA0\xB1",
+ "\x95\xF2"=>"\xE5\xA5\x89",
+ "\x95\xF3"=>"\xE5\xAE\x9D",
+ "\x95\xF4"=>"\xE5\xB3\xB0",
+ "\x95\xF5"=>"\xE5\xB3\xAF",
+ "\x95\xF6"=>"\xE5\xB4\xA9",
+ "\x95\xF7"=>"\xE5\xBA\x96",
+ "\x95\xF8"=>"\xE6\x8A\xB1",
+ "\x95\xF9"=>"\xE6\x8D\xA7",
+ "\x95\xFA"=>"\xE6\x94\xBE",
+ "\x95\xFB"=>"\xE6\x96\xB9",
+ "\x95\xFC"=>"\xE6\x9C\x8B",
+ "\x96\x40"=>"\xE6\xB3\x95",
+ "\x96\x41"=>"\xE6\xB3\xA1",
+ "\x96\x42"=>"\xE7\x83\xB9",
+ "\x96\x43"=>"\xE7\xA0\xB2",
+ "\x96\x44"=>"\xE7\xB8\xAB",
+ "\x96\x45"=>"\xE8\x83\x9E",
+ "\x96\x46"=>"\xE8\x8A\xB3",
+ "\x96\x47"=>"\xE8\x90\x8C",
+ "\x96\x48"=>"\xE8\x93\xAC",
+ "\x96\x49"=>"\xE8\x9C\x82",
+ "\x96\x4A"=>"\xE8\xA4\x92",
+ "\x96\x4B"=>"\xE8\xA8\xAA",
+ "\x96\x4C"=>"\xE8\xB1\x8A",
+ "\x96\x4D"=>"\xE9\x82\xA6",
+ "\x96\x4E"=>"\xE9\x8B\x92",
+ "\x96\x4F"=>"\xE9\xA3\xBD",
+ "\x96\x50"=>"\xE9\xB3\xB3",
+ "\x96\x51"=>"\xE9\xB5\xAC",
+ "\x96\x52"=>"\xE4\xB9\x8F",
+ "\x96\x53"=>"\xE4\xBA\xA1",
+ "\x96\x54"=>"\xE5\x82\x8D",
+ "\x96\x55"=>"\xE5\x89\x96",
+ "\x96\x56"=>"\xE5\x9D\x8A",
+ "\x96\x57"=>"\xE5\xA6\xA8",
+ "\x96\x58"=>"\xE5\xB8\xBD",
+ "\x96\x59"=>"\xE5\xBF\x98",
+ "\x96\x5A"=>"\xE5\xBF\x99",
+ "\x96\x5B"=>"\xE6\x88\xBF",
+ "\x96\x5C"=>"\xE6\x9A\xB4",
+ "\x96\x5D"=>"\xE6\x9C\x9B",
+ "\x96\x5E"=>"\xE6\x9F\x90",
+ "\x96\x5F"=>"\xE6\xA3\x92",
+ "\x96\x60"=>"\xE5\x86\x92",
+ "\x96\x61"=>"\xE7\xB4\xA1",
+ "\x96\x62"=>"\xE8\x82\xAA",
+ "\x96\x63"=>"\xE8\x86\xA8",
+ "\x96\x64"=>"\xE8\xAC\x80",
+ "\x96\x65"=>"\xE8\xB2\x8C",
+ "\x96\x66"=>"\xE8\xB2\xBF",
+ "\x96\x67"=>"\xE9\x89\xBE",
+ "\x96\x68"=>"\xE9\x98\xB2",
+ "\x96\x69"=>"\xE5\x90\xA0",
+ "\x96\x6A"=>"\xE9\xA0\xAC",
+ "\x96\x6B"=>"\xE5\x8C\x97",
+ "\x96\x6C"=>"\xE5\x83\x95",
+ "\x96\x6D"=>"\xE5\x8D\x9C",
+ "\x96\x6E"=>"\xE5\xA2\xA8",
+ "\x96\x6F"=>"\xE6\x92\xB2",
+ "\x96\x70"=>"\xE6\x9C\xB4",
+ "\x96\x71"=>"\xE7\x89\xA7",
+ "\x96\x72"=>"\xE7\x9D\xA6",
+ "\x96\x73"=>"\xE7\xA9\x86",
+ "\x96\x74"=>"\xE9\x87\xA6",
+ "\x96\x75"=>"\xE5\x8B\x83",
+ "\x96\x76"=>"\xE6\xB2\xA1",
+ "\x96\x77"=>"\xE6\xAE\x86",
+ "\x96\x78"=>"\xE5\xA0\x80",
+ "\x96\x79"=>"\xE5\xB9\x8C",
+ "\x96\x7A"=>"\xE5\xA5\x94",
+ "\x96\x7B"=>"\xE6\x9C\xAC",
+ "\x96\x7C"=>"\xE7\xBF\xBB",
+ "\x96\x7D"=>"\xE5\x87\xA1",
+ "\x96\x7E"=>"\xE7\x9B\x86",
+ "\x96\x80"=>"\xE6\x91\xA9",
+ "\x96\x81"=>"\xE7\xA3\xA8",
+ "\x96\x82"=>"\xE9\xAD\x94",
+ "\x96\x83"=>"\xE9\xBA\xBB",
+ "\x96\x84"=>"\xE5\x9F\x8B",
+ "\x96\x85"=>"\xE5\xA6\xB9",
+ "\x96\x86"=>"\xE6\x98\xA7",
+ "\x96\x87"=>"\xE6\x9E\x9A",
+ "\x96\x88"=>"\xE6\xAF\x8E",
+ "\x96\x89"=>"\xE5\x93\xA9",
+ "\x96\x8A"=>"\xE6\xA7\x99",
+ "\x96\x8B"=>"\xE5\xB9\x95",
+ "\x96\x8C"=>"\xE8\x86\x9C",
+ "\x96\x8D"=>"\xE6\x9E\x95",
+ "\x96\x8E"=>"\xE9\xAE\xAA",
+ "\x96\x8F"=>"\xE6\x9F\xBE",
+ "\x96\x90"=>"\xE9\xB1\x92",
+ "\x96\x91"=>"\xE6\xA1\x9D",
+ "\x96\x92"=>"\xE4\xBA\xA6",
+ "\x96\x93"=>"\xE4\xBF\xA3",
+ "\x96\x94"=>"\xE5\x8F\x88",
+ "\x96\x95"=>"\xE6\x8A\xB9",
+ "\x96\x96"=>"\xE6\x9C\xAB",
+ "\x96\x97"=>"\xE6\xB2\xAB",
+ "\x96\x98"=>"\xE8\xBF\x84",
+ "\x96\x99"=>"\xE4\xBE\xAD",
+ "\x96\x9A"=>"\xE7\xB9\xAD",
+ "\x96\x9B"=>"\xE9\xBA\xBF",
+ "\x96\x9C"=>"\xE4\xB8\x87",
+ "\x96\x9D"=>"\xE6\x85\xA2",
+ "\x96\x9E"=>"\xE6\xBA\x80",
+ "\x96\x9F"=>"\xE6\xBC\xAB",
+ "\x96\xA0"=>"\xE8\x94\x93",
+ "\x96\xA1"=>"\xE5\x91\xB3",
+ "\x96\xA2"=>"\xE6\x9C\xAA",
+ "\x96\xA3"=>"\xE9\xAD\x85",
+ "\x96\xA4"=>"\xE5\xB7\xB3",
+ "\x96\xA5"=>"\xE7\xAE\x95",
+ "\x96\xA6"=>"\xE5\xB2\xAC",
+ "\x96\xA7"=>"\xE5\xAF\x86",
+ "\x96\xA8"=>"\xE8\x9C\x9C",
+ "\x96\xA9"=>"\xE6\xB9\x8A",
+ "\x96\xAA"=>"\xE8\x93\x91",
+ "\x96\xAB"=>"\xE7\xA8\x94",
+ "\x96\xAC"=>"\xE8\x84\x88",
+ "\x96\xAD"=>"\xE5\xA6\x99",
+ "\x96\xAE"=>"\xE7\xB2\x8D",
+ "\x96\xAF"=>"\xE6\xB0\x91",
+ "\x96\xB0"=>"\xE7\x9C\xA0",
+ "\x96\xB1"=>"\xE5\x8B\x99",
+ "\x96\xB2"=>"\xE5\xA4\xA2",
+ "\x96\xB3"=>"\xE7\x84\xA1",
+ "\x96\xB4"=>"\xE7\x89\x9F",
+ "\x96\xB5"=>"\xE7\x9F\x9B",
+ "\x96\xB6"=>"\xE9\x9C\xA7",
+ "\x96\xB7"=>"\xE9\xB5\xA1",
+ "\x96\xB8"=>"\xE6\xA4\x8B",
+ "\x96\xB9"=>"\xE5\xA9\xBF",
+ "\x96\xBA"=>"\xE5\xA8\x98",
+ "\x96\xBB"=>"\xE5\x86\xA5",
+ "\x96\xBC"=>"\xE5\x90\x8D",
+ "\x96\xBD"=>"\xE5\x91\xBD",
+ "\x96\xBE"=>"\xE6\x98\x8E",
+ "\x96\xBF"=>"\xE7\x9B\x9F",
+ "\x96\xC0"=>"\xE8\xBF\xB7",
+ "\x96\xC1"=>"\xE9\x8A\x98",
+ "\x96\xC2"=>"\xE9\xB3\xB4",
+ "\x96\xC3"=>"\xE5\xA7\xAA",
+ "\x96\xC4"=>"\xE7\x89\x9D",
+ "\x96\xC5"=>"\xE6\xBB\x85",
+ "\x96\xC6"=>"\xE5\x85\x8D",
+ "\x96\xC7"=>"\xE6\xA3\x89",
+ "\x96\xC8"=>"\xE7\xB6\xBF",
+ "\x96\xC9"=>"\xE7\xB7\xAC",
+ "\x96\xCA"=>"\xE9\x9D\xA2",
+ "\x96\xCB"=>"\xE9\xBA\xBA",
+ "\x96\xCC"=>"\xE6\x91\xB8",
+ "\x96\xCD"=>"\xE6\xA8\xA1",
+ "\x96\xCE"=>"\xE8\x8C\x82",
+ "\x96\xCF"=>"\xE5\xA6\x84",
+ "\x96\xD0"=>"\xE5\xAD\x9F",
+ "\x96\xD1"=>"\xE6\xAF\x9B",
+ "\x96\xD2"=>"\xE7\x8C\x9B",
+ "\x96\xD3"=>"\xE7\x9B\xB2",
+ "\x96\xD4"=>"\xE7\xB6\xB2",
+ "\x96\xD5"=>"\xE8\x80\x97",
+ "\x96\xD6"=>"\xE8\x92\x99",
+ "\x96\xD7"=>"\xE5\x84\xB2",
+ "\x96\xD8"=>"\xE6\x9C\xA8",
+ "\x96\xD9"=>"\xE9\xBB\x99",
+ "\x96\xDA"=>"\xE7\x9B\xAE",
+ "\x96\xDB"=>"\xE6\x9D\xA2",
+ "\x96\xDC"=>"\xE5\x8B\xBF",
+ "\x96\xDD"=>"\xE9\xA4\x85",
+ "\x96\xDE"=>"\xE5\xB0\xA4",
+ "\x96\xDF"=>"\xE6\x88\xBB",
+ "\x96\xE0"=>"\xE7\xB1\xBE",
+ "\x96\xE1"=>"\xE8\xB2\xB0",
+ "\x96\xE2"=>"\xE5\x95\x8F",
+ "\x96\xE3"=>"\xE6\x82\xB6",
+ "\x96\xE4"=>"\xE7\xB4\x8B",
+ "\x96\xE5"=>"\xE9\x96\x80",
+ "\x96\xE6"=>"\xE5\x8C\x81",
+ "\x96\xE7"=>"\xE4\xB9\x9F",
+ "\x96\xE8"=>"\xE5\x86\xB6",
+ "\x96\xE9"=>"\xE5\xA4\x9C",
+ "\x96\xEA"=>"\xE7\x88\xBA",
+ "\x96\xEB"=>"\xE8\x80\xB6",
+ "\x96\xEC"=>"\xE9\x87\x8E",
+ "\x96\xED"=>"\xE5\xBC\xA5",
+ "\x96\xEE"=>"\xE7\x9F\xA2",
+ "\x96\xEF"=>"\xE5\x8E\x84",
+ "\x96\xF0"=>"\xE5\xBD\xB9",
+ "\x96\xF1"=>"\xE7\xB4\x84",
+ "\x96\xF2"=>"\xE8\x96\xAC",
+ "\x96\xF3"=>"\xE8\xA8\xB3",
+ "\x96\xF4"=>"\xE8\xBA\x8D",
+ "\x96\xF5"=>"\xE9\x9D\x96",
+ "\x96\xF6"=>"\xE6\x9F\xB3",
+ "\x96\xF7"=>"\xE8\x96\xAE",
+ "\x96\xF8"=>"\xE9\x91\x93",
+ "\x96\xF9"=>"\xE6\x84\x89",
+ "\x96\xFA"=>"\xE6\x84\x88",
+ "\x96\xFB"=>"\xE6\xB2\xB9",
+ "\x96\xFC"=>"\xE7\x99\x92",
+ "\x97\x40"=>"\xE8\xAB\xAD",
+ "\x97\x41"=>"\xE8\xBC\xB8",
+ "\x97\x42"=>"\xE5\x94\xAF",
+ "\x97\x43"=>"\xE4\xBD\x91",
+ "\x97\x44"=>"\xE5\x84\xAA",
+ "\x97\x45"=>"\xE5\x8B\x87",
+ "\x97\x46"=>"\xE5\x8F\x8B",
+ "\x97\x47"=>"\xE5\xAE\xA5",
+ "\x97\x48"=>"\xE5\xB9\xBD",
+ "\x97\x49"=>"\xE6\x82\xA0",
+ "\x97\x4A"=>"\xE6\x86\x82",
+ "\x97\x4B"=>"\xE6\x8F\x96",
+ "\x97\x4C"=>"\xE6\x9C\x89",
+ "\x97\x4D"=>"\xE6\x9F\x9A",
+ "\x97\x4E"=>"\xE6\xB9\xA7",
+ "\x97\x4F"=>"\xE6\xB6\x8C",
+ "\x97\x50"=>"\xE7\x8C\xB6",
+ "\x97\x51"=>"\xE7\x8C\xB7",
+ "\x97\x52"=>"\xE7\x94\xB1",
+ "\x97\x53"=>"\xE7\xA5\x90",
+ "\x97\x54"=>"\xE8\xA3\x95",
+ "\x97\x55"=>"\xE8\xAA\x98",
+ "\x97\x56"=>"\xE9\x81\x8A",
+ "\x97\x57"=>"\xE9\x82\x91",
+ "\x97\x58"=>"\xE9\x83\xB5",
+ "\x97\x59"=>"\xE9\x9B\x84",
+ "\x97\x5A"=>"\xE8\x9E\x8D",
+ "\x97\x5B"=>"\xE5\xA4\x95",
+ "\x97\x5C"=>"\xE4\xBA\x88",
+ "\x97\x5D"=>"\xE4\xBD\x99",
+ "\x97\x5E"=>"\xE4\xB8\x8E",
+ "\x97\x5F"=>"\xE8\xAA\x89",
+ "\x97\x60"=>"\xE8\xBC\xBF",
+ "\x97\x61"=>"\xE9\xA0\x90",
+ "\x97\x62"=>"\xE5\x82\xAD",
+ "\x97\x63"=>"\xE5\xB9\xBC",
+ "\x97\x64"=>"\xE5\xA6\x96",
+ "\x97\x65"=>"\xE5\xAE\xB9",
+ "\x97\x66"=>"\xE5\xBA\xB8",
+ "\x97\x67"=>"\xE6\x8F\x9A",
+ "\x97\x68"=>"\xE6\x8F\xBA",
+ "\x97\x69"=>"\xE6\x93\x81",
+ "\x97\x6A"=>"\xE6\x9B\x9C",
+ "\x97\x6B"=>"\xE6\xA5\x8A",
+ "\x97\x6C"=>"\xE6\xA7\x98",
+ "\x97\x6D"=>"\xE6\xB4\x8B",
+ "\x97\x6E"=>"\xE6\xBA\xB6",
+ "\x97\x6F"=>"\xE7\x86\x94",
+ "\x97\x70"=>"\xE7\x94\xA8",
+ "\x97\x71"=>"\xE7\xAA\xAF",
+ "\x97\x72"=>"\xE7\xBE\x8A",
+ "\x97\x73"=>"\xE8\x80\x80",
+ "\x97\x74"=>"\xE8\x91\x89",
+ "\x97\x75"=>"\xE8\x93\x89",
+ "\x97\x76"=>"\xE8\xA6\x81",
+ "\x97\x77"=>"\xE8\xAC\xA1",
+ "\x97\x78"=>"\xE8\xB8\x8A",
+ "\x97\x79"=>"\xE9\x81\xA5",
+ "\x97\x7A"=>"\xE9\x99\xBD",
+ "\x97\x7B"=>"\xE9\xA4\x8A",
+ "\x97\x7C"=>"\xE6\x85\xBE",
+ "\x97\x7D"=>"\xE6\x8A\x91",
+ "\x97\x7E"=>"\xE6\xAC\xB2",
+ "\x97\x80"=>"\xE6\xB2\x83",
+ "\x97\x81"=>"\xE6\xB5\xB4",
+ "\x97\x82"=>"\xE7\xBF\x8C",
+ "\x97\x83"=>"\xE7\xBF\xBC",
+ "\x97\x84"=>"\xE6\xB7\x80",
+ "\x97\x85"=>"\xE7\xBE\x85",
+ "\x97\x86"=>"\xE8\x9E\xBA",
+ "\x97\x87"=>"\xE8\xA3\xB8",
+ "\x97\x88"=>"\xE6\x9D\xA5",
+ "\x97\x89"=>"\xE8\x8E\xB1",
+ "\x97\x8A"=>"\xE9\xA0\xBC",
+ "\x97\x8B"=>"\xE9\x9B\xB7",
+ "\x97\x8C"=>"\xE6\xB4\x9B",
+ "\x97\x8D"=>"\xE7\xB5\xA1",
+ "\x97\x8E"=>"\xE8\x90\xBD",
+ "\x97\x8F"=>"\xE9\x85\xAA",
+ "\x97\x90"=>"\xE4\xB9\xB1",
+ "\x97\x91"=>"\xE5\x8D\xB5",
+ "\x97\x92"=>"\xE5\xB5\x90",
+ "\x97\x93"=>"\xE6\xAC\x84",
+ "\x97\x94"=>"\xE6\xBF\xAB",
+ "\x97\x95"=>"\xE8\x97\x8D",
+ "\x97\x96"=>"\xE8\x98\xAD",
+ "\x97\x97"=>"\xE8\xA6\xA7",
+ "\x97\x98"=>"\xE5\x88\xA9",
+ "\x97\x99"=>"\xE5\x90\x8F",
+ "\x97\x9A"=>"\xE5\xB1\xA5",
+ "\x97\x9B"=>"\xE6\x9D\x8E",
+ "\x97\x9C"=>"\xE6\xA2\xA8",
+ "\x97\x9D"=>"\xE7\x90\x86",
+ "\x97\x9E"=>"\xE7\x92\x83",
+ "\x97\x9F"=>"\xE7\x97\xA2",
+ "\x97\xA0"=>"\xE8\xA3\x8F",
+ "\x97\xA1"=>"\xE8\xA3\xA1",
+ "\x97\xA2"=>"\xE9\x87\x8C",
+ "\x97\xA3"=>"\xE9\x9B\xA2",
+ "\x97\xA4"=>"\xE9\x99\xB8",
+ "\x97\xA5"=>"\xE5\xBE\x8B",
+ "\x97\xA6"=>"\xE7\x8E\x87",
+ "\x97\xA7"=>"\xE7\xAB\x8B",
+ "\x97\xA8"=>"\xE8\x91\x8E",
+ "\x97\xA9"=>"\xE6\x8E\xA0",
+ "\x97\xAA"=>"\xE7\x95\xA5",
+ "\x97\xAB"=>"\xE5\x8A\x89",
+ "\x97\xAC"=>"\xE6\xB5\x81",
+ "\x97\xAD"=>"\xE6\xBA\x9C",
+ "\x97\xAE"=>"\xE7\x90\x89",
+ "\x97\xAF"=>"\xE7\x95\x99",
+ "\x97\xB0"=>"\xE7\xA1\xAB",
+ "\x97\xB1"=>"\xE7\xB2\x92",
+ "\x97\xB2"=>"\xE9\x9A\x86",
+ "\x97\xB3"=>"\xE7\xAB\x9C",
+ "\x97\xB4"=>"\xE9\xBE\x8D",
+ "\x97\xB5"=>"\xE4\xBE\xB6",
+ "\x97\xB6"=>"\xE6\x85\xAE",
+ "\x97\xB7"=>"\xE6\x97\x85",
+ "\x97\xB8"=>"\xE8\x99\x9C",
+ "\x97\xB9"=>"\xE4\xBA\x86",
+ "\x97\xBA"=>"\xE4\xBA\xAE",
+ "\x97\xBB"=>"\xE5\x83\x9A",
+ "\x97\xBC"=>"\xE4\xB8\xA1",
+ "\x97\xBD"=>"\xE5\x87\x8C",
+ "\x97\xBE"=>"\xE5\xAF\xAE",
+ "\x97\xBF"=>"\xE6\x96\x99",
+ "\x97\xC0"=>"\xE6\xA2\x81",
+ "\x97\xC1"=>"\xE6\xB6\xBC",
+ "\x97\xC2"=>"\xE7\x8C\x9F",
+ "\x97\xC3"=>"\xE7\x99\x82",
+ "\x97\xC4"=>"\xE7\x9E\xAD",
+ "\x97\xC5"=>"\xE7\xA8\x9C",
+ "\x97\xC6"=>"\xE7\xB3\xA7",
+ "\x97\xC7"=>"\xE8\x89\xAF",
+ "\x97\xC8"=>"\xE8\xAB\x92",
+ "\x97\xC9"=>"\xE9\x81\xBC",
+ "\x97\xCA"=>"\xE9\x87\x8F",
+ "\x97\xCB"=>"\xE9\x99\xB5",
+ "\x97\xCC"=>"\xE9\xA0\x98",
+ "\x97\xCD"=>"\xE5\x8A\x9B",
+ "\x97\xCE"=>"\xE7\xB7\x91",
+ "\x97\xCF"=>"\xE5\x80\xAB",
+ "\x97\xD0"=>"\xE5\x8E\x98",
+ "\x97\xD1"=>"\xE6\x9E\x97",
+ "\x97\xD2"=>"\xE6\xB7\x8B",
+ "\x97\xD3"=>"\xE7\x87\x90",
+ "\x97\xD4"=>"\xE7\x90\xB3",
+ "\x97\xD5"=>"\xE8\x87\xA8",
+ "\x97\xD6"=>"\xE8\xBC\xAA",
+ "\x97\xD7"=>"\xE9\x9A\xA3",
+ "\x97\xD8"=>"\xE9\xB1\x97",
+ "\x97\xD9"=>"\xE9\xBA\x9F",
+ "\x97\xDA"=>"\xE7\x91\xA0",
+ "\x97\xDB"=>"\xE5\xA1\x81",
+ "\x97\xDC"=>"\xE6\xB6\x99",
+ "\x97\xDD"=>"\xE7\xB4\xAF",
+ "\x97\xDE"=>"\xE9\xA1\x9E",
+ "\x97\xDF"=>"\xE4\xBB\xA4",
+ "\x97\xE0"=>"\xE4\xBC\xB6",
+ "\x97\xE1"=>"\xE4\xBE\x8B",
+ "\x97\xE2"=>"\xE5\x86\xB7",
+ "\x97\xE3"=>"\xE5\x8A\xB1",
+ "\x97\xE4"=>"\xE5\xB6\xBA",
+ "\x97\xE5"=>"\xE6\x80\x9C",
+ "\x97\xE6"=>"\xE7\x8E\xB2",
+ "\x97\xE7"=>"\xE7\xA4\xBC",
+ "\x97\xE8"=>"\xE8\x8B\x93",
+ "\x97\xE9"=>"\xE9\x88\xB4",
+ "\x97\xEA"=>"\xE9\x9A\xB7",
+ "\x97\xEB"=>"\xE9\x9B\xB6",
+ "\x97\xEC"=>"\xE9\x9C\x8A",
+ "\x97\xED"=>"\xE9\xBA\x97",
+ "\x97\xEE"=>"\xE9\xBD\xA2",
+ "\x97\xEF"=>"\xE6\x9A\xA6",
+ "\x97\xF0"=>"\xE6\xAD\xB4",
+ "\x97\xF1"=>"\xE5\x88\x97",
+ "\x97\xF2"=>"\xE5\x8A\xA3",
+ "\x97\xF3"=>"\xE7\x83\x88",
+ "\x97\xF4"=>"\xE8\xA3\x82",
+ "\x97\xF5"=>"\xE5\xBB\x89",
+ "\x97\xF6"=>"\xE6\x81\x8B",
+ "\x97\xF7"=>"\xE6\x86\x90",
+ "\x97\xF8"=>"\xE6\xBC\xA3",
+ "\x97\xF9"=>"\xE7\x85\x89",
+ "\x97\xFA"=>"\xE7\xB0\xBE",
+ "\x97\xFB"=>"\xE7\xB7\xB4",
+ "\x97\xFC"=>"\xE8\x81\xAF",
+ "\x98\x40"=>"\xE8\x93\xAE",
+ "\x98\x41"=>"\xE9\x80\xA3",
+ "\x98\x42"=>"\xE9\x8C\xAC",
+ "\x98\x43"=>"\xE5\x91\x82",
+ "\x98\x44"=>"\xE9\xAD\xAF",
+ "\x98\x45"=>"\xE6\xAB\x93",
+ "\x98\x46"=>"\xE7\x82\x89",
+ "\x98\x47"=>"\xE8\xB3\x82",
+ "\x98\x48"=>"\xE8\xB7\xAF",
+ "\x98\x49"=>"\xE9\x9C\xB2",
+ "\x98\x4A"=>"\xE5\x8A\xB4",
+ "\x98\x4B"=>"\xE5\xA9\x81",
+ "\x98\x4C"=>"\xE5\xBB\x8A",
+ "\x98\x4D"=>"\xE5\xBC\x84",
+ "\x98\x4E"=>"\xE6\x9C\x97",
+ "\x98\x4F"=>"\xE6\xA5\xBC",
+ "\x98\x50"=>"\xE6\xA6\x94",
+ "\x98\x51"=>"\xE6\xB5\xAA",
+ "\x98\x52"=>"\xE6\xBC\x8F",
+ "\x98\x53"=>"\xE7\x89\xA2",
+ "\x98\x54"=>"\xE7\x8B\xBC",
+ "\x98\x55"=>"\xE7\xAF\xAD",
+ "\x98\x56"=>"\xE8\x80\x81",
+ "\x98\x57"=>"\xE8\x81\xBE",
+ "\x98\x58"=>"\xE8\x9D\x8B",
+ "\x98\x59"=>"\xE9\x83\x8E",
+ "\x98\x5A"=>"\xE5\x85\xAD",
+ "\x98\x5B"=>"\xE9\xBA\x93",
+ "\x98\x5C"=>"\xE7\xA6\x84",
+ "\x98\x5D"=>"\xE8\x82\x8B",
+ "\x98\x5E"=>"\xE9\x8C\xB2",
+ "\x98\x5F"=>"\xE8\xAB\x96",
+ "\x98\x60"=>"\xE5\x80\xAD",
+ "\x98\x61"=>"\xE5\x92\x8C",
+ "\x98\x62"=>"\xE8\xA9\xB1",
+ "\x98\x63"=>"\xE6\xAD\xAA",
+ "\x98\x64"=>"\xE8\xB3\x84",
+ "\x98\x65"=>"\xE8\x84\x87",
+ "\x98\x66"=>"\xE6\x83\x91",
+ "\x98\x67"=>"\xE6\x9E\xA0",
+ "\x98\x68"=>"\xE9\xB7\xB2",
+ "\x98\x69"=>"\xE4\xBA\x99",
+ "\x98\x6A"=>"\xE4\xBA\x98",
+ "\x98\x6B"=>"\xE9\xB0\x90",
+ "\x98\x6C"=>"\xE8\xA9\xAB",
+ "\x98\x6D"=>"\xE8\x97\x81",
+ "\x98\x6E"=>"\xE8\x95\xA8",
+ "\x98\x6F"=>"\xE6\xA4\x80",
+ "\x98\x70"=>"\xE6\xB9\xBE",
+ "\x98\x71"=>"\xE7\xA2\x97",
+ "\x98\x72"=>"\xE8\x85\x95",
+ "\x98\x9F"=>"\xE5\xBC\x8C",
+ "\x98\xA0"=>"\xE4\xB8\x90",
+ "\x98\xA1"=>"\xE4\xB8\x95",
+ "\x98\xA2"=>"\xE4\xB8\xAA",
+ "\x98\xA3"=>"\xE4\xB8\xB1",
+ "\x98\xA4"=>"\xE4\xB8\xB6",
+ "\x98\xA5"=>"\xE4\xB8\xBC",
+ "\x98\xA6"=>"\xE4\xB8\xBF",
+ "\x98\xA7"=>"\xE4\xB9\x82",
+ "\x98\xA8"=>"\xE4\xB9\x96",
+ "\x98\xA9"=>"\xE4\xB9\x98",
+ "\x98\xAA"=>"\xE4\xBA\x82",
+ "\x98\xAB"=>"\xE4\xBA\x85",
+ "\x98\xAC"=>"\xE8\xB1\xAB",
+ "\x98\xAD"=>"\xE4\xBA\x8A",
+ "\x98\xAE"=>"\xE8\x88\x92",
+ "\x98\xAF"=>"\xE5\xBC\x8D",
+ "\x98\xB0"=>"\xE4\xBA\x8E",
+ "\x98\xB1"=>"\xE4\xBA\x9E",
+ "\x98\xB2"=>"\xE4\xBA\x9F",
+ "\x98\xB3"=>"\xE4\xBA\xA0",
+ "\x98\xB4"=>"\xE4\xBA\xA2",
+ "\x98\xB5"=>"\xE4\xBA\xB0",
+ "\x98\xB6"=>"\xE4\xBA\xB3",
+ "\x98\xB7"=>"\xE4\xBA\xB6",
+ "\x98\xB8"=>"\xE4\xBB\x8E",
+ "\x98\xB9"=>"\xE4\xBB\x8D",
+ "\x98\xBA"=>"\xE4\xBB\x84",
+ "\x98\xBB"=>"\xE4\xBB\x86",
+ "\x98\xBC"=>"\xE4\xBB\x82",
+ "\x98\xBD"=>"\xE4\xBB\x97",
+ "\x98\xBE"=>"\xE4\xBB\x9E",
+ "\x98\xBF"=>"\xE4\xBB\xAD",
+ "\x98\xC0"=>"\xE4\xBB\x9F",
+ "\x98\xC1"=>"\xE4\xBB\xB7",
+ "\x98\xC2"=>"\xE4\xBC\x89",
+ "\x98\xC3"=>"\xE4\xBD\x9A",
+ "\x98\xC4"=>"\xE4\xBC\xB0",
+ "\x98\xC5"=>"\xE4\xBD\x9B",
+ "\x98\xC6"=>"\xE4\xBD\x9D",
+ "\x98\xC7"=>"\xE4\xBD\x97",
+ "\x98\xC8"=>"\xE4\xBD\x87",
+ "\x98\xC9"=>"\xE4\xBD\xB6",
+ "\x98\xCA"=>"\xE4\xBE\x88",
+ "\x98\xCB"=>"\xE4\xBE\x8F",
+ "\x98\xCC"=>"\xE4\xBE\x98",
+ "\x98\xCD"=>"\xE4\xBD\xBB",
+ "\x98\xCE"=>"\xE4\xBD\xA9",
+ "\x98\xCF"=>"\xE4\xBD\xB0",
+ "\x98\xD0"=>"\xE4\xBE\x91",
+ "\x98\xD1"=>"\xE4\xBD\xAF",
+ "\x98\xD2"=>"\xE4\xBE\x86",
+ "\x98\xD3"=>"\xE4\xBE\x96",
+ "\x98\xD4"=>"\xE5\x84\x98",
+ "\x98\xD5"=>"\xE4\xBF\x94",
+ "\x98\xD6"=>"\xE4\xBF\x9F",
+ "\x98\xD7"=>"\xE4\xBF\x8E",
+ "\x98\xD8"=>"\xE4\xBF\x98",
+ "\x98\xD9"=>"\xE4\xBF\x9B",
+ "\x98\xDA"=>"\xE4\xBF\x91",
+ "\x98\xDB"=>"\xE4\xBF\x9A",
+ "\x98\xDC"=>"\xE4\xBF\x90",
+ "\x98\xDD"=>"\xE4\xBF\xA4",
+ "\x98\xDE"=>"\xE4\xBF\xA5",
+ "\x98\xDF"=>"\xE5\x80\x9A",
+ "\x98\xE0"=>"\xE5\x80\xA8",
+ "\x98\xE1"=>"\xE5\x80\x94",
+ "\x98\xE2"=>"\xE5\x80\xAA",
+ "\x98\xE3"=>"\xE5\x80\xA5",
+ "\x98\xE4"=>"\xE5\x80\x85",
+ "\x98\xE5"=>"\xE4\xBC\x9C",
+ "\x98\xE6"=>"\xE4\xBF\xB6",
+ "\x98\xE7"=>"\xE5\x80\xA1",
+ "\x98\xE8"=>"\xE5\x80\xA9",
+ "\x98\xE9"=>"\xE5\x80\xAC",
+ "\x98\xEA"=>"\xE4\xBF\xBE",
+ "\x98\xEB"=>"\xE4\xBF\xAF",
+ "\x98\xEC"=>"\xE5\x80\x91",
+ "\x98\xED"=>"\xE5\x80\x86",
+ "\x98\xEE"=>"\xE5\x81\x83",
+ "\x98\xEF"=>"\xE5\x81\x87",
+ "\x98\xF0"=>"\xE6\x9C\x83",
+ "\x98\xF1"=>"\xE5\x81\x95",
+ "\x98\xF2"=>"\xE5\x81\x90",
+ "\x98\xF3"=>"\xE5\x81\x88",
+ "\x98\xF4"=>"\xE5\x81\x9A",
+ "\x98\xF5"=>"\xE5\x81\x96",
+ "\x98\xF6"=>"\xE5\x81\xAC",
+ "\x98\xF7"=>"\xE5\x81\xB8",
+ "\x98\xF8"=>"\xE5\x82\x80",
+ "\x98\xF9"=>"\xE5\x82\x9A",
+ "\x98\xFA"=>"\xE5\x82\x85",
+ "\x98\xFB"=>"\xE5\x82\xB4",
+ "\x98\xFC"=>"\xE5\x82\xB2",
+ "\x99\x40"=>"\xE5\x83\x89",
+ "\x99\x41"=>"\xE5\x83\x8A",
+ "\x99\x42"=>"\xE5\x82\xB3",
+ "\x99\x43"=>"\xE5\x83\x82",
+ "\x99\x44"=>"\xE5\x83\x96",
+ "\x99\x45"=>"\xE5\x83\x9E",
+ "\x99\x46"=>"\xE5\x83\xA5",
+ "\x99\x47"=>"\xE5\x83\xAD",
+ "\x99\x48"=>"\xE5\x83\xA3",
+ "\x99\x49"=>"\xE5\x83\xAE",
+ "\x99\x4A"=>"\xE5\x83\xB9",
+ "\x99\x4B"=>"\xE5\x83\xB5",
+ "\x99\x4C"=>"\xE5\x84\x89",
+ "\x99\x4D"=>"\xE5\x84\x81",
+ "\x99\x4E"=>"\xE5\x84\x82",
+ "\x99\x4F"=>"\xE5\x84\x96",
+ "\x99\x50"=>"\xE5\x84\x95",
+ "\x99\x51"=>"\xE5\x84\x94",
+ "\x99\x52"=>"\xE5\x84\x9A",
+ "\x99\x53"=>"\xE5\x84\xA1",
+ "\x99\x54"=>"\xE5\x84\xBA",
+ "\x99\x55"=>"\xE5\x84\xB7",
+ "\x99\x56"=>"\xE5\x84\xBC",
+ "\x99\x57"=>"\xE5\x84\xBB",
+ "\x99\x58"=>"\xE5\x84\xBF",
+ "\x99\x59"=>"\xE5\x85\x80",
+ "\x99\x5A"=>"\xE5\x85\x92",
+ "\x99\x5B"=>"\xE5\x85\x8C",
+ "\x99\x5C"=>"\xE5\x85\x94",
+ "\x99\x5D"=>"\xE5\x85\xA2",
+ "\x99\x5E"=>"\xE7\xAB\xB8",
+ "\x99\x5F"=>"\xE5\x85\xA9",
+ "\x99\x60"=>"\xE5\x85\xAA",
+ "\x99\x61"=>"\xE5\x85\xAE",
+ "\x99\x62"=>"\xE5\x86\x80",
+ "\x99\x63"=>"\xE5\x86\x82",
+ "\x99\x64"=>"\xE5\x9B\x98",
+ "\x99\x65"=>"\xE5\x86\x8C",
+ "\x99\x66"=>"\xE5\x86\x89",
+ "\x99\x67"=>"\xE5\x86\x8F",
+ "\x99\x68"=>"\xE5\x86\x91",
+ "\x99\x69"=>"\xE5\x86\x93",
+ "\x99\x6A"=>"\xE5\x86\x95",
+ "\x99\x6B"=>"\xE5\x86\x96",
+ "\x99\x6C"=>"\xE5\x86\xA4",
+ "\x99\x6D"=>"\xE5\x86\xA6",
+ "\x99\x6E"=>"\xE5\x86\xA2",
+ "\x99\x6F"=>"\xE5\x86\xA9",
+ "\x99\x70"=>"\xE5\x86\xAA",
+ "\x99\x71"=>"\xE5\x86\xAB",
+ "\x99\x72"=>"\xE5\x86\xB3",
+ "\x99\x73"=>"\xE5\x86\xB1",
+ "\x99\x74"=>"\xE5\x86\xB2",
+ "\x99\x75"=>"\xE5\x86\xB0",
+ "\x99\x76"=>"\xE5\x86\xB5",
+ "\x99\x77"=>"\xE5\x86\xBD",
+ "\x99\x78"=>"\xE5\x87\x85",
+ "\x99\x79"=>"\xE5\x87\x89",
+ "\x99\x7A"=>"\xE5\x87\x9B",
+ "\x99\x7B"=>"\xE5\x87\xA0",
+ "\x99\x7C"=>"\xE8\x99\x95",
+ "\x99\x7D"=>"\xE5\x87\xA9",
+ "\x99\x7E"=>"\xE5\x87\xAD",
+ "\x99\x80"=>"\xE5\x87\xB0",
+ "\x99\x81"=>"\xE5\x87\xB5",
+ "\x99\x82"=>"\xE5\x87\xBE",
+ "\x99\x83"=>"\xE5\x88\x84",
+ "\x99\x84"=>"\xE5\x88\x8B",
+ "\x99\x85"=>"\xE5\x88\x94",
+ "\x99\x86"=>"\xE5\x88\x8E",
+ "\x99\x87"=>"\xE5\x88\xA7",
+ "\x99\x88"=>"\xE5\x88\xAA",
+ "\x99\x89"=>"\xE5\x88\xAE",
+ "\x99\x8A"=>"\xE5\x88\xB3",
+ "\x99\x8B"=>"\xE5\x88\xB9",
+ "\x99\x8C"=>"\xE5\x89\x8F",
+ "\x99\x8D"=>"\xE5\x89\x84",
+ "\x99\x8E"=>"\xE5\x89\x8B",
+ "\x99\x8F"=>"\xE5\x89\x8C",
+ "\x99\x90"=>"\xE5\x89\x9E",
+ "\x99\x91"=>"\xE5\x89\x94",
+ "\x99\x92"=>"\xE5\x89\xAA",
+ "\x99\x93"=>"\xE5\x89\xB4",
+ "\x99\x94"=>"\xE5\x89\xA9",
+ "\x99\x95"=>"\xE5\x89\xB3",
+ "\x99\x96"=>"\xE5\x89\xBF",
+ "\x99\x97"=>"\xE5\x89\xBD",
+ "\x99\x98"=>"\xE5\x8A\x8D",
+ "\x99\x99"=>"\xE5\x8A\x94",
+ "\x99\x9A"=>"\xE5\x8A\x92",
+ "\x99\x9B"=>"\xE5\x89\xB1",
+ "\x99\x9C"=>"\xE5\x8A\x88",
+ "\x99\x9D"=>"\xE5\x8A\x91",
+ "\x99\x9E"=>"\xE8\xBE\xA8",
+ "\x99\x9F"=>"\xE8\xBE\xA7",
+ "\x99\xA0"=>"\xE5\x8A\xAC",
+ "\x99\xA1"=>"\xE5\x8A\xAD",
+ "\x99\xA2"=>"\xE5\x8A\xBC",
+ "\x99\xA3"=>"\xE5\x8A\xB5",
+ "\x99\xA4"=>"\xE5\x8B\x81",
+ "\x99\xA5"=>"\xE5\x8B\x8D",
+ "\x99\xA6"=>"\xE5\x8B\x97",
+ "\x99\xA7"=>"\xE5\x8B\x9E",
+ "\x99\xA8"=>"\xE5\x8B\xA3",
+ "\x99\xA9"=>"\xE5\x8B\xA6",
+ "\x99\xAA"=>"\xE9\xA3\xAD",
+ "\x99\xAB"=>"\xE5\x8B\xA0",
+ "\x99\xAC"=>"\xE5\x8B\xB3",
+ "\x99\xAD"=>"\xE5\x8B\xB5",
+ "\x99\xAE"=>"\xE5\x8B\xB8",
+ "\x99\xAF"=>"\xE5\x8B\xB9",
+ "\x99\xB0"=>"\xE5\x8C\x86",
+ "\x99\xB1"=>"\xE5\x8C\x88",
+ "\x99\xB2"=>"\xE7\x94\xB8",
+ "\x99\xB3"=>"\xE5\x8C\x8D",
+ "\x99\xB4"=>"\xE5\x8C\x90",
+ "\x99\xB5"=>"\xE5\x8C\x8F",
+ "\x99\xB6"=>"\xE5\x8C\x95",
+ "\x99\xB7"=>"\xE5\x8C\x9A",
+ "\x99\xB8"=>"\xE5\x8C\xA3",
+ "\x99\xB9"=>"\xE5\x8C\xAF",
+ "\x99\xBA"=>"\xE5\x8C\xB1",
+ "\x99\xBB"=>"\xE5\x8C\xB3",
+ "\x99\xBC"=>"\xE5\x8C\xB8",
+ "\x99\xBD"=>"\xE5\x8D\x80",
+ "\x99\xBE"=>"\xE5\x8D\x86",
+ "\x99\xBF"=>"\xE5\x8D\x85",
+ "\x99\xC0"=>"\xE4\xB8\x97",
+ "\x99\xC1"=>"\xE5\x8D\x89",
+ "\x99\xC2"=>"\xE5\x8D\x8D",
+ "\x99\xC3"=>"\xE5\x87\x96",
+ "\x99\xC4"=>"\xE5\x8D\x9E",
+ "\x99\xC5"=>"\xE5\x8D\xA9",
+ "\x99\xC6"=>"\xE5\x8D\xAE",
+ "\x99\xC7"=>"\xE5\xA4\x98",
+ "\x99\xC8"=>"\xE5\x8D\xBB",
+ "\x99\xC9"=>"\xE5\x8D\xB7",
+ "\x99\xCA"=>"\xE5\x8E\x82",
+ "\x99\xCB"=>"\xE5\x8E\x96",
+ "\x99\xCC"=>"\xE5\x8E\xA0",
+ "\x99\xCD"=>"\xE5\x8E\xA6",
+ "\x99\xCE"=>"\xE5\x8E\xA5",
+ "\x99\xCF"=>"\xE5\x8E\xAE",
+ "\x99\xD0"=>"\xE5\x8E\xB0",
+ "\x99\xD1"=>"\xE5\x8E\xB6",
+ "\x99\xD2"=>"\xE5\x8F\x83",
+ "\x99\xD3"=>"\xE7\xB0\x92",
+ "\x99\xD4"=>"\xE9\x9B\x99",
+ "\x99\xD5"=>"\xE5\x8F\x9F",
+ "\x99\xD6"=>"\xE6\x9B\xBC",
+ "\x99\xD7"=>"\xE7\x87\xAE",
+ "\x99\xD8"=>"\xE5\x8F\xAE",
+ "\x99\xD9"=>"\xE5\x8F\xA8",
+ "\x99\xDA"=>"\xE5\x8F\xAD",
+ "\x99\xDB"=>"\xE5\x8F\xBA",
+ "\x99\xDC"=>"\xE5\x90\x81",
+ "\x99\xDD"=>"\xE5\x90\xBD",
+ "\x99\xDE"=>"\xE5\x91\x80",
+ "\x99\xDF"=>"\xE5\x90\xAC",
+ "\x99\xE0"=>"\xE5\x90\xAD",
+ "\x99\xE1"=>"\xE5\x90\xBC",
+ "\x99\xE2"=>"\xE5\x90\xAE",
+ "\x99\xE3"=>"\xE5\x90\xB6",
+ "\x99\xE4"=>"\xE5\x90\xA9",
+ "\x99\xE5"=>"\xE5\x90\x9D",
+ "\x99\xE6"=>"\xE5\x91\x8E",
+ "\x99\xE7"=>"\xE5\x92\x8F",
+ "\x99\xE8"=>"\xE5\x91\xB5",
+ "\x99\xE9"=>"\xE5\x92\x8E",
+ "\x99\xEA"=>"\xE5\x91\x9F",
+ "\x99\xEB"=>"\xE5\x91\xB1",
+ "\x99\xEC"=>"\xE5\x91\xB7",
+ "\x99\xED"=>"\xE5\x91\xB0",
+ "\x99\xEE"=>"\xE5\x92\x92",
+ "\x99\xEF"=>"\xE5\x91\xBB",
+ "\x99\xF0"=>"\xE5\x92\x80",
+ "\x99\xF1"=>"\xE5\x91\xB6",
+ "\x99\xF2"=>"\xE5\x92\x84",
+ "\x99\xF3"=>"\xE5\x92\x90",
+ "\x99\xF4"=>"\xE5\x92\x86",
+ "\x99\xF5"=>"\xE5\x93\x87",
+ "\x99\xF6"=>"\xE5\x92\xA2",
+ "\x99\xF7"=>"\xE5\x92\xB8",
+ "\x99\xF8"=>"\xE5\x92\xA5",
+ "\x99\xF9"=>"\xE5\x92\xAC",
+ "\x99\xFA"=>"\xE5\x93\x84",
+ "\x99\xFB"=>"\xE5\x93\x88",
+ "\x99\xFC"=>"\xE5\x92\xA8",
+ "\x9A\x40"=>"\xE5\x92\xAB",
+ "\x9A\x41"=>"\xE5\x93\x82",
+ "\x9A\x42"=>"\xE5\x92\xA4",
+ "\x9A\x43"=>"\xE5\x92\xBE",
+ "\x9A\x44"=>"\xE5\x92\xBC",
+ "\x9A\x45"=>"\xE5\x93\x98",
+ "\x9A\x46"=>"\xE5\x93\xA5",
+ "\x9A\x47"=>"\xE5\x93\xA6",
+ "\x9A\x48"=>"\xE5\x94\x8F",
+ "\x9A\x49"=>"\xE5\x94\x94",
+ "\x9A\x4A"=>"\xE5\x93\xBD",
+ "\x9A\x4B"=>"\xE5\x93\xAE",
+ "\x9A\x4C"=>"\xE5\x93\xAD",
+ "\x9A\x4D"=>"\xE5\x93\xBA",
+ "\x9A\x4E"=>"\xE5\x93\xA2",
+ "\x9A\x4F"=>"\xE5\x94\xB9",
+ "\x9A\x50"=>"\xE5\x95\x80",
+ "\x9A\x51"=>"\xE5\x95\xA3",
+ "\x9A\x52"=>"\xE5\x95\x8C",
+ "\x9A\x53"=>"\xE5\x94\xAE",
+ "\x9A\x54"=>"\xE5\x95\x9C",
+ "\x9A\x55"=>"\xE5\x95\x85",
+ "\x9A\x56"=>"\xE5\x95\x96",
+ "\x9A\x57"=>"\xE5\x95\x97",
+ "\x9A\x58"=>"\xE5\x94\xB8",
+ "\x9A\x59"=>"\xE5\x94\xB3",
+ "\x9A\x5A"=>"\xE5\x95\x9D",
+ "\x9A\x5B"=>"\xE5\x96\x99",
+ "\x9A\x5C"=>"\xE5\x96\x80",
+ "\x9A\x5D"=>"\xE5\x92\xAF",
+ "\x9A\x5E"=>"\xE5\x96\x8A",
+ "\x9A\x5F"=>"\xE5\x96\x9F",
+ "\x9A\x60"=>"\xE5\x95\xBB",
+ "\x9A\x61"=>"\xE5\x95\xBE",
+ "\x9A\x62"=>"\xE5\x96\x98",
+ "\x9A\x63"=>"\xE5\x96\x9E",
+ "\x9A\x64"=>"\xE5\x96\xAE",
+ "\x9A\x65"=>"\xE5\x95\xBC",
+ "\x9A\x66"=>"\xE5\x96\x83",
+ "\x9A\x67"=>"\xE5\x96\xA9",
+ "\x9A\x68"=>"\xE5\x96\x87",
+ "\x9A\x69"=>"\xE5\x96\xA8",
+ "\x9A\x6A"=>"\xE5\x97\x9A",
+ "\x9A\x6B"=>"\xE5\x97\x85",
+ "\x9A\x6C"=>"\xE5\x97\x9F",
+ "\x9A\x6D"=>"\xE5\x97\x84",
+ "\x9A\x6E"=>"\xE5\x97\x9C",
+ "\x9A\x6F"=>"\xE5\x97\xA4",
+ "\x9A\x70"=>"\xE5\x97\x94",
+ "\x9A\x71"=>"\xE5\x98\x94",
+ "\x9A\x72"=>"\xE5\x97\xB7",
+ "\x9A\x73"=>"\xE5\x98\x96",
+ "\x9A\x74"=>"\xE5\x97\xBE",
+ "\x9A\x75"=>"\xE5\x97\xBD",
+ "\x9A\x76"=>"\xE5\x98\x9B",
+ "\x9A\x77"=>"\xE5\x97\xB9",
+ "\x9A\x78"=>"\xE5\x99\x8E",
+ "\x9A\x79"=>"\xE5\x99\x90",
+ "\x9A\x7A"=>"\xE7\x87\x9F",
+ "\x9A\x7B"=>"\xE5\x98\xB4",
+ "\x9A\x7C"=>"\xE5\x98\xB6",
+ "\x9A\x7D"=>"\xE5\x98\xB2",
+ "\x9A\x7E"=>"\xE5\x98\xB8",
+ "\x9A\x80"=>"\xE5\x99\xAB",
+ "\x9A\x81"=>"\xE5\x99\xA4",
+ "\x9A\x82"=>"\xE5\x98\xAF",
+ "\x9A\x83"=>"\xE5\x99\xAC",
+ "\x9A\x84"=>"\xE5\x99\xAA",
+ "\x9A\x85"=>"\xE5\x9A\x86",
+ "\x9A\x86"=>"\xE5\x9A\x80",
+ "\x9A\x87"=>"\xE5\x9A\x8A",
+ "\x9A\x88"=>"\xE5\x9A\xA0",
+ "\x9A\x89"=>"\xE5\x9A\x94",
+ "\x9A\x8A"=>"\xE5\x9A\x8F",
+ "\x9A\x8B"=>"\xE5\x9A\xA5",
+ "\x9A\x8C"=>"\xE5\x9A\xAE",
+ "\x9A\x8D"=>"\xE5\x9A\xB6",
+ "\x9A\x8E"=>"\xE5\x9A\xB4",
+ "\x9A\x8F"=>"\xE5\x9B\x82",
+ "\x9A\x90"=>"\xE5\x9A\xBC",
+ "\x9A\x91"=>"\xE5\x9B\x81",
+ "\x9A\x92"=>"\xE5\x9B\x83",
+ "\x9A\x93"=>"\xE5\x9B\x80",
+ "\x9A\x94"=>"\xE5\x9B\x88",
+ "\x9A\x95"=>"\xE5\x9B\x8E",
+ "\x9A\x96"=>"\xE5\x9B\x91",
+ "\x9A\x97"=>"\xE5\x9B\x93",
+ "\x9A\x98"=>"\xE5\x9B\x97",
+ "\x9A\x99"=>"\xE5\x9B\xAE",
+ "\x9A\x9A"=>"\xE5\x9B\xB9",
+ "\x9A\x9B"=>"\xE5\x9C\x80",
+ "\x9A\x9C"=>"\xE5\x9B\xBF",
+ "\x9A\x9D"=>"\xE5\x9C\x84",
+ "\x9A\x9E"=>"\xE5\x9C\x89",
+ "\x9A\x9F"=>"\xE5\x9C\x88",
+ "\x9A\xA0"=>"\xE5\x9C\x8B",
+ "\x9A\xA1"=>"\xE5\x9C\x8D",
+ "\x9A\xA2"=>"\xE5\x9C\x93",
+ "\x9A\xA3"=>"\xE5\x9C\x98",
+ "\x9A\xA4"=>"\xE5\x9C\x96",
+ "\x9A\xA5"=>"\xE5\x97\x87",
+ "\x9A\xA6"=>"\xE5\x9C\x9C",
+ "\x9A\xA7"=>"\xE5\x9C\xA6",
+ "\x9A\xA8"=>"\xE5\x9C\xB7",
+ "\x9A\xA9"=>"\xE5\x9C\xB8",
+ "\x9A\xAA"=>"\xE5\x9D\x8E",
+ "\x9A\xAB"=>"\xE5\x9C\xBB",
+ "\x9A\xAC"=>"\xE5\x9D\x80",
+ "\x9A\xAD"=>"\xE5\x9D\x8F",
+ "\x9A\xAE"=>"\xE5\x9D\xA9",
+ "\x9A\xAF"=>"\xE5\x9F\x80",
+ "\x9A\xB0"=>"\xE5\x9E\x88",
+ "\x9A\xB1"=>"\xE5\x9D\xA1",
+ "\x9A\xB2"=>"\xE5\x9D\xBF",
+ "\x9A\xB3"=>"\xE5\x9E\x89",
+ "\x9A\xB4"=>"\xE5\x9E\x93",
+ "\x9A\xB5"=>"\xE5\x9E\xA0",
+ "\x9A\xB6"=>"\xE5\x9E\xB3",
+ "\x9A\xB7"=>"\xE5\x9E\xA4",
+ "\x9A\xB8"=>"\xE5\x9E\xAA",
+ "\x9A\xB9"=>"\xE5\x9E\xB0",
+ "\x9A\xBA"=>"\xE5\x9F\x83",
+ "\x9A\xBB"=>"\xE5\x9F\x86",
+ "\x9A\xBC"=>"\xE5\x9F\x94",
+ "\x9A\xBD"=>"\xE5\x9F\x92",
+ "\x9A\xBE"=>"\xE5\x9F\x93",
+ "\x9A\xBF"=>"\xE5\xA0\x8A",
+ "\x9A\xC0"=>"\xE5\x9F\x96",
+ "\x9A\xC1"=>"\xE5\x9F\xA3",
+ "\x9A\xC2"=>"\xE5\xA0\x8B",
+ "\x9A\xC3"=>"\xE5\xA0\x99",
+ "\x9A\xC4"=>"\xE5\xA0\x9D",
+ "\x9A\xC5"=>"\xE5\xA1\xB2",
+ "\x9A\xC6"=>"\xE5\xA0\xA1",
+ "\x9A\xC7"=>"\xE5\xA1\xA2",
+ "\x9A\xC8"=>"\xE5\xA1\x8B",
+ "\x9A\xC9"=>"\xE5\xA1\xB0",
+ "\x9A\xCA"=>"\xE6\xAF\x80",
+ "\x9A\xCB"=>"\xE5\xA1\x92",
+ "\x9A\xCC"=>"\xE5\xA0\xBD",
+ "\x9A\xCD"=>"\xE5\xA1\xB9",
+ "\x9A\xCE"=>"\xE5\xA2\x85",
+ "\x9A\xCF"=>"\xE5\xA2\xB9",
+ "\x9A\xD0"=>"\xE5\xA2\x9F",
+ "\x9A\xD1"=>"\xE5\xA2\xAB",
+ "\x9A\xD2"=>"\xE5\xA2\xBA",
+ "\x9A\xD3"=>"\xE5\xA3\x9E",
+ "\x9A\xD4"=>"\xE5\xA2\xBB",
+ "\x9A\xD5"=>"\xE5\xA2\xB8",
+ "\x9A\xD6"=>"\xE5\xA2\xAE",
+ "\x9A\xD7"=>"\xE5\xA3\x85",
+ "\x9A\xD8"=>"\xE5\xA3\x93",
+ "\x9A\xD9"=>"\xE5\xA3\x91",
+ "\x9A\xDA"=>"\xE5\xA3\x97",
+ "\x9A\xDB"=>"\xE5\xA3\x99",
+ "\x9A\xDC"=>"\xE5\xA3\x98",
+ "\x9A\xDD"=>"\xE5\xA3\xA5",
+ "\x9A\xDE"=>"\xE5\xA3\x9C",
+ "\x9A\xDF"=>"\xE5\xA3\xA4",
+ "\x9A\xE0"=>"\xE5\xA3\x9F",
+ "\x9A\xE1"=>"\xE5\xA3\xAF",
+ "\x9A\xE2"=>"\xE5\xA3\xBA",
+ "\x9A\xE3"=>"\xE5\xA3\xB9",
+ "\x9A\xE4"=>"\xE5\xA3\xBB",
+ "\x9A\xE5"=>"\xE5\xA3\xBC",
+ "\x9A\xE6"=>"\xE5\xA3\xBD",
+ "\x9A\xE7"=>"\xE5\xA4\x82",
+ "\x9A\xE8"=>"\xE5\xA4\x8A",
+ "\x9A\xE9"=>"\xE5\xA4\x90",
+ "\x9A\xEA"=>"\xE5\xA4\x9B",
+ "\x9A\xEB"=>"\xE6\xA2\xA6",
+ "\x9A\xEC"=>"\xE5\xA4\xA5",
+ "\x9A\xED"=>"\xE5\xA4\xAC",
+ "\x9A\xEE"=>"\xE5\xA4\xAD",
+ "\x9A\xEF"=>"\xE5\xA4\xB2",
+ "\x9A\xF0"=>"\xE5\xA4\xB8",
+ "\x9A\xF1"=>"\xE5\xA4\xBE",
+ "\x9A\xF2"=>"\xE7\xAB\x92",
+ "\x9A\xF3"=>"\xE5\xA5\x95",
+ "\x9A\xF4"=>"\xE5\xA5\x90",
+ "\x9A\xF5"=>"\xE5\xA5\x8E",
+ "\x9A\xF6"=>"\xE5\xA5\x9A",
+ "\x9A\xF7"=>"\xE5\xA5\x98",
+ "\x9A\xF8"=>"\xE5\xA5\xA2",
+ "\x9A\xF9"=>"\xE5\xA5\xA0",
+ "\x9A\xFA"=>"\xE5\xA5\xA7",
+ "\x9A\xFB"=>"\xE5\xA5\xAC",
+ "\x9A\xFC"=>"\xE5\xA5\xA9",
+ "\x9B\x40"=>"\xE5\xA5\xB8",
+ "\x9B\x41"=>"\xE5\xA6\x81",
+ "\x9B\x42"=>"\xE5\xA6\x9D",
+ "\x9B\x43"=>"\xE4\xBD\x9E",
+ "\x9B\x44"=>"\xE4\xBE\xAB",
+ "\x9B\x45"=>"\xE5\xA6\xA3",
+ "\x9B\x46"=>"\xE5\xA6\xB2",
+ "\x9B\x47"=>"\xE5\xA7\x86",
+ "\x9B\x48"=>"\xE5\xA7\xA8",
+ "\x9B\x49"=>"\xE5\xA7\x9C",
+ "\x9B\x4A"=>"\xE5\xA6\x8D",
+ "\x9B\x4B"=>"\xE5\xA7\x99",
+ "\x9B\x4C"=>"\xE5\xA7\x9A",
+ "\x9B\x4D"=>"\xE5\xA8\xA5",
+ "\x9B\x4E"=>"\xE5\xA8\x9F",
+ "\x9B\x4F"=>"\xE5\xA8\x91",
+ "\x9B\x50"=>"\xE5\xA8\x9C",
+ "\x9B\x51"=>"\xE5\xA8\x89",
+ "\x9B\x52"=>"\xE5\xA8\x9A",
+ "\x9B\x53"=>"\xE5\xA9\x80",
+ "\x9B\x54"=>"\xE5\xA9\xAC",
+ "\x9B\x55"=>"\xE5\xA9\x89",
+ "\x9B\x56"=>"\xE5\xA8\xB5",
+ "\x9B\x57"=>"\xE5\xA8\xB6",
+ "\x9B\x58"=>"\xE5\xA9\xA2",
+ "\x9B\x59"=>"\xE5\xA9\xAA",
+ "\x9B\x5A"=>"\xE5\xAA\x9A",
+ "\x9B\x5B"=>"\xE5\xAA\xBC",
+ "\x9B\x5C"=>"\xE5\xAA\xBE",
+ "\x9B\x5D"=>"\xE5\xAB\x8B",
+ "\x9B\x5E"=>"\xE5\xAB\x82",
+ "\x9B\x5F"=>"\xE5\xAA\xBD",
+ "\x9B\x60"=>"\xE5\xAB\xA3",
+ "\x9B\x61"=>"\xE5\xAB\x97",
+ "\x9B\x62"=>"\xE5\xAB\xA6",
+ "\x9B\x63"=>"\xE5\xAB\xA9",
+ "\x9B\x64"=>"\xE5\xAB\x96",
+ "\x9B\x65"=>"\xE5\xAB\xBA",
+ "\x9B\x66"=>"\xE5\xAB\xBB",
+ "\x9B\x67"=>"\xE5\xAC\x8C",
+ "\x9B\x68"=>"\xE5\xAC\x8B",
+ "\x9B\x69"=>"\xE5\xAC\x96",
+ "\x9B\x6A"=>"\xE5\xAC\xB2",
+ "\x9B\x6B"=>"\xE5\xAB\x90",
+ "\x9B\x6C"=>"\xE5\xAC\xAA",
+ "\x9B\x6D"=>"\xE5\xAC\xB6",
+ "\x9B\x6E"=>"\xE5\xAC\xBE",
+ "\x9B\x6F"=>"\xE5\xAD\x83",
+ "\x9B\x70"=>"\xE5\xAD\x85",
+ "\x9B\x71"=>"\xE5\xAD\x80",
+ "\x9B\x72"=>"\xE5\xAD\x91",
+ "\x9B\x73"=>"\xE5\xAD\x95",
+ "\x9B\x74"=>"\xE5\xAD\x9A",
+ "\x9B\x75"=>"\xE5\xAD\x9B",
+ "\x9B\x76"=>"\xE5\xAD\xA5",
+ "\x9B\x77"=>"\xE5\xAD\xA9",
+ "\x9B\x78"=>"\xE5\xAD\xB0",
+ "\x9B\x79"=>"\xE5\xAD\xB3",
+ "\x9B\x7A"=>"\xE5\xAD\xB5",
+ "\x9B\x7B"=>"\xE5\xAD\xB8",
+ "\x9B\x7C"=>"\xE6\x96\x88",
+ "\x9B\x7D"=>"\xE5\xAD\xBA",
+ "\x9B\x7E"=>"\xE5\xAE\x80",
+ "\x9B\x80"=>"\xE5\xAE\x83",
+ "\x9B\x81"=>"\xE5\xAE\xA6",
+ "\x9B\x82"=>"\xE5\xAE\xB8",
+ "\x9B\x83"=>"\xE5\xAF\x83",
+ "\x9B\x84"=>"\xE5\xAF\x87",
+ "\x9B\x85"=>"\xE5\xAF\x89",
+ "\x9B\x86"=>"\xE5\xAF\x94",
+ "\x9B\x87"=>"\xE5\xAF\x90",
+ "\x9B\x88"=>"\xE5\xAF\xA4",
+ "\x9B\x89"=>"\xE5\xAF\xA6",
+ "\x9B\x8A"=>"\xE5\xAF\xA2",
+ "\x9B\x8B"=>"\xE5\xAF\x9E",
+ "\x9B\x8C"=>"\xE5\xAF\xA5",
+ "\x9B\x8D"=>"\xE5\xAF\xAB",
+ "\x9B\x8E"=>"\xE5\xAF\xB0",
+ "\x9B\x8F"=>"\xE5\xAF\xB6",
+ "\x9B\x90"=>"\xE5\xAF\xB3",
+ "\x9B\x91"=>"\xE5\xB0\x85",
+ "\x9B\x92"=>"\xE5\xB0\x87",
+ "\x9B\x93"=>"\xE5\xB0\x88",
+ "\x9B\x94"=>"\xE5\xB0\x8D",
+ "\x9B\x95"=>"\xE5\xB0\x93",
+ "\x9B\x96"=>"\xE5\xB0\xA0",
+ "\x9B\x97"=>"\xE5\xB0\xA2",
+ "\x9B\x98"=>"\xE5\xB0\xA8",
+ "\x9B\x99"=>"\xE5\xB0\xB8",
+ "\x9B\x9A"=>"\xE5\xB0\xB9",
+ "\x9B\x9B"=>"\xE5\xB1\x81",
+ "\x9B\x9C"=>"\xE5\xB1\x86",
+ "\x9B\x9D"=>"\xE5\xB1\x8E",
+ "\x9B\x9E"=>"\xE5\xB1\x93",
+ "\x9B\x9F"=>"\xE5\xB1\x90",
+ "\x9B\xA0"=>"\xE5\xB1\x8F",
+ "\x9B\xA1"=>"\xE5\xAD\xB1",
+ "\x9B\xA2"=>"\xE5\xB1\xAC",
+ "\x9B\xA3"=>"\xE5\xB1\xAE",
+ "\x9B\xA4"=>"\xE4\xB9\xA2",
+ "\x9B\xA5"=>"\xE5\xB1\xB6",
+ "\x9B\xA6"=>"\xE5\xB1\xB9",
+ "\x9B\xA7"=>"\xE5\xB2\x8C",
+ "\x9B\xA8"=>"\xE5\xB2\x91",
+ "\x9B\xA9"=>"\xE5\xB2\x94",
+ "\x9B\xAA"=>"\xE5\xA6\x9B",
+ "\x9B\xAB"=>"\xE5\xB2\xAB",
+ "\x9B\xAC"=>"\xE5\xB2\xBB",
+ "\x9B\xAD"=>"\xE5\xB2\xB6",
+ "\x9B\xAE"=>"\xE5\xB2\xBC",
+ "\x9B\xAF"=>"\xE5\xB2\xB7",
+ "\x9B\xB0"=>"\xE5\xB3\x85",
+ "\x9B\xB1"=>"\xE5\xB2\xBE",
+ "\x9B\xB2"=>"\xE5\xB3\x87",
+ "\x9B\xB3"=>"\xE5\xB3\x99",
+ "\x9B\xB4"=>"\xE5\xB3\xA9",
+ "\x9B\xB5"=>"\xE5\xB3\xBD",
+ "\x9B\xB6"=>"\xE5\xB3\xBA",
+ "\x9B\xB7"=>"\xE5\xB3\xAD",
+ "\x9B\xB8"=>"\xE5\xB6\x8C",
+ "\x9B\xB9"=>"\xE5\xB3\xAA",
+ "\x9B\xBA"=>"\xE5\xB4\x8B",
+ "\x9B\xBB"=>"\xE5\xB4\x95",
+ "\x9B\xBC"=>"\xE5\xB4\x97",
+ "\x9B\xBD"=>"\xE5\xB5\x9C",
+ "\x9B\xBE"=>"\xE5\xB4\x9F",
+ "\x9B\xBF"=>"\xE5\xB4\x9B",
+ "\x9B\xC0"=>"\xE5\xB4\x91",
+ "\x9B\xC1"=>"\xE5\xB4\x94",
+ "\x9B\xC2"=>"\xE5\xB4\xA2",
+ "\x9B\xC3"=>"\xE5\xB4\x9A",
+ "\x9B\xC4"=>"\xE5\xB4\x99",
+ "\x9B\xC5"=>"\xE5\xB4\x98",
+ "\x9B\xC6"=>"\xE5\xB5\x8C",
+ "\x9B\xC7"=>"\xE5\xB5\x92",
+ "\x9B\xC8"=>"\xE5\xB5\x8E",
+ "\x9B\xC9"=>"\xE5\xB5\x8B",
+ "\x9B\xCA"=>"\xE5\xB5\xAC",
+ "\x9B\xCB"=>"\xE5\xB5\xB3",
+ "\x9B\xCC"=>"\xE5\xB5\xB6",
+ "\x9B\xCD"=>"\xE5\xB6\x87",
+ "\x9B\xCE"=>"\xE5\xB6\x84",
+ "\x9B\xCF"=>"\xE5\xB6\x82",
+ "\x9B\xD0"=>"\xE5\xB6\xA2",
+ "\x9B\xD1"=>"\xE5\xB6\x9D",
+ "\x9B\xD2"=>"\xE5\xB6\xAC",
+ "\x9B\xD3"=>"\xE5\xB6\xAE",
+ "\x9B\xD4"=>"\xE5\xB6\xBD",
+ "\x9B\xD5"=>"\xE5\xB6\x90",
+ "\x9B\xD6"=>"\xE5\xB6\xB7",
+ "\x9B\xD7"=>"\xE5\xB6\xBC",
+ "\x9B\xD8"=>"\xE5\xB7\x89",
+ "\x9B\xD9"=>"\xE5\xB7\x8D",
+ "\x9B\xDA"=>"\xE5\xB7\x93",
+ "\x9B\xDB"=>"\xE5\xB7\x92",
+ "\x9B\xDC"=>"\xE5\xB7\x96",
+ "\x9B\xDD"=>"\xE5\xB7\x9B",
+ "\x9B\xDE"=>"\xE5\xB7\xAB",
+ "\x9B\xDF"=>"\xE5\xB7\xB2",
+ "\x9B\xE0"=>"\xE5\xB7\xB5",
+ "\x9B\xE1"=>"\xE5\xB8\x8B",
+ "\x9B\xE2"=>"\xE5\xB8\x9A",
+ "\x9B\xE3"=>"\xE5\xB8\x99",
+ "\x9B\xE4"=>"\xE5\xB8\x91",
+ "\x9B\xE5"=>"\xE5\xB8\x9B",
+ "\x9B\xE6"=>"\xE5\xB8\xB6",
+ "\x9B\xE7"=>"\xE5\xB8\xB7",
+ "\x9B\xE8"=>"\xE5\xB9\x84",
+ "\x9B\xE9"=>"\xE5\xB9\x83",
+ "\x9B\xEA"=>"\xE5\xB9\x80",
+ "\x9B\xEB"=>"\xE5\xB9\x8E",
+ "\x9B\xEC"=>"\xE5\xB9\x97",
+ "\x9B\xED"=>"\xE5\xB9\x94",
+ "\x9B\xEE"=>"\xE5\xB9\x9F",
+ "\x9B\xEF"=>"\xE5\xB9\xA2",
+ "\x9B\xF0"=>"\xE5\xB9\xA4",
+ "\x9B\xF1"=>"\xE5\xB9\x87",
+ "\x9B\xF2"=>"\xE5\xB9\xB5",
+ "\x9B\xF3"=>"\xE5\xB9\xB6",
+ "\x9B\xF4"=>"\xE5\xB9\xBA",
+ "\x9B\xF5"=>"\xE9\xBA\xBC",
+ "\x9B\xF6"=>"\xE5\xB9\xBF",
+ "\x9B\xF7"=>"\xE5\xBA\xA0",
+ "\x9B\xF8"=>"\xE5\xBB\x81",
+ "\x9B\xF9"=>"\xE5\xBB\x82",
+ "\x9B\xFA"=>"\xE5\xBB\x88",
+ "\x9B\xFB"=>"\xE5\xBB\x90",
+ "\x9B\xFC"=>"\xE5\xBB\x8F",
+ "\x9C\x40"=>"\xE5\xBB\x96",
+ "\x9C\x41"=>"\xE5\xBB\xA3",
+ "\x9C\x42"=>"\xE5\xBB\x9D",
+ "\x9C\x43"=>"\xE5\xBB\x9A",
+ "\x9C\x44"=>"\xE5\xBB\x9B",
+ "\x9C\x45"=>"\xE5\xBB\xA2",
+ "\x9C\x46"=>"\xE5\xBB\xA1",
+ "\x9C\x47"=>"\xE5\xBB\xA8",
+ "\x9C\x48"=>"\xE5\xBB\xA9",
+ "\x9C\x49"=>"\xE5\xBB\xAC",
+ "\x9C\x4A"=>"\xE5\xBB\xB1",
+ "\x9C\x4B"=>"\xE5\xBB\xB3",
+ "\x9C\x4C"=>"\xE5\xBB\xB0",
+ "\x9C\x4D"=>"\xE5\xBB\xB4",
+ "\x9C\x4E"=>"\xE5\xBB\xB8",
+ "\x9C\x4F"=>"\xE5\xBB\xBE",
+ "\x9C\x50"=>"\xE5\xBC\x83",
+ "\x9C\x51"=>"\xE5\xBC\x89",
+ "\x9C\x52"=>"\xE5\xBD\x9D",
+ "\x9C\x53"=>"\xE5\xBD\x9C",
+ "\x9C\x54"=>"\xE5\xBC\x8B",
+ "\x9C\x55"=>"\xE5\xBC\x91",
+ "\x9C\x56"=>"\xE5\xBC\x96",
+ "\x9C\x57"=>"\xE5\xBC\xA9",
+ "\x9C\x58"=>"\xE5\xBC\xAD",
+ "\x9C\x59"=>"\xE5\xBC\xB8",
+ "\x9C\x5A"=>"\xE5\xBD\x81",
+ "\x9C\x5B"=>"\xE5\xBD\x88",
+ "\x9C\x5C"=>"\xE5\xBD\x8C",
+ "\x9C\x5D"=>"\xE5\xBD\x8E",
+ "\x9C\x5E"=>"\xE5\xBC\xAF",
+ "\x9C\x5F"=>"\xE5\xBD\x91",
+ "\x9C\x60"=>"\xE5\xBD\x96",
+ "\x9C\x61"=>"\xE5\xBD\x97",
+ "\x9C\x62"=>"\xE5\xBD\x99",
+ "\x9C\x63"=>"\xE5\xBD\xA1",
+ "\x9C\x64"=>"\xE5\xBD\xAD",
+ "\x9C\x65"=>"\xE5\xBD\xB3",
+ "\x9C\x66"=>"\xE5\xBD\xB7",
+ "\x9C\x67"=>"\xE5\xBE\x83",
+ "\x9C\x68"=>"\xE5\xBE\x82",
+ "\x9C\x69"=>"\xE5\xBD\xBF",
+ "\x9C\x6A"=>"\xE5\xBE\x8A",
+ "\x9C\x6B"=>"\xE5\xBE\x88",
+ "\x9C\x6C"=>"\xE5\xBE\x91",
+ "\x9C\x6D"=>"\xE5\xBE\x87",
+ "\x9C\x6E"=>"\xE5\xBE\x9E",
+ "\x9C\x6F"=>"\xE5\xBE\x99",
+ "\x9C\x70"=>"\xE5\xBE\x98",
+ "\x9C\x71"=>"\xE5\xBE\xA0",
+ "\x9C\x72"=>"\xE5\xBE\xA8",
+ "\x9C\x73"=>"\xE5\xBE\xAD",
+ "\x9C\x74"=>"\xE5\xBE\xBC",
+ "\x9C\x75"=>"\xE5\xBF\x96",
+ "\x9C\x76"=>"\xE5\xBF\xBB",
+ "\x9C\x77"=>"\xE5\xBF\xA4",
+ "\x9C\x78"=>"\xE5\xBF\xB8",
+ "\x9C\x79"=>"\xE5\xBF\xB1",
+ "\x9C\x7A"=>"\xE5\xBF\x9D",
+ "\x9C\x7B"=>"\xE6\x82\xB3",
+ "\x9C\x7C"=>"\xE5\xBF\xBF",
+ "\x9C\x7D"=>"\xE6\x80\xA1",
+ "\x9C\x7E"=>"\xE6\x81\xA0",
+ "\x9C\x80"=>"\xE6\x80\x99",
+ "\x9C\x81"=>"\xE6\x80\x90",
+ "\x9C\x82"=>"\xE6\x80\xA9",
+ "\x9C\x83"=>"\xE6\x80\x8E",
+ "\x9C\x84"=>"\xE6\x80\xB1",
+ "\x9C\x85"=>"\xE6\x80\x9B",
+ "\x9C\x86"=>"\xE6\x80\x95",
+ "\x9C\x87"=>"\xE6\x80\xAB",
+ "\x9C\x88"=>"\xE6\x80\xA6",
+ "\x9C\x89"=>"\xE6\x80\x8F",
+ "\x9C\x8A"=>"\xE6\x80\xBA",
+ "\x9C\x8B"=>"\xE6\x81\x9A",
+ "\x9C\x8C"=>"\xE6\x81\x81",
+ "\x9C\x8D"=>"\xE6\x81\xAA",
+ "\x9C\x8E"=>"\xE6\x81\xB7",
+ "\x9C\x8F"=>"\xE6\x81\x9F",
+ "\x9C\x90"=>"\xE6\x81\x8A",
+ "\x9C\x91"=>"\xE6\x81\x86",
+ "\x9C\x92"=>"\xE6\x81\x8D",
+ "\x9C\x93"=>"\xE6\x81\xA3",
+ "\x9C\x94"=>"\xE6\x81\x83",
+ "\x9C\x95"=>"\xE6\x81\xA4",
+ "\x9C\x96"=>"\xE6\x81\x82",
+ "\x9C\x97"=>"\xE6\x81\xAC",
+ "\x9C\x98"=>"\xE6\x81\xAB",
+ "\x9C\x99"=>"\xE6\x81\x99",
+ "\x9C\x9A"=>"\xE6\x82\x81",
+ "\x9C\x9B"=>"\xE6\x82\x8D",
+ "\x9C\x9C"=>"\xE6\x83\xA7",
+ "\x9C\x9D"=>"\xE6\x82\x83",
+ "\x9C\x9E"=>"\xE6\x82\x9A",
+ "\x9C\x9F"=>"\xE6\x82\x84",
+ "\x9C\xA0"=>"\xE6\x82\x9B",
+ "\x9C\xA1"=>"\xE6\x82\x96",
+ "\x9C\xA2"=>"\xE6\x82\x97",
+ "\x9C\xA3"=>"\xE6\x82\x92",
+ "\x9C\xA4"=>"\xE6\x82\xA7",
+ "\x9C\xA5"=>"\xE6\x82\x8B",
+ "\x9C\xA6"=>"\xE6\x83\xA1",
+ "\x9C\xA7"=>"\xE6\x82\xB8",
+ "\x9C\xA8"=>"\xE6\x83\xA0",
+ "\x9C\xA9"=>"\xE6\x83\x93",
+ "\x9C\xAA"=>"\xE6\x82\xB4",
+ "\x9C\xAB"=>"\xE5\xBF\xB0",
+ "\x9C\xAC"=>"\xE6\x82\xBD",
+ "\x9C\xAD"=>"\xE6\x83\x86",
+ "\x9C\xAE"=>"\xE6\x82\xB5",
+ "\x9C\xAF"=>"\xE6\x83\x98",
+ "\x9C\xB0"=>"\xE6\x85\x8D",
+ "\x9C\xB1"=>"\xE6\x84\x95",
+ "\x9C\xB2"=>"\xE6\x84\x86",
+ "\x9C\xB3"=>"\xE6\x83\xB6",
+ "\x9C\xB4"=>"\xE6\x83\xB7",
+ "\x9C\xB5"=>"\xE6\x84\x80",
+ "\x9C\xB6"=>"\xE6\x83\xB4",
+ "\x9C\xB7"=>"\xE6\x83\xBA",
+ "\x9C\xB8"=>"\xE6\x84\x83",
+ "\x9C\xB9"=>"\xE6\x84\xA1",
+ "\x9C\xBA"=>"\xE6\x83\xBB",
+ "\x9C\xBB"=>"\xE6\x83\xB1",
+ "\x9C\xBC"=>"\xE6\x84\x8D",
+ "\x9C\xBD"=>"\xE6\x84\x8E",
+ "\x9C\xBE"=>"\xE6\x85\x87",
+ "\x9C\xBF"=>"\xE6\x84\xBE",
+ "\x9C\xC0"=>"\xE6\x84\xA8",
+ "\x9C\xC1"=>"\xE6\x84\xA7",
+ "\x9C\xC2"=>"\xE6\x85\x8A",
+ "\x9C\xC3"=>"\xE6\x84\xBF",
+ "\x9C\xC4"=>"\xE6\x84\xBC",
+ "\x9C\xC5"=>"\xE6\x84\xAC",
+ "\x9C\xC6"=>"\xE6\x84\xB4",
+ "\x9C\xC7"=>"\xE6\x84\xBD",
+ "\x9C\xC8"=>"\xE6\x85\x82",
+ "\x9C\xC9"=>"\xE6\x85\x84",
+ "\x9C\xCA"=>"\xE6\x85\xB3",
+ "\x9C\xCB"=>"\xE6\x85\xB7",
+ "\x9C\xCC"=>"\xE6\x85\x98",
+ "\x9C\xCD"=>"\xE6\x85\x99",
+ "\x9C\xCE"=>"\xE6\x85\x9A",
+ "\x9C\xCF"=>"\xE6\x85\xAB",
+ "\x9C\xD0"=>"\xE6\x85\xB4",
+ "\x9C\xD1"=>"\xE6\x85\xAF",
+ "\x9C\xD2"=>"\xE6\x85\xA5",
+ "\x9C\xD3"=>"\xE6\x85\xB1",
+ "\x9C\xD4"=>"\xE6\x85\x9F",
+ "\x9C\xD5"=>"\xE6\x85\x9D",
+ "\x9C\xD6"=>"\xE6\x85\x93",
+ "\x9C\xD7"=>"\xE6\x85\xB5",
+ "\x9C\xD8"=>"\xE6\x86\x99",
+ "\x9C\xD9"=>"\xE6\x86\x96",
+ "\x9C\xDA"=>"\xE6\x86\x87",
+ "\x9C\xDB"=>"\xE6\x86\xAC",
+ "\x9C\xDC"=>"\xE6\x86\x94",
+ "\x9C\xDD"=>"\xE6\x86\x9A",
+ "\x9C\xDE"=>"\xE6\x86\x8A",
+ "\x9C\xDF"=>"\xE6\x86\x91",
+ "\x9C\xE0"=>"\xE6\x86\xAB",
+ "\x9C\xE1"=>"\xE6\x86\xAE",
+ "\x9C\xE2"=>"\xE6\x87\x8C",
+ "\x9C\xE3"=>"\xE6\x87\x8A",
+ "\x9C\xE4"=>"\xE6\x87\x89",
+ "\x9C\xE5"=>"\xE6\x87\xB7",
+ "\x9C\xE6"=>"\xE6\x87\x88",
+ "\x9C\xE7"=>"\xE6\x87\x83",
+ "\x9C\xE8"=>"\xE6\x87\x86",
+ "\x9C\xE9"=>"\xE6\x86\xBA",
+ "\x9C\xEA"=>"\xE6\x87\x8B",
+ "\x9C\xEB"=>"\xE7\xBD\xB9",
+ "\x9C\xEC"=>"\xE6\x87\x8D",
+ "\x9C\xED"=>"\xE6\x87\xA6",
+ "\x9C\xEE"=>"\xE6\x87\xA3",
+ "\x9C\xEF"=>"\xE6\x87\xB6",
+ "\x9C\xF0"=>"\xE6\x87\xBA",
+ "\x9C\xF1"=>"\xE6\x87\xB4",
+ "\x9C\xF2"=>"\xE6\x87\xBF",
+ "\x9C\xF3"=>"\xE6\x87\xBD",
+ "\x9C\xF4"=>"\xE6\x87\xBC",
+ "\x9C\xF5"=>"\xE6\x87\xBE",
+ "\x9C\xF6"=>"\xE6\x88\x80",
+ "\x9C\xF7"=>"\xE6\x88\x88",
+ "\x9C\xF8"=>"\xE6\x88\x89",
+ "\x9C\xF9"=>"\xE6\x88\x8D",
+ "\x9C\xFA"=>"\xE6\x88\x8C",
+ "\x9C\xFB"=>"\xE6\x88\x94",
+ "\x9C\xFC"=>"\xE6\x88\x9B",
+ "\x9D\x40"=>"\xE6\x88\x9E",
+ "\x9D\x41"=>"\xE6\x88\xA1",
+ "\x9D\x42"=>"\xE6\x88\xAA",
+ "\x9D\x43"=>"\xE6\x88\xAE",
+ "\x9D\x44"=>"\xE6\x88\xB0",
+ "\x9D\x45"=>"\xE6\x88\xB2",
+ "\x9D\x46"=>"\xE6\x88\xB3",
+ "\x9D\x47"=>"\xE6\x89\x81",
+ "\x9D\x48"=>"\xE6\x89\x8E",
+ "\x9D\x49"=>"\xE6\x89\x9E",
+ "\x9D\x4A"=>"\xE6\x89\xA3",
+ "\x9D\x4B"=>"\xE6\x89\x9B",
+ "\x9D\x4C"=>"\xE6\x89\xA0",
+ "\x9D\x4D"=>"\xE6\x89\xA8",
+ "\x9D\x4E"=>"\xE6\x89\xBC",
+ "\x9D\x4F"=>"\xE6\x8A\x82",
+ "\x9D\x50"=>"\xE6\x8A\x89",
+ "\x9D\x51"=>"\xE6\x89\xBE",
+ "\x9D\x52"=>"\xE6\x8A\x92",
+ "\x9D\x53"=>"\xE6\x8A\x93",
+ "\x9D\x54"=>"\xE6\x8A\x96",
+ "\x9D\x55"=>"\xE6\x8B\x94",
+ "\x9D\x56"=>"\xE6\x8A\x83",
+ "\x9D\x57"=>"\xE6\x8A\x94",
+ "\x9D\x58"=>"\xE6\x8B\x97",
+ "\x9D\x59"=>"\xE6\x8B\x91",
+ "\x9D\x5A"=>"\xE6\x8A\xBB",
+ "\x9D\x5B"=>"\xE6\x8B\x8F",
+ "\x9D\x5C"=>"\xE6\x8B\xBF",
+ "\x9D\x5D"=>"\xE6\x8B\x86",
+ "\x9D\x5E"=>"\xE6\x93\x94",
+ "\x9D\x5F"=>"\xE6\x8B\x88",
+ "\x9D\x60"=>"\xE6\x8B\x9C",
+ "\x9D\x61"=>"\xE6\x8B\x8C",
+ "\x9D\x62"=>"\xE6\x8B\x8A",
+ "\x9D\x63"=>"\xE6\x8B\x82",
+ "\x9D\x64"=>"\xE6\x8B\x87",
+ "\x9D\x65"=>"\xE6\x8A\x9B",
+ "\x9D\x66"=>"\xE6\x8B\x89",
+ "\x9D\x67"=>"\xE6\x8C\x8C",
+ "\x9D\x68"=>"\xE6\x8B\xAE",
+ "\x9D\x69"=>"\xE6\x8B\xB1",
+ "\x9D\x6A"=>"\xE6\x8C\xA7",
+ "\x9D\x6B"=>"\xE6\x8C\x82",
+ "\x9D\x6C"=>"\xE6\x8C\x88",
+ "\x9D\x6D"=>"\xE6\x8B\xAF",
+ "\x9D\x6E"=>"\xE6\x8B\xB5",
+ "\x9D\x6F"=>"\xE6\x8D\x90",
+ "\x9D\x70"=>"\xE6\x8C\xBE",
+ "\x9D\x71"=>"\xE6\x8D\x8D",
+ "\x9D\x72"=>"\xE6\x90\x9C",
+ "\x9D\x73"=>"\xE6\x8D\x8F",
+ "\x9D\x74"=>"\xE6\x8E\x96",
+ "\x9D\x75"=>"\xE6\x8E\x8E",
+ "\x9D\x76"=>"\xE6\x8E\x80",
+ "\x9D\x77"=>"\xE6\x8E\xAB",
+ "\x9D\x78"=>"\xE6\x8D\xB6",
+ "\x9D\x79"=>"\xE6\x8E\xA3",
+ "\x9D\x7A"=>"\xE6\x8E\x8F",
+ "\x9D\x7B"=>"\xE6\x8E\x89",
+ "\x9D\x7C"=>"\xE6\x8E\x9F",
+ "\x9D\x7D"=>"\xE6\x8E\xB5",
+ "\x9D\x7E"=>"\xE6\x8D\xAB",
+ "\x9D\x80"=>"\xE6\x8D\xA9",
+ "\x9D\x81"=>"\xE6\x8E\xBE",
+ "\x9D\x82"=>"\xE6\x8F\xA9",
+ "\x9D\x83"=>"\xE6\x8F\x80",
+ "\x9D\x84"=>"\xE6\x8F\x86",
+ "\x9D\x85"=>"\xE6\x8F\xA3",
+ "\x9D\x86"=>"\xE6\x8F\x89",
+ "\x9D\x87"=>"\xE6\x8F\x92",
+ "\x9D\x88"=>"\xE6\x8F\xB6",
+ "\x9D\x89"=>"\xE6\x8F\x84",
+ "\x9D\x8A"=>"\xE6\x90\x96",
+ "\x9D\x8B"=>"\xE6\x90\xB4",
+ "\x9D\x8C"=>"\xE6\x90\x86",
+ "\x9D\x8D"=>"\xE6\x90\x93",
+ "\x9D\x8E"=>"\xE6\x90\xA6",
+ "\x9D\x8F"=>"\xE6\x90\xB6",
+ "\x9D\x90"=>"\xE6\x94\x9D",
+ "\x9D\x91"=>"\xE6\x90\x97",
+ "\x9D\x92"=>"\xE6\x90\xA8",
+ "\x9D\x93"=>"\xE6\x90\x8F",
+ "\x9D\x94"=>"\xE6\x91\xA7",
+ "\x9D\x95"=>"\xE6\x91\xAF",
+ "\x9D\x96"=>"\xE6\x91\xB6",
+ "\x9D\x97"=>"\xE6\x91\x8E",
+ "\x9D\x98"=>"\xE6\x94\xAA",
+ "\x9D\x99"=>"\xE6\x92\x95",
+ "\x9D\x9A"=>"\xE6\x92\x93",
+ "\x9D\x9B"=>"\xE6\x92\xA5",
+ "\x9D\x9C"=>"\xE6\x92\xA9",
+ "\x9D\x9D"=>"\xE6\x92\x88",
+ "\x9D\x9E"=>"\xE6\x92\xBC",
+ "\x9D\x9F"=>"\xE6\x93\x9A",
+ "\x9D\xA0"=>"\xE6\x93\x92",
+ "\x9D\xA1"=>"\xE6\x93\x85",
+ "\x9D\xA2"=>"\xE6\x93\x87",
+ "\x9D\xA3"=>"\xE6\x92\xBB",
+ "\x9D\xA4"=>"\xE6\x93\x98",
+ "\x9D\xA5"=>"\xE6\x93\x82",
+ "\x9D\xA6"=>"\xE6\x93\xB1",
+ "\x9D\xA7"=>"\xE6\x93\xA7",
+ "\x9D\xA8"=>"\xE8\x88\x89",
+ "\x9D\xA9"=>"\xE6\x93\xA0",
+ "\x9D\xAA"=>"\xE6\x93\xA1",
+ "\x9D\xAB"=>"\xE6\x8A\xAC",
+ "\x9D\xAC"=>"\xE6\x93\xA3",
+ "\x9D\xAD"=>"\xE6\x93\xAF",
+ "\x9D\xAE"=>"\xE6\x94\xAC",
+ "\x9D\xAF"=>"\xE6\x93\xB6",
+ "\x9D\xB0"=>"\xE6\x93\xB4",
+ "\x9D\xB1"=>"\xE6\x93\xB2",
+ "\x9D\xB2"=>"\xE6\x93\xBA",
+ "\x9D\xB3"=>"\xE6\x94\x80",
+ "\x9D\xB4"=>"\xE6\x93\xBD",
+ "\x9D\xB5"=>"\xE6\x94\x98",
+ "\x9D\xB6"=>"\xE6\x94\x9C",
+ "\x9D\xB7"=>"\xE6\x94\x85",
+ "\x9D\xB8"=>"\xE6\x94\xA4",
+ "\x9D\xB9"=>"\xE6\x94\xA3",
+ "\x9D\xBA"=>"\xE6\x94\xAB",
+ "\x9D\xBB"=>"\xE6\x94\xB4",
+ "\x9D\xBC"=>"\xE6\x94\xB5",
+ "\x9D\xBD"=>"\xE6\x94\xB7",
+ "\x9D\xBE"=>"\xE6\x94\xB6",
+ "\x9D\xBF"=>"\xE6\x94\xB8",
+ "\x9D\xC0"=>"\xE7\x95\x8B",
+ "\x9D\xC1"=>"\xE6\x95\x88",
+ "\x9D\xC2"=>"\xE6\x95\x96",
+ "\x9D\xC3"=>"\xE6\x95\x95",
+ "\x9D\xC4"=>"\xE6\x95\x8D",
+ "\x9D\xC5"=>"\xE6\x95\x98",
+ "\x9D\xC6"=>"\xE6\x95\x9E",
+ "\x9D\xC7"=>"\xE6\x95\x9D",
+ "\x9D\xC8"=>"\xE6\x95\xB2",
+ "\x9D\xC9"=>"\xE6\x95\xB8",
+ "\x9D\xCA"=>"\xE6\x96\x82",
+ "\x9D\xCB"=>"\xE6\x96\x83",
+ "\x9D\xCC"=>"\xE8\xAE\x8A",
+ "\x9D\xCD"=>"\xE6\x96\x9B",
+ "\x9D\xCE"=>"\xE6\x96\x9F",
+ "\x9D\xCF"=>"\xE6\x96\xAB",
+ "\x9D\xD0"=>"\xE6\x96\xB7",
+ "\x9D\xD1"=>"\xE6\x97\x83",
+ "\x9D\xD2"=>"\xE6\x97\x86",
+ "\x9D\xD3"=>"\xE6\x97\x81",
+ "\x9D\xD4"=>"\xE6\x97\x84",
+ "\x9D\xD5"=>"\xE6\x97\x8C",
+ "\x9D\xD6"=>"\xE6\x97\x92",
+ "\x9D\xD7"=>"\xE6\x97\x9B",
+ "\x9D\xD8"=>"\xE6\x97\x99",
+ "\x9D\xD9"=>"\xE6\x97\xA0",
+ "\x9D\xDA"=>"\xE6\x97\xA1",
+ "\x9D\xDB"=>"\xE6\x97\xB1",
+ "\x9D\xDC"=>"\xE6\x9D\xB2",
+ "\x9D\xDD"=>"\xE6\x98\x8A",
+ "\x9D\xDE"=>"\xE6\x98\x83",
+ "\x9D\xDF"=>"\xE6\x97\xBB",
+ "\x9D\xE0"=>"\xE6\x9D\xB3",
+ "\x9D\xE1"=>"\xE6\x98\xB5",
+ "\x9D\xE2"=>"\xE6\x98\xB6",
+ "\x9D\xE3"=>"\xE6\x98\xB4",
+ "\x9D\xE4"=>"\xE6\x98\x9C",
+ "\x9D\xE5"=>"\xE6\x99\x8F",
+ "\x9D\xE6"=>"\xE6\x99\x84",
+ "\x9D\xE7"=>"\xE6\x99\x89",
+ "\x9D\xE8"=>"\xE6\x99\x81",
+ "\x9D\xE9"=>"\xE6\x99\x9E",
+ "\x9D\xEA"=>"\xE6\x99\x9D",
+ "\x9D\xEB"=>"\xE6\x99\xA4",
+ "\x9D\xEC"=>"\xE6\x99\xA7",
+ "\x9D\xED"=>"\xE6\x99\xA8",
+ "\x9D\xEE"=>"\xE6\x99\x9F",
+ "\x9D\xEF"=>"\xE6\x99\xA2",
+ "\x9D\xF0"=>"\xE6\x99\xB0",
+ "\x9D\xF1"=>"\xE6\x9A\x83",
+ "\x9D\xF2"=>"\xE6\x9A\x88",
+ "\x9D\xF3"=>"\xE6\x9A\x8E",
+ "\x9D\xF4"=>"\xE6\x9A\x89",
+ "\x9D\xF5"=>"\xE6\x9A\x84",
+ "\x9D\xF6"=>"\xE6\x9A\x98",
+ "\x9D\xF7"=>"\xE6\x9A\x9D",
+ "\x9D\xF8"=>"\xE6\x9B\x81",
+ "\x9D\xF9"=>"\xE6\x9A\xB9",
+ "\x9D\xFA"=>"\xE6\x9B\x89",
+ "\x9D\xFB"=>"\xE6\x9A\xBE",
+ "\x9D\xFC"=>"\xE6\x9A\xBC",
+ "\x9E\x40"=>"\xE6\x9B\x84",
+ "\x9E\x41"=>"\xE6\x9A\xB8",
+ "\x9E\x42"=>"\xE6\x9B\x96",
+ "\x9E\x43"=>"\xE6\x9B\x9A",
+ "\x9E\x44"=>"\xE6\x9B\xA0",
+ "\x9E\x45"=>"\xE6\x98\xBF",
+ "\x9E\x46"=>"\xE6\x9B\xA6",
+ "\x9E\x47"=>"\xE6\x9B\xA9",
+ "\x9E\x48"=>"\xE6\x9B\xB0",
+ "\x9E\x49"=>"\xE6\x9B\xB5",
+ "\x9E\x4A"=>"\xE6\x9B\xB7",
+ "\x9E\x4B"=>"\xE6\x9C\x8F",
+ "\x9E\x4C"=>"\xE6\x9C\x96",
+ "\x9E\x4D"=>"\xE6\x9C\x9E",
+ "\x9E\x4E"=>"\xE6\x9C\xA6",
+ "\x9E\x4F"=>"\xE6\x9C\xA7",
+ "\x9E\x50"=>"\xE9\x9C\xB8",
+ "\x9E\x51"=>"\xE6\x9C\xAE",
+ "\x9E\x52"=>"\xE6\x9C\xBF",
+ "\x9E\x53"=>"\xE6\x9C\xB6",
+ "\x9E\x54"=>"\xE6\x9D\x81",
+ "\x9E\x55"=>"\xE6\x9C\xB8",
+ "\x9E\x56"=>"\xE6\x9C\xB7",
+ "\x9E\x57"=>"\xE6\x9D\x86",
+ "\x9E\x58"=>"\xE6\x9D\x9E",
+ "\x9E\x59"=>"\xE6\x9D\xA0",
+ "\x9E\x5A"=>"\xE6\x9D\x99",
+ "\x9E\x5B"=>"\xE6\x9D\xA3",
+ "\x9E\x5C"=>"\xE6\x9D\xA4",
+ "\x9E\x5D"=>"\xE6\x9E\x89",
+ "\x9E\x5E"=>"\xE6\x9D\xB0",
+ "\x9E\x5F"=>"\xE6\x9E\xA9",
+ "\x9E\x60"=>"\xE6\x9D\xBC",
+ "\x9E\x61"=>"\xE6\x9D\xAA",
+ "\x9E\x62"=>"\xE6\x9E\x8C",
+ "\x9E\x63"=>"\xE6\x9E\x8B",
+ "\x9E\x64"=>"\xE6\x9E\xA6",
+ "\x9E\x65"=>"\xE6\x9E\xA1",
+ "\x9E\x66"=>"\xE6\x9E\x85",
+ "\x9E\x67"=>"\xE6\x9E\xB7",
+ "\x9E\x68"=>"\xE6\x9F\xAF",
+ "\x9E\x69"=>"\xE6\x9E\xB4",
+ "\x9E\x6A"=>"\xE6\x9F\xAC",
+ "\x9E\x6B"=>"\xE6\x9E\xB3",
+ "\x9E\x6C"=>"\xE6\x9F\xA9",
+ "\x9E\x6D"=>"\xE6\x9E\xB8",
+ "\x9E\x6E"=>"\xE6\x9F\xA4",
+ "\x9E\x6F"=>"\xE6\x9F\x9E",
+ "\x9E\x70"=>"\xE6\x9F\x9D",
+ "\x9E\x71"=>"\xE6\x9F\xA2",
+ "\x9E\x72"=>"\xE6\x9F\xAE",
+ "\x9E\x73"=>"\xE6\x9E\xB9",
+ "\x9E\x74"=>"\xE6\x9F\x8E",
+ "\x9E\x75"=>"\xE6\x9F\x86",
+ "\x9E\x76"=>"\xE6\x9F\xA7",
+ "\x9E\x77"=>"\xE6\xAA\x9C",
+ "\x9E\x78"=>"\xE6\xA0\x9E",
+ "\x9E\x79"=>"\xE6\xA1\x86",
+ "\x9E\x7A"=>"\xE6\xA0\xA9",
+ "\x9E\x7B"=>"\xE6\xA1\x80",
+ "\x9E\x7C"=>"\xE6\xA1\x8D",
+ "\x9E\x7D"=>"\xE6\xA0\xB2",
+ "\x9E\x7E"=>"\xE6\xA1\x8E",
+ "\x9E\x80"=>"\xE6\xA2\xB3",
+ "\x9E\x81"=>"\xE6\xA0\xAB",
+ "\x9E\x82"=>"\xE6\xA1\x99",
+ "\x9E\x83"=>"\xE6\xA1\xA3",
+ "\x9E\x84"=>"\xE6\xA1\xB7",
+ "\x9E\x85"=>"\xE6\xA1\xBF",
+ "\x9E\x86"=>"\xE6\xA2\x9F",
+ "\x9E\x87"=>"\xE6\xA2\x8F",
+ "\x9E\x88"=>"\xE6\xA2\xAD",
+ "\x9E\x89"=>"\xE6\xA2\x94",
+ "\x9E\x8A"=>"\xE6\xA2\x9D",
+ "\x9E\x8B"=>"\xE6\xA2\x9B",
+ "\x9E\x8C"=>"\xE6\xA2\x83",
+ "\x9E\x8D"=>"\xE6\xAA\xAE",
+ "\x9E\x8E"=>"\xE6\xA2\xB9",
+ "\x9E\x8F"=>"\xE6\xA1\xB4",
+ "\x9E\x90"=>"\xE6\xA2\xB5",
+ "\x9E\x91"=>"\xE6\xA2\xA0",
+ "\x9E\x92"=>"\xE6\xA2\xBA",
+ "\x9E\x93"=>"\xE6\xA4\x8F",
+ "\x9E\x94"=>"\xE6\xA2\x8D",
+ "\x9E\x95"=>"\xE6\xA1\xBE",
+ "\x9E\x96"=>"\xE6\xA4\x81",
+ "\x9E\x97"=>"\xE6\xA3\x8A",
+ "\x9E\x98"=>"\xE6\xA4\x88",
+ "\x9E\x99"=>"\xE6\xA3\x98",
+ "\x9E\x9A"=>"\xE6\xA4\xA2",
+ "\x9E\x9B"=>"\xE6\xA4\xA6",
+ "\x9E\x9C"=>"\xE6\xA3\xA1",
+ "\x9E\x9D"=>"\xE6\xA4\x8C",
+ "\x9E\x9E"=>"\xE6\xA3\x8D",
+ "\x9E\x9F"=>"\xE6\xA3\x94",
+ "\x9E\xA0"=>"\xE6\xA3\xA7",
+ "\x9E\xA1"=>"\xE6\xA3\x95",
+ "\x9E\xA2"=>"\xE6\xA4\xB6",
+ "\x9E\xA3"=>"\xE6\xA4\x92",
+ "\x9E\xA4"=>"\xE6\xA4\x84",
+ "\x9E\xA5"=>"\xE6\xA3\x97",
+ "\x9E\xA6"=>"\xE6\xA3\xA3",
+ "\x9E\xA7"=>"\xE6\xA4\xA5",
+ "\x9E\xA8"=>"\xE6\xA3\xB9",
+ "\x9E\xA9"=>"\xE6\xA3\xA0",
+ "\x9E\xAA"=>"\xE6\xA3\xAF",
+ "\x9E\xAB"=>"\xE6\xA4\xA8",
+ "\x9E\xAC"=>"\xE6\xA4\xAA",
+ "\x9E\xAD"=>"\xE6\xA4\x9A",
+ "\x9E\xAE"=>"\xE6\xA4\xA3",
+ "\x9E\xAF"=>"\xE6\xA4\xA1",
+ "\x9E\xB0"=>"\xE6\xA3\x86",
+ "\x9E\xB1"=>"\xE6\xA5\xB9",
+ "\x9E\xB2"=>"\xE6\xA5\xB7",
+ "\x9E\xB3"=>"\xE6\xA5\x9C",
+ "\x9E\xB4"=>"\xE6\xA5\xB8",
+ "\x9E\xB5"=>"\xE6\xA5\xAB",
+ "\x9E\xB6"=>"\xE6\xA5\x94",
+ "\x9E\xB7"=>"\xE6\xA5\xBE",
+ "\x9E\xB8"=>"\xE6\xA5\xAE",
+ "\x9E\xB9"=>"\xE6\xA4\xB9",
+ "\x9E\xBA"=>"\xE6\xA5\xB4",
+ "\x9E\xBB"=>"\xE6\xA4\xBD",
+ "\x9E\xBC"=>"\xE6\xA5\x99",
+ "\x9E\xBD"=>"\xE6\xA4\xB0",
+ "\x9E\xBE"=>"\xE6\xA5\xA1",
+ "\x9E\xBF"=>"\xE6\xA5\x9E",
+ "\x9E\xC0"=>"\xE6\xA5\x9D",
+ "\x9E\xC1"=>"\xE6\xA6\x81",
+ "\x9E\xC2"=>"\xE6\xA5\xAA",
+ "\x9E\xC3"=>"\xE6\xA6\xB2",
+ "\x9E\xC4"=>"\xE6\xA6\xAE",
+ "\x9E\xC5"=>"\xE6\xA7\x90",
+ "\x9E\xC6"=>"\xE6\xA6\xBF",
+ "\x9E\xC7"=>"\xE6\xA7\x81",
+ "\x9E\xC8"=>"\xE6\xA7\x93",
+ "\x9E\xC9"=>"\xE6\xA6\xBE",
+ "\x9E\xCA"=>"\xE6\xA7\x8E",
+ "\x9E\xCB"=>"\xE5\xAF\xA8",
+ "\x9E\xCC"=>"\xE6\xA7\x8A",
+ "\x9E\xCD"=>"\xE6\xA7\x9D",
+ "\x9E\xCE"=>"\xE6\xA6\xBB",
+ "\x9E\xCF"=>"\xE6\xA7\x83",
+ "\x9E\xD0"=>"\xE6\xA6\xA7",
+ "\x9E\xD1"=>"\xE6\xA8\xAE",
+ "\x9E\xD2"=>"\xE6\xA6\x91",
+ "\x9E\xD3"=>"\xE6\xA6\xA0",
+ "\x9E\xD4"=>"\xE6\xA6\x9C",
+ "\x9E\xD5"=>"\xE6\xA6\x95",
+ "\x9E\xD6"=>"\xE6\xA6\xB4",
+ "\x9E\xD7"=>"\xE6\xA7\x9E",
+ "\x9E\xD8"=>"\xE6\xA7\xA8",
+ "\x9E\xD9"=>"\xE6\xA8\x82",
+ "\x9E\xDA"=>"\xE6\xA8\x9B",
+ "\x9E\xDB"=>"\xE6\xA7\xBF",
+ "\x9E\xDC"=>"\xE6\xAC\x8A",
+ "\x9E\xDD"=>"\xE6\xA7\xB9",
+ "\x9E\xDE"=>"\xE6\xA7\xB2",
+ "\x9E\xDF"=>"\xE6\xA7\xA7",
+ "\x9E\xE0"=>"\xE6\xA8\x85",
+ "\x9E\xE1"=>"\xE6\xA6\xB1",
+ "\x9E\xE2"=>"\xE6\xA8\x9E",
+ "\x9E\xE3"=>"\xE6\xA7\xAD",
+ "\x9E\xE4"=>"\xE6\xA8\x94",
+ "\x9E\xE5"=>"\xE6\xA7\xAB",
+ "\x9E\xE6"=>"\xE6\xA8\x8A",
+ "\x9E\xE7"=>"\xE6\xA8\x92",
+ "\x9E\xE8"=>"\xE6\xAB\x81",
+ "\x9E\xE9"=>"\xE6\xA8\xA3",
+ "\x9E\xEA"=>"\xE6\xA8\x93",
+ "\x9E\xEB"=>"\xE6\xA9\x84",
+ "\x9E\xEC"=>"\xE6\xA8\x8C",
+ "\x9E\xED"=>"\xE6\xA9\xB2",
+ "\x9E\xEE"=>"\xE6\xA8\xB6",
+ "\x9E\xEF"=>"\xE6\xA9\xB8",
+ "\x9E\xF0"=>"\xE6\xA9\x87",
+ "\x9E\xF1"=>"\xE6\xA9\xA2",
+ "\x9E\xF2"=>"\xE6\xA9\x99",
+ "\x9E\xF3"=>"\xE6\xA9\xA6",
+ "\x9E\xF4"=>"\xE6\xA9\x88",
+ "\x9E\xF5"=>"\xE6\xA8\xB8",
+ "\x9E\xF6"=>"\xE6\xA8\xA2",
+ "\x9E\xF7"=>"\xE6\xAA\x90",
+ "\x9E\xF8"=>"\xE6\xAA\x8D",
+ "\x9E\xF9"=>"\xE6\xAA\xA0",
+ "\x9E\xFA"=>"\xE6\xAA\x84",
+ "\x9E\xFB"=>"\xE6\xAA\xA2",
+ "\x9E\xFC"=>"\xE6\xAA\xA3",
+ "\x9F\x40"=>"\xE6\xAA\x97",
+ "\x9F\x41"=>"\xE8\x98\x97",
+ "\x9F\x42"=>"\xE6\xAA\xBB",
+ "\x9F\x43"=>"\xE6\xAB\x83",
+ "\x9F\x44"=>"\xE6\xAB\x82",
+ "\x9F\x45"=>"\xE6\xAA\xB8",
+ "\x9F\x46"=>"\xE6\xAA\xB3",
+ "\x9F\x47"=>"\xE6\xAA\xAC",
+ "\x9F\x48"=>"\xE6\xAB\x9E",
+ "\x9F\x49"=>"\xE6\xAB\x91",
+ "\x9F\x4A"=>"\xE6\xAB\x9F",
+ "\x9F\x4B"=>"\xE6\xAA\xAA",
+ "\x9F\x4C"=>"\xE6\xAB\x9A",
+ "\x9F\x4D"=>"\xE6\xAB\xAA",
+ "\x9F\x4E"=>"\xE6\xAB\xBB",
+ "\x9F\x4F"=>"\xE6\xAC\x85",
+ "\x9F\x50"=>"\xE8\x98\x96",
+ "\x9F\x51"=>"\xE6\xAB\xBA",
+ "\x9F\x52"=>"\xE6\xAC\x92",
+ "\x9F\x53"=>"\xE6\xAC\x96",
+ "\x9F\x54"=>"\xE9\xAC\xB1",
+ "\x9F\x55"=>"\xE6\xAC\x9F",
+ "\x9F\x56"=>"\xE6\xAC\xB8",
+ "\x9F\x57"=>"\xE6\xAC\xB7",
+ "\x9F\x58"=>"\xE7\x9B\x9C",
+ "\x9F\x59"=>"\xE6\xAC\xB9",
+ "\x9F\x5A"=>"\xE9\xA3\xAE",
+ "\x9F\x5B"=>"\xE6\xAD\x87",
+ "\x9F\x5C"=>"\xE6\xAD\x83",
+ "\x9F\x5D"=>"\xE6\xAD\x89",
+ "\x9F\x5E"=>"\xE6\xAD\x90",
+ "\x9F\x5F"=>"\xE6\xAD\x99",
+ "\x9F\x60"=>"\xE6\xAD\x94",
+ "\x9F\x61"=>"\xE6\xAD\x9B",
+ "\x9F\x62"=>"\xE6\xAD\x9F",
+ "\x9F\x63"=>"\xE6\xAD\xA1",
+ "\x9F\x64"=>"\xE6\xAD\xB8",
+ "\x9F\x65"=>"\xE6\xAD\xB9",
+ "\x9F\x66"=>"\xE6\xAD\xBF",
+ "\x9F\x67"=>"\xE6\xAE\x80",
+ "\x9F\x68"=>"\xE6\xAE\x84",
+ "\x9F\x69"=>"\xE6\xAE\x83",
+ "\x9F\x6A"=>"\xE6\xAE\x8D",
+ "\x9F\x6B"=>"\xE6\xAE\x98",
+ "\x9F\x6C"=>"\xE6\xAE\x95",
+ "\x9F\x6D"=>"\xE6\xAE\x9E",
+ "\x9F\x6E"=>"\xE6\xAE\xA4",
+ "\x9F\x6F"=>"\xE6\xAE\xAA",
+ "\x9F\x70"=>"\xE6\xAE\xAB",
+ "\x9F\x71"=>"\xE6\xAE\xAF",
+ "\x9F\x72"=>"\xE6\xAE\xB2",
+ "\x9F\x73"=>"\xE6\xAE\xB1",
+ "\x9F\x74"=>"\xE6\xAE\xB3",
+ "\x9F\x75"=>"\xE6\xAE\xB7",
+ "\x9F\x76"=>"\xE6\xAE\xBC",
+ "\x9F\x77"=>"\xE6\xAF\x86",
+ "\x9F\x78"=>"\xE6\xAF\x8B",
+ "\x9F\x79"=>"\xE6\xAF\x93",
+ "\x9F\x7A"=>"\xE6\xAF\x9F",
+ "\x9F\x7B"=>"\xE6\xAF\xAC",
+ "\x9F\x7C"=>"\xE6\xAF\xAB",
+ "\x9F\x7D"=>"\xE6\xAF\xB3",
+ "\x9F\x7E"=>"\xE6\xAF\xAF",
+ "\x9F\x80"=>"\xE9\xBA\xBE",
+ "\x9F\x81"=>"\xE6\xB0\x88",
+ "\x9F\x82"=>"\xE6\xB0\x93",
+ "\x9F\x83"=>"\xE6\xB0\x94",
+ "\x9F\x84"=>"\xE6\xB0\x9B",
+ "\x9F\x85"=>"\xE6\xB0\xA4",
+ "\x9F\x86"=>"\xE6\xB0\xA3",
+ "\x9F\x87"=>"\xE6\xB1\x9E",
+ "\x9F\x88"=>"\xE6\xB1\x95",
+ "\x9F\x89"=>"\xE6\xB1\xA2",
+ "\x9F\x8A"=>"\xE6\xB1\xAA",
+ "\x9F\x8B"=>"\xE6\xB2\x82",
+ "\x9F\x8C"=>"\xE6\xB2\x8D",
+ "\x9F\x8D"=>"\xE6\xB2\x9A",
+ "\x9F\x8E"=>"\xE6\xB2\x81",
+ "\x9F\x8F"=>"\xE6\xB2\x9B",
+ "\x9F\x90"=>"\xE6\xB1\xBE",
+ "\x9F\x91"=>"\xE6\xB1\xA8",
+ "\x9F\x92"=>"\xE6\xB1\xB3",
+ "\x9F\x93"=>"\xE6\xB2\x92",
+ "\x9F\x94"=>"\xE6\xB2\x90",
+ "\x9F\x95"=>"\xE6\xB3\x84",
+ "\x9F\x96"=>"\xE6\xB3\xB1",
+ "\x9F\x97"=>"\xE6\xB3\x93",
+ "\x9F\x98"=>"\xE6\xB2\xBD",
+ "\x9F\x99"=>"\xE6\xB3\x97",
+ "\x9F\x9A"=>"\xE6\xB3\x85",
+ "\x9F\x9B"=>"\xE6\xB3\x9D",
+ "\x9F\x9C"=>"\xE6\xB2\xAE",
+ "\x9F\x9D"=>"\xE6\xB2\xB1",
+ "\x9F\x9E"=>"\xE6\xB2\xBE",
+ "\x9F\x9F"=>"\xE6\xB2\xBA",
+ "\x9F\xA0"=>"\xE6\xB3\x9B",
+ "\x9F\xA1"=>"\xE6\xB3\xAF",
+ "\x9F\xA2"=>"\xE6\xB3\x99",
+ "\x9F\xA3"=>"\xE6\xB3\xAA",
+ "\x9F\xA4"=>"\xE6\xB4\x9F",
+ "\x9F\xA5"=>"\xE8\xA1\x8D",
+ "\x9F\xA6"=>"\xE6\xB4\xB6",
+ "\x9F\xA7"=>"\xE6\xB4\xAB",
+ "\x9F\xA8"=>"\xE6\xB4\xBD",
+ "\x9F\xA9"=>"\xE6\xB4\xB8",
+ "\x9F\xAA"=>"\xE6\xB4\x99",
+ "\x9F\xAB"=>"\xE6\xB4\xB5",
+ "\x9F\xAC"=>"\xE6\xB4\xB3",
+ "\x9F\xAD"=>"\xE6\xB4\x92",
+ "\x9F\xAE"=>"\xE6\xB4\x8C",
+ "\x9F\xAF"=>"\xE6\xB5\xA3",
+ "\x9F\xB0"=>"\xE6\xB6\x93",
+ "\x9F\xB1"=>"\xE6\xB5\xA4",
+ "\x9F\xB2"=>"\xE6\xB5\x9A",
+ "\x9F\xB3"=>"\xE6\xB5\xB9",
+ "\x9F\xB4"=>"\xE6\xB5\x99",
+ "\x9F\xB5"=>"\xE6\xB6\x8E",
+ "\x9F\xB6"=>"\xE6\xB6\x95",
+ "\x9F\xB7"=>"\xE6\xBF\xA4",
+ "\x9F\xB8"=>"\xE6\xB6\x85",
+ "\x9F\xB9"=>"\xE6\xB7\xB9",
+ "\x9F\xBA"=>"\xE6\xB8\x95",
+ "\x9F\xBB"=>"\xE6\xB8\x8A",
+ "\x9F\xBC"=>"\xE6\xB6\xB5",
+ "\x9F\xBD"=>"\xE6\xB7\x87",
+ "\x9F\xBE"=>"\xE6\xB7\xA6",
+ "\x9F\xBF"=>"\xE6\xB6\xB8",
+ "\x9F\xC0"=>"\xE6\xB7\x86",
+ "\x9F\xC1"=>"\xE6\xB7\xAC",
+ "\x9F\xC2"=>"\xE6\xB7\x9E",
+ "\x9F\xC3"=>"\xE6\xB7\x8C",
+ "\x9F\xC4"=>"\xE6\xB7\xA8",
+ "\x9F\xC5"=>"\xE6\xB7\x92",
+ "\x9F\xC6"=>"\xE6\xB7\x85",
+ "\x9F\xC7"=>"\xE6\xB7\xBA",
+ "\x9F\xC8"=>"\xE6\xB7\x99",
+ "\x9F\xC9"=>"\xE6\xB7\xA4",
+ "\x9F\xCA"=>"\xE6\xB7\x95",
+ "\x9F\xCB"=>"\xE6\xB7\xAA",
+ "\x9F\xCC"=>"\xE6\xB7\xAE",
+ "\x9F\xCD"=>"\xE6\xB8\xAD",
+ "\x9F\xCE"=>"\xE6\xB9\xAE",
+ "\x9F\xCF"=>"\xE6\xB8\xAE",
+ "\x9F\xD0"=>"\xE6\xB8\x99",
+ "\x9F\xD1"=>"\xE6\xB9\xB2",
+ "\x9F\xD2"=>"\xE6\xB9\x9F",
+ "\x9F\xD3"=>"\xE6\xB8\xBE",
+ "\x9F\xD4"=>"\xE6\xB8\xA3",
+ "\x9F\xD5"=>"\xE6\xB9\xAB",
+ "\x9F\xD6"=>"\xE6\xB8\xAB",
+ "\x9F\xD7"=>"\xE6\xB9\xB6",
+ "\x9F\xD8"=>"\xE6\xB9\x8D",
+ "\x9F\xD9"=>"\xE6\xB8\x9F",
+ "\x9F\xDA"=>"\xE6\xB9\x83",
+ "\x9F\xDB"=>"\xE6\xB8\xBA",
+ "\x9F\xDC"=>"\xE6\xB9\x8E",
+ "\x9F\xDD"=>"\xE6\xB8\xA4",
+ "\x9F\xDE"=>"\xE6\xBB\xBF",
+ "\x9F\xDF"=>"\xE6\xB8\x9D",
+ "\x9F\xE0"=>"\xE6\xB8\xB8",
+ "\x9F\xE1"=>"\xE6\xBA\x82",
+ "\x9F\xE2"=>"\xE6\xBA\xAA",
+ "\x9F\xE3"=>"\xE6\xBA\x98",
+ "\x9F\xE4"=>"\xE6\xBB\x89",
+ "\x9F\xE5"=>"\xE6\xBA\xB7",
+ "\x9F\xE6"=>"\xE6\xBB\x93",
+ "\x9F\xE7"=>"\xE6\xBA\xBD",
+ "\x9F\xE8"=>"\xE6\xBA\xAF",
+ "\x9F\xE9"=>"\xE6\xBB\x84",
+ "\x9F\xEA"=>"\xE6\xBA\xB2",
+ "\x9F\xEB"=>"\xE6\xBB\x94",
+ "\x9F\xEC"=>"\xE6\xBB\x95",
+ "\x9F\xED"=>"\xE6\xBA\x8F",
+ "\x9F\xEE"=>"\xE6\xBA\xA5",
+ "\x9F\xEF"=>"\xE6\xBB\x82",
+ "\x9F\xF0"=>"\xE6\xBA\x9F",
+ "\x9F\xF1"=>"\xE6\xBD\x81",
+ "\x9F\xF2"=>"\xE6\xBC\x91",
+ "\x9F\xF3"=>"\xE7\x81\x8C",
+ "\x9F\xF4"=>"\xE6\xBB\xAC",
+ "\x9F\xF5"=>"\xE6\xBB\xB8",
+ "\x9F\xF6"=>"\xE6\xBB\xBE",
+ "\x9F\xF7"=>"\xE6\xBC\xBF",
+ "\x9F\xF8"=>"\xE6\xBB\xB2",
+ "\x9F\xF9"=>"\xE6\xBC\xB1",
+ "\x9F\xFA"=>"\xE6\xBB\xAF",
+ "\x9F\xFB"=>"\xE6\xBC\xB2",
+ "\x9F\xFC"=>"\xE6\xBB\x8C",
+ "\xA1"=>"\xEF\xBD\xA1",
+ "\xA2"=>"\xEF\xBD\xA2",
+ "\xA3"=>"\xEF\xBD\xA3",
+ "\xA4"=>"\xEF\xBD\xA4",
+ "\xA5"=>"\xEF\xBD\xA5",
+ "\xA6"=>"\xEF\xBD\xA6",
+ "\xA7"=>"\xEF\xBD\xA7",
+ "\xA8"=>"\xEF\xBD\xA8",
+ "\xA9"=>"\xEF\xBD\xA9",
+ "\xAA"=>"\xEF\xBD\xAA",
+ "\xAB"=>"\xEF\xBD\xAB",
+ "\xAC"=>"\xEF\xBD\xAC",
+ "\xAD"=>"\xEF\xBD\xAD",
+ "\xAE"=>"\xEF\xBD\xAE",
+ "\xAF"=>"\xEF\xBD\xAF",
+ "\xB0"=>"\xEF\xBD\xB0",
+ "\xB1"=>"\xEF\xBD\xB1",
+ "\xB2"=>"\xEF\xBD\xB2",
+ "\xB3"=>"\xEF\xBD\xB3",
+ "\xB4"=>"\xEF\xBD\xB4",
+ "\xB5"=>"\xEF\xBD\xB5",
+ "\xB6"=>"\xEF\xBD\xB6",
+ "\xB7"=>"\xEF\xBD\xB7",
+ "\xB8"=>"\xEF\xBD\xB8",
+ "\xB9"=>"\xEF\xBD\xB9",
+ "\xBA"=>"\xEF\xBD\xBA",
+ "\xBB"=>"\xEF\xBD\xBB",
+ "\xBC"=>"\xEF\xBD\xBC",
+ "\xBD"=>"\xEF\xBD\xBD",
+ "\xBE"=>"\xEF\xBD\xBE",
+ "\xBF"=>"\xEF\xBD\xBF",
+ "\xC0"=>"\xEF\xBE\x80",
+ "\xC1"=>"\xEF\xBE\x81",
+ "\xC2"=>"\xEF\xBE\x82",
+ "\xC3"=>"\xEF\xBE\x83",
+ "\xC4"=>"\xEF\xBE\x84",
+ "\xC5"=>"\xEF\xBE\x85",
+ "\xC6"=>"\xEF\xBE\x86",
+ "\xC7"=>"\xEF\xBE\x87",
+ "\xC8"=>"\xEF\xBE\x88",
+ "\xC9"=>"\xEF\xBE\x89",
+ "\xCA"=>"\xEF\xBE\x8A",
+ "\xCB"=>"\xEF\xBE\x8B",
+ "\xCC"=>"\xEF\xBE\x8C",
+ "\xCD"=>"\xEF\xBE\x8D",
+ "\xCE"=>"\xEF\xBE\x8E",
+ "\xCF"=>"\xEF\xBE\x8F",
+ "\xD0"=>"\xEF\xBE\x90",
+ "\xD1"=>"\xEF\xBE\x91",
+ "\xD2"=>"\xEF\xBE\x92",
+ "\xD3"=>"\xEF\xBE\x93",
+ "\xD4"=>"\xEF\xBE\x94",
+ "\xD5"=>"\xEF\xBE\x95",
+ "\xD6"=>"\xEF\xBE\x96",
+ "\xD7"=>"\xEF\xBE\x97",
+ "\xD8"=>"\xEF\xBE\x98",
+ "\xD9"=>"\xEF\xBE\x99",
+ "\xDA"=>"\xEF\xBE\x9A",
+ "\xDB"=>"\xEF\xBE\x9B",
+ "\xDC"=>"\xEF\xBE\x9C",
+ "\xDD"=>"\xEF\xBE\x9D",
+ "\xDE"=>"\xEF\xBE\x9E",
+ "\xDF"=>"\xEF\xBE\x9F",
+ "\xE0\x40"=>"\xE6\xBC\xBE",
+ "\xE0\x41"=>"\xE6\xBC\x93",
+ "\xE0\x42"=>"\xE6\xBB\xB7",
+ "\xE0\x43"=>"\xE6\xBE\x86",
+ "\xE0\x44"=>"\xE6\xBD\xBA",
+ "\xE0\x45"=>"\xE6\xBD\xB8",
+ "\xE0\x46"=>"\xE6\xBE\x81",
+ "\xE0\x47"=>"\xE6\xBE\x80",
+ "\xE0\x48"=>"\xE6\xBD\xAF",
+ "\xE0\x49"=>"\xE6\xBD\x9B",
+ "\xE0\x4A"=>"\xE6\xBF\xB3",
+ "\xE0\x4B"=>"\xE6\xBD\xAD",
+ "\xE0\x4C"=>"\xE6\xBE\x82",
+ "\xE0\x4D"=>"\xE6\xBD\xBC",
+ "\xE0\x4E"=>"\xE6\xBD\x98",
+ "\xE0\x4F"=>"\xE6\xBE\x8E",
+ "\xE0\x50"=>"\xE6\xBE\x91",
+ "\xE0\x51"=>"\xE6\xBF\x82",
+ "\xE0\x52"=>"\xE6\xBD\xA6",
+ "\xE0\x53"=>"\xE6\xBE\xB3",
+ "\xE0\x54"=>"\xE6\xBE\xA3",
+ "\xE0\x55"=>"\xE6\xBE\xA1",
+ "\xE0\x56"=>"\xE6\xBE\xA4",
+ "\xE0\x57"=>"\xE6\xBE\xB9",
+ "\xE0\x58"=>"\xE6\xBF\x86",
+ "\xE0\x59"=>"\xE6\xBE\xAA",
+ "\xE0\x5A"=>"\xE6\xBF\x9F",
+ "\xE0\x5B"=>"\xE6\xBF\x95",
+ "\xE0\x5C"=>"\xE6\xBF\xAC",
+ "\xE0\x5D"=>"\xE6\xBF\x94",
+ "\xE0\x5E"=>"\xE6\xBF\x98",
+ "\xE0\x5F"=>"\xE6\xBF\xB1",
+ "\xE0\x60"=>"\xE6\xBF\xAE",
+ "\xE0\x61"=>"\xE6\xBF\x9B",
+ "\xE0\x62"=>"\xE7\x80\x89",
+ "\xE0\x63"=>"\xE7\x80\x8B",
+ "\xE0\x64"=>"\xE6\xBF\xBA",
+ "\xE0\x65"=>"\xE7\x80\x91",
+ "\xE0\x66"=>"\xE7\x80\x81",
+ "\xE0\x67"=>"\xE7\x80\x8F",
+ "\xE0\x68"=>"\xE6\xBF\xBE",
+ "\xE0\x69"=>"\xE7\x80\x9B",
+ "\xE0\x6A"=>"\xE7\x80\x9A",
+ "\xE0\x6B"=>"\xE6\xBD\xB4",
+ "\xE0\x6C"=>"\xE7\x80\x9D",
+ "\xE0\x6D"=>"\xE7\x80\x98",
+ "\xE0\x6E"=>"\xE7\x80\x9F",
+ "\xE0\x6F"=>"\xE7\x80\xB0",
+ "\xE0\x70"=>"\xE7\x80\xBE",
+ "\xE0\x71"=>"\xE7\x80\xB2",
+ "\xE0\x72"=>"\xE7\x81\x91",
+ "\xE0\x73"=>"\xE7\x81\xA3",
+ "\xE0\x74"=>"\xE7\x82\x99",
+ "\xE0\x75"=>"\xE7\x82\x92",
+ "\xE0\x76"=>"\xE7\x82\xAF",
+ "\xE0\x77"=>"\xE7\x83\xB1",
+ "\xE0\x78"=>"\xE7\x82\xAC",
+ "\xE0\x79"=>"\xE7\x82\xB8",
+ "\xE0\x7A"=>"\xE7\x82\xB3",
+ "\xE0\x7B"=>"\xE7\x82\xAE",
+ "\xE0\x7C"=>"\xE7\x83\x9F",
+ "\xE0\x7D"=>"\xE7\x83\x8B",
+ "\xE0\x7E"=>"\xE7\x83\x9D",
+ "\xE0\x80"=>"\xE7\x83\x99",
+ "\xE0\x81"=>"\xE7\x84\x89",
+ "\xE0\x82"=>"\xE7\x83\xBD",
+ "\xE0\x83"=>"\xE7\x84\x9C",
+ "\xE0\x84"=>"\xE7\x84\x99",
+ "\xE0\x85"=>"\xE7\x85\xA5",
+ "\xE0\x86"=>"\xE7\x85\x95",
+ "\xE0\x87"=>"\xE7\x86\x88",
+ "\xE0\x88"=>"\xE7\x85\xA6",
+ "\xE0\x89"=>"\xE7\x85\xA2",
+ "\xE0\x8A"=>"\xE7\x85\x8C",
+ "\xE0\x8B"=>"\xE7\x85\x96",
+ "\xE0\x8C"=>"\xE7\x85\xAC",
+ "\xE0\x8D"=>"\xE7\x86\x8F",
+ "\xE0\x8E"=>"\xE7\x87\xBB",
+ "\xE0\x8F"=>"\xE7\x86\x84",
+ "\xE0\x90"=>"\xE7\x86\x95",
+ "\xE0\x91"=>"\xE7\x86\xA8",
+ "\xE0\x92"=>"\xE7\x86\xAC",
+ "\xE0\x93"=>"\xE7\x87\x97",
+ "\xE0\x94"=>"\xE7\x86\xB9",
+ "\xE0\x95"=>"\xE7\x86\xBE",
+ "\xE0\x96"=>"\xE7\x87\x92",
+ "\xE0\x97"=>"\xE7\x87\x89",
+ "\xE0\x98"=>"\xE7\x87\x94",
+ "\xE0\x99"=>"\xE7\x87\x8E",
+ "\xE0\x9A"=>"\xE7\x87\xA0",
+ "\xE0\x9B"=>"\xE7\x87\xAC",
+ "\xE0\x9C"=>"\xE7\x87\xA7",
+ "\xE0\x9D"=>"\xE7\x87\xB5",
+ "\xE0\x9E"=>"\xE7\x87\xBC",
+ "\xE0\x9F"=>"\xE7\x87\xB9",
+ "\xE0\xA0"=>"\xE7\x87\xBF",
+ "\xE0\xA1"=>"\xE7\x88\x8D",
+ "\xE0\xA2"=>"\xE7\x88\x90",
+ "\xE0\xA3"=>"\xE7\x88\x9B",
+ "\xE0\xA4"=>"\xE7\x88\xA8",
+ "\xE0\xA5"=>"\xE7\x88\xAD",
+ "\xE0\xA6"=>"\xE7\x88\xAC",
+ "\xE0\xA7"=>"\xE7\x88\xB0",
+ "\xE0\xA8"=>"\xE7\x88\xB2",
+ "\xE0\xA9"=>"\xE7\x88\xBB",
+ "\xE0\xAA"=>"\xE7\x88\xBC",
+ "\xE0\xAB"=>"\xE7\x88\xBF",
+ "\xE0\xAC"=>"\xE7\x89\x80",
+ "\xE0\xAD"=>"\xE7\x89\x86",
+ "\xE0\xAE"=>"\xE7\x89\x8B",
+ "\xE0\xAF"=>"\xE7\x89\x98",
+ "\xE0\xB0"=>"\xE7\x89\xB4",
+ "\xE0\xB1"=>"\xE7\x89\xBE",
+ "\xE0\xB2"=>"\xE7\x8A\x82",
+ "\xE0\xB3"=>"\xE7\x8A\x81",
+ "\xE0\xB4"=>"\xE7\x8A\x87",
+ "\xE0\xB5"=>"\xE7\x8A\x92",
+ "\xE0\xB6"=>"\xE7\x8A\x96",
+ "\xE0\xB7"=>"\xE7\x8A\xA2",
+ "\xE0\xB8"=>"\xE7\x8A\xA7",
+ "\xE0\xB9"=>"\xE7\x8A\xB9",
+ "\xE0\xBA"=>"\xE7\x8A\xB2",
+ "\xE0\xBB"=>"\xE7\x8B\x83",
+ "\xE0\xBC"=>"\xE7\x8B\x86",
+ "\xE0\xBD"=>"\xE7\x8B\x84",
+ "\xE0\xBE"=>"\xE7\x8B\x8E",
+ "\xE0\xBF"=>"\xE7\x8B\x92",
+ "\xE0\xC0"=>"\xE7\x8B\xA2",
+ "\xE0\xC1"=>"\xE7\x8B\xA0",
+ "\xE0\xC2"=>"\xE7\x8B\xA1",
+ "\xE0\xC3"=>"\xE7\x8B\xB9",
+ "\xE0\xC4"=>"\xE7\x8B\xB7",
+ "\xE0\xC5"=>"\xE5\x80\x8F",
+ "\xE0\xC6"=>"\xE7\x8C\x97",
+ "\xE0\xC7"=>"\xE7\x8C\x8A",
+ "\xE0\xC8"=>"\xE7\x8C\x9C",
+ "\xE0\xC9"=>"\xE7\x8C\x96",
+ "\xE0\xCA"=>"\xE7\x8C\x9D",
+ "\xE0\xCB"=>"\xE7\x8C\xB4",
+ "\xE0\xCC"=>"\xE7\x8C\xAF",
+ "\xE0\xCD"=>"\xE7\x8C\xA9",
+ "\xE0\xCE"=>"\xE7\x8C\xA5",
+ "\xE0\xCF"=>"\xE7\x8C\xBE",
+ "\xE0\xD0"=>"\xE7\x8D\x8E",
+ "\xE0\xD1"=>"\xE7\x8D\x8F",
+ "\xE0\xD2"=>"\xE9\xBB\x98",
+ "\xE0\xD3"=>"\xE7\x8D\x97",
+ "\xE0\xD4"=>"\xE7\x8D\xAA",
+ "\xE0\xD5"=>"\xE7\x8D\xA8",
+ "\xE0\xD6"=>"\xE7\x8D\xB0",
+ "\xE0\xD7"=>"\xE7\x8D\xB8",
+ "\xE0\xD8"=>"\xE7\x8D\xB5",
+ "\xE0\xD9"=>"\xE7\x8D\xBB",
+ "\xE0\xDA"=>"\xE7\x8D\xBA",
+ "\xE0\xDB"=>"\xE7\x8F\x88",
+ "\xE0\xDC"=>"\xE7\x8E\xB3",
+ "\xE0\xDD"=>"\xE7\x8F\x8E",
+ "\xE0\xDE"=>"\xE7\x8E\xBB",
+ "\xE0\xDF"=>"\xE7\x8F\x80",
+ "\xE0\xE0"=>"\xE7\x8F\xA5",
+ "\xE0\xE1"=>"\xE7\x8F\xAE",
+ "\xE0\xE2"=>"\xE7\x8F\x9E",
+ "\xE0\xE3"=>"\xE7\x92\xA2",
+ "\xE0\xE4"=>"\xE7\x90\x85",
+ "\xE0\xE5"=>"\xE7\x91\xAF",
+ "\xE0\xE6"=>"\xE7\x90\xA5",
+ "\xE0\xE7"=>"\xE7\x8F\xB8",
+ "\xE0\xE8"=>"\xE7\x90\xB2",
+ "\xE0\xE9"=>"\xE7\x90\xBA",
+ "\xE0\xEA"=>"\xE7\x91\x95",
+ "\xE0\xEB"=>"\xE7\x90\xBF",
+ "\xE0\xEC"=>"\xE7\x91\x9F",
+ "\xE0\xED"=>"\xE7\x91\x99",
+ "\xE0\xEE"=>"\xE7\x91\x81",
+ "\xE0\xEF"=>"\xE7\x91\x9C",
+ "\xE0\xF0"=>"\xE7\x91\xA9",
+ "\xE0\xF1"=>"\xE7\x91\xB0",
+ "\xE0\xF2"=>"\xE7\x91\xA3",
+ "\xE0\xF3"=>"\xE7\x91\xAA",
+ "\xE0\xF4"=>"\xE7\x91\xB6",
+ "\xE0\xF5"=>"\xE7\x91\xBE",
+ "\xE0\xF6"=>"\xE7\x92\x8B",
+ "\xE0\xF7"=>"\xE7\x92\x9E",
+ "\xE0\xF8"=>"\xE7\x92\xA7",
+ "\xE0\xF9"=>"\xE7\x93\x8A",
+ "\xE0\xFA"=>"\xE7\x93\x8F",
+ "\xE0\xFB"=>"\xE7\x93\x94",
+ "\xE0\xFC"=>"\xE7\x8F\xB1",
+ "\xE1\x40"=>"\xE7\x93\xA0",
+ "\xE1\x41"=>"\xE7\x93\xA3",
+ "\xE1\x42"=>"\xE7\x93\xA7",
+ "\xE1\x43"=>"\xE7\x93\xA9",
+ "\xE1\x44"=>"\xE7\x93\xAE",
+ "\xE1\x45"=>"\xE7\x93\xB2",
+ "\xE1\x46"=>"\xE7\x93\xB0",
+ "\xE1\x47"=>"\xE7\x93\xB1",
+ "\xE1\x48"=>"\xE7\x93\xB8",
+ "\xE1\x49"=>"\xE7\x93\xB7",
+ "\xE1\x4A"=>"\xE7\x94\x84",
+ "\xE1\x4B"=>"\xE7\x94\x83",
+ "\xE1\x4C"=>"\xE7\x94\x85",
+ "\xE1\x4D"=>"\xE7\x94\x8C",
+ "\xE1\x4E"=>"\xE7\x94\x8E",
+ "\xE1\x4F"=>"\xE7\x94\x8D",
+ "\xE1\x50"=>"\xE7\x94\x95",
+ "\xE1\x51"=>"\xE7\x94\x93",
+ "\xE1\x52"=>"\xE7\x94\x9E",
+ "\xE1\x53"=>"\xE7\x94\xA6",
+ "\xE1\x54"=>"\xE7\x94\xAC",
+ "\xE1\x55"=>"\xE7\x94\xBC",
+ "\xE1\x56"=>"\xE7\x95\x84",
+ "\xE1\x57"=>"\xE7\x95\x8D",
+ "\xE1\x58"=>"\xE7\x95\x8A",
+ "\xE1\x59"=>"\xE7\x95\x89",
+ "\xE1\x5A"=>"\xE7\x95\x9B",
+ "\xE1\x5B"=>"\xE7\x95\x86",
+ "\xE1\x5C"=>"\xE7\x95\x9A",
+ "\xE1\x5D"=>"\xE7\x95\xA9",
+ "\xE1\x5E"=>"\xE7\x95\xA4",
+ "\xE1\x5F"=>"\xE7\x95\xA7",
+ "\xE1\x60"=>"\xE7\x95\xAB",
+ "\xE1\x61"=>"\xE7\x95\xAD",
+ "\xE1\x62"=>"\xE7\x95\xB8",
+ "\xE1\x63"=>"\xE7\x95\xB6",
+ "\xE1\x64"=>"\xE7\x96\x86",
+ "\xE1\x65"=>"\xE7\x96\x87",
+ "\xE1\x66"=>"\xE7\x95\xB4",
+ "\xE1\x67"=>"\xE7\x96\x8A",
+ "\xE1\x68"=>"\xE7\x96\x89",
+ "\xE1\x69"=>"\xE7\x96\x82",
+ "\xE1\x6A"=>"\xE7\x96\x94",
+ "\xE1\x6B"=>"\xE7\x96\x9A",
+ "\xE1\x6C"=>"\xE7\x96\x9D",
+ "\xE1\x6D"=>"\xE7\x96\xA5",
+ "\xE1\x6E"=>"\xE7\x96\xA3",
+ "\xE1\x6F"=>"\xE7\x97\x82",
+ "\xE1\x70"=>"\xE7\x96\xB3",
+ "\xE1\x71"=>"\xE7\x97\x83",
+ "\xE1\x72"=>"\xE7\x96\xB5",
+ "\xE1\x73"=>"\xE7\x96\xBD",
+ "\xE1\x74"=>"\xE7\x96\xB8",
+ "\xE1\x75"=>"\xE7\x96\xBC",
+ "\xE1\x76"=>"\xE7\x96\xB1",
+ "\xE1\x77"=>"\xE7\x97\x8D",
+ "\xE1\x78"=>"\xE7\x97\x8A",
+ "\xE1\x79"=>"\xE7\x97\x92",
+ "\xE1\x7A"=>"\xE7\x97\x99",
+ "\xE1\x7B"=>"\xE7\x97\xA3",
+ "\xE1\x7C"=>"\xE7\x97\x9E",
+ "\xE1\x7D"=>"\xE7\x97\xBE",
+ "\xE1\x7E"=>"\xE7\x97\xBF",
+ "\xE1\x80"=>"\xE7\x97\xBC",
+ "\xE1\x81"=>"\xE7\x98\x81",
+ "\xE1\x82"=>"\xE7\x97\xB0",
+ "\xE1\x83"=>"\xE7\x97\xBA",
+ "\xE1\x84"=>"\xE7\x97\xB2",
+ "\xE1\x85"=>"\xE7\x97\xB3",
+ "\xE1\x86"=>"\xE7\x98\x8B",
+ "\xE1\x87"=>"\xE7\x98\x8D",
+ "\xE1\x88"=>"\xE7\x98\x89",
+ "\xE1\x89"=>"\xE7\x98\x9F",
+ "\xE1\x8A"=>"\xE7\x98\xA7",
+ "\xE1\x8B"=>"\xE7\x98\xA0",
+ "\xE1\x8C"=>"\xE7\x98\xA1",
+ "\xE1\x8D"=>"\xE7\x98\xA2",
+ "\xE1\x8E"=>"\xE7\x98\xA4",
+ "\xE1\x8F"=>"\xE7\x98\xB4",
+ "\xE1\x90"=>"\xE7\x98\xB0",
+ "\xE1\x91"=>"\xE7\x98\xBB",
+ "\xE1\x92"=>"\xE7\x99\x87",
+ "\xE1\x93"=>"\xE7\x99\x88",
+ "\xE1\x94"=>"\xE7\x99\x86",
+ "\xE1\x95"=>"\xE7\x99\x9C",
+ "\xE1\x96"=>"\xE7\x99\x98",
+ "\xE1\x97"=>"\xE7\x99\xA1",
+ "\xE1\x98"=>"\xE7\x99\xA2",
+ "\xE1\x99"=>"\xE7\x99\xA8",
+ "\xE1\x9A"=>"\xE7\x99\xA9",
+ "\xE1\x9B"=>"\xE7\x99\xAA",
+ "\xE1\x9C"=>"\xE7\x99\xA7",
+ "\xE1\x9D"=>"\xE7\x99\xAC",
+ "\xE1\x9E"=>"\xE7\x99\xB0",
+ "\xE1\x9F"=>"\xE7\x99\xB2",
+ "\xE1\xA0"=>"\xE7\x99\xB6",
+ "\xE1\xA1"=>"\xE7\x99\xB8",
+ "\xE1\xA2"=>"\xE7\x99\xBC",
+ "\xE1\xA3"=>"\xE7\x9A\x80",
+ "\xE1\xA4"=>"\xE7\x9A\x83",
+ "\xE1\xA5"=>"\xE7\x9A\x88",
+ "\xE1\xA6"=>"\xE7\x9A\x8B",
+ "\xE1\xA7"=>"\xE7\x9A\x8E",
+ "\xE1\xA8"=>"\xE7\x9A\x96",
+ "\xE1\xA9"=>"\xE7\x9A\x93",
+ "\xE1\xAA"=>"\xE7\x9A\x99",
+ "\xE1\xAB"=>"\xE7\x9A\x9A",
+ "\xE1\xAC"=>"\xE7\x9A\xB0",
+ "\xE1\xAD"=>"\xE7\x9A\xB4",
+ "\xE1\xAE"=>"\xE7\x9A\xB8",
+ "\xE1\xAF"=>"\xE7\x9A\xB9",
+ "\xE1\xB0"=>"\xE7\x9A\xBA",
+ "\xE1\xB1"=>"\xE7\x9B\x82",
+ "\xE1\xB2"=>"\xE7\x9B\x8D",
+ "\xE1\xB3"=>"\xE7\x9B\x96",
+ "\xE1\xB4"=>"\xE7\x9B\x92",
+ "\xE1\xB5"=>"\xE7\x9B\x9E",
+ "\xE1\xB6"=>"\xE7\x9B\xA1",
+ "\xE1\xB7"=>"\xE7\x9B\xA5",
+ "\xE1\xB8"=>"\xE7\x9B\xA7",
+ "\xE1\xB9"=>"\xE7\x9B\xAA",
+ "\xE1\xBA"=>"\xE8\x98\xAF",
+ "\xE1\xBB"=>"\xE7\x9B\xBB",
+ "\xE1\xBC"=>"\xE7\x9C\x88",
+ "\xE1\xBD"=>"\xE7\x9C\x87",
+ "\xE1\xBE"=>"\xE7\x9C\x84",
+ "\xE1\xBF"=>"\xE7\x9C\xA9",
+ "\xE1\xC0"=>"\xE7\x9C\xA4",
+ "\xE1\xC1"=>"\xE7\x9C\x9E",
+ "\xE1\xC2"=>"\xE7\x9C\xA5",
+ "\xE1\xC3"=>"\xE7\x9C\xA6",
+ "\xE1\xC4"=>"\xE7\x9C\x9B",
+ "\xE1\xC5"=>"\xE7\x9C\xB7",
+ "\xE1\xC6"=>"\xE7\x9C\xB8",
+ "\xE1\xC7"=>"\xE7\x9D\x87",
+ "\xE1\xC8"=>"\xE7\x9D\x9A",
+ "\xE1\xC9"=>"\xE7\x9D\xA8",
+ "\xE1\xCA"=>"\xE7\x9D\xAB",
+ "\xE1\xCB"=>"\xE7\x9D\x9B",
+ "\xE1\xCC"=>"\xE7\x9D\xA5",
+ "\xE1\xCD"=>"\xE7\x9D\xBF",
+ "\xE1\xCE"=>"\xE7\x9D\xBE",
+ "\xE1\xCF"=>"\xE7\x9D\xB9",
+ "\xE1\xD0"=>"\xE7\x9E\x8E",
+ "\xE1\xD1"=>"\xE7\x9E\x8B",
+ "\xE1\xD2"=>"\xE7\x9E\x91",
+ "\xE1\xD3"=>"\xE7\x9E\xA0",
+ "\xE1\xD4"=>"\xE7\x9E\x9E",
+ "\xE1\xD5"=>"\xE7\x9E\xB0",
+ "\xE1\xD6"=>"\xE7\x9E\xB6",
+ "\xE1\xD7"=>"\xE7\x9E\xB9",
+ "\xE1\xD8"=>"\xE7\x9E\xBF",
+ "\xE1\xD9"=>"\xE7\x9E\xBC",
+ "\xE1\xDA"=>"\xE7\x9E\xBD",
+ "\xE1\xDB"=>"\xE7\x9E\xBB",
+ "\xE1\xDC"=>"\xE7\x9F\x87",
+ "\xE1\xDD"=>"\xE7\x9F\x8D",
+ "\xE1\xDE"=>"\xE7\x9F\x97",
+ "\xE1\xDF"=>"\xE7\x9F\x9A",
+ "\xE1\xE0"=>"\xE7\x9F\x9C",
+ "\xE1\xE1"=>"\xE7\x9F\xA3",
+ "\xE1\xE2"=>"\xE7\x9F\xAE",
+ "\xE1\xE3"=>"\xE7\x9F\xBC",
+ "\xE1\xE4"=>"\xE7\xA0\x8C",
+ "\xE1\xE5"=>"\xE7\xA0\x92",
+ "\xE1\xE6"=>"\xE7\xA4\xA6",
+ "\xE1\xE7"=>"\xE7\xA0\xA0",
+ "\xE1\xE8"=>"\xE7\xA4\xAA",
+ "\xE1\xE9"=>"\xE7\xA1\x85",
+ "\xE1\xEA"=>"\xE7\xA2\x8E",
+ "\xE1\xEB"=>"\xE7\xA1\xB4",
+ "\xE1\xEC"=>"\xE7\xA2\x86",
+ "\xE1\xED"=>"\xE7\xA1\xBC",
+ "\xE1\xEE"=>"\xE7\xA2\x9A",
+ "\xE1\xEF"=>"\xE7\xA2\x8C",
+ "\xE1\xF0"=>"\xE7\xA2\xA3",
+ "\xE1\xF1"=>"\xE7\xA2\xB5",
+ "\xE1\xF2"=>"\xE7\xA2\xAA",
+ "\xE1\xF3"=>"\xE7\xA2\xAF",
+ "\xE1\xF4"=>"\xE7\xA3\x91",
+ "\xE1\xF5"=>"\xE7\xA3\x86",
+ "\xE1\xF6"=>"\xE7\xA3\x8B",
+ "\xE1\xF7"=>"\xE7\xA3\x94",
+ "\xE1\xF8"=>"\xE7\xA2\xBE",
+ "\xE1\xF9"=>"\xE7\xA2\xBC",
+ "\xE1\xFA"=>"\xE7\xA3\x85",
+ "\xE1\xFB"=>"\xE7\xA3\x8A",
+ "\xE1\xFC"=>"\xE7\xA3\xAC",
+ "\xE2\x40"=>"\xE7\xA3\xA7",
+ "\xE2\x41"=>"\xE7\xA3\x9A",
+ "\xE2\x42"=>"\xE7\xA3\xBD",
+ "\xE2\x43"=>"\xE7\xA3\xB4",
+ "\xE2\x44"=>"\xE7\xA4\x87",
+ "\xE2\x45"=>"\xE7\xA4\x92",
+ "\xE2\x46"=>"\xE7\xA4\x91",
+ "\xE2\x47"=>"\xE7\xA4\x99",
+ "\xE2\x48"=>"\xE7\xA4\xAC",
+ "\xE2\x49"=>"\xE7\xA4\xAB",
+ "\xE2\x4A"=>"\xE7\xA5\x80",
+ "\xE2\x4B"=>"\xE7\xA5\xA0",
+ "\xE2\x4C"=>"\xE7\xA5\x97",
+ "\xE2\x4D"=>"\xE7\xA5\x9F",
+ "\xE2\x4E"=>"\xE7\xA5\x9A",
+ "\xE2\x4F"=>"\xE7\xA5\x95",
+ "\xE2\x50"=>"\xE7\xA5\x93",
+ "\xE2\x51"=>"\xE7\xA5\xBA",
+ "\xE2\x52"=>"\xE7\xA5\xBF",
+ "\xE2\x53"=>"\xE7\xA6\x8A",
+ "\xE2\x54"=>"\xE7\xA6\x9D",
+ "\xE2\x55"=>"\xE7\xA6\xA7",
+ "\xE2\x56"=>"\xE9\xBD\x8B",
+ "\xE2\x57"=>"\xE7\xA6\xAA",
+ "\xE2\x58"=>"\xE7\xA6\xAE",
+ "\xE2\x59"=>"\xE7\xA6\xB3",
+ "\xE2\x5A"=>"\xE7\xA6\xB9",
+ "\xE2\x5B"=>"\xE7\xA6\xBA",
+ "\xE2\x5C"=>"\xE7\xA7\x89",
+ "\xE2\x5D"=>"\xE7\xA7\x95",
+ "\xE2\x5E"=>"\xE7\xA7\xA7",
+ "\xE2\x5F"=>"\xE7\xA7\xAC",
+ "\xE2\x60"=>"\xE7\xA7\xA1",
+ "\xE2\x61"=>"\xE7\xA7\xA3",
+ "\xE2\x62"=>"\xE7\xA8\x88",
+ "\xE2\x63"=>"\xE7\xA8\x8D",
+ "\xE2\x64"=>"\xE7\xA8\x98",
+ "\xE2\x65"=>"\xE7\xA8\x99",
+ "\xE2\x66"=>"\xE7\xA8\xA0",
+ "\xE2\x67"=>"\xE7\xA8\x9F",
+ "\xE2\x68"=>"\xE7\xA6\x80",
+ "\xE2\x69"=>"\xE7\xA8\xB1",
+ "\xE2\x6A"=>"\xE7\xA8\xBB",
+ "\xE2\x6B"=>"\xE7\xA8\xBE",
+ "\xE2\x6C"=>"\xE7\xA8\xB7",
+ "\xE2\x6D"=>"\xE7\xA9\x83",
+ "\xE2\x6E"=>"\xE7\xA9\x97",
+ "\xE2\x6F"=>"\xE7\xA9\x89",
+ "\xE2\x70"=>"\xE7\xA9\xA1",
+ "\xE2\x71"=>"\xE7\xA9\xA2",
+ "\xE2\x72"=>"\xE7\xA9\xA9",
+ "\xE2\x73"=>"\xE9\xBE\x9D",
+ "\xE2\x74"=>"\xE7\xA9\xB0",
+ "\xE2\x75"=>"\xE7\xA9\xB9",
+ "\xE2\x76"=>"\xE7\xA9\xBD",
+ "\xE2\x77"=>"\xE7\xAA\x88",
+ "\xE2\x78"=>"\xE7\xAA\x97",
+ "\xE2\x79"=>"\xE7\xAA\x95",
+ "\xE2\x7A"=>"\xE7\xAA\x98",
+ "\xE2\x7B"=>"\xE7\xAA\x96",
+ "\xE2\x7C"=>"\xE7\xAA\xA9",
+ "\xE2\x7D"=>"\xE7\xAB\x88",
+ "\xE2\x7E"=>"\xE7\xAA\xB0",
+ "\xE2\x80"=>"\xE7\xAA\xB6",
+ "\xE2\x81"=>"\xE7\xAB\x85",
+ "\xE2\x82"=>"\xE7\xAB\x84",
+ "\xE2\x83"=>"\xE7\xAA\xBF",
+ "\xE2\x84"=>"\xE9\x82\x83",
+ "\xE2\x85"=>"\xE7\xAB\x87",
+ "\xE2\x86"=>"\xE7\xAB\x8A",
+ "\xE2\x87"=>"\xE7\xAB\x8D",
+ "\xE2\x88"=>"\xE7\xAB\x8F",
+ "\xE2\x89"=>"\xE7\xAB\x95",
+ "\xE2\x8A"=>"\xE7\xAB\x93",
+ "\xE2\x8B"=>"\xE7\xAB\x99",
+ "\xE2\x8C"=>"\xE7\xAB\x9A",
+ "\xE2\x8D"=>"\xE7\xAB\x9D",
+ "\xE2\x8E"=>"\xE7\xAB\xA1",
+ "\xE2\x8F"=>"\xE7\xAB\xA2",
+ "\xE2\x90"=>"\xE7\xAB\xA6",
+ "\xE2\x91"=>"\xE7\xAB\xAD",
+ "\xE2\x92"=>"\xE7\xAB\xB0",
+ "\xE2\x93"=>"\xE7\xAC\x82",
+ "\xE2\x94"=>"\xE7\xAC\x8F",
+ "\xE2\x95"=>"\xE7\xAC\x8A",
+ "\xE2\x96"=>"\xE7\xAC\x86",
+ "\xE2\x97"=>"\xE7\xAC\xB3",
+ "\xE2\x98"=>"\xE7\xAC\x98",
+ "\xE2\x99"=>"\xE7\xAC\x99",
+ "\xE2\x9A"=>"\xE7\xAC\x9E",
+ "\xE2\x9B"=>"\xE7\xAC\xB5",
+ "\xE2\x9C"=>"\xE7\xAC\xA8",
+ "\xE2\x9D"=>"\xE7\xAC\xB6",
+ "\xE2\x9E"=>"\xE7\xAD\x90",
+ "\xE2\x9F"=>"\xE7\xAD\xBA",
+ "\xE2\xA0"=>"\xE7\xAC\x84",
+ "\xE2\xA1"=>"\xE7\xAD\x8D",
+ "\xE2\xA2"=>"\xE7\xAC\x8B",
+ "\xE2\xA3"=>"\xE7\xAD\x8C",
+ "\xE2\xA4"=>"\xE7\xAD\x85",
+ "\xE2\xA5"=>"\xE7\xAD\xB5",
+ "\xE2\xA6"=>"\xE7\xAD\xA5",
+ "\xE2\xA7"=>"\xE7\xAD\xB4",
+ "\xE2\xA8"=>"\xE7\xAD\xA7",
+ "\xE2\xA9"=>"\xE7\xAD\xB0",
+ "\xE2\xAA"=>"\xE7\xAD\xB1",
+ "\xE2\xAB"=>"\xE7\xAD\xAC",
+ "\xE2\xAC"=>"\xE7\xAD\xAE",
+ "\xE2\xAD"=>"\xE7\xAE\x9D",
+ "\xE2\xAE"=>"\xE7\xAE\x98",
+ "\xE2\xAF"=>"\xE7\xAE\x9F",
+ "\xE2\xB0"=>"\xE7\xAE\x8D",
+ "\xE2\xB1"=>"\xE7\xAE\x9C",
+ "\xE2\xB2"=>"\xE7\xAE\x9A",
+ "\xE2\xB3"=>"\xE7\xAE\x8B",
+ "\xE2\xB4"=>"\xE7\xAE\x92",
+ "\xE2\xB5"=>"\xE7\xAE\x8F",
+ "\xE2\xB6"=>"\xE7\xAD\x9D",
+ "\xE2\xB7"=>"\xE7\xAE\x99",
+ "\xE2\xB8"=>"\xE7\xAF\x8B",
+ "\xE2\xB9"=>"\xE7\xAF\x81",
+ "\xE2\xBA"=>"\xE7\xAF\x8C",
+ "\xE2\xBB"=>"\xE7\xAF\x8F",
+ "\xE2\xBC"=>"\xE7\xAE\xB4",
+ "\xE2\xBD"=>"\xE7\xAF\x86",
+ "\xE2\xBE"=>"\xE7\xAF\x9D",
+ "\xE2\xBF"=>"\xE7\xAF\xA9",
+ "\xE2\xC0"=>"\xE7\xB0\x91",
+ "\xE2\xC1"=>"\xE7\xB0\x94",
+ "\xE2\xC2"=>"\xE7\xAF\xA6",
+ "\xE2\xC3"=>"\xE7\xAF\xA5",
+ "\xE2\xC4"=>"\xE7\xB1\xA0",
+ "\xE2\xC5"=>"\xE7\xB0\x80",
+ "\xE2\xC6"=>"\xE7\xB0\x87",
+ "\xE2\xC7"=>"\xE7\xB0\x93",
+ "\xE2\xC8"=>"\xE7\xAF\xB3",
+ "\xE2\xC9"=>"\xE7\xAF\xB7",
+ "\xE2\xCA"=>"\xE7\xB0\x97",
+ "\xE2\xCB"=>"\xE7\xB0\x8D",
+ "\xE2\xCC"=>"\xE7\xAF\xB6",
+ "\xE2\xCD"=>"\xE7\xB0\xA3",
+ "\xE2\xCE"=>"\xE7\xB0\xA7",
+ "\xE2\xCF"=>"\xE7\xB0\xAA",
+ "\xE2\xD0"=>"\xE7\xB0\x9F",
+ "\xE2\xD1"=>"\xE7\xB0\xB7",
+ "\xE2\xD2"=>"\xE7\xB0\xAB",
+ "\xE2\xD3"=>"\xE7\xB0\xBD",
+ "\xE2\xD4"=>"\xE7\xB1\x8C",
+ "\xE2\xD5"=>"\xE7\xB1\x83",
+ "\xE2\xD6"=>"\xE7\xB1\x94",
+ "\xE2\xD7"=>"\xE7\xB1\x8F",
+ "\xE2\xD8"=>"\xE7\xB1\x80",
+ "\xE2\xD9"=>"\xE7\xB1\x90",
+ "\xE2\xDA"=>"\xE7\xB1\x98",
+ "\xE2\xDB"=>"\xE7\xB1\x9F",
+ "\xE2\xDC"=>"\xE7\xB1\xA4",
+ "\xE2\xDD"=>"\xE7\xB1\x96",
+ "\xE2\xDE"=>"\xE7\xB1\xA5",
+ "\xE2\xDF"=>"\xE7\xB1\xAC",
+ "\xE2\xE0"=>"\xE7\xB1\xB5",
+ "\xE2\xE1"=>"\xE7\xB2\x83",
+ "\xE2\xE2"=>"\xE7\xB2\x90",
+ "\xE2\xE3"=>"\xE7\xB2\xA4",
+ "\xE2\xE4"=>"\xE7\xB2\xAD",
+ "\xE2\xE5"=>"\xE7\xB2\xA2",
+ "\xE2\xE6"=>"\xE7\xB2\xAB",
+ "\xE2\xE7"=>"\xE7\xB2\xA1",
+ "\xE2\xE8"=>"\xE7\xB2\xA8",
+ "\xE2\xE9"=>"\xE7\xB2\xB3",
+ "\xE2\xEA"=>"\xE7\xB2\xB2",
+ "\xE2\xEB"=>"\xE7\xB2\xB1",
+ "\xE2\xEC"=>"\xE7\xB2\xAE",
+ "\xE2\xED"=>"\xE7\xB2\xB9",
+ "\xE2\xEE"=>"\xE7\xB2\xBD",
+ "\xE2\xEF"=>"\xE7\xB3\x80",
+ "\xE2\xF0"=>"\xE7\xB3\x85",
+ "\xE2\xF1"=>"\xE7\xB3\x82",
+ "\xE2\xF2"=>"\xE7\xB3\x98",
+ "\xE2\xF3"=>"\xE7\xB3\x92",
+ "\xE2\xF4"=>"\xE7\xB3\x9C",
+ "\xE2\xF5"=>"\xE7\xB3\xA2",
+ "\xE2\xF6"=>"\xE9\xAC\xBB",
+ "\xE2\xF7"=>"\xE7\xB3\xAF",
+ "\xE2\xF8"=>"\xE7\xB3\xB2",
+ "\xE2\xF9"=>"\xE7\xB3\xB4",
+ "\xE2\xFA"=>"\xE7\xB3\xB6",
+ "\xE2\xFB"=>"\xE7\xB3\xBA",
+ "\xE2\xFC"=>"\xE7\xB4\x86",
+ "\xE3\x40"=>"\xE7\xB4\x82",
+ "\xE3\x41"=>"\xE7\xB4\x9C",
+ "\xE3\x42"=>"\xE7\xB4\x95",
+ "\xE3\x43"=>"\xE7\xB4\x8A",
+ "\xE3\x44"=>"\xE7\xB5\x85",
+ "\xE3\x45"=>"\xE7\xB5\x8B",
+ "\xE3\x46"=>"\xE7\xB4\xAE",
+ "\xE3\x47"=>"\xE7\xB4\xB2",
+ "\xE3\x48"=>"\xE7\xB4\xBF",
+ "\xE3\x49"=>"\xE7\xB4\xB5",
+ "\xE3\x4A"=>"\xE7\xB5\x86",
+ "\xE3\x4B"=>"\xE7\xB5\xB3",
+ "\xE3\x4C"=>"\xE7\xB5\x96",
+ "\xE3\x4D"=>"\xE7\xB5\x8E",
+ "\xE3\x4E"=>"\xE7\xB5\xB2",
+ "\xE3\x4F"=>"\xE7\xB5\xA8",
+ "\xE3\x50"=>"\xE7\xB5\xAE",
+ "\xE3\x51"=>"\xE7\xB5\x8F",
+ "\xE3\x52"=>"\xE7\xB5\xA3",
+ "\xE3\x53"=>"\xE7\xB6\x93",
+ "\xE3\x54"=>"\xE7\xB6\x89",
+ "\xE3\x55"=>"\xE7\xB5\x9B",
+ "\xE3\x56"=>"\xE7\xB6\x8F",
+ "\xE3\x57"=>"\xE7\xB5\xBD",
+ "\xE3\x58"=>"\xE7\xB6\x9B",
+ "\xE3\x59"=>"\xE7\xB6\xBA",
+ "\xE3\x5A"=>"\xE7\xB6\xAE",
+ "\xE3\x5B"=>"\xE7\xB6\xA3",
+ "\xE3\x5C"=>"\xE7\xB6\xB5",
+ "\xE3\x5D"=>"\xE7\xB7\x87",
+ "\xE3\x5E"=>"\xE7\xB6\xBD",
+ "\xE3\x5F"=>"\xE7\xB6\xAB",
+ "\xE3\x60"=>"\xE7\xB8\xBD",
+ "\xE3\x61"=>"\xE7\xB6\xA2",
+ "\xE3\x62"=>"\xE7\xB6\xAF",
+ "\xE3\x63"=>"\xE7\xB7\x9C",
+ "\xE3\x64"=>"\xE7\xB6\xB8",
+ "\xE3\x65"=>"\xE7\xB6\x9F",
+ "\xE3\x66"=>"\xE7\xB6\xB0",
+ "\xE3\x67"=>"\xE7\xB7\x98",
+ "\xE3\x68"=>"\xE7\xB7\x9D",
+ "\xE3\x69"=>"\xE7\xB7\xA4",
+ "\xE3\x6A"=>"\xE7\xB7\x9E",
+ "\xE3\x6B"=>"\xE7\xB7\xBB",
+ "\xE3\x6C"=>"\xE7\xB7\xB2",
+ "\xE3\x6D"=>"\xE7\xB7\xA1",
+ "\xE3\x6E"=>"\xE7\xB8\x85",
+ "\xE3\x6F"=>"\xE7\xB8\x8A",
+ "\xE3\x70"=>"\xE7\xB8\xA3",
+ "\xE3\x71"=>"\xE7\xB8\xA1",
+ "\xE3\x72"=>"\xE7\xB8\x92",
+ "\xE3\x73"=>"\xE7\xB8\xB1",
+ "\xE3\x74"=>"\xE7\xB8\x9F",
+ "\xE3\x75"=>"\xE7\xB8\x89",
+ "\xE3\x76"=>"\xE7\xB8\x8B",
+ "\xE3\x77"=>"\xE7\xB8\xA2",
+ "\xE3\x78"=>"\xE7\xB9\x86",
+ "\xE3\x79"=>"\xE7\xB9\xA6",
+ "\xE3\x7A"=>"\xE7\xB8\xBB",
+ "\xE3\x7B"=>"\xE7\xB8\xB5",
+ "\xE3\x7C"=>"\xE7\xB8\xB9",
+ "\xE3\x7D"=>"\xE7\xB9\x83",
+ "\xE3\x7E"=>"\xE7\xB8\xB7",
+ "\xE3\x80"=>"\xE7\xB8\xB2",
+ "\xE3\x81"=>"\xE7\xB8\xBA",
+ "\xE3\x82"=>"\xE7\xB9\xA7",
+ "\xE3\x83"=>"\xE7\xB9\x9D",
+ "\xE3\x84"=>"\xE7\xB9\x96",
+ "\xE3\x85"=>"\xE7\xB9\x9E",
+ "\xE3\x86"=>"\xE7\xB9\x99",
+ "\xE3\x87"=>"\xE7\xB9\x9A",
+ "\xE3\x88"=>"\xE7\xB9\xB9",
+ "\xE3\x89"=>"\xE7\xB9\xAA",
+ "\xE3\x8A"=>"\xE7\xB9\xA9",
+ "\xE3\x8B"=>"\xE7\xB9\xBC",
+ "\xE3\x8C"=>"\xE7\xB9\xBB",
+ "\xE3\x8D"=>"\xE7\xBA\x83",
+ "\xE3\x8E"=>"\xE7\xB7\x95",
+ "\xE3\x8F"=>"\xE7\xB9\xBD",
+ "\xE3\x90"=>"\xE8\xBE\xAE",
+ "\xE3\x91"=>"\xE7\xB9\xBF",
+ "\xE3\x92"=>"\xE7\xBA\x88",
+ "\xE3\x93"=>"\xE7\xBA\x89",
+ "\xE3\x94"=>"\xE7\xBA\x8C",
+ "\xE3\x95"=>"\xE7\xBA\x92",
+ "\xE3\x96"=>"\xE7\xBA\x90",
+ "\xE3\x97"=>"\xE7\xBA\x93",
+ "\xE3\x98"=>"\xE7\xBA\x94",
+ "\xE3\x99"=>"\xE7\xBA\x96",
+ "\xE3\x9A"=>"\xE7\xBA\x8E",
+ "\xE3\x9B"=>"\xE7\xBA\x9B",
+ "\xE3\x9C"=>"\xE7\xBA\x9C",
+ "\xE3\x9D"=>"\xE7\xBC\xB8",
+ "\xE3\x9E"=>"\xE7\xBC\xBA",
+ "\xE3\x9F"=>"\xE7\xBD\x85",
+ "\xE3\xA0"=>"\xE7\xBD\x8C",
+ "\xE3\xA1"=>"\xE7\xBD\x8D",
+ "\xE3\xA2"=>"\xE7\xBD\x8E",
+ "\xE3\xA3"=>"\xE7\xBD\x90",
+ "\xE3\xA4"=>"\xE7\xBD\x91",
+ "\xE3\xA5"=>"\xE7\xBD\x95",
+ "\xE3\xA6"=>"\xE7\xBD\x94",
+ "\xE3\xA7"=>"\xE7\xBD\x98",
+ "\xE3\xA8"=>"\xE7\xBD\x9F",
+ "\xE3\xA9"=>"\xE7\xBD\xA0",
+ "\xE3\xAA"=>"\xE7\xBD\xA8",
+ "\xE3\xAB"=>"\xE7\xBD\xA9",
+ "\xE3\xAC"=>"\xE7\xBD\xA7",
+ "\xE3\xAD"=>"\xE7\xBD\xB8",
+ "\xE3\xAE"=>"\xE7\xBE\x82",
+ "\xE3\xAF"=>"\xE7\xBE\x86",
+ "\xE3\xB0"=>"\xE7\xBE\x83",
+ "\xE3\xB1"=>"\xE7\xBE\x88",
+ "\xE3\xB2"=>"\xE7\xBE\x87",
+ "\xE3\xB3"=>"\xE7\xBE\x8C",
+ "\xE3\xB4"=>"\xE7\xBE\x94",
+ "\xE3\xB5"=>"\xE7\xBE\x9E",
+ "\xE3\xB6"=>"\xE7\xBE\x9D",
+ "\xE3\xB7"=>"\xE7\xBE\x9A",
+ "\xE3\xB8"=>"\xE7\xBE\xA3",
+ "\xE3\xB9"=>"\xE7\xBE\xAF",
+ "\xE3\xBA"=>"\xE7\xBE\xB2",
+ "\xE3\xBB"=>"\xE7\xBE\xB9",
+ "\xE3\xBC"=>"\xE7\xBE\xAE",
+ "\xE3\xBD"=>"\xE7\xBE\xB6",
+ "\xE3\xBE"=>"\xE7\xBE\xB8",
+ "\xE3\xBF"=>"\xE8\xAD\xB1",
+ "\xE3\xC0"=>"\xE7\xBF\x85",
+ "\xE3\xC1"=>"\xE7\xBF\x86",
+ "\xE3\xC2"=>"\xE7\xBF\x8A",
+ "\xE3\xC3"=>"\xE7\xBF\x95",
+ "\xE3\xC4"=>"\xE7\xBF\x94",
+ "\xE3\xC5"=>"\xE7\xBF\xA1",
+ "\xE3\xC6"=>"\xE7\xBF\xA6",
+ "\xE3\xC7"=>"\xE7\xBF\xA9",
+ "\xE3\xC8"=>"\xE7\xBF\xB3",
+ "\xE3\xC9"=>"\xE7\xBF\xB9",
+ "\xE3\xCA"=>"\xE9\xA3\x9C",
+ "\xE3\xCB"=>"\xE8\x80\x86",
+ "\xE3\xCC"=>"\xE8\x80\x84",
+ "\xE3\xCD"=>"\xE8\x80\x8B",
+ "\xE3\xCE"=>"\xE8\x80\x92",
+ "\xE3\xCF"=>"\xE8\x80\x98",
+ "\xE3\xD0"=>"\xE8\x80\x99",
+ "\xE3\xD1"=>"\xE8\x80\x9C",
+ "\xE3\xD2"=>"\xE8\x80\xA1",
+ "\xE3\xD3"=>"\xE8\x80\xA8",
+ "\xE3\xD4"=>"\xE8\x80\xBF",
+ "\xE3\xD5"=>"\xE8\x80\xBB",
+ "\xE3\xD6"=>"\xE8\x81\x8A",
+ "\xE3\xD7"=>"\xE8\x81\x86",
+ "\xE3\xD8"=>"\xE8\x81\x92",
+ "\xE3\xD9"=>"\xE8\x81\x98",
+ "\xE3\xDA"=>"\xE8\x81\x9A",
+ "\xE3\xDB"=>"\xE8\x81\x9F",
+ "\xE3\xDC"=>"\xE8\x81\xA2",
+ "\xE3\xDD"=>"\xE8\x81\xA8",
+ "\xE3\xDE"=>"\xE8\x81\xB3",
+ "\xE3\xDF"=>"\xE8\x81\xB2",
+ "\xE3\xE0"=>"\xE8\x81\xB0",
+ "\xE3\xE1"=>"\xE8\x81\xB6",
+ "\xE3\xE2"=>"\xE8\x81\xB9",
+ "\xE3\xE3"=>"\xE8\x81\xBD",
+ "\xE3\xE4"=>"\xE8\x81\xBF",
+ "\xE3\xE5"=>"\xE8\x82\x84",
+ "\xE3\xE6"=>"\xE8\x82\x86",
+ "\xE3\xE7"=>"\xE8\x82\x85",
+ "\xE3\xE8"=>"\xE8\x82\x9B",
+ "\xE3\xE9"=>"\xE8\x82\x93",
+ "\xE3\xEA"=>"\xE8\x82\x9A",
+ "\xE3\xEB"=>"\xE8\x82\xAD",
+ "\xE3\xEC"=>"\xE5\x86\x90",
+ "\xE3\xED"=>"\xE8\x82\xAC",
+ "\xE3\xEE"=>"\xE8\x83\x9B",
+ "\xE3\xEF"=>"\xE8\x83\xA5",
+ "\xE3\xF0"=>"\xE8\x83\x99",
+ "\xE3\xF1"=>"\xE8\x83\x9D",
+ "\xE3\xF2"=>"\xE8\x83\x84",
+ "\xE3\xF3"=>"\xE8\x83\x9A",
+ "\xE3\xF4"=>"\xE8\x83\x96",
+ "\xE3\xF5"=>"\xE8\x84\x89",
+ "\xE3\xF6"=>"\xE8\x83\xAF",
+ "\xE3\xF7"=>"\xE8\x83\xB1",
+ "\xE3\xF8"=>"\xE8\x84\x9B",
+ "\xE3\xF9"=>"\xE8\x84\xA9",
+ "\xE3\xFA"=>"\xE8\x84\xA3",
+ "\xE3\xFB"=>"\xE8\x84\xAF",
+ "\xE3\xFC"=>"\xE8\x85\x8B",
+ "\xE4\x40"=>"\xE9\x9A\x8B",
+ "\xE4\x41"=>"\xE8\x85\x86",
+ "\xE4\x42"=>"\xE8\x84\xBE",
+ "\xE4\x43"=>"\xE8\x85\x93",
+ "\xE4\x44"=>"\xE8\x85\x91",
+ "\xE4\x45"=>"\xE8\x83\xBC",
+ "\xE4\x46"=>"\xE8\x85\xB1",
+ "\xE4\x47"=>"\xE8\x85\xAE",
+ "\xE4\x48"=>"\xE8\x85\xA5",
+ "\xE4\x49"=>"\xE8\x85\xA6",
+ "\xE4\x4A"=>"\xE8\x85\xB4",
+ "\xE4\x4B"=>"\xE8\x86\x83",
+ "\xE4\x4C"=>"\xE8\x86\x88",
+ "\xE4\x4D"=>"\xE8\x86\x8A",
+ "\xE4\x4E"=>"\xE8\x86\x80",
+ "\xE4\x4F"=>"\xE8\x86\x82",
+ "\xE4\x50"=>"\xE8\x86\xA0",
+ "\xE4\x51"=>"\xE8\x86\x95",
+ "\xE4\x52"=>"\xE8\x86\xA4",
+ "\xE4\x53"=>"\xE8\x86\xA3",
+ "\xE4\x54"=>"\xE8\x85\x9F",
+ "\xE4\x55"=>"\xE8\x86\x93",
+ "\xE4\x56"=>"\xE8\x86\xA9",
+ "\xE4\x57"=>"\xE8\x86\xB0",
+ "\xE4\x58"=>"\xE8\x86\xB5",
+ "\xE4\x59"=>"\xE8\x86\xBE",
+ "\xE4\x5A"=>"\xE8\x86\xB8",
+ "\xE4\x5B"=>"\xE8\x86\xBD",
+ "\xE4\x5C"=>"\xE8\x87\x80",
+ "\xE4\x5D"=>"\xE8\x87\x82",
+ "\xE4\x5E"=>"\xE8\x86\xBA",
+ "\xE4\x5F"=>"\xE8\x87\x89",
+ "\xE4\x60"=>"\xE8\x87\x8D",
+ "\xE4\x61"=>"\xE8\x87\x91",
+ "\xE4\x62"=>"\xE8\x87\x99",
+ "\xE4\x63"=>"\xE8\x87\x98",
+ "\xE4\x64"=>"\xE8\x87\x88",
+ "\xE4\x65"=>"\xE8\x87\x9A",
+ "\xE4\x66"=>"\xE8\x87\x9F",
+ "\xE4\x67"=>"\xE8\x87\xA0",
+ "\xE4\x68"=>"\xE8\x87\xA7",
+ "\xE4\x69"=>"\xE8\x87\xBA",
+ "\xE4\x6A"=>"\xE8\x87\xBB",
+ "\xE4\x6B"=>"\xE8\x87\xBE",
+ "\xE4\x6C"=>"\xE8\x88\x81",
+ "\xE4\x6D"=>"\xE8\x88\x82",
+ "\xE4\x6E"=>"\xE8\x88\x85",
+ "\xE4\x6F"=>"\xE8\x88\x87",
+ "\xE4\x70"=>"\xE8\x88\x8A",
+ "\xE4\x71"=>"\xE8\x88\x8D",
+ "\xE4\x72"=>"\xE8\x88\x90",
+ "\xE4\x73"=>"\xE8\x88\x96",
+ "\xE4\x74"=>"\xE8\x88\xA9",
+ "\xE4\x75"=>"\xE8\x88\xAB",
+ "\xE4\x76"=>"\xE8\x88\xB8",
+ "\xE4\x77"=>"\xE8\x88\xB3",
+ "\xE4\x78"=>"\xE8\x89\x80",
+ "\xE4\x79"=>"\xE8\x89\x99",
+ "\xE4\x7A"=>"\xE8\x89\x98",
+ "\xE4\x7B"=>"\xE8\x89\x9D",
+ "\xE4\x7C"=>"\xE8\x89\x9A",
+ "\xE4\x7D"=>"\xE8\x89\x9F",
+ "\xE4\x7E"=>"\xE8\x89\xA4",
+ "\xE4\x80"=>"\xE8\x89\xA2",
+ "\xE4\x81"=>"\xE8\x89\xA8",
+ "\xE4\x82"=>"\xE8\x89\xAA",
+ "\xE4\x83"=>"\xE8\x89\xAB",
+ "\xE4\x84"=>"\xE8\x88\xAE",
+ "\xE4\x85"=>"\xE8\x89\xB1",
+ "\xE4\x86"=>"\xE8\x89\xB7",
+ "\xE4\x87"=>"\xE8\x89\xB8",
+ "\xE4\x88"=>"\xE8\x89\xBE",
+ "\xE4\x89"=>"\xE8\x8A\x8D",
+ "\xE4\x8A"=>"\xE8\x8A\x92",
+ "\xE4\x8B"=>"\xE8\x8A\xAB",
+ "\xE4\x8C"=>"\xE8\x8A\x9F",
+ "\xE4\x8D"=>"\xE8\x8A\xBB",
+ "\xE4\x8E"=>"\xE8\x8A\xAC",
+ "\xE4\x8F"=>"\xE8\x8B\xA1",
+ "\xE4\x90"=>"\xE8\x8B\xA3",
+ "\xE4\x91"=>"\xE8\x8B\x9F",
+ "\xE4\x92"=>"\xE8\x8B\x92",
+ "\xE4\x93"=>"\xE8\x8B\xB4",
+ "\xE4\x94"=>"\xE8\x8B\xB3",
+ "\xE4\x95"=>"\xE8\x8B\xBA",
+ "\xE4\x96"=>"\xE8\x8E\x93",
+ "\xE4\x97"=>"\xE8\x8C\x83",
+ "\xE4\x98"=>"\xE8\x8B\xBB",
+ "\xE4\x99"=>"\xE8\x8B\xB9",
+ "\xE4\x9A"=>"\xE8\x8B\x9E",
+ "\xE4\x9B"=>"\xE8\x8C\x86",
+ "\xE4\x9C"=>"\xE8\x8B\x9C",
+ "\xE4\x9D"=>"\xE8\x8C\x89",
+ "\xE4\x9E"=>"\xE8\x8B\x99",
+ "\xE4\x9F"=>"\xE8\x8C\xB5",
+ "\xE4\xA0"=>"\xE8\x8C\xB4",
+ "\xE4\xA1"=>"\xE8\x8C\x96",
+ "\xE4\xA2"=>"\xE8\x8C\xB2",
+ "\xE4\xA3"=>"\xE8\x8C\xB1",
+ "\xE4\xA4"=>"\xE8\x8D\x80",
+ "\xE4\xA5"=>"\xE8\x8C\xB9",
+ "\xE4\xA6"=>"\xE8\x8D\x90",
+ "\xE4\xA7"=>"\xE8\x8D\x85",
+ "\xE4\xA8"=>"\xE8\x8C\xAF",
+ "\xE4\xA9"=>"\xE8\x8C\xAB",
+ "\xE4\xAA"=>"\xE8\x8C\x97",
+ "\xE4\xAB"=>"\xE8\x8C\x98",
+ "\xE4\xAC"=>"\xE8\x8E\x85",
+ "\xE4\xAD"=>"\xE8\x8E\x9A",
+ "\xE4\xAE"=>"\xE8\x8E\xAA",
+ "\xE4\xAF"=>"\xE8\x8E\x9F",
+ "\xE4\xB0"=>"\xE8\x8E\xA2",
+ "\xE4\xB1"=>"\xE8\x8E\x96",
+ "\xE4\xB2"=>"\xE8\x8C\xA3",
+ "\xE4\xB3"=>"\xE8\x8E\x8E",
+ "\xE4\xB4"=>"\xE8\x8E\x87",
+ "\xE4\xB5"=>"\xE8\x8E\x8A",
+ "\xE4\xB6"=>"\xE8\x8D\xBC",
+ "\xE4\xB7"=>"\xE8\x8E\xB5",
+ "\xE4\xB8"=>"\xE8\x8D\xB3",
+ "\xE4\xB9"=>"\xE8\x8D\xB5",
+ "\xE4\xBA"=>"\xE8\x8E\xA0",
+ "\xE4\xBB"=>"\xE8\x8E\x89",
+ "\xE4\xBC"=>"\xE8\x8E\xA8",
+ "\xE4\xBD"=>"\xE8\x8F\xB4",
+ "\xE4\xBE"=>"\xE8\x90\x93",
+ "\xE4\xBF"=>"\xE8\x8F\xAB",
+ "\xE4\xC0"=>"\xE8\x8F\x8E",
+ "\xE4\xC1"=>"\xE8\x8F\xBD",
+ "\xE4\xC2"=>"\xE8\x90\x83",
+ "\xE4\xC3"=>"\xE8\x8F\x98",
+ "\xE4\xC4"=>"\xE8\x90\x8B",
+ "\xE4\xC5"=>"\xE8\x8F\x81",
+ "\xE4\xC6"=>"\xE8\x8F\xB7",
+ "\xE4\xC7"=>"\xE8\x90\x87",
+ "\xE4\xC8"=>"\xE8\x8F\xA0",
+ "\xE4\xC9"=>"\xE8\x8F\xB2",
+ "\xE4\xCA"=>"\xE8\x90\x8D",
+ "\xE4\xCB"=>"\xE8\x90\xA2",
+ "\xE4\xCC"=>"\xE8\x90\xA0",
+ "\xE4\xCD"=>"\xE8\x8E\xBD",
+ "\xE4\xCE"=>"\xE8\x90\xB8",
+ "\xE4\xCF"=>"\xE8\x94\x86",
+ "\xE4\xD0"=>"\xE8\x8F\xBB",
+ "\xE4\xD1"=>"\xE8\x91\xAD",
+ "\xE4\xD2"=>"\xE8\x90\xAA",
+ "\xE4\xD3"=>"\xE8\x90\xBC",
+ "\xE4\xD4"=>"\xE8\x95\x9A",
+ "\xE4\xD5"=>"\xE8\x92\x84",
+ "\xE4\xD6"=>"\xE8\x91\xB7",
+ "\xE4\xD7"=>"\xE8\x91\xAB",
+ "\xE4\xD8"=>"\xE8\x92\xAD",
+ "\xE4\xD9"=>"\xE8\x91\xAE",
+ "\xE4\xDA"=>"\xE8\x92\x82",
+ "\xE4\xDB"=>"\xE8\x91\xA9",
+ "\xE4\xDC"=>"\xE8\x91\x86",
+ "\xE4\xDD"=>"\xE8\x90\xAC",
+ "\xE4\xDE"=>"\xE8\x91\xAF",
+ "\xE4\xDF"=>"\xE8\x91\xB9",
+ "\xE4\xE0"=>"\xE8\x90\xB5",
+ "\xE4\xE1"=>"\xE8\x93\x8A",
+ "\xE4\xE2"=>"\xE8\x91\xA2",
+ "\xE4\xE3"=>"\xE8\x92\xB9",
+ "\xE4\xE4"=>"\xE8\x92\xBF",
+ "\xE4\xE5"=>"\xE8\x92\x9F",
+ "\xE4\xE6"=>"\xE8\x93\x99",
+ "\xE4\xE7"=>"\xE8\x93\x8D",
+ "\xE4\xE8"=>"\xE8\x92\xBB",
+ "\xE4\xE9"=>"\xE8\x93\x9A",
+ "\xE4\xEA"=>"\xE8\x93\x90",
+ "\xE4\xEB"=>"\xE8\x93\x81",
+ "\xE4\xEC"=>"\xE8\x93\x86",
+ "\xE4\xED"=>"\xE8\x93\x96",
+ "\xE4\xEE"=>"\xE8\x92\xA1",
+ "\xE4\xEF"=>"\xE8\x94\xA1",
+ "\xE4\xF0"=>"\xE8\x93\xBF",
+ "\xE4\xF1"=>"\xE8\x93\xB4",
+ "\xE4\xF2"=>"\xE8\x94\x97",
+ "\xE4\xF3"=>"\xE8\x94\x98",
+ "\xE4\xF4"=>"\xE8\x94\xAC",
+ "\xE4\xF5"=>"\xE8\x94\x9F",
+ "\xE4\xF6"=>"\xE8\x94\x95",
+ "\xE4\xF7"=>"\xE8\x94\x94",
+ "\xE4\xF8"=>"\xE8\x93\xBC",
+ "\xE4\xF9"=>"\xE8\x95\x80",
+ "\xE4\xFA"=>"\xE8\x95\xA3",
+ "\xE4\xFB"=>"\xE8\x95\x98",
+ "\xE4\xFC"=>"\xE8\x95\x88",
+ "\xE5\x40"=>"\xE8\x95\x81",
+ "\xE5\x41"=>"\xE8\x98\x82",
+ "\xE5\x42"=>"\xE8\x95\x8B",
+ "\xE5\x43"=>"\xE8\x95\x95",
+ "\xE5\x44"=>"\xE8\x96\x80",
+ "\xE5\x45"=>"\xE8\x96\xA4",
+ "\xE5\x46"=>"\xE8\x96\x88",
+ "\xE5\x47"=>"\xE8\x96\x91",
+ "\xE5\x48"=>"\xE8\x96\x8A",
+ "\xE5\x49"=>"\xE8\x96\xA8",
+ "\xE5\x4A"=>"\xE8\x95\xAD",
+ "\xE5\x4B"=>"\xE8\x96\x94",
+ "\xE5\x4C"=>"\xE8\x96\x9B",
+ "\xE5\x4D"=>"\xE8\x97\xAA",
+ "\xE5\x4E"=>"\xE8\x96\x87",
+ "\xE5\x4F"=>"\xE8\x96\x9C",
+ "\xE5\x50"=>"\xE8\x95\xB7",
+ "\xE5\x51"=>"\xE8\x95\xBE",
+ "\xE5\x52"=>"\xE8\x96\x90",
+ "\xE5\x53"=>"\xE8\x97\x89",
+ "\xE5\x54"=>"\xE8\x96\xBA",
+ "\xE5\x55"=>"\xE8\x97\x8F",
+ "\xE5\x56"=>"\xE8\x96\xB9",
+ "\xE5\x57"=>"\xE8\x97\x90",
+ "\xE5\x58"=>"\xE8\x97\x95",
+ "\xE5\x59"=>"\xE8\x97\x9D",
+ "\xE5\x5A"=>"\xE8\x97\xA5",
+ "\xE5\x5B"=>"\xE8\x97\x9C",
+ "\xE5\x5C"=>"\xE8\x97\xB9",
+ "\xE5\x5D"=>"\xE8\x98\x8A",
+ "\xE5\x5E"=>"\xE8\x98\x93",
+ "\xE5\x5F"=>"\xE8\x98\x8B",
+ "\xE5\x60"=>"\xE8\x97\xBE",
+ "\xE5\x61"=>"\xE8\x97\xBA",
+ "\xE5\x62"=>"\xE8\x98\x86",
+ "\xE5\x63"=>"\xE8\x98\xA2",
+ "\xE5\x64"=>"\xE8\x98\x9A",
+ "\xE5\x65"=>"\xE8\x98\xB0",
+ "\xE5\x66"=>"\xE8\x98\xBF",
+ "\xE5\x67"=>"\xE8\x99\x8D",
+ "\xE5\x68"=>"\xE4\xB9\x95",
+ "\xE5\x69"=>"\xE8\x99\x94",
+ "\xE5\x6A"=>"\xE8\x99\x9F",
+ "\xE5\x6B"=>"\xE8\x99\xA7",
+ "\xE5\x6C"=>"\xE8\x99\xB1",
+ "\xE5\x6D"=>"\xE8\x9A\x93",
+ "\xE5\x6E"=>"\xE8\x9A\xA3",
+ "\xE5\x6F"=>"\xE8\x9A\xA9",
+ "\xE5\x70"=>"\xE8\x9A\xAA",
+ "\xE5\x71"=>"\xE8\x9A\x8B",
+ "\xE5\x72"=>"\xE8\x9A\x8C",
+ "\xE5\x73"=>"\xE8\x9A\xB6",
+ "\xE5\x74"=>"\xE8\x9A\xAF",
+ "\xE5\x75"=>"\xE8\x9B\x84",
+ "\xE5\x76"=>"\xE8\x9B\x86",
+ "\xE5\x77"=>"\xE8\x9A\xB0",
+ "\xE5\x78"=>"\xE8\x9B\x89",
+ "\xE5\x79"=>"\xE8\xA0\xA3",
+ "\xE5\x7A"=>"\xE8\x9A\xAB",
+ "\xE5\x7B"=>"\xE8\x9B\x94",
+ "\xE5\x7C"=>"\xE8\x9B\x9E",
+ "\xE5\x7D"=>"\xE8\x9B\xA9",
+ "\xE5\x7E"=>"\xE8\x9B\xAC",
+ "\xE5\x80"=>"\xE8\x9B\x9F",
+ "\xE5\x81"=>"\xE8\x9B\x9B",
+ "\xE5\x82"=>"\xE8\x9B\xAF",
+ "\xE5\x83"=>"\xE8\x9C\x92",
+ "\xE5\x84"=>"\xE8\x9C\x86",
+ "\xE5\x85"=>"\xE8\x9C\x88",
+ "\xE5\x86"=>"\xE8\x9C\x80",
+ "\xE5\x87"=>"\xE8\x9C\x83",
+ "\xE5\x88"=>"\xE8\x9B\xBB",
+ "\xE5\x89"=>"\xE8\x9C\x91",
+ "\xE5\x8A"=>"\xE8\x9C\x89",
+ "\xE5\x8B"=>"\xE8\x9C\x8D",
+ "\xE5\x8C"=>"\xE8\x9B\xB9",
+ "\xE5\x8D"=>"\xE8\x9C\x8A",
+ "\xE5\x8E"=>"\xE8\x9C\xB4",
+ "\xE5\x8F"=>"\xE8\x9C\xBF",
+ "\xE5\x90"=>"\xE8\x9C\xB7",
+ "\xE5\x91"=>"\xE8\x9C\xBB",
+ "\xE5\x92"=>"\xE8\x9C\xA5",
+ "\xE5\x93"=>"\xE8\x9C\xA9",
+ "\xE5\x94"=>"\xE8\x9C\x9A",
+ "\xE5\x95"=>"\xE8\x9D\xA0",
+ "\xE5\x96"=>"\xE8\x9D\x9F",
+ "\xE5\x97"=>"\xE8\x9D\xB8",
+ "\xE5\x98"=>"\xE8\x9D\x8C",
+ "\xE5\x99"=>"\xE8\x9D\x8E",
+ "\xE5\x9A"=>"\xE8\x9D\xB4",
+ "\xE5\x9B"=>"\xE8\x9D\x97",
+ "\xE5\x9C"=>"\xE8\x9D\xA8",
+ "\xE5\x9D"=>"\xE8\x9D\xAE",
+ "\xE5\x9E"=>"\xE8\x9D\x99",
+ "\xE5\x9F"=>"\xE8\x9D\x93",
+ "\xE5\xA0"=>"\xE8\x9D\xA3",
+ "\xE5\xA1"=>"\xE8\x9D\xAA",
+ "\xE5\xA2"=>"\xE8\xA0\x85",
+ "\xE5\xA3"=>"\xE8\x9E\xA2",
+ "\xE5\xA4"=>"\xE8\x9E\x9F",
+ "\xE5\xA5"=>"\xE8\x9E\x82",
+ "\xE5\xA6"=>"\xE8\x9E\xAF",
+ "\xE5\xA7"=>"\xE8\x9F\x8B",
+ "\xE5\xA8"=>"\xE8\x9E\xBD",
+ "\xE5\xA9"=>"\xE8\x9F\x80",
+ "\xE5\xAA"=>"\xE8\x9F\x90",
+ "\xE5\xAB"=>"\xE9\x9B\x96",
+ "\xE5\xAC"=>"\xE8\x9E\xAB",
+ "\xE5\xAD"=>"\xE8\x9F\x84",
+ "\xE5\xAE"=>"\xE8\x9E\xB3",
+ "\xE5\xAF"=>"\xE8\x9F\x87",
+ "\xE5\xB0"=>"\xE8\x9F\x86",
+ "\xE5\xB1"=>"\xE8\x9E\xBB",
+ "\xE5\xB2"=>"\xE8\x9F\xAF",
+ "\xE5\xB3"=>"\xE8\x9F\xB2",
+ "\xE5\xB4"=>"\xE8\x9F\xA0",
+ "\xE5\xB5"=>"\xE8\xA0\x8F",
+ "\xE5\xB6"=>"\xE8\xA0\x8D",
+ "\xE5\xB7"=>"\xE8\x9F\xBE",
+ "\xE5\xB8"=>"\xE8\x9F\xB6",
+ "\xE5\xB9"=>"\xE8\x9F\xB7",
+ "\xE5\xBA"=>"\xE8\xA0\x8E",
+ "\xE5\xBB"=>"\xE8\x9F\x92",
+ "\xE5\xBC"=>"\xE8\xA0\x91",
+ "\xE5\xBD"=>"\xE8\xA0\x96",
+ "\xE5\xBE"=>"\xE8\xA0\x95",
+ "\xE5\xBF"=>"\xE8\xA0\xA2",
+ "\xE5\xC0"=>"\xE8\xA0\xA1",
+ "\xE5\xC1"=>"\xE8\xA0\xB1",
+ "\xE5\xC2"=>"\xE8\xA0\xB6",
+ "\xE5\xC3"=>"\xE8\xA0\xB9",
+ "\xE5\xC4"=>"\xE8\xA0\xA7",
+ "\xE5\xC5"=>"\xE8\xA0\xBB",
+ "\xE5\xC6"=>"\xE8\xA1\x84",
+ "\xE5\xC7"=>"\xE8\xA1\x82",
+ "\xE5\xC8"=>"\xE8\xA1\x92",
+ "\xE5\xC9"=>"\xE8\xA1\x99",
+ "\xE5\xCA"=>"\xE8\xA1\x9E",
+ "\xE5\xCB"=>"\xE8\xA1\xA2",
+ "\xE5\xCC"=>"\xE8\xA1\xAB",
+ "\xE5\xCD"=>"\xE8\xA2\x81",
+ "\xE5\xCE"=>"\xE8\xA1\xBE",
+ "\xE5\xCF"=>"\xE8\xA2\x9E",
+ "\xE5\xD0"=>"\xE8\xA1\xB5",
+ "\xE5\xD1"=>"\xE8\xA1\xBD",
+ "\xE5\xD2"=>"\xE8\xA2\xB5",
+ "\xE5\xD3"=>"\xE8\xA1\xB2",
+ "\xE5\xD4"=>"\xE8\xA2\x82",
+ "\xE5\xD5"=>"\xE8\xA2\x97",
+ "\xE5\xD6"=>"\xE8\xA2\x92",
+ "\xE5\xD7"=>"\xE8\xA2\xAE",
+ "\xE5\xD8"=>"\xE8\xA2\x99",
+ "\xE5\xD9"=>"\xE8\xA2\xA2",
+ "\xE5\xDA"=>"\xE8\xA2\x8D",
+ "\xE5\xDB"=>"\xE8\xA2\xA4",
+ "\xE5\xDC"=>"\xE8\xA2\xB0",
+ "\xE5\xDD"=>"\xE8\xA2\xBF",
+ "\xE5\xDE"=>"\xE8\xA2\xB1",
+ "\xE5\xDF"=>"\xE8\xA3\x83",
+ "\xE5\xE0"=>"\xE8\xA3\x84",
+ "\xE5\xE1"=>"\xE8\xA3\x94",
+ "\xE5\xE2"=>"\xE8\xA3\x98",
+ "\xE5\xE3"=>"\xE8\xA3\x99",
+ "\xE5\xE4"=>"\xE8\xA3\x9D",
+ "\xE5\xE5"=>"\xE8\xA3\xB9",
+ "\xE5\xE6"=>"\xE8\xA4\x82",
+ "\xE5\xE7"=>"\xE8\xA3\xBC",
+ "\xE5\xE8"=>"\xE8\xA3\xB4",
+ "\xE5\xE9"=>"\xE8\xA3\xA8",
+ "\xE5\xEA"=>"\xE8\xA3\xB2",
+ "\xE5\xEB"=>"\xE8\xA4\x84",
+ "\xE5\xEC"=>"\xE8\xA4\x8C",
+ "\xE5\xED"=>"\xE8\xA4\x8A",
+ "\xE5\xEE"=>"\xE8\xA4\x93",
+ "\xE5\xEF"=>"\xE8\xA5\x83",
+ "\xE5\xF0"=>"\xE8\xA4\x9E",
+ "\xE5\xF1"=>"\xE8\xA4\xA5",
+ "\xE5\xF2"=>"\xE8\xA4\xAA",
+ "\xE5\xF3"=>"\xE8\xA4\xAB",
+ "\xE5\xF4"=>"\xE8\xA5\x81",
+ "\xE5\xF5"=>"\xE8\xA5\x84",
+ "\xE5\xF6"=>"\xE8\xA4\xBB",
+ "\xE5\xF7"=>"\xE8\xA4\xB6",
+ "\xE5\xF8"=>"\xE8\xA4\xB8",
+ "\xE5\xF9"=>"\xE8\xA5\x8C",
+ "\xE5\xFA"=>"\xE8\xA4\x9D",
+ "\xE5\xFB"=>"\xE8\xA5\xA0",
+ "\xE5\xFC"=>"\xE8\xA5\x9E",
+ "\xE6\x40"=>"\xE8\xA5\xA6",
+ "\xE6\x41"=>"\xE8\xA5\xA4",
+ "\xE6\x42"=>"\xE8\xA5\xAD",
+ "\xE6\x43"=>"\xE8\xA5\xAA",
+ "\xE6\x44"=>"\xE8\xA5\xAF",
+ "\xE6\x45"=>"\xE8\xA5\xB4",
+ "\xE6\x46"=>"\xE8\xA5\xB7",
+ "\xE6\x47"=>"\xE8\xA5\xBE",
+ "\xE6\x48"=>"\xE8\xA6\x83",
+ "\xE6\x49"=>"\xE8\xA6\x88",
+ "\xE6\x4A"=>"\xE8\xA6\x8A",
+ "\xE6\x4B"=>"\xE8\xA6\x93",
+ "\xE6\x4C"=>"\xE8\xA6\x98",
+ "\xE6\x4D"=>"\xE8\xA6\xA1",
+ "\xE6\x4E"=>"\xE8\xA6\xA9",
+ "\xE6\x4F"=>"\xE8\xA6\xA6",
+ "\xE6\x50"=>"\xE8\xA6\xAC",
+ "\xE6\x51"=>"\xE8\xA6\xAF",
+ "\xE6\x52"=>"\xE8\xA6\xB2",
+ "\xE6\x53"=>"\xE8\xA6\xBA",
+ "\xE6\x54"=>"\xE8\xA6\xBD",
+ "\xE6\x55"=>"\xE8\xA6\xBF",
+ "\xE6\x56"=>"\xE8\xA7\x80",
+ "\xE6\x57"=>"\xE8\xA7\x9A",
+ "\xE6\x58"=>"\xE8\xA7\x9C",
+ "\xE6\x59"=>"\xE8\xA7\x9D",
+ "\xE6\x5A"=>"\xE8\xA7\xA7",
+ "\xE6\x5B"=>"\xE8\xA7\xB4",
+ "\xE6\x5C"=>"\xE8\xA7\xB8",
+ "\xE6\x5D"=>"\xE8\xA8\x83",
+ "\xE6\x5E"=>"\xE8\xA8\x96",
+ "\xE6\x5F"=>"\xE8\xA8\x90",
+ "\xE6\x60"=>"\xE8\xA8\x8C",
+ "\xE6\x61"=>"\xE8\xA8\x9B",
+ "\xE6\x62"=>"\xE8\xA8\x9D",
+ "\xE6\x63"=>"\xE8\xA8\xA5",
+ "\xE6\x64"=>"\xE8\xA8\xB6",
+ "\xE6\x65"=>"\xE8\xA9\x81",
+ "\xE6\x66"=>"\xE8\xA9\x9B",
+ "\xE6\x67"=>"\xE8\xA9\x92",
+ "\xE6\x68"=>"\xE8\xA9\x86",
+ "\xE6\x69"=>"\xE8\xA9\x88",
+ "\xE6\x6A"=>"\xE8\xA9\xBC",
+ "\xE6\x6B"=>"\xE8\xA9\xAD",
+ "\xE6\x6C"=>"\xE8\xA9\xAC",
+ "\xE6\x6D"=>"\xE8\xA9\xA2",
+ "\xE6\x6E"=>"\xE8\xAA\x85",
+ "\xE6\x6F"=>"\xE8\xAA\x82",
+ "\xE6\x70"=>"\xE8\xAA\x84",
+ "\xE6\x71"=>"\xE8\xAA\xA8",
+ "\xE6\x72"=>"\xE8\xAA\xA1",
+ "\xE6\x73"=>"\xE8\xAA\x91",
+ "\xE6\x74"=>"\xE8\xAA\xA5",
+ "\xE6\x75"=>"\xE8\xAA\xA6",
+ "\xE6\x76"=>"\xE8\xAA\x9A",
+ "\xE6\x77"=>"\xE8\xAA\xA3",
+ "\xE6\x78"=>"\xE8\xAB\x84",
+ "\xE6\x79"=>"\xE8\xAB\x8D",
+ "\xE6\x7A"=>"\xE8\xAB\x82",
+ "\xE6\x7B"=>"\xE8\xAB\x9A",
+ "\xE6\x7C"=>"\xE8\xAB\xAB",
+ "\xE6\x7D"=>"\xE8\xAB\xB3",
+ "\xE6\x7E"=>"\xE8\xAB\xA7",
+ "\xE6\x80"=>"\xE8\xAB\xA4",
+ "\xE6\x81"=>"\xE8\xAB\xB1",
+ "\xE6\x82"=>"\xE8\xAC\x94",
+ "\xE6\x83"=>"\xE8\xAB\xA0",
+ "\xE6\x84"=>"\xE8\xAB\xA2",
+ "\xE6\x85"=>"\xE8\xAB\xB7",
+ "\xE6\x86"=>"\xE8\xAB\x9E",
+ "\xE6\x87"=>"\xE8\xAB\x9B",
+ "\xE6\x88"=>"\xE8\xAC\x8C",
+ "\xE6\x89"=>"\xE8\xAC\x87",
+ "\xE6\x8A"=>"\xE8\xAC\x9A",
+ "\xE6\x8B"=>"\xE8\xAB\xA1",
+ "\xE6\x8C"=>"\xE8\xAC\x96",
+ "\xE6\x8D"=>"\xE8\xAC\x90",
+ "\xE6\x8E"=>"\xE8\xAC\x97",
+ "\xE6\x8F"=>"\xE8\xAC\xA0",
+ "\xE6\x90"=>"\xE8\xAC\xB3",
+ "\xE6\x91"=>"\xE9\x9E\xAB",
+ "\xE6\x92"=>"\xE8\xAC\xA6",
+ "\xE6\x93"=>"\xE8\xAC\xAB",
+ "\xE6\x94"=>"\xE8\xAC\xBE",
+ "\xE6\x95"=>"\xE8\xAC\xA8",
+ "\xE6\x96"=>"\xE8\xAD\x81",
+ "\xE6\x97"=>"\xE8\xAD\x8C",
+ "\xE6\x98"=>"\xE8\xAD\x8F",
+ "\xE6\x99"=>"\xE8\xAD\x8E",
+ "\xE6\x9A"=>"\xE8\xAD\x89",
+ "\xE6\x9B"=>"\xE8\xAD\x96",
+ "\xE6\x9C"=>"\xE8\xAD\x9B",
+ "\xE6\x9D"=>"\xE8\xAD\x9A",
+ "\xE6\x9E"=>"\xE8\xAD\xAB",
+ "\xE6\x9F"=>"\xE8\xAD\x9F",
+ "\xE6\xA0"=>"\xE8\xAD\xAC",
+ "\xE6\xA1"=>"\xE8\xAD\xAF",
+ "\xE6\xA2"=>"\xE8\xAD\xB4",
+ "\xE6\xA3"=>"\xE8\xAD\xBD",
+ "\xE6\xA4"=>"\xE8\xAE\x80",
+ "\xE6\xA5"=>"\xE8\xAE\x8C",
+ "\xE6\xA6"=>"\xE8\xAE\x8E",
+ "\xE6\xA7"=>"\xE8\xAE\x92",
+ "\xE6\xA8"=>"\xE8\xAE\x93",
+ "\xE6\xA9"=>"\xE8\xAE\x96",
+ "\xE6\xAA"=>"\xE8\xAE\x99",
+ "\xE6\xAB"=>"\xE8\xAE\x9A",
+ "\xE6\xAC"=>"\xE8\xB0\xBA",
+ "\xE6\xAD"=>"\xE8\xB1\x81",
+ "\xE6\xAE"=>"\xE8\xB0\xBF",
+ "\xE6\xAF"=>"\xE8\xB1\x88",
+ "\xE6\xB0"=>"\xE8\xB1\x8C",
+ "\xE6\xB1"=>"\xE8\xB1\x8E",
+ "\xE6\xB2"=>"\xE8\xB1\x90",
+ "\xE6\xB3"=>"\xE8\xB1\x95",
+ "\xE6\xB4"=>"\xE8\xB1\xA2",
+ "\xE6\xB5"=>"\xE8\xB1\xAC",
+ "\xE6\xB6"=>"\xE8\xB1\xB8",
+ "\xE6\xB7"=>"\xE8\xB1\xBA",
+ "\xE6\xB8"=>"\xE8\xB2\x82",
+ "\xE6\xB9"=>"\xE8\xB2\x89",
+ "\xE6\xBA"=>"\xE8\xB2\x85",
+ "\xE6\xBB"=>"\xE8\xB2\x8A",
+ "\xE6\xBC"=>"\xE8\xB2\x8D",
+ "\xE6\xBD"=>"\xE8\xB2\x8E",
+ "\xE6\xBE"=>"\xE8\xB2\x94",
+ "\xE6\xBF"=>"\xE8\xB1\xBC",
+ "\xE6\xC0"=>"\xE8\xB2\x98",
+ "\xE6\xC1"=>"\xE6\x88\x9D",
+ "\xE6\xC2"=>"\xE8\xB2\xAD",
+ "\xE6\xC3"=>"\xE8\xB2\xAA",
+ "\xE6\xC4"=>"\xE8\xB2\xBD",
+ "\xE6\xC5"=>"\xE8\xB2\xB2",
+ "\xE6\xC6"=>"\xE8\xB2\xB3",
+ "\xE6\xC7"=>"\xE8\xB2\xAE",
+ "\xE6\xC8"=>"\xE8\xB2\xB6",
+ "\xE6\xC9"=>"\xE8\xB3\x88",
+ "\xE6\xCA"=>"\xE8\xB3\x81",
+ "\xE6\xCB"=>"\xE8\xB3\xA4",
+ "\xE6\xCC"=>"\xE8\xB3\xA3",
+ "\xE6\xCD"=>"\xE8\xB3\x9A",
+ "\xE6\xCE"=>"\xE8\xB3\xBD",
+ "\xE6\xCF"=>"\xE8\xB3\xBA",
+ "\xE6\xD0"=>"\xE8\xB3\xBB",
+ "\xE6\xD1"=>"\xE8\xB4\x84",
+ "\xE6\xD2"=>"\xE8\xB4\x85",
+ "\xE6\xD3"=>"\xE8\xB4\x8A",
+ "\xE6\xD4"=>"\xE8\xB4\x87",
+ "\xE6\xD5"=>"\xE8\xB4\x8F",
+ "\xE6\xD6"=>"\xE8\xB4\x8D",
+ "\xE6\xD7"=>"\xE8\xB4\x90",
+ "\xE6\xD8"=>"\xE9\xBD\x8E",
+ "\xE6\xD9"=>"\xE8\xB4\x93",
+ "\xE6\xDA"=>"\xE8\xB3\x8D",
+ "\xE6\xDB"=>"\xE8\xB4\x94",
+ "\xE6\xDC"=>"\xE8\xB4\x96",
+ "\xE6\xDD"=>"\xE8\xB5\xA7",
+ "\xE6\xDE"=>"\xE8\xB5\xAD",
+ "\xE6\xDF"=>"\xE8\xB5\xB1",
+ "\xE6\xE0"=>"\xE8\xB5\xB3",
+ "\xE6\xE1"=>"\xE8\xB6\x81",
+ "\xE6\xE2"=>"\xE8\xB6\x99",
+ "\xE6\xE3"=>"\xE8\xB7\x82",
+ "\xE6\xE4"=>"\xE8\xB6\xBE",
+ "\xE6\xE5"=>"\xE8\xB6\xBA",
+ "\xE6\xE6"=>"\xE8\xB7\x8F",
+ "\xE6\xE7"=>"\xE8\xB7\x9A",
+ "\xE6\xE8"=>"\xE8\xB7\x96",
+ "\xE6\xE9"=>"\xE8\xB7\x8C",
+ "\xE6\xEA"=>"\xE8\xB7\x9B",
+ "\xE6\xEB"=>"\xE8\xB7\x8B",
+ "\xE6\xEC"=>"\xE8\xB7\xAA",
+ "\xE6\xED"=>"\xE8\xB7\xAB",
+ "\xE6\xEE"=>"\xE8\xB7\x9F",
+ "\xE6\xEF"=>"\xE8\xB7\xA3",
+ "\xE6\xF0"=>"\xE8\xB7\xBC",
+ "\xE6\xF1"=>"\xE8\xB8\x88",
+ "\xE6\xF2"=>"\xE8\xB8\x89",
+ "\xE6\xF3"=>"\xE8\xB7\xBF",
+ "\xE6\xF4"=>"\xE8\xB8\x9D",
+ "\xE6\xF5"=>"\xE8\xB8\x9E",
+ "\xE6\xF6"=>"\xE8\xB8\x90",
+ "\xE6\xF7"=>"\xE8\xB8\x9F",
+ "\xE6\xF8"=>"\xE8\xB9\x82",
+ "\xE6\xF9"=>"\xE8\xB8\xB5",
+ "\xE6\xFA"=>"\xE8\xB8\xB0",
+ "\xE6\xFB"=>"\xE8\xB8\xB4",
+ "\xE6\xFC"=>"\xE8\xB9\x8A",
+ "\xE7\x40"=>"\xE8\xB9\x87",
+ "\xE7\x41"=>"\xE8\xB9\x89",
+ "\xE7\x42"=>"\xE8\xB9\x8C",
+ "\xE7\x43"=>"\xE8\xB9\x90",
+ "\xE7\x44"=>"\xE8\xB9\x88",
+ "\xE7\x45"=>"\xE8\xB9\x99",
+ "\xE7\x46"=>"\xE8\xB9\xA4",
+ "\xE7\x47"=>"\xE8\xB9\xA0",
+ "\xE7\x48"=>"\xE8\xB8\xAA",
+ "\xE7\x49"=>"\xE8\xB9\xA3",
+ "\xE7\x4A"=>"\xE8\xB9\x95",
+ "\xE7\x4B"=>"\xE8\xB9\xB6",
+ "\xE7\x4C"=>"\xE8\xB9\xB2",
+ "\xE7\x4D"=>"\xE8\xB9\xBC",
+ "\xE7\x4E"=>"\xE8\xBA\x81",
+ "\xE7\x4F"=>"\xE8\xBA\x87",
+ "\xE7\x50"=>"\xE8\xBA\x85",
+ "\xE7\x51"=>"\xE8\xBA\x84",
+ "\xE7\x52"=>"\xE8\xBA\x8B",
+ "\xE7\x53"=>"\xE8\xBA\x8A",
+ "\xE7\x54"=>"\xE8\xBA\x93",
+ "\xE7\x55"=>"\xE8\xBA\x91",
+ "\xE7\x56"=>"\xE8\xBA\x94",
+ "\xE7\x57"=>"\xE8\xBA\x99",
+ "\xE7\x58"=>"\xE8\xBA\xAA",
+ "\xE7\x59"=>"\xE8\xBA\xA1",
+ "\xE7\x5A"=>"\xE8\xBA\xAC",
+ "\xE7\x5B"=>"\xE8\xBA\xB0",
+ "\xE7\x5C"=>"\xE8\xBB\x86",
+ "\xE7\x5D"=>"\xE8\xBA\xB1",
+ "\xE7\x5E"=>"\xE8\xBA\xBE",
+ "\xE7\x5F"=>"\xE8\xBB\x85",
+ "\xE7\x60"=>"\xE8\xBB\x88",
+ "\xE7\x61"=>"\xE8\xBB\x8B",
+ "\xE7\x62"=>"\xE8\xBB\x9B",
+ "\xE7\x63"=>"\xE8\xBB\xA3",
+ "\xE7\x64"=>"\xE8\xBB\xBC",
+ "\xE7\x65"=>"\xE8\xBB\xBB",
+ "\xE7\x66"=>"\xE8\xBB\xAB",
+ "\xE7\x67"=>"\xE8\xBB\xBE",
+ "\xE7\x68"=>"\xE8\xBC\x8A",
+ "\xE7\x69"=>"\xE8\xBC\x85",
+ "\xE7\x6A"=>"\xE8\xBC\x95",
+ "\xE7\x6B"=>"\xE8\xBC\x92",
+ "\xE7\x6C"=>"\xE8\xBC\x99",
+ "\xE7\x6D"=>"\xE8\xBC\x93",
+ "\xE7\x6E"=>"\xE8\xBC\x9C",
+ "\xE7\x6F"=>"\xE8\xBC\x9F",
+ "\xE7\x70"=>"\xE8\xBC\x9B",
+ "\xE7\x71"=>"\xE8\xBC\x8C",
+ "\xE7\x72"=>"\xE8\xBC\xA6",
+ "\xE7\x73"=>"\xE8\xBC\xB3",
+ "\xE7\x74"=>"\xE8\xBC\xBB",
+ "\xE7\x75"=>"\xE8\xBC\xB9",
+ "\xE7\x76"=>"\xE8\xBD\x85",
+ "\xE7\x77"=>"\xE8\xBD\x82",
+ "\xE7\x78"=>"\xE8\xBC\xBE",
+ "\xE7\x79"=>"\xE8\xBD\x8C",
+ "\xE7\x7A"=>"\xE8\xBD\x89",
+ "\xE7\x7B"=>"\xE8\xBD\x86",
+ "\xE7\x7C"=>"\xE8\xBD\x8E",
+ "\xE7\x7D"=>"\xE8\xBD\x97",
+ "\xE7\x7E"=>"\xE8\xBD\x9C",
+ "\xE7\x80"=>"\xE8\xBD\xA2",
+ "\xE7\x81"=>"\xE8\xBD\xA3",
+ "\xE7\x82"=>"\xE8\xBD\xA4",
+ "\xE7\x83"=>"\xE8\xBE\x9C",
+ "\xE7\x84"=>"\xE8\xBE\x9F",
+ "\xE7\x85"=>"\xE8\xBE\xA3",
+ "\xE7\x86"=>"\xE8\xBE\xAD",
+ "\xE7\x87"=>"\xE8\xBE\xAF",
+ "\xE7\x88"=>"\xE8\xBE\xB7",
+ "\xE7\x89"=>"\xE8\xBF\x9A",
+ "\xE7\x8A"=>"\xE8\xBF\xA5",
+ "\xE7\x8B"=>"\xE8\xBF\xA2",
+ "\xE7\x8C"=>"\xE8\xBF\xAA",
+ "\xE7\x8D"=>"\xE8\xBF\xAF",
+ "\xE7\x8E"=>"\xE9\x82\x87",
+ "\xE7\x8F"=>"\xE8\xBF\xB4",
+ "\xE7\x90"=>"\xE9\x80\x85",
+ "\xE7\x91"=>"\xE8\xBF\xB9",
+ "\xE7\x92"=>"\xE8\xBF\xBA",
+ "\xE7\x93"=>"\xE9\x80\x91",
+ "\xE7\x94"=>"\xE9\x80\x95",
+ "\xE7\x95"=>"\xE9\x80\xA1",
+ "\xE7\x96"=>"\xE9\x80\x8D",
+ "\xE7\x97"=>"\xE9\x80\x9E",
+ "\xE7\x98"=>"\xE9\x80\x96",
+ "\xE7\x99"=>"\xE9\x80\x8B",
+ "\xE7\x9A"=>"\xE9\x80\xA7",
+ "\xE7\x9B"=>"\xE9\x80\xB6",
+ "\xE7\x9C"=>"\xE9\x80\xB5",
+ "\xE7\x9D"=>"\xE9\x80\xB9",
+ "\xE7\x9E"=>"\xE8\xBF\xB8",
+ "\xE7\x9F"=>"\xE9\x81\x8F",
+ "\xE7\xA0"=>"\xE9\x81\x90",
+ "\xE7\xA1"=>"\xE9\x81\x91",
+ "\xE7\xA2"=>"\xE9\x81\x92",
+ "\xE7\xA3"=>"\xE9\x80\x8E",
+ "\xE7\xA4"=>"\xE9\x81\x89",
+ "\xE7\xA5"=>"\xE9\x80\xBE",
+ "\xE7\xA6"=>"\xE9\x81\x96",
+ "\xE7\xA7"=>"\xE9\x81\x98",
+ "\xE7\xA8"=>"\xE9\x81\x9E",
+ "\xE7\xA9"=>"\xE9\x81\xA8",
+ "\xE7\xAA"=>"\xE9\x81\xAF",
+ "\xE7\xAB"=>"\xE9\x81\xB6",
+ "\xE7\xAC"=>"\xE9\x9A\xA8",
+ "\xE7\xAD"=>"\xE9\x81\xB2",
+ "\xE7\xAE"=>"\xE9\x82\x82",
+ "\xE7\xAF"=>"\xE9\x81\xBD",
+ "\xE7\xB0"=>"\xE9\x82\x81",
+ "\xE7\xB1"=>"\xE9\x82\x80",
+ "\xE7\xB2"=>"\xE9\x82\x8A",
+ "\xE7\xB3"=>"\xE9\x82\x89",
+ "\xE7\xB4"=>"\xE9\x82\x8F",
+ "\xE7\xB5"=>"\xE9\x82\xA8",
+ "\xE7\xB6"=>"\xE9\x82\xAF",
+ "\xE7\xB7"=>"\xE9\x82\xB1",
+ "\xE7\xB8"=>"\xE9\x82\xB5",
+ "\xE7\xB9"=>"\xE9\x83\xA2",
+ "\xE7\xBA"=>"\xE9\x83\xA4",
+ "\xE7\xBB"=>"\xE6\x89\x88",
+ "\xE7\xBC"=>"\xE9\x83\x9B",
+ "\xE7\xBD"=>"\xE9\x84\x82",
+ "\xE7\xBE"=>"\xE9\x84\x92",
+ "\xE7\xBF"=>"\xE9\x84\x99",
+ "\xE7\xC0"=>"\xE9\x84\xB2",
+ "\xE7\xC1"=>"\xE9\x84\xB0",
+ "\xE7\xC2"=>"\xE9\x85\x8A",
+ "\xE7\xC3"=>"\xE9\x85\x96",
+ "\xE7\xC4"=>"\xE9\x85\x98",
+ "\xE7\xC5"=>"\xE9\x85\xA3",
+ "\xE7\xC6"=>"\xE9\x85\xA5",
+ "\xE7\xC7"=>"\xE9\x85\xA9",
+ "\xE7\xC8"=>"\xE9\x85\xB3",
+ "\xE7\xC9"=>"\xE9\x85\xB2",
+ "\xE7\xCA"=>"\xE9\x86\x8B",
+ "\xE7\xCB"=>"\xE9\x86\x89",
+ "\xE7\xCC"=>"\xE9\x86\x82",
+ "\xE7\xCD"=>"\xE9\x86\xA2",
+ "\xE7\xCE"=>"\xE9\x86\xAB",
+ "\xE7\xCF"=>"\xE9\x86\xAF",
+ "\xE7\xD0"=>"\xE9\x86\xAA",
+ "\xE7\xD1"=>"\xE9\x86\xB5",
+ "\xE7\xD2"=>"\xE9\x86\xB4",
+ "\xE7\xD3"=>"\xE9\x86\xBA",
+ "\xE7\xD4"=>"\xE9\x87\x80",
+ "\xE7\xD5"=>"\xE9\x87\x81",
+ "\xE7\xD6"=>"\xE9\x87\x89",
+ "\xE7\xD7"=>"\xE9\x87\x8B",
+ "\xE7\xD8"=>"\xE9\x87\x90",
+ "\xE7\xD9"=>"\xE9\x87\x96",
+ "\xE7\xDA"=>"\xE9\x87\x9F",
+ "\xE7\xDB"=>"\xE9\x87\xA1",
+ "\xE7\xDC"=>"\xE9\x87\x9B",
+ "\xE7\xDD"=>"\xE9\x87\xBC",
+ "\xE7\xDE"=>"\xE9\x87\xB5",
+ "\xE7\xDF"=>"\xE9\x87\xB6",
+ "\xE7\xE0"=>"\xE9\x88\x9E",
+ "\xE7\xE1"=>"\xE9\x87\xBF",
+ "\xE7\xE2"=>"\xE9\x88\x94",
+ "\xE7\xE3"=>"\xE9\x88\xAC",
+ "\xE7\xE4"=>"\xE9\x88\x95",
+ "\xE7\xE5"=>"\xE9\x88\x91",
+ "\xE7\xE6"=>"\xE9\x89\x9E",
+ "\xE7\xE7"=>"\xE9\x89\x97",
+ "\xE7\xE8"=>"\xE9\x89\x85",
+ "\xE7\xE9"=>"\xE9\x89\x89",
+ "\xE7\xEA"=>"\xE9\x89\xA4",
+ "\xE7\xEB"=>"\xE9\x89\x88",
+ "\xE7\xEC"=>"\xE9\x8A\x95",
+ "\xE7\xED"=>"\xE9\x88\xBF",
+ "\xE7\xEE"=>"\xE9\x89\x8B",
+ "\xE7\xEF"=>"\xE9\x89\x90",
+ "\xE7\xF0"=>"\xE9\x8A\x9C",
+ "\xE7\xF1"=>"\xE9\x8A\x96",
+ "\xE7\xF2"=>"\xE9\x8A\x93",
+ "\xE7\xF3"=>"\xE9\x8A\x9B",
+ "\xE7\xF4"=>"\xE9\x89\x9A",
+ "\xE7\xF5"=>"\xE9\x8B\x8F",
+ "\xE7\xF6"=>"\xE9\x8A\xB9",
+ "\xE7\xF7"=>"\xE9\x8A\xB7",
+ "\xE7\xF8"=>"\xE9\x8B\xA9",
+ "\xE7\xF9"=>"\xE9\x8C\x8F",
+ "\xE7\xFA"=>"\xE9\x8B\xBA",
+ "\xE7\xFB"=>"\xE9\x8D\x84",
+ "\xE7\xFC"=>"\xE9\x8C\xAE",
+ "\xE8\x40"=>"\xE9\x8C\x99",
+ "\xE8\x41"=>"\xE9\x8C\xA2",
+ "\xE8\x42"=>"\xE9\x8C\x9A",
+ "\xE8\x43"=>"\xE9\x8C\xA3",
+ "\xE8\x44"=>"\xE9\x8C\xBA",
+ "\xE8\x45"=>"\xE9\x8C\xB5",
+ "\xE8\x46"=>"\xE9\x8C\xBB",
+ "\xE8\x47"=>"\xE9\x8D\x9C",
+ "\xE8\x48"=>"\xE9\x8D\xA0",
+ "\xE8\x49"=>"\xE9\x8D\xBC",
+ "\xE8\x4A"=>"\xE9\x8D\xAE",
+ "\xE8\x4B"=>"\xE9\x8D\x96",
+ "\xE8\x4C"=>"\xE9\x8E\xB0",
+ "\xE8\x4D"=>"\xE9\x8E\xAC",
+ "\xE8\x4E"=>"\xE9\x8E\xAD",
+ "\xE8\x4F"=>"\xE9\x8E\x94",
+ "\xE8\x50"=>"\xE9\x8E\xB9",
+ "\xE8\x51"=>"\xE9\x8F\x96",
+ "\xE8\x52"=>"\xE9\x8F\x97",
+ "\xE8\x53"=>"\xE9\x8F\xA8",
+ "\xE8\x54"=>"\xE9\x8F\xA5",
+ "\xE8\x55"=>"\xE9\x8F\x98",
+ "\xE8\x56"=>"\xE9\x8F\x83",
+ "\xE8\x57"=>"\xE9\x8F\x9D",
+ "\xE8\x58"=>"\xE9\x8F\x90",
+ "\xE8\x59"=>"\xE9\x8F\x88",
+ "\xE8\x5A"=>"\xE9\x8F\xA4",
+ "\xE8\x5B"=>"\xE9\x90\x9A",
+ "\xE8\x5C"=>"\xE9\x90\x94",
+ "\xE8\x5D"=>"\xE9\x90\x93",
+ "\xE8\x5E"=>"\xE9\x90\x83",
+ "\xE8\x5F"=>"\xE9\x90\x87",
+ "\xE8\x60"=>"\xE9\x90\x90",
+ "\xE8\x61"=>"\xE9\x90\xB6",
+ "\xE8\x62"=>"\xE9\x90\xAB",
+ "\xE8\x63"=>"\xE9\x90\xB5",
+ "\xE8\x64"=>"\xE9\x90\xA1",
+ "\xE8\x65"=>"\xE9\x90\xBA",
+ "\xE8\x66"=>"\xE9\x91\x81",
+ "\xE8\x67"=>"\xE9\x91\x92",
+ "\xE8\x68"=>"\xE9\x91\x84",
+ "\xE8\x69"=>"\xE9\x91\x9B",
+ "\xE8\x6A"=>"\xE9\x91\xA0",
+ "\xE8\x6B"=>"\xE9\x91\xA2",
+ "\xE8\x6C"=>"\xE9\x91\x9E",
+ "\xE8\x6D"=>"\xE9\x91\xAA",
+ "\xE8\x6E"=>"\xE9\x88\xA9",
+ "\xE8\x6F"=>"\xE9\x91\xB0",
+ "\xE8\x70"=>"\xE9\x91\xB5",
+ "\xE8\x71"=>"\xE9\x91\xB7",
+ "\xE8\x72"=>"\xE9\x91\xBD",
+ "\xE8\x73"=>"\xE9\x91\x9A",
+ "\xE8\x74"=>"\xE9\x91\xBC",
+ "\xE8\x75"=>"\xE9\x91\xBE",
+ "\xE8\x76"=>"\xE9\x92\x81",
+ "\xE8\x77"=>"\xE9\x91\xBF",
+ "\xE8\x78"=>"\xE9\x96\x82",
+ "\xE8\x79"=>"\xE9\x96\x87",
+ "\xE8\x7A"=>"\xE9\x96\x8A",
+ "\xE8\x7B"=>"\xE9\x96\x94",
+ "\xE8\x7C"=>"\xE9\x96\x96",
+ "\xE8\x7D"=>"\xE9\x96\x98",
+ "\xE8\x7E"=>"\xE9\x96\x99",
+ "\xE8\x80"=>"\xE9\x96\xA0",
+ "\xE8\x81"=>"\xE9\x96\xA8",
+ "\xE8\x82"=>"\xE9\x96\xA7",
+ "\xE8\x83"=>"\xE9\x96\xAD",
+ "\xE8\x84"=>"\xE9\x96\xBC",
+ "\xE8\x85"=>"\xE9\x96\xBB",
+ "\xE8\x86"=>"\xE9\x96\xB9",
+ "\xE8\x87"=>"\xE9\x96\xBE",
+ "\xE8\x88"=>"\xE9\x97\x8A",
+ "\xE8\x89"=>"\xE6\xBF\xB6",
+ "\xE8\x8A"=>"\xE9\x97\x83",
+ "\xE8\x8B"=>"\xE9\x97\x8D",
+ "\xE8\x8C"=>"\xE9\x97\x8C",
+ "\xE8\x8D"=>"\xE9\x97\x95",
+ "\xE8\x8E"=>"\xE9\x97\x94",
+ "\xE8\x8F"=>"\xE9\x97\x96",
+ "\xE8\x90"=>"\xE9\x97\x9C",
+ "\xE8\x91"=>"\xE9\x97\xA1",
+ "\xE8\x92"=>"\xE9\x97\xA5",
+ "\xE8\x93"=>"\xE9\x97\xA2",
+ "\xE8\x94"=>"\xE9\x98\xA1",
+ "\xE8\x95"=>"\xE9\x98\xA8",
+ "\xE8\x96"=>"\xE9\x98\xAE",
+ "\xE8\x97"=>"\xE9\x98\xAF",
+ "\xE8\x98"=>"\xE9\x99\x82",
+ "\xE8\x99"=>"\xE9\x99\x8C",
+ "\xE8\x9A"=>"\xE9\x99\x8F",
+ "\xE8\x9B"=>"\xE9\x99\x8B",
+ "\xE8\x9C"=>"\xE9\x99\xB7",
+ "\xE8\x9D"=>"\xE9\x99\x9C",
+ "\xE8\x9E"=>"\xE9\x99\x9E",
+ "\xE8\x9F"=>"\xE9\x99\x9D",
+ "\xE8\xA0"=>"\xE9\x99\x9F",
+ "\xE8\xA1"=>"\xE9\x99\xA6",
+ "\xE8\xA2"=>"\xE9\x99\xB2",
+ "\xE8\xA3"=>"\xE9\x99\xAC",
+ "\xE8\xA4"=>"\xE9\x9A\x8D",
+ "\xE8\xA5"=>"\xE9\x9A\x98",
+ "\xE8\xA6"=>"\xE9\x9A\x95",
+ "\xE8\xA7"=>"\xE9\x9A\x97",
+ "\xE8\xA8"=>"\xE9\x9A\xAA",
+ "\xE8\xA9"=>"\xE9\x9A\xA7",
+ "\xE8\xAA"=>"\xE9\x9A\xB1",
+ "\xE8\xAB"=>"\xE9\x9A\xB2",
+ "\xE8\xAC"=>"\xE9\x9A\xB0",
+ "\xE8\xAD"=>"\xE9\x9A\xB4",
+ "\xE8\xAE"=>"\xE9\x9A\xB6",
+ "\xE8\xAF"=>"\xE9\x9A\xB8",
+ "\xE8\xB0"=>"\xE9\x9A\xB9",
+ "\xE8\xB1"=>"\xE9\x9B\x8E",
+ "\xE8\xB2"=>"\xE9\x9B\x8B",
+ "\xE8\xB3"=>"\xE9\x9B\x89",
+ "\xE8\xB4"=>"\xE9\x9B\x8D",
+ "\xE8\xB5"=>"\xE8\xA5\x8D",
+ "\xE8\xB6"=>"\xE9\x9B\x9C",
+ "\xE8\xB7"=>"\xE9\x9C\x8D",
+ "\xE8\xB8"=>"\xE9\x9B\x95",
+ "\xE8\xB9"=>"\xE9\x9B\xB9",
+ "\xE8\xBA"=>"\xE9\x9C\x84",
+ "\xE8\xBB"=>"\xE9\x9C\x86",
+ "\xE8\xBC"=>"\xE9\x9C\x88",
+ "\xE8\xBD"=>"\xE9\x9C\x93",
+ "\xE8\xBE"=>"\xE9\x9C\x8E",
+ "\xE8\xBF"=>"\xE9\x9C\x91",
+ "\xE8\xC0"=>"\xE9\x9C\x8F",
+ "\xE8\xC1"=>"\xE9\x9C\x96",
+ "\xE8\xC2"=>"\xE9\x9C\x99",
+ "\xE8\xC3"=>"\xE9\x9C\xA4",
+ "\xE8\xC4"=>"\xE9\x9C\xAA",
+ "\xE8\xC5"=>"\xE9\x9C\xB0",
+ "\xE8\xC6"=>"\xE9\x9C\xB9",
+ "\xE8\xC7"=>"\xE9\x9C\xBD",
+ "\xE8\xC8"=>"\xE9\x9C\xBE",
+ "\xE8\xC9"=>"\xE9\x9D\x84",
+ "\xE8\xCA"=>"\xE9\x9D\x86",
+ "\xE8\xCB"=>"\xE9\x9D\x88",
+ "\xE8\xCC"=>"\xE9\x9D\x82",
+ "\xE8\xCD"=>"\xE9\x9D\x89",
+ "\xE8\xCE"=>"\xE9\x9D\x9C",
+ "\xE8\xCF"=>"\xE9\x9D\xA0",
+ "\xE8\xD0"=>"\xE9\x9D\xA4",
+ "\xE8\xD1"=>"\xE9\x9D\xA6",
+ "\xE8\xD2"=>"\xE9\x9D\xA8",
+ "\xE8\xD3"=>"\xE5\x8B\x92",
+ "\xE8\xD4"=>"\xE9\x9D\xAB",
+ "\xE8\xD5"=>"\xE9\x9D\xB1",
+ "\xE8\xD6"=>"\xE9\x9D\xB9",
+ "\xE8\xD7"=>"\xE9\x9E\x85",
+ "\xE8\xD8"=>"\xE9\x9D\xBC",
+ "\xE8\xD9"=>"\xE9\x9E\x81",
+ "\xE8\xDA"=>"\xE9\x9D\xBA",
+ "\xE8\xDB"=>"\xE9\x9E\x86",
+ "\xE8\xDC"=>"\xE9\x9E\x8B",
+ "\xE8\xDD"=>"\xE9\x9E\x8F",
+ "\xE8\xDE"=>"\xE9\x9E\x90",
+ "\xE8\xDF"=>"\xE9\x9E\x9C",
+ "\xE8\xE0"=>"\xE9\x9E\xA8",
+ "\xE8\xE1"=>"\xE9\x9E\xA6",
+ "\xE8\xE2"=>"\xE9\x9E\xA3",
+ "\xE8\xE3"=>"\xE9\x9E\xB3",
+ "\xE8\xE4"=>"\xE9\x9E\xB4",
+ "\xE8\xE5"=>"\xE9\x9F\x83",
+ "\xE8\xE6"=>"\xE9\x9F\x86",
+ "\xE8\xE7"=>"\xE9\x9F\x88",
+ "\xE8\xE8"=>"\xE9\x9F\x8B",
+ "\xE8\xE9"=>"\xE9\x9F\x9C",
+ "\xE8\xEA"=>"\xE9\x9F\xAD",
+ "\xE8\xEB"=>"\xE9\xBD\x8F",
+ "\xE8\xEC"=>"\xE9\x9F\xB2",
+ "\xE8\xED"=>"\xE7\xAB\x9F",
+ "\xE8\xEE"=>"\xE9\x9F\xB6",
+ "\xE8\xEF"=>"\xE9\x9F\xB5",
+ "\xE8\xF0"=>"\xE9\xA0\x8F",
+ "\xE8\xF1"=>"\xE9\xA0\x8C",
+ "\xE8\xF2"=>"\xE9\xA0\xB8",
+ "\xE8\xF3"=>"\xE9\xA0\xA4",
+ "\xE8\xF4"=>"\xE9\xA0\xA1",
+ "\xE8\xF5"=>"\xE9\xA0\xB7",
+ "\xE8\xF6"=>"\xE9\xA0\xBD",
+ "\xE8\xF7"=>"\xE9\xA1\x86",
+ "\xE8\xF8"=>"\xE9\xA1\x8F",
+ "\xE8\xF9"=>"\xE9\xA1\x8B",
+ "\xE8\xFA"=>"\xE9\xA1\xAB",
+ "\xE8\xFB"=>"\xE9\xA1\xAF",
+ "\xE8\xFC"=>"\xE9\xA1\xB0",
+ "\xE9\x40"=>"\xE9\xA1\xB1",
+ "\xE9\x41"=>"\xE9\xA1\xB4",
+ "\xE9\x42"=>"\xE9\xA1\xB3",
+ "\xE9\x43"=>"\xE9\xA2\xAA",
+ "\xE9\x44"=>"\xE9\xA2\xAF",
+ "\xE9\x45"=>"\xE9\xA2\xB1",
+ "\xE9\x46"=>"\xE9\xA2\xB6",
+ "\xE9\x47"=>"\xE9\xA3\x84",
+ "\xE9\x48"=>"\xE9\xA3\x83",
+ "\xE9\x49"=>"\xE9\xA3\x86",
+ "\xE9\x4A"=>"\xE9\xA3\xA9",
+ "\xE9\x4B"=>"\xE9\xA3\xAB",
+ "\xE9\x4C"=>"\xE9\xA4\x83",
+ "\xE9\x4D"=>"\xE9\xA4\x89",
+ "\xE9\x4E"=>"\xE9\xA4\x92",
+ "\xE9\x4F"=>"\xE9\xA4\x94",
+ "\xE9\x50"=>"\xE9\xA4\x98",
+ "\xE9\x51"=>"\xE9\xA4\xA1",
+ "\xE9\x52"=>"\xE9\xA4\x9D",
+ "\xE9\x53"=>"\xE9\xA4\x9E",
+ "\xE9\x54"=>"\xE9\xA4\xA4",
+ "\xE9\x55"=>"\xE9\xA4\xA0",
+ "\xE9\x56"=>"\xE9\xA4\xAC",
+ "\xE9\x57"=>"\xE9\xA4\xAE",
+ "\xE9\x58"=>"\xE9\xA4\xBD",
+ "\xE9\x59"=>"\xE9\xA4\xBE",
+ "\xE9\x5A"=>"\xE9\xA5\x82",
+ "\xE9\x5B"=>"\xE9\xA5\x89",
+ "\xE9\x5C"=>"\xE9\xA5\x85",
+ "\xE9\x5D"=>"\xE9\xA5\x90",
+ "\xE9\x5E"=>"\xE9\xA5\x8B",
+ "\xE9\x5F"=>"\xE9\xA5\x91",
+ "\xE9\x60"=>"\xE9\xA5\x92",
+ "\xE9\x61"=>"\xE9\xA5\x8C",
+ "\xE9\x62"=>"\xE9\xA5\x95",
+ "\xE9\x63"=>"\xE9\xA6\x97",
+ "\xE9\x64"=>"\xE9\xA6\x98",
+ "\xE9\x65"=>"\xE9\xA6\xA5",
+ "\xE9\x66"=>"\xE9\xA6\xAD",
+ "\xE9\x67"=>"\xE9\xA6\xAE",
+ "\xE9\x68"=>"\xE9\xA6\xBC",
+ "\xE9\x69"=>"\xE9\xA7\x9F",
+ "\xE9\x6A"=>"\xE9\xA7\x9B",
+ "\xE9\x6B"=>"\xE9\xA7\x9D",
+ "\xE9\x6C"=>"\xE9\xA7\x98",
+ "\xE9\x6D"=>"\xE9\xA7\x91",
+ "\xE9\x6E"=>"\xE9\xA7\xAD",
+ "\xE9\x6F"=>"\xE9\xA7\xAE",
+ "\xE9\x70"=>"\xE9\xA7\xB1",
+ "\xE9\x71"=>"\xE9\xA7\xB2",
+ "\xE9\x72"=>"\xE9\xA7\xBB",
+ "\xE9\x73"=>"\xE9\xA7\xB8",
+ "\xE9\x74"=>"\xE9\xA8\x81",
+ "\xE9\x75"=>"\xE9\xA8\x8F",
+ "\xE9\x76"=>"\xE9\xA8\x85",
+ "\xE9\x77"=>"\xE9\xA7\xA2",
+ "\xE9\x78"=>"\xE9\xA8\x99",
+ "\xE9\x79"=>"\xE9\xA8\xAB",
+ "\xE9\x7A"=>"\xE9\xA8\xB7",
+ "\xE9\x7B"=>"\xE9\xA9\x85",
+ "\xE9\x7C"=>"\xE9\xA9\x82",
+ "\xE9\x7D"=>"\xE9\xA9\x80",
+ "\xE9\x7E"=>"\xE9\xA9\x83",
+ "\xE9\x80"=>"\xE9\xA8\xBE",
+ "\xE9\x81"=>"\xE9\xA9\x95",
+ "\xE9\x82"=>"\xE9\xA9\x8D",
+ "\xE9\x83"=>"\xE9\xA9\x9B",
+ "\xE9\x84"=>"\xE9\xA9\x97",
+ "\xE9\x85"=>"\xE9\xA9\x9F",
+ "\xE9\x86"=>"\xE9\xA9\xA2",
+ "\xE9\x87"=>"\xE9\xA9\xA5",
+ "\xE9\x88"=>"\xE9\xA9\xA4",
+ "\xE9\x89"=>"\xE9\xA9\xA9",
+ "\xE9\x8A"=>"\xE9\xA9\xAB",
+ "\xE9\x8B"=>"\xE9\xA9\xAA",
+ "\xE9\x8C"=>"\xE9\xAA\xAD",
+ "\xE9\x8D"=>"\xE9\xAA\xB0",
+ "\xE9\x8E"=>"\xE9\xAA\xBC",
+ "\xE9\x8F"=>"\xE9\xAB\x80",
+ "\xE9\x90"=>"\xE9\xAB\x8F",
+ "\xE9\x91"=>"\xE9\xAB\x91",
+ "\xE9\x92"=>"\xE9\xAB\x93",
+ "\xE9\x93"=>"\xE9\xAB\x94",
+ "\xE9\x94"=>"\xE9\xAB\x9E",
+ "\xE9\x95"=>"\xE9\xAB\x9F",
+ "\xE9\x96"=>"\xE9\xAB\xA2",
+ "\xE9\x97"=>"\xE9\xAB\xA3",
+ "\xE9\x98"=>"\xE9\xAB\xA6",
+ "\xE9\x99"=>"\xE9\xAB\xAF",
+ "\xE9\x9A"=>"\xE9\xAB\xAB",
+ "\xE9\x9B"=>"\xE9\xAB\xAE",
+ "\xE9\x9C"=>"\xE9\xAB\xB4",
+ "\xE9\x9D"=>"\xE9\xAB\xB1",
+ "\xE9\x9E"=>"\xE9\xAB\xB7",
+ "\xE9\x9F"=>"\xE9\xAB\xBB",
+ "\xE9\xA0"=>"\xE9\xAC\x86",
+ "\xE9\xA1"=>"\xE9\xAC\x98",
+ "\xE9\xA2"=>"\xE9\xAC\x9A",
+ "\xE9\xA3"=>"\xE9\xAC\x9F",
+ "\xE9\xA4"=>"\xE9\xAC\xA2",
+ "\xE9\xA5"=>"\xE9\xAC\xA3",
+ "\xE9\xA6"=>"\xE9\xAC\xA5",
+ "\xE9\xA7"=>"\xE9\xAC\xA7",
+ "\xE9\xA8"=>"\xE9\xAC\xA8",
+ "\xE9\xA9"=>"\xE9\xAC\xA9",
+ "\xE9\xAA"=>"\xE9\xAC\xAA",
+ "\xE9\xAB"=>"\xE9\xAC\xAE",
+ "\xE9\xAC"=>"\xE9\xAC\xAF",
+ "\xE9\xAD"=>"\xE9\xAC\xB2",
+ "\xE9\xAE"=>"\xE9\xAD\x84",
+ "\xE9\xAF"=>"\xE9\xAD\x83",
+ "\xE9\xB0"=>"\xE9\xAD\x8F",
+ "\xE9\xB1"=>"\xE9\xAD\x8D",
+ "\xE9\xB2"=>"\xE9\xAD\x8E",
+ "\xE9\xB3"=>"\xE9\xAD\x91",
+ "\xE9\xB4"=>"\xE9\xAD\x98",
+ "\xE9\xB5"=>"\xE9\xAD\xB4",
+ "\xE9\xB6"=>"\xE9\xAE\x93",
+ "\xE9\xB7"=>"\xE9\xAE\x83",
+ "\xE9\xB8"=>"\xE9\xAE\x91",
+ "\xE9\xB9"=>"\xE9\xAE\x96",
+ "\xE9\xBA"=>"\xE9\xAE\x97",
+ "\xE9\xBB"=>"\xE9\xAE\x9F",
+ "\xE9\xBC"=>"\xE9\xAE\xA0",
+ "\xE9\xBD"=>"\xE9\xAE\xA8",
+ "\xE9\xBE"=>"\xE9\xAE\xB4",
+ "\xE9\xBF"=>"\xE9\xAF\x80",
+ "\xE9\xC0"=>"\xE9\xAF\x8A",
+ "\xE9\xC1"=>"\xE9\xAE\xB9",
+ "\xE9\xC2"=>"\xE9\xAF\x86",
+ "\xE9\xC3"=>"\xE9\xAF\x8F",
+ "\xE9\xC4"=>"\xE9\xAF\x91",
+ "\xE9\xC5"=>"\xE9\xAF\x92",
+ "\xE9\xC6"=>"\xE9\xAF\xA3",
+ "\xE9\xC7"=>"\xE9\xAF\xA2",
+ "\xE9\xC8"=>"\xE9\xAF\xA4",
+ "\xE9\xC9"=>"\xE9\xAF\x94",
+ "\xE9\xCA"=>"\xE9\xAF\xA1",
+ "\xE9\xCB"=>"\xE9\xB0\xBA",
+ "\xE9\xCC"=>"\xE9\xAF\xB2",
+ "\xE9\xCD"=>"\xE9\xAF\xB1",
+ "\xE9\xCE"=>"\xE9\xAF\xB0",
+ "\xE9\xCF"=>"\xE9\xB0\x95",
+ "\xE9\xD0"=>"\xE9\xB0\x94",
+ "\xE9\xD1"=>"\xE9\xB0\x89",
+ "\xE9\xD2"=>"\xE9\xB0\x93",
+ "\xE9\xD3"=>"\xE9\xB0\x8C",
+ "\xE9\xD4"=>"\xE9\xB0\x86",
+ "\xE9\xD5"=>"\xE9\xB0\x88",
+ "\xE9\xD6"=>"\xE9\xB0\x92",
+ "\xE9\xD7"=>"\xE9\xB0\x8A",
+ "\xE9\xD8"=>"\xE9\xB0\x84",
+ "\xE9\xD9"=>"\xE9\xB0\xAE",
+ "\xE9\xDA"=>"\xE9\xB0\x9B",
+ "\xE9\xDB"=>"\xE9\xB0\xA5",
+ "\xE9\xDC"=>"\xE9\xB0\xA4",
+ "\xE9\xDD"=>"\xE9\xB0\xA1",
+ "\xE9\xDE"=>"\xE9\xB0\xB0",
+ "\xE9\xDF"=>"\xE9\xB1\x87",
+ "\xE9\xE0"=>"\xE9\xB0\xB2",
+ "\xE9\xE1"=>"\xE9\xB1\x86",
+ "\xE9\xE2"=>"\xE9\xB0\xBE",
+ "\xE9\xE3"=>"\xE9\xB1\x9A",
+ "\xE9\xE4"=>"\xE9\xB1\xA0",
+ "\xE9\xE5"=>"\xE9\xB1\xA7",
+ "\xE9\xE6"=>"\xE9\xB1\xB6",
+ "\xE9\xE7"=>"\xE9\xB1\xB8",
+ "\xE9\xE8"=>"\xE9\xB3\xA7",
+ "\xE9\xE9"=>"\xE9\xB3\xAC",
+ "\xE9\xEA"=>"\xE9\xB3\xB0",
+ "\xE9\xEB"=>"\xE9\xB4\x89",
+ "\xE9\xEC"=>"\xE9\xB4\x88",
+ "\xE9\xED"=>"\xE9\xB3\xAB",
+ "\xE9\xEE"=>"\xE9\xB4\x83",
+ "\xE9\xEF"=>"\xE9\xB4\x86",
+ "\xE9\xF0"=>"\xE9\xB4\xAA",
+ "\xE9\xF1"=>"\xE9\xB4\xA6",
+ "\xE9\xF2"=>"\xE9\xB6\xAF",
+ "\xE9\xF3"=>"\xE9\xB4\xA3",
+ "\xE9\xF4"=>"\xE9\xB4\x9F",
+ "\xE9\xF5"=>"\xE9\xB5\x84",
+ "\xE9\xF6"=>"\xE9\xB4\x95",
+ "\xE9\xF7"=>"\xE9\xB4\x92",
+ "\xE9\xF8"=>"\xE9\xB5\x81",
+ "\xE9\xF9"=>"\xE9\xB4\xBF",
+ "\xE9\xFA"=>"\xE9\xB4\xBE",
+ "\xE9\xFB"=>"\xE9\xB5\x86",
+ "\xE9\xFC"=>"\xE9\xB5\x88",
+ "\xEA\x40"=>"\xE9\xB5\x9D",
+ "\xEA\x41"=>"\xE9\xB5\x9E",
+ "\xEA\x42"=>"\xE9\xB5\xA4",
+ "\xEA\x43"=>"\xE9\xB5\x91",
+ "\xEA\x44"=>"\xE9\xB5\x90",
+ "\xEA\x45"=>"\xE9\xB5\x99",
+ "\xEA\x46"=>"\xE9\xB5\xB2",
+ "\xEA\x47"=>"\xE9\xB6\x89",
+ "\xEA\x48"=>"\xE9\xB6\x87",
+ "\xEA\x49"=>"\xE9\xB6\xAB",
+ "\xEA\x4A"=>"\xE9\xB5\xAF",
+ "\xEA\x4B"=>"\xE9\xB5\xBA",
+ "\xEA\x4C"=>"\xE9\xB6\x9A",
+ "\xEA\x4D"=>"\xE9\xB6\xA4",
+ "\xEA\x4E"=>"\xE9\xB6\xA9",
+ "\xEA\x4F"=>"\xE9\xB6\xB2",
+ "\xEA\x50"=>"\xE9\xB7\x84",
+ "\xEA\x51"=>"\xE9\xB7\x81",
+ "\xEA\x52"=>"\xE9\xB6\xBB",
+ "\xEA\x53"=>"\xE9\xB6\xB8",
+ "\xEA\x54"=>"\xE9\xB6\xBA",
+ "\xEA\x55"=>"\xE9\xB7\x86",
+ "\xEA\x56"=>"\xE9\xB7\x8F",
+ "\xEA\x57"=>"\xE9\xB7\x82",
+ "\xEA\x58"=>"\xE9\xB7\x99",
+ "\xEA\x59"=>"\xE9\xB7\x93",
+ "\xEA\x5A"=>"\xE9\xB7\xB8",
+ "\xEA\x5B"=>"\xE9\xB7\xA6",
+ "\xEA\x5C"=>"\xE9\xB7\xAD",
+ "\xEA\x5D"=>"\xE9\xB7\xAF",
+ "\xEA\x5E"=>"\xE9\xB7\xBD",
+ "\xEA\x5F"=>"\xE9\xB8\x9A",
+ "\xEA\x60"=>"\xE9\xB8\x9B",
+ "\xEA\x61"=>"\xE9\xB8\x9E",
+ "\xEA\x62"=>"\xE9\xB9\xB5",
+ "\xEA\x63"=>"\xE9\xB9\xB9",
+ "\xEA\x64"=>"\xE9\xB9\xBD",
+ "\xEA\x65"=>"\xE9\xBA\x81",
+ "\xEA\x66"=>"\xE9\xBA\x88",
+ "\xEA\x67"=>"\xE9\xBA\x8B",
+ "\xEA\x68"=>"\xE9\xBA\x8C",
+ "\xEA\x69"=>"\xE9\xBA\x92",
+ "\xEA\x6A"=>"\xE9\xBA\x95",
+ "\xEA\x6B"=>"\xE9\xBA\x91",
+ "\xEA\x6C"=>"\xE9\xBA\x9D",
+ "\xEA\x6D"=>"\xE9\xBA\xA5",
+ "\xEA\x6E"=>"\xE9\xBA\xA9",
+ "\xEA\x6F"=>"\xE9\xBA\xB8",
+ "\xEA\x70"=>"\xE9\xBA\xAA",
+ "\xEA\x71"=>"\xE9\xBA\xAD",
+ "\xEA\x72"=>"\xE9\x9D\xA1",
+ "\xEA\x73"=>"\xE9\xBB\x8C",
+ "\xEA\x74"=>"\xE9\xBB\x8E",
+ "\xEA\x75"=>"\xE9\xBB\x8F",
+ "\xEA\x76"=>"\xE9\xBB\x90",
+ "\xEA\x77"=>"\xE9\xBB\x94",
+ "\xEA\x78"=>"\xE9\xBB\x9C",
+ "\xEA\x79"=>"\xE9\xBB\x9E",
+ "\xEA\x7A"=>"\xE9\xBB\x9D",
+ "\xEA\x7B"=>"\xE9\xBB\xA0",
+ "\xEA\x7C"=>"\xE9\xBB\xA5",
+ "\xEA\x7D"=>"\xE9\xBB\xA8",
+ "\xEA\x7E"=>"\xE9\xBB\xAF",
+ "\xEA\x80"=>"\xE9\xBB\xB4",
+ "\xEA\x81"=>"\xE9\xBB\xB6",
+ "\xEA\x82"=>"\xE9\xBB\xB7",
+ "\xEA\x83"=>"\xE9\xBB\xB9",
+ "\xEA\x84"=>"\xE9\xBB\xBB",
+ "\xEA\x85"=>"\xE9\xBB\xBC",
+ "\xEA\x86"=>"\xE9\xBB\xBD",
+ "\xEA\x87"=>"\xE9\xBC\x87",
+ "\xEA\x88"=>"\xE9\xBC\x88",
+ "\xEA\x89"=>"\xE7\x9A\xB7",
+ "\xEA\x8A"=>"\xE9\xBC\x95",
+ "\xEA\x8B"=>"\xE9\xBC\xA1",
+ "\xEA\x8C"=>"\xE9\xBC\xAC",
+ "\xEA\x8D"=>"\xE9\xBC\xBE",
+ "\xEA\x8E"=>"\xE9\xBD\x8A",
+ "\xEA\x8F"=>"\xE9\xBD\x92",
+ "\xEA\x90"=>"\xE9\xBD\x94",
+ "\xEA\x91"=>"\xE9\xBD\xA3",
+ "\xEA\x92"=>"\xE9\xBD\x9F",
+ "\xEA\x93"=>"\xE9\xBD\xA0",
+ "\xEA\x94"=>"\xE9\xBD\xA1",
+ "\xEA\x95"=>"\xE9\xBD\xA6",
+ "\xEA\x96"=>"\xE9\xBD\xA7",
+ "\xEA\x97"=>"\xE9\xBD\xAC",
+ "\xEA\x98"=>"\xE9\xBD\xAA",
+ "\xEA\x99"=>"\xE9\xBD\xB7",
+ "\xEA\x9A"=>"\xE9\xBD\xB2",
+ "\xEA\x9B"=>"\xE9\xBD\xB6",
+ "\xEA\x9C"=>"\xE9\xBE\x95",
+ "\xEA\x9D"=>"\xE9\xBE\x9C",
+ "\xEA\x9E"=>"\xE9\xBE\xA0",
+ "\xEA\x9F"=>"\xE5\xA0\xAF",
+ "\xEA\xA0"=>"\xE6\xA7\x87",
+ "\xEA\xA1"=>"\xE9\x81\x99",
+ "\xEA\xA2"=>"\xE7\x91\xA4",
+ "\xEA\xA3"=>"\xE5\x87\x9C",
+ "\xEA\xA4"=>"\xE7\x86\x99"
+ );
+ return strtr($string, $transform);
+}
+
+function euc_kr($string)
+{
+ static $transform = array(
+ "\x5c" => "\xE2\x82\xA9", // KX X 1001
+ "\x81\x41" => "\xEA\xB0\x82",
+ "\x81\x42" => "\xEA\xB0\x83",
+ "\x81\x43" => "\xEA\xB0\x85",
+ "\x81\x44" => "\xEA\xB0\x86",
+ "\x81\x45" => "\xEA\xB0\x8B",
+ "\x81\x46" => "\xEA\xB0\x8C",
+ "\x81\x47" => "\xEA\xB0\x8D",
+ "\x81\x48" => "\xEA\xB0\x8E",
+ "\x81\x49" => "\xEA\xB0\x8F",
+ "\x81\x4A" => "\xEA\xB0\x98",
+ "\x81\x4B" => "\xEA\xB0\x9E",
+ "\x81\x4C" => "\xEA\xB0\x9F",
+ "\x81\x4D" => "\xEA\xB0\xA1",
+ "\x81\x4E" => "\xEA\xB0\xA2",
+ "\x81\x4F" => "\xEA\xB0\xA3",
+ "\x81\x50" => "\xEA\xB0\xA5",
+ "\x81\x51" => "\xEA\xB0\xA6",
+ "\x81\x52" => "\xEA\xB0\xA7",
+ "\x81\x53" => "\xEA\xB0\xA8",
+ "\x81\x54" => "\xEA\xB0\xA9",
+ "\x81\x55" => "\xEA\xB0\xAA",
+ "\x81\x56" => "\xEA\xB0\xAB",
+ "\x81\x57" => "\xEA\xB0\xAE",
+ "\x81\x58" => "\xEA\xB0\xB2",
+ "\x81\x59" => "\xEA\xB0\xB3",
+ "\x81\x5A" => "\xEA\xB0\xB4",
+ "\x81\x61" => "\xEA\xB0\xB5",
+ "\x81\x62" => "\xEA\xB0\xB6",
+ "\x81\x63" => "\xEA\xB0\xB7",
+ "\x81\x64" => "\xEA\xB0\xBA",
+ "\x81\x65" => "\xEA\xB0\xBB",
+ "\x81\x66" => "\xEA\xB0\xBD",
+ "\x81\x67" => "\xEA\xB0\xBE",
+ "\x81\x68" => "\xEA\xB0\xBF",
+ "\x81\x69" => "\xEA\xB1\x81",
+ "\x81\x6A" => "\xEA\xB1\x82",
+ "\x81\x6B" => "\xEA\xB1\x83",
+ "\x81\x6C" => "\xEA\xB1\x84",
+ "\x81\x6D" => "\xEA\xB1\x85",
+ "\x81\x6E" => "\xEA\xB1\x86",
+ "\x81\x6F" => "\xEA\xB1\x87",
+ "\x81\x70" => "\xEA\xB1\x88",
+ "\x81\x71" => "\xEA\xB1\x89",
+ "\x81\x72" => "\xEA\xB1\x8A",
+ "\x81\x73" => "\xEA\xB1\x8C",
+ "\x81\x74" => "\xEA\xB1\x8E",
+ "\x81\x75" => "\xEA\xB1\x8F",
+ "\x81\x76" => "\xEA\xB1\x90",
+ "\x81\x77" => "\xEA\xB1\x91",
+ "\x81\x78" => "\xEA\xB1\x92",
+ "\x81\x79" => "\xEA\xB1\x93",
+ "\x81\x7A" => "\xEA\xB1\x95",
+ "\x81\x81" => "\xEA\xB1\x96",
+ "\x81\x82" => "\xEA\xB1\x97",
+ "\x81\x83" => "\xEA\xB1\x99",
+ "\x81\x84" => "\xEA\xB1\x9A",
+ "\x81\x85" => "\xEA\xB1\x9B",
+ "\x81\x86" => "\xEA\xB1\x9D",
+ "\x81\x87" => "\xEA\xB1\x9E",
+ "\x81\x88" => "\xEA\xB1\x9F",
+ "\x81\x89" => "\xEA\xB1\xA0",
+ "\x81\x8A" => "\xEA\xB1\xA1",
+ "\x81\x8B" => "\xEA\xB1\xA2",
+ "\x81\x8C" => "\xEA\xB1\xA3",
+ "\x81\x8D" => "\xEA\xB1\xA4",
+ "\x81\x8E" => "\xEA\xB1\xA5",
+ "\x81\x8F" => "\xEA\xB1\xA6",
+ "\x81\x90" => "\xEA\xB1\xA7",
+ "\x81\x91" => "\xEA\xB1\xA8",
+ "\x81\x92" => "\xEA\xB1\xA9",
+ "\x81\x93" => "\xEA\xB1\xAA",
+ "\x81\x94" => "\xEA\xB1\xAB",
+ "\x81\x95" => "\xEA\xB1\xAC",
+ "\x81\x96" => "\xEA\xB1\xAD",
+ "\x81\x97" => "\xEA\xB1\xAE",
+ "\x81\x98" => "\xEA\xB1\xAF",
+ "\x81\x99" => "\xEA\xB1\xB2",
+ "\x81\x9A" => "\xEA\xB1\xB3",
+ "\x81\x9B" => "\xEA\xB1\xB5",
+ "\x81\x9C" => "\xEA\xB1\xB6",
+ "\x81\x9D" => "\xEA\xB1\xB9",
+ "\x81\x9E" => "\xEA\xB1\xBB",
+ "\x81\x9F" => "\xEA\xB1\xBC",
+ "\x81\xA0" => "\xEA\xB1\xBD",
+ "\x81\xA1" => "\xEA\xB1\xBE",
+ "\x81\xA2" => "\xEA\xB1\xBF",
+ "\x81\xA3" => "\xEA\xB2\x82",
+ "\x81\xA4" => "\xEA\xB2\x87",
+ "\x81\xA5" => "\xEA\xB2\x88",
+ "\x81\xA6" => "\xEA\xB2\x8D",
+ "\x81\xA7" => "\xEA\xB2\x8E",
+ "\x81\xA8" => "\xEA\xB2\x8F",
+ "\x81\xA9" => "\xEA\xB2\x91",
+ "\x81\xAA" => "\xEA\xB2\x92",
+ "\x81\xAB" => "\xEA\xB2\x93",
+ "\x81\xAC" => "\xEA\xB2\x95",
+ "\x81\xAD" => "\xEA\xB2\x96",
+ "\x81\xAE" => "\xEA\xB2\x97",
+ "\x81\xAF" => "\xEA\xB2\x98",
+ "\x81\xB0" => "\xEA\xB2\x99",
+ "\x81\xB1" => "\xEA\xB2\x9A",
+ "\x81\xB2" => "\xEA\xB2\x9B",
+ "\x81\xB3" => "\xEA\xB2\x9E",
+ "\x81\xB4" => "\xEA\xB2\xA2",
+ "\x81\xB5" => "\xEA\xB2\xA3",
+ "\x81\xB6" => "\xEA\xB2\xA4",
+ "\x81\xB7" => "\xEA\xB2\xA5",
+ "\x81\xB8" => "\xEA\xB2\xA6",
+ "\x81\xB9" => "\xEA\xB2\xA7",
+ "\x81\xBA" => "\xEA\xB2\xAB",
+ "\x81\xBB" => "\xEA\xB2\xAD",
+ "\x81\xBC" => "\xEA\xB2\xAE",
+ "\x81\xBD" => "\xEA\xB2\xB1",
+ "\x81\xBE" => "\xEA\xB2\xB2",
+ "\x81\xBF" => "\xEA\xB2\xB3",
+ "\x81\xC0" => "\xEA\xB2\xB4",
+ "\x81\xC1" => "\xEA\xB2\xB5",
+ "\x81\xC2" => "\xEA\xB2\xB6",
+ "\x81\xC3" => "\xEA\xB2\xB7",
+ "\x81\xC4" => "\xEA\xB2\xBA",
+ "\x81\xC5" => "\xEA\xB2\xBE",
+ "\x81\xC6" => "\xEA\xB2\xBF",
+ "\x81\xC7" => "\xEA\xB3\x80",
+ "\x81\xC8" => "\xEA\xB3\x82",
+ "\x81\xC9" => "\xEA\xB3\x83",
+ "\x81\xCA" => "\xEA\xB3\x85",
+ "\x81\xCB" => "\xEA\xB3\x86",
+ "\x81\xCC" => "\xEA\xB3\x87",
+ "\x81\xCD" => "\xEA\xB3\x89",
+ "\x81\xCE" => "\xEA\xB3\x8A",
+ "\x81\xCF" => "\xEA\xB3\x8B",
+ "\x81\xD0" => "\xEA\xB3\x8D",
+ "\x81\xD1" => "\xEA\xB3\x8E",
+ "\x81\xD2" => "\xEA\xB3\x8F",
+ "\x81\xD3" => "\xEA\xB3\x90",
+ "\x81\xD4" => "\xEA\xB3\x91",
+ "\x81\xD5" => "\xEA\xB3\x92",
+ "\x81\xD6" => "\xEA\xB3\x93",
+ "\x81\xD7" => "\xEA\xB3\x94",
+ "\x81\xD8" => "\xEA\xB3\x96",
+ "\x81\xD9" => "\xEA\xB3\x98",
+ "\x81\xDA" => "\xEA\xB3\x99",
+ "\x81\xDB" => "\xEA\xB3\x9A",
+ "\x81\xDC" => "\xEA\xB3\x9B",
+ "\x81\xDD" => "\xEA\xB3\x9C",
+ "\x81\xDE" => "\xEA\xB3\x9D",
+ "\x81\xDF" => "\xEA\xB3\x9E",
+ "\x81\xE0" => "\xEA\xB3\x9F",
+ "\x81\xE1" => "\xEA\xB3\xA2",
+ "\x81\xE2" => "\xEA\xB3\xA3",
+ "\x81\xE3" => "\xEA\xB3\xA5",
+ "\x81\xE4" => "\xEA\xB3\xA6",
+ "\x81\xE5" => "\xEA\xB3\xA9",
+ "\x81\xE6" => "\xEA\xB3\xAB",
+ "\x81\xE7" => "\xEA\xB3\xAD",
+ "\x81\xE8" => "\xEA\xB3\xAE",
+ "\x81\xE9" => "\xEA\xB3\xB2",
+ "\x81\xEA" => "\xEA\xB3\xB4",
+ "\x81\xEB" => "\xEA\xB3\xB7",
+ "\x81\xEC" => "\xEA\xB3\xB8",
+ "\x81\xED" => "\xEA\xB3\xB9",
+ "\x81\xEE" => "\xEA\xB3\xBA",
+ "\x81\xEF" => "\xEA\xB3\xBB",
+ "\x81\xF0" => "\xEA\xB3\xBE",
+ "\x81\xF1" => "\xEA\xB3\xBF",
+ "\x81\xF2" => "\xEA\xB4\x81",
+ "\x81\xF3" => "\xEA\xB4\x82",
+ "\x81\xF4" => "\xEA\xB4\x83",
+ "\x81\xF5" => "\xEA\xB4\x85",
+ "\x81\xF6" => "\xEA\xB4\x87",
+ "\x81\xF7" => "\xEA\xB4\x88",
+ "\x81\xF8" => "\xEA\xB4\x89",
+ "\x81\xF9" => "\xEA\xB4\x8A",
+ "\x81\xFA" => "\xEA\xB4\x8B",
+ "\x81\xFB" => "\xEA\xB4\x8E",
+ "\x81\xFC" => "\xEA\xB4\x90",
+ "\x81\xFD" => "\xEA\xB4\x92",
+ "\x81\xFE" => "\xEA\xB4\x93",
+ "\x82\x41" => "\xEA\xB4\x94",
+ "\x82\x42" => "\xEA\xB4\x95",
+ "\x82\x43" => "\xEA\xB4\x96",
+ "\x82\x44" => "\xEA\xB4\x97",
+ "\x82\x45" => "\xEA\xB4\x99",
+ "\x82\x46" => "\xEA\xB4\x9A",
+ "\x82\x47" => "\xEA\xB4\x9B",
+ "\x82\x48" => "\xEA\xB4\x9D",
+ "\x82\x49" => "\xEA\xB4\x9E",
+ "\x82\x4A" => "\xEA\xB4\x9F",
+ "\x82\x4B" => "\xEA\xB4\xA1",
+ "\x82\x4C" => "\xEA\xB4\xA2",
+ "\x82\x4D" => "\xEA\xB4\xA3",
+ "\x82\x4E" => "\xEA\xB4\xA4",
+ "\x82\x4F" => "\xEA\xB4\xA5",
+ "\x82\x50" => "\xEA\xB4\xA6",
+ "\x82\x51" => "\xEA\xB4\xA7",
+ "\x82\x52" => "\xEA\xB4\xA8",
+ "\x82\x53" => "\xEA\xB4\xAA",
+ "\x82\x54" => "\xEA\xB4\xAB",
+ "\x82\x55" => "\xEA\xB4\xAE",
+ "\x82\x56" => "\xEA\xB4\xAF",
+ "\x82\x57" => "\xEA\xB4\xB0",
+ "\x82\x58" => "\xEA\xB4\xB1",
+ "\x82\x59" => "\xEA\xB4\xB2",
+ "\x82\x5A" => "\xEA\xB4\xB3",
+ "\x82\x61" => "\xEA\xB4\xB6",
+ "\x82\x62" => "\xEA\xB4\xB7",
+ "\x82\x63" => "\xEA\xB4\xB9",
+ "\x82\x64" => "\xEA\xB4\xBA",
+ "\x82\x65" => "\xEA\xB4\xBB",
+ "\x82\x66" => "\xEA\xB4\xBD",
+ "\x82\x67" => "\xEA\xB4\xBE",
+ "\x82\x68" => "\xEA\xB4\xBF",
+ "\x82\x69" => "\xEA\xB5\x80",
+ "\x82\x6A" => "\xEA\xB5\x81",
+ "\x82\x6B" => "\xEA\xB5\x82",
+ "\x82\x6C" => "\xEA\xB5\x83",
+ "\x82\x6D" => "\xEA\xB5\x86",
+ "\x82\x6E" => "\xEA\xB5\x88",
+ "\x82\x6F" => "\xEA\xB5\x8A",
+ "\x82\x70" => "\xEA\xB5\x8B",
+ "\x82\x71" => "\xEA\xB5\x8C",
+ "\x82\x72" => "\xEA\xB5\x8D",
+ "\x82\x73" => "\xEA\xB5\x8E",
+ "\x82\x74" => "\xEA\xB5\x8F",
+ "\x82\x75" => "\xEA\xB5\x91",
+ "\x82\x76" => "\xEA\xB5\x92",
+ "\x82\x77" => "\xEA\xB5\x93",
+ "\x82\x78" => "\xEA\xB5\x95",
+ "\x82\x79" => "\xEA\xB5\x96",
+ "\x82\x7A" => "\xEA\xB5\x97",
+ "\x82\x81" => "\xEA\xB5\x99",
+ "\x82\x82" => "\xEA\xB5\x9A",
+ "\x82\x83" => "\xEA\xB5\x9B",
+ "\x82\x84" => "\xEA\xB5\x9C",
+ "\x82\x85" => "\xEA\xB5\x9D",
+ "\x82\x86" => "\xEA\xB5\x9E",
+ "\x82\x87" => "\xEA\xB5\x9F",
+ "\x82\x88" => "\xEA\xB5\xA0",
+ "\x82\x89" => "\xEA\xB5\xA2",
+ "\x82\x8A" => "\xEA\xB5\xA4",
+ "\x82\x8B" => "\xEA\xB5\xA5",
+ "\x82\x8C" => "\xEA\xB5\xA6",
+ "\x82\x8D" => "\xEA\xB5\xA7",
+ "\x82\x8E" => "\xEA\xB5\xA8",
+ "\x82\x8F" => "\xEA\xB5\xA9",
+ "\x82\x90" => "\xEA\xB5\xAA",
+ "\x82\x91" => "\xEA\xB5\xAB",
+ "\x82\x92" => "\xEA\xB5\xAE",
+ "\x82\x93" => "\xEA\xB5\xAF",
+ "\x82\x94" => "\xEA\xB5\xB1",
+ "\x82\x95" => "\xEA\xB5\xB2",
+ "\x82\x96" => "\xEA\xB5\xB7",
+ "\x82\x97" => "\xEA\xB5\xB8",
+ "\x82\x98" => "\xEA\xB5\xB9",
+ "\x82\x99" => "\xEA\xB5\xBA",
+ "\x82\x9A" => "\xEA\xB5\xBE",
+ "\x82\x9B" => "\xEA\xB6\x80",
+ "\x82\x9C" => "\xEA\xB6\x83",
+ "\x82\x9D" => "\xEA\xB6\x84",
+ "\x82\x9E" => "\xEA\xB6\x85",
+ "\x82\x9F" => "\xEA\xB6\x86",
+ "\x82\xA0" => "\xEA\xB6\x87",
+ "\x82\xA1" => "\xEA\xB6\x8A",
+ "\x82\xA2" => "\xEA\xB6\x8B",
+ "\x82\xA3" => "\xEA\xB6\x8D",
+ "\x82\xA4" => "\xEA\xB6\x8E",
+ "\x82\xA5" => "\xEA\xB6\x8F",
+ "\x82\xA6" => "\xEA\xB6\x91",
+ "\x82\xA7" => "\xEA\xB6\x92",
+ "\x82\xA8" => "\xEA\xB6\x93",
+ "\x82\xA9" => "\xEA\xB6\x94",
+ "\x82\xAA" => "\xEA\xB6\x95",
+ "\x82\xAB" => "\xEA\xB6\x96",
+ "\x82\xAC" => "\xEA\xB6\x97",
+ "\x82\xAD" => "\xEA\xB6\x98",
+ "\x82\xAE" => "\xEA\xB6\x99",
+ "\x82\xAF" => "\xEA\xB6\x9A",
+ "\x82\xB0" => "\xEA\xB6\x9B",
+ "\x82\xB1" => "\xEA\xB6\x9E",
+ "\x82\xB2" => "\xEA\xB6\x9F",
+ "\x82\xB3" => "\xEA\xB6\xA0",
+ "\x82\xB4" => "\xEA\xB6\xA1",
+ "\x82\xB5" => "\xEA\xB6\xA2",
+ "\x82\xB6" => "\xEA\xB6\xA3",
+ "\x82\xB7" => "\xEA\xB6\xA5",
+ "\x82\xB8" => "\xEA\xB6\xA6",
+ "\x82\xB9" => "\xEA\xB6\xA7",
+ "\x82\xBA" => "\xEA\xB6\xA8",
+ "\x82\xBB" => "\xEA\xB6\xA9",
+ "\x82\xBC" => "\xEA\xB6\xAA",
+ "\x82\xBD" => "\xEA\xB6\xAB",
+ "\x82\xBE" => "\xEA\xB6\xAC",
+ "\x82\xBF" => "\xEA\xB6\xAD",
+ "\x82\xC0" => "\xEA\xB6\xAE",
+ "\x82\xC1" => "\xEA\xB6\xAF",
+ "\x82\xC2" => "\xEA\xB6\xB0",
+ "\x82\xC3" => "\xEA\xB6\xB1",
+ "\x82\xC4" => "\xEA\xB6\xB2",
+ "\x82\xC5" => "\xEA\xB6\xB3",
+ "\x82\xC6" => "\xEA\xB6\xB4",
+ "\x82\xC7" => "\xEA\xB6\xB5",
+ "\x82\xC8" => "\xEA\xB6\xB6",
+ "\x82\xC9" => "\xEA\xB6\xB8",
+ "\x82\xCA" => "\xEA\xB6\xB9",
+ "\x82\xCB" => "\xEA\xB6\xBA",
+ "\x82\xCC" => "\xEA\xB6\xBB",
+ "\x82\xCD" => "\xEA\xB6\xBC",
+ "\x82\xCE" => "\xEA\xB6\xBD",
+ "\x82\xCF" => "\xEA\xB6\xBE",
+ "\x82\xD0" => "\xEA\xB6\xBF",
+ "\x82\xD1" => "\xEA\xB7\x82",
+ "\x82\xD2" => "\xEA\xB7\x83",
+ "\x82\xD3" => "\xEA\xB7\x85",
+ "\x82\xD4" => "\xEA\xB7\x86",
+ "\x82\xD5" => "\xEA\xB7\x87",
+ "\x82\xD6" => "\xEA\xB7\x89",
+ "\x82\xD7" => "\xEA\xB7\x8A",
+ "\x82\xD8" => "\xEA\xB7\x8B",
+ "\x82\xD9" => "\xEA\xB7\x8C",
+ "\x82\xDA" => "\xEA\xB7\x8D",
+ "\x82\xDB" => "\xEA\xB7\x8E",
+ "\x82\xDC" => "\xEA\xB7\x8F",
+ "\x82\xDD" => "\xEA\xB7\x92",
+ "\x82\xDE" => "\xEA\xB7\x94",
+ "\x82\xDF" => "\xEA\xB7\x95",
+ "\x82\xE0" => "\xEA\xB7\x96",
+ "\x82\xE1" => "\xEA\xB7\x97",
+ "\x82\xE2" => "\xEA\xB7\x98",
+ "\x82\xE3" => "\xEA\xB7\x99",
+ "\x82\xE4" => "\xEA\xB7\x9A",
+ "\x82\xE5" => "\xEA\xB7\x9B",
+ "\x82\xE6" => "\xEA\xB7\x9D",
+ "\x82\xE7" => "\xEA\xB7\x9E",
+ "\x82\xE8" => "\xEA\xB7\x9F",
+ "\x82\xE9" => "\xEA\xB7\xA1",
+ "\x82\xEA" => "\xEA\xB7\xA2",
+ "\x82\xEB" => "\xEA\xB7\xA3",
+ "\x82\xEC" => "\xEA\xB7\xA5",
+ "\x82\xED" => "\xEA\xB7\xA6",
+ "\x82\xEE" => "\xEA\xB7\xA7",
+ "\x82\xEF" => "\xEA\xB7\xA8",
+ "\x82\xF0" => "\xEA\xB7\xA9",
+ "\x82\xF1" => "\xEA\xB7\xAA",
+ "\x82\xF2" => "\xEA\xB7\xAB",
+ "\x82\xF3" => "\xEA\xB7\xAC",
+ "\x82\xF4" => "\xEA\xB7\xAD",
+ "\x82\xF5" => "\xEA\xB7\xAE",
+ "\x82\xF6" => "\xEA\xB7\xAF",
+ "\x82\xF7" => "\xEA\xB7\xB0",
+ "\x82\xF8" => "\xEA\xB7\xB1",
+ "\x82\xF9" => "\xEA\xB7\xB2",
+ "\x82\xFA" => "\xEA\xB7\xB3",
+ "\x82\xFB" => "\xEA\xB7\xB4",
+ "\x82\xFC" => "\xEA\xB7\xB5",
+ "\x82\xFD" => "\xEA\xB7\xB6",
+ "\x82\xFE" => "\xEA\xB7\xB7",
+ "\x83\x41" => "\xEA\xB7\xBA",
+ "\x83\x42" => "\xEA\xB7\xBB",
+ "\x83\x43" => "\xEA\xB7\xBD",
+ "\x83\x44" => "\xEA\xB7\xBE",
+ "\x83\x45" => "\xEA\xB8\x82",
+ "\x83\x46" => "\xEA\xB8\x83",
+ "\x83\x47" => "\xEA\xB8\x84",
+ "\x83\x48" => "\xEA\xB8\x85",
+ "\x83\x49" => "\xEA\xB8\x86",
+ "\x83\x4A" => "\xEA\xB8\x87",
+ "\x83\x4B" => "\xEA\xB8\x8A",
+ "\x83\x4C" => "\xEA\xB8\x8C",
+ "\x83\x4D" => "\xEA\xB8\x8E",
+ "\x83\x4E" => "\xEA\xB8\x8F",
+ "\x83\x4F" => "\xEA\xB8\x90",
+ "\x83\x50" => "\xEA\xB8\x91",
+ "\x83\x51" => "\xEA\xB8\x92",
+ "\x83\x52" => "\xEA\xB8\x93",
+ "\x83\x53" => "\xEA\xB8\x95",
+ "\x83\x54" => "\xEA\xB8\x96",
+ "\x83\x55" => "\xEA\xB8\x97",
+ "\x83\x56" => "\xEA\xB8\x98",
+ "\x83\x57" => "\xEA\xB8\x99",
+ "\x83\x58" => "\xEA\xB8\x9A",
+ "\x83\x59" => "\xEA\xB8\x9B",
+ "\x83\x5A" => "\xEA\xB8\x9C",
+ "\x83\x61" => "\xEA\xB8\x9D",
+ "\x83\x62" => "\xEA\xB8\x9E",
+ "\x83\x63" => "\xEA\xB8\x9F",
+ "\x83\x64" => "\xEA\xB8\xA0",
+ "\x83\x65" => "\xEA\xB8\xA1",
+ "\x83\x66" => "\xEA\xB8\xA2",
+ "\x83\x67" => "\xEA\xB8\xA3",
+ "\x83\x68" => "\xEA\xB8\xA4",
+ "\x83\x69" => "\xEA\xB8\xA5",
+ "\x83\x6A" => "\xEA\xB8\xA6",
+ "\x83\x6B" => "\xEA\xB8\xA7",
+ "\x83\x6C" => "\xEA\xB8\xA8",
+ "\x83\x6D" => "\xEA\xB8\xA9",
+ "\x83\x6E" => "\xEA\xB8\xAA",
+ "\x83\x6F" => "\xEA\xB8\xAB",
+ "\x83\x70" => "\xEA\xB8\xAC",
+ "\x83\x71" => "\xEA\xB8\xAD",
+ "\x83\x72" => "\xEA\xB8\xAE",
+ "\x83\x73" => "\xEA\xB8\xAF",
+ "\x83\x74" => "\xEA\xB8\xB2",
+ "\x83\x75" => "\xEA\xB8\xB3",
+ "\x83\x76" => "\xEA\xB8\xB5",
+ "\x83\x77" => "\xEA\xB8\xB6",
+ "\x83\x78" => "\xEA\xB8\xB9",
+ "\x83\x79" => "\xEA\xB8\xBB",
+ "\x83\x7A" => "\xEA\xB8\xBC",
+ "\x83\x81" => "\xEA\xB8\xBD",
+ "\x83\x82" => "\xEA\xB8\xBE",
+ "\x83\x83" => "\xEA\xB8\xBF",
+ "\x83\x84" => "\xEA\xB9\x82",
+ "\x83\x85" => "\xEA\xB9\x84",
+ "\x83\x86" => "\xEA\xB9\x87",
+ "\x83\x87" => "\xEA\xB9\x88",
+ "\x83\x88" => "\xEA\xB9\x89",
+ "\x83\x89" => "\xEA\xB9\x8B",
+ "\x83\x8A" => "\xEA\xB9\x8F",
+ "\x83\x8B" => "\xEA\xB9\x91",
+ "\x83\x8C" => "\xEA\xB9\x92",
+ "\x83\x8D" => "\xEA\xB9\x93",
+ "\x83\x8E" => "\xEA\xB9\x95",
+ "\x83\x8F" => "\xEA\xB9\x97",
+ "\x83\x90" => "\xEA\xB9\x98",
+ "\x83\x91" => "\xEA\xB9\x99",
+ "\x83\x92" => "\xEA\xB9\x9A",
+ "\x83\x93" => "\xEA\xB9\x9B",
+ "\x83\x94" => "\xEA\xB9\x9E",
+ "\x83\x95" => "\xEA\xB9\xA2",
+ "\x83\x96" => "\xEA\xB9\xA3",
+ "\x83\x97" => "\xEA\xB9\xA4",
+ "\x83\x98" => "\xEA\xB9\xA6",
+ "\x83\x99" => "\xEA\xB9\xA7",
+ "\x83\x9A" => "\xEA\xB9\xAA",
+ "\x83\x9B" => "\xEA\xB9\xAB",
+ "\x83\x9C" => "\xEA\xB9\xAD",
+ "\x83\x9D" => "\xEA\xB9\xAE",
+ "\x83\x9E" => "\xEA\xB9\xAF",
+ "\x83\x9F" => "\xEA\xB9\xB1",
+ "\x83\xA0" => "\xEA\xB9\xB2",
+ "\x83\xA1" => "\xEA\xB9\xB3",
+ "\x83\xA2" => "\xEA\xB9\xB4",
+ "\x83\xA3" => "\xEA\xB9\xB5",
+ "\x83\xA4" => "\xEA\xB9\xB6",
+ "\x83\xA5" => "\xEA\xB9\xB7",
+ "\x83\xA6" => "\xEA\xB9\xBA",
+ "\x83\xA7" => "\xEA\xB9\xBE",
+ "\x83\xA8" => "\xEA\xB9\xBF",
+ "\x83\xA9" => "\xEA\xBA\x80",
+ "\x83\xAA" => "\xEA\xBA\x81",
+ "\x83\xAB" => "\xEA\xBA\x82",
+ "\x83\xAC" => "\xEA\xBA\x83",
+ "\x83\xAD" => "\xEA\xBA\x86",
+ "\x83\xAE" => "\xEA\xBA\x87",
+ "\x83\xAF" => "\xEA\xBA\x88",
+ "\x83\xB0" => "\xEA\xBA\x89",
+ "\x83\xB1" => "\xEA\xBA\x8A",
+ "\x83\xB2" => "\xEA\xBA\x8B",
+ "\x83\xB3" => "\xEA\xBA\x8D",
+ "\x83\xB4" => "\xEA\xBA\x8E",
+ "\x83\xB5" => "\xEA\xBA\x8F",
+ "\x83\xB6" => "\xEA\xBA\x90",
+ "\x83\xB7" => "\xEA\xBA\x91",
+ "\x83\xB8" => "\xEA\xBA\x92",
+ "\x83\xB9" => "\xEA\xBA\x93",
+ "\x83\xBA" => "\xEA\xBA\x94",
+ "\x83\xBB" => "\xEA\xBA\x95",
+ "\x83\xBC" => "\xEA\xBA\x96",
+ "\x83\xBD" => "\xEA\xBA\x97",
+ "\x83\xBE" => "\xEA\xBA\x98",
+ "\x83\xBF" => "\xEA\xBA\x99",
+ "\x83\xC0" => "\xEA\xBA\x9A",
+ "\x83\xC1" => "\xEA\xBA\x9B",
+ "\x83\xC2" => "\xEA\xBA\x9C",
+ "\x83\xC3" => "\xEA\xBA\x9D",
+ "\x83\xC4" => "\xEA\xBA\x9E",
+ "\x83\xC5" => "\xEA\xBA\x9F",
+ "\x83\xC6" => "\xEA\xBA\xA0",
+ "\x83\xC7" => "\xEA\xBA\xA1",
+ "\x83\xC8" => "\xEA\xBA\xA2",
+ "\x83\xC9" => "\xEA\xBA\xA3",
+ "\x83\xCA" => "\xEA\xBA\xA4",
+ "\x83\xCB" => "\xEA\xBA\xA5",
+ "\x83\xCC" => "\xEA\xBA\xA6",
+ "\x83\xCD" => "\xEA\xBA\xA7",
+ "\x83\xCE" => "\xEA\xBA\xA8",
+ "\x83\xCF" => "\xEA\xBA\xA9",
+ "\x83\xD0" => "\xEA\xBA\xAA",
+ "\x83\xD1" => "\xEA\xBA\xAB",
+ "\x83\xD2" => "\xEA\xBA\xAC",
+ "\x83\xD3" => "\xEA\xBA\xAD",
+ "\x83\xD4" => "\xEA\xBA\xAE",
+ "\x83\xD5" => "\xEA\xBA\xAF",
+ "\x83\xD6" => "\xEA\xBA\xB0",
+ "\x83\xD7" => "\xEA\xBA\xB1",
+ "\x83\xD8" => "\xEA\xBA\xB2",
+ "\x83\xD9" => "\xEA\xBA\xB3",
+ "\x83\xDA" => "\xEA\xBA\xB4",
+ "\x83\xDB" => "\xEA\xBA\xB5",
+ "\x83\xDC" => "\xEA\xBA\xB6",
+ "\x83\xDD" => "\xEA\xBA\xB7",
+ "\x83\xDE" => "\xEA\xBA\xB8",
+ "\x83\xDF" => "\xEA\xBA\xB9",
+ "\x83\xE0" => "\xEA\xBA\xBA",
+ "\x83\xE1" => "\xEA\xBA\xBB",
+ "\x83\xE2" => "\xEA\xBA\xBF",
+ "\x83\xE3" => "\xEA\xBB\x81",
+ "\x83\xE4" => "\xEA\xBB\x82",
+ "\x83\xE5" => "\xEA\xBB\x83",
+ "\x83\xE6" => "\xEA\xBB\x85",
+ "\x83\xE7" => "\xEA\xBB\x86",
+ "\x83\xE8" => "\xEA\xBB\x87",
+ "\x83\xE9" => "\xEA\xBB\x88",
+ "\x83\xEA" => "\xEA\xBB\x89",
+ "\x83\xEB" => "\xEA\xBB\x8A",
+ "\x83\xEC" => "\xEA\xBB\x8B",
+ "\x83\xED" => "\xEA\xBB\x8E",
+ "\x83\xEE" => "\xEA\xBB\x92",
+ "\x83\xEF" => "\xEA\xBB\x93",
+ "\x83\xF0" => "\xEA\xBB\x94",
+ "\x83\xF1" => "\xEA\xBB\x95",
+ "\x83\xF2" => "\xEA\xBB\x96",
+ "\x83\xF3" => "\xEA\xBB\x97",
+ "\x83\xF4" => "\xEA\xBB\x9A",
+ "\x83\xF5" => "\xEA\xBB\x9B",
+ "\x83\xF6" => "\xEA\xBB\x9D",
+ "\x83\xF7" => "\xEA\xBB\x9E",
+ "\x83\xF8" => "\xEA\xBB\x9F",
+ "\x83\xF9" => "\xEA\xBB\xA0",
+ "\x83\xFA" => "\xEA\xBB\xA1",
+ "\x83\xFB" => "\xEA\xBB\xA2",
+ "\x83\xFC" => "\xEA\xBB\xA3",
+ "\x83\xFD" => "\xEA\xBB\xA4",
+ "\x83\xFE" => "\xEA\xBB\xA5",
+ "\x84\x41" => "\xEA\xBB\xA6",
+ "\x84\x42" => "\xEA\xBB\xA7",
+ "\x84\x43" => "\xEA\xBB\xA9",
+ "\x84\x44" => "\xEA\xBB\xAA",
+ "\x84\x45" => "\xEA\xBB\xAC",
+ "\x84\x46" => "\xEA\xBB\xAE",
+ "\x84\x47" => "\xEA\xBB\xAF",
+ "\x84\x48" => "\xEA\xBB\xB0",
+ "\x84\x49" => "\xEA\xBB\xB1",
+ "\x84\x4A" => "\xEA\xBB\xB2",
+ "\x84\x4B" => "\xEA\xBB\xB3",
+ "\x84\x4C" => "\xEA\xBB\xB5",
+ "\x84\x4D" => "\xEA\xBB\xB6",
+ "\x84\x4E" => "\xEA\xBB\xB7",
+ "\x84\x4F" => "\xEA\xBB\xB9",
+ "\x84\x50" => "\xEA\xBB\xBA",
+ "\x84\x51" => "\xEA\xBB\xBB",
+ "\x84\x52" => "\xEA\xBB\xBD",
+ "\x84\x53" => "\xEA\xBB\xBE",
+ "\x84\x54" => "\xEA\xBB\xBF",
+ "\x84\x55" => "\xEA\xBC\x80",
+ "\x84\x56" => "\xEA\xBC\x81",
+ "\x84\x57" => "\xEA\xBC\x82",
+ "\x84\x58" => "\xEA\xBC\x83",
+ "\x84\x59" => "\xEA\xBC\x84",
+ "\x84\x5A" => "\xEA\xBC\x85",
+ "\x84\x61" => "\xEA\xBC\x86",
+ "\x84\x62" => "\xEA\xBC\x89",
+ "\x84\x63" => "\xEA\xBC\x8A",
+ "\x84\x64" => "\xEA\xBC\x8B",
+ "\x84\x65" => "\xEA\xBC\x8C",
+ "\x84\x66" => "\xEA\xBC\x8E",
+ "\x84\x67" => "\xEA\xBC\x8F",
+ "\x84\x68" => "\xEA\xBC\x91",
+ "\x84\x69" => "\xEA\xBC\x92",
+ "\x84\x6A" => "\xEA\xBC\x93",
+ "\x84\x6B" => "\xEA\xBC\x94",
+ "\x84\x6C" => "\xEA\xBC\x95",
+ "\x84\x6D" => "\xEA\xBC\x96",
+ "\x84\x6E" => "\xEA\xBC\x97",
+ "\x84\x6F" => "\xEA\xBC\x98",
+ "\x84\x70" => "\xEA\xBC\x99",
+ "\x84\x71" => "\xEA\xBC\x9A",
+ "\x84\x72" => "\xEA\xBC\x9B",
+ "\x84\x73" => "\xEA\xBC\x9C",
+ "\x84\x74" => "\xEA\xBC\x9D",
+ "\x84\x75" => "\xEA\xBC\x9E",
+ "\x84\x76" => "\xEA\xBC\x9F",
+ "\x84\x77" => "\xEA\xBC\xA0",
+ "\x84\x78" => "\xEA\xBC\xA1",
+ "\x84\x79" => "\xEA\xBC\xA2",
+ "\x84\x7A" => "\xEA\xBC\xA3",
+ "\x84\x81" => "\xEA\xBC\xA4",
+ "\x84\x82" => "\xEA\xBC\xA5",
+ "\x84\x83" => "\xEA\xBC\xA6",
+ "\x84\x84" => "\xEA\xBC\xA7",
+ "\x84\x85" => "\xEA\xBC\xA8",
+ "\x84\x86" => "\xEA\xBC\xA9",
+ "\x84\x87" => "\xEA\xBC\xAA",
+ "\x84\x88" => "\xEA\xBC\xAB",
+ "\x84\x89" => "\xEA\xBC\xAE",
+ "\x84\x8A" => "\xEA\xBC\xAF",
+ "\x84\x8B" => "\xEA\xBC\xB1",
+ "\x84\x8C" => "\xEA\xBC\xB3",
+ "\x84\x8D" => "\xEA\xBC\xB5",
+ "\x84\x8E" => "\xEA\xBC\xB6",
+ "\x84\x8F" => "\xEA\xBC\xB7",
+ "\x84\x90" => "\xEA\xBC\xB8",
+ "\x84\x91" => "\xEA\xBC\xB9",
+ "\x84\x92" => "\xEA\xBC\xBA",
+ "\x84\x93" => "\xEA\xBC\xBB",
+ "\x84\x94" => "\xEA\xBC\xBE",
+ "\x84\x95" => "\xEA\xBD\x80",
+ "\x84\x96" => "\xEA\xBD\x84",
+ "\x84\x97" => "\xEA\xBD\x85",
+ "\x84\x98" => "\xEA\xBD\x86",
+ "\x84\x99" => "\xEA\xBD\x87",
+ "\x84\x9A" => "\xEA\xBD\x8A",
+ "\x84\x9B" => "\xEA\xBD\x8B",
+ "\x84\x9C" => "\xEA\xBD\x8C",
+ "\x84\x9D" => "\xEA\xBD\x8D",
+ "\x84\x9E" => "\xEA\xBD\x8E",
+ "\x84\x9F" => "\xEA\xBD\x8F",
+ "\x84\xA0" => "\xEA\xBD\x91",
+ "\x84\xA1" => "\xEA\xBD\x92",
+ "\x84\xA2" => "\xEA\xBD\x93",
+ "\x84\xA3" => "\xEA\xBD\x94",
+ "\x84\xA4" => "\xEA\xBD\x95",
+ "\x84\xA5" => "\xEA\xBD\x96",
+ "\x84\xA6" => "\xEA\xBD\x97",
+ "\x84\xA7" => "\xEA\xBD\x98",
+ "\x84\xA8" => "\xEA\xBD\x99",
+ "\x84\xA9" => "\xEA\xBD\x9A",
+ "\x84\xAA" => "\xEA\xBD\x9B",
+ "\x84\xAB" => "\xEA\xBD\x9E",
+ "\x84\xAC" => "\xEA\xBD\x9F",
+ "\x84\xAD" => "\xEA\xBD\xA0",
+ "\x84\xAE" => "\xEA\xBD\xA1",
+ "\x84\xAF" => "\xEA\xBD\xA2",
+ "\x84\xB0" => "\xEA\xBD\xA3",
+ "\x84\xB1" => "\xEA\xBD\xA6",
+ "\x84\xB2" => "\xEA\xBD\xA7",
+ "\x84\xB3" => "\xEA\xBD\xA8",
+ "\x84\xB4" => "\xEA\xBD\xA9",
+ "\x84\xB5" => "\xEA\xBD\xAA",
+ "\x84\xB6" => "\xEA\xBD\xAB",
+ "\x84\xB7" => "\xEA\xBD\xAC",
+ "\x84\xB8" => "\xEA\xBD\xAD",
+ "\x84\xB9" => "\xEA\xBD\xAE",
+ "\x84\xBA" => "\xEA\xBD\xAF",
+ "\x84\xBB" => "\xEA\xBD\xB0",
+ "\x84\xBC" => "\xEA\xBD\xB1",
+ "\x84\xBD" => "\xEA\xBD\xB2",
+ "\x84\xBE" => "\xEA\xBD\xB3",
+ "\x84\xBF" => "\xEA\xBD\xB4",
+ "\x84\xC0" => "\xEA\xBD\xB5",
+ "\x84\xC1" => "\xEA\xBD\xB6",
+ "\x84\xC2" => "\xEA\xBD\xB7",
+ "\x84\xC3" => "\xEA\xBD\xB8",
+ "\x84\xC4" => "\xEA\xBD\xBA",
+ "\x84\xC5" => "\xEA\xBD\xBB",
+ "\x84\xC6" => "\xEA\xBD\xBC",
+ "\x84\xC7" => "\xEA\xBD\xBD",
+ "\x84\xC8" => "\xEA\xBD\xBE",
+ "\x84\xC9" => "\xEA\xBD\xBF",
+ "\x84\xCA" => "\xEA\xBE\x81",
+ "\x84\xCB" => "\xEA\xBE\x82",
+ "\x84\xCC" => "\xEA\xBE\x83",
+ "\x84\xCD" => "\xEA\xBE\x85",
+ "\x84\xCE" => "\xEA\xBE\x86",
+ "\x84\xCF" => "\xEA\xBE\x87",
+ "\x84\xD0" => "\xEA\xBE\x89",
+ "\x84\xD1" => "\xEA\xBE\x8A",
+ "\x84\xD2" => "\xEA\xBE\x8B",
+ "\x84\xD3" => "\xEA\xBE\x8C",
+ "\x84\xD4" => "\xEA\xBE\x8D",
+ "\x84\xD5" => "\xEA\xBE\x8E",
+ "\x84\xD6" => "\xEA\xBE\x8F",
+ "\x84\xD7" => "\xEA\xBE\x92",
+ "\x84\xD8" => "\xEA\xBE\x93",
+ "\x84\xD9" => "\xEA\xBE\x94",
+ "\x84\xDA" => "\xEA\xBE\x96",
+ "\x84\xDB" => "\xEA\xBE\x97",
+ "\x84\xDC" => "\xEA\xBE\x98",
+ "\x84\xDD" => "\xEA\xBE\x99",
+ "\x84\xDE" => "\xEA\xBE\x9A",
+ "\x84\xDF" => "\xEA\xBE\x9B",
+ "\x84\xE0" => "\xEA\xBE\x9D",
+ "\x84\xE1" => "\xEA\xBE\x9E",
+ "\x84\xE2" => "\xEA\xBE\x9F",
+ "\x84\xE3" => "\xEA\xBE\xA0",
+ "\x84\xE4" => "\xEA\xBE\xA1",
+ "\x84\xE5" => "\xEA\xBE\xA2",
+ "\x84\xE6" => "\xEA\xBE\xA3",
+ "\x84\xE7" => "\xEA\xBE\xA4",
+ "\x84\xE8" => "\xEA\xBE\xA5",
+ "\x84\xE9" => "\xEA\xBE\xA6",
+ "\x84\xEA" => "\xEA\xBE\xA7",
+ "\x84\xEB" => "\xEA\xBE\xA8",
+ "\x84\xEC" => "\xEA\xBE\xA9",
+ "\x84\xED" => "\xEA\xBE\xAA",
+ "\x84\xEE" => "\xEA\xBE\xAB",
+ "\x84\xEF" => "\xEA\xBE\xAC",
+ "\x84\xF0" => "\xEA\xBE\xAD",
+ "\x84\xF1" => "\xEA\xBE\xAE",
+ "\x84\xF2" => "\xEA\xBE\xAF",
+ "\x84\xF3" => "\xEA\xBE\xB0",
+ "\x84\xF4" => "\xEA\xBE\xB1",
+ "\x84\xF5" => "\xEA\xBE\xB2",
+ "\x84\xF6" => "\xEA\xBE\xB3",
+ "\x84\xF7" => "\xEA\xBE\xB4",
+ "\x84\xF8" => "\xEA\xBE\xB5",
+ "\x84\xF9" => "\xEA\xBE\xB6",
+ "\x84\xFA" => "\xEA\xBE\xB7",
+ "\x84\xFB" => "\xEA\xBE\xBA",
+ "\x84\xFC" => "\xEA\xBE\xBB",
+ "\x84\xFD" => "\xEA\xBE\xBD",
+ "\x84\xFE" => "\xEA\xBE\xBE",
+ "\x85\x41" => "\xEA\xBE\xBF",
+ "\x85\x42" => "\xEA\xBF\x81",
+ "\x85\x43" => "\xEA\xBF\x82",
+ "\x85\x44" => "\xEA\xBF\x83",
+ "\x85\x45" => "\xEA\xBF\x84",
+ "\x85\x46" => "\xEA\xBF\x85",
+ "\x85\x47" => "\xEA\xBF\x86",
+ "\x85\x48" => "\xEA\xBF\x8A",
+ "\x85\x49" => "\xEA\xBF\x8C",
+ "\x85\x4A" => "\xEA\xBF\x8F",
+ "\x85\x4B" => "\xEA\xBF\x90",
+ "\x85\x4C" => "\xEA\xBF\x91",
+ "\x85\x4D" => "\xEA\xBF\x92",
+ "\x85\x4E" => "\xEA\xBF\x93",
+ "\x85\x4F" => "\xEA\xBF\x95",
+ "\x85\x50" => "\xEA\xBF\x96",
+ "\x85\x51" => "\xEA\xBF\x97",
+ "\x85\x52" => "\xEA\xBF\x98",
+ "\x85\x53" => "\xEA\xBF\x99",
+ "\x85\x54" => "\xEA\xBF\x9A",
+ "\x85\x55" => "\xEA\xBF\x9B",
+ "\x85\x56" => "\xEA\xBF\x9D",
+ "\x85\x57" => "\xEA\xBF\x9E",
+ "\x85\x58" => "\xEA\xBF\x9F",
+ "\x85\x59" => "\xEA\xBF\xA0",
+ "\x85\x5A" => "\xEA\xBF\xA1",
+ "\x85\x61" => "\xEA\xBF\xA2",
+ "\x85\x62" => "\xEA\xBF\xA3",
+ "\x85\x63" => "\xEA\xBF\xA4",
+ "\x85\x64" => "\xEA\xBF\xA5",
+ "\x85\x65" => "\xEA\xBF\xA6",
+ "\x85\x66" => "\xEA\xBF\xA7",
+ "\x85\x67" => "\xEA\xBF\xAA",
+ "\x85\x68" => "\xEA\xBF\xAB",
+ "\x85\x69" => "\xEA\xBF\xAC",
+ "\x85\x6A" => "\xEA\xBF\xAD",
+ "\x85\x6B" => "\xEA\xBF\xAE",
+ "\x85\x6C" => "\xEA\xBF\xAF",
+ "\x85\x6D" => "\xEA\xBF\xB2",
+ "\x85\x6E" => "\xEA\xBF\xB3",
+ "\x85\x6F" => "\xEA\xBF\xB5",
+ "\x85\x70" => "\xEA\xBF\xB6",
+ "\x85\x71" => "\xEA\xBF\xB7",
+ "\x85\x72" => "\xEA\xBF\xB9",
+ "\x85\x73" => "\xEA\xBF\xBA",
+ "\x85\x74" => "\xEA\xBF\xBB",
+ "\x85\x75" => "\xEA\xBF\xBC",
+ "\x85\x76" => "\xEA\xBF\xBD",
+ "\x85\x77" => "\xEA\xBF\xBE",
+ "\x85\x78" => "\xEA\xBF\xBF",
+ "\x85\x79" => "\xEB\x80\x82",
+ "\x85\x7A" => "\xEB\x80\x83",
+ "\x85\x81" => "\xEB\x80\x85",
+ "\x85\x82" => "\xEB\x80\x86",
+ "\x85\x83" => "\xEB\x80\x87",
+ "\x85\x84" => "\xEB\x80\x88",
+ "\x85\x85" => "\xEB\x80\x89",
+ "\x85\x86" => "\xEB\x80\x8A",
+ "\x85\x87" => "\xEB\x80\x8B",
+ "\x85\x88" => "\xEB\x80\x8D",
+ "\x85\x89" => "\xEB\x80\x8E",
+ "\x85\x8A" => "\xEB\x80\x8F",
+ "\x85\x8B" => "\xEB\x80\x91",
+ "\x85\x8C" => "\xEB\x80\x92",
+ "\x85\x8D" => "\xEB\x80\x93",
+ "\x85\x8E" => "\xEB\x80\x95",
+ "\x85\x8F" => "\xEB\x80\x96",
+ "\x85\x90" => "\xEB\x80\x97",
+ "\x85\x91" => "\xEB\x80\x98",
+ "\x85\x92" => "\xEB\x80\x99",
+ "\x85\x93" => "\xEB\x80\x9A",
+ "\x85\x94" => "\xEB\x80\x9B",
+ "\x85\x95" => "\xEB\x80\x9E",
+ "\x85\x96" => "\xEB\x80\x9F",
+ "\x85\x97" => "\xEB\x80\xA0",
+ "\x85\x98" => "\xEB\x80\xA1",
+ "\x85\x99" => "\xEB\x80\xA2",
+ "\x85\x9A" => "\xEB\x80\xA3",
+ "\x85\x9B" => "\xEB\x80\xA4",
+ "\x85\x9C" => "\xEB\x80\xA5",
+ "\x85\x9D" => "\xEB\x80\xA6",
+ "\x85\x9E" => "\xEB\x80\xA7",
+ "\x85\x9F" => "\xEB\x80\xA9",
+ "\x85\xA0" => "\xEB\x80\xAA",
+ "\x85\xA1" => "\xEB\x80\xAB",
+ "\x85\xA2" => "\xEB\x80\xAC",
+ "\x85\xA3" => "\xEB\x80\xAD",
+ "\x85\xA4" => "\xEB\x80\xAE",
+ "\x85\xA5" => "\xEB\x80\xAF",
+ "\x85\xA6" => "\xEB\x80\xB0",
+ "\x85\xA7" => "\xEB\x80\xB1",
+ "\x85\xA8" => "\xEB\x80\xB2",
+ "\x85\xA9" => "\xEB\x80\xB3",
+ "\x85\xAA" => "\xEB\x80\xB4",
+ "\x85\xAB" => "\xEB\x80\xB5",
+ "\x85\xAC" => "\xEB\x80\xB6",
+ "\x85\xAD" => "\xEB\x80\xB7",
+ "\x85\xAE" => "\xEB\x80\xB8",
+ "\x85\xAF" => "\xEB\x80\xB9",
+ "\x85\xB0" => "\xEB\x80\xBA",
+ "\x85\xB1" => "\xEB\x80\xBB",
+ "\x85\xB2" => "\xEB\x80\xBC",
+ "\x85\xB3" => "\xEB\x80\xBD",
+ "\x85\xB4" => "\xEB\x80\xBE",
+ "\x85\xB5" => "\xEB\x80\xBF",
+ "\x85\xB6" => "\xEB\x81\x80",
+ "\x85\xB7" => "\xEB\x81\x81",
+ "\x85\xB8" => "\xEB\x81\x82",
+ "\x85\xB9" => "\xEB\x81\x83",
+ "\x85\xBA" => "\xEB\x81\x86",
+ "\x85\xBB" => "\xEB\x81\x87",
+ "\x85\xBC" => "\xEB\x81\x89",
+ "\x85\xBD" => "\xEB\x81\x8B",
+ "\x85\xBE" => "\xEB\x81\x8D",
+ "\x85\xBF" => "\xEB\x81\x8F",
+ "\x85\xC0" => "\xEB\x81\x90",
+ "\x85\xC1" => "\xEB\x81\x91",
+ "\x85\xC2" => "\xEB\x81\x92",
+ "\x85\xC3" => "\xEB\x81\x96",
+ "\x85\xC4" => "\xEB\x81\x98",
+ "\x85\xC5" => "\xEB\x81\x9A",
+ "\x85\xC6" => "\xEB\x81\x9B",
+ "\x85\xC7" => "\xEB\x81\x9C",
+ "\x85\xC8" => "\xEB\x81\x9E",
+ "\x85\xC9" => "\xEB\x81\x9F",
+ "\x85\xCA" => "\xEB\x81\xA0",
+ "\x85\xCB" => "\xEB\x81\xA1",
+ "\x85\xCC" => "\xEB\x81\xA2",
+ "\x85\xCD" => "\xEB\x81\xA3",
+ "\x85\xCE" => "\xEB\x81\xA4",
+ "\x85\xCF" => "\xEB\x81\xA5",
+ "\x85\xD0" => "\xEB\x81\xA6",
+ "\x85\xD1" => "\xEB\x81\xA7",
+ "\x85\xD2" => "\xEB\x81\xA8",
+ "\x85\xD3" => "\xEB\x81\xA9",
+ "\x85\xD4" => "\xEB\x81\xAA",
+ "\x85\xD5" => "\xEB\x81\xAB",
+ "\x85\xD6" => "\xEB\x81\xAC",
+ "\x85\xD7" => "\xEB\x81\xAD",
+ "\x85\xD8" => "\xEB\x81\xAE",
+ "\x85\xD9" => "\xEB\x81\xAF",
+ "\x85\xDA" => "\xEB\x81\xB0",
+ "\x85\xDB" => "\xEB\x81\xB1",
+ "\x85\xDC" => "\xEB\x81\xB2",
+ "\x85\xDD" => "\xEB\x81\xB3",
+ "\x85\xDE" => "\xEB\x81\xB4",
+ "\x85\xDF" => "\xEB\x81\xB5",
+ "\x85\xE0" => "\xEB\x81\xB6",
+ "\x85\xE1" => "\xEB\x81\xB7",
+ "\x85\xE2" => "\xEB\x81\xB8",
+ "\x85\xE3" => "\xEB\x81\xB9",
+ "\x85\xE4" => "\xEB\x81\xBA",
+ "\x85\xE5" => "\xEB\x81\xBB",
+ "\x85\xE6" => "\xEB\x81\xBE",
+ "\x85\xE7" => "\xEB\x81\xBF",
+ "\x85\xE8" => "\xEB\x82\x81",
+ "\x85\xE9" => "\xEB\x82\x82",
+ "\x85\xEA" => "\xEB\x82\x83",
+ "\x85\xEB" => "\xEB\x82\x85",
+ "\x85\xEC" => "\xEB\x82\x86",
+ "\x85\xED" => "\xEB\x82\x87",
+ "\x85\xEE" => "\xEB\x82\x88",
+ "\x85\xEF" => "\xEB\x82\x89",
+ "\x85\xF0" => "\xEB\x82\x8A",
+ "\x85\xF1" => "\xEB\x82\x8B",
+ "\x85\xF2" => "\xEB\x82\x8E",
+ "\x85\xF3" => "\xEB\x82\x90",
+ "\x85\xF4" => "\xEB\x82\x92",
+ "\x85\xF5" => "\xEB\x82\x93",
+ "\x85\xF6" => "\xEB\x82\x94",
+ "\x85\xF7" => "\xEB\x82\x95",
+ "\x85\xF8" => "\xEB\x82\x96",
+ "\x85\xF9" => "\xEB\x82\x97",
+ "\x85\xFA" => "\xEB\x82\x9B",
+ "\x85\xFB" => "\xEB\x82\x9D",
+ "\x85\xFC" => "\xEB\x82\x9E",
+ "\x85\xFD" => "\xEB\x82\xA3",
+ "\x85\xFE" => "\xEB\x82\xA4",
+ "\x86\x41" => "\xEB\x82\xA5",
+ "\x86\x42" => "\xEB\x82\xA6",
+ "\x86\x43" => "\xEB\x82\xA7",
+ "\x86\x44" => "\xEB\x82\xAA",
+ "\x86\x45" => "\xEB\x82\xB0",
+ "\x86\x46" => "\xEB\x82\xB2",
+ "\x86\x47" => "\xEB\x82\xB6",
+ "\x86\x48" => "\xEB\x82\xB7",
+ "\x86\x49" => "\xEB\x82\xB9",
+ "\x86\x4A" => "\xEB\x82\xBA",
+ "\x86\x4B" => "\xEB\x82\xBB",
+ "\x86\x4C" => "\xEB\x82\xBD",
+ "\x86\x4D" => "\xEB\x82\xBE",
+ "\x86\x4E" => "\xEB\x82\xBF",
+ "\x86\x4F" => "\xEB\x83\x80",
+ "\x86\x50" => "\xEB\x83\x81",
+ "\x86\x51" => "\xEB\x83\x82",
+ "\x86\x52" => "\xEB\x83\x83",
+ "\x86\x53" => "\xEB\x83\x86",
+ "\x86\x54" => "\xEB\x83\x8A",
+ "\x86\x55" => "\xEB\x83\x8B",
+ "\x86\x56" => "\xEB\x83\x8C",
+ "\x86\x57" => "\xEB\x83\x8D",
+ "\x86\x58" => "\xEB\x83\x8E",
+ "\x86\x59" => "\xEB\x83\x8F",
+ "\x86\x5A" => "\xEB\x83\x92",
+ "\x86\x61" => "\xEB\x83\x93",
+ "\x86\x62" => "\xEB\x83\x95",
+ "\x86\x63" => "\xEB\x83\x96",
+ "\x86\x64" => "\xEB\x83\x97",
+ "\x86\x65" => "\xEB\x83\x99",
+ "\x86\x66" => "\xEB\x83\x9A",
+ "\x86\x67" => "\xEB\x83\x9B",
+ "\x86\x68" => "\xEB\x83\x9C",
+ "\x86\x69" => "\xEB\x83\x9D",
+ "\x86\x6A" => "\xEB\x83\x9E",
+ "\x86\x6B" => "\xEB\x83\x9F",
+ "\x86\x6C" => "\xEB\x83\xA1",
+ "\x86\x6D" => "\xEB\x83\xA2",
+ "\x86\x6E" => "\xEB\x83\xA3",
+ "\x86\x6F" => "\xEB\x83\xA4",
+ "\x86\x70" => "\xEB\x83\xA6",
+ "\x86\x71" => "\xEB\x83\xA7",
+ "\x86\x72" => "\xEB\x83\xA8",
+ "\x86\x73" => "\xEB\x83\xA9",
+ "\x86\x74" => "\xEB\x83\xAA",
+ "\x86\x75" => "\xEB\x83\xAB",
+ "\x86\x76" => "\xEB\x83\xAC",
+ "\x86\x77" => "\xEB\x83\xAD",
+ "\x86\x78" => "\xEB\x83\xAE",
+ "\x86\x79" => "\xEB\x83\xAF",
+ "\x86\x7A" => "\xEB\x83\xB0",
+ "\x86\x81" => "\xEB\x83\xB1",
+ "\x86\x82" => "\xEB\x83\xB2",
+ "\x86\x83" => "\xEB\x83\xB3",
+ "\x86\x84" => "\xEB\x83\xB4",
+ "\x86\x85" => "\xEB\x83\xB5",
+ "\x86\x86" => "\xEB\x83\xB6",
+ "\x86\x87" => "\xEB\x83\xB7",
+ "\x86\x88" => "\xEB\x83\xB8",
+ "\x86\x89" => "\xEB\x83\xB9",
+ "\x86\x8A" => "\xEB\x83\xBA",
+ "\x86\x8B" => "\xEB\x83\xBB",
+ "\x86\x8C" => "\xEB\x83\xBC",
+ "\x86\x8D" => "\xEB\x83\xBD",
+ "\x86\x8E" => "\xEB\x83\xBE",
+ "\x86\x8F" => "\xEB\x83\xBF",
+ "\x86\x90" => "\xEB\x84\x80",
+ "\x86\x91" => "\xEB\x84\x81",
+ "\x86\x92" => "\xEB\x84\x82",
+ "\x86\x93" => "\xEB\x84\x83",
+ "\x86\x94" => "\xEB\x84\x84",
+ "\x86\x95" => "\xEB\x84\x85",
+ "\x86\x96" => "\xEB\x84\x86",
+ "\x86\x97" => "\xEB\x84\x87",
+ "\x86\x98" => "\xEB\x84\x8A",
+ "\x86\x99" => "\xEB\x84\x8D",
+ "\x86\x9A" => "\xEB\x84\x8E",
+ "\x86\x9B" => "\xEB\x84\x8F",
+ "\x86\x9C" => "\xEB\x84\x91",
+ "\x86\x9D" => "\xEB\x84\x94",
+ "\x86\x9E" => "\xEB\x84\x95",
+ "\x86\x9F" => "\xEB\x84\x96",
+ "\x86\xA0" => "\xEB\x84\x97",
+ "\x86\xA1" => "\xEB\x84\x9A",
+ "\x86\xA2" => "\xEB\x84\x9E",
+ "\x86\xA3" => "\xEB\x84\x9F",
+ "\x86\xA4" => "\xEB\x84\xA0",
+ "\x86\xA5" => "\xEB\x84\xA1",
+ "\x86\xA6" => "\xEB\x84\xA2",
+ "\x86\xA7" => "\xEB\x84\xA6",
+ "\x86\xA8" => "\xEB\x84\xA7",
+ "\x86\xA9" => "\xEB\x84\xA9",
+ "\x86\xAA" => "\xEB\x84\xAA",
+ "\x86\xAB" => "\xEB\x84\xAB",
+ "\x86\xAC" => "\xEB\x84\xAD",
+ "\x86\xAD" => "\xEB\x84\xAE",
+ "\x86\xAE" => "\xEB\x84\xAF",
+ "\x86\xAF" => "\xEB\x84\xB0",
+ "\x86\xB0" => "\xEB\x84\xB1",
+ "\x86\xB1" => "\xEB\x84\xB2",
+ "\x86\xB2" => "\xEB\x84\xB3",
+ "\x86\xB3" => "\xEB\x84\xB6",
+ "\x86\xB4" => "\xEB\x84\xBA",
+ "\x86\xB5" => "\xEB\x84\xBB",
+ "\x86\xB6" => "\xEB\x84\xBC",
+ "\x86\xB7" => "\xEB\x84\xBD",
+ "\x86\xB8" => "\xEB\x84\xBE",
+ "\x86\xB9" => "\xEB\x84\xBF",
+ "\x86\xBA" => "\xEB\x85\x82",
+ "\x86\xBB" => "\xEB\x85\x83",
+ "\x86\xBC" => "\xEB\x85\x85",
+ "\x86\xBD" => "\xEB\x85\x86",
+ "\x86\xBE" => "\xEB\x85\x87",
+ "\x86\xBF" => "\xEB\x85\x89",
+ "\x86\xC0" => "\xEB\x85\x8A",
+ "\x86\xC1" => "\xEB\x85\x8B",
+ "\x86\xC2" => "\xEB\x85\x8C",
+ "\x86\xC3" => "\xEB\x85\x8D",
+ "\x86\xC4" => "\xEB\x85\x8E",
+ "\x86\xC5" => "\xEB\x85\x8F",
+ "\x86\xC6" => "\xEB\x85\x92",
+ "\x86\xC7" => "\xEB\x85\x93",
+ "\x86\xC8" => "\xEB\x85\x96",
+ "\x86\xC9" => "\xEB\x85\x97",
+ "\x86\xCA" => "\xEB\x85\x99",
+ "\x86\xCB" => "\xEB\x85\x9A",
+ "\x86\xCC" => "\xEB\x85\x9B",
+ "\x86\xCD" => "\xEB\x85\x9D",
+ "\x86\xCE" => "\xEB\x85\x9E",
+ "\x86\xCF" => "\xEB\x85\x9F",
+ "\x86\xD0" => "\xEB\x85\xA1",
+ "\x86\xD1" => "\xEB\x85\xA2",
+ "\x86\xD2" => "\xEB\x85\xA3",
+ "\x86\xD3" => "\xEB\x85\xA4",
+ "\x86\xD4" => "\xEB\x85\xA5",
+ "\x86\xD5" => "\xEB\x85\xA6",
+ "\x86\xD6" => "\xEB\x85\xA7",
+ "\x86\xD7" => "\xEB\x85\xA8",
+ "\x86\xD8" => "\xEB\x85\xA9",
+ "\x86\xD9" => "\xEB\x85\xAA",
+ "\x86\xDA" => "\xEB\x85\xAB",
+ "\x86\xDB" => "\xEB\x85\xAC",
+ "\x86\xDC" => "\xEB\x85\xAD",
+ "\x86\xDD" => "\xEB\x85\xAE",
+ "\x86\xDE" => "\xEB\x85\xAF",
+ "\x86\xDF" => "\xEB\x85\xB0",
+ "\x86\xE0" => "\xEB\x85\xB1",
+ "\x86\xE1" => "\xEB\x85\xB2",
+ "\x86\xE2" => "\xEB\x85\xB3",
+ "\x86\xE3" => "\xEB\x85\xB4",
+ "\x86\xE4" => "\xEB\x85\xB5",
+ "\x86\xE5" => "\xEB\x85\xB6",
+ "\x86\xE6" => "\xEB\x85\xB7",
+ "\x86\xE7" => "\xEB\x85\xBA",
+ "\x86\xE8" => "\xEB\x85\xBB",
+ "\x86\xE9" => "\xEB\x85\xBD",
+ "\x86\xEA" => "\xEB\x85\xBE",
+ "\x86\xEB" => "\xEB\x85\xBF",
+ "\x86\xEC" => "\xEB\x86\x81",
+ "\x86\xED" => "\xEB\x86\x83",
+ "\x86\xEE" => "\xEB\x86\x84",
+ "\x86\xEF" => "\xEB\x86\x85",
+ "\x86\xF0" => "\xEB\x86\x86",
+ "\x86\xF1" => "\xEB\x86\x87",
+ "\x86\xF2" => "\xEB\x86\x8A",
+ "\x86\xF3" => "\xEB\x86\x8C",
+ "\x86\xF4" => "\xEB\x86\x8E",
+ "\x86\xF5" => "\xEB\x86\x8F",
+ "\x86\xF6" => "\xEB\x86\x90",
+ "\x86\xF7" => "\xEB\x86\x91",
+ "\x86\xF8" => "\xEB\x86\x95",
+ "\x86\xF9" => "\xEB\x86\x96",
+ "\x86\xFA" => "\xEB\x86\x97",
+ "\x86\xFB" => "\xEB\x86\x99",
+ "\x86\xFC" => "\xEB\x86\x9A",
+ "\x86\xFD" => "\xEB\x86\x9B",
+ "\x86\xFE" => "\xEB\x86\x9D",
+ "\x87\x41" => "\xEB\x86\x9E",
+ "\x87\x42" => "\xEB\x86\x9F",
+ "\x87\x43" => "\xEB\x86\xA0",
+ "\x87\x44" => "\xEB\x86\xA1",
+ "\x87\x45" => "\xEB\x86\xA2",
+ "\x87\x46" => "\xEB\x86\xA3",
+ "\x87\x47" => "\xEB\x86\xA4",
+ "\x87\x48" => "\xEB\x86\xA5",
+ "\x87\x49" => "\xEB\x86\xA6",
+ "\x87\x4A" => "\xEB\x86\xA7",
+ "\x87\x4B" => "\xEB\x86\xA9",
+ "\x87\x4C" => "\xEB\x86\xAA",
+ "\x87\x4D" => "\xEB\x86\xAB",
+ "\x87\x4E" => "\xEB\x86\xAC",
+ "\x87\x4F" => "\xEB\x86\xAD",
+ "\x87\x50" => "\xEB\x86\xAE",
+ "\x87\x51" => "\xEB\x86\xAF",
+ "\x87\x52" => "\xEB\x86\xB0",
+ "\x87\x53" => "\xEB\x86\xB1",
+ "\x87\x54" => "\xEB\x86\xB2",
+ "\x87\x55" => "\xEB\x86\xB3",
+ "\x87\x56" => "\xEB\x86\xB4",
+ "\x87\x57" => "\xEB\x86\xB5",
+ "\x87\x58" => "\xEB\x86\xB6",
+ "\x87\x59" => "\xEB\x86\xB7",
+ "\x87\x5A" => "\xEB\x86\xB8",
+ "\x87\x61" => "\xEB\x86\xB9",
+ "\x87\x62" => "\xEB\x86\xBA",
+ "\x87\x63" => "\xEB\x86\xBB",
+ "\x87\x64" => "\xEB\x86\xBC",
+ "\x87\x65" => "\xEB\x86\xBD",
+ "\x87\x66" => "\xEB\x86\xBE",
+ "\x87\x67" => "\xEB\x86\xBF",
+ "\x87\x68" => "\xEB\x87\x80",
+ "\x87\x69" => "\xEB\x87\x81",
+ "\x87\x6A" => "\xEB\x87\x82",
+ "\x87\x6B" => "\xEB\x87\x83",
+ "\x87\x6C" => "\xEB\x87\x84",
+ "\x87\x6D" => "\xEB\x87\x85",
+ "\x87\x6E" => "\xEB\x87\x86",
+ "\x87\x6F" => "\xEB\x87\x87",
+ "\x87\x70" => "\xEB\x87\x88",
+ "\x87\x71" => "\xEB\x87\x89",
+ "\x87\x72" => "\xEB\x87\x8A",
+ "\x87\x73" => "\xEB\x87\x8B",
+ "\x87\x74" => "\xEB\x87\x8D",
+ "\x87\x75" => "\xEB\x87\x8E",
+ "\x87\x76" => "\xEB\x87\x8F",
+ "\x87\x77" => "\xEB\x87\x91",
+ "\x87\x78" => "\xEB\x87\x92",
+ "\x87\x79" => "\xEB\x87\x93",
+ "\x87\x7A" => "\xEB\x87\x95",
+ "\x87\x81" => "\xEB\x87\x96",
+ "\x87\x82" => "\xEB\x87\x97",
+ "\x87\x83" => "\xEB\x87\x98",
+ "\x87\x84" => "\xEB\x87\x99",
+ "\x87\x85" => "\xEB\x87\x9A",
+ "\x87\x86" => "\xEB\x87\x9B",
+ "\x87\x87" => "\xEB\x87\x9E",
+ "\x87\x88" => "\xEB\x87\xA0",
+ "\x87\x89" => "\xEB\x87\xA1",
+ "\x87\x8A" => "\xEB\x87\xA2",
+ "\x87\x8B" => "\xEB\x87\xA3",
+ "\x87\x8C" => "\xEB\x87\xA4",
+ "\x87\x8D" => "\xEB\x87\xA5",
+ "\x87\x8E" => "\xEB\x87\xA6",
+ "\x87\x8F" => "\xEB\x87\xA7",
+ "\x87\x90" => "\xEB\x87\xAA",
+ "\x87\x91" => "\xEB\x87\xAB",
+ "\x87\x92" => "\xEB\x87\xAD",
+ "\x87\x93" => "\xEB\x87\xAE",
+ "\x87\x94" => "\xEB\x87\xAF",
+ "\x87\x95" => "\xEB\x87\xB1",
+ "\x87\x96" => "\xEB\x87\xB2",
+ "\x87\x97" => "\xEB\x87\xB3",
+ "\x87\x98" => "\xEB\x87\xB4",
+ "\x87\x99" => "\xEB\x87\xB5",
+ "\x87\x9A" => "\xEB\x87\xB6",
+ "\x87\x9B" => "\xEB\x87\xB7",
+ "\x87\x9C" => "\xEB\x87\xB8",
+ "\x87\x9D" => "\xEB\x87\xBA",
+ "\x87\x9E" => "\xEB\x87\xBC",
+ "\x87\x9F" => "\xEB\x87\xBE",
+ "\x87\xA0" => "\xEB\x87\xBF",
+ "\x87\xA1" => "\xEB\x88\x80",
+ "\x87\xA2" => "\xEB\x88\x81",
+ "\x87\xA3" => "\xEB\x88\x82",
+ "\x87\xA4" => "\xEB\x88\x83",
+ "\x87\xA5" => "\xEB\x88\x86",
+ "\x87\xA6" => "\xEB\x88\x87",
+ "\x87\xA7" => "\xEB\x88\x89",
+ "\x87\xA8" => "\xEB\x88\x8A",
+ "\x87\xA9" => "\xEB\x88\x8D",
+ "\x87\xAA" => "\xEB\x88\x8E",
+ "\x87\xAB" => "\xEB\x88\x8F",
+ "\x87\xAC" => "\xEB\x88\x90",
+ "\x87\xAD" => "\xEB\x88\x91",
+ "\x87\xAE" => "\xEB\x88\x92",
+ "\x87\xAF" => "\xEB\x88\x93",
+ "\x87\xB0" => "\xEB\x88\x96",
+ "\x87\xB1" => "\xEB\x88\x98",
+ "\x87\xB2" => "\xEB\x88\x9A",
+ "\x87\xB3" => "\xEB\x88\x9B",
+ "\x87\xB4" => "\xEB\x88\x9C",
+ "\x87\xB5" => "\xEB\x88\x9D",
+ "\x87\xB6" => "\xEB\x88\x9E",
+ "\x87\xB7" => "\xEB\x88\x9F",
+ "\x87\xB8" => "\xEB\x88\xA1",
+ "\x87\xB9" => "\xEB\x88\xA2",
+ "\x87\xBA" => "\xEB\x88\xA3",
+ "\x87\xBB" => "\xEB\x88\xA4",
+ "\x87\xBC" => "\xEB\x88\xA5",
+ "\x87\xBD" => "\xEB\x88\xA6",
+ "\x87\xBE" => "\xEB\x88\xA7",
+ "\x87\xBF" => "\xEB\x88\xA8",
+ "\x87\xC0" => "\xEB\x88\xA9",
+ "\x87\xC1" => "\xEB\x88\xAA",
+ "\x87\xC2" => "\xEB\x88\xAB",
+ "\x87\xC3" => "\xEB\x88\xAC",
+ "\x87\xC4" => "\xEB\x88\xAD",
+ "\x87\xC5" => "\xEB\x88\xAE",
+ "\x87\xC6" => "\xEB\x88\xAF",
+ "\x87\xC7" => "\xEB\x88\xB0",
+ "\x87\xC8" => "\xEB\x88\xB1",
+ "\x87\xC9" => "\xEB\x88\xB2",
+ "\x87\xCA" => "\xEB\x88\xB3",
+ "\x87\xCB" => "\xEB\x88\xB5",
+ "\x87\xCC" => "\xEB\x88\xB6",
+ "\x87\xCD" => "\xEB\x88\xB7",
+ "\x87\xCE" => "\xEB\x88\xB8",
+ "\x87\xCF" => "\xEB\x88\xB9",
+ "\x87\xD0" => "\xEB\x88\xBA",
+ "\x87\xD1" => "\xEB\x88\xBB",
+ "\x87\xD2" => "\xEB\x88\xBD",
+ "\x87\xD3" => "\xEB\x88\xBE",
+ "\x87\xD4" => "\xEB\x88\xBF",
+ "\x87\xD5" => "\xEB\x89\x80",
+ "\x87\xD6" => "\xEB\x89\x81",
+ "\x87\xD7" => "\xEB\x89\x82",
+ "\x87\xD8" => "\xEB\x89\x83",
+ "\x87\xD9" => "\xEB\x89\x84",
+ "\x87\xDA" => "\xEB\x89\x85",
+ "\x87\xDB" => "\xEB\x89\x86",
+ "\x87\xDC" => "\xEB\x89\x87",
+ "\x87\xDD" => "\xEB\x89\x88",
+ "\x87\xDE" => "\xEB\x89\x89",
+ "\x87\xDF" => "\xEB\x89\x8A",
+ "\x87\xE0" => "\xEB\x89\x8B",
+ "\x87\xE1" => "\xEB\x89\x8C",
+ "\x87\xE2" => "\xEB\x89\x8D",
+ "\x87\xE3" => "\xEB\x89\x8E",
+ "\x87\xE4" => "\xEB\x89\x8F",
+ "\x87\xE5" => "\xEB\x89\x90",
+ "\x87\xE6" => "\xEB\x89\x91",
+ "\x87\xE7" => "\xEB\x89\x92",
+ "\x87\xE8" => "\xEB\x89\x93",
+ "\x87\xE9" => "\xEB\x89\x94",
+ "\x87\xEA" => "\xEB\x89\x95",
+ "\x87\xEB" => "\xEB\x89\x96",
+ "\x87\xEC" => "\xEB\x89\x97",
+ "\x87\xED" => "\xEB\x89\x99",
+ "\x87\xEE" => "\xEB\x89\x9A",
+ "\x87\xEF" => "\xEB\x89\x9B",
+ "\x87\xF0" => "\xEB\x89\x9D",
+ "\x87\xF1" => "\xEB\x89\x9E",
+ "\x87\xF2" => "\xEB\x89\x9F",
+ "\x87\xF3" => "\xEB\x89\xA1",
+ "\x87\xF4" => "\xEB\x89\xA2",
+ "\x87\xF5" => "\xEB\x89\xA3",
+ "\x87\xF6" => "\xEB\x89\xA4",
+ "\x87\xF7" => "\xEB\x89\xA5",
+ "\x87\xF8" => "\xEB\x89\xA6",
+ "\x87\xF9" => "\xEB\x89\xA7",
+ "\x87\xFA" => "\xEB\x89\xAA",
+ "\x87\xFB" => "\xEB\x89\xAB",
+ "\x87\xFC" => "\xEB\x89\xAC",
+ "\x87\xFD" => "\xEB\x89\xAD",
+ "\x87\xFE" => "\xEB\x89\xAE",
+ "\x88\x41" => "\xEB\x89\xAF",
+ "\x88\x42" => "\xEB\x89\xB0",
+ "\x88\x43" => "\xEB\x89\xB1",
+ "\x88\x44" => "\xEB\x89\xB2",
+ "\x88\x45" => "\xEB\x89\xB3",
+ "\x88\x46" => "\xEB\x89\xB6",
+ "\x88\x47" => "\xEB\x89\xB7",
+ "\x88\x48" => "\xEB\x89\xB8",
+ "\x88\x49" => "\xEB\x89\xB9",
+ "\x88\x4A" => "\xEB\x89\xBA",
+ "\x88\x4B" => "\xEB\x89\xBB",
+ "\x88\x4C" => "\xEB\x89\xBD",
+ "\x88\x4D" => "\xEB\x89\xBE",
+ "\x88\x4E" => "\xEB\x89\xBF",
+ "\x88\x4F" => "\xEB\x8A\x80",
+ "\x88\x50" => "\xEB\x8A\x81",
+ "\x88\x51" => "\xEB\x8A\x82",
+ "\x88\x52" => "\xEB\x8A\x83",
+ "\x88\x53" => "\xEB\x8A\x86",
+ "\x88\x54" => "\xEB\x8A\x87",
+ "\x88\x55" => "\xEB\x8A\x88",
+ "\x88\x56" => "\xEB\x8A\x8A",
+ "\x88\x57" => "\xEB\x8A\x8B",
+ "\x88\x58" => "\xEB\x8A\x8C",
+ "\x88\x59" => "\xEB\x8A\x8D",
+ "\x88\x5A" => "\xEB\x8A\x8E",
+ "\x88\x61" => "\xEB\x8A\x8F",
+ "\x88\x62" => "\xEB\x8A\x92",
+ "\x88\x63" => "\xEB\x8A\x93",
+ "\x88\x64" => "\xEB\x8A\x95",
+ "\x88\x65" => "\xEB\x8A\x96",
+ "\x88\x66" => "\xEB\x8A\x97",
+ "\x88\x67" => "\xEB\x8A\x9B",
+ "\x88\x68" => "\xEB\x8A\x9C",
+ "\x88\x69" => "\xEB\x8A\x9D",
+ "\x88\x6A" => "\xEB\x8A\x9E",
+ "\x88\x6B" => "\xEB\x8A\x9F",
+ "\x88\x6C" => "\xEB\x8A\xA2",
+ "\x88\x6D" => "\xEB\x8A\xA4",
+ "\x88\x6E" => "\xEB\x8A\xA7",
+ "\x88\x6F" => "\xEB\x8A\xA8",
+ "\x88\x70" => "\xEB\x8A\xA9",
+ "\x88\x71" => "\xEB\x8A\xAB",
+ "\x88\x72" => "\xEB\x8A\xAD",
+ "\x88\x73" => "\xEB\x8A\xAE",
+ "\x88\x74" => "\xEB\x8A\xAF",
+ "\x88\x75" => "\xEB\x8A\xB1",
+ "\x88\x76" => "\xEB\x8A\xB2",
+ "\x88\x77" => "\xEB\x8A\xB3",
+ "\x88\x78" => "\xEB\x8A\xB5",
+ "\x88\x79" => "\xEB\x8A\xB6",
+ "\x88\x7A" => "\xEB\x8A\xB7",
+ "\x88\x81" => "\xEB\x8A\xB8",
+ "\x88\x82" => "\xEB\x8A\xB9",
+ "\x88\x83" => "\xEB\x8A\xBA",
+ "\x88\x84" => "\xEB\x8A\xBB",
+ "\x88\x85" => "\xEB\x8A\xBC",
+ "\x88\x86" => "\xEB\x8A\xBD",
+ "\x88\x87" => "\xEB\x8A\xBE",
+ "\x88\x88" => "\xEB\x8A\xBF",
+ "\x88\x89" => "\xEB\x8B\x80",
+ "\x88\x8A" => "\xEB\x8B\x81",
+ "\x88\x8B" => "\xEB\x8B\x82",
+ "\x88\x8C" => "\xEB\x8B\x83",
+ "\x88\x8D" => "\xEB\x8B\x84",
+ "\x88\x8E" => "\xEB\x8B\x85",
+ "\x88\x8F" => "\xEB\x8B\x86",
+ "\x88\x90" => "\xEB\x8B\x87",
+ "\x88\x91" => "\xEB\x8B\x8A",
+ "\x88\x92" => "\xEB\x8B\x8B",
+ "\x88\x93" => "\xEB\x8B\x8D",
+ "\x88\x94" => "\xEB\x8B\x8E",
+ "\x88\x95" => "\xEB\x8B\x8F",
+ "\x88\x96" => "\xEB\x8B\x91",
+ "\x88\x97" => "\xEB\x8B\x93",
+ "\x88\x98" => "\xEB\x8B\x94",
+ "\x88\x99" => "\xEB\x8B\x95",
+ "\x88\x9A" => "\xEB\x8B\x96",
+ "\x88\x9B" => "\xEB\x8B\x97",
+ "\x88\x9C" => "\xEB\x8B\x9A",
+ "\x88\x9D" => "\xEB\x8B\x9C",
+ "\x88\x9E" => "\xEB\x8B\x9E",
+ "\x88\x9F" => "\xEB\x8B\x9F",
+ "\x88\xA0" => "\xEB\x8B\xA0",
+ "\x88\xA1" => "\xEB\x8B\xA1",
+ "\x88\xA2" => "\xEB\x8B\xA3",
+ "\x88\xA3" => "\xEB\x8B\xA7",
+ "\x88\xA4" => "\xEB\x8B\xA9",
+ "\x88\xA5" => "\xEB\x8B\xAA",
+ "\x88\xA6" => "\xEB\x8B\xB0",
+ "\x88\xA7" => "\xEB\x8B\xB1",
+ "\x88\xA8" => "\xEB\x8B\xB2",
+ "\x88\xA9" => "\xEB\x8B\xB6",
+ "\x88\xAA" => "\xEB\x8B\xBC",
+ "\x88\xAB" => "\xEB\x8B\xBD",
+ "\x88\xAC" => "\xEB\x8B\xBE",
+ "\x88\xAD" => "\xEB\x8C\x82",
+ "\x88\xAE" => "\xEB\x8C\x83",
+ "\x88\xAF" => "\xEB\x8C\x85",
+ "\x88\xB0" => "\xEB\x8C\x86",
+ "\x88\xB1" => "\xEB\x8C\x87",
+ "\x88\xB2" => "\xEB\x8C\x89",
+ "\x88\xB3" => "\xEB\x8C\x8A",
+ "\x88\xB4" => "\xEB\x8C\x8B",
+ "\x88\xB5" => "\xEB\x8C\x8C",
+ "\x88\xB6" => "\xEB\x8C\x8D",
+ "\x88\xB7" => "\xEB\x8C\x8E",
+ "\x88\xB8" => "\xEB\x8C\x8F",
+ "\x88\xB9" => "\xEB\x8C\x92",
+ "\x88\xBA" => "\xEB\x8C\x96",
+ "\x88\xBB" => "\xEB\x8C\x97",
+ "\x88\xBC" => "\xEB\x8C\x98",
+ "\x88\xBD" => "\xEB\x8C\x99",
+ "\x88\xBE" => "\xEB\x8C\x9A",
+ "\x88\xBF" => "\xEB\x8C\x9B",
+ "\x88\xC0" => "\xEB\x8C\x9D",
+ "\x88\xC1" => "\xEB\x8C\x9E",
+ "\x88\xC2" => "\xEB\x8C\x9F",
+ "\x88\xC3" => "\xEB\x8C\xA0",
+ "\x88\xC4" => "\xEB\x8C\xA1",
+ "\x88\xC5" => "\xEB\x8C\xA2",
+ "\x88\xC6" => "\xEB\x8C\xA3",
+ "\x88\xC7" => "\xEB\x8C\xA4",
+ "\x88\xC8" => "\xEB\x8C\xA5",
+ "\x88\xC9" => "\xEB\x8C\xA6",
+ "\x88\xCA" => "\xEB\x8C\xA7",
+ "\x88\xCB" => "\xEB\x8C\xA8",
+ "\x88\xCC" => "\xEB\x8C\xA9",
+ "\x88\xCD" => "\xEB\x8C\xAA",
+ "\x88\xCE" => "\xEB\x8C\xAB",
+ "\x88\xCF" => "\xEB\x8C\xAC",
+ "\x88\xD0" => "\xEB\x8C\xAD",
+ "\x88\xD1" => "\xEB\x8C\xAE",
+ "\x88\xD2" => "\xEB\x8C\xAF",
+ "\x88\xD3" => "\xEB\x8C\xB0",
+ "\x88\xD4" => "\xEB\x8C\xB1",
+ "\x88\xD5" => "\xEB\x8C\xB2",
+ "\x88\xD6" => "\xEB\x8C\xB3",
+ "\x88\xD7" => "\xEB\x8C\xB4",
+ "\x88\xD8" => "\xEB\x8C\xB5",
+ "\x88\xD9" => "\xEB\x8C\xB6",
+ "\x88\xDA" => "\xEB\x8C\xB7",
+ "\x88\xDB" => "\xEB\x8C\xB8",
+ "\x88\xDC" => "\xEB\x8C\xB9",
+ "\x88\xDD" => "\xEB\x8C\xBA",
+ "\x88\xDE" => "\xEB\x8C\xBB",
+ "\x88\xDF" => "\xEB\x8C\xBC",
+ "\x88\xE0" => "\xEB\x8C\xBD",
+ "\x88\xE1" => "\xEB\x8C\xBE",
+ "\x88\xE2" => "\xEB\x8C\xBF",
+ "\x88\xE3" => "\xEB\x8D\x80",
+ "\x88\xE4" => "\xEB\x8D\x81",
+ "\x88\xE5" => "\xEB\x8D\x82",
+ "\x88\xE6" => "\xEB\x8D\x83",
+ "\x88\xE7" => "\xEB\x8D\x84",
+ "\x88\xE8" => "\xEB\x8D\x85",
+ "\x88\xE9" => "\xEB\x8D\x86",
+ "\x88\xEA" => "\xEB\x8D\x87",
+ "\x88\xEB" => "\xEB\x8D\x88",
+ "\x88\xEC" => "\xEB\x8D\x89",
+ "\x88\xED" => "\xEB\x8D\x8A",
+ "\x88\xEE" => "\xEB\x8D\x8B",
+ "\x88\xEF" => "\xEB\x8D\x8C",
+ "\x88\xF0" => "\xEB\x8D\x8D",
+ "\x88\xF1" => "\xEB\x8D\x8E",
+ "\x88\xF2" => "\xEB\x8D\x8F",
+ "\x88\xF3" => "\xEB\x8D\x90",
+ "\x88\xF4" => "\xEB\x8D\x91",
+ "\x88\xF5" => "\xEB\x8D\x92",
+ "\x88\xF6" => "\xEB\x8D\x93",
+ "\x88\xF7" => "\xEB\x8D\x97",
+ "\x88\xF8" => "\xEB\x8D\x99",
+ "\x88\xF9" => "\xEB\x8D\x9A",
+ "\x88\xFA" => "\xEB\x8D\x9D",
+ "\x88\xFB" => "\xEB\x8D\xA0",
+ "\x88\xFC" => "\xEB\x8D\xA1",
+ "\x88\xFD" => "\xEB\x8D\xA2",
+ "\x88\xFE" => "\xEB\x8D\xA3",
+ "\x89\x41" => "\xEB\x8D\xA6",
+ "\x89\x42" => "\xEB\x8D\xA8",
+ "\x89\x43" => "\xEB\x8D\xAA",
+ "\x89\x44" => "\xEB\x8D\xAC",
+ "\x89\x45" => "\xEB\x8D\xAD",
+ "\x89\x46" => "\xEB\x8D\xAF",
+ "\x89\x47" => "\xEB\x8D\xB2",
+ "\x89\x48" => "\xEB\x8D\xB3",
+ "\x89\x49" => "\xEB\x8D\xB5",
+ "\x89\x4A" => "\xEB\x8D\xB6",
+ "\x89\x4B" => "\xEB\x8D\xB7",
+ "\x89\x4C" => "\xEB\x8D\xB9",
+ "\x89\x4D" => "\xEB\x8D\xBA",
+ "\x89\x4E" => "\xEB\x8D\xBB",
+ "\x89\x4F" => "\xEB\x8D\xBC",
+ "\x89\x50" => "\xEB\x8D\xBD",
+ "\x89\x51" => "\xEB\x8D\xBE",
+ "\x89\x52" => "\xEB\x8D\xBF",
+ "\x89\x53" => "\xEB\x8E\x82",
+ "\x89\x54" => "\xEB\x8E\x86",
+ "\x89\x55" => "\xEB\x8E\x87",
+ "\x89\x56" => "\xEB\x8E\x88",
+ "\x89\x57" => "\xEB\x8E\x89",
+ "\x89\x58" => "\xEB\x8E\x8A",
+ "\x89\x59" => "\xEB\x8E\x8B",
+ "\x89\x5A" => "\xEB\x8E\x8D",
+ "\x89\x61" => "\xEB\x8E\x8E",
+ "\x89\x62" => "\xEB\x8E\x8F",
+ "\x89\x63" => "\xEB\x8E\x91",
+ "\x89\x64" => "\xEB\x8E\x92",
+ "\x89\x65" => "\xEB\x8E\x93",
+ "\x89\x66" => "\xEB\x8E\x95",
+ "\x89\x67" => "\xEB\x8E\x96",
+ "\x89\x68" => "\xEB\x8E\x97",
+ "\x89\x69" => "\xEB\x8E\x98",
+ "\x89\x6A" => "\xEB\x8E\x99",
+ "\x89\x6B" => "\xEB\x8E\x9A",
+ "\x89\x6C" => "\xEB\x8E\x9B",
+ "\x89\x6D" => "\xEB\x8E\x9C",
+ "\x89\x6E" => "\xEB\x8E\x9D",
+ "\x89\x6F" => "\xEB\x8E\x9E",
+ "\x89\x70" => "\xEB\x8E\x9F",
+ "\x89\x71" => "\xEB\x8E\xA2",
+ "\x89\x72" => "\xEB\x8E\xA3",
+ "\x89\x73" => "\xEB\x8E\xA4",
+ "\x89\x74" => "\xEB\x8E\xA5",
+ "\x89\x75" => "\xEB\x8E\xA6",
+ "\x89\x76" => "\xEB\x8E\xA7",
+ "\x89\x77" => "\xEB\x8E\xA9",
+ "\x89\x78" => "\xEB\x8E\xAA",
+ "\x89\x79" => "\xEB\x8E\xAB",
+ "\x89\x7A" => "\xEB\x8E\xAD",
+ "\x89\x81" => "\xEB\x8E\xAE",
+ "\x89\x82" => "\xEB\x8E\xAF",
+ "\x89\x83" => "\xEB\x8E\xB0",
+ "\x89\x84" => "\xEB\x8E\xB1",
+ "\x89\x85" => "\xEB\x8E\xB2",
+ "\x89\x86" => "\xEB\x8E\xB3",
+ "\x89\x87" => "\xEB\x8E\xB4",
+ "\x89\x88" => "\xEB\x8E\xB5",
+ "\x89\x89" => "\xEB\x8E\xB6",
+ "\x89\x8A" => "\xEB\x8E\xB7",
+ "\x89\x8B" => "\xEB\x8E\xB8",
+ "\x89\x8C" => "\xEB\x8E\xB9",
+ "\x89\x8D" => "\xEB\x8E\xBA",
+ "\x89\x8E" => "\xEB\x8E\xBB",
+ "\x89\x8F" => "\xEB\x8E\xBC",
+ "\x89\x90" => "\xEB\x8E\xBD",
+ "\x89\x91" => "\xEB\x8E\xBE",
+ "\x89\x92" => "\xEB\x8E\xBF",
+ "\x89\x93" => "\xEB\x8F\x80",
+ "\x89\x94" => "\xEB\x8F\x81",
+ "\x89\x95" => "\xEB\x8F\x82",
+ "\x89\x96" => "\xEB\x8F\x83",
+ "\x89\x97" => "\xEB\x8F\x86",
+ "\x89\x98" => "\xEB\x8F\x87",
+ "\x89\x99" => "\xEB\x8F\x89",
+ "\x89\x9A" => "\xEB\x8F\x8A",
+ "\x89\x9B" => "\xEB\x8F\x8D",
+ "\x89\x9C" => "\xEB\x8F\x8F",
+ "\x89\x9D" => "\xEB\x8F\x91",
+ "\x89\x9E" => "\xEB\x8F\x92",
+ "\x89\x9F" => "\xEB\x8F\x93",
+ "\x89\xA0" => "\xEB\x8F\x96",
+ "\x89\xA1" => "\xEB\x8F\x98",
+ "\x89\xA2" => "\xEB\x8F\x9A",
+ "\x89\xA3" => "\xEB\x8F\x9C",
+ "\x89\xA4" => "\xEB\x8F\x9E",
+ "\x89\xA5" => "\xEB\x8F\x9F",
+ "\x89\xA6" => "\xEB\x8F\xA1",
+ "\x89\xA7" => "\xEB\x8F\xA2",
+ "\x89\xA8" => "\xEB\x8F\xA3",
+ "\x89\xA9" => "\xEB\x8F\xA5",
+ "\x89\xAA" => "\xEB\x8F\xA6",
+ "\x89\xAB" => "\xEB\x8F\xA7",
+ "\x89\xAC" => "\xEB\x8F\xA9",
+ "\x89\xAD" => "\xEB\x8F\xAA",
+ "\x89\xAE" => "\xEB\x8F\xAB",
+ "\x89\xAF" => "\xEB\x8F\xAC",
+ "\x89\xB0" => "\xEB\x8F\xAD",
+ "\x89\xB1" => "\xEB\x8F\xAE",
+ "\x89\xB2" => "\xEB\x8F\xAF",
+ "\x89\xB3" => "\xEB\x8F\xB0",
+ "\x89\xB4" => "\xEB\x8F\xB1",
+ "\x89\xB5" => "\xEB\x8F\xB2",
+ "\x89\xB6" => "\xEB\x8F\xB3",
+ "\x89\xB7" => "\xEB\x8F\xB4",
+ "\x89\xB8" => "\xEB\x8F\xB5",
+ "\x89\xB9" => "\xEB\x8F\xB6",
+ "\x89\xBA" => "\xEB\x8F\xB7",
+ "\x89\xBB" => "\xEB\x8F\xB8",
+ "\x89\xBC" => "\xEB\x8F\xB9",
+ "\x89\xBD" => "\xEB\x8F\xBA",
+ "\x89\xBE" => "\xEB\x8F\xBB",
+ "\x89\xBF" => "\xEB\x8F\xBD",
+ "\x89\xC0" => "\xEB\x8F\xBE",
+ "\x89\xC1" => "\xEB\x8F\xBF",
+ "\x89\xC2" => "\xEB\x90\x80",
+ "\x89\xC3" => "\xEB\x90\x81",
+ "\x89\xC4" => "\xEB\x90\x82",
+ "\x89\xC5" => "\xEB\x90\x83",
+ "\x89\xC6" => "\xEB\x90\x84",
+ "\x89\xC7" => "\xEB\x90\x85",
+ "\x89\xC8" => "\xEB\x90\x86",
+ "\x89\xC9" => "\xEB\x90\x87",
+ "\x89\xCA" => "\xEB\x90\x88",
+ "\x89\xCB" => "\xEB\x90\x89",
+ "\x89\xCC" => "\xEB\x90\x8A",
+ "\x89\xCD" => "\xEB\x90\x8B",
+ "\x89\xCE" => "\xEB\x90\x8C",
+ "\x89\xCF" => "\xEB\x90\x8D",
+ "\x89\xD0" => "\xEB\x90\x8E",
+ "\x89\xD1" => "\xEB\x90\x8F",
+ "\x89\xD2" => "\xEB\x90\x91",
+ "\x89\xD3" => "\xEB\x90\x92",
+ "\x89\xD4" => "\xEB\x90\x93",
+ "\x89\xD5" => "\xEB\x90\x94",
+ "\x89\xD6" => "\xEB\x90\x95",
+ "\x89\xD7" => "\xEB\x90\x96",
+ "\x89\xD8" => "\xEB\x90\x97",
+ "\x89\xD9" => "\xEB\x90\x99",
+ "\x89\xDA" => "\xEB\x90\x9A",
+ "\x89\xDB" => "\xEB\x90\x9B",
+ "\x89\xDC" => "\xEB\x90\x9D",
+ "\x89\xDD" => "\xEB\x90\x9E",
+ "\x89\xDE" => "\xEB\x90\x9F",
+ "\x89\xDF" => "\xEB\x90\xA1",
+ "\x89\xE0" => "\xEB\x90\xA2",
+ "\x89\xE1" => "\xEB\x90\xA3",
+ "\x89\xE2" => "\xEB\x90\xA4",
+ "\x89\xE3" => "\xEB\x90\xA5",
+ "\x89\xE4" => "\xEB\x90\xA6",
+ "\x89\xE5" => "\xEB\x90\xA7",
+ "\x89\xE6" => "\xEB\x90\xAA",
+ "\x89\xE7" => "\xEB\x90\xAC",
+ "\x89\xE8" => "\xEB\x90\xAD",
+ "\x89\xE9" => "\xEB\x90\xAE",
+ "\x89\xEA" => "\xEB\x90\xAF",
+ "\x89\xEB" => "\xEB\x90\xB0",
+ "\x89\xEC" => "\xEB\x90\xB1",
+ "\x89\xED" => "\xEB\x90\xB2",
+ "\x89\xEE" => "\xEB\x90\xB3",
+ "\x89\xEF" => "\xEB\x90\xB5",
+ "\x89\xF0" => "\xEB\x90\xB6",
+ "\x89\xF1" => "\xEB\x90\xB7",
+ "\x89\xF2" => "\xEB\x90\xB8",
+ "\x89\xF3" => "\xEB\x90\xB9",
+ "\x89\xF4" => "\xEB\x90\xBA",
+ "\x89\xF5" => "\xEB\x90\xBB",
+ "\x89\xF6" => "\xEB\x90\xBC",
+ "\x89\xF7" => "\xEB\x90\xBD",
+ "\x89\xF8" => "\xEB\x90\xBE",
+ "\x89\xF9" => "\xEB\x90\xBF",
+ "\x89\xFA" => "\xEB\x91\x80",
+ "\x89\xFB" => "\xEB\x91\x81",
+ "\x89\xFC" => "\xEB\x91\x82",
+ "\x89\xFD" => "\xEB\x91\x83",
+ "\x89\xFE" => "\xEB\x91\x84",
+ "\x8A\x41" => "\xEB\x91\x85",
+ "\x8A\x42" => "\xEB\x91\x86",
+ "\x8A\x43" => "\xEB\x91\x87",
+ "\x8A\x44" => "\xEB\x91\x88",
+ "\x8A\x45" => "\xEB\x91\x89",
+ "\x8A\x46" => "\xEB\x91\x8A",
+ "\x8A\x47" => "\xEB\x91\x8B",
+ "\x8A\x48" => "\xEB\x91\x8C",
+ "\x8A\x49" => "\xEB\x91\x8D",
+ "\x8A\x4A" => "\xEB\x91\x8E",
+ "\x8A\x4B" => "\xEB\x91\x8F",
+ "\x8A\x4C" => "\xEB\x91\x92",
+ "\x8A\x4D" => "\xEB\x91\x93",
+ "\x8A\x4E" => "\xEB\x91\x95",
+ "\x8A\x4F" => "\xEB\x91\x96",
+ "\x8A\x50" => "\xEB\x91\x97",
+ "\x8A\x51" => "\xEB\x91\x99",
+ "\x8A\x52" => "\xEB\x91\x9A",
+ "\x8A\x53" => "\xEB\x91\x9B",
+ "\x8A\x54" => "\xEB\x91\x9C",
+ "\x8A\x55" => "\xEB\x91\x9D",
+ "\x8A\x56" => "\xEB\x91\x9E",
+ "\x8A\x57" => "\xEB\x91\x9F",
+ "\x8A\x58" => "\xEB\x91\xA2",
+ "\x8A\x59" => "\xEB\x91\xA4",
+ "\x8A\x5A" => "\xEB\x91\xA6",
+ "\x8A\x61" => "\xEB\x91\xA7",
+ "\x8A\x62" => "\xEB\x91\xA8",
+ "\x8A\x63" => "\xEB\x91\xA9",
+ "\x8A\x64" => "\xEB\x91\xAA",
+ "\x8A\x65" => "\xEB\x91\xAB",
+ "\x8A\x66" => "\xEB\x91\xAD",
+ "\x8A\x67" => "\xEB\x91\xAE",
+ "\x8A\x68" => "\xEB\x91\xAF",
+ "\x8A\x69" => "\xEB\x91\xB0",
+ "\x8A\x6A" => "\xEB\x91\xB1",
+ "\x8A\x6B" => "\xEB\x91\xB2",
+ "\x8A\x6C" => "\xEB\x91\xB3",
+ "\x8A\x6D" => "\xEB\x91\xB4",
+ "\x8A\x6E" => "\xEB\x91\xB5",
+ "\x8A\x6F" => "\xEB\x91\xB6",
+ "\x8A\x70" => "\xEB\x91\xB7",
+ "\x8A\x71" => "\xEB\x91\xB8",
+ "\x8A\x72" => "\xEB\x91\xB9",
+ "\x8A\x73" => "\xEB\x91\xBA",
+ "\x8A\x74" => "\xEB\x91\xBB",
+ "\x8A\x75" => "\xEB\x91\xBC",
+ "\x8A\x76" => "\xEB\x91\xBD",
+ "\x8A\x77" => "\xEB\x91\xBE",
+ "\x8A\x78" => "\xEB\x91\xBF",
+ "\x8A\x79" => "\xEB\x92\x81",
+ "\x8A\x7A" => "\xEB\x92\x82",
+ "\x8A\x81" => "\xEB\x92\x83",
+ "\x8A\x82" => "\xEB\x92\x84",
+ "\x8A\x83" => "\xEB\x92\x85",
+ "\x8A\x84" => "\xEB\x92\x86",
+ "\x8A\x85" => "\xEB\x92\x87",
+ "\x8A\x86" => "\xEB\x92\x89",
+ "\x8A\x87" => "\xEB\x92\x8A",
+ "\x8A\x88" => "\xEB\x92\x8B",
+ "\x8A\x89" => "\xEB\x92\x8C",
+ "\x8A\x8A" => "\xEB\x92\x8D",
+ "\x8A\x8B" => "\xEB\x92\x8E",
+ "\x8A\x8C" => "\xEB\x92\x8F",
+ "\x8A\x8D" => "\xEB\x92\x90",
+ "\x8A\x8E" => "\xEB\x92\x91",
+ "\x8A\x8F" => "\xEB\x92\x92",
+ "\x8A\x90" => "\xEB\x92\x93",
+ "\x8A\x91" => "\xEB\x92\x94",
+ "\x8A\x92" => "\xEB\x92\x95",
+ "\x8A\x93" => "\xEB\x92\x96",
+ "\x8A\x94" => "\xEB\x92\x97",
+ "\x8A\x95" => "\xEB\x92\x98",
+ "\x8A\x96" => "\xEB\x92\x99",
+ "\x8A\x97" => "\xEB\x92\x9A",
+ "\x8A\x98" => "\xEB\x92\x9B",
+ "\x8A\x99" => "\xEB\x92\x9C",
+ "\x8A\x9A" => "\xEB\x92\x9E",
+ "\x8A\x9B" => "\xEB\x92\x9F",
+ "\x8A\x9C" => "\xEB\x92\xA0",
+ "\x8A\x9D" => "\xEB\x92\xA1",
+ "\x8A\x9E" => "\xEB\x92\xA2",
+ "\x8A\x9F" => "\xEB\x92\xA3",
+ "\x8A\xA0" => "\xEB\x92\xA5",
+ "\x8A\xA1" => "\xEB\x92\xA6",
+ "\x8A\xA2" => "\xEB\x92\xA7",
+ "\x8A\xA3" => "\xEB\x92\xA9",
+ "\x8A\xA4" => "\xEB\x92\xAA",
+ "\x8A\xA5" => "\xEB\x92\xAB",
+ "\x8A\xA6" => "\xEB\x92\xAD",
+ "\x8A\xA7" => "\xEB\x92\xAE",
+ "\x8A\xA8" => "\xEB\x92\xAF",
+ "\x8A\xA9" => "\xEB\x92\xB0",
+ "\x8A\xAA" => "\xEB\x92\xB1",
+ "\x8A\xAB" => "\xEB\x92\xB2",
+ "\x8A\xAC" => "\xEB\x92\xB3",
+ "\x8A\xAD" => "\xEB\x92\xB4",
+ "\x8A\xAE" => "\xEB\x92\xB6",
+ "\x8A\xAF" => "\xEB\x92\xB8",
+ "\x8A\xB0" => "\xEB\x92\xBA",
+ "\x8A\xB1" => "\xEB\x92\xBB",
+ "\x8A\xB2" => "\xEB\x92\xBC",
+ "\x8A\xB3" => "\xEB\x92\xBD",
+ "\x8A\xB4" => "\xEB\x92\xBE",
+ "\x8A\xB5" => "\xEB\x92\xBF",
+ "\x8A\xB6" => "\xEB\x93\x81",
+ "\x8A\xB7" => "\xEB\x93\x82",
+ "\x8A\xB8" => "\xEB\x93\x83",
+ "\x8A\xB9" => "\xEB\x93\x85",
+ "\x8A\xBA" => "\xEB\x93\x86",
+ "\x8A\xBB" => "\xEB\x93\x87",
+ "\x8A\xBC" => "\xEB\x93\x89",
+ "\x8A\xBD" => "\xEB\x93\x8A",
+ "\x8A\xBE" => "\xEB\x93\x8B",
+ "\x8A\xBF" => "\xEB\x93\x8C",
+ "\x8A\xC0" => "\xEB\x93\x8D",
+ "\x8A\xC1" => "\xEB\x93\x8E",
+ "\x8A\xC2" => "\xEB\x93\x8F",
+ "\x8A\xC3" => "\xEB\x93\x91",
+ "\x8A\xC4" => "\xEB\x93\x92",
+ "\x8A\xC5" => "\xEB\x93\x93",
+ "\x8A\xC6" => "\xEB\x93\x94",
+ "\x8A\xC7" => "\xEB\x93\x96",
+ "\x8A\xC8" => "\xEB\x93\x97",
+ "\x8A\xC9" => "\xEB\x93\x98",
+ "\x8A\xCA" => "\xEB\x93\x99",
+ "\x8A\xCB" => "\xEB\x93\x9A",
+ "\x8A\xCC" => "\xEB\x93\x9B",
+ "\x8A\xCD" => "\xEB\x93\x9E",
+ "\x8A\xCE" => "\xEB\x93\x9F",
+ "\x8A\xCF" => "\xEB\x93\xA1",
+ "\x8A\xD0" => "\xEB\x93\xA2",
+ "\x8A\xD1" => "\xEB\x93\xA5",
+ "\x8A\xD2" => "\xEB\x93\xA7",
+ "\x8A\xD3" => "\xEB\x93\xA8",
+ "\x8A\xD4" => "\xEB\x93\xA9",
+ "\x8A\xD5" => "\xEB\x93\xAA",
+ "\x8A\xD6" => "\xEB\x93\xAB",
+ "\x8A\xD7" => "\xEB\x93\xAE",
+ "\x8A\xD8" => "\xEB\x93\xB0",
+ "\x8A\xD9" => "\xEB\x93\xB2",
+ "\x8A\xDA" => "\xEB\x93\xB3",
+ "\x8A\xDB" => "\xEB\x93\xB4",
+ "\x8A\xDC" => "\xEB\x93\xB5",
+ "\x8A\xDD" => "\xEB\x93\xB6",
+ "\x8A\xDE" => "\xEB\x93\xB7",
+ "\x8A\xDF" => "\xEB\x93\xB9",
+ "\x8A\xE0" => "\xEB\x93\xBA",
+ "\x8A\xE1" => "\xEB\x93\xBB",
+ "\x8A\xE2" => "\xEB\x93\xBC",
+ "\x8A\xE3" => "\xEB\x93\xBD",
+ "\x8A\xE4" => "\xEB\x93\xBE",
+ "\x8A\xE5" => "\xEB\x93\xBF",
+ "\x8A\xE6" => "\xEB\x94\x80",
+ "\x8A\xE7" => "\xEB\x94\x81",
+ "\x8A\xE8" => "\xEB\x94\x82",
+ "\x8A\xE9" => "\xEB\x94\x83",
+ "\x8A\xEA" => "\xEB\x94\x84",
+ "\x8A\xEB" => "\xEB\x94\x85",
+ "\x8A\xEC" => "\xEB\x94\x86",
+ "\x8A\xED" => "\xEB\x94\x87",
+ "\x8A\xEE" => "\xEB\x94\x88",
+ "\x8A\xEF" => "\xEB\x94\x89",
+ "\x8A\xF0" => "\xEB\x94\x8A",
+ "\x8A\xF1" => "\xEB\x94\x8B",
+ "\x8A\xF2" => "\xEB\x94\x8C",
+ "\x8A\xF3" => "\xEB\x94\x8D",
+ "\x8A\xF4" => "\xEB\x94\x8E",
+ "\x8A\xF5" => "\xEB\x94\x8F",
+ "\x8A\xF6" => "\xEB\x94\x90",
+ "\x8A\xF7" => "\xEB\x94\x91",
+ "\x8A\xF8" => "\xEB\x94\x92",
+ "\x8A\xF9" => "\xEB\x94\x93",
+ "\x8A\xFA" => "\xEB\x94\x96",
+ "\x8A\xFB" => "\xEB\x94\x97",
+ "\x8A\xFC" => "\xEB\x94\x99",
+ "\x8A\xFD" => "\xEB\x94\x9A",
+ "\x8A\xFE" => "\xEB\x94\x9D",
+ "\x8B\x41" => "\xEB\x94\x9E",
+ "\x8B\x42" => "\xEB\x94\x9F",
+ "\x8B\x43" => "\xEB\x94\xA0",
+ "\x8B\x44" => "\xEB\x94\xA1",
+ "\x8B\x45" => "\xEB\x94\xA2",
+ "\x8B\x46" => "\xEB\x94\xA3",
+ "\x8B\x47" => "\xEB\x94\xA6",
+ "\x8B\x48" => "\xEB\x94\xAB",
+ "\x8B\x49" => "\xEB\x94\xAC",
+ "\x8B\x4A" => "\xEB\x94\xAD",
+ "\x8B\x4B" => "\xEB\x94\xAE",
+ "\x8B\x4C" => "\xEB\x94\xAF",
+ "\x8B\x4D" => "\xEB\x94\xB2",
+ "\x8B\x4E" => "\xEB\x94\xB3",
+ "\x8B\x4F" => "\xEB\x94\xB5",
+ "\x8B\x50" => "\xEB\x94\xB6",
+ "\x8B\x51" => "\xEB\x94\xB7",
+ "\x8B\x52" => "\xEB\x94\xB9",
+ "\x8B\x53" => "\xEB\x94\xBA",
+ "\x8B\x54" => "\xEB\x94\xBB",
+ "\x8B\x55" => "\xEB\x94\xBC",
+ "\x8B\x56" => "\xEB\x94\xBD",
+ "\x8B\x57" => "\xEB\x94\xBE",
+ "\x8B\x58" => "\xEB\x94\xBF",
+ "\x8B\x59" => "\xEB\x95\x82",
+ "\x8B\x5A" => "\xEB\x95\x86",
+ "\x8B\x61" => "\xEB\x95\x87",
+ "\x8B\x62" => "\xEB\x95\x88",
+ "\x8B\x63" => "\xEB\x95\x89",
+ "\x8B\x64" => "\xEB\x95\x8A",
+ "\x8B\x65" => "\xEB\x95\x8E",
+ "\x8B\x66" => "\xEB\x95\x8F",
+ "\x8B\x67" => "\xEB\x95\x91",
+ "\x8B\x68" => "\xEB\x95\x92",
+ "\x8B\x69" => "\xEB\x95\x93",
+ "\x8B\x6A" => "\xEB\x95\x95",
+ "\x8B\x6B" => "\xEB\x95\x96",
+ "\x8B\x6C" => "\xEB\x95\x97",
+ "\x8B\x6D" => "\xEB\x95\x98",
+ "\x8B\x6E" => "\xEB\x95\x99",
+ "\x8B\x6F" => "\xEB\x95\x9A",
+ "\x8B\x70" => "\xEB\x95\x9B",
+ "\x8B\x71" => "\xEB\x95\x9E",
+ "\x8B\x72" => "\xEB\x95\xA2",
+ "\x8B\x73" => "\xEB\x95\xA3",
+ "\x8B\x74" => "\xEB\x95\xA4",
+ "\x8B\x75" => "\xEB\x95\xA5",
+ "\x8B\x76" => "\xEB\x95\xA6",
+ "\x8B\x77" => "\xEB\x95\xA7",
+ "\x8B\x78" => "\xEB\x95\xA8",
+ "\x8B\x79" => "\xEB\x95\xA9",
+ "\x8B\x7A" => "\xEB\x95\xAA",
+ "\x8B\x81" => "\xEB\x95\xAB",
+ "\x8B\x82" => "\xEB\x95\xAC",
+ "\x8B\x83" => "\xEB\x95\xAD",
+ "\x8B\x84" => "\xEB\x95\xAE",
+ "\x8B\x85" => "\xEB\x95\xAF",
+ "\x8B\x86" => "\xEB\x95\xB0",
+ "\x8B\x87" => "\xEB\x95\xB1",
+ "\x8B\x88" => "\xEB\x95\xB2",
+ "\x8B\x89" => "\xEB\x95\xB3",
+ "\x8B\x8A" => "\xEB\x95\xB4",
+ "\x8B\x8B" => "\xEB\x95\xB5",
+ "\x8B\x8C" => "\xEB\x95\xB6",
+ "\x8B\x8D" => "\xEB\x95\xB7",
+ "\x8B\x8E" => "\xEB\x95\xB8",
+ "\x8B\x8F" => "\xEB\x95\xB9",
+ "\x8B\x90" => "\xEB\x95\xBA",
+ "\x8B\x91" => "\xEB\x95\xBB",
+ "\x8B\x92" => "\xEB\x95\xBC",
+ "\x8B\x93" => "\xEB\x95\xBD",
+ "\x8B\x94" => "\xEB\x95\xBE",
+ "\x8B\x95" => "\xEB\x95\xBF",
+ "\x8B\x96" => "\xEB\x96\x80",
+ "\x8B\x97" => "\xEB\x96\x81",
+ "\x8B\x98" => "\xEB\x96\x82",
+ "\x8B\x99" => "\xEB\x96\x83",
+ "\x8B\x9A" => "\xEB\x96\x84",
+ "\x8B\x9B" => "\xEB\x96\x85",
+ "\x8B\x9C" => "\xEB\x96\x86",
+ "\x8B\x9D" => "\xEB\x96\x87",
+ "\x8B\x9E" => "\xEB\x96\x88",
+ "\x8B\x9F" => "\xEB\x96\x89",
+ "\x8B\xA0" => "\xEB\x96\x8A",
+ "\x8B\xA1" => "\xEB\x96\x8B",
+ "\x8B\xA2" => "\xEB\x96\x8C",
+ "\x8B\xA3" => "\xEB\x96\x8D",
+ "\x8B\xA4" => "\xEB\x96\x8E",
+ "\x8B\xA5" => "\xEB\x96\x8F",
+ "\x8B\xA6" => "\xEB\x96\x90",
+ "\x8B\xA7" => "\xEB\x96\x91",
+ "\x8B\xA8" => "\xEB\x96\x92",
+ "\x8B\xA9" => "\xEB\x96\x93",
+ "\x8B\xAA" => "\xEB\x96\x94",
+ "\x8B\xAB" => "\xEB\x96\x95",
+ "\x8B\xAC" => "\xEB\x96\x96",
+ "\x8B\xAD" => "\xEB\x96\x97",
+ "\x8B\xAE" => "\xEB\x96\x98",
+ "\x8B\xAF" => "\xEB\x96\x99",
+ "\x8B\xB0" => "\xEB\x96\x9A",
+ "\x8B\xB1" => "\xEB\x96\x9B",
+ "\x8B\xB2" => "\xEB\x96\x9C",
+ "\x8B\xB3" => "\xEB\x96\x9D",
+ "\x8B\xB4" => "\xEB\x96\x9E",
+ "\x8B\xB5" => "\xEB\x96\x9F",
+ "\x8B\xB6" => "\xEB\x96\xA2",
+ "\x8B\xB7" => "\xEB\x96\xA3",
+ "\x8B\xB8" => "\xEB\x96\xA5",
+ "\x8B\xB9" => "\xEB\x96\xA6",
+ "\x8B\xBA" => "\xEB\x96\xA7",
+ "\x8B\xBB" => "\xEB\x96\xA9",
+ "\x8B\xBC" => "\xEB\x96\xAC",
+ "\x8B\xBD" => "\xEB\x96\xAD",
+ "\x8B\xBE" => "\xEB\x96\xAE",
+ "\x8B\xBF" => "\xEB\x96\xAF",
+ "\x8B\xC0" => "\xEB\x96\xB2",
+ "\x8B\xC1" => "\xEB\x96\xB6",
+ "\x8B\xC2" => "\xEB\x96\xB7",
+ "\x8B\xC3" => "\xEB\x96\xB8",
+ "\x8B\xC4" => "\xEB\x96\xB9",
+ "\x8B\xC5" => "\xEB\x96\xBA",
+ "\x8B\xC6" => "\xEB\x96\xBE",
+ "\x8B\xC7" => "\xEB\x96\xBF",
+ "\x8B\xC8" => "\xEB\x97\x81",
+ "\x8B\xC9" => "\xEB\x97\x82",
+ "\x8B\xCA" => "\xEB\x97\x83",
+ "\x8B\xCB" => "\xEB\x97\x85",
+ "\x8B\xCC" => "\xEB\x97\x86",
+ "\x8B\xCD" => "\xEB\x97\x87",
+ "\x8B\xCE" => "\xEB\x97\x88",
+ "\x8B\xCF" => "\xEB\x97\x89",
+ "\x8B\xD0" => "\xEB\x97\x8A",
+ "\x8B\xD1" => "\xEB\x97\x8B",
+ "\x8B\xD2" => "\xEB\x97\x8E",
+ "\x8B\xD3" => "\xEB\x97\x92",
+ "\x8B\xD4" => "\xEB\x97\x93",
+ "\x8B\xD5" => "\xEB\x97\x94",
+ "\x8B\xD6" => "\xEB\x97\x95",
+ "\x8B\xD7" => "\xEB\x97\x96",
+ "\x8B\xD8" => "\xEB\x97\x97",
+ "\x8B\xD9" => "\xEB\x97\x99",
+ "\x8B\xDA" => "\xEB\x97\x9A",
+ "\x8B\xDB" => "\xEB\x97\x9B",
+ "\x8B\xDC" => "\xEB\x97\x9C",
+ "\x8B\xDD" => "\xEB\x97\x9D",
+ "\x8B\xDE" => "\xEB\x97\x9E",
+ "\x8B\xDF" => "\xEB\x97\x9F",
+ "\x8B\xE0" => "\xEB\x97\xA0",
+ "\x8B\xE1" => "\xEB\x97\xA1",
+ "\x8B\xE2" => "\xEB\x97\xA2",
+ "\x8B\xE3" => "\xEB\x97\xA3",
+ "\x8B\xE4" => "\xEB\x97\xA4",
+ "\x8B\xE5" => "\xEB\x97\xA5",
+ "\x8B\xE6" => "\xEB\x97\xA6",
+ "\x8B\xE7" => "\xEB\x97\xA7",
+ "\x8B\xE8" => "\xEB\x97\xA8",
+ "\x8B\xE9" => "\xEB\x97\xA9",
+ "\x8B\xEA" => "\xEB\x97\xAA",
+ "\x8B\xEB" => "\xEB\x97\xAB",
+ "\x8B\xEC" => "\xEB\x97\xAD",
+ "\x8B\xED" => "\xEB\x97\xAE",
+ "\x8B\xEE" => "\xEB\x97\xAF",
+ "\x8B\xEF" => "\xEB\x97\xB0",
+ "\x8B\xF0" => "\xEB\x97\xB1",
+ "\x8B\xF1" => "\xEB\x97\xB2",
+ "\x8B\xF2" => "\xEB\x97\xB3",
+ "\x8B\xF3" => "\xEB\x97\xB4",
+ "\x8B\xF4" => "\xEB\x97\xB5",
+ "\x8B\xF5" => "\xEB\x97\xB6",
+ "\x8B\xF6" => "\xEB\x97\xB7",
+ "\x8B\xF7" => "\xEB\x97\xB8",
+ "\x8B\xF8" => "\xEB\x97\xB9",
+ "\x8B\xF9" => "\xEB\x97\xBA",
+ "\x8B\xFA" => "\xEB\x97\xBB",
+ "\x8B\xFB" => "\xEB\x97\xBC",
+ "\x8B\xFC" => "\xEB\x97\xBD",
+ "\x8B\xFD" => "\xEB\x97\xBE",
+ "\x8B\xFE" => "\xEB\x97\xBF",
+ "\x8C\x41" => "\xEB\x98\x80",
+ "\x8C\x42" => "\xEB\x98\x81",
+ "\x8C\x43" => "\xEB\x98\x82",
+ "\x8C\x44" => "\xEB\x98\x83",
+ "\x8C\x45" => "\xEB\x98\x84",
+ "\x8C\x46" => "\xEB\x98\x85",
+ "\x8C\x47" => "\xEB\x98\x86",
+ "\x8C\x48" => "\xEB\x98\x87",
+ "\x8C\x49" => "\xEB\x98\x88",
+ "\x8C\x4A" => "\xEB\x98\x89",
+ "\x8C\x4B" => "\xEB\x98\x8A",
+ "\x8C\x4C" => "\xEB\x98\x8B",
+ "\x8C\x4D" => "\xEB\x98\x8C",
+ "\x8C\x4E" => "\xEB\x98\x8D",
+ "\x8C\x4F" => "\xEB\x98\x8E",
+ "\x8C\x50" => "\xEB\x98\x8F",
+ "\x8C\x51" => "\xEB\x98\x92",
+ "\x8C\x52" => "\xEB\x98\x93",
+ "\x8C\x53" => "\xEB\x98\x95",
+ "\x8C\x54" => "\xEB\x98\x96",
+ "\x8C\x55" => "\xEB\x98\x97",
+ "\x8C\x56" => "\xEB\x98\x99",
+ "\x8C\x57" => "\xEB\x98\x9A",
+ "\x8C\x58" => "\xEB\x98\x9B",
+ "\x8C\x59" => "\xEB\x98\x9C",
+ "\x8C\x5A" => "\xEB\x98\x9D",
+ "\x8C\x61" => "\xEB\x98\x9E",
+ "\x8C\x62" => "\xEB\x98\x9F",
+ "\x8C\x63" => "\xEB\x98\xA0",
+ "\x8C\x64" => "\xEB\x98\xA1",
+ "\x8C\x65" => "\xEB\x98\xA2",
+ "\x8C\x66" => "\xEB\x98\xA3",
+ "\x8C\x67" => "\xEB\x98\xA4",
+ "\x8C\x68" => "\xEB\x98\xA6",
+ "\x8C\x69" => "\xEB\x98\xA7",
+ "\x8C\x6A" => "\xEB\x98\xA8",
+ "\x8C\x6B" => "\xEB\x98\xA9",
+ "\x8C\x6C" => "\xEB\x98\xAA",
+ "\x8C\x6D" => "\xEB\x98\xAB",
+ "\x8C\x6E" => "\xEB\x98\xAD",
+ "\x8C\x6F" => "\xEB\x98\xAE",
+ "\x8C\x70" => "\xEB\x98\xAF",
+ "\x8C\x71" => "\xEB\x98\xB0",
+ "\x8C\x72" => "\xEB\x98\xB1",
+ "\x8C\x73" => "\xEB\x98\xB2",
+ "\x8C\x74" => "\xEB\x98\xB3",
+ "\x8C\x75" => "\xEB\x98\xB5",
+ "\x8C\x76" => "\xEB\x98\xB6",
+ "\x8C\x77" => "\xEB\x98\xB7",
+ "\x8C\x78" => "\xEB\x98\xB8",
+ "\x8C\x79" => "\xEB\x98\xB9",
+ "\x8C\x7A" => "\xEB\x98\xBA",
+ "\x8C\x81" => "\xEB\x98\xBB",
+ "\x8C\x82" => "\xEB\x98\xBC",
+ "\x8C\x83" => "\xEB\x98\xBD",
+ "\x8C\x84" => "\xEB\x98\xBE",
+ "\x8C\x85" => "\xEB\x98\xBF",
+ "\x8C\x86" => "\xEB\x99\x80",
+ "\x8C\x87" => "\xEB\x99\x81",
+ "\x8C\x88" => "\xEB\x99\x82",
+ "\x8C\x89" => "\xEB\x99\x83",
+ "\x8C\x8A" => "\xEB\x99\x84",
+ "\x8C\x8B" => "\xEB\x99\x85",
+ "\x8C\x8C" => "\xEB\x99\x86",
+ "\x8C\x8D" => "\xEB\x99\x87",
+ "\x8C\x8E" => "\xEB\x99\x89",
+ "\x8C\x8F" => "\xEB\x99\x8A",
+ "\x8C\x90" => "\xEB\x99\x8B",
+ "\x8C\x91" => "\xEB\x99\x8C",
+ "\x8C\x92" => "\xEB\x99\x8D",
+ "\x8C\x93" => "\xEB\x99\x8E",
+ "\x8C\x94" => "\xEB\x99\x8F",
+ "\x8C\x95" => "\xEB\x99\x90",
+ "\x8C\x96" => "\xEB\x99\x91",
+ "\x8C\x97" => "\xEB\x99\x92",
+ "\x8C\x98" => "\xEB\x99\x93",
+ "\x8C\x99" => "\xEB\x99\x94",
+ "\x8C\x9A" => "\xEB\x99\x95",
+ "\x8C\x9B" => "\xEB\x99\x96",
+ "\x8C\x9C" => "\xEB\x99\x97",
+ "\x8C\x9D" => "\xEB\x99\x98",
+ "\x8C\x9E" => "\xEB\x99\x99",
+ "\x8C\x9F" => "\xEB\x99\x9A",
+ "\x8C\xA0" => "\xEB\x99\x9B",
+ "\x8C\xA1" => "\xEB\x99\x9C",
+ "\x8C\xA2" => "\xEB\x99\x9D",
+ "\x8C\xA3" => "\xEB\x99\x9E",
+ "\x8C\xA4" => "\xEB\x99\x9F",
+ "\x8C\xA5" => "\xEB\x99\xA0",
+ "\x8C\xA6" => "\xEB\x99\xA1",
+ "\x8C\xA7" => "\xEB\x99\xA2",
+ "\x8C\xA8" => "\xEB\x99\xA3",
+ "\x8C\xA9" => "\xEB\x99\xA5",
+ "\x8C\xAA" => "\xEB\x99\xA6",
+ "\x8C\xAB" => "\xEB\x99\xA7",
+ "\x8C\xAC" => "\xEB\x99\xA9",
+ "\x8C\xAD" => "\xEB\x99\xAA",
+ "\x8C\xAE" => "\xEB\x99\xAB",
+ "\x8C\xAF" => "\xEB\x99\xAC",
+ "\x8C\xB0" => "\xEB\x99\xAD",
+ "\x8C\xB1" => "\xEB\x99\xAE",
+ "\x8C\xB2" => "\xEB\x99\xAF",
+ "\x8C\xB3" => "\xEB\x99\xB0",
+ "\x8C\xB4" => "\xEB\x99\xB1",
+ "\x8C\xB5" => "\xEB\x99\xB2",
+ "\x8C\xB6" => "\xEB\x99\xB3",
+ "\x8C\xB7" => "\xEB\x99\xB4",
+ "\x8C\xB8" => "\xEB\x99\xB5",
+ "\x8C\xB9" => "\xEB\x99\xB6",
+ "\x8C\xBA" => "\xEB\x99\xB7",
+ "\x8C\xBB" => "\xEB\x99\xB8",
+ "\x8C\xBC" => "\xEB\x99\xB9",
+ "\x8C\xBD" => "\xEB\x99\xBA",
+ "\x8C\xBE" => "\xEB\x99\xBB",
+ "\x8C\xBF" => "\xEB\x99\xBC",
+ "\x8C\xC0" => "\xEB\x99\xBD",
+ "\x8C\xC1" => "\xEB\x99\xBE",
+ "\x8C\xC2" => "\xEB\x99\xBF",
+ "\x8C\xC3" => "\xEB\x9A\x80",
+ "\x8C\xC4" => "\xEB\x9A\x81",
+ "\x8C\xC5" => "\xEB\x9A\x82",
+ "\x8C\xC6" => "\xEB\x9A\x83",
+ "\x8C\xC7" => "\xEB\x9A\x84",
+ "\x8C\xC8" => "\xEB\x9A\x85",
+ "\x8C\xC9" => "\xEB\x9A\x86",
+ "\x8C\xCA" => "\xEB\x9A\x87",
+ "\x8C\xCB" => "\xEB\x9A\x88",
+ "\x8C\xCC" => "\xEB\x9A\x89",
+ "\x8C\xCD" => "\xEB\x9A\x8A",
+ "\x8C\xCE" => "\xEB\x9A\x8B",
+ "\x8C\xCF" => "\xEB\x9A\x8C",
+ "\x8C\xD0" => "\xEB\x9A\x8D",
+ "\x8C\xD1" => "\xEB\x9A\x8E",
+ "\x8C\xD2" => "\xEB\x9A\x8F",
+ "\x8C\xD3" => "\xEB\x9A\x90",
+ "\x8C\xD4" => "\xEB\x9A\x91",
+ "\x8C\xD5" => "\xEB\x9A\x92",
+ "\x8C\xD6" => "\xEB\x9A\x93",
+ "\x8C\xD7" => "\xEB\x9A\x94",
+ "\x8C\xD8" => "\xEB\x9A\x95",
+ "\x8C\xD9" => "\xEB\x9A\x96",
+ "\x8C\xDA" => "\xEB\x9A\x97",
+ "\x8C\xDB" => "\xEB\x9A\x98",
+ "\x8C\xDC" => "\xEB\x9A\x99",
+ "\x8C\xDD" => "\xEB\x9A\x9A",
+ "\x8C\xDE" => "\xEB\x9A\x9B",
+ "\x8C\xDF" => "\xEB\x9A\x9E",
+ "\x8C\xE0" => "\xEB\x9A\x9F",
+ "\x8C\xE1" => "\xEB\x9A\xA1",
+ "\x8C\xE2" => "\xEB\x9A\xA2",
+ "\x8C\xE3" => "\xEB\x9A\xA3",
+ "\x8C\xE4" => "\xEB\x9A\xA5",
+ "\x8C\xE5" => "\xEB\x9A\xA6",
+ "\x8C\xE6" => "\xEB\x9A\xA7",
+ "\x8C\xE7" => "\xEB\x9A\xA8",
+ "\x8C\xE8" => "\xEB\x9A\xA9",
+ "\x8C\xE9" => "\xEB\x9A\xAA",
+ "\x8C\xEA" => "\xEB\x9A\xAD",
+ "\x8C\xEB" => "\xEB\x9A\xAE",
+ "\x8C\xEC" => "\xEB\x9A\xAF",
+ "\x8C\xED" => "\xEB\x9A\xB0",
+ "\x8C\xEE" => "\xEB\x9A\xB2",
+ "\x8C\xEF" => "\xEB\x9A\xB3",
+ "\x8C\xF0" => "\xEB\x9A\xB4",
+ "\x8C\xF1" => "\xEB\x9A\xB5",
+ "\x8C\xF2" => "\xEB\x9A\xB6",
+ "\x8C\xF3" => "\xEB\x9A\xB7",
+ "\x8C\xF4" => "\xEB\x9A\xB8",
+ "\x8C\xF5" => "\xEB\x9A\xB9",
+ "\x8C\xF6" => "\xEB\x9A\xBA",
+ "\x8C\xF7" => "\xEB\x9A\xBB",
+ "\x8C\xF8" => "\xEB\x9A\xBC",
+ "\x8C\xF9" => "\xEB\x9A\xBD",
+ "\x8C\xFA" => "\xEB\x9A\xBE",
+ "\x8C\xFB" => "\xEB\x9A\xBF",
+ "\x8C\xFC" => "\xEB\x9B\x80",
+ "\x8C\xFD" => "\xEB\x9B\x81",
+ "\x8C\xFE" => "\xEB\x9B\x82",
+ "\x8D\x41" => "\xEB\x9B\x83",
+ "\x8D\x42" => "\xEB\x9B\x84",
+ "\x8D\x43" => "\xEB\x9B\x85",
+ "\x8D\x44" => "\xEB\x9B\x86",
+ "\x8D\x45" => "\xEB\x9B\x87",
+ "\x8D\x46" => "\xEB\x9B\x88",
+ "\x8D\x47" => "\xEB\x9B\x89",
+ "\x8D\x48" => "\xEB\x9B\x8A",
+ "\x8D\x49" => "\xEB\x9B\x8B",
+ "\x8D\x4A" => "\xEB\x9B\x8C",
+ "\x8D\x4B" => "\xEB\x9B\x8D",
+ "\x8D\x4C" => "\xEB\x9B\x8E",
+ "\x8D\x4D" => "\xEB\x9B\x8F",
+ "\x8D\x4E" => "\xEB\x9B\x90",
+ "\x8D\x4F" => "\xEB\x9B\x91",
+ "\x8D\x50" => "\xEB\x9B\x92",
+ "\x8D\x51" => "\xEB\x9B\x93",
+ "\x8D\x52" => "\xEB\x9B\x95",
+ "\x8D\x53" => "\xEB\x9B\x96",
+ "\x8D\x54" => "\xEB\x9B\x97",
+ "\x8D\x55" => "\xEB\x9B\x98",
+ "\x8D\x56" => "\xEB\x9B\x99",
+ "\x8D\x57" => "\xEB\x9B\x9A",
+ "\x8D\x58" => "\xEB\x9B\x9B",
+ "\x8D\x59" => "\xEB\x9B\x9C",
+ "\x8D\x5A" => "\xEB\x9B\x9D",
+ "\x8D\x61" => "\xEB\x9B\x9E",
+ "\x8D\x62" => "\xEB\x9B\x9F",
+ "\x8D\x63" => "\xEB\x9B\xA0",
+ "\x8D\x64" => "\xEB\x9B\xA1",
+ "\x8D\x65" => "\xEB\x9B\xA2",
+ "\x8D\x66" => "\xEB\x9B\xA3",
+ "\x8D\x67" => "\xEB\x9B\xA4",
+ "\x8D\x68" => "\xEB\x9B\xA5",
+ "\x8D\x69" => "\xEB\x9B\xA6",
+ "\x8D\x6A" => "\xEB\x9B\xA7",
+ "\x8D\x6B" => "\xEB\x9B\xA8",
+ "\x8D\x6C" => "\xEB\x9B\xA9",
+ "\x8D\x6D" => "\xEB\x9B\xAA",
+ "\x8D\x6E" => "\xEB\x9B\xAB",
+ "\x8D\x6F" => "\xEB\x9B\xAC",
+ "\x8D\x70" => "\xEB\x9B\xAD",
+ "\x8D\x71" => "\xEB\x9B\xAE",
+ "\x8D\x72" => "\xEB\x9B\xAF",
+ "\x8D\x73" => "\xEB\x9B\xB1",
+ "\x8D\x74" => "\xEB\x9B\xB2",
+ "\x8D\x75" => "\xEB\x9B\xB3",
+ "\x8D\x76" => "\xEB\x9B\xB5",
+ "\x8D\x77" => "\xEB\x9B\xB6",
+ "\x8D\x78" => "\xEB\x9B\xB7",
+ "\x8D\x79" => "\xEB\x9B\xB9",
+ "\x8D\x7A" => "\xEB\x9B\xBA",
+ "\x8D\x81" => "\xEB\x9B\xBB",
+ "\x8D\x82" => "\xEB\x9B\xBC",
+ "\x8D\x83" => "\xEB\x9B\xBD",
+ "\x8D\x84" => "\xEB\x9B\xBE",
+ "\x8D\x85" => "\xEB\x9B\xBF",
+ "\x8D\x86" => "\xEB\x9C\x82",
+ "\x8D\x87" => "\xEB\x9C\x83",
+ "\x8D\x88" => "\xEB\x9C\x84",
+ "\x8D\x89" => "\xEB\x9C\x86",
+ "\x8D\x8A" => "\xEB\x9C\x87",
+ "\x8D\x8B" => "\xEB\x9C\x88",
+ "\x8D\x8C" => "\xEB\x9C\x89",
+ "\x8D\x8D" => "\xEB\x9C\x8A",
+ "\x8D\x8E" => "\xEB\x9C\x8B",
+ "\x8D\x8F" => "\xEB\x9C\x8C",
+ "\x8D\x90" => "\xEB\x9C\x8D",
+ "\x8D\x91" => "\xEB\x9C\x8E",
+ "\x8D\x92" => "\xEB\x9C\x8F",
+ "\x8D\x93" => "\xEB\x9C\x90",
+ "\x8D\x94" => "\xEB\x9C\x91",
+ "\x8D\x95" => "\xEB\x9C\x92",
+ "\x8D\x96" => "\xEB\x9C\x93",
+ "\x8D\x97" => "\xEB\x9C\x94",
+ "\x8D\x98" => "\xEB\x9C\x95",
+ "\x8D\x99" => "\xEB\x9C\x96",
+ "\x8D\x9A" => "\xEB\x9C\x97",
+ "\x8D\x9B" => "\xEB\x9C\x98",
+ "\x8D\x9C" => "\xEB\x9C\x99",
+ "\x8D\x9D" => "\xEB\x9C\x9A",
+ "\x8D\x9E" => "\xEB\x9C\x9B",
+ "\x8D\x9F" => "\xEB\x9C\x9C",
+ "\x8D\xA0" => "\xEB\x9C\x9D",
+ "\x8D\xA1" => "\xEB\x9C\x9E",
+ "\x8D\xA2" => "\xEB\x9C\x9F",
+ "\x8D\xA3" => "\xEB\x9C\xA0",
+ "\x8D\xA4" => "\xEB\x9C\xA1",
+ "\x8D\xA5" => "\xEB\x9C\xA2",
+ "\x8D\xA6" => "\xEB\x9C\xA3",
+ "\x8D\xA7" => "\xEB\x9C\xA4",
+ "\x8D\xA8" => "\xEB\x9C\xA5",
+ "\x8D\xA9" => "\xEB\x9C\xA6",
+ "\x8D\xAA" => "\xEB\x9C\xA7",
+ "\x8D\xAB" => "\xEB\x9C\xAA",
+ "\x8D\xAC" => "\xEB\x9C\xAB",
+ "\x8D\xAD" => "\xEB\x9C\xAD",
+ "\x8D\xAE" => "\xEB\x9C\xAE",
+ "\x8D\xAF" => "\xEB\x9C\xB1",
+ "\x8D\xB0" => "\xEB\x9C\xB2",
+ "\x8D\xB1" => "\xEB\x9C\xB3",
+ "\x8D\xB2" => "\xEB\x9C\xB4",
+ "\x8D\xB3" => "\xEB\x9C\xB5",
+ "\x8D\xB4" => "\xEB\x9C\xB6",
+ "\x8D\xB5" => "\xEB\x9C\xB7",
+ "\x8D\xB6" => "\xEB\x9C\xBA",
+ "\x8D\xB7" => "\xEB\x9C\xBC",
+ "\x8D\xB8" => "\xEB\x9C\xBD",
+ "\x8D\xB9" => "\xEB\x9C\xBE",
+ "\x8D\xBA" => "\xEB\x9C\xBF",
+ "\x8D\xBB" => "\xEB\x9D\x80",
+ "\x8D\xBC" => "\xEB\x9D\x81",
+ "\x8D\xBD" => "\xEB\x9D\x82",
+ "\x8D\xBE" => "\xEB\x9D\x83",
+ "\x8D\xBF" => "\xEB\x9D\x85",
+ "\x8D\xC0" => "\xEB\x9D\x86",
+ "\x8D\xC1" => "\xEB\x9D\x87",
+ "\x8D\xC2" => "\xEB\x9D\x89",
+ "\x8D\xC3" => "\xEB\x9D\x8A",
+ "\x8D\xC4" => "\xEB\x9D\x8B",
+ "\x8D\xC5" => "\xEB\x9D\x8D",
+ "\x8D\xC6" => "\xEB\x9D\x8E",
+ "\x8D\xC7" => "\xEB\x9D\x8F",
+ "\x8D\xC8" => "\xEB\x9D\x90",
+ "\x8D\xC9" => "\xEB\x9D\x91",
+ "\x8D\xCA" => "\xEB\x9D\x92",
+ "\x8D\xCB" => "\xEB\x9D\x93",
+ "\x8D\xCC" => "\xEB\x9D\x96",
+ "\x8D\xCD" => "\xEB\x9D\x97",
+ "\x8D\xCE" => "\xEB\x9D\x98",
+ "\x8D\xCF" => "\xEB\x9D\x99",
+ "\x8D\xD0" => "\xEB\x9D\x9A",
+ "\x8D\xD1" => "\xEB\x9D\x9B",
+ "\x8D\xD2" => "\xEB\x9D\x9C",
+ "\x8D\xD3" => "\xEB\x9D\x9D",
+ "\x8D\xD4" => "\xEB\x9D\x9E",
+ "\x8D\xD5" => "\xEB\x9D\x9F",
+ "\x8D\xD6" => "\xEB\x9D\xA1",
+ "\x8D\xD7" => "\xEB\x9D\xA2",
+ "\x8D\xD8" => "\xEB\x9D\xA3",
+ "\x8D\xD9" => "\xEB\x9D\xA5",
+ "\x8D\xDA" => "\xEB\x9D\xA6",
+ "\x8D\xDB" => "\xEB\x9D\xA7",
+ "\x8D\xDC" => "\xEB\x9D\xA9",
+ "\x8D\xDD" => "\xEB\x9D\xAA",
+ "\x8D\xDE" => "\xEB\x9D\xAB",
+ "\x8D\xDF" => "\xEB\x9D\xAC",
+ "\x8D\xE0" => "\xEB\x9D\xAD",
+ "\x8D\xE1" => "\xEB\x9D\xAE",
+ "\x8D\xE2" => "\xEB\x9D\xAF",
+ "\x8D\xE3" => "\xEB\x9D\xB2",
+ "\x8D\xE4" => "\xEB\x9D\xB4",
+ "\x8D\xE5" => "\xEB\x9D\xB6",
+ "\x8D\xE6" => "\xEB\x9D\xB7",
+ "\x8D\xE7" => "\xEB\x9D\xB8",
+ "\x8D\xE8" => "\xEB\x9D\xB9",
+ "\x8D\xE9" => "\xEB\x9D\xBA",
+ "\x8D\xEA" => "\xEB\x9D\xBB",
+ "\x8D\xEB" => "\xEB\x9D\xBE",
+ "\x8D\xEC" => "\xEB\x9D\xBF",
+ "\x8D\xED" => "\xEB\x9E\x81",
+ "\x8D\xEE" => "\xEB\x9E\x82",
+ "\x8D\xEF" => "\xEB\x9E\x83",
+ "\x8D\xF0" => "\xEB\x9E\x85",
+ "\x8D\xF1" => "\xEB\x9E\x86",
+ "\x8D\xF2" => "\xEB\x9E\x87",
+ "\x8D\xF3" => "\xEB\x9E\x88",
+ "\x8D\xF4" => "\xEB\x9E\x89",
+ "\x8D\xF5" => "\xEB\x9E\x8A",
+ "\x8D\xF6" => "\xEB\x9E\x8B",
+ "\x8D\xF7" => "\xEB\x9E\x8E",
+ "\x8D\xF8" => "\xEB\x9E\x93",
+ "\x8D\xF9" => "\xEB\x9E\x94",
+ "\x8D\xFA" => "\xEB\x9E\x95",
+ "\x8D\xFB" => "\xEB\x9E\x9A",
+ "\x8D\xFC" => "\xEB\x9E\x9B",
+ "\x8D\xFD" => "\xEB\x9E\x9D",
+ "\x8D\xFE" => "\xEB\x9E\x9E",
+ "\x8E\x41" => "\xEB\x9E\x9F",
+ "\x8E\x42" => "\xEB\x9E\xA1",
+ "\x8E\x43" => "\xEB\x9E\xA2",
+ "\x8E\x44" => "\xEB\x9E\xA3",
+ "\x8E\x45" => "\xEB\x9E\xA4",
+ "\x8E\x46" => "\xEB\x9E\xA5",
+ "\x8E\x47" => "\xEB\x9E\xA6",
+ "\x8E\x48" => "\xEB\x9E\xA7",
+ "\x8E\x49" => "\xEB\x9E\xAA",
+ "\x8E\x4A" => "\xEB\x9E\xAE",
+ "\x8E\x4B" => "\xEB\x9E\xAF",
+ "\x8E\x4C" => "\xEB\x9E\xB0",
+ "\x8E\x4D" => "\xEB\x9E\xB1",
+ "\x8E\x4E" => "\xEB\x9E\xB2",
+ "\x8E\x4F" => "\xEB\x9E\xB3",
+ "\x8E\x50" => "\xEB\x9E\xB6",
+ "\x8E\x51" => "\xEB\x9E\xB7",
+ "\x8E\x52" => "\xEB\x9E\xB9",
+ "\x8E\x53" => "\xEB\x9E\xBA",
+ "\x8E\x54" => "\xEB\x9E\xBB",
+ "\x8E\x55" => "\xEB\x9E\xBC",
+ "\x8E\x56" => "\xEB\x9E\xBD",
+ "\x8E\x57" => "\xEB\x9E\xBE",
+ "\x8E\x58" => "\xEB\x9E\xBF",
+ "\x8E\x59" => "\xEB\x9F\x80",
+ "\x8E\x5A" => "\xEB\x9F\x81",
+ "\x8E\x61" => "\xEB\x9F\x82",
+ "\x8E\x62" => "\xEB\x9F\x83",
+ "\x8E\x63" => "\xEB\x9F\x84",
+ "\x8E\x64" => "\xEB\x9F\x85",
+ "\x8E\x65" => "\xEB\x9F\x86",
+ "\x8E\x66" => "\xEB\x9F\x88",
+ "\x8E\x67" => "\xEB\x9F\x8A",
+ "\x8E\x68" => "\xEB\x9F\x8B",
+ "\x8E\x69" => "\xEB\x9F\x8C",
+ "\x8E\x6A" => "\xEB\x9F\x8D",
+ "\x8E\x6B" => "\xEB\x9F\x8E",
+ "\x8E\x6C" => "\xEB\x9F\x8F",
+ "\x8E\x6D" => "\xEB\x9F\x90",
+ "\x8E\x6E" => "\xEB\x9F\x91",
+ "\x8E\x6F" => "\xEB\x9F\x92",
+ "\x8E\x70" => "\xEB\x9F\x93",
+ "\x8E\x71" => "\xEB\x9F\x94",
+ "\x8E\x72" => "\xEB\x9F\x95",
+ "\x8E\x73" => "\xEB\x9F\x96",
+ "\x8E\x74" => "\xEB\x9F\x97",
+ "\x8E\x75" => "\xEB\x9F\x98",
+ "\x8E\x76" => "\xEB\x9F\x99",
+ "\x8E\x77" => "\xEB\x9F\x9A",
+ "\x8E\x78" => "\xEB\x9F\x9B",
+ "\x8E\x79" => "\xEB\x9F\x9C",
+ "\x8E\x7A" => "\xEB\x9F\x9D",
+ "\x8E\x81" => "\xEB\x9F\x9E",
+ "\x8E\x82" => "\xEB\x9F\x9F",
+ "\x8E\x83" => "\xEB\x9F\xA0",
+ "\x8E\x84" => "\xEB\x9F\xA1",
+ "\x8E\x85" => "\xEB\x9F\xA2",
+ "\x8E\x86" => "\xEB\x9F\xA3",
+ "\x8E\x87" => "\xEB\x9F\xA4",
+ "\x8E\x88" => "\xEB\x9F\xA5",
+ "\x8E\x89" => "\xEB\x9F\xA6",
+ "\x8E\x8A" => "\xEB\x9F\xA7",
+ "\x8E\x8B" => "\xEB\x9F\xA8",
+ "\x8E\x8C" => "\xEB\x9F\xA9",
+ "\x8E\x8D" => "\xEB\x9F\xAA",
+ "\x8E\x8E" => "\xEB\x9F\xAB",
+ "\x8E\x8F" => "\xEB\x9F\xAE",
+ "\x8E\x90" => "\xEB\x9F\xAF",
+ "\x8E\x91" => "\xEB\x9F\xB1",
+ "\x8E\x92" => "\xEB\x9F\xB2",
+ "\x8E\x93" => "\xEB\x9F\xB3",
+ "\x8E\x94" => "\xEB\x9F\xB5",
+ "\x8E\x95" => "\xEB\x9F\xB6",
+ "\x8E\x96" => "\xEB\x9F\xB7",
+ "\x8E\x97" => "\xEB\x9F\xB8",
+ "\x8E\x98" => "\xEB\x9F\xB9",
+ "\x8E\x99" => "\xEB\x9F\xBA",
+ "\x8E\x9A" => "\xEB\x9F\xBB",
+ "\x8E\x9B" => "\xEB\x9F\xBE",
+ "\x8E\x9C" => "\xEB\xA0\x82",
+ "\x8E\x9D" => "\xEB\xA0\x83",
+ "\x8E\x9E" => "\xEB\xA0\x84",
+ "\x8E\x9F" => "\xEB\xA0\x85",
+ "\x8E\xA0" => "\xEB\xA0\x86",
+ "\x8E\xA1" => "\xEB\xA0\x8A",
+ "\x8E\xA2" => "\xEB\xA0\x8B",
+ "\x8E\xA3" => "\xEB\xA0\x8D",
+ "\x8E\xA4" => "\xEB\xA0\x8E",
+ "\x8E\xA5" => "\xEB\xA0\x8F",
+ "\x8E\xA6" => "\xEB\xA0\x91",
+ "\x8E\xA7" => "\xEB\xA0\x92",
+ "\x8E\xA8" => "\xEB\xA0\x93",
+ "\x8E\xA9" => "\xEB\xA0\x94",
+ "\x8E\xAA" => "\xEB\xA0\x95",
+ "\x8E\xAB" => "\xEB\xA0\x96",
+ "\x8E\xAC" => "\xEB\xA0\x97",
+ "\x8E\xAD" => "\xEB\xA0\x9A",
+ "\x8E\xAE" => "\xEB\xA0\x9C",
+ "\x8E\xAF" => "\xEB\xA0\x9E",
+ "\x8E\xB0" => "\xEB\xA0\x9F",
+ "\x8E\xB1" => "\xEB\xA0\xA0",
+ "\x8E\xB2" => "\xEB\xA0\xA1",
+ "\x8E\xB3" => "\xEB\xA0\xA2",
+ "\x8E\xB4" => "\xEB\xA0\xA3",
+ "\x8E\xB5" => "\xEB\xA0\xA6",
+ "\x8E\xB6" => "\xEB\xA0\xA7",
+ "\x8E\xB7" => "\xEB\xA0\xA9",
+ "\x8E\xB8" => "\xEB\xA0\xAA",
+ "\x8E\xB9" => "\xEB\xA0\xAB",
+ "\x8E\xBA" => "\xEB\xA0\xAD",
+ "\x8E\xBB" => "\xEB\xA0\xAE",
+ "\x8E\xBC" => "\xEB\xA0\xAF",
+ "\x8E\xBD" => "\xEB\xA0\xB0",
+ "\x8E\xBE" => "\xEB\xA0\xB1",
+ "\x8E\xBF" => "\xEB\xA0\xB2",
+ "\x8E\xC0" => "\xEB\xA0\xB3",
+ "\x8E\xC1" => "\xEB\xA0\xB6",
+ "\x8E\xC2" => "\xEB\xA0\xBA",
+ "\x8E\xC3" => "\xEB\xA0\xBB",
+ "\x8E\xC4" => "\xEB\xA0\xBC",
+ "\x8E\xC5" => "\xEB\xA0\xBD",
+ "\x8E\xC6" => "\xEB\xA0\xBE",
+ "\x8E\xC7" => "\xEB\xA0\xBF",
+ "\x8E\xC8" => "\xEB\xA1\x81",
+ "\x8E\xC9" => "\xEB\xA1\x82",
+ "\x8E\xCA" => "\xEB\xA1\x83",
+ "\x8E\xCB" => "\xEB\xA1\x85",
+ "\x8E\xCC" => "\xEB\xA1\x86",
+ "\x8E\xCD" => "\xEB\xA1\x87",
+ "\x8E\xCE" => "\xEB\xA1\x88",
+ "\x8E\xCF" => "\xEB\xA1\x89",
+ "\x8E\xD0" => "\xEB\xA1\x8A",
+ "\x8E\xD1" => "\xEB\xA1\x8B",
+ "\x8E\xD2" => "\xEB\xA1\x8C",
+ "\x8E\xD3" => "\xEB\xA1\x8D",
+ "\x8E\xD4" => "\xEB\xA1\x8E",
+ "\x8E\xD5" => "\xEB\xA1\x8F",
+ "\x8E\xD6" => "\xEB\xA1\x90",
+ "\x8E\xD7" => "\xEB\xA1\x92",
+ "\x8E\xD8" => "\xEB\xA1\x94",
+ "\x8E\xD9" => "\xEB\xA1\x95",
+ "\x8E\xDA" => "\xEB\xA1\x96",
+ "\x8E\xDB" => "\xEB\xA1\x97",
+ "\x8E\xDC" => "\xEB\xA1\x98",
+ "\x8E\xDD" => "\xEB\xA1\x99",
+ "\x8E\xDE" => "\xEB\xA1\x9A",
+ "\x8E\xDF" => "\xEB\xA1\x9B",
+ "\x8E\xE0" => "\xEB\xA1\x9E",
+ "\x8E\xE1" => "\xEB\xA1\x9F",
+ "\x8E\xE2" => "\xEB\xA1\xA1",
+ "\x8E\xE3" => "\xEB\xA1\xA2",
+ "\x8E\xE4" => "\xEB\xA1\xA3",
+ "\x8E\xE5" => "\xEB\xA1\xA5",
+ "\x8E\xE6" => "\xEB\xA1\xA6",
+ "\x8E\xE7" => "\xEB\xA1\xA7",
+ "\x8E\xE8" => "\xEB\xA1\xA8",
+ "\x8E\xE9" => "\xEB\xA1\xA9",
+ "\x8E\xEA" => "\xEB\xA1\xAA",
+ "\x8E\xEB" => "\xEB\xA1\xAB",
+ "\x8E\xEC" => "\xEB\xA1\xAE",
+ "\x8E\xED" => "\xEB\xA1\xB0",
+ "\x8E\xEE" => "\xEB\xA1\xB2",
+ "\x8E\xEF" => "\xEB\xA1\xB3",
+ "\x8E\xF0" => "\xEB\xA1\xB4",
+ "\x8E\xF1" => "\xEB\xA1\xB5",
+ "\x8E\xF2" => "\xEB\xA1\xB6",
+ "\x8E\xF3" => "\xEB\xA1\xB7",
+ "\x8E\xF4" => "\xEB\xA1\xB9",
+ "\x8E\xF5" => "\xEB\xA1\xBA",
+ "\x8E\xF6" => "\xEB\xA1\xBB",
+ "\x8E\xF7" => "\xEB\xA1\xBD",
+ "\x8E\xF8" => "\xEB\xA1\xBE",
+ "\x8E\xF9" => "\xEB\xA1\xBF",
+ "\x8E\xFA" => "\xEB\xA2\x80",
+ "\x8E\xFB" => "\xEB\xA2\x81",
+ "\x8E\xFC" => "\xEB\xA2\x82",
+ "\x8E\xFD" => "\xEB\xA2\x83",
+ "\x8E\xFE" => "\xEB\xA2\x84",
+ "\x8F\x41" => "\xEB\xA2\x85",
+ "\x8F\x42" => "\xEB\xA2\x86",
+ "\x8F\x43" => "\xEB\xA2\x87",
+ "\x8F\x44" => "\xEB\xA2\x88",
+ "\x8F\x45" => "\xEB\xA2\x89",
+ "\x8F\x46" => "\xEB\xA2\x8A",
+ "\x8F\x47" => "\xEB\xA2\x8B",
+ "\x8F\x48" => "\xEB\xA2\x8C",
+ "\x8F\x49" => "\xEB\xA2\x8E",
+ "\x8F\x4A" => "\xEB\xA2\x8F",
+ "\x8F\x4B" => "\xEB\xA2\x90",
+ "\x8F\x4C" => "\xEB\xA2\x91",
+ "\x8F\x4D" => "\xEB\xA2\x92",
+ "\x8F\x4E" => "\xEB\xA2\x93",
+ "\x8F\x4F" => "\xEB\xA2\x94",
+ "\x8F\x50" => "\xEB\xA2\x95",
+ "\x8F\x51" => "\xEB\xA2\x96",
+ "\x8F\x52" => "\xEB\xA2\x97",
+ "\x8F\x53" => "\xEB\xA2\x98",
+ "\x8F\x54" => "\xEB\xA2\x99",
+ "\x8F\x55" => "\xEB\xA2\x9A",
+ "\x8F\x56" => "\xEB\xA2\x9B",
+ "\x8F\x57" => "\xEB\xA2\x9C",
+ "\x8F\x58" => "\xEB\xA2\x9D",
+ "\x8F\x59" => "\xEB\xA2\x9E",
+ "\x8F\x5A" => "\xEB\xA2\x9F",
+ "\x8F\x61" => "\xEB\xA2\xA0",
+ "\x8F\x62" => "\xEB\xA2\xA1",
+ "\x8F\x63" => "\xEB\xA2\xA2",
+ "\x8F\x64" => "\xEB\xA2\xA3",
+ "\x8F\x65" => "\xEB\xA2\xA4",
+ "\x8F\x66" => "\xEB\xA2\xA5",
+ "\x8F\x67" => "\xEB\xA2\xA6",
+ "\x8F\x68" => "\xEB\xA2\xA7",
+ "\x8F\x69" => "\xEB\xA2\xA9",
+ "\x8F\x6A" => "\xEB\xA2\xAA",
+ "\x8F\x6B" => "\xEB\xA2\xAB",
+ "\x8F\x6C" => "\xEB\xA2\xAC",
+ "\x8F\x6D" => "\xEB\xA2\xAD",
+ "\x8F\x6E" => "\xEB\xA2\xAE",
+ "\x8F\x6F" => "\xEB\xA2\xAF",
+ "\x8F\x70" => "\xEB\xA2\xB1",
+ "\x8F\x71" => "\xEB\xA2\xB2",
+ "\x8F\x72" => "\xEB\xA2\xB3",
+ "\x8F\x73" => "\xEB\xA2\xB5",
+ "\x8F\x74" => "\xEB\xA2\xB6",
+ "\x8F\x75" => "\xEB\xA2\xB7",
+ "\x8F\x76" => "\xEB\xA2\xB9",
+ "\x8F\x77" => "\xEB\xA2\xBA",
+ "\x8F\x78" => "\xEB\xA2\xBB",
+ "\x8F\x79" => "\xEB\xA2\xBC",
+ "\x8F\x7A" => "\xEB\xA2\xBD",
+ "\x8F\x81" => "\xEB\xA2\xBE",
+ "\x8F\x82" => "\xEB\xA2\xBF",
+ "\x8F\x83" => "\xEB\xA3\x82",
+ "\x8F\x84" => "\xEB\xA3\x84",
+ "\x8F\x85" => "\xEB\xA3\x86",
+ "\x8F\x86" => "\xEB\xA3\x87",
+ "\x8F\x87" => "\xEB\xA3\x88",
+ "\x8F\x88" => "\xEB\xA3\x89",
+ "\x8F\x89" => "\xEB\xA3\x8A",
+ "\x8F\x8A" => "\xEB\xA3\x8B",
+ "\x8F\x8B" => "\xEB\xA3\x8D",
+ "\x8F\x8C" => "\xEB\xA3\x8E",
+ "\x8F\x8D" => "\xEB\xA3\x8F",
+ "\x8F\x8E" => "\xEB\xA3\x91",
+ "\x8F\x8F" => "\xEB\xA3\x92",
+ "\x8F\x90" => "\xEB\xA3\x93",
+ "\x8F\x91" => "\xEB\xA3\x95",
+ "\x8F\x92" => "\xEB\xA3\x96",
+ "\x8F\x93" => "\xEB\xA3\x97",
+ "\x8F\x94" => "\xEB\xA3\x98",
+ "\x8F\x95" => "\xEB\xA3\x99",
+ "\x8F\x96" => "\xEB\xA3\x9A",
+ "\x8F\x97" => "\xEB\xA3\x9B",
+ "\x8F\x98" => "\xEB\xA3\x9C",
+ "\x8F\x99" => "\xEB\xA3\x9E",
+ "\x8F\x9A" => "\xEB\xA3\xA0",
+ "\x8F\x9B" => "\xEB\xA3\xA2",
+ "\x8F\x9C" => "\xEB\xA3\xA3",
+ "\x8F\x9D" => "\xEB\xA3\xA4",
+ "\x8F\x9E" => "\xEB\xA3\xA5",
+ "\x8F\x9F" => "\xEB\xA3\xA6",
+ "\x8F\xA0" => "\xEB\xA3\xA7",
+ "\x8F\xA1" => "\xEB\xA3\xAA",
+ "\x8F\xA2" => "\xEB\xA3\xAB",
+ "\x8F\xA3" => "\xEB\xA3\xAD",
+ "\x8F\xA4" => "\xEB\xA3\xAE",
+ "\x8F\xA5" => "\xEB\xA3\xAF",
+ "\x8F\xA6" => "\xEB\xA3\xB1",
+ "\x8F\xA7" => "\xEB\xA3\xB2",
+ "\x8F\xA8" => "\xEB\xA3\xB3",
+ "\x8F\xA9" => "\xEB\xA3\xB4",
+ "\x8F\xAA" => "\xEB\xA3\xB5",
+ "\x8F\xAB" => "\xEB\xA3\xB6",
+ "\x8F\xAC" => "\xEB\xA3\xB7",
+ "\x8F\xAD" => "\xEB\xA3\xBA",
+ "\x8F\xAE" => "\xEB\xA3\xBC",
+ "\x8F\xAF" => "\xEB\xA3\xBE",
+ "\x8F\xB0" => "\xEB\xA3\xBF",
+ "\x8F\xB1" => "\xEB\xA4\x80",
+ "\x8F\xB2" => "\xEB\xA4\x81",
+ "\x8F\xB3" => "\xEB\xA4\x82",
+ "\x8F\xB4" => "\xEB\xA4\x83",
+ "\x8F\xB5" => "\xEB\xA4\x85",
+ "\x8F\xB6" => "\xEB\xA4\x86",
+ "\x8F\xB7" => "\xEB\xA4\x87",
+ "\x8F\xB8" => "\xEB\xA4\x88",
+ "\x8F\xB9" => "\xEB\xA4\x89",
+ "\x8F\xBA" => "\xEB\xA4\x8A",
+ "\x8F\xBB" => "\xEB\xA4\x8B",
+ "\x8F\xBC" => "\xEB\xA4\x8C",
+ "\x8F\xBD" => "\xEB\xA4\x8D",
+ "\x8F\xBE" => "\xEB\xA4\x8E",
+ "\x8F\xBF" => "\xEB\xA4\x8F",
+ "\x8F\xC0" => "\xEB\xA4\x90",
+ "\x8F\xC1" => "\xEB\xA4\x91",
+ "\x8F\xC2" => "\xEB\xA4\x92",
+ "\x8F\xC3" => "\xEB\xA4\x93",
+ "\x8F\xC4" => "\xEB\xA4\x94",
+ "\x8F\xC5" => "\xEB\xA4\x95",
+ "\x8F\xC6" => "\xEB\xA4\x96",
+ "\x8F\xC7" => "\xEB\xA4\x97",
+ "\x8F\xC8" => "\xEB\xA4\x99",
+ "\x8F\xC9" => "\xEB\xA4\x9A",
+ "\x8F\xCA" => "\xEB\xA4\x9B",
+ "\x8F\xCB" => "\xEB\xA4\x9C",
+ "\x8F\xCC" => "\xEB\xA4\x9D",
+ "\x8F\xCD" => "\xEB\xA4\x9E",
+ "\x8F\xCE" => "\xEB\xA4\x9F",
+ "\x8F\xCF" => "\xEB\xA4\xA1",
+ "\x8F\xD0" => "\xEB\xA4\xA2",
+ "\x8F\xD1" => "\xEB\xA4\xA3",
+ "\x8F\xD2" => "\xEB\xA4\xA4",
+ "\x8F\xD3" => "\xEB\xA4\xA5",
+ "\x8F\xD4" => "\xEB\xA4\xA6",
+ "\x8F\xD5" => "\xEB\xA4\xA7",
+ "\x8F\xD6" => "\xEB\xA4\xA8",
+ "\x8F\xD7" => "\xEB\xA4\xA9",
+ "\x8F\xD8" => "\xEB\xA4\xAA",
+ "\x8F\xD9" => "\xEB\xA4\xAB",
+ "\x8F\xDA" => "\xEB\xA4\xAC",
+ "\x8F\xDB" => "\xEB\xA4\xAD",
+ "\x8F\xDC" => "\xEB\xA4\xAE",
+ "\x8F\xDD" => "\xEB\xA4\xAF",
+ "\x8F\xDE" => "\xEB\xA4\xB0",
+ "\x8F\xDF" => "\xEB\xA4\xB1",
+ "\x8F\xE0" => "\xEB\xA4\xB2",
+ "\x8F\xE1" => "\xEB\xA4\xB3",
+ "\x8F\xE2" => "\xEB\xA4\xB4",
+ "\x8F\xE3" => "\xEB\xA4\xB5",
+ "\x8F\xE4" => "\xEB\xA4\xB6",
+ "\x8F\xE5" => "\xEB\xA4\xB7",
+ "\x8F\xE6" => "\xEB\xA4\xB8",
+ "\x8F\xE7" => "\xEB\xA4\xB9",
+ "\x8F\xE8" => "\xEB\xA4\xBA",
+ "\x8F\xE9" => "\xEB\xA4\xBB",
+ "\x8F\xEA" => "\xEB\xA4\xBE",
+ "\x8F\xEB" => "\xEB\xA4\xBF",
+ "\x8F\xEC" => "\xEB\xA5\x81",
+ "\x8F\xED" => "\xEB\xA5\x82",
+ "\x8F\xEE" => "\xEB\xA5\x83",
+ "\x8F\xEF" => "\xEB\xA5\x85",
+ "\x8F\xF0" => "\xEB\xA5\x86",
+ "\x8F\xF1" => "\xEB\xA5\x87",
+ "\x8F\xF2" => "\xEB\xA5\x88",
+ "\x8F\xF3" => "\xEB\xA5\x89",
+ "\x8F\xF4" => "\xEB\xA5\x8A",
+ "\x8F\xF5" => "\xEB\xA5\x8B",
+ "\x8F\xF6" => "\xEB\xA5\x8D",
+ "\x8F\xF7" => "\xEB\xA5\x8E",
+ "\x8F\xF8" => "\xEB\xA5\x90",
+ "\x8F\xF9" => "\xEB\xA5\x92",
+ "\x8F\xFA" => "\xEB\xA5\x93",
+ "\x8F\xFB" => "\xEB\xA5\x94",
+ "\x8F\xFC" => "\xEB\xA5\x95",
+ "\x8F\xFD" => "\xEB\xA5\x96",
+ "\x8F\xFE" => "\xEB\xA5\x97",
+ "\x90\x41" => "\xEB\xA5\x9A",
+ "\x90\x42" => "\xEB\xA5\x9B",
+ "\x90\x43" => "\xEB\xA5\x9D",
+ "\x90\x44" => "\xEB\xA5\x9E",
+ "\x90\x45" => "\xEB\xA5\x9F",
+ "\x90\x46" => "\xEB\xA5\xA1",
+ "\x90\x47" => "\xEB\xA5\xA2",
+ "\x90\x48" => "\xEB\xA5\xA3",
+ "\x90\x49" => "\xEB\xA5\xA4",
+ "\x90\x4A" => "\xEB\xA5\xA5",
+ "\x90\x4B" => "\xEB\xA5\xA6",
+ "\x90\x4C" => "\xEB\xA5\xA7",
+ "\x90\x4D" => "\xEB\xA5\xAA",
+ "\x90\x4E" => "\xEB\xA5\xAC",
+ "\x90\x4F" => "\xEB\xA5\xAE",
+ "\x90\x50" => "\xEB\xA5\xAF",
+ "\x90\x51" => "\xEB\xA5\xB0",
+ "\x90\x52" => "\xEB\xA5\xB1",
+ "\x90\x53" => "\xEB\xA5\xB2",
+ "\x90\x54" => "\xEB\xA5\xB3",
+ "\x90\x55" => "\xEB\xA5\xB6",
+ "\x90\x56" => "\xEB\xA5\xB7",
+ "\x90\x57" => "\xEB\xA5\xB9",
+ "\x90\x58" => "\xEB\xA5\xBA",
+ "\x90\x59" => "\xEB\xA5\xBB",
+ "\x90\x5A" => "\xEB\xA5\xBD",
+ "\x90\x61" => "\xEB\xA5\xBE",
+ "\x90\x62" => "\xEB\xA5\xBF",
+ "\x90\x63" => "\xEB\xA6\x80",
+ "\x90\x64" => "\xEB\xA6\x81",
+ "\x90\x65" => "\xEB\xA6\x82",
+ "\x90\x66" => "\xEB\xA6\x83",
+ "\x90\x67" => "\xEB\xA6\x86",
+ "\x90\x68" => "\xEB\xA6\x88",
+ "\x90\x69" => "\xEB\xA6\x8B",
+ "\x90\x6A" => "\xEB\xA6\x8C",
+ "\x90\x6B" => "\xEB\xA6\x8F",
+ "\x90\x6C" => "\xEB\xA6\x90",
+ "\x90\x6D" => "\xEB\xA6\x91",
+ "\x90\x6E" => "\xEB\xA6\x92",
+ "\x90\x6F" => "\xEB\xA6\x93",
+ "\x90\x70" => "\xEB\xA6\x94",
+ "\x90\x71" => "\xEB\xA6\x95",
+ "\x90\x72" => "\xEB\xA6\x96",
+ "\x90\x73" => "\xEB\xA6\x97",
+ "\x90\x74" => "\xEB\xA6\x98",
+ "\x90\x75" => "\xEB\xA6\x99",
+ "\x90\x76" => "\xEB\xA6\x9A",
+ "\x90\x77" => "\xEB\xA6\x9B",
+ "\x90\x78" => "\xEB\xA6\x9C",
+ "\x90\x79" => "\xEB\xA6\x9D",
+ "\x90\x7A" => "\xEB\xA6\x9E",
+ "\x90\x81" => "\xEB\xA6\x9F",
+ "\x90\x82" => "\xEB\xA6\xA0",
+ "\x90\x83" => "\xEB\xA6\xA1",
+ "\x90\x84" => "\xEB\xA6\xA2",
+ "\x90\x85" => "\xEB\xA6\xA3",
+ "\x90\x86" => "\xEB\xA6\xA4",
+ "\x90\x87" => "\xEB\xA6\xA5",
+ "\x90\x88" => "\xEB\xA6\xA6",
+ "\x90\x89" => "\xEB\xA6\xA7",
+ "\x90\x8A" => "\xEB\xA6\xA8",
+ "\x90\x8B" => "\xEB\xA6\xA9",
+ "\x90\x8C" => "\xEB\xA6\xAA",
+ "\x90\x8D" => "\xEB\xA6\xAB",
+ "\x90\x8E" => "\xEB\xA6\xAE",
+ "\x90\x8F" => "\xEB\xA6\xAF",
+ "\x90\x90" => "\xEB\xA6\xB1",
+ "\x90\x91" => "\xEB\xA6\xB2",
+ "\x90\x92" => "\xEB\xA6\xB3",
+ "\x90\x93" => "\xEB\xA6\xB5",
+ "\x90\x94" => "\xEB\xA6\xB6",
+ "\x90\x95" => "\xEB\xA6\xB7",
+ "\x90\x96" => "\xEB\xA6\xB8",
+ "\x90\x97" => "\xEB\xA6\xB9",
+ "\x90\x98" => "\xEB\xA6\xBA",
+ "\x90\x99" => "\xEB\xA6\xBB",
+ "\x90\x9A" => "\xEB\xA6\xBE",
+ "\x90\x9B" => "\xEB\xA7\x80",
+ "\x90\x9C" => "\xEB\xA7\x82",
+ "\x90\x9D" => "\xEB\xA7\x83",
+ "\x90\x9E" => "\xEB\xA7\x84",
+ "\x90\x9F" => "\xEB\xA7\x85",
+ "\x90\xA0" => "\xEB\xA7\x86",
+ "\x90\xA1" => "\xEB\xA7\x87",
+ "\x90\xA2" => "\xEB\xA7\x8A",
+ "\x90\xA3" => "\xEB\xA7\x8B",
+ "\x90\xA4" => "\xEB\xA7\x8D",
+ "\x90\xA5" => "\xEB\xA7\x93",
+ "\x90\xA6" => "\xEB\xA7\x94",
+ "\x90\xA7" => "\xEB\xA7\x95",
+ "\x90\xA8" => "\xEB\xA7\x96",
+ "\x90\xA9" => "\xEB\xA7\x97",
+ "\x90\xAA" => "\xEB\xA7\x9A",
+ "\x90\xAB" => "\xEB\xA7\x9C",
+ "\x90\xAC" => "\xEB\xA7\x9F",
+ "\x90\xAD" => "\xEB\xA7\xA0",
+ "\x90\xAE" => "\xEB\xA7\xA2",
+ "\x90\xAF" => "\xEB\xA7\xA6",
+ "\x90\xB0" => "\xEB\xA7\xA7",
+ "\x90\xB1" => "\xEB\xA7\xA9",
+ "\x90\xB2" => "\xEB\xA7\xAA",
+ "\x90\xB3" => "\xEB\xA7\xAB",
+ "\x90\xB4" => "\xEB\xA7\xAD",
+ "\x90\xB5" => "\xEB\xA7\xAE",
+ "\x90\xB6" => "\xEB\xA7\xAF",
+ "\x90\xB7" => "\xEB\xA7\xB0",
+ "\x90\xB8" => "\xEB\xA7\xB1",
+ "\x90\xB9" => "\xEB\xA7\xB2",
+ "\x90\xBA" => "\xEB\xA7\xB3",
+ "\x90\xBB" => "\xEB\xA7\xB6",
+ "\x90\xBC" => "\xEB\xA7\xBB",
+ "\x90\xBD" => "\xEB\xA7\xBC",
+ "\x90\xBE" => "\xEB\xA7\xBD",
+ "\x90\xBF" => "\xEB\xA7\xBE",
+ "\x90\xC0" => "\xEB\xA7\xBF",
+ "\x90\xC1" => "\xEB\xA8\x82",
+ "\x90\xC2" => "\xEB\xA8\x83",
+ "\x90\xC3" => "\xEB\xA8\x84",
+ "\x90\xC4" => "\xEB\xA8\x85",
+ "\x90\xC5" => "\xEB\xA8\x86",
+ "\x90\xC6" => "\xEB\xA8\x87",
+ "\x90\xC7" => "\xEB\xA8\x89",
+ "\x90\xC8" => "\xEB\xA8\x8A",
+ "\x90\xC9" => "\xEB\xA8\x8B",
+ "\x90\xCA" => "\xEB\xA8\x8C",
+ "\x90\xCB" => "\xEB\xA8\x8D",
+ "\x90\xCC" => "\xEB\xA8\x8E",
+ "\x90\xCD" => "\xEB\xA8\x8F",
+ "\x90\xCE" => "\xEB\xA8\x90",
+ "\x90\xCF" => "\xEB\xA8\x91",
+ "\x90\xD0" => "\xEB\xA8\x92",
+ "\x90\xD1" => "\xEB\xA8\x93",
+ "\x90\xD2" => "\xEB\xA8\x94",
+ "\x90\xD3" => "\xEB\xA8\x96",
+ "\x90\xD4" => "\xEB\xA8\x97",
+ "\x90\xD5" => "\xEB\xA8\x98",
+ "\x90\xD6" => "\xEB\xA8\x99",
+ "\x90\xD7" => "\xEB\xA8\x9A",
+ "\x90\xD8" => "\xEB\xA8\x9B",
+ "\x90\xD9" => "\xEB\xA8\x9C",
+ "\x90\xDA" => "\xEB\xA8\x9D",
+ "\x90\xDB" => "\xEB\xA8\x9E",
+ "\x90\xDC" => "\xEB\xA8\x9F",
+ "\x90\xDD" => "\xEB\xA8\xA0",
+ "\x90\xDE" => "\xEB\xA8\xA1",
+ "\x90\xDF" => "\xEB\xA8\xA2",
+ "\x90\xE0" => "\xEB\xA8\xA3",
+ "\x90\xE1" => "\xEB\xA8\xA4",
+ "\x90\xE2" => "\xEB\xA8\xA5",
+ "\x90\xE3" => "\xEB\xA8\xA6",
+ "\x90\xE4" => "\xEB\xA8\xA7",
+ "\x90\xE5" => "\xEB\xA8\xA8",
+ "\x90\xE6" => "\xEB\xA8\xA9",
+ "\x90\xE7" => "\xEB\xA8\xAA",
+ "\x90\xE8" => "\xEB\xA8\xAB",
+ "\x90\xE9" => "\xEB\xA8\xAC",
+ "\x90\xEA" => "\xEB\xA8\xAD",
+ "\x90\xEB" => "\xEB\xA8\xAE",
+ "\x90\xEC" => "\xEB\xA8\xAF",
+ "\x90\xED" => "\xEB\xA8\xB0",
+ "\x90\xEE" => "\xEB\xA8\xB1",
+ "\x90\xEF" => "\xEB\xA8\xB2",
+ "\x90\xF0" => "\xEB\xA8\xB3",
+ "\x90\xF1" => "\xEB\xA8\xB4",
+ "\x90\xF2" => "\xEB\xA8\xB5",
+ "\x90\xF3" => "\xEB\xA8\xB6",
+ "\x90\xF4" => "\xEB\xA8\xB7",
+ "\x90\xF5" => "\xEB\xA8\xBA",
+ "\x90\xF6" => "\xEB\xA8\xBB",
+ "\x90\xF7" => "\xEB\xA8\xBD",
+ "\x90\xF8" => "\xEB\xA8\xBE",
+ "\x90\xF9" => "\xEB\xA8\xBF",
+ "\x90\xFA" => "\xEB\xA9\x81",
+ "\x90\xFB" => "\xEB\xA9\x83",
+ "\x90\xFC" => "\xEB\xA9\x84",
+ "\x90\xFD" => "\xEB\xA9\x85",
+ "\x90\xFE" => "\xEB\xA9\x86",
+ "\x91\x41" => "\xEB\xA9\x87",
+ "\x91\x42" => "\xEB\xA9\x8A",
+ "\x91\x43" => "\xEB\xA9\x8C",
+ "\x91\x44" => "\xEB\xA9\x8F",
+ "\x91\x45" => "\xEB\xA9\x90",
+ "\x91\x46" => "\xEB\xA9\x91",
+ "\x91\x47" => "\xEB\xA9\x92",
+ "\x91\x48" => "\xEB\xA9\x96",
+ "\x91\x49" => "\xEB\xA9\x97",
+ "\x91\x4A" => "\xEB\xA9\x99",
+ "\x91\x4B" => "\xEB\xA9\x9A",
+ "\x91\x4C" => "\xEB\xA9\x9B",
+ "\x91\x4D" => "\xEB\xA9\x9D",
+ "\x91\x4E" => "\xEB\xA9\x9E",
+ "\x91\x4F" => "\xEB\xA9\x9F",
+ "\x91\x50" => "\xEB\xA9\xA0",
+ "\x91\x51" => "\xEB\xA9\xA1",
+ "\x91\x52" => "\xEB\xA9\xA2",
+ "\x91\x53" => "\xEB\xA9\xA3",
+ "\x91\x54" => "\xEB\xA9\xA6",
+ "\x91\x55" => "\xEB\xA9\xAA",
+ "\x91\x56" => "\xEB\xA9\xAB",
+ "\x91\x57" => "\xEB\xA9\xAC",
+ "\x91\x58" => "\xEB\xA9\xAD",
+ "\x91\x59" => "\xEB\xA9\xAE",
+ "\x91\x5A" => "\xEB\xA9\xAF",
+ "\x91\x61" => "\xEB\xA9\xB2",
+ "\x91\x62" => "\xEB\xA9\xB3",
+ "\x91\x63" => "\xEB\xA9\xB5",
+ "\x91\x64" => "\xEB\xA9\xB6",
+ "\x91\x65" => "\xEB\xA9\xB7",
+ "\x91\x66" => "\xEB\xA9\xB9",
+ "\x91\x67" => "\xEB\xA9\xBA",
+ "\x91\x68" => "\xEB\xA9\xBB",
+ "\x91\x69" => "\xEB\xA9\xBC",
+ "\x91\x6A" => "\xEB\xA9\xBD",
+ "\x91\x6B" => "\xEB\xA9\xBE",
+ "\x91\x6C" => "\xEB\xA9\xBF",
+ "\x91\x6D" => "\xEB\xAA\x80",
+ "\x91\x6E" => "\xEB\xAA\x81",
+ "\x91\x6F" => "\xEB\xAA\x82",
+ "\x91\x70" => "\xEB\xAA\x86",
+ "\x91\x71" => "\xEB\xAA\x88",
+ "\x91\x72" => "\xEB\xAA\x89",
+ "\x91\x73" => "\xEB\xAA\x8A",
+ "\x91\x74" => "\xEB\xAA\x8B",
+ "\x91\x75" => "\xEB\xAA\x8D",
+ "\x91\x76" => "\xEB\xAA\x8E",
+ "\x91\x77" => "\xEB\xAA\x8F",
+ "\x91\x78" => "\xEB\xAA\x90",
+ "\x91\x79" => "\xEB\xAA\x91",
+ "\x91\x7A" => "\xEB\xAA\x92",
+ "\x91\x81" => "\xEB\xAA\x93",
+ "\x91\x82" => "\xEB\xAA\x94",
+ "\x91\x83" => "\xEB\xAA\x95",
+ "\x91\x84" => "\xEB\xAA\x96",
+ "\x91\x85" => "\xEB\xAA\x97",
+ "\x91\x86" => "\xEB\xAA\x98",
+ "\x91\x87" => "\xEB\xAA\x99",
+ "\x91\x88" => "\xEB\xAA\x9A",
+ "\x91\x89" => "\xEB\xAA\x9B",
+ "\x91\x8A" => "\xEB\xAA\x9C",
+ "\x91\x8B" => "\xEB\xAA\x9D",
+ "\x91\x8C" => "\xEB\xAA\x9E",
+ "\x91\x8D" => "\xEB\xAA\x9F",
+ "\x91\x8E" => "\xEB\xAA\xA0",
+ "\x91\x8F" => "\xEB\xAA\xA1",
+ "\x91\x90" => "\xEB\xAA\xA2",
+ "\x91\x91" => "\xEB\xAA\xA3",
+ "\x91\x92" => "\xEB\xAA\xA4",
+ "\x91\x93" => "\xEB\xAA\xA5",
+ "\x91\x94" => "\xEB\xAA\xA6",
+ "\x91\x95" => "\xEB\xAA\xA7",
+ "\x91\x96" => "\xEB\xAA\xAA",
+ "\x91\x97" => "\xEB\xAA\xAD",
+ "\x91\x98" => "\xEB\xAA\xAE",
+ "\x91\x99" => "\xEB\xAA\xAF",
+ "\x91\x9A" => "\xEB\xAA\xB1",
+ "\x91\x9B" => "\xEB\xAA\xB3",
+ "\x91\x9C" => "\xEB\xAA\xB4",
+ "\x91\x9D" => "\xEB\xAA\xB5",
+ "\x91\x9E" => "\xEB\xAA\xB6",
+ "\x91\x9F" => "\xEB\xAA\xB7",
+ "\x91\xA0" => "\xEB\xAA\xBA",
+ "\x91\xA1" => "\xEB\xAA\xBC",
+ "\x91\xA2" => "\xEB\xAA\xBE",
+ "\x91\xA3" => "\xEB\xAA\xBF",
+ "\x91\xA4" => "\xEB\xAB\x80",
+ "\x91\xA5" => "\xEB\xAB\x81",
+ "\x91\xA6" => "\xEB\xAB\x82",
+ "\x91\xA7" => "\xEB\xAB\x83",
+ "\x91\xA8" => "\xEB\xAB\x85",
+ "\x91\xA9" => "\xEB\xAB\x86",
+ "\x91\xAA" => "\xEB\xAB\x87",
+ "\x91\xAB" => "\xEB\xAB\x89",
+ "\x91\xAC" => "\xEB\xAB\x8A",
+ "\x91\xAD" => "\xEB\xAB\x8B",
+ "\x91\xAE" => "\xEB\xAB\x8C",
+ "\x91\xAF" => "\xEB\xAB\x8D",
+ "\x91\xB0" => "\xEB\xAB\x8E",
+ "\x91\xB1" => "\xEB\xAB\x8F",
+ "\x91\xB2" => "\xEB\xAB\x90",
+ "\x91\xB3" => "\xEB\xAB\x91",
+ "\x91\xB4" => "\xEB\xAB\x92",
+ "\x91\xB5" => "\xEB\xAB\x93",
+ "\x91\xB6" => "\xEB\xAB\x94",
+ "\x91\xB7" => "\xEB\xAB\x95",
+ "\x91\xB8" => "\xEB\xAB\x96",
+ "\x91\xB9" => "\xEB\xAB\x97",
+ "\x91\xBA" => "\xEB\xAB\x9A",
+ "\x91\xBB" => "\xEB\xAB\x9B",
+ "\x91\xBC" => "\xEB\xAB\x9C",
+ "\x91\xBD" => "\xEB\xAB\x9D",
+ "\x91\xBE" => "\xEB\xAB\x9E",
+ "\x91\xBF" => "\xEB\xAB\x9F",
+ "\x91\xC0" => "\xEB\xAB\xA0",
+ "\x91\xC1" => "\xEB\xAB\xA1",
+ "\x91\xC2" => "\xEB\xAB\xA2",
+ "\x91\xC3" => "\xEB\xAB\xA3",
+ "\x91\xC4" => "\xEB\xAB\xA4",
+ "\x91\xC5" => "\xEB\xAB\xA5",
+ "\x91\xC6" => "\xEB\xAB\xA6",
+ "\x91\xC7" => "\xEB\xAB\xA7",
+ "\x91\xC8" => "\xEB\xAB\xA8",
+ "\x91\xC9" => "\xEB\xAB\xA9",
+ "\x91\xCA" => "\xEB\xAB\xAA",
+ "\x91\xCB" => "\xEB\xAB\xAB",
+ "\x91\xCC" => "\xEB\xAB\xAC",
+ "\x91\xCD" => "\xEB\xAB\xAD",
+ "\x91\xCE" => "\xEB\xAB\xAE",
+ "\x91\xCF" => "\xEB\xAB\xAF",
+ "\x91\xD0" => "\xEB\xAB\xB0",
+ "\x91\xD1" => "\xEB\xAB\xB1",
+ "\x91\xD2" => "\xEB\xAB\xB2",
+ "\x91\xD3" => "\xEB\xAB\xB3",
+ "\x91\xD4" => "\xEB\xAB\xB4",
+ "\x91\xD5" => "\xEB\xAB\xB5",
+ "\x91\xD6" => "\xEB\xAB\xB6",
+ "\x91\xD7" => "\xEB\xAB\xB7",
+ "\x91\xD8" => "\xEB\xAB\xB8",
+ "\x91\xD9" => "\xEB\xAB\xB9",
+ "\x91\xDA" => "\xEB\xAB\xBA",
+ "\x91\xDB" => "\xEB\xAB\xBB",
+ "\x91\xDC" => "\xEB\xAB\xBD",
+ "\x91\xDD" => "\xEB\xAB\xBE",
+ "\x91\xDE" => "\xEB\xAB\xBF",
+ "\x91\xDF" => "\xEB\xAC\x81",
+ "\x91\xE0" => "\xEB\xAC\x82",
+ "\x91\xE1" => "\xEB\xAC\x83",
+ "\x91\xE2" => "\xEB\xAC\x85",
+ "\x91\xE3" => "\xEB\xAC\x86",
+ "\x91\xE4" => "\xEB\xAC\x87",
+ "\x91\xE5" => "\xEB\xAC\x88",
+ "\x91\xE6" => "\xEB\xAC\x89",
+ "\x91\xE7" => "\xEB\xAC\x8A",
+ "\x91\xE8" => "\xEB\xAC\x8B",
+ "\x91\xE9" => "\xEB\xAC\x8C",
+ "\x91\xEA" => "\xEB\xAC\x8E",
+ "\x91\xEB" => "\xEB\xAC\x90",
+ "\x91\xEC" => "\xEB\xAC\x92",
+ "\x91\xED" => "\xEB\xAC\x93",
+ "\x91\xEE" => "\xEB\xAC\x94",
+ "\x91\xEF" => "\xEB\xAC\x95",
+ "\x91\xF0" => "\xEB\xAC\x96",
+ "\x91\xF1" => "\xEB\xAC\x97",
+ "\x91\xF2" => "\xEB\xAC\x99",
+ "\x91\xF3" => "\xEB\xAC\x9A",
+ "\x91\xF4" => "\xEB\xAC\x9B",
+ "\x91\xF5" => "\xEB\xAC\x9D",
+ "\x91\xF6" => "\xEB\xAC\x9E",
+ "\x91\xF7" => "\xEB\xAC\x9F",
+ "\x91\xF8" => "\xEB\xAC\xA1",
+ "\x91\xF9" => "\xEB\xAC\xA2",
+ "\x91\xFA" => "\xEB\xAC\xA3",
+ "\x91\xFB" => "\xEB\xAC\xA4",
+ "\x91\xFC" => "\xEB\xAC\xA5",
+ "\x91\xFD" => "\xEB\xAC\xA6",
+ "\x91\xFE" => "\xEB\xAC\xA7",
+ "\x92\x41" => "\xEB\xAC\xA8",
+ "\x92\x42" => "\xEB\xAC\xAA",
+ "\x92\x43" => "\xEB\xAC\xAC",
+ "\x92\x44" => "\xEB\xAC\xAD",
+ "\x92\x45" => "\xEB\xAC\xAE",
+ "\x92\x46" => "\xEB\xAC\xAF",
+ "\x92\x47" => "\xEB\xAC\xB0",
+ "\x92\x48" => "\xEB\xAC\xB1",
+ "\x92\x49" => "\xEB\xAC\xB2",
+ "\x92\x4A" => "\xEB\xAC\xB3",
+ "\x92\x4B" => "\xEB\xAC\xB7",
+ "\x92\x4C" => "\xEB\xAC\xB9",
+ "\x92\x4D" => "\xEB\xAC\xBA",
+ "\x92\x4E" => "\xEB\xAC\xBF",
+ "\x92\x4F" => "\xEB\xAD\x80",
+ "\x92\x50" => "\xEB\xAD\x81",
+ "\x92\x51" => "\xEB\xAD\x82",
+ "\x92\x52" => "\xEB\xAD\x83",
+ "\x92\x53" => "\xEB\xAD\x86",
+ "\x92\x54" => "\xEB\xAD\x88",
+ "\x92\x55" => "\xEB\xAD\x8A",
+ "\x92\x56" => "\xEB\xAD\x8B",
+ "\x92\x57" => "\xEB\xAD\x8C",
+ "\x92\x58" => "\xEB\xAD\x8E",
+ "\x92\x59" => "\xEB\xAD\x91",
+ "\x92\x5A" => "\xEB\xAD\x92",
+ "\x92\x61" => "\xEB\xAD\x93",
+ "\x92\x62" => "\xEB\xAD\x95",
+ "\x92\x63" => "\xEB\xAD\x96",
+ "\x92\x64" => "\xEB\xAD\x97",
+ "\x92\x65" => "\xEB\xAD\x99",
+ "\x92\x66" => "\xEB\xAD\x9A",
+ "\x92\x67" => "\xEB\xAD\x9B",
+ "\x92\x68" => "\xEB\xAD\x9C",
+ "\x92\x69" => "\xEB\xAD\x9D",
+ "\x92\x6A" => "\xEB\xAD\x9E",
+ "\x92\x6B" => "\xEB\xAD\x9F",
+ "\x92\x6C" => "\xEB\xAD\xA0",
+ "\x92\x6D" => "\xEB\xAD\xA2",
+ "\x92\x6E" => "\xEB\xAD\xA4",
+ "\x92\x6F" => "\xEB\xAD\xA5",
+ "\x92\x70" => "\xEB\xAD\xA6",
+ "\x92\x71" => "\xEB\xAD\xA7",
+ "\x92\x72" => "\xEB\xAD\xA8",
+ "\x92\x73" => "\xEB\xAD\xA9",
+ "\x92\x74" => "\xEB\xAD\xAA",
+ "\x92\x75" => "\xEB\xAD\xAB",
+ "\x92\x76" => "\xEB\xAD\xAD",
+ "\x92\x77" => "\xEB\xAD\xAE",
+ "\x92\x78" => "\xEB\xAD\xAF",
+ "\x92\x79" => "\xEB\xAD\xB0",
+ "\x92\x7A" => "\xEB\xAD\xB1",
+ "\x92\x81" => "\xEB\xAD\xB2",
+ "\x92\x82" => "\xEB\xAD\xB3",
+ "\x92\x83" => "\xEB\xAD\xB4",
+ "\x92\x84" => "\xEB\xAD\xB5",
+ "\x92\x85" => "\xEB\xAD\xB6",
+ "\x92\x86" => "\xEB\xAD\xB7",
+ "\x92\x87" => "\xEB\xAD\xB8",
+ "\x92\x88" => "\xEB\xAD\xB9",
+ "\x92\x89" => "\xEB\xAD\xBA",
+ "\x92\x8A" => "\xEB\xAD\xBB",
+ "\x92\x8B" => "\xEB\xAD\xBC",
+ "\x92\x8C" => "\xEB\xAD\xBD",
+ "\x92\x8D" => "\xEB\xAD\xBE",
+ "\x92\x8E" => "\xEB\xAD\xBF",
+ "\x92\x8F" => "\xEB\xAE\x80",
+ "\x92\x90" => "\xEB\xAE\x81",
+ "\x92\x91" => "\xEB\xAE\x82",
+ "\x92\x92" => "\xEB\xAE\x83",
+ "\x92\x93" => "\xEB\xAE\x84",
+ "\x92\x94" => "\xEB\xAE\x85",
+ "\x92\x95" => "\xEB\xAE\x86",
+ "\x92\x96" => "\xEB\xAE\x87",
+ "\x92\x97" => "\xEB\xAE\x89",
+ "\x92\x98" => "\xEB\xAE\x8A",
+ "\x92\x99" => "\xEB\xAE\x8B",
+ "\x92\x9A" => "\xEB\xAE\x8D",
+ "\x92\x9B" => "\xEB\xAE\x8E",
+ "\x92\x9C" => "\xEB\xAE\x8F",
+ "\x92\x9D" => "\xEB\xAE\x91",
+ "\x92\x9E" => "\xEB\xAE\x92",
+ "\x92\x9F" => "\xEB\xAE\x93",
+ "\x92\xA0" => "\xEB\xAE\x94",
+ "\x92\xA1" => "\xEB\xAE\x95",
+ "\x92\xA2" => "\xEB\xAE\x96",
+ "\x92\xA3" => "\xEB\xAE\x97",
+ "\x92\xA4" => "\xEB\xAE\x98",
+ "\x92\xA5" => "\xEB\xAE\x99",
+ "\x92\xA6" => "\xEB\xAE\x9A",
+ "\x92\xA7" => "\xEB\xAE\x9B",
+ "\x92\xA8" => "\xEB\xAE\x9C",
+ "\x92\xA9" => "\xEB\xAE\x9D",
+ "\x92\xAA" => "\xEB\xAE\x9E",
+ "\x92\xAB" => "\xEB\xAE\x9F",
+ "\x92\xAC" => "\xEB\xAE\xA0",
+ "\x92\xAD" => "\xEB\xAE\xA1",
+ "\x92\xAE" => "\xEB\xAE\xA2",
+ "\x92\xAF" => "\xEB\xAE\xA3",
+ "\x92\xB0" => "\xEB\xAE\xA5",
+ "\x92\xB1" => "\xEB\xAE\xA6",
+ "\x92\xB2" => "\xEB\xAE\xA7",
+ "\x92\xB3" => "\xEB\xAE\xA9",
+ "\x92\xB4" => "\xEB\xAE\xAA",
+ "\x92\xB5" => "\xEB\xAE\xAB",
+ "\x92\xB6" => "\xEB\xAE\xAD",
+ "\x92\xB7" => "\xEB\xAE\xAE",
+ "\x92\xB8" => "\xEB\xAE\xAF",
+ "\x92\xB9" => "\xEB\xAE\xB0",
+ "\x92\xBA" => "\xEB\xAE\xB1",
+ "\x92\xBB" => "\xEB\xAE\xB2",
+ "\x92\xBC" => "\xEB\xAE\xB3",
+ "\x92\xBD" => "\xEB\xAE\xB5",
+ "\x92\xBE" => "\xEB\xAE\xB6",
+ "\x92\xBF" => "\xEB\xAE\xB8",
+ "\x92\xC0" => "\xEB\xAE\xB9",
+ "\x92\xC1" => "\xEB\xAE\xBA",
+ "\x92\xC2" => "\xEB\xAE\xBB",
+ "\x92\xC3" => "\xEB\xAE\xBC",
+ "\x92\xC4" => "\xEB\xAE\xBD",
+ "\x92\xC5" => "\xEB\xAE\xBE",
+ "\x92\xC6" => "\xEB\xAE\xBF",
+ "\x92\xC7" => "\xEB\xAF\x81",
+ "\x92\xC8" => "\xEB\xAF\x82",
+ "\x92\xC9" => "\xEB\xAF\x83",
+ "\x92\xCA" => "\xEB\xAF\x85",
+ "\x92\xCB" => "\xEB\xAF\x86",
+ "\x92\xCC" => "\xEB\xAF\x87",
+ "\x92\xCD" => "\xEB\xAF\x89",
+ "\x92\xCE" => "\xEB\xAF\x8A",
+ "\x92\xCF" => "\xEB\xAF\x8B",
+ "\x92\xD0" => "\xEB\xAF\x8C",
+ "\x92\xD1" => "\xEB\xAF\x8D",
+ "\x92\xD2" => "\xEB\xAF\x8E",
+ "\x92\xD3" => "\xEB\xAF\x8F",
+ "\x92\xD4" => "\xEB\xAF\x91",
+ "\x92\xD5" => "\xEB\xAF\x92",
+ "\x92\xD6" => "\xEB\xAF\x94",
+ "\x92\xD7" => "\xEB\xAF\x95",
+ "\x92\xD8" => "\xEB\xAF\x96",
+ "\x92\xD9" => "\xEB\xAF\x97",
+ "\x92\xDA" => "\xEB\xAF\x98",
+ "\x92\xDB" => "\xEB\xAF\x99",
+ "\x92\xDC" => "\xEB\xAF\x9A",
+ "\x92\xDD" => "\xEB\xAF\x9B",
+ "\x92\xDE" => "\xEB\xAF\x9C",
+ "\x92\xDF" => "\xEB\xAF\x9D",
+ "\x92\xE0" => "\xEB\xAF\x9E",
+ "\x92\xE1" => "\xEB\xAF\x9F",
+ "\x92\xE2" => "\xEB\xAF\xA0",
+ "\x92\xE3" => "\xEB\xAF\xA1",
+ "\x92\xE4" => "\xEB\xAF\xA2",
+ "\x92\xE5" => "\xEB\xAF\xA3",
+ "\x92\xE6" => "\xEB\xAF\xA4",
+ "\x92\xE7" => "\xEB\xAF\xA5",
+ "\x92\xE8" => "\xEB\xAF\xA6",
+ "\x92\xE9" => "\xEB\xAF\xA7",
+ "\x92\xEA" => "\xEB\xAF\xA8",
+ "\x92\xEB" => "\xEB\xAF\xA9",
+ "\x92\xEC" => "\xEB\xAF\xAA",
+ "\x92\xED" => "\xEB\xAF\xAB",
+ "\x92\xEE" => "\xEB\xAF\xAC",
+ "\x92\xEF" => "\xEB\xAF\xAD",
+ "\x92\xF0" => "\xEB\xAF\xAE",
+ "\x92\xF1" => "\xEB\xAF\xAF",
+ "\x92\xF2" => "\xEB\xAF\xB0",
+ "\x92\xF3" => "\xEB\xAF\xB1",
+ "\x92\xF4" => "\xEB\xAF\xB2",
+ "\x92\xF5" => "\xEB\xAF\xB3",
+ "\x92\xF6" => "\xEB\xAF\xB4",
+ "\x92\xF7" => "\xEB\xAF\xB5",
+ "\x92\xF8" => "\xEB\xAF\xB6",
+ "\x92\xF9" => "\xEB\xAF\xB7",
+ "\x92\xFA" => "\xEB\xAF\xBA",
+ "\x92\xFB" => "\xEB\xAF\xBB",
+ "\x92\xFC" => "\xEB\xAF\xBD",
+ "\x92\xFD" => "\xEB\xAF\xBE",
+ "\x92\xFE" => "\xEB\xB0\x81",
+ "\x93\x41" => "\xEB\xB0\x83",
+ "\x93\x42" => "\xEB\xB0\x84",
+ "\x93\x43" => "\xEB\xB0\x85",
+ "\x93\x44" => "\xEB\xB0\x86",
+ "\x93\x45" => "\xEB\xB0\x87",
+ "\x93\x46" => "\xEB\xB0\x8A",
+ "\x93\x47" => "\xEB\xB0\x8E",
+ "\x93\x48" => "\xEB\xB0\x90",
+ "\x93\x49" => "\xEB\xB0\x92",
+ "\x93\x4A" => "\xEB\xB0\x93",
+ "\x93\x4B" => "\xEB\xB0\x99",
+ "\x93\x4C" => "\xEB\xB0\x9A",
+ "\x93\x4D" => "\xEB\xB0\xA0",
+ "\x93\x4E" => "\xEB\xB0\xA1",
+ "\x93\x4F" => "\xEB\xB0\xA2",
+ "\x93\x50" => "\xEB\xB0\xA3",
+ "\x93\x51" => "\xEB\xB0\xA6",
+ "\x93\x52" => "\xEB\xB0\xA8",
+ "\x93\x53" => "\xEB\xB0\xAA",
+ "\x93\x54" => "\xEB\xB0\xAB",
+ "\x93\x55" => "\xEB\xB0\xAC",
+ "\x93\x56" => "\xEB\xB0\xAE",
+ "\x93\x57" => "\xEB\xB0\xAF",
+ "\x93\x58" => "\xEB\xB0\xB2",
+ "\x93\x59" => "\xEB\xB0\xB3",
+ "\x93\x5A" => "\xEB\xB0\xB5",
+ "\x93\x61" => "\xEB\xB0\xB6",
+ "\x93\x62" => "\xEB\xB0\xB7",
+ "\x93\x63" => "\xEB\xB0\xB9",
+ "\x93\x64" => "\xEB\xB0\xBA",
+ "\x93\x65" => "\xEB\xB0\xBB",
+ "\x93\x66" => "\xEB\xB0\xBC",
+ "\x93\x67" => "\xEB\xB0\xBD",
+ "\x93\x68" => "\xEB\xB0\xBE",
+ "\x93\x69" => "\xEB\xB0\xBF",
+ "\x93\x6A" => "\xEB\xB1\x82",
+ "\x93\x6B" => "\xEB\xB1\x86",
+ "\x93\x6C" => "\xEB\xB1\x87",
+ "\x93\x6D" => "\xEB\xB1\x88",
+ "\x93\x6E" => "\xEB\xB1\x8A",
+ "\x93\x6F" => "\xEB\xB1\x8B",
+ "\x93\x70" => "\xEB\xB1\x8E",
+ "\x93\x71" => "\xEB\xB1\x8F",
+ "\x93\x72" => "\xEB\xB1\x91",
+ "\x93\x73" => "\xEB\xB1\x92",
+ "\x93\x74" => "\xEB\xB1\x93",
+ "\x93\x75" => "\xEB\xB1\x94",
+ "\x93\x76" => "\xEB\xB1\x95",
+ "\x93\x77" => "\xEB\xB1\x96",
+ "\x93\x78" => "\xEB\xB1\x97",
+ "\x93\x79" => "\xEB\xB1\x98",
+ "\x93\x7A" => "\xEB\xB1\x99",
+ "\x93\x81" => "\xEB\xB1\x9A",
+ "\x93\x82" => "\xEB\xB1\x9B",
+ "\x93\x83" => "\xEB\xB1\x9C",
+ "\x93\x84" => "\xEB\xB1\x9E",
+ "\x93\x85" => "\xEB\xB1\x9F",
+ "\x93\x86" => "\xEB\xB1\xA0",
+ "\x93\x87" => "\xEB\xB1\xA1",
+ "\x93\x88" => "\xEB\xB1\xA2",
+ "\x93\x89" => "\xEB\xB1\xA3",
+ "\x93\x8A" => "\xEB\xB1\xA4",
+ "\x93\x8B" => "\xEB\xB1\xA5",
+ "\x93\x8C" => "\xEB\xB1\xA6",
+ "\x93\x8D" => "\xEB\xB1\xA7",
+ "\x93\x8E" => "\xEB\xB1\xA8",
+ "\x93\x8F" => "\xEB\xB1\xA9",
+ "\x93\x90" => "\xEB\xB1\xAA",
+ "\x93\x91" => "\xEB\xB1\xAB",
+ "\x93\x92" => "\xEB\xB1\xAC",
+ "\x93\x93" => "\xEB\xB1\xAD",
+ "\x93\x94" => "\xEB\xB1\xAE",
+ "\x93\x95" => "\xEB\xB1\xAF",
+ "\x93\x96" => "\xEB\xB1\xB0",
+ "\x93\x97" => "\xEB\xB1\xB1",
+ "\x93\x98" => "\xEB\xB1\xB2",
+ "\x93\x99" => "\xEB\xB1\xB3",
+ "\x93\x9A" => "\xEB\xB1\xB4",
+ "\x93\x9B" => "\xEB\xB1\xB5",
+ "\x93\x9C" => "\xEB\xB1\xB6",
+ "\x93\x9D" => "\xEB\xB1\xB7",
+ "\x93\x9E" => "\xEB\xB1\xB8",
+ "\x93\x9F" => "\xEB\xB1\xB9",
+ "\x93\xA0" => "\xEB\xB1\xBA",
+ "\x93\xA1" => "\xEB\xB1\xBB",
+ "\x93\xA2" => "\xEB\xB1\xBC",
+ "\x93\xA3" => "\xEB\xB1\xBD",
+ "\x93\xA4" => "\xEB\xB1\xBE",
+ "\x93\xA5" => "\xEB\xB1\xBF",
+ "\x93\xA6" => "\xEB\xB2\x80",
+ "\x93\xA7" => "\xEB\xB2\x81",
+ "\x93\xA8" => "\xEB\xB2\x82",
+ "\x93\xA9" => "\xEB\xB2\x83",
+ "\x93\xAA" => "\xEB\xB2\x86",
+ "\x93\xAB" => "\xEB\xB2\x87",
+ "\x93\xAC" => "\xEB\xB2\x89",
+ "\x93\xAD" => "\xEB\xB2\x8A",
+ "\x93\xAE" => "\xEB\xB2\x8D",
+ "\x93\xAF" => "\xEB\xB2\x8F",
+ "\x93\xB0" => "\xEB\xB2\x90",
+ "\x93\xB1" => "\xEB\xB2\x91",
+ "\x93\xB2" => "\xEB\xB2\x92",
+ "\x93\xB3" => "\xEB\xB2\x93",
+ "\x93\xB4" => "\xEB\xB2\x96",
+ "\x93\xB5" => "\xEB\xB2\x98",
+ "\x93\xB6" => "\xEB\xB2\x9B",
+ "\x93\xB7" => "\xEB\xB2\x9C",
+ "\x93\xB8" => "\xEB\xB2\x9D",
+ "\x93\xB9" => "\xEB\xB2\x9E",
+ "\x93\xBA" => "\xEB\xB2\x9F",
+ "\x93\xBB" => "\xEB\xB2\xA2",
+ "\x93\xBC" => "\xEB\xB2\xA3",
+ "\x93\xBD" => "\xEB\xB2\xA5",
+ "\x93\xBE" => "\xEB\xB2\xA6",
+ "\x93\xBF" => "\xEB\xB2\xA9",
+ "\x93\xC0" => "\xEB\xB2\xAA",
+ "\x93\xC1" => "\xEB\xB2\xAB",
+ "\x93\xC2" => "\xEB\xB2\xAC",
+ "\x93\xC3" => "\xEB\xB2\xAD",
+ "\x93\xC4" => "\xEB\xB2\xAE",
+ "\x93\xC5" => "\xEB\xB2\xAF",
+ "\x93\xC6" => "\xEB\xB2\xB2",
+ "\x93\xC7" => "\xEB\xB2\xB6",
+ "\x93\xC8" => "\xEB\xB2\xB7",
+ "\x93\xC9" => "\xEB\xB2\xB8",
+ "\x93\xCA" => "\xEB\xB2\xB9",
+ "\x93\xCB" => "\xEB\xB2\xBA",
+ "\x93\xCC" => "\xEB\xB2\xBB",
+ "\x93\xCD" => "\xEB\xB2\xBE",
+ "\x93\xCE" => "\xEB\xB2\xBF",
+ "\x93\xCF" => "\xEB\xB3\x81",
+ "\x93\xD0" => "\xEB\xB3\x82",
+ "\x93\xD1" => "\xEB\xB3\x83",
+ "\x93\xD2" => "\xEB\xB3\x85",
+ "\x93\xD3" => "\xEB\xB3\x86",
+ "\x93\xD4" => "\xEB\xB3\x87",
+ "\x93\xD5" => "\xEB\xB3\x88",
+ "\x93\xD6" => "\xEB\xB3\x89",
+ "\x93\xD7" => "\xEB\xB3\x8A",
+ "\x93\xD8" => "\xEB\xB3\x8B",
+ "\x93\xD9" => "\xEB\xB3\x8C",
+ "\x93\xDA" => "\xEB\xB3\x8E",
+ "\x93\xDB" => "\xEB\xB3\x92",
+ "\x93\xDC" => "\xEB\xB3\x93",
+ "\x93\xDD" => "\xEB\xB3\x94",
+ "\x93\xDE" => "\xEB\xB3\x96",
+ "\x93\xDF" => "\xEB\xB3\x97",
+ "\x93\xE0" => "\xEB\xB3\x99",
+ "\x93\xE1" => "\xEB\xB3\x9A",
+ "\x93\xE2" => "\xEB\xB3\x9B",
+ "\x93\xE3" => "\xEB\xB3\x9D",
+ "\x93\xE4" => "\xEB\xB3\x9E",
+ "\x93\xE5" => "\xEB\xB3\x9F",
+ "\x93\xE6" => "\xEB\xB3\xA0",
+ "\x93\xE7" => "\xEB\xB3\xA1",
+ "\x93\xE8" => "\xEB\xB3\xA2",
+ "\x93\xE9" => "\xEB\xB3\xA3",
+ "\x93\xEA" => "\xEB\xB3\xA4",
+ "\x93\xEB" => "\xEB\xB3\xA5",
+ "\x93\xEC" => "\xEB\xB3\xA6",
+ "\x93\xED" => "\xEB\xB3\xA7",
+ "\x93\xEE" => "\xEB\xB3\xA8",
+ "\x93\xEF" => "\xEB\xB3\xA9",
+ "\x93\xF0" => "\xEB\xB3\xAA",
+ "\x93\xF1" => "\xEB\xB3\xAB",
+ "\x93\xF2" => "\xEB\xB3\xAC",
+ "\x93\xF3" => "\xEB\xB3\xAD",
+ "\x93\xF4" => "\xEB\xB3\xAE",
+ "\x93\xF5" => "\xEB\xB3\xAF",
+ "\x93\xF6" => "\xEB\xB3\xB0",
+ "\x93\xF7" => "\xEB\xB3\xB1",
+ "\x93\xF8" => "\xEB\xB3\xB2",
+ "\x93\xF9" => "\xEB\xB3\xB3",
+ "\x93\xFA" => "\xEB\xB3\xB7",
+ "\x93\xFB" => "\xEB\xB3\xB9",
+ "\x93\xFC" => "\xEB\xB3\xBA",
+ "\x93\xFD" => "\xEB\xB3\xBB",
+ "\x93\xFE" => "\xEB\xB3\xBD",
+ "\x94\x41" => "\xEB\xB3\xBE",
+ "\x94\x42" => "\xEB\xB3\xBF",
+ "\x94\x43" => "\xEB\xB4\x80",
+ "\x94\x44" => "\xEB\xB4\x81",
+ "\x94\x45" => "\xEB\xB4\x82",
+ "\x94\x46" => "\xEB\xB4\x83",
+ "\x94\x47" => "\xEB\xB4\x86",
+ "\x94\x48" => "\xEB\xB4\x88",
+ "\x94\x49" => "\xEB\xB4\x8A",
+ "\x94\x4A" => "\xEB\xB4\x8B",
+ "\x94\x4B" => "\xEB\xB4\x8C",
+ "\x94\x4C" => "\xEB\xB4\x8D",
+ "\x94\x4D" => "\xEB\xB4\x8E",
+ "\x94\x4E" => "\xEB\xB4\x8F",
+ "\x94\x4F" => "\xEB\xB4\x91",
+ "\x94\x50" => "\xEB\xB4\x92",
+ "\x94\x51" => "\xEB\xB4\x93",
+ "\x94\x52" => "\xEB\xB4\x95",
+ "\x94\x53" => "\xEB\xB4\x96",
+ "\x94\x54" => "\xEB\xB4\x97",
+ "\x94\x55" => "\xEB\xB4\x98",
+ "\x94\x56" => "\xEB\xB4\x99",
+ "\x94\x57" => "\xEB\xB4\x9A",
+ "\x94\x58" => "\xEB\xB4\x9B",
+ "\x94\x59" => "\xEB\xB4\x9C",
+ "\x94\x5A" => "\xEB\xB4\x9D",
+ "\x94\x61" => "\xEB\xB4\x9E",
+ "\x94\x62" => "\xEB\xB4\x9F",
+ "\x94\x63" => "\xEB\xB4\xA0",
+ "\x94\x64" => "\xEB\xB4\xA1",
+ "\x94\x65" => "\xEB\xB4\xA2",
+ "\x94\x66" => "\xEB\xB4\xA3",
+ "\x94\x67" => "\xEB\xB4\xA5",
+ "\x94\x68" => "\xEB\xB4\xA6",
+ "\x94\x69" => "\xEB\xB4\xA7",
+ "\x94\x6A" => "\xEB\xB4\xA8",
+ "\x94\x6B" => "\xEB\xB4\xA9",
+ "\x94\x6C" => "\xEB\xB4\xAA",
+ "\x94\x6D" => "\xEB\xB4\xAB",
+ "\x94\x6E" => "\xEB\xB4\xAD",
+ "\x94\x6F" => "\xEB\xB4\xAE",
+ "\x94\x70" => "\xEB\xB4\xAF",
+ "\x94\x71" => "\xEB\xB4\xB0",
+ "\x94\x72" => "\xEB\xB4\xB1",
+ "\x94\x73" => "\xEB\xB4\xB2",
+ "\x94\x74" => "\xEB\xB4\xB3",
+ "\x94\x75" => "\xEB\xB4\xB4",
+ "\x94\x76" => "\xEB\xB4\xB5",
+ "\x94\x77" => "\xEB\xB4\xB6",
+ "\x94\x78" => "\xEB\xB4\xB7",
+ "\x94\x79" => "\xEB\xB4\xB8",
+ "\x94\x7A" => "\xEB\xB4\xB9",
+ "\x94\x81" => "\xEB\xB4\xBA",
+ "\x94\x82" => "\xEB\xB4\xBB",
+ "\x94\x83" => "\xEB\xB4\xBC",
+ "\x94\x84" => "\xEB\xB4\xBD",
+ "\x94\x85" => "\xEB\xB4\xBE",
+ "\x94\x86" => "\xEB\xB4\xBF",
+ "\x94\x87" => "\xEB\xB5\x81",
+ "\x94\x88" => "\xEB\xB5\x82",
+ "\x94\x89" => "\xEB\xB5\x83",
+ "\x94\x8A" => "\xEB\xB5\x84",
+ "\x94\x8B" => "\xEB\xB5\x85",
+ "\x94\x8C" => "\xEB\xB5\x86",
+ "\x94\x8D" => "\xEB\xB5\x87",
+ "\x94\x8E" => "\xEB\xB5\x8A",
+ "\x94\x8F" => "\xEB\xB5\x8B",
+ "\x94\x90" => "\xEB\xB5\x8D",
+ "\x94\x91" => "\xEB\xB5\x8E",
+ "\x94\x92" => "\xEB\xB5\x8F",
+ "\x94\x93" => "\xEB\xB5\x91",
+ "\x94\x94" => "\xEB\xB5\x92",
+ "\x94\x95" => "\xEB\xB5\x93",
+ "\x94\x96" => "\xEB\xB5\x94",
+ "\x94\x97" => "\xEB\xB5\x95",
+ "\x94\x98" => "\xEB\xB5\x96",
+ "\x94\x99" => "\xEB\xB5\x97",
+ "\x94\x9A" => "\xEB\xB5\x9A",
+ "\x94\x9B" => "\xEB\xB5\x9B",
+ "\x94\x9C" => "\xEB\xB5\x9C",
+ "\x94\x9D" => "\xEB\xB5\x9D",
+ "\x94\x9E" => "\xEB\xB5\x9E",
+ "\x94\x9F" => "\xEB\xB5\x9F",
+ "\x94\xA0" => "\xEB\xB5\xA0",
+ "\x94\xA1" => "\xEB\xB5\xA1",
+ "\x94\xA2" => "\xEB\xB5\xA2",
+ "\x94\xA3" => "\xEB\xB5\xA3",
+ "\x94\xA4" => "\xEB\xB5\xA5",
+ "\x94\xA5" => "\xEB\xB5\xA6",
+ "\x94\xA6" => "\xEB\xB5\xA7",
+ "\x94\xA7" => "\xEB\xB5\xA9",
+ "\x94\xA8" => "\xEB\xB5\xAA",
+ "\x94\xA9" => "\xEB\xB5\xAB",
+ "\x94\xAA" => "\xEB\xB5\xAC",
+ "\x94\xAB" => "\xEB\xB5\xAD",
+ "\x94\xAC" => "\xEB\xB5\xAE",
+ "\x94\xAD" => "\xEB\xB5\xAF",
+ "\x94\xAE" => "\xEB\xB5\xB0",
+ "\x94\xAF" => "\xEB\xB5\xB1",
+ "\x94\xB0" => "\xEB\xB5\xB2",
+ "\x94\xB1" => "\xEB\xB5\xB3",
+ "\x94\xB2" => "\xEB\xB5\xB4",
+ "\x94\xB3" => "\xEB\xB5\xB5",
+ "\x94\xB4" => "\xEB\xB5\xB6",
+ "\x94\xB5" => "\xEB\xB5\xB7",
+ "\x94\xB6" => "\xEB\xB5\xB8",
+ "\x94\xB7" => "\xEB\xB5\xB9",
+ "\x94\xB8" => "\xEB\xB5\xBA",
+ "\x94\xB9" => "\xEB\xB5\xBB",
+ "\x94\xBA" => "\xEB\xB5\xBC",
+ "\x94\xBB" => "\xEB\xB5\xBD",
+ "\x94\xBC" => "\xEB\xB5\xBE",
+ "\x94\xBD" => "\xEB\xB5\xBF",
+ "\x94\xBE" => "\xEB\xB6\x82",
+ "\x94\xBF" => "\xEB\xB6\x83",
+ "\x94\xC0" => "\xEB\xB6\x85",
+ "\x94\xC1" => "\xEB\xB6\x86",
+ "\x94\xC2" => "\xEB\xB6\x8B",
+ "\x94\xC3" => "\xEB\xB6\x8C",
+ "\x94\xC4" => "\xEB\xB6\x8D",
+ "\x94\xC5" => "\xEB\xB6\x8E",
+ "\x94\xC6" => "\xEB\xB6\x8F",
+ "\x94\xC7" => "\xEB\xB6\x92",
+ "\x94\xC8" => "\xEB\xB6\x94",
+ "\x94\xC9" => "\xEB\xB6\x96",
+ "\x94\xCA" => "\xEB\xB6\x97",
+ "\x94\xCB" => "\xEB\xB6\x98",
+ "\x94\xCC" => "\xEB\xB6\x9B",
+ "\x94\xCD" => "\xEB\xB6\x9D",
+ "\x94\xCE" => "\xEB\xB6\x9E",
+ "\x94\xCF" => "\xEB\xB6\x9F",
+ "\x94\xD0" => "\xEB\xB6\xA0",
+ "\x94\xD1" => "\xEB\xB6\xA1",
+ "\x94\xD2" => "\xEB\xB6\xA2",
+ "\x94\xD3" => "\xEB\xB6\xA3",
+ "\x94\xD4" => "\xEB\xB6\xA5",
+ "\x94\xD5" => "\xEB\xB6\xA6",
+ "\x94\xD6" => "\xEB\xB6\xA7",
+ "\x94\xD7" => "\xEB\xB6\xA8",
+ "\x94\xD8" => "\xEB\xB6\xA9",
+ "\x94\xD9" => "\xEB\xB6\xAA",
+ "\x94\xDA" => "\xEB\xB6\xAB",
+ "\x94\xDB" => "\xEB\xB6\xAC",
+ "\x94\xDC" => "\xEB\xB6\xAD",
+ "\x94\xDD" => "\xEB\xB6\xAE",
+ "\x94\xDE" => "\xEB\xB6\xAF",
+ "\x94\xDF" => "\xEB\xB6\xB1",
+ "\x94\xE0" => "\xEB\xB6\xB2",
+ "\x94\xE1" => "\xEB\xB6\xB3",
+ "\x94\xE2" => "\xEB\xB6\xB4",
+ "\x94\xE3" => "\xEB\xB6\xB5",
+ "\x94\xE4" => "\xEB\xB6\xB6",
+ "\x94\xE5" => "\xEB\xB6\xB7",
+ "\x94\xE6" => "\xEB\xB6\xB9",
+ "\x94\xE7" => "\xEB\xB6\xBA",
+ "\x94\xE8" => "\xEB\xB6\xBB",
+ "\x94\xE9" => "\xEB\xB6\xBC",
+ "\x94\xEA" => "\xEB\xB6\xBD",
+ "\x94\xEB" => "\xEB\xB6\xBE",
+ "\x94\xEC" => "\xEB\xB6\xBF",
+ "\x94\xED" => "\xEB\xB7\x80",
+ "\x94\xEE" => "\xEB\xB7\x81",
+ "\x94\xEF" => "\xEB\xB7\x82",
+ "\x94\xF0" => "\xEB\xB7\x83",
+ "\x94\xF1" => "\xEB\xB7\x84",
+ "\x94\xF2" => "\xEB\xB7\x85",
+ "\x94\xF3" => "\xEB\xB7\x86",
+ "\x94\xF4" => "\xEB\xB7\x87",
+ "\x94\xF5" => "\xEB\xB7\x88",
+ "\x94\xF6" => "\xEB\xB7\x89",
+ "\x94\xF7" => "\xEB\xB7\x8A",
+ "\x94\xF8" => "\xEB\xB7\x8B",
+ "\x94\xF9" => "\xEB\xB7\x8C",
+ "\x94\xFA" => "\xEB\xB7\x8D",
+ "\x94\xFB" => "\xEB\xB7\x8E",
+ "\x94\xFC" => "\xEB\xB7\x8F",
+ "\x94\xFD" => "\xEB\xB7\x90",
+ "\x94\xFE" => "\xEB\xB7\x91",
+ "\x95\x41" => "\xEB\xB7\x92",
+ "\x95\x42" => "\xEB\xB7\x93",
+ "\x95\x43" => "\xEB\xB7\x96",
+ "\x95\x44" => "\xEB\xB7\x97",
+ "\x95\x45" => "\xEB\xB7\x99",
+ "\x95\x46" => "\xEB\xB7\x9A",
+ "\x95\x47" => "\xEB\xB7\x9B",
+ "\x95\x48" => "\xEB\xB7\x9D",
+ "\x95\x49" => "\xEB\xB7\x9E",
+ "\x95\x4A" => "\xEB\xB7\x9F",
+ "\x95\x4B" => "\xEB\xB7\xA0",
+ "\x95\x4C" => "\xEB\xB7\xA1",
+ "\x95\x4D" => "\xEB\xB7\xA2",
+ "\x95\x4E" => "\xEB\xB7\xA3",
+ "\x95\x4F" => "\xEB\xB7\xA4",
+ "\x95\x50" => "\xEB\xB7\xA5",
+ "\x95\x51" => "\xEB\xB7\xA6",
+ "\x95\x52" => "\xEB\xB7\xA7",
+ "\x95\x53" => "\xEB\xB7\xA8",
+ "\x95\x54" => "\xEB\xB7\xAA",
+ "\x95\x55" => "\xEB\xB7\xAB",
+ "\x95\x56" => "\xEB\xB7\xAC",
+ "\x95\x57" => "\xEB\xB7\xAD",
+ "\x95\x58" => "\xEB\xB7\xAE",
+ "\x95\x59" => "\xEB\xB7\xAF",
+ "\x95\x5A" => "\xEB\xB7\xB1",
+ "\x95\x61" => "\xEB\xB7\xB2",
+ "\x95\x62" => "\xEB\xB7\xB3",
+ "\x95\x63" => "\xEB\xB7\xB5",
+ "\x95\x64" => "\xEB\xB7\xB6",
+ "\x95\x65" => "\xEB\xB7\xB7",
+ "\x95\x66" => "\xEB\xB7\xB9",
+ "\x95\x67" => "\xEB\xB7\xBA",
+ "\x95\x68" => "\xEB\xB7\xBB",
+ "\x95\x69" => "\xEB\xB7\xBC",
+ "\x95\x6A" => "\xEB\xB7\xBD",
+ "\x95\x6B" => "\xEB\xB7\xBE",
+ "\x95\x6C" => "\xEB\xB7\xBF",
+ "\x95\x6D" => "\xEB\xB8\x81",
+ "\x95\x6E" => "\xEB\xB8\x82",
+ "\x95\x6F" => "\xEB\xB8\x84",
+ "\x95\x70" => "\xEB\xB8\x86",
+ "\x95\x71" => "\xEB\xB8\x87",
+ "\x95\x72" => "\xEB\xB8\x88",
+ "\x95\x73" => "\xEB\xB8\x89",
+ "\x95\x74" => "\xEB\xB8\x8A",
+ "\x95\x75" => "\xEB\xB8\x8B",
+ "\x95\x76" => "\xEB\xB8\x8E",
+ "\x95\x77" => "\xEB\xB8\x8F",
+ "\x95\x78" => "\xEB\xB8\x91",
+ "\x95\x79" => "\xEB\xB8\x92",
+ "\x95\x7A" => "\xEB\xB8\x93",
+ "\x95\x81" => "\xEB\xB8\x95",
+ "\x95\x82" => "\xEB\xB8\x96",
+ "\x95\x83" => "\xEB\xB8\x97",
+ "\x95\x84" => "\xEB\xB8\x98",
+ "\x95\x85" => "\xEB\xB8\x99",
+ "\x95\x86" => "\xEB\xB8\x9A",
+ "\x95\x87" => "\xEB\xB8\x9B",
+ "\x95\x88" => "\xEB\xB8\x9E",
+ "\x95\x89" => "\xEB\xB8\xA0",
+ "\x95\x8A" => "\xEB\xB8\xA1",
+ "\x95\x8B" => "\xEB\xB8\xA2",
+ "\x95\x8C" => "\xEB\xB8\xA3",
+ "\x95\x8D" => "\xEB\xB8\xA4",
+ "\x95\x8E" => "\xEB\xB8\xA5",
+ "\x95\x8F" => "\xEB\xB8\xA6",
+ "\x95\x90" => "\xEB\xB8\xA7",
+ "\x95\x91" => "\xEB\xB8\xA8",
+ "\x95\x92" => "\xEB\xB8\xA9",
+ "\x95\x93" => "\xEB\xB8\xAA",
+ "\x95\x94" => "\xEB\xB8\xAB",
+ "\x95\x95" => "\xEB\xB8\xAC",
+ "\x95\x96" => "\xEB\xB8\xAD",
+ "\x95\x97" => "\xEB\xB8\xAE",
+ "\x95\x98" => "\xEB\xB8\xAF",
+ "\x95\x99" => "\xEB\xB8\xB0",
+ "\x95\x9A" => "\xEB\xB8\xB1",
+ "\x95\x9B" => "\xEB\xB8\xB2",
+ "\x95\x9C" => "\xEB\xB8\xB3",
+ "\x95\x9D" => "\xEB\xB8\xB4",
+ "\x95\x9E" => "\xEB\xB8\xB5",
+ "\x95\x9F" => "\xEB\xB8\xB6",
+ "\x95\xA0" => "\xEB\xB8\xB7",
+ "\x95\xA1" => "\xEB\xB8\xB8",
+ "\x95\xA2" => "\xEB\xB8\xB9",
+ "\x95\xA3" => "\xEB\xB8\xBA",
+ "\x95\xA4" => "\xEB\xB8\xBB",
+ "\x95\xA5" => "\xEB\xB8\xBC",
+ "\x95\xA6" => "\xEB\xB8\xBD",
+ "\x95\xA7" => "\xEB\xB8\xBE",
+ "\x95\xA8" => "\xEB\xB8\xBF",
+ "\x95\xA9" => "\xEB\xB9\x80",
+ "\x95\xAA" => "\xEB\xB9\x81",
+ "\x95\xAB" => "\xEB\xB9\x82",
+ "\x95\xAC" => "\xEB\xB9\x83",
+ "\x95\xAD" => "\xEB\xB9\x86",
+ "\x95\xAE" => "\xEB\xB9\x87",
+ "\x95\xAF" => "\xEB\xB9\x89",
+ "\x95\xB0" => "\xEB\xB9\x8A",
+ "\x95\xB1" => "\xEB\xB9\x8B",
+ "\x95\xB2" => "\xEB\xB9\x8D",
+ "\x95\xB3" => "\xEB\xB9\x8F",
+ "\x95\xB4" => "\xEB\xB9\x90",
+ "\x95\xB5" => "\xEB\xB9\x91",
+ "\x95\xB6" => "\xEB\xB9\x92",
+ "\x95\xB7" => "\xEB\xB9\x93",
+ "\x95\xB8" => "\xEB\xB9\x96",
+ "\x95\xB9" => "\xEB\xB9\x98",
+ "\x95\xBA" => "\xEB\xB9\x9C",
+ "\x95\xBB" => "\xEB\xB9\x9D",
+ "\x95\xBC" => "\xEB\xB9\x9E",
+ "\x95\xBD" => "\xEB\xB9\x9F",
+ "\x95\xBE" => "\xEB\xB9\xA2",
+ "\x95\xBF" => "\xEB\xB9\xA3",
+ "\x95\xC0" => "\xEB\xB9\xA5",
+ "\x95\xC1" => "\xEB\xB9\xA6",
+ "\x95\xC2" => "\xEB\xB9\xA7",
+ "\x95\xC3" => "\xEB\xB9\xA9",
+ "\x95\xC4" => "\xEB\xB9\xAB",
+ "\x95\xC5" => "\xEB\xB9\xAC",
+ "\x95\xC6" => "\xEB\xB9\xAD",
+ "\x95\xC7" => "\xEB\xB9\xAE",
+ "\x95\xC8" => "\xEB\xB9\xAF",
+ "\x95\xC9" => "\xEB\xB9\xB2",
+ "\x95\xCA" => "\xEB\xB9\xB6",
+ "\x95\xCB" => "\xEB\xB9\xB7",
+ "\x95\xCC" => "\xEB\xB9\xB8",
+ "\x95\xCD" => "\xEB\xB9\xB9",
+ "\x95\xCE" => "\xEB\xB9\xBA",
+ "\x95\xCF" => "\xEB\xB9\xBE",
+ "\x95\xD0" => "\xEB\xB9\xBF",
+ "\x95\xD1" => "\xEB\xBA\x81",
+ "\x95\xD2" => "\xEB\xBA\x82",
+ "\x95\xD3" => "\xEB\xBA\x83",
+ "\x95\xD4" => "\xEB\xBA\x85",
+ "\x95\xD5" => "\xEB\xBA\x86",
+ "\x95\xD6" => "\xEB\xBA\x87",
+ "\x95\xD7" => "\xEB\xBA\x88",
+ "\x95\xD8" => "\xEB\xBA\x89",
+ "\x95\xD9" => "\xEB\xBA\x8A",
+ "\x95\xDA" => "\xEB\xBA\x8B",
+ "\x95\xDB" => "\xEB\xBA\x8E",
+ "\x95\xDC" => "\xEB\xBA\x92",
+ "\x95\xDD" => "\xEB\xBA\x93",
+ "\x95\xDE" => "\xEB\xBA\x94",
+ "\x95\xDF" => "\xEB\xBA\x95",
+ "\x95\xE0" => "\xEB\xBA\x96",
+ "\x95\xE1" => "\xEB\xBA\x97",
+ "\x95\xE2" => "\xEB\xBA\x9A",
+ "\x95\xE3" => "\xEB\xBA\x9B",
+ "\x95\xE4" => "\xEB\xBA\x9C",
+ "\x95\xE5" => "\xEB\xBA\x9D",
+ "\x95\xE6" => "\xEB\xBA\x9E",
+ "\x95\xE7" => "\xEB\xBA\x9F",
+ "\x95\xE8" => "\xEB\xBA\xA0",
+ "\x95\xE9" => "\xEB\xBA\xA1",
+ "\x95\xEA" => "\xEB\xBA\xA2",
+ "\x95\xEB" => "\xEB\xBA\xA3",
+ "\x95\xEC" => "\xEB\xBA\xA4",
+ "\x95\xED" => "\xEB\xBA\xA5",
+ "\x95\xEE" => "\xEB\xBA\xA6",
+ "\x95\xEF" => "\xEB\xBA\xA7",
+ "\x95\xF0" => "\xEB\xBA\xA9",
+ "\x95\xF1" => "\xEB\xBA\xAA",
+ "\x95\xF2" => "\xEB\xBA\xAB",
+ "\x95\xF3" => "\xEB\xBA\xAC",
+ "\x95\xF4" => "\xEB\xBA\xAD",
+ "\x95\xF5" => "\xEB\xBA\xAE",
+ "\x95\xF6" => "\xEB\xBA\xAF",
+ "\x95\xF7" => "\xEB\xBA\xB0",
+ "\x95\xF8" => "\xEB\xBA\xB1",
+ "\x95\xF9" => "\xEB\xBA\xB2",
+ "\x95\xFA" => "\xEB\xBA\xB3",
+ "\x95\xFB" => "\xEB\xBA\xB4",
+ "\x95\xFC" => "\xEB\xBA\xB5",
+ "\x95\xFD" => "\xEB\xBA\xB6",
+ "\x95\xFE" => "\xEB\xBA\xB7",
+ "\x96\x41" => "\xEB\xBA\xB8",
+ "\x96\x42" => "\xEB\xBA\xB9",
+ "\x96\x43" => "\xEB\xBA\xBA",
+ "\x96\x44" => "\xEB\xBA\xBB",
+ "\x96\x45" => "\xEB\xBA\xBC",
+ "\x96\x46" => "\xEB\xBA\xBD",
+ "\x96\x47" => "\xEB\xBA\xBE",
+ "\x96\x48" => "\xEB\xBA\xBF",
+ "\x96\x49" => "\xEB\xBB\x80",
+ "\x96\x4A" => "\xEB\xBB\x81",
+ "\x96\x4B" => "\xEB\xBB\x82",
+ "\x96\x4C" => "\xEB\xBB\x83",
+ "\x96\x4D" => "\xEB\xBB\x84",
+ "\x96\x4E" => "\xEB\xBB\x85",
+ "\x96\x4F" => "\xEB\xBB\x86",
+ "\x96\x50" => "\xEB\xBB\x87",
+ "\x96\x51" => "\xEB\xBB\x88",
+ "\x96\x52" => "\xEB\xBB\x89",
+ "\x96\x53" => "\xEB\xBB\x8A",
+ "\x96\x54" => "\xEB\xBB\x8B",
+ "\x96\x55" => "\xEB\xBB\x8C",
+ "\x96\x56" => "\xEB\xBB\x8D",
+ "\x96\x57" => "\xEB\xBB\x8E",
+ "\x96\x58" => "\xEB\xBB\x8F",
+ "\x96\x59" => "\xEB\xBB\x92",
+ "\x96\x5A" => "\xEB\xBB\x93",
+ "\x96\x61" => "\xEB\xBB\x95",
+ "\x96\x62" => "\xEB\xBB\x96",
+ "\x96\x63" => "\xEB\xBB\x99",
+ "\x96\x64" => "\xEB\xBB\x9A",
+ "\x96\x65" => "\xEB\xBB\x9B",
+ "\x96\x66" => "\xEB\xBB\x9C",
+ "\x96\x67" => "\xEB\xBB\x9D",
+ "\x96\x68" => "\xEB\xBB\x9E",
+ "\x96\x69" => "\xEB\xBB\x9F",
+ "\x96\x6A" => "\xEB\xBB\xA1",
+ "\x96\x6B" => "\xEB\xBB\xA2",
+ "\x96\x6C" => "\xEB\xBB\xA6",
+ "\x96\x6D" => "\xEB\xBB\xA7",
+ "\x96\x6E" => "\xEB\xBB\xA8",
+ "\x96\x6F" => "\xEB\xBB\xA9",
+ "\x96\x70" => "\xEB\xBB\xAA",
+ "\x96\x71" => "\xEB\xBB\xAB",
+ "\x96\x72" => "\xEB\xBB\xAD",
+ "\x96\x73" => "\xEB\xBB\xAE",
+ "\x96\x74" => "\xEB\xBB\xAF",
+ "\x96\x75" => "\xEB\xBB\xB0",
+ "\x96\x76" => "\xEB\xBB\xB1",
+ "\x96\x77" => "\xEB\xBB\xB2",
+ "\x96\x78" => "\xEB\xBB\xB3",
+ "\x96\x79" => "\xEB\xBB\xB4",
+ "\x96\x7A" => "\xEB\xBB\xB5",
+ "\x96\x81" => "\xEB\xBB\xB6",
+ "\x96\x82" => "\xEB\xBB\xB7",
+ "\x96\x83" => "\xEB\xBB\xB8",
+ "\x96\x84" => "\xEB\xBB\xB9",
+ "\x96\x85" => "\xEB\xBB\xBA",
+ "\x96\x86" => "\xEB\xBB\xBB",
+ "\x96\x87" => "\xEB\xBB\xBC",
+ "\x96\x88" => "\xEB\xBB\xBD",
+ "\x96\x89" => "\xEB\xBB\xBE",
+ "\x96\x8A" => "\xEB\xBB\xBF",
+ "\x96\x8B" => "\xEB\xBC\x80",
+ "\x96\x8C" => "\xEB\xBC\x82",
+ "\x96\x8D" => "\xEB\xBC\x83",
+ "\x96\x8E" => "\xEB\xBC\x84",
+ "\x96\x8F" => "\xEB\xBC\x85",
+ "\x96\x90" => "\xEB\xBC\x86",
+ "\x96\x91" => "\xEB\xBC\x87",
+ "\x96\x92" => "\xEB\xBC\x8A",
+ "\x96\x93" => "\xEB\xBC\x8B",
+ "\x96\x94" => "\xEB\xBC\x8C",
+ "\x96\x95" => "\xEB\xBC\x8D",
+ "\x96\x96" => "\xEB\xBC\x8E",
+ "\x96\x97" => "\xEB\xBC\x8F",
+ "\x96\x98" => "\xEB\xBC\x90",
+ "\x96\x99" => "\xEB\xBC\x91",
+ "\x96\x9A" => "\xEB\xBC\x92",
+ "\x96\x9B" => "\xEB\xBC\x93",
+ "\x96\x9C" => "\xEB\xBC\x94",
+ "\x96\x9D" => "\xEB\xBC\x95",
+ "\x96\x9E" => "\xEB\xBC\x96",
+ "\x96\x9F" => "\xEB\xBC\x97",
+ "\x96\xA0" => "\xEB\xBC\x9A",
+ "\x96\xA1" => "\xEB\xBC\x9E",
+ "\x96\xA2" => "\xEB\xBC\x9F",
+ "\x96\xA3" => "\xEB\xBC\xA0",
+ "\x96\xA4" => "\xEB\xBC\xA1",
+ "\x96\xA5" => "\xEB\xBC\xA2",
+ "\x96\xA6" => "\xEB\xBC\xA3",
+ "\x96\xA7" => "\xEB\xBC\xA4",
+ "\x96\xA8" => "\xEB\xBC\xA5",
+ "\x96\xA9" => "\xEB\xBC\xA6",
+ "\x96\xAA" => "\xEB\xBC\xA7",
+ "\x96\xAB" => "\xEB\xBC\xA8",
+ "\x96\xAC" => "\xEB\xBC\xA9",
+ "\x96\xAD" => "\xEB\xBC\xAA",
+ "\x96\xAE" => "\xEB\xBC\xAB",
+ "\x96\xAF" => "\xEB\xBC\xAC",
+ "\x96\xB0" => "\xEB\xBC\xAD",
+ "\x96\xB1" => "\xEB\xBC\xAE",
+ "\x96\xB2" => "\xEB\xBC\xAF",
+ "\x96\xB3" => "\xEB\xBC\xB0",
+ "\x96\xB4" => "\xEB\xBC\xB1",
+ "\x96\xB5" => "\xEB\xBC\xB2",
+ "\x96\xB6" => "\xEB\xBC\xB3",
+ "\x96\xB7" => "\xEB\xBC\xB4",
+ "\x96\xB8" => "\xEB\xBC\xB5",
+ "\x96\xB9" => "\xEB\xBC\xB6",
+ "\x96\xBA" => "\xEB\xBC\xB7",
+ "\x96\xBB" => "\xEB\xBC\xB8",
+ "\x96\xBC" => "\xEB\xBC\xB9",
+ "\x96\xBD" => "\xEB\xBC\xBA",
+ "\x96\xBE" => "\xEB\xBC\xBB",
+ "\x96\xBF" => "\xEB\xBC\xBC",
+ "\x96\xC0" => "\xEB\xBC\xBD",
+ "\x96\xC1" => "\xEB\xBC\xBE",
+ "\x96\xC2" => "\xEB\xBC\xBF",
+ "\x96\xC3" => "\xEB\xBD\x82",
+ "\x96\xC4" => "\xEB\xBD\x83",
+ "\x96\xC5" => "\xEB\xBD\x85",
+ "\x96\xC6" => "\xEB\xBD\x86",
+ "\x96\xC7" => "\xEB\xBD\x87",
+ "\x96\xC8" => "\xEB\xBD\x89",
+ "\x96\xC9" => "\xEB\xBD\x8A",
+ "\x96\xCA" => "\xEB\xBD\x8B",
+ "\x96\xCB" => "\xEB\xBD\x8C",
+ "\x96\xCC" => "\xEB\xBD\x8D",
+ "\x96\xCD" => "\xEB\xBD\x8E",
+ "\x96\xCE" => "\xEB\xBD\x8F",
+ "\x96\xCF" => "\xEB\xBD\x92",
+ "\x96\xD0" => "\xEB\xBD\x93",
+ "\x96\xD1" => "\xEB\xBD\x94",
+ "\x96\xD2" => "\xEB\xBD\x96",
+ "\x96\xD3" => "\xEB\xBD\x97",
+ "\x96\xD4" => "\xEB\xBD\x98",
+ "\x96\xD5" => "\xEB\xBD\x99",
+ "\x96\xD6" => "\xEB\xBD\x9A",
+ "\x96\xD7" => "\xEB\xBD\x9B",
+ "\x96\xD8" => "\xEB\xBD\x9C",
+ "\x96\xD9" => "\xEB\xBD\x9D",
+ "\x96\xDA" => "\xEB\xBD\x9E",
+ "\x96\xDB" => "\xEB\xBD\x9F",
+ "\x96\xDC" => "\xEB\xBD\xA0",
+ "\x96\xDD" => "\xEB\xBD\xA1",
+ "\x96\xDE" => "\xEB\xBD\xA2",
+ "\x96\xDF" => "\xEB\xBD\xA3",
+ "\x96\xE0" => "\xEB\xBD\xA4",
+ "\x96\xE1" => "\xEB\xBD\xA5",
+ "\x96\xE2" => "\xEB\xBD\xA6",
+ "\x96\xE3" => "\xEB\xBD\xA7",
+ "\x96\xE4" => "\xEB\xBD\xA8",
+ "\x96\xE5" => "\xEB\xBD\xA9",
+ "\x96\xE6" => "\xEB\xBD\xAA",
+ "\x96\xE7" => "\xEB\xBD\xAB",
+ "\x96\xE8" => "\xEB\xBD\xAC",
+ "\x96\xE9" => "\xEB\xBD\xAD",
+ "\x96\xEA" => "\xEB\xBD\xAE",
+ "\x96\xEB" => "\xEB\xBD\xAF",
+ "\x96\xEC" => "\xEB\xBD\xB0",
+ "\x96\xED" => "\xEB\xBD\xB1",
+ "\x96\xEE" => "\xEB\xBD\xB2",
+ "\x96\xEF" => "\xEB\xBD\xB3",
+ "\x96\xF0" => "\xEB\xBD\xB4",
+ "\x96\xF1" => "\xEB\xBD\xB5",
+ "\x96\xF2" => "\xEB\xBD\xB6",
+ "\x96\xF3" => "\xEB\xBD\xB7",
+ "\x96\xF4" => "\xEB\xBD\xB8",
+ "\x96\xF5" => "\xEB\xBD\xB9",
+ "\x96\xF6" => "\xEB\xBD\xBA",
+ "\x96\xF7" => "\xEB\xBD\xBB",
+ "\x96\xF8" => "\xEB\xBD\xBC",
+ "\x96\xF9" => "\xEB\xBD\xBD",
+ "\x96\xFA" => "\xEB\xBD\xBE",
+ "\x96\xFB" => "\xEB\xBD\xBF",
+ "\x96\xFC" => "\xEB\xBE\x80",
+ "\x96\xFD" => "\xEB\xBE\x81",
+ "\x96\xFE" => "\xEB\xBE\x82",
+ "\x97\x41" => "\xEB\xBE\x83",
+ "\x97\x42" => "\xEB\xBE\x84",
+ "\x97\x43" => "\xEB\xBE\x85",
+ "\x97\x44" => "\xEB\xBE\x86",
+ "\x97\x45" => "\xEB\xBE\x87",
+ "\x97\x46" => "\xEB\xBE\x88",
+ "\x97\x47" => "\xEB\xBE\x89",
+ "\x97\x48" => "\xEB\xBE\x8A",
+ "\x97\x49" => "\xEB\xBE\x8B",
+ "\x97\x4A" => "\xEB\xBE\x8C",
+ "\x97\x4B" => "\xEB\xBE\x8D",
+ "\x97\x4C" => "\xEB\xBE\x8E",
+ "\x97\x4D" => "\xEB\xBE\x8F",
+ "\x97\x4E" => "\xEB\xBE\x90",
+ "\x97\x4F" => "\xEB\xBE\x91",
+ "\x97\x50" => "\xEB\xBE\x92",
+ "\x97\x51" => "\xEB\xBE\x93",
+ "\x97\x52" => "\xEB\xBE\x95",
+ "\x97\x53" => "\xEB\xBE\x96",
+ "\x97\x54" => "\xEB\xBE\x97",
+ "\x97\x55" => "\xEB\xBE\x98",
+ "\x97\x56" => "\xEB\xBE\x99",
+ "\x97\x57" => "\xEB\xBE\x9A",
+ "\x97\x58" => "\xEB\xBE\x9B",
+ "\x97\x59" => "\xEB\xBE\x9C",
+ "\x97\x5A" => "\xEB\xBE\x9D",
+ "\x97\x61" => "\xEB\xBE\x9E",
+ "\x97\x62" => "\xEB\xBE\x9F",
+ "\x97\x63" => "\xEB\xBE\xA0",
+ "\x97\x64" => "\xEB\xBE\xA1",
+ "\x97\x65" => "\xEB\xBE\xA2",
+ "\x97\x66" => "\xEB\xBE\xA3",
+ "\x97\x67" => "\xEB\xBE\xA4",
+ "\x97\x68" => "\xEB\xBE\xA5",
+ "\x97\x69" => "\xEB\xBE\xA6",
+ "\x97\x6A" => "\xEB\xBE\xA7",
+ "\x97\x6B" => "\xEB\xBE\xA8",
+ "\x97\x6C" => "\xEB\xBE\xA9",
+ "\x97\x6D" => "\xEB\xBE\xAA",
+ "\x97\x6E" => "\xEB\xBE\xAB",
+ "\x97\x6F" => "\xEB\xBE\xAC",
+ "\x97\x70" => "\xEB\xBE\xAD",
+ "\x97\x71" => "\xEB\xBE\xAE",
+ "\x97\x72" => "\xEB\xBE\xAF",
+ "\x97\x73" => "\xEB\xBE\xB1",
+ "\x97\x74" => "\xEB\xBE\xB2",
+ "\x97\x75" => "\xEB\xBE\xB3",
+ "\x97\x76" => "\xEB\xBE\xB4",
+ "\x97\x77" => "\xEB\xBE\xB5",
+ "\x97\x78" => "\xEB\xBE\xB6",
+ "\x97\x79" => "\xEB\xBE\xB7",
+ "\x97\x7A" => "\xEB\xBE\xB8",
+ "\x97\x81" => "\xEB\xBE\xB9",
+ "\x97\x82" => "\xEB\xBE\xBA",
+ "\x97\x83" => "\xEB\xBE\xBB",
+ "\x97\x84" => "\xEB\xBE\xBC",
+ "\x97\x85" => "\xEB\xBE\xBD",
+ "\x97\x86" => "\xEB\xBE\xBE",
+ "\x97\x87" => "\xEB\xBE\xBF",
+ "\x97\x88" => "\xEB\xBF\x80",
+ "\x97\x89" => "\xEB\xBF\x81",
+ "\x97\x8A" => "\xEB\xBF\x82",
+ "\x97\x8B" => "\xEB\xBF\x83",
+ "\x97\x8C" => "\xEB\xBF\x84",
+ "\x97\x8D" => "\xEB\xBF\x86",
+ "\x97\x8E" => "\xEB\xBF\x87",
+ "\x97\x8F" => "\xEB\xBF\x88",
+ "\x97\x90" => "\xEB\xBF\x89",
+ "\x97\x91" => "\xEB\xBF\x8A",
+ "\x97\x92" => "\xEB\xBF\x8B",
+ "\x97\x93" => "\xEB\xBF\x8E",
+ "\x97\x94" => "\xEB\xBF\x8F",
+ "\x97\x95" => "\xEB\xBF\x91",
+ "\x97\x96" => "\xEB\xBF\x92",
+ "\x97\x97" => "\xEB\xBF\x93",
+ "\x97\x98" => "\xEB\xBF\x95",
+ "\x97\x99" => "\xEB\xBF\x96",
+ "\x97\x9A" => "\xEB\xBF\x97",
+ "\x97\x9B" => "\xEB\xBF\x98",
+ "\x97\x9C" => "\xEB\xBF\x99",
+ "\x97\x9D" => "\xEB\xBF\x9A",
+ "\x97\x9E" => "\xEB\xBF\x9B",
+ "\x97\x9F" => "\xEB\xBF\x9D",
+ "\x97\xA0" => "\xEB\xBF\x9E",
+ "\x97\xA1" => "\xEB\xBF\xA0",
+ "\x97\xA2" => "\xEB\xBF\xA2",
+ "\x97\xA3" => "\xEB\xBF\xA3",
+ "\x97\xA4" => "\xEB\xBF\xA4",
+ "\x97\xA5" => "\xEB\xBF\xA5",
+ "\x97\xA6" => "\xEB\xBF\xA6",
+ "\x97\xA7" => "\xEB\xBF\xA7",
+ "\x97\xA8" => "\xEB\xBF\xA8",
+ "\x97\xA9" => "\xEB\xBF\xA9",
+ "\x97\xAA" => "\xEB\xBF\xAA",
+ "\x97\xAB" => "\xEB\xBF\xAB",
+ "\x97\xAC" => "\xEB\xBF\xAC",
+ "\x97\xAD" => "\xEB\xBF\xAD",
+ "\x97\xAE" => "\xEB\xBF\xAE",
+ "\x97\xAF" => "\xEB\xBF\xAF",
+ "\x97\xB0" => "\xEB\xBF\xB0",
+ "\x97\xB1" => "\xEB\xBF\xB1",
+ "\x97\xB2" => "\xEB\xBF\xB2",
+ "\x97\xB3" => "\xEB\xBF\xB3",
+ "\x97\xB4" => "\xEB\xBF\xB4",
+ "\x97\xB5" => "\xEB\xBF\xB5",
+ "\x97\xB6" => "\xEB\xBF\xB6",
+ "\x97\xB7" => "\xEB\xBF\xB7",
+ "\x97\xB8" => "\xEB\xBF\xB8",
+ "\x97\xB9" => "\xEB\xBF\xB9",
+ "\x97\xBA" => "\xEB\xBF\xBA",
+ "\x97\xBB" => "\xEB\xBF\xBB",
+ "\x97\xBC" => "\xEB\xBF\xBC",
+ "\x97\xBD" => "\xEB\xBF\xBD",
+ "\x97\xBE" => "\xEB\xBF\xBE",
+ "\x97\xBF" => "\xEB\xBF\xBF",
+ "\x97\xC0" => "\xEC\x80\x80",
+ "\x97\xC1" => "\xEC\x80\x81",
+ "\x97\xC2" => "\xEC\x80\x82",
+ "\x97\xC3" => "\xEC\x80\x83",
+ "\x97\xC4" => "\xEC\x80\x84",
+ "\x97\xC5" => "\xEC\x80\x85",
+ "\x97\xC6" => "\xEC\x80\x86",
+ "\x97\xC7" => "\xEC\x80\x87",
+ "\x97\xC8" => "\xEC\x80\x88",
+ "\x97\xC9" => "\xEC\x80\x89",
+ "\x97\xCA" => "\xEC\x80\x8A",
+ "\x97\xCB" => "\xEC\x80\x8B",
+ "\x97\xCC" => "\xEC\x80\x8C",
+ "\x97\xCD" => "\xEC\x80\x8D",
+ "\x97\xCE" => "\xEC\x80\x8E",
+ "\x97\xCF" => "\xEC\x80\x8F",
+ "\x97\xD0" => "\xEC\x80\x90",
+ "\x97\xD1" => "\xEC\x80\x91",
+ "\x97\xD2" => "\xEC\x80\x92",
+ "\x97\xD3" => "\xEC\x80\x93",
+ "\x97\xD4" => "\xEC\x80\x94",
+ "\x97\xD5" => "\xEC\x80\x95",
+ "\x97\xD6" => "\xEC\x80\x96",
+ "\x97\xD7" => "\xEC\x80\x97",
+ "\x97\xD8" => "\xEC\x80\x98",
+ "\x97\xD9" => "\xEC\x80\x99",
+ "\x97\xDA" => "\xEC\x80\x9A",
+ "\x97\xDB" => "\xEC\x80\x9B",
+ "\x97\xDC" => "\xEC\x80\x9C",
+ "\x97\xDD" => "\xEC\x80\x9D",
+ "\x97\xDE" => "\xEC\x80\x9E",
+ "\x97\xDF" => "\xEC\x80\x9F",
+ "\x97\xE0" => "\xEC\x80\xA0",
+ "\x97\xE1" => "\xEC\x80\xA1",
+ "\x97\xE2" => "\xEC\x80\xA2",
+ "\x97\xE3" => "\xEC\x80\xA3",
+ "\x97\xE4" => "\xEC\x80\xA4",
+ "\x97\xE5" => "\xEC\x80\xA5",
+ "\x97\xE6" => "\xEC\x80\xA6",
+ "\x97\xE7" => "\xEC\x80\xA7",
+ "\x97\xE8" => "\xEC\x80\xA8",
+ "\x97\xE9" => "\xEC\x80\xA9",
+ "\x97\xEA" => "\xEC\x80\xAA",
+ "\x97\xEB" => "\xEC\x80\xAB",
+ "\x97\xEC" => "\xEC\x80\xAC",
+ "\x97\xED" => "\xEC\x80\xAD",
+ "\x97\xEE" => "\xEC\x80\xAE",
+ "\x97\xEF" => "\xEC\x80\xAF",
+ "\x97\xF0" => "\xEC\x80\xB0",
+ "\x97\xF1" => "\xEC\x80\xB1",
+ "\x97\xF2" => "\xEC\x80\xB2",
+ "\x97\xF3" => "\xEC\x80\xB3",
+ "\x97\xF4" => "\xEC\x80\xB4",
+ "\x97\xF5" => "\xEC\x80\xB5",
+ "\x97\xF6" => "\xEC\x80\xB6",
+ "\x97\xF7" => "\xEC\x80\xB7",
+ "\x97\xF8" => "\xEC\x80\xB8",
+ "\x97\xF9" => "\xEC\x80\xB9",
+ "\x97\xFA" => "\xEC\x80\xBA",
+ "\x97\xFB" => "\xEC\x80\xBB",
+ "\x97\xFC" => "\xEC\x80\xBD",
+ "\x97\xFD" => "\xEC\x80\xBE",
+ "\x97\xFE" => "\xEC\x80\xBF",
+ "\x98\x41" => "\xEC\x81\x80",
+ "\x98\x42" => "\xEC\x81\x81",
+ "\x98\x43" => "\xEC\x81\x82",
+ "\x98\x44" => "\xEC\x81\x83",
+ "\x98\x45" => "\xEC\x81\x84",
+ "\x98\x46" => "\xEC\x81\x85",
+ "\x98\x47" => "\xEC\x81\x86",
+ "\x98\x48" => "\xEC\x81\x87",
+ "\x98\x49" => "\xEC\x81\x88",
+ "\x98\x4A" => "\xEC\x81\x89",
+ "\x98\x4B" => "\xEC\x81\x8A",
+ "\x98\x4C" => "\xEC\x81\x8B",
+ "\x98\x4D" => "\xEC\x81\x8C",
+ "\x98\x4E" => "\xEC\x81\x8D",
+ "\x98\x4F" => "\xEC\x81\x8E",
+ "\x98\x50" => "\xEC\x81\x8F",
+ "\x98\x51" => "\xEC\x81\x90",
+ "\x98\x52" => "\xEC\x81\x92",
+ "\x98\x53" => "\xEC\x81\x93",
+ "\x98\x54" => "\xEC\x81\x94",
+ "\x98\x55" => "\xEC\x81\x95",
+ "\x98\x56" => "\xEC\x81\x96",
+ "\x98\x57" => "\xEC\x81\x97",
+ "\x98\x58" => "\xEC\x81\x99",
+ "\x98\x59" => "\xEC\x81\x9A",
+ "\x98\x5A" => "\xEC\x81\x9B",
+ "\x98\x61" => "\xEC\x81\x9D",
+ "\x98\x62" => "\xEC\x81\x9E",
+ "\x98\x63" => "\xEC\x81\x9F",
+ "\x98\x64" => "\xEC\x81\xA1",
+ "\x98\x65" => "\xEC\x81\xA2",
+ "\x98\x66" => "\xEC\x81\xA3",
+ "\x98\x67" => "\xEC\x81\xA4",
+ "\x98\x68" => "\xEC\x81\xA5",
+ "\x98\x69" => "\xEC\x81\xA6",
+ "\x98\x6A" => "\xEC\x81\xA7",
+ "\x98\x6B" => "\xEC\x81\xAA",
+ "\x98\x6C" => "\xEC\x81\xAB",
+ "\x98\x6D" => "\xEC\x81\xAC",
+ "\x98\x6E" => "\xEC\x81\xAD",
+ "\x98\x6F" => "\xEC\x81\xAE",
+ "\x98\x70" => "\xEC\x81\xAF",
+ "\x98\x71" => "\xEC\x81\xB0",
+ "\x98\x72" => "\xEC\x81\xB1",
+ "\x98\x73" => "\xEC\x81\xB2",
+ "\x98\x74" => "\xEC\x81\xB3",
+ "\x98\x75" => "\xEC\x81\xB4",
+ "\x98\x76" => "\xEC\x81\xB5",
+ "\x98\x77" => "\xEC\x81\xB6",
+ "\x98\x78" => "\xEC\x81\xB7",
+ "\x98\x79" => "\xEC\x81\xB8",
+ "\x98\x7A" => "\xEC\x81\xB9",
+ "\x98\x81" => "\xEC\x81\xBA",
+ "\x98\x82" => "\xEC\x81\xBB",
+ "\x98\x83" => "\xEC\x81\xBC",
+ "\x98\x84" => "\xEC\x81\xBD",
+ "\x98\x85" => "\xEC\x81\xBE",
+ "\x98\x86" => "\xEC\x81\xBF",
+ "\x98\x87" => "\xEC\x82\x80",
+ "\x98\x88" => "\xEC\x82\x81",
+ "\x98\x89" => "\xEC\x82\x82",
+ "\x98\x8A" => "\xEC\x82\x83",
+ "\x98\x8B" => "\xEC\x82\x84",
+ "\x98\x8C" => "\xEC\x82\x85",
+ "\x98\x8D" => "\xEC\x82\x86",
+ "\x98\x8E" => "\xEC\x82\x87",
+ "\x98\x8F" => "\xEC\x82\x88",
+ "\x98\x90" => "\xEC\x82\x89",
+ "\x98\x91" => "\xEC\x82\x8A",
+ "\x98\x92" => "\xEC\x82\x8B",
+ "\x98\x93" => "\xEC\x82\x8C",
+ "\x98\x94" => "\xEC\x82\x8D",
+ "\x98\x95" => "\xEC\x82\x8E",
+ "\x98\x96" => "\xEC\x82\x8F",
+ "\x98\x97" => "\xEC\x82\x92",
+ "\x98\x98" => "\xEC\x82\x93",
+ "\x98\x99" => "\xEC\x82\x95",
+ "\x98\x9A" => "\xEC\x82\x96",
+ "\x98\x9B" => "\xEC\x82\x97",
+ "\x98\x9C" => "\xEC\x82\x99",
+ "\x98\x9D" => "\xEC\x82\x9A",
+ "\x98\x9E" => "\xEC\x82\x9B",
+ "\x98\x9F" => "\xEC\x82\x9C",
+ "\x98\xA0" => "\xEC\x82\x9D",
+ "\x98\xA1" => "\xEC\x82\x9E",
+ "\x98\xA2" => "\xEC\x82\x9F",
+ "\x98\xA3" => "\xEC\x82\xA2",
+ "\x98\xA4" => "\xEC\x82\xA4",
+ "\x98\xA5" => "\xEC\x82\xA6",
+ "\x98\xA6" => "\xEC\x82\xA7",
+ "\x98\xA7" => "\xEC\x82\xA8",
+ "\x98\xA8" => "\xEC\x82\xA9",
+ "\x98\xA9" => "\xEC\x82\xAA",
+ "\x98\xAA" => "\xEC\x82\xAB",
+ "\x98\xAB" => "\xEC\x82\xAE",
+ "\x98\xAC" => "\xEC\x82\xB1",
+ "\x98\xAD" => "\xEC\x82\xB2",
+ "\x98\xAE" => "\xEC\x82\xB7",
+ "\x98\xAF" => "\xEC\x82\xB8",
+ "\x98\xB0" => "\xEC\x82\xB9",
+ "\x98\xB1" => "\xEC\x82\xBA",
+ "\x98\xB2" => "\xEC\x82\xBB",
+ "\x98\xB3" => "\xEC\x82\xBE",
+ "\x98\xB4" => "\xEC\x83\x82",
+ "\x98\xB5" => "\xEC\x83\x83",
+ "\x98\xB6" => "\xEC\x83\x84",
+ "\x98\xB7" => "\xEC\x83\x86",
+ "\x98\xB8" => "\xEC\x83\x87",
+ "\x98\xB9" => "\xEC\x83\x8A",
+ "\x98\xBA" => "\xEC\x83\x8B",
+ "\x98\xBB" => "\xEC\x83\x8D",
+ "\x98\xBC" => "\xEC\x83\x8E",
+ "\x98\xBD" => "\xEC\x83\x8F",
+ "\x98\xBE" => "\xEC\x83\x91",
+ "\x98\xBF" => "\xEC\x83\x92",
+ "\x98\xC0" => "\xEC\x83\x93",
+ "\x98\xC1" => "\xEC\x83\x94",
+ "\x98\xC2" => "\xEC\x83\x95",
+ "\x98\xC3" => "\xEC\x83\x96",
+ "\x98\xC4" => "\xEC\x83\x97",
+ "\x98\xC5" => "\xEC\x83\x9A",
+ "\x98\xC6" => "\xEC\x83\x9E",
+ "\x98\xC7" => "\xEC\x83\x9F",
+ "\x98\xC8" => "\xEC\x83\xA0",
+ "\x98\xC9" => "\xEC\x83\xA1",
+ "\x98\xCA" => "\xEC\x83\xA2",
+ "\x98\xCB" => "\xEC\x83\xA3",
+ "\x98\xCC" => "\xEC\x83\xA6",
+ "\x98\xCD" => "\xEC\x83\xA7",
+ "\x98\xCE" => "\xEC\x83\xA9",
+ "\x98\xCF" => "\xEC\x83\xAA",
+ "\x98\xD0" => "\xEC\x83\xAB",
+ "\x98\xD1" => "\xEC\x83\xAD",
+ "\x98\xD2" => "\xEC\x83\xAE",
+ "\x98\xD3" => "\xEC\x83\xAF",
+ "\x98\xD4" => "\xEC\x83\xB0",
+ "\x98\xD5" => "\xEC\x83\xB1",
+ "\x98\xD6" => "\xEC\x83\xB2",
+ "\x98\xD7" => "\xEC\x83\xB3",
+ "\x98\xD8" => "\xEC\x83\xB6",
+ "\x98\xD9" => "\xEC\x83\xB8",
+ "\x98\xDA" => "\xEC\x83\xBA",
+ "\x98\xDB" => "\xEC\x83\xBB",
+ "\x98\xDC" => "\xEC\x83\xBC",
+ "\x98\xDD" => "\xEC\x83\xBD",
+ "\x98\xDE" => "\xEC\x83\xBE",
+ "\x98\xDF" => "\xEC\x83\xBF",
+ "\x98\xE0" => "\xEC\x84\x81",
+ "\x98\xE1" => "\xEC\x84\x82",
+ "\x98\xE2" => "\xEC\x84\x83",
+ "\x98\xE3" => "\xEC\x84\x85",
+ "\x98\xE4" => "\xEC\x84\x86",
+ "\x98\xE5" => "\xEC\x84\x87",
+ "\x98\xE6" => "\xEC\x84\x89",
+ "\x98\xE7" => "\xEC\x84\x8A",
+ "\x98\xE8" => "\xEC\x84\x8B",
+ "\x98\xE9" => "\xEC\x84\x8C",
+ "\x98\xEA" => "\xEC\x84\x8D",
+ "\x98\xEB" => "\xEC\x84\x8E",
+ "\x98\xEC" => "\xEC\x84\x8F",
+ "\x98\xED" => "\xEC\x84\x91",
+ "\x98\xEE" => "\xEC\x84\x92",
+ "\x98\xEF" => "\xEC\x84\x93",
+ "\x98\xF0" => "\xEC\x84\x94",
+ "\x98\xF1" => "\xEC\x84\x96",
+ "\x98\xF2" => "\xEC\x84\x97",
+ "\x98\xF3" => "\xEC\x84\x98",
+ "\x98\xF4" => "\xEC\x84\x99",
+ "\x98\xF5" => "\xEC\x84\x9A",
+ "\x98\xF6" => "\xEC\x84\x9B",
+ "\x98\xF7" => "\xEC\x84\xA1",
+ "\x98\xF8" => "\xEC\x84\xA2",
+ "\x98\xF9" => "\xEC\x84\xA5",
+ "\x98\xFA" => "\xEC\x84\xA8",
+ "\x98\xFB" => "\xEC\x84\xA9",
+ "\x98\xFC" => "\xEC\x84\xAA",
+ "\x98\xFD" => "\xEC\x84\xAB",
+ "\x98\xFE" => "\xEC\x84\xAE",
+ "\x99\x41" => "\xEC\x84\xB2",
+ "\x99\x42" => "\xEC\x84\xB3",
+ "\x99\x43" => "\xEC\x84\xB4",
+ "\x99\x44" => "\xEC\x84\xB5",
+ "\x99\x45" => "\xEC\x84\xB7",
+ "\x99\x46" => "\xEC\x84\xBA",
+ "\x99\x47" => "\xEC\x84\xBB",
+ "\x99\x48" => "\xEC\x84\xBD",
+ "\x99\x49" => "\xEC\x84\xBE",
+ "\x99\x4A" => "\xEC\x84\xBF",
+ "\x99\x4B" => "\xEC\x85\x81",
+ "\x99\x4C" => "\xEC\x85\x82",
+ "\x99\x4D" => "\xEC\x85\x83",
+ "\x99\x4E" => "\xEC\x85\x84",
+ "\x99\x4F" => "\xEC\x85\x85",
+ "\x99\x50" => "\xEC\x85\x86",
+ "\x99\x51" => "\xEC\x85\x87",
+ "\x99\x52" => "\xEC\x85\x8A",
+ "\x99\x53" => "\xEC\x85\x8E",
+ "\x99\x54" => "\xEC\x85\x8F",
+ "\x99\x55" => "\xEC\x85\x90",
+ "\x99\x56" => "\xEC\x85\x91",
+ "\x99\x57" => "\xEC\x85\x92",
+ "\x99\x58" => "\xEC\x85\x93",
+ "\x99\x59" => "\xEC\x85\x96",
+ "\x99\x5A" => "\xEC\x85\x97",
+ "\x99\x61" => "\xEC\x85\x99",
+ "\x99\x62" => "\xEC\x85\x9A",
+ "\x99\x63" => "\xEC\x85\x9B",
+ "\x99\x64" => "\xEC\x85\x9D",
+ "\x99\x65" => "\xEC\x85\x9E",
+ "\x99\x66" => "\xEC\x85\x9F",
+ "\x99\x67" => "\xEC\x85\xA0",
+ "\x99\x68" => "\xEC\x85\xA1",
+ "\x99\x69" => "\xEC\x85\xA2",
+ "\x99\x6A" => "\xEC\x85\xA3",
+ "\x99\x6B" => "\xEC\x85\xA6",
+ "\x99\x6C" => "\xEC\x85\xAA",
+ "\x99\x6D" => "\xEC\x85\xAB",
+ "\x99\x6E" => "\xEC\x85\xAC",
+ "\x99\x6F" => "\xEC\x85\xAD",
+ "\x99\x70" => "\xEC\x85\xAE",
+ "\x99\x71" => "\xEC\x85\xAF",
+ "\x99\x72" => "\xEC\x85\xB1",
+ "\x99\x73" => "\xEC\x85\xB2",
+ "\x99\x74" => "\xEC\x85\xB3",
+ "\x99\x75" => "\xEC\x85\xB5",
+ "\x99\x76" => "\xEC\x85\xB6",
+ "\x99\x77" => "\xEC\x85\xB7",
+ "\x99\x78" => "\xEC\x85\xB9",
+ "\x99\x79" => "\xEC\x85\xBA",
+ "\x99\x7A" => "\xEC\x85\xBB",
+ "\x99\x81" => "\xEC\x85\xBC",
+ "\x99\x82" => "\xEC\x85\xBD",
+ "\x99\x83" => "\xEC\x85\xBE",
+ "\x99\x84" => "\xEC\x85\xBF",
+ "\x99\x85" => "\xEC\x86\x80",
+ "\x99\x86" => "\xEC\x86\x81",
+ "\x99\x87" => "\xEC\x86\x82",
+ "\x99\x88" => "\xEC\x86\x83",
+ "\x99\x89" => "\xEC\x86\x84",
+ "\x99\x8A" => "\xEC\x86\x86",
+ "\x99\x8B" => "\xEC\x86\x87",
+ "\x99\x8C" => "\xEC\x86\x88",
+ "\x99\x8D" => "\xEC\x86\x89",
+ "\x99\x8E" => "\xEC\x86\x8A",
+ "\x99\x8F" => "\xEC\x86\x8B",
+ "\x99\x90" => "\xEC\x86\x8F",
+ "\x99\x91" => "\xEC\x86\x91",
+ "\x99\x92" => "\xEC\x86\x92",
+ "\x99\x93" => "\xEC\x86\x93",
+ "\x99\x94" => "\xEC\x86\x95",
+ "\x99\x95" => "\xEC\x86\x97",
+ "\x99\x96" => "\xEC\x86\x98",
+ "\x99\x97" => "\xEC\x86\x99",
+ "\x99\x98" => "\xEC\x86\x9A",
+ "\x99\x99" => "\xEC\x86\x9B",
+ "\x99\x9A" => "\xEC\x86\x9E",
+ "\x99\x9B" => "\xEC\x86\xA0",
+ "\x99\x9C" => "\xEC\x86\xA2",
+ "\x99\x9D" => "\xEC\x86\xA3",
+ "\x99\x9E" => "\xEC\x86\xA4",
+ "\x99\x9F" => "\xEC\x86\xA6",
+ "\x99\xA0" => "\xEC\x86\xA7",
+ "\x99\xA1" => "\xEC\x86\xAA",
+ "\x99\xA2" => "\xEC\x86\xAB",
+ "\x99\xA3" => "\xEC\x86\xAD",
+ "\x99\xA4" => "\xEC\x86\xAE",
+ "\x99\xA5" => "\xEC\x86\xAF",
+ "\x99\xA6" => "\xEC\x86\xB1",
+ "\x99\xA7" => "\xEC\x86\xB2",
+ "\x99\xA8" => "\xEC\x86\xB3",
+ "\x99\xA9" => "\xEC\x86\xB4",
+ "\x99\xAA" => "\xEC\x86\xB5",
+ "\x99\xAB" => "\xEC\x86\xB6",
+ "\x99\xAC" => "\xEC\x86\xB7",
+ "\x99\xAD" => "\xEC\x86\xB8",
+ "\x99\xAE" => "\xEC\x86\xB9",
+ "\x99\xAF" => "\xEC\x86\xBA",
+ "\x99\xB0" => "\xEC\x86\xBB",
+ "\x99\xB1" => "\xEC\x86\xBC",
+ "\x99\xB2" => "\xEC\x86\xBE",
+ "\x99\xB3" => "\xEC\x86\xBF",
+ "\x99\xB4" => "\xEC\x87\x80",
+ "\x99\xB5" => "\xEC\x87\x81",
+ "\x99\xB6" => "\xEC\x87\x82",
+ "\x99\xB7" => "\xEC\x87\x83",
+ "\x99\xB8" => "\xEC\x87\x85",
+ "\x99\xB9" => "\xEC\x87\x86",
+ "\x99\xBA" => "\xEC\x87\x87",
+ "\x99\xBB" => "\xEC\x87\x89",
+ "\x99\xBC" => "\xEC\x87\x8A",
+ "\x99\xBD" => "\xEC\x87\x8B",
+ "\x99\xBE" => "\xEC\x87\x8D",
+ "\x99\xBF" => "\xEC\x87\x8E",
+ "\x99\xC0" => "\xEC\x87\x8F",
+ "\x99\xC1" => "\xEC\x87\x90",
+ "\x99\xC2" => "\xEC\x87\x91",
+ "\x99\xC3" => "\xEC\x87\x92",
+ "\x99\xC4" => "\xEC\x87\x93",
+ "\x99\xC5" => "\xEC\x87\x95",
+ "\x99\xC6" => "\xEC\x87\x96",
+ "\x99\xC7" => "\xEC\x87\x99",
+ "\x99\xC8" => "\xEC\x87\x9A",
+ "\x99\xC9" => "\xEC\x87\x9B",
+ "\x99\xCA" => "\xEC\x87\x9C",
+ "\x99\xCB" => "\xEC\x87\x9D",
+ "\x99\xCC" => "\xEC\x87\x9E",
+ "\x99\xCD" => "\xEC\x87\x9F",
+ "\x99\xCE" => "\xEC\x87\xA1",
+ "\x99\xCF" => "\xEC\x87\xA2",
+ "\x99\xD0" => "\xEC\x87\xA3",
+ "\x99\xD1" => "\xEC\x87\xA5",
+ "\x99\xD2" => "\xEC\x87\xA6",
+ "\x99\xD3" => "\xEC\x87\xA7",
+ "\x99\xD4" => "\xEC\x87\xA9",
+ "\x99\xD5" => "\xEC\x87\xAA",
+ "\x99\xD6" => "\xEC\x87\xAB",
+ "\x99\xD7" => "\xEC\x87\xAC",
+ "\x99\xD8" => "\xEC\x87\xAD",
+ "\x99\xD9" => "\xEC\x87\xAE",
+ "\x99\xDA" => "\xEC\x87\xAF",
+ "\x99\xDB" => "\xEC\x87\xB2",
+ "\x99\xDC" => "\xEC\x87\xB4",
+ "\x99\xDD" => "\xEC\x87\xB5",
+ "\x99\xDE" => "\xEC\x87\xB6",
+ "\x99\xDF" => "\xEC\x87\xB7",
+ "\x99\xE0" => "\xEC\x87\xB8",
+ "\x99\xE1" => "\xEC\x87\xB9",
+ "\x99\xE2" => "\xEC\x87\xBA",
+ "\x99\xE3" => "\xEC\x87\xBB",
+ "\x99\xE4" => "\xEC\x87\xBE",
+ "\x99\xE5" => "\xEC\x87\xBF",
+ "\x99\xE6" => "\xEC\x88\x81",
+ "\x99\xE7" => "\xEC\x88\x82",
+ "\x99\xE8" => "\xEC\x88\x83",
+ "\x99\xE9" => "\xEC\x88\x85",
+ "\x99\xEA" => "\xEC\x88\x86",
+ "\x99\xEB" => "\xEC\x88\x87",
+ "\x99\xEC" => "\xEC\x88\x88",
+ "\x99\xED" => "\xEC\x88\x89",
+ "\x99\xEE" => "\xEC\x88\x8A",
+ "\x99\xEF" => "\xEC\x88\x8B",
+ "\x99\xF0" => "\xEC\x88\x8E",
+ "\x99\xF1" => "\xEC\x88\x90",
+ "\x99\xF2" => "\xEC\x88\x92",
+ "\x99\xF3" => "\xEC\x88\x93",
+ "\x99\xF4" => "\xEC\x88\x94",
+ "\x99\xF5" => "\xEC\x88\x95",
+ "\x99\xF6" => "\xEC\x88\x96",
+ "\x99\xF7" => "\xEC\x88\x97",
+ "\x99\xF8" => "\xEC\x88\x9A",
+ "\x99\xF9" => "\xEC\x88\x9B",
+ "\x99\xFA" => "\xEC\x88\x9D",
+ "\x99\xFB" => "\xEC\x88\x9E",
+ "\x99\xFC" => "\xEC\x88\xA1",
+ "\x99\xFD" => "\xEC\x88\xA2",
+ "\x99\xFE" => "\xEC\x88\xA3",
+ "\x9A\x41" => "\xEC\x88\xA4",
+ "\x9A\x42" => "\xEC\x88\xA5",
+ "\x9A\x43" => "\xEC\x88\xA6",
+ "\x9A\x44" => "\xEC\x88\xA7",
+ "\x9A\x45" => "\xEC\x88\xAA",
+ "\x9A\x46" => "\xEC\x88\xAC",
+ "\x9A\x47" => "\xEC\x88\xAE",
+ "\x9A\x48" => "\xEC\x88\xB0",
+ "\x9A\x49" => "\xEC\x88\xB3",
+ "\x9A\x4A" => "\xEC\x88\xB5",
+ "\x9A\x4B" => "\xEC\x88\xB6",
+ "\x9A\x4C" => "\xEC\x88\xB7",
+ "\x9A\x4D" => "\xEC\x88\xB8",
+ "\x9A\x4E" => "\xEC\x88\xB9",
+ "\x9A\x4F" => "\xEC\x88\xBA",
+ "\x9A\x50" => "\xEC\x88\xBB",
+ "\x9A\x51" => "\xEC\x88\xBC",
+ "\x9A\x52" => "\xEC\x88\xBD",
+ "\x9A\x53" => "\xEC\x88\xBE",
+ "\x9A\x54" => "\xEC\x88\xBF",
+ "\x9A\x55" => "\xEC\x89\x80",
+ "\x9A\x56" => "\xEC\x89\x81",
+ "\x9A\x57" => "\xEC\x89\x82",
+ "\x9A\x58" => "\xEC\x89\x83",
+ "\x9A\x59" => "\xEC\x89\x84",
+ "\x9A\x5A" => "\xEC\x89\x85",
+ "\x9A\x61" => "\xEC\x89\x86",
+ "\x9A\x62" => "\xEC\x89\x87",
+ "\x9A\x63" => "\xEC\x89\x89",
+ "\x9A\x64" => "\xEC\x89\x8A",
+ "\x9A\x65" => "\xEC\x89\x8B",
+ "\x9A\x66" => "\xEC\x89\x8C",
+ "\x9A\x67" => "\xEC\x89\x8D",
+ "\x9A\x68" => "\xEC\x89\x8E",
+ "\x9A\x69" => "\xEC\x89\x8F",
+ "\x9A\x6A" => "\xEC\x89\x92",
+ "\x9A\x6B" => "\xEC\x89\x93",
+ "\x9A\x6C" => "\xEC\x89\x95",
+ "\x9A\x6D" => "\xEC\x89\x96",
+ "\x9A\x6E" => "\xEC\x89\x97",
+ "\x9A\x6F" => "\xEC\x89\x99",
+ "\x9A\x70" => "\xEC\x89\x9A",
+ "\x9A\x71" => "\xEC\x89\x9B",
+ "\x9A\x72" => "\xEC\x89\x9C",
+ "\x9A\x73" => "\xEC\x89\x9D",
+ "\x9A\x74" => "\xEC\x89\x9E",
+ "\x9A\x75" => "\xEC\x89\x9F",
+ "\x9A\x76" => "\xEC\x89\xA1",
+ "\x9A\x77" => "\xEC\x89\xA2",
+ "\x9A\x78" => "\xEC\x89\xA3",
+ "\x9A\x79" => "\xEC\x89\xA4",
+ "\x9A\x7A" => "\xEC\x89\xA6",
+ "\x9A\x81" => "\xEC\x89\xA7",
+ "\x9A\x82" => "\xEC\x89\xA8",
+ "\x9A\x83" => "\xEC\x89\xA9",
+ "\x9A\x84" => "\xEC\x89\xAA",
+ "\x9A\x85" => "\xEC\x89\xAB",
+ "\x9A\x86" => "\xEC\x89\xAE",
+ "\x9A\x87" => "\xEC\x89\xAF",
+ "\x9A\x88" => "\xEC\x89\xB1",
+ "\x9A\x89" => "\xEC\x89\xB2",
+ "\x9A\x8A" => "\xEC\x89\xB3",
+ "\x9A\x8B" => "\xEC\x89\xB5",
+ "\x9A\x8C" => "\xEC\x89\xB6",
+ "\x9A\x8D" => "\xEC\x89\xB7",
+ "\x9A\x8E" => "\xEC\x89\xB8",
+ "\x9A\x8F" => "\xEC\x89\xB9",
+ "\x9A\x90" => "\xEC\x89\xBA",
+ "\x9A\x91" => "\xEC\x89\xBB",
+ "\x9A\x92" => "\xEC\x89\xBE",
+ "\x9A\x93" => "\xEC\x8A\x80",
+ "\x9A\x94" => "\xEC\x8A\x82",
+ "\x9A\x95" => "\xEC\x8A\x83",
+ "\x9A\x96" => "\xEC\x8A\x84",
+ "\x9A\x97" => "\xEC\x8A\x85",
+ "\x9A\x98" => "\xEC\x8A\x86",
+ "\x9A\x99" => "\xEC\x8A\x87",
+ "\x9A\x9A" => "\xEC\x8A\x8A",
+ "\x9A\x9B" => "\xEC\x8A\x8B",
+ "\x9A\x9C" => "\xEC\x8A\x8C",
+ "\x9A\x9D" => "\xEC\x8A\x8D",
+ "\x9A\x9E" => "\xEC\x8A\x8E",
+ "\x9A\x9F" => "\xEC\x8A\x8F",
+ "\x9A\xA0" => "\xEC\x8A\x91",
+ "\x9A\xA1" => "\xEC\x8A\x92",
+ "\x9A\xA2" => "\xEC\x8A\x93",
+ "\x9A\xA3" => "\xEC\x8A\x94",
+ "\x9A\xA4" => "\xEC\x8A\x95",
+ "\x9A\xA5" => "\xEC\x8A\x96",
+ "\x9A\xA6" => "\xEC\x8A\x97",
+ "\x9A\xA7" => "\xEC\x8A\x99",
+ "\x9A\xA8" => "\xEC\x8A\x9A",
+ "\x9A\xA9" => "\xEC\x8A\x9C",
+ "\x9A\xAA" => "\xEC\x8A\x9E",
+ "\x9A\xAB" => "\xEC\x8A\x9F",
+ "\x9A\xAC" => "\xEC\x8A\xA0",
+ "\x9A\xAD" => "\xEC\x8A\xA1",
+ "\x9A\xAE" => "\xEC\x8A\xA2",
+ "\x9A\xAF" => "\xEC\x8A\xA3",
+ "\x9A\xB0" => "\xEC\x8A\xA6",
+ "\x9A\xB1" => "\xEC\x8A\xA7",
+ "\x9A\xB2" => "\xEC\x8A\xA9",
+ "\x9A\xB3" => "\xEC\x8A\xAA",
+ "\x9A\xB4" => "\xEC\x8A\xAB",
+ "\x9A\xB5" => "\xEC\x8A\xAE",
+ "\x9A\xB6" => "\xEC\x8A\xAF",
+ "\x9A\xB7" => "\xEC\x8A\xB0",
+ "\x9A\xB8" => "\xEC\x8A\xB1",
+ "\x9A\xB9" => "\xEC\x8A\xB2",
+ "\x9A\xBA" => "\xEC\x8A\xB3",
+ "\x9A\xBB" => "\xEC\x8A\xB6",
+ "\x9A\xBC" => "\xEC\x8A\xB8",
+ "\x9A\xBD" => "\xEC\x8A\xBA",
+ "\x9A\xBE" => "\xEC\x8A\xBB",
+ "\x9A\xBF" => "\xEC\x8A\xBC",
+ "\x9A\xC0" => "\xEC\x8A\xBD",
+ "\x9A\xC1" => "\xEC\x8A\xBE",
+ "\x9A\xC2" => "\xEC\x8A\xBF",
+ "\x9A\xC3" => "\xEC\x8B\x80",
+ "\x9A\xC4" => "\xEC\x8B\x81",
+ "\x9A\xC5" => "\xEC\x8B\x82",
+ "\x9A\xC6" => "\xEC\x8B\x83",
+ "\x9A\xC7" => "\xEC\x8B\x84",
+ "\x9A\xC8" => "\xEC\x8B\x85",
+ "\x9A\xC9" => "\xEC\x8B\x86",
+ "\x9A\xCA" => "\xEC\x8B\x87",
+ "\x9A\xCB" => "\xEC\x8B\x88",
+ "\x9A\xCC" => "\xEC\x8B\x89",
+ "\x9A\xCD" => "\xEC\x8B\x8A",
+ "\x9A\xCE" => "\xEC\x8B\x8B",
+ "\x9A\xCF" => "\xEC\x8B\x8C",
+ "\x9A\xD0" => "\xEC\x8B\x8D",
+ "\x9A\xD1" => "\xEC\x8B\x8E",
+ "\x9A\xD2" => "\xEC\x8B\x8F",
+ "\x9A\xD3" => "\xEC\x8B\x90",
+ "\x9A\xD4" => "\xEC\x8B\x91",
+ "\x9A\xD5" => "\xEC\x8B\x92",
+ "\x9A\xD6" => "\xEC\x8B\x93",
+ "\x9A\xD7" => "\xEC\x8B\x94",
+ "\x9A\xD8" => "\xEC\x8B\x95",
+ "\x9A\xD9" => "\xEC\x8B\x96",
+ "\x9A\xDA" => "\xEC\x8B\x97",
+ "\x9A\xDB" => "\xEC\x8B\x98",
+ "\x9A\xDC" => "\xEC\x8B\x99",
+ "\x9A\xDD" => "\xEC\x8B\x9A",
+ "\x9A\xDE" => "\xEC\x8B\x9B",
+ "\x9A\xDF" => "\xEC\x8B\x9E",
+ "\x9A\xE0" => "\xEC\x8B\x9F",
+ "\x9A\xE1" => "\xEC\x8B\xA1",
+ "\x9A\xE2" => "\xEC\x8B\xA2",
+ "\x9A\xE3" => "\xEC\x8B\xA5",
+ "\x9A\xE4" => "\xEC\x8B\xA6",
+ "\x9A\xE5" => "\xEC\x8B\xA7",
+ "\x9A\xE6" => "\xEC\x8B\xA8",
+ "\x9A\xE7" => "\xEC\x8B\xA9",
+ "\x9A\xE8" => "\xEC\x8B\xAA",
+ "\x9A\xE9" => "\xEC\x8B\xAE",
+ "\x9A\xEA" => "\xEC\x8B\xB0",
+ "\x9A\xEB" => "\xEC\x8B\xB2",
+ "\x9A\xEC" => "\xEC\x8B\xB3",
+ "\x9A\xED" => "\xEC\x8B\xB4",
+ "\x9A\xEE" => "\xEC\x8B\xB5",
+ "\x9A\xEF" => "\xEC\x8B\xB7",
+ "\x9A\xF0" => "\xEC\x8B\xBA",
+ "\x9A\xF1" => "\xEC\x8B\xBD",
+ "\x9A\xF2" => "\xEC\x8B\xBE",
+ "\x9A\xF3" => "\xEC\x8B\xBF",
+ "\x9A\xF4" => "\xEC\x8C\x81",
+ "\x9A\xF5" => "\xEC\x8C\x82",
+ "\x9A\xF6" => "\xEC\x8C\x83",
+ "\x9A\xF7" => "\xEC\x8C\x84",
+ "\x9A\xF8" => "\xEC\x8C\x85",
+ "\x9A\xF9" => "\xEC\x8C\x86",
+ "\x9A\xFA" => "\xEC\x8C\x87",
+ "\x9A\xFB" => "\xEC\x8C\x8A",
+ "\x9A\xFC" => "\xEC\x8C\x8B",
+ "\x9A\xFD" => "\xEC\x8C\x8E",
+ "\x9A\xFE" => "\xEC\x8C\x8F",
+ "\x9B\x41" => "\xEC\x8C\x90",
+ "\x9B\x42" => "\xEC\x8C\x91",
+ "\x9B\x43" => "\xEC\x8C\x92",
+ "\x9B\x44" => "\xEC\x8C\x96",
+ "\x9B\x45" => "\xEC\x8C\x97",
+ "\x9B\x46" => "\xEC\x8C\x99",
+ "\x9B\x47" => "\xEC\x8C\x9A",
+ "\x9B\x48" => "\xEC\x8C\x9B",
+ "\x9B\x49" => "\xEC\x8C\x9D",
+ "\x9B\x4A" => "\xEC\x8C\x9E",
+ "\x9B\x4B" => "\xEC\x8C\x9F",
+ "\x9B\x4C" => "\xEC\x8C\xA0",
+ "\x9B\x4D" => "\xEC\x8C\xA1",
+ "\x9B\x4E" => "\xEC\x8C\xA2",
+ "\x9B\x4F" => "\xEC\x8C\xA3",
+ "\x9B\x50" => "\xEC\x8C\xA6",
+ "\x9B\x51" => "\xEC\x8C\xA7",
+ "\x9B\x52" => "\xEC\x8C\xAA",
+ "\x9B\x53" => "\xEC\x8C\xAB",
+ "\x9B\x54" => "\xEC\x8C\xAC",
+ "\x9B\x55" => "\xEC\x8C\xAD",
+ "\x9B\x56" => "\xEC\x8C\xAE",
+ "\x9B\x57" => "\xEC\x8C\xAF",
+ "\x9B\x58" => "\xEC\x8C\xB0",
+ "\x9B\x59" => "\xEC\x8C\xB1",
+ "\x9B\x5A" => "\xEC\x8C\xB2",
+ "\x9B\x61" => "\xEC\x8C\xB3",
+ "\x9B\x62" => "\xEC\x8C\xB4",
+ "\x9B\x63" => "\xEC\x8C\xB5",
+ "\x9B\x64" => "\xEC\x8C\xB6",
+ "\x9B\x65" => "\xEC\x8C\xB7",
+ "\x9B\x66" => "\xEC\x8C\xB8",
+ "\x9B\x67" => "\xEC\x8C\xB9",
+ "\x9B\x68" => "\xEC\x8C\xBA",
+ "\x9B\x69" => "\xEC\x8C\xBB",
+ "\x9B\x6A" => "\xEC\x8C\xBC",
+ "\x9B\x6B" => "\xEC\x8C\xBD",
+ "\x9B\x6C" => "\xEC\x8C\xBE",
+ "\x9B\x6D" => "\xEC\x8C\xBF",
+ "\x9B\x6E" => "\xEC\x8D\x80",
+ "\x9B\x6F" => "\xEC\x8D\x81",
+ "\x9B\x70" => "\xEC\x8D\x82",
+ "\x9B\x71" => "\xEC\x8D\x83",
+ "\x9B\x72" => "\xEC\x8D\x84",
+ "\x9B\x73" => "\xEC\x8D\x86",
+ "\x9B\x74" => "\xEC\x8D\x87",
+ "\x9B\x75" => "\xEC\x8D\x88",
+ "\x9B\x76" => "\xEC\x8D\x89",
+ "\x9B\x77" => "\xEC\x8D\x8A",
+ "\x9B\x78" => "\xEC\x8D\x8B",
+ "\x9B\x79" => "\xEC\x8D\x8C",
+ "\x9B\x7A" => "\xEC\x8D\x8D",
+ "\x9B\x81" => "\xEC\x8D\x8E",
+ "\x9B\x82" => "\xEC\x8D\x8F",
+ "\x9B\x83" => "\xEC\x8D\x90",
+ "\x9B\x84" => "\xEC\x8D\x91",
+ "\x9B\x85" => "\xEC\x8D\x92",
+ "\x9B\x86" => "\xEC\x8D\x93",
+ "\x9B\x87" => "\xEC\x8D\x94",
+ "\x9B\x88" => "\xEC\x8D\x95",
+ "\x9B\x89" => "\xEC\x8D\x96",
+ "\x9B\x8A" => "\xEC\x8D\x97",
+ "\x9B\x8B" => "\xEC\x8D\x98",
+ "\x9B\x8C" => "\xEC\x8D\x99",
+ "\x9B\x8D" => "\xEC\x8D\x9A",
+ "\x9B\x8E" => "\xEC\x8D\x9B",
+ "\x9B\x8F" => "\xEC\x8D\x9C",
+ "\x9B\x90" => "\xEC\x8D\x9D",
+ "\x9B\x91" => "\xEC\x8D\x9E",
+ "\x9B\x92" => "\xEC\x8D\x9F",
+ "\x9B\x93" => "\xEC\x8D\xA0",
+ "\x9B\x94" => "\xEC\x8D\xA1",
+ "\x9B\x95" => "\xEC\x8D\xA2",
+ "\x9B\x96" => "\xEC\x8D\xA3",
+ "\x9B\x97" => "\xEC\x8D\xA4",
+ "\x9B\x98" => "\xEC\x8D\xA5",
+ "\x9B\x99" => "\xEC\x8D\xA6",
+ "\x9B\x9A" => "\xEC\x8D\xA7",
+ "\x9B\x9B" => "\xEC\x8D\xAA",
+ "\x9B\x9C" => "\xEC\x8D\xAB",
+ "\x9B\x9D" => "\xEC\x8D\xAD",
+ "\x9B\x9E" => "\xEC\x8D\xAE",
+ "\x9B\x9F" => "\xEC\x8D\xAF",
+ "\x9B\xA0" => "\xEC\x8D\xB1",
+ "\x9B\xA1" => "\xEC\x8D\xB3",
+ "\x9B\xA2" => "\xEC\x8D\xB4",
+ "\x9B\xA3" => "\xEC\x8D\xB5",
+ "\x9B\xA4" => "\xEC\x8D\xB6",
+ "\x9B\xA5" => "\xEC\x8D\xB7",
+ "\x9B\xA6" => "\xEC\x8D\xBA",
+ "\x9B\xA7" => "\xEC\x8D\xBB",
+ "\x9B\xA8" => "\xEC\x8D\xBE",
+ "\x9B\xA9" => "\xEC\x8D\xBF",
+ "\x9B\xAA" => "\xEC\x8E\x80",
+ "\x9B\xAB" => "\xEC\x8E\x81",
+ "\x9B\xAC" => "\xEC\x8E\x82",
+ "\x9B\xAD" => "\xEC\x8E\x83",
+ "\x9B\xAE" => "\xEC\x8E\x85",
+ "\x9B\xAF" => "\xEC\x8E\x86",
+ "\x9B\xB0" => "\xEC\x8E\x87",
+ "\x9B\xB1" => "\xEC\x8E\x89",
+ "\x9B\xB2" => "\xEC\x8E\x8A",
+ "\x9B\xB3" => "\xEC\x8E\x8B",
+ "\x9B\xB4" => "\xEC\x8E\x8D",
+ "\x9B\xB5" => "\xEC\x8E\x8E",
+ "\x9B\xB6" => "\xEC\x8E\x8F",
+ "\x9B\xB7" => "\xEC\x8E\x90",
+ "\x9B\xB8" => "\xEC\x8E\x91",
+ "\x9B\xB9" => "\xEC\x8E\x92",
+ "\x9B\xBA" => "\xEC\x8E\x93",
+ "\x9B\xBB" => "\xEC\x8E\x94",
+ "\x9B\xBC" => "\xEC\x8E\x95",
+ "\x9B\xBD" => "\xEC\x8E\x96",
+ "\x9B\xBE" => "\xEC\x8E\x97",
+ "\x9B\xBF" => "\xEC\x8E\x98",
+ "\x9B\xC0" => "\xEC\x8E\x99",
+ "\x9B\xC1" => "\xEC\x8E\x9A",
+ "\x9B\xC2" => "\xEC\x8E\x9B",
+ "\x9B\xC3" => "\xEC\x8E\x9C",
+ "\x9B\xC4" => "\xEC\x8E\x9D",
+ "\x9B\xC5" => "\xEC\x8E\x9E",
+ "\x9B\xC6" => "\xEC\x8E\x9F",
+ "\x9B\xC7" => "\xEC\x8E\xA0",
+ "\x9B\xC8" => "\xEC\x8E\xA1",
+ "\x9B\xC9" => "\xEC\x8E\xA2",
+ "\x9B\xCA" => "\xEC\x8E\xA3",
+ "\x9B\xCB" => "\xEC\x8E\xA4",
+ "\x9B\xCC" => "\xEC\x8E\xA5",
+ "\x9B\xCD" => "\xEC\x8E\xA6",
+ "\x9B\xCE" => "\xEC\x8E\xA7",
+ "\x9B\xCF" => "\xEC\x8E\xA8",
+ "\x9B\xD0" => "\xEC\x8E\xA9",
+ "\x9B\xD1" => "\xEC\x8E\xAA",
+ "\x9B\xD2" => "\xEC\x8E\xAB",
+ "\x9B\xD3" => "\xEC\x8E\xAC",
+ "\x9B\xD4" => "\xEC\x8E\xAD",
+ "\x9B\xD5" => "\xEC\x8E\xAE",
+ "\x9B\xD6" => "\xEC\x8E\xAF",
+ "\x9B\xD7" => "\xEC\x8E\xB0",
+ "\x9B\xD8" => "\xEC\x8E\xB1",
+ "\x9B\xD9" => "\xEC\x8E\xB2",
+ "\x9B\xDA" => "\xEC\x8E\xB3",
+ "\x9B\xDB" => "\xEC\x8E\xB4",
+ "\x9B\xDC" => "\xEC\x8E\xB5",
+ "\x9B\xDD" => "\xEC\x8E\xB6",
+ "\x9B\xDE" => "\xEC\x8E\xB7",
+ "\x9B\xDF" => "\xEC\x8E\xB8",
+ "\x9B\xE0" => "\xEC\x8E\xB9",
+ "\x9B\xE1" => "\xEC\x8E\xBA",
+ "\x9B\xE2" => "\xEC\x8E\xBB",
+ "\x9B\xE3" => "\xEC\x8E\xBC",
+ "\x9B\xE4" => "\xEC\x8E\xBD",
+ "\x9B\xE5" => "\xEC\x8E\xBE",
+ "\x9B\xE6" => "\xEC\x8E\xBF",
+ "\x9B\xE7" => "\xEC\x8F\x81",
+ "\x9B\xE8" => "\xEC\x8F\x82",
+ "\x9B\xE9" => "\xEC\x8F\x83",
+ "\x9B\xEA" => "\xEC\x8F\x84",
+ "\x9B\xEB" => "\xEC\x8F\x85",
+ "\x9B\xEC" => "\xEC\x8F\x86",
+ "\x9B\xED" => "\xEC\x8F\x87",
+ "\x9B\xEE" => "\xEC\x8F\x88",
+ "\x9B\xEF" => "\xEC\x8F\x89",
+ "\x9B\xF0" => "\xEC\x8F\x8A",
+ "\x9B\xF1" => "\xEC\x8F\x8B",
+ "\x9B\xF2" => "\xEC\x8F\x8C",
+ "\x9B\xF3" => "\xEC\x8F\x8D",
+ "\x9B\xF4" => "\xEC\x8F\x8E",
+ "\x9B\xF5" => "\xEC\x8F\x8F",
+ "\x9B\xF6" => "\xEC\x8F\x90",
+ "\x9B\xF7" => "\xEC\x8F\x91",
+ "\x9B\xF8" => "\xEC\x8F\x92",
+ "\x9B\xF9" => "\xEC\x8F\x93",
+ "\x9B\xFA" => "\xEC\x8F\x94",
+ "\x9B\xFB" => "\xEC\x8F\x95",
+ "\x9B\xFC" => "\xEC\x8F\x96",
+ "\x9B\xFD" => "\xEC\x8F\x97",
+ "\x9B\xFE" => "\xEC\x8F\x9A",
+ "\x9C\x41" => "\xEC\x8F\x9B",
+ "\x9C\x42" => "\xEC\x8F\x9D",
+ "\x9C\x43" => "\xEC\x8F\x9E",
+ "\x9C\x44" => "\xEC\x8F\xA1",
+ "\x9C\x45" => "\xEC\x8F\xA3",
+ "\x9C\x46" => "\xEC\x8F\xA4",
+ "\x9C\x47" => "\xEC\x8F\xA5",
+ "\x9C\x48" => "\xEC\x8F\xA6",
+ "\x9C\x49" => "\xEC\x8F\xA7",
+ "\x9C\x4A" => "\xEC\x8F\xAA",
+ "\x9C\x4B" => "\xEC\x8F\xAB",
+ "\x9C\x4C" => "\xEC\x8F\xAC",
+ "\x9C\x4D" => "\xEC\x8F\xAE",
+ "\x9C\x4E" => "\xEC\x8F\xAF",
+ "\x9C\x4F" => "\xEC\x8F\xB0",
+ "\x9C\x50" => "\xEC\x8F\xB1",
+ "\x9C\x51" => "\xEC\x8F\xB2",
+ "\x9C\x52" => "\xEC\x8F\xB3",
+ "\x9C\x53" => "\xEC\x8F\xB6",
+ "\x9C\x54" => "\xEC\x8F\xB7",
+ "\x9C\x55" => "\xEC\x8F\xB9",
+ "\x9C\x56" => "\xEC\x8F\xBA",
+ "\x9C\x57" => "\xEC\x8F\xBB",
+ "\x9C\x58" => "\xEC\x8F\xBC",
+ "\x9C\x59" => "\xEC\x8F\xBD",
+ "\x9C\x5A" => "\xEC\x8F\xBE",
+ "\x9C\x61" => "\xEC\x8F\xBF",
+ "\x9C\x62" => "\xEC\x90\x80",
+ "\x9C\x63" => "\xEC\x90\x81",
+ "\x9C\x64" => "\xEC\x90\x82",
+ "\x9C\x65" => "\xEC\x90\x83",
+ "\x9C\x66" => "\xEC\x90\x84",
+ "\x9C\x67" => "\xEC\x90\x85",
+ "\x9C\x68" => "\xEC\x90\x86",
+ "\x9C\x69" => "\xEC\x90\x87",
+ "\x9C\x6A" => "\xEC\x90\x89",
+ "\x9C\x6B" => "\xEC\x90\x8A",
+ "\x9C\x6C" => "\xEC\x90\x8B",
+ "\x9C\x6D" => "\xEC\x90\x8C",
+ "\x9C\x6E" => "\xEC\x90\x8D",
+ "\x9C\x6F" => "\xEC\x90\x8E",
+ "\x9C\x70" => "\xEC\x90\x8F",
+ "\x9C\x71" => "\xEC\x90\x91",
+ "\x9C\x72" => "\xEC\x90\x92",
+ "\x9C\x73" => "\xEC\x90\x93",
+ "\x9C\x74" => "\xEC\x90\x94",
+ "\x9C\x75" => "\xEC\x90\x95",
+ "\x9C\x76" => "\xEC\x90\x96",
+ "\x9C\x77" => "\xEC\x90\x97",
+ "\x9C\x78" => "\xEC\x90\x98",
+ "\x9C\x79" => "\xEC\x90\x99",
+ "\x9C\x7A" => "\xEC\x90\x9A",
+ "\x9C\x81" => "\xEC\x90\x9B",
+ "\x9C\x82" => "\xEC\x90\x9C",
+ "\x9C\x83" => "\xEC\x90\x9D",
+ "\x9C\x84" => "\xEC\x90\x9E",
+ "\x9C\x85" => "\xEC\x90\x9F",
+ "\x9C\x86" => "\xEC\x90\xA0",
+ "\x9C\x87" => "\xEC\x90\xA1",
+ "\x9C\x88" => "\xEC\x90\xA2",
+ "\x9C\x89" => "\xEC\x90\xA3",
+ "\x9C\x8A" => "\xEC\x90\xA5",
+ "\x9C\x8B" => "\xEC\x90\xA6",
+ "\x9C\x8C" => "\xEC\x90\xA7",
+ "\x9C\x8D" => "\xEC\x90\xA8",
+ "\x9C\x8E" => "\xEC\x90\xA9",
+ "\x9C\x8F" => "\xEC\x90\xAA",
+ "\x9C\x90" => "\xEC\x90\xAB",
+ "\x9C\x91" => "\xEC\x90\xAD",
+ "\x9C\x92" => "\xEC\x90\xAE",
+ "\x9C\x93" => "\xEC\x90\xAF",
+ "\x9C\x94" => "\xEC\x90\xB1",
+ "\x9C\x95" => "\xEC\x90\xB2",
+ "\x9C\x96" => "\xEC\x90\xB3",
+ "\x9C\x97" => "\xEC\x90\xB5",
+ "\x9C\x98" => "\xEC\x90\xB6",
+ "\x9C\x99" => "\xEC\x90\xB7",
+ "\x9C\x9A" => "\xEC\x90\xB8",
+ "\x9C\x9B" => "\xEC\x90\xB9",
+ "\x9C\x9C" => "\xEC\x90\xBA",
+ "\x9C\x9D" => "\xEC\x90\xBB",
+ "\x9C\x9E" => "\xEC\x90\xBE",
+ "\x9C\x9F" => "\xEC\x90\xBF",
+ "\x9C\xA0" => "\xEC\x91\x80",
+ "\x9C\xA1" => "\xEC\x91\x81",
+ "\x9C\xA2" => "\xEC\x91\x82",
+ "\x9C\xA3" => "\xEC\x91\x83",
+ "\x9C\xA4" => "\xEC\x91\x84",
+ "\x9C\xA5" => "\xEC\x91\x85",
+ "\x9C\xA6" => "\xEC\x91\x86",
+ "\x9C\xA7" => "\xEC\x91\x87",
+ "\x9C\xA8" => "\xEC\x91\x89",
+ "\x9C\xA9" => "\xEC\x91\x8A",
+ "\x9C\xAA" => "\xEC\x91\x8B",
+ "\x9C\xAB" => "\xEC\x91\x8C",
+ "\x9C\xAC" => "\xEC\x91\x8D",
+ "\x9C\xAD" => "\xEC\x91\x8E",
+ "\x9C\xAE" => "\xEC\x91\x8F",
+ "\x9C\xAF" => "\xEC\x91\x90",
+ "\x9C\xB0" => "\xEC\x91\x91",
+ "\x9C\xB1" => "\xEC\x91\x92",
+ "\x9C\xB2" => "\xEC\x91\x93",
+ "\x9C\xB3" => "\xEC\x91\x94",
+ "\x9C\xB4" => "\xEC\x91\x95",
+ "\x9C\xB5" => "\xEC\x91\x96",
+ "\x9C\xB6" => "\xEC\x91\x97",
+ "\x9C\xB7" => "\xEC\x91\x98",
+ "\x9C\xB8" => "\xEC\x91\x99",
+ "\x9C\xB9" => "\xEC\x91\x9A",
+ "\x9C\xBA" => "\xEC\x91\x9B",
+ "\x9C\xBB" => "\xEC\x91\x9C",
+ "\x9C\xBC" => "\xEC\x91\x9D",
+ "\x9C\xBD" => "\xEC\x91\x9E",
+ "\x9C\xBE" => "\xEC\x91\x9F",
+ "\x9C\xBF" => "\xEC\x91\xA0",
+ "\x9C\xC0" => "\xEC\x91\xA1",
+ "\x9C\xC1" => "\xEC\x91\xA2",
+ "\x9C\xC2" => "\xEC\x91\xA3",
+ "\x9C\xC3" => "\xEC\x91\xA6",
+ "\x9C\xC4" => "\xEC\x91\xA7",
+ "\x9C\xC5" => "\xEC\x91\xA9",
+ "\x9C\xC6" => "\xEC\x91\xAA",
+ "\x9C\xC7" => "\xEC\x91\xAB",
+ "\x9C\xC8" => "\xEC\x91\xAD",
+ "\x9C\xC9" => "\xEC\x91\xAE",
+ "\x9C\xCA" => "\xEC\x91\xAF",
+ "\x9C\xCB" => "\xEC\x91\xB0",
+ "\x9C\xCC" => "\xEC\x91\xB1",
+ "\x9C\xCD" => "\xEC\x91\xB2",
+ "\x9C\xCE" => "\xEC\x91\xB3",
+ "\x9C\xCF" => "\xEC\x91\xB6",
+ "\x9C\xD0" => "\xEC\x91\xB7",
+ "\x9C\xD1" => "\xEC\x91\xB8",
+ "\x9C\xD2" => "\xEC\x91\xBA",
+ "\x9C\xD3" => "\xEC\x91\xBB",
+ "\x9C\xD4" => "\xEC\x91\xBC",
+ "\x9C\xD5" => "\xEC\x91\xBD",
+ "\x9C\xD6" => "\xEC\x91\xBE",
+ "\x9C\xD7" => "\xEC\x91\xBF",
+ "\x9C\xD8" => "\xEC\x92\x81",
+ "\x9C\xD9" => "\xEC\x92\x82",
+ "\x9C\xDA" => "\xEC\x92\x83",
+ "\x9C\xDB" => "\xEC\x92\x84",
+ "\x9C\xDC" => "\xEC\x92\x85",
+ "\x9C\xDD" => "\xEC\x92\x86",
+ "\x9C\xDE" => "\xEC\x92\x87",
+ "\x9C\xDF" => "\xEC\x92\x88",
+ "\x9C\xE0" => "\xEC\x92\x89",
+ "\x9C\xE1" => "\xEC\x92\x8A",
+ "\x9C\xE2" => "\xEC\x92\x8B",
+ "\x9C\xE3" => "\xEC\x92\x8C",
+ "\x9C\xE4" => "\xEC\x92\x8D",
+ "\x9C\xE5" => "\xEC\x92\x8E",
+ "\x9C\xE6" => "\xEC\x92\x8F",
+ "\x9C\xE7" => "\xEC\x92\x90",
+ "\x9C\xE8" => "\xEC\x92\x91",
+ "\x9C\xE9" => "\xEC\x92\x92",
+ "\x9C\xEA" => "\xEC\x92\x93",
+ "\x9C\xEB" => "\xEC\x92\x95",
+ "\x9C\xEC" => "\xEC\x92\x96",
+ "\x9C\xED" => "\xEC\x92\x97",
+ "\x9C\xEE" => "\xEC\x92\x98",
+ "\x9C\xEF" => "\xEC\x92\x99",
+ "\x9C\xF0" => "\xEC\x92\x9A",
+ "\x9C\xF1" => "\xEC\x92\x9B",
+ "\x9C\xF2" => "\xEC\x92\x9D",
+ "\x9C\xF3" => "\xEC\x92\x9E",
+ "\x9C\xF4" => "\xEC\x92\x9F",
+ "\x9C\xF5" => "\xEC\x92\xA0",
+ "\x9C\xF6" => "\xEC\x92\xA1",
+ "\x9C\xF7" => "\xEC\x92\xA2",
+ "\x9C\xF8" => "\xEC\x92\xA3",
+ "\x9C\xF9" => "\xEC\x92\xA4",
+ "\x9C\xFA" => "\xEC\x92\xA5",
+ "\x9C\xFB" => "\xEC\x92\xA6",
+ "\x9C\xFC" => "\xEC\x92\xA7",
+ "\x9C\xFD" => "\xEC\x92\xA8",
+ "\x9C\xFE" => "\xEC\x92\xA9",
+ "\x9D\x41" => "\xEC\x92\xAA",
+ "\x9D\x42" => "\xEC\x92\xAB",
+ "\x9D\x43" => "\xEC\x92\xAC",
+ "\x9D\x44" => "\xEC\x92\xAD",
+ "\x9D\x45" => "\xEC\x92\xAE",
+ "\x9D\x46" => "\xEC\x92\xAF",
+ "\x9D\x47" => "\xEC\x92\xB0",
+ "\x9D\x48" => "\xEC\x92\xB1",
+ "\x9D\x49" => "\xEC\x92\xB2",
+ "\x9D\x4A" => "\xEC\x92\xB3",
+ "\x9D\x4B" => "\xEC\x92\xB4",
+ "\x9D\x4C" => "\xEC\x92\xB5",
+ "\x9D\x4D" => "\xEC\x92\xB6",
+ "\x9D\x4E" => "\xEC\x92\xB7",
+ "\x9D\x4F" => "\xEC\x92\xB9",
+ "\x9D\x50" => "\xEC\x92\xBA",
+ "\x9D\x51" => "\xEC\x92\xBB",
+ "\x9D\x52" => "\xEC\x92\xBD",
+ "\x9D\x53" => "\xEC\x92\xBE",
+ "\x9D\x54" => "\xEC\x92\xBF",
+ "\x9D\x55" => "\xEC\x93\x80",
+ "\x9D\x56" => "\xEC\x93\x81",
+ "\x9D\x57" => "\xEC\x93\x82",
+ "\x9D\x58" => "\xEC\x93\x83",
+ "\x9D\x59" => "\xEC\x93\x84",
+ "\x9D\x5A" => "\xEC\x93\x85",
+ "\x9D\x61" => "\xEC\x93\x86",
+ "\x9D\x62" => "\xEC\x93\x87",
+ "\x9D\x63" => "\xEC\x93\x88",
+ "\x9D\x64" => "\xEC\x93\x89",
+ "\x9D\x65" => "\xEC\x93\x8A",
+ "\x9D\x66" => "\xEC\x93\x8B",
+ "\x9D\x67" => "\xEC\x93\x8C",
+ "\x9D\x68" => "\xEC\x93\x8D",
+ "\x9D\x69" => "\xEC\x93\x8E",
+ "\x9D\x6A" => "\xEC\x93\x8F",
+ "\x9D\x6B" => "\xEC\x93\x90",
+ "\x9D\x6C" => "\xEC\x93\x91",
+ "\x9D\x6D" => "\xEC\x93\x92",
+ "\x9D\x6E" => "\xEC\x93\x93",
+ "\x9D\x6F" => "\xEC\x93\x94",
+ "\x9D\x70" => "\xEC\x93\x95",
+ "\x9D\x71" => "\xEC\x93\x96",
+ "\x9D\x72" => "\xEC\x93\x97",
+ "\x9D\x73" => "\xEC\x93\x98",
+ "\x9D\x74" => "\xEC\x93\x99",
+ "\x9D\x75" => "\xEC\x93\x9A",
+ "\x9D\x76" => "\xEC\x93\x9B",
+ "\x9D\x77" => "\xEC\x93\x9C",
+ "\x9D\x78" => "\xEC\x93\x9D",
+ "\x9D\x79" => "\xEC\x93\x9E",
+ "\x9D\x7A" => "\xEC\x93\x9F",
+ "\x9D\x81" => "\xEC\x93\xA0",
+ "\x9D\x82" => "\xEC\x93\xA1",
+ "\x9D\x83" => "\xEC\x93\xA2",
+ "\x9D\x84" => "\xEC\x93\xA3",
+ "\x9D\x85" => "\xEC\x93\xA4",
+ "\x9D\x86" => "\xEC\x93\xA5",
+ "\x9D\x87" => "\xEC\x93\xA6",
+ "\x9D\x88" => "\xEC\x93\xA7",
+ "\x9D\x89" => "\xEC\x93\xA8",
+ "\x9D\x8A" => "\xEC\x93\xAA",
+ "\x9D\x8B" => "\xEC\x93\xAB",
+ "\x9D\x8C" => "\xEC\x93\xAC",
+ "\x9D\x8D" => "\xEC\x93\xAD",
+ "\x9D\x8E" => "\xEC\x93\xAE",
+ "\x9D\x8F" => "\xEC\x93\xAF",
+ "\x9D\x90" => "\xEC\x93\xB2",
+ "\x9D\x91" => "\xEC\x93\xB3",
+ "\x9D\x92" => "\xEC\x93\xB5",
+ "\x9D\x93" => "\xEC\x93\xB6",
+ "\x9D\x94" => "\xEC\x93\xB7",
+ "\x9D\x95" => "\xEC\x93\xB9",
+ "\x9D\x96" => "\xEC\x93\xBB",
+ "\x9D\x97" => "\xEC\x93\xBC",
+ "\x9D\x98" => "\xEC\x93\xBD",
+ "\x9D\x99" => "\xEC\x93\xBE",
+ "\x9D\x9A" => "\xEC\x94\x82",
+ "\x9D\x9B" => "\xEC\x94\x83",
+ "\x9D\x9C" => "\xEC\x94\x84",
+ "\x9D\x9D" => "\xEC\x94\x85",
+ "\x9D\x9E" => "\xEC\x94\x86",
+ "\x9D\x9F" => "\xEC\x94\x87",
+ "\x9D\xA0" => "\xEC\x94\x88",
+ "\x9D\xA1" => "\xEC\x94\x89",
+ "\x9D\xA2" => "\xEC\x94\x8A",
+ "\x9D\xA3" => "\xEC\x94\x8B",
+ "\x9D\xA4" => "\xEC\x94\x8D",
+ "\x9D\xA5" => "\xEC\x94\x8E",
+ "\x9D\xA6" => "\xEC\x94\x8F",
+ "\x9D\xA7" => "\xEC\x94\x91",
+ "\x9D\xA8" => "\xEC\x94\x92",
+ "\x9D\xA9" => "\xEC\x94\x93",
+ "\x9D\xAA" => "\xEC\x94\x95",
+ "\x9D\xAB" => "\xEC\x94\x96",
+ "\x9D\xAC" => "\xEC\x94\x97",
+ "\x9D\xAD" => "\xEC\x94\x98",
+ "\x9D\xAE" => "\xEC\x94\x99",
+ "\x9D\xAF" => "\xEC\x94\x9A",
+ "\x9D\xB0" => "\xEC\x94\x9B",
+ "\x9D\xB1" => "\xEC\x94\x9D",
+ "\x9D\xB2" => "\xEC\x94\x9E",
+ "\x9D\xB3" => "\xEC\x94\x9F",
+ "\x9D\xB4" => "\xEC\x94\xA0",
+ "\x9D\xB5" => "\xEC\x94\xA1",
+ "\x9D\xB6" => "\xEC\x94\xA2",
+ "\x9D\xB7" => "\xEC\x94\xA3",
+ "\x9D\xB8" => "\xEC\x94\xA4",
+ "\x9D\xB9" => "\xEC\x94\xA5",
+ "\x9D\xBA" => "\xEC\x94\xA6",
+ "\x9D\xBB" => "\xEC\x94\xA7",
+ "\x9D\xBC" => "\xEC\x94\xAA",
+ "\x9D\xBD" => "\xEC\x94\xAB",
+ "\x9D\xBE" => "\xEC\x94\xAD",
+ "\x9D\xBF" => "\xEC\x94\xAE",
+ "\x9D\xC0" => "\xEC\x94\xAF",
+ "\x9D\xC1" => "\xEC\x94\xB1",
+ "\x9D\xC2" => "\xEC\x94\xB2",
+ "\x9D\xC3" => "\xEC\x94\xB3",
+ "\x9D\xC4" => "\xEC\x94\xB4",
+ "\x9D\xC5" => "\xEC\x94\xB5",
+ "\x9D\xC6" => "\xEC\x94\xB6",
+ "\x9D\xC7" => "\xEC\x94\xB7",
+ "\x9D\xC8" => "\xEC\x94\xBA",
+ "\x9D\xC9" => "\xEC\x94\xBC",
+ "\x9D\xCA" => "\xEC\x94\xBE",
+ "\x9D\xCB" => "\xEC\x94\xBF",
+ "\x9D\xCC" => "\xEC\x95\x80",
+ "\x9D\xCD" => "\xEC\x95\x81",
+ "\x9D\xCE" => "\xEC\x95\x82",
+ "\x9D\xCF" => "\xEC\x95\x83",
+ "\x9D\xD0" => "\xEC\x95\x86",
+ "\x9D\xD1" => "\xEC\x95\x87",
+ "\x9D\xD2" => "\xEC\x95\x8B",
+ "\x9D\xD3" => "\xEC\x95\x8F",
+ "\x9D\xD4" => "\xEC\x95\x90",
+ "\x9D\xD5" => "\xEC\x95\x91",
+ "\x9D\xD6" => "\xEC\x95\x92",
+ "\x9D\xD7" => "\xEC\x95\x96",
+ "\x9D\xD8" => "\xEC\x95\x9A",
+ "\x9D\xD9" => "\xEC\x95\x9B",
+ "\x9D\xDA" => "\xEC\x95\x9C",
+ "\x9D\xDB" => "\xEC\x95\x9F",
+ "\x9D\xDC" => "\xEC\x95\xA2",
+ "\x9D\xDD" => "\xEC\x95\xA3",
+ "\x9D\xDE" => "\xEC\x95\xA5",
+ "\x9D\xDF" => "\xEC\x95\xA6",
+ "\x9D\xE0" => "\xEC\x95\xA7",
+ "\x9D\xE1" => "\xEC\x95\xA9",
+ "\x9D\xE2" => "\xEC\x95\xAA",
+ "\x9D\xE3" => "\xEC\x95\xAB",
+ "\x9D\xE4" => "\xEC\x95\xAC",
+ "\x9D\xE5" => "\xEC\x95\xAD",
+ "\x9D\xE6" => "\xEC\x95\xAE",
+ "\x9D\xE7" => "\xEC\x95\xAF",
+ "\x9D\xE8" => "\xEC\x95\xB2",
+ "\x9D\xE9" => "\xEC\x95\xB6",
+ "\x9D\xEA" => "\xEC\x95\xB7",
+ "\x9D\xEB" => "\xEC\x95\xB8",
+ "\x9D\xEC" => "\xEC\x95\xB9",
+ "\x9D\xED" => "\xEC\x95\xBA",
+ "\x9D\xEE" => "\xEC\x95\xBB",
+ "\x9D\xEF" => "\xEC\x95\xBE",
+ "\x9D\xF0" => "\xEC\x95\xBF",
+ "\x9D\xF1" => "\xEC\x96\x81",
+ "\x9D\xF2" => "\xEC\x96\x82",
+ "\x9D\xF3" => "\xEC\x96\x83",
+ "\x9D\xF4" => "\xEC\x96\x85",
+ "\x9D\xF5" => "\xEC\x96\x86",
+ "\x9D\xF6" => "\xEC\x96\x88",
+ "\x9D\xF7" => "\xEC\x96\x89",
+ "\x9D\xF8" => "\xEC\x96\x8A",
+ "\x9D\xF9" => "\xEC\x96\x8B",
+ "\x9D\xFA" => "\xEC\x96\x8E",
+ "\x9D\xFB" => "\xEC\x96\x90",
+ "\x9D\xFC" => "\xEC\x96\x92",
+ "\x9D\xFD" => "\xEC\x96\x93",
+ "\x9D\xFE" => "\xEC\x96\x94",
+ "\x9E\x41" => "\xEC\x96\x96",
+ "\x9E\x42" => "\xEC\x96\x99",
+ "\x9E\x43" => "\xEC\x96\x9A",
+ "\x9E\x44" => "\xEC\x96\x9B",
+ "\x9E\x45" => "\xEC\x96\x9D",
+ "\x9E\x46" => "\xEC\x96\x9E",
+ "\x9E\x47" => "\xEC\x96\x9F",
+ "\x9E\x48" => "\xEC\x96\xA1",
+ "\x9E\x49" => "\xEC\x96\xA2",
+ "\x9E\x4A" => "\xEC\x96\xA3",
+ "\x9E\x4B" => "\xEC\x96\xA4",
+ "\x9E\x4C" => "\xEC\x96\xA5",
+ "\x9E\x4D" => "\xEC\x96\xA6",
+ "\x9E\x4E" => "\xEC\x96\xA7",
+ "\x9E\x4F" => "\xEC\x96\xA8",
+ "\x9E\x50" => "\xEC\x96\xAA",
+ "\x9E\x51" => "\xEC\x96\xAB",
+ "\x9E\x52" => "\xEC\x96\xAC",
+ "\x9E\x53" => "\xEC\x96\xAD",
+ "\x9E\x54" => "\xEC\x96\xAE",
+ "\x9E\x55" => "\xEC\x96\xAF",
+ "\x9E\x56" => "\xEC\x96\xB0",
+ "\x9E\x57" => "\xEC\x96\xB1",
+ "\x9E\x58" => "\xEC\x96\xB2",
+ "\x9E\x59" => "\xEC\x96\xB3",
+ "\x9E\x5A" => "\xEC\x96\xB6",
+ "\x9E\x61" => "\xEC\x96\xB7",
+ "\x9E\x62" => "\xEC\x96\xBA",
+ "\x9E\x63" => "\xEC\x96\xBF",
+ "\x9E\x64" => "\xEC\x97\x80",
+ "\x9E\x65" => "\xEC\x97\x81",
+ "\x9E\x66" => "\xEC\x97\x82",
+ "\x9E\x67" => "\xEC\x97\x83",
+ "\x9E\x68" => "\xEC\x97\x8B",
+ "\x9E\x69" => "\xEC\x97\x8D",
+ "\x9E\x6A" => "\xEC\x97\x8F",
+ "\x9E\x6B" => "\xEC\x97\x92",
+ "\x9E\x6C" => "\xEC\x97\x93",
+ "\x9E\x6D" => "\xEC\x97\x95",
+ "\x9E\x6E" => "\xEC\x97\x96",
+ "\x9E\x6F" => "\xEC\x97\x97",
+ "\x9E\x70" => "\xEC\x97\x99",
+ "\x9E\x71" => "\xEC\x97\x9A",
+ "\x9E\x72" => "\xEC\x97\x9B",
+ "\x9E\x73" => "\xEC\x97\x9C",
+ "\x9E\x74" => "\xEC\x97\x9D",
+ "\x9E\x75" => "\xEC\x97\x9E",
+ "\x9E\x76" => "\xEC\x97\x9F",
+ "\x9E\x77" => "\xEC\x97\xA2",
+ "\x9E\x78" => "\xEC\x97\xA4",
+ "\x9E\x79" => "\xEC\x97\xA6",
+ "\x9E\x7A" => "\xEC\x97\xA7",
+ "\x9E\x81" => "\xEC\x97\xA8",
+ "\x9E\x82" => "\xEC\x97\xA9",
+ "\x9E\x83" => "\xEC\x97\xAA",
+ "\x9E\x84" => "\xEC\x97\xAB",
+ "\x9E\x85" => "\xEC\x97\xAF",
+ "\x9E\x86" => "\xEC\x97\xB1",
+ "\x9E\x87" => "\xEC\x97\xB2",
+ "\x9E\x88" => "\xEC\x97\xB3",
+ "\x9E\x89" => "\xEC\x97\xB5",
+ "\x9E\x8A" => "\xEC\x97\xB8",
+ "\x9E\x8B" => "\xEC\x97\xB9",
+ "\x9E\x8C" => "\xEC\x97\xBA",
+ "\x9E\x8D" => "\xEC\x97\xBB",
+ "\x9E\x8E" => "\xEC\x98\x82",
+ "\x9E\x8F" => "\xEC\x98\x83",
+ "\x9E\x90" => "\xEC\x98\x84",
+ "\x9E\x91" => "\xEC\x98\x89",
+ "\x9E\x92" => "\xEC\x98\x8A",
+ "\x9E\x93" => "\xEC\x98\x8B",
+ "\x9E\x94" => "\xEC\x98\x8D",
+ "\x9E\x95" => "\xEC\x98\x8E",
+ "\x9E\x96" => "\xEC\x98\x8F",
+ "\x9E\x97" => "\xEC\x98\x91",
+ "\x9E\x98" => "\xEC\x98\x92",
+ "\x9E\x99" => "\xEC\x98\x93",
+ "\x9E\x9A" => "\xEC\x98\x94",
+ "\x9E\x9B" => "\xEC\x98\x95",
+ "\x9E\x9C" => "\xEC\x98\x96",
+ "\x9E\x9D" => "\xEC\x98\x97",
+ "\x9E\x9E" => "\xEC\x98\x9A",
+ "\x9E\x9F" => "\xEC\x98\x9D",
+ "\x9E\xA0" => "\xEC\x98\x9E",
+ "\x9E\xA1" => "\xEC\x98\x9F",
+ "\x9E\xA2" => "\xEC\x98\xA0",
+ "\x9E\xA3" => "\xEC\x98\xA1",
+ "\x9E\xA4" => "\xEC\x98\xA2",
+ "\x9E\xA5" => "\xEC\x98\xA3",
+ "\x9E\xA6" => "\xEC\x98\xA6",
+ "\x9E\xA7" => "\xEC\x98\xA7",
+ "\x9E\xA8" => "\xEC\x98\xA9",
+ "\x9E\xA9" => "\xEC\x98\xAA",
+ "\x9E\xAA" => "\xEC\x98\xAB",
+ "\x9E\xAB" => "\xEC\x98\xAF",
+ "\x9E\xAC" => "\xEC\x98\xB1",
+ "\x9E\xAD" => "\xEC\x98\xB2",
+ "\x9E\xAE" => "\xEC\x98\xB6",
+ "\x9E\xAF" => "\xEC\x98\xB8",
+ "\x9E\xB0" => "\xEC\x98\xBA",
+ "\x9E\xB1" => "\xEC\x98\xBC",
+ "\x9E\xB2" => "\xEC\x98\xBD",
+ "\x9E\xB3" => "\xEC\x98\xBE",
+ "\x9E\xB4" => "\xEC\x98\xBF",
+ "\x9E\xB5" => "\xEC\x99\x82",
+ "\x9E\xB6" => "\xEC\x99\x83",
+ "\x9E\xB7" => "\xEC\x99\x85",
+ "\x9E\xB8" => "\xEC\x99\x86",
+ "\x9E\xB9" => "\xEC\x99\x87",
+ "\x9E\xBA" => "\xEC\x99\x89",
+ "\x9E\xBB" => "\xEC\x99\x8A",
+ "\x9E\xBC" => "\xEC\x99\x8B",
+ "\x9E\xBD" => "\xEC\x99\x8C",
+ "\x9E\xBE" => "\xEC\x99\x8D",
+ "\x9E\xBF" => "\xEC\x99\x8E",
+ "\x9E\xC0" => "\xEC\x99\x8F",
+ "\x9E\xC1" => "\xEC\x99\x92",
+ "\x9E\xC2" => "\xEC\x99\x96",
+ "\x9E\xC3" => "\xEC\x99\x97",
+ "\x9E\xC4" => "\xEC\x99\x98",
+ "\x9E\xC5" => "\xEC\x99\x99",
+ "\x9E\xC6" => "\xEC\x99\x9A",
+ "\x9E\xC7" => "\xEC\x99\x9B",
+ "\x9E\xC8" => "\xEC\x99\x9E",
+ "\x9E\xC9" => "\xEC\x99\x9F",
+ "\x9E\xCA" => "\xEC\x99\xA1",
+ "\x9E\xCB" => "\xEC\x99\xA2",
+ "\x9E\xCC" => "\xEC\x99\xA3",
+ "\x9E\xCD" => "\xEC\x99\xA4",
+ "\x9E\xCE" => "\xEC\x99\xA5",
+ "\x9E\xCF" => "\xEC\x99\xA6",
+ "\x9E\xD0" => "\xEC\x99\xA7",
+ "\x9E\xD1" => "\xEC\x99\xA8",
+ "\x9E\xD2" => "\xEC\x99\xA9",
+ "\x9E\xD3" => "\xEC\x99\xAA",
+ "\x9E\xD4" => "\xEC\x99\xAB",
+ "\x9E\xD5" => "\xEC\x99\xAD",
+ "\x9E\xD6" => "\xEC\x99\xAE",
+ "\x9E\xD7" => "\xEC\x99\xB0",
+ "\x9E\xD8" => "\xEC\x99\xB2",
+ "\x9E\xD9" => "\xEC\x99\xB3",
+ "\x9E\xDA" => "\xEC\x99\xB4",
+ "\x9E\xDB" => "\xEC\x99\xB5",
+ "\x9E\xDC" => "\xEC\x99\xB6",
+ "\x9E\xDD" => "\xEC\x99\xB7",
+ "\x9E\xDE" => "\xEC\x99\xBA",
+ "\x9E\xDF" => "\xEC\x99\xBB",
+ "\x9E\xE0" => "\xEC\x99\xBD",
+ "\x9E\xE1" => "\xEC\x99\xBE",
+ "\x9E\xE2" => "\xEC\x99\xBF",
+ "\x9E\xE3" => "\xEC\x9A\x81",
+ "\x9E\xE4" => "\xEC\x9A\x82",
+ "\x9E\xE5" => "\xEC\x9A\x83",
+ "\x9E\xE6" => "\xEC\x9A\x84",
+ "\x9E\xE7" => "\xEC\x9A\x85",
+ "\x9E\xE8" => "\xEC\x9A\x86",
+ "\x9E\xE9" => "\xEC\x9A\x87",
+ "\x9E\xEA" => "\xEC\x9A\x8A",
+ "\x9E\xEB" => "\xEC\x9A\x8C",
+ "\x9E\xEC" => "\xEC\x9A\x8E",
+ "\x9E\xED" => "\xEC\x9A\x8F",
+ "\x9E\xEE" => "\xEC\x9A\x90",
+ "\x9E\xEF" => "\xEC\x9A\x91",
+ "\x9E\xF0" => "\xEC\x9A\x92",
+ "\x9E\xF1" => "\xEC\x9A\x93",
+ "\x9E\xF2" => "\xEC\x9A\x96",
+ "\x9E\xF3" => "\xEC\x9A\x97",
+ "\x9E\xF4" => "\xEC\x9A\x99",
+ "\x9E\xF5" => "\xEC\x9A\x9A",
+ "\x9E\xF6" => "\xEC\x9A\x9B",
+ "\x9E\xF7" => "\xEC\x9A\x9D",
+ "\x9E\xF8" => "\xEC\x9A\x9E",
+ "\x9E\xF9" => "\xEC\x9A\x9F",
+ "\x9E\xFA" => "\xEC\x9A\xA0",
+ "\x9E\xFB" => "\xEC\x9A\xA1",
+ "\x9E\xFC" => "\xEC\x9A\xA2",
+ "\x9E\xFD" => "\xEC\x9A\xA3",
+ "\x9E\xFE" => "\xEC\x9A\xA6",
+ "\x9F\x41" => "\xEC\x9A\xA8",
+ "\x9F\x42" => "\xEC\x9A\xAA",
+ "\x9F\x43" => "\xEC\x9A\xAB",
+ "\x9F\x44" => "\xEC\x9A\xAC",
+ "\x9F\x45" => "\xEC\x9A\xAD",
+ "\x9F\x46" => "\xEC\x9A\xAE",
+ "\x9F\x47" => "\xEC\x9A\xAF",
+ "\x9F\x48" => "\xEC\x9A\xB2",
+ "\x9F\x49" => "\xEC\x9A\xB3",
+ "\x9F\x4A" => "\xEC\x9A\xB5",
+ "\x9F\x4B" => "\xEC\x9A\xB6",
+ "\x9F\x4C" => "\xEC\x9A\xB7",
+ "\x9F\x4D" => "\xEC\x9A\xBB",
+ "\x9F\x4E" => "\xEC\x9A\xBC",
+ "\x9F\x4F" => "\xEC\x9A\xBD",
+ "\x9F\x50" => "\xEC\x9A\xBE",
+ "\x9F\x51" => "\xEC\x9A\xBF",
+ "\x9F\x52" => "\xEC\x9B\x82",
+ "\x9F\x53" => "\xEC\x9B\x84",
+ "\x9F\x54" => "\xEC\x9B\x86",
+ "\x9F\x55" => "\xEC\x9B\x87",
+ "\x9F\x56" => "\xEC\x9B\x88",
+ "\x9F\x57" => "\xEC\x9B\x89",
+ "\x9F\x58" => "\xEC\x9B\x8A",
+ "\x9F\x59" => "\xEC\x9B\x8B",
+ "\x9F\x5A" => "\xEC\x9B\x8E",
+ "\x9F\x61" => "\xEC\x9B\x8F",
+ "\x9F\x62" => "\xEC\x9B\x91",
+ "\x9F\x63" => "\xEC\x9B\x92",
+ "\x9F\x64" => "\xEC\x9B\x93",
+ "\x9F\x65" => "\xEC\x9B\x95",
+ "\x9F\x66" => "\xEC\x9B\x96",
+ "\x9F\x67" => "\xEC\x9B\x97",
+ "\x9F\x68" => "\xEC\x9B\x98",
+ "\x9F\x69" => "\xEC\x9B\x99",
+ "\x9F\x6A" => "\xEC\x9B\x9A",
+ "\x9F\x6B" => "\xEC\x9B\x9B",
+ "\x9F\x6C" => "\xEC\x9B\x9E",
+ "\x9F\x6D" => "\xEC\x9B\x9F",
+ "\x9F\x6E" => "\xEC\x9B\xA2",
+ "\x9F\x6F" => "\xEC\x9B\xA3",
+ "\x9F\x70" => "\xEC\x9B\xA4",
+ "\x9F\x71" => "\xEC\x9B\xA5",
+ "\x9F\x72" => "\xEC\x9B\xA6",
+ "\x9F\x73" => "\xEC\x9B\xA7",
+ "\x9F\x74" => "\xEC\x9B\xAA",
+ "\x9F\x75" => "\xEC\x9B\xAB",
+ "\x9F\x76" => "\xEC\x9B\xAD",
+ "\x9F\x77" => "\xEC\x9B\xAE",
+ "\x9F\x78" => "\xEC\x9B\xAF",
+ "\x9F\x79" => "\xEC\x9B\xB1",
+ "\x9F\x7A" => "\xEC\x9B\xB2",
+ "\x9F\x81" => "\xEC\x9B\xB3",
+ "\x9F\x82" => "\xEC\x9B\xB4",
+ "\x9F\x83" => "\xEC\x9B\xB5",
+ "\x9F\x84" => "\xEC\x9B\xB6",
+ "\x9F\x85" => "\xEC\x9B\xB7",
+ "\x9F\x86" => "\xEC\x9B\xBA",
+ "\x9F\x87" => "\xEC\x9B\xBB",
+ "\x9F\x88" => "\xEC\x9B\xBC",
+ "\x9F\x89" => "\xEC\x9B\xBE",
+ "\x9F\x8A" => "\xEC\x9B\xBF",
+ "\x9F\x8B" => "\xEC\x9C\x80",
+ "\x9F\x8C" => "\xEC\x9C\x81",
+ "\x9F\x8D" => "\xEC\x9C\x82",
+ "\x9F\x8E" => "\xEC\x9C\x83",
+ "\x9F\x8F" => "\xEC\x9C\x86",
+ "\x9F\x90" => "\xEC\x9C\x87",
+ "\x9F\x91" => "\xEC\x9C\x89",
+ "\x9F\x92" => "\xEC\x9C\x8A",
+ "\x9F\x93" => "\xEC\x9C\x8B",
+ "\x9F\x94" => "\xEC\x9C\x8D",
+ "\x9F\x95" => "\xEC\x9C\x8E",
+ "\x9F\x96" => "\xEC\x9C\x8F",
+ "\x9F\x97" => "\xEC\x9C\x90",
+ "\x9F\x98" => "\xEC\x9C\x91",
+ "\x9F\x99" => "\xEC\x9C\x92",
+ "\x9F\x9A" => "\xEC\x9C\x93",
+ "\x9F\x9B" => "\xEC\x9C\x96",
+ "\x9F\x9C" => "\xEC\x9C\x98",
+ "\x9F\x9D" => "\xEC\x9C\x9A",
+ "\x9F\x9E" => "\xEC\x9C\x9B",
+ "\x9F\x9F" => "\xEC\x9C\x9C",
+ "\x9F\xA0" => "\xEC\x9C\x9D",
+ "\x9F\xA1" => "\xEC\x9C\x9E",
+ "\x9F\xA2" => "\xEC\x9C\x9F",
+ "\x9F\xA3" => "\xEC\x9C\xA2",
+ "\x9F\xA4" => "\xEC\x9C\xA3",
+ "\x9F\xA5" => "\xEC\x9C\xA5",
+ "\x9F\xA6" => "\xEC\x9C\xA6",
+ "\x9F\xA7" => "\xEC\x9C\xA7",
+ "\x9F\xA8" => "\xEC\x9C\xA9",
+ "\x9F\xA9" => "\xEC\x9C\xAA",
+ "\x9F\xAA" => "\xEC\x9C\xAB",
+ "\x9F\xAB" => "\xEC\x9C\xAC",
+ "\x9F\xAC" => "\xEC\x9C\xAD",
+ "\x9F\xAD" => "\xEC\x9C\xAE",
+ "\x9F\xAE" => "\xEC\x9C\xAF",
+ "\x9F\xAF" => "\xEC\x9C\xB2",
+ "\x9F\xB0" => "\xEC\x9C\xB4",
+ "\x9F\xB1" => "\xEC\x9C\xB6",
+ "\x9F\xB2" => "\xEC\x9C\xB8",
+ "\x9F\xB3" => "\xEC\x9C\xB9",
+ "\x9F\xB4" => "\xEC\x9C\xBA",
+ "\x9F\xB5" => "\xEC\x9C\xBB",
+ "\x9F\xB6" => "\xEC\x9C\xBE",
+ "\x9F\xB7" => "\xEC\x9C\xBF",
+ "\x9F\xB8" => "\xEC\x9D\x81",
+ "\x9F\xB9" => "\xEC\x9D\x82",
+ "\x9F\xBA" => "\xEC\x9D\x83",
+ "\x9F\xBB" => "\xEC\x9D\x85",
+ "\x9F\xBC" => "\xEC\x9D\x86",
+ "\x9F\xBD" => "\xEC\x9D\x87",
+ "\x9F\xBE" => "\xEC\x9D\x88",
+ "\x9F\xBF" => "\xEC\x9D\x89",
+ "\x9F\xC0" => "\xEC\x9D\x8B",
+ "\x9F\xC1" => "\xEC\x9D\x8E",
+ "\x9F\xC2" => "\xEC\x9D\x90",
+ "\x9F\xC3" => "\xEC\x9D\x99",
+ "\x9F\xC4" => "\xEC\x9D\x9A",
+ "\x9F\xC5" => "\xEC\x9D\x9B",
+ "\x9F\xC6" => "\xEC\x9D\x9D",
+ "\x9F\xC7" => "\xEC\x9D\x9E",
+ "\x9F\xC8" => "\xEC\x9D\x9F",
+ "\x9F\xC9" => "\xEC\x9D\xA1",
+ "\x9F\xCA" => "\xEC\x9D\xA2",
+ "\x9F\xCB" => "\xEC\x9D\xA3",
+ "\x9F\xCC" => "\xEC\x9D\xA4",
+ "\x9F\xCD" => "\xEC\x9D\xA5",
+ "\x9F\xCE" => "\xEC\x9D\xA6",
+ "\x9F\xCF" => "\xEC\x9D\xA7",
+ "\x9F\xD0" => "\xEC\x9D\xA9",
+ "\x9F\xD1" => "\xEC\x9D\xAA",
+ "\x9F\xD2" => "\xEC\x9D\xAC",
+ "\x9F\xD3" => "\xEC\x9D\xAD",
+ "\x9F\xD4" => "\xEC\x9D\xAE",
+ "\x9F\xD5" => "\xEC\x9D\xAF",
+ "\x9F\xD6" => "\xEC\x9D\xB0",
+ "\x9F\xD7" => "\xEC\x9D\xB1",
+ "\x9F\xD8" => "\xEC\x9D\xB2",
+ "\x9F\xD9" => "\xEC\x9D\xB3",
+ "\x9F\xDA" => "\xEC\x9D\xB6",
+ "\x9F\xDB" => "\xEC\x9D\xB7",
+ "\x9F\xDC" => "\xEC\x9D\xB9",
+ "\x9F\xDD" => "\xEC\x9D\xBA",
+ "\x9F\xDE" => "\xEC\x9D\xBB",
+ "\x9F\xDF" => "\xEC\x9D\xBF",
+ "\x9F\xE0" => "\xEC\x9E\x80",
+ "\x9F\xE1" => "\xEC\x9E\x81",
+ "\x9F\xE2" => "\xEC\x9E\x82",
+ "\x9F\xE3" => "\xEC\x9E\x86",
+ "\x9F\xE4" => "\xEC\x9E\x8B",
+ "\x9F\xE5" => "\xEC\x9E\x8C",
+ "\x9F\xE6" => "\xEC\x9E\x8D",
+ "\x9F\xE7" => "\xEC\x9E\x8F",
+ "\x9F\xE8" => "\xEC\x9E\x92",
+ "\x9F\xE9" => "\xEC\x9E\x93",
+ "\x9F\xEA" => "\xEC\x9E\x95",
+ "\x9F\xEB" => "\xEC\x9E\x99",
+ "\x9F\xEC" => "\xEC\x9E\x9B",
+ "\x9F\xED" => "\xEC\x9E\x9C",
+ "\x9F\xEE" => "\xEC\x9E\x9D",
+ "\x9F\xEF" => "\xEC\x9E\x9E",
+ "\x9F\xF0" => "\xEC\x9E\x9F",
+ "\x9F\xF1" => "\xEC\x9E\xA2",
+ "\x9F\xF2" => "\xEC\x9E\xA7",
+ "\x9F\xF3" => "\xEC\x9E\xA8",
+ "\x9F\xF4" => "\xEC\x9E\xA9",
+ "\x9F\xF5" => "\xEC\x9E\xAA",
+ "\x9F\xF6" => "\xEC\x9E\xAB",
+ "\x9F\xF7" => "\xEC\x9E\xAE",
+ "\x9F\xF8" => "\xEC\x9E\xAF",
+ "\x9F\xF9" => "\xEC\x9E\xB1",
+ "\x9F\xFA" => "\xEC\x9E\xB2",
+ "\x9F\xFB" => "\xEC\x9E\xB3",
+ "\x9F\xFC" => "\xEC\x9E\xB5",
+ "\x9F\xFD" => "\xEC\x9E\xB6",
+ "\x9F\xFE" => "\xEC\x9E\xB7",
+ "\xA0\x41" => "\xEC\x9E\xB8",
+ "\xA0\x42" => "\xEC\x9E\xB9",
+ "\xA0\x43" => "\xEC\x9E\xBA",
+ "\xA0\x44" => "\xEC\x9E\xBB",
+ "\xA0\x45" => "\xEC\x9E\xBE",
+ "\xA0\x46" => "\xEC\x9F\x82",
+ "\xA0\x47" => "\xEC\x9F\x83",
+ "\xA0\x48" => "\xEC\x9F\x84",
+ "\xA0\x49" => "\xEC\x9F\x85",
+ "\xA0\x4A" => "\xEC\x9F\x86",
+ "\xA0\x4B" => "\xEC\x9F\x87",
+ "\xA0\x4C" => "\xEC\x9F\x8A",
+ "\xA0\x4D" => "\xEC\x9F\x8B",
+ "\xA0\x4E" => "\xEC\x9F\x8D",
+ "\xA0\x4F" => "\xEC\x9F\x8F",
+ "\xA0\x50" => "\xEC\x9F\x91",
+ "\xA0\x51" => "\xEC\x9F\x92",
+ "\xA0\x52" => "\xEC\x9F\x93",
+ "\xA0\x53" => "\xEC\x9F\x94",
+ "\xA0\x54" => "\xEC\x9F\x95",
+ "\xA0\x55" => "\xEC\x9F\x96",
+ "\xA0\x56" => "\xEC\x9F\x97",
+ "\xA0\x57" => "\xEC\x9F\x99",
+ "\xA0\x58" => "\xEC\x9F\x9A",
+ "\xA0\x59" => "\xEC\x9F\x9B",
+ "\xA0\x5A" => "\xEC\x9F\x9C",
+ "\xA0\x61" => "\xEC\x9F\x9E",
+ "\xA0\x62" => "\xEC\x9F\x9F",
+ "\xA0\x63" => "\xEC\x9F\xA0",
+ "\xA0\x64" => "\xEC\x9F\xA1",
+ "\xA0\x65" => "\xEC\x9F\xA2",
+ "\xA0\x66" => "\xEC\x9F\xA3",
+ "\xA0\x67" => "\xEC\x9F\xA5",
+ "\xA0\x68" => "\xEC\x9F\xA6",
+ "\xA0\x69" => "\xEC\x9F\xA7",
+ "\xA0\x6A" => "\xEC\x9F\xA9",
+ "\xA0\x6B" => "\xEC\x9F\xAA",
+ "\xA0\x6C" => "\xEC\x9F\xAB",
+ "\xA0\x6D" => "\xEC\x9F\xAD",
+ "\xA0\x6E" => "\xEC\x9F\xAE",
+ "\xA0\x6F" => "\xEC\x9F\xAF",
+ "\xA0\x70" => "\xEC\x9F\xB0",
+ "\xA0\x71" => "\xEC\x9F\xB1",
+ "\xA0\x72" => "\xEC\x9F\xB2",
+ "\xA0\x73" => "\xEC\x9F\xB3",
+ "\xA0\x74" => "\xEC\x9F\xB4",
+ "\xA0\x75" => "\xEC\x9F\xB5",
+ "\xA0\x76" => "\xEC\x9F\xB6",
+ "\xA0\x77" => "\xEC\x9F\xB7",
+ "\xA0\x78" => "\xEC\x9F\xB8",
+ "\xA0\x79" => "\xEC\x9F\xB9",
+ "\xA0\x7A" => "\xEC\x9F\xBA",
+ "\xA0\x81" => "\xEC\x9F\xBB",
+ "\xA0\x82" => "\xEC\x9F\xBC",
+ "\xA0\x83" => "\xEC\x9F\xBD",
+ "\xA0\x84" => "\xEC\x9F\xBE",
+ "\xA0\x85" => "\xEC\x9F\xBF",
+ "\xA0\x86" => "\xEC\xA0\x82",
+ "\xA0\x87" => "\xEC\xA0\x83",
+ "\xA0\x88" => "\xEC\xA0\x85",
+ "\xA0\x89" => "\xEC\xA0\x86",
+ "\xA0\x8A" => "\xEC\xA0\x87",
+ "\xA0\x8B" => "\xEC\xA0\x89",
+ "\xA0\x8C" => "\xEC\xA0\x8B",
+ "\xA0\x8D" => "\xEC\xA0\x8C",
+ "\xA0\x8E" => "\xEC\xA0\x8D",
+ "\xA0\x8F" => "\xEC\xA0\x8E",
+ "\xA0\x90" => "\xEC\xA0\x8F",
+ "\xA0\x91" => "\xEC\xA0\x92",
+ "\xA0\x92" => "\xEC\xA0\x94",
+ "\xA0\x93" => "\xEC\xA0\x97",
+ "\xA0\x94" => "\xEC\xA0\x98",
+ "\xA0\x95" => "\xEC\xA0\x99",
+ "\xA0\x96" => "\xEC\xA0\x9A",
+ "\xA0\x97" => "\xEC\xA0\x9B",
+ "\xA0\x98" => "\xEC\xA0\x9E",
+ "\xA0\x99" => "\xEC\xA0\x9F",
+ "\xA0\x9A" => "\xEC\xA0\xA1",
+ "\xA0\x9B" => "\xEC\xA0\xA2",
+ "\xA0\x9C" => "\xEC\xA0\xA3",
+ "\xA0\x9D" => "\xEC\xA0\xA5",
+ "\xA0\x9E" => "\xEC\xA0\xA6",
+ "\xA0\x9F" => "\xEC\xA0\xA7",
+ "\xA0\xA0" => "\xEC\xA0\xA8",
+ "\xA0\xA1" => "\xEC\xA0\xA9",
+ "\xA0\xA2" => "\xEC\xA0\xAA",
+ "\xA0\xA3" => "\xEC\xA0\xAB",
+ "\xA0\xA4" => "\xEC\xA0\xAE",
+ "\xA0\xA5" => "\xEC\xA0\xB0",
+ "\xA0\xA6" => "\xEC\xA0\xB2",
+ "\xA0\xA7" => "\xEC\xA0\xB3",
+ "\xA0\xA8" => "\xEC\xA0\xB4",
+ "\xA0\xA9" => "\xEC\xA0\xB5",
+ "\xA0\xAA" => "\xEC\xA0\xB6",
+ "\xA0\xAB" => "\xEC\xA0\xB7",
+ "\xA0\xAC" => "\xEC\xA0\xB9",
+ "\xA0\xAD" => "\xEC\xA0\xBA",
+ "\xA0\xAE" => "\xEC\xA0\xBB",
+ "\xA0\xAF" => "\xEC\xA0\xBD",
+ "\xA0\xB0" => "\xEC\xA0\xBE",
+ "\xA0\xB1" => "\xEC\xA0\xBF",
+ "\xA0\xB2" => "\xEC\xA1\x81",
+ "\xA0\xB3" => "\xEC\xA1\x82",
+ "\xA0\xB4" => "\xEC\xA1\x83",
+ "\xA0\xB5" => "\xEC\xA1\x84",
+ "\xA0\xB6" => "\xEC\xA1\x85",
+ "\xA0\xB7" => "\xEC\xA1\x86",
+ "\xA0\xB8" => "\xEC\xA1\x87",
+ "\xA0\xB9" => "\xEC\xA1\x8A",
+ "\xA0\xBA" => "\xEC\xA1\x8B",
+ "\xA0\xBB" => "\xEC\xA1\x8E",
+ "\xA0\xBC" => "\xEC\xA1\x8F",
+ "\xA0\xBD" => "\xEC\xA1\x90",
+ "\xA0\xBE" => "\xEC\xA1\x91",
+ "\xA0\xBF" => "\xEC\xA1\x92",
+ "\xA0\xC0" => "\xEC\xA1\x93",
+ "\xA0\xC1" => "\xEC\xA1\x95",
+ "\xA0\xC2" => "\xEC\xA1\x96",
+ "\xA0\xC3" => "\xEC\xA1\x97",
+ "\xA0\xC4" => "\xEC\xA1\x98",
+ "\xA0\xC5" => "\xEC\xA1\x99",
+ "\xA0\xC6" => "\xEC\xA1\x9A",
+ "\xA0\xC7" => "\xEC\xA1\x9B",
+ "\xA0\xC8" => "\xEC\xA1\x9C",
+ "\xA0\xC9" => "\xEC\xA1\x9D",
+ "\xA0\xCA" => "\xEC\xA1\x9E",
+ "\xA0\xCB" => "\xEC\xA1\x9F",
+ "\xA0\xCC" => "\xEC\xA1\xA0",
+ "\xA0\xCD" => "\xEC\xA1\xA1",
+ "\xA0\xCE" => "\xEC\xA1\xA2",
+ "\xA0\xCF" => "\xEC\xA1\xA3",
+ "\xA0\xD0" => "\xEC\xA1\xA4",
+ "\xA0\xD1" => "\xEC\xA1\xA5",
+ "\xA0\xD2" => "\xEC\xA1\xA6",
+ "\xA0\xD3" => "\xEC\xA1\xA7",
+ "\xA0\xD4" => "\xEC\xA1\xA8",
+ "\xA0\xD5" => "\xEC\xA1\xA9",
+ "\xA0\xD6" => "\xEC\xA1\xAA",
+ "\xA0\xD7" => "\xEC\xA1\xAB",
+ "\xA0\xD8" => "\xEC\xA1\xAC",
+ "\xA0\xD9" => "\xEC\xA1\xAD",
+ "\xA0\xDA" => "\xEC\xA1\xAE",
+ "\xA0\xDB" => "\xEC\xA1\xAF",
+ "\xA0\xDC" => "\xEC\xA1\xB2",
+ "\xA0\xDD" => "\xEC\xA1\xB3",
+ "\xA0\xDE" => "\xEC\xA1\xB5",
+ "\xA0\xDF" => "\xEC\xA1\xB6",
+ "\xA0\xE0" => "\xEC\xA1\xB7",
+ "\xA0\xE1" => "\xEC\xA1\xB9",
+ "\xA0\xE2" => "\xEC\xA1\xBB",
+ "\xA0\xE3" => "\xEC\xA1\xBC",
+ "\xA0\xE4" => "\xEC\xA1\xBD",
+ "\xA0\xE5" => "\xEC\xA1\xBE",
+ "\xA0\xE6" => "\xEC\xA1\xBF",
+ "\xA0\xE7" => "\xEC\xA2\x82",
+ "\xA0\xE8" => "\xEC\xA2\x84",
+ "\xA0\xE9" => "\xEC\xA2\x88",
+ "\xA0\xEA" => "\xEC\xA2\x89",
+ "\xA0\xEB" => "\xEC\xA2\x8A",
+ "\xA0\xEC" => "\xEC\xA2\x8E",
+ "\xA0\xED" => "\xEC\xA2\x8F",
+ "\xA0\xEE" => "\xEC\xA2\x90",
+ "\xA0\xEF" => "\xEC\xA2\x91",
+ "\xA0\xF0" => "\xEC\xA2\x92",
+ "\xA0\xF1" => "\xEC\xA2\x93",
+ "\xA0\xF2" => "\xEC\xA2\x95",
+ "\xA0\xF3" => "\xEC\xA2\x96",
+ "\xA0\xF4" => "\xEC\xA2\x97",
+ "\xA0\xF5" => "\xEC\xA2\x98",
+ "\xA0\xF6" => "\xEC\xA2\x99",
+ "\xA0\xF7" => "\xEC\xA2\x9A",
+ "\xA0\xF8" => "\xEC\xA2\x9B",
+ "\xA0\xF9" => "\xEC\xA2\x9C",
+ "\xA0\xFA" => "\xEC\xA2\x9E",
+ "\xA0\xFB" => "\xEC\xA2\xA0",
+ "\xA0\xFC" => "\xEC\xA2\xA2",
+ "\xA0\xFD" => "\xEC\xA2\xA3",
+ "\xA0\xFE" => "\xEC\xA2\xA4",
+ "\xA1\x41" => "\xEC\xA2\xA5",
+ "\xA1\x42" => "\xEC\xA2\xA6",
+ "\xA1\x43" => "\xEC\xA2\xA7",
+ "\xA1\x44" => "\xEC\xA2\xA9",
+ "\xA1\x45" => "\xEC\xA2\xAA",
+ "\xA1\x46" => "\xEC\xA2\xAB",
+ "\xA1\x47" => "\xEC\xA2\xAC",
+ "\xA1\x48" => "\xEC\xA2\xAD",
+ "\xA1\x49" => "\xEC\xA2\xAE",
+ "\xA1\x4A" => "\xEC\xA2\xAF",
+ "\xA1\x4B" => "\xEC\xA2\xB0",
+ "\xA1\x4C" => "\xEC\xA2\xB1",
+ "\xA1\x4D" => "\xEC\xA2\xB2",
+ "\xA1\x4E" => "\xEC\xA2\xB3",
+ "\xA1\x4F" => "\xEC\xA2\xB4",
+ "\xA1\x50" => "\xEC\xA2\xB5",
+ "\xA1\x51" => "\xEC\xA2\xB6",
+ "\xA1\x52" => "\xEC\xA2\xB7",
+ "\xA1\x53" => "\xEC\xA2\xB8",
+ "\xA1\x54" => "\xEC\xA2\xB9",
+ "\xA1\x55" => "\xEC\xA2\xBA",
+ "\xA1\x56" => "\xEC\xA2\xBB",
+ "\xA1\x57" => "\xEC\xA2\xBE",
+ "\xA1\x58" => "\xEC\xA2\xBF",
+ "\xA1\x59" => "\xEC\xA3\x80",
+ "\xA1\x5A" => "\xEC\xA3\x81",
+ "\xA1\x61" => "\xEC\xA3\x82",
+ "\xA1\x62" => "\xEC\xA3\x83",
+ "\xA1\x63" => "\xEC\xA3\x85",
+ "\xA1\x64" => "\xEC\xA3\x86",
+ "\xA1\x65" => "\xEC\xA3\x87",
+ "\xA1\x66" => "\xEC\xA3\x89",
+ "\xA1\x67" => "\xEC\xA3\x8A",
+ "\xA1\x68" => "\xEC\xA3\x8B",
+ "\xA1\x69" => "\xEC\xA3\x8D",
+ "\xA1\x6A" => "\xEC\xA3\x8E",
+ "\xA1\x6B" => "\xEC\xA3\x8F",
+ "\xA1\x6C" => "\xEC\xA3\x90",
+ "\xA1\x6D" => "\xEC\xA3\x91",
+ "\xA1\x6E" => "\xEC\xA3\x92",
+ "\xA1\x6F" => "\xEC\xA3\x93",
+ "\xA1\x70" => "\xEC\xA3\x96",
+ "\xA1\x71" => "\xEC\xA3\x98",
+ "\xA1\x72" => "\xEC\xA3\x9A",
+ "\xA1\x73" => "\xEC\xA3\x9B",
+ "\xA1\x74" => "\xEC\xA3\x9C",
+ "\xA1\x75" => "\xEC\xA3\x9D",
+ "\xA1\x76" => "\xEC\xA3\x9E",
+ "\xA1\x77" => "\xEC\xA3\x9F",
+ "\xA1\x78" => "\xEC\xA3\xA2",
+ "\xA1\x79" => "\xEC\xA3\xA3",
+ "\xA1\x7A" => "\xEC\xA3\xA5",
+ "\xA1\x81" => "\xEC\xA3\xA6",
+ "\xA1\x82" => "\xEC\xA3\xA7",
+ "\xA1\x83" => "\xEC\xA3\xA8",
+ "\xA1\x84" => "\xEC\xA3\xA9",
+ "\xA1\x85" => "\xEC\xA3\xAA",
+ "\xA1\x86" => "\xEC\xA3\xAB",
+ "\xA1\x87" => "\xEC\xA3\xAC",
+ "\xA1\x88" => "\xEC\xA3\xAD",
+ "\xA1\x89" => "\xEC\xA3\xAE",
+ "\xA1\x8A" => "\xEC\xA3\xAF",
+ "\xA1\x8B" => "\xEC\xA3\xB0",
+ "\xA1\x8C" => "\xEC\xA3\xB1",
+ "\xA1\x8D" => "\xEC\xA3\xB2",
+ "\xA1\x8E" => "\xEC\xA3\xB3",
+ "\xA1\x8F" => "\xEC\xA3\xB4",
+ "\xA1\x90" => "\xEC\xA3\xB6",
+ "\xA1\x91" => "\xEC\xA3\xB7",
+ "\xA1\x92" => "\xEC\xA3\xB8",
+ "\xA1\x93" => "\xEC\xA3\xB9",
+ "\xA1\x94" => "\xEC\xA3\xBA",
+ "\xA1\x95" => "\xEC\xA3\xBB",
+ "\xA1\x96" => "\xEC\xA3\xBE",
+ "\xA1\x97" => "\xEC\xA3\xBF",
+ "\xA1\x98" => "\xEC\xA4\x81",
+ "\xA1\x99" => "\xEC\xA4\x82",
+ "\xA1\x9A" => "\xEC\xA4\x83",
+ "\xA1\x9B" => "\xEC\xA4\x87",
+ "\xA1\x9C" => "\xEC\xA4\x88",
+ "\xA1\x9D" => "\xEC\xA4\x89",
+ "\xA1\x9E" => "\xEC\xA4\x8A",
+ "\xA1\x9F" => "\xEC\xA4\x8B",
+ "\xA1\xA0" => "\xEC\xA4\x8E",
+ "\xA1\xA1" => "\xE3\x80\x80",
+ "\xA1\xA2" => "\xE3\x80\x81",
+ "\xA1\xA3" => "\xE3\x80\x82",
+ "\xA1\xA4" => "\xC2\xB7",
+ "\xA1\xA5" => "\xE2\x80\xA5",
+ "\xA1\xA6" => "\xE2\x80\xA6",
+ "\xA1\xA7" => "\xC2\xA8",
+ "\xA1\xA8" => "\xE3\x80\x83",
+ "\xA1\xA9" => "\xC2\xAD",
+ "\xA1\xAA" => "\xE2\x80\x95",
+ "\xA1\xAB" => "\xE2\x88\xA5",
+ "\xA1\xAC" => "\xEF\xBC\xBC",
+ "\xA1\xAD" => "\xE2\x88\xBC",
+ "\xA1\xAE" => "\xE2\x80\x98",
+ "\xA1\xAF" => "\xE2\x80\x99",
+ "\xA1\xB0" => "\xE2\x80\x9C",
+ "\xA1\xB1" => "\xE2\x80\x9D",
+ "\xA1\xB2" => "\xE3\x80\x94",
+ "\xA1\xB3" => "\xE3\x80\x95",
+ "\xA1\xB4" => "\xE3\x80\x88",
+ "\xA1\xB5" => "\xE3\x80\x89",
+ "\xA1\xB6" => "\xE3\x80\x8A",
+ "\xA1\xB7" => "\xE3\x80\x8B",
+ "\xA1\xB8" => "\xE3\x80\x8C",
+ "\xA1\xB9" => "\xE3\x80\x8D",
+ "\xA1\xBA" => "\xE3\x80\x8E",
+ "\xA1\xBB" => "\xE3\x80\x8F",
+ "\xA1\xBC" => "\xE3\x80\x90",
+ "\xA1\xBD" => "\xE3\x80\x91",
+ "\xA1\xBE" => "\xC2\xB1",
+ "\xA1\xBF" => "\xC3\x97",
+ "\xA1\xC0" => "\xC3\xB7",
+ "\xA1\xC1" => "\xE2\x89\xA0",
+ "\xA1\xC2" => "\xE2\x89\xA4",
+ "\xA1\xC3" => "\xE2\x89\xA5",
+ "\xA1\xC4" => "\xE2\x88\x9E",
+ "\xA1\xC5" => "\xE2\x88\xB4",
+ "\xA1\xC6" => "\xC2\xB0",
+ "\xA1\xC7" => "\xE2\x80\xB2",
+ "\xA1\xC8" => "\xE2\x80\xB3",
+ "\xA1\xC9" => "\xE2\x84\x83",
+ "\xA1\xCA" => "\xE2\x84\xAB",
+ "\xA1\xCB" => "\xEF\xBF\xA0",
+ "\xA1\xCC" => "\xEF\xBF\xA1",
+ "\xA1\xCD" => "\xEF\xBF\xA5",
+ "\xA1\xCE" => "\xE2\x99\x82",
+ "\xA1\xCF" => "\xE2\x99\x80",
+ "\xA1\xD0" => "\xE2\x88\xA0",
+ "\xA1\xD1" => "\xE2\x8A\xA5",
+ "\xA1\xD2" => "\xE2\x8C\x92",
+ "\xA1\xD3" => "\xE2\x88\x82",
+ "\xA1\xD4" => "\xE2\x88\x87",
+ "\xA1\xD5" => "\xE2\x89\xA1",
+ "\xA1\xD6" => "\xE2\x89\x92",
+ "\xA1\xD7" => "\xC2\xA7",
+ "\xA1\xD8" => "\xE2\x80\xBB",
+ "\xA1\xD9" => "\xE2\x98\x86",
+ "\xA1\xDA" => "\xE2\x98\x85",
+ "\xA1\xDB" => "\xE2\x97\x8B",
+ "\xA1\xDC" => "\xE2\x97\x8F",
+ "\xA1\xDD" => "\xE2\x97\x8E",
+ "\xA1\xDE" => "\xE2\x97\x87",
+ "\xA1\xDF" => "\xE2\x97\x86",
+ "\xA1\xE0" => "\xE2\x96\xA1",
+ "\xA1\xE1" => "\xE2\x96\xA0",
+ "\xA1\xE2" => "\xE2\x96\xB3",
+ "\xA1\xE3" => "\xE2\x96\xB2",
+ "\xA1\xE4" => "\xE2\x96\xBD",
+ "\xA1\xE5" => "\xE2\x96\xBC",
+ "\xA1\xE6" => "\xE2\x86\x92",
+ "\xA1\xE7" => "\xE2\x86\x90",
+ "\xA1\xE8" => "\xE2\x86\x91",
+ "\xA1\xE9" => "\xE2\x86\x93",
+ "\xA1\xEA" => "\xE2\x86\x94",
+ "\xA1\xEB" => "\xE3\x80\x93",
+ "\xA1\xEC" => "\xE2\x89\xAA",
+ "\xA1\xED" => "\xE2\x89\xAB",
+ "\xA1\xEE" => "\xE2\x88\x9A",
+ "\xA1\xEF" => "\xE2\x88\xBD",
+ "\xA1\xF0" => "\xE2\x88\x9D",
+ "\xA1\xF1" => "\xE2\x88\xB5",
+ "\xA1\xF2" => "\xE2\x88\xAB",
+ "\xA1\xF3" => "\xE2\x88\xAC",
+ "\xA1\xF4" => "\xE2\x88\x88",
+ "\xA1\xF5" => "\xE2\x88\x8B",
+ "\xA1\xF6" => "\xE2\x8A\x86",
+ "\xA1\xF7" => "\xE2\x8A\x87",
+ "\xA1\xF8" => "\xE2\x8A\x82",
+ "\xA1\xF9" => "\xE2\x8A\x83",
+ "\xA1\xFA" => "\xE2\x88\xAA",
+ "\xA1\xFB" => "\xE2\x88\xA9",
+ "\xA1\xFC" => "\xE2\x88\xA7",
+ "\xA1\xFD" => "\xE2\x88\xA8",
+ "\xA1\xFE" => "\xEF\xBF\xA2",
+ "\xA2\x41" => "\xEC\xA4\x90",
+ "\xA2\x42" => "\xEC\xA4\x92",
+ "\xA2\x43" => "\xEC\xA4\x93",
+ "\xA2\x44" => "\xEC\xA4\x94",
+ "\xA2\x45" => "\xEC\xA4\x95",
+ "\xA2\x46" => "\xEC\xA4\x96",
+ "\xA2\x47" => "\xEC\xA4\x97",
+ "\xA2\x48" => "\xEC\xA4\x99",
+ "\xA2\x49" => "\xEC\xA4\x9A",
+ "\xA2\x4A" => "\xEC\xA4\x9B",
+ "\xA2\x4B" => "\xEC\xA4\x9C",
+ "\xA2\x4C" => "\xEC\xA4\x9D",
+ "\xA2\x4D" => "\xEC\xA4\x9E",
+ "\xA2\x4E" => "\xEC\xA4\x9F",
+ "\xA2\x4F" => "\xEC\xA4\xA0",
+ "\xA2\x50" => "\xEC\xA4\xA1",
+ "\xA2\x51" => "\xEC\xA4\xA2",
+ "\xA2\x52" => "\xEC\xA4\xA3",
+ "\xA2\x53" => "\xEC\xA4\xA4",
+ "\xA2\x54" => "\xEC\xA4\xA5",
+ "\xA2\x55" => "\xEC\xA4\xA6",
+ "\xA2\x56" => "\xEC\xA4\xA7",
+ "\xA2\x57" => "\xEC\xA4\xA8",
+ "\xA2\x58" => "\xEC\xA4\xA9",
+ "\xA2\x59" => "\xEC\xA4\xAA",
+ "\xA2\x5A" => "\xEC\xA4\xAB",
+ "\xA2\x61" => "\xEC\xA4\xAD",
+ "\xA2\x62" => "\xEC\xA4\xAE",
+ "\xA2\x63" => "\xEC\xA4\xAF",
+ "\xA2\x64" => "\xEC\xA4\xB0",
+ "\xA2\x65" => "\xEC\xA4\xB1",
+ "\xA2\x66" => "\xEC\xA4\xB2",
+ "\xA2\x67" => "\xEC\xA4\xB3",
+ "\xA2\x68" => "\xEC\xA4\xB5",
+ "\xA2\x69" => "\xEC\xA4\xB6",
+ "\xA2\x6A" => "\xEC\xA4\xB7",
+ "\xA2\x6B" => "\xEC\xA4\xB8",
+ "\xA2\x6C" => "\xEC\xA4\xB9",
+ "\xA2\x6D" => "\xEC\xA4\xBA",
+ "\xA2\x6E" => "\xEC\xA4\xBB",
+ "\xA2\x6F" => "\xEC\xA4\xBC",
+ "\xA2\x70" => "\xEC\xA4\xBD",
+ "\xA2\x71" => "\xEC\xA4\xBE",
+ "\xA2\x72" => "\xEC\xA4\xBF",
+ "\xA2\x73" => "\xEC\xA5\x80",
+ "\xA2\x74" => "\xEC\xA5\x81",
+ "\xA2\x75" => "\xEC\xA5\x82",
+ "\xA2\x76" => "\xEC\xA5\x83",
+ "\xA2\x77" => "\xEC\xA5\x84",
+ "\xA2\x78" => "\xEC\xA5\x85",
+ "\xA2\x79" => "\xEC\xA5\x86",
+ "\xA2\x7A" => "\xEC\xA5\x87",
+ "\xA2\x81" => "\xEC\xA5\x88",
+ "\xA2\x82" => "\xEC\xA5\x89",
+ "\xA2\x83" => "\xEC\xA5\x8A",
+ "\xA2\x84" => "\xEC\xA5\x8B",
+ "\xA2\x85" => "\xEC\xA5\x8C",
+ "\xA2\x86" => "\xEC\xA5\x8D",
+ "\xA2\x87" => "\xEC\xA5\x8E",
+ "\xA2\x88" => "\xEC\xA5\x8F",
+ "\xA2\x89" => "\xEC\xA5\x92",
+ "\xA2\x8A" => "\xEC\xA5\x93",
+ "\xA2\x8B" => "\xEC\xA5\x95",
+ "\xA2\x8C" => "\xEC\xA5\x96",
+ "\xA2\x8D" => "\xEC\xA5\x97",
+ "\xA2\x8E" => "\xEC\xA5\x99",
+ "\xA2\x8F" => "\xEC\xA5\x9A",
+ "\xA2\x90" => "\xEC\xA5\x9B",
+ "\xA2\x91" => "\xEC\xA5\x9C",
+ "\xA2\x92" => "\xEC\xA5\x9D",
+ "\xA2\x93" => "\xEC\xA5\x9E",
+ "\xA2\x94" => "\xEC\xA5\x9F",
+ "\xA2\x95" => "\xEC\xA5\xA2",
+ "\xA2\x96" => "\xEC\xA5\xA4",
+ "\xA2\x97" => "\xEC\xA5\xA5",
+ "\xA2\x98" => "\xEC\xA5\xA6",
+ "\xA2\x99" => "\xEC\xA5\xA7",
+ "\xA2\x9A" => "\xEC\xA5\xA8",
+ "\xA2\x9B" => "\xEC\xA5\xA9",
+ "\xA2\x9C" => "\xEC\xA5\xAA",
+ "\xA2\x9D" => "\xEC\xA5\xAB",
+ "\xA2\x9E" => "\xEC\xA5\xAD",
+ "\xA2\x9F" => "\xEC\xA5\xAE",
+ "\xA2\xA0" => "\xEC\xA5\xAF",
+ "\xA2\xA1" => "\xE2\x87\x92",
+ "\xA2\xA2" => "\xE2\x87\x94",
+ "\xA2\xA3" => "\xE2\x88\x80",
+ "\xA2\xA4" => "\xE2\x88\x83",
+ "\xA2\xA5" => "\xC2\xB4",
+ "\xA2\xA6" => "\xEF\xBD\x9E",
+ "\xA2\xA7" => "\xCB\x87",
+ "\xA2\xA8" => "\xCB\x98",
+ "\xA2\xA9" => "\xCB\x9D",
+ "\xA2\xAA" => "\xCB\x9A",
+ "\xA2\xAB" => "\xCB\x99",
+ "\xA2\xAC" => "\xC2\xB8",
+ "\xA2\xAD" => "\xCB\x9B",
+ "\xA2\xAE" => "\xC2\xA1",
+ "\xA2\xAF" => "\xC2\xBF",
+ "\xA2\xB0" => "\xCB\x90",
+ "\xA2\xB1" => "\xE2\x88\xAE",
+ "\xA2\xB2" => "\xE2\x88\x91",
+ "\xA2\xB3" => "\xE2\x88\x8F",
+ "\xA2\xB4" => "\xC2\xA4",
+ "\xA2\xB5" => "\xE2\x84\x89",
+ "\xA2\xB6" => "\xE2\x80\xB0",
+ "\xA2\xB7" => "\xE2\x97\x81",
+ "\xA2\xB8" => "\xE2\x97\x80",
+ "\xA2\xB9" => "\xE2\x96\xB7",
+ "\xA2\xBA" => "\xE2\x96\xB6",
+ "\xA2\xBB" => "\xE2\x99\xA4",
+ "\xA2\xBC" => "\xE2\x99\xA0",
+ "\xA2\xBD" => "\xE2\x99\xA1",
+ "\xA2\xBE" => "\xE2\x99\xA5",
+ "\xA2\xBF" => "\xE2\x99\xA7",
+ "\xA2\xC0" => "\xE2\x99\xA3",
+ "\xA2\xC1" => "\xE2\x8A\x99",
+ "\xA2\xC2" => "\xE2\x97\x88",
+ "\xA2\xC3" => "\xE2\x96\xA3",
+ "\xA2\xC4" => "\xE2\x97\x90",
+ "\xA2\xC5" => "\xE2\x97\x91",
+ "\xA2\xC6" => "\xE2\x96\x92",
+ "\xA2\xC7" => "\xE2\x96\xA4",
+ "\xA2\xC8" => "\xE2\x96\xA5",
+ "\xA2\xC9" => "\xE2\x96\xA8",
+ "\xA2\xCA" => "\xE2\x96\xA7",
+ "\xA2\xCB" => "\xE2\x96\xA6",
+ "\xA2\xCC" => "\xE2\x96\xA9",
+ "\xA2\xCD" => "\xE2\x99\xA8",
+ "\xA2\xCE" => "\xE2\x98\x8F",
+ "\xA2\xCF" => "\xE2\x98\x8E",
+ "\xA2\xD0" => "\xE2\x98\x9C",
+ "\xA2\xD1" => "\xE2\x98\x9E",
+ "\xA2\xD2" => "\xC2\xB6",
+ "\xA2\xD3" => "\xE2\x80\xA0",
+ "\xA2\xD4" => "\xE2\x80\xA1",
+ "\xA2\xD5" => "\xE2\x86\x95",
+ "\xA2\xD6" => "\xE2\x86\x97",
+ "\xA2\xD7" => "\xE2\x86\x99",
+ "\xA2\xD8" => "\xE2\x86\x96",
+ "\xA2\xD9" => "\xE2\x86\x98",
+ "\xA2\xDA" => "\xE2\x99\xAD",
+ "\xA2\xDB" => "\xE2\x99\xA9",
+ "\xA2\xDC" => "\xE2\x99\xAA",
+ "\xA2\xDD" => "\xE2\x99\xAC",
+ "\xA2\xDE" => "\xE3\x89\xBF",
+ "\xA2\xDF" => "\xE3\x88\x9C",
+ "\xA2\xE0" => "\xE2\x84\x96",
+ "\xA2\xE1" => "\xE3\x8F\x87",
+ "\xA2\xE2" => "\xE2\x84\xA2",
+ "\xA2\xE3" => "\xE3\x8F\x82",
+ "\xA2\xE4" => "\xE3\x8F\x98",
+ "\xA2\xE5" => "\xE2\x84\xA1",
+ "\xA3\x41" => "\xEC\xA5\xB1",
+ "\xA3\x42" => "\xEC\xA5\xB2",
+ "\xA3\x43" => "\xEC\xA5\xB3",
+ "\xA3\x44" => "\xEC\xA5\xB5",
+ "\xA3\x45" => "\xEC\xA5\xB6",
+ "\xA3\x46" => "\xEC\xA5\xB7",
+ "\xA3\x47" => "\xEC\xA5\xB8",
+ "\xA3\x48" => "\xEC\xA5\xB9",
+ "\xA3\x49" => "\xEC\xA5\xBA",
+ "\xA3\x4A" => "\xEC\xA5\xBB",
+ "\xA3\x4B" => "\xEC\xA5\xBD",
+ "\xA3\x4C" => "\xEC\xA5\xBE",
+ "\xA3\x4D" => "\xEC\xA5\xBF",
+ "\xA3\x4E" => "\xEC\xA6\x80",
+ "\xA3\x4F" => "\xEC\xA6\x81",
+ "\xA3\x50" => "\xEC\xA6\x82",
+ "\xA3\x51" => "\xEC\xA6\x83",
+ "\xA3\x52" => "\xEC\xA6\x84",
+ "\xA3\x53" => "\xEC\xA6\x85",
+ "\xA3\x54" => "\xEC\xA6\x86",
+ "\xA3\x55" => "\xEC\xA6\x87",
+ "\xA3\x56" => "\xEC\xA6\x8A",
+ "\xA3\x57" => "\xEC\xA6\x8B",
+ "\xA3\x58" => "\xEC\xA6\x8D",
+ "\xA3\x59" => "\xEC\xA6\x8E",
+ "\xA3\x5A" => "\xEC\xA6\x8F",
+ "\xA3\x61" => "\xEC\xA6\x91",
+ "\xA3\x62" => "\xEC\xA6\x92",
+ "\xA3\x63" => "\xEC\xA6\x93",
+ "\xA3\x64" => "\xEC\xA6\x94",
+ "\xA3\x65" => "\xEC\xA6\x95",
+ "\xA3\x66" => "\xEC\xA6\x96",
+ "\xA3\x67" => "\xEC\xA6\x97",
+ "\xA3\x68" => "\xEC\xA6\x9A",
+ "\xA3\x69" => "\xEC\xA6\x9C",
+ "\xA3\x6A" => "\xEC\xA6\x9E",
+ "\xA3\x6B" => "\xEC\xA6\x9F",
+ "\xA3\x6C" => "\xEC\xA6\xA0",
+ "\xA3\x6D" => "\xEC\xA6\xA1",
+ "\xA3\x6E" => "\xEC\xA6\xA2",
+ "\xA3\x6F" => "\xEC\xA6\xA3",
+ "\xA3\x70" => "\xEC\xA6\xA4",
+ "\xA3\x71" => "\xEC\xA6\xA5",
+ "\xA3\x72" => "\xEC\xA6\xA6",
+ "\xA3\x73" => "\xEC\xA6\xA7",
+ "\xA3\x74" => "\xEC\xA6\xA8",
+ "\xA3\x75" => "\xEC\xA6\xA9",
+ "\xA3\x76" => "\xEC\xA6\xAA",
+ "\xA3\x77" => "\xEC\xA6\xAB",
+ "\xA3\x78" => "\xEC\xA6\xAC",
+ "\xA3\x79" => "\xEC\xA6\xAD",
+ "\xA3\x7A" => "\xEC\xA6\xAE",
+ "\xA3\x81" => "\xEC\xA6\xAF",
+ "\xA3\x82" => "\xEC\xA6\xB0",
+ "\xA3\x83" => "\xEC\xA6\xB1",
+ "\xA3\x84" => "\xEC\xA6\xB2",
+ "\xA3\x85" => "\xEC\xA6\xB3",
+ "\xA3\x86" => "\xEC\xA6\xB4",
+ "\xA3\x87" => "\xEC\xA6\xB5",
+ "\xA3\x88" => "\xEC\xA6\xB6",
+ "\xA3\x89" => "\xEC\xA6\xB7",
+ "\xA3\x8A" => "\xEC\xA6\xB8",
+ "\xA3\x8B" => "\xEC\xA6\xB9",
+ "\xA3\x8C" => "\xEC\xA6\xBA",
+ "\xA3\x8D" => "\xEC\xA6\xBB",
+ "\xA3\x8E" => "\xEC\xA6\xBC",
+ "\xA3\x8F" => "\xEC\xA6\xBD",
+ "\xA3\x90" => "\xEC\xA6\xBE",
+ "\xA3\x91" => "\xEC\xA6\xBF",
+ "\xA3\x92" => "\xEC\xA7\x82",
+ "\xA3\x93" => "\xEC\xA7\x83",
+ "\xA3\x94" => "\xEC\xA7\x85",
+ "\xA3\x95" => "\xEC\xA7\x86",
+ "\xA3\x96" => "\xEC\xA7\x89",
+ "\xA3\x97" => "\xEC\xA7\x8B",
+ "\xA3\x98" => "\xEC\xA7\x8C",
+ "\xA3\x99" => "\xEC\xA7\x8D",
+ "\xA3\x9A" => "\xEC\xA7\x8E",
+ "\xA3\x9B" => "\xEC\xA7\x8F",
+ "\xA3\x9C" => "\xEC\xA7\x92",
+ "\xA3\x9D" => "\xEC\xA7\x94",
+ "\xA3\x9E" => "\xEC\xA7\x97",
+ "\xA3\x9F" => "\xEC\xA7\x98",
+ "\xA3\xA0" => "\xEC\xA7\x9B",
+ "\xA3\xA1" => "\xEF\xBC\x81",
+ "\xA3\xA2" => "\xEF\xBC\x82",
+ "\xA3\xA3" => "\xEF\xBC\x83",
+ "\xA3\xA4" => "\xEF\xBC\x84",
+ "\xA3\xA5" => "\xEF\xBC\x85",
+ "\xA3\xA6" => "\xEF\xBC\x86",
+ "\xA3\xA7" => "\xEF\xBC\x87",
+ "\xA3\xA8" => "\xEF\xBC\x88",
+ "\xA3\xA9" => "\xEF\xBC\x89",
+ "\xA3\xAA" => "\xEF\xBC\x8A",
+ "\xA3\xAB" => "\xEF\xBC\x8B",
+ "\xA3\xAC" => "\xEF\xBC\x8C",
+ "\xA3\xAD" => "\xEF\xBC\x8D",
+ "\xA3\xAE" => "\xEF\xBC\x8E",
+ "\xA3\xAF" => "\xEF\xBC\x8F",
+ "\xA3\xB0" => "\xEF\xBC\x90",
+ "\xA3\xB1" => "\xEF\xBC\x91",
+ "\xA3\xB2" => "\xEF\xBC\x92",
+ "\xA3\xB3" => "\xEF\xBC\x93",
+ "\xA3\xB4" => "\xEF\xBC\x94",
+ "\xA3\xB5" => "\xEF\xBC\x95",
+ "\xA3\xB6" => "\xEF\xBC\x96",
+ "\xA3\xB7" => "\xEF\xBC\x97",
+ "\xA3\xB8" => "\xEF\xBC\x98",
+ "\xA3\xB9" => "\xEF\xBC\x99",
+ "\xA3\xBA" => "\xEF\xBC\x9A",
+ "\xA3\xBB" => "\xEF\xBC\x9B",
+ "\xA3\xBC" => "\xEF\xBC\x9C",
+ "\xA3\xBD" => "\xEF\xBC\x9D",
+ "\xA3\xBE" => "\xEF\xBC\x9E",
+ "\xA3\xBF" => "\xEF\xBC\x9F",
+ "\xA3\xC0" => "\xEF\xBC\xA0",
+ "\xA3\xC1" => "\xEF\xBC\xA1",
+ "\xA3\xC2" => "\xEF\xBC\xA2",
+ "\xA3\xC3" => "\xEF\xBC\xA3",
+ "\xA3\xC4" => "\xEF\xBC\xA4",
+ "\xA3\xC5" => "\xEF\xBC\xA5",
+ "\xA3\xC6" => "\xEF\xBC\xA6",
+ "\xA3\xC7" => "\xEF\xBC\xA7",
+ "\xA3\xC8" => "\xEF\xBC\xA8",
+ "\xA3\xC9" => "\xEF\xBC\xA9",
+ "\xA3\xCA" => "\xEF\xBC\xAA",
+ "\xA3\xCB" => "\xEF\xBC\xAB",
+ "\xA3\xCC" => "\xEF\xBC\xAC",
+ "\xA3\xCD" => "\xEF\xBC\xAD",
+ "\xA3\xCE" => "\xEF\xBC\xAE",
+ "\xA3\xCF" => "\xEF\xBC\xAF",
+ "\xA3\xD0" => "\xEF\xBC\xB0",
+ "\xA3\xD1" => "\xEF\xBC\xB1",
+ "\xA3\xD2" => "\xEF\xBC\xB2",
+ "\xA3\xD3" => "\xEF\xBC\xB3",
+ "\xA3\xD4" => "\xEF\xBC\xB4",
+ "\xA3\xD5" => "\xEF\xBC\xB5",
+ "\xA3\xD6" => "\xEF\xBC\xB6",
+ "\xA3\xD7" => "\xEF\xBC\xB7",
+ "\xA3\xD8" => "\xEF\xBC\xB8",
+ "\xA3\xD9" => "\xEF\xBC\xB9",
+ "\xA3\xDA" => "\xEF\xBC\xBA",
+ "\xA3\xDB" => "\xEF\xBC\xBB",
+ "\xA3\xDC" => "\xEF\xBF\xA6",
+ "\xA3\xDD" => "\xEF\xBC\xBD",
+ "\xA3\xDE" => "\xEF\xBC\xBE",
+ "\xA3\xDF" => "\xEF\xBC\xBF",
+ "\xA3\xE0" => "\xEF\xBD\x80",
+ "\xA3\xE1" => "\xEF\xBD\x81",
+ "\xA3\xE2" => "\xEF\xBD\x82",
+ "\xA3\xE3" => "\xEF\xBD\x83",
+ "\xA3\xE4" => "\xEF\xBD\x84",
+ "\xA3\xE5" => "\xEF\xBD\x85",
+ "\xA3\xE6" => "\xEF\xBD\x86",
+ "\xA3\xE7" => "\xEF\xBD\x87",
+ "\xA3\xE8" => "\xEF\xBD\x88",
+ "\xA3\xE9" => "\xEF\xBD\x89",
+ "\xA3\xEA" => "\xEF\xBD\x8A",
+ "\xA3\xEB" => "\xEF\xBD\x8B",
+ "\xA3\xEC" => "\xEF\xBD\x8C",
+ "\xA3\xED" => "\xEF\xBD\x8D",
+ "\xA3\xEE" => "\xEF\xBD\x8E",
+ "\xA3\xEF" => "\xEF\xBD\x8F",
+ "\xA3\xF0" => "\xEF\xBD\x90",
+ "\xA3\xF1" => "\xEF\xBD\x91",
+ "\xA3\xF2" => "\xEF\xBD\x92",
+ "\xA3\xF3" => "\xEF\xBD\x93",
+ "\xA3\xF4" => "\xEF\xBD\x94",
+ "\xA3\xF5" => "\xEF\xBD\x95",
+ "\xA3\xF6" => "\xEF\xBD\x96",
+ "\xA3\xF7" => "\xEF\xBD\x97",
+ "\xA3\xF8" => "\xEF\xBD\x98",
+ "\xA3\xF9" => "\xEF\xBD\x99",
+ "\xA3\xFA" => "\xEF\xBD\x9A",
+ "\xA3\xFB" => "\xEF\xBD\x9B",
+ "\xA3\xFC" => "\xEF\xBD\x9C",
+ "\xA3\xFD" => "\xEF\xBD\x9D",
+ "\xA3\xFE" => "\xEF\xBF\xA3",
+ "\xA4\x41" => "\xEC\xA7\x9E",
+ "\xA4\x42" => "\xEC\xA7\x9F",
+ "\xA4\x43" => "\xEC\xA7\xA1",
+ "\xA4\x44" => "\xEC\xA7\xA3",
+ "\xA4\x45" => "\xEC\xA7\xA5",
+ "\xA4\x46" => "\xEC\xA7\xA6",
+ "\xA4\x47" => "\xEC\xA7\xA8",
+ "\xA4\x48" => "\xEC\xA7\xA9",
+ "\xA4\x49" => "\xEC\xA7\xAA",
+ "\xA4\x4A" => "\xEC\xA7\xAB",
+ "\xA4\x4B" => "\xEC\xA7\xAE",
+ "\xA4\x4C" => "\xEC\xA7\xB2",
+ "\xA4\x4D" => "\xEC\xA7\xB3",
+ "\xA4\x4E" => "\xEC\xA7\xB4",
+ "\xA4\x4F" => "\xEC\xA7\xB5",
+ "\xA4\x50" => "\xEC\xA7\xB6",
+ "\xA4\x51" => "\xEC\xA7\xB7",
+ "\xA4\x52" => "\xEC\xA7\xBA",
+ "\xA4\x53" => "\xEC\xA7\xBB",
+ "\xA4\x54" => "\xEC\xA7\xBD",
+ "\xA4\x55" => "\xEC\xA7\xBE",
+ "\xA4\x56" => "\xEC\xA7\xBF",
+ "\xA4\x57" => "\xEC\xA8\x81",
+ "\xA4\x58" => "\xEC\xA8\x82",
+ "\xA4\x59" => "\xEC\xA8\x83",
+ "\xA4\x5A" => "\xEC\xA8\x84",
+ "\xA4\x61" => "\xEC\xA8\x85",
+ "\xA4\x62" => "\xEC\xA8\x86",
+ "\xA4\x63" => "\xEC\xA8\x87",
+ "\xA4\x64" => "\xEC\xA8\x8A",
+ "\xA4\x65" => "\xEC\xA8\x8E",
+ "\xA4\x66" => "\xEC\xA8\x8F",
+ "\xA4\x67" => "\xEC\xA8\x90",
+ "\xA4\x68" => "\xEC\xA8\x91",
+ "\xA4\x69" => "\xEC\xA8\x92",
+ "\xA4\x6A" => "\xEC\xA8\x93",
+ "\xA4\x6B" => "\xEC\xA8\x95",
+ "\xA4\x6C" => "\xEC\xA8\x96",
+ "\xA4\x6D" => "\xEC\xA8\x97",
+ "\xA4\x6E" => "\xEC\xA8\x99",
+ "\xA4\x6F" => "\xEC\xA8\x9A",
+ "\xA4\x70" => "\xEC\xA8\x9B",
+ "\xA4\x71" => "\xEC\xA8\x9C",
+ "\xA4\x72" => "\xEC\xA8\x9D",
+ "\xA4\x73" => "\xEC\xA8\x9E",
+ "\xA4\x74" => "\xEC\xA8\x9F",
+ "\xA4\x75" => "\xEC\xA8\xA0",
+ "\xA4\x76" => "\xEC\xA8\xA1",
+ "\xA4\x77" => "\xEC\xA8\xA2",
+ "\xA4\x78" => "\xEC\xA8\xA3",
+ "\xA4\x79" => "\xEC\xA8\xA4",
+ "\xA4\x7A" => "\xEC\xA8\xA5",
+ "\xA4\x81" => "\xEC\xA8\xA6",
+ "\xA4\x82" => "\xEC\xA8\xA7",
+ "\xA4\x83" => "\xEC\xA8\xA8",
+ "\xA4\x84" => "\xEC\xA8\xAA",
+ "\xA4\x85" => "\xEC\xA8\xAB",
+ "\xA4\x86" => "\xEC\xA8\xAC",
+ "\xA4\x87" => "\xEC\xA8\xAD",
+ "\xA4\x88" => "\xEC\xA8\xAE",
+ "\xA4\x89" => "\xEC\xA8\xAF",
+ "\xA4\x8A" => "\xEC\xA8\xB0",
+ "\xA4\x8B" => "\xEC\xA8\xB1",
+ "\xA4\x8C" => "\xEC\xA8\xB2",
+ "\xA4\x8D" => "\xEC\xA8\xB3",
+ "\xA4\x8E" => "\xEC\xA8\xB4",
+ "\xA4\x8F" => "\xEC\xA8\xB5",
+ "\xA4\x90" => "\xEC\xA8\xB6",
+ "\xA4\x91" => "\xEC\xA8\xB7",
+ "\xA4\x92" => "\xEC\xA8\xB8",
+ "\xA4\x93" => "\xEC\xA8\xB9",
+ "\xA4\x94" => "\xEC\xA8\xBA",
+ "\xA4\x95" => "\xEC\xA8\xBB",
+ "\xA4\x96" => "\xEC\xA8\xBC",
+ "\xA4\x97" => "\xEC\xA8\xBD",
+ "\xA4\x98" => "\xEC\xA8\xBE",
+ "\xA4\x99" => "\xEC\xA8\xBF",
+ "\xA4\x9A" => "\xEC\xA9\x80",
+ "\xA4\x9B" => "\xEC\xA9\x81",
+ "\xA4\x9C" => "\xEC\xA9\x82",
+ "\xA4\x9D" => "\xEC\xA9\x83",
+ "\xA4\x9E" => "\xEC\xA9\x84",
+ "\xA4\x9F" => "\xEC\xA9\x85",
+ "\xA4\xA0" => "\xEC\xA9\x86",
+ "\xA4\xA1" => "\xE3\x84\xB1",
+ "\xA4\xA2" => "\xE3\x84\xB2",
+ "\xA4\xA3" => "\xE3\x84\xB3",
+ "\xA4\xA4" => "\xE3\x84\xB4",
+ "\xA4\xA5" => "\xE3\x84\xB5",
+ "\xA4\xA6" => "\xE3\x84\xB6",
+ "\xA4\xA7" => "\xE3\x84\xB7",
+ "\xA4\xA8" => "\xE3\x84\xB8",
+ "\xA4\xA9" => "\xE3\x84\xB9",
+ "\xA4\xAA" => "\xE3\x84\xBA",
+ "\xA4\xAB" => "\xE3\x84\xBB",
+ "\xA4\xAC" => "\xE3\x84\xBC",
+ "\xA4\xAD" => "\xE3\x84\xBD",
+ "\xA4\xAE" => "\xE3\x84\xBE",
+ "\xA4\xAF" => "\xE3\x84\xBF",
+ "\xA4\xB0" => "\xE3\x85\x80",
+ "\xA4\xB1" => "\xE3\x85\x81",
+ "\xA4\xB2" => "\xE3\x85\x82",
+ "\xA4\xB3" => "\xE3\x85\x83",
+ "\xA4\xB4" => "\xE3\x85\x84",
+ "\xA4\xB5" => "\xE3\x85\x85",
+ "\xA4\xB6" => "\xE3\x85\x86",
+ "\xA4\xB7" => "\xE3\x85\x87",
+ "\xA4\xB8" => "\xE3\x85\x88",
+ "\xA4\xB9" => "\xE3\x85\x89",
+ "\xA4\xBA" => "\xE3\x85\x8A",
+ "\xA4\xBB" => "\xE3\x85\x8B",
+ "\xA4\xBC" => "\xE3\x85\x8C",
+ "\xA4\xBD" => "\xE3\x85\x8D",
+ "\xA4\xBE" => "\xE3\x85\x8E",
+ "\xA4\xBF" => "\xE3\x85\x8F",
+ "\xA4\xC0" => "\xE3\x85\x90",
+ "\xA4\xC1" => "\xE3\x85\x91",
+ "\xA4\xC2" => "\xE3\x85\x92",
+ "\xA4\xC3" => "\xE3\x85\x93",
+ "\xA4\xC4" => "\xE3\x85\x94",
+ "\xA4\xC5" => "\xE3\x85\x95",
+ "\xA4\xC6" => "\xE3\x85\x96",
+ "\xA4\xC7" => "\xE3\x85\x97",
+ "\xA4\xC8" => "\xE3\x85\x98",
+ "\xA4\xC9" => "\xE3\x85\x99",
+ "\xA4\xCA" => "\xE3\x85\x9A",
+ "\xA4\xCB" => "\xE3\x85\x9B",
+ "\xA4\xCC" => "\xE3\x85\x9C",
+ "\xA4\xCD" => "\xE3\x85\x9D",
+ "\xA4\xCE" => "\xE3\x85\x9E",
+ "\xA4\xCF" => "\xE3\x85\x9F",
+ "\xA4\xD0" => "\xE3\x85\xA0",
+ "\xA4\xD1" => "\xE3\x85\xA1",
+ "\xA4\xD2" => "\xE3\x85\xA2",
+ "\xA4\xD3" => "\xE3\x85\xA3",
+ "\xA4\xD4" => "\xE3\x85\xA4",
+ "\xA4\xD5" => "\xE3\x85\xA5",
+ "\xA4\xD6" => "\xE3\x85\xA6",
+ "\xA4\xD7" => "\xE3\x85\xA7",
+ "\xA4\xD8" => "\xE3\x85\xA8",
+ "\xA4\xD9" => "\xE3\x85\xA9",
+ "\xA4\xDA" => "\xE3\x85\xAA",
+ "\xA4\xDB" => "\xE3\x85\xAB",
+ "\xA4\xDC" => "\xE3\x85\xAC",
+ "\xA4\xDD" => "\xE3\x85\xAD",
+ "\xA4\xDE" => "\xE3\x85\xAE",
+ "\xA4\xDF" => "\xE3\x85\xAF",
+ "\xA4\xE0" => "\xE3\x85\xB0",
+ "\xA4\xE1" => "\xE3\x85\xB1",
+ "\xA4\xE2" => "\xE3\x85\xB2",
+ "\xA4\xE3" => "\xE3\x85\xB3",
+ "\xA4\xE4" => "\xE3\x85\xB4",
+ "\xA4\xE5" => "\xE3\x85\xB5",
+ "\xA4\xE6" => "\xE3\x85\xB6",
+ "\xA4\xE7" => "\xE3\x85\xB7",
+ "\xA4\xE8" => "\xE3\x85\xB8",
+ "\xA4\xE9" => "\xE3\x85\xB9",
+ "\xA4\xEA" => "\xE3\x85\xBA",
+ "\xA4\xEB" => "\xE3\x85\xBB",
+ "\xA4\xEC" => "\xE3\x85\xBC",
+ "\xA4\xED" => "\xE3\x85\xBD",
+ "\xA4\xEE" => "\xE3\x85\xBE",
+ "\xA4\xEF" => "\xE3\x85\xBF",
+ "\xA4\xF0" => "\xE3\x86\x80",
+ "\xA4\xF1" => "\xE3\x86\x81",
+ "\xA4\xF2" => "\xE3\x86\x82",
+ "\xA4\xF3" => "\xE3\x86\x83",
+ "\xA4\xF4" => "\xE3\x86\x84",
+ "\xA4\xF5" => "\xE3\x86\x85",
+ "\xA4\xF6" => "\xE3\x86\x86",
+ "\xA4\xF7" => "\xE3\x86\x87",
+ "\xA4\xF8" => "\xE3\x86\x88",
+ "\xA4\xF9" => "\xE3\x86\x89",
+ "\xA4\xFA" => "\xE3\x86\x8A",
+ "\xA4\xFB" => "\xE3\x86\x8B",
+ "\xA4\xFC" => "\xE3\x86\x8C",
+ "\xA4\xFD" => "\xE3\x86\x8D",
+ "\xA4\xFE" => "\xE3\x86\x8E",
+ "\xA5\x41" => "\xEC\xA9\x87",
+ "\xA5\x42" => "\xEC\xA9\x88",
+ "\xA5\x43" => "\xEC\xA9\x89",
+ "\xA5\x44" => "\xEC\xA9\x8A",
+ "\xA5\x45" => "\xEC\xA9\x8B",
+ "\xA5\x46" => "\xEC\xA9\x8E",
+ "\xA5\x47" => "\xEC\xA9\x8F",
+ "\xA5\x48" => "\xEC\xA9\x91",
+ "\xA5\x49" => "\xEC\xA9\x92",
+ "\xA5\x4A" => "\xEC\xA9\x93",
+ "\xA5\x4B" => "\xEC\xA9\x95",
+ "\xA5\x4C" => "\xEC\xA9\x96",
+ "\xA5\x4D" => "\xEC\xA9\x97",
+ "\xA5\x4E" => "\xEC\xA9\x98",
+ "\xA5\x4F" => "\xEC\xA9\x99",
+ "\xA5\x50" => "\xEC\xA9\x9A",
+ "\xA5\x51" => "\xEC\xA9\x9B",
+ "\xA5\x52" => "\xEC\xA9\x9E",
+ "\xA5\x53" => "\xEC\xA9\xA2",
+ "\xA5\x54" => "\xEC\xA9\xA3",
+ "\xA5\x55" => "\xEC\xA9\xA4",
+ "\xA5\x56" => "\xEC\xA9\xA5",
+ "\xA5\x57" => "\xEC\xA9\xA6",
+ "\xA5\x58" => "\xEC\xA9\xA7",
+ "\xA5\x59" => "\xEC\xA9\xA9",
+ "\xA5\x5A" => "\xEC\xA9\xAA",
+ "\xA5\x61" => "\xEC\xA9\xAB",
+ "\xA5\x62" => "\xEC\xA9\xAC",
+ "\xA5\x63" => "\xEC\xA9\xAD",
+ "\xA5\x64" => "\xEC\xA9\xAE",
+ "\xA5\x65" => "\xEC\xA9\xAF",
+ "\xA5\x66" => "\xEC\xA9\xB0",
+ "\xA5\x67" => "\xEC\xA9\xB1",
+ "\xA5\x68" => "\xEC\xA9\xB2",
+ "\xA5\x69" => "\xEC\xA9\xB3",
+ "\xA5\x6A" => "\xEC\xA9\xB4",
+ "\xA5\x6B" => "\xEC\xA9\xB5",
+ "\xA5\x6C" => "\xEC\xA9\xB6",
+ "\xA5\x6D" => "\xEC\xA9\xB7",
+ "\xA5\x6E" => "\xEC\xA9\xB8",
+ "\xA5\x6F" => "\xEC\xA9\xB9",
+ "\xA5\x70" => "\xEC\xA9\xBA",
+ "\xA5\x71" => "\xEC\xA9\xBB",
+ "\xA5\x72" => "\xEC\xA9\xBC",
+ "\xA5\x73" => "\xEC\xA9\xBE",
+ "\xA5\x74" => "\xEC\xA9\xBF",
+ "\xA5\x75" => "\xEC\xAA\x80",
+ "\xA5\x76" => "\xEC\xAA\x81",
+ "\xA5\x77" => "\xEC\xAA\x82",
+ "\xA5\x78" => "\xEC\xAA\x83",
+ "\xA5\x79" => "\xEC\xAA\x85",
+ "\xA5\x7A" => "\xEC\xAA\x86",
+ "\xA5\x81" => "\xEC\xAA\x87",
+ "\xA5\x82" => "\xEC\xAA\x88",
+ "\xA5\x83" => "\xEC\xAA\x89",
+ "\xA5\x84" => "\xEC\xAA\x8A",
+ "\xA5\x85" => "\xEC\xAA\x8B",
+ "\xA5\x86" => "\xEC\xAA\x8C",
+ "\xA5\x87" => "\xEC\xAA\x8D",
+ "\xA5\x88" => "\xEC\xAA\x8E",
+ "\xA5\x89" => "\xEC\xAA\x8F",
+ "\xA5\x8A" => "\xEC\xAA\x90",
+ "\xA5\x8B" => "\xEC\xAA\x91",
+ "\xA5\x8C" => "\xEC\xAA\x92",
+ "\xA5\x8D" => "\xEC\xAA\x93",
+ "\xA5\x8E" => "\xEC\xAA\x94",
+ "\xA5\x8F" => "\xEC\xAA\x95",
+ "\xA5\x90" => "\xEC\xAA\x96",
+ "\xA5\x91" => "\xEC\xAA\x97",
+ "\xA5\x92" => "\xEC\xAA\x99",
+ "\xA5\x93" => "\xEC\xAA\x9A",
+ "\xA5\x94" => "\xEC\xAA\x9B",
+ "\xA5\x95" => "\xEC\xAA\x9C",
+ "\xA5\x96" => "\xEC\xAA\x9D",
+ "\xA5\x97" => "\xEC\xAA\x9E",
+ "\xA5\x98" => "\xEC\xAA\x9F",
+ "\xA5\x99" => "\xEC\xAA\xA0",
+ "\xA5\x9A" => "\xEC\xAA\xA1",
+ "\xA5\x9B" => "\xEC\xAA\xA2",
+ "\xA5\x9C" => "\xEC\xAA\xA3",
+ "\xA5\x9D" => "\xEC\xAA\xA4",
+ "\xA5\x9E" => "\xEC\xAA\xA5",
+ "\xA5\x9F" => "\xEC\xAA\xA6",
+ "\xA5\xA0" => "\xEC\xAA\xA7",
+ "\xA5\xA1" => "\xE2\x85\xB0",
+ "\xA5\xA2" => "\xE2\x85\xB1",
+ "\xA5\xA3" => "\xE2\x85\xB2",
+ "\xA5\xA4" => "\xE2\x85\xB3",
+ "\xA5\xA5" => "\xE2\x85\xB4",
+ "\xA5\xA6" => "\xE2\x85\xB5",
+ "\xA5\xA7" => "\xE2\x85\xB6",
+ "\xA5\xA8" => "\xE2\x85\xB7",
+ "\xA5\xA9" => "\xE2\x85\xB8",
+ "\xA5\xAA" => "\xE2\x85\xB9",
+ "\xA5\xB0" => "\xE2\x85\xA0",
+ "\xA5\xB1" => "\xE2\x85\xA1",
+ "\xA5\xB2" => "\xE2\x85\xA2",
+ "\xA5\xB3" => "\xE2\x85\xA3",
+ "\xA5\xB4" => "\xE2\x85\xA4",
+ "\xA5\xB5" => "\xE2\x85\xA5",
+ "\xA5\xB6" => "\xE2\x85\xA6",
+ "\xA5\xB7" => "\xE2\x85\xA7",
+ "\xA5\xB8" => "\xE2\x85\xA8",
+ "\xA5\xB9" => "\xE2\x85\xA9",
+ "\xA5\xC1" => "\xCE\x91",
+ "\xA5\xC2" => "\xCE\x92",
+ "\xA5\xC3" => "\xCE\x93",
+ "\xA5\xC4" => "\xCE\x94",
+ "\xA5\xC5" => "\xCE\x95",
+ "\xA5\xC6" => "\xCE\x96",
+ "\xA5\xC7" => "\xCE\x97",
+ "\xA5\xC8" => "\xCE\x98",
+ "\xA5\xC9" => "\xCE\x99",
+ "\xA5\xCA" => "\xCE\x9A",
+ "\xA5\xCB" => "\xCE\x9B",
+ "\xA5\xCC" => "\xCE\x9C",
+ "\xA5\xCD" => "\xCE\x9D",
+ "\xA5\xCE" => "\xCE\x9E",
+ "\xA5\xCF" => "\xCE\x9F",
+ "\xA5\xD0" => "\xCE\xA0",
+ "\xA5\xD1" => "\xCE\xA1",
+ "\xA5\xD2" => "\xCE\xA3",
+ "\xA5\xD3" => "\xCE\xA4",
+ "\xA5\xD4" => "\xCE\xA5",
+ "\xA5\xD5" => "\xCE\xA6",
+ "\xA5\xD6" => "\xCE\xA7",
+ "\xA5\xD7" => "\xCE\xA8",
+ "\xA5\xD8" => "\xCE\xA9",
+ "\xA5\xE1" => "\xCE\xB1",
+ "\xA5\xE2" => "\xCE\xB2",
+ "\xA5\xE3" => "\xCE\xB3",
+ "\xA5\xE4" => "\xCE\xB4",
+ "\xA5\xE5" => "\xCE\xB5",
+ "\xA5\xE6" => "\xCE\xB6",
+ "\xA5\xE7" => "\xCE\xB7",
+ "\xA5\xE8" => "\xCE\xB8",
+ "\xA5\xE9" => "\xCE\xB9",
+ "\xA5\xEA" => "\xCE\xBA",
+ "\xA5\xEB" => "\xCE\xBB",
+ "\xA5\xEC" => "\xCE\xBC",
+ "\xA5\xED" => "\xCE\xBD",
+ "\xA5\xEE" => "\xCE\xBE",
+ "\xA5\xEF" => "\xCE\xBF",
+ "\xA5\xF0" => "\xCF\x80",
+ "\xA5\xF1" => "\xCF\x81",
+ "\xA5\xF2" => "\xCF\x83",
+ "\xA5\xF3" => "\xCF\x84",
+ "\xA5\xF4" => "\xCF\x85",
+ "\xA5\xF5" => "\xCF\x86",
+ "\xA5\xF6" => "\xCF\x87",
+ "\xA5\xF7" => "\xCF\x88",
+ "\xA5\xF8" => "\xCF\x89",
+ "\xA6\x41" => "\xEC\xAA\xA8",
+ "\xA6\x42" => "\xEC\xAA\xA9",
+ "\xA6\x43" => "\xEC\xAA\xAA",
+ "\xA6\x44" => "\xEC\xAA\xAB",
+ "\xA6\x45" => "\xEC\xAA\xAC",
+ "\xA6\x46" => "\xEC\xAA\xAD",
+ "\xA6\x47" => "\xEC\xAA\xAE",
+ "\xA6\x48" => "\xEC\xAA\xAF",
+ "\xA6\x49" => "\xEC\xAA\xB0",
+ "\xA6\x4A" => "\xEC\xAA\xB1",
+ "\xA6\x4B" => "\xEC\xAA\xB2",
+ "\xA6\x4C" => "\xEC\xAA\xB3",
+ "\xA6\x4D" => "\xEC\xAA\xB4",
+ "\xA6\x4E" => "\xEC\xAA\xB5",
+ "\xA6\x4F" => "\xEC\xAA\xB6",
+ "\xA6\x50" => "\xEC\xAA\xB7",
+ "\xA6\x51" => "\xEC\xAA\xB8",
+ "\xA6\x52" => "\xEC\xAA\xB9",
+ "\xA6\x53" => "\xEC\xAA\xBA",
+ "\xA6\x54" => "\xEC\xAA\xBB",
+ "\xA6\x55" => "\xEC\xAA\xBE",
+ "\xA6\x56" => "\xEC\xAA\xBF",
+ "\xA6\x57" => "\xEC\xAB\x81",
+ "\xA6\x58" => "\xEC\xAB\x82",
+ "\xA6\x59" => "\xEC\xAB\x83",
+ "\xA6\x5A" => "\xEC\xAB\x85",
+ "\xA6\x61" => "\xEC\xAB\x86",
+ "\xA6\x62" => "\xEC\xAB\x87",
+ "\xA6\x63" => "\xEC\xAB\x88",
+ "\xA6\x64" => "\xEC\xAB\x89",
+ "\xA6\x65" => "\xEC\xAB\x8A",
+ "\xA6\x66" => "\xEC\xAB\x8B",
+ "\xA6\x67" => "\xEC\xAB\x8E",
+ "\xA6\x68" => "\xEC\xAB\x90",
+ "\xA6\x69" => "\xEC\xAB\x92",
+ "\xA6\x6A" => "\xEC\xAB\x94",
+ "\xA6\x6B" => "\xEC\xAB\x95",
+ "\xA6\x6C" => "\xEC\xAB\x96",
+ "\xA6\x6D" => "\xEC\xAB\x97",
+ "\xA6\x6E" => "\xEC\xAB\x9A",
+ "\xA6\x6F" => "\xEC\xAB\x9B",
+ "\xA6\x70" => "\xEC\xAB\x9C",
+ "\xA6\x71" => "\xEC\xAB\x9D",
+ "\xA6\x72" => "\xEC\xAB\x9E",
+ "\xA6\x73" => "\xEC\xAB\x9F",
+ "\xA6\x74" => "\xEC\xAB\xA1",
+ "\xA6\x75" => "\xEC\xAB\xA2",
+ "\xA6\x76" => "\xEC\xAB\xA3",
+ "\xA6\x77" => "\xEC\xAB\xA4",
+ "\xA6\x78" => "\xEC\xAB\xA5",
+ "\xA6\x79" => "\xEC\xAB\xA6",
+ "\xA6\x7A" => "\xEC\xAB\xA7",
+ "\xA6\x81" => "\xEC\xAB\xA8",
+ "\xA6\x82" => "\xEC\xAB\xA9",
+ "\xA6\x83" => "\xEC\xAB\xAA",
+ "\xA6\x84" => "\xEC\xAB\xAB",
+ "\xA6\x85" => "\xEC\xAB\xAD",
+ "\xA6\x86" => "\xEC\xAB\xAE",
+ "\xA6\x87" => "\xEC\xAB\xAF",
+ "\xA6\x88" => "\xEC\xAB\xB0",
+ "\xA6\x89" => "\xEC\xAB\xB1",
+ "\xA6\x8A" => "\xEC\xAB\xB2",
+ "\xA6\x8B" => "\xEC\xAB\xB3",
+ "\xA6\x8C" => "\xEC\xAB\xB5",
+ "\xA6\x8D" => "\xEC\xAB\xB6",
+ "\xA6\x8E" => "\xEC\xAB\xB7",
+ "\xA6\x8F" => "\xEC\xAB\xB8",
+ "\xA6\x90" => "\xEC\xAB\xB9",
+ "\xA6\x91" => "\xEC\xAB\xBA",
+ "\xA6\x92" => "\xEC\xAB\xBB",
+ "\xA6\x93" => "\xEC\xAB\xBC",
+ "\xA6\x94" => "\xEC\xAB\xBD",
+ "\xA6\x95" => "\xEC\xAB\xBE",
+ "\xA6\x96" => "\xEC\xAB\xBF",
+ "\xA6\x97" => "\xEC\xAC\x80",
+ "\xA6\x98" => "\xEC\xAC\x81",
+ "\xA6\x99" => "\xEC\xAC\x82",
+ "\xA6\x9A" => "\xEC\xAC\x83",
+ "\xA6\x9B" => "\xEC\xAC\x84",
+ "\xA6\x9C" => "\xEC\xAC\x85",
+ "\xA6\x9D" => "\xEC\xAC\x86",
+ "\xA6\x9E" => "\xEC\xAC\x87",
+ "\xA6\x9F" => "\xEC\xAC\x89",
+ "\xA6\xA0" => "\xEC\xAC\x8A",
+ "\xA6\xA1" => "\xE2\x94\x80",
+ "\xA6\xA2" => "\xE2\x94\x82",
+ "\xA6\xA3" => "\xE2\x94\x8C",
+ "\xA6\xA4" => "\xE2\x94\x90",
+ "\xA6\xA5" => "\xE2\x94\x98",
+ "\xA6\xA6" => "\xE2\x94\x94",
+ "\xA6\xA7" => "\xE2\x94\x9C",
+ "\xA6\xA8" => "\xE2\x94\xAC",
+ "\xA6\xA9" => "\xE2\x94\xA4",
+ "\xA6\xAA" => "\xE2\x94\xB4",
+ "\xA6\xAB" => "\xE2\x94\xBC",
+ "\xA6\xAC" => "\xE2\x94\x81",
+ "\xA6\xAD" => "\xE2\x94\x83",
+ "\xA6\xAE" => "\xE2\x94\x8F",
+ "\xA6\xAF" => "\xE2\x94\x93",
+ "\xA6\xB0" => "\xE2\x94\x9B",
+ "\xA6\xB1" => "\xE2\x94\x97",
+ "\xA6\xB2" => "\xE2\x94\xA3",
+ "\xA6\xB3" => "\xE2\x94\xB3",
+ "\xA6\xB4" => "\xE2\x94\xAB",
+ "\xA6\xB5" => "\xE2\x94\xBB",
+ "\xA6\xB6" => "\xE2\x95\x8B",
+ "\xA6\xB7" => "\xE2\x94\xA0",
+ "\xA6\xB8" => "\xE2\x94\xAF",
+ "\xA6\xB9" => "\xE2\x94\xA8",
+ "\xA6\xBA" => "\xE2\x94\xB7",
+ "\xA6\xBB" => "\xE2\x94\xBF",
+ "\xA6\xBC" => "\xE2\x94\x9D",
+ "\xA6\xBD" => "\xE2\x94\xB0",
+ "\xA6\xBE" => "\xE2\x94\xA5",
+ "\xA6\xBF" => "\xE2\x94\xB8",
+ "\xA6\xC0" => "\xE2\x95\x82",
+ "\xA6\xC1" => "\xE2\x94\x92",
+ "\xA6\xC2" => "\xE2\x94\x91",
+ "\xA6\xC3" => "\xE2\x94\x9A",
+ "\xA6\xC4" => "\xE2\x94\x99",
+ "\xA6\xC5" => "\xE2\x94\x96",
+ "\xA6\xC6" => "\xE2\x94\x95",
+ "\xA6\xC7" => "\xE2\x94\x8E",
+ "\xA6\xC8" => "\xE2\x94\x8D",
+ "\xA6\xC9" => "\xE2\x94\x9E",
+ "\xA6\xCA" => "\xE2\x94\x9F",
+ "\xA6\xCB" => "\xE2\x94\xA1",
+ "\xA6\xCC" => "\xE2\x94\xA2",
+ "\xA6\xCD" => "\xE2\x94\xA6",
+ "\xA6\xCE" => "\xE2\x94\xA7",
+ "\xA6\xCF" => "\xE2\x94\xA9",
+ "\xA6\xD0" => "\xE2\x94\xAA",
+ "\xA6\xD1" => "\xE2\x94\xAD",
+ "\xA6\xD2" => "\xE2\x94\xAE",
+ "\xA6\xD3" => "\xE2\x94\xB1",
+ "\xA6\xD4" => "\xE2\x94\xB2",
+ "\xA6\xD5" => "\xE2\x94\xB5",
+ "\xA6\xD6" => "\xE2\x94\xB6",
+ "\xA6\xD7" => "\xE2\x94\xB9",
+ "\xA6\xD8" => "\xE2\x94\xBA",
+ "\xA6\xD9" => "\xE2\x94\xBD",
+ "\xA6\xDA" => "\xE2\x94\xBE",
+ "\xA6\xDB" => "\xE2\x95\x80",
+ "\xA6\xDC" => "\xE2\x95\x81",
+ "\xA6\xDD" => "\xE2\x95\x83",
+ "\xA6\xDE" => "\xE2\x95\x84",
+ "\xA6\xDF" => "\xE2\x95\x85",
+ "\xA6\xE0" => "\xE2\x95\x86",
+ "\xA6\xE1" => "\xE2\x95\x87",
+ "\xA6\xE2" => "\xE2\x95\x88",
+ "\xA6\xE3" => "\xE2\x95\x89",
+ "\xA6\xE4" => "\xE2\x95\x8A",
+ "\xA7\x41" => "\xEC\xAC\x8B",
+ "\xA7\x42" => "\xEC\xAC\x8C",
+ "\xA7\x43" => "\xEC\xAC\x8D",
+ "\xA7\x44" => "\xEC\xAC\x8E",
+ "\xA7\x45" => "\xEC\xAC\x8F",
+ "\xA7\x46" => "\xEC\xAC\x91",
+ "\xA7\x47" => "\xEC\xAC\x92",
+ "\xA7\x48" => "\xEC\xAC\x93",
+ "\xA7\x49" => "\xEC\xAC\x95",
+ "\xA7\x4A" => "\xEC\xAC\x96",
+ "\xA7\x4B" => "\xEC\xAC\x97",
+ "\xA7\x4C" => "\xEC\xAC\x99",
+ "\xA7\x4D" => "\xEC\xAC\x9A",
+ "\xA7\x4E" => "\xEC\xAC\x9B",
+ "\xA7\x4F" => "\xEC\xAC\x9C",
+ "\xA7\x50" => "\xEC\xAC\x9D",
+ "\xA7\x51" => "\xEC\xAC\x9E",
+ "\xA7\x52" => "\xEC\xAC\x9F",
+ "\xA7\x53" => "\xEC\xAC\xA2",
+ "\xA7\x54" => "\xEC\xAC\xA3",
+ "\xA7\x55" => "\xEC\xAC\xA4",
+ "\xA7\x56" => "\xEC\xAC\xA5",
+ "\xA7\x57" => "\xEC\xAC\xA6",
+ "\xA7\x58" => "\xEC\xAC\xA7",
+ "\xA7\x59" => "\xEC\xAC\xA8",
+ "\xA7\x5A" => "\xEC\xAC\xA9",
+ "\xA7\x61" => "\xEC\xAC\xAA",
+ "\xA7\x62" => "\xEC\xAC\xAB",
+ "\xA7\x63" => "\xEC\xAC\xAC",
+ "\xA7\x64" => "\xEC\xAC\xAD",
+ "\xA7\x65" => "\xEC\xAC\xAE",
+ "\xA7\x66" => "\xEC\xAC\xAF",
+ "\xA7\x67" => "\xEC\xAC\xB0",
+ "\xA7\x68" => "\xEC\xAC\xB1",
+ "\xA7\x69" => "\xEC\xAC\xB2",
+ "\xA7\x6A" => "\xEC\xAC\xB3",
+ "\xA7\x6B" => "\xEC\xAC\xB4",
+ "\xA7\x6C" => "\xEC\xAC\xB5",
+ "\xA7\x6D" => "\xEC\xAC\xB6",
+ "\xA7\x6E" => "\xEC\xAC\xB7",
+ "\xA7\x6F" => "\xEC\xAC\xB8",
+ "\xA7\x70" => "\xEC\xAC\xB9",
+ "\xA7\x71" => "\xEC\xAC\xBA",
+ "\xA7\x72" => "\xEC\xAC\xBB",
+ "\xA7\x73" => "\xEC\xAC\xBC",
+ "\xA7\x74" => "\xEC\xAC\xBD",
+ "\xA7\x75" => "\xEC\xAC\xBE",
+ "\xA7\x76" => "\xEC\xAC\xBF",
+ "\xA7\x77" => "\xEC\xAD\x80",
+ "\xA7\x78" => "\xEC\xAD\x82",
+ "\xA7\x79" => "\xEC\xAD\x83",
+ "\xA7\x7A" => "\xEC\xAD\x84",
+ "\xA7\x81" => "\xEC\xAD\x85",
+ "\xA7\x82" => "\xEC\xAD\x86",
+ "\xA7\x83" => "\xEC\xAD\x87",
+ "\xA7\x84" => "\xEC\xAD\x8A",
+ "\xA7\x85" => "\xEC\xAD\x8B",
+ "\xA7\x86" => "\xEC\xAD\x8D",
+ "\xA7\x87" => "\xEC\xAD\x8E",
+ "\xA7\x88" => "\xEC\xAD\x8F",
+ "\xA7\x89" => "\xEC\xAD\x91",
+ "\xA7\x8A" => "\xEC\xAD\x92",
+ "\xA7\x8B" => "\xEC\xAD\x93",
+ "\xA7\x8C" => "\xEC\xAD\x94",
+ "\xA7\x8D" => "\xEC\xAD\x95",
+ "\xA7\x8E" => "\xEC\xAD\x96",
+ "\xA7\x8F" => "\xEC\xAD\x97",
+ "\xA7\x90" => "\xEC\xAD\x9A",
+ "\xA7\x91" => "\xEC\xAD\x9B",
+ "\xA7\x92" => "\xEC\xAD\x9C",
+ "\xA7\x93" => "\xEC\xAD\x9E",
+ "\xA7\x94" => "\xEC\xAD\x9F",
+ "\xA7\x95" => "\xEC\xAD\xA0",
+ "\xA7\x96" => "\xEC\xAD\xA1",
+ "\xA7\x97" => "\xEC\xAD\xA2",
+ "\xA7\x98" => "\xEC\xAD\xA3",
+ "\xA7\x99" => "\xEC\xAD\xA5",
+ "\xA7\x9A" => "\xEC\xAD\xA6",
+ "\xA7\x9B" => "\xEC\xAD\xA7",
+ "\xA7\x9C" => "\xEC\xAD\xA8",
+ "\xA7\x9D" => "\xEC\xAD\xA9",
+ "\xA7\x9E" => "\xEC\xAD\xAA",
+ "\xA7\x9F" => "\xEC\xAD\xAB",
+ "\xA7\xA0" => "\xEC\xAD\xAC",
+ "\xA7\xA1" => "\xE3\x8E\x95",
+ "\xA7\xA2" => "\xE3\x8E\x96",
+ "\xA7\xA3" => "\xE3\x8E\x97",
+ "\xA7\xA4" => "\xE2\x84\x93",
+ "\xA7\xA5" => "\xE3\x8E\x98",
+ "\xA7\xA6" => "\xE3\x8F\x84",
+ "\xA7\xA7" => "\xE3\x8E\xA3",
+ "\xA7\xA8" => "\xE3\x8E\xA4",
+ "\xA7\xA9" => "\xE3\x8E\xA5",
+ "\xA7\xAA" => "\xE3\x8E\xA6",
+ "\xA7\xAB" => "\xE3\x8E\x99",
+ "\xA7\xAC" => "\xE3\x8E\x9A",
+ "\xA7\xAD" => "\xE3\x8E\x9B",
+ "\xA7\xAE" => "\xE3\x8E\x9C",
+ "\xA7\xAF" => "\xE3\x8E\x9D",
+ "\xA7\xB0" => "\xE3\x8E\x9E",
+ "\xA7\xB1" => "\xE3\x8E\x9F",
+ "\xA7\xB2" => "\xE3\x8E\xA0",
+ "\xA7\xB3" => "\xE3\x8E\xA1",
+ "\xA7\xB4" => "\xE3\x8E\xA2",
+ "\xA7\xB5" => "\xE3\x8F\x8A",
+ "\xA7\xB6" => "\xE3\x8E\x8D",
+ "\xA7\xB7" => "\xE3\x8E\x8E",
+ "\xA7\xB8" => "\xE3\x8E\x8F",
+ "\xA7\xB9" => "\xE3\x8F\x8F",
+ "\xA7\xBA" => "\xE3\x8E\x88",
+ "\xA7\xBB" => "\xE3\x8E\x89",
+ "\xA7\xBC" => "\xE3\x8F\x88",
+ "\xA7\xBD" => "\xE3\x8E\xA7",
+ "\xA7\xBE" => "\xE3\x8E\xA8",
+ "\xA7\xBF" => "\xE3\x8E\xB0",
+ "\xA7\xC0" => "\xE3\x8E\xB1",
+ "\xA7\xC1" => "\xE3\x8E\xB2",
+ "\xA7\xC2" => "\xE3\x8E\xB3",
+ "\xA7\xC3" => "\xE3\x8E\xB4",
+ "\xA7\xC4" => "\xE3\x8E\xB5",
+ "\xA7\xC5" => "\xE3\x8E\xB6",
+ "\xA7\xC6" => "\xE3\x8E\xB7",
+ "\xA7\xC7" => "\xE3\x8E\xB8",
+ "\xA7\xC8" => "\xE3\x8E\xB9",
+ "\xA7\xC9" => "\xE3\x8E\x80",
+ "\xA7\xCA" => "\xE3\x8E\x81",
+ "\xA7\xCB" => "\xE3\x8E\x82",
+ "\xA7\xCC" => "\xE3\x8E\x83",
+ "\xA7\xCD" => "\xE3\x8E\x84",
+ "\xA7\xCE" => "\xE3\x8E\xBA",
+ "\xA7\xCF" => "\xE3\x8E\xBB",
+ "\xA7\xD0" => "\xE3\x8E\xBC",
+ "\xA7\xD1" => "\xE3\x8E\xBD",
+ "\xA7\xD2" => "\xE3\x8E\xBE",
+ "\xA7\xD3" => "\xE3\x8E\xBF",
+ "\xA7\xD4" => "\xE3\x8E\x90",
+ "\xA7\xD5" => "\xE3\x8E\x91",
+ "\xA7\xD6" => "\xE3\x8E\x92",
+ "\xA7\xD7" => "\xE3\x8E\x93",
+ "\xA7\xD8" => "\xE3\x8E\x94",
+ "\xA7\xD9" => "\xE2\x84\xA6",
+ "\xA7\xDA" => "\xE3\x8F\x80",
+ "\xA7\xDB" => "\xE3\x8F\x81",
+ "\xA7\xDC" => "\xE3\x8E\x8A",
+ "\xA7\xDD" => "\xE3\x8E\x8B",
+ "\xA7\xDE" => "\xE3\x8E\x8C",
+ "\xA7\xDF" => "\xE3\x8F\x96",
+ "\xA7\xE0" => "\xE3\x8F\x85",
+ "\xA7\xE1" => "\xE3\x8E\xAD",
+ "\xA7\xE2" => "\xE3\x8E\xAE",
+ "\xA7\xE3" => "\xE3\x8E\xAF",
+ "\xA7\xE4" => "\xE3\x8F\x9B",
+ "\xA7\xE5" => "\xE3\x8E\xA9",
+ "\xA7\xE6" => "\xE3\x8E\xAA",
+ "\xA7\xE7" => "\xE3\x8E\xAB",
+ "\xA7\xE8" => "\xE3\x8E\xAC",
+ "\xA7\xE9" => "\xE3\x8F\x9D",
+ "\xA7\xEA" => "\xE3\x8F\x90",
+ "\xA7\xEB" => "\xE3\x8F\x93",
+ "\xA7\xEC" => "\xE3\x8F\x83",
+ "\xA7\xED" => "\xE3\x8F\x89",
+ "\xA7\xEE" => "\xE3\x8F\x9C",
+ "\xA7\xEF" => "\xE3\x8F\x86",
+ "\xA8\x41" => "\xEC\xAD\xAD",
+ "\xA8\x42" => "\xEC\xAD\xAE",
+ "\xA8\x43" => "\xEC\xAD\xAF",
+ "\xA8\x44" => "\xEC\xAD\xB0",
+ "\xA8\x45" => "\xEC\xAD\xB1",
+ "\xA8\x46" => "\xEC\xAD\xB2",
+ "\xA8\x47" => "\xEC\xAD\xB3",
+ "\xA8\x48" => "\xEC\xAD\xB4",
+ "\xA8\x49" => "\xEC\xAD\xB5",
+ "\xA8\x4A" => "\xEC\xAD\xB6",
+ "\xA8\x4B" => "\xEC\xAD\xB7",
+ "\xA8\x4C" => "\xEC\xAD\xBA",
+ "\xA8\x4D" => "\xEC\xAD\xBB",
+ "\xA8\x4E" => "\xEC\xAD\xBC",
+ "\xA8\x4F" => "\xEC\xAD\xBD",
+ "\xA8\x50" => "\xEC\xAD\xBE",
+ "\xA8\x51" => "\xEC\xAD\xBF",
+ "\xA8\x52" => "\xEC\xAE\x80",
+ "\xA8\x53" => "\xEC\xAE\x81",
+ "\xA8\x54" => "\xEC\xAE\x82",
+ "\xA8\x55" => "\xEC\xAE\x83",
+ "\xA8\x56" => "\xEC\xAE\x84",
+ "\xA8\x57" => "\xEC\xAE\x85",
+ "\xA8\x58" => "\xEC\xAE\x86",
+ "\xA8\x59" => "\xEC\xAE\x87",
+ "\xA8\x5A" => "\xEC\xAE\x88",
+ "\xA8\x61" => "\xEC\xAE\x89",
+ "\xA8\x62" => "\xEC\xAE\x8A",
+ "\xA8\x63" => "\xEC\xAE\x8B",
+ "\xA8\x64" => "\xEC\xAE\x8C",
+ "\xA8\x65" => "\xEC\xAE\x8D",
+ "\xA8\x66" => "\xEC\xAE\x8E",
+ "\xA8\x67" => "\xEC\xAE\x8F",
+ "\xA8\x68" => "\xEC\xAE\x90",
+ "\xA8\x69" => "\xEC\xAE\x91",
+ "\xA8\x6A" => "\xEC\xAE\x92",
+ "\xA8\x6B" => "\xEC\xAE\x93",
+ "\xA8\x6C" => "\xEC\xAE\x94",
+ "\xA8\x6D" => "\xEC\xAE\x95",
+ "\xA8\x6E" => "\xEC\xAE\x96",
+ "\xA8\x6F" => "\xEC\xAE\x97",
+ "\xA8\x70" => "\xEC\xAE\x98",
+ "\xA8\x71" => "\xEC\xAE\x99",
+ "\xA8\x72" => "\xEC\xAE\x9A",
+ "\xA8\x73" => "\xEC\xAE\x9B",
+ "\xA8\x74" => "\xEC\xAE\x9D",
+ "\xA8\x75" => "\xEC\xAE\x9E",
+ "\xA8\x76" => "\xEC\xAE\x9F",
+ "\xA8\x77" => "\xEC\xAE\xA0",
+ "\xA8\x78" => "\xEC\xAE\xA1",
+ "\xA8\x79" => "\xEC\xAE\xA2",
+ "\xA8\x7A" => "\xEC\xAE\xA3",
+ "\xA8\x81" => "\xEC\xAE\xA4",
+ "\xA8\x82" => "\xEC\xAE\xA5",
+ "\xA8\x83" => "\xEC\xAE\xA6",
+ "\xA8\x84" => "\xEC\xAE\xA7",
+ "\xA8\x85" => "\xEC\xAE\xA8",
+ "\xA8\x86" => "\xEC\xAE\xA9",
+ "\xA8\x87" => "\xEC\xAE\xAA",
+ "\xA8\x88" => "\xEC\xAE\xAB",
+ "\xA8\x89" => "\xEC\xAE\xAC",
+ "\xA8\x8A" => "\xEC\xAE\xAD",
+ "\xA8\x8B" => "\xEC\xAE\xAE",
+ "\xA8\x8C" => "\xEC\xAE\xAF",
+ "\xA8\x8D" => "\xEC\xAE\xB0",
+ "\xA8\x8E" => "\xEC\xAE\xB1",
+ "\xA8\x8F" => "\xEC\xAE\xB2",
+ "\xA8\x90" => "\xEC\xAE\xB3",
+ "\xA8\x91" => "\xEC\xAE\xB4",
+ "\xA8\x92" => "\xEC\xAE\xB5",
+ "\xA8\x93" => "\xEC\xAE\xB6",
+ "\xA8\x94" => "\xEC\xAE\xB7",
+ "\xA8\x95" => "\xEC\xAE\xB9",
+ "\xA8\x96" => "\xEC\xAE\xBA",
+ "\xA8\x97" => "\xEC\xAE\xBB",
+ "\xA8\x98" => "\xEC\xAE\xBC",
+ "\xA8\x99" => "\xEC\xAE\xBD",
+ "\xA8\x9A" => "\xEC\xAE\xBE",
+ "\xA8\x9B" => "\xEC\xAE\xBF",
+ "\xA8\x9C" => "\xEC\xAF\x80",
+ "\xA8\x9D" => "\xEC\xAF\x81",
+ "\xA8\x9E" => "\xEC\xAF\x82",
+ "\xA8\x9F" => "\xEC\xAF\x83",
+ "\xA8\xA0" => "\xEC\xAF\x84",
+ "\xA8\xA1" => "\xC3\x86",
+ "\xA8\xA2" => "\xC3\x90",
+ "\xA8\xA3" => "\xC2\xAA",
+ "\xA8\xA4" => "\xC4\xA6",
+ "\xA8\xA6" => "\xC4\xB2",
+ "\xA8\xA8" => "\xC4\xBF",
+ "\xA8\xA9" => "\xC5\x81",
+ "\xA8\xAA" => "\xC3\x98",
+ "\xA8\xAB" => "\xC5\x92",
+ "\xA8\xAC" => "\xC2\xBA",
+ "\xA8\xAD" => "\xC3\x9E",
+ "\xA8\xAE" => "\xC5\xA6",
+ "\xA8\xAF" => "\xC5\x8A",
+ "\xA8\xB1" => "\xE3\x89\xA0",
+ "\xA8\xB2" => "\xE3\x89\xA1",
+ "\xA8\xB3" => "\xE3\x89\xA2",
+ "\xA8\xB4" => "\xE3\x89\xA3",
+ "\xA8\xB5" => "\xE3\x89\xA4",
+ "\xA8\xB6" => "\xE3\x89\xA5",
+ "\xA8\xB7" => "\xE3\x89\xA6",
+ "\xA8\xB8" => "\xE3\x89\xA7",
+ "\xA8\xB9" => "\xE3\x89\xA8",
+ "\xA8\xBA" => "\xE3\x89\xA9",
+ "\xA8\xBB" => "\xE3\x89\xAA",
+ "\xA8\xBC" => "\xE3\x89\xAB",
+ "\xA8\xBD" => "\xE3\x89\xAC",
+ "\xA8\xBE" => "\xE3\x89\xAD",
+ "\xA8\xBF" => "\xE3\x89\xAE",
+ "\xA8\xC0" => "\xE3\x89\xAF",
+ "\xA8\xC1" => "\xE3\x89\xB0",
+ "\xA8\xC2" => "\xE3\x89\xB1",
+ "\xA8\xC3" => "\xE3\x89\xB2",
+ "\xA8\xC4" => "\xE3\x89\xB3",
+ "\xA8\xC5" => "\xE3\x89\xB4",
+ "\xA8\xC6" => "\xE3\x89\xB5",
+ "\xA8\xC7" => "\xE3\x89\xB6",
+ "\xA8\xC8" => "\xE3\x89\xB7",
+ "\xA8\xC9" => "\xE3\x89\xB8",
+ "\xA8\xCA" => "\xE3\x89\xB9",
+ "\xA8\xCB" => "\xE3\x89\xBA",
+ "\xA8\xCC" => "\xE3\x89\xBB",
+ "\xA8\xCD" => "\xE2\x93\x90",
+ "\xA8\xCE" => "\xE2\x93\x91",
+ "\xA8\xCF" => "\xE2\x93\x92",
+ "\xA8\xD0" => "\xE2\x93\x93",
+ "\xA8\xD1" => "\xE2\x93\x94",
+ "\xA8\xD2" => "\xE2\x93\x95",
+ "\xA8\xD3" => "\xE2\x93\x96",
+ "\xA8\xD4" => "\xE2\x93\x97",
+ "\xA8\xD5" => "\xE2\x93\x98",
+ "\xA8\xD6" => "\xE2\x93\x99",
+ "\xA8\xD7" => "\xE2\x93\x9A",
+ "\xA8\xD8" => "\xE2\x93\x9B",
+ "\xA8\xD9" => "\xE2\x93\x9C",
+ "\xA8\xDA" => "\xE2\x93\x9D",
+ "\xA8\xDB" => "\xE2\x93\x9E",
+ "\xA8\xDC" => "\xE2\x93\x9F",
+ "\xA8\xDD" => "\xE2\x93\xA0",
+ "\xA8\xDE" => "\xE2\x93\xA1",
+ "\xA8\xDF" => "\xE2\x93\xA2",
+ "\xA8\xE0" => "\xE2\x93\xA3",
+ "\xA8\xE1" => "\xE2\x93\xA4",
+ "\xA8\xE2" => "\xE2\x93\xA5",
+ "\xA8\xE3" => "\xE2\x93\xA6",
+ "\xA8\xE4" => "\xE2\x93\xA7",
+ "\xA8\xE5" => "\xE2\x93\xA8",
+ "\xA8\xE6" => "\xE2\x93\xA9",
+ "\xA8\xE7" => "\xE2\x91\xA0",
+ "\xA8\xE8" => "\xE2\x91\xA1",
+ "\xA8\xE9" => "\xE2\x91\xA2",
+ "\xA8\xEA" => "\xE2\x91\xA3",
+ "\xA8\xEB" => "\xE2\x91\xA4",
+ "\xA8\xEC" => "\xE2\x91\xA5",
+ "\xA8\xED" => "\xE2\x91\xA6",
+ "\xA8\xEE" => "\xE2\x91\xA7",
+ "\xA8\xEF" => "\xE2\x91\xA8",
+ "\xA8\xF0" => "\xE2\x91\xA9",
+ "\xA8\xF1" => "\xE2\x91\xAA",
+ "\xA8\xF2" => "\xE2\x91\xAB",
+ "\xA8\xF3" => "\xE2\x91\xAC",
+ "\xA8\xF4" => "\xE2\x91\xAD",
+ "\xA8\xF5" => "\xE2\x91\xAE",
+ "\xA8\xF6" => "\xC2\xBD",
+ "\xA8\xF7" => "\xE2\x85\x93",
+ "\xA8\xF8" => "\xE2\x85\x94",
+ "\xA8\xF9" => "\xC2\xBC",
+ "\xA8\xFA" => "\xC2\xBE",
+ "\xA8\xFB" => "\xE2\x85\x9B",
+ "\xA8\xFC" => "\xE2\x85\x9C",
+ "\xA8\xFD" => "\xE2\x85\x9D",
+ "\xA8\xFE" => "\xE2\x85\x9E",
+ "\xA9\x41" => "\xEC\xAF\x85",
+ "\xA9\x42" => "\xEC\xAF\x86",
+ "\xA9\x43" => "\xEC\xAF\x87",
+ "\xA9\x44" => "\xEC\xAF\x88",
+ "\xA9\x45" => "\xEC\xAF\x89",
+ "\xA9\x46" => "\xEC\xAF\x8A",
+ "\xA9\x47" => "\xEC\xAF\x8B",
+ "\xA9\x48" => "\xEC\xAF\x8C",
+ "\xA9\x49" => "\xEC\xAF\x8D",
+ "\xA9\x4A" => "\xEC\xAF\x8E",
+ "\xA9\x4B" => "\xEC\xAF\x8F",
+ "\xA9\x4C" => "\xEC\xAF\x90",
+ "\xA9\x4D" => "\xEC\xAF\x91",
+ "\xA9\x4E" => "\xEC\xAF\x92",
+ "\xA9\x4F" => "\xEC\xAF\x93",
+ "\xA9\x50" => "\xEC\xAF\x95",
+ "\xA9\x51" => "\xEC\xAF\x96",
+ "\xA9\x52" => "\xEC\xAF\x97",
+ "\xA9\x53" => "\xEC\xAF\x98",
+ "\xA9\x54" => "\xEC\xAF\x99",
+ "\xA9\x55" => "\xEC\xAF\x9A",
+ "\xA9\x56" => "\xEC\xAF\x9B",
+ "\xA9\x57" => "\xEC\xAF\x9C",
+ "\xA9\x58" => "\xEC\xAF\x9D",
+ "\xA9\x59" => "\xEC\xAF\x9E",
+ "\xA9\x5A" => "\xEC\xAF\x9F",
+ "\xA9\x61" => "\xEC\xAF\xA0",
+ "\xA9\x62" => "\xEC\xAF\xA1",
+ "\xA9\x63" => "\xEC\xAF\xA2",
+ "\xA9\x64" => "\xEC\xAF\xA3",
+ "\xA9\x65" => "\xEC\xAF\xA5",
+ "\xA9\x66" => "\xEC\xAF\xA6",
+ "\xA9\x67" => "\xEC\xAF\xA8",
+ "\xA9\x68" => "\xEC\xAF\xAA",
+ "\xA9\x69" => "\xEC\xAF\xAB",
+ "\xA9\x6A" => "\xEC\xAF\xAC",
+ "\xA9\x6B" => "\xEC\xAF\xAD",
+ "\xA9\x6C" => "\xEC\xAF\xAE",
+ "\xA9\x6D" => "\xEC\xAF\xAF",
+ "\xA9\x6E" => "\xEC\xAF\xB0",
+ "\xA9\x6F" => "\xEC\xAF\xB1",
+ "\xA9\x70" => "\xEC\xAF\xB2",
+ "\xA9\x71" => "\xEC\xAF\xB3",
+ "\xA9\x72" => "\xEC\xAF\xB4",
+ "\xA9\x73" => "\xEC\xAF\xB5",
+ "\xA9\x74" => "\xEC\xAF\xB6",
+ "\xA9\x75" => "\xEC\xAF\xB7",
+ "\xA9\x76" => "\xEC\xAF\xB8",
+ "\xA9\x77" => "\xEC\xAF\xB9",
+ "\xA9\x78" => "\xEC\xAF\xBA",
+ "\xA9\x79" => "\xEC\xAF\xBB",
+ "\xA9\x7A" => "\xEC\xAF\xBC",
+ "\xA9\x81" => "\xEC\xAF\xBD",
+ "\xA9\x82" => "\xEC\xAF\xBE",
+ "\xA9\x83" => "\xEC\xAF\xBF",
+ "\xA9\x84" => "\xEC\xB0\x80",
+ "\xA9\x85" => "\xEC\xB0\x81",
+ "\xA9\x86" => "\xEC\xB0\x82",
+ "\xA9\x87" => "\xEC\xB0\x83",
+ "\xA9\x88" => "\xEC\xB0\x84",
+ "\xA9\x89" => "\xEC\xB0\x85",
+ "\xA9\x8A" => "\xEC\xB0\x86",
+ "\xA9\x8B" => "\xEC\xB0\x87",
+ "\xA9\x8C" => "\xEC\xB0\x88",
+ "\xA9\x8D" => "\xEC\xB0\x89",
+ "\xA9\x8E" => "\xEC\xB0\x8A",
+ "\xA9\x8F" => "\xEC\xB0\x8B",
+ "\xA9\x90" => "\xEC\xB0\x8E",
+ "\xA9\x91" => "\xEC\xB0\x8F",
+ "\xA9\x92" => "\xEC\xB0\x91",
+ "\xA9\x93" => "\xEC\xB0\x92",
+ "\xA9\x94" => "\xEC\xB0\x93",
+ "\xA9\x95" => "\xEC\xB0\x95",
+ "\xA9\x96" => "\xEC\xB0\x96",
+ "\xA9\x97" => "\xEC\xB0\x97",
+ "\xA9\x98" => "\xEC\xB0\x98",
+ "\xA9\x99" => "\xEC\xB0\x99",
+ "\xA9\x9A" => "\xEC\xB0\x9A",
+ "\xA9\x9B" => "\xEC\xB0\x9B",
+ "\xA9\x9C" => "\xEC\xB0\x9E",
+ "\xA9\x9D" => "\xEC\xB0\x9F",
+ "\xA9\x9E" => "\xEC\xB0\xA0",
+ "\xA9\x9F" => "\xEC\xB0\xA3",
+ "\xA9\xA0" => "\xEC\xB0\xA4",
+ "\xA9\xA1" => "\xC3\xA6",
+ "\xA9\xA2" => "\xC4\x91",
+ "\xA9\xA3" => "\xC3\xB0",
+ "\xA9\xA4" => "\xC4\xA7",
+ "\xA9\xA5" => "\xC4\xB1",
+ "\xA9\xA6" => "\xC4\xB3",
+ "\xA9\xA7" => "\xC4\xB8",
+ "\xA9\xA8" => "\xC5\x80",
+ "\xA9\xA9" => "\xC5\x82",
+ "\xA9\xAA" => "\xC3\xB8",
+ "\xA9\xAB" => "\xC5\x93",
+ "\xA9\xAC" => "\xC3\x9F",
+ "\xA9\xAD" => "\xC3\xBE",
+ "\xA9\xAE" => "\xC5\xA7",
+ "\xA9\xAF" => "\xC5\x8B",
+ "\xA9\xB0" => "\xC5\x89",
+ "\xA9\xB1" => "\xE3\x88\x80",
+ "\xA9\xB2" => "\xE3\x88\x81",
+ "\xA9\xB3" => "\xE3\x88\x82",
+ "\xA9\xB4" => "\xE3\x88\x83",
+ "\xA9\xB5" => "\xE3\x88\x84",
+ "\xA9\xB6" => "\xE3\x88\x85",
+ "\xA9\xB7" => "\xE3\x88\x86",
+ "\xA9\xB8" => "\xE3\x88\x87",
+ "\xA9\xB9" => "\xE3\x88\x88",
+ "\xA9\xBA" => "\xE3\x88\x89",
+ "\xA9\xBB" => "\xE3\x88\x8A",
+ "\xA9\xBC" => "\xE3\x88\x8B",
+ "\xA9\xBD" => "\xE3\x88\x8C",
+ "\xA9\xBE" => "\xE3\x88\x8D",
+ "\xA9\xBF" => "\xE3\x88\x8E",
+ "\xA9\xC0" => "\xE3\x88\x8F",
+ "\xA9\xC1" => "\xE3\x88\x90",
+ "\xA9\xC2" => "\xE3\x88\x91",
+ "\xA9\xC3" => "\xE3\x88\x92",
+ "\xA9\xC4" => "\xE3\x88\x93",
+ "\xA9\xC5" => "\xE3\x88\x94",
+ "\xA9\xC6" => "\xE3\x88\x95",
+ "\xA9\xC7" => "\xE3\x88\x96",
+ "\xA9\xC8" => "\xE3\x88\x97",
+ "\xA9\xC9" => "\xE3\x88\x98",
+ "\xA9\xCA" => "\xE3\x88\x99",
+ "\xA9\xCB" => "\xE3\x88\x9A",
+ "\xA9\xCC" => "\xE3\x88\x9B",
+ "\xA9\xCD" => "\xE2\x92\x9C",
+ "\xA9\xCE" => "\xE2\x92\x9D",
+ "\xA9\xCF" => "\xE2\x92\x9E",
+ "\xA9\xD0" => "\xE2\x92\x9F",
+ "\xA9\xD1" => "\xE2\x92\xA0",
+ "\xA9\xD2" => "\xE2\x92\xA1",
+ "\xA9\xD3" => "\xE2\x92\xA2",
+ "\xA9\xD4" => "\xE2\x92\xA3",
+ "\xA9\xD5" => "\xE2\x92\xA4",
+ "\xA9\xD6" => "\xE2\x92\xA5",
+ "\xA9\xD7" => "\xE2\x92\xA6",
+ "\xA9\xD8" => "\xE2\x92\xA7",
+ "\xA9\xD9" => "\xE2\x92\xA8",
+ "\xA9\xDA" => "\xE2\x92\xA9",
+ "\xA9\xDB" => "\xE2\x92\xAA",
+ "\xA9\xDC" => "\xE2\x92\xAB",
+ "\xA9\xDD" => "\xE2\x92\xAC",
+ "\xA9\xDE" => "\xE2\x92\xAD",
+ "\xA9\xDF" => "\xE2\x92\xAE",
+ "\xA9\xE0" => "\xE2\x92\xAF",
+ "\xA9\xE1" => "\xE2\x92\xB0",
+ "\xA9\xE2" => "\xE2\x92\xB1",
+ "\xA9\xE3" => "\xE2\x92\xB2",
+ "\xA9\xE4" => "\xE2\x92\xB3",
+ "\xA9\xE5" => "\xE2\x92\xB4",
+ "\xA9\xE6" => "\xE2\x92\xB5",
+ "\xA9\xE7" => "\xE2\x91\xB4",
+ "\xA9\xE8" => "\xE2\x91\xB5",
+ "\xA9\xE9" => "\xE2\x91\xB6",
+ "\xA9\xEA" => "\xE2\x91\xB7",
+ "\xA9\xEB" => "\xE2\x91\xB8",
+ "\xA9\xEC" => "\xE2\x91\xB9",
+ "\xA9\xED" => "\xE2\x91\xBA",
+ "\xA9\xEE" => "\xE2\x91\xBB",
+ "\xA9\xEF" => "\xE2\x91\xBC",
+ "\xA9\xF0" => "\xE2\x91\xBD",
+ "\xA9\xF1" => "\xE2\x91\xBE",
+ "\xA9\xF2" => "\xE2\x91\xBF",
+ "\xA9\xF3" => "\xE2\x92\x80",
+ "\xA9\xF4" => "\xE2\x92\x81",
+ "\xA9\xF5" => "\xE2\x92\x82",
+ "\xA9\xF6" => "\xC2\xB9",
+ "\xA9\xF7" => "\xC2\xB2",
+ "\xA9\xF8" => "\xC2\xB3",
+ "\xA9\xF9" => "\xE2\x81\xB4",
+ "\xA9\xFA" => "\xE2\x81\xBF",
+ "\xA9\xFB" => "\xE2\x82\x81",
+ "\xA9\xFC" => "\xE2\x82\x82",
+ "\xA9\xFD" => "\xE2\x82\x83",
+ "\xA9\xFE" => "\xE2\x82\x84",
+ "\xAA\x41" => "\xEC\xB0\xA5",
+ "\xAA\x42" => "\xEC\xB0\xA6",
+ "\xAA\x43" => "\xEC\xB0\xAA",
+ "\xAA\x44" => "\xEC\xB0\xAB",
+ "\xAA\x45" => "\xEC\xB0\xAD",
+ "\xAA\x46" => "\xEC\xB0\xAF",
+ "\xAA\x47" => "\xEC\xB0\xB1",
+ "\xAA\x48" => "\xEC\xB0\xB2",
+ "\xAA\x49" => "\xEC\xB0\xB3",
+ "\xAA\x4A" => "\xEC\xB0\xB4",
+ "\xAA\x4B" => "\xEC\xB0\xB5",
+ "\xAA\x4C" => "\xEC\xB0\xB6",
+ "\xAA\x4D" => "\xEC\xB0\xB7",
+ "\xAA\x4E" => "\xEC\xB0\xBA",
+ "\xAA\x4F" => "\xEC\xB0\xBF",
+ "\xAA\x50" => "\xEC\xB1\x80",
+ "\xAA\x51" => "\xEC\xB1\x81",
+ "\xAA\x52" => "\xEC\xB1\x82",
+ "\xAA\x53" => "\xEC\xB1\x83",
+ "\xAA\x54" => "\xEC\xB1\x86",
+ "\xAA\x55" => "\xEC\xB1\x87",
+ "\xAA\x56" => "\xEC\xB1\x89",
+ "\xAA\x57" => "\xEC\xB1\x8A",
+ "\xAA\x58" => "\xEC\xB1\x8B",
+ "\xAA\x59" => "\xEC\xB1\x8D",
+ "\xAA\x5A" => "\xEC\xB1\x8E",
+ "\xAA\x61" => "\xEC\xB1\x8F",
+ "\xAA\x62" => "\xEC\xB1\x90",
+ "\xAA\x63" => "\xEC\xB1\x91",
+ "\xAA\x64" => "\xEC\xB1\x92",
+ "\xAA\x65" => "\xEC\xB1\x93",
+ "\xAA\x66" => "\xEC\xB1\x96",
+ "\xAA\x67" => "\xEC\xB1\x9A",
+ "\xAA\x68" => "\xEC\xB1\x9B",
+ "\xAA\x69" => "\xEC\xB1\x9C",
+ "\xAA\x6A" => "\xEC\xB1\x9D",
+ "\xAA\x6B" => "\xEC\xB1\x9E",
+ "\xAA\x6C" => "\xEC\xB1\x9F",
+ "\xAA\x6D" => "\xEC\xB1\xA1",
+ "\xAA\x6E" => "\xEC\xB1\xA2",
+ "\xAA\x6F" => "\xEC\xB1\xA3",
+ "\xAA\x70" => "\xEC\xB1\xA5",
+ "\xAA\x71" => "\xEC\xB1\xA7",
+ "\xAA\x72" => "\xEC\xB1\xA9",
+ "\xAA\x73" => "\xEC\xB1\xAA",
+ "\xAA\x74" => "\xEC\xB1\xAB",
+ "\xAA\x75" => "\xEC\xB1\xAC",
+ "\xAA\x76" => "\xEC\xB1\xAD",
+ "\xAA\x77" => "\xEC\xB1\xAE",
+ "\xAA\x78" => "\xEC\xB1\xAF",
+ "\xAA\x79" => "\xEC\xB1\xB1",
+ "\xAA\x7A" => "\xEC\xB1\xB2",
+ "\xAA\x81" => "\xEC\xB1\xB3",
+ "\xAA\x82" => "\xEC\xB1\xB4",
+ "\xAA\x83" => "\xEC\xB1\xB6",
+ "\xAA\x84" => "\xEC\xB1\xB7",
+ "\xAA\x85" => "\xEC\xB1\xB8",
+ "\xAA\x86" => "\xEC\xB1\xB9",
+ "\xAA\x87" => "\xEC\xB1\xBA",
+ "\xAA\x88" => "\xEC\xB1\xBB",
+ "\xAA\x89" => "\xEC\xB1\xBC",
+ "\xAA\x8A" => "\xEC\xB1\xBD",
+ "\xAA\x8B" => "\xEC\xB1\xBE",
+ "\xAA\x8C" => "\xEC\xB1\xBF",
+ "\xAA\x8D" => "\xEC\xB2\x80",
+ "\xAA\x8E" => "\xEC\xB2\x81",
+ "\xAA\x8F" => "\xEC\xB2\x82",
+ "\xAA\x90" => "\xEC\xB2\x83",
+ "\xAA\x91" => "\xEC\xB2\x84",
+ "\xAA\x92" => "\xEC\xB2\x85",
+ "\xAA\x93" => "\xEC\xB2\x86",
+ "\xAA\x94" => "\xEC\xB2\x87",
+ "\xAA\x95" => "\xEC\xB2\x88",
+ "\xAA\x96" => "\xEC\xB2\x89",
+ "\xAA\x97" => "\xEC\xB2\x8A",
+ "\xAA\x98" => "\xEC\xB2\x8B",
+ "\xAA\x99" => "\xEC\xB2\x8C",
+ "\xAA\x9A" => "\xEC\xB2\x8D",
+ "\xAA\x9B" => "\xEC\xB2\x8E",
+ "\xAA\x9C" => "\xEC\xB2\x8F",
+ "\xAA\x9D" => "\xEC\xB2\x90",
+ "\xAA\x9E" => "\xEC\xB2\x91",
+ "\xAA\x9F" => "\xEC\xB2\x92",
+ "\xAA\xA0" => "\xEC\xB2\x93",
+ "\xAA\xA1" => "\xE3\x81\x81",
+ "\xAA\xA2" => "\xE3\x81\x82",
+ "\xAA\xA3" => "\xE3\x81\x83",
+ "\xAA\xA4" => "\xE3\x81\x84",
+ "\xAA\xA5" => "\xE3\x81\x85",
+ "\xAA\xA6" => "\xE3\x81\x86",
+ "\xAA\xA7" => "\xE3\x81\x87",
+ "\xAA\xA8" => "\xE3\x81\x88",
+ "\xAA\xA9" => "\xE3\x81\x89",
+ "\xAA\xAA" => "\xE3\x81\x8A",
+ "\xAA\xAB" => "\xE3\x81\x8B",
+ "\xAA\xAC" => "\xE3\x81\x8C",
+ "\xAA\xAD" => "\xE3\x81\x8D",
+ "\xAA\xAE" => "\xE3\x81\x8E",
+ "\xAA\xAF" => "\xE3\x81\x8F",
+ "\xAA\xB0" => "\xE3\x81\x90",
+ "\xAA\xB1" => "\xE3\x81\x91",
+ "\xAA\xB2" => "\xE3\x81\x92",
+ "\xAA\xB3" => "\xE3\x81\x93",
+ "\xAA\xB4" => "\xE3\x81\x94",
+ "\xAA\xB5" => "\xE3\x81\x95",
+ "\xAA\xB6" => "\xE3\x81\x96",
+ "\xAA\xB7" => "\xE3\x81\x97",
+ "\xAA\xB8" => "\xE3\x81\x98",
+ "\xAA\xB9" => "\xE3\x81\x99",
+ "\xAA\xBA" => "\xE3\x81\x9A",
+ "\xAA\xBB" => "\xE3\x81\x9B",
+ "\xAA\xBC" => "\xE3\x81\x9C",
+ "\xAA\xBD" => "\xE3\x81\x9D",
+ "\xAA\xBE" => "\xE3\x81\x9E",
+ "\xAA\xBF" => "\xE3\x81\x9F",
+ "\xAA\xC0" => "\xE3\x81\xA0",
+ "\xAA\xC1" => "\xE3\x81\xA1",
+ "\xAA\xC2" => "\xE3\x81\xA2",
+ "\xAA\xC3" => "\xE3\x81\xA3",
+ "\xAA\xC4" => "\xE3\x81\xA4",
+ "\xAA\xC5" => "\xE3\x81\xA5",
+ "\xAA\xC6" => "\xE3\x81\xA6",
+ "\xAA\xC7" => "\xE3\x81\xA7",
+ "\xAA\xC8" => "\xE3\x81\xA8",
+ "\xAA\xC9" => "\xE3\x81\xA9",
+ "\xAA\xCA" => "\xE3\x81\xAA",
+ "\xAA\xCB" => "\xE3\x81\xAB",
+ "\xAA\xCC" => "\xE3\x81\xAC",
+ "\xAA\xCD" => "\xE3\x81\xAD",
+ "\xAA\xCE" => "\xE3\x81\xAE",
+ "\xAA\xCF" => "\xE3\x81\xAF",
+ "\xAA\xD0" => "\xE3\x81\xB0",
+ "\xAA\xD1" => "\xE3\x81\xB1",
+ "\xAA\xD2" => "\xE3\x81\xB2",
+ "\xAA\xD3" => "\xE3\x81\xB3",
+ "\xAA\xD4" => "\xE3\x81\xB4",
+ "\xAA\xD5" => "\xE3\x81\xB5",
+ "\xAA\xD6" => "\xE3\x81\xB6",
+ "\xAA\xD7" => "\xE3\x81\xB7",
+ "\xAA\xD8" => "\xE3\x81\xB8",
+ "\xAA\xD9" => "\xE3\x81\xB9",
+ "\xAA\xDA" => "\xE3\x81\xBA",
+ "\xAA\xDB" => "\xE3\x81\xBB",
+ "\xAA\xDC" => "\xE3\x81\xBC",
+ "\xAA\xDD" => "\xE3\x81\xBD",
+ "\xAA\xDE" => "\xE3\x81\xBE",
+ "\xAA\xDF" => "\xE3\x81\xBF",
+ "\xAA\xE0" => "\xE3\x82\x80",
+ "\xAA\xE1" => "\xE3\x82\x81",
+ "\xAA\xE2" => "\xE3\x82\x82",
+ "\xAA\xE3" => "\xE3\x82\x83",
+ "\xAA\xE4" => "\xE3\x82\x84",
+ "\xAA\xE5" => "\xE3\x82\x85",
+ "\xAA\xE6" => "\xE3\x82\x86",
+ "\xAA\xE7" => "\xE3\x82\x87",
+ "\xAA\xE8" => "\xE3\x82\x88",
+ "\xAA\xE9" => "\xE3\x82\x89",
+ "\xAA\xEA" => "\xE3\x82\x8A",
+ "\xAA\xEB" => "\xE3\x82\x8B",
+ "\xAA\xEC" => "\xE3\x82\x8C",
+ "\xAA\xED" => "\xE3\x82\x8D",
+ "\xAA\xEE" => "\xE3\x82\x8E",
+ "\xAA\xEF" => "\xE3\x82\x8F",
+ "\xAA\xF0" => "\xE3\x82\x90",
+ "\xAA\xF1" => "\xE3\x82\x91",
+ "\xAA\xF2" => "\xE3\x82\x92",
+ "\xAA\xF3" => "\xE3\x82\x93",
+ "\xAB\x41" => "\xEC\xB2\x94",
+ "\xAB\x42" => "\xEC\xB2\x95",
+ "\xAB\x43" => "\xEC\xB2\x96",
+ "\xAB\x44" => "\xEC\xB2\x97",
+ "\xAB\x45" => "\xEC\xB2\x9A",
+ "\xAB\x46" => "\xEC\xB2\x9B",
+ "\xAB\x47" => "\xEC\xB2\x9D",
+ "\xAB\x48" => "\xEC\xB2\x9E",
+ "\xAB\x49" => "\xEC\xB2\x9F",
+ "\xAB\x4A" => "\xEC\xB2\xA1",
+ "\xAB\x4B" => "\xEC\xB2\xA2",
+ "\xAB\x4C" => "\xEC\xB2\xA3",
+ "\xAB\x4D" => "\xEC\xB2\xA4",
+ "\xAB\x4E" => "\xEC\xB2\xA5",
+ "\xAB\x4F" => "\xEC\xB2\xA6",
+ "\xAB\x50" => "\xEC\xB2\xA7",
+ "\xAB\x51" => "\xEC\xB2\xAA",
+ "\xAB\x52" => "\xEC\xB2\xAE",
+ "\xAB\x53" => "\xEC\xB2\xAF",
+ "\xAB\x54" => "\xEC\xB2\xB0",
+ "\xAB\x55" => "\xEC\xB2\xB1",
+ "\xAB\x56" => "\xEC\xB2\xB2",
+ "\xAB\x57" => "\xEC\xB2\xB3",
+ "\xAB\x58" => "\xEC\xB2\xB6",
+ "\xAB\x59" => "\xEC\xB2\xB7",
+ "\xAB\x5A" => "\xEC\xB2\xB9",
+ "\xAB\x61" => "\xEC\xB2\xBA",
+ "\xAB\x62" => "\xEC\xB2\xBB",
+ "\xAB\x63" => "\xEC\xB2\xBD",
+ "\xAB\x64" => "\xEC\xB2\xBE",
+ "\xAB\x65" => "\xEC\xB2\xBF",
+ "\xAB\x66" => "\xEC\xB3\x80",
+ "\xAB\x67" => "\xEC\xB3\x81",
+ "\xAB\x68" => "\xEC\xB3\x82",
+ "\xAB\x69" => "\xEC\xB3\x83",
+ "\xAB\x6A" => "\xEC\xB3\x86",
+ "\xAB\x6B" => "\xEC\xB3\x88",
+ "\xAB\x6C" => "\xEC\xB3\x8A",
+ "\xAB\x6D" => "\xEC\xB3\x8B",
+ "\xAB\x6E" => "\xEC\xB3\x8C",
+ "\xAB\x6F" => "\xEC\xB3\x8D",
+ "\xAB\x70" => "\xEC\xB3\x8E",
+ "\xAB\x71" => "\xEC\xB3\x8F",
+ "\xAB\x72" => "\xEC\xB3\x91",
+ "\xAB\x73" => "\xEC\xB3\x92",
+ "\xAB\x74" => "\xEC\xB3\x93",
+ "\xAB\x75" => "\xEC\xB3\x95",
+ "\xAB\x76" => "\xEC\xB3\x96",
+ "\xAB\x77" => "\xEC\xB3\x97",
+ "\xAB\x78" => "\xEC\xB3\x98",
+ "\xAB\x79" => "\xEC\xB3\x99",
+ "\xAB\x7A" => "\xEC\xB3\x9A",
+ "\xAB\x81" => "\xEC\xB3\x9B",
+ "\xAB\x82" => "\xEC\xB3\x9C",
+ "\xAB\x83" => "\xEC\xB3\x9D",
+ "\xAB\x84" => "\xEC\xB3\x9E",
+ "\xAB\x85" => "\xEC\xB3\x9F",
+ "\xAB\x86" => "\xEC\xB3\xA0",
+ "\xAB\x87" => "\xEC\xB3\xA1",
+ "\xAB\x88" => "\xEC\xB3\xA2",
+ "\xAB\x89" => "\xEC\xB3\xA3",
+ "\xAB\x8A" => "\xEC\xB3\xA5",
+ "\xAB\x8B" => "\xEC\xB3\xA6",
+ "\xAB\x8C" => "\xEC\xB3\xA7",
+ "\xAB\x8D" => "\xEC\xB3\xA8",
+ "\xAB\x8E" => "\xEC\xB3\xA9",
+ "\xAB\x8F" => "\xEC\xB3\xAA",
+ "\xAB\x90" => "\xEC\xB3\xAB",
+ "\xAB\x91" => "\xEC\xB3\xAD",
+ "\xAB\x92" => "\xEC\xB3\xAE",
+ "\xAB\x93" => "\xEC\xB3\xAF",
+ "\xAB\x94" => "\xEC\xB3\xB1",
+ "\xAB\x95" => "\xEC\xB3\xB2",
+ "\xAB\x96" => "\xEC\xB3\xB3",
+ "\xAB\x97" => "\xEC\xB3\xB4",
+ "\xAB\x98" => "\xEC\xB3\xB5",
+ "\xAB\x99" => "\xEC\xB3\xB6",
+ "\xAB\x9A" => "\xEC\xB3\xB7",
+ "\xAB\x9B" => "\xEC\xB3\xB8",
+ "\xAB\x9C" => "\xEC\xB3\xB9",
+ "\xAB\x9D" => "\xEC\xB3\xBA",
+ "\xAB\x9E" => "\xEC\xB3\xBB",
+ "\xAB\x9F" => "\xEC\xB3\xBC",
+ "\xAB\xA0" => "\xEC\xB3\xBD",
+ "\xAB\xA1" => "\xE3\x82\xA1",
+ "\xAB\xA2" => "\xE3\x82\xA2",
+ "\xAB\xA3" => "\xE3\x82\xA3",
+ "\xAB\xA4" => "\xE3\x82\xA4",
+ "\xAB\xA5" => "\xE3\x82\xA5",
+ "\xAB\xA6" => "\xE3\x82\xA6",
+ "\xAB\xA7" => "\xE3\x82\xA7",
+ "\xAB\xA8" => "\xE3\x82\xA8",
+ "\xAB\xA9" => "\xE3\x82\xA9",
+ "\xAB\xAA" => "\xE3\x82\xAA",
+ "\xAB\xAB" => "\xE3\x82\xAB",
+ "\xAB\xAC" => "\xE3\x82\xAC",
+ "\xAB\xAD" => "\xE3\x82\xAD",
+ "\xAB\xAE" => "\xE3\x82\xAE",
+ "\xAB\xAF" => "\xE3\x82\xAF",
+ "\xAB\xB0" => "\xE3\x82\xB0",
+ "\xAB\xB1" => "\xE3\x82\xB1",
+ "\xAB\xB2" => "\xE3\x82\xB2",
+ "\xAB\xB3" => "\xE3\x82\xB3",
+ "\xAB\xB4" => "\xE3\x82\xB4",
+ "\xAB\xB5" => "\xE3\x82\xB5",
+ "\xAB\xB6" => "\xE3\x82\xB6",
+ "\xAB\xB7" => "\xE3\x82\xB7",
+ "\xAB\xB8" => "\xE3\x82\xB8",
+ "\xAB\xB9" => "\xE3\x82\xB9",
+ "\xAB\xBA" => "\xE3\x82\xBA",
+ "\xAB\xBB" => "\xE3\x82\xBB",
+ "\xAB\xBC" => "\xE3\x82\xBC",
+ "\xAB\xBD" => "\xE3\x82\xBD",
+ "\xAB\xBE" => "\xE3\x82\xBE",
+ "\xAB\xBF" => "\xE3\x82\xBF",
+ "\xAB\xC0" => "\xE3\x83\x80",
+ "\xAB\xC1" => "\xE3\x83\x81",
+ "\xAB\xC2" => "\xE3\x83\x82",
+ "\xAB\xC3" => "\xE3\x83\x83",
+ "\xAB\xC4" => "\xE3\x83\x84",
+ "\xAB\xC5" => "\xE3\x83\x85",
+ "\xAB\xC6" => "\xE3\x83\x86",
+ "\xAB\xC7" => "\xE3\x83\x87",
+ "\xAB\xC8" => "\xE3\x83\x88",
+ "\xAB\xC9" => "\xE3\x83\x89",
+ "\xAB\xCA" => "\xE3\x83\x8A",
+ "\xAB\xCB" => "\xE3\x83\x8B",
+ "\xAB\xCC" => "\xE3\x83\x8C",
+ "\xAB\xCD" => "\xE3\x83\x8D",
+ "\xAB\xCE" => "\xE3\x83\x8E",
+ "\xAB\xCF" => "\xE3\x83\x8F",
+ "\xAB\xD0" => "\xE3\x83\x90",
+ "\xAB\xD1" => "\xE3\x83\x91",
+ "\xAB\xD2" => "\xE3\x83\x92",
+ "\xAB\xD3" => "\xE3\x83\x93",
+ "\xAB\xD4" => "\xE3\x83\x94",
+ "\xAB\xD5" => "\xE3\x83\x95",
+ "\xAB\xD6" => "\xE3\x83\x96",
+ "\xAB\xD7" => "\xE3\x83\x97",
+ "\xAB\xD8" => "\xE3\x83\x98",
+ "\xAB\xD9" => "\xE3\x83\x99",
+ "\xAB\xDA" => "\xE3\x83\x9A",
+ "\xAB\xDB" => "\xE3\x83\x9B",
+ "\xAB\xDC" => "\xE3\x83\x9C",
+ "\xAB\xDD" => "\xE3\x83\x9D",
+ "\xAB\xDE" => "\xE3\x83\x9E",
+ "\xAB\xDF" => "\xE3\x83\x9F",
+ "\xAB\xE0" => "\xE3\x83\xA0",
+ "\xAB\xE1" => "\xE3\x83\xA1",
+ "\xAB\xE2" => "\xE3\x83\xA2",
+ "\xAB\xE3" => "\xE3\x83\xA3",
+ "\xAB\xE4" => "\xE3\x83\xA4",
+ "\xAB\xE5" => "\xE3\x83\xA5",
+ "\xAB\xE6" => "\xE3\x83\xA6",
+ "\xAB\xE7" => "\xE3\x83\xA7",
+ "\xAB\xE8" => "\xE3\x83\xA8",
+ "\xAB\xE9" => "\xE3\x83\xA9",
+ "\xAB\xEA" => "\xE3\x83\xAA",
+ "\xAB\xEB" => "\xE3\x83\xAB",
+ "\xAB\xEC" => "\xE3\x83\xAC",
+ "\xAB\xED" => "\xE3\x83\xAD",
+ "\xAB\xEE" => "\xE3\x83\xAE",
+ "\xAB\xEF" => "\xE3\x83\xAF",
+ "\xAB\xF0" => "\xE3\x83\xB0",
+ "\xAB\xF1" => "\xE3\x83\xB1",
+ "\xAB\xF2" => "\xE3\x83\xB2",
+ "\xAB\xF3" => "\xE3\x83\xB3",
+ "\xAB\xF4" => "\xE3\x83\xB4",
+ "\xAB\xF5" => "\xE3\x83\xB5",
+ "\xAB\xF6" => "\xE3\x83\xB6",
+ "\xAC\x41" => "\xEC\xB3\xBE",
+ "\xAC\x42" => "\xEC\xB3\xBF",
+ "\xAC\x43" => "\xEC\xB4\x80",
+ "\xAC\x44" => "\xEC\xB4\x82",
+ "\xAC\x45" => "\xEC\xB4\x83",
+ "\xAC\x46" => "\xEC\xB4\x84",
+ "\xAC\x47" => "\xEC\xB4\x85",
+ "\xAC\x48" => "\xEC\xB4\x86",
+ "\xAC\x49" => "\xEC\xB4\x87",
+ "\xAC\x4A" => "\xEC\xB4\x8A",
+ "\xAC\x4B" => "\xEC\xB4\x8B",
+ "\xAC\x4C" => "\xEC\xB4\x8D",
+ "\xAC\x4D" => "\xEC\xB4\x8E",
+ "\xAC\x4E" => "\xEC\xB4\x8F",
+ "\xAC\x4F" => "\xEC\xB4\x91",
+ "\xAC\x50" => "\xEC\xB4\x92",
+ "\xAC\x51" => "\xEC\xB4\x93",
+ "\xAC\x52" => "\xEC\xB4\x94",
+ "\xAC\x53" => "\xEC\xB4\x95",
+ "\xAC\x54" => "\xEC\xB4\x96",
+ "\xAC\x55" => "\xEC\xB4\x97",
+ "\xAC\x56" => "\xEC\xB4\x9A",
+ "\xAC\x57" => "\xEC\xB4\x9C",
+ "\xAC\x58" => "\xEC\xB4\x9E",
+ "\xAC\x59" => "\xEC\xB4\x9F",
+ "\xAC\x5A" => "\xEC\xB4\xA0",
+ "\xAC\x61" => "\xEC\xB4\xA1",
+ "\xAC\x62" => "\xEC\xB4\xA2",
+ "\xAC\x63" => "\xEC\xB4\xA3",
+ "\xAC\x64" => "\xEC\xB4\xA5",
+ "\xAC\x65" => "\xEC\xB4\xA6",
+ "\xAC\x66" => "\xEC\xB4\xA7",
+ "\xAC\x67" => "\xEC\xB4\xA9",
+ "\xAC\x68" => "\xEC\xB4\xAA",
+ "\xAC\x69" => "\xEC\xB4\xAB",
+ "\xAC\x6A" => "\xEC\xB4\xAD",
+ "\xAC\x6B" => "\xEC\xB4\xAE",
+ "\xAC\x6C" => "\xEC\xB4\xAF",
+ "\xAC\x6D" => "\xEC\xB4\xB0",
+ "\xAC\x6E" => "\xEC\xB4\xB1",
+ "\xAC\x6F" => "\xEC\xB4\xB2",
+ "\xAC\x70" => "\xEC\xB4\xB3",
+ "\xAC\x71" => "\xEC\xB4\xB4",
+ "\xAC\x72" => "\xEC\xB4\xB5",
+ "\xAC\x73" => "\xEC\xB4\xB6",
+ "\xAC\x74" => "\xEC\xB4\xB7",
+ "\xAC\x75" => "\xEC\xB4\xB8",
+ "\xAC\x76" => "\xEC\xB4\xBA",
+ "\xAC\x77" => "\xEC\xB4\xBB",
+ "\xAC\x78" => "\xEC\xB4\xBC",
+ "\xAC\x79" => "\xEC\xB4\xBD",
+ "\xAC\x7A" => "\xEC\xB4\xBE",
+ "\xAC\x81" => "\xEC\xB4\xBF",
+ "\xAC\x82" => "\xEC\xB5\x80",
+ "\xAC\x83" => "\xEC\xB5\x81",
+ "\xAC\x84" => "\xEC\xB5\x82",
+ "\xAC\x85" => "\xEC\xB5\x83",
+ "\xAC\x86" => "\xEC\xB5\x84",
+ "\xAC\x87" => "\xEC\xB5\x85",
+ "\xAC\x88" => "\xEC\xB5\x86",
+ "\xAC\x89" => "\xEC\xB5\x87",
+ "\xAC\x8A" => "\xEC\xB5\x88",
+ "\xAC\x8B" => "\xEC\xB5\x89",
+ "\xAC\x8C" => "\xEC\xB5\x8A",
+ "\xAC\x8D" => "\xEC\xB5\x8B",
+ "\xAC\x8E" => "\xEC\xB5\x8C",
+ "\xAC\x8F" => "\xEC\xB5\x8D",
+ "\xAC\x90" => "\xEC\xB5\x8E",
+ "\xAC\x91" => "\xEC\xB5\x8F",
+ "\xAC\x92" => "\xEC\xB5\x90",
+ "\xAC\x93" => "\xEC\xB5\x91",
+ "\xAC\x94" => "\xEC\xB5\x92",
+ "\xAC\x95" => "\xEC\xB5\x93",
+ "\xAC\x96" => "\xEC\xB5\x94",
+ "\xAC\x97" => "\xEC\xB5\x95",
+ "\xAC\x98" => "\xEC\xB5\x96",
+ "\xAC\x99" => "\xEC\xB5\x97",
+ "\xAC\x9A" => "\xEC\xB5\x98",
+ "\xAC\x9B" => "\xEC\xB5\x99",
+ "\xAC\x9C" => "\xEC\xB5\x9A",
+ "\xAC\x9D" => "\xEC\xB5\x9B",
+ "\xAC\x9E" => "\xEC\xB5\x9D",
+ "\xAC\x9F" => "\xEC\xB5\x9E",
+ "\xAC\xA0" => "\xEC\xB5\x9F",
+ "\xAC\xA1" => "\xD0\x90",
+ "\xAC\xA2" => "\xD0\x91",
+ "\xAC\xA3" => "\xD0\x92",
+ "\xAC\xA4" => "\xD0\x93",
+ "\xAC\xA5" => "\xD0\x94",
+ "\xAC\xA6" => "\xD0\x95",
+ "\xAC\xA7" => "\xD0\x81",
+ "\xAC\xA8" => "\xD0\x96",
+ "\xAC\xA9" => "\xD0\x97",
+ "\xAC\xAA" => "\xD0\x98",
+ "\xAC\xAB" => "\xD0\x99",
+ "\xAC\xAC" => "\xD0\x9A",
+ "\xAC\xAD" => "\xD0\x9B",
+ "\xAC\xAE" => "\xD0\x9C",
+ "\xAC\xAF" => "\xD0\x9D",
+ "\xAC\xB0" => "\xD0\x9E",
+ "\xAC\xB1" => "\xD0\x9F",
+ "\xAC\xB2" => "\xD0\xA0",
+ "\xAC\xB3" => "\xD0\xA1",
+ "\xAC\xB4" => "\xD0\xA2",
+ "\xAC\xB5" => "\xD0\xA3",
+ "\xAC\xB6" => "\xD0\xA4",
+ "\xAC\xB7" => "\xD0\xA5",
+ "\xAC\xB8" => "\xD0\xA6",
+ "\xAC\xB9" => "\xD0\xA7",
+ "\xAC\xBA" => "\xD0\xA8",
+ "\xAC\xBB" => "\xD0\xA9",
+ "\xAC\xBC" => "\xD0\xAA",
+ "\xAC\xBD" => "\xD0\xAB",
+ "\xAC\xBE" => "\xD0\xAC",
+ "\xAC\xBF" => "\xD0\xAD",
+ "\xAC\xC0" => "\xD0\xAE",
+ "\xAC\xC1" => "\xD0\xAF",
+ "\xAC\xD1" => "\xD0\xB0",
+ "\xAC\xD2" => "\xD0\xB1",
+ "\xAC\xD3" => "\xD0\xB2",
+ "\xAC\xD4" => "\xD0\xB3",
+ "\xAC\xD5" => "\xD0\xB4",
+ "\xAC\xD6" => "\xD0\xB5",
+ "\xAC\xD7" => "\xD1\x91",
+ "\xAC\xD8" => "\xD0\xB6",
+ "\xAC\xD9" => "\xD0\xB7",
+ "\xAC\xDA" => "\xD0\xB8",
+ "\xAC\xDB" => "\xD0\xB9",
+ "\xAC\xDC" => "\xD0\xBA",
+ "\xAC\xDD" => "\xD0\xBB",
+ "\xAC\xDE" => "\xD0\xBC",
+ "\xAC\xDF" => "\xD0\xBD",
+ "\xAC\xE0" => "\xD0\xBE",
+ "\xAC\xE1" => "\xD0\xBF",
+ "\xAC\xE2" => "\xD1\x80",
+ "\xAC\xE3" => "\xD1\x81",
+ "\xAC\xE4" => "\xD1\x82",
+ "\xAC\xE5" => "\xD1\x83",
+ "\xAC\xE6" => "\xD1\x84",
+ "\xAC\xE7" => "\xD1\x85",
+ "\xAC\xE8" => "\xD1\x86",
+ "\xAC\xE9" => "\xD1\x87",
+ "\xAC\xEA" => "\xD1\x88",
+ "\xAC\xEB" => "\xD1\x89",
+ "\xAC\xEC" => "\xD1\x8A",
+ "\xAC\xED" => "\xD1\x8B",
+ "\xAC\xEE" => "\xD1\x8C",
+ "\xAC\xEF" => "\xD1\x8D",
+ "\xAC\xF0" => "\xD1\x8E",
+ "\xAC\xF1" => "\xD1\x8F",
+ "\xAD\x41" => "\xEC\xB5\xA1",
+ "\xAD\x42" => "\xEC\xB5\xA2",
+ "\xAD\x43" => "\xEC\xB5\xA3",
+ "\xAD\x44" => "\xEC\xB5\xA5",
+ "\xAD\x45" => "\xEC\xB5\xA6",
+ "\xAD\x46" => "\xEC\xB5\xA7",
+ "\xAD\x47" => "\xEC\xB5\xA8",
+ "\xAD\x48" => "\xEC\xB5\xA9",
+ "\xAD\x49" => "\xEC\xB5\xAA",
+ "\xAD\x4A" => "\xEC\xB5\xAB",
+ "\xAD\x4B" => "\xEC\xB5\xAE",
+ "\xAD\x4C" => "\xEC\xB5\xB0",
+ "\xAD\x4D" => "\xEC\xB5\xB2",
+ "\xAD\x4E" => "\xEC\xB5\xB3",
+ "\xAD\x4F" => "\xEC\xB5\xB4",
+ "\xAD\x50" => "\xEC\xB5\xB5",
+ "\xAD\x51" => "\xEC\xB5\xB6",
+ "\xAD\x52" => "\xEC\xB5\xB7",
+ "\xAD\x53" => "\xEC\xB5\xB9",
+ "\xAD\x54" => "\xEC\xB5\xBA",
+ "\xAD\x55" => "\xEC\xB5\xBB",
+ "\xAD\x56" => "\xEC\xB5\xBC",
+ "\xAD\x57" => "\xEC\xB5\xBD",
+ "\xAD\x58" => "\xEC\xB5\xBE",
+ "\xAD\x59" => "\xEC\xB5\xBF",
+ "\xAD\x5A" => "\xEC\xB6\x80",
+ "\xAD\x61" => "\xEC\xB6\x81",
+ "\xAD\x62" => "\xEC\xB6\x82",
+ "\xAD\x63" => "\xEC\xB6\x83",
+ "\xAD\x64" => "\xEC\xB6\x84",
+ "\xAD\x65" => "\xEC\xB6\x85",
+ "\xAD\x66" => "\xEC\xB6\x86",
+ "\xAD\x67" => "\xEC\xB6\x87",
+ "\xAD\x68" => "\xEC\xB6\x89",
+ "\xAD\x69" => "\xEC\xB6\x8A",
+ "\xAD\x6A" => "\xEC\xB6\x8B",
+ "\xAD\x6B" => "\xEC\xB6\x8C",
+ "\xAD\x6C" => "\xEC\xB6\x8D",
+ "\xAD\x6D" => "\xEC\xB6\x8E",
+ "\xAD\x6E" => "\xEC\xB6\x8F",
+ "\xAD\x6F" => "\xEC\xB6\x90",
+ "\xAD\x70" => "\xEC\xB6\x91",
+ "\xAD\x71" => "\xEC\xB6\x92",
+ "\xAD\x72" => "\xEC\xB6\x93",
+ "\xAD\x73" => "\xEC\xB6\x96",
+ "\xAD\x74" => "\xEC\xB6\x97",
+ "\xAD\x75" => "\xEC\xB6\x99",
+ "\xAD\x76" => "\xEC\xB6\x9A",
+ "\xAD\x77" => "\xEC\xB6\x9B",
+ "\xAD\x78" => "\xEC\xB6\x9D",
+ "\xAD\x79" => "\xEC\xB6\x9E",
+ "\xAD\x7A" => "\xEC\xB6\x9F",
+ "\xAD\x81" => "\xEC\xB6\xA0",
+ "\xAD\x82" => "\xEC\xB6\xA1",
+ "\xAD\x83" => "\xEC\xB6\xA2",
+ "\xAD\x84" => "\xEC\xB6\xA3",
+ "\xAD\x85" => "\xEC\xB6\xA6",
+ "\xAD\x86" => "\xEC\xB6\xA8",
+ "\xAD\x87" => "\xEC\xB6\xAA",
+ "\xAD\x88" => "\xEC\xB6\xAB",
+ "\xAD\x89" => "\xEC\xB6\xAC",
+ "\xAD\x8A" => "\xEC\xB6\xAD",
+ "\xAD\x8B" => "\xEC\xB6\xAE",
+ "\xAD\x8C" => "\xEC\xB6\xAF",
+ "\xAD\x8D" => "\xEC\xB6\xB1",
+ "\xAD\x8E" => "\xEC\xB6\xB2",
+ "\xAD\x8F" => "\xEC\xB6\xB3",
+ "\xAD\x90" => "\xEC\xB6\xB4",
+ "\xAD\x91" => "\xEC\xB6\xB5",
+ "\xAD\x92" => "\xEC\xB6\xB6",
+ "\xAD\x93" => "\xEC\xB6\xB7",
+ "\xAD\x94" => "\xEC\xB6\xB8",
+ "\xAD\x95" => "\xEC\xB6\xB9",
+ "\xAD\x96" => "\xEC\xB6\xBA",
+ "\xAD\x97" => "\xEC\xB6\xBB",
+ "\xAD\x98" => "\xEC\xB6\xBC",
+ "\xAD\x99" => "\xEC\xB6\xBD",
+ "\xAD\x9A" => "\xEC\xB6\xBE",
+ "\xAD\x9B" => "\xEC\xB6\xBF",
+ "\xAD\x9C" => "\xEC\xB7\x80",
+ "\xAD\x9D" => "\xEC\xB7\x81",
+ "\xAD\x9E" => "\xEC\xB7\x82",
+ "\xAD\x9F" => "\xEC\xB7\x83",
+ "\xAD\xA0" => "\xEC\xB7\x85",
+ "\xAE\x41" => "\xEC\xB7\x86",
+ "\xAE\x42" => "\xEC\xB7\x87",
+ "\xAE\x43" => "\xEC\xB7\x88",
+ "\xAE\x44" => "\xEC\xB7\x89",
+ "\xAE\x45" => "\xEC\xB7\x8A",
+ "\xAE\x46" => "\xEC\xB7\x8B",
+ "\xAE\x47" => "\xEC\xB7\x8D",
+ "\xAE\x48" => "\xEC\xB7\x8E",
+ "\xAE\x49" => "\xEC\xB7\x8F",
+ "\xAE\x4A" => "\xEC\xB7\x91",
+ "\xAE\x4B" => "\xEC\xB7\x92",
+ "\xAE\x4C" => "\xEC\xB7\x93",
+ "\xAE\x4D" => "\xEC\xB7\x94",
+ "\xAE\x4E" => "\xEC\xB7\x95",
+ "\xAE\x4F" => "\xEC\xB7\x96",
+ "\xAE\x50" => "\xEC\xB7\x97",
+ "\xAE\x51" => "\xEC\xB7\x98",
+ "\xAE\x52" => "\xEC\xB7\x99",
+ "\xAE\x53" => "\xEC\xB7\x9A",
+ "\xAE\x54" => "\xEC\xB7\x9B",
+ "\xAE\x55" => "\xEC\xB7\x9C",
+ "\xAE\x56" => "\xEC\xB7\x9D",
+ "\xAE\x57" => "\xEC\xB7\x9E",
+ "\xAE\x58" => "\xEC\xB7\x9F",
+ "\xAE\x59" => "\xEC\xB7\xA0",
+ "\xAE\x5A" => "\xEC\xB7\xA1",
+ "\xAE\x61" => "\xEC\xB7\xA2",
+ "\xAE\x62" => "\xEC\xB7\xA3",
+ "\xAE\x63" => "\xEC\xB7\xA4",
+ "\xAE\x64" => "\xEC\xB7\xA5",
+ "\xAE\x65" => "\xEC\xB7\xA6",
+ "\xAE\x66" => "\xEC\xB7\xA7",
+ "\xAE\x67" => "\xEC\xB7\xA9",
+ "\xAE\x68" => "\xEC\xB7\xAA",
+ "\xAE\x69" => "\xEC\xB7\xAB",
+ "\xAE\x6A" => "\xEC\xB7\xAD",
+ "\xAE\x6B" => "\xEC\xB7\xAE",
+ "\xAE\x6C" => "\xEC\xB7\xAF",
+ "\xAE\x6D" => "\xEC\xB7\xB1",
+ "\xAE\x6E" => "\xEC\xB7\xB2",
+ "\xAE\x6F" => "\xEC\xB7\xB3",
+ "\xAE\x70" => "\xEC\xB7\xB4",
+ "\xAE\x71" => "\xEC\xB7\xB5",
+ "\xAE\x72" => "\xEC\xB7\xB6",
+ "\xAE\x73" => "\xEC\xB7\xB7",
+ "\xAE\x74" => "\xEC\xB7\xBA",
+ "\xAE\x75" => "\xEC\xB7\xBC",
+ "\xAE\x76" => "\xEC\xB7\xBE",
+ "\xAE\x77" => "\xEC\xB7\xBF",
+ "\xAE\x78" => "\xEC\xB8\x80",
+ "\xAE\x79" => "\xEC\xB8\x81",
+ "\xAE\x7A" => "\xEC\xB8\x82",
+ "\xAE\x81" => "\xEC\xB8\x83",
+ "\xAE\x82" => "\xEC\xB8\x85",
+ "\xAE\x83" => "\xEC\xB8\x86",
+ "\xAE\x84" => "\xEC\xB8\x87",
+ "\xAE\x85" => "\xEC\xB8\x89",
+ "\xAE\x86" => "\xEC\xB8\x8A",
+ "\xAE\x87" => "\xEC\xB8\x8B",
+ "\xAE\x88" => "\xEC\xB8\x8D",
+ "\xAE\x89" => "\xEC\xB8\x8E",
+ "\xAE\x8A" => "\xEC\xB8\x8F",
+ "\xAE\x8B" => "\xEC\xB8\x90",
+ "\xAE\x8C" => "\xEC\xB8\x91",
+ "\xAE\x8D" => "\xEC\xB8\x92",
+ "\xAE\x8E" => "\xEC\xB8\x93",
+ "\xAE\x8F" => "\xEC\xB8\x95",
+ "\xAE\x90" => "\xEC\xB8\x96",
+ "\xAE\x91" => "\xEC\xB8\x97",
+ "\xAE\x92" => "\xEC\xB8\x98",
+ "\xAE\x93" => "\xEC\xB8\x9A",
+ "\xAE\x94" => "\xEC\xB8\x9B",
+ "\xAE\x95" => "\xEC\xB8\x9C",
+ "\xAE\x96" => "\xEC\xB8\x9D",
+ "\xAE\x97" => "\xEC\xB8\x9E",
+ "\xAE\x98" => "\xEC\xB8\x9F",
+ "\xAE\x99" => "\xEC\xB8\xA2",
+ "\xAE\x9A" => "\xEC\xB8\xA3",
+ "\xAE\x9B" => "\xEC\xB8\xA5",
+ "\xAE\x9C" => "\xEC\xB8\xA6",
+ "\xAE\x9D" => "\xEC\xB8\xA7",
+ "\xAE\x9E" => "\xEC\xB8\xA9",
+ "\xAE\x9F" => "\xEC\xB8\xAA",
+ "\xAE\xA0" => "\xEC\xB8\xAB",
+ "\xAF\x41" => "\xEC\xB8\xAC",
+ "\xAF\x42" => "\xEC\xB8\xAD",
+ "\xAF\x43" => "\xEC\xB8\xAE",
+ "\xAF\x44" => "\xEC\xB8\xAF",
+ "\xAF\x45" => "\xEC\xB8\xB2",
+ "\xAF\x46" => "\xEC\xB8\xB4",
+ "\xAF\x47" => "\xEC\xB8\xB6",
+ "\xAF\x48" => "\xEC\xB8\xB7",
+ "\xAF\x49" => "\xEC\xB8\xB8",
+ "\xAF\x4A" => "\xEC\xB8\xB9",
+ "\xAF\x4B" => "\xEC\xB8\xBA",
+ "\xAF\x4C" => "\xEC\xB8\xBB",
+ "\xAF\x4D" => "\xEC\xB8\xBC",
+ "\xAF\x4E" => "\xEC\xB8\xBD",
+ "\xAF\x4F" => "\xEC\xB8\xBE",
+ "\xAF\x50" => "\xEC\xB8\xBF",
+ "\xAF\x51" => "\xEC\xB9\x80",
+ "\xAF\x52" => "\xEC\xB9\x81",
+ "\xAF\x53" => "\xEC\xB9\x82",
+ "\xAF\x54" => "\xEC\xB9\x83",
+ "\xAF\x55" => "\xEC\xB9\x84",
+ "\xAF\x56" => "\xEC\xB9\x85",
+ "\xAF\x57" => "\xEC\xB9\x86",
+ "\xAF\x58" => "\xEC\xB9\x87",
+ "\xAF\x59" => "\xEC\xB9\x88",
+ "\xAF\x5A" => "\xEC\xB9\x89",
+ "\xAF\x61" => "\xEC\xB9\x8A",
+ "\xAF\x62" => "\xEC\xB9\x8B",
+ "\xAF\x63" => "\xEC\xB9\x8C",
+ "\xAF\x64" => "\xEC\xB9\x8D",
+ "\xAF\x65" => "\xEC\xB9\x8E",
+ "\xAF\x66" => "\xEC\xB9\x8F",
+ "\xAF\x67" => "\xEC\xB9\x90",
+ "\xAF\x68" => "\xEC\xB9\x91",
+ "\xAF\x69" => "\xEC\xB9\x92",
+ "\xAF\x6A" => "\xEC\xB9\x93",
+ "\xAF\x6B" => "\xEC\xB9\x94",
+ "\xAF\x6C" => "\xEC\xB9\x95",
+ "\xAF\x6D" => "\xEC\xB9\x96",
+ "\xAF\x6E" => "\xEC\xB9\x97",
+ "\xAF\x6F" => "\xEC\xB9\x9A",
+ "\xAF\x70" => "\xEC\xB9\x9B",
+ "\xAF\x71" => "\xEC\xB9\x9D",
+ "\xAF\x72" => "\xEC\xB9\x9E",
+ "\xAF\x73" => "\xEC\xB9\xA2",
+ "\xAF\x74" => "\xEC\xB9\xA3",
+ "\xAF\x75" => "\xEC\xB9\xA4",
+ "\xAF\x76" => "\xEC\xB9\xA5",
+ "\xAF\x77" => "\xEC\xB9\xA6",
+ "\xAF\x78" => "\xEC\xB9\xA7",
+ "\xAF\x79" => "\xEC\xB9\xAA",
+ "\xAF\x7A" => "\xEC\xB9\xAC",
+ "\xAF\x81" => "\xEC\xB9\xAE",
+ "\xAF\x82" => "\xEC\xB9\xAF",
+ "\xAF\x83" => "\xEC\xB9\xB0",
+ "\xAF\x84" => "\xEC\xB9\xB1",
+ "\xAF\x85" => "\xEC\xB9\xB2",
+ "\xAF\x86" => "\xEC\xB9\xB3",
+ "\xAF\x87" => "\xEC\xB9\xB6",
+ "\xAF\x88" => "\xEC\xB9\xB7",
+ "\xAF\x89" => "\xEC\xB9\xB9",
+ "\xAF\x8A" => "\xEC\xB9\xBA",
+ "\xAF\x8B" => "\xEC\xB9\xBB",
+ "\xAF\x8C" => "\xEC\xB9\xBD",
+ "\xAF\x8D" => "\xEC\xB9\xBE",
+ "\xAF\x8E" => "\xEC\xB9\xBF",
+ "\xAF\x8F" => "\xEC\xBA\x80",
+ "\xAF\x90" => "\xEC\xBA\x81",
+ "\xAF\x91" => "\xEC\xBA\x82",
+ "\xAF\x92" => "\xEC\xBA\x83",
+ "\xAF\x93" => "\xEC\xBA\x86",
+ "\xAF\x94" => "\xEC\xBA\x88",
+ "\xAF\x95" => "\xEC\xBA\x8A",
+ "\xAF\x96" => "\xEC\xBA\x8B",
+ "\xAF\x97" => "\xEC\xBA\x8C",
+ "\xAF\x98" => "\xEC\xBA\x8D",
+ "\xAF\x99" => "\xEC\xBA\x8E",
+ "\xAF\x9A" => "\xEC\xBA\x8F",
+ "\xAF\x9B" => "\xEC\xBA\x92",
+ "\xAF\x9C" => "\xEC\xBA\x93",
+ "\xAF\x9D" => "\xEC\xBA\x95",
+ "\xAF\x9E" => "\xEC\xBA\x96",
+ "\xAF\x9F" => "\xEC\xBA\x97",
+ "\xAF\xA0" => "\xEC\xBA\x99",
+ "\xB0\x41" => "\xEC\xBA\x9A",
+ "\xB0\x42" => "\xEC\xBA\x9B",
+ "\xB0\x43" => "\xEC\xBA\x9C",
+ "\xB0\x44" => "\xEC\xBA\x9D",
+ "\xB0\x45" => "\xEC\xBA\x9E",
+ "\xB0\x46" => "\xEC\xBA\x9F",
+ "\xB0\x47" => "\xEC\xBA\xA2",
+ "\xB0\x48" => "\xEC\xBA\xA6",
+ "\xB0\x49" => "\xEC\xBA\xA7",
+ "\xB0\x4A" => "\xEC\xBA\xA8",
+ "\xB0\x4B" => "\xEC\xBA\xA9",
+ "\xB0\x4C" => "\xEC\xBA\xAA",
+ "\xB0\x4D" => "\xEC\xBA\xAB",
+ "\xB0\x4E" => "\xEC\xBA\xAE",
+ "\xB0\x4F" => "\xEC\xBA\xAF",
+ "\xB0\x50" => "\xEC\xBA\xB0",
+ "\xB0\x51" => "\xEC\xBA\xB1",
+ "\xB0\x52" => "\xEC\xBA\xB2",
+ "\xB0\x53" => "\xEC\xBA\xB3",
+ "\xB0\x54" => "\xEC\xBA\xB4",
+ "\xB0\x55" => "\xEC\xBA\xB5",
+ "\xB0\x56" => "\xEC\xBA\xB6",
+ "\xB0\x57" => "\xEC\xBA\xB7",
+ "\xB0\x58" => "\xEC\xBA\xB8",
+ "\xB0\x59" => "\xEC\xBA\xB9",
+ "\xB0\x5A" => "\xEC\xBA\xBA",
+ "\xB0\x61" => "\xEC\xBA\xBB",
+ "\xB0\x62" => "\xEC\xBA\xBC",
+ "\xB0\x63" => "\xEC\xBA\xBD",
+ "\xB0\x64" => "\xEC\xBA\xBE",
+ "\xB0\x65" => "\xEC\xBA\xBF",
+ "\xB0\x66" => "\xEC\xBB\x80",
+ "\xB0\x67" => "\xEC\xBB\x82",
+ "\xB0\x68" => "\xEC\xBB\x83",
+ "\xB0\x69" => "\xEC\xBB\x84",
+ "\xB0\x6A" => "\xEC\xBB\x85",
+ "\xB0\x6B" => "\xEC\xBB\x86",
+ "\xB0\x6C" => "\xEC\xBB\x87",
+ "\xB0\x6D" => "\xEC\xBB\x88",
+ "\xB0\x6E" => "\xEC\xBB\x89",
+ "\xB0\x6F" => "\xEC\xBB\x8A",
+ "\xB0\x70" => "\xEC\xBB\x8B",
+ "\xB0\x71" => "\xEC\xBB\x8C",
+ "\xB0\x72" => "\xEC\xBB\x8D",
+ "\xB0\x73" => "\xEC\xBB\x8E",
+ "\xB0\x74" => "\xEC\xBB\x8F",
+ "\xB0\x75" => "\xEC\xBB\x90",
+ "\xB0\x76" => "\xEC\xBB\x91",
+ "\xB0\x77" => "\xEC\xBB\x92",
+ "\xB0\x78" => "\xEC\xBB\x93",
+ "\xB0\x79" => "\xEC\xBB\x94",
+ "\xB0\x7A" => "\xEC\xBB\x95",
+ "\xB0\x81" => "\xEC\xBB\x96",
+ "\xB0\x82" => "\xEC\xBB\x97",
+ "\xB0\x83" => "\xEC\xBB\x98",
+ "\xB0\x84" => "\xEC\xBB\x99",
+ "\xB0\x85" => "\xEC\xBB\x9A",
+ "\xB0\x86" => "\xEC\xBB\x9B",
+ "\xB0\x87" => "\xEC\xBB\x9C",
+ "\xB0\x88" => "\xEC\xBB\x9D",
+ "\xB0\x89" => "\xEC\xBB\x9E",
+ "\xB0\x8A" => "\xEC\xBB\x9F",
+ "\xB0\x8B" => "\xEC\xBB\xA0",
+ "\xB0\x8C" => "\xEC\xBB\xA1",
+ "\xB0\x8D" => "\xEC\xBB\xA2",
+ "\xB0\x8E" => "\xEC\xBB\xA3",
+ "\xB0\x8F" => "\xEC\xBB\xA6",
+ "\xB0\x90" => "\xEC\xBB\xA7",
+ "\xB0\x91" => "\xEC\xBB\xA9",
+ "\xB0\x92" => "\xEC\xBB\xAA",
+ "\xB0\x93" => "\xEC\xBB\xAD",
+ "\xB0\x94" => "\xEC\xBB\xAE",
+ "\xB0\x95" => "\xEC\xBB\xAF",
+ "\xB0\x96" => "\xEC\xBB\xB0",
+ "\xB0\x97" => "\xEC\xBB\xB1",
+ "\xB0\x98" => "\xEC\xBB\xB2",
+ "\xB0\x99" => "\xEC\xBB\xB3",
+ "\xB0\x9A" => "\xEC\xBB\xB6",
+ "\xB0\x9B" => "\xEC\xBB\xBA",
+ "\xB0\x9C" => "\xEC\xBB\xBB",
+ "\xB0\x9D" => "\xEC\xBB\xBC",
+ "\xB0\x9E" => "\xEC\xBB\xBD",
+ "\xB0\x9F" => "\xEC\xBB\xBE",
+ "\xB0\xA0" => "\xEC\xBB\xBF",
+ "\xB0\xA1" => "\xEA\xB0\x80",
+ "\xB0\xA2" => "\xEA\xB0\x81",
+ "\xB0\xA3" => "\xEA\xB0\x84",
+ "\xB0\xA4" => "\xEA\xB0\x87",
+ "\xB0\xA5" => "\xEA\xB0\x88",
+ "\xB0\xA6" => "\xEA\xB0\x89",
+ "\xB0\xA7" => "\xEA\xB0\x8A",
+ "\xB0\xA8" => "\xEA\xB0\x90",
+ "\xB0\xA9" => "\xEA\xB0\x91",
+ "\xB0\xAA" => "\xEA\xB0\x92",
+ "\xB0\xAB" => "\xEA\xB0\x93",
+ "\xB0\xAC" => "\xEA\xB0\x94",
+ "\xB0\xAD" => "\xEA\xB0\x95",
+ "\xB0\xAE" => "\xEA\xB0\x96",
+ "\xB0\xAF" => "\xEA\xB0\x97",
+ "\xB0\xB0" => "\xEA\xB0\x99",
+ "\xB0\xB1" => "\xEA\xB0\x9A",
+ "\xB0\xB2" => "\xEA\xB0\x9B",
+ "\xB0\xB3" => "\xEA\xB0\x9C",
+ "\xB0\xB4" => "\xEA\xB0\x9D",
+ "\xB0\xB5" => "\xEA\xB0\xA0",
+ "\xB0\xB6" => "\xEA\xB0\xA4",
+ "\xB0\xB7" => "\xEA\xB0\xAC",
+ "\xB0\xB8" => "\xEA\xB0\xAD",
+ "\xB0\xB9" => "\xEA\xB0\xAF",
+ "\xB0\xBA" => "\xEA\xB0\xB0",
+ "\xB0\xBB" => "\xEA\xB0\xB1",
+ "\xB0\xBC" => "\xEA\xB0\xB8",
+ "\xB0\xBD" => "\xEA\xB0\xB9",
+ "\xB0\xBE" => "\xEA\xB0\xBC",
+ "\xB0\xBF" => "\xEA\xB1\x80",
+ "\xB0\xC0" => "\xEA\xB1\x8B",
+ "\xB0\xC1" => "\xEA\xB1\x8D",
+ "\xB0\xC2" => "\xEA\xB1\x94",
+ "\xB0\xC3" => "\xEA\xB1\x98",
+ "\xB0\xC4" => "\xEA\xB1\x9C",
+ "\xB0\xC5" => "\xEA\xB1\xB0",
+ "\xB0\xC6" => "\xEA\xB1\xB1",
+ "\xB0\xC7" => "\xEA\xB1\xB4",
+ "\xB0\xC8" => "\xEA\xB1\xB7",
+ "\xB0\xC9" => "\xEA\xB1\xB8",
+ "\xB0\xCA" => "\xEA\xB1\xBA",
+ "\xB0\xCB" => "\xEA\xB2\x80",
+ "\xB0\xCC" => "\xEA\xB2\x81",
+ "\xB0\xCD" => "\xEA\xB2\x83",
+ "\xB0\xCE" => "\xEA\xB2\x84",
+ "\xB0\xCF" => "\xEA\xB2\x85",
+ "\xB0\xD0" => "\xEA\xB2\x86",
+ "\xB0\xD1" => "\xEA\xB2\x89",
+ "\xB0\xD2" => "\xEA\xB2\x8A",
+ "\xB0\xD3" => "\xEA\xB2\x8B",
+ "\xB0\xD4" => "\xEA\xB2\x8C",
+ "\xB0\xD5" => "\xEA\xB2\x90",
+ "\xB0\xD6" => "\xEA\xB2\x94",
+ "\xB0\xD7" => "\xEA\xB2\x9C",
+ "\xB0\xD8" => "\xEA\xB2\x9D",
+ "\xB0\xD9" => "\xEA\xB2\x9F",
+ "\xB0\xDA" => "\xEA\xB2\xA0",
+ "\xB0\xDB" => "\xEA\xB2\xA1",
+ "\xB0\xDC" => "\xEA\xB2\xA8",
+ "\xB0\xDD" => "\xEA\xB2\xA9",
+ "\xB0\xDE" => "\xEA\xB2\xAA",
+ "\xB0\xDF" => "\xEA\xB2\xAC",
+ "\xB0\xE0" => "\xEA\xB2\xAF",
+ "\xB0\xE1" => "\xEA\xB2\xB0",
+ "\xB0\xE2" => "\xEA\xB2\xB8",
+ "\xB0\xE3" => "\xEA\xB2\xB9",
+ "\xB0\xE4" => "\xEA\xB2\xBB",
+ "\xB0\xE5" => "\xEA\xB2\xBC",
+ "\xB0\xE6" => "\xEA\xB2\xBD",
+ "\xB0\xE7" => "\xEA\xB3\x81",
+ "\xB0\xE8" => "\xEA\xB3\x84",
+ "\xB0\xE9" => "\xEA\xB3\x88",
+ "\xB0\xEA" => "\xEA\xB3\x8C",
+ "\xB0\xEB" => "\xEA\xB3\x95",
+ "\xB0\xEC" => "\xEA\xB3\x97",
+ "\xB0\xED" => "\xEA\xB3\xA0",
+ "\xB0\xEE" => "\xEA\xB3\xA1",
+ "\xB0\xEF" => "\xEA\xB3\xA4",
+ "\xB0\xF0" => "\xEA\xB3\xA7",
+ "\xB0\xF1" => "\xEA\xB3\xA8",
+ "\xB0\xF2" => "\xEA\xB3\xAA",
+ "\xB0\xF3" => "\xEA\xB3\xAC",
+ "\xB0\xF4" => "\xEA\xB3\xAF",
+ "\xB0\xF5" => "\xEA\xB3\xB0",
+ "\xB0\xF6" => "\xEA\xB3\xB1",
+ "\xB0\xF7" => "\xEA\xB3\xB3",
+ "\xB0\xF8" => "\xEA\xB3\xB5",
+ "\xB0\xF9" => "\xEA\xB3\xB6",
+ "\xB0\xFA" => "\xEA\xB3\xBC",
+ "\xB0\xFB" => "\xEA\xB3\xBD",
+ "\xB0\xFC" => "\xEA\xB4\x80",
+ "\xB0\xFD" => "\xEA\xB4\x84",
+ "\xB0\xFE" => "\xEA\xB4\x86",
+ "\xB1\x41" => "\xEC\xBC\x82",
+ "\xB1\x42" => "\xEC\xBC\x83",
+ "\xB1\x43" => "\xEC\xBC\x85",
+ "\xB1\x44" => "\xEC\xBC\x86",
+ "\xB1\x45" => "\xEC\xBC\x87",
+ "\xB1\x46" => "\xEC\xBC\x89",
+ "\xB1\x47" => "\xEC\xBC\x8A",
+ "\xB1\x48" => "\xEC\xBC\x8B",
+ "\xB1\x49" => "\xEC\xBC\x8C",
+ "\xB1\x4A" => "\xEC\xBC\x8D",
+ "\xB1\x4B" => "\xEC\xBC\x8E",
+ "\xB1\x4C" => "\xEC\xBC\x8F",
+ "\xB1\x4D" => "\xEC\xBC\x92",
+ "\xB1\x4E" => "\xEC\xBC\x94",
+ "\xB1\x4F" => "\xEC\xBC\x96",
+ "\xB1\x50" => "\xEC\xBC\x97",
+ "\xB1\x51" => "\xEC\xBC\x98",
+ "\xB1\x52" => "\xEC\xBC\x99",
+ "\xB1\x53" => "\xEC\xBC\x9A",
+ "\xB1\x54" => "\xEC\xBC\x9B",
+ "\xB1\x55" => "\xEC\xBC\x9D",
+ "\xB1\x56" => "\xEC\xBC\x9E",
+ "\xB1\x57" => "\xEC\xBC\x9F",
+ "\xB1\x58" => "\xEC\xBC\xA1",
+ "\xB1\x59" => "\xEC\xBC\xA2",
+ "\xB1\x5A" => "\xEC\xBC\xA3",
+ "\xB1\x61" => "\xEC\xBC\xA5",
+ "\xB1\x62" => "\xEC\xBC\xA6",
+ "\xB1\x63" => "\xEC\xBC\xA7",
+ "\xB1\x64" => "\xEC\xBC\xA8",
+ "\xB1\x65" => "\xEC\xBC\xA9",
+ "\xB1\x66" => "\xEC\xBC\xAA",
+ "\xB1\x67" => "\xEC\xBC\xAB",
+ "\xB1\x68" => "\xEC\xBC\xAE",
+ "\xB1\x69" => "\xEC\xBC\xB2",
+ "\xB1\x6A" => "\xEC\xBC\xB3",
+ "\xB1\x6B" => "\xEC\xBC\xB4",
+ "\xB1\x6C" => "\xEC\xBC\xB5",
+ "\xB1\x6D" => "\xEC\xBC\xB6",
+ "\xB1\x6E" => "\xEC\xBC\xB7",
+ "\xB1\x6F" => "\xEC\xBC\xB9",
+ "\xB1\x70" => "\xEC\xBC\xBA",
+ "\xB1\x71" => "\xEC\xBC\xBB",
+ "\xB1\x72" => "\xEC\xBC\xBC",
+ "\xB1\x73" => "\xEC\xBC\xBD",
+ "\xB1\x74" => "\xEC\xBC\xBE",
+ "\xB1\x75" => "\xEC\xBC\xBF",
+ "\xB1\x76" => "\xEC\xBD\x80",
+ "\xB1\x77" => "\xEC\xBD\x81",
+ "\xB1\x78" => "\xEC\xBD\x82",
+ "\xB1\x79" => "\xEC\xBD\x83",
+ "\xB1\x7A" => "\xEC\xBD\x84",
+ "\xB1\x81" => "\xEC\xBD\x85",
+ "\xB1\x82" => "\xEC\xBD\x86",
+ "\xB1\x83" => "\xEC\xBD\x87",
+ "\xB1\x84" => "\xEC\xBD\x88",
+ "\xB1\x85" => "\xEC\xBD\x89",
+ "\xB1\x86" => "\xEC\xBD\x8A",
+ "\xB1\x87" => "\xEC\xBD\x8B",
+ "\xB1\x88" => "\xEC\xBD\x8C",
+ "\xB1\x89" => "\xEC\xBD\x8D",
+ "\xB1\x8A" => "\xEC\xBD\x8E",
+ "\xB1\x8B" => "\xEC\xBD\x8F",
+ "\xB1\x8C" => "\xEC\xBD\x90",
+ "\xB1\x8D" => "\xEC\xBD\x91",
+ "\xB1\x8E" => "\xEC\xBD\x92",
+ "\xB1\x8F" => "\xEC\xBD\x93",
+ "\xB1\x90" => "\xEC\xBD\x96",
+ "\xB1\x91" => "\xEC\xBD\x97",
+ "\xB1\x92" => "\xEC\xBD\x99",
+ "\xB1\x93" => "\xEC\xBD\x9A",
+ "\xB1\x94" => "\xEC\xBD\x9B",
+ "\xB1\x95" => "\xEC\xBD\x9D",
+ "\xB1\x96" => "\xEC\xBD\x9E",
+ "\xB1\x97" => "\xEC\xBD\x9F",
+ "\xB1\x98" => "\xEC\xBD\xA0",
+ "\xB1\x99" => "\xEC\xBD\xA1",
+ "\xB1\x9A" => "\xEC\xBD\xA2",
+ "\xB1\x9B" => "\xEC\xBD\xA3",
+ "\xB1\x9C" => "\xEC\xBD\xA6",
+ "\xB1\x9D" => "\xEC\xBD\xA8",
+ "\xB1\x9E" => "\xEC\xBD\xAA",
+ "\xB1\x9F" => "\xEC\xBD\xAB",
+ "\xB1\xA0" => "\xEC\xBD\xAC",
+ "\xB1\xA1" => "\xEA\xB4\x8C",
+ "\xB1\xA2" => "\xEA\xB4\x8D",
+ "\xB1\xA3" => "\xEA\xB4\x8F",
+ "\xB1\xA4" => "\xEA\xB4\x91",
+ "\xB1\xA5" => "\xEA\xB4\x98",
+ "\xB1\xA6" => "\xEA\xB4\x9C",
+ "\xB1\xA7" => "\xEA\xB4\xA0",
+ "\xB1\xA8" => "\xEA\xB4\xA9",
+ "\xB1\xA9" => "\xEA\xB4\xAC",
+ "\xB1\xAA" => "\xEA\xB4\xAD",
+ "\xB1\xAB" => "\xEA\xB4\xB4",
+ "\xB1\xAC" => "\xEA\xB4\xB5",
+ "\xB1\xAD" => "\xEA\xB4\xB8",
+ "\xB1\xAE" => "\xEA\xB4\xBC",
+ "\xB1\xAF" => "\xEA\xB5\x84",
+ "\xB1\xB0" => "\xEA\xB5\x85",
+ "\xB1\xB1" => "\xEA\xB5\x87",
+ "\xB1\xB2" => "\xEA\xB5\x89",
+ "\xB1\xB3" => "\xEA\xB5\x90",
+ "\xB1\xB4" => "\xEA\xB5\x94",
+ "\xB1\xB5" => "\xEA\xB5\x98",
+ "\xB1\xB6" => "\xEA\xB5\xA1",
+ "\xB1\xB7" => "\xEA\xB5\xA3",
+ "\xB1\xB8" => "\xEA\xB5\xAC",
+ "\xB1\xB9" => "\xEA\xB5\xAD",
+ "\xB1\xBA" => "\xEA\xB5\xB0",
+ "\xB1\xBB" => "\xEA\xB5\xB3",
+ "\xB1\xBC" => "\xEA\xB5\xB4",
+ "\xB1\xBD" => "\xEA\xB5\xB5",
+ "\xB1\xBE" => "\xEA\xB5\xB6",
+ "\xB1\xBF" => "\xEA\xB5\xBB",
+ "\xB1\xC0" => "\xEA\xB5\xBC",
+ "\xB1\xC1" => "\xEA\xB5\xBD",
+ "\xB1\xC2" => "\xEA\xB5\xBF",
+ "\xB1\xC3" => "\xEA\xB6\x81",
+ "\xB1\xC4" => "\xEA\xB6\x82",
+ "\xB1\xC5" => "\xEA\xB6\x88",
+ "\xB1\xC6" => "\xEA\xB6\x89",
+ "\xB1\xC7" => "\xEA\xB6\x8C",
+ "\xB1\xC8" => "\xEA\xB6\x90",
+ "\xB1\xC9" => "\xEA\xB6\x9C",
+ "\xB1\xCA" => "\xEA\xB6\x9D",
+ "\xB1\xCB" => "\xEA\xB6\xA4",
+ "\xB1\xCC" => "\xEA\xB6\xB7",
+ "\xB1\xCD" => "\xEA\xB7\x80",
+ "\xB1\xCE" => "\xEA\xB7\x81",
+ "\xB1\xCF" => "\xEA\xB7\x84",
+ "\xB1\xD0" => "\xEA\xB7\x88",
+ "\xB1\xD1" => "\xEA\xB7\x90",
+ "\xB1\xD2" => "\xEA\xB7\x91",
+ "\xB1\xD3" => "\xEA\xB7\x93",
+ "\xB1\xD4" => "\xEA\xB7\x9C",
+ "\xB1\xD5" => "\xEA\xB7\xA0",
+ "\xB1\xD6" => "\xEA\xB7\xA4",
+ "\xB1\xD7" => "\xEA\xB7\xB8",
+ "\xB1\xD8" => "\xEA\xB7\xB9",
+ "\xB1\xD9" => "\xEA\xB7\xBC",
+ "\xB1\xDA" => "\xEA\xB7\xBF",
+ "\xB1\xDB" => "\xEA\xB8\x80",
+ "\xB1\xDC" => "\xEA\xB8\x81",
+ "\xB1\xDD" => "\xEA\xB8\x88",
+ "\xB1\xDE" => "\xEA\xB8\x89",
+ "\xB1\xDF" => "\xEA\xB8\x8B",
+ "\xB1\xE0" => "\xEA\xB8\x8D",
+ "\xB1\xE1" => "\xEA\xB8\x94",
+ "\xB1\xE2" => "\xEA\xB8\xB0",
+ "\xB1\xE3" => "\xEA\xB8\xB1",
+ "\xB1\xE4" => "\xEA\xB8\xB4",
+ "\xB1\xE5" => "\xEA\xB8\xB7",
+ "\xB1\xE6" => "\xEA\xB8\xB8",
+ "\xB1\xE7" => "\xEA\xB8\xBA",
+ "\xB1\xE8" => "\xEA\xB9\x80",
+ "\xB1\xE9" => "\xEA\xB9\x81",
+ "\xB1\xEA" => "\xEA\xB9\x83",
+ "\xB1\xEB" => "\xEA\xB9\x85",
+ "\xB1\xEC" => "\xEA\xB9\x86",
+ "\xB1\xED" => "\xEA\xB9\x8A",
+ "\xB1\xEE" => "\xEA\xB9\x8C",
+ "\xB1\xEF" => "\xEA\xB9\x8D",
+ "\xB1\xF0" => "\xEA\xB9\x8E",
+ "\xB1\xF1" => "\xEA\xB9\x90",
+ "\xB1\xF2" => "\xEA\xB9\x94",
+ "\xB1\xF3" => "\xEA\xB9\x96",
+ "\xB1\xF4" => "\xEA\xB9\x9C",
+ "\xB1\xF5" => "\xEA\xB9\x9D",
+ "\xB1\xF6" => "\xEA\xB9\x9F",
+ "\xB1\xF7" => "\xEA\xB9\xA0",
+ "\xB1\xF8" => "\xEA\xB9\xA1",
+ "\xB1\xF9" => "\xEA\xB9\xA5",
+ "\xB1\xFA" => "\xEA\xB9\xA8",
+ "\xB1\xFB" => "\xEA\xB9\xA9",
+ "\xB1\xFC" => "\xEA\xB9\xAC",
+ "\xB1\xFD" => "\xEA\xB9\xB0",
+ "\xB1\xFE" => "\xEA\xB9\xB8",
+ "\xB2\x41" => "\xEC\xBD\xAD",
+ "\xB2\x42" => "\xEC\xBD\xAE",
+ "\xB2\x43" => "\xEC\xBD\xAF",
+ "\xB2\x44" => "\xEC\xBD\xB2",
+ "\xB2\x45" => "\xEC\xBD\xB3",
+ "\xB2\x46" => "\xEC\xBD\xB5",
+ "\xB2\x47" => "\xEC\xBD\xB6",
+ "\xB2\x48" => "\xEC\xBD\xB7",
+ "\xB2\x49" => "\xEC\xBD\xB9",
+ "\xB2\x4A" => "\xEC\xBD\xBA",
+ "\xB2\x4B" => "\xEC\xBD\xBB",
+ "\xB2\x4C" => "\xEC\xBD\xBC",
+ "\xB2\x4D" => "\xEC\xBD\xBD",
+ "\xB2\x4E" => "\xEC\xBD\xBE",
+ "\xB2\x4F" => "\xEC\xBD\xBF",
+ "\xB2\x50" => "\xEC\xBE\x81",
+ "\xB2\x51" => "\xEC\xBE\x82",
+ "\xB2\x52" => "\xEC\xBE\x83",
+ "\xB2\x53" => "\xEC\xBE\x84",
+ "\xB2\x54" => "\xEC\xBE\x86",
+ "\xB2\x55" => "\xEC\xBE\x87",
+ "\xB2\x56" => "\xEC\xBE\x88",
+ "\xB2\x57" => "\xEC\xBE\x89",
+ "\xB2\x58" => "\xEC\xBE\x8A",
+ "\xB2\x59" => "\xEC\xBE\x8B",
+ "\xB2\x5A" => "\xEC\xBE\x8D",
+ "\xB2\x61" => "\xEC\xBE\x8E",
+ "\xB2\x62" => "\xEC\xBE\x8F",
+ "\xB2\x63" => "\xEC\xBE\x90",
+ "\xB2\x64" => "\xEC\xBE\x91",
+ "\xB2\x65" => "\xEC\xBE\x92",
+ "\xB2\x66" => "\xEC\xBE\x93",
+ "\xB2\x67" => "\xEC\xBE\x94",
+ "\xB2\x68" => "\xEC\xBE\x95",
+ "\xB2\x69" => "\xEC\xBE\x96",
+ "\xB2\x6A" => "\xEC\xBE\x97",
+ "\xB2\x6B" => "\xEC\xBE\x98",
+ "\xB2\x6C" => "\xEC\xBE\x99",
+ "\xB2\x6D" => "\xEC\xBE\x9A",
+ "\xB2\x6E" => "\xEC\xBE\x9B",
+ "\xB2\x6F" => "\xEC\xBE\x9C",
+ "\xB2\x70" => "\xEC\xBE\x9D",
+ "\xB2\x71" => "\xEC\xBE\x9E",
+ "\xB2\x72" => "\xEC\xBE\x9F",
+ "\xB2\x73" => "\xEC\xBE\xA0",
+ "\xB2\x74" => "\xEC\xBE\xA2",
+ "\xB2\x75" => "\xEC\xBE\xA3",
+ "\xB2\x76" => "\xEC\xBE\xA4",
+ "\xB2\x77" => "\xEC\xBE\xA5",
+ "\xB2\x78" => "\xEC\xBE\xA6",
+ "\xB2\x79" => "\xEC\xBE\xA7",
+ "\xB2\x7A" => "\xEC\xBE\xA9",
+ "\xB2\x81" => "\xEC\xBE\xAA",
+ "\xB2\x82" => "\xEC\xBE\xAB",
+ "\xB2\x83" => "\xEC\xBE\xAC",
+ "\xB2\x84" => "\xEC\xBE\xAD",
+ "\xB2\x85" => "\xEC\xBE\xAE",
+ "\xB2\x86" => "\xEC\xBE\xAF",
+ "\xB2\x87" => "\xEC\xBE\xB1",
+ "\xB2\x88" => "\xEC\xBE\xB2",
+ "\xB2\x89" => "\xEC\xBE\xB3",
+ "\xB2\x8A" => "\xEC\xBE\xB4",
+ "\xB2\x8B" => "\xEC\xBE\xB5",
+ "\xB2\x8C" => "\xEC\xBE\xB6",
+ "\xB2\x8D" => "\xEC\xBE\xB7",
+ "\xB2\x8E" => "\xEC\xBE\xB8",
+ "\xB2\x8F" => "\xEC\xBE\xB9",
+ "\xB2\x90" => "\xEC\xBE\xBA",
+ "\xB2\x91" => "\xEC\xBE\xBB",
+ "\xB2\x92" => "\xEC\xBE\xBC",
+ "\xB2\x93" => "\xEC\xBE\xBD",
+ "\xB2\x94" => "\xEC\xBE\xBE",
+ "\xB2\x95" => "\xEC\xBE\xBF",
+ "\xB2\x96" => "\xEC\xBF\x80",
+ "\xB2\x97" => "\xEC\xBF\x81",
+ "\xB2\x98" => "\xEC\xBF\x82",
+ "\xB2\x99" => "\xEC\xBF\x83",
+ "\xB2\x9A" => "\xEC\xBF\x85",
+ "\xB2\x9B" => "\xEC\xBF\x86",
+ "\xB2\x9C" => "\xEC\xBF\x87",
+ "\xB2\x9D" => "\xEC\xBF\x88",
+ "\xB2\x9E" => "\xEC\xBF\x89",
+ "\xB2\x9F" => "\xEC\xBF\x8A",
+ "\xB2\xA0" => "\xEC\xBF\x8B",
+ "\xB2\xA1" => "\xEA\xB9\xB9",
+ "\xB2\xA2" => "\xEA\xB9\xBB",
+ "\xB2\xA3" => "\xEA\xB9\xBC",
+ "\xB2\xA4" => "\xEA\xB9\xBD",
+ "\xB2\xA5" => "\xEA\xBA\x84",
+ "\xB2\xA6" => "\xEA\xBA\x85",
+ "\xB2\xA7" => "\xEA\xBA\x8C",
+ "\xB2\xA8" => "\xEA\xBA\xBC",
+ "\xB2\xA9" => "\xEA\xBA\xBD",
+ "\xB2\xAA" => "\xEA\xBA\xBE",
+ "\xB2\xAB" => "\xEA\xBB\x80",
+ "\xB2\xAC" => "\xEA\xBB\x84",
+ "\xB2\xAD" => "\xEA\xBB\x8C",
+ "\xB2\xAE" => "\xEA\xBB\x8D",
+ "\xB2\xAF" => "\xEA\xBB\x8F",
+ "\xB2\xB0" => "\xEA\xBB\x90",
+ "\xB2\xB1" => "\xEA\xBB\x91",
+ "\xB2\xB2" => "\xEA\xBB\x98",
+ "\xB2\xB3" => "\xEA\xBB\x99",
+ "\xB2\xB4" => "\xEA\xBB\x9C",
+ "\xB2\xB5" => "\xEA\xBB\xA8",
+ "\xB2\xB6" => "\xEA\xBB\xAB",
+ "\xB2\xB7" => "\xEA\xBB\xAD",
+ "\xB2\xB8" => "\xEA\xBB\xB4",
+ "\xB2\xB9" => "\xEA\xBB\xB8",
+ "\xB2\xBA" => "\xEA\xBB\xBC",
+ "\xB2\xBB" => "\xEA\xBC\x87",
+ "\xB2\xBC" => "\xEA\xBC\x88",
+ "\xB2\xBD" => "\xEA\xBC\x8D",
+ "\xB2\xBE" => "\xEA\xBC\x90",
+ "\xB2\xBF" => "\xEA\xBC\xAC",
+ "\xB2\xC0" => "\xEA\xBC\xAD",
+ "\xB2\xC1" => "\xEA\xBC\xB0",
+ "\xB2\xC2" => "\xEA\xBC\xB2",
+ "\xB2\xC3" => "\xEA\xBC\xB4",
+ "\xB2\xC4" => "\xEA\xBC\xBC",
+ "\xB2\xC5" => "\xEA\xBC\xBD",
+ "\xB2\xC6" => "\xEA\xBC\xBF",
+ "\xB2\xC7" => "\xEA\xBD\x81",
+ "\xB2\xC8" => "\xEA\xBD\x82",
+ "\xB2\xC9" => "\xEA\xBD\x83",
+ "\xB2\xCA" => "\xEA\xBD\x88",
+ "\xB2\xCB" => "\xEA\xBD\x89",
+ "\xB2\xCC" => "\xEA\xBD\x90",
+ "\xB2\xCD" => "\xEA\xBD\x9C",
+ "\xB2\xCE" => "\xEA\xBD\x9D",
+ "\xB2\xCF" => "\xEA\xBD\xA4",
+ "\xB2\xD0" => "\xEA\xBD\xA5",
+ "\xB2\xD1" => "\xEA\xBD\xB9",
+ "\xB2\xD2" => "\xEA\xBE\x80",
+ "\xB2\xD3" => "\xEA\xBE\x84",
+ "\xB2\xD4" => "\xEA\xBE\x88",
+ "\xB2\xD5" => "\xEA\xBE\x90",
+ "\xB2\xD6" => "\xEA\xBE\x91",
+ "\xB2\xD7" => "\xEA\xBE\x95",
+ "\xB2\xD8" => "\xEA\xBE\x9C",
+ "\xB2\xD9" => "\xEA\xBE\xB8",
+ "\xB2\xDA" => "\xEA\xBE\xB9",
+ "\xB2\xDB" => "\xEA\xBE\xBC",
+ "\xB2\xDC" => "\xEA\xBF\x80",
+ "\xB2\xDD" => "\xEA\xBF\x87",
+ "\xB2\xDE" => "\xEA\xBF\x88",
+ "\xB2\xDF" => "\xEA\xBF\x89",
+ "\xB2\xE0" => "\xEA\xBF\x8B",
+ "\xB2\xE1" => "\xEA\xBF\x8D",
+ "\xB2\xE2" => "\xEA\xBF\x8E",
+ "\xB2\xE3" => "\xEA\xBF\x94",
+ "\xB2\xE4" => "\xEA\xBF\x9C",
+ "\xB2\xE5" => "\xEA\xBF\xA8",
+ "\xB2\xE6" => "\xEA\xBF\xA9",
+ "\xB2\xE7" => "\xEA\xBF\xB0",
+ "\xB2\xE8" => "\xEA\xBF\xB1",
+ "\xB2\xE9" => "\xEA\xBF\xB4",
+ "\xB2\xEA" => "\xEA\xBF\xB8",
+ "\xB2\xEB" => "\xEB\x80\x80",
+ "\xB2\xEC" => "\xEB\x80\x81",
+ "\xB2\xED" => "\xEB\x80\x84",
+ "\xB2\xEE" => "\xEB\x80\x8C",
+ "\xB2\xEF" => "\xEB\x80\x90",
+ "\xB2\xF0" => "\xEB\x80\x94",
+ "\xB2\xF1" => "\xEB\x80\x9C",
+ "\xB2\xF2" => "\xEB\x80\x9D",
+ "\xB2\xF3" => "\xEB\x80\xA8",
+ "\xB2\xF4" => "\xEB\x81\x84",
+ "\xB2\xF5" => "\xEB\x81\x85",
+ "\xB2\xF6" => "\xEB\x81\x88",
+ "\xB2\xF7" => "\xEB\x81\x8A",
+ "\xB2\xF8" => "\xEB\x81\x8C",
+ "\xB2\xF9" => "\xEB\x81\x8E",
+ "\xB2\xFA" => "\xEB\x81\x93",
+ "\xB2\xFB" => "\xEB\x81\x94",
+ "\xB2\xFC" => "\xEB\x81\x95",
+ "\xB2\xFD" => "\xEB\x81\x97",
+ "\xB2\xFE" => "\xEB\x81\x99",
+ "\xB3\x41" => "\xEC\xBF\x8C",
+ "\xB3\x42" => "\xEC\xBF\x8D",
+ "\xB3\x43" => "\xEC\xBF\x8E",
+ "\xB3\x44" => "\xEC\xBF\x8F",
+ "\xB3\x45" => "\xEC\xBF\x90",
+ "\xB3\x46" => "\xEC\xBF\x91",
+ "\xB3\x47" => "\xEC\xBF\x92",
+ "\xB3\x48" => "\xEC\xBF\x93",
+ "\xB3\x49" => "\xEC\xBF\x94",
+ "\xB3\x4A" => "\xEC\xBF\x95",
+ "\xB3\x4B" => "\xEC\xBF\x96",
+ "\xB3\x4C" => "\xEC\xBF\x97",
+ "\xB3\x4D" => "\xEC\xBF\x98",
+ "\xB3\x4E" => "\xEC\xBF\x99",
+ "\xB3\x4F" => "\xEC\xBF\x9A",
+ "\xB3\x50" => "\xEC\xBF\x9B",
+ "\xB3\x51" => "\xEC\xBF\x9C",
+ "\xB3\x52" => "\xEC\xBF\x9D",
+ "\xB3\x53" => "\xEC\xBF\x9E",
+ "\xB3\x54" => "\xEC\xBF\x9F",
+ "\xB3\x55" => "\xEC\xBF\xA2",
+ "\xB3\x56" => "\xEC\xBF\xA3",
+ "\xB3\x57" => "\xEC\xBF\xA5",
+ "\xB3\x58" => "\xEC\xBF\xA6",
+ "\xB3\x59" => "\xEC\xBF\xA7",
+ "\xB3\x5A" => "\xEC\xBF\xA9",
+ "\xB3\x61" => "\xEC\xBF\xAA",
+ "\xB3\x62" => "\xEC\xBF\xAB",
+ "\xB3\x63" => "\xEC\xBF\xAC",
+ "\xB3\x64" => "\xEC\xBF\xAD",
+ "\xB3\x65" => "\xEC\xBF\xAE",
+ "\xB3\x66" => "\xEC\xBF\xAF",
+ "\xB3\x67" => "\xEC\xBF\xB2",
+ "\xB3\x68" => "\xEC\xBF\xB4",
+ "\xB3\x69" => "\xEC\xBF\xB6",
+ "\xB3\x6A" => "\xEC\xBF\xB7",
+ "\xB3\x6B" => "\xEC\xBF\xB8",
+ "\xB3\x6C" => "\xEC\xBF\xB9",
+ "\xB3\x6D" => "\xEC\xBF\xBA",
+ "\xB3\x6E" => "\xEC\xBF\xBB",
+ "\xB3\x6F" => "\xEC\xBF\xBD",
+ "\xB3\x70" => "\xEC\xBF\xBE",
+ "\xB3\x71" => "\xEC\xBF\xBF",
+ "\xB3\x72" => "\xED\x80\x81",
+ "\xB3\x73" => "\xED\x80\x82",
+ "\xB3\x74" => "\xED\x80\x83",
+ "\xB3\x75" => "\xED\x80\x85",
+ "\xB3\x76" => "\xED\x80\x86",
+ "\xB3\x77" => "\xED\x80\x87",
+ "\xB3\x78" => "\xED\x80\x88",
+ "\xB3\x79" => "\xED\x80\x89",
+ "\xB3\x7A" => "\xED\x80\x8A",
+ "\xB3\x81" => "\xED\x80\x8B",
+ "\xB3\x82" => "\xED\x80\x8C",
+ "\xB3\x83" => "\xED\x80\x8D",
+ "\xB3\x84" => "\xED\x80\x8E",
+ "\xB3\x85" => "\xED\x80\x8F",
+ "\xB3\x86" => "\xED\x80\x90",
+ "\xB3\x87" => "\xED\x80\x92",
+ "\xB3\x88" => "\xED\x80\x93",
+ "\xB3\x89" => "\xED\x80\x94",
+ "\xB3\x8A" => "\xED\x80\x95",
+ "\xB3\x8B" => "\xED\x80\x96",
+ "\xB3\x8C" => "\xED\x80\x97",
+ "\xB3\x8D" => "\xED\x80\x99",
+ "\xB3\x8E" => "\xED\x80\x9A",
+ "\xB3\x8F" => "\xED\x80\x9B",
+ "\xB3\x90" => "\xED\x80\x9C",
+ "\xB3\x91" => "\xED\x80\x9D",
+ "\xB3\x92" => "\xED\x80\x9E",
+ "\xB3\x93" => "\xED\x80\x9F",
+ "\xB3\x94" => "\xED\x80\xA0",
+ "\xB3\x95" => "\xED\x80\xA1",
+ "\xB3\x96" => "\xED\x80\xA2",
+ "\xB3\x97" => "\xED\x80\xA3",
+ "\xB3\x98" => "\xED\x80\xA4",
+ "\xB3\x99" => "\xED\x80\xA5",
+ "\xB3\x9A" => "\xED\x80\xA6",
+ "\xB3\x9B" => "\xED\x80\xA7",
+ "\xB3\x9C" => "\xED\x80\xA8",
+ "\xB3\x9D" => "\xED\x80\xA9",
+ "\xB3\x9E" => "\xED\x80\xAA",
+ "\xB3\x9F" => "\xED\x80\xAB",
+ "\xB3\xA0" => "\xED\x80\xAC",
+ "\xB3\xA1" => "\xEB\x81\x9D",
+ "\xB3\xA2" => "\xEB\x81\xBC",
+ "\xB3\xA3" => "\xEB\x81\xBD",
+ "\xB3\xA4" => "\xEB\x82\x80",
+ "\xB3\xA5" => "\xEB\x82\x84",
+ "\xB3\xA6" => "\xEB\x82\x8C",
+ "\xB3\xA7" => "\xEB\x82\x8D",
+ "\xB3\xA8" => "\xEB\x82\x8F",
+ "\xB3\xA9" => "\xEB\x82\x91",
+ "\xB3\xAA" => "\xEB\x82\x98",
+ "\xB3\xAB" => "\xEB\x82\x99",
+ "\xB3\xAC" => "\xEB\x82\x9A",
+ "\xB3\xAD" => "\xEB\x82\x9C",
+ "\xB3\xAE" => "\xEB\x82\x9F",
+ "\xB3\xAF" => "\xEB\x82\xA0",
+ "\xB3\xB0" => "\xEB\x82\xA1",
+ "\xB3\xB1" => "\xEB\x82\xA2",
+ "\xB3\xB2" => "\xEB\x82\xA8",
+ "\xB3\xB3" => "\xEB\x82\xA9",
+ "\xB3\xB4" => "\xEB\x82\xAB",
+ "\xB3\xB5" => "\xEB\x82\xAC",
+ "\xB3\xB6" => "\xEB\x82\xAD",
+ "\xB3\xB7" => "\xEB\x82\xAE",
+ "\xB3\xB8" => "\xEB\x82\xAF",
+ "\xB3\xB9" => "\xEB\x82\xB1",
+ "\xB3\xBA" => "\xEB\x82\xB3",
+ "\xB3\xBB" => "\xEB\x82\xB4",
+ "\xB3\xBC" => "\xEB\x82\xB5",
+ "\xB3\xBD" => "\xEB\x82\xB8",
+ "\xB3\xBE" => "\xEB\x82\xBC",
+ "\xB3\xBF" => "\xEB\x83\x84",
+ "\xB3\xC0" => "\xEB\x83\x85",
+ "\xB3\xC1" => "\xEB\x83\x87",
+ "\xB3\xC2" => "\xEB\x83\x88",
+ "\xB3\xC3" => "\xEB\x83\x89",
+ "\xB3\xC4" => "\xEB\x83\x90",
+ "\xB3\xC5" => "\xEB\x83\x91",
+ "\xB3\xC6" => "\xEB\x83\x94",
+ "\xB3\xC7" => "\xEB\x83\x98",
+ "\xB3\xC8" => "\xEB\x83\xA0",
+ "\xB3\xC9" => "\xEB\x83\xA5",
+ "\xB3\xCA" => "\xEB\x84\x88",
+ "\xB3\xCB" => "\xEB\x84\x89",
+ "\xB3\xCC" => "\xEB\x84\x8B",
+ "\xB3\xCD" => "\xEB\x84\x8C",
+ "\xB3\xCE" => "\xEB\x84\x90",
+ "\xB3\xCF" => "\xEB\x84\x92",
+ "\xB3\xD0" => "\xEB\x84\x93",
+ "\xB3\xD1" => "\xEB\x84\x98",
+ "\xB3\xD2" => "\xEB\x84\x99",
+ "\xB3\xD3" => "\xEB\x84\x9B",
+ "\xB3\xD4" => "\xEB\x84\x9C",
+ "\xB3\xD5" => "\xEB\x84\x9D",
+ "\xB3\xD6" => "\xEB\x84\xA3",
+ "\xB3\xD7" => "\xEB\x84\xA4",
+ "\xB3\xD8" => "\xEB\x84\xA5",
+ "\xB3\xD9" => "\xEB\x84\xA8",
+ "\xB3\xDA" => "\xEB\x84\xAC",
+ "\xB3\xDB" => "\xEB\x84\xB4",
+ "\xB3\xDC" => "\xEB\x84\xB5",
+ "\xB3\xDD" => "\xEB\x84\xB7",
+ "\xB3\xDE" => "\xEB\x84\xB8",
+ "\xB3\xDF" => "\xEB\x84\xB9",
+ "\xB3\xE0" => "\xEB\x85\x80",
+ "\xB3\xE1" => "\xEB\x85\x81",
+ "\xB3\xE2" => "\xEB\x85\x84",
+ "\xB3\xE3" => "\xEB\x85\x88",
+ "\xB3\xE4" => "\xEB\x85\x90",
+ "\xB3\xE5" => "\xEB\x85\x91",
+ "\xB3\xE6" => "\xEB\x85\x94",
+ "\xB3\xE7" => "\xEB\x85\x95",
+ "\xB3\xE8" => "\xEB\x85\x98",
+ "\xB3\xE9" => "\xEB\x85\x9C",
+ "\xB3\xEA" => "\xEB\x85\xA0",
+ "\xB3\xEB" => "\xEB\x85\xB8",
+ "\xB3\xEC" => "\xEB\x85\xB9",
+ "\xB3\xED" => "\xEB\x85\xBC",
+ "\xB3\xEE" => "\xEB\x86\x80",
+ "\xB3\xEF" => "\xEB\x86\x82",
+ "\xB3\xF0" => "\xEB\x86\x88",
+ "\xB3\xF1" => "\xEB\x86\x89",
+ "\xB3\xF2" => "\xEB\x86\x8B",
+ "\xB3\xF3" => "\xEB\x86\x8D",
+ "\xB3\xF4" => "\xEB\x86\x92",
+ "\xB3\xF5" => "\xEB\x86\x93",
+ "\xB3\xF6" => "\xEB\x86\x94",
+ "\xB3\xF7" => "\xEB\x86\x98",
+ "\xB3\xF8" => "\xEB\x86\x9C",
+ "\xB3\xF9" => "\xEB\x86\xA8",
+ "\xB3\xFA" => "\xEB\x87\x8C",
+ "\xB3\xFB" => "\xEB\x87\x90",
+ "\xB3\xFC" => "\xEB\x87\x94",
+ "\xB3\xFD" => "\xEB\x87\x9C",
+ "\xB3\xFE" => "\xEB\x87\x9D",
+ "\xB4\x41" => "\xED\x80\xAE",
+ "\xB4\x42" => "\xED\x80\xAF",
+ "\xB4\x43" => "\xED\x80\xB0",
+ "\xB4\x44" => "\xED\x80\xB1",
+ "\xB4\x45" => "\xED\x80\xB2",
+ "\xB4\x46" => "\xED\x80\xB3",
+ "\xB4\x47" => "\xED\x80\xB6",
+ "\xB4\x48" => "\xED\x80\xB7",
+ "\xB4\x49" => "\xED\x80\xB9",
+ "\xB4\x4A" => "\xED\x80\xBA",
+ "\xB4\x4B" => "\xED\x80\xBB",
+ "\xB4\x4C" => "\xED\x80\xBD",
+ "\xB4\x4D" => "\xED\x80\xBE",
+ "\xB4\x4E" => "\xED\x80\xBF",
+ "\xB4\x4F" => "\xED\x81\x80",
+ "\xB4\x50" => "\xED\x81\x81",
+ "\xB4\x51" => "\xED\x81\x82",
+ "\xB4\x52" => "\xED\x81\x83",
+ "\xB4\x53" => "\xED\x81\x86",
+ "\xB4\x54" => "\xED\x81\x88",
+ "\xB4\x55" => "\xED\x81\x8A",
+ "\xB4\x56" => "\xED\x81\x8B",
+ "\xB4\x57" => "\xED\x81\x8C",
+ "\xB4\x58" => "\xED\x81\x8D",
+ "\xB4\x59" => "\xED\x81\x8E",
+ "\xB4\x5A" => "\xED\x81\x8F",
+ "\xB4\x61" => "\xED\x81\x91",
+ "\xB4\x62" => "\xED\x81\x92",
+ "\xB4\x63" => "\xED\x81\x93",
+ "\xB4\x64" => "\xED\x81\x95",
+ "\xB4\x65" => "\xED\x81\x96",
+ "\xB4\x66" => "\xED\x81\x97",
+ "\xB4\x67" => "\xED\x81\x99",
+ "\xB4\x68" => "\xED\x81\x9A",
+ "\xB4\x69" => "\xED\x81\x9B",
+ "\xB4\x6A" => "\xED\x81\x9C",
+ "\xB4\x6B" => "\xED\x81\x9D",
+ "\xB4\x6C" => "\xED\x81\x9E",
+ "\xB4\x6D" => "\xED\x81\x9F",
+ "\xB4\x6E" => "\xED\x81\xA1",
+ "\xB4\x6F" => "\xED\x81\xA2",
+ "\xB4\x70" => "\xED\x81\xA3",
+ "\xB4\x71" => "\xED\x81\xA4",
+ "\xB4\x72" => "\xED\x81\xA5",
+ "\xB4\x73" => "\xED\x81\xA6",
+ "\xB4\x74" => "\xED\x81\xA7",
+ "\xB4\x75" => "\xED\x81\xA8",
+ "\xB4\x76" => "\xED\x81\xA9",
+ "\xB4\x77" => "\xED\x81\xAA",
+ "\xB4\x78" => "\xED\x81\xAB",
+ "\xB4\x79" => "\xED\x81\xAE",
+ "\xB4\x7A" => "\xED\x81\xAF",
+ "\xB4\x81" => "\xED\x81\xB1",
+ "\xB4\x82" => "\xED\x81\xB2",
+ "\xB4\x83" => "\xED\x81\xB3",
+ "\xB4\x84" => "\xED\x81\xB5",
+ "\xB4\x85" => "\xED\x81\xB6",
+ "\xB4\x86" => "\xED\x81\xB7",
+ "\xB4\x87" => "\xED\x81\xB8",
+ "\xB4\x88" => "\xED\x81\xB9",
+ "\xB4\x89" => "\xED\x81\xBA",
+ "\xB4\x8A" => "\xED\x81\xBB",
+ "\xB4\x8B" => "\xED\x81\xBE",
+ "\xB4\x8C" => "\xED\x81\xBF",
+ "\xB4\x8D" => "\xED\x82\x80",
+ "\xB4\x8E" => "\xED\x82\x82",
+ "\xB4\x8F" => "\xED\x82\x83",
+ "\xB4\x90" => "\xED\x82\x84",
+ "\xB4\x91" => "\xED\x82\x85",
+ "\xB4\x92" => "\xED\x82\x86",
+ "\xB4\x93" => "\xED\x82\x87",
+ "\xB4\x94" => "\xED\x82\x88",
+ "\xB4\x95" => "\xED\x82\x89",
+ "\xB4\x96" => "\xED\x82\x8A",
+ "\xB4\x97" => "\xED\x82\x8B",
+ "\xB4\x98" => "\xED\x82\x8C",
+ "\xB4\x99" => "\xED\x82\x8D",
+ "\xB4\x9A" => "\xED\x82\x8E",
+ "\xB4\x9B" => "\xED\x82\x8F",
+ "\xB4\x9C" => "\xED\x82\x90",
+ "\xB4\x9D" => "\xED\x82\x91",
+ "\xB4\x9E" => "\xED\x82\x92",
+ "\xB4\x9F" => "\xED\x82\x93",
+ "\xB4\xA0" => "\xED\x82\x94",
+ "\xB4\xA1" => "\xEB\x87\x9F",
+ "\xB4\xA2" => "\xEB\x87\xA8",
+ "\xB4\xA3" => "\xEB\x87\xA9",
+ "\xB4\xA4" => "\xEB\x87\xAC",
+ "\xB4\xA5" => "\xEB\x87\xB0",
+ "\xB4\xA6" => "\xEB\x87\xB9",
+ "\xB4\xA7" => "\xEB\x87\xBB",
+ "\xB4\xA8" => "\xEB\x87\xBD",
+ "\xB4\xA9" => "\xEB\x88\x84",
+ "\xB4\xAA" => "\xEB\x88\x85",
+ "\xB4\xAB" => "\xEB\x88\x88",
+ "\xB4\xAC" => "\xEB\x88\x8B",
+ "\xB4\xAD" => "\xEB\x88\x8C",
+ "\xB4\xAE" => "\xEB\x88\x94",
+ "\xB4\xAF" => "\xEB\x88\x95",
+ "\xB4\xB0" => "\xEB\x88\x97",
+ "\xB4\xB1" => "\xEB\x88\x99",
+ "\xB4\xB2" => "\xEB\x88\xA0",
+ "\xB4\xB3" => "\xEB\x88\xB4",
+ "\xB4\xB4" => "\xEB\x88\xBC",
+ "\xB4\xB5" => "\xEB\x89\x98",
+ "\xB4\xB6" => "\xEB\x89\x9C",
+ "\xB4\xB7" => "\xEB\x89\xA0",
+ "\xB4\xB8" => "\xEB\x89\xA8",
+ "\xB4\xB9" => "\xEB\x89\xA9",
+ "\xB4\xBA" => "\xEB\x89\xB4",
+ "\xB4\xBB" => "\xEB\x89\xB5",
+ "\xB4\xBC" => "\xEB\x89\xBC",
+ "\xB4\xBD" => "\xEB\x8A\x84",
+ "\xB4\xBE" => "\xEB\x8A\x85",
+ "\xB4\xBF" => "\xEB\x8A\x89",
+ "\xB4\xC0" => "\xEB\x8A\x90",
+ "\xB4\xC1" => "\xEB\x8A\x91",
+ "\xB4\xC2" => "\xEB\x8A\x94",
+ "\xB4\xC3" => "\xEB\x8A\x98",
+ "\xB4\xC4" => "\xEB\x8A\x99",
+ "\xB4\xC5" => "\xEB\x8A\x9A",
+ "\xB4\xC6" => "\xEB\x8A\xA0",
+ "\xB4\xC7" => "\xEB\x8A\xA1",
+ "\xB4\xC8" => "\xEB\x8A\xA3",
+ "\xB4\xC9" => "\xEB\x8A\xA5",
+ "\xB4\xCA" => "\xEB\x8A\xA6",
+ "\xB4\xCB" => "\xEB\x8A\xAA",
+ "\xB4\xCC" => "\xEB\x8A\xAC",
+ "\xB4\xCD" => "\xEB\x8A\xB0",
+ "\xB4\xCE" => "\xEB\x8A\xB4",
+ "\xB4\xCF" => "\xEB\x8B\x88",
+ "\xB4\xD0" => "\xEB\x8B\x89",
+ "\xB4\xD1" => "\xEB\x8B\x8C",
+ "\xB4\xD2" => "\xEB\x8B\x90",
+ "\xB4\xD3" => "\xEB\x8B\x92",
+ "\xB4\xD4" => "\xEB\x8B\x98",
+ "\xB4\xD5" => "\xEB\x8B\x99",
+ "\xB4\xD6" => "\xEB\x8B\x9B",
+ "\xB4\xD7" => "\xEB\x8B\x9D",
+ "\xB4\xD8" => "\xEB\x8B\xA2",
+ "\xB4\xD9" => "\xEB\x8B\xA4",
+ "\xB4\xDA" => "\xEB\x8B\xA5",
+ "\xB4\xDB" => "\xEB\x8B\xA6",
+ "\xB4\xDC" => "\xEB\x8B\xA8",
+ "\xB4\xDD" => "\xEB\x8B\xAB",
+ "\xB4\xDE" => "\xEB\x8B\xAC",
+ "\xB4\xDF" => "\xEB\x8B\xAD",
+ "\xB4\xE0" => "\xEB\x8B\xAE",
+ "\xB4\xE1" => "\xEB\x8B\xAF",
+ "\xB4\xE2" => "\xEB\x8B\xB3",
+ "\xB4\xE3" => "\xEB\x8B\xB4",
+ "\xB4\xE4" => "\xEB\x8B\xB5",
+ "\xB4\xE5" => "\xEB\x8B\xB7",
+ "\xB4\xE6" => "\xEB\x8B\xB8",
+ "\xB4\xE7" => "\xEB\x8B\xB9",
+ "\xB4\xE8" => "\xEB\x8B\xBA",
+ "\xB4\xE9" => "\xEB\x8B\xBB",
+ "\xB4\xEA" => "\xEB\x8B\xBF",
+ "\xB4\xEB" => "\xEB\x8C\x80",
+ "\xB4\xEC" => "\xEB\x8C\x81",
+ "\xB4\xED" => "\xEB\x8C\x84",
+ "\xB4\xEE" => "\xEB\x8C\x88",
+ "\xB4\xEF" => "\xEB\x8C\x90",
+ "\xB4\xF0" => "\xEB\x8C\x91",
+ "\xB4\xF1" => "\xEB\x8C\x93",
+ "\xB4\xF2" => "\xEB\x8C\x94",
+ "\xB4\xF3" => "\xEB\x8C\x95",
+ "\xB4\xF4" => "\xEB\x8C\x9C",
+ "\xB4\xF5" => "\xEB\x8D\x94",
+ "\xB4\xF6" => "\xEB\x8D\x95",
+ "\xB4\xF7" => "\xEB\x8D\x96",
+ "\xB4\xF8" => "\xEB\x8D\x98",
+ "\xB4\xF9" => "\xEB\x8D\x9B",
+ "\xB4\xFA" => "\xEB\x8D\x9C",
+ "\xB4\xFB" => "\xEB\x8D\x9E",
+ "\xB4\xFC" => "\xEB\x8D\x9F",
+ "\xB4\xFD" => "\xEB\x8D\xA4",
+ "\xB4\xFE" => "\xEB\x8D\xA5",
+ "\xB5\x41" => "\xED\x82\x95",
+ "\xB5\x42" => "\xED\x82\x96",
+ "\xB5\x43" => "\xED\x82\x97",
+ "\xB5\x44" => "\xED\x82\x98",
+ "\xB5\x45" => "\xED\x82\x99",
+ "\xB5\x46" => "\xED\x82\x9A",
+ "\xB5\x47" => "\xED\x82\x9B",
+ "\xB5\x48" => "\xED\x82\x9C",
+ "\xB5\x49" => "\xED\x82\x9D",
+ "\xB5\x4A" => "\xED\x82\x9E",
+ "\xB5\x4B" => "\xED\x82\x9F",
+ "\xB5\x4C" => "\xED\x82\xA0",
+ "\xB5\x4D" => "\xED\x82\xA1",
+ "\xB5\x4E" => "\xED\x82\xA2",
+ "\xB5\x4F" => "\xED\x82\xA3",
+ "\xB5\x50" => "\xED\x82\xA6",
+ "\xB5\x51" => "\xED\x82\xA7",
+ "\xB5\x52" => "\xED\x82\xA9",
+ "\xB5\x53" => "\xED\x82\xAA",
+ "\xB5\x54" => "\xED\x82\xAB",
+ "\xB5\x55" => "\xED\x82\xAD",
+ "\xB5\x56" => "\xED\x82\xAE",
+ "\xB5\x57" => "\xED\x82\xAF",
+ "\xB5\x58" => "\xED\x82\xB0",
+ "\xB5\x59" => "\xED\x82\xB1",
+ "\xB5\x5A" => "\xED\x82\xB2",
+ "\xB5\x61" => "\xED\x82\xB3",
+ "\xB5\x62" => "\xED\x82\xB6",
+ "\xB5\x63" => "\xED\x82\xB8",
+ "\xB5\x64" => "\xED\x82\xBA",
+ "\xB5\x65" => "\xED\x82\xBB",
+ "\xB5\x66" => "\xED\x82\xBC",
+ "\xB5\x67" => "\xED\x82\xBD",
+ "\xB5\x68" => "\xED\x82\xBE",
+ "\xB5\x69" => "\xED\x82\xBF",
+ "\xB5\x6A" => "\xED\x83\x82",
+ "\xB5\x6B" => "\xED\x83\x83",
+ "\xB5\x6C" => "\xED\x83\x85",
+ "\xB5\x6D" => "\xED\x83\x86",
+ "\xB5\x6E" => "\xED\x83\x87",
+ "\xB5\x6F" => "\xED\x83\x8A",
+ "\xB5\x70" => "\xED\x83\x8B",
+ "\xB5\x71" => "\xED\x83\x8C",
+ "\xB5\x72" => "\xED\x83\x8D",
+ "\xB5\x73" => "\xED\x83\x8E",
+ "\xB5\x74" => "\xED\x83\x8F",
+ "\xB5\x75" => "\xED\x83\x92",
+ "\xB5\x76" => "\xED\x83\x96",
+ "\xB5\x77" => "\xED\x83\x97",
+ "\xB5\x78" => "\xED\x83\x98",
+ "\xB5\x79" => "\xED\x83\x99",
+ "\xB5\x7A" => "\xED\x83\x9A",
+ "\xB5\x81" => "\xED\x83\x9B",
+ "\xB5\x82" => "\xED\x83\x9E",
+ "\xB5\x83" => "\xED\x83\x9F",
+ "\xB5\x84" => "\xED\x83\xA1",
+ "\xB5\x85" => "\xED\x83\xA2",
+ "\xB5\x86" => "\xED\x83\xA3",
+ "\xB5\x87" => "\xED\x83\xA5",
+ "\xB5\x88" => "\xED\x83\xA6",
+ "\xB5\x89" => "\xED\x83\xA7",
+ "\xB5\x8A" => "\xED\x83\xA8",
+ "\xB5\x8B" => "\xED\x83\xA9",
+ "\xB5\x8C" => "\xED\x83\xAA",
+ "\xB5\x8D" => "\xED\x83\xAB",
+ "\xB5\x8E" => "\xED\x83\xAE",
+ "\xB5\x8F" => "\xED\x83\xB2",
+ "\xB5\x90" => "\xED\x83\xB3",
+ "\xB5\x91" => "\xED\x83\xB4",
+ "\xB5\x92" => "\xED\x83\xB5",
+ "\xB5\x93" => "\xED\x83\xB6",
+ "\xB5\x94" => "\xED\x83\xB7",
+ "\xB5\x95" => "\xED\x83\xB9",
+ "\xB5\x96" => "\xED\x83\xBA",
+ "\xB5\x97" => "\xED\x83\xBB",
+ "\xB5\x98" => "\xED\x83\xBC",
+ "\xB5\x99" => "\xED\x83\xBD",
+ "\xB5\x9A" => "\xED\x83\xBE",
+ "\xB5\x9B" => "\xED\x83\xBF",
+ "\xB5\x9C" => "\xED\x84\x80",
+ "\xB5\x9D" => "\xED\x84\x81",
+ "\xB5\x9E" => "\xED\x84\x82",
+ "\xB5\x9F" => "\xED\x84\x83",
+ "\xB5\xA0" => "\xED\x84\x84",
+ "\xB5\xA1" => "\xEB\x8D\xA7",
+ "\xB5\xA2" => "\xEB\x8D\xA9",
+ "\xB5\xA3" => "\xEB\x8D\xAB",
+ "\xB5\xA4" => "\xEB\x8D\xAE",
+ "\xB5\xA5" => "\xEB\x8D\xB0",
+ "\xB5\xA6" => "\xEB\x8D\xB1",
+ "\xB5\xA7" => "\xEB\x8D\xB4",
+ "\xB5\xA8" => "\xEB\x8D\xB8",
+ "\xB5\xA9" => "\xEB\x8E\x80",
+ "\xB5\xAA" => "\xEB\x8E\x81",
+ "\xB5\xAB" => "\xEB\x8E\x83",
+ "\xB5\xAC" => "\xEB\x8E\x84",
+ "\xB5\xAD" => "\xEB\x8E\x85",
+ "\xB5\xAE" => "\xEB\x8E\x8C",
+ "\xB5\xAF" => "\xEB\x8E\x90",
+ "\xB5\xB0" => "\xEB\x8E\x94",
+ "\xB5\xB1" => "\xEB\x8E\xA0",
+ "\xB5\xB2" => "\xEB\x8E\xA1",
+ "\xB5\xB3" => "\xEB\x8E\xA8",
+ "\xB5\xB4" => "\xEB\x8E\xAC",
+ "\xB5\xB5" => "\xEB\x8F\x84",
+ "\xB5\xB6" => "\xEB\x8F\x85",
+ "\xB5\xB7" => "\xEB\x8F\x88",
+ "\xB5\xB8" => "\xEB\x8F\x8B",
+ "\xB5\xB9" => "\xEB\x8F\x8C",
+ "\xB5\xBA" => "\xEB\x8F\x8E",
+ "\xB5\xBB" => "\xEB\x8F\x90",
+ "\xB5\xBC" => "\xEB\x8F\x94",
+ "\xB5\xBD" => "\xEB\x8F\x95",
+ "\xB5\xBE" => "\xEB\x8F\x97",
+ "\xB5\xBF" => "\xEB\x8F\x99",
+ "\xB5\xC0" => "\xEB\x8F\x9B",
+ "\xB5\xC1" => "\xEB\x8F\x9D",
+ "\xB5\xC2" => "\xEB\x8F\xA0",
+ "\xB5\xC3" => "\xEB\x8F\xA4",
+ "\xB5\xC4" => "\xEB\x8F\xA8",
+ "\xB5\xC5" => "\xEB\x8F\xBC",
+ "\xB5\xC6" => "\xEB\x90\x90",
+ "\xB5\xC7" => "\xEB\x90\x98",
+ "\xB5\xC8" => "\xEB\x90\x9C",
+ "\xB5\xC9" => "\xEB\x90\xA0",
+ "\xB5\xCA" => "\xEB\x90\xA8",
+ "\xB5\xCB" => "\xEB\x90\xA9",
+ "\xB5\xCC" => "\xEB\x90\xAB",
+ "\xB5\xCD" => "\xEB\x90\xB4",
+ "\xB5\xCE" => "\xEB\x91\x90",
+ "\xB5\xCF" => "\xEB\x91\x91",
+ "\xB5\xD0" => "\xEB\x91\x94",
+ "\xB5\xD1" => "\xEB\x91\x98",
+ "\xB5\xD2" => "\xEB\x91\xA0",
+ "\xB5\xD3" => "\xEB\x91\xA1",
+ "\xB5\xD4" => "\xEB\x91\xA3",
+ "\xB5\xD5" => "\xEB\x91\xA5",
+ "\xB5\xD6" => "\xEB\x91\xAC",
+ "\xB5\xD7" => "\xEB\x92\x80",
+ "\xB5\xD8" => "\xEB\x92\x88",
+ "\xB5\xD9" => "\xEB\x92\x9D",
+ "\xB5\xDA" => "\xEB\x92\xA4",
+ "\xB5\xDB" => "\xEB\x92\xA8",
+ "\xB5\xDC" => "\xEB\x92\xAC",
+ "\xB5\xDD" => "\xEB\x92\xB5",
+ "\xB5\xDE" => "\xEB\x92\xB7",
+ "\xB5\xDF" => "\xEB\x92\xB9",
+ "\xB5\xE0" => "\xEB\x93\x80",
+ "\xB5\xE1" => "\xEB\x93\x84",
+ "\xB5\xE2" => "\xEB\x93\x88",
+ "\xB5\xE3" => "\xEB\x93\x90",
+ "\xB5\xE4" => "\xEB\x93\x95",
+ "\xB5\xE5" => "\xEB\x93\x9C",
+ "\xB5\xE6" => "\xEB\x93\x9D",
+ "\xB5\xE7" => "\xEB\x93\xA0",
+ "\xB5\xE8" => "\xEB\x93\xA3",
+ "\xB5\xE9" => "\xEB\x93\xA4",
+ "\xB5\xEA" => "\xEB\x93\xA6",
+ "\xB5\xEB" => "\xEB\x93\xAC",
+ "\xB5\xEC" => "\xEB\x93\xAD",
+ "\xB5\xED" => "\xEB\x93\xAF",
+ "\xB5\xEE" => "\xEB\x93\xB1",
+ "\xB5\xEF" => "\xEB\x93\xB8",
+ "\xB5\xF0" => "\xEB\x94\x94",
+ "\xB5\xF1" => "\xEB\x94\x95",
+ "\xB5\xF2" => "\xEB\x94\x98",
+ "\xB5\xF3" => "\xEB\x94\x9B",
+ "\xB5\xF4" => "\xEB\x94\x9C",
+ "\xB5\xF5" => "\xEB\x94\xA4",
+ "\xB5\xF6" => "\xEB\x94\xA5",
+ "\xB5\xF7" => "\xEB\x94\xA7",
+ "\xB5\xF8" => "\xEB\x94\xA8",
+ "\xB5\xF9" => "\xEB\x94\xA9",
+ "\xB5\xFA" => "\xEB\x94\xAA",
+ "\xB5\xFB" => "\xEB\x94\xB0",
+ "\xB5\xFC" => "\xEB\x94\xB1",
+ "\xB5\xFD" => "\xEB\x94\xB4",
+ "\xB5\xFE" => "\xEB\x94\xB8",
+ "\xB6\x41" => "\xED\x84\x85",
+ "\xB6\x42" => "\xED\x84\x86",
+ "\xB6\x43" => "\xED\x84\x87",
+ "\xB6\x44" => "\xED\x84\x88",
+ "\xB6\x45" => "\xED\x84\x89",
+ "\xB6\x46" => "\xED\x84\x8A",
+ "\xB6\x47" => "\xED\x84\x8B",
+ "\xB6\x48" => "\xED\x84\x8C",
+ "\xB6\x49" => "\xED\x84\x8E",
+ "\xB6\x4A" => "\xED\x84\x8F",
+ "\xB6\x4B" => "\xED\x84\x90",
+ "\xB6\x4C" => "\xED\x84\x91",
+ "\xB6\x4D" => "\xED\x84\x92",
+ "\xB6\x4E" => "\xED\x84\x93",
+ "\xB6\x4F" => "\xED\x84\x94",
+ "\xB6\x50" => "\xED\x84\x95",
+ "\xB6\x51" => "\xED\x84\x96",
+ "\xB6\x52" => "\xED\x84\x97",
+ "\xB6\x53" => "\xED\x84\x98",
+ "\xB6\x54" => "\xED\x84\x99",
+ "\xB6\x55" => "\xED\x84\x9A",
+ "\xB6\x56" => "\xED\x84\x9B",
+ "\xB6\x57" => "\xED\x84\x9C",
+ "\xB6\x58" => "\xED\x84\x9D",
+ "\xB6\x59" => "\xED\x84\x9E",
+ "\xB6\x5A" => "\xED\x84\x9F",
+ "\xB6\x61" => "\xED\x84\xA0",
+ "\xB6\x62" => "\xED\x84\xA1",
+ "\xB6\x63" => "\xED\x84\xA2",
+ "\xB6\x64" => "\xED\x84\xA3",
+ "\xB6\x65" => "\xED\x84\xA4",
+ "\xB6\x66" => "\xED\x84\xA5",
+ "\xB6\x67" => "\xED\x84\xA6",
+ "\xB6\x68" => "\xED\x84\xA7",
+ "\xB6\x69" => "\xED\x84\xA8",
+ "\xB6\x6A" => "\xED\x84\xA9",
+ "\xB6\x6B" => "\xED\x84\xAA",
+ "\xB6\x6C" => "\xED\x84\xAB",
+ "\xB6\x6D" => "\xED\x84\xAC",
+ "\xB6\x6E" => "\xED\x84\xAD",
+ "\xB6\x6F" => "\xED\x84\xAE",
+ "\xB6\x70" => "\xED\x84\xAF",
+ "\xB6\x71" => "\xED\x84\xB2",
+ "\xB6\x72" => "\xED\x84\xB3",
+ "\xB6\x73" => "\xED\x84\xB5",
+ "\xB6\x74" => "\xED\x84\xB6",
+ "\xB6\x75" => "\xED\x84\xB7",
+ "\xB6\x76" => "\xED\x84\xB9",
+ "\xB6\x77" => "\xED\x84\xBB",
+ "\xB6\x78" => "\xED\x84\xBC",
+ "\xB6\x79" => "\xED\x84\xBD",
+ "\xB6\x7A" => "\xED\x84\xBE",
+ "\xB6\x81" => "\xED\x84\xBF",
+ "\xB6\x82" => "\xED\x85\x82",
+ "\xB6\x83" => "\xED\x85\x86",
+ "\xB6\x84" => "\xED\x85\x87",
+ "\xB6\x85" => "\xED\x85\x88",
+ "\xB6\x86" => "\xED\x85\x89",
+ "\xB6\x87" => "\xED\x85\x8A",
+ "\xB6\x88" => "\xED\x85\x8B",
+ "\xB6\x89" => "\xED\x85\x8E",
+ "\xB6\x8A" => "\xED\x85\x8F",
+ "\xB6\x8B" => "\xED\x85\x91",
+ "\xB6\x8C" => "\xED\x85\x92",
+ "\xB6\x8D" => "\xED\x85\x93",
+ "\xB6\x8E" => "\xED\x85\x95",
+ "\xB6\x8F" => "\xED\x85\x96",
+ "\xB6\x90" => "\xED\x85\x97",
+ "\xB6\x91" => "\xED\x85\x98",
+ "\xB6\x92" => "\xED\x85\x99",
+ "\xB6\x93" => "\xED\x85\x9A",
+ "\xB6\x94" => "\xED\x85\x9B",
+ "\xB6\x95" => "\xED\x85\x9E",
+ "\xB6\x96" => "\xED\x85\xA0",
+ "\xB6\x97" => "\xED\x85\xA2",
+ "\xB6\x98" => "\xED\x85\xA3",
+ "\xB6\x99" => "\xED\x85\xA4",
+ "\xB6\x9A" => "\xED\x85\xA5",
+ "\xB6\x9B" => "\xED\x85\xA6",
+ "\xB6\x9C" => "\xED\x85\xA7",
+ "\xB6\x9D" => "\xED\x85\xA9",
+ "\xB6\x9E" => "\xED\x85\xAA",
+ "\xB6\x9F" => "\xED\x85\xAB",
+ "\xB6\xA0" => "\xED\x85\xAD",
+ "\xB6\xA1" => "\xEB\x95\x80",
+ "\xB6\xA2" => "\xEB\x95\x81",
+ "\xB6\xA3" => "\xEB\x95\x83",
+ "\xB6\xA4" => "\xEB\x95\x84",
+ "\xB6\xA5" => "\xEB\x95\x85",
+ "\xB6\xA6" => "\xEB\x95\x8B",
+ "\xB6\xA7" => "\xEB\x95\x8C",
+ "\xB6\xA8" => "\xEB\x95\x8D",
+ "\xB6\xA9" => "\xEB\x95\x90",
+ "\xB6\xAA" => "\xEB\x95\x94",
+ "\xB6\xAB" => "\xEB\x95\x9C",
+ "\xB6\xAC" => "\xEB\x95\x9D",
+ "\xB6\xAD" => "\xEB\x95\x9F",
+ "\xB6\xAE" => "\xEB\x95\xA0",
+ "\xB6\xAF" => "\xEB\x95\xA1",
+ "\xB6\xB0" => "\xEB\x96\xA0",
+ "\xB6\xB1" => "\xEB\x96\xA1",
+ "\xB6\xB2" => "\xEB\x96\xA4",
+ "\xB6\xB3" => "\xEB\x96\xA8",
+ "\xB6\xB4" => "\xEB\x96\xAA",
+ "\xB6\xB5" => "\xEB\x96\xAB",
+ "\xB6\xB6" => "\xEB\x96\xB0",
+ "\xB6\xB7" => "\xEB\x96\xB1",
+ "\xB6\xB8" => "\xEB\x96\xB3",
+ "\xB6\xB9" => "\xEB\x96\xB4",
+ "\xB6\xBA" => "\xEB\x96\xB5",
+ "\xB6\xBB" => "\xEB\x96\xBB",
+ "\xB6\xBC" => "\xEB\x96\xBC",
+ "\xB6\xBD" => "\xEB\x96\xBD",
+ "\xB6\xBE" => "\xEB\x97\x80",
+ "\xB6\xBF" => "\xEB\x97\x84",
+ "\xB6\xC0" => "\xEB\x97\x8C",
+ "\xB6\xC1" => "\xEB\x97\x8D",
+ "\xB6\xC2" => "\xEB\x97\x8F",
+ "\xB6\xC3" => "\xEB\x97\x90",
+ "\xB6\xC4" => "\xEB\x97\x91",
+ "\xB6\xC5" => "\xEB\x97\x98",
+ "\xB6\xC6" => "\xEB\x97\xAC",
+ "\xB6\xC7" => "\xEB\x98\x90",
+ "\xB6\xC8" => "\xEB\x98\x91",
+ "\xB6\xC9" => "\xEB\x98\x94",
+ "\xB6\xCA" => "\xEB\x98\x98",
+ "\xB6\xCB" => "\xEB\x98\xA5",
+ "\xB6\xCC" => "\xEB\x98\xAC",
+ "\xB6\xCD" => "\xEB\x98\xB4",
+ "\xB6\xCE" => "\xEB\x99\x88",
+ "\xB6\xCF" => "\xEB\x99\xA4",
+ "\xB6\xD0" => "\xEB\x99\xA8",
+ "\xB6\xD1" => "\xEB\x9A\x9C",
+ "\xB6\xD2" => "\xEB\x9A\x9D",
+ "\xB6\xD3" => "\xEB\x9A\xA0",
+ "\xB6\xD4" => "\xEB\x9A\xA4",
+ "\xB6\xD5" => "\xEB\x9A\xAB",
+ "\xB6\xD6" => "\xEB\x9A\xAC",
+ "\xB6\xD7" => "\xEB\x9A\xB1",
+ "\xB6\xD8" => "\xEB\x9B\x94",
+ "\xB6\xD9" => "\xEB\x9B\xB0",
+ "\xB6\xDA" => "\xEB\x9B\xB4",
+ "\xB6\xDB" => "\xEB\x9B\xB8",
+ "\xB6\xDC" => "\xEB\x9C\x80",
+ "\xB6\xDD" => "\xEB\x9C\x81",
+ "\xB6\xDE" => "\xEB\x9C\x85",
+ "\xB6\xDF" => "\xEB\x9C\xA8",
+ "\xB6\xE0" => "\xEB\x9C\xA9",
+ "\xB6\xE1" => "\xEB\x9C\xAC",
+ "\xB6\xE2" => "\xEB\x9C\xAF",
+ "\xB6\xE3" => "\xEB\x9C\xB0",
+ "\xB6\xE4" => "\xEB\x9C\xB8",
+ "\xB6\xE5" => "\xEB\x9C\xB9",
+ "\xB6\xE6" => "\xEB\x9C\xBB",
+ "\xB6\xE7" => "\xEB\x9D\x84",
+ "\xB6\xE8" => "\xEB\x9D\x88",
+ "\xB6\xE9" => "\xEB\x9D\x8C",
+ "\xB6\xEA" => "\xEB\x9D\x94",
+ "\xB6\xEB" => "\xEB\x9D\x95",
+ "\xB6\xEC" => "\xEB\x9D\xA0",
+ "\xB6\xED" => "\xEB\x9D\xA4",
+ "\xB6\xEE" => "\xEB\x9D\xA8",
+ "\xB6\xEF" => "\xEB\x9D\xB0",
+ "\xB6\xF0" => "\xEB\x9D\xB1",
+ "\xB6\xF1" => "\xEB\x9D\xB3",
+ "\xB6\xF2" => "\xEB\x9D\xB5",
+ "\xB6\xF3" => "\xEB\x9D\xBC",
+ "\xB6\xF4" => "\xEB\x9D\xBD",
+ "\xB6\xF5" => "\xEB\x9E\x80",
+ "\xB6\xF6" => "\xEB\x9E\x84",
+ "\xB6\xF7" => "\xEB\x9E\x8C",
+ "\xB6\xF8" => "\xEB\x9E\x8D",
+ "\xB6\xF9" => "\xEB\x9E\x8F",
+ "\xB6\xFA" => "\xEB\x9E\x90",
+ "\xB6\xFB" => "\xEB\x9E\x91",
+ "\xB6\xFC" => "\xEB\x9E\x92",
+ "\xB6\xFD" => "\xEB\x9E\x96",
+ "\xB6\xFE" => "\xEB\x9E\x97",
+ "\xB7\x41" => "\xED\x85\xAE",
+ "\xB7\x42" => "\xED\x85\xAF",
+ "\xB7\x43" => "\xED\x85\xB0",
+ "\xB7\x44" => "\xED\x85\xB1",
+ "\xB7\x45" => "\xED\x85\xB2",
+ "\xB7\x46" => "\xED\x85\xB3",
+ "\xB7\x47" => "\xED\x85\xB4",
+ "\xB7\x48" => "\xED\x85\xB5",
+ "\xB7\x49" => "\xED\x85\xB6",
+ "\xB7\x4A" => "\xED\x85\xB7",
+ "\xB7\x4B" => "\xED\x85\xB8",
+ "\xB7\x4C" => "\xED\x85\xB9",
+ "\xB7\x4D" => "\xED\x85\xBA",
+ "\xB7\x4E" => "\xED\x85\xBB",
+ "\xB7\x4F" => "\xED\x85\xBD",
+ "\xB7\x50" => "\xED\x85\xBE",
+ "\xB7\x51" => "\xED\x85\xBF",
+ "\xB7\x52" => "\xED\x86\x80",
+ "\xB7\x53" => "\xED\x86\x81",
+ "\xB7\x54" => "\xED\x86\x82",
+ "\xB7\x55" => "\xED\x86\x83",
+ "\xB7\x56" => "\xED\x86\x85",
+ "\xB7\x57" => "\xED\x86\x86",
+ "\xB7\x58" => "\xED\x86\x87",
+ "\xB7\x59" => "\xED\x86\x89",
+ "\xB7\x5A" => "\xED\x86\x8A",
+ "\xB7\x61" => "\xED\x86\x8B",
+ "\xB7\x62" => "\xED\x86\x8C",
+ "\xB7\x63" => "\xED\x86\x8D",
+ "\xB7\x64" => "\xED\x86\x8E",
+ "\xB7\x65" => "\xED\x86\x8F",
+ "\xB7\x66" => "\xED\x86\x90",
+ "\xB7\x67" => "\xED\x86\x91",
+ "\xB7\x68" => "\xED\x86\x92",
+ "\xB7\x69" => "\xED\x86\x93",
+ "\xB7\x6A" => "\xED\x86\x94",
+ "\xB7\x6B" => "\xED\x86\x95",
+ "\xB7\x6C" => "\xED\x86\x96",
+ "\xB7\x6D" => "\xED\x86\x97",
+ "\xB7\x6E" => "\xED\x86\x98",
+ "\xB7\x6F" => "\xED\x86\x99",
+ "\xB7\x70" => "\xED\x86\x9A",
+ "\xB7\x71" => "\xED\x86\x9B",
+ "\xB7\x72" => "\xED\x86\x9C",
+ "\xB7\x73" => "\xED\x86\x9D",
+ "\xB7\x74" => "\xED\x86\x9E",
+ "\xB7\x75" => "\xED\x86\x9F",
+ "\xB7\x76" => "\xED\x86\xA2",
+ "\xB7\x77" => "\xED\x86\xA3",
+ "\xB7\x78" => "\xED\x86\xA5",
+ "\xB7\x79" => "\xED\x86\xA6",
+ "\xB7\x7A" => "\xED\x86\xA7",
+ "\xB7\x81" => "\xED\x86\xA9",
+ "\xB7\x82" => "\xED\x86\xAA",
+ "\xB7\x83" => "\xED\x86\xAB",
+ "\xB7\x84" => "\xED\x86\xAC",
+ "\xB7\x85" => "\xED\x86\xAD",
+ "\xB7\x86" => "\xED\x86\xAE",
+ "\xB7\x87" => "\xED\x86\xAF",
+ "\xB7\x88" => "\xED\x86\xB2",
+ "\xB7\x89" => "\xED\x86\xB4",
+ "\xB7\x8A" => "\xED\x86\xB6",
+ "\xB7\x8B" => "\xED\x86\xB7",
+ "\xB7\x8C" => "\xED\x86\xB8",
+ "\xB7\x8D" => "\xED\x86\xB9",
+ "\xB7\x8E" => "\xED\x86\xBB",
+ "\xB7\x8F" => "\xED\x86\xBD",
+ "\xB7\x90" => "\xED\x86\xBE",
+ "\xB7\x91" => "\xED\x86\xBF",
+ "\xB7\x92" => "\xED\x87\x81",
+ "\xB7\x93" => "\xED\x87\x82",
+ "\xB7\x94" => "\xED\x87\x83",
+ "\xB7\x95" => "\xED\x87\x84",
+ "\xB7\x96" => "\xED\x87\x85",
+ "\xB7\x97" => "\xED\x87\x86",
+ "\xB7\x98" => "\xED\x87\x87",
+ "\xB7\x99" => "\xED\x87\x88",
+ "\xB7\x9A" => "\xED\x87\x89",
+ "\xB7\x9B" => "\xED\x87\x8A",
+ "\xB7\x9C" => "\xED\x87\x8B",
+ "\xB7\x9D" => "\xED\x87\x8C",
+ "\xB7\x9E" => "\xED\x87\x8D",
+ "\xB7\x9F" => "\xED\x87\x8E",
+ "\xB7\xA0" => "\xED\x87\x8F",
+ "\xB7\xA1" => "\xEB\x9E\x98",
+ "\xB7\xA2" => "\xEB\x9E\x99",
+ "\xB7\xA3" => "\xEB\x9E\x9C",
+ "\xB7\xA4" => "\xEB\x9E\xA0",
+ "\xB7\xA5" => "\xEB\x9E\xA8",
+ "\xB7\xA6" => "\xEB\x9E\xA9",
+ "\xB7\xA7" => "\xEB\x9E\xAB",
+ "\xB7\xA8" => "\xEB\x9E\xAC",
+ "\xB7\xA9" => "\xEB\x9E\xAD",
+ "\xB7\xAA" => "\xEB\x9E\xB4",
+ "\xB7\xAB" => "\xEB\x9E\xB5",
+ "\xB7\xAC" => "\xEB\x9E\xB8",
+ "\xB7\xAD" => "\xEB\x9F\x87",
+ "\xB7\xAE" => "\xEB\x9F\x89",
+ "\xB7\xAF" => "\xEB\x9F\xAC",
+ "\xB7\xB0" => "\xEB\x9F\xAD",
+ "\xB7\xB1" => "\xEB\x9F\xB0",
+ "\xB7\xB2" => "\xEB\x9F\xB4",
+ "\xB7\xB3" => "\xEB\x9F\xBC",
+ "\xB7\xB4" => "\xEB\x9F\xBD",
+ "\xB7\xB5" => "\xEB\x9F\xBF",
+ "\xB7\xB6" => "\xEB\xA0\x80",
+ "\xB7\xB7" => "\xEB\xA0\x81",
+ "\xB7\xB8" => "\xEB\xA0\x87",
+ "\xB7\xB9" => "\xEB\xA0\x88",
+ "\xB7\xBA" => "\xEB\xA0\x89",
+ "\xB7\xBB" => "\xEB\xA0\x8C",
+ "\xB7\xBC" => "\xEB\xA0\x90",
+ "\xB7\xBD" => "\xEB\xA0\x98",
+ "\xB7\xBE" => "\xEB\xA0\x99",
+ "\xB7\xBF" => "\xEB\xA0\x9B",
+ "\xB7\xC0" => "\xEB\xA0\x9D",
+ "\xB7\xC1" => "\xEB\xA0\xA4",
+ "\xB7\xC2" => "\xEB\xA0\xA5",
+ "\xB7\xC3" => "\xEB\xA0\xA8",
+ "\xB7\xC4" => "\xEB\xA0\xAC",
+ "\xB7\xC5" => "\xEB\xA0\xB4",
+ "\xB7\xC6" => "\xEB\xA0\xB5",
+ "\xB7\xC7" => "\xEB\xA0\xB7",
+ "\xB7\xC8" => "\xEB\xA0\xB8",
+ "\xB7\xC9" => "\xEB\xA0\xB9",
+ "\xB7\xCA" => "\xEB\xA1\x80",
+ "\xB7\xCB" => "\xEB\xA1\x84",
+ "\xB7\xCC" => "\xEB\xA1\x91",
+ "\xB7\xCD" => "\xEB\xA1\x93",
+ "\xB7\xCE" => "\xEB\xA1\x9C",
+ "\xB7\xCF" => "\xEB\xA1\x9D",
+ "\xB7\xD0" => "\xEB\xA1\xA0",
+ "\xB7\xD1" => "\xEB\xA1\xA4",
+ "\xB7\xD2" => "\xEB\xA1\xAC",
+ "\xB7\xD3" => "\xEB\xA1\xAD",
+ "\xB7\xD4" => "\xEB\xA1\xAF",
+ "\xB7\xD5" => "\xEB\xA1\xB1",
+ "\xB7\xD6" => "\xEB\xA1\xB8",
+ "\xB7\xD7" => "\xEB\xA1\xBC",
+ "\xB7\xD8" => "\xEB\xA2\x8D",
+ "\xB7\xD9" => "\xEB\xA2\xA8",
+ "\xB7\xDA" => "\xEB\xA2\xB0",
+ "\xB7\xDB" => "\xEB\xA2\xB4",
+ "\xB7\xDC" => "\xEB\xA2\xB8",
+ "\xB7\xDD" => "\xEB\xA3\x80",
+ "\xB7\xDE" => "\xEB\xA3\x81",
+ "\xB7\xDF" => "\xEB\xA3\x83",
+ "\xB7\xE0" => "\xEB\xA3\x85",
+ "\xB7\xE1" => "\xEB\xA3\x8C",
+ "\xB7\xE2" => "\xEB\xA3\x90",
+ "\xB7\xE3" => "\xEB\xA3\x94",
+ "\xB7\xE4" => "\xEB\xA3\x9D",
+ "\xB7\xE5" => "\xEB\xA3\x9F",
+ "\xB7\xE6" => "\xEB\xA3\xA1",
+ "\xB7\xE7" => "\xEB\xA3\xA8",
+ "\xB7\xE8" => "\xEB\xA3\xA9",
+ "\xB7\xE9" => "\xEB\xA3\xAC",
+ "\xB7\xEA" => "\xEB\xA3\xB0",
+ "\xB7\xEB" => "\xEB\xA3\xB8",
+ "\xB7\xEC" => "\xEB\xA3\xB9",
+ "\xB7\xED" => "\xEB\xA3\xBB",
+ "\xB7\xEE" => "\xEB\xA3\xBD",
+ "\xB7\xEF" => "\xEB\xA4\x84",
+ "\xB7\xF0" => "\xEB\xA4\x98",
+ "\xB7\xF1" => "\xEB\xA4\xA0",
+ "\xB7\xF2" => "\xEB\xA4\xBC",
+ "\xB7\xF3" => "\xEB\xA4\xBD",
+ "\xB7\xF4" => "\xEB\xA5\x80",
+ "\xB7\xF5" => "\xEB\xA5\x84",
+ "\xB7\xF6" => "\xEB\xA5\x8C",
+ "\xB7\xF7" => "\xEB\xA5\x8F",
+ "\xB7\xF8" => "\xEB\xA5\x91",
+ "\xB7\xF9" => "\xEB\xA5\x98",
+ "\xB7\xFA" => "\xEB\xA5\x99",
+ "\xB7\xFB" => "\xEB\xA5\x9C",
+ "\xB7\xFC" => "\xEB\xA5\xA0",
+ "\xB7\xFD" => "\xEB\xA5\xA8",
+ "\xB7\xFE" => "\xEB\xA5\xA9",
+ "\xB8\x41" => "\xED\x87\x90",
+ "\xB8\x42" => "\xED\x87\x91",
+ "\xB8\x43" => "\xED\x87\x92",
+ "\xB8\x44" => "\xED\x87\x93",
+ "\xB8\x45" => "\xED\x87\x94",
+ "\xB8\x46" => "\xED\x87\x95",
+ "\xB8\x47" => "\xED\x87\x96",
+ "\xB8\x48" => "\xED\x87\x97",
+ "\xB8\x49" => "\xED\x87\x99",
+ "\xB8\x4A" => "\xED\x87\x9A",
+ "\xB8\x4B" => "\xED\x87\x9B",
+ "\xB8\x4C" => "\xED\x87\x9C",
+ "\xB8\x4D" => "\xED\x87\x9D",
+ "\xB8\x4E" => "\xED\x87\x9E",
+ "\xB8\x4F" => "\xED\x87\x9F",
+ "\xB8\x50" => "\xED\x87\xA0",
+ "\xB8\x51" => "\xED\x87\xA1",
+ "\xB8\x52" => "\xED\x87\xA2",
+ "\xB8\x53" => "\xED\x87\xA3",
+ "\xB8\x54" => "\xED\x87\xA4",
+ "\xB8\x55" => "\xED\x87\xA5",
+ "\xB8\x56" => "\xED\x87\xA6",
+ "\xB8\x57" => "\xED\x87\xA7",
+ "\xB8\x58" => "\xED\x87\xA8",
+ "\xB8\x59" => "\xED\x87\xA9",
+ "\xB8\x5A" => "\xED\x87\xAA",
+ "\xB8\x61" => "\xED\x87\xAB",
+ "\xB8\x62" => "\xED\x87\xAC",
+ "\xB8\x63" => "\xED\x87\xAD",
+ "\xB8\x64" => "\xED\x87\xAE",
+ "\xB8\x65" => "\xED\x87\xAF",
+ "\xB8\x66" => "\xED\x87\xB0",
+ "\xB8\x67" => "\xED\x87\xB1",
+ "\xB8\x68" => "\xED\x87\xB2",
+ "\xB8\x69" => "\xED\x87\xB3",
+ "\xB8\x6A" => "\xED\x87\xB5",
+ "\xB8\x6B" => "\xED\x87\xB6",
+ "\xB8\x6C" => "\xED\x87\xB7",
+ "\xB8\x6D" => "\xED\x87\xB9",
+ "\xB8\x6E" => "\xED\x87\xBA",
+ "\xB8\x6F" => "\xED\x87\xBB",
+ "\xB8\x70" => "\xED\x87\xBC",
+ "\xB8\x71" => "\xED\x87\xBD",
+ "\xB8\x72" => "\xED\x87\xBE",
+ "\xB8\x73" => "\xED\x87\xBF",
+ "\xB8\x74" => "\xED\x88\x80",
+ "\xB8\x75" => "\xED\x88\x81",
+ "\xB8\x76" => "\xED\x88\x82",
+ "\xB8\x77" => "\xED\x88\x83",
+ "\xB8\x78" => "\xED\x88\x84",
+ "\xB8\x79" => "\xED\x88\x85",
+ "\xB8\x7A" => "\xED\x88\x86",
+ "\xB8\x81" => "\xED\x88\x88",
+ "\xB8\x82" => "\xED\x88\x8A",
+ "\xB8\x83" => "\xED\x88\x8B",
+ "\xB8\x84" => "\xED\x88\x8C",
+ "\xB8\x85" => "\xED\x88\x8D",
+ "\xB8\x86" => "\xED\x88\x8E",
+ "\xB8\x87" => "\xED\x88\x8F",
+ "\xB8\x88" => "\xED\x88\x91",
+ "\xB8\x89" => "\xED\x88\x92",
+ "\xB8\x8A" => "\xED\x88\x93",
+ "\xB8\x8B" => "\xED\x88\x94",
+ "\xB8\x8C" => "\xED\x88\x95",
+ "\xB8\x8D" => "\xED\x88\x96",
+ "\xB8\x8E" => "\xED\x88\x97",
+ "\xB8\x8F" => "\xED\x88\x98",
+ "\xB8\x90" => "\xED\x88\x99",
+ "\xB8\x91" => "\xED\x88\x9A",
+ "\xB8\x92" => "\xED\x88\x9B",
+ "\xB8\x93" => "\xED\x88\x9C",
+ "\xB8\x94" => "\xED\x88\x9D",
+ "\xB8\x95" => "\xED\x88\x9E",
+ "\xB8\x96" => "\xED\x88\x9F",
+ "\xB8\x97" => "\xED\x88\xA0",
+ "\xB8\x98" => "\xED\x88\xA1",
+ "\xB8\x99" => "\xED\x88\xA2",
+ "\xB8\x9A" => "\xED\x88\xA3",
+ "\xB8\x9B" => "\xED\x88\xA4",
+ "\xB8\x9C" => "\xED\x88\xA5",
+ "\xB8\x9D" => "\xED\x88\xA6",
+ "\xB8\x9E" => "\xED\x88\xA7",
+ "\xB8\x9F" => "\xED\x88\xA8",
+ "\xB8\xA0" => "\xED\x88\xA9",
+ "\xB8\xA1" => "\xEB\xA5\xAB",
+ "\xB8\xA2" => "\xEB\xA5\xAD",
+ "\xB8\xA3" => "\xEB\xA5\xB4",
+ "\xB8\xA4" => "\xEB\xA5\xB5",
+ "\xB8\xA5" => "\xEB\xA5\xB8",
+ "\xB8\xA6" => "\xEB\xA5\xBC",
+ "\xB8\xA7" => "\xEB\xA6\x84",
+ "\xB8\xA8" => "\xEB\xA6\x85",
+ "\xB8\xA9" => "\xEB\xA6\x87",
+ "\xB8\xAA" => "\xEB\xA6\x89",
+ "\xB8\xAB" => "\xEB\xA6\x8A",
+ "\xB8\xAC" => "\xEB\xA6\x8D",
+ "\xB8\xAD" => "\xEB\xA6\x8E",
+ "\xB8\xAE" => "\xEB\xA6\xAC",
+ "\xB8\xAF" => "\xEB\xA6\xAD",
+ "\xB8\xB0" => "\xEB\xA6\xB0",
+ "\xB8\xB1" => "\xEB\xA6\xB4",
+ "\xB8\xB2" => "\xEB\xA6\xBC",
+ "\xB8\xB3" => "\xEB\xA6\xBD",
+ "\xB8\xB4" => "\xEB\xA6\xBF",
+ "\xB8\xB5" => "\xEB\xA7\x81",
+ "\xB8\xB6" => "\xEB\xA7\x88",
+ "\xB8\xB7" => "\xEB\xA7\x89",
+ "\xB8\xB8" => "\xEB\xA7\x8C",
+ "\xB8\xB9" => "\xEB\xA7\x8E",
+ "\xB8\xBA" => "\xEB\xA7\x8F",
+ "\xB8\xBB" => "\xEB\xA7\x90",
+ "\xB8\xBC" => "\xEB\xA7\x91",
+ "\xB8\xBD" => "\xEB\xA7\x92",
+ "\xB8\xBE" => "\xEB\xA7\x98",
+ "\xB8\xBF" => "\xEB\xA7\x99",
+ "\xB8\xC0" => "\xEB\xA7\x9B",
+ "\xB8\xC1" => "\xEB\xA7\x9D",
+ "\xB8\xC2" => "\xEB\xA7\x9E",
+ "\xB8\xC3" => "\xEB\xA7\xA1",
+ "\xB8\xC4" => "\xEB\xA7\xA3",
+ "\xB8\xC5" => "\xEB\xA7\xA4",
+ "\xB8\xC6" => "\xEB\xA7\xA5",
+ "\xB8\xC7" => "\xEB\xA7\xA8",
+ "\xB8\xC8" => "\xEB\xA7\xAC",
+ "\xB8\xC9" => "\xEB\xA7\xB4",
+ "\xB8\xCA" => "\xEB\xA7\xB5",
+ "\xB8\xCB" => "\xEB\xA7\xB7",
+ "\xB8\xCC" => "\xEB\xA7\xB8",
+ "\xB8\xCD" => "\xEB\xA7\xB9",
+ "\xB8\xCE" => "\xEB\xA7\xBA",
+ "\xB8\xCF" => "\xEB\xA8\x80",
+ "\xB8\xD0" => "\xEB\xA8\x81",
+ "\xB8\xD1" => "\xEB\xA8\x88",
+ "\xB8\xD2" => "\xEB\xA8\x95",
+ "\xB8\xD3" => "\xEB\xA8\xB8",
+ "\xB8\xD4" => "\xEB\xA8\xB9",
+ "\xB8\xD5" => "\xEB\xA8\xBC",
+ "\xB8\xD6" => "\xEB\xA9\x80",
+ "\xB8\xD7" => "\xEB\xA9\x82",
+ "\xB8\xD8" => "\xEB\xA9\x88",
+ "\xB8\xD9" => "\xEB\xA9\x89",
+ "\xB8\xDA" => "\xEB\xA9\x8B",
+ "\xB8\xDB" => "\xEB\xA9\x8D",
+ "\xB8\xDC" => "\xEB\xA9\x8E",
+ "\xB8\xDD" => "\xEB\xA9\x93",
+ "\xB8\xDE" => "\xEB\xA9\x94",
+ "\xB8\xDF" => "\xEB\xA9\x95",
+ "\xB8\xE0" => "\xEB\xA9\x98",
+ "\xB8\xE1" => "\xEB\xA9\x9C",
+ "\xB8\xE2" => "\xEB\xA9\xA4",
+ "\xB8\xE3" => "\xEB\xA9\xA5",
+ "\xB8\xE4" => "\xEB\xA9\xA7",
+ "\xB8\xE5" => "\xEB\xA9\xA8",
+ "\xB8\xE6" => "\xEB\xA9\xA9",
+ "\xB8\xE7" => "\xEB\xA9\xB0",
+ "\xB8\xE8" => "\xEB\xA9\xB1",
+ "\xB8\xE9" => "\xEB\xA9\xB4",
+ "\xB8\xEA" => "\xEB\xA9\xB8",
+ "\xB8\xEB" => "\xEB\xAA\x83",
+ "\xB8\xEC" => "\xEB\xAA\x84",
+ "\xB8\xED" => "\xEB\xAA\x85",
+ "\xB8\xEE" => "\xEB\xAA\x87",
+ "\xB8\xEF" => "\xEB\xAA\x8C",
+ "\xB8\xF0" => "\xEB\xAA\xA8",
+ "\xB8\xF1" => "\xEB\xAA\xA9",
+ "\xB8\xF2" => "\xEB\xAA\xAB",
+ "\xB8\xF3" => "\xEB\xAA\xAC",
+ "\xB8\xF4" => "\xEB\xAA\xB0",
+ "\xB8\xF5" => "\xEB\xAA\xB2",
+ "\xB8\xF6" => "\xEB\xAA\xB8",
+ "\xB8\xF7" => "\xEB\xAA\xB9",
+ "\xB8\xF8" => "\xEB\xAA\xBB",
+ "\xB8\xF9" => "\xEB\xAA\xBD",
+ "\xB8\xFA" => "\xEB\xAB\x84",
+ "\xB8\xFB" => "\xEB\xAB\x88",
+ "\xB8\xFC" => "\xEB\xAB\x98",
+ "\xB8\xFD" => "\xEB\xAB\x99",
+ "\xB8\xFE" => "\xEB\xAB\xBC",
+ "\xB9\x41" => "\xED\x88\xAA",
+ "\xB9\x42" => "\xED\x88\xAB",
+ "\xB9\x43" => "\xED\x88\xAE",
+ "\xB9\x44" => "\xED\x88\xAF",
+ "\xB9\x45" => "\xED\x88\xB1",
+ "\xB9\x46" => "\xED\x88\xB2",
+ "\xB9\x47" => "\xED\x88\xB3",
+ "\xB9\x48" => "\xED\x88\xB5",
+ "\xB9\x49" => "\xED\x88\xB6",
+ "\xB9\x4A" => "\xED\x88\xB7",
+ "\xB9\x4B" => "\xED\x88\xB8",
+ "\xB9\x4C" => "\xED\x88\xB9",
+ "\xB9\x4D" => "\xED\x88\xBA",
+ "\xB9\x4E" => "\xED\x88\xBB",
+ "\xB9\x4F" => "\xED\x88\xBE",
+ "\xB9\x50" => "\xED\x89\x80",
+ "\xB9\x51" => "\xED\x89\x82",
+ "\xB9\x52" => "\xED\x89\x83",
+ "\xB9\x53" => "\xED\x89\x84",
+ "\xB9\x54" => "\xED\x89\x85",
+ "\xB9\x55" => "\xED\x89\x86",
+ "\xB9\x56" => "\xED\x89\x87",
+ "\xB9\x57" => "\xED\x89\x89",
+ "\xB9\x58" => "\xED\x89\x8A",
+ "\xB9\x59" => "\xED\x89\x8B",
+ "\xB9\x5A" => "\xED\x89\x8C",
+ "\xB9\x61" => "\xED\x89\x8D",
+ "\xB9\x62" => "\xED\x89\x8E",
+ "\xB9\x63" => "\xED\x89\x8F",
+ "\xB9\x64" => "\xED\x89\x90",
+ "\xB9\x65" => "\xED\x89\x91",
+ "\xB9\x66" => "\xED\x89\x92",
+ "\xB9\x67" => "\xED\x89\x93",
+ "\xB9\x68" => "\xED\x89\x94",
+ "\xB9\x69" => "\xED\x89\x95",
+ "\xB9\x6A" => "\xED\x89\x96",
+ "\xB9\x6B" => "\xED\x89\x97",
+ "\xB9\x6C" => "\xED\x89\x98",
+ "\xB9\x6D" => "\xED\x89\x99",
+ "\xB9\x6E" => "\xED\x89\x9A",
+ "\xB9\x6F" => "\xED\x89\x9B",
+ "\xB9\x70" => "\xED\x89\x9D",
+ "\xB9\x71" => "\xED\x89\x9E",
+ "\xB9\x72" => "\xED\x89\x9F",
+ "\xB9\x73" => "\xED\x89\xA0",
+ "\xB9\x74" => "\xED\x89\xA1",
+ "\xB9\x75" => "\xED\x89\xA2",
+ "\xB9\x76" => "\xED\x89\xA3",
+ "\xB9\x77" => "\xED\x89\xA5",
+ "\xB9\x78" => "\xED\x89\xA6",
+ "\xB9\x79" => "\xED\x89\xA7",
+ "\xB9\x7A" => "\xED\x89\xA8",
+ "\xB9\x81" => "\xED\x89\xA9",
+ "\xB9\x82" => "\xED\x89\xAA",
+ "\xB9\x83" => "\xED\x89\xAB",
+ "\xB9\x84" => "\xED\x89\xAC",
+ "\xB9\x85" => "\xED\x89\xAD",
+ "\xB9\x86" => "\xED\x89\xAE",
+ "\xB9\x87" => "\xED\x89\xAF",
+ "\xB9\x88" => "\xED\x89\xB0",
+ "\xB9\x89" => "\xED\x89\xB1",
+ "\xB9\x8A" => "\xED\x89\xB2",
+ "\xB9\x8B" => "\xED\x89\xB3",
+ "\xB9\x8C" => "\xED\x89\xB4",
+ "\xB9\x8D" => "\xED\x89\xB5",
+ "\xB9\x8E" => "\xED\x89\xB6",
+ "\xB9\x8F" => "\xED\x89\xB7",
+ "\xB9\x90" => "\xED\x89\xB8",
+ "\xB9\x91" => "\xED\x89\xB9",
+ "\xB9\x92" => "\xED\x89\xBA",
+ "\xB9\x93" => "\xED\x89\xBB",
+ "\xB9\x94" => "\xED\x89\xBC",
+ "\xB9\x95" => "\xED\x89\xBD",
+ "\xB9\x96" => "\xED\x89\xBE",
+ "\xB9\x97" => "\xED\x89\xBF",
+ "\xB9\x98" => "\xED\x8A\x82",
+ "\xB9\x99" => "\xED\x8A\x83",
+ "\xB9\x9A" => "\xED\x8A\x85",
+ "\xB9\x9B" => "\xED\x8A\x86",
+ "\xB9\x9C" => "\xED\x8A\x87",
+ "\xB9\x9D" => "\xED\x8A\x89",
+ "\xB9\x9E" => "\xED\x8A\x8A",
+ "\xB9\x9F" => "\xED\x8A\x8B",
+ "\xB9\xA0" => "\xED\x8A\x8C",
+ "\xB9\xA1" => "\xEB\xAC\x80",
+ "\xB9\xA2" => "\xEB\xAC\x84",
+ "\xB9\xA3" => "\xEB\xAC\x8D",
+ "\xB9\xA4" => "\xEB\xAC\x8F",
+ "\xB9\xA5" => "\xEB\xAC\x91",
+ "\xB9\xA6" => "\xEB\xAC\x98",
+ "\xB9\xA7" => "\xEB\xAC\x9C",
+ "\xB9\xA8" => "\xEB\xAC\xA0",
+ "\xB9\xA9" => "\xEB\xAC\xA9",
+ "\xB9\xAA" => "\xEB\xAC\xAB",
+ "\xB9\xAB" => "\xEB\xAC\xB4",
+ "\xB9\xAC" => "\xEB\xAC\xB5",
+ "\xB9\xAD" => "\xEB\xAC\xB6",
+ "\xB9\xAE" => "\xEB\xAC\xB8",
+ "\xB9\xAF" => "\xEB\xAC\xBB",
+ "\xB9\xB0" => "\xEB\xAC\xBC",
+ "\xB9\xB1" => "\xEB\xAC\xBD",
+ "\xB9\xB2" => "\xEB\xAC\xBE",
+ "\xB9\xB3" => "\xEB\xAD\x84",
+ "\xB9\xB4" => "\xEB\xAD\x85",
+ "\xB9\xB5" => "\xEB\xAD\x87",
+ "\xB9\xB6" => "\xEB\xAD\x89",
+ "\xB9\xB7" => "\xEB\xAD\x8D",
+ "\xB9\xB8" => "\xEB\xAD\x8F",
+ "\xB9\xB9" => "\xEB\xAD\x90",
+ "\xB9\xBA" => "\xEB\xAD\x94",
+ "\xB9\xBB" => "\xEB\xAD\x98",
+ "\xB9\xBC" => "\xEB\xAD\xA1",
+ "\xB9\xBD" => "\xEB\xAD\xA3",
+ "\xB9\xBE" => "\xEB\xAD\xAC",
+ "\xB9\xBF" => "\xEB\xAE\x88",
+ "\xB9\xC0" => "\xEB\xAE\x8C",
+ "\xB9\xC1" => "\xEB\xAE\x90",
+ "\xB9\xC2" => "\xEB\xAE\xA4",
+ "\xB9\xC3" => "\xEB\xAE\xA8",
+ "\xB9\xC4" => "\xEB\xAE\xAC",
+ "\xB9\xC5" => "\xEB\xAE\xB4",
+ "\xB9\xC6" => "\xEB\xAE\xB7",
+ "\xB9\xC7" => "\xEB\xAF\x80",
+ "\xB9\xC8" => "\xEB\xAF\x84",
+ "\xB9\xC9" => "\xEB\xAF\x88",
+ "\xB9\xCA" => "\xEB\xAF\x90",
+ "\xB9\xCB" => "\xEB\xAF\x93",
+ "\xB9\xCC" => "\xEB\xAF\xB8",
+ "\xB9\xCD" => "\xEB\xAF\xB9",
+ "\xB9\xCE" => "\xEB\xAF\xBC",
+ "\xB9\xCF" => "\xEB\xAF\xBF",
+ "\xB9\xD0" => "\xEB\xB0\x80",
+ "\xB9\xD1" => "\xEB\xB0\x82",
+ "\xB9\xD2" => "\xEB\xB0\x88",
+ "\xB9\xD3" => "\xEB\xB0\x89",
+ "\xB9\xD4" => "\xEB\xB0\x8B",
+ "\xB9\xD5" => "\xEB\xB0\x8C",
+ "\xB9\xD6" => "\xEB\xB0\x8D",
+ "\xB9\xD7" => "\xEB\xB0\x8F",
+ "\xB9\xD8" => "\xEB\xB0\x91",
+ "\xB9\xD9" => "\xEB\xB0\x94",
+ "\xB9\xDA" => "\xEB\xB0\x95",
+ "\xB9\xDB" => "\xEB\xB0\x96",
+ "\xB9\xDC" => "\xEB\xB0\x97",
+ "\xB9\xDD" => "\xEB\xB0\x98",
+ "\xB9\xDE" => "\xEB\xB0\x9B",
+ "\xB9\xDF" => "\xEB\xB0\x9C",
+ "\xB9\xE0" => "\xEB\xB0\x9D",
+ "\xB9\xE1" => "\xEB\xB0\x9E",
+ "\xB9\xE2" => "\xEB\xB0\x9F",
+ "\xB9\xE3" => "\xEB\xB0\xA4",
+ "\xB9\xE4" => "\xEB\xB0\xA5",
+ "\xB9\xE5" => "\xEB\xB0\xA7",
+ "\xB9\xE6" => "\xEB\xB0\xA9",
+ "\xB9\xE7" => "\xEB\xB0\xAD",
+ "\xB9\xE8" => "\xEB\xB0\xB0",
+ "\xB9\xE9" => "\xEB\xB0\xB1",
+ "\xB9\xEA" => "\xEB\xB0\xB4",
+ "\xB9\xEB" => "\xEB\xB0\xB8",
+ "\xB9\xEC" => "\xEB\xB1\x80",
+ "\xB9\xED" => "\xEB\xB1\x81",
+ "\xB9\xEE" => "\xEB\xB1\x83",
+ "\xB9\xEF" => "\xEB\xB1\x84",
+ "\xB9\xF0" => "\xEB\xB1\x85",
+ "\xB9\xF1" => "\xEB\xB1\x89",
+ "\xB9\xF2" => "\xEB\xB1\x8C",
+ "\xB9\xF3" => "\xEB\xB1\x8D",
+ "\xB9\xF4" => "\xEB\xB1\x90",
+ "\xB9\xF5" => "\xEB\xB1\x9D",
+ "\xB9\xF6" => "\xEB\xB2\x84",
+ "\xB9\xF7" => "\xEB\xB2\x85",
+ "\xB9\xF8" => "\xEB\xB2\x88",
+ "\xB9\xF9" => "\xEB\xB2\x8B",
+ "\xB9\xFA" => "\xEB\xB2\x8C",
+ "\xB9\xFB" => "\xEB\xB2\x8E",
+ "\xB9\xFC" => "\xEB\xB2\x94",
+ "\xB9\xFD" => "\xEB\xB2\x95",
+ "\xB9\xFE" => "\xEB\xB2\x97",
+ "\xBA\x41" => "\xED\x8A\x8D",
+ "\xBA\x42" => "\xED\x8A\x8E",
+ "\xBA\x43" => "\xED\x8A\x8F",
+ "\xBA\x44" => "\xED\x8A\x92",
+ "\xBA\x45" => "\xED\x8A\x93",
+ "\xBA\x46" => "\xED\x8A\x94",
+ "\xBA\x47" => "\xED\x8A\x96",
+ "\xBA\x48" => "\xED\x8A\x97",
+ "\xBA\x49" => "\xED\x8A\x98",
+ "\xBA\x4A" => "\xED\x8A\x99",
+ "\xBA\x4B" => "\xED\x8A\x9A",
+ "\xBA\x4C" => "\xED\x8A\x9B",
+ "\xBA\x4D" => "\xED\x8A\x9D",
+ "\xBA\x4E" => "\xED\x8A\x9E",
+ "\xBA\x4F" => "\xED\x8A\x9F",
+ "\xBA\x50" => "\xED\x8A\xA1",
+ "\xBA\x51" => "\xED\x8A\xA2",
+ "\xBA\x52" => "\xED\x8A\xA3",
+ "\xBA\x53" => "\xED\x8A\xA5",
+ "\xBA\x54" => "\xED\x8A\xA6",
+ "\xBA\x55" => "\xED\x8A\xA7",
+ "\xBA\x56" => "\xED\x8A\xA8",
+ "\xBA\x57" => "\xED\x8A\xA9",
+ "\xBA\x58" => "\xED\x8A\xAA",
+ "\xBA\x59" => "\xED\x8A\xAB",
+ "\xBA\x5A" => "\xED\x8A\xAD",
+ "\xBA\x61" => "\xED\x8A\xAE",
+ "\xBA\x62" => "\xED\x8A\xAF",
+ "\xBA\x63" => "\xED\x8A\xB0",
+ "\xBA\x64" => "\xED\x8A\xB2",
+ "\xBA\x65" => "\xED\x8A\xB3",
+ "\xBA\x66" => "\xED\x8A\xB4",
+ "\xBA\x67" => "\xED\x8A\xB5",
+ "\xBA\x68" => "\xED\x8A\xB6",
+ "\xBA\x69" => "\xED\x8A\xB7",
+ "\xBA\x6A" => "\xED\x8A\xBA",
+ "\xBA\x6B" => "\xED\x8A\xBB",
+ "\xBA\x6C" => "\xED\x8A\xBD",
+ "\xBA\x6D" => "\xED\x8A\xBE",
+ "\xBA\x6E" => "\xED\x8B\x81",
+ "\xBA\x6F" => "\xED\x8B\x83",
+ "\xBA\x70" => "\xED\x8B\x84",
+ "\xBA\x71" => "\xED\x8B\x85",
+ "\xBA\x72" => "\xED\x8B\x86",
+ "\xBA\x73" => "\xED\x8B\x87",
+ "\xBA\x74" => "\xED\x8B\x8A",
+ "\xBA\x75" => "\xED\x8B\x8C",
+ "\xBA\x76" => "\xED\x8B\x8D",
+ "\xBA\x77" => "\xED\x8B\x8E",
+ "\xBA\x78" => "\xED\x8B\x8F",
+ "\xBA\x79" => "\xED\x8B\x90",
+ "\xBA\x7A" => "\xED\x8B\x91",
+ "\xBA\x81" => "\xED\x8B\x92",
+ "\xBA\x82" => "\xED\x8B\x93",
+ "\xBA\x83" => "\xED\x8B\x95",
+ "\xBA\x84" => "\xED\x8B\x96",
+ "\xBA\x85" => "\xED\x8B\x97",
+ "\xBA\x86" => "\xED\x8B\x99",
+ "\xBA\x87" => "\xED\x8B\x9A",
+ "\xBA\x88" => "\xED\x8B\x9B",
+ "\xBA\x89" => "\xED\x8B\x9D",
+ "\xBA\x8A" => "\xED\x8B\x9E",
+ "\xBA\x8B" => "\xED\x8B\x9F",
+ "\xBA\x8C" => "\xED\x8B\xA0",
+ "\xBA\x8D" => "\xED\x8B\xA1",
+ "\xBA\x8E" => "\xED\x8B\xA2",
+ "\xBA\x8F" => "\xED\x8B\xA3",
+ "\xBA\x90" => "\xED\x8B\xA6",
+ "\xBA\x91" => "\xED\x8B\xA7",
+ "\xBA\x92" => "\xED\x8B\xA8",
+ "\xBA\x93" => "\xED\x8B\xA9",
+ "\xBA\x94" => "\xED\x8B\xAA",
+ "\xBA\x95" => "\xED\x8B\xAB",
+ "\xBA\x96" => "\xED\x8B\xAC",
+ "\xBA\x97" => "\xED\x8B\xAD",
+ "\xBA\x98" => "\xED\x8B\xAE",
+ "\xBA\x99" => "\xED\x8B\xAF",
+ "\xBA\x9A" => "\xED\x8B\xB2",
+ "\xBA\x9B" => "\xED\x8B\xB3",
+ "\xBA\x9C" => "\xED\x8B\xB5",
+ "\xBA\x9D" => "\xED\x8B\xB6",
+ "\xBA\x9E" => "\xED\x8B\xB7",
+ "\xBA\x9F" => "\xED\x8B\xB9",
+ "\xBA\xA0" => "\xED\x8B\xBA",
+ "\xBA\xA1" => "\xEB\xB2\x99",
+ "\xBA\xA2" => "\xEB\xB2\x9A",
+ "\xBA\xA3" => "\xEB\xB2\xA0",
+ "\xBA\xA4" => "\xEB\xB2\xA1",
+ "\xBA\xA5" => "\xEB\xB2\xA4",
+ "\xBA\xA6" => "\xEB\xB2\xA7",
+ "\xBA\xA7" => "\xEB\xB2\xA8",
+ "\xBA\xA8" => "\xEB\xB2\xB0",
+ "\xBA\xA9" => "\xEB\xB2\xB1",
+ "\xBA\xAA" => "\xEB\xB2\xB3",
+ "\xBA\xAB" => "\xEB\xB2\xB4",
+ "\xBA\xAC" => "\xEB\xB2\xB5",
+ "\xBA\xAD" => "\xEB\xB2\xBC",
+ "\xBA\xAE" => "\xEB\xB2\xBD",
+ "\xBA\xAF" => "\xEB\xB3\x80",
+ "\xBA\xB0" => "\xEB\xB3\x84",
+ "\xBA\xB1" => "\xEB\xB3\x8D",
+ "\xBA\xB2" => "\xEB\xB3\x8F",
+ "\xBA\xB3" => "\xEB\xB3\x90",
+ "\xBA\xB4" => "\xEB\xB3\x91",
+ "\xBA\xB5" => "\xEB\xB3\x95",
+ "\xBA\xB6" => "\xEB\xB3\x98",
+ "\xBA\xB7" => "\xEB\xB3\x9C",
+ "\xBA\xB8" => "\xEB\xB3\xB4",
+ "\xBA\xB9" => "\xEB\xB3\xB5",
+ "\xBA\xBA" => "\xEB\xB3\xB6",
+ "\xBA\xBB" => "\xEB\xB3\xB8",
+ "\xBA\xBC" => "\xEB\xB3\xBC",
+ "\xBA\xBD" => "\xEB\xB4\x84",
+ "\xBA\xBE" => "\xEB\xB4\x85",
+ "\xBA\xBF" => "\xEB\xB4\x87",
+ "\xBA\xC0" => "\xEB\xB4\x89",
+ "\xBA\xC1" => "\xEB\xB4\x90",
+ "\xBA\xC2" => "\xEB\xB4\x94",
+ "\xBA\xC3" => "\xEB\xB4\xA4",
+ "\xBA\xC4" => "\xEB\xB4\xAC",
+ "\xBA\xC5" => "\xEB\xB5\x80",
+ "\xBA\xC6" => "\xEB\xB5\x88",
+ "\xBA\xC7" => "\xEB\xB5\x89",
+ "\xBA\xC8" => "\xEB\xB5\x8C",
+ "\xBA\xC9" => "\xEB\xB5\x90",
+ "\xBA\xCA" => "\xEB\xB5\x98",
+ "\xBA\xCB" => "\xEB\xB5\x99",
+ "\xBA\xCC" => "\xEB\xB5\xA4",
+ "\xBA\xCD" => "\xEB\xB5\xA8",
+ "\xBA\xCE" => "\xEB\xB6\x80",
+ "\xBA\xCF" => "\xEB\xB6\x81",
+ "\xBA\xD0" => "\xEB\xB6\x84",
+ "\xBA\xD1" => "\xEB\xB6\x87",
+ "\xBA\xD2" => "\xEB\xB6\x88",
+ "\xBA\xD3" => "\xEB\xB6\x89",
+ "\xBA\xD4" => "\xEB\xB6\x8A",
+ "\xBA\xD5" => "\xEB\xB6\x90",
+ "\xBA\xD6" => "\xEB\xB6\x91",
+ "\xBA\xD7" => "\xEB\xB6\x93",
+ "\xBA\xD8" => "\xEB\xB6\x95",
+ "\xBA\xD9" => "\xEB\xB6\x99",
+ "\xBA\xDA" => "\xEB\xB6\x9A",
+ "\xBA\xDB" => "\xEB\xB6\x9C",
+ "\xBA\xDC" => "\xEB\xB6\xA4",
+ "\xBA\xDD" => "\xEB\xB6\xB0",
+ "\xBA\xDE" => "\xEB\xB6\xB8",
+ "\xBA\xDF" => "\xEB\xB7\x94",
+ "\xBA\xE0" => "\xEB\xB7\x95",
+ "\xBA\xE1" => "\xEB\xB7\x98",
+ "\xBA\xE2" => "\xEB\xB7\x9C",
+ "\xBA\xE3" => "\xEB\xB7\xA9",
+ "\xBA\xE4" => "\xEB\xB7\xB0",
+ "\xBA\xE5" => "\xEB\xB7\xB4",
+ "\xBA\xE6" => "\xEB\xB7\xB8",
+ "\xBA\xE7" => "\xEB\xB8\x80",
+ "\xBA\xE8" => "\xEB\xB8\x83",
+ "\xBA\xE9" => "\xEB\xB8\x85",
+ "\xBA\xEA" => "\xEB\xB8\x8C",
+ "\xBA\xEB" => "\xEB\xB8\x8D",
+ "\xBA\xEC" => "\xEB\xB8\x90",
+ "\xBA\xED" => "\xEB\xB8\x94",
+ "\xBA\xEE" => "\xEB\xB8\x9C",
+ "\xBA\xEF" => "\xEB\xB8\x9D",
+ "\xBA\xF0" => "\xEB\xB8\x9F",
+ "\xBA\xF1" => "\xEB\xB9\x84",
+ "\xBA\xF2" => "\xEB\xB9\x85",
+ "\xBA\xF3" => "\xEB\xB9\x88",
+ "\xBA\xF4" => "\xEB\xB9\x8C",
+ "\xBA\xF5" => "\xEB\xB9\x8E",
+ "\xBA\xF6" => "\xEB\xB9\x94",
+ "\xBA\xF7" => "\xEB\xB9\x95",
+ "\xBA\xF8" => "\xEB\xB9\x97",
+ "\xBA\xF9" => "\xEB\xB9\x99",
+ "\xBA\xFA" => "\xEB\xB9\x9A",
+ "\xBA\xFB" => "\xEB\xB9\x9B",
+ "\xBA\xFC" => "\xEB\xB9\xA0",
+ "\xBA\xFD" => "\xEB\xB9\xA1",
+ "\xBA\xFE" => "\xEB\xB9\xA4",
+ "\xBB\x41" => "\xED\x8B\xBB",
+ "\xBB\x42" => "\xED\x8B\xBC",
+ "\xBB\x43" => "\xED\x8B\xBD",
+ "\xBB\x44" => "\xED\x8B\xBE",
+ "\xBB\x45" => "\xED\x8B\xBF",
+ "\xBB\x46" => "\xED\x8C\x82",
+ "\xBB\x47" => "\xED\x8C\x84",
+ "\xBB\x48" => "\xED\x8C\x86",
+ "\xBB\x49" => "\xED\x8C\x87",
+ "\xBB\x4A" => "\xED\x8C\x88",
+ "\xBB\x4B" => "\xED\x8C\x89",
+ "\xBB\x4C" => "\xED\x8C\x8A",
+ "\xBB\x4D" => "\xED\x8C\x8B",
+ "\xBB\x4E" => "\xED\x8C\x8F",
+ "\xBB\x4F" => "\xED\x8C\x91",
+ "\xBB\x50" => "\xED\x8C\x92",
+ "\xBB\x51" => "\xED\x8C\x93",
+ "\xBB\x52" => "\xED\x8C\x95",
+ "\xBB\x53" => "\xED\x8C\x97",
+ "\xBB\x54" => "\xED\x8C\x98",
+ "\xBB\x55" => "\xED\x8C\x99",
+ "\xBB\x56" => "\xED\x8C\x9A",
+ "\xBB\x57" => "\xED\x8C\x9B",
+ "\xBB\x58" => "\xED\x8C\x9E",
+ "\xBB\x59" => "\xED\x8C\xA2",
+ "\xBB\x5A" => "\xED\x8C\xA3",
+ "\xBB\x61" => "\xED\x8C\xA4",
+ "\xBB\x62" => "\xED\x8C\xA6",
+ "\xBB\x63" => "\xED\x8C\xA7",
+ "\xBB\x64" => "\xED\x8C\xAA",
+ "\xBB\x65" => "\xED\x8C\xAB",
+ "\xBB\x66" => "\xED\x8C\xAD",
+ "\xBB\x67" => "\xED\x8C\xAE",
+ "\xBB\x68" => "\xED\x8C\xAF",
+ "\xBB\x69" => "\xED\x8C\xB1",
+ "\xBB\x6A" => "\xED\x8C\xB2",
+ "\xBB\x6B" => "\xED\x8C\xB3",
+ "\xBB\x6C" => "\xED\x8C\xB4",
+ "\xBB\x6D" => "\xED\x8C\xB5",
+ "\xBB\x6E" => "\xED\x8C\xB6",
+ "\xBB\x6F" => "\xED\x8C\xB7",
+ "\xBB\x70" => "\xED\x8C\xBA",
+ "\xBB\x71" => "\xED\x8C\xBE",
+ "\xBB\x72" => "\xED\x8C\xBF",
+ "\xBB\x73" => "\xED\x8D\x80",
+ "\xBB\x74" => "\xED\x8D\x81",
+ "\xBB\x75" => "\xED\x8D\x82",
+ "\xBB\x76" => "\xED\x8D\x83",
+ "\xBB\x77" => "\xED\x8D\x86",
+ "\xBB\x78" => "\xED\x8D\x87",
+ "\xBB\x79" => "\xED\x8D\x88",
+ "\xBB\x7A" => "\xED\x8D\x89",
+ "\xBB\x81" => "\xED\x8D\x8A",
+ "\xBB\x82" => "\xED\x8D\x8B",
+ "\xBB\x83" => "\xED\x8D\x8C",
+ "\xBB\x84" => "\xED\x8D\x8D",
+ "\xBB\x85" => "\xED\x8D\x8E",
+ "\xBB\x86" => "\xED\x8D\x8F",
+ "\xBB\x87" => "\xED\x8D\x90",
+ "\xBB\x88" => "\xED\x8D\x91",
+ "\xBB\x89" => "\xED\x8D\x92",
+ "\xBB\x8A" => "\xED\x8D\x93",
+ "\xBB\x8B" => "\xED\x8D\x94",
+ "\xBB\x8C" => "\xED\x8D\x95",
+ "\xBB\x8D" => "\xED\x8D\x96",
+ "\xBB\x8E" => "\xED\x8D\x97",
+ "\xBB\x8F" => "\xED\x8D\x98",
+ "\xBB\x90" => "\xED\x8D\x99",
+ "\xBB\x91" => "\xED\x8D\x9A",
+ "\xBB\x92" => "\xED\x8D\x9B",
+ "\xBB\x93" => "\xED\x8D\x9C",
+ "\xBB\x94" => "\xED\x8D\x9D",
+ "\xBB\x95" => "\xED\x8D\x9E",
+ "\xBB\x96" => "\xED\x8D\x9F",
+ "\xBB\x97" => "\xED\x8D\xA0",
+ "\xBB\x98" => "\xED\x8D\xA1",
+ "\xBB\x99" => "\xED\x8D\xA2",
+ "\xBB\x9A" => "\xED\x8D\xA3",
+ "\xBB\x9B" => "\xED\x8D\xA4",
+ "\xBB\x9C" => "\xED\x8D\xA5",
+ "\xBB\x9D" => "\xED\x8D\xA6",
+ "\xBB\x9E" => "\xED\x8D\xA7",
+ "\xBB\x9F" => "\xED\x8D\xA8",
+ "\xBB\xA0" => "\xED\x8D\xA9",
+ "\xBB\xA1" => "\xEB\xB9\xA8",
+ "\xBB\xA2" => "\xEB\xB9\xAA",
+ "\xBB\xA3" => "\xEB\xB9\xB0",
+ "\xBB\xA4" => "\xEB\xB9\xB1",
+ "\xBB\xA5" => "\xEB\xB9\xB3",
+ "\xBB\xA6" => "\xEB\xB9\xB4",
+ "\xBB\xA7" => "\xEB\xB9\xB5",
+ "\xBB\xA8" => "\xEB\xB9\xBB",
+ "\xBB\xA9" => "\xEB\xB9\xBC",
+ "\xBB\xAA" => "\xEB\xB9\xBD",
+ "\xBB\xAB" => "\xEB\xBA\x80",
+ "\xBB\xAC" => "\xEB\xBA\x84",
+ "\xBB\xAD" => "\xEB\xBA\x8C",
+ "\xBB\xAE" => "\xEB\xBA\x8D",
+ "\xBB\xAF" => "\xEB\xBA\x8F",
+ "\xBB\xB0" => "\xEB\xBA\x90",
+ "\xBB\xB1" => "\xEB\xBA\x91",
+ "\xBB\xB2" => "\xEB\xBA\x98",
+ "\xBB\xB3" => "\xEB\xBA\x99",
+ "\xBB\xB4" => "\xEB\xBA\xA8",
+ "\xBB\xB5" => "\xEB\xBB\x90",
+ "\xBB\xB6" => "\xEB\xBB\x91",
+ "\xBB\xB7" => "\xEB\xBB\x94",
+ "\xBB\xB8" => "\xEB\xBB\x97",
+ "\xBB\xB9" => "\xEB\xBB\x98",
+ "\xBB\xBA" => "\xEB\xBB\xA0",
+ "\xBB\xBB" => "\xEB\xBB\xA3",
+ "\xBB\xBC" => "\xEB\xBB\xA4",
+ "\xBB\xBD" => "\xEB\xBB\xA5",
+ "\xBB\xBE" => "\xEB\xBB\xAC",
+ "\xBB\xBF" => "\xEB\xBC\x81",
+ "\xBB\xC0" => "\xEB\xBC\x88",
+ "\xBB\xC1" => "\xEB\xBC\x89",
+ "\xBB\xC2" => "\xEB\xBC\x98",
+ "\xBB\xC3" => "\xEB\xBC\x99",
+ "\xBB\xC4" => "\xEB\xBC\x9B",
+ "\xBB\xC5" => "\xEB\xBC\x9C",
+ "\xBB\xC6" => "\xEB\xBC\x9D",
+ "\xBB\xC7" => "\xEB\xBD\x80",
+ "\xBB\xC8" => "\xEB\xBD\x81",
+ "\xBB\xC9" => "\xEB\xBD\x84",
+ "\xBB\xCA" => "\xEB\xBD\x88",
+ "\xBB\xCB" => "\xEB\xBD\x90",
+ "\xBB\xCC" => "\xEB\xBD\x91",
+ "\xBB\xCD" => "\xEB\xBD\x95",
+ "\xBB\xCE" => "\xEB\xBE\x94",
+ "\xBB\xCF" => "\xEB\xBE\xB0",
+ "\xBB\xD0" => "\xEB\xBF\x85",
+ "\xBB\xD1" => "\xEB\xBF\x8C",
+ "\xBB\xD2" => "\xEB\xBF\x8D",
+ "\xBB\xD3" => "\xEB\xBF\x90",
+ "\xBB\xD4" => "\xEB\xBF\x94",
+ "\xBB\xD5" => "\xEB\xBF\x9C",
+ "\xBB\xD6" => "\xEB\xBF\x9F",
+ "\xBB\xD7" => "\xEB\xBF\xA1",
+ "\xBB\xD8" => "\xEC\x80\xBC",
+ "\xBB\xD9" => "\xEC\x81\x91",
+ "\xBB\xDA" => "\xEC\x81\x98",
+ "\xBB\xDB" => "\xEC\x81\x9C",
+ "\xBB\xDC" => "\xEC\x81\xA0",
+ "\xBB\xDD" => "\xEC\x81\xA8",
+ "\xBB\xDE" => "\xEC\x81\xA9",
+ "\xBB\xDF" => "\xEC\x82\x90",
+ "\xBB\xE0" => "\xEC\x82\x91",
+ "\xBB\xE1" => "\xEC\x82\x94",
+ "\xBB\xE2" => "\xEC\x82\x98",
+ "\xBB\xE3" => "\xEC\x82\xA0",
+ "\xBB\xE4" => "\xEC\x82\xA1",
+ "\xBB\xE5" => "\xEC\x82\xA3",
+ "\xBB\xE6" => "\xEC\x82\xA5",
+ "\xBB\xE7" => "\xEC\x82\xAC",
+ "\xBB\xE8" => "\xEC\x82\xAD",
+ "\xBB\xE9" => "\xEC\x82\xAF",
+ "\xBB\xEA" => "\xEC\x82\xB0",
+ "\xBB\xEB" => "\xEC\x82\xB3",
+ "\xBB\xEC" => "\xEC\x82\xB4",
+ "\xBB\xED" => "\xEC\x82\xB5",
+ "\xBB\xEE" => "\xEC\x82\xB6",
+ "\xBB\xEF" => "\xEC\x82\xBC",
+ "\xBB\xF0" => "\xEC\x82\xBD",
+ "\xBB\xF1" => "\xEC\x82\xBF",
+ "\xBB\xF2" => "\xEC\x83\x80",
+ "\xBB\xF3" => "\xEC\x83\x81",
+ "\xBB\xF4" => "\xEC\x83\x85",
+ "\xBB\xF5" => "\xEC\x83\x88",
+ "\xBB\xF6" => "\xEC\x83\x89",
+ "\xBB\xF7" => "\xEC\x83\x8C",
+ "\xBB\xF8" => "\xEC\x83\x90",
+ "\xBB\xF9" => "\xEC\x83\x98",
+ "\xBB\xFA" => "\xEC\x83\x99",
+ "\xBB\xFB" => "\xEC\x83\x9B",
+ "\xBB\xFC" => "\xEC\x83\x9C",
+ "\xBB\xFD" => "\xEC\x83\x9D",
+ "\xBB\xFE" => "\xEC\x83\xA4",
+ "\xBC\x41" => "\xED\x8D\xAA",
+ "\xBC\x42" => "\xED\x8D\xAB",
+ "\xBC\x43" => "\xED\x8D\xAC",
+ "\xBC\x44" => "\xED\x8D\xAD",
+ "\xBC\x45" => "\xED\x8D\xAE",
+ "\xBC\x46" => "\xED\x8D\xAF",
+ "\xBC\x47" => "\xED\x8D\xB0",
+ "\xBC\x48" => "\xED\x8D\xB1",
+ "\xBC\x49" => "\xED\x8D\xB2",
+ "\xBC\x4A" => "\xED\x8D\xB3",
+ "\xBC\x4B" => "\xED\x8D\xB4",
+ "\xBC\x4C" => "\xED\x8D\xB5",
+ "\xBC\x4D" => "\xED\x8D\xB6",
+ "\xBC\x4E" => "\xED\x8D\xB7",
+ "\xBC\x4F" => "\xED\x8D\xB8",
+ "\xBC\x50" => "\xED\x8D\xB9",
+ "\xBC\x51" => "\xED\x8D\xBA",
+ "\xBC\x52" => "\xED\x8D\xBB",
+ "\xBC\x53" => "\xED\x8D\xBE",
+ "\xBC\x54" => "\xED\x8D\xBF",
+ "\xBC\x55" => "\xED\x8E\x81",
+ "\xBC\x56" => "\xED\x8E\x82",
+ "\xBC\x57" => "\xED\x8E\x83",
+ "\xBC\x58" => "\xED\x8E\x85",
+ "\xBC\x59" => "\xED\x8E\x86",
+ "\xBC\x5A" => "\xED\x8E\x87",
+ "\xBC\x61" => "\xED\x8E\x88",
+ "\xBC\x62" => "\xED\x8E\x89",
+ "\xBC\x63" => "\xED\x8E\x8A",
+ "\xBC\x64" => "\xED\x8E\x8B",
+ "\xBC\x65" => "\xED\x8E\x8E",
+ "\xBC\x66" => "\xED\x8E\x92",
+ "\xBC\x67" => "\xED\x8E\x93",
+ "\xBC\x68" => "\xED\x8E\x94",
+ "\xBC\x69" => "\xED\x8E\x95",
+ "\xBC\x6A" => "\xED\x8E\x96",
+ "\xBC\x6B" => "\xED\x8E\x97",
+ "\xBC\x6C" => "\xED\x8E\x9A",
+ "\xBC\x6D" => "\xED\x8E\x9B",
+ "\xBC\x6E" => "\xED\x8E\x9D",
+ "\xBC\x6F" => "\xED\x8E\x9E",
+ "\xBC\x70" => "\xED\x8E\x9F",
+ "\xBC\x71" => "\xED\x8E\xA1",
+ "\xBC\x72" => "\xED\x8E\xA2",
+ "\xBC\x73" => "\xED\x8E\xA3",
+ "\xBC\x74" => "\xED\x8E\xA4",
+ "\xBC\x75" => "\xED\x8E\xA5",
+ "\xBC\x76" => "\xED\x8E\xA6",
+ "\xBC\x77" => "\xED\x8E\xA7",
+ "\xBC\x78" => "\xED\x8E\xAA",
+ "\xBC\x79" => "\xED\x8E\xAC",
+ "\xBC\x7A" => "\xED\x8E\xAE",
+ "\xBC\x81" => "\xED\x8E\xAF",
+ "\xBC\x82" => "\xED\x8E\xB0",
+ "\xBC\x83" => "\xED\x8E\xB1",
+ "\xBC\x84" => "\xED\x8E\xB2",
+ "\xBC\x85" => "\xED\x8E\xB3",
+ "\xBC\x86" => "\xED\x8E\xB5",
+ "\xBC\x87" => "\xED\x8E\xB6",
+ "\xBC\x88" => "\xED\x8E\xB7",
+ "\xBC\x89" => "\xED\x8E\xB9",
+ "\xBC\x8A" => "\xED\x8E\xBA",
+ "\xBC\x8B" => "\xED\x8E\xBB",
+ "\xBC\x8C" => "\xED\x8E\xBD",
+ "\xBC\x8D" => "\xED\x8E\xBE",
+ "\xBC\x8E" => "\xED\x8E\xBF",
+ "\xBC\x8F" => "\xED\x8F\x80",
+ "\xBC\x90" => "\xED\x8F\x81",
+ "\xBC\x91" => "\xED\x8F\x82",
+ "\xBC\x92" => "\xED\x8F\x83",
+ "\xBC\x93" => "\xED\x8F\x86",
+ "\xBC\x94" => "\xED\x8F\x87",
+ "\xBC\x95" => "\xED\x8F\x8A",
+ "\xBC\x96" => "\xED\x8F\x8B",
+ "\xBC\x97" => "\xED\x8F\x8C",
+ "\xBC\x98" => "\xED\x8F\x8D",
+ "\xBC\x99" => "\xED\x8F\x8E",
+ "\xBC\x9A" => "\xED\x8F\x8F",
+ "\xBC\x9B" => "\xED\x8F\x91",
+ "\xBC\x9C" => "\xED\x8F\x92",
+ "\xBC\x9D" => "\xED\x8F\x93",
+ "\xBC\x9E" => "\xED\x8F\x94",
+ "\xBC\x9F" => "\xED\x8F\x95",
+ "\xBC\xA0" => "\xED\x8F\x96",
+ "\xBC\xA1" => "\xEC\x83\xA5",
+ "\xBC\xA2" => "\xEC\x83\xA8",
+ "\xBC\xA3" => "\xEC\x83\xAC",
+ "\xBC\xA4" => "\xEC\x83\xB4",
+ "\xBC\xA5" => "\xEC\x83\xB5",
+ "\xBC\xA6" => "\xEC\x83\xB7",
+ "\xBC\xA7" => "\xEC\x83\xB9",
+ "\xBC\xA8" => "\xEC\x84\x80",
+ "\xBC\xA9" => "\xEC\x84\x84",
+ "\xBC\xAA" => "\xEC\x84\x88",
+ "\xBC\xAB" => "\xEC\x84\x90",
+ "\xBC\xAC" => "\xEC\x84\x95",
+ "\xBC\xAD" => "\xEC\x84\x9C",
+ "\xBC\xAE" => "\xEC\x84\x9D",
+ "\xBC\xAF" => "\xEC\x84\x9E",
+ "\xBC\xB0" => "\xEC\x84\x9F",
+ "\xBC\xB1" => "\xEC\x84\xA0",
+ "\xBC\xB2" => "\xEC\x84\xA3",
+ "\xBC\xB3" => "\xEC\x84\xA4",
+ "\xBC\xB4" => "\xEC\x84\xA6",
+ "\xBC\xB5" => "\xEC\x84\xA7",
+ "\xBC\xB6" => "\xEC\x84\xAC",
+ "\xBC\xB7" => "\xEC\x84\xAD",
+ "\xBC\xB8" => "\xEC\x84\xAF",
+ "\xBC\xB9" => "\xEC\x84\xB0",
+ "\xBC\xBA" => "\xEC\x84\xB1",
+ "\xBC\xBB" => "\xEC\x84\xB6",
+ "\xBC\xBC" => "\xEC\x84\xB8",
+ "\xBC\xBD" => "\xEC\x84\xB9",
+ "\xBC\xBE" => "\xEC\x84\xBC",
+ "\xBC\xBF" => "\xEC\x85\x80",
+ "\xBC\xC0" => "\xEC\x85\x88",
+ "\xBC\xC1" => "\xEC\x85\x89",
+ "\xBC\xC2" => "\xEC\x85\x8B",
+ "\xBC\xC3" => "\xEC\x85\x8C",
+ "\xBC\xC4" => "\xEC\x85\x8D",
+ "\xBC\xC5" => "\xEC\x85\x94",
+ "\xBC\xC6" => "\xEC\x85\x95",
+ "\xBC\xC7" => "\xEC\x85\x98",
+ "\xBC\xC8" => "\xEC\x85\x9C",
+ "\xBC\xC9" => "\xEC\x85\xA4",
+ "\xBC\xCA" => "\xEC\x85\xA5",
+ "\xBC\xCB" => "\xEC\x85\xA7",
+ "\xBC\xCC" => "\xEC\x85\xA8",
+ "\xBC\xCD" => "\xEC\x85\xA9",
+ "\xBC\xCE" => "\xEC\x85\xB0",
+ "\xBC\xCF" => "\xEC\x85\xB4",
+ "\xBC\xD0" => "\xEC\x85\xB8",
+ "\xBC\xD1" => "\xEC\x86\x85",
+ "\xBC\xD2" => "\xEC\x86\x8C",
+ "\xBC\xD3" => "\xEC\x86\x8D",
+ "\xBC\xD4" => "\xEC\x86\x8E",
+ "\xBC\xD5" => "\xEC\x86\x90",
+ "\xBC\xD6" => "\xEC\x86\x94",
+ "\xBC\xD7" => "\xEC\x86\x96",
+ "\xBC\xD8" => "\xEC\x86\x9C",
+ "\xBC\xD9" => "\xEC\x86\x9D",
+ "\xBC\xDA" => "\xEC\x86\x9F",
+ "\xBC\xDB" => "\xEC\x86\xA1",
+ "\xBC\xDC" => "\xEC\x86\xA5",
+ "\xBC\xDD" => "\xEC\x86\xA8",
+ "\xBC\xDE" => "\xEC\x86\xA9",
+ "\xBC\xDF" => "\xEC\x86\xAC",
+ "\xBC\xE0" => "\xEC\x86\xB0",
+ "\xBC\xE1" => "\xEC\x86\xBD",
+ "\xBC\xE2" => "\xEC\x87\x84",
+ "\xBC\xE3" => "\xEC\x87\x88",
+ "\xBC\xE4" => "\xEC\x87\x8C",
+ "\xBC\xE5" => "\xEC\x87\x94",
+ "\xBC\xE6" => "\xEC\x87\x97",
+ "\xBC\xE7" => "\xEC\x87\x98",
+ "\xBC\xE8" => "\xEC\x87\xA0",
+ "\xBC\xE9" => "\xEC\x87\xA4",
+ "\xBC\xEA" => "\xEC\x87\xA8",
+ "\xBC\xEB" => "\xEC\x87\xB0",
+ "\xBC\xEC" => "\xEC\x87\xB1",
+ "\xBC\xED" => "\xEC\x87\xB3",
+ "\xBC\xEE" => "\xEC\x87\xBC",
+ "\xBC\xEF" => "\xEC\x87\xBD",
+ "\xBC\xF0" => "\xEC\x88\x80",
+ "\xBC\xF1" => "\xEC\x88\x84",
+ "\xBC\xF2" => "\xEC\x88\x8C",
+ "\xBC\xF3" => "\xEC\x88\x8D",
+ "\xBC\xF4" => "\xEC\x88\x8F",
+ "\xBC\xF5" => "\xEC\x88\x91",
+ "\xBC\xF6" => "\xEC\x88\x98",
+ "\xBC\xF7" => "\xEC\x88\x99",
+ "\xBC\xF8" => "\xEC\x88\x9C",
+ "\xBC\xF9" => "\xEC\x88\x9F",
+ "\xBC\xFA" => "\xEC\x88\xA0",
+ "\xBC\xFB" => "\xEC\x88\xA8",
+ "\xBC\xFC" => "\xEC\x88\xA9",
+ "\xBC\xFD" => "\xEC\x88\xAB",
+ "\xBC\xFE" => "\xEC\x88\xAD",
+ "\xBD\x41" => "\xED\x8F\x97",
+ "\xBD\x42" => "\xED\x8F\x99",
+ "\xBD\x43" => "\xED\x8F\x9A",
+ "\xBD\x44" => "\xED\x8F\x9B",
+ "\xBD\x45" => "\xED\x8F\x9C",
+ "\xBD\x46" => "\xED\x8F\x9D",
+ "\xBD\x47" => "\xED\x8F\x9E",
+ "\xBD\x48" => "\xED\x8F\x9F",
+ "\xBD\x49" => "\xED\x8F\xA0",
+ "\xBD\x4A" => "\xED\x8F\xA2",
+ "\xBD\x4B" => "\xED\x8F\xA4",
+ "\xBD\x4C" => "\xED\x8F\xA5",
+ "\xBD\x4D" => "\xED\x8F\xA6",
+ "\xBD\x4E" => "\xED\x8F\xA7",
+ "\xBD\x4F" => "\xED\x8F\xA8",
+ "\xBD\x50" => "\xED\x8F\xA9",
+ "\xBD\x51" => "\xED\x8F\xAA",
+ "\xBD\x52" => "\xED\x8F\xAB",
+ "\xBD\x53" => "\xED\x8F\xAE",
+ "\xBD\x54" => "\xED\x8F\xAF",
+ "\xBD\x55" => "\xED\x8F\xB1",
+ "\xBD\x56" => "\xED\x8F\xB2",
+ "\xBD\x57" => "\xED\x8F\xB3",
+ "\xBD\x58" => "\xED\x8F\xB5",
+ "\xBD\x59" => "\xED\x8F\xB6",
+ "\xBD\x5A" => "\xED\x8F\xB7",
+ "\xBD\x61" => "\xED\x8F\xB8",
+ "\xBD\x62" => "\xED\x8F\xB9",
+ "\xBD\x63" => "\xED\x8F\xBA",
+ "\xBD\x64" => "\xED\x8F\xBB",
+ "\xBD\x65" => "\xED\x8F\xBE",
+ "\xBD\x66" => "\xED\x90\x80",
+ "\xBD\x67" => "\xED\x90\x82",
+ "\xBD\x68" => "\xED\x90\x83",
+ "\xBD\x69" => "\xED\x90\x84",
+ "\xBD\x6A" => "\xED\x90\x85",
+ "\xBD\x6B" => "\xED\x90\x86",
+ "\xBD\x6C" => "\xED\x90\x87",
+ "\xBD\x6D" => "\xED\x90\x89",
+ "\xBD\x6E" => "\xED\x90\x8A",
+ "\xBD\x6F" => "\xED\x90\x8B",
+ "\xBD\x70" => "\xED\x90\x8C",
+ "\xBD\x71" => "\xED\x90\x8D",
+ "\xBD\x72" => "\xED\x90\x8E",
+ "\xBD\x73" => "\xED\x90\x8F",
+ "\xBD\x74" => "\xED\x90\x90",
+ "\xBD\x75" => "\xED\x90\x91",
+ "\xBD\x76" => "\xED\x90\x92",
+ "\xBD\x77" => "\xED\x90\x93",
+ "\xBD\x78" => "\xED\x90\x94",
+ "\xBD\x79" => "\xED\x90\x95",
+ "\xBD\x7A" => "\xED\x90\x96",
+ "\xBD\x81" => "\xED\x90\x97",
+ "\xBD\x82" => "\xED\x90\x98",
+ "\xBD\x83" => "\xED\x90\x99",
+ "\xBD\x84" => "\xED\x90\x9A",
+ "\xBD\x85" => "\xED\x90\x9B",
+ "\xBD\x86" => "\xED\x90\x9C",
+ "\xBD\x87" => "\xED\x90\x9E",
+ "\xBD\x88" => "\xED\x90\x9F",
+ "\xBD\x89" => "\xED\x90\xA0",
+ "\xBD\x8A" => "\xED\x90\xA1",
+ "\xBD\x8B" => "\xED\x90\xA2",
+ "\xBD\x8C" => "\xED\x90\xA3",
+ "\xBD\x8D" => "\xED\x90\xA4",
+ "\xBD\x8E" => "\xED\x90\xA5",
+ "\xBD\x8F" => "\xED\x90\xA6",
+ "\xBD\x90" => "\xED\x90\xA7",
+ "\xBD\x91" => "\xED\x90\xA8",
+ "\xBD\x92" => "\xED\x90\xA9",
+ "\xBD\x93" => "\xED\x90\xAA",
+ "\xBD\x94" => "\xED\x90\xAB",
+ "\xBD\x95" => "\xED\x90\xAC",
+ "\xBD\x96" => "\xED\x90\xAD",
+ "\xBD\x97" => "\xED\x90\xAE",
+ "\xBD\x98" => "\xED\x90\xAF",
+ "\xBD\x99" => "\xED\x90\xB0",
+ "\xBD\x9A" => "\xED\x90\xB1",
+ "\xBD\x9B" => "\xED\x90\xB2",
+ "\xBD\x9C" => "\xED\x90\xB3",
+ "\xBD\x9D" => "\xED\x90\xB4",
+ "\xBD\x9E" => "\xED\x90\xB5",
+ "\xBD\x9F" => "\xED\x90\xB6",
+ "\xBD\xA0" => "\xED\x90\xB7",
+ "\xBD\xA1" => "\xEC\x88\xAF",
+ "\xBD\xA2" => "\xEC\x88\xB1",
+ "\xBD\xA3" => "\xEC\x88\xB2",
+ "\xBD\xA4" => "\xEC\x88\xB4",
+ "\xBD\xA5" => "\xEC\x89\x88",
+ "\xBD\xA6" => "\xEC\x89\x90",
+ "\xBD\xA7" => "\xEC\x89\x91",
+ "\xBD\xA8" => "\xEC\x89\x94",
+ "\xBD\xA9" => "\xEC\x89\x98",
+ "\xBD\xAA" => "\xEC\x89\xA0",
+ "\xBD\xAB" => "\xEC\x89\xA5",
+ "\xBD\xAC" => "\xEC\x89\xAC",
+ "\xBD\xAD" => "\xEC\x89\xAD",
+ "\xBD\xAE" => "\xEC\x89\xB0",
+ "\xBD\xAF" => "\xEC\x89\xB4",
+ "\xBD\xB0" => "\xEC\x89\xBC",
+ "\xBD\xB1" => "\xEC\x89\xBD",
+ "\xBD\xB2" => "\xEC\x89\xBF",
+ "\xBD\xB3" => "\xEC\x8A\x81",
+ "\xBD\xB4" => "\xEC\x8A\x88",
+ "\xBD\xB5" => "\xEC\x8A\x89",
+ "\xBD\xB6" => "\xEC\x8A\x90",
+ "\xBD\xB7" => "\xEC\x8A\x98",
+ "\xBD\xB8" => "\xEC\x8A\x9B",
+ "\xBD\xB9" => "\xEC\x8A\x9D",
+ "\xBD\xBA" => "\xEC\x8A\xA4",
+ "\xBD\xBB" => "\xEC\x8A\xA5",
+ "\xBD\xBC" => "\xEC\x8A\xA8",
+ "\xBD\xBD" => "\xEC\x8A\xAC",
+ "\xBD\xBE" => "\xEC\x8A\xAD",
+ "\xBD\xBF" => "\xEC\x8A\xB4",
+ "\xBD\xC0" => "\xEC\x8A\xB5",
+ "\xBD\xC1" => "\xEC\x8A\xB7",
+ "\xBD\xC2" => "\xEC\x8A\xB9",
+ "\xBD\xC3" => "\xEC\x8B\x9C",
+ "\xBD\xC4" => "\xEC\x8B\x9D",
+ "\xBD\xC5" => "\xEC\x8B\xA0",
+ "\xBD\xC6" => "\xEC\x8B\xA3",
+ "\xBD\xC7" => "\xEC\x8B\xA4",
+ "\xBD\xC8" => "\xEC\x8B\xAB",
+ "\xBD\xC9" => "\xEC\x8B\xAC",
+ "\xBD\xCA" => "\xEC\x8B\xAD",
+ "\xBD\xCB" => "\xEC\x8B\xAF",
+ "\xBD\xCC" => "\xEC\x8B\xB1",
+ "\xBD\xCD" => "\xEC\x8B\xB6",
+ "\xBD\xCE" => "\xEC\x8B\xB8",
+ "\xBD\xCF" => "\xEC\x8B\xB9",
+ "\xBD\xD0" => "\xEC\x8B\xBB",
+ "\xBD\xD1" => "\xEC\x8B\xBC",
+ "\xBD\xD2" => "\xEC\x8C\x80",
+ "\xBD\xD3" => "\xEC\x8C\x88",
+ "\xBD\xD4" => "\xEC\x8C\x89",
+ "\xBD\xD5" => "\xEC\x8C\x8C",
+ "\xBD\xD6" => "\xEC\x8C\x8D",
+ "\xBD\xD7" => "\xEC\x8C\x93",
+ "\xBD\xD8" => "\xEC\x8C\x94",
+ "\xBD\xD9" => "\xEC\x8C\x95",
+ "\xBD\xDA" => "\xEC\x8C\x98",
+ "\xBD\xDB" => "\xEC\x8C\x9C",
+ "\xBD\xDC" => "\xEC\x8C\xA4",
+ "\xBD\xDD" => "\xEC\x8C\xA5",
+ "\xBD\xDE" => "\xEC\x8C\xA8",
+ "\xBD\xDF" => "\xEC\x8C\xA9",
+ "\xBD\xE0" => "\xEC\x8D\x85",
+ "\xBD\xE1" => "\xEC\x8D\xA8",
+ "\xBD\xE2" => "\xEC\x8D\xA9",
+ "\xBD\xE3" => "\xEC\x8D\xAC",
+ "\xBD\xE4" => "\xEC\x8D\xB0",
+ "\xBD\xE5" => "\xEC\x8D\xB2",
+ "\xBD\xE6" => "\xEC\x8D\xB8",
+ "\xBD\xE7" => "\xEC\x8D\xB9",
+ "\xBD\xE8" => "\xEC\x8D\xBC",
+ "\xBD\xE9" => "\xEC\x8D\xBD",
+ "\xBD\xEA" => "\xEC\x8E\x84",
+ "\xBD\xEB" => "\xEC\x8E\x88",
+ "\xBD\xEC" => "\xEC\x8E\x8C",
+ "\xBD\xED" => "\xEC\x8F\x80",
+ "\xBD\xEE" => "\xEC\x8F\x98",
+ "\xBD\xEF" => "\xEC\x8F\x99",
+ "\xBD\xF0" => "\xEC\x8F\x9C",
+ "\xBD\xF1" => "\xEC\x8F\x9F",
+ "\xBD\xF2" => "\xEC\x8F\xA0",
+ "\xBD\xF3" => "\xEC\x8F\xA2",
+ "\xBD\xF4" => "\xEC\x8F\xA8",
+ "\xBD\xF5" => "\xEC\x8F\xA9",
+ "\xBD\xF6" => "\xEC\x8F\xAD",
+ "\xBD\xF7" => "\xEC\x8F\xB4",
+ "\xBD\xF8" => "\xEC\x8F\xB5",
+ "\xBD\xF9" => "\xEC\x8F\xB8",
+ "\xBD\xFA" => "\xEC\x90\x88",
+ "\xBD\xFB" => "\xEC\x90\x90",
+ "\xBD\xFC" => "\xEC\x90\xA4",
+ "\xBD\xFD" => "\xEC\x90\xAC",
+ "\xBD\xFE" => "\xEC\x90\xB0",
+ "\xBE\x41" => "\xED\x90\xB8",
+ "\xBE\x42" => "\xED\x90\xB9",
+ "\xBE\x43" => "\xED\x90\xBA",
+ "\xBE\x44" => "\xED\x90\xBB",
+ "\xBE\x45" => "\xED\x90\xBC",
+ "\xBE\x46" => "\xED\x90\xBD",
+ "\xBE\x47" => "\xED\x90\xBE",
+ "\xBE\x48" => "\xED\x90\xBF",
+ "\xBE\x49" => "\xED\x91\x81",
+ "\xBE\x4A" => "\xED\x91\x82",
+ "\xBE\x4B" => "\xED\x91\x83",
+ "\xBE\x4C" => "\xED\x91\x85",
+ "\xBE\x4D" => "\xED\x91\x86",
+ "\xBE\x4E" => "\xED\x91\x87",
+ "\xBE\x4F" => "\xED\x91\x88",
+ "\xBE\x50" => "\xED\x91\x89",
+ "\xBE\x51" => "\xED\x91\x8A",
+ "\xBE\x52" => "\xED\x91\x8B",
+ "\xBE\x53" => "\xED\x91\x8C",
+ "\xBE\x54" => "\xED\x91\x8D",
+ "\xBE\x55" => "\xED\x91\x8E",
+ "\xBE\x56" => "\xED\x91\x8F",
+ "\xBE\x57" => "\xED\x91\x90",
+ "\xBE\x58" => "\xED\x91\x91",
+ "\xBE\x59" => "\xED\x91\x92",
+ "\xBE\x5A" => "\xED\x91\x93",
+ "\xBE\x61" => "\xED\x91\x94",
+ "\xBE\x62" => "\xED\x91\x95",
+ "\xBE\x63" => "\xED\x91\x96",
+ "\xBE\x64" => "\xED\x91\x97",
+ "\xBE\x65" => "\xED\x91\x98",
+ "\xBE\x66" => "\xED\x91\x99",
+ "\xBE\x67" => "\xED\x91\x9A",
+ "\xBE\x68" => "\xED\x91\x9B",
+ "\xBE\x69" => "\xED\x91\x9D",
+ "\xBE\x6A" => "\xED\x91\x9E",
+ "\xBE\x6B" => "\xED\x91\x9F",
+ "\xBE\x6C" => "\xED\x91\xA1",
+ "\xBE\x6D" => "\xED\x91\xA2",
+ "\xBE\x6E" => "\xED\x91\xA3",
+ "\xBE\x6F" => "\xED\x91\xA5",
+ "\xBE\x70" => "\xED\x91\xA6",
+ "\xBE\x71" => "\xED\x91\xA7",
+ "\xBE\x72" => "\xED\x91\xA8",
+ "\xBE\x73" => "\xED\x91\xA9",
+ "\xBE\x74" => "\xED\x91\xAA",
+ "\xBE\x75" => "\xED\x91\xAB",
+ "\xBE\x76" => "\xED\x91\xAC",
+ "\xBE\x77" => "\xED\x91\xAE",
+ "\xBE\x78" => "\xED\x91\xB0",
+ "\xBE\x79" => "\xED\x91\xB1",
+ "\xBE\x7A" => "\xED\x91\xB2",
+ "\xBE\x81" => "\xED\x91\xB3",
+ "\xBE\x82" => "\xED\x91\xB4",
+ "\xBE\x83" => "\xED\x91\xB5",
+ "\xBE\x84" => "\xED\x91\xB6",
+ "\xBE\x85" => "\xED\x91\xB7",
+ "\xBE\x86" => "\xED\x91\xBA",
+ "\xBE\x87" => "\xED\x91\xBB",
+ "\xBE\x88" => "\xED\x91\xBD",
+ "\xBE\x89" => "\xED\x91\xBE",
+ "\xBE\x8A" => "\xED\x92\x81",
+ "\xBE\x8B" => "\xED\x92\x83",
+ "\xBE\x8C" => "\xED\x92\x84",
+ "\xBE\x8D" => "\xED\x92\x85",
+ "\xBE\x8E" => "\xED\x92\x86",
+ "\xBE\x8F" => "\xED\x92\x87",
+ "\xBE\x90" => "\xED\x92\x8A",
+ "\xBE\x91" => "\xED\x92\x8C",
+ "\xBE\x92" => "\xED\x92\x8E",
+ "\xBE\x93" => "\xED\x92\x8F",
+ "\xBE\x94" => "\xED\x92\x90",
+ "\xBE\x95" => "\xED\x92\x91",
+ "\xBE\x96" => "\xED\x92\x92",
+ "\xBE\x97" => "\xED\x92\x93",
+ "\xBE\x98" => "\xED\x92\x95",
+ "\xBE\x99" => "\xED\x92\x96",
+ "\xBE\x9A" => "\xED\x92\x97",
+ "\xBE\x9B" => "\xED\x92\x98",
+ "\xBE\x9C" => "\xED\x92\x99",
+ "\xBE\x9D" => "\xED\x92\x9A",
+ "\xBE\x9E" => "\xED\x92\x9B",
+ "\xBE\x9F" => "\xED\x92\x9C",
+ "\xBE\xA0" => "\xED\x92\x9D",
+ "\xBE\xA1" => "\xEC\x90\xB4",
+ "\xBE\xA2" => "\xEC\x90\xBC",
+ "\xBE\xA3" => "\xEC\x90\xBD",
+ "\xBE\xA4" => "\xEC\x91\x88",
+ "\xBE\xA5" => "\xEC\x91\xA4",
+ "\xBE\xA6" => "\xEC\x91\xA5",
+ "\xBE\xA7" => "\xEC\x91\xA8",
+ "\xBE\xA8" => "\xEC\x91\xAC",
+ "\xBE\xA9" => "\xEC\x91\xB4",
+ "\xBE\xAA" => "\xEC\x91\xB5",
+ "\xBE\xAB" => "\xEC\x91\xB9",
+ "\xBE\xAC" => "\xEC\x92\x80",
+ "\xBE\xAD" => "\xEC\x92\x94",
+ "\xBE\xAE" => "\xEC\x92\x9C",
+ "\xBE\xAF" => "\xEC\x92\xB8",
+ "\xBE\xB0" => "\xEC\x92\xBC",
+ "\xBE\xB1" => "\xEC\x93\xA9",
+ "\xBE\xB2" => "\xEC\x93\xB0",
+ "\xBE\xB3" => "\xEC\x93\xB1",
+ "\xBE\xB4" => "\xEC\x93\xB4",
+ "\xBE\xB5" => "\xEC\x93\xB8",
+ "\xBE\xB6" => "\xEC\x93\xBA",
+ "\xBE\xB7" => "\xEC\x93\xBF",
+ "\xBE\xB8" => "\xEC\x94\x80",
+ "\xBE\xB9" => "\xEC\x94\x81",
+ "\xBE\xBA" => "\xEC\x94\x8C",
+ "\xBE\xBB" => "\xEC\x94\x90",
+ "\xBE\xBC" => "\xEC\x94\x94",
+ "\xBE\xBD" => "\xEC\x94\x9C",
+ "\xBE\xBE" => "\xEC\x94\xA8",
+ "\xBE\xBF" => "\xEC\x94\xA9",
+ "\xBE\xC0" => "\xEC\x94\xAC",
+ "\xBE\xC1" => "\xEC\x94\xB0",
+ "\xBE\xC2" => "\xEC\x94\xB8",
+ "\xBE\xC3" => "\xEC\x94\xB9",
+ "\xBE\xC4" => "\xEC\x94\xBB",
+ "\xBE\xC5" => "\xEC\x94\xBD",
+ "\xBE\xC6" => "\xEC\x95\x84",
+ "\xBE\xC7" => "\xEC\x95\x85",
+ "\xBE\xC8" => "\xEC\x95\x88",
+ "\xBE\xC9" => "\xEC\x95\x89",
+ "\xBE\xCA" => "\xEC\x95\x8A",
+ "\xBE\xCB" => "\xEC\x95\x8C",
+ "\xBE\xCC" => "\xEC\x95\x8D",
+ "\xBE\xCD" => "\xEC\x95\x8E",
+ "\xBE\xCE" => "\xEC\x95\x93",
+ "\xBE\xCF" => "\xEC\x95\x94",
+ "\xBE\xD0" => "\xEC\x95\x95",
+ "\xBE\xD1" => "\xEC\x95\x97",
+ "\xBE\xD2" => "\xEC\x95\x98",
+ "\xBE\xD3" => "\xEC\x95\x99",
+ "\xBE\xD4" => "\xEC\x95\x9D",
+ "\xBE\xD5" => "\xEC\x95\x9E",
+ "\xBE\xD6" => "\xEC\x95\xA0",
+ "\xBE\xD7" => "\xEC\x95\xA1",
+ "\xBE\xD8" => "\xEC\x95\xA4",
+ "\xBE\xD9" => "\xEC\x95\xA8",
+ "\xBE\xDA" => "\xEC\x95\xB0",
+ "\xBE\xDB" => "\xEC\x95\xB1",
+ "\xBE\xDC" => "\xEC\x95\xB3",
+ "\xBE\xDD" => "\xEC\x95\xB4",
+ "\xBE\xDE" => "\xEC\x95\xB5",
+ "\xBE\xDF" => "\xEC\x95\xBC",
+ "\xBE\xE0" => "\xEC\x95\xBD",
+ "\xBE\xE1" => "\xEC\x96\x80",
+ "\xBE\xE2" => "\xEC\x96\x84",
+ "\xBE\xE3" => "\xEC\x96\x87",
+ "\xBE\xE4" => "\xEC\x96\x8C",
+ "\xBE\xE5" => "\xEC\x96\x8D",
+ "\xBE\xE6" => "\xEC\x96\x8F",
+ "\xBE\xE7" => "\xEC\x96\x91",
+ "\xBE\xE8" => "\xEC\x96\x95",
+ "\xBE\xE9" => "\xEC\x96\x97",
+ "\xBE\xEA" => "\xEC\x96\x98",
+ "\xBE\xEB" => "\xEC\x96\x9C",
+ "\xBE\xEC" => "\xEC\x96\xA0",
+ "\xBE\xED" => "\xEC\x96\xA9",
+ "\xBE\xEE" => "\xEC\x96\xB4",
+ "\xBE\xEF" => "\xEC\x96\xB5",
+ "\xBE\xF0" => "\xEC\x96\xB8",
+ "\xBE\xF1" => "\xEC\x96\xB9",
+ "\xBE\xF2" => "\xEC\x96\xBB",
+ "\xBE\xF3" => "\xEC\x96\xBC",
+ "\xBE\xF4" => "\xEC\x96\xBD",
+ "\xBE\xF5" => "\xEC\x96\xBE",
+ "\xBE\xF6" => "\xEC\x97\x84",
+ "\xBE\xF7" => "\xEC\x97\x85",
+ "\xBE\xF8" => "\xEC\x97\x86",
+ "\xBE\xF9" => "\xEC\x97\x87",
+ "\xBE\xFA" => "\xEC\x97\x88",
+ "\xBE\xFB" => "\xEC\x97\x89",
+ "\xBE\xFC" => "\xEC\x97\x8A",
+ "\xBE\xFD" => "\xEC\x97\x8C",
+ "\xBE\xFE" => "\xEC\x97\x8E",
+ "\xBF\x41" => "\xED\x92\x9E",
+ "\xBF\x42" => "\xED\x92\x9F",
+ "\xBF\x43" => "\xED\x92\xA0",
+ "\xBF\x44" => "\xED\x92\xA1",
+ "\xBF\x45" => "\xED\x92\xA2",
+ "\xBF\x46" => "\xED\x92\xA3",
+ "\xBF\x47" => "\xED\x92\xA4",
+ "\xBF\x48" => "\xED\x92\xA5",
+ "\xBF\x49" => "\xED\x92\xA6",
+ "\xBF\x4A" => "\xED\x92\xA7",
+ "\xBF\x4B" => "\xED\x92\xA8",
+ "\xBF\x4C" => "\xED\x92\xAA",
+ "\xBF\x4D" => "\xED\x92\xAB",
+ "\xBF\x4E" => "\xED\x92\xAC",
+ "\xBF\x4F" => "\xED\x92\xAD",
+ "\xBF\x50" => "\xED\x92\xAE",
+ "\xBF\x51" => "\xED\x92\xAF",
+ "\xBF\x52" => "\xED\x92\xB0",
+ "\xBF\x53" => "\xED\x92\xB1",
+ "\xBF\x54" => "\xED\x92\xB2",
+ "\xBF\x55" => "\xED\x92\xB3",
+ "\xBF\x56" => "\xED\x92\xB4",
+ "\xBF\x57" => "\xED\x92\xB5",
+ "\xBF\x58" => "\xED\x92\xB6",
+ "\xBF\x59" => "\xED\x92\xB7",
+ "\xBF\x5A" => "\xED\x92\xB8",
+ "\xBF\x61" => "\xED\x92\xB9",
+ "\xBF\x62" => "\xED\x92\xBA",
+ "\xBF\x63" => "\xED\x92\xBB",
+ "\xBF\x64" => "\xED\x92\xBC",
+ "\xBF\x65" => "\xED\x92\xBD",
+ "\xBF\x66" => "\xED\x92\xBE",
+ "\xBF\x67" => "\xED\x92\xBF",
+ "\xBF\x68" => "\xED\x93\x80",
+ "\xBF\x69" => "\xED\x93\x81",
+ "\xBF\x6A" => "\xED\x93\x82",
+ "\xBF\x6B" => "\xED\x93\x83",
+ "\xBF\x6C" => "\xED\x93\x84",
+ "\xBF\x6D" => "\xED\x93\x85",
+ "\xBF\x6E" => "\xED\x93\x86",
+ "\xBF\x6F" => "\xED\x93\x87",
+ "\xBF\x70" => "\xED\x93\x88",
+ "\xBF\x71" => "\xED\x93\x89",
+ "\xBF\x72" => "\xED\x93\x8A",
+ "\xBF\x73" => "\xED\x93\x8B",
+ "\xBF\x74" => "\xED\x93\x8D",
+ "\xBF\x75" => "\xED\x93\x8E",
+ "\xBF\x76" => "\xED\x93\x8F",
+ "\xBF\x77" => "\xED\x93\x91",
+ "\xBF\x78" => "\xED\x93\x92",
+ "\xBF\x79" => "\xED\x93\x93",
+ "\xBF\x7A" => "\xED\x93\x95",
+ "\xBF\x81" => "\xED\x93\x96",
+ "\xBF\x82" => "\xED\x93\x97",
+ "\xBF\x83" => "\xED\x93\x98",
+ "\xBF\x84" => "\xED\x93\x99",
+ "\xBF\x85" => "\xED\x93\x9A",
+ "\xBF\x86" => "\xED\x93\x9B",
+ "\xBF\x87" => "\xED\x93\x9D",
+ "\xBF\x88" => "\xED\x93\x9E",
+ "\xBF\x89" => "\xED\x93\xA0",
+ "\xBF\x8A" => "\xED\x93\xA1",
+ "\xBF\x8B" => "\xED\x93\xA2",
+ "\xBF\x8C" => "\xED\x93\xA3",
+ "\xBF\x8D" => "\xED\x93\xA4",
+ "\xBF\x8E" => "\xED\x93\xA5",
+ "\xBF\x8F" => "\xED\x93\xA6",
+ "\xBF\x90" => "\xED\x93\xA7",
+ "\xBF\x91" => "\xED\x93\xA9",
+ "\xBF\x92" => "\xED\x93\xAA",
+ "\xBF\x93" => "\xED\x93\xAB",
+ "\xBF\x94" => "\xED\x93\xAD",
+ "\xBF\x95" => "\xED\x93\xAE",
+ "\xBF\x96" => "\xED\x93\xAF",
+ "\xBF\x97" => "\xED\x93\xB1",
+ "\xBF\x98" => "\xED\x93\xB2",
+ "\xBF\x99" => "\xED\x93\xB3",
+ "\xBF\x9A" => "\xED\x93\xB4",
+ "\xBF\x9B" => "\xED\x93\xB5",
+ "\xBF\x9C" => "\xED\x93\xB6",
+ "\xBF\x9D" => "\xED\x93\xB7",
+ "\xBF\x9E" => "\xED\x93\xB9",
+ "\xBF\x9F" => "\xED\x93\xBA",
+ "\xBF\xA0" => "\xED\x93\xBC",
+ "\xBF\xA1" => "\xEC\x97\x90",
+ "\xBF\xA2" => "\xEC\x97\x91",
+ "\xBF\xA3" => "\xEC\x97\x94",
+ "\xBF\xA4" => "\xEC\x97\x98",
+ "\xBF\xA5" => "\xEC\x97\xA0",
+ "\xBF\xA6" => "\xEC\x97\xA1",
+ "\xBF\xA7" => "\xEC\x97\xA3",
+ "\xBF\xA8" => "\xEC\x97\xA5",
+ "\xBF\xA9" => "\xEC\x97\xAC",
+ "\xBF\xAA" => "\xEC\x97\xAD",
+ "\xBF\xAB" => "\xEC\x97\xAE",
+ "\xBF\xAC" => "\xEC\x97\xB0",
+ "\xBF\xAD" => "\xEC\x97\xB4",
+ "\xBF\xAE" => "\xEC\x97\xB6",
+ "\xBF\xAF" => "\xEC\x97\xB7",
+ "\xBF\xB0" => "\xEC\x97\xBC",
+ "\xBF\xB1" => "\xEC\x97\xBD",
+ "\xBF\xB2" => "\xEC\x97\xBE",
+ "\xBF\xB3" => "\xEC\x97\xBF",
+ "\xBF\xB4" => "\xEC\x98\x80",
+ "\xBF\xB5" => "\xEC\x98\x81",
+ "\xBF\xB6" => "\xEC\x98\x85",
+ "\xBF\xB7" => "\xEC\x98\x86",
+ "\xBF\xB8" => "\xEC\x98\x87",
+ "\xBF\xB9" => "\xEC\x98\x88",
+ "\xBF\xBA" => "\xEC\x98\x8C",
+ "\xBF\xBB" => "\xEC\x98\x90",
+ "\xBF\xBC" => "\xEC\x98\x98",
+ "\xBF\xBD" => "\xEC\x98\x99",
+ "\xBF\xBE" => "\xEC\x98\x9B",
+ "\xBF\xBF" => "\xEC\x98\x9C",
+ "\xBF\xC0" => "\xEC\x98\xA4",
+ "\xBF\xC1" => "\xEC\x98\xA5",
+ "\xBF\xC2" => "\xEC\x98\xA8",
+ "\xBF\xC3" => "\xEC\x98\xAC",
+ "\xBF\xC4" => "\xEC\x98\xAD",
+ "\xBF\xC5" => "\xEC\x98\xAE",
+ "\xBF\xC6" => "\xEC\x98\xB0",
+ "\xBF\xC7" => "\xEC\x98\xB3",
+ "\xBF\xC8" => "\xEC\x98\xB4",
+ "\xBF\xC9" => "\xEC\x98\xB5",
+ "\xBF\xCA" => "\xEC\x98\xB7",
+ "\xBF\xCB" => "\xEC\x98\xB9",
+ "\xBF\xCC" => "\xEC\x98\xBB",
+ "\xBF\xCD" => "\xEC\x99\x80",
+ "\xBF\xCE" => "\xEC\x99\x81",
+ "\xBF\xCF" => "\xEC\x99\x84",
+ "\xBF\xD0" => "\xEC\x99\x88",
+ "\xBF\xD1" => "\xEC\x99\x90",
+ "\xBF\xD2" => "\xEC\x99\x91",
+ "\xBF\xD3" => "\xEC\x99\x93",
+ "\xBF\xD4" => "\xEC\x99\x94",
+ "\xBF\xD5" => "\xEC\x99\x95",
+ "\xBF\xD6" => "\xEC\x99\x9C",
+ "\xBF\xD7" => "\xEC\x99\x9D",
+ "\xBF\xD8" => "\xEC\x99\xA0",
+ "\xBF\xD9" => "\xEC\x99\xAC",
+ "\xBF\xDA" => "\xEC\x99\xAF",
+ "\xBF\xDB" => "\xEC\x99\xB1",
+ "\xBF\xDC" => "\xEC\x99\xB8",
+ "\xBF\xDD" => "\xEC\x99\xB9",
+ "\xBF\xDE" => "\xEC\x99\xBC",
+ "\xBF\xDF" => "\xEC\x9A\x80",
+ "\xBF\xE0" => "\xEC\x9A\x88",
+ "\xBF\xE1" => "\xEC\x9A\x89",
+ "\xBF\xE2" => "\xEC\x9A\x8B",
+ "\xBF\xE3" => "\xEC\x9A\x8D",
+ "\xBF\xE4" => "\xEC\x9A\x94",
+ "\xBF\xE5" => "\xEC\x9A\x95",
+ "\xBF\xE6" => "\xEC\x9A\x98",
+ "\xBF\xE7" => "\xEC\x9A\x9C",
+ "\xBF\xE8" => "\xEC\x9A\xA4",
+ "\xBF\xE9" => "\xEC\x9A\xA5",
+ "\xBF\xEA" => "\xEC\x9A\xA7",
+ "\xBF\xEB" => "\xEC\x9A\xA9",
+ "\xBF\xEC" => "\xEC\x9A\xB0",
+ "\xBF\xED" => "\xEC\x9A\xB1",
+ "\xBF\xEE" => "\xEC\x9A\xB4",
+ "\xBF\xEF" => "\xEC\x9A\xB8",
+ "\xBF\xF0" => "\xEC\x9A\xB9",
+ "\xBF\xF1" => "\xEC\x9A\xBA",
+ "\xBF\xF2" => "\xEC\x9B\x80",
+ "\xBF\xF3" => "\xEC\x9B\x81",
+ "\xBF\xF4" => "\xEC\x9B\x83",
+ "\xBF\xF5" => "\xEC\x9B\x85",
+ "\xBF\xF6" => "\xEC\x9B\x8C",
+ "\xBF\xF7" => "\xEC\x9B\x8D",
+ "\xBF\xF8" => "\xEC\x9B\x90",
+ "\xBF\xF9" => "\xEC\x9B\x94",
+ "\xBF\xFA" => "\xEC\x9B\x9C",
+ "\xBF\xFB" => "\xEC\x9B\x9D",
+ "\xBF\xFC" => "\xEC\x9B\xA0",
+ "\xBF\xFD" => "\xEC\x9B\xA1",
+ "\xBF\xFE" => "\xEC\x9B\xA8",
+ "\xC0\x41" => "\xED\x93\xBE",
+ "\xC0\x42" => "\xED\x93\xBF",
+ "\xC0\x43" => "\xED\x94\x80",
+ "\xC0\x44" => "\xED\x94\x81",
+ "\xC0\x45" => "\xED\x94\x82",
+ "\xC0\x46" => "\xED\x94\x83",
+ "\xC0\x47" => "\xED\x94\x85",
+ "\xC0\x48" => "\xED\x94\x86",
+ "\xC0\x49" => "\xED\x94\x87",
+ "\xC0\x4A" => "\xED\x94\x89",
+ "\xC0\x4B" => "\xED\x94\x8A",
+ "\xC0\x4C" => "\xED\x94\x8B",
+ "\xC0\x4D" => "\xED\x94\x8D",
+ "\xC0\x4E" => "\xED\x94\x8E",
+ "\xC0\x4F" => "\xED\x94\x8F",
+ "\xC0\x50" => "\xED\x94\x90",
+ "\xC0\x51" => "\xED\x94\x91",
+ "\xC0\x52" => "\xED\x94\x92",
+ "\xC0\x53" => "\xED\x94\x93",
+ "\xC0\x54" => "\xED\x94\x96",
+ "\xC0\x55" => "\xED\x94\x98",
+ "\xC0\x56" => "\xED\x94\x99",
+ "\xC0\x57" => "\xED\x94\x9A",
+ "\xC0\x58" => "\xED\x94\x9B",
+ "\xC0\x59" => "\xED\x94\x9C",
+ "\xC0\x5A" => "\xED\x94\x9D",
+ "\xC0\x61" => "\xED\x94\x9E",
+ "\xC0\x62" => "\xED\x94\x9F",
+ "\xC0\x63" => "\xED\x94\xA0",
+ "\xC0\x64" => "\xED\x94\xA1",
+ "\xC0\x65" => "\xED\x94\xA2",
+ "\xC0\x66" => "\xED\x94\xA3",
+ "\xC0\x67" => "\xED\x94\xA4",
+ "\xC0\x68" => "\xED\x94\xA5",
+ "\xC0\x69" => "\xED\x94\xA6",
+ "\xC0\x6A" => "\xED\x94\xA7",
+ "\xC0\x6B" => "\xED\x94\xA8",
+ "\xC0\x6C" => "\xED\x94\xA9",
+ "\xC0\x6D" => "\xED\x94\xAA",
+ "\xC0\x6E" => "\xED\x94\xAB",
+ "\xC0\x6F" => "\xED\x94\xAC",
+ "\xC0\x70" => "\xED\x94\xAD",
+ "\xC0\x71" => "\xED\x94\xAE",
+ "\xC0\x72" => "\xED\x94\xAF",
+ "\xC0\x73" => "\xED\x94\xB0",
+ "\xC0\x74" => "\xED\x94\xB1",
+ "\xC0\x75" => "\xED\x94\xB2",
+ "\xC0\x76" => "\xED\x94\xB3",
+ "\xC0\x77" => "\xED\x94\xB4",
+ "\xC0\x78" => "\xED\x94\xB5",
+ "\xC0\x79" => "\xED\x94\xB6",
+ "\xC0\x7A" => "\xED\x94\xB7",
+ "\xC0\x81" => "\xED\x94\xB8",
+ "\xC0\x82" => "\xED\x94\xB9",
+ "\xC0\x83" => "\xED\x94\xBA",
+ "\xC0\x84" => "\xED\x94\xBB",
+ "\xC0\x85" => "\xED\x94\xBE",
+ "\xC0\x86" => "\xED\x94\xBF",
+ "\xC0\x87" => "\xED\x95\x81",
+ "\xC0\x88" => "\xED\x95\x82",
+ "\xC0\x89" => "\xED\x95\x83",
+ "\xC0\x8A" => "\xED\x95\x85",
+ "\xC0\x8B" => "\xED\x95\x86",
+ "\xC0\x8C" => "\xED\x95\x87",
+ "\xC0\x8D" => "\xED\x95\x88",
+ "\xC0\x8E" => "\xED\x95\x89",
+ "\xC0\x8F" => "\xED\x95\x8A",
+ "\xC0\x90" => "\xED\x95\x8B",
+ "\xC0\x91" => "\xED\x95\x8E",
+ "\xC0\x92" => "\xED\x95\x90",
+ "\xC0\x93" => "\xED\x95\x92",
+ "\xC0\x94" => "\xED\x95\x93",
+ "\xC0\x95" => "\xED\x95\x94",
+ "\xC0\x96" => "\xED\x95\x95",
+ "\xC0\x97" => "\xED\x95\x96",
+ "\xC0\x98" => "\xED\x95\x97",
+ "\xC0\x99" => "\xED\x95\x9A",
+ "\xC0\x9A" => "\xED\x95\x9B",
+ "\xC0\x9B" => "\xED\x95\x9D",
+ "\xC0\x9C" => "\xED\x95\x9E",
+ "\xC0\x9D" => "\xED\x95\x9F",
+ "\xC0\x9E" => "\xED\x95\xA1",
+ "\xC0\x9F" => "\xED\x95\xA2",
+ "\xC0\xA0" => "\xED\x95\xA3",
+ "\xC0\xA1" => "\xEC\x9B\xA9",
+ "\xC0\xA2" => "\xEC\x9B\xAC",
+ "\xC0\xA3" => "\xEC\x9B\xB0",
+ "\xC0\xA4" => "\xEC\x9B\xB8",
+ "\xC0\xA5" => "\xEC\x9B\xB9",
+ "\xC0\xA6" => "\xEC\x9B\xBD",
+ "\xC0\xA7" => "\xEC\x9C\x84",
+ "\xC0\xA8" => "\xEC\x9C\x85",
+ "\xC0\xA9" => "\xEC\x9C\x88",
+ "\xC0\xAA" => "\xEC\x9C\x8C",
+ "\xC0\xAB" => "\xEC\x9C\x94",
+ "\xC0\xAC" => "\xEC\x9C\x95",
+ "\xC0\xAD" => "\xEC\x9C\x97",
+ "\xC0\xAE" => "\xEC\x9C\x99",
+ "\xC0\xAF" => "\xEC\x9C\xA0",
+ "\xC0\xB0" => "\xEC\x9C\xA1",
+ "\xC0\xB1" => "\xEC\x9C\xA4",
+ "\xC0\xB2" => "\xEC\x9C\xA8",
+ "\xC0\xB3" => "\xEC\x9C\xB0",
+ "\xC0\xB4" => "\xEC\x9C\xB1",
+ "\xC0\xB5" => "\xEC\x9C\xB3",
+ "\xC0\xB6" => "\xEC\x9C\xB5",
+ "\xC0\xB7" => "\xEC\x9C\xB7",
+ "\xC0\xB8" => "\xEC\x9C\xBC",
+ "\xC0\xB9" => "\xEC\x9C\xBD",
+ "\xC0\xBA" => "\xEC\x9D\x80",
+ "\xC0\xBB" => "\xEC\x9D\x84",
+ "\xC0\xBC" => "\xEC\x9D\x8A",
+ "\xC0\xBD" => "\xEC\x9D\x8C",
+ "\xC0\xBE" => "\xEC\x9D\x8D",
+ "\xC0\xBF" => "\xEC\x9D\x8F",
+ "\xC0\xC0" => "\xEC\x9D\x91",
+ "\xC0\xC1" => "\xEC\x9D\x92",
+ "\xC0\xC2" => "\xEC\x9D\x93",
+ "\xC0\xC3" => "\xEC\x9D\x94",
+ "\xC0\xC4" => "\xEC\x9D\x95",
+ "\xC0\xC5" => "\xEC\x9D\x96",
+ "\xC0\xC6" => "\xEC\x9D\x97",
+ "\xC0\xC7" => "\xEC\x9D\x98",
+ "\xC0\xC8" => "\xEC\x9D\x9C",
+ "\xC0\xC9" => "\xEC\x9D\xA0",
+ "\xC0\xCA" => "\xEC\x9D\xA8",
+ "\xC0\xCB" => "\xEC\x9D\xAB",
+ "\xC0\xCC" => "\xEC\x9D\xB4",
+ "\xC0\xCD" => "\xEC\x9D\xB5",
+ "\xC0\xCE" => "\xEC\x9D\xB8",
+ "\xC0\xCF" => "\xEC\x9D\xBC",
+ "\xC0\xD0" => "\xEC\x9D\xBD",
+ "\xC0\xD1" => "\xEC\x9D\xBE",
+ "\xC0\xD2" => "\xEC\x9E\x83",
+ "\xC0\xD3" => "\xEC\x9E\x84",
+ "\xC0\xD4" => "\xEC\x9E\x85",
+ "\xC0\xD5" => "\xEC\x9E\x87",
+ "\xC0\xD6" => "\xEC\x9E\x88",
+ "\xC0\xD7" => "\xEC\x9E\x89",
+ "\xC0\xD8" => "\xEC\x9E\x8A",
+ "\xC0\xD9" => "\xEC\x9E\x8E",
+ "\xC0\xDA" => "\xEC\x9E\x90",
+ "\xC0\xDB" => "\xEC\x9E\x91",
+ "\xC0\xDC" => "\xEC\x9E\x94",
+ "\xC0\xDD" => "\xEC\x9E\x96",
+ "\xC0\xDE" => "\xEC\x9E\x97",
+ "\xC0\xDF" => "\xEC\x9E\x98",
+ "\xC0\xE0" => "\xEC\x9E\x9A",
+ "\xC0\xE1" => "\xEC\x9E\xA0",
+ "\xC0\xE2" => "\xEC\x9E\xA1",
+ "\xC0\xE3" => "\xEC\x9E\xA3",
+ "\xC0\xE4" => "\xEC\x9E\xA4",
+ "\xC0\xE5" => "\xEC\x9E\xA5",
+ "\xC0\xE6" => "\xEC\x9E\xA6",
+ "\xC0\xE7" => "\xEC\x9E\xAC",
+ "\xC0\xE8" => "\xEC\x9E\xAD",
+ "\xC0\xE9" => "\xEC\x9E\xB0",
+ "\xC0\xEA" => "\xEC\x9E\xB4",
+ "\xC0\xEB" => "\xEC\x9E\xBC",
+ "\xC0\xEC" => "\xEC\x9E\xBD",
+ "\xC0\xED" => "\xEC\x9E\xBF",
+ "\xC0\xEE" => "\xEC\x9F\x80",
+ "\xC0\xEF" => "\xEC\x9F\x81",
+ "\xC0\xF0" => "\xEC\x9F\x88",
+ "\xC0\xF1" => "\xEC\x9F\x89",
+ "\xC0\xF2" => "\xEC\x9F\x8C",
+ "\xC0\xF3" => "\xEC\x9F\x8E",
+ "\xC0\xF4" => "\xEC\x9F\x90",
+ "\xC0\xF5" => "\xEC\x9F\x98",
+ "\xC0\xF6" => "\xEC\x9F\x9D",
+ "\xC0\xF7" => "\xEC\x9F\xA4",
+ "\xC0\xF8" => "\xEC\x9F\xA8",
+ "\xC0\xF9" => "\xEC\x9F\xAC",
+ "\xC0\xFA" => "\xEC\xA0\x80",
+ "\xC0\xFB" => "\xEC\xA0\x81",
+ "\xC0\xFC" => "\xEC\xA0\x84",
+ "\xC0\xFD" => "\xEC\xA0\x88",
+ "\xC0\xFE" => "\xEC\xA0\x8A",
+ "\xC1\x41" => "\xED\x95\xA4",
+ "\xC1\x42" => "\xED\x95\xA6",
+ "\xC1\x43" => "\xED\x95\xA7",
+ "\xC1\x44" => "\xED\x95\xAA",
+ "\xC1\x45" => "\xED\x95\xAC",
+ "\xC1\x46" => "\xED\x95\xAE",
+ "\xC1\x47" => "\xED\x95\xAF",
+ "\xC1\x48" => "\xED\x95\xB0",
+ "\xC1\x49" => "\xED\x95\xB1",
+ "\xC1\x4A" => "\xED\x95\xB2",
+ "\xC1\x4B" => "\xED\x95\xB3",
+ "\xC1\x4C" => "\xED\x95\xB6",
+ "\xC1\x4D" => "\xED\x95\xB7",
+ "\xC1\x4E" => "\xED\x95\xB9",
+ "\xC1\x4F" => "\xED\x95\xBA",
+ "\xC1\x50" => "\xED\x95\xBB",
+ "\xC1\x51" => "\xED\x95\xBD",
+ "\xC1\x52" => "\xED\x95\xBE",
+ "\xC1\x53" => "\xED\x95\xBF",
+ "\xC1\x54" => "\xED\x96\x80",
+ "\xC1\x55" => "\xED\x96\x81",
+ "\xC1\x56" => "\xED\x96\x82",
+ "\xC1\x57" => "\xED\x96\x83",
+ "\xC1\x58" => "\xED\x96\x86",
+ "\xC1\x59" => "\xED\x96\x8A",
+ "\xC1\x5A" => "\xED\x96\x8B",
+ "\xC1\x61" => "\xED\x96\x8C",
+ "\xC1\x62" => "\xED\x96\x8D",
+ "\xC1\x63" => "\xED\x96\x8E",
+ "\xC1\x64" => "\xED\x96\x8F",
+ "\xC1\x65" => "\xED\x96\x91",
+ "\xC1\x66" => "\xED\x96\x92",
+ "\xC1\x67" => "\xED\x96\x93",
+ "\xC1\x68" => "\xED\x96\x94",
+ "\xC1\x69" => "\xED\x96\x95",
+ "\xC1\x6A" => "\xED\x96\x96",
+ "\xC1\x6B" => "\xED\x96\x97",
+ "\xC1\x6C" => "\xED\x96\x98",
+ "\xC1\x6D" => "\xED\x96\x99",
+ "\xC1\x6E" => "\xED\x96\x9A",
+ "\xC1\x6F" => "\xED\x96\x9B",
+ "\xC1\x70" => "\xED\x96\x9C",
+ "\xC1\x71" => "\xED\x96\x9D",
+ "\xC1\x72" => "\xED\x96\x9E",
+ "\xC1\x73" => "\xED\x96\x9F",
+ "\xC1\x74" => "\xED\x96\xA0",
+ "\xC1\x75" => "\xED\x96\xA1",
+ "\xC1\x76" => "\xED\x96\xA2",
+ "\xC1\x77" => "\xED\x96\xA3",
+ "\xC1\x78" => "\xED\x96\xA4",
+ "\xC1\x79" => "\xED\x96\xA6",
+ "\xC1\x7A" => "\xED\x96\xA7",
+ "\xC1\x81" => "\xED\x96\xA8",
+ "\xC1\x82" => "\xED\x96\xA9",
+ "\xC1\x83" => "\xED\x96\xAA",
+ "\xC1\x84" => "\xED\x96\xAB",
+ "\xC1\x85" => "\xED\x96\xAC",
+ "\xC1\x86" => "\xED\x96\xAD",
+ "\xC1\x87" => "\xED\x96\xAE",
+ "\xC1\x88" => "\xED\x96\xAF",
+ "\xC1\x89" => "\xED\x96\xB0",
+ "\xC1\x8A" => "\xED\x96\xB1",
+ "\xC1\x8B" => "\xED\x96\xB2",
+ "\xC1\x8C" => "\xED\x96\xB3",
+ "\xC1\x8D" => "\xED\x96\xB4",
+ "\xC1\x8E" => "\xED\x96\xB5",
+ "\xC1\x8F" => "\xED\x96\xB6",
+ "\xC1\x90" => "\xED\x96\xB7",
+ "\xC1\x91" => "\xED\x96\xB8",
+ "\xC1\x92" => "\xED\x96\xB9",
+ "\xC1\x93" => "\xED\x96\xBA",
+ "\xC1\x94" => "\xED\x96\xBB",
+ "\xC1\x95" => "\xED\x96\xBC",
+ "\xC1\x96" => "\xED\x96\xBD",
+ "\xC1\x97" => "\xED\x96\xBE",
+ "\xC1\x98" => "\xED\x96\xBF",
+ "\xC1\x99" => "\xED\x97\x80",
+ "\xC1\x9A" => "\xED\x97\x81",
+ "\xC1\x9B" => "\xED\x97\x82",
+ "\xC1\x9C" => "\xED\x97\x83",
+ "\xC1\x9D" => "\xED\x97\x84",
+ "\xC1\x9E" => "\xED\x97\x85",
+ "\xC1\x9F" => "\xED\x97\x86",
+ "\xC1\xA0" => "\xED\x97\x87",
+ "\xC1\xA1" => "\xEC\xA0\x90",
+ "\xC1\xA2" => "\xEC\xA0\x91",
+ "\xC1\xA3" => "\xEC\xA0\x93",
+ "\xC1\xA4" => "\xEC\xA0\x95",
+ "\xC1\xA5" => "\xEC\xA0\x96",
+ "\xC1\xA6" => "\xEC\xA0\x9C",
+ "\xC1\xA7" => "\xEC\xA0\x9D",
+ "\xC1\xA8" => "\xEC\xA0\xA0",
+ "\xC1\xA9" => "\xEC\xA0\xA4",
+ "\xC1\xAA" => "\xEC\xA0\xAC",
+ "\xC1\xAB" => "\xEC\xA0\xAD",
+ "\xC1\xAC" => "\xEC\xA0\xAF",
+ "\xC1\xAD" => "\xEC\xA0\xB1",
+ "\xC1\xAE" => "\xEC\xA0\xB8",
+ "\xC1\xAF" => "\xEC\xA0\xBC",
+ "\xC1\xB0" => "\xEC\xA1\x80",
+ "\xC1\xB1" => "\xEC\xA1\x88",
+ "\xC1\xB2" => "\xEC\xA1\x89",
+ "\xC1\xB3" => "\xEC\xA1\x8C",
+ "\xC1\xB4" => "\xEC\xA1\x8D",
+ "\xC1\xB5" => "\xEC\xA1\x94",
+ "\xC1\xB6" => "\xEC\xA1\xB0",
+ "\xC1\xB7" => "\xEC\xA1\xB1",
+ "\xC1\xB8" => "\xEC\xA1\xB4",
+ "\xC1\xB9" => "\xEC\xA1\xB8",
+ "\xC1\xBA" => "\xEC\xA1\xBA",
+ "\xC1\xBB" => "\xEC\xA2\x80",
+ "\xC1\xBC" => "\xEC\xA2\x81",
+ "\xC1\xBD" => "\xEC\xA2\x83",
+ "\xC1\xBE" => "\xEC\xA2\x85",
+ "\xC1\xBF" => "\xEC\xA2\x86",
+ "\xC1\xC0" => "\xEC\xA2\x87",
+ "\xC1\xC1" => "\xEC\xA2\x8B",
+ "\xC1\xC2" => "\xEC\xA2\x8C",
+ "\xC1\xC3" => "\xEC\xA2\x8D",
+ "\xC1\xC4" => "\xEC\xA2\x94",
+ "\xC1\xC5" => "\xEC\xA2\x9D",
+ "\xC1\xC6" => "\xEC\xA2\x9F",
+ "\xC1\xC7" => "\xEC\xA2\xA1",
+ "\xC1\xC8" => "\xEC\xA2\xA8",
+ "\xC1\xC9" => "\xEC\xA2\xBC",
+ "\xC1\xCA" => "\xEC\xA2\xBD",
+ "\xC1\xCB" => "\xEC\xA3\x84",
+ "\xC1\xCC" => "\xEC\xA3\x88",
+ "\xC1\xCD" => "\xEC\xA3\x8C",
+ "\xC1\xCE" => "\xEC\xA3\x94",
+ "\xC1\xCF" => "\xEC\xA3\x95",
+ "\xC1\xD0" => "\xEC\xA3\x97",
+ "\xC1\xD1" => "\xEC\xA3\x99",
+ "\xC1\xD2" => "\xEC\xA3\xA0",
+ "\xC1\xD3" => "\xEC\xA3\xA1",
+ "\xC1\xD4" => "\xEC\xA3\xA4",
+ "\xC1\xD5" => "\xEC\xA3\xB5",
+ "\xC1\xD6" => "\xEC\xA3\xBC",
+ "\xC1\xD7" => "\xEC\xA3\xBD",
+ "\xC1\xD8" => "\xEC\xA4\x80",
+ "\xC1\xD9" => "\xEC\xA4\x84",
+ "\xC1\xDA" => "\xEC\xA4\x85",
+ "\xC1\xDB" => "\xEC\xA4\x86",
+ "\xC1\xDC" => "\xEC\xA4\x8C",
+ "\xC1\xDD" => "\xEC\xA4\x8D",
+ "\xC1\xDE" => "\xEC\xA4\x8F",
+ "\xC1\xDF" => "\xEC\xA4\x91",
+ "\xC1\xE0" => "\xEC\xA4\x98",
+ "\xC1\xE1" => "\xEC\xA4\xAC",
+ "\xC1\xE2" => "\xEC\xA4\xB4",
+ "\xC1\xE3" => "\xEC\xA5\x90",
+ "\xC1\xE4" => "\xEC\xA5\x91",
+ "\xC1\xE5" => "\xEC\xA5\x94",
+ "\xC1\xE6" => "\xEC\xA5\x98",
+ "\xC1\xE7" => "\xEC\xA5\xA0",
+ "\xC1\xE8" => "\xEC\xA5\xA1",
+ "\xC1\xE9" => "\xEC\xA5\xA3",
+ "\xC1\xEA" => "\xEC\xA5\xAC",
+ "\xC1\xEB" => "\xEC\xA5\xB0",
+ "\xC1\xEC" => "\xEC\xA5\xB4",
+ "\xC1\xED" => "\xEC\xA5\xBC",
+ "\xC1\xEE" => "\xEC\xA6\x88",
+ "\xC1\xEF" => "\xEC\xA6\x89",
+ "\xC1\xF0" => "\xEC\xA6\x8C",
+ "\xC1\xF1" => "\xEC\xA6\x90",
+ "\xC1\xF2" => "\xEC\xA6\x98",
+ "\xC1\xF3" => "\xEC\xA6\x99",
+ "\xC1\xF4" => "\xEC\xA6\x9B",
+ "\xC1\xF5" => "\xEC\xA6\x9D",
+ "\xC1\xF6" => "\xEC\xA7\x80",
+ "\xC1\xF7" => "\xEC\xA7\x81",
+ "\xC1\xF8" => "\xEC\xA7\x84",
+ "\xC1\xF9" => "\xEC\xA7\x87",
+ "\xC1\xFA" => "\xEC\xA7\x88",
+ "\xC1\xFB" => "\xEC\xA7\x8A",
+ "\xC1\xFC" => "\xEC\xA7\x90",
+ "\xC1\xFD" => "\xEC\xA7\x91",
+ "\xC1\xFE" => "\xEC\xA7\x93",
+ "\xC2\x41" => "\xED\x97\x8A",
+ "\xC2\x42" => "\xED\x97\x8B",
+ "\xC2\x43" => "\xED\x97\x8D",
+ "\xC2\x44" => "\xED\x97\x8E",
+ "\xC2\x45" => "\xED\x97\x8F",
+ "\xC2\x46" => "\xED\x97\x91",
+ "\xC2\x47" => "\xED\x97\x93",
+ "\xC2\x48" => "\xED\x97\x94",
+ "\xC2\x49" => "\xED\x97\x95",
+ "\xC2\x4A" => "\xED\x97\x96",
+ "\xC2\x4B" => "\xED\x97\x97",
+ "\xC2\x4C" => "\xED\x97\x9A",
+ "\xC2\x4D" => "\xED\x97\x9C",
+ "\xC2\x4E" => "\xED\x97\x9E",
+ "\xC2\x4F" => "\xED\x97\x9F",
+ "\xC2\x50" => "\xED\x97\xA0",
+ "\xC2\x51" => "\xED\x97\xA1",
+ "\xC2\x52" => "\xED\x97\xA2",
+ "\xC2\x53" => "\xED\x97\xA3",
+ "\xC2\x54" => "\xED\x97\xA6",
+ "\xC2\x55" => "\xED\x97\xA7",
+ "\xC2\x56" => "\xED\x97\xA9",
+ "\xC2\x57" => "\xED\x97\xAA",
+ "\xC2\x58" => "\xED\x97\xAB",
+ "\xC2\x59" => "\xED\x97\xAD",
+ "\xC2\x5A" => "\xED\x97\xAE",
+ "\xC2\x61" => "\xED\x97\xAF",
+ "\xC2\x62" => "\xED\x97\xB0",
+ "\xC2\x63" => "\xED\x97\xB1",
+ "\xC2\x64" => "\xED\x97\xB2",
+ "\xC2\x65" => "\xED\x97\xB3",
+ "\xC2\x66" => "\xED\x97\xB6",
+ "\xC2\x67" => "\xED\x97\xB8",
+ "\xC2\x68" => "\xED\x97\xBA",
+ "\xC2\x69" => "\xED\x97\xBB",
+ "\xC2\x6A" => "\xED\x97\xBC",
+ "\xC2\x6B" => "\xED\x97\xBD",
+ "\xC2\x6C" => "\xED\x97\xBE",
+ "\xC2\x6D" => "\xED\x97\xBF",
+ "\xC2\x6E" => "\xED\x98\x82",
+ "\xC2\x6F" => "\xED\x98\x83",
+ "\xC2\x70" => "\xED\x98\x85",
+ "\xC2\x71" => "\xED\x98\x86",
+ "\xC2\x72" => "\xED\x98\x87",
+ "\xC2\x73" => "\xED\x98\x89",
+ "\xC2\x74" => "\xED\x98\x8A",
+ "\xC2\x75" => "\xED\x98\x8B",
+ "\xC2\x76" => "\xED\x98\x8C",
+ "\xC2\x77" => "\xED\x98\x8D",
+ "\xC2\x78" => "\xED\x98\x8E",
+ "\xC2\x79" => "\xED\x98\x8F",
+ "\xC2\x7A" => "\xED\x98\x92",
+ "\xC2\x81" => "\xED\x98\x96",
+ "\xC2\x82" => "\xED\x98\x97",
+ "\xC2\x83" => "\xED\x98\x98",
+ "\xC2\x84" => "\xED\x98\x99",
+ "\xC2\x85" => "\xED\x98\x9A",
+ "\xC2\x86" => "\xED\x98\x9B",
+ "\xC2\x87" => "\xED\x98\x9D",
+ "\xC2\x88" => "\xED\x98\x9E",
+ "\xC2\x89" => "\xED\x98\x9F",
+ "\xC2\x8A" => "\xED\x98\xA1",
+ "\xC2\x8B" => "\xED\x98\xA2",
+ "\xC2\x8C" => "\xED\x98\xA3",
+ "\xC2\x8D" => "\xED\x98\xA5",
+ "\xC2\x8E" => "\xED\x98\xA6",
+ "\xC2\x8F" => "\xED\x98\xA7",
+ "\xC2\x90" => "\xED\x98\xA8",
+ "\xC2\x91" => "\xED\x98\xA9",
+ "\xC2\x92" => "\xED\x98\xAA",
+ "\xC2\x93" => "\xED\x98\xAB",
+ "\xC2\x94" => "\xED\x98\xAC",
+ "\xC2\x95" => "\xED\x98\xAE",
+ "\xC2\x96" => "\xED\x98\xAF",
+ "\xC2\x97" => "\xED\x98\xB0",
+ "\xC2\x98" => "\xED\x98\xB1",
+ "\xC2\x99" => "\xED\x98\xB2",
+ "\xC2\x9A" => "\xED\x98\xB3",
+ "\xC2\x9B" => "\xED\x98\xB4",
+ "\xC2\x9C" => "\xED\x98\xB5",
+ "\xC2\x9D" => "\xED\x98\xB6",
+ "\xC2\x9E" => "\xED\x98\xB7",
+ "\xC2\x9F" => "\xED\x98\xBA",
+ "\xC2\xA0" => "\xED\x98\xBB",
+ "\xC2\xA1" => "\xEC\xA7\x95",
+ "\xC2\xA2" => "\xEC\xA7\x96",
+ "\xC2\xA3" => "\xEC\xA7\x99",
+ "\xC2\xA4" => "\xEC\xA7\x9A",
+ "\xC2\xA5" => "\xEC\xA7\x9C",
+ "\xC2\xA6" => "\xEC\xA7\x9D",
+ "\xC2\xA7" => "\xEC\xA7\xA0",
+ "\xC2\xA8" => "\xEC\xA7\xA2",
+ "\xC2\xA9" => "\xEC\xA7\xA4",
+ "\xC2\xAA" => "\xEC\xA7\xA7",
+ "\xC2\xAB" => "\xEC\xA7\xAC",
+ "\xC2\xAC" => "\xEC\xA7\xAD",
+ "\xC2\xAD" => "\xEC\xA7\xAF",
+ "\xC2\xAE" => "\xEC\xA7\xB0",
+ "\xC2\xAF" => "\xEC\xA7\xB1",
+ "\xC2\xB0" => "\xEC\xA7\xB8",
+ "\xC2\xB1" => "\xEC\xA7\xB9",
+ "\xC2\xB2" => "\xEC\xA7\xBC",
+ "\xC2\xB3" => "\xEC\xA8\x80",
+ "\xC2\xB4" => "\xEC\xA8\x88",
+ "\xC2\xB5" => "\xEC\xA8\x89",
+ "\xC2\xB6" => "\xEC\xA8\x8B",
+ "\xC2\xB7" => "\xEC\xA8\x8C",
+ "\xC2\xB8" => "\xEC\xA8\x8D",
+ "\xC2\xB9" => "\xEC\xA8\x94",
+ "\xC2\xBA" => "\xEC\xA8\x98",
+ "\xC2\xBB" => "\xEC\xA8\xA9",
+ "\xC2\xBC" => "\xEC\xA9\x8C",
+ "\xC2\xBD" => "\xEC\xA9\x8D",
+ "\xC2\xBE" => "\xEC\xA9\x90",
+ "\xC2\xBF" => "\xEC\xA9\x94",
+ "\xC2\xC0" => "\xEC\xA9\x9C",
+ "\xC2\xC1" => "\xEC\xA9\x9D",
+ "\xC2\xC2" => "\xEC\xA9\x9F",
+ "\xC2\xC3" => "\xEC\xA9\xA0",
+ "\xC2\xC4" => "\xEC\xA9\xA1",
+ "\xC2\xC5" => "\xEC\xA9\xA8",
+ "\xC2\xC6" => "\xEC\xA9\xBD",
+ "\xC2\xC7" => "\xEC\xAA\x84",
+ "\xC2\xC8" => "\xEC\xAA\x98",
+ "\xC2\xC9" => "\xEC\xAA\xBC",
+ "\xC2\xCA" => "\xEC\xAA\xBD",
+ "\xC2\xCB" => "\xEC\xAB\x80",
+ "\xC2\xCC" => "\xEC\xAB\x84",
+ "\xC2\xCD" => "\xEC\xAB\x8C",
+ "\xC2\xCE" => "\xEC\xAB\x8D",
+ "\xC2\xCF" => "\xEC\xAB\x8F",
+ "\xC2\xD0" => "\xEC\xAB\x91",
+ "\xC2\xD1" => "\xEC\xAB\x93",
+ "\xC2\xD2" => "\xEC\xAB\x98",
+ "\xC2\xD3" => "\xEC\xAB\x99",
+ "\xC2\xD4" => "\xEC\xAB\xA0",
+ "\xC2\xD5" => "\xEC\xAB\xAC",
+ "\xC2\xD6" => "\xEC\xAB\xB4",
+ "\xC2\xD7" => "\xEC\xAC\x88",
+ "\xC2\xD8" => "\xEC\xAC\x90",
+ "\xC2\xD9" => "\xEC\xAC\x94",
+ "\xC2\xDA" => "\xEC\xAC\x98",
+ "\xC2\xDB" => "\xEC\xAC\xA0",
+ "\xC2\xDC" => "\xEC\xAC\xA1",
+ "\xC2\xDD" => "\xEC\xAD\x81",
+ "\xC2\xDE" => "\xEC\xAD\x88",
+ "\xC2\xDF" => "\xEC\xAD\x89",
+ "\xC2\xE0" => "\xEC\xAD\x8C",
+ "\xC2\xE1" => "\xEC\xAD\x90",
+ "\xC2\xE2" => "\xEC\xAD\x98",
+ "\xC2\xE3" => "\xEC\xAD\x99",
+ "\xC2\xE4" => "\xEC\xAD\x9D",
+ "\xC2\xE5" => "\xEC\xAD\xA4",
+ "\xC2\xE6" => "\xEC\xAD\xB8",
+ "\xC2\xE7" => "\xEC\xAD\xB9",
+ "\xC2\xE8" => "\xEC\xAE\x9C",
+ "\xC2\xE9" => "\xEC\xAE\xB8",
+ "\xC2\xEA" => "\xEC\xAF\x94",
+ "\xC2\xEB" => "\xEC\xAF\xA4",
+ "\xC2\xEC" => "\xEC\xAF\xA7",
+ "\xC2\xED" => "\xEC\xAF\xA9",
+ "\xC2\xEE" => "\xEC\xB0\x8C",
+ "\xC2\xEF" => "\xEC\xB0\x8D",
+ "\xC2\xF0" => "\xEC\xB0\x90",
+ "\xC2\xF1" => "\xEC\xB0\x94",
+ "\xC2\xF2" => "\xEC\xB0\x9C",
+ "\xC2\xF3" => "\xEC\xB0\x9D",
+ "\xC2\xF4" => "\xEC\xB0\xA1",
+ "\xC2\xF5" => "\xEC\xB0\xA2",
+ "\xC2\xF6" => "\xEC\xB0\xA7",
+ "\xC2\xF7" => "\xEC\xB0\xA8",
+ "\xC2\xF8" => "\xEC\xB0\xA9",
+ "\xC2\xF9" => "\xEC\xB0\xAC",
+ "\xC2\xFA" => "\xEC\xB0\xAE",
+ "\xC2\xFB" => "\xEC\xB0\xB0",
+ "\xC2\xFC" => "\xEC\xB0\xB8",
+ "\xC2\xFD" => "\xEC\xB0\xB9",
+ "\xC2\xFE" => "\xEC\xB0\xBB",
+ "\xC3\x41" => "\xED\x98\xBD",
+ "\xC3\x42" => "\xED\x98\xBE",
+ "\xC3\x43" => "\xED\x98\xBF",
+ "\xC3\x44" => "\xED\x99\x81",
+ "\xC3\x45" => "\xED\x99\x82",
+ "\xC3\x46" => "\xED\x99\x83",
+ "\xC3\x47" => "\xED\x99\x84",
+ "\xC3\x48" => "\xED\x99\x86",
+ "\xC3\x49" => "\xED\x99\x87",
+ "\xC3\x4A" => "\xED\x99\x8A",
+ "\xC3\x4B" => "\xED\x99\x8C",
+ "\xC3\x4C" => "\xED\x99\x8E",
+ "\xC3\x4D" => "\xED\x99\x8F",
+ "\xC3\x4E" => "\xED\x99\x90",
+ "\xC3\x4F" => "\xED\x99\x92",
+ "\xC3\x50" => "\xED\x99\x93",
+ "\xC3\x51" => "\xED\x99\x96",
+ "\xC3\x52" => "\xED\x99\x97",
+ "\xC3\x53" => "\xED\x99\x99",
+ "\xC3\x54" => "\xED\x99\x9A",
+ "\xC3\x55" => "\xED\x99\x9B",
+ "\xC3\x56" => "\xED\x99\x9D",
+ "\xC3\x57" => "\xED\x99\x9E",
+ "\xC3\x58" => "\xED\x99\x9F",
+ "\xC3\x59" => "\xED\x99\xA0",
+ "\xC3\x5A" => "\xED\x99\xA1",
+ "\xC3\x61" => "\xED\x99\xA2",
+ "\xC3\x62" => "\xED\x99\xA3",
+ "\xC3\x63" => "\xED\x99\xA4",
+ "\xC3\x64" => "\xED\x99\xA5",
+ "\xC3\x65" => "\xED\x99\xA6",
+ "\xC3\x66" => "\xED\x99\xA8",
+ "\xC3\x67" => "\xED\x99\xAA",
+ "\xC3\x68" => "\xED\x99\xAB",
+ "\xC3\x69" => "\xED\x99\xAC",
+ "\xC3\x6A" => "\xED\x99\xAD",
+ "\xC3\x6B" => "\xED\x99\xAE",
+ "\xC3\x6C" => "\xED\x99\xAF",
+ "\xC3\x6D" => "\xED\x99\xB2",
+ "\xC3\x6E" => "\xED\x99\xB3",
+ "\xC3\x6F" => "\xED\x99\xB5",
+ "\xC3\x70" => "\xED\x99\xB6",
+ "\xC3\x71" => "\xED\x99\xB7",
+ "\xC3\x72" => "\xED\x99\xB8",
+ "\xC3\x73" => "\xED\x99\xB9",
+ "\xC3\x74" => "\xED\x99\xBA",
+ "\xC3\x75" => "\xED\x99\xBB",
+ "\xC3\x76" => "\xED\x99\xBC",
+ "\xC3\x77" => "\xED\x99\xBD",
+ "\xC3\x78" => "\xED\x99\xBE",
+ "\xC3\x79" => "\xED\x99\xBF",
+ "\xC3\x7A" => "\xED\x9A\x80",
+ "\xC3\x81" => "\xED\x9A\x81",
+ "\xC3\x82" => "\xED\x9A\x82",
+ "\xC3\x83" => "\xED\x9A\x84",
+ "\xC3\x84" => "\xED\x9A\x86",
+ "\xC3\x85" => "\xED\x9A\x87",
+ "\xC3\x86" => "\xED\x9A\x88",
+ "\xC3\x87" => "\xED\x9A\x89",
+ "\xC3\x88" => "\xED\x9A\x8A",
+ "\xC3\x89" => "\xED\x9A\x8B",
+ "\xC3\x8A" => "\xED\x9A\x8E",
+ "\xC3\x8B" => "\xED\x9A\x8F",
+ "\xC3\x8C" => "\xED\x9A\x91",
+ "\xC3\x8D" => "\xED\x9A\x92",
+ "\xC3\x8E" => "\xED\x9A\x93",
+ "\xC3\x8F" => "\xED\x9A\x95",
+ "\xC3\x90" => "\xED\x9A\x96",
+ "\xC3\x91" => "\xED\x9A\x97",
+ "\xC3\x92" => "\xED\x9A\x98",
+ "\xC3\x93" => "\xED\x9A\x99",
+ "\xC3\x94" => "\xED\x9A\x9A",
+ "\xC3\x95" => "\xED\x9A\x9B",
+ "\xC3\x96" => "\xED\x9A\x9C",
+ "\xC3\x97" => "\xED\x9A\x9E",
+ "\xC3\x98" => "\xED\x9A\xA0",
+ "\xC3\x99" => "\xED\x9A\xA2",
+ "\xC3\x9A" => "\xED\x9A\xA3",
+ "\xC3\x9B" => "\xED\x9A\xA4",
+ "\xC3\x9C" => "\xED\x9A\xA5",
+ "\xC3\x9D" => "\xED\x9A\xA6",
+ "\xC3\x9E" => "\xED\x9A\xA7",
+ "\xC3\x9F" => "\xED\x9A\xA9",
+ "\xC3\xA0" => "\xED\x9A\xAA",
+ "\xC3\xA1" => "\xEC\xB0\xBC",
+ "\xC3\xA2" => "\xEC\xB0\xBD",
+ "\xC3\xA3" => "\xEC\xB0\xBE",
+ "\xC3\xA4" => "\xEC\xB1\x84",
+ "\xC3\xA5" => "\xEC\xB1\x85",
+ "\xC3\xA6" => "\xEC\xB1\x88",
+ "\xC3\xA7" => "\xEC\xB1\x8C",
+ "\xC3\xA8" => "\xEC\xB1\x94",
+ "\xC3\xA9" => "\xEC\xB1\x95",
+ "\xC3\xAA" => "\xEC\xB1\x97",
+ "\xC3\xAB" => "\xEC\xB1\x98",
+ "\xC3\xAC" => "\xEC\xB1\x99",
+ "\xC3\xAD" => "\xEC\xB1\xA0",
+ "\xC3\xAE" => "\xEC\xB1\xA4",
+ "\xC3\xAF" => "\xEC\xB1\xA6",
+ "\xC3\xB0" => "\xEC\xB1\xA8",
+ "\xC3\xB1" => "\xEC\xB1\xB0",
+ "\xC3\xB2" => "\xEC\xB1\xB5",
+ "\xC3\xB3" => "\xEC\xB2\x98",
+ "\xC3\xB4" => "\xEC\xB2\x99",
+ "\xC3\xB5" => "\xEC\xB2\x9C",
+ "\xC3\xB6" => "\xEC\xB2\xA0",
+ "\xC3\xB7" => "\xEC\xB2\xA8",
+ "\xC3\xB8" => "\xEC\xB2\xA9",
+ "\xC3\xB9" => "\xEC\xB2\xAB",
+ "\xC3\xBA" => "\xEC\xB2\xAC",
+ "\xC3\xBB" => "\xEC\xB2\xAD",
+ "\xC3\xBC" => "\xEC\xB2\xB4",
+ "\xC3\xBD" => "\xEC\xB2\xB5",
+ "\xC3\xBE" => "\xEC\xB2\xB8",
+ "\xC3\xBF" => "\xEC\xB2\xBC",
+ "\xC3\xC0" => "\xEC\xB3\x84",
+ "\xC3\xC1" => "\xEC\xB3\x85",
+ "\xC3\xC2" => "\xEC\xB3\x87",
+ "\xC3\xC3" => "\xEC\xB3\x89",
+ "\xC3\xC4" => "\xEC\xB3\x90",
+ "\xC3\xC5" => "\xEC\xB3\x94",
+ "\xC3\xC6" => "\xEC\xB3\xA4",
+ "\xC3\xC7" => "\xEC\xB3\xAC",
+ "\xC3\xC8" => "\xEC\xB3\xB0",
+ "\xC3\xC9" => "\xEC\xB4\x81",
+ "\xC3\xCA" => "\xEC\xB4\x88",
+ "\xC3\xCB" => "\xEC\xB4\x89",
+ "\xC3\xCC" => "\xEC\xB4\x8C",
+ "\xC3\xCD" => "\xEC\xB4\x90",
+ "\xC3\xCE" => "\xEC\xB4\x98",
+ "\xC3\xCF" => "\xEC\xB4\x99",
+ "\xC3\xD0" => "\xEC\xB4\x9B",
+ "\xC3\xD1" => "\xEC\xB4\x9D",
+ "\xC3\xD2" => "\xEC\xB4\xA4",
+ "\xC3\xD3" => "\xEC\xB4\xA8",
+ "\xC3\xD4" => "\xEC\xB4\xAC",
+ "\xC3\xD5" => "\xEC\xB4\xB9",
+ "\xC3\xD6" => "\xEC\xB5\x9C",
+ "\xC3\xD7" => "\xEC\xB5\xA0",
+ "\xC3\xD8" => "\xEC\xB5\xA4",
+ "\xC3\xD9" => "\xEC\xB5\xAC",
+ "\xC3\xDA" => "\xEC\xB5\xAD",
+ "\xC3\xDB" => "\xEC\xB5\xAF",
+ "\xC3\xDC" => "\xEC\xB5\xB1",
+ "\xC3\xDD" => "\xEC\xB5\xB8",
+ "\xC3\xDE" => "\xEC\xB6\x88",
+ "\xC3\xDF" => "\xEC\xB6\x94",
+ "\xC3\xE0" => "\xEC\xB6\x95",
+ "\xC3\xE1" => "\xEC\xB6\x98",
+ "\xC3\xE2" => "\xEC\xB6\x9C",
+ "\xC3\xE3" => "\xEC\xB6\xA4",
+ "\xC3\xE4" => "\xEC\xB6\xA5",
+ "\xC3\xE5" => "\xEC\xB6\xA7",
+ "\xC3\xE6" => "\xEC\xB6\xA9",
+ "\xC3\xE7" => "\xEC\xB6\xB0",
+ "\xC3\xE8" => "\xEC\xB7\x84",
+ "\xC3\xE9" => "\xEC\xB7\x8C",
+ "\xC3\xEA" => "\xEC\xB7\x90",
+ "\xC3\xEB" => "\xEC\xB7\xA8",
+ "\xC3\xEC" => "\xEC\xB7\xAC",
+ "\xC3\xED" => "\xEC\xB7\xB0",
+ "\xC3\xEE" => "\xEC\xB7\xB8",
+ "\xC3\xEF" => "\xEC\xB7\xB9",
+ "\xC3\xF0" => "\xEC\xB7\xBB",
+ "\xC3\xF1" => "\xEC\xB7\xBD",
+ "\xC3\xF2" => "\xEC\xB8\x84",
+ "\xC3\xF3" => "\xEC\xB8\x88",
+ "\xC3\xF4" => "\xEC\xB8\x8C",
+ "\xC3\xF5" => "\xEC\xB8\x94",
+ "\xC3\xF6" => "\xEC\xB8\x99",
+ "\xC3\xF7" => "\xEC\xB8\xA0",
+ "\xC3\xF8" => "\xEC\xB8\xA1",
+ "\xC3\xF9" => "\xEC\xB8\xA4",
+ "\xC3\xFA" => "\xEC\xB8\xA8",
+ "\xC3\xFB" => "\xEC\xB8\xB0",
+ "\xC3\xFC" => "\xEC\xB8\xB1",
+ "\xC3\xFD" => "\xEC\xB8\xB3",
+ "\xC3\xFE" => "\xEC\xB8\xB5",
+ "\xC4\x41" => "\xED\x9A\xAB",
+ "\xC4\x42" => "\xED\x9A\xAD",
+ "\xC4\x43" => "\xED\x9A\xAE",
+ "\xC4\x44" => "\xED\x9A\xAF",
+ "\xC4\x45" => "\xED\x9A\xB1",
+ "\xC4\x46" => "\xED\x9A\xB2",
+ "\xC4\x47" => "\xED\x9A\xB3",
+ "\xC4\x48" => "\xED\x9A\xB4",
+ "\xC4\x49" => "\xED\x9A\xB5",
+ "\xC4\x4A" => "\xED\x9A\xB6",
+ "\xC4\x4B" => "\xED\x9A\xB7",
+ "\xC4\x4C" => "\xED\x9A\xB8",
+ "\xC4\x4D" => "\xED\x9A\xBA",
+ "\xC4\x4E" => "\xED\x9A\xBC",
+ "\xC4\x4F" => "\xED\x9A\xBD",
+ "\xC4\x50" => "\xED\x9A\xBE",
+ "\xC4\x51" => "\xED\x9A\xBF",
+ "\xC4\x52" => "\xED\x9B\x80",
+ "\xC4\x53" => "\xED\x9B\x81",
+ "\xC4\x54" => "\xED\x9B\x82",
+ "\xC4\x55" => "\xED\x9B\x83",
+ "\xC4\x56" => "\xED\x9B\x86",
+ "\xC4\x57" => "\xED\x9B\x87",
+ "\xC4\x58" => "\xED\x9B\x89",
+ "\xC4\x59" => "\xED\x9B\x8A",
+ "\xC4\x5A" => "\xED\x9B\x8B",
+ "\xC4\x61" => "\xED\x9B\x8D",
+ "\xC4\x62" => "\xED\x9B\x8E",
+ "\xC4\x63" => "\xED\x9B\x8F",
+ "\xC4\x64" => "\xED\x9B\x90",
+ "\xC4\x65" => "\xED\x9B\x92",
+ "\xC4\x66" => "\xED\x9B\x93",
+ "\xC4\x67" => "\xED\x9B\x95",
+ "\xC4\x68" => "\xED\x9B\x96",
+ "\xC4\x69" => "\xED\x9B\x98",
+ "\xC4\x6A" => "\xED\x9B\x9A",
+ "\xC4\x6B" => "\xED\x9B\x9B",
+ "\xC4\x6C" => "\xED\x9B\x9C",
+ "\xC4\x6D" => "\xED\x9B\x9D",
+ "\xC4\x6E" => "\xED\x9B\x9E",
+ "\xC4\x6F" => "\xED\x9B\x9F",
+ "\xC4\x70" => "\xED\x9B\xA1",
+ "\xC4\x71" => "\xED\x9B\xA2",
+ "\xC4\x72" => "\xED\x9B\xA3",
+ "\xC4\x73" => "\xED\x9B\xA5",
+ "\xC4\x74" => "\xED\x9B\xA6",
+ "\xC4\x75" => "\xED\x9B\xA7",
+ "\xC4\x76" => "\xED\x9B\xA9",
+ "\xC4\x77" => "\xED\x9B\xAA",
+ "\xC4\x78" => "\xED\x9B\xAB",
+ "\xC4\x79" => "\xED\x9B\xAC",
+ "\xC4\x7A" => "\xED\x9B\xAD",
+ "\xC4\x81" => "\xED\x9B\xAE",
+ "\xC4\x82" => "\xED\x9B\xAF",
+ "\xC4\x83" => "\xED\x9B\xB1",
+ "\xC4\x84" => "\xED\x9B\xB2",
+ "\xC4\x85" => "\xED\x9B\xB3",
+ "\xC4\x86" => "\xED\x9B\xB4",
+ "\xC4\x87" => "\xED\x9B\xB6",
+ "\xC4\x88" => "\xED\x9B\xB7",
+ "\xC4\x89" => "\xED\x9B\xB8",
+ "\xC4\x8A" => "\xED\x9B\xB9",
+ "\xC4\x8B" => "\xED\x9B\xBA",
+ "\xC4\x8C" => "\xED\x9B\xBB",
+ "\xC4\x8D" => "\xED\x9B\xBE",
+ "\xC4\x8E" => "\xED\x9B\xBF",
+ "\xC4\x8F" => "\xED\x9C\x81",
+ "\xC4\x90" => "\xED\x9C\x82",
+ "\xC4\x91" => "\xED\x9C\x83",
+ "\xC4\x92" => "\xED\x9C\x85",
+ "\xC4\x93" => "\xED\x9C\x86",
+ "\xC4\x94" => "\xED\x9C\x87",
+ "\xC4\x95" => "\xED\x9C\x88",
+ "\xC4\x96" => "\xED\x9C\x89",
+ "\xC4\x97" => "\xED\x9C\x8A",
+ "\xC4\x98" => "\xED\x9C\x8B",
+ "\xC4\x99" => "\xED\x9C\x8C",
+ "\xC4\x9A" => "\xED\x9C\x8D",
+ "\xC4\x9B" => "\xED\x9C\x8E",
+ "\xC4\x9C" => "\xED\x9C\x8F",
+ "\xC4\x9D" => "\xED\x9C\x90",
+ "\xC4\x9E" => "\xED\x9C\x92",
+ "\xC4\x9F" => "\xED\x9C\x93",
+ "\xC4\xA0" => "\xED\x9C\x94",
+ "\xC4\xA1" => "\xEC\xB9\x98",
+ "\xC4\xA2" => "\xEC\xB9\x99",
+ "\xC4\xA3" => "\xEC\xB9\x9C",
+ "\xC4\xA4" => "\xEC\xB9\x9F",
+ "\xC4\xA5" => "\xEC\xB9\xA0",
+ "\xC4\xA6" => "\xEC\xB9\xA1",
+ "\xC4\xA7" => "\xEC\xB9\xA8",
+ "\xC4\xA8" => "\xEC\xB9\xA9",
+ "\xC4\xA9" => "\xEC\xB9\xAB",
+ "\xC4\xAA" => "\xEC\xB9\xAD",
+ "\xC4\xAB" => "\xEC\xB9\xB4",
+ "\xC4\xAC" => "\xEC\xB9\xB5",
+ "\xC4\xAD" => "\xEC\xB9\xB8",
+ "\xC4\xAE" => "\xEC\xB9\xBC",
+ "\xC4\xAF" => "\xEC\xBA\x84",
+ "\xC4\xB0" => "\xEC\xBA\x85",
+ "\xC4\xB1" => "\xEC\xBA\x87",
+ "\xC4\xB2" => "\xEC\xBA\x89",
+ "\xC4\xB3" => "\xEC\xBA\x90",
+ "\xC4\xB4" => "\xEC\xBA\x91",
+ "\xC4\xB5" => "\xEC\xBA\x94",
+ "\xC4\xB6" => "\xEC\xBA\x98",
+ "\xC4\xB7" => "\xEC\xBA\xA0",
+ "\xC4\xB8" => "\xEC\xBA\xA1",
+ "\xC4\xB9" => "\xEC\xBA\xA3",
+ "\xC4\xBA" => "\xEC\xBA\xA4",
+ "\xC4\xBB" => "\xEC\xBA\xA5",
+ "\xC4\xBC" => "\xEC\xBA\xAC",
+ "\xC4\xBD" => "\xEC\xBA\xAD",
+ "\xC4\xBE" => "\xEC\xBB\x81",
+ "\xC4\xBF" => "\xEC\xBB\xA4",
+ "\xC4\xC0" => "\xEC\xBB\xA5",
+ "\xC4\xC1" => "\xEC\xBB\xA8",
+ "\xC4\xC2" => "\xEC\xBB\xAB",
+ "\xC4\xC3" => "\xEC\xBB\xAC",
+ "\xC4\xC4" => "\xEC\xBB\xB4",
+ "\xC4\xC5" => "\xEC\xBB\xB5",
+ "\xC4\xC6" => "\xEC\xBB\xB7",
+ "\xC4\xC7" => "\xEC\xBB\xB8",
+ "\xC4\xC8" => "\xEC\xBB\xB9",
+ "\xC4\xC9" => "\xEC\xBC\x80",
+ "\xC4\xCA" => "\xEC\xBC\x81",
+ "\xC4\xCB" => "\xEC\xBC\x84",
+ "\xC4\xCC" => "\xEC\xBC\x88",
+ "\xC4\xCD" => "\xEC\xBC\x90",
+ "\xC4\xCE" => "\xEC\xBC\x91",
+ "\xC4\xCF" => "\xEC\xBC\x93",
+ "\xC4\xD0" => "\xEC\xBC\x95",
+ "\xC4\xD1" => "\xEC\xBC\x9C",
+ "\xC4\xD2" => "\xEC\xBC\xA0",
+ "\xC4\xD3" => "\xEC\xBC\xA4",
+ "\xC4\xD4" => "\xEC\xBC\xAC",
+ "\xC4\xD5" => "\xEC\xBC\xAD",
+ "\xC4\xD6" => "\xEC\xBC\xAF",
+ "\xC4\xD7" => "\xEC\xBC\xB0",
+ "\xC4\xD8" => "\xEC\xBC\xB1",
+ "\xC4\xD9" => "\xEC\xBC\xB8",
+ "\xC4\xDA" => "\xEC\xBD\x94",
+ "\xC4\xDB" => "\xEC\xBD\x95",
+ "\xC4\xDC" => "\xEC\xBD\x98",
+ "\xC4\xDD" => "\xEC\xBD\x9C",
+ "\xC4\xDE" => "\xEC\xBD\xA4",
+ "\xC4\xDF" => "\xEC\xBD\xA5",
+ "\xC4\xE0" => "\xEC\xBD\xA7",
+ "\xC4\xE1" => "\xEC\xBD\xA9",
+ "\xC4\xE2" => "\xEC\xBD\xB0",
+ "\xC4\xE3" => "\xEC\xBD\xB1",
+ "\xC4\xE4" => "\xEC\xBD\xB4",
+ "\xC4\xE5" => "\xEC\xBD\xB8",
+ "\xC4\xE6" => "\xEC\xBE\x80",
+ "\xC4\xE7" => "\xEC\xBE\x85",
+ "\xC4\xE8" => "\xEC\xBE\x8C",
+ "\xC4\xE9" => "\xEC\xBE\xA1",
+ "\xC4\xEA" => "\xEC\xBE\xA8",
+ "\xC4\xEB" => "\xEC\xBE\xB0",
+ "\xC4\xEC" => "\xEC\xBF\x84",
+ "\xC4\xED" => "\xEC\xBF\xA0",
+ "\xC4\xEE" => "\xEC\xBF\xA1",
+ "\xC4\xEF" => "\xEC\xBF\xA4",
+ "\xC4\xF0" => "\xEC\xBF\xA8",
+ "\xC4\xF1" => "\xEC\xBF\xB0",
+ "\xC4\xF2" => "\xEC\xBF\xB1",
+ "\xC4\xF3" => "\xEC\xBF\xB3",
+ "\xC4\xF4" => "\xEC\xBF\xB5",
+ "\xC4\xF5" => "\xEC\xBF\xBC",
+ "\xC4\xF6" => "\xED\x80\x80",
+ "\xC4\xF7" => "\xED\x80\x84",
+ "\xC4\xF8" => "\xED\x80\x91",
+ "\xC4\xF9" => "\xED\x80\x98",
+ "\xC4\xFA" => "\xED\x80\xAD",
+ "\xC4\xFB" => "\xED\x80\xB4",
+ "\xC4\xFC" => "\xED\x80\xB5",
+ "\xC4\xFD" => "\xED\x80\xB8",
+ "\xC4\xFE" => "\xED\x80\xBC",
+ "\xC5\x41" => "\xED\x9C\x95",
+ "\xC5\x42" => "\xED\x9C\x96",
+ "\xC5\x43" => "\xED\x9C\x97",
+ "\xC5\x44" => "\xED\x9C\x9A",
+ "\xC5\x45" => "\xED\x9C\x9B",
+ "\xC5\x46" => "\xED\x9C\x9D",
+ "\xC5\x47" => "\xED\x9C\x9E",
+ "\xC5\x48" => "\xED\x9C\x9F",
+ "\xC5\x49" => "\xED\x9C\xA1",
+ "\xC5\x4A" => "\xED\x9C\xA2",
+ "\xC5\x4B" => "\xED\x9C\xA3",
+ "\xC5\x4C" => "\xED\x9C\xA4",
+ "\xC5\x4D" => "\xED\x9C\xA5",
+ "\xC5\x4E" => "\xED\x9C\xA6",
+ "\xC5\x4F" => "\xED\x9C\xA7",
+ "\xC5\x50" => "\xED\x9C\xAA",
+ "\xC5\x51" => "\xED\x9C\xAC",
+ "\xC5\x52" => "\xED\x9C\xAE",
+ "\xC5\x53" => "\xED\x9C\xAF",
+ "\xC5\x54" => "\xED\x9C\xB0",
+ "\xC5\x55" => "\xED\x9C\xB1",
+ "\xC5\x56" => "\xED\x9C\xB2",
+ "\xC5\x57" => "\xED\x9C\xB3",
+ "\xC5\x58" => "\xED\x9C\xB6",
+ "\xC5\x59" => "\xED\x9C\xB7",
+ "\xC5\x5A" => "\xED\x9C\xB9",
+ "\xC5\x61" => "\xED\x9C\xBA",
+ "\xC5\x62" => "\xED\x9C\xBB",
+ "\xC5\x63" => "\xED\x9C\xBD",
+ "\xC5\x64" => "\xED\x9C\xBE",
+ "\xC5\x65" => "\xED\x9C\xBF",
+ "\xC5\x66" => "\xED\x9D\x80",
+ "\xC5\x67" => "\xED\x9D\x81",
+ "\xC5\x68" => "\xED\x9D\x82",
+ "\xC5\x69" => "\xED\x9D\x83",
+ "\xC5\x6A" => "\xED\x9D\x85",
+ "\xC5\x6B" => "\xED\x9D\x86",
+ "\xC5\x6C" => "\xED\x9D\x88",
+ "\xC5\x6D" => "\xED\x9D\x8A",
+ "\xC5\x6E" => "\xED\x9D\x8B",
+ "\xC5\x6F" => "\xED\x9D\x8C",
+ "\xC5\x70" => "\xED\x9D\x8D",
+ "\xC5\x71" => "\xED\x9D\x8E",
+ "\xC5\x72" => "\xED\x9D\x8F",
+ "\xC5\x73" => "\xED\x9D\x92",
+ "\xC5\x74" => "\xED\x9D\x93",
+ "\xC5\x75" => "\xED\x9D\x95",
+ "\xC5\x76" => "\xED\x9D\x9A",
+ "\xC5\x77" => "\xED\x9D\x9B",
+ "\xC5\x78" => "\xED\x9D\x9C",
+ "\xC5\x79" => "\xED\x9D\x9D",
+ "\xC5\x7A" => "\xED\x9D\x9E",
+ "\xC5\x81" => "\xED\x9D\x9F",
+ "\xC5\x82" => "\xED\x9D\xA2",
+ "\xC5\x83" => "\xED\x9D\xA4",
+ "\xC5\x84" => "\xED\x9D\xA6",
+ "\xC5\x85" => "\xED\x9D\xA7",
+ "\xC5\x86" => "\xED\x9D\xA8",
+ "\xC5\x87" => "\xED\x9D\xAA",
+ "\xC5\x88" => "\xED\x9D\xAB",
+ "\xC5\x89" => "\xED\x9D\xAD",
+ "\xC5\x8A" => "\xED\x9D\xAE",
+ "\xC5\x8B" => "\xED\x9D\xAF",
+ "\xC5\x8C" => "\xED\x9D\xB1",
+ "\xC5\x8D" => "\xED\x9D\xB2",
+ "\xC5\x8E" => "\xED\x9D\xB3",
+ "\xC5\x8F" => "\xED\x9D\xB5",
+ "\xC5\x90" => "\xED\x9D\xB6",
+ "\xC5\x91" => "\xED\x9D\xB7",
+ "\xC5\x92" => "\xED\x9D\xB8",
+ "\xC5\x93" => "\xED\x9D\xB9",
+ "\xC5\x94" => "\xED\x9D\xBA",
+ "\xC5\x95" => "\xED\x9D\xBB",
+ "\xC5\x96" => "\xED\x9D\xBE",
+ "\xC5\x97" => "\xED\x9D\xBF",
+ "\xC5\x98" => "\xED\x9E\x80",
+ "\xC5\x99" => "\xED\x9E\x82",
+ "\xC5\x9A" => "\xED\x9E\x83",
+ "\xC5\x9B" => "\xED\x9E\x84",
+ "\xC5\x9C" => "\xED\x9E\x85",
+ "\xC5\x9D" => "\xED\x9E\x86",
+ "\xC5\x9E" => "\xED\x9E\x87",
+ "\xC5\x9F" => "\xED\x9E\x8A",
+ "\xC5\xA0" => "\xED\x9E\x8B",
+ "\xC5\xA1" => "\xED\x81\x84",
+ "\xC5\xA2" => "\xED\x81\x85",
+ "\xC5\xA3" => "\xED\x81\x87",
+ "\xC5\xA4" => "\xED\x81\x89",
+ "\xC5\xA5" => "\xED\x81\x90",
+ "\xC5\xA6" => "\xED\x81\x94",
+ "\xC5\xA7" => "\xED\x81\x98",
+ "\xC5\xA8" => "\xED\x81\xA0",
+ "\xC5\xA9" => "\xED\x81\xAC",
+ "\xC5\xAA" => "\xED\x81\xAD",
+ "\xC5\xAB" => "\xED\x81\xB0",
+ "\xC5\xAC" => "\xED\x81\xB4",
+ "\xC5\xAD" => "\xED\x81\xBC",
+ "\xC5\xAE" => "\xED\x81\xBD",
+ "\xC5\xAF" => "\xED\x82\x81",
+ "\xC5\xB0" => "\xED\x82\xA4",
+ "\xC5\xB1" => "\xED\x82\xA5",
+ "\xC5\xB2" => "\xED\x82\xA8",
+ "\xC5\xB3" => "\xED\x82\xAC",
+ "\xC5\xB4" => "\xED\x82\xB4",
+ "\xC5\xB5" => "\xED\x82\xB5",
+ "\xC5\xB6" => "\xED\x82\xB7",
+ "\xC5\xB7" => "\xED\x82\xB9",
+ "\xC5\xB8" => "\xED\x83\x80",
+ "\xC5\xB9" => "\xED\x83\x81",
+ "\xC5\xBA" => "\xED\x83\x84",
+ "\xC5\xBB" => "\xED\x83\x88",
+ "\xC5\xBC" => "\xED\x83\x89",
+ "\xC5\xBD" => "\xED\x83\x90",
+ "\xC5\xBE" => "\xED\x83\x91",
+ "\xC5\xBF" => "\xED\x83\x93",
+ "\xC5\xC0" => "\xED\x83\x94",
+ "\xC5\xC1" => "\xED\x83\x95",
+ "\xC5\xC2" => "\xED\x83\x9C",
+ "\xC5\xC3" => "\xED\x83\x9D",
+ "\xC5\xC4" => "\xED\x83\xA0",
+ "\xC5\xC5" => "\xED\x83\xA4",
+ "\xC5\xC6" => "\xED\x83\xAC",
+ "\xC5\xC7" => "\xED\x83\xAD",
+ "\xC5\xC8" => "\xED\x83\xAF",
+ "\xC5\xC9" => "\xED\x83\xB0",
+ "\xC5\xCA" => "\xED\x83\xB1",
+ "\xC5\xCB" => "\xED\x83\xB8",
+ "\xC5\xCC" => "\xED\x84\x8D",
+ "\xC5\xCD" => "\xED\x84\xB0",
+ "\xC5\xCE" => "\xED\x84\xB1",
+ "\xC5\xCF" => "\xED\x84\xB4",
+ "\xC5\xD0" => "\xED\x84\xB8",
+ "\xC5\xD1" => "\xED\x84\xBA",
+ "\xC5\xD2" => "\xED\x85\x80",
+ "\xC5\xD3" => "\xED\x85\x81",
+ "\xC5\xD4" => "\xED\x85\x83",
+ "\xC5\xD5" => "\xED\x85\x84",
+ "\xC5\xD6" => "\xED\x85\x85",
+ "\xC5\xD7" => "\xED\x85\x8C",
+ "\xC5\xD8" => "\xED\x85\x8D",
+ "\xC5\xD9" => "\xED\x85\x90",
+ "\xC5\xDA" => "\xED\x85\x94",
+ "\xC5\xDB" => "\xED\x85\x9C",
+ "\xC5\xDC" => "\xED\x85\x9D",
+ "\xC5\xDD" => "\xED\x85\x9F",
+ "\xC5\xDE" => "\xED\x85\xA1",
+ "\xC5\xDF" => "\xED\x85\xA8",
+ "\xC5\xE0" => "\xED\x85\xAC",
+ "\xC5\xE1" => "\xED\x85\xBC",
+ "\xC5\xE2" => "\xED\x86\x84",
+ "\xC5\xE3" => "\xED\x86\x88",
+ "\xC5\xE4" => "\xED\x86\xA0",
+ "\xC5\xE5" => "\xED\x86\xA1",
+ "\xC5\xE6" => "\xED\x86\xA4",
+ "\xC5\xE7" => "\xED\x86\xA8",
+ "\xC5\xE8" => "\xED\x86\xB0",
+ "\xC5\xE9" => "\xED\x86\xB1",
+ "\xC5\xEA" => "\xED\x86\xB3",
+ "\xC5\xEB" => "\xED\x86\xB5",
+ "\xC5\xEC" => "\xED\x86\xBA",
+ "\xC5\xED" => "\xED\x86\xBC",
+ "\xC5\xEE" => "\xED\x87\x80",
+ "\xC5\xEF" => "\xED\x87\x98",
+ "\xC5\xF0" => "\xED\x87\xB4",
+ "\xC5\xF1" => "\xED\x87\xB8",
+ "\xC5\xF2" => "\xED\x88\x87",
+ "\xC5\xF3" => "\xED\x88\x89",
+ "\xC5\xF4" => "\xED\x88\x90",
+ "\xC5\xF5" => "\xED\x88\xAC",
+ "\xC5\xF6" => "\xED\x88\xAD",
+ "\xC5\xF7" => "\xED\x88\xB0",
+ "\xC5\xF8" => "\xED\x88\xB4",
+ "\xC5\xF9" => "\xED\x88\xBC",
+ "\xC5\xFA" => "\xED\x88\xBD",
+ "\xC5\xFB" => "\xED\x88\xBF",
+ "\xC5\xFC" => "\xED\x89\x81",
+ "\xC5\xFD" => "\xED\x89\x88",
+ "\xC5\xFE" => "\xED\x89\x9C",
+ "\xC6\x41" => "\xED\x9E\x8D",
+ "\xC6\x42" => "\xED\x9E\x8E",
+ "\xC6\x43" => "\xED\x9E\x8F",
+ "\xC6\x44" => "\xED\x9E\x91",
+ "\xC6\x45" => "\xED\x9E\x92",
+ "\xC6\x46" => "\xED\x9E\x93",
+ "\xC6\x47" => "\xED\x9E\x94",
+ "\xC6\x48" => "\xED\x9E\x95",
+ "\xC6\x49" => "\xED\x9E\x96",
+ "\xC6\x4A" => "\xED\x9E\x97",
+ "\xC6\x4B" => "\xED\x9E\x9A",
+ "\xC6\x4C" => "\xED\x9E\x9C",
+ "\xC6\x4D" => "\xED\x9E\x9E",
+ "\xC6\x4E" => "\xED\x9E\x9F",
+ "\xC6\x4F" => "\xED\x9E\xA0",
+ "\xC6\x50" => "\xED\x9E\xA1",
+ "\xC6\x51" => "\xED\x9E\xA2",
+ "\xC6\x52" => "\xED\x9E\xA3",
+ "\xC6\xA1" => "\xED\x89\xA4",
+ "\xC6\xA2" => "\xED\x8A\x80",
+ "\xC6\xA3" => "\xED\x8A\x81",
+ "\xC6\xA4" => "\xED\x8A\x84",
+ "\xC6\xA5" => "\xED\x8A\x88",
+ "\xC6\xA6" => "\xED\x8A\x90",
+ "\xC6\xA7" => "\xED\x8A\x91",
+ "\xC6\xA8" => "\xED\x8A\x95",
+ "\xC6\xA9" => "\xED\x8A\x9C",
+ "\xC6\xAA" => "\xED\x8A\xA0",
+ "\xC6\xAB" => "\xED\x8A\xA4",
+ "\xC6\xAC" => "\xED\x8A\xAC",
+ "\xC6\xAD" => "\xED\x8A\xB1",
+ "\xC6\xAE" => "\xED\x8A\xB8",
+ "\xC6\xAF" => "\xED\x8A\xB9",
+ "\xC6\xB0" => "\xED\x8A\xBC",
+ "\xC6\xB1" => "\xED\x8A\xBF",
+ "\xC6\xB2" => "\xED\x8B\x80",
+ "\xC6\xB3" => "\xED\x8B\x82",
+ "\xC6\xB4" => "\xED\x8B\x88",
+ "\xC6\xB5" => "\xED\x8B\x89",
+ "\xC6\xB6" => "\xED\x8B\x8B",
+ "\xC6\xB7" => "\xED\x8B\x94",
+ "\xC6\xB8" => "\xED\x8B\x98",
+ "\xC6\xB9" => "\xED\x8B\x9C",
+ "\xC6\xBA" => "\xED\x8B\xA4",
+ "\xC6\xBB" => "\xED\x8B\xA5",
+ "\xC6\xBC" => "\xED\x8B\xB0",
+ "\xC6\xBD" => "\xED\x8B\xB1",
+ "\xC6\xBE" => "\xED\x8B\xB4",
+ "\xC6\xBF" => "\xED\x8B\xB8",
+ "\xC6\xC0" => "\xED\x8C\x80",
+ "\xC6\xC1" => "\xED\x8C\x81",
+ "\xC6\xC2" => "\xED\x8C\x83",
+ "\xC6\xC3" => "\xED\x8C\x85",
+ "\xC6\xC4" => "\xED\x8C\x8C",
+ "\xC6\xC5" => "\xED\x8C\x8D",
+ "\xC6\xC6" => "\xED\x8C\x8E",
+ "\xC6\xC7" => "\xED\x8C\x90",
+ "\xC6\xC8" => "\xED\x8C\x94",
+ "\xC6\xC9" => "\xED\x8C\x96",
+ "\xC6\xCA" => "\xED\x8C\x9C",
+ "\xC6\xCB" => "\xED\x8C\x9D",
+ "\xC6\xCC" => "\xED\x8C\x9F",
+ "\xC6\xCD" => "\xED\x8C\xA0",
+ "\xC6\xCE" => "\xED\x8C\xA1",
+ "\xC6\xCF" => "\xED\x8C\xA5",
+ "\xC6\xD0" => "\xED\x8C\xA8",
+ "\xC6\xD1" => "\xED\x8C\xA9",
+ "\xC6\xD2" => "\xED\x8C\xAC",
+ "\xC6\xD3" => "\xED\x8C\xB0",
+ "\xC6\xD4" => "\xED\x8C\xB8",
+ "\xC6\xD5" => "\xED\x8C\xB9",
+ "\xC6\xD6" => "\xED\x8C\xBB",
+ "\xC6\xD7" => "\xED\x8C\xBC",
+ "\xC6\xD8" => "\xED\x8C\xBD",
+ "\xC6\xD9" => "\xED\x8D\x84",
+ "\xC6\xDA" => "\xED\x8D\x85",
+ "\xC6\xDB" => "\xED\x8D\xBC",
+ "\xC6\xDC" => "\xED\x8D\xBD",
+ "\xC6\xDD" => "\xED\x8E\x80",
+ "\xC6\xDE" => "\xED\x8E\x84",
+ "\xC6\xDF" => "\xED\x8E\x8C",
+ "\xC6\xE0" => "\xED\x8E\x8D",
+ "\xC6\xE1" => "\xED\x8E\x8F",
+ "\xC6\xE2" => "\xED\x8E\x90",
+ "\xC6\xE3" => "\xED\x8E\x91",
+ "\xC6\xE4" => "\xED\x8E\x98",
+ "\xC6\xE5" => "\xED\x8E\x99",
+ "\xC6\xE6" => "\xED\x8E\x9C",
+ "\xC6\xE7" => "\xED\x8E\xA0",
+ "\xC6\xE8" => "\xED\x8E\xA8",
+ "\xC6\xE9" => "\xED\x8E\xA9",
+ "\xC6\xEA" => "\xED\x8E\xAB",
+ "\xC6\xEB" => "\xED\x8E\xAD",
+ "\xC6\xEC" => "\xED\x8E\xB4",
+ "\xC6\xED" => "\xED\x8E\xB8",
+ "\xC6\xEE" => "\xED\x8E\xBC",
+ "\xC6\xEF" => "\xED\x8F\x84",
+ "\xC6\xF0" => "\xED\x8F\x85",
+ "\xC6\xF1" => "\xED\x8F\x88",
+ "\xC6\xF2" => "\xED\x8F\x89",
+ "\xC6\xF3" => "\xED\x8F\x90",
+ "\xC6\xF4" => "\xED\x8F\x98",
+ "\xC6\xF5" => "\xED\x8F\xA1",
+ "\xC6\xF6" => "\xED\x8F\xA3",
+ "\xC6\xF7" => "\xED\x8F\xAC",
+ "\xC6\xF8" => "\xED\x8F\xAD",
+ "\xC6\xF9" => "\xED\x8F\xB0",
+ "\xC6\xFA" => "\xED\x8F\xB4",
+ "\xC6\xFB" => "\xED\x8F\xBC",
+ "\xC6\xFC" => "\xED\x8F\xBD",
+ "\xC6\xFD" => "\xED\x8F\xBF",
+ "\xC6\xFE" => "\xED\x90\x81",
+ "\xC7\xA1" => "\xED\x90\x88",
+ "\xC7\xA2" => "\xED\x90\x9D",
+ "\xC7\xA3" => "\xED\x91\x80",
+ "\xC7\xA4" => "\xED\x91\x84",
+ "\xC7\xA5" => "\xED\x91\x9C",
+ "\xC7\xA6" => "\xED\x91\xA0",
+ "\xC7\xA7" => "\xED\x91\xA4",
+ "\xC7\xA8" => "\xED\x91\xAD",
+ "\xC7\xA9" => "\xED\x91\xAF",
+ "\xC7\xAA" => "\xED\x91\xB8",
+ "\xC7\xAB" => "\xED\x91\xB9",
+ "\xC7\xAC" => "\xED\x91\xBC",
+ "\xC7\xAD" => "\xED\x91\xBF",
+ "\xC7\xAE" => "\xED\x92\x80",
+ "\xC7\xAF" => "\xED\x92\x82",
+ "\xC7\xB0" => "\xED\x92\x88",
+ "\xC7\xB1" => "\xED\x92\x89",
+ "\xC7\xB2" => "\xED\x92\x8B",
+ "\xC7\xB3" => "\xED\x92\x8D",
+ "\xC7\xB4" => "\xED\x92\x94",
+ "\xC7\xB5" => "\xED\x92\xA9",
+ "\xC7\xB6" => "\xED\x93\x8C",
+ "\xC7\xB7" => "\xED\x93\x90",
+ "\xC7\xB8" => "\xED\x93\x94",
+ "\xC7\xB9" => "\xED\x93\x9C",
+ "\xC7\xBA" => "\xED\x93\x9F",
+ "\xC7\xBB" => "\xED\x93\xA8",
+ "\xC7\xBC" => "\xED\x93\xAC",
+ "\xC7\xBD" => "\xED\x93\xB0",
+ "\xC7\xBE" => "\xED\x93\xB8",
+ "\xC7\xBF" => "\xED\x93\xBB",
+ "\xC7\xC0" => "\xED\x93\xBD",
+ "\xC7\xC1" => "\xED\x94\x84",
+ "\xC7\xC2" => "\xED\x94\x88",
+ "\xC7\xC3" => "\xED\x94\x8C",
+ "\xC7\xC4" => "\xED\x94\x94",
+ "\xC7\xC5" => "\xED\x94\x95",
+ "\xC7\xC6" => "\xED\x94\x97",
+ "\xC7\xC7" => "\xED\x94\xBC",
+ "\xC7\xC8" => "\xED\x94\xBD",
+ "\xC7\xC9" => "\xED\x95\x80",
+ "\xC7\xCA" => "\xED\x95\x84",
+ "\xC7\xCB" => "\xED\x95\x8C",
+ "\xC7\xCC" => "\xED\x95\x8D",
+ "\xC7\xCD" => "\xED\x95\x8F",
+ "\xC7\xCE" => "\xED\x95\x91",
+ "\xC7\xCF" => "\xED\x95\x98",
+ "\xC7\xD0" => "\xED\x95\x99",
+ "\xC7\xD1" => "\xED\x95\x9C",
+ "\xC7\xD2" => "\xED\x95\xA0",
+ "\xC7\xD3" => "\xED\x95\xA5",
+ "\xC7\xD4" => "\xED\x95\xA8",
+ "\xC7\xD5" => "\xED\x95\xA9",
+ "\xC7\xD6" => "\xED\x95\xAB",
+ "\xC7\xD7" => "\xED\x95\xAD",
+ "\xC7\xD8" => "\xED\x95\xB4",
+ "\xC7\xD9" => "\xED\x95\xB5",
+ "\xC7\xDA" => "\xED\x95\xB8",
+ "\xC7\xDB" => "\xED\x95\xBC",
+ "\xC7\xDC" => "\xED\x96\x84",
+ "\xC7\xDD" => "\xED\x96\x85",
+ "\xC7\xDE" => "\xED\x96\x87",
+ "\xC7\xDF" => "\xED\x96\x88",
+ "\xC7\xE0" => "\xED\x96\x89",
+ "\xC7\xE1" => "\xED\x96\x90",
+ "\xC7\xE2" => "\xED\x96\xA5",
+ "\xC7\xE3" => "\xED\x97\x88",
+ "\xC7\xE4" => "\xED\x97\x89",
+ "\xC7\xE5" => "\xED\x97\x8C",
+ "\xC7\xE6" => "\xED\x97\x90",
+ "\xC7\xE7" => "\xED\x97\x92",
+ "\xC7\xE8" => "\xED\x97\x98",
+ "\xC7\xE9" => "\xED\x97\x99",
+ "\xC7\xEA" => "\xED\x97\x9B",
+ "\xC7\xEB" => "\xED\x97\x9D",
+ "\xC7\xEC" => "\xED\x97\xA4",
+ "\xC7\xED" => "\xED\x97\xA5",
+ "\xC7\xEE" => "\xED\x97\xA8",
+ "\xC7\xEF" => "\xED\x97\xAC",
+ "\xC7\xF0" => "\xED\x97\xB4",
+ "\xC7\xF1" => "\xED\x97\xB5",
+ "\xC7\xF2" => "\xED\x97\xB7",
+ "\xC7\xF3" => "\xED\x97\xB9",
+ "\xC7\xF4" => "\xED\x98\x80",
+ "\xC7\xF5" => "\xED\x98\x81",
+ "\xC7\xF6" => "\xED\x98\x84",
+ "\xC7\xF7" => "\xED\x98\x88",
+ "\xC7\xF8" => "\xED\x98\x90",
+ "\xC7\xF9" => "\xED\x98\x91",
+ "\xC7\xFA" => "\xED\x98\x93",
+ "\xC7\xFB" => "\xED\x98\x94",
+ "\xC7\xFC" => "\xED\x98\x95",
+ "\xC7\xFD" => "\xED\x98\x9C",
+ "\xC7\xFE" => "\xED\x98\xA0",
+ "\xC8\xA1" => "\xED\x98\xA4",
+ "\xC8\xA2" => "\xED\x98\xAD",
+ "\xC8\xA3" => "\xED\x98\xB8",
+ "\xC8\xA4" => "\xED\x98\xB9",
+ "\xC8\xA5" => "\xED\x98\xBC",
+ "\xC8\xA6" => "\xED\x99\x80",
+ "\xC8\xA7" => "\xED\x99\x85",
+ "\xC8\xA8" => "\xED\x99\x88",
+ "\xC8\xA9" => "\xED\x99\x89",
+ "\xC8\xAA" => "\xED\x99\x8B",
+ "\xC8\xAB" => "\xED\x99\x8D",
+ "\xC8\xAC" => "\xED\x99\x91",
+ "\xC8\xAD" => "\xED\x99\x94",
+ "\xC8\xAE" => "\xED\x99\x95",
+ "\xC8\xAF" => "\xED\x99\x98",
+ "\xC8\xB0" => "\xED\x99\x9C",
+ "\xC8\xB1" => "\xED\x99\xA7",
+ "\xC8\xB2" => "\xED\x99\xA9",
+ "\xC8\xB3" => "\xED\x99\xB0",
+ "\xC8\xB4" => "\xED\x99\xB1",
+ "\xC8\xB5" => "\xED\x99\xB4",
+ "\xC8\xB6" => "\xED\x9A\x83",
+ "\xC8\xB7" => "\xED\x9A\x85",
+ "\xC8\xB8" => "\xED\x9A\x8C",
+ "\xC8\xB9" => "\xED\x9A\x8D",
+ "\xC8\xBA" => "\xED\x9A\x90",
+ "\xC8\xBB" => "\xED\x9A\x94",
+ "\xC8\xBC" => "\xED\x9A\x9D",
+ "\xC8\xBD" => "\xED\x9A\x9F",
+ "\xC8\xBE" => "\xED\x9A\xA1",
+ "\xC8\xBF" => "\xED\x9A\xA8",
+ "\xC8\xC0" => "\xED\x9A\xAC",
+ "\xC8\xC1" => "\xED\x9A\xB0",
+ "\xC8\xC2" => "\xED\x9A\xB9",
+ "\xC8\xC3" => "\xED\x9A\xBB",
+ "\xC8\xC4" => "\xED\x9B\x84",
+ "\xC8\xC5" => "\xED\x9B\x85",
+ "\xC8\xC6" => "\xED\x9B\x88",
+ "\xC8\xC7" => "\xED\x9B\x8C",
+ "\xC8\xC8" => "\xED\x9B\x91",
+ "\xC8\xC9" => "\xED\x9B\x94",
+ "\xC8\xCA" => "\xED\x9B\x97",
+ "\xC8\xCB" => "\xED\x9B\x99",
+ "\xC8\xCC" => "\xED\x9B\xA0",
+ "\xC8\xCD" => "\xED\x9B\xA4",
+ "\xC8\xCE" => "\xED\x9B\xA8",
+ "\xC8\xCF" => "\xED\x9B\xB0",
+ "\xC8\xD0" => "\xED\x9B\xB5",
+ "\xC8\xD1" => "\xED\x9B\xBC",
+ "\xC8\xD2" => "\xED\x9B\xBD",
+ "\xC8\xD3" => "\xED\x9C\x80",
+ "\xC8\xD4" => "\xED\x9C\x84",
+ "\xC8\xD5" => "\xED\x9C\x91",
+ "\xC8\xD6" => "\xED\x9C\x98",
+ "\xC8\xD7" => "\xED\x9C\x99",
+ "\xC8\xD8" => "\xED\x9C\x9C",
+ "\xC8\xD9" => "\xED\x9C\xA0",
+ "\xC8\xDA" => "\xED\x9C\xA8",
+ "\xC8\xDB" => "\xED\x9C\xA9",
+ "\xC8\xDC" => "\xED\x9C\xAB",
+ "\xC8\xDD" => "\xED\x9C\xAD",
+ "\xC8\xDE" => "\xED\x9C\xB4",
+ "\xC8\xDF" => "\xED\x9C\xB5",
+ "\xC8\xE0" => "\xED\x9C\xB8",
+ "\xC8\xE1" => "\xED\x9C\xBC",
+ "\xC8\xE2" => "\xED\x9D\x84",
+ "\xC8\xE3" => "\xED\x9D\x87",
+ "\xC8\xE4" => "\xED\x9D\x89",
+ "\xC8\xE5" => "\xED\x9D\x90",
+ "\xC8\xE6" => "\xED\x9D\x91",
+ "\xC8\xE7" => "\xED\x9D\x94",
+ "\xC8\xE8" => "\xED\x9D\x96",
+ "\xC8\xE9" => "\xED\x9D\x97",
+ "\xC8\xEA" => "\xED\x9D\x98",
+ "\xC8\xEB" => "\xED\x9D\x99",
+ "\xC8\xEC" => "\xED\x9D\xA0",
+ "\xC8\xED" => "\xED\x9D\xA1",
+ "\xC8\xEE" => "\xED\x9D\xA3",
+ "\xC8\xEF" => "\xED\x9D\xA5",
+ "\xC8\xF0" => "\xED\x9D\xA9",
+ "\xC8\xF1" => "\xED\x9D\xAC",
+ "\xC8\xF2" => "\xED\x9D\xB0",
+ "\xC8\xF3" => "\xED\x9D\xB4",
+ "\xC8\xF4" => "\xED\x9D\xBC",
+ "\xC8\xF5" => "\xED\x9D\xBD",
+ "\xC8\xF6" => "\xED\x9E\x81",
+ "\xC8\xF7" => "\xED\x9E\x88",
+ "\xC8\xF8" => "\xED\x9E\x89",
+ "\xC8\xF9" => "\xED\x9E\x8C",
+ "\xC8\xFA" => "\xED\x9E\x90",
+ "\xC8\xFB" => "\xED\x9E\x98",
+ "\xC8\xFC" => "\xED\x9E\x99",
+ "\xC8\xFD" => "\xED\x9E\x9B",
+ "\xC8\xFE" => "\xED\x9E\x9D",
+ "\xCA\xA1" => "\xE4\xBC\xBD",
+ "\xCA\xA2" => "\xE4\xBD\xB3",
+ "\xCA\xA3" => "\xE5\x81\x87",
+ "\xCA\xA4" => "\xE5\x83\xB9",
+ "\xCA\xA5" => "\xE5\x8A\xA0",
+ "\xCA\xA6" => "\xE5\x8F\xAF",
+ "\xCA\xA7" => "\xE5\x91\xB5",
+ "\xCA\xA8" => "\xE5\x93\xA5",
+ "\xCA\xA9" => "\xE5\x98\x89",
+ "\xCA\xAA" => "\xE5\xAB\x81",
+ "\xCA\xAB" => "\xE5\xAE\xB6",
+ "\xCA\xAC" => "\xE6\x9A\x87",
+ "\xCA\xAD" => "\xE6\x9E\xB6",
+ "\xCA\xAE" => "\xE6\x9E\xB7",
+ "\xCA\xAF" => "\xE6\x9F\xAF",
+ "\xCA\xB0" => "\xE6\xAD\x8C",
+ "\xCA\xB1" => "\xE7\x8F\x82",
+ "\xCA\xB2" => "\xE7\x97\x82",
+ "\xCA\xB3" => "\xE7\xA8\xBC",
+ "\xCA\xB4" => "\xE8\x8B\x9B",
+ "\xCA\xB5" => "\xE8\x8C\x84",
+ "\xCA\xB6" => "\xE8\xA1\x97",
+ "\xCA\xB7" => "\xE8\xA2\x88",
+ "\xCA\xB8" => "\xE8\xA8\xB6",
+ "\xCA\xB9" => "\xE8\xB3\x88",
+ "\xCA\xBA" => "\xE8\xB7\x8F",
+ "\xCA\xBB" => "\xE8\xBB\xBB",
+ "\xCA\xBC" => "\xE8\xBF\xA6",
+ "\xCA\xBD" => "\xE9\xA7\x95",
+ "\xCA\xBE" => "\xE5\x88\xBB",
+ "\xCA\xBF" => "\xE5\x8D\xB4",
+ "\xCA\xC0" => "\xE5\x90\x84",
+ "\xCA\xC1" => "\xE6\x81\xAA",
+ "\xCA\xC2" => "\xE6\x85\xA4",
+ "\xCA\xC3" => "\xE6\xAE\xBC",
+ "\xCA\xC4" => "\xE7\x8F\x8F",
+ "\xCA\xC5" => "\xE8\x84\x9A",
+ "\xCA\xC6" => "\xE8\xA6\xBA",
+ "\xCA\xC7" => "\xE8\xA7\x92",
+ "\xCA\xC8" => "\xE9\x96\xA3",
+ "\xCA\xC9" => "\xE4\xBE\x83",
+ "\xCA\xCA" => "\xE5\x88\x8A",
+ "\xCA\xCB" => "\xE5\xA2\xBE",
+ "\xCA\xCC" => "\xE5\xA5\xB8",
+ "\xCA\xCD" => "\xE5\xA7\xA6",
+ "\xCA\xCE" => "\xE5\xB9\xB2",
+ "\xCA\xCF" => "\xE5\xB9\xB9",
+ "\xCA\xD0" => "\xE6\x87\x87",
+ "\xCA\xD1" => "\xE6\x8F\x80",
+ "\xCA\xD2" => "\xE6\x9D\x86",
+ "\xCA\xD3" => "\xE6\x9F\xAC",
+ "\xCA\xD4" => "\xE6\xA1\xBF",
+ "\xCA\xD5" => "\xE6\xBE\x97",
+ "\xCA\xD6" => "\xE7\x99\x8E",
+ "\xCA\xD7" => "\xE7\x9C\x8B",
+ "\xCA\xD8" => "\xE7\xA3\xB5",
+ "\xCA\xD9" => "\xE7\xA8\x88",
+ "\xCA\xDA" => "\xE7\xAB\xBF",
+ "\xCA\xDB" => "\xE7\xB0\xA1",
+ "\xCA\xDC" => "\xE8\x82\x9D",
+ "\xCA\xDD" => "\xE8\x89\xAE",
+ "\xCA\xDE" => "\xE8\x89\xB1",
+ "\xCA\xDF" => "\xE8\xAB\xAB",
+ "\xCA\xE0" => "\xE9\x96\x93",
+ "\xCA\xE1" => "\xE4\xB9\xAB",
+ "\xCA\xE2" => "\xE5\x96\x9D",
+ "\xCA\xE3" => "\xE6\x9B\xB7",
+ "\xCA\xE4" => "\xE6\xB8\xB4",
+ "\xCA\xE5" => "\xE7\xA2\xA3",
+ "\xCA\xE6" => "\xE7\xAB\xAD",
+ "\xCA\xE7" => "\xE8\x91\x9B",
+ "\xCA\xE8" => "\xE8\xA4\x90",
+ "\xCA\xE9" => "\xE8\x9D\x8E",
+ "\xCA\xEA" => "\xE9\x9E\xA8",
+ "\xCA\xEB" => "\xE5\x8B\x98",
+ "\xCA\xEC" => "\xE5\x9D\x8E",
+ "\xCA\xED" => "\xE5\xA0\xAA",
+ "\xCA\xEE" => "\xE5\xB5\x8C",
+ "\xCA\xEF" => "\xE6\x84\x9F",
+ "\xCA\xF0" => "\xE6\x86\xBE",
+ "\xCA\xF1" => "\xE6\x88\xA1",
+ "\xCA\xF2" => "\xE6\x95\xA2",
+ "\xCA\xF3" => "\xE6\x9F\x91",
+ "\xCA\xF4" => "\xE6\xA9\x84",
+ "\xCA\xF5" => "\xE6\xB8\x9B",
+ "\xCA\xF6" => "\xE7\x94\x98",
+ "\xCA\xF7" => "\xE7\x96\xB3",
+ "\xCA\xF8" => "\xE7\x9B\xA3",
+ "\xCA\xF9" => "\xE7\x9E\xB0",
+ "\xCA\xFA" => "\xE7\xB4\xBA",
+ "\xCA\xFB" => "\xE9\x82\xAF",
+ "\xCA\xFC" => "\xE9\x91\x91",
+ "\xCA\xFD" => "\xE9\x91\x92",
+ "\xCA\xFE" => "\xE9\xBE\x95",
+ "\xCB\xA1" => "\xE5\x8C\xA3",
+ "\xCB\xA2" => "\xE5\xB2\xAC",
+ "\xCB\xA3" => "\xE7\x94\xB2",
+ "\xCB\xA4" => "\xE8\x83\x9B",
+ "\xCB\xA5" => "\xE9\x89\x80",
+ "\xCB\xA6" => "\xE9\x96\x98",
+ "\xCB\xA7" => "\xE5\x89\x9B",
+ "\xCB\xA8" => "\xE5\xA0\x88",
+ "\xCB\xA9" => "\xE5\xA7\x9C",
+ "\xCB\xAA" => "\xE5\xB2\xA1",
+ "\xCB\xAB" => "\xE5\xB4\x97",
+ "\xCB\xAC" => "\xE5\xBA\xB7",
+ "\xCB\xAD" => "\xE5\xBC\xBA",
+ "\xCB\xAE" => "\xE5\xBD\x8A",
+ "\xCB\xAF" => "\xE6\x85\xB7",
+ "\xCB\xB0" => "\xE6\xB1\x9F",
+ "\xCB\xB1" => "\xE7\x95\xBA",
+ "\xCB\xB2" => "\xE7\x96\x86",
+ "\xCB\xB3" => "\xE7\xB3\xA0",
+ "\xCB\xB4" => "\xE7\xB5\xB3",
+ "\xCB\xB5" => "\xE7\xB6\xB1",
+ "\xCB\xB6" => "\xE7\xBE\x8C",
+ "\xCB\xB7" => "\xE8\x85\x94",
+ "\xCB\xB8" => "\xE8\x88\xA1",
+ "\xCB\xB9" => "\xE8\x96\x91",
+ "\xCB\xBA" => "\xE8\xA5\x81",
+ "\xCB\xBB" => "\xE8\xAC\x9B",
+ "\xCB\xBC" => "\xE9\x8B\xBC",
+ "\xCB\xBD" => "\xE9\x99\x8D",
+ "\xCB\xBE" => "\xE9\xB1\x87",
+ "\xCB\xBF" => "\xE4\xBB\x8B",
+ "\xCB\xC0" => "\xE4\xBB\xB7",
+ "\xCB\xC1" => "\xE5\x80\x8B",
+ "\xCB\xC2" => "\xE5\x87\xB1",
+ "\xCB\xC3" => "\xE5\xA1\x8F",
+ "\xCB\xC4" => "\xE6\x84\xB7",
+ "\xCB\xC5" => "\xE6\x84\xBE",
+ "\xCB\xC6" => "\xE6\x85\xA8",
+ "\xCB\xC7" => "\xE6\x94\xB9",
+ "\xCB\xC8" => "\xE6\xA7\xAA",
+ "\xCB\xC9" => "\xE6\xBC\x91",
+ "\xCB\xCA" => "\xE7\x96\xA5",
+ "\xCB\xCB" => "\xE7\x9A\x86",
+ "\xCB\xCC" => "\xE7\x9B\x96",
+ "\xCB\xCD" => "\xE7\xAE\x87",
+ "\xCB\xCE" => "\xE8\x8A\xA5",
+ "\xCB\xCF" => "\xE8\x93\x8B",
+ "\xCB\xD0" => "\xEF\xA4\x80",
+ "\xCB\xD1" => "\xE9\x8E\xA7",
+ "\xCB\xD2" => "\xE9\x96\x8B",
+ "\xCB\xD3" => "\xE5\x96\x80",
+ "\xCB\xD4" => "\xE5\xAE\xA2",
+ "\xCB\xD5" => "\xE5\x9D\x91",
+ "\xCB\xD6" => "\xEF\xA4\x81",
+ "\xCB\xD7" => "\xE7\xB2\xB3",
+ "\xCB\xD8" => "\xE7\xBE\xB9",
+ "\xCB\xD9" => "\xE9\x86\xB5",
+ "\xCB\xDA" => "\xE5\x80\xA8",
+ "\xCB\xDB" => "\xE5\x8E\xBB",
+ "\xCB\xDC" => "\xE5\xB1\x85",
+ "\xCB\xDD" => "\xE5\xB7\xA8",
+ "\xCB\xDE" => "\xE6\x8B\x92",
+ "\xCB\xDF" => "\xE6\x8D\xAE",
+ "\xCB\xE0" => "\xE6\x93\x9A",
+ "\xCB\xE1" => "\xE6\x93\xA7",
+ "\xCB\xE2" => "\xE6\xB8\xA0",
+ "\xCB\xE3" => "\xE7\x82\xAC",
+ "\xCB\xE4" => "\xE7\xA5\x9B",
+ "\xCB\xE5" => "\xE8\xB7\x9D",
+ "\xCB\xE6" => "\xE8\xB8\x9E",
+ "\xCB\xE7" => "\xEF\xA4\x82",
+ "\xCB\xE8" => "\xE9\x81\xBD",
+ "\xCB\xE9" => "\xE9\x89\x85",
+ "\xCB\xEA" => "\xE9\x8B\xB8",
+ "\xCB\xEB" => "\xE4\xB9\xBE",
+ "\xCB\xEC" => "\xE4\xBB\xB6",
+ "\xCB\xED" => "\xE5\x81\xA5",
+ "\xCB\xEE" => "\xE5\xB7\xBE",
+ "\xCB\xEF" => "\xE5\xBB\xBA",
+ "\xCB\xF0" => "\xE6\x84\x86",
+ "\xCB\xF1" => "\xE6\xA5\x97",
+ "\xCB\xF2" => "\xE8\x85\xB1",
+ "\xCB\xF3" => "\xE8\x99\x94",
+ "\xCB\xF4" => "\xE8\xB9\x87",
+ "\xCB\xF5" => "\xE9\x8D\xB5",
+ "\xCB\xF6" => "\xE9\xA8\xAB",
+ "\xCB\xF7" => "\xE4\xB9\x9E",
+ "\xCB\xF8" => "\xE5\x82\x91",
+ "\xCB\xF9" => "\xE6\x9D\xB0",
+ "\xCB\xFA" => "\xE6\xA1\x80",
+ "\xCB\xFB" => "\xE5\x84\x89",
+ "\xCB\xFC" => "\xE5\x8A\x8D",
+ "\xCB\xFD" => "\xE5\x8A\x92",
+ "\xCB\xFE" => "\xE6\xAA\xA2",
+ "\xCC\xA1" => "\xE7\x9E\xBC",
+ "\xCC\xA2" => "\xE9\x88\x90",
+ "\xCC\xA3" => "\xE9\xBB\x94",
+ "\xCC\xA4" => "\xE5\x8A\xAB",
+ "\xCC\xA5" => "\xE6\x80\xAF",
+ "\xCC\xA6" => "\xE8\xBF\xB2",
+ "\xCC\xA7" => "\xE5\x81\x88",
+ "\xCC\xA8" => "\xE6\x86\xA9",
+ "\xCC\xA9" => "\xE6\x8F\xAD",
+ "\xCC\xAA" => "\xE6\x93\x8A",
+ "\xCC\xAB" => "\xE6\xA0\xBC",
+ "\xCC\xAC" => "\xE6\xAA\x84",
+ "\xCC\xAD" => "\xE6\xBF\x80",
+ "\xCC\xAE" => "\xE8\x86\x88",
+ "\xCC\xAF" => "\xE8\xA6\xA1",
+ "\xCC\xB0" => "\xE9\x9A\x94",
+ "\xCC\xB1" => "\xE5\xA0\x85",
+ "\xCC\xB2" => "\xE7\x89\xBD",
+ "\xCC\xB3" => "\xE7\x8A\xAC",
+ "\xCC\xB4" => "\xE7\x94\x84",
+ "\xCC\xB5" => "\xE7\xB5\xB9",
+ "\xCC\xB6" => "\xE7\xB9\xAD",
+ "\xCC\xB7" => "\xE8\x82\xA9",
+ "\xCC\xB8" => "\xE8\xA6\x8B",
+ "\xCC\xB9" => "\xE8\xAD\xB4",
+ "\xCC\xBA" => "\xE9\x81\xA3",
+ "\xCC\xBB" => "\xE9\xB5\x91",
+ "\xCC\xBC" => "\xE6\x8A\x89",
+ "\xCC\xBD" => "\xE6\xB1\xBA",
+ "\xCC\xBE" => "\xE6\xBD\x94",
+ "\xCC\xBF" => "\xE7\xB5\x90",
+ "\xCC\xC0" => "\xE7\xBC\xBA",
+ "\xCC\xC1" => "\xE8\xA8\xA3",
+ "\xCC\xC2" => "\xE5\x85\xBC",
+ "\xCC\xC3" => "\xE6\x85\x8A",
+ "\xCC\xC4" => "\xE7\xAE\x9D",
+ "\xCC\xC5" => "\xE8\xAC\x99",
+ "\xCC\xC6" => "\xE9\x89\x97",
+ "\xCC\xC7" => "\xE9\x8E\x8C",
+ "\xCC\xC8" => "\xE4\xBA\xAC",
+ "\xCC\xC9" => "\xE4\xBF\x93",
+ "\xCC\xCA" => "\xE5\x80\x9E",
+ "\xCC\xCB" => "\xE5\x82\xBE",
+ "\xCC\xCC" => "\xE5\x84\x86",
+ "\xCC\xCD" => "\xE5\x8B\x81",
+ "\xCC\xCE" => "\xE5\x8B\x8D",
+ "\xCC\xCF" => "\xE5\x8D\xBF",
+ "\xCC\xD0" => "\xE5\x9D\xB0",
+ "\xCC\xD1" => "\xE5\xA2\x83",
+ "\xCC\xD2" => "\xE5\xBA\x9A",
+ "\xCC\xD3" => "\xE5\xBE\x91",
+ "\xCC\xD4" => "\xE6\x85\xB6",
+ "\xCC\xD5" => "\xE6\x86\xAC",
+ "\xCC\xD6" => "\xE6\x93\x8E",
+ "\xCC\xD7" => "\xE6\x95\xAC",
+ "\xCC\xD8" => "\xE6\x99\xAF",
+ "\xCC\xD9" => "\xE6\x9A\xBB",
+ "\xCC\xDA" => "\xE6\x9B\xB4",
+ "\xCC\xDB" => "\xE6\xA2\x97",
+ "\xCC\xDC" => "\xE6\xB6\x87",
+ "\xCC\xDD" => "\xE7\x82\x85",
+ "\xCC\xDE" => "\xE7\x83\xB1",
+ "\xCC\xDF" => "\xE7\x92\x9F",
+ "\xCC\xE0" => "\xE7\x92\xA5",
+ "\xCC\xE1" => "\xE7\x93\x8A",
+ "\xCC\xE2" => "\xE7\x97\x99",
+ "\xCC\xE3" => "\xE7\xA1\xAC",
+ "\xCC\xE4" => "\xE7\xA3\xAC",
+ "\xCC\xE5" => "\xE7\xAB\x9F",
+ "\xCC\xE6" => "\xE7\xAB\xB6",
+ "\xCC\xE7" => "\xE7\xB5\x85",
+ "\xCC\xE8" => "\xE7\xB6\x93",
+ "\xCC\xE9" => "\xE8\x80\x95",
+ "\xCC\xEA" => "\xE8\x80\xBF",
+ "\xCC\xEB" => "\xE8\x84\x9B",
+ "\xCC\xEC" => "\xE8\x8E\x96",
+ "\xCC\xED" => "\xE8\xAD\xA6",
+ "\xCC\xEE" => "\xE8\xBC\x95",
+ "\xCC\xEF" => "\xE9\x80\x95",
+ "\xCC\xF0" => "\xE9\x8F\xA1",
+ "\xCC\xF1" => "\xE9\xA0\x83",
+ "\xCC\xF2" => "\xE9\xA0\xB8",
+ "\xCC\xF3" => "\xE9\xA9\x9A",
+ "\xCC\xF4" => "\xE9\xAF\xA8",
+ "\xCC\xF5" => "\xE4\xBF\x82",
+ "\xCC\xF6" => "\xE5\x95\x93",
+ "\xCC\xF7" => "\xE5\xA0\xBA",
+ "\xCC\xF8" => "\xE5\xA5\x91",
+ "\xCC\xF9" => "\xE5\xAD\xA3",
+ "\xCC\xFA" => "\xE5\xB1\x86",
+ "\xCC\xFB" => "\xE6\x82\xB8",
+ "\xCC\xFC" => "\xE6\x88\x92",
+ "\xCC\xFD" => "\xE6\xA1\x82",
+ "\xCC\xFE" => "\xE6\xA2\xB0",
+ "\xCD\xA1" => "\xE6\xA3\xA8",
+ "\xCD\xA2" => "\xE6\xBA\xAA",
+ "\xCD\xA3" => "\xE7\x95\x8C",
+ "\xCD\xA4" => "\xE7\x99\xB8",
+ "\xCD\xA5" => "\xE7\xA3\x8E",
+ "\xCD\xA6" => "\xE7\xA8\xBD",
+ "\xCD\xA7" => "\xE7\xB3\xBB",
+ "\xCD\xA8" => "\xE7\xB9\xAB",
+ "\xCD\xA9" => "\xE7\xB9\xBC",
+ "\xCD\xAA" => "\xE8\xA8\x88",
+ "\xCD\xAB" => "\xE8\xAA\xA1",
+ "\xCD\xAC" => "\xE8\xB0\xBF",
+ "\xCD\xAD" => "\xE9\x9A\x8E",
+ "\xCD\xAE" => "\xE9\xB7\x84",
+ "\xCD\xAF" => "\xE5\x8F\xA4",
+ "\xCD\xB0" => "\xE5\x8F\xA9",
+ "\xCD\xB1" => "\xE5\x91\x8A",
+ "\xCD\xB2" => "\xE5\x91\xB1",
+ "\xCD\xB3" => "\xE5\x9B\xBA",
+ "\xCD\xB4" => "\xE5\xA7\x91",
+ "\xCD\xB5" => "\xE5\xAD\xA4",
+ "\xCD\xB6" => "\xE5\xB0\xBB",
+ "\xCD\xB7" => "\xE5\xBA\xAB",
+ "\xCD\xB8" => "\xE6\x8B\xB7",
+ "\xCD\xB9" => "\xE6\x94\xB7",
+ "\xCD\xBA" => "\xE6\x95\x85",
+ "\xCD\xBB" => "\xE6\x95\xB2",
+ "\xCD\xBC" => "\xE6\x9A\xA0",
+ "\xCD\xBD" => "\xE6\x9E\xAF",
+ "\xCD\xBE" => "\xE6\xA7\x81",
+ "\xCD\xBF" => "\xE6\xB2\xBD",
+ "\xCD\xC0" => "\xE7\x97\xBC",
+ "\xCD\xC1" => "\xE7\x9A\x90",
+ "\xCD\xC2" => "\xE7\x9D\xBE",
+ "\xCD\xC3" => "\xE7\xA8\xBF",
+ "\xCD\xC4" => "\xE7\xBE\x94",
+ "\xCD\xC5" => "\xE8\x80\x83",
+ "\xCD\xC6" => "\xE8\x82\xA1",
+ "\xCD\xC7" => "\xE8\x86\x8F",
+ "\xCD\xC8" => "\xE8\x8B\xA6",
+ "\xCD\xC9" => "\xE8\x8B\xBD",
+ "\xCD\xCA" => "\xE8\x8F\xB0",
+ "\xCD\xCB" => "\xE8\x97\x81",
+ "\xCD\xCC" => "\xE8\xA0\xB1",
+ "\xCD\xCD" => "\xE8\xA2\xB4",
+ "\xCD\xCE" => "\xE8\xAA\xA5",
+ "\xCD\xCF" => "\xEF\xA4\x83",
+ "\xCD\xD0" => "\xE8\xBE\x9C",
+ "\xCD\xD1" => "\xE9\x8C\xAE",
+ "\xCD\xD2" => "\xE9\x9B\x87",
+ "\xCD\xD3" => "\xE9\xA1\xA7",
+ "\xCD\xD4" => "\xE9\xAB\x98",
+ "\xCD\xD5" => "\xE9\xBC\x93",
+ "\xCD\xD6" => "\xE5\x93\xAD",
+ "\xCD\xD7" => "\xE6\x96\x9B",
+ "\xCD\xD8" => "\xE6\x9B\xB2",
+ "\xCD\xD9" => "\xE6\xA2\x8F",
+ "\xCD\xDA" => "\xE7\xA9\x80",
+ "\xCD\xDB" => "\xE8\xB0\xB7",
+ "\xCD\xDC" => "\xE9\xB5\xA0",
+ "\xCD\xDD" => "\xE5\x9B\xB0",
+ "\xCD\xDE" => "\xE5\x9D\xA4",
+ "\xCD\xDF" => "\xE5\xB4\x91",
+ "\xCD\xE0" => "\xE6\x98\x86",
+ "\xCD\xE1" => "\xE6\xA2\xB1",
+ "\xCD\xE2" => "\xE6\xA3\x8D",
+ "\xCD\xE3" => "\xE6\xBB\xBE",
+ "\xCD\xE4" => "\xE7\x90\xA8",
+ "\xCD\xE5" => "\xE8\xA2\x9E",
+ "\xCD\xE6" => "\xE9\xAF\xA4",
+ "\xCD\xE7" => "\xE6\xB1\xA8",
+ "\xCD\xE8" => "\xEF\xA4\x84",
+ "\xCD\xE9" => "\xE9\xAA\xA8",
+ "\xCD\xEA" => "\xE4\xBE\x9B",
+ "\xCD\xEB" => "\xE5\x85\xAC",
+ "\xCD\xEC" => "\xE5\x85\xB1",
+ "\xCD\xED" => "\xE5\x8A\x9F",
+ "\xCD\xEE" => "\xE5\xAD\x94",
+ "\xCD\xEF" => "\xE5\xB7\xA5",
+ "\xCD\xF0" => "\xE6\x81\x90",
+ "\xCD\xF1" => "\xE6\x81\xAD",
+ "\xCD\xF2" => "\xE6\x8B\xB1",
+ "\xCD\xF3" => "\xE6\x8E\xA7",
+ "\xCD\xF4" => "\xE6\x94\xBB",
+ "\xCD\xF5" => "\xE7\x8F\x99",
+ "\xCD\xF6" => "\xE7\xA9\xBA",
+ "\xCD\xF7" => "\xE8\x9A\xA3",
+ "\xCD\xF8" => "\xE8\xB2\xA2",
+ "\xCD\xF9" => "\xE9\x9E\x8F",
+ "\xCD\xFA" => "\xE4\xB8\xB2",
+ "\xCD\xFB" => "\xE5\xAF\xA1",
+ "\xCD\xFC" => "\xE6\x88\x88",
+ "\xCD\xFD" => "\xE6\x9E\x9C",
+ "\xCD\xFE" => "\xE7\x93\x9C",
+ "\xCE\xA1" => "\xE7\xA7\x91",
+ "\xCE\xA2" => "\xE8\x8F\x93",
+ "\xCE\xA3" => "\xE8\xAA\x87",
+ "\xCE\xA4" => "\xE8\xAA\xB2",
+ "\xCE\xA5" => "\xE8\xB7\xA8",
+ "\xCE\xA6" => "\xE9\x81\x8E",
+ "\xCE\xA7" => "\xE9\x8D\x8B",
+ "\xCE\xA8" => "\xE9\xA1\x86",
+ "\xCE\xA9" => "\xE5\xBB\x93",
+ "\xCE\xAA" => "\xE6\xA7\xA8",
+ "\xCE\xAB" => "\xE8\x97\xBF",
+ "\xCE\xAC" => "\xE9\x83\xAD",
+ "\xCE\xAD" => "\xEF\xA4\x85",
+ "\xCE\xAE" => "\xE5\x86\xA0",
+ "\xCE\xAF" => "\xE5\xAE\x98",
+ "\xCE\xB0" => "\xE5\xAF\xAC",
+ "\xCE\xB1" => "\xE6\x85\xA3",
+ "\xCE\xB2" => "\xE6\xA3\xBA",
+ "\xCE\xB3" => "\xE6\xAC\xBE",
+ "\xCE\xB4" => "\xE7\x81\x8C",
+ "\xCE\xB5" => "\xE7\x90\xAF",
+ "\xCE\xB6" => "\xE7\x93\x98",
+ "\xCE\xB7" => "\xE7\xAE\xA1",
+ "\xCE\xB8" => "\xE7\xBD\x90",
+ "\xCE\xB9" => "\xE8\x8F\x85",
+ "\xCE\xBA" => "\xE8\xA7\x80",
+ "\xCE\xBB" => "\xE8\xB2\xAB",
+ "\xCE\xBC" => "\xE9\x97\x9C",
+ "\xCE\xBD" => "\xE9\xA4\xA8",
+ "\xCE\xBE" => "\xE5\x88\xAE",
+ "\xCE\xBF" => "\xE6\x81\x9D",
+ "\xCE\xC0" => "\xE6\x8B\xAC",
+ "\xCE\xC1" => "\xE9\x80\x82",
+ "\xCE\xC2" => "\xE4\xBE\x8A",
+ "\xCE\xC3" => "\xE5\x85\x89",
+ "\xCE\xC4" => "\xE5\x8C\xA1",
+ "\xCE\xC5" => "\xE5\xA3\x99",
+ "\xCE\xC6" => "\xE5\xBB\xA3",
+ "\xCE\xC7" => "\xE6\x9B\xA0",
+ "\xCE\xC8" => "\xE6\xB4\xB8",
+ "\xCE\xC9" => "\xE7\x82\x9A",
+ "\xCE\xCA" => "\xE7\x8B\x82",
+ "\xCE\xCB" => "\xE7\x8F\x96",
+ "\xCE\xCC" => "\xE7\xAD\x90",
+ "\xCE\xCD" => "\xE8\x83\xB1",
+ "\xCE\xCE" => "\xE9\x91\x9B",
+ "\xCE\xCF" => "\xE5\x8D\xA6",
+ "\xCE\xD0" => "\xE6\x8E\x9B",
+ "\xCE\xD1" => "\xE7\xBD\xAB",
+ "\xCE\xD2" => "\xE4\xB9\x96",
+ "\xCE\xD3" => "\xE5\x82\x80",
+ "\xCE\xD4" => "\xE5\xA1\x8A",
+ "\xCE\xD5" => "\xE5\xA3\x9E",
+ "\xCE\xD6" => "\xE6\x80\xAA",
+ "\xCE\xD7" => "\xE6\x84\xA7",
+ "\xCE\xD8" => "\xE6\x8B\x90",
+ "\xCE\xD9" => "\xE6\xA7\x90",
+ "\xCE\xDA" => "\xE9\xAD\x81",
+ "\xCE\xDB" => "\xE5\xAE\x8F",
+ "\xCE\xDC" => "\xE7\xB4\x98",
+ "\xCE\xDD" => "\xE8\x82\xB1",
+ "\xCE\xDE" => "\xE8\xBD\x9F",
+ "\xCE\xDF" => "\xE4\xBA\xA4",
+ "\xCE\xE0" => "\xE5\x83\x91",
+ "\xCE\xE1" => "\xE5\x92\xAC",
+ "\xCE\xE2" => "\xE5\x96\xAC",
+ "\xCE\xE3" => "\xE5\xAC\x8C",
+ "\xCE\xE4" => "\xE5\xB6\xA0",
+ "\xCE\xE5" => "\xE5\xB7\xA7",
+ "\xCE\xE6" => "\xE6\x94\xAA",
+ "\xCE\xE7" => "\xE6\x95\x8E",
+ "\xCE\xE8" => "\xE6\xA0\xA1",
+ "\xCE\xE9" => "\xE6\xA9\x8B",
+ "\xCE\xEA" => "\xE7\x8B\xA1",
+ "\xCE\xEB" => "\xE7\x9A\x8E",
+ "\xCE\xEC" => "\xE7\x9F\xAF",
+ "\xCE\xED" => "\xE7\xB5\x9E",
+ "\xCE\xEE" => "\xE7\xBF\xB9",
+ "\xCE\xEF" => "\xE8\x86\xA0",
+ "\xCE\xF0" => "\xE8\x95\x8E",
+ "\xCE\xF1" => "\xE8\x9B\x9F",
+ "\xCE\xF2" => "\xE8\xBC\x83",
+ "\xCE\xF3" => "\xE8\xBD\x8E",
+ "\xCE\xF4" => "\xE9\x83\x8A",
+ "\xCE\xF5" => "\xE9\xA4\x83",
+ "\xCE\xF6" => "\xE9\xA9\x95",
+ "\xCE\xF7" => "\xE9\xAE\xAB",
+ "\xCE\xF8" => "\xE4\xB8\x98",
+ "\xCE\xF9" => "\xE4\xB9\x85",
+ "\xCE\xFA" => "\xE4\xB9\x9D",
+ "\xCE\xFB" => "\xE4\xBB\x87",
+ "\xCE\xFC" => "\xE4\xBF\xB1",
+ "\xCE\xFD" => "\xE5\x85\xB7",
+ "\xCE\xFE" => "\xE5\x8B\xBE",
+ "\xCF\xA1" => "\xE5\x8D\x80",
+ "\xCF\xA2" => "\xE5\x8F\xA3",
+ "\xCF\xA3" => "\xE5\x8F\xA5",
+ "\xCF\xA4" => "\xE5\x92\x8E",
+ "\xCF\xA5" => "\xE5\x98\x94",
+ "\xCF\xA6" => "\xE5\x9D\xB5",
+ "\xCF\xA7" => "\xE5\x9E\xA2",
+ "\xCF\xA8" => "\xE5\xAF\x87",
+ "\xCF\xA9" => "\xE5\xB6\x87",
+ "\xCF\xAA" => "\xE5\xBB\x90",
+ "\xCF\xAB" => "\xE6\x87\xBC",
+ "\xCF\xAC" => "\xE6\x8B\x98",
+ "\xCF\xAD" => "\xE6\x95\x91",
+ "\xCF\xAE" => "\xE6\x9E\xB8",
+ "\xCF\xAF" => "\xE6\x9F\xA9",
+ "\xCF\xB0" => "\xE6\xA7\x8B",
+ "\xCF\xB1" => "\xE6\xAD\x90",
+ "\xCF\xB2" => "\xE6\xAF\x86",
+ "\xCF\xB3" => "\xE6\xAF\xAC",
+ "\xCF\xB4" => "\xE6\xB1\x82",
+ "\xCF\xB5" => "\xE6\xBA\x9D",
+ "\xCF\xB6" => "\xE7\x81\xB8",
+ "\xCF\xB7" => "\xE7\x8B\x97",
+ "\xCF\xB8" => "\xE7\x8E\x96",
+ "\xCF\xB9" => "\xE7\x90\x83",
+ "\xCF\xBA" => "\xE7\x9E\xBF",
+ "\xCF\xBB" => "\xE7\x9F\xA9",
+ "\xCF\xBC" => "\xE7\xA9\xB6",
+ "\xCF\xBD" => "\xE7\xB5\xBF",
+ "\xCF\xBE" => "\xE8\x80\x89",
+ "\xCF\xBF" => "\xE8\x87\xBC",
+ "\xCF\xC0" => "\xE8\x88\x85",
+ "\xCF\xC1" => "\xE8\x88\x8A",
+ "\xCF\xC2" => "\xE8\x8B\x9F",
+ "\xCF\xC3" => "\xE8\xA1\xA2",
+ "\xCF\xC4" => "\xE8\xAC\xB3",
+ "\xCF\xC5" => "\xE8\xB3\xBC",
+ "\xCF\xC6" => "\xE8\xBB\x80",
+ "\xCF\xC7" => "\xE9\x80\x91",
+ "\xCF\xC8" => "\xE9\x82\xB1",
+ "\xCF\xC9" => "\xE9\x89\xA4",
+ "\xCF\xCA" => "\xE9\x8A\xB6",
+ "\xCF\xCB" => "\xE9\xA7\x92",
+ "\xCF\xCC" => "\xE9\xA9\x85",
+ "\xCF\xCD" => "\xE9\xB3\xA9",
+ "\xCF\xCE" => "\xE9\xB7\x97",
+ "\xCF\xCF" => "\xE9\xBE\x9C",
+ "\xCF\xD0" => "\xE5\x9C\x8B",
+ "\xCF\xD1" => "\xE5\xB1\x80",
+ "\xCF\xD2" => "\xE8\x8F\x8A",
+ "\xCF\xD3" => "\xE9\x9E\xA0",
+ "\xCF\xD4" => "\xE9\x9E\xAB",
+ "\xCF\xD5" => "\xE9\xBA\xB4",
+ "\xCF\xD6" => "\xE5\x90\x9B",
+ "\xCF\xD7" => "\xE7\xAA\x98",
+ "\xCF\xD8" => "\xE7\xBE\xA4",
+ "\xCF\xD9" => "\xE8\xA3\x99",
+ "\xCF\xDA" => "\xE8\xBB\x8D",
+ "\xCF\xDB" => "\xE9\x83\xA1",
+ "\xCF\xDC" => "\xE5\xA0\x80",
+ "\xCF\xDD" => "\xE5\xB1\x88",
+ "\xCF\xDE" => "\xE6\x8E\x98",
+ "\xCF\xDF" => "\xE7\xAA\x9F",
+ "\xCF\xE0" => "\xE5\xAE\xAE",
+ "\xCF\xE1" => "\xE5\xBC\x93",
+ "\xCF\xE2" => "\xE7\xA9\xB9",
+ "\xCF\xE3" => "\xE7\xAA\xAE",
+ "\xCF\xE4" => "\xE8\x8A\x8E",
+ "\xCF\xE5" => "\xE8\xBA\xAC",
+ "\xCF\xE6" => "\xE5\x80\xA6",
+ "\xCF\xE7" => "\xE5\x88\xB8",
+ "\xCF\xE8" => "\xE5\x8B\xB8",
+ "\xCF\xE9" => "\xE5\x8D\xB7",
+ "\xCF\xEA" => "\xE5\x9C\x88",
+ "\xCF\xEB" => "\xE6\x8B\xB3",
+ "\xCF\xEC" => "\xE6\x8D\xB2",
+ "\xCF\xED" => "\xE6\xAC\x8A",
+ "\xCF\xEE" => "\xE6\xB7\x83",
+ "\xCF\xEF" => "\xE7\x9C\xB7",
+ "\xCF\xF0" => "\xE5\x8E\xA5",
+ "\xCF\xF1" => "\xE7\x8D\x97",
+ "\xCF\xF2" => "\xE8\x95\xA8",
+ "\xCF\xF3" => "\xE8\xB9\xB6",
+ "\xCF\xF4" => "\xE9\x97\x95",
+ "\xCF\xF5" => "\xE6\x9C\xBA",
+ "\xCF\xF6" => "\xE6\xAB\x83",
+ "\xCF\xF7" => "\xE6\xBD\xB0",
+ "\xCF\xF8" => "\xE8\xA9\xAD",
+ "\xCF\xF9" => "\xE8\xBB\x8C",
+ "\xCF\xFA" => "\xE9\xA5\x8B",
+ "\xCF\xFB" => "\xEF\xA4\x86",
+ "\xCF\xFC" => "\xE6\x99\xB7",
+ "\xCF\xFD" => "\xE6\xAD\xB8",
+ "\xCF\xFE" => "\xE8\xB2\xB4",
+ "\xD0\xA1" => "\xE9\xAC\xBC",
+ "\xD0\xA2" => "\xEF\xA4\x87",
+ "\xD0\xA3" => "\xE5\x8F\xAB",
+ "\xD0\xA4" => "\xE5\x9C\xAD",
+ "\xD0\xA5" => "\xE5\xA5\x8E",
+ "\xD0\xA6" => "\xE6\x8F\x86",
+ "\xD0\xA7" => "\xE6\xA7\xBB",
+ "\xD0\xA8" => "\xE7\x8F\xAA",
+ "\xD0\xA9" => "\xE7\xA1\x85",
+ "\xD0\xAA" => "\xE7\xAA\xBA",
+ "\xD0\xAB" => "\xE7\xAB\x85",
+ "\xD0\xAC" => "\xE7\xB3\xBE",
+ "\xD0\xAD" => "\xE8\x91\xB5",
+ "\xD0\xAE" => "\xE8\xA6\x8F",
+ "\xD0\xAF" => "\xE8\xB5\xB3",
+ "\xD0\xB0" => "\xE9\x80\xB5",
+ "\xD0\xB1" => "\xE9\x96\xA8",
+ "\xD0\xB2" => "\xE5\x8B\xBB",
+ "\xD0\xB3" => "\xE5\x9D\x87",
+ "\xD0\xB4" => "\xE7\x95\x87",
+ "\xD0\xB5" => "\xE7\xAD\xA0",
+ "\xD0\xB6" => "\xE8\x8F\x8C",
+ "\xD0\xB7" => "\xE9\x88\x9E",
+ "\xD0\xB8" => "\xEF\xA4\x88",
+ "\xD0\xB9" => "\xE6\xA9\x98",
+ "\xD0\xBA" => "\xE5\x85\x8B",
+ "\xD0\xBB" => "\xE5\x89\x8B",
+ "\xD0\xBC" => "\xE5\x8A\x87",
+ "\xD0\xBD" => "\xE6\x88\x9F",
+ "\xD0\xBE" => "\xE6\xA3\x98",
+ "\xD0\xBF" => "\xE6\xA5\xB5",
+ "\xD0\xC0" => "\xE9\x9A\x99",
+ "\xD0\xC1" => "\xE5\x83\x85",
+ "\xD0\xC2" => "\xE5\x8A\xA4",
+ "\xD0\xC3" => "\xE5\x8B\xA4",
+ "\xD0\xC4" => "\xE6\x87\x83",
+ "\xD0\xC5" => "\xE6\x96\xA4",
+ "\xD0\xC6" => "\xE6\xA0\xB9",
+ "\xD0\xC7" => "\xE6\xA7\xBF",
+ "\xD0\xC8" => "\xE7\x91\xBE",
+ "\xD0\xC9" => "\xE7\xAD\x8B",
+ "\xD0\xCA" => "\xE8\x8A\xB9",
+ "\xD0\xCB" => "\xE8\x8F\xAB",
+ "\xD0\xCC" => "\xE8\xA6\xB2",
+ "\xD0\xCD" => "\xE8\xAC\xB9",
+ "\xD0\xCE" => "\xE8\xBF\x91",
+ "\xD0\xCF" => "\xE9\xA5\x89",
+ "\xD0\xD0" => "\xEF\xA4\x89",
+ "\xD0\xD1" => "\xE4\xBB\x8A",
+ "\xD0\xD2" => "\xE5\xA6\x97",
+ "\xD0\xD3" => "\xE6\x93\x92",
+ "\xD0\xD4" => "\xE6\x98\x91",
+ "\xD0\xD5" => "\xE6\xAA\x8E",
+ "\xD0\xD6" => "\xE7\x90\xB4",
+ "\xD0\xD7" => "\xE7\xA6\x81",
+ "\xD0\xD8" => "\xE7\xA6\xBD",
+ "\xD0\xD9" => "\xE8\x8A\xA9",
+ "\xD0\xDA" => "\xE8\xA1\xBE",
+ "\xD0\xDB" => "\xE8\xA1\xBF",
+ "\xD0\xDC" => "\xE8\xA5\x9F",
+ "\xD0\xDD" => "\xEF\xA4\x8A",
+ "\xD0\xDE" => "\xE9\x8C\xA6",
+ "\xD0\xDF" => "\xE4\xBC\x8B",
+ "\xD0\xE0" => "\xE5\x8F\x8A",
+ "\xD0\xE1" => "\xE6\x80\xA5",
+ "\xD0\xE2" => "\xE6\x89\xB1",
+ "\xD0\xE3" => "\xE6\xB1\xB2",
+ "\xD0\xE4" => "\xE7\xB4\x9A",
+ "\xD0\xE5" => "\xE7\xB5\xA6",
+ "\xD0\xE6" => "\xE4\xBA\x98",
+ "\xD0\xE7" => "\xE5\x85\xA2",
+ "\xD0\xE8" => "\xE7\x9F\x9C",
+ "\xD0\xE9" => "\xE8\x82\xAF",
+ "\xD0\xEA" => "\xE4\xBC\x81",
+ "\xD0\xEB" => "\xE4\xBC\x8E",
+ "\xD0\xEC" => "\xE5\x85\xB6",
+ "\xD0\xED" => "\xE5\x86\x80",
+ "\xD0\xEE" => "\xE5\x97\x9C",
+ "\xD0\xEF" => "\xE5\x99\xA8",
+ "\xD0\xF0" => "\xE5\x9C\xBB",
+ "\xD0\xF1" => "\xE5\x9F\xBA",
+ "\xD0\xF2" => "\xE5\x9F\xBC",
+ "\xD0\xF3" => "\xE5\xA4\x94",
+ "\xD0\xF4" => "\xE5\xA5\x87",
+ "\xD0\xF5" => "\xE5\xA6\x93",
+ "\xD0\xF6" => "\xE5\xAF\x84",
+ "\xD0\xF7" => "\xE5\xB2\x90",
+ "\xD0\xF8" => "\xE5\xB4\x8E",
+ "\xD0\xF9" => "\xE5\xB7\xB1",
+ "\xD0\xFA" => "\xE5\xB9\xBE",
+ "\xD0\xFB" => "\xE5\xBF\x8C",
+ "\xD0\xFC" => "\xE6\x8A\x80",
+ "\xD0\xFD" => "\xE6\x97\x97",
+ "\xD0\xFE" => "\xE6\x97\xA3",
+ "\xD1\xA1" => "\xE6\x9C\x9E",
+ "\xD1\xA2" => "\xE6\x9C\x9F",
+ "\xD1\xA3" => "\xE6\x9D\x9E",
+ "\xD1\xA4" => "\xE6\xA3\x8B",
+ "\xD1\xA5" => "\xE6\xA3\x84",
+ "\xD1\xA6" => "\xE6\xA9\x9F",
+ "\xD1\xA7" => "\xE6\xAC\xBA",
+ "\xD1\xA8" => "\xE6\xB0\xA3",
+ "\xD1\xA9" => "\xE6\xB1\xBD",
+ "\xD1\xAA" => "\xE6\xB2\x82",
+ "\xD1\xAB" => "\xE6\xB7\x87",
+ "\xD1\xAC" => "\xE7\x8E\x98",
+ "\xD1\xAD" => "\xE7\x90\xA6",
+ "\xD1\xAE" => "\xE7\x90\xAA",
+ "\xD1\xAF" => "\xE7\x92\x82",
+ "\xD1\xB0" => "\xE7\x92\xA3",
+ "\xD1\xB1" => "\xE7\x95\xB8",
+ "\xD1\xB2" => "\xE7\x95\xBF",
+ "\xD1\xB3" => "\xE7\xA2\x81",
+ "\xD1\xB4" => "\xE7\xA3\xAF",
+ "\xD1\xB5" => "\xE7\xA5\x81",
+ "\xD1\xB6" => "\xE7\xA5\x87",
+ "\xD1\xB7" => "\xE7\xA5\x88",
+ "\xD1\xB8" => "\xE7\xA5\xBA",
+ "\xD1\xB9" => "\xE7\xAE\x95",
+ "\xD1\xBA" => "\xE7\xB4\x80",
+ "\xD1\xBB" => "\xE7\xB6\xBA",
+ "\xD1\xBC" => "\xE7\xBE\x88",
+ "\xD1\xBD" => "\xE8\x80\x86",
+ "\xD1\xBE" => "\xE8\x80\xAD",
+ "\xD1\xBF" => "\xE8\x82\x8C",
+ "\xD1\xC0" => "\xE8\xA8\x98",
+ "\xD1\xC1" => "\xE8\xAD\x8F",
+ "\xD1\xC2" => "\xE8\xB1\x88",
+ "\xD1\xC3" => "\xE8\xB5\xB7",
+ "\xD1\xC4" => "\xE9\x8C\xA1",
+ "\xD1\xC5" => "\xE9\x8C\xA4",
+ "\xD1\xC6" => "\xE9\xA3\xA2",
+ "\xD1\xC7" => "\xE9\xA5\x91",
+ "\xD1\xC8" => "\xE9\xA8\x8E",
+ "\xD1\xC9" => "\xE9\xA8\x8F",
+ "\xD1\xCA" => "\xE9\xA9\xA5",
+ "\xD1\xCB" => "\xE9\xBA\x92",
+ "\xD1\xCC" => "\xE7\xB7\x8A",
+ "\xD1\xCD" => "\xE4\xBD\xB6",
+ "\xD1\xCE" => "\xE5\x90\x89",
+ "\xD1\xCF" => "\xE6\x8B\xAE",
+ "\xD1\xD0" => "\xE6\xA1\x94",
+ "\xD1\xD1" => "\xE9\x87\x91",
+ "\xD1\xD2" => "\xE5\x96\xAB",
+ "\xD1\xD3" => "\xE5\x84\xBA",
+ "\xD1\xD4" => "\xEF\xA4\x8B",
+ "\xD1\xD5" => "\xEF\xA4\x8C",
+ "\xD1\xD6" => "\xE5\xA8\x9C",
+ "\xD1\xD7" => "\xE6\x87\xA6",
+ "\xD1\xD8" => "\xEF\xA4\x8D",
+ "\xD1\xD9" => "\xE6\x8B\x8F",
+ "\xD1\xDA" => "\xE6\x8B\xBF",
+ "\xD1\xDB" => "\xEF\xA4\x8E",
+ "\xD1\xDC" => "\xEF\xA4\x8F",
+ "\xD1\xDD" => "\xEF\xA4\x90",
+ "\xD1\xDE" => "\xEF\xA4\x91",
+ "\xD1\xDF" => "\xEF\xA4\x92",
+ "\xD1\xE0" => "\xEF\xA4\x93",
+ "\xD1\xE1" => "\xE9\x82\xA3",
+ "\xD1\xE2" => "\xEF\xA4\x94",
+ "\xD1\xE3" => "\xEF\xA4\x95",
+ "\xD1\xE4" => "\xEF\xA4\x96",
+ "\xD1\xE5" => "\xEF\xA4\x97",
+ "\xD1\xE6" => "\xEF\xA4\x98",
+ "\xD1\xE7" => "\xE8\xAB\xBE",
+ "\xD1\xE8" => "\xEF\xA4\x99",
+ "\xD1\xE9" => "\xEF\xA4\x9A",
+ "\xD1\xEA" => "\xEF\xA4\x9B",
+ "\xD1\xEB" => "\xEF\xA4\x9C",
+ "\xD1\xEC" => "\xE6\x9A\x96",
+ "\xD1\xED" => "\xEF\xA4\x9D",
+ "\xD1\xEE" => "\xE7\x85\x96",
+ "\xD1\xEF" => "\xEF\xA4\x9E",
+ "\xD1\xF0" => "\xEF\xA4\x9F",
+ "\xD1\xF1" => "\xE9\x9B\xA3",
+ "\xD1\xF2" => "\xEF\xA4\xA0",
+ "\xD1\xF3" => "\xE6\x8D\x8F",
+ "\xD1\xF4" => "\xE6\x8D\xBA",
+ "\xD1\xF5" => "\xE5\x8D\x97",
+ "\xD1\xF6" => "\xEF\xA4\xA1",
+ "\xD1\xF7" => "\xE6\x9E\x8F",
+ "\xD1\xF8" => "\xE6\xA5\xA0",
+ "\xD1\xF9" => "\xE6\xB9\xB3",
+ "\xD1\xFA" => "\xEF\xA4\xA2",
+ "\xD1\xFB" => "\xE7\x94\xB7",
+ "\xD1\xFC" => "\xEF\xA4\xA3",
+ "\xD1\xFD" => "\xEF\xA4\xA4",
+ "\xD1\xFE" => "\xEF\xA4\xA5",
+ "\xD2\xA1" => "\xE7\xB4\x8D",
+ "\xD2\xA2" => "\xEF\xA4\xA6",
+ "\xD2\xA3" => "\xEF\xA4\xA7",
+ "\xD2\xA4" => "\xE8\xA1\xB2",
+ "\xD2\xA5" => "\xE5\x9B\x8A",
+ "\xD2\xA6" => "\xE5\xA8\x98",
+ "\xD2\xA7" => "\xEF\xA4\xA8",
+ "\xD2\xA8" => "\xEF\xA4\xA9",
+ "\xD2\xA9" => "\xEF\xA4\xAA",
+ "\xD2\xAA" => "\xEF\xA4\xAB",
+ "\xD2\xAB" => "\xEF\xA4\xAC",
+ "\xD2\xAC" => "\xE4\xB9\x83",
+ "\xD2\xAD" => "\xEF\xA4\xAD",
+ "\xD2\xAE" => "\xE5\x85\xA7",
+ "\xD2\xAF" => "\xE5\xA5\x88",
+ "\xD2\xB0" => "\xE6\x9F\xB0",
+ "\xD2\xB1" => "\xE8\x80\x90",
+ "\xD2\xB2" => "\xEF\xA4\xAE",
+ "\xD2\xB3" => "\xE5\xA5\xB3",
+ "\xD2\xB4" => "\xE5\xB9\xB4",
+ "\xD2\xB5" => "\xE6\x92\x9A",
+ "\xD2\xB6" => "\xE7\xA7\x8A",
+ "\xD2\xB7" => "\xE5\xBF\xB5",
+ "\xD2\xB8" => "\xE6\x81\xAC",
+ "\xD2\xB9" => "\xE6\x8B\x88",
+ "\xD2\xBA" => "\xE6\x8D\xBB",
+ "\xD2\xBB" => "\xE5\xAF\xA7",
+ "\xD2\xBC" => "\xE5\xAF\x97",
+ "\xD2\xBD" => "\xE5\x8A\xAA",
+ "\xD2\xBE" => "\xEF\xA4\xAF",
+ "\xD2\xBF" => "\xE5\xA5\xB4",
+ "\xD2\xC0" => "\xE5\xBC\xA9",
+ "\xD2\xC1" => "\xE6\x80\x92",
+ "\xD2\xC2" => "\xEF\xA4\xB0",
+ "\xD2\xC3" => "\xEF\xA4\xB1",
+ "\xD2\xC4" => "\xEF\xA4\xB2",
+ "\xD2\xC5" => "\xE7\x91\x99",
+ "\xD2\xC6" => "\xEF\xA4\xB3",
+ "\xD2\xC7" => "\xEF\xA4\xB4",
+ "\xD2\xC8" => "\xEF\xA4\xB5",
+ "\xD2\xC9" => "\xEF\xA4\xB6",
+ "\xD2\xCA" => "\xEF\xA4\xB7",
+ "\xD2\xCB" => "\xEF\xA4\xB8",
+ "\xD2\xCC" => "\xE9\xA7\x91",
+ "\xD2\xCD" => "\xEF\xA4\xB9",
+ "\xD2\xCE" => "\xEF\xA4\xBA",
+ "\xD2\xCF" => "\xEF\xA4\xBB",
+ "\xD2\xD0" => "\xEF\xA4\xBC",
+ "\xD2\xD1" => "\xEF\xA4\xBD",
+ "\xD2\xD2" => "\xEF\xA4\xBE",
+ "\xD2\xD3" => "\xEF\xA4\xBF",
+ "\xD2\xD4" => "\xEF\xA5\x80",
+ "\xD2\xD5" => "\xEF\xA5\x81",
+ "\xD2\xD6" => "\xEF\xA5\x82",
+ "\xD2\xD7" => "\xEF\xA5\x83",
+ "\xD2\xD8" => "\xE6\xBF\x83",
+ "\xD2\xD9" => "\xEF\xA5\x84",
+ "\xD2\xDA" => "\xEF\xA5\x85",
+ "\xD2\xDB" => "\xE8\x86\xBF",
+ "\xD2\xDC" => "\xE8\xBE\xB2",
+ "\xD2\xDD" => "\xE6\x83\xB1",
+ "\xD2\xDE" => "\xEF\xA5\x86",
+ "\xD2\xDF" => "\xEF\xA5\x87",
+ "\xD2\xE0" => "\xE8\x85\xA6",
+ "\xD2\xE1" => "\xEF\xA5\x88",
+ "\xD2\xE2" => "\xEF\xA5\x89",
+ "\xD2\xE3" => "\xE5\xB0\xBF",
+ "\xD2\xE4" => "\xEF\xA5\x8A",
+ "\xD2\xE5" => "\xEF\xA5\x8B",
+ "\xD2\xE6" => "\xEF\xA5\x8C",
+ "\xD2\xE7" => "\xEF\xA5\x8D",
+ "\xD2\xE8" => "\xEF\xA5\x8E",
+ "\xD2\xE9" => "\xEF\xA5\x8F",
+ "\xD2\xEA" => "\xEF\xA5\x90",
+ "\xD2\xEB" => "\xEF\xA5\x91",
+ "\xD2\xEC" => "\xE5\xAB\xA9",
+ "\xD2\xED" => "\xE8\xA8\xA5",
+ "\xD2\xEE" => "\xE6\x9D\xBB",
+ "\xD2\xEF" => "\xE7\xB4\x90",
+ "\xD2\xF0" => "\xEF\xA5\x92",
+ "\xD2\xF1" => "\xEF\xA5\x93",
+ "\xD2\xF2" => "\xEF\xA5\x94",
+ "\xD2\xF3" => "\xEF\xA5\x95",
+ "\xD2\xF4" => "\xEF\xA5\x96",
+ "\xD2\xF5" => "\xEF\xA5\x97",
+ "\xD2\xF6" => "\xE8\x83\xBD",
+ "\xD2\xF7" => "\xEF\xA5\x98",
+ "\xD2\xF8" => "\xEF\xA5\x99",
+ "\xD2\xF9" => "\xE5\xB0\xBC",
+ "\xD2\xFA" => "\xE6\xB3\xA5",
+ "\xD2\xFB" => "\xE5\x8C\xBF",
+ "\xD2\xFC" => "\xE6\xBA\xBA",
+ "\xD2\xFD" => "\xE5\xA4\x9A",
+ "\xD2\xFE" => "\xE8\x8C\xB6",
+ "\xD3\xA1" => "\xE4\xB8\xB9",
+ "\xD3\xA2" => "\xE4\xBA\xB6",
+ "\xD3\xA3" => "\xE4\xBD\x86",
+ "\xD3\xA4" => "\xE5\x96\xAE",
+ "\xD3\xA5" => "\xE5\x9C\x98",
+ "\xD3\xA6" => "\xE5\xA3\x87",
+ "\xD3\xA7" => "\xE5\xBD\x96",
+ "\xD3\xA8" => "\xE6\x96\xB7",
+ "\xD3\xA9" => "\xE6\x97\xA6",
+ "\xD3\xAA" => "\xE6\xAA\x80",
+ "\xD3\xAB" => "\xE6\xAE\xB5",
+ "\xD3\xAC" => "\xE6\xB9\x8D",
+ "\xD3\xAD" => "\xE7\x9F\xAD",
+ "\xD3\xAE" => "\xE7\xAB\xAF",
+ "\xD3\xAF" => "\xE7\xB0\x9E",
+ "\xD3\xB0" => "\xE7\xB7\x9E",
+ "\xD3\xB1" => "\xE8\x9B\x8B",
+ "\xD3\xB2" => "\xE8\xA2\x92",
+ "\xD3\xB3" => "\xE9\x84\xB2",
+ "\xD3\xB4" => "\xE9\x8D\x9B",
+ "\xD3\xB5" => "\xE6\x92\xBB",
+ "\xD3\xB6" => "\xE6\xBE\xBE",
+ "\xD3\xB7" => "\xE7\x8D\xBA",
+ "\xD3\xB8" => "\xE7\x96\xB8",
+ "\xD3\xB9" => "\xE9\x81\x94",
+ "\xD3\xBA" => "\xE5\x95\x96",
+ "\xD3\xBB" => "\xE5\x9D\x8D",
+ "\xD3\xBC" => "\xE6\x86\xBA",
+ "\xD3\xBD" => "\xE6\x93\x94",
+ "\xD3\xBE" => "\xE6\x9B\x87",
+ "\xD3\xBF" => "\xE6\xB7\xA1",
+ "\xD3\xC0" => "\xE6\xB9\x9B",
+ "\xD3\xC1" => "\xE6\xBD\xAD",
+ "\xD3\xC2" => "\xE6\xBE\xB9",
+ "\xD3\xC3" => "\xE7\x97\xB0",
+ "\xD3\xC4" => "\xE8\x81\x83",
+ "\xD3\xC5" => "\xE8\x86\xBD",
+ "\xD3\xC6" => "\xE8\x95\x81",
+ "\xD3\xC7" => "\xE8\xA6\x83",
+ "\xD3\xC8" => "\xE8\xAB\x87",
+ "\xD3\xC9" => "\xE8\xAD\x9A",
+ "\xD3\xCA" => "\xE9\x8C\x9F",
+ "\xD3\xCB" => "\xE6\xB2\x93",
+ "\xD3\xCC" => "\xE7\x95\x93",
+ "\xD3\xCD" => "\xE7\xAD\x94",
+ "\xD3\xCE" => "\xE8\xB8\x8F",
+ "\xD3\xCF" => "\xE9\x81\x9D",
+ "\xD3\xD0" => "\xE5\x94\x90",
+ "\xD3\xD1" => "\xE5\xA0\x82",
+ "\xD3\xD2" => "\xE5\xA1\x98",
+ "\xD3\xD3" => "\xE5\xB9\xA2",
+ "\xD3\xD4" => "\xE6\x88\x87",
+ "\xD3\xD5" => "\xE6\x92\x9E",
+ "\xD3\xD6" => "\xE6\xA3\xA0",
+ "\xD3\xD7" => "\xE7\x95\xB6",
+ "\xD3\xD8" => "\xE7\xB3\x96",
+ "\xD3\xD9" => "\xE8\x9E\xB3",
+ "\xD3\xDA" => "\xE9\xBB\xA8",
+ "\xD3\xDB" => "\xE4\xBB\xA3",
+ "\xD3\xDC" => "\xE5\x9E\x88",
+ "\xD3\xDD" => "\xE5\x9D\xAE",
+ "\xD3\xDE" => "\xE5\xA4\xA7",
+ "\xD3\xDF" => "\xE5\xB0\x8D",
+ "\xD3\xE0" => "\xE5\xB2\xB1",
+ "\xD3\xE1" => "\xE5\xB8\xB6",
+ "\xD3\xE2" => "\xE5\xBE\x85",
+ "\xD3\xE3" => "\xE6\x88\xB4",
+ "\xD3\xE4" => "\xE6\x93\xA1",
+ "\xD3\xE5" => "\xE7\x8E\xB3",
+ "\xD3\xE6" => "\xE8\x87\xBA",
+ "\xD3\xE7" => "\xE8\xA2\x8B",
+ "\xD3\xE8" => "\xE8\xB2\xB8",
+ "\xD3\xE9" => "\xE9\x9A\x8A",
+ "\xD3\xEA" => "\xE9\xBB\x9B",
+ "\xD3\xEB" => "\xE5\xAE\x85",
+ "\xD3\xEC" => "\xE5\xBE\xB7",
+ "\xD3\xED" => "\xE6\x82\xB3",
+ "\xD3\xEE" => "\xE5\x80\x92",
+ "\xD3\xEF" => "\xE5\x88\x80",
+ "\xD3\xF0" => "\xE5\x88\xB0",
+ "\xD3\xF1" => "\xE5\x9C\x96",
+ "\xD3\xF2" => "\xE5\xA0\xB5",
+ "\xD3\xF3" => "\xE5\xA1\x97",
+ "\xD3\xF4" => "\xE5\xB0\x8E",
+ "\xD3\xF5" => "\xE5\xB1\xA0",
+ "\xD3\xF6" => "\xE5\xB3\xB6",
+ "\xD3\xF7" => "\xE5\xB6\x8B",
+ "\xD3\xF8" => "\xE5\xBA\xA6",
+ "\xD3\xF9" => "\xE5\xBE\x92",
+ "\xD3\xFA" => "\xE6\x82\xBC",
+ "\xD3\xFB" => "\xE6\x8C\x91",
+ "\xD3\xFC" => "\xE6\x8E\x89",
+ "\xD3\xFD" => "\xE6\x90\x97",
+ "\xD3\xFE" => "\xE6\xA1\x83",
+ "\xD4\xA1" => "\xE6\xA3\xB9",
+ "\xD4\xA2" => "\xE6\xAB\x82",
+ "\xD4\xA3" => "\xE6\xB7\x98",
+ "\xD4\xA4" => "\xE6\xB8\xA1",
+ "\xD4\xA5" => "\xE6\xBB\x94",
+ "\xD4\xA6" => "\xE6\xBF\xA4",
+ "\xD4\xA7" => "\xE7\x87\xBE",
+ "\xD4\xA8" => "\xE7\x9B\x9C",
+ "\xD4\xA9" => "\xE7\x9D\xB9",
+ "\xD4\xAA" => "\xE7\xA6\xB1",
+ "\xD4\xAB" => "\xE7\xA8\xBB",
+ "\xD4\xAC" => "\xE8\x90\x84",
+ "\xD4\xAD" => "\xE8\xA6\xA9",
+ "\xD4\xAE" => "\xE8\xB3\xAD",
+ "\xD4\xAF" => "\xE8\xB7\xB3",
+ "\xD4\xB0" => "\xE8\xB9\x88",
+ "\xD4\xB1" => "\xE9\x80\x83",
+ "\xD4\xB2" => "\xE9\x80\x94",
+ "\xD4\xB3" => "\xE9\x81\x93",
+ "\xD4\xB4" => "\xE9\x83\xBD",
+ "\xD4\xB5" => "\xE9\x8D\x8D",
+ "\xD4\xB6" => "\xE9\x99\xB6",
+ "\xD4\xB7" => "\xE9\x9F\x9C",
+ "\xD4\xB8" => "\xE6\xAF\x92",
+ "\xD4\xB9" => "\xE7\x80\x86",
+ "\xD4\xBA" => "\xE7\x89\x98",
+ "\xD4\xBB" => "\xE7\x8A\xA2",
+ "\xD4\xBC" => "\xE7\x8D\xA8",
+ "\xD4\xBD" => "\xE7\x9D\xA3",
+ "\xD4\xBE" => "\xE7\xA6\xBF",
+ "\xD4\xBF" => "\xE7\xAF\xA4",
+ "\xD4\xC0" => "\xE7\xBA\x9B",
+ "\xD4\xC1" => "\xE8\xAE\x80",
+ "\xD4\xC2" => "\xE5\xA2\xA9",
+ "\xD4\xC3" => "\xE6\x83\x87",
+ "\xD4\xC4" => "\xE6\x95\xA6",
+ "\xD4\xC5" => "\xE6\x97\xBD",
+ "\xD4\xC6" => "\xE6\x9A\xBE",
+ "\xD4\xC7" => "\xE6\xB2\x8C",
+ "\xD4\xC8" => "\xE7\x84\x9E",
+ "\xD4\xC9" => "\xE7\x87\x89",
+ "\xD4\xCA" => "\xE8\xB1\x9A",
+ "\xD4\xCB" => "\xE9\xA0\x93",
+ "\xD4\xCC" => "\xE4\xB9\xAD",
+ "\xD4\xCD" => "\xE7\xAA\x81",
+ "\xD4\xCE" => "\xE4\xBB\x9D",
+ "\xD4\xCF" => "\xE5\x86\xAC",
+ "\xD4\xD0" => "\xE5\x87\x8D",
+ "\xD4\xD1" => "\xE5\x8B\x95",
+ "\xD4\xD2" => "\xE5\x90\x8C",
+ "\xD4\xD3" => "\xE6\x86\xA7",
+ "\xD4\xD4" => "\xE6\x9D\xB1",
+ "\xD4\xD5" => "\xE6\xA1\x90",
+ "\xD4\xD6" => "\xE6\xA3\x9F",
+ "\xD4\xD7" => "\xE6\xB4\x9E",
+ "\xD4\xD8" => "\xE6\xBD\xBC",
+ "\xD4\xD9" => "\xE7\x96\xBC",
+ "\xD4\xDA" => "\xE7\x9E\xB3",
+ "\xD4\xDB" => "\xE7\xAB\xA5",
+ "\xD4\xDC" => "\xE8\x83\xB4",
+ "\xD4\xDD" => "\xE8\x91\xA3",
+ "\xD4\xDE" => "\xE9\x8A\x85",
+ "\xD4\xDF" => "\xE5\x85\x9C",
+ "\xD4\xE0" => "\xE6\x96\x97",
+ "\xD4\xE1" => "\xE6\x9D\x9C",
+ "\xD4\xE2" => "\xE6\x9E\x93",
+ "\xD4\xE3" => "\xE7\x97\x98",
+ "\xD4\xE4" => "\xE7\xAB\x87",
+ "\xD4\xE5" => "\xE8\x8D\xB3",
+ "\xD4\xE6" => "\xEF\xA5\x9A",
+ "\xD4\xE7" => "\xE8\xB1\x86",
+ "\xD4\xE8" => "\xE9\x80\x97",
+ "\xD4\xE9" => "\xE9\xA0\xAD",
+ "\xD4\xEA" => "\xE5\xB1\xAF",
+ "\xD4\xEB" => "\xE8\x87\x80",
+ "\xD4\xEC" => "\xE8\x8A\x9A",
+ "\xD4\xED" => "\xE9\x81\x81",
+ "\xD4\xEE" => "\xE9\x81\xAF",
+ "\xD4\xEF" => "\xE9\x88\x8D",
+ "\xD4\xF0" => "\xE5\xBE\x97",
+ "\xD4\xF1" => "\xE5\xB6\x9D",
+ "\xD4\xF2" => "\xE6\xA9\x99",
+ "\xD4\xF3" => "\xE7\x87\x88",
+ "\xD4\xF4" => "\xE7\x99\xBB",
+ "\xD4\xF5" => "\xE7\xAD\x89",
+ "\xD4\xF6" => "\xE8\x97\xA4",
+ "\xD4\xF7" => "\xE8\xAC\x84",
+ "\xD4\xF8" => "\xE9\x84\xA7",
+ "\xD4\xF9" => "\xE9\xA8\xB0",
+ "\xD4\xFA" => "\xE5\x96\x87",
+ "\xD4\xFB" => "\xE6\x87\xB6",
+ "\xD4\xFC" => "\xEF\xA5\x9B",
+ "\xD4\xFD" => "\xE7\x99\xA9",
+ "\xD4\xFE" => "\xE7\xBE\x85",
+ "\xD5\xA1" => "\xE8\x98\xBF",
+ "\xD5\xA2" => "\xE8\x9E\xBA",
+ "\xD5\xA3" => "\xE8\xA3\xB8",
+ "\xD5\xA4" => "\xE9\x82\x8F",
+ "\xD5\xA5" => "\xEF\xA5\x9C",
+ "\xD5\xA6" => "\xE6\xB4\x9B",
+ "\xD5\xA7" => "\xE7\x83\x99",
+ "\xD5\xA8" => "\xE7\x8F\x9E",
+ "\xD5\xA9" => "\xE7\xB5\xA1",
+ "\xD5\xAA" => "\xE8\x90\xBD",
+ "\xD5\xAB" => "\xEF\xA5\x9D",
+ "\xD5\xAC" => "\xE9\x85\xAA",
+ "\xD5\xAD" => "\xE9\xA7\xB1",
+ "\xD5\xAE" => "\xEF\xA5\x9E",
+ "\xD5\xAF" => "\xE4\xBA\x82",
+ "\xD5\xB0" => "\xE5\x8D\xB5",
+ "\xD5\xB1" => "\xE6\xAC\x84",
+ "\xD5\xB2" => "\xE6\xAC\x92",
+ "\xD5\xB3" => "\xE7\x80\xBE",
+ "\xD5\xB4" => "\xE7\x88\x9B",
+ "\xD5\xB5" => "\xE8\x98\xAD",
+ "\xD5\xB6" => "\xE9\xB8\x9E",
+ "\xD5\xB7" => "\xE5\x89\x8C",
+ "\xD5\xB8" => "\xE8\xBE\xA3",
+ "\xD5\xB9" => "\xE5\xB5\x90",
+ "\xD5\xBA" => "\xE6\x93\xA5",
+ "\xD5\xBB" => "\xE6\x94\xAC",
+ "\xD5\xBC" => "\xE6\xAC\x96",
+ "\xD5\xBD" => "\xE6\xBF\xAB",
+ "\xD5\xBE" => "\xE7\xB1\x83",
+ "\xD5\xBF" => "\xE7\xBA\x9C",
+ "\xD5\xC0" => "\xE8\x97\x8D",
+ "\xD5\xC1" => "\xE8\xA5\xA4",
+ "\xD5\xC2" => "\xE8\xA6\xBD",
+ "\xD5\xC3" => "\xE6\x8B\x89",
+ "\xD5\xC4" => "\xE8\x87\x98",
+ "\xD5\xC5" => "\xE8\xA0\x9F",
+ "\xD5\xC6" => "\xE5\xBB\x8A",
+ "\xD5\xC7" => "\xE6\x9C\x97",
+ "\xD5\xC8" => "\xE6\xB5\xAA",
+ "\xD5\xC9" => "\xE7\x8B\xBC",
+ "\xD5\xCA" => "\xE7\x90\x85",
+ "\xD5\xCB" => "\xE7\x91\xAF",
+ "\xD5\xCC" => "\xE8\x9E\x82",
+ "\xD5\xCD" => "\xE9\x83\x9E",
+ "\xD5\xCE" => "\xE4\xBE\x86",
+ "\xD5\xCF" => "\xE5\xB4\x8D",
+ "\xD5\xD0" => "\xE5\xBE\xA0",
+ "\xD5\xD1" => "\xE8\x90\x8A",
+ "\xD5\xD2" => "\xE5\x86\xB7",
+ "\xD5\xD3" => "\xE6\x8E\xA0",
+ "\xD5\xD4" => "\xE7\x95\xA5",
+ "\xD5\xD5" => "\xE4\xBA\xAE",
+ "\xD5\xD6" => "\xE5\x80\x86",
+ "\xD5\xD7" => "\xE5\x85\xA9",
+ "\xD5\xD8" => "\xE5\x87\x89",
+ "\xD5\xD9" => "\xE6\xA2\x81",
+ "\xD5\xDA" => "\xE6\xA8\x91",
+ "\xD5\xDB" => "\xE7\xB2\xAE",
+ "\xD5\xDC" => "\xE7\xB2\xB1",
+ "\xD5\xDD" => "\xE7\xB3\xA7",
+ "\xD5\xDE" => "\xE8\x89\xAF",
+ "\xD5\xDF" => "\xE8\xAB\x92",
+ "\xD5\xE0" => "\xE8\xBC\x9B",
+ "\xD5\xE1" => "\xE9\x87\x8F",
+ "\xD5\xE2" => "\xE4\xBE\xB6",
+ "\xD5\xE3" => "\xE5\x84\xB7",
+ "\xD5\xE4" => "\xE5\x8B\xB5",
+ "\xD5\xE5" => "\xE5\x91\x82",
+ "\xD5\xE6" => "\xE5\xBB\xAC",
+ "\xD5\xE7" => "\xE6\x85\xAE",
+ "\xD5\xE8" => "\xE6\x88\xBE",
+ "\xD5\xE9" => "\xE6\x97\x85",
+ "\xD5\xEA" => "\xE6\xAB\x9A",
+ "\xD5\xEB" => "\xE6\xBF\xBE",
+ "\xD5\xEC" => "\xE7\xA4\xAA",
+ "\xD5\xED" => "\xE8\x97\x9C",
+ "\xD5\xEE" => "\xE8\xA0\xA3",
+ "\xD5\xEF" => "\xE9\x96\xAD",
+ "\xD5\xF0" => "\xE9\xA9\xA2",
+ "\xD5\xF1" => "\xE9\xA9\xAA",
+ "\xD5\xF2" => "\xE9\xBA\x97",
+ "\xD5\xF3" => "\xE9\xBB\x8E",
+ "\xD5\xF4" => "\xE5\x8A\x9B",
+ "\xD5\xF5" => "\xE6\x9B\x86",
+ "\xD5\xF6" => "\xE6\xAD\xB7",
+ "\xD5\xF7" => "\xE7\x80\x9D",
+ "\xD5\xF8" => "\xE7\xA4\xAB",
+ "\xD5\xF9" => "\xE8\xBD\xA2",
+ "\xD5\xFA" => "\xE9\x9D\x82",
+ "\xD5\xFB" => "\xE6\x86\x90",
+ "\xD5\xFC" => "\xE6\x88\x80",
+ "\xD5\xFD" => "\xE6\x94\xA3",
+ "\xD5\xFE" => "\xE6\xBC\xA3",
+ "\xD6\xA1" => "\xE7\x85\x89",
+ "\xD6\xA2" => "\xE7\x92\x89",
+ "\xD6\xA3" => "\xE7\xB7\xB4",
+ "\xD6\xA4" => "\xE8\x81\xAF",
+ "\xD6\xA5" => "\xE8\x93\xAE",
+ "\xD6\xA6" => "\xE8\xBC\xA6",
+ "\xD6\xA7" => "\xE9\x80\xA3",
+ "\xD6\xA8" => "\xE9\x8D\x8A",
+ "\xD6\xA9" => "\xE5\x86\xBD",
+ "\xD6\xAA" => "\xE5\x88\x97",
+ "\xD6\xAB" => "\xE5\x8A\xA3",
+ "\xD6\xAC" => "\xE6\xB4\x8C",
+ "\xD6\xAD" => "\xE7\x83\x88",
+ "\xD6\xAE" => "\xE8\xA3\x82",
+ "\xD6\xAF" => "\xE5\xBB\x89",
+ "\xD6\xB0" => "\xE6\x96\x82",
+ "\xD6\xB1" => "\xE6\xAE\xAE",
+ "\xD6\xB2" => "\xE6\xBF\x82",
+ "\xD6\xB3" => "\xE7\xB0\xBE",
+ "\xD6\xB4" => "\xE7\x8D\xB5",
+ "\xD6\xB5" => "\xE4\xBB\xA4",
+ "\xD6\xB6" => "\xE4\xBC\xB6",
+ "\xD6\xB7" => "\xE5\x9B\xB9",
+ "\xD6\xB8" => "\xEF\xA5\x9F",
+ "\xD6\xB9" => "\xE5\xB2\xBA",
+ "\xD6\xBA" => "\xE5\xB6\xBA",
+ "\xD6\xBB" => "\xE6\x80\x9C",
+ "\xD6\xBC" => "\xE7\x8E\xB2",
+ "\xD6\xBD" => "\xE7\xAC\xAD",
+ "\xD6\xBE" => "\xE7\xBE\x9A",
+ "\xD6\xBF" => "\xE7\xBF\x8E",
+ "\xD6\xC0" => "\xE8\x81\x86",
+ "\xD6\xC1" => "\xE9\x80\x9E",
+ "\xD6\xC2" => "\xE9\x88\xB4",
+ "\xD6\xC3" => "\xE9\x9B\xB6",
+ "\xD6\xC4" => "\xE9\x9D\x88",
+ "\xD6\xC5" => "\xE9\xA0\x98",
+ "\xD6\xC6" => "\xE9\xBD\xA1",
+ "\xD6\xC7" => "\xE4\xBE\x8B",
+ "\xD6\xC8" => "\xE6\xBE\xA7",
+ "\xD6\xC9" => "\xE7\xA6\xAE",
+ "\xD6\xCA" => "\xE9\x86\xB4",
+ "\xD6\xCB" => "\xE9\x9A\xB7",
+ "\xD6\xCC" => "\xE5\x8B\x9E",
+ "\xD6\xCD" => "\xEF\xA5\xA0",
+ "\xD6\xCE" => "\xE6\x92\x88",
+ "\xD6\xCF" => "\xE6\x93\x84",
+ "\xD6\xD0" => "\xE6\xAB\x93",
+ "\xD6\xD1" => "\xE6\xBD\x9E",
+ "\xD6\xD2" => "\xE7\x80\x98",
+ "\xD6\xD3" => "\xE7\x88\x90",
+ "\xD6\xD4" => "\xE7\x9B\xA7",
+ "\xD6\xD5" => "\xE8\x80\x81",
+ "\xD6\xD6" => "\xE8\x98\x86",
+ "\xD6\xD7" => "\xE8\x99\x9C",
+ "\xD6\xD8" => "\xE8\xB7\xAF",
+ "\xD6\xD9" => "\xE8\xBC\x85",
+ "\xD6\xDA" => "\xE9\x9C\xB2",
+ "\xD6\xDB" => "\xE9\xAD\xAF",
+ "\xD6\xDC" => "\xE9\xB7\xBA",
+ "\xD6\xDD" => "\xE9\xB9\xB5",
+ "\xD6\xDE" => "\xE7\xA2\x8C",
+ "\xD6\xDF" => "\xE7\xA5\xBF",
+ "\xD6\xE0" => "\xE7\xB6\xA0",
+ "\xD6\xE1" => "\xE8\x8F\x89",
+ "\xD6\xE2" => "\xE9\x8C\x84",
+ "\xD6\xE3" => "\xE9\xB9\xBF",
+ "\xD6\xE4" => "\xE9\xBA\x93",
+ "\xD6\xE5" => "\xE8\xAB\x96",
+ "\xD6\xE6" => "\xE5\xA3\x9F",
+ "\xD6\xE7" => "\xE5\xBC\x84",
+ "\xD6\xE8" => "\xE6\x9C\xA7",
+ "\xD6\xE9" => "\xE7\x80\xA7",
+ "\xD6\xEA" => "\xE7\x93\x8F",
+ "\xD6\xEB" => "\xE7\xB1\xA0",
+ "\xD6\xEC" => "\xE8\x81\xBE",
+ "\xD6\xED" => "\xE5\x84\xA1",
+ "\xD6\xEE" => "\xE7\x80\xA8",
+ "\xD6\xEF" => "\xE7\x89\xA2",
+ "\xD6\xF0" => "\xE7\xA3\x8A",
+ "\xD6\xF1" => "\xE8\xB3\x82",
+ "\xD6\xF2" => "\xE8\xB3\x9A",
+ "\xD6\xF3" => "\xE8\xB3\xB4",
+ "\xD6\xF4" => "\xE9\x9B\xB7",
+ "\xD6\xF5" => "\xE4\xBA\x86",
+ "\xD6\xF6" => "\xE5\x83\x9A",
+ "\xD6\xF7" => "\xE5\xAF\xAE",
+ "\xD6\xF8" => "\xE5\xBB\x96",
+ "\xD6\xF9" => "\xE6\x96\x99",
+ "\xD6\xFA" => "\xE7\x87\x8E",
+ "\xD6\xFB" => "\xE7\x99\x82",
+ "\xD6\xFC" => "\xE7\x9E\xAD",
+ "\xD6\xFD" => "\xE8\x81\x8A",
+ "\xD6\xFE" => "\xE8\x93\xBC",
+ "\xD7\xA1" => "\xE9\x81\xBC",
+ "\xD7\xA2" => "\xE9\xAC\xA7",
+ "\xD7\xA3" => "\xE9\xBE\x8D",
+ "\xD7\xA4" => "\xE5\xA3\x98",
+ "\xD7\xA5" => "\xE5\xA9\x81",
+ "\xD7\xA6" => "\xE5\xB1\xA2",
+ "\xD7\xA7" => "\xE6\xA8\x93",
+ "\xD7\xA8" => "\xE6\xB7\x9A",
+ "\xD7\xA9" => "\xE6\xBC\x8F",
+ "\xD7\xAA" => "\xE7\x98\xBB",
+ "\xD7\xAB" => "\xE7\xB4\xAF",
+ "\xD7\xAC" => "\xE7\xB8\xB7",
+ "\xD7\xAD" => "\xE8\x94\x9E",
+ "\xD7\xAE" => "\xE8\xA4\xB8",
+ "\xD7\xAF" => "\xE9\x8F\xA4",
+ "\xD7\xB0" => "\xE9\x99\x8B",
+ "\xD7\xB1" => "\xE5\x8A\x89",
+ "\xD7\xB2" => "\xE6\x97\x92",
+ "\xD7\xB3" => "\xE6\x9F\xB3",
+ "\xD7\xB4" => "\xE6\xA6\xB4",
+ "\xD7\xB5" => "\xE6\xB5\x81",
+ "\xD7\xB6" => "\xE6\xBA\x9C",
+ "\xD7\xB7" => "\xE7\x80\x8F",
+ "\xD7\xB8" => "\xE7\x90\x89",
+ "\xD7\xB9" => "\xE7\x91\xA0",
+ "\xD7\xBA" => "\xE7\x95\x99",
+ "\xD7\xBB" => "\xE7\x98\xA4",
+ "\xD7\xBC" => "\xE7\xA1\xAB",
+ "\xD7\xBD" => "\xE8\xAC\xAC",
+ "\xD7\xBE" => "\xE9\xA1\x9E",
+ "\xD7\xBF" => "\xE5\x85\xAD",
+ "\xD7\xC0" => "\xE6\x88\xAE",
+ "\xD7\xC1" => "\xE9\x99\xB8",
+ "\xD7\xC2" => "\xE4\xBE\x96",
+ "\xD7\xC3" => "\xE5\x80\xAB",
+ "\xD7\xC4" => "\xE5\xB4\x99",
+ "\xD7\xC5" => "\xE6\xB7\xAA",
+ "\xD7\xC6" => "\xE7\xB6\xB8",
+ "\xD7\xC7" => "\xE8\xBC\xAA",
+ "\xD7\xC8" => "\xE5\xBE\x8B",
+ "\xD7\xC9" => "\xE6\x85\x84",
+ "\xD7\xCA" => "\xE6\xA0\x97",
+ "\xD7\xCB" => "\xEF\xA5\xA1",
+ "\xD7\xCC" => "\xE9\x9A\x86",
+ "\xD7\xCD" => "\xE5\x8B\x92",
+ "\xD7\xCE" => "\xE8\x82\x8B",
+ "\xD7\xCF" => "\xE5\x87\x9C",
+ "\xD7\xD0" => "\xE5\x87\x8C",
+ "\xD7\xD1" => "\xE6\xA5\x9E",
+ "\xD7\xD2" => "\xE7\xA8\x9C",
+ "\xD7\xD3" => "\xE7\xB6\xBE",
+ "\xD7\xD4" => "\xE8\x8F\xB1",
+ "\xD7\xD5" => "\xE9\x99\xB5",
+ "\xD7\xD6" => "\xE4\xBF\x9A",
+ "\xD7\xD7" => "\xE5\x88\xA9",
+ "\xD7\xD8" => "\xE5\x8E\x98",
+ "\xD7\xD9" => "\xE5\x90\x8F",
+ "\xD7\xDA" => "\xE5\x94\x8E",
+ "\xD7\xDB" => "\xE5\xB1\xA5",
+ "\xD7\xDC" => "\xE6\x82\xA7",
+ "\xD7\xDD" => "\xE6\x9D\x8E",
+ "\xD7\xDE" => "\xE6\xA2\xA8",
+ "\xD7\xDF" => "\xE6\xB5\xAC",
+ "\xD7\xE0" => "\xE7\x8A\x81",
+ "\xD7\xE1" => "\xE7\x8B\xB8",
+ "\xD7\xE2" => "\xE7\x90\x86",
+ "\xD7\xE3" => "\xE7\x92\x83",
+ "\xD7\xE4" => "\xEF\xA5\xA2",
+ "\xD7\xE5" => "\xE7\x97\xA2",
+ "\xD7\xE6" => "\xE7\xB1\xAC",
+ "\xD7\xE7" => "\xE7\xBD\xB9",
+ "\xD7\xE8" => "\xE7\xBE\xB8",
+ "\xD7\xE9" => "\xE8\x8E\x89",
+ "\xD7\xEA" => "\xE8\xA3\x8F",
+ "\xD7\xEB" => "\xE8\xA3\xA1",
+ "\xD7\xEC" => "\xE9\x87\x8C",
+ "\xD7\xED" => "\xE9\x87\x90",
+ "\xD7\xEE" => "\xE9\x9B\xA2",
+ "\xD7\xEF" => "\xE9\xAF\x89",
+ "\xD7\xF0" => "\xE5\x90\x9D",
+ "\xD7\xF1" => "\xE6\xBD\xBE",
+ "\xD7\xF2" => "\xE7\x87\x90",
+ "\xD7\xF3" => "\xE7\x92\x98",
+ "\xD7\xF4" => "\xE8\x97\xBA",
+ "\xD7\xF5" => "\xE8\xBA\xAA",
+ "\xD7\xF6" => "\xE9\x9A\xA3",
+ "\xD7\xF7" => "\xE9\xB1\x97",
+ "\xD7\xF8" => "\xE9\xBA\x9F",
+ "\xD7\xF9" => "\xE6\x9E\x97",
+ "\xD7\xFA" => "\xE6\xB7\x8B",
+ "\xD7\xFB" => "\xE7\x90\xB3",
+ "\xD7\xFC" => "\xE8\x87\xA8",
+ "\xD7\xFD" => "\xE9\x9C\x96",
+ "\xD7\xFE" => "\xE7\xA0\xAC",
+ "\xD8\xA1" => "\xE7\xAB\x8B",
+ "\xD8\xA2" => "\xE7\xAC\xA0",
+ "\xD8\xA3" => "\xE7\xB2\x92",
+ "\xD8\xA4" => "\xE6\x91\xA9",
+ "\xD8\xA5" => "\xE7\x91\xAA",
+ "\xD8\xA6" => "\xE7\x97\xB2",
+ "\xD8\xA7" => "\xE7\xA2\xBC",
+ "\xD8\xA8" => "\xE7\xA3\xA8",
+ "\xD8\xA9" => "\xE9\xA6\xAC",
+ "\xD8\xAA" => "\xE9\xAD\x94",
+ "\xD8\xAB" => "\xE9\xBA\xBB",
+ "\xD8\xAC" => "\xE5\xAF\x9E",
+ "\xD8\xAD" => "\xE5\xB9\x95",
+ "\xD8\xAE" => "\xE6\xBC\xA0",
+ "\xD8\xAF" => "\xE8\x86\x9C",
+ "\xD8\xB0" => "\xE8\x8E\xAB",
+ "\xD8\xB1" => "\xE9\x82\x88",
+ "\xD8\xB2" => "\xE4\xB8\x87",
+ "\xD8\xB3" => "\xE5\x8D\x8D",
+ "\xD8\xB4" => "\xE5\xA8\xA9",
+ "\xD8\xB5" => "\xE5\xB7\x92",
+ "\xD8\xB6" => "\xE5\xBD\x8E",
+ "\xD8\xB7" => "\xE6\x85\xA2",
+ "\xD8\xB8" => "\xE6\x8C\xBD",
+ "\xD8\xB9" => "\xE6\x99\xA9",
+ "\xD8\xBA" => "\xE6\x9B\xBC",
+ "\xD8\xBB" => "\xE6\xBB\xBF",
+ "\xD8\xBC" => "\xE6\xBC\xAB",
+ "\xD8\xBD" => "\xE7\x81\xA3",
+ "\xD8\xBE" => "\xE7\x9E\x9E",
+ "\xD8\xBF" => "\xE8\x90\xAC",
+ "\xD8\xC0" => "\xE8\x94\x93",
+ "\xD8\xC1" => "\xE8\xA0\xBB",
+ "\xD8\xC2" => "\xE8\xBC\x93",
+ "\xD8\xC3" => "\xE9\xA5\x85",
+ "\xD8\xC4" => "\xE9\xB0\xBB",
+ "\xD8\xC5" => "\xE5\x94\x9C",
+ "\xD8\xC6" => "\xE6\x8A\xB9",
+ "\xD8\xC7" => "\xE6\x9C\xAB",
+ "\xD8\xC8" => "\xE6\xB2\xAB",
+ "\xD8\xC9" => "\xE8\x8C\x89",
+ "\xD8\xCA" => "\xE8\xA5\xAA",
+ "\xD8\xCB" => "\xE9\x9D\xBA",
+ "\xD8\xCC" => "\xE4\xBA\xA1",
+ "\xD8\xCD" => "\xE5\xA6\x84",
+ "\xD8\xCE" => "\xE5\xBF\x98",
+ "\xD8\xCF" => "\xE5\xBF\x99",
+ "\xD8\xD0" => "\xE6\x9C\x9B",
+ "\xD8\xD1" => "\xE7\xB6\xB2",
+ "\xD8\xD2" => "\xE7\xBD\x94",
+ "\xD8\xD3" => "\xE8\x8A\x92",
+ "\xD8\xD4" => "\xE8\x8C\xAB",
+ "\xD8\xD5" => "\xE8\x8E\xBD",
+ "\xD8\xD6" => "\xE8\xBC\x9E",
+ "\xD8\xD7" => "\xE9\x82\x99",
+ "\xD8\xD8" => "\xE5\x9F\x8B",
+ "\xD8\xD9" => "\xE5\xA6\xB9",
+ "\xD8\xDA" => "\xE5\xAA\x92",
+ "\xD8\xDB" => "\xE5\xAF\x90",
+ "\xD8\xDC" => "\xE6\x98\xA7",
+ "\xD8\xDD" => "\xE6\x9E\x9A",
+ "\xD8\xDE" => "\xE6\xA2\x85",
+ "\xD8\xDF" => "\xE6\xAF\x8F",
+ "\xD8\xE0" => "\xE7\x85\xA4",
+ "\xD8\xE1" => "\xE7\xBD\xB5",
+ "\xD8\xE2" => "\xE8\xB2\xB7",
+ "\xD8\xE3" => "\xE8\xB3\xA3",
+ "\xD8\xE4" => "\xE9\x82\x81",
+ "\xD8\xE5" => "\xE9\xAD\x85",
+ "\xD8\xE6" => "\xE8\x84\x88",
+ "\xD8\xE7" => "\xE8\xB2\x8A",
+ "\xD8\xE8" => "\xE9\x99\x8C",
+ "\xD8\xE9" => "\xE9\xA9\x80",
+ "\xD8\xEA" => "\xE9\xBA\xA5",
+ "\xD8\xEB" => "\xE5\xAD\x9F",
+ "\xD8\xEC" => "\xE6\xB0\x93",
+ "\xD8\xED" => "\xE7\x8C\x9B",
+ "\xD8\xEE" => "\xE7\x9B\xB2",
+ "\xD8\xEF" => "\xE7\x9B\x9F",
+ "\xD8\xF0" => "\xE8\x90\x8C",
+ "\xD8\xF1" => "\xE5\x86\xAA",
+ "\xD8\xF2" => "\xE8\xA6\x93",
+ "\xD8\xF3" => "\xE5\x85\x8D",
+ "\xD8\xF4" => "\xE5\x86\x95",
+ "\xD8\xF5" => "\xE5\x8B\x89",
+ "\xD8\xF6" => "\xE6\xA3\x89",
+ "\xD8\xF7" => "\xE6\xB2\x94",
+ "\xD8\xF8" => "\xE7\x9C\x84",
+ "\xD8\xF9" => "\xE7\x9C\xA0",
+ "\xD8\xFA" => "\xE7\xB6\xBF",
+ "\xD8\xFB" => "\xE7\xB7\xAC",
+ "\xD8\xFC" => "\xE9\x9D\xA2",
+ "\xD8\xFD" => "\xE9\xBA\xB5",
+ "\xD8\xFE" => "\xE6\xBB\x85",
+ "\xD9\xA1" => "\xE8\x94\x91",
+ "\xD9\xA2" => "\xE5\x86\xA5",
+ "\xD9\xA3" => "\xE5\x90\x8D",
+ "\xD9\xA4" => "\xE5\x91\xBD",
+ "\xD9\xA5" => "\xE6\x98\x8E",
+ "\xD9\xA6" => "\xE6\x9A\x9D",
+ "\xD9\xA7" => "\xE6\xA4\xA7",
+ "\xD9\xA8" => "\xE6\xBA\x9F",
+ "\xD9\xA9" => "\xE7\x9A\xBF",
+ "\xD9\xAA" => "\xE7\x9E\x91",
+ "\xD9\xAB" => "\xE8\x8C\x97",
+ "\xD9\xAC" => "\xE8\x93\x82",
+ "\xD9\xAD" => "\xE8\x9E\x9F",
+ "\xD9\xAE" => "\xE9\x85\xA9",
+ "\xD9\xAF" => "\xE9\x8A\x98",
+ "\xD9\xB0" => "\xE9\xB3\xB4",
+ "\xD9\xB1" => "\xE8\xA2\x82",
+ "\xD9\xB2" => "\xE4\xBE\xAE",
+ "\xD9\xB3" => "\xE5\x86\x92",
+ "\xD9\xB4" => "\xE5\x8B\x9F",
+ "\xD9\xB5" => "\xE5\xA7\x86",
+ "\xD9\xB6" => "\xE5\xB8\xBD",
+ "\xD9\xB7" => "\xE6\x85\x95",
+ "\xD9\xB8" => "\xE6\x91\xB8",
+ "\xD9\xB9" => "\xE6\x91\xB9",
+ "\xD9\xBA" => "\xE6\x9A\xAE",
+ "\xD9\xBB" => "\xE6\x9F\x90",
+ "\xD9\xBC" => "\xE6\xA8\xA1",
+ "\xD9\xBD" => "\xE6\xAF\x8D",
+ "\xD9\xBE" => "\xE6\xAF\x9B",
+ "\xD9\xBF" => "\xE7\x89\x9F",
+ "\xD9\xC0" => "\xE7\x89\xA1",
+ "\xD9\xC1" => "\xE7\x91\x81",
+ "\xD9\xC2" => "\xE7\x9C\xB8",
+ "\xD9\xC3" => "\xE7\x9F\x9B",
+ "\xD9\xC4" => "\xE8\x80\x97",
+ "\xD9\xC5" => "\xE8\x8A\xBC",
+ "\xD9\xC6" => "\xE8\x8C\x85",
+ "\xD9\xC7" => "\xE8\xAC\x80",
+ "\xD9\xC8" => "\xE8\xAC\xA8",
+ "\xD9\xC9" => "\xE8\xB2\x8C",
+ "\xD9\xCA" => "\xE6\x9C\xA8",
+ "\xD9\xCB" => "\xE6\xB2\x90",
+ "\xD9\xCC" => "\xE7\x89\xA7",
+ "\xD9\xCD" => "\xE7\x9B\xAE",
+ "\xD9\xCE" => "\xE7\x9D\xA6",
+ "\xD9\xCF" => "\xE7\xA9\x86",
+ "\xD9\xD0" => "\xE9\xB6\xA9",
+ "\xD9\xD1" => "\xE6\xAD\xBF",
+ "\xD9\xD2" => "\xE6\xB2\x92",
+ "\xD9\xD3" => "\xE5\xA4\xA2",
+ "\xD9\xD4" => "\xE6\x9C\xA6",
+ "\xD9\xD5" => "\xE8\x92\x99",
+ "\xD9\xD6" => "\xE5\x8D\xAF",
+ "\xD9\xD7" => "\xE5\xA2\x93",
+ "\xD9\xD8" => "\xE5\xA6\x99",
+ "\xD9\xD9" => "\xE5\xBB\x9F",
+ "\xD9\xDA" => "\xE6\x8F\x8F",
+ "\xD9\xDB" => "\xE6\x98\xB4",
+ "\xD9\xDC" => "\xE6\x9D\xB3",
+ "\xD9\xDD" => "\xE6\xB8\xBA",
+ "\xD9\xDE" => "\xE7\x8C\xAB",
+ "\xD9\xDF" => "\xE7\xAB\x97",
+ "\xD9\xE0" => "\xE8\x8B\x97",
+ "\xD9\xE1" => "\xE9\x8C\xA8",
+ "\xD9\xE2" => "\xE5\x8B\x99",
+ "\xD9\xE3" => "\xE5\xB7\xAB",
+ "\xD9\xE4" => "\xE6\x86\xAE",
+ "\xD9\xE5" => "\xE6\x87\x8B",
+ "\xD9\xE6" => "\xE6\x88\x8A",
+ "\xD9\xE7" => "\xE6\x8B\x87",
+ "\xD9\xE8" => "\xE6\x92\xAB",
+ "\xD9\xE9" => "\xE6\x97\xA0",
+ "\xD9\xEA" => "\xE6\xA5\x99",
+ "\xD9\xEB" => "\xE6\xAD\xA6",
+ "\xD9\xEC" => "\xE6\xAF\x8B",
+ "\xD9\xED" => "\xE7\x84\xA1",
+ "\xD9\xEE" => "\xE7\x8F\xB7",
+ "\xD9\xEF" => "\xE7\x95\x9D",
+ "\xD9\xF0" => "\xE7\xB9\x86",
+ "\xD9\xF1" => "\xE8\x88\x9E",
+ "\xD9\xF2" => "\xE8\x8C\x82",
+ "\xD9\xF3" => "\xE8\x95\xAA",
+ "\xD9\xF4" => "\xE8\xAA\xA3",
+ "\xD9\xF5" => "\xE8\xB2\xBF",
+ "\xD9\xF6" => "\xE9\x9C\xA7",
+ "\xD9\xF7" => "\xE9\xB5\xA1",
+ "\xD9\xF8" => "\xE5\xA2\xA8",
+ "\xD9\xF9" => "\xE9\xBB\x98",
+ "\xD9\xFA" => "\xE5\x80\x91",
+ "\xD9\xFB" => "\xE5\x88\x8E",
+ "\xD9\xFC" => "\xE5\x90\xBB",
+ "\xD9\xFD" => "\xE5\x95\x8F",
+ "\xD9\xFE" => "\xE6\x96\x87",
+ "\xDA\xA1" => "\xE6\xB1\xB6",
+ "\xDA\xA2" => "\xE7\xB4\x8A",
+ "\xDA\xA3" => "\xE7\xB4\x8B",
+ "\xDA\xA4" => "\xE8\x81\x9E",
+ "\xDA\xA5" => "\xE8\x9A\x8A",
+ "\xDA\xA6" => "\xE9\x96\x80",
+ "\xDA\xA7" => "\xE9\x9B\xAF",
+ "\xDA\xA8" => "\xE5\x8B\xBF",
+ "\xDA\xA9" => "\xE6\xB2\x95",
+ "\xDA\xAA" => "\xE7\x89\xA9",
+ "\xDA\xAB" => "\xE5\x91\xB3",
+ "\xDA\xAC" => "\xE5\xAA\x9A",
+ "\xDA\xAD" => "\xE5\xB0\xBE",
+ "\xDA\xAE" => "\xE5\xB5\x8B",
+ "\xDA\xAF" => "\xE5\xBD\x8C",
+ "\xDA\xB0" => "\xE5\xBE\xAE",
+ "\xDA\xB1" => "\xE6\x9C\xAA",
+ "\xDA\xB2" => "\xE6\xA2\xB6",
+ "\xDA\xB3" => "\xE6\xA5\xA3",
+ "\xDA\xB4" => "\xE6\xB8\xBC",
+ "\xDA\xB5" => "\xE6\xB9\x84",
+ "\xDA\xB6" => "\xE7\x9C\x89",
+ "\xDA\xB7" => "\xE7\xB1\xB3",
+ "\xDA\xB8" => "\xE7\xBE\x8E",
+ "\xDA\xB9" => "\xE8\x96\x87",
+ "\xDA\xBA" => "\xE8\xAC\x8E",
+ "\xDA\xBB" => "\xE8\xBF\xB7",
+ "\xDA\xBC" => "\xE9\x9D\xA1",
+ "\xDA\xBD" => "\xE9\xBB\xB4",
+ "\xDA\xBE" => "\xE5\xB2\xB7",
+ "\xDA\xBF" => "\xE6\x82\xB6",
+ "\xDA\xC0" => "\xE6\x84\x8D",
+ "\xDA\xC1" => "\xE6\x86\xAB",
+ "\xDA\xC2" => "\xE6\x95\x8F",
+ "\xDA\xC3" => "\xE6\x97\xBB",
+ "\xDA\xC4" => "\xE6\x97\xBC",
+ "\xDA\xC5" => "\xE6\xB0\x91",
+ "\xDA\xC6" => "\xE6\xB3\xAF",
+ "\xDA\xC7" => "\xE7\x8E\x9F",
+ "\xDA\xC8" => "\xE7\x8F\x89",
+ "\xDA\xC9" => "\xE7\xB7\xA1",
+ "\xDA\xCA" => "\xE9\x96\x94",
+ "\xDA\xCB" => "\xE5\xAF\x86",
+ "\xDA\xCC" => "\xE8\x9C\x9C",
+ "\xDA\xCD" => "\xE8\xAC\x90",
+ "\xDA\xCE" => "\xE5\x89\x9D",
+ "\xDA\xCF" => "\xE5\x8D\x9A",
+ "\xDA\xD0" => "\xE6\x8B\x8D",
+ "\xDA\xD1" => "\xE6\x90\x8F",
+ "\xDA\xD2" => "\xE6\x92\xB2",
+ "\xDA\xD3" => "\xE6\x9C\xB4",
+ "\xDA\xD4" => "\xE6\xA8\xB8",
+ "\xDA\xD5" => "\xE6\xB3\x8A",
+ "\xDA\xD6" => "\xE7\x8F\x80",
+ "\xDA\xD7" => "\xE7\x92\x9E",
+ "\xDA\xD8" => "\xE7\xAE\x94",
+ "\xDA\xD9" => "\xE7\xB2\x95",
+ "\xDA\xDA" => "\xE7\xB8\x9B",
+ "\xDA\xDB" => "\xE8\x86\x8A",
+ "\xDA\xDC" => "\xE8\x88\xB6",
+ "\xDA\xDD" => "\xE8\x96\x84",
+ "\xDA\xDE" => "\xE8\xBF\xAB",
+ "\xDA\xDF" => "\xE9\x9B\xB9",
+ "\xDA\xE0" => "\xE9\xA7\x81",
+ "\xDA\xE1" => "\xE4\xBC\xB4",
+ "\xDA\xE2" => "\xE5\x8D\x8A",
+ "\xDA\xE3" => "\xE5\x8F\x8D",
+ "\xDA\xE4" => "\xE5\x8F\x9B",
+ "\xDA\xE5" => "\xE6\x8B\x8C",
+ "\xDA\xE6" => "\xE6\x90\xAC",
+ "\xDA\xE7" => "\xE6\x94\x80",
+ "\xDA\xE8" => "\xE6\x96\x91",
+ "\xDA\xE9" => "\xE6\xA7\x83",
+ "\xDA\xEA" => "\xE6\xB3\xAE",
+ "\xDA\xEB" => "\xE6\xBD\x98",
+ "\xDA\xEC" => "\xE7\x8F\xAD",
+ "\xDA\xED" => "\xE7\x95\x94",
+ "\xDA\xEE" => "\xE7\x98\xA2",
+ "\xDA\xEF" => "\xE7\x9B\xA4",
+ "\xDA\xF0" => "\xE7\x9B\xBC",
+ "\xDA\xF1" => "\xE7\xA3\x90",
+ "\xDA\xF2" => "\xE7\xA3\xBB",
+ "\xDA\xF3" => "\xE7\xA4\xAC",
+ "\xDA\xF4" => "\xE7\xB5\x86",
+ "\xDA\xF5" => "\xE8\x88\xAC",
+ "\xDA\xF6" => "\xE8\x9F\xA0",
+ "\xDA\xF7" => "\xE8\xBF\x94",
+ "\xDA\xF8" => "\xE9\xA0\x92",
+ "\xDA\xF9" => "\xE9\xA3\xAF",
+ "\xDA\xFA" => "\xE5\x8B\x83",
+ "\xDA\xFB" => "\xE6\x8B\x94",
+ "\xDA\xFC" => "\xE6\x92\xA5",
+ "\xDA\xFD" => "\xE6\xB8\xA4",
+ "\xDA\xFE" => "\xE6\xBD\x91",
+ "\xDB\xA1" => "\xE7\x99\xBC",
+ "\xDB\xA2" => "\xE8\xB7\x8B",
+ "\xDB\xA3" => "\xE9\x86\xB1",
+ "\xDB\xA4" => "\xE9\x89\xA2",
+ "\xDB\xA5" => "\xE9\xAB\xAE",
+ "\xDB\xA6" => "\xE9\xAD\x83",
+ "\xDB\xA7" => "\xE5\x80\xA3",
+ "\xDB\xA8" => "\xE5\x82\x8D",
+ "\xDB\xA9" => "\xE5\x9D\x8A",
+ "\xDB\xAA" => "\xE5\xA6\xA8",
+ "\xDB\xAB" => "\xE5\xB0\xA8",
+ "\xDB\xAC" => "\xE5\xB9\x87",
+ "\xDB\xAD" => "\xE5\xBD\xB7",
+ "\xDB\xAE" => "\xE6\x88\xBF",
+ "\xDB\xAF" => "\xE6\x94\xBE",
+ "\xDB\xB0" => "\xE6\x96\xB9",
+ "\xDB\xB1" => "\xE6\x97\x81",
+ "\xDB\xB2" => "\xE6\x98\x89",
+ "\xDB\xB3" => "\xE6\x9E\x8B",
+ "\xDB\xB4" => "\xE6\xA6\x9C",
+ "\xDB\xB5" => "\xE6\xBB\x82",
+ "\xDB\xB6" => "\xE7\xA3\x85",
+ "\xDB\xB7" => "\xE7\xB4\xA1",
+ "\xDB\xB8" => "\xE8\x82\xAA",
+ "\xDB\xB9" => "\xE8\x86\x80",
+ "\xDB\xBA" => "\xE8\x88\xAB",
+ "\xDB\xBB" => "\xE8\x8A\xB3",
+ "\xDB\xBC" => "\xE8\x92\xA1",
+ "\xDB\xBD" => "\xE8\x9A\x8C",
+ "\xDB\xBE" => "\xE8\xA8\xAA",
+ "\xDB\xBF" => "\xE8\xAC\x97",
+ "\xDB\xC0" => "\xE9\x82\xA6",
+ "\xDB\xC1" => "\xE9\x98\xB2",
+ "\xDB\xC2" => "\xE9\xBE\x90",
+ "\xDB\xC3" => "\xE5\x80\x8D",
+ "\xDB\xC4" => "\xE4\xBF\xB3",
+ "\xDB\xC5" => "\xEF\xA5\xA3",
+ "\xDB\xC6" => "\xE5\x9F\xB9",
+ "\xDB\xC7" => "\xE5\xBE\x98",
+ "\xDB\xC8" => "\xE6\x8B\x9C",
+ "\xDB\xC9" => "\xE6\x8E\x92",
+ "\xDB\xCA" => "\xE6\x9D\xAF",
+ "\xDB\xCB" => "\xE6\xB9\x83",
+ "\xDB\xCC" => "\xE7\x84\x99",
+ "\xDB\xCD" => "\xE7\x9B\x83",
+ "\xDB\xCE" => "\xE8\x83\x8C",
+ "\xDB\xCF" => "\xE8\x83\x9A",
+ "\xDB\xD0" => "\xE8\xA3\xB4",
+ "\xDB\xD1" => "\xE8\xA3\xB5",
+ "\xDB\xD2" => "\xE8\xA4\x99",
+ "\xDB\xD3" => "\xE8\xB3\xA0",
+ "\xDB\xD4" => "\xE8\xBC\xA9",
+ "\xDB\xD5" => "\xE9\x85\x8D",
+ "\xDB\xD6" => "\xE9\x99\xAA",
+ "\xDB\xD7" => "\xE4\xBC\xAF",
+ "\xDB\xD8" => "\xE4\xBD\xB0",
+ "\xDB\xD9" => "\xE5\xB8\x9B",
+ "\xDB\xDA" => "\xE6\x9F\x8F",
+ "\xDB\xDB" => "\xE6\xA0\xA2",
+ "\xDB\xDC" => "\xE7\x99\xBD",
+ "\xDB\xDD" => "\xE7\x99\xBE",
+ "\xDB\xDE" => "\xE9\xAD\x84",
+ "\xDB\xDF" => "\xE5\xB9\xA1",
+ "\xDB\xE0" => "\xE6\xA8\x8A",
+ "\xDB\xE1" => "\xE7\x85\xA9",
+ "\xDB\xE2" => "\xE7\x87\x94",
+ "\xDB\xE3" => "\xE7\x95\xAA",
+ "\xDB\xE4" => "\xEF\xA5\xA4",
+ "\xDB\xE5" => "\xE7\xB9\x81",
+ "\xDB\xE6" => "\xE8\x95\x83",
+ "\xDB\xE7" => "\xE8\x97\xA9",
+ "\xDB\xE8" => "\xE9\xA3\x9C",
+ "\xDB\xE9" => "\xE4\xBC\x90",
+ "\xDB\xEA" => "\xE7\xAD\x8F",
+ "\xDB\xEB" => "\xE7\xBD\xB0",
+ "\xDB\xEC" => "\xE9\x96\xA5",
+ "\xDB\xED" => "\xE5\x87\xA1",
+ "\xDB\xEE" => "\xE5\xB8\x86",
+ "\xDB\xEF" => "\xE6\xA2\xB5",
+ "\xDB\xF0" => "\xE6\xB0\xBE",
+ "\xDB\xF1" => "\xE6\xB1\x8E",
+ "\xDB\xF2" => "\xE6\xB3\x9B",
+ "\xDB\xF3" => "\xE7\x8A\xAF",
+ "\xDB\xF4" => "\xE7\xAF\x84",
+ "\xDB\xF5" => "\xE8\x8C\x83",
+ "\xDB\xF6" => "\xE6\xB3\x95",
+ "\xDB\xF7" => "\xE7\x90\xBA",
+ "\xDB\xF8" => "\xE5\x83\xBB",
+ "\xDB\xF9" => "\xE5\x8A\x88",
+ "\xDB\xFA" => "\xE5\xA3\x81",
+ "\xDB\xFB" => "\xE6\x93\x98",
+ "\xDB\xFC" => "\xE6\xAA\x97",
+ "\xDB\xFD" => "\xE7\x92\xA7",
+ "\xDB\xFE" => "\xE7\x99\x96",
+ "\xDC\xA1" => "\xE7\xA2\xA7",
+ "\xDC\xA2" => "\xE8\x98\x97",
+ "\xDC\xA3" => "\xE9\x97\xA2",
+ "\xDC\xA4" => "\xE9\x9C\xB9",
+ "\xDC\xA5" => "\xEF\xA5\xA5",
+ "\xDC\xA6" => "\xE5\x8D\x9E",
+ "\xDC\xA7" => "\xE5\xBC\x81",
+ "\xDC\xA8" => "\xE8\xAE\x8A",
+ "\xDC\xA9" => "\xE8\xBE\xA8",
+ "\xDC\xAA" => "\xE8\xBE\xAF",
+ "\xDC\xAB" => "\xE9\x82\x8A",
+ "\xDC\xAC" => "\xE5\x88\xA5",
+ "\xDC\xAD" => "\xE7\x9E\xA5",
+ "\xDC\xAE" => "\xE9\xB1\x89",
+ "\xDC\xAF" => "\xE9\xBC\x88",
+ "\xDC\xB0" => "\xE4\xB8\x99",
+ "\xDC\xB1" => "\xE5\x80\x82",
+ "\xDC\xB2" => "\xE5\x85\xB5",
+ "\xDC\xB3" => "\xE5\xB1\x9B",
+ "\xDC\xB4" => "\xE5\xB9\xB7",
+ "\xDC\xB5" => "\xE6\x98\x9E",
+ "\xDC\xB6" => "\xE6\x98\xBA",
+ "\xDC\xB7" => "\xE6\x9F\x84",
+ "\xDC\xB8" => "\xE6\xA3\x85",
+ "\xDC\xB9" => "\xE7\x82\xB3",
+ "\xDC\xBA" => "\xE7\x94\x81",
+ "\xDC\xBB" => "\xE7\x97\x85",
+ "\xDC\xBC" => "\xE7\xA7\x89",
+ "\xDC\xBD" => "\xE7\xAB\x9D",
+ "\xDC\xBE" => "\xE8\xBC\xA7",
+ "\xDC\xBF" => "\xE9\xA4\xA0",
+ "\xDC\xC0" => "\xE9\xA8\x88",
+ "\xDC\xC1" => "\xE4\xBF\x9D",
+ "\xDC\xC2" => "\xE5\xA0\xA1",
+ "\xDC\xC3" => "\xE5\xA0\xB1",
+ "\xDC\xC4" => "\xE5\xAF\xB6",
+ "\xDC\xC5" => "\xE6\x99\xAE",
+ "\xDC\xC6" => "\xE6\xAD\xA5",
+ "\xDC\xC7" => "\xE6\xB4\x91",
+ "\xDC\xC8" => "\xE6\xB9\xBA",
+ "\xDC\xC9" => "\xE6\xBD\xBD",
+ "\xDC\xCA" => "\xE7\x8F\xA4",
+ "\xDC\xCB" => "\xE7\x94\xAB",
+ "\xDC\xCC" => "\xE8\x8F\xA9",
+ "\xDC\xCD" => "\xE8\xA3\x9C",
+ "\xDC\xCE" => "\xE8\xA4\x93",
+ "\xDC\xCF" => "\xE8\xAD\x9C",
+ "\xDC\xD0" => "\xE8\xBC\x94",
+ "\xDC\xD1" => "\xE4\xBC\x8F",
+ "\xDC\xD2" => "\xE5\x83\x95",
+ "\xDC\xD3" => "\xE5\x8C\x90",
+ "\xDC\xD4" => "\xE5\x8D\x9C",
+ "\xDC\xD5" => "\xE5\xAE\x93",
+ "\xDC\xD6" => "\xE5\xBE\xA9",
+ "\xDC\xD7" => "\xE6\x9C\x8D",
+ "\xDC\xD8" => "\xE7\xA6\x8F",
+ "\xDC\xD9" => "\xE8\x85\xB9",
+ "\xDC\xDA" => "\xE8\x8C\xAF",
+ "\xDC\xDB" => "\xE8\x94\x94",
+ "\xDC\xDC" => "\xE8\xA4\x87",
+ "\xDC\xDD" => "\xE8\xA6\x86",
+ "\xDC\xDE" => "\xE8\xBC\xB9",
+ "\xDC\xDF" => "\xE8\xBC\xBB",
+ "\xDC\xE0" => "\xE9\xA6\xA5",
+ "\xDC\xE1" => "\xE9\xB0\x92",
+ "\xDC\xE2" => "\xE6\x9C\xAC",
+ "\xDC\xE3" => "\xE4\xB9\xB6",
+ "\xDC\xE4" => "\xE4\xBF\xB8",
+ "\xDC\xE5" => "\xE5\xA5\x89",
+ "\xDC\xE6" => "\xE5\xB0\x81",
+ "\xDC\xE7" => "\xE5\xB3\xAF",
+ "\xDC\xE8" => "\xE5\xB3\xB0",
+ "\xDC\xE9" => "\xE6\x8D\xA7",
+ "\xDC\xEA" => "\xE6\xA3\x92",
+ "\xDC\xEB" => "\xE7\x83\xBD",
+ "\xDC\xEC" => "\xE7\x86\xA2",
+ "\xDC\xED" => "\xE7\x90\xAB",
+ "\xDC\xEE" => "\xE7\xB8\xAB",
+ "\xDC\xEF" => "\xE8\x93\xAC",
+ "\xDC\xF0" => "\xE8\x9C\x82",
+ "\xDC\xF1" => "\xE9\x80\xA2",
+ "\xDC\xF2" => "\xE9\x8B\x92",
+ "\xDC\xF3" => "\xE9\xB3\xB3",
+ "\xDC\xF4" => "\xE4\xB8\x8D",
+ "\xDC\xF5" => "\xE4\xBB\x98",
+ "\xDC\xF6" => "\xE4\xBF\xAF",
+ "\xDC\xF7" => "\xE5\x82\x85",
+ "\xDC\xF8" => "\xE5\x89\x96",
+ "\xDC\xF9" => "\xE5\x89\xAF",
+ "\xDC\xFA" => "\xE5\x90\xA6",
+ "\xDC\xFB" => "\xE5\x92\x90",
+ "\xDC\xFC" => "\xE5\x9F\xA0",
+ "\xDC\xFD" => "\xE5\xA4\xAB",
+ "\xDC\xFE" => "\xE5\xA9\xA6",
+ "\xDD\xA1" => "\xE5\xAD\x9A",
+ "\xDD\xA2" => "\xE5\xAD\xB5",
+ "\xDD\xA3" => "\xE5\xAF\x8C",
+ "\xDD\xA4" => "\xE5\xBA\x9C",
+ "\xDD\xA5" => "\xEF\xA5\xA6",
+ "\xDD\xA6" => "\xE6\x89\xB6",
+ "\xDD\xA7" => "\xE6\x95\xB7",
+ "\xDD\xA8" => "\xE6\x96\xA7",
+ "\xDD\xA9" => "\xE6\xB5\xAE",
+ "\xDD\xAA" => "\xE6\xBA\xA5",
+ "\xDD\xAB" => "\xE7\x88\xB6",
+ "\xDD\xAC" => "\xE7\xAC\xA6",
+ "\xDD\xAD" => "\xE7\xB0\xBF",
+ "\xDD\xAE" => "\xE7\xBC\xB6",
+ "\xDD\xAF" => "\xE8\x85\x90",
+ "\xDD\xB0" => "\xE8\x85\x91",
+ "\xDD\xB1" => "\xE8\x86\x9A",
+ "\xDD\xB2" => "\xE8\x89\x80",
+ "\xDD\xB3" => "\xE8\x8A\x99",
+ "\xDD\xB4" => "\xE8\x8E\xA9",
+ "\xDD\xB5" => "\xE8\xA8\x83",
+ "\xDD\xB6" => "\xE8\xB2\xA0",
+ "\xDD\xB7" => "\xE8\xB3\xA6",
+ "\xDD\xB8" => "\xE8\xB3\xBB",
+ "\xDD\xB9" => "\xE8\xB5\xB4",
+ "\xDD\xBA" => "\xE8\xB6\xBA",
+ "\xDD\xBB" => "\xE9\x83\xA8",
+ "\xDD\xBC" => "\xE9\x87\x9C",
+ "\xDD\xBD" => "\xE9\x98\x9C",
+ "\xDD\xBE" => "\xE9\x99\x84",
+ "\xDD\xBF" => "\xE9\xA7\x99",
+ "\xDD\xC0" => "\xE9\xB3\xA7",
+ "\xDD\xC1" => "\xE5\x8C\x97",
+ "\xDD\xC2" => "\xE5\x88\x86",
+ "\xDD\xC3" => "\xE5\x90\xA9",
+ "\xDD\xC4" => "\xE5\x99\xB4",
+ "\xDD\xC5" => "\xE5\xA2\xB3",
+ "\xDD\xC6" => "\xE5\xA5\x94",
+ "\xDD\xC7" => "\xE5\xA5\xAE",
+ "\xDD\xC8" => "\xE5\xBF\xBF",
+ "\xDD\xC9" => "\xE6\x86\xA4",
+ "\xDD\xCA" => "\xE6\x89\xAE",
+ "\xDD\xCB" => "\xE6\x98\x90",
+ "\xDD\xCC" => "\xE6\xB1\xBE",
+ "\xDD\xCD" => "\xE7\x84\x9A",
+ "\xDD\xCE" => "\xE7\x9B\x86",
+ "\xDD\xCF" => "\xE7\xB2\x89",
+ "\xDD\xD0" => "\xE7\xB3\x9E",
+ "\xDD\xD1" => "\xE7\xB4\x9B",
+ "\xDD\xD2" => "\xE8\x8A\xAC",
+ "\xDD\xD3" => "\xE8\xB3\x81",
+ "\xDD\xD4" => "\xE9\x9B\xB0",
+ "\xDD\xD5" => "\xEF\xA5\xA7",
+ "\xDD\xD6" => "\xE4\xBD\x9B",
+ "\xDD\xD7" => "\xE5\xBC\x97",
+ "\xDD\xD8" => "\xE5\xBD\xBF",
+ "\xDD\xD9" => "\xE6\x8B\x82",
+ "\xDD\xDA" => "\xE5\xB4\xA9",
+ "\xDD\xDB" => "\xE6\x9C\x8B",
+ "\xDD\xDC" => "\xE6\xA3\x9A",
+ "\xDD\xDD" => "\xE7\xA1\xBC",
+ "\xDD\xDE" => "\xE7\xB9\x83",
+ "\xDD\xDF" => "\xE9\xB5\xAC",
+ "\xDD\xE0" => "\xE4\xB8\x95",
+ "\xDD\xE1" => "\xE5\x82\x99",
+ "\xDD\xE2" => "\xE5\x8C\x95",
+ "\xDD\xE3" => "\xE5\x8C\xAA",
+ "\xDD\xE4" => "\xE5\x8D\x91",
+ "\xDD\xE5" => "\xE5\xA6\x83",
+ "\xDD\xE6" => "\xE5\xA9\xA2",
+ "\xDD\xE7" => "\xE5\xBA\x87",
+ "\xDD\xE8" => "\xE6\x82\xB2",
+ "\xDD\xE9" => "\xE6\x86\x8A",
+ "\xDD\xEA" => "\xE6\x89\x89",
+ "\xDD\xEB" => "\xE6\x89\xB9",
+ "\xDD\xEC" => "\xE6\x96\x90",
+ "\xDD\xED" => "\xE6\x9E\x87",
+ "\xDD\xEE" => "\xE6\xA6\xA7",
+ "\xDD\xEF" => "\xE6\xAF\x94",
+ "\xDD\xF0" => "\xE6\xAF\x96",
+ "\xDD\xF1" => "\xE6\xAF\x97",
+ "\xDD\xF2" => "\xE6\xAF\x98",
+ "\xDD\xF3" => "\xE6\xB2\xB8",
+ "\xDD\xF4" => "\xEF\xA5\xA8",
+ "\xDD\xF5" => "\xE7\x90\xB5",
+ "\xDD\xF6" => "\xE7\x97\xBA",
+ "\xDD\xF7" => "\xE7\xA0\x92",
+ "\xDD\xF8" => "\xE7\xA2\x91",
+ "\xDD\xF9" => "\xE7\xA7\x95",
+ "\xDD\xFA" => "\xE7\xA7\x98",
+ "\xDD\xFB" => "\xE7\xB2\x83",
+ "\xDD\xFC" => "\xE7\xB7\x8B",
+ "\xDD\xFD" => "\xE7\xBF\xA1",
+ "\xDD\xFE" => "\xE8\x82\xA5",
+ "\xDE\xA1" => "\xE8\x84\xBE",
+ "\xDE\xA2" => "\xE8\x87\x82",
+ "\xDE\xA3" => "\xE8\x8F\xB2",
+ "\xDE\xA4" => "\xE8\x9C\x9A",
+ "\xDE\xA5" => "\xE8\xA3\xA8",
+ "\xDE\xA6" => "\xE8\xAA\xB9",
+ "\xDE\xA7" => "\xE8\xAD\xAC",
+ "\xDE\xA8" => "\xE8\xB2\xBB",
+ "\xDE\xA9" => "\xE9\x84\x99",
+ "\xDE\xAA" => "\xE9\x9D\x9E",
+ "\xDE\xAB" => "\xE9\xA3\x9B",
+ "\xDE\xAC" => "\xE9\xBC\xBB",
+ "\xDE\xAD" => "\xE5\x9A\xAC",
+ "\xDE\xAE" => "\xE5\xAC\xAA",
+ "\xDE\xAF" => "\xE5\xBD\xAC",
+ "\xDE\xB0" => "\xE6\x96\x8C",
+ "\xDE\xB1" => "\xE6\xAA\xB3",
+ "\xDE\xB2" => "\xE6\xAE\xAF",
+ "\xDE\xB3" => "\xE6\xB5\x9C",
+ "\xDE\xB4" => "\xE6\xBF\xB1",
+ "\xDE\xB5" => "\xE7\x80\x95",
+ "\xDE\xB6" => "\xE7\x89\x9D",
+ "\xDE\xB7" => "\xE7\x8E\xAD",
+ "\xDE\xB8" => "\xE8\xB2\xA7",
+ "\xDE\xB9" => "\xE8\xB3\x93",
+ "\xDE\xBA" => "\xE9\xA0\xBB",
+ "\xDE\xBB" => "\xE6\x86\x91",
+ "\xDE\xBC" => "\xE6\xB0\xB7",
+ "\xDE\xBD" => "\xE8\x81\x98",
+ "\xDE\xBE" => "\xE9\xA8\x81",
+ "\xDE\xBF" => "\xE4\xB9\x8D",
+ "\xDE\xC0" => "\xE4\xBA\x8B",
+ "\xDE\xC1" => "\xE4\xBA\x9B",
+ "\xDE\xC2" => "\xE4\xBB\x95",
+ "\xDE\xC3" => "\xE4\xBC\xBA",
+ "\xDE\xC4" => "\xE4\xBC\xBC",
+ "\xDE\xC5" => "\xE4\xBD\xBF",
+ "\xDE\xC6" => "\xE4\xBF\x9F",
+ "\xDE\xC7" => "\xE5\x83\xBF",
+ "\xDE\xC8" => "\xE5\x8F\xB2",
+ "\xDE\xC9" => "\xE5\x8F\xB8",
+ "\xDE\xCA" => "\xE5\x94\x86",
+ "\xDE\xCB" => "\xE5\x97\xA3",
+ "\xDE\xCC" => "\xE5\x9B\x9B",
+ "\xDE\xCD" => "\xE5\xA3\xAB",
+ "\xDE\xCE" => "\xE5\xA5\xA2",
+ "\xDE\xCF" => "\xE5\xA8\x91",
+ "\xDE\xD0" => "\xE5\xAF\xAB",
+ "\xDE\xD1" => "\xE5\xAF\xBA",
+ "\xDE\xD2" => "\xE5\xB0\x84",
+ "\xDE\xD3" => "\xE5\xB7\xB3",
+ "\xDE\xD4" => "\xE5\xB8\xAB",
+ "\xDE\xD5" => "\xE5\xBE\x99",
+ "\xDE\xD6" => "\xE6\x80\x9D",
+ "\xDE\xD7" => "\xE6\x8D\xA8",
+ "\xDE\xD8" => "\xE6\x96\x9C",
+ "\xDE\xD9" => "\xE6\x96\xAF",
+ "\xDE\xDA" => "\xE6\x9F\xB6",
+ "\xDE\xDB" => "\xE6\x9F\xBB",
+ "\xDE\xDC" => "\xE6\xA2\xAD",
+ "\xDE\xDD" => "\xE6\xAD\xBB",
+ "\xDE\xDE" => "\xE6\xB2\x99",
+ "\xDE\xDF" => "\xE6\xB3\x97",
+ "\xDE\xE0" => "\xE6\xB8\xA3",
+ "\xDE\xE1" => "\xE7\x80\x89",
+ "\xDE\xE2" => "\xE7\x8D\x85",
+ "\xDE\xE3" => "\xE7\xA0\x82",
+ "\xDE\xE4" => "\xE7\xA4\xBE",
+ "\xDE\xE5" => "\xE7\xA5\x80",
+ "\xDE\xE6" => "\xE7\xA5\xA0",
+ "\xDE\xE7" => "\xE7\xA7\x81",
+ "\xDE\xE8" => "\xE7\xAF\xA9",
+ "\xDE\xE9" => "\xE7\xB4\x97",
+ "\xDE\xEA" => "\xE7\xB5\xB2",
+ "\xDE\xEB" => "\xE8\x82\x86",
+ "\xDE\xEC" => "\xE8\x88\x8D",
+ "\xDE\xED" => "\xE8\x8E\x8E",
+ "\xDE\xEE" => "\xE8\x93\x91",
+ "\xDE\xEF" => "\xE8\x9B\x87",
+ "\xDE\xF0" => "\xE8\xA3\x9F",
+ "\xDE\xF1" => "\xE8\xA9\x90",
+ "\xDE\xF2" => "\xE8\xA9\x9E",
+ "\xDE\xF3" => "\xE8\xAC\x9D",
+ "\xDE\xF4" => "\xE8\xB3\x9C",
+ "\xDE\xF5" => "\xE8\xB5\xA6",
+ "\xDE\xF6" => "\xE8\xBE\xAD",
+ "\xDE\xF7" => "\xE9\x82\xAA",
+ "\xDE\xF8" => "\xE9\xA3\xBC",
+ "\xDE\xF9" => "\xE9\xA7\x9F",
+ "\xDE\xFA" => "\xE9\xBA\x9D",
+ "\xDE\xFB" => "\xE5\x89\x8A",
+ "\xDE\xFC" => "\xEF\xA5\xA9",
+ "\xDE\xFD" => "\xE6\x9C\x94",
+ "\xDE\xFE" => "\xEF\xA5\xAA",
+ "\xDF\xA1" => "\xE5\x82\x98",
+ "\xDF\xA2" => "\xE5\x88\xAA",
+ "\xDF\xA3" => "\xE5\xB1\xB1",
+ "\xDF\xA4" => "\xE6\x95\xA3",
+ "\xDF\xA5" => "\xE6\xB1\x95",
+ "\xDF\xA6" => "\xE7\x8F\x8A",
+ "\xDF\xA7" => "\xE7\x94\xA3",
+ "\xDF\xA8" => "\xE7\x96\x9D",
+ "\xDF\xA9" => "\xE7\xAE\x97",
+ "\xDF\xAA" => "\xE8\x92\x9C",
+ "\xDF\xAB" => "\xE9\x85\xB8",
+ "\xDF\xAC" => "\xE9\x9C\xB0",
+ "\xDF\xAD" => "\xE4\xB9\xB7",
+ "\xDF\xAE" => "\xE6\x92\x92",
+ "\xDF\xAF" => "\xE6\xAE\xBA",
+ "\xDF\xB0" => "\xE7\x85\x9E",
+ "\xDF\xB1" => "\xE8\x96\xA9",
+ "\xDF\xB2" => "\xE4\xB8\x89",
+ "\xDF\xB3" => "\xEF\xA5\xAB",
+ "\xDF\xB4" => "\xE6\x9D\x89",
+ "\xDF\xB5" => "\xE6\xA3\xAE",
+ "\xDF\xB6" => "\xE6\xB8\x97",
+ "\xDF\xB7" => "\xE8\x8A\x9F",
+ "\xDF\xB8" => "\xE8\x94\x98",
+ "\xDF\xB9" => "\xE8\xA1\xAB",
+ "\xDF\xBA" => "\xE6\x8F\xB7",
+ "\xDF\xBB" => "\xE6\xBE\x81",
+ "\xDF\xBC" => "\xE9\x88\x92",
+ "\xDF\xBD" => "\xE9\xA2\xAF",
+ "\xDF\xBE" => "\xE4\xB8\x8A",
+ "\xDF\xBF" => "\xE5\x82\xB7",
+ "\xDF\xC0" => "\xE5\x83\x8F",
+ "\xDF\xC1" => "\xE5\x84\x9F",
+ "\xDF\xC2" => "\xE5\x95\x86",
+ "\xDF\xC3" => "\xE5\x96\xAA",
+ "\xDF\xC4" => "\xE5\x98\x97",
+ "\xDF\xC5" => "\xE5\xAD\x80",
+ "\xDF\xC6" => "\xE5\xB0\x99",
+ "\xDF\xC7" => "\xE5\xB3\xA0",
+ "\xDF\xC8" => "\xE5\xB8\xB8",
+ "\xDF\xC9" => "\xE5\xBA\x8A",
+ "\xDF\xCA" => "\xE5\xBA\xA0",
+ "\xDF\xCB" => "\xE5\xBB\x82",
+ "\xDF\xCC" => "\xE6\x83\xB3",
+ "\xDF\xCD" => "\xE6\xA1\x91",
+ "\xDF\xCE" => "\xE6\xA9\xA1",
+ "\xDF\xCF" => "\xE6\xB9\x98",
+ "\xDF\xD0" => "\xE7\x88\xBD",
+ "\xDF\xD1" => "\xE7\x89\x80",
+ "\xDF\xD2" => "\xE7\x8B\x80",
+ "\xDF\xD3" => "\xE7\x9B\xB8",
+ "\xDF\xD4" => "\xE7\xA5\xA5",
+ "\xDF\xD5" => "\xE7\xAE\xB1",
+ "\xDF\xD6" => "\xE7\xBF\x94",
+ "\xDF\xD7" => "\xE8\xA3\xB3",
+ "\xDF\xD8" => "\xE8\xA7\xB4",
+ "\xDF\xD9" => "\xE8\xA9\xB3",
+ "\xDF\xDA" => "\xE8\xB1\xA1",
+ "\xDF\xDB" => "\xE8\xB3\x9E",
+ "\xDF\xDC" => "\xE9\x9C\x9C",
+ "\xDF\xDD" => "\xE5\xA1\x9E",
+ "\xDF\xDE" => "\xE7\x92\xBD",
+ "\xDF\xDF" => "\xE8\xB3\xBD",
+ "\xDF\xE0" => "\xE5\x97\x87",
+ "\xDF\xE1" => "\xEF\xA5\xAC",
+ "\xDF\xE2" => "\xE7\xA9\xA1",
+ "\xDF\xE3" => "\xE7\xB4\xA2",
+ "\xDF\xE4" => "\xE8\x89\xB2",
+ "\xDF\xE5" => "\xE7\x89\xB2",
+ "\xDF\xE6" => "\xE7\x94\x9F",
+ "\xDF\xE7" => "\xE7\x94\xA5",
+ "\xDF\xE8" => "\xEF\xA5\xAD",
+ "\xDF\xE9" => "\xE7\xAC\x99",
+ "\xDF\xEA" => "\xE5\xA2\x85",
+ "\xDF\xEB" => "\xE5\xA3\xBB",
+ "\xDF\xEC" => "\xE5\xB6\xBC",
+ "\xDF\xED" => "\xE5\xBA\x8F",
+ "\xDF\xEE" => "\xE5\xBA\xB6",
+ "\xDF\xEF" => "\xE5\xBE\x90",
+ "\xDF\xF0" => "\xE6\x81\x95",
+ "\xDF\xF1" => "\xE6\x8A\x92",
+ "\xDF\xF2" => "\xE6\x8D\xBF",
+ "\xDF\xF3" => "\xE6\x95\x8D",
+ "\xDF\xF4" => "\xE6\x9A\x91",
+ "\xDF\xF5" => "\xE6\x9B\x99",
+ "\xDF\xF6" => "\xE6\x9B\xB8",
+ "\xDF\xF7" => "\xE6\xA0\x96",
+ "\xDF\xF8" => "\xE6\xA3\xB2",
+ "\xDF\xF9" => "\xE7\x8A\x80",
+ "\xDF\xFA" => "\xE7\x91\x9E",
+ "\xDF\xFB" => "\xE7\xAD\xAE",
+ "\xDF\xFC" => "\xE7\xB5\xAE",
+ "\xDF\xFD" => "\xE7\xB7\x96",
+ "\xDF\xFE" => "\xE7\xBD\xB2",
+ "\xE0\xA1" => "\xE8\x83\xA5",
+ "\xE0\xA2" => "\xE8\x88\x92",
+ "\xE0\xA3" => "\xE8\x96\xAF",
+ "\xE0\xA4" => "\xE8\xA5\xBF",
+ "\xE0\xA5" => "\xE8\xAA\x93",
+ "\xE0\xA6" => "\xE9\x80\x9D",
+ "\xE0\xA7" => "\xE9\x8B\xA4",
+ "\xE0\xA8" => "\xE9\xBB\x8D",
+ "\xE0\xA9" => "\xE9\xBC\xA0",
+ "\xE0\xAA" => "\xE5\xA4\x95",
+ "\xE0\xAB" => "\xE5\xA5\xAD",
+ "\xE0\xAC" => "\xE5\xB8\xAD",
+ "\xE0\xAD" => "\xE6\x83\x9C",
+ "\xE0\xAE" => "\xE6\x98\x94",
+ "\xE0\xAF" => "\xE6\x99\xB3",
+ "\xE0\xB0" => "\xE6\x9E\x90",
+ "\xE0\xB1" => "\xE6\xB1\x90",
+ "\xE0\xB2" => "\xE6\xB7\x85",
+ "\xE0\xB3" => "\xE6\xBD\x9F",
+ "\xE0\xB4" => "\xE7\x9F\xB3",
+ "\xE0\xB5" => "\xE7\xA2\xA9",
+ "\xE0\xB6" => "\xE8\x93\x86",
+ "\xE0\xB7" => "\xE9\x87\x8B",
+ "\xE0\xB8" => "\xE9\x8C\xAB",
+ "\xE0\xB9" => "\xE4\xBB\x99",
+ "\xE0\xBA" => "\xE5\x83\x8A",
+ "\xE0\xBB" => "\xE5\x85\x88",
+ "\xE0\xBC" => "\xE5\x96\x84",
+ "\xE0\xBD" => "\xE5\xAC\x8B",
+ "\xE0\xBE" => "\xE5\xAE\xA3",
+ "\xE0\xBF" => "\xE6\x89\x87",
+ "\xE0\xC0" => "\xE6\x95\xBE",
+ "\xE0\xC1" => "\xE6\x97\x8B",
+ "\xE0\xC2" => "\xE6\xB8\xB2",
+ "\xE0\xC3" => "\xE7\x85\xBD",
+ "\xE0\xC4" => "\xE7\x90\x81",
+ "\xE0\xC5" => "\xE7\x91\x84",
+ "\xE0\xC6" => "\xE7\x92\x87",
+ "\xE0\xC7" => "\xE7\x92\xBF",
+ "\xE0\xC8" => "\xE7\x99\xAC",
+ "\xE0\xC9" => "\xE7\xA6\xAA",
+ "\xE0\xCA" => "\xE7\xB7\x9A",
+ "\xE0\xCB" => "\xE7\xB9\x95",
+ "\xE0\xCC" => "\xE7\xBE\xA8",
+ "\xE0\xCD" => "\xE8\x85\xBA",
+ "\xE0\xCE" => "\xE8\x86\xB3",
+ "\xE0\xCF" => "\xE8\x88\xB9",
+ "\xE0\xD0" => "\xE8\x98\x9A",
+ "\xE0\xD1" => "\xE8\x9F\xAC",
+ "\xE0\xD2" => "\xE8\xA9\xB5",
+ "\xE0\xD3" => "\xE8\xB7\xA3",
+ "\xE0\xD4" => "\xE9\x81\xB8",
+ "\xE0\xD5" => "\xE9\x8A\x91",
+ "\xE0\xD6" => "\xE9\x90\xA5",
+ "\xE0\xD7" => "\xE9\xA5\x8D",
+ "\xE0\xD8" => "\xE9\xAE\xAE",
+ "\xE0\xD9" => "\xE5\x8D\xA8",
+ "\xE0\xDA" => "\xE5\xB1\x91",
+ "\xE0\xDB" => "\xE6\xA5\x94",
+ "\xE0\xDC" => "\xE6\xB3\x84",
+ "\xE0\xDD" => "\xE6\xB4\xA9",
+ "\xE0\xDE" => "\xE6\xB8\xAB",
+ "\xE0\xDF" => "\xE8\x88\x8C",
+ "\xE0\xE0" => "\xE8\x96\x9B",
+ "\xE0\xE1" => "\xE8\xA4\xBB",
+ "\xE0\xE2" => "\xE8\xA8\xAD",
+ "\xE0\xE3" => "\xE8\xAA\xAA",
+ "\xE0\xE4" => "\xE9\x9B\xAA",
+ "\xE0\xE5" => "\xE9\xBD\xA7",
+ "\xE0\xE6" => "\xE5\x89\xA1",
+ "\xE0\xE7" => "\xE6\x9A\xB9",
+ "\xE0\xE8" => "\xE6\xAE\xB2",
+ "\xE0\xE9" => "\xE7\xBA\x96",
+ "\xE0\xEA" => "\xE8\x9F\xBE",
+ "\xE0\xEB" => "\xE8\xB4\x8D",
+ "\xE0\xEC" => "\xE9\x96\x83",
+ "\xE0\xED" => "\xE9\x99\x9D",
+ "\xE0\xEE" => "\xE6\x94\x9D",
+ "\xE0\xEF" => "\xE6\xB6\x89",
+ "\xE0\xF0" => "\xE7\x87\xAE",
+ "\xE0\xF1" => "\xEF\xA5\xAE",
+ "\xE0\xF2" => "\xE5\x9F\x8E",
+ "\xE0\xF3" => "\xE5\xA7\x93",
+ "\xE0\xF4" => "\xE5\xAE\xAC",
+ "\xE0\xF5" => "\xE6\x80\xA7",
+ "\xE0\xF6" => "\xE6\x83\xBA",
+ "\xE0\xF7" => "\xE6\x88\x90",
+ "\xE0\xF8" => "\xE6\x98\x9F",
+ "\xE0\xF9" => "\xE6\x99\x9F",
+ "\xE0\xFA" => "\xE7\x8C\xA9",
+ "\xE0\xFB" => "\xE7\x8F\xB9",
+ "\xE0\xFC" => "\xE7\x9B\x9B",
+ "\xE0\xFD" => "\xE7\x9C\x81",
+ "\xE0\xFE" => "\xE7\xAD\xAC",
+ "\xE1\xA1" => "\xE8\x81\x96",
+ "\xE1\xA2" => "\xE8\x81\xB2",
+ "\xE1\xA3" => "\xE8\x85\xA5",
+ "\xE1\xA4" => "\xE8\xAA\xA0",
+ "\xE1\xA5" => "\xE9\x86\x92",
+ "\xE1\xA6" => "\xE4\xB8\x96",
+ "\xE1\xA7" => "\xE5\x8B\xA2",
+ "\xE1\xA8" => "\xE6\xAD\xB2",
+ "\xE1\xA9" => "\xE6\xB4\x97",
+ "\xE1\xAA" => "\xE7\xA8\x85",
+ "\xE1\xAB" => "\xE7\xAC\xB9",
+ "\xE1\xAC" => "\xE7\xB4\xB0",
+ "\xE1\xAD" => "\xEF\xA5\xAF",
+ "\xE1\xAE" => "\xE8\xB2\xB0",
+ "\xE1\xAF" => "\xE5\x8F\xAC",
+ "\xE1\xB0" => "\xE5\x98\xAF",
+ "\xE1\xB1" => "\xE5\xA1\x91",
+ "\xE1\xB2" => "\xE5\xAE\xB5",
+ "\xE1\xB3" => "\xE5\xB0\x8F",
+ "\xE1\xB4" => "\xE5\xB0\x91",
+ "\xE1\xB5" => "\xE5\xB7\xA2",
+ "\xE1\xB6" => "\xE6\x89\x80",
+ "\xE1\xB7" => "\xE6\x8E\x83",
+ "\xE1\xB8" => "\xE6\x90\x94",
+ "\xE1\xB9" => "\xE6\x98\xAD",
+ "\xE1\xBA" => "\xE6\xA2\xB3",
+ "\xE1\xBB" => "\xE6\xB2\xBC",
+ "\xE1\xBC" => "\xE6\xB6\x88",
+ "\xE1\xBD" => "\xE6\xBA\xAF",
+ "\xE1\xBE" => "\xE7\x80\x9F",
+ "\xE1\xBF" => "\xE7\x82\xA4",
+ "\xE1\xC0" => "\xE7\x87\x92",
+ "\xE1\xC1" => "\xE7\x94\xA6",
+ "\xE1\xC2" => "\xE7\x96\x8F",
+ "\xE1\xC3" => "\xE7\x96\x8E",
+ "\xE1\xC4" => "\xE7\x98\x99",
+ "\xE1\xC5" => "\xE7\xAC\x91",
+ "\xE1\xC6" => "\xE7\xAF\xA0",
+ "\xE1\xC7" => "\xE7\xB0\xAB",
+ "\xE1\xC8" => "\xE7\xB4\xA0",
+ "\xE1\xC9" => "\xE7\xB4\xB9",
+ "\xE1\xCA" => "\xE8\x94\xAC",
+ "\xE1\xCB" => "\xE8\x95\xAD",
+ "\xE1\xCC" => "\xE8\x98\x87",
+ "\xE1\xCD" => "\xE8\xA8\xB4",
+ "\xE1\xCE" => "\xE9\x80\x8D",
+ "\xE1\xCF" => "\xE9\x81\xA1",
+ "\xE1\xD0" => "\xE9\x82\xB5",
+ "\xE1\xD1" => "\xE9\x8A\xB7",
+ "\xE1\xD2" => "\xE9\x9F\xB6",
+ "\xE1\xD3" => "\xE9\xA8\xB7",
+ "\xE1\xD4" => "\xE4\xBF\x97",
+ "\xE1\xD5" => "\xE5\xB1\xAC",
+ "\xE1\xD6" => "\xE6\x9D\x9F",
+ "\xE1\xD7" => "\xE6\xB6\x91",
+ "\xE1\xD8" => "\xE7\xB2\x9F",
+ "\xE1\xD9" => "\xE7\xBA\x8C",
+ "\xE1\xDA" => "\xE8\xAC\x96",
+ "\xE1\xDB" => "\xE8\xB4\x96",
+ "\xE1\xDC" => "\xE9\x80\x9F",
+ "\xE1\xDD" => "\xE5\xAD\xAB",
+ "\xE1\xDE" => "\xE5\xB7\xBD",
+ "\xE1\xDF" => "\xE6\x90\x8D",
+ "\xE1\xE0" => "\xE8\x93\x80",
+ "\xE1\xE1" => "\xE9\x81\x9C",
+ "\xE1\xE2" => "\xE9\xA3\xA1",
+ "\xE1\xE3" => "\xE7\x8E\x87",
+ "\xE1\xE4" => "\xE5\xAE\x8B",
+ "\xE1\xE5" => "\xE6\x82\x9A",
+ "\xE1\xE6" => "\xE6\x9D\xBE",
+ "\xE1\xE7" => "\xE6\xB7\x9E",
+ "\xE1\xE8" => "\xE8\xA8\x9F",
+ "\xE1\xE9" => "\xE8\xAA\xA6",
+ "\xE1\xEA" => "\xE9\x80\x81",
+ "\xE1\xEB" => "\xE9\xA0\x8C",
+ "\xE1\xEC" => "\xE5\x88\xB7",
+ "\xE1\xED" => "\xEF\xA5\xB0",
+ "\xE1\xEE" => "\xE7\x81\x91",
+ "\xE1\xEF" => "\xE7\xA2\x8E",
+ "\xE1\xF0" => "\xE9\x8E\x96",
+ "\xE1\xF1" => "\xE8\xA1\xB0",
+ "\xE1\xF2" => "\xE9\x87\x97",
+ "\xE1\xF3" => "\xE4\xBF\xAE",
+ "\xE1\xF4" => "\xE5\x8F\x97",
+ "\xE1\xF5" => "\xE5\x97\xBD",
+ "\xE1\xF6" => "\xE5\x9B\x9A",
+ "\xE1\xF7" => "\xE5\x9E\x82",
+ "\xE1\xF8" => "\xE5\xA3\xBD",
+ "\xE1\xF9" => "\xE5\xAB\x82",
+ "\xE1\xFA" => "\xE5\xAE\x88",
+ "\xE1\xFB" => "\xE5\xB2\xAB",
+ "\xE1\xFC" => "\xE5\xB3\x80",
+ "\xE1\xFD" => "\xE5\xB8\xA5",
+ "\xE1\xFE" => "\xE6\x84\x81",
+ "\xE2\xA1" => "\xE6\x88\x8D",
+ "\xE2\xA2" => "\xE6\x89\x8B",
+ "\xE2\xA3" => "\xE6\x8E\x88",
+ "\xE2\xA4" => "\xE6\x90\x9C",
+ "\xE2\xA5" => "\xE6\x94\xB6",
+ "\xE2\xA6" => "\xE6\x95\xB8",
+ "\xE2\xA7" => "\xE6\xA8\xB9",
+ "\xE2\xA8" => "\xE6\xAE\x8A",
+ "\xE2\xA9" => "\xE6\xB0\xB4",
+ "\xE2\xAA" => "\xE6\xB4\x99",
+ "\xE2\xAB" => "\xE6\xBC\xB1",
+ "\xE2\xAC" => "\xE7\x87\xA7",
+ "\xE2\xAD" => "\xE7\x8B\xA9",
+ "\xE2\xAE" => "\xE7\x8D\xB8",
+ "\xE2\xAF" => "\xE7\x90\x87",
+ "\xE2\xB0" => "\xE7\x92\xB2",
+ "\xE2\xB1" => "\xE7\x98\xA6",
+ "\xE2\xB2" => "\xE7\x9D\xA1",
+ "\xE2\xB3" => "\xE7\xA7\x80",
+ "\xE2\xB4" => "\xE7\xA9\x97",
+ "\xE2\xB5" => "\xE7\xAB\xAA",
+ "\xE2\xB6" => "\xE7\xB2\xB9",
+ "\xE2\xB7" => "\xE7\xB6\x8F",
+ "\xE2\xB8" => "\xE7\xB6\xAC",
+ "\xE2\xB9" => "\xE7\xB9\xA1",
+ "\xE2\xBA" => "\xE7\xBE\x9E",
+ "\xE2\xBB" => "\xE8\x84\xA9",
+ "\xE2\xBC" => "\xE8\x8C\xB1",
+ "\xE2\xBD" => "\xE8\x92\x90",
+ "\xE2\xBE" => "\xE8\x93\x9A",
+ "\xE2\xBF" => "\xE8\x97\xAA",
+ "\xE2\xC0" => "\xE8\xA2\x96",
+ "\xE2\xC1" => "\xE8\xAA\xB0",
+ "\xE2\xC2" => "\xE8\xAE\x90",
+ "\xE2\xC3" => "\xE8\xBC\xB8",
+ "\xE2\xC4" => "\xE9\x81\x82",
+ "\xE2\xC5" => "\xE9\x82\x83",
+ "\xE2\xC6" => "\xE9\x85\xAC",
+ "\xE2\xC7" => "\xE9\x8A\x96",
+ "\xE2\xC8" => "\xE9\x8A\xB9",
+ "\xE2\xC9" => "\xE9\x9A\x8B",
+ "\xE2\xCA" => "\xE9\x9A\xA7",
+ "\xE2\xCB" => "\xE9\x9A\xA8",
+ "\xE2\xCC" => "\xE9\x9B\x96",
+ "\xE2\xCD" => "\xE9\x9C\x80",
+ "\xE2\xCE" => "\xE9\xA0\x88",
+ "\xE2\xCF" => "\xE9\xA6\x96",
+ "\xE2\xD0" => "\xE9\xAB\x93",
+ "\xE2\xD1" => "\xE9\xAC\x9A",
+ "\xE2\xD2" => "\xE5\x8F\x94",
+ "\xE2\xD3" => "\xE5\xA1\xBE",
+ "\xE2\xD4" => "\xE5\xA4\x99",
+ "\xE2\xD5" => "\xE5\xAD\xB0",
+ "\xE2\xD6" => "\xE5\xAE\xBF",
+ "\xE2\xD7" => "\xE6\xB7\x91",
+ "\xE2\xD8" => "\xE6\xBD\x9A",
+ "\xE2\xD9" => "\xE7\x86\x9F",
+ "\xE2\xDA" => "\xE7\x90\xA1",
+ "\xE2\xDB" => "\xE7\x92\xB9",
+ "\xE2\xDC" => "\xE8\x82\x85",
+ "\xE2\xDD" => "\xE8\x8F\xBD",
+ "\xE2\xDE" => "\xE5\xB7\xA1",
+ "\xE2\xDF" => "\xE5\xBE\x87",
+ "\xE2\xE0" => "\xE5\xBE\xAA",
+ "\xE2\xE1" => "\xE6\x81\x82",
+ "\xE2\xE2" => "\xE6\x97\xAC",
+ "\xE2\xE3" => "\xE6\xA0\x92",
+ "\xE2\xE4" => "\xE6\xA5\xAF",
+ "\xE2\xE5" => "\xE6\xA9\x93",
+ "\xE2\xE6" => "\xE6\xAE\x89",
+ "\xE2\xE7" => "\xE6\xB4\xB5",
+ "\xE2\xE8" => "\xE6\xB7\xB3",
+ "\xE2\xE9" => "\xE7\x8F\xA3",
+ "\xE2\xEA" => "\xE7\x9B\xBE",
+ "\xE2\xEB" => "\xE7\x9E\xAC",
+ "\xE2\xEC" => "\xE7\xAD\x8D",
+ "\xE2\xED" => "\xE7\xB4\x94",
+ "\xE2\xEE" => "\xE8\x84\xA3",
+ "\xE2\xEF" => "\xE8\x88\x9C",
+ "\xE2\xF0" => "\xE8\x8D\x80",
+ "\xE2\xF1" => "\xE8\x93\xB4",
+ "\xE2\xF2" => "\xE8\x95\xA3",
+ "\xE2\xF3" => "\xE8\xA9\xA2",
+ "\xE2\xF4" => "\xE8\xAB\x84",
+ "\xE2\xF5" => "\xE9\x86\x87",
+ "\xE2\xF6" => "\xE9\x8C\x9E",
+ "\xE2\xF7" => "\xE9\xA0\x86",
+ "\xE2\xF8" => "\xE9\xA6\xB4",
+ "\xE2\xF9" => "\xE6\x88\x8C",
+ "\xE2\xFA" => "\xE8\xA1\x93",
+ "\xE2\xFB" => "\xE8\xBF\xB0",
+ "\xE2\xFC" => "\xE9\x89\xA5",
+ "\xE2\xFD" => "\xE5\xB4\x87",
+ "\xE2\xFE" => "\xE5\xB4\xA7",
+ "\xE3\xA1" => "\xE5\xB5\xA9",
+ "\xE3\xA2" => "\xE7\x91\x9F",
+ "\xE3\xA3" => "\xE8\x86\x9D",
+ "\xE3\xA4" => "\xE8\x9D\xA8",
+ "\xE3\xA5" => "\xE6\xBF\x95",
+ "\xE3\xA6" => "\xE6\x8B\xBE",
+ "\xE3\xA7" => "\xE7\xBF\x92",
+ "\xE3\xA8" => "\xE8\xA4\xB6",
+ "\xE3\xA9" => "\xE8\xA5\xB2",
+ "\xE3\xAA" => "\xE4\xB8\x9E",
+ "\xE3\xAB" => "\xE4\xB9\x98",
+ "\xE3\xAC" => "\xE5\x83\xA7",
+ "\xE3\xAD" => "\xE5\x8B\x9D",
+ "\xE3\xAE" => "\xE5\x8D\x87",
+ "\xE3\xAF" => "\xE6\x89\xBF",
+ "\xE3\xB0" => "\xE6\x98\x87",
+ "\xE3\xB1" => "\xE7\xB9\xA9",
+ "\xE3\xB2" => "\xE8\xA0\x85",
+ "\xE3\xB3" => "\xE9\x99\x9E",
+ "\xE3\xB4" => "\xE4\xBE\x8D",
+ "\xE3\xB5" => "\xE5\x8C\x99",
+ "\xE3\xB6" => "\xE5\x98\xB6",
+ "\xE3\xB7" => "\xE5\xA7\x8B",
+ "\xE3\xB8" => "\xE5\xAA\xA4",
+ "\xE3\xB9" => "\xE5\xB0\xB8",
+ "\xE3\xBA" => "\xE5\xB1\x8E",
+ "\xE3\xBB" => "\xE5\xB1\x8D",
+ "\xE3\xBC" => "\xE5\xB8\x82",
+ "\xE3\xBD" => "\xE5\xBC\x91",
+ "\xE3\xBE" => "\xE6\x81\x83",
+ "\xE3\xBF" => "\xE6\x96\xBD",
+ "\xE3\xC0" => "\xE6\x98\xAF",
+ "\xE3\xC1" => "\xE6\x99\x82",
+ "\xE3\xC2" => "\xE6\x9E\xBE",
+ "\xE3\xC3" => "\xE6\x9F\xB4",
+ "\xE3\xC4" => "\xE7\x8C\x9C",
+ "\xE3\xC5" => "\xE7\x9F\xA2",
+ "\xE3\xC6" => "\xE7\xA4\xBA",
+ "\xE3\xC7" => "\xE7\xBF\x85",
+ "\xE3\xC8" => "\xE8\x92\x94",
+ "\xE3\xC9" => "\xE8\x93\x8D",
+ "\xE3\xCA" => "\xE8\xA6\x96",
+ "\xE3\xCB" => "\xE8\xA9\xA6",
+ "\xE3\xCC" => "\xE8\xA9\xA9",
+ "\xE3\xCD" => "\xE8\xAB\xA1",
+ "\xE3\xCE" => "\xE8\xB1\x95",
+ "\xE3\xCF" => "\xE8\xB1\xBA",
+ "\xE3\xD0" => "\xE5\x9F\xB4",
+ "\xE3\xD1" => "\xE5\xAF\x94",
+ "\xE3\xD2" => "\xE5\xBC\x8F",
+ "\xE3\xD3" => "\xE6\x81\xAF",
+ "\xE3\xD4" => "\xE6\x8B\xAD",
+ "\xE3\xD5" => "\xE6\xA4\x8D",
+ "\xE3\xD6" => "\xE6\xAE\x96",
+ "\xE3\xD7" => "\xE6\xB9\x9C",
+ "\xE3\xD8" => "\xE7\x86\x84",
+ "\xE3\xD9" => "\xE7\xAF\x92",
+ "\xE3\xDA" => "\xE8\x9D\x95",
+ "\xE3\xDB" => "\xE8\xAD\x98",
+ "\xE3\xDC" => "\xE8\xBB\xBE",
+ "\xE3\xDD" => "\xE9\xA3\x9F",
+ "\xE3\xDE" => "\xE9\xA3\xBE",
+ "\xE3\xDF" => "\xE4\xBC\xB8",
+ "\xE3\xE0" => "\xE4\xBE\x81",
+ "\xE3\xE1" => "\xE4\xBF\xA1",
+ "\xE3\xE2" => "\xE5\x91\xBB",
+ "\xE3\xE3" => "\xE5\xA8\xA0",
+ "\xE3\xE4" => "\xE5\xAE\xB8",
+ "\xE3\xE5" => "\xE6\x84\xBC",
+ "\xE3\xE6" => "\xE6\x96\xB0",
+ "\xE3\xE7" => "\xE6\x99\xA8",
+ "\xE3\xE8" => "\xE7\x87\xBC",
+ "\xE3\xE9" => "\xE7\x94\xB3",
+ "\xE3\xEA" => "\xE7\xA5\x9E",
+ "\xE3\xEB" => "\xE7\xB4\xB3",
+ "\xE3\xEC" => "\xE8\x85\x8E",
+ "\xE3\xED" => "\xE8\x87\xA3",
+ "\xE3\xEE" => "\xE8\x8E\x98",
+ "\xE3\xEF" => "\xE8\x96\xAA",
+ "\xE3\xF0" => "\xE8\x97\x8E",
+ "\xE3\xF1" => "\xE8\x9C\x83",
+ "\xE3\xF2" => "\xE8\xA8\x8A",
+ "\xE3\xF3" => "\xE8\xBA\xAB",
+ "\xE3\xF4" => "\xE8\xBE\x9B",
+ "\xE3\xF5" => "\xEF\xA5\xB1",
+ "\xE3\xF6" => "\xE8\xBF\x85",
+ "\xE3\xF7" => "\xE5\xA4\xB1",
+ "\xE3\xF8" => "\xE5\xAE\xA4",
+ "\xE3\xF9" => "\xE5\xAF\xA6",
+ "\xE3\xFA" => "\xE6\x82\x89",
+ "\xE3\xFB" => "\xE5\xAF\xA9",
+ "\xE3\xFC" => "\xE5\xB0\x8B",
+ "\xE3\xFD" => "\xE5\xBF\x83",
+ "\xE3\xFE" => "\xE6\xB2\x81",
+ "\xE4\xA1" => "\xEF\xA5\xB2",
+ "\xE4\xA2" => "\xE6\xB7\xB1",
+ "\xE4\xA3" => "\xE7\x80\x8B",
+ "\xE4\xA4" => "\xE7\x94\x9A",
+ "\xE4\xA5" => "\xE8\x8A\xAF",
+ "\xE4\xA6" => "\xE8\xAB\xB6",
+ "\xE4\xA7" => "\xE4\xBB\x80",
+ "\xE4\xA8" => "\xE5\x8D\x81",
+ "\xE4\xA9" => "\xEF\xA5\xB3",
+ "\xE4\xAA" => "\xE9\x9B\x99",
+ "\xE4\xAB" => "\xE6\xB0\x8F",
+ "\xE4\xAC" => "\xE4\xBA\x9E",
+ "\xE4\xAD" => "\xE4\xBF\x84",
+ "\xE4\xAE" => "\xE5\x85\x92",
+ "\xE4\xAF" => "\xE5\x95\x9E",
+ "\xE4\xB0" => "\xE5\xA8\xA5",
+ "\xE4\xB1" => "\xE5\xB3\xA8",
+ "\xE4\xB2" => "\xE6\x88\x91",
+ "\xE4\xB3" => "\xE7\x89\x99",
+ "\xE4\xB4" => "\xE8\x8A\xBD",
+ "\xE4\xB5" => "\xE8\x8E\xAA",
+ "\xE4\xB6" => "\xE8\x9B\xBE",
+ "\xE4\xB7" => "\xE8\xA1\x99",
+ "\xE4\xB8" => "\xE8\xA8\x9D",
+ "\xE4\xB9" => "\xE9\x98\xBF",
+ "\xE4\xBA" => "\xE9\x9B\x85",
+ "\xE4\xBB" => "\xE9\xA4\x93",
+ "\xE4\xBC" => "\xE9\xB4\x89",
+ "\xE4\xBD" => "\xE9\xB5\x9D",
+ "\xE4\xBE" => "\xE5\xA0\x8A",
+ "\xE4\xBF" => "\xE5\xB2\xB3",
+ "\xE4\xC0" => "\xE5\xB6\xBD",
+ "\xE4\xC1" => "\xE5\xB9\x84",
+ "\xE4\xC2" => "\xE6\x83\xA1",
+ "\xE4\xC3" => "\xE6\x84\x95",
+ "\xE4\xC4" => "\xE6\x8F\xA1",
+ "\xE4\xC5" => "\xE6\xA8\x82",
+ "\xE4\xC6" => "\xE6\xB8\xA5",
+ "\xE4\xC7" => "\xE9\x84\x82",
+ "\xE4\xC8" => "\xE9\x8D\x94",
+ "\xE4\xC9" => "\xE9\xA1\x8E",
+ "\xE4\xCA" => "\xE9\xB0\x90",
+ "\xE4\xCB" => "\xE9\xBD\xB7",
+ "\xE4\xCC" => "\xE5\xAE\x89",
+ "\xE4\xCD" => "\xE5\xB2\xB8",
+ "\xE4\xCE" => "\xE6\x8C\x89",
+ "\xE4\xCF" => "\xE6\x99\x8F",
+ "\xE4\xD0" => "\xE6\xA1\x88",
+ "\xE4\xD1" => "\xE7\x9C\xBC",
+ "\xE4\xD2" => "\xE9\x9B\x81",
+ "\xE4\xD3" => "\xE9\x9E\x8D",
+ "\xE4\xD4" => "\xE9\xA1\x94",
+ "\xE4\xD5" => "\xE9\xAE\x9F",
+ "\xE4\xD6" => "\xE6\x96\xA1",
+ "\xE4\xD7" => "\xE8\xAC\x81",
+ "\xE4\xD8" => "\xE8\xBB\x8B",
+ "\xE4\xD9" => "\xE9\x96\xBC",
+ "\xE4\xDA" => "\xE5\x94\xB5",
+ "\xE4\xDB" => "\xE5\xB2\xA9",
+ "\xE4\xDC" => "\xE5\xB7\x96",
+ "\xE4\xDD" => "\xE5\xBA\xB5",
+ "\xE4\xDE" => "\xE6\x9A\x97",
+ "\xE4\xDF" => "\xE7\x99\x8C",
+ "\xE4\xE0" => "\xE8\x8F\xB4",
+ "\xE4\xE1" => "\xE9\x97\x87",
+ "\xE4\xE2" => "\xE5\xA3\x93",
+ "\xE4\xE3" => "\xE6\x8A\xBC",
+ "\xE4\xE4" => "\xE7\x8B\x8E",
+ "\xE4\xE5" => "\xE9\xB4\xA8",
+ "\xE4\xE6" => "\xE4\xBB\xB0",
+ "\xE4\xE7" => "\xE5\xA4\xAE",
+ "\xE4\xE8" => "\xE6\x80\x8F",
+ "\xE4\xE9" => "\xE6\x98\xBB",
+ "\xE4\xEA" => "\xE6\xAE\x83",
+ "\xE4\xEB" => "\xE7\xA7\xA7",
+ "\xE4\xEC" => "\xE9\xB4\xA6",
+ "\xE4\xED" => "\xE5\x8E\x93",
+ "\xE4\xEE" => "\xE5\x93\x80",
+ "\xE4\xEF" => "\xE5\x9F\x83",
+ "\xE4\xF0" => "\xE5\xB4\x96",
+ "\xE4\xF1" => "\xE6\x84\x9B",
+ "\xE4\xF2" => "\xE6\x9B\x96",
+ "\xE4\xF3" => "\xE6\xB6\xAF",
+ "\xE4\xF4" => "\xE7\xA2\x8D",
+ "\xE4\xF5" => "\xE8\x89\xBE",
+ "\xE4\xF6" => "\xE9\x9A\x98",
+ "\xE4\xF7" => "\xE9\x9D\x84",
+ "\xE4\xF8" => "\xE5\x8E\x84",
+ "\xE4\xF9" => "\xE6\x89\xBC",
+ "\xE4\xFA" => "\xE6\x8E\x96",
+ "\xE4\xFB" => "\xE6\xB6\xB2",
+ "\xE4\xFC" => "\xE7\xB8\x8A",
+ "\xE4\xFD" => "\xE8\x85\x8B",
+ "\xE4\xFE" => "\xE9\xA1\x8D",
+ "\xE5\xA1" => "\xE6\xAB\xBB",
+ "\xE5\xA2" => "\xE7\xBD\x8C",
+ "\xE5\xA3" => "\xE9\xB6\xAF",
+ "\xE5\xA4" => "\xE9\xB8\x9A",
+ "\xE5\xA5" => "\xE4\xB9\x9F",
+ "\xE5\xA6" => "\xE5\x80\xBB",
+ "\xE5\xA7" => "\xE5\x86\xB6",
+ "\xE5\xA8" => "\xE5\xA4\x9C",
+ "\xE5\xA9" => "\xE6\x83\xB9",
+ "\xE5\xAA" => "\xE6\x8F\xB6",
+ "\xE5\xAB" => "\xE6\xA4\xB0",
+ "\xE5\xAC" => "\xE7\x88\xBA",
+ "\xE5\xAD" => "\xE8\x80\xB6",
+ "\xE5\xAE" => "\xEF\xA5\xB4",
+ "\xE5\xAF" => "\xE9\x87\x8E",
+ "\xE5\xB0" => "\xE5\xBC\xB1",
+ "\xE5\xB1" => "\xEF\xA5\xB5",
+ "\xE5\xB2" => "\xEF\xA5\xB6",
+ "\xE5\xB3" => "\xE7\xB4\x84",
+ "\xE5\xB4" => "\xE8\x8B\xA5",
+ "\xE5\xB5" => "\xE8\x91\xAF",
+ "\xE5\xB6" => "\xE8\x92\xBB",
+ "\xE5\xB7" => "\xE8\x97\xA5",
+ "\xE5\xB8" => "\xE8\xBA\x8D",
+ "\xE5\xB9" => "\xEF\xA5\xB7",
+ "\xE5\xBA" => "\xE4\xBD\xAF",
+ "\xE5\xBB" => "\xEF\xA5\xB8",
+ "\xE5\xBC" => "\xEF\xA5\xB9",
+ "\xE5\xBD" => "\xE5\xA3\xA4",
+ "\xE5\xBE" => "\xE5\xAD\x83",
+ "\xE5\xBF" => "\xE6\x81\x99",
+ "\xE5\xC0" => "\xE6\x8F\x9A",
+ "\xE5\xC1" => "\xE6\x94\x98",
+ "\xE5\xC2" => "\xE6\x95\xAD",
+ "\xE5\xC3" => "\xE6\x9A\x98",
+ "\xE5\xC4" => "\xEF\xA5\xBA",
+ "\xE5\xC5" => "\xE6\xA5\x8A",
+ "\xE5\xC6" => "\xE6\xA8\xA3",
+ "\xE5\xC7" => "\xE6\xB4\x8B",
+ "\xE5\xC8" => "\xE7\x80\x81",
+ "\xE5\xC9" => "\xE7\x85\xAC",
+ "\xE5\xCA" => "\xE7\x97\x92",
+ "\xE5\xCB" => "\xE7\x98\x8D",
+ "\xE5\xCC" => "\xE7\xA6\xB3",
+ "\xE5\xCD" => "\xE7\xA9\xB0",
+ "\xE5\xCE" => "\xEF\xA5\xBB",
+ "\xE5\xCF" => "\xE7\xBE\x8A",
+ "\xE5\xD0" => "\xEF\xA5\xBC",
+ "\xE5\xD1" => "\xE8\xA5\x84",
+ "\xE5\xD2" => "\xEF\xA5\xBD",
+ "\xE5\xD3" => "\xE8\xAE\x93",
+ "\xE5\xD4" => "\xE9\x87\x80",
+ "\xE5\xD5" => "\xE9\x99\xBD",
+ "\xE5\xD6" => "\xEF\xA5\xBE",
+ "\xE5\xD7" => "\xE9\xA4\x8A",
+ "\xE5\xD8" => "\xE5\x9C\x84",
+ "\xE5\xD9" => "\xE5\xBE\xA1",
+ "\xE5\xDA" => "\xE6\x96\xBC",
+ "\xE5\xDB" => "\xE6\xBC\x81",
+ "\xE5\xDC" => "\xE7\x98\x80",
+ "\xE5\xDD" => "\xE7\xA6\xA6",
+ "\xE5\xDE" => "\xE8\xAA\x9E",
+ "\xE5\xDF" => "\xE9\xA6\xAD",
+ "\xE5\xE0" => "\xE9\xAD\x9A",
+ "\xE5\xE1" => "\xE9\xBD\xAC",
+ "\xE5\xE2" => "\xE5\x84\x84",
+ "\xE5\xE3" => "\xE6\x86\xB6",
+ "\xE5\xE4" => "\xE6\x8A\x91",
+ "\xE5\xE5" => "\xE6\xAA\x8D",
+ "\xE5\xE6" => "\xE8\x87\x86",
+ "\xE5\xE7" => "\xE5\x81\x83",
+ "\xE5\xE8" => "\xE5\xA0\xB0",
+ "\xE5\xE9" => "\xE5\xBD\xA6",
+ "\xE5\xEA" => "\xE7\x84\x89",
+ "\xE5\xEB" => "\xE8\xA8\x80",
+ "\xE5\xEC" => "\xE8\xAB\xBA",
+ "\xE5\xED" => "\xE5\xAD\xBC",
+ "\xE5\xEE" => "\xE8\x98\x96",
+ "\xE5\xEF" => "\xE4\xBF\xBA",
+ "\xE5\xF0" => "\xE5\x84\xBC",
+ "\xE5\xF1" => "\xE5\x9A\xB4",
+ "\xE5\xF2" => "\xE5\xA5\x84",
+ "\xE5\xF3" => "\xE6\x8E\xA9",
+ "\xE5\xF4" => "\xE6\xB7\xB9",
+ "\xE5\xF5" => "\xE5\xB6\xAA",
+ "\xE5\xF6" => "\xE6\xA5\xAD",
+ "\xE5\xF7" => "\xE5\x86\x86",
+ "\xE5\xF8" => "\xE4\xBA\x88",
+ "\xE5\xF9" => "\xE4\xBD\x99",
+ "\xE5\xFA" => "\xEF\xA5\xBF",
+ "\xE5\xFB" => "\xEF\xA6\x80",
+ "\xE5\xFC" => "\xEF\xA6\x81",
+ "\xE5\xFD" => "\xE5\xA6\x82",
+ "\xE5\xFE" => "\xEF\xA6\x82",
+ "\xE6\xA1" => "\xEF\xA6\x83",
+ "\xE6\xA2" => "\xE6\xAD\x9F",
+ "\xE6\xA3" => "\xE6\xB1\x9D",
+ "\xE6\xA4" => "\xEF\xA6\x84",
+ "\xE6\xA5" => "\xE7\x92\xB5",
+ "\xE6\xA6" => "\xE7\xA4\x96",
+ "\xE6\xA7" => "\xEF\xA6\x85",
+ "\xE6\xA8" => "\xE8\x88\x87",
+ "\xE6\xA9" => "\xE8\x89\x85",
+ "\xE6\xAA" => "\xE8\x8C\xB9",
+ "\xE6\xAB" => "\xE8\xBC\xBF",
+ "\xE6\xAC" => "\xE8\xBD\x9D",
+ "\xE6\xAD" => "\xEF\xA6\x86",
+ "\xE6\xAE" => "\xE9\xA4\x98",
+ "\xE6\xAF" => "\xEF\xA6\x87",
+ "\xE6\xB0" => "\xEF\xA6\x88",
+ "\xE6\xB1" => "\xEF\xA6\x89",
+ "\xE6\xB2" => "\xE4\xBA\xA6",
+ "\xE6\xB3" => "\xEF\xA6\x8A",
+ "\xE6\xB4" => "\xE5\x9F\x9F",
+ "\xE6\xB5" => "\xE5\xBD\xB9",
+ "\xE6\xB6" => "\xE6\x98\x93",
+ "\xE6\xB7" => "\xEF\xA6\x8B",
+ "\xE6\xB8" => "\xEF\xA6\x8C",
+ "\xE6\xB9" => "\xE7\x96\xAB",
+ "\xE6\xBA" => "\xE7\xB9\xB9",
+ "\xE6\xBB" => "\xE8\xAD\xAF",
+ "\xE6\xBC" => "\xEF\xA6\x8D",
+ "\xE6\xBD" => "\xE9\x80\x86",
+ "\xE6\xBE" => "\xE9\xA9\x9B",
+ "\xE6\xBF" => "\xE5\x9A\xA5",
+ "\xE6\xC0" => "\xE5\xA0\xA7",
+ "\xE6\xC1" => "\xE5\xA7\xB8",
+ "\xE6\xC2" => "\xE5\xA8\x9F",
+ "\xE6\xC3" => "\xE5\xAE\xB4",
+ "\xE6\xC4" => "\xEF\xA6\x8E",
+ "\xE6\xC5" => "\xE5\xBB\xB6",
+ "\xE6\xC6" => "\xEF\xA6\x8F",
+ "\xE6\xC7" => "\xEF\xA6\x90",
+ "\xE6\xC8" => "\xE6\x8D\x90",
+ "\xE6\xC9" => "\xE6\x8C\xBB",
+ "\xE6\xCA" => "\xEF\xA6\x91",
+ "\xE6\xCB" => "\xE6\xA4\xBD",
+ "\xE6\xCC" => "\xE6\xB2\x87",
+ "\xE6\xCD" => "\xE6\xB2\xBF",
+ "\xE6\xCE" => "\xE6\xB6\x8E",
+ "\xE6\xCF" => "\xE6\xB6\x93",
+ "\xE6\xD0" => "\xE6\xB7\xB5",
+ "\xE6\xD1" => "\xE6\xBC\x94",
+ "\xE6\xD2" => "\xEF\xA6\x92",
+ "\xE6\xD3" => "\xE7\x83\x9F",
+ "\xE6\xD4" => "\xE7\x84\xB6",
+ "\xE6\xD5" => "\xE7\x85\x99",
+ "\xE6\xD6" => "\xEF\xA6\x93",
+ "\xE6\xD7" => "\xE7\x87\x83",
+ "\xE6\xD8" => "\xE7\x87\x95",
+ "\xE6\xD9" => "\xEF\xA6\x94",
+ "\xE6\xDA" => "\xE7\xA1\x8F",
+ "\xE6\xDB" => "\xE7\xA1\xAF",
+ "\xE6\xDC" => "\xEF\xA6\x95",
+ "\xE6\xDD" => "\xE7\xAD\xB5",
+ "\xE6\xDE" => "\xE7\xB7\xA3",
+ "\xE6\xDF" => "\xEF\xA6\x96",
+ "\xE6\xE0" => "\xE7\xB8\xAF",
+ "\xE6\xE1" => "\xEF\xA6\x97",
+ "\xE6\xE2" => "\xE8\xA1\x8D",
+ "\xE6\xE3" => "\xE8\xBB\x9F",
+ "\xE6\xE4" => "\xEF\xA6\x98",
+ "\xE6\xE5" => "\xEF\xA6\x99",
+ "\xE6\xE6" => "\xEF\xA6\x9A",
+ "\xE6\xE7" => "\xE9\x89\x9B",
+ "\xE6\xE8" => "\xEF\xA6\x9B",
+ "\xE6\xE9" => "\xE9\xB3\xB6",
+ "\xE6\xEA" => "\xEF\xA6\x9C",
+ "\xE6\xEB" => "\xEF\xA6\x9D",
+ "\xE6\xEC" => "\xEF\xA6\x9E",
+ "\xE6\xED" => "\xE6\x82\x85",
+ "\xE6\xEE" => "\xE6\xB6\x85",
+ "\xE6\xEF" => "\xEF\xA6\x9F",
+ "\xE6\xF0" => "\xE7\x86\xB1",
+ "\xE6\xF1" => "\xEF\xA6\xA0",
+ "\xE6\xF2" => "\xEF\xA6\xA1",
+ "\xE6\xF3" => "\xE9\x96\xB1",
+ "\xE6\xF4" => "\xE5\x8E\xAD",
+ "\xE6\xF5" => "\xEF\xA6\xA2",
+ "\xE6\xF6" => "\xEF\xA6\xA3",
+ "\xE6\xF7" => "\xEF\xA6\xA4",
+ "\xE6\xF8" => "\xE6\x9F\x93",
+ "\xE6\xF9" => "\xEF\xA6\xA5",
+ "\xE6\xFA" => "\xE7\x82\x8E",
+ "\xE6\xFB" => "\xE7\x84\xB0",
+ "\xE6\xFC" => "\xE7\x90\xB0",
+ "\xE6\xFD" => "\xE8\x89\xB6",
+ "\xE6\xFE" => "\xE8\x8B\x92",
+ "\xE7\xA1" => "\xEF\xA6\xA6",
+ "\xE7\xA2" => "\xE9\x96\xBB",
+ "\xE7\xA3" => "\xE9\xAB\xA5",
+ "\xE7\xA4" => "\xE9\xB9\xBD",
+ "\xE7\xA5" => "\xE6\x9B\x84",
+ "\xE7\xA6" => "\xEF\xA6\xA7",
+ "\xE7\xA7" => "\xE7\x87\x81",
+ "\xE7\xA8" => "\xE8\x91\x89",
+ "\xE7\xA9" => "\xEF\xA6\xA8",
+ "\xE7\xAA" => "\xEF\xA6\xA9",
+ "\xE7\xAB" => "\xE5\xA1\x8B",
+ "\xE7\xAC" => "\xEF\xA6\xAA",
+ "\xE7\xAD" => "\xEF\xA6\xAB",
+ "\xE7\xAE" => "\xE5\xB6\xB8",
+ "\xE7\xAF" => "\xE5\xBD\xB1",
+ "\xE7\xB0" => "\xEF\xA6\xAC",
+ "\xE7\xB1" => "\xE6\x98\xA0",
+ "\xE7\xB2" => "\xE6\x9A\x8E",
+ "\xE7\xB3" => "\xE6\xA5\xB9",
+ "\xE7\xB4" => "\xE6\xA6\xAE",
+ "\xE7\xB5" => "\xE6\xB0\xB8",
+ "\xE7\xB6" => "\xE6\xB3\xB3",
+ "\xE7\xB7" => "\xE6\xB8\xB6",
+ "\xE7\xB8" => "\xE6\xBD\x81",
+ "\xE7\xB9" => "\xE6\xBF\x9A",
+ "\xE7\xBA" => "\xE7\x80\x9B",
+ "\xE7\xBB" => "\xE7\x80\xAF",
+ "\xE7\xBC" => "\xE7\x85\x90",
+ "\xE7\xBD" => "\xE7\x87\x9F",
+ "\xE7\xBE" => "\xE7\x8D\xB0",
+ "\xE7\xBF" => "\xEF\xA6\xAD",
+ "\xE7\xC0" => "\xE7\x91\x9B",
+ "\xE7\xC1" => "\xEF\xA6\xAE",
+ "\xE7\xC2" => "\xE7\x93\x94",
+ "\xE7\xC3" => "\xE7\x9B\x88",
+ "\xE7\xC4" => "\xE7\xA9\x8E",
+ "\xE7\xC5" => "\xE7\xBA\x93",
+ "\xE7\xC6" => "\xEF\xA6\xAF",
+ "\xE7\xC7" => "\xEF\xA6\xB0",
+ "\xE7\xC8" => "\xE8\x8B\xB1",
+ "\xE7\xC9" => "\xE8\xA9\xA0",
+ "\xE7\xCA" => "\xE8\xBF\x8E",
+ "\xE7\xCB" => "\xEF\xA6\xB1",
+ "\xE7\xCC" => "\xE9\x8D\x88",
+ "\xE7\xCD" => "\xEF\xA6\xB2",
+ "\xE7\xCE" => "\xE9\x9C\x99",
+ "\xE7\xCF" => "\xEF\xA6\xB3",
+ "\xE7\xD0" => "\xEF\xA6\xB4",
+ "\xE7\xD1" => "\xE4\xB9\x82",
+ "\xE7\xD2" => "\xE5\x80\xAA",
+ "\xE7\xD3" => "\xEF\xA6\xB5",
+ "\xE7\xD4" => "\xE5\x88\x88",
+ "\xE7\xD5" => "\xE5\x8F\xA1",
+ "\xE7\xD6" => "\xE6\x9B\xB3",
+ "\xE7\xD7" => "\xE6\xB1\xAD",
+ "\xE7\xD8" => "\xE6\xBF\x8A",
+ "\xE7\xD9" => "\xE7\x8C\x8A",
+ "\xE7\xDA" => "\xE7\x9D\xBF",
+ "\xE7\xDB" => "\xE7\xA9\xA2",
+ "\xE7\xDC" => "\xE8\x8A\xAE",
+ "\xE7\xDD" => "\xE8\x97\x9D",
+ "\xE7\xDE" => "\xE8\x98\x82",
+ "\xE7\xDF" => "\xEF\xA6\xB6",
+ "\xE7\xE0" => "\xE8\xA3\x94",
+ "\xE7\xE1" => "\xE8\xA9\xA3",
+ "\xE7\xE2" => "\xE8\xAD\xBD",
+ "\xE7\xE3" => "\xE8\xB1\xAB",
+ "\xE7\xE4" => "\xEF\xA6\xB7",
+ "\xE7\xE5" => "\xE9\x8A\xB3",
+ "\xE7\xE6" => "\xEF\xA6\xB8",
+ "\xE7\xE7" => "\xE9\x9C\x93",
+ "\xE7\xE8" => "\xE9\xA0\x90",
+ "\xE7\xE9" => "\xE4\xBA\x94",
+ "\xE7\xEA" => "\xE4\xBC\x8D",
+ "\xE7\xEB" => "\xE4\xBF\x89",
+ "\xE7\xEC" => "\xE5\x82\xB2",
+ "\xE7\xED" => "\xE5\x8D\x88",
+ "\xE7\xEE" => "\xE5\x90\xBE",
+ "\xE7\xEF" => "\xE5\x90\xB3",
+ "\xE7\xF0" => "\xE5\x97\x9A",
+ "\xE7\xF1" => "\xE5\xA1\xA2",
+ "\xE7\xF2" => "\xE5\xA2\xBA",
+ "\xE7\xF3" => "\xE5\xA5\xA7",
+ "\xE7\xF4" => "\xE5\xA8\x9B",
+ "\xE7\xF5" => "\xE5\xAF\xA4",
+ "\xE7\xF6" => "\xE6\x82\x9F",
+ "\xE7\xF7" => "\xEF\xA6\xB9",
+ "\xE7\xF8" => "\xE6\x87\x8A",
+ "\xE7\xF9" => "\xE6\x95\x96",
+ "\xE7\xFA" => "\xE6\x97\xBF",
+ "\xE7\xFB" => "\xE6\x99\xA4",
+ "\xE7\xFC" => "\xE6\xA2\xA7",
+ "\xE7\xFD" => "\xE6\xB1\x9A",
+ "\xE7\xFE" => "\xE6\xBE\xB3",
+ "\xE8\xA1" => "\xE7\x83\x8F",
+ "\xE8\xA2" => "\xE7\x86\xAC",
+ "\xE8\xA3" => "\xE7\x8D\x92",
+ "\xE8\xA4" => "\xE7\xAD\xBD",
+ "\xE8\xA5" => "\xE8\x9C\x88",
+ "\xE8\xA6" => "\xE8\xAA\xA4",
+ "\xE8\xA7" => "\xE9\xB0\xB2",
+ "\xE8\xA8" => "\xE9\xBC\x87",
+ "\xE8\xA9" => "\xE5\xB1\x8B",
+ "\xE8\xAA" => "\xE6\xB2\x83",
+ "\xE8\xAB" => "\xE7\x8D\x84",
+ "\xE8\xAC" => "\xE7\x8E\x89",
+ "\xE8\xAD" => "\xE9\x88\xBA",
+ "\xE8\xAE" => "\xE6\xBA\xAB",
+ "\xE8\xAF" => "\xE7\x91\xA5",
+ "\xE8\xB0" => "\xE7\x98\x9F",
+ "\xE8\xB1" => "\xE7\xA9\xA9",
+ "\xE8\xB2" => "\xE7\xB8\x95",
+ "\xE8\xB3" => "\xE8\x98\x8A",
+ "\xE8\xB4" => "\xE5\x85\x80",
+ "\xE8\xB5" => "\xE5\xA3\x85",
+ "\xE8\xB6" => "\xE6\x93\x81",
+ "\xE8\xB7" => "\xE7\x93\xAE",
+ "\xE8\xB8" => "\xE7\x94\x95",
+ "\xE8\xB9" => "\xE7\x99\xB0",
+ "\xE8\xBA" => "\xE7\xBF\x81",
+ "\xE8\xBB" => "\xE9\x82\x95",
+ "\xE8\xBC" => "\xE9\x9B\x8D",
+ "\xE8\xBD" => "\xE9\xA5\x94",
+ "\xE8\xBE" => "\xE6\xB8\xA6",
+ "\xE8\xBF" => "\xE7\x93\xA6",
+ "\xE8\xC0" => "\xE7\xAA\xA9",
+ "\xE8\xC1" => "\xE7\xAA\xAA",
+ "\xE8\xC2" => "\xE8\x87\xA5",
+ "\xE8\xC3" => "\xE8\x9B\x99",
+ "\xE8\xC4" => "\xE8\x9D\xB8",
+ "\xE8\xC5" => "\xE8\xA8\x9B",
+ "\xE8\xC6" => "\xE5\xA9\x89",
+ "\xE8\xC7" => "\xE5\xAE\x8C",
+ "\xE8\xC8" => "\xE5\xAE\x9B",
+ "\xE8\xC9" => "\xE6\xA2\xA1",
+ "\xE8\xCA" => "\xE6\xA4\x80",
+ "\xE8\xCB" => "\xE6\xB5\xA3",
+ "\xE8\xCC" => "\xE7\x8E\xA9",
+ "\xE8\xCD" => "\xE7\x90\x93",
+ "\xE8\xCE" => "\xE7\x90\xAC",
+ "\xE8\xCF" => "\xE7\xA2\x97",
+ "\xE8\xD0" => "\xE7\xB7\xA9",
+ "\xE8\xD1" => "\xE7\xBF\xAB",
+ "\xE8\xD2" => "\xE8\x84\x98",
+ "\xE8\xD3" => "\xE8\x85\x95",
+ "\xE8\xD4" => "\xE8\x8E\x9E",
+ "\xE8\xD5" => "\xE8\xB1\x8C",
+ "\xE8\xD6" => "\xE9\x98\xAE",
+ "\xE8\xD7" => "\xE9\xA0\x91",
+ "\xE8\xD8" => "\xE6\x9B\xB0",
+ "\xE8\xD9" => "\xE5\xBE\x80",
+ "\xE8\xDA" => "\xE6\x97\xBA",
+ "\xE8\xDB" => "\xE6\x9E\x89",
+ "\xE8\xDC" => "\xE6\xB1\xAA",
+ "\xE8\xDD" => "\xE7\x8E\x8B",
+ "\xE8\xDE" => "\xE5\x80\xAD",
+ "\xE8\xDF" => "\xE5\xA8\x83",
+ "\xE8\xE0" => "\xE6\xAD\xAA",
+ "\xE8\xE1" => "\xE7\x9F\xAE",
+ "\xE8\xE2" => "\xE5\xA4\x96",
+ "\xE8\xE3" => "\xE5\xB5\xAC",
+ "\xE8\xE4" => "\xE5\xB7\x8D",
+ "\xE8\xE5" => "\xE7\x8C\xA5",
+ "\xE8\xE6" => "\xE7\x95\x8F",
+ "\xE8\xE7" => "\xEF\xA6\xBA",
+ "\xE8\xE8" => "\xEF\xA6\xBB",
+ "\xE8\xE9" => "\xE5\x83\xA5",
+ "\xE8\xEA" => "\xE5\x87\xB9",
+ "\xE8\xEB" => "\xE5\xA0\xAF",
+ "\xE8\xEC" => "\xE5\xA4\xAD",
+ "\xE8\xED" => "\xE5\xA6\x96",
+ "\xE8\xEE" => "\xE5\xA7\x9A",
+ "\xE8\xEF" => "\xE5\xAF\xA5",
+ "\xE8\xF0" => "\xEF\xA6\xBC",
+ "\xE8\xF1" => "\xEF\xA6\xBD",
+ "\xE8\xF2" => "\xE5\xB6\xA2",
+ "\xE8\xF3" => "\xE6\x8B\x97",
+ "\xE8\xF4" => "\xE6\x90\x96",
+ "\xE8\xF5" => "\xE6\x92\x93",
+ "\xE8\xF6" => "\xE6\x93\xBE",
+ "\xE8\xF7" => "\xEF\xA6\xBE",
+ "\xE8\xF8" => "\xE6\x9B\x9C",
+ "\xE8\xF9" => "\xEF\xA6\xBF",
+ "\xE8\xFA" => "\xE6\xA9\x88",
+ "\xE8\xFB" => "\xEF\xA7\x80",
+ "\xE8\xFC" => "\xE7\x87\xBF",
+ "\xE8\xFD" => "\xE7\x91\xA4",
+ "\xE8\xFE" => "\xEF\xA7\x81",
+ "\xE9\xA1" => "\xE7\xAA\x88",
+ "\xE9\xA2" => "\xE7\xAA\xAF",
+ "\xE9\xA3" => "\xE7\xB9\x87",
+ "\xE9\xA4" => "\xE7\xB9\x9E",
+ "\xE9\xA5" => "\xE8\x80\x80",
+ "\xE9\xA6" => "\xE8\x85\xB0",
+ "\xE9\xA7" => "\xEF\xA7\x82",
+ "\xE9\xA8" => "\xE8\x9F\xAF",
+ "\xE9\xA9" => "\xE8\xA6\x81",
+ "\xE9\xAA" => "\xE8\xAC\xA0",
+ "\xE9\xAB" => "\xE9\x81\x99",
+ "\xE9\xAC" => "\xEF\xA7\x83",
+ "\xE9\xAD" => "\xE9\x82\x80",
+ "\xE9\xAE" => "\xE9\xA5\x92",
+ "\xE9\xAF" => "\xE6\x85\xBE",
+ "\xE9\xB0" => "\xE6\xAC\xB2",
+ "\xE9\xB1" => "\xE6\xB5\xB4",
+ "\xE9\xB2" => "\xE7\xB8\x9F",
+ "\xE9\xB3" => "\xE8\xA4\xA5",
+ "\xE9\xB4" => "\xE8\xBE\xB1",
+ "\xE9\xB5" => "\xE4\xBF\x91",
+ "\xE9\xB6" => "\xE5\x82\xAD",
+ "\xE9\xB7" => "\xE5\x86\x97",
+ "\xE9\xB8" => "\xE5\x8B\x87",
+ "\xE9\xB9" => "\xE5\x9F\x87",
+ "\xE9\xBA" => "\xE5\xA2\x89",
+ "\xE9\xBB" => "\xE5\xAE\xB9",
+ "\xE9\xBC" => "\xE5\xBA\xB8",
+ "\xE9\xBD" => "\xE6\x85\x82",
+ "\xE9\xBE" => "\xE6\xA6\x95",
+ "\xE9\xBF" => "\xE6\xB6\x8C",
+ "\xE9\xC0" => "\xE6\xB9\xA7",
+ "\xE9\xC1" => "\xE6\xBA\xB6",
+ "\xE9\xC2" => "\xE7\x86\x94",
+ "\xE9\xC3" => "\xE7\x91\xA2",
+ "\xE9\xC4" => "\xE7\x94\xA8",
+ "\xE9\xC5" => "\xE7\x94\xAC",
+ "\xE9\xC6" => "\xE8\x81\xB3",
+ "\xE9\xC7" => "\xE8\x8C\xB8",
+ "\xE9\xC8" => "\xE8\x93\x89",
+ "\xE9\xC9" => "\xE8\xB8\x8A",
+ "\xE9\xCA" => "\xE9\x8E\x94",
+ "\xE9\xCB" => "\xE9\x8F\x9E",
+ "\xE9\xCC" => "\xEF\xA7\x84",
+ "\xE9\xCD" => "\xE4\xBA\x8E",
+ "\xE9\xCE" => "\xE4\xBD\x91",
+ "\xE9\xCF" => "\xE5\x81\xB6",
+ "\xE9\xD0" => "\xE5\x84\xAA",
+ "\xE9\xD1" => "\xE5\x8F\x88",
+ "\xE9\xD2" => "\xE5\x8F\x8B",
+ "\xE9\xD3" => "\xE5\x8F\xB3",
+ "\xE9\xD4" => "\xE5\xAE\x87",
+ "\xE9\xD5" => "\xE5\xAF\x93",
+ "\xE9\xD6" => "\xE5\xB0\xA4",
+ "\xE9\xD7" => "\xE6\x84\x9A",
+ "\xE9\xD8" => "\xE6\x86\x82",
+ "\xE9\xD9" => "\xE6\x97\xB4",
+ "\xE9\xDA" => "\xE7\x89\x9B",
+ "\xE9\xDB" => "\xE7\x8E\x97",
+ "\xE9\xDC" => "\xE7\x91\x80",
+ "\xE9\xDD" => "\xE7\x9B\x82",
+ "\xE9\xDE" => "\xE7\xA5\x90",
+ "\xE9\xDF" => "\xE7\xA6\x91",
+ "\xE9\xE0" => "\xE7\xA6\xB9",
+ "\xE9\xE1" => "\xE7\xB4\x86",
+ "\xE9\xE2" => "\xE7\xBE\xBD",
+ "\xE9\xE3" => "\xE8\x8A\x8B",
+ "\xE9\xE4" => "\xE8\x97\x95",
+ "\xE9\xE5" => "\xE8\x99\x9E",
+ "\xE9\xE6" => "\xE8\xBF\x82",
+ "\xE9\xE7" => "\xE9\x81\x87",
+ "\xE9\xE8" => "\xE9\x83\xB5",
+ "\xE9\xE9" => "\xE9\x87\xAA",
+ "\xE9\xEA" => "\xE9\x9A\x85",
+ "\xE9\xEB" => "\xE9\x9B\xA8",
+ "\xE9\xEC" => "\xE9\x9B\xA9",
+ "\xE9\xED" => "\xE5\x8B\x96",
+ "\xE9\xEE" => "\xE5\xBD\xA7",
+ "\xE9\xEF" => "\xE6\x97\xAD",
+ "\xE9\xF0" => "\xE6\x98\xB1",
+ "\xE9\xF1" => "\xE6\xA0\xAF",
+ "\xE9\xF2" => "\xE7\x85\x9C",
+ "\xE9\xF3" => "\xE7\xA8\xB6",
+ "\xE9\xF4" => "\xE9\x83\x81",
+ "\xE9\xF5" => "\xE9\xA0\x8A",
+ "\xE9\xF6" => "\xE4\xBA\x91",
+ "\xE9\xF7" => "\xEF\xA7\x85",
+ "\xE9\xF8" => "\xE6\xA9\x92",
+ "\xE9\xF9" => "\xE6\xAE\x9E",
+ "\xE9\xFA" => "\xE6\xBE\x90",
+ "\xE9\xFB" => "\xE7\x86\x89",
+ "\xE9\xFC" => "\xE8\x80\x98",
+ "\xE9\xFD" => "\xE8\x8A\xB8",
+ "\xE9\xFE" => "\xE8\x95\x93",
+ "\xEA\xA1" => "\xE9\x81\x8B",
+ "\xEA\xA2" => "\xE9\x9A\x95",
+ "\xEA\xA3" => "\xE9\x9B\xB2",
+ "\xEA\xA4" => "\xE9\x9F\xBB",
+ "\xEA\xA5" => "\xE8\x94\x9A",
+ "\xEA\xA6" => "\xE9\xAC\xB1",
+ "\xEA\xA7" => "\xE4\xBA\x90",
+ "\xEA\xA8" => "\xE7\x86\x8A",
+ "\xEA\xA9" => "\xE9\x9B\x84",
+ "\xEA\xAA" => "\xE5\x85\x83",
+ "\xEA\xAB" => "\xE5\x8E\x9F",
+ "\xEA\xAC" => "\xE5\x93\xA1",
+ "\xEA\xAD" => "\xE5\x9C\x93",
+ "\xEA\xAE" => "\xE5\x9C\x92",
+ "\xEA\xAF" => "\xE5\x9E\xA3",
+ "\xEA\xB0" => "\xE5\xAA\x9B",
+ "\xEA\xB1" => "\xE5\xAB\x84",
+ "\xEA\xB2" => "\xE5\xAF\x83",
+ "\xEA\xB3" => "\xE6\x80\xA8",
+ "\xEA\xB4" => "\xE6\x84\xBF",
+ "\xEA\xB5" => "\xE6\x8F\xB4",
+ "\xEA\xB6" => "\xE6\xB2\x85",
+ "\xEA\xB7" => "\xE6\xB4\xB9",
+ "\xEA\xB8" => "\xE6\xB9\xB2",
+ "\xEA\xB9" => "\xE6\xBA\x90",
+ "\xEA\xBA" => "\xE7\x88\xB0",
+ "\xEA\xBB" => "\xE7\x8C\xBF",
+ "\xEA\xBC" => "\xE7\x91\x97",
+ "\xEA\xBD" => "\xE8\x8B\x91",
+ "\xEA\xBE" => "\xE8\xA2\x81",
+ "\xEA\xBF" => "\xE8\xBD\x85",
+ "\xEA\xC0" => "\xE9\x81\xA0",
+ "\xEA\xC1" => "\xEF\xA7\x86",
+ "\xEA\xC2" => "\xE9\x99\xA2",
+ "\xEA\xC3" => "\xE9\xA1\x98",
+ "\xEA\xC4" => "\xE9\xB4\x9B",
+ "\xEA\xC5" => "\xE6\x9C\x88",
+ "\xEA\xC6" => "\xE8\xB6\x8A",
+ "\xEA\xC7" => "\xE9\x89\x9E",
+ "\xEA\xC8" => "\xE4\xBD\x8D",
+ "\xEA\xC9" => "\xE5\x81\x89",
+ "\xEA\xCA" => "\xE5\x83\x9E",
+ "\xEA\xCB" => "\xE5\x8D\xB1",
+ "\xEA\xCC" => "\xE5\x9C\x8D",
+ "\xEA\xCD" => "\xE5\xA7\x94",
+ "\xEA\xCE" => "\xE5\xA8\x81",
+ "\xEA\xCF" => "\xE5\xB0\x89",
+ "\xEA\xD0" => "\xE6\x85\xB0",
+ "\xEA\xD1" => "\xE6\x9A\x90",
+ "\xEA\xD2" => "\xE6\xB8\xAD",
+ "\xEA\xD3" => "\xE7\x88\xB2",
+ "\xEA\xD4" => "\xE7\x91\x8B",
+ "\xEA\xD5" => "\xE7\xB7\xAF",
+ "\xEA\xD6" => "\xE8\x83\x83",
+ "\xEA\xD7" => "\xE8\x90\x8E",
+ "\xEA\xD8" => "\xE8\x91\xA6",
+ "\xEA\xD9" => "\xE8\x94\xBF",
+ "\xEA\xDA" => "\xE8\x9D\x9F",
+ "\xEA\xDB" => "\xE8\xA1\x9B",
+ "\xEA\xDC" => "\xE8\xA4\x98",
+ "\xEA\xDD" => "\xE8\xAC\x82",
+ "\xEA\xDE" => "\xE9\x81\x95",
+ "\xEA\xDF" => "\xE9\x9F\x8B",
+ "\xEA\xE0" => "\xE9\xAD\x8F",
+ "\xEA\xE1" => "\xE4\xB9\xB3",
+ "\xEA\xE2" => "\xE4\xBE\x91",
+ "\xEA\xE3" => "\xE5\x84\x92",
+ "\xEA\xE4" => "\xE5\x85\xAA",
+ "\xEA\xE5" => "\xEF\xA7\x87",
+ "\xEA\xE6" => "\xE5\x94\xAF",
+ "\xEA\xE7" => "\xE5\x96\xA9",
+ "\xEA\xE8" => "\xE5\xAD\xBA",
+ "\xEA\xE9" => "\xE5\xAE\xA5",
+ "\xEA\xEA" => "\xE5\xB9\xBC",
+ "\xEA\xEB" => "\xE5\xB9\xBD",
+ "\xEA\xEC" => "\xE5\xBA\xBE",
+ "\xEA\xED" => "\xE6\x82\xA0",
+ "\xEA\xEE" => "\xE6\x83\x9F",
+ "\xEA\xEF" => "\xE6\x84\x88",
+ "\xEA\xF0" => "\xE6\x84\x89",
+ "\xEA\xF1" => "\xE6\x8F\x84",
+ "\xEA\xF2" => "\xE6\x94\xB8",
+ "\xEA\xF3" => "\xE6\x9C\x89",
+ "\xEA\xF4" => "\xEF\xA7\x88",
+ "\xEA\xF5" => "\xE6\x9F\x94",
+ "\xEA\xF6" => "\xE6\x9F\x9A",
+ "\xEA\xF7" => "\xEF\xA7\x89",
+ "\xEA\xF8" => "\xE6\xA5\xA1",
+ "\xEA\xF9" => "\xE6\xA5\xA2",
+ "\xEA\xFA" => "\xE6\xB2\xB9",
+ "\xEA\xFB" => "\xE6\xB4\xA7",
+ "\xEA\xFC" => "\xEF\xA7\x8A",
+ "\xEA\xFD" => "\xE6\xB8\xB8",
+ "\xEA\xFE" => "\xEF\xA7\x8B",
+ "\xEB\xA1" => "\xE6\xBF\xA1",
+ "\xEB\xA2" => "\xE7\x8C\xB6",
+ "\xEB\xA3" => "\xE7\x8C\xB7",
+ "\xEB\xA4" => "\xEF\xA7\x8C",
+ "\xEB\xA5" => "\xE7\x91\x9C",
+ "\xEB\xA6" => "\xE7\x94\xB1",
+ "\xEB\xA7" => "\xEF\xA7\x8D",
+ "\xEB\xA8" => "\xE7\x99\x92",
+ "\xEB\xA9" => "\xEF\xA7\x8E",
+ "\xEB\xAA" => "\xEF\xA7\x8F",
+ "\xEB\xAB" => "\xE7\xB6\xAD",
+ "\xEB\xAC" => "\xE8\x87\xBE",
+ "\xEB\xAD" => "\xE8\x90\xB8",
+ "\xEB\xAE" => "\xE8\xA3\x95",
+ "\xEB\xAF" => "\xE8\xAA\x98",
+ "\xEB\xB0" => "\xE8\xAB\x9B",
+ "\xEB\xB1" => "\xE8\xAB\xAD",
+ "\xEB\xB2" => "\xE8\xB8\xB0",
+ "\xEB\xB3" => "\xE8\xB9\x82",
+ "\xEB\xB4" => "\xE9\x81\x8A",
+ "\xEB\xB5" => "\xE9\x80\xBE",
+ "\xEB\xB6" => "\xE9\x81\xBA",
+ "\xEB\xB7" => "\xE9\x85\x89",
+ "\xEB\xB8" => "\xE9\x87\x89",
+ "\xEB\xB9" => "\xE9\x8D\xAE",
+ "\xEB\xBA" => "\xEF\xA7\x90",
+ "\xEB\xBB" => "\xEF\xA7\x91",
+ "\xEB\xBC" => "\xE5\xA0\x89",
+ "\xEB\xBD" => "\xEF\xA7\x92",
+ "\xEB\xBE" => "\xE6\xAF\x93",
+ "\xEB\xBF" => "\xE8\x82\x89",
+ "\xEB\xC0" => "\xE8\x82\xB2",
+ "\xEB\xC1" => "\xEF\xA7\x93",
+ "\xEB\xC2" => "\xEF\xA7\x94",
+ "\xEB\xC3" => "\xE5\x85\x81",
+ "\xEB\xC4" => "\xE5\xA5\xAB",
+ "\xEB\xC5" => "\xE5\xB0\xB9",
+ "\xEB\xC6" => "\xEF\xA7\x95",
+ "\xEB\xC7" => "\xEF\xA7\x96",
+ "\xEB\xC8" => "\xE6\xBD\xA4",
+ "\xEB\xC9" => "\xE7\x8E\xA7",
+ "\xEB\xCA" => "\xE8\x83\xA4",
+ "\xEB\xCB" => "\xE8\xB4\x87",
+ "\xEB\xCC" => "\xEF\xA7\x97",
+ "\xEB\xCD" => "\xE9\x88\x97",
+ "\xEB\xCE" => "\xE9\x96\x8F",
+ "\xEB\xCF" => "\xEF\xA7\x98",
+ "\xEB\xD0" => "\xEF\xA7\x99",
+ "\xEB\xD1" => "\xEF\xA7\x9A",
+ "\xEB\xD2" => "\xEF\xA7\x9B",
+ "\xEB\xD3" => "\xE8\x81\xBF",
+ "\xEB\xD4" => "\xE6\x88\x8E",
+ "\xEB\xD5" => "\xE7\x80\x9C",
+ "\xEB\xD6" => "\xE7\xB5\xA8",
+ "\xEB\xD7" => "\xE8\x9E\x8D",
+ "\xEB\xD8" => "\xEF\xA7\x9C",
+ "\xEB\xD9" => "\xE5\x9E\xA0",
+ "\xEB\xDA" => "\xE6\x81\xA9",
+ "\xEB\xDB" => "\xE6\x85\x87",
+ "\xEB\xDC" => "\xE6\xAE\xB7",
+ "\xEB\xDD" => "\xE8\xAA\xBE",
+ "\xEB\xDE" => "\xE9\x8A\x80",
+ "\xEB\xDF" => "\xE9\x9A\xB1",
+ "\xEB\xE0" => "\xE4\xB9\x99",
+ "\xEB\xE1" => "\xE5\x90\x9F",
+ "\xEB\xE2" => "\xE6\xB7\xAB",
+ "\xEB\xE3" => "\xE8\x94\xAD",
+ "\xEB\xE4" => "\xE9\x99\xB0",
+ "\xEB\xE5" => "\xE9\x9F\xB3",
+ "\xEB\xE6" => "\xE9\xA3\xAE",
+ "\xEB\xE7" => "\xE6\x8F\x96",
+ "\xEB\xE8" => "\xE6\xB3\xA3",
+ "\xEB\xE9" => "\xE9\x82\x91",
+ "\xEB\xEA" => "\xE5\x87\x9D",
+ "\xEB\xEB" => "\xE6\x87\x89",
+ "\xEB\xEC" => "\xE8\x86\xBA",
+ "\xEB\xED" => "\xE9\xB7\xB9",
+ "\xEB\xEE" => "\xE4\xBE\x9D",
+ "\xEB\xEF" => "\xE5\x80\x9A",
+ "\xEB\xF0" => "\xE5\x84\x80",
+ "\xEB\xF1" => "\xE5\xAE\x9C",
+ "\xEB\xF2" => "\xE6\x84\x8F",
+ "\xEB\xF3" => "\xE6\x87\xBF",
+ "\xEB\xF4" => "\xE6\x93\xAC",
+ "\xEB\xF5" => "\xE6\xA4\x85",
+ "\xEB\xF6" => "\xE6\xAF\x85",
+ "\xEB\xF7" => "\xE7\x96\x91",
+ "\xEB\xF8" => "\xE7\x9F\xA3",
+ "\xEB\xF9" => "\xE7\xBE\xA9",
+ "\xEB\xFA" => "\xE8\x89\xA4",
+ "\xEB\xFB" => "\xE8\x96\x8F",
+ "\xEB\xFC" => "\xE8\x9F\xBB",
+ "\xEB\xFD" => "\xE8\xA1\xA3",
+ "\xEB\xFE" => "\xE8\xAA\xBC",
+ "\xEC\xA1" => "\xE8\xAD\xB0",
+ "\xEC\xA2" => "\xE9\x86\xAB",
+ "\xEC\xA3" => "\xE4\xBA\x8C",
+ "\xEC\xA4" => "\xE4\xBB\xA5",
+ "\xEC\xA5" => "\xE4\xBC\x8A",
+ "\xEC\xA6" => "\xEF\xA7\x9D",
+ "\xEC\xA7" => "\xEF\xA7\x9E",
+ "\xEC\xA8" => "\xE5\xA4\xB7",
+ "\xEC\xA9" => "\xE5\xA7\xA8",
+ "\xEC\xAA" => "\xEF\xA7\x9F",
+ "\xEC\xAB" => "\xE5\xB7\xB2",
+ "\xEC\xAC" => "\xE5\xBC\x9B",
+ "\xEC\xAD" => "\xE5\xBD\x9B",
+ "\xEC\xAE" => "\xE6\x80\xA1",
+ "\xEC\xAF" => "\xEF\xA7\xA0",
+ "\xEC\xB0" => "\xEF\xA7\xA1",
+ "\xEC\xB1" => "\xEF\xA7\xA2",
+ "\xEC\xB2" => "\xEF\xA7\xA3",
+ "\xEC\xB3" => "\xE7\x88\xBE",
+ "\xEC\xB4" => "\xE7\x8F\xA5",
+ "\xEC\xB5" => "\xEF\xA7\xA4",
+ "\xEC\xB6" => "\xE7\x95\xB0",
+ "\xEC\xB7" => "\xE7\x97\x8D",
+ "\xEC\xB8" => "\xEF\xA7\xA5",
+ "\xEC\xB9" => "\xE7\xA7\xBB",
+ "\xEC\xBA" => "\xEF\xA7\xA6",
+ "\xEC\xBB" => "\xE8\x80\x8C",
+ "\xEC\xBC" => "\xE8\x80\xB3",
+ "\xEC\xBD" => "\xE8\x82\x84",
+ "\xEC\xBE" => "\xE8\x8B\xA1",
+ "\xEC\xBF" => "\xE8\x8D\x91",
+ "\xEC\xC0" => "\xEF\xA7\xA7",
+ "\xEC\xC1" => "\xEF\xA7\xA8",
+ "\xEC\xC2" => "\xE8\xB2\xBD",
+ "\xEC\xC3" => "\xE8\xB2\xB3",
+ "\xEC\xC4" => "\xE9\x82\x87",
+ "\xEC\xC5" => "\xEF\xA7\xA9",
+ "\xEC\xC6" => "\xEF\xA7\xAA",
+ "\xEC\xC7" => "\xE9\xA3\xB4",
+ "\xEC\xC8" => "\xE9\xA4\x8C",
+ "\xEC\xC9" => "\xEF\xA7\xAB",
+ "\xEC\xCA" => "\xEF\xA7\xAC",
+ "\xEC\xCB" => "\xE7\x80\xB7",
+ "\xEC\xCC" => "\xE7\x9B\x8A",
+ "\xEC\xCD" => "\xE7\xBF\x8A",
+ "\xEC\xCE" => "\xE7\xBF\x8C",
+ "\xEC\xCF" => "\xE7\xBF\xBC",
+ "\xEC\xD0" => "\xE8\xAC\x9A",
+ "\xEC\xD1" => "\xE4\xBA\xBA",
+ "\xEC\xD2" => "\xE4\xBB\x81",
+ "\xEC\xD3" => "\xE5\x88\x83",
+ "\xEC\xD4" => "\xE5\x8D\xB0",
+ "\xEC\xD5" => "\xEF\xA7\xAD",
+ "\xEC\xD6" => "\xE5\x92\xBD",
+ "\xEC\xD7" => "\xE5\x9B\xA0",
+ "\xEC\xD8" => "\xE5\xA7\xBB",
+ "\xEC\xD9" => "\xE5\xAF\x85",
+ "\xEC\xDA" => "\xE5\xBC\x95",
+ "\xEC\xDB" => "\xE5\xBF\x8D",
+ "\xEC\xDC" => "\xE6\xB9\xAE",
+ "\xEC\xDD" => "\xEF\xA7\xAE",
+ "\xEC\xDE" => "\xEF\xA7\xAF",
+ "\xEC\xDF" => "\xE7\xB5\xAA",
+ "\xEC\xE0" => "\xE8\x8C\xB5",
+ "\xEC\xE1" => "\xEF\xA7\xB0",
+ "\xEC\xE2" => "\xE8\x9A\x93",
+ "\xEC\xE3" => "\xE8\xAA\x8D",
+ "\xEC\xE4" => "\xEF\xA7\xB1",
+ "\xEC\xE5" => "\xE9\x9D\xAD",
+ "\xEC\xE6" => "\xE9\x9D\xB7",
+ "\xEC\xE7" => "\xEF\xA7\xB2",
+ "\xEC\xE8" => "\xEF\xA7\xB3",
+ "\xEC\xE9" => "\xE4\xB8\x80",
+ "\xEC\xEA" => "\xE4\xBD\x9A",
+ "\xEC\xEB" => "\xE4\xBD\xBE",
+ "\xEC\xEC" => "\xE5\xA3\xB9",
+ "\xEC\xED" => "\xE6\x97\xA5",
+ "\xEC\xEE" => "\xE6\xBA\xA2",
+ "\xEC\xEF" => "\xE9\x80\xB8",
+ "\xEC\xF0" => "\xE9\x8E\xB0",
+ "\xEC\xF1" => "\xE9\xA6\xB9",
+ "\xEC\xF2" => "\xE4\xBB\xBB",
+ "\xEC\xF3" => "\xE5\xA3\xAC",
+ "\xEC\xF4" => "\xE5\xA6\x8A",
+ "\xEC\xF5" => "\xE5\xA7\x99",
+ "\xEC\xF6" => "\xE6\x81\x81",
+ "\xEC\xF7" => "\xEF\xA7\xB4",
+ "\xEC\xF8" => "\xEF\xA7\xB5",
+ "\xEC\xF9" => "\xE7\xA8\x94",
+ "\xEC\xFA" => "\xEF\xA7\xB6",
+ "\xEC\xFB" => "\xE8\x8D\x8F",
+ "\xEC\xFC" => "\xE8\xB3\x83",
+ "\xEC\xFD" => "\xE5\x85\xA5",
+ "\xEC\xFE" => "\xE5\x8D\x84",
+ "\xED\xA1" => "\xEF\xA7\xB7",
+ "\xED\xA2" => "\xEF\xA7\xB8",
+ "\xED\xA3" => "\xEF\xA7\xB9",
+ "\xED\xA4" => "\xE4\xBB\x8D",
+ "\xED\xA5" => "\xE5\x89\xA9",
+ "\xED\xA6" => "\xE5\xAD\x95",
+ "\xED\xA7" => "\xE8\x8A\xBF",
+ "\xED\xA8" => "\xE4\xBB\x94",
+ "\xED\xA9" => "\xE5\x88\xBA",
+ "\xED\xAA" => "\xE5\x92\xA8",
+ "\xED\xAB" => "\xE5\xA7\x89",
+ "\xED\xAC" => "\xE5\xA7\xBF",
+ "\xED\xAD" => "\xE5\xAD\x90",
+ "\xED\xAE" => "\xE5\xAD\x97",
+ "\xED\xAF" => "\xE5\xAD\x9C",
+ "\xED\xB0" => "\xE6\x81\xA3",
+ "\xED\xB1" => "\xE6\x85\x88",
+ "\xED\xB2" => "\xE6\xBB\x8B",
+ "\xED\xB3" => "\xE7\x82\x99",
+ "\xED\xB4" => "\xE7\x85\xAE",
+ "\xED\xB5" => "\xE7\x8E\x86",
+ "\xED\xB6" => "\xE7\x93\xB7",
+ "\xED\xB7" => "\xE7\x96\xB5",
+ "\xED\xB8" => "\xE7\xA3\x81",
+ "\xED\xB9" => "\xE7\xB4\xAB",
+ "\xED\xBA" => "\xE8\x80\x85",
+ "\xED\xBB" => "\xE8\x87\xAA",
+ "\xED\xBC" => "\xE8\x8C\xA8",
+ "\xED\xBD" => "\xE8\x94\x97",
+ "\xED\xBE" => "\xE8\x97\x89",
+ "\xED\xBF" => "\xE8\xAB\xAE",
+ "\xED\xC0" => "\xE8\xB3\x87",
+ "\xED\xC1" => "\xE9\x9B\x8C",
+ "\xED\xC2" => "\xE4\xBD\x9C",
+ "\xED\xC3" => "\xE5\x8B\xBA",
+ "\xED\xC4" => "\xE5\x9A\xBC",
+ "\xED\xC5" => "\xE6\x96\xAB",
+ "\xED\xC6" => "\xE6\x98\xA8",
+ "\xED\xC7" => "\xE7\x81\xBC",
+ "\xED\xC8" => "\xE7\x82\xB8",
+ "\xED\xC9" => "\xE7\x88\xB5",
+ "\xED\xCA" => "\xE7\xB6\xBD",
+ "\xED\xCB" => "\xE8\x8A\x8D",
+ "\xED\xCC" => "\xE9\x85\x8C",
+ "\xED\xCD" => "\xE9\x9B\x80",
+ "\xED\xCE" => "\xE9\xB5\xB2",
+ "\xED\xCF" => "\xE5\xAD\xB1",
+ "\xED\xD0" => "\xE6\xA3\xA7",
+ "\xED\xD1" => "\xE6\xAE\x98",
+ "\xED\xD2" => "\xE6\xBD\xBA",
+ "\xED\xD3" => "\xE7\x9B\x9E",
+ "\xED\xD4" => "\xE5\xB2\x91",
+ "\xED\xD5" => "\xE6\x9A\xAB",
+ "\xED\xD6" => "\xE6\xBD\x9B",
+ "\xED\xD7" => "\xE7\xAE\xB4",
+ "\xED\xD8" => "\xE7\xB0\xAA",
+ "\xED\xD9" => "\xE8\xA0\xB6",
+ "\xED\xDA" => "\xE9\x9B\x9C",
+ "\xED\xDB" => "\xE4\xB8\x88",
+ "\xED\xDC" => "\xE4\xBB\x97",
+ "\xED\xDD" => "\xE5\x8C\xA0",
+ "\xED\xDE" => "\xE5\xA0\xB4",
+ "\xED\xDF" => "\xE5\xA2\xBB",
+ "\xED\xE0" => "\xE5\xA3\xAF",
+ "\xED\xE1" => "\xE5\xA5\xAC",
+ "\xED\xE2" => "\xE5\xB0\x87",
+ "\xED\xE3" => "\xE5\xB8\xB3",
+ "\xED\xE4" => "\xE5\xBA\x84",
+ "\xED\xE5" => "\xE5\xBC\xB5",
+ "\xED\xE6" => "\xE6\x8E\x8C",
+ "\xED\xE7" => "\xE6\x9A\xB2",
+ "\xED\xE8" => "\xE6\x9D\x96",
+ "\xED\xE9" => "\xE6\xA8\x9F",
+ "\xED\xEA" => "\xE6\xAA\xA3",
+ "\xED\xEB" => "\xE6\xAC\x8C",
+ "\xED\xEC" => "\xE6\xBC\xBF",
+ "\xED\xED" => "\xE7\x89\x86",
+ "\xED\xEE" => "\xEF\xA7\xBA",
+ "\xED\xEF" => "\xE7\x8D\x90",
+ "\xED\xF0" => "\xE7\x92\x8B",
+ "\xED\xF1" => "\xE7\xAB\xA0",
+ "\xED\xF2" => "\xE7\xB2\xA7",
+ "\xED\xF3" => "\xE8\x85\xB8",
+ "\xED\xF4" => "\xE8\x87\x9F",
+ "\xED\xF5" => "\xE8\x87\xA7",
+ "\xED\xF6" => "\xE8\x8E\x8A",
+ "\xED\xF7" => "\xE8\x91\xAC",
+ "\xED\xF8" => "\xE8\x94\xA3",
+ "\xED\xF9" => "\xE8\x96\x94",
+ "\xED\xFA" => "\xE8\x97\x8F",
+ "\xED\xFB" => "\xE8\xA3\x9D",
+ "\xED\xFC" => "\xE8\xB4\x93",
+ "\xED\xFD" => "\xE9\x86\xAC",
+ "\xED\xFE" => "\xE9\x95\xB7",
+ "\xEE\xA1" => "\xE9\x9A\x9C",
+ "\xEE\xA2" => "\xE5\x86\x8D",
+ "\xEE\xA3" => "\xE5\x93\x89",
+ "\xEE\xA4" => "\xE5\x9C\xA8",
+ "\xEE\xA5" => "\xE5\xAE\xB0",
+ "\xEE\xA6" => "\xE6\x89\x8D",
+ "\xEE\xA7" => "\xE6\x9D\x90",
+ "\xEE\xA8" => "\xE6\xA0\xBD",
+ "\xEE\xA9" => "\xE6\xA2\x93",
+ "\xEE\xAA" => "\xE6\xB8\xBD",
+ "\xEE\xAB" => "\xE6\xBB\x93",
+ "\xEE\xAC" => "\xE7\x81\xBD",
+ "\xEE\xAD" => "\xE7\xB8\xA1",
+ "\xEE\xAE" => "\xE8\xA3\x81",
+ "\xEE\xAF" => "\xE8\xB2\xA1",
+ "\xEE\xB0" => "\xE8\xBC\x89",
+ "\xEE\xB1" => "\xE9\xBD\x8B",
+ "\xEE\xB2" => "\xE9\xBD\x8E",
+ "\xEE\xB3" => "\xE7\x88\xAD",
+ "\xEE\xB4" => "\xE7\xAE\x8F",
+ "\xEE\xB5" => "\xE8\xAB\x8D",
+ "\xEE\xB6" => "\xE9\x8C\x9A",
+ "\xEE\xB7" => "\xE4\xBD\x87",
+ "\xEE\xB8" => "\xE4\xBD\x8E",
+ "\xEE\xB9" => "\xE5\x84\xB2",
+ "\xEE\xBA" => "\xE5\x92\x80",
+ "\xEE\xBB" => "\xE5\xA7\x90",
+ "\xEE\xBC" => "\xE5\xBA\x95",
+ "\xEE\xBD" => "\xE6\x8A\xB5",
+ "\xEE\xBE" => "\xE6\x9D\xB5",
+ "\xEE\xBF" => "\xE6\xA5\xAE",
+ "\xEE\xC0" => "\xE6\xA8\x97",
+ "\xEE\xC1" => "\xE6\xB2\xAE",
+ "\xEE\xC2" => "\xE6\xB8\x9A",
+ "\xEE\xC3" => "\xE7\x8B\x99",
+ "\xEE\xC4" => "\xE7\x8C\xAA",
+ "\xEE\xC5" => "\xE7\x96\xBD",
+ "\xEE\xC6" => "\xE7\xAE\xB8",
+ "\xEE\xC7" => "\xE7\xB4\xB5",
+ "\xEE\xC8" => "\xE8\x8B\xA7",
+ "\xEE\xC9" => "\xE8\x8F\xB9",
+ "\xEE\xCA" => "\xE8\x91\x97",
+ "\xEE\xCB" => "\xE8\x97\xB7",
+ "\xEE\xCC" => "\xE8\xA9\x9B",
+ "\xEE\xCD" => "\xE8\xB2\xAF",
+ "\xEE\xCE" => "\xE8\xBA\x87",
+ "\xEE\xCF" => "\xE9\x80\x99",
+ "\xEE\xD0" => "\xE9\x82\xB8",
+ "\xEE\xD1" => "\xE9\x9B\x8E",
+ "\xEE\xD2" => "\xE9\xBD\x9F",
+ "\xEE\xD3" => "\xE5\x8B\xA3",
+ "\xEE\xD4" => "\xE5\x90\x8A",
+ "\xEE\xD5" => "\xE5\xAB\xA1",
+ "\xEE\xD6" => "\xE5\xAF\x82",
+ "\xEE\xD7" => "\xE6\x91\x98",
+ "\xEE\xD8" => "\xE6\x95\xB5",
+ "\xEE\xD9" => "\xE6\xBB\xB4",
+ "\xEE\xDA" => "\xE7\x8B\x84",
+ "\xEE\xDB" => "\xEF\xA7\xBB",
+ "\xEE\xDC" => "\xE7\x9A\x84",
+ "\xEE\xDD" => "\xE7\xA9\x8D",
+ "\xEE\xDE" => "\xE7\xAC\x9B",
+ "\xEE\xDF" => "\xE7\xB1\x8D",
+ "\xEE\xE0" => "\xE7\xB8\xBE",
+ "\xEE\xE1" => "\xE7\xBF\x9F",
+ "\xEE\xE2" => "\xE8\x8D\xBB",
+ "\xEE\xE3" => "\xE8\xAC\xAB",
+ "\xEE\xE4" => "\xE8\xB3\x8A",
+ "\xEE\xE5" => "\xE8\xB5\xA4",
+ "\xEE\xE6" => "\xE8\xB7\xA1",
+ "\xEE\xE7" => "\xE8\xB9\x9F",
+ "\xEE\xE8" => "\xE8\xBF\xAA",
+ "\xEE\xE9" => "\xE8\xBF\xB9",
+ "\xEE\xEA" => "\xE9\x81\xA9",
+ "\xEE\xEB" => "\xE9\x8F\x91",
+ "\xEE\xEC" => "\xE4\xBD\x83",
+ "\xEE\xED" => "\xE4\xBD\xBA",
+ "\xEE\xEE" => "\xE5\x82\xB3",
+ "\xEE\xEF" => "\xE5\x85\xA8",
+ "\xEE\xF0" => "\xE5\x85\xB8",
+ "\xEE\xF1" => "\xE5\x89\x8D",
+ "\xEE\xF2" => "\xE5\x89\xAA",
+ "\xEE\xF3" => "\xE5\xA1\xA1",
+ "\xEE\xF4" => "\xE5\xA1\xBC",
+ "\xEE\xF5" => "\xE5\xA5\xA0",
+ "\xEE\xF6" => "\xE5\xB0\x88",
+ "\xEE\xF7" => "\xE5\xB1\x95",
+ "\xEE\xF8" => "\xE5\xBB\x9B",
+ "\xEE\xF9" => "\xE6\x82\x9B",
+ "\xEE\xFA" => "\xE6\x88\xB0",
+ "\xEE\xFB" => "\xE6\xA0\x93",
+ "\xEE\xFC" => "\xE6\xAE\xBF",
+ "\xEE\xFD" => "\xE6\xB0\x88",
+ "\xEE\xFE" => "\xE6\xBE\xB1",
+ "\xEF\xA1" => "\xE7\x85\x8E",
+ "\xEF\xA2" => "\xE7\x90\xA0",
+ "\xEF\xA3" => "\xE7\x94\xB0",
+ "\xEF\xA4" => "\xE7\x94\xB8",
+ "\xEF\xA5" => "\xE7\x95\x91",
+ "\xEF\xA6" => "\xE7\x99\xB2",
+ "\xEF\xA7" => "\xE7\xAD\x8C",
+ "\xEF\xA8" => "\xE7\xAE\x8B",
+ "\xEF\xA9" => "\xE7\xAE\xAD",
+ "\xEF\xAA" => "\xE7\xAF\x86",
+ "\xEF\xAB" => "\xE7\xBA\x8F",
+ "\xEF\xAC" => "\xE8\xA9\xAE",
+ "\xEF\xAD" => "\xE8\xBC\xBE",
+ "\xEF\xAE" => "\xE8\xBD\x89",
+ "\xEF\xAF" => "\xE9\x88\xBF",
+ "\xEF\xB0" => "\xE9\x8A\x93",
+ "\xEF\xB1" => "\xE9\x8C\xA2",
+ "\xEF\xB2" => "\xE9\x90\xAB",
+ "\xEF\xB3" => "\xE9\x9B\xBB",
+ "\xEF\xB4" => "\xE9\xA1\x9A",
+ "\xEF\xB5" => "\xE9\xA1\xAB",
+ "\xEF\xB6" => "\xE9\xA4\x9E",
+ "\xEF\xB7" => "\xE5\x88\x87",
+ "\xEF\xB8" => "\xE6\x88\xAA",
+ "\xEF\xB9" => "\xE6\x8A\x98",
+ "\xEF\xBA" => "\xE6\xB5\x99",
+ "\xEF\xBB" => "\xE7\x99\xA4",
+ "\xEF\xBC" => "\xE7\xAB\x8A",
+ "\xEF\xBD" => "\xE7\xAF\x80",
+ "\xEF\xBE" => "\xE7\xB5\xB6",
+ "\xEF\xBF" => "\xE5\x8D\xA0",
+ "\xEF\xC0" => "\xE5\xB2\xBE",
+ "\xEF\xC1" => "\xE5\xBA\x97",
+ "\xEF\xC2" => "\xE6\xBC\xB8",
+ "\xEF\xC3" => "\xE7\x82\xB9",
+ "\xEF\xC4" => "\xE7\xB2\x98",
+ "\xEF\xC5" => "\xE9\x9C\x91",
+ "\xEF\xC6" => "\xE9\xAE\x8E",
+ "\xEF\xC7" => "\xE9\xBB\x9E",
+ "\xEF\xC8" => "\xE6\x8E\xA5",
+ "\xEF\xC9" => "\xE6\x91\xBA",
+ "\xEF\xCA" => "\xE8\x9D\xB6",
+ "\xEF\xCB" => "\xE4\xB8\x81",
+ "\xEF\xCC" => "\xE4\xBA\x95",
+ "\xEF\xCD" => "\xE4\xBA\xAD",
+ "\xEF\xCE" => "\xE5\x81\x9C",
+ "\xEF\xCF" => "\xE5\x81\xB5",
+ "\xEF\xD0" => "\xE5\x91\x88",
+ "\xEF\xD1" => "\xE5\xA7\x83",
+ "\xEF\xD2" => "\xE5\xAE\x9A",
+ "\xEF\xD3" => "\xE5\xB9\x80",
+ "\xEF\xD4" => "\xE5\xBA\xAD",
+ "\xEF\xD5" => "\xE5\xBB\xB7",
+ "\xEF\xD6" => "\xE5\xBE\x81",
+ "\xEF\xD7" => "\xE6\x83\x85",
+ "\xEF\xD8" => "\xE6\x8C\xBA",
+ "\xEF\xD9" => "\xE6\x94\xBF",
+ "\xEF\xDA" => "\xE6\x95\xB4",
+ "\xEF\xDB" => "\xE6\x97\x8C",
+ "\xEF\xDC" => "\xE6\x99\xB6",
+ "\xEF\xDD" => "\xE6\x99\xB8",
+ "\xEF\xDE" => "\xE6\x9F\xBE",
+ "\xEF\xDF" => "\xE6\xA5\xA8",
+ "\xEF\xE0" => "\xE6\xAA\x89",
+ "\xEF\xE1" => "\xE6\xAD\xA3",
+ "\xEF\xE2" => "\xE6\xB1\x80",
+ "\xEF\xE3" => "\xE6\xB7\x80",
+ "\xEF\xE4" => "\xE6\xB7\xA8",
+ "\xEF\xE5" => "\xE6\xB8\x9F",
+ "\xEF\xE6" => "\xE6\xB9\x9E",
+ "\xEF\xE7" => "\xE7\x80\x9E",
+ "\xEF\xE8" => "\xE7\x82\xA1",
+ "\xEF\xE9" => "\xE7\x8E\x8E",
+ "\xEF\xEA" => "\xE7\x8F\xBD",
+ "\xEF\xEB" => "\xE7\x94\xBA",
+ "\xEF\xEC" => "\xE7\x9D\x9B",
+ "\xEF\xED" => "\xE7\xA2\x87",
+ "\xEF\xEE" => "\xE7\xA6\x8E",
+ "\xEF\xEF" => "\xE7\xA8\x8B",
+ "\xEF\xF0" => "\xE7\xA9\xBD",
+ "\xEF\xF1" => "\xE7\xB2\xBE",
+ "\xEF\xF2" => "\xE7\xB6\x8E",
+ "\xEF\xF3" => "\xE8\x89\x87",
+ "\xEF\xF4" => "\xE8\xA8\x82",
+ "\xEF\xF5" => "\xE8\xAB\xAA",
+ "\xEF\xF6" => "\xE8\xB2\x9E",
+ "\xEF\xF7" => "\xE9\x84\xAD",
+ "\xEF\xF8" => "\xE9\x85\x8A",
+ "\xEF\xF9" => "\xE9\x87\x98",
+ "\xEF\xFA" => "\xE9\x89\xA6",
+ "\xEF\xFB" => "\xE9\x8B\x8C",
+ "\xEF\xFC" => "\xE9\x8C\xA0",
+ "\xEF\xFD" => "\xE9\x9C\x86",
+ "\xEF\xFE" => "\xE9\x9D\x96",
+ "\xF0\xA1" => "\xE9\x9D\x9C",
+ "\xF0\xA2" => "\xE9\xA0\x82",
+ "\xF0\xA3" => "\xE9\xBC\x8E",
+ "\xF0\xA4" => "\xE5\x88\xB6",
+ "\xF0\xA5" => "\xE5\x8A\x91",
+ "\xF0\xA6" => "\xE5\x95\xBC",
+ "\xF0\xA7" => "\xE5\xA0\xA4",
+ "\xF0\xA8" => "\xE5\xB8\x9D",
+ "\xF0\xA9" => "\xE5\xBC\x9F",
+ "\xF0\xAA" => "\xE6\x82\x8C",
+ "\xF0\xAB" => "\xE6\x8F\x90",
+ "\xF0\xAC" => "\xE6\xA2\xAF",
+ "\xF0\xAD" => "\xE6\xBF\x9F",
+ "\xF0\xAE" => "\xE7\xA5\xAD",
+ "\xF0\xAF" => "\xE7\xAC\xAC",
+ "\xF0\xB0" => "\xE8\x87\x8D",
+ "\xF0\xB1" => "\xE8\x96\xBA",
+ "\xF0\xB2" => "\xE8\xA3\xBD",
+ "\xF0\xB3" => "\xE8\xAB\xB8",
+ "\xF0\xB4" => "\xE8\xB9\x84",
+ "\xF0\xB5" => "\xE9\x86\x8D",
+ "\xF0\xB6" => "\xE9\x99\xA4",
+ "\xF0\xB7" => "\xE9\x9A\x9B",
+ "\xF0\xB8" => "\xE9\x9C\xBD",
+ "\xF0\xB9" => "\xE9\xA1\x8C",
+ "\xF0\xBA" => "\xE9\xBD\x8A",
+ "\xF0\xBB" => "\xE4\xBF\x8E",
+ "\xF0\xBC" => "\xE5\x85\x86",
+ "\xF0\xBD" => "\xE5\x87\x8B",
+ "\xF0\xBE" => "\xE5\x8A\xA9",
+ "\xF0\xBF" => "\xE5\x98\xB2",
+ "\xF0\xC0" => "\xE5\xBC\x94",
+ "\xF0\xC1" => "\xE5\xBD\xAB",
+ "\xF0\xC2" => "\xE6\x8E\xAA",
+ "\xF0\xC3" => "\xE6\x93\x8D",
+ "\xF0\xC4" => "\xE6\x97\xA9",
+ "\xF0\xC5" => "\xE6\x99\x81",
+ "\xF0\xC6" => "\xE6\x9B\xBA",
+ "\xF0\xC7" => "\xE6\x9B\xB9",
+ "\xF0\xC8" => "\xE6\x9C\x9D",
+ "\xF0\xC9" => "\xE6\xA2\x9D",
+ "\xF0\xCA" => "\xE6\xA3\x97",
+ "\xF0\xCB" => "\xE6\xA7\xBD",
+ "\xF0\xCC" => "\xE6\xBC\x95",
+ "\xF0\xCD" => "\xE6\xBD\xAE",
+ "\xF0\xCE" => "\xE7\x85\xA7",
+ "\xF0\xCF" => "\xE7\x87\xA5",
+ "\xF0\xD0" => "\xE7\x88\xAA",
+ "\xF0\xD1" => "\xE7\x92\xAA",
+ "\xF0\xD2" => "\xE7\x9C\xBA",
+ "\xF0\xD3" => "\xE7\xA5\x96",
+ "\xF0\xD4" => "\xE7\xA5\x9A",
+ "\xF0\xD5" => "\xE7\xA7\x9F",
+ "\xF0\xD6" => "\xE7\xA8\xA0",
+ "\xF0\xD7" => "\xE7\xAA\x95",
+ "\xF0\xD8" => "\xE7\xB2\x97",
+ "\xF0\xD9" => "\xE7\xB3\x9F",
+ "\xF0\xDA" => "\xE7\xB5\x84",
+ "\xF0\xDB" => "\xE7\xB9\xB0",
+ "\xF0\xDC" => "\xE8\x82\x87",
+ "\xF0\xDD" => "\xE8\x97\xBB",
+ "\xF0\xDE" => "\xE8\x9A\xA4",
+ "\xF0\xDF" => "\xE8\xA9\x94",
+ "\xF0\xE0" => "\xE8\xAA\xBF",
+ "\xF0\xE1" => "\xE8\xB6\x99",
+ "\xF0\xE2" => "\xE8\xBA\x81",
+ "\xF0\xE3" => "\xE9\x80\xA0",
+ "\xF0\xE4" => "\xE9\x81\xAD",
+ "\xF0\xE5" => "\xE9\x87\xA3",
+ "\xF0\xE6" => "\xE9\x98\xBB",
+ "\xF0\xE7" => "\xE9\x9B\x95",
+ "\xF0\xE8" => "\xE9\xB3\xA5",
+ "\xF0\xE9" => "\xE6\x97\x8F",
+ "\xF0\xEA" => "\xE7\xB0\x87",
+ "\xF0\xEB" => "\xE8\xB6\xB3",
+ "\xF0\xEC" => "\xE9\x8F\x83",
+ "\xF0\xED" => "\xE5\xAD\x98",
+ "\xF0\xEE" => "\xE5\xB0\x8A",
+ "\xF0\xEF" => "\xE5\x8D\x92",
+ "\xF0\xF0" => "\xE6\x8B\x99",
+ "\xF0\xF1" => "\xE7\x8C\x9D",
+ "\xF0\xF2" => "\xE5\x80\xA7",
+ "\xF0\xF3" => "\xE5\xAE\x97",
+ "\xF0\xF4" => "\xE5\xBE\x9E",
+ "\xF0\xF5" => "\xE6\x82\xB0",
+ "\xF0\xF6" => "\xE6\x85\xAB",
+ "\xF0\xF7" => "\xE6\xA3\x95",
+ "\xF0\xF8" => "\xE6\xB7\x99",
+ "\xF0\xF9" => "\xE7\x90\xAE",
+ "\xF0\xFA" => "\xE7\xA8\xAE",
+ "\xF0\xFB" => "\xE7\xB5\x82",
+ "\xF0\xFC" => "\xE7\xB6\x9C",
+ "\xF0\xFD" => "\xE7\xB8\xB1",
+ "\xF0\xFE" => "\xE8\x85\xAB",
+ "\xF1\xA1" => "\xE8\xB8\xAA",
+ "\xF1\xA2" => "\xE8\xB8\xB5",
+ "\xF1\xA3" => "\xE9\x8D\xBE",
+ "\xF1\xA4" => "\xE9\x90\x98",
+ "\xF1\xA5" => "\xE4\xBD\x90",
+ "\xF1\xA6" => "\xE5\x9D\x90",
+ "\xF1\xA7" => "\xE5\xB7\xA6",
+ "\xF1\xA8" => "\xE5\xBA\xA7",
+ "\xF1\xA9" => "\xE6\x8C\xAB",
+ "\xF1\xAA" => "\xE7\xBD\xAA",
+ "\xF1\xAB" => "\xE4\xB8\xBB",
+ "\xF1\xAC" => "\xE4\xBD\x8F",
+ "\xF1\xAD" => "\xE4\xBE\x8F",
+ "\xF1\xAE" => "\xE5\x81\x9A",
+ "\xF1\xAF" => "\xE5\xA7\x9D",
+ "\xF1\xB0" => "\xE8\x83\x84",
+ "\xF1\xB1" => "\xE5\x91\xAA",
+ "\xF1\xB2" => "\xE5\x91\xA8",
+ "\xF1\xB3" => "\xE5\x97\xBE",
+ "\xF1\xB4" => "\xE5\xA5\x8F",
+ "\xF1\xB5" => "\xE5\xAE\x99",
+ "\xF1\xB6" => "\xE5\xB7\x9E",
+ "\xF1\xB7" => "\xE5\xBB\x9A",
+ "\xF1\xB8" => "\xE6\x99\x9D",
+ "\xF1\xB9" => "\xE6\x9C\xB1",
+ "\xF1\xBA" => "\xE6\x9F\xB1",
+ "\xF1\xBB" => "\xE6\xA0\xAA",
+ "\xF1\xBC" => "\xE6\xB3\xA8",
+ "\xF1\xBD" => "\xE6\xB4\xB2",
+ "\xF1\xBE" => "\xE6\xB9\x8A",
+ "\xF1\xBF" => "\xE6\xBE\x8D",
+ "\xF1\xC0" => "\xE7\x82\xB7",
+ "\xF1\xC1" => "\xE7\x8F\xA0",
+ "\xF1\xC2" => "\xE7\x96\x87",
+ "\xF1\xC3" => "\xE7\xB1\x8C",
+ "\xF1\xC4" => "\xE7\xB4\x82",
+ "\xF1\xC5" => "\xE7\xB4\xAC",
+ "\xF1\xC6" => "\xE7\xB6\xA2",
+ "\xF1\xC7" => "\xE8\x88\x9F",
+ "\xF1\xC8" => "\xE8\x9B\x9B",
+ "\xF1\xC9" => "\xE8\xA8\xBB",
+ "\xF1\xCA" => "\xE8\xAA\x85",
+ "\xF1\xCB" => "\xE8\xB5\xB0",
+ "\xF1\xCC" => "\xE8\xBA\x8A",
+ "\xF1\xCD" => "\xE8\xBC\xB3",
+ "\xF1\xCE" => "\xE9\x80\xB1",
+ "\xF1\xCF" => "\xE9\x85\x8E",
+ "\xF1\xD0" => "\xE9\x85\x92",
+ "\xF1\xD1" => "\xE9\x91\x84",
+ "\xF1\xD2" => "\xE9\xA7\x90",
+ "\xF1\xD3" => "\xE7\xAB\xB9",
+ "\xF1\xD4" => "\xE7\xB2\xA5",
+ "\xF1\xD5" => "\xE4\xBF\x8A",
+ "\xF1\xD6" => "\xE5\x84\x81",
+ "\xF1\xD7" => "\xE5\x87\x86",
+ "\xF1\xD8" => "\xE5\x9F\x88",
+ "\xF1\xD9" => "\xE5\xAF\xAF",
+ "\xF1\xDA" => "\xE5\xB3\xBB",
+ "\xF1\xDB" => "\xE6\x99\x99",
+ "\xF1\xDC" => "\xE6\xA8\xBD",
+ "\xF1\xDD" => "\xE6\xB5\x9A",
+ "\xF1\xDE" => "\xE6\xBA\x96",
+ "\xF1\xDF" => "\xE6\xBF\xAC",
+ "\xF1\xE0" => "\xE7\x84\x8C",
+ "\xF1\xE1" => "\xE7\x95\xAF",
+ "\xF1\xE2" => "\xE7\xAB\xA3",
+ "\xF1\xE3" => "\xE8\xA0\xA2",
+ "\xF1\xE4" => "\xE9\x80\xA1",
+ "\xF1\xE5" => "\xE9\x81\xB5",
+ "\xF1\xE6" => "\xE9\x9B\x8B",
+ "\xF1\xE7" => "\xE9\xA7\xBF",
+ "\xF1\xE8" => "\xE8\x8C\x81",
+ "\xF1\xE9" => "\xE4\xB8\xAD",
+ "\xF1\xEA" => "\xE4\xBB\xB2",
+ "\xF1\xEB" => "\xE8\xA1\x86",
+ "\xF1\xEC" => "\xE9\x87\x8D",
+ "\xF1\xED" => "\xE5\x8D\xBD",
+ "\xF1\xEE" => "\xE6\xAB\x9B",
+ "\xF1\xEF" => "\xE6\xA5\xAB",
+ "\xF1\xF0" => "\xE6\xB1\x81",
+ "\xF1\xF1" => "\xE8\x91\xBA",
+ "\xF1\xF2" => "\xE5\xA2\x9E",
+ "\xF1\xF3" => "\xE6\x86\x8E",
+ "\xF1\xF4" => "\xE6\x9B\xBE",
+ "\xF1\xF5" => "\xE6\x8B\xAF",
+ "\xF1\xF6" => "\xE7\x83\x9D",
+ "\xF1\xF7" => "\xE7\x94\x91",
+ "\xF1\xF8" => "\xE7\x97\x87",
+ "\xF1\xF9" => "\xE7\xB9\x92",
+ "\xF1\xFA" => "\xE8\x92\xB8",
+ "\xF1\xFB" => "\xE8\xAD\x89",
+ "\xF1\xFC" => "\xE8\xB4\x88",
+ "\xF1\xFD" => "\xE4\xB9\x8B",
+ "\xF1\xFE" => "\xE5\x8F\xAA",
+ "\xF2\xA1" => "\xE5\x92\xAB",
+ "\xF2\xA2" => "\xE5\x9C\xB0",
+ "\xF2\xA3" => "\xE5\x9D\x80",
+ "\xF2\xA4" => "\xE5\xBF\x97",
+ "\xF2\xA5" => "\xE6\x8C\x81",
+ "\xF2\xA6" => "\xE6\x8C\x87",
+ "\xF2\xA7" => "\xE6\x91\xAF",
+ "\xF2\xA8" => "\xE6\x94\xAF",
+ "\xF2\xA9" => "\xE6\x97\xA8",
+ "\xF2\xAA" => "\xE6\x99\xBA",
+ "\xF2\xAB" => "\xE6\x9E\x9D",
+ "\xF2\xAC" => "\xE6\x9E\xB3",
+ "\xF2\xAD" => "\xE6\xAD\xA2",
+ "\xF2\xAE" => "\xE6\xB1\xA0",
+ "\xF2\xAF" => "\xE6\xB2\x9A",
+ "\xF2\xB0" => "\xE6\xBC\xAC",
+ "\xF2\xB1" => "\xE7\x9F\xA5",
+ "\xF2\xB2" => "\xE7\xA0\xA5",
+ "\xF2\xB3" => "\xE7\xA5\x89",
+ "\xF2\xB4" => "\xE7\xA5\x97",
+ "\xF2\xB5" => "\xE7\xB4\x99",
+ "\xF2\xB6" => "\xE8\x82\xA2",
+ "\xF2\xB7" => "\xE8\x84\x82",
+ "\xF2\xB8" => "\xE8\x87\xB3",
+ "\xF2\xB9" => "\xE8\x8A\x9D",
+ "\xF2\xBA" => "\xE8\x8A\xB7",
+ "\xF2\xBB" => "\xE8\x9C\x98",
+ "\xF2\xBC" => "\xE8\xAA\x8C",
+ "\xF2\xBD" => "\xEF\xA7\xBC",
+ "\xF2\xBE" => "\xE8\xB4\x84",
+ "\xF2\xBF" => "\xE8\xB6\xBE",
+ "\xF2\xC0" => "\xE9\x81\xB2",
+ "\xF2\xC1" => "\xE7\x9B\xB4",
+ "\xF2\xC2" => "\xE7\xA8\x99",
+ "\xF2\xC3" => "\xE7\xA8\xB7",
+ "\xF2\xC4" => "\xE7\xB9\x94",
+ "\xF2\xC5" => "\xE8\x81\xB7",
+ "\xF2\xC6" => "\xE5\x94\x87",
+ "\xF2\xC7" => "\xE5\x97\x94",
+ "\xF2\xC8" => "\xE5\xA1\xB5",
+ "\xF2\xC9" => "\xE6\x8C\xAF",
+ "\xF2\xCA" => "\xE6\x90\xA2",
+ "\xF2\xCB" => "\xE6\x99\x89",
+ "\xF2\xCC" => "\xE6\x99\x8B",
+ "\xF2\xCD" => "\xE6\xA1\xAD",
+ "\xF2\xCE" => "\xE6\xA6\x9B",
+ "\xF2\xCF" => "\xE6\xAE\x84",
+ "\xF2\xD0" => "\xE6\xB4\xA5",
+ "\xF2\xD1" => "\xE6\xBA\xB1",
+ "\xF2\xD2" => "\xE7\x8F\x8D",
+ "\xF2\xD3" => "\xE7\x91\xA8",
+ "\xF2\xD4" => "\xE7\x92\xA1",
+ "\xF2\xD5" => "\xE7\x95\x9B",
+ "\xF2\xD6" => "\xE7\x96\xB9",
+ "\xF2\xD7" => "\xE7\x9B\xA1",
+ "\xF2\xD8" => "\xE7\x9C\x9E",
+ "\xF2\xD9" => "\xE7\x9E\x8B",
+ "\xF2\xDA" => "\xE7\xA7\xA6",
+ "\xF2\xDB" => "\xE7\xB8\x89",
+ "\xF2\xDC" => "\xE7\xB8\x9D",
+ "\xF2\xDD" => "\xE8\x87\xBB",
+ "\xF2\xDE" => "\xE8\x94\xAF",
+ "\xF2\xDF" => "\xE8\xA2\x97",
+ "\xF2\xE0" => "\xE8\xA8\xBA",
+ "\xF2\xE1" => "\xE8\xB3\x91",
+ "\xF2\xE2" => "\xE8\xBB\xAB",
+ "\xF2\xE3" => "\xE8\xBE\xB0",
+ "\xF2\xE4" => "\xE9\x80\xB2",
+ "\xF2\xE5" => "\xE9\x8E\xAD",
+ "\xF2\xE6" => "\xE9\x99\xA3",
+ "\xF2\xE7" => "\xE9\x99\xB3",
+ "\xF2\xE8" => "\xE9\x9C\x87",
+ "\xF2\xE9" => "\xE4\xBE\x84",
+ "\xF2\xEA" => "\xE5\x8F\xB1",
+ "\xF2\xEB" => "\xE5\xA7\xAA",
+ "\xF2\xEC" => "\xE5\xAB\x89",
+ "\xF2\xED" => "\xE5\xB8\x99",
+ "\xF2\xEE" => "\xE6\xA1\x8E",
+ "\xF2\xEF" => "\xE7\x93\x86",
+ "\xF2\xF0" => "\xE7\x96\xBE",
+ "\xF2\xF1" => "\xE7\xA7\xA9",
+ "\xF2\xF2" => "\xE7\xAA\x92",
+ "\xF2\xF3" => "\xE8\x86\xA3",
+ "\xF2\xF4" => "\xE8\x9B\xAD",
+ "\xF2\xF5" => "\xE8\xB3\xAA",
+ "\xF2\xF6" => "\xE8\xB7\x8C",
+ "\xF2\xF7" => "\xE8\xBF\xAD",
+ "\xF2\xF8" => "\xE6\x96\x9F",
+ "\xF2\xF9" => "\xE6\x9C\x95",
+ "\xF2\xFA" => "\xEF\xA7\xBD",
+ "\xF2\xFB" => "\xE5\x9F\xB7",
+ "\xF2\xFC" => "\xE6\xBD\x97",
+ "\xF2\xFD" => "\xE7\xB7\x9D",
+ "\xF2\xFE" => "\xE8\xBC\xAF",
+ "\xF3\xA1" => "\xE9\x8F\xB6",
+ "\xF3\xA2" => "\xE9\x9B\x86",
+ "\xF3\xA3" => "\xE5\xBE\xB5",
+ "\xF3\xA4" => "\xE6\x87\xB2",
+ "\xF3\xA5" => "\xE6\xBE\x84",
+ "\xF3\xA6" => "\xE4\xB8\x94",
+ "\xF3\xA7" => "\xE4\xBE\x98",
+ "\xF3\xA8" => "\xE5\x80\x9F",
+ "\xF3\xA9" => "\xE5\x8F\x89",
+ "\xF3\xAA" => "\xE5\x97\x9F",
+ "\xF3\xAB" => "\xE5\xB5\xAF",
+ "\xF3\xAC" => "\xE5\xB7\xAE",
+ "\xF3\xAD" => "\xE6\xAC\xA1",
+ "\xF3\xAE" => "\xE6\xAD\xA4",
+ "\xF3\xAF" => "\xE7\xA3\x8B",
+ "\xF3\xB0" => "\xE7\xAE\x9A",
+ "\xF3\xB1" => "\xEF\xA7\xBE",
+ "\xF3\xB2" => "\xE8\xB9\x89",
+ "\xF3\xB3" => "\xE8\xBB\x8A",
+ "\xF3\xB4" => "\xE9\x81\xAE",
+ "\xF3\xB5" => "\xE6\x8D\x89",
+ "\xF3\xB6" => "\xE6\x90\xBE",
+ "\xF3\xB7" => "\xE7\x9D\x80",
+ "\xF3\xB8" => "\xE7\xAA\x84",
+ "\xF3\xB9" => "\xE9\x8C\xAF",
+ "\xF3\xBA" => "\xE9\x91\xBF",
+ "\xF3\xBB" => "\xE9\xBD\xAA",
+ "\xF3\xBC" => "\xE6\x92\xB0",
+ "\xF3\xBD" => "\xE6\xBE\xAF",
+ "\xF3\xBE" => "\xE7\x87\xA6",
+ "\xF3\xBF" => "\xE7\x92\xA8",
+ "\xF3\xC0" => "\xE7\x93\x9A",
+ "\xF3\xC1" => "\xE7\xAB\x84",
+ "\xF3\xC2" => "\xE7\xB0\x92",
+ "\xF3\xC3" => "\xE7\xBA\x82",
+ "\xF3\xC4" => "\xE7\xB2\xB2",
+ "\xF3\xC5" => "\xE7\xBA\x98",
+ "\xF3\xC6" => "\xE8\xAE\x9A",
+ "\xF3\xC7" => "\xE8\xB4\x8A",
+ "\xF3\xC8" => "\xE9\x91\xBD",
+ "\xF3\xC9" => "\xE9\xA4\x90",
+ "\xF3\xCA" => "\xE9\xA5\x8C",
+ "\xF3\xCB" => "\xE5\x88\xB9",
+ "\xF3\xCC" => "\xE5\xAF\x9F",
+ "\xF3\xCD" => "\xE6\x93\xA6",
+ "\xF3\xCE" => "\xE6\x9C\xAD",
+ "\xF3\xCF" => "\xE7\xB4\xAE",
+ "\xF3\xD0" => "\xE5\x83\xAD",
+ "\xF3\xD1" => "\xE5\x8F\x83",
+ "\xF3\xD2" => "\xE5\xA1\xB9",
+ "\xF3\xD3" => "\xE6\x85\x98",
+ "\xF3\xD4" => "\xE6\x85\x99",
+ "\xF3\xD5" => "\xE6\x87\xBA",
+ "\xF3\xD6" => "\xE6\x96\xAC",
+ "\xF3\xD7" => "\xE7\xAB\x99",
+ "\xF3\xD8" => "\xE8\xAE\x92",
+ "\xF3\xD9" => "\xE8\xAE\x96",
+ "\xF3\xDA" => "\xE5\x80\x89",
+ "\xF3\xDB" => "\xE5\x80\xA1",
+ "\xF3\xDC" => "\xE5\x89\xB5",
+ "\xF3\xDD" => "\xE5\x94\xB1",
+ "\xF3\xDE" => "\xE5\xA8\xBC",
+ "\xF3\xDF" => "\xE5\xBB\xA0",
+ "\xF3\xE0" => "\xE5\xBD\xB0",
+ "\xF3\xE1" => "\xE6\x84\xB4",
+ "\xF3\xE2" => "\xE6\x95\x9E",
+ "\xF3\xE3" => "\xE6\x98\x8C",
+ "\xF3\xE4" => "\xE6\x98\xB6",
+ "\xF3\xE5" => "\xE6\x9A\xA2",
+ "\xF3\xE6" => "\xE6\xA7\x8D",
+ "\xF3\xE7" => "\xE6\xBB\x84",
+ "\xF3\xE8" => "\xE6\xBC\xB2",
+ "\xF3\xE9" => "\xE7\x8C\x96",
+ "\xF3\xEA" => "\xE7\x98\xA1",
+ "\xF3\xEB" => "\xE7\xAA\x93",
+ "\xF3\xEC" => "\xE8\x84\xB9",
+ "\xF3\xED" => "\xE8\x89\x99",
+ "\xF3\xEE" => "\xE8\x8F\x96",
+ "\xF3\xEF" => "\xE8\x92\xBC",
+ "\xF3\xF0" => "\xE5\x82\xB5",
+ "\xF3\xF1" => "\xE5\x9F\xB0",
+ "\xF3\xF2" => "\xE5\xAF\x80",
+ "\xF3\xF3" => "\xE5\xAF\xA8",
+ "\xF3\xF4" => "\xE5\xBD\xA9",
+ "\xF3\xF5" => "\xE6\x8E\xA1",
+ "\xF3\xF6" => "\xE7\xA0\xA6",
+ "\xF3\xF7" => "\xE7\xB6\xB5",
+ "\xF3\xF8" => "\xE8\x8F\x9C",
+ "\xF3\xF9" => "\xE8\x94\xA1",
+ "\xF3\xFA" => "\xE9\x87\x87",
+ "\xF3\xFB" => "\xE9\x87\xB5",
+ "\xF3\xFC" => "\xE5\x86\x8A",
+ "\xF3\xFD" => "\xE6\x9F\xB5",
+ "\xF3\xFE" => "\xE7\xAD\x96",
+ "\xF4\xA1" => "\xE8\xB2\xAC",
+ "\xF4\xA2" => "\xE5\x87\x84",
+ "\xF4\xA3" => "\xE5\xA6\xBB",
+ "\xF4\xA4" => "\xE6\x82\xBD",
+ "\xF4\xA5" => "\xE8\x99\x95",
+ "\xF4\xA6" => "\xE5\x80\x9C",
+ "\xF4\xA7" => "\xEF\xA7\xBF",
+ "\xF4\xA8" => "\xE5\x89\x94",
+ "\xF4\xA9" => "\xE5\xB0\xBA",
+ "\xF4\xAA" => "\xE6\x85\xBD",
+ "\xF4\xAB" => "\xE6\x88\x9A",
+ "\xF4\xAC" => "\xE6\x8B\x93",
+ "\xF4\xAD" => "\xE6\x93\xB2",
+ "\xF4\xAE" => "\xE6\x96\xA5",
+ "\xF4\xAF" => "\xE6\xBB\x8C",
+ "\xF4\xB0" => "\xE7\x98\xA0",
+ "\xF4\xB1" => "\xE8\x84\x8A",
+ "\xF4\xB2" => "\xE8\xB9\xA0",
+ "\xF4\xB3" => "\xE9\x99\x9F",
+ "\xF4\xB4" => "\xE9\x9A\xBB",
+ "\xF4\xB5" => "\xE4\xBB\x9F",
+ "\xF4\xB6" => "\xE5\x8D\x83",
+ "\xF4\xB7" => "\xE5\x96\x98",
+ "\xF4\xB8" => "\xE5\xA4\xA9",
+ "\xF4\xB9" => "\xE5\xB7\x9D",
+ "\xF4\xBA" => "\xE6\x93\x85",
+ "\xF4\xBB" => "\xE6\xB3\x89",
+ "\xF4\xBC" => "\xE6\xB7\xBA",
+ "\xF4\xBD" => "\xE7\x8E\x94",
+ "\xF4\xBE" => "\xE7\xA9\xBF",
+ "\xF4\xBF" => "\xE8\x88\x9B",
+ "\xF4\xC0" => "\xE8\x96\xA6",
+ "\xF4\xC1" => "\xE8\xB3\xA4",
+ "\xF4\xC2" => "\xE8\xB8\x90",
+ "\xF4\xC3" => "\xE9\x81\xB7",
+ "\xF4\xC4" => "\xE9\x87\xA7",
+ "\xF4\xC5" => "\xE9\x97\xA1",
+ "\xF4\xC6" => "\xE9\x98\xA1",
+ "\xF4\xC7" => "\xE9\x9F\x86",
+ "\xF4\xC8" => "\xE5\x87\xB8",
+ "\xF4\xC9" => "\xE5\x93\xB2",
+ "\xF4\xCA" => "\xE5\x96\x86",
+ "\xF4\xCB" => "\xE5\xBE\xB9",
+ "\xF4\xCC" => "\xE6\x92\xA4",
+ "\xF4\xCD" => "\xE6\xBE\x88",
+ "\xF4\xCE" => "\xE7\xB6\xB4",
+ "\xF4\xCF" => "\xE8\xBC\x9F",
+ "\xF4\xD0" => "\xE8\xBD\x8D",
+ "\xF4\xD1" => "\xE9\x90\xB5",
+ "\xF4\xD2" => "\xE5\x83\x89",
+ "\xF4\xD3" => "\xE5\xB0\x96",
+ "\xF4\xD4" => "\xE6\xB2\xBE",
+ "\xF4\xD5" => "\xE6\xB7\xBB",
+ "\xF4\xD6" => "\xE7\x94\x9B",
+ "\xF4\xD7" => "\xE7\x9E\xBB",
+ "\xF4\xD8" => "\xE7\xB0\xBD",
+ "\xF4\xD9" => "\xE7\xB1\xA4",
+ "\xF4\xDA" => "\xE8\xA9\xB9",
+ "\xF4\xDB" => "\xE8\xAB\x82",
+ "\xF4\xDC" => "\xE5\xA0\x9E",
+ "\xF4\xDD" => "\xE5\xA6\xBE",
+ "\xF4\xDE" => "\xE5\xB8\x96",
+ "\xF4\xDF" => "\xE6\x8D\xB7",
+ "\xF4\xE0" => "\xE7\x89\x92",
+ "\xF4\xE1" => "\xE7\x96\x8A",
+ "\xF4\xE2" => "\xE7\x9D\xAB",
+ "\xF4\xE3" => "\xE8\xAB\x9C",
+ "\xF4\xE4" => "\xE8\xB2\xBC",
+ "\xF4\xE5" => "\xE8\xBC\x92",
+ "\xF4\xE6" => "\xE5\xBB\xB3",
+ "\xF4\xE7" => "\xE6\x99\xB4",
+ "\xF4\xE8" => "\xE6\xB7\xB8",
+ "\xF4\xE9" => "\xE8\x81\xBD",
+ "\xF4\xEA" => "\xE8\x8F\x81",
+ "\xF4\xEB" => "\xE8\xAB\x8B",
+ "\xF4\xEC" => "\xE9\x9D\x91",
+ "\xF4\xED" => "\xE9\xAF\x96",
+ "\xF4\xEE" => "\xEF\xA8\x80",
+ "\xF4\xEF" => "\xE5\x89\x83",
+ "\xF4\xF0" => "\xE6\x9B\xBF",
+ "\xF4\xF1" => "\xE6\xB6\x95",
+ "\xF4\xF2" => "\xE6\xBB\xAF",
+ "\xF4\xF3" => "\xE7\xB7\xA0",
+ "\xF4\xF4" => "\xE8\xAB\xA6",
+ "\xF4\xF5" => "\xE9\x80\xAE",
+ "\xF4\xF6" => "\xE9\x81\x9E",
+ "\xF4\xF7" => "\xE9\xAB\x94",
+ "\xF4\xF8" => "\xE5\x88\x9D",
+ "\xF4\xF9" => "\xE5\x89\xBF",
+ "\xF4\xFA" => "\xE5\x93\xA8",
+ "\xF4\xFB" => "\xE6\x86\x94",
+ "\xF4\xFC" => "\xE6\x8A\x84",
+ "\xF4\xFD" => "\xE6\x8B\x9B",
+ "\xF4\xFE" => "\xE6\xA2\xA2",
+ "\xF5\xA1" => "\xE6\xA4\x92",
+ "\xF5\xA2" => "\xE6\xA5\x9A",
+ "\xF5\xA3" => "\xE6\xA8\xB5",
+ "\xF5\xA4" => "\xE7\x82\x92",
+ "\xF5\xA5" => "\xE7\x84\xA6",
+ "\xF5\xA6" => "\xE7\xA1\x9D",
+ "\xF5\xA7" => "\xE7\xA4\x81",
+ "\xF5\xA8" => "\xE7\xA4\x8E",
+ "\xF5\xA9" => "\xE7\xA7\x92",
+ "\xF5\xAA" => "\xE7\xA8\x8D",
+ "\xF5\xAB" => "\xE8\x82\x96",
+ "\xF5\xAC" => "\xE8\x89\xB8",
+ "\xF5\xAD" => "\xE8\x8B\x95",
+ "\xF5\xAE" => "\xE8\x8D\x89",
+ "\xF5\xAF" => "\xE8\x95\x89",
+ "\xF5\xB0" => "\xE8\xB2\x82",
+ "\xF5\xB1" => "\xE8\xB6\x85",
+ "\xF5\xB2" => "\xE9\x85\xA2",
+ "\xF5\xB3" => "\xE9\x86\x8B",
+ "\xF5\xB4" => "\xE9\x86\xAE",
+ "\xF5\xB5" => "\xE4\xBF\x83",
+ "\xF5\xB6" => "\xE5\x9B\x91",
+ "\xF5\xB7" => "\xE7\x87\xAD",
+ "\xF5\xB8" => "\xE7\x9F\x97",
+ "\xF5\xB9" => "\xE8\x9C\x80",
+ "\xF5\xBA" => "\xE8\xA7\xB8",
+ "\xF5\xBB" => "\xE5\xAF\xB8",
+ "\xF5\xBC" => "\xE5\xBF\x96",
+ "\xF5\xBD" => "\xE6\x9D\x91",
+ "\xF5\xBE" => "\xE9\x82\xA8",
+ "\xF5\xBF" => "\xE5\x8F\xA2",
+ "\xF5\xC0" => "\xE5\xA1\x9A",
+ "\xF5\xC1" => "\xE5\xAF\xB5",
+ "\xF5\xC2" => "\xE6\x82\xA4",
+ "\xF5\xC3" => "\xE6\x86\x81",
+ "\xF5\xC4" => "\xE6\x91\xA0",
+ "\xF5\xC5" => "\xE7\xB8\xBD",
+ "\xF5\xC6" => "\xE8\x81\xB0",
+ "\xF5\xC7" => "\xE8\x94\xA5",
+ "\xF5\xC8" => "\xE9\x8A\x83",
+ "\xF5\xC9" => "\xE6\x92\xAE",
+ "\xF5\xCA" => "\xE5\x82\xAC",
+ "\xF5\xCB" => "\xE5\xB4\x94",
+ "\xF5\xCC" => "\xE6\x9C\x80",
+ "\xF5\xCD" => "\xE5\xA2\x9C",
+ "\xF5\xCE" => "\xE6\x8A\xBD",
+ "\xF5\xCF" => "\xE6\x8E\xA8",
+ "\xF5\xD0" => "\xE6\xA4\x8E",
+ "\xF5\xD1" => "\xE6\xA5\xB8",
+ "\xF5\xD2" => "\xE6\xA8\x9E",
+ "\xF5\xD3" => "\xE6\xB9\xAB",
+ "\xF5\xD4" => "\xE7\x9A\xBA",
+ "\xF5\xD5" => "\xE7\xA7\x8B",
+ "\xF5\xD6" => "\xE8\x8A\xBB",
+ "\xF5\xD7" => "\xE8\x90\xA9",
+ "\xF5\xD8" => "\xE8\xAB\x8F",
+ "\xF5\xD9" => "\xE8\xB6\xA8",
+ "\xF5\xDA" => "\xE8\xBF\xBD",
+ "\xF5\xDB" => "\xE9\x84\x92",
+ "\xF5\xDC" => "\xE9\x85\x8B",
+ "\xF5\xDD" => "\xE9\x86\x9C",
+ "\xF5\xDE" => "\xE9\x8C\x90",
+ "\xF5\xDF" => "\xE9\x8C\x98",
+ "\xF5\xE0" => "\xE9\x8E\x9A",
+ "\xF5\xE1" => "\xE9\x9B\x9B",
+ "\xF5\xE2" => "\xE9\xA8\xB6",
+ "\xF5\xE3" => "\xE9\xB0\x8D",
+ "\xF5\xE4" => "\xE4\xB8\x91",
+ "\xF5\xE5" => "\xE7\x95\x9C",
+ "\xF5\xE6" => "\xE7\xA5\x9D",
+ "\xF5\xE7" => "\xE7\xAB\xBA",
+ "\xF5\xE8" => "\xE7\xAD\x91",
+ "\xF5\xE9" => "\xE7\xAF\x89",
+ "\xF5\xEA" => "\xE7\xB8\xAE",
+ "\xF5\xEB" => "\xE8\x93\x84",
+ "\xF5\xEC" => "\xE8\xB9\x99",
+ "\xF5\xED" => "\xE8\xB9\xB4",
+ "\xF5\xEE" => "\xE8\xBB\xB8",
+ "\xF5\xEF" => "\xE9\x80\x90",
+ "\xF5\xF0" => "\xE6\x98\xA5",
+ "\xF5\xF1" => "\xE6\xA4\xBF",
+ "\xF5\xF2" => "\xE7\x91\x83",
+ "\xF5\xF3" => "\xE5\x87\xBA",
+ "\xF5\xF4" => "\xE6\x9C\xAE",
+ "\xF5\xF5" => "\xE9\xBB\x9C",
+ "\xF5\xF6" => "\xE5\x85\x85",
+ "\xF5\xF7" => "\xE5\xBF\xA0",
+ "\xF5\xF8" => "\xE6\xB2\x96",
+ "\xF5\xF9" => "\xE8\x9F\xB2",
+ "\xF5\xFA" => "\xE8\xA1\x9D",
+ "\xF5\xFB" => "\xE8\xA1\xB7",
+ "\xF5\xFC" => "\xE6\x82\xB4",
+ "\xF5\xFD" => "\xE8\x86\xB5",
+ "\xF5\xFE" => "\xE8\x90\x83",
+ "\xF6\xA1" => "\xE8\xB4\x85",
+ "\xF6\xA2" => "\xE5\x8F\x96",
+ "\xF6\xA3" => "\xE5\x90\xB9",
+ "\xF6\xA4" => "\xE5\x98\xB4",
+ "\xF6\xA5" => "\xE5\xA8\xB6",
+ "\xF6\xA6" => "\xE5\xB0\xB1",
+ "\xF6\xA7" => "\xE7\x82\x8A",
+ "\xF6\xA8" => "\xE7\xBF\xA0",
+ "\xF6\xA9" => "\xE8\x81\x9A",
+ "\xF6\xAA" => "\xE8\x84\x86",
+ "\xF6\xAB" => "\xE8\x87\xAD",
+ "\xF6\xAC" => "\xE8\xB6\xA3",
+ "\xF6\xAD" => "\xE9\x86\x89",
+ "\xF6\xAE" => "\xE9\xA9\x9F",
+ "\xF6\xAF" => "\xE9\xB7\xB2",
+ "\xF6\xB0" => "\xE5\x81\xB4",
+ "\xF6\xB1" => "\xE4\xBB\x84",
+ "\xF6\xB2" => "\xE5\x8E\xA0",
+ "\xF6\xB3" => "\xE6\x83\xBB",
+ "\xF6\xB4" => "\xE6\xB8\xAC",
+ "\xF6\xB5" => "\xE5\xB1\xA4",
+ "\xF6\xB6" => "\xE4\xBE\x88",
+ "\xF6\xB7" => "\xE5\x80\xA4",
+ "\xF6\xB8" => "\xE5\x97\xA4",
+ "\xF6\xB9" => "\xE5\xB3\x99",
+ "\xF6\xBA" => "\xE5\xB9\x9F",
+ "\xF6\xBB" => "\xE6\x81\xA5",
+ "\xF6\xBC" => "\xE6\xA2\x94",
+ "\xF6\xBD" => "\xE6\xB2\xBB",
+ "\xF6\xBE" => "\xE6\xB7\x84",
+ "\xF6\xBF" => "\xE7\x86\xBE",
+ "\xF6\xC0" => "\xE7\x97\x94",
+ "\xF6\xC1" => "\xE7\x97\xB4",
+ "\xF6\xC2" => "\xE7\x99\xA1",
+ "\xF6\xC3" => "\xE7\xA8\x9A",
+ "\xF6\xC4" => "\xE7\xA9\x89",
+ "\xF6\xC5" => "\xE7\xB7\x87",
+ "\xF6\xC6" => "\xE7\xB7\xBB",
+ "\xF6\xC7" => "\xE7\xBD\xAE",
+ "\xF6\xC8" => "\xE8\x87\xB4",
+ "\xF6\xC9" => "\xE8\x9A\xA9",
+ "\xF6\xCA" => "\xE8\xBC\x9C",
+ "\xF6\xCB" => "\xE9\x9B\x89",
+ "\xF6\xCC" => "\xE9\xA6\xB3",
+ "\xF6\xCD" => "\xE9\xBD\x92",
+ "\xF6\xCE" => "\xE5\x89\x87",
+ "\xF6\xCF" => "\xE5\x8B\x85",
+ "\xF6\xD0" => "\xE9\xA3\xAD",
+ "\xF6\xD1" => "\xE8\xA6\xAA",
+ "\xF6\xD2" => "\xE4\xB8\x83",
+ "\xF6\xD3" => "\xE6\x9F\x92",
+ "\xF6\xD4" => "\xE6\xBC\x86",
+ "\xF6\xD5" => "\xE4\xBE\xB5",
+ "\xF6\xD6" => "\xE5\xAF\xA2",
+ "\xF6\xD7" => "\xE6\x9E\x95",
+ "\xF6\xD8" => "\xE6\xB2\x88",
+ "\xF6\xD9" => "\xE6\xB5\xB8",
+ "\xF6\xDA" => "\xE7\x90\x9B",
+ "\xF6\xDB" => "\xE7\xA0\xA7",
+ "\xF6\xDC" => "\xE9\x87\x9D",
+ "\xF6\xDD" => "\xE9\x8D\xBC",
+ "\xF6\xDE" => "\xE8\x9F\x84",
+ "\xF6\xDF" => "\xE7\xA7\xA4",
+ "\xF6\xE0" => "\xE7\xA8\xB1",
+ "\xF6\xE1" => "\xE5\xBF\xAB",
+ "\xF6\xE2" => "\xE4\xBB\x96",
+ "\xF6\xE3" => "\xE5\x92\xA4",
+ "\xF6\xE4" => "\xE5\x94\xBE",
+ "\xF6\xE5" => "\xE5\xA2\xAE",
+ "\xF6\xE6" => "\xE5\xA6\xA5",
+ "\xF6\xE7" => "\xE6\x83\xB0",
+ "\xF6\xE8" => "\xE6\x89\x93",
+ "\xF6\xE9" => "\xE6\x8B\x96",
+ "\xF6\xEA" => "\xE6\x9C\xB6",
+ "\xF6\xEB" => "\xE6\xA5\x95",
+ "\xF6\xEC" => "\xE8\x88\xB5",
+ "\xF6\xED" => "\xE9\x99\x80",
+ "\xF6\xEE" => "\xE9\xA6\xB1",
+ "\xF6\xEF" => "\xE9\xA7\x9D",
+ "\xF6\xF0" => "\xE5\x80\xAC",
+ "\xF6\xF1" => "\xE5\x8D\x93",
+ "\xF6\xF2" => "\xE5\x95\x84",
+ "\xF6\xF3" => "\xE5\x9D\xBC",
+ "\xF6\xF4" => "\xEF\xA8\x81",
+ "\xF6\xF5" => "\xE6\x89\x98",
+ "\xF6\xF6" => "\xEF\xA8\x82",
+ "\xF6\xF7" => "\xE6\x93\xA2",
+ "\xF6\xF8" => "\xE6\x99\xAB",
+ "\xF6\xF9" => "\xE6\x9F\x9D",
+ "\xF6\xFA" => "\xE6\xBF\x81",
+ "\xF6\xFB" => "\xE6\xBF\xAF",
+ "\xF6\xFC" => "\xE7\x90\xA2",
+ "\xF6\xFD" => "\xE7\x90\xB8",
+ "\xF6\xFE" => "\xE8\xA8\x97",
+ "\xF7\xA1" => "\xE9\x90\xB8",
+ "\xF7\xA2" => "\xE5\x91\x91",
+ "\xF7\xA3" => "\xE5\x98\x86",
+ "\xF7\xA4" => "\xE5\x9D\xA6",
+ "\xF7\xA5" => "\xE5\xBD\x88",
+ "\xF7\xA6" => "\xE6\x86\x9A",
+ "\xF7\xA7" => "\xE6\xAD\x8E",
+ "\xF7\xA8" => "\xE7\x81\x98",
+ "\xF7\xA9" => "\xE7\x82\xAD",
+ "\xF7\xAA" => "\xE7\xB6\xBB",
+ "\xF7\xAB" => "\xE8\xAA\x95",
+ "\xF7\xAC" => "\xE5\xA5\xAA",
+ "\xF7\xAD" => "\xE8\x84\xAB",
+ "\xF7\xAE" => "\xE6\x8E\xA2",
+ "\xF7\xAF" => "\xE7\x9C\x88",
+ "\xF7\xB0" => "\xE8\x80\xBD",
+ "\xF7\xB1" => "\xE8\xB2\xAA",
+ "\xF7\xB2" => "\xE5\xA1\x94",
+ "\xF7\xB3" => "\xE6\x90\xAD",
+ "\xF7\xB4" => "\xE6\xA6\xBB",
+ "\xF7\xB5" => "\xE5\xAE\x95",
+ "\xF7\xB6" => "\xE5\xB8\x91",
+ "\xF7\xB7" => "\xE6\xB9\xAF",
+ "\xF7\xB8" => "\xEF\xA8\x83",
+ "\xF7\xB9" => "\xE8\x95\xA9",
+ "\xF7\xBA" => "\xE5\x85\x8C",
+ "\xF7\xBB" => "\xE5\x8F\xB0",
+ "\xF7\xBC" => "\xE5\xA4\xAA",
+ "\xF7\xBD" => "\xE6\x80\xA0",
+ "\xF7\xBE" => "\xE6\x85\x8B",
+ "\xF7\xBF" => "\xE6\xAE\x86",
+ "\xF7\xC0" => "\xE6\xB1\xB0",
+ "\xF7\xC1" => "\xE6\xB3\xB0",
+ "\xF7\xC2" => "\xE7\xAC\x9E",
+ "\xF7\xC3" => "\xE8\x83\x8E",
+ "\xF7\xC4" => "\xE8\x8B\x94",
+ "\xF7\xC5" => "\xE8\xB7\x86",
+ "\xF7\xC6" => "\xE9\x82\xB0",
+ "\xF7\xC7" => "\xE9\xA2\xB1",
+ "\xF7\xC8" => "\xEF\xA8\x84",
+ "\xF7\xC9" => "\xE6\x93\x87",
+ "\xF7\xCA" => "\xE6\xBE\xA4",
+ "\xF7\xCB" => "\xE6\x92\x91",
+ "\xF7\xCC" => "\xE6\x94\x84",
+ "\xF7\xCD" => "\xE5\x85\x8E",
+ "\xF7\xCE" => "\xE5\x90\x90",
+ "\xF7\xCF" => "\xE5\x9C\x9F",
+ "\xF7\xD0" => "\xE8\xA8\x8E",
+ "\xF7\xD1" => "\xE6\x85\x9F",
+ "\xF7\xD2" => "\xE6\xA1\xB6",
+ "\xF7\xD3" => "\xEF\xA8\x85",
+ "\xF7\xD4" => "\xE7\x97\x9B",
+ "\xF7\xD5" => "\xE7\xAD\x92",
+ "\xF7\xD6" => "\xE7\xB5\xB1",
+ "\xF7\xD7" => "\xE9\x80\x9A",
+ "\xF7\xD8" => "\xE5\xA0\x86",
+ "\xF7\xD9" => "\xE6\xA7\x8C",
+ "\xF7\xDA" => "\xE8\x85\xBF",
+ "\xF7\xDB" => "\xE8\xA4\xAA",
+ "\xF7\xDC" => "\xE9\x80\x80",
+ "\xF7\xDD" => "\xE9\xA0\xB9",
+ "\xF7\xDE" => "\xE5\x81\xB8",
+ "\xF7\xDF" => "\xE5\xA5\x97",
+ "\xF7\xE0" => "\xE5\xA6\xAC",
+ "\xF7\xE1" => "\xE6\x8A\x95",
+ "\xF7\xE2" => "\xE9\x80\x8F",
+ "\xF7\xE3" => "\xE9\xAC\xAA",
+ "\xF7\xE4" => "\xE6\x85\x9D",
+ "\xF7\xE5" => "\xE7\x89\xB9",
+ "\xF7\xE6" => "\xE9\x97\x96",
+ "\xF7\xE7" => "\xE5\x9D\xA1",
+ "\xF7\xE8" => "\xE5\xA9\x86",
+ "\xF7\xE9" => "\xE5\xB7\xB4",
+ "\xF7\xEA" => "\xE6\x8A\x8A",
+ "\xF7\xEB" => "\xE6\x92\xAD",
+ "\xF7\xEC" => "\xE6\x93\xBA",
+ "\xF7\xED" => "\xE6\x9D\xB7",
+ "\xF7\xEE" => "\xE6\xB3\xA2",
+ "\xF7\xEF" => "\xE6\xB4\xBE",
+ "\xF7\xF0" => "\xE7\x88\xAC",
+ "\xF7\xF1" => "\xE7\x90\xB6",
+ "\xF7\xF2" => "\xE7\xA0\xB4",
+ "\xF7\xF3" => "\xE7\xBD\xB7",
+ "\xF7\xF4" => "\xE8\x8A\xAD",
+ "\xF7\xF5" => "\xE8\xB7\x9B",
+ "\xF7\xF6" => "\xE9\xA0\x97",
+ "\xF7\xF7" => "\xE5\x88\xA4",
+ "\xF7\xF8" => "\xE5\x9D\x82",
+ "\xF7\xF9" => "\xE6\x9D\xBF",
+ "\xF7\xFA" => "\xE7\x89\x88",
+ "\xF7\xFB" => "\xE7\x93\xA3",
+ "\xF7\xFC" => "\xE8\xB2\xA9",
+ "\xF7\xFD" => "\xE8\xBE\xA6",
+ "\xF7\xFE" => "\xE9\x88\x91",
+ "\xF8\xA1" => "\xE9\x98\xAA",
+ "\xF8\xA2" => "\xE5\x85\xAB",
+ "\xF8\xA3" => "\xE5\x8F\xAD",
+ "\xF8\xA4" => "\xE6\x8D\x8C",
+ "\xF8\xA5" => "\xE4\xBD\xA9",
+ "\xF8\xA6" => "\xE5\x94\x84",
+ "\xF8\xA7" => "\xE6\x82\x96",
+ "\xF8\xA8" => "\xE6\x95\x97",
+ "\xF8\xA9" => "\xE6\xB2\x9B",
+ "\xF8\xAA" => "\xE6\xB5\xBF",
+ "\xF8\xAB" => "\xE7\x89\x8C",
+ "\xF8\xAC" => "\xE7\x8B\xBD",
+ "\xF8\xAD" => "\xE7\xA8\x97",
+ "\xF8\xAE" => "\xE8\xA6\x87",
+ "\xF8\xAF" => "\xE8\xB2\x9D",
+ "\xF8\xB0" => "\xE5\xBD\xAD",
+ "\xF8\xB1" => "\xE6\xBE\x8E",
+ "\xF8\xB2" => "\xE7\x83\xB9",
+ "\xF8\xB3" => "\xE8\x86\xA8",
+ "\xF8\xB4" => "\xE6\x84\x8E",
+ "\xF8\xB5" => "\xE4\xBE\xBF",
+ "\xF8\xB6" => "\xE5\x81\x8F",
+ "\xF8\xB7" => "\xE6\x89\x81",
+ "\xF8\xB8" => "\xE7\x89\x87",
+ "\xF8\xB9" => "\xE7\xAF\x87",
+ "\xF8\xBA" => "\xE7\xB7\xA8",
+ "\xF8\xBB" => "\xE7\xBF\xA9",
+ "\xF8\xBC" => "\xE9\x81\x8D",
+ "\xF8\xBD" => "\xE9\x9E\xAD",
+ "\xF8\xBE" => "\xE9\xA8\x99",
+ "\xF8\xBF" => "\xE8\xB2\xB6",
+ "\xF8\xC0" => "\xE5\x9D\xAA",
+ "\xF8\xC1" => "\xE5\xB9\xB3",
+ "\xF8\xC2" => "\xE6\x9E\xB0",
+ "\xF8\xC3" => "\xE8\x90\x8D",
+ "\xF8\xC4" => "\xE8\xA9\x95",
+ "\xF8\xC5" => "\xE5\x90\xA0",
+ "\xF8\xC6" => "\xE5\xAC\x96",
+ "\xF8\xC7" => "\xE5\xB9\xA3",
+ "\xF8\xC8" => "\xE5\xBB\xA2",
+ "\xF8\xC9" => "\xE5\xBC\x8A",
+ "\xF8\xCA" => "\xE6\x96\x83",
+ "\xF8\xCB" => "\xE8\x82\xBA",
+ "\xF8\xCC" => "\xE8\x94\xBD",
+ "\xF8\xCD" => "\xE9\x96\x89",
+ "\xF8\xCE" => "\xE9\x99\x9B",
+ "\xF8\xCF" => "\xE4\xBD\x88",
+ "\xF8\xD0" => "\xE5\x8C\x85",
+ "\xF8\xD1" => "\xE5\x8C\x8D",
+ "\xF8\xD2" => "\xE5\x8C\x8F",
+ "\xF8\xD3" => "\xE5\x92\x86",
+ "\xF8\xD4" => "\xE5\x93\xBA",
+ "\xF8\xD5" => "\xE5\x9C\x83",
+ "\xF8\xD6" => "\xE5\xB8\x83",
+ "\xF8\xD7" => "\xE6\x80\x96",
+ "\xF8\xD8" => "\xE6\x8A\x9B",
+ "\xF8\xD9" => "\xE6\x8A\xB1",
+ "\xF8\xDA" => "\xE6\x8D\x95",
+ "\xF8\xDB" => "\xEF\xA8\x86",
+ "\xF8\xDC" => "\xE6\xB3\xA1",
+ "\xF8\xDD" => "\xE6\xB5\xA6",
+ "\xF8\xDE" => "\xE7\x96\xB1",
+ "\xF8\xDF" => "\xE7\xA0\xB2",
+ "\xF8\xE0" => "\xE8\x83\x9E",
+ "\xF8\xE1" => "\xE8\x84\xAF",
+ "\xF8\xE2" => "\xE8\x8B\x9E",
+ "\xF8\xE3" => "\xE8\x91\xA1",
+ "\xF8\xE4" => "\xE8\x92\xB2",
+ "\xF8\xE5" => "\xE8\xA2\x8D",
+ "\xF8\xE6" => "\xE8\xA4\x92",
+ "\xF8\xE7" => "\xE9\x80\x8B",
+ "\xF8\xE8" => "\xE9\x8B\xAA",
+ "\xF8\xE9" => "\xE9\xA3\xBD",
+ "\xF8\xEA" => "\xE9\xAE\x91",
+ "\xF8\xEB" => "\xE5\xB9\x85",
+ "\xF8\xEC" => "\xE6\x9A\xB4",
+ "\xF8\xED" => "\xE6\x9B\x9D",
+ "\xF8\xEE" => "\xE7\x80\x91",
+ "\xF8\xEF" => "\xE7\x88\x86",
+ "\xF8\xF0" => "\xEF\xA8\x87",
+ "\xF8\xF1" => "\xE4\xBF\xB5",
+ "\xF8\xF2" => "\xE5\x89\xBD",
+ "\xF8\xF3" => "\xE5\xBD\xAA",
+ "\xF8\xF4" => "\xE6\x85\x93",
+ "\xF8\xF5" => "\xE6\x9D\x93",
+ "\xF8\xF6" => "\xE6\xA8\x99",
+ "\xF8\xF7" => "\xE6\xBC\x82",
+ "\xF8\xF8" => "\xE7\x93\xA2",
+ "\xF8\xF9" => "\xE7\xA5\xA8",
+ "\xF8\xFA" => "\xE8\xA1\xA8",
+ "\xF8\xFB" => "\xE8\xB1\xB9",
+ "\xF8\xFC" => "\xE9\xA3\x87",
+ "\xF8\xFD" => "\xE9\xA3\x84",
+ "\xF8\xFE" => "\xE9\xA9\x83",
+ "\xF9\xA1" => "\xE5\x93\x81",
+ "\xF9\xA2" => "\xE7\xA8\x9F",
+ "\xF9\xA3" => "\xE6\xA5\x93",
+ "\xF9\xA4" => "\xE8\xAB\xB7",
+ "\xF9\xA5" => "\xE8\xB1\x8A",
+ "\xF9\xA6" => "\xE9\xA2\xA8",
+ "\xF9\xA7" => "\xE9\xA6\xAE",
+ "\xF9\xA8" => "\xE5\xBD\xBC",
+ "\xF9\xA9" => "\xE6\x8A\xAB",
+ "\xF9\xAA" => "\xE7\x96\xB2",
+ "\xF9\xAB" => "\xE7\x9A\xAE",
+ "\xF9\xAC" => "\xE8\xA2\xAB",
+ "\xF9\xAD" => "\xE9\x81\xBF",
+ "\xF9\xAE" => "\xE9\x99\x82",
+ "\xF9\xAF" => "\xE5\x8C\xB9",
+ "\xF9\xB0" => "\xE5\xBC\xBC",
+ "\xF9\xB1" => "\xE5\xBF\x85",
+ "\xF9\xB2" => "\xE6\xB3\x8C",
+ "\xF9\xB3" => "\xE7\x8F\x8C",
+ "\xF9\xB4" => "\xE7\x95\xA2",
+ "\xF9\xB5" => "\xE7\x96\x8B",
+ "\xF9\xB6" => "\xE7\xAD\x86",
+ "\xF9\xB7" => "\xE8\x8B\xBE",
+ "\xF9\xB8" => "\xE9\xA6\x9D",
+ "\xF9\xB9" => "\xE4\xB9\x8F",
+ "\xF9\xBA" => "\xE9\x80\xBC",
+ "\xF9\xBB" => "\xE4\xB8\x8B",
+ "\xF9\xBC" => "\xE4\xBD\x95",
+ "\xF9\xBD" => "\xE5\x8E\xA6",
+ "\xF9\xBE" => "\xE5\xA4\x8F",
+ "\xF9\xBF" => "\xE5\xBB\x88",
+ "\xF9\xC0" => "\xE6\x98\xB0",
+ "\xF9\xC1" => "\xE6\xB2\xB3",
+ "\xF9\xC2" => "\xE7\x91\x95",
+ "\xF9\xC3" => "\xE8\x8D\xB7",
+ "\xF9\xC4" => "\xE8\x9D\xA6",
+ "\xF9\xC5" => "\xE8\xB3\x80",
+ "\xF9\xC6" => "\xE9\x81\x90",
+ "\xF9\xC7" => "\xE9\x9C\x9E",
+ "\xF9\xC8" => "\xE9\xB0\x95",
+ "\xF9\xC9" => "\xE5\xA3\x91",
+ "\xF9\xCA" => "\xE5\xAD\xB8",
+ "\xF9\xCB" => "\xE8\x99\x90",
+ "\xF9\xCC" => "\xE8\xAC\x94",
+ "\xF9\xCD" => "\xE9\xB6\xB4",
+ "\xF9\xCE" => "\xE5\xAF\x92",
+ "\xF9\xCF" => "\xE6\x81\xA8",
+ "\xF9\xD0" => "\xE6\x82\x8D",
+ "\xF9\xD1" => "\xE6\x97\xB1",
+ "\xF9\xD2" => "\xE6\xB1\x97",
+ "\xF9\xD3" => "\xE6\xBC\xA2",
+ "\xF9\xD4" => "\xE6\xBE\xA3",
+ "\xF9\xD5" => "\xE7\x80\x9A",
+ "\xF9\xD6" => "\xE7\xBD\x95",
+ "\xF9\xD7" => "\xE7\xBF\xB0",
+ "\xF9\xD8" => "\xE9\x96\x91",
+ "\xF9\xD9" => "\xE9\x96\x92",
+ "\xF9\xDA" => "\xE9\x99\x90",
+ "\xF9\xDB" => "\xE9\x9F\x93",
+ "\xF9\xDC" => "\xE5\x89\xB2",
+ "\xF9\xDD" => "\xE8\xBD\x84",
+ "\xF9\xDE" => "\xE5\x87\xBD",
+ "\xF9\xDF" => "\xE5\x90\xAB",
+ "\xF9\xE0" => "\xE5\x92\xB8",
+ "\xF9\xE1" => "\xE5\x95\xA3",
+ "\xF9\xE2" => "\xE5\x96\x8A",
+ "\xF9\xE3" => "\xE6\xAA\xBB",
+ "\xF9\xE4" => "\xE6\xB6\xB5",
+ "\xF9\xE5" => "\xE7\xB7\x98",
+ "\xF9\xE6" => "\xE8\x89\xA6",
+ "\xF9\xE7" => "\xE9\x8A\x9C",
+ "\xF9\xE8" => "\xE9\x99\xB7",
+ "\xF9\xE9" => "\xE9\xB9\xB9",
+ "\xF9\xEA" => "\xE5\x90\x88",
+ "\xF9\xEB" => "\xE5\x93\x88",
+ "\xF9\xEC" => "\xE7\x9B\x92",
+ "\xF9\xED" => "\xE8\x9B\xA4",
+ "\xF9\xEE" => "\xE9\x96\xA4",
+ "\xF9\xEF" => "\xE9\x97\x94",
+ "\xF9\xF0" => "\xE9\x99\x9C",
+ "\xF9\xF1" => "\xE4\xBA\xA2",
+ "\xF9\xF2" => "\xE4\xBC\x89",
+ "\xF9\xF3" => "\xE5\xA7\xAE",
+ "\xF9\xF4" => "\xE5\xAB\xA6",
+ "\xF9\xF5" => "\xE5\xB7\xB7",
+ "\xF9\xF6" => "\xE6\x81\x92",
+ "\xF9\xF7" => "\xE6\x8A\x97",
+ "\xF9\xF8" => "\xE6\x9D\xAD",
+ "\xF9\xF9" => "\xE6\xA1\x81",
+ "\xF9\xFA" => "\xE6\xB2\x86",
+ "\xF9\xFB" => "\xE6\xB8\xAF",
+ "\xF9\xFC" => "\xE7\xBC\xB8",
+ "\xF9\xFD" => "\xE8\x82\x9B",
+ "\xF9\xFE" => "\xE8\x88\xAA",
+ "\xFA\xA1" => "\xEF\xA8\x88",
+ "\xFA\xA2" => "\xEF\xA8\x89",
+ "\xFA\xA3" => "\xE9\xA0\x85",
+ "\xFA\xA4" => "\xE4\xBA\xA5",
+ "\xFA\xA5" => "\xE5\x81\x95",
+ "\xFA\xA6" => "\xE5\x92\xB3",
+ "\xFA\xA7" => "\xE5\x9E\x93",
+ "\xFA\xA8" => "\xE5\xA5\x9A",
+ "\xFA\xA9" => "\xE5\xAD\xA9",
+ "\xFA\xAA" => "\xE5\xAE\xB3",
+ "\xFA\xAB" => "\xE6\x87\x88",
+ "\xFA\xAC" => "\xE6\xA5\xB7",
+ "\xFA\xAD" => "\xE6\xB5\xB7",
+ "\xFA\xAE" => "\xE7\x80\xA3",
+ "\xFA\xAF" => "\xE8\x9F\xB9",
+ "\xFA\xB0" => "\xE8\xA7\xA3",
+ "\xFA\xB1" => "\xE8\xA9\xB2",
+ "\xFA\xB2" => "\xE8\xAB\xA7",
+ "\xFA\xB3" => "\xE9\x82\x82",
+ "\xFA\xB4" => "\xE9\xA7\xAD",
+ "\xFA\xB5" => "\xE9\xAA\xB8",
+ "\xFA\xB6" => "\xE5\x8A\xBE",
+ "\xFA\xB7" => "\xE6\xA0\xB8",
+ "\xFA\xB8" => "\xE5\x80\x96",
+ "\xFA\xB9" => "\xE5\xB9\xB8",
+ "\xFA\xBA" => "\xE6\x9D\x8F",
+ "\xFA\xBB" => "\xE8\x8D\x87",
+ "\xFA\xBC" => "\xE8\xA1\x8C",
+ "\xFA\xBD" => "\xE4\xBA\xAB",
+ "\xFA\xBE" => "\xE5\x90\x91",
+ "\xFA\xBF" => "\xE5\x9A\xAE",
+ "\xFA\xC0" => "\xE7\x8F\xA6",
+ "\xFA\xC1" => "\xE9\x84\x95",
+ "\xFA\xC2" => "\xE9\x9F\xBF",
+ "\xFA\xC3" => "\xE9\xA4\x89",
+ "\xFA\xC4" => "\xE9\xA5\x97",
+ "\xFA\xC5" => "\xE9\xA6\x99",
+ "\xFA\xC6" => "\xE5\x99\x93",
+ "\xFA\xC7" => "\xE5\xA2\x9F",
+ "\xFA\xC8" => "\xE8\x99\x9B",
+ "\xFA\xC9" => "\xE8\xA8\xB1",
+ "\xFA\xCA" => "\xE6\x86\xB2",
+ "\xFA\xCB" => "\xE6\xAB\xB6",
+ "\xFA\xCC" => "\xE7\x8D\xBB",
+ "\xFA\xCD" => "\xE8\xBB\x92",
+ "\xFA\xCE" => "\xE6\xAD\x87",
+ "\xFA\xCF" => "\xE9\x9A\xAA",
+ "\xFA\xD0" => "\xE9\xA9\x97",
+ "\xFA\xD1" => "\xE5\xA5\x95",
+ "\xFA\xD2" => "\xE7\x88\x80",
+ "\xFA\xD3" => "\xE8\xB5\xAB",
+ "\xFA\xD4" => "\xE9\x9D\xA9",
+ "\xFA\xD5" => "\xE4\xBF\x94",
+ "\xFA\xD6" => "\xE5\xB3\xB4",
+ "\xFA\xD7" => "\xE5\xBC\xA6",
+ "\xFA\xD8" => "\xE6\x87\xB8",
+ "\xFA\xD9" => "\xE6\x99\x9B",
+ "\xFA\xDA" => "\xE6\xB3\xAB",
+ "\xFA\xDB" => "\xE7\x82\xAB",
+ "\xFA\xDC" => "\xE7\x8E\x84",
+ "\xFA\xDD" => "\xE7\x8E\xB9",
+ "\xFA\xDE" => "\xE7\x8F\xBE",
+ "\xFA\xDF" => "\xE7\x9C\xA9",
+ "\xFA\xE0" => "\xE7\x9D\x8D",
+ "\xFA\xE1" => "\xE7\xB5\x83",
+ "\xFA\xE2" => "\xE7\xB5\xA2",
+ "\xFA\xE3" => "\xE7\xB8\xA3",
+ "\xFA\xE4" => "\xE8\x88\xB7",
+ "\xFA\xE5" => "\xE8\xA1\x92",
+ "\xFA\xE6" => "\xEF\xA8\x8A",
+ "\xFA\xE7" => "\xE8\xB3\xA2",
+ "\xFA\xE8" => "\xE9\x89\x89",
+ "\xFA\xE9" => "\xE9\xA1\xAF",
+ "\xFA\xEA" => "\xE5\xAD\x91",
+ "\xFA\xEB" => "\xE7\xA9\xB4",
+ "\xFA\xEC" => "\xE8\xA1\x80",
+ "\xFA\xED" => "\xE9\xA0\x81",
+ "\xFA\xEE" => "\xE5\xAB\x8C",
+ "\xFA\xEF" => "\xE4\xBF\xA0",
+ "\xFA\xF0" => "\xE5\x8D\x94",
+ "\xFA\xF1" => "\xE5\xA4\xBE",
+ "\xFA\xF2" => "\xE5\xB3\xBD",
+ "\xFA\xF3" => "\xE6\x8C\xBE",
+ "\xFA\xF4" => "\xE6\xB5\xB9",
+ "\xFA\xF5" => "\xE7\x8B\xB9",
+ "\xFA\xF6" => "\xE8\x84\x85",
+ "\xFA\xF7" => "\xE8\x84\x87",
+ "\xFA\xF8" => "\xE8\x8E\xA2",
+ "\xFA\xF9" => "\xE9\x8B\x8F",
+ "\xFA\xFA" => "\xE9\xA0\xB0",
+ "\xFA\xFB" => "\xE4\xBA\xA8",
+ "\xFA\xFC" => "\xE5\x85\x84",
+ "\xFA\xFD" => "\xE5\x88\x91",
+ "\xFA\xFE" => "\xE5\x9E\x8B",
+ "\xFB\xA1" => "\xE5\xBD\xA2",
+ "\xFB\xA2" => "\xE6\xB3\x82",
+ "\xFB\xA3" => "\xE6\xBB\x8E",
+ "\xFB\xA4" => "\xE7\x80\x85",
+ "\xFB\xA5" => "\xE7\x81\x90",
+ "\xFB\xA6" => "\xE7\x82\xAF",
+ "\xFB\xA7" => "\xE7\x86\x92",
+ "\xFB\xA8" => "\xE7\x8F\xA9",
+ "\xFB\xA9" => "\xE7\x91\xA9",
+ "\xFB\xAA" => "\xE8\x8D\x8A",
+ "\xFB\xAB" => "\xE8\x9E\xA2",
+ "\xFB\xAC" => "\xE8\xA1\xA1",
+ "\xFB\xAD" => "\xE9\x80\x88",
+ "\xFB\xAE" => "\xE9\x82\xA2",
+ "\xFB\xAF" => "\xE9\x8E\xA3",
+ "\xFB\xB0" => "\xE9\xA6\xA8",
+ "\xFB\xB1" => "\xE5\x85\xAE",
+ "\xFB\xB2" => "\xE5\xBD\x97",
+ "\xFB\xB3" => "\xE6\x83\xA0",
+ "\xFB\xB4" => "\xE6\x85\xA7",
+ "\xFB\xB5" => "\xE6\x9A\xB3",
+ "\xFB\xB6" => "\xE8\x95\x99",
+ "\xFB\xB7" => "\xE8\xB9\x8A",
+ "\xFB\xB8" => "\xE9\x86\xAF",
+ "\xFB\xB9" => "\xE9\x9E\x8B",
+ "\xFB\xBA" => "\xE4\xB9\x8E",
+ "\xFB\xBB" => "\xE4\xBA\x92",
+ "\xFB\xBC" => "\xE5\x91\xBC",
+ "\xFB\xBD" => "\xE5\xA3\x95",
+ "\xFB\xBE" => "\xE5\xA3\xBA",
+ "\xFB\xBF" => "\xE5\xA5\xBD",
+ "\xFB\xC0" => "\xE5\xB2\xB5",
+ "\xFB\xC1" => "\xE5\xBC\xA7",
+ "\xFB\xC2" => "\xE6\x88\xB6",
+ "\xFB\xC3" => "\xE6\x89\x88",
+ "\xFB\xC4" => "\xE6\x98\x8A",
+ "\xFB\xC5" => "\xE6\x99\xA7",
+ "\xFB\xC6" => "\xE6\xAF\xAB",
+ "\xFB\xC7" => "\xE6\xB5\xA9",
+ "\xFB\xC8" => "\xE6\xB7\x8F",
+ "\xFB\xC9" => "\xE6\xB9\x96",
+ "\xFB\xCA" => "\xE6\xBB\xB8",
+ "\xFB\xCB" => "\xE6\xBE\x94",
+ "\xFB\xCC" => "\xE6\xBF\xA0",
+ "\xFB\xCD" => "\xE6\xBF\xA9",
+ "\xFB\xCE" => "\xE7\x81\x9D",
+ "\xFB\xCF" => "\xE7\x8B\x90",
+ "\xFB\xD0" => "\xE7\x90\xA5",
+ "\xFB\xD1" => "\xE7\x91\x9A",
+ "\xFB\xD2" => "\xE7\x93\xA0",
+ "\xFB\xD3" => "\xE7\x9A\x93",
+ "\xFB\xD4" => "\xE7\xA5\x9C",
+ "\xFB\xD5" => "\xE7\xB3\x8A",
+ "\xFB\xD6" => "\xE7\xB8\x9E",
+ "\xFB\xD7" => "\xE8\x83\xA1",
+ "\xFB\xD8" => "\xE8\x8A\xA6",
+ "\xFB\xD9" => "\xE8\x91\xAB",
+ "\xFB\xDA" => "\xE8\x92\xBF",
+ "\xFB\xDB" => "\xE8\x99\x8E",
+ "\xFB\xDC" => "\xE8\x99\x9F",
+ "\xFB\xDD" => "\xE8\x9D\xB4",
+ "\xFB\xDE" => "\xE8\xAD\xB7",
+ "\xFB\xDF" => "\xE8\xB1\xAA",
+ "\xFB\xE0" => "\xE9\x8E\xAC",
+ "\xFB\xE1" => "\xE9\xA0\x80",
+ "\xFB\xE2" => "\xE9\xA1\xA5",
+ "\xFB\xE3" => "\xE6\x83\x91",
+ "\xFB\xE4" => "\xE6\x88\x96",
+ "\xFB\xE5" => "\xE9\x85\xB7",
+ "\xFB\xE6" => "\xE5\xA9\x9A",
+ "\xFB\xE7" => "\xE6\x98\x8F",
+ "\xFB\xE8" => "\xE6\xB7\xB7",
+ "\xFB\xE9" => "\xE6\xB8\xBE",
+ "\xFB\xEA" => "\xE7\x90\xBF",
+ "\xFB\xEB" => "\xE9\xAD\x82",
+ "\xFB\xEC" => "\xE5\xBF\xBD",
+ "\xFB\xED" => "\xE6\x83\x9A",
+ "\xFB\xEE" => "\xE7\xAC\x8F",
+ "\xFB\xEF" => "\xE5\x93\x84",
+ "\xFB\xF0" => "\xE5\xBC\x98",
+ "\xFB\xF1" => "\xE6\xB1\x9E",
+ "\xFB\xF2" => "\xE6\xB3\x93",
+ "\xFB\xF3" => "\xE6\xB4\xAA",
+ "\xFB\xF4" => "\xE7\x83\x98",
+ "\xFB\xF5" => "\xE7\xB4\x85",
+ "\xFB\xF6" => "\xE8\x99\xB9",
+ "\xFB\xF7" => "\xE8\xA8\x8C",
+ "\xFB\xF8" => "\xE9\xB4\xBB",
+ "\xFB\xF9" => "\xE5\x8C\x96",
+ "\xFB\xFA" => "\xE5\x92\x8C",
+ "\xFB\xFB" => "\xE5\xAC\x85",
+ "\xFB\xFC" => "\xE6\xA8\xBA",
+ "\xFB\xFD" => "\xE7\x81\xAB",
+ "\xFB\xFE" => "\xE7\x95\xB5",
+ "\xFC\xA1" => "\xE7\xA6\x8D",
+ "\xFC\xA2" => "\xE7\xA6\xBE",
+ "\xFC\xA3" => "\xE8\x8A\xB1",
+ "\xFC\xA4" => "\xE8\x8F\xAF",
+ "\xFC\xA5" => "\xE8\xA9\xB1",
+ "\xFC\xA6" => "\xE8\xAD\x81",
+ "\xFC\xA7" => "\xE8\xB2\xA8",
+ "\xFC\xA8" => "\xE9\x9D\xB4",
+ "\xFC\xA9" => "\xEF\xA8\x8B",
+ "\xFC\xAA" => "\xE6\x93\xB4",
+ "\xFC\xAB" => "\xE6\x94\xAB",
+ "\xFC\xAC" => "\xE7\xA2\xBA",
+ "\xFC\xAD" => "\xE7\xA2\xBB",
+ "\xFC\xAE" => "\xE7\xA9\xAB",
+ "\xFC\xAF" => "\xE4\xB8\xB8",
+ "\xFC\xB0" => "\xE5\x96\x9A",
+ "\xFC\xB1" => "\xE5\xA5\x90",
+ "\xFC\xB2" => "\xE5\xAE\xA6",
+ "\xFC\xB3" => "\xE5\xB9\xBB",
+ "\xFC\xB4" => "\xE6\x82\xA3",
+ "\xFC\xB5" => "\xE6\x8F\x9B",
+ "\xFC\xB6" => "\xE6\xAD\xA1",
+ "\xFC\xB7" => "\xE6\x99\xA5",
+ "\xFC\xB8" => "\xE6\xA1\x93",
+ "\xFC\xB9" => "\xE6\xB8\x99",
+ "\xFC\xBA" => "\xE7\x85\xA5",
+ "\xFC\xBB" => "\xE7\x92\xB0",
+ "\xFC\xBC" => "\xE7\xB4\x88",
+ "\xFC\xBD" => "\xE9\x82\x84",
+ "\xFC\xBE" => "\xE9\xA9\xA9",
+ "\xFC\xBF" => "\xE9\xB0\xA5",
+ "\xFC\xC0" => "\xE6\xB4\xBB",
+ "\xFC\xC1" => "\xE6\xBB\x91",
+ "\xFC\xC2" => "\xE7\x8C\xBE",
+ "\xFC\xC3" => "\xE8\xB1\x81",
+ "\xFC\xC4" => "\xE9\x97\x8A",
+ "\xFC\xC5" => "\xE5\x87\xB0",
+ "\xFC\xC6" => "\xE5\xB9\x8C",
+ "\xFC\xC7" => "\xE5\xBE\xA8",
+ "\xFC\xC8" => "\xE6\x81\x8D",
+ "\xFC\xC9" => "\xE6\x83\xB6",
+ "\xFC\xCA" => "\xE6\x84\xB0",
+ "\xFC\xCB" => "\xE6\x85\x8C",
+ "\xFC\xCC" => "\xE6\x99\x83",
+ "\xFC\xCD" => "\xE6\x99\x84",
+ "\xFC\xCE" => "\xE6\xA6\xA5",
+ "\xFC\xCF" => "\xE6\xB3\x81",
+ "\xFC\xD0" => "\xE6\xB9\x9F",
+ "\xFC\xD1" => "\xE6\xBB\x89",
+ "\xFC\xD2" => "\xE6\xBD\xA2",
+ "\xFC\xD3" => "\xE7\x85\x8C",
+ "\xFC\xD4" => "\xE7\x92\x9C",
+ "\xFC\xD5" => "\xE7\x9A\x87",
+ "\xFC\xD6" => "\xE7\xAF\x81",
+ "\xFC\xD7" => "\xE7\xB0\xA7",
+ "\xFC\xD8" => "\xE8\x8D\x92",
+ "\xFC\xD9" => "\xE8\x9D\x97",
+ "\xFC\xDA" => "\xE9\x81\x91",
+ "\xFC\xDB" => "\xE9\x9A\x8D",
+ "\xFC\xDC" => "\xE9\xBB\x83",
+ "\xFC\xDD" => "\xE5\x8C\xAF",
+ "\xFC\xDE" => "\xE5\x9B\x9E",
+ "\xFC\xDF" => "\xE5\xBB\xBB",
+ "\xFC\xE0" => "\xE5\xBE\x8A",
+ "\xFC\xE1" => "\xE6\x81\xA2",
+ "\xFC\xE2" => "\xE6\x82\x94",
+ "\xFC\xE3" => "\xE6\x87\xB7",
+ "\xFC\xE4" => "\xE6\x99\xA6",
+ "\xFC\xE5" => "\xE6\x9C\x83",
+ "\xFC\xE6" => "\xE6\xAA\x9C",
+ "\xFC\xE7" => "\xE6\xB7\xAE",
+ "\xFC\xE8" => "\xE6\xBE\xAE",
+ "\xFC\xE9" => "\xE7\x81\xB0",
+ "\xFC\xEA" => "\xE7\x8D\xAA",
+ "\xFC\xEB" => "\xE7\xB9\xAA",
+ "\xFC\xEC" => "\xE8\x86\xBE",
+ "\xFC\xED" => "\xE8\x8C\xB4",
+ "\xFC\xEE" => "\xE8\x9B\x94",
+ "\xFC\xEF" => "\xE8\xAA\xA8",
+ "\xFC\xF0" => "\xE8\xB3\x84",
+ "\xFC\xF1" => "\xE5\x8A\x83",
+ "\xFC\xF2" => "\xE7\x8D\xB2",
+ "\xFC\xF3" => "\xE5\xAE\x96",
+ "\xFC\xF4" => "\xE6\xA9\xAB",
+ "\xFC\xF5" => "\xE9\x90\x84",
+ "\xFC\xF6" => "\xE5\x93\xAE",
+ "\xFC\xF7" => "\xE5\x9A\x86",
+ "\xFC\xF8" => "\xE5\xAD\x9D",
+ "\xFC\xF9" => "\xE6\x95\x88",
+ "\xFC\xFA" => "\xE6\x96\x85",
+ "\xFC\xFB" => "\xE6\x9B\x89",
+ "\xFC\xFC" => "\xE6\xA2\x9F",
+ "\xFC\xFD" => "\xE6\xB6\x8D",
+ "\xFC\xFE" => "\xE6\xB7\x86",
+ "\xFD\xA1" => "\xE7\x88\xBB",
+ "\xFD\xA2" => "\xE8\x82\xB4",
+ "\xFD\xA3" => "\xE9\x85\xB5",
+ "\xFD\xA4" => "\xE9\xA9\x8D",
+ "\xFD\xA5" => "\xE4\xBE\xAF",
+ "\xFD\xA6" => "\xE5\x80\x99",
+ "\xFD\xA7" => "\xE5\x8E\x9A",
+ "\xFD\xA8" => "\xE5\x90\x8E",
+ "\xFD\xA9" => "\xE5\x90\xBC",
+ "\xFD\xAA" => "\xE5\x96\x89",
+ "\xFD\xAB" => "\xE5\x97\x85",
+ "\xFD\xAC" => "\xE5\xB8\xBF",
+ "\xFD\xAD" => "\xE5\xBE\x8C",
+ "\xFD\xAE" => "\xE6\x9C\xBD",
+ "\xFD\xAF" => "\xE7\x85\xA6",
+ "\xFD\xB0" => "\xE7\x8F\x9D",
+ "\xFD\xB1" => "\xE9\x80\x85",
+ "\xFD\xB2" => "\xE5\x8B\x9B",
+ "\xFD\xB3" => "\xE5\x8B\xB3",
+ "\xFD\xB4" => "\xE5\xA1\xA4",
+ "\xFD\xB5" => "\xE5\xA3\x8E",
+ "\xFD\xB6" => "\xE7\x84\x84",
+ "\xFD\xB7" => "\xE7\x86\x8F",
+ "\xFD\xB8" => "\xE7\x87\xBB",
+ "\xFD\xB9" => "\xE8\x96\xB0",
+ "\xFD\xBA" => "\xE8\xA8\x93",
+ "\xFD\xBB" => "\xE6\x9A\x88",
+ "\xFD\xBC" => "\xE8\x96\xA8",
+ "\xFD\xBD" => "\xE5\x96\xA7",
+ "\xFD\xBE" => "\xE6\x9A\x84",
+ "\xFD\xBF" => "\xE7\x85\x8A",
+ "\xFD\xC0" => "\xE8\x90\xB1",
+ "\xFD\xC1" => "\xE5\x8D\x89",
+ "\xFD\xC2" => "\xE5\x96\x99",
+ "\xFD\xC3" => "\xE6\xAF\x81",
+ "\xFD\xC4" => "\xE5\xBD\x99",
+ "\xFD\xC5" => "\xE5\xBE\xBD",
+ "\xFD\xC6" => "\xE6\x8F\xAE",
+ "\xFD\xC7" => "\xE6\x9A\x89",
+ "\xFD\xC8" => "\xE7\x85\x87",
+ "\xFD\xC9" => "\xE8\xAB\xB1",
+ "\xFD\xCA" => "\xE8\xBC\x9D",
+ "\xFD\xCB" => "\xE9\xBA\xBE",
+ "\xFD\xCC" => "\xE4\xBC\x91",
+ "\xFD\xCD" => "\xE6\x90\xBA",
+ "\xFD\xCE" => "\xE7\x83\x8B",
+ "\xFD\xCF" => "\xE7\x95\xA6",
+ "\xFD\xD0" => "\xE8\x99\xA7",
+ "\xFD\xD1" => "\xE6\x81\xA4",
+ "\xFD\xD2" => "\xE8\xAD\x8E",
+ "\xFD\xD3" => "\xE9\xB7\xB8",
+ "\xFD\xD4" => "\xE5\x85\x87",
+ "\xFD\xD5" => "\xE5\x87\xB6",
+ "\xFD\xD6" => "\xE5\x8C\x88",
+ "\xFD\xD7" => "\xE6\xB4\xB6",
+ "\xFD\xD8" => "\xE8\x83\xB8",
+ "\xFD\xD9" => "\xE9\xBB\x91",
+ "\xFD\xDA" => "\xE6\x98\x95",
+ "\xFD\xDB" => "\xE6\xAC\xA3",
+ "\xFD\xDC" => "\xE7\x82\x98",
+ "\xFD\xDD" => "\xE7\x97\x95",
+ "\xFD\xDE" => "\xE5\x90\x83",
+ "\xFD\xDF" => "\xE5\xB1\xB9",
+ "\xFD\xE0" => "\xE7\xB4\x87",
+ "\xFD\xE1" => "\xE8\xA8\x96",
+ "\xFD\xE2" => "\xE6\xAC\xA0",
+ "\xFD\xE3" => "\xE6\xAC\xBD",
+ "\xFD\xE4" => "\xE6\xAD\x86",
+ "\xFD\xE5" => "\xE5\x90\xB8",
+ "\xFD\xE6" => "\xE6\x81\xB0",
+ "\xFD\xE7" => "\xE6\xB4\xBD",
+ "\xFD\xE8" => "\xE7\xBF\x95",
+ "\xFD\xE9" => "\xE8\x88\x88",
+ "\xFD\xEA" => "\xE5\x83\x96",
+ "\xFD\xEB" => "\xE5\x87\x9E",
+ "\xFD\xEC" => "\xE5\x96\x9C",
+ "\xFD\xED" => "\xE5\x99\xAB",
+ "\xFD\xEE" => "\xE5\x9B\x8D",
+ "\xFD\xEF" => "\xE5\xA7\xAC",
+ "\xFD\xF0" => "\xE5\xAC\x89",
+ "\xFD\xF1" => "\xE5\xB8\x8C",
+ "\xFD\xF2" => "\xE6\x86\x99",
+ "\xFD\xF3" => "\xE6\x86\x98",
+ "\xFD\xF4" => "\xE6\x88\xB1",
+ "\xFD\xF5" => "\xE6\x99\x9E",
+ "\xFD\xF6" => "\xE6\x9B\xA6",
+ "\xFD\xF7" => "\xE7\x86\x99",
+ "\xFD\xF8" => "\xE7\x86\xB9",
+ "\xFD\xF9" => "\xE7\x86\xBA",
+ "\xFD\xFA" => "\xE7\x8A\xA7",
+ "\xFD\xFB" => "\xE7\xA6\xA7",
+ "\xFD\xFC" => "\xE7\xA8\x80",
+ "\xFD\xFD" => "\xE7\xBE\xB2",
+ "\xFD\xFE" => "\xE8\xA9\xB0",
+ );
+ return strtr($string, $transform);
+}
+
+function big5($string)
+{
+ static $transform = array(
+ "\xA1\x40" => "\xE3\x80\x80",
+ "\xA1\x41" => "\xEF\xBC\x8C",
+ "\xA1\x42" => "\xE3\x80\x81",
+ "\xA1\x43" => "\xE3\x80\x82",
+ "\xA1\x44" => "\xEF\xBC\x8E",
+ "\xA1\x45" => "\xE2\x80\xA2",
+ "\xA1\x46" => "\xEF\xBC\x9B",
+ "\xA1\x47" => "\xEF\xBC\x9A",
+ "\xA1\x48" => "\xEF\xBC\x9F",
+ "\xA1\x49" => "\xEF\xBC\x81",
+ "\xA1\x4A" => "\xEF\xB8\xB0",
+ "\xA1\x4B" => "\xE2\x80\xA6",
+ "\xA1\x4C" => "\xE2\x80\xA5",
+ "\xA1\x4D" => "\xEF\xB9\x90",
+ "\xA1\x4E" => "\xEF\xBD\xA4",
+ "\xA1\x4F" => "\xEF\xB9\x92",
+ "\xA1\x50" => "\xC2\xB7",
+ "\xA1\x51" => "\xEF\xB9\x94",
+ "\xA1\x52" => "\xEF\xB9\x95",
+ "\xA1\x53" => "\xEF\xB9\x96",
+ "\xA1\x54" => "\xEF\xB9\x97",
+ "\xA1\x55" => "\xEF\xBD\x9C",
+ "\xA1\x56" => "\xE2\x80\x93",
+ "\xA1\x57" => "\xEF\xB8\xB1",
+ "\xA1\x58" => "\xE2\x80\x94",
+ "\xA1\x59" => "\xEF\xB8\xB3",
+ "\xA1\x5A" => "\xEF\xBF\xBD",
+ "\xA1\x5B" => "\xEF\xB8\xB4",
+ "\xA1\x5C" => "\xEF\xB9\x8F",
+ "\xA1\x5D" => "\xEF\xBC\x88",
+ "\xA1\x5E" => "\xEF\xBC\x89",
+ "\xA1\x5F" => "\xEF\xB8\xB5",
+ "\xA1\x60" => "\xEF\xB8\xB6",
+ "\xA1\x61" => "\xEF\xBD\x9B",
+ "\xA1\x62" => "\xEF\xBD\x9D",
+ "\xA1\x63" => "\xEF\xB8\xB7",
+ "\xA1\x64" => "\xEF\xB8\xB8",
+ "\xA1\x65" => "\xE3\x80\x94",
+ "\xA1\x66" => "\xE3\x80\x95",
+ "\xA1\x67" => "\xEF\xB8\xB9",
+ "\xA1\x68" => "\xEF\xB8\xBA",
+ "\xA1\x69" => "\xE3\x80\x90",
+ "\xA1\x6A" => "\xE3\x80\x91",
+ "\xA1\x6B" => "\xEF\xB8\xBB",
+ "\xA1\x6C" => "\xEF\xB8\xBC",
+ "\xA1\x6D" => "\xE3\x80\x8A",
+ "\xA1\x6E" => "\xE3\x80\x8B",
+ "\xA1\x6F" => "\xEF\xB8\xBD",
+ "\xA1\x70" => "\xEF\xB8\xBE",
+ "\xA1\x71" => "\xE3\x80\x88",
+ "\xA1\x72" => "\xE3\x80\x89",
+ "\xA1\x73" => "\xEF\xB8\xBF",
+ "\xA1\x74" => "\xEF\xB9\x80",
+ "\xA1\x75" => "\xE3\x80\x8C",
+ "\xA1\x76" => "\xE3\x80\x8D",
+ "\xA1\x77" => "\xEF\xB9\x81",
+ "\xA1\x78" => "\xEF\xB9\x82",
+ "\xA1\x79" => "\xE3\x80\x8E",
+ "\xA1\x7A" => "\xE3\x80\x8F",
+ "\xA1\x7B" => "\xEF\xB9\x83",
+ "\xA1\x7C" => "\xEF\xB9\x84",
+ "\xA1\x7D" => "\xEF\xB9\x99",
+ "\xA1\x7E" => "\xEF\xB9\x9A",
+ "\xA1\xA1" => "\xEF\xB9\x9B",
+ "\xA1\xA2" => "\xEF\xB9\x9C",
+ "\xA1\xA3" => "\xEF\xB9\x9D",
+ "\xA1\xA4" => "\xEF\xB9\x9E",
+ "\xA1\xA5" => "\xE2\x80\x98",
+ "\xA1\xA6" => "\xE2\x80\x99",
+ "\xA1\xA7" => "\xE2\x80\x9C",
+ "\xA1\xA8" => "\xE2\x80\x9D",
+ "\xA1\xA9" => "\xE3\x80\x9D",
+ "\xA1\xAA" => "\xE3\x80\x9E",
+ "\xA1\xAB" => "\xE2\x80\xB5",
+ "\xA1\xAC" => "\xE2\x80\xB2",
+ "\xA1\xAD" => "\xEF\xBC\x83",
+ "\xA1\xAE" => "\xEF\xBC\x86",
+ "\xA1\xAF" => "\xEF\xBC\x8A",
+ "\xA1\xB0" => "\xE2\x80\xBB",
+ "\xA1\xB1" => "\xC2\xA7",
+ "\xA1\xB2" => "\xE3\x80\x83",
+ "\xA1\xB3" => "\xE2\x97\x8B",
+ "\xA1\xB4" => "\xE2\x97\x8F",
+ "\xA1\xB5" => "\xE2\x96\xB3",
+ "\xA1\xB6" => "\xE2\x96\xB2",
+ "\xA1\xB7" => "\xE2\x97\x8E",
+ "\xA1\xB8" => "\xE2\x98\x86",
+ "\xA1\xB9" => "\xE2\x98\x85",
+ "\xA1\xBA" => "\xE2\x97\x87",
+ "\xA1\xBB" => "\xE2\x97\x86",
+ "\xA1\xBC" => "\xE2\x96\xA1",
+ "\xA1\xBD" => "\xE2\x96\xA0",
+ "\xA1\xBE" => "\xE2\x96\xBD",
+ "\xA1\xBF" => "\xE2\x96\xBC",
+ "\xA1\xC0" => "\xE3\x8A\xA3",
+ "\xA1\xC1" => "\xE2\x84\x85",
+ "\xA1\xC2" => "\xE2\x80\xBE",
+ "\xA1\xC3" => "\xEF\xBF\xBD",
+ "\xA1\xC4" => "\xEF\xBC\xBF",
+ "\xA1\xC5" => "\xEF\xBF\xBD",
+ "\xA1\xC6" => "\xEF\xB9\x89",
+ "\xA1\xC7" => "\xEF\xB9\x8A",
+ "\xA1\xC8" => "\xEF\xB9\x8D",
+ "\xA1\xC9" => "\xEF\xB9\x8E",
+ "\xA1\xCA" => "\xEF\xB9\x8B",
+ "\xA1\xCB" => "\xEF\xB9\x8C",
+ "\xA1\xCC" => "\xEF\xB9\x9F",
+ "\xA1\xCD" => "\xEF\xB9\xA0",
+ "\xA1\xCE" => "\xEF\xB9\xA1",
+ "\xA1\xCF" => "\xEF\xBC\x8B",
+ "\xA1\xD0" => "\xEF\xBC\x8D",
+ "\xA1\xD1" => "\xC3\x97",
+ "\xA1\xD2" => "\xC3\xB7",
+ "\xA1\xD3" => "\xC2\xB1",
+ "\xA1\xD4" => "\xE2\x88\x9A",
+ "\xA1\xD5" => "\xEF\xBC\x9C",
+ "\xA1\xD6" => "\xEF\xBC\x9E",
+ "\xA1\xD7" => "\xEF\xBC\x9D",
+ "\xA1\xD8" => "\xE2\x89\xA6",
+ "\xA1\xD9" => "\xE2\x89\xA7",
+ "\xA1\xDA" => "\xE2\x89\xA0",
+ "\xA1\xDB" => "\xE2\x88\x9E",
+ "\xA1\xDC" => "\xE2\x89\x92",
+ "\xA1\xDD" => "\xE2\x89\xA1",
+ "\xA1\xDE" => "\xEF\xB9\xA2",
+ "\xA1\xDF" => "\xEF\xB9\xA3",
+ "\xA1\xE0" => "\xEF\xB9\xA4",
+ "\xA1\xE1" => "\xEF\xB9\xA5",
+ "\xA1\xE2" => "\xEF\xB9\xA6",
+ "\xA1\xE3" => "\xE2\x88\xBC",
+ "\xA1\xE4" => "\xE2\x88\xA9",
+ "\xA1\xE5" => "\xE2\x88\xAA",
+ "\xA1\xE6" => "\xE2\x8A\xA5",
+ "\xA1\xE7" => "\xE2\x88\xA0",
+ "\xA1\xE8" => "\xE2\x88\x9F",
+ "\xA1\xE9" => "\xE2\x8A\xBF",
+ "\xA1\xEA" => "\xE3\x8F\x92",
+ "\xA1\xEB" => "\xE3\x8F\x91",
+ "\xA1\xEC" => "\xE2\x88\xAB",
+ "\xA1\xED" => "\xE2\x88\xAE",
+ "\xA1\xEE" => "\xE2\x88\xB5",
+ "\xA1\xEF" => "\xE2\x88\xB4",
+ "\xA1\xF0" => "\xE2\x99\x80",
+ "\xA1\xF1" => "\xE2\x99\x82",
+ "\xA1\xF2" => "\xE2\x99\x81",
+ "\xA1\xF3" => "\xE2\x98\x89",
+ "\xA1\xF4" => "\xE2\x86\x91",
+ "\xA1\xF5" => "\xE2\x86\x93",
+ "\xA1\xF6" => "\xE2\x86\x90",
+ "\xA1\xF7" => "\xE2\x86\x92",
+ "\xA1\xF8" => "\xE2\x86\x96",
+ "\xA1\xF9" => "\xE2\x86\x97",
+ "\xA1\xFA" => "\xE2\x86\x99",
+ "\xA1\xFB" => "\xE2\x86\x98",
+ "\xA1\xFC" => "\xE2\x88\xA5",
+ "\xA1\xFD" => "\xE2\x88\xA3",
+ "\xA1\xFE" => "\xEF\xBF\xBD",
+ "\xA2\x40" => "\xEF\xBF\xBD",
+ "\xA2\x41" => "\xEF\xBC\x8F",
+ "\xA2\x42" => "\xEF\xBC\xBC",
+ "\xA2\x43" => "\xEF\xBC\x84",
+ "\xA2\x44" => "\xC2\xA5",
+ "\xA2\x45" => "\xE3\x80\x92",
+ "\xA2\x46" => "\xC2\xA2",
+ "\xA2\x47" => "\xC2\xA3",
+ "\xA2\x48" => "\xEF\xBC\x85",
+ "\xA2\x49" => "\xEF\xBC\xA0",
+ "\xA2\x4A" => "\xE2\x84\x83",
+ "\xA2\x4B" => "\xE2\x84\x89",
+ "\xA2\x4C" => "\xEF\xB9\xA9",
+ "\xA2\x4D" => "\xEF\xB9\xAA",
+ "\xA2\x4E" => "\xEF\xB9\xAB",
+ "\xA2\x4F" => "\xE3\x8F\x95",
+ "\xA2\x50" => "\xE3\x8E\x9C",
+ "\xA2\x51" => "\xE3\x8E\x9D",
+ "\xA2\x52" => "\xE3\x8E\x9E",
+ "\xA2\x53" => "\xE3\x8F\x8E",
+ "\xA2\x54" => "\xE3\x8E\xA1",
+ "\xA2\x55" => "\xE3\x8E\x8E",
+ "\xA2\x56" => "\xE3\x8E\x8F",
+ "\xA2\x57" => "\xE3\x8F\x84",
+ "\xA2\x58" => "\xC2\xB0",
+ "\xA2\x59" => "\xE5\x85\x99",
+ "\xA2\x5A" => "\xE5\x85\x9B",
+ "\xA2\x5B" => "\xE5\x85\x9E",
+ "\xA2\x5C" => "\xE5\x85\x9D",
+ "\xA2\x5D" => "\xE5\x85\xA1",
+ "\xA2\x5E" => "\xE5\x85\xA3",
+ "\xA2\x5F" => "\xE5\x97\xA7",
+ "\xA2\x60" => "\xE7\x93\xA9",
+ "\xA2\x61" => "\xE7\xB3\x8E",
+ "\xA2\x62" => "\xE2\x96\x81",
+ "\xA2\x63" => "\xE2\x96\x82",
+ "\xA2\x64" => "\xE2\x96\x83",
+ "\xA2\x65" => "\xE2\x96\x84",
+ "\xA2\x66" => "\xE2\x96\x85",
+ "\xA2\x67" => "\xE2\x96\x86",
+ "\xA2\x68" => "\xE2\x96\x87",
+ "\xA2\x69" => "\xE2\x96\x88",
+ "\xA2\x6A" => "\xE2\x96\x8F",
+ "\xA2\x6B" => "\xE2\x96\x8E",
+ "\xA2\x6C" => "\xE2\x96\x8D",
+ "\xA2\x6D" => "\xE2\x96\x8C",
+ "\xA2\x6E" => "\xE2\x96\x8B",
+ "\xA2\x6F" => "\xE2\x96\x8A",
+ "\xA2\x70" => "\xE2\x96\x89",
+ "\xA2\x71" => "\xE2\x94\xBC",
+ "\xA2\x72" => "\xE2\x94\xB4",
+ "\xA2\x73" => "\xE2\x94\xAC",
+ "\xA2\x74" => "\xE2\x94\xA4",
+ "\xA2\x75" => "\xE2\x94\x9C",
+ "\xA2\x76" => "\xE2\x96\x94",
+ "\xA2\x77" => "\xE2\x94\x80",
+ "\xA2\x78" => "\xE2\x94\x82",
+ "\xA2\x79" => "\xE2\x96\x95",
+ "\xA2\x7A" => "\xE2\x94\x8C",
+ "\xA2\x7B" => "\xE2\x94\x90",
+ "\xA2\x7C" => "\xE2\x94\x94",
+ "\xA2\x7D" => "\xE2\x94\x98",
+ "\xA2\x7E" => "\xE2\x95\xAD",
+ "\xA2\xA1" => "\xE2\x95\xAE",
+ "\xA2\xA2" => "\xE2\x95\xB0",
+ "\xA2\xA3" => "\xE2\x95\xAF",
+ "\xA2\xA4" => "\xE2\x95\x90",
+ "\xA2\xA5" => "\xE2\x95\x9E",
+ "\xA2\xA6" => "\xE2\x95\xAA",
+ "\xA2\xA7" => "\xE2\x95\xA1",
+ "\xA2\xA8" => "\xE2\x97\xA2",
+ "\xA2\xA9" => "\xE2\x97\xA3",
+ "\xA2\xAA" => "\xE2\x97\xA5",
+ "\xA2\xAB" => "\xE2\x97\xA4",
+ "\xA2\xAC" => "\xE2\x95\xB1",
+ "\xA2\xAD" => "\xE2\x95\xB2",
+ "\xA2\xAE" => "\xE2\x95\xB3",
+ "\xA2\xAF" => "\xEF\xBC\x90",
+ "\xA2\xB0" => "\xEF\xBC\x91",
+ "\xA2\xB1" => "\xEF\xBC\x92",
+ "\xA2\xB2" => "\xEF\xBC\x93",
+ "\xA2\xB3" => "\xEF\xBC\x94",
+ "\xA2\xB4" => "\xEF\xBC\x95",
+ "\xA2\xB5" => "\xEF\xBC\x96",
+ "\xA2\xB6" => "\xEF\xBC\x97",
+ "\xA2\xB7" => "\xEF\xBC\x98",
+ "\xA2\xB8" => "\xEF\xBC\x99",
+ "\xA2\xB9" => "\xE2\x85\xA0",
+ "\xA2\xBA" => "\xE2\x85\xA1",
+ "\xA2\xBB" => "\xE2\x85\xA2",
+ "\xA2\xBC" => "\xE2\x85\xA3",
+ "\xA2\xBD" => "\xE2\x85\xA4",
+ "\xA2\xBE" => "\xE2\x85\xA5",
+ "\xA2\xBF" => "\xE2\x85\xA6",
+ "\xA2\xC0" => "\xE2\x85\xA7",
+ "\xA2\xC1" => "\xE2\x85\xA8",
+ "\xA2\xC2" => "\xE2\x85\xA9",
+ "\xA2\xC3" => "\xE3\x80\xA1",
+ "\xA2\xC4" => "\xE3\x80\xA2",
+ "\xA2\xC5" => "\xE3\x80\xA3",
+ "\xA2\xC6" => "\xE3\x80\xA4",
+ "\xA2\xC7" => "\xE3\x80\xA5",
+ "\xA2\xC8" => "\xE3\x80\xA6",
+ "\xA2\xC9" => "\xE3\x80\xA7",
+ "\xA2\xCA" => "\xE3\x80\xA8",
+ "\xA2\xCB" => "\xE3\x80\xA9",
+ "\xA2\xCC" => "\xEF\xBF\xBD",
+ "\xA2\xCD" => "\xE5\x8D\x84",
+ "\xA2\xCE" => "\xEF\xBF\xBD",
+ "\xA2\xCF" => "\xEF\xBC\xA1",
+ "\xA2\xD0" => "\xEF\xBC\xA2",
+ "\xA2\xD1" => "\xEF\xBC\xA3",
+ "\xA2\xD2" => "\xEF\xBC\xA4",
+ "\xA2\xD3" => "\xEF\xBC\xA5",
+ "\xA2\xD4" => "\xEF\xBC\xA6",
+ "\xA2\xD5" => "\xEF\xBC\xA7",
+ "\xA2\xD6" => "\xEF\xBC\xA8",
+ "\xA2\xD7" => "\xEF\xBC\xA9",
+ "\xA2\xD8" => "\xEF\xBC\xAA",
+ "\xA2\xD9" => "\xEF\xBC\xAB",
+ "\xA2\xDA" => "\xEF\xBC\xAC",
+ "\xA2\xDB" => "\xEF\xBC\xAD",
+ "\xA2\xDC" => "\xEF\xBC\xAE",
+ "\xA2\xDD" => "\xEF\xBC\xAF",
+ "\xA2\xDE" => "\xEF\xBC\xB0",
+ "\xA2\xDF" => "\xEF\xBC\xB1",
+ "\xA2\xE0" => "\xEF\xBC\xB2",
+ "\xA2\xE1" => "\xEF\xBC\xB3",
+ "\xA2\xE2" => "\xEF\xBC\xB4",
+ "\xA2\xE3" => "\xEF\xBC\xB5",
+ "\xA2\xE4" => "\xEF\xBC\xB6",
+ "\xA2\xE5" => "\xEF\xBC\xB7",
+ "\xA2\xE6" => "\xEF\xBC\xB8",
+ "\xA2\xE7" => "\xEF\xBC\xB9",
+ "\xA2\xE8" => "\xEF\xBC\xBA",
+ "\xA2\xE9" => "\xEF\xBD\x81",
+ "\xA2\xEA" => "\xEF\xBD\x82",
+ "\xA2\xEB" => "\xEF\xBD\x83",
+ "\xA2\xEC" => "\xEF\xBD\x84",
+ "\xA2\xED" => "\xEF\xBD\x85",
+ "\xA2\xEE" => "\xEF\xBD\x86",
+ "\xA2\xEF" => "\xEF\xBD\x87",
+ "\xA2\xF0" => "\xEF\xBD\x88",
+ "\xA2\xF1" => "\xEF\xBD\x89",
+ "\xA2\xF2" => "\xEF\xBD\x8A",
+ "\xA2\xF3" => "\xEF\xBD\x8B",
+ "\xA2\xF4" => "\xEF\xBD\x8C",
+ "\xA2\xF5" => "\xEF\xBD\x8D",
+ "\xA2\xF6" => "\xEF\xBD\x8E",
+ "\xA2\xF7" => "\xEF\xBD\x8F",
+ "\xA2\xF8" => "\xEF\xBD\x90",
+ "\xA2\xF9" => "\xEF\xBD\x91",
+ "\xA2\xFA" => "\xEF\xBD\x92",
+ "\xA2\xFB" => "\xEF\xBD\x93",
+ "\xA2\xFC" => "\xEF\xBD\x94",
+ "\xA2\xFD" => "\xEF\xBD\x95",
+ "\xA2\xFE" => "\xEF\xBD\x96",
+ "\xA3\x40" => "\xEF\xBD\x97",
+ "\xA3\x41" => "\xEF\xBD\x98",
+ "\xA3\x42" => "\xEF\xBD\x99",
+ "\xA3\x43" => "\xEF\xBD\x9A",
+ "\xA3\x44" => "\xCE\x91",
+ "\xA3\x45" => "\xCE\x92",
+ "\xA3\x46" => "\xCE\x93",
+ "\xA3\x47" => "\xCE\x94",
+ "\xA3\x48" => "\xCE\x95",
+ "\xA3\x49" => "\xCE\x96",
+ "\xA3\x4A" => "\xCE\x97",
+ "\xA3\x4B" => "\xCE\x98",
+ "\xA3\x4C" => "\xCE\x99",
+ "\xA3\x4D" => "\xCE\x9A",
+ "\xA3\x4E" => "\xCE\x9B",
+ "\xA3\x4F" => "\xCE\x9C",
+ "\xA3\x50" => "\xCE\x9D",
+ "\xA3\x51" => "\xCE\x9E",
+ "\xA3\x52" => "\xCE\x9F",
+ "\xA3\x53" => "\xCE\xA0",
+ "\xA3\x54" => "\xCE\xA1",
+ "\xA3\x55" => "\xCE\xA3",
+ "\xA3\x56" => "\xCE\xA4",
+ "\xA3\x57" => "\xCE\xA5",
+ "\xA3\x58" => "\xCE\xA6",
+ "\xA3\x59" => "\xCE\xA7",
+ "\xA3\x5A" => "\xCE\xA8",
+ "\xA3\x5B" => "\xCE\xA9",
+ "\xA3\x5C" => "\xCE\xB1",
+ "\xA3\x5D" => "\xCE\xB2",
+ "\xA3\x5E" => "\xCE\xB3",
+ "\xA3\x5F" => "\xCE\xB4",
+ "\xA3\x60" => "\xCE\xB5",
+ "\xA3\x61" => "\xCE\xB6",
+ "\xA3\x62" => "\xCE\xB7",
+ "\xA3\x63" => "\xCE\xB8",
+ "\xA3\x64" => "\xCE\xB9",
+ "\xA3\x65" => "\xCE\xBA",
+ "\xA3\x66" => "\xCE\xBB",
+ "\xA3\x67" => "\xCE\xBC",
+ "\xA3\x68" => "\xCE\xBD",
+ "\xA3\x69" => "\xCE\xBE",
+ "\xA3\x6A" => "\xCE\xBF",
+ "\xA3\x6B" => "\xCF\x80",
+ "\xA3\x6C" => "\xCF\x81",
+ "\xA3\x6D" => "\xCF\x83",
+ "\xA3\x6E" => "\xCF\x84",
+ "\xA3\x6F" => "\xCF\x85",
+ "\xA3\x70" => "\xCF\x86",
+ "\xA3\x71" => "\xCF\x87",
+ "\xA3\x72" => "\xCF\x88",
+ "\xA3\x73" => "\xCF\x89",
+ "\xA3\x74" => "\xE3\x84\x85",
+ "\xA3\x75" => "\xE3\x84\x86",
+ "\xA3\x76" => "\xE3\x84\x87",
+ "\xA3\x77" => "\xE3\x84\x88",
+ "\xA3\x78" => "\xE3\x84\x89",
+ "\xA3\x79" => "\xE3\x84\x8A",
+ "\xA3\x7A" => "\xE3\x84\x8B",
+ "\xA3\x7B" => "\xE3\x84\x8C",
+ "\xA3\x7C" => "\xE3\x84\x8D",
+ "\xA3\x7D" => "\xE3\x84\x8E",
+ "\xA3\x7E" => "\xE3\x84\x8F",
+ "\xA3\xA1" => "\xE3\x84\x90",
+ "\xA3\xA2" => "\xE3\x84\x91",
+ "\xA3\xA3" => "\xE3\x84\x92",
+ "\xA3\xA4" => "\xE3\x84\x93",
+ "\xA3\xA5" => "\xE3\x84\x94",
+ "\xA3\xA6" => "\xE3\x84\x95",
+ "\xA3\xA7" => "\xE3\x84\x96",
+ "\xA3\xA8" => "\xE3\x84\x97",
+ "\xA3\xA9" => "\xE3\x84\x98",
+ "\xA3\xAA" => "\xE3\x84\x99",
+ "\xA3\xAB" => "\xE3\x84\x9A",
+ "\xA3\xAC" => "\xE3\x84\x9B",
+ "\xA3\xAD" => "\xE3\x84\x9C",
+ "\xA3\xAE" => "\xE3\x84\x9D",
+ "\xA3\xAF" => "\xE3\x84\x9E",
+ "\xA3\xB0" => "\xE3\x84\x9F",
+ "\xA3\xB1" => "\xE3\x84\xA0",
+ "\xA3\xB2" => "\xE3\x84\xA1",
+ "\xA3\xB3" => "\xE3\x84\xA2",
+ "\xA3\xB4" => "\xE3\x84\xA3",
+ "\xA3\xB5" => "\xE3\x84\xA4",
+ "\xA3\xB6" => "\xE3\x84\xA5",
+ "\xA3\xB7" => "\xE3\x84\xA6",
+ "\xA3\xB8" => "\xE3\x84\xA7",
+ "\xA3\xB9" => "\xE3\x84\xA8",
+ "\xA3\xBA" => "\xE3\x84\xA9",
+ "\xA3\xBB" => "\xCB\x99",
+ "\xA3\xBC" => "\xCB\x89",
+ "\xA3\xBD" => "\xCB\x8A",
+ "\xA3\xBE" => "\xCB\x87",
+ "\xA3\xBF" => "\xCB\x8B",
+ "\xA4\x40" => "\xE4\xB8\x80",
+ "\xA4\x41" => "\xE4\xB9\x99",
+ "\xA4\x42" => "\xE4\xB8\x81",
+ "\xA4\x43" => "\xE4\xB8\x83",
+ "\xA4\x44" => "\xE4\xB9\x83",
+ "\xA4\x45" => "\xE4\xB9\x9D",
+ "\xA4\x46" => "\xE4\xBA\x86",
+ "\xA4\x47" => "\xE4\xBA\x8C",
+ "\xA4\x48" => "\xE4\xBA\xBA",
+ "\xA4\x49" => "\xE5\x84\xBF",
+ "\xA4\x4A" => "\xE5\x85\xA5",
+ "\xA4\x4B" => "\xE5\x85\xAB",
+ "\xA4\x4C" => "\xE5\x87\xA0",
+ "\xA4\x4D" => "\xE5\x88\x80",
+ "\xA4\x4E" => "\xE5\x88\x81",
+ "\xA4\x4F" => "\xE5\x8A\x9B",
+ "\xA4\x50" => "\xE5\x8C\x95",
+ "\xA4\x51" => "\xE5\x8D\x81",
+ "\xA4\x52" => "\xE5\x8D\x9C",
+ "\xA4\x53" => "\xE5\x8F\x88",
+ "\xA4\x54" => "\xE4\xB8\x89",
+ "\xA4\x55" => "\xE4\xB8\x8B",
+ "\xA4\x56" => "\xE4\xB8\x88",
+ "\xA4\x57" => "\xE4\xB8\x8A",
+ "\xA4\x58" => "\xE4\xB8\xAB",
+ "\xA4\x59" => "\xE4\xB8\xB8",
+ "\xA4\x5A" => "\xE5\x87\xA1",
+ "\xA4\x5B" => "\xE4\xB9\x85",
+ "\xA4\x5C" => "\xE4\xB9\x88",
+ "\xA4\x5D" => "\xE4\xB9\x9F",
+ "\xA4\x5E" => "\xE4\xB9\x9E",
+ "\xA4\x5F" => "\xE4\xBA\x8E",
+ "\xA4\x60" => "\xE4\xBA\xA1",
+ "\xA4\x61" => "\xE5\x85\x80",
+ "\xA4\x62" => "\xE5\x88\x83",
+ "\xA4\x63" => "\xE5\x8B\xBA",
+ "\xA4\x64" => "\xE5\x8D\x83",
+ "\xA4\x65" => "\xE5\x8F\x89",
+ "\xA4\x66" => "\xE5\x8F\xA3",
+ "\xA4\x67" => "\xE5\x9C\x9F",
+ "\xA4\x68" => "\xE5\xA3\xAB",
+ "\xA4\x69" => "\xE5\xA4\x95",
+ "\xA4\x6A" => "\xE5\xA4\xA7",
+ "\xA4\x6B" => "\xE5\xA5\xB3",
+ "\xA4\x6C" => "\xE5\xAD\x90",
+ "\xA4\x6D" => "\xE5\xAD\x91",
+ "\xA4\x6E" => "\xE5\xAD\x93",
+ "\xA4\x6F" => "\xE5\xAF\xB8",
+ "\xA4\x70" => "\xE5\xB0\x8F",
+ "\xA4\x71" => "\xE5\xB0\xA2",
+ "\xA4\x72" => "\xE5\xB0\xB8",
+ "\xA4\x73" => "\xE5\xB1\xB1",
+ "\xA4\x74" => "\xE5\xB7\x9D",
+ "\xA4\x75" => "\xE5\xB7\xA5",
+ "\xA4\x76" => "\xE5\xB7\xB1",
+ "\xA4\x77" => "\xE5\xB7\xB2",
+ "\xA4\x78" => "\xE5\xB7\xB3",
+ "\xA4\x79" => "\xE5\xB7\xBE",
+ "\xA4\x7A" => "\xE5\xB9\xB2",
+ "\xA4\x7B" => "\xE5\xBB\xBE",
+ "\xA4\x7C" => "\xE5\xBC\x8B",
+ "\xA4\x7D" => "\xE5\xBC\x93",
+ "\xA4\x7E" => "\xE6\x89\x8D",
+ "\xA4\xA1" => "\xE4\xB8\x91",
+ "\xA4\xA2" => "\xE4\xB8\x90",
+ "\xA4\xA3" => "\xE4\xB8\x8D",
+ "\xA4\xA4" => "\xE4\xB8\xAD",
+ "\xA4\xA5" => "\xE4\xB8\xB0",
+ "\xA4\xA6" => "\xE4\xB8\xB9",
+ "\xA4\xA7" => "\xE4\xB9\x8B",
+ "\xA4\xA8" => "\xE5\xB0\xB9",
+ "\xA4\xA9" => "\xE4\xBA\x88",
+ "\xA4\xAA" => "\xE4\xBA\x91",
+ "\xA4\xAB" => "\xE4\xBA\x95",
+ "\xA4\xAC" => "\xE4\xBA\x92",
+ "\xA4\xAD" => "\xE4\xBA\x94",
+ "\xA4\xAE" => "\xE4\xBA\xA2",
+ "\xA4\xAF" => "\xE4\xBB\x81",
+ "\xA4\xB0" => "\xE4\xBB\x80",
+ "\xA4\xB1" => "\xE4\xBB\x83",
+ "\xA4\xB2" => "\xE4\xBB\x86",
+ "\xA4\xB3" => "\xE4\xBB\x87",
+ "\xA4\xB4" => "\xE4\xBB\x8D",
+ "\xA4\xB5" => "\xE4\xBB\x8A",
+ "\xA4\xB6" => "\xE4\xBB\x8B",
+ "\xA4\xB7" => "\xE4\xBB\x84",
+ "\xA4\xB8" => "\xE5\x85\x83",
+ "\xA4\xB9" => "\xE5\x85\x81",
+ "\xA4\xBA" => "\xE5\x85\xA7",
+ "\xA4\xBB" => "\xE5\x85\xAD",
+ "\xA4\xBC" => "\xE5\x85\xAE",
+ "\xA4\xBD" => "\xE5\x85\xAC",
+ "\xA4\xBE" => "\xE5\x86\x97",
+ "\xA4\xBF" => "\xE5\x87\xB6",
+ "\xA4\xC0" => "\xE5\x88\x86",
+ "\xA4\xC1" => "\xE5\x88\x87",
+ "\xA4\xC2" => "\xE5\x88\x88",
+ "\xA4\xC3" => "\xE5\x8B\xBB",
+ "\xA4\xC4" => "\xE5\x8B\xBE",
+ "\xA4\xC5" => "\xE5\x8B\xBF",
+ "\xA4\xC6" => "\xE5\x8C\x96",
+ "\xA4\xC7" => "\xE5\x8C\xB9",
+ "\xA4\xC8" => "\xE5\x8D\x88",
+ "\xA4\xC9" => "\xE5\x8D\x87",
+ "\xA4\xCA" => "\xE5\x8D\x85",
+ "\xA4\xCB" => "\xE5\x8D\x9E",
+ "\xA4\xCC" => "\xE5\x8E\x84",
+ "\xA4\xCD" => "\xE5\x8F\x8B",
+ "\xA4\xCE" => "\xE5\x8F\x8A",
+ "\xA4\xCF" => "\xE5\x8F\x8D",
+ "\xA4\xD0" => "\xE5\xA3\xAC",
+ "\xA4\xD1" => "\xE5\xA4\xA9",
+ "\xA4\xD2" => "\xE5\xA4\xAB",
+ "\xA4\xD3" => "\xE5\xA4\xAA",
+ "\xA4\xD4" => "\xE5\xA4\xAD",
+ "\xA4\xD5" => "\xE5\xAD\x94",
+ "\xA4\xD6" => "\xE5\xB0\x91",
+ "\xA4\xD7" => "\xE5\xB0\xA4",
+ "\xA4\xD8" => "\xE5\xB0\xBA",
+ "\xA4\xD9" => "\xE5\xB1\xAF",
+ "\xA4\xDA" => "\xE5\xB7\xB4",
+ "\xA4\xDB" => "\xE5\xB9\xBB",
+ "\xA4\xDC" => "\xE5\xBB\xBF",
+ "\xA4\xDD" => "\xE5\xBC\x94",
+ "\xA4\xDE" => "\xE5\xBC\x95",
+ "\xA4\xDF" => "\xE5\xBF\x83",
+ "\xA4\xE0" => "\xE6\x88\x88",
+ "\xA4\xE1" => "\xE6\x88\xB6",
+ "\xA4\xE2" => "\xE6\x89\x8B",
+ "\xA4\xE3" => "\xE6\x89\x8E",
+ "\xA4\xE4" => "\xE6\x94\xAF",
+ "\xA4\xE5" => "\xE6\x96\x87",
+ "\xA4\xE6" => "\xE6\x96\x97",
+ "\xA4\xE7" => "\xE6\x96\xA4",
+ "\xA4\xE8" => "\xE6\x96\xB9",
+ "\xA4\xE9" => "\xE6\x97\xA5",
+ "\xA4\xEA" => "\xE6\x9B\xB0",
+ "\xA4\xEB" => "\xE6\x9C\x88",
+ "\xA4\xEC" => "\xE6\x9C\xA8",
+ "\xA4\xED" => "\xE6\xAC\xA0",
+ "\xA4\xEE" => "\xE6\xAD\xA2",
+ "\xA4\xEF" => "\xE6\xAD\xB9",
+ "\xA4\xF0" => "\xE6\xAF\x8B",
+ "\xA4\xF1" => "\xE6\xAF\x94",
+ "\xA4\xF2" => "\xE6\xAF\x9B",
+ "\xA4\xF3" => "\xE6\xB0\x8F",
+ "\xA4\xF4" => "\xE6\xB0\xB4",
+ "\xA4\xF5" => "\xE7\x81\xAB",
+ "\xA4\xF6" => "\xE7\x88\xAA",
+ "\xA4\xF7" => "\xE7\x88\xB6",
+ "\xA4\xF8" => "\xE7\x88\xBB",
+ "\xA4\xF9" => "\xE7\x89\x87",
+ "\xA4\xFA" => "\xE7\x89\x99",
+ "\xA4\xFB" => "\xE7\x89\x9B",
+ "\xA4\xFC" => "\xE7\x8A\xAC",
+ "\xA4\xFD" => "\xE7\x8E\x8B",
+ "\xA4\xFE" => "\xE4\xB8\x99",
+ "\xA5\x40" => "\xE4\xB8\x96",
+ "\xA5\x41" => "\xE4\xB8\x95",
+ "\xA5\x42" => "\xE4\xB8\x94",
+ "\xA5\x43" => "\xE4\xB8\x98",
+ "\xA5\x44" => "\xE4\xB8\xBB",
+ "\xA5\x45" => "\xE4\xB9\x8D",
+ "\xA5\x46" => "\xE4\xB9\x8F",
+ "\xA5\x47" => "\xE4\xB9\x8E",
+ "\xA5\x48" => "\xE4\xBB\xA5",
+ "\xA5\x49" => "\xE4\xBB\x98",
+ "\xA5\x4A" => "\xE4\xBB\x94",
+ "\xA5\x4B" => "\xE4\xBB\x95",
+ "\xA5\x4C" => "\xE4\xBB\x96",
+ "\xA5\x4D" => "\xE4\xBB\x97",
+ "\xA5\x4E" => "\xE4\xBB\xA3",
+ "\xA5\x4F" => "\xE4\xBB\xA4",
+ "\xA5\x50" => "\xE4\xBB\x99",
+ "\xA5\x51" => "\xE4\xBB\x9E",
+ "\xA5\x52" => "\xE5\x85\x85",
+ "\xA5\x53" => "\xE5\x85\x84",
+ "\xA5\x54" => "\xE5\x86\x89",
+ "\xA5\x55" => "\xE5\x86\x8A",
+ "\xA5\x56" => "\xE5\x86\xAC",
+ "\xA5\x57" => "\xE5\x87\xB9",
+ "\xA5\x58" => "\xE5\x87\xBA",
+ "\xA5\x59" => "\xE5\x87\xB8",
+ "\xA5\x5A" => "\xE5\x88\x8A",
+ "\xA5\x5B" => "\xE5\x8A\xA0",
+ "\xA5\x5C" => "\xE5\x8A\x9F",
+ "\xA5\x5D" => "\xE5\x8C\x85",
+ "\xA5\x5E" => "\xE5\x8C\x86",
+ "\xA5\x5F" => "\xE5\x8C\x97",
+ "\xA5\x60" => "\xE5\x8C\x9D",
+ "\xA5\x61" => "\xE4\xBB\x9F",
+ "\xA5\x62" => "\xE5\x8D\x8A",
+ "\xA5\x63" => "\xE5\x8D\x89",
+ "\xA5\x64" => "\xE5\x8D\xA1",
+ "\xA5\x65" => "\xE5\x8D\xA0",
+ "\xA5\x66" => "\xE5\x8D\xAF",
+ "\xA5\x67" => "\xE5\x8D\xAE",
+ "\xA5\x68" => "\xE5\x8E\xBB",
+ "\xA5\x69" => "\xE5\x8F\xAF",
+ "\xA5\x6A" => "\xE5\x8F\xA4",
+ "\xA5\x6B" => "\xE5\x8F\xB3",
+ "\xA5\x6C" => "\xE5\x8F\xAC",
+ "\xA5\x6D" => "\xE5\x8F\xAE",
+ "\xA5\x6E" => "\xE5\x8F\xA9",
+ "\xA5\x6F" => "\xE5\x8F\xA8",
+ "\xA5\x70" => "\xE5\x8F\xBC",
+ "\xA5\x71" => "\xE5\x8F\xB8",
+ "\xA5\x72" => "\xE5\x8F\xB5",
+ "\xA5\x73" => "\xE5\x8F\xAB",
+ "\xA5\x74" => "\xE5\x8F\xA6",
+ "\xA5\x75" => "\xE5\x8F\xAA",
+ "\xA5\x76" => "\xE5\x8F\xB2",
+ "\xA5\x77" => "\xE5\x8F\xB1",
+ "\xA5\x78" => "\xE5\x8F\xB0",
+ "\xA5\x79" => "\xE5\x8F\xA5",
+ "\xA5\x7A" => "\xE5\x8F\xAD",
+ "\xA5\x7B" => "\xE5\x8F\xBB",
+ "\xA5\x7C" => "\xE5\x9B\x9B",
+ "\xA5\x7D" => "\xE5\x9B\x9A",
+ "\xA5\x7E" => "\xE5\xA4\x96",
+ "\xA5\xA1" => "\xE5\xA4\xAE",
+ "\xA5\xA2" => "\xE5\xA4\xB1",
+ "\xA5\xA3" => "\xE5\xA5\xB4",
+ "\xA5\xA4" => "\xE5\xA5\xB6",
+ "\xA5\xA5" => "\xE5\xAD\x95",
+ "\xA5\xA6" => "\xE5\xAE\x83",
+ "\xA5\xA7" => "\xE5\xB0\xBC",
+ "\xA5\xA8" => "\xE5\xB7\xA8",
+ "\xA5\xA9" => "\xE5\xB7\xA7",
+ "\xA5\xAA" => "\xE5\xB7\xA6",
+ "\xA5\xAB" => "\xE5\xB8\x82",
+ "\xA5\xAC" => "\xE5\xB8\x83",
+ "\xA5\xAD" => "\xE5\xB9\xB3",
+ "\xA5\xAE" => "\xE5\xB9\xBC",
+ "\xA5\xAF" => "\xE5\xBC\x81",
+ "\xA5\xB0" => "\xE5\xBC\x98",
+ "\xA5\xB1" => "\xE5\xBC\x97",
+ "\xA5\xB2" => "\xE5\xBF\x85",
+ "\xA5\xB3" => "\xE6\x88\x8A",
+ "\xA5\xB4" => "\xE6\x89\x93",
+ "\xA5\xB5" => "\xE6\x89\x94",
+ "\xA5\xB6" => "\xE6\x89\x92",
+ "\xA5\xB7" => "\xE6\x89\x91",
+ "\xA5\xB8" => "\xE6\x96\xA5",
+ "\xA5\xB9" => "\xE6\x97\xA6",
+ "\xA5\xBA" => "\xE6\x9C\xAE",
+ "\xA5\xBB" => "\xE6\x9C\xAC",
+ "\xA5\xBC" => "\xE6\x9C\xAA",
+ "\xA5\xBD" => "\xE6\x9C\xAB",
+ "\xA5\xBE" => "\xE6\x9C\xAD",
+ "\xA5\xBF" => "\xE6\xAD\xA3",
+ "\xA5\xC0" => "\xE6\xAF\x8D",
+ "\xA5\xC1" => "\xE6\xB0\x91",
+ "\xA5\xC2" => "\xE6\xB0\x90",
+ "\xA5\xC3" => "\xE6\xB0\xB8",
+ "\xA5\xC4" => "\xE6\xB1\x81",
+ "\xA5\xC5" => "\xE6\xB1\x80",
+ "\xA5\xC6" => "\xE6\xB0\xBE",
+ "\xA5\xC7" => "\xE7\x8A\xAF",
+ "\xA5\xC8" => "\xE7\x8E\x84",
+ "\xA5\xC9" => "\xE7\x8E\x89",
+ "\xA5\xCA" => "\xE7\x93\x9C",
+ "\xA5\xCB" => "\xE7\x93\xA6",
+ "\xA5\xCC" => "\xE7\x94\x98",
+ "\xA5\xCD" => "\xE7\x94\x9F",
+ "\xA5\xCE" => "\xE7\x94\xA8",
+ "\xA5\xCF" => "\xE7\x94\xA9",
+ "\xA5\xD0" => "\xE7\x94\xB0",
+ "\xA5\xD1" => "\xE7\x94\xB1",
+ "\xA5\xD2" => "\xE7\x94\xB2",
+ "\xA5\xD3" => "\xE7\x94\xB3",
+ "\xA5\xD4" => "\xE7\x96\x8B",
+ "\xA5\xD5" => "\xE7\x99\xBD",
+ "\xA5\xD6" => "\xE7\x9A\xAE",
+ "\xA5\xD7" => "\xE7\x9A\xBF",
+ "\xA5\xD8" => "\xE7\x9B\xAE",
+ "\xA5\xD9" => "\xE7\x9F\x9B",
+ "\xA5\xDA" => "\xE7\x9F\xA2",
+ "\xA5\xDB" => "\xE7\x9F\xB3",
+ "\xA5\xDC" => "\xE7\xA4\xBA",
+ "\xA5\xDD" => "\xE7\xA6\xBE",
+ "\xA5\xDE" => "\xE7\xA9\xB4",
+ "\xA5\xDF" => "\xE7\xAB\x8B",
+ "\xA5\xE0" => "\xE4\xB8\x9E",
+ "\xA5\xE1" => "\xE4\xB8\x9F",
+ "\xA5\xE2" => "\xE4\xB9\x92",
+ "\xA5\xE3" => "\xE4\xB9\x93",
+ "\xA5\xE4" => "\xE4\xB9\xA9",
+ "\xA5\xE5" => "\xE4\xBA\x99",
+ "\xA5\xE6" => "\xE4\xBA\xA4",
+ "\xA5\xE7" => "\xE4\xBA\xA6",
+ "\xA5\xE8" => "\xE4\xBA\xA5",
+ "\xA5\xE9" => "\xE4\xBB\xBF",
+ "\xA5\xEA" => "\xE4\xBC\x89",
+ "\xA5\xEB" => "\xE4\xBC\x99",
+ "\xA5\xEC" => "\xE4\xBC\x8A",
+ "\xA5\xED" => "\xE4\xBC\x95",
+ "\xA5\xEE" => "\xE4\xBC\x8D",
+ "\xA5\xEF" => "\xE4\xBC\x90",
+ "\xA5\xF0" => "\xE4\xBC\x91",
+ "\xA5\xF1" => "\xE4\xBC\x8F",
+ "\xA5\xF2" => "\xE4\xBB\xB2",
+ "\xA5\xF3" => "\xE4\xBB\xB6",
+ "\xA5\xF4" => "\xE4\xBB\xBB",
+ "\xA5\xF5" => "\xE4\xBB\xB0",
+ "\xA5\xF6" => "\xE4\xBB\xB3",
+ "\xA5\xF7" => "\xE4\xBB\xBD",
+ "\xA5\xF8" => "\xE4\xBC\x81",
+ "\xA5\xF9" => "\xE4\xBC\x8B",
+ "\xA5\xFA" => "\xE5\x85\x89",
+ "\xA5\xFB" => "\xE5\x85\x87",
+ "\xA5\xFC" => "\xE5\x85\x86",
+ "\xA5\xFD" => "\xE5\x85\x88",
+ "\xA5\xFE" => "\xE5\x85\xA8",
+ "\xA6\x40" => "\xE5\x85\xB1",
+ "\xA6\x41" => "\xE5\x86\x8D",
+ "\xA6\x42" => "\xE5\x86\xB0",
+ "\xA6\x43" => "\xE5\x88\x97",
+ "\xA6\x44" => "\xE5\x88\x91",
+ "\xA6\x45" => "\xE5\x88\x92",
+ "\xA6\x46" => "\xE5\x88\x8E",
+ "\xA6\x47" => "\xE5\x88\x96",
+ "\xA6\x48" => "\xE5\x8A\xA3",
+ "\xA6\x49" => "\xE5\x8C\x88",
+ "\xA6\x4A" => "\xE5\x8C\xA1",
+ "\xA6\x4B" => "\xE5\x8C\xA0",
+ "\xA6\x4C" => "\xE5\x8D\xB0",
+ "\xA6\x4D" => "\xE5\x8D\xB1",
+ "\xA6\x4E" => "\xE5\x90\x89",
+ "\xA6\x4F" => "\xE5\x90\x8F",
+ "\xA6\x50" => "\xE5\x90\x8C",
+ "\xA6\x51" => "\xE5\x90\x8A",
+ "\xA6\x52" => "\xE5\x90\x90",
+ "\xA6\x53" => "\xE5\x90\x81",
+ "\xA6\x54" => "\xE5\x90\x8B",
+ "\xA6\x55" => "\xE5\x90\x84",
+ "\xA6\x56" => "\xE5\x90\x91",
+ "\xA6\x57" => "\xE5\x90\x8D",
+ "\xA6\x58" => "\xE5\x90\x88",
+ "\xA6\x59" => "\xE5\x90\x83",
+ "\xA6\x5A" => "\xE5\x90\x8E",
+ "\xA6\x5B" => "\xE5\x90\x86",
+ "\xA6\x5C" => "\xE5\x90\x92",
+ "\xA6\x5D" => "\xE5\x9B\xA0",
+ "\xA6\x5E" => "\xE5\x9B\x9E",
+ "\xA6\x5F" => "\xE5\x9B\x9D",
+ "\xA6\x60" => "\xE5\x9C\xB3",
+ "\xA6\x61" => "\xE5\x9C\xB0",
+ "\xA6\x62" => "\xE5\x9C\xA8",
+ "\xA6\x63" => "\xE5\x9C\xAD",
+ "\xA6\x64" => "\xE5\x9C\xAC",
+ "\xA6\x65" => "\xE5\x9C\xAF",
+ "\xA6\x66" => "\xE5\x9C\xA9",
+ "\xA6\x67" => "\xE5\xA4\x99",
+ "\xA6\x68" => "\xE5\xA4\x9A",
+ "\xA6\x69" => "\xE5\xA4\xB7",
+ "\xA6\x6A" => "\xE5\xA4\xB8",
+ "\xA6\x6B" => "\xE5\xA6\x84",
+ "\xA6\x6C" => "\xE5\xA5\xB8",
+ "\xA6\x6D" => "\xE5\xA6\x83",
+ "\xA6\x6E" => "\xE5\xA5\xBD",
+ "\xA6\x6F" => "\xE5\xA5\xB9",
+ "\xA6\x70" => "\xE5\xA6\x82",
+ "\xA6\x71" => "\xE5\xA6\x81",
+ "\xA6\x72" => "\xE5\xAD\x97",
+ "\xA6\x73" => "\xE5\xAD\x98",
+ "\xA6\x74" => "\xE5\xAE\x87",
+ "\xA6\x75" => "\xE5\xAE\x88",
+ "\xA6\x76" => "\xE5\xAE\x85",
+ "\xA6\x77" => "\xE5\xAE\x89",
+ "\xA6\x78" => "\xE5\xAF\xBA",
+ "\xA6\x79" => "\xE5\xB0\x96",
+ "\xA6\x7A" => "\xE5\xB1\xB9",
+ "\xA6\x7B" => "\xE5\xB7\x9E",
+ "\xA6\x7C" => "\xE5\xB8\x86",
+ "\xA6\x7D" => "\xE5\xB9\xB6",
+ "\xA6\x7E" => "\xE5\xB9\xB4",
+ "\xA6\xA1" => "\xE5\xBC\x8F",
+ "\xA6\xA2" => "\xE5\xBC\x9B",
+ "\xA6\xA3" => "\xE5\xBF\x99",
+ "\xA6\xA4" => "\xE5\xBF\x96",
+ "\xA6\xA5" => "\xE6\x88\x8E",
+ "\xA6\xA6" => "\xE6\x88\x8C",
+ "\xA6\xA7" => "\xE6\x88\x8D",
+ "\xA6\xA8" => "\xE6\x88\x90",
+ "\xA6\xA9" => "\xE6\x89\xA3",
+ "\xA6\xAA" => "\xE6\x89\x9B",
+ "\xA6\xAB" => "\xE6\x89\x98",
+ "\xA6\xAC" => "\xE6\x94\xB6",
+ "\xA6\xAD" => "\xE6\x97\xA9",
+ "\xA6\xAE" => "\xE6\x97\xA8",
+ "\xA6\xAF" => "\xE6\x97\xAC",
+ "\xA6\xB0" => "\xE6\x97\xAD",
+ "\xA6\xB1" => "\xE6\x9B\xB2",
+ "\xA6\xB2" => "\xE6\x9B\xB3",
+ "\xA6\xB3" => "\xE6\x9C\x89",
+ "\xA6\xB4" => "\xE6\x9C\xBD",
+ "\xA6\xB5" => "\xE6\x9C\xB4",
+ "\xA6\xB6" => "\xE6\x9C\xB1",
+ "\xA6\xB7" => "\xE6\x9C\xB5",
+ "\xA6\xB8" => "\xE6\xAC\xA1",
+ "\xA6\xB9" => "\xE6\xAD\xA4",
+ "\xA6\xBA" => "\xE6\xAD\xBB",
+ "\xA6\xBB" => "\xE6\xB0\x96",
+ "\xA6\xBC" => "\xE6\xB1\x9D",
+ "\xA6\xBD" => "\xE6\xB1\x97",
+ "\xA6\xBE" => "\xE6\xB1\x99",
+ "\xA6\xBF" => "\xE6\xB1\x9F",
+ "\xA6\xC0" => "\xE6\xB1\xA0",
+ "\xA6\xC1" => "\xE6\xB1\x90",
+ "\xA6\xC2" => "\xE6\xB1\x95",
+ "\xA6\xC3" => "\xE6\xB1\xA1",
+ "\xA6\xC4" => "\xE6\xB1\x9B",
+ "\xA6\xC5" => "\xE6\xB1\x8D",
+ "\xA6\xC6" => "\xE6\xB1\x8E",
+ "\xA6\xC7" => "\xE7\x81\xB0",
+ "\xA6\xC8" => "\xE7\x89\x9F",
+ "\xA6\xC9" => "\xE7\x89\x9D",
+ "\xA6\xCA" => "\xE7\x99\xBE",
+ "\xA6\xCB" => "\xE7\xAB\xB9",
+ "\xA6\xCC" => "\xE7\xB1\xB3",
+ "\xA6\xCD" => "\xE7\xB3\xB8",
+ "\xA6\xCE" => "\xE7\xBC\xB6",
+ "\xA6\xCF" => "\xE7\xBE\x8A",
+ "\xA6\xD0" => "\xE7\xBE\xBD",
+ "\xA6\xD1" => "\xE8\x80\x81",
+ "\xA6\xD2" => "\xE8\x80\x83",
+ "\xA6\xD3" => "\xE8\x80\x8C",
+ "\xA6\xD4" => "\xE8\x80\x92",
+ "\xA6\xD5" => "\xE8\x80\xB3",
+ "\xA6\xD6" => "\xE8\x81\xBF",
+ "\xA6\xD7" => "\xE8\x82\x89",
+ "\xA6\xD8" => "\xE8\x82\x8B",
+ "\xA6\xD9" => "\xE8\x82\x8C",
+ "\xA6\xDA" => "\xE8\x87\xA3",
+ "\xA6\xDB" => "\xE8\x87\xAA",
+ "\xA6\xDC" => "\xE8\x87\xB3",
+ "\xA6\xDD" => "\xE8\x87\xBC",
+ "\xA6\xDE" => "\xE8\x88\x8C",
+ "\xA6\xDF" => "\xE8\x88\x9B",
+ "\xA6\xE0" => "\xE8\x88\x9F",
+ "\xA6\xE1" => "\xE8\x89\xAE",
+ "\xA6\xE2" => "\xE8\x89\xB2",
+ "\xA6\xE3" => "\xE8\x89\xBE",
+ "\xA6\xE4" => "\xE8\x99\xAB",
+ "\xA6\xE5" => "\xE8\xA1\x80",
+ "\xA6\xE6" => "\xE8\xA1\x8C",
+ "\xA6\xE7" => "\xE8\xA1\xA3",
+ "\xA6\xE8" => "\xE8\xA5\xBF",
+ "\xA6\xE9" => "\xE9\x98\xA1",
+ "\xA6\xEA" => "\xE4\xB8\xB2",
+ "\xA6\xEB" => "\xE4\xBA\xA8",
+ "\xA6\xEC" => "\xE4\xBD\x8D",
+ "\xA6\xED" => "\xE4\xBD\x8F",
+ "\xA6\xEE" => "\xE4\xBD\x87",
+ "\xA6\xEF" => "\xE4\xBD\x97",
+ "\xA6\xF0" => "\xE4\xBD\x9E",
+ "\xA6\xF1" => "\xE4\xBC\xB4",
+ "\xA6\xF2" => "\xE4\xBD\x9B",
+ "\xA6\xF3" => "\xE4\xBD\x95",
+ "\xA6\xF4" => "\xE4\xBC\xB0",
+ "\xA6\xF5" => "\xE4\xBD\x90",
+ "\xA6\xF6" => "\xE4\xBD\x91",
+ "\xA6\xF7" => "\xE4\xBC\xBD",
+ "\xA6\xF8" => "\xE4\xBC\xBA",
+ "\xA6\xF9" => "\xE4\xBC\xB8",
+ "\xA6\xFA" => "\xE4\xBD\x83",
+ "\xA6\xFB" => "\xE4\xBD\x94",
+ "\xA6\xFC" => "\xE4\xBC\xBC",
+ "\xA6\xFD" => "\xE4\xBD\x86",
+ "\xA6\xFE" => "\xE4\xBD\xA3",
+ "\xA7\x40" => "\xE4\xBD\x9C",
+ "\xA7\x41" => "\xE4\xBD\xA0",
+ "\xA7\x42" => "\xE4\xBC\xAF",
+ "\xA7\x43" => "\xE4\xBD\x8E",
+ "\xA7\x44" => "\xE4\xBC\xB6",
+ "\xA7\x45" => "\xE4\xBD\x99",
+ "\xA7\x46" => "\xE4\xBD\x9D",
+ "\xA7\x47" => "\xE4\xBD\x88",
+ "\xA7\x48" => "\xE4\xBD\x9A",
+ "\xA7\x49" => "\xE5\x85\x8C",
+ "\xA7\x4A" => "\xE5\x85\x8B",
+ "\xA7\x4B" => "\xE5\x85\x8D",
+ "\xA7\x4C" => "\xE5\x85\xB5",
+ "\xA7\x4D" => "\xE5\x86\xB6",
+ "\xA7\x4E" => "\xE5\x86\xB7",
+ "\xA7\x4F" => "\xE5\x88\xA5",
+ "\xA7\x50" => "\xE5\x88\xA4",
+ "\xA7\x51" => "\xE5\x88\xA9",
+ "\xA7\x52" => "\xE5\x88\xAA",
+ "\xA7\x53" => "\xE5\x88\xA8",
+ "\xA7\x54" => "\xE5\x8A\xAB",
+ "\xA7\x55" => "\xE5\x8A\xA9",
+ "\xA7\x56" => "\xE5\x8A\xAA",
+ "\xA7\x57" => "\xE5\x8A\xAC",
+ "\xA7\x58" => "\xE5\x8C\xA3",
+ "\xA7\x59" => "\xE5\x8D\xB3",
+ "\xA7\x5A" => "\xE5\x8D\xB5",
+ "\xA7\x5B" => "\xE5\x90\x9D",
+ "\xA7\x5C" => "\xE5\x90\xAD",
+ "\xA7\x5D" => "\xE5\x90\x9E",
+ "\xA7\x5E" => "\xE5\x90\xBE",
+ "\xA7\x5F" => "\xE5\x90\xA6",
+ "\xA7\x60" => "\xE5\x91\x8E",
+ "\xA7\x61" => "\xE5\x90\xA7",
+ "\xA7\x62" => "\xE5\x91\x86",
+ "\xA7\x63" => "\xE5\x91\x83",
+ "\xA7\x64" => "\xE5\x90\xB3",
+ "\xA7\x65" => "\xE5\x91\x88",
+ "\xA7\x66" => "\xE5\x91\x82",
+ "\xA7\x67" => "\xE5\x90\x9B",
+ "\xA7\x68" => "\xE5\x90\xA9",
+ "\xA7\x69" => "\xE5\x91\x8A",
+ "\xA7\x6A" => "\xE5\x90\xB9",
+ "\xA7\x6B" => "\xE5\x90\xBB",
+ "\xA7\x6C" => "\xE5\x90\xB8",
+ "\xA7\x6D" => "\xE5\x90\xAE",
+ "\xA7\x6E" => "\xE5\x90\xB5",
+ "\xA7\x6F" => "\xE5\x90\xB6",
+ "\xA7\x70" => "\xE5\x90\xA0",
+ "\xA7\x71" => "\xE5\x90\xBC",
+ "\xA7\x72" => "\xE5\x91\x80",
+ "\xA7\x73" => "\xE5\x90\xB1",
+ "\xA7\x74" => "\xE5\x90\xAB",
+ "\xA7\x75" => "\xE5\x90\x9F",
+ "\xA7\x76" => "\xE5\x90\xAC",
+ "\xA7\x77" => "\xE5\x9B\xAA",
+ "\xA7\x78" => "\xE5\x9B\xB0",
+ "\xA7\x79" => "\xE5\x9B\xA4",
+ "\xA7\x7A" => "\xE5\x9B\xAB",
+ "\xA7\x7B" => "\xE5\x9D\x8A",
+ "\xA7\x7C" => "\xE5\x9D\x91",
+ "\xA7\x7D" => "\xE5\x9D\x80",
+ "\xA7\x7E" => "\xE5\x9D\x8D",
+ "\xA7\xA1" => "\xE5\x9D\x87",
+ "\xA7\xA2" => "\xE5\x9D\x8E",
+ "\xA7\xA3" => "\xE5\x9C\xBE",
+ "\xA7\xA4" => "\xE5\x9D\x90",
+ "\xA7\xA5" => "\xE5\x9D\x8F",
+ "\xA7\xA6" => "\xE5\x9C\xBB",
+ "\xA7\xA7" => "\xE5\xA3\xAF",
+ "\xA7\xA8" => "\xE5\xA4\xBE",
+ "\xA7\xA9" => "\xE5\xA6\x9D",
+ "\xA7\xAA" => "\xE5\xA6\x92",
+ "\xA7\xAB" => "\xE5\xA6\xA8",
+ "\xA7\xAC" => "\xE5\xA6\x9E",
+ "\xA7\xAD" => "\xE5\xA6\xA3",
+ "\xA7\xAE" => "\xE5\xA6\x99",
+ "\xA7\xAF" => "\xE5\xA6\x96",
+ "\xA7\xB0" => "\xE5\xA6\x8D",
+ "\xA7\xB1" => "\xE5\xA6\xA4",
+ "\xA7\xB2" => "\xE5\xA6\x93",
+ "\xA7\xB3" => "\xE5\xA6\x8A",
+ "\xA7\xB4" => "\xE5\xA6\xA5",
+ "\xA7\xB5" => "\xE5\xAD\x9D",
+ "\xA7\xB6" => "\xE5\xAD\x9C",
+ "\xA7\xB7" => "\xE5\xAD\x9A",
+ "\xA7\xB8" => "\xE5\xAD\x9B",
+ "\xA7\xB9" => "\xE5\xAE\x8C",
+ "\xA7\xBA" => "\xE5\xAE\x8B",
+ "\xA7\xBB" => "\xE5\xAE\x8F",
+ "\xA7\xBC" => "\xE5\xB0\xAC",
+ "\xA7\xBD" => "\xE5\xB1\x80",
+ "\xA7\xBE" => "\xE5\xB1\x81",
+ "\xA7\xBF" => "\xE5\xB0\xBF",
+ "\xA7\xC0" => "\xE5\xB0\xBE",
+ "\xA7\xC1" => "\xE5\xB2\x90",
+ "\xA7\xC2" => "\xE5\xB2\x91",
+ "\xA7\xC3" => "\xE5\xB2\x94",
+ "\xA7\xC4" => "\xE5\xB2\x8C",
+ "\xA7\xC5" => "\xE5\xB7\xAB",
+ "\xA7\xC6" => "\xE5\xB8\x8C",
+ "\xA7\xC7" => "\xE5\xBA\x8F",
+ "\xA7\xC8" => "\xE5\xBA\x87",
+ "\xA7\xC9" => "\xE5\xBA\x8A",
+ "\xA7\xCA" => "\xE5\xBB\xB7",
+ "\xA7\xCB" => "\xE5\xBC\x84",
+ "\xA7\xCC" => "\xE5\xBC\x9F",
+ "\xA7\xCD" => "\xE5\xBD\xA4",
+ "\xA7\xCE" => "\xE5\xBD\xA2",
+ "\xA7\xCF" => "\xE5\xBD\xB7",
+ "\xA7\xD0" => "\xE5\xBD\xB9",
+ "\xA7\xD1" => "\xE5\xBF\x98",
+ "\xA7\xD2" => "\xE5\xBF\x8C",
+ "\xA7\xD3" => "\xE5\xBF\x97",
+ "\xA7\xD4" => "\xE5\xBF\x8D",
+ "\xA7\xD5" => "\xE5\xBF\xB1",
+ "\xA7\xD6" => "\xE5\xBF\xAB",
+ "\xA7\xD7" => "\xE5\xBF\xB8",
+ "\xA7\xD8" => "\xE5\xBF\xAA",
+ "\xA7\xD9" => "\xE6\x88\x92",
+ "\xA7\xDA" => "\xE6\x88\x91",
+ "\xA7\xDB" => "\xE6\x8A\x84",
+ "\xA7\xDC" => "\xE6\x8A\x97",
+ "\xA7\xDD" => "\xE6\x8A\x96",
+ "\xA7\xDE" => "\xE6\x8A\x80",
+ "\xA7\xDF" => "\xE6\x89\xB6",
+ "\xA7\xE0" => "\xE6\x8A\x89",
+ "\xA7\xE1" => "\xE6\x89\xAD",
+ "\xA7\xE2" => "\xE6\x8A\x8A",
+ "\xA7\xE3" => "\xE6\x89\xBC",
+ "\xA7\xE4" => "\xE6\x89\xBE",
+ "\xA7\xE5" => "\xE6\x89\xB9",
+ "\xA7\xE6" => "\xE6\x89\xB3",
+ "\xA7\xE7" => "\xE6\x8A\x92",
+ "\xA7\xE8" => "\xE6\x89\xAF",
+ "\xA7\xE9" => "\xE6\x8A\x98",
+ "\xA7\xEA" => "\xE6\x89\xAE",
+ "\xA7\xEB" => "\xE6\x8A\x95",
+ "\xA7\xEC" => "\xE6\x8A\x93",
+ "\xA7\xED" => "\xE6\x8A\x91",
+ "\xA7\xEE" => "\xE6\x8A\x86",
+ "\xA7\xEF" => "\xE6\x94\xB9",
+ "\xA7\xF0" => "\xE6\x94\xBB",
+ "\xA7\xF1" => "\xE6\x94\xB8",
+ "\xA7\xF2" => "\xE6\x97\xB1",
+ "\xA7\xF3" => "\xE6\x9B\xB4",
+ "\xA7\xF4" => "\xE6\x9D\x9F",
+ "\xA7\xF5" => "\xE6\x9D\x8E",
+ "\xA7\xF6" => "\xE6\x9D\x8F",
+ "\xA7\xF7" => "\xE6\x9D\x90",
+ "\xA7\xF8" => "\xE6\x9D\x91",
+ "\xA7\xF9" => "\xE6\x9D\x9C",
+ "\xA7\xFA" => "\xE6\x9D\x96",
+ "\xA7\xFB" => "\xE6\x9D\x9E",
+ "\xA7\xFC" => "\xE6\x9D\x89",
+ "\xA7\xFD" => "\xE6\x9D\x86",
+ "\xA7\xFE" => "\xE6\x9D\xA0",
+ "\xA8\x40" => "\xE6\x9D\x93",
+ "\xA8\x41" => "\xE6\x9D\x97",
+ "\xA8\x42" => "\xE6\xAD\xA5",
+ "\xA8\x43" => "\xE6\xAF\x8F",
+ "\xA8\x44" => "\xE6\xB1\x82",
+ "\xA8\x45" => "\xE6\xB1\x9E",
+ "\xA8\x46" => "\xE6\xB2\x99",
+ "\xA8\x47" => "\xE6\xB2\x81",
+ "\xA8\x48" => "\xE6\xB2\x88",
+ "\xA8\x49" => "\xE6\xB2\x89",
+ "\xA8\x4A" => "\xE6\xB2\x85",
+ "\xA8\x4B" => "\xE6\xB2\x9B",
+ "\xA8\x4C" => "\xE6\xB1\xAA",
+ "\xA8\x4D" => "\xE6\xB1\xBA",
+ "\xA8\x4E" => "\xE6\xB2\x90",
+ "\xA8\x4F" => "\xE6\xB1\xB0",
+ "\xA8\x50" => "\xE6\xB2\x8C",
+ "\xA8\x51" => "\xE6\xB1\xA8",
+ "\xA8\x52" => "\xE6\xB2\x96",
+ "\xA8\x53" => "\xE6\xB2\x92",
+ "\xA8\x54" => "\xE6\xB1\xBD",
+ "\xA8\x55" => "\xE6\xB2\x83",
+ "\xA8\x56" => "\xE6\xB1\xB2",
+ "\xA8\x57" => "\xE6\xB1\xBE",
+ "\xA8\x58" => "\xE6\xB1\xB4",
+ "\xA8\x59" => "\xE6\xB2\x86",
+ "\xA8\x5A" => "\xE6\xB1\xB6",
+ "\xA8\x5B" => "\xE6\xB2\x8D",
+ "\xA8\x5C" => "\xE6\xB2\x94",
+ "\xA8\x5D" => "\xE6\xB2\x98",
+ "\xA8\x5E" => "\xE6\xB2\x82",
+ "\xA8\x5F" => "\xE7\x81\xB6",
+ "\xA8\x60" => "\xE7\x81\xBC",
+ "\xA8\x61" => "\xE7\x81\xBD",
+ "\xA8\x62" => "\xE7\x81\xB8",
+ "\xA8\x63" => "\xE7\x89\xA2",
+ "\xA8\x64" => "\xE7\x89\xA1",
+ "\xA8\x65" => "\xE7\x89\xA0",
+ "\xA8\x66" => "\xE7\x8B\x84",
+ "\xA8\x67" => "\xE7\x8B\x82",
+ "\xA8\x68" => "\xE7\x8E\x96",
+ "\xA8\x69" => "\xE7\x94\xAC",
+ "\xA8\x6A" => "\xE7\x94\xAB",
+ "\xA8\x6B" => "\xE7\x94\xB7",
+ "\xA8\x6C" => "\xE7\x94\xB8",
+ "\xA8\x6D" => "\xE7\x9A\x82",
+ "\xA8\x6E" => "\xE7\x9B\xAF",
+ "\xA8\x6F" => "\xE7\x9F\xA3",
+ "\xA8\x70" => "\xE7\xA7\x81",
+ "\xA8\x71" => "\xE7\xA7\x80",
+ "\xA8\x72" => "\xE7\xA6\xBF",
+ "\xA8\x73" => "\xE7\xA9\xB6",
+ "\xA8\x74" => "\xE7\xB3\xBB",
+ "\xA8\x75" => "\xE7\xBD\x95",
+ "\xA8\x76" => "\xE8\x82\x96",
+ "\xA8\x77" => "\xE8\x82\x93",
+ "\xA8\x78" => "\xE8\x82\x9D",
+ "\xA8\x79" => "\xE8\x82\x98",
+ "\xA8\x7A" => "\xE8\x82\x9B",
+ "\xA8\x7B" => "\xE8\x82\x9A",
+ "\xA8\x7C" => "\xE8\x82\xB2",
+ "\xA8\x7D" => "\xE8\x89\xAF",
+ "\xA8\x7E" => "\xE8\x8A\x92",
+ "\xA8\xA1" => "\xE8\x8A\x8B",
+ "\xA8\xA2" => "\xE8\x8A\x8D",
+ "\xA8\xA3" => "\xE8\xA6\x8B",
+ "\xA8\xA4" => "\xE8\xA7\x92",
+ "\xA8\xA5" => "\xE8\xA8\x80",
+ "\xA8\xA6" => "\xE8\xB0\xB7",
+ "\xA8\xA7" => "\xE8\xB1\x86",
+ "\xA8\xA8" => "\xE8\xB1\x95",
+ "\xA8\xA9" => "\xE8\xB2\x9D",
+ "\xA8\xAA" => "\xE8\xB5\xA4",
+ "\xA8\xAB" => "\xE8\xB5\xB0",
+ "\xA8\xAC" => "\xE8\xB6\xB3",
+ "\xA8\xAD" => "\xE8\xBA\xAB",
+ "\xA8\xAE" => "\xE8\xBB\x8A",
+ "\xA8\xAF" => "\xE8\xBE\x9B",
+ "\xA8\xB0" => "\xE8\xBE\xB0",
+ "\xA8\xB1" => "\xE8\xBF\x82",
+ "\xA8\xB2" => "\xE8\xBF\x86",
+ "\xA8\xB3" => "\xE8\xBF\x85",
+ "\xA8\xB4" => "\xE8\xBF\x84",
+ "\xA8\xB5" => "\xE5\xB7\xA1",
+ "\xA8\xB6" => "\xE9\x82\x91",
+ "\xA8\xB7" => "\xE9\x82\xA2",
+ "\xA8\xB8" => "\xE9\x82\xAA",
+ "\xA8\xB9" => "\xE9\x82\xA6",
+ "\xA8\xBA" => "\xE9\x82\xA3",
+ "\xA8\xBB" => "\xE9\x85\x89",
+ "\xA8\xBC" => "\xE9\x87\x86",
+ "\xA8\xBD" => "\xE9\x87\x8C",
+ "\xA8\xBE" => "\xE9\x98\xB2",
+ "\xA8\xBF" => "\xE9\x98\xAE",
+ "\xA8\xC0" => "\xE9\x98\xB1",
+ "\xA8\xC1" => "\xE9\x98\xAA",
+ "\xA8\xC2" => "\xE9\x98\xAC",
+ "\xA8\xC3" => "\xE4\xB8\xA6",
+ "\xA8\xC4" => "\xE4\xB9\x96",
+ "\xA8\xC5" => "\xE4\xB9\xB3",
+ "\xA8\xC6" => "\xE4\xBA\x8B",
+ "\xA8\xC7" => "\xE4\xBA\x9B",
+ "\xA8\xC8" => "\xE4\xBA\x9E",
+ "\xA8\xC9" => "\xE4\xBA\xAB",
+ "\xA8\xCA" => "\xE4\xBA\xAC",
+ "\xA8\xCB" => "\xE4\xBD\xAF",
+ "\xA8\xCC" => "\xE4\xBE\x9D",
+ "\xA8\xCD" => "\xE4\xBE\x8D",
+ "\xA8\xCE" => "\xE4\xBD\xB3",
+ "\xA8\xCF" => "\xE4\xBD\xBF",
+ "\xA8\xD0" => "\xE4\xBD\xAC",
+ "\xA8\xD1" => "\xE4\xBE\x9B",
+ "\xA8\xD2" => "\xE4\xBE\x8B",
+ "\xA8\xD3" => "\xE4\xBE\x86",
+ "\xA8\xD4" => "\xE4\xBE\x83",
+ "\xA8\xD5" => "\xE4\xBD\xB0",
+ "\xA8\xD6" => "\xE4\xBD\xB5",
+ "\xA8\xD7" => "\xE4\xBE\x88",
+ "\xA8\xD8" => "\xE4\xBD\xA9",
+ "\xA8\xD9" => "\xE4\xBD\xBB",
+ "\xA8\xDA" => "\xE4\xBE\x96",
+ "\xA8\xDB" => "\xE4\xBD\xBE",
+ "\xA8\xDC" => "\xE4\xBE\x8F",
+ "\xA8\xDD" => "\xE4\xBE\x91",
+ "\xA8\xDE" => "\xE4\xBD\xBA",
+ "\xA8\xDF" => "\xE5\x85\x94",
+ "\xA8\xE0" => "\xE5\x85\x92",
+ "\xA8\xE1" => "\xE5\x85\x95",
+ "\xA8\xE2" => "\xE5\x85\xA9",
+ "\xA8\xE3" => "\xE5\x85\xB7",
+ "\xA8\xE4" => "\xE5\x85\xB6",
+ "\xA8\xE5" => "\xE5\x85\xB8",
+ "\xA8\xE6" => "\xE5\x86\xBD",
+ "\xA8\xE7" => "\xE5\x87\xBD",
+ "\xA8\xE8" => "\xE5\x88\xBB",
+ "\xA8\xE9" => "\xE5\x88\xB8",
+ "\xA8\xEA" => "\xE5\x88\xB7",
+ "\xA8\xEB" => "\xE5\x88\xBA",
+ "\xA8\xEC" => "\xE5\x88\xB0",
+ "\xA8\xED" => "\xE5\x88\xAE",
+ "\xA8\xEE" => "\xE5\x88\xB6",
+ "\xA8\xEF" => "\xE5\x89\x81",
+ "\xA8\xF0" => "\xE5\x8A\xBE",
+ "\xA8\xF1" => "\xE5\x8A\xBB",
+ "\xA8\xF2" => "\xE5\x8D\x92",
+ "\xA8\xF3" => "\xE5\x8D\x94",
+ "\xA8\xF4" => "\xE5\x8D\x93",
+ "\xA8\xF5" => "\xE5\x8D\x91",
+ "\xA8\xF6" => "\xE5\x8D\xA6",
+ "\xA8\xF7" => "\xE5\x8D\xB7",
+ "\xA8\xF8" => "\xE5\x8D\xB8",
+ "\xA8\xF9" => "\xE5\x8D\xB9",
+ "\xA8\xFA" => "\xE5\x8F\x96",
+ "\xA8\xFB" => "\xE5\x8F\x94",
+ "\xA8\xFC" => "\xE5\x8F\x97",
+ "\xA8\xFD" => "\xE5\x91\xB3",
+ "\xA8\xFE" => "\xE5\x91\xB5",
+ "\xA9\x40" => "\xE5\x92\x96",
+ "\xA9\x41" => "\xE5\x91\xB8",
+ "\xA9\x42" => "\xE5\x92\x95",
+ "\xA9\x43" => "\xE5\x92\x80",
+ "\xA9\x44" => "\xE5\x91\xBB",
+ "\xA9\x45" => "\xE5\x91\xB7",
+ "\xA9\x46" => "\xE5\x92\x84",
+ "\xA9\x47" => "\xE5\x92\x92",
+ "\xA9\x48" => "\xE5\x92\x86",
+ "\xA9\x49" => "\xE5\x91\xBC",
+ "\xA9\x4A" => "\xE5\x92\x90",
+ "\xA9\x4B" => "\xE5\x91\xB1",
+ "\xA9\x4C" => "\xE5\x91\xB6",
+ "\xA9\x4D" => "\xE5\x92\x8C",
+ "\xA9\x4E" => "\xE5\x92\x9A",
+ "\xA9\x4F" => "\xE5\x91\xA2",
+ "\xA9\x50" => "\xE5\x91\xA8",
+ "\xA9\x51" => "\xE5\x92\x8B",
+ "\xA9\x52" => "\xE5\x91\xBD",
+ "\xA9\x53" => "\xE5\x92\x8E",
+ "\xA9\x54" => "\xE5\x9B\xBA",
+ "\xA9\x55" => "\xE5\x9E\x83",
+ "\xA9\x56" => "\xE5\x9D\xB7",
+ "\xA9\x57" => "\xE5\x9D\xAA",
+ "\xA9\x58" => "\xE5\x9D\xA9",
+ "\xA9\x59" => "\xE5\x9D\xA1",
+ "\xA9\x5A" => "\xE5\x9D\xA6",
+ "\xA9\x5B" => "\xE5\x9D\xA4",
+ "\xA9\x5C" => "\xE5\x9D\xBC",
+ "\xA9\x5D" => "\xE5\xA4\x9C",
+ "\xA9\x5E" => "\xE5\xA5\x89",
+ "\xA9\x5F" => "\xE5\xA5\x87",
+ "\xA9\x60" => "\xE5\xA5\x88",
+ "\xA9\x61" => "\xE5\xA5\x84",
+ "\xA9\x62" => "\xE5\xA5\x94",
+ "\xA9\x63" => "\xE5\xA6\xBE",
+ "\xA9\x64" => "\xE5\xA6\xBB",
+ "\xA9\x65" => "\xE5\xA7\x94",
+ "\xA9\x66" => "\xE5\xA6\xB9",
+ "\xA9\x67" => "\xE5\xA6\xAE",
+ "\xA9\x68" => "\xE5\xA7\x91",
+ "\xA9\x69" => "\xE5\xA7\x86",
+ "\xA9\x6A" => "\xE5\xA7\x90",
+ "\xA9\x6B" => "\xE5\xA7\x8D",
+ "\xA9\x6C" => "\xE5\xA7\x8B",
+ "\xA9\x6D" => "\xE5\xA7\x93",
+ "\xA9\x6E" => "\xE5\xA7\x8A",
+ "\xA9\x6F" => "\xE5\xA6\xAF",
+ "\xA9\x70" => "\xE5\xA6\xB3",
+ "\xA9\x71" => "\xE5\xA7\x92",
+ "\xA9\x72" => "\xE5\xA7\x85",
+ "\xA9\x73" => "\xE5\xAD\x9F",
+ "\xA9\x74" => "\xE5\xAD\xA4",
+ "\xA9\x75" => "\xE5\xAD\xA3",
+ "\xA9\x76" => "\xE5\xAE\x97",
+ "\xA9\x77" => "\xE5\xAE\x9A",
+ "\xA9\x78" => "\xE5\xAE\x98",
+ "\xA9\x79" => "\xE5\xAE\x9C",
+ "\xA9\x7A" => "\xE5\xAE\x99",
+ "\xA9\x7B" => "\xE5\xAE\x9B",
+ "\xA9\x7C" => "\xE5\xB0\x9A",
+ "\xA9\x7D" => "\xE5\xB1\x88",
+ "\xA9\x7E" => "\xE5\xB1\x85",
+ "\xA9\xA1" => "\xE5\xB1\x86",
+ "\xA9\xA2" => "\xE5\xB2\xB7",
+ "\xA9\xA3" => "\xE5\xB2\xA1",
+ "\xA9\xA4" => "\xE5\xB2\xB8",
+ "\xA9\xA5" => "\xE5\xB2\xA9",
+ "\xA9\xA6" => "\xE5\xB2\xAB",
+ "\xA9\xA7" => "\xE5\xB2\xB1",
+ "\xA9\xA8" => "\xE5\xB2\xB3",
+ "\xA9\xA9" => "\xE5\xB8\x98",
+ "\xA9\xAA" => "\xE5\xB8\x9A",
+ "\xA9\xAB" => "\xE5\xB8\x96",
+ "\xA9\xAC" => "\xE5\xB8\x95",
+ "\xA9\xAD" => "\xE5\xB8\x9B",
+ "\xA9\xAE" => "\xE5\xB8\x91",
+ "\xA9\xAF" => "\xE5\xB9\xB8",
+ "\xA9\xB0" => "\xE5\xBA\x9A",
+ "\xA9\xB1" => "\xE5\xBA\x97",
+ "\xA9\xB2" => "\xE5\xBA\x9C",
+ "\xA9\xB3" => "\xE5\xBA\x95",
+ "\xA9\xB4" => "\xE5\xBA\x96",
+ "\xA9\xB5" => "\xE5\xBB\xB6",
+ "\xA9\xB6" => "\xE5\xBC\xA6",
+ "\xA9\xB7" => "\xE5\xBC\xA7",
+ "\xA9\xB8" => "\xE5\xBC\xA9",
+ "\xA9\xB9" => "\xE5\xBE\x80",
+ "\xA9\xBA" => "\xE5\xBE\x81",
+ "\xA9\xBB" => "\xE5\xBD\xBF",
+ "\xA9\xBC" => "\xE5\xBD\xBC",
+ "\xA9\xBD" => "\xE5\xBF\x9D",
+ "\xA9\xBE" => "\xE5\xBF\xA0",
+ "\xA9\xBF" => "\xE5\xBF\xBD",
+ "\xA9\xC0" => "\xE5\xBF\xB5",
+ "\xA9\xC1" => "\xE5\xBF\xBF",
+ "\xA9\xC2" => "\xE6\x80\x8F",
+ "\xA9\xC3" => "\xE6\x80\x94",
+ "\xA9\xC4" => "\xE6\x80\xAF",
+ "\xA9\xC5" => "\xE6\x80\xB5",
+ "\xA9\xC6" => "\xE6\x80\x96",
+ "\xA9\xC7" => "\xE6\x80\xAA",
+ "\xA9\xC8" => "\xE6\x80\x95",
+ "\xA9\xC9" => "\xE6\x80\xA1",
+ "\xA9\xCA" => "\xE6\x80\xA7",
+ "\xA9\xCB" => "\xE6\x80\xA9",
+ "\xA9\xCC" => "\xE6\x80\xAB",
+ "\xA9\xCD" => "\xE6\x80\x9B",
+ "\xA9\xCE" => "\xE6\x88\x96",
+ "\xA9\xCF" => "\xE6\x88\x95",
+ "\xA9\xD0" => "\xE6\x88\xBF",
+ "\xA9\xD1" => "\xE6\x88\xBE",
+ "\xA9\xD2" => "\xE6\x89\x80",
+ "\xA9\xD3" => "\xE6\x89\xBF",
+ "\xA9\xD4" => "\xE6\x8B\x89",
+ "\xA9\xD5" => "\xE6\x8B\x8C",
+ "\xA9\xD6" => "\xE6\x8B\x84",
+ "\xA9\xD7" => "\xE6\x8A\xBF",
+ "\xA9\xD8" => "\xE6\x8B\x82",
+ "\xA9\xD9" => "\xE6\x8A\xB9",
+ "\xA9\xDA" => "\xE6\x8B\x92",
+ "\xA9\xDB" => "\xE6\x8B\x9B",
+ "\xA9\xDC" => "\xE6\x8A\xAB",
+ "\xA9\xDD" => "\xE6\x8B\x93",
+ "\xA9\xDE" => "\xE6\x8B\x94",
+ "\xA9\xDF" => "\xE6\x8B\x8B",
+ "\xA9\xE0" => "\xE6\x8B\x88",
+ "\xA9\xE1" => "\xE6\x8A\xA8",
+ "\xA9\xE2" => "\xE6\x8A\xBD",
+ "\xA9\xE3" => "\xE6\x8A\xBC",
+ "\xA9\xE4" => "\xE6\x8B\x90",
+ "\xA9\xE5" => "\xE6\x8B\x99",
+ "\xA9\xE6" => "\xE6\x8B\x87",
+ "\xA9\xE7" => "\xE6\x8B\x8D",
+ "\xA9\xE8" => "\xE6\x8A\xB5",
+ "\xA9\xE9" => "\xE6\x8B\x9A",
+ "\xA9\xEA" => "\xE6\x8A\xB1",
+ "\xA9\xEB" => "\xE6\x8B\x98",
+ "\xA9\xEC" => "\xE6\x8B\x96",
+ "\xA9\xED" => "\xE6\x8B\x97",
+ "\xA9\xEE" => "\xE6\x8B\x86",
+ "\xA9\xEF" => "\xE6\x8A\xAC",
+ "\xA9\xF0" => "\xE6\x8B\x8E",
+ "\xA9\xF1" => "\xE6\x94\xBE",
+ "\xA9\xF2" => "\xE6\x96\xA7",
+ "\xA9\xF3" => "\xE6\x96\xBC",
+ "\xA9\xF4" => "\xE6\x97\xBA",
+ "\xA9\xF5" => "\xE6\x98\x94",
+ "\xA9\xF6" => "\xE6\x98\x93",
+ "\xA9\xF7" => "\xE6\x98\x8C",
+ "\xA9\xF8" => "\xE6\x98\x86",
+ "\xA9\xF9" => "\xE6\x98\x82",
+ "\xA9\xFA" => "\xE6\x98\x8E",
+ "\xA9\xFB" => "\xE6\x98\x80",
+ "\xA9\xFC" => "\xE6\x98\x8F",
+ "\xA9\xFD" => "\xE6\x98\x95",
+ "\xA9\xFE" => "\xE6\x98\x8A",
+ "\xAA\x40" => "\xE6\x98\x87",
+ "\xAA\x41" => "\xE6\x9C\x8D",
+ "\xAA\x42" => "\xE6\x9C\x8B",
+ "\xAA\x43" => "\xE6\x9D\xAD",
+ "\xAA\x44" => "\xE6\x9E\x8B",
+ "\xAA\x45" => "\xE6\x9E\x95",
+ "\xAA\x46" => "\xE6\x9D\xB1",
+ "\xAA\x47" => "\xE6\x9E\x9C",
+ "\xAA\x48" => "\xE6\x9D\xB3",
+ "\xAA\x49" => "\xE6\x9D\xB7",
+ "\xAA\x4A" => "\xE6\x9E\x87",
+ "\xAA\x4B" => "\xE6\x9E\x9D",
+ "\xAA\x4C" => "\xE6\x9E\x97",
+ "\xAA\x4D" => "\xE6\x9D\xAF",
+ "\xAA\x4E" => "\xE6\x9D\xB0",
+ "\xAA\x4F" => "\xE6\x9D\xBF",
+ "\xAA\x50" => "\xE6\x9E\x89",
+ "\xAA\x51" => "\xE6\x9D\xBE",
+ "\xAA\x52" => "\xE6\x9E\x90",
+ "\xAA\x53" => "\xE6\x9D\xB5",
+ "\xAA\x54" => "\xE6\x9E\x9A",
+ "\xAA\x55" => "\xE6\x9E\x93",
+ "\xAA\x56" => "\xE6\x9D\xBC",
+ "\xAA\x57" => "\xE6\x9D\xAA",
+ "\xAA\x58" => "\xE6\x9D\xB2",
+ "\xAA\x59" => "\xE6\xAC\xA3",
+ "\xAA\x5A" => "\xE6\xAD\xA6",
+ "\xAA\x5B" => "\xE6\xAD\xA7",
+ "\xAA\x5C" => "\xE6\xAD\xBF",
+ "\xAA\x5D" => "\xE6\xB0\x93",
+ "\xAA\x5E" => "\xE6\xB0\x9B",
+ "\xAA\x5F" => "\xE6\xB3\xA3",
+ "\xAA\x60" => "\xE6\xB3\xA8",
+ "\xAA\x61" => "\xE6\xB3\xB3",
+ "\xAA\x62" => "\xE6\xB2\xB1",
+ "\xAA\x63" => "\xE6\xB3\x8C",
+ "\xAA\x64" => "\xE6\xB3\xA5",
+ "\xAA\x65" => "\xE6\xB2\xB3",
+ "\xAA\x66" => "\xE6\xB2\xBD",
+ "\xAA\x67" => "\xE6\xB2\xBE",
+ "\xAA\x68" => "\xE6\xB2\xBC",
+ "\xAA\x69" => "\xE6\xB3\xA2",
+ "\xAA\x6A" => "\xE6\xB2\xAB",
+ "\xAA\x6B" => "\xE6\xB3\x95",
+ "\xAA\x6C" => "\xE6\xB3\x93",
+ "\xAA\x6D" => "\xE6\xB2\xB8",
+ "\xAA\x6E" => "\xE6\xB3\x84",
+ "\xAA\x6F" => "\xE6\xB2\xB9",
+ "\xAA\x70" => "\xE6\xB3\x81",
+ "\xAA\x71" => "\xE6\xB2\xAE",
+ "\xAA\x72" => "\xE6\xB3\x97",
+ "\xAA\x73" => "\xE6\xB3\x85",
+ "\xAA\x74" => "\xE6\xB3\xB1",
+ "\xAA\x75" => "\xE6\xB2\xBF",
+ "\xAA\x76" => "\xE6\xB2\xBB",
+ "\xAA\x77" => "\xE6\xB3\xA1",
+ "\xAA\x78" => "\xE6\xB3\x9B",
+ "\xAA\x79" => "\xE6\xB3\x8A",
+ "\xAA\x7A" => "\xE6\xB2\xAC",
+ "\xAA\x7B" => "\xE6\xB3\xAF",
+ "\xAA\x7C" => "\xE6\xB3\x9C",
+ "\xAA\x7D" => "\xE6\xB3\x96",
+ "\xAA\x7E" => "\xE6\xB3\xA0",
+ "\xAA\xA1" => "\xE7\x82\x95",
+ "\xAA\xA2" => "\xE7\x82\x8E",
+ "\xAA\xA3" => "\xE7\x82\x92",
+ "\xAA\xA4" => "\xE7\x82\x8A",
+ "\xAA\xA5" => "\xE7\x82\x99",
+ "\xAA\xA6" => "\xE7\x88\xAC",
+ "\xAA\xA7" => "\xE7\x88\xAD",
+ "\xAA\xA8" => "\xE7\x88\xB8",
+ "\xAA\xA9" => "\xE7\x89\x88",
+ "\xAA\xAA" => "\xE7\x89\xA7",
+ "\xAA\xAB" => "\xE7\x89\xA9",
+ "\xAA\xAC" => "\xE7\x8B\x80",
+ "\xAA\xAD" => "\xE7\x8B\x8E",
+ "\xAA\xAE" => "\xE7\x8B\x99",
+ "\xAA\xAF" => "\xE7\x8B\x97",
+ "\xAA\xB0" => "\xE7\x8B\x90",
+ "\xAA\xB1" => "\xE7\x8E\xA9",
+ "\xAA\xB2" => "\xE7\x8E\xA8",
+ "\xAA\xB3" => "\xE7\x8E\x9F",
+ "\xAA\xB4" => "\xE7\x8E\xAB",
+ "\xAA\xB5" => "\xE7\x8E\xA5",
+ "\xAA\xB6" => "\xE7\x94\xBD",
+ "\xAA\xB7" => "\xE7\x96\x9D",
+ "\xAA\xB8" => "\xE7\x96\x99",
+ "\xAA\xB9" => "\xE7\x96\x9A",
+ "\xAA\xBA" => "\xE7\x9A\x84",
+ "\xAA\xBB" => "\xE7\x9B\x82",
+ "\xAA\xBC" => "\xE7\x9B\xB2",
+ "\xAA\xBD" => "\xE7\x9B\xB4",
+ "\xAA\xBE" => "\xE7\x9F\xA5",
+ "\xAA\xBF" => "\xE7\x9F\xBD",
+ "\xAA\xC0" => "\xE7\xA4\xBE",
+ "\xAA\xC1" => "\xE7\xA5\x80",
+ "\xAA\xC2" => "\xE7\xA5\x81",
+ "\xAA\xC3" => "\xE7\xA7\x89",
+ "\xAA\xC4" => "\xE7\xA7\x88",
+ "\xAA\xC5" => "\xE7\xA9\xBA",
+ "\xAA\xC6" => "\xE7\xA9\xB9",
+ "\xAA\xC7" => "\xE7\xAB\xBA",
+ "\xAA\xC8" => "\xE7\xB3\xBE",
+ "\xAA\xC9" => "\xE7\xBD\x94",
+ "\xAA\xCA" => "\xE7\xBE\x8C",
+ "\xAA\xCB" => "\xE7\xBE\x8B",
+ "\xAA\xCC" => "\xE8\x80\x85",
+ "\xAA\xCD" => "\xE8\x82\xBA",
+ "\xAA\xCE" => "\xE8\x82\xA5",
+ "\xAA\xCF" => "\xE8\x82\xA2",
+ "\xAA\xD0" => "\xE8\x82\xB1",
+ "\xAA\xD1" => "\xE8\x82\xA1",
+ "\xAA\xD2" => "\xE8\x82\xAB",
+ "\xAA\xD3" => "\xE8\x82\xA9",
+ "\xAA\xD4" => "\xE8\x82\xB4",
+ "\xAA\xD5" => "\xE8\x82\xAA",
+ "\xAA\xD6" => "\xE8\x82\xAF",
+ "\xAA\xD7" => "\xE8\x87\xA5",
+ "\xAA\xD8" => "\xE8\x87\xBE",
+ "\xAA\xD9" => "\xE8\x88\x8D",
+ "\xAA\xDA" => "\xE8\x8A\xB3",
+ "\xAA\xDB" => "\xE8\x8A\x9D",
+ "\xAA\xDC" => "\xE8\x8A\x99",
+ "\xAA\xDD" => "\xE8\x8A\xAD",
+ "\xAA\xDE" => "\xE8\x8A\xBD",
+ "\xAA\xDF" => "\xE8\x8A\x9F",
+ "\xAA\xE0" => "\xE8\x8A\xB9",
+ "\xAA\xE1" => "\xE8\x8A\xB1",
+ "\xAA\xE2" => "\xE8\x8A\xAC",
+ "\xAA\xE3" => "\xE8\x8A\xA5",
+ "\xAA\xE4" => "\xE8\x8A\xAF",
+ "\xAA\xE5" => "\xE8\x8A\xB8",
+ "\xAA\xE6" => "\xE8\x8A\xA3",
+ "\xAA\xE7" => "\xE8\x8A\xB0",
+ "\xAA\xE8" => "\xE8\x8A\xBE",
+ "\xAA\xE9" => "\xE8\x8A\xB7",
+ "\xAA\xEA" => "\xE8\x99\x8E",
+ "\xAA\xEB" => "\xE8\x99\xB1",
+ "\xAA\xEC" => "\xE5\x88\x9D",
+ "\xAA\xED" => "\xE8\xA1\xA8",
+ "\xAA\xEE" => "\xE8\xBB\x8B",
+ "\xAA\xEF" => "\xE8\xBF\x8E",
+ "\xAA\xF0" => "\xE8\xBF\x94",
+ "\xAA\xF1" => "\xE8\xBF\x91",
+ "\xAA\xF2" => "\xE9\x82\xB5",
+ "\xAA\xF3" => "\xE9\x82\xB8",
+ "\xAA\xF4" => "\xE9\x82\xB1",
+ "\xAA\xF5" => "\xE9\x82\xB6",
+ "\xAA\xF6" => "\xE9\x87\x87",
+ "\xAA\xF7" => "\xE9\x87\x91",
+ "\xAA\xF8" => "\xE9\x95\xB7",
+ "\xAA\xF9" => "\xE9\x96\x80",
+ "\xAA\xFA" => "\xE9\x98\x9C",
+ "\xAA\xFB" => "\xE9\x99\x80",
+ "\xAA\xFC" => "\xE9\x98\xBF",
+ "\xAA\xFD" => "\xE9\x98\xBB",
+ "\xAA\xFE" => "\xE9\x99\x84",
+ "\xAB\x40" => "\xE9\x99\x82",
+ "\xAB\x41" => "\xE9\x9A\xB9",
+ "\xAB\x42" => "\xE9\x9B\xA8",
+ "\xAB\x43" => "\xE9\x9D\x92",
+ "\xAB\x44" => "\xE9\x9D\x9E",
+ "\xAB\x45" => "\xE4\xBA\x9F",
+ "\xAB\x46" => "\xE4\xBA\xAD",
+ "\xAB\x47" => "\xE4\xBA\xAE",
+ "\xAB\x48" => "\xE4\xBF\xA1",
+ "\xAB\x49" => "\xE4\xBE\xB5",
+ "\xAB\x4A" => "\xE4\xBE\xAF",
+ "\xAB\x4B" => "\xE4\xBE\xBF",
+ "\xAB\x4C" => "\xE4\xBF\xA0",
+ "\xAB\x4D" => "\xE4\xBF\x91",
+ "\xAB\x4E" => "\xE4\xBF\x8F",
+ "\xAB\x4F" => "\xE4\xBF\x9D",
+ "\xAB\x50" => "\xE4\xBF\x83",
+ "\xAB\x51" => "\xE4\xBE\xB6",
+ "\xAB\x52" => "\xE4\xBF\x98",
+ "\xAB\x53" => "\xE4\xBF\x9F",
+ "\xAB\x54" => "\xE4\xBF\x8A",
+ "\xAB\x55" => "\xE4\xBF\x97",
+ "\xAB\x56" => "\xE4\xBE\xAE",
+ "\xAB\x57" => "\xE4\xBF\x90",
+ "\xAB\x58" => "\xE4\xBF\x84",
+ "\xAB\x59" => "\xE4\xBF\x82",
+ "\xAB\x5A" => "\xE4\xBF\x9A",
+ "\xAB\x5B" => "\xE4\xBF\x8E",
+ "\xAB\x5C" => "\xE4\xBF\x9E",
+ "\xAB\x5D" => "\xE4\xBE\xB7",
+ "\xAB\x5E" => "\xE5\x85\x97",
+ "\xAB\x5F" => "\xE5\x86\x92",
+ "\xAB\x60" => "\xE5\x86\x91",
+ "\xAB\x61" => "\xE5\x86\xA0",
+ "\xAB\x62" => "\xE5\x89\x8E",
+ "\xAB\x63" => "\xE5\x89\x83",
+ "\xAB\x64" => "\xE5\x89\x8A",
+ "\xAB\x65" => "\xE5\x89\x8D",
+ "\xAB\x66" => "\xE5\x89\x8C",
+ "\xAB\x67" => "\xE5\x89\x8B",
+ "\xAB\x68" => "\xE5\x89\x87",
+ "\xAB\x69" => "\xE5\x8B\x87",
+ "\xAB\x6A" => "\xE5\x8B\x89",
+ "\xAB\x6B" => "\xE5\x8B\x83",
+ "\xAB\x6C" => "\xE5\x8B\x81",
+ "\xAB\x6D" => "\xE5\x8C\x8D",
+ "\xAB\x6E" => "\xE5\x8D\x97",
+ "\xAB\x6F" => "\xE5\x8D\xBB",
+ "\xAB\x70" => "\xE5\x8E\x9A",
+ "\xAB\x71" => "\xE5\x8F\x9B",
+ "\xAB\x72" => "\xE5\x92\xAC",
+ "\xAB\x73" => "\xE5\x93\x80",
+ "\xAB\x74" => "\xE5\x92\xA8",
+ "\xAB\x75" => "\xE5\x93\x8E",
+ "\xAB\x76" => "\xE5\x93\x89",
+ "\xAB\x77" => "\xE5\x92\xB8",
+ "\xAB\x78" => "\xE5\x92\xA6",
+ "\xAB\x79" => "\xE5\x92\xB3",
+ "\xAB\x7A" => "\xE5\x93\x87",
+ "\xAB\x7B" => "\xE5\x93\x82",
+ "\xAB\x7C" => "\xE5\x92\xBD",
+ "\xAB\x7D" => "\xE5\x92\xAA",
+ "\xAB\x7E" => "\xE5\x93\x81",
+ "\xAB\xA1" => "\xE5\x93\x84",
+ "\xAB\xA2" => "\xE5\x93\x88",
+ "\xAB\xA3" => "\xE5\x92\xAF",
+ "\xAB\xA4" => "\xE5\x92\xAB",
+ "\xAB\xA5" => "\xE5\x92\xB1",
+ "\xAB\xA6" => "\xE5\x92\xBB",
+ "\xAB\xA7" => "\xE5\x92\xA9",
+ "\xAB\xA8" => "\xE5\x92\xA7",
+ "\xAB\xA9" => "\xE5\x92\xBF",
+ "\xAB\xAA" => "\xE5\x9B\xBF",
+ "\xAB\xAB" => "\xE5\x9E\x82",
+ "\xAB\xAC" => "\xE5\x9E\x8B",
+ "\xAB\xAD" => "\xE5\x9E\xA0",
+ "\xAB\xAE" => "\xE5\x9E\xA3",
+ "\xAB\xAF" => "\xE5\x9E\xA2",
+ "\xAB\xB0" => "\xE5\x9F\x8E",
+ "\xAB\xB1" => "\xE5\x9E\xAE",
+ "\xAB\xB2" => "\xE5\x9E\x93",
+ "\xAB\xB3" => "\xE5\xA5\x95",
+ "\xAB\xB4" => "\xE5\xA5\x91",
+ "\xAB\xB5" => "\xE5\xA5\x8F",
+ "\xAB\xB6" => "\xE5\xA5\x8E",
+ "\xAB\xB7" => "\xE5\xA5\x90",
+ "\xAB\xB8" => "\xE5\xA7\x9C",
+ "\xAB\xB9" => "\xE5\xA7\x98",
+ "\xAB\xBA" => "\xE5\xA7\xBF",
+ "\xAB\xBB" => "\xE5\xA7\xA3",
+ "\xAB\xBC" => "\xE5\xA7\xA8",
+ "\xAB\xBD" => "\xE5\xA8\x83",
+ "\xAB\xBE" => "\xE5\xA7\xA5",
+ "\xAB\xBF" => "\xE5\xA7\xAA",
+ "\xAB\xC0" => "\xE5\xA7\x9A",
+ "\xAB\xC1" => "\xE5\xA7\xA6",
+ "\xAB\xC2" => "\xE5\xA8\x81",
+ "\xAB\xC3" => "\xE5\xA7\xBB",
+ "\xAB\xC4" => "\xE5\xAD\xA9",
+ "\xAB\xC5" => "\xE5\xAE\xA3",
+ "\xAB\xC6" => "\xE5\xAE\xA6",
+ "\xAB\xC7" => "\xE5\xAE\xA4",
+ "\xAB\xC8" => "\xE5\xAE\xA2",
+ "\xAB\xC9" => "\xE5\xAE\xA5",
+ "\xAB\xCA" => "\xE5\xB0\x81",
+ "\xAB\xCB" => "\xE5\xB1\x8E",
+ "\xAB\xCC" => "\xE5\xB1\x8F",
+ "\xAB\xCD" => "\xE5\xB1\x8D",
+ "\xAB\xCE" => "\xE5\xB1\x8B",
+ "\xAB\xCF" => "\xE5\xB3\x99",
+ "\xAB\xD0" => "\xE5\xB3\x92",
+ "\xAB\xD1" => "\xE5\xB7\xB7",
+ "\xAB\xD2" => "\xE5\xB8\x9D",
+ "\xAB\xD3" => "\xE5\xB8\xA5",
+ "\xAB\xD4" => "\xE5\xB8\x9F",
+ "\xAB\xD5" => "\xE5\xB9\xBD",
+ "\xAB\xD6" => "\xE5\xBA\xA0",
+ "\xAB\xD7" => "\xE5\xBA\xA6",
+ "\xAB\xD8" => "\xE5\xBB\xBA",
+ "\xAB\xD9" => "\xE5\xBC\x88",
+ "\xAB\xDA" => "\xE5\xBC\xAD",
+ "\xAB\xDB" => "\xE5\xBD\xA5",
+ "\xAB\xDC" => "\xE5\xBE\x88",
+ "\xAB\xDD" => "\xE5\xBE\x85",
+ "\xAB\xDE" => "\xE5\xBE\x8A",
+ "\xAB\xDF" => "\xE5\xBE\x8B",
+ "\xAB\xE0" => "\xE5\xBE\x87",
+ "\xAB\xE1" => "\xE5\xBE\x8C",
+ "\xAB\xE2" => "\xE5\xBE\x89",
+ "\xAB\xE3" => "\xE6\x80\x92",
+ "\xAB\xE4" => "\xE6\x80\x9D",
+ "\xAB\xE5" => "\xE6\x80\xA0",
+ "\xAB\xE6" => "\xE6\x80\xA5",
+ "\xAB\xE7" => "\xE6\x80\x8E",
+ "\xAB\xE8" => "\xE6\x80\xA8",
+ "\xAB\xE9" => "\xE6\x81\x8D",
+ "\xAB\xEA" => "\xE6\x81\xB0",
+ "\xAB\xEB" => "\xE6\x81\xA8",
+ "\xAB\xEC" => "\xE6\x81\xA2",
+ "\xAB\xED" => "\xE6\x81\x86",
+ "\xAB\xEE" => "\xE6\x81\x83",
+ "\xAB\xEF" => "\xE6\x81\xAC",
+ "\xAB\xF0" => "\xE6\x81\xAB",
+ "\xAB\xF1" => "\xE6\x81\xAA",
+ "\xAB\xF2" => "\xE6\x81\xA4",
+ "\xAB\xF3" => "\xE6\x89\x81",
+ "\xAB\xF4" => "\xE6\x8B\x9C",
+ "\xAB\xF5" => "\xE6\x8C\x96",
+ "\xAB\xF6" => "\xE6\x8C\x89",
+ "\xAB\xF7" => "\xE6\x8B\xBC",
+ "\xAB\xF8" => "\xE6\x8B\xAD",
+ "\xAB\xF9" => "\xE6\x8C\x81",
+ "\xAB\xFA" => "\xE6\x8B\xAE",
+ "\xAB\xFB" => "\xE6\x8B\xBD",
+ "\xAB\xFC" => "\xE6\x8C\x87",
+ "\xAB\xFD" => "\xE6\x8B\xB1",
+ "\xAB\xFE" => "\xE6\x8B\xB7",
+ "\xAC\x40" => "\xE6\x8B\xAF",
+ "\xAC\x41" => "\xE6\x8B\xAC",
+ "\xAC\x42" => "\xE6\x8B\xBE",
+ "\xAC\x43" => "\xE6\x8B\xB4",
+ "\xAC\x44" => "\xE6\x8C\x91",
+ "\xAC\x45" => "\xE6\x8C\x82",
+ "\xAC\x46" => "\xE6\x94\xBF",
+ "\xAC\x47" => "\xE6\x95\x85",
+ "\xAC\x48" => "\xE6\x96\xAB",
+ "\xAC\x49" => "\xE6\x96\xBD",
+ "\xAC\x4A" => "\xE6\x97\xA2",
+ "\xAC\x4B" => "\xE6\x98\xA5",
+ "\xAC\x4C" => "\xE6\x98\xAD",
+ "\xAC\x4D" => "\xE6\x98\xA0",
+ "\xAC\x4E" => "\xE6\x98\xA7",
+ "\xAC\x4F" => "\xE6\x98\xAF",
+ "\xAC\x50" => "\xE6\x98\x9F",
+ "\xAC\x51" => "\xE6\x98\xA8",
+ "\xAC\x52" => "\xE6\x98\xB1",
+ "\xAC\x53" => "\xE6\x98\xA4",
+ "\xAC\x54" => "\xE6\x9B\xB7",
+ "\xAC\x55" => "\xE6\x9F\xBF",
+ "\xAC\x56" => "\xE6\x9F\x93",
+ "\xAC\x57" => "\xE6\x9F\xB1",
+ "\xAC\x58" => "\xE6\x9F\x94",
+ "\xAC\x59" => "\xE6\x9F\x90",
+ "\xAC\x5A" => "\xE6\x9F\xAC",
+ "\xAC\x5B" => "\xE6\x9E\xB6",
+ "\xAC\x5C" => "\xE6\x9E\xAF",
+ "\xAC\x5D" => "\xE6\x9F\xB5",
+ "\xAC\x5E" => "\xE6\x9F\xA9",
+ "\xAC\x5F" => "\xE6\x9F\xAF",
+ "\xAC\x60" => "\xE6\x9F\x84",
+ "\xAC\x61" => "\xE6\x9F\x91",
+ "\xAC\x62" => "\xE6\x9E\xB4",
+ "\xAC\x63" => "\xE6\x9F\x9A",
+ "\xAC\x64" => "\xE6\x9F\xA5",
+ "\xAC\x65" => "\xE6\x9E\xB8",
+ "\xAC\x66" => "\xE6\x9F\x8F",
+ "\xAC\x67" => "\xE6\x9F\x9E",
+ "\xAC\x68" => "\xE6\x9F\xB3",
+ "\xAC\x69" => "\xE6\x9E\xB0",
+ "\xAC\x6A" => "\xE6\x9F\x99",
+ "\xAC\x6B" => "\xE6\x9F\xA2",
+ "\xAC\x6C" => "\xE6\x9F\x9D",
+ "\xAC\x6D" => "\xE6\x9F\x92",
+ "\xAC\x6E" => "\xE6\xAD\xAA",
+ "\xAC\x6F" => "\xE6\xAE\x83",
+ "\xAC\x70" => "\xE6\xAE\x86",
+ "\xAC\x71" => "\xE6\xAE\xB5",
+ "\xAC\x72" => "\xE6\xAF\x92",
+ "\xAC\x73" => "\xE6\xAF\x97",
+ "\xAC\x74" => "\xE6\xB0\x9F",
+ "\xAC\x75" => "\xE6\xB3\x89",
+ "\xAC\x76" => "\xE6\xB4\x8B",
+ "\xAC\x77" => "\xE6\xB4\xB2",
+ "\xAC\x78" => "\xE6\xB4\xAA",
+ "\xAC\x79" => "\xE6\xB5\x81",
+ "\xAC\x7A" => "\xE6\xB4\xA5",
+ "\xAC\x7B" => "\xE6\xB4\x8C",
+ "\xAC\x7C" => "\xE6\xB4\xB1",
+ "\xAC\x7D" => "\xE6\xB4\x9E",
+ "\xAC\x7E" => "\xE6\xB4\x97",
+ "\xAC\xA1" => "\xE6\xB4\xBB",
+ "\xAC\xA2" => "\xE6\xB4\xBD",
+ "\xAC\xA3" => "\xE6\xB4\xBE",
+ "\xAC\xA4" => "\xE6\xB4\xB6",
+ "\xAC\xA5" => "\xE6\xB4\x9B",
+ "\xAC\xA6" => "\xE6\xB3\xB5",
+ "\xAC\xA7" => "\xE6\xB4\xB9",
+ "\xAC\xA8" => "\xE6\xB4\xA7",
+ "\xAC\xA9" => "\xE6\xB4\xB8",
+ "\xAC\xAA" => "\xE6\xB4\xA9",
+ "\xAC\xAB" => "\xE6\xB4\xAE",
+ "\xAC\xAC" => "\xE6\xB4\xB5",
+ "\xAC\xAD" => "\xE6\xB4\x8E",
+ "\xAC\xAE" => "\xE6\xB4\xAB",
+ "\xAC\xAF" => "\xE7\x82\xAB",
+ "\xAC\xB0" => "\xE7\x82\xBA",
+ "\xAC\xB1" => "\xE7\x82\xB3",
+ "\xAC\xB2" => "\xE7\x82\xAC",
+ "\xAC\xB3" => "\xE7\x82\xAF",
+ "\xAC\xB4" => "\xE7\x82\xAD",
+ "\xAC\xB5" => "\xE7\x82\xB8",
+ "\xAC\xB6" => "\xE7\x82\xAE",
+ "\xAC\xB7" => "\xE7\x82\xA4",
+ "\xAC\xB8" => "\xE7\x88\xB0",
+ "\xAC\xB9" => "\xE7\x89\xB2",
+ "\xAC\xBA" => "\xE7\x89\xAF",
+ "\xAC\xBB" => "\xE7\x89\xB4",
+ "\xAC\xBC" => "\xE7\x8B\xA9",
+ "\xAC\xBD" => "\xE7\x8B\xA0",
+ "\xAC\xBE" => "\xE7\x8B\xA1",
+ "\xAC\xBF" => "\xE7\x8E\xB7",
+ "\xAC\xC0" => "\xE7\x8F\x8A",
+ "\xAC\xC1" => "\xE7\x8E\xBB",
+ "\xAC\xC2" => "\xE7\x8E\xB2",
+ "\xAC\xC3" => "\xE7\x8F\x8D",
+ "\xAC\xC4" => "\xE7\x8F\x80",
+ "\xAC\xC5" => "\xE7\x8E\xB3",
+ "\xAC\xC6" => "\xE7\x94\x9A",
+ "\xAC\xC7" => "\xE7\x94\xAD",
+ "\xAC\xC8" => "\xE7\x95\x8F",
+ "\xAC\xC9" => "\xE7\x95\x8C",
+ "\xAC\xCA" => "\xE7\x95\x8E",
+ "\xAC\xCB" => "\xE7\x95\x8B",
+ "\xAC\xCC" => "\xE7\x96\xAB",
+ "\xAC\xCD" => "\xE7\x96\xA4",
+ "\xAC\xCE" => "\xE7\x96\xA5",
+ "\xAC\xCF" => "\xE7\x96\xA2",
+ "\xAC\xD0" => "\xE7\x96\xA3",
+ "\xAC\xD1" => "\xE7\x99\xB8",
+ "\xAC\xD2" => "\xE7\x9A\x86",
+ "\xAC\xD3" => "\xE7\x9A\x87",
+ "\xAC\xD4" => "\xE7\x9A\x88",
+ "\xAC\xD5" => "\xE7\x9B\x88",
+ "\xAC\xD6" => "\xE7\x9B\x86",
+ "\xAC\xD7" => "\xE7\x9B\x83",
+ "\xAC\xD8" => "\xE7\x9B\x85",
+ "\xAC\xD9" => "\xE7\x9C\x81",
+ "\xAC\xDA" => "\xE7\x9B\xB9",
+ "\xAC\xDB" => "\xE7\x9B\xB8",
+ "\xAC\xDC" => "\xE7\x9C\x89",
+ "\xAC\xDD" => "\xE7\x9C\x8B",
+ "\xAC\xDE" => "\xE7\x9B\xBE",
+ "\xAC\xDF" => "\xE7\x9B\xBC",
+ "\xAC\xE0" => "\xE7\x9C\x87",
+ "\xAC\xE1" => "\xE7\x9F\x9C",
+ "\xAC\xE2" => "\xE7\xA0\x82",
+ "\xAC\xE3" => "\xE7\xA0\x94",
+ "\xAC\xE4" => "\xE7\xA0\x8C",
+ "\xAC\xE5" => "\xE7\xA0\x8D",
+ "\xAC\xE6" => "\xE7\xA5\x86",
+ "\xAC\xE7" => "\xE7\xA5\x89",
+ "\xAC\xE8" => "\xE7\xA5\x88",
+ "\xAC\xE9" => "\xE7\xA5\x87",
+ "\xAC\xEA" => "\xE7\xA6\xB9",
+ "\xAC\xEB" => "\xE7\xA6\xBA",
+ "\xAC\xEC" => "\xE7\xA7\x91",
+ "\xAC\xED" => "\xE7\xA7\x92",
+ "\xAC\xEE" => "\xE7\xA7\x8B",
+ "\xAC\xEF" => "\xE7\xA9\xBF",
+ "\xAC\xF0" => "\xE7\xAA\x81",
+ "\xAC\xF1" => "\xE7\xAB\xBF",
+ "\xAC\xF2" => "\xE7\xAB\xBD",
+ "\xAC\xF3" => "\xE7\xB1\xBD",
+ "\xAC\xF4" => "\xE7\xB4\x82",
+ "\xAC\xF5" => "\xE7\xB4\x85",
+ "\xAC\xF6" => "\xE7\xB4\x80",
+ "\xAC\xF7" => "\xE7\xB4\x89",
+ "\xAC\xF8" => "\xE7\xB4\x87",
+ "\xAC\xF9" => "\xE7\xB4\x84",
+ "\xAC\xFA" => "\xE7\xB4\x86",
+ "\xAC\xFB" => "\xE7\xBC\xB8",
+ "\xAC\xFC" => "\xE7\xBE\x8E",
+ "\xAC\xFD" => "\xE7\xBE\xBF",
+ "\xAC\xFE" => "\xE8\x80\x84",
+ "\xAD\x40" => "\xE8\x80\x90",
+ "\xAD\x41" => "\xE8\x80\x8D",
+ "\xAD\x42" => "\xE8\x80\x91",
+ "\xAD\x43" => "\xE8\x80\xB6",
+ "\xAD\x44" => "\xE8\x83\x96",
+ "\xAD\x45" => "\xE8\x83\xA5",
+ "\xAD\x46" => "\xE8\x83\x9A",
+ "\xAD\x47" => "\xE8\x83\x83",
+ "\xAD\x48" => "\xE8\x83\x84",
+ "\xAD\x49" => "\xE8\x83\x8C",
+ "\xAD\x4A" => "\xE8\x83\xA1",
+ "\xAD\x4B" => "\xE8\x83\x9B",
+ "\xAD\x4C" => "\xE8\x83\x8E",
+ "\xAD\x4D" => "\xE8\x83\x9E",
+ "\xAD\x4E" => "\xE8\x83\xA4",
+ "\xAD\x4F" => "\xE8\x83\x9D",
+ "\xAD\x50" => "\xE8\x87\xB4",
+ "\xAD\x51" => "\xE8\x88\xA2",
+ "\xAD\x52" => "\xE8\x8B\xA7",
+ "\xAD\x53" => "\xE8\x8C\x83",
+ "\xAD\x54" => "\xE8\x8C\x85",
+ "\xAD\x55" => "\xE8\x8B\xA3",
+ "\xAD\x56" => "\xE8\x8B\x9B",
+ "\xAD\x57" => "\xE8\x8B\xA6",
+ "\xAD\x58" => "\xE8\x8C\x84",
+ "\xAD\x59" => "\xE8\x8B\xA5",
+ "\xAD\x5A" => "\xE8\x8C\x82",
+ "\xAD\x5B" => "\xE8\x8C\x89",
+ "\xAD\x5C" => "\xE8\x8B\x92",
+ "\xAD\x5D" => "\xE8\x8B\x97",
+ "\xAD\x5E" => "\xE8\x8B\xB1",
+ "\xAD\x5F" => "\xE8\x8C\x81",
+ "\xAD\x60" => "\xE8\x8B\x9C",
+ "\xAD\x61" => "\xE8\x8B\x94",
+ "\xAD\x62" => "\xE8\x8B\x91",
+ "\xAD\x63" => "\xE8\x8B\x9E",
+ "\xAD\x64" => "\xE8\x8B\x93",
+ "\xAD\x65" => "\xE8\x8B\x9F",
+ "\xAD\x66" => "\xE8\x8B\xAF",
+ "\xAD\x67" => "\xE8\x8C\x86",
+ "\xAD\x68" => "\xE8\x99\x90",
+ "\xAD\x69" => "\xE8\x99\xB9",
+ "\xAD\x6A" => "\xE8\x99\xBB",
+ "\xAD\x6B" => "\xE8\x99\xBA",
+ "\xAD\x6C" => "\xE8\xA1\x8D",
+ "\xAD\x6D" => "\xE8\xA1\xAB",
+ "\xAD\x6E" => "\xE8\xA6\x81",
+ "\xAD\x6F" => "\xE8\xA7\x94",
+ "\xAD\x70" => "\xE8\xA8\x88",
+ "\xAD\x71" => "\xE8\xA8\x82",
+ "\xAD\x72" => "\xE8\xA8\x83",
+ "\xAD\x73" => "\xE8\xB2\x9E",
+ "\xAD\x74" => "\xE8\xB2\xA0",
+ "\xAD\x75" => "\xE8\xB5\xB4",
+ "\xAD\x76" => "\xE8\xB5\xB3",
+ "\xAD\x77" => "\xE8\xB6\xB4",
+ "\xAD\x78" => "\xE8\xBB\x8D",
+ "\xAD\x79" => "\xE8\xBB\x8C",
+ "\xAD\x7A" => "\xE8\xBF\xB0",
+ "\xAD\x7B" => "\xE8\xBF\xA6",
+ "\xAD\x7C" => "\xE8\xBF\xA2",
+ "\xAD\x7D" => "\xE8\xBF\xAA",
+ "\xAD\x7E" => "\xE8\xBF\xA5",
+ "\xAD\xA1" => "\xE8\xBF\xAD",
+ "\xAD\xA2" => "\xE8\xBF\xAB",
+ "\xAD\xA3" => "\xE8\xBF\xA4",
+ "\xAD\xA4" => "\xE8\xBF\xA8",
+ "\xAD\xA5" => "\xE9\x83\x8A",
+ "\xAD\xA6" => "\xE9\x83\x8E",
+ "\xAD\xA7" => "\xE9\x83\x81",
+ "\xAD\xA8" => "\xE9\x83\x83",
+ "\xAD\xA9" => "\xE9\x85\x8B",
+ "\xAD\xAA" => "\xE9\x85\x8A",
+ "\xAD\xAB" => "\xE9\x87\x8D",
+ "\xAD\xAC" => "\xE9\x96\x82",
+ "\xAD\xAD" => "\xE9\x99\x90",
+ "\xAD\xAE" => "\xE9\x99\x8B",
+ "\xAD\xAF" => "\xE9\x99\x8C",
+ "\xAD\xB0" => "\xE9\x99\x8D",
+ "\xAD\xB1" => "\xE9\x9D\xA2",
+ "\xAD\xB2" => "\xE9\x9D\xA9",
+ "\xAD\xB3" => "\xE9\x9F\x8B",
+ "\xAD\xB4" => "\xE9\x9F\xAD",
+ "\xAD\xB5" => "\xE9\x9F\xB3",
+ "\xAD\xB6" => "\xE9\xA0\x81",
+ "\xAD\xB7" => "\xE9\xA2\xA8",
+ "\xAD\xB8" => "\xE9\xA3\x9B",
+ "\xAD\xB9" => "\xE9\xA3\x9F",
+ "\xAD\xBA" => "\xE9\xA6\x96",
+ "\xAD\xBB" => "\xE9\xA6\x99",
+ "\xAD\xBC" => "\xE4\xB9\x98",
+ "\xAD\xBD" => "\xE4\xBA\xB3",
+ "\xAD\xBE" => "\xE5\x80\x8C",
+ "\xAD\xBF" => "\xE5\x80\x8D",
+ "\xAD\xC0" => "\xE5\x80\xA3",
+ "\xAD\xC1" => "\xE4\xBF\xAF",
+ "\xAD\xC2" => "\xE5\x80\xA6",
+ "\xAD\xC3" => "\xE5\x80\xA5",
+ "\xAD\xC4" => "\xE4\xBF\xB8",
+ "\xAD\xC5" => "\xE5\x80\xA9",
+ "\xAD\xC6" => "\xE5\x80\x96",
+ "\xAD\xC7" => "\xE5\x80\x86",
+ "\xAD\xC8" => "\xE5\x80\xBC",
+ "\xAD\xC9" => "\xE5\x80\x9F",
+ "\xAD\xCA" => "\xE5\x80\x9A",
+ "\xAD\xCB" => "\xE5\x80\x92",
+ "\xAD\xCC" => "\xE5\x80\x91",
+ "\xAD\xCD" => "\xE4\xBF\xBA",
+ "\xAD\xCE" => "\xE5\x80\x80",
+ "\xAD\xCF" => "\xE5\x80\x94",
+ "\xAD\xD0" => "\xE5\x80\xA8",
+ "\xAD\xD1" => "\xE4\xBF\xB1",
+ "\xAD\xD2" => "\xE5\x80\xA1",
+ "\xAD\xD3" => "\xE5\x80\x8B",
+ "\xAD\xD4" => "\xE5\x80\x99",
+ "\xAD\xD5" => "\xE5\x80\x98",
+ "\xAD\xD6" => "\xE4\xBF\xB3",
+ "\xAD\xD7" => "\xE4\xBF\xAE",
+ "\xAD\xD8" => "\xE5\x80\xAD",
+ "\xAD\xD9" => "\xE5\x80\xAA",
+ "\xAD\xDA" => "\xE4\xBF\xBE",
+ "\xAD\xDB" => "\xE5\x80\xAB",
+ "\xAD\xDC" => "\xE5\x80\x89",
+ "\xAD\xDD" => "\xE5\x85\xBC",
+ "\xAD\xDE" => "\xE5\x86\xA4",
+ "\xAD\xDF" => "\xE5\x86\xA5",
+ "\xAD\xE0" => "\xE5\x86\xA2",
+ "\xAD\xE1" => "\xE5\x87\x8D",
+ "\xAD\xE2" => "\xE5\x87\x8C",
+ "\xAD\xE3" => "\xE5\x87\x86",
+ "\xAD\xE4" => "\xE5\x87\x8B",
+ "\xAD\xE5" => "\xE5\x89\x96",
+ "\xAD\xE6" => "\xE5\x89\x9C",
+ "\xAD\xE7" => "\xE5\x89\x94",
+ "\xAD\xE8" => "\xE5\x89\x9B",
+ "\xAD\xE9" => "\xE5\x89\x9D",
+ "\xAD\xEA" => "\xE5\x8C\xAA",
+ "\xAD\xEB" => "\xE5\x8D\xBF",
+ "\xAD\xEC" => "\xE5\x8E\x9F",
+ "\xAD\xED" => "\xE5\x8E\x9D",
+ "\xAD\xEE" => "\xE5\x8F\x9F",
+ "\xAD\xEF" => "\xE5\x93\xA8",
+ "\xAD\xF0" => "\xE5\x94\x90",
+ "\xAD\xF1" => "\xE5\x94\x81",
+ "\xAD\xF2" => "\xE5\x94\xB7",
+ "\xAD\xF3" => "\xE5\x93\xBC",
+ "\xAD\xF4" => "\xE5\x93\xA5",
+ "\xAD\xF5" => "\xE5\x93\xB2",
+ "\xAD\xF6" => "\xE5\x94\x86",
+ "\xAD\xF7" => "\xE5\x93\xBA",
+ "\xAD\xF8" => "\xE5\x94\x94",
+ "\xAD\xF9" => "\xE5\x93\xA9",
+ "\xAD\xFA" => "\xE5\x93\xAD",
+ "\xAD\xFB" => "\xE5\x93\xA1",
+ "\xAD\xFC" => "\xE5\x94\x89",
+ "\xAD\xFD" => "\xE5\x93\xAE",
+ "\xAD\xFE" => "\xE5\x93\xAA",
+ "\xAE\x40" => "\xE5\x93\xA6",
+ "\xAE\x41" => "\xE5\x94\xA7",
+ "\xAE\x42" => "\xE5\x94\x87",
+ "\xAE\x43" => "\xE5\x93\xBD",
+ "\xAE\x44" => "\xE5\x94\x8F",
+ "\xAE\x45" => "\xE5\x9C\x83",
+ "\xAE\x46" => "\xE5\x9C\x84",
+ "\xAE\x47" => "\xE5\x9F\x82",
+ "\xAE\x48" => "\xE5\x9F\x94",
+ "\xAE\x49" => "\xE5\x9F\x8B",
+ "\xAE\x4A" => "\xE5\x9F\x83",
+ "\xAE\x4B" => "\xE5\xA0\x89",
+ "\xAE\x4C" => "\xE5\xA4\x8F",
+ "\xAE\x4D" => "\xE5\xA5\x97",
+ "\xAE\x4E" => "\xE5\xA5\x98",
+ "\xAE\x4F" => "\xE5\xA5\x9A",
+ "\xAE\x50" => "\xE5\xA8\x91",
+ "\xAE\x51" => "\xE5\xA8\x98",
+ "\xAE\x52" => "\xE5\xA8\x9C",
+ "\xAE\x53" => "\xE5\xA8\x9F",
+ "\xAE\x54" => "\xE5\xA8\x9B",
+ "\xAE\x55" => "\xE5\xA8\x93",
+ "\xAE\x56" => "\xE5\xA7\xAC",
+ "\xAE\x57" => "\xE5\xA8\xA0",
+ "\xAE\x58" => "\xE5\xA8\xA3",
+ "\xAE\x59" => "\xE5\xA8\xA9",
+ "\xAE\x5A" => "\xE5\xA8\xA5",
+ "\xAE\x5B" => "\xE5\xA8\x8C",
+ "\xAE\x5C" => "\xE5\xA8\x89",
+ "\xAE\x5D" => "\xE5\xAD\xAB",
+ "\xAE\x5E" => "\xE5\xB1\x98",
+ "\xAE\x5F" => "\xE5\xAE\xB0",
+ "\xAE\x60" => "\xE5\xAE\xB3",
+ "\xAE\x61" => "\xE5\xAE\xB6",
+ "\xAE\x62" => "\xE5\xAE\xB4",
+ "\xAE\x63" => "\xE5\xAE\xAE",
+ "\xAE\x64" => "\xE5\xAE\xB5",
+ "\xAE\x65" => "\xE5\xAE\xB9",
+ "\xAE\x66" => "\xE5\xAE\xB8",
+ "\xAE\x67" => "\xE5\xB0\x84",
+ "\xAE\x68" => "\xE5\xB1\x91",
+ "\xAE\x69" => "\xE5\xB1\x95",
+ "\xAE\x6A" => "\xE5\xB1\x90",
+ "\xAE\x6B" => "\xE5\xB3\xAD",
+ "\xAE\x6C" => "\xE5\xB3\xBD",
+ "\xAE\x6D" => "\xE5\xB3\xBB",
+ "\xAE\x6E" => "\xE5\xB3\xAA",
+ "\xAE\x6F" => "\xE5\xB3\xA8",
+ "\xAE\x70" => "\xE5\xB3\xB0",
+ "\xAE\x71" => "\xE5\xB3\xB6",
+ "\xAE\x72" => "\xE5\xB4\x81",
+ "\xAE\x73" => "\xE5\xB3\xB4",
+ "\xAE\x74" => "\xE5\xB7\xAE",
+ "\xAE\x75" => "\xE5\xB8\xAD",
+ "\xAE\x76" => "\xE5\xB8\xAB",
+ "\xAE\x77" => "\xE5\xBA\xAB",
+ "\xAE\x78" => "\xE5\xBA\xAD",
+ "\xAE\x79" => "\xE5\xBA\xA7",
+ "\xAE\x7A" => "\xE5\xBC\xB1",
+ "\xAE\x7B" => "\xE5\xBE\x92",
+ "\xAE\x7C" => "\xE5\xBE\x91",
+ "\xAE\x7D" => "\xE5\xBE\x90",
+ "\xAE\x7E" => "\xE6\x81\x99",
+ "\xAE\xA1" => "\xE6\x81\xA3",
+ "\xAE\xA2" => "\xE6\x81\xA5",
+ "\xAE\xA3" => "\xE6\x81\x90",
+ "\xAE\xA4" => "\xE6\x81\x95",
+ "\xAE\xA5" => "\xE6\x81\xAD",
+ "\xAE\xA6" => "\xE6\x81\xA9",
+ "\xAE\xA7" => "\xE6\x81\xAF",
+ "\xAE\xA8" => "\xE6\x82\x84",
+ "\xAE\xA9" => "\xE6\x82\x9F",
+ "\xAE\xAA" => "\xE6\x82\x9A",
+ "\xAE\xAB" => "\xE6\x82\x8D",
+ "\xAE\xAC" => "\xE6\x82\x94",
+ "\xAE\xAD" => "\xE6\x82\x8C",
+ "\xAE\xAE" => "\xE6\x82\x85",
+ "\xAE\xAF" => "\xE6\x82\x96",
+ "\xAE\xB0" => "\xE6\x89\x87",
+ "\xAE\xB1" => "\xE6\x8B\xB3",
+ "\xAE\xB2" => "\xE6\x8C\x88",
+ "\xAE\xB3" => "\xE6\x8B\xBF",
+ "\xAE\xB4" => "\xE6\x8D\x8E",
+ "\xAE\xB5" => "\xE6\x8C\xBE",
+ "\xAE\xB6" => "\xE6\x8C\xAF",
+ "\xAE\xB7" => "\xE6\x8D\x95",
+ "\xAE\xB8" => "\xE6\x8D\x82",
+ "\xAE\xB9" => "\xE6\x8D\x86",
+ "\xAE\xBA" => "\xE6\x8D\x8F",
+ "\xAE\xBB" => "\xE6\x8D\x89",
+ "\xAE\xBC" => "\xE6\x8C\xBA",
+ "\xAE\xBD" => "\xE6\x8D\x90",
+ "\xAE\xBE" => "\xE6\x8C\xBD",
+ "\xAE\xBF" => "\xE6\x8C\xAA",
+ "\xAE\xC0" => "\xE6\x8C\xAB",
+ "\xAE\xC1" => "\xE6\x8C\xA8",
+ "\xAE\xC2" => "\xE6\x8D\x8D",
+ "\xAE\xC3" => "\xE6\x8D\x8C",
+ "\xAE\xC4" => "\xE6\x95\x88",
+ "\xAE\xC5" => "\xE6\x95\x89",
+ "\xAE\xC6" => "\xE6\x96\x99",
+ "\xAE\xC7" => "\xE6\x97\x81",
+ "\xAE\xC8" => "\xE6\x97\x85",
+ "\xAE\xC9" => "\xE6\x99\x82",
+ "\xAE\xCA" => "\xE6\x99\x89",
+ "\xAE\xCB" => "\xE6\x99\x8F",
+ "\xAE\xCC" => "\xE6\x99\x83",
+ "\xAE\xCD" => "\xE6\x99\x92",
+ "\xAE\xCE" => "\xE6\x99\x8C",
+ "\xAE\xCF" => "\xE6\x99\x85",
+ "\xAE\xD0" => "\xE6\x99\x81",
+ "\xAE\xD1" => "\xE6\x9B\xB8",
+ "\xAE\xD2" => "\xE6\x9C\x94",
+ "\xAE\xD3" => "\xE6\x9C\x95",
+ "\xAE\xD4" => "\xE6\x9C\x97",
+ "\xAE\xD5" => "\xE6\xA0\xA1",
+ "\xAE\xD6" => "\xE6\xA0\xB8",
+ "\xAE\xD7" => "\xE6\xA1\x88",
+ "\xAE\xD8" => "\xE6\xA1\x86",
+ "\xAE\xD9" => "\xE6\xA1\x93",
+ "\xAE\xDA" => "\xE6\xA0\xB9",
+ "\xAE\xDB" => "\xE6\xA1\x82",
+ "\xAE\xDC" => "\xE6\xA1\x94",
+ "\xAE\xDD" => "\xE6\xA0\xA9",
+ "\xAE\xDE" => "\xE6\xA2\xB3",
+ "\xAE\xDF" => "\xE6\xA0\x97",
+ "\xAE\xE0" => "\xE6\xA1\x8C",
+ "\xAE\xE1" => "\xE6\xA1\x91",
+ "\xAE\xE2" => "\xE6\xA0\xBD",
+ "\xAE\xE3" => "\xE6\x9F\xB4",
+ "\xAE\xE4" => "\xE6\xA1\x90",
+ "\xAE\xE5" => "\xE6\xA1\x80",
+ "\xAE\xE6" => "\xE6\xA0\xBC",
+ "\xAE\xE7" => "\xE6\xA1\x83",
+ "\xAE\xE8" => "\xE6\xA0\xAA",
+ "\xAE\xE9" => "\xE6\xA1\x85",
+ "\xAE\xEA" => "\xE6\xA0\x93",
+ "\xAE\xEB" => "\xE6\xA0\x98",
+ "\xAE\xEC" => "\xE6\xA1\x81",
+ "\xAE\xED" => "\xE6\xAE\x8A",
+ "\xAE\xEE" => "\xE6\xAE\x89",
+ "\xAE\xEF" => "\xE6\xAE\xB7",
+ "\xAE\xF0" => "\xE6\xB0\xA3",
+ "\xAE\xF1" => "\xE6\xB0\xA7",
+ "\xAE\xF2" => "\xE6\xB0\xA8",
+ "\xAE\xF3" => "\xE6\xB0\xA6",
+ "\xAE\xF4" => "\xE6\xB0\xA4",
+ "\xAE\xF5" => "\xE6\xB3\xB0",
+ "\xAE\xF6" => "\xE6\xB5\xAA",
+ "\xAE\xF7" => "\xE6\xB6\x95",
+ "\xAE\xF8" => "\xE6\xB6\x88",
+ "\xAE\xF9" => "\xE6\xB6\x87",
+ "\xAE\xFA" => "\xE6\xB5\xA6",
+ "\xAE\xFB" => "\xE6\xB5\xB8",
+ "\xAE\xFC" => "\xE6\xB5\xB7",
+ "\xAE\xFD" => "\xE6\xB5\x99",
+ "\xAE\xFE" => "\xE6\xB6\x93",
+ "\xAF\x40" => "\xE6\xB5\xAC",
+ "\xAF\x41" => "\xE6\xB6\x89",
+ "\xAF\x42" => "\xE6\xB5\xAE",
+ "\xAF\x43" => "\xE6\xB5\x9A",
+ "\xAF\x44" => "\xE6\xB5\xB4",
+ "\xAF\x45" => "\xE6\xB5\xA9",
+ "\xAF\x46" => "\xE6\xB6\x8C",
+ "\xAF\x47" => "\xE6\xB6\x8A",
+ "\xAF\x48" => "\xE6\xB5\xB9",
+ "\xAF\x49" => "\xE6\xB6\x85",
+ "\xAF\x4A" => "\xE6\xB5\xA5",
+ "\xAF\x4B" => "\xE6\xB6\x94",
+ "\xAF\x4C" => "\xE7\x83\x8A",
+ "\xAF\x4D" => "\xE7\x83\x98",
+ "\xAF\x4E" => "\xE7\x83\xA4",
+ "\xAF\x4F" => "\xE7\x83\x99",
+ "\xAF\x50" => "\xE7\x83\x88",
+ "\xAF\x51" => "\xE7\x83\x8F",
+ "\xAF\x52" => "\xE7\x88\xB9",
+ "\xAF\x53" => "\xE7\x89\xB9",
+ "\xAF\x54" => "\xE7\x8B\xBC",
+ "\xAF\x55" => "\xE7\x8B\xB9",
+ "\xAF\x56" => "\xE7\x8B\xBD",
+ "\xAF\x57" => "\xE7\x8B\xB8",
+ "\xAF\x58" => "\xE7\x8B\xB7",
+ "\xAF\x59" => "\xE7\x8E\x86",
+ "\xAF\x5A" => "\xE7\x8F\xAD",
+ "\xAF\x5B" => "\xE7\x90\x89",
+ "\xAF\x5C" => "\xE7\x8F\xAE",
+ "\xAF\x5D" => "\xE7\x8F\xA0",
+ "\xAF\x5E" => "\xE7\x8F\xAA",
+ "\xAF\x5F" => "\xE7\x8F\x9E",
+ "\xAF\x60" => "\xE7\x95\x94",
+ "\xAF\x61" => "\xE7\x95\x9D",
+ "\xAF\x62" => "\xE7\x95\x9C",
+ "\xAF\x63" => "\xE7\x95\x9A",
+ "\xAF\x64" => "\xE7\x95\x99",
+ "\xAF\x65" => "\xE7\x96\xBE",
+ "\xAF\x66" => "\xE7\x97\x85",
+ "\xAF\x67" => "\xE7\x97\x87",
+ "\xAF\x68" => "\xE7\x96\xB2",
+ "\xAF\x69" => "\xE7\x96\xB3",
+ "\xAF\x6A" => "\xE7\x96\xBD",
+ "\xAF\x6B" => "\xE7\x96\xBC",
+ "\xAF\x6C" => "\xE7\x96\xB9",
+ "\xAF\x6D" => "\xE7\x97\x82",
+ "\xAF\x6E" => "\xE7\x96\xB8",
+ "\xAF\x6F" => "\xE7\x9A\x8B",
+ "\xAF\x70" => "\xE7\x9A\xB0",
+ "\xAF\x71" => "\xE7\x9B\x8A",
+ "\xAF\x72" => "\xE7\x9B\x8D",
+ "\xAF\x73" => "\xE7\x9B\x8E",
+ "\xAF\x74" => "\xE7\x9C\xA9",
+ "\xAF\x75" => "\xE7\x9C\x9F",
+ "\xAF\x76" => "\xE7\x9C\xA0",
+ "\xAF\x77" => "\xE7\x9C\xA8",
+ "\xAF\x78" => "\xE7\x9F\xA9",
+ "\xAF\x79" => "\xE7\xA0\xB0",
+ "\xAF\x7A" => "\xE7\xA0\xA7",
+ "\xAF\x7B" => "\xE7\xA0\xB8",
+ "\xAF\x7C" => "\xE7\xA0\x9D",
+ "\xAF\x7D" => "\xE7\xA0\xB4",
+ "\xAF\x7E" => "\xE7\xA0\xB7",
+ "\xAF\xA1" => "\xE7\xA0\xA5",
+ "\xAF\xA2" => "\xE7\xA0\xAD",
+ "\xAF\xA3" => "\xE7\xA0\xA0",
+ "\xAF\xA4" => "\xE7\xA0\x9F",
+ "\xAF\xA5" => "\xE7\xA0\xB2",
+ "\xAF\xA6" => "\xE7\xA5\x95",
+ "\xAF\xA7" => "\xE7\xA5\x90",
+ "\xAF\xA8" => "\xE7\xA5\xA0",
+ "\xAF\xA9" => "\xE7\xA5\x9F",
+ "\xAF\xAA" => "\xE7\xA5\x96",
+ "\xAF\xAB" => "\xE7\xA5\x9E",
+ "\xAF\xAC" => "\xE7\xA5\x9D",
+ "\xAF\xAD" => "\xE7\xA5\x97",
+ "\xAF\xAE" => "\xE7\xA5\x9A",
+ "\xAF\xAF" => "\xE7\xA7\xA4",
+ "\xAF\xB0" => "\xE7\xA7\xA3",
+ "\xAF\xB1" => "\xE7\xA7\xA7",
+ "\xAF\xB2" => "\xE7\xA7\x9F",
+ "\xAF\xB3" => "\xE7\xA7\xA6",
+ "\xAF\xB4" => "\xE7\xA7\xA9",
+ "\xAF\xB5" => "\xE7\xA7\x98",
+ "\xAF\xB6" => "\xE7\xAA\x84",
+ "\xAF\xB7" => "\xE7\xAA\x88",
+ "\xAF\xB8" => "\xE7\xAB\x99",
+ "\xAF\xB9" => "\xE7\xAC\x86",
+ "\xAF\xBA" => "\xE7\xAC\x91",
+ "\xAF\xBB" => "\xE7\xB2\x89",
+ "\xAF\xBC" => "\xE7\xB4\xA1",
+ "\xAF\xBD" => "\xE7\xB4\x97",
+ "\xAF\xBE" => "\xE7\xB4\x8B",
+ "\xAF\xBF" => "\xE7\xB4\x8A",
+ "\xAF\xC0" => "\xE7\xB4\xA0",
+ "\xAF\xC1" => "\xE7\xB4\xA2",
+ "\xAF\xC2" => "\xE7\xB4\x94",
+ "\xAF\xC3" => "\xE7\xB4\x90",
+ "\xAF\xC4" => "\xE7\xB4\x95",
+ "\xAF\xC5" => "\xE7\xB4\x9A",
+ "\xAF\xC6" => "\xE7\xB4\x9C",
+ "\xAF\xC7" => "\xE7\xB4\x8D",
+ "\xAF\xC8" => "\xE7\xB4\x99",
+ "\xAF\xC9" => "\xE7\xB4\x9B",
+ "\xAF\xCA" => "\xE7\xBC\xBA",
+ "\xAF\xCB" => "\xE7\xBD\x9F",
+ "\xAF\xCC" => "\xE7\xBE\x94",
+ "\xAF\xCD" => "\xE7\xBF\x85",
+ "\xAF\xCE" => "\xE7\xBF\x81",
+ "\xAF\xCF" => "\xE8\x80\x86",
+ "\xAF\xD0" => "\xE8\x80\x98",
+ "\xAF\xD1" => "\xE8\x80\x95",
+ "\xAF\xD2" => "\xE8\x80\x99",
+ "\xAF\xD3" => "\xE8\x80\x97",
+ "\xAF\xD4" => "\xE8\x80\xBD",
+ "\xAF\xD5" => "\xE8\x80\xBF",
+ "\xAF\xD6" => "\xE8\x83\xB1",
+ "\xAF\xD7" => "\xE8\x84\x82",
+ "\xAF\xD8" => "\xE8\x83\xB0",
+ "\xAF\xD9" => "\xE8\x84\x85",
+ "\xAF\xDA" => "\xE8\x83\xAD",
+ "\xAF\xDB" => "\xE8\x83\xB4",
+ "\xAF\xDC" => "\xE8\x84\x86",
+ "\xAF\xDD" => "\xE8\x83\xB8",
+ "\xAF\xDE" => "\xE8\x83\xB3",
+ "\xAF\xDF" => "\xE8\x84\x88",
+ "\xAF\xE0" => "\xE8\x83\xBD",
+ "\xAF\xE1" => "\xE8\x84\x8A",
+ "\xAF\xE2" => "\xE8\x83\xBC",
+ "\xAF\xE3" => "\xE8\x83\xAF",
+ "\xAF\xE4" => "\xE8\x87\xAD",
+ "\xAF\xE5" => "\xE8\x87\xAC",
+ "\xAF\xE6" => "\xE8\x88\x80",
+ "\xAF\xE7" => "\xE8\x88\x90",
+ "\xAF\xE8" => "\xE8\x88\xAA",
+ "\xAF\xE9" => "\xE8\x88\xAB",
+ "\xAF\xEA" => "\xE8\x88\xA8",
+ "\xAF\xEB" => "\xE8\x88\xAC",
+ "\xAF\xEC" => "\xE8\x8A\xBB",
+ "\xAF\xED" => "\xE8\x8C\xAB",
+ "\xAF\xEE" => "\xE8\x8D\x92",
+ "\xAF\xEF" => "\xE8\x8D\x94",
+ "\xAF\xF0" => "\xE8\x8D\x8A",
+ "\xAF\xF1" => "\xE8\x8C\xB8",
+ "\xAF\xF2" => "\xE8\x8D\x90",
+ "\xAF\xF3" => "\xE8\x8D\x89",
+ "\xAF\xF4" => "\xE8\x8C\xB5",
+ "\xAF\xF5" => "\xE8\x8C\xB4",
+ "\xAF\xF6" => "\xE8\x8D\x8F",
+ "\xAF\xF7" => "\xE8\x8C\xB2",
+ "\xAF\xF8" => "\xE8\x8C\xB9",
+ "\xAF\xF9" => "\xE8\x8C\xB6",
+ "\xAF\xFA" => "\xE8\x8C\x97",
+ "\xAF\xFB" => "\xE8\x8D\x80",
+ "\xAF\xFC" => "\xE8\x8C\xB1",
+ "\xAF\xFD" => "\xE8\x8C\xA8",
+ "\xAF\xFE" => "\xE8\x8D\x83",
+ "\xB0\x40" => "\xE8\x99\x94",
+ "\xB0\x41" => "\xE8\x9A\x8A",
+ "\xB0\x42" => "\xE8\x9A\xAA",
+ "\xB0\x43" => "\xE8\x9A\x93",
+ "\xB0\x44" => "\xE8\x9A\xA4",
+ "\xB0\x45" => "\xE8\x9A\xA9",
+ "\xB0\x46" => "\xE8\x9A\x8C",
+ "\xB0\x47" => "\xE8\x9A\xA3",
+ "\xB0\x48" => "\xE8\x9A\x9C",
+ "\xB0\x49" => "\xE8\xA1\xB0",
+ "\xB0\x4A" => "\xE8\xA1\xB7",
+ "\xB0\x4B" => "\xE8\xA2\x81",
+ "\xB0\x4C" => "\xE8\xA2\x82",
+ "\xB0\x4D" => "\xE8\xA1\xBD",
+ "\xB0\x4E" => "\xE8\xA1\xB9",
+ "\xB0\x4F" => "\xE8\xA8\x98",
+ "\xB0\x50" => "\xE8\xA8\x90",
+ "\xB0\x51" => "\xE8\xA8\x8E",
+ "\xB0\x52" => "\xE8\xA8\x8C",
+ "\xB0\x53" => "\xE8\xA8\x95",
+ "\xB0\x54" => "\xE8\xA8\x8A",
+ "\xB0\x55" => "\xE8\xA8\x97",
+ "\xB0\x56" => "\xE8\xA8\x93",
+ "\xB0\x57" => "\xE8\xA8\x96",
+ "\xB0\x58" => "\xE8\xA8\x8F",
+ "\xB0\x59" => "\xE8\xA8\x91",
+ "\xB0\x5A" => "\xE8\xB1\x88",
+ "\xB0\x5B" => "\xE8\xB1\xBA",
+ "\xB0\x5C" => "\xE8\xB1\xB9",
+ "\xB0\x5D" => "\xE8\xB2\xA1",
+ "\xB0\x5E" => "\xE8\xB2\xA2",
+ "\xB0\x5F" => "\xE8\xB5\xB7",
+ "\xB0\x60" => "\xE8\xBA\xAC",
+ "\xB0\x61" => "\xE8\xBB\x92",
+ "\xB0\x62" => "\xE8\xBB\x94",
+ "\xB0\x63" => "\xE8\xBB\x8F",
+ "\xB0\x64" => "\xE8\xBE\xB1",
+ "\xB0\x65" => "\xE9\x80\x81",
+ "\xB0\x66" => "\xE9\x80\x86",
+ "\xB0\x67" => "\xE8\xBF\xB7",
+ "\xB0\x68" => "\xE9\x80\x80",
+ "\xB0\x69" => "\xE8\xBF\xBA",
+ "\xB0\x6A" => "\xE8\xBF\xB4",
+ "\xB0\x6B" => "\xE9\x80\x83",
+ "\xB0\x6C" => "\xE8\xBF\xBD",
+ "\xB0\x6D" => "\xE9\x80\x85",
+ "\xB0\x6E" => "\xE8\xBF\xB8",
+ "\xB0\x6F" => "\xE9\x82\x95",
+ "\xB0\x70" => "\xE9\x83\xA1",
+ "\xB0\x71" => "\xE9\x83\x9D",
+ "\xB0\x72" => "\xE9\x83\xA2",
+ "\xB0\x73" => "\xE9\x85\x92",
+ "\xB0\x74" => "\xE9\x85\x8D",
+ "\xB0\x75" => "\xE9\x85\x8C",
+ "\xB0\x76" => "\xE9\x87\x98",
+ "\xB0\x77" => "\xE9\x87\x9D",
+ "\xB0\x78" => "\xE9\x87\x97",
+ "\xB0\x79" => "\xE9\x87\x9C",
+ "\xB0\x7A" => "\xE9\x87\x99",
+ "\xB0\x7B" => "\xE9\x96\x83",
+ "\xB0\x7C" => "\xE9\x99\xA2",
+ "\xB0\x7D" => "\xE9\x99\xA3",
+ "\xB0\x7E" => "\xE9\x99\xA1",
+ "\xB0\xA1" => "\xE9\x99\x9B",
+ "\xB0\xA2" => "\xE9\x99\x9D",
+ "\xB0\xA3" => "\xE9\x99\xA4",
+ "\xB0\xA4" => "\xE9\x99\x98",
+ "\xB0\xA5" => "\xE9\x99\x9E",
+ "\xB0\xA6" => "\xE9\x9A\xBB",
+ "\xB0\xA7" => "\xE9\xA3\xA2",
+ "\xB0\xA8" => "\xE9\xA6\xAC",
+ "\xB0\xA9" => "\xE9\xAA\xA8",
+ "\xB0\xAA" => "\xE9\xAB\x98",
+ "\xB0\xAB" => "\xE9\xAC\xA5",
+ "\xB0\xAC" => "\xE9\xAC\xB2",
+ "\xB0\xAD" => "\xE9\xAC\xBC",
+ "\xB0\xAE" => "\xE4\xB9\xBE",
+ "\xB0\xAF" => "\xE5\x81\xBA",
+ "\xB0\xB0" => "\xE5\x81\xBD",
+ "\xB0\xB1" => "\xE5\x81\x9C",
+ "\xB0\xB2" => "\xE5\x81\x87",
+ "\xB0\xB3" => "\xE5\x81\x83",
+ "\xB0\xB4" => "\xE5\x81\x8C",
+ "\xB0\xB5" => "\xE5\x81\x9A",
+ "\xB0\xB6" => "\xE5\x81\x89",
+ "\xB0\xB7" => "\xE5\x81\xA5",
+ "\xB0\xB8" => "\xE5\x81\xB6",
+ "\xB0\xB9" => "\xE5\x81\x8E",
+ "\xB0\xBA" => "\xE5\x81\x95",
+ "\xB0\xBB" => "\xE5\x81\xB5",
+ "\xB0\xBC" => "\xE5\x81\xB4",
+ "\xB0\xBD" => "\xE5\x81\xB7",
+ "\xB0\xBE" => "\xE5\x81\x8F",
+ "\xB0\xBF" => "\xE5\x80\x8F",
+ "\xB0\xC0" => "\xE5\x81\xAF",
+ "\xB0\xC1" => "\xE5\x81\xAD",
+ "\xB0\xC2" => "\xE5\x85\x9C",
+ "\xB0\xC3" => "\xE5\x86\x95",
+ "\xB0\xC4" => "\xE5\x87\xB0",
+ "\xB0\xC5" => "\xE5\x89\xAA",
+ "\xB0\xC6" => "\xE5\x89\xAF",
+ "\xB0\xC7" => "\xE5\x8B\x92",
+ "\xB0\xC8" => "\xE5\x8B\x99",
+ "\xB0\xC9" => "\xE5\x8B\x98",
+ "\xB0\xCA" => "\xE5\x8B\x95",
+ "\xB0\xCB" => "\xE5\x8C\x90",
+ "\xB0\xCC" => "\xE5\x8C\x8F",
+ "\xB0\xCD" => "\xE5\x8C\x99",
+ "\xB0\xCE" => "\xE5\x8C\xBF",
+ "\xB0\xCF" => "\xE5\x8D\x80",
+ "\xB0\xD0" => "\xE5\x8C\xBE",
+ "\xB0\xD1" => "\xE5\x8F\x83",
+ "\xB0\xD2" => "\xE6\x9B\xBC",
+ "\xB0\xD3" => "\xE5\x95\x86",
+ "\xB0\xD4" => "\xE5\x95\xAA",
+ "\xB0\xD5" => "\xE5\x95\xA6",
+ "\xB0\xD6" => "\xE5\x95\x84",
+ "\xB0\xD7" => "\xE5\x95\x9E",
+ "\xB0\xD8" => "\xE5\x95\xA1",
+ "\xB0\xD9" => "\xE5\x95\x83",
+ "\xB0\xDA" => "\xE5\x95\x8A",
+ "\xB0\xDB" => "\xE5\x94\xB1",
+ "\xB0\xDC" => "\xE5\x95\x96",
+ "\xB0\xDD" => "\xE5\x95\x8F",
+ "\xB0\xDE" => "\xE5\x95\x95",
+ "\xB0\xDF" => "\xE5\x94\xAF",
+ "\xB0\xE0" => "\xE5\x95\xA4",
+ "\xB0\xE1" => "\xE5\x94\xB8",
+ "\xB0\xE2" => "\xE5\x94\xAE",
+ "\xB0\xE3" => "\xE5\x95\x9C",
+ "\xB0\xE4" => "\xE5\x94\xAC",
+ "\xB0\xE5" => "\xE5\x95\xA3",
+ "\xB0\xE6" => "\xE5\x94\xB3",
+ "\xB0\xE7" => "\xE5\x95\x81",
+ "\xB0\xE8" => "\xE5\x95\x97",
+ "\xB0\xE9" => "\xE5\x9C\x88",
+ "\xB0\xEA" => "\xE5\x9C\x8B",
+ "\xB0\xEB" => "\xE5\x9C\x89",
+ "\xB0\xEC" => "\xE5\x9F\x9F",
+ "\xB0\xED" => "\xE5\xA0\x85",
+ "\xB0\xEE" => "\xE5\xA0\x8A",
+ "\xB0\xEF" => "\xE5\xA0\x86",
+ "\xB0\xF0" => "\xE5\x9F\xA0",
+ "\xB0\xF1" => "\xE5\x9F\xA4",
+ "\xB0\xF2" => "\xE5\x9F\xBA",
+ "\xB0\xF3" => "\xE5\xA0\x82",
+ "\xB0\xF4" => "\xE5\xA0\xB5",
+ "\xB0\xF5" => "\xE5\x9F\xB7",
+ "\xB0\xF6" => "\xE5\x9F\xB9",
+ "\xB0\xF7" => "\xE5\xA4\xA0",
+ "\xB0\xF8" => "\xE5\xA5\xA2",
+ "\xB0\xF9" => "\xE5\xA8\xB6",
+ "\xB0\xFA" => "\xE5\xA9\x81",
+ "\xB0\xFB" => "\xE5\xA9\x89",
+ "\xB0\xFC" => "\xE5\xA9\xA6",
+ "\xB0\xFD" => "\xE5\xA9\xAA",
+ "\xB0\xFE" => "\xE5\xA9\x80",
+ "\xB1\x40" => "\xE5\xA8\xBC",
+ "\xB1\x41" => "\xE5\xA9\xA2",
+ "\xB1\x42" => "\xE5\xA9\x9A",
+ "\xB1\x43" => "\xE5\xA9\x86",
+ "\xB1\x44" => "\xE5\xA9\x8A",
+ "\xB1\x45" => "\xE5\xAD\xB0",
+ "\xB1\x46" => "\xE5\xAF\x87",
+ "\xB1\x47" => "\xE5\xAF\x85",
+ "\xB1\x48" => "\xE5\xAF\x84",
+ "\xB1\x49" => "\xE5\xAF\x82",
+ "\xB1\x4A" => "\xE5\xAE\xBF",
+ "\xB1\x4B" => "\xE5\xAF\x86",
+ "\xB1\x4C" => "\xE5\xB0\x89",
+ "\xB1\x4D" => "\xE5\xB0\x88",
+ "\xB1\x4E" => "\xE5\xB0\x87",
+ "\xB1\x4F" => "\xE5\xB1\xA0",
+ "\xB1\x50" => "\xE5\xB1\x9C",
+ "\xB1\x51" => "\xE5\xB1\x9D",
+ "\xB1\x52" => "\xE5\xB4\x87",
+ "\xB1\x53" => "\xE5\xB4\x86",
+ "\xB1\x54" => "\xE5\xB4\x8E",
+ "\xB1\x55" => "\xE5\xB4\x9B",
+ "\xB1\x56" => "\xE5\xB4\x96",
+ "\xB1\x57" => "\xE5\xB4\xA2",
+ "\xB1\x58" => "\xE5\xB4\x91",
+ "\xB1\x59" => "\xE5\xB4\xA9",
+ "\xB1\x5A" => "\xE5\xB4\x94",
+ "\xB1\x5B" => "\xE5\xB4\x99",
+ "\xB1\x5C" => "\xE5\xB4\xA4",
+ "\xB1\x5D" => "\xE5\xB4\xA7",
+ "\xB1\x5E" => "\xE5\xB4\x97",
+ "\xB1\x5F" => "\xE5\xB7\xA2",
+ "\xB1\x60" => "\xE5\xB8\xB8",
+ "\xB1\x61" => "\xE5\xB8\xB6",
+ "\xB1\x62" => "\xE5\xB8\xB3",
+ "\xB1\x63" => "\xE5\xB8\xB7",
+ "\xB1\x64" => "\xE5\xBA\xB7",
+ "\xB1\x65" => "\xE5\xBA\xB8",
+ "\xB1\x66" => "\xE5\xBA\xB6",
+ "\xB1\x67" => "\xE5\xBA\xB5",
+ "\xB1\x68" => "\xE5\xBA\xBE",
+ "\xB1\x69" => "\xE5\xBC\xB5",
+ "\xB1\x6A" => "\xE5\xBC\xB7",
+ "\xB1\x6B" => "\xE5\xBD\x97",
+ "\xB1\x6C" => "\xE5\xBD\xAC",
+ "\xB1\x6D" => "\xE5\xBD\xA9",
+ "\xB1\x6E" => "\xE5\xBD\xAB",
+ "\xB1\x6F" => "\xE5\xBE\x97",
+ "\xB1\x70" => "\xE5\xBE\x99",
+ "\xB1\x71" => "\xE5\xBE\x9E",
+ "\xB1\x72" => "\xE5\xBE\x98",
+ "\xB1\x73" => "\xE5\xBE\xA1",
+ "\xB1\x74" => "\xE5\xBE\xA0",
+ "\xB1\x75" => "\xE5\xBE\x9C",
+ "\xB1\x76" => "\xE6\x81\xBF",
+ "\xB1\x77" => "\xE6\x82\xA3",
+ "\xB1\x78" => "\xE6\x82\x89",
+ "\xB1\x79" => "\xE6\x82\xA0",
+ "\xB1\x7A" => "\xE6\x82\xA8",
+ "\xB1\x7B" => "\xE6\x83\x8B",
+ "\xB1\x7C" => "\xE6\x82\xB4",
+ "\xB1\x7D" => "\xE6\x83\xA6",
+ "\xB1\x7E" => "\xE6\x82\xBD",
+ "\xB1\xA1" => "\xE6\x83\x85",
+ "\xB1\xA2" => "\xE6\x82\xBB",
+ "\xB1\xA3" => "\xE6\x82\xB5",
+ "\xB1\xA4" => "\xE6\x83\x9C",
+ "\xB1\xA5" => "\xE6\x82\xBC",
+ "\xB1\xA6" => "\xE6\x83\x98",
+ "\xB1\xA7" => "\xE6\x83\x95",
+ "\xB1\xA8" => "\xE6\x83\x86",
+ "\xB1\xA9" => "\xE6\x83\x9F",
+ "\xB1\xAA" => "\xE6\x82\xB8",
+ "\xB1\xAB" => "\xE6\x83\x9A",
+ "\xB1\xAC" => "\xE6\x83\x87",
+ "\xB1\xAD" => "\xE6\x88\x9A",
+ "\xB1\xAE" => "\xE6\x88\x9B",
+ "\xB1\xAF" => "\xE6\x89\x88",
+ "\xB1\xB0" => "\xE6\x8E\xA0",
+ "\xB1\xB1" => "\xE6\x8E\xA7",
+ "\xB1\xB2" => "\xE6\x8D\xB2",
+ "\xB1\xB3" => "\xE6\x8E\x96",
+ "\xB1\xB4" => "\xE6\x8E\xA2",
+ "\xB1\xB5" => "\xE6\x8E\xA5",
+ "\xB1\xB6" => "\xE6\x8D\xB7",
+ "\xB1\xB7" => "\xE6\x8D\xA7",
+ "\xB1\xB8" => "\xE6\x8E\x98",
+ "\xB1\xB9" => "\xE6\x8E\xAA",
+ "\xB1\xBA" => "\xE6\x8D\xB1",
+ "\xB1\xBB" => "\xE6\x8E\xA9",
+ "\xB1\xBC" => "\xE6\x8E\x89",
+ "\xB1\xBD" => "\xE6\x8E\x83",
+ "\xB1\xBE" => "\xE6\x8E\x9B",
+ "\xB1\xBF" => "\xE6\x8D\xAB",
+ "\xB1\xC0" => "\xE6\x8E\xA8",
+ "\xB1\xC1" => "\xE6\x8E\x84",
+ "\xB1\xC2" => "\xE6\x8E\x88",
+ "\xB1\xC3" => "\xE6\x8E\x99",
+ "\xB1\xC4" => "\xE6\x8E\xA1",
+ "\xB1\xC5" => "\xE6\x8E\xAC",
+ "\xB1\xC6" => "\xE6\x8E\x92",
+ "\xB1\xC7" => "\xE6\x8E\x8F",
+ "\xB1\xC8" => "\xE6\x8E\x80",
+ "\xB1\xC9" => "\xE6\x8D\xBB",
+ "\xB1\xCA" => "\xE6\x8D\xA9",
+ "\xB1\xCB" => "\xE6\x8D\xA8",
+ "\xB1\xCC" => "\xE6\x8D\xBA",
+ "\xB1\xCD" => "\xE6\x95\x9D",
+ "\xB1\xCE" => "\xE6\x95\x96",
+ "\xB1\xCF" => "\xE6\x95\x91",
+ "\xB1\xD0" => "\xE6\x95\x99",
+ "\xB1\xD1" => "\xE6\x95\x97",
+ "\xB1\xD2" => "\xE5\x95\x9F",
+ "\xB1\xD3" => "\xE6\x95\x8F",
+ "\xB1\xD4" => "\xE6\x95\x98",
+ "\xB1\xD5" => "\xE6\x95\x95",
+ "\xB1\xD6" => "\xE6\x95\x94",
+ "\xB1\xD7" => "\xE6\x96\x9C",
+ "\xB1\xD8" => "\xE6\x96\x9B",
+ "\xB1\xD9" => "\xE6\x96\xAC",
+ "\xB1\xDA" => "\xE6\x97\x8F",
+ "\xB1\xDB" => "\xE6\x97\x8B",
+ "\xB1\xDC" => "\xE6\x97\x8C",
+ "\xB1\xDD" => "\xE6\x97\x8E",
+ "\xB1\xDE" => "\xE6\x99\x9D",
+ "\xB1\xDF" => "\xE6\x99\x9A",
+ "\xB1\xE0" => "\xE6\x99\xA4",
+ "\xB1\xE1" => "\xE6\x99\xA8",
+ "\xB1\xE2" => "\xE6\x99\xA6",
+ "\xB1\xE3" => "\xE6\x99\x9E",
+ "\xB1\xE4" => "\xE6\x9B\xB9",
+ "\xB1\xE5" => "\xE5\x8B\x97",
+ "\xB1\xE6" => "\xE6\x9C\x9B",
+ "\xB1\xE7" => "\xE6\xA2\x81",
+ "\xB1\xE8" => "\xE6\xA2\xAF",
+ "\xB1\xE9" => "\xE6\xA2\xA2",
+ "\xB1\xEA" => "\xE6\xA2\x93",
+ "\xB1\xEB" => "\xE6\xA2\xB5",
+ "\xB1\xEC" => "\xE6\xA1\xBF",
+ "\xB1\xED" => "\xE6\xA1\xB6",
+ "\xB1\xEE" => "\xE6\xA2\xB1",
+ "\xB1\xEF" => "\xE6\xA2\xA7",
+ "\xB1\xF0" => "\xE6\xA2\x97",
+ "\xB1\xF1" => "\xE6\xA2\xB0",
+ "\xB1\xF2" => "\xE6\xA2\x83",
+ "\xB1\xF3" => "\xE6\xA3\x84",
+ "\xB1\xF4" => "\xE6\xA2\xAD",
+ "\xB1\xF5" => "\xE6\xA2\x86",
+ "\xB1\xF6" => "\xE6\xA2\x85",
+ "\xB1\xF7" => "\xE6\xA2\x94",
+ "\xB1\xF8" => "\xE6\xA2\x9D",
+ "\xB1\xF9" => "\xE6\xA2\xA8",
+ "\xB1\xFA" => "\xE6\xA2\x9F",
+ "\xB1\xFB" => "\xE6\xA2\xA1",
+ "\xB1\xFC" => "\xE6\xA2\x82",
+ "\xB1\xFD" => "\xE6\xAC\xB2",
+ "\xB1\xFE" => "\xE6\xAE\xBA",
+ "\xB2\x40" => "\xE6\xAF\xAB",
+ "\xB2\x41" => "\xE6\xAF\xAC",
+ "\xB2\x42" => "\xE6\xB0\xAB",
+ "\xB2\x43" => "\xE6\xB6\x8E",
+ "\xB2\x44" => "\xE6\xB6\xBC",
+ "\xB2\x45" => "\xE6\xB7\xB3",
+ "\xB2\x46" => "\xE6\xB7\x99",
+ "\xB2\x47" => "\xE6\xB6\xB2",
+ "\xB2\x48" => "\xE6\xB7\xA1",
+ "\xB2\x49" => "\xE6\xB7\x8C",
+ "\xB2\x4A" => "\xE6\xB7\xA4",
+ "\xB2\x4B" => "\xE6\xB7\xBB",
+ "\xB2\x4C" => "\xE6\xB7\xBA",
+ "\xB2\x4D" => "\xE6\xB8\x85",
+ "\xB2\x4E" => "\xE6\xB7\x87",
+ "\xB2\x4F" => "\xE6\xB7\x8B",
+ "\xB2\x50" => "\xE6\xB6\xAF",
+ "\xB2\x51" => "\xE6\xB7\x91",
+ "\xB2\x52" => "\xE6\xB6\xAE",
+ "\xB2\x53" => "\xE6\xB7\x9E",
+ "\xB2\x54" => "\xE6\xB7\xB9",
+ "\xB2\x55" => "\xE6\xB6\xB8",
+ "\xB2\x56" => "\xE6\xB7\xB7",
+ "\xB2\x57" => "\xE6\xB7\xB5",
+ "\xB2\x58" => "\xE6\xB7\x85",
+ "\xB2\x59" => "\xE6\xB7\x92",
+ "\xB2\x5A" => "\xE6\xB8\x9A",
+ "\xB2\x5B" => "\xE6\xB6\xB5",
+ "\xB2\x5C" => "\xE6\xB7\x9A",
+ "\xB2\x5D" => "\xE6\xB7\xAB",
+ "\xB2\x5E" => "\xE6\xB7\x98",
+ "\xB2\x5F" => "\xE6\xB7\xAA",
+ "\xB2\x60" => "\xE6\xB7\xB1",
+ "\xB2\x61" => "\xE6\xB7\xAE",
+ "\xB2\x62" => "\xE6\xB7\xA8",
+ "\xB2\x63" => "\xE6\xB7\x86",
+ "\xB2\x64" => "\xE6\xB7\x84",
+ "\xB2\x65" => "\xE6\xB6\xAA",
+ "\xB2\x66" => "\xE6\xB7\xAC",
+ "\xB2\x67" => "\xE6\xB6\xBF",
+ "\xB2\x68" => "\xE6\xB7\xA6",
+ "\xB2\x69" => "\xE7\x83\xB9",
+ "\xB2\x6A" => "\xE7\x84\x89",
+ "\xB2\x6B" => "\xE7\x84\x8A",
+ "\xB2\x6C" => "\xE7\x83\xBD",
+ "\xB2\x6D" => "\xE7\x83\xAF",
+ "\xB2\x6E" => "\xE7\x88\xBD",
+ "\xB2\x6F" => "\xE7\x89\xBD",
+ "\xB2\x70" => "\xE7\x8A\x81",
+ "\xB2\x71" => "\xE7\x8C\x9C",
+ "\xB2\x72" => "\xE7\x8C\x9B",
+ "\xB2\x73" => "\xE7\x8C\x96",
+ "\xB2\x74" => "\xE7\x8C\x93",
+ "\xB2\x75" => "\xE7\x8C\x99",
+ "\xB2\x76" => "\xE7\x8E\x87",
+ "\xB2\x77" => "\xE7\x90\x85",
+ "\xB2\x78" => "\xE7\x90\x8A",
+ "\xB2\x79" => "\xE7\x90\x83",
+ "\xB2\x7A" => "\xE7\x90\x86",
+ "\xB2\x7B" => "\xE7\x8F\xBE",
+ "\xB2\x7C" => "\xE7\x90\x8D",
+ "\xB2\x7D" => "\xE7\x93\xA0",
+ "\xB2\x7E" => "\xE7\x93\xB6",
+ "\xB2\xA1" => "\xE7\x93\xB7",
+ "\xB2\xA2" => "\xE7\x94\x9C",
+ "\xB2\xA3" => "\xE7\x94\xA2",
+ "\xB2\xA4" => "\xE7\x95\xA5",
+ "\xB2\xA5" => "\xE7\x95\xA6",
+ "\xB2\xA6" => "\xE7\x95\xA2",
+ "\xB2\xA7" => "\xE7\x95\xB0",
+ "\xB2\xA8" => "\xE7\x96\x8F",
+ "\xB2\xA9" => "\xE7\x97\x94",
+ "\xB2\xAA" => "\xE7\x97\x95",
+ "\xB2\xAB" => "\xE7\x96\xB5",
+ "\xB2\xAC" => "\xE7\x97\x8A",
+ "\xB2\xAD" => "\xE7\x97\x8D",
+ "\xB2\xAE" => "\xE7\x9A\x8E",
+ "\xB2\xAF" => "\xE7\x9B\x94",
+ "\xB2\xB0" => "\xE7\x9B\x92",
+ "\xB2\xB1" => "\xE7\x9B\x9B",
+ "\xB2\xB2" => "\xE7\x9C\xB7",
+ "\xB2\xB3" => "\xE7\x9C\xBE",
+ "\xB2\xB4" => "\xE7\x9C\xBC",
+ "\xB2\xB5" => "\xE7\x9C\xB6",
+ "\xB2\xB6" => "\xE7\x9C\xB8",
+ "\xB2\xB7" => "\xE7\x9C\xBA",
+ "\xB2\xB8" => "\xE7\xA1\xAB",
+ "\xB2\xB9" => "\xE7\xA1\x83",
+ "\xB2\xBA" => "\xE7\xA1\x8E",
+ "\xB2\xBB" => "\xE7\xA5\xA5",
+ "\xB2\xBC" => "\xE7\xA5\xA8",
+ "\xB2\xBD" => "\xE7\xA5\xAD",
+ "\xB2\xBE" => "\xE7\xA7\xBB",
+ "\xB2\xBF" => "\xE7\xAA\x92",
+ "\xB2\xC0" => "\xE7\xAA\x95",
+ "\xB2\xC1" => "\xE7\xAC\xA0",
+ "\xB2\xC2" => "\xE7\xAC\xA8",
+ "\xB2\xC3" => "\xE7\xAC\x9B",
+ "\xB2\xC4" => "\xE7\xAC\xAC",
+ "\xB2\xC5" => "\xE7\xAC\xA6",
+ "\xB2\xC6" => "\xE7\xAC\x99",
+ "\xB2\xC7" => "\xE7\xAC\x9E",
+ "\xB2\xC8" => "\xE7\xAC\xAE",
+ "\xB2\xC9" => "\xE7\xB2\x92",
+ "\xB2\xCA" => "\xE7\xB2\x97",
+ "\xB2\xCB" => "\xE7\xB2\x95",
+ "\xB2\xCC" => "\xE7\xB5\x86",
+ "\xB2\xCD" => "\xE7\xB5\x83",
+ "\xB2\xCE" => "\xE7\xB5\xB1",
+ "\xB2\xCF" => "\xE7\xB4\xAE",
+ "\xB2\xD0" => "\xE7\xB4\xB9",
+ "\xB2\xD1" => "\xE7\xB4\xBC",
+ "\xB2\xD2" => "\xE7\xB5\x80",
+ "\xB2\xD3" => "\xE7\xB4\xB0",
+ "\xB2\xD4" => "\xE7\xB4\xB3",
+ "\xB2\xD5" => "\xE7\xB5\x84",
+ "\xB2\xD6" => "\xE7\xB4\xAF",
+ "\xB2\xD7" => "\xE7\xB5\x82",
+ "\xB2\xD8" => "\xE7\xB4\xB2",
+ "\xB2\xD9" => "\xE7\xB4\xB1",
+ "\xB2\xDA" => "\xE7\xBC\xBD",
+ "\xB2\xDB" => "\xE7\xBE\x9E",
+ "\xB2\xDC" => "\xE7\xBE\x9A",
+ "\xB2\xDD" => "\xE7\xBF\x8C",
+ "\xB2\xDE" => "\xE7\xBF\x8E",
+ "\xB2\xDF" => "\xE7\xBF\x92",
+ "\xB2\xE0" => "\xE8\x80\x9C",
+ "\xB2\xE1" => "\xE8\x81\x8A",
+ "\xB2\xE2" => "\xE8\x81\x86",
+ "\xB2\xE3" => "\xE8\x84\xAF",
+ "\xB2\xE4" => "\xE8\x84\x96",
+ "\xB2\xE5" => "\xE8\x84\xA3",
+ "\xB2\xE6" => "\xE8\x84\xAB",
+ "\xB2\xE7" => "\xE8\x84\xA9",
+ "\xB2\xE8" => "\xE8\x84\xB0",
+ "\xB2\xE9" => "\xE8\x84\xA4",
+ "\xB2\xEA" => "\xE8\x88\x82",
+ "\xB2\xEB" => "\xE8\x88\xB5",
+ "\xB2\xEC" => "\xE8\x88\xB7",
+ "\xB2\xED" => "\xE8\x88\xB6",
+ "\xB2\xEE" => "\xE8\x88\xB9",
+ "\xB2\xEF" => "\xE8\x8E\x8E",
+ "\xB2\xF0" => "\xE8\x8E\x9E",
+ "\xB2\xF1" => "\xE8\x8E\x98",
+ "\xB2\xF2" => "\xE8\x8D\xB8",
+ "\xB2\xF3" => "\xE8\x8E\xA2",
+ "\xB2\xF4" => "\xE8\x8E\x96",
+ "\xB2\xF5" => "\xE8\x8E\xBD",
+ "\xB2\xF6" => "\xE8\x8E\xAB",
+ "\xB2\xF7" => "\xE8\x8E\x92",
+ "\xB2\xF8" => "\xE8\x8E\x8A",
+ "\xB2\xF9" => "\xE8\x8E\x93",
+ "\xB2\xFA" => "\xE8\x8E\x89",
+ "\xB2\xFB" => "\xE8\x8E\xA0",
+ "\xB2\xFC" => "\xE8\x8D\xB7",
+ "\xB2\xFD" => "\xE8\x8D\xBB",
+ "\xB2\xFE" => "\xE8\x8D\xBC",
+ "\xB3\x40" => "\xE8\x8E\x86",
+ "\xB3\x41" => "\xE8\x8E\xA7",
+ "\xB3\x42" => "\xE8\x99\x95",
+ "\xB3\x43" => "\xE5\xBD\xAA",
+ "\xB3\x44" => "\xE8\x9B\x87",
+ "\xB3\x45" => "\xE8\x9B\x80",
+ "\xB3\x46" => "\xE8\x9A\xB6",
+ "\xB3\x47" => "\xE8\x9B\x84",
+ "\xB3\x48" => "\xE8\x9A\xB5",
+ "\xB3\x49" => "\xE8\x9B\x86",
+ "\xB3\x4A" => "\xE8\x9B\x8B",
+ "\xB3\x4B" => "\xE8\x9A\xB1",
+ "\xB3\x4C" => "\xE8\x9A\xAF",
+ "\xB3\x4D" => "\xE8\x9B\x89",
+ "\xB3\x4E" => "\xE8\xA1\x93",
+ "\xB3\x4F" => "\xE8\xA2\x9E",
+ "\xB3\x50" => "\xE8\xA2\x88",
+ "\xB3\x51" => "\xE8\xA2\xAB",
+ "\xB3\x52" => "\xE8\xA2\x92",
+ "\xB3\x53" => "\xE8\xA2\x96",
+ "\xB3\x54" => "\xE8\xA2\x8D",
+ "\xB3\x55" => "\xE8\xA2\x8B",
+ "\xB3\x56" => "\xE8\xA6\x93",
+ "\xB3\x57" => "\xE8\xA6\x8F",
+ "\xB3\x58" => "\xE8\xA8\xAA",
+ "\xB3\x59" => "\xE8\xA8\x9D",
+ "\xB3\x5A" => "\xE8\xA8\xA3",
+ "\xB3\x5B" => "\xE8\xA8\xA5",
+ "\xB3\x5C" => "\xE8\xA8\xB1",
+ "\xB3\x5D" => "\xE8\xA8\xAD",
+ "\xB3\x5E" => "\xE8\xA8\x9F",
+ "\xB3\x5F" => "\xE8\xA8\x9B",
+ "\xB3\x60" => "\xE8\xA8\xA2",
+ "\xB3\x61" => "\xE8\xB1\x89",
+ "\xB3\x62" => "\xE8\xB1\x9A",
+ "\xB3\x63" => "\xE8\xB2\xA9",
+ "\xB3\x64" => "\xE8\xB2\xAC",
+ "\xB3\x65" => "\xE8\xB2\xAB",
+ "\xB3\x66" => "\xE8\xB2\xA8",
+ "\xB3\x67" => "\xE8\xB2\xAA",
+ "\xB3\x68" => "\xE8\xB2\xA7",
+ "\xB3\x69" => "\xE8\xB5\xA7",
+ "\xB3\x6A" => "\xE8\xB5\xA6",
+ "\xB3\x6B" => "\xE8\xB6\xBE",
+ "\xB3\x6C" => "\xE8\xB6\xBA",
+ "\xB3\x6D" => "\xE8\xBB\x9B",
+ "\xB3\x6E" => "\xE8\xBB\x9F",
+ "\xB3\x6F" => "\xE9\x80\x99",
+ "\xB3\x70" => "\xE9\x80\x8D",
+ "\xB3\x71" => "\xE9\x80\x9A",
+ "\xB3\x72" => "\xE9\x80\x97",
+ "\xB3\x73" => "\xE9\x80\xA3",
+ "\xB3\x74" => "\xE9\x80\x9F",
+ "\xB3\x75" => "\xE9\x80\x9D",
+ "\xB3\x76" => "\xE9\x80\x90",
+ "\xB3\x77" => "\xE9\x80\x95",
+ "\xB3\x78" => "\xE9\x80\x9E",
+ "\xB3\x79" => "\xE9\x80\xA0",
+ "\xB3\x7A" => "\xE9\x80\x8F",
+ "\xB3\x7B" => "\xE9\x80\xA2",
+ "\xB3\x7C" => "\xE9\x80\x96",
+ "\xB3\x7D" => "\xE9\x80\x9B",
+ "\xB3\x7E" => "\xE9\x80\x94",
+ "\xB3\xA1" => "\xE9\x83\xA8",
+ "\xB3\xA2" => "\xE9\x83\xAD",
+ "\xB3\xA3" => "\xE9\x83\xBD",
+ "\xB3\xA4" => "\xE9\x85\x97",
+ "\xB3\xA5" => "\xE9\x87\x8E",
+ "\xB3\xA6" => "\xE9\x87\xB5",
+ "\xB3\xA7" => "\xE9\x87\xA6",
+ "\xB3\xA8" => "\xE9\x87\xA3",
+ "\xB3\xA9" => "\xE9\x87\xA7",
+ "\xB3\xAA" => "\xE9\x87\xAD",
+ "\xB3\xAB" => "\xE9\x87\xA9",
+ "\xB3\xAC" => "\xE9\x96\x89",
+ "\xB3\xAD" => "\xE9\x99\xAA",
+ "\xB3\xAE" => "\xE9\x99\xB5",
+ "\xB3\xAF" => "\xE9\x99\xB3",
+ "\xB3\xB0" => "\xE9\x99\xB8",
+ "\xB3\xB1" => "\xE9\x99\xB0",
+ "\xB3\xB2" => "\xE9\x99\xB4",
+ "\xB3\xB3" => "\xE9\x99\xB6",
+ "\xB3\xB4" => "\xE9\x99\xB7",
+ "\xB3\xB5" => "\xE9\x99\xAC",
+ "\xB3\xB6" => "\xE9\x9B\x80",
+ "\xB3\xB7" => "\xE9\x9B\xAA",
+ "\xB3\xB8" => "\xE9\x9B\xA9",
+ "\xB3\xB9" => "\xE7\xAB\xA0",
+ "\xB3\xBA" => "\xE7\xAB\x9F",
+ "\xB3\xBB" => "\xE9\xA0\x82",
+ "\xB3\xBC" => "\xE9\xA0\x83",
+ "\xB3\xBD" => "\xE9\xAD\x9A",
+ "\xB3\xBE" => "\xE9\xB3\xA5",
+ "\xB3\xBF" => "\xE9\xB9\xB5",
+ "\xB3\xC0" => "\xE9\xB9\xBF",
+ "\xB3\xC1" => "\xE9\xBA\xA5",
+ "\xB3\xC2" => "\xE9\xBA\xBB",
+ "\xB3\xC3" => "\xE5\x82\xA2",
+ "\xB3\xC4" => "\xE5\x82\x8D",
+ "\xB3\xC5" => "\xE5\x82\x85",
+ "\xB3\xC6" => "\xE5\x82\x99",
+ "\xB3\xC7" => "\xE5\x82\x91",
+ "\xB3\xC8" => "\xE5\x82\x80",
+ "\xB3\xC9" => "\xE5\x82\x96",
+ "\xB3\xCA" => "\xE5\x82\x98",
+ "\xB3\xCB" => "\xE5\x82\x9A",
+ "\xB3\xCC" => "\xE6\x9C\x80",
+ "\xB3\xCD" => "\xE5\x87\xB1",
+ "\xB3\xCE" => "\xE5\x89\xB2",
+ "\xB3\xCF" => "\xE5\x89\xB4",
+ "\xB3\xD0" => "\xE5\x89\xB5",
+ "\xB3\xD1" => "\xE5\x89\xA9",
+ "\xB3\xD2" => "\xE5\x8B\x9E",
+ "\xB3\xD3" => "\xE5\x8B\x9D",
+ "\xB3\xD4" => "\xE5\x8B\x9B",
+ "\xB3\xD5" => "\xE5\x8D\x9A",
+ "\xB3\xD6" => "\xE5\x8E\xA5",
+ "\xB3\xD7" => "\xE5\x95\xBB",
+ "\xB3\xD8" => "\xE5\x96\x80",
+ "\xB3\xD9" => "\xE5\x96\xA7",
+ "\xB3\xDA" => "\xE5\x95\xBC",
+ "\xB3\xDB" => "\xE5\x96\x8A",
+ "\xB3\xDC" => "\xE5\x96\x9D",
+ "\xB3\xDD" => "\xE5\x96\x98",
+ "\xB3\xDE" => "\xE5\x96\x82",
+ "\xB3\xDF" => "\xE5\x96\x9C",
+ "\xB3\xE0" => "\xE5\x96\xAA",
+ "\xB3\xE1" => "\xE5\x96\x94",
+ "\xB3\xE2" => "\xE5\x96\x87",
+ "\xB3\xE3" => "\xE5\x96\x8B",
+ "\xB3\xE4" => "\xE5\x96\x83",
+ "\xB3\xE5" => "\xE5\x96\xB3",
+ "\xB3\xE6" => "\xE5\x96\xAE",
+ "\xB3\xE7" => "\xE5\x96\x9F",
+ "\xB3\xE8" => "\xE5\x94\xBE",
+ "\xB3\xE9" => "\xE5\x96\xB2",
+ "\xB3\xEA" => "\xE5\x96\x9A",
+ "\xB3\xEB" => "\xE5\x96\xBB",
+ "\xB3\xEC" => "\xE5\x96\xAC",
+ "\xB3\xED" => "\xE5\x96\xB1",
+ "\xB3\xEE" => "\xE5\x95\xBE",
+ "\xB3\xEF" => "\xE5\x96\x89",
+ "\xB3\xF0" => "\xE5\x96\xAB",
+ "\xB3\xF1" => "\xE5\x96\x99",
+ "\xB3\xF2" => "\xE5\x9C\x8D",
+ "\xB3\xF3" => "\xE5\xA0\xAF",
+ "\xB3\xF4" => "\xE5\xA0\xAA",
+ "\xB3\xF5" => "\xE5\xA0\xB4",
+ "\xB3\xF6" => "\xE5\xA0\xA4",
+ "\xB3\xF7" => "\xE5\xA0\xB0",
+ "\xB3\xF8" => "\xE5\xA0\xB1",
+ "\xB3\xF9" => "\xE5\xA0\xA1",
+ "\xB3\xFA" => "\xE5\xA0\x9D",
+ "\xB3\xFB" => "\xE5\xA0\xA0",
+ "\xB3\xFC" => "\xE5\xA3\xB9",
+ "\xB3\xFD" => "\xE5\xA3\xBA",
+ "\xB3\xFE" => "\xE5\xA5\xA0",
+ "\xB4\x40" => "\xE5\xA9\xB7",
+ "\xB4\x41" => "\xE5\xAA\x9A",
+ "\xB4\x42" => "\xE5\xA9\xBF",
+ "\xB4\x43" => "\xE5\xAA\x92",
+ "\xB4\x44" => "\xE5\xAA\x9B",
+ "\xB4\x45" => "\xE5\xAA\xA7",
+ "\xB4\x46" => "\xE5\xAD\xB3",
+ "\xB4\x47" => "\xE5\xAD\xB1",
+ "\xB4\x48" => "\xE5\xAF\x92",
+ "\xB4\x49" => "\xE5\xAF\x8C",
+ "\xB4\x4A" => "\xE5\xAF\x93",
+ "\xB4\x4B" => "\xE5\xAF\x90",
+ "\xB4\x4C" => "\xE5\xB0\x8A",
+ "\xB4\x4D" => "\xE5\xB0\x8B",
+ "\xB4\x4E" => "\xE5\xB0\xB1",
+ "\xB4\x4F" => "\xE5\xB5\x8C",
+ "\xB4\x50" => "\xE5\xB5\x90",
+ "\xB4\x51" => "\xE5\xB4\xB4",
+ "\xB4\x52" => "\xE5\xB5\x87",
+ "\xB4\x53" => "\xE5\xB7\xBD",
+ "\xB4\x54" => "\xE5\xB9\x85",
+ "\xB4\x55" => "\xE5\xB8\xBD",
+ "\xB4\x56" => "\xE5\xB9\x80",
+ "\xB4\x57" => "\xE5\xB9\x83",
+ "\xB4\x58" => "\xE5\xB9\xBE",
+ "\xB4\x59" => "\xE5\xBB\x8A",
+ "\xB4\x5A" => "\xE5\xBB\x81",
+ "\xB4\x5B" => "\xE5\xBB\x82",
+ "\xB4\x5C" => "\xE5\xBB\x84",
+ "\xB4\x5D" => "\xE5\xBC\xBC",
+ "\xB4\x5E" => "\xE5\xBD\xAD",
+ "\xB4\x5F" => "\xE5\xBE\xA9",
+ "\xB4\x60" => "\xE5\xBE\xAA",
+ "\xB4\x61" => "\xE5\xBE\xA8",
+ "\xB4\x62" => "\xE6\x83\x91",
+ "\xB4\x63" => "\xE6\x83\xA1",
+ "\xB4\x64" => "\xE6\x82\xB2",
+ "\xB4\x65" => "\xE6\x82\xB6",
+ "\xB4\x66" => "\xE6\x83\xA0",
+ "\xB4\x67" => "\xE6\x84\x9C",
+ "\xB4\x68" => "\xE6\x84\xA3",
+ "\xB4\x69" => "\xE6\x83\xBA",
+ "\xB4\x6A" => "\xE6\x84\x95",
+ "\xB4\x6B" => "\xE6\x83\xB0",
+ "\xB4\x6C" => "\xE6\x83\xBB",
+ "\xB4\x6D" => "\xE6\x83\xB4",
+ "\xB4\x6E" => "\xE6\x85\xA8",
+ "\xB4\x6F" => "\xE6\x83\xB1",
+ "\xB4\x70" => "\xE6\x84\x8E",
+ "\xB4\x71" => "\xE6\x83\xB6",
+ "\xB4\x72" => "\xE6\x84\x89",
+ "\xB4\x73" => "\xE6\x84\x80",
+ "\xB4\x74" => "\xE6\x84\x92",
+ "\xB4\x75" => "\xE6\x88\x9F",
+ "\xB4\x76" => "\xE6\x89\x89",
+ "\xB4\x77" => "\xE6\x8E\xA3",
+ "\xB4\x78" => "\xE6\x8E\x8C",
+ "\xB4\x79" => "\xE6\x8F\x8F",
+ "\xB4\x7A" => "\xE6\x8F\x80",
+ "\xB4\x7B" => "\xE6\x8F\xA9",
+ "\xB4\x7C" => "\xE6\x8F\x89",
+ "\xB4\x7D" => "\xE6\x8F\x86",
+ "\xB4\x7E" => "\xE6\x8F\x8D",
+ "\xB4\xA1" => "\xE6\x8F\x92",
+ "\xB4\xA2" => "\xE6\x8F\xA3",
+ "\xB4\xA3" => "\xE6\x8F\x90",
+ "\xB4\xA4" => "\xE6\x8F\xA1",
+ "\xB4\xA5" => "\xE6\x8F\x96",
+ "\xB4\xA6" => "\xE6\x8F\xAD",
+ "\xB4\xA7" => "\xE6\x8F\xAE",
+ "\xB4\xA8" => "\xE6\x8D\xB6",
+ "\xB4\xA9" => "\xE6\x8F\xB4",
+ "\xB4\xAA" => "\xE6\x8F\xAA",
+ "\xB4\xAB" => "\xE6\x8F\x9B",
+ "\xB4\xAC" => "\xE6\x91\x92",
+ "\xB4\xAD" => "\xE6\x8F\x9A",
+ "\xB4\xAE" => "\xE6\x8F\xB9",
+ "\xB4\xAF" => "\xE6\x95\x9E",
+ "\xB4\xB0" => "\xE6\x95\xA6",
+ "\xB4\xB1" => "\xE6\x95\xA2",
+ "\xB4\xB2" => "\xE6\x95\xA3",
+ "\xB4\xB3" => "\xE6\x96\x91",
+ "\xB4\xB4" => "\xE6\x96\x90",
+ "\xB4\xB5" => "\xE6\x96\xAF",
+ "\xB4\xB6" => "\xE6\x99\xAE",
+ "\xB4\xB7" => "\xE6\x99\xB0",
+ "\xB4\xB8" => "\xE6\x99\xB4",
+ "\xB4\xB9" => "\xE6\x99\xB6",
+ "\xB4\xBA" => "\xE6\x99\xAF",
+ "\xB4\xBB" => "\xE6\x9A\x91",
+ "\xB4\xBC" => "\xE6\x99\xBA",
+ "\xB4\xBD" => "\xE6\x99\xBE",
+ "\xB4\xBE" => "\xE6\x99\xB7",
+ "\xB4\xBF" => "\xE6\x9B\xBE",
+ "\xB4\xC0" => "\xE6\x9B\xBF",
+ "\xB4\xC1" => "\xE6\x9C\x9F",
+ "\xB4\xC2" => "\xE6\x9C\x9D",
+ "\xB4\xC3" => "\xE6\xA3\xBA",
+ "\xB4\xC4" => "\xE6\xA3\x95",
+ "\xB4\xC5" => "\xE6\xA3\xA0",
+ "\xB4\xC6" => "\xE6\xA3\x98",
+ "\xB4\xC7" => "\xE6\xA3\x97",
+ "\xB4\xC8" => "\xE6\xA4\x85",
+ "\xB4\xC9" => "\xE6\xA3\x9F",
+ "\xB4\xCA" => "\xE6\xA3\xB5",
+ "\xB4\xCB" => "\xE6\xA3\xAE",
+ "\xB4\xCC" => "\xE6\xA3\xA7",
+ "\xB4\xCD" => "\xE6\xA3\xB9",
+ "\xB4\xCE" => "\xE6\xA3\x92",
+ "\xB4\xCF" => "\xE6\xA3\xB2",
+ "\xB4\xD0" => "\xE6\xA3\xA3",
+ "\xB4\xD1" => "\xE6\xA3\x8B",
+ "\xB4\xD2" => "\xE6\xA3\x8D",
+ "\xB4\xD3" => "\xE6\xA4\x8D",
+ "\xB4\xD4" => "\xE6\xA4\x92",
+ "\xB4\xD5" => "\xE6\xA4\x8E",
+ "\xB4\xD6" => "\xE6\xA3\x89",
+ "\xB4\xD7" => "\xE6\xA3\x9A",
+ "\xB4\xD8" => "\xE6\xA5\xAE",
+ "\xB4\xD9" => "\xE6\xA3\xBB",
+ "\xB4\xDA" => "\xE6\xAC\xBE",
+ "\xB4\xDB" => "\xE6\xAC\xBA",
+ "\xB4\xDC" => "\xE6\xAC\xBD",
+ "\xB4\xDD" => "\xE6\xAE\x98",
+ "\xB4\xDE" => "\xE6\xAE\x96",
+ "\xB4\xDF" => "\xE6\xAE\xBC",
+ "\xB4\xE0" => "\xE6\xAF\xAF",
+ "\xB4\xE1" => "\xE6\xB0\xAE",
+ "\xB4\xE2" => "\xE6\xB0\xAF",
+ "\xB4\xE3" => "\xE6\xB0\xAC",
+ "\xB4\xE4" => "\xE6\xB8\xAF",
+ "\xB4\xE5" => "\xE6\xB8\xB8",
+ "\xB4\xE6" => "\xE6\xB9\x94",
+ "\xB4\xE7" => "\xE6\xB8\xA1",
+ "\xB4\xE8" => "\xE6\xB8\xB2",
+ "\xB4\xE9" => "\xE6\xB9\xA7",
+ "\xB4\xEA" => "\xE6\xB9\x8A",
+ "\xB4\xEB" => "\xE6\xB8\xA0",
+ "\xB4\xEC" => "\xE6\xB8\xA5",
+ "\xB4\xED" => "\xE6\xB8\xA3",
+ "\xB4\xEE" => "\xE6\xB8\x9B",
+ "\xB4\xEF" => "\xE6\xB9\x9B",
+ "\xB4\xF0" => "\xE6\xB9\x98",
+ "\xB4\xF1" => "\xE6\xB8\xA4",
+ "\xB4\xF2" => "\xE6\xB9\x96",
+ "\xB4\xF3" => "\xE6\xB9\xAE",
+ "\xB4\xF4" => "\xE6\xB8\xAD",
+ "\xB4\xF5" => "\xE6\xB8\xA6",
+ "\xB4\xF6" => "\xE6\xB9\xAF",
+ "\xB4\xF7" => "\xE6\xB8\xB4",
+ "\xB4\xF8" => "\xE6\xB9\x8D",
+ "\xB4\xF9" => "\xE6\xB8\xBA",
+ "\xB4\xFA" => "\xE6\xB8\xAC",
+ "\xB4\xFB" => "\xE6\xB9\x83",
+ "\xB4\xFC" => "\xE6\xB8\x9D",
+ "\xB4\xFD" => "\xE6\xB8\xBE",
+ "\xB4\xFE" => "\xE6\xBB\x8B",
+ "\xB5\x40" => "\xE6\xBA\x89",
+ "\xB5\x41" => "\xE6\xB8\x99",
+ "\xB5\x42" => "\xE6\xB9\x8E",
+ "\xB5\x43" => "\xE6\xB9\xA3",
+ "\xB5\x44" => "\xE6\xB9\x84",
+ "\xB5\x45" => "\xE6\xB9\xB2",
+ "\xB5\x46" => "\xE6\xB9\xA9",
+ "\xB5\x47" => "\xE6\xB9\x9F",
+ "\xB5\x48" => "\xE7\x84\x99",
+ "\xB5\x49" => "\xE7\x84\x9A",
+ "\xB5\x4A" => "\xE7\x84\xA6",
+ "\xB5\x4B" => "\xE7\x84\xB0",
+ "\xB5\x4C" => "\xE7\x84\xA1",
+ "\xB5\x4D" => "\xE7\x84\xB6",
+ "\xB5\x4E" => "\xE7\x85\xAE",
+ "\xB5\x4F" => "\xE7\x84\x9C",
+ "\xB5\x50" => "\xE7\x89\x8C",
+ "\xB5\x51" => "\xE7\x8A\x84",
+ "\xB5\x52" => "\xE7\x8A\x80",
+ "\xB5\x53" => "\xE7\x8C\xB6",
+ "\xB5\x54" => "\xE7\x8C\xA5",
+ "\xB5\x55" => "\xE7\x8C\xB4",
+ "\xB5\x56" => "\xE7\x8C\xA9",
+ "\xB5\x57" => "\xE7\x90\xBA",
+ "\xB5\x58" => "\xE7\x90\xAA",
+ "\xB5\x59" => "\xE7\x90\xB3",
+ "\xB5\x5A" => "\xE7\x90\xA2",
+ "\xB5\x5B" => "\xE7\x90\xA5",
+ "\xB5\x5C" => "\xE7\x90\xB5",
+ "\xB5\x5D" => "\xE7\x90\xB6",
+ "\xB5\x5E" => "\xE7\x90\xB4",
+ "\xB5\x5F" => "\xE7\x90\xAF",
+ "\xB5\x60" => "\xE7\x90\x9B",
+ "\xB5\x61" => "\xE7\x90\xA6",
+ "\xB5\x62" => "\xE7\x90\xA8",
+ "\xB5\x63" => "\xE7\x94\xA5",
+ "\xB5\x64" => "\xE7\x94\xA6",
+ "\xB5\x65" => "\xE7\x95\xAB",
+ "\xB5\x66" => "\xE7\x95\xAA",
+ "\xB5\x67" => "\xE7\x97\xA2",
+ "\xB5\x68" => "\xE7\x97\x9B",
+ "\xB5\x69" => "\xE7\x97\xA3",
+ "\xB5\x6A" => "\xE7\x97\x99",
+ "\xB5\x6B" => "\xE7\x97\x98",
+ "\xB5\x6C" => "\xE7\x97\x9E",
+ "\xB5\x6D" => "\xE7\x97\xA0",
+ "\xB5\x6E" => "\xE7\x99\xBB",
+ "\xB5\x6F" => "\xE7\x99\xBC",
+ "\xB5\x70" => "\xE7\x9A\x96",
+ "\xB5\x71" => "\xE7\x9A\x93",
+ "\xB5\x72" => "\xE7\x9A\xB4",
+ "\xB5\x73" => "\xE7\x9B\x9C",
+ "\xB5\x74" => "\xE7\x9D\x8F",
+ "\xB5\x75" => "\xE7\x9F\xAD",
+ "\xB5\x76" => "\xE7\xA1\x9D",
+ "\xB5\x77" => "\xE7\xA1\xAC",
+ "\xB5\x78" => "\xE7\xA1\xAF",
+ "\xB5\x79" => "\xE7\xA8\x8D",
+ "\xB5\x7A" => "\xE7\xA8\x88",
+ "\xB5\x7B" => "\xE7\xA8\x8B",
+ "\xB5\x7C" => "\xE7\xA8\x85",
+ "\xB5\x7D" => "\xE7\xA8\x80",
+ "\xB5\x7E" => "\xE7\xAA\x98",
+ "\xB5\xA1" => "\xE7\xAA\x97",
+ "\xB5\xA2" => "\xE7\xAA\x96",
+ "\xB5\xA3" => "\xE7\xAB\xA5",
+ "\xB5\xA4" => "\xE7\xAB\xA3",
+ "\xB5\xA5" => "\xE7\xAD\x89",
+ "\xB5\xA6" => "\xE7\xAD\x96",
+ "\xB5\xA7" => "\xE7\xAD\x86",
+ "\xB5\xA8" => "\xE7\xAD\x90",
+ "\xB5\xA9" => "\xE7\xAD\x92",
+ "\xB5\xAA" => "\xE7\xAD\x94",
+ "\xB5\xAB" => "\xE7\xAD\x8D",
+ "\xB5\xAC" => "\xE7\xAD\x8B",
+ "\xB5\xAD" => "\xE7\xAD\x8F",
+ "\xB5\xAE" => "\xE7\xAD\x91",
+ "\xB5\xAF" => "\xE7\xB2\x9F",
+ "\xB5\xB0" => "\xE7\xB2\xA5",
+ "\xB5\xB1" => "\xE7\xB5\x9E",
+ "\xB5\xB2" => "\xE7\xB5\x90",
+ "\xB5\xB3" => "\xE7\xB5\xA8",
+ "\xB5\xB4" => "\xE7\xB5\x95",
+ "\xB5\xB5" => "\xE7\xB4\xAB",
+ "\xB5\xB6" => "\xE7\xB5\xAE",
+ "\xB5\xB7" => "\xE7\xB5\xB2",
+ "\xB5\xB8" => "\xE7\xB5\xA1",
+ "\xB5\xB9" => "\xE7\xB5\xA6",
+ "\xB5\xBA" => "\xE7\xB5\xA2",
+ "\xB5\xBB" => "\xE7\xB5\xB0",
+ "\xB5\xBC" => "\xE7\xB5\xB3",
+ "\xB5\xBD" => "\xE5\x96\x84",
+ "\xB5\xBE" => "\xE7\xBF\x94",
+ "\xB5\xBF" => "\xE7\xBF\x95",
+ "\xB5\xC0" => "\xE8\x80\x8B",
+ "\xB5\xC1" => "\xE8\x81\x92",
+ "\xB5\xC2" => "\xE8\x82\x85",
+ "\xB5\xC3" => "\xE8\x85\x95",
+ "\xB5\xC4" => "\xE8\x85\x94",
+ "\xB5\xC5" => "\xE8\x85\x8B",
+ "\xB5\xC6" => "\xE8\x85\x91",
+ "\xB5\xC7" => "\xE8\x85\x8E",
+ "\xB5\xC8" => "\xE8\x84\xB9",
+ "\xB5\xC9" => "\xE8\x85\x86",
+ "\xB5\xCA" => "\xE8\x84\xBE",
+ "\xB5\xCB" => "\xE8\x85\x8C",
+ "\xB5\xCC" => "\xE8\x85\x93",
+ "\xB5\xCD" => "\xE8\x85\xB4",
+ "\xB5\xCE" => "\xE8\x88\x92",
+ "\xB5\xCF" => "\xE8\x88\x9C",
+ "\xB5\xD0" => "\xE8\x8F\xA9",
+ "\xB5\xD1" => "\xE8\x90\x83",
+ "\xB5\xD2" => "\xE8\x8F\xB8",
+ "\xB5\xD3" => "\xE8\x90\x8D",
+ "\xB5\xD4" => "\xE8\x8F\xA0",
+ "\xB5\xD5" => "\xE8\x8F\x85",
+ "\xB5\xD6" => "\xE8\x90\x8B",
+ "\xB5\xD7" => "\xE8\x8F\x81",
+ "\xB5\xD8" => "\xE8\x8F\xAF",
+ "\xB5\xD9" => "\xE8\x8F\xB1",
+ "\xB5\xDA" => "\xE8\x8F\xB4",
+ "\xB5\xDB" => "\xE8\x91\x97",
+ "\xB5\xDC" => "\xE8\x90\x8A",
+ "\xB5\xDD" => "\xE8\x8F\xB0",
+ "\xB5\xDE" => "\xE8\x90\x8C",
+ "\xB5\xDF" => "\xE8\x8F\x8C",
+ "\xB5\xE0" => "\xE8\x8F\xBD",
+ "\xB5\xE1" => "\xE8\x8F\xB2",
+ "\xB5\xE2" => "\xE8\x8F\x8A",
+ "\xB5\xE3" => "\xE8\x90\xB8",
+ "\xB5\xE4" => "\xE8\x90\x8E",
+ "\xB5\xE5" => "\xE8\x90\x84",
+ "\xB5\xE6" => "\xE8\x8F\x9C",
+ "\xB5\xE7" => "\xE8\x90\x87",
+ "\xB5\xE8" => "\xE8\x8F\x94",
+ "\xB5\xE9" => "\xE8\x8F\x9F",
+ "\xB5\xEA" => "\xE8\x99\x9B",
+ "\xB5\xEB" => "\xE8\x9B\x9F",
+ "\xB5\xEC" => "\xE8\x9B\x99",
+ "\xB5\xED" => "\xE8\x9B\xAD",
+ "\xB5\xEE" => "\xE8\x9B\x94",
+ "\xB5\xEF" => "\xE8\x9B\x9B",
+ "\xB5\xF0" => "\xE8\x9B\xA4",
+ "\xB5\xF1" => "\xE8\x9B\x90",
+ "\xB5\xF2" => "\xE8\x9B\x9E",
+ "\xB5\xF3" => "\xE8\xA1\x97",
+ "\xB5\xF4" => "\xE8\xA3\x81",
+ "\xB5\xF5" => "\xE8\xA3\x82",
+ "\xB5\xF6" => "\xE8\xA2\xB1",
+ "\xB5\xF7" => "\xE8\xA6\x83",
+ "\xB5\xF8" => "\xE8\xA6\x96",
+ "\xB5\xF9" => "\xE8\xA8\xBB",
+ "\xB5\xFA" => "\xE8\xA9\xA0",
+ "\xB5\xFB" => "\xE8\xA9\x95",
+ "\xB5\xFC" => "\xE8\xA9\x9E",
+ "\xB5\xFD" => "\xE8\xA8\xBC",
+ "\xB5\xFE" => "\xE8\xA9\x81",
+ "\xB6\x40" => "\xE8\xA9\x94",
+ "\xB6\x41" => "\xE8\xA9\x9B",
+ "\xB6\x42" => "\xE8\xA9\x90",
+ "\xB6\x43" => "\xE8\xA9\x86",
+ "\xB6\x44" => "\xE8\xA8\xB4",
+ "\xB6\x45" => "\xE8\xA8\xBA",
+ "\xB6\x46" => "\xE8\xA8\xB6",
+ "\xB6\x47" => "\xE8\xA9\x96",
+ "\xB6\x48" => "\xE8\xB1\xA1",
+ "\xB6\x49" => "\xE8\xB2\x82",
+ "\xB6\x4A" => "\xE8\xB2\xAF",
+ "\xB6\x4B" => "\xE8\xB2\xBC",
+ "\xB6\x4C" => "\xE8\xB2\xB3",
+ "\xB6\x4D" => "\xE8\xB2\xBD",
+ "\xB6\x4E" => "\xE8\xB3\x81",
+ "\xB6\x4F" => "\xE8\xB2\xBB",
+ "\xB6\x50" => "\xE8\xB3\x80",
+ "\xB6\x51" => "\xE8\xB2\xB4",
+ "\xB6\x52" => "\xE8\xB2\xB7",
+ "\xB6\x53" => "\xE8\xB2\xB6",
+ "\xB6\x54" => "\xE8\xB2\xBF",
+ "\xB6\x55" => "\xE8\xB2\xB8",
+ "\xB6\x56" => "\xE8\xB6\x8A",
+ "\xB6\x57" => "\xE8\xB6\x85",
+ "\xB6\x58" => "\xE8\xB6\x81",
+ "\xB6\x59" => "\xE8\xB7\x8E",
+ "\xB6\x5A" => "\xE8\xB7\x9D",
+ "\xB6\x5B" => "\xE8\xB7\x8B",
+ "\xB6\x5C" => "\xE8\xB7\x9A",
+ "\xB6\x5D" => "\xE8\xB7\x91",
+ "\xB6\x5E" => "\xE8\xB7\x8C",
+ "\xB6\x5F" => "\xE8\xB7\x9B",
+ "\xB6\x60" => "\xE8\xB7\x86",
+ "\xB6\x61" => "\xE8\xBB\xBB",
+ "\xB6\x62" => "\xE8\xBB\xB8",
+ "\xB6\x63" => "\xE8\xBB\xBC",
+ "\xB6\x64" => "\xE8\xBE\x9C",
+ "\xB6\x65" => "\xE9\x80\xAE",
+ "\xB6\x66" => "\xE9\x80\xB5",
+ "\xB6\x67" => "\xE9\x80\xB1",
+ "\xB6\x68" => "\xE9\x80\xB8",
+ "\xB6\x69" => "\xE9\x80\xB2",
+ "\xB6\x6A" => "\xE9\x80\xB6",
+ "\xB6\x6B" => "\xE9\x84\x82",
+ "\xB6\x6C" => "\xE9\x83\xB5",
+ "\xB6\x6D" => "\xE9\x84\x89",
+ "\xB6\x6E" => "\xE9\x83\xBE",
+ "\xB6\x6F" => "\xE9\x85\xA3",
+ "\xB6\x70" => "\xE9\x85\xA5",
+ "\xB6\x71" => "\xE9\x87\x8F",
+ "\xB6\x72" => "\xE9\x88\x94",
+ "\xB6\x73" => "\xE9\x88\x95",
+ "\xB6\x74" => "\xE9\x88\xA3",
+ "\xB6\x75" => "\xE9\x88\x89",
+ "\xB6\x76" => "\xE9\x88\x9E",
+ "\xB6\x77" => "\xE9\x88\x8D",
+ "\xB6\x78" => "\xE9\x88\x90",
+ "\xB6\x79" => "\xE9\x88\x87",
+ "\xB6\x7A" => "\xE9\x88\x91",
+ "\xB6\x7B" => "\xE9\x96\x94",
+ "\xB6\x7C" => "\xE9\x96\x8F",
+ "\xB6\x7D" => "\xE9\x96\x8B",
+ "\xB6\x7E" => "\xE9\x96\x91",
+ "\xB6\xA1" => "\xE9\x96\x93",
+ "\xB6\xA2" => "\xE9\x96\x92",
+ "\xB6\xA3" => "\xE9\x96\x8E",
+ "\xB6\xA4" => "\xE9\x9A\x8A",
+ "\xB6\xA5" => "\xE9\x9A\x8E",
+ "\xB6\xA6" => "\xE9\x9A\x8B",
+ "\xB6\xA7" => "\xE9\x99\xBD",
+ "\xB6\xA8" => "\xE9\x9A\x85",
+ "\xB6\xA9" => "\xE9\x9A\x86",
+ "\xB6\xAA" => "\xE9\x9A\x8D",
+ "\xB6\xAB" => "\xE9\x99\xB2",
+ "\xB6\xAC" => "\xE9\x9A\x84",
+ "\xB6\xAD" => "\xE9\x9B\x81",
+ "\xB6\xAE" => "\xE9\x9B\x85",
+ "\xB6\xAF" => "\xE9\x9B\x84",
+ "\xB6\xB0" => "\xE9\x9B\x86",
+ "\xB6\xB1" => "\xE9\x9B\x87",
+ "\xB6\xB2" => "\xE9\x9B\xAF",
+ "\xB6\xB3" => "\xE9\x9B\xB2",
+ "\xB6\xB4" => "\xE9\x9F\x8C",
+ "\xB6\xB5" => "\xE9\xA0\x85",
+ "\xB6\xB6" => "\xE9\xA0\x86",
+ "\xB6\xB7" => "\xE9\xA0\x88",
+ "\xB6\xB8" => "\xE9\xA3\xA7",
+ "\xB6\xB9" => "\xE9\xA3\xAA",
+ "\xB6\xBA" => "\xE9\xA3\xAF",
+ "\xB6\xBB" => "\xE9\xA3\xA9",
+ "\xB6\xBC" => "\xE9\xA3\xB2",
+ "\xB6\xBD" => "\xE9\xA3\xAD",
+ "\xB6\xBE" => "\xE9\xA6\xAE",
+ "\xB6\xBF" => "\xE9\xA6\xAD",
+ "\xB6\xC0" => "\xE9\xBB\x83",
+ "\xB6\xC1" => "\xE9\xBB\x8D",
+ "\xB6\xC2" => "\xE9\xBB\x91",
+ "\xB6\xC3" => "\xE4\xBA\x82",
+ "\xB6\xC4" => "\xE5\x82\xAD",
+ "\xB6\xC5" => "\xE5\x82\xB5",
+ "\xB6\xC6" => "\xE5\x82\xB2",
+ "\xB6\xC7" => "\xE5\x82\xB3",
+ "\xB6\xC8" => "\xE5\x83\x85",
+ "\xB6\xC9" => "\xE5\x82\xBE",
+ "\xB6\xCA" => "\xE5\x82\xAC",
+ "\xB6\xCB" => "\xE5\x82\xB7",
+ "\xB6\xCC" => "\xE5\x82\xBB",
+ "\xB6\xCD" => "\xE5\x82\xAF",
+ "\xB6\xCE" => "\xE5\x83\x87",
+ "\xB6\xCF" => "\xE5\x89\xBF",
+ "\xB6\xD0" => "\xE5\x89\xB7",
+ "\xB6\xD1" => "\xE5\x89\xBD",
+ "\xB6\xD2" => "\xE5\x8B\x9F",
+ "\xB6\xD3" => "\xE5\x8B\xA6",
+ "\xB6\xD4" => "\xE5\x8B\xA4",
+ "\xB6\xD5" => "\xE5\x8B\xA2",
+ "\xB6\xD6" => "\xE5\x8B\xA3",
+ "\xB6\xD7" => "\xE5\x8C\xAF",
+ "\xB6\xD8" => "\xE5\x97\x9F",
+ "\xB6\xD9" => "\xE5\x97\xA8",
+ "\xB6\xDA" => "\xE5\x97\x93",
+ "\xB6\xDB" => "\xE5\x97\xA6",
+ "\xB6\xDC" => "\xE5\x97\x8E",
+ "\xB6\xDD" => "\xE5\x97\x9C",
+ "\xB6\xDE" => "\xE5\x97\x87",
+ "\xB6\xDF" => "\xE5\x97\x91",
+ "\xB6\xE0" => "\xE5\x97\xA3",
+ "\xB6\xE1" => "\xE5\x97\xA4",
+ "\xB6\xE2" => "\xE5\x97\xAF",
+ "\xB6\xE3" => "\xE5\x97\x9A",
+ "\xB6\xE4" => "\xE5\x97\xA1",
+ "\xB6\xE5" => "\xE5\x97\x85",
+ "\xB6\xE6" => "\xE5\x97\x86",
+ "\xB6\xE7" => "\xE5\x97\xA5",
+ "\xB6\xE8" => "\xE5\x97\x89",
+ "\xB6\xE9" => "\xE5\x9C\x92",
+ "\xB6\xEA" => "\xE5\x9C\x93",
+ "\xB6\xEB" => "\xE5\xA1\x9E",
+ "\xB6\xEC" => "\xE5\xA1\x91",
+ "\xB6\xED" => "\xE5\xA1\x98",
+ "\xB6\xEE" => "\xE5\xA1\x97",
+ "\xB6\xEF" => "\xE5\xA1\x9A",
+ "\xB6\xF0" => "\xE5\xA1\x94",
+ "\xB6\xF1" => "\xE5\xA1\xAB",
+ "\xB6\xF2" => "\xE5\xA1\x8C",
+ "\xB6\xF3" => "\xE5\xA1\xAD",
+ "\xB6\xF4" => "\xE5\xA1\x8A",
+ "\xB6\xF5" => "\xE5\xA1\xA2",
+ "\xB6\xF6" => "\xE5\xA1\x92",
+ "\xB6\xF7" => "\xE5\xA1\x8B",
+ "\xB6\xF8" => "\xE5\xA5\xA7",
+ "\xB6\xF9" => "\xE5\xAB\x81",
+ "\xB6\xFA" => "\xE5\xAB\x89",
+ "\xB6\xFB" => "\xE5\xAB\x8C",
+ "\xB6\xFC" => "\xE5\xAA\xBE",
+ "\xB6\xFD" => "\xE5\xAA\xBD",
+ "\xB6\xFE" => "\xE5\xAA\xBC",
+ "\xB7\x40" => "\xE5\xAA\xB3",
+ "\xB7\x41" => "\xE5\xAB\x82",
+ "\xB7\x42" => "\xE5\xAA\xB2",
+ "\xB7\x43" => "\xE5\xB5\xA9",
+ "\xB7\x44" => "\xE5\xB5\xAF",
+ "\xB7\x45" => "\xE5\xB9\x8C",
+ "\xB7\x46" => "\xE5\xB9\xB9",
+ "\xB7\x47" => "\xE5\xBB\x89",
+ "\xB7\x48" => "\xE5\xBB\x88",
+ "\xB7\x49" => "\xE5\xBC\x92",
+ "\xB7\x4A" => "\xE5\xBD\x99",
+ "\xB7\x4B" => "\xE5\xBE\xAC",
+ "\xB7\x4C" => "\xE5\xBE\xAE",
+ "\xB7\x4D" => "\xE6\x84\x9A",
+ "\xB7\x4E" => "\xE6\x84\x8F",
+ "\xB7\x4F" => "\xE6\x85\x88",
+ "\xB7\x50" => "\xE6\x84\x9F",
+ "\xB7\x51" => "\xE6\x83\xB3",
+ "\xB7\x52" => "\xE6\x84\x9B",
+ "\xB7\x53" => "\xE6\x83\xB9",
+ "\xB7\x54" => "\xE6\x84\x81",
+ "\xB7\x55" => "\xE6\x84\x88",
+ "\xB7\x56" => "\xE6\x85\x8E",
+ "\xB7\x57" => "\xE6\x85\x8C",
+ "\xB7\x58" => "\xE6\x85\x84",
+ "\xB7\x59" => "\xE6\x85\x8D",
+ "\xB7\x5A" => "\xE6\x84\xBE",
+ "\xB7\x5B" => "\xE6\x84\xB4",
+ "\xB7\x5C" => "\xE6\x84\xA7",
+ "\xB7\x5D" => "\xE6\x84\x8D",
+ "\xB7\x5E" => "\xE6\x84\x86",
+ "\xB7\x5F" => "\xE6\x84\xB7",
+ "\xB7\x60" => "\xE6\x88\xA1",
+ "\xB7\x61" => "\xE6\x88\xA2",
+ "\xB7\x62" => "\xE6\x90\x93",
+ "\xB7\x63" => "\xE6\x90\xBE",
+ "\xB7\x64" => "\xE6\x90\x9E",
+ "\xB7\x65" => "\xE6\x90\xAA",
+ "\xB7\x66" => "\xE6\x90\xAD",
+ "\xB7\x67" => "\xE6\x90\xBD",
+ "\xB7\x68" => "\xE6\x90\xAC",
+ "\xB7\x69" => "\xE6\x90\x8F",
+ "\xB7\x6A" => "\xE6\x90\x9C",
+ "\xB7\x6B" => "\xE6\x90\x94",
+ "\xB7\x6C" => "\xE6\x90\x8D",
+ "\xB7\x6D" => "\xE6\x90\xB6",
+ "\xB7\x6E" => "\xE6\x90\x96",
+ "\xB7\x6F" => "\xE6\x90\x97",
+ "\xB7\x70" => "\xE6\x90\x86",
+ "\xB7\x71" => "\xE6\x95\xAC",
+ "\xB7\x72" => "\xE6\x96\x9F",
+ "\xB7\x73" => "\xE6\x96\xB0",
+ "\xB7\x74" => "\xE6\x9A\x97",
+ "\xB7\x75" => "\xE6\x9A\x89",
+ "\xB7\x76" => "\xE6\x9A\x87",
+ "\xB7\x77" => "\xE6\x9A\x88",
+ "\xB7\x78" => "\xE6\x9A\x96",
+ "\xB7\x79" => "\xE6\x9A\x84",
+ "\xB7\x7A" => "\xE6\x9A\x98",
+ "\xB7\x7B" => "\xE6\x9A\x8D",
+ "\xB7\x7C" => "\xE6\x9C\x83",
+ "\xB7\x7D" => "\xE6\xA6\x94",
+ "\xB7\x7E" => "\xE6\xA5\xAD",
+ "\xB7\xA1" => "\xE6\xA5\x9A",
+ "\xB7\xA2" => "\xE6\xA5\xB7",
+ "\xB7\xA3" => "\xE6\xA5\xA0",
+ "\xB7\xA4" => "\xE6\xA5\x94",
+ "\xB7\xA5" => "\xE6\xA5\xB5",
+ "\xB7\xA6" => "\xE6\xA4\xB0",
+ "\xB7\xA7" => "\xE6\xA6\x82",
+ "\xB7\xA8" => "\xE6\xA5\x8A",
+ "\xB7\xA9" => "\xE6\xA5\xA8",
+ "\xB7\xAA" => "\xE6\xA5\xAB",
+ "\xB7\xAB" => "\xE6\xA5\x9E",
+ "\xB7\xAC" => "\xE6\xA5\x93",
+ "\xB7\xAD" => "\xE6\xA5\xB9",
+ "\xB7\xAE" => "\xE6\xA6\x86",
+ "\xB7\xAF" => "\xE6\xA5\x9D",
+ "\xB7\xB0" => "\xE6\xA5\xA3",
+ "\xB7\xB1" => "\xE6\xA5\x9B",
+ "\xB7\xB2" => "\xE6\xAD\x87",
+ "\xB7\xB3" => "\xE6\xAD\xB2",
+ "\xB7\xB4" => "\xE6\xAF\x80",
+ "\xB7\xB5" => "\xE6\xAE\xBF",
+ "\xB7\xB6" => "\xE6\xAF\x93",
+ "\xB7\xB7" => "\xE6\xAF\xBD",
+ "\xB7\xB8" => "\xE6\xBA\xA2",
+ "\xB7\xB9" => "\xE6\xBA\xAF",
+ "\xB7\xBA" => "\xE6\xBB\x93",
+ "\xB7\xBB" => "\xE6\xBA\xB6",
+ "\xB7\xBC" => "\xE6\xBB\x82",
+ "\xB7\xBD" => "\xE6\xBA\x90",
+ "\xB7\xBE" => "\xE6\xBA\x9D",
+ "\xB7\xBF" => "\xE6\xBB\x87",
+ "\xB7\xC0" => "\xE6\xBB\x85",
+ "\xB7\xC1" => "\xE6\xBA\xA5",
+ "\xB7\xC2" => "\xE6\xBA\x98",
+ "\xB7\xC3" => "\xE6\xBA\xBC",
+ "\xB7\xC4" => "\xE6\xBA\xBA",
+ "\xB7\xC5" => "\xE6\xBA\xAB",
+ "\xB7\xC6" => "\xE6\xBB\x91",
+ "\xB7\xC7" => "\xE6\xBA\x96",
+ "\xB7\xC8" => "\xE6\xBA\x9C",
+ "\xB7\xC9" => "\xE6\xBB\x84",
+ "\xB7\xCA" => "\xE6\xBB\x94",
+ "\xB7\xCB" => "\xE6\xBA\xAA",
+ "\xB7\xCC" => "\xE6\xBA\xA7",
+ "\xB7\xCD" => "\xE6\xBA\xB4",
+ "\xB7\xCE" => "\xE7\x85\x8E",
+ "\xB7\xCF" => "\xE7\x85\x99",
+ "\xB7\xD0" => "\xE7\x85\xA9",
+ "\xB7\xD1" => "\xE7\x85\xA4",
+ "\xB7\xD2" => "\xE7\x85\x89",
+ "\xB7\xD3" => "\xE7\x85\xA7",
+ "\xB7\xD4" => "\xE7\x85\x9C",
+ "\xB7\xD5" => "\xE7\x85\xAC",
+ "\xB7\xD6" => "\xE7\x85\xA6",
+ "\xB7\xD7" => "\xE7\x85\x8C",
+ "\xB7\xD8" => "\xE7\x85\xA5",
+ "\xB7\xD9" => "\xE7\x85\x9E",
+ "\xB7\xDA" => "\xE7\x85\x86",
+ "\xB7\xDB" => "\xE7\x85\xA8",
+ "\xB7\xDC" => "\xE7\x85\x96",
+ "\xB7\xDD" => "\xE7\x88\xBA",
+ "\xB7\xDE" => "\xE7\x89\x92",
+ "\xB7\xDF" => "\xE7\x8C\xB7",
+ "\xB7\xE0" => "\xE7\x8D\x85",
+ "\xB7\xE1" => "\xE7\x8C\xBF",
+ "\xB7\xE2" => "\xE7\x8C\xBE",
+ "\xB7\xE3" => "\xE7\x91\xAF",
+ "\xB7\xE4" => "\xE7\x91\x9A",
+ "\xB7\xE5" => "\xE7\x91\x95",
+ "\xB7\xE6" => "\xE7\x91\x9F",
+ "\xB7\xE7" => "\xE7\x91\x9E",
+ "\xB7\xE8" => "\xE7\x91\x81",
+ "\xB7\xE9" => "\xE7\x90\xBF",
+ "\xB7\xEA" => "\xE7\x91\x99",
+ "\xB7\xEB" => "\xE7\x91\x9B",
+ "\xB7\xEC" => "\xE7\x91\x9C",
+ "\xB7\xED" => "\xE7\x95\xB6",
+ "\xB7\xEE" => "\xE7\x95\xB8",
+ "\xB7\xEF" => "\xE7\x98\x80",
+ "\xB7\xF0" => "\xE7\x97\xB0",
+ "\xB7\xF1" => "\xE7\x98\x81",
+ "\xB7\xF2" => "\xE7\x97\xB2",
+ "\xB7\xF3" => "\xE7\x97\xB1",
+ "\xB7\xF4" => "\xE7\x97\xBA",
+ "\xB7\xF5" => "\xE7\x97\xBF",
+ "\xB7\xF6" => "\xE7\x97\xB4",
+ "\xB7\xF7" => "\xE7\x97\xB3",
+ "\xB7\xF8" => "\xE7\x9B\x9E",
+ "\xB7\xF9" => "\xE7\x9B\x9F",
+ "\xB7\xFA" => "\xE7\x9D\x9B",
+ "\xB7\xFB" => "\xE7\x9D\xAB",
+ "\xB7\xFC" => "\xE7\x9D\xA6",
+ "\xB7\xFD" => "\xE7\x9D\x9E",
+ "\xB7\xFE" => "\xE7\x9D\xA3",
+ "\xB8\x40" => "\xE7\x9D\xB9",
+ "\xB8\x41" => "\xE7\x9D\xAA",
+ "\xB8\x42" => "\xE7\x9D\xAC",
+ "\xB8\x43" => "\xE7\x9D\x9C",
+ "\xB8\x44" => "\xE7\x9D\xA5",
+ "\xB8\x45" => "\xE7\x9D\xA8",
+ "\xB8\x46" => "\xE7\x9D\xA2",
+ "\xB8\x47" => "\xE7\x9F\xAE",
+ "\xB8\x48" => "\xE7\xA2\x8E",
+ "\xB8\x49" => "\xE7\xA2\xB0",
+ "\xB8\x4A" => "\xE7\xA2\x97",
+ "\xB8\x4B" => "\xE7\xA2\x98",
+ "\xB8\x4C" => "\xE7\xA2\x8C",
+ "\xB8\x4D" => "\xE7\xA2\x89",
+ "\xB8\x4E" => "\xE7\xA1\xBC",
+ "\xB8\x4F" => "\xE7\xA2\x91",
+ "\xB8\x50" => "\xE7\xA2\x93",
+ "\xB8\x51" => "\xE7\xA1\xBF",
+ "\xB8\x52" => "\xE7\xA5\xBA",
+ "\xB8\x53" => "\xE7\xA5\xBF",
+ "\xB8\x54" => "\xE7\xA6\x81",
+ "\xB8\x55" => "\xE8\x90\xAC",
+ "\xB8\x56" => "\xE7\xA6\xBD",
+ "\xB8\x57" => "\xE7\xA8\x9C",
+ "\xB8\x58" => "\xE7\xA8\x9A",
+ "\xB8\x59" => "\xE7\xA8\xA0",
+ "\xB8\x5A" => "\xE7\xA8\x94",
+ "\xB8\x5B" => "\xE7\xA8\x9F",
+ "\xB8\x5C" => "\xE7\xA8\x9E",
+ "\xB8\x5D" => "\xE7\xAA\x9F",
+ "\xB8\x5E" => "\xE7\xAA\xA0",
+ "\xB8\x5F" => "\xE7\xAD\xB7",
+ "\xB8\x60" => "\xE7\xAF\x80",
+ "\xB8\x61" => "\xE7\xAD\xA0",
+ "\xB8\x62" => "\xE7\xAD\xAE",
+ "\xB8\x63" => "\xE7\xAD\xA7",
+ "\xB8\x64" => "\xE7\xB2\xB1",
+ "\xB8\x65" => "\xE7\xB2\xB3",
+ "\xB8\x66" => "\xE7\xB2\xB5",
+ "\xB8\x67" => "\xE7\xB6\x93",
+ "\xB8\x68" => "\xE7\xB5\xB9",
+ "\xB8\x69" => "\xE7\xB6\x91",
+ "\xB8\x6A" => "\xE7\xB6\x81",
+ "\xB8\x6B" => "\xE7\xB6\x8F",
+ "\xB8\x6C" => "\xE7\xB5\x9B",
+ "\xB8\x6D" => "\xE7\xBD\xAE",
+ "\xB8\x6E" => "\xE7\xBD\xA9",
+ "\xB8\x6F" => "\xE7\xBD\xAA",
+ "\xB8\x70" => "\xE7\xBD\xB2",
+ "\xB8\x71" => "\xE7\xBE\xA9",
+ "\xB8\x72" => "\xE7\xBE\xA8",
+ "\xB8\x73" => "\xE7\xBE\xA4",
+ "\xB8\x74" => "\xE8\x81\x96",
+ "\xB8\x75" => "\xE8\x81\x98",
+ "\xB8\x76" => "\xE8\x82\x86",
+ "\xB8\x77" => "\xE8\x82\x84",
+ "\xB8\x78" => "\xE8\x85\xB1",
+ "\xB8\x79" => "\xE8\x85\xB0",
+ "\xB8\x7A" => "\xE8\x85\xB8",
+ "\xB8\x7B" => "\xE8\x85\xA5",
+ "\xB8\x7C" => "\xE8\x85\xAE",
+ "\xB8\x7D" => "\xE8\x85\xB3",
+ "\xB8\x7E" => "\xE8\x85\xAB",
+ "\xB8\xA1" => "\xE8\x85\xB9",
+ "\xB8\xA2" => "\xE8\x85\xBA",
+ "\xB8\xA3" => "\xE8\x85\xA6",
+ "\xB8\xA4" => "\xE8\x88\x85",
+ "\xB8\xA5" => "\xE8\x89\x87",
+ "\xB8\xA6" => "\xE8\x92\x82",
+ "\xB8\xA7" => "\xE8\x91\xB7",
+ "\xB8\xA8" => "\xE8\x90\xBD",
+ "\xB8\xA9" => "\xE8\x90\xB1",
+ "\xB8\xAA" => "\xE8\x91\xB5",
+ "\xB8\xAB" => "\xE8\x91\xA6",
+ "\xB8\xAC" => "\xE8\x91\xAB",
+ "\xB8\xAD" => "\xE8\x91\x89",
+ "\xB8\xAE" => "\xE8\x91\xAC",
+ "\xB8\xAF" => "\xE8\x91\x9B",
+ "\xB8\xB0" => "\xE8\x90\xBC",
+ "\xB8\xB1" => "\xE8\x90\xB5",
+ "\xB8\xB2" => "\xE8\x91\xA1",
+ "\xB8\xB3" => "\xE8\x91\xA3",
+ "\xB8\xB4" => "\xE8\x91\xA9",
+ "\xB8\xB5" => "\xE8\x91\xAD",
+ "\xB8\xB6" => "\xE8\x91\x86",
+ "\xB8\xB7" => "\xE8\x99\x9E",
+ "\xB8\xB8" => "\xE8\x99\x9C",
+ "\xB8\xB9" => "\xE8\x99\x9F",
+ "\xB8\xBA" => "\xE8\x9B\xB9",
+ "\xB8\xBB" => "\xE8\x9C\x93",
+ "\xB8\xBC" => "\xE8\x9C\x88",
+ "\xB8\xBD" => "\xE8\x9C\x87",
+ "\xB8\xBE" => "\xE8\x9C\x80",
+ "\xB8\xBF" => "\xE8\x9B\xBE",
+ "\xB8\xC0" => "\xE8\x9B\xBB",
+ "\xB8\xC1" => "\xE8\x9C\x82",
+ "\xB8\xC2" => "\xE8\x9C\x83",
+ "\xB8\xC3" => "\xE8\x9C\x86",
+ "\xB8\xC4" => "\xE8\x9C\x8A",
+ "\xB8\xC5" => "\xE8\xA1\x99",
+ "\xB8\xC6" => "\xE8\xA3\x9F",
+ "\xB8\xC7" => "\xE8\xA3\x94",
+ "\xB8\xC8" => "\xE8\xA3\x99",
+ "\xB8\xC9" => "\xE8\xA3\x9C",
+ "\xB8\xCA" => "\xE8\xA3\x98",
+ "\xB8\xCB" => "\xE8\xA3\x9D",
+ "\xB8\xCC" => "\xE8\xA3\xA1",
+ "\xB8\xCD" => "\xE8\xA3\x8A",
+ "\xB8\xCE" => "\xE8\xA3\x95",
+ "\xB8\xCF" => "\xE8\xA3\x92",
+ "\xB8\xD0" => "\xE8\xA6\x9C",
+ "\xB8\xD1" => "\xE8\xA7\xA3",
+ "\xB8\xD2" => "\xE8\xA9\xAB",
+ "\xB8\xD3" => "\xE8\xA9\xB2",
+ "\xB8\xD4" => "\xE8\xA9\xB3",
+ "\xB8\xD5" => "\xE8\xA9\xA6",
+ "\xB8\xD6" => "\xE8\xA9\xA9",
+ "\xB8\xD7" => "\xE8\xA9\xB0",
+ "\xB8\xD8" => "\xE8\xAA\x87",
+ "\xB8\xD9" => "\xE8\xA9\xBC",
+ "\xB8\xDA" => "\xE8\xA9\xA3",
+ "\xB8\xDB" => "\xE8\xAA\xA0",
+ "\xB8\xDC" => "\xE8\xA9\xB1",
+ "\xB8\xDD" => "\xE8\xAA\x85",
+ "\xB8\xDE" => "\xE8\xA9\xAD",
+ "\xB8\xDF" => "\xE8\xA9\xA2",
+ "\xB8\xE0" => "\xE8\xA9\xAE",
+ "\xB8\xE1" => "\xE8\xA9\xAC",
+ "\xB8\xE2" => "\xE8\xA9\xB9",
+ "\xB8\xE3" => "\xE8\xA9\xBB",
+ "\xB8\xE4" => "\xE8\xA8\xBE",
+ "\xB8\xE5" => "\xE8\xA9\xA8",
+ "\xB8\xE6" => "\xE8\xB1\xA2",
+ "\xB8\xE7" => "\xE8\xB2\x8A",
+ "\xB8\xE8" => "\xE8\xB2\x89",
+ "\xB8\xE9" => "\xE8\xB3\x8A",
+ "\xB8\xEA" => "\xE8\xB3\x87",
+ "\xB8\xEB" => "\xE8\xB3\x88",
+ "\xB8\xEC" => "\xE8\xB3\x84",
+ "\xB8\xED" => "\xE8\xB2\xB2",
+ "\xB8\xEE" => "\xE8\xB3\x83",
+ "\xB8\xEF" => "\xE8\xB3\x82",
+ "\xB8\xF0" => "\xE8\xB3\x85",
+ "\xB8\xF1" => "\xE8\xB7\xA1",
+ "\xB8\xF2" => "\xE8\xB7\x9F",
+ "\xB8\xF3" => "\xE8\xB7\xA8",
+ "\xB8\xF4" => "\xE8\xB7\xAF",
+ "\xB8\xF5" => "\xE8\xB7\xB3",
+ "\xB8\xF6" => "\xE8\xB7\xBA",
+ "\xB8\xF7" => "\xE8\xB7\xAA",
+ "\xB8\xF8" => "\xE8\xB7\xA4",
+ "\xB8\xF9" => "\xE8\xB7\xA6",
+ "\xB8\xFA" => "\xE8\xBA\xB2",
+ "\xB8\xFB" => "\xE8\xBC\x83",
+ "\xB8\xFC" => "\xE8\xBC\x89",
+ "\xB8\xFD" => "\xE8\xBB\xBE",
+ "\xB8\xFE" => "\xE8\xBC\x8A",
+ "\xB9\x40" => "\xE8\xBE\x9F",
+ "\xB9\x41" => "\xE8\xBE\xB2",
+ "\xB9\x42" => "\xE9\x81\x8B",
+ "\xB9\x43" => "\xE9\x81\x8A",
+ "\xB9\x44" => "\xE9\x81\x93",
+ "\xB9\x45" => "\xE9\x81\x82",
+ "\xB9\x46" => "\xE9\x81\x94",
+ "\xB9\x47" => "\xE9\x80\xBC",
+ "\xB9\x48" => "\xE9\x81\x95",
+ "\xB9\x49" => "\xE9\x81\x90",
+ "\xB9\x4A" => "\xE9\x81\x87",
+ "\xB9\x4B" => "\xE9\x81\x8F",
+ "\xB9\x4C" => "\xE9\x81\x8E",
+ "\xB9\x4D" => "\xE9\x81\x8D",
+ "\xB9\x4E" => "\xE9\x81\x91",
+ "\xB9\x4F" => "\xE9\x80\xBE",
+ "\xB9\x50" => "\xE9\x81\x81",
+ "\xB9\x51" => "\xE9\x84\x92",
+ "\xB9\x52" => "\xE9\x84\x97",
+ "\xB9\x53" => "\xE9\x85\xAC",
+ "\xB9\x54" => "\xE9\x85\xAA",
+ "\xB9\x55" => "\xE9\x85\xA9",
+ "\xB9\x56" => "\xE9\x87\x89",
+ "\xB9\x57" => "\xE9\x88\xB7",
+ "\xB9\x58" => "\xE9\x89\x97",
+ "\xB9\x59" => "\xE9\x88\xB8",
+ "\xB9\x5A" => "\xE9\x88\xBD",
+ "\xB9\x5B" => "\xE9\x89\x80",
+ "\xB9\x5C" => "\xE9\x88\xBE",
+ "\xB9\x5D" => "\xE9\x89\x9B",
+ "\xB9\x5E" => "\xE9\x89\x8B",
+ "\xB9\x5F" => "\xE9\x89\xA4",
+ "\xB9\x60" => "\xE9\x89\x91",
+ "\xB9\x61" => "\xE9\x88\xB4",
+ "\xB9\x62" => "\xE9\x89\x89",
+ "\xB9\x63" => "\xE9\x89\x8D",
+ "\xB9\x64" => "\xE9\x89\x85",
+ "\xB9\x65" => "\xE9\x88\xB9",
+ "\xB9\x66" => "\xE9\x88\xBF",
+ "\xB9\x67" => "\xE9\x89\x9A",
+ "\xB9\x68" => "\xE9\x96\x98",
+ "\xB9\x69" => "\xE9\x9A\x98",
+ "\xB9\x6A" => "\xE9\x9A\x94",
+ "\xB9\x6B" => "\xE9\x9A\x95",
+ "\xB9\x6C" => "\xE9\x9B\x8D",
+ "\xB9\x6D" => "\xE9\x9B\x8B",
+ "\xB9\x6E" => "\xE9\x9B\x89",
+ "\xB9\x6F" => "\xE9\x9B\x8A",
+ "\xB9\x70" => "\xE9\x9B\xB7",
+ "\xB9\x71" => "\xE9\x9B\xBB",
+ "\xB9\x72" => "\xE9\x9B\xB9",
+ "\xB9\x73" => "\xE9\x9B\xB6",
+ "\xB9\x74" => "\xE9\x9D\x96",
+ "\xB9\x75" => "\xE9\x9D\xB4",
+ "\xB9\x76" => "\xE9\x9D\xB6",
+ "\xB9\x77" => "\xE9\xA0\x90",
+ "\xB9\x78" => "\xE9\xA0\x91",
+ "\xB9\x79" => "\xE9\xA0\x93",
+ "\xB9\x7A" => "\xE9\xA0\x8A",
+ "\xB9\x7B" => "\xE9\xA0\x92",
+ "\xB9\x7C" => "\xE9\xA0\x8C",
+ "\xB9\x7D" => "\xE9\xA3\xBC",
+ "\xB9\x7E" => "\xE9\xA3\xB4",
+ "\xB9\xA1" => "\xE9\xA3\xBD",
+ "\xB9\xA2" => "\xE9\xA3\xBE",
+ "\xB9\xA3" => "\xE9\xA6\xB3",
+ "\xB9\xA4" => "\xE9\xA6\xB1",
+ "\xB9\xA5" => "\xE9\xA6\xB4",
+ "\xB9\xA6" => "\xE9\xAB\xA1",
+ "\xB9\xA7" => "\xE9\xB3\xA9",
+ "\xB9\xA8" => "\xE9\xBA\x82",
+ "\xB9\xA9" => "\xE9\xBC\x8E",
+ "\xB9\xAA" => "\xE9\xBC\x93",
+ "\xB9\xAB" => "\xE9\xBC\xA0",
+ "\xB9\xAC" => "\xE5\x83\xA7",
+ "\xB9\xAD" => "\xE5\x83\xAE",
+ "\xB9\xAE" => "\xE5\x83\xA5",
+ "\xB9\xAF" => "\xE5\x83\x96",
+ "\xB9\xB0" => "\xE5\x83\xAD",
+ "\xB9\xB1" => "\xE5\x83\x9A",
+ "\xB9\xB2" => "\xE5\x83\x95",
+ "\xB9\xB3" => "\xE5\x83\x8F",
+ "\xB9\xB4" => "\xE5\x83\x91",
+ "\xB9\xB5" => "\xE5\x83\xB1",
+ "\xB9\xB6" => "\xE5\x83\x8E",
+ "\xB9\xB7" => "\xE5\x83\xA9",
+ "\xB9\xB8" => "\xE5\x85\xA2",
+ "\xB9\xB9" => "\xE5\x87\xB3",
+ "\xB9\xBA" => "\xE5\x8A\x83",
+ "\xB9\xBB" => "\xE5\x8A\x82",
+ "\xB9\xBC" => "\xE5\x8C\xB1",
+ "\xB9\xBD" => "\xE5\x8E\xAD",
+ "\xB9\xBE" => "\xE5\x97\xBE",
+ "\xB9\xBF" => "\xE5\x98\x80",
+ "\xB9\xC0" => "\xE5\x98\x9B",
+ "\xB9\xC1" => "\xE5\x98\x97",
+ "\xB9\xC2" => "\xE5\x97\xBD",
+ "\xB9\xC3" => "\xE5\x98\x94",
+ "\xB9\xC4" => "\xE5\x98\x86",
+ "\xB9\xC5" => "\xE5\x98\x89",
+ "\xB9\xC6" => "\xE5\x98\x8D",
+ "\xB9\xC7" => "\xE5\x98\x8E",
+ "\xB9\xC8" => "\xE5\x97\xB7",
+ "\xB9\xC9" => "\xE5\x98\x96",
+ "\xB9\xCA" => "\xE5\x98\x9F",
+ "\xB9\xCB" => "\xE5\x98\x88",
+ "\xB9\xCC" => "\xE5\x98\x90",
+ "\xB9\xCD" => "\xE5\x97\xB6",
+ "\xB9\xCE" => "\xE5\x9C\x98",
+ "\xB9\xCF" => "\xE5\x9C\x96",
+ "\xB9\xD0" => "\xE5\xA1\xB5",
+ "\xB9\xD1" => "\xE5\xA1\xBE",
+ "\xB9\xD2" => "\xE5\xA2\x83",
+ "\xB9\xD3" => "\xE5\xA2\x93",
+ "\xB9\xD4" => "\xE5\xA2\x8A",
+ "\xB9\xD5" => "\xE5\xA1\xB9",
+ "\xB9\xD6" => "\xE5\xA2\x85",
+ "\xB9\xD7" => "\xE5\xA1\xBD",
+ "\xB9\xD8" => "\xE5\xA3\xBD",
+ "\xB9\xD9" => "\xE5\xA4\xA5",
+ "\xB9\xDA" => "\xE5\xA4\xA2",
+ "\xB9\xDB" => "\xE5\xA4\xA4",
+ "\xB9\xDC" => "\xE5\xA5\xAA",
+ "\xB9\xDD" => "\xE5\xA5\xA9",
+ "\xB9\xDE" => "\xE5\xAB\xA1",
+ "\xB9\xDF" => "\xE5\xAB\xA6",
+ "\xB9\xE0" => "\xE5\xAB\xA9",
+ "\xB9\xE1" => "\xE5\xAB\x97",
+ "\xB9\xE2" => "\xE5\xAB\x96",
+ "\xB9\xE3" => "\xE5\xAB\x98",
+ "\xB9\xE4" => "\xE5\xAB\xA3",
+ "\xB9\xE5" => "\xE5\xAD\xB5",
+ "\xB9\xE6" => "\xE5\xAF\x9E",
+ "\xB9\xE7" => "\xE5\xAF\xA7",
+ "\xB9\xE8" => "\xE5\xAF\xA1",
+ "\xB9\xE9" => "\xE5\xAF\xA5",
+ "\xB9\xEA" => "\xE5\xAF\xA6",
+ "\xB9\xEB" => "\xE5\xAF\xA8",
+ "\xB9\xEC" => "\xE5\xAF\xA2",
+ "\xB9\xED" => "\xE5\xAF\xA4",
+ "\xB9\xEE" => "\xE5\xAF\x9F",
+ "\xB9\xEF" => "\xE5\xB0\x8D",
+ "\xB9\xF0" => "\xE5\xB1\xA2",
+ "\xB9\xF1" => "\xE5\xB6\x84",
+ "\xB9\xF2" => "\xE5\xB6\x87",
+ "\xB9\xF3" => "\xE5\xB9\x9B",
+ "\xB9\xF4" => "\xE5\xB9\xA3",
+ "\xB9\xF5" => "\xE5\xB9\x95",
+ "\xB9\xF6" => "\xE5\xB9\x97",
+ "\xB9\xF7" => "\xE5\xB9\x94",
+ "\xB9\xF8" => "\xE5\xBB\x93",
+ "\xB9\xF9" => "\xE5\xBB\x96",
+ "\xB9\xFA" => "\xE5\xBC\x8A",
+ "\xB9\xFB" => "\xE5\xBD\x86",
+ "\xB9\xFC" => "\xE5\xBD\xB0",
+ "\xB9\xFD" => "\xE5\xBE\xB9",
+ "\xB9\xFE" => "\xE6\x85\x87",
+ "\xBA\x40" => "\xE6\x84\xBF",
+ "\xBA\x41" => "\xE6\x85\x8B",
+ "\xBA\x42" => "\xE6\x85\xB7",
+ "\xBA\x43" => "\xE6\x85\xA2",
+ "\xBA\x44" => "\xE6\x85\xA3",
+ "\xBA\x45" => "\xE6\x85\x9F",
+ "\xBA\x46" => "\xE6\x85\x9A",
+ "\xBA\x47" => "\xE6\x85\x98",
+ "\xBA\x48" => "\xE6\x85\xB5",
+ "\xBA\x49" => "\xE6\x88\xAA",
+ "\xBA\x4A" => "\xE6\x92\x87",
+ "\xBA\x4B" => "\xE6\x91\x98",
+ "\xBA\x4C" => "\xE6\x91\x94",
+ "\xBA\x4D" => "\xE6\x92\xA4",
+ "\xBA\x4E" => "\xE6\x91\xB8",
+ "\xBA\x4F" => "\xE6\x91\x9F",
+ "\xBA\x50" => "\xE6\x91\xBA",
+ "\xBA\x51" => "\xE6\x91\x91",
+ "\xBA\x52" => "\xE6\x91\xA7",
+ "\xBA\x53" => "\xE6\x90\xB4",
+ "\xBA\x54" => "\xE6\x91\xAD",
+ "\xBA\x55" => "\xE6\x91\xBB",
+ "\xBA\x56" => "\xE6\x95\xB2",
+ "\xBA\x57" => "\xE6\x96\xA1",
+ "\xBA\x58" => "\xE6\x97\x97",
+ "\xBA\x59" => "\xE6\x97\x96",
+ "\xBA\x5A" => "\xE6\x9A\xA2",
+ "\xBA\x5B" => "\xE6\x9A\xA8",
+ "\xBA\x5C" => "\xE6\x9A\x9D",
+ "\xBA\x5D" => "\xE6\xA6\x9C",
+ "\xBA\x5E" => "\xE6\xA6\xA8",
+ "\xBA\x5F" => "\xE6\xA6\x95",
+ "\xBA\x60" => "\xE6\xA7\x81",
+ "\xBA\x61" => "\xE6\xA6\xAE",
+ "\xBA\x62" => "\xE6\xA7\x93",
+ "\xBA\x63" => "\xE6\xA7\x8B",
+ "\xBA\x64" => "\xE6\xA6\x9B",
+ "\xBA\x65" => "\xE6\xA6\xB7",
+ "\xBA\x66" => "\xE6\xA6\xBB",
+ "\xBA\x67" => "\xE6\xA6\xAB",
+ "\xBA\x68" => "\xE6\xA6\xB4",
+ "\xBA\x69" => "\xE6\xA7\x90",
+ "\xBA\x6A" => "\xE6\xA7\x8D",
+ "\xBA\x6B" => "\xE6\xA6\xAD",
+ "\xBA\x6C" => "\xE6\xA7\x8C",
+ "\xBA\x6D" => "\xE6\xA6\xA6",
+ "\xBA\x6E" => "\xE6\xA7\x83",
+ "\xBA\x6F" => "\xE6\xA6\xA3",
+ "\xBA\x70" => "\xE6\xAD\x89",
+ "\xBA\x71" => "\xE6\xAD\x8C",
+ "\xBA\x72" => "\xE6\xB0\xB3",
+ "\xBA\x73" => "\xE6\xBC\xB3",
+ "\xBA\x74" => "\xE6\xBC\x94",
+ "\xBA\x75" => "\xE6\xBB\xBE",
+ "\xBA\x76" => "\xE6\xBC\x93",
+ "\xBA\x77" => "\xE6\xBB\xB4",
+ "\xBA\x78" => "\xE6\xBC\xA9",
+ "\xBA\x79" => "\xE6\xBC\xBE",
+ "\xBA\x7A" => "\xE6\xBC\xA0",
+ "\xBA\x7B" => "\xE6\xBC\xAC",
+ "\xBA\x7C" => "\xE6\xBC\x8F",
+ "\xBA\x7D" => "\xE6\xBC\x82",
+ "\xBA\x7E" => "\xE6\xBC\xA2",
+ "\xBA\xA1" => "\xE6\xBB\xBF",
+ "\xBA\xA2" => "\xE6\xBB\xAF",
+ "\xBA\xA3" => "\xE6\xBC\x86",
+ "\xBA\xA4" => "\xE6\xBC\xB1",
+ "\xBA\xA5" => "\xE6\xBC\xB8",
+ "\xBA\xA6" => "\xE6\xBC\xB2",
+ "\xBA\xA7" => "\xE6\xBC\xA3",
+ "\xBA\xA8" => "\xE6\xBC\x95",
+ "\xBA\xA9" => "\xE6\xBC\xAB",
+ "\xBA\xAA" => "\xE6\xBC\xAF",
+ "\xBA\xAB" => "\xE6\xBE\x88",
+ "\xBA\xAC" => "\xE6\xBC\xAA",
+ "\xBA\xAD" => "\xE6\xBB\xAC",
+ "\xBA\xAE" => "\xE6\xBC\x81",
+ "\xBA\xAF" => "\xE6\xBB\xB2",
+ "\xBA\xB0" => "\xE6\xBB\x8C",
+ "\xBA\xB1" => "\xE6\xBB\xB7",
+ "\xBA\xB2" => "\xE7\x86\x94",
+ "\xBA\xB3" => "\xE7\x86\x99",
+ "\xBA\xB4" => "\xE7\x85\xBD",
+ "\xBA\xB5" => "\xE7\x86\x8A",
+ "\xBA\xB6" => "\xE7\x86\x84",
+ "\xBA\xB7" => "\xE7\x86\x92",
+ "\xBA\xB8" => "\xE7\x88\xBE",
+ "\xBA\xB9" => "\xE7\x8A\x92",
+ "\xBA\xBA" => "\xE7\x8A\x96",
+ "\xBA\xBB" => "\xE7\x8D\x84",
+ "\xBA\xBC" => "\xE7\x8D\x90",
+ "\xBA\xBD" => "\xE7\x91\xA4",
+ "\xBA\xBE" => "\xE7\x91\xA3",
+ "\xBA\xBF" => "\xE7\x91\xAA",
+ "\xBA\xC0" => "\xE7\x91\xB0",
+ "\xBA\xC1" => "\xE7\x91\xAD",
+ "\xBA\xC2" => "\xE7\x94\x84",
+ "\xBA\xC3" => "\xE7\x96\x91",
+ "\xBA\xC4" => "\xE7\x98\xA7",
+ "\xBA\xC5" => "\xE7\x98\x8D",
+ "\xBA\xC6" => "\xE7\x98\x8B",
+ "\xBA\xC7" => "\xE7\x98\x89",
+ "\xBA\xC8" => "\xE7\x98\x93",
+ "\xBA\xC9" => "\xE7\x9B\xA1",
+ "\xBA\xCA" => "\xE7\x9B\xA3",
+ "\xBA\xCB" => "\xE7\x9E\x84",
+ "\xBA\xCC" => "\xE7\x9D\xBD",
+ "\xBA\xCD" => "\xE7\x9D\xBF",
+ "\xBA\xCE" => "\xE7\x9D\xA1",
+ "\xBA\xCF" => "\xE7\xA3\x81",
+ "\xBA\xD0" => "\xE7\xA2\x9F",
+ "\xBA\xD1" => "\xE7\xA2\xA7",
+ "\xBA\xD2" => "\xE7\xA2\xB3",
+ "\xBA\xD3" => "\xE7\xA2\xA9",
+ "\xBA\xD4" => "\xE7\xA2\xA3",
+ "\xBA\xD5" => "\xE7\xA6\x8E",
+ "\xBA\xD6" => "\xE7\xA6\x8F",
+ "\xBA\xD7" => "\xE7\xA6\x8D",
+ "\xBA\xD8" => "\xE7\xA8\xAE",
+ "\xBA\xD9" => "\xE7\xA8\xB1",
+ "\xBA\xDA" => "\xE7\xAA\xAA",
+ "\xBA\xDB" => "\xE7\xAA\xA9",
+ "\xBA\xDC" => "\xE7\xAB\xAD",
+ "\xBA\xDD" => "\xE7\xAB\xAF",
+ "\xBA\xDE" => "\xE7\xAE\xA1",
+ "\xBA\xDF" => "\xE7\xAE\x95",
+ "\xBA\xE0" => "\xE7\xAE\x8B",
+ "\xBA\xE1" => "\xE7\xAD\xB5",
+ "\xBA\xE2" => "\xE7\xAE\x97",
+ "\xBA\xE3" => "\xE7\xAE\x9D",
+ "\xBA\xE4" => "\xE7\xAE\x94",
+ "\xBA\xE5" => "\xE7\xAE\x8F",
+ "\xBA\xE6" => "\xE7\xAE\xB8",
+ "\xBA\xE7" => "\xE7\xAE\x87",
+ "\xBA\xE8" => "\xE7\xAE\x84",
+ "\xBA\xE9" => "\xE7\xB2\xB9",
+ "\xBA\xEA" => "\xE7\xB2\xBD",
+ "\xBA\xEB" => "\xE7\xB2\xBE",
+ "\xBA\xEC" => "\xE7\xB6\xBB",
+ "\xBA\xED" => "\xE7\xB6\xB0",
+ "\xBA\xEE" => "\xE7\xB6\x9C",
+ "\xBA\xEF" => "\xE7\xB6\xBD",
+ "\xBA\xF0" => "\xE7\xB6\xBE",
+ "\xBA\xF1" => "\xE7\xB6\xA0",
+ "\xBA\xF2" => "\xE7\xB7\x8A",
+ "\xBA\xF3" => "\xE7\xB6\xB4",
+ "\xBA\xF4" => "\xE7\xB6\xB2",
+ "\xBA\xF5" => "\xE7\xB6\xB1",
+ "\xBA\xF6" => "\xE7\xB6\xBA",
+ "\xBA\xF7" => "\xE7\xB6\xA2",
+ "\xBA\xF8" => "\xE7\xB6\xBF",
+ "\xBA\xF9" => "\xE7\xB6\xB5",
+ "\xBA\xFA" => "\xE7\xB6\xB8",
+ "\xBA\xFB" => "\xE7\xB6\xAD",
+ "\xBA\xFC" => "\xE7\xB7\x92",
+ "\xBA\xFD" => "\xE7\xB7\x87",
+ "\xBA\xFE" => "\xE7\xB6\xAC",
+ "\xBB\x40" => "\xE7\xBD\xB0",
+ "\xBB\x41" => "\xE7\xBF\xA0",
+ "\xBB\x42" => "\xE7\xBF\xA1",
+ "\xBB\x43" => "\xE7\xBF\x9F",
+ "\xBB\x44" => "\xE8\x81\x9E",
+ "\xBB\x45" => "\xE8\x81\x9A",
+ "\xBB\x46" => "\xE8\x82\x87",
+ "\xBB\x47" => "\xE8\x85\x90",
+ "\xBB\x48" => "\xE8\x86\x80",
+ "\xBB\x49" => "\xE8\x86\x8F",
+ "\xBB\x4A" => "\xE8\x86\x88",
+ "\xBB\x4B" => "\xE8\x86\x8A",
+ "\xBB\x4C" => "\xE8\x85\xBF",
+ "\xBB\x4D" => "\xE8\x86\x82",
+ "\xBB\x4E" => "\xE8\x87\xA7",
+ "\xBB\x4F" => "\xE8\x87\xBA",
+ "\xBB\x50" => "\xE8\x88\x87",
+ "\xBB\x51" => "\xE8\x88\x94",
+ "\xBB\x52" => "\xE8\x88\x9E",
+ "\xBB\x53" => "\xE8\x89\x8B",
+ "\xBB\x54" => "\xE8\x93\x89",
+ "\xBB\x55" => "\xE8\x92\xBF",
+ "\xBB\x56" => "\xE8\x93\x86",
+ "\xBB\x57" => "\xE8\x93\x84",
+ "\xBB\x58" => "\xE8\x92\x99",
+ "\xBB\x59" => "\xE8\x92\x9E",
+ "\xBB\x5A" => "\xE8\x92\xB2",
+ "\xBB\x5B" => "\xE8\x92\x9C",
+ "\xBB\x5C" => "\xE8\x93\x8B",
+ "\xBB\x5D" => "\xE8\x92\xB8",
+ "\xBB\x5E" => "\xE8\x93\x80",
+ "\xBB\x5F" => "\xE8\x93\x93",
+ "\xBB\x60" => "\xE8\x92\x90",
+ "\xBB\x61" => "\xE8\x92\xBC",
+ "\xBB\x62" => "\xE8\x93\x91",
+ "\xBB\x63" => "\xE8\x93\x8A",
+ "\xBB\x64" => "\xE8\x9C\xBF",
+ "\xBB\x65" => "\xE8\x9C\x9C",
+ "\xBB\x66" => "\xE8\x9C\xBB",
+ "\xBB\x67" => "\xE8\x9C\xA2",
+ "\xBB\x68" => "\xE8\x9C\xA5",
+ "\xBB\x69" => "\xE8\x9C\xB4",
+ "\xBB\x6A" => "\xE8\x9C\x98",
+ "\xBB\x6B" => "\xE8\x9D\x95",
+ "\xBB\x6C" => "\xE8\x9C\xB7",
+ "\xBB\x6D" => "\xE8\x9C\xA9",
+ "\xBB\x6E" => "\xE8\xA3\xB3",
+ "\xBB\x6F" => "\xE8\xA4\x82",
+ "\xBB\x70" => "\xE8\xA3\xB4",
+ "\xBB\x71" => "\xE8\xA3\xB9",
+ "\xBB\x72" => "\xE8\xA3\xB8",
+ "\xBB\x73" => "\xE8\xA3\xBD",
+ "\xBB\x74" => "\xE8\xA3\xA8",
+ "\xBB\x75" => "\xE8\xA4\x9A",
+ "\xBB\x76" => "\xE8\xA3\xAF",
+ "\xBB\x77" => "\xE8\xAA\xA6",
+ "\xBB\x78" => "\xE8\xAA\x8C",
+ "\xBB\x79" => "\xE8\xAA\x9E",
+ "\xBB\x7A" => "\xE8\xAA\xA3",
+ "\xBB\x7B" => "\xE8\xAA\x8D",
+ "\xBB\x7C" => "\xE8\xAA\xA1",
+ "\xBB\x7D" => "\xE8\xAA\x93",
+ "\xBB\x7E" => "\xE8\xAA\xA4",
+ "\xBB\xA1" => "\xE8\xAA\xAA",
+ "\xBB\xA2" => "\xE8\xAA\xA5",
+ "\xBB\xA3" => "\xE8\xAA\xA8",
+ "\xBB\xA4" => "\xE8\xAA\x98",
+ "\xBB\xA5" => "\xE8\xAA\x91",
+ "\xBB\xA6" => "\xE8\xAA\x9A",
+ "\xBB\xA7" => "\xE8\xAA\xA7",
+ "\xBB\xA8" => "\xE8\xB1\xAA",
+ "\xBB\xA9" => "\xE8\xB2\x8D",
+ "\xBB\xAA" => "\xE8\xB2\x8C",
+ "\xBB\xAB" => "\xE8\xB3\x93",
+ "\xBB\xAC" => "\xE8\xB3\x91",
+ "\xBB\xAD" => "\xE8\xB3\x92",
+ "\xBB\xAE" => "\xE8\xB5\xAB",
+ "\xBB\xAF" => "\xE8\xB6\x99",
+ "\xBB\xB0" => "\xE8\xB6\x95",
+ "\xBB\xB1" => "\xE8\xB7\xBC",
+ "\xBB\xB2" => "\xE8\xBC\x94",
+ "\xBB\xB3" => "\xE8\xBC\x92",
+ "\xBB\xB4" => "\xE8\xBC\x95",
+ "\xBB\xB5" => "\xE8\xBC\x93",
+ "\xBB\xB6" => "\xE8\xBE\xA3",
+ "\xBB\xB7" => "\xE9\x81\xA0",
+ "\xBB\xB8" => "\xE9\x81\x98",
+ "\xBB\xB9" => "\xE9\x81\x9C",
+ "\xBB\xBA" => "\xE9\x81\xA3",
+ "\xBB\xBB" => "\xE9\x81\x99",
+ "\xBB\xBC" => "\xE9\x81\x9E",
+ "\xBB\xBD" => "\xE9\x81\xA2",
+ "\xBB\xBE" => "\xE9\x81\x9D",
+ "\xBB\xBF" => "\xE9\x81\x9B",
+ "\xBB\xC0" => "\xE9\x84\x99",
+ "\xBB\xC1" => "\xE9\x84\x98",
+ "\xBB\xC2" => "\xE9\x84\x9E",
+ "\xBB\xC3" => "\xE9\x85\xB5",
+ "\xBB\xC4" => "\xE9\x85\xB8",
+ "\xBB\xC5" => "\xE9\x85\xB7",
+ "\xBB\xC6" => "\xE9\x85\xB4",
+ "\xBB\xC7" => "\xE9\x89\xB8",
+ "\xBB\xC8" => "\xE9\x8A\x80",
+ "\xBB\xC9" => "\xE9\x8A\x85",
+ "\xBB\xCA" => "\xE9\x8A\x98",
+ "\xBB\xCB" => "\xE9\x8A\x96",
+ "\xBB\xCC" => "\xE9\x89\xBB",
+ "\xBB\xCD" => "\xE9\x8A\x93",
+ "\xBB\xCE" => "\xE9\x8A\x9C",
+ "\xBB\xCF" => "\xE9\x8A\xA8",
+ "\xBB\xD0" => "\xE9\x89\xBC",
+ "\xBB\xD1" => "\xE9\x8A\x91",
+ "\xBB\xD2" => "\xE9\x96\xA1",
+ "\xBB\xD3" => "\xE9\x96\xA8",
+ "\xBB\xD4" => "\xE9\x96\xA9",
+ "\xBB\xD5" => "\xE9\x96\xA3",
+ "\xBB\xD6" => "\xE9\x96\xA5",
+ "\xBB\xD7" => "\xE9\x96\xA4",
+ "\xBB\xD8" => "\xE9\x9A\x99",
+ "\xBB\xD9" => "\xE9\x9A\x9C",
+ "\xBB\xDA" => "\xE9\x9A\x9B",
+ "\xBB\xDB" => "\xE9\x9B\x8C",
+ "\xBB\xDC" => "\xE9\x9B\x92",
+ "\xBB\xDD" => "\xE9\x9C\x80",
+ "\xBB\xDE" => "\xE9\x9D\xBC",
+ "\xBB\xDF" => "\xE9\x9E\x85",
+ "\xBB\xE0" => "\xE9\x9F\xB6",
+ "\xBB\xE1" => "\xE9\xA0\x97",
+ "\xBB\xE2" => "\xE9\xA0\x98",
+ "\xBB\xE3" => "\xE9\xA2\xAF",
+ "\xBB\xE4" => "\xE9\xA2\xB1",
+ "\xBB\xE5" => "\xE9\xA4\x83",
+ "\xBB\xE6" => "\xE9\xA4\x85",
+ "\xBB\xE7" => "\xE9\xA4\x8C",
+ "\xBB\xE8" => "\xE9\xA4\x89",
+ "\xBB\xE9" => "\xE9\xA7\x81",
+ "\xBB\xEA" => "\xE9\xAA\xAF",
+ "\xBB\xEB" => "\xE9\xAA\xB0",
+ "\xBB\xEC" => "\xE9\xAB\xA6",
+ "\xBB\xED" => "\xE9\xAD\x81",
+ "\xBB\xEE" => "\xE9\xAD\x82",
+ "\xBB\xEF" => "\xE9\xB3\xB4",
+ "\xBB\xF0" => "\xE9\xB3\xB6",
+ "\xBB\xF1" => "\xE9\xB3\xB3",
+ "\xBB\xF2" => "\xE9\xBA\xBC",
+ "\xBB\xF3" => "\xE9\xBC\xBB",
+ "\xBB\xF4" => "\xE9\xBD\x8A",
+ "\xBB\xF5" => "\xE5\x84\x84",
+ "\xBB\xF6" => "\xE5\x84\x80",
+ "\xBB\xF7" => "\xE5\x83\xBB",
+ "\xBB\xF8" => "\xE5\x83\xB5",
+ "\xBB\xF9" => "\xE5\x83\xB9",
+ "\xBB\xFA" => "\xE5\x84\x82",
+ "\xBB\xFB" => "\xE5\x84\x88",
+ "\xBB\xFC" => "\xE5\x84\x89",
+ "\xBB\xFD" => "\xE5\x84\x85",
+ "\xBB\xFE" => "\xE5\x87\x9C",
+ "\xBC\x40" => "\xE5\x8A\x87",
+ "\xBC\x41" => "\xE5\x8A\x88",
+ "\xBC\x42" => "\xE5\x8A\x89",
+ "\xBC\x43" => "\xE5\x8A\x8D",
+ "\xBC\x44" => "\xE5\x8A\x8A",
+ "\xBC\x45" => "\xE5\x8B\xB0",
+ "\xBC\x46" => "\xE5\x8E\xB2",
+ "\xBC\x47" => "\xE5\x98\xAE",
+ "\xBC\x48" => "\xE5\x98\xBB",
+ "\xBC\x49" => "\xE5\x98\xB9",
+ "\xBC\x4A" => "\xE5\x98\xB2",
+ "\xBC\x4B" => "\xE5\x98\xBF",
+ "\xBC\x4C" => "\xE5\x98\xB4",
+ "\xBC\x4D" => "\xE5\x98\xA9",
+ "\xBC\x4E" => "\xE5\x99\x93",
+ "\xBC\x4F" => "\xE5\x99\x8E",
+ "\xBC\x50" => "\xE5\x99\x97",
+ "\xBC\x51" => "\xE5\x99\xB4",
+ "\xBC\x52" => "\xE5\x98\xB6",
+ "\xBC\x53" => "\xE5\x98\xAF",
+ "\xBC\x54" => "\xE5\x98\xB0",
+ "\xBC\x55" => "\xE5\xA2\x80",
+ "\xBC\x56" => "\xE5\xA2\x9F",
+ "\xBC\x57" => "\xE5\xA2\x9E",
+ "\xBC\x58" => "\xE5\xA2\xB3",
+ "\xBC\x59" => "\xE5\xA2\x9C",
+ "\xBC\x5A" => "\xE5\xA2\xAE",
+ "\xBC\x5B" => "\xE5\xA2\xA9",
+ "\xBC\x5C" => "\xE5\xA2\xA6",
+ "\xBC\x5D" => "\xE5\xA5\xAD",
+ "\xBC\x5E" => "\xE5\xAC\x89",
+ "\xBC\x5F" => "\xE5\xAB\xBB",
+ "\xBC\x60" => "\xE5\xAC\x8B",
+ "\xBC\x61" => "\xE5\xAB\xB5",
+ "\xBC\x62" => "\xE5\xAC\x8C",
+ "\xBC\x63" => "\xE5\xAC\x88",
+ "\xBC\x64" => "\xE5\xAF\xAE",
+ "\xBC\x65" => "\xE5\xAF\xAC",
+ "\xBC\x66" => "\xE5\xAF\xA9",
+ "\xBC\x67" => "\xE5\xAF\xAB",
+ "\xBC\x68" => "\xE5\xB1\xA4",
+ "\xBC\x69" => "\xE5\xB1\xA5",
+ "\xBC\x6A" => "\xE5\xB6\x9D",
+ "\xBC\x6B" => "\xE5\xB6\x94",
+ "\xBC\x6C" => "\xE5\xB9\xA2",
+ "\xBC\x6D" => "\xE5\xB9\x9F",
+ "\xBC\x6E" => "\xE5\xB9\xA1",
+ "\xBC\x6F" => "\xE5\xBB\xA2",
+ "\xBC\x70" => "\xE5\xBB\x9A",
+ "\xBC\x71" => "\xE5\xBB\x9F",
+ "\xBC\x72" => "\xE5\xBB\x9D",
+ "\xBC\x73" => "\xE5\xBB\xA3",
+ "\xBC\x74" => "\xE5\xBB\xA0",
+ "\xBC\x75" => "\xE5\xBD\x88",
+ "\xBC\x76" => "\xE5\xBD\xB1",
+ "\xBC\x77" => "\xE5\xBE\xB7",
+ "\xBC\x78" => "\xE5\xBE\xB5",
+ "\xBC\x79" => "\xE6\x85\xB6",
+ "\xBC\x7A" => "\xE6\x85\xA7",
+ "\xBC\x7B" => "\xE6\x85\xAE",
+ "\xBC\x7C" => "\xE6\x85\x9D",
+ "\xBC\x7D" => "\xE6\x85\x95",
+ "\xBC\x7E" => "\xE6\x86\x82",
+ "\xBC\xA1" => "\xE6\x85\xBC",
+ "\xBC\xA2" => "\xE6\x85\xB0",
+ "\xBC\xA3" => "\xE6\x85\xAB",
+ "\xBC\xA4" => "\xE6\x85\xBE",
+ "\xBC\xA5" => "\xE6\x86\xA7",
+ "\xBC\xA6" => "\xE6\x86\x90",
+ "\xBC\xA7" => "\xE6\x86\xAB",
+ "\xBC\xA8" => "\xE6\x86\x8E",
+ "\xBC\xA9" => "\xE6\x86\xAC",
+ "\xBC\xAA" => "\xE6\x86\x9A",
+ "\xBC\xAB" => "\xE6\x86\xA4",
+ "\xBC\xAC" => "\xE6\x86\x94",
+ "\xBC\xAD" => "\xE6\x86\xAE",
+ "\xBC\xAE" => "\xE6\x88\xAE",
+ "\xBC\xAF" => "\xE6\x91\xA9",
+ "\xBC\xB0" => "\xE6\x91\xAF",
+ "\xBC\xB1" => "\xE6\x91\xB9",
+ "\xBC\xB2" => "\xE6\x92\x9E",
+ "\xBC\xB3" => "\xE6\x92\xB2",
+ "\xBC\xB4" => "\xE6\x92\x88",
+ "\xBC\xB5" => "\xE6\x92\x90",
+ "\xBC\xB6" => "\xE6\x92\xB0",
+ "\xBC\xB7" => "\xE6\x92\xA5",
+ "\xBC\xB8" => "\xE6\x92\x93",
+ "\xBC\xB9" => "\xE6\x92\x95",
+ "\xBC\xBA" => "\xE6\x92\xA9",
+ "\xBC\xBB" => "\xE6\x92\x92",
+ "\xBC\xBC" => "\xE6\x92\xAE",
+ "\xBC\xBD" => "\xE6\x92\xAD",
+ "\xBC\xBE" => "\xE6\x92\xAB",
+ "\xBC\xBF" => "\xE6\x92\x9A",
+ "\xBC\xC0" => "\xE6\x92\xAC",
+ "\xBC\xC1" => "\xE6\x92\x99",
+ "\xBC\xC2" => "\xE6\x92\xA2",
+ "\xBC\xC3" => "\xE6\x92\xB3",
+ "\xBC\xC4" => "\xE6\x95\xB5",
+ "\xBC\xC5" => "\xE6\x95\xB7",
+ "\xBC\xC6" => "\xE6\x95\xB8",
+ "\xBC\xC7" => "\xE6\x9A\xAE",
+ "\xBC\xC8" => "\xE6\x9A\xAB",
+ "\xBC\xC9" => "\xE6\x9A\xB4",
+ "\xBC\xCA" => "\xE6\x9A\xB1",
+ "\xBC\xCB" => "\xE6\xA8\xA3",
+ "\xBC\xCC" => "\xE6\xA8\x9F",
+ "\xBC\xCD" => "\xE6\xA7\xA8",
+ "\xBC\xCE" => "\xE6\xA8\x81",
+ "\xBC\xCF" => "\xE6\xA8\x9E",
+ "\xBC\xD0" => "\xE6\xA8\x99",
+ "\xBC\xD1" => "\xE6\xA7\xBD",
+ "\xBC\xD2" => "\xE6\xA8\xA1",
+ "\xBC\xD3" => "\xE6\xA8\x93",
+ "\xBC\xD4" => "\xE6\xA8\x8A",
+ "\xBC\xD5" => "\xE6\xA7\xB3",
+ "\xBC\xD6" => "\xE6\xA8\x82",
+ "\xBC\xD7" => "\xE6\xA8\x85",
+ "\xBC\xD8" => "\xE6\xA7\xAD",
+ "\xBC\xD9" => "\xE6\xA8\x91",
+ "\xBC\xDA" => "\xE6\xAD\x90",
+ "\xBC\xDB" => "\xE6\xAD\x8E",
+ "\xBC\xDC" => "\xE6\xAE\xA4",
+ "\xBC\xDD" => "\xE6\xAF\x85",
+ "\xBC\xDE" => "\xE6\xAF\x86",
+ "\xBC\xDF" => "\xE6\xBC\xBF",
+ "\xBC\xE0" => "\xE6\xBD\xBC",
+ "\xBC\xE1" => "\xE6\xBE\x84",
+ "\xBC\xE2" => "\xE6\xBD\x91",
+ "\xBC\xE3" => "\xE6\xBD\xA6",
+ "\xBC\xE4" => "\xE6\xBD\x94",
+ "\xBC\xE5" => "\xE6\xBE\x86",
+ "\xBC\xE6" => "\xE6\xBD\xAD",
+ "\xBC\xE7" => "\xE6\xBD\x9B",
+ "\xBC\xE8" => "\xE6\xBD\xB8",
+ "\xBC\xE9" => "\xE6\xBD\xAE",
+ "\xBC\xEA" => "\xE6\xBE\x8E",
+ "\xBC\xEB" => "\xE6\xBD\xBA",
+ "\xBC\xEC" => "\xE6\xBD\xB0",
+ "\xBC\xED" => "\xE6\xBD\xA4",
+ "\xBC\xEE" => "\xE6\xBE\x97",
+ "\xBC\xEF" => "\xE6\xBD\x98",
+ "\xBC\xF0" => "\xE6\xBB\x95",
+ "\xBC\xF1" => "\xE6\xBD\xAF",
+ "\xBC\xF2" => "\xE6\xBD\xA0",
+ "\xBC\xF3" => "\xE6\xBD\x9F",
+ "\xBC\xF4" => "\xE7\x86\x9F",
+ "\xBC\xF5" => "\xE7\x86\xAC",
+ "\xBC\xF6" => "\xE7\x86\xB1",
+ "\xBC\xF7" => "\xE7\x86\xA8",
+ "\xBC\xF8" => "\xE7\x89\x96",
+ "\xBC\xF9" => "\xE7\x8A\x9B",
+ "\xBC\xFA" => "\xE7\x8D\x8E",
+ "\xBC\xFB" => "\xE7\x8D\x97",
+ "\xBC\xFC" => "\xE7\x91\xA9",
+ "\xBC\xFD" => "\xE7\x92\x8B",
+ "\xBC\xFE" => "\xE7\x92\x83",
+ "\xBD\x40" => "\xE7\x91\xBE",
+ "\xBD\x41" => "\xE7\x92\x80",
+ "\xBD\x42" => "\xE7\x95\xBF",
+ "\xBD\x43" => "\xE7\x98\xA0",
+ "\xBD\x44" => "\xE7\x98\xA9",
+ "\xBD\x45" => "\xE7\x98\x9F",
+ "\xBD\x46" => "\xE7\x98\xA4",
+ "\xBD\x47" => "\xE7\x98\xA6",
+ "\xBD\x48" => "\xE7\x98\xA1",
+ "\xBD\x49" => "\xE7\x98\xA2",
+ "\xBD\x4A" => "\xE7\x9A\x9A",
+ "\xBD\x4B" => "\xE7\x9A\xBA",
+ "\xBD\x4C" => "\xE7\x9B\xA4",
+ "\xBD\x4D" => "\xE7\x9E\x8E",
+ "\xBD\x4E" => "\xE7\x9E\x87",
+ "\xBD\x4F" => "\xE7\x9E\x8C",
+ "\xBD\x50" => "\xE7\x9E\x91",
+ "\xBD\x51" => "\xE7\x9E\x8B",
+ "\xBD\x52" => "\xE7\xA3\x8B",
+ "\xBD\x53" => "\xE7\xA3\x85",
+ "\xBD\x54" => "\xE7\xA2\xBA",
+ "\xBD\x55" => "\xE7\xA3\x8A",
+ "\xBD\x56" => "\xE7\xA2\xBE",
+ "\xBD\x57" => "\xE7\xA3\x95",
+ "\xBD\x58" => "\xE7\xA2\xBC",
+ "\xBD\x59" => "\xE7\xA3\x90",
+ "\xBD\x5A" => "\xE7\xA8\xBF",
+ "\xBD\x5B" => "\xE7\xA8\xBC",
+ "\xBD\x5C" => "\xE7\xA9\x80",
+ "\xBD\x5D" => "\xE7\xA8\xBD",
+ "\xBD\x5E" => "\xE7\xA8\xB7",
+ "\xBD\x5F" => "\xE7\xA8\xBB",
+ "\xBD\x60" => "\xE7\xAA\xAF",
+ "\xBD\x61" => "\xE7\xAA\xAE",
+ "\xBD\x62" => "\xE7\xAE\xAD",
+ "\xBD\x63" => "\xE7\xAE\xB1",
+ "\xBD\x64" => "\xE7\xAF\x84",
+ "\xBD\x65" => "\xE7\xAE\xB4",
+ "\xBD\x66" => "\xE7\xAF\x86",
+ "\xBD\x67" => "\xE7\xAF\x87",
+ "\xBD\x68" => "\xE7\xAF\x81",
+ "\xBD\x69" => "\xE7\xAE\xA0",
+ "\xBD\x6A" => "\xE7\xAF\x8C",
+ "\xBD\x6B" => "\xE7\xB3\x8A",
+ "\xBD\x6C" => "\xE7\xB7\xA0",
+ "\xBD\x6D" => "\xE7\xB7\xB4",
+ "\xBD\x6E" => "\xE7\xB7\xAF",
+ "\xBD\x6F" => "\xE7\xB7\xBB",
+ "\xBD\x70" => "\xE7\xB7\x98",
+ "\xBD\x71" => "\xE7\xB7\xAC",
+ "\xBD\x72" => "\xE7\xB7\x9D",
+ "\xBD\x73" => "\xE7\xB7\xA8",
+ "\xBD\x74" => "\xE7\xB7\xA3",
+ "\xBD\x75" => "\xE7\xB7\x9A",
+ "\xBD\x76" => "\xE7\xB7\x9E",
+ "\xBD\x77" => "\xE7\xB7\xA9",
+ "\xBD\x78" => "\xE7\xB6\x9E",
+ "\xBD\x79" => "\xE7\xB7\x99",
+ "\xBD\x7A" => "\xE7\xB7\xB2",
+ "\xBD\x7B" => "\xE7\xB7\xB9",
+ "\xBD\x7C" => "\xE7\xBD\xB5",
+ "\xBD\x7D" => "\xE7\xBD\xB7",
+ "\xBD\x7E" => "\xE7\xBE\xAF",
+ "\xBD\xA1" => "\xE7\xBF\xA9",
+ "\xBD\xA2" => "\xE8\x80\xA6",
+ "\xBD\xA3" => "\xE8\x86\x9B",
+ "\xBD\xA4" => "\xE8\x86\x9C",
+ "\xBD\xA5" => "\xE8\x86\x9D",
+ "\xBD\xA6" => "\xE8\x86\xA0",
+ "\xBD\xA7" => "\xE8\x86\x9A",
+ "\xBD\xA8" => "\xE8\x86\x98",
+ "\xBD\xA9" => "\xE8\x94\x97",
+ "\xBD\xAA" => "\xE8\x94\xBD",
+ "\xBD\xAB" => "\xE8\x94\x9A",
+ "\xBD\xAC" => "\xE8\x93\xAE",
+ "\xBD\xAD" => "\xE8\x94\xAC",
+ "\xBD\xAE" => "\xE8\x94\xAD",
+ "\xBD\xAF" => "\xE8\x94\x93",
+ "\xBD\xB0" => "\xE8\x94\x91",
+ "\xBD\xB1" => "\xE8\x94\xA3",
+ "\xBD\xB2" => "\xE8\x94\xA1",
+ "\xBD\xB3" => "\xE8\x94\x94",
+ "\xBD\xB4" => "\xE8\x93\xAC",
+ "\xBD\xB5" => "\xE8\x94\xA5",
+ "\xBD\xB6" => "\xE8\x93\xBF",
+ "\xBD\xB7" => "\xE8\x94\x86",
+ "\xBD\xB8" => "\xE8\x9E\x82",
+ "\xBD\xB9" => "\xE8\x9D\xB4",
+ "\xBD\xBA" => "\xE8\x9D\xB6",
+ "\xBD\xBB" => "\xE8\x9D\xA0",
+ "\xBD\xBC" => "\xE8\x9D\xA6",
+ "\xBD\xBD" => "\xE8\x9D\xB8",
+ "\xBD\xBE" => "\xE8\x9D\xA8",
+ "\xBD\xBF" => "\xE8\x9D\x99",
+ "\xBD\xC0" => "\xE8\x9D\x97",
+ "\xBD\xC1" => "\xE8\x9D\x8C",
+ "\xBD\xC2" => "\xE8\x9D\x93",
+ "\xBD\xC3" => "\xE8\xA1\x9B",
+ "\xBD\xC4" => "\xE8\xA1\x9D",
+ "\xBD\xC5" => "\xE8\xA4\x90",
+ "\xBD\xC6" => "\xE8\xA4\x87",
+ "\xBD\xC7" => "\xE8\xA4\x92",
+ "\xBD\xC8" => "\xE8\xA4\x93",
+ "\xBD\xC9" => "\xE8\xA4\x95",
+ "\xBD\xCA" => "\xE8\xA4\x8A",
+ "\xBD\xCB" => "\xE8\xAA\xBC",
+ "\xBD\xCC" => "\xE8\xAB\x92",
+ "\xBD\xCD" => "\xE8\xAB\x87",
+ "\xBD\xCE" => "\xE8\xAB\x84",
+ "\xBD\xCF" => "\xE8\xAA\x95",
+ "\xBD\xD0" => "\xE8\xAB\x8B",
+ "\xBD\xD1" => "\xE8\xAB\xB8",
+ "\xBD\xD2" => "\xE8\xAA\xB2",
+ "\xBD\xD3" => "\xE8\xAB\x89",
+ "\xBD\xD4" => "\xE8\xAB\x82",
+ "\xBD\xD5" => "\xE8\xAA\xBF",
+ "\xBD\xD6" => "\xE8\xAA\xB0",
+ "\xBD\xD7" => "\xE8\xAB\x96",
+ "\xBD\xD8" => "\xE8\xAB\x8D",
+ "\xBD\xD9" => "\xE8\xAA\xB6",
+ "\xBD\xDA" => "\xE8\xAA\xB9",
+ "\xBD\xDB" => "\xE8\xAB\x9B",
+ "\xBD\xDC" => "\xE8\xB1\x8C",
+ "\xBD\xDD" => "\xE8\xB1\x8E",
+ "\xBD\xDE" => "\xE8\xB1\xAC",
+ "\xBD\xDF" => "\xE8\xB3\xA0",
+ "\xBD\xE0" => "\xE8\xB3\x9E",
+ "\xBD\xE1" => "\xE8\xB3\xA6",
+ "\xBD\xE2" => "\xE8\xB3\xA4",
+ "\xBD\xE3" => "\xE8\xB3\xAC",
+ "\xBD\xE4" => "\xE8\xB3\xAD",
+ "\xBD\xE5" => "\xE8\xB3\xA2",
+ "\xBD\xE6" => "\xE8\xB3\xA3",
+ "\xBD\xE7" => "\xE8\xB3\x9C",
+ "\xBD\xE8" => "\xE8\xB3\xAA",
+ "\xBD\xE9" => "\xE8\xB3\xA1",
+ "\xBD\xEA" => "\xE8\xB5\xAD",
+ "\xBD\xEB" => "\xE8\xB6\x9F",
+ "\xBD\xEC" => "\xE8\xB6\xA3",
+ "\xBD\xED" => "\xE8\xB8\xAB",
+ "\xBD\xEE" => "\xE8\xB8\x90",
+ "\xBD\xEF" => "\xE8\xB8\x9D",
+ "\xBD\xF0" => "\xE8\xB8\xA2",
+ "\xBD\xF1" => "\xE8\xB8\x8F",
+ "\xBD\xF2" => "\xE8\xB8\xA9",
+ "\xBD\xF3" => "\xE8\xB8\x9F",
+ "\xBD\xF4" => "\xE8\xB8\xA1",
+ "\xBD\xF5" => "\xE8\xB8\x9E",
+ "\xBD\xF6" => "\xE8\xBA\xBA",
+ "\xBD\xF7" => "\xE8\xBC\x9D",
+ "\xBD\xF8" => "\xE8\xBC\x9B",
+ "\xBD\xF9" => "\xE8\xBC\x9F",
+ "\xBD\xFA" => "\xE8\xBC\xA9",
+ "\xBD\xFB" => "\xE8\xBC\xA6",
+ "\xBD\xFC" => "\xE8\xBC\xAA",
+ "\xBD\xFD" => "\xE8\xBC\x9C",
+ "\xBD\xFE" => "\xE8\xBC\x9E",
+ "\xBE\x40" => "\xE8\xBC\xA5",
+ "\xBE\x41" => "\xE9\x81\xA9",
+ "\xBE\x42" => "\xE9\x81\xAE",
+ "\xBE\x43" => "\xE9\x81\xA8",
+ "\xBE\x44" => "\xE9\x81\xAD",
+ "\xBE\x45" => "\xE9\x81\xB7",
+ "\xBE\x46" => "\xE9\x84\xB0",
+ "\xBE\x47" => "\xE9\x84\xAD",
+ "\xBE\x48" => "\xE9\x84\xA7",
+ "\xBE\x49" => "\xE9\x84\xB1",
+ "\xBE\x4A" => "\xE9\x86\x87",
+ "\xBE\x4B" => "\xE9\x86\x89",
+ "\xBE\x4C" => "\xE9\x86\x8B",
+ "\xBE\x4D" => "\xE9\x86\x83",
+ "\xBE\x4E" => "\xE9\x8B\x85",
+ "\xBE\x4F" => "\xE9\x8A\xBB",
+ "\xBE\x50" => "\xE9\x8A\xB7",
+ "\xBE\x51" => "\xE9\x8B\xAA",
+ "\xBE\x52" => "\xE9\x8A\xAC",
+ "\xBE\x53" => "\xE9\x8B\xA4",
+ "\xBE\x54" => "\xE9\x8B\x81",
+ "\xBE\x55" => "\xE9\x8A\xB3",
+ "\xBE\x56" => "\xE9\x8A\xBC",
+ "\xBE\x57" => "\xE9\x8B\x92",
+ "\xBE\x58" => "\xE9\x8B\x87",
+ "\xBE\x59" => "\xE9\x8B\xB0",
+ "\xBE\x5A" => "\xE9\x8A\xB2",
+ "\xBE\x5B" => "\xE9\x96\xAD",
+ "\xBE\x5C" => "\xE9\x96\xB1",
+ "\xBE\x5D" => "\xE9\x9C\x84",
+ "\xBE\x5E" => "\xE9\x9C\x86",
+ "\xBE\x5F" => "\xE9\x9C\x87",
+ "\xBE\x60" => "\xE9\x9C\x89",
+ "\xBE\x61" => "\xE9\x9D\xA0",
+ "\xBE\x62" => "\xE9\x9E\x8D",
+ "\xBE\x63" => "\xE9\x9E\x8B",
+ "\xBE\x64" => "\xE9\x9E\x8F",
+ "\xBE\x65" => "\xE9\xA0\xA1",
+ "\xBE\x66" => "\xE9\xA0\xAB",
+ "\xBE\x67" => "\xE9\xA0\x9C",
+ "\xBE\x68" => "\xE9\xA2\xB3",
+ "\xBE\x69" => "\xE9\xA4\x8A",
+ "\xBE\x6A" => "\xE9\xA4\x93",
+ "\xBE\x6B" => "\xE9\xA4\x92",
+ "\xBE\x6C" => "\xE9\xA4\x98",
+ "\xBE\x6D" => "\xE9\xA7\x9D",
+ "\xBE\x6E" => "\xE9\xA7\x90",
+ "\xBE\x6F" => "\xE9\xA7\x9F",
+ "\xBE\x70" => "\xE9\xA7\x9B",
+ "\xBE\x71" => "\xE9\xA7\x91",
+ "\xBE\x72" => "\xE9\xA7\x95",
+ "\xBE\x73" => "\xE9\xA7\x92",
+ "\xBE\x74" => "\xE9\xA7\x99",
+ "\xBE\x75" => "\xE9\xAA\xB7",
+ "\xBE\x76" => "\xE9\xAB\xAE",
+ "\xBE\x77" => "\xE9\xAB\xAF",
+ "\xBE\x78" => "\xE9\xAC\xA7",
+ "\xBE\x79" => "\xE9\xAD\x85",
+ "\xBE\x7A" => "\xE9\xAD\x84",
+ "\xBE\x7B" => "\xE9\xAD\xB7",
+ "\xBE\x7C" => "\xE9\xAD\xAF",
+ "\xBE\x7D" => "\xE9\xB4\x86",
+ "\xBE\x7E" => "\xE9\xB4\x89",
+ "\xBE\xA1" => "\xE9\xB4\x83",
+ "\xBE\xA2" => "\xE9\xBA\xA9",
+ "\xBE\xA3" => "\xE9\xBA\xBE",
+ "\xBE\xA4" => "\xE9\xBB\x8E",
+ "\xBE\xA5" => "\xE5\xA2\xA8",
+ "\xBE\xA6" => "\xE9\xBD\x92",
+ "\xBE\xA7" => "\xE5\x84\x92",
+ "\xBE\xA8" => "\xE5\x84\x98",
+ "\xBE\xA9" => "\xE5\x84\x94",
+ "\xBE\xAA" => "\xE5\x84\x90",
+ "\xBE\xAB" => "\xE5\x84\x95",
+ "\xBE\xAC" => "\xE5\x86\x80",
+ "\xBE\xAD" => "\xE5\x86\xAA",
+ "\xBE\xAE" => "\xE5\x87\x9D",
+ "\xBE\xAF" => "\xE5\x8A\x91",
+ "\xBE\xB0" => "\xE5\x8A\x93",
+ "\xBE\xB1" => "\xE5\x8B\xB3",
+ "\xBE\xB2" => "\xE5\x99\x99",
+ "\xBE\xB3" => "\xE5\x99\xAB",
+ "\xBE\xB4" => "\xE5\x99\xB9",
+ "\xBE\xB5" => "\xE5\x99\xA9",
+ "\xBE\xB6" => "\xE5\x99\xA4",
+ "\xBE\xB7" => "\xE5\x99\xB8",
+ "\xBE\xB8" => "\xE5\x99\xAA",
+ "\xBE\xB9" => "\xE5\x99\xA8",
+ "\xBE\xBA" => "\xE5\x99\xA5",
+ "\xBE\xBB" => "\xE5\x99\xB1",
+ "\xBE\xBC" => "\xE5\x99\xAF",
+ "\xBE\xBD" => "\xE5\x99\xAC",
+ "\xBE\xBE" => "\xE5\x99\xA2",
+ "\xBE\xBF" => "\xE5\x99\xB6",
+ "\xBE\xC0" => "\xE5\xA3\x81",
+ "\xBE\xC1" => "\xE5\xA2\xBE",
+ "\xBE\xC2" => "\xE5\xA3\x87",
+ "\xBE\xC3" => "\xE5\xA3\x85",
+ "\xBE\xC4" => "\xE5\xA5\xAE",
+ "\xBE\xC5" => "\xE5\xAC\x9D",
+ "\xBE\xC6" => "\xE5\xAC\xB4",
+ "\xBE\xC7" => "\xE5\xAD\xB8",
+ "\xBE\xC8" => "\xE5\xAF\xB0",
+ "\xBE\xC9" => "\xE5\xB0\x8E",
+ "\xBE\xCA" => "\xE5\xBD\x8A",
+ "\xBE\xCB" => "\xE6\x86\xB2",
+ "\xBE\xCC" => "\xE6\x86\x91",
+ "\xBE\xCD" => "\xE6\x86\xA9",
+ "\xBE\xCE" => "\xE6\x86\x8A",
+ "\xBE\xCF" => "\xE6\x87\x8D",
+ "\xBE\xD0" => "\xE6\x86\xB6",
+ "\xBE\xD1" => "\xE6\x86\xBE",
+ "\xBE\xD2" => "\xE6\x87\x8A",
+ "\xBE\xD3" => "\xE6\x87\x88",
+ "\xBE\xD4" => "\xE6\x88\xB0",
+ "\xBE\xD5" => "\xE6\x93\x85",
+ "\xBE\xD6" => "\xE6\x93\x81",
+ "\xBE\xD7" => "\xE6\x93\x8B",
+ "\xBE\xD8" => "\xE6\x92\xBB",
+ "\xBE\xD9" => "\xE6\x92\xBC",
+ "\xBE\xDA" => "\xE6\x93\x9A",
+ "\xBE\xDB" => "\xE6\x93\x84",
+ "\xBE\xDC" => "\xE6\x93\x87",
+ "\xBE\xDD" => "\xE6\x93\x82",
+ "\xBE\xDE" => "\xE6\x93\x8D",
+ "\xBE\xDF" => "\xE6\x92\xBF",
+ "\xBE\xE0" => "\xE6\x93\x92",
+ "\xBE\xE1" => "\xE6\x93\x94",
+ "\xBE\xE2" => "\xE6\x92\xBE",
+ "\xBE\xE3" => "\xE6\x95\xB4",
+ "\xBE\xE4" => "\xE6\x9B\x86",
+ "\xBE\xE5" => "\xE6\x9B\x89",
+ "\xBE\xE6" => "\xE6\x9A\xB9",
+ "\xBE\xE7" => "\xE6\x9B\x84",
+ "\xBE\xE8" => "\xE6\x9B\x87",
+ "\xBE\xE9" => "\xE6\x9A\xB8",
+ "\xBE\xEA" => "\xE6\xA8\xBD",
+ "\xBE\xEB" => "\xE6\xA8\xB8",
+ "\xBE\xEC" => "\xE6\xA8\xBA",
+ "\xBE\xED" => "\xE6\xA9\x99",
+ "\xBE\xEE" => "\xE6\xA9\xAB",
+ "\xBE\xEF" => "\xE6\xA9\x98",
+ "\xBE\xF0" => "\xE6\xA8\xB9",
+ "\xBE\xF1" => "\xE6\xA9\x84",
+ "\xBE\xF2" => "\xE6\xA9\xA2",
+ "\xBE\xF3" => "\xE6\xA9\xA1",
+ "\xBE\xF4" => "\xE6\xA9\x8B",
+ "\xBE\xF5" => "\xE6\xA9\x87",
+ "\xBE\xF6" => "\xE6\xA8\xB5",
+ "\xBE\xF7" => "\xE6\xA9\x9F",
+ "\xBE\xF8" => "\xE6\xA9\x88",
+ "\xBE\xF9" => "\xE6\xAD\x99",
+ "\xBE\xFA" => "\xE6\xAD\xB7",
+ "\xBE\xFB" => "\xE6\xB0\x85",
+ "\xBE\xFC" => "\xE6\xBF\x82",
+ "\xBE\xFD" => "\xE6\xBE\xB1",
+ "\xBE\xFE" => "\xE6\xBE\xA1",
+ "\xBF\x40" => "\xE6\xBF\x83",
+ "\xBF\x41" => "\xE6\xBE\xA4",
+ "\xBF\x42" => "\xE6\xBF\x81",
+ "\xBF\x43" => "\xE6\xBE\xA7",
+ "\xBF\x44" => "\xE6\xBE\xB3",
+ "\xBF\x45" => "\xE6\xBF\x80",
+ "\xBF\x46" => "\xE6\xBE\xB9",
+ "\xBF\x47" => "\xE6\xBE\xB6",
+ "\xBF\x48" => "\xE6\xBE\xA6",
+ "\xBF\x49" => "\xE6\xBE\xA0",
+ "\xBF\x4A" => "\xE6\xBE\xB4",
+ "\xBF\x4B" => "\xE7\x86\xBE",
+ "\xBF\x4C" => "\xE7\x87\x89",
+ "\xBF\x4D" => "\xE7\x87\x90",
+ "\xBF\x4E" => "\xE7\x87\x92",
+ "\xBF\x4F" => "\xE7\x87\x88",
+ "\xBF\x50" => "\xE7\x87\x95",
+ "\xBF\x51" => "\xE7\x86\xB9",
+ "\xBF\x52" => "\xE7\x87\x8E",
+ "\xBF\x53" => "\xE7\x87\x99",
+ "\xBF\x54" => "\xE7\x87\x9C",
+ "\xBF\x55" => "\xE7\x87\x83",
+ "\xBF\x56" => "\xE7\x87\x84",
+ "\xBF\x57" => "\xE7\x8D\xA8",
+ "\xBF\x58" => "\xE7\x92\x9C",
+ "\xBF\x59" => "\xE7\x92\xA3",
+ "\xBF\x5A" => "\xE7\x92\x98",
+ "\xBF\x5B" => "\xE7\x92\x9F",
+ "\xBF\x5C" => "\xE7\x92\x9E",
+ "\xBF\x5D" => "\xE7\x93\xA2",
+ "\xBF\x5E" => "\xE7\x94\x8C",
+ "\xBF\x5F" => "\xE7\x94\x8D",
+ "\xBF\x60" => "\xE7\x98\xB4",
+ "\xBF\x61" => "\xE7\x98\xB8",
+ "\xBF\x62" => "\xE7\x98\xBA",
+ "\xBF\x63" => "\xE7\x9B\xA7",
+ "\xBF\x64" => "\xE7\x9B\xA5",
+ "\xBF\x65" => "\xE7\x9E\xA0",
+ "\xBF\x66" => "\xE7\x9E\x9E",
+ "\xBF\x67" => "\xE7\x9E\x9F",
+ "\xBF\x68" => "\xE7\x9E\xA5",
+ "\xBF\x69" => "\xE7\xA3\xA8",
+ "\xBF\x6A" => "\xE7\xA3\x9A",
+ "\xBF\x6B" => "\xE7\xA3\xAC",
+ "\xBF\x6C" => "\xE7\xA3\xA7",
+ "\xBF\x6D" => "\xE7\xA6\xA6",
+ "\xBF\x6E" => "\xE7\xA9\x8D",
+ "\xBF\x6F" => "\xE7\xA9\x8E",
+ "\xBF\x70" => "\xE7\xA9\x86",
+ "\xBF\x71" => "\xE7\xA9\x8C",
+ "\xBF\x72" => "\xE7\xA9\x8B",
+ "\xBF\x73" => "\xE7\xAA\xBA",
+ "\xBF\x74" => "\xE7\xAF\x99",
+ "\xBF\x75" => "\xE7\xB0\x91",
+ "\xBF\x76" => "\xE7\xAF\x89",
+ "\xBF\x77" => "\xE7\xAF\xA4",
+ "\xBF\x78" => "\xE7\xAF\x9B",
+ "\xBF\x79" => "\xE7\xAF\xA1",
+ "\xBF\x7A" => "\xE7\xAF\xA9",
+ "\xBF\x7B" => "\xE7\xAF\xA6",
+ "\xBF\x7C" => "\xE7\xB3\x95",
+ "\xBF\x7D" => "\xE7\xB3\x96",
+ "\xBF\x7E" => "\xE7\xB8\x8A",
+ "\xBF\xA1" => "\xE7\xB8\x91",
+ "\xBF\xA2" => "\xE7\xB8\x88",
+ "\xBF\xA3" => "\xE7\xB8\x9B",
+ "\xBF\xA4" => "\xE7\xB8\xA3",
+ "\xBF\xA5" => "\xE7\xB8\x9E",
+ "\xBF\xA6" => "\xE7\xB8\x9D",
+ "\xBF\xA7" => "\xE7\xB8\x89",
+ "\xBF\xA8" => "\xE7\xB8\x90",
+ "\xBF\xA9" => "\xE7\xBD\xB9",
+ "\xBF\xAA" => "\xE7\xBE\xB2",
+ "\xBF\xAB" => "\xE7\xBF\xB0",
+ "\xBF\xAC" => "\xE7\xBF\xB1",
+ "\xBF\xAD" => "\xE7\xBF\xAE",
+ "\xBF\xAE" => "\xE8\x80\xA8",
+ "\xBF\xAF" => "\xE8\x86\xB3",
+ "\xBF\xB0" => "\xE8\x86\xA9",
+ "\xBF\xB1" => "\xE8\x86\xA8",
+ "\xBF\xB2" => "\xE8\x87\xBB",
+ "\xBF\xB3" => "\xE8\x88\x88",
+ "\xBF\xB4" => "\xE8\x89\x98",
+ "\xBF\xB5" => "\xE8\x89\x99",
+ "\xBF\xB6" => "\xE8\x95\x8A",
+ "\xBF\xB7" => "\xE8\x95\x99",
+ "\xBF\xB8" => "\xE8\x95\x88",
+ "\xBF\xB9" => "\xE8\x95\xA8",
+ "\xBF\xBA" => "\xE8\x95\xA9",
+ "\xBF\xBB" => "\xE8\x95\x83",
+ "\xBF\xBC" => "\xE8\x95\x89",
+ "\xBF\xBD" => "\xE8\x95\xAD",
+ "\xBF\xBE" => "\xE8\x95\xAA",
+ "\xBF\xBF" => "\xE8\x95\x9E",
+ "\xBF\xC0" => "\xE8\x9E\x83",
+ "\xBF\xC1" => "\xE8\x9E\x9F",
+ "\xBF\xC2" => "\xE8\x9E\x9E",
+ "\xBF\xC3" => "\xE8\x9E\xA2",
+ "\xBF\xC4" => "\xE8\x9E\x8D",
+ "\xBF\xC5" => "\xE8\xA1\xA1",
+ "\xBF\xC6" => "\xE8\xA4\xAA",
+ "\xBF\xC7" => "\xE8\xA4\xB2",
+ "\xBF\xC8" => "\xE8\xA4\xA5",
+ "\xBF\xC9" => "\xE8\xA4\xAB",
+ "\xBF\xCA" => "\xE8\xA4\xA1",
+ "\xBF\xCB" => "\xE8\xA6\xAA",
+ "\xBF\xCC" => "\xE8\xA6\xA6",
+ "\xBF\xCD" => "\xE8\xAB\xA6",
+ "\xBF\xCE" => "\xE8\xAB\xBA",
+ "\xBF\xCF" => "\xE8\xAB\xAB",
+ "\xBF\xD0" => "\xE8\xAB\xB1",
+ "\xBF\xD1" => "\xE8\xAC\x80",
+ "\xBF\xD2" => "\xE8\xAB\x9C",
+ "\xBF\xD3" => "\xE8\xAB\xA7",
+ "\xBF\xD4" => "\xE8\xAB\xAE",
+ "\xBF\xD5" => "\xE8\xAB\xBE",
+ "\xBF\xD6" => "\xE8\xAC\x81",
+ "\xBF\xD7" => "\xE8\xAC\x82",
+ "\xBF\xD8" => "\xE8\xAB\xB7",
+ "\xBF\xD9" => "\xE8\xAB\xAD",
+ "\xBF\xDA" => "\xE8\xAB\xB3",
+ "\xBF\xDB" => "\xE8\xAB\xB6",
+ "\xBF\xDC" => "\xE8\xAB\xBC",
+ "\xBF\xDD" => "\xE8\xB1\xAB",
+ "\xBF\xDE" => "\xE8\xB1\xAD",
+ "\xBF\xDF" => "\xE8\xB2\x93",
+ "\xBF\xE0" => "\xE8\xB3\xB4",
+ "\xBF\xE1" => "\xE8\xB9\x84",
+ "\xBF\xE2" => "\xE8\xB8\xB1",
+ "\xBF\xE3" => "\xE8\xB8\xB4",
+ "\xBF\xE4" => "\xE8\xB9\x82",
+ "\xBF\xE5" => "\xE8\xB8\xB9",
+ "\xBF\xE6" => "\xE8\xB8\xB5",
+ "\xBF\xE7" => "\xE8\xBC\xBB",
+ "\xBF\xE8" => "\xE8\xBC\xAF",
+ "\xBF\xE9" => "\xE8\xBC\xB8",
+ "\xBF\xEA" => "\xE8\xBC\xB3",
+ "\xBF\xEB" => "\xE8\xBE\xA8",
+ "\xBF\xEC" => "\xE8\xBE\xA6",
+ "\xBF\xED" => "\xE9\x81\xB5",
+ "\xBF\xEE" => "\xE9\x81\xB4",
+ "\xBF\xEF" => "\xE9\x81\xB8",
+ "\xBF\xF0" => "\xE9\x81\xB2",
+ "\xBF\xF1" => "\xE9\x81\xBC",
+ "\xBF\xF2" => "\xE9\x81\xBA",
+ "\xBF\xF3" => "\xE9\x84\xB4",
+ "\xBF\xF4" => "\xE9\x86\x92",
+ "\xBF\xF5" => "\xE9\x8C\xA0",
+ "\xBF\xF6" => "\xE9\x8C\xB6",
+ "\xBF\xF7" => "\xE9\x8B\xB8",
+ "\xBF\xF8" => "\xE9\x8C\xB3",
+ "\xBF\xF9" => "\xE9\x8C\xAF",
+ "\xBF\xFA" => "\xE9\x8C\xA2",
+ "\xBF\xFB" => "\xE9\x8B\xBC",
+ "\xBF\xFC" => "\xE9\x8C\xAB",
+ "\xBF\xFD" => "\xE9\x8C\x84",
+ "\xBF\xFE" => "\xE9\x8C\x9A",
+ "\xC0\x40" => "\xE9\x8C\x90",
+ "\xC0\x41" => "\xE9\x8C\xA6",
+ "\xC0\x42" => "\xE9\x8C\xA1",
+ "\xC0\x43" => "\xE9\x8C\x95",
+ "\xC0\x44" => "\xE9\x8C\xAE",
+ "\xC0\x45" => "\xE9\x8C\x99",
+ "\xC0\x46" => "\xE9\x96\xBB",
+ "\xC0\x47" => "\xE9\x9A\xA7",
+ "\xC0\x48" => "\xE9\x9A\xA8",
+ "\xC0\x49" => "\xE9\x9A\xAA",
+ "\xC0\x4A" => "\xE9\x9B\x95",
+ "\xC0\x4B" => "\xE9\x9C\x8E",
+ "\xC0\x4C" => "\xE9\x9C\x91",
+ "\xC0\x4D" => "\xE9\x9C\x96",
+ "\xC0\x4E" => "\xE9\x9C\x8D",
+ "\xC0\x4F" => "\xE9\x9C\x93",
+ "\xC0\x50" => "\xE9\x9C\x8F",
+ "\xC0\x51" => "\xE9\x9D\x9B",
+ "\xC0\x52" => "\xE9\x9D\x9C",
+ "\xC0\x53" => "\xE9\x9D\xA6",
+ "\xC0\x54" => "\xE9\x9E\x98",
+ "\xC0\x55" => "\xE9\xA0\xB0",
+ "\xC0\x56" => "\xE9\xA0\xB8",
+ "\xC0\x57" => "\xE9\xA0\xBB",
+ "\xC0\x58" => "\xE9\xA0\xB7",
+ "\xC0\x59" => "\xE9\xA0\xAD",
+ "\xC0\x5A" => "\xE9\xA0\xB9",
+ "\xC0\x5B" => "\xE9\xA0\xA4",
+ "\xC0\x5C" => "\xE9\xA4\x90",
+ "\xC0\x5D" => "\xE9\xA4\xA8",
+ "\xC0\x5E" => "\xE9\xA4\x9E",
+ "\xC0\x5F" => "\xE9\xA4\x9B",
+ "\xC0\x60" => "\xE9\xA4\xA1",
+ "\xC0\x61" => "\xE9\xA4\x9A",
+ "\xC0\x62" => "\xE9\xA7\xAD",
+ "\xC0\x63" => "\xE9\xA7\xA2",
+ "\xC0\x64" => "\xE9\xA7\xB1",
+ "\xC0\x65" => "\xE9\xAA\xB8",
+ "\xC0\x66" => "\xE9\xAA\xBC",
+ "\xC0\x67" => "\xE9\xAB\xBB",
+ "\xC0\x68" => "\xE9\xAB\xAD",
+ "\xC0\x69" => "\xE9\xAC\xA8",
+ "\xC0\x6A" => "\xE9\xAE\x91",
+ "\xC0\x6B" => "\xE9\xB4\x95",
+ "\xC0\x6C" => "\xE9\xB4\xA3",
+ "\xC0\x6D" => "\xE9\xB4\xA6",
+ "\xC0\x6E" => "\xE9\xB4\xA8",
+ "\xC0\x6F" => "\xE9\xB4\x92",
+ "\xC0\x70" => "\xE9\xB4\x9B",
+ "\xC0\x71" => "\xE9\xBB\x98",
+ "\xC0\x72" => "\xE9\xBB\x94",
+ "\xC0\x73" => "\xE9\xBE\x8D",
+ "\xC0\x74" => "\xE9\xBE\x9C",
+ "\xC0\x75" => "\xE5\x84\xAA",
+ "\xC0\x76" => "\xE5\x84\x9F",
+ "\xC0\x77" => "\xE5\x84\xA1",
+ "\xC0\x78" => "\xE5\x84\xB2",
+ "\xC0\x79" => "\xE5\x8B\xB5",
+ "\xC0\x7A" => "\xE5\x9A\x8E",
+ "\xC0\x7B" => "\xE5\x9A\x80",
+ "\xC0\x7C" => "\xE5\x9A\x90",
+ "\xC0\x7D" => "\xE5\x9A\x85",
+ "\xC0\x7E" => "\xE5\x9A\x87",
+ "\xC0\xA1" => "\xE5\x9A\x8F",
+ "\xC0\xA2" => "\xE5\xA3\x95",
+ "\xC0\xA3" => "\xE5\xA3\x93",
+ "\xC0\xA4" => "\xE5\xA3\x91",
+ "\xC0\xA5" => "\xE5\xA3\x8E",
+ "\xC0\xA6" => "\xE5\xAC\xB0",
+ "\xC0\xA7" => "\xE5\xAC\xAA",
+ "\xC0\xA8" => "\xE5\xAC\xA4",
+ "\xC0\xA9" => "\xE5\xAD\xBA",
+ "\xC0\xAA" => "\xE5\xB0\xB7",
+ "\xC0\xAB" => "\xE5\xB1\xA8",
+ "\xC0\xAC" => "\xE5\xB6\xBC",
+ "\xC0\xAD" => "\xE5\xB6\xBA",
+ "\xC0\xAE" => "\xE5\xB6\xBD",
+ "\xC0\xAF" => "\xE5\xB6\xB8",
+ "\xC0\xB0" => "\xE5\xB9\xAB",
+ "\xC0\xB1" => "\xE5\xBD\x8C",
+ "\xC0\xB2" => "\xE5\xBE\xBD",
+ "\xC0\xB3" => "\xE6\x87\x89",
+ "\xC0\xB4" => "\xE6\x87\x82",
+ "\xC0\xB5" => "\xE6\x87\x87",
+ "\xC0\xB6" => "\xE6\x87\xA6",
+ "\xC0\xB7" => "\xE6\x87\x8B",
+ "\xC0\xB8" => "\xE6\x88\xB2",
+ "\xC0\xB9" => "\xE6\x88\xB4",
+ "\xC0\xBA" => "\xE6\x93\x8E",
+ "\xC0\xBB" => "\xE6\x93\x8A",
+ "\xC0\xBC" => "\xE6\x93\x98",
+ "\xC0\xBD" => "\xE6\x93\xA0",
+ "\xC0\xBE" => "\xE6\x93\xB0",
+ "\xC0\xBF" => "\xE6\x93\xA6",
+ "\xC0\xC0" => "\xE6\x93\xAC",
+ "\xC0\xC1" => "\xE6\x93\xB1",
+ "\xC0\xC2" => "\xE6\x93\xA2",
+ "\xC0\xC3" => "\xE6\x93\xAD",
+ "\xC0\xC4" => "\xE6\x96\x82",
+ "\xC0\xC5" => "\xE6\x96\x83",
+ "\xC0\xC6" => "\xE6\x9B\x99",
+ "\xC0\xC7" => "\xE6\x9B\x96",
+ "\xC0\xC8" => "\xE6\xAA\x80",
+ "\xC0\xC9" => "\xE6\xAA\x94",
+ "\xC0\xCA" => "\xE6\xAA\x84",
+ "\xC0\xCB" => "\xE6\xAA\xA2",
+ "\xC0\xCC" => "\xE6\xAA\x9C",
+ "\xC0\xCD" => "\xE6\xAB\x9B",
+ "\xC0\xCE" => "\xE6\xAA\xA3",
+ "\xC0\xCF" => "\xE6\xA9\xBE",
+ "\xC0\xD0" => "\xE6\xAA\x97",
+ "\xC0\xD1" => "\xE6\xAA\x90",
+ "\xC0\xD2" => "\xE6\xAA\xA0",
+ "\xC0\xD3" => "\xE6\xAD\x9C",
+ "\xC0\xD4" => "\xE6\xAE\xAE",
+ "\xC0\xD5" => "\xE6\xAF\x9A",
+ "\xC0\xD6" => "\xE6\xB0\x88",
+ "\xC0\xD7" => "\xE6\xBF\x98",
+ "\xC0\xD8" => "\xE6\xBF\xB1",
+ "\xC0\xD9" => "\xE6\xBF\x9F",
+ "\xC0\xDA" => "\xE6\xBF\xA0",
+ "\xC0\xDB" => "\xE6\xBF\x9B",
+ "\xC0\xDC" => "\xE6\xBF\xA4",
+ "\xC0\xDD" => "\xE6\xBF\xAB",
+ "\xC0\xDE" => "\xE6\xBF\xAF",
+ "\xC0\xDF" => "\xE6\xBE\x80",
+ "\xC0\xE0" => "\xE6\xBF\xAC",
+ "\xC0\xE1" => "\xE6\xBF\xA1",
+ "\xC0\xE2" => "\xE6\xBF\xA9",
+ "\xC0\xE3" => "\xE6\xBF\x95",
+ "\xC0\xE4" => "\xE6\xBF\xAE",
+ "\xC0\xE5" => "\xE6\xBF\xB0",
+ "\xC0\xE6" => "\xE7\x87\xA7",
+ "\xC0\xE7" => "\xE7\x87\x9F",
+ "\xC0\xE8" => "\xE7\x87\xAE",
+ "\xC0\xE9" => "\xE7\x87\xA6",
+ "\xC0\xEA" => "\xE7\x87\xA5",
+ "\xC0\xEB" => "\xE7\x87\xAD",
+ "\xC0\xEC" => "\xE7\x87\xAC",
+ "\xC0\xED" => "\xE7\x87\xB4",
+ "\xC0\xEE" => "\xE7\x87\xA0",
+ "\xC0\xEF" => "\xE7\x88\xB5",
+ "\xC0\xF0" => "\xE7\x89\x86",
+ "\xC0\xF1" => "\xE7\x8D\xB0",
+ "\xC0\xF2" => "\xE7\x8D\xB2",
+ "\xC0\xF3" => "\xE7\x92\xA9",
+ "\xC0\xF4" => "\xE7\x92\xB0",
+ "\xC0\xF5" => "\xE7\x92\xA6",
+ "\xC0\xF6" => "\xE7\x92\xA8",
+ "\xC0\xF7" => "\xE7\x99\x86",
+ "\xC0\xF8" => "\xE7\x99\x82",
+ "\xC0\xF9" => "\xE7\x99\x8C",
+ "\xC0\xFA" => "\xE7\x9B\xAA",
+ "\xC0\xFB" => "\xE7\x9E\xB3",
+ "\xC0\xFC" => "\xE7\x9E\xAA",
+ "\xC0\xFD" => "\xE7\x9E\xB0",
+ "\xC0\xFE" => "\xE7\x9E\xAC",
+ "\xC1\x40" => "\xE7\x9E\xA7",
+ "\xC1\x41" => "\xE7\x9E\xAD",
+ "\xC1\x42" => "\xE7\x9F\xAF",
+ "\xC1\x43" => "\xE7\xA3\xB7",
+ "\xC1\x44" => "\xE7\xA3\xBA",
+ "\xC1\x45" => "\xE7\xA3\xB4",
+ "\xC1\x46" => "\xE7\xA3\xAF",
+ "\xC1\x47" => "\xE7\xA4\x81",
+ "\xC1\x48" => "\xE7\xA6\xA7",
+ "\xC1\x49" => "\xE7\xA6\xAA",
+ "\xC1\x4A" => "\xE7\xA9\x97",
+ "\xC1\x4B" => "\xE7\xAA\xBF",
+ "\xC1\x4C" => "\xE7\xB0\x87",
+ "\xC1\x4D" => "\xE7\xB0\x8D",
+ "\xC1\x4E" => "\xE7\xAF\xBE",
+ "\xC1\x4F" => "\xE7\xAF\xB7",
+ "\xC1\x50" => "\xE7\xB0\x8C",
+ "\xC1\x51" => "\xE7\xAF\xA0",
+ "\xC1\x52" => "\xE7\xB3\xA0",
+ "\xC1\x53" => "\xE7\xB3\x9C",
+ "\xC1\x54" => "\xE7\xB3\x9E",
+ "\xC1\x55" => "\xE7\xB3\xA2",
+ "\xC1\x56" => "\xE7\xB3\x9F",
+ "\xC1\x57" => "\xE7\xB3\x99",
+ "\xC1\x58" => "\xE7\xB3\x9D",
+ "\xC1\x59" => "\xE7\xB8\xAE",
+ "\xC1\x5A" => "\xE7\xB8\xBE",
+ "\xC1\x5B" => "\xE7\xB9\x86",
+ "\xC1\x5C" => "\xE7\xB8\xB7",
+ "\xC1\x5D" => "\xE7\xB8\xB2",
+ "\xC1\x5E" => "\xE7\xB9\x83",
+ "\xC1\x5F" => "\xE7\xB8\xAB",
+ "\xC1\x60" => "\xE7\xB8\xBD",
+ "\xC1\x61" => "\xE7\xB8\xB1",
+ "\xC1\x62" => "\xE7\xB9\x85",
+ "\xC1\x63" => "\xE7\xB9\x81",
+ "\xC1\x64" => "\xE7\xB8\xB4",
+ "\xC1\x65" => "\xE7\xB8\xB9",
+ "\xC1\x66" => "\xE7\xB9\x88",
+ "\xC1\x67" => "\xE7\xB8\xB5",
+ "\xC1\x68" => "\xE7\xB8\xBF",
+ "\xC1\x69" => "\xE7\xB8\xAF",
+ "\xC1\x6A" => "\xE7\xBD\x84",
+ "\xC1\x6B" => "\xE7\xBF\xB3",
+ "\xC1\x6C" => "\xE7\xBF\xBC",
+ "\xC1\x6D" => "\xE8\x81\xB1",
+ "\xC1\x6E" => "\xE8\x81\xB2",
+ "\xC1\x6F" => "\xE8\x81\xB0",
+ "\xC1\x70" => "\xE8\x81\xAF",
+ "\xC1\x71" => "\xE8\x81\xB3",
+ "\xC1\x72" => "\xE8\x87\x86",
+ "\xC1\x73" => "\xE8\x87\x83",
+ "\xC1\x74" => "\xE8\x86\xBA",
+ "\xC1\x75" => "\xE8\x87\x82",
+ "\xC1\x76" => "\xE8\x87\x80",
+ "\xC1\x77" => "\xE8\x86\xBF",
+ "\xC1\x78" => "\xE8\x86\xBD",
+ "\xC1\x79" => "\xE8\x87\x89",
+ "\xC1\x7A" => "\xE8\x86\xBE",
+ "\xC1\x7B" => "\xE8\x87\xA8",
+ "\xC1\x7C" => "\xE8\x88\x89",
+ "\xC1\x7D" => "\xE8\x89\xB1",
+ "\xC1\x7E" => "\xE8\x96\xAA",
+ "\xC1\xA1" => "\xE8\x96\x84",
+ "\xC1\xA2" => "\xE8\x95\xBE",
+ "\xC1\xA3" => "\xE8\x96\x9C",
+ "\xC1\xA4" => "\xE8\x96\x91",
+ "\xC1\xA5" => "\xE8\x96\x94",
+ "\xC1\xA6" => "\xE8\x96\xAF",
+ "\xC1\xA7" => "\xE8\x96\x9B",
+ "\xC1\xA8" => "\xE8\x96\x87",
+ "\xC1\xA9" => "\xE8\x96\xA8",
+ "\xC1\xAA" => "\xE8\x96\x8A",
+ "\xC1\xAB" => "\xE8\x99\xA7",
+ "\xC1\xAC" => "\xE8\x9F\x80",
+ "\xC1\xAD" => "\xE8\x9F\x91",
+ "\xC1\xAE" => "\xE8\x9E\xB3",
+ "\xC1\xAF" => "\xE8\x9F\x92",
+ "\xC1\xB0" => "\xE8\x9F\x86",
+ "\xC1\xB1" => "\xE8\x9E\xAB",
+ "\xC1\xB2" => "\xE8\x9E\xBB",
+ "\xC1\xB3" => "\xE8\x9E\xBA",
+ "\xC1\xB4" => "\xE8\x9F\x88",
+ "\xC1\xB5" => "\xE8\x9F\x8B",
+ "\xC1\xB6" => "\xE8\xA4\xBB",
+ "\xC1\xB7" => "\xE8\xA4\xB6",
+ "\xC1\xB8" => "\xE8\xA5\x84",
+ "\xC1\xB9" => "\xE8\xA4\xB8",
+ "\xC1\xBA" => "\xE8\xA4\xBD",
+ "\xC1\xBB" => "\xE8\xA6\xAC",
+ "\xC1\xBC" => "\xE8\xAC\x8E",
+ "\xC1\xBD" => "\xE8\xAC\x97",
+ "\xC1\xBE" => "\xE8\xAC\x99",
+ "\xC1\xBF" => "\xE8\xAC\x9B",
+ "\xC1\xC0" => "\xE8\xAC\x8A",
+ "\xC1\xC1" => "\xE8\xAC\xA0",
+ "\xC1\xC2" => "\xE8\xAC\x9D",
+ "\xC1\xC3" => "\xE8\xAC\x84",
+ "\xC1\xC4" => "\xE8\xAC\x90",
+ "\xC1\xC5" => "\xE8\xB1\x81",
+ "\xC1\xC6" => "\xE8\xB0\xBF",
+ "\xC1\xC7" => "\xE8\xB1\xB3",
+ "\xC1\xC8" => "\xE8\xB3\xBA",
+ "\xC1\xC9" => "\xE8\xB3\xBD",
+ "\xC1\xCA" => "\xE8\xB3\xBC",
+ "\xC1\xCB" => "\xE8\xB3\xB8",
+ "\xC1\xCC" => "\xE8\xB3\xBB",
+ "\xC1\xCD" => "\xE8\xB6\xA8",
+ "\xC1\xCE" => "\xE8\xB9\x89",
+ "\xC1\xCF" => "\xE8\xB9\x8B",
+ "\xC1\xD0" => "\xE8\xB9\x88",
+ "\xC1\xD1" => "\xE8\xB9\x8A",
+ "\xC1\xD2" => "\xE8\xBD\x84",
+ "\xC1\xD3" => "\xE8\xBC\xBE",
+ "\xC1\xD4" => "\xE8\xBD\x82",
+ "\xC1\xD5" => "\xE8\xBD\x85",
+ "\xC1\xD6" => "\xE8\xBC\xBF",
+ "\xC1\xD7" => "\xE9\x81\xBF",
+ "\xC1\xD8" => "\xE9\x81\xBD",
+ "\xC1\xD9" => "\xE9\x82\x84",
+ "\xC1\xDA" => "\xE9\x82\x81",
+ "\xC1\xDB" => "\xE9\x82\x82",
+ "\xC1\xDC" => "\xE9\x82\x80",
+ "\xC1\xDD" => "\xE9\x84\xB9",
+ "\xC1\xDE" => "\xE9\x86\xA3",
+ "\xC1\xDF" => "\xE9\x86\x9E",
+ "\xC1\xE0" => "\xE9\x86\x9C",
+ "\xC1\xE1" => "\xE9\x8D\x8D",
+ "\xC1\xE2" => "\xE9\x8E\x82",
+ "\xC1\xE3" => "\xE9\x8C\xA8",
+ "\xC1\xE4" => "\xE9\x8D\xB5",
+ "\xC1\xE5" => "\xE9\x8D\x8A",
+ "\xC1\xE6" => "\xE9\x8D\xA5",
+ "\xC1\xE7" => "\xE9\x8D\x8B",
+ "\xC1\xE8" => "\xE9\x8C\x98",
+ "\xC1\xE9" => "\xE9\x8D\xBE",
+ "\xC1\xEA" => "\xE9\x8D\xAC",
+ "\xC1\xEB" => "\xE9\x8D\x9B",
+ "\xC1\xEC" => "\xE9\x8D\xB0",
+ "\xC1\xED" => "\xE9\x8D\x9A",
+ "\xC1\xEE" => "\xE9\x8D\x94",
+ "\xC1\xEF" => "\xE9\x97\x8A",
+ "\xC1\xF0" => "\xE9\x97\x8B",
+ "\xC1\xF1" => "\xE9\x97\x8C",
+ "\xC1\xF2" => "\xE9\x97\x88",
+ "\xC1\xF3" => "\xE9\x97\x86",
+ "\xC1\xF4" => "\xE9\x9A\xB1",
+ "\xC1\xF5" => "\xE9\x9A\xB8",
+ "\xC1\xF6" => "\xE9\x9B\x96",
+ "\xC1\xF7" => "\xE9\x9C\x9C",
+ "\xC1\xF8" => "\xE9\x9C\x9E",
+ "\xC1\xF9" => "\xE9\x9E\xA0",
+ "\xC1\xFA" => "\xE9\x9F\x93",
+ "\xC1\xFB" => "\xE9\xA1\x86",
+ "\xC1\xFC" => "\xE9\xA2\xB6",
+ "\xC1\xFD" => "\xE9\xA4\xB5",
+ "\xC1\xFE" => "\xE9\xA8\x81",
+ "\xC2\x40" => "\xE9\xA7\xBF",
+ "\xC2\x41" => "\xE9\xAE\xAE",
+ "\xC2\x42" => "\xE9\xAE\xAB",
+ "\xC2\x43" => "\xE9\xAE\xAA",
+ "\xC2\x44" => "\xE9\xAE\xAD",
+ "\xC2\x45" => "\xE9\xB4\xBB",
+ "\xC2\x46" => "\xE9\xB4\xBF",
+ "\xC2\x47" => "\xE9\xBA\x8B",
+ "\xC2\x48" => "\xE9\xBB\x8F",
+ "\xC2\x49" => "\xE9\xBB\x9E",
+ "\xC2\x4A" => "\xE9\xBB\x9C",
+ "\xC2\x4B" => "\xE9\xBB\x9D",
+ "\xC2\x4C" => "\xE9\xBB\x9B",
+ "\xC2\x4D" => "\xE9\xBC\xBE",
+ "\xC2\x4E" => "\xE9\xBD\x8B",
+ "\xC2\x4F" => "\xE5\x8F\xA2",
+ "\xC2\x50" => "\xE5\x9A\x95",
+ "\xC2\x51" => "\xE5\x9A\xAE",
+ "\xC2\x52" => "\xE5\xA3\x99",
+ "\xC2\x53" => "\xE5\xA3\x98",
+ "\xC2\x54" => "\xE5\xAC\xB8",
+ "\xC2\x55" => "\xE5\xBD\x9D",
+ "\xC2\x56" => "\xE6\x87\xA3",
+ "\xC2\x57" => "\xE6\x88\xB3",
+ "\xC2\x58" => "\xE6\x93\xB4",
+ "\xC2\x59" => "\xE6\x93\xB2",
+ "\xC2\x5A" => "\xE6\x93\xBE",
+ "\xC2\x5B" => "\xE6\x94\x86",
+ "\xC2\x5C" => "\xE6\x93\xBA",
+ "\xC2\x5D" => "\xE6\x93\xBB",
+ "\xC2\x5E" => "\xE6\x93\xB7",
+ "\xC2\x5F" => "\xE6\x96\xB7",
+ "\xC2\x60" => "\xE6\x9B\x9C",
+ "\xC2\x61" => "\xE6\x9C\xA6",
+ "\xC2\x62" => "\xE6\xAA\xB3",
+ "\xC2\x63" => "\xE6\xAA\xAC",
+ "\xC2\x64" => "\xE6\xAB\x83",
+ "\xC2\x65" => "\xE6\xAA\xBB",
+ "\xC2\x66" => "\xE6\xAA\xB8",
+ "\xC2\x67" => "\xE6\xAB\x82",
+ "\xC2\x68" => "\xE6\xAA\xAE",
+ "\xC2\x69" => "\xE6\xAA\xAF",
+ "\xC2\x6A" => "\xE6\xAD\x9F",
+ "\xC2\x6B" => "\xE6\xAD\xB8",
+ "\xC2\x6C" => "\xE6\xAE\xAF",
+ "\xC2\x6D" => "\xE7\x80\x89",
+ "\xC2\x6E" => "\xE7\x80\x8B",
+ "\xC2\x6F" => "\xE6\xBF\xBE",
+ "\xC2\x70" => "\xE7\x80\x86",
+ "\xC2\x71" => "\xE6\xBF\xBA",
+ "\xC2\x72" => "\xE7\x80\x91",
+ "\xC2\x73" => "\xE7\x80\x8F",
+ "\xC2\x74" => "\xE7\x87\xBB",
+ "\xC2\x75" => "\xE7\x87\xBC",
+ "\xC2\x76" => "\xE7\x87\xBE",
+ "\xC2\x77" => "\xE7\x87\xB8",
+ "\xC2\x78" => "\xE7\x8D\xB7",
+ "\xC2\x79" => "\xE7\x8D\xB5",
+ "\xC2\x7A" => "\xE7\x92\xA7",
+ "\xC2\x7B" => "\xE7\x92\xBF",
+ "\xC2\x7C" => "\xE7\x94\x95",
+ "\xC2\x7D" => "\xE7\x99\x96",
+ "\xC2\x7E" => "\xE7\x99\x98",
+ "\xC2\xA1" => "\xE7\x99\x92",
+ "\xC2\xA2" => "\xE7\x9E\xBD",
+ "\xC2\xA3" => "\xE7\x9E\xBF",
+ "\xC2\xA4" => "\xE7\x9E\xBB",
+ "\xC2\xA5" => "\xE7\x9E\xBC",
+ "\xC2\xA6" => "\xE7\xA4\x8E",
+ "\xC2\xA7" => "\xE7\xA6\xAE",
+ "\xC2\xA8" => "\xE7\xA9\xA1",
+ "\xC2\xA9" => "\xE7\xA9\xA2",
+ "\xC2\xAA" => "\xE7\xA9\xA0",
+ "\xC2\xAB" => "\xE7\xAB\x84",
+ "\xC2\xAC" => "\xE7\xAB\x85",
+ "\xC2\xAD" => "\xE7\xB0\xAB",
+ "\xC2\xAE" => "\xE7\xB0\xA7",
+ "\xC2\xAF" => "\xE7\xB0\xAA",
+ "\xC2\xB0" => "\xE7\xB0\x9E",
+ "\xC2\xB1" => "\xE7\xB0\xA3",
+ "\xC2\xB2" => "\xE7\xB0\xA1",
+ "\xC2\xB3" => "\xE7\xB3\xA7",
+ "\xC2\xB4" => "\xE7\xB9\x94",
+ "\xC2\xB5" => "\xE7\xB9\x95",
+ "\xC2\xB6" => "\xE7\xB9\x9E",
+ "\xC2\xB7" => "\xE7\xB9\x9A",
+ "\xC2\xB8" => "\xE7\xB9\xA1",
+ "\xC2\xB9" => "\xE7\xB9\x92",
+ "\xC2\xBA" => "\xE7\xB9\x99",
+ "\xC2\xBB" => "\xE7\xBD\x88",
+ "\xC2\xBC" => "\xE7\xBF\xB9",
+ "\xC2\xBD" => "\xE7\xBF\xBB",
+ "\xC2\xBE" => "\xE8\x81\xB7",
+ "\xC2\xBF" => "\xE8\x81\xB6",
+ "\xC2\xC0" => "\xE8\x87\x8D",
+ "\xC2\xC1" => "\xE8\x87\x8F",
+ "\xC2\xC2" => "\xE8\x88\x8A",
+ "\xC2\xC3" => "\xE8\x97\x8F",
+ "\xC2\xC4" => "\xE8\x96\xA9",
+ "\xC2\xC5" => "\xE8\x97\x8D",
+ "\xC2\xC6" => "\xE8\x97\x90",
+ "\xC2\xC7" => "\xE8\x97\x89",
+ "\xC2\xC8" => "\xE8\x96\xB0",
+ "\xC2\xC9" => "\xE8\x96\xBA",
+ "\xC2\xCA" => "\xE8\x96\xB9",
+ "\xC2\xCB" => "\xE8\x96\xA6",
+ "\xC2\xCC" => "\xE8\x9F\xAF",
+ "\xC2\xCD" => "\xE8\x9F\xAC",
+ "\xC2\xCE" => "\xE8\x9F\xB2",
+ "\xC2\xCF" => "\xE8\x9F\xA0",
+ "\xC2\xD0" => "\xE8\xA6\x86",
+ "\xC2\xD1" => "\xE8\xA6\xB2",
+ "\xC2\xD2" => "\xE8\xA7\xB4",
+ "\xC2\xD3" => "\xE8\xAC\xA8",
+ "\xC2\xD4" => "\xE8\xAC\xB9",
+ "\xC2\xD5" => "\xE8\xAC\xAC",
+ "\xC2\xD6" => "\xE8\xAC\xAB",
+ "\xC2\xD7" => "\xE8\xB1\x90",
+ "\xC2\xD8" => "\xE8\xB4\x85",
+ "\xC2\xD9" => "\xE8\xB9\x99",
+ "\xC2\xDA" => "\xE8\xB9\xA3",
+ "\xC2\xDB" => "\xE8\xB9\xA6",
+ "\xC2\xDC" => "\xE8\xB9\xA4",
+ "\xC2\xDD" => "\xE8\xB9\x9F",
+ "\xC2\xDE" => "\xE8\xB9\x95",
+ "\xC2\xDF" => "\xE8\xBB\x80",
+ "\xC2\xE0" => "\xE8\xBD\x89",
+ "\xC2\xE1" => "\xE8\xBD\x8D",
+ "\xC2\xE2" => "\xE9\x82\x87",
+ "\xC2\xE3" => "\xE9\x82\x83",
+ "\xC2\xE4" => "\xE9\x82\x88",
+ "\xC2\xE5" => "\xE9\x86\xAB",
+ "\xC2\xE6" => "\xE9\x86\xAC",
+ "\xC2\xE7" => "\xE9\x87\x90",
+ "\xC2\xE8" => "\xE9\x8E\x94",
+ "\xC2\xE9" => "\xE9\x8E\x8A",
+ "\xC2\xEA" => "\xE9\x8E\x96",
+ "\xC2\xEB" => "\xE9\x8E\xA2",
+ "\xC2\xEC" => "\xE9\x8E\xB3",
+ "\xC2\xED" => "\xE9\x8E\xAE",
+ "\xC2\xEE" => "\xE9\x8E\xAC",
+ "\xC2\xEF" => "\xE9\x8E\xB0",
+ "\xC2\xF0" => "\xE9\x8E\x98",
+ "\xC2\xF1" => "\xE9\x8E\x9A",
+ "\xC2\xF2" => "\xE9\x8E\x97",
+ "\xC2\xF3" => "\xE9\x97\x94",
+ "\xC2\xF4" => "\xE9\x97\x96",
+ "\xC2\xF5" => "\xE9\x97\x90",
+ "\xC2\xF6" => "\xE9\x97\x95",
+ "\xC2\xF7" => "\xE9\x9B\xA2",
+ "\xC2\xF8" => "\xE9\x9B\x9C",
+ "\xC2\xF9" => "\xE9\x9B\x99",
+ "\xC2\xFA" => "\xE9\x9B\x9B",
+ "\xC2\xFB" => "\xE9\x9B\x9E",
+ "\xC2\xFC" => "\xE9\x9C\xA4",
+ "\xC2\xFD" => "\xE9\x9E\xA3",
+ "\xC2\xFE" => "\xE9\x9E\xA6",
+ "\xC3\x40" => "\xE9\x9E\xAD",
+ "\xC3\x41" => "\xE9\x9F\xB9",
+ "\xC3\x42" => "\xE9\xA1\x8D",
+ "\xC3\x43" => "\xE9\xA1\x8F",
+ "\xC3\x44" => "\xE9\xA1\x8C",
+ "\xC3\x45" => "\xE9\xA1\x8E",
+ "\xC3\x46" => "\xE9\xA1\x93",
+ "\xC3\x47" => "\xE9\xA2\xBA",
+ "\xC3\x48" => "\xE9\xA4\xBE",
+ "\xC3\x49" => "\xE9\xA4\xBF",
+ "\xC3\x4A" => "\xE9\xA4\xBD",
+ "\xC3\x4B" => "\xE9\xA4\xAE",
+ "\xC3\x4C" => "\xE9\xA6\xA5",
+ "\xC3\x4D" => "\xE9\xA8\x8E",
+ "\xC3\x4E" => "\xE9\xAB\x81",
+ "\xC3\x4F" => "\xE9\xAC\x83",
+ "\xC3\x50" => "\xE9\xAC\x86",
+ "\xC3\x51" => "\xE9\xAD\x8F",
+ "\xC3\x52" => "\xE9\xAD\x8E",
+ "\xC3\x53" => "\xE9\xAD\x8D",
+ "\xC3\x54" => "\xE9\xAF\x8A",
+ "\xC3\x55" => "\xE9\xAF\x89",
+ "\xC3\x56" => "\xE9\xAF\xBD",
+ "\xC3\x57" => "\xE9\xAF\x88",
+ "\xC3\x58" => "\xE9\xAF\x80",
+ "\xC3\x59" => "\xE9\xB5\x91",
+ "\xC3\x5A" => "\xE9\xB5\x9D",
+ "\xC3\x5B" => "\xE9\xB5\xA0",
+ "\xC3\x5C" => "\xE9\xBB\xA0",
+ "\xC3\x5D" => "\xE9\xBC\x95",
+ "\xC3\x5E" => "\xE9\xBC\xAC",
+ "\xC3\x5F" => "\xE5\x84\xB3",
+ "\xC3\x60" => "\xE5\x9A\xA5",
+ "\xC3\x61" => "\xE5\xA3\x9E",
+ "\xC3\x62" => "\xE5\xA3\x9F",
+ "\xC3\x63" => "\xE5\xA3\xA2",
+ "\xC3\x64" => "\xE5\xAF\xB5",
+ "\xC3\x65" => "\xE9\xBE\x90",
+ "\xC3\x66" => "\xE5\xBB\xAC",
+ "\xC3\x67" => "\xE6\x87\xB2",
+ "\xC3\x68" => "\xE6\x87\xB7",
+ "\xC3\x69" => "\xE6\x87\xB6",
+ "\xC3\x6A" => "\xE6\x87\xB5",
+ "\xC3\x6B" => "\xE6\x94\x80",
+ "\xC3\x6C" => "\xE6\x94\x8F",
+ "\xC3\x6D" => "\xE6\x9B\xA0",
+ "\xC3\x6E" => "\xE6\x9B\x9D",
+ "\xC3\x6F" => "\xE6\xAB\xA5",
+ "\xC3\x70" => "\xE6\xAB\x9D",
+ "\xC3\x71" => "\xE6\xAB\x9A",
+ "\xC3\x72" => "\xE6\xAB\x93",
+ "\xC3\x73" => "\xE7\x80\x9B",
+ "\xC3\x74" => "\xE7\x80\x9F",
+ "\xC3\x75" => "\xE7\x80\xA8",
+ "\xC3\x76" => "\xE7\x80\x9A",
+ "\xC3\x77" => "\xE7\x80\x9D",
+ "\xC3\x78" => "\xE7\x80\x95",
+ "\xC3\x79" => "\xE7\x80\x98",
+ "\xC3\x7A" => "\xE7\x88\x86",
+ "\xC3\x7B" => "\xE7\x88\x8D",
+ "\xC3\x7C" => "\xE7\x89\x98",
+ "\xC3\x7D" => "\xE7\x8A\xA2",
+ "\xC3\x7E" => "\xE7\x8D\xB8",
+ "\xC3\xA1" => "\xE7\x8D\xBA",
+ "\xC3\xA2" => "\xE7\x92\xBD",
+ "\xC3\xA3" => "\xE7\x93\x8A",
+ "\xC3\xA4" => "\xE7\x93\xA3",
+ "\xC3\xA5" => "\xE7\x96\x87",
+ "\xC3\xA6" => "\xE7\x96\x86",
+ "\xC3\xA7" => "\xE7\x99\x9F",
+ "\xC3\xA8" => "\xE7\x99\xA1",
+ "\xC3\xA9" => "\xE7\x9F\x87",
+ "\xC3\xAA" => "\xE7\xA4\x99",
+ "\xC3\xAB" => "\xE7\xA6\xB1",
+ "\xC3\xAC" => "\xE7\xA9\xAB",
+ "\xC3\xAD" => "\xE7\xA9\xA9",
+ "\xC3\xAE" => "\xE7\xB0\xBE",
+ "\xC3\xAF" => "\xE7\xB0\xBF",
+ "\xC3\xB0" => "\xE7\xB0\xB8",
+ "\xC3\xB1" => "\xE7\xB0\xBD",
+ "\xC3\xB2" => "\xE7\xB0\xB7",
+ "\xC3\xB3" => "\xE7\xB1\x80",
+ "\xC3\xB4" => "\xE7\xB9\xAB",
+ "\xC3\xB5" => "\xE7\xB9\xAD",
+ "\xC3\xB6" => "\xE7\xB9\xB9",
+ "\xC3\xB7" => "\xE7\xB9\xA9",
+ "\xC3\xB8" => "\xE7\xB9\xAA",
+ "\xC3\xB9" => "\xE7\xBE\x85",
+ "\xC3\xBA" => "\xE7\xB9\xB3",
+ "\xC3\xBB" => "\xE7\xBE\xB6",
+ "\xC3\xBC" => "\xE7\xBE\xB9",
+ "\xC3\xBD" => "\xE7\xBE\xB8",
+ "\xC3\xBE" => "\xE8\x87\x98",
+ "\xC3\xBF" => "\xE8\x97\xA9",
+ "\xC3\xC0" => "\xE8\x97\x9D",
+ "\xC3\xC1" => "\xE8\x97\xAA",
+ "\xC3\xC2" => "\xE8\x97\x95",
+ "\xC3\xC3" => "\xE8\x97\xA4",
+ "\xC3\xC4" => "\xE8\x97\xA5",
+ "\xC3\xC5" => "\xE8\x97\xB7",
+ "\xC3\xC6" => "\xE8\x9F\xBB",
+ "\xC3\xC7" => "\xE8\xA0\x85",
+ "\xC3\xC8" => "\xE8\xA0\x8D",
+ "\xC3\xC9" => "\xE8\x9F\xB9",
+ "\xC3\xCA" => "\xE8\x9F\xBE",
+ "\xC3\xCB" => "\xE8\xA5\xA0",
+ "\xC3\xCC" => "\xE8\xA5\x9F",
+ "\xC3\xCD" => "\xE8\xA5\x96",
+ "\xC3\xCE" => "\xE8\xA5\x9E",
+ "\xC3\xCF" => "\xE8\xAD\x81",
+ "\xC3\xD0" => "\xE8\xAD\x9C",
+ "\xC3\xD1" => "\xE8\xAD\x98",
+ "\xC3\xD2" => "\xE8\xAD\x89",
+ "\xC3\xD3" => "\xE8\xAD\x9A",
+ "\xC3\xD4" => "\xE8\xAD\x8E",
+ "\xC3\xD5" => "\xE8\xAD\x8F",
+ "\xC3\xD6" => "\xE8\xAD\x86",
+ "\xC3\xD7" => "\xE8\xAD\x99",
+ "\xC3\xD8" => "\xE8\xB4\x88",
+ "\xC3\xD9" => "\xE8\xB4\x8A",
+ "\xC3\xDA" => "\xE8\xB9\xBC",
+ "\xC3\xDB" => "\xE8\xB9\xB2",
+ "\xC3\xDC" => "\xE8\xBA\x87",
+ "\xC3\xDD" => "\xE8\xB9\xB6",
+ "\xC3\xDE" => "\xE8\xB9\xAC",
+ "\xC3\xDF" => "\xE8\xB9\xBA",
+ "\xC3\xE0" => "\xE8\xB9\xB4",
+ "\xC3\xE1" => "\xE8\xBD\x94",
+ "\xC3\xE2" => "\xE8\xBD\x8E",
+ "\xC3\xE3" => "\xE8\xBE\xAD",
+ "\xC3\xE4" => "\xE9\x82\x8A",
+ "\xC3\xE5" => "\xE9\x82\x8B",
+ "\xC3\xE6" => "\xE9\x86\xB1",
+ "\xC3\xE7" => "\xE9\x86\xAE",
+ "\xC3\xE8" => "\xE9\x8F\xA1",
+ "\xC3\xE9" => "\xE9\x8F\x91",
+ "\xC3\xEA" => "\xE9\x8F\x9F",
+ "\xC3\xEB" => "\xE9\x8F\x83",
+ "\xC3\xEC" => "\xE9\x8F\x88",
+ "\xC3\xED" => "\xE9\x8F\x9C",
+ "\xC3\xEE" => "\xE9\x8F\x9D",
+ "\xC3\xEF" => "\xE9\x8F\x96",
+ "\xC3\xF0" => "\xE9\x8F\xA2",
+ "\xC3\xF1" => "\xE9\x8F\x8D",
+ "\xC3\xF2" => "\xE9\x8F\x98",
+ "\xC3\xF3" => "\xE9\x8F\xA4",
+ "\xC3\xF4" => "\xE9\x8F\x97",
+ "\xC3\xF5" => "\xE9\x8F\xA8",
+ "\xC3\xF6" => "\xE9\x97\x9C",
+ "\xC3\xF7" => "\xE9\x9A\xB4",
+ "\xC3\xF8" => "\xE9\x9B\xA3",
+ "\xC3\xF9" => "\xE9\x9C\xAA",
+ "\xC3\xFA" => "\xE9\x9C\xA7",
+ "\xC3\xFB" => "\xE9\x9D\xA1",
+ "\xC3\xFC" => "\xE9\x9F\x9C",
+ "\xC3\xFD" => "\xE9\x9F\xBB",
+ "\xC3\xFE" => "\xE9\xA1\x9E",
+ "\xC4\x40" => "\xE9\xA1\x98",
+ "\xC4\x41" => "\xE9\xA1\x9B",
+ "\xC4\x42" => "\xE9\xA2\xBC",
+ "\xC4\x43" => "\xE9\xA5\x85",
+ "\xC4\x44" => "\xE9\xA5\x89",
+ "\xC4\x45" => "\xE9\xA8\x96",
+ "\xC4\x46" => "\xE9\xA8\x99",
+ "\xC4\x47" => "\xE9\xAC\x8D",
+ "\xC4\x48" => "\xE9\xAF\xA8",
+ "\xC4\x49" => "\xE9\xAF\xA7",
+ "\xC4\x4A" => "\xE9\xAF\x96",
+ "\xC4\x4B" => "\xE9\xAF\x9B",
+ "\xC4\x4C" => "\xE9\xB6\x89",
+ "\xC4\x4D" => "\xE9\xB5\xA1",
+ "\xC4\x4E" => "\xE9\xB5\xB2",
+ "\xC4\x4F" => "\xE9\xB5\xAA",
+ "\xC4\x50" => "\xE9\xB5\xAC",
+ "\xC4\x51" => "\xE9\xBA\x92",
+ "\xC4\x52" => "\xE9\xBA\x97",
+ "\xC4\x53" => "\xE9\xBA\x93",
+ "\xC4\x54" => "\xE9\xBA\xB4",
+ "\xC4\x55" => "\xE5\x8B\xB8",
+ "\xC4\x56" => "\xE5\x9A\xA8",
+ "\xC4\x57" => "\xE5\x9A\xB7",
+ "\xC4\x58" => "\xE5\x9A\xB6",
+ "\xC4\x59" => "\xE5\x9A\xB4",
+ "\xC4\x5A" => "\xE5\x9A\xBC",
+ "\xC4\x5B" => "\xE5\xA3\xA4",
+ "\xC4\x5C" => "\xE5\xAD\x80",
+ "\xC4\x5D" => "\xE5\xAD\x83",
+ "\xC4\x5E" => "\xE5\xAD\xBD",
+ "\xC4\x5F" => "\xE5\xAF\xB6",
+ "\xC4\x60" => "\xE5\xB7\x89",
+ "\xC4\x61" => "\xE6\x87\xB8",
+ "\xC4\x62" => "\xE6\x87\xBA",
+ "\xC4\x63" => "\xE6\x94\x98",
+ "\xC4\x64" => "\xE6\x94\x94",
+ "\xC4\x65" => "\xE6\x94\x99",
+ "\xC4\x66" => "\xE6\x9B\xA6",
+ "\xC4\x67" => "\xE6\x9C\xA7",
+ "\xC4\x68" => "\xE6\xAB\xAC",
+ "\xC4\x69" => "\xE7\x80\xBE",
+ "\xC4\x6A" => "\xE7\x80\xB0",
+ "\xC4\x6B" => "\xE7\x80\xB2",
+ "\xC4\x6C" => "\xE7\x88\x90",
+ "\xC4\x6D" => "\xE7\x8D\xBB",
+ "\xC4\x6E" => "\xE7\x93\x8F",
+ "\xC4\x6F" => "\xE7\x99\xA2",
+ "\xC4\x70" => "\xE7\x99\xA5",
+ "\xC4\x71" => "\xE7\xA4\xA6",
+ "\xC4\x72" => "\xE7\xA4\xAA",
+ "\xC4\x73" => "\xE7\xA4\xAC",
+ "\xC4\x74" => "\xE7\xA4\xAB",
+ "\xC4\x75" => "\xE7\xAB\x87",
+ "\xC4\x76" => "\xE7\xAB\xB6",
+ "\xC4\x77" => "\xE7\xB1\x8C",
+ "\xC4\x78" => "\xE7\xB1\x83",
+ "\xC4\x79" => "\xE7\xB1\x8D",
+ "\xC4\x7A" => "\xE7\xB3\xAF",
+ "\xC4\x7B" => "\xE7\xB3\xB0",
+ "\xC4\x7C" => "\xE8\xBE\xAE",
+ "\xC4\x7D" => "\xE7\xB9\xBD",
+ "\xC4\x7E" => "\xE7\xB9\xBC",
+ "\xC4\xA1" => "\xE7\xBA\x82",
+ "\xC4\xA2" => "\xE7\xBD\x8C",
+ "\xC4\xA3" => "\xE8\x80\x80",
+ "\xC4\xA4" => "\xE8\x87\x9A",
+ "\xC4\xA5" => "\xE8\x89\xA6",
+ "\xC4\xA6" => "\xE8\x97\xBB",
+ "\xC4\xA7" => "\xE8\x97\xB9",
+ "\xC4\xA8" => "\xE8\x98\x91",
+ "\xC4\xA9" => "\xE8\x97\xBA",
+ "\xC4\xAA" => "\xE8\x98\x86",
+ "\xC4\xAB" => "\xE8\x98\x8B",
+ "\xC4\xAC" => "\xE8\x98\x87",
+ "\xC4\xAD" => "\xE8\x98\x8A",
+ "\xC4\xAE" => "\xE8\xA0\x94",
+ "\xC4\xAF" => "\xE8\xA0\x95",
+ "\xC4\xB0" => "\xE8\xA5\xA4",
+ "\xC4\xB1" => "\xE8\xA6\xBA",
+ "\xC4\xB2" => "\xE8\xA7\xB8",
+ "\xC4\xB3" => "\xE8\xAD\xB0",
+ "\xC4\xB4" => "\xE8\xAD\xAC",
+ "\xC4\xB5" => "\xE8\xAD\xA6",
+ "\xC4\xB6" => "\xE8\xAD\xAF",
+ "\xC4\xB7" => "\xE8\xAD\x9F",
+ "\xC4\xB8" => "\xE8\xAD\xAB",
+ "\xC4\xB9" => "\xE8\xB4\x8F",
+ "\xC4\xBA" => "\xE8\xB4\x8D",
+ "\xC4\xBB" => "\xE8\xBA\x89",
+ "\xC4\xBC" => "\xE8\xBA\x81",
+ "\xC4\xBD" => "\xE8\xBA\x85",
+ "\xC4\xBE" => "\xE8\xBA\x82",
+ "\xC4\xBF" => "\xE9\x86\xB4",
+ "\xC4\xC0" => "\xE9\x87\x8B",
+ "\xC4\xC1" => "\xE9\x90\x98",
+ "\xC4\xC2" => "\xE9\x90\x83",
+ "\xC4\xC3" => "\xE9\x8F\xBD",
+ "\xC4\xC4" => "\xE9\x97\xA1",
+ "\xC4\xC5" => "\xE9\x9C\xB0",
+ "\xC4\xC6" => "\xE9\xA3\x84",
+ "\xC4\xC7" => "\xE9\xA5\x92",
+ "\xC4\xC8" => "\xE9\xA5\x91",
+ "\xC4\xC9" => "\xE9\xA6\xA8",
+ "\xC4\xCA" => "\xE9\xA8\xAB",
+ "\xC4\xCB" => "\xE9\xA8\xB0",
+ "\xC4\xCC" => "\xE9\xA8\xB7",
+ "\xC4\xCD" => "\xE9\xA8\xB5",
+ "\xC4\xCE" => "\xE9\xB0\x93",
+ "\xC4\xCF" => "\xE9\xB0\x8D",
+ "\xC4\xD0" => "\xE9\xB9\xB9",
+ "\xC4\xD1" => "\xE9\xBA\xB5",
+ "\xC4\xD2" => "\xE9\xBB\xA8",
+ "\xC4\xD3" => "\xE9\xBC\xAF",
+ "\xC4\xD4" => "\xE9\xBD\x9F",
+ "\xC4\xD5" => "\xE9\xBD\xA3",
+ "\xC4\xD6" => "\xE9\xBD\xA1",
+ "\xC4\xD7" => "\xE5\x84\xB7",
+ "\xC4\xD8" => "\xE5\x84\xB8",
+ "\xC4\xD9" => "\xE5\x9B\x81",
+ "\xC4\xDA" => "\xE5\x9B\x80",
+ "\xC4\xDB" => "\xE5\x9B\x82",
+ "\xC4\xDC" => "\xE5\xA4\x94",
+ "\xC4\xDD" => "\xE5\xB1\xAC",
+ "\xC4\xDE" => "\xE5\xB7\x8D",
+ "\xC4\xDF" => "\xE6\x87\xBC",
+ "\xC4\xE0" => "\xE6\x87\xBE",
+ "\xC4\xE1" => "\xE6\x94\x9D",
+ "\xC4\xE2" => "\xE6\x94\x9C",
+ "\xC4\xE3" => "\xE6\x96\x95",
+ "\xC4\xE4" => "\xE6\x9B\xA9",
+ "\xC4\xE5" => "\xE6\xAB\xBB",
+ "\xC4\xE6" => "\xE6\xAC\x84",
+ "\xC4\xE7" => "\xE6\xAB\xBA",
+ "\xC4\xE8" => "\xE6\xAE\xB2",
+ "\xC4\xE9" => "\xE7\x81\x8C",
+ "\xC4\xEA" => "\xE7\x88\x9B",
+ "\xC4\xEB" => "\xE7\x8A\xA7",
+ "\xC4\xEC" => "\xE7\x93\x96",
+ "\xC4\xED" => "\xE7\x93\x94",
+ "\xC4\xEE" => "\xE7\x99\xA9",
+ "\xC4\xEF" => "\xE7\x9F\x93",
+ "\xC4\xF0" => "\xE7\xB1\x90",
+ "\xC4\xF1" => "\xE7\xBA\x8F",
+ "\xC4\xF2" => "\xE7\xBA\x8C",
+ "\xC4\xF3" => "\xE7\xBE\xBC",
+ "\xC4\xF4" => "\xE8\x98\x97",
+ "\xC4\xF5" => "\xE8\x98\xAD",
+ "\xC4\xF6" => "\xE8\x98\x9A",
+ "\xC4\xF7" => "\xE8\xA0\xA3",
+ "\xC4\xF8" => "\xE8\xA0\xA2",
+ "\xC4\xF9" => "\xE8\xA0\xA1",
+ "\xC4\xFA" => "\xE8\xA0\x9F",
+ "\xC4\xFB" => "\xE8\xA5\xAA",
+ "\xC4\xFC" => "\xE8\xA5\xAC",
+ "\xC4\xFD" => "\xE8\xA6\xBD",
+ "\xC4\xFE" => "\xE8\xAD\xB4",
+ "\xC5\x40" => "\xE8\xAD\xB7",
+ "\xC5\x41" => "\xE8\xAD\xBD",
+ "\xC5\x42" => "\xE8\xB4\x93",
+ "\xC5\x43" => "\xE8\xBA\x8A",
+ "\xC5\x44" => "\xE8\xBA\x8D",
+ "\xC5\x45" => "\xE8\xBA\x8B",
+ "\xC5\x46" => "\xE8\xBD\x9F",
+ "\xC5\x47" => "\xE8\xBE\xAF",
+ "\xC5\x48" => "\xE9\x86\xBA",
+ "\xC5\x49" => "\xE9\x90\xAE",
+ "\xC5\x4A" => "\xE9\x90\xB3",
+ "\xC5\x4B" => "\xE9\x90\xB5",
+ "\xC5\x4C" => "\xE9\x90\xBA",
+ "\xC5\x4D" => "\xE9\x90\xB8",
+ "\xC5\x4E" => "\xE9\x90\xB2",
+ "\xC5\x4F" => "\xE9\x90\xAB",
+ "\xC5\x50" => "\xE9\x97\xA2",
+ "\xC5\x51" => "\xE9\x9C\xB8",
+ "\xC5\x52" => "\xE9\x9C\xB9",
+ "\xC5\x53" => "\xE9\x9C\xB2",
+ "\xC5\x54" => "\xE9\x9F\xBF",
+ "\xC5\x55" => "\xE9\xA1\xA7",
+ "\xC5\x56" => "\xE9\xA1\xA5",
+ "\xC5\x57" => "\xE9\xA5\x97",
+ "\xC5\x58" => "\xE9\xA9\x85",
+ "\xC5\x59" => "\xE9\xA9\x83",
+ "\xC5\x5A" => "\xE9\xA9\x80",
+ "\xC5\x5B" => "\xE9\xA8\xBE",
+ "\xC5\x5C" => "\xE9\xAB\x8F",
+ "\xC5\x5D" => "\xE9\xAD\x94",
+ "\xC5\x5E" => "\xE9\xAD\x91",
+ "\xC5\x5F" => "\xE9\xB0\xAD",
+ "\xC5\x60" => "\xE9\xB0\xA5",
+ "\xC5\x61" => "\xE9\xB6\xAF",
+ "\xC5\x62" => "\xE9\xB6\xB4",
+ "\xC5\x63" => "\xE9\xB7\x82",
+ "\xC5\x64" => "\xE9\xB6\xB8",
+ "\xC5\x65" => "\xE9\xBA\x9D",
+ "\xC5\x66" => "\xE9\xBB\xAF",
+ "\xC5\x67" => "\xE9\xBC\x99",
+ "\xC5\x68" => "\xE9\xBD\x9C",
+ "\xC5\x69" => "\xE9\xBD\xA6",
+ "\xC5\x6A" => "\xE9\xBD\xA7",
+ "\xC5\x6B" => "\xE5\x84\xBC",
+ "\xC5\x6C" => "\xE5\x84\xBB",
+ "\xC5\x6D" => "\xE5\x9B\x88",
+ "\xC5\x6E" => "\xE5\x9B\x8A",
+ "\xC5\x6F" => "\xE5\x9B\x89",
+ "\xC5\x70" => "\xE5\xAD\xBF",
+ "\xC5\x71" => "\xE5\xB7\x94",
+ "\xC5\x72" => "\xE5\xB7\x92",
+ "\xC5\x73" => "\xE5\xBD\x8E",
+ "\xC5\x74" => "\xE6\x87\xBF",
+ "\xC5\x75" => "\xE6\x94\xA4",
+ "\xC5\x76" => "\xE6\xAC\x8A",
+ "\xC5\x77" => "\xE6\xAD\xA1",
+ "\xC5\x78" => "\xE7\x81\x91",
+ "\xC5\x79" => "\xE7\x81\x98",
+ "\xC5\x7A" => "\xE7\x8E\x80",
+ "\xC5\x7B" => "\xE7\x93\xA4",
+ "\xC5\x7C" => "\xE7\x96\x8A",
+ "\xC5\x7D" => "\xE7\x99\xAE",
+ "\xC5\x7E" => "\xE7\x99\xAC",
+ "\xC5\xA1" => "\xE7\xA6\xB3",
+ "\xC5\xA2" => "\xE7\xB1\xA0",
+ "\xC5\xA3" => "\xE7\xB1\x9F",
+ "\xC5\xA4" => "\xE8\x81\xBE",
+ "\xC5\xA5" => "\xE8\x81\xBD",
+ "\xC5\xA6" => "\xE8\x87\x9F",
+ "\xC5\xA7" => "\xE8\xA5\xB2",
+ "\xC5\xA8" => "\xE8\xA5\xAF",
+ "\xC5\xA9" => "\xE8\xA7\xBC",
+ "\xC5\xAA" => "\xE8\xAE\x80",
+ "\xC5\xAB" => "\xE8\xB4\x96",
+ "\xC5\xAC" => "\xE8\xB4\x97",
+ "\xC5\xAD" => "\xE8\xBA\x91",
+ "\xC5\xAE" => "\xE8\xBA\x93",
+ "\xC5\xAF" => "\xE8\xBD\xA1",
+ "\xC5\xB0" => "\xE9\x85\x88",
+ "\xC5\xB1" => "\xE9\x91\x84",
+ "\xC5\xB2" => "\xE9\x91\x91",
+ "\xC5\xB3" => "\xE9\x91\x92",
+ "\xC5\xB4" => "\xE9\x9C\xBD",
+ "\xC5\xB5" => "\xE9\x9C\xBE",
+ "\xC5\xB6" => "\xE9\x9F\x83",
+ "\xC5\xB7" => "\xE9\x9F\x81",
+ "\xC5\xB8" => "\xE9\xA1\xAB",
+ "\xC5\xB9" => "\xE9\xA5\x95",
+ "\xC5\xBA" => "\xE9\xA9\x95",
+ "\xC5\xBB" => "\xE9\xA9\x8D",
+ "\xC5\xBC" => "\xE9\xAB\x92",
+ "\xC5\xBD" => "\xE9\xAC\x9A",
+ "\xC5\xBE" => "\xE9\xB1\x89",
+ "\xC5\xBF" => "\xE9\xB0\xB1",
+ "\xC5\xC0" => "\xE9\xB0\xBE",
+ "\xC5\xC1" => "\xE9\xB0\xBB",
+ "\xC5\xC2" => "\xE9\xB7\x93",
+ "\xC5\xC3" => "\xE9\xB7\x97",
+ "\xC5\xC4" => "\xE9\xBC\xB4",
+ "\xC5\xC5" => "\xE9\xBD\xAC",
+ "\xC5\xC6" => "\xE9\xBD\xAA",
+ "\xC5\xC7" => "\xE9\xBE\x94",
+ "\xC5\xC8" => "\xE5\x9B\x8C",
+ "\xC5\xC9" => "\xE5\xB7\x96",
+ "\xC5\xCA" => "\xE6\x88\x80",
+ "\xC5\xCB" => "\xE6\x94\xA3",
+ "\xC5\xCC" => "\xE6\x94\xAB",
+ "\xC5\xCD" => "\xE6\x94\xAA",
+ "\xC5\xCE" => "\xE6\x9B\xAC",
+ "\xC5\xCF" => "\xE6\xAC\x90",
+ "\xC5\xD0" => "\xE7\x93\x9A",
+ "\xC5\xD1" => "\xE7\xAB\x8A",
+ "\xC5\xD2" => "\xE7\xB1\xA4",
+ "\xC5\xD3" => "\xE7\xB1\xA3",
+ "\xC5\xD4" => "\xE7\xB1\xA5",
+ "\xC5\xD5" => "\xE7\xBA\x93",
+ "\xC5\xD6" => "\xE7\xBA\x96",
+ "\xC5\xD7" => "\xE7\xBA\x94",
+ "\xC5\xD8" => "\xE8\x87\xA2",
+ "\xC5\xD9" => "\xE8\x98\xB8",
+ "\xC5\xDA" => "\xE8\x98\xBF",
+ "\xC5\xDB" => "\xE8\xA0\xB1",
+ "\xC5\xDC" => "\xE8\xAE\x8A",
+ "\xC5\xDD" => "\xE9\x82\x90",
+ "\xC5\xDE" => "\xE9\x82\x8F",
+ "\xC5\xDF" => "\xE9\x91\xA3",
+ "\xC5\xE0" => "\xE9\x91\xA0",
+ "\xC5\xE1" => "\xE9\x91\xA4",
+ "\xC5\xE2" => "\xE9\x9D\xA8",
+ "\xC5\xE3" => "\xE9\xA1\xAF",
+ "\xC5\xE4" => "\xE9\xA5\x9C",
+ "\xC5\xE5" => "\xE9\xA9\x9A",
+ "\xC5\xE6" => "\xE9\xA9\x9B",
+ "\xC5\xE7" => "\xE9\xA9\x97",
+ "\xC5\xE8" => "\xE9\xAB\x93",
+ "\xC5\xE9" => "\xE9\xAB\x94",
+ "\xC5\xEA" => "\xE9\xAB\x91",
+ "\xC5\xEB" => "\xE9\xB1\x94",
+ "\xC5\xEC" => "\xE9\xB1\x97",
+ "\xC5\xED" => "\xE9\xB1\x96",
+ "\xC5\xEE" => "\xE9\xB7\xA5",
+ "\xC5\xEF" => "\xE9\xBA\x9F",
+ "\xC5\xF0" => "\xE9\xBB\xB4",
+ "\xC5\xF1" => "\xE5\x9B\x91",
+ "\xC5\xF2" => "\xE5\xA3\xA9",
+ "\xC5\xF3" => "\xE6\x94\xAC",
+ "\xC5\xF4" => "\xE7\x81\x9E",
+ "\xC5\xF5" => "\xE7\x99\xB1",
+ "\xC5\xF6" => "\xE7\x99\xB2",
+ "\xC5\xF7" => "\xE7\x9F\x97",
+ "\xC5\xF8" => "\xE7\xBD\x90",
+ "\xC5\xF9" => "\xE7\xBE\x88",
+ "\xC5\xFA" => "\xE8\xA0\xB6",
+ "\xC5\xFB" => "\xE8\xA0\xB9",
+ "\xC5\xFC" => "\xE8\xA1\xA2",
+ "\xC5\xFD" => "\xE8\xAE\x93",
+ "\xC5\xFE" => "\xE8\xAE\x92",
+ "\xC6\x40" => "\xE8\xAE\x96",
+ "\xC6\x41" => "\xE8\x89\xB7",
+ "\xC6\x42" => "\xE8\xB4\x9B",
+ "\xC6\x43" => "\xE9\x87\x80",
+ "\xC6\x44" => "\xE9\x91\xAA",
+ "\xC6\x45" => "\xE9\x9D\x82",
+ "\xC6\x46" => "\xE9\x9D\x88",
+ "\xC6\x47" => "\xE9\x9D\x84",
+ "\xC6\x48" => "\xE9\x9F\x86",
+ "\xC6\x49" => "\xE9\xA1\xB0",
+ "\xC6\x4A" => "\xE9\xA9\x9F",
+ "\xC6\x4B" => "\xE9\xAC\xA2",
+ "\xC6\x4C" => "\xE9\xAD\x98",
+ "\xC6\x4D" => "\xE9\xB1\x9F",
+ "\xC6\x4E" => "\xE9\xB7\xB9",
+ "\xC6\x4F" => "\xE9\xB7\xBA",
+ "\xC6\x50" => "\xE9\xB9\xBC",
+ "\xC6\x51" => "\xE9\xB9\xBD",
+ "\xC6\x52" => "\xE9\xBC\x87",
+ "\xC6\x53" => "\xE9\xBD\xB7",
+ "\xC6\x54" => "\xE9\xBD\xB2",
+ "\xC6\x55" => "\xE5\xBB\xB3",
+ "\xC6\x56" => "\xE6\xAC\x96",
+ "\xC6\x57" => "\xE7\x81\xA3",
+ "\xC6\x58" => "\xE7\xB1\xAC",
+ "\xC6\x59" => "\xE7\xB1\xAE",
+ "\xC6\x5A" => "\xE8\xA0\xBB",
+ "\xC6\x5B" => "\xE8\xA7\x80",
+ "\xC6\x5C" => "\xE8\xBA\xA1",
+ "\xC6\x5D" => "\xE9\x87\x81",
+ "\xC6\x5E" => "\xE9\x91\xB2",
+ "\xC6\x5F" => "\xE9\x91\xB0",
+ "\xC6\x60" => "\xE9\xA1\xB1",
+ "\xC6\x61" => "\xE9\xA5\x9E",
+ "\xC6\x62" => "\xE9\xAB\x96",
+ "\xC6\x63" => "\xE9\xAC\xA3",
+ "\xC6\x64" => "\xE9\xBB\x8C",
+ "\xC6\x65" => "\xE7\x81\xA4",
+ "\xC6\x66" => "\xE7\x9F\x9A",
+ "\xC6\x67" => "\xE8\xAE\x9A",
+ "\xC6\x68" => "\xE9\x91\xB7",
+ "\xC6\x69" => "\xE9\x9F\x89",
+ "\xC6\x6A" => "\xE9\xA9\xA2",
+ "\xC6\x6B" => "\xE9\xA9\xA5",
+ "\xC6\x6C" => "\xE7\xBA\x9C",
+ "\xC6\x6D" => "\xE8\xAE\x9C",
+ "\xC6\x6E" => "\xE8\xBA\xAA",
+ "\xC6\x6F" => "\xE9\x87\x85",
+ "\xC6\x70" => "\xE9\x91\xBD",
+ "\xC6\x71" => "\xE9\x91\xBE",
+ "\xC6\x72" => "\xE9\x91\xBC",
+ "\xC6\x73" => "\xE9\xB1\xB7",
+ "\xC6\x74" => "\xE9\xB1\xB8",
+ "\xC6\x75" => "\xE9\xBB\xB7",
+ "\xC6\x76" => "\xE8\xB1\x94",
+ "\xC6\x77" => "\xE9\x91\xBF",
+ "\xC6\x78" => "\xE9\xB8\x9A",
+ "\xC6\x79" => "\xE7\x88\xA8",
+ "\xC6\x7A" => "\xE9\xA9\xAA",
+ "\xC6\x7B" => "\xE9\xAC\xB1",
+ "\xC6\x7C" => "\xE9\xB8\x9B",
+ "\xC6\x7D" => "\xE9\xB8\x9E",
+ "\xC6\x7E" => "\xE7\xB1\xB2",
+ "\xC6\xA1" => "\xE3\x83\xBE",
+ "\xC6\xA2" => "\xE3\x82\x9D",
+ "\xC6\xA3" => "\xE3\x82\x9E",
+ "\xC6\xA4" => "\xE3\x80\x85",
+ "\xC6\xA5" => "\xE3\x81\x81",
+ "\xC6\xA6" => "\xE3\x81\x82",
+ "\xC6\xA7" => "\xE3\x81\x83",
+ "\xC6\xA8" => "\xE3\x81\x84",
+ "\xC6\xA9" => "\xE3\x81\x85",
+ "\xC6\xAA" => "\xE3\x81\x86",
+ "\xC6\xAB" => "\xE3\x81\x87",
+ "\xC6\xAC" => "\xE3\x81\x88",
+ "\xC6\xAD" => "\xE3\x81\x89",
+ "\xC6\xAE" => "\xE3\x81\x8A",
+ "\xC6\xAF" => "\xE3\x81\x8B",
+ "\xC6\xB0" => "\xE3\x81\x8C",
+ "\xC6\xB1" => "\xE3\x81\x8D",
+ "\xC6\xB2" => "\xE3\x81\x8E",
+ "\xC6\xB3" => "\xE3\x81\x8F",
+ "\xC6\xB4" => "\xE3\x81\x90",
+ "\xC6\xB5" => "\xE3\x81\x91",
+ "\xC6\xB6" => "\xE3\x81\x92",
+ "\xC6\xB7" => "\xE3\x81\x93",
+ "\xC6\xB8" => "\xE3\x81\x94",
+ "\xC6\xB9" => "\xE3\x81\x95",
+ "\xC6\xBA" => "\xE3\x81\x96",
+ "\xC6\xBB" => "\xE3\x81\x97",
+ "\xC6\xBC" => "\xE3\x81\x98",
+ "\xC6\xBD" => "\xE3\x81\x99",
+ "\xC6\xBE" => "\xE3\x81\x9A",
+ "\xC6\xBF" => "\xE3\x81\x9B",
+ "\xC6\xC0" => "\xE3\x81\x9C",
+ "\xC6\xC1" => "\xE3\x81\x9D",
+ "\xC6\xC2" => "\xE3\x81\x9E",
+ "\xC6\xC3" => "\xE3\x81\x9F",
+ "\xC6\xC4" => "\xE3\x81\xA0",
+ "\xC6\xC5" => "\xE3\x81\xA1",
+ "\xC6\xC6" => "\xE3\x81\xA2",
+ "\xC6\xC7" => "\xE3\x81\xA3",
+ "\xC6\xC8" => "\xE3\x81\xA4",
+ "\xC6\xC9" => "\xE3\x81\xA5",
+ "\xC6\xCA" => "\xE3\x81\xA6",
+ "\xC6\xCB" => "\xE3\x81\xA7",
+ "\xC6\xCC" => "\xE3\x81\xA8",
+ "\xC6\xCD" => "\xE3\x81\xA9",
+ "\xC6\xCE" => "\xE3\x81\xAA",
+ "\xC6\xCF" => "\xE3\x81\xAB",
+ "\xC6\xD0" => "\xE3\x81\xAC",
+ "\xC6\xD1" => "\xE3\x81\xAD",
+ "\xC6\xD2" => "\xE3\x81\xAE",
+ "\xC6\xD3" => "\xE3\x81\xAF",
+ "\xC6\xD4" => "\xE3\x81\xB0",
+ "\xC6\xD5" => "\xE3\x81\xB1",
+ "\xC6\xD6" => "\xE3\x81\xB2",
+ "\xC6\xD7" => "\xE3\x81\xB3",
+ "\xC6\xD8" => "\xE3\x81\xB4",
+ "\xC6\xD9" => "\xE3\x81\xB5",
+ "\xC6\xDA" => "\xE3\x81\xB6",
+ "\xC6\xDB" => "\xE3\x81\xB7",
+ "\xC6\xDC" => "\xE3\x81\xB8",
+ "\xC6\xDD" => "\xE3\x81\xB9",
+ "\xC6\xDE" => "\xE3\x81\xBA",
+ "\xC6\xDF" => "\xE3\x81\xBB",
+ "\xC6\xE0" => "\xE3\x81\xBC",
+ "\xC6\xE1" => "\xE3\x81\xBD",
+ "\xC6\xE2" => "\xE3\x81\xBE",
+ "\xC6\xE3" => "\xE3\x81\xBF",
+ "\xC6\xE4" => "\xE3\x82\x80",
+ "\xC6\xE5" => "\xE3\x82\x81",
+ "\xC6\xE6" => "\xE3\x82\x82",
+ "\xC6\xE7" => "\xE3\x82\x83",
+ "\xC6\xE8" => "\xE3\x82\x84",
+ "\xC6\xE9" => "\xE3\x82\x85",
+ "\xC6\xEA" => "\xE3\x82\x86",
+ "\xC6\xEB" => "\xE3\x82\x87",
+ "\xC6\xEC" => "\xE3\x82\x88",
+ "\xC6\xED" => "\xE3\x82\x89",
+ "\xC6\xEE" => "\xE3\x82\x8A",
+ "\xC6\xEF" => "\xE3\x82\x8B",
+ "\xC6\xF0" => "\xE3\x82\x8C",
+ "\xC6\xF1" => "\xE3\x82\x8D",
+ "\xC6\xF2" => "\xE3\x82\x8E",
+ "\xC6\xF3" => "\xE3\x82\x8F",
+ "\xC6\xF4" => "\xE3\x82\x90",
+ "\xC6\xF5" => "\xE3\x82\x91",
+ "\xC6\xF6" => "\xE3\x82\x92",
+ "\xC6\xF7" => "\xE3\x82\x93",
+ "\xC6\xF8" => "\xE3\x82\xA1",
+ "\xC6\xF9" => "\xE3\x82\xA2",
+ "\xC6\xFA" => "\xE3\x82\xA3",
+ "\xC6\xFB" => "\xE3\x82\xA4",
+ "\xC6\xFC" => "\xE3\x82\xA5",
+ "\xC6\xFD" => "\xE3\x82\xA6",
+ "\xC6\xFE" => "\xE3\x82\xA7",
+ "\xC7\x40" => "\xE3\x82\xA8",
+ "\xC7\x41" => "\xE3\x82\xA9",
+ "\xC7\x42" => "\xE3\x82\xAA",
+ "\xC7\x43" => "\xE3\x82\xAB",
+ "\xC7\x44" => "\xE3\x82\xAC",
+ "\xC7\x45" => "\xE3\x82\xAD",
+ "\xC7\x46" => "\xE3\x82\xAE",
+ "\xC7\x47" => "\xE3\x82\xAF",
+ "\xC7\x48" => "\xE3\x82\xB0",
+ "\xC7\x49" => "\xE3\x82\xB1",
+ "\xC7\x4A" => "\xE3\x82\xB2",
+ "\xC7\x4B" => "\xE3\x82\xB3",
+ "\xC7\x4C" => "\xE3\x82\xB4",
+ "\xC7\x4D" => "\xE3\x82\xB5",
+ "\xC7\x4E" => "\xE3\x82\xB6",
+ "\xC7\x4F" => "\xE3\x82\xB7",
+ "\xC7\x50" => "\xE3\x82\xB8",
+ "\xC7\x51" => "\xE3\x82\xB9",
+ "\xC7\x52" => "\xE3\x82\xBA",
+ "\xC7\x53" => "\xE3\x82\xBB",
+ "\xC7\x54" => "\xE3\x82\xBC",
+ "\xC7\x55" => "\xE3\x82\xBD",
+ "\xC7\x56" => "\xE3\x82\xBE",
+ "\xC7\x57" => "\xE3\x82\xBF",
+ "\xC7\x58" => "\xE3\x83\x80",
+ "\xC7\x59" => "\xE3\x83\x81",
+ "\xC7\x5A" => "\xE3\x83\x82",
+ "\xC7\x5B" => "\xE3\x83\x83",
+ "\xC7\x5C" => "\xE3\x83\x84",
+ "\xC7\x5D" => "\xE3\x83\x85",
+ "\xC7\x5E" => "\xE3\x83\x86",
+ "\xC7\x5F" => "\xE3\x83\x87",
+ "\xC7\x60" => "\xE3\x83\x88",
+ "\xC7\x61" => "\xE3\x83\x89",
+ "\xC7\x62" => "\xE3\x83\x8A",
+ "\xC7\x63" => "\xE3\x83\x8B",
+ "\xC7\x64" => "\xE3\x83\x8C",
+ "\xC7\x65" => "\xE3\x83\x8D",
+ "\xC7\x66" => "\xE3\x83\x8E",
+ "\xC7\x67" => "\xE3\x83\x8F",
+ "\xC7\x68" => "\xE3\x83\x90",
+ "\xC7\x69" => "\xE3\x83\x91",
+ "\xC7\x6A" => "\xE3\x83\x92",
+ "\xC7\x6B" => "\xE3\x83\x93",
+ "\xC7\x6C" => "\xE3\x83\x94",
+ "\xC7\x6D" => "\xE3\x83\x95",
+ "\xC7\x6E" => "\xE3\x83\x96",
+ "\xC7\x6F" => "\xE3\x83\x97",
+ "\xC7\x70" => "\xE3\x83\x98",
+ "\xC7\x71" => "\xE3\x83\x99",
+ "\xC7\x72" => "\xE3\x83\x9A",
+ "\xC7\x73" => "\xE3\x83\x9B",
+ "\xC7\x74" => "\xE3\x83\x9C",
+ "\xC7\x75" => "\xE3\x83\x9D",
+ "\xC7\x76" => "\xE3\x83\x9E",
+ "\xC7\x77" => "\xE3\x83\x9F",
+ "\xC7\x78" => "\xE3\x83\xA0",
+ "\xC7\x79" => "\xE3\x83\xA1",
+ "\xC7\x7A" => "\xE3\x83\xA2",
+ "\xC7\x7B" => "\xE3\x83\xA3",
+ "\xC7\x7C" => "\xE3\x83\xA4",
+ "\xC7\x7D" => "\xE3\x83\xA5",
+ "\xC7\x7E" => "\xE3\x83\xA6",
+ "\xC7\xA1" => "\xE3\x83\xA7",
+ "\xC7\xA2" => "\xE3\x83\xA8",
+ "\xC7\xA3" => "\xE3\x83\xA9",
+ "\xC7\xA4" => "\xE3\x83\xAA",
+ "\xC7\xA5" => "\xE3\x83\xAB",
+ "\xC7\xA6" => "\xE3\x83\xAC",
+ "\xC7\xA7" => "\xE3\x83\xAD",
+ "\xC7\xA8" => "\xE3\x83\xAE",
+ "\xC7\xA9" => "\xE3\x83\xAF",
+ "\xC7\xAA" => "\xE3\x83\xB0",
+ "\xC7\xAB" => "\xE3\x83\xB1",
+ "\xC7\xAC" => "\xE3\x83\xB2",
+ "\xC7\xAD" => "\xE3\x83\xB3",
+ "\xC7\xAE" => "\xE3\x83\xB4",
+ "\xC7\xAF" => "\xE3\x83\xB5",
+ "\xC7\xB0" => "\xE3\x83\xB6",
+ "\xC7\xB1" => "\xD0\x94",
+ "\xC7\xB2" => "\xD0\x95",
+ "\xC7\xB3" => "\xD0\x81",
+ "\xC7\xB4" => "\xD0\x96",
+ "\xC7\xB5" => "\xD0\x97",
+ "\xC7\xB6" => "\xD0\x98",
+ "\xC7\xB7" => "\xD0\x99",
+ "\xC7\xB8" => "\xD0\x9A",
+ "\xC7\xB9" => "\xD0\x9B",
+ "\xC7\xBA" => "\xD0\x9C",
+ "\xC7\xBB" => "\xD0\xA3",
+ "\xC7\xBC" => "\xD0\xA4",
+ "\xC7\xBD" => "\xD0\xA5",
+ "\xC7\xBE" => "\xD0\xA6",
+ "\xC7\xBF" => "\xD0\xA7",
+ "\xC7\xC0" => "\xD0\xA8",
+ "\xC7\xC1" => "\xD0\xA9",
+ "\xC7\xC2" => "\xD0\xAA",
+ "\xC7\xC3" => "\xD0\xAB",
+ "\xC7\xC4" => "\xD0\xAC",
+ "\xC7\xC5" => "\xD0\xAD",
+ "\xC7\xC6" => "\xD0\xAE",
+ "\xC7\xC7" => "\xD0\xAF",
+ "\xC7\xC8" => "\xD0\xB0",
+ "\xC7\xC9" => "\xD0\xB1",
+ "\xC7\xCA" => "\xD0\xB2",
+ "\xC7\xCB" => "\xD0\xB3",
+ "\xC7\xCC" => "\xD0\xB4",
+ "\xC7\xCD" => "\xD0\xB5",
+ "\xC7\xCE" => "\xD1\x91",
+ "\xC7\xCF" => "\xD0\xB6",
+ "\xC7\xD0" => "\xD0\xB7",
+ "\xC7\xD1" => "\xD0\xB8",
+ "\xC7\xD2" => "\xD0\xB9",
+ "\xC7\xD3" => "\xD0\xBA",
+ "\xC7\xD4" => "\xD0\xBB",
+ "\xC7\xD5" => "\xD0\xBC",
+ "\xC7\xD6" => "\xD0\xBD",
+ "\xC7\xD7" => "\xD0\xBE",
+ "\xC7\xD8" => "\xD0\xBF",
+ "\xC7\xD9" => "\xD1\x80",
+ "\xC7\xDA" => "\xD1\x81",
+ "\xC7\xDB" => "\xD1\x82",
+ "\xC7\xDC" => "\xD1\x83",
+ "\xC7\xDD" => "\xD1\x84",
+ "\xC7\xDE" => "\xD1\x85",
+ "\xC7\xDF" => "\xD1\x86",
+ "\xC7\xE0" => "\xD1\x87",
+ "\xC7\xE1" => "\xD1\x88",
+ "\xC7\xE2" => "\xD1\x89",
+ "\xC7\xE3" => "\xD1\x8A",
+ "\xC7\xE4" => "\xD1\x8B",
+ "\xC7\xE5" => "\xD1\x8C",
+ "\xC7\xE6" => "\xD1\x8D",
+ "\xC7\xE7" => "\xD1\x8E",
+ "\xC7\xE8" => "\xD1\x8F",
+ "\xC7\xE9" => "\xE2\x91\xA0",
+ "\xC7\xEA" => "\xE2\x91\xA1",
+ "\xC7\xEB" => "\xE2\x91\xA2",
+ "\xC7\xEC" => "\xE2\x91\xA3",
+ "\xC7\xED" => "\xE2\x91\xA4",
+ "\xC7\xEE" => "\xE2\x91\xA5",
+ "\xC7\xEF" => "\xE2\x91\xA6",
+ "\xC7\xF0" => "\xE2\x91\xA7",
+ "\xC7\xF1" => "\xE2\x91\xA8",
+ "\xC7\xF2" => "\xE2\x91\xA9",
+ "\xC7\xF3" => "\xE2\x91\xB4",
+ "\xC7\xF4" => "\xE2\x91\xB5",
+ "\xC7\xF5" => "\xE2\x91\xB6",
+ "\xC7\xF6" => "\xE2\x91\xB7",
+ "\xC7\xF7" => "\xE2\x91\xB8",
+ "\xC7\xF8" => "\xE2\x91\xB9",
+ "\xC7\xF9" => "\xE2\x91\xBA",
+ "\xC7\xFA" => "\xE2\x91\xBB",
+ "\xC7\xFB" => "\xE2\x91\xBC",
+ "\xC7\xFC" => "\xE2\x91\xBD",
+ "\xC9\x40" => "\xE4\xB9\x82",
+ "\xC9\x41" => "\xE4\xB9\x9C",
+ "\xC9\x42" => "\xE5\x87\xB5",
+ "\xC9\x43" => "\xE5\x8C\x9A",
+ "\xC9\x44" => "\xE5\x8E\x82",
+ "\xC9\x45" => "\xE4\xB8\x87",
+ "\xC9\x46" => "\xE4\xB8\x8C",
+ "\xC9\x47" => "\xE4\xB9\x87",
+ "\xC9\x48" => "\xE4\xBA\x8D",
+ "\xC9\x49" => "\xE5\x9B\x97",
+ "\xC9\x4A" => "\xEF\xA8\x8C",
+ "\xC9\x4B" => "\xE5\xB1\xAE",
+ "\xC9\x4C" => "\xE5\xBD\xB3",
+ "\xC9\x4D" => "\xE4\xB8\x8F",
+ "\xC9\x4E" => "\xE5\x86\x87",
+ "\xC9\x4F" => "\xE4\xB8\x8E",
+ "\xC9\x50" => "\xE4\xB8\xAE",
+ "\xC9\x51" => "\xE4\xBA\x93",
+ "\xC9\x52" => "\xE4\xBB\x82",
+ "\xC9\x53" => "\xE4\xBB\x89",
+ "\xC9\x54" => "\xE4\xBB\x88",
+ "\xC9\x55" => "\xE5\x86\x98",
+ "\xC9\x56" => "\xE5\x8B\xBC",
+ "\xC9\x57" => "\xE5\x8D\xAC",
+ "\xC9\x58" => "\xE5\x8E\xB9",
+ "\xC9\x59" => "\xE5\x9C\xA0",
+ "\xC9\x5A" => "\xE5\xA4\x83",
+ "\xC9\x5B" => "\xE5\xA4\xAC",
+ "\xC9\x5C" => "\xE5\xB0\x90",
+ "\xC9\x5D" => "\xE5\xB7\xBF",
+ "\xC9\x5E" => "\xE6\x97\xA1",
+ "\xC9\x5F" => "\xE6\xAE\xB3",
+ "\xC9\x60" => "\xE6\xAF\x8C",
+ "\xC9\x61" => "\xE6\xB0\x94",
+ "\xC9\x62" => "\xE7\x88\xBF",
+ "\xC9\x63" => "\xE4\xB8\xB1",
+ "\xC9\x64" => "\xE4\xB8\xBC",
+ "\xC9\x65" => "\xE4\xBB\xA8",
+ "\xC9\x66" => "\xE4\xBB\x9C",
+ "\xC9\x67" => "\xE4\xBB\xA9",
+ "\xC9\x68" => "\xE4\xBB\xA1",
+ "\xC9\x69" => "\xE4\xBB\x9D",
+ "\xC9\x6A" => "\xE4\xBB\x9A",
+ "\xC9\x6B" => "\xE5\x88\x8C",
+ "\xC9\x6C" => "\xE5\x8C\x9C",
+ "\xC9\x6D" => "\xE5\x8D\x8C",
+ "\xC9\x6E" => "\xE5\x9C\xA2",
+ "\xC9\x6F" => "\xE5\x9C\xA3",
+ "\xC9\x70" => "\xE5\xA4\x97",
+ "\xC9\x71" => "\xE5\xA4\xAF",
+ "\xC9\x72" => "\xE5\xAE\x81",
+ "\xC9\x73" => "\xE5\xAE\x84",
+ "\xC9\x74" => "\xE5\xB0\x92",
+ "\xC9\x75" => "\xE5\xB0\xBB",
+ "\xC9\x76" => "\xE5\xB1\xB4",
+ "\xC9\x77" => "\xE5\xB1\xB3",
+ "\xC9\x78" => "\xE5\xB8\x84",
+ "\xC9\x79" => "\xE5\xBA\x80",
+ "\xC9\x7A" => "\xE5\xBA\x82",
+ "\xC9\x7B" => "\xE5\xBF\x89",
+ "\xC9\x7C" => "\xE6\x88\x89",
+ "\xC9\x7D" => "\xE6\x89\x90",
+ "\xC9\x7E" => "\xE6\xB0\x95",
+ "\xC9\xA1" => "\xE6\xB0\xB6",
+ "\xC9\xA2" => "\xE6\xB1\x83",
+ "\xC9\xA3" => "\xE6\xB0\xBF",
+ "\xC9\xA4" => "\xE6\xB0\xBB",
+ "\xC9\xA5" => "\xE7\x8A\xAE",
+ "\xC9\xA6" => "\xE7\x8A\xB0",
+ "\xC9\xA7" => "\xE7\x8E\x8A",
+ "\xC9\xA8" => "\xE7\xA6\xB8",
+ "\xC9\xA9" => "\xE8\x82\x8A",
+ "\xC9\xAA" => "\xE9\x98\x9E",
+ "\xC9\xAB" => "\xE4\xBC\x8E",
+ "\xC9\xAC" => "\xE4\xBC\x98",
+ "\xC9\xAD" => "\xE4\xBC\xAC",
+ "\xC9\xAE" => "\xE4\xBB\xB5",
+ "\xC9\xAF" => "\xE4\xBC\x94",
+ "\xC9\xB0" => "\xE4\xBB\xB1",
+ "\xC9\xB1" => "\xE4\xBC\x80",
+ "\xC9\xB2" => "\xE4\xBB\xB7",
+ "\xC9\xB3" => "\xE4\xBC\x88",
+ "\xC9\xB4" => "\xE4\xBC\x9D",
+ "\xC9\xB5" => "\xE4\xBC\x82",
+ "\xC9\xB6" => "\xE4\xBC\x85",
+ "\xC9\xB7" => "\xE4\xBC\xA2",
+ "\xC9\xB8" => "\xE4\xBC\x93",
+ "\xC9\xB9" => "\xE4\xBC\x84",
+ "\xC9\xBA" => "\xE4\xBB\xB4",
+ "\xC9\xBB" => "\xE4\xBC\x92",
+ "\xC9\xBC" => "\xE5\x86\xB1",
+ "\xC9\xBD" => "\xE5\x88\x93",
+ "\xC9\xBE" => "\xE5\x88\x89",
+ "\xC9\xBF" => "\xE5\x88\x90",
+ "\xC9\xC0" => "\xE5\x8A\xA6",
+ "\xC9\xC1" => "\xE5\x8C\xA2",
+ "\xC9\xC2" => "\xE5\x8C\x9F",
+ "\xC9\xC3" => "\xE5\x8D\x8D",
+ "\xC9\xC4" => "\xE5\x8E\x8A",
+ "\xC9\xC5" => "\xE5\x90\x87",
+ "\xC9\xC6" => "\xE5\x9B\xA1",
+ "\xC9\xC7" => "\xE5\x9B\x9F",
+ "\xC9\xC8" => "\xE5\x9C\xAE",
+ "\xC9\xC9" => "\xE5\x9C\xAA",
+ "\xC9\xCA" => "\xE5\x9C\xB4",
+ "\xC9\xCB" => "\xE5\xA4\xBC",
+ "\xC9\xCC" => "\xE5\xA6\x80",
+ "\xC9\xCD" => "\xE5\xA5\xBC",
+ "\xC9\xCE" => "\xE5\xA6\x85",
+ "\xC9\xCF" => "\xE5\xA5\xBB",
+ "\xC9\xD0" => "\xE5\xA5\xBE",
+ "\xC9\xD1" => "\xE5\xA5\xB7",
+ "\xC9\xD2" => "\xE5\xA5\xBF",
+ "\xC9\xD3" => "\xE5\xAD\x96",
+ "\xC9\xD4" => "\xE5\xB0\x95",
+ "\xC9\xD5" => "\xE5\xB0\xA5",
+ "\xC9\xD6" => "\xE5\xB1\xBC",
+ "\xC9\xD7" => "\xE5\xB1\xBA",
+ "\xC9\xD8" => "\xE5\xB1\xBB",
+ "\xC9\xD9" => "\xE5\xB1\xBE",
+ "\xC9\xDA" => "\xE5\xB7\x9F",
+ "\xC9\xDB" => "\xE5\xB9\xB5",
+ "\xC9\xDC" => "\xE5\xBA\x84",
+ "\xC9\xDD" => "\xE5\xBC\x82",
+ "\xC9\xDE" => "\xE5\xBC\x9A",
+ "\xC9\xDF" => "\xE5\xBD\xB4",
+ "\xC9\xE0" => "\xE5\xBF\x95",
+ "\xC9\xE1" => "\xE5\xBF\x94",
+ "\xC9\xE2" => "\xE5\xBF\x8F",
+ "\xC9\xE3" => "\xE6\x89\x9C",
+ "\xC9\xE4" => "\xE6\x89\x9E",
+ "\xC9\xE5" => "\xE6\x89\xA4",
+ "\xC9\xE6" => "\xE6\x89\xA1",
+ "\xC9\xE7" => "\xE6\x89\xA6",
+ "\xC9\xE8" => "\xE6\x89\xA2",
+ "\xC9\xE9" => "\xE6\x89\x99",
+ "\xC9\xEA" => "\xE6\x89\xA0",
+ "\xC9\xEB" => "\xE6\x89\x9A",
+ "\xC9\xEC" => "\xE6\x89\xA5",
+ "\xC9\xED" => "\xE6\x97\xAF",
+ "\xC9\xEE" => "\xE6\x97\xAE",
+ "\xC9\xEF" => "\xE6\x9C\xBE",
+ "\xC9\xF0" => "\xE6\x9C\xB9",
+ "\xC9\xF1" => "\xE6\x9C\xB8",
+ "\xC9\xF2" => "\xE6\x9C\xBB",
+ "\xC9\xF3" => "\xE6\x9C\xBA",
+ "\xC9\xF4" => "\xE6\x9C\xBF",
+ "\xC9\xF5" => "\xE6\x9C\xBC",
+ "\xC9\xF6" => "\xE6\x9C\xB3",
+ "\xC9\xF7" => "\xE6\xB0\x98",
+ "\xC9\xF8" => "\xE6\xB1\x86",
+ "\xC9\xF9" => "\xE6\xB1\x92",
+ "\xC9\xFA" => "\xE6\xB1\x9C",
+ "\xC9\xFB" => "\xE6\xB1\x8F",
+ "\xC9\xFC" => "\xE6\xB1\x8A",
+ "\xC9\xFD" => "\xE6\xB1\x94",
+ "\xC9\xFE" => "\xE6\xB1\x8B",
+ "\xCA\x40" => "\xE6\xB1\x8C",
+ "\xCA\x41" => "\xE7\x81\xB1",
+ "\xCA\x42" => "\xE7\x89\x9E",
+ "\xCA\x43" => "\xE7\x8A\xB4",
+ "\xCA\x44" => "\xE7\x8A\xB5",
+ "\xCA\x45" => "\xE7\x8E\x8E",
+ "\xCA\x46" => "\xE7\x94\xAA",
+ "\xCA\x47" => "\xE7\x99\xBF",
+ "\xCA\x48" => "\xE7\xA9\xB5",
+ "\xCA\x49" => "\xE7\xBD\x91",
+ "\xCA\x4A" => "\xE8\x89\xB8",
+ "\xCA\x4B" => "\xE8\x89\xBC",
+ "\xCA\x4C" => "\xE8\x8A\x80",
+ "\xCA\x4D" => "\xE8\x89\xBD",
+ "\xCA\x4E" => "\xE8\x89\xBF",
+ "\xCA\x4F" => "\xE8\x99\x8D",
+ "\xCA\x50" => "\xE8\xA5\xBE",
+ "\xCA\x51" => "\xE9\x82\x99",
+ "\xCA\x52" => "\xE9\x82\x97",
+ "\xCA\x53" => "\xE9\x82\x98",
+ "\xCA\x54" => "\xE9\x82\x9B",
+ "\xCA\x55" => "\xE9\x82\x94",
+ "\xCA\x56" => "\xE9\x98\xA2",
+ "\xCA\x57" => "\xE9\x98\xA4",
+ "\xCA\x58" => "\xE9\x98\xA0",
+ "\xCA\x59" => "\xE9\x98\xA3",
+ "\xCA\x5A" => "\xE4\xBD\x96",
+ "\xCA\x5B" => "\xE4\xBC\xBB",
+ "\xCA\x5C" => "\xE4\xBD\xA2",
+ "\xCA\x5D" => "\xE4\xBD\x89",
+ "\xCA\x5E" => "\xE4\xBD\x93",
+ "\xCA\x5F" => "\xE4\xBD\xA4",
+ "\xCA\x60" => "\xE4\xBC\xBE",
+ "\xCA\x61" => "\xE4\xBD\xA7",
+ "\xCA\x62" => "\xE4\xBD\x92",
+ "\xCA\x63" => "\xE4\xBD\x9F",
+ "\xCA\x64" => "\xE4\xBD\x81",
+ "\xCA\x65" => "\xE4\xBD\x98",
+ "\xCA\x66" => "\xE4\xBC\xAD",
+ "\xCA\x67" => "\xE4\xBC\xB3",
+ "\xCA\x68" => "\xE4\xBC\xBF",
+ "\xCA\x69" => "\xE4\xBD\xA1",
+ "\xCA\x6A" => "\xE5\x86\x8F",
+ "\xCA\x6B" => "\xE5\x86\xB9",
+ "\xCA\x6C" => "\xE5\x88\x9C",
+ "\xCA\x6D" => "\xE5\x88\x9E",
+ "\xCA\x6E" => "\xE5\x88\xA1",
+ "\xCA\x6F" => "\xE5\x8A\xAD",
+ "\xCA\x70" => "\xE5\x8A\xAE",
+ "\xCA\x71" => "\xE5\x8C\x89",
+ "\xCA\x72" => "\xE5\x8D\xA3",
+ "\xCA\x73" => "\xE5\x8D\xB2",
+ "\xCA\x74" => "\xE5\x8E\x8E",
+ "\xCA\x75" => "\xE5\x8E\x8F",
+ "\xCA\x76" => "\xE5\x90\xB0",
+ "\xCA\x77" => "\xE5\x90\xB7",
+ "\xCA\x78" => "\xE5\x90\xAA",
+ "\xCA\x79" => "\xE5\x91\x94",
+ "\xCA\x7A" => "\xE5\x91\x85",
+ "\xCA\x7B" => "\xE5\x90\x99",
+ "\xCA\x7C" => "\xE5\x90\x9C",
+ "\xCA\x7D" => "\xE5\x90\xA5",
+ "\xCA\x7E" => "\xE5\x90\x98",
+ "\xCA\xA1" => "\xE5\x90\xBD",
+ "\xCA\xA2" => "\xE5\x91\x8F",
+ "\xCA\xA3" => "\xE5\x91\x81",
+ "\xCA\xA4" => "\xE5\x90\xA8",
+ "\xCA\xA5" => "\xE5\x90\xA4",
+ "\xCA\xA6" => "\xE5\x91\x87",
+ "\xCA\xA7" => "\xE5\x9B\xAE",
+ "\xCA\xA8" => "\xE5\x9B\xA7",
+ "\xCA\xA9" => "\xE5\x9B\xA5",
+ "\xCA\xAA" => "\xE5\x9D\x81",
+ "\xCA\xAB" => "\xE5\x9D\x85",
+ "\xCA\xAC" => "\xE5\x9D\x8C",
+ "\xCA\xAD" => "\xE5\x9D\x89",
+ "\xCA\xAE" => "\xE5\x9D\x8B",
+ "\xCA\xAF" => "\xE5\x9D\x92",
+ "\xCA\xB0" => "\xE5\xA4\x86",
+ "\xCA\xB1" => "\xE5\xA5\x80",
+ "\xCA\xB2" => "\xE5\xA6\xA6",
+ "\xCA\xB3" => "\xE5\xA6\x98",
+ "\xCA\xB4" => "\xE5\xA6\xA0",
+ "\xCA\xB5" => "\xE5\xA6\x97",
+ "\xCA\xB6" => "\xE5\xA6\x8E",
+ "\xCA\xB7" => "\xE5\xA6\xA2",
+ "\xCA\xB8" => "\xE5\xA6\x90",
+ "\xCA\xB9" => "\xE5\xA6\x8F",
+ "\xCA\xBA" => "\xE5\xA6\xA7",
+ "\xCA\xBB" => "\xE5\xA6\xA1",
+ "\xCA\xBC" => "\xE5\xAE\x8E",
+ "\xCA\xBD" => "\xE5\xAE\x92",
+ "\xCA\xBE" => "\xE5\xB0\xA8",
+ "\xCA\xBF" => "\xE5\xB0\xAA",
+ "\xCA\xC0" => "\xE5\xB2\x8D",
+ "\xCA\xC1" => "\xE5\xB2\x8F",
+ "\xCA\xC2" => "\xE5\xB2\x88",
+ "\xCA\xC3" => "\xE5\xB2\x8B",
+ "\xCA\xC4" => "\xE5\xB2\x89",
+ "\xCA\xC5" => "\xE5\xB2\x92",
+ "\xCA\xC6" => "\xE5\xB2\x8A",
+ "\xCA\xC7" => "\xE5\xB2\x86",
+ "\xCA\xC8" => "\xE5\xB2\x93",
+ "\xCA\xC9" => "\xE5\xB2\x95",
+ "\xCA\xCA" => "\xE5\xB7\xA0",
+ "\xCA\xCB" => "\xE5\xB8\x8A",
+ "\xCA\xCC" => "\xE5\xB8\x8E",
+ "\xCA\xCD" => "\xE5\xBA\x8B",
+ "\xCA\xCE" => "\xE5\xBA\x89",
+ "\xCA\xCF" => "\xE5\xBA\x8C",
+ "\xCA\xD0" => "\xE5\xBA\x88",
+ "\xCA\xD1" => "\xE5\xBA\x8D",
+ "\xCA\xD2" => "\xE5\xBC\x85",
+ "\xCA\xD3" => "\xE5\xBC\x9D",
+ "\xCA\xD4" => "\xE5\xBD\xB8",
+ "\xCA\xD5" => "\xE5\xBD\xB6",
+ "\xCA\xD6" => "\xE5\xBF\x92",
+ "\xCA\xD7" => "\xE5\xBF\x91",
+ "\xCA\xD8" => "\xE5\xBF\x90",
+ "\xCA\xD9" => "\xE5\xBF\xAD",
+ "\xCA\xDA" => "\xE5\xBF\xA8",
+ "\xCA\xDB" => "\xE5\xBF\xAE",
+ "\xCA\xDC" => "\xE5\xBF\xB3",
+ "\xCA\xDD" => "\xE5\xBF\xA1",
+ "\xCA\xDE" => "\xE5\xBF\xA4",
+ "\xCA\xDF" => "\xE5\xBF\xA3",
+ "\xCA\xE0" => "\xE5\xBF\xBA",
+ "\xCA\xE1" => "\xE5\xBF\xAF",
+ "\xCA\xE2" => "\xE5\xBF\xB7",
+ "\xCA\xE3" => "\xE5\xBF\xBB",
+ "\xCA\xE4" => "\xE6\x80\x80",
+ "\xCA\xE5" => "\xE5\xBF\xB4",
+ "\xCA\xE6" => "\xE6\x88\xBA",
+ "\xCA\xE7" => "\xE6\x8A\x83",
+ "\xCA\xE8" => "\xE6\x8A\x8C",
+ "\xCA\xE9" => "\xE6\x8A\x8E",
+ "\xCA\xEA" => "\xE6\x8A\x8F",
+ "\xCA\xEB" => "\xE6\x8A\x94",
+ "\xCA\xEC" => "\xE6\x8A\x87",
+ "\xCA\xED" => "\xE6\x89\xB1",
+ "\xCA\xEE" => "\xE6\x89\xBB",
+ "\xCA\xEF" => "\xE6\x89\xBA",
+ "\xCA\xF0" => "\xE6\x89\xB0",
+ "\xCA\xF1" => "\xE6\x8A\x81",
+ "\xCA\xF2" => "\xE6\x8A\x88",
+ "\xCA\xF3" => "\xE6\x89\xB7",
+ "\xCA\xF4" => "\xE6\x89\xBD",
+ "\xCA\xF5" => "\xE6\x89\xB2",
+ "\xCA\xF6" => "\xE6\x89\xB4",
+ "\xCA\xF7" => "\xE6\x94\xB7",
+ "\xCA\xF8" => "\xE6\x97\xB0",
+ "\xCA\xF9" => "\xE6\x97\xB4",
+ "\xCA\xFA" => "\xE6\x97\xB3",
+ "\xCA\xFB" => "\xE6\x97\xB2",
+ "\xCA\xFC" => "\xE6\x97\xB5",
+ "\xCA\xFD" => "\xE6\x9D\x85",
+ "\xCA\xFE" => "\xE6\x9D\x87",
+ "\xCB\x40" => "\xE6\x9D\x99",
+ "\xCB\x41" => "\xE6\x9D\x95",
+ "\xCB\x42" => "\xE6\x9D\x8C",
+ "\xCB\x43" => "\xE6\x9D\x88",
+ "\xCB\x44" => "\xE6\x9D\x9D",
+ "\xCB\x45" => "\xE6\x9D\x8D",
+ "\xCB\x46" => "\xE6\x9D\x9A",
+ "\xCB\x47" => "\xE6\x9D\x8B",
+ "\xCB\x48" => "\xE6\xAF\x90",
+ "\xCB\x49" => "\xE6\xB0\x99",
+ "\xCB\x4A" => "\xE6\xB0\x9A",
+ "\xCB\x4B" => "\xE6\xB1\xB8",
+ "\xCB\x4C" => "\xE6\xB1\xA7",
+ "\xCB\x4D" => "\xE6\xB1\xAB",
+ "\xCB\x4E" => "\xE6\xB2\x84",
+ "\xCB\x4F" => "\xE6\xB2\x8B",
+ "\xCB\x50" => "\xE6\xB2\x8F",
+ "\xCB\x51" => "\xE6\xB1\xB1",
+ "\xCB\x52" => "\xE6\xB1\xAF",
+ "\xCB\x53" => "\xE6\xB1\xA9",
+ "\xCB\x54" => "\xE6\xB2\x9A",
+ "\xCB\x55" => "\xE6\xB1\xAD",
+ "\xCB\x56" => "\xE6\xB2\x87",
+ "\xCB\x57" => "\xE6\xB2\x95",
+ "\xCB\x58" => "\xE6\xB2\x9C",
+ "\xCB\x59" => "\xE6\xB1\xA6",
+ "\xCB\x5A" => "\xE6\xB1\xB3",
+ "\xCB\x5B" => "\xE6\xB1\xA5",
+ "\xCB\x5C" => "\xE6\xB1\xBB",
+ "\xCB\x5D" => "\xE6\xB2\x8E",
+ "\xCB\x5E" => "\xE7\x81\xB4",
+ "\xCB\x5F" => "\xE7\x81\xBA",
+ "\xCB\x60" => "\xE7\x89\xA3",
+ "\xCB\x61" => "\xE7\x8A\xBF",
+ "\xCB\x62" => "\xE7\x8A\xBD",
+ "\xCB\x63" => "\xE7\x8B\x83",
+ "\xCB\x64" => "\xE7\x8B\x86",
+ "\xCB\x65" => "\xE7\x8B\x81",
+ "\xCB\x66" => "\xE7\x8A\xBA",
+ "\xCB\x67" => "\xE7\x8B\x85",
+ "\xCB\x68" => "\xE7\x8E\x95",
+ "\xCB\x69" => "\xE7\x8E\x97",
+ "\xCB\x6A" => "\xE7\x8E\x93",
+ "\xCB\x6B" => "\xE7\x8E\x94",
+ "\xCB\x6C" => "\xE7\x8E\x92",
+ "\xCB\x6D" => "\xE7\x94\xBA",
+ "\xCB\x6E" => "\xE7\x94\xB9",
+ "\xCB\x6F" => "\xE7\x96\x94",
+ "\xCB\x70" => "\xE7\x96\x95",
+ "\xCB\x71" => "\xE7\x9A\x81",
+ "\xCB\x72" => "\xE7\xA4\xBD",
+ "\xCB\x73" => "\xE8\x80\xB4",
+ "\xCB\x74" => "\xE8\x82\x95",
+ "\xCB\x75" => "\xE8\x82\x99",
+ "\xCB\x76" => "\xE8\x82\x90",
+ "\xCB\x77" => "\xE8\x82\x92",
+ "\xCB\x78" => "\xE8\x82\x9C",
+ "\xCB\x79" => "\xE8\x8A\x90",
+ "\xCB\x7A" => "\xE8\x8A\x8F",
+ "\xCB\x7B" => "\xE8\x8A\x85",
+ "\xCB\x7C" => "\xE8\x8A\x8E",
+ "\xCB\x7D" => "\xE8\x8A\x91",
+ "\xCB\x7E" => "\xE8\x8A\x93",
+ "\xCB\xA1" => "\xE8\x8A\x8A",
+ "\xCB\xA2" => "\xE8\x8A\x83",
+ "\xCB\xA3" => "\xE8\x8A\x84",
+ "\xCB\xA4" => "\xE8\xB1\xB8",
+ "\xCB\xA5" => "\xE8\xBF\x89",
+ "\xCB\xA6" => "\xE8\xBE\xBF",
+ "\xCB\xA7" => "\xE9\x82\x9F",
+ "\xCB\xA8" => "\xE9\x82\xA1",
+ "\xCB\xA9" => "\xE9\x82\xA5",
+ "\xCB\xAA" => "\xE9\x82\x9E",
+ "\xCB\xAB" => "\xE9\x82\xA7",
+ "\xCB\xAC" => "\xE9\x82\xA0",
+ "\xCB\xAD" => "\xE9\x98\xB0",
+ "\xCB\xAE" => "\xE9\x98\xA8",
+ "\xCB\xAF" => "\xE9\x98\xAF",
+ "\xCB\xB0" => "\xE9\x98\xAD",
+ "\xCB\xB1" => "\xE4\xB8\xB3",
+ "\xCB\xB2" => "\xE4\xBE\x98",
+ "\xCB\xB3" => "\xE4\xBD\xBC",
+ "\xCB\xB4" => "\xE4\xBE\x85",
+ "\xCB\xB5" => "\xE4\xBD\xBD",
+ "\xCB\xB6" => "\xE4\xBE\x80",
+ "\xCB\xB7" => "\xE4\xBE\x87",
+ "\xCB\xB8" => "\xE4\xBD\xB6",
+ "\xCB\xB9" => "\xE4\xBD\xB4",
+ "\xCB\xBA" => "\xE4\xBE\x89",
+ "\xCB\xBB" => "\xE4\xBE\x84",
+ "\xCB\xBC" => "\xE4\xBD\xB7",
+ "\xCB\xBD" => "\xE4\xBD\x8C",
+ "\xCB\xBE" => "\xE4\xBE\x97",
+ "\xCB\xBF" => "\xE4\xBD\xAA",
+ "\xCB\xC0" => "\xE4\xBE\x9A",
+ "\xCB\xC1" => "\xE4\xBD\xB9",
+ "\xCB\xC2" => "\xE4\xBE\x81",
+ "\xCB\xC3" => "\xE4\xBD\xB8",
+ "\xCB\xC4" => "\xE4\xBE\x90",
+ "\xCB\xC5" => "\xE4\xBE\x9C",
+ "\xCB\xC6" => "\xE4\xBE\x94",
+ "\xCB\xC7" => "\xE4\xBE\x9E",
+ "\xCB\xC8" => "\xE4\xBE\x92",
+ "\xCB\xC9" => "\xE4\xBE\x82",
+ "\xCB\xCA" => "\xE4\xBE\x95",
+ "\xCB\xCB" => "\xE4\xBD\xAB",
+ "\xCB\xCC" => "\xE4\xBD\xAE",
+ "\xCB\xCD" => "\xE5\x86\x9E",
+ "\xCB\xCE" => "\xE5\x86\xBC",
+ "\xCB\xCF" => "\xE5\x86\xBE",
+ "\xCB\xD0" => "\xE5\x88\xB5",
+ "\xCB\xD1" => "\xE5\x88\xB2",
+ "\xCB\xD2" => "\xE5\x88\xB3",
+ "\xCB\xD3" => "\xE5\x89\x86",
+ "\xCB\xD4" => "\xE5\x88\xB1",
+ "\xCB\xD5" => "\xE5\x8A\xBC",
+ "\xCB\xD6" => "\xE5\x8C\x8A",
+ "\xCB\xD7" => "\xE5\x8C\x8B",
+ "\xCB\xD8" => "\xE5\x8C\xBC",
+ "\xCB\xD9" => "\xE5\x8E\x92",
+ "\xCB\xDA" => "\xE5\x8E\x94",
+ "\xCB\xDB" => "\xE5\x92\x87",
+ "\xCB\xDC" => "\xE5\x91\xBF",
+ "\xCB\xDD" => "\xE5\x92\x81",
+ "\xCB\xDE" => "\xE5\x92\x91",
+ "\xCB\xDF" => "\xE5\x92\x82",
+ "\xCB\xE0" => "\xE5\x92\x88",
+ "\xCB\xE1" => "\xE5\x91\xAB",
+ "\xCB\xE2" => "\xE5\x91\xBA",
+ "\xCB\xE3" => "\xE5\x91\xBE",
+ "\xCB\xE4" => "\xE5\x91\xA5",
+ "\xCB\xE5" => "\xE5\x91\xAC",
+ "\xCB\xE6" => "\xE5\x91\xB4",
+ "\xCB\xE7" => "\xE5\x91\xA6",
+ "\xCB\xE8" => "\xE5\x92\x8D",
+ "\xCB\xE9" => "\xE5\x91\xAF",
+ "\xCB\xEA" => "\xE5\x91\xA1",
+ "\xCB\xEB" => "\xE5\x91\xA0",
+ "\xCB\xEC" => "\xE5\x92\x98",
+ "\xCB\xED" => "\xE5\x91\xA3",
+ "\xCB\xEE" => "\xE5\x91\xA7",
+ "\xCB\xEF" => "\xE5\x91\xA4",
+ "\xCB\xF0" => "\xE5\x9B\xB7",
+ "\xCB\xF1" => "\xE5\x9B\xB9",
+ "\xCB\xF2" => "\xE5\x9D\xAF",
+ "\xCB\xF3" => "\xE5\x9D\xB2",
+ "\xCB\xF4" => "\xE5\x9D\xAD",
+ "\xCB\xF5" => "\xE5\x9D\xAB",
+ "\xCB\xF6" => "\xE5\x9D\xB1",
+ "\xCB\xF7" => "\xE5\x9D\xB0",
+ "\xCB\xF8" => "\xE5\x9D\xB6",
+ "\xCB\xF9" => "\xE5\x9E\x80",
+ "\xCB\xFA" => "\xE5\x9D\xB5",
+ "\xCB\xFB" => "\xE5\x9D\xBB",
+ "\xCB\xFC" => "\xE5\x9D\xB3",
+ "\xCB\xFD" => "\xE5\x9D\xB4",
+ "\xCB\xFE" => "\xE5\x9D\xA2",
+ "\xCC\x40" => "\xE5\x9D\xA8",
+ "\xCC\x41" => "\xE5\x9D\xBD",
+ "\xCC\x42" => "\xE5\xA4\x8C",
+ "\xCC\x43" => "\xE5\xA5\x85",
+ "\xCC\x44" => "\xE5\xA6\xB5",
+ "\xCC\x45" => "\xE5\xA6\xBA",
+ "\xCC\x46" => "\xE5\xA7\x8F",
+ "\xCC\x47" => "\xE5\xA7\x8E",
+ "\xCC\x48" => "\xE5\xA6\xB2",
+ "\xCC\x49" => "\xE5\xA7\x8C",
+ "\xCC\x4A" => "\xE5\xA7\x81",
+ "\xCC\x4B" => "\xE5\xA6\xB6",
+ "\xCC\x4C" => "\xE5\xA6\xBC",
+ "\xCC\x4D" => "\xE5\xA7\x83",
+ "\xCC\x4E" => "\xE5\xA7\x96",
+ "\xCC\x4F" => "\xE5\xA6\xB1",
+ "\xCC\x50" => "\xE5\xA6\xBD",
+ "\xCC\x51" => "\xE5\xA7\x80",
+ "\xCC\x52" => "\xE5\xA7\x88",
+ "\xCC\x53" => "\xE5\xA6\xB4",
+ "\xCC\x54" => "\xE5\xA7\x87",
+ "\xCC\x55" => "\xE5\xAD\xA2",
+ "\xCC\x56" => "\xE5\xAD\xA5",
+ "\xCC\x57" => "\xE5\xAE\x93",
+ "\xCC\x58" => "\xE5\xAE\x95",
+ "\xCC\x59" => "\xE5\xB1\x84",
+ "\xCC\x5A" => "\xE5\xB1\x87",
+ "\xCC\x5B" => "\xE5\xB2\xAE",
+ "\xCC\x5C" => "\xE5\xB2\xA4",
+ "\xCC\x5D" => "\xE5\xB2\xA0",
+ "\xCC\x5E" => "\xE5\xB2\xB5",
+ "\xCC\x5F" => "\xE5\xB2\xAF",
+ "\xCC\x60" => "\xE5\xB2\xA8",
+ "\xCC\x61" => "\xE5\xB2\xAC",
+ "\xCC\x62" => "\xE5\xB2\x9F",
+ "\xCC\x63" => "\xE5\xB2\xA3",
+ "\xCC\x64" => "\xE5\xB2\xAD",
+ "\xCC\x65" => "\xE5\xB2\xA2",
+ "\xCC\x66" => "\xE5\xB2\xAA",
+ "\xCC\x67" => "\xE5\xB2\xA7",
+ "\xCC\x68" => "\xE5\xB2\x9D",
+ "\xCC\x69" => "\xE5\xB2\xA5",
+ "\xCC\x6A" => "\xE5\xB2\xB6",
+ "\xCC\x6B" => "\xE5\xB2\xB0",
+ "\xCC\x6C" => "\xE5\xB2\xA6",
+ "\xCC\x6D" => "\xE5\xB8\x97",
+ "\xCC\x6E" => "\xE5\xB8\x94",
+ "\xCC\x6F" => "\xE5\xB8\x99",
+ "\xCC\x70" => "\xE5\xBC\xA8",
+ "\xCC\x71" => "\xE5\xBC\xA2",
+ "\xCC\x72" => "\xE5\xBC\xA3",
+ "\xCC\x73" => "\xE5\xBC\xA4",
+ "\xCC\x74" => "\xE5\xBD\x94",
+ "\xCC\x75" => "\xE5\xBE\x82",
+ "\xCC\x76" => "\xE5\xBD\xBE",
+ "\xCC\x77" => "\xE5\xBD\xBD",
+ "\xCC\x78" => "\xE5\xBF\x9E",
+ "\xCC\x79" => "\xE5\xBF\xA5",
+ "\xCC\x7A" => "\xE6\x80\xAD",
+ "\xCC\x7B" => "\xE6\x80\xA6",
+ "\xCC\x7C" => "\xE6\x80\x99",
+ "\xCC\x7D" => "\xE6\x80\xB2",
+ "\xCC\x7E" => "\xE6\x80\x8B",
+ "\xCC\xA1" => "\xE6\x80\xB4",
+ "\xCC\xA2" => "\xE6\x80\x8A",
+ "\xCC\xA3" => "\xE6\x80\x97",
+ "\xCC\xA4" => "\xE6\x80\xB3",
+ "\xCC\xA5" => "\xE6\x80\x9A",
+ "\xCC\xA6" => "\xE6\x80\x9E",
+ "\xCC\xA7" => "\xE6\x80\xAC",
+ "\xCC\xA8" => "\xE6\x80\xA2",
+ "\xCC\xA9" => "\xE6\x80\x8D",
+ "\xCC\xAA" => "\xE6\x80\x90",
+ "\xCC\xAB" => "\xE6\x80\xAE",
+ "\xCC\xAC" => "\xE6\x80\x93",
+ "\xCC\xAD" => "\xE6\x80\x91",
+ "\xCC\xAE" => "\xE6\x80\x8C",
+ "\xCC\xAF" => "\xE6\x80\x89",
+ "\xCC\xB0" => "\xE6\x80\x9C",
+ "\xCC\xB1" => "\xE6\x88\x94",
+ "\xCC\xB2" => "\xE6\x88\xBD",
+ "\xCC\xB3" => "\xE6\x8A\xAD",
+ "\xCC\xB4" => "\xE6\x8A\xB4",
+ "\xCC\xB5" => "\xE6\x8B\x91",
+ "\xCC\xB6" => "\xE6\x8A\xBE",
+ "\xCC\xB7" => "\xE6\x8A\xAA",
+ "\xCC\xB8" => "\xE6\x8A\xB6",
+ "\xCC\xB9" => "\xE6\x8B\x8A",
+ "\xCC\xBA" => "\xE6\x8A\xAE",
+ "\xCC\xBB" => "\xE6\x8A\xB3",
+ "\xCC\xBC" => "\xE6\x8A\xAF",
+ "\xCC\xBD" => "\xE6\x8A\xBB",
+ "\xCC\xBE" => "\xE6\x8A\xA9",
+ "\xCC\xBF" => "\xE6\x8A\xB0",
+ "\xCC\xC0" => "\xE6\x8A\xB8",
+ "\xCC\xC1" => "\xE6\x94\xBD",
+ "\xCC\xC2" => "\xE6\x96\xA8",
+ "\xCC\xC3" => "\xE6\x96\xBB",
+ "\xCC\xC4" => "\xE6\x98\x89",
+ "\xCC\xC5" => "\xE6\x97\xBC",
+ "\xCC\xC6" => "\xE6\x98\x84",
+ "\xCC\xC7" => "\xE6\x98\x92",
+ "\xCC\xC8" => "\xE6\x98\x88",
+ "\xCC\xC9" => "\xE6\x97\xBB",
+ "\xCC\xCA" => "\xE6\x98\x83",
+ "\xCC\xCB" => "\xE6\x98\x8B",
+ "\xCC\xCC" => "\xE6\x98\x8D",
+ "\xCC\xCD" => "\xE6\x98\x85",
+ "\xCC\xCE" => "\xE6\x97\xBD",
+ "\xCC\xCF" => "\xE6\x98\x91",
+ "\xCC\xD0" => "\xE6\x98\x90",
+ "\xCC\xD1" => "\xE6\x9B\xB6",
+ "\xCC\xD2" => "\xE6\x9C\x8A",
+ "\xCC\xD3" => "\xE6\x9E\x85",
+ "\xCC\xD4" => "\xE6\x9D\xAC",
+ "\xCC\xD5" => "\xE6\x9E\x8E",
+ "\xCC\xD6" => "\xE6\x9E\x92",
+ "\xCC\xD7" => "\xE6\x9D\xB6",
+ "\xCC\xD8" => "\xE6\x9D\xBB",
+ "\xCC\xD9" => "\xE6\x9E\x98",
+ "\xCC\xDA" => "\xE6\x9E\x86",
+ "\xCC\xDB" => "\xE6\x9E\x84",
+ "\xCC\xDC" => "\xE6\x9D\xB4",
+ "\xCC\xDD" => "\xE6\x9E\x8D",
+ "\xCC\xDE" => "\xE6\x9E\x8C",
+ "\xCC\xDF" => "\xE6\x9D\xBA",
+ "\xCC\xE0" => "\xE6\x9E\x9F",
+ "\xCC\xE1" => "\xE6\x9E\x91",
+ "\xCC\xE2" => "\xE6\x9E\x99",
+ "\xCC\xE3" => "\xE6\x9E\x83",
+ "\xCC\xE4" => "\xE6\x9D\xBD",
+ "\xCC\xE5" => "\xE6\x9E\x81",
+ "\xCC\xE6" => "\xE6\x9D\xB8",
+ "\xCC\xE7" => "\xE6\x9D\xB9",
+ "\xCC\xE8" => "\xE6\x9E\x94",
+ "\xCC\xE9" => "\xE6\xAC\xA5",
+ "\xCC\xEA" => "\xE6\xAE\x80",
+ "\xCC\xEB" => "\xE6\xAD\xBE",
+ "\xCC\xEC" => "\xE6\xAF\x9E",
+ "\xCC\xED" => "\xE6\xB0\x9D",
+ "\xCC\xEE" => "\xE6\xB2\x93",
+ "\xCC\xEF" => "\xE6\xB3\xAC",
+ "\xCC\xF0" => "\xE6\xB3\xAB",
+ "\xCC\xF1" => "\xE6\xB3\xAE",
+ "\xCC\xF2" => "\xE6\xB3\x99",
+ "\xCC\xF3" => "\xE6\xB2\xB6",
+ "\xCC\xF4" => "\xE6\xB3\x94",
+ "\xCC\xF5" => "\xE6\xB2\xAD",
+ "\xCC\xF6" => "\xE6\xB3\xA7",
+ "\xCC\xF7" => "\xE6\xB2\xB7",
+ "\xCC\xF8" => "\xE6\xB3\x90",
+ "\xCC\xF9" => "\xE6\xB3\x82",
+ "\xCC\xFA" => "\xE6\xB2\xBA",
+ "\xCC\xFB" => "\xE6\xB3\x83",
+ "\xCC\xFC" => "\xE6\xB3\x86",
+ "\xCC\xFD" => "\xE6\xB3\xAD",
+ "\xCC\xFE" => "\xE6\xB3\xB2",
+ "\xCD\x40" => "\xE6\xB3\x92",
+ "\xCD\x41" => "\xE6\xB3\x9D",
+ "\xCD\x42" => "\xE6\xB2\xB4",
+ "\xCD\x43" => "\xE6\xB2\x8A",
+ "\xCD\x44" => "\xE6\xB2\x9D",
+ "\xCD\x45" => "\xE6\xB2\x80",
+ "\xCD\x46" => "\xE6\xB3\x9E",
+ "\xCD\x47" => "\xE6\xB3\x80",
+ "\xCD\x48" => "\xE6\xB4\xB0",
+ "\xCD\x49" => "\xE6\xB3\x8D",
+ "\xCD\x4A" => "\xE6\xB3\x87",
+ "\xCD\x4B" => "\xE6\xB2\xB0",
+ "\xCD\x4C" => "\xE6\xB3\xB9",
+ "\xCD\x4D" => "\xE6\xB3\x8F",
+ "\xCD\x4E" => "\xE6\xB3\xA9",
+ "\xCD\x4F" => "\xE6\xB3\x91",
+ "\xCD\x50" => "\xE7\x82\x94",
+ "\xCD\x51" => "\xE7\x82\x98",
+ "\xCD\x52" => "\xE7\x82\x85",
+ "\xCD\x53" => "\xE7\x82\x93",
+ "\xCD\x54" => "\xE7\x82\x86",
+ "\xCD\x55" => "\xE7\x82\x84",
+ "\xCD\x56" => "\xE7\x82\x91",
+ "\xCD\x57" => "\xE7\x82\x96",
+ "\xCD\x58" => "\xE7\x82\x82",
+ "\xCD\x59" => "\xE7\x82\x9A",
+ "\xCD\x5A" => "\xE7\x82\x83",
+ "\xCD\x5B" => "\xE7\x89\xAA",
+ "\xCD\x5C" => "\xE7\x8B\x96",
+ "\xCD\x5D" => "\xE7\x8B\x8B",
+ "\xCD\x5E" => "\xE7\x8B\x98",
+ "\xCD\x5F" => "\xE7\x8B\x89",
+ "\xCD\x60" => "\xE7\x8B\x9C",
+ "\xCD\x61" => "\xE7\x8B\x92",
+ "\xCD\x62" => "\xE7\x8B\x94",
+ "\xCD\x63" => "\xE7\x8B\x9A",
+ "\xCD\x64" => "\xE7\x8B\x8C",
+ "\xCD\x65" => "\xE7\x8B\x91",
+ "\xCD\x66" => "\xE7\x8E\xA4",
+ "\xCD\x67" => "\xE7\x8E\xA1",
+ "\xCD\x68" => "\xE7\x8E\xAD",
+ "\xCD\x69" => "\xE7\x8E\xA6",
+ "\xCD\x6A" => "\xE7\x8E\xA2",
+ "\xCD\x6B" => "\xE7\x8E\xA0",
+ "\xCD\x6C" => "\xE7\x8E\xAC",
+ "\xCD\x6D" => "\xE7\x8E\x9D",
+ "\xCD\x6E" => "\xE7\x93\x9D",
+ "\xCD\x6F" => "\xE7\x93\xA8",
+ "\xCD\x70" => "\xE7\x94\xBF",
+ "\xCD\x71" => "\xE7\x95\x80",
+ "\xCD\x72" => "\xE7\x94\xBE",
+ "\xCD\x73" => "\xE7\x96\x8C",
+ "\xCD\x74" => "\xE7\x96\x98",
+ "\xCD\x75" => "\xE7\x9A\xAF",
+ "\xCD\x76" => "\xE7\x9B\xB3",
+ "\xCD\x77" => "\xE7\x9B\xB1",
+ "\xCD\x78" => "\xE7\x9B\xB0",
+ "\xCD\x79" => "\xE7\x9B\xB5",
+ "\xCD\x7A" => "\xE7\x9F\xB8",
+ "\xCD\x7B" => "\xE7\x9F\xBC",
+ "\xCD\x7C" => "\xE7\x9F\xB9",
+ "\xCD\x7D" => "\xE7\x9F\xBB",
+ "\xCD\x7E" => "\xE7\x9F\xBA",
+ "\xCD\xA1" => "\xE7\x9F\xB7",
+ "\xCD\xA2" => "\xE7\xA5\x82",
+ "\xCD\xA3" => "\xE7\xA4\xBF",
+ "\xCD\xA4" => "\xE7\xA7\x85",
+ "\xCD\xA5" => "\xE7\xA9\xB8",
+ "\xCD\xA6" => "\xE7\xA9\xBB",
+ "\xCD\xA7" => "\xE7\xAB\xBB",
+ "\xCD\xA8" => "\xE7\xB1\xB5",
+ "\xCD\xA9" => "\xE7\xB3\xBD",
+ "\xCD\xAA" => "\xE8\x80\xB5",
+ "\xCD\xAB" => "\xE8\x82\x8F",
+ "\xCD\xAC" => "\xE8\x82\xAE",
+ "\xCD\xAD" => "\xE8\x82\xA3",
+ "\xCD\xAE" => "\xE8\x82\xB8",
+ "\xCD\xAF" => "\xE8\x82\xB5",
+ "\xCD\xB0" => "\xE8\x82\xAD",
+ "\xCD\xB1" => "\xE8\x88\xA0",
+ "\xCD\xB2" => "\xE8\x8A\xA0",
+ "\xCD\xB3" => "\xE8\x8B\x80",
+ "\xCD\xB4" => "\xE8\x8A\xAB",
+ "\xCD\xB5" => "\xE8\x8A\x9A",
+ "\xCD\xB6" => "\xE8\x8A\x98",
+ "\xCD\xB7" => "\xE8\x8A\x9B",
+ "\xCD\xB8" => "\xE8\x8A\xB5",
+ "\xCD\xB9" => "\xE8\x8A\xA7",
+ "\xCD\xBA" => "\xE8\x8A\xAE",
+ "\xCD\xBB" => "\xE8\x8A\xBC",
+ "\xCD\xBC" => "\xE8\x8A\x9E",
+ "\xCD\xBD" => "\xE8\x8A\xBA",
+ "\xCD\xBE" => "\xE8\x8A\xB4",
+ "\xCD\xBF" => "\xE8\x8A\xA8",
+ "\xCD\xC0" => "\xE8\x8A\xA1",
+ "\xCD\xC1" => "\xE8\x8A\xA9",
+ "\xCD\xC2" => "\xE8\x8B\x82",
+ "\xCD\xC3" => "\xE8\x8A\xA4",
+ "\xCD\xC4" => "\xE8\x8B\x83",
+ "\xCD\xC5" => "\xE8\x8A\xB6",
+ "\xCD\xC6" => "\xE8\x8A\xA2",
+ "\xCD\xC7" => "\xE8\x99\xB0",
+ "\xCD\xC8" => "\xE8\x99\xAF",
+ "\xCD\xC9" => "\xE8\x99\xAD",
+ "\xCD\xCA" => "\xE8\x99\xAE",
+ "\xCD\xCB" => "\xE8\xB1\x96",
+ "\xCD\xCC" => "\xE8\xBF\x92",
+ "\xCD\xCD" => "\xE8\xBF\x8B",
+ "\xCD\xCE" => "\xE8\xBF\x93",
+ "\xCD\xCF" => "\xE8\xBF\x8D",
+ "\xCD\xD0" => "\xE8\xBF\x96",
+ "\xCD\xD1" => "\xE8\xBF\x95",
+ "\xCD\xD2" => "\xE8\xBF\x97",
+ "\xCD\xD3" => "\xE9\x82\xB2",
+ "\xCD\xD4" => "\xE9\x82\xB4",
+ "\xCD\xD5" => "\xE9\x82\xAF",
+ "\xCD\xD6" => "\xE9\x82\xB3",
+ "\xCD\xD7" => "\xE9\x82\xB0",
+ "\xCD\xD8" => "\xE9\x98\xB9",
+ "\xCD\xD9" => "\xE9\x98\xBD",
+ "\xCD\xDA" => "\xE9\x98\xBC",
+ "\xCD\xDB" => "\xE9\x98\xBA",
+ "\xCD\xDC" => "\xE9\x99\x83",
+ "\xCD\xDD" => "\xE4\xBF\x8D",
+ "\xCD\xDE" => "\xE4\xBF\x85",
+ "\xCD\xDF" => "\xE4\xBF\x93",
+ "\xCD\xE0" => "\xE4\xBE\xB2",
+ "\xCD\xE1" => "\xE4\xBF\x89",
+ "\xCD\xE2" => "\xE4\xBF\x8B",
+ "\xCD\xE3" => "\xE4\xBF\x81",
+ "\xCD\xE4" => "\xE4\xBF\x94",
+ "\xCD\xE5" => "\xE4\xBF\x9C",
+ "\xCD\xE6" => "\xE4\xBF\x99",
+ "\xCD\xE7" => "\xE4\xBE\xBB",
+ "\xCD\xE8" => "\xE4\xBE\xB3",
+ "\xCD\xE9" => "\xE4\xBF\x9B",
+ "\xCD\xEA" => "\xE4\xBF\x87",
+ "\xCD\xEB" => "\xE4\xBF\x96",
+ "\xCD\xEC" => "\xE4\xBE\xBA",
+ "\xCD\xED" => "\xE4\xBF\x80",
+ "\xCD\xEE" => "\xE4\xBE\xB9",
+ "\xCD\xEF" => "\xE4\xBF\xAC",
+ "\xCD\xF0" => "\xE5\x89\x84",
+ "\xCD\xF1" => "\xE5\x89\x89",
+ "\xCD\xF2" => "\xE5\x8B\x80",
+ "\xCD\xF3" => "\xE5\x8B\x82",
+ "\xCD\xF4" => "\xE5\x8C\xBD",
+ "\xCD\xF5" => "\xE5\x8D\xBC",
+ "\xCD\xF6" => "\xE5\x8E\x97",
+ "\xCD\xF7" => "\xE5\x8E\x96",
+ "\xCD\xF8" => "\xE5\x8E\x99",
+ "\xCD\xF9" => "\xE5\x8E\x98",
+ "\xCD\xFA" => "\xE5\x92\xBA",
+ "\xCD\xFB" => "\xE5\x92\xA1",
+ "\xCD\xFC" => "\xE5\x92\xAD",
+ "\xCD\xFD" => "\xE5\x92\xA5",
+ "\xCD\xFE" => "\xE5\x93\x8F",
+ "\xCE\x40" => "\xE5\x93\x83",
+ "\xCE\x41" => "\xE8\x8C\x8D",
+ "\xCE\x42" => "\xE5\x92\xB7",
+ "\xCE\x43" => "\xE5\x92\xAE",
+ "\xCE\x44" => "\xE5\x93\x96",
+ "\xCE\x45" => "\xE5\x92\xB6",
+ "\xCE\x46" => "\xE5\x93\x85",
+ "\xCE\x47" => "\xE5\x93\x86",
+ "\xCE\x48" => "\xE5\x92\xA0",
+ "\xCE\x49" => "\xE5\x91\xB0",
+ "\xCE\x4A" => "\xE5\x92\xBC",
+ "\xCE\x4B" => "\xE5\x92\xA2",
+ "\xCE\x4C" => "\xE5\x92\xBE",
+ "\xCE\x4D" => "\xE5\x91\xB2",
+ "\xCE\x4E" => "\xE5\x93\x9E",
+ "\xCE\x4F" => "\xE5\x92\xB0",
+ "\xCE\x50" => "\xE5\x9E\xB5",
+ "\xCE\x51" => "\xE5\x9E\x9E",
+ "\xCE\x52" => "\xE5\x9E\x9F",
+ "\xCE\x53" => "\xE5\x9E\xA4",
+ "\xCE\x54" => "\xE5\x9E\x8C",
+ "\xCE\x55" => "\xE5\x9E\x97",
+ "\xCE\x56" => "\xE5\x9E\x9D",
+ "\xCE\x57" => "\xE5\x9E\x9B",
+ "\xCE\x58" => "\xE5\x9E\x94",
+ "\xCE\x59" => "\xE5\x9E\x98",
+ "\xCE\x5A" => "\xE5\x9E\x8F",
+ "\xCE\x5B" => "\xE5\x9E\x99",
+ "\xCE\x5C" => "\xE5\x9E\xA5",
+ "\xCE\x5D" => "\xE5\x9E\x9A",
+ "\xCE\x5E" => "\xE5\x9E\x95",
+ "\xCE\x5F" => "\xE5\xA3\xB4",
+ "\xCE\x60" => "\xE5\xA4\x8D",
+ "\xCE\x61" => "\xE5\xA5\x93",
+ "\xCE\x62" => "\xE5\xA7\xA1",
+ "\xCE\x63" => "\xE5\xA7\x9E",
+ "\xCE\x64" => "\xE5\xA7\xAE",
+ "\xCE\x65" => "\xE5\xA8\x80",
+ "\xCE\x66" => "\xE5\xA7\xB1",
+ "\xCE\x67" => "\xE5\xA7\x9D",
+ "\xCE\x68" => "\xE5\xA7\xBA",
+ "\xCE\x69" => "\xE5\xA7\xBD",
+ "\xCE\x6A" => "\xE5\xA7\xBC",
+ "\xCE\x6B" => "\xE5\xA7\xB6",
+ "\xCE\x6C" => "\xE5\xA7\xA4",
+ "\xCE\x6D" => "\xE5\xA7\xB2",
+ "\xCE\x6E" => "\xE5\xA7\xB7",
+ "\xCE\x6F" => "\xE5\xA7\x9B",
+ "\xCE\x70" => "\xE5\xA7\xA9",
+ "\xCE\x71" => "\xE5\xA7\xB3",
+ "\xCE\x72" => "\xE5\xA7\xB5",
+ "\xCE\x73" => "\xE5\xA7\xA0",
+ "\xCE\x74" => "\xE5\xA7\xBE",
+ "\xCE\x75" => "\xE5\xA7\xB4",
+ "\xCE\x76" => "\xE5\xA7\xAD",
+ "\xCE\x77" => "\xE5\xAE\xA8",
+ "\xCE\x78" => "\xE5\xB1\x8C",
+ "\xCE\x79" => "\xE5\xB3\x90",
+ "\xCE\x7A" => "\xE5\xB3\x98",
+ "\xCE\x7B" => "\xE5\xB3\x8C",
+ "\xCE\x7C" => "\xE5\xB3\x97",
+ "\xCE\x7D" => "\xE5\xB3\x8B",
+ "\xCE\x7E" => "\xE5\xB3\x9B",
+ "\xCE\xA1" => "\xE5\xB3\x9E",
+ "\xCE\xA2" => "\xE5\xB3\x9A",
+ "\xCE\xA3" => "\xE5\xB3\x89",
+ "\xCE\xA4" => "\xE5\xB3\x87",
+ "\xCE\xA5" => "\xE5\xB3\x8A",
+ "\xCE\xA6" => "\xE5\xB3\x96",
+ "\xCE\xA7" => "\xE5\xB3\x93",
+ "\xCE\xA8" => "\xE5\xB3\x94",
+ "\xCE\xA9" => "\xE5\xB3\x8F",
+ "\xCE\xAA" => "\xE5\xB3\x88",
+ "\xCE\xAB" => "\xE5\xB3\x86",
+ "\xCE\xAC" => "\xE5\xB3\x8E",
+ "\xCE\xAD" => "\xE5\xB3\x9F",
+ "\xCE\xAE" => "\xE5\xB3\xB8",
+ "\xCE\xAF" => "\xE5\xB7\xB9",
+ "\xCE\xB0" => "\xE5\xB8\xA1",
+ "\xCE\xB1" => "\xE5\xB8\xA2",
+ "\xCE\xB2" => "\xE5\xB8\xA3",
+ "\xCE\xB3" => "\xE5\xB8\xA0",
+ "\xCE\xB4" => "\xE5\xB8\xA4",
+ "\xCE\xB5" => "\xE5\xBA\xB0",
+ "\xCE\xB6" => "\xE5\xBA\xA4",
+ "\xCE\xB7" => "\xE5\xBA\xA2",
+ "\xCE\xB8" => "\xE5\xBA\x9B",
+ "\xCE\xB9" => "\xE5\xBA\xA3",
+ "\xCE\xBA" => "\xE5\xBA\xA5",
+ "\xCE\xBB" => "\xE5\xBC\x87",
+ "\xCE\xBC" => "\xE5\xBC\xAE",
+ "\xCE\xBD" => "\xE5\xBD\x96",
+ "\xCE\xBE" => "\xE5\xBE\x86",
+ "\xCE\xBF" => "\xE6\x80\xB7",
+ "\xCE\xC0" => "\xE6\x80\xB9",
+ "\xCE\xC1" => "\xE6\x81\x94",
+ "\xCE\xC2" => "\xE6\x81\xB2",
+ "\xCE\xC3" => "\xE6\x81\x9E",
+ "\xCE\xC4" => "\xE6\x81\x85",
+ "\xCE\xC5" => "\xE6\x81\x93",
+ "\xCE\xC6" => "\xE6\x81\x87",
+ "\xCE\xC7" => "\xE6\x81\x89",
+ "\xCE\xC8" => "\xE6\x81\x9B",
+ "\xCE\xC9" => "\xE6\x81\x8C",
+ "\xCE\xCA" => "\xE6\x81\x80",
+ "\xCE\xCB" => "\xE6\x81\x82",
+ "\xCE\xCC" => "\xE6\x81\x9F",
+ "\xCE\xCD" => "\xE6\x80\xA4",
+ "\xCE\xCE" => "\xE6\x81\x84",
+ "\xCE\xCF" => "\xE6\x81\x98",
+ "\xCE\xD0" => "\xE6\x81\xA6",
+ "\xCE\xD1" => "\xE6\x81\xAE",
+ "\xCE\xD2" => "\xE6\x89\x82",
+ "\xCE\xD3" => "\xE6\x89\x83",
+ "\xCE\xD4" => "\xE6\x8B\x8F",
+ "\xCE\xD5" => "\xE6\x8C\x8D",
+ "\xCE\xD6" => "\xE6\x8C\x8B",
+ "\xCE\xD7" => "\xE6\x8B\xB5",
+ "\xCE\xD8" => "\xE6\x8C\x8E",
+ "\xCE\xD9" => "\xE6\x8C\x83",
+ "\xCE\xDA" => "\xE6\x8B\xAB",
+ "\xCE\xDB" => "\xE6\x8B\xB9",
+ "\xCE\xDC" => "\xE6\x8C\x8F",
+ "\xCE\xDD" => "\xE6\x8C\x8C",
+ "\xCE\xDE" => "\xE6\x8B\xB8",
+ "\xCE\xDF" => "\xE6\x8B\xB6",
+ "\xCE\xE0" => "\xE6\x8C\x80",
+ "\xCE\xE1" => "\xE6\x8C\x93",
+ "\xCE\xE2" => "\xE6\x8C\x94",
+ "\xCE\xE3" => "\xE6\x8B\xBA",
+ "\xCE\xE4" => "\xE6\x8C\x95",
+ "\xCE\xE5" => "\xE6\x8B\xBB",
+ "\xCE\xE6" => "\xE6\x8B\xB0",
+ "\xCE\xE7" => "\xE6\x95\x81",
+ "\xCE\xE8" => "\xE6\x95\x83",
+ "\xCE\xE9" => "\xE6\x96\xAA",
+ "\xCE\xEA" => "\xE6\x96\xBF",
+ "\xCE\xEB" => "\xE6\x98\xB6",
+ "\xCE\xEC" => "\xE6\x98\xA1",
+ "\xCE\xED" => "\xE6\x98\xB2",
+ "\xCE\xEE" => "\xE6\x98\xB5",
+ "\xCE\xEF" => "\xE6\x98\x9C",
+ "\xCE\xF0" => "\xE6\x98\xA6",
+ "\xCE\xF1" => "\xE6\x98\xA2",
+ "\xCE\xF2" => "\xE6\x98\xB3",
+ "\xCE\xF3" => "\xE6\x98\xAB",
+ "\xCE\xF4" => "\xE6\x98\xBA",
+ "\xCE\xF5" => "\xE6\x98\x9D",
+ "\xCE\xF6" => "\xE6\x98\xB4",
+ "\xCE\xF7" => "\xE6\x98\xB9",
+ "\xCE\xF8" => "\xE6\x98\xAE",
+ "\xCE\xF9" => "\xE6\x9C\x8F",
+ "\xCE\xFA" => "\xE6\x9C\x90",
+ "\xCE\xFB" => "\xE6\x9F\x81",
+ "\xCE\xFC" => "\xE6\x9F\xB2",
+ "\xCE\xFD" => "\xE6\x9F\x88",
+ "\xCE\xFE" => "\xE6\x9E\xBA",
+ "\xCF\x40" => "\xE6\x9F\x9C",
+ "\xCF\x41" => "\xE6\x9E\xBB",
+ "\xCF\x42" => "\xE6\x9F\xB8",
+ "\xCF\x43" => "\xE6\x9F\x98",
+ "\xCF\x44" => "\xE6\x9F\x80",
+ "\xCF\x45" => "\xE6\x9E\xB7",
+ "\xCF\x46" => "\xE6\x9F\x85",
+ "\xCF\x47" => "\xE6\x9F\xAB",
+ "\xCF\x48" => "\xE6\x9F\xA4",
+ "\xCF\x49" => "\xE6\x9F\x9F",
+ "\xCF\x4A" => "\xE6\x9E\xB5",
+ "\xCF\x4B" => "\xE6\x9F\x8D",
+ "\xCF\x4C" => "\xE6\x9E\xB3",
+ "\xCF\x4D" => "\xE6\x9F\xB7",
+ "\xCF\x4E" => "\xE6\x9F\xB6",
+ "\xCF\x4F" => "\xE6\x9F\xAE",
+ "\xCF\x50" => "\xE6\x9F\xA3",
+ "\xCF\x51" => "\xE6\x9F\x82",
+ "\xCF\x52" => "\xE6\x9E\xB9",
+ "\xCF\x53" => "\xE6\x9F\x8E",
+ "\xCF\x54" => "\xE6\x9F\xA7",
+ "\xCF\x55" => "\xE6\x9F\xB0",
+ "\xCF\x56" => "\xE6\x9E\xB2",
+ "\xCF\x57" => "\xE6\x9F\xBC",
+ "\xCF\x58" => "\xE6\x9F\x86",
+ "\xCF\x59" => "\xE6\x9F\xAD",
+ "\xCF\x5A" => "\xE6\x9F\x8C",
+ "\xCF\x5B" => "\xE6\x9E\xAE",
+ "\xCF\x5C" => "\xE6\x9F\xA6",
+ "\xCF\x5D" => "\xE6\x9F\x9B",
+ "\xCF\x5E" => "\xE6\x9F\xBA",
+ "\xCF\x5F" => "\xE6\x9F\x89",
+ "\xCF\x60" => "\xE6\x9F\x8A",
+ "\xCF\x61" => "\xE6\x9F\x83",
+ "\xCF\x62" => "\xE6\x9F\xAA",
+ "\xCF\x63" => "\xE6\x9F\x8B",
+ "\xCF\x64" => "\xE6\xAC\xA8",
+ "\xCF\x65" => "\xE6\xAE\x82",
+ "\xCF\x66" => "\xE6\xAE\x84",
+ "\xCF\x67" => "\xE6\xAE\xB6",
+ "\xCF\x68" => "\xE6\xAF\x96",
+ "\xCF\x69" => "\xE6\xAF\x98",
+ "\xCF\x6A" => "\xE6\xAF\xA0",
+ "\xCF\x6B" => "\xE6\xB0\xA0",
+ "\xCF\x6C" => "\xE6\xB0\xA1",
+ "\xCF\x6D" => "\xE6\xB4\xA8",
+ "\xCF\x6E" => "\xE6\xB4\xB4",
+ "\xCF\x6F" => "\xE6\xB4\xAD",
+ "\xCF\x70" => "\xE6\xB4\x9F",
+ "\xCF\x71" => "\xE6\xB4\xBC",
+ "\xCF\x72" => "\xE6\xB4\xBF",
+ "\xCF\x73" => "\xE6\xB4\x92",
+ "\xCF\x74" => "\xE6\xB4\x8A",
+ "\xCF\x75" => "\xE6\xB3\x9A",
+ "\xCF\x76" => "\xE6\xB4\xB3",
+ "\xCF\x77" => "\xE6\xB4\x84",
+ "\xCF\x78" => "\xE6\xB4\x99",
+ "\xCF\x79" => "\xE6\xB4\xBA",
+ "\xCF\x7A" => "\xE6\xB4\x9A",
+ "\xCF\x7B" => "\xE6\xB4\x91",
+ "\xCF\x7C" => "\xE6\xB4\x80",
+ "\xCF\x7D" => "\xE6\xB4\x9D",
+ "\xCF\x7E" => "\xE6\xB5\x82",
+ "\xCF\xA1" => "\xE6\xB4\x81",
+ "\xCF\xA2" => "\xE6\xB4\x98",
+ "\xCF\xA3" => "\xE6\xB4\xB7",
+ "\xCF\xA4" => "\xE6\xB4\x83",
+ "\xCF\xA5" => "\xE6\xB4\x8F",
+ "\xCF\xA6" => "\xE6\xB5\x80",
+ "\xCF\xA7" => "\xE6\xB4\x87",
+ "\xCF\xA8" => "\xE6\xB4\xA0",
+ "\xCF\xA9" => "\xE6\xB4\xAC",
+ "\xCF\xAA" => "\xE6\xB4\x88",
+ "\xCF\xAB" => "\xE6\xB4\xA2",
+ "\xCF\xAC" => "\xE6\xB4\x89",
+ "\xCF\xAD" => "\xE6\xB4\x90",
+ "\xCF\xAE" => "\xE7\x82\xB7",
+ "\xCF\xAF" => "\xE7\x82\x9F",
+ "\xCF\xB0" => "\xE7\x82\xBE",
+ "\xCF\xB1" => "\xE7\x82\xB1",
+ "\xCF\xB2" => "\xE7\x82\xB0",
+ "\xCF\xB3" => "\xE7\x82\xA1",
+ "\xCF\xB4" => "\xE7\x82\xB4",
+ "\xCF\xB5" => "\xE7\x82\xB5",
+ "\xCF\xB6" => "\xE7\x82\xA9",
+ "\xCF\xB7" => "\xE7\x89\x81",
+ "\xCF\xB8" => "\xE7\x89\x89",
+ "\xCF\xB9" => "\xE7\x89\x8A",
+ "\xCF\xBA" => "\xE7\x89\xAC",
+ "\xCF\xBB" => "\xE7\x89\xB0",
+ "\xCF\xBC" => "\xE7\x89\xB3",
+ "\xCF\xBD" => "\xE7\x89\xAE",
+ "\xCF\xBE" => "\xE7\x8B\x8A",
+ "\xCF\xBF" => "\xE7\x8B\xA4",
+ "\xCF\xC0" => "\xE7\x8B\xA8",
+ "\xCF\xC1" => "\xE7\x8B\xAB",
+ "\xCF\xC2" => "\xE7\x8B\x9F",
+ "\xCF\xC3" => "\xE7\x8B\xAA",
+ "\xCF\xC4" => "\xE7\x8B\xA6",
+ "\xCF\xC5" => "\xE7\x8B\xA3",
+ "\xCF\xC6" => "\xE7\x8E\x85",
+ "\xCF\xC7" => "\xE7\x8F\x8C",
+ "\xCF\xC8" => "\xE7\x8F\x82",
+ "\xCF\xC9" => "\xE7\x8F\x88",
+ "\xCF\xCA" => "\xE7\x8F\x85",
+ "\xCF\xCB" => "\xE7\x8E\xB9",
+ "\xCF\xCC" => "\xE7\x8E\xB6",
+ "\xCF\xCD" => "\xE7\x8E\xB5",
+ "\xCF\xCE" => "\xE7\x8E\xB4",
+ "\xCF\xCF" => "\xE7\x8F\xAB",
+ "\xCF\xD0" => "\xE7\x8E\xBF",
+ "\xCF\xD1" => "\xE7\x8F\x87",
+ "\xCF\xD2" => "\xE7\x8E\xBE",
+ "\xCF\xD3" => "\xE7\x8F\x83",
+ "\xCF\xD4" => "\xE7\x8F\x86",
+ "\xCF\xD5" => "\xE7\x8E\xB8",
+ "\xCF\xD6" => "\xE7\x8F\x8B",
+ "\xCF\xD7" => "\xE7\x93\xAC",
+ "\xCF\xD8" => "\xE7\x93\xAE",
+ "\xCF\xD9" => "\xE7\x94\xAE",
+ "\xCF\xDA" => "\xE7\x95\x87",
+ "\xCF\xDB" => "\xE7\x95\x88",
+ "\xCF\xDC" => "\xE7\x96\xA7",
+ "\xCF\xDD" => "\xE7\x96\xAA",
+ "\xCF\xDE" => "\xE7\x99\xB9",
+ "\xCF\xDF" => "\xE7\x9B\x84",
+ "\xCF\xE0" => "\xE7\x9C\x88",
+ "\xCF\xE1" => "\xE7\x9C\x83",
+ "\xCF\xE2" => "\xE7\x9C\x84",
+ "\xCF\xE3" => "\xE7\x9C\x85",
+ "\xCF\xE4" => "\xE7\x9C\x8A",
+ "\xCF\xE5" => "\xE7\x9B\xB7",
+ "\xCF\xE6" => "\xE7\x9B\xBB",
+ "\xCF\xE7" => "\xE7\x9B\xBA",
+ "\xCF\xE8" => "\xE7\x9F\xA7",
+ "\xCF\xE9" => "\xE7\x9F\xA8",
+ "\xCF\xEA" => "\xE7\xA0\x86",
+ "\xCF\xEB" => "\xE7\xA0\x91",
+ "\xCF\xEC" => "\xE7\xA0\x92",
+ "\xCF\xED" => "\xE7\xA0\x85",
+ "\xCF\xEE" => "\xE7\xA0\x90",
+ "\xCF\xEF" => "\xE7\xA0\x8F",
+ "\xCF\xF0" => "\xE7\xA0\x8E",
+ "\xCF\xF1" => "\xE7\xA0\x89",
+ "\xCF\xF2" => "\xE7\xA0\x83",
+ "\xCF\xF3" => "\xE7\xA0\x93",
+ "\xCF\xF4" => "\xE7\xA5\x8A",
+ "\xCF\xF5" => "\xE7\xA5\x8C",
+ "\xCF\xF6" => "\xE7\xA5\x8B",
+ "\xCF\xF7" => "\xE7\xA5\x85",
+ "\xCF\xF8" => "\xE7\xA5\x84",
+ "\xCF\xF9" => "\xE7\xA7\x95",
+ "\xCF\xFA" => "\xE7\xA7\x8D",
+ "\xCF\xFB" => "\xE7\xA7\x8F",
+ "\xCF\xFC" => "\xE7\xA7\x96",
+ "\xCF\xFD" => "\xE7\xA7\x8E",
+ "\xCF\xFE" => "\xE7\xAA\x80",
+ "\xD0\x40" => "\xE7\xA9\xBE",
+ "\xD0\x41" => "\xE7\xAB\x91",
+ "\xD0\x42" => "\xE7\xAC\x80",
+ "\xD0\x43" => "\xE7\xAC\x81",
+ "\xD0\x44" => "\xE7\xB1\xBA",
+ "\xD0\x45" => "\xE7\xB1\xB8",
+ "\xD0\x46" => "\xE7\xB1\xB9",
+ "\xD0\x47" => "\xE7\xB1\xBF",
+ "\xD0\x48" => "\xE7\xB2\x80",
+ "\xD0\x49" => "\xE7\xB2\x81",
+ "\xD0\x4A" => "\xE7\xB4\x83",
+ "\xD0\x4B" => "\xE7\xB4\x88",
+ "\xD0\x4C" => "\xE7\xB4\x81",
+ "\xD0\x4D" => "\xE7\xBD\x98",
+ "\xD0\x4E" => "\xE7\xBE\x91",
+ "\xD0\x4F" => "\xE7\xBE\x8D",
+ "\xD0\x50" => "\xE7\xBE\xBE",
+ "\xD0\x51" => "\xE8\x80\x87",
+ "\xD0\x52" => "\xE8\x80\x8E",
+ "\xD0\x53" => "\xE8\x80\x8F",
+ "\xD0\x54" => "\xE8\x80\x94",
+ "\xD0\x55" => "\xE8\x80\xB7",
+ "\xD0\x56" => "\xE8\x83\x98",
+ "\xD0\x57" => "\xE8\x83\x87",
+ "\xD0\x58" => "\xE8\x83\xA0",
+ "\xD0\x59" => "\xE8\x83\x91",
+ "\xD0\x5A" => "\xE8\x83\x88",
+ "\xD0\x5B" => "\xE8\x83\x82",
+ "\xD0\x5C" => "\xE8\x83\x90",
+ "\xD0\x5D" => "\xE8\x83\x85",
+ "\xD0\x5E" => "\xE8\x83\xA3",
+ "\xD0\x5F" => "\xE8\x83\x99",
+ "\xD0\x60" => "\xE8\x83\x9C",
+ "\xD0\x61" => "\xE8\x83\x8A",
+ "\xD0\x62" => "\xE8\x83\x95",
+ "\xD0\x63" => "\xE8\x83\x89",
+ "\xD0\x64" => "\xE8\x83\x8F",
+ "\xD0\x65" => "\xE8\x83\x97",
+ "\xD0\x66" => "\xE8\x83\xA6",
+ "\xD0\x67" => "\xE8\x83\x8D",
+ "\xD0\x68" => "\xE8\x87\xBF",
+ "\xD0\x69" => "\xE8\x88\xA1",
+ "\xD0\x6A" => "\xE8\x8A\x94",
+ "\xD0\x6B" => "\xE8\x8B\x99",
+ "\xD0\x6C" => "\xE8\x8B\xBE",
+ "\xD0\x6D" => "\xE8\x8B\xB9",
+ "\xD0\x6E" => "\xE8\x8C\x87",
+ "\xD0\x6F" => "\xE8\x8B\xA8",
+ "\xD0\x70" => "\xE8\x8C\x80",
+ "\xD0\x71" => "\xE8\x8B\x95",
+ "\xD0\x72" => "\xE8\x8C\xBA",
+ "\xD0\x73" => "\xE8\x8B\xAB",
+ "\xD0\x74" => "\xE8\x8B\x96",
+ "\xD0\x75" => "\xE8\x8B\xB4",
+ "\xD0\x76" => "\xE8\x8B\xAC",
+ "\xD0\x77" => "\xE8\x8B\xA1",
+ "\xD0\x78" => "\xE8\x8B\xB2",
+ "\xD0\x79" => "\xE8\x8B\xB5",
+ "\xD0\x7A" => "\xE8\x8C\x8C",
+ "\xD0\x7B" => "\xE8\x8B\xBB",
+ "\xD0\x7C" => "\xE8\x8B\xB6",
+ "\xD0\x7D" => "\xE8\x8B\xB0",
+ "\xD0\x7E" => "\xE8\x8B\xAA",
+ "\xD0\xA1" => "\xE8\x8B\xA4",
+ "\xD0\xA2" => "\xE8\x8B\xA0",
+ "\xD0\xA3" => "\xE8\x8B\xBA",
+ "\xD0\xA4" => "\xE8\x8B\xB3",
+ "\xD0\xA5" => "\xE8\x8B\xAD",
+ "\xD0\xA6" => "\xE8\x99\xB7",
+ "\xD0\xA7" => "\xE8\x99\xB4",
+ "\xD0\xA8" => "\xE8\x99\xBC",
+ "\xD0\xA9" => "\xE8\x99\xB3",
+ "\xD0\xAA" => "\xE8\xA1\x81",
+ "\xD0\xAB" => "\xE8\xA1\x8E",
+ "\xD0\xAC" => "\xE8\xA1\xA7",
+ "\xD0\xAD" => "\xE8\xA1\xAA",
+ "\xD0\xAE" => "\xE8\xA1\xA9",
+ "\xD0\xAF" => "\xE8\xA7\x93",
+ "\xD0\xB0" => "\xE8\xA8\x84",
+ "\xD0\xB1" => "\xE8\xA8\x87",
+ "\xD0\xB2" => "\xE8\xB5\xB2",
+ "\xD0\xB3" => "\xE8\xBF\xA3",
+ "\xD0\xB4" => "\xE8\xBF\xA1",
+ "\xD0\xB5" => "\xE8\xBF\xAE",
+ "\xD0\xB6" => "\xE8\xBF\xA0",
+ "\xD0\xB7" => "\xE9\x83\xB1",
+ "\xD0\xB8" => "\xE9\x82\xBD",
+ "\xD0\xB9" => "\xE9\x82\xBF",
+ "\xD0\xBA" => "\xE9\x83\x95",
+ "\xD0\xBB" => "\xE9\x83\x85",
+ "\xD0\xBC" => "\xE9\x82\xBE",
+ "\xD0\xBD" => "\xE9\x83\x87",
+ "\xD0\xBE" => "\xE9\x83\x8B",
+ "\xD0\xBF" => "\xE9\x83\x88",
+ "\xD0\xC0" => "\xE9\x87\x94",
+ "\xD0\xC1" => "\xE9\x87\x93",
+ "\xD0\xC2" => "\xE9\x99\x94",
+ "\xD0\xC3" => "\xE9\x99\x8F",
+ "\xD0\xC4" => "\xE9\x99\x91",
+ "\xD0\xC5" => "\xE9\x99\x93",
+ "\xD0\xC6" => "\xE9\x99\x8A",
+ "\xD0\xC7" => "\xE9\x99\x8E",
+ "\xD0\xC8" => "\xE5\x80\x9E",
+ "\xD0\xC9" => "\xE5\x80\x85",
+ "\xD0\xCA" => "\xE5\x80\x87",
+ "\xD0\xCB" => "\xE5\x80\x93",
+ "\xD0\xCC" => "\xE5\x80\xA2",
+ "\xD0\xCD" => "\xE5\x80\xB0",
+ "\xD0\xCE" => "\xE5\x80\x9B",
+ "\xD0\xCF" => "\xE4\xBF\xB5",
+ "\xD0\xD0" => "\xE4\xBF\xB4",
+ "\xD0\xD1" => "\xE5\x80\xB3",
+ "\xD0\xD2" => "\xE5\x80\xB7",
+ "\xD0\xD3" => "\xE5\x80\xAC",
+ "\xD0\xD4" => "\xE4\xBF\xB6",
+ "\xD0\xD5" => "\xE4\xBF\xB7",
+ "\xD0\xD6" => "\xE5\x80\x97",
+ "\xD0\xD7" => "\xE5\x80\x9C",
+ "\xD0\xD8" => "\xE5\x80\xA0",
+ "\xD0\xD9" => "\xE5\x80\xA7",
+ "\xD0\xDA" => "\xE5\x80\xB5",
+ "\xD0\xDB" => "\xE5\x80\xAF",
+ "\xD0\xDC" => "\xE5\x80\xB1",
+ "\xD0\xDD" => "\xE5\x80\x8E",
+ "\xD0\xDE" => "\xE5\x85\x9A",
+ "\xD0\xDF" => "\xE5\x86\x94",
+ "\xD0\xE0" => "\xE5\x86\x93",
+ "\xD0\xE1" => "\xE5\x87\x8A",
+ "\xD0\xE2" => "\xE5\x87\x84",
+ "\xD0\xE3" => "\xE5\x87\x85",
+ "\xD0\xE4" => "\xE5\x87\x88",
+ "\xD0\xE5" => "\xE5\x87\x8E",
+ "\xD0\xE6" => "\xE5\x89\xA1",
+ "\xD0\xE7" => "\xE5\x89\x9A",
+ "\xD0\xE8" => "\xE5\x89\x92",
+ "\xD0\xE9" => "\xE5\x89\x9E",
+ "\xD0\xEA" => "\xE5\x89\x9F",
+ "\xD0\xEB" => "\xE5\x89\x95",
+ "\xD0\xEC" => "\xE5\x89\xA2",
+ "\xD0\xED" => "\xE5\x8B\x8D",
+ "\xD0\xEE" => "\xE5\x8C\x8E",
+ "\xD0\xEF" => "\xE5\x8E\x9E",
+ "\xD0\xF0" => "\xE5\x94\xA6",
+ "\xD0\xF1" => "\xE5\x93\xA2",
+ "\xD0\xF2" => "\xE5\x94\x97",
+ "\xD0\xF3" => "\xE5\x94\x92",
+ "\xD0\xF4" => "\xE5\x93\xA7",
+ "\xD0\xF5" => "\xE5\x93\xB3",
+ "\xD0\xF6" => "\xE5\x93\xA4",
+ "\xD0\xF7" => "\xE5\x94\x9A",
+ "\xD0\xF8" => "\xE5\x93\xBF",
+ "\xD0\xF9" => "\xE5\x94\x84",
+ "\xD0\xFA" => "\xE5\x94\x88",
+ "\xD0\xFB" => "\xE5\x93\xAB",
+ "\xD0\xFC" => "\xE5\x94\x91",
+ "\xD0\xFD" => "\xE5\x94\x85",
+ "\xD0\xFE" => "\xE5\x93\xB1",
+ "\xD1\x40" => "\xE5\x94\x8A",
+ "\xD1\x41" => "\xE5\x93\xBB",
+ "\xD1\x42" => "\xE5\x93\xB7",
+ "\xD1\x43" => "\xE5\x93\xB8",
+ "\xD1\x44" => "\xE5\x93\xA0",
+ "\xD1\x45" => "\xE5\x94\x8E",
+ "\xD1\x46" => "\xE5\x94\x83",
+ "\xD1\x47" => "\xE5\x94\x8B",
+ "\xD1\x48" => "\xE5\x9C\x81",
+ "\xD1\x49" => "\xE5\x9C\x82",
+ "\xD1\x4A" => "\xE5\x9F\x8C",
+ "\xD1\x4B" => "\xE5\xA0\xB2",
+ "\xD1\x4C" => "\xE5\x9F\x95",
+ "\xD1\x4D" => "\xE5\x9F\x92",
+ "\xD1\x4E" => "\xE5\x9E\xBA",
+ "\xD1\x4F" => "\xE5\x9F\x86",
+ "\xD1\x50" => "\xE5\x9E\xBD",
+ "\xD1\x51" => "\xE5\x9E\xBC",
+ "\xD1\x52" => "\xE5\x9E\xB8",
+ "\xD1\x53" => "\xE5\x9E\xB6",
+ "\xD1\x54" => "\xE5\x9E\xBF",
+ "\xD1\x55" => "\xE5\x9F\x87",
+ "\xD1\x56" => "\xE5\x9F\x90",
+ "\xD1\x57" => "\xE5\x9E\xB9",
+ "\xD1\x58" => "\xE5\x9F\x81",
+ "\xD1\x59" => "\xE5\xA4\x8E",
+ "\xD1\x5A" => "\xE5\xA5\x8A",
+ "\xD1\x5B" => "\xE5\xA8\x99",
+ "\xD1\x5C" => "\xE5\xA8\x96",
+ "\xD1\x5D" => "\xE5\xA8\xAD",
+ "\xD1\x5E" => "\xE5\xA8\xAE",
+ "\xD1\x5F" => "\xE5\xA8\x95",
+ "\xD1\x60" => "\xE5\xA8\x8F",
+ "\xD1\x61" => "\xE5\xA8\x97",
+ "\xD1\x62" => "\xE5\xA8\x8A",
+ "\xD1\x63" => "\xE5\xA8\x9E",
+ "\xD1\x64" => "\xE5\xA8\xB3",
+ "\xD1\x65" => "\xE5\xAD\xAC",
+ "\xD1\x66" => "\xE5\xAE\xA7",
+ "\xD1\x67" => "\xE5\xAE\xAD",
+ "\xD1\x68" => "\xE5\xAE\xAC",
+ "\xD1\x69" => "\xE5\xB0\x83",
+ "\xD1\x6A" => "\xE5\xB1\x96",
+ "\xD1\x6B" => "\xE5\xB1\x94",
+ "\xD1\x6C" => "\xE5\xB3\xAC",
+ "\xD1\x6D" => "\xE5\xB3\xBF",
+ "\xD1\x6E" => "\xE5\xB3\xAE",
+ "\xD1\x6F" => "\xE5\xB3\xB1",
+ "\xD1\x70" => "\xE5\xB3\xB7",
+ "\xD1\x71" => "\xE5\xB4\x80",
+ "\xD1\x72" => "\xE5\xB3\xB9",
+ "\xD1\x73" => "\xE5\xB8\xA9",
+ "\xD1\x74" => "\xE5\xB8\xA8",
+ "\xD1\x75" => "\xE5\xBA\xA8",
+ "\xD1\x76" => "\xE5\xBA\xAE",
+ "\xD1\x77" => "\xE5\xBA\xAA",
+ "\xD1\x78" => "\xE5\xBA\xAC",
+ "\xD1\x79" => "\xE5\xBC\xB3",
+ "\xD1\x7A" => "\xE5\xBC\xB0",
+ "\xD1\x7B" => "\xE5\xBD\xA7",
+ "\xD1\x7C" => "\xE6\x81\x9D",
+ "\xD1\x7D" => "\xE6\x81\x9A",
+ "\xD1\x7E" => "\xE6\x81\xA7",
+ "\xD1\xA1" => "\xE6\x81\x81",
+ "\xD1\xA2" => "\xE6\x82\xA2",
+ "\xD1\xA3" => "\xE6\x82\x88",
+ "\xD1\xA4" => "\xE6\x82\x80",
+ "\xD1\xA5" => "\xE6\x82\x92",
+ "\xD1\xA6" => "\xE6\x82\x81",
+ "\xD1\xA7" => "\xE6\x82\x9D",
+ "\xD1\xA8" => "\xE6\x82\x83",
+ "\xD1\xA9" => "\xE6\x82\x95",
+ "\xD1\xAA" => "\xE6\x82\x9B",
+ "\xD1\xAB" => "\xE6\x82\x97",
+ "\xD1\xAC" => "\xE6\x82\x87",
+ "\xD1\xAD" => "\xE6\x82\x9C",
+ "\xD1\xAE" => "\xE6\x82\x8E",
+ "\xD1\xAF" => "\xE6\x88\x99",
+ "\xD1\xB0" => "\xE6\x89\x86",
+ "\xD1\xB1" => "\xE6\x8B\xB2",
+ "\xD1\xB2" => "\xE6\x8C\x90",
+ "\xD1\xB3" => "\xE6\x8D\x96",
+ "\xD1\xB4" => "\xE6\x8C\xAC",
+ "\xD1\xB5" => "\xE6\x8D\x84",
+ "\xD1\xB6" => "\xE6\x8D\x85",
+ "\xD1\xB7" => "\xE6\x8C\xB6",
+ "\xD1\xB8" => "\xE6\x8D\x83",
+ "\xD1\xB9" => "\xE6\x8F\xA4",
+ "\xD1\xBA" => "\xE6\x8C\xB9",
+ "\xD1\xBB" => "\xE6\x8D\x8B",
+ "\xD1\xBC" => "\xE6\x8D\x8A",
+ "\xD1\xBD" => "\xE6\x8C\xBC",
+ "\xD1\xBE" => "\xE6\x8C\xA9",
+ "\xD1\xBF" => "\xE6\x8D\x81",
+ "\xD1\xC0" => "\xE6\x8C\xB4",
+ "\xD1\xC1" => "\xE6\x8D\x98",
+ "\xD1\xC2" => "\xE6\x8D\x94",
+ "\xD1\xC3" => "\xE6\x8D\x99",
+ "\xD1\xC4" => "\xE6\x8C\xAD",
+ "\xD1\xC5" => "\xE6\x8D\x87",
+ "\xD1\xC6" => "\xE6\x8C\xB3",
+ "\xD1\xC7" => "\xE6\x8D\x9A",
+ "\xD1\xC8" => "\xE6\x8D\x91",
+ "\xD1\xC9" => "\xE6\x8C\xB8",
+ "\xD1\xCA" => "\xE6\x8D\x97",
+ "\xD1\xCB" => "\xE6\x8D\x80",
+ "\xD1\xCC" => "\xE6\x8D\x88",
+ "\xD1\xCD" => "\xE6\x95\x8A",
+ "\xD1\xCE" => "\xE6\x95\x86",
+ "\xD1\xCF" => "\xE6\x97\x86",
+ "\xD1\xD0" => "\xE6\x97\x83",
+ "\xD1\xD1" => "\xE6\x97\x84",
+ "\xD1\xD2" => "\xE6\x97\x82",
+ "\xD1\xD3" => "\xE6\x99\x8A",
+ "\xD1\xD4" => "\xE6\x99\x9F",
+ "\xD1\xD5" => "\xE6\x99\x87",
+ "\xD1\xD6" => "\xE6\x99\x91",
+ "\xD1\xD7" => "\xE6\x9C\x92",
+ "\xD1\xD8" => "\xE6\x9C\x93",
+ "\xD1\xD9" => "\xE6\xA0\x9F",
+ "\xD1\xDA" => "\xE6\xA0\x9A",
+ "\xD1\xDB" => "\xE6\xA1\x89",
+ "\xD1\xDC" => "\xE6\xA0\xB2",
+ "\xD1\xDD" => "\xE6\xA0\xB3",
+ "\xD1\xDE" => "\xE6\xA0\xBB",
+ "\xD1\xDF" => "\xE6\xA1\x8B",
+ "\xD1\xE0" => "\xE6\xA1\x8F",
+ "\xD1\xE1" => "\xE6\xA0\x96",
+ "\xD1\xE2" => "\xE6\xA0\xB1",
+ "\xD1\xE3" => "\xE6\xA0\x9C",
+ "\xD1\xE4" => "\xE6\xA0\xB5",
+ "\xD1\xE5" => "\xE6\xA0\xAB",
+ "\xD1\xE6" => "\xE6\xA0\xAD",
+ "\xD1\xE7" => "\xE6\xA0\xAF",
+ "\xD1\xE8" => "\xE6\xA1\x8E",
+ "\xD1\xE9" => "\xE6\xA1\x84",
+ "\xD1\xEA" => "\xE6\xA0\xB4",
+ "\xD1\xEB" => "\xE6\xA0\x9D",
+ "\xD1\xEC" => "\xE6\xA0\x92",
+ "\xD1\xED" => "\xE6\xA0\x94",
+ "\xD1\xEE" => "\xE6\xA0\xA6",
+ "\xD1\xEF" => "\xE6\xA0\xA8",
+ "\xD1\xF0" => "\xE6\xA0\xAE",
+ "\xD1\xF1" => "\xE6\xA1\x8D",
+ "\xD1\xF2" => "\xE6\xA0\xBA",
+ "\xD1\xF3" => "\xE6\xA0\xA5",
+ "\xD1\xF4" => "\xE6\xA0\xA0",
+ "\xD1\xF5" => "\xE6\xAC\xAC",
+ "\xD1\xF6" => "\xE6\xAC\xAF",
+ "\xD1\xF7" => "\xE6\xAC\xAD",
+ "\xD1\xF8" => "\xE6\xAC\xB1",
+ "\xD1\xF9" => "\xE6\xAC\xB4",
+ "\xD1\xFA" => "\xE6\xAD\xAD",
+ "\xD1\xFB" => "\xE8\x82\x82",
+ "\xD1\xFC" => "\xE6\xAE\x88",
+ "\xD1\xFD" => "\xE6\xAF\xA6",
+ "\xD1\xFE" => "\xE6\xAF\xA4",
+ "\xD2\x40" => "\xE6\xAF\xA8",
+ "\xD2\x41" => "\xE6\xAF\xA3",
+ "\xD2\x42" => "\xE6\xAF\xA2",
+ "\xD2\x43" => "\xE6\xAF\xA7",
+ "\xD2\x44" => "\xE6\xB0\xA5",
+ "\xD2\x45" => "\xE6\xB5\xBA",
+ "\xD2\x46" => "\xE6\xB5\xA3",
+ "\xD2\x47" => "\xE6\xB5\xA4",
+ "\xD2\x48" => "\xE6\xB5\xB6",
+ "\xD2\x49" => "\xE6\xB4\x8D",
+ "\xD2\x4A" => "\xE6\xB5\xA1",
+ "\xD2\x4B" => "\xE6\xB6\x92",
+ "\xD2\x4C" => "\xE6\xB5\x98",
+ "\xD2\x4D" => "\xE6\xB5\xA2",
+ "\xD2\x4E" => "\xE6\xB5\xAD",
+ "\xD2\x4F" => "\xE6\xB5\xAF",
+ "\xD2\x50" => "\xE6\xB6\x91",
+ "\xD2\x51" => "\xE6\xB6\x8D",
+ "\xD2\x52" => "\xE6\xB7\xAF",
+ "\xD2\x53" => "\xE6\xB5\xBF",
+ "\xD2\x54" => "\xE6\xB6\x86",
+ "\xD2\x55" => "\xE6\xB5\x9E",
+ "\xD2\x56" => "\xE6\xB5\xA7",
+ "\xD2\x57" => "\xE6\xB5\xA0",
+ "\xD2\x58" => "\xE6\xB6\x97",
+ "\xD2\x59" => "\xE6\xB5\xB0",
+ "\xD2\x5A" => "\xE6\xB5\xBC",
+ "\xD2\x5B" => "\xE6\xB5\x9F",
+ "\xD2\x5C" => "\xE6\xB6\x82",
+ "\xD2\x5D" => "\xE6\xB6\x98",
+ "\xD2\x5E" => "\xE6\xB4\xAF",
+ "\xD2\x5F" => "\xE6\xB5\xA8",
+ "\xD2\x60" => "\xE6\xB6\x8B",
+ "\xD2\x61" => "\xE6\xB5\xBE",
+ "\xD2\x62" => "\xE6\xB6\x80",
+ "\xD2\x63" => "\xE6\xB6\x84",
+ "\xD2\x64" => "\xE6\xB4\x96",
+ "\xD2\x65" => "\xE6\xB6\x83",
+ "\xD2\x66" => "\xE6\xB5\xBB",
+ "\xD2\x67" => "\xE6\xB5\xBD",
+ "\xD2\x68" => "\xE6\xB5\xB5",
+ "\xD2\x69" => "\xE6\xB6\x90",
+ "\xD2\x6A" => "\xE7\x83\x9C",
+ "\xD2\x6B" => "\xE7\x83\x93",
+ "\xD2\x6C" => "\xE7\x83\x91",
+ "\xD2\x6D" => "\xE7\x83\x9D",
+ "\xD2\x6E" => "\xE7\x83\x8B",
+ "\xD2\x6F" => "\xE7\xBC\xB9",
+ "\xD2\x70" => "\xE7\x83\xA2",
+ "\xD2\x71" => "\xE7\x83\x97",
+ "\xD2\x72" => "\xE7\x83\x92",
+ "\xD2\x73" => "\xE7\x83\x9E",
+ "\xD2\x74" => "\xE7\x83\xA0",
+ "\xD2\x75" => "\xE7\x83\x94",
+ "\xD2\x76" => "\xE7\x83\x8D",
+ "\xD2\x77" => "\xE7\x83\x85",
+ "\xD2\x78" => "\xE7\x83\x86",
+ "\xD2\x79" => "\xE7\x83\x87",
+ "\xD2\x7A" => "\xE7\x83\x9A",
+ "\xD2\x7B" => "\xE7\x83\x8E",
+ "\xD2\x7C" => "\xE7\x83\xA1",
+ "\xD2\x7D" => "\xE7\x89\x82",
+ "\xD2\x7E" => "\xE7\x89\xB8",
+ "\xD2\xA1" => "\xE7\x89\xB7",
+ "\xD2\xA2" => "\xE7\x89\xB6",
+ "\xD2\xA3" => "\xE7\x8C\x80",
+ "\xD2\xA4" => "\xE7\x8B\xBA",
+ "\xD2\xA5" => "\xE7\x8B\xB4",
+ "\xD2\xA6" => "\xE7\x8B\xBE",
+ "\xD2\xA7" => "\xE7\x8B\xB6",
+ "\xD2\xA8" => "\xE7\x8B\xB3",
+ "\xD2\xA9" => "\xE7\x8B\xBB",
+ "\xD2\xAA" => "\xE7\x8C\x81",
+ "\xD2\xAB" => "\xE7\x8F\x93",
+ "\xD2\xAC" => "\xE7\x8F\x99",
+ "\xD2\xAD" => "\xE7\x8F\xA5",
+ "\xD2\xAE" => "\xE7\x8F\x96",
+ "\xD2\xAF" => "\xE7\x8E\xBC",
+ "\xD2\xB0" => "\xE7\x8F\xA7",
+ "\xD2\xB1" => "\xE7\x8F\xA3",
+ "\xD2\xB2" => "\xE7\x8F\xA9",
+ "\xD2\xB3" => "\xE7\x8F\x9C",
+ "\xD2\xB4" => "\xE7\x8F\x92",
+ "\xD2\xB5" => "\xE7\x8F\x9B",
+ "\xD2\xB6" => "\xE7\x8F\x94",
+ "\xD2\xB7" => "\xE7\x8F\x9D",
+ "\xD2\xB8" => "\xE7\x8F\x9A",
+ "\xD2\xB9" => "\xE7\x8F\x97",
+ "\xD2\xBA" => "\xE7\x8F\x98",
+ "\xD2\xBB" => "\xE7\x8F\xA8",
+ "\xD2\xBC" => "\xE7\x93\x9E",
+ "\xD2\xBD" => "\xE7\x93\x9F",
+ "\xD2\xBE" => "\xE7\x93\xB4",
+ "\xD2\xBF" => "\xE7\x93\xB5",
+ "\xD2\xC0" => "\xE7\x94\xA1",
+ "\xD2\xC1" => "\xE7\x95\x9B",
+ "\xD2\xC2" => "\xE7\x95\x9F",
+ "\xD2\xC3" => "\xE7\x96\xB0",
+ "\xD2\xC4" => "\xE7\x97\x81",
+ "\xD2\xC5" => "\xE7\x96\xBB",
+ "\xD2\xC6" => "\xE7\x97\x84",
+ "\xD2\xC7" => "\xE7\x97\x80",
+ "\xD2\xC8" => "\xE7\x96\xBF",
+ "\xD2\xC9" => "\xE7\x96\xB6",
+ "\xD2\xCA" => "\xE7\x96\xBA",
+ "\xD2\xCB" => "\xE7\x9A\x8A",
+ "\xD2\xCC" => "\xE7\x9B\x89",
+ "\xD2\xCD" => "\xE7\x9C\x9D",
+ "\xD2\xCE" => "\xE7\x9C\x9B",
+ "\xD2\xCF" => "\xE7\x9C\x90",
+ "\xD2\xD0" => "\xE7\x9C\x93",
+ "\xD2\xD1" => "\xE7\x9C\x92",
+ "\xD2\xD2" => "\xE7\x9C\xA3",
+ "\xD2\xD3" => "\xE7\x9C\x91",
+ "\xD2\xD4" => "\xE7\x9C\x95",
+ "\xD2\xD5" => "\xE7\x9C\x99",
+ "\xD2\xD6" => "\xE7\x9C\x9A",
+ "\xD2\xD7" => "\xE7\x9C\xA2",
+ "\xD2\xD8" => "\xE7\x9C\xA7",
+ "\xD2\xD9" => "\xE7\xA0\xA3",
+ "\xD2\xDA" => "\xE7\xA0\xAC",
+ "\xD2\xDB" => "\xE7\xA0\xA2",
+ "\xD2\xDC" => "\xE7\xA0\xB5",
+ "\xD2\xDD" => "\xE7\xA0\xAF",
+ "\xD2\xDE" => "\xE7\xA0\xA8",
+ "\xD2\xDF" => "\xE7\xA0\xAE",
+ "\xD2\xE0" => "\xE7\xA0\xAB",
+ "\xD2\xE1" => "\xE7\xA0\xA1",
+ "\xD2\xE2" => "\xE7\xA0\xA9",
+ "\xD2\xE3" => "\xE7\xA0\xB3",
+ "\xD2\xE4" => "\xE7\xA0\xAA",
+ "\xD2\xE5" => "\xE7\xA0\xB1",
+ "\xD2\xE6" => "\xE7\xA5\x94",
+ "\xD2\xE7" => "\xE7\xA5\x9B",
+ "\xD2\xE8" => "\xE7\xA5\x8F",
+ "\xD2\xE9" => "\xE7\xA5\x9C",
+ "\xD2\xEA" => "\xE7\xA5\x93",
+ "\xD2\xEB" => "\xE7\xA5\x92",
+ "\xD2\xEC" => "\xE7\xA5\x91",
+ "\xD2\xED" => "\xE7\xA7\xAB",
+ "\xD2\xEE" => "\xE7\xA7\xAC",
+ "\xD2\xEF" => "\xE7\xA7\xA0",
+ "\xD2\xF0" => "\xE7\xA7\xAE",
+ "\xD2\xF1" => "\xE7\xA7\xAD",
+ "\xD2\xF2" => "\xE7\xA7\xAA",
+ "\xD2\xF3" => "\xE7\xA7\x9C",
+ "\xD2\xF4" => "\xE7\xA7\x9E",
+ "\xD2\xF5" => "\xE7\xA7\x9D",
+ "\xD2\xF6" => "\xE7\xAA\x86",
+ "\xD2\xF7" => "\xE7\xAA\x89",
+ "\xD2\xF8" => "\xE7\xAA\x85",
+ "\xD2\xF9" => "\xE7\xAA\x8B",
+ "\xD2\xFA" => "\xE7\xAA\x8C",
+ "\xD2\xFB" => "\xE7\xAA\x8A",
+ "\xD2\xFC" => "\xE7\xAA\x87",
+ "\xD2\xFD" => "\xE7\xAB\x98",
+ "\xD2\xFE" => "\xE7\xAC\x90",
+ "\xD3\x40" => "\xE7\xAC\x84",
+ "\xD3\x41" => "\xE7\xAC\x93",
+ "\xD3\x42" => "\xE7\xAC\x85",
+ "\xD3\x43" => "\xE7\xAC\x8F",
+ "\xD3\x44" => "\xE7\xAC\x88",
+ "\xD3\x45" => "\xE7\xAC\x8A",
+ "\xD3\x46" => "\xE7\xAC\x8E",
+ "\xD3\x47" => "\xE7\xAC\x89",
+ "\xD3\x48" => "\xE7\xAC\x92",
+ "\xD3\x49" => "\xE7\xB2\x84",
+ "\xD3\x4A" => "\xE7\xB2\x91",
+ "\xD3\x4B" => "\xE7\xB2\x8A",
+ "\xD3\x4C" => "\xE7\xB2\x8C",
+ "\xD3\x4D" => "\xE7\xB2\x88",
+ "\xD3\x4E" => "\xE7\xB2\x8D",
+ "\xD3\x4F" => "\xE7\xB2\x85",
+ "\xD3\x50" => "\xE7\xB4\x9E",
+ "\xD3\x51" => "\xE7\xB4\x9D",
+ "\xD3\x52" => "\xE7\xB4\x91",
+ "\xD3\x53" => "\xE7\xB4\x8E",
+ "\xD3\x54" => "\xE7\xB4\x98",
+ "\xD3\x55" => "\xE7\xB4\x96",
+ "\xD3\x56" => "\xE7\xB4\x93",
+ "\xD3\x57" => "\xE7\xB4\x9F",
+ "\xD3\x58" => "\xE7\xB4\x92",
+ "\xD3\x59" => "\xE7\xB4\x8F",
+ "\xD3\x5A" => "\xE7\xB4\x8C",
+ "\xD3\x5B" => "\xE7\xBD\x9C",
+ "\xD3\x5C" => "\xE7\xBD\xA1",
+ "\xD3\x5D" => "\xE7\xBD\x9E",
+ "\xD3\x5E" => "\xE7\xBD\xA0",
+ "\xD3\x5F" => "\xE7\xBD\x9D",
+ "\xD3\x60" => "\xE7\xBD\x9B",
+ "\xD3\x61" => "\xE7\xBE\x96",
+ "\xD3\x62" => "\xE7\xBE\x92",
+ "\xD3\x63" => "\xE7\xBF\x83",
+ "\xD3\x64" => "\xE7\xBF\x82",
+ "\xD3\x65" => "\xE7\xBF\x80",
+ "\xD3\x66" => "\xE8\x80\x96",
+ "\xD3\x67" => "\xE8\x80\xBE",
+ "\xD3\x68" => "\xE8\x80\xB9",
+ "\xD3\x69" => "\xE8\x83\xBA",
+ "\xD3\x6A" => "\xE8\x83\xB2",
+ "\xD3\x6B" => "\xE8\x83\xB9",
+ "\xD3\x6C" => "\xE8\x83\xB5",
+ "\xD3\x6D" => "\xE8\x84\x81",
+ "\xD3\x6E" => "\xE8\x83\xBB",
+ "\xD3\x6F" => "\xE8\x84\x80",
+ "\xD3\x70" => "\xE8\x88\x81",
+ "\xD3\x71" => "\xE8\x88\xAF",
+ "\xD3\x72" => "\xE8\x88\xA5",
+ "\xD3\x73" => "\xE8\x8C\xB3",
+ "\xD3\x74" => "\xE8\x8C\xAD",
+ "\xD3\x75" => "\xE8\x8D\x84",
+ "\xD3\x76" => "\xE8\x8C\x99",
+ "\xD3\x77" => "\xE8\x8D\x91",
+ "\xD3\x78" => "\xE8\x8C\xA5",
+ "\xD3\x79" => "\xE8\x8D\x96",
+ "\xD3\x7A" => "\xE8\x8C\xBF",
+ "\xD3\x7B" => "\xE8\x8D\x81",
+ "\xD3\x7C" => "\xE8\x8C\xA6",
+ "\xD3\x7D" => "\xE8\x8C\x9C",
+ "\xD3\x7E" => "\xE8\x8C\xA2",
+ "\xD3\xA1" => "\xE8\x8D\x82",
+ "\xD3\xA2" => "\xE8\x8D\x8E",
+ "\xD3\xA3" => "\xE8\x8C\x9B",
+ "\xD3\xA4" => "\xE8\x8C\xAA",
+ "\xD3\xA5" => "\xE8\x8C\x88",
+ "\xD3\xA6" => "\xE8\x8C\xBC",
+ "\xD3\xA7" => "\xE8\x8D\x8D",
+ "\xD3\xA8" => "\xE8\x8C\x96",
+ "\xD3\xA9" => "\xE8\x8C\xA4",
+ "\xD3\xAA" => "\xE8\x8C\xA0",
+ "\xD3\xAB" => "\xE8\x8C\xB7",
+ "\xD3\xAC" => "\xE8\x8C\xAF",
+ "\xD3\xAD" => "\xE8\x8C\xA9",
+ "\xD3\xAE" => "\xE8\x8D\x87",
+ "\xD3\xAF" => "\xE8\x8D\x85",
+ "\xD3\xB0" => "\xE8\x8D\x8C",
+ "\xD3\xB1" => "\xE8\x8D\x93",
+ "\xD3\xB2" => "\xE8\x8C\x9E",
+ "\xD3\xB3" => "\xE8\x8C\xAC",
+ "\xD3\xB4" => "\xE8\x8D\x8B",
+ "\xD3\xB5" => "\xE8\x8C\xA7",
+ "\xD3\xB6" => "\xE8\x8D\x88",
+ "\xD3\xB7" => "\xE8\x99\x93",
+ "\xD3\xB8" => "\xE8\x99\x92",
+ "\xD3\xB9" => "\xE8\x9A\xA2",
+ "\xD3\xBA" => "\xE8\x9A\xA8",
+ "\xD3\xBB" => "\xE8\x9A\x96",
+ "\xD3\xBC" => "\xE8\x9A\x8D",
+ "\xD3\xBD" => "\xE8\x9A\x91",
+ "\xD3\xBE" => "\xE8\x9A\x9E",
+ "\xD3\xBF" => "\xE8\x9A\x87",
+ "\xD3\xC0" => "\xE8\x9A\x97",
+ "\xD3\xC1" => "\xE8\x9A\x86",
+ "\xD3\xC2" => "\xE8\x9A\x8B",
+ "\xD3\xC3" => "\xE8\x9A\x9A",
+ "\xD3\xC4" => "\xE8\x9A\x85",
+ "\xD3\xC5" => "\xE8\x9A\xA5",
+ "\xD3\xC6" => "\xE8\x9A\x99",
+ "\xD3\xC7" => "\xE8\x9A\xA1",
+ "\xD3\xC8" => "\xE8\x9A\xA7",
+ "\xD3\xC9" => "\xE8\x9A\x95",
+ "\xD3\xCA" => "\xE8\x9A\x98",
+ "\xD3\xCB" => "\xE8\x9A\x8E",
+ "\xD3\xCC" => "\xE8\x9A\x9D",
+ "\xD3\xCD" => "\xE8\x9A\x90",
+ "\xD3\xCE" => "\xE8\x9A\x94",
+ "\xD3\xCF" => "\xE8\xA1\x83",
+ "\xD3\xD0" => "\xE8\xA1\x84",
+ "\xD3\xD1" => "\xE8\xA1\xAD",
+ "\xD3\xD2" => "\xE8\xA1\xB5",
+ "\xD3\xD3" => "\xE8\xA1\xB6",
+ "\xD3\xD4" => "\xE8\xA1\xB2",
+ "\xD3\xD5" => "\xE8\xA2\x80",
+ "\xD3\xD6" => "\xE8\xA1\xB1",
+ "\xD3\xD7" => "\xE8\xA1\xBF",
+ "\xD3\xD8" => "\xE8\xA1\xAF",
+ "\xD3\xD9" => "\xE8\xA2\x83",
+ "\xD3\xDA" => "\xE8\xA1\xBE",
+ "\xD3\xDB" => "\xE8\xA1\xB4",
+ "\xD3\xDC" => "\xE8\xA1\xBC",
+ "\xD3\xDD" => "\xE8\xA8\x92",
+ "\xD3\xDE" => "\xE8\xB1\x87",
+ "\xD3\xDF" => "\xE8\xB1\x97",
+ "\xD3\xE0" => "\xE8\xB1\xBB",
+ "\xD3\xE1" => "\xE8\xB2\xA4",
+ "\xD3\xE2" => "\xE8\xB2\xA3",
+ "\xD3\xE3" => "\xE8\xB5\xB6",
+ "\xD3\xE4" => "\xE8\xB5\xB8",
+ "\xD3\xE5" => "\xE8\xB6\xB5",
+ "\xD3\xE6" => "\xE8\xB6\xB7",
+ "\xD3\xE7" => "\xE8\xB6\xB6",
+ "\xD3\xE8" => "\xE8\xBB\x91",
+ "\xD3\xE9" => "\xE8\xBB\x93",
+ "\xD3\xEA" => "\xE8\xBF\xBE",
+ "\xD3\xEB" => "\xE8\xBF\xB5",
+ "\xD3\xEC" => "\xE9\x80\x82",
+ "\xD3\xED" => "\xE8\xBF\xBF",
+ "\xD3\xEE" => "\xE8\xBF\xBB",
+ "\xD3\xEF" => "\xE9\x80\x84",
+ "\xD3\xF0" => "\xE8\xBF\xBC",
+ "\xD3\xF1" => "\xE8\xBF\xB6",
+ "\xD3\xF2" => "\xE9\x83\x96",
+ "\xD3\xF3" => "\xE9\x83\xA0",
+ "\xD3\xF4" => "\xE9\x83\x99",
+ "\xD3\xF5" => "\xE9\x83\x9A",
+ "\xD3\xF6" => "\xE9\x83\xA3",
+ "\xD3\xF7" => "\xE9\x83\x9F",
+ "\xD3\xF8" => "\xE9\x83\xA5",
+ "\xD3\xF9" => "\xE9\x83\x98",
+ "\xD3\xFA" => "\xE9\x83\x9B",
+ "\xD3\xFB" => "\xE9\x83\x97",
+ "\xD3\xFC" => "\xE9\x83\x9C",
+ "\xD3\xFD" => "\xE9\x83\xA4",
+ "\xD3\xFE" => "\xE9\x85\x90",
+ "\xD4\x40" => "\xE9\x85\x8E",
+ "\xD4\x41" => "\xE9\x85\x8F",
+ "\xD4\x42" => "\xE9\x87\x95",
+ "\xD4\x43" => "\xE9\x87\xA2",
+ "\xD4\x44" => "\xE9\x87\x9A",
+ "\xD4\x45" => "\xE9\x99\x9C",
+ "\xD4\x46" => "\xE9\x99\x9F",
+ "\xD4\x47" => "\xE9\x9A\xBC",
+ "\xD4\x48" => "\xE9\xA3\xA3",
+ "\xD4\x49" => "\xE9\xAB\x9F",
+ "\xD4\x4A" => "\xE9\xAC\xAF",
+ "\xD4\x4B" => "\xE4\xB9\xBF",
+ "\xD4\x4C" => "\xE5\x81\xB0",
+ "\xD4\x4D" => "\xE5\x81\xAA",
+ "\xD4\x4E" => "\xE5\x81\xA1",
+ "\xD4\x4F" => "\xE5\x81\x9E",
+ "\xD4\x50" => "\xE5\x81\xA0",
+ "\xD4\x51" => "\xE5\x81\x93",
+ "\xD4\x52" => "\xE5\x81\x8B",
+ "\xD4\x53" => "\xE5\x81\x9D",
+ "\xD4\x54" => "\xE5\x81\xB2",
+ "\xD4\x55" => "\xE5\x81\x88",
+ "\xD4\x56" => "\xE5\x81\x8D",
+ "\xD4\x57" => "\xE5\x81\x81",
+ "\xD4\x58" => "\xE5\x81\x9B",
+ "\xD4\x59" => "\xE5\x81\x8A",
+ "\xD4\x5A" => "\xE5\x81\xA2",
+ "\xD4\x5B" => "\xE5\x80\x95",
+ "\xD4\x5C" => "\xE5\x81\x85",
+ "\xD4\x5D" => "\xE5\x81\x9F",
+ "\xD4\x5E" => "\xE5\x81\xA9",
+ "\xD4\x5F" => "\xE5\x81\xAB",
+ "\xD4\x60" => "\xE5\x81\xA3",
+ "\xD4\x61" => "\xE5\x81\xA4",
+ "\xD4\x62" => "\xE5\x81\x86",
+ "\xD4\x63" => "\xE5\x81\x80",
+ "\xD4\x64" => "\xE5\x81\xAE",
+ "\xD4\x65" => "\xE5\x81\xB3",
+ "\xD4\x66" => "\xE5\x81\x97",
+ "\xD4\x67" => "\xE5\x81\x91",
+ "\xD4\x68" => "\xE5\x87\x90",
+ "\xD4\x69" => "\xE5\x89\xAB",
+ "\xD4\x6A" => "\xE5\x89\xAD",
+ "\xD4\x6B" => "\xE5\x89\xAC",
+ "\xD4\x6C" => "\xE5\x89\xAE",
+ "\xD4\x6D" => "\xE5\x8B\x96",
+ "\xD4\x6E" => "\xE5\x8B\x93",
+ "\xD4\x6F" => "\xE5\x8C\xAD",
+ "\xD4\x70" => "\xE5\x8E\x9C",
+ "\xD4\x71" => "\xE5\x95\xB5",
+ "\xD4\x72" => "\xE5\x95\xB6",
+ "\xD4\x73" => "\xE5\x94\xBC",
+ "\xD4\x74" => "\xE5\x95\x8D",
+ "\xD4\x75" => "\xE5\x95\x90",
+ "\xD4\x76" => "\xE5\x94\xB4",
+ "\xD4\x77" => "\xE5\x94\xAA",
+ "\xD4\x78" => "\xE5\x95\x91",
+ "\xD4\x79" => "\xE5\x95\xA2",
+ "\xD4\x7A" => "\xE5\x94\xB6",
+ "\xD4\x7B" => "\xE5\x94\xB5",
+ "\xD4\x7C" => "\xE5\x94\xB0",
+ "\xD4\x7D" => "\xE5\x95\x92",
+ "\xD4\x7E" => "\xE5\x95\x85",
+ "\xD4\xA1" => "\xE5\x94\x8C",
+ "\xD4\xA2" => "\xE5\x94\xB2",
+ "\xD4\xA3" => "\xE5\x95\xA5",
+ "\xD4\xA4" => "\xE5\x95\x8E",
+ "\xD4\xA5" => "\xE5\x94\xB9",
+ "\xD4\xA6" => "\xE5\x95\x88",
+ "\xD4\xA7" => "\xE5\x94\xAD",
+ "\xD4\xA8" => "\xE5\x94\xBB",
+ "\xD4\xA9" => "\xE5\x95\x80",
+ "\xD4\xAA" => "\xE5\x95\x8B",
+ "\xD4\xAB" => "\xE5\x9C\x8A",
+ "\xD4\xAC" => "\xE5\x9C\x87",
+ "\xD4\xAD" => "\xE5\x9F\xBB",
+ "\xD4\xAE" => "\xE5\xA0\x94",
+ "\xD4\xAF" => "\xE5\x9F\xA2",
+ "\xD4\xB0" => "\xE5\x9F\xB6",
+ "\xD4\xB1" => "\xE5\x9F\x9C",
+ "\xD4\xB2" => "\xE5\x9F\xB4",
+ "\xD4\xB3" => "\xE5\xA0\x80",
+ "\xD4\xB4" => "\xE5\x9F\xAD",
+ "\xD4\xB5" => "\xE5\x9F\xBD",
+ "\xD4\xB6" => "\xE5\xA0\x88",
+ "\xD4\xB7" => "\xE5\x9F\xB8",
+ "\xD4\xB8" => "\xE5\xA0\x8B",
+ "\xD4\xB9" => "\xE5\x9F\xB3",
+ "\xD4\xBA" => "\xE5\x9F\x8F",
+ "\xD4\xBB" => "\xE5\xA0\x87",
+ "\xD4\xBC" => "\xE5\x9F\xAE",
+ "\xD4\xBD" => "\xE5\x9F\xA3",
+ "\xD4\xBE" => "\xE5\x9F\xB2",
+ "\xD4\xBF" => "\xE5\x9F\xA5",
+ "\xD4\xC0" => "\xE5\x9F\xAC",
+ "\xD4\xC1" => "\xE5\x9F\xA1",
+ "\xD4\xC2" => "\xE5\xA0\x8E",
+ "\xD4\xC3" => "\xE5\x9F\xBC",
+ "\xD4\xC4" => "\xE5\xA0\x90",
+ "\xD4\xC5" => "\xE5\x9F\xA7",
+ "\xD4\xC6" => "\xE5\xA0\x81",
+ "\xD4\xC7" => "\xE5\xA0\x8C",
+ "\xD4\xC8" => "\xE5\x9F\xB1",
+ "\xD4\xC9" => "\xE5\x9F\xA9",
+ "\xD4\xCA" => "\xE5\x9F\xB0",
+ "\xD4\xCB" => "\xE5\xA0\x8D",
+ "\xD4\xCC" => "\xE5\xA0\x84",
+ "\xD4\xCD" => "\xE5\xA5\x9C",
+ "\xD4\xCE" => "\xE5\xA9\xA0",
+ "\xD4\xCF" => "\xE5\xA9\x98",
+ "\xD4\xD0" => "\xE5\xA9\x95",
+ "\xD4\xD1" => "\xE5\xA9\xA7",
+ "\xD4\xD2" => "\xE5\xA9\x9E",
+ "\xD4\xD3" => "\xE5\xA8\xB8",
+ "\xD4\xD4" => "\xE5\xA8\xB5",
+ "\xD4\xD5" => "\xE5\xA9\xAD",
+ "\xD4\xD6" => "\xE5\xA9\x90",
+ "\xD4\xD7" => "\xE5\xA9\x9F",
+ "\xD4\xD8" => "\xE5\xA9\xA5",
+ "\xD4\xD9" => "\xE5\xA9\xAC",
+ "\xD4\xDA" => "\xE5\xA9\x93",
+ "\xD4\xDB" => "\xE5\xA9\xA4",
+ "\xD4\xDC" => "\xE5\xA9\x97",
+ "\xD4\xDD" => "\xE5\xA9\x83",
+ "\xD4\xDE" => "\xE5\xA9\x9D",
+ "\xD4\xDF" => "\xE5\xA9\x92",
+ "\xD4\xE0" => "\xE5\xA9\x84",
+ "\xD4\xE1" => "\xE5\xA9\x9B",
+ "\xD4\xE2" => "\xE5\xA9\x88",
+ "\xD4\xE3" => "\xE5\xAA\x8E",
+ "\xD4\xE4" => "\xE5\xA8\xBE",
+ "\xD4\xE5" => "\xE5\xA9\x8D",
+ "\xD4\xE6" => "\xE5\xA8\xB9",
+ "\xD4\xE7" => "\xE5\xA9\x8C",
+ "\xD4\xE8" => "\xE5\xA9\xB0",
+ "\xD4\xE9" => "\xE5\xA9\xA9",
+ "\xD4\xEA" => "\xE5\xA9\x87",
+ "\xD4\xEB" => "\xE5\xA9\x91",
+ "\xD4\xEC" => "\xE5\xA9\x96",
+ "\xD4\xED" => "\xE5\xA9\x82",
+ "\xD4\xEE" => "\xE5\xA9\x9C",
+ "\xD4\xEF" => "\xE5\xAD\xB2",
+ "\xD4\xF0" => "\xE5\xAD\xAE",
+ "\xD4\xF1" => "\xE5\xAF\x81",
+ "\xD4\xF2" => "\xE5\xAF\x80",
+ "\xD4\xF3" => "\xE5\xB1\x99",
+ "\xD4\xF4" => "\xE5\xB4\x9E",
+ "\xD4\xF5" => "\xE5\xB4\x8B",
+ "\xD4\xF6" => "\xE5\xB4\x9D",
+ "\xD4\xF7" => "\xE5\xB4\x9A",
+ "\xD4\xF8" => "\xE5\xB4\xA0",
+ "\xD4\xF9" => "\xE5\xB4\x8C",
+ "\xD4\xFA" => "\xE5\xB4\xA8",
+ "\xD4\xFB" => "\xE5\xB4\x8D",
+ "\xD4\xFC" => "\xE5\xB4\xA6",
+ "\xD4\xFD" => "\xE5\xB4\xA5",
+ "\xD4\xFE" => "\xE5\xB4\x8F",
+ "\xD5\x40" => "\xE5\xB4\xB0",
+ "\xD5\x41" => "\xE5\xB4\x92",
+ "\xD5\x42" => "\xE5\xB4\xA3",
+ "\xD5\x43" => "\xE5\xB4\x9F",
+ "\xD5\x44" => "\xE5\xB4\xAE",
+ "\xD5\x45" => "\xE5\xB8\xBE",
+ "\xD5\x46" => "\xE5\xB8\xB4",
+ "\xD5\x47" => "\xE5\xBA\xB1",
+ "\xD5\x48" => "\xE5\xBA\xB4",
+ "\xD5\x49" => "\xE5\xBA\xB9",
+ "\xD5\x4A" => "\xE5\xBA\xB2",
+ "\xD5\x4B" => "\xE5\xBA\xB3",
+ "\xD5\x4C" => "\xE5\xBC\xB6",
+ "\xD5\x4D" => "\xE5\xBC\xB8",
+ "\xD5\x4E" => "\xE5\xBE\x9B",
+ "\xD5\x4F" => "\xE5\xBE\x96",
+ "\xD5\x50" => "\xE5\xBE\x9F",
+ "\xD5\x51" => "\xE6\x82\x8A",
+ "\xD5\x52" => "\xE6\x82\x90",
+ "\xD5\x53" => "\xE6\x82\x86",
+ "\xD5\x54" => "\xE6\x82\xBE",
+ "\xD5\x55" => "\xE6\x82\xB0",
+ "\xD5\x56" => "\xE6\x82\xBA",
+ "\xD5\x57" => "\xE6\x83\x93",
+ "\xD5\x58" => "\xE6\x83\x94",
+ "\xD5\x59" => "\xE6\x83\x8F",
+ "\xD5\x5A" => "\xE6\x83\xA4",
+ "\xD5\x5B" => "\xE6\x83\x99",
+ "\xD5\x5C" => "\xE6\x83\x9D",
+ "\xD5\x5D" => "\xE6\x83\x88",
+ "\xD5\x5E" => "\xE6\x82\xB1",
+ "\xD5\x5F" => "\xE6\x83\x9B",
+ "\xD5\x60" => "\xE6\x82\xB7",
+ "\xD5\x61" => "\xE6\x83\x8A",
+ "\xD5\x62" => "\xE6\x82\xBF",
+ "\xD5\x63" => "\xE6\x83\x83",
+ "\xD5\x64" => "\xE6\x83\x8D",
+ "\xD5\x65" => "\xE6\x83\x80",
+ "\xD5\x66" => "\xE6\x8C\xB2",
+ "\xD5\x67" => "\xE6\x8D\xA5",
+ "\xD5\x68" => "\xE6\x8E\x8A",
+ "\xD5\x69" => "\xE6\x8E\x82",
+ "\xD5\x6A" => "\xE6\x8D\xBD",
+ "\xD5\x6B" => "\xE6\x8E\xBD",
+ "\xD5\x6C" => "\xE6\x8E\x9E",
+ "\xD5\x6D" => "\xE6\x8E\xAD",
+ "\xD5\x6E" => "\xE6\x8E\x9D",
+ "\xD5\x6F" => "\xE6\x8E\x97",
+ "\xD5\x70" => "\xE6\x8E\xAB",
+ "\xD5\x71" => "\xE6\x8E\x8E",
+ "\xD5\x72" => "\xE6\x8D\xAF",
+ "\xD5\x73" => "\xE6\x8E\x87",
+ "\xD5\x74" => "\xE6\x8E\x90",
+ "\xD5\x75" => "\xE6\x8D\xAE",
+ "\xD5\x76" => "\xE6\x8E\xAF",
+ "\xD5\x77" => "\xE6\x8D\xB5",
+ "\xD5\x78" => "\xE6\x8E\x9C",
+ "\xD5\x79" => "\xE6\x8D\xAD",
+ "\xD5\x7A" => "\xE6\x8E\xAE",
+ "\xD5\x7B" => "\xE6\x8D\xBC",
+ "\xD5\x7C" => "\xE6\x8E\xA4",
+ "\xD5\x7D" => "\xE6\x8C\xBB",
+ "\xD5\x7E" => "\xE6\x8E\x9F",
+ "\xD5\xA1" => "\xE6\x8D\xB8",
+ "\xD5\xA2" => "\xE6\x8E\x85",
+ "\xD5\xA3" => "\xE6\x8E\x81",
+ "\xD5\xA4" => "\xE6\x8E\x91",
+ "\xD5\xA5" => "\xE6\x8E\x8D",
+ "\xD5\xA6" => "\xE6\x8D\xB0",
+ "\xD5\xA7" => "\xE6\x95\x93",
+ "\xD5\xA8" => "\xE6\x97\x8D",
+ "\xD5\xA9" => "\xE6\x99\xA5",
+ "\xD5\xAA" => "\xE6\x99\xA1",
+ "\xD5\xAB" => "\xE6\x99\x9B",
+ "\xD5\xAC" => "\xE6\x99\x99",
+ "\xD5\xAD" => "\xE6\x99\x9C",
+ "\xD5\xAE" => "\xE6\x99\xA2",
+ "\xD5\xAF" => "\xE6\x9C\x98",
+ "\xD5\xB0" => "\xE6\xA1\xB9",
+ "\xD5\xB1" => "\xE6\xA2\x87",
+ "\xD5\xB2" => "\xE6\xA2\x90",
+ "\xD5\xB3" => "\xE6\xA2\x9C",
+ "\xD5\xB4" => "\xE6\xA1\xAD",
+ "\xD5\xB5" => "\xE6\xA1\xAE",
+ "\xD5\xB6" => "\xE6\xA2\xAE",
+ "\xD5\xB7" => "\xE6\xA2\xAB",
+ "\xD5\xB8" => "\xE6\xA5\x96",
+ "\xD5\xB9" => "\xE6\xA1\xAF",
+ "\xD5\xBA" => "\xE6\xA2\xA3",
+ "\xD5\xBB" => "\xE6\xA2\xAC",
+ "\xD5\xBC" => "\xE6\xA2\xA9",
+ "\xD5\xBD" => "\xE6\xA1\xB5",
+ "\xD5\xBE" => "\xE6\xA1\xB4",
+ "\xD5\xBF" => "\xE6\xA2\xB2",
+ "\xD5\xC0" => "\xE6\xA2\x8F",
+ "\xD5\xC1" => "\xE6\xA1\xB7",
+ "\xD5\xC2" => "\xE6\xA2\x92",
+ "\xD5\xC3" => "\xE6\xA1\xBC",
+ "\xD5\xC4" => "\xE6\xA1\xAB",
+ "\xD5\xC5" => "\xE6\xA1\xB2",
+ "\xD5\xC6" => "\xE6\xA2\xAA",
+ "\xD5\xC7" => "\xE6\xA2\x80",
+ "\xD5\xC8" => "\xE6\xA1\xB1",
+ "\xD5\xC9" => "\xE6\xA1\xBE",
+ "\xD5\xCA" => "\xE6\xA2\x9B",
+ "\xD5\xCB" => "\xE6\xA2\x96",
+ "\xD5\xCC" => "\xE6\xA2\x8B",
+ "\xD5\xCD" => "\xE6\xA2\xA0",
+ "\xD5\xCE" => "\xE6\xA2\x89",
+ "\xD5\xCF" => "\xE6\xA2\xA4",
+ "\xD5\xD0" => "\xE6\xA1\xB8",
+ "\xD5\xD1" => "\xE6\xA1\xBB",
+ "\xD5\xD2" => "\xE6\xA2\x91",
+ "\xD5\xD3" => "\xE6\xA2\x8C",
+ "\xD5\xD4" => "\xE6\xA2\x8A",
+ "\xD5\xD5" => "\xE6\xA1\xBD",
+ "\xD5\xD6" => "\xE6\xAC\xB6",
+ "\xD5\xD7" => "\xE6\xAC\xB3",
+ "\xD5\xD8" => "\xE6\xAC\xB7",
+ "\xD5\xD9" => "\xE6\xAC\xB8",
+ "\xD5\xDA" => "\xE6\xAE\x91",
+ "\xD5\xDB" => "\xE6\xAE\x8F",
+ "\xD5\xDC" => "\xE6\xAE\x8D",
+ "\xD5\xDD" => "\xE6\xAE\x8E",
+ "\xD5\xDE" => "\xE6\xAE\x8C",
+ "\xD5\xDF" => "\xE6\xB0\xAA",
+ "\xD5\xE0" => "\xE6\xB7\x80",
+ "\xD5\xE1" => "\xE6\xB6\xAB",
+ "\xD5\xE2" => "\xE6\xB6\xB4",
+ "\xD5\xE3" => "\xE6\xB6\xB3",
+ "\xD5\xE4" => "\xE6\xB9\xB4",
+ "\xD5\xE5" => "\xE6\xB6\xAC",
+ "\xD5\xE6" => "\xE6\xB7\xA9",
+ "\xD5\xE7" => "\xE6\xB7\xA2",
+ "\xD5\xE8" => "\xE6\xB6\xB7",
+ "\xD5\xE9" => "\xE6\xB7\xB6",
+ "\xD5\xEA" => "\xE6\xB7\x94",
+ "\xD5\xEB" => "\xE6\xB8\x80",
+ "\xD5\xEC" => "\xE6\xB7\x88",
+ "\xD5\xED" => "\xE6\xB7\xA0",
+ "\xD5\xEE" => "\xE6\xB7\x9F",
+ "\xD5\xEF" => "\xE6\xB7\x96",
+ "\xD5\xF0" => "\xE6\xB6\xBE",
+ "\xD5\xF1" => "\xE6\xB7\xA5",
+ "\xD5\xF2" => "\xE6\xB7\x9C",
+ "\xD5\xF3" => "\xE6\xB7\x9D",
+ "\xD5\xF4" => "\xE6\xB7\x9B",
+ "\xD5\xF5" => "\xE6\xB7\xB4",
+ "\xD5\xF6" => "\xE6\xB7\x8A",
+ "\xD5\xF7" => "\xE6\xB6\xBD",
+ "\xD5\xF8" => "\xE6\xB7\xAD",
+ "\xD5\xF9" => "\xE6\xB7\xB0",
+ "\xD5\xFA" => "\xE6\xB6\xBA",
+ "\xD5\xFB" => "\xE6\xB7\x95",
+ "\xD5\xFC" => "\xE6\xB7\x82",
+ "\xD5\xFD" => "\xE6\xB7\x8F",
+ "\xD5\xFE" => "\xE6\xB7\x89",
+ "\xD6\x40" => "\xE6\xB7\x90",
+ "\xD6\x41" => "\xE6\xB7\xB2",
+ "\xD6\x42" => "\xE6\xB7\x93",
+ "\xD6\x43" => "\xE6\xB7\xBD",
+ "\xD6\x44" => "\xE6\xB7\x97",
+ "\xD6\x45" => "\xE6\xB7\x8D",
+ "\xD6\x46" => "\xE6\xB7\xA3",
+ "\xD6\x47" => "\xE6\xB6\xBB",
+ "\xD6\x48" => "\xE7\x83\xBA",
+ "\xD6\x49" => "\xE7\x84\x8D",
+ "\xD6\x4A" => "\xE7\x83\xB7",
+ "\xD6\x4B" => "\xE7\x84\x97",
+ "\xD6\x4C" => "\xE7\x83\xB4",
+ "\xD6\x4D" => "\xE7\x84\x8C",
+ "\xD6\x4E" => "\xE7\x83\xB0",
+ "\xD6\x4F" => "\xE7\x84\x84",
+ "\xD6\x50" => "\xE7\x83\xB3",
+ "\xD6\x51" => "\xE7\x84\x90",
+ "\xD6\x52" => "\xE7\x83\xBC",
+ "\xD6\x53" => "\xE7\x83\xBF",
+ "\xD6\x54" => "\xE7\x84\x86",
+ "\xD6\x55" => "\xE7\x84\x93",
+ "\xD6\x56" => "\xE7\x84\x80",
+ "\xD6\x57" => "\xE7\x83\xB8",
+ "\xD6\x58" => "\xE7\x83\xB6",
+ "\xD6\x59" => "\xE7\x84\x8B",
+ "\xD6\x5A" => "\xE7\x84\x82",
+ "\xD6\x5B" => "\xE7\x84\x8E",
+ "\xD6\x5C" => "\xE7\x89\xBE",
+ "\xD6\x5D" => "\xE7\x89\xBB",
+ "\xD6\x5E" => "\xE7\x89\xBC",
+ "\xD6\x5F" => "\xE7\x89\xBF",
+ "\xD6\x60" => "\xE7\x8C\x9D",
+ "\xD6\x61" => "\xE7\x8C\x97",
+ "\xD6\x62" => "\xE7\x8C\x87",
+ "\xD6\x63" => "\xE7\x8C\x91",
+ "\xD6\x64" => "\xE7\x8C\x98",
+ "\xD6\x65" => "\xE7\x8C\x8A",
+ "\xD6\x66" => "\xE7\x8C\x88",
+ "\xD6\x67" => "\xE7\x8B\xBF",
+ "\xD6\x68" => "\xE7\x8C\x8F",
+ "\xD6\x69" => "\xE7\x8C\x9E",
+ "\xD6\x6A" => "\xE7\x8E\x88",
+ "\xD6\x6B" => "\xE7\x8F\xB6",
+ "\xD6\x6C" => "\xE7\x8F\xB8",
+ "\xD6\x6D" => "\xE7\x8F\xB5",
+ "\xD6\x6E" => "\xE7\x90\x84",
+ "\xD6\x6F" => "\xE7\x90\x81",
+ "\xD6\x70" => "\xE7\x8F\xBD",
+ "\xD6\x71" => "\xE7\x90\x87",
+ "\xD6\x72" => "\xE7\x90\x80",
+ "\xD6\x73" => "\xE7\x8F\xBA",
+ "\xD6\x74" => "\xE7\x8F\xBC",
+ "\xD6\x75" => "\xE7\x8F\xBF",
+ "\xD6\x76" => "\xE7\x90\x8C",
+ "\xD6\x77" => "\xE7\x90\x8B",
+ "\xD6\x78" => "\xE7\x8F\xB4",
+ "\xD6\x79" => "\xE7\x90\x88",
+ "\xD6\x7A" => "\xE7\x95\xA4",
+ "\xD6\x7B" => "\xE7\x95\xA3",
+ "\xD6\x7C" => "\xE7\x97\x8E",
+ "\xD6\x7D" => "\xE7\x97\x92",
+ "\xD6\x7E" => "\xE7\x97\x8F",
+ "\xD6\xA1" => "\xE7\x97\x8B",
+ "\xD6\xA2" => "\xE7\x97\x8C",
+ "\xD6\xA3" => "\xE7\x97\x91",
+ "\xD6\xA4" => "\xE7\x97\x90",
+ "\xD6\xA5" => "\xE7\x9A\x8F",
+ "\xD6\xA6" => "\xE7\x9A\x89",
+ "\xD6\xA7" => "\xE7\x9B\x93",
+ "\xD6\xA8" => "\xE7\x9C\xB9",
+ "\xD6\xA9" => "\xE7\x9C\xAF",
+ "\xD6\xAA" => "\xE7\x9C\xAD",
+ "\xD6\xAB" => "\xE7\x9C\xB1",
+ "\xD6\xAC" => "\xE7\x9C\xB2",
+ "\xD6\xAD" => "\xE7\x9C\xB4",
+ "\xD6\xAE" => "\xE7\x9C\xB3",
+ "\xD6\xAF" => "\xE7\x9C\xBD",
+ "\xD6\xB0" => "\xE7\x9C\xA5",
+ "\xD6\xB1" => "\xE7\x9C\xBB",
+ "\xD6\xB2" => "\xE7\x9C\xB5",
+ "\xD6\xB3" => "\xE7\xA1\x88",
+ "\xD6\xB4" => "\xE7\xA1\x92",
+ "\xD6\xB5" => "\xE7\xA1\x89",
+ "\xD6\xB6" => "\xE7\xA1\x8D",
+ "\xD6\xB7" => "\xE7\xA1\x8A",
+ "\xD6\xB8" => "\xE7\xA1\x8C",
+ "\xD6\xB9" => "\xE7\xA0\xA6",
+ "\xD6\xBA" => "\xE7\xA1\x85",
+ "\xD6\xBB" => "\xE7\xA1\x90",
+ "\xD6\xBC" => "\xE7\xA5\xA4",
+ "\xD6\xBD" => "\xE7\xA5\xA7",
+ "\xD6\xBE" => "\xE7\xA5\xA9",
+ "\xD6\xBF" => "\xE7\xA5\xAA",
+ "\xD6\xC0" => "\xE7\xA5\xA3",
+ "\xD6\xC1" => "\xE7\xA5\xAB",
+ "\xD6\xC2" => "\xE7\xA5\xA1",
+ "\xD6\xC3" => "\xE7\xA6\xBB",
+ "\xD6\xC4" => "\xE7\xA7\xBA",
+ "\xD6\xC5" => "\xE7\xA7\xB8",
+ "\xD6\xC6" => "\xE7\xA7\xB6",
+ "\xD6\xC7" => "\xE7\xA7\xB7",
+ "\xD6\xC8" => "\xE7\xAA\x8F",
+ "\xD6\xC9" => "\xE7\xAA\x94",
+ "\xD6\xCA" => "\xE7\xAA\x90",
+ "\xD6\xCB" => "\xE7\xAC\xB5",
+ "\xD6\xCC" => "\xE7\xAD\x87",
+ "\xD6\xCD" => "\xE7\xAC\xB4",
+ "\xD6\xCE" => "\xE7\xAC\xA5",
+ "\xD6\xCF" => "\xE7\xAC\xB0",
+ "\xD6\xD0" => "\xE7\xAC\xA2",
+ "\xD6\xD1" => "\xE7\xAC\xA4",
+ "\xD6\xD2" => "\xE7\xAC\xB3",
+ "\xD6\xD3" => "\xE7\xAC\x98",
+ "\xD6\xD4" => "\xE7\xAC\xAA",
+ "\xD6\xD5" => "\xE7\xAC\x9D",
+ "\xD6\xD6" => "\xE7\xAC\xB1",
+ "\xD6\xD7" => "\xE7\xAC\xAB",
+ "\xD6\xD8" => "\xE7\xAC\xAD",
+ "\xD6\xD9" => "\xE7\xAC\xAF",
+ "\xD6\xDA" => "\xE7\xAC\xB2",
+ "\xD6\xDB" => "\xE7\xAC\xB8",
+ "\xD6\xDC" => "\xE7\xAC\x9A",
+ "\xD6\xDD" => "\xE7\xAC\xA3",
+ "\xD6\xDE" => "\xE7\xB2\x94",
+ "\xD6\xDF" => "\xE7\xB2\x98",
+ "\xD6\xE0" => "\xE7\xB2\x96",
+ "\xD6\xE1" => "\xE7\xB2\xA3",
+ "\xD6\xE2" => "\xE7\xB4\xB5",
+ "\xD6\xE3" => "\xE7\xB4\xBD",
+ "\xD6\xE4" => "\xE7\xB4\xB8",
+ "\xD6\xE5" => "\xE7\xB4\xB6",
+ "\xD6\xE6" => "\xE7\xB4\xBA",
+ "\xD6\xE7" => "\xE7\xB5\x85",
+ "\xD6\xE8" => "\xE7\xB4\xAC",
+ "\xD6\xE9" => "\xE7\xB4\xA9",
+ "\xD6\xEA" => "\xE7\xB5\x81",
+ "\xD6\xEB" => "\xE7\xB5\x87",
+ "\xD6\xEC" => "\xE7\xB4\xBE",
+ "\xD6\xED" => "\xE7\xB4\xBF",
+ "\xD6\xEE" => "\xE7\xB5\x8A",
+ "\xD6\xEF" => "\xE7\xB4\xBB",
+ "\xD6\xF0" => "\xE7\xB4\xA8",
+ "\xD6\xF1" => "\xE7\xBD\xA3",
+ "\xD6\xF2" => "\xE7\xBE\x95",
+ "\xD6\xF3" => "\xE7\xBE\x9C",
+ "\xD6\xF4" => "\xE7\xBE\x9D",
+ "\xD6\xF5" => "\xE7\xBE\x9B",
+ "\xD6\xF6" => "\xE7\xBF\x8A",
+ "\xD6\xF7" => "\xE7\xBF\x8B",
+ "\xD6\xF8" => "\xE7\xBF\x8D",
+ "\xD6\xF9" => "\xE7\xBF\x90",
+ "\xD6\xFA" => "\xE7\xBF\x91",
+ "\xD6\xFB" => "\xE7\xBF\x87",
+ "\xD6\xFC" => "\xE7\xBF\x8F",
+ "\xD6\xFD" => "\xE7\xBF\x89",
+ "\xD6\xFE" => "\xE8\x80\x9F",
+ "\xD7\x40" => "\xE8\x80\x9E",
+ "\xD7\x41" => "\xE8\x80\x9B",
+ "\xD7\x42" => "\xE8\x81\x87",
+ "\xD7\x43" => "\xE8\x81\x83",
+ "\xD7\x44" => "\xE8\x81\x88",
+ "\xD7\x45" => "\xE8\x84\x98",
+ "\xD7\x46" => "\xE8\x84\xA5",
+ "\xD7\x47" => "\xE8\x84\x99",
+ "\xD7\x48" => "\xE8\x84\x9B",
+ "\xD7\x49" => "\xE8\x84\xAD",
+ "\xD7\x4A" => "\xE8\x84\x9F",
+ "\xD7\x4B" => "\xE8\x84\xAC",
+ "\xD7\x4C" => "\xE8\x84\x9E",
+ "\xD7\x4D" => "\xE8\x84\xA1",
+ "\xD7\x4E" => "\xE8\x84\x95",
+ "\xD7\x4F" => "\xE8\x84\xA7",
+ "\xD7\x50" => "\xE8\x84\x9D",
+ "\xD7\x51" => "\xE8\x84\xA2",
+ "\xD7\x52" => "\xE8\x88\x91",
+ "\xD7\x53" => "\xE8\x88\xB8",
+ "\xD7\x54" => "\xE8\x88\xB3",
+ "\xD7\x55" => "\xE8\x88\xBA",
+ "\xD7\x56" => "\xE8\x88\xB4",
+ "\xD7\x57" => "\xE8\x88\xB2",
+ "\xD7\x58" => "\xE8\x89\xB4",
+ "\xD7\x59" => "\xE8\x8E\x90",
+ "\xD7\x5A" => "\xE8\x8E\xA3",
+ "\xD7\x5B" => "\xE8\x8E\xA8",
+ "\xD7\x5C" => "\xE8\x8E\x8D",
+ "\xD7\x5D" => "\xE8\x8D\xBA",
+ "\xD7\x5E" => "\xE8\x8D\xB3",
+ "\xD7\x5F" => "\xE8\x8E\xA4",
+ "\xD7\x60" => "\xE8\x8D\xB4",
+ "\xD7\x61" => "\xE8\x8E\x8F",
+ "\xD7\x62" => "\xE8\x8E\x81",
+ "\xD7\x63" => "\xE8\x8E\x95",
+ "\xD7\x64" => "\xE8\x8E\x99",
+ "\xD7\x65" => "\xE8\x8D\xB5",
+ "\xD7\x66" => "\xE8\x8E\x94",
+ "\xD7\x67" => "\xE8\x8E\xA9",
+ "\xD7\x68" => "\xE8\x8D\xBD",
+ "\xD7\x69" => "\xE8\x8E\x83",
+ "\xD7\x6A" => "\xE8\x8E\x8C",
+ "\xD7\x6B" => "\xE8\x8E\x9D",
+ "\xD7\x6C" => "\xE8\x8E\x9B",
+ "\xD7\x6D" => "\xE8\x8E\xAA",
+ "\xD7\x6E" => "\xE8\x8E\x8B",
+ "\xD7\x6F" => "\xE8\x8D\xBE",
+ "\xD7\x70" => "\xE8\x8E\xA5",
+ "\xD7\x71" => "\xE8\x8E\xAF",
+ "\xD7\x72" => "\xE8\x8E\x88",
+ "\xD7\x73" => "\xE8\x8E\x97",
+ "\xD7\x74" => "\xE8\x8E\xB0",
+ "\xD7\x75" => "\xE8\x8D\xBF",
+ "\xD7\x76" => "\xE8\x8E\xA6",
+ "\xD7\x77" => "\xE8\x8E\x87",
+ "\xD7\x78" => "\xE8\x8E\xAE",
+ "\xD7\x79" => "\xE8\x8D\xB6",
+ "\xD7\x7A" => "\xE8\x8E\x9A",
+ "\xD7\x7B" => "\xE8\x99\x99",
+ "\xD7\x7C" => "\xE8\x99\x96",
+ "\xD7\x7D" => "\xE8\x9A\xBF",
+ "\xD7\x7E" => "\xE8\x9A\xB7",
+ "\xD7\xA1" => "\xE8\x9B\x82",
+ "\xD7\xA2" => "\xE8\x9B\x81",
+ "\xD7\xA3" => "\xE8\x9B\x85",
+ "\xD7\xA4" => "\xE8\x9A\xBA",
+ "\xD7\xA5" => "\xE8\x9A\xB0",
+ "\xD7\xA6" => "\xE8\x9B\x88",
+ "\xD7\xA7" => "\xE8\x9A\xB9",
+ "\xD7\xA8" => "\xE8\x9A\xB3",
+ "\xD7\xA9" => "\xE8\x9A\xB8",
+ "\xD7\xAA" => "\xE8\x9B\x8C",
+ "\xD7\xAB" => "\xE8\x9A\xB4",
+ "\xD7\xAC" => "\xE8\x9A\xBB",
+ "\xD7\xAD" => "\xE8\x9A\xBC",
+ "\xD7\xAE" => "\xE8\x9B\x83",
+ "\xD7\xAF" => "\xE8\x9A\xBD",
+ "\xD7\xB0" => "\xE8\x9A\xBE",
+ "\xD7\xB1" => "\xE8\xA1\x92",
+ "\xD7\xB2" => "\xE8\xA2\x89",
+ "\xD7\xB3" => "\xE8\xA2\x95",
+ "\xD7\xB4" => "\xE8\xA2\xA8",
+ "\xD7\xB5" => "\xE8\xA2\xA2",
+ "\xD7\xB6" => "\xE8\xA2\xAA",
+ "\xD7\xB7" => "\xE8\xA2\x9A",
+ "\xD7\xB8" => "\xE8\xA2\x91",
+ "\xD7\xB9" => "\xE8\xA2\xA1",
+ "\xD7\xBA" => "\xE8\xA2\x9F",
+ "\xD7\xBB" => "\xE8\xA2\x98",
+ "\xD7\xBC" => "\xE8\xA2\xA7",
+ "\xD7\xBD" => "\xE8\xA2\x99",
+ "\xD7\xBE" => "\xE8\xA2\x9B",
+ "\xD7\xBF" => "\xE8\xA2\x97",
+ "\xD7\xC0" => "\xE8\xA2\xA4",
+ "\xD7\xC1" => "\xE8\xA2\xAC",
+ "\xD7\xC2" => "\xE8\xA2\x8C",
+ "\xD7\xC3" => "\xE8\xA2\x93",
+ "\xD7\xC4" => "\xE8\xA2\x8E",
+ "\xD7\xC5" => "\xE8\xA6\x82",
+ "\xD7\xC6" => "\xE8\xA7\x96",
+ "\xD7\xC7" => "\xE8\xA7\x99",
+ "\xD7\xC8" => "\xE8\xA7\x95",
+ "\xD7\xC9" => "\xE8\xA8\xB0",
+ "\xD7\xCA" => "\xE8\xA8\xA7",
+ "\xD7\xCB" => "\xE8\xA8\xAC",
+ "\xD7\xCC" => "\xE8\xA8\x9E",
+ "\xD7\xCD" => "\xE8\xB0\xB9",
+ "\xD7\xCE" => "\xE8\xB0\xBB",
+ "\xD7\xCF" => "\xE8\xB1\x9C",
+ "\xD7\xD0" => "\xE8\xB1\x9D",
+ "\xD7\xD1" => "\xE8\xB1\xBD",
+ "\xD7\xD2" => "\xE8\xB2\xA5",
+ "\xD7\xD3" => "\xE8\xB5\xBD",
+ "\xD7\xD4" => "\xE8\xB5\xBB",
+ "\xD7\xD5" => "\xE8\xB5\xB9",
+ "\xD7\xD6" => "\xE8\xB6\xBC",
+ "\xD7\xD7" => "\xE8\xB7\x82",
+ "\xD7\xD8" => "\xE8\xB6\xB9",
+ "\xD7\xD9" => "\xE8\xB6\xBF",
+ "\xD7\xDA" => "\xE8\xB7\x81",
+ "\xD7\xDB" => "\xE8\xBB\x98",
+ "\xD7\xDC" => "\xE8\xBB\x9E",
+ "\xD7\xDD" => "\xE8\xBB\x9D",
+ "\xD7\xDE" => "\xE8\xBB\x9C",
+ "\xD7\xDF" => "\xE8\xBB\x97",
+ "\xD7\xE0" => "\xE8\xBB\xA0",
+ "\xD7\xE1" => "\xE8\xBB\xA1",
+ "\xD7\xE2" => "\xE9\x80\xA4",
+ "\xD7\xE3" => "\xE9\x80\x8B",
+ "\xD7\xE4" => "\xE9\x80\x91",
+ "\xD7\xE5" => "\xE9\x80\x9C",
+ "\xD7\xE6" => "\xE9\x80\x8C",
+ "\xD7\xE7" => "\xE9\x80\xA1",
+ "\xD7\xE8" => "\xE9\x83\xAF",
+ "\xD7\xE9" => "\xE9\x83\xAA",
+ "\xD7\xEA" => "\xE9\x83\xB0",
+ "\xD7\xEB" => "\xE9\x83\xB4",
+ "\xD7\xEC" => "\xE9\x83\xB2",
+ "\xD7\xED" => "\xE9\x83\xB3",
+ "\xD7\xEE" => "\xE9\x83\x94",
+ "\xD7\xEF" => "\xE9\x83\xAB",
+ "\xD7\xF0" => "\xE9\x83\xAC",
+ "\xD7\xF1" => "\xE9\x83\xA9",
+ "\xD7\xF2" => "\xE9\x85\x96",
+ "\xD7\xF3" => "\xE9\x85\x98",
+ "\xD7\xF4" => "\xE9\x85\x9A",
+ "\xD7\xF5" => "\xE9\x85\x93",
+ "\xD7\xF6" => "\xE9\x85\x95",
+ "\xD7\xF7" => "\xE9\x87\xAC",
+ "\xD7\xF8" => "\xE9\x87\xB4",
+ "\xD7\xF9" => "\xE9\x87\xB1",
+ "\xD7\xFA" => "\xE9\x87\xB3",
+ "\xD7\xFB" => "\xE9\x87\xB8",
+ "\xD7\xFC" => "\xE9\x87\xA4",
+ "\xD7\xFD" => "\xE9\x87\xB9",
+ "\xD7\xFE" => "\xE9\x87\xAA",
+ "\xD8\x40" => "\xE9\x87\xAB",
+ "\xD8\x41" => "\xE9\x87\xB7",
+ "\xD8\x42" => "\xE9\x87\xA8",
+ "\xD8\x43" => "\xE9\x87\xAE",
+ "\xD8\x44" => "\xE9\x95\xBA",
+ "\xD8\x45" => "\xE9\x96\x86",
+ "\xD8\x46" => "\xE9\x96\x88",
+ "\xD8\x47" => "\xE9\x99\xBC",
+ "\xD8\x48" => "\xE9\x99\xAD",
+ "\xD8\x49" => "\xE9\x99\xAB",
+ "\xD8\x4A" => "\xE9\x99\xB1",
+ "\xD8\x4B" => "\xE9\x99\xAF",
+ "\xD8\x4C" => "\xE9\x9A\xBF",
+ "\xD8\x4D" => "\xE9\x9D\xAA",
+ "\xD8\x4E" => "\xE9\xA0\x84",
+ "\xD8\x4F" => "\xE9\xA3\xA5",
+ "\xD8\x50" => "\xE9\xA6\x97",
+ "\xD8\x51" => "\xE5\x82\x9B",
+ "\xD8\x52" => "\xE5\x82\x95",
+ "\xD8\x53" => "\xE5\x82\x94",
+ "\xD8\x54" => "\xE5\x82\x9E",
+ "\xD8\x55" => "\xE5\x82\x8B",
+ "\xD8\x56" => "\xE5\x82\xA3",
+ "\xD8\x57" => "\xE5\x82\x83",
+ "\xD8\x58" => "\xE5\x82\x8C",
+ "\xD8\x59" => "\xE5\x82\x8E",
+ "\xD8\x5A" => "\xE5\x82\x9D",
+ "\xD8\x5B" => "\xE5\x81\xA8",
+ "\xD8\x5C" => "\xE5\x82\x9C",
+ "\xD8\x5D" => "\xE5\x82\x92",
+ "\xD8\x5E" => "\xE5\x82\x82",
+ "\xD8\x5F" => "\xE5\x82\x87",
+ "\xD8\x60" => "\xE5\x85\x9F",
+ "\xD8\x61" => "\xE5\x87\x94",
+ "\xD8\x62" => "\xE5\x8C\x92",
+ "\xD8\x63" => "\xE5\x8C\x91",
+ "\xD8\x64" => "\xE5\x8E\xA4",
+ "\xD8\x65" => "\xE5\x8E\xA7",
+ "\xD8\x66" => "\xE5\x96\x91",
+ "\xD8\x67" => "\xE5\x96\xA8",
+ "\xD8\x68" => "\xE5\x96\xA5",
+ "\xD8\x69" => "\xE5\x96\xAD",
+ "\xD8\x6A" => "\xE5\x95\xB7",
+ "\xD8\x6B" => "\xE5\x99\x85",
+ "\xD8\x6C" => "\xE5\x96\xA2",
+ "\xD8\x6D" => "\xE5\x96\x93",
+ "\xD8\x6E" => "\xE5\x96\x88",
+ "\xD8\x6F" => "\xE5\x96\x8F",
+ "\xD8\x70" => "\xE5\x96\xB5",
+ "\xD8\x71" => "\xE5\x96\x81",
+ "\xD8\x72" => "\xE5\x96\xA3",
+ "\xD8\x73" => "\xE5\x96\x92",
+ "\xD8\x74" => "\xE5\x96\xA4",
+ "\xD8\x75" => "\xE5\x95\xBD",
+ "\xD8\x76" => "\xE5\x96\x8C",
+ "\xD8\x77" => "\xE5\x96\xA6",
+ "\xD8\x78" => "\xE5\x95\xBF",
+ "\xD8\x79" => "\xE5\x96\x95",
+ "\xD8\x7A" => "\xE5\x96\xA1",
+ "\xD8\x7B" => "\xE5\x96\x8E",
+ "\xD8\x7C" => "\xE5\x9C\x8C",
+ "\xD8\x7D" => "\xE5\xA0\xA9",
+ "\xD8\x7E" => "\xE5\xA0\xB7",
+ "\xD8\xA1" => "\xE5\xA0\x99",
+ "\xD8\xA2" => "\xE5\xA0\x9E",
+ "\xD8\xA3" => "\xE5\xA0\xA7",
+ "\xD8\xA4" => "\xE5\xA0\xA3",
+ "\xD8\xA5" => "\xE5\xA0\xA8",
+ "\xD8\xA6" => "\xE5\x9F\xB5",
+ "\xD8\xA7" => "\xE5\xA1\x88",
+ "\xD8\xA8" => "\xE5\xA0\xA5",
+ "\xD8\xA9" => "\xE5\xA0\x9C",
+ "\xD8\xAA" => "\xE5\xA0\x9B",
+ "\xD8\xAB" => "\xE5\xA0\xB3",
+ "\xD8\xAC" => "\xE5\xA0\xBF",
+ "\xD8\xAD" => "\xE5\xA0\xB6",
+ "\xD8\xAE" => "\xE5\xA0\xAE",
+ "\xD8\xAF" => "\xE5\xA0\xB9",
+ "\xD8\xB0" => "\xE5\xA0\xB8",
+ "\xD8\xB1" => "\xE5\xA0\xAD",
+ "\xD8\xB2" => "\xE5\xA0\xAC",
+ "\xD8\xB3" => "\xE5\xA0\xBB",
+ "\xD8\xB4" => "\xE5\xA5\xA1",
+ "\xD8\xB5" => "\xE5\xAA\xAF",
+ "\xD8\xB6" => "\xE5\xAA\x94",
+ "\xD8\xB7" => "\xE5\xAA\x9F",
+ "\xD8\xB8" => "\xE5\xA9\xBA",
+ "\xD8\xB9" => "\xE5\xAA\xA2",
+ "\xD8\xBA" => "\xE5\xAA\x9E",
+ "\xD8\xBB" => "\xE5\xA9\xB8",
+ "\xD8\xBC" => "\xE5\xAA\xA6",
+ "\xD8\xBD" => "\xE5\xA9\xBC",
+ "\xD8\xBE" => "\xE5\xAA\xA5",
+ "\xD8\xBF" => "\xE5\xAA\xAC",
+ "\xD8\xC0" => "\xE5\xAA\x95",
+ "\xD8\xC1" => "\xE5\xAA\xAE",
+ "\xD8\xC2" => "\xE5\xA8\xB7",
+ "\xD8\xC3" => "\xE5\xAA\x84",
+ "\xD8\xC4" => "\xE5\xAA\x8A",
+ "\xD8\xC5" => "\xE5\xAA\x97",
+ "\xD8\xC6" => "\xE5\xAA\x83",
+ "\xD8\xC7" => "\xE5\xAA\x8B",
+ "\xD8\xC8" => "\xE5\xAA\xA9",
+ "\xD8\xC9" => "\xE5\xA9\xBB",
+ "\xD8\xCA" => "\xE5\xA9\xBD",
+ "\xD8\xCB" => "\xE5\xAA\x8C",
+ "\xD8\xCC" => "\xE5\xAA\x9C",
+ "\xD8\xCD" => "\xE5\xAA\x8F",
+ "\xD8\xCE" => "\xE5\xAA\x93",
+ "\xD8\xCF" => "\xE5\xAA\x9D",
+ "\xD8\xD0" => "\xE5\xAF\xAA",
+ "\xD8\xD1" => "\xE5\xAF\x8D",
+ "\xD8\xD2" => "\xE5\xAF\x8B",
+ "\xD8\xD3" => "\xE5\xAF\x94",
+ "\xD8\xD4" => "\xE5\xAF\x91",
+ "\xD8\xD5" => "\xE5\xAF\x8A",
+ "\xD8\xD6" => "\xE5\xAF\x8E",
+ "\xD8\xD7" => "\xE5\xB0\x8C",
+ "\xD8\xD8" => "\xE5\xB0\xB0",
+ "\xD8\xD9" => "\xE5\xB4\xB7",
+ "\xD8\xDA" => "\xE5\xB5\x83",
+ "\xD8\xDB" => "\xE5\xB5\xAB",
+ "\xD8\xDC" => "\xE5\xB5\x81",
+ "\xD8\xDD" => "\xE5\xB5\x8B",
+ "\xD8\xDE" => "\xE5\xB4\xBF",
+ "\xD8\xDF" => "\xE5\xB4\xB5",
+ "\xD8\xE0" => "\xE5\xB5\x91",
+ "\xD8\xE1" => "\xE5\xB5\x8E",
+ "\xD8\xE2" => "\xE5\xB5\x95",
+ "\xD8\xE3" => "\xE5\xB4\xB3",
+ "\xD8\xE4" => "\xE5\xB4\xBA",
+ "\xD8\xE5" => "\xE5\xB5\x92",
+ "\xD8\xE6" => "\xE5\xB4\xBD",
+ "\xD8\xE7" => "\xE5\xB4\xB1",
+ "\xD8\xE8" => "\xE5\xB5\x99",
+ "\xD8\xE9" => "\xE5\xB5\x82",
+ "\xD8\xEA" => "\xE5\xB4\xB9",
+ "\xD8\xEB" => "\xE5\xB5\x89",
+ "\xD8\xEC" => "\xE5\xB4\xB8",
+ "\xD8\xED" => "\xE5\xB4\xBC",
+ "\xD8\xEE" => "\xE5\xB4\xB2",
+ "\xD8\xEF" => "\xE5\xB4\xB6",
+ "\xD8\xF0" => "\xE5\xB5\x80",
+ "\xD8\xF1" => "\xE5\xB5\x85",
+ "\xD8\xF2" => "\xE5\xB9\x84",
+ "\xD8\xF3" => "\xE5\xB9\x81",
+ "\xD8\xF4" => "\xE5\xBD\x98",
+ "\xD8\xF5" => "\xE5\xBE\xA6",
+ "\xD8\xF6" => "\xE5\xBE\xA5",
+ "\xD8\xF7" => "\xE5\xBE\xAB",
+ "\xD8\xF8" => "\xE6\x83\x89",
+ "\xD8\xF9" => "\xE6\x82\xB9",
+ "\xD8\xFA" => "\xE6\x83\x8C",
+ "\xD8\xFB" => "\xE6\x83\xA2",
+ "\xD8\xFC" => "\xE6\x83\x8E",
+ "\xD8\xFD" => "\xE6\x83\x84",
+ "\xD8\xFE" => "\xE6\x84\x94",
+ "\xD9\x40" => "\xE6\x83\xB2",
+ "\xD9\x41" => "\xE6\x84\x8A",
+ "\xD9\x42" => "\xE6\x84\x96",
+ "\xD9\x43" => "\xE6\x84\x85",
+ "\xD9\x44" => "\xE6\x83\xB5",
+ "\xD9\x45" => "\xE6\x84\x93",
+ "\xD9\x46" => "\xE6\x83\xB8",
+ "\xD9\x47" => "\xE6\x83\xBC",
+ "\xD9\x48" => "\xE6\x83\xBE",
+ "\xD9\x49" => "\xE6\x83\x81",
+ "\xD9\x4A" => "\xE6\x84\x83",
+ "\xD9\x4B" => "\xE6\x84\x98",
+ "\xD9\x4C" => "\xE6\x84\x9D",
+ "\xD9\x4D" => "\xE6\x84\x90",
+ "\xD9\x4E" => "\xE6\x83\xBF",
+ "\xD9\x4F" => "\xE6\x84\x84",
+ "\xD9\x50" => "\xE6\x84\x8B",
+ "\xD9\x51" => "\xE6\x89\x8A",
+ "\xD9\x52" => "\xE6\x8E\x94",
+ "\xD9\x53" => "\xE6\x8E\xB1",
+ "\xD9\x54" => "\xE6\x8E\xB0",
+ "\xD9\x55" => "\xE6\x8F\x8E",
+ "\xD9\x56" => "\xE6\x8F\xA5",
+ "\xD9\x57" => "\xE6\x8F\xA8",
+ "\xD9\x58" => "\xE6\x8F\xAF",
+ "\xD9\x59" => "\xE6\x8F\x83",
+ "\xD9\x5A" => "\xE6\x92\x9D",
+ "\xD9\x5B" => "\xE6\x8F\xB3",
+ "\xD9\x5C" => "\xE6\x8F\x8A",
+ "\xD9\x5D" => "\xE6\x8F\xA0",
+ "\xD9\x5E" => "\xE6\x8F\xB6",
+ "\xD9\x5F" => "\xE6\x8F\x95",
+ "\xD9\x60" => "\xE6\x8F\xB2",
+ "\xD9\x61" => "\xE6\x8F\xB5",
+ "\xD9\x62" => "\xE6\x91\xA1",
+ "\xD9\x63" => "\xE6\x8F\x9F",
+ "\xD9\x64" => "\xE6\x8E\xBE",
+ "\xD9\x65" => "\xE6\x8F\x9D",
+ "\xD9\x66" => "\xE6\x8F\x9C",
+ "\xD9\x67" => "\xE6\x8F\x84",
+ "\xD9\x68" => "\xE6\x8F\x98",
+ "\xD9\x69" => "\xE6\x8F\x93",
+ "\xD9\x6A" => "\xE6\x8F\x82",
+ "\xD9\x6B" => "\xE6\x8F\x87",
+ "\xD9\x6C" => "\xE6\x8F\x8C",
+ "\xD9\x6D" => "\xE6\x8F\x8B",
+ "\xD9\x6E" => "\xE6\x8F\x88",
+ "\xD9\x6F" => "\xE6\x8F\xB0",
+ "\xD9\x70" => "\xE6\x8F\x97",
+ "\xD9\x71" => "\xE6\x8F\x99",
+ "\xD9\x72" => "\xE6\x94\xB2",
+ "\xD9\x73" => "\xE6\x95\xA7",
+ "\xD9\x74" => "\xE6\x95\xAA",
+ "\xD9\x75" => "\xE6\x95\xA4",
+ "\xD9\x76" => "\xE6\x95\x9C",
+ "\xD9\x77" => "\xE6\x95\xA8",
+ "\xD9\x78" => "\xE6\x95\xA5",
+ "\xD9\x79" => "\xE6\x96\x8C",
+ "\xD9\x7A" => "\xE6\x96\x9D",
+ "\xD9\x7B" => "\xE6\x96\x9E",
+ "\xD9\x7C" => "\xE6\x96\xAE",
+ "\xD9\x7D" => "\xE6\x97\x90",
+ "\xD9\x7E" => "\xE6\x97\x92",
+ "\xD9\xA1" => "\xE6\x99\xBC",
+ "\xD9\xA2" => "\xE6\x99\xAC",
+ "\xD9\xA3" => "\xE6\x99\xBB",
+ "\xD9\xA4" => "\xE6\x9A\x80",
+ "\xD9\xA5" => "\xE6\x99\xB1",
+ "\xD9\xA6" => "\xE6\x99\xB9",
+ "\xD9\xA7" => "\xE6\x99\xAA",
+ "\xD9\xA8" => "\xE6\x99\xB2",
+ "\xD9\xA9" => "\xE6\x9C\x81",
+ "\xD9\xAA" => "\xE6\xA4\x8C",
+ "\xD9\xAB" => "\xE6\xA3\x93",
+ "\xD9\xAC" => "\xE6\xA4\x84",
+ "\xD9\xAD" => "\xE6\xA3\x9C",
+ "\xD9\xAE" => "\xE6\xA4\xAA",
+ "\xD9\xAF" => "\xE6\xA3\xAC",
+ "\xD9\xB0" => "\xE6\xA3\xAA",
+ "\xD9\xB1" => "\xE6\xA3\xB1",
+ "\xD9\xB2" => "\xE6\xA4\x8F",
+ "\xD9\xB3" => "\xE6\xA3\x96",
+ "\xD9\xB4" => "\xE6\xA3\xB7",
+ "\xD9\xB5" => "\xE6\xA3\xAB",
+ "\xD9\xB6" => "\xE6\xA3\xA4",
+ "\xD9\xB7" => "\xE6\xA3\xB6",
+ "\xD9\xB8" => "\xE6\xA4\x93",
+ "\xD9\xB9" => "\xE6\xA4\x90",
+ "\xD9\xBA" => "\xE6\xA3\xB3",
+ "\xD9\xBB" => "\xE6\xA3\xA1",
+ "\xD9\xBC" => "\xE6\xA4\x87",
+ "\xD9\xBD" => "\xE6\xA3\x8C",
+ "\xD9\xBE" => "\xE6\xA4\x88",
+ "\xD9\xBF" => "\xE6\xA5\xB0",
+ "\xD9\xC0" => "\xE6\xA2\xB4",
+ "\xD9\xC1" => "\xE6\xA4\x91",
+ "\xD9\xC2" => "\xE6\xA3\xAF",
+ "\xD9\xC3" => "\xE6\xA3\x86",
+ "\xD9\xC4" => "\xE6\xA4\x94",
+ "\xD9\xC5" => "\xE6\xA3\xB8",
+ "\xD9\xC6" => "\xE6\xA3\x90",
+ "\xD9\xC7" => "\xE6\xA3\xBD",
+ "\xD9\xC8" => "\xE6\xA3\xBC",
+ "\xD9\xC9" => "\xE6\xA3\xA8",
+ "\xD9\xCA" => "\xE6\xA4\x8B",
+ "\xD9\xCB" => "\xE6\xA4\x8A",
+ "\xD9\xCC" => "\xE6\xA4\x97",
+ "\xD9\xCD" => "\xE6\xA3\x8E",
+ "\xD9\xCE" => "\xE6\xA3\x88",
+ "\xD9\xCF" => "\xE6\xA3\x9D",
+ "\xD9\xD0" => "\xE6\xA3\x9E",
+ "\xD9\xD1" => "\xE6\xA3\xA6",
+ "\xD9\xD2" => "\xE6\xA3\xB4",
+ "\xD9\xD3" => "\xE6\xA3\x91",
+ "\xD9\xD4" => "\xE6\xA4\x86",
+ "\xD9\xD5" => "\xE6\xA3\x94",
+ "\xD9\xD6" => "\xE6\xA3\xA9",
+ "\xD9\xD7" => "\xE6\xA4\x95",
+ "\xD9\xD8" => "\xE6\xA4\xA5",
+ "\xD9\xD9" => "\xE6\xA3\x87",
+ "\xD9\xDA" => "\xE6\xAC\xB9",
+ "\xD9\xDB" => "\xE6\xAC\xBB",
+ "\xD9\xDC" => "\xE6\xAC\xBF",
+ "\xD9\xDD" => "\xE6\xAC\xBC",
+ "\xD9\xDE" => "\xE6\xAE\x94",
+ "\xD9\xDF" => "\xE6\xAE\x97",
+ "\xD9\xE0" => "\xE6\xAE\x99",
+ "\xD9\xE1" => "\xE6\xAE\x95",
+ "\xD9\xE2" => "\xE6\xAE\xBD",
+ "\xD9\xE3" => "\xE6\xAF\xB0",
+ "\xD9\xE4" => "\xE6\xAF\xB2",
+ "\xD9\xE5" => "\xE6\xAF\xB3",
+ "\xD9\xE6" => "\xE6\xB0\xB0",
+ "\xD9\xE7" => "\xE6\xB7\xBC",
+ "\xD9\xE8" => "\xE6\xB9\x86",
+ "\xD9\xE9" => "\xE6\xB9\x87",
+ "\xD9\xEA" => "\xE6\xB8\x9F",
+ "\xD9\xEB" => "\xE6\xB9\x89",
+ "\xD9\xEC" => "\xE6\xBA\x88",
+ "\xD9\xED" => "\xE6\xB8\xBC",
+ "\xD9\xEE" => "\xE6\xB8\xBD",
+ "\xD9\xEF" => "\xE6\xB9\x85",
+ "\xD9\xF0" => "\xE6\xB9\xA2",
+ "\xD9\xF1" => "\xE6\xB8\xAB",
+ "\xD9\xF2" => "\xE6\xB8\xBF",
+ "\xD9\xF3" => "\xE6\xB9\x81",
+ "\xD9\xF4" => "\xE6\xB9\x9D",
+ "\xD9\xF5" => "\xE6\xB9\xB3",
+ "\xD9\xF6" => "\xE6\xB8\x9C",
+ "\xD9\xF7" => "\xE6\xB8\xB3",
+ "\xD9\xF8" => "\xE6\xB9\x8B",
+ "\xD9\xF9" => "\xE6\xB9\x80",
+ "\xD9\xFA" => "\xE6\xB9\x91",
+ "\xD9\xFB" => "\xE6\xB8\xBB",
+ "\xD9\xFC" => "\xE6\xB8\x83",
+ "\xD9\xFD" => "\xE6\xB8\xAE",
+ "\xD9\xFE" => "\xE6\xB9\x9E",
+ "\xDA\x40" => "\xE6\xB9\xA8",
+ "\xDA\x41" => "\xE6\xB9\x9C",
+ "\xDA\x42" => "\xE6\xB9\xA1",
+ "\xDA\x43" => "\xE6\xB8\xB1",
+ "\xDA\x44" => "\xE6\xB8\xA8",
+ "\xDA\x45" => "\xE6\xB9\xA0",
+ "\xDA\x46" => "\xE6\xB9\xB1",
+ "\xDA\x47" => "\xE6\xB9\xAB",
+ "\xDA\x48" => "\xE6\xB8\xB9",
+ "\xDA\x49" => "\xE6\xB8\xA2",
+ "\xDA\x4A" => "\xE6\xB8\xB0",
+ "\xDA\x4B" => "\xE6\xB9\x93",
+ "\xDA\x4C" => "\xE6\xB9\xA5",
+ "\xDA\x4D" => "\xE6\xB8\xA7",
+ "\xDA\x4E" => "\xE6\xB9\xB8",
+ "\xDA\x4F" => "\xE6\xB9\xA4",
+ "\xDA\x50" => "\xE6\xB9\xB7",
+ "\xDA\x51" => "\xE6\xB9\x95",
+ "\xDA\x52" => "\xE6\xB9\xB9",
+ "\xDA\x53" => "\xE6\xB9\x92",
+ "\xDA\x54" => "\xE6\xB9\xA6",
+ "\xDA\x55" => "\xE6\xB8\xB5",
+ "\xDA\x56" => "\xE6\xB8\xB6",
+ "\xDA\x57" => "\xE6\xB9\x9A",
+ "\xDA\x58" => "\xE7\x84\xA0",
+ "\xDA\x59" => "\xE7\x84\x9E",
+ "\xDA\x5A" => "\xE7\x84\xAF",
+ "\xDA\x5B" => "\xE7\x83\xBB",
+ "\xDA\x5C" => "\xE7\x84\xAE",
+ "\xDA\x5D" => "\xE7\x84\xB1",
+ "\xDA\x5E" => "\xE7\x84\xA3",
+ "\xDA\x5F" => "\xE7\x84\xA5",
+ "\xDA\x60" => "\xE7\x84\xA2",
+ "\xDA\x61" => "\xE7\x84\xB2",
+ "\xDA\x62" => "\xE7\x84\x9F",
+ "\xDA\x63" => "\xE7\x84\xA8",
+ "\xDA\x64" => "\xE7\x84\xBA",
+ "\xDA\x65" => "\xE7\x84\x9B",
+ "\xDA\x66" => "\xE7\x89\x8B",
+ "\xDA\x67" => "\xE7\x89\x9A",
+ "\xDA\x68" => "\xE7\x8A\x88",
+ "\xDA\x69" => "\xE7\x8A\x89",
+ "\xDA\x6A" => "\xE7\x8A\x86",
+ "\xDA\x6B" => "\xE7\x8A\x85",
+ "\xDA\x6C" => "\xE7\x8A\x8B",
+ "\xDA\x6D" => "\xE7\x8C\x92",
+ "\xDA\x6E" => "\xE7\x8C\x8B",
+ "\xDA\x6F" => "\xE7\x8C\xB0",
+ "\xDA\x70" => "\xE7\x8C\xA2",
+ "\xDA\x71" => "\xE7\x8C\xB1",
+ "\xDA\x72" => "\xE7\x8C\xB3",
+ "\xDA\x73" => "\xE7\x8C\xA7",
+ "\xDA\x74" => "\xE7\x8C\xB2",
+ "\xDA\x75" => "\xE7\x8C\xAD",
+ "\xDA\x76" => "\xE7\x8C\xA6",
+ "\xDA\x77" => "\xE7\x8C\xA3",
+ "\xDA\x78" => "\xE7\x8C\xB5",
+ "\xDA\x79" => "\xE7\x8C\x8C",
+ "\xDA\x7A" => "\xE7\x90\xAE",
+ "\xDA\x7B" => "\xE7\x90\xAC",
+ "\xDA\x7C" => "\xE7\x90\xB0",
+ "\xDA\x7D" => "\xE7\x90\xAB",
+ "\xDA\x7E" => "\xE7\x90\x96",
+ "\xDA\xA1" => "\xE7\x90\x9A",
+ "\xDA\xA2" => "\xE7\x90\xA1",
+ "\xDA\xA3" => "\xE7\x90\xAD",
+ "\xDA\xA4" => "\xE7\x90\xB1",
+ "\xDA\xA5" => "\xE7\x90\xA4",
+ "\xDA\xA6" => "\xE7\x90\xA3",
+ "\xDA\xA7" => "\xE7\x90\x9D",
+ "\xDA\xA8" => "\xE7\x90\xA9",
+ "\xDA\xA9" => "\xE7\x90\xA0",
+ "\xDA\xAA" => "\xE7\x90\xB2",
+ "\xDA\xAB" => "\xE7\x93\xBB",
+ "\xDA\xAC" => "\xE7\x94\xAF",
+ "\xDA\xAD" => "\xE7\x95\xAF",
+ "\xDA\xAE" => "\xE7\x95\xAC",
+ "\xDA\xAF" => "\xE7\x97\xA7",
+ "\xDA\xB0" => "\xE7\x97\x9A",
+ "\xDA\xB1" => "\xE7\x97\xA1",
+ "\xDA\xB2" => "\xE7\x97\xA6",
+ "\xDA\xB3" => "\xE7\x97\x9D",
+ "\xDA\xB4" => "\xE7\x97\x9F",
+ "\xDA\xB5" => "\xE7\x97\xA4",
+ "\xDA\xB6" => "\xE7\x97\x97",
+ "\xDA\xB7" => "\xE7\x9A\x95",
+ "\xDA\xB8" => "\xE7\x9A\x92",
+ "\xDA\xB9" => "\xE7\x9B\x9A",
+ "\xDA\xBA" => "\xE7\x9D\x86",
+ "\xDA\xBB" => "\xE7\x9D\x87",
+ "\xDA\xBC" => "\xE7\x9D\x84",
+ "\xDA\xBD" => "\xE7\x9D\x8D",
+ "\xDA\xBE" => "\xE7\x9D\x85",
+ "\xDA\xBF" => "\xE7\x9D\x8A",
+ "\xDA\xC0" => "\xE7\x9D\x8E",
+ "\xDA\xC1" => "\xE7\x9D\x8B",
+ "\xDA\xC2" => "\xE7\x9D\x8C",
+ "\xDA\xC3" => "\xE7\x9F\x9E",
+ "\xDA\xC4" => "\xE7\x9F\xAC",
+ "\xDA\xC5" => "\xE7\xA1\xA0",
+ "\xDA\xC6" => "\xE7\xA1\xA4",
+ "\xDA\xC7" => "\xE7\xA1\xA5",
+ "\xDA\xC8" => "\xE7\xA1\x9C",
+ "\xDA\xC9" => "\xE7\xA1\xAD",
+ "\xDA\xCA" => "\xE7\xA1\xB1",
+ "\xDA\xCB" => "\xE7\xA1\xAA",
+ "\xDA\xCC" => "\xE7\xA1\xAE",
+ "\xDA\xCD" => "\xE7\xA1\xB0",
+ "\xDA\xCE" => "\xE7\xA1\xA9",
+ "\xDA\xCF" => "\xE7\xA1\xA8",
+ "\xDA\xD0" => "\xE7\xA1\x9E",
+ "\xDA\xD1" => "\xE7\xA1\xA2",
+ "\xDA\xD2" => "\xE7\xA5\xB4",
+ "\xDA\xD3" => "\xE7\xA5\xB3",
+ "\xDA\xD4" => "\xE7\xA5\xB2",
+ "\xDA\xD5" => "\xE7\xA5\xB0",
+ "\xDA\xD6" => "\xE7\xA8\x82",
+ "\xDA\xD7" => "\xE7\xA8\x8A",
+ "\xDA\xD8" => "\xE7\xA8\x83",
+ "\xDA\xD9" => "\xE7\xA8\x8C",
+ "\xDA\xDA" => "\xE7\xA8\x84",
+ "\xDA\xDB" => "\xE7\xAA\x99",
+ "\xDA\xDC" => "\xE7\xAB\xA6",
+ "\xDA\xDD" => "\xE7\xAB\xA4",
+ "\xDA\xDE" => "\xE7\xAD\x8A",
+ "\xDA\xDF" => "\xE7\xAC\xBB",
+ "\xDA\xE0" => "\xE7\xAD\x84",
+ "\xDA\xE1" => "\xE7\xAD\x88",
+ "\xDA\xE2" => "\xE7\xAD\x8C",
+ "\xDA\xE3" => "\xE7\xAD\x8E",
+ "\xDA\xE4" => "\xE7\xAD\x80",
+ "\xDA\xE5" => "\xE7\xAD\x98",
+ "\xDA\xE6" => "\xE7\xAD\x85",
+ "\xDA\xE7" => "\xE7\xB2\xA2",
+ "\xDA\xE8" => "\xE7\xB2\x9E",
+ "\xDA\xE9" => "\xE7\xB2\xA8",
+ "\xDA\xEA" => "\xE7\xB2\xA1",
+ "\xDA\xEB" => "\xE7\xB5\x98",
+ "\xDA\xEC" => "\xE7\xB5\xAF",
+ "\xDA\xED" => "\xE7\xB5\xA3",
+ "\xDA\xEE" => "\xE7\xB5\x93",
+ "\xDA\xEF" => "\xE7\xB5\x96",
+ "\xDA\xF0" => "\xE7\xB5\xA7",
+ "\xDA\xF1" => "\xE7\xB5\xAA",
+ "\xDA\xF2" => "\xE7\xB5\x8F",
+ "\xDA\xF3" => "\xE7\xB5\xAD",
+ "\xDA\xF4" => "\xE7\xB5\x9C",
+ "\xDA\xF5" => "\xE7\xB5\xAB",
+ "\xDA\xF6" => "\xE7\xB5\x92",
+ "\xDA\xF7" => "\xE7\xB5\x94",
+ "\xDA\xF8" => "\xE7\xB5\xA9",
+ "\xDA\xF9" => "\xE7\xB5\x91",
+ "\xDA\xFA" => "\xE7\xB5\x9F",
+ "\xDA\xFB" => "\xE7\xB5\x8E",
+ "\xDA\xFC" => "\xE7\xBC\xBE",
+ "\xDA\xFD" => "\xE7\xBC\xBF",
+ "\xDA\xFE" => "\xE7\xBD\xA5",
+ "\xDB\x40" => "\xE7\xBD\xA6",
+ "\xDB\x41" => "\xE7\xBE\xA2",
+ "\xDB\x42" => "\xE7\xBE\xA0",
+ "\xDB\x43" => "\xE7\xBE\xA1",
+ "\xDB\x44" => "\xE7\xBF\x97",
+ "\xDB\x45" => "\xE8\x81\x91",
+ "\xDB\x46" => "\xE8\x81\x8F",
+ "\xDB\x47" => "\xE8\x81\x90",
+ "\xDB\x48" => "\xE8\x83\xBE",
+ "\xDB\x49" => "\xE8\x83\x94",
+ "\xDB\x4A" => "\xE8\x85\x83",
+ "\xDB\x4B" => "\xE8\x85\x8A",
+ "\xDB\x4C" => "\xE8\x85\x92",
+ "\xDB\x4D" => "\xE8\x85\x8F",
+ "\xDB\x4E" => "\xE8\x85\x87",
+ "\xDB\x4F" => "\xE8\x84\xBD",
+ "\xDB\x50" => "\xE8\x85\x8D",
+ "\xDB\x51" => "\xE8\x84\xBA",
+ "\xDB\x52" => "\xE8\x87\xA6",
+ "\xDB\x53" => "\xE8\x87\xAE",
+ "\xDB\x54" => "\xE8\x87\xB7",
+ "\xDB\x55" => "\xE8\x87\xB8",
+ "\xDB\x56" => "\xE8\x87\xB9",
+ "\xDB\x57" => "\xE8\x88\x84",
+ "\xDB\x58" => "\xE8\x88\xBC",
+ "\xDB\x59" => "\xE8\x88\xBD",
+ "\xDB\x5A" => "\xE8\x88\xBF",
+ "\xDB\x5B" => "\xE8\x89\xB5",
+ "\xDB\x5C" => "\xE8\x8C\xBB",
+ "\xDB\x5D" => "\xE8\x8F\x8F",
+ "\xDB\x5E" => "\xE8\x8F\xB9",
+ "\xDB\x5F" => "\xE8\x90\xA3",
+ "\xDB\x60" => "\xE8\x8F\x80",
+ "\xDB\x61" => "\xE8\x8F\xA8",
+ "\xDB\x62" => "\xE8\x90\x92",
+ "\xDB\x63" => "\xE8\x8F\xA7",
+ "\xDB\x64" => "\xE8\x8F\xA4",
+ "\xDB\x65" => "\xE8\x8F\xBC",
+ "\xDB\x66" => "\xE8\x8F\xB6",
+ "\xDB\x67" => "\xE8\x90\x90",
+ "\xDB\x68" => "\xE8\x8F\x86",
+ "\xDB\x69" => "\xE8\x8F\x88",
+ "\xDB\x6A" => "\xE8\x8F\xAB",
+ "\xDB\x6B" => "\xE8\x8F\xA3",
+ "\xDB\x6C" => "\xE8\x8E\xBF",
+ "\xDB\x6D" => "\xE8\x90\x81",
+ "\xDB\x6E" => "\xE8\x8F\x9D",
+ "\xDB\x6F" => "\xE8\x8F\xA5",
+ "\xDB\x70" => "\xE8\x8F\x98",
+ "\xDB\x71" => "\xE8\x8F\xBF",
+ "\xDB\x72" => "\xE8\x8F\xA1",
+ "\xDB\x73" => "\xE8\x8F\x8B",
+ "\xDB\x74" => "\xE8\x8F\x8E",
+ "\xDB\x75" => "\xE8\x8F\x96",
+ "\xDB\x76" => "\xE8\x8F\xB5",
+ "\xDB\x77" => "\xE8\x8F\x89",
+ "\xDB\x78" => "\xE8\x90\x89",
+ "\xDB\x79" => "\xE8\x90\x8F",
+ "\xDB\x7A" => "\xE8\x8F\x9E",
+ "\xDB\x7B" => "\xE8\x90\x91",
+ "\xDB\x7C" => "\xE8\x90\x86",
+ "\xDB\x7D" => "\xE8\x8F\x82",
+ "\xDB\x7E" => "\xE8\x8F\xB3",
+ "\xDB\xA1" => "\xE8\x8F\x95",
+ "\xDB\xA2" => "\xE8\x8F\xBA",
+ "\xDB\xA3" => "\xE8\x8F\x87",
+ "\xDB\xA4" => "\xE8\x8F\x91",
+ "\xDB\xA5" => "\xE8\x8F\xAA",
+ "\xDB\xA6" => "\xE8\x90\x93",
+ "\xDB\xA7" => "\xE8\x8F\x83",
+ "\xDB\xA8" => "\xE8\x8F\xAC",
+ "\xDB\xA9" => "\xE8\x8F\xAE",
+ "\xDB\xAA" => "\xE8\x8F\x84",
+ "\xDB\xAB" => "\xE8\x8F\xBB",
+ "\xDB\xAC" => "\xE8\x8F\x97",
+ "\xDB\xAD" => "\xE8\x8F\xA2",
+ "\xDB\xAE" => "\xE8\x90\x9B",
+ "\xDB\xAF" => "\xE8\x8F\x9B",
+ "\xDB\xB0" => "\xE8\x8F\xBE",
+ "\xDB\xB1" => "\xE8\x9B\x98",
+ "\xDB\xB2" => "\xE8\x9B\xA2",
+ "\xDB\xB3" => "\xE8\x9B\xA6",
+ "\xDB\xB4" => "\xE8\x9B\x93",
+ "\xDB\xB5" => "\xE8\x9B\xA3",
+ "\xDB\xB6" => "\xE8\x9B\x9A",
+ "\xDB\xB7" => "\xE8\x9B\xAA",
+ "\xDB\xB8" => "\xE8\x9B\x9D",
+ "\xDB\xB9" => "\xE8\x9B\xAB",
+ "\xDB\xBA" => "\xE8\x9B\x9C",
+ "\xDB\xBB" => "\xE8\x9B\xAC",
+ "\xDB\xBC" => "\xE8\x9B\xA9",
+ "\xDB\xBD" => "\xE8\x9B\x97",
+ "\xDB\xBE" => "\xE8\x9B\xA8",
+ "\xDB\xBF" => "\xE8\x9B\x91",
+ "\xDB\xC0" => "\xE8\xA1\x88",
+ "\xDB\xC1" => "\xE8\xA1\x96",
+ "\xDB\xC2" => "\xE8\xA1\x95",
+ "\xDB\xC3" => "\xE8\xA2\xBA",
+ "\xDB\xC4" => "\xE8\xA3\x97",
+ "\xDB\xC5" => "\xE8\xA2\xB9",
+ "\xDB\xC6" => "\xE8\xA2\xB8",
+ "\xDB\xC7" => "\xE8\xA3\x80",
+ "\xDB\xC8" => "\xE8\xA2\xBE",
+ "\xDB\xC9" => "\xE8\xA2\xB6",
+ "\xDB\xCA" => "\xE8\xA2\xBC",
+ "\xDB\xCB" => "\xE8\xA2\xB7",
+ "\xDB\xCC" => "\xE8\xA2\xBD",
+ "\xDB\xCD" => "\xE8\xA2\xB2",
+ "\xDB\xCE" => "\xE8\xA4\x81",
+ "\xDB\xCF" => "\xE8\xA3\x89",
+ "\xDB\xD0" => "\xE8\xA6\x95",
+ "\xDB\xD1" => "\xE8\xA6\x98",
+ "\xDB\xD2" => "\xE8\xA6\x97",
+ "\xDB\xD3" => "\xE8\xA7\x9D",
+ "\xDB\xD4" => "\xE8\xA7\x9A",
+ "\xDB\xD5" => "\xE8\xA7\x9B",
+ "\xDB\xD6" => "\xE8\xA9\x8E",
+ "\xDB\xD7" => "\xE8\xA9\x8D",
+ "\xDB\xD8" => "\xE8\xA8\xB9",
+ "\xDB\xD9" => "\xE8\xA9\x99",
+ "\xDB\xDA" => "\xE8\xA9\x80",
+ "\xDB\xDB" => "\xE8\xA9\x97",
+ "\xDB\xDC" => "\xE8\xA9\x98",
+ "\xDB\xDD" => "\xE8\xA9\x84",
+ "\xDB\xDE" => "\xE8\xA9\x85",
+ "\xDB\xDF" => "\xE8\xA9\x92",
+ "\xDB\xE0" => "\xE8\xA9\x88",
+ "\xDB\xE1" => "\xE8\xA9\x91",
+ "\xDB\xE2" => "\xE8\xA9\x8A",
+ "\xDB\xE3" => "\xE8\xA9\x8C",
+ "\xDB\xE4" => "\xE8\xA9\x8F",
+ "\xDB\xE5" => "\xE8\xB1\x9F",
+ "\xDB\xE6" => "\xE8\xB2\x81",
+ "\xDB\xE7" => "\xE8\xB2\x80",
+ "\xDB\xE8" => "\xE8\xB2\xBA",
+ "\xDB\xE9" => "\xE8\xB2\xBE",
+ "\xDB\xEA" => "\xE8\xB2\xB0",
+ "\xDB\xEB" => "\xE8\xB2\xB9",
+ "\xDB\xEC" => "\xE8\xB2\xB5",
+ "\xDB\xED" => "\xE8\xB6\x84",
+ "\xDB\xEE" => "\xE8\xB6\x80",
+ "\xDB\xEF" => "\xE8\xB6\x89",
+ "\xDB\xF0" => "\xE8\xB7\x98",
+ "\xDB\xF1" => "\xE8\xB7\x93",
+ "\xDB\xF2" => "\xE8\xB7\x8D",
+ "\xDB\xF3" => "\xE8\xB7\x87",
+ "\xDB\xF4" => "\xE8\xB7\x96",
+ "\xDB\xF5" => "\xE8\xB7\x9C",
+ "\xDB\xF6" => "\xE8\xB7\x8F",
+ "\xDB\xF7" => "\xE8\xB7\x95",
+ "\xDB\xF8" => "\xE8\xB7\x99",
+ "\xDB\xF9" => "\xE8\xB7\x88",
+ "\xDB\xFA" => "\xE8\xB7\x97",
+ "\xDB\xFB" => "\xE8\xB7\x85",
+ "\xDB\xFC" => "\xE8\xBB\xAF",
+ "\xDB\xFD" => "\xE8\xBB\xB7",
+ "\xDB\xFE" => "\xE8\xBB\xBA",
+ "\xDC\x40" => "\xE8\xBB\xB9",
+ "\xDC\x41" => "\xE8\xBB\xA6",
+ "\xDC\x42" => "\xE8\xBB\xAE",
+ "\xDC\x43" => "\xE8\xBB\xA5",
+ "\xDC\x44" => "\xE8\xBB\xB5",
+ "\xDC\x45" => "\xE8\xBB\xA7",
+ "\xDC\x46" => "\xE8\xBB\xA8",
+ "\xDC\x47" => "\xE8\xBB\xB6",
+ "\xDC\x48" => "\xE8\xBB\xAB",
+ "\xDC\x49" => "\xE8\xBB\xB1",
+ "\xDC\x4A" => "\xE8\xBB\xAC",
+ "\xDC\x4B" => "\xE8\xBB\xB4",
+ "\xDC\x4C" => "\xE8\xBB\xA9",
+ "\xDC\x4D" => "\xE9\x80\xAD",
+ "\xDC\x4E" => "\xE9\x80\xB4",
+ "\xDC\x4F" => "\xE9\x80\xAF",
+ "\xDC\x50" => "\xE9\x84\x86",
+ "\xDC\x51" => "\xE9\x84\xAC",
+ "\xDC\x52" => "\xE9\x84\x84",
+ "\xDC\x53" => "\xE9\x83\xBF",
+ "\xDC\x54" => "\xE9\x83\xBC",
+ "\xDC\x55" => "\xE9\x84\x88",
+ "\xDC\x56" => "\xE9\x83\xB9",
+ "\xDC\x57" => "\xE9\x83\xBB",
+ "\xDC\x58" => "\xE9\x84\x81",
+ "\xDC\x59" => "\xE9\x84\x80",
+ "\xDC\x5A" => "\xE9\x84\x87",
+ "\xDC\x5B" => "\xE9\x84\x85",
+ "\xDC\x5C" => "\xE9\x84\x83",
+ "\xDC\x5D" => "\xE9\x85\xA1",
+ "\xDC\x5E" => "\xE9\x85\xA4",
+ "\xDC\x5F" => "\xE9\x85\x9F",
+ "\xDC\x60" => "\xE9\x85\xA2",
+ "\xDC\x61" => "\xE9\x85\xA0",
+ "\xDC\x62" => "\xE9\x88\x81",
+ "\xDC\x63" => "\xE9\x88\x8A",
+ "\xDC\x64" => "\xE9\x88\xA5",
+ "\xDC\x65" => "\xE9\x88\x83",
+ "\xDC\x66" => "\xE9\x88\x9A",
+ "\xDC\x67" => "\xE9\x88\xA6",
+ "\xDC\x68" => "\xE9\x88\x8F",
+ "\xDC\x69" => "\xE9\x88\x8C",
+ "\xDC\x6A" => "\xE9\x88\x80",
+ "\xDC\x6B" => "\xE9\x88\x92",
+ "\xDC\x6C" => "\xE9\x87\xBF",
+ "\xDC\x6D" => "\xE9\x87\xBD",
+ "\xDC\x6E" => "\xE9\x88\x86",
+ "\xDC\x6F" => "\xE9\x88\x84",
+ "\xDC\x70" => "\xE9\x88\xA7",
+ "\xDC\x71" => "\xE9\x88\x82",
+ "\xDC\x72" => "\xE9\x88\x9C",
+ "\xDC\x73" => "\xE9\x88\xA4",
+ "\xDC\x74" => "\xE9\x88\x99",
+ "\xDC\x75" => "\xE9\x88\x97",
+ "\xDC\x76" => "\xE9\x88\x85",
+ "\xDC\x77" => "\xE9\x88\x96",
+ "\xDC\x78" => "\xE9\x95\xBB",
+ "\xDC\x79" => "\xE9\x96\x8D",
+ "\xDC\x7A" => "\xE9\x96\x8C",
+ "\xDC\x7B" => "\xE9\x96\x90",
+ "\xDC\x7C" => "\xE9\x9A\x87",
+ "\xDC\x7D" => "\xE9\x99\xBE",
+ "\xDC\x7E" => "\xE9\x9A\x88",
+ "\xDC\xA1" => "\xE9\x9A\x89",
+ "\xDC\xA2" => "\xE9\x9A\x83",
+ "\xDC\xA3" => "\xE9\x9A\x80",
+ "\xDC\xA4" => "\xE9\x9B\x82",
+ "\xDC\xA5" => "\xE9\x9B\x88",
+ "\xDC\xA6" => "\xE9\x9B\x83",
+ "\xDC\xA7" => "\xE9\x9B\xB1",
+ "\xDC\xA8" => "\xE9\x9B\xB0",
+ "\xDC\xA9" => "\xE9\x9D\xAC",
+ "\xDC\xAA" => "\xE9\x9D\xB0",
+ "\xDC\xAB" => "\xE9\x9D\xAE",
+ "\xDC\xAC" => "\xE9\xA0\x87",
+ "\xDC\xAD" => "\xE9\xA2\xA9",
+ "\xDC\xAE" => "\xE9\xA3\xAB",
+ "\xDC\xAF" => "\xE9\xB3\xA6",
+ "\xDC\xB0" => "\xE9\xBB\xB9",
+ "\xDC\xB1" => "\xE4\xBA\x83",
+ "\xDC\xB2" => "\xE4\xBA\x84",
+ "\xDC\xB3" => "\xE4\xBA\xB6",
+ "\xDC\xB4" => "\xE5\x82\xBD",
+ "\xDC\xB5" => "\xE5\x82\xBF",
+ "\xDC\xB6" => "\xE5\x83\x86",
+ "\xDC\xB7" => "\xE5\x82\xAE",
+ "\xDC\xB8" => "\xE5\x83\x84",
+ "\xDC\xB9" => "\xE5\x83\x8A",
+ "\xDC\xBA" => "\xE5\x82\xB4",
+ "\xDC\xBB" => "\xE5\x83\x88",
+ "\xDC\xBC" => "\xE5\x83\x82",
+ "\xDC\xBD" => "\xE5\x82\xB0",
+ "\xDC\xBE" => "\xE5\x83\x81",
+ "\xDC\xBF" => "\xE5\x82\xBA",
+ "\xDC\xC0" => "\xE5\x82\xB1",
+ "\xDC\xC1" => "\xE5\x83\x8B",
+ "\xDC\xC2" => "\xE5\x83\x89",
+ "\xDC\xC3" => "\xE5\x82\xB6",
+ "\xDC\xC4" => "\xE5\x82\xB8",
+ "\xDC\xC5" => "\xE5\x87\x97",
+ "\xDC\xC6" => "\xE5\x89\xBA",
+ "\xDC\xC7" => "\xE5\x89\xB8",
+ "\xDC\xC8" => "\xE5\x89\xBB",
+ "\xDC\xC9" => "\xE5\x89\xBC",
+ "\xDC\xCA" => "\xE5\x97\x83",
+ "\xDC\xCB" => "\xE5\x97\x9B",
+ "\xDC\xCC" => "\xE5\x97\x8C",
+ "\xDC\xCD" => "\xE5\x97\x90",
+ "\xDC\xCE" => "\xE5\x97\x8B",
+ "\xDC\xCF" => "\xE5\x97\x8A",
+ "\xDC\xD0" => "\xE5\x97\x9D",
+ "\xDC\xD1" => "\xE5\x97\x80",
+ "\xDC\xD2" => "\xE5\x97\x94",
+ "\xDC\xD3" => "\xE5\x97\x84",
+ "\xDC\xD4" => "\xE5\x97\xA9",
+ "\xDC\xD5" => "\xE5\x96\xBF",
+ "\xDC\xD6" => "\xE5\x97\x92",
+ "\xDC\xD7" => "\xE5\x96\x8D",
+ "\xDC\xD8" => "\xE5\x97\x8F",
+ "\xDC\xD9" => "\xE5\x97\x95",
+ "\xDC\xDA" => "\xE5\x97\xA2",
+ "\xDC\xDB" => "\xE5\x97\x96",
+ "\xDC\xDC" => "\xE5\x97\x88",
+ "\xDC\xDD" => "\xE5\x97\xB2",
+ "\xDC\xDE" => "\xE5\x97\x8D",
+ "\xDC\xDF" => "\xE5\x97\x99",
+ "\xDC\xE0" => "\xE5\x97\x82",
+ "\xDC\xE1" => "\xE5\x9C\x94",
+ "\xDC\xE2" => "\xE5\xA1\x93",
+ "\xDC\xE3" => "\xE5\xA1\xA8",
+ "\xDC\xE4" => "\xE5\xA1\xA4",
+ "\xDC\xE5" => "\xE5\xA1\x8F",
+ "\xDC\xE6" => "\xE5\xA1\x8D",
+ "\xDC\xE7" => "\xE5\xA1\x89",
+ "\xDC\xE8" => "\xE5\xA1\xAF",
+ "\xDC\xE9" => "\xE5\xA1\x95",
+ "\xDC\xEA" => "\xE5\xA1\x8E",
+ "\xDC\xEB" => "\xE5\xA1\x9D",
+ "\xDC\xEC" => "\xE5\xA1\x99",
+ "\xDC\xED" => "\xE5\xA1\xA5",
+ "\xDC\xEE" => "\xE5\xA1\x9B",
+ "\xDC\xEF" => "\xE5\xA0\xBD",
+ "\xDC\xF0" => "\xE5\xA1\xA3",
+ "\xDC\xF1" => "\xE5\xA1\xB1",
+ "\xDC\xF2" => "\xE5\xA3\xBC",
+ "\xDC\xF3" => "\xE5\xAB\x87",
+ "\xDC\xF4" => "\xE5\xAB\x84",
+ "\xDC\xF5" => "\xE5\xAB\x8B",
+ "\xDC\xF6" => "\xE5\xAA\xBA",
+ "\xDC\xF7" => "\xE5\xAA\xB8",
+ "\xDC\xF8" => "\xE5\xAA\xB1",
+ "\xDC\xF9" => "\xE5\xAA\xB5",
+ "\xDC\xFA" => "\xE5\xAA\xB0",
+ "\xDC\xFB" => "\xE5\xAA\xBF",
+ "\xDC\xFC" => "\xE5\xAB\x88",
+ "\xDC\xFD" => "\xE5\xAA\xBB",
+ "\xDC\xFE" => "\xE5\xAB\x86",
+ "\xDD\x40" => "\xE5\xAA\xB7",
+ "\xDD\x41" => "\xE5\xAB\x80",
+ "\xDD\x42" => "\xE5\xAB\x8A",
+ "\xDD\x43" => "\xE5\xAA\xB4",
+ "\xDD\x44" => "\xE5\xAA\xB6",
+ "\xDD\x45" => "\xE5\xAB\x8D",
+ "\xDD\x46" => "\xE5\xAA\xB9",
+ "\xDD\x47" => "\xE5\xAA\x90",
+ "\xDD\x48" => "\xE5\xAF\x96",
+ "\xDD\x49" => "\xE5\xAF\x98",
+ "\xDD\x4A" => "\xE5\xAF\x99",
+ "\xDD\x4B" => "\xE5\xB0\x9F",
+ "\xDD\x4C" => "\xE5\xB0\xB3",
+ "\xDD\x4D" => "\xE5\xB5\xB1",
+ "\xDD\x4E" => "\xE5\xB5\xA3",
+ "\xDD\x4F" => "\xE5\xB5\x8A",
+ "\xDD\x50" => "\xE5\xB5\xA5",
+ "\xDD\x51" => "\xE5\xB5\xB2",
+ "\xDD\x52" => "\xE5\xB5\xAC",
+ "\xDD\x53" => "\xE5\xB5\x9E",
+ "\xDD\x54" => "\xE5\xB5\xA8",
+ "\xDD\x55" => "\xE5\xB5\xA7",
+ "\xDD\x56" => "\xE5\xB5\xA2",
+ "\xDD\x57" => "\xE5\xB7\xB0",
+ "\xDD\x58" => "\xE5\xB9\x8F",
+ "\xDD\x59" => "\xE5\xB9\x8E",
+ "\xDD\x5A" => "\xE5\xB9\x8A",
+ "\xDD\x5B" => "\xE5\xB9\x8D",
+ "\xDD\x5C" => "\xE5\xB9\x8B",
+ "\xDD\x5D" => "\xE5\xBB\x85",
+ "\xDD\x5E" => "\xE5\xBB\x8C",
+ "\xDD\x5F" => "\xE5\xBB\x86",
+ "\xDD\x60" => "\xE5\xBB\x8B",
+ "\xDD\x61" => "\xE5\xBB\x87",
+ "\xDD\x62" => "\xE5\xBD\x80",
+ "\xDD\x63" => "\xE5\xBE\xAF",
+ "\xDD\x64" => "\xE5\xBE\xAD",
+ "\xDD\x65" => "\xE6\x83\xB7",
+ "\xDD\x66" => "\xE6\x85\x89",
+ "\xDD\x67" => "\xE6\x85\x8A",
+ "\xDD\x68" => "\xE6\x84\xAB",
+ "\xDD\x69" => "\xE6\x85\x85",
+ "\xDD\x6A" => "\xE6\x84\xB6",
+ "\xDD\x6B" => "\xE6\x84\xB2",
+ "\xDD\x6C" => "\xE6\x84\xAE",
+ "\xDD\x6D" => "\xE6\x85\x86",
+ "\xDD\x6E" => "\xE6\x84\xAF",
+ "\xDD\x6F" => "\xE6\x85\x8F",
+ "\xDD\x70" => "\xE6\x84\xA9",
+ "\xDD\x71" => "\xE6\x85\x80",
+ "\xDD\x72" => "\xE6\x88\xA0",
+ "\xDD\x73" => "\xE9\x85\xA8",
+ "\xDD\x74" => "\xE6\x88\xA3",
+ "\xDD\x75" => "\xE6\x88\xA5",
+ "\xDD\x76" => "\xE6\x88\xA4",
+ "\xDD\x77" => "\xE6\x8F\x85",
+ "\xDD\x78" => "\xE6\x8F\xB1",
+ "\xDD\x79" => "\xE6\x8F\xAB",
+ "\xDD\x7A" => "\xE6\x90\x90",
+ "\xDD\x7B" => "\xE6\x90\x92",
+ "\xDD\x7C" => "\xE6\x90\x89",
+ "\xDD\x7D" => "\xE6\x90\xA0",
+ "\xDD\x7E" => "\xE6\x90\xA4",
+ "\xDD\xA1" => "\xE6\x90\xB3",
+ "\xDD\xA2" => "\xE6\x91\x83",
+ "\xDD\xA3" => "\xE6\x90\x9F",
+ "\xDD\xA4" => "\xE6\x90\x95",
+ "\xDD\xA5" => "\xE6\x90\x98",
+ "\xDD\xA6" => "\xE6\x90\xB9",
+ "\xDD\xA7" => "\xE6\x90\xB7",
+ "\xDD\xA8" => "\xE6\x90\xA2",
+ "\xDD\xA9" => "\xE6\x90\xA3",
+ "\xDD\xAA" => "\xE6\x90\x8C",
+ "\xDD\xAB" => "\xE6\x90\xA6",
+ "\xDD\xAC" => "\xE6\x90\xB0",
+ "\xDD\xAD" => "\xE6\x90\xA8",
+ "\xDD\xAE" => "\xE6\x91\x81",
+ "\xDD\xAF" => "\xE6\x90\xB5",
+ "\xDD\xB0" => "\xE6\x90\xAF",
+ "\xDD\xB1" => "\xE6\x90\x8A",
+ "\xDD\xB2" => "\xE6\x90\x9A",
+ "\xDD\xB3" => "\xE6\x91\x80",
+ "\xDD\xB4" => "\xE6\x90\xA5",
+ "\xDD\xB5" => "\xE6\x90\xA7",
+ "\xDD\xB6" => "\xE6\x90\x8B",
+ "\xDD\xB7" => "\xE6\x8F\xA7",
+ "\xDD\xB8" => "\xE6\x90\x9B",
+ "\xDD\xB9" => "\xE6\x90\xAE",
+ "\xDD\xBA" => "\xE6\x90\xA1",
+ "\xDD\xBB" => "\xE6\x90\x8E",
+ "\xDD\xBC" => "\xE6\x95\xAF",
+ "\xDD\xBD" => "\xE6\x96\x92",
+ "\xDD\xBE" => "\xE6\x97\x93",
+ "\xDD\xBF" => "\xE6\x9A\x86",
+ "\xDD\xC0" => "\xE6\x9A\x8C",
+ "\xDD\xC1" => "\xE6\x9A\x95",
+ "\xDD\xC2" => "\xE6\x9A\x90",
+ "\xDD\xC3" => "\xE6\x9A\x8B",
+ "\xDD\xC4" => "\xE6\x9A\x8A",
+ "\xDD\xC5" => "\xE6\x9A\x99",
+ "\xDD\xC6" => "\xE6\x9A\x94",
+ "\xDD\xC7" => "\xE6\x99\xB8",
+ "\xDD\xC8" => "\xE6\x9C\xA0",
+ "\xDD\xC9" => "\xE6\xA5\xA6",
+ "\xDD\xCA" => "\xE6\xA5\x9F",
+ "\xDD\xCB" => "\xE6\xA4\xB8",
+ "\xDD\xCC" => "\xE6\xA5\x8E",
+ "\xDD\xCD" => "\xE6\xA5\xA2",
+ "\xDD\xCE" => "\xE6\xA5\xB1",
+ "\xDD\xCF" => "\xE6\xA4\xBF",
+ "\xDD\xD0" => "\xE6\xA5\x85",
+ "\xDD\xD1" => "\xE6\xA5\xAA",
+ "\xDD\xD2" => "\xE6\xA4\xB9",
+ "\xDD\xD3" => "\xE6\xA5\x82",
+ "\xDD\xD4" => "\xE6\xA5\x97",
+ "\xDD\xD5" => "\xE6\xA5\x99",
+ "\xDD\xD6" => "\xE6\xA5\xBA",
+ "\xDD\xD7" => "\xE6\xA5\x88",
+ "\xDD\xD8" => "\xE6\xA5\x89",
+ "\xDD\xD9" => "\xE6\xA4\xB5",
+ "\xDD\xDA" => "\xE6\xA5\xAC",
+ "\xDD\xDB" => "\xE6\xA4\xB3",
+ "\xDD\xDC" => "\xE6\xA4\xBD",
+ "\xDD\xDD" => "\xE6\xA5\xA5",
+ "\xDD\xDE" => "\xE6\xA3\xB0",
+ "\xDD\xDF" => "\xE6\xA5\xB8",
+ "\xDD\xE0" => "\xE6\xA4\xB4",
+ "\xDD\xE1" => "\xE6\xA5\xA9",
+ "\xDD\xE2" => "\xE6\xA5\x80",
+ "\xDD\xE3" => "\xE6\xA5\xAF",
+ "\xDD\xE4" => "\xE6\xA5\x84",
+ "\xDD\xE5" => "\xE6\xA5\xB6",
+ "\xDD\xE6" => "\xE6\xA5\x98",
+ "\xDD\xE7" => "\xE6\xA5\x81",
+ "\xDD\xE8" => "\xE6\xA5\xB4",
+ "\xDD\xE9" => "\xE6\xA5\x8C",
+ "\xDD\xEA" => "\xE6\xA4\xBB",
+ "\xDD\xEB" => "\xE6\xA5\x8B",
+ "\xDD\xEC" => "\xE6\xA4\xB7",
+ "\xDD\xED" => "\xE6\xA5\x9C",
+ "\xDD\xEE" => "\xE6\xA5\x8F",
+ "\xDD\xEF" => "\xE6\xA5\x91",
+ "\xDD\xF0" => "\xE6\xA4\xB2",
+ "\xDD\xF1" => "\xE6\xA5\x92",
+ "\xDD\xF2" => "\xE6\xA4\xAF",
+ "\xDD\xF3" => "\xE6\xA5\xBB",
+ "\xDD\xF4" => "\xE6\xA4\xBC",
+ "\xDD\xF5" => "\xE6\xAD\x86",
+ "\xDD\xF6" => "\xE6\xAD\x85",
+ "\xDD\xF7" => "\xE6\xAD\x83",
+ "\xDD\xF8" => "\xE6\xAD\x82",
+ "\xDD\xF9" => "\xE6\xAD\x88",
+ "\xDD\xFA" => "\xE6\xAD\x81",
+ "\xDD\xFB" => "\xE6\xAE\x9B",
+ "\xDD\xFC" => "\xEF\xA8\x8D",
+ "\xDD\xFD" => "\xE6\xAF\xBB",
+ "\xDD\xFE" => "\xE6\xAF\xBC",
+ "\xDE\x40" => "\xE6\xAF\xB9",
+ "\xDE\x41" => "\xE6\xAF\xB7",
+ "\xDE\x42" => "\xE6\xAF\xB8",
+ "\xDE\x43" => "\xE6\xBA\x9B",
+ "\xDE\x44" => "\xE6\xBB\x96",
+ "\xDE\x45" => "\xE6\xBB\x88",
+ "\xDE\x46" => "\xE6\xBA\x8F",
+ "\xDE\x47" => "\xE6\xBB\x80",
+ "\xDE\x48" => "\xE6\xBA\x9F",
+ "\xDE\x49" => "\xE6\xBA\x93",
+ "\xDE\x4A" => "\xE6\xBA\x94",
+ "\xDE\x4B" => "\xE6\xBA\xA0",
+ "\xDE\x4C" => "\xE6\xBA\xB1",
+ "\xDE\x4D" => "\xE6\xBA\xB9",
+ "\xDE\x4E" => "\xE6\xBB\x86",
+ "\xDE\x4F" => "\xE6\xBB\x92",
+ "\xDE\x50" => "\xE6\xBA\xBD",
+ "\xDE\x51" => "\xE6\xBB\x81",
+ "\xDE\x52" => "\xE6\xBA\x9E",
+ "\xDE\x53" => "\xE6\xBB\x89",
+ "\xDE\x54" => "\xE6\xBA\xB7",
+ "\xDE\x55" => "\xE6\xBA\xB0",
+ "\xDE\x56" => "\xE6\xBB\x8D",
+ "\xDE\x57" => "\xE6\xBA\xA6",
+ "\xDE\x58" => "\xE6\xBB\x8F",
+ "\xDE\x59" => "\xE6\xBA\xB2",
+ "\xDE\x5A" => "\xE6\xBA\xBE",
+ "\xDE\x5B" => "\xE6\xBB\x83",
+ "\xDE\x5C" => "\xE6\xBB\x9C",
+ "\xDE\x5D" => "\xE6\xBB\x98",
+ "\xDE\x5E" => "\xE6\xBA\x99",
+ "\xDE\x5F" => "\xE6\xBA\x92",
+ "\xDE\x60" => "\xE6\xBA\x8E",
+ "\xDE\x61" => "\xE6\xBA\x8D",
+ "\xDE\x62" => "\xE6\xBA\xA4",
+ "\xDE\x63" => "\xE6\xBA\xA1",
+ "\xDE\x64" => "\xE6\xBA\xBF",
+ "\xDE\x65" => "\xE6\xBA\xB3",
+ "\xDE\x66" => "\xE6\xBB\x90",
+ "\xDE\x67" => "\xE6\xBB\x8A",
+ "\xDE\x68" => "\xE6\xBA\x97",
+ "\xDE\x69" => "\xE6\xBA\xAE",
+ "\xDE\x6A" => "\xE6\xBA\xA3",
+ "\xDE\x6B" => "\xE7\x85\x87",
+ "\xDE\x6C" => "\xE7\x85\x94",
+ "\xDE\x6D" => "\xE7\x85\x92",
+ "\xDE\x6E" => "\xE7\x85\xA3",
+ "\xDE\x6F" => "\xE7\x85\xA0",
+ "\xDE\x70" => "\xE7\x85\x81",
+ "\xDE\x71" => "\xE7\x85\x9D",
+ "\xDE\x72" => "\xE7\x85\xA2",
+ "\xDE\x73" => "\xE7\x85\xB2",
+ "\xDE\x74" => "\xE7\x85\xB8",
+ "\xDE\x75" => "\xE7\x85\xAA",
+ "\xDE\x76" => "\xE7\x85\xA1",
+ "\xDE\x77" => "\xE7\x85\x82",
+ "\xDE\x78" => "\xE7\x85\x98",
+ "\xDE\x79" => "\xE7\x85\x83",
+ "\xDE\x7A" => "\xE7\x85\x8B",
+ "\xDE\x7B" => "\xE7\x85\xB0",
+ "\xDE\x7C" => "\xE7\x85\x9F",
+ "\xDE\x7D" => "\xE7\x85\x90",
+ "\xDE\x7E" => "\xE7\x85\x93",
+ "\xDE\xA1" => "\xE7\x85\x84",
+ "\xDE\xA2" => "\xE7\x85\x8D",
+ "\xDE\xA3" => "\xE7\x85\x9A",
+ "\xDE\xA4" => "\xE7\x89\x8F",
+ "\xDE\xA5" => "\xE7\x8A\x8D",
+ "\xDE\xA6" => "\xE7\x8A\x8C",
+ "\xDE\xA7" => "\xE7\x8A\x91",
+ "\xDE\xA8" => "\xE7\x8A\x90",
+ "\xDE\xA9" => "\xE7\x8A\x8E",
+ "\xDE\xAA" => "\xE7\x8C\xBC",
+ "\xDE\xAB" => "\xE7\x8D\x82",
+ "\xDE\xAC" => "\xE7\x8C\xBB",
+ "\xDE\xAD" => "\xE7\x8C\xBA",
+ "\xDE\xAE" => "\xE7\x8D\x80",
+ "\xDE\xAF" => "\xE7\x8D\x8A",
+ "\xDE\xB0" => "\xE7\x8D\x89",
+ "\xDE\xB1" => "\xE7\x91\x84",
+ "\xDE\xB2" => "\xE7\x91\x8A",
+ "\xDE\xB3" => "\xE7\x91\x8B",
+ "\xDE\xB4" => "\xE7\x91\x92",
+ "\xDE\xB5" => "\xE7\x91\x91",
+ "\xDE\xB6" => "\xE7\x91\x97",
+ "\xDE\xB7" => "\xE7\x91\x80",
+ "\xDE\xB8" => "\xE7\x91\x8F",
+ "\xDE\xB9" => "\xE7\x91\x90",
+ "\xDE\xBA" => "\xE7\x91\x8E",
+ "\xDE\xBB" => "\xE7\x91\x82",
+ "\xDE\xBC" => "\xE7\x91\x86",
+ "\xDE\xBD" => "\xE7\x91\x8D",
+ "\xDE\xBE" => "\xE7\x91\x94",
+ "\xDE\xBF" => "\xE7\x93\xA1",
+ "\xDE\xC0" => "\xE7\x93\xBF",
+ "\xDE\xC1" => "\xE7\x93\xBE",
+ "\xDE\xC2" => "\xE7\x93\xBD",
+ "\xDE\xC3" => "\xE7\x94\x9D",
+ "\xDE\xC4" => "\xE7\x95\xB9",
+ "\xDE\xC5" => "\xE7\x95\xB7",
+ "\xDE\xC6" => "\xE6\xA6\x83",
+ "\xDE\xC7" => "\xE7\x97\xAF",
+ "\xDE\xC8" => "\xE7\x98\x8F",
+ "\xDE\xC9" => "\xE7\x98\x83",
+ "\xDE\xCA" => "\xE7\x97\xB7",
+ "\xDE\xCB" => "\xE7\x97\xBE",
+ "\xDE\xCC" => "\xE7\x97\xBC",
+ "\xDE\xCD" => "\xE7\x97\xB9",
+ "\xDE\xCE" => "\xE7\x97\xB8",
+ "\xDE\xCF" => "\xE7\x98\x90",
+ "\xDE\xD0" => "\xE7\x97\xBB",
+ "\xDE\xD1" => "\xE7\x97\xB6",
+ "\xDE\xD2" => "\xE7\x97\xAD",
+ "\xDE\xD3" => "\xE7\x97\xB5",
+ "\xDE\xD4" => "\xE7\x97\xBD",
+ "\xDE\xD5" => "\xE7\x9A\x99",
+ "\xDE\xD6" => "\xE7\x9A\xB5",
+ "\xDE\xD7" => "\xE7\x9B\x9D",
+ "\xDE\xD8" => "\xE7\x9D\x95",
+ "\xDE\xD9" => "\xE7\x9D\x9F",
+ "\xDE\xDA" => "\xE7\x9D\xA0",
+ "\xDE\xDB" => "\xE7\x9D\x92",
+ "\xDE\xDC" => "\xE7\x9D\x96",
+ "\xDE\xDD" => "\xE7\x9D\x9A",
+ "\xDE\xDE" => "\xE7\x9D\xA9",
+ "\xDE\xDF" => "\xE7\x9D\xA7",
+ "\xDE\xE0" => "\xE7\x9D\x94",
+ "\xDE\xE1" => "\xE7\x9D\x99",
+ "\xDE\xE2" => "\xE7\x9D\xAD",
+ "\xDE\xE3" => "\xE7\x9F\xA0",
+ "\xDE\xE4" => "\xE7\xA2\x87",
+ "\xDE\xE5" => "\xE7\xA2\x9A",
+ "\xDE\xE6" => "\xE7\xA2\x94",
+ "\xDE\xE7" => "\xE7\xA2\x8F",
+ "\xDE\xE8" => "\xE7\xA2\x84",
+ "\xDE\xE9" => "\xE7\xA2\x95",
+ "\xDE\xEA" => "\xE7\xA2\x85",
+ "\xDE\xEB" => "\xE7\xA2\x86",
+ "\xDE\xEC" => "\xE7\xA2\xA1",
+ "\xDE\xED" => "\xE7\xA2\x83",
+ "\xDE\xEE" => "\xE7\xA1\xB9",
+ "\xDE\xEF" => "\xE7\xA2\x99",
+ "\xDE\xF0" => "\xE7\xA2\x80",
+ "\xDE\xF1" => "\xE7\xA2\x96",
+ "\xDE\xF2" => "\xE7\xA1\xBB",
+ "\xDE\xF3" => "\xE7\xA5\xBC",
+ "\xDE\xF4" => "\xE7\xA6\x82",
+ "\xDE\xF5" => "\xE7\xA5\xBD",
+ "\xDE\xF6" => "\xE7\xA5\xB9",
+ "\xDE\xF7" => "\xE7\xA8\x91",
+ "\xDE\xF8" => "\xE7\xA8\x98",
+ "\xDE\xF9" => "\xE7\xA8\x99",
+ "\xDE\xFA" => "\xE7\xA8\x92",
+ "\xDE\xFB" => "\xE7\xA8\x97",
+ "\xDE\xFC" => "\xE7\xA8\x95",
+ "\xDE\xFD" => "\xE7\xA8\xA2",
+ "\xDE\xFE" => "\xE7\xA8\x93",
+ "\xDF\x40" => "\xE7\xA8\x9B",
+ "\xDF\x41" => "\xE7\xA8\x90",
+ "\xDF\x42" => "\xE7\xAA\xA3",
+ "\xDF\x43" => "\xE7\xAA\xA2",
+ "\xDF\x44" => "\xE7\xAA\x9E",
+ "\xDF\x45" => "\xE7\xAB\xAB",
+ "\xDF\x46" => "\xE7\xAD\xA6",
+ "\xDF\x47" => "\xE7\xAD\xA4",
+ "\xDF\x48" => "\xE7\xAD\xAD",
+ "\xDF\x49" => "\xE7\xAD\xB4",
+ "\xDF\x4A" => "\xE7\xAD\xA9",
+ "\xDF\x4B" => "\xE7\xAD\xB2",
+ "\xDF\x4C" => "\xE7\xAD\xA5",
+ "\xDF\x4D" => "\xE7\xAD\xB3",
+ "\xDF\x4E" => "\xE7\xAD\xB1",
+ "\xDF\x4F" => "\xE7\xAD\xB0",
+ "\xDF\x50" => "\xE7\xAD\xA1",
+ "\xDF\x51" => "\xE7\xAD\xB8",
+ "\xDF\x52" => "\xE7\xAD\xB6",
+ "\xDF\x53" => "\xE7\xAD\xA3",
+ "\xDF\x54" => "\xE7\xB2\xB2",
+ "\xDF\x55" => "\xE7\xB2\xB4",
+ "\xDF\x56" => "\xE7\xB2\xAF",
+ "\xDF\x57" => "\xE7\xB6\x88",
+ "\xDF\x58" => "\xE7\xB6\x86",
+ "\xDF\x59" => "\xE7\xB6\x80",
+ "\xDF\x5A" => "\xE7\xB6\x8D",
+ "\xDF\x5B" => "\xE7\xB5\xBF",
+ "\xDF\x5C" => "\xE7\xB6\x85",
+ "\xDF\x5D" => "\xE7\xB5\xBA",
+ "\xDF\x5E" => "\xE7\xB6\x8E",
+ "\xDF\x5F" => "\xE7\xB5\xBB",
+ "\xDF\x60" => "\xE7\xB6\x83",
+ "\xDF\x61" => "\xE7\xB5\xBC",
+ "\xDF\x62" => "\xE7\xB6\x8C",
+ "\xDF\x63" => "\xE7\xB6\x94",
+ "\xDF\x64" => "\xE7\xB6\x84",
+ "\xDF\x65" => "\xE7\xB5\xBD",
+ "\xDF\x66" => "\xE7\xB6\x92",
+ "\xDF\x67" => "\xE7\xBD\xAD",
+ "\xDF\x68" => "\xE7\xBD\xAB",
+ "\xDF\x69" => "\xE7\xBD\xA7",
+ "\xDF\x6A" => "\xE7\xBD\xA8",
+ "\xDF\x6B" => "\xE7\xBD\xAC",
+ "\xDF\x6C" => "\xE7\xBE\xA6",
+ "\xDF\x6D" => "\xE7\xBE\xA5",
+ "\xDF\x6E" => "\xE7\xBE\xA7",
+ "\xDF\x6F" => "\xE7\xBF\x9B",
+ "\xDF\x70" => "\xE7\xBF\x9C",
+ "\xDF\x71" => "\xE8\x80\xA1",
+ "\xDF\x72" => "\xE8\x85\xA4",
+ "\xDF\x73" => "\xE8\x85\xA0",
+ "\xDF\x74" => "\xE8\x85\xB7",
+ "\xDF\x75" => "\xE8\x85\x9C",
+ "\xDF\x76" => "\xE8\x85\xA9",
+ "\xDF\x77" => "\xE8\x85\x9B",
+ "\xDF\x78" => "\xE8\x85\xA2",
+ "\xDF\x79" => "\xE8\x85\xB2",
+ "\xDF\x7A" => "\xE6\x9C\xA1",
+ "\xDF\x7B" => "\xE8\x85\x9E",
+ "\xDF\x7C" => "\xE8\x85\xB6",
+ "\xDF\x7D" => "\xE8\x85\xA7",
+ "\xDF\x7E" => "\xE8\x85\xAF",
+ "\xDF\xA1" => "\xE8\x85\x84",
+ "\xDF\xA2" => "\xE8\x85\xA1",
+ "\xDF\xA3" => "\xE8\x88\x9D",
+ "\xDF\xA4" => "\xE8\x89\x89",
+ "\xDF\xA5" => "\xE8\x89\x84",
+ "\xDF\xA6" => "\xE8\x89\x80",
+ "\xDF\xA7" => "\xE8\x89\x82",
+ "\xDF\xA8" => "\xE8\x89\x85",
+ "\xDF\xA9" => "\xE8\x93\xB1",
+ "\xDF\xAA" => "\xE8\x90\xBF",
+ "\xDF\xAB" => "\xE8\x91\x96",
+ "\xDF\xAC" => "\xE8\x91\xB6",
+ "\xDF\xAD" => "\xE8\x91\xB9",
+ "\xDF\xAE" => "\xE8\x92\x8F",
+ "\xDF\xAF" => "\xE8\x92\x8D",
+ "\xDF\xB0" => "\xE8\x91\xA5",
+ "\xDF\xB1" => "\xE8\x91\x91",
+ "\xDF\xB2" => "\xE8\x91\x80",
+ "\xDF\xB3" => "\xE8\x92\x86",
+ "\xDF\xB4" => "\xE8\x91\xA7",
+ "\xDF\xB5" => "\xE8\x90\xB0",
+ "\xDF\xB6" => "\xE8\x91\x8D",
+ "\xDF\xB7" => "\xE8\x91\xBD",
+ "\xDF\xB8" => "\xE8\x91\x9A",
+ "\xDF\xB9" => "\xE8\x91\x99",
+ "\xDF\xBA" => "\xE8\x91\xB4",
+ "\xDF\xBB" => "\xE8\x91\xB3",
+ "\xDF\xBC" => "\xE8\x91\x9D",
+ "\xDF\xBD" => "\xE8\x94\x87",
+ "\xDF\xBE" => "\xE8\x91\x9E",
+ "\xDF\xBF" => "\xE8\x90\xB7",
+ "\xDF\xC0" => "\xE8\x90\xBA",
+ "\xDF\xC1" => "\xE8\x90\xB4",
+ "\xDF\xC2" => "\xE8\x91\xBA",
+ "\xDF\xC3" => "\xE8\x91\x83",
+ "\xDF\xC4" => "\xE8\x91\xB8",
+ "\xDF\xC5" => "\xE8\x90\xB2",
+ "\xDF\xC6" => "\xE8\x91\x85",
+ "\xDF\xC7" => "\xE8\x90\xA9",
+ "\xDF\xC8" => "\xE8\x8F\x99",
+ "\xDF\xC9" => "\xE8\x91\x8B",
+ "\xDF\xCA" => "\xE8\x90\xAF",
+ "\xDF\xCB" => "\xE8\x91\x82",
+ "\xDF\xCC" => "\xE8\x90\xAD",
+ "\xDF\xCD" => "\xE8\x91\x9F",
+ "\xDF\xCE" => "\xE8\x91\xB0",
+ "\xDF\xCF" => "\xE8\x90\xB9",
+ "\xDF\xD0" => "\xE8\x91\x8E",
+ "\xDF\xD1" => "\xE8\x91\x8C",
+ "\xDF\xD2" => "\xE8\x91\x92",
+ "\xDF\xD3" => "\xE8\x91\xAF",
+ "\xDF\xD4" => "\xE8\x93\x85",
+ "\xDF\xD5" => "\xE8\x92\x8E",
+ "\xDF\xD6" => "\xE8\x90\xBB",
+ "\xDF\xD7" => "\xE8\x91\x87",
+ "\xDF\xD8" => "\xE8\x90\xB6",
+ "\xDF\xD9" => "\xE8\x90\xB3",
+ "\xDF\xDA" => "\xE8\x91\xA8",
+ "\xDF\xDB" => "\xE8\x91\xBE",
+ "\xDF\xDC" => "\xE8\x91\x84",
+ "\xDF\xDD" => "\xE8\x90\xAB",
+ "\xDF\xDE" => "\xE8\x91\xA0",
+ "\xDF\xDF" => "\xE8\x91\x94",
+ "\xDF\xE0" => "\xE8\x91\xAE",
+ "\xDF\xE1" => "\xE8\x91\x90",
+ "\xDF\xE2" => "\xE8\x9C\x8B",
+ "\xDF\xE3" => "\xE8\x9C\x84",
+ "\xDF\xE4" => "\xE8\x9B\xB7",
+ "\xDF\xE5" => "\xE8\x9C\x8C",
+ "\xDF\xE6" => "\xE8\x9B\xBA",
+ "\xDF\xE7" => "\xE8\x9B\x96",
+ "\xDF\xE8" => "\xE8\x9B\xB5",
+ "\xDF\xE9" => "\xE8\x9D\x8D",
+ "\xDF\xEA" => "\xE8\x9B\xB8",
+ "\xDF\xEB" => "\xE8\x9C\x8E",
+ "\xDF\xEC" => "\xE8\x9C\x89",
+ "\xDF\xED" => "\xE8\x9C\x81",
+ "\xDF\xEE" => "\xE8\x9B\xB6",
+ "\xDF\xEF" => "\xE8\x9C\x8D",
+ "\xDF\xF0" => "\xE8\x9C\x85",
+ "\xDF\xF1" => "\xE8\xA3\x96",
+ "\xDF\xF2" => "\xE8\xA3\x8B",
+ "\xDF\xF3" => "\xE8\xA3\x8D",
+ "\xDF\xF4" => "\xE8\xA3\x8E",
+ "\xDF\xF5" => "\xE8\xA3\x9E",
+ "\xDF\xF6" => "\xE8\xA3\x9B",
+ "\xDF\xF7" => "\xE8\xA3\x9A",
+ "\xDF\xF8" => "\xE8\xA3\x8C",
+ "\xDF\xF9" => "\xE8\xA3\x90",
+ "\xDF\xFA" => "\xE8\xA6\x85",
+ "\xDF\xFB" => "\xE8\xA6\x9B",
+ "\xDF\xFC" => "\xE8\xA7\x9F",
+ "\xDF\xFD" => "\xE8\xA7\xA5",
+ "\xDF\xFE" => "\xE8\xA7\xA4",
+ "\xE0\x40" => "\xE8\xA7\xA1",
+ "\xE0\x41" => "\xE8\xA7\xA0",
+ "\xE0\x42" => "\xE8\xA7\xA2",
+ "\xE0\x43" => "\xE8\xA7\x9C",
+ "\xE0\x44" => "\xE8\xA7\xA6",
+ "\xE0\x45" => "\xE8\xA9\xB6",
+ "\xE0\x46" => "\xE8\xAA\x86",
+ "\xE0\x47" => "\xE8\xA9\xBF",
+ "\xE0\x48" => "\xE8\xA9\xA1",
+ "\xE0\x49" => "\xE8\xA8\xBF",
+ "\xE0\x4A" => "\xE8\xA9\xB7",
+ "\xE0\x4B" => "\xE8\xAA\x82",
+ "\xE0\x4C" => "\xE8\xAA\x84",
+ "\xE0\x4D" => "\xE8\xA9\xB5",
+ "\xE0\x4E" => "\xE8\xAA\x83",
+ "\xE0\x4F" => "\xE8\xAA\x81",
+ "\xE0\x50" => "\xE8\xA9\xB4",
+ "\xE0\x51" => "\xE8\xA9\xBA",
+ "\xE0\x52" => "\xE8\xB0\xBC",
+ "\xE0\x53" => "\xE8\xB1\x8B",
+ "\xE0\x54" => "\xE8\xB1\x8A",
+ "\xE0\x55" => "\xE8\xB1\xA5",
+ "\xE0\x56" => "\xE8\xB1\xA4",
+ "\xE0\x57" => "\xE8\xB1\xA6",
+ "\xE0\x58" => "\xE8\xB2\x86",
+ "\xE0\x59" => "\xE8\xB2\x84",
+ "\xE0\x5A" => "\xE8\xB2\x85",
+ "\xE0\x5B" => "\xE8\xB3\x8C",
+ "\xE0\x5C" => "\xE8\xB5\xA8",
+ "\xE0\x5D" => "\xE8\xB5\xA9",
+ "\xE0\x5E" => "\xE8\xB6\x91",
+ "\xE0\x5F" => "\xE8\xB6\x8C",
+ "\xE0\x60" => "\xE8\xB6\x8E",
+ "\xE0\x61" => "\xE8\xB6\x8F",
+ "\xE0\x62" => "\xE8\xB6\x8D",
+ "\xE0\x63" => "\xE8\xB6\x93",
+ "\xE0\x64" => "\xE8\xB6\x94",
+ "\xE0\x65" => "\xE8\xB6\x90",
+ "\xE0\x66" => "\xE8\xB6\x92",
+ "\xE0\x67" => "\xE8\xB7\xB0",
+ "\xE0\x68" => "\xE8\xB7\xA0",
+ "\xE0\x69" => "\xE8\xB7\xAC",
+ "\xE0\x6A" => "\xE8\xB7\xB1",
+ "\xE0\x6B" => "\xE8\xB7\xAE",
+ "\xE0\x6C" => "\xE8\xB7\x90",
+ "\xE0\x6D" => "\xE8\xB7\xA9",
+ "\xE0\x6E" => "\xE8\xB7\xA3",
+ "\xE0\x6F" => "\xE8\xB7\xA2",
+ "\xE0\x70" => "\xE8\xB7\xA7",
+ "\xE0\x71" => "\xE8\xB7\xB2",
+ "\xE0\x72" => "\xE8\xB7\xAB",
+ "\xE0\x73" => "\xE8\xB7\xB4",
+ "\xE0\x74" => "\xE8\xBC\x86",
+ "\xE0\x75" => "\xE8\xBB\xBF",
+ "\xE0\x76" => "\xE8\xBC\x81",
+ "\xE0\x77" => "\xE8\xBC\x80",
+ "\xE0\x78" => "\xE8\xBC\x85",
+ "\xE0\x79" => "\xE8\xBC\x87",
+ "\xE0\x7A" => "\xE8\xBC\x88",
+ "\xE0\x7B" => "\xE8\xBC\x82",
+ "\xE0\x7C" => "\xE8\xBC\x8B",
+ "\xE0\x7D" => "\xE9\x81\x92",
+ "\xE0\x7E" => "\xE9\x80\xBF",
+ "\xE0\xA1" => "\xE9\x81\x84",
+ "\xE0\xA2" => "\xE9\x81\x89",
+ "\xE0\xA3" => "\xE9\x80\xBD",
+ "\xE0\xA4" => "\xE9\x84\x90",
+ "\xE0\xA5" => "\xE9\x84\x8D",
+ "\xE0\xA6" => "\xE9\x84\x8F",
+ "\xE0\xA7" => "\xE9\x84\x91",
+ "\xE0\xA8" => "\xE9\x84\x96",
+ "\xE0\xA9" => "\xE9\x84\x94",
+ "\xE0\xAA" => "\xE9\x84\x8B",
+ "\xE0\xAB" => "\xE9\x84\x8E",
+ "\xE0\xAC" => "\xE9\x85\xAE",
+ "\xE0\xAD" => "\xE9\x85\xAF",
+ "\xE0\xAE" => "\xE9\x89\x88",
+ "\xE0\xAF" => "\xE9\x89\x92",
+ "\xE0\xB0" => "\xE9\x88\xB0",
+ "\xE0\xB1" => "\xE9\x88\xBA",
+ "\xE0\xB2" => "\xE9\x89\xA6",
+ "\xE0\xB3" => "\xE9\x88\xB3",
+ "\xE0\xB4" => "\xE9\x89\xA5",
+ "\xE0\xB5" => "\xE9\x89\x9E",
+ "\xE0\xB6" => "\xE9\x8A\x83",
+ "\xE0\xB7" => "\xE9\x88\xAE",
+ "\xE0\xB8" => "\xE9\x89\x8A",
+ "\xE0\xB9" => "\xE9\x89\x86",
+ "\xE0\xBA" => "\xE9\x89\xAD",
+ "\xE0\xBB" => "\xE9\x89\xAC",
+ "\xE0\xBC" => "\xE9\x89\x8F",
+ "\xE0\xBD" => "\xE9\x89\xA0",
+ "\xE0\xBE" => "\xE9\x89\xA7",
+ "\xE0\xBF" => "\xE9\x89\xAF",
+ "\xE0\xC0" => "\xE9\x88\xB6",
+ "\xE0\xC1" => "\xE9\x89\xA1",
+ "\xE0\xC2" => "\xE9\x89\xB0",
+ "\xE0\xC3" => "\xE9\x88\xB1",
+ "\xE0\xC4" => "\xE9\x89\x94",
+ "\xE0\xC5" => "\xE9\x89\xA3",
+ "\xE0\xC6" => "\xE9\x89\x90",
+ "\xE0\xC7" => "\xE9\x89\xB2",
+ "\xE0\xC8" => "\xE9\x89\x8E",
+ "\xE0\xC9" => "\xE9\x89\x93",
+ "\xE0\xCA" => "\xE9\x89\x8C",
+ "\xE0\xCB" => "\xE9\x89\x96",
+ "\xE0\xCC" => "\xE9\x88\xB2",
+ "\xE0\xCD" => "\xE9\x96\x9F",
+ "\xE0\xCE" => "\xE9\x96\x9C",
+ "\xE0\xCF" => "\xE9\x96\x9E",
+ "\xE0\xD0" => "\xE9\x96\x9B",
+ "\xE0\xD1" => "\xE9\x9A\x92",
+ "\xE0\xD2" => "\xE9\x9A\x93",
+ "\xE0\xD3" => "\xE9\x9A\x91",
+ "\xE0\xD4" => "\xE9\x9A\x97",
+ "\xE0\xD5" => "\xE9\x9B\x8E",
+ "\xE0\xD6" => "\xE9\x9B\xBA",
+ "\xE0\xD7" => "\xE9\x9B\xBD",
+ "\xE0\xD8" => "\xE9\x9B\xB8",
+ "\xE0\xD9" => "\xE9\x9B\xB5",
+ "\xE0\xDA" => "\xE9\x9D\xB3",
+ "\xE0\xDB" => "\xE9\x9D\xB7",
+ "\xE0\xDC" => "\xE9\x9D\xB8",
+ "\xE0\xDD" => "\xE9\x9D\xB2",
+ "\xE0\xDE" => "\xE9\xA0\x8F",
+ "\xE0\xDF" => "\xE9\xA0\x8D",
+ "\xE0\xE0" => "\xE9\xA0\x8E",
+ "\xE0\xE1" => "\xE9\xA2\xAC",
+ "\xE0\xE2" => "\xE9\xA3\xB6",
+ "\xE0\xE3" => "\xE9\xA3\xB9",
+ "\xE0\xE4" => "\xE9\xA6\xAF",
+ "\xE0\xE5" => "\xE9\xA6\xB2",
+ "\xE0\xE6" => "\xE9\xA6\xB0",
+ "\xE0\xE7" => "\xE9\xA6\xB5",
+ "\xE0\xE8" => "\xE9\xAA\xAD",
+ "\xE0\xE9" => "\xE9\xAA\xAB",
+ "\xE0\xEA" => "\xE9\xAD\x9B",
+ "\xE0\xEB" => "\xE9\xB3\xAA",
+ "\xE0\xEC" => "\xE9\xB3\xAD",
+ "\xE0\xED" => "\xE9\xB3\xA7",
+ "\xE0\xEE" => "\xE9\xBA\x80",
+ "\xE0\xEF" => "\xE9\xBB\xBD",
+ "\xE0\xF0" => "\xE5\x83\xA6",
+ "\xE0\xF1" => "\xE5\x83\x94",
+ "\xE0\xF2" => "\xE5\x83\x97",
+ "\xE0\xF3" => "\xE5\x83\xA8",
+ "\xE0\xF4" => "\xE5\x83\xB3",
+ "\xE0\xF5" => "\xE5\x83\x9B",
+ "\xE0\xF6" => "\xE5\x83\xAA",
+ "\xE0\xF7" => "\xE5\x83\x9D",
+ "\xE0\xF8" => "\xE5\x83\xA4",
+ "\xE0\xF9" => "\xE5\x83\x93",
+ "\xE0\xFA" => "\xE5\x83\xAC",
+ "\xE0\xFB" => "\xE5\x83\xB0",
+ "\xE0\xFC" => "\xE5\x83\xAF",
+ "\xE0\xFD" => "\xE5\x83\xA3",
+ "\xE0\xFE" => "\xE5\x83\xA0",
+ "\xE1\x40" => "\xE5\x87\x98",
+ "\xE1\x41" => "\xE5\x8A\x80",
+ "\xE1\x42" => "\xE5\x8A\x81",
+ "\xE1\x43" => "\xE5\x8B\xA9",
+ "\xE1\x44" => "\xE5\x8B\xAB",
+ "\xE1\x45" => "\xE5\x8C\xB0",
+ "\xE1\x46" => "\xE5\x8E\xAC",
+ "\xE1\x47" => "\xE5\x98\xA7",
+ "\xE1\x48" => "\xE5\x98\x95",
+ "\xE1\x49" => "\xE5\x98\x8C",
+ "\xE1\x4A" => "\xE5\x98\x92",
+ "\xE1\x4B" => "\xE5\x97\xBC",
+ "\xE1\x4C" => "\xE5\x98\x8F",
+ "\xE1\x4D" => "\xE5\x98\x9C",
+ "\xE1\x4E" => "\xE5\x98\x81",
+ "\xE1\x4F" => "\xE5\x98\x93",
+ "\xE1\x50" => "\xE5\x98\x82",
+ "\xE1\x51" => "\xE5\x97\xBA",
+ "\xE1\x52" => "\xE5\x98\x9D",
+ "\xE1\x53" => "\xE5\x98\x84",
+ "\xE1\x54" => "\xE5\x97\xBF",
+ "\xE1\x55" => "\xE5\x97\xB9",
+ "\xE1\x56" => "\xE5\xA2\x89",
+ "\xE1\x57" => "\xE5\xA1\xBC",
+ "\xE1\x58" => "\xE5\xA2\x90",
+ "\xE1\x59" => "\xE5\xA2\x98",
+ "\xE1\x5A" => "\xE5\xA2\x86",
+ "\xE1\x5B" => "\xE5\xA2\x81",
+ "\xE1\x5C" => "\xE5\xA1\xBF",
+ "\xE1\x5D" => "\xE5\xA1\xB4",
+ "\xE1\x5E" => "\xE5\xA2\x8B",
+ "\xE1\x5F" => "\xE5\xA1\xBA",
+ "\xE1\x60" => "\xE5\xA2\x87",
+ "\xE1\x61" => "\xE5\xA2\x91",
+ "\xE1\x62" => "\xE5\xA2\x8E",
+ "\xE1\x63" => "\xE5\xA1\xB6",
+ "\xE1\x64" => "\xE5\xA2\x82",
+ "\xE1\x65" => "\xE5\xA2\x88",
+ "\xE1\x66" => "\xE5\xA1\xBB",
+ "\xE1\x67" => "\xE5\xA2\x94",
+ "\xE1\x68" => "\xE5\xA2\x8F",
+ "\xE1\x69" => "\xE5\xA3\xBE",
+ "\xE1\x6A" => "\xE5\xA5\xAB",
+ "\xE1\x6B" => "\xE5\xAB\x9C",
+ "\xE1\x6C" => "\xE5\xAB\xAE",
+ "\xE1\x6D" => "\xE5\xAB\xA5",
+ "\xE1\x6E" => "\xE5\xAB\x95",
+ "\xE1\x6F" => "\xE5\xAB\xAA",
+ "\xE1\x70" => "\xE5\xAB\x9A",
+ "\xE1\x71" => "\xE5\xAB\xAD",
+ "\xE1\x72" => "\xE5\xAB\xAB",
+ "\xE1\x73" => "\xE5\xAB\xB3",
+ "\xE1\x74" => "\xE5\xAB\xA2",
+ "\xE1\x75" => "\xE5\xAB\xA0",
+ "\xE1\x76" => "\xE5\xAB\x9B",
+ "\xE1\x77" => "\xE5\xAB\xAC",
+ "\xE1\x78" => "\xE5\xAB\x9E",
+ "\xE1\x79" => "\xE5\xAB\x9D",
+ "\xE1\x7A" => "\xE5\xAB\x99",
+ "\xE1\x7B" => "\xE5\xAB\xA8",
+ "\xE1\x7C" => "\xE5\xAB\x9F",
+ "\xE1\x7D" => "\xE5\xAD\xB7",
+ "\xE1\x7E" => "\xE5\xAF\xA0",
+ "\xE1\xA1" => "\xE5\xAF\xA3",
+ "\xE1\xA2" => "\xE5\xB1\xA3",
+ "\xE1\xA3" => "\xE5\xB6\x82",
+ "\xE1\xA4" => "\xE5\xB6\x80",
+ "\xE1\xA5" => "\xE5\xB5\xBD",
+ "\xE1\xA6" => "\xE5\xB6\x86",
+ "\xE1\xA7" => "\xE5\xB5\xBA",
+ "\xE1\xA8" => "\xE5\xB6\x81",
+ "\xE1\xA9" => "\xE5\xB5\xB7",
+ "\xE1\xAA" => "\xE5\xB6\x8A",
+ "\xE1\xAB" => "\xE5\xB6\x89",
+ "\xE1\xAC" => "\xE5\xB6\x88",
+ "\xE1\xAD" => "\xE5\xB5\xBE",
+ "\xE1\xAE" => "\xE5\xB5\xBC",
+ "\xE1\xAF" => "\xE5\xB6\x8D",
+ "\xE1\xB0" => "\xE5\xB5\xB9",
+ "\xE1\xB1" => "\xE5\xB5\xBF",
+ "\xE1\xB2" => "\xE5\xB9\x98",
+ "\xE1\xB3" => "\xE5\xB9\x99",
+ "\xE1\xB4" => "\xE5\xB9\x93",
+ "\xE1\xB5" => "\xE5\xBB\x98",
+ "\xE1\xB6" => "\xE5\xBB\x91",
+ "\xE1\xB7" => "\xE5\xBB\x97",
+ "\xE1\xB8" => "\xE5\xBB\x8E",
+ "\xE1\xB9" => "\xE5\xBB\x9C",
+ "\xE1\xBA" => "\xE5\xBB\x95",
+ "\xE1\xBB" => "\xE5\xBB\x99",
+ "\xE1\xBC" => "\xE5\xBB\x92",
+ "\xE1\xBD" => "\xE5\xBB\x94",
+ "\xE1\xBE" => "\xE5\xBD\x84",
+ "\xE1\xBF" => "\xE5\xBD\x83",
+ "\xE1\xC0" => "\xE5\xBD\xAF",
+ "\xE1\xC1" => "\xE5\xBE\xB6",
+ "\xE1\xC2" => "\xE6\x84\xAC",
+ "\xE1\xC3" => "\xE6\x84\xA8",
+ "\xE1\xC4" => "\xE6\x85\x81",
+ "\xE1\xC5" => "\xE6\x85\x9E",
+ "\xE1\xC6" => "\xE6\x85\xB1",
+ "\xE1\xC7" => "\xE6\x85\xB3",
+ "\xE1\xC8" => "\xE6\x85\x92",
+ "\xE1\xC9" => "\xE6\x85\x93",
+ "\xE1\xCA" => "\xE6\x85\xB2",
+ "\xE1\xCB" => "\xE6\x85\xAC",
+ "\xE1\xCC" => "\xE6\x86\x80",
+ "\xE1\xCD" => "\xE6\x85\xB4",
+ "\xE1\xCE" => "\xE6\x85\x94",
+ "\xE1\xCF" => "\xE6\x85\xBA",
+ "\xE1\xD0" => "\xE6\x85\x9B",
+ "\xE1\xD1" => "\xE6\x85\xA5",
+ "\xE1\xD2" => "\xE6\x84\xBB",
+ "\xE1\xD3" => "\xE6\x85\xAA",
+ "\xE1\xD4" => "\xE6\x85\xA1",
+ "\xE1\xD5" => "\xE6\x85\x96",
+ "\xE1\xD6" => "\xE6\x88\xA9",
+ "\xE1\xD7" => "\xE6\x88\xA7",
+ "\xE1\xD8" => "\xE6\x88\xAB",
+ "\xE1\xD9" => "\xE6\x90\xAB",
+ "\xE1\xDA" => "\xE6\x91\x8D",
+ "\xE1\xDB" => "\xE6\x91\x9B",
+ "\xE1\xDC" => "\xE6\x91\x9D",
+ "\xE1\xDD" => "\xE6\x91\xB4",
+ "\xE1\xDE" => "\xE6\x91\xB6",
+ "\xE1\xDF" => "\xE6\x91\xB2",
+ "\xE1\xE0" => "\xE6\x91\xB3",
+ "\xE1\xE1" => "\xE6\x91\xBD",
+ "\xE1\xE2" => "\xE6\x91\xB5",
+ "\xE1\xE3" => "\xE6\x91\xA6",
+ "\xE1\xE4" => "\xE6\x92\xA6",
+ "\xE1\xE5" => "\xE6\x91\x8E",
+ "\xE1\xE6" => "\xE6\x92\x82",
+ "\xE1\xE7" => "\xE6\x91\x9E",
+ "\xE1\xE8" => "\xE6\x91\x9C",
+ "\xE1\xE9" => "\xE6\x91\x8B",
+ "\xE1\xEA" => "\xE6\x91\x93",
+ "\xE1\xEB" => "\xE6\x91\xA0",
+ "\xE1\xEC" => "\xE6\x91\x90",
+ "\xE1\xED" => "\xE6\x91\xBF",
+ "\xE1\xEE" => "\xE6\x90\xBF",
+ "\xE1\xEF" => "\xE6\x91\xAC",
+ "\xE1\xF0" => "\xE6\x91\xAB",
+ "\xE1\xF1" => "\xE6\x91\x99",
+ "\xE1\xF2" => "\xE6\x91\xA5",
+ "\xE1\xF3" => "\xE6\x91\xB7",
+ "\xE1\xF4" => "\xE6\x95\xB3",
+ "\xE1\xF5" => "\xE6\x96\xA0",
+ "\xE1\xF6" => "\xE6\x9A\xA1",
+ "\xE1\xF7" => "\xE6\x9A\xA0",
+ "\xE1\xF8" => "\xE6\x9A\x9F",
+ "\xE1\xF9" => "\xE6\x9C\x85",
+ "\xE1\xFA" => "\xE6\x9C\x84",
+ "\xE1\xFB" => "\xE6\x9C\xA2",
+ "\xE1\xFC" => "\xE6\xA6\xB1",
+ "\xE1\xFD" => "\xE6\xA6\xB6",
+ "\xE1\xFE" => "\xE6\xA7\x89",
+ "\xE2\x40" => "\xE6\xA6\xA0",
+ "\xE2\x41" => "\xE6\xA7\x8E",
+ "\xE2\x42" => "\xE6\xA6\x96",
+ "\xE2\x43" => "\xE6\xA6\xB0",
+ "\xE2\x44" => "\xE6\xA6\xAC",
+ "\xE2\x45" => "\xE6\xA6\xBC",
+ "\xE2\x46" => "\xE6\xA6\x91",
+ "\xE2\x47" => "\xE6\xA6\x99",
+ "\xE2\x48" => "\xE6\xA6\x8E",
+ "\xE2\x49" => "\xE6\xA6\xA7",
+ "\xE2\x4A" => "\xE6\xA6\x8D",
+ "\xE2\x4B" => "\xE6\xA6\xA9",
+ "\xE2\x4C" => "\xE6\xA6\xBE",
+ "\xE2\x4D" => "\xE6\xA6\xAF",
+ "\xE2\x4E" => "\xE6\xA6\xBF",
+ "\xE2\x4F" => "\xE6\xA7\x84",
+ "\xE2\x50" => "\xE6\xA6\xBD",
+ "\xE2\x51" => "\xE6\xA6\xA4",
+ "\xE2\x52" => "\xE6\xA7\x94",
+ "\xE2\x53" => "\xE6\xA6\xB9",
+ "\xE2\x54" => "\xE6\xA7\x8A",
+ "\xE2\x55" => "\xE6\xA6\x9A",
+ "\xE2\x56" => "\xE6\xA7\x8F",
+ "\xE2\x57" => "\xE6\xA6\xB3",
+ "\xE2\x58" => "\xE6\xA6\x93",
+ "\xE2\x59" => "\xE6\xA6\xAA",
+ "\xE2\x5A" => "\xE6\xA6\xA1",
+ "\xE2\x5B" => "\xE6\xA6\x9E",
+ "\xE2\x5C" => "\xE6\xA7\x99",
+ "\xE2\x5D" => "\xE6\xA6\x97",
+ "\xE2\x5E" => "\xE6\xA6\x90",
+ "\xE2\x5F" => "\xE6\xA7\x82",
+ "\xE2\x60" => "\xE6\xA6\xB5",
+ "\xE2\x61" => "\xE6\xA6\xA5",
+ "\xE2\x62" => "\xE6\xA7\x86",
+ "\xE2\x63" => "\xE6\xAD\x8A",
+ "\xE2\x64" => "\xE6\xAD\x8D",
+ "\xE2\x65" => "\xE6\xAD\x8B",
+ "\xE2\x66" => "\xE6\xAE\x9E",
+ "\xE2\x67" => "\xE6\xAE\x9F",
+ "\xE2\x68" => "\xE6\xAE\xA0",
+ "\xE2\x69" => "\xE6\xAF\x83",
+ "\xE2\x6A" => "\xE6\xAF\x84",
+ "\xE2\x6B" => "\xE6\xAF\xBE",
+ "\xE2\x6C" => "\xE6\xBB\x8E",
+ "\xE2\x6D" => "\xE6\xBB\xB5",
+ "\xE2\x6E" => "\xE6\xBB\xB1",
+ "\xE2\x6F" => "\xE6\xBC\x83",
+ "\xE2\x70" => "\xE6\xBC\xA5",
+ "\xE2\x71" => "\xE6\xBB\xB8",
+ "\xE2\x72" => "\xE6\xBC\xB7",
+ "\xE2\x73" => "\xE6\xBB\xBB",
+ "\xE2\x74" => "\xE6\xBC\xAE",
+ "\xE2\x75" => "\xE6\xBC\x89",
+ "\xE2\x76" => "\xE6\xBD\x8E",
+ "\xE2\x77" => "\xE6\xBC\x99",
+ "\xE2\x78" => "\xE6\xBC\x9A",
+ "\xE2\x79" => "\xE6\xBC\xA7",
+ "\xE2\x7A" => "\xE6\xBC\x98",
+ "\xE2\x7B" => "\xE6\xBC\xBB",
+ "\xE2\x7C" => "\xE6\xBC\x92",
+ "\xE2\x7D" => "\xE6\xBB\xAD",
+ "\xE2\x7E" => "\xE6\xBC\x8A",
+ "\xE2\xA1" => "\xE6\xBC\xB6",
+ "\xE2\xA2" => "\xE6\xBD\xB3",
+ "\xE2\xA3" => "\xE6\xBB\xB9",
+ "\xE2\xA4" => "\xE6\xBB\xAE",
+ "\xE2\xA5" => "\xE6\xBC\xAD",
+ "\xE2\xA6" => "\xE6\xBD\x80",
+ "\xE2\xA7" => "\xE6\xBC\xB0",
+ "\xE2\xA8" => "\xE6\xBC\xBC",
+ "\xE2\xA9" => "\xE6\xBC\xB5",
+ "\xE2\xAA" => "\xE6\xBB\xAB",
+ "\xE2\xAB" => "\xE6\xBC\x87",
+ "\xE2\xAC" => "\xE6\xBC\x8E",
+ "\xE2\xAD" => "\xE6\xBD\x83",
+ "\xE2\xAE" => "\xE6\xBC\x85",
+ "\xE2\xAF" => "\xE6\xBB\xBD",
+ "\xE2\xB0" => "\xE6\xBB\xB6",
+ "\xE2\xB1" => "\xE6\xBC\xB9",
+ "\xE2\xB2" => "\xE6\xBC\x9C",
+ "\xE2\xB3" => "\xE6\xBB\xBC",
+ "\xE2\xB4" => "\xE6\xBC\xBA",
+ "\xE2\xB5" => "\xE6\xBC\x9F",
+ "\xE2\xB6" => "\xE6\xBC\x8D",
+ "\xE2\xB7" => "\xE6\xBC\x9E",
+ "\xE2\xB8" => "\xE6\xBC\x88",
+ "\xE2\xB9" => "\xE6\xBC\xA1",
+ "\xE2\xBA" => "\xE7\x86\x87",
+ "\xE2\xBB" => "\xE7\x86\x90",
+ "\xE2\xBC" => "\xE7\x86\x89",
+ "\xE2\xBD" => "\xE7\x86\x80",
+ "\xE2\xBE" => "\xE7\x86\x85",
+ "\xE2\xBF" => "\xE7\x86\x82",
+ "\xE2\xC0" => "\xE7\x86\x8F",
+ "\xE2\xC1" => "\xE7\x85\xBB",
+ "\xE2\xC2" => "\xE7\x86\x86",
+ "\xE2\xC3" => "\xE7\x86\x81",
+ "\xE2\xC4" => "\xE7\x86\x97",
+ "\xE2\xC5" => "\xE7\x89\x84",
+ "\xE2\xC6" => "\xE7\x89\x93",
+ "\xE2\xC7" => "\xE7\x8A\x97",
+ "\xE2\xC8" => "\xE7\x8A\x95",
+ "\xE2\xC9" => "\xE7\x8A\x93",
+ "\xE2\xCA" => "\xE7\x8D\x83",
+ "\xE2\xCB" => "\xE7\x8D\x8D",
+ "\xE2\xCC" => "\xE7\x8D\x91",
+ "\xE2\xCD" => "\xE7\x8D\x8C",
+ "\xE2\xCE" => "\xE7\x91\xA2",
+ "\xE2\xCF" => "\xE7\x91\xB3",
+ "\xE2\xD0" => "\xE7\x91\xB1",
+ "\xE2\xD1" => "\xE7\x91\xB5",
+ "\xE2\xD2" => "\xE7\x91\xB2",
+ "\xE2\xD3" => "\xE7\x91\xA7",
+ "\xE2\xD4" => "\xE7\x91\xAE",
+ "\xE2\xD5" => "\xE7\x94\x80",
+ "\xE2\xD6" => "\xE7\x94\x82",
+ "\xE2\xD7" => "\xE7\x94\x83",
+ "\xE2\xD8" => "\xE7\x95\xBD",
+ "\xE2\xD9" => "\xE7\x96\x90",
+ "\xE2\xDA" => "\xE7\x98\x96",
+ "\xE2\xDB" => "\xE7\x98\x88",
+ "\xE2\xDC" => "\xE7\x98\x8C",
+ "\xE2\xDD" => "\xE7\x98\x95",
+ "\xE2\xDE" => "\xE7\x98\x91",
+ "\xE2\xDF" => "\xE7\x98\x8A",
+ "\xE2\xE0" => "\xE7\x98\x94",
+ "\xE2\xE1" => "\xE7\x9A\xB8",
+ "\xE2\xE2" => "\xE7\x9E\x81",
+ "\xE2\xE3" => "\xE7\x9D\xBC",
+ "\xE2\xE4" => "\xE7\x9E\x85",
+ "\xE2\xE5" => "\xE7\x9E\x82",
+ "\xE2\xE6" => "\xE7\x9D\xAE",
+ "\xE2\xE7" => "\xE7\x9E\x80",
+ "\xE2\xE8" => "\xE7\x9D\xAF",
+ "\xE2\xE9" => "\xE7\x9D\xBE",
+ "\xE2\xEA" => "\xE7\x9E\x83",
+ "\xE2\xEB" => "\xE7\xA2\xB2",
+ "\xE2\xEC" => "\xE7\xA2\xAA",
+ "\xE2\xED" => "\xE7\xA2\xB4",
+ "\xE2\xEE" => "\xE7\xA2\xAD",
+ "\xE2\xEF" => "\xE7\xA2\xA8",
+ "\xE2\xF0" => "\xE7\xA1\xBE",
+ "\xE2\xF1" => "\xE7\xA2\xAB",
+ "\xE2\xF2" => "\xE7\xA2\x9E",
+ "\xE2\xF3" => "\xE7\xA2\xA5",
+ "\xE2\xF4" => "\xE7\xA2\xA0",
+ "\xE2\xF5" => "\xE7\xA2\xAC",
+ "\xE2\xF6" => "\xE7\xA2\xA2",
+ "\xE2\xF7" => "\xE7\xA2\xA4",
+ "\xE2\xF8" => "\xE7\xA6\x98",
+ "\xE2\xF9" => "\xE7\xA6\x8A",
+ "\xE2\xFA" => "\xE7\xA6\x8B",
+ "\xE2\xFB" => "\xE7\xA6\x96",
+ "\xE2\xFC" => "\xE7\xA6\x95",
+ "\xE2\xFD" => "\xE7\xA6\x94",
+ "\xE2\xFE" => "\xE7\xA6\x93",
+ "\xE3\x40" => "\xE7\xA6\x97",
+ "\xE3\x41" => "\xE7\xA6\x88",
+ "\xE3\x42" => "\xE7\xA6\x92",
+ "\xE3\x43" => "\xE7\xA6\x90",
+ "\xE3\x44" => "\xE7\xA8\xAB",
+ "\xE3\x45" => "\xE7\xA9\x8A",
+ "\xE3\x46" => "\xE7\xA8\xB0",
+ "\xE3\x47" => "\xE7\xA8\xAF",
+ "\xE3\x48" => "\xE7\xA8\xA8",
+ "\xE3\x49" => "\xE7\xA8\xA6",
+ "\xE3\x4A" => "\xE7\xAA\xA8",
+ "\xE3\x4B" => "\xE7\xAA\xAB",
+ "\xE3\x4C" => "\xE7\xAA\xAC",
+ "\xE3\x4D" => "\xE7\xAB\xAE",
+ "\xE3\x4E" => "\xE7\xAE\x88",
+ "\xE3\x4F" => "\xE7\xAE\x9C",
+ "\xE3\x50" => "\xE7\xAE\x8A",
+ "\xE3\x51" => "\xE7\xAE\x91",
+ "\xE3\x52" => "\xE7\xAE\x90",
+ "\xE3\x53" => "\xE7\xAE\x96",
+ "\xE3\x54" => "\xE7\xAE\x8D",
+ "\xE3\x55" => "\xE7\xAE\x8C",
+ "\xE3\x56" => "\xE7\xAE\x9B",
+ "\xE3\x57" => "\xE7\xAE\x8E",
+ "\xE3\x58" => "\xE7\xAE\x85",
+ "\xE3\x59" => "\xE7\xAE\x98",
+ "\xE3\x5A" => "\xE5\x8A\x84",
+ "\xE3\x5B" => "\xE7\xAE\x99",
+ "\xE3\x5C" => "\xE7\xAE\xA4",
+ "\xE3\x5D" => "\xE7\xAE\x82",
+ "\xE3\x5E" => "\xE7\xB2\xBB",
+ "\xE3\x5F" => "\xE7\xB2\xBF",
+ "\xE3\x60" => "\xE7\xB2\xBC",
+ "\xE3\x61" => "\xE7\xB2\xBA",
+ "\xE3\x62" => "\xE7\xB6\xA7",
+ "\xE3\x63" => "\xE7\xB6\xB7",
+ "\xE3\x64" => "\xE7\xB7\x82",
+ "\xE3\x65" => "\xE7\xB6\xA3",
+ "\xE3\x66" => "\xE7\xB6\xAA",
+ "\xE3\x67" => "\xE7\xB7\x81",
+ "\xE3\x68" => "\xE7\xB7\x80",
+ "\xE3\x69" => "\xE7\xB7\x85",
+ "\xE3\x6A" => "\xE7\xB6\x9D",
+ "\xE3\x6B" => "\xE7\xB7\x8E",
+ "\xE3\x6C" => "\xE7\xB7\x84",
+ "\xE3\x6D" => "\xE7\xB7\x86",
+ "\xE3\x6E" => "\xE7\xB7\x8B",
+ "\xE3\x6F" => "\xE7\xB7\x8C",
+ "\xE3\x70" => "\xE7\xB6\xAF",
+ "\xE3\x71" => "\xE7\xB6\xB9",
+ "\xE3\x72" => "\xE7\xB6\x96",
+ "\xE3\x73" => "\xE7\xB6\xBC",
+ "\xE3\x74" => "\xE7\xB6\x9F",
+ "\xE3\x75" => "\xE7\xB6\xA6",
+ "\xE3\x76" => "\xE7\xB6\xAE",
+ "\xE3\x77" => "\xE7\xB6\xA9",
+ "\xE3\x78" => "\xE7\xB6\xA1",
+ "\xE3\x79" => "\xE7\xB7\x89",
+ "\xE3\x7A" => "\xE7\xBD\xB3",
+ "\xE3\x7B" => "\xE7\xBF\xA2",
+ "\xE3\x7C" => "\xE7\xBF\xA3",
+ "\xE3\x7D" => "\xE7\xBF\xA5",
+ "\xE3\x7E" => "\xE7\xBF\x9E",
+ "\xE3\xA1" => "\xE8\x80\xA4",
+ "\xE3\xA2" => "\xE8\x81\x9D",
+ "\xE3\xA3" => "\xE8\x81\x9C",
+ "\xE3\xA4" => "\xE8\x86\x89",
+ "\xE3\xA5" => "\xE8\x86\x86",
+ "\xE3\xA6" => "\xE8\x86\x83",
+ "\xE3\xA7" => "\xE8\x86\x87",
+ "\xE3\xA8" => "\xE8\x86\x8D",
+ "\xE3\xA9" => "\xE8\x86\x8C",
+ "\xE3\xAA" => "\xE8\x86\x8B",
+ "\xE3\xAB" => "\xE8\x88\x95",
+ "\xE3\xAC" => "\xE8\x92\x97",
+ "\xE3\xAD" => "\xE8\x92\xA4",
+ "\xE3\xAE" => "\xE8\x92\xA1",
+ "\xE3\xAF" => "\xE8\x92\x9F",
+ "\xE3\xB0" => "\xE8\x92\xBA",
+ "\xE3\xB1" => "\xE8\x93\x8E",
+ "\xE3\xB2" => "\xE8\x93\x82",
+ "\xE3\xB3" => "\xE8\x92\xAC",
+ "\xE3\xB4" => "\xE8\x92\xAE",
+ "\xE3\xB5" => "\xE8\x92\xAB",
+ "\xE3\xB6" => "\xE8\x92\xB9",
+ "\xE3\xB7" => "\xE8\x92\xB4",
+ "\xE3\xB8" => "\xE8\x93\x81",
+ "\xE3\xB9" => "\xE8\x93\x8D",
+ "\xE3\xBA" => "\xE8\x92\xAA",
+ "\xE3\xBB" => "\xE8\x92\x9A",
+ "\xE3\xBC" => "\xE8\x92\xB1",
+ "\xE3\xBD" => "\xE8\x93\x90",
+ "\xE3\xBE" => "\xE8\x92\x9D",
+ "\xE3\xBF" => "\xE8\x92\xA7",
+ "\xE3\xC0" => "\xE8\x92\xBB",
+ "\xE3\xC1" => "\xE8\x92\xA2",
+ "\xE3\xC2" => "\xE8\x92\x94",
+ "\xE3\xC3" => "\xE8\x93\x87",
+ "\xE3\xC4" => "\xE8\x93\x8C",
+ "\xE3\xC5" => "\xE8\x92\x9B",
+ "\xE3\xC6" => "\xE8\x92\xA9",
+ "\xE3\xC7" => "\xE8\x92\xAF",
+ "\xE3\xC8" => "\xE8\x92\xA8",
+ "\xE3\xC9" => "\xE8\x93\x96",
+ "\xE3\xCA" => "\xE8\x92\x98",
+ "\xE3\xCB" => "\xE8\x92\xB6",
+ "\xE3\xCC" => "\xE8\x93\x8F",
+ "\xE3\xCD" => "\xE8\x92\xA0",
+ "\xE3\xCE" => "\xE8\x93\x97",
+ "\xE3\xCF" => "\xE8\x93\x94",
+ "\xE3\xD0" => "\xE8\x93\x92",
+ "\xE3\xD1" => "\xE8\x93\x9B",
+ "\xE3\xD2" => "\xE8\x92\xB0",
+ "\xE3\xD3" => "\xE8\x92\x91",
+ "\xE3\xD4" => "\xE8\x99\xA1",
+ "\xE3\xD5" => "\xE8\x9C\xB3",
+ "\xE3\xD6" => "\xE8\x9C\xA3",
+ "\xE3\xD7" => "\xE8\x9C\xA8",
+ "\xE3\xD8" => "\xE8\x9D\xAB",
+ "\xE3\xD9" => "\xE8\x9D\x80",
+ "\xE3\xDA" => "\xE8\x9C\xAE",
+ "\xE3\xDB" => "\xE8\x9C\x9E",
+ "\xE3\xDC" => "\xE8\x9C\xA1",
+ "\xE3\xDD" => "\xE8\x9C\x99",
+ "\xE3\xDE" => "\xE8\x9C\x9B",
+ "\xE3\xDF" => "\xE8\x9D\x83",
+ "\xE3\xE0" => "\xE8\x9C\xAC",
+ "\xE3\xE1" => "\xE8\x9D\x81",
+ "\xE3\xE2" => "\xE8\x9C\xBE",
+ "\xE3\xE3" => "\xE8\x9D\x86",
+ "\xE3\xE4" => "\xE8\x9C\xA0",
+ "\xE3\xE5" => "\xE8\x9C\xB2",
+ "\xE3\xE6" => "\xE8\x9C\xAA",
+ "\xE3\xE7" => "\xE8\x9C\xAD",
+ "\xE3\xE8" => "\xE8\x9C\xBC",
+ "\xE3\xE9" => "\xE8\x9C\x92",
+ "\xE3\xEA" => "\xE8\x9C\xBA",
+ "\xE3\xEB" => "\xE8\x9C\xB1",
+ "\xE3\xEC" => "\xE8\x9C\xB5",
+ "\xE3\xED" => "\xE8\x9D\x82",
+ "\xE3\xEE" => "\xE8\x9C\xA6",
+ "\xE3\xEF" => "\xE8\x9C\xA7",
+ "\xE3\xF0" => "\xE8\x9C\xB8",
+ "\xE3\xF1" => "\xE8\x9C\xA4",
+ "\xE3\xF2" => "\xE8\x9C\x9A",
+ "\xE3\xF3" => "\xE8\x9C\xB0",
+ "\xE3\xF4" => "\xE8\x9C\x91",
+ "\xE3\xF5" => "\xE8\xA3\xB7",
+ "\xE3\xF6" => "\xE8\xA3\xA7",
+ "\xE3\xF7" => "\xE8\xA3\xB1",
+ "\xE3\xF8" => "\xE8\xA3\xB2",
+ "\xE3\xF9" => "\xE8\xA3\xBA",
+ "\xE3\xFA" => "\xE8\xA3\xBE",
+ "\xE3\xFB" => "\xE8\xA3\xAE",
+ "\xE3\xFC" => "\xE8\xA3\xBC",
+ "\xE3\xFD" => "\xE8\xA3\xB6",
+ "\xE3\xFE" => "\xE8\xA3\xBB",
+ "\xE4\x40" => "\xE8\xA3\xB0",
+ "\xE4\x41" => "\xE8\xA3\xAC",
+ "\xE4\x42" => "\xE8\xA3\xAB",
+ "\xE4\x43" => "\xE8\xA6\x9D",
+ "\xE4\x44" => "\xE8\xA6\xA1",
+ "\xE4\x45" => "\xE8\xA6\x9F",
+ "\xE4\x46" => "\xE8\xA6\x9E",
+ "\xE4\x47" => "\xE8\xA7\xA9",
+ "\xE4\x48" => "\xE8\xA7\xAB",
+ "\xE4\x49" => "\xE8\xA7\xA8",
+ "\xE4\x4A" => "\xE8\xAA\xAB",
+ "\xE4\x4B" => "\xE8\xAA\x99",
+ "\xE4\x4C" => "\xE8\xAA\x8B",
+ "\xE4\x4D" => "\xE8\xAA\x92",
+ "\xE4\x4E" => "\xE8\xAA\x8F",
+ "\xE4\x4F" => "\xE8\xAA\x96",
+ "\xE4\x50" => "\xE8\xB0\xBD",
+ "\xE4\x51" => "\xE8\xB1\xA8",
+ "\xE4\x52" => "\xE8\xB1\xA9",
+ "\xE4\x53" => "\xE8\xB3\x95",
+ "\xE4\x54" => "\xE8\xB3\x8F",
+ "\xE4\x55" => "\xE8\xB3\x97",
+ "\xE4\x56" => "\xE8\xB6\x96",
+ "\xE4\x57" => "\xE8\xB8\x89",
+ "\xE4\x58" => "\xE8\xB8\x82",
+ "\xE4\x59" => "\xE8\xB7\xBF",
+ "\xE4\x5A" => "\xE8\xB8\x8D",
+ "\xE4\x5B" => "\xE8\xB7\xBD",
+ "\xE4\x5C" => "\xE8\xB8\x8A",
+ "\xE4\x5D" => "\xE8\xB8\x83",
+ "\xE4\x5E" => "\xE8\xB8\x87",
+ "\xE4\x5F" => "\xE8\xB8\x86",
+ "\xE4\x60" => "\xE8\xB8\x85",
+ "\xE4\x61" => "\xE8\xB7\xBE",
+ "\xE4\x62" => "\xE8\xB8\x80",
+ "\xE4\x63" => "\xE8\xB8\x84",
+ "\xE4\x64" => "\xE8\xBC\x90",
+ "\xE4\x65" => "\xE8\xBC\x91",
+ "\xE4\x66" => "\xE8\xBC\x8E",
+ "\xE4\x67" => "\xE8\xBC\x8D",
+ "\xE4\x68" => "\xE9\x84\xA3",
+ "\xE4\x69" => "\xE9\x84\x9C",
+ "\xE4\x6A" => "\xE9\x84\xA0",
+ "\xE4\x6B" => "\xE9\x84\xA2",
+ "\xE4\x6C" => "\xE9\x84\x9F",
+ "\xE4\x6D" => "\xE9\x84\x9D",
+ "\xE4\x6E" => "\xE9\x84\x9A",
+ "\xE4\x6F" => "\xE9\x84\xA4",
+ "\xE4\x70" => "\xE9\x84\xA1",
+ "\xE4\x71" => "\xE9\x84\x9B",
+ "\xE4\x72" => "\xE9\x85\xBA",
+ "\xE4\x73" => "\xE9\x85\xB2",
+ "\xE4\x74" => "\xE9\x85\xB9",
+ "\xE4\x75" => "\xE9\x85\xB3",
+ "\xE4\x76" => "\xE9\x8A\xA5",
+ "\xE4\x77" => "\xE9\x8A\xA4",
+ "\xE4\x78" => "\xE9\x89\xB6",
+ "\xE4\x79" => "\xE9\x8A\x9B",
+ "\xE4\x7A" => "\xE9\x89\xBA",
+ "\xE4\x7B" => "\xE9\x8A\xA0",
+ "\xE4\x7C" => "\xE9\x8A\x94",
+ "\xE4\x7D" => "\xE9\x8A\xAA",
+ "\xE4\x7E" => "\xE9\x8A\x8D",
+ "\xE4\xA1" => "\xE9\x8A\xA6",
+ "\xE4\xA2" => "\xE9\x8A\x9A",
+ "\xE4\xA3" => "\xE9\x8A\xAB",
+ "\xE4\xA4" => "\xE9\x89\xB9",
+ "\xE4\xA5" => "\xE9\x8A\x97",
+ "\xE4\xA6" => "\xE9\x89\xBF",
+ "\xE4\xA7" => "\xE9\x8A\xA3",
+ "\xE4\xA8" => "\xE9\x8B\xAE",
+ "\xE4\xA9" => "\xE9\x8A\x8E",
+ "\xE4\xAA" => "\xE9\x8A\x82",
+ "\xE4\xAB" => "\xE9\x8A\x95",
+ "\xE4\xAC" => "\xE9\x8A\xA2",
+ "\xE4\xAD" => "\xE9\x89\xBD",
+ "\xE4\xAE" => "\xE9\x8A\x88",
+ "\xE4\xAF" => "\xE9\x8A\xA1",
+ "\xE4\xB0" => "\xE9\x8A\x8A",
+ "\xE4\xB1" => "\xE9\x8A\x86",
+ "\xE4\xB2" => "\xE9\x8A\x8C",
+ "\xE4\xB3" => "\xE9\x8A\x99",
+ "\xE4\xB4" => "\xE9\x8A\xA7",
+ "\xE4\xB5" => "\xE9\x89\xBE",
+ "\xE4\xB6" => "\xE9\x8A\x87",
+ "\xE4\xB7" => "\xE9\x8A\xA9",
+ "\xE4\xB8" => "\xE9\x8A\x9D",
+ "\xE4\xB9" => "\xE9\x8A\x8B",
+ "\xE4\xBA" => "\xE9\x88\xAD",
+ "\xE4\xBB" => "\xE9\x9A\x9E",
+ "\xE4\xBC" => "\xE9\x9A\xA1",
+ "\xE4\xBD" => "\xE9\x9B\xBF",
+ "\xE4\xBE" => "\xE9\x9D\x98",
+ "\xE4\xBF" => "\xE9\x9D\xBD",
+ "\xE4\xC0" => "\xE9\x9D\xBA",
+ "\xE4\xC1" => "\xE9\x9D\xBE",
+ "\xE4\xC2" => "\xE9\x9E\x83",
+ "\xE4\xC3" => "\xE9\x9E\x80",
+ "\xE4\xC4" => "\xE9\x9E\x82",
+ "\xE4\xC5" => "\xE9\x9D\xBB",
+ "\xE4\xC6" => "\xE9\x9E\x84",
+ "\xE4\xC7" => "\xE9\x9E\x81",
+ "\xE4\xC8" => "\xE9\x9D\xBF",
+ "\xE4\xC9" => "\xE9\x9F\x8E",
+ "\xE4\xCA" => "\xE9\x9F\x8D",
+ "\xE4\xCB" => "\xE9\xA0\x96",
+ "\xE4\xCC" => "\xE9\xA2\xAD",
+ "\xE4\xCD" => "\xE9\xA2\xAE",
+ "\xE4\xCE" => "\xE9\xA4\x82",
+ "\xE4\xCF" => "\xE9\xA4\x80",
+ "\xE4\xD0" => "\xE9\xA4\x87",
+ "\xE4\xD1" => "\xE9\xA6\x9D",
+ "\xE4\xD2" => "\xE9\xA6\x9C",
+ "\xE4\xD3" => "\xE9\xA7\x83",
+ "\xE4\xD4" => "\xE9\xA6\xB9",
+ "\xE4\xD5" => "\xE9\xA6\xBB",
+ "\xE4\xD6" => "\xE9\xA6\xBA",
+ "\xE4\xD7" => "\xE9\xA7\x82",
+ "\xE4\xD8" => "\xE9\xA6\xBD",
+ "\xE4\xD9" => "\xE9\xA7\x87",
+ "\xE4\xDA" => "\xE9\xAA\xB1",
+ "\xE4\xDB" => "\xE9\xAB\xA3",
+ "\xE4\xDC" => "\xE9\xAB\xA7",
+ "\xE4\xDD" => "\xE9\xAC\xBE",
+ "\xE4\xDE" => "\xE9\xAC\xBF",
+ "\xE4\xDF" => "\xE9\xAD\xA0",
+ "\xE4\xE0" => "\xE9\xAD\xA1",
+ "\xE4\xE1" => "\xE9\xAD\x9F",
+ "\xE4\xE2" => "\xE9\xB3\xB1",
+ "\xE4\xE3" => "\xE9\xB3\xB2",
+ "\xE4\xE4" => "\xE9\xB3\xB5",
+ "\xE4\xE5" => "\xE9\xBA\xA7",
+ "\xE4\xE6" => "\xE5\x83\xBF",
+ "\xE4\xE7" => "\xE5\x84\x83",
+ "\xE4\xE8" => "\xE5\x84\xB0",
+ "\xE4\xE9" => "\xE5\x83\xB8",
+ "\xE4\xEA" => "\xE5\x84\x86",
+ "\xE4\xEB" => "\xE5\x84\x87",
+ "\xE4\xEC" => "\xE5\x83\xB6",
+ "\xE4\xED" => "\xE5\x83\xBE",
+ "\xE4\xEE" => "\xE5\x84\x8B",
+ "\xE4\xEF" => "\xE5\x84\x8C",
+ "\xE4\xF0" => "\xE5\x83\xBD",
+ "\xE4\xF1" => "\xE5\x84\x8A",
+ "\xE4\xF2" => "\xE5\x8A\x8B",
+ "\xE4\xF3" => "\xE5\x8A\x8C",
+ "\xE4\xF4" => "\xE5\x8B\xB1",
+ "\xE4\xF5" => "\xE5\x8B\xAF",
+ "\xE4\xF6" => "\xE5\x99\x88",
+ "\xE4\xF7" => "\xE5\x99\x82",
+ "\xE4\xF8" => "\xE5\x99\x8C",
+ "\xE4\xF9" => "\xE5\x98\xB5",
+ "\xE4\xFA" => "\xE5\x99\x81",
+ "\xE4\xFB" => "\xE5\x99\x8A",
+ "\xE4\xFC" => "\xE5\x99\x89",
+ "\xE4\xFD" => "\xE5\x99\x86",
+ "\xE4\xFE" => "\xE5\x99\x98",
+ "\xE5\x40" => "\xE5\x99\x9A",
+ "\xE5\x41" => "\xE5\x99\x80",
+ "\xE5\x42" => "\xE5\x98\xB3",
+ "\xE5\x43" => "\xE5\x98\xBD",
+ "\xE5\x44" => "\xE5\x98\xAC",
+ "\xE5\x45" => "\xE5\x98\xBE",
+ "\xE5\x46" => "\xE5\x98\xB8",
+ "\xE5\x47" => "\xE5\x98\xAA",
+ "\xE5\x48" => "\xE5\x98\xBA",
+ "\xE5\x49" => "\xE5\x9C\x9A",
+ "\xE5\x4A" => "\xE5\xA2\xAB",
+ "\xE5\x4B" => "\xE5\xA2\x9D",
+ "\xE5\x4C" => "\xE5\xA2\xB1",
+ "\xE5\x4D" => "\xE5\xA2\xA0",
+ "\xE5\x4E" => "\xE5\xA2\xA3",
+ "\xE5\x4F" => "\xE5\xA2\xAF",
+ "\xE5\x50" => "\xE5\xA2\xAC",
+ "\xE5\x51" => "\xE5\xA2\xA5",
+ "\xE5\x52" => "\xE5\xA2\xA1",
+ "\xE5\x53" => "\xE5\xA3\xBF",
+ "\xE5\x54" => "\xE5\xAB\xBF",
+ "\xE5\x55" => "\xE5\xAB\xB4",
+ "\xE5\x56" => "\xE5\xAB\xBD",
+ "\xE5\x57" => "\xE5\xAB\xB7",
+ "\xE5\x58" => "\xE5\xAB\xB6",
+ "\xE5\x59" => "\xE5\xAC\x83",
+ "\xE5\x5A" => "\xE5\xAB\xB8",
+ "\xE5\x5B" => "\xE5\xAC\x82",
+ "\xE5\x5C" => "\xE5\xAB\xB9",
+ "\xE5\x5D" => "\xE5\xAC\x81",
+ "\xE5\x5E" => "\xE5\xAC\x87",
+ "\xE5\x5F" => "\xE5\xAC\x85",
+ "\xE5\x60" => "\xE5\xAC\x8F",
+ "\xE5\x61" => "\xE5\xB1\xA7",
+ "\xE5\x62" => "\xE5\xB6\x99",
+ "\xE5\x63" => "\xE5\xB6\x97",
+ "\xE5\x64" => "\xE5\xB6\x9F",
+ "\xE5\x65" => "\xE5\xB6\x92",
+ "\xE5\x66" => "\xE5\xB6\xA2",
+ "\xE5\x67" => "\xE5\xB6\x93",
+ "\xE5\x68" => "\xE5\xB6\x95",
+ "\xE5\x69" => "\xE5\xB6\xA0",
+ "\xE5\x6A" => "\xE5\xB6\x9C",
+ "\xE5\x6B" => "\xE5\xB6\xA1",
+ "\xE5\x6C" => "\xE5\xB6\x9A",
+ "\xE5\x6D" => "\xE5\xB6\x9E",
+ "\xE5\x6E" => "\xE5\xB9\xA9",
+ "\xE5\x6F" => "\xE5\xB9\x9D",
+ "\xE5\x70" => "\xE5\xB9\xA0",
+ "\xE5\x71" => "\xE5\xB9\x9C",
+ "\xE5\x72" => "\xE7\xB7\xB3",
+ "\xE5\x73" => "\xE5\xBB\x9B",
+ "\xE5\x74" => "\xE5\xBB\x9E",
+ "\xE5\x75" => "\xE5\xBB\xA1",
+ "\xE5\x76" => "\xE5\xBD\x89",
+ "\xE5\x77" => "\xE5\xBE\xB2",
+ "\xE5\x78" => "\xE6\x86\x8B",
+ "\xE5\x79" => "\xE6\x86\x83",
+ "\xE5\x7A" => "\xE6\x85\xB9",
+ "\xE5\x7B" => "\xE6\x86\xB1",
+ "\xE5\x7C" => "\xE6\x86\xB0",
+ "\xE5\x7D" => "\xE6\x86\xA2",
+ "\xE5\x7E" => "\xE6\x86\x89",
+ "\xE5\xA1" => "\xE6\x86\x9B",
+ "\xE5\xA2" => "\xE6\x86\x93",
+ "\xE5\xA3" => "\xE6\x86\xAF",
+ "\xE5\xA4" => "\xE6\x86\xAD",
+ "\xE5\xA5" => "\xE6\x86\x9F",
+ "\xE5\xA6" => "\xE6\x86\x92",
+ "\xE5\xA7" => "\xE6\x86\xAA",
+ "\xE5\xA8" => "\xE6\x86\xA1",
+ "\xE5\xA9" => "\xE6\x86\x8D",
+ "\xE5\xAA" => "\xE6\x85\xA6",
+ "\xE5\xAB" => "\xE6\x86\xB3",
+ "\xE5\xAC" => "\xE6\x88\xAD",
+ "\xE5\xAD" => "\xE6\x91\xAE",
+ "\xE5\xAE" => "\xE6\x91\xB0",
+ "\xE5\xAF" => "\xE6\x92\x96",
+ "\xE5\xB0" => "\xE6\x92\xA0",
+ "\xE5\xB1" => "\xE6\x92\x85",
+ "\xE5\xB2" => "\xE6\x92\x97",
+ "\xE5\xB3" => "\xE6\x92\x9C",
+ "\xE5\xB4" => "\xE6\x92\x8F",
+ "\xE5\xB5" => "\xE6\x92\x8B",
+ "\xE5\xB6" => "\xE6\x92\x8A",
+ "\xE5\xB7" => "\xE6\x92\x8C",
+ "\xE5\xB8" => "\xE6\x92\xA3",
+ "\xE5\xB9" => "\xE6\x92\x9F",
+ "\xE5\xBA" => "\xE6\x91\xA8",
+ "\xE5\xBB" => "\xE6\x92\xB1",
+ "\xE5\xBC" => "\xE6\x92\x98",
+ "\xE5\xBD" => "\xE6\x95\xB6",
+ "\xE5\xBE" => "\xE6\x95\xBA",
+ "\xE5\xBF" => "\xE6\x95\xB9",
+ "\xE5\xC0" => "\xE6\x95\xBB",
+ "\xE5\xC1" => "\xE6\x96\xB2",
+ "\xE5\xC2" => "\xE6\x96\xB3",
+ "\xE5\xC3" => "\xE6\x9A\xB5",
+ "\xE5\xC4" => "\xE6\x9A\xB0",
+ "\xE5\xC5" => "\xE6\x9A\xA9",
+ "\xE5\xC6" => "\xE6\x9A\xB2",
+ "\xE5\xC7" => "\xE6\x9A\xB7",
+ "\xE5\xC8" => "\xE6\x9A\xAA",
+ "\xE5\xC9" => "\xE6\x9A\xAF",
+ "\xE5\xCA" => "\xE6\xA8\x80",
+ "\xE5\xCB" => "\xE6\xA8\x86",
+ "\xE5\xCC" => "\xE6\xA8\x97",
+ "\xE5\xCD" => "\xE6\xA7\xA5",
+ "\xE5\xCE" => "\xE6\xA7\xB8",
+ "\xE5\xCF" => "\xE6\xA8\x95",
+ "\xE5\xD0" => "\xE6\xA7\xB1",
+ "\xE5\xD1" => "\xE6\xA7\xA4",
+ "\xE5\xD2" => "\xE6\xA8\xA0",
+ "\xE5\xD3" => "\xE6\xA7\xBF",
+ "\xE5\xD4" => "\xE6\xA7\xAC",
+ "\xE5\xD5" => "\xE6\xA7\xA2",
+ "\xE5\xD6" => "\xE6\xA8\x9B",
+ "\xE5\xD7" => "\xE6\xA8\x9D",
+ "\xE5\xD8" => "\xE6\xA7\xBE",
+ "\xE5\xD9" => "\xE6\xA8\xA7",
+ "\xE5\xDA" => "\xE6\xA7\xB2",
+ "\xE5\xDB" => "\xE6\xA7\xAE",
+ "\xE5\xDC" => "\xE6\xA8\x94",
+ "\xE5\xDD" => "\xE6\xA7\xB7",
+ "\xE5\xDE" => "\xE6\xA7\xA7",
+ "\xE5\xDF" => "\xE6\xA9\x80",
+ "\xE5\xE0" => "\xE6\xA8\x88",
+ "\xE5\xE1" => "\xE6\xA7\xA6",
+ "\xE5\xE2" => "\xE6\xA7\xBB",
+ "\xE5\xE3" => "\xE6\xA8\x8D",
+ "\xE5\xE4" => "\xE6\xA7\xBC",
+ "\xE5\xE5" => "\xE6\xA7\xAB",
+ "\xE5\xE6" => "\xE6\xA8\x89",
+ "\xE5\xE7" => "\xE6\xA8\x84",
+ "\xE5\xE8" => "\xE6\xA8\x98",
+ "\xE5\xE9" => "\xE6\xA8\xA5",
+ "\xE5\xEA" => "\xE6\xA8\x8F",
+ "\xE5\xEB" => "\xE6\xA7\xB6",
+ "\xE5\xEC" => "\xE6\xA8\xA6",
+ "\xE5\xED" => "\xE6\xA8\x87",
+ "\xE5\xEE" => "\xE6\xA7\xB4",
+ "\xE5\xEF" => "\xE6\xA8\x96",
+ "\xE5\xF0" => "\xE6\xAD\x91",
+ "\xE5\xF1" => "\xE6\xAE\xA5",
+ "\xE5\xF2" => "\xE6\xAE\xA3",
+ "\xE5\xF3" => "\xE6\xAE\xA2",
+ "\xE5\xF4" => "\xE6\xAE\xA6",
+ "\xE5\xF5" => "\xE6\xB0\x81",
+ "\xE5\xF6" => "\xE6\xB0\x80",
+ "\xE5\xF7" => "\xE6\xAF\xBF",
+ "\xE5\xF8" => "\xE6\xB0\x82",
+ "\xE5\xF9" => "\xE6\xBD\x81",
+ "\xE5\xFA" => "\xE6\xBC\xA6",
+ "\xE5\xFB" => "\xE6\xBD\xBE",
+ "\xE5\xFC" => "\xE6\xBE\x87",
+ "\xE5\xFD" => "\xE6\xBF\x86",
+ "\xE5\xFE" => "\xE6\xBE\x92",
+ "\xE6\x40" => "\xE6\xBE\x8D",
+ "\xE6\x41" => "\xE6\xBE\x89",
+ "\xE6\x42" => "\xE6\xBE\x8C",
+ "\xE6\x43" => "\xE6\xBD\xA2",
+ "\xE6\x44" => "\xE6\xBD\x8F",
+ "\xE6\x45" => "\xE6\xBE\x85",
+ "\xE6\x46" => "\xE6\xBD\x9A",
+ "\xE6\x47" => "\xE6\xBE\x96",
+ "\xE6\x48" => "\xE6\xBD\xB6",
+ "\xE6\x49" => "\xE6\xBD\xAC",
+ "\xE6\x4A" => "\xE6\xBE\x82",
+ "\xE6\x4B" => "\xE6\xBD\x95",
+ "\xE6\x4C" => "\xE6\xBD\xB2",
+ "\xE6\x4D" => "\xE6\xBD\x92",
+ "\xE6\x4E" => "\xE6\xBD\x90",
+ "\xE6\x4F" => "\xE6\xBD\x97",
+ "\xE6\x50" => "\xE6\xBE\x94",
+ "\xE6\x51" => "\xE6\xBE\x93",
+ "\xE6\x52" => "\xE6\xBD\x9D",
+ "\xE6\x53" => "\xE6\xBC\x80",
+ "\xE6\x54" => "\xE6\xBD\xA1",
+ "\xE6\x55" => "\xE6\xBD\xAB",
+ "\xE6\x56" => "\xE6\xBD\xBD",
+ "\xE6\x57" => "\xE6\xBD\xA7",
+ "\xE6\x58" => "\xE6\xBE\x90",
+ "\xE6\x59" => "\xE6\xBD\x93",
+ "\xE6\x5A" => "\xE6\xBE\x8B",
+ "\xE6\x5B" => "\xE6\xBD\xA9",
+ "\xE6\x5C" => "\xE6\xBD\xBF",
+ "\xE6\x5D" => "\xE6\xBE\x95",
+ "\xE6\x5E" => "\xE6\xBD\xA3",
+ "\xE6\x5F" => "\xE6\xBD\xB7",
+ "\xE6\x60" => "\xE6\xBD\xAA",
+ "\xE6\x61" => "\xE6\xBD\xBB",
+ "\xE6\x62" => "\xE7\x86\xB2",
+ "\xE6\x63" => "\xE7\x86\xAF",
+ "\xE6\x64" => "\xE7\x86\x9B",
+ "\xE6\x65" => "\xE7\x86\xB0",
+ "\xE6\x66" => "\xE7\x86\xA0",
+ "\xE6\x67" => "\xE7\x86\x9A",
+ "\xE6\x68" => "\xE7\x86\xA9",
+ "\xE6\x69" => "\xE7\x86\xB5",
+ "\xE6\x6A" => "\xE7\x86\x9D",
+ "\xE6\x6B" => "\xE7\x86\xA5",
+ "\xE6\x6C" => "\xE7\x86\x9E",
+ "\xE6\x6D" => "\xE7\x86\xA4",
+ "\xE6\x6E" => "\xE7\x86\xA1",
+ "\xE6\x6F" => "\xE7\x86\xAA",
+ "\xE6\x70" => "\xE7\x86\x9C",
+ "\xE6\x71" => "\xE7\x86\xA7",
+ "\xE6\x72" => "\xE7\x86\xB3",
+ "\xE6\x73" => "\xE7\x8A\x98",
+ "\xE6\x74" => "\xE7\x8A\x9A",
+ "\xE6\x75" => "\xE7\x8D\x98",
+ "\xE6\x76" => "\xE7\x8D\x92",
+ "\xE6\x77" => "\xE7\x8D\x9E",
+ "\xE6\x78" => "\xE7\x8D\x9F",
+ "\xE6\x79" => "\xE7\x8D\xA0",
+ "\xE6\x7A" => "\xE7\x8D\x9D",
+ "\xE6\x7B" => "\xE7\x8D\x9B",
+ "\xE6\x7C" => "\xE7\x8D\xA1",
+ "\xE6\x7D" => "\xE7\x8D\x9A",
+ "\xE6\x7E" => "\xE7\x8D\x99",
+ "\xE6\xA1" => "\xE7\x8D\xA2",
+ "\xE6\xA2" => "\xE7\x92\x87",
+ "\xE6\xA3" => "\xE7\x92\x89",
+ "\xE6\xA4" => "\xE7\x92\x8A",
+ "\xE6\xA5" => "\xE7\x92\x86",
+ "\xE6\xA6" => "\xE7\x92\x81",
+ "\xE6\xA7" => "\xE7\x91\xBD",
+ "\xE6\xA8" => "\xE7\x92\x85",
+ "\xE6\xA9" => "\xE7\x92\x88",
+ "\xE6\xAA" => "\xE7\x91\xBC",
+ "\xE6\xAB" => "\xE7\x91\xB9",
+ "\xE6\xAC" => "\xE7\x94\x88",
+ "\xE6\xAD" => "\xE7\x94\x87",
+ "\xE6\xAE" => "\xE7\x95\xBE",
+ "\xE6\xAF" => "\xE7\x98\xA5",
+ "\xE6\xB0" => "\xE7\x98\x9E",
+ "\xE6\xB1" => "\xE7\x98\x99",
+ "\xE6\xB2" => "\xE7\x98\x9D",
+ "\xE6\xB3" => "\xE7\x98\x9C",
+ "\xE6\xB4" => "\xE7\x98\xA3",
+ "\xE6\xB5" => "\xE7\x98\x9A",
+ "\xE6\xB6" => "\xE7\x98\xA8",
+ "\xE6\xB7" => "\xE7\x98\x9B",
+ "\xE6\xB8" => "\xE7\x9A\x9C",
+ "\xE6\xB9" => "\xE7\x9A\x9D",
+ "\xE6\xBA" => "\xE7\x9A\x9E",
+ "\xE6\xBB" => "\xE7\x9A\x9B",
+ "\xE6\xBC" => "\xE7\x9E\x8D",
+ "\xE6\xBD" => "\xE7\x9E\x8F",
+ "\xE6\xBE" => "\xE7\x9E\x89",
+ "\xE6\xBF" => "\xE7\x9E\x88",
+ "\xE6\xC0" => "\xE7\xA3\x8D",
+ "\xE6\xC1" => "\xE7\xA2\xBB",
+ "\xE6\xC2" => "\xE7\xA3\x8F",
+ "\xE6\xC3" => "\xE7\xA3\x8C",
+ "\xE6\xC4" => "\xE7\xA3\x91",
+ "\xE6\xC5" => "\xE7\xA3\x8E",
+ "\xE6\xC6" => "\xE7\xA3\x94",
+ "\xE6\xC7" => "\xE7\xA3\x88",
+ "\xE6\xC8" => "\xE7\xA3\x83",
+ "\xE6\xC9" => "\xE7\xA3\x84",
+ "\xE6\xCA" => "\xE7\xA3\x89",
+ "\xE6\xCB" => "\xE7\xA6\x9A",
+ "\xE6\xCC" => "\xE7\xA6\xA1",
+ "\xE6\xCD" => "\xE7\xA6\xA0",
+ "\xE6\xCE" => "\xE7\xA6\x9C",
+ "\xE6\xCF" => "\xE7\xA6\xA2",
+ "\xE6\xD0" => "\xE7\xA6\x9B",
+ "\xE6\xD1" => "\xE6\xAD\xB6",
+ "\xE6\xD2" => "\xE7\xA8\xB9",
+ "\xE6\xD3" => "\xE7\xAA\xB2",
+ "\xE6\xD4" => "\xE7\xAA\xB4",
+ "\xE6\xD5" => "\xE7\xAA\xB3",
+ "\xE6\xD6" => "\xE7\xAE\xB7",
+ "\xE6\xD7" => "\xE7\xAF\x8B",
+ "\xE6\xD8" => "\xE7\xAE\xBE",
+ "\xE6\xD9" => "\xE7\xAE\xAC",
+ "\xE6\xDA" => "\xE7\xAF\x8E",
+ "\xE6\xDB" => "\xE7\xAE\xAF",
+ "\xE6\xDC" => "\xE7\xAE\xB9",
+ "\xE6\xDD" => "\xE7\xAF\x8A",
+ "\xE6\xDE" => "\xE7\xAE\xB5",
+ "\xE6\xDF" => "\xE7\xB3\x85",
+ "\xE6\xE0" => "\xE7\xB3\x88",
+ "\xE6\xE1" => "\xE7\xB3\x8C",
+ "\xE6\xE2" => "\xE7\xB3\x8B",
+ "\xE6\xE3" => "\xE7\xB7\xB7",
+ "\xE6\xE4" => "\xE7\xB7\x9B",
+ "\xE6\xE5" => "\xE7\xB7\xAA",
+ "\xE6\xE6" => "\xE7\xB7\xA7",
+ "\xE6\xE7" => "\xE7\xB7\x97",
+ "\xE6\xE8" => "\xE7\xB7\xA1",
+ "\xE6\xE9" => "\xE7\xB8\x83",
+ "\xE6\xEA" => "\xE7\xB7\xBA",
+ "\xE6\xEB" => "\xE7\xB7\xA6",
+ "\xE6\xEC" => "\xE7\xB7\xB6",
+ "\xE6\xED" => "\xE7\xB7\xB1",
+ "\xE6\xEE" => "\xE7\xB7\xB0",
+ "\xE6\xEF" => "\xE7\xB7\xAE",
+ "\xE6\xF0" => "\xE7\xB7\x9F",
+ "\xE6\xF1" => "\xE7\xBD\xB6",
+ "\xE6\xF2" => "\xE7\xBE\xAC",
+ "\xE6\xF3" => "\xE7\xBE\xB0",
+ "\xE6\xF4" => "\xE7\xBE\xAD",
+ "\xE6\xF5" => "\xE7\xBF\xAD",
+ "\xE6\xF6" => "\xE7\xBF\xAB",
+ "\xE6\xF7" => "\xE7\xBF\xAA",
+ "\xE6\xF8" => "\xE7\xBF\xAC",
+ "\xE6\xF9" => "\xE7\xBF\xA6",
+ "\xE6\xFA" => "\xE7\xBF\xA8",
+ "\xE6\xFB" => "\xE8\x81\xA4",
+ "\xE6\xFC" => "\xE8\x81\xA7",
+ "\xE6\xFD" => "\xE8\x86\xA3",
+ "\xE6\xFE" => "\xE8\x86\x9F",
+ "\xE7\x40" => "\xE8\x86\x9E",
+ "\xE7\x41" => "\xE8\x86\x95",
+ "\xE7\x42" => "\xE8\x86\xA2",
+ "\xE7\x43" => "\xE8\x86\x99",
+ "\xE7\x44" => "\xE8\x86\x97",
+ "\xE7\x45" => "\xE8\x88\x96",
+ "\xE7\x46" => "\xE8\x89\x8F",
+ "\xE7\x47" => "\xE8\x89\x93",
+ "\xE7\x48" => "\xE8\x89\x92",
+ "\xE7\x49" => "\xE8\x89\x90",
+ "\xE7\x4A" => "\xE8\x89\x8E",
+ "\xE7\x4B" => "\xE8\x89\x91",
+ "\xE7\x4C" => "\xE8\x94\xA4",
+ "\xE7\x4D" => "\xE8\x94\xBB",
+ "\xE7\x4E" => "\xE8\x94\x8F",
+ "\xE7\x4F" => "\xE8\x94\x80",
+ "\xE7\x50" => "\xE8\x94\xA9",
+ "\xE7\x51" => "\xE8\x94\x8E",
+ "\xE7\x52" => "\xE8\x94\x89",
+ "\xE7\x53" => "\xE8\x94\x8D",
+ "\xE7\x54" => "\xE8\x94\x9F",
+ "\xE7\x55" => "\xE8\x94\x8A",
+ "\xE7\x56" => "\xE8\x94\xA7",
+ "\xE7\x57" => "\xE8\x94\x9C",
+ "\xE7\x58" => "\xE8\x93\xBB",
+ "\xE7\x59" => "\xE8\x94\xAB",
+ "\xE7\x5A" => "\xE8\x93\xBA",
+ "\xE7\x5B" => "\xE8\x94\x88",
+ "\xE7\x5C" => "\xE8\x94\x8C",
+ "\xE7\x5D" => "\xE8\x93\xB4",
+ "\xE7\x5E" => "\xE8\x94\xAA",
+ "\xE7\x5F" => "\xE8\x93\xB2",
+ "\xE7\x60" => "\xE8\x94\x95",
+ "\xE7\x61" => "\xE8\x93\xB7",
+ "\xE7\x62" => "\xE8\x93\xAB",
+ "\xE7\x63" => "\xE8\x93\xB3",
+ "\xE7\x64" => "\xE8\x93\xBC",
+ "\xE7\x65" => "\xE8\x94\x92",
+ "\xE7\x66" => "\xE8\x93\xAA",
+ "\xE7\x67" => "\xE8\x93\xA9",
+ "\xE7\x68" => "\xE8\x94\x96",
+ "\xE7\x69" => "\xE8\x93\xBE",
+ "\xE7\x6A" => "\xE8\x94\xA8",
+ "\xE7\x6B" => "\xE8\x94\x9D",
+ "\xE7\x6C" => "\xE8\x94\xAE",
+ "\xE7\x6D" => "\xE8\x94\x82",
+ "\xE7\x6E" => "\xE8\x93\xBD",
+ "\xE7\x6F" => "\xE8\x94\x9E",
+ "\xE7\x70" => "\xE8\x93\xB6",
+ "\xE7\x71" => "\xE8\x94\xB1",
+ "\xE7\x72" => "\xE8\x94\xA6",
+ "\xE7\x73" => "\xE8\x93\xA7",
+ "\xE7\x74" => "\xE8\x93\xA8",
+ "\xE7\x75" => "\xE8\x93\xB0",
+ "\xE7\x76" => "\xE8\x93\xAF",
+ "\xE7\x77" => "\xE8\x93\xB9",
+ "\xE7\x78" => "\xE8\x94\x98",
+ "\xE7\x79" => "\xE8\x94\xA0",
+ "\xE7\x7A" => "\xE8\x94\xB0",
+ "\xE7\x7B" => "\xE8\x94\x8B",
+ "\xE7\x7C" => "\xE8\x94\x99",
+ "\xE7\x7D" => "\xE8\x94\xAF",
+ "\xE7\x7E" => "\xE8\x99\xA2",
+ "\xE7\xA1" => "\xE8\x9D\x96",
+ "\xE7\xA2" => "\xE8\x9D\xA3",
+ "\xE7\xA3" => "\xE8\x9D\xA4",
+ "\xE7\xA4" => "\xE8\x9D\xB7",
+ "\xE7\xA5" => "\xE8\x9F\xA1",
+ "\xE7\xA6" => "\xE8\x9D\xB3",
+ "\xE7\xA7" => "\xE8\x9D\x98",
+ "\xE7\xA8" => "\xE8\x9D\x94",
+ "\xE7\xA9" => "\xE8\x9D\x9B",
+ "\xE7\xAA" => "\xE8\x9D\x92",
+ "\xE7\xAB" => "\xE8\x9D\xA1",
+ "\xE7\xAC" => "\xE8\x9D\x9A",
+ "\xE7\xAD" => "\xE8\x9D\x91",
+ "\xE7\xAE" => "\xE8\x9D\x9E",
+ "\xE7\xAF" => "\xE8\x9D\xAD",
+ "\xE7\xB0" => "\xE8\x9D\xAA",
+ "\xE7\xB1" => "\xE8\x9D\x90",
+ "\xE7\xB2" => "\xE8\x9D\x8E",
+ "\xE7\xB3" => "\xE8\x9D\x9F",
+ "\xE7\xB4" => "\xE8\x9D\x9D",
+ "\xE7\xB5" => "\xE8\x9D\xAF",
+ "\xE7\xB6" => "\xE8\x9D\xAC",
+ "\xE7\xB7" => "\xE8\x9D\xBA",
+ "\xE7\xB8" => "\xE8\x9D\xAE",
+ "\xE7\xB9" => "\xE8\x9D\x9C",
+ "\xE7\xBA" => "\xE8\x9D\xA5",
+ "\xE7\xBB" => "\xE8\x9D\x8F",
+ "\xE7\xBC" => "\xE8\x9D\xBB",
+ "\xE7\xBD" => "\xE8\x9D\xB5",
+ "\xE7\xBE" => "\xE8\x9D\xA2",
+ "\xE7\xBF" => "\xE8\x9D\xA7",
+ "\xE7\xC0" => "\xE8\x9D\xA9",
+ "\xE7\xC1" => "\xE8\xA1\x9A",
+ "\xE7\xC2" => "\xE8\xA4\x85",
+ "\xE7\xC3" => "\xE8\xA4\x8C",
+ "\xE7\xC4" => "\xE8\xA4\x94",
+ "\xE7\xC5" => "\xE8\xA4\x8B",
+ "\xE7\xC6" => "\xE8\xA4\x97",
+ "\xE7\xC7" => "\xE8\xA4\x98",
+ "\xE7\xC8" => "\xE8\xA4\x99",
+ "\xE7\xC9" => "\xE8\xA4\x86",
+ "\xE7\xCA" => "\xE8\xA4\x96",
+ "\xE7\xCB" => "\xE8\xA4\x91",
+ "\xE7\xCC" => "\xE8\xA4\x8E",
+ "\xE7\xCD" => "\xE8\xA4\x89",
+ "\xE7\xCE" => "\xE8\xA6\xA2",
+ "\xE7\xCF" => "\xE8\xA6\xA4",
+ "\xE7\xD0" => "\xE8\xA6\xA3",
+ "\xE7\xD1" => "\xE8\xA7\xAD",
+ "\xE7\xD2" => "\xE8\xA7\xB0",
+ "\xE7\xD3" => "\xE8\xA7\xAC",
+ "\xE7\xD4" => "\xE8\xAB\x8F",
+ "\xE7\xD5" => "\xE8\xAB\x86",
+ "\xE7\xD6" => "\xE8\xAA\xB8",
+ "\xE7\xD7" => "\xE8\xAB\x93",
+ "\xE7\xD8" => "\xE8\xAB\x91",
+ "\xE7\xD9" => "\xE8\xAB\x94",
+ "\xE7\xDA" => "\xE8\xAB\x95",
+ "\xE7\xDB" => "\xE8\xAA\xBB",
+ "\xE7\xDC" => "\xE8\xAB\x97",
+ "\xE7\xDD" => "\xE8\xAA\xBE",
+ "\xE7\xDE" => "\xE8\xAB\x80",
+ "\xE7\xDF" => "\xE8\xAB\x85",
+ "\xE7\xE0" => "\xE8\xAB\x98",
+ "\xE7\xE1" => "\xE8\xAB\x83",
+ "\xE7\xE2" => "\xE8\xAA\xBA",
+ "\xE7\xE3" => "\xE8\xAA\xBD",
+ "\xE7\xE4" => "\xE8\xAB\x99",
+ "\xE7\xE5" => "\xE8\xB0\xBE",
+ "\xE7\xE6" => "\xE8\xB1\x8D",
+ "\xE7\xE7" => "\xE8\xB2\x8F",
+ "\xE7\xE8" => "\xE8\xB3\xA5",
+ "\xE7\xE9" => "\xE8\xB3\x9F",
+ "\xE7\xEA" => "\xE8\xB3\x99",
+ "\xE7\xEB" => "\xE8\xB3\xA8",
+ "\xE7\xEC" => "\xE8\xB3\x9A",
+ "\xE7\xED" => "\xE8\xB3\x9D",
+ "\xE7\xEE" => "\xE8\xB3\xA7",
+ "\xE7\xEF" => "\xE8\xB6\xA0",
+ "\xE7\xF0" => "\xE8\xB6\x9C",
+ "\xE7\xF1" => "\xE8\xB6\xA1",
+ "\xE7\xF2" => "\xE8\xB6\x9B",
+ "\xE7\xF3" => "\xE8\xB8\xA0",
+ "\xE7\xF4" => "\xE8\xB8\xA3",
+ "\xE7\xF5" => "\xE8\xB8\xA5",
+ "\xE7\xF6" => "\xE8\xB8\xA4",
+ "\xE7\xF7" => "\xE8\xB8\xAE",
+ "\xE7\xF8" => "\xE8\xB8\x95",
+ "\xE7\xF9" => "\xE8\xB8\x9B",
+ "\xE7\xFA" => "\xE8\xB8\x96",
+ "\xE7\xFB" => "\xE8\xB8\x91",
+ "\xE7\xFC" => "\xE8\xB8\x99",
+ "\xE7\xFD" => "\xE8\xB8\xA6",
+ "\xE7\xFE" => "\xE8\xB8\xA7",
+ "\xE8\x40" => "\xE8\xB8\x94",
+ "\xE8\x41" => "\xE8\xB8\x92",
+ "\xE8\x42" => "\xE8\xB8\x98",
+ "\xE8\x43" => "\xE8\xB8\x93",
+ "\xE8\x44" => "\xE8\xB8\x9C",
+ "\xE8\x45" => "\xE8\xB8\x97",
+ "\xE8\x46" => "\xE8\xB8\x9A",
+ "\xE8\x47" => "\xE8\xBC\xAC",
+ "\xE8\x48" => "\xE8\xBC\xA4",
+ "\xE8\x49" => "\xE8\xBC\x98",
+ "\xE8\x4A" => "\xE8\xBC\x9A",
+ "\xE8\x4B" => "\xE8\xBC\xA0",
+ "\xE8\x4C" => "\xE8\xBC\xA3",
+ "\xE8\x4D" => "\xE8\xBC\x96",
+ "\xE8\x4E" => "\xE8\xBC\x97",
+ "\xE8\x4F" => "\xE9\x81\xB3",
+ "\xE8\x50" => "\xE9\x81\xB0",
+ "\xE8\x51" => "\xE9\x81\xAF",
+ "\xE8\x52" => "\xE9\x81\xA7",
+ "\xE8\x53" => "\xE9\x81\xAB",
+ "\xE8\x54" => "\xE9\x84\xAF",
+ "\xE8\x55" => "\xE9\x84\xAB",
+ "\xE8\x56" => "\xE9\x84\xA9",
+ "\xE8\x57" => "\xE9\x84\xAA",
+ "\xE8\x58" => "\xE9\x84\xB2",
+ "\xE8\x59" => "\xE9\x84\xA6",
+ "\xE8\x5A" => "\xE9\x84\xAE",
+ "\xE8\x5B" => "\xE9\x86\x85",
+ "\xE8\x5C" => "\xE9\x86\x86",
+ "\xE8\x5D" => "\xE9\x86\x8A",
+ "\xE8\x5E" => "\xE9\x86\x81",
+ "\xE8\x5F" => "\xE9\x86\x82",
+ "\xE8\x60" => "\xE9\x86\x84",
+ "\xE8\x61" => "\xE9\x86\x80",
+ "\xE8\x62" => "\xE9\x8B\x90",
+ "\xE8\x63" => "\xE9\x8B\x83",
+ "\xE8\x64" => "\xE9\x8B\x84",
+ "\xE8\x65" => "\xE9\x8B\x80",
+ "\xE8\x66" => "\xE9\x8B\x99",
+ "\xE8\x67" => "\xE9\x8A\xB6",
+ "\xE8\x68" => "\xE9\x8B\x8F",
+ "\xE8\x69" => "\xE9\x8B\xB1",
+ "\xE8\x6A" => "\xE9\x8B\x9F",
+ "\xE8\x6B" => "\xE9\x8B\x98",
+ "\xE8\x6C" => "\xE9\x8B\xA9",
+ "\xE8\x6D" => "\xE9\x8B\x97",
+ "\xE8\x6E" => "\xE9\x8B\x9D",
+ "\xE8\x6F" => "\xE9\x8B\x8C",
+ "\xE8\x70" => "\xE9\x8B\xAF",
+ "\xE8\x71" => "\xE9\x8B\x82",
+ "\xE8\x72" => "\xE9\x8B\xA8",
+ "\xE8\x73" => "\xE9\x8B\x8A",
+ "\xE8\x74" => "\xE9\x8B\x88",
+ "\xE8\x75" => "\xE9\x8B\x8E",
+ "\xE8\x76" => "\xE9\x8B\xA6",
+ "\xE8\x77" => "\xE9\x8B\x8D",
+ "\xE8\x78" => "\xE9\x8B\x95",
+ "\xE8\x79" => "\xE9\x8B\x89",
+ "\xE8\x7A" => "\xE9\x8B\xA0",
+ "\xE8\x7B" => "\xE9\x8B\x9E",
+ "\xE8\x7C" => "\xE9\x8B\xA7",
+ "\xE8\x7D" => "\xE9\x8B\x91",
+ "\xE8\x7E" => "\xE9\x8B\x93",
+ "\xE8\xA1" => "\xE9\x8A\xB5",
+ "\xE8\xA2" => "\xE9\x8B\xA1",
+ "\xE8\xA3" => "\xE9\x8B\x86",
+ "\xE8\xA4" => "\xE9\x8A\xB4",
+ "\xE8\xA5" => "\xE9\x95\xBC",
+ "\xE8\xA6" => "\xE9\x96\xAC",
+ "\xE8\xA7" => "\xE9\x96\xAB",
+ "\xE8\xA8" => "\xE9\x96\xAE",
+ "\xE8\xA9" => "\xE9\x96\xB0",
+ "\xE8\xAA" => "\xE9\x9A\xA4",
+ "\xE8\xAB" => "\xE9\x9A\xA2",
+ "\xE8\xAC" => "\xE9\x9B\x93",
+ "\xE8\xAD" => "\xE9\x9C\x85",
+ "\xE8\xAE" => "\xE9\x9C\x88",
+ "\xE8\xAF" => "\xE9\x9C\x82",
+ "\xE8\xB0" => "\xE9\x9D\x9A",
+ "\xE8\xB1" => "\xE9\x9E\x8A",
+ "\xE8\xB2" => "\xE9\x9E\x8E",
+ "\xE8\xB3" => "\xE9\x9E\x88",
+ "\xE8\xB4" => "\xE9\x9F\x90",
+ "\xE8\xB5" => "\xE9\x9F\x8F",
+ "\xE8\xB6" => "\xE9\xA0\x9E",
+ "\xE8\xB7" => "\xE9\xA0\x9D",
+ "\xE8\xB8" => "\xE9\xA0\xA6",
+ "\xE8\xB9" => "\xE9\xA0\xA9",
+ "\xE8\xBA" => "\xE9\xA0\xA8",
+ "\xE8\xBB" => "\xE9\xA0\xA0",
+ "\xE8\xBC" => "\xE9\xA0\x9B",
+ "\xE8\xBD" => "\xE9\xA0\xA7",
+ "\xE8\xBE" => "\xE9\xA2\xB2",
+ "\xE8\xBF" => "\xE9\xA4\x88",
+ "\xE8\xC0" => "\xE9\xA3\xBA",
+ "\xE8\xC1" => "\xE9\xA4\x91",
+ "\xE8\xC2" => "\xE9\xA4\x94",
+ "\xE8\xC3" => "\xE9\xA4\x96",
+ "\xE8\xC4" => "\xE9\xA4\x97",
+ "\xE8\xC5" => "\xE9\xA4\x95",
+ "\xE8\xC6" => "\xE9\xA7\x9C",
+ "\xE8\xC7" => "\xE9\xA7\x8D",
+ "\xE8\xC8" => "\xE9\xA7\x8F",
+ "\xE8\xC9" => "\xE9\xA7\x93",
+ "\xE8\xCA" => "\xE9\xA7\x94",
+ "\xE8\xCB" => "\xE9\xA7\x8E",
+ "\xE8\xCC" => "\xE9\xA7\x89",
+ "\xE8\xCD" => "\xE9\xA7\x96",
+ "\xE8\xCE" => "\xE9\xA7\x98",
+ "\xE8\xCF" => "\xE9\xA7\x8B",
+ "\xE8\xD0" => "\xE9\xA7\x97",
+ "\xE8\xD1" => "\xE9\xA7\x8C",
+ "\xE8\xD2" => "\xE9\xAA\xB3",
+ "\xE8\xD3" => "\xE9\xAB\xAC",
+ "\xE8\xD4" => "\xE9\xAB\xAB",
+ "\xE8\xD5" => "\xE9\xAB\xB3",
+ "\xE8\xD6" => "\xE9\xAB\xB2",
+ "\xE8\xD7" => "\xE9\xAB\xB1",
+ "\xE8\xD8" => "\xE9\xAD\x86",
+ "\xE8\xD9" => "\xE9\xAD\x83",
+ "\xE8\xDA" => "\xE9\xAD\xA7",
+ "\xE8\xDB" => "\xE9\xAD\xB4",
+ "\xE8\xDC" => "\xE9\xAD\xB1",
+ "\xE8\xDD" => "\xE9\xAD\xA6",
+ "\xE8\xDE" => "\xE9\xAD\xB6",
+ "\xE8\xDF" => "\xE9\xAD\xB5",
+ "\xE8\xE0" => "\xE9\xAD\xB0",
+ "\xE8\xE1" => "\xE9\xAD\xA8",
+ "\xE8\xE2" => "\xE9\xAD\xA4",
+ "\xE8\xE3" => "\xE9\xAD\xAC",
+ "\xE8\xE4" => "\xE9\xB3\xBC",
+ "\xE8\xE5" => "\xE9\xB3\xBA",
+ "\xE8\xE6" => "\xE9\xB3\xBD",
+ "\xE8\xE7" => "\xE9\xB3\xBF",
+ "\xE8\xE8" => "\xE9\xB3\xB7",
+ "\xE8\xE9" => "\xE9\xB4\x87",
+ "\xE8\xEA" => "\xE9\xB4\x80",
+ "\xE8\xEB" => "\xE9\xB3\xB9",
+ "\xE8\xEC" => "\xE9\xB3\xBB",
+ "\xE8\xED" => "\xE9\xB4\x88",
+ "\xE8\xEE" => "\xE9\xB4\x85",
+ "\xE8\xEF" => "\xE9\xB4\x84",
+ "\xE8\xF0" => "\xE9\xBA\x83",
+ "\xE8\xF1" => "\xE9\xBB\x93",
+ "\xE8\xF2" => "\xE9\xBC\x8F",
+ "\xE8\xF3" => "\xE9\xBC\x90",
+ "\xE8\xF4" => "\xE5\x84\x9C",
+ "\xE8\xF5" => "\xE5\x84\x93",
+ "\xE8\xF6" => "\xE5\x84\x97",
+ "\xE8\xF7" => "\xE5\x84\x9A",
+ "\xE8\xF8" => "\xE5\x84\x91",
+ "\xE8\xF9" => "\xE5\x87\x9E",
+ "\xE8\xFA" => "\xE5\x8C\xB4",
+ "\xE8\xFB" => "\xE5\x8F\xA1",
+ "\xE8\xFC" => "\xE5\x99\xB0",
+ "\xE8\xFD" => "\xE5\x99\xA0",
+ "\xE8\xFE" => "\xE5\x99\xAE",
+ "\xE9\x40" => "\xE5\x99\xB3",
+ "\xE9\x41" => "\xE5\x99\xA6",
+ "\xE9\x42" => "\xE5\x99\xA3",
+ "\xE9\x43" => "\xE5\x99\xAD",
+ "\xE9\x44" => "\xE5\x99\xB2",
+ "\xE9\x45" => "\xE5\x99\x9E",
+ "\xE9\x46" => "\xE5\x99\xB7",
+ "\xE9\x47" => "\xE5\x9C\x9C",
+ "\xE9\x48" => "\xE5\x9C\x9B",
+ "\xE9\x49" => "\xE5\xA3\x88",
+ "\xE9\x4A" => "\xE5\xA2\xBD",
+ "\xE9\x4B" => "\xE5\xA3\x89",
+ "\xE9\x4C" => "\xE5\xA2\xBF",
+ "\xE9\x4D" => "\xE5\xA2\xBA",
+ "\xE9\x4E" => "\xE5\xA3\x82",
+ "\xE9\x4F" => "\xE5\xA2\xBC",
+ "\xE9\x50" => "\xE5\xA3\x86",
+ "\xE9\x51" => "\xE5\xAC\x97",
+ "\xE9\x52" => "\xE5\xAC\x99",
+ "\xE9\x53" => "\xE5\xAC\x9B",
+ "\xE9\x54" => "\xE5\xAC\xA1",
+ "\xE9\x55" => "\xE5\xAC\x94",
+ "\xE9\x56" => "\xE5\xAC\x93",
+ "\xE9\x57" => "\xE5\xAC\x90",
+ "\xE9\x58" => "\xE5\xAC\x96",
+ "\xE9\x59" => "\xE5\xAC\xA8",
+ "\xE9\x5A" => "\xE5\xAC\x9A",
+ "\xE9\x5B" => "\xE5\xAC\xA0",
+ "\xE9\x5C" => "\xE5\xAC\x9E",
+ "\xE9\x5D" => "\xE5\xAF\xAF",
+ "\xE9\x5E" => "\xE5\xB6\xAC",
+ "\xE9\x5F" => "\xE5\xB6\xB1",
+ "\xE9\x60" => "\xE5\xB6\xA9",
+ "\xE9\x61" => "\xE5\xB6\xA7",
+ "\xE9\x62" => "\xE5\xB6\xB5",
+ "\xE9\x63" => "\xE5\xB6\xB0",
+ "\xE9\x64" => "\xE5\xB6\xAE",
+ "\xE9\x65" => "\xE5\xB6\xAA",
+ "\xE9\x66" => "\xE5\xB6\xA8",
+ "\xE9\x67" => "\xE5\xB6\xB2",
+ "\xE9\x68" => "\xE5\xB6\xAD",
+ "\xE9\x69" => "\xE5\xB6\xAF",
+ "\xE9\x6A" => "\xE5\xB6\xB4",
+ "\xE9\x6B" => "\xE5\xB9\xA7",
+ "\xE9\x6C" => "\xE5\xB9\xA8",
+ "\xE9\x6D" => "\xE5\xB9\xA6",
+ "\xE9\x6E" => "\xE5\xB9\xAF",
+ "\xE9\x6F" => "\xE5\xBB\xA9",
+ "\xE9\x70" => "\xE5\xBB\xA7",
+ "\xE9\x71" => "\xE5\xBB\xA6",
+ "\xE9\x72" => "\xE5\xBB\xA8",
+ "\xE9\x73" => "\xE5\xBB\xA5",
+ "\xE9\x74" => "\xE5\xBD\x8B",
+ "\xE9\x75" => "\xE5\xBE\xBC",
+ "\xE9\x76" => "\xE6\x86\x9D",
+ "\xE9\x77" => "\xE6\x86\xA8",
+ "\xE9\x78" => "\xE6\x86\x96",
+ "\xE9\x79" => "\xE6\x87\x85",
+ "\xE9\x7A" => "\xE6\x86\xB4",
+ "\xE9\x7B" => "\xE6\x87\x86",
+ "\xE9\x7C" => "\xE6\x87\x81",
+ "\xE9\x7D" => "\xE6\x87\x8C",
+ "\xE9\x7E" => "\xE6\x86\xBA",
+ "\xE9\xA1" => "\xE6\x86\xBF",
+ "\xE9\xA2" => "\xE6\x86\xB8",
+ "\xE9\xA3" => "\xE6\x86\x8C",
+ "\xE9\xA4" => "\xE6\x93\x97",
+ "\xE9\xA5" => "\xE6\x93\x96",
+ "\xE9\xA6" => "\xE6\x93\x90",
+ "\xE9\xA7" => "\xE6\x93\x8F",
+ "\xE9\xA8" => "\xE6\x93\x89",
+ "\xE9\xA9" => "\xE6\x92\xBD",
+ "\xE9\xAA" => "\xE6\x92\x89",
+ "\xE9\xAB" => "\xE6\x93\x83",
+ "\xE9\xAC" => "\xE6\x93\x9B",
+ "\xE9\xAD" => "\xE6\x93\xB3",
+ "\xE9\xAE" => "\xE6\x93\x99",
+ "\xE9\xAF" => "\xE6\x94\xB3",
+ "\xE9\xB0" => "\xE6\x95\xBF",
+ "\xE9\xB1" => "\xE6\x95\xBC",
+ "\xE9\xB2" => "\xE6\x96\xA2",
+ "\xE9\xB3" => "\xE6\x9B\x88",
+ "\xE9\xB4" => "\xE6\x9A\xBE",
+ "\xE9\xB5" => "\xE6\x9B\x80",
+ "\xE9\xB6" => "\xE6\x9B\x8A",
+ "\xE9\xB7" => "\xE6\x9B\x8B",
+ "\xE9\xB8" => "\xE6\x9B\x8F",
+ "\xE9\xB9" => "\xE6\x9A\xBD",
+ "\xE9\xBA" => "\xE6\x9A\xBB",
+ "\xE9\xBB" => "\xE6\x9A\xBA",
+ "\xE9\xBC" => "\xE6\x9B\x8C",
+ "\xE9\xBD" => "\xE6\x9C\xA3",
+ "\xE9\xBE" => "\xE6\xA8\xB4",
+ "\xE9\xBF" => "\xE6\xA9\xA6",
+ "\xE9\xC0" => "\xE6\xA9\x89",
+ "\xE9\xC1" => "\xE6\xA9\xA7",
+ "\xE9\xC2" => "\xE6\xA8\xB2",
+ "\xE9\xC3" => "\xE6\xA9\xA8",
+ "\xE9\xC4" => "\xE6\xA8\xBE",
+ "\xE9\xC5" => "\xE6\xA9\x9D",
+ "\xE9\xC6" => "\xE6\xA9\xAD",
+ "\xE9\xC7" => "\xE6\xA9\xB6",
+ "\xE9\xC8" => "\xE6\xA9\x9B",
+ "\xE9\xC9" => "\xE6\xA9\x91",
+ "\xE9\xCA" => "\xE6\xA8\xA8",
+ "\xE9\xCB" => "\xE6\xA9\x9A",
+ "\xE9\xCC" => "\xE6\xA8\xBB",
+ "\xE9\xCD" => "\xE6\xA8\xBF",
+ "\xE9\xCE" => "\xE6\xA9\x81",
+ "\xE9\xCF" => "\xE6\xA9\xAA",
+ "\xE9\xD0" => "\xE6\xA9\xA4",
+ "\xE9\xD1" => "\xE6\xA9\x90",
+ "\xE9\xD2" => "\xE6\xA9\x8F",
+ "\xE9\xD3" => "\xE6\xA9\x94",
+ "\xE9\xD4" => "\xE6\xA9\xAF",
+ "\xE9\xD5" => "\xE6\xA9\xA9",
+ "\xE9\xD6" => "\xE6\xA9\xA0",
+ "\xE9\xD7" => "\xE6\xA8\xBC",
+ "\xE9\xD8" => "\xE6\xA9\x9E",
+ "\xE9\xD9" => "\xE6\xA9\x96",
+ "\xE9\xDA" => "\xE6\xA9\x95",
+ "\xE9\xDB" => "\xE6\xA9\x8D",
+ "\xE9\xDC" => "\xE6\xA9\x8E",
+ "\xE9\xDD" => "\xE6\xA9\x86",
+ "\xE9\xDE" => "\xE6\xAD\x95",
+ "\xE9\xDF" => "\xE6\xAD\x94",
+ "\xE9\xE0" => "\xE6\xAD\x96",
+ "\xE9\xE1" => "\xE6\xAE\xA7",
+ "\xE9\xE2" => "\xE6\xAE\xAA",
+ "\xE9\xE3" => "\xE6\xAE\xAB",
+ "\xE9\xE4" => "\xE6\xAF\x88",
+ "\xE9\xE5" => "\xE6\xAF\x87",
+ "\xE9\xE6" => "\xE6\xB0\x84",
+ "\xE9\xE7" => "\xE6\xB0\x83",
+ "\xE9\xE8" => "\xE6\xB0\x86",
+ "\xE9\xE9" => "\xE6\xBE\xAD",
+ "\xE9\xEA" => "\xE6\xBF\x8B",
+ "\xE9\xEB" => "\xE6\xBE\xA3",
+ "\xE9\xEC" => "\xE6\xBF\x87",
+ "\xE9\xED" => "\xE6\xBE\xBC",
+ "\xE9\xEE" => "\xE6\xBF\x8E",
+ "\xE9\xEF" => "\xE6\xBF\x88",
+ "\xE9\xF0" => "\xE6\xBD\x9E",
+ "\xE9\xF1" => "\xE6\xBF\x84",
+ "\xE9\xF2" => "\xE6\xBE\xBD",
+ "\xE9\xF3" => "\xE6\xBE\x9E",
+ "\xE9\xF4" => "\xE6\xBF\x8A",
+ "\xE9\xF5" => "\xE6\xBE\xA8",
+ "\xE9\xF6" => "\xE7\x80\x84",
+ "\xE9\xF7" => "\xE6\xBE\xA5",
+ "\xE9\xF8" => "\xE6\xBE\xAE",
+ "\xE9\xF9" => "\xE6\xBE\xBA",
+ "\xE9\xFA" => "\xE6\xBE\xAC",
+ "\xE9\xFB" => "\xE6\xBE\xAA",
+ "\xE9\xFC" => "\xE6\xBF\x8F",
+ "\xE9\xFD" => "\xE6\xBE\xBF",
+ "\xE9\xFE" => "\xE6\xBE\xB8",
+ "\xEA\x40" => "\xE6\xBE\xA2",
+ "\xEA\x41" => "\xE6\xBF\x89",
+ "\xEA\x42" => "\xE6\xBE\xAB",
+ "\xEA\x43" => "\xE6\xBF\x8D",
+ "\xEA\x44" => "\xE6\xBE\xAF",
+ "\xEA\x45" => "\xE6\xBE\xB2",
+ "\xEA\x46" => "\xE6\xBE\xB0",
+ "\xEA\x47" => "\xE7\x87\x85",
+ "\xEA\x48" => "\xE7\x87\x82",
+ "\xEA\x49" => "\xE7\x86\xBF",
+ "\xEA\x4A" => "\xE7\x86\xB8",
+ "\xEA\x4B" => "\xE7\x87\x96",
+ "\xEA\x4C" => "\xE7\x87\x80",
+ "\xEA\x4D" => "\xE7\x87\x81",
+ "\xEA\x4E" => "\xE7\x87\x8B",
+ "\xEA\x4F" => "\xE7\x87\x94",
+ "\xEA\x50" => "\xE7\x87\x8A",
+ "\xEA\x51" => "\xE7\x87\x87",
+ "\xEA\x52" => "\xE7\x87\x8F",
+ "\xEA\x53" => "\xE7\x86\xBD",
+ "\xEA\x54" => "\xE7\x87\x98",
+ "\xEA\x55" => "\xE7\x86\xBC",
+ "\xEA\x56" => "\xE7\x87\x86",
+ "\xEA\x57" => "\xE7\x87\x9A",
+ "\xEA\x58" => "\xE7\x87\x9B",
+ "\xEA\x59" => "\xE7\x8A\x9D",
+ "\xEA\x5A" => "\xE7\x8A\x9E",
+ "\xEA\x5B" => "\xE7\x8D\xA9",
+ "\xEA\x5C" => "\xE7\x8D\xA6",
+ "\xEA\x5D" => "\xE7\x8D\xA7",
+ "\xEA\x5E" => "\xE7\x8D\xAC",
+ "\xEA\x5F" => "\xE7\x8D\xA5",
+ "\xEA\x60" => "\xE7\x8D\xAB",
+ "\xEA\x61" => "\xE7\x8D\xAA",
+ "\xEA\x62" => "\xE7\x91\xBF",
+ "\xEA\x63" => "\xE7\x92\x9A",
+ "\xEA\x64" => "\xE7\x92\xA0",
+ "\xEA\x65" => "\xE7\x92\x94",
+ "\xEA\x66" => "\xE7\x92\x92",
+ "\xEA\x67" => "\xE7\x92\x95",
+ "\xEA\x68" => "\xE7\x92\xA1",
+ "\xEA\x69" => "\xE7\x94\x8B",
+ "\xEA\x6A" => "\xE7\x96\x80",
+ "\xEA\x6B" => "\xE7\x98\xAF",
+ "\xEA\x6C" => "\xE7\x98\xAD",
+ "\xEA\x6D" => "\xE7\x98\xB1",
+ "\xEA\x6E" => "\xE7\x98\xBD",
+ "\xEA\x6F" => "\xE7\x98\xB3",
+ "\xEA\x70" => "\xE7\x98\xBC",
+ "\xEA\x71" => "\xE7\x98\xB5",
+ "\xEA\x72" => "\xE7\x98\xB2",
+ "\xEA\x73" => "\xE7\x98\xB0",
+ "\xEA\x74" => "\xE7\x9A\xBB",
+ "\xEA\x75" => "\xE7\x9B\xA6",
+ "\xEA\x76" => "\xE7\x9E\x9A",
+ "\xEA\x77" => "\xE7\x9E\x9D",
+ "\xEA\x78" => "\xE7\x9E\xA1",
+ "\xEA\x79" => "\xE7\x9E\x9C",
+ "\xEA\x7A" => "\xE7\x9E\x9B",
+ "\xEA\x7B" => "\xE7\x9E\xA2",
+ "\xEA\x7C" => "\xE7\x9E\xA3",
+ "\xEA\x7D" => "\xE7\x9E\x95",
+ "\xEA\x7E" => "\xE7\x9E\x99",
+ "\xEA\xA1" => "\xE7\x9E\x97",
+ "\xEA\xA2" => "\xE7\xA3\x9D",
+ "\xEA\xA3" => "\xE7\xA3\xA9",
+ "\xEA\xA4" => "\xE7\xA3\xA5",
+ "\xEA\xA5" => "\xE7\xA3\xAA",
+ "\xEA\xA6" => "\xE7\xA3\x9E",
+ "\xEA\xA7" => "\xE7\xA3\xA3",
+ "\xEA\xA8" => "\xE7\xA3\x9B",
+ "\xEA\xA9" => "\xE7\xA3\xA1",
+ "\xEA\xAA" => "\xE7\xA3\xA2",
+ "\xEA\xAB" => "\xE7\xA3\xAD",
+ "\xEA\xAC" => "\xE7\xA3\x9F",
+ "\xEA\xAD" => "\xE7\xA3\xA0",
+ "\xEA\xAE" => "\xE7\xA6\xA4",
+ "\xEA\xAF" => "\xE7\xA9\x84",
+ "\xEA\xB0" => "\xE7\xA9\x88",
+ "\xEA\xB1" => "\xE7\xA9\x87",
+ "\xEA\xB2" => "\xE7\xAA\xB6",
+ "\xEA\xB3" => "\xE7\xAA\xB8",
+ "\xEA\xB4" => "\xE7\xAA\xB5",
+ "\xEA\xB5" => "\xE7\xAA\xB1",
+ "\xEA\xB6" => "\xE7\xAA\xB7",
+ "\xEA\xB7" => "\xE7\xAF\x9E",
+ "\xEA\xB8" => "\xE7\xAF\xA3",
+ "\xEA\xB9" => "\xE7\xAF\xA7",
+ "\xEA\xBA" => "\xE7\xAF\x9D",
+ "\xEA\xBB" => "\xE7\xAF\x95",
+ "\xEA\xBC" => "\xE7\xAF\xA5",
+ "\xEA\xBD" => "\xE7\xAF\x9A",
+ "\xEA\xBE" => "\xE7\xAF\xA8",
+ "\xEA\xBF" => "\xE7\xAF\xB9",
+ "\xEA\xC0" => "\xE7\xAF\x94",
+ "\xEA\xC1" => "\xE7\xAF\xAA",
+ "\xEA\xC2" => "\xE7\xAF\xA2",
+ "\xEA\xC3" => "\xE7\xAF\x9C",
+ "\xEA\xC4" => "\xE7\xAF\xAB",
+ "\xEA\xC5" => "\xE7\xAF\x98",
+ "\xEA\xC6" => "\xE7\xAF\x9F",
+ "\xEA\xC7" => "\xE7\xB3\x92",
+ "\xEA\xC8" => "\xE7\xB3\x94",
+ "\xEA\xC9" => "\xE7\xB3\x97",
+ "\xEA\xCA" => "\xE7\xB3\x90",
+ "\xEA\xCB" => "\xE7\xB3\x91",
+ "\xEA\xCC" => "\xE7\xB8\x92",
+ "\xEA\xCD" => "\xE7\xB8\xA1",
+ "\xEA\xCE" => "\xE7\xB8\x97",
+ "\xEA\xCF" => "\xE7\xB8\x8C",
+ "\xEA\xD0" => "\xE7\xB8\x9F",
+ "\xEA\xD1" => "\xE7\xB8\xA0",
+ "\xEA\xD2" => "\xE7\xB8\x93",
+ "\xEA\xD3" => "\xE7\xB8\x8E",
+ "\xEA\xD4" => "\xE7\xB8\x9C",
+ "\xEA\xD5" => "\xE7\xB8\x95",
+ "\xEA\xD6" => "\xE7\xB8\x9A",
+ "\xEA\xD7" => "\xE7\xB8\xA2",
+ "\xEA\xD8" => "\xE7\xB8\x8B",
+ "\xEA\xD9" => "\xE7\xB8\x8F",
+ "\xEA\xDA" => "\xE7\xB8\x96",
+ "\xEA\xDB" => "\xE7\xB8\x8D",
+ "\xEA\xDC" => "\xE7\xB8\x94",
+ "\xEA\xDD" => "\xE7\xB8\xA5",
+ "\xEA\xDE" => "\xE7\xB8\xA4",
+ "\xEA\xDF" => "\xE7\xBD\x83",
+ "\xEA\xE0" => "\xE7\xBD\xBB",
+ "\xEA\xE1" => "\xE7\xBD\xBC",
+ "\xEA\xE2" => "\xE7\xBD\xBA",
+ "\xEA\xE3" => "\xE7\xBE\xB1",
+ "\xEA\xE4" => "\xE7\xBF\xAF",
+ "\xEA\xE5" => "\xE8\x80\xAA",
+ "\xEA\xE6" => "\xE8\x80\xA9",
+ "\xEA\xE7" => "\xE8\x81\xAC",
+ "\xEA\xE8" => "\xE8\x86\xB1",
+ "\xEA\xE9" => "\xE8\x86\xA6",
+ "\xEA\xEA" => "\xE8\x86\xAE",
+ "\xEA\xEB" => "\xE8\x86\xB9",
+ "\xEA\xEC" => "\xE8\x86\xB5",
+ "\xEA\xED" => "\xE8\x86\xAB",
+ "\xEA\xEE" => "\xE8\x86\xB0",
+ "\xEA\xEF" => "\xE8\x86\xAC",
+ "\xEA\xF0" => "\xE8\x86\xB4",
+ "\xEA\xF1" => "\xE8\x86\xB2",
+ "\xEA\xF2" => "\xE8\x86\xB7",
+ "\xEA\xF3" => "\xE8\x86\xA7",
+ "\xEA\xF4" => "\xE8\x87\xB2",
+ "\xEA\xF5" => "\xE8\x89\x95",
+ "\xEA\xF6" => "\xE8\x89\x96",
+ "\xEA\xF7" => "\xE8\x89\x97",
+ "\xEA\xF8" => "\xE8\x95\x96",
+ "\xEA\xF9" => "\xE8\x95\x85",
+ "\xEA\xFA" => "\xE8\x95\xAB",
+ "\xEA\xFB" => "\xE8\x95\x8D",
+ "\xEA\xFC" => "\xE8\x95\x93",
+ "\xEA\xFD" => "\xE8\x95\xA1",
+ "\xEA\xFE" => "\xE8\x95\x98",
+ "\xEB\x40" => "\xE8\x95\x80",
+ "\xEB\x41" => "\xE8\x95\x86",
+ "\xEB\x42" => "\xE8\x95\xA4",
+ "\xEB\x43" => "\xE8\x95\x81",
+ "\xEB\x44" => "\xE8\x95\xA2",
+ "\xEB\x45" => "\xE8\x95\x84",
+ "\xEB\x46" => "\xE8\x95\x91",
+ "\xEB\x47" => "\xE8\x95\x87",
+ "\xEB\x48" => "\xE8\x95\xA3",
+ "\xEB\x49" => "\xE8\x94\xBE",
+ "\xEB\x4A" => "\xE8\x95\x9B",
+ "\xEB\x4B" => "\xE8\x95\xB1",
+ "\xEB\x4C" => "\xE8\x95\x8E",
+ "\xEB\x4D" => "\xE8\x95\xAE",
+ "\xEB\x4E" => "\xE8\x95\xB5",
+ "\xEB\x4F" => "\xE8\x95\x95",
+ "\xEB\x50" => "\xE8\x95\xA7",
+ "\xEB\x51" => "\xE8\x95\xA0",
+ "\xEB\x52" => "\xE8\x96\x8C",
+ "\xEB\x53" => "\xE8\x95\xA6",
+ "\xEB\x54" => "\xE8\x95\x9D",
+ "\xEB\x55" => "\xE8\x95\x94",
+ "\xEB\x56" => "\xE8\x95\xA5",
+ "\xEB\x57" => "\xE8\x95\xAC",
+ "\xEB\x58" => "\xE8\x99\xA3",
+ "\xEB\x59" => "\xE8\x99\xA5",
+ "\xEB\x5A" => "\xE8\x99\xA4",
+ "\xEB\x5B" => "\xE8\x9E\x9B",
+ "\xEB\x5C" => "\xE8\x9E\x8F",
+ "\xEB\x5D" => "\xE8\x9E\x97",
+ "\xEB\x5E" => "\xE8\x9E\x93",
+ "\xEB\x5F" => "\xE8\x9E\x92",
+ "\xEB\x60" => "\xE8\x9E\x88",
+ "\xEB\x61" => "\xE8\x9E\x81",
+ "\xEB\x62" => "\xE8\x9E\x96",
+ "\xEB\x63" => "\xE8\x9E\x98",
+ "\xEB\x64" => "\xE8\x9D\xB9",
+ "\xEB\x65" => "\xE8\x9E\x87",
+ "\xEB\x66" => "\xE8\x9E\xA3",
+ "\xEB\x67" => "\xE8\x9E\x85",
+ "\xEB\x68" => "\xE8\x9E\x90",
+ "\xEB\x69" => "\xE8\x9E\x91",
+ "\xEB\x6A" => "\xE8\x9E\x9D",
+ "\xEB\x6B" => "\xE8\x9E\x84",
+ "\xEB\x6C" => "\xE8\x9E\x94",
+ "\xEB\x6D" => "\xE8\x9E\x9C",
+ "\xEB\x6E" => "\xE8\x9E\x9A",
+ "\xEB\x6F" => "\xE8\x9E\x89",
+ "\xEB\x70" => "\xE8\xA4\x9E",
+ "\xEB\x71" => "\xE8\xA4\xA6",
+ "\xEB\x72" => "\xE8\xA4\xB0",
+ "\xEB\x73" => "\xE8\xA4\xAD",
+ "\xEB\x74" => "\xE8\xA4\xAE",
+ "\xEB\x75" => "\xE8\xA4\xA7",
+ "\xEB\x76" => "\xE8\xA4\xB1",
+ "\xEB\x77" => "\xE8\xA4\xA2",
+ "\xEB\x78" => "\xE8\xA4\xA9",
+ "\xEB\x79" => "\xE8\xA4\xA3",
+ "\xEB\x7A" => "\xE8\xA4\xAF",
+ "\xEB\x7B" => "\xE8\xA4\xAC",
+ "\xEB\x7C" => "\xE8\xA4\x9F",
+ "\xEB\x7D" => "\xE8\xA7\xB1",
+ "\xEB\x7E" => "\xE8\xAB\xA0",
+ "\xEB\xA1" => "\xE8\xAB\xA2",
+ "\xEB\xA2" => "\xE8\xAB\xB2",
+ "\xEB\xA3" => "\xE8\xAB\xB4",
+ "\xEB\xA4" => "\xE8\xAB\xB5",
+ "\xEB\xA5" => "\xE8\xAB\x9D",
+ "\xEB\xA6" => "\xE8\xAC\x94",
+ "\xEB\xA7" => "\xE8\xAB\xA4",
+ "\xEB\xA8" => "\xE8\xAB\x9F",
+ "\xEB\xA9" => "\xE8\xAB\xB0",
+ "\xEB\xAA" => "\xE8\xAB\x88",
+ "\xEB\xAB" => "\xE8\xAB\x9E",
+ "\xEB\xAC" => "\xE8\xAB\xA1",
+ "\xEB\xAD" => "\xE8\xAB\xA8",
+ "\xEB\xAE" => "\xE8\xAB\xBF",
+ "\xEB\xAF" => "\xE8\xAB\xAF",
+ "\xEB\xB0" => "\xE8\xAB\xBB",
+ "\xEB\xB1" => "\xE8\xB2\x91",
+ "\xEB\xB2" => "\xE8\xB2\x92",
+ "\xEB\xB3" => "\xE8\xB2\x90",
+ "\xEB\xB4" => "\xE8\xB3\xB5",
+ "\xEB\xB5" => "\xE8\xB3\xAE",
+ "\xEB\xB6" => "\xE8\xB3\xB1",
+ "\xEB\xB7" => "\xE8\xB3\xB0",
+ "\xEB\xB8" => "\xE8\xB3\xB3",
+ "\xEB\xB9" => "\xE8\xB5\xAC",
+ "\xEB\xBA" => "\xE8\xB5\xAE",
+ "\xEB\xBB" => "\xE8\xB6\xA5",
+ "\xEB\xBC" => "\xE8\xB6\xA7",
+ "\xEB\xBD" => "\xE8\xB8\xB3",
+ "\xEB\xBE" => "\xE8\xB8\xBE",
+ "\xEB\xBF" => "\xE8\xB8\xB8",
+ "\xEB\xC0" => "\xE8\xB9\x80",
+ "\xEB\xC1" => "\xE8\xB9\x85",
+ "\xEB\xC2" => "\xE8\xB8\xB6",
+ "\xEB\xC3" => "\xE8\xB8\xBC",
+ "\xEB\xC4" => "\xE8\xB8\xBD",
+ "\xEB\xC5" => "\xE8\xB9\x81",
+ "\xEB\xC6" => "\xE8\xB8\xB0",
+ "\xEB\xC7" => "\xE8\xB8\xBF",
+ "\xEB\xC8" => "\xE8\xBA\xBD",
+ "\xEB\xC9" => "\xE8\xBC\xB6",
+ "\xEB\xCA" => "\xE8\xBC\xAE",
+ "\xEB\xCB" => "\xE8\xBC\xB5",
+ "\xEB\xCC" => "\xE8\xBC\xB2",
+ "\xEB\xCD" => "\xE8\xBC\xB9",
+ "\xEB\xCE" => "\xE8\xBC\xB7",
+ "\xEB\xCF" => "\xE8\xBC\xB4",
+ "\xEB\xD0" => "\xE9\x81\xB6",
+ "\xEB\xD1" => "\xE9\x81\xB9",
+ "\xEB\xD2" => "\xE9\x81\xBB",
+ "\xEB\xD3" => "\xE9\x82\x86",
+ "\xEB\xD4" => "\xE9\x83\xBA",
+ "\xEB\xD5" => "\xE9\x84\xB3",
+ "\xEB\xD6" => "\xE9\x84\xB5",
+ "\xEB\xD7" => "\xE9\x84\xB6",
+ "\xEB\xD8" => "\xE9\x86\x93",
+ "\xEB\xD9" => "\xE9\x86\x90",
+ "\xEB\xDA" => "\xE9\x86\x91",
+ "\xEB\xDB" => "\xE9\x86\x8D",
+ "\xEB\xDC" => "\xE9\x86\x8F",
+ "\xEB\xDD" => "\xE9\x8C\xA7",
+ "\xEB\xDE" => "\xE9\x8C\x9E",
+ "\xEB\xDF" => "\xE9\x8C\x88",
+ "\xEB\xE0" => "\xE9\x8C\x9F",
+ "\xEB\xE1" => "\xE9\x8C\x86",
+ "\xEB\xE2" => "\xE9\x8C\x8F",
+ "\xEB\xE3" => "\xE9\x8D\xBA",
+ "\xEB\xE4" => "\xE9\x8C\xB8",
+ "\xEB\xE5" => "\xE9\x8C\xBC",
+ "\xEB\xE6" => "\xE9\x8C\x9B",
+ "\xEB\xE7" => "\xE9\x8C\xA3",
+ "\xEB\xE8" => "\xE9\x8C\x92",
+ "\xEB\xE9" => "\xE9\x8C\x81",
+ "\xEB\xEA" => "\xE9\x8D\x86",
+ "\xEB\xEB" => "\xE9\x8C\xAD",
+ "\xEB\xEC" => "\xE9\x8C\x8E",
+ "\xEB\xED" => "\xE9\x8C\x8D",
+ "\xEB\xEE" => "\xE9\x8B\x8B",
+ "\xEB\xEF" => "\xE9\x8C\x9D",
+ "\xEB\xF0" => "\xE9\x8B\xBA",
+ "\xEB\xF1" => "\xE9\x8C\xA5",
+ "\xEB\xF2" => "\xE9\x8C\x93",
+ "\xEB\xF3" => "\xE9\x8B\xB9",
+ "\xEB\xF4" => "\xE9\x8B\xB7",
+ "\xEB\xF5" => "\xE9\x8C\xB4",
+ "\xEB\xF6" => "\xE9\x8C\x82",
+ "\xEB\xF7" => "\xE9\x8C\xA4",
+ "\xEB\xF8" => "\xE9\x8B\xBF",
+ "\xEB\xF9" => "\xE9\x8C\xA9",
+ "\xEB\xFA" => "\xE9\x8C\xB9",
+ "\xEB\xFB" => "\xE9\x8C\xB5",
+ "\xEB\xFC" => "\xE9\x8C\xAA",
+ "\xEB\xFD" => "\xE9\x8C\x94",
+ "\xEB\xFE" => "\xE9\x8C\x8C",
+ "\xEC\x40" => "\xE9\x8C\x8B",
+ "\xEC\x41" => "\xE9\x8B\xBE",
+ "\xEC\x42" => "\xE9\x8C\x89",
+ "\xEC\x43" => "\xE9\x8C\x80",
+ "\xEC\x44" => "\xE9\x8B\xBB",
+ "\xEC\x45" => "\xE9\x8C\x96",
+ "\xEC\x46" => "\xE9\x96\xBC",
+ "\xEC\x47" => "\xE9\x97\x8D",
+ "\xEC\x48" => "\xE9\x96\xBE",
+ "\xEC\x49" => "\xE9\x96\xB9",
+ "\xEC\x4A" => "\xE9\x96\xBA",
+ "\xEC\x4B" => "\xE9\x96\xB6",
+ "\xEC\x4C" => "\xE9\x96\xBF",
+ "\xEC\x4D" => "\xE9\x96\xB5",
+ "\xEC\x4E" => "\xE9\x96\xBD",
+ "\xEC\x4F" => "\xE9\x9A\xA9",
+ "\xEC\x50" => "\xE9\x9B\x94",
+ "\xEC\x51" => "\xE9\x9C\x8B",
+ "\xEC\x52" => "\xE9\x9C\x92",
+ "\xEC\x53" => "\xE9\x9C\x90",
+ "\xEC\x54" => "\xE9\x9E\x99",
+ "\xEC\x55" => "\xE9\x9E\x97",
+ "\xEC\x56" => "\xE9\x9E\x94",
+ "\xEC\x57" => "\xE9\x9F\xB0",
+ "\xEC\x58" => "\xE9\x9F\xB8",
+ "\xEC\x59" => "\xE9\xA0\xB5",
+ "\xEC\x5A" => "\xE9\xA0\xAF",
+ "\xEC\x5B" => "\xE9\xA0\xB2",
+ "\xEC\x5C" => "\xE9\xA4\xA4",
+ "\xEC\x5D" => "\xE9\xA4\x9F",
+ "\xEC\x5E" => "\xE9\xA4\xA7",
+ "\xEC\x5F" => "\xE9\xA4\xA9",
+ "\xEC\x60" => "\xE9\xA6\x9E",
+ "\xEC\x61" => "\xE9\xA7\xAE",
+ "\xEC\x62" => "\xE9\xA7\xAC",
+ "\xEC\x63" => "\xE9\xA7\xA5",
+ "\xEC\x64" => "\xE9\xA7\xA4",
+ "\xEC\x65" => "\xE9\xA7\xB0",
+ "\xEC\x66" => "\xE9\xA7\xA3",
+ "\xEC\x67" => "\xE9\xA7\xAA",
+ "\xEC\x68" => "\xE9\xA7\xA9",
+ "\xEC\x69" => "\xE9\xA7\xA7",
+ "\xEC\x6A" => "\xE9\xAA\xB9",
+ "\xEC\x6B" => "\xE9\xAA\xBF",
+ "\xEC\x6C" => "\xE9\xAA\xB4",
+ "\xEC\x6D" => "\xE9\xAA\xBB",
+ "\xEC\x6E" => "\xE9\xAB\xB6",
+ "\xEC\x6F" => "\xE9\xAB\xBA",
+ "\xEC\x70" => "\xE9\xAB\xB9",
+ "\xEC\x71" => "\xE9\xAB\xB7",
+ "\xEC\x72" => "\xE9\xAC\xB3",
+ "\xEC\x73" => "\xE9\xAE\x80",
+ "\xEC\x74" => "\xE9\xAE\x85",
+ "\xEC\x75" => "\xE9\xAE\x87",
+ "\xEC\x76" => "\xE9\xAD\xBC",
+ "\xEC\x77" => "\xE9\xAD\xBE",
+ "\xEC\x78" => "\xE9\xAD\xBB",
+ "\xEC\x79" => "\xE9\xAE\x82",
+ "\xEC\x7A" => "\xE9\xAE\x93",
+ "\xEC\x7B" => "\xE9\xAE\x92",
+ "\xEC\x7C" => "\xE9\xAE\x90",
+ "\xEC\x7D" => "\xE9\xAD\xBA",
+ "\xEC\x7E" => "\xE9\xAE\x95",
+ "\xEC\xA1" => "\xE9\xAD\xBD",
+ "\xEC\xA2" => "\xE9\xAE\x88",
+ "\xEC\xA3" => "\xE9\xB4\xA5",
+ "\xEC\xA4" => "\xE9\xB4\x97",
+ "\xEC\xA5" => "\xE9\xB4\xA0",
+ "\xEC\xA6" => "\xE9\xB4\x9E",
+ "\xEC\xA7" => "\xE9\xB4\x94",
+ "\xEC\xA8" => "\xE9\xB4\xA9",
+ "\xEC\xA9" => "\xE9\xB4\x9D",
+ "\xEC\xAA" => "\xE9\xB4\x98",
+ "\xEC\xAB" => "\xE9\xB4\xA2",
+ "\xEC\xAC" => "\xE9\xB4\x90",
+ "\xEC\xAD" => "\xE9\xB4\x99",
+ "\xEC\xAE" => "\xE9\xB4\x9F",
+ "\xEC\xAF" => "\xE9\xBA\x88",
+ "\xEC\xB0" => "\xE9\xBA\x86",
+ "\xEC\xB1" => "\xE9\xBA\x87",
+ "\xEC\xB2" => "\xE9\xBA\xAE",
+ "\xEC\xB3" => "\xE9\xBA\xAD",
+ "\xEC\xB4" => "\xE9\xBB\x95",
+ "\xEC\xB5" => "\xE9\xBB\x96",
+ "\xEC\xB6" => "\xE9\xBB\xBA",
+ "\xEC\xB7" => "\xE9\xBC\x92",
+ "\xEC\xB8" => "\xE9\xBC\xBD",
+ "\xEC\xB9" => "\xE5\x84\xA6",
+ "\xEC\xBA" => "\xE5\x84\xA5",
+ "\xEC\xBB" => "\xE5\x84\xA2",
+ "\xEC\xBC" => "\xE5\x84\xA4",
+ "\xEC\xBD" => "\xE5\x84\xA0",
+ "\xEC\xBE" => "\xE5\x84\xA9",
+ "\xEC\xBF" => "\xE5\x8B\xB4",
+ "\xEC\xC0" => "\xE5\x9A\x93",
+ "\xEC\xC1" => "\xE5\x9A\x8C",
+ "\xEC\xC2" => "\xE5\x9A\x8D",
+ "\xEC\xC3" => "\xE5\x9A\x86",
+ "\xEC\xC4" => "\xE5\x9A\x84",
+ "\xEC\xC5" => "\xE5\x9A\x83",
+ "\xEC\xC6" => "\xE5\x99\xBE",
+ "\xEC\xC7" => "\xE5\x9A\x82",
+ "\xEC\xC8" => "\xE5\x99\xBF",
+ "\xEC\xC9" => "\xE5\x9A\x81",
+ "\xEC\xCA" => "\xE5\xA3\x96",
+ "\xEC\xCB" => "\xE5\xA3\x94",
+ "\xEC\xCC" => "\xE5\xA3\x8F",
+ "\xEC\xCD" => "\xE5\xA3\x92",
+ "\xEC\xCE" => "\xE5\xAC\xAD",
+ "\xEC\xCF" => "\xE5\xAC\xA5",
+ "\xEC\xD0" => "\xE5\xAC\xB2",
+ "\xEC\xD1" => "\xE5\xAC\xA3",
+ "\xEC\xD2" => "\xE5\xAC\xAC",
+ "\xEC\xD3" => "\xE5\xAC\xA7",
+ "\xEC\xD4" => "\xE5\xAC\xA6",
+ "\xEC\xD5" => "\xE5\xAC\xAF",
+ "\xEC\xD6" => "\xE5\xAC\xAE",
+ "\xEC\xD7" => "\xE5\xAD\xBB",
+ "\xEC\xD8" => "\xE5\xAF\xB1",
+ "\xEC\xD9" => "\xE5\xAF\xB2",
+ "\xEC\xDA" => "\xE5\xB6\xB7",
+ "\xEC\xDB" => "\xE5\xB9\xAC",
+ "\xEC\xDC" => "\xE5\xB9\xAA",
+ "\xEC\xDD" => "\xE5\xBE\xBE",
+ "\xEC\xDE" => "\xE5\xBE\xBB",
+ "\xEC\xDF" => "\xE6\x87\x83",
+ "\xEC\xE0" => "\xE6\x86\xB5",
+ "\xEC\xE1" => "\xE6\x86\xBC",
+ "\xEC\xE2" => "\xE6\x87\xA7",
+ "\xEC\xE3" => "\xE6\x87\xA0",
+ "\xEC\xE4" => "\xE6\x87\xA5",
+ "\xEC\xE5" => "\xE6\x87\xA4",
+ "\xEC\xE6" => "\xE6\x87\xA8",
+ "\xEC\xE7" => "\xE6\x87\x9E",
+ "\xEC\xE8" => "\xE6\x93\xAF",
+ "\xEC\xE9" => "\xE6\x93\xA9",
+ "\xEC\xEA" => "\xE6\x93\xA3",
+ "\xEC\xEB" => "\xE6\x93\xAB",
+ "\xEC\xEC" => "\xE6\x93\xA4",
+ "\xEC\xED" => "\xE6\x93\xA8",
+ "\xEC\xEE" => "\xE6\x96\x81",
+ "\xEC\xEF" => "\xE6\x96\x80",
+ "\xEC\xF0" => "\xE6\x96\xB6",
+ "\xEC\xF1" => "\xE6\x97\x9A",
+ "\xEC\xF2" => "\xE6\x9B\x92",
+ "\xEC\xF3" => "\xE6\xAA\x8D",
+ "\xEC\xF4" => "\xE6\xAA\x96",
+ "\xEC\xF5" => "\xE6\xAA\x81",
+ "\xEC\xF6" => "\xE6\xAA\xA5",
+ "\xEC\xF7" => "\xE6\xAA\x89",
+ "\xEC\xF8" => "\xE6\xAA\x9F",
+ "\xEC\xF9" => "\xE6\xAA\x9B",
+ "\xEC\xFA" => "\xE6\xAA\xA1",
+ "\xEC\xFB" => "\xE6\xAA\x9E",
+ "\xEC\xFC" => "\xE6\xAA\x87",
+ "\xEC\xFD" => "\xE6\xAA\x93",
+ "\xEC\xFE" => "\xE6\xAA\x8E",
+ "\xED\x40" => "\xE6\xAA\x95",
+ "\xED\x41" => "\xE6\xAA\x83",
+ "\xED\x42" => "\xE6\xAA\xA8",
+ "\xED\x43" => "\xE6\xAA\xA4",
+ "\xED\x44" => "\xE6\xAA\x91",
+ "\xED\x45" => "\xE6\xA9\xBF",
+ "\xED\x46" => "\xE6\xAA\xA6",
+ "\xED\x47" => "\xE6\xAA\x9A",
+ "\xED\x48" => "\xE6\xAA\x85",
+ "\xED\x49" => "\xE6\xAA\x8C",
+ "\xED\x4A" => "\xE6\xAA\x92",
+ "\xED\x4B" => "\xE6\xAD\x9B",
+ "\xED\x4C" => "\xE6\xAE\xAD",
+ "\xED\x4D" => "\xE6\xB0\x89",
+ "\xED\x4E" => "\xE6\xBF\x8C",
+ "\xED\x4F" => "\xE6\xBE\xA9",
+ "\xED\x50" => "\xE6\xBF\xB4",
+ "\xED\x51" => "\xE6\xBF\x94",
+ "\xED\x52" => "\xE6\xBF\xA3",
+ "\xED\x53" => "\xE6\xBF\x9C",
+ "\xED\x54" => "\xE6\xBF\xAD",
+ "\xED\x55" => "\xE6\xBF\xA7",
+ "\xED\x56" => "\xE6\xBF\xA6",
+ "\xED\x57" => "\xE6\xBF\x9E",
+ "\xED\x58" => "\xE6\xBF\xB2",
+ "\xED\x59" => "\xE6\xBF\x9D",
+ "\xED\x5A" => "\xE6\xBF\xA2",
+ "\xED\x5B" => "\xE6\xBF\xA8",
+ "\xED\x5C" => "\xE7\x87\xA1",
+ "\xED\x5D" => "\xE7\x87\xB1",
+ "\xED\x5E" => "\xE7\x87\xA8",
+ "\xED\x5F" => "\xE7\x87\xB2",
+ "\xED\x60" => "\xE7\x87\xA4",
+ "\xED\x61" => "\xE7\x87\xB0",
+ "\xED\x62" => "\xE7\x87\xA2",
+ "\xED\x63" => "\xE7\x8D\xB3",
+ "\xED\x64" => "\xE7\x8D\xAE",
+ "\xED\x65" => "\xE7\x8D\xAF",
+ "\xED\x66" => "\xE7\x92\x97",
+ "\xED\x67" => "\xE7\x92\xB2",
+ "\xED\x68" => "\xE7\x92\xAB",
+ "\xED\x69" => "\xE7\x92\x90",
+ "\xED\x6A" => "\xE7\x92\xAA",
+ "\xED\x6B" => "\xE7\x92\xAD",
+ "\xED\x6C" => "\xE7\x92\xB1",
+ "\xED\x6D" => "\xE7\x92\xA5",
+ "\xED\x6E" => "\xE7\x92\xAF",
+ "\xED\x6F" => "\xE7\x94\x90",
+ "\xED\x70" => "\xE7\x94\x91",
+ "\xED\x71" => "\xE7\x94\x92",
+ "\xED\x72" => "\xE7\x94\x8F",
+ "\xED\x73" => "\xE7\x96\x84",
+ "\xED\x74" => "\xE7\x99\x83",
+ "\xED\x75" => "\xE7\x99\x88",
+ "\xED\x76" => "\xE7\x99\x89",
+ "\xED\x77" => "\xE7\x99\x87",
+ "\xED\x78" => "\xE7\x9A\xA4",
+ "\xED\x79" => "\xE7\x9B\xA9",
+ "\xED\x7A" => "\xE7\x9E\xB5",
+ "\xED\x7B" => "\xE7\x9E\xAB",
+ "\xED\x7C" => "\xE7\x9E\xB2",
+ "\xED\x7D" => "\xE7\x9E\xB7",
+ "\xED\x7E" => "\xE7\x9E\xB6",
+ "\xED\xA1" => "\xE7\x9E\xB4",
+ "\xED\xA2" => "\xE7\x9E\xB1",
+ "\xED\xA3" => "\xE7\x9E\xA8",
+ "\xED\xA4" => "\xE7\x9F\xB0",
+ "\xED\xA5" => "\xE7\xA3\xB3",
+ "\xED\xA6" => "\xE7\xA3\xBD",
+ "\xED\xA7" => "\xE7\xA4\x82",
+ "\xED\xA8" => "\xE7\xA3\xBB",
+ "\xED\xA9" => "\xE7\xA3\xBC",
+ "\xED\xAA" => "\xE7\xA3\xB2",
+ "\xED\xAB" => "\xE7\xA4\x85",
+ "\xED\xAC" => "\xE7\xA3\xB9",
+ "\xED\xAD" => "\xE7\xA3\xBE",
+ "\xED\xAE" => "\xE7\xA4\x84",
+ "\xED\xAF" => "\xE7\xA6\xAB",
+ "\xED\xB0" => "\xE7\xA6\xA8",
+ "\xED\xB1" => "\xE7\xA9\x9C",
+ "\xED\xB2" => "\xE7\xA9\x9B",
+ "\xED\xB3" => "\xE7\xA9\x96",
+ "\xED\xB4" => "\xE7\xA9\x98",
+ "\xED\xB5" => "\xE7\xA9\x94",
+ "\xED\xB6" => "\xE7\xA9\x9A",
+ "\xED\xB7" => "\xE7\xAA\xBE",
+ "\xED\xB8" => "\xE7\xAB\x80",
+ "\xED\xB9" => "\xE7\xAB\x81",
+ "\xED\xBA" => "\xE7\xB0\x85",
+ "\xED\xBB" => "\xE7\xB0\x8F",
+ "\xED\xBC" => "\xE7\xAF\xB2",
+ "\xED\xBD" => "\xE7\xB0\x80",
+ "\xED\xBE" => "\xE7\xAF\xBF",
+ "\xED\xBF" => "\xE7\xAF\xBB",
+ "\xED\xC0" => "\xE7\xB0\x8E",
+ "\xED\xC1" => "\xE7\xAF\xB4",
+ "\xED\xC2" => "\xE7\xB0\x8B",
+ "\xED\xC3" => "\xE7\xAF\xB3",
+ "\xED\xC4" => "\xE7\xB0\x82",
+ "\xED\xC5" => "\xE7\xB0\x89",
+ "\xED\xC6" => "\xE7\xB0\x83",
+ "\xED\xC7" => "\xE7\xB0\x81",
+ "\xED\xC8" => "\xE7\xAF\xB8",
+ "\xED\xC9" => "\xE7\xAF\xBD",
+ "\xED\xCA" => "\xE7\xB0\x86",
+ "\xED\xCB" => "\xE7\xAF\xB0",
+ "\xED\xCC" => "\xE7\xAF\xB1",
+ "\xED\xCD" => "\xE7\xB0\x90",
+ "\xED\xCE" => "\xE7\xB0\x8A",
+ "\xED\xCF" => "\xE7\xB3\xA8",
+ "\xED\xD0" => "\xE7\xB8\xAD",
+ "\xED\xD1" => "\xE7\xB8\xBC",
+ "\xED\xD2" => "\xE7\xB9\x82",
+ "\xED\xD3" => "\xE7\xB8\xB3",
+ "\xED\xD4" => "\xE9\xA1\x88",
+ "\xED\xD5" => "\xE7\xB8\xB8",
+ "\xED\xD6" => "\xE7\xB8\xAA",
+ "\xED\xD7" => "\xE7\xB9\x89",
+ "\xED\xD8" => "\xE7\xB9\x80",
+ "\xED\xD9" => "\xE7\xB9\x87",
+ "\xED\xDA" => "\xE7\xB8\xA9",
+ "\xED\xDB" => "\xE7\xB9\x8C",
+ "\xED\xDC" => "\xE7\xB8\xB0",
+ "\xED\xDD" => "\xE7\xB8\xBB",
+ "\xED\xDE" => "\xE7\xB8\xB6",
+ "\xED\xDF" => "\xE7\xB9\x84",
+ "\xED\xE0" => "\xE7\xB8\xBA",
+ "\xED\xE1" => "\xE7\xBD\x85",
+ "\xED\xE2" => "\xE7\xBD\xBF",
+ "\xED\xE3" => "\xE7\xBD\xBE",
+ "\xED\xE4" => "\xE7\xBD\xBD",
+ "\xED\xE5" => "\xE7\xBF\xB4",
+ "\xED\xE6" => "\xE7\xBF\xB2",
+ "\xED\xE7" => "\xE8\x80\xAC",
+ "\xED\xE8" => "\xE8\x86\xBB",
+ "\xED\xE9" => "\xE8\x87\x84",
+ "\xED\xEA" => "\xE8\x87\x8C",
+ "\xED\xEB" => "\xE8\x87\x8A",
+ "\xED\xEC" => "\xE8\x87\x85",
+ "\xED\xED" => "\xE8\x87\x87",
+ "\xED\xEE" => "\xE8\x86\xBC",
+ "\xED\xEF" => "\xE8\x87\xA9",
+ "\xED\xF0" => "\xE8\x89\x9B",
+ "\xED\xF1" => "\xE8\x89\x9A",
+ "\xED\xF2" => "\xE8\x89\x9C",
+ "\xED\xF3" => "\xE8\x96\x83",
+ "\xED\xF4" => "\xE8\x96\x80",
+ "\xED\xF5" => "\xE8\x96\x8F",
+ "\xED\xF6" => "\xE8\x96\xA7",
+ "\xED\xF7" => "\xE8\x96\x95",
+ "\xED\xF8" => "\xE8\x96\xA0",
+ "\xED\xF9" => "\xE8\x96\x8B",
+ "\xED\xFA" => "\xE8\x96\xA3",
+ "\xED\xFB" => "\xE8\x95\xBB",
+ "\xED\xFC" => "\xE8\x96\xA4",
+ "\xED\xFD" => "\xE8\x96\x9A",
+ "\xED\xFE" => "\xE8\x96\x9E",
+ "\xEE\x40" => "\xE8\x95\xB7",
+ "\xEE\x41" => "\xE8\x95\xBC",
+ "\xEE\x42" => "\xE8\x96\x89",
+ "\xEE\x43" => "\xE8\x96\xA1",
+ "\xEE\x44" => "\xE8\x95\xBA",
+ "\xEE\x45" => "\xE8\x95\xB8",
+ "\xEE\x46" => "\xE8\x95\x97",
+ "\xEE\x47" => "\xE8\x96\x8E",
+ "\xEE\x48" => "\xE8\x96\x96",
+ "\xEE\x49" => "\xE8\x96\x86",
+ "\xEE\x4A" => "\xE8\x96\x8D",
+ "\xEE\x4B" => "\xE8\x96\x99",
+ "\xEE\x4C" => "\xE8\x96\x9D",
+ "\xEE\x4D" => "\xE8\x96\x81",
+ "\xEE\x4E" => "\xE8\x96\xA2",
+ "\xEE\x4F" => "\xE8\x96\x82",
+ "\xEE\x50" => "\xE8\x96\x88",
+ "\xEE\x51" => "\xE8\x96\x85",
+ "\xEE\x52" => "\xE8\x95\xB9",
+ "\xEE\x53" => "\xE8\x95\xB6",
+ "\xEE\x54" => "\xE8\x96\x98",
+ "\xEE\x55" => "\xE8\x96\x90",
+ "\xEE\x56" => "\xE8\x96\x9F",
+ "\xEE\x57" => "\xE8\x99\xA8",
+ "\xEE\x58" => "\xE8\x9E\xBE",
+ "\xEE\x59" => "\xE8\x9E\xAA",
+ "\xEE\x5A" => "\xE8\x9E\xAD",
+ "\xEE\x5B" => "\xE8\x9F\x85",
+ "\xEE\x5C" => "\xE8\x9E\xB0",
+ "\xEE\x5D" => "\xE8\x9E\xAC",
+ "\xEE\x5E" => "\xE8\x9E\xB9",
+ "\xEE\x5F" => "\xE8\x9E\xB5",
+ "\xEE\x60" => "\xE8\x9E\xBC",
+ "\xEE\x61" => "\xE8\x9E\xAE",
+ "\xEE\x62" => "\xE8\x9F\x89",
+ "\xEE\x63" => "\xE8\x9F\x83",
+ "\xEE\x64" => "\xE8\x9F\x82",
+ "\xEE\x65" => "\xE8\x9F\x8C",
+ "\xEE\x66" => "\xE8\x9E\xB7",
+ "\xEE\x67" => "\xE8\x9E\xAF",
+ "\xEE\x68" => "\xE8\x9F\x84",
+ "\xEE\x69" => "\xE8\x9F\x8A",
+ "\xEE\x6A" => "\xE8\x9E\xB4",
+ "\xEE\x6B" => "\xE8\x9E\xB6",
+ "\xEE\x6C" => "\xE8\x9E\xBF",
+ "\xEE\x6D" => "\xE8\x9E\xB8",
+ "\xEE\x6E" => "\xE8\x9E\xBD",
+ "\xEE\x6F" => "\xE8\x9F\x9E",
+ "\xEE\x70" => "\xE8\x9E\xB2",
+ "\xEE\x71" => "\xE8\xA4\xB5",
+ "\xEE\x72" => "\xE8\xA4\xB3",
+ "\xEE\x73" => "\xE8\xA4\xBC",
+ "\xEE\x74" => "\xE8\xA4\xBE",
+ "\xEE\x75" => "\xE8\xA5\x81",
+ "\xEE\x76" => "\xE8\xA5\x92",
+ "\xEE\x77" => "\xE8\xA4\xB7",
+ "\xEE\x78" => "\xE8\xA5\x82",
+ "\xEE\x79" => "\xE8\xA6\xAD",
+ "\xEE\x7A" => "\xE8\xA6\xAF",
+ "\xEE\x7B" => "\xE8\xA6\xAE",
+ "\xEE\x7C" => "\xE8\xA7\xB2",
+ "\xEE\x7D" => "\xE8\xA7\xB3",
+ "\xEE\x7E" => "\xE8\xAC\x9E",
+ "\xEE\xA1" => "\xE8\xAC\x98",
+ "\xEE\xA2" => "\xE8\xAC\x96",
+ "\xEE\xA3" => "\xE8\xAC\x91",
+ "\xEE\xA4" => "\xE8\xAC\x85",
+ "\xEE\xA5" => "\xE8\xAC\x8B",
+ "\xEE\xA6" => "\xE8\xAC\xA2",
+ "\xEE\xA7" => "\xE8\xAC\x8F",
+ "\xEE\xA8" => "\xE8\xAC\x92",
+ "\xEE\xA9" => "\xE8\xAC\x95",
+ "\xEE\xAA" => "\xE8\xAC\x87",
+ "\xEE\xAB" => "\xE8\xAC\x8D",
+ "\xEE\xAC" => "\xE8\xAC\x88",
+ "\xEE\xAD" => "\xE8\xAC\x86",
+ "\xEE\xAE" => "\xE8\xAC\x9C",
+ "\xEE\xAF" => "\xE8\xAC\x93",
+ "\xEE\xB0" => "\xE8\xAC\x9A",
+ "\xEE\xB1" => "\xE8\xB1\x8F",
+ "\xEE\xB2" => "\xE8\xB1\xB0",
+ "\xEE\xB3" => "\xE8\xB1\xB2",
+ "\xEE\xB4" => "\xE8\xB1\xB1",
+ "\xEE\xB5" => "\xE8\xB1\xAF",
+ "\xEE\xB6" => "\xE8\xB2\x95",
+ "\xEE\xB7" => "\xE8\xB2\x94",
+ "\xEE\xB8" => "\xE8\xB3\xB9",
+ "\xEE\xB9" => "\xE8\xB5\xAF",
+ "\xEE\xBA" => "\xE8\xB9\x8E",
+ "\xEE\xBB" => "\xE8\xB9\x8D",
+ "\xEE\xBC" => "\xE8\xB9\x93",
+ "\xEE\xBD" => "\xE8\xB9\x90",
+ "\xEE\xBE" => "\xE8\xB9\x8C",
+ "\xEE\xBF" => "\xE8\xB9\x87",
+ "\xEE\xC0" => "\xE8\xBD\x83",
+ "\xEE\xC1" => "\xE8\xBD\x80",
+ "\xEE\xC2" => "\xE9\x82\x85",
+ "\xEE\xC3" => "\xE9\x81\xBE",
+ "\xEE\xC4" => "\xE9\x84\xB8",
+ "\xEE\xC5" => "\xE9\x86\x9A",
+ "\xEE\xC6" => "\xE9\x86\xA2",
+ "\xEE\xC7" => "\xE9\x86\x9B",
+ "\xEE\xC8" => "\xE9\x86\x99",
+ "\xEE\xC9" => "\xE9\x86\x9F",
+ "\xEE\xCA" => "\xE9\x86\xA1",
+ "\xEE\xCB" => "\xE9\x86\x9D",
+ "\xEE\xCC" => "\xE9\x86\xA0",
+ "\xEE\xCD" => "\xE9\x8E\xA1",
+ "\xEE\xCE" => "\xE9\x8E\x83",
+ "\xEE\xCF" => "\xE9\x8E\xAF",
+ "\xEE\xD0" => "\xE9\x8D\xA4",
+ "\xEE\xD1" => "\xE9\x8D\x96",
+ "\xEE\xD2" => "\xE9\x8D\x87",
+ "\xEE\xD3" => "\xE9\x8D\xBC",
+ "\xEE\xD4" => "\xE9\x8D\x98",
+ "\xEE\xD5" => "\xE9\x8D\x9C",
+ "\xEE\xD6" => "\xE9\x8D\xB6",
+ "\xEE\xD7" => "\xE9\x8D\x89",
+ "\xEE\xD8" => "\xE9\x8D\x90",
+ "\xEE\xD9" => "\xE9\x8D\x91",
+ "\xEE\xDA" => "\xE9\x8D\xA0",
+ "\xEE\xDB" => "\xE9\x8D\xAD",
+ "\xEE\xDC" => "\xE9\x8E\x8F",
+ "\xEE\xDD" => "\xE9\x8D\x8C",
+ "\xEE\xDE" => "\xE9\x8D\xAA",
+ "\xEE\xDF" => "\xE9\x8D\xB9",
+ "\xEE\xE0" => "\xE9\x8D\x97",
+ "\xEE\xE1" => "\xE9\x8D\x95",
+ "\xEE\xE2" => "\xE9\x8D\x92",
+ "\xEE\xE3" => "\xE9\x8D\x8F",
+ "\xEE\xE4" => "\xE9\x8D\xB1",
+ "\xEE\xE5" => "\xE9\x8D\xB7",
+ "\xEE\xE6" => "\xE9\x8D\xBB",
+ "\xEE\xE7" => "\xE9\x8D\xA1",
+ "\xEE\xE8" => "\xE9\x8D\x9E",
+ "\xEE\xE9" => "\xE9\x8D\xA3",
+ "\xEE\xEA" => "\xE9\x8D\xA7",
+ "\xEE\xEB" => "\xE9\x8E\x80",
+ "\xEE\xEC" => "\xE9\x8D\x8E",
+ "\xEE\xED" => "\xE9\x8D\x99",
+ "\xEE\xEE" => "\xE9\x97\x87",
+ "\xEE\xEF" => "\xE9\x97\x80",
+ "\xEE\xF0" => "\xE9\x97\x89",
+ "\xEE\xF1" => "\xE9\x97\x83",
+ "\xEE\xF2" => "\xE9\x97\x85",
+ "\xEE\xF3" => "\xE9\x96\xB7",
+ "\xEE\xF4" => "\xE9\x9A\xAE",
+ "\xEE\xF5" => "\xE9\x9A\xB0",
+ "\xEE\xF6" => "\xE9\x9A\xAC",
+ "\xEE\xF7" => "\xE9\x9C\xA0",
+ "\xEE\xF8" => "\xE9\x9C\x9F",
+ "\xEE\xF9" => "\xE9\x9C\x98",
+ "\xEE\xFA" => "\xE9\x9C\x9D",
+ "\xEE\xFB" => "\xE9\x9C\x99",
+ "\xEE\xFC" => "\xE9\x9E\x9A",
+ "\xEE\xFD" => "\xE9\x9E\xA1",
+ "\xEE\xFE" => "\xE9\x9E\x9C",
+ "\xEF\x40" => "\xE9\x9E\x9E",
+ "\xEF\x41" => "\xE9\x9E\x9D",
+ "\xEF\x42" => "\xE9\x9F\x95",
+ "\xEF\x43" => "\xE9\x9F\x94",
+ "\xEF\x44" => "\xE9\x9F\xB1",
+ "\xEF\x45" => "\xE9\xA1\x81",
+ "\xEF\x46" => "\xE9\xA1\x84",
+ "\xEF\x47" => "\xE9\xA1\x8A",
+ "\xEF\x48" => "\xE9\xA1\x89",
+ "\xEF\x49" => "\xE9\xA1\x85",
+ "\xEF\x4A" => "\xE9\xA1\x83",
+ "\xEF\x4B" => "\xE9\xA4\xA5",
+ "\xEF\x4C" => "\xE9\xA4\xAB",
+ "\xEF\x4D" => "\xE9\xA4\xAC",
+ "\xEF\x4E" => "\xE9\xA4\xAA",
+ "\xEF\x4F" => "\xE9\xA4\xB3",
+ "\xEF\x50" => "\xE9\xA4\xB2",
+ "\xEF\x51" => "\xE9\xA4\xAF",
+ "\xEF\x52" => "\xE9\xA4\xAD",
+ "\xEF\x53" => "\xE9\xA4\xB1",
+ "\xEF\x54" => "\xE9\xA4\xB0",
+ "\xEF\x55" => "\xE9\xA6\x98",
+ "\xEF\x56" => "\xE9\xA6\xA3",
+ "\xEF\x57" => "\xE9\xA6\xA1",
+ "\xEF\x58" => "\xE9\xA8\x82",
+ "\xEF\x59" => "\xE9\xA7\xBA",
+ "\xEF\x5A" => "\xE9\xA7\xB4",
+ "\xEF\x5B" => "\xE9\xA7\xB7",
+ "\xEF\x5C" => "\xE9\xA7\xB9",
+ "\xEF\x5D" => "\xE9\xA7\xB8",
+ "\xEF\x5E" => "\xE9\xA7\xB6",
+ "\xEF\x5F" => "\xE9\xA7\xBB",
+ "\xEF\x60" => "\xE9\xA7\xBD",
+ "\xEF\x61" => "\xE9\xA7\xBE",
+ "\xEF\x62" => "\xE9\xA7\xBC",
+ "\xEF\x63" => "\xE9\xA8\x83",
+ "\xEF\x64" => "\xE9\xAA\xBE",
+ "\xEF\x65" => "\xE9\xAB\xBE",
+ "\xEF\x66" => "\xE9\xAB\xBD",
+ "\xEF\x67" => "\xE9\xAC\x81",
+ "\xEF\x68" => "\xE9\xAB\xBC",
+ "\xEF\x69" => "\xE9\xAD\x88",
+ "\xEF\x6A" => "\xE9\xAE\x9A",
+ "\xEF\x6B" => "\xE9\xAE\xA8",
+ "\xEF\x6C" => "\xE9\xAE\x9E",
+ "\xEF\x6D" => "\xE9\xAE\x9B",
+ "\xEF\x6E" => "\xE9\xAE\xA6",
+ "\xEF\x6F" => "\xE9\xAE\xA1",
+ "\xEF\x70" => "\xE9\xAE\xA5",
+ "\xEF\x71" => "\xE9\xAE\xA4",
+ "\xEF\x72" => "\xE9\xAE\x86",
+ "\xEF\x73" => "\xE9\xAE\xA2",
+ "\xEF\x74" => "\xE9\xAE\xA0",
+ "\xEF\x75" => "\xE9\xAE\xAF",
+ "\xEF\x76" => "\xE9\xB4\xB3",
+ "\xEF\x77" => "\xE9\xB5\x81",
+ "\xEF\x78" => "\xE9\xB5\xA7",
+ "\xEF\x79" => "\xE9\xB4\xB6",
+ "\xEF\x7A" => "\xE9\xB4\xAE",
+ "\xEF\x7B" => "\xE9\xB4\xAF",
+ "\xEF\x7C" => "\xE9\xB4\xB1",
+ "\xEF\x7D" => "\xE9\xB4\xB8",
+ "\xEF\x7E" => "\xE9\xB4\xB0",
+ "\xEF\xA1" => "\xE9\xB5\x85",
+ "\xEF\xA2" => "\xE9\xB5\x82",
+ "\xEF\xA3" => "\xE9\xB5\x83",
+ "\xEF\xA4" => "\xE9\xB4\xBE",
+ "\xEF\xA5" => "\xE9\xB4\xB7",
+ "\xEF\xA6" => "\xE9\xB5\x80",
+ "\xEF\xA7" => "\xE9\xB4\xBD",
+ "\xEF\xA8" => "\xE7\xBF\xB5",
+ "\xEF\xA9" => "\xE9\xB4\xAD",
+ "\xEF\xAA" => "\xE9\xBA\x8A",
+ "\xEF\xAB" => "\xE9\xBA\x89",
+ "\xEF\xAC" => "\xE9\xBA\x8D",
+ "\xEF\xAD" => "\xE9\xBA\xB0",
+ "\xEF\xAE" => "\xE9\xBB\x88",
+ "\xEF\xAF" => "\xE9\xBB\x9A",
+ "\xEF\xB0" => "\xE9\xBB\xBB",
+ "\xEF\xB1" => "\xE9\xBB\xBF",
+ "\xEF\xB2" => "\xE9\xBC\xA4",
+ "\xEF\xB3" => "\xE9\xBC\xA3",
+ "\xEF\xB4" => "\xE9\xBC\xA2",
+ "\xEF\xB5" => "\xE9\xBD\x94",
+ "\xEF\xB6" => "\xE9\xBE\xA0",
+ "\xEF\xB7" => "\xE5\x84\xB1",
+ "\xEF\xB8" => "\xE5\x84\xAD",
+ "\xEF\xB9" => "\xE5\x84\xAE",
+ "\xEF\xBA" => "\xE5\x9A\x98",
+ "\xEF\xBB" => "\xE5\x9A\x9C",
+ "\xEF\xBC" => "\xE5\x9A\x97",
+ "\xEF\xBD" => "\xE5\x9A\x9A",
+ "\xEF\xBE" => "\xE5\x9A\x9D",
+ "\xEF\xBF" => "\xE5\x9A\x99",
+ "\xEF\xC0" => "\xE5\xA5\xB0",
+ "\xEF\xC1" => "\xE5\xAC\xBC",
+ "\xEF\xC2" => "\xE5\xB1\xA9",
+ "\xEF\xC3" => "\xE5\xB1\xAA",
+ "\xEF\xC4" => "\xE5\xB7\x80",
+ "\xEF\xC5" => "\xE5\xB9\xAD",
+ "\xEF\xC6" => "\xE5\xB9\xAE",
+ "\xEF\xC7" => "\xE6\x87\x98",
+ "\xEF\xC8" => "\xE6\x87\x9F",
+ "\xEF\xC9" => "\xE6\x87\xAD",
+ "\xEF\xCA" => "\xE6\x87\xAE",
+ "\xEF\xCB" => "\xE6\x87\xB1",
+ "\xEF\xCC" => "\xE6\x87\xAA",
+ "\xEF\xCD" => "\xE6\x87\xB0",
+ "\xEF\xCE" => "\xE6\x87\xAB",
+ "\xEF\xCF" => "\xE6\x87\x96",
+ "\xEF\xD0" => "\xE6\x87\xA9",
+ "\xEF\xD1" => "\xE6\x93\xBF",
+ "\xEF\xD2" => "\xE6\x94\x84",
+ "\xEF\xD3" => "\xE6\x93\xBD",
+ "\xEF\xD4" => "\xE6\x93\xB8",
+ "\xEF\xD5" => "\xE6\x94\x81",
+ "\xEF\xD6" => "\xE6\x94\x83",
+ "\xEF\xD7" => "\xE6\x93\xBC",
+ "\xEF\xD8" => "\xE6\x96\x94",
+ "\xEF\xD9" => "\xE6\x97\x9B",
+ "\xEF\xDA" => "\xE6\x9B\x9A",
+ "\xEF\xDB" => "\xE6\x9B\x9B",
+ "\xEF\xDC" => "\xE6\x9B\x98",
+ "\xEF\xDD" => "\xE6\xAB\x85",
+ "\xEF\xDE" => "\xE6\xAA\xB9",
+ "\xEF\xDF" => "\xE6\xAA\xBD",
+ "\xEF\xE0" => "\xE6\xAB\xA1",
+ "\xEF\xE1" => "\xE6\xAB\x86",
+ "\xEF\xE2" => "\xE6\xAA\xBA",
+ "\xEF\xE3" => "\xE6\xAA\xB6",
+ "\xEF\xE4" => "\xE6\xAA\xB7",
+ "\xEF\xE5" => "\xE6\xAB\x87",
+ "\xEF\xE6" => "\xE6\xAA\xB4",
+ "\xEF\xE7" => "\xE6\xAA\xAD",
+ "\xEF\xE8" => "\xE6\xAD\x9E",
+ "\xEF\xE9" => "\xE6\xAF\x89",
+ "\xEF\xEA" => "\xE6\xB0\x8B",
+ "\xEF\xEB" => "\xE7\x80\x87",
+ "\xEF\xEC" => "\xE7\x80\x8C",
+ "\xEF\xED" => "\xE7\x80\x8D",
+ "\xEF\xEE" => "\xE7\x80\x81",
+ "\xEF\xEF" => "\xE7\x80\x85",
+ "\xEF\xF0" => "\xE7\x80\x94",
+ "\xEF\xF1" => "\xE7\x80\x8E",
+ "\xEF\xF2" => "\xE6\xBF\xBF",
+ "\xEF\xF3" => "\xE7\x80\x80",
+ "\xEF\xF4" => "\xE6\xBF\xBB",
+ "\xEF\xF5" => "\xE7\x80\xA6",
+ "\xEF\xF6" => "\xE6\xBF\xBC",
+ "\xEF\xF7" => "\xE6\xBF\xB7",
+ "\xEF\xF8" => "\xE7\x80\x8A",
+ "\xEF\xF9" => "\xE7\x88\x81",
+ "\xEF\xFA" => "\xE7\x87\xBF",
+ "\xEF\xFB" => "\xE7\x87\xB9",
+ "\xEF\xFC" => "\xE7\x88\x83",
+ "\xEF\xFD" => "\xE7\x87\xBD",
+ "\xEF\xFE" => "\xE7\x8D\xB6",
+ "\xF0\x40" => "\xE7\x92\xB8",
+ "\xF0\x41" => "\xE7\x93\x80",
+ "\xF0\x42" => "\xE7\x92\xB5",
+ "\xF0\x43" => "\xE7\x93\x81",
+ "\xF0\x44" => "\xE7\x92\xBE",
+ "\xF0\x45" => "\xE7\x92\xB6",
+ "\xF0\x46" => "\xE7\x92\xBB",
+ "\xF0\x47" => "\xE7\x93\x82",
+ "\xF0\x48" => "\xE7\x94\x94",
+ "\xF0\x49" => "\xE7\x94\x93",
+ "\xF0\x4A" => "\xE7\x99\x9C",
+ "\xF0\x4B" => "\xE7\x99\xA4",
+ "\xF0\x4C" => "\xE7\x99\x99",
+ "\xF0\x4D" => "\xE7\x99\x90",
+ "\xF0\x4E" => "\xE7\x99\x93",
+ "\xF0\x4F" => "\xE7\x99\x97",
+ "\xF0\x50" => "\xE7\x99\x9A",
+ "\xF0\x51" => "\xE7\x9A\xA6",
+ "\xF0\x52" => "\xE7\x9A\xBD",
+ "\xF0\x53" => "\xE7\x9B\xAC",
+ "\xF0\x54" => "\xE7\x9F\x82",
+ "\xF0\x55" => "\xE7\x9E\xBA",
+ "\xF0\x56" => "\xE7\xA3\xBF",
+ "\xF0\x57" => "\xE7\xA4\x8C",
+ "\xF0\x58" => "\xE7\xA4\x93",
+ "\xF0\x59" => "\xE7\xA4\x94",
+ "\xF0\x5A" => "\xE7\xA4\x89",
+ "\xF0\x5B" => "\xE7\xA4\x90",
+ "\xF0\x5C" => "\xE7\xA4\x92",
+ "\xF0\x5D" => "\xE7\xA4\x91",
+ "\xF0\x5E" => "\xE7\xA6\xAD",
+ "\xF0\x5F" => "\xE7\xA6\xAC",
+ "\xF0\x60" => "\xE7\xA9\x9F",
+ "\xF0\x61" => "\xE7\xB0\x9C",
+ "\xF0\x62" => "\xE7\xB0\xA9",
+ "\xF0\x63" => "\xE7\xB0\x99",
+ "\xF0\x64" => "\xE7\xB0\xA0",
+ "\xF0\x65" => "\xE7\xB0\x9F",
+ "\xF0\x66" => "\xE7\xB0\xAD",
+ "\xF0\x67" => "\xE7\xB0\x9D",
+ "\xF0\x68" => "\xE7\xB0\xA6",
+ "\xF0\x69" => "\xE7\xB0\xA8",
+ "\xF0\x6A" => "\xE7\xB0\xA2",
+ "\xF0\x6B" => "\xE7\xB0\xA5",
+ "\xF0\x6C" => "\xE7\xB0\xB0",
+ "\xF0\x6D" => "\xE7\xB9\x9C",
+ "\xF0\x6E" => "\xE7\xB9\x90",
+ "\xF0\x6F" => "\xE7\xB9\x96",
+ "\xF0\x70" => "\xE7\xB9\xA3",
+ "\xF0\x71" => "\xE7\xB9\x98",
+ "\xF0\x72" => "\xE7\xB9\xA2",
+ "\xF0\x73" => "\xE7\xB9\x9F",
+ "\xF0\x74" => "\xE7\xB9\x91",
+ "\xF0\x75" => "\xE7\xB9\xA0",
+ "\xF0\x76" => "\xE7\xB9\x97",
+ "\xF0\x77" => "\xE7\xB9\x93",
+ "\xF0\x78" => "\xE7\xBE\xB5",
+ "\xF0\x79" => "\xE7\xBE\xB3",
+ "\xF0\x7A" => "\xE7\xBF\xB7",
+ "\xF0\x7B" => "\xE7\xBF\xB8",
+ "\xF0\x7C" => "\xE8\x81\xB5",
+ "\xF0\x7D" => "\xE8\x87\x91",
+ "\xF0\x7E" => "\xE8\x87\x92",
+ "\xF0\xA1" => "\xE8\x87\x90",
+ "\xF0\xA2" => "\xE8\x89\x9F",
+ "\xF0\xA3" => "\xE8\x89\x9E",
+ "\xF0\xA4" => "\xE8\x96\xB4",
+ "\xF0\xA5" => "\xE8\x97\x86",
+ "\xF0\xA6" => "\xE8\x97\x80",
+ "\xF0\xA7" => "\xE8\x97\x83",
+ "\xF0\xA8" => "\xE8\x97\x82",
+ "\xF0\xA9" => "\xE8\x96\xB3",
+ "\xF0\xAA" => "\xE8\x96\xB5",
+ "\xF0\xAB" => "\xE8\x96\xBD",
+ "\xF0\xAC" => "\xE8\x97\x87",
+ "\xF0\xAD" => "\xE8\x97\x84",
+ "\xF0\xAE" => "\xE8\x96\xBF",
+ "\xF0\xAF" => "\xE8\x97\x8B",
+ "\xF0\xB0" => "\xE8\x97\x8E",
+ "\xF0\xB1" => "\xE8\x97\x88",
+ "\xF0\xB2" => "\xE8\x97\x85",
+ "\xF0\xB3" => "\xE8\x96\xB1",
+ "\xF0\xB4" => "\xE8\x96\xB6",
+ "\xF0\xB5" => "\xE8\x97\x92",
+ "\xF0\xB6" => "\xE8\x98\xA4",
+ "\xF0\xB7" => "\xE8\x96\xB8",
+ "\xF0\xB8" => "\xE8\x96\xB7",
+ "\xF0\xB9" => "\xE8\x96\xBE",
+ "\xF0\xBA" => "\xE8\x99\xA9",
+ "\xF0\xBB" => "\xE8\x9F\xA7",
+ "\xF0\xBC" => "\xE8\x9F\xA6",
+ "\xF0\xBD" => "\xE8\x9F\xA2",
+ "\xF0\xBE" => "\xE8\x9F\x9B",
+ "\xF0\xBF" => "\xE8\x9F\xAB",
+ "\xF0\xC0" => "\xE8\x9F\xAA",
+ "\xF0\xC1" => "\xE8\x9F\xA5",
+ "\xF0\xC2" => "\xE8\x9F\x9F",
+ "\xF0\xC3" => "\xE8\x9F\xB3",
+ "\xF0\xC4" => "\xE8\x9F\xA4",
+ "\xF0\xC5" => "\xE8\x9F\x94",
+ "\xF0\xC6" => "\xE8\x9F\x9C",
+ "\xF0\xC7" => "\xE8\x9F\x93",
+ "\xF0\xC8" => "\xE8\x9F\xAD",
+ "\xF0\xC9" => "\xE8\x9F\x98",
+ "\xF0\xCA" => "\xE8\x9F\xA3",
+ "\xF0\xCB" => "\xE8\x9E\xA4",
+ "\xF0\xCC" => "\xE8\x9F\x97",
+ "\xF0\xCD" => "\xE8\x9F\x99",
+ "\xF0\xCE" => "\xE8\xA0\x81",
+ "\xF0\xCF" => "\xE8\x9F\xB4",
+ "\xF0\xD0" => "\xE8\x9F\xA8",
+ "\xF0\xD1" => "\xE8\x9F\x9D",
+ "\xF0\xD2" => "\xE8\xA5\x93",
+ "\xF0\xD3" => "\xE8\xA5\x8B",
+ "\xF0\xD4" => "\xE8\xA5\x8F",
+ "\xF0\xD5" => "\xE8\xA5\x8C",
+ "\xF0\xD6" => "\xE8\xA5\x86",
+ "\xF0\xD7" => "\xE8\xA5\x90",
+ "\xF0\xD8" => "\xE8\xA5\x91",
+ "\xF0\xD9" => "\xE8\xA5\x89",
+ "\xF0\xDA" => "\xE8\xAC\xAA",
+ "\xF0\xDB" => "\xE8\xAC\xA7",
+ "\xF0\xDC" => "\xE8\xAC\xA3",
+ "\xF0\xDD" => "\xE8\xAC\xB3",
+ "\xF0\xDE" => "\xE8\xAC\xB0",
+ "\xF0\xDF" => "\xE8\xAC\xB5",
+ "\xF0\xE0" => "\xE8\xAD\x87",
+ "\xF0\xE1" => "\xE8\xAC\xAF",
+ "\xF0\xE2" => "\xE8\xAC\xBC",
+ "\xF0\xE3" => "\xE8\xAC\xBE",
+ "\xF0\xE4" => "\xE8\xAC\xB1",
+ "\xF0\xE5" => "\xE8\xAC\xA5",
+ "\xF0\xE6" => "\xE8\xAC\xB7",
+ "\xF0\xE7" => "\xE8\xAC\xA6",
+ "\xF0\xE8" => "\xE8\xAC\xB6",
+ "\xF0\xE9" => "\xE8\xAC\xAE",
+ "\xF0\xEA" => "\xE8\xAC\xA4",
+ "\xF0\xEB" => "\xE8\xAC\xBB",
+ "\xF0\xEC" => "\xE8\xAC\xBD",
+ "\xF0\xED" => "\xE8\xAC\xBA",
+ "\xF0\xEE" => "\xE8\xB1\x82",
+ "\xF0\xEF" => "\xE8\xB1\xB5",
+ "\xF0\xF0" => "\xE8\xB2\x99",
+ "\xF0\xF1" => "\xE8\xB2\x98",
+ "\xF0\xF2" => "\xE8\xB2\x97",
+ "\xF0\xF3" => "\xE8\xB3\xBE",
+ "\xF0\xF4" => "\xE8\xB4\x84",
+ "\xF0\xF5" => "\xE8\xB4\x82",
+ "\xF0\xF6" => "\xE8\xB4\x80",
+ "\xF0\xF7" => "\xE8\xB9\x9C",
+ "\xF0\xF8" => "\xE8\xB9\xA2",
+ "\xF0\xF9" => "\xE8\xB9\xA0",
+ "\xF0\xFA" => "\xE8\xB9\x97",
+ "\xF0\xFB" => "\xE8\xB9\x96",
+ "\xF0\xFC" => "\xE8\xB9\x9E",
+ "\xF0\xFD" => "\xE8\xB9\xA5",
+ "\xF0\xFE" => "\xE8\xB9\xA7",
+ "\xF1\x40" => "\xE8\xB9\x9B",
+ "\xF1\x41" => "\xE8\xB9\x9A",
+ "\xF1\x42" => "\xE8\xB9\xA1",
+ "\xF1\x43" => "\xE8\xB9\x9D",
+ "\xF1\x44" => "\xE8\xB9\xA9",
+ "\xF1\x45" => "\xE8\xB9\x94",
+ "\xF1\x46" => "\xE8\xBD\x86",
+ "\xF1\x47" => "\xE8\xBD\x87",
+ "\xF1\x48" => "\xE8\xBD\x88",
+ "\xF1\x49" => "\xE8\xBD\x8B",
+ "\xF1\x4A" => "\xE9\x84\xA8",
+ "\xF1\x4B" => "\xE9\x84\xBA",
+ "\xF1\x4C" => "\xE9\x84\xBB",
+ "\xF1\x4D" => "\xE9\x84\xBE",
+ "\xF1\x4E" => "\xE9\x86\xA8",
+ "\xF1\x4F" => "\xE9\x86\xA5",
+ "\xF1\x50" => "\xE9\x86\xA7",
+ "\xF1\x51" => "\xE9\x86\xAF",
+ "\xF1\x52" => "\xE9\x86\xAA",
+ "\xF1\x53" => "\xE9\x8E\xB5",
+ "\xF1\x54" => "\xE9\x8E\x8C",
+ "\xF1\x55" => "\xE9\x8E\x92",
+ "\xF1\x56" => "\xE9\x8E\xB7",
+ "\xF1\x57" => "\xE9\x8E\x9B",
+ "\xF1\x58" => "\xE9\x8E\x9D",
+ "\xF1\x59" => "\xE9\x8E\x89",
+ "\xF1\x5A" => "\xE9\x8E\xA7",
+ "\xF1\x5B" => "\xE9\x8E\x8E",
+ "\xF1\x5C" => "\xE9\x8E\xAA",
+ "\xF1\x5D" => "\xE9\x8E\x9E",
+ "\xF1\x5E" => "\xE9\x8E\xA6",
+ "\xF1\x5F" => "\xE9\x8E\x95",
+ "\xF1\x60" => "\xE9\x8E\x88",
+ "\xF1\x61" => "\xE9\x8E\x99",
+ "\xF1\x62" => "\xE9\x8E\x9F",
+ "\xF1\x63" => "\xE9\x8E\x8D",
+ "\xF1\x64" => "\xE9\x8E\xB1",
+ "\xF1\x65" => "\xE9\x8E\x91",
+ "\xF1\x66" => "\xE9\x8E\xB2",
+ "\xF1\x67" => "\xE9\x8E\xA4",
+ "\xF1\x68" => "\xE9\x8E\xA8",
+ "\xF1\x69" => "\xE9\x8E\xB4",
+ "\xF1\x6A" => "\xE9\x8E\xA3",
+ "\xF1\x6B" => "\xE9\x8E\xA5",
+ "\xF1\x6C" => "\xE9\x97\x92",
+ "\xF1\x6D" => "\xE9\x97\x93",
+ "\xF1\x6E" => "\xE9\x97\x91",
+ "\xF1\x6F" => "\xE9\x9A\xB3",
+ "\xF1\x70" => "\xE9\x9B\x97",
+ "\xF1\x71" => "\xE9\x9B\x9A",
+ "\xF1\x72" => "\xE5\xB7\x82",
+ "\xF1\x73" => "\xE9\x9B\x9F",
+ "\xF1\x74" => "\xE9\x9B\x98",
+ "\xF1\x75" => "\xE9\x9B\x9D",
+ "\xF1\x76" => "\xE9\x9C\xA3",
+ "\xF1\x77" => "\xE9\x9C\xA2",
+ "\xF1\x78" => "\xE9\x9C\xA5",
+ "\xF1\x79" => "\xE9\x9E\xAC",
+ "\xF1\x7A" => "\xE9\x9E\xAE",
+ "\xF1\x7B" => "\xE9\x9E\xA8",
+ "\xF1\x7C" => "\xE9\x9E\xAB",
+ "\xF1\x7D" => "\xE9\x9E\xA4",
+ "\xF1\x7E" => "\xE9\x9E\xAA",
+ "\xF1\xA1" => "\xE9\x9E\xA2",
+ "\xF1\xA2" => "\xE9\x9E\xA5",
+ "\xF1\xA3" => "\xE9\x9F\x97",
+ "\xF1\xA4" => "\xE9\x9F\x99",
+ "\xF1\xA5" => "\xE9\x9F\x96",
+ "\xF1\xA6" => "\xE9\x9F\x98",
+ "\xF1\xA7" => "\xE9\x9F\xBA",
+ "\xF1\xA8" => "\xE9\xA1\x90",
+ "\xF1\xA9" => "\xE9\xA1\x91",
+ "\xF1\xAA" => "\xE9\xA1\x92",
+ "\xF1\xAB" => "\xE9\xA2\xB8",
+ "\xF1\xAC" => "\xE9\xA5\x81",
+ "\xF1\xAD" => "\xE9\xA4\xBC",
+ "\xF1\xAE" => "\xE9\xA4\xBA",
+ "\xF1\xAF" => "\xE9\xA8\x8F",
+ "\xF1\xB0" => "\xE9\xA8\x8B",
+ "\xF1\xB1" => "\xE9\xA8\x89",
+ "\xF1\xB2" => "\xE9\xA8\x8D",
+ "\xF1\xB3" => "\xE9\xA8\x84",
+ "\xF1\xB4" => "\xE9\xA8\x91",
+ "\xF1\xB5" => "\xE9\xA8\x8A",
+ "\xF1\xB6" => "\xE9\xA8\x85",
+ "\xF1\xB7" => "\xE9\xA8\x87",
+ "\xF1\xB8" => "\xE9\xA8\x86",
+ "\xF1\xB9" => "\xE9\xAB\x80",
+ "\xF1\xBA" => "\xE9\xAB\x9C",
+ "\xF1\xBB" => "\xE9\xAC\x88",
+ "\xF1\xBC" => "\xE9\xAC\x84",
+ "\xF1\xBD" => "\xE9\xAC\x85",
+ "\xF1\xBE" => "\xE9\xAC\xA9",
+ "\xF1\xBF" => "\xE9\xAC\xB5",
+ "\xF1\xC0" => "\xE9\xAD\x8A",
+ "\xF1\xC1" => "\xE9\xAD\x8C",
+ "\xF1\xC2" => "\xE9\xAD\x8B",
+ "\xF1\xC3" => "\xE9\xAF\x87",
+ "\xF1\xC4" => "\xE9\xAF\x86",
+ "\xF1\xC5" => "\xE9\xAF\x83",
+ "\xF1\xC6" => "\xE9\xAE\xBF",
+ "\xF1\xC7" => "\xE9\xAF\x81",
+ "\xF1\xC8" => "\xE9\xAE\xB5",
+ "\xF1\xC9" => "\xE9\xAE\xB8",
+ "\xF1\xCA" => "\xE9\xAF\x93",
+ "\xF1\xCB" => "\xE9\xAE\xB6",
+ "\xF1\xCC" => "\xE9\xAF\x84",
+ "\xF1\xCD" => "\xE9\xAE\xB9",
+ "\xF1\xCE" => "\xE9\xAE\xBD",
+ "\xF1\xCF" => "\xE9\xB5\x9C",
+ "\xF1\xD0" => "\xE9\xB5\x93",
+ "\xF1\xD1" => "\xE9\xB5\x8F",
+ "\xF1\xD2" => "\xE9\xB5\x8A",
+ "\xF1\xD3" => "\xE9\xB5\x9B",
+ "\xF1\xD4" => "\xE9\xB5\x8B",
+ "\xF1\xD5" => "\xE9\xB5\x99",
+ "\xF1\xD6" => "\xE9\xB5\x96",
+ "\xF1\xD7" => "\xE9\xB5\x8C",
+ "\xF1\xD8" => "\xE9\xB5\x97",
+ "\xF1\xD9" => "\xE9\xB5\x92",
+ "\xF1\xDA" => "\xE9\xB5\x94",
+ "\xF1\xDB" => "\xE9\xB5\x9F",
+ "\xF1\xDC" => "\xE9\xB5\x98",
+ "\xF1\xDD" => "\xE9\xB5\x9A",
+ "\xF1\xDE" => "\xE9\xBA\x8E",
+ "\xF1\xDF" => "\xE9\xBA\x8C",
+ "\xF1\xE0" => "\xE9\xBB\x9F",
+ "\xF1\xE1" => "\xE9\xBC\x81",
+ "\xF1\xE2" => "\xE9\xBC\x80",
+ "\xF1\xE3" => "\xE9\xBC\x96",
+ "\xF1\xE4" => "\xE9\xBC\xA5",
+ "\xF1\xE5" => "\xE9\xBC\xAB",
+ "\xF1\xE6" => "\xE9\xBC\xAA",
+ "\xF1\xE7" => "\xE9\xBC\xA9",
+ "\xF1\xE8" => "\xE9\xBC\xA8",
+ "\xF1\xE9" => "\xE9\xBD\x8C",
+ "\xF1\xEA" => "\xE9\xBD\x95",
+ "\xF1\xEB" => "\xE5\x84\xB4",
+ "\xF1\xEC" => "\xE5\x84\xB5",
+ "\xF1\xED" => "\xE5\x8A\x96",
+ "\xF1\xEE" => "\xE5\x8B\xB7",
+ "\xF1\xEF" => "\xE5\x8E\xB4",
+ "\xF1\xF0" => "\xE5\x9A\xAB",
+ "\xF1\xF1" => "\xE5\x9A\xAD",
+ "\xF1\xF2" => "\xE5\x9A\xA6",
+ "\xF1\xF3" => "\xE5\x9A\xA7",
+ "\xF1\xF4" => "\xE5\x9A\xAA",
+ "\xF1\xF5" => "\xE5\x9A\xAC",
+ "\xF1\xF6" => "\xE5\xA3\x9A",
+ "\xF1\xF7" => "\xE5\xA3\x9D",
+ "\xF1\xF8" => "\xE5\xA3\x9B",
+ "\xF1\xF9" => "\xE5\xA4\x92",
+ "\xF1\xFA" => "\xE5\xAC\xBD",
+ "\xF1\xFB" => "\xE5\xAC\xBE",
+ "\xF1\xFC" => "\xE5\xAC\xBF",
+ "\xF1\xFD" => "\xE5\xB7\x83",
+ "\xF1\xFE" => "\xE5\xB9\xB0",
+ "\xF2\x40" => "\xE5\xBE\xBF",
+ "\xF2\x41" => "\xE6\x87\xBB",
+ "\xF2\x42" => "\xE6\x94\x87",
+ "\xF2\x43" => "\xE6\x94\x90",
+ "\xF2\x44" => "\xE6\x94\x8D",
+ "\xF2\x45" => "\xE6\x94\x89",
+ "\xF2\x46" => "\xE6\x94\x8C",
+ "\xF2\x47" => "\xE6\x94\x8E",
+ "\xF2\x48" => "\xE6\x96\x84",
+ "\xF2\x49" => "\xE6\x97\x9E",
+ "\xF2\x4A" => "\xE6\x97\x9D",
+ "\xF2\x4B" => "\xE6\x9B\x9E",
+ "\xF2\x4C" => "\xE6\xAB\xA7",
+ "\xF2\x4D" => "\xE6\xAB\xA0",
+ "\xF2\x4E" => "\xE6\xAB\x8C",
+ "\xF2\x4F" => "\xE6\xAB\x91",
+ "\xF2\x50" => "\xE6\xAB\x99",
+ "\xF2\x51" => "\xE6\xAB\x8B",
+ "\xF2\x52" => "\xE6\xAB\x9F",
+ "\xF2\x53" => "\xE6\xAB\x9C",
+ "\xF2\x54" => "\xE6\xAB\x90",
+ "\xF2\x55" => "\xE6\xAB\xAB",
+ "\xF2\x56" => "\xE6\xAB\x8F",
+ "\xF2\x57" => "\xE6\xAB\x8D",
+ "\xF2\x58" => "\xE6\xAB\x9E",
+ "\xF2\x59" => "\xE6\xAD\xA0",
+ "\xF2\x5A" => "\xE6\xAE\xB0",
+ "\xF2\x5B" => "\xE6\xB0\x8C",
+ "\xF2\x5C" => "\xE7\x80\x99",
+ "\xF2\x5D" => "\xE7\x80\xA7",
+ "\xF2\x5E" => "\xE7\x80\xA0",
+ "\xF2\x5F" => "\xE7\x80\x96",
+ "\xF2\x60" => "\xE7\x80\xAB",
+ "\xF2\x61" => "\xE7\x80\xA1",
+ "\xF2\x62" => "\xE7\x80\xA2",
+ "\xF2\x63" => "\xE7\x80\xA3",
+ "\xF2\x64" => "\xE7\x80\xA9",
+ "\xF2\x65" => "\xE7\x80\x97",
+ "\xF2\x66" => "\xE7\x80\xA4",
+ "\xF2\x67" => "\xE7\x80\x9C",
+ "\xF2\x68" => "\xE7\x80\xAA",
+ "\xF2\x69" => "\xE7\x88\x8C",
+ "\xF2\x6A" => "\xE7\x88\x8A",
+ "\xF2\x6B" => "\xE7\x88\x87",
+ "\xF2\x6C" => "\xE7\x88\x82",
+ "\xF2\x6D" => "\xE7\x88\x85",
+ "\xF2\x6E" => "\xE7\x8A\xA5",
+ "\xF2\x6F" => "\xE7\x8A\xA6",
+ "\xF2\x70" => "\xE7\x8A\xA4",
+ "\xF2\x71" => "\xE7\x8A\xA3",
+ "\xF2\x72" => "\xE7\x8A\xA1",
+ "\xF2\x73" => "\xE7\x93\x8B",
+ "\xF2\x74" => "\xE7\x93\x85",
+ "\xF2\x75" => "\xE7\x92\xB7",
+ "\xF2\x76" => "\xE7\x93\x83",
+ "\xF2\x77" => "\xE7\x94\x96",
+ "\xF2\x78" => "\xE7\x99\xA0",
+ "\xF2\x79" => "\xE7\x9F\x89",
+ "\xF2\x7A" => "\xE7\x9F\x8A",
+ "\xF2\x7B" => "\xE7\x9F\x84",
+ "\xF2\x7C" => "\xE7\x9F\xB1",
+ "\xF2\x7D" => "\xE7\xA4\x9D",
+ "\xF2\x7E" => "\xE7\xA4\x9B",
+ "\xF2\xA1" => "\xE7\xA4\xA1",
+ "\xF2\xA2" => "\xE7\xA4\x9C",
+ "\xF2\xA3" => "\xE7\xA4\x97",
+ "\xF2\xA4" => "\xE7\xA4\x9E",
+ "\xF2\xA5" => "\xE7\xA6\xB0",
+ "\xF2\xA6" => "\xE7\xA9\xA7",
+ "\xF2\xA7" => "\xE7\xA9\xA8",
+ "\xF2\xA8" => "\xE7\xB0\xB3",
+ "\xF2\xA9" => "\xE7\xB0\xBC",
+ "\xF2\xAA" => "\xE7\xB0\xB9",
+ "\xF2\xAB" => "\xE7\xB0\xAC",
+ "\xF2\xAC" => "\xE7\xB0\xBB",
+ "\xF2\xAD" => "\xE7\xB3\xAC",
+ "\xF2\xAE" => "\xE7\xB3\xAA",
+ "\xF2\xAF" => "\xE7\xB9\xB6",
+ "\xF2\xB0" => "\xE7\xB9\xB5",
+ "\xF2\xB1" => "\xE7\xB9\xB8",
+ "\xF2\xB2" => "\xE7\xB9\xB0",
+ "\xF2\xB3" => "\xE7\xB9\xB7",
+ "\xF2\xB4" => "\xE7\xB9\xAF",
+ "\xF2\xB5" => "\xE7\xB9\xBA",
+ "\xF2\xB6" => "\xE7\xB9\xB2",
+ "\xF2\xB7" => "\xE7\xB9\xB4",
+ "\xF2\xB8" => "\xE7\xB9\xA8",
+ "\xF2\xB9" => "\xE7\xBD\x8B",
+ "\xF2\xBA" => "\xE7\xBD\x8A",
+ "\xF2\xBB" => "\xE7\xBE\x83",
+ "\xF2\xBC" => "\xE7\xBE\x86",
+ "\xF2\xBD" => "\xE7\xBE\xB7",
+ "\xF2\xBE" => "\xE7\xBF\xBD",
+ "\xF2\xBF" => "\xE7\xBF\xBE",
+ "\xF2\xC0" => "\xE8\x81\xB8",
+ "\xF2\xC1" => "\xE8\x87\x97",
+ "\xF2\xC2" => "\xE8\x87\x95",
+ "\xF2\xC3" => "\xE8\x89\xA4",
+ "\xF2\xC4" => "\xE8\x89\xA1",
+ "\xF2\xC5" => "\xE8\x89\xA3",
+ "\xF2\xC6" => "\xE8\x97\xAB",
+ "\xF2\xC7" => "\xE8\x97\xB1",
+ "\xF2\xC8" => "\xE8\x97\xAD",
+ "\xF2\xC9" => "\xE8\x97\x99",
+ "\xF2\xCA" => "\xE8\x97\xA1",
+ "\xF2\xCB" => "\xE8\x97\xA8",
+ "\xF2\xCC" => "\xE8\x97\x9A",
+ "\xF2\xCD" => "\xE8\x97\x97",
+ "\xF2\xCE" => "\xE8\x97\xAC",
+ "\xF2\xCF" => "\xE8\x97\xB2",
+ "\xF2\xD0" => "\xE8\x97\xB8",
+ "\xF2\xD1" => "\xE8\x97\x98",
+ "\xF2\xD2" => "\xE8\x97\x9F",
+ "\xF2\xD3" => "\xE8\x97\xA3",
+ "\xF2\xD4" => "\xE8\x97\x9C",
+ "\xF2\xD5" => "\xE8\x97\x91",
+ "\xF2\xD6" => "\xE8\x97\xB0",
+ "\xF2\xD7" => "\xE8\x97\xA6",
+ "\xF2\xD8" => "\xE8\x97\xAF",
+ "\xF2\xD9" => "\xE8\x97\x9E",
+ "\xF2\xDA" => "\xE8\x97\xA2",
+ "\xF2\xDB" => "\xE8\xA0\x80",
+ "\xF2\xDC" => "\xE8\x9F\xBA",
+ "\xF2\xDD" => "\xE8\xA0\x83",
+ "\xF2\xDE" => "\xE8\x9F\xB6",
+ "\xF2\xDF" => "\xE8\x9F\xB7",
+ "\xF2\xE0" => "\xE8\xA0\x89",
+ "\xF2\xE1" => "\xE8\xA0\x8C",
+ "\xF2\xE2" => "\xE8\xA0\x8B",
+ "\xF2\xE3" => "\xE8\xA0\x86",
+ "\xF2\xE4" => "\xE8\x9F\xBC",
+ "\xF2\xE5" => "\xE8\xA0\x88",
+ "\xF2\xE6" => "\xE8\x9F\xBF",
+ "\xF2\xE7" => "\xE8\xA0\x8A",
+ "\xF2\xE8" => "\xE8\xA0\x82",
+ "\xF2\xE9" => "\xE8\xA5\xA2",
+ "\xF2\xEA" => "\xE8\xA5\x9A",
+ "\xF2\xEB" => "\xE8\xA5\x9B",
+ "\xF2\xEC" => "\xE8\xA5\x97",
+ "\xF2\xED" => "\xE8\xA5\xA1",
+ "\xF2\xEE" => "\xE8\xA5\x9C",
+ "\xF2\xEF" => "\xE8\xA5\x98",
+ "\xF2\xF0" => "\xE8\xA5\x9D",
+ "\xF2\xF1" => "\xE8\xA5\x99",
+ "\xF2\xF2" => "\xE8\xA6\x88",
+ "\xF2\xF3" => "\xE8\xA6\xB7",
+ "\xF2\xF4" => "\xE8\xA6\xB6",
+ "\xF2\xF5" => "\xE8\xA7\xB6",
+ "\xF2\xF6" => "\xE8\xAD\x90",
+ "\xF2\xF7" => "\xE8\xAD\x88",
+ "\xF2\xF8" => "\xE8\xAD\x8A",
+ "\xF2\xF9" => "\xE8\xAD\x80",
+ "\xF2\xFA" => "\xE8\xAD\x93",
+ "\xF2\xFB" => "\xE8\xAD\x96",
+ "\xF2\xFC" => "\xE8\xAD\x94",
+ "\xF2\xFD" => "\xE8\xAD\x8B",
+ "\xF2\xFE" => "\xE8\xAD\x95",
+ "\xF3\x40" => "\xE8\xAD\x91",
+ "\xF3\x41" => "\xE8\xAD\x82",
+ "\xF3\x42" => "\xE8\xAD\x92",
+ "\xF3\x43" => "\xE8\xAD\x97",
+ "\xF3\x44" => "\xE8\xB1\x83",
+ "\xF3\x45" => "\xE8\xB1\xB7",
+ "\xF3\x46" => "\xE8\xB1\xB6",
+ "\xF3\x47" => "\xE8\xB2\x9A",
+ "\xF3\x48" => "\xE8\xB4\x86",
+ "\xF3\x49" => "\xE8\xB4\x87",
+ "\xF3\x4A" => "\xE8\xB4\x89",
+ "\xF3\x4B" => "\xE8\xB6\xAC",
+ "\xF3\x4C" => "\xE8\xB6\xAA",
+ "\xF3\x4D" => "\xE8\xB6\xAD",
+ "\xF3\x4E" => "\xE8\xB6\xAB",
+ "\xF3\x4F" => "\xE8\xB9\xAD",
+ "\xF3\x50" => "\xE8\xB9\xB8",
+ "\xF3\x51" => "\xE8\xB9\xB3",
+ "\xF3\x52" => "\xE8\xB9\xAA",
+ "\xF3\x53" => "\xE8\xB9\xAF",
+ "\xF3\x54" => "\xE8\xB9\xBB",
+ "\xF3\x55" => "\xE8\xBB\x82",
+ "\xF3\x56" => "\xE8\xBD\x92",
+ "\xF3\x57" => "\xE8\xBD\x91",
+ "\xF3\x58" => "\xE8\xBD\x8F",
+ "\xF3\x59" => "\xE8\xBD\x90",
+ "\xF3\x5A" => "\xE8\xBD\x93",
+ "\xF3\x5B" => "\xE8\xBE\xB4",
+ "\xF3\x5C" => "\xE9\x85\x80",
+ "\xF3\x5D" => "\xE9\x84\xBF",
+ "\xF3\x5E" => "\xE9\x86\xB0",
+ "\xF3\x5F" => "\xE9\x86\xAD",
+ "\xF3\x60" => "\xE9\x8F\x9E",
+ "\xF3\x61" => "\xE9\x8F\x87",
+ "\xF3\x62" => "\xE9\x8F\x8F",
+ "\xF3\x63" => "\xE9\x8F\x82",
+ "\xF3\x64" => "\xE9\x8F\x9A",
+ "\xF3\x65" => "\xE9\x8F\x90",
+ "\xF3\x66" => "\xE9\x8F\xB9",
+ "\xF3\x67" => "\xE9\x8F\xAC",
+ "\xF3\x68" => "\xE9\x8F\x8C",
+ "\xF3\x69" => "\xE9\x8F\x99",
+ "\xF3\x6A" => "\xE9\x8E\xA9",
+ "\xF3\x6B" => "\xE9\x8F\xA6",
+ "\xF3\x6C" => "\xE9\x8F\x8A",
+ "\xF3\x6D" => "\xE9\x8F\x94",
+ "\xF3\x6E" => "\xE9\x8F\xAE",
+ "\xF3\x6F" => "\xE9\x8F\xA3",
+ "\xF3\x70" => "\xE9\x8F\x95",
+ "\xF3\x71" => "\xE9\x8F\x84",
+ "\xF3\x72" => "\xE9\x8F\x8E",
+ "\xF3\x73" => "\xE9\x8F\x80",
+ "\xF3\x74" => "\xE9\x8F\x92",
+ "\xF3\x75" => "\xE9\x8F\xA7",
+ "\xF3\x76" => "\xE9\x95\xBD",
+ "\xF3\x77" => "\xE9\x97\x9A",
+ "\xF3\x78" => "\xE9\x97\x9B",
+ "\xF3\x79" => "\xE9\x9B\xA1",
+ "\xF3\x7A" => "\xE9\x9C\xA9",
+ "\xF3\x7B" => "\xE9\x9C\xAB",
+ "\xF3\x7C" => "\xE9\x9C\xAC",
+ "\xF3\x7D" => "\xE9\x9C\xA8",
+ "\xF3\x7E" => "\xE9\x9C\xA6",
+ "\xF3\xA1" => "\xE9\x9E\xB3",
+ "\xF3\xA2" => "\xE9\x9E\xB7",
+ "\xF3\xA3" => "\xE9\x9E\xB6",
+ "\xF3\xA4" => "\xE9\x9F\x9D",
+ "\xF3\xA5" => "\xE9\x9F\x9E",
+ "\xF3\xA6" => "\xE9\x9F\x9F",
+ "\xF3\xA7" => "\xE9\xA1\x9C",
+ "\xF3\xA8" => "\xE9\xA1\x99",
+ "\xF3\xA9" => "\xE9\xA1\x9D",
+ "\xF3\xAA" => "\xE9\xA1\x97",
+ "\xF3\xAB" => "\xE9\xA2\xBF",
+ "\xF3\xAC" => "\xE9\xA2\xBD",
+ "\xF3\xAD" => "\xE9\xA2\xBB",
+ "\xF3\xAE" => "\xE9\xA2\xBE",
+ "\xF3\xAF" => "\xE9\xA5\x88",
+ "\xF3\xB0" => "\xE9\xA5\x87",
+ "\xF3\xB1" => "\xE9\xA5\x83",
+ "\xF3\xB2" => "\xE9\xA6\xA6",
+ "\xF3\xB3" => "\xE9\xA6\xA7",
+ "\xF3\xB4" => "\xE9\xA8\x9A",
+ "\xF3\xB5" => "\xE9\xA8\x95",
+ "\xF3\xB6" => "\xE9\xA8\xA5",
+ "\xF3\xB7" => "\xE9\xA8\x9D",
+ "\xF3\xB8" => "\xE9\xA8\xA4",
+ "\xF3\xB9" => "\xE9\xA8\x9B",
+ "\xF3\xBA" => "\xE9\xA8\xA2",
+ "\xF3\xBB" => "\xE9\xA8\xA0",
+ "\xF3\xBC" => "\xE9\xA8\xA7",
+ "\xF3\xBD" => "\xE9\xA8\xA3",
+ "\xF3\xBE" => "\xE9\xA8\x9E",
+ "\xF3\xBF" => "\xE9\xA8\x9C",
+ "\xF3\xC0" => "\xE9\xA8\x94",
+ "\xF3\xC1" => "\xE9\xAB\x82",
+ "\xF3\xC2" => "\xE9\xAC\x8B",
+ "\xF3\xC3" => "\xE9\xAC\x8A",
+ "\xF3\xC4" => "\xE9\xAC\x8E",
+ "\xF3\xC5" => "\xE9\xAC\x8C",
+ "\xF3\xC6" => "\xE9\xAC\xB7",
+ "\xF3\xC7" => "\xE9\xAF\xAA",
+ "\xF3\xC8" => "\xE9\xAF\xAB",
+ "\xF3\xC9" => "\xE9\xAF\xA0",
+ "\xF3\xCA" => "\xE9\xAF\x9E",
+ "\xF3\xCB" => "\xE9\xAF\xA4",
+ "\xF3\xCC" => "\xE9\xAF\xA6",
+ "\xF3\xCD" => "\xE9\xAF\xA2",
+ "\xF3\xCE" => "\xE9\xAF\xB0",
+ "\xF3\xCF" => "\xE9\xAF\x94",
+ "\xF3\xD0" => "\xE9\xAF\x97",
+ "\xF3\xD1" => "\xE9\xAF\xAC",
+ "\xF3\xD2" => "\xE9\xAF\x9C",
+ "\xF3\xD3" => "\xE9\xAF\x99",
+ "\xF3\xD4" => "\xE9\xAF\xA5",
+ "\xF3\xD5" => "\xE9\xAF\x95",
+ "\xF3\xD6" => "\xE9\xAF\xA1",
+ "\xF3\xD7" => "\xE9\xAF\x9A",
+ "\xF3\xD8" => "\xE9\xB5\xB7",
+ "\xF3\xD9" => "\xE9\xB6\x81",
+ "\xF3\xDA" => "\xE9\xB6\x8A",
+ "\xF3\xDB" => "\xE9\xB6\x84",
+ "\xF3\xDC" => "\xE9\xB6\x88",
+ "\xF3\xDD" => "\xE9\xB5\xB1",
+ "\xF3\xDE" => "\xE9\xB6\x80",
+ "\xF3\xDF" => "\xE9\xB5\xB8",
+ "\xF3\xE0" => "\xE9\xB6\x86",
+ "\xF3\xE1" => "\xE9\xB6\x8B",
+ "\xF3\xE2" => "\xE9\xB6\x8C",
+ "\xF3\xE3" => "\xE9\xB5\xBD",
+ "\xF3\xE4" => "\xE9\xB5\xAB",
+ "\xF3\xE5" => "\xE9\xB5\xB4",
+ "\xF3\xE6" => "\xE9\xB5\xB5",
+ "\xF3\xE7" => "\xE9\xB5\xB0",
+ "\xF3\xE8" => "\xE9\xB5\xA9",
+ "\xF3\xE9" => "\xE9\xB6\x85",
+ "\xF3\xEA" => "\xE9\xB5\xB3",
+ "\xF3\xEB" => "\xE9\xB5\xBB",
+ "\xF3\xEC" => "\xE9\xB6\x82",
+ "\xF3\xED" => "\xE9\xB5\xAF",
+ "\xF3\xEE" => "\xE9\xB5\xB9",
+ "\xF3\xEF" => "\xE9\xB5\xBF",
+ "\xF3\xF0" => "\xE9\xB6\x87",
+ "\xF3\xF1" => "\xE9\xB5\xA8",
+ "\xF3\xF2" => "\xE9\xBA\x94",
+ "\xF3\xF3" => "\xE9\xBA\x91",
+ "\xF3\xF4" => "\xE9\xBB\x80",
+ "\xF3\xF5" => "\xE9\xBB\xBC",
+ "\xF3\xF6" => "\xE9\xBC\xAD",
+ "\xF3\xF7" => "\xE9\xBD\x80",
+ "\xF3\xF8" => "\xE9\xBD\x81",
+ "\xF3\xF9" => "\xE9\xBD\x8D",
+ "\xF3\xFA" => "\xE9\xBD\x96",
+ "\xF3\xFB" => "\xE9\xBD\x97",
+ "\xF3\xFC" => "\xE9\xBD\x98",
+ "\xF3\xFD" => "\xE5\x8C\xB7",
+ "\xF3\xFE" => "\xE5\x9A\xB2",
+ "\xF4\x40" => "\xE5\x9A\xB5",
+ "\xF4\x41" => "\xE5\x9A\xB3",
+ "\xF4\x42" => "\xE5\xA3\xA3",
+ "\xF4\x43" => "\xE5\xAD\x85",
+ "\xF4\x44" => "\xE5\xB7\x86",
+ "\xF4\x45" => "\xE5\xB7\x87",
+ "\xF4\x46" => "\xE5\xBB\xAE",
+ "\xF4\x47" => "\xE5\xBB\xAF",
+ "\xF4\x48" => "\xE5\xBF\x80",
+ "\xF4\x49" => "\xE5\xBF\x81",
+ "\xF4\x4A" => "\xE6\x87\xB9",
+ "\xF4\x4B" => "\xE6\x94\x97",
+ "\xF4\x4C" => "\xE6\x94\x96",
+ "\xF4\x4D" => "\xE6\x94\x95",
+ "\xF4\x4E" => "\xE6\x94\x93",
+ "\xF4\x4F" => "\xE6\x97\x9F",
+ "\xF4\x50" => "\xE6\x9B\xA8",
+ "\xF4\x51" => "\xE6\x9B\xA3",
+ "\xF4\x52" => "\xE6\x9B\xA4",
+ "\xF4\x53" => "\xE6\xAB\xB3",
+ "\xF4\x54" => "\xE6\xAB\xB0",
+ "\xF4\x55" => "\xE6\xAB\xAA",
+ "\xF4\x56" => "\xE6\xAB\xA8",
+ "\xF4\x57" => "\xE6\xAB\xB9",
+ "\xF4\x58" => "\xE6\xAB\xB1",
+ "\xF4\x59" => "\xE6\xAB\xAE",
+ "\xF4\x5A" => "\xE6\xAB\xAF",
+ "\xF4\x5B" => "\xE7\x80\xBC",
+ "\xF4\x5C" => "\xE7\x80\xB5",
+ "\xF4\x5D" => "\xE7\x80\xAF",
+ "\xF4\x5E" => "\xE7\x80\xB7",
+ "\xF4\x5F" => "\xE7\x80\xB4",
+ "\xF4\x60" => "\xE7\x80\xB1",
+ "\xF4\x61" => "\xE7\x81\x82",
+ "\xF4\x62" => "\xE7\x80\xB8",
+ "\xF4\x63" => "\xE7\x80\xBF",
+ "\xF4\x64" => "\xE7\x80\xBA",
+ "\xF4\x65" => "\xE7\x80\xB9",
+ "\xF4\x66" => "\xE7\x81\x80",
+ "\xF4\x67" => "\xE7\x80\xBB",
+ "\xF4\x68" => "\xE7\x80\xB3",
+ "\xF4\x69" => "\xE7\x81\x81",
+ "\xF4\x6A" => "\xE7\x88\x93",
+ "\xF4\x6B" => "\xE7\x88\x94",
+ "\xF4\x6C" => "\xE7\x8A\xA8",
+ "\xF4\x6D" => "\xE7\x8D\xBD",
+ "\xF4\x6E" => "\xE7\x8D\xBC",
+ "\xF4\x6F" => "\xE7\x92\xBA",
+ "\xF4\x70" => "\xE7\x9A\xAB",
+ "\xF4\x71" => "\xE7\x9A\xAA",
+ "\xF4\x72" => "\xE7\x9A\xBE",
+ "\xF4\x73" => "\xE7\x9B\xAD",
+ "\xF4\x74" => "\xE7\x9F\x8C",
+ "\xF4\x75" => "\xE7\x9F\x8E",
+ "\xF4\x76" => "\xE7\x9F\x8F",
+ "\xF4\x77" => "\xE7\x9F\x8D",
+ "\xF4\x78" => "\xE7\x9F\xB2",
+ "\xF4\x79" => "\xE7\xA4\xA5",
+ "\xF4\x7A" => "\xE7\xA4\xA3",
+ "\xF4\x7B" => "\xE7\xA4\xA7",
+ "\xF4\x7C" => "\xE7\xA4\xA8",
+ "\xF4\x7D" => "\xE7\xA4\xA4",
+ "\xF4\x7E" => "\xE7\xA4\xA9",
+ "\xF4\xA1" => "\xE7\xA6\xB2",
+ "\xF4\xA2" => "\xE7\xA9\xAE",
+ "\xF4\xA3" => "\xE7\xA9\xAC",
+ "\xF4\xA4" => "\xE7\xA9\xAD",
+ "\xF4\xA5" => "\xE7\xAB\xB7",
+ "\xF4\xA6" => "\xE7\xB1\x89",
+ "\xF4\xA7" => "\xE7\xB1\x88",
+ "\xF4\xA8" => "\xE7\xB1\x8A",
+ "\xF4\xA9" => "\xE7\xB1\x87",
+ "\xF4\xAA" => "\xE7\xB1\x85",
+ "\xF4\xAB" => "\xE7\xB3\xAE",
+ "\xF4\xAC" => "\xE7\xB9\xBB",
+ "\xF4\xAD" => "\xE7\xB9\xBE",
+ "\xF4\xAE" => "\xE7\xBA\x81",
+ "\xF4\xAF" => "\xE7\xBA\x80",
+ "\xF4\xB0" => "\xE7\xBE\xBA",
+ "\xF4\xB1" => "\xE7\xBF\xBF",
+ "\xF4\xB2" => "\xE8\x81\xB9",
+ "\xF4\xB3" => "\xE8\x87\x9B",
+ "\xF4\xB4" => "\xE8\x87\x99",
+ "\xF4\xB5" => "\xE8\x88\x8B",
+ "\xF4\xB6" => "\xE8\x89\xA8",
+ "\xF4\xB7" => "\xE8\x89\xA9",
+ "\xF4\xB8" => "\xE8\x98\xA2",
+ "\xF4\xB9" => "\xE8\x97\xBF",
+ "\xF4\xBA" => "\xE8\x98\x81",
+ "\xF4\xBB" => "\xE8\x97\xBE",
+ "\xF4\xBC" => "\xE8\x98\x9B",
+ "\xF4\xBD" => "\xE8\x98\x80",
+ "\xF4\xBE" => "\xE8\x97\xB6",
+ "\xF4\xBF" => "\xE8\x98\x84",
+ "\xF4\xC0" => "\xE8\x98\x89",
+ "\xF4\xC1" => "\xE8\x98\x85",
+ "\xF4\xC2" => "\xE8\x98\x8C",
+ "\xF4\xC3" => "\xE8\x97\xBD",
+ "\xF4\xC4" => "\xE8\xA0\x99",
+ "\xF4\xC5" => "\xE8\xA0\x90",
+ "\xF4\xC6" => "\xE8\xA0\x91",
+ "\xF4\xC7" => "\xE8\xA0\x97",
+ "\xF4\xC8" => "\xE8\xA0\x93",
+ "\xF4\xC9" => "\xE8\xA0\x96",
+ "\xF4\xCA" => "\xE8\xA5\xA3",
+ "\xF4\xCB" => "\xE8\xA5\xA6",
+ "\xF4\xCC" => "\xE8\xA6\xB9",
+ "\xF4\xCD" => "\xE8\xA7\xB7",
+ "\xF4\xCE" => "\xE8\xAD\xA0",
+ "\xF4\xCF" => "\xE8\xAD\xAA",
+ "\xF4\xD0" => "\xE8\xAD\x9D",
+ "\xF4\xD1" => "\xE8\xAD\xA8",
+ "\xF4\xD2" => "\xE8\xAD\xA3",
+ "\xF4\xD3" => "\xE8\xAD\xA5",
+ "\xF4\xD4" => "\xE8\xAD\xA7",
+ "\xF4\xD5" => "\xE8\xAD\xAD",
+ "\xF4\xD6" => "\xE8\xB6\xAE",
+ "\xF4\xD7" => "\xE8\xBA\x86",
+ "\xF4\xD8" => "\xE8\xBA\x88",
+ "\xF4\xD9" => "\xE8\xBA\x84",
+ "\xF4\xDA" => "\xE8\xBD\x99",
+ "\xF4\xDB" => "\xE8\xBD\x96",
+ "\xF4\xDC" => "\xE8\xBD\x97",
+ "\xF4\xDD" => "\xE8\xBD\x95",
+ "\xF4\xDE" => "\xE8\xBD\x98",
+ "\xF4\xDF" => "\xE8\xBD\x9A",
+ "\xF4\xE0" => "\xE9\x82\x8D",
+ "\xF4\xE1" => "\xE9\x85\x83",
+ "\xF4\xE2" => "\xE9\x85\x81",
+ "\xF4\xE3" => "\xE9\x86\xB7",
+ "\xF4\xE4" => "\xE9\x86\xB5",
+ "\xF4\xE5" => "\xE9\x86\xB2",
+ "\xF4\xE6" => "\xE9\x86\xB3",
+ "\xF4\xE7" => "\xE9\x90\x8B",
+ "\xF4\xE8" => "\xE9\x90\x93",
+ "\xF4\xE9" => "\xE9\x8F\xBB",
+ "\xF4\xEA" => "\xE9\x90\xA0",
+ "\xF4\xEB" => "\xE9\x90\x8F",
+ "\xF4\xEC" => "\xE9\x90\x94",
+ "\xF4\xED" => "\xE9\x8F\xBE",
+ "\xF4\xEE" => "\xE9\x90\x95",
+ "\xF4\xEF" => "\xE9\x90\x90",
+ "\xF4\xF0" => "\xE9\x90\xA8",
+ "\xF4\xF1" => "\xE9\x90\x99",
+ "\xF4\xF2" => "\xE9\x90\x8D",
+ "\xF4\xF3" => "\xE9\x8F\xB5",
+ "\xF4\xF4" => "\xE9\x90\x80",
+ "\xF4\xF5" => "\xE9\x8F\xB7",
+ "\xF4\xF6" => "\xE9\x90\x87",
+ "\xF4\xF7" => "\xE9\x90\x8E",
+ "\xF4\xF8" => "\xE9\x90\x96",
+ "\xF4\xF9" => "\xE9\x90\x92",
+ "\xF4\xFA" => "\xE9\x8F\xBA",
+ "\xF4\xFB" => "\xE9\x90\x89",
+ "\xF4\xFC" => "\xE9\x8F\xB8",
+ "\xF4\xFD" => "\xE9\x90\x8A",
+ "\xF4\xFE" => "\xE9\x8F\xBF",
+ "\xF5\x40" => "\xE9\x8F\xBC",
+ "\xF5\x41" => "\xE9\x90\x8C",
+ "\xF5\x42" => "\xE9\x8F\xB6",
+ "\xF5\x43" => "\xE9\x90\x91",
+ "\xF5\x44" => "\xE9\x90\x86",
+ "\xF5\x45" => "\xE9\x97\x9E",
+ "\xF5\x46" => "\xE9\x97\xA0",
+ "\xF5\x47" => "\xE9\x97\x9F",
+ "\xF5\x48" => "\xE9\x9C\xAE",
+ "\xF5\x49" => "\xE9\x9C\xAF",
+ "\xF5\x4A" => "\xE9\x9E\xB9",
+ "\xF5\x4B" => "\xE9\x9E\xBB",
+ "\xF5\x4C" => "\xE9\x9F\xBD",
+ "\xF5\x4D" => "\xE9\x9F\xBE",
+ "\xF5\x4E" => "\xE9\xA1\xA0",
+ "\xF5\x4F" => "\xE9\xA1\xA2",
+ "\xF5\x50" => "\xE9\xA1\xA3",
+ "\xF5\x51" => "\xE9\xA1\x9F",
+ "\xF5\x52" => "\xE9\xA3\x81",
+ "\xF5\x53" => "\xE9\xA3\x82",
+ "\xF5\x54" => "\xE9\xA5\x90",
+ "\xF5\x55" => "\xE9\xA5\x8E",
+ "\xF5\x56" => "\xE9\xA5\x99",
+ "\xF5\x57" => "\xE9\xA5\x8C",
+ "\xF5\x58" => "\xE9\xA5\x8B",
+ "\xF5\x59" => "\xE9\xA5\x93",
+ "\xF5\x5A" => "\xE9\xA8\xB2",
+ "\xF5\x5B" => "\xE9\xA8\xB4",
+ "\xF5\x5C" => "\xE9\xA8\xB1",
+ "\xF5\x5D" => "\xE9\xA8\xAC",
+ "\xF5\x5E" => "\xE9\xA8\xAA",
+ "\xF5\x5F" => "\xE9\xA8\xB6",
+ "\xF5\x60" => "\xE9\xA8\xA9",
+ "\xF5\x61" => "\xE9\xA8\xAE",
+ "\xF5\x62" => "\xE9\xA8\xB8",
+ "\xF5\x63" => "\xE9\xA8\xAD",
+ "\xF5\x64" => "\xE9\xAB\x87",
+ "\xF5\x65" => "\xE9\xAB\x8A",
+ "\xF5\x66" => "\xE9\xAB\x86",
+ "\xF5\x67" => "\xE9\xAC\x90",
+ "\xF5\x68" => "\xE9\xAC\x92",
+ "\xF5\x69" => "\xE9\xAC\x91",
+ "\xF5\x6A" => "\xE9\xB0\x8B",
+ "\xF5\x6B" => "\xE9\xB0\x88",
+ "\xF5\x6C" => "\xE9\xAF\xB7",
+ "\xF5\x6D" => "\xE9\xB0\x85",
+ "\xF5\x6E" => "\xE9\xB0\x92",
+ "\xF5\x6F" => "\xE9\xAF\xB8",
+ "\xF5\x70" => "\xE9\xB1\x80",
+ "\xF5\x71" => "\xE9\xB0\x87",
+ "\xF5\x72" => "\xE9\xB0\x8E",
+ "\xF5\x73" => "\xE9\xB0\x86",
+ "\xF5\x74" => "\xE9\xB0\x97",
+ "\xF5\x75" => "\xE9\xB0\x94",
+ "\xF5\x76" => "\xE9\xB0\x89",
+ "\xF5\x77" => "\xE9\xB6\x9F",
+ "\xF5\x78" => "\xE9\xB6\x99",
+ "\xF5\x79" => "\xE9\xB6\xA4",
+ "\xF5\x7A" => "\xE9\xB6\x9D",
+ "\xF5\x7B" => "\xE9\xB6\x92",
+ "\xF5\x7C" => "\xE9\xB6\x98",
+ "\xF5\x7D" => "\xE9\xB6\x90",
+ "\xF5\x7E" => "\xE9\xB6\x9B",
+ "\xF5\xA1" => "\xE9\xB6\xA0",
+ "\xF5\xA2" => "\xE9\xB6\x94",
+ "\xF5\xA3" => "\xE9\xB6\x9C",
+ "\xF5\xA4" => "\xE9\xB6\xAA",
+ "\xF5\xA5" => "\xE9\xB6\x97",
+ "\xF5\xA6" => "\xE9\xB6\xA1",
+ "\xF5\xA7" => "\xE9\xB6\x9A",
+ "\xF5\xA8" => "\xE9\xB6\xA2",
+ "\xF5\xA9" => "\xE9\xB6\xA8",
+ "\xF5\xAA" => "\xE9\xB6\x9E",
+ "\xF5\xAB" => "\xE9\xB6\xA3",
+ "\xF5\xAC" => "\xE9\xB6\xBF",
+ "\xF5\xAD" => "\xE9\xB6\xA9",
+ "\xF5\xAE" => "\xE9\xB6\x96",
+ "\xF5\xAF" => "\xE9\xB6\xA6",
+ "\xF5\xB0" => "\xE9\xB6\xA7",
+ "\xF5\xB1" => "\xE9\xBA\x99",
+ "\xF5\xB2" => "\xE9\xBA\x9B",
+ "\xF5\xB3" => "\xE9\xBA\x9A",
+ "\xF5\xB4" => "\xE9\xBB\xA5",
+ "\xF5\xB5" => "\xE9\xBB\xA4",
+ "\xF5\xB6" => "\xE9\xBB\xA7",
+ "\xF5\xB7" => "\xE9\xBB\xA6",
+ "\xF5\xB8" => "\xE9\xBC\xB0",
+ "\xF5\xB9" => "\xE9\xBC\xAE",
+ "\xF5\xBA" => "\xE9\xBD\x9B",
+ "\xF5\xBB" => "\xE9\xBD\xA0",
+ "\xF5\xBC" => "\xE9\xBD\x9E",
+ "\xF5\xBD" => "\xE9\xBD\x9D",
+ "\xF5\xBE" => "\xE9\xBD\x99",
+ "\xF5\xBF" => "\xE9\xBE\x91",
+ "\xF5\xC0" => "\xE5\x84\xBA",
+ "\xF5\xC1" => "\xE5\x84\xB9",
+ "\xF5\xC2" => "\xE5\x8A\x98",
+ "\xF5\xC3" => "\xE5\x8A\x97",
+ "\xF5\xC4" => "\xE5\x9B\x83",
+ "\xF5\xC5" => "\xE5\x9A\xBD",
+ "\xF5\xC6" => "\xE5\x9A\xBE",
+ "\xF5\xC7" => "\xE5\xAD\x88",
+ "\xF5\xC8" => "\xE5\xAD\x87",
+ "\xF5\xC9" => "\xE5\xB7\x8B",
+ "\xF5\xCA" => "\xE5\xB7\x8F",
+ "\xF5\xCB" => "\xE5\xBB\xB1",
+ "\xF5\xCC" => "\xE6\x87\xBD",
+ "\xF5\xCD" => "\xE6\x94\x9B",
+ "\xF5\xCE" => "\xE6\xAC\x82",
+ "\xF5\xCF" => "\xE6\xAB\xBC",
+ "\xF5\xD0" => "\xE6\xAC\x83",
+ "\xF5\xD1" => "\xE6\xAB\xB8",
+ "\xF5\xD2" => "\xE6\xAC\x80",
+ "\xF5\xD3" => "\xE7\x81\x83",
+ "\xF5\xD4" => "\xE7\x81\x84",
+ "\xF5\xD5" => "\xE7\x81\x8A",
+ "\xF5\xD6" => "\xE7\x81\x88",
+ "\xF5\xD7" => "\xE7\x81\x89",
+ "\xF5\xD8" => "\xE7\x81\x85",
+ "\xF5\xD9" => "\xE7\x81\x86",
+ "\xF5\xDA" => "\xE7\x88\x9D",
+ "\xF5\xDB" => "\xE7\x88\x9A",
+ "\xF5\xDC" => "\xE7\x88\x99",
+ "\xF5\xDD" => "\xE7\x8D\xBE",
+ "\xF5\xDE" => "\xE7\x94\x97",
+ "\xF5\xDF" => "\xE7\x99\xAA",
+ "\xF5\xE0" => "\xE7\x9F\x90",
+ "\xF5\xE1" => "\xE7\xA4\xAD",
+ "\xF5\xE2" => "\xE7\xA4\xB1",
+ "\xF5\xE3" => "\xE7\xA4\xAF",
+ "\xF5\xE4" => "\xE7\xB1\x94",
+ "\xF5\xE5" => "\xE7\xB1\x93",
+ "\xF5\xE6" => "\xE7\xB3\xB2",
+ "\xF5\xE7" => "\xE7\xBA\x8A",
+ "\xF5\xE8" => "\xE7\xBA\x87",
+ "\xF5\xE9" => "\xE7\xBA\x88",
+ "\xF5\xEA" => "\xE7\xBA\x8B",
+ "\xF5\xEB" => "\xE7\xBA\x86",
+ "\xF5\xEC" => "\xE7\xBA\x8D",
+ "\xF5\xED" => "\xE7\xBD\x8D",
+ "\xF5\xEE" => "\xE7\xBE\xBB",
+ "\xF5\xEF" => "\xE8\x80\xB0",
+ "\xF5\xF0" => "\xE8\x87\x9D",
+ "\xF5\xF1" => "\xE8\x98\x98",
+ "\xF5\xF2" => "\xE8\x98\xAA",
+ "\xF5\xF3" => "\xE8\x98\xA6",
+ "\xF5\xF4" => "\xE8\x98\x9F",
+ "\xF5\xF5" => "\xE8\x98\xA3",
+ "\xF5\xF6" => "\xE8\x98\x9C",
+ "\xF5\xF7" => "\xE8\x98\x99",
+ "\xF5\xF8" => "\xE8\x98\xA7",
+ "\xF5\xF9" => "\xE8\x98\xAE",
+ "\xF5\xFA" => "\xE8\x98\xA1",
+ "\xF5\xFB" => "\xE8\x98\xA0",
+ "\xF5\xFC" => "\xE8\x98\xA9",
+ "\xF5\xFD" => "\xE8\x98\x9E",
+ "\xF5\xFE" => "\xE8\x98\xA5",
+ "\xF6\x40" => "\xE8\xA0\xA9",
+ "\xF6\x41" => "\xE8\xA0\x9D",
+ "\xF6\x42" => "\xE8\xA0\x9B",
+ "\xF6\x43" => "\xE8\xA0\xA0",
+ "\xF6\x44" => "\xE8\xA0\xA4",
+ "\xF6\x45" => "\xE8\xA0\x9C",
+ "\xF6\x46" => "\xE8\xA0\xAB",
+ "\xF6\x47" => "\xE8\xA1\x8A",
+ "\xF6\x48" => "\xE8\xA5\xAD",
+ "\xF6\x49" => "\xE8\xA5\xA9",
+ "\xF6\x4A" => "\xE8\xA5\xAE",
+ "\xF6\x4B" => "\xE8\xA5\xAB",
+ "\xF6\x4C" => "\xE8\xA7\xBA",
+ "\xF6\x4D" => "\xE8\xAD\xB9",
+ "\xF6\x4E" => "\xE8\xAD\xB8",
+ "\xF6\x4F" => "\xE8\xAD\x85",
+ "\xF6\x50" => "\xE8\xAD\xBA",
+ "\xF6\x51" => "\xE8\xAD\xBB",
+ "\xF6\x52" => "\xE8\xB4\x90",
+ "\xF6\x53" => "\xE8\xB4\x94",
+ "\xF6\x54" => "\xE8\xB6\xAF",
+ "\xF6\x55" => "\xE8\xBA\x8E",
+ "\xF6\x56" => "\xE8\xBA\x8C",
+ "\xF6\x57" => "\xE8\xBD\x9E",
+ "\xF6\x58" => "\xE8\xBD\x9B",
+ "\xF6\x59" => "\xE8\xBD\x9D",
+ "\xF6\x5A" => "\xE9\x85\x86",
+ "\xF6\x5B" => "\xE9\x85\x84",
+ "\xF6\x5C" => "\xE9\x85\x85",
+ "\xF6\x5D" => "\xE9\x86\xB9",
+ "\xF6\x5E" => "\xE9\x90\xBF",
+ "\xF6\x5F" => "\xE9\x90\xBB",
+ "\xF6\x60" => "\xE9\x90\xB6",
+ "\xF6\x61" => "\xE9\x90\xA9",
+ "\xF6\x62" => "\xE9\x90\xBD",
+ "\xF6\x63" => "\xE9\x90\xBC",
+ "\xF6\x64" => "\xE9\x90\xB0",
+ "\xF6\x65" => "\xE9\x90\xB9",
+ "\xF6\x66" => "\xE9\x90\xAA",
+ "\xF6\x67" => "\xE9\x90\xB7",
+ "\xF6\x68" => "\xE9\x90\xAC",
+ "\xF6\x69" => "\xE9\x91\x80",
+ "\xF6\x6A" => "\xE9\x90\xB1",
+ "\xF6\x6B" => "\xE9\x97\xA5",
+ "\xF6\x6C" => "\xE9\x97\xA4",
+ "\xF6\x6D" => "\xE9\x97\xA3",
+ "\xF6\x6E" => "\xE9\x9C\xB5",
+ "\xF6\x6F" => "\xE9\x9C\xBA",
+ "\xF6\x70" => "\xE9\x9E\xBF",
+ "\xF6\x71" => "\xE9\x9F\xA1",
+ "\xF6\x72" => "\xE9\xA1\xA4",
+ "\xF6\x73" => "\xE9\xA3\x89",
+ "\xF6\x74" => "\xE9\xA3\x86",
+ "\xF6\x75" => "\xE9\xA3\x80",
+ "\xF6\x76" => "\xE9\xA5\x98",
+ "\xF6\x77" => "\xE9\xA5\x96",
+ "\xF6\x78" => "\xE9\xA8\xB9",
+ "\xF6\x79" => "\xE9\xA8\xBD",
+ "\xF6\x7A" => "\xE9\xA9\x86",
+ "\xF6\x7B" => "\xE9\xA9\x84",
+ "\xF6\x7C" => "\xE9\xA9\x82",
+ "\xF6\x7D" => "\xE9\xA9\x81",
+ "\xF6\x7E" => "\xE9\xA8\xBA",
+ "\xF6\xA1" => "\xE9\xA8\xBF",
+ "\xF6\xA2" => "\xE9\xAB\x8D",
+ "\xF6\xA3" => "\xE9\xAC\x95",
+ "\xF6\xA4" => "\xE9\xAC\x97",
+ "\xF6\xA5" => "\xE9\xAC\x98",
+ "\xF6\xA6" => "\xE9\xAC\x96",
+ "\xF6\xA7" => "\xE9\xAC\xBA",
+ "\xF6\xA8" => "\xE9\xAD\x92",
+ "\xF6\xA9" => "\xE9\xB0\xAB",
+ "\xF6\xAA" => "\xE9\xB0\x9D",
+ "\xF6\xAB" => "\xE9\xB0\x9C",
+ "\xF6\xAC" => "\xE9\xB0\xAC",
+ "\xF6\xAD" => "\xE9\xB0\xA3",
+ "\xF6\xAE" => "\xE9\xB0\xA8",
+ "\xF6\xAF" => "\xE9\xB0\xA9",
+ "\xF6\xB0" => "\xE9\xB0\xA4",
+ "\xF6\xB1" => "\xE9\xB0\xA1",
+ "\xF6\xB2" => "\xE9\xB6\xB7",
+ "\xF6\xB3" => "\xE9\xB6\xB6",
+ "\xF6\xB4" => "\xE9\xB6\xBC",
+ "\xF6\xB5" => "\xE9\xB7\x81",
+ "\xF6\xB6" => "\xE9\xB7\x87",
+ "\xF6\xB7" => "\xE9\xB7\x8A",
+ "\xF6\xB8" => "\xE9\xB7\x8F",
+ "\xF6\xB9" => "\xE9\xB6\xBE",
+ "\xF6\xBA" => "\xE9\xB7\x85",
+ "\xF6\xBB" => "\xE9\xB7\x83",
+ "\xF6\xBC" => "\xE9\xB6\xBB",
+ "\xF6\xBD" => "\xE9\xB6\xB5",
+ "\xF6\xBE" => "\xE9\xB7\x8E",
+ "\xF6\xBF" => "\xE9\xB6\xB9",
+ "\xF6\xC0" => "\xE9\xB6\xBA",
+ "\xF6\xC1" => "\xE9\xB6\xAC",
+ "\xF6\xC2" => "\xE9\xB7\x88",
+ "\xF6\xC3" => "\xE9\xB6\xB1",
+ "\xF6\xC4" => "\xE9\xB6\xAD",
+ "\xF6\xC5" => "\xE9\xB7\x8C",
+ "\xF6\xC6" => "\xE9\xB6\xB3",
+ "\xF6\xC7" => "\xE9\xB7\x8D",
+ "\xF6\xC8" => "\xE9\xB6\xB2",
+ "\xF6\xC9" => "\xE9\xB9\xBA",
+ "\xF6\xCA" => "\xE9\xBA\x9C",
+ "\xF6\xCB" => "\xE9\xBB\xAB",
+ "\xF6\xCC" => "\xE9\xBB\xAE",
+ "\xF6\xCD" => "\xE9\xBB\xAD",
+ "\xF6\xCE" => "\xE9\xBC\x9B",
+ "\xF6\xCF" => "\xE9\xBC\x98",
+ "\xF6\xD0" => "\xE9\xBC\x9A",
+ "\xF6\xD1" => "\xE9\xBC\xB1",
+ "\xF6\xD2" => "\xE9\xBD\x8E",
+ "\xF6\xD3" => "\xE9\xBD\xA5",
+ "\xF6\xD4" => "\xE9\xBD\xA4",
+ "\xF6\xD5" => "\xE9\xBE\x92",
+ "\xF6\xD6" => "\xE4\xBA\xB9",
+ "\xF6\xD7" => "\xE5\x9B\x86",
+ "\xF6\xD8" => "\xE5\x9B\x85",
+ "\xF6\xD9" => "\xE5\x9B\x8B",
+ "\xF6\xDA" => "\xE5\xA5\xB1",
+ "\xF6\xDB" => "\xE5\xAD\x8B",
+ "\xF6\xDC" => "\xE5\xAD\x8C",
+ "\xF6\xDD" => "\xE5\xB7\x95",
+ "\xF6\xDE" => "\xE5\xB7\x91",
+ "\xF6\xDF" => "\xE5\xBB\xB2",
+ "\xF6\xE0" => "\xE6\x94\xA1",
+ "\xF6\xE1" => "\xE6\x94\xA0",
+ "\xF6\xE2" => "\xE6\x94\xA6",
+ "\xF6\xE3" => "\xE6\x94\xA2",
+ "\xF6\xE4" => "\xE6\xAC\x8B",
+ "\xF6\xE5" => "\xE6\xAC\x88",
+ "\xF6\xE6" => "\xE6\xAC\x89",
+ "\xF6\xE7" => "\xE6\xB0\x8D",
+ "\xF6\xE8" => "\xE7\x81\x95",
+ "\xF6\xE9" => "\xE7\x81\x96",
+ "\xF6\xEA" => "\xE7\x81\x97",
+ "\xF6\xEB" => "\xE7\x81\x92",
+ "\xF6\xEC" => "\xE7\x88\x9E",
+ "\xF6\xED" => "\xE7\x88\x9F",
+ "\xF6\xEE" => "\xE7\x8A\xA9",
+ "\xF6\xEF" => "\xE7\x8D\xBF",
+ "\xF6\xF0" => "\xE7\x93\x98",
+ "\xF6\xF1" => "\xE7\x93\x95",
+ "\xF6\xF2" => "\xE7\x93\x99",
+ "\xF6\xF3" => "\xE7\x93\x97",
+ "\xF6\xF4" => "\xE7\x99\xAD",
+ "\xF6\xF5" => "\xE7\x9A\xAD",
+ "\xF6\xF6" => "\xE7\xA4\xB5",
+ "\xF6\xF7" => "\xE7\xA6\xB4",
+ "\xF6\xF8" => "\xE7\xA9\xB0",
+ "\xF6\xF9" => "\xE7\xA9\xB1",
+ "\xF6\xFA" => "\xE7\xB1\x97",
+ "\xF6\xFB" => "\xE7\xB1\x9C",
+ "\xF6\xFC" => "\xE7\xB1\x99",
+ "\xF6\xFD" => "\xE7\xB1\x9B",
+ "\xF6\xFE" => "\xE7\xB1\x9A",
+ "\xF7\x40" => "\xE7\xB3\xB4",
+ "\xF7\x41" => "\xE7\xB3\xB1",
+ "\xF7\x42" => "\xE7\xBA\x91",
+ "\xF7\x43" => "\xE7\xBD\x8F",
+ "\xF7\x44" => "\xE7\xBE\x87",
+ "\xF7\x45" => "\xE8\x87\x9E",
+ "\xF7\x46" => "\xE8\x89\xAB",
+ "\xF7\x47" => "\xE8\x98\xB4",
+ "\xF7\x48" => "\xE8\x98\xB5",
+ "\xF7\x49" => "\xE8\x98\xB3",
+ "\xF7\x4A" => "\xE8\x98\xAC",
+ "\xF7\x4B" => "\xE8\x98\xB2",
+ "\xF7\x4C" => "\xE8\x98\xB6",
+ "\xF7\x4D" => "\xE8\xA0\xAC",
+ "\xF7\x4E" => "\xE8\xA0\xA8",
+ "\xF7\x4F" => "\xE8\xA0\xA6",
+ "\xF7\x50" => "\xE8\xA0\xAA",
+ "\xF7\x51" => "\xE8\xA0\xA5",
+ "\xF7\x52" => "\xE8\xA5\xB1",
+ "\xF7\x53" => "\xE8\xA6\xBF",
+ "\xF7\x54" => "\xE8\xA6\xBE",
+ "\xF7\x55" => "\xE8\xA7\xBB",
+ "\xF7\x56" => "\xE8\xAD\xBE",
+ "\xF7\x57" => "\xE8\xAE\x84",
+ "\xF7\x58" => "\xE8\xAE\x82",
+ "\xF7\x59" => "\xE8\xAE\x86",
+ "\xF7\x5A" => "\xE8\xAE\x85",
+ "\xF7\x5B" => "\xE8\xAD\xBF",
+ "\xF7\x5C" => "\xE8\xB4\x95",
+ "\xF7\x5D" => "\xE8\xBA\x95",
+ "\xF7\x5E" => "\xE8\xBA\x94",
+ "\xF7\x5F" => "\xE8\xBA\x9A",
+ "\xF7\x60" => "\xE8\xBA\x92",
+ "\xF7\x61" => "\xE8\xBA\x90",
+ "\xF7\x62" => "\xE8\xBA\x96",
+ "\xF7\x63" => "\xE8\xBA\x97",
+ "\xF7\x64" => "\xE8\xBD\xA0",
+ "\xF7\x65" => "\xE8\xBD\xA2",
+ "\xF7\x66" => "\xE9\x85\x87",
+ "\xF7\x67" => "\xE9\x91\x8C",
+ "\xF7\x68" => "\xE9\x91\x90",
+ "\xF7\x69" => "\xE9\x91\x8A",
+ "\xF7\x6A" => "\xE9\x91\x8B",
+ "\xF7\x6B" => "\xE9\x91\x8F",
+ "\xF7\x6C" => "\xE9\x91\x87",
+ "\xF7\x6D" => "\xE9\x91\x85",
+ "\xF7\x6E" => "\xE9\x91\x88",
+ "\xF7\x6F" => "\xE9\x91\x89",
+ "\xF7\x70" => "\xE9\x91\x86",
+ "\xF7\x71" => "\xE9\x9C\xBF",
+ "\xF7\x72" => "\xE9\x9F\xA3",
+ "\xF7\x73" => "\xE9\xA1\xAA",
+ "\xF7\x74" => "\xE9\xA1\xA9",
+ "\xF7\x75" => "\xE9\xA3\x8B",
+ "\xF7\x76" => "\xE9\xA5\x94",
+ "\xF7\x77" => "\xE9\xA5\x9B",
+ "\xF7\x78" => "\xE9\xA9\x8E",
+ "\xF7\x79" => "\xE9\xA9\x93",
+ "\xF7\x7A" => "\xE9\xA9\x94",
+ "\xF7\x7B" => "\xE9\xA9\x8C",
+ "\xF7\x7C" => "\xE9\xA9\x8F",
+ "\xF7\x7D" => "\xE9\xA9\x88",
+ "\xF7\x7E" => "\xE9\xA9\x8A",
+ "\xF7\xA1" => "\xE9\xA9\x89",
+ "\xF7\xA2" => "\xE9\xA9\x92",
+ "\xF7\xA3" => "\xE9\xA9\x90",
+ "\xF7\xA4" => "\xE9\xAB\x90",
+ "\xF7\xA5" => "\xE9\xAC\x99",
+ "\xF7\xA6" => "\xE9\xAC\xAB",
+ "\xF7\xA7" => "\xE9\xAC\xBB",
+ "\xF7\xA8" => "\xE9\xAD\x96",
+ "\xF7\xA9" => "\xE9\xAD\x95",
+ "\xF7\xAA" => "\xE9\xB1\x86",
+ "\xF7\xAB" => "\xE9\xB1\x88",
+ "\xF7\xAC" => "\xE9\xB0\xBF",
+ "\xF7\xAD" => "\xE9\xB1\x84",
+ "\xF7\xAE" => "\xE9\xB0\xB9",
+ "\xF7\xAF" => "\xE9\xB0\xB3",
+ "\xF7\xB0" => "\xE9\xB1\x81",
+ "\xF7\xB1" => "\xE9\xB0\xBC",
+ "\xF7\xB2" => "\xE9\xB0\xB7",
+ "\xF7\xB3" => "\xE9\xB0\xB4",
+ "\xF7\xB4" => "\xE9\xB0\xB2",
+ "\xF7\xB5" => "\xE9\xB0\xBD",
+ "\xF7\xB6" => "\xE9\xB0\xB6",
+ "\xF7\xB7" => "\xE9\xB7\x9B",
+ "\xF7\xB8" => "\xE9\xB7\x92",
+ "\xF7\xB9" => "\xE9\xB7\x9E",
+ "\xF7\xBA" => "\xE9\xB7\x9A",
+ "\xF7\xBB" => "\xE9\xB7\x8B",
+ "\xF7\xBC" => "\xE9\xB7\x90",
+ "\xF7\xBD" => "\xE9\xB7\x9C",
+ "\xF7\xBE" => "\xE9\xB7\x91",
+ "\xF7\xBF" => "\xE9\xB7\x9F",
+ "\xF7\xC0" => "\xE9\xB7\xA9",
+ "\xF7\xC1" => "\xE9\xB7\x99",
+ "\xF7\xC2" => "\xE9\xB7\x98",
+ "\xF7\xC3" => "\xE9\xB7\x96",
+ "\xF7\xC4" => "\xE9\xB7\xB5",
+ "\xF7\xC5" => "\xE9\xB7\x95",
+ "\xF7\xC6" => "\xE9\xB7\x9D",
+ "\xF7\xC7" => "\xE9\xBA\xB6",
+ "\xF7\xC8" => "\xE9\xBB\xB0",
+ "\xF7\xC9" => "\xE9\xBC\xB5",
+ "\xF7\xCA" => "\xE9\xBC\xB3",
+ "\xF7\xCB" => "\xE9\xBC\xB2",
+ "\xF7\xCC" => "\xE9\xBD\x82",
+ "\xF7\xCD" => "\xE9\xBD\xAB",
+ "\xF7\xCE" => "\xE9\xBE\x95",
+ "\xF7\xCF" => "\xE9\xBE\xA2",
+ "\xF7\xD0" => "\xE5\x84\xBD",
+ "\xF7\xD1" => "\xE5\x8A\x99",
+ "\xF7\xD2" => "\xE5\xA3\xA8",
+ "\xF7\xD3" => "\xE5\xA3\xA7",
+ "\xF7\xD4" => "\xE5\xA5\xB2",
+ "\xF7\xD5" => "\xE5\xAD\x8D",
+ "\xF7\xD6" => "\xE5\xB7\x98",
+ "\xF7\xD7" => "\xE8\xA0\xAF",
+ "\xF7\xD8" => "\xE5\xBD\x8F",
+ "\xF7\xD9" => "\xE6\x88\x81",
+ "\xF7\xDA" => "\xE6\x88\x83",
+ "\xF7\xDB" => "\xE6\x88\x84",
+ "\xF7\xDC" => "\xE6\x94\xA9",
+ "\xF7\xDD" => "\xE6\x94\xA5",
+ "\xF7\xDE" => "\xE6\x96\x96",
+ "\xF7\xDF" => "\xE6\x9B\xAB",
+ "\xF7\xE0" => "\xE6\xAC\x91",
+ "\xF7\xE1" => "\xE6\xAC\x92",
+ "\xF7\xE2" => "\xE6\xAC\x8F",
+ "\xF7\xE3" => "\xE6\xAF\x8A",
+ "\xF7\xE4" => "\xE7\x81\x9B",
+ "\xF7\xE5" => "\xE7\x81\x9A",
+ "\xF7\xE6" => "\xE7\x88\xA2",
+ "\xF7\xE7" => "\xE7\x8E\x82",
+ "\xF7\xE8" => "\xE7\x8E\x81",
+ "\xF7\xE9" => "\xE7\x8E\x83",
+ "\xF7\xEA" => "\xE7\x99\xB0",
+ "\xF7\xEB" => "\xE7\x9F\x94",
+ "\xF7\xEC" => "\xE7\xB1\xA7",
+ "\xF7\xED" => "\xE7\xB1\xA6",
+ "\xF7\xEE" => "\xE7\xBA\x95",
+ "\xF7\xEF" => "\xE8\x89\xAC",
+ "\xF7\xF0" => "\xE8\x98\xBA",
+ "\xF7\xF1" => "\xE8\x99\x80",
+ "\xF7\xF2" => "\xE8\x98\xB9",
+ "\xF7\xF3" => "\xE8\x98\xBC",
+ "\xF7\xF4" => "\xE8\x98\xB1",
+ "\xF7\xF5" => "\xE8\x98\xBB",
+ "\xF7\xF6" => "\xE8\x98\xBE",
+ "\xF7\xF7" => "\xE8\xA0\xB0",
+ "\xF7\xF8" => "\xE8\xA0\xB2",
+ "\xF7\xF9" => "\xE8\xA0\xAE",
+ "\xF7\xFA" => "\xE8\xA0\xB3",
+ "\xF7\xFB" => "\xE8\xA5\xB6",
+ "\xF7\xFC" => "\xE8\xA5\xB4",
+ "\xF7\xFD" => "\xE8\xA5\xB3",
+ "\xF7\xFE" => "\xE8\xA7\xBE",
+ "\xF8\x40" => "\xE8\xAE\x8C",
+ "\xF8\x41" => "\xE8\xAE\x8E",
+ "\xF8\x42" => "\xE8\xAE\x8B",
+ "\xF8\x43" => "\xE8\xAE\x88",
+ "\xF8\x44" => "\xE8\xB1\x85",
+ "\xF8\x45" => "\xE8\xB4\x99",
+ "\xF8\x46" => "\xE8\xBA\x98",
+ "\xF8\x47" => "\xE8\xBD\xA4",
+ "\xF8\x48" => "\xE8\xBD\xA3",
+ "\xF8\x49" => "\xE9\x86\xBC",
+ "\xF8\x4A" => "\xE9\x91\xA2",
+ "\xF8\x4B" => "\xE9\x91\x95",
+ "\xF8\x4C" => "\xE9\x91\x9D",
+ "\xF8\x4D" => "\xE9\x91\x97",
+ "\xF8\x4E" => "\xE9\x91\x9E",
+ "\xF8\x4F" => "\xE9\x9F\x84",
+ "\xF8\x50" => "\xE9\x9F\x85",
+ "\xF8\x51" => "\xE9\xA0\x80",
+ "\xF8\x52" => "\xE9\xA9\x96",
+ "\xF8\x53" => "\xE9\xA9\x99",
+ "\xF8\x54" => "\xE9\xAC\x9E",
+ "\xF8\x55" => "\xE9\xAC\x9F",
+ "\xF8\x56" => "\xE9\xAC\xA0",
+ "\xF8\x57" => "\xE9\xB1\x92",
+ "\xF8\x58" => "\xE9\xB1\x98",
+ "\xF8\x59" => "\xE9\xB1\x90",
+ "\xF8\x5A" => "\xE9\xB1\x8A",
+ "\xF8\x5B" => "\xE9\xB1\x8D",
+ "\xF8\x5C" => "\xE9\xB1\x8B",
+ "\xF8\x5D" => "\xE9\xB1\x95",
+ "\xF8\x5E" => "\xE9\xB1\x99",
+ "\xF8\x5F" => "\xE9\xB1\x8C",
+ "\xF8\x60" => "\xE9\xB1\x8E",
+ "\xF8\x61" => "\xE9\xB7\xBB",
+ "\xF8\x62" => "\xE9\xB7\xB7",
+ "\xF8\x63" => "\xE9\xB7\xAF",
+ "\xF8\x64" => "\xE9\xB7\xA3",
+ "\xF8\x65" => "\xE9\xB7\xAB",
+ "\xF8\x66" => "\xE9\xB7\xB8",
+ "\xF8\x67" => "\xE9\xB7\xA4",
+ "\xF8\x68" => "\xE9\xB7\xB6",
+ "\xF8\x69" => "\xE9\xB7\xA1",
+ "\xF8\x6A" => "\xE9\xB7\xAE",
+ "\xF8\x6B" => "\xE9\xB7\xA6",
+ "\xF8\x6C" => "\xE9\xB7\xB2",
+ "\xF8\x6D" => "\xE9\xB7\xB0",
+ "\xF8\x6E" => "\xE9\xB7\xA2",
+ "\xF8\x6F" => "\xE9\xB7\xAC",
+ "\xF8\x70" => "\xE9\xB7\xB4",
+ "\xF8\x71" => "\xE9\xB7\xB3",
+ "\xF8\x72" => "\xE9\xB7\xA8",
+ "\xF8\x73" => "\xE9\xB7\xAD",
+ "\xF8\x74" => "\xE9\xBB\x82",
+ "\xF8\x75" => "\xE9\xBB\x90",
+ "\xF8\x76" => "\xE9\xBB\xB2",
+ "\xF8\x77" => "\xE9\xBB\xB3",
+ "\xF8\x78" => "\xE9\xBC\x86",
+ "\xF8\x79" => "\xE9\xBC\x9C",
+ "\xF8\x7A" => "\xE9\xBC\xB8",
+ "\xF8\x7B" => "\xE9\xBC\xB7",
+ "\xF8\x7C" => "\xE9\xBC\xB6",
+ "\xF8\x7D" => "\xE9\xBD\x83",
+ "\xF8\x7E" => "\xE9\xBD\x8F",
+ "\xF8\xA1" => "\xE9\xBD\xB1",
+ "\xF8\xA2" => "\xE9\xBD\xB0",
+ "\xF8\xA3" => "\xE9\xBD\xAE",
+ "\xF8\xA4" => "\xE9\xBD\xAF",
+ "\xF8\xA5" => "\xE5\x9B\x93",
+ "\xF8\xA6" => "\xE5\x9B\x8D",
+ "\xF8\xA7" => "\xE5\xAD\x8E",
+ "\xF8\xA8" => "\xE5\xB1\xAD",
+ "\xF8\xA9" => "\xE6\x94\xAD",
+ "\xF8\xAA" => "\xE6\x9B\xAD",
+ "\xF8\xAB" => "\xE6\x9B\xAE",
+ "\xF8\xAC" => "\xE6\xAC\x93",
+ "\xF8\xAD" => "\xE7\x81\x9F",
+ "\xF8\xAE" => "\xE7\x81\xA1",
+ "\xF8\xAF" => "\xE7\x81\x9D",
+ "\xF8\xB0" => "\xE7\x81\xA0",
+ "\xF8\xB1" => "\xE7\x88\xA3",
+ "\xF8\xB2" => "\xE7\x93\x9B",
+ "\xF8\xB3" => "\xE7\x93\xA5",
+ "\xF8\xB4" => "\xE7\x9F\x95",
+ "\xF8\xB5" => "\xE7\xA4\xB8",
+ "\xF8\xB6" => "\xE7\xA6\xB7",
+ "\xF8\xB7" => "\xE7\xA6\xB6",
+ "\xF8\xB8" => "\xE7\xB1\xAA",
+ "\xF8\xB9" => "\xE7\xBA\x97",
+ "\xF8\xBA" => "\xE7\xBE\x89",
+ "\xF8\xBB" => "\xE8\x89\xAD",
+ "\xF8\xBC" => "\xE8\x99\x83",
+ "\xF8\xBD" => "\xE8\xA0\xB8",
+ "\xF8\xBE" => "\xE8\xA0\xB7",
+ "\xF8\xBF" => "\xE8\xA0\xB5",
+ "\xF8\xC0" => "\xE8\xA1\x8B",
+ "\xF8\xC1" => "\xE8\xAE\x94",
+ "\xF8\xC2" => "\xE8\xAE\x95",
+ "\xF8\xC3" => "\xE8\xBA\x9E",
+ "\xF8\xC4" => "\xE8\xBA\x9F",
+ "\xF8\xC5" => "\xE8\xBA\xA0",
+ "\xF8\xC6" => "\xE8\xBA\x9D",
+ "\xF8\xC7" => "\xE9\x86\xBE",
+ "\xF8\xC8" => "\xE9\x86\xBD",
+ "\xF8\xC9" => "\xE9\x87\x82",
+ "\xF8\xCA" => "\xE9\x91\xAB",
+ "\xF8\xCB" => "\xE9\x91\xA8",
+ "\xF8\xCC" => "\xE9\x91\xA9",
+ "\xF8\xCD" => "\xE9\x9B\xA5",
+ "\xF8\xCE" => "\xE9\x9D\x86",
+ "\xF8\xCF" => "\xE9\x9D\x83",
+ "\xF8\xD0" => "\xE9\x9D\x87",
+ "\xF8\xD1" => "\xE9\x9F\x87",
+ "\xF8\xD2" => "\xE9\x9F\xA5",
+ "\xF8\xD3" => "\xE9\xA9\x9E",
+ "\xF8\xD4" => "\xE9\xAB\x95",
+ "\xF8\xD5" => "\xE9\xAD\x99",
+ "\xF8\xD6" => "\xE9\xB1\xA3",
+ "\xF8\xD7" => "\xE9\xB1\xA7",
+ "\xF8\xD8" => "\xE9\xB1\xA6",
+ "\xF8\xD9" => "\xE9\xB1\xA2",
+ "\xF8\xDA" => "\xE9\xB1\x9E",
+ "\xF8\xDB" => "\xE9\xB1\xA0",
+ "\xF8\xDC" => "\xE9\xB8\x82",
+ "\xF8\xDD" => "\xE9\xB7\xBE",
+ "\xF8\xDE" => "\xE9\xB8\x87",
+ "\xF8\xDF" => "\xE9\xB8\x83",
+ "\xF8\xE0" => "\xE9\xB8\x86",
+ "\xF8\xE1" => "\xE9\xB8\x85",
+ "\xF8\xE2" => "\xE9\xB8\x80",
+ "\xF8\xE3" => "\xE9\xB8\x81",
+ "\xF8\xE4" => "\xE9\xB8\x89",
+ "\xF8\xE5" => "\xE9\xB7\xBF",
+ "\xF8\xE6" => "\xE9\xB7\xBD",
+ "\xF8\xE7" => "\xE9\xB8\x84",
+ "\xF8\xE8" => "\xE9\xBA\xA0",
+ "\xF8\xE9" => "\xE9\xBC\x9E",
+ "\xF8\xEA" => "\xE9\xBD\x86",
+ "\xF8\xEB" => "\xE9\xBD\xB4",
+ "\xF8\xEC" => "\xE9\xBD\xB5",
+ "\xF8\xED" => "\xE9\xBD\xB6",
+ "\xF8\xEE" => "\xE5\x9B\x94",
+ "\xF8\xEF" => "\xE6\x94\xAE",
+ "\xF8\xF0" => "\xE6\x96\xB8",
+ "\xF8\xF1" => "\xE6\xAC\x98",
+ "\xF8\xF2" => "\xE6\xAC\x99",
+ "\xF8\xF3" => "\xE6\xAC\x97",
+ "\xF8\xF4" => "\xE6\xAC\x9A",
+ "\xF8\xF5" => "\xE7\x81\xA2",
+ "\xF8\xF6" => "\xE7\x88\xA6",
+ "\xF8\xF7" => "\xE7\x8A\xAA",
+ "\xF8\xF8" => "\xE7\x9F\x98",
+ "\xF8\xF9" => "\xE7\x9F\x99",
+ "\xF8\xFA" => "\xE7\xA4\xB9",
+ "\xF8\xFB" => "\xE7\xB1\xA9",
+ "\xF8\xFC" => "\xE7\xB1\xAB",
+ "\xF8\xFD" => "\xE7\xB3\xB6",
+ "\xF8\xFE" => "\xE7\xBA\x9A",
+ "\xF9\x40" => "\xE7\xBA\x98",
+ "\xF9\x41" => "\xE7\xBA\x9B",
+ "\xF9\x42" => "\xE7\xBA\x99",
+ "\xF9\x43" => "\xE8\x87\xA0",
+ "\xF9\x44" => "\xE8\x87\xA1",
+ "\xF9\x45" => "\xE8\x99\x86",
+ "\xF9\x46" => "\xE8\x99\x87",
+ "\xF9\x47" => "\xE8\x99\x88",
+ "\xF9\x48" => "\xE8\xA5\xB9",
+ "\xF9\x49" => "\xE8\xA5\xBA",
+ "\xF9\x4A" => "\xE8\xA5\xBC",
+ "\xF9\x4B" => "\xE8\xA5\xBB",
+ "\xF9\x4C" => "\xE8\xA7\xBF",
+ "\xF9\x4D" => "\xE8\xAE\x98",
+ "\xF9\x4E" => "\xE8\xAE\x99",
+ "\xF9\x4F" => "\xE8\xBA\xA5",
+ "\xF9\x50" => "\xE8\xBA\xA4",
+ "\xF9\x51" => "\xE8\xBA\xA3",
+ "\xF9\x52" => "\xE9\x91\xAE",
+ "\xF9\x53" => "\xE9\x91\xAD",
+ "\xF9\x54" => "\xE9\x91\xAF",
+ "\xF9\x55" => "\xE9\x91\xB1",
+ "\xF9\x56" => "\xE9\x91\xB3",
+ "\xF9\x57" => "\xE9\x9D\x89",
+ "\xF9\x58" => "\xE9\xA1\xB2",
+ "\xF9\x59" => "\xE9\xA5\x9F",
+ "\xF9\x5A" => "\xE9\xB1\xA8",
+ "\xF9\x5B" => "\xE9\xB1\xAE",
+ "\xF9\x5C" => "\xE9\xB1\xAD",
+ "\xF9\x5D" => "\xE9\xB8\x8B",
+ "\xF9\x5E" => "\xE9\xB8\x8D",
+ "\xF9\x5F" => "\xE9\xB8\x90",
+ "\xF9\x60" => "\xE9\xB8\x8F",
+ "\xF9\x61" => "\xE9\xB8\x92",
+ "\xF9\x62" => "\xE9\xB8\x91",
+ "\xF9\x63" => "\xE9\xBA\xA1",
+ "\xF9\x64" => "\xE9\xBB\xB5",
+ "\xF9\x65" => "\xE9\xBC\x89",
+ "\xF9\x66" => "\xE9\xBD\x87",
+ "\xF9\x67" => "\xE9\xBD\xB8",
+ "\xF9\x68" => "\xE9\xBD\xBB",
+ "\xF9\x69" => "\xE9\xBD\xBA",
+ "\xF9\x6A" => "\xE9\xBD\xB9",
+ "\xF9\x6B" => "\xE5\x9C\x9E",
+ "\xF9\x6C" => "\xE7\x81\xA6",
+ "\xF9\x6D" => "\xE7\xB1\xAF",
+ "\xF9\x6E" => "\xE8\xA0\xBC",
+ "\xF9\x6F" => "\xE8\xB6\xB2",
+ "\xF9\x70" => "\xE8\xBA\xA6",
+ "\xF9\x71" => "\xE9\x87\x83",
+ "\xF9\x72" => "\xE9\x91\xB4",
+ "\xF9\x73" => "\xE9\x91\xB8",
+ "\xF9\x74" => "\xE9\x91\xB6",
+ "\xF9\x75" => "\xE9\x91\xB5",
+ "\xF9\x76" => "\xE9\xA9\xA0",
+ "\xF9\x77" => "\xE9\xB1\xB4",
+ "\xF9\x78" => "\xE9\xB1\xB3",
+ "\xF9\x79" => "\xE9\xB1\xB1",
+ "\xF9\x7A" => "\xE9\xB1\xB5",
+ "\xF9\x7B" => "\xE9\xB8\x94",
+ "\xF9\x7C" => "\xE9\xB8\x93",
+ "\xF9\x7D" => "\xE9\xBB\xB6",
+ "\xF9\x7E" => "\xE9\xBC\x8A",
+ "\xF9\xA1" => "\xE9\xBE\xA4",
+ "\xF9\xA2" => "\xE7\x81\xA8",
+ "\xF9\xA3" => "\xE7\x81\xA5",
+ "\xF9\xA4" => "\xE7\xB3\xB7",
+ "\xF9\xA5" => "\xE8\x99\xAA",
+ "\xF9\xA6" => "\xE8\xA0\xBE",
+ "\xF9\xA7" => "\xE8\xA0\xBD",
+ "\xF9\xA8" => "\xE8\xA0\xBF",
+ "\xF9\xA9" => "\xE8\xAE\x9E",
+ "\xF9\xAA" => "\xE8\xB2\x9C",
+ "\xF9\xAB" => "\xE8\xBA\xA9",
+ "\xF9\xAC" => "\xE8\xBB\x89",
+ "\xF9\xAD" => "\xE9\x9D\x8B",
+ "\xF9\xAE" => "\xE9\xA1\xB3",
+ "\xF9\xAF" => "\xE9\xA1\xB4",
+ "\xF9\xB0" => "\xE9\xA3\x8C",
+ "\xF9\xB1" => "\xE9\xA5\xA1",
+ "\xF9\xB2" => "\xE9\xA6\xAB",
+ "\xF9\xB3" => "\xE9\xA9\xA4",
+ "\xF9\xB4" => "\xE9\xA9\xA6",
+ "\xF9\xB5" => "\xE9\xA9\xA7",
+ "\xF9\xB6" => "\xE9\xAC\xA4",
+ "\xF9\xB7" => "\xE9\xB8\x95",
+ "\xF9\xB8" => "\xE9\xB8\x97",
+ "\xF9\xB9" => "\xE9\xBD\x88",
+ "\xF9\xBA" => "\xE6\x88\x87",
+ "\xF9\xBB" => "\xE6\xAC\x9E",
+ "\xF9\xBC" => "\xE7\x88\xA7",
+ "\xF9\xBD" => "\xE8\x99\x8C",
+ "\xF9\xBE" => "\xE8\xBA\xA8",
+ "\xF9\xBF" => "\xE9\x92\x82",
+ "\xF9\xC0" => "\xE9\x92\x80",
+ "\xF9\xC1" => "\xE9\x92\x81",
+ "\xF9\xC2" => "\xE9\xA9\xA9",
+ "\xF9\xC3" => "\xE9\xA9\xA8",
+ "\xF9\xC4" => "\xE9\xAC\xAE",
+ "\xF9\xC5" => "\xE9\xB8\x99",
+ "\xF9\xC6" => "\xE7\x88\xA9",
+ "\xF9\xC7" => "\xE8\x99\x8B",
+ "\xF9\xC8" => "\xE8\xAE\x9F",
+ "\xF9\xC9" => "\xE9\x92\x83",
+ "\xF9\xCA" => "\xE9\xB1\xB9",
+ "\xF9\xCB" => "\xE9\xBA\xB7",
+ "\xF9\xCC" => "\xE7\x99\xB5",
+ "\xF9\xCD" => "\xE9\xA9\xAB",
+ "\xF9\xCE" => "\xE9\xB1\xBA",
+ "\xF9\xCF" => "\xE9\xB8\x9D",
+ "\xF9\xD0" => "\xE7\x81\xA9",
+ "\xF9\xD1" => "\xE7\x81\xAA",
+ "\xF9\xD2" => "\xE9\xBA\xA4",
+ "\xF9\xD3" => "\xE9\xBD\xBE",
+ "\xF9\xD4" => "\xE9\xBD\x89",
+ "\xF9\xD5" => "\xE9\xBE\x98",
+ );
+ return strtr($string, $transform);
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_0.php b/phpBB/includes/utf/data/search_indexer_0.php
new file mode 100644
index 0000000000..3304b18cdd
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_0.php
@@ -0,0 +1 @@
+<?php return array(0=>'0',1=>'1',2=>'2',3=>'3',4=>'4',5=>'5',6=>'6',7=>'7',8=>'8',9=>'9','A'=>'a','B'=>'b','C'=>'c','D'=>'d','E'=>'e','F'=>'f','G'=>'g','H'=>'h','I'=>'i','J'=>'j','K'=>'k','L'=>'l','M'=>'m','N'=>'n','O'=>'o','P'=>'p','Q'=>'q','R'=>'r','S'=>'s','T'=>'t','U'=>'u','V'=>'v','W'=>'w','X'=>'x','Y'=>'y','Z'=>'z','a'=>'a','b'=>'b','c'=>'c','d'=>'d','e'=>'e','f'=>'f','g'=>'g','h'=>'h','i'=>'i','j'=>'j','k'=>'k','l'=>'l','m'=>'m','n'=>'n','o'=>'o','p'=>'p','q'=>'q','r'=>'r','s'=>'s','t'=>'t','u'=>'u','v'=>'v','w'=>'w','x'=>'x','y'=>'y','z'=>'z','ª'=>'ª','²'=>'2','³'=>'3','µ'=>'µ','¹'=>'1','º'=>'º','¼'=>'1/4','½'=>'1/2','¾'=>'3/4','À'=>'à','Ã'=>'á','Â'=>'â','Ã'=>'ã','Ä'=>'ae','Ã…'=>'Ã¥','Æ'=>'ae','Ç'=>'ç','È'=>'è','É'=>'é','Ê'=>'ê','Ë'=>'ë','ÃŒ'=>'ì','Ã'=>'í','ÃŽ'=>'î','Ã'=>'ï','Ã'=>'ð','Ñ'=>'ñ','Ã’'=>'ò','Ó'=>'ó','Ô'=>'ô','Õ'=>'õ','Ö'=>'oe','Ø'=>'ø','Ù'=>'ù','Ú'=>'ú','Û'=>'û','Ãœ'=>'ü','Ã'=>'ý','Þ'=>'þ','ß'=>'ss','à'=>'à','á'=>'á','â'=>'â','ã'=>'ã','ä'=>'ae','Ã¥'=>'Ã¥','æ'=>'ae','ç'=>'ç','è'=>'è','é'=>'é','ê'=>'ê','ë'=>'ë','ì'=>'ì','í'=>'í','î'=>'î','ï'=>'ï','ð'=>'ð','ñ'=>'ñ','ò'=>'ò','ó'=>'ó','ô'=>'ô','õ'=>'õ','ö'=>'oe','ø'=>'ø','ù'=>'ù','ú'=>'ú','û'=>'û','ü'=>'ue','ý'=>'ý','þ'=>'þ','ÿ'=>'ÿ','Ä€'=>'Ä','Ä'=>'Ä','Ä‚'=>'ă','ă'=>'ă','Ä„'=>'Ä…','Ä…'=>'Ä…','Ć'=>'ć','ć'=>'ć','Ĉ'=>'ĉ','ĉ'=>'ĉ','ÄŠ'=>'Ä‹','Ä‹'=>'Ä‹','ÄŒ'=>'Ä','Ä'=>'Ä','ÄŽ'=>'Ä','Ä'=>'Ä','Ä'=>'Ä‘','Ä‘'=>'Ä‘','Ä’'=>'Ä“','Ä“'=>'Ä“','Ä”'=>'Ä•','Ä•'=>'Ä•','Ä–'=>'Ä—','Ä—'=>'Ä—','Ę'=>'Ä™','Ä™'=>'Ä™','Äš'=>'Ä›','Ä›'=>'Ä›','Äœ'=>'Ä','Ä'=>'Ä','Äž'=>'ÄŸ','ÄŸ'=>'ÄŸ','Ä '=>'Ä¡','Ä¡'=>'Ä¡','Ä¢'=>'Ä£','Ä£'=>'Ä£','Ĥ'=>'Ä¥','Ä¥'=>'Ä¥','Ħ'=>'ħ','ħ'=>'ħ','Ĩ'=>'Ä©','Ä©'=>'Ä©','Ī'=>'Ä«','Ä«'=>'Ä«','Ĭ'=>'Ä­','Ä­'=>'Ä­','Ä®'=>'į','į'=>'į','Ä°'=>'i','ı'=>'ı','IJ'=>'ij','ij'=>'ij','Ä´'=>'ĵ','ĵ'=>'ĵ','Ķ'=>'Ä·','Ä·'=>'Ä·','ĸ'=>'ĸ','Ĺ'=>'ĺ','ĺ'=>'ĺ','Ä»'=>'ļ','ļ'=>'ļ','Ľ'=>'ľ','ľ'=>'ľ','Ä¿'=>'Å€','Å€'=>'Å€','Å'=>'Å‚','Å‚'=>'Å‚','Ń'=>'Å„','Å„'=>'Å„','Å…'=>'ņ','ņ'=>'ņ','Ň'=>'ň','ň'=>'ň','ʼn'=>'ʼn','ÅŠ'=>'Å‹','Å‹'=>'Å‹','ÅŒ'=>'Å','Å'=>'Å','ÅŽ'=>'Å','Å'=>'Å','Å'=>'Å‘','Å‘'=>'Å‘','Å’'=>'oe','Å“'=>'oe','Å”'=>'Å•','Å•'=>'Å•','Å–'=>'Å—','Å—'=>'Å—','Ř'=>'Å™','Å™'=>'Å™','Åš'=>'Å›','Å›'=>'Å›','Åœ'=>'Å','Å'=>'Å','Åž'=>'ÅŸ','ÅŸ'=>'ÅŸ','Å '=>'Å¡','Å¡'=>'Å¡','Å¢'=>'Å£','Å£'=>'Å£','Ť'=>'Å¥','Å¥'=>'Å¥','Ŧ'=>'ŧ','ŧ'=>'ŧ','Ũ'=>'Å©','Å©'=>'Å©','Ū'=>'Å«','Å«'=>'Å«','Ŭ'=>'Å­','Å­'=>'Å­','Å®'=>'ů','ů'=>'ů','Å°'=>'ű','ű'=>'ű','Ų'=>'ų','ų'=>'ų','Å´'=>'ŵ','ŵ'=>'ŵ','Ŷ'=>'Å·','Å·'=>'Å·','Ÿ'=>'ÿ','Ź'=>'ź','ź'=>'ź','Å»'=>'ż','ż'=>'ż','Ž'=>'ž','ž'=>'ž','Å¿'=>'Å¿','Æ€'=>'Æ€','Æ'=>'É“','Æ‚'=>'ƃ','ƃ'=>'ƃ','Æ„'=>'Æ…','Æ…'=>'Æ…','Ɔ'=>'É”','Ƈ'=>'ƈ','ƈ'=>'ƈ','Ɖ'=>'É–','ÆŠ'=>'É—','Æ‹'=>'ÆŒ','ÆŒ'=>'ÆŒ','Æ'=>'Æ','ÆŽ'=>'Ç','Æ'=>'É™','Æ'=>'É›','Æ‘'=>'Æ’','Æ’'=>'Æ’','Æ“'=>'É ','Æ”'=>'É£','Æ•'=>'hv','Æ–'=>'É©','Æ—'=>'ɨ','Ƙ'=>'Æ™','Æ™'=>'Æ™','Æš'=>'Æš','Æ›'=>'Æ›','Æœ'=>'ɯ','Æ'=>'ɲ','Æž'=>'Æž','ÆŸ'=>'ɵ','Æ '=>'Æ¡','Æ¡'=>'Æ¡','Æ¢'=>'oi','Æ£'=>'oi','Ƥ'=>'Æ¥','Æ¥'=>'Æ¥','Ʀ'=>'yr','Ƨ'=>'ƨ','ƨ'=>'ƨ','Æ©'=>'ʃ','ƪ'=>'ƪ','Æ«'=>'Æ«','Ƭ'=>'Æ­','Æ­'=>'Æ­','Æ®'=>'ʈ','Ư'=>'Æ°','Æ°'=>'Æ°','Ʊ'=>'ÊŠ','Ʋ'=>'Ê‹','Ƴ'=>'Æ´','Æ´'=>'Æ´','Ƶ'=>'ƶ','ƶ'=>'ƶ','Æ·'=>'Ê’','Ƹ'=>'ƹ','ƹ'=>'ƹ','ƺ'=>'ƺ','Æ»'=>'Æ»','Ƽ'=>'ƽ','ƽ'=>'ƽ','ƾ'=>'ƾ','Æ¿'=>'Æ¿','Ç€'=>'Ç€','Ç'=>'Ç','Ç‚'=>'Ç‚','ǃ'=>'ǃ','Ç„'=>'dž','Ç…'=>'dž','dž'=>'dž','LJ'=>'lj','Lj'=>'lj','lj'=>'lj','ÇŠ'=>'nj','Ç‹'=>'ÇŒ','ÇŒ'=>'nj','Ç'=>'ÇŽ','ÇŽ'=>'ÇŽ','Ç'=>'Ç','Ç'=>'Ç','Ç‘'=>'Ç’','Ç’'=>'Ç’','Ç“'=>'Ç”','Ç”'=>'Ç”','Ç•'=>'Ç–','Ç–'=>'Ç–','Ç—'=>'ǘ','ǘ'=>'ǘ','Ç™'=>'Çš','Çš'=>'Çš','Ç›'=>'Çœ','Çœ'=>'Çœ','Ç'=>'Ç','Çž'=>'ÇŸ','ÇŸ'=>'ÇŸ','Ç '=>'Ç¡','Ç¡'=>'Ç¡','Ç¢'=>'Ç£','Ç£'=>'Ç£','Ǥ'=>'Ç¥','Ç¥'=>'Ç¥','Ǧ'=>'ǧ','ǧ'=>'ǧ','Ǩ'=>'Ç©','Ç©'=>'Ç©','Ǫ'=>'Ç«','Ç«'=>'Ç«','Ǭ'=>'Ç­','Ç­'=>'Ç­','Ç®'=>'ǯ','ǯ'=>'ǯ','Ç°'=>'Ç°','DZ'=>'dz','Dz'=>'dz','dz'=>'dz','Ç´'=>'ǵ','ǵ'=>'ǵ','Ƕ'=>'Æ•','Ç·'=>'Æ¿','Ǹ'=>'ǹ','ǹ'=>'ǹ','Ǻ'=>'Ç»','Ç»'=>'Ç»','Ǽ'=>'ǽ','ǽ'=>'ǽ','Ǿ'=>'Ç¿','Ç¿'=>'Ç¿','È€'=>'È','È'=>'È','È‚'=>'ȃ','ȃ'=>'ȃ','È„'=>'È…','È…'=>'È…','Ȇ'=>'ȇ','ȇ'=>'ȇ','Ȉ'=>'ȉ','ȉ'=>'ȉ','ÈŠ'=>'È‹','È‹'=>'È‹','ÈŒ'=>'È','È'=>'È','ÈŽ'=>'È','È'=>'È','È'=>'È‘','È‘'=>'È‘','È’'=>'È“','È“'=>'È“','È”'=>'È•','È•'=>'È•','È–'=>'È—','È—'=>'È—','Ș'=>'È™','È™'=>'È™','Èš'=>'È›','È›'=>'È›','Èœ'=>'È','È'=>'È','Èž'=>'ÈŸ','ÈŸ'=>'ÈŸ','È '=>'Æž','È¡'=>'È¡','È¢'=>'ou','È£'=>'ou','Ȥ'=>'È¥','È¥'=>'È¥','Ȧ'=>'ȧ','ȧ'=>'ȧ','Ȩ'=>'È©','È©'=>'È©','Ȫ'=>'È«','È«'=>'È«','Ȭ'=>'È­','È­'=>'È­','È®'=>'ȯ','ȯ'=>'ȯ','È°'=>'ȱ','ȱ'=>'ȱ','Ȳ'=>'ȳ','ȳ'=>'ȳ','È´'=>'È´','ȵ'=>'ȵ','ȶ'=>'ȶ','È·'=>'È·','ȸ'=>'ȸ','ȹ'=>'ȹ','Ⱥ'=>'â±¥','È»'=>'ȼ','ȼ'=>'ȼ','Ƚ'=>'Æš','Ⱦ'=>'ⱦ','È¿'=>'È¿','É€'=>'É€','É'=>'É‚','É‚'=>'É‚','Ƀ'=>'Æ€','É„'=>'ʉ','É…'=>'ÊŒ','Ɇ'=>'ɇ','ɇ'=>'ɇ','Ɉ'=>'ɉ','ɉ'=>'ɉ','ÉŠ'=>'É‹','É‹'=>'É‹','ÉŒ'=>'É','É'=>'É','ÉŽ'=>'É','É'=>'É','É'=>'É','É‘'=>'É‘','É’'=>'É’','É“'=>'É“','É”'=>'É”','É•'=>'É•','É–'=>'É–','É—'=>'É—','ɘ'=>'ɘ','É™'=>'É™','Éš'=>'Éš','É›'=>'É›','Éœ'=>'Éœ','É'=>'É','Éž'=>'Éž','ÉŸ'=>'ÉŸ','É '=>'É ','É¡'=>'É¡','É¢'=>'É¢','É£'=>'É£','ɤ'=>'ɤ','É¥'=>'É¥','ɦ'=>'ɦ','ɧ'=>'ɧ','ɨ'=>'ɨ','É©'=>'É©','ɪ'=>'ɪ','É«'=>'É«','ɬ'=>'ɬ','É­'=>'É­','É®'=>'É®','ɯ'=>'ɯ','É°'=>'É°','ɱ'=>'ɱ','ɲ'=>'ɲ','ɳ'=>'ɳ','É´'=>'É´','ɵ'=>'ɵ','ɶ'=>'ɶ','É·'=>'É·','ɸ'=>'ɸ','ɹ'=>'ɹ','ɺ'=>'ɺ','É»'=>'É»','ɼ'=>'ɼ','ɽ'=>'ɽ','ɾ'=>'ɾ','É¿'=>'É¿','Ê€'=>'Ê€','Ê'=>'Ê','Ê‚'=>'Ê‚','ʃ'=>'ʃ','Ê„'=>'Ê„','Ê…'=>'Ê…','ʆ'=>'ʆ','ʇ'=>'ʇ','ʈ'=>'ʈ','ʉ'=>'ʉ','ÊŠ'=>'ÊŠ','Ê‹'=>'Ê‹','ÊŒ'=>'ÊŒ','Ê'=>'Ê','ÊŽ'=>'ÊŽ','Ê'=>'Ê','Ê'=>'Ê','Ê‘'=>'Ê‘','Ê’'=>'Ê’','Ê“'=>'Ê“','Ê”'=>'Ê”','Ê•'=>'Ê•','Ê–'=>'Ê–','Ê—'=>'Ê—','ʘ'=>'ʘ','Ê™'=>'Ê™','Êš'=>'Êš','Ê›'=>'Ê›','Êœ'=>'Êœ','Ê'=>'Ê','Êž'=>'Êž','ÊŸ'=>'ÊŸ','Ê '=>'Ê ','Ê¡'=>'Ê¡','Ê¢'=>'Ê¢','Ê£'=>'Ê£','ʤ'=>'ʤ','Ê¥'=>'Ê¥','ʦ'=>'ʦ','ʧ'=>'ʧ','ʨ'=>'ʨ','Ê©'=>'Ê©','ʪ'=>'ʪ','Ê«'=>'Ê«','ʬ'=>'ʬ','Ê­'=>'Ê­','Ê®'=>'Ê®','ʯ'=>'ʯ','Ê°'=>'Ê°','ʱ'=>'ʱ','ʲ'=>'ʲ','ʳ'=>'ʳ','Ê´'=>'Ê´','ʵ'=>'ʵ','ʶ'=>'ʶ','Ê·'=>'Ê·','ʸ'=>'ʸ','ʹ'=>'ʹ','ʺ'=>'ʺ','Ê»'=>'Ê»','ʼ'=>'ʼ','ʽ'=>'ʽ','ʾ'=>'ʾ','Ê¿'=>'Ê¿','Ë€'=>'Ë€','Ë'=>'Ë','ˆ'=>'ˆ','ˇ'=>'ˇ','ˈ'=>'ˈ','ˉ'=>'ˉ','ËŠ'=>'ËŠ','Ë‹'=>'Ë‹','ËŒ'=>'ËŒ','Ë'=>'Ë','ËŽ'=>'ËŽ','Ë'=>'Ë','Ë'=>'Ë','Ë‘'=>'Ë‘','Ë '=>'Ë ','Ë¡'=>'Ë¡','Ë¢'=>'Ë¢','Ë£'=>'Ë£','ˤ'=>'ˤ','Ë®'=>'Ë®','Ì€'=>'Ì€','Ì'=>'Ì','Ì‚'=>'Ì‚','̃'=>'̃','Ì„'=>'Ì„','Ì…'=>'Ì…','̆'=>'̆','̇'=>'̇','̈'=>'̈','̉'=>'̉','ÌŠ'=>'ÌŠ','Ì‹'=>'Ì‹','ÌŒ'=>'ÌŒ','Ì'=>'Ì','ÌŽ'=>'ÌŽ','Ì'=>'Ì','Ì'=>'Ì','Ì‘'=>'Ì‘','Ì’'=>'Ì’','Ì“'=>'Ì“','Ì”'=>'Ì”','Ì•'=>'Ì•','Ì–'=>'Ì–','Ì—'=>'Ì—','̘'=>'̘','Ì™'=>'Ì™','Ìš'=>'Ìš','Ì›'=>'Ì›','Ìœ'=>'Ìœ','Ì'=>'Ì','Ìž'=>'Ìž','ÌŸ'=>'ÌŸ','Ì '=>'Ì ','Ì¡'=>'Ì¡','Ì¢'=>'Ì¢','Ì£'=>'Ì£','̤'=>'̤','Ì¥'=>'Ì¥','̦'=>'̦','̧'=>'̧','̨'=>'̨','Ì©'=>'Ì©','̪'=>'̪','Ì«'=>'Ì«','̬'=>'̬','Ì­'=>'Ì­','Ì®'=>'Ì®','̯'=>'̯','Ì°'=>'Ì°','̱'=>'̱','̲'=>'̲','̳'=>'̳','Ì´'=>'Ì´','̵'=>'̵','̶'=>'̶','Ì·'=>'Ì·','̸'=>'̸','̹'=>'̹','̺'=>'̺','Ì»'=>'Ì»','̼'=>'̼','̽'=>'̽','̾'=>'̾','Ì¿'=>'Ì¿','Í€'=>'Í€','Í'=>'Í','Í‚'=>'Í‚','̓'=>'̓','Í„'=>'Í„','Í…'=>'Í…','͆'=>'͆','͇'=>'͇','͈'=>'͈','͉'=>'͉','ÍŠ'=>'ÍŠ','Í‹'=>'Í‹','ÍŒ'=>'ÍŒ','Í'=>'Í','ÍŽ'=>'ÍŽ','Í'=>'Í','Í'=>'Í','Í‘'=>'Í‘','Í’'=>'Í’','Í“'=>'Í“','Í”'=>'Í”','Í•'=>'Í•','Í–'=>'Í–','Í—'=>'Í—','͘'=>'͘','Í™'=>'Í™','Íš'=>'Íš','Í›'=>'Í›','Íœ'=>'Íœ','Í'=>'Í','Íž'=>'Íž','ÍŸ'=>'ÍŸ','Í '=>'Í ','Í¡'=>'Í¡','Í¢'=>'Í¢','Í£'=>'Í£','ͤ'=>'ͤ','Í¥'=>'Í¥','ͦ'=>'ͦ','ͧ'=>'ͧ','ͨ'=>'ͨ','Í©'=>'Í©','ͪ'=>'ͪ','Í«'=>'Í«','ͬ'=>'ͬ','Í­'=>'Í­','Í®'=>'Í®','ͯ'=>'ͯ','ͺ'=>'ͺ','Í»'=>'Í»','ͼ'=>'ͼ','ͽ'=>'ͽ','Ά'=>'ά','Έ'=>'έ','Ή'=>'ή','Ί'=>'ί','ÎŒ'=>'ÏŒ','ÎŽ'=>'Ï','Î'=>'ÏŽ','Î'=>'Î','Α'=>'α','Î’'=>'β','Γ'=>'γ','Δ'=>'δ','Ε'=>'ε','Ζ'=>'ζ','Η'=>'η','Θ'=>'θ','Ι'=>'ι','Κ'=>'κ','Λ'=>'λ','Îœ'=>'μ','Î'=>'ν','Ξ'=>'ξ','Ο'=>'ο','Π'=>'Ï€','Ρ'=>'Ï','Σ'=>'σ','Τ'=>'Ï„','Î¥'=>'Ï…','Φ'=>'φ','Χ'=>'χ','Ψ'=>'ψ','Ω'=>'ω','Ϊ'=>'ÏŠ','Ϋ'=>'Ï‹','ά'=>'ά','έ'=>'έ','ή'=>'ή','ί'=>'ί','ΰ'=>'ΰ','α'=>'α','β'=>'β','γ'=>'γ','δ'=>'δ','ε'=>'ε','ζ'=>'ζ','η'=>'η','θ'=>'θ','ι'=>'ι','κ'=>'κ','λ'=>'λ','μ'=>'μ','ν'=>'ν','ξ'=>'ξ','ο'=>'ο','Ï€'=>'Ï€','Ï'=>'Ï','Ï‚'=>'Ï‚','σ'=>'σ','Ï„'=>'Ï„','Ï…'=>'Ï…','φ'=>'φ','χ'=>'χ','ψ'=>'ψ','ω'=>'ω','ÏŠ'=>'ÏŠ','Ï‹'=>'Ï‹','ÏŒ'=>'ÏŒ','Ï'=>'Ï','ÏŽ'=>'ÏŽ','Ï'=>'Ï','Ï‘'=>'Ï‘','Ï’'=>'Ï’','Ï“'=>'Ï“','Ï”'=>'Ï”','Ï•'=>'Ï•','Ï–'=>'Ï–','Ï—'=>'Ï—','Ϙ'=>'Ï™','Ï™'=>'Ï™','Ïš'=>'Ï›','Ï›'=>'Ï›','Ïœ'=>'Ï','Ï'=>'Ï','Ïž'=>'ÏŸ','ÏŸ'=>'ÏŸ','Ï '=>'Ï¡','Ï¡'=>'Ï¡','Ï¢'=>'Ï£','Ï£'=>'Ï£','Ϥ'=>'Ï¥','Ï¥'=>'Ï¥','Ϧ'=>'ϧ','ϧ'=>'ϧ','Ϩ'=>'Ï©','Ï©'=>'Ï©','Ϫ'=>'Ï«','Ï«'=>'Ï«','Ϭ'=>'Ï­','Ï­'=>'Ï­','Ï®'=>'ϯ','ϯ'=>'ϯ','Ï°'=>'Ï°','ϱ'=>'ϱ','ϲ'=>'ϲ','ϳ'=>'ϳ','Ï´'=>'θ','ϵ'=>'ϵ','Ï·'=>'ϸ','ϸ'=>'ϸ','Ϲ'=>'ϲ','Ϻ'=>'Ï»','Ï»'=>'Ï»','ϼ'=>'ϼ','Ͻ'=>'Í»','Ͼ'=>'ͼ','Ï¿'=>'ͽ','Ѐ'=>'Ñ','Ð'=>'Ñ‘','Ђ'=>'Ñ’','Ѓ'=>'Ñ“','Є'=>'Ñ”','Ð…'=>'Ñ•','І'=>'Ñ–','Ї'=>'Ñ—','Ј'=>'ј','Љ'=>'Ñ™','Њ'=>'Ñš','Ћ'=>'Ñ›','ÐŒ'=>'Ñœ','Ð'=>'Ñ','ÐŽ'=>'Ñž','Ð'=>'ÑŸ','Ð'=>'а','Б'=>'б','Ð’'=>'в','Г'=>'г','Д'=>'д','Е'=>'е','Ж'=>'ж','З'=>'з','И'=>'и','Й'=>'й','К'=>'к','Л'=>'л','Ðœ'=>'м','Ð'=>'н','О'=>'о','П'=>'п','Р'=>'Ñ€','С'=>'Ñ','Т'=>'Ñ‚','У'=>'у','Ф'=>'Ñ„','Ð¥'=>'Ñ…','Ц'=>'ц','Ч'=>'ч','Ш'=>'ш','Щ'=>'щ','Ъ'=>'ÑŠ','Ы'=>'Ñ‹','Ь'=>'ÑŒ','Э'=>'Ñ','Ю'=>'ÑŽ','Я'=>'Ñ','а'=>'а','б'=>'б','в'=>'в','г'=>'г','д'=>'д','е'=>'е','ж'=>'ж','з'=>'з','и'=>'и','й'=>'й','к'=>'к','л'=>'л','м'=>'м','н'=>'н','о'=>'о','п'=>'п','Ñ€'=>'Ñ€','Ñ'=>'Ñ','Ñ‚'=>'Ñ‚','у'=>'у','Ñ„'=>'Ñ„','Ñ…'=>'Ñ…','ц'=>'ц','ч'=>'ч','ш'=>'ш','щ'=>'щ','ÑŠ'=>'ÑŠ','Ñ‹'=>'Ñ‹','ÑŒ'=>'ÑŒ','Ñ'=>'Ñ','ÑŽ'=>'ÑŽ','Ñ'=>'Ñ','Ñ'=>'Ñ','Ñ‘'=>'Ñ‘','Ñ’'=>'Ñ’','Ñ“'=>'Ñ“','Ñ”'=>'Ñ”','Ñ•'=>'Ñ•','Ñ–'=>'Ñ–','Ñ—'=>'Ñ—','ј'=>'ј','Ñ™'=>'Ñ™','Ñš'=>'Ñš','Ñ›'=>'Ñ›','Ñœ'=>'Ñœ','Ñ'=>'Ñ','Ñž'=>'Ñž','ÑŸ'=>'ÑŸ','Ñ '=>'Ñ¡','Ñ¡'=>'Ñ¡','Ñ¢'=>'Ñ£','Ñ£'=>'Ñ£','Ѥ'=>'Ñ¥','Ñ¥'=>'Ñ¥','Ѧ'=>'ѧ','ѧ'=>'ѧ','Ѩ'=>'Ñ©','Ñ©'=>'Ñ©','Ѫ'=>'Ñ«','Ñ«'=>'Ñ«','Ѭ'=>'Ñ­','Ñ­'=>'Ñ­','Ñ®'=>'ѯ','ѯ'=>'ѯ','Ñ°'=>'ѱ','ѱ'=>'ѱ','Ѳ'=>'ѳ','ѳ'=>'ѳ','Ñ´'=>'ѵ','ѵ'=>'ѵ','Ѷ'=>'Ñ·','Ñ·'=>'Ñ·','Ѹ'=>'ѹ','ѹ'=>'ѹ','Ѻ'=>'Ñ»','Ñ»'=>'Ñ»','Ѽ'=>'ѽ','ѽ'=>'ѽ','Ѿ'=>'Ñ¿','Ñ¿'=>'Ñ¿','Ò€'=>'Ò','Ò'=>'Ò','Òƒ'=>'Òƒ','Ò„'=>'Ò„','Ò…'=>'Ò…','Ò†'=>'Ò†','Òˆ'=>'Òˆ','Ò‰'=>'Ò‰','ÒŠ'=>'Ò‹','Ò‹'=>'Ò‹','ÒŒ'=>'Ò','Ò'=>'Ò','ÒŽ'=>'Ò','Ò'=>'Ò','Ò'=>'Ò‘','Ò‘'=>'Ò‘','Ò’'=>'Ò“','Ò“'=>'Ò“','Ò”'=>'Ò•','Ò•'=>'Ò•','Ò–'=>'Ò—','Ò—'=>'Ò—','Ò˜'=>'Ò™','Ò™'=>'Ò™','Òš'=>'Ò›','Ò›'=>'Ò›','Òœ'=>'Ò','Ò'=>'Ò','Òž'=>'ÒŸ','ÒŸ'=>'ÒŸ','Ò '=>'Ò¡','Ò¡'=>'Ò¡','Ò¢'=>'Ò£','Ò£'=>'Ò£','Ò¤'=>'Ò¥','Ò¥'=>'Ò¥','Ò¦'=>'Ò§','Ò§'=>'Ò§','Ò¨'=>'Ò©','Ò©'=>'Ò©','Òª'=>'Ò«','Ò«'=>'Ò«','Ò¬'=>'Ò­','Ò­'=>'Ò­','Ò®'=>'Ò¯','Ò¯'=>'Ò¯','Ò°'=>'Ò±','Ò±'=>'Ò±','Ò²'=>'Ò³','Ò³'=>'Ò³','Ò´'=>'Òµ','Òµ'=>'Òµ','Ò¶'=>'Ò·','Ò·'=>'Ò·','Ò¸'=>'Ò¹','Ò¹'=>'Ò¹','Òº'=>'Ò»','Ò»'=>'Ò»','Ò¼'=>'Ò½','Ò½'=>'Ò½','Ò¾'=>'Ò¿','Ò¿'=>'Ò¿','Ó€'=>'Ó','Ó'=>'Ó‚','Ó‚'=>'Ó‚','Óƒ'=>'Ó„','Ó„'=>'Ó„','Ó…'=>'Ó†','Ó†'=>'Ó†','Ó‡'=>'Óˆ','Óˆ'=>'Óˆ','Ó‰'=>'ÓŠ','ÓŠ'=>'ÓŠ','Ó‹'=>'ÓŒ','ÓŒ'=>'ÓŒ','Ó'=>'ÓŽ','ÓŽ'=>'ÓŽ','Ó'=>'Ó','Ó'=>'Ó‘','Ó‘'=>'Ó‘','Ó’'=>'Ó“','Ó“'=>'Ó“','Ó”'=>'Ó•','Ó•'=>'Ó•','Ó–'=>'Ó—','Ó—'=>'Ó—','Ó˜'=>'Ó™','Ó™'=>'Ó™','Óš'=>'Ó›','Ó›'=>'Ó›','Óœ'=>'Ó','Ó'=>'Ó','Óž'=>'ÓŸ','ÓŸ'=>'ÓŸ','Ó '=>'Ó¡','Ó¡'=>'Ó¡','Ó¢'=>'Ó£','Ó£'=>'Ó£','Ó¤'=>'Ó¥','Ó¥'=>'Ó¥','Ó¦'=>'Ó§','Ó§'=>'Ó§','Ó¨'=>'Ó©','Ó©'=>'Ó©','Óª'=>'Ó«','Ó«'=>'Ó«','Ó¬'=>'Ó­','Ó­'=>'Ó­','Ó®'=>'Ó¯','Ó¯'=>'Ó¯','Ó°'=>'Ó±','Ó±'=>'Ó±','Ó²'=>'Ó³','Ó³'=>'Ó³','Ó´'=>'Óµ','Óµ'=>'Óµ','Ó¶'=>'Ó·','Ó·'=>'Ó·','Ó¸'=>'Ó¹','Ó¹'=>'Ó¹','Óº'=>'Ó»','Ó»'=>'Ó»','Ó¼'=>'Ó½','Ó½'=>'Ó½','Ó¾'=>'Ó¿','Ó¿'=>'Ó¿','Ô€'=>'Ô','Ô'=>'Ô','Ô‚'=>'Ôƒ','Ôƒ'=>'Ôƒ','Ô„'=>'Ô…','Ô…'=>'Ô…','Ô†'=>'Ô‡','Ô‡'=>'Ô‡','Ôˆ'=>'Ô‰','Ô‰'=>'Ô‰','ÔŠ'=>'Ô‹','Ô‹'=>'Ô‹','ÔŒ'=>'Ô','Ô'=>'Ô','ÔŽ'=>'Ô','Ô'=>'Ô','Ô'=>'Ô‘','Ô‘'=>'Ô‘','Ô’'=>'Ô“','Ô“'=>'Ô“','Ô±'=>'Õ¡','Ô²'=>'Õ¢','Ô³'=>'Õ£','Ô´'=>'Õ¤','Ôµ'=>'Õ¥','Ô¶'=>'Õ¦','Ô·'=>'Õ§','Ô¸'=>'Õ¨','Ô¹'=>'Õ©','Ôº'=>'Õª','Ô»'=>'Õ«','Ô¼'=>'Õ¬','Ô½'=>'Õ­','Ô¾'=>'Õ®','Ô¿'=>'Õ¯','Õ€'=>'Õ°','Õ'=>'Õ±','Õ‚'=>'Õ²','Õƒ'=>'Õ³','Õ„'=>'Õ´','Õ…'=>'Õµ','Õ†'=>'Õ¶','Õ‡'=>'Õ·','Õˆ'=>'Õ¸','Õ‰'=>'Õ¹','ÕŠ'=>'Õº','Õ‹'=>'Õ»','ÕŒ'=>'Õ¼','Õ'=>'Õ½','ÕŽ'=>'Õ¾','Õ'=>'Õ¿','Õ'=>'Ö€','Õ‘'=>'Ö','Õ’'=>'Ö‚','Õ“'=>'Öƒ','Õ”'=>'Ö„','Õ•'=>'Ö…','Õ–'=>'Ö†','Õ™'=>'Õ™','Õ¡'=>'Õ¡','Õ¢'=>'Õ¢','Õ£'=>'Õ£','Õ¤'=>'Õ¤','Õ¥'=>'Õ¥','Õ¦'=>'Õ¦','Õ§'=>'Õ§','Õ¨'=>'Õ¨','Õ©'=>'Õ©','Õª'=>'Õª','Õ«'=>'Õ«','Õ¬'=>'Õ¬','Õ­'=>'Õ­','Õ®'=>'Õ®','Õ¯'=>'Õ¯','Õ°'=>'Õ°','Õ±'=>'Õ±','Õ²'=>'Õ²','Õ³'=>'Õ³','Õ´'=>'Õ´','Õµ'=>'Õµ','Õ¶'=>'Õ¶','Õ·'=>'Õ·','Õ¸'=>'Õ¸','Õ¹'=>'Õ¹','Õº'=>'Õº','Õ»'=>'Õ»','Õ¼'=>'Õ¼','Õ½'=>'Õ½','Õ¾'=>'Õ¾','Õ¿'=>'Õ¿','Ö€'=>'Ö€','Ö'=>'Ö','Ö‚'=>'Ö‚','Öƒ'=>'Öƒ','Ö„'=>'Ö„','Ö…'=>'Ö…','Ö†'=>'Ö†','Ö‡'=>'Ö‡','Ö‘'=>'Ö‘','Ö’'=>'Ö’','Ö“'=>'Ö“','Ö”'=>'Ö”','Ö•'=>'Ö•','Ö–'=>'Ö–','Ö—'=>'Ö—','Ö˜'=>'Ö˜','Ö™'=>'Ö™','Öš'=>'Öš','Ö›'=>'Ö›','Öœ'=>'Öœ','Ö'=>'Ö','Öž'=>'Öž','ÖŸ'=>'ÖŸ','Ö '=>'Ö ','Ö¡'=>'Ö¡','Ö¢'=>'Ö¢','Ö£'=>'Ö£','Ö¤'=>'Ö¤','Ö¥'=>'Ö¥','Ö¦'=>'Ö¦','Ö§'=>'Ö§','Ö¨'=>'Ö¨','Ö©'=>'Ö©','Öª'=>'Öª','Ö«'=>'Ö«','Ö¬'=>'Ö¬','Ö­'=>'Ö­','Ö®'=>'Ö®','Ö¯'=>'Ö¯','Ö°'=>'Ö°','Ö±'=>'Ö±','Ö²'=>'Ö²','Ö³'=>'Ö³','Ö´'=>'Ö´','Öµ'=>'Öµ','Ö¶'=>'Ö¶','Ö·'=>'Ö·','Ö¸'=>'Ö¸','Ö¹'=>'Ö¹','Öº'=>'Öº','Ö»'=>'Ö»','Ö¼'=>'Ö¼','Ö½'=>'Ö½','Ö¿'=>'Ö¿','×'=>'×','ׂ'=>'ׂ','ׄ'=>'ׄ','×…'=>'×…','ׇ'=>'ׇ','×'=>'×','ב'=>'ב','×’'=>'×’','ד'=>'ד','×”'=>'×”','ו'=>'ו','×–'=>'×–','×—'=>'×—','ט'=>'ט','×™'=>'×™','ך'=>'ך','×›'=>'×›','ל'=>'ל','×'=>'×','מ'=>'מ','ן'=>'ן','× '=>'× ','ס'=>'ס','×¢'=>'×¢','×£'=>'×£','פ'=>'פ','×¥'=>'×¥','צ'=>'צ','ק'=>'ק','ר'=>'ר','ש'=>'ש','ת'=>'ת','×°'=>'×°','×±'=>'×±','ײ'=>'ײ','Ø'=>'Ø','Ø‘'=>'Ø‘','Ø’'=>'Ø’','Ø“'=>'Ø“','Ø”'=>'Ø”','Ø•'=>'Ø•','Ø¡'=>'Ø¡','Ø¢'=>'Ø¢','Ø£'=>'Ø£','ؤ'=>'ؤ','Ø¥'=>'Ø¥','ئ'=>'ئ','ا'=>'ا','ب'=>'ب','Ø©'=>'Ø©','ت'=>'ت','Ø«'=>'Ø«','ج'=>'ج','Ø­'=>'Ø­','Ø®'=>'Ø®','د'=>'د','Ø°'=>'Ø°','ر'=>'ر','ز'=>'ز','س'=>'س','Ø´'=>'Ø´','ص'=>'ص','ض'=>'ض','Ø·'=>'Ø·','ظ'=>'ظ','ع'=>'ع','غ'=>'غ','Ù€'=>'Ù€','Ù'=>'Ù','Ù‚'=>'Ù‚','Ùƒ'=>'Ùƒ','Ù„'=>'Ù„','Ù…'=>'Ù…','Ù†'=>'Ù†','Ù‡'=>'Ù‡','Ùˆ'=>'Ùˆ','Ù‰'=>'Ù‰','ÙŠ'=>'ÙŠ','Ù‹'=>'Ù‹','ÙŒ'=>'ÙŒ','Ù'=>'Ù','ÙŽ'=>'ÙŽ','Ù'=>'Ù','Ù'=>'Ù','Ù‘'=>'Ù‘','Ù’'=>'Ù’','Ù“'=>'Ù“','Ù”'=>'Ù”','Ù•'=>'Ù•','Ù–'=>'Ù–','Ù—'=>'Ù—','Ù˜'=>'Ù˜','Ù™'=>'Ù™','Ùš'=>'Ùš','Ù›'=>'Ù›','Ùœ'=>'Ùœ','Ù'=>'Ù','Ùž'=>'Ùž','Ù '=>'0','Ù¡'=>'1','Ù¢'=>'2','Ù£'=>'3','Ù¤'=>'4','Ù¥'=>'5','Ù¦'=>'6','Ù§'=>'7','Ù¨'=>'8','Ù©'=>'9','Ù®'=>'Ù®','Ù¯'=>'Ù¯','Ù°'=>'Ù°','Ù±'=>'Ù±','Ù²'=>'Ù²','Ù³'=>'Ù³','Ù´'=>'Ù´','Ùµ'=>'Ùµ','Ù¶'=>'Ù¶','Ù·'=>'Ù·','Ù¸'=>'Ù¸','Ù¹'=>'Ù¹','Ùº'=>'Ùº','Ù»'=>'Ù»','Ù¼'=>'Ù¼','Ù½'=>'Ù½','Ù¾'=>'Ù¾','Ù¿'=>'Ù¿','Ú€'=>'Ú€','Ú'=>'Ú','Ú‚'=>'Ú‚','Úƒ'=>'Úƒ','Ú„'=>'Ú„','Ú…'=>'Ú…','Ú†'=>'Ú†','Ú‡'=>'Ú‡','Úˆ'=>'Úˆ','Ú‰'=>'Ú‰','ÚŠ'=>'ÚŠ','Ú‹'=>'Ú‹','ÚŒ'=>'ÚŒ','Ú'=>'Ú','ÚŽ'=>'ÚŽ','Ú'=>'Ú','Ú'=>'Ú','Ú‘'=>'Ú‘','Ú’'=>'Ú’','Ú“'=>'Ú“','Ú”'=>'Ú”','Ú•'=>'Ú•','Ú–'=>'Ú–','Ú—'=>'Ú—','Ú˜'=>'Ú˜','Ú™'=>'Ú™','Úš'=>'Úš','Ú›'=>'Ú›','Úœ'=>'Úœ','Ú'=>'Ú','Úž'=>'Úž','ÚŸ'=>'ÚŸ','Ú '=>'Ú ','Ú¡'=>'Ú¡','Ú¢'=>'Ú¢','Ú£'=>'Ú£','Ú¤'=>'Ú¤','Ú¥'=>'Ú¥','Ú¦'=>'Ú¦','Ú§'=>'Ú§','Ú¨'=>'Ú¨','Ú©'=>'Ú©','Úª'=>'Úª','Ú«'=>'Ú«','Ú¬'=>'Ú¬','Ú­'=>'Ú­','Ú®'=>'Ú®','Ú¯'=>'Ú¯','Ú°'=>'Ú°','Ú±'=>'Ú±','Ú²'=>'Ú²','Ú³'=>'Ú³','Ú´'=>'Ú´','Úµ'=>'Úµ','Ú¶'=>'Ú¶','Ú·'=>'Ú·','Ú¸'=>'Ú¸','Ú¹'=>'Ú¹','Úº'=>'Úº','Ú»'=>'Ú»','Ú¼'=>'Ú¼','Ú½'=>'Ú½','Ú¾'=>'Ú¾','Ú¿'=>'Ú¿','Û€'=>'Û€','Û'=>'Û','Û‚'=>'Û‚','Ûƒ'=>'Ûƒ','Û„'=>'Û„','Û…'=>'Û…','Û†'=>'Û†','Û‡'=>'Û‡','Ûˆ'=>'Ûˆ','Û‰'=>'Û‰','ÛŠ'=>'ÛŠ','Û‹'=>'Û‹','ÛŒ'=>'ÛŒ','Û'=>'Û','ÛŽ'=>'ÛŽ','Û'=>'Û','Û'=>'Û','Û‘'=>'Û‘','Û’'=>'Û’','Û“'=>'Û“','Û•'=>'Û•','Û–'=>'Û–','Û—'=>'Û—','Û˜'=>'Û˜','Û™'=>'Û™','Ûš'=>'Ûš','Û›'=>'Û›','Ûœ'=>'Ûœ','Ûž'=>'Ûž','ÛŸ'=>'ÛŸ','Û '=>'Û ','Û¡'=>'Û¡','Û¢'=>'Û¢','Û£'=>'Û£','Û¤'=>'Û¤','Û¥'=>'Û¥','Û¦'=>'Û¦','Û§'=>'Û§','Û¨'=>'Û¨','Ûª'=>'Ûª','Û«'=>'Û«','Û¬'=>'Û¬','Û­'=>'Û­','Û®'=>'Û®','Û¯'=>'Û¯','Û°'=>'0','Û±'=>'1','Û²'=>'2','Û³'=>'3','Û´'=>'4','Ûµ'=>'5','Û¶'=>'6','Û·'=>'7','Û¸'=>'8','Û¹'=>'9','Ûº'=>'Ûº','Û»'=>'Û»','Û¼'=>'Û¼','Û¿'=>'Û¿','Ü'=>'Ü','Ü‘'=>'Ü‘','Ü’'=>'Ü’','Ü“'=>'Ü“','Ü”'=>'Ü”','Ü•'=>'Ü•','Ü–'=>'Ü–','Ü—'=>'Ü—','ܘ'=>'ܘ','Ü™'=>'Ü™','Üš'=>'Üš','Ü›'=>'Ü›','Üœ'=>'Üœ','Ü'=>'Ü','Üž'=>'Üž','ÜŸ'=>'ÜŸ','Ü '=>'Ü ','Ü¡'=>'Ü¡','Ü¢'=>'Ü¢','Ü£'=>'Ü£','ܤ'=>'ܤ','Ü¥'=>'Ü¥','ܦ'=>'ܦ','ܧ'=>'ܧ','ܨ'=>'ܨ','Ü©'=>'Ü©','ܪ'=>'ܪ','Ü«'=>'Ü«','ܬ'=>'ܬ','Ü­'=>'Ü­','Ü®'=>'Ü®','ܯ'=>'ܯ','Ü°'=>'Ü°','ܱ'=>'ܱ','ܲ'=>'ܲ','ܳ'=>'ܳ','Ü´'=>'Ü´','ܵ'=>'ܵ','ܶ'=>'ܶ','Ü·'=>'Ü·','ܸ'=>'ܸ','ܹ'=>'ܹ','ܺ'=>'ܺ','Ü»'=>'Ü»','ܼ'=>'ܼ','ܽ'=>'ܽ','ܾ'=>'ܾ','Ü¿'=>'Ü¿','Ý€'=>'Ý€','Ý'=>'Ý','Ý‚'=>'Ý‚','݃'=>'݃','Ý„'=>'Ý„','Ý…'=>'Ý…','݆'=>'݆','݇'=>'݇','݈'=>'݈','݉'=>'݉','ÝŠ'=>'ÝŠ','Ý'=>'Ý','ÝŽ'=>'ÝŽ','Ý'=>'Ý','Ý'=>'Ý','Ý‘'=>'Ý‘','Ý’'=>'Ý’','Ý“'=>'Ý“','Ý”'=>'Ý”','Ý•'=>'Ý•','Ý–'=>'Ý–','Ý—'=>'Ý—','ݘ'=>'ݘ','Ý™'=>'Ý™','Ýš'=>'Ýš','Ý›'=>'Ý›','Ýœ'=>'Ýœ','Ý'=>'Ý','Ýž'=>'Ýž','ÝŸ'=>'ÝŸ','Ý '=>'Ý ','Ý¡'=>'Ý¡','Ý¢'=>'Ý¢','Ý£'=>'Ý£','ݤ'=>'ݤ','Ý¥'=>'Ý¥','ݦ'=>'ݦ','ݧ'=>'ݧ','ݨ'=>'ݨ','Ý©'=>'Ý©','ݪ'=>'ݪ','Ý«'=>'Ý«','ݬ'=>'ݬ','Ý­'=>'Ý­','Þ€'=>'Þ€','Þ'=>'Þ','Þ‚'=>'Þ‚','Þƒ'=>'Þƒ','Þ„'=>'Þ„','Þ…'=>'Þ…','Þ†'=>'Þ†','Þ‡'=>'Þ‡','Þˆ'=>'Þˆ','Þ‰'=>'Þ‰','ÞŠ'=>'ÞŠ','Þ‹'=>'Þ‹','ÞŒ'=>'ÞŒ','Þ'=>'Þ','ÞŽ'=>'ÞŽ','Þ'=>'Þ','Þ'=>'Þ','Þ‘'=>'Þ‘','Þ’'=>'Þ’','Þ“'=>'Þ“','Þ”'=>'Þ”','Þ•'=>'Þ•','Þ–'=>'Þ–','Þ—'=>'Þ—','Þ˜'=>'Þ˜','Þ™'=>'Þ™','Þš'=>'Þš','Þ›'=>'Þ›','Þœ'=>'Þœ','Þ'=>'Þ','Þž'=>'Þž','ÞŸ'=>'ÞŸ','Þ '=>'Þ ','Þ¡'=>'Þ¡','Þ¢'=>'Þ¢','Þ£'=>'Þ£','Þ¤'=>'Þ¤','Þ¥'=>'Þ¥','Þ¦'=>'Þ¦','Þ§'=>'Þ§','Þ¨'=>'Þ¨','Þ©'=>'Þ©','Þª'=>'Þª','Þ«'=>'Þ«','Þ¬'=>'Þ¬','Þ­'=>'Þ­','Þ®'=>'Þ®','Þ¯'=>'Þ¯','Þ°'=>'Þ°','Þ±'=>'Þ±','߀'=>'0','ß'=>'1','ß‚'=>'2','߃'=>'3','ß„'=>'4','ß…'=>'5','߆'=>'6','߇'=>'7','߈'=>'8','߉'=>'9','ߊ'=>'ߊ','ß‹'=>'ß‹','ߌ'=>'ߌ','ß'=>'ß','ߎ'=>'ߎ','ß'=>'ß','ß'=>'ß','ß‘'=>'ß‘','ß’'=>'ß’','ß“'=>'ß“','ß”'=>'ß”','ß•'=>'ß•','ß–'=>'ß–','ß—'=>'ß—','ߘ'=>'ߘ','ß™'=>'ß™','ßš'=>'ßš','ß›'=>'ß›','ßœ'=>'ßœ','ß'=>'ß','ßž'=>'ßž','ߟ'=>'ߟ','ß '=>'ß ','ß¡'=>'ß¡','ߢ'=>'ߢ','ߣ'=>'ߣ','ߤ'=>'ߤ','ߥ'=>'ߥ','ߦ'=>'ߦ','ߧ'=>'ߧ','ߨ'=>'ߨ','ß©'=>'ß©','ߪ'=>'ߪ','ß«'=>'ß«','߬'=>'߬','ß­'=>'ß­','ß®'=>'ß®','߯'=>'߯','ß°'=>'ß°','ß±'=>'ß±','ß²'=>'ß²','ß³'=>'ß³','ß´'=>'ß´','ßµ'=>'ßµ','ߺ'=>'ߺ'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_1.php b/phpBB/includes/utf/data/search_indexer_1.php
new file mode 100644
index 0000000000..6173117ffc
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_1.php
@@ -0,0 +1 @@
+<?php return array('à¤'=>'à¤','ं'=>'ं','ः'=>'ः','ऄ'=>'ऄ','अ'=>'अ','आ'=>'आ','इ'=>'इ','ई'=>'ई','उ'=>'उ','ऊ'=>'ऊ','ऋ'=>'ऋ','ऌ'=>'ऌ','à¤'=>'à¤','ऎ'=>'ऎ','à¤'=>'à¤','à¤'=>'à¤','ऑ'=>'ऑ','ऒ'=>'ऒ','ओ'=>'ओ','औ'=>'औ','क'=>'क','ख'=>'ख','ग'=>'ग','घ'=>'घ','ङ'=>'ङ','च'=>'च','छ'=>'छ','ज'=>'ज','à¤'=>'à¤','ञ'=>'ञ','ट'=>'ट','ठ'=>'ठ','ड'=>'ड','ढ'=>'ढ','ण'=>'ण','त'=>'त','थ'=>'थ','द'=>'द','ध'=>'ध','न'=>'न','ऩ'=>'ऩ','प'=>'प','फ'=>'फ','ब'=>'ब','भ'=>'भ','म'=>'म','य'=>'य','र'=>'र','ऱ'=>'ऱ','ल'=>'ल','ळ'=>'ळ','ऴ'=>'ऴ','व'=>'व','श'=>'श','ष'=>'ष','स'=>'स','ह'=>'ह','़'=>'़','ऽ'=>'ऽ','ा'=>'ा','ि'=>'ि','ी'=>'ी','à¥'=>'à¥','ू'=>'ू','ृ'=>'ृ','ॄ'=>'ॄ','ॅ'=>'ॅ','ॆ'=>'ॆ','े'=>'े','ै'=>'ै','ॉ'=>'ॉ','ॊ'=>'ॊ','ो'=>'ो','ौ'=>'ौ','à¥'=>'à¥','à¥'=>'à¥','॑'=>'॑','॒'=>'॒','॓'=>'॓','॔'=>'॔','क़'=>'क़','ख़'=>'ख़','ग़'=>'ग़','ज़'=>'ज़','ड़'=>'ड़','à¥'=>'à¥','फ़'=>'फ़','य़'=>'य़','ॠ'=>'ॠ','ॡ'=>'ॡ','ॢ'=>'ॢ','ॣ'=>'ॣ','०'=>'0','१'=>'1','२'=>'2','३'=>'3','४'=>'4','५'=>'5','६'=>'6','७'=>'7','८'=>'8','९'=>'9','ॻ'=>'ॻ','ॼ'=>'ॼ','ॽ'=>'ॽ','ॾ'=>'ॾ','ॿ'=>'ॿ','à¦'=>'à¦','ং'=>'ং','ঃ'=>'ঃ','অ'=>'অ','আ'=>'আ','ই'=>'ই','ঈ'=>'ঈ','উ'=>'উ','ঊ'=>'ঊ','ঋ'=>'ঋ','ঌ'=>'ঌ','à¦'=>'à¦','à¦'=>'à¦','ও'=>'ও','ঔ'=>'ঔ','ক'=>'ক','খ'=>'খ','গ'=>'গ','ঘ'=>'ঘ','ঙ'=>'ঙ','চ'=>'চ','ছ'=>'ছ','জ'=>'জ','à¦'=>'à¦','ঞ'=>'ঞ','ট'=>'ট','ঠ'=>'ঠ','ড'=>'ড','ঢ'=>'ঢ','ণ'=>'ণ','ত'=>'ত','থ'=>'থ','দ'=>'দ','ধ'=>'ধ','ন'=>'ন','প'=>'প','ফ'=>'ফ','ব'=>'ব','ভ'=>'ভ','ম'=>'ম','য'=>'য','র'=>'র','ল'=>'ল','শ'=>'শ','ষ'=>'ষ','স'=>'স','হ'=>'হ','়'=>'়','ঽ'=>'ঽ','া'=>'া','ি'=>'ি','ী'=>'ী','à§'=>'à§','ূ'=>'ূ','ৃ'=>'ৃ','ৄ'=>'ৄ','ে'=>'ে','ৈ'=>'ৈ','ো'=>'ো','ৌ'=>'ৌ','à§'=>'à§','ৎ'=>'ৎ','ৗ'=>'ৗ','ড়'=>'ড়','à§'=>'à§','য়'=>'য়','ৠ'=>'ৠ','ৡ'=>'ৡ','ৢ'=>'ৢ','ৣ'=>'ৣ','০'=>'0','১'=>'1','২'=>'2','৩'=>'3','৪'=>'4','৫'=>'5','৬'=>'6','৭'=>'7','৮'=>'8','৯'=>'9','ৰ'=>'ৰ','ৱ'=>'ৱ','৴'=>'1','৵'=>'2','৶'=>'3','৷'=>'4','৸'=>'৸','৹'=>'16','à¨'=>'à¨','ਂ'=>'ਂ','ਃ'=>'ਃ','ਅ'=>'ਅ','ਆ'=>'ਆ','ਇ'=>'ਇ','ਈ'=>'ਈ','ਉ'=>'ਉ','ਊ'=>'ਊ','à¨'=>'à¨','à¨'=>'à¨','ਓ'=>'ਓ','ਔ'=>'ਔ','ਕ'=>'ਕ','ਖ'=>'ਖ','ਗ'=>'ਗ','ਘ'=>'ਘ','ਙ'=>'ਙ','ਚ'=>'ਚ','ਛ'=>'ਛ','ਜ'=>'ਜ','à¨'=>'à¨','ਞ'=>'ਞ','ਟ'=>'ਟ','ਠ'=>'ਠ','ਡ'=>'ਡ','ਢ'=>'ਢ','ਣ'=>'ਣ','ਤ'=>'ਤ','ਥ'=>'ਥ','ਦ'=>'ਦ','ਧ'=>'ਧ','ਨ'=>'ਨ','ਪ'=>'ਪ','ਫ'=>'ਫ','ਬ'=>'ਬ','ਭ'=>'ਭ','ਮ'=>'ਮ','ਯ'=>'ਯ','ਰ'=>'ਰ','ਲ'=>'ਲ','ਲ਼'=>'ਲ਼','ਵ'=>'ਵ','ਸ਼'=>'ਸ਼','ਸ'=>'ਸ','ਹ'=>'ਹ','਼'=>'਼','ਾ'=>'ਾ','ਿ'=>'ਿ','à©€'=>'à©€','à©'=>'à©','à©‚'=>'à©‚','ੇ'=>'ੇ','ੈ'=>'ੈ','à©‹'=>'à©‹','à©Œ'=>'à©Œ','à©'=>'à©','à©™'=>'à©™','à©š'=>'à©š','à©›'=>'à©›','à©œ'=>'à©œ','à©ž'=>'à©ž','੦'=>'0','੧'=>'1','੨'=>'2','à©©'=>'3','੪'=>'4','à©«'=>'5','੬'=>'6','à©­'=>'7','à©®'=>'8','੯'=>'9','à©°'=>'à©°','ੱ'=>'ੱ','ੲ'=>'ੲ','ੳ'=>'ੳ','à©´'=>'à©´','àª'=>'àª','ં'=>'ં','ઃ'=>'ઃ','અ'=>'અ','આ'=>'આ','ઇ'=>'ઇ','ઈ'=>'ઈ','ઉ'=>'ઉ','ઊ'=>'ઊ','ઋ'=>'ઋ','ઌ'=>'ઌ','àª'=>'àª','àª'=>'àª','àª'=>'àª','ઑ'=>'ઑ','ઓ'=>'ઓ','ઔ'=>'ઔ','ક'=>'ક','ખ'=>'ખ','ગ'=>'ગ','ઘ'=>'ઘ','ઙ'=>'ઙ','ચ'=>'ચ','છ'=>'છ','જ'=>'જ','àª'=>'àª','ઞ'=>'ઞ','ટ'=>'ટ','ઠ'=>'ઠ','ડ'=>'ડ','ઢ'=>'ઢ','ણ'=>'ણ','ત'=>'ત','થ'=>'થ','દ'=>'દ','ધ'=>'ધ','ન'=>'ન','પ'=>'પ','ફ'=>'ફ','બ'=>'બ','ભ'=>'ભ','મ'=>'મ','ય'=>'ય','ર'=>'ર','લ'=>'લ','ળ'=>'ળ','વ'=>'વ','શ'=>'શ','ષ'=>'ષ','સ'=>'સ','હ'=>'હ','઼'=>'઼','ઽ'=>'ઽ','ા'=>'ા','િ'=>'િ','à«€'=>'à«€','à«'=>'à«','à«‚'=>'à«‚','ૃ'=>'ૃ','à«„'=>'à«„','à«…'=>'à«…','ે'=>'ે','ૈ'=>'ૈ','ૉ'=>'ૉ','à«‹'=>'à«‹','à«Œ'=>'à«Œ','à«'=>'à«','à«'=>'à«','à« '=>'à« ','à«¡'=>'à«¡','à«¢'=>'à«¢','à«£'=>'à«£','૦'=>'0','૧'=>'1','૨'=>'2','à«©'=>'3','૪'=>'4','à««'=>'5','૬'=>'6','à«­'=>'7','à«®'=>'8','૯'=>'9','à¬'=>'à¬','ଂ'=>'ଂ','ଃ'=>'ଃ','ଅ'=>'ଅ','ଆ'=>'ଆ','ଇ'=>'ଇ','ଈ'=>'ଈ','ଉ'=>'ଉ','ଊ'=>'ଊ','ଋ'=>'ଋ','ଌ'=>'ଌ','à¬'=>'à¬','à¬'=>'à¬','ଓ'=>'ଓ','ଔ'=>'ଔ','କ'=>'କ','ଖ'=>'ଖ','ଗ'=>'ଗ','ଘ'=>'ଘ','ଙ'=>'ଙ','ଚ'=>'ଚ','ଛ'=>'ଛ','ଜ'=>'ଜ','à¬'=>'à¬','ଞ'=>'ଞ','ଟ'=>'ଟ','ଠ'=>'ଠ','ଡ'=>'ଡ','ଢ'=>'ଢ','ଣ'=>'ଣ','ତ'=>'ତ','ଥ'=>'ଥ','ଦ'=>'ଦ','ଧ'=>'ଧ','ନ'=>'ନ','ପ'=>'ପ','ଫ'=>'ଫ','ବ'=>'ବ','ଭ'=>'ଭ','ମ'=>'ମ','ଯ'=>'ଯ','ର'=>'ର','ଲ'=>'ଲ','ଳ'=>'ଳ','ଵ'=>'ଵ','ଶ'=>'ଶ','ଷ'=>'ଷ','ସ'=>'ସ','ହ'=>'ହ','଼'=>'଼','ଽ'=>'ଽ','ା'=>'ା','ି'=>'ି','à­€'=>'à­€','à­'=>'à­','à­‚'=>'à­‚','à­ƒ'=>'à­ƒ','à­‡'=>'à­‡','à­ˆ'=>'à­ˆ','à­‹'=>'à­‹','à­Œ'=>'à­Œ','à­'=>'à­','à­–'=>'à­–','à­—'=>'à­—','à­œ'=>'à­œ','à­'=>'à­','à­Ÿ'=>'à­Ÿ','à­ '=>'à­ ','à­¡'=>'à­¡','à­¦'=>'0','à­§'=>'1','à­¨'=>'2','à­©'=>'3','à­ª'=>'4','à­«'=>'5','à­¬'=>'6','à­­'=>'7','à­®'=>'8','à­¯'=>'9','à­±'=>'à­±','ஂ'=>'ஂ','ஃ'=>'ஃ','à®…'=>'à®…','ஆ'=>'ஆ','இ'=>'இ','ஈ'=>'ஈ','உ'=>'உ','ஊ'=>'ஊ','எ'=>'எ','à®'=>'à®','à®'=>'à®','à®’'=>'à®’','ஓ'=>'ஓ','à®”'=>'à®”','க'=>'க','à®™'=>'à®™','ச'=>'ச','ஜ'=>'ஜ','ஞ'=>'ஞ','ட'=>'ட','ண'=>'ண','த'=>'த','ந'=>'ந','ன'=>'ன','ப'=>'ப','à®®'=>'à®®','ய'=>'ய','à®°'=>'à®°','à®±'=>'à®±','ல'=>'ல','ள'=>'ள','à®´'=>'à®´','வ'=>'வ','ஶ'=>'ஶ','à®·'=>'à®·','ஸ'=>'ஸ','ஹ'=>'ஹ','ா'=>'ா','ி'=>'ி','ீ'=>'ீ','à¯'=>'à¯','ூ'=>'ூ','ெ'=>'ெ','ே'=>'ே','ை'=>'ை','ொ'=>'ொ','ோ'=>'ோ','ௌ'=>'ௌ','à¯'=>'à¯','ௗ'=>'ௗ','௦'=>'0','௧'=>'1','௨'=>'2','௩'=>'3','௪'=>'4','௫'=>'5','௬'=>'6','௭'=>'7','௮'=>'8','௯'=>'9','௰'=>'10','௱'=>'100','௲'=>'1000','à°'=>'à°','à°‚'=>'à°‚','à°ƒ'=>'à°ƒ','à°…'=>'à°…','à°†'=>'à°†','à°‡'=>'à°‡','à°ˆ'=>'à°ˆ','à°‰'=>'à°‰','à°Š'=>'à°Š','à°‹'=>'à°‹','à°Œ'=>'à°Œ','à°Ž'=>'à°Ž','à°'=>'à°','à°'=>'à°','à°’'=>'à°’','à°“'=>'à°“','à°”'=>'à°”','à°•'=>'à°•','à°–'=>'à°–','à°—'=>'à°—','à°˜'=>'à°˜','à°™'=>'à°™','à°š'=>'à°š','à°›'=>'à°›','à°œ'=>'à°œ','à°'=>'à°','à°ž'=>'à°ž','à°Ÿ'=>'à°Ÿ','à° '=>'à° ','à°¡'=>'à°¡','à°¢'=>'à°¢','à°£'=>'à°£','à°¤'=>'à°¤','à°¥'=>'à°¥','à°¦'=>'à°¦','à°§'=>'à°§','à°¨'=>'à°¨','à°ª'=>'à°ª','à°«'=>'à°«','à°¬'=>'à°¬','à°­'=>'à°­','à°®'=>'à°®','à°¯'=>'à°¯','à°°'=>'à°°','à°±'=>'à°±','à°²'=>'à°²','à°³'=>'à°³','à°µ'=>'à°µ','à°¶'=>'à°¶','à°·'=>'à°·','à°¸'=>'à°¸','à°¹'=>'à°¹','à°¾'=>'à°¾','à°¿'=>'à°¿','à±€'=>'à±€','à±'=>'à±','ూ'=>'ూ','ృ'=>'ృ','ౄ'=>'ౄ','ె'=>'ె','ే'=>'ే','ై'=>'ై','ొ'=>'ొ','ో'=>'ో','ౌ'=>'ౌ','à±'=>'à±','ౕ'=>'ౕ','à±–'=>'à±–','à± '=>'à± ','ౡ'=>'ౡ','౦'=>'0','౧'=>'1','౨'=>'2','౩'=>'3','౪'=>'4','౫'=>'5','౬'=>'6','à±­'=>'7','à±®'=>'8','౯'=>'9','ಂ'=>'ಂ','ಃ'=>'ಃ','ಅ'=>'ಅ','ಆ'=>'ಆ','ಇ'=>'ಇ','ಈ'=>'ಈ','ಉ'=>'ಉ','ಊ'=>'ಊ','ಋ'=>'ಋ','ಌ'=>'ಌ','ಎ'=>'ಎ','à²'=>'à²','à²'=>'à²','ಒ'=>'ಒ','ಓ'=>'ಓ','ಔ'=>'ಔ','ಕ'=>'ಕ','ಖ'=>'ಖ','ಗ'=>'ಗ','ಘ'=>'ಘ','ಙ'=>'ಙ','ಚ'=>'ಚ','ಛ'=>'ಛ','ಜ'=>'ಜ','à²'=>'à²','ಞ'=>'ಞ','ಟ'=>'ಟ','ಠ'=>'ಠ','ಡ'=>'ಡ','ಢ'=>'ಢ','ಣ'=>'ಣ','ತ'=>'ತ','ಥ'=>'ಥ','ದ'=>'ದ','ಧ'=>'ಧ','ನ'=>'ನ','ಪ'=>'ಪ','ಫ'=>'ಫ','ಬ'=>'ಬ','ಭ'=>'ಭ','ಮ'=>'ಮ','ಯ'=>'ಯ','ರ'=>'ರ','ಱ'=>'ಱ','ಲ'=>'ಲ','ಳ'=>'ಳ','ವ'=>'ವ','ಶ'=>'ಶ','ಷ'=>'ಷ','ಸ'=>'ಸ','ಹ'=>'ಹ','಼'=>'಼','ಽ'=>'ಽ','ಾ'=>'ಾ','ಿ'=>'ಿ','à³€'=>'à³€','à³'=>'à³','ೂ'=>'ೂ','ೃ'=>'ೃ','ೄ'=>'ೄ','ೆ'=>'ೆ','ೇ'=>'ೇ','ೈ'=>'ೈ','ೊ'=>'ೊ','ೋ'=>'ೋ','ೌ'=>'ೌ','à³'=>'à³','ೕ'=>'ೕ','à³–'=>'à³–','ೞ'=>'ೞ','à³ '=>'à³ ','ೡ'=>'ೡ','à³¢'=>'à³¢','à³£'=>'à³£','೦'=>'0','೧'=>'1','೨'=>'2','೩'=>'3','೪'=>'4','೫'=>'5','೬'=>'6','à³­'=>'7','à³®'=>'8','೯'=>'9','à´‚'=>'à´‚','à´ƒ'=>'à´ƒ','à´…'=>'à´…','à´†'=>'à´†','à´‡'=>'à´‡','à´ˆ'=>'à´ˆ','à´‰'=>'à´‰','à´Š'=>'à´Š','à´‹'=>'à´‹','à´Œ'=>'à´Œ','à´Ž'=>'à´Ž','à´'=>'à´','à´'=>'à´','à´’'=>'à´’','à´“'=>'à´“','à´”'=>'à´”','à´•'=>'à´•','à´–'=>'à´–','à´—'=>'à´—','à´˜'=>'à´˜','à´™'=>'à´™','à´š'=>'à´š','à´›'=>'à´›','à´œ'=>'à´œ','à´'=>'à´','à´ž'=>'à´ž','à´Ÿ'=>'à´Ÿ','à´ '=>'à´ ','à´¡'=>'à´¡','à´¢'=>'à´¢','à´£'=>'à´£','à´¤'=>'à´¤','à´¥'=>'à´¥','à´¦'=>'à´¦','à´§'=>'à´§','à´¨'=>'à´¨','à´ª'=>'à´ª','à´«'=>'à´«','à´¬'=>'à´¬','à´­'=>'à´­','à´®'=>'à´®','à´¯'=>'à´¯','à´°'=>'à´°','à´±'=>'à´±','à´²'=>'à´²','à´³'=>'à´³','à´´'=>'à´´','à´µ'=>'à´µ','à´¶'=>'à´¶','à´·'=>'à´·','à´¸'=>'à´¸','à´¹'=>'à´¹','à´¾'=>'à´¾','à´¿'=>'à´¿','ീ'=>'ീ','àµ'=>'àµ','ൂ'=>'ൂ','ൃ'=>'ൃ','െ'=>'െ','േ'=>'േ','ൈ'=>'ൈ','ൊ'=>'ൊ','ോ'=>'ോ','ൌ'=>'ൌ','àµ'=>'àµ','ൗ'=>'ൗ','ൠ'=>'ൠ','ൡ'=>'ൡ','൦'=>'0','൧'=>'1','൨'=>'2','൩'=>'3','൪'=>'4','൫'=>'5','൬'=>'6','൭'=>'7','൮'=>'8','൯'=>'9','ං'=>'ං','ඃ'=>'ඃ','අ'=>'අ','ආ'=>'ආ','ඇ'=>'ඇ','ඈ'=>'ඈ','ඉ'=>'ඉ','ඊ'=>'ඊ','උ'=>'උ','ඌ'=>'ඌ','à¶'=>'à¶','ඎ'=>'ඎ','à¶'=>'à¶','à¶'=>'à¶','එ'=>'එ','ඒ'=>'ඒ','ඓ'=>'ඓ','ඔ'=>'ඔ','ඕ'=>'ඕ','ඖ'=>'ඖ','ක'=>'ක','ඛ'=>'ඛ','ග'=>'ග','à¶'=>'à¶','ඞ'=>'ඞ','ඟ'=>'ඟ','ච'=>'ච','ඡ'=>'ඡ','ජ'=>'ජ','ඣ'=>'ඣ','ඤ'=>'ඤ','ඥ'=>'ඥ','ඦ'=>'ඦ','ට'=>'ට','ඨ'=>'ඨ','ඩ'=>'ඩ','ඪ'=>'ඪ','ණ'=>'ණ','ඬ'=>'ඬ','ත'=>'ත','ථ'=>'ථ','ද'=>'ද','ධ'=>'ධ','න'=>'න','ඳ'=>'ඳ','ප'=>'ප','ඵ'=>'ඵ','බ'=>'බ','භ'=>'භ','ම'=>'ම','ඹ'=>'ඹ','ය'=>'ය','ර'=>'ර','ල'=>'ල','à·€'=>'à·€','à·'=>'à·','à·‚'=>'à·‚','à·ƒ'=>'à·ƒ','à·„'=>'à·„','à·…'=>'à·…','à·†'=>'à·†','à·Š'=>'à·Š','à·'=>'à·','à·'=>'à·','à·‘'=>'à·‘','à·’'=>'à·’','à·“'=>'à·“','à·”'=>'à·”','à·–'=>'à·–','à·˜'=>'à·˜','à·™'=>'à·™','à·š'=>'à·š','à·›'=>'à·›','à·œ'=>'à·œ','à·'=>'à·','à·ž'=>'à·ž','à·Ÿ'=>'à·Ÿ','à·²'=>'à·²','à·³'=>'à·³','à¸'=>'à¸','ข'=>'ข','ฃ'=>'ฃ','ค'=>'ค','ฅ'=>'ฅ','ฆ'=>'ฆ','ง'=>'ง','จ'=>'จ','ฉ'=>'ฉ','ช'=>'ช','ซ'=>'ซ','ฌ'=>'ฌ','à¸'=>'à¸','ฎ'=>'ฎ','à¸'=>'à¸','à¸'=>'à¸','ฑ'=>'ฑ','ฒ'=>'ฒ','ณ'=>'ณ','ด'=>'ด','ต'=>'ต','ถ'=>'ถ','ท'=>'ท','ธ'=>'ธ','น'=>'น','บ'=>'บ','ป'=>'ป','ผ'=>'ผ','à¸'=>'à¸','พ'=>'พ','ฟ'=>'ฟ','ภ'=>'ภ','ม'=>'ม','ย'=>'ย','ร'=>'ร','ฤ'=>'ฤ','ล'=>'ล','ฦ'=>'ฦ','ว'=>'ว','ศ'=>'ศ','ษ'=>'ษ','ส'=>'ส','ห'=>'ห','ฬ'=>'ฬ','อ'=>'อ','ฮ'=>'ฮ','ฯ'=>'ฯ','ะ'=>'ะ','ั'=>'ั','า'=>'า','ำ'=>'ำ','ิ'=>'ิ','ี'=>'ี','ึ'=>'ึ','ื'=>'ื','ุ'=>'ุ','ู'=>'ู','ฺ'=>'ฺ','เ'=>'เ','à¹'=>'à¹','โ'=>'โ','ใ'=>'ใ','ไ'=>'ไ','ๅ'=>'ๅ','ๆ'=>'ๆ','็'=>'็','่'=>'่','้'=>'้','๊'=>'๊','๋'=>'๋','์'=>'์','à¹'=>'à¹','๎'=>'๎','à¹'=>'0','๑'=>'1','๒'=>'2','๓'=>'3','๔'=>'4','๕'=>'5','๖'=>'6','๗'=>'7','๘'=>'8','๙'=>'9','àº'=>'àº','ຂ'=>'ຂ','ຄ'=>'ຄ','ງ'=>'ງ','ຈ'=>'ຈ','ຊ'=>'ຊ','àº'=>'àº','ດ'=>'ດ','ຕ'=>'ຕ','ຖ'=>'ຖ','ທ'=>'ທ','ນ'=>'ນ','ບ'=>'ບ','ປ'=>'ປ','ຜ'=>'ຜ','àº'=>'àº','ພ'=>'ພ','ຟ'=>'ຟ','ມ'=>'ມ','ຢ'=>'ຢ','ຣ'=>'ຣ','ລ'=>'ລ','ວ'=>'ວ','ສ'=>'ສ','ຫ'=>'ຫ','ອ'=>'ອ','ຮ'=>'ຮ','ຯ'=>'ຯ','ະ'=>'ະ','ັ'=>'ັ','າ'=>'າ','ຳ'=>'ຳ','ິ'=>'ິ','ີ'=>'ີ','ຶ'=>'ຶ','ື'=>'ື','ຸ'=>'ຸ','ູ'=>'ູ','ົ'=>'ົ','ຼ'=>'ຼ','ຽ'=>'ຽ','ເ'=>'ເ','à»'=>'à»','ໂ'=>'ໂ','ໃ'=>'ໃ','ໄ'=>'ໄ','ໆ'=>'ໆ','່'=>'່','້'=>'້','໊'=>'໊','໋'=>'໋','໌'=>'໌','à»'=>'à»','à»'=>'0','໑'=>'1','à»’'=>'2','໓'=>'3','à»”'=>'4','໕'=>'5','à»–'=>'6','à»—'=>'7','໘'=>'8','à»™'=>'9','ໜ'=>'ໜ','à»'=>'à»','ༀ'=>'ༀ','༘'=>'༘','༙'=>'༙','༠'=>'0','༡'=>'1','༢'=>'2','༣'=>'3','༤'=>'4','༥'=>'5','༦'=>'6','༧'=>'7','༨'=>'8','༩'=>'9','༪'=>'1/2','༫'=>'3/2','༬'=>'5/2','༭'=>'7/2','༮'=>'9/2','༯'=>'11/2','༰'=>'13/2','༱'=>'15/2','༲'=>'17/2','༳'=>'-1/2','༵'=>'༵','༷'=>'༷','༹'=>'༹','༾'=>'༾','༿'=>'༿','ཀ'=>'ཀ','à½'=>'à½','ག'=>'ག','གྷ'=>'གྷ','ང'=>'ང','ཅ'=>'ཅ','ཆ'=>'ཆ','ཇ'=>'ཇ','ཉ'=>'ཉ','ཊ'=>'ཊ','ཋ'=>'ཋ','ཌ'=>'ཌ','à½'=>'à½','ཎ'=>'ཎ','à½'=>'à½','à½'=>'à½','ད'=>'ད','དྷ'=>'དྷ','ན'=>'ན','པ'=>'པ','ཕ'=>'ཕ','བ'=>'བ','བྷ'=>'བྷ','མ'=>'མ','ཙ'=>'ཙ','ཚ'=>'ཚ','ཛ'=>'ཛ','ཛྷ'=>'ཛྷ','à½'=>'à½','ཞ'=>'ཞ','ཟ'=>'ཟ','འ'=>'འ','ཡ'=>'ཡ','ར'=>'ར','ལ'=>'ལ','ཤ'=>'ཤ','ཥ'=>'ཥ','ས'=>'ས','ཧ'=>'ཧ','ཨ'=>'ཨ','ཀྵ'=>'ཀྵ','ཪ'=>'ཪ','ཱ'=>'ཱ','ི'=>'ི','ཱི'=>'ཱི','ུ'=>'ུ','ཱུ'=>'ཱུ','ྲྀ'=>'ྲྀ','ཷ'=>'ཷ','ླྀ'=>'ླྀ','ཹ'=>'ཹ','ེ'=>'ེ','ཻ'=>'ཻ','ོ'=>'ོ','ཽ'=>'ཽ','ཾ'=>'ཾ','ཿ'=>'ཿ','ྀ'=>'ྀ','à¾'=>'à¾','ྂ'=>'ྂ','ྃ'=>'ྃ','྄'=>'྄','྆'=>'྆','྇'=>'྇','ྈ'=>'ྈ','ྉ'=>'ྉ','ྊ'=>'ྊ','ྋ'=>'ྋ','à¾'=>'à¾','ྑ'=>'ྑ','ྒ'=>'ྒ','ྒྷ'=>'ྒྷ','ྔ'=>'ྔ','ྕ'=>'ྕ','ྖ'=>'ྖ','ྗ'=>'ྗ','ྙ'=>'ྙ','ྚ'=>'ྚ','ྛ'=>'ྛ','ྜ'=>'ྜ','à¾'=>'à¾','ྞ'=>'ྞ','ྟ'=>'ྟ','ྠ'=>'ྠ','ྡ'=>'ྡ','ྡྷ'=>'ྡྷ','ྣ'=>'ྣ','ྤ'=>'ྤ','ྥ'=>'ྥ','ྦ'=>'ྦ','ྦྷ'=>'ྦྷ','ྨ'=>'ྨ','ྩ'=>'ྩ','ྪ'=>'ྪ','ྫ'=>'ྫ','ྫྷ'=>'ྫྷ','ྭ'=>'ྭ','ྮ'=>'ྮ','ྯ'=>'ྯ','ྰ'=>'ྰ','ྱ'=>'ྱ','ྲ'=>'ྲ','ླ'=>'ླ','ྴ'=>'ྴ','ྵ'=>'ྵ','ྶ'=>'ྶ','ྷ'=>'ྷ','ྸ'=>'ྸ','ྐྵ'=>'ྐྵ','ྺ'=>'ྺ','ྻ'=>'ྻ','ྼ'=>'ྼ','࿆'=>'࿆'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_19.php b/phpBB/includes/utf/data/search_indexer_19.php
new file mode 100644
index 0000000000..e26f7d81a0
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_19.php
@@ -0,0 +1 @@
+<?php return array('é¾»'=>'é¾»'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_2.php b/phpBB/includes/utf/data/search_indexer_2.php
new file mode 100644
index 0000000000..751226ed22
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_2.php
@@ -0,0 +1 @@
+<?php return array('က'=>'က','á€'=>'á€','ဂ'=>'ဂ','ဃ'=>'ဃ','င'=>'င','စ'=>'စ','ဆ'=>'ဆ','ဇ'=>'ဇ','ဈ'=>'ဈ','ဉ'=>'ဉ','ည'=>'ည','ဋ'=>'ဋ','ဌ'=>'ဌ','á€'=>'á€','ဎ'=>'ဎ','á€'=>'á€','á€'=>'á€','ထ'=>'ထ','ဒ'=>'ဒ','ဓ'=>'ဓ','န'=>'န','ပ'=>'ပ','ဖ'=>'ဖ','ဗ'=>'ဗ','ဘ'=>'ဘ','မ'=>'မ','ယ'=>'ယ','ရ'=>'ရ','လ'=>'လ','á€'=>'á€','သ'=>'သ','ဟ'=>'ဟ','ဠ'=>'ဠ','အ'=>'အ','ဣ'=>'ဣ','ဤ'=>'ဤ','ဥ'=>'ဥ','ဦ'=>'ဦ','ဧ'=>'ဧ','ဩ'=>'ဩ','ဪ'=>'ဪ','ာ'=>'ာ','ိ'=>'ိ','ီ'=>'ီ','ု'=>'ု','ူ'=>'ူ','ေ'=>'ေ','ဲ'=>'ဲ','ံ'=>'ံ','့'=>'့','း'=>'း','္'=>'္','á€'=>'0','á'=>'1','á‚'=>'2','áƒ'=>'3','á„'=>'4','á…'=>'5','á†'=>'6','á‡'=>'7','áˆ'=>'8','á‰'=>'9','á'=>'á','á‘'=>'á‘','á’'=>'á’','á“'=>'á“','á”'=>'á”','á•'=>'á•','á–'=>'á–','á—'=>'á—','á˜'=>'á˜','á™'=>'á™','á‚ '=>'â´€','á‚¡'=>'â´','á‚¢'=>'â´‚','á‚£'=>'â´ƒ','Ⴄ'=>'â´„','á‚¥'=>'â´…','Ⴆ'=>'â´†','Ⴇ'=>'â´‡','Ⴈ'=>'â´ˆ','á‚©'=>'â´‰','Ⴊ'=>'â´Š','á‚«'=>'â´‹','Ⴌ'=>'â´Œ','á‚­'=>'â´','á‚®'=>'â´Ž','Ⴏ'=>'â´','á‚°'=>'â´','Ⴑ'=>'â´‘','Ⴒ'=>'â´’','Ⴓ'=>'â´“','á‚´'=>'â´”','Ⴕ'=>'â´•','Ⴖ'=>'â´–','á‚·'=>'â´—','Ⴘ'=>'â´˜','Ⴙ'=>'â´™','Ⴚ'=>'â´š','á‚»'=>'â´›','Ⴜ'=>'â´œ','Ⴝ'=>'â´','Ⴞ'=>'â´ž','á‚¿'=>'â´Ÿ','Ⴠ'=>'â´ ','áƒ'=>'â´¡','Ⴢ'=>'â´¢','Ⴣ'=>'â´£','Ⴤ'=>'â´¤','Ⴥ'=>'â´¥','áƒ'=>'áƒ','ბ'=>'ბ','გ'=>'გ','დ'=>'დ','ე'=>'ე','ვ'=>'ვ','ზ'=>'ზ','თ'=>'თ','ი'=>'ი','კ'=>'კ','ლ'=>'ლ','მ'=>'მ','ნ'=>'ნ','áƒ'=>'áƒ','პ'=>'პ','ჟ'=>'ჟ','რ'=>'რ','ს'=>'ს','ტ'=>'ტ','უ'=>'უ','ფ'=>'ფ','ქ'=>'ქ','ღ'=>'ღ','ყ'=>'ყ','შ'=>'შ','ჩ'=>'ჩ','ც'=>'ც','ძ'=>'ძ','წ'=>'წ','ჭ'=>'ჭ','ხ'=>'ხ','ჯ'=>'ჯ','ჰ'=>'ჰ','ჱ'=>'ჱ','ჲ'=>'ჲ','ჳ'=>'ჳ','ჴ'=>'ჴ','ჵ'=>'ჵ','ჶ'=>'ჶ','ჷ'=>'ჷ','ჸ'=>'ჸ','ჹ'=>'ჹ','ჺ'=>'ჺ','ჼ'=>'ჼ','á„€'=>'á„€','á„'=>'á„','á„‚'=>'á„‚','ᄃ'=>'ᄃ','á„„'=>'á„„','á„…'=>'á„…','ᄆ'=>'ᄆ','ᄇ'=>'ᄇ','ᄈ'=>'ᄈ','ᄉ'=>'ᄉ','á„Š'=>'á„Š','á„‹'=>'á„‹','á„Œ'=>'á„Œ','á„'=>'á„','á„Ž'=>'á„Ž','á„'=>'á„','á„'=>'á„','á„‘'=>'á„‘','á„’'=>'á„’','á„“'=>'á„“','á„”'=>'á„”','á„•'=>'á„•','á„–'=>'á„–','á„—'=>'á„—','ᄘ'=>'ᄘ','á„™'=>'á„™','á„š'=>'á„š','á„›'=>'á„›','á„œ'=>'á„œ','á„'=>'á„','á„ž'=>'á„ž','á„Ÿ'=>'á„Ÿ','á„ '=>'á„ ','á„¡'=>'á„¡','á„¢'=>'á„¢','á„£'=>'á„£','ᄤ'=>'ᄤ','á„¥'=>'á„¥','ᄦ'=>'ᄦ','ᄧ'=>'ᄧ','ᄨ'=>'ᄨ','á„©'=>'á„©','ᄪ'=>'ᄪ','á„«'=>'á„«','ᄬ'=>'ᄬ','á„­'=>'á„­','á„®'=>'á„®','ᄯ'=>'ᄯ','á„°'=>'á„°','ᄱ'=>'ᄱ','ᄲ'=>'ᄲ','ᄳ'=>'ᄳ','á„´'=>'á„´','ᄵ'=>'ᄵ','ᄶ'=>'ᄶ','á„·'=>'á„·','ᄸ'=>'ᄸ','ᄹ'=>'ᄹ','ᄺ'=>'ᄺ','á„»'=>'á„»','ᄼ'=>'ᄼ','ᄽ'=>'ᄽ','ᄾ'=>'ᄾ','á„¿'=>'á„¿','á…€'=>'á…€','á…'=>'á…','á…‚'=>'á…‚','á…ƒ'=>'á…ƒ','á…„'=>'á…„','á……'=>'á……','á…†'=>'á…†','á…‡'=>'á…‡','á…ˆ'=>'á…ˆ','á…‰'=>'á…‰','á…Š'=>'á…Š','á…‹'=>'á…‹','á…Œ'=>'á…Œ','á…'=>'á…','á…Ž'=>'á…Ž','á…'=>'á…','á…'=>'á…','á…‘'=>'á…‘','á…’'=>'á…’','á…“'=>'á…“','á…”'=>'á…”','á…•'=>'á…•','á…–'=>'á…–','á…—'=>'á…—','á…˜'=>'á…˜','á…™'=>'á…™','á…Ÿ'=>'á…Ÿ','á… '=>'á… ','á…¡'=>'á…¡','á…¢'=>'á…¢','á…£'=>'á…£','á…¤'=>'á…¤','á…¥'=>'á…¥','á…¦'=>'á…¦','á…§'=>'á…§','á…¨'=>'á…¨','á…©'=>'á…©','á…ª'=>'á…ª','á…«'=>'á…«','á…¬'=>'á…¬','á…­'=>'á…­','á…®'=>'á…®','á…¯'=>'á…¯','á…°'=>'á…°','á…±'=>'á…±','á…²'=>'á…²','á…³'=>'á…³','á…´'=>'á…´','á…µ'=>'á…µ','á…¶'=>'á…¶','á…·'=>'á…·','á…¸'=>'á…¸','á…¹'=>'á…¹','á…º'=>'á…º','á…»'=>'á…»','á…¼'=>'á…¼','á…½'=>'á…½','á…¾'=>'á…¾','á…¿'=>'á…¿','ᆀ'=>'ᆀ','á†'=>'á†','ᆂ'=>'ᆂ','ᆃ'=>'ᆃ','ᆄ'=>'ᆄ','ᆅ'=>'ᆅ','ᆆ'=>'ᆆ','ᆇ'=>'ᆇ','ᆈ'=>'ᆈ','ᆉ'=>'ᆉ','ᆊ'=>'ᆊ','ᆋ'=>'ᆋ','ᆌ'=>'ᆌ','á†'=>'á†','ᆎ'=>'ᆎ','á†'=>'á†','á†'=>'á†','ᆑ'=>'ᆑ','ᆒ'=>'ᆒ','ᆓ'=>'ᆓ','ᆔ'=>'ᆔ','ᆕ'=>'ᆕ','ᆖ'=>'ᆖ','ᆗ'=>'ᆗ','ᆘ'=>'ᆘ','ᆙ'=>'ᆙ','ᆚ'=>'ᆚ','ᆛ'=>'ᆛ','ᆜ'=>'ᆜ','á†'=>'á†','ᆞ'=>'ᆞ','ᆟ'=>'ᆟ','ᆠ'=>'ᆠ','ᆡ'=>'ᆡ','ᆢ'=>'ᆢ','ᆨ'=>'ᆨ','ᆩ'=>'ᆩ','ᆪ'=>'ᆪ','ᆫ'=>'ᆫ','ᆬ'=>'ᆬ','ᆭ'=>'ᆭ','ᆮ'=>'ᆮ','ᆯ'=>'ᆯ','ᆰ'=>'ᆰ','ᆱ'=>'ᆱ','ᆲ'=>'ᆲ','ᆳ'=>'ᆳ','ᆴ'=>'ᆴ','ᆵ'=>'ᆵ','ᆶ'=>'ᆶ','ᆷ'=>'ᆷ','ᆸ'=>'ᆸ','ᆹ'=>'ᆹ','ᆺ'=>'ᆺ','ᆻ'=>'ᆻ','ᆼ'=>'ᆼ','ᆽ'=>'ᆽ','ᆾ'=>'ᆾ','ᆿ'=>'ᆿ','ᇀ'=>'ᇀ','á‡'=>'á‡','ᇂ'=>'ᇂ','ᇃ'=>'ᇃ','ᇄ'=>'ᇄ','ᇅ'=>'ᇅ','ᇆ'=>'ᇆ','ᇇ'=>'ᇇ','ᇈ'=>'ᇈ','ᇉ'=>'ᇉ','ᇊ'=>'ᇊ','ᇋ'=>'ᇋ','ᇌ'=>'ᇌ','á‡'=>'á‡','ᇎ'=>'ᇎ','á‡'=>'á‡','á‡'=>'á‡','ᇑ'=>'ᇑ','ᇒ'=>'ᇒ','ᇓ'=>'ᇓ','ᇔ'=>'ᇔ','ᇕ'=>'ᇕ','ᇖ'=>'ᇖ','ᇗ'=>'ᇗ','ᇘ'=>'ᇘ','ᇙ'=>'ᇙ','ᇚ'=>'ᇚ','ᇛ'=>'ᇛ','ᇜ'=>'ᇜ','á‡'=>'á‡','ᇞ'=>'ᇞ','ᇟ'=>'ᇟ','ᇠ'=>'ᇠ','ᇡ'=>'ᇡ','ᇢ'=>'ᇢ','ᇣ'=>'ᇣ','ᇤ'=>'ᇤ','ᇥ'=>'ᇥ','ᇦ'=>'ᇦ','ᇧ'=>'ᇧ','ᇨ'=>'ᇨ','ᇩ'=>'ᇩ','ᇪ'=>'ᇪ','ᇫ'=>'ᇫ','ᇬ'=>'ᇬ','ᇭ'=>'ᇭ','ᇮ'=>'ᇮ','ᇯ'=>'ᇯ','ᇰ'=>'ᇰ','ᇱ'=>'ᇱ','ᇲ'=>'ᇲ','ᇳ'=>'ᇳ','ᇴ'=>'ᇴ','ᇵ'=>'ᇵ','ᇶ'=>'ᇶ','ᇷ'=>'ᇷ','ᇸ'=>'ᇸ','ᇹ'=>'ᇹ','ሀ'=>'ሀ','áˆ'=>'áˆ','ሂ'=>'ሂ','ሃ'=>'ሃ','ሄ'=>'ሄ','ህ'=>'ህ','ሆ'=>'ሆ','ሇ'=>'ሇ','ለ'=>'ለ','ሉ'=>'ሉ','ሊ'=>'ሊ','ላ'=>'ላ','ሌ'=>'ሌ','áˆ'=>'áˆ','ሎ'=>'ሎ','áˆ'=>'áˆ','áˆ'=>'áˆ','ሑ'=>'ሑ','ሒ'=>'ሒ','ሓ'=>'ሓ','ሔ'=>'ሔ','ሕ'=>'ሕ','ሖ'=>'ሖ','ሗ'=>'ሗ','መ'=>'መ','ሙ'=>'ሙ','ሚ'=>'ሚ','ማ'=>'ማ','ሜ'=>'ሜ','áˆ'=>'áˆ','ሞ'=>'ሞ','ሟ'=>'ሟ','ሠ'=>'ሠ','ሡ'=>'ሡ','ሢ'=>'ሢ','ሣ'=>'ሣ','ሤ'=>'ሤ','ሥ'=>'ሥ','ሦ'=>'ሦ','ሧ'=>'ሧ','ረ'=>'ረ','ሩ'=>'ሩ','ሪ'=>'ሪ','ራ'=>'ራ','ሬ'=>'ሬ','ር'=>'ር','ሮ'=>'ሮ','ሯ'=>'ሯ','ሰ'=>'ሰ','ሱ'=>'ሱ','ሲ'=>'ሲ','ሳ'=>'ሳ','ሴ'=>'ሴ','ስ'=>'ስ','ሶ'=>'ሶ','ሷ'=>'ሷ','ሸ'=>'ሸ','ሹ'=>'ሹ','ሺ'=>'ሺ','ሻ'=>'ሻ','ሼ'=>'ሼ','ሽ'=>'ሽ','ሾ'=>'ሾ','ሿ'=>'ሿ','ቀ'=>'ቀ','á‰'=>'á‰','ቂ'=>'ቂ','ቃ'=>'ቃ','ቄ'=>'ቄ','ቅ'=>'ቅ','ቆ'=>'ቆ','ቇ'=>'ቇ','ቈ'=>'ቈ','ቊ'=>'ቊ','ቋ'=>'ቋ','ቌ'=>'ቌ','á‰'=>'á‰','á‰'=>'á‰','ቑ'=>'ቑ','ቒ'=>'ቒ','ቓ'=>'ቓ','ቔ'=>'ቔ','ቕ'=>'ቕ','ቖ'=>'ቖ','ቘ'=>'ቘ','ቚ'=>'ቚ','ቛ'=>'ቛ','ቜ'=>'ቜ','á‰'=>'á‰','በ'=>'በ','ቡ'=>'ቡ','ቢ'=>'ቢ','ባ'=>'ባ','ቤ'=>'ቤ','ብ'=>'ብ','ቦ'=>'ቦ','ቧ'=>'ቧ','ቨ'=>'ቨ','ቩ'=>'ቩ','ቪ'=>'ቪ','ቫ'=>'ቫ','ቬ'=>'ቬ','ቭ'=>'ቭ','ቮ'=>'ቮ','ቯ'=>'ቯ','ተ'=>'ተ','ቱ'=>'ቱ','ቲ'=>'ቲ','ታ'=>'ታ','ቴ'=>'ቴ','ት'=>'ት','ቶ'=>'ቶ','ቷ'=>'ቷ','ቸ'=>'ቸ','ቹ'=>'ቹ','ቺ'=>'ቺ','ቻ'=>'ቻ','ቼ'=>'ቼ','ች'=>'ች','ቾ'=>'ቾ','ቿ'=>'ቿ','ኀ'=>'ኀ','áŠ'=>'áŠ','ኂ'=>'ኂ','ኃ'=>'ኃ','ኄ'=>'ኄ','ኅ'=>'ኅ','ኆ'=>'ኆ','ኇ'=>'ኇ','ኈ'=>'ኈ','ኊ'=>'ኊ','ኋ'=>'ኋ','ኌ'=>'ኌ','áŠ'=>'áŠ','áŠ'=>'áŠ','ኑ'=>'ኑ','ኒ'=>'ኒ','ና'=>'ና','ኔ'=>'ኔ','ን'=>'ን','ኖ'=>'ኖ','ኗ'=>'ኗ','ኘ'=>'ኘ','ኙ'=>'ኙ','ኚ'=>'ኚ','ኛ'=>'ኛ','ኜ'=>'ኜ','áŠ'=>'áŠ','ኞ'=>'ኞ','ኟ'=>'ኟ','አ'=>'አ','ኡ'=>'ኡ','ኢ'=>'ኢ','ኣ'=>'ኣ','ኤ'=>'ኤ','እ'=>'እ','ኦ'=>'ኦ','ኧ'=>'ኧ','ከ'=>'ከ','ኩ'=>'ኩ','ኪ'=>'ኪ','ካ'=>'ካ','ኬ'=>'ኬ','ክ'=>'ክ','ኮ'=>'ኮ','ኯ'=>'ኯ','ኰ'=>'ኰ','ኲ'=>'ኲ','ኳ'=>'ኳ','ኴ'=>'ኴ','ኵ'=>'ኵ','ኸ'=>'ኸ','ኹ'=>'ኹ','ኺ'=>'ኺ','ኻ'=>'ኻ','ኼ'=>'ኼ','ኽ'=>'ኽ','ኾ'=>'ኾ','á‹€'=>'á‹€','á‹‚'=>'á‹‚','ዃ'=>'ዃ','á‹„'=>'á‹„','á‹…'=>'á‹…','ወ'=>'ወ','ዉ'=>'ዉ','á‹Š'=>'á‹Š','á‹‹'=>'á‹‹','á‹Œ'=>'á‹Œ','á‹'=>'á‹','á‹Ž'=>'á‹Ž','á‹'=>'á‹','á‹'=>'á‹','á‹‘'=>'á‹‘','á‹’'=>'á‹’','á‹“'=>'á‹“','á‹”'=>'á‹”','á‹•'=>'á‹•','á‹–'=>'á‹–','ዘ'=>'ዘ','á‹™'=>'á‹™','á‹š'=>'á‹š','á‹›'=>'á‹›','á‹œ'=>'á‹œ','á‹'=>'á‹','á‹ž'=>'á‹ž','á‹Ÿ'=>'á‹Ÿ','á‹ '=>'á‹ ','á‹¡'=>'á‹¡','á‹¢'=>'á‹¢','á‹£'=>'á‹£','ዤ'=>'ዤ','á‹¥'=>'á‹¥','ዦ'=>'ዦ','ዧ'=>'ዧ','የ'=>'የ','á‹©'=>'á‹©','ዪ'=>'ዪ','á‹«'=>'á‹«','ዬ'=>'ዬ','á‹­'=>'á‹­','á‹®'=>'á‹®','ዯ'=>'ዯ','á‹°'=>'á‹°','ዱ'=>'ዱ','ዲ'=>'ዲ','ዳ'=>'ዳ','á‹´'=>'á‹´','ድ'=>'ድ','ዶ'=>'ዶ','á‹·'=>'á‹·','ዸ'=>'ዸ','ዹ'=>'ዹ','ዺ'=>'ዺ','á‹»'=>'á‹»','ዼ'=>'ዼ','ዽ'=>'ዽ','ዾ'=>'ዾ','á‹¿'=>'á‹¿','ጀ'=>'ጀ','áŒ'=>'áŒ','ጂ'=>'ጂ','ጃ'=>'ጃ','ጄ'=>'ጄ','ጅ'=>'ጅ','ጆ'=>'ጆ','ጇ'=>'ጇ','ገ'=>'ገ','ጉ'=>'ጉ','ጊ'=>'ጊ','ጋ'=>'ጋ','ጌ'=>'ጌ','áŒ'=>'áŒ','ጎ'=>'ጎ','áŒ'=>'áŒ','áŒ'=>'áŒ','ጒ'=>'ጒ','ጓ'=>'ጓ','ጔ'=>'ጔ','ጕ'=>'ጕ','ጘ'=>'ጘ','ጙ'=>'ጙ','ጚ'=>'ጚ','ጛ'=>'ጛ','ጜ'=>'ጜ','áŒ'=>'áŒ','ጞ'=>'ጞ','ጟ'=>'ጟ','ጠ'=>'ጠ','ጡ'=>'ጡ','ጢ'=>'ጢ','ጣ'=>'ጣ','ጤ'=>'ጤ','ጥ'=>'ጥ','ጦ'=>'ጦ','ጧ'=>'ጧ','ጨ'=>'ጨ','ጩ'=>'ጩ','ጪ'=>'ጪ','ጫ'=>'ጫ','ጬ'=>'ጬ','ጭ'=>'ጭ','ጮ'=>'ጮ','ጯ'=>'ጯ','ጰ'=>'ጰ','ጱ'=>'ጱ','ጲ'=>'ጲ','ጳ'=>'ጳ','ጴ'=>'ጴ','ጵ'=>'ጵ','ጶ'=>'ጶ','ጷ'=>'ጷ','ጸ'=>'ጸ','ጹ'=>'ጹ','ጺ'=>'ጺ','ጻ'=>'ጻ','ጼ'=>'ጼ','ጽ'=>'ጽ','ጾ'=>'ጾ','ጿ'=>'ጿ','á€'=>'á€','á'=>'á','á‚'=>'á‚','áƒ'=>'áƒ','á„'=>'á„','á…'=>'á…','á†'=>'á†','á‡'=>'á‡','áˆ'=>'áˆ','á‰'=>'á‰','áŠ'=>'áŠ','á‹'=>'á‹','áŒ'=>'áŒ','á'=>'á','áŽ'=>'áŽ','á'=>'á','á'=>'á','á‘'=>'á‘','á’'=>'á’','á“'=>'á“','á”'=>'á”','á•'=>'á•','á–'=>'á–','á—'=>'á—','á˜'=>'á˜','á™'=>'á™','áš'=>'áš','áŸ'=>'áŸ','á©'=>'1','áª'=>'2','á«'=>'3','á¬'=>'4','á­'=>'5','á®'=>'6','á¯'=>'7','á°'=>'8','á±'=>'9','á²'=>'10','á³'=>'20','á´'=>'30','áµ'=>'40','á¶'=>'50','á·'=>'60','á¸'=>'70','á¹'=>'80','áº'=>'90','á»'=>'100','á¼'=>'10000','ᎀ'=>'ᎀ','áŽ'=>'áŽ','ᎂ'=>'ᎂ','ᎃ'=>'ᎃ','ᎄ'=>'ᎄ','ᎅ'=>'ᎅ','ᎆ'=>'ᎆ','ᎇ'=>'ᎇ','ᎈ'=>'ᎈ','ᎉ'=>'ᎉ','ᎊ'=>'ᎊ','ᎋ'=>'ᎋ','ᎌ'=>'ᎌ','áŽ'=>'áŽ','ᎎ'=>'ᎎ','áŽ'=>'áŽ','Ꭰ'=>'Ꭰ','Ꭱ'=>'Ꭱ','Ꭲ'=>'Ꭲ','Ꭳ'=>'Ꭳ','Ꭴ'=>'Ꭴ','Ꭵ'=>'Ꭵ','Ꭶ'=>'Ꭶ','Ꭷ'=>'Ꭷ','Ꭸ'=>'Ꭸ','Ꭹ'=>'Ꭹ','Ꭺ'=>'Ꭺ','Ꭻ'=>'Ꭻ','Ꭼ'=>'Ꭼ','Ꭽ'=>'Ꭽ','Ꭾ'=>'Ꭾ','Ꭿ'=>'Ꭿ','Ꮀ'=>'Ꮀ','Ꮁ'=>'Ꮁ','Ꮂ'=>'Ꮂ','Ꮃ'=>'Ꮃ','Ꮄ'=>'Ꮄ','Ꮅ'=>'Ꮅ','Ꮆ'=>'Ꮆ','Ꮇ'=>'Ꮇ','Ꮈ'=>'Ꮈ','Ꮉ'=>'Ꮉ','Ꮊ'=>'Ꮊ','Ꮋ'=>'Ꮋ','Ꮌ'=>'Ꮌ','Ꮍ'=>'Ꮍ','Ꮎ'=>'Ꮎ','Ꮏ'=>'Ꮏ','á€'=>'á€','á'=>'á','á‚'=>'á‚','áƒ'=>'áƒ','á„'=>'á„','á…'=>'á…','á†'=>'á†','á‡'=>'á‡','áˆ'=>'áˆ','á‰'=>'á‰','áŠ'=>'áŠ','á‹'=>'á‹','áŒ'=>'áŒ','á'=>'á','áŽ'=>'áŽ','á'=>'á','á'=>'á','á‘'=>'á‘','á’'=>'á’','á“'=>'á“','á”'=>'á”','á•'=>'á•','á–'=>'á–','á—'=>'á—','á˜'=>'á˜','á™'=>'á™','áš'=>'áš','á›'=>'á›','áœ'=>'áœ','á'=>'á','áž'=>'áž','áŸ'=>'áŸ','á '=>'á ','á¡'=>'á¡','á¢'=>'á¢','á£'=>'á£','á¤'=>'á¤','á¥'=>'á¥','á¦'=>'á¦','á§'=>'á§','á¨'=>'á¨','á©'=>'á©','áª'=>'áª','á«'=>'á«','á¬'=>'á¬','á­'=>'á­','á®'=>'á®','á¯'=>'á¯','á°'=>'á°','á±'=>'á±','á²'=>'á²','á³'=>'á³','á´'=>'á´','á'=>'á','á‚'=>'á‚','áƒ'=>'áƒ','á„'=>'á„','á…'=>'á…','á†'=>'á†','á‡'=>'á‡','áˆ'=>'áˆ','á‰'=>'á‰','áŠ'=>'áŠ','á‹'=>'á‹','áŒ'=>'áŒ','á'=>'á','áŽ'=>'áŽ','á'=>'á','á'=>'á','á‘'=>'á‘','á’'=>'á’','á“'=>'á“','á”'=>'á”','á•'=>'á•','á–'=>'á–','á—'=>'á—','á˜'=>'á˜','á™'=>'á™','áš'=>'áš','á›'=>'á›','áœ'=>'áœ','á'=>'á','áž'=>'áž','áŸ'=>'áŸ','á '=>'á ','á¡'=>'á¡','á¢'=>'á¢','á£'=>'á£','á¤'=>'á¤','á¥'=>'á¥','á¦'=>'á¦','á§'=>'á§','á¨'=>'á¨','á©'=>'á©','áª'=>'áª','á«'=>'á«','á¬'=>'á¬','á­'=>'á­','á®'=>'á®','á¯'=>'á¯','á°'=>'á°','á±'=>'á±','á²'=>'á²','á³'=>'á³','á´'=>'á´','áµ'=>'áµ','á¶'=>'á¶','á·'=>'á·','á¸'=>'á¸','á¹'=>'á¹','áº'=>'áº','á»'=>'á»','á¼'=>'á¼','á½'=>'á½','á¾'=>'á¾','á¿'=>'á¿','á‘€'=>'á‘€','á‘'=>'á‘','á‘‚'=>'á‘‚','ᑃ'=>'ᑃ','á‘„'=>'á‘„','á‘…'=>'á‘…','ᑆ'=>'ᑆ','ᑇ'=>'ᑇ','ᑈ'=>'ᑈ','ᑉ'=>'ᑉ','á‘Š'=>'á‘Š','á‘‹'=>'á‘‹','á‘Œ'=>'á‘Œ','á‘'=>'á‘','á‘Ž'=>'á‘Ž','á‘'=>'á‘','á‘'=>'á‘','á‘‘'=>'á‘‘','á‘’'=>'á‘’','á‘“'=>'á‘“','á‘”'=>'á‘”','á‘•'=>'á‘•','á‘–'=>'á‘–','á‘—'=>'á‘—','ᑘ'=>'ᑘ','á‘™'=>'á‘™','á‘š'=>'á‘š','á‘›'=>'á‘›','á‘œ'=>'á‘œ','á‘'=>'á‘','á‘ž'=>'á‘ž','á‘Ÿ'=>'á‘Ÿ','á‘ '=>'á‘ ','á‘¡'=>'á‘¡','á‘¢'=>'á‘¢','á‘£'=>'á‘£','ᑤ'=>'ᑤ','á‘¥'=>'á‘¥','ᑦ'=>'ᑦ','ᑧ'=>'ᑧ','ᑨ'=>'ᑨ','á‘©'=>'á‘©','ᑪ'=>'ᑪ','á‘«'=>'á‘«','ᑬ'=>'ᑬ','á‘­'=>'á‘­','á‘®'=>'á‘®','ᑯ'=>'ᑯ','á‘°'=>'á‘°','ᑱ'=>'ᑱ','ᑲ'=>'ᑲ','ᑳ'=>'ᑳ','á‘´'=>'á‘´','ᑵ'=>'ᑵ','ᑶ'=>'ᑶ','á‘·'=>'á‘·','ᑸ'=>'ᑸ','ᑹ'=>'ᑹ','ᑺ'=>'ᑺ','á‘»'=>'á‘»','ᑼ'=>'ᑼ','ᑽ'=>'ᑽ','ᑾ'=>'ᑾ','á‘¿'=>'á‘¿','á’€'=>'á’€','á’'=>'á’','á’‚'=>'á’‚','á’ƒ'=>'á’ƒ','á’„'=>'á’„','á’…'=>'á’…','á’†'=>'á’†','á’‡'=>'á’‡','á’ˆ'=>'á’ˆ','á’‰'=>'á’‰','á’Š'=>'á’Š','á’‹'=>'á’‹','á’Œ'=>'á’Œ','á’'=>'á’','á’Ž'=>'á’Ž','á’'=>'á’','á’'=>'á’','á’‘'=>'á’‘','á’’'=>'á’’','á’“'=>'á’“','á’”'=>'á’”','á’•'=>'á’•','á’–'=>'á’–','á’—'=>'á’—','á’˜'=>'á’˜','á’™'=>'á’™','á’š'=>'á’š','á’›'=>'á’›','á’œ'=>'á’œ','á’'=>'á’','á’ž'=>'á’ž','á’Ÿ'=>'á’Ÿ','á’ '=>'á’ ','á’¡'=>'á’¡','á’¢'=>'á’¢','á’£'=>'á’£','á’¤'=>'á’¤','á’¥'=>'á’¥','á’¦'=>'á’¦','á’§'=>'á’§','á’¨'=>'á’¨','á’©'=>'á’©','á’ª'=>'á’ª','á’«'=>'á’«','á’¬'=>'á’¬','á’­'=>'á’­','á’®'=>'á’®','á’¯'=>'á’¯','á’°'=>'á’°','á’±'=>'á’±','á’²'=>'á’²','á’³'=>'á’³','á’´'=>'á’´','á’µ'=>'á’µ','á’¶'=>'á’¶','á’·'=>'á’·','á’¸'=>'á’¸','á’¹'=>'á’¹','á’º'=>'á’º','á’»'=>'á’»','á’¼'=>'á’¼','á’½'=>'á’½','á’¾'=>'á’¾','á’¿'=>'á’¿','á“€'=>'á“€','á“'=>'á“','á“‚'=>'á“‚','ᓃ'=>'ᓃ','á“„'=>'á“„','á“…'=>'á“…','ᓆ'=>'ᓆ','ᓇ'=>'ᓇ','ᓈ'=>'ᓈ','ᓉ'=>'ᓉ','á“Š'=>'á“Š','á“‹'=>'á“‹','á“Œ'=>'á“Œ','á“'=>'á“','á“Ž'=>'á“Ž','á“'=>'á“','á“'=>'á“','á“‘'=>'á“‘','á“’'=>'á“’','á““'=>'á““','á“”'=>'á“”','á“•'=>'á“•','á“–'=>'á“–','á“—'=>'á“—','ᓘ'=>'ᓘ','á“™'=>'á“™','á“š'=>'á“š','á“›'=>'á“›','á“œ'=>'á“œ','á“'=>'á“','á“ž'=>'á“ž','á“Ÿ'=>'á“Ÿ','á“ '=>'á“ ','á“¡'=>'á“¡','á“¢'=>'á“¢','á“£'=>'á“£','ᓤ'=>'ᓤ','á“¥'=>'á“¥','ᓦ'=>'ᓦ','ᓧ'=>'ᓧ','ᓨ'=>'ᓨ','á“©'=>'á“©','ᓪ'=>'ᓪ','á“«'=>'á“«','ᓬ'=>'ᓬ','á“­'=>'á“­','á“®'=>'á“®','ᓯ'=>'ᓯ','á“°'=>'á“°','ᓱ'=>'ᓱ','ᓲ'=>'ᓲ','ᓳ'=>'ᓳ','á“´'=>'á“´','ᓵ'=>'ᓵ','ᓶ'=>'ᓶ','á“·'=>'á“·','ᓸ'=>'ᓸ','ᓹ'=>'ᓹ','ᓺ'=>'ᓺ','á“»'=>'á“»','ᓼ'=>'ᓼ','ᓽ'=>'ᓽ','ᓾ'=>'ᓾ','á“¿'=>'á“¿','ᔀ'=>'ᔀ','á”'=>'á”','ᔂ'=>'ᔂ','ᔃ'=>'ᔃ','ᔄ'=>'ᔄ','á”…'=>'á”…','ᔆ'=>'ᔆ','ᔇ'=>'ᔇ','ᔈ'=>'ᔈ','ᔉ'=>'ᔉ','ᔊ'=>'ᔊ','ᔋ'=>'ᔋ','ᔌ'=>'ᔌ','á”'=>'á”','ᔎ'=>'ᔎ','á”'=>'á”','á”'=>'á”','ᔑ'=>'ᔑ','á”’'=>'á”’','ᔓ'=>'ᔓ','á””'=>'á””','ᔕ'=>'ᔕ','á”–'=>'á”–','á”—'=>'á”—','ᔘ'=>'ᔘ','á”™'=>'á”™','ᔚ'=>'ᔚ','á”›'=>'á”›','ᔜ'=>'ᔜ','á”'=>'á”','ᔞ'=>'ᔞ','ᔟ'=>'ᔟ','á” '=>'á” ','ᔡ'=>'ᔡ','ᔢ'=>'ᔢ','ᔣ'=>'ᔣ','ᔤ'=>'ᔤ','ᔥ'=>'ᔥ','ᔦ'=>'ᔦ','ᔧ'=>'ᔧ','ᔨ'=>'ᔨ','ᔩ'=>'ᔩ','ᔪ'=>'ᔪ','ᔫ'=>'ᔫ','ᔬ'=>'ᔬ','á”­'=>'á”­','á”®'=>'á”®','ᔯ'=>'ᔯ','á”°'=>'á”°','á”±'=>'á”±','ᔲ'=>'ᔲ','ᔳ'=>'ᔳ','á”´'=>'á”´','ᔵ'=>'ᔵ','ᔶ'=>'ᔶ','á”·'=>'á”·','ᔸ'=>'ᔸ','ᔹ'=>'ᔹ','ᔺ'=>'ᔺ','á”»'=>'á”»','ᔼ'=>'ᔼ','ᔽ'=>'ᔽ','ᔾ'=>'ᔾ','ᔿ'=>'ᔿ','á•€'=>'á•€','á•'=>'á•','á•‚'=>'á•‚','ᕃ'=>'ᕃ','á•„'=>'á•„','á•…'=>'á•…','ᕆ'=>'ᕆ','ᕇ'=>'ᕇ','ᕈ'=>'ᕈ','ᕉ'=>'ᕉ','á•Š'=>'á•Š','á•‹'=>'á•‹','á•Œ'=>'á•Œ','á•'=>'á•','á•Ž'=>'á•Ž','á•'=>'á•','á•'=>'á•','á•‘'=>'á•‘','á•’'=>'á•’','á•“'=>'á•“','á•”'=>'á•”','á••'=>'á••','á•–'=>'á•–','á•—'=>'á•—','ᕘ'=>'ᕘ','á•™'=>'á•™','á•š'=>'á•š','á•›'=>'á•›','á•œ'=>'á•œ','á•'=>'á•','á•ž'=>'á•ž','á•Ÿ'=>'á•Ÿ','á• '=>'á• ','á•¡'=>'á•¡','á•¢'=>'á•¢','á•£'=>'á•£','ᕤ'=>'ᕤ','á•¥'=>'á•¥','ᕦ'=>'ᕦ','ᕧ'=>'ᕧ','ᕨ'=>'ᕨ','á•©'=>'á•©','ᕪ'=>'ᕪ','á•«'=>'á•«','ᕬ'=>'ᕬ','á•­'=>'á•­','á•®'=>'á•®','ᕯ'=>'ᕯ','á•°'=>'á•°','ᕱ'=>'ᕱ','ᕲ'=>'ᕲ','ᕳ'=>'ᕳ','á•´'=>'á•´','ᕵ'=>'ᕵ','ᕶ'=>'ᕶ','á•·'=>'á•·','ᕸ'=>'ᕸ','ᕹ'=>'ᕹ','ᕺ'=>'ᕺ','á•»'=>'á•»','ᕼ'=>'ᕼ','ᕽ'=>'ᕽ','ᕾ'=>'ᕾ','á•¿'=>'á•¿','á–€'=>'á–€','á–'=>'á–','á–‚'=>'á–‚','á–ƒ'=>'á–ƒ','á–„'=>'á–„','á–…'=>'á–…','á–†'=>'á–†','á–‡'=>'á–‡','á–ˆ'=>'á–ˆ','á–‰'=>'á–‰','á–Š'=>'á–Š','á–‹'=>'á–‹','á–Œ'=>'á–Œ','á–'=>'á–','á–Ž'=>'á–Ž','á–'=>'á–','á–'=>'á–','á–‘'=>'á–‘','á–’'=>'á–’','á–“'=>'á–“','á–”'=>'á–”','á–•'=>'á–•','á––'=>'á––','á–—'=>'á–—','á–˜'=>'á–˜','á–™'=>'á–™','á–š'=>'á–š','á–›'=>'á–›','á–œ'=>'á–œ','á–'=>'á–','á–ž'=>'á–ž','á–Ÿ'=>'á–Ÿ','á– '=>'á– ','á–¡'=>'á–¡','á–¢'=>'á–¢','á–£'=>'á–£','á–¤'=>'á–¤','á–¥'=>'á–¥','á–¦'=>'á–¦','á–§'=>'á–§','á–¨'=>'á–¨','á–©'=>'á–©','á–ª'=>'á–ª','á–«'=>'á–«','á–¬'=>'á–¬','á–­'=>'á–­','á–®'=>'á–®','á–¯'=>'á–¯','á–°'=>'á–°','á–±'=>'á–±','á–²'=>'á–²','á–³'=>'á–³','á–´'=>'á–´','á–µ'=>'á–µ','á–¶'=>'á–¶','á–·'=>'á–·','á–¸'=>'á–¸','á–¹'=>'á–¹','á–º'=>'á–º','á–»'=>'á–»','á–¼'=>'á–¼','á–½'=>'á–½','á–¾'=>'á–¾','á–¿'=>'á–¿','á—€'=>'á—€','á—'=>'á—','á—‚'=>'á—‚','á—ƒ'=>'á—ƒ','á—„'=>'á—„','á—…'=>'á—…','á—†'=>'á—†','á—‡'=>'á—‡','á—ˆ'=>'á—ˆ','á—‰'=>'á—‰','á—Š'=>'á—Š','á—‹'=>'á—‹','á—Œ'=>'á—Œ','á—'=>'á—','á—Ž'=>'á—Ž','á—'=>'á—','á—'=>'á—','á—‘'=>'á—‘','á—’'=>'á—’','á—“'=>'á—“','á—”'=>'á—”','á—•'=>'á—•','á—–'=>'á—–','á——'=>'á——','á—˜'=>'á—˜','á—™'=>'á—™','á—š'=>'á—š','á—›'=>'á—›','á—œ'=>'á—œ','á—'=>'á—','á—ž'=>'á—ž','á—Ÿ'=>'á—Ÿ','á— '=>'á— ','á—¡'=>'á—¡','á—¢'=>'á—¢','á—£'=>'á—£','á—¤'=>'á—¤','á—¥'=>'á—¥','á—¦'=>'á—¦','á—§'=>'á—§','á—¨'=>'á—¨','á—©'=>'á—©','á—ª'=>'á—ª','á—«'=>'á—«','á—¬'=>'á—¬','á—­'=>'á—­','á—®'=>'á—®','á—¯'=>'á—¯','á—°'=>'á—°','á—±'=>'á—±','á—²'=>'á—²','á—³'=>'á—³','á—´'=>'á—´','á—µ'=>'á—µ','á—¶'=>'á—¶','á—·'=>'á—·','á—¸'=>'á—¸','á—¹'=>'á—¹','á—º'=>'á—º','á—»'=>'á—»','á—¼'=>'á—¼','á—½'=>'á—½','á—¾'=>'á—¾','á—¿'=>'á—¿','ᘀ'=>'ᘀ','á˜'=>'á˜','ᘂ'=>'ᘂ','ᘃ'=>'ᘃ','ᘄ'=>'ᘄ','ᘅ'=>'ᘅ','ᘆ'=>'ᘆ','ᘇ'=>'ᘇ','ᘈ'=>'ᘈ','ᘉ'=>'ᘉ','ᘊ'=>'ᘊ','ᘋ'=>'ᘋ','ᘌ'=>'ᘌ','á˜'=>'á˜','ᘎ'=>'ᘎ','á˜'=>'á˜','á˜'=>'á˜','ᘑ'=>'ᘑ','ᘒ'=>'ᘒ','ᘓ'=>'ᘓ','ᘔ'=>'ᘔ','ᘕ'=>'ᘕ','ᘖ'=>'ᘖ','ᘗ'=>'ᘗ','ᘘ'=>'ᘘ','ᘙ'=>'ᘙ','ᘚ'=>'ᘚ','ᘛ'=>'ᘛ','ᘜ'=>'ᘜ','á˜'=>'á˜','ᘞ'=>'ᘞ','ᘟ'=>'ᘟ','ᘠ'=>'ᘠ','ᘡ'=>'ᘡ','ᘢ'=>'ᘢ','ᘣ'=>'ᘣ','ᘤ'=>'ᘤ','ᘥ'=>'ᘥ','ᘦ'=>'ᘦ','ᘧ'=>'ᘧ','ᘨ'=>'ᘨ','ᘩ'=>'ᘩ','ᘪ'=>'ᘪ','ᘫ'=>'ᘫ','ᘬ'=>'ᘬ','ᘭ'=>'ᘭ','ᘮ'=>'ᘮ','ᘯ'=>'ᘯ','ᘰ'=>'ᘰ','ᘱ'=>'ᘱ','ᘲ'=>'ᘲ','ᘳ'=>'ᘳ','ᘴ'=>'ᘴ','ᘵ'=>'ᘵ','ᘶ'=>'ᘶ','ᘷ'=>'ᘷ','ᘸ'=>'ᘸ','ᘹ'=>'ᘹ','ᘺ'=>'ᘺ','ᘻ'=>'ᘻ','ᘼ'=>'ᘼ','ᘽ'=>'ᘽ','ᘾ'=>'ᘾ','ᘿ'=>'ᘿ','ᙀ'=>'ᙀ','á™'=>'á™','ᙂ'=>'ᙂ','ᙃ'=>'ᙃ','ᙄ'=>'ᙄ','á™…'=>'á™…','ᙆ'=>'ᙆ','ᙇ'=>'ᙇ','ᙈ'=>'ᙈ','ᙉ'=>'ᙉ','ᙊ'=>'ᙊ','ᙋ'=>'ᙋ','ᙌ'=>'ᙌ','á™'=>'á™','ᙎ'=>'ᙎ','á™'=>'á™','á™'=>'á™','ᙑ'=>'ᙑ','á™’'=>'á™’','ᙓ'=>'ᙓ','á™”'=>'á™”','ᙕ'=>'ᙕ','á™–'=>'á™–','á™—'=>'á™—','ᙘ'=>'ᙘ','á™™'=>'á™™','ᙚ'=>'ᙚ','á™›'=>'á™›','ᙜ'=>'ᙜ','á™'=>'á™','ᙞ'=>'ᙞ','ᙟ'=>'ᙟ','á™ '=>'á™ ','ᙡ'=>'ᙡ','ᙢ'=>'ᙢ','ᙣ'=>'ᙣ','ᙤ'=>'ᙤ','ᙥ'=>'ᙥ','ᙦ'=>'ᙦ','ᙧ'=>'ᙧ','ᙨ'=>'ᙨ','ᙩ'=>'ᙩ','ᙪ'=>'ᙪ','ᙫ'=>'ᙫ','ᙬ'=>'ᙬ','ᙯ'=>'ᙯ','á™°'=>'á™°','á™±'=>'á™±','ᙲ'=>'ᙲ','ᙳ'=>'ᙳ','á™´'=>'á™´','ᙵ'=>'ᙵ','ᙶ'=>'ᙶ','áš'=>'áš','áš‚'=>'áš‚','ᚃ'=>'ᚃ','áš„'=>'áš„','áš…'=>'áš…','ᚆ'=>'ᚆ','ᚇ'=>'ᚇ','ᚈ'=>'ᚈ','ᚉ'=>'ᚉ','ᚊ'=>'ᚊ','áš‹'=>'áš‹','ᚌ'=>'ᚌ','áš'=>'áš','ᚎ'=>'ᚎ','áš'=>'áš','áš'=>'áš','áš‘'=>'áš‘','áš’'=>'áš’','áš“'=>'áš“','áš”'=>'áš”','áš•'=>'áš•','áš–'=>'áš–','áš—'=>'áš—','ᚘ'=>'ᚘ','áš™'=>'áš™','ášš'=>'ášš','áš '=>'áš ','áš¡'=>'áš¡','ᚢ'=>'ᚢ','ᚣ'=>'ᚣ','ᚤ'=>'ᚤ','ᚥ'=>'ᚥ','ᚦ'=>'ᚦ','ᚧ'=>'ᚧ','ᚨ'=>'ᚨ','áš©'=>'áš©','ᚪ'=>'ᚪ','áš«'=>'áš«','ᚬ'=>'ᚬ','áš­'=>'áš­','áš®'=>'áš®','ᚯ'=>'ᚯ','áš°'=>'áš°','áš±'=>'áš±','áš²'=>'áš²','áš³'=>'áš³','áš´'=>'áš´','ášµ'=>'ášµ','ᚶ'=>'ᚶ','áš·'=>'áš·','ᚸ'=>'ᚸ','áš¹'=>'áš¹','ᚺ'=>'ᚺ','áš»'=>'áš»','áš¼'=>'áš¼','áš½'=>'áš½','áš¾'=>'áš¾','áš¿'=>'áš¿','ᛀ'=>'ᛀ','á›'=>'á›','ᛂ'=>'ᛂ','ᛃ'=>'ᛃ','ᛄ'=>'ᛄ','á›…'=>'á›…','ᛆ'=>'ᛆ','ᛇ'=>'ᛇ','ᛈ'=>'ᛈ','ᛉ'=>'ᛉ','ᛊ'=>'ᛊ','ᛋ'=>'ᛋ','ᛌ'=>'ᛌ','á›'=>'á›','ᛎ'=>'ᛎ','á›'=>'á›','á›'=>'á›','ᛑ'=>'ᛑ','á›’'=>'á›’','ᛓ'=>'ᛓ','á›”'=>'á›”','ᛕ'=>'ᛕ','á›–'=>'á›–','á›—'=>'á›—','ᛘ'=>'ᛘ','á›™'=>'á›™','ᛚ'=>'ᛚ','á››'=>'á››','ᛜ'=>'ᛜ','á›'=>'á›','ᛞ'=>'ᛞ','ᛟ'=>'ᛟ','á› '=>'á› ','ᛡ'=>'ᛡ','ᛢ'=>'ᛢ','ᛣ'=>'ᛣ','ᛤ'=>'ᛤ','ᛥ'=>'ᛥ','ᛦ'=>'ᛦ','ᛧ'=>'ᛧ','ᛨ'=>'ᛨ','ᛩ'=>'ᛩ','ᛪ'=>'ᛪ','á›®'=>'17','ᛯ'=>'18','á›°'=>'19','ᜀ'=>'ᜀ','áœ'=>'áœ','ᜂ'=>'ᜂ','ᜃ'=>'ᜃ','ᜄ'=>'ᜄ','ᜅ'=>'ᜅ','ᜆ'=>'ᜆ','ᜇ'=>'ᜇ','ᜈ'=>'ᜈ','ᜉ'=>'ᜉ','ᜊ'=>'ᜊ','ᜋ'=>'ᜋ','ᜌ'=>'ᜌ','ᜎ'=>'ᜎ','áœ'=>'áœ','áœ'=>'áœ','ᜑ'=>'ᜑ','ᜒ'=>'ᜒ','ᜓ'=>'ᜓ','᜔'=>'᜔','ᜠ'=>'ᜠ','ᜡ'=>'ᜡ','ᜢ'=>'ᜢ','ᜣ'=>'ᜣ','ᜤ'=>'ᜤ','ᜥ'=>'ᜥ','ᜦ'=>'ᜦ','ᜧ'=>'ᜧ','ᜨ'=>'ᜨ','ᜩ'=>'ᜩ','ᜪ'=>'ᜪ','ᜫ'=>'ᜫ','ᜬ'=>'ᜬ','ᜭ'=>'ᜭ','ᜮ'=>'ᜮ','ᜯ'=>'ᜯ','ᜰ'=>'ᜰ','ᜱ'=>'ᜱ','ᜲ'=>'ᜲ','ᜳ'=>'ᜳ','᜴'=>'᜴','á€'=>'á€','á'=>'á','á‚'=>'á‚','áƒ'=>'áƒ','á„'=>'á„','á…'=>'á…','á†'=>'á†','á‡'=>'á‡','áˆ'=>'áˆ','á‰'=>'á‰','áŠ'=>'áŠ','á‹'=>'á‹','áŒ'=>'áŒ','á'=>'á','áŽ'=>'áŽ','á'=>'á','á'=>'á','á‘'=>'á‘','á’'=>'á’','á“'=>'á“','á '=>'á ','á¡'=>'á¡','á¢'=>'á¢','á£'=>'á£','á¤'=>'á¤','á¥'=>'á¥','á¦'=>'á¦','á§'=>'á§','á¨'=>'á¨','á©'=>'á©','áª'=>'áª','á«'=>'á«','á¬'=>'á¬','á®'=>'á®','á¯'=>'á¯','á°'=>'á°','á²'=>'á²','á³'=>'á³','ក'=>'ក','áž'=>'áž','áž‚'=>'áž‚','ឃ'=>'ឃ','áž„'=>'áž„','áž…'=>'áž…','ឆ'=>'ឆ','ជ'=>'ជ','ឈ'=>'ឈ','ញ'=>'ញ','ដ'=>'ដ','áž‹'=>'áž‹','ឌ'=>'ឌ','áž'=>'áž','ណ'=>'ណ','áž'=>'áž','áž'=>'áž','áž‘'=>'áž‘','áž’'=>'áž’','áž“'=>'áž“','áž”'=>'áž”','áž•'=>'áž•','áž–'=>'áž–','áž—'=>'áž—','ម'=>'ម','áž™'=>'áž™','ážš'=>'ážš','áž›'=>'áž›','ážœ'=>'ážœ','áž'=>'áž','ážž'=>'ážž','ស'=>'ស','áž '=>'áž ','áž¡'=>'áž¡','អ'=>'អ','ឣ'=>'ឣ','ឤ'=>'ឤ','ឥ'=>'ឥ','ឦ'=>'ឦ','ឧ'=>'ឧ','ឨ'=>'ឨ','áž©'=>'áž©','ឪ'=>'ឪ','áž«'=>'áž«','ឬ'=>'ឬ','áž­'=>'áž­','áž®'=>'áž®','ឯ'=>'ឯ','áž°'=>'áž°','áž±'=>'áž±','áž²'=>'áž²','áž³'=>'áž³','ា'=>'ា','áž·'=>'áž·','ី'=>'ី','áž¹'=>'áž¹','ឺ'=>'ឺ','áž»'=>'áž»','áž¼'=>'áž¼','áž½'=>'áž½','áž¾'=>'áž¾','áž¿'=>'áž¿','ៀ'=>'ៀ','áŸ'=>'áŸ','ែ'=>'ែ','ៃ'=>'ៃ','ោ'=>'ោ','ៅ'=>'ៅ','ំ'=>'ំ','ះ'=>'ះ','ៈ'=>'ៈ','៉'=>'៉','៊'=>'៊','់'=>'់','៌'=>'៌','áŸ'=>'áŸ','៎'=>'៎','áŸ'=>'áŸ','áŸ'=>'áŸ','៑'=>'៑','្'=>'្','៓'=>'៓','ៗ'=>'ៗ','ៜ'=>'ៜ','áŸ'=>'áŸ','០'=>'0','១'=>'1','២'=>'2','៣'=>'3','៤'=>'4','៥'=>'5','៦'=>'6','៧'=>'7','៨'=>'8','៩'=>'9','៰'=>'0','៱'=>'1','៲'=>'2','៳'=>'3','៴'=>'4','៵'=>'5','៶'=>'6','៷'=>'7','៸'=>'8','៹'=>'9'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_20.php b/phpBB/includes/utf/data/search_indexer_20.php
new file mode 100644
index 0000000000..caab3c540b
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_20.php
@@ -0,0 +1 @@
+<?php return array('ꀀ'=>'ꀀ','ê€'=>'ê€','ꀂ'=>'ꀂ','ꀃ'=>'ꀃ','ꀄ'=>'ꀄ','ꀅ'=>'ꀅ','ꀆ'=>'ꀆ','ꀇ'=>'ꀇ','ꀈ'=>'ꀈ','ꀉ'=>'ꀉ','ꀊ'=>'ꀊ','ꀋ'=>'ꀋ','ꀌ'=>'ꀌ','ê€'=>'ê€','ꀎ'=>'ꀎ','ê€'=>'ê€','ê€'=>'ê€','ꀑ'=>'ꀑ','ꀒ'=>'ꀒ','ꀓ'=>'ꀓ','ꀔ'=>'ꀔ','ꀕ'=>'ꀕ','ꀖ'=>'ꀖ','ꀗ'=>'ꀗ','ꀘ'=>'ꀘ','ꀙ'=>'ꀙ','ꀚ'=>'ꀚ','ꀛ'=>'ꀛ','ꀜ'=>'ꀜ','ê€'=>'ê€','ꀞ'=>'ꀞ','ꀟ'=>'ꀟ','ꀠ'=>'ꀠ','ꀡ'=>'ꀡ','ꀢ'=>'ꀢ','ꀣ'=>'ꀣ','ꀤ'=>'ꀤ','ꀥ'=>'ꀥ','ꀦ'=>'ꀦ','ꀧ'=>'ꀧ','ꀨ'=>'ꀨ','ꀩ'=>'ꀩ','ꀪ'=>'ꀪ','ꀫ'=>'ꀫ','ꀬ'=>'ꀬ','ꀭ'=>'ꀭ','ꀮ'=>'ꀮ','ꀯ'=>'ꀯ','ꀰ'=>'ꀰ','ꀱ'=>'ꀱ','ꀲ'=>'ꀲ','ꀳ'=>'ꀳ','ꀴ'=>'ꀴ','ꀵ'=>'ꀵ','ꀶ'=>'ꀶ','ꀷ'=>'ꀷ','ꀸ'=>'ꀸ','ꀹ'=>'ꀹ','ꀺ'=>'ꀺ','ꀻ'=>'ꀻ','ꀼ'=>'ꀼ','ꀽ'=>'ꀽ','ꀾ'=>'ꀾ','ꀿ'=>'ꀿ','ê€'=>'ê€','ê'=>'ê','ê‚'=>'ê‚','êƒ'=>'êƒ','ê„'=>'ê„','ê…'=>'ê…','ê†'=>'ê†','ê‡'=>'ê‡','êˆ'=>'êˆ','ê‰'=>'ê‰','êŠ'=>'êŠ','ê‹'=>'ê‹','êŒ'=>'êŒ','ê'=>'ê','êŽ'=>'êŽ','ê'=>'ê','ê'=>'ê','ê‘'=>'ê‘','ê’'=>'ê’','ê“'=>'ê“','ê”'=>'ê”','ê•'=>'ê•','ê–'=>'ê–','ê—'=>'ê—','ê˜'=>'ê˜','ê™'=>'ê™','êš'=>'êš','ê›'=>'ê›','êœ'=>'êœ','ê'=>'ê','êž'=>'êž','êŸ'=>'êŸ','ê '=>'ê ','ê¡'=>'ê¡','ê¢'=>'ê¢','ê£'=>'ê£','ê¤'=>'ê¤','ê¥'=>'ê¥','ê¦'=>'ê¦','ê§'=>'ê§','ê¨'=>'ê¨','ê©'=>'ê©','êª'=>'êª','ê«'=>'ê«','ê¬'=>'ê¬','ê­'=>'ê­','ê®'=>'ê®','ê¯'=>'ê¯','ê°'=>'ê°','ê±'=>'ê±','ê²'=>'ê²','ê³'=>'ê³','ê´'=>'ê´','êµ'=>'êµ','ê¶'=>'ê¶','ê·'=>'ê·','ê¸'=>'ê¸','ê¹'=>'ê¹','êº'=>'êº','ê»'=>'ê»','ê¼'=>'ê¼','ê½'=>'ê½','ê¾'=>'ê¾','ê¿'=>'ê¿','ê‚€'=>'ê‚€','ê‚'=>'ê‚','ê‚‚'=>'ê‚‚','ꂃ'=>'ꂃ','ê‚„'=>'ê‚„','ê‚…'=>'ê‚…','ꂆ'=>'ꂆ','ꂇ'=>'ꂇ','ꂈ'=>'ꂈ','ꂉ'=>'ꂉ','ê‚Š'=>'ê‚Š','ê‚‹'=>'ê‚‹','ê‚Œ'=>'ê‚Œ','ê‚'=>'ê‚','ê‚Ž'=>'ê‚Ž','ê‚'=>'ê‚','ê‚'=>'ê‚','ê‚‘'=>'ê‚‘','ê‚’'=>'ê‚’','ê‚“'=>'ê‚“','ê‚”'=>'ê‚”','ê‚•'=>'ê‚•','ê‚–'=>'ê‚–','ê‚—'=>'ê‚—','ꂘ'=>'ꂘ','ê‚™'=>'ê‚™','ê‚š'=>'ê‚š','ê‚›'=>'ê‚›','ê‚œ'=>'ê‚œ','ê‚'=>'ê‚','ê‚ž'=>'ê‚ž','ê‚Ÿ'=>'ê‚Ÿ','ê‚ '=>'ê‚ ','ê‚¡'=>'ê‚¡','ê‚¢'=>'ê‚¢','ê‚£'=>'ê‚£','ꂤ'=>'ꂤ','ê‚¥'=>'ê‚¥','ꂦ'=>'ꂦ','ꂧ'=>'ꂧ','ꂨ'=>'ꂨ','ê‚©'=>'ê‚©','ꂪ'=>'ꂪ','ê‚«'=>'ê‚«','ꂬ'=>'ꂬ','ê‚­'=>'ê‚­','ê‚®'=>'ê‚®','ꂯ'=>'ꂯ','ê‚°'=>'ê‚°','ꂱ'=>'ꂱ','ꂲ'=>'ꂲ','ꂳ'=>'ꂳ','ê‚´'=>'ê‚´','ꂵ'=>'ꂵ','ꂶ'=>'ꂶ','ê‚·'=>'ê‚·','ꂸ'=>'ꂸ','ꂹ'=>'ꂹ','ꂺ'=>'ꂺ','ê‚»'=>'ê‚»','ꂼ'=>'ꂼ','ꂽ'=>'ꂽ','ꂾ'=>'ꂾ','ê‚¿'=>'ê‚¿','ꃀ'=>'ꃀ','êƒ'=>'êƒ','ꃂ'=>'ꃂ','ꃃ'=>'ꃃ','ꃄ'=>'ꃄ','ꃅ'=>'ꃅ','ꃆ'=>'ꃆ','ꃇ'=>'ꃇ','ꃈ'=>'ꃈ','ꃉ'=>'ꃉ','ꃊ'=>'ꃊ','ꃋ'=>'ꃋ','ꃌ'=>'ꃌ','êƒ'=>'êƒ','ꃎ'=>'ꃎ','êƒ'=>'êƒ','êƒ'=>'êƒ','ꃑ'=>'ꃑ','ꃒ'=>'ꃒ','ꃓ'=>'ꃓ','ꃔ'=>'ꃔ','ꃕ'=>'ꃕ','ꃖ'=>'ꃖ','ꃗ'=>'ꃗ','ꃘ'=>'ꃘ','ꃙ'=>'ꃙ','ꃚ'=>'ꃚ','ꃛ'=>'ꃛ','ꃜ'=>'ꃜ','êƒ'=>'êƒ','ꃞ'=>'ꃞ','ꃟ'=>'ꃟ','ꃠ'=>'ꃠ','ꃡ'=>'ꃡ','ꃢ'=>'ꃢ','ꃣ'=>'ꃣ','ꃤ'=>'ꃤ','ꃥ'=>'ꃥ','ꃦ'=>'ꃦ','ꃧ'=>'ꃧ','ꃨ'=>'ꃨ','ꃩ'=>'ꃩ','ꃪ'=>'ꃪ','ꃫ'=>'ꃫ','ꃬ'=>'ꃬ','ꃭ'=>'ꃭ','ꃮ'=>'ꃮ','ꃯ'=>'ꃯ','ꃰ'=>'ꃰ','ꃱ'=>'ꃱ','ꃲ'=>'ꃲ','ꃳ'=>'ꃳ','ꃴ'=>'ꃴ','ꃵ'=>'ꃵ','ꃶ'=>'ꃶ','ꃷ'=>'ꃷ','ꃸ'=>'ꃸ','ꃹ'=>'ꃹ','ꃺ'=>'ꃺ','ꃻ'=>'ꃻ','ꃼ'=>'ꃼ','ꃽ'=>'ꃽ','ꃾ'=>'ꃾ','ꃿ'=>'ꃿ','ê„€'=>'ê„€','ê„'=>'ê„','ê„‚'=>'ê„‚','ꄃ'=>'ꄃ','ê„„'=>'ê„„','ê„…'=>'ê„…','ꄆ'=>'ꄆ','ꄇ'=>'ꄇ','ꄈ'=>'ꄈ','ꄉ'=>'ꄉ','ê„Š'=>'ê„Š','ê„‹'=>'ê„‹','ê„Œ'=>'ê„Œ','ê„'=>'ê„','ê„Ž'=>'ê„Ž','ê„'=>'ê„','ê„'=>'ê„','ê„‘'=>'ê„‘','ê„’'=>'ê„’','ê„“'=>'ê„“','ê„”'=>'ê„”','ê„•'=>'ê„•','ê„–'=>'ê„–','ê„—'=>'ê„—','ꄘ'=>'ꄘ','ê„™'=>'ê„™','ê„š'=>'ê„š','ê„›'=>'ê„›','ê„œ'=>'ê„œ','ê„'=>'ê„','ê„ž'=>'ê„ž','ê„Ÿ'=>'ê„Ÿ','ê„ '=>'ê„ ','ê„¡'=>'ê„¡','ê„¢'=>'ê„¢','ê„£'=>'ê„£','ꄤ'=>'ꄤ','ê„¥'=>'ê„¥','ꄦ'=>'ꄦ','ꄧ'=>'ꄧ','ꄨ'=>'ꄨ','ê„©'=>'ê„©','ꄪ'=>'ꄪ','ê„«'=>'ê„«','ꄬ'=>'ꄬ','ê„­'=>'ê„­','ê„®'=>'ê„®','ꄯ'=>'ꄯ','ê„°'=>'ê„°','ꄱ'=>'ꄱ','ꄲ'=>'ꄲ','ꄳ'=>'ꄳ','ê„´'=>'ê„´','ꄵ'=>'ꄵ','ꄶ'=>'ꄶ','ê„·'=>'ê„·','ꄸ'=>'ꄸ','ꄹ'=>'ꄹ','ꄺ'=>'ꄺ','ê„»'=>'ê„»','ꄼ'=>'ꄼ','ꄽ'=>'ꄽ','ꄾ'=>'ꄾ','ê„¿'=>'ê„¿','ê…€'=>'ê…€','ê…'=>'ê…','ê…‚'=>'ê…‚','ê…ƒ'=>'ê…ƒ','ê…„'=>'ê…„','ê……'=>'ê……','ê…†'=>'ê…†','ê…‡'=>'ê…‡','ê…ˆ'=>'ê…ˆ','ê…‰'=>'ê…‰','ê…Š'=>'ê…Š','ê…‹'=>'ê…‹','ê…Œ'=>'ê…Œ','ê…'=>'ê…','ê…Ž'=>'ê…Ž','ê…'=>'ê…','ê…'=>'ê…','ê…‘'=>'ê…‘','ê…’'=>'ê…’','ê…“'=>'ê…“','ê…”'=>'ê…”','ê…•'=>'ê…•','ê…–'=>'ê…–','ê…—'=>'ê…—','ê…˜'=>'ê…˜','ê…™'=>'ê…™','ê…š'=>'ê…š','ê…›'=>'ê…›','ê…œ'=>'ê…œ','ê…'=>'ê…','ê…ž'=>'ê…ž','ê…Ÿ'=>'ê…Ÿ','ê… '=>'ê… ','ê…¡'=>'ê…¡','ê…¢'=>'ê…¢','ê…£'=>'ê…£','ê…¤'=>'ê…¤','ê…¥'=>'ê…¥','ê…¦'=>'ê…¦','ê…§'=>'ê…§','ê…¨'=>'ê…¨','ê…©'=>'ê…©','ê…ª'=>'ê…ª','ê…«'=>'ê…«','ê…¬'=>'ê…¬','ê…­'=>'ê…­','ê…®'=>'ê…®','ê…¯'=>'ê…¯','ê…°'=>'ê…°','ê…±'=>'ê…±','ê…²'=>'ê…²','ê…³'=>'ê…³','ê…´'=>'ê…´','ê…µ'=>'ê…µ','ê…¶'=>'ê…¶','ê…·'=>'ê…·','ê…¸'=>'ê…¸','ê…¹'=>'ê…¹','ê…º'=>'ê…º','ê…»'=>'ê…»','ê…¼'=>'ê…¼','ê…½'=>'ê…½','ê…¾'=>'ê…¾','ê…¿'=>'ê…¿','ꆀ'=>'ꆀ','ê†'=>'ê†','ꆂ'=>'ꆂ','ꆃ'=>'ꆃ','ꆄ'=>'ꆄ','ꆅ'=>'ꆅ','ꆆ'=>'ꆆ','ꆇ'=>'ꆇ','ꆈ'=>'ꆈ','ꆉ'=>'ꆉ','ꆊ'=>'ꆊ','ꆋ'=>'ꆋ','ꆌ'=>'ꆌ','ê†'=>'ê†','ꆎ'=>'ꆎ','ê†'=>'ê†','ê†'=>'ê†','ꆑ'=>'ꆑ','ꆒ'=>'ꆒ','ꆓ'=>'ꆓ','ꆔ'=>'ꆔ','ꆕ'=>'ꆕ','ꆖ'=>'ꆖ','ꆗ'=>'ꆗ','ꆘ'=>'ꆘ','ꆙ'=>'ꆙ','ꆚ'=>'ꆚ','ꆛ'=>'ꆛ','ꆜ'=>'ꆜ','ê†'=>'ê†','ꆞ'=>'ꆞ','ꆟ'=>'ꆟ','ꆠ'=>'ꆠ','ꆡ'=>'ꆡ','ꆢ'=>'ꆢ','ꆣ'=>'ꆣ','ꆤ'=>'ꆤ','ꆥ'=>'ꆥ','ꆦ'=>'ꆦ','ꆧ'=>'ꆧ','ꆨ'=>'ꆨ','ꆩ'=>'ꆩ','ꆪ'=>'ꆪ','ꆫ'=>'ꆫ','ꆬ'=>'ꆬ','ꆭ'=>'ꆭ','ꆮ'=>'ꆮ','ꆯ'=>'ꆯ','ꆰ'=>'ꆰ','ꆱ'=>'ꆱ','ꆲ'=>'ꆲ','ꆳ'=>'ꆳ','ꆴ'=>'ꆴ','ꆵ'=>'ꆵ','ꆶ'=>'ꆶ','ꆷ'=>'ꆷ','ꆸ'=>'ꆸ','ꆹ'=>'ꆹ','ꆺ'=>'ꆺ','ꆻ'=>'ꆻ','ꆼ'=>'ꆼ','ꆽ'=>'ꆽ','ꆾ'=>'ꆾ','ꆿ'=>'ꆿ','ꇀ'=>'ꇀ','ê‡'=>'ê‡','ꇂ'=>'ꇂ','ꇃ'=>'ꇃ','ꇄ'=>'ꇄ','ꇅ'=>'ꇅ','ꇆ'=>'ꇆ','ꇇ'=>'ꇇ','ꇈ'=>'ꇈ','ꇉ'=>'ꇉ','ꇊ'=>'ꇊ','ꇋ'=>'ꇋ','ꇌ'=>'ꇌ','ê‡'=>'ê‡','ꇎ'=>'ꇎ','ê‡'=>'ê‡','ê‡'=>'ê‡','ꇑ'=>'ꇑ','ꇒ'=>'ꇒ','ꇓ'=>'ꇓ','ꇔ'=>'ꇔ','ꇕ'=>'ꇕ','ꇖ'=>'ꇖ','ꇗ'=>'ꇗ','ꇘ'=>'ꇘ','ꇙ'=>'ꇙ','ꇚ'=>'ꇚ','ꇛ'=>'ꇛ','ꇜ'=>'ꇜ','ê‡'=>'ê‡','ꇞ'=>'ꇞ','ꇟ'=>'ꇟ','ꇠ'=>'ꇠ','ꇡ'=>'ꇡ','ꇢ'=>'ꇢ','ꇣ'=>'ꇣ','ꇤ'=>'ꇤ','ꇥ'=>'ꇥ','ꇦ'=>'ꇦ','ꇧ'=>'ꇧ','ꇨ'=>'ꇨ','ꇩ'=>'ꇩ','ꇪ'=>'ꇪ','ꇫ'=>'ꇫ','ꇬ'=>'ꇬ','ꇭ'=>'ꇭ','ꇮ'=>'ꇮ','ꇯ'=>'ꇯ','ꇰ'=>'ꇰ','ꇱ'=>'ꇱ','ꇲ'=>'ꇲ','ꇳ'=>'ꇳ','ꇴ'=>'ꇴ','ꇵ'=>'ꇵ','ꇶ'=>'ꇶ','ꇷ'=>'ꇷ','ꇸ'=>'ꇸ','ꇹ'=>'ꇹ','ꇺ'=>'ꇺ','ꇻ'=>'ꇻ','ꇼ'=>'ꇼ','ꇽ'=>'ꇽ','ꇾ'=>'ꇾ','ꇿ'=>'ꇿ','ꈀ'=>'ꈀ','êˆ'=>'êˆ','ꈂ'=>'ꈂ','ꈃ'=>'ꈃ','ꈄ'=>'ꈄ','ꈅ'=>'ꈅ','ꈆ'=>'ꈆ','ꈇ'=>'ꈇ','ꈈ'=>'ꈈ','ꈉ'=>'ꈉ','ꈊ'=>'ꈊ','ꈋ'=>'ꈋ','ꈌ'=>'ꈌ','êˆ'=>'êˆ','ꈎ'=>'ꈎ','êˆ'=>'êˆ','êˆ'=>'êˆ','ꈑ'=>'ꈑ','ꈒ'=>'ꈒ','ꈓ'=>'ꈓ','ꈔ'=>'ꈔ','ꈕ'=>'ꈕ','ꈖ'=>'ꈖ','ꈗ'=>'ꈗ','ꈘ'=>'ꈘ','ꈙ'=>'ꈙ','ꈚ'=>'ꈚ','ꈛ'=>'ꈛ','ꈜ'=>'ꈜ','êˆ'=>'êˆ','ꈞ'=>'ꈞ','ꈟ'=>'ꈟ','ꈠ'=>'ꈠ','ꈡ'=>'ꈡ','ꈢ'=>'ꈢ','ꈣ'=>'ꈣ','ꈤ'=>'ꈤ','ꈥ'=>'ꈥ','ꈦ'=>'ꈦ','ꈧ'=>'ꈧ','ꈨ'=>'ꈨ','ꈩ'=>'ꈩ','ꈪ'=>'ꈪ','ꈫ'=>'ꈫ','ꈬ'=>'ꈬ','ꈭ'=>'ꈭ','ꈮ'=>'ꈮ','ꈯ'=>'ꈯ','ꈰ'=>'ꈰ','ꈱ'=>'ꈱ','ꈲ'=>'ꈲ','ꈳ'=>'ꈳ','ꈴ'=>'ꈴ','ꈵ'=>'ꈵ','ꈶ'=>'ꈶ','ꈷ'=>'ꈷ','ꈸ'=>'ꈸ','ꈹ'=>'ꈹ','ꈺ'=>'ꈺ','ꈻ'=>'ꈻ','ꈼ'=>'ꈼ','ꈽ'=>'ꈽ','ꈾ'=>'ꈾ','ꈿ'=>'ꈿ','ꉀ'=>'ꉀ','ê‰'=>'ê‰','ꉂ'=>'ꉂ','ꉃ'=>'ꉃ','ꉄ'=>'ꉄ','ꉅ'=>'ꉅ','ꉆ'=>'ꉆ','ꉇ'=>'ꉇ','ꉈ'=>'ꉈ','ꉉ'=>'ꉉ','ꉊ'=>'ꉊ','ꉋ'=>'ꉋ','ꉌ'=>'ꉌ','ê‰'=>'ê‰','ꉎ'=>'ꉎ','ê‰'=>'ê‰','ê‰'=>'ê‰','ꉑ'=>'ꉑ','ꉒ'=>'ꉒ','ꉓ'=>'ꉓ','ꉔ'=>'ꉔ','ꉕ'=>'ꉕ','ꉖ'=>'ꉖ','ꉗ'=>'ꉗ','ꉘ'=>'ꉘ','ꉙ'=>'ꉙ','ꉚ'=>'ꉚ','ꉛ'=>'ꉛ','ꉜ'=>'ꉜ','ê‰'=>'ê‰','ꉞ'=>'ꉞ','ꉟ'=>'ꉟ','ꉠ'=>'ꉠ','ꉡ'=>'ꉡ','ꉢ'=>'ꉢ','ꉣ'=>'ꉣ','ꉤ'=>'ꉤ','ꉥ'=>'ꉥ','ꉦ'=>'ꉦ','ꉧ'=>'ꉧ','ꉨ'=>'ꉨ','ꉩ'=>'ꉩ','ꉪ'=>'ꉪ','ꉫ'=>'ꉫ','ꉬ'=>'ꉬ','ꉭ'=>'ꉭ','ꉮ'=>'ꉮ','ꉯ'=>'ꉯ','ꉰ'=>'ꉰ','ꉱ'=>'ꉱ','ꉲ'=>'ꉲ','ꉳ'=>'ꉳ','ꉴ'=>'ꉴ','ꉵ'=>'ꉵ','ꉶ'=>'ꉶ','ꉷ'=>'ꉷ','ꉸ'=>'ꉸ','ꉹ'=>'ꉹ','ꉺ'=>'ꉺ','ꉻ'=>'ꉻ','ꉼ'=>'ꉼ','ꉽ'=>'ꉽ','ꉾ'=>'ꉾ','ꉿ'=>'ꉿ','ꊀ'=>'ꊀ','êŠ'=>'êŠ','ꊂ'=>'ꊂ','ꊃ'=>'ꊃ','ꊄ'=>'ꊄ','ꊅ'=>'ꊅ','ꊆ'=>'ꊆ','ꊇ'=>'ꊇ','ꊈ'=>'ꊈ','ꊉ'=>'ꊉ','ꊊ'=>'ꊊ','ꊋ'=>'ꊋ','ꊌ'=>'ꊌ','êŠ'=>'êŠ','ꊎ'=>'ꊎ','êŠ'=>'êŠ','êŠ'=>'êŠ','ꊑ'=>'ꊑ','ꊒ'=>'ꊒ','ꊓ'=>'ꊓ','ꊔ'=>'ꊔ','ꊕ'=>'ꊕ','ꊖ'=>'ꊖ','ꊗ'=>'ꊗ','ꊘ'=>'ꊘ','ꊙ'=>'ꊙ','ꊚ'=>'ꊚ','ꊛ'=>'ꊛ','ꊜ'=>'ꊜ','êŠ'=>'êŠ','ꊞ'=>'ꊞ','ꊟ'=>'ꊟ','ꊠ'=>'ꊠ','ꊡ'=>'ꊡ','ꊢ'=>'ꊢ','ꊣ'=>'ꊣ','ꊤ'=>'ꊤ','ꊥ'=>'ꊥ','ꊦ'=>'ꊦ','ꊧ'=>'ꊧ','ꊨ'=>'ꊨ','ꊩ'=>'ꊩ','ꊪ'=>'ꊪ','ꊫ'=>'ꊫ','ꊬ'=>'ꊬ','ꊭ'=>'ꊭ','ꊮ'=>'ꊮ','ꊯ'=>'ꊯ','ꊰ'=>'ꊰ','ꊱ'=>'ꊱ','ꊲ'=>'ꊲ','ꊳ'=>'ꊳ','ꊴ'=>'ꊴ','ꊵ'=>'ꊵ','ꊶ'=>'ꊶ','ꊷ'=>'ꊷ','ꊸ'=>'ꊸ','ꊹ'=>'ꊹ','ꊺ'=>'ꊺ','ꊻ'=>'ꊻ','ꊼ'=>'ꊼ','ꊽ'=>'ꊽ','ꊾ'=>'ꊾ','ꊿ'=>'ꊿ','ê‹€'=>'ê‹€','ê‹'=>'ê‹','ê‹‚'=>'ê‹‚','ꋃ'=>'ꋃ','ê‹„'=>'ê‹„','ê‹…'=>'ê‹…','ꋆ'=>'ꋆ','ꋇ'=>'ꋇ','ꋈ'=>'ꋈ','ꋉ'=>'ꋉ','ê‹Š'=>'ê‹Š','ê‹‹'=>'ê‹‹','ê‹Œ'=>'ê‹Œ','ê‹'=>'ê‹','ê‹Ž'=>'ê‹Ž','ê‹'=>'ê‹','ê‹'=>'ê‹','ê‹‘'=>'ê‹‘','ê‹’'=>'ê‹’','ê‹“'=>'ê‹“','ê‹”'=>'ê‹”','ê‹•'=>'ê‹•','ê‹–'=>'ê‹–','ê‹—'=>'ê‹—','ꋘ'=>'ꋘ','ê‹™'=>'ê‹™','ê‹š'=>'ê‹š','ê‹›'=>'ê‹›','ê‹œ'=>'ê‹œ','ê‹'=>'ê‹','ê‹ž'=>'ê‹ž','ê‹Ÿ'=>'ê‹Ÿ','ê‹ '=>'ê‹ ','ê‹¡'=>'ê‹¡','ê‹¢'=>'ê‹¢','ê‹£'=>'ê‹£','ꋤ'=>'ꋤ','ê‹¥'=>'ê‹¥','ꋦ'=>'ꋦ','ꋧ'=>'ꋧ','ꋨ'=>'ꋨ','ê‹©'=>'ê‹©','ꋪ'=>'ꋪ','ê‹«'=>'ê‹«','ꋬ'=>'ꋬ','ê‹­'=>'ê‹­','ê‹®'=>'ê‹®','ꋯ'=>'ꋯ','ê‹°'=>'ê‹°','ꋱ'=>'ꋱ','ꋲ'=>'ꋲ','ꋳ'=>'ꋳ','ê‹´'=>'ê‹´','ꋵ'=>'ꋵ','ꋶ'=>'ꋶ','ê‹·'=>'ê‹·','ꋸ'=>'ꋸ','ꋹ'=>'ꋹ','ꋺ'=>'ꋺ','ê‹»'=>'ê‹»','ꋼ'=>'ꋼ','ꋽ'=>'ꋽ','ꋾ'=>'ꋾ','ê‹¿'=>'ê‹¿','ꌀ'=>'ꌀ','êŒ'=>'êŒ','ꌂ'=>'ꌂ','ꌃ'=>'ꌃ','ꌄ'=>'ꌄ','ꌅ'=>'ꌅ','ꌆ'=>'ꌆ','ꌇ'=>'ꌇ','ꌈ'=>'ꌈ','ꌉ'=>'ꌉ','ꌊ'=>'ꌊ','ꌋ'=>'ꌋ','ꌌ'=>'ꌌ','êŒ'=>'êŒ','ꌎ'=>'ꌎ','êŒ'=>'êŒ','êŒ'=>'êŒ','ꌑ'=>'ꌑ','ꌒ'=>'ꌒ','ꌓ'=>'ꌓ','ꌔ'=>'ꌔ','ꌕ'=>'ꌕ','ꌖ'=>'ꌖ','ꌗ'=>'ꌗ','ꌘ'=>'ꌘ','ꌙ'=>'ꌙ','ꌚ'=>'ꌚ','ꌛ'=>'ꌛ','ꌜ'=>'ꌜ','êŒ'=>'êŒ','ꌞ'=>'ꌞ','ꌟ'=>'ꌟ','ꌠ'=>'ꌠ','ꌡ'=>'ꌡ','ꌢ'=>'ꌢ','ꌣ'=>'ꌣ','ꌤ'=>'ꌤ','ꌥ'=>'ꌥ','ꌦ'=>'ꌦ','ꌧ'=>'ꌧ','ꌨ'=>'ꌨ','ꌩ'=>'ꌩ','ꌪ'=>'ꌪ','ꌫ'=>'ꌫ','ꌬ'=>'ꌬ','ꌭ'=>'ꌭ','ꌮ'=>'ꌮ','ꌯ'=>'ꌯ','ꌰ'=>'ꌰ','ꌱ'=>'ꌱ','ꌲ'=>'ꌲ','ꌳ'=>'ꌳ','ꌴ'=>'ꌴ','ꌵ'=>'ꌵ','ꌶ'=>'ꌶ','ꌷ'=>'ꌷ','ꌸ'=>'ꌸ','ꌹ'=>'ꌹ','ꌺ'=>'ꌺ','ꌻ'=>'ꌻ','ꌼ'=>'ꌼ','ꌽ'=>'ꌽ','ꌾ'=>'ꌾ','ꌿ'=>'ꌿ','ê€'=>'ê€','ê'=>'ê','ê‚'=>'ê‚','êƒ'=>'êƒ','ê„'=>'ê„','ê…'=>'ê…','ê†'=>'ê†','ê‡'=>'ê‡','êˆ'=>'êˆ','ê‰'=>'ê‰','êŠ'=>'êŠ','ê‹'=>'ê‹','êŒ'=>'êŒ','ê'=>'ê','êŽ'=>'êŽ','ê'=>'ê','ê'=>'ê','ê‘'=>'ê‘','ê’'=>'ê’','ê“'=>'ê“','ê”'=>'ê”','ê•'=>'ê•','ê–'=>'ê–','ê—'=>'ê—','ê˜'=>'ê˜','ê™'=>'ê™','êš'=>'êš','ê›'=>'ê›','êœ'=>'êœ','ê'=>'ê','êž'=>'êž','êŸ'=>'êŸ','ê '=>'ê ','ê¡'=>'ê¡','ê¢'=>'ê¢','ê£'=>'ê£','ê¤'=>'ê¤','ê¥'=>'ê¥','ê¦'=>'ê¦','ê§'=>'ê§','ê¨'=>'ê¨','ê©'=>'ê©','êª'=>'êª','ê«'=>'ê«','ê¬'=>'ê¬','ê­'=>'ê­','ê®'=>'ê®','ê¯'=>'ê¯','ê°'=>'ê°','ê±'=>'ê±','ê²'=>'ê²','ê³'=>'ê³','ê´'=>'ê´','êµ'=>'êµ','ê¶'=>'ê¶','ê·'=>'ê·','ê¸'=>'ê¸','ê¹'=>'ê¹','êº'=>'êº','ê»'=>'ê»','ê¼'=>'ê¼','ê½'=>'ê½','ê¾'=>'ê¾','ê¿'=>'ê¿','ꎀ'=>'ꎀ','êŽ'=>'êŽ','ꎂ'=>'ꎂ','ꎃ'=>'ꎃ','ꎄ'=>'ꎄ','ꎅ'=>'ꎅ','ꎆ'=>'ꎆ','ꎇ'=>'ꎇ','ꎈ'=>'ꎈ','ꎉ'=>'ꎉ','ꎊ'=>'ꎊ','ꎋ'=>'ꎋ','ꎌ'=>'ꎌ','êŽ'=>'êŽ','ꎎ'=>'ꎎ','êŽ'=>'êŽ','êŽ'=>'êŽ','ꎑ'=>'ꎑ','ꎒ'=>'ꎒ','ꎓ'=>'ꎓ','ꎔ'=>'ꎔ','ꎕ'=>'ꎕ','ꎖ'=>'ꎖ','ꎗ'=>'ꎗ','ꎘ'=>'ꎘ','ꎙ'=>'ꎙ','ꎚ'=>'ꎚ','ꎛ'=>'ꎛ','ꎜ'=>'ꎜ','êŽ'=>'êŽ','ꎞ'=>'ꎞ','ꎟ'=>'ꎟ','ꎠ'=>'ꎠ','ꎡ'=>'ꎡ','ꎢ'=>'ꎢ','ꎣ'=>'ꎣ','ꎤ'=>'ꎤ','ꎥ'=>'ꎥ','ꎦ'=>'ꎦ','ꎧ'=>'ꎧ','ꎨ'=>'ꎨ','ꎩ'=>'ꎩ','ꎪ'=>'ꎪ','ꎫ'=>'ꎫ','ꎬ'=>'ꎬ','ꎭ'=>'ꎭ','ꎮ'=>'ꎮ','ꎯ'=>'ꎯ','ꎰ'=>'ꎰ','ꎱ'=>'ꎱ','ꎲ'=>'ꎲ','ꎳ'=>'ꎳ','ꎴ'=>'ꎴ','ꎵ'=>'ꎵ','ꎶ'=>'ꎶ','ꎷ'=>'ꎷ','ꎸ'=>'ꎸ','ꎹ'=>'ꎹ','ꎺ'=>'ꎺ','ꎻ'=>'ꎻ','ꎼ'=>'ꎼ','ꎽ'=>'ꎽ','ꎾ'=>'ꎾ','ꎿ'=>'ꎿ','ê€'=>'ê€','ê'=>'ê','ê‚'=>'ê‚','êƒ'=>'êƒ','ê„'=>'ê„','ê…'=>'ê…','ê†'=>'ê†','ê‡'=>'ê‡','êˆ'=>'êˆ','ê‰'=>'ê‰','êŠ'=>'êŠ','ê‹'=>'ê‹','êŒ'=>'êŒ','ê'=>'ê','êŽ'=>'êŽ','ê'=>'ê','ê'=>'ê','ê‘'=>'ê‘','ê’'=>'ê’','ê“'=>'ê“','ê”'=>'ê”','ê•'=>'ê•','ê–'=>'ê–','ê—'=>'ê—','ê˜'=>'ê˜','ê™'=>'ê™','êš'=>'êš','ê›'=>'ê›','êœ'=>'êœ','ê'=>'ê','êž'=>'êž','êŸ'=>'êŸ','ê '=>'ê ','ê¡'=>'ê¡','ê¢'=>'ê¢','ê£'=>'ê£','ê¤'=>'ê¤','ê¥'=>'ê¥','ê¦'=>'ê¦','ê§'=>'ê§','ê¨'=>'ê¨','ê©'=>'ê©','êª'=>'êª','ê«'=>'ê«','ê¬'=>'ê¬','ê­'=>'ê­','ê®'=>'ê®','ê¯'=>'ê¯','ê°'=>'ê°','ê±'=>'ê±','ê²'=>'ê²','ê³'=>'ê³','ê´'=>'ê´','êµ'=>'êµ','ê¶'=>'ê¶','ê·'=>'ê·','ê¸'=>'ê¸','ê¹'=>'ê¹','êº'=>'êº','ê»'=>'ê»','ê¼'=>'ê¼','ê½'=>'ê½','ê¾'=>'ê¾','ê¿'=>'ê¿','ê€'=>'ê€','ê'=>'ê','ê‚'=>'ê‚','êƒ'=>'êƒ','ê„'=>'ê„','ê…'=>'ê…','ê†'=>'ê†','ê‡'=>'ê‡','êˆ'=>'êˆ','ê‰'=>'ê‰','êŠ'=>'êŠ','ê‹'=>'ê‹','êŒ'=>'êŒ','ê'=>'ê','êŽ'=>'êŽ','ê'=>'ê','ê'=>'ê','ê‘'=>'ê‘','ê’'=>'ê’','ê“'=>'ê“','ê”'=>'ê”','ê•'=>'ê•','ê–'=>'ê–','ê—'=>'ê—','ê˜'=>'ê˜','ê™'=>'ê™','êš'=>'êš','ê›'=>'ê›','êœ'=>'êœ','ê'=>'ê','êž'=>'êž','êŸ'=>'êŸ','ê '=>'ê ','ê¡'=>'ê¡','ê¢'=>'ê¢','ê£'=>'ê£','ê¤'=>'ê¤','ê¥'=>'ê¥','ê¦'=>'ê¦','ê§'=>'ê§','ê¨'=>'ê¨','ê©'=>'ê©','êª'=>'êª','ê«'=>'ê«','ê¬'=>'ê¬','ê­'=>'ê­','ê®'=>'ê®','ê¯'=>'ê¯','ê°'=>'ê°','ê±'=>'ê±','ê²'=>'ê²','ê³'=>'ê³','ê´'=>'ê´','êµ'=>'êµ','ê¶'=>'ê¶','ê·'=>'ê·','ê¸'=>'ê¸','ê¹'=>'ê¹','êº'=>'êº','ê»'=>'ê»','ê¼'=>'ê¼','ê½'=>'ê½','ê¾'=>'ê¾','ê¿'=>'ê¿','ê‘€'=>'ê‘€','ê‘'=>'ê‘','ê‘‚'=>'ê‘‚','ꑃ'=>'ꑃ','ê‘„'=>'ê‘„','ê‘…'=>'ê‘…','ꑆ'=>'ꑆ','ꑇ'=>'ꑇ','ꑈ'=>'ꑈ','ꑉ'=>'ꑉ','ê‘Š'=>'ê‘Š','ê‘‹'=>'ê‘‹','ê‘Œ'=>'ê‘Œ','ê‘'=>'ê‘','ê‘Ž'=>'ê‘Ž','ê‘'=>'ê‘','ê‘'=>'ê‘','ê‘‘'=>'ê‘‘','ê‘’'=>'ê‘’','ê‘“'=>'ê‘“','ê‘”'=>'ê‘”','ê‘•'=>'ê‘•','ê‘–'=>'ê‘–','ê‘—'=>'ê‘—','ꑘ'=>'ꑘ','ê‘™'=>'ê‘™','ê‘š'=>'ê‘š','ê‘›'=>'ê‘›','ê‘œ'=>'ê‘œ','ê‘'=>'ê‘','ê‘ž'=>'ê‘ž','ê‘Ÿ'=>'ê‘Ÿ','ê‘ '=>'ê‘ ','ê‘¡'=>'ê‘¡','ê‘¢'=>'ê‘¢','ê‘£'=>'ê‘£','ꑤ'=>'ꑤ','ê‘¥'=>'ê‘¥','ꑦ'=>'ꑦ','ꑧ'=>'ꑧ','ꑨ'=>'ꑨ','ê‘©'=>'ê‘©','ꑪ'=>'ꑪ','ê‘«'=>'ê‘«','ꑬ'=>'ꑬ','ê‘­'=>'ê‘­','ê‘®'=>'ê‘®','ꑯ'=>'ꑯ','ê‘°'=>'ê‘°','ꑱ'=>'ꑱ','ꑲ'=>'ꑲ','ꑳ'=>'ꑳ','ê‘´'=>'ê‘´','ꑵ'=>'ꑵ','ꑶ'=>'ꑶ','ê‘·'=>'ê‘·','ꑸ'=>'ꑸ','ꑹ'=>'ꑹ','ꑺ'=>'ꑺ','ê‘»'=>'ê‘»','ꑼ'=>'ꑼ','ꑽ'=>'ꑽ','ꑾ'=>'ꑾ','ê‘¿'=>'ê‘¿','ê’€'=>'ê’€','ê’'=>'ê’','ê’‚'=>'ê’‚','ê’ƒ'=>'ê’ƒ','ê’„'=>'ê’„','ê’…'=>'ê’…','ê’†'=>'ê’†','ê’‡'=>'ê’‡','ê’ˆ'=>'ê’ˆ','ê’‰'=>'ê’‰','ê’Š'=>'ê’Š','ê’‹'=>'ê’‹','ê’Œ'=>'ê’Œ','ꜗ'=>'ꜗ','ꜘ'=>'ꜘ','ꜙ'=>'ꜙ','ꜚ'=>'ꜚ'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_21.php b/phpBB/includes/utf/data/search_indexer_21.php
new file mode 100644
index 0000000000..7fc3e4dc09
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_21.php
@@ -0,0 +1 @@
+<?php return array('ê €'=>'ê €','ê '=>'ê ','ê ‚'=>'ê ‚','ê ƒ'=>'ê ƒ','ê „'=>'ê „','ê …'=>'ê …','ê †'=>'ê †','ê ‡'=>'ê ‡','ê ˆ'=>'ê ˆ','ê ‰'=>'ê ‰','ê Š'=>'ê Š','ê ‹'=>'ê ‹','ê Œ'=>'ê Œ','ê '=>'ê ','ê Ž'=>'ê Ž','ê '=>'ê ','ê '=>'ê ','ê ‘'=>'ê ‘','ê ’'=>'ê ’','ê “'=>'ê “','ê ”'=>'ê ”','ê •'=>'ê •','ê –'=>'ê –','ê —'=>'ê —','ê ˜'=>'ê ˜','ê ™'=>'ê ™','ê š'=>'ê š','ê ›'=>'ê ›','ê œ'=>'ê œ','ê '=>'ê ','ê ž'=>'ê ž','ê Ÿ'=>'ê Ÿ','ê  '=>'ê  ','ê ¡'=>'ê ¡','ê ¢'=>'ê ¢','ê £'=>'ê £','ê ¤'=>'ê ¤','ê ¥'=>'ê ¥','ê ¦'=>'ê ¦','ê §'=>'ê §','ê¡€'=>'ê¡€','ê¡'=>'ê¡','ê¡‚'=>'ê¡‚','ꡃ'=>'ꡃ','ê¡„'=>'ê¡„','ê¡…'=>'ê¡…','ꡆ'=>'ꡆ','ꡇ'=>'ꡇ','ꡈ'=>'ꡈ','ꡉ'=>'ꡉ','ê¡Š'=>'ê¡Š','ê¡‹'=>'ê¡‹','ê¡Œ'=>'ê¡Œ','ê¡'=>'ê¡','ê¡Ž'=>'ê¡Ž','ê¡'=>'ê¡','ê¡'=>'ê¡','ê¡‘'=>'ê¡‘','ê¡’'=>'ê¡’','ê¡“'=>'ê¡“','ê¡”'=>'ê¡”','ê¡•'=>'ê¡•','ê¡–'=>'ê¡–','ê¡—'=>'ê¡—','ꡘ'=>'ꡘ','ê¡™'=>'ê¡™','ê¡š'=>'ê¡š','ê¡›'=>'ê¡›','ê¡œ'=>'ê¡œ','ê¡'=>'ê¡','ê¡ž'=>'ê¡ž','ê¡Ÿ'=>'ê¡Ÿ','ê¡ '=>'ê¡ ','ê¡¡'=>'ê¡¡','ê¡¢'=>'ê¡¢','ê¡£'=>'ê¡£','ꡤ'=>'ꡤ','ê¡¥'=>'ê¡¥','ꡦ'=>'ꡦ','ꡧ'=>'ꡧ','ꡨ'=>'ꡨ','ê¡©'=>'ê¡©','ꡪ'=>'ꡪ','ê¡«'=>'ê¡«','ꡬ'=>'ꡬ','ê¡­'=>'ê¡­','ê¡®'=>'ê¡®','ꡯ'=>'ꡯ','ê¡°'=>'ê¡°','ꡱ'=>'ꡱ','ꡲ'=>'ꡲ','ꡳ'=>'ꡳ','ê°€'=>'ê°€'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_26.php b/phpBB/includes/utf/data/search_indexer_26.php
new file mode 100644
index 0000000000..b8718bd608
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_26.php
@@ -0,0 +1 @@
+<?php return array('힣'=>'힣'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_3.php b/phpBB/includes/utf/data/search_indexer_3.php
new file mode 100644
index 0000000000..41798c9e86
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_3.php
@@ -0,0 +1 @@
+<?php return array('á ‹'=>'á ‹','á Œ'=>'á Œ','á '=>'á ','á '=>'0','á ‘'=>'1','á ’'=>'2','á “'=>'3','á ”'=>'4','á •'=>'5','á –'=>'6','á —'=>'7','á ˜'=>'8','á ™'=>'9','á  '=>'á  ','á ¡'=>'á ¡','á ¢'=>'á ¢','á £'=>'á £','á ¤'=>'á ¤','á ¥'=>'á ¥','á ¦'=>'á ¦','á §'=>'á §','á ¨'=>'á ¨','á ©'=>'á ©','á ª'=>'á ª','á «'=>'á «','á ¬'=>'á ¬','á ­'=>'á ­','á ®'=>'á ®','á ¯'=>'á ¯','á °'=>'á °','á ±'=>'á ±','á ²'=>'á ²','á ³'=>'á ³','á ´'=>'á ´','á µ'=>'á µ','á ¶'=>'á ¶','á ·'=>'á ·','á ¸'=>'á ¸','á ¹'=>'á ¹','á º'=>'á º','á »'=>'á »','á ¼'=>'á ¼','á ½'=>'á ½','á ¾'=>'á ¾','á ¿'=>'á ¿','á¡€'=>'á¡€','á¡'=>'á¡','á¡‚'=>'á¡‚','ᡃ'=>'ᡃ','á¡„'=>'á¡„','á¡…'=>'á¡…','ᡆ'=>'ᡆ','ᡇ'=>'ᡇ','ᡈ'=>'ᡈ','ᡉ'=>'ᡉ','á¡Š'=>'á¡Š','á¡‹'=>'á¡‹','á¡Œ'=>'á¡Œ','á¡'=>'á¡','á¡Ž'=>'á¡Ž','á¡'=>'á¡','á¡'=>'á¡','á¡‘'=>'á¡‘','á¡’'=>'á¡’','á¡“'=>'á¡“','á¡”'=>'á¡”','á¡•'=>'á¡•','á¡–'=>'á¡–','á¡—'=>'á¡—','ᡘ'=>'ᡘ','á¡™'=>'á¡™','á¡š'=>'á¡š','á¡›'=>'á¡›','á¡œ'=>'á¡œ','á¡'=>'á¡','á¡ž'=>'á¡ž','á¡Ÿ'=>'á¡Ÿ','á¡ '=>'á¡ ','á¡¡'=>'á¡¡','á¡¢'=>'á¡¢','á¡£'=>'á¡£','ᡤ'=>'ᡤ','á¡¥'=>'á¡¥','ᡦ'=>'ᡦ','ᡧ'=>'ᡧ','ᡨ'=>'ᡨ','á¡©'=>'á¡©','ᡪ'=>'ᡪ','á¡«'=>'á¡«','ᡬ'=>'ᡬ','á¡­'=>'á¡­','á¡®'=>'á¡®','ᡯ'=>'ᡯ','á¡°'=>'á¡°','ᡱ'=>'ᡱ','ᡲ'=>'ᡲ','ᡳ'=>'ᡳ','á¡´'=>'á¡´','ᡵ'=>'ᡵ','ᡶ'=>'ᡶ','á¡·'=>'á¡·','ᢀ'=>'ᢀ','á¢'=>'á¢','ᢂ'=>'ᢂ','ᢃ'=>'ᢃ','ᢄ'=>'ᢄ','ᢅ'=>'ᢅ','ᢆ'=>'ᢆ','ᢇ'=>'ᢇ','ᢈ'=>'ᢈ','ᢉ'=>'ᢉ','ᢊ'=>'ᢊ','ᢋ'=>'ᢋ','ᢌ'=>'ᢌ','á¢'=>'á¢','ᢎ'=>'ᢎ','á¢'=>'á¢','á¢'=>'á¢','ᢑ'=>'ᢑ','ᢒ'=>'ᢒ','ᢓ'=>'ᢓ','ᢔ'=>'ᢔ','ᢕ'=>'ᢕ','ᢖ'=>'ᢖ','ᢗ'=>'ᢗ','ᢘ'=>'ᢘ','ᢙ'=>'ᢙ','ᢚ'=>'ᢚ','ᢛ'=>'ᢛ','ᢜ'=>'ᢜ','á¢'=>'á¢','ᢞ'=>'ᢞ','ᢟ'=>'ᢟ','ᢠ'=>'ᢠ','ᢡ'=>'ᢡ','ᢢ'=>'ᢢ','ᢣ'=>'ᢣ','ᢤ'=>'ᢤ','ᢥ'=>'ᢥ','ᢦ'=>'ᢦ','ᢧ'=>'ᢧ','ᢨ'=>'ᢨ','ᢩ'=>'ᢩ','ᤀ'=>'ᤀ','á¤'=>'á¤','ᤂ'=>'ᤂ','ᤃ'=>'ᤃ','ᤄ'=>'ᤄ','ᤅ'=>'ᤅ','ᤆ'=>'ᤆ','ᤇ'=>'ᤇ','ᤈ'=>'ᤈ','ᤉ'=>'ᤉ','ᤊ'=>'ᤊ','ᤋ'=>'ᤋ','ᤌ'=>'ᤌ','á¤'=>'á¤','ᤎ'=>'ᤎ','á¤'=>'á¤','á¤'=>'á¤','ᤑ'=>'ᤑ','ᤒ'=>'ᤒ','ᤓ'=>'ᤓ','ᤔ'=>'ᤔ','ᤕ'=>'ᤕ','ᤖ'=>'ᤖ','ᤗ'=>'ᤗ','ᤘ'=>'ᤘ','ᤙ'=>'ᤙ','ᤚ'=>'ᤚ','ᤛ'=>'ᤛ','ᤜ'=>'ᤜ','ᤠ'=>'ᤠ','ᤡ'=>'ᤡ','ᤢ'=>'ᤢ','ᤣ'=>'ᤣ','ᤤ'=>'ᤤ','ᤥ'=>'ᤥ','ᤦ'=>'ᤦ','ᤧ'=>'ᤧ','ᤨ'=>'ᤨ','ᤩ'=>'ᤩ','ᤪ'=>'ᤪ','ᤫ'=>'ᤫ','ᤰ'=>'ᤰ','ᤱ'=>'ᤱ','ᤲ'=>'ᤲ','ᤳ'=>'ᤳ','ᤴ'=>'ᤴ','ᤵ'=>'ᤵ','ᤶ'=>'ᤶ','ᤷ'=>'ᤷ','ᤸ'=>'ᤸ','᤹'=>'᤹','᤺'=>'᤺','᤻'=>'᤻','᥆'=>'0','᥇'=>'1','᥈'=>'2','᥉'=>'3','᥊'=>'4','᥋'=>'5','᥌'=>'6','á¥'=>'7','᥎'=>'8','á¥'=>'9','á¥'=>'á¥','ᥑ'=>'ᥑ','ᥒ'=>'ᥒ','ᥓ'=>'ᥓ','ᥔ'=>'ᥔ','ᥕ'=>'ᥕ','ᥖ'=>'ᥖ','ᥗ'=>'ᥗ','ᥘ'=>'ᥘ','ᥙ'=>'ᥙ','ᥚ'=>'ᥚ','ᥛ'=>'ᥛ','ᥜ'=>'ᥜ','á¥'=>'á¥','ᥞ'=>'ᥞ','ᥟ'=>'ᥟ','ᥠ'=>'ᥠ','ᥡ'=>'ᥡ','ᥢ'=>'ᥢ','ᥣ'=>'ᥣ','ᥤ'=>'ᥤ','ᥥ'=>'ᥥ','ᥦ'=>'ᥦ','ᥧ'=>'ᥧ','ᥨ'=>'ᥨ','ᥩ'=>'ᥩ','ᥪ'=>'ᥪ','ᥫ'=>'ᥫ','ᥬ'=>'ᥬ','ᥭ'=>'ᥭ','ᥰ'=>'ᥰ','ᥱ'=>'ᥱ','ᥲ'=>'ᥲ','ᥳ'=>'ᥳ','ᥴ'=>'ᥴ','ᦀ'=>'ᦀ','á¦'=>'á¦','ᦂ'=>'ᦂ','ᦃ'=>'ᦃ','ᦄ'=>'ᦄ','ᦅ'=>'ᦅ','ᦆ'=>'ᦆ','ᦇ'=>'ᦇ','ᦈ'=>'ᦈ','ᦉ'=>'ᦉ','ᦊ'=>'ᦊ','ᦋ'=>'ᦋ','ᦌ'=>'ᦌ','á¦'=>'á¦','ᦎ'=>'ᦎ','á¦'=>'á¦','á¦'=>'á¦','ᦑ'=>'ᦑ','ᦒ'=>'ᦒ','ᦓ'=>'ᦓ','ᦔ'=>'ᦔ','ᦕ'=>'ᦕ','ᦖ'=>'ᦖ','ᦗ'=>'ᦗ','ᦘ'=>'ᦘ','ᦙ'=>'ᦙ','ᦚ'=>'ᦚ','ᦛ'=>'ᦛ','ᦜ'=>'ᦜ','á¦'=>'á¦','ᦞ'=>'ᦞ','ᦟ'=>'ᦟ','ᦠ'=>'ᦠ','ᦡ'=>'ᦡ','ᦢ'=>'ᦢ','ᦣ'=>'ᦣ','ᦤ'=>'ᦤ','ᦥ'=>'ᦥ','ᦦ'=>'ᦦ','ᦧ'=>'ᦧ','ᦨ'=>'ᦨ','ᦩ'=>'ᦩ','ᦰ'=>'ᦰ','ᦱ'=>'ᦱ','ᦲ'=>'ᦲ','ᦳ'=>'ᦳ','ᦴ'=>'ᦴ','ᦵ'=>'ᦵ','ᦶ'=>'ᦶ','ᦷ'=>'ᦷ','ᦸ'=>'ᦸ','ᦹ'=>'ᦹ','ᦺ'=>'ᦺ','ᦻ'=>'ᦻ','ᦼ'=>'ᦼ','ᦽ'=>'ᦽ','ᦾ'=>'ᦾ','ᦿ'=>'ᦿ','ᧀ'=>'ᧀ','á§'=>'á§','ᧂ'=>'ᧂ','ᧃ'=>'ᧃ','ᧄ'=>'ᧄ','ᧅ'=>'ᧅ','ᧆ'=>'ᧆ','ᧇ'=>'ᧇ','ᧈ'=>'ᧈ','ᧉ'=>'ᧉ','á§'=>'0','᧑'=>'1','᧒'=>'2','᧓'=>'3','᧔'=>'4','᧕'=>'5','᧖'=>'6','᧗'=>'7','᧘'=>'8','᧙'=>'9','ᨀ'=>'ᨀ','á¨'=>'á¨','ᨂ'=>'ᨂ','ᨃ'=>'ᨃ','ᨄ'=>'ᨄ','ᨅ'=>'ᨅ','ᨆ'=>'ᨆ','ᨇ'=>'ᨇ','ᨈ'=>'ᨈ','ᨉ'=>'ᨉ','ᨊ'=>'ᨊ','ᨋ'=>'ᨋ','ᨌ'=>'ᨌ','á¨'=>'á¨','ᨎ'=>'ᨎ','á¨'=>'á¨','á¨'=>'á¨','ᨑ'=>'ᨑ','ᨒ'=>'ᨒ','ᨓ'=>'ᨓ','ᨔ'=>'ᨔ','ᨕ'=>'ᨕ','ᨖ'=>'ᨖ','ᨗ'=>'ᨗ','ᨘ'=>'ᨘ','ᨙ'=>'ᨙ','ᨚ'=>'ᨚ','ᨛ'=>'ᨛ','ᬀ'=>'ᬀ','á¬'=>'á¬','ᬂ'=>'ᬂ','ᬃ'=>'ᬃ','ᬄ'=>'ᬄ','ᬅ'=>'ᬅ','ᬆ'=>'ᬆ','ᬇ'=>'ᬇ','ᬈ'=>'ᬈ','ᬉ'=>'ᬉ','ᬊ'=>'ᬊ','ᬋ'=>'ᬋ','ᬌ'=>'ᬌ','á¬'=>'á¬','ᬎ'=>'ᬎ','á¬'=>'á¬','á¬'=>'á¬','ᬑ'=>'ᬑ','ᬒ'=>'ᬒ','ᬓ'=>'ᬓ','ᬔ'=>'ᬔ','ᬕ'=>'ᬕ','ᬖ'=>'ᬖ','ᬗ'=>'ᬗ','ᬘ'=>'ᬘ','ᬙ'=>'ᬙ','ᬚ'=>'ᬚ','ᬛ'=>'ᬛ','ᬜ'=>'ᬜ','á¬'=>'á¬','ᬞ'=>'ᬞ','ᬟ'=>'ᬟ','ᬠ'=>'ᬠ','ᬡ'=>'ᬡ','ᬢ'=>'ᬢ','ᬣ'=>'ᬣ','ᬤ'=>'ᬤ','ᬥ'=>'ᬥ','ᬦ'=>'ᬦ','ᬧ'=>'ᬧ','ᬨ'=>'ᬨ','ᬩ'=>'ᬩ','ᬪ'=>'ᬪ','ᬫ'=>'ᬫ','ᬬ'=>'ᬬ','ᬭ'=>'ᬭ','ᬮ'=>'ᬮ','ᬯ'=>'ᬯ','ᬰ'=>'ᬰ','ᬱ'=>'ᬱ','ᬲ'=>'ᬲ','ᬳ'=>'ᬳ','᬴'=>'᬴','ᬵ'=>'ᬵ','ᬶ'=>'ᬶ','ᬷ'=>'ᬷ','ᬸ'=>'ᬸ','ᬹ'=>'ᬹ','ᬺ'=>'ᬺ','ᬻ'=>'ᬻ','ᬼ'=>'ᬼ','ᬽ'=>'ᬽ','ᬾ'=>'ᬾ','ᬿ'=>'ᬿ','á­€'=>'á­€','á­'=>'á­','á­‚'=>'á­‚','á­ƒ'=>'á­ƒ','á­„'=>'á­„','á­…'=>'á­…','á­†'=>'á­†','á­‡'=>'á­‡','á­ˆ'=>'á­ˆ','á­‰'=>'á­‰','á­Š'=>'á­Š','á­‹'=>'á­‹','á­'=>'0','á­‘'=>'1','á­’'=>'2','á­“'=>'3','á­”'=>'4','á­•'=>'5','á­–'=>'6','á­—'=>'7','á­˜'=>'8','á­™'=>'9','á­«'=>'á­«','á­¬'=>'á­¬','á­­'=>'á­­','á­®'=>'á­®','á­¯'=>'á­¯','á­°'=>'á­°','á­±'=>'á­±','á­²'=>'á­²','á­³'=>'á­³','á´€'=>'á´€','á´'=>'á´','á´‚'=>'á´‚','á´ƒ'=>'á´ƒ','á´„'=>'á´„','á´…'=>'á´…','á´†'=>'á´†','á´‡'=>'á´‡','á´ˆ'=>'á´ˆ','á´‰'=>'á´‰','á´Š'=>'á´Š','á´‹'=>'á´‹','á´Œ'=>'á´Œ','á´'=>'á´','á´Ž'=>'á´Ž','á´'=>'á´','á´'=>'á´','á´‘'=>'á´‘','á´’'=>'á´’','á´“'=>'á´“','á´”'=>'á´”','á´•'=>'á´•','á´–'=>'á´–','á´—'=>'á´—','á´˜'=>'á´˜','á´™'=>'á´™','á´š'=>'á´š','á´›'=>'á´›','á´œ'=>'á´œ','á´'=>'á´','á´ž'=>'á´ž','á´Ÿ'=>'á´Ÿ','á´ '=>'á´ ','á´¡'=>'á´¡','á´¢'=>'á´¢','á´£'=>'á´£','á´¤'=>'á´¤','á´¥'=>'á´¥','á´¦'=>'á´¦','á´§'=>'á´§','á´¨'=>'á´¨','á´©'=>'á´©','á´ª'=>'á´ª','á´«'=>'á´«','á´¬'=>'á´¬','á´­'=>'á´­','á´®'=>'á´®','á´¯'=>'á´¯','á´°'=>'á´°','á´±'=>'á´±','á´²'=>'á´²','á´³'=>'á´³','á´´'=>'á´´','á´µ'=>'á´µ','á´¶'=>'á´¶','á´·'=>'á´·','á´¸'=>'á´¸','á´¹'=>'á´¹','á´º'=>'á´º','á´»'=>'á´»','á´¼'=>'á´¼','á´½'=>'á´½','á´¾'=>'á´¾','á´¿'=>'á´¿','áµ€'=>'áµ€','áµ'=>'áµ','ᵂ'=>'ᵂ','ᵃ'=>'ᵃ','ᵄ'=>'ᵄ','áµ…'=>'áµ…','ᵆ'=>'ᵆ','ᵇ'=>'ᵇ','ᵈ'=>'ᵈ','ᵉ'=>'ᵉ','ᵊ'=>'ᵊ','ᵋ'=>'ᵋ','ᵌ'=>'ᵌ','áµ'=>'áµ','ᵎ'=>'ᵎ','áµ'=>'áµ','áµ'=>'áµ','ᵑ'=>'ᵑ','áµ’'=>'áµ’','ᵓ'=>'ᵓ','áµ”'=>'áµ”','ᵕ'=>'ᵕ','áµ–'=>'áµ–','áµ—'=>'áµ—','ᵘ'=>'ᵘ','áµ™'=>'áµ™','ᵚ'=>'ᵚ','áµ›'=>'áµ›','ᵜ'=>'ᵜ','áµ'=>'áµ','ᵞ'=>'ᵞ','ᵟ'=>'ᵟ','áµ '=>'áµ ','ᵡ'=>'ᵡ','áµ¢'=>'áµ¢','áµ£'=>'áµ£','ᵤ'=>'ᵤ','áµ¥'=>'áµ¥','ᵦ'=>'ᵦ','ᵧ'=>'ᵧ','ᵨ'=>'ᵨ','ᵩ'=>'ᵩ','ᵪ'=>'ᵪ','ᵫ'=>'ue','ᵬ'=>'ᵬ','áµ­'=>'áµ­','áµ®'=>'áµ®','ᵯ'=>'ᵯ','áµ°'=>'áµ°','áµ±'=>'áµ±','áµ²'=>'áµ²','áµ³'=>'áµ³','áµ´'=>'áµ´','áµµ'=>'áµµ','ᵶ'=>'ᵶ','áµ·'=>'áµ·','ᵸ'=>'ᵸ','áµ¹'=>'áµ¹','ᵺ'=>'ᵺ','áµ»'=>'áµ»','áµ¼'=>'áµ¼','áµ½'=>'áµ½','áµ¾'=>'áµ¾','ᵿ'=>'ᵿ','ᶀ'=>'ᶀ','á¶'=>'á¶','ᶂ'=>'ᶂ','ᶃ'=>'ᶃ','ᶄ'=>'ᶄ','ᶅ'=>'ᶅ','ᶆ'=>'ᶆ','ᶇ'=>'ᶇ','ᶈ'=>'ᶈ','ᶉ'=>'ᶉ','ᶊ'=>'ᶊ','ᶋ'=>'ᶋ','ᶌ'=>'ᶌ','á¶'=>'á¶','ᶎ'=>'ᶎ','á¶'=>'á¶','á¶'=>'á¶','ᶑ'=>'ᶑ','ᶒ'=>'ᶒ','ᶓ'=>'ᶓ','ᶔ'=>'ᶔ','ᶕ'=>'ᶕ','ᶖ'=>'ᶖ','ᶗ'=>'ᶗ','ᶘ'=>'ᶘ','ᶙ'=>'ᶙ','ᶚ'=>'ᶚ','ᶛ'=>'ᶛ','ᶜ'=>'ᶜ','á¶'=>'á¶','ᶞ'=>'ᶞ','ᶟ'=>'ᶟ','ᶠ'=>'ᶠ','ᶡ'=>'ᶡ','ᶢ'=>'ᶢ','ᶣ'=>'ᶣ','ᶤ'=>'ᶤ','ᶥ'=>'ᶥ','ᶦ'=>'ᶦ','ᶧ'=>'ᶧ','ᶨ'=>'ᶨ','ᶩ'=>'ᶩ','ᶪ'=>'ᶪ','ᶫ'=>'ᶫ','ᶬ'=>'ᶬ','ᶭ'=>'ᶭ','ᶮ'=>'ᶮ','ᶯ'=>'ᶯ','ᶰ'=>'ᶰ','ᶱ'=>'ᶱ','ᶲ'=>'ᶲ','ᶳ'=>'ᶳ','ᶴ'=>'ᶴ','ᶵ'=>'ᶵ','ᶶ'=>'ᶶ','ᶷ'=>'ᶷ','ᶸ'=>'ᶸ','ᶹ'=>'ᶹ','ᶺ'=>'ᶺ','ᶻ'=>'ᶻ','ᶼ'=>'ᶼ','ᶽ'=>'ᶽ','ᶾ'=>'ᶾ','ᶿ'=>'ᶿ','á·€'=>'á·€','á·'=>'á·','á·‚'=>'á·‚','á·ƒ'=>'á·ƒ','á·„'=>'á·„','á·…'=>'á·…','á·†'=>'á·†','á·‡'=>'á·‡','á·ˆ'=>'á·ˆ','á·‰'=>'á·‰','á·Š'=>'á·Š','á·¾'=>'á·¾','á·¿'=>'á·¿','Ḁ'=>'á¸','á¸'=>'á¸','Ḃ'=>'ḃ','ḃ'=>'ḃ','Ḅ'=>'ḅ','ḅ'=>'ḅ','Ḇ'=>'ḇ','ḇ'=>'ḇ','Ḉ'=>'ḉ','ḉ'=>'ḉ','Ḋ'=>'ḋ','ḋ'=>'ḋ','Ḍ'=>'á¸','á¸'=>'á¸','Ḏ'=>'á¸','á¸'=>'á¸','á¸'=>'ḑ','ḑ'=>'ḑ','Ḓ'=>'ḓ','ḓ'=>'ḓ','Ḕ'=>'ḕ','ḕ'=>'ḕ','Ḗ'=>'ḗ','ḗ'=>'ḗ','Ḙ'=>'ḙ','ḙ'=>'ḙ','Ḛ'=>'ḛ','ḛ'=>'ḛ','Ḝ'=>'á¸','á¸'=>'á¸','Ḟ'=>'ḟ','ḟ'=>'ḟ','Ḡ'=>'ḡ','ḡ'=>'ḡ','Ḣ'=>'ḣ','ḣ'=>'ḣ','Ḥ'=>'ḥ','ḥ'=>'ḥ','Ḧ'=>'ḧ','ḧ'=>'ḧ','Ḩ'=>'ḩ','ḩ'=>'ḩ','Ḫ'=>'ḫ','ḫ'=>'ḫ','Ḭ'=>'ḭ','ḭ'=>'ḭ','Ḯ'=>'ḯ','ḯ'=>'ḯ','Ḱ'=>'ḱ','ḱ'=>'ḱ','Ḳ'=>'ḳ','ḳ'=>'ḳ','Ḵ'=>'ḵ','ḵ'=>'ḵ','Ḷ'=>'ḷ','ḷ'=>'ḷ','Ḹ'=>'ḹ','ḹ'=>'ḹ','Ḻ'=>'ḻ','ḻ'=>'ḻ','Ḽ'=>'ḽ','ḽ'=>'ḽ','Ḿ'=>'ḿ','ḿ'=>'ḿ','á¹€'=>'á¹','á¹'=>'á¹','Ṃ'=>'ṃ','ṃ'=>'ṃ','Ṅ'=>'á¹…','á¹…'=>'á¹…','Ṇ'=>'ṇ','ṇ'=>'ṇ','Ṉ'=>'ṉ','ṉ'=>'ṉ','Ṋ'=>'ṋ','ṋ'=>'ṋ','Ṍ'=>'á¹','á¹'=>'á¹','Ṏ'=>'á¹','á¹'=>'á¹','á¹'=>'ṑ','ṑ'=>'ṑ','á¹’'=>'ṓ','ṓ'=>'ṓ','á¹”'=>'ṕ','ṕ'=>'ṕ','á¹–'=>'á¹—','á¹—'=>'á¹—','Ṙ'=>'á¹™','á¹™'=>'á¹™','Ṛ'=>'á¹›','á¹›'=>'á¹›','Ṝ'=>'á¹','á¹'=>'á¹','Ṟ'=>'ṟ','ṟ'=>'ṟ','á¹ '=>'ṡ','ṡ'=>'ṡ','á¹¢'=>'á¹£','á¹£'=>'á¹£','Ṥ'=>'á¹¥','á¹¥'=>'á¹¥','Ṧ'=>'ṧ','ṧ'=>'ṧ','Ṩ'=>'ṩ','ṩ'=>'ṩ','Ṫ'=>'ṫ','ṫ'=>'ṫ','Ṭ'=>'á¹­','á¹­'=>'á¹­','á¹®'=>'ṯ','ṯ'=>'ṯ','á¹°'=>'á¹±','á¹±'=>'á¹±','á¹²'=>'á¹³','á¹³'=>'á¹³','á¹´'=>'á¹µ','á¹µ'=>'á¹µ','Ṷ'=>'á¹·','á¹·'=>'á¹·','Ṹ'=>'á¹¹','á¹¹'=>'á¹¹','Ṻ'=>'á¹»','á¹»'=>'á¹»','á¹¼'=>'á¹½','á¹½'=>'á¹½','á¹¾'=>'ṿ','ṿ'=>'ṿ','Ẁ'=>'áº','áº'=>'áº','Ẃ'=>'ẃ','ẃ'=>'ẃ','Ẅ'=>'ẅ','ẅ'=>'ẅ','Ẇ'=>'ẇ','ẇ'=>'ẇ','Ẉ'=>'ẉ','ẉ'=>'ẉ','Ẋ'=>'ẋ','ẋ'=>'ẋ','Ẍ'=>'áº','áº'=>'áº','Ẏ'=>'áº','áº'=>'áº','áº'=>'ẑ','ẑ'=>'ẑ','Ẓ'=>'ẓ','ẓ'=>'ẓ','Ẕ'=>'ẕ','ẕ'=>'ẕ','ẖ'=>'ẖ','ẗ'=>'ẗ','ẘ'=>'ẘ','ẙ'=>'ẙ','ẚ'=>'ẚ','ẛ'=>'ẛ','Ạ'=>'ạ','ạ'=>'ạ','Ả'=>'ả','ả'=>'ả','Ấ'=>'ấ','ấ'=>'ấ','Ầ'=>'ầ','ầ'=>'ầ','Ẩ'=>'ẩ','ẩ'=>'ẩ','Ẫ'=>'ẫ','ẫ'=>'ẫ','Ậ'=>'ậ','ậ'=>'ậ','Ắ'=>'ắ','ắ'=>'ắ','Ằ'=>'ằ','ằ'=>'ằ','Ẳ'=>'ẳ','ẳ'=>'ẳ','Ẵ'=>'ẵ','ẵ'=>'ẵ','Ặ'=>'ặ','ặ'=>'ặ','Ẹ'=>'ẹ','ẹ'=>'ẹ','Ẻ'=>'ẻ','ẻ'=>'ẻ','Ẽ'=>'ẽ','ẽ'=>'ẽ','Ế'=>'ế','ế'=>'ế','Ề'=>'á»','á»'=>'á»','Ể'=>'ể','ể'=>'ể','Ễ'=>'á»…','á»…'=>'á»…','Ệ'=>'ệ','ệ'=>'ệ','Ỉ'=>'ỉ','ỉ'=>'ỉ','Ị'=>'ị','ị'=>'ị','Ọ'=>'á»','á»'=>'á»','Ỏ'=>'á»','á»'=>'á»','á»'=>'ố','ố'=>'ố','á»’'=>'ồ','ồ'=>'ồ','á»”'=>'ổ','ổ'=>'ổ','á»–'=>'á»—','á»—'=>'á»—','Ộ'=>'á»™','á»™'=>'á»™','Ớ'=>'á»›','á»›'=>'á»›','Ờ'=>'á»','á»'=>'á»','Ở'=>'ở','ở'=>'ở','á» '=>'ỡ','ỡ'=>'ỡ','Ợ'=>'ợ','ợ'=>'ợ','Ụ'=>'ụ','ụ'=>'ụ','Ủ'=>'ủ','ủ'=>'ủ','Ứ'=>'ứ','ứ'=>'ứ','Ừ'=>'ừ','ừ'=>'ừ','Ử'=>'á»­','á»­'=>'á»­','á»®'=>'ữ','ữ'=>'ữ','á»°'=>'á»±','á»±'=>'á»±','Ỳ'=>'ỳ','ỳ'=>'ỳ','á»´'=>'ỵ','ỵ'=>'ỵ','Ỷ'=>'á»·','á»·'=>'á»·','Ỹ'=>'ỹ','ỹ'=>'ỹ','á¼€'=>'á¼€','á¼'=>'á¼','ἂ'=>'ἂ','ἃ'=>'ἃ','ἄ'=>'ἄ','á¼…'=>'á¼…','ἆ'=>'ἆ','ἇ'=>'ἇ','Ἀ'=>'á¼€','Ἁ'=>'á¼','Ἂ'=>'ἂ','Ἃ'=>'ἃ','Ἄ'=>'ἄ','á¼'=>'á¼…','Ἆ'=>'ἆ','á¼'=>'ἇ','á¼'=>'á¼','ἑ'=>'ἑ','á¼’'=>'á¼’','ἓ'=>'ἓ','á¼”'=>'á¼”','ἕ'=>'ἕ','Ἐ'=>'á¼','á¼™'=>'ἑ','Ἒ'=>'á¼’','á¼›'=>'ἓ','Ἔ'=>'á¼”','á¼'=>'ἕ','á¼ '=>'á¼ ','ἡ'=>'ἡ','á¼¢'=>'á¼¢','á¼£'=>'á¼£','ἤ'=>'ἤ','á¼¥'=>'á¼¥','ἦ'=>'ἦ','ἧ'=>'ἧ','Ἠ'=>'á¼ ','Ἡ'=>'ἡ','Ἢ'=>'á¼¢','Ἣ'=>'á¼£','Ἤ'=>'ἤ','á¼­'=>'á¼¥','á¼®'=>'ἦ','Ἧ'=>'ἧ','á¼°'=>'á¼°','á¼±'=>'á¼±','á¼²'=>'á¼²','á¼³'=>'á¼³','á¼´'=>'á¼´','á¼µ'=>'á¼µ','ἶ'=>'ἶ','á¼·'=>'á¼·','Ἰ'=>'á¼°','á¼¹'=>'á¼±','Ἲ'=>'á¼²','á¼»'=>'á¼³','á¼¼'=>'á¼´','á¼½'=>'á¼µ','á¼¾'=>'ἶ','Ἷ'=>'á¼·','á½€'=>'á½€','á½'=>'á½','ὂ'=>'ὂ','ὃ'=>'ὃ','ὄ'=>'ὄ','á½…'=>'á½…','Ὀ'=>'á½€','Ὁ'=>'á½','Ὂ'=>'ὂ','Ὃ'=>'ὃ','Ὄ'=>'ὄ','á½'=>'á½…','á½'=>'á½','ὑ'=>'ὑ','á½’'=>'á½’','ὓ'=>'ὓ','á½”'=>'á½”','ὕ'=>'ὕ','á½–'=>'á½–','á½—'=>'á½—','á½™'=>'ὑ','á½›'=>'ὓ','á½'=>'ὕ','Ὗ'=>'á½—','á½ '=>'á½ ','ὡ'=>'ὡ','á½¢'=>'á½¢','á½£'=>'á½£','ὤ'=>'ὤ','á½¥'=>'á½¥','ὦ'=>'ὦ','ὧ'=>'ὧ','Ὠ'=>'á½ ','Ὡ'=>'ὡ','Ὢ'=>'á½¢','Ὣ'=>'á½£','Ὤ'=>'ὤ','á½­'=>'á½¥','á½®'=>'ὦ','Ὧ'=>'ὧ','á½°'=>'á½°','á½±'=>'á½±','á½²'=>'á½²','á½³'=>'á½³','á½´'=>'á½´','á½µ'=>'á½µ','ὶ'=>'ὶ','á½·'=>'á½·','ὸ'=>'ὸ','á½¹'=>'á½¹','ὺ'=>'ὺ','á½»'=>'á½»','á½¼'=>'á½¼','á½½'=>'á½½','á¾€'=>'á¾€','á¾'=>'á¾','ᾂ'=>'ᾂ','ᾃ'=>'ᾃ','ᾄ'=>'ᾄ','á¾…'=>'á¾…','ᾆ'=>'ᾆ','ᾇ'=>'ᾇ','ᾈ'=>'á¾€','ᾉ'=>'á¾','ᾊ'=>'ᾂ','ᾋ'=>'ᾃ','ᾌ'=>'ᾄ','á¾'=>'á¾…','ᾎ'=>'ᾆ','á¾'=>'ᾇ','á¾'=>'á¾','ᾑ'=>'ᾑ','á¾’'=>'á¾’','ᾓ'=>'ᾓ','á¾”'=>'á¾”','ᾕ'=>'ᾕ','á¾–'=>'á¾–','á¾—'=>'á¾—','ᾘ'=>'á¾','á¾™'=>'ᾑ','ᾚ'=>'á¾’','á¾›'=>'ᾓ','ᾜ'=>'á¾”','á¾'=>'ᾕ','ᾞ'=>'á¾–','ᾟ'=>'á¾—','á¾ '=>'á¾ ','ᾡ'=>'ᾡ','á¾¢'=>'á¾¢','á¾£'=>'á¾£','ᾤ'=>'ᾤ','á¾¥'=>'á¾¥','ᾦ'=>'ᾦ','ᾧ'=>'ᾧ','ᾨ'=>'á¾ ','ᾩ'=>'ᾡ','ᾪ'=>'á¾¢','ᾫ'=>'á¾£','ᾬ'=>'ᾤ','á¾­'=>'á¾¥','á¾®'=>'ᾦ','ᾯ'=>'ᾧ','á¾°'=>'á¾°','á¾±'=>'á¾±','á¾²'=>'á¾²','á¾³'=>'á¾³','á¾´'=>'á¾´','ᾶ'=>'ᾶ','á¾·'=>'á¾·','Ᾰ'=>'á¾°','á¾¹'=>'á¾±','Ὰ'=>'á½°','á¾»'=>'á½±','á¾¼'=>'á¾³','á¾¾'=>'á¾¾','á¿‚'=>'á¿‚','ῃ'=>'ῃ','á¿„'=>'á¿„','ῆ'=>'ῆ','ῇ'=>'ῇ','Ὲ'=>'á½²','Έ'=>'á½³','á¿Š'=>'á½´','á¿‹'=>'á½µ','á¿Œ'=>'ῃ','á¿'=>'á¿','á¿‘'=>'á¿‘','á¿’'=>'á¿’','á¿“'=>'á¿“','á¿–'=>'á¿–','á¿—'=>'á¿—','Ῐ'=>'á¿','á¿™'=>'á¿‘','á¿š'=>'ὶ','á¿›'=>'á½·','á¿ '=>'á¿ ','á¿¡'=>'á¿¡','á¿¢'=>'á¿¢','á¿£'=>'á¿£','ῤ'=>'ῤ','á¿¥'=>'á¿¥','ῦ'=>'ῦ','ῧ'=>'ῧ','Ῠ'=>'á¿ ','á¿©'=>'á¿¡','Ὺ'=>'ὺ','á¿«'=>'á½»','Ῥ'=>'á¿¥','ῲ'=>'ῲ','ῳ'=>'ῳ','á¿´'=>'á¿´','ῶ'=>'ῶ','á¿·'=>'á¿·','Ὸ'=>'ὸ','Ό'=>'á½¹','Ὼ'=>'á½¼','á¿»'=>'á½½','ῼ'=>'ῳ'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_31.php b/phpBB/includes/utf/data/search_indexer_31.php
new file mode 100644
index 0000000000..191365a313
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_31.php
@@ -0,0 +1 @@
+<?php return array('豈'=>'豈','ï¤'=>'ï¤','車'=>'車','賈'=>'賈','滑'=>'滑','串'=>'串','句'=>'句','龜'=>'龜','龜'=>'龜','契'=>'契','金'=>'金','喇'=>'喇','奈'=>'奈','ï¤'=>'ï¤','癩'=>'癩','ï¤'=>'ï¤','ï¤'=>'ï¤','螺'=>'螺','裸'=>'裸','邏'=>'邏','樂'=>'樂','洛'=>'洛','烙'=>'烙','珞'=>'珞','落'=>'落','酪'=>'酪','駱'=>'駱','亂'=>'亂','卵'=>'卵','ï¤'=>'ï¤','爛'=>'爛','蘭'=>'蘭','鸞'=>'鸞','嵐'=>'嵐','濫'=>'濫','藍'=>'藍','襤'=>'襤','拉'=>'拉','臘'=>'臘','蠟'=>'蠟','廊'=>'廊','朗'=>'朗','浪'=>'浪','狼'=>'狼','郎'=>'郎','來'=>'來','冷'=>'冷','勞'=>'勞','擄'=>'擄','櫓'=>'櫓','爐'=>'爐','盧'=>'盧','老'=>'老','蘆'=>'蘆','虜'=>'虜','路'=>'路','露'=>'露','魯'=>'魯','鷺'=>'鷺','碌'=>'碌','祿'=>'祿','綠'=>'綠','菉'=>'菉','錄'=>'錄','鹿'=>'鹿','ï¥'=>'ï¥','壟'=>'壟','弄'=>'弄','籠'=>'籠','聾'=>'聾','牢'=>'牢','磊'=>'磊','賂'=>'賂','雷'=>'雷','壘'=>'壘','屢'=>'屢','樓'=>'樓','ï¥'=>'ï¥','漏'=>'漏','ï¥'=>'ï¥','ï¥'=>'ï¥','陋'=>'陋','勒'=>'勒','肋'=>'肋','凜'=>'凜','凌'=>'凌','稜'=>'稜','綾'=>'綾','菱'=>'菱','陵'=>'陵','讀'=>'讀','拏'=>'拏','樂'=>'樂','ï¥'=>'ï¥','丹'=>'丹','寧'=>'寧','怒'=>'怒','率'=>'率','異'=>'異','北'=>'北','磻'=>'磻','便'=>'便','復'=>'復','不'=>'不','泌'=>'泌','數'=>'數','索'=>'索','參'=>'參','塞'=>'塞','省'=>'省','葉'=>'葉','說'=>'說','殺'=>'殺','辰'=>'辰','沈'=>'沈','拾'=>'拾','若'=>'若','掠'=>'掠','略'=>'略','亮'=>'亮','兩'=>'兩','凉'=>'凉','梁'=>'梁','糧'=>'糧','良'=>'良','諒'=>'諒','量'=>'量','勵'=>'勵','呂'=>'呂','ï¦'=>'ï¦','廬'=>'廬','旅'=>'旅','濾'=>'濾','礪'=>'礪','閭'=>'閭','驪'=>'驪','麗'=>'麗','黎'=>'黎','力'=>'力','曆'=>'曆','歷'=>'歷','ï¦'=>'ï¦','年'=>'年','ï¦'=>'ï¦','ï¦'=>'ï¦','撚'=>'撚','漣'=>'漣','煉'=>'煉','璉'=>'璉','秊'=>'秊','練'=>'練','聯'=>'聯','輦'=>'輦','蓮'=>'蓮','連'=>'連','鍊'=>'鍊','列'=>'列','ï¦'=>'ï¦','咽'=>'咽','烈'=>'烈','裂'=>'裂','說'=>'說','廉'=>'廉','念'=>'念','捻'=>'捻','殮'=>'殮','簾'=>'簾','獵'=>'獵','令'=>'令','囹'=>'囹','寧'=>'寧','嶺'=>'嶺','怜'=>'怜','玲'=>'玲','瑩'=>'瑩','羚'=>'羚','聆'=>'聆','鈴'=>'鈴','零'=>'零','靈'=>'靈','領'=>'領','例'=>'例','禮'=>'禮','醴'=>'醴','隸'=>'隸','惡'=>'惡','了'=>'了','僚'=>'僚','寮'=>'寮','尿'=>'尿','料'=>'料','樂'=>'樂','燎'=>'燎','ï§'=>'ï§','蓼'=>'蓼','遼'=>'遼','龍'=>'龍','暈'=>'暈','阮'=>'阮','劉'=>'劉','杻'=>'杻','柳'=>'柳','流'=>'流','溜'=>'溜','琉'=>'琉','ï§'=>'ï§','硫'=>'硫','ï§'=>'ï§','ï§'=>'ï§','六'=>'六','戮'=>'戮','陸'=>'陸','倫'=>'倫','崙'=>'崙','淪'=>'淪','輪'=>'輪','律'=>'律','慄'=>'慄','栗'=>'栗','率'=>'率','隆'=>'隆','ï§'=>'ï§','吏'=>'吏','履'=>'履','易'=>'易','李'=>'李','梨'=>'梨','泥'=>'泥','理'=>'理','痢'=>'痢','罹'=>'罹','裏'=>'裏','裡'=>'裡','里'=>'里','離'=>'離','匿'=>'匿','溺'=>'溺','吝'=>'吝','燐'=>'燐','璘'=>'璘','藺'=>'藺','隣'=>'隣','鱗'=>'鱗','麟'=>'麟','林'=>'林','淋'=>'淋','臨'=>'臨','立'=>'立','笠'=>'笠','粒'=>'粒','狀'=>'狀','炙'=>'炙','識'=>'識','什'=>'什','茶'=>'茶','刺'=>'刺','切'=>'切','ï¨'=>'ï¨','拓'=>'拓','糖'=>'糖','宅'=>'宅','洞'=>'洞','暴'=>'暴','輻'=>'輻','行'=>'行','降'=>'降','見'=>'見','廓'=>'廓','兀'=>'兀','ï¨'=>'ï¨','﨎'=>'﨎','ï¨'=>'ï¨','ï¨'=>'ï¨','﨑'=>'﨑','晴'=>'晴','﨓'=>'﨓','﨔'=>'﨔','凞'=>'凞','猪'=>'猪','益'=>'益','礼'=>'礼','神'=>'神','祥'=>'祥','福'=>'福','靖'=>'靖','ï¨'=>'ï¨','羽'=>'羽','﨟'=>'﨟','蘒'=>'蘒','﨡'=>'﨡','諸'=>'諸','﨣'=>'﨣','﨤'=>'﨤','逸'=>'逸','都'=>'都','﨧'=>'﨧','﨨'=>'﨨','﨩'=>'﨩','飯'=>'飯','飼'=>'飼','館'=>'館','鶴'=>'鶴','侮'=>'侮','僧'=>'僧','免'=>'免','勉'=>'勉','勤'=>'勤','卑'=>'卑','喝'=>'喝','嘆'=>'嘆','器'=>'器','塀'=>'塀','墨'=>'墨','層'=>'層','屮'=>'屮','悔'=>'悔','慨'=>'慨','憎'=>'憎','ï©€'=>'ï©€','ï©'=>'ï©','ï©‚'=>'ï©‚','暑'=>'暑','ï©„'=>'ï©„','ï©…'=>'ï©…','渚'=>'渚','漢'=>'漢','煮'=>'煮','爫'=>'爫','ï©Š'=>'ï©Š','ï©‹'=>'ï©‹','ï©Œ'=>'ï©Œ','ï©'=>'ï©','ï©Ž'=>'ï©Ž','ï©'=>'ï©','ï©'=>'ï©','ï©‘'=>'ï©‘','ï©’'=>'ï©’','ï©“'=>'ï©“','ï©”'=>'ï©”','ï©•'=>'ï©•','ï©–'=>'ï©–','ï©—'=>'ï©—','縉'=>'縉','ï©™'=>'ï©™','ï©š'=>'ï©š','ï©›'=>'ï©›','ï©œ'=>'ï©œ','ï©'=>'ï©','ï©ž'=>'ï©ž','ï©Ÿ'=>'ï©Ÿ','ï© '=>'ï© ','ï©¡'=>'ï©¡','ï©¢'=>'ï©¢','ï©£'=>'ï©£','賓'=>'賓','ï©¥'=>'ï©¥','辶'=>'辶','逸'=>'逸','難'=>'難','ï©©'=>'ï©©','頻'=>'頻','ï©°'=>'ï©°','况'=>'况','全'=>'全','侀'=>'侀','ï©´'=>'ï©´','冀'=>'冀','勇'=>'勇','ï©·'=>'ï©·','喝'=>'喝','啕'=>'啕','喙'=>'喙','ï©»'=>'ï©»','塚'=>'塚','墳'=>'墳','奄'=>'奄','ï©¿'=>'ï©¿','婢'=>'婢','ïª'=>'ïª','廒'=>'廒','廙'=>'廙','彩'=>'彩','徭'=>'徭','惘'=>'惘','慎'=>'慎','愈'=>'愈','憎'=>'憎','慠'=>'慠','懲'=>'懲','戴'=>'戴','ïª'=>'ïª','搜'=>'搜','ïª'=>'ïª','ïª'=>'ïª','晴'=>'晴','朗'=>'朗','望'=>'望','杖'=>'杖','歹'=>'歹','殺'=>'殺','流'=>'流','滛'=>'滛','滋'=>'滋','漢'=>'漢','瀞'=>'瀞','煮'=>'煮','ïª'=>'ïª','爵'=>'爵','犯'=>'犯','猪'=>'猪','瑱'=>'瑱','甆'=>'甆','画'=>'画','瘝'=>'瘝','瘟'=>'瘟','益'=>'益','盛'=>'盛','直'=>'直','睊'=>'睊','着'=>'着','磌'=>'磌','窱'=>'窱','節'=>'節','类'=>'类','絛'=>'絛','練'=>'練','缾'=>'缾','者'=>'者','荒'=>'荒','華'=>'華','蝹'=>'蝹','襁'=>'襁','覆'=>'覆','視'=>'視','調'=>'調','諸'=>'諸','請'=>'請','謁'=>'謁','諾'=>'諾','諭'=>'諭','謹'=>'謹','ï«€'=>'ï«€','ï«'=>'ï«','ï«‚'=>'ï«‚','遲'=>'遲','ï«„'=>'ï«„','ï«…'=>'ï«…','陼'=>'陼','難'=>'難','靖'=>'靖','韛'=>'韛','ï«Š'=>'ï«Š','ï«‹'=>'ï«‹','ï«Œ'=>'ï«Œ','ï«'=>'ï«','ï«Ž'=>'ï«Ž','ï«'=>'ï«','ï«'=>'ï«','ï«‘'=>'ï«‘','ï«’'=>'ï«’','ï«“'=>'ï«“','ï«”'=>'ï«”','ï«•'=>'ï«•','ï«–'=>'ï«–','ï«—'=>'ï«—','齃'=>'齃','ï«™'=>'ï«™','ff'=>'ff','ï¬'=>'fi','fl'=>'fl','ffi'=>'ffi','ffl'=>'ffl','ſt'=>'ſt','st'=>'st','ﬓ'=>'ﬓ','ﬔ'=>'ﬔ','ﬕ'=>'ﬕ','ﬖ'=>'ﬖ','ﬗ'=>'ﬗ','ï¬'=>'ï¬','ﬞ'=>'ﬞ','ײַ'=>'ײַ','ﬠ'=>'ﬠ','ﬡ'=>'ﬡ','ﬢ'=>'ﬢ','ﬣ'=>'ﬣ','ﬤ'=>'ﬤ','ﬥ'=>'ﬥ','ﬦ'=>'ﬦ','ﬧ'=>'ﬧ','ﬨ'=>'ﬨ','שׁ'=>'שׁ','שׂ'=>'שׂ','שּׁ'=>'שּׁ','שּׂ'=>'שּׂ','אַ'=>'אַ','אָ'=>'אָ','אּ'=>'אּ','בּ'=>'בּ','גּ'=>'גּ','דּ'=>'דּ','הּ'=>'הּ','וּ'=>'וּ','זּ'=>'זּ','טּ'=>'טּ','יּ'=>'יּ','ךּ'=>'ךּ','כּ'=>'כּ','לּ'=>'לּ','מּ'=>'מּ','ï­€'=>'ï­€','ï­'=>'ï­','ï­ƒ'=>'ï­ƒ','ï­„'=>'ï­„','ï­†'=>'ï­†','ï­‡'=>'ï­‡','ï­ˆ'=>'ï­ˆ','ï­‰'=>'ï­‰','ï­Š'=>'ï­Š','ï­‹'=>'ï­‹','ï­Œ'=>'ï­Œ','ï­'=>'ï­','ï­Ž'=>'ï­Ž','ï­'=>'ï­','ï­'=>'ï­','ï­‘'=>'ï­‘','ï­’'=>'ï­’','ï­“'=>'ï­“','ï­”'=>'ï­”','ï­•'=>'ï­•','ï­–'=>'ï­–','ï­—'=>'ï­—','ï­˜'=>'ï­˜','ï­™'=>'ï­™','ï­š'=>'ï­š','ï­›'=>'ï­›','ï­œ'=>'ï­œ','ï­'=>'ï­','ï­ž'=>'ï­ž','ï­Ÿ'=>'ï­Ÿ','ï­ '=>'ï­ ','ï­¡'=>'ï­¡','ï­¢'=>'ï­¢','ï­£'=>'ï­£','ï­¤'=>'ï­¤','ï­¥'=>'ï­¥','ï­¦'=>'ï­¦','ï­§'=>'ï­§','ï­¨'=>'ï­¨','ï­©'=>'ï­©','ï­ª'=>'ï­ª','ï­«'=>'ï­«','ï­¬'=>'ï­¬','ï­­'=>'ï­­','ï­®'=>'ï­®','ï­¯'=>'ï­¯','ï­°'=>'ï­°','ï­±'=>'ï­±','ï­²'=>'ï­²','ï­³'=>'ï­³','ï­´'=>'ï­´','ï­µ'=>'ï­µ','ï­¶'=>'ï­¶','ï­·'=>'ï­·','ï­¸'=>'ï­¸','ï­¹'=>'ï­¹','ï­º'=>'ï­º','ï­»'=>'ï­»','ï­¼'=>'ï­¼','ï­½'=>'ï­½','ï­¾'=>'ï­¾','ï­¿'=>'ï­¿','ﮀ'=>'ﮀ','ï®'=>'ï®','ﮂ'=>'ﮂ','ﮃ'=>'ﮃ','ﮄ'=>'ﮄ','ï®…'=>'ï®…','ﮆ'=>'ﮆ','ﮇ'=>'ﮇ','ﮈ'=>'ﮈ','ﮉ'=>'ﮉ','ﮊ'=>'ﮊ','ﮋ'=>'ﮋ','ﮌ'=>'ﮌ','ï®'=>'ï®','ﮎ'=>'ﮎ','ï®'=>'ï®','ï®'=>'ï®','ﮑ'=>'ﮑ','ï®’'=>'ï®’','ﮓ'=>'ﮓ','ï®”'=>'ï®”','ﮕ'=>'ﮕ','ï®–'=>'ï®–','ï®—'=>'ï®—','ﮘ'=>'ﮘ','ï®™'=>'ï®™','ﮚ'=>'ﮚ','ï®›'=>'ï®›','ﮜ'=>'ﮜ','ï®'=>'ï®','ﮞ'=>'ﮞ','ﮟ'=>'ﮟ','ï® '=>'ï® ','ﮡ'=>'ﮡ','ﮢ'=>'ﮢ','ﮣ'=>'ﮣ','ﮤ'=>'ﮤ','ﮥ'=>'ﮥ','ﮦ'=>'ﮦ','ﮧ'=>'ﮧ','ﮨ'=>'ﮨ','ﮩ'=>'ﮩ','ﮪ'=>'ﮪ','ﮫ'=>'ﮫ','ﮬ'=>'ﮬ','ï®­'=>'ï®­','ï®®'=>'ï®®','ﮯ'=>'ﮯ','ï®°'=>'ï®°','ï®±'=>'ï®±','ﯓ'=>'ﯓ','ﯔ'=>'ﯔ','ﯕ'=>'ﯕ','ﯖ'=>'ﯖ','ﯗ'=>'ﯗ','ﯘ'=>'ﯘ','ﯙ'=>'ﯙ','ﯚ'=>'ﯚ','ﯛ'=>'ﯛ','ﯜ'=>'ﯜ','ï¯'=>'ï¯','ﯞ'=>'ﯞ','ﯟ'=>'ﯟ','ﯠ'=>'ﯠ','ﯡ'=>'ﯡ','ﯢ'=>'ﯢ','ﯣ'=>'ﯣ','ﯤ'=>'ﯤ','ﯥ'=>'ﯥ','ﯦ'=>'ﯦ','ﯧ'=>'ﯧ','ﯨ'=>'ﯨ','ﯩ'=>'ﯩ','ﯪ'=>'ﯪ','ﯫ'=>'ﯫ','ﯬ'=>'ﯬ','ﯭ'=>'ﯭ','ﯮ'=>'ﯮ','ﯯ'=>'ﯯ','ﯰ'=>'ﯰ','ﯱ'=>'ﯱ','ﯲ'=>'ﯲ','ﯳ'=>'ﯳ','ﯴ'=>'ﯴ','ﯵ'=>'ﯵ','ﯶ'=>'ﯶ','ﯷ'=>'ﯷ','ﯸ'=>'ﯸ','ﯹ'=>'ﯹ','ﯺ'=>'ﯺ','ﯻ'=>'ﯻ','ﯼ'=>'ﯼ','ﯽ'=>'ﯽ','ﯾ'=>'ﯾ','ﯿ'=>'ﯿ','ï°€'=>'ï°€','ï°'=>'ï°','ï°‚'=>'ï°‚','ï°ƒ'=>'ï°ƒ','ï°„'=>'ï°„','ï°…'=>'ï°…','ï°†'=>'ï°†','ï°‡'=>'ï°‡','ï°ˆ'=>'ï°ˆ','ï°‰'=>'ï°‰','ï°Š'=>'ï°Š','ï°‹'=>'ï°‹','ï°Œ'=>'ï°Œ','ï°'=>'ï°','ï°Ž'=>'ï°Ž','ï°'=>'ï°','ï°'=>'ï°','ï°‘'=>'ï°‘','ï°’'=>'ï°’','ï°“'=>'ï°“','ï°”'=>'ï°”','ï°•'=>'ï°•','ï°–'=>'ï°–','ï°—'=>'ï°—','ï°˜'=>'ï°˜','ï°™'=>'ï°™','ï°š'=>'ï°š','ï°›'=>'ï°›','ï°œ'=>'ï°œ','ï°'=>'ï°','ï°ž'=>'ï°ž','ï°Ÿ'=>'ï°Ÿ','ï° '=>'ï° ','ï°¡'=>'ï°¡','ï°¢'=>'ï°¢','ï°£'=>'ï°£','ï°¤'=>'ï°¤','ï°¥'=>'ï°¥','ï°¦'=>'ï°¦','ï°§'=>'ï°§','ï°¨'=>'ï°¨','ï°©'=>'ï°©','ï°ª'=>'ï°ª','ï°«'=>'ï°«','ï°¬'=>'ï°¬','ï°­'=>'ï°­','ï°®'=>'ï°®','ï°¯'=>'ï°¯','ï°°'=>'ï°°','ï°±'=>'ï°±','ï°²'=>'ï°²','ï°³'=>'ï°³','ï°´'=>'ï°´','ï°µ'=>'ï°µ','ï°¶'=>'ï°¶','ï°·'=>'ï°·','ï°¸'=>'ï°¸','ï°¹'=>'ï°¹','ï°º'=>'ï°º','ï°»'=>'ï°»','ï°¼'=>'ï°¼','ï°½'=>'ï°½','ï°¾'=>'ï°¾','ï°¿'=>'ï°¿','ï±€'=>'ï±€','ï±'=>'ï±','ﱂ'=>'ﱂ','ﱃ'=>'ﱃ','ﱄ'=>'ﱄ','ï±…'=>'ï±…','ﱆ'=>'ﱆ','ﱇ'=>'ﱇ','ﱈ'=>'ﱈ','ﱉ'=>'ﱉ','ﱊ'=>'ﱊ','ﱋ'=>'ﱋ','ﱌ'=>'ﱌ','ï±'=>'ï±','ﱎ'=>'ﱎ','ï±'=>'ï±','ï±'=>'ï±','ﱑ'=>'ﱑ','ï±’'=>'ï±’','ﱓ'=>'ﱓ','ï±”'=>'ï±”','ﱕ'=>'ﱕ','ï±–'=>'ï±–','ï±—'=>'ï±—','ﱘ'=>'ﱘ','ï±™'=>'ï±™','ﱚ'=>'ﱚ','ï±›'=>'ï±›','ﱜ'=>'ﱜ','ï±'=>'ï±','ﱞ'=>'ﱞ','ﱟ'=>'ﱟ','ï± '=>'ï± ','ﱡ'=>'ﱡ','ï±¢'=>'ï±¢','ï±£'=>'ï±£','ﱤ'=>'ﱤ','ï±¥'=>'ï±¥','ﱦ'=>'ﱦ','ﱧ'=>'ﱧ','ﱨ'=>'ﱨ','ﱩ'=>'ﱩ','ﱪ'=>'ﱪ','ﱫ'=>'ﱫ','ﱬ'=>'ﱬ','ï±­'=>'ï±­','ï±®'=>'ï±®','ﱯ'=>'ﱯ','ï±°'=>'ï±°','ï±±'=>'ï±±','ï±²'=>'ï±²','ï±³'=>'ï±³','ï±´'=>'ï±´','ï±µ'=>'ï±µ','ﱶ'=>'ﱶ','ï±·'=>'ï±·','ﱸ'=>'ﱸ','ï±¹'=>'ï±¹','ﱺ'=>'ﱺ','ï±»'=>'ï±»','ï±¼'=>'ï±¼','ï±½'=>'ï±½','ï±¾'=>'ï±¾','ﱿ'=>'ﱿ','ï²€'=>'ï²€','ï²'=>'ï²','ﲂ'=>'ﲂ','ﲃ'=>'ﲃ','ﲄ'=>'ﲄ','ï²…'=>'ï²…','ﲆ'=>'ﲆ','ﲇ'=>'ﲇ','ﲈ'=>'ﲈ','ﲉ'=>'ﲉ','ﲊ'=>'ﲊ','ﲋ'=>'ﲋ','ﲌ'=>'ﲌ','ï²'=>'ï²','ﲎ'=>'ﲎ','ï²'=>'ï²','ï²'=>'ï²','ﲑ'=>'ﲑ','ï²’'=>'ï²’','ﲓ'=>'ﲓ','ï²”'=>'ï²”','ﲕ'=>'ﲕ','ï²–'=>'ï²–','ï²—'=>'ï²—','ﲘ'=>'ﲘ','ï²™'=>'ï²™','ﲚ'=>'ﲚ','ï²›'=>'ï²›','ﲜ'=>'ﲜ','ï²'=>'ï²','ﲞ'=>'ﲞ','ﲟ'=>'ﲟ','ï² '=>'ï² ','ﲡ'=>'ﲡ','ï²¢'=>'ï²¢','ï²£'=>'ï²£','ﲤ'=>'ﲤ','ï²¥'=>'ï²¥','ﲦ'=>'ﲦ','ﲧ'=>'ﲧ','ﲨ'=>'ﲨ','ﲩ'=>'ﲩ','ﲪ'=>'ﲪ','ﲫ'=>'ﲫ','ﲬ'=>'ﲬ','ï²­'=>'ï²­','ï²®'=>'ï²®','ﲯ'=>'ﲯ','ï²°'=>'ï²°','ï²±'=>'ï²±','ï²²'=>'ï²²','ï²³'=>'ï²³','ï²´'=>'ï²´','ï²µ'=>'ï²µ','ﲶ'=>'ﲶ','ï²·'=>'ï²·','ﲸ'=>'ﲸ','ï²¹'=>'ï²¹','ﲺ'=>'ﲺ','ï²»'=>'ï²»','ï²¼'=>'ï²¼','ï²½'=>'ï²½','ï²¾'=>'ï²¾','ﲿ'=>'ﲿ','ï³€'=>'ï³€','ï³'=>'ï³','ﳂ'=>'ﳂ','ﳃ'=>'ﳃ','ﳄ'=>'ﳄ','ï³…'=>'ï³…','ﳆ'=>'ﳆ','ﳇ'=>'ﳇ','ﳈ'=>'ﳈ','ﳉ'=>'ﳉ','ﳊ'=>'ﳊ','ﳋ'=>'ﳋ','ﳌ'=>'ﳌ','ï³'=>'ï³','ﳎ'=>'ﳎ','ï³'=>'ï³','ï³'=>'ï³','ﳑ'=>'ﳑ','ï³’'=>'ï³’','ﳓ'=>'ﳓ','ï³”'=>'ï³”','ﳕ'=>'ﳕ','ï³–'=>'ï³–','ï³—'=>'ï³—','ﳘ'=>'ﳘ','ï³™'=>'ï³™','ﳚ'=>'ﳚ','ï³›'=>'ï³›','ﳜ'=>'ﳜ','ï³'=>'ï³','ﳞ'=>'ﳞ','ﳟ'=>'ﳟ','ï³ '=>'ï³ ','ﳡ'=>'ﳡ','ï³¢'=>'ï³¢','ï³£'=>'ï³£','ﳤ'=>'ﳤ','ï³¥'=>'ï³¥','ﳦ'=>'ﳦ','ﳧ'=>'ﳧ','ﳨ'=>'ﳨ','ﳩ'=>'ﳩ','ﳪ'=>'ﳪ','ﳫ'=>'ﳫ','ﳬ'=>'ﳬ','ï³­'=>'ï³­','ï³®'=>'ï³®','ﳯ'=>'ﳯ','ï³°'=>'ï³°','ï³±'=>'ï³±','ï³²'=>'ï³²','ï³³'=>'ï³³','ï³´'=>'ï³´','ï³µ'=>'ï³µ','ﳶ'=>'ﳶ','ï³·'=>'ï³·','ﳸ'=>'ﳸ','ï³¹'=>'ï³¹','ﳺ'=>'ﳺ','ï³»'=>'ï³»','ï³¼'=>'ï³¼','ï³½'=>'ï³½','ï³¾'=>'ï³¾','ﳿ'=>'ﳿ','ï´€'=>'ï´€','ï´'=>'ï´','ï´‚'=>'ï´‚','ï´ƒ'=>'ï´ƒ','ï´„'=>'ï´„','ï´…'=>'ï´…','ï´†'=>'ï´†','ï´‡'=>'ï´‡','ï´ˆ'=>'ï´ˆ','ï´‰'=>'ï´‰','ï´Š'=>'ï´Š','ï´‹'=>'ï´‹','ï´Œ'=>'ï´Œ','ï´'=>'ï´','ï´Ž'=>'ï´Ž','ï´'=>'ï´','ï´'=>'ï´','ï´‘'=>'ï´‘','ï´’'=>'ï´’','ï´“'=>'ï´“','ï´”'=>'ï´”','ï´•'=>'ï´•','ï´–'=>'ï´–','ï´—'=>'ï´—','ï´˜'=>'ï´˜','ï´™'=>'ï´™','ï´š'=>'ï´š','ï´›'=>'ï´›','ï´œ'=>'ï´œ','ï´'=>'ï´','ï´ž'=>'ï´ž','ï´Ÿ'=>'ï´Ÿ','ï´ '=>'ï´ ','ï´¡'=>'ï´¡','ï´¢'=>'ï´¢','ï´£'=>'ï´£','ï´¤'=>'ï´¤','ï´¥'=>'ï´¥','ï´¦'=>'ï´¦','ï´§'=>'ï´§','ï´¨'=>'ï´¨','ï´©'=>'ï´©','ï´ª'=>'ï´ª','ï´«'=>'ï´«','ï´¬'=>'ï´¬','ï´­'=>'ï´­','ï´®'=>'ï´®','ï´¯'=>'ï´¯','ï´°'=>'ï´°','ï´±'=>'ï´±','ï´²'=>'ï´²','ï´³'=>'ï´³','ï´´'=>'ï´´','ï´µ'=>'ï´µ','ï´¶'=>'ï´¶','ï´·'=>'ï´·','ï´¸'=>'ï´¸','ï´¹'=>'ï´¹','ï´º'=>'ï´º','ï´»'=>'ï´»','ï´¼'=>'ï´¼','ï´½'=>'ï´½','ïµ'=>'ïµ','ﵑ'=>'ﵑ','ïµ’'=>'ïµ’','ﵓ'=>'ﵓ','ïµ”'=>'ïµ”','ﵕ'=>'ﵕ','ïµ–'=>'ïµ–','ïµ—'=>'ïµ—','ﵘ'=>'ﵘ','ïµ™'=>'ïµ™','ﵚ'=>'ﵚ','ïµ›'=>'ïµ›','ﵜ'=>'ﵜ','ïµ'=>'ïµ','ﵞ'=>'ﵞ','ﵟ'=>'ﵟ','ïµ '=>'ïµ ','ﵡ'=>'ﵡ','ïµ¢'=>'ïµ¢','ïµ£'=>'ïµ£','ﵤ'=>'ﵤ','ïµ¥'=>'ïµ¥','ﵦ'=>'ﵦ','ﵧ'=>'ﵧ','ﵨ'=>'ﵨ','ﵩ'=>'ﵩ','ﵪ'=>'ﵪ','ﵫ'=>'ﵫ','ﵬ'=>'ﵬ','ïµ­'=>'ïµ­','ïµ®'=>'ïµ®','ﵯ'=>'ﵯ','ïµ°'=>'ïµ°','ïµ±'=>'ïµ±','ïµ²'=>'ïµ²','ïµ³'=>'ïµ³','ïµ´'=>'ïµ´','ïµµ'=>'ïµµ','ﵶ'=>'ﵶ','ïµ·'=>'ïµ·','ﵸ'=>'ﵸ','ïµ¹'=>'ïµ¹','ﵺ'=>'ﵺ','ïµ»'=>'ïµ»','ïµ¼'=>'ïµ¼','ïµ½'=>'ïµ½','ïµ¾'=>'ïµ¾','ﵿ'=>'ﵿ','ﶀ'=>'ﶀ','ï¶'=>'ï¶','ﶂ'=>'ﶂ','ﶃ'=>'ﶃ','ﶄ'=>'ﶄ','ﶅ'=>'ﶅ','ﶆ'=>'ﶆ','ﶇ'=>'ﶇ','ﶈ'=>'ﶈ','ﶉ'=>'ﶉ','ﶊ'=>'ﶊ','ﶋ'=>'ﶋ','ﶌ'=>'ﶌ','ï¶'=>'ï¶','ﶎ'=>'ﶎ','ï¶'=>'ï¶','ﶒ'=>'ﶒ','ﶓ'=>'ﶓ','ﶔ'=>'ﶔ','ﶕ'=>'ﶕ','ﶖ'=>'ﶖ','ﶗ'=>'ﶗ','ﶘ'=>'ﶘ','ﶙ'=>'ﶙ','ﶚ'=>'ﶚ','ﶛ'=>'ﶛ','ﶜ'=>'ﶜ','ï¶'=>'ï¶','ﶞ'=>'ﶞ','ﶟ'=>'ﶟ','ﶠ'=>'ﶠ','ﶡ'=>'ﶡ','ﶢ'=>'ﶢ','ﶣ'=>'ﶣ','ﶤ'=>'ﶤ','ﶥ'=>'ﶥ','ﶦ'=>'ﶦ','ﶧ'=>'ﶧ','ﶨ'=>'ﶨ','ﶩ'=>'ﶩ','ﶪ'=>'ﶪ','ﶫ'=>'ﶫ','ﶬ'=>'ﶬ','ﶭ'=>'ﶭ','ﶮ'=>'ﶮ','ﶯ'=>'ﶯ','ﶰ'=>'ﶰ','ﶱ'=>'ﶱ','ﶲ'=>'ﶲ','ﶳ'=>'ﶳ','ﶴ'=>'ﶴ','ﶵ'=>'ﶵ','ﶶ'=>'ﶶ','ﶷ'=>'ﶷ','ﶸ'=>'ﶸ','ﶹ'=>'ﶹ','ﶺ'=>'ﶺ','ﶻ'=>'ﶻ','ﶼ'=>'ﶼ','ﶽ'=>'ﶽ','ﶾ'=>'ﶾ','ﶿ'=>'ﶿ','ï·€'=>'ï·€','ï·'=>'ï·','ï·‚'=>'ï·‚','ï·ƒ'=>'ï·ƒ','ï·„'=>'ï·„','ï·…'=>'ï·…','ï·†'=>'ï·†','ï·‡'=>'ï·‡','ï·°'=>'ï·°','ï·±'=>'ï·±','ï·²'=>'ï·²','ï·³'=>'ï·³','ï·´'=>'ï·´','ï·µ'=>'ï·µ','ï·¶'=>'ï·¶','ï··'=>'ï··','ï·¸'=>'ï·¸','ï·¹'=>'ï·¹','ï·º'=>'ï·º','ï·»'=>'ï·»','︀'=>'︀','ï¸'=>'ï¸','︂'=>'︂','︃'=>'︃','︄'=>'︄','︅'=>'︅','︆'=>'︆','︇'=>'︇','︈'=>'︈','︉'=>'︉','︊'=>'︊','︋'=>'︋','︌'=>'︌','ï¸'=>'ï¸','︎'=>'︎','ï¸'=>'ï¸','︠'=>'︠','︡'=>'︡','︢'=>'︢','︣'=>'︣','ï¹°'=>'ï¹°','ï¹±'=>'ï¹±','ï¹²'=>'ï¹²','ï¹³'=>'ï¹³','ï¹´'=>'ï¹´','ﹶ'=>'ﹶ','ï¹·'=>'ï¹·','ﹸ'=>'ﹸ','ï¹¹'=>'ï¹¹','ﹺ'=>'ﹺ','ï¹»'=>'ï¹»','ï¹¼'=>'ï¹¼','ï¹½'=>'ï¹½','ï¹¾'=>'ï¹¾','ﹿ'=>'ﹿ','ﺀ'=>'ﺀ','ïº'=>'ïº','ﺂ'=>'ﺂ','ﺃ'=>'ﺃ','ﺄ'=>'ﺄ','ﺅ'=>'ﺅ','ﺆ'=>'ﺆ','ﺇ'=>'ﺇ','ﺈ'=>'ﺈ','ﺉ'=>'ﺉ','ﺊ'=>'ﺊ','ﺋ'=>'ﺋ','ﺌ'=>'ﺌ','ïº'=>'ïº','ﺎ'=>'ﺎ','ïº'=>'ïº','ïº'=>'ïº','ﺑ'=>'ﺑ','ﺒ'=>'ﺒ','ﺓ'=>'ﺓ','ﺔ'=>'ﺔ','ﺕ'=>'ﺕ','ﺖ'=>'ﺖ','ﺗ'=>'ﺗ','ﺘ'=>'ﺘ','ﺙ'=>'ﺙ','ﺚ'=>'ﺚ','ﺛ'=>'ﺛ','ﺜ'=>'ﺜ','ïº'=>'ïº','ﺞ'=>'ﺞ','ﺟ'=>'ﺟ','ﺠ'=>'ﺠ','ﺡ'=>'ﺡ','ﺢ'=>'ﺢ','ﺣ'=>'ﺣ','ﺤ'=>'ﺤ','ﺥ'=>'ﺥ','ﺦ'=>'ﺦ','ﺧ'=>'ﺧ','ﺨ'=>'ﺨ','ﺩ'=>'ﺩ','ﺪ'=>'ﺪ','ﺫ'=>'ﺫ','ﺬ'=>'ﺬ','ﺭ'=>'ﺭ','ﺮ'=>'ﺮ','ﺯ'=>'ﺯ','ﺰ'=>'ﺰ','ﺱ'=>'ﺱ','ﺲ'=>'ﺲ','ﺳ'=>'ﺳ','ﺴ'=>'ﺴ','ﺵ'=>'ﺵ','ﺶ'=>'ﺶ','ﺷ'=>'ﺷ','ﺸ'=>'ﺸ','ﺹ'=>'ﺹ','ﺺ'=>'ﺺ','ﺻ'=>'ﺻ','ﺼ'=>'ﺼ','ﺽ'=>'ﺽ','ﺾ'=>'ﺾ','ﺿ'=>'ﺿ','ﻀ'=>'ﻀ','ï»'=>'ï»','ﻂ'=>'ﻂ','ﻃ'=>'ﻃ','ﻄ'=>'ﻄ','ï»…'=>'ï»…','ﻆ'=>'ﻆ','ﻇ'=>'ﻇ','ﻈ'=>'ﻈ','ﻉ'=>'ﻉ','ﻊ'=>'ﻊ','ﻋ'=>'ﻋ','ﻌ'=>'ﻌ','ï»'=>'ï»','ﻎ'=>'ﻎ','ï»'=>'ï»','ï»'=>'ï»','ﻑ'=>'ﻑ','ï»’'=>'ï»’','ﻓ'=>'ﻓ','ï»”'=>'ï»”','ﻕ'=>'ﻕ','ï»–'=>'ï»–','ï»—'=>'ï»—','ﻘ'=>'ﻘ','ï»™'=>'ï»™','ﻚ'=>'ﻚ','ï»›'=>'ï»›','ﻜ'=>'ﻜ','ï»'=>'ï»','ﻞ'=>'ﻞ','ﻟ'=>'ﻟ','ï» '=>'ï» ','ﻡ'=>'ﻡ','ﻢ'=>'ﻢ','ﻣ'=>'ﻣ','ﻤ'=>'ﻤ','ﻥ'=>'ﻥ','ﻦ'=>'ﻦ','ﻧ'=>'ﻧ','ﻨ'=>'ﻨ','ﻩ'=>'ﻩ','ﻪ'=>'ﻪ','ﻫ'=>'ﻫ','ﻬ'=>'ﻬ','ï»­'=>'ï»­','ï»®'=>'ï»®','ﻯ'=>'ﻯ','ï»°'=>'ï»°','ï»±'=>'ï»±','ﻲ'=>'ﻲ','ﻳ'=>'ﻳ','ï»´'=>'ï»´','ﻵ'=>'ﻵ','ﻶ'=>'ﻶ','ï»·'=>'ï»·','ﻸ'=>'ﻸ','ﻹ'=>'ﻹ','ﻺ'=>'ﻺ','ï»»'=>'ï»»','ﻼ'=>'ﻼ','ï¼'=>'0','1'=>'1','ï¼’'=>'2','3'=>'3','ï¼”'=>'4','5'=>'5','ï¼–'=>'6','ï¼—'=>'7','8'=>'8','ï¼™'=>'9','A'=>'ï½','ï¼¢'=>'b','ï¼£'=>'c','D'=>'d','ï¼¥'=>'ï½…','F'=>'f','G'=>'g','H'=>'h','I'=>'i','J'=>'j','K'=>'k','L'=>'l','ï¼­'=>'ï½','ï¼®'=>'n','O'=>'ï½','ï¼°'=>'ï½','ï¼±'=>'q','ï¼²'=>'ï½’','ï¼³'=>'s','ï¼´'=>'ï½”','ï¼µ'=>'u','V'=>'ï½–','ï¼·'=>'ï½—','X'=>'x','ï¼¹'=>'ï½™','Z'=>'z','ï½'=>'ï½','b'=>'b','c'=>'c','d'=>'d','ï½…'=>'ï½…','f'=>'f','g'=>'g','h'=>'h','i'=>'i','j'=>'j','k'=>'k','l'=>'l','ï½'=>'ï½','n'=>'n','ï½'=>'ï½','ï½'=>'ï½','q'=>'q','ï½’'=>'ï½’','s'=>'s','ï½”'=>'ï½”','u'=>'u','ï½–'=>'ï½–','ï½—'=>'ï½—','x'=>'x','ï½™'=>'ï½™','z'=>'z','ヲ'=>'ヲ','ァ'=>'ァ','ィ'=>'ィ','ゥ'=>'ゥ','ェ'=>'ェ','ォ'=>'ォ','ャ'=>'ャ','ï½­'=>'ï½­','ï½®'=>'ï½®','ッ'=>'ッ','ï½°'=>'ï½°','ï½±'=>'ï½±','ï½²'=>'ï½²','ï½³'=>'ï½³','ï½´'=>'ï½´','ï½µ'=>'ï½µ','カ'=>'カ','ï½·'=>'ï½·','ク'=>'ク','ï½¹'=>'ï½¹','コ'=>'コ','ï½»'=>'ï½»','ï½¼'=>'ï½¼','ï½½'=>'ï½½','ï½¾'=>'ï½¾','ソ'=>'ソ','ï¾€'=>'ï¾€','ï¾'=>'ï¾','ツ'=>'ツ','テ'=>'テ','ト'=>'ト','ï¾…'=>'ï¾…','ニ'=>'ニ','ヌ'=>'ヌ','ネ'=>'ネ','ノ'=>'ノ','ハ'=>'ハ','ヒ'=>'ヒ','フ'=>'フ','ï¾'=>'ï¾','ホ'=>'ホ','ï¾'=>'ï¾','ï¾'=>'ï¾','ム'=>'ム','ï¾’'=>'ï¾’','モ'=>'モ','ï¾”'=>'ï¾”','ユ'=>'ユ','ï¾–'=>'ï¾–','ï¾—'=>'ï¾—','リ'=>'リ','ï¾™'=>'ï¾™','レ'=>'レ','ï¾›'=>'ï¾›','ワ'=>'ワ','ï¾'=>'ï¾','゙'=>'゙','゚'=>'゚','ï¾ '=>'ï¾ ','ᄀ'=>'ᄀ','ï¾¢'=>'ï¾¢','ï¾£'=>'ï¾£','ᄂ'=>'ᄂ','ï¾¥'=>'ï¾¥','ᆭ'=>'ᆭ','ᄃ'=>'ᄃ','ᄄ'=>'ᄄ','ᄅ'=>'ᄅ','ᆰ'=>'ᆰ','ᆱ'=>'ᆱ','ᆲ'=>'ᆲ','ï¾­'=>'ï¾­','ï¾®'=>'ï¾®','ᆵ'=>'ᆵ','ï¾°'=>'ï¾°','ï¾±'=>'ï¾±','ï¾²'=>'ï¾²','ï¾³'=>'ï¾³','ï¾´'=>'ï¾´','ï¾µ'=>'ï¾µ','ᄊ'=>'ᄊ','ï¾·'=>'ï¾·','ᄌ'=>'ᄌ','ï¾¹'=>'ï¾¹','ᄎ'=>'ᄎ','ï¾»'=>'ï¾»','ï¾¼'=>'ï¾¼','ï¾½'=>'ï¾½','ï¾¾'=>'ï¾¾','ï¿‚'=>'ï¿‚','ᅢ'=>'ᅢ','ï¿„'=>'ï¿„','ï¿…'=>'ï¿…','ᅥ'=>'ᅥ','ᅦ'=>'ᅦ','ï¿Š'=>'ï¿Š','ï¿‹'=>'ï¿‹','ï¿Œ'=>'ï¿Œ','ï¿'=>'ï¿','ï¿Ž'=>'ï¿Ž','ï¿'=>'ï¿','ï¿’'=>'ï¿’','ï¿“'=>'ï¿“','ï¿”'=>'ï¿”','ï¿•'=>'ï¿•','ï¿–'=>'ï¿–','ï¿—'=>'ï¿—','ï¿š'=>'ï¿š','ï¿›'=>'ï¿›','ï¿œ'=>'ï¿œ'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_32.php b/phpBB/includes/utf/data/search_indexer_32.php
new file mode 100644
index 0000000000..73ed2924ab
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_32.php
@@ -0,0 +1 @@
+<?php return array('ð€€'=>'ð€€','ð€'=>'ð€','ð€‚'=>'ð€‚','ð€ƒ'=>'ð€ƒ','ð€„'=>'ð€„','ð€…'=>'ð€…','ð€†'=>'ð€†','ð€‡'=>'ð€‡','ð€ˆ'=>'ð€ˆ','ð€‰'=>'ð€‰','ð€Š'=>'ð€Š','ð€‹'=>'ð€‹','ð€'=>'ð€','ð€Ž'=>'ð€Ž','ð€'=>'ð€','ð€'=>'ð€','ð€‘'=>'ð€‘','ð€’'=>'ð€’','ð€“'=>'ð€“','ð€”'=>'ð€”','ð€•'=>'ð€•','ð€–'=>'ð€–','ð€—'=>'ð€—','ð€˜'=>'ð€˜','ð€™'=>'ð€™','ð€š'=>'ð€š','ð€›'=>'ð€›','ð€œ'=>'ð€œ','ð€'=>'ð€','ð€ž'=>'ð€ž','ð€Ÿ'=>'ð€Ÿ','ð€ '=>'ð€ ','ð€¡'=>'ð€¡','ð€¢'=>'ð€¢','ð€£'=>'ð€£','ð€¤'=>'ð€¤','ð€¥'=>'ð€¥','ð€¦'=>'ð€¦','ð€¨'=>'ð€¨','ð€©'=>'ð€©','ð€ª'=>'ð€ª','ð€«'=>'ð€«','ð€¬'=>'ð€¬','ð€­'=>'ð€­','ð€®'=>'ð€®','ð€¯'=>'ð€¯','ð€°'=>'ð€°','ð€±'=>'ð€±','ð€²'=>'ð€²','ð€³'=>'ð€³','ð€´'=>'ð€´','ð€µ'=>'ð€µ','ð€¶'=>'ð€¶','ð€·'=>'ð€·','ð€¸'=>'ð€¸','ð€¹'=>'ð€¹','ð€º'=>'ð€º','ð€¼'=>'ð€¼','ð€½'=>'ð€½','ð€¿'=>'ð€¿','ð€'=>'ð€','ð'=>'ð','ð‚'=>'ð‚','ðƒ'=>'ðƒ','ð„'=>'ð„','ð…'=>'ð…','ð†'=>'ð†','ð‡'=>'ð‡','ðˆ'=>'ðˆ','ð‰'=>'ð‰','ðŠ'=>'ðŠ','ð‹'=>'ð‹','ðŒ'=>'ðŒ','ð'=>'ð','ð'=>'ð','ð‘'=>'ð‘','ð’'=>'ð’','ð“'=>'ð“','ð”'=>'ð”','ð•'=>'ð•','ð–'=>'ð–','ð—'=>'ð—','ð˜'=>'ð˜','ð™'=>'ð™','ðš'=>'ðš','ð›'=>'ð›','ðœ'=>'ðœ','ð'=>'ð','ð‚€'=>'ð‚€','ð‚'=>'ð‚','ð‚‚'=>'ð‚‚','ð‚ƒ'=>'ð‚ƒ','ð‚„'=>'ð‚„','ð‚…'=>'ð‚…','ð‚†'=>'ð‚†','ð‚‡'=>'ð‚‡','ð‚ˆ'=>'ð‚ˆ','ð‚‰'=>'ð‚‰','ð‚Š'=>'ð‚Š','ð‚‹'=>'ð‚‹','ð‚Œ'=>'ð‚Œ','ð‚'=>'ð‚','ð‚Ž'=>'ð‚Ž','ð‚'=>'ð‚','ð‚'=>'ð‚','ð‚‘'=>'ð‚‘','ð‚’'=>'ð‚’','ð‚“'=>'ð‚“','ð‚”'=>'ð‚”','ð‚•'=>'ð‚•','ð‚–'=>'ð‚–','ð‚—'=>'ð‚—','ð‚˜'=>'ð‚˜','ð‚™'=>'ð‚™','ð‚š'=>'ð‚š','ð‚›'=>'ð‚›','ð‚œ'=>'ð‚œ','ð‚'=>'ð‚','ð‚ž'=>'ð‚ž','ð‚Ÿ'=>'ð‚Ÿ','ð‚ '=>'ð‚ ','ð‚¡'=>'ð‚¡','ð‚¢'=>'ð‚¢','ð‚£'=>'ð‚£','ð‚¤'=>'ð‚¤','ð‚¥'=>'ð‚¥','ð‚¦'=>'ð‚¦','ð‚§'=>'ð‚§','ð‚¨'=>'ð‚¨','ð‚©'=>'ð‚©','ð‚ª'=>'ð‚ª','ð‚«'=>'ð‚«','ð‚¬'=>'ð‚¬','ð‚­'=>'ð‚­','ð‚®'=>'ð‚®','ð‚¯'=>'ð‚¯','ð‚°'=>'ð‚°','ð‚±'=>'ð‚±','ð‚²'=>'ð‚²','ð‚³'=>'ð‚³','ð‚´'=>'ð‚´','ð‚µ'=>'ð‚µ','ð‚¶'=>'ð‚¶','ð‚·'=>'ð‚·','ð‚¸'=>'ð‚¸','ð‚¹'=>'ð‚¹','ð‚º'=>'ð‚º','ð‚»'=>'ð‚»','ð‚¼'=>'ð‚¼','ð‚½'=>'ð‚½','ð‚¾'=>'ð‚¾','ð‚¿'=>'ð‚¿','ðƒ€'=>'ðƒ€','ðƒ'=>'ðƒ','ðƒ‚'=>'ðƒ‚','ðƒƒ'=>'ðƒƒ','ðƒ„'=>'ðƒ„','ðƒ…'=>'ðƒ…','ðƒ†'=>'ðƒ†','ðƒ‡'=>'ðƒ‡','ðƒˆ'=>'ðƒˆ','ðƒ‰'=>'ðƒ‰','ðƒŠ'=>'ðƒŠ','ðƒ‹'=>'ðƒ‹','ðƒŒ'=>'ðƒŒ','ðƒ'=>'ðƒ','ðƒŽ'=>'ðƒŽ','ðƒ'=>'ðƒ','ðƒ'=>'ðƒ','ðƒ‘'=>'ðƒ‘','ðƒ’'=>'ðƒ’','ðƒ“'=>'ðƒ“','ðƒ”'=>'ðƒ”','ðƒ•'=>'ðƒ•','ðƒ–'=>'ðƒ–','ðƒ—'=>'ðƒ—','ðƒ˜'=>'ðƒ˜','ðƒ™'=>'ðƒ™','ðƒš'=>'ðƒš','ðƒ›'=>'ðƒ›','ðƒœ'=>'ðƒœ','ðƒ'=>'ðƒ','ðƒž'=>'ðƒž','ðƒŸ'=>'ðƒŸ','ðƒ '=>'ðƒ ','ðƒ¡'=>'ðƒ¡','ðƒ¢'=>'ðƒ¢','ðƒ£'=>'ðƒ£','ðƒ¤'=>'ðƒ¤','ðƒ¥'=>'ðƒ¥','ðƒ¦'=>'ðƒ¦','ðƒ§'=>'ðƒ§','ðƒ¨'=>'ðƒ¨','ðƒ©'=>'ðƒ©','ðƒª'=>'ðƒª','ðƒ«'=>'ðƒ«','ðƒ¬'=>'ðƒ¬','ðƒ­'=>'ðƒ­','ðƒ®'=>'ðƒ®','ðƒ¯'=>'ðƒ¯','ðƒ°'=>'ðƒ°','ðƒ±'=>'ðƒ±','ðƒ²'=>'ðƒ²','ðƒ³'=>'ðƒ³','ðƒ´'=>'ðƒ´','ðƒµ'=>'ðƒµ','ðƒ¶'=>'ðƒ¶','ðƒ·'=>'ðƒ·','ðƒ¸'=>'ðƒ¸','ðƒ¹'=>'ðƒ¹','ðƒº'=>'ðƒº','ð„‡'=>'1','ð„ˆ'=>'2','ð„‰'=>'3','ð„Š'=>'4','ð„‹'=>'5','ð„Œ'=>'6','ð„'=>'7','ð„Ž'=>'8','ð„'=>'9','ð„'=>'10','ð„‘'=>'20','ð„’'=>'30','ð„“'=>'40','ð„”'=>'50','ð„•'=>'60','ð„–'=>'70','ð„—'=>'80','ð„˜'=>'90','ð„™'=>'100','ð„š'=>'200','ð„›'=>'300','ð„œ'=>'400','ð„'=>'500','ð„ž'=>'600','ð„Ÿ'=>'700','ð„ '=>'800','ð„¡'=>'900','ð„¢'=>'1000','ð„£'=>'2000','ð„¤'=>'3000','ð„¥'=>'4000','ð„¦'=>'5000','ð„§'=>'6000','ð„¨'=>'7000','ð„©'=>'8000','ð„ª'=>'9000','ð„«'=>'10000','ð„¬'=>'20000','ð„­'=>'30000','ð„®'=>'40000','ð„¯'=>'50000','ð„°'=>'60000','ð„±'=>'70000','ð„²'=>'80000','ð„³'=>'90000','ð…€'=>'1/4','ð…'=>'1/2','ð…‚'=>'1','ð…ƒ'=>'5','ð…„'=>'50','ð……'=>'500','ð…†'=>'5000','ð…‡'=>'50000','ð…ˆ'=>'5','ð…‰'=>'10','ð…Š'=>'50','ð…‹'=>'100','ð…Œ'=>'500','ð…'=>'1000','ð…Ž'=>'5000','ð…'=>'5','ð…'=>'10','ð…‘'=>'50','ð…’'=>'100','ð…“'=>'500','ð…”'=>'1000','ð…•'=>'10000','ð…–'=>'50000','ð…—'=>'10','ð…˜'=>'1','ð…™'=>'1','ð…š'=>'1','ð…›'=>'2','ð…œ'=>'2','ð…'=>'2','ð…ž'=>'2','ð…Ÿ'=>'5','ð… '=>'10','ð…¡'=>'10','ð…¢'=>'10','ð…£'=>'10','ð…¤'=>'10','ð…¥'=>'30','ð…¦'=>'50','ð…§'=>'50','ð…¨'=>'50','ð…©'=>'50','ð…ª'=>'100','ð…«'=>'300','ð…¬'=>'500','ð…­'=>'500','ð…®'=>'500','ð…¯'=>'500','ð…°'=>'500','ð…±'=>'1000','ð…²'=>'5000','ð…³'=>'5','ð…´'=>'50','ð…µ'=>'1/2','ð…¶'=>'1/2','ð…·'=>'2/3','ð…¸'=>'3/4','ð†Š'=>'0','ðŒ€'=>'ðŒ€','ðŒ'=>'ðŒ','ðŒ‚'=>'ðŒ‚','ðŒƒ'=>'ðŒƒ','ðŒ„'=>'ðŒ„','ðŒ…'=>'ðŒ…','ðŒ†'=>'ðŒ†','ðŒ‡'=>'ðŒ‡','ðŒˆ'=>'ðŒˆ','ðŒ‰'=>'ðŒ‰','ðŒŠ'=>'ðŒŠ','ðŒ‹'=>'ðŒ‹','ðŒŒ'=>'ðŒŒ','ðŒ'=>'ðŒ','ðŒŽ'=>'ðŒŽ','ðŒ'=>'ðŒ','ðŒ'=>'ðŒ','ðŒ‘'=>'ðŒ‘','ðŒ’'=>'ðŒ’','ðŒ“'=>'ðŒ“','ðŒ”'=>'ðŒ”','ðŒ•'=>'ðŒ•','ðŒ–'=>'ðŒ–','ðŒ—'=>'ðŒ—','ðŒ˜'=>'ðŒ˜','ðŒ™'=>'ðŒ™','ðŒš'=>'ðŒš','ðŒ›'=>'ðŒ›','ðŒœ'=>'ðŒœ','ðŒ'=>'ðŒ','ðŒž'=>'ðŒž','ðŒ '=>'1','ðŒ¡'=>'5','ðŒ¢'=>'10','ðŒ£'=>'50','ðŒ°'=>'ðŒ°','ðŒ±'=>'ðŒ±','ðŒ²'=>'ðŒ²','ðŒ³'=>'ðŒ³','ðŒ´'=>'ðŒ´','ðŒµ'=>'ðŒµ','ðŒ¶'=>'ðŒ¶','ðŒ·'=>'ðŒ·','ðŒ¸'=>'ðŒ¸','ðŒ¹'=>'ðŒ¹','ðŒº'=>'ðŒº','ðŒ»'=>'ðŒ»','ðŒ¼'=>'ðŒ¼','ðŒ½'=>'ðŒ½','ðŒ¾'=>'ðŒ¾','ðŒ¿'=>'ðŒ¿','ð€'=>'ð€','ð'=>'90','ð‚'=>'ð‚','ðƒ'=>'ðƒ','ð„'=>'ð„','ð…'=>'ð…','ð†'=>'ð†','ð‡'=>'ð‡','ðˆ'=>'ðˆ','ð‰'=>'ð‰','ðŠ'=>'900','ðŽ€'=>'ðŽ€','ðŽ'=>'ðŽ','ðŽ‚'=>'ðŽ‚','ðŽƒ'=>'ðŽƒ','ðŽ„'=>'ðŽ„','ðŽ…'=>'ðŽ…','ðŽ†'=>'ðŽ†','ðŽ‡'=>'ðŽ‡','ðŽˆ'=>'ðŽˆ','ðŽ‰'=>'ðŽ‰','ðŽŠ'=>'ðŽŠ','ðŽ‹'=>'ðŽ‹','ðŽŒ'=>'ðŽŒ','ðŽ'=>'ðŽ','ðŽŽ'=>'ðŽŽ','ðŽ'=>'ðŽ','ðŽ'=>'ðŽ','ðŽ‘'=>'ðŽ‘','ðŽ’'=>'ðŽ’','ðŽ“'=>'ðŽ“','ðŽ”'=>'ðŽ”','ðŽ•'=>'ðŽ•','ðŽ–'=>'ðŽ–','ðŽ—'=>'ðŽ—','ðŽ˜'=>'ðŽ˜','ðŽ™'=>'ðŽ™','ðŽš'=>'ðŽš','ðŽ›'=>'ðŽ›','ðŽœ'=>'ðŽœ','ðŽ'=>'ðŽ','ðŽ '=>'ðŽ ','ðŽ¡'=>'ðŽ¡','ðŽ¢'=>'ðŽ¢','ðŽ£'=>'ðŽ£','ðŽ¤'=>'ðŽ¤','ðŽ¥'=>'ðŽ¥','ðŽ¦'=>'ðŽ¦','ðŽ§'=>'ðŽ§','ðŽ¨'=>'ðŽ¨','ðŽ©'=>'ðŽ©','ðŽª'=>'ðŽª','ðŽ«'=>'ðŽ«','ðŽ¬'=>'ðŽ¬','ðŽ­'=>'ðŽ­','ðŽ®'=>'ðŽ®','ðŽ¯'=>'ðŽ¯','ðŽ°'=>'ðŽ°','ðŽ±'=>'ðŽ±','ðŽ²'=>'ðŽ²','ðŽ³'=>'ðŽ³','ðŽ´'=>'ðŽ´','ðŽµ'=>'ðŽµ','ðŽ¶'=>'ðŽ¶','ðŽ·'=>'ðŽ·','ðŽ¸'=>'ðŽ¸','ðŽ¹'=>'ðŽ¹','ðŽº'=>'ðŽº','ðŽ»'=>'ðŽ»','ðŽ¼'=>'ðŽ¼','ðŽ½'=>'ðŽ½','ðŽ¾'=>'ðŽ¾','ðŽ¿'=>'ðŽ¿','ð€'=>'ð€','ð'=>'ð','ð‚'=>'ð‚','ðƒ'=>'ðƒ','ðˆ'=>'ðˆ','ð‰'=>'ð‰','ðŠ'=>'ðŠ','ð‹'=>'ð‹','ðŒ'=>'ðŒ','ð'=>'ð','ðŽ'=>'ðŽ','ð'=>'ð','ð‘'=>'1','ð’'=>'2','ð“'=>'10','ð”'=>'20','ð•'=>'100','ð€'=>'ð¨','ð'=>'ð©','ð‚'=>'ðª','ðƒ'=>'ð«','ð„'=>'ð¬','ð…'=>'ð­','ð†'=>'ð®','ð‡'=>'ð¯','ðˆ'=>'ð°','ð‰'=>'ð±','ðŠ'=>'ð²','ð‹'=>'ð³','ðŒ'=>'ð´','ð'=>'ðµ','ðŽ'=>'ð¶','ð'=>'ð·','ð'=>'ð¸','ð‘'=>'ð¹','ð’'=>'ðº','ð“'=>'ð»','ð”'=>'ð¼','ð•'=>'ð½','ð–'=>'ð¾','ð—'=>'ð¿','ð˜'=>'ð‘€','ð™'=>'ð‘','ðš'=>'ð‘‚','ð›'=>'ð‘ƒ','ðœ'=>'ð‘„','ð'=>'ð‘…','ðž'=>'ð‘†','ðŸ'=>'ð‘‡','ð '=>'ð‘ˆ','ð¡'=>'ð‘‰','ð¢'=>'ð‘Š','ð£'=>'ð‘‹','ð¤'=>'ð‘Œ','ð¥'=>'ð‘','ð¦'=>'ð‘Ž','ð§'=>'ð‘','ð¨'=>'ð¨','ð©'=>'ð©','ðª'=>'ðª','ð«'=>'ð«','ð¬'=>'ð¬','ð­'=>'ð­','ð®'=>'ð®','ð¯'=>'ð¯','ð°'=>'ð°','ð±'=>'ð±','ð²'=>'ð²','ð³'=>'ð³','ð´'=>'ð´','ðµ'=>'ðµ','ð¶'=>'ð¶','ð·'=>'ð·','ð¸'=>'ð¸','ð¹'=>'ð¹','ðº'=>'ðº','ð»'=>'ð»','ð¼'=>'ð¼','ð½'=>'ð½','ð¾'=>'ð¾','ð¿'=>'ð¿','ð‘€'=>'ð‘€','ð‘'=>'ð‘','ð‘‚'=>'ð‘‚','ð‘ƒ'=>'ð‘ƒ','ð‘„'=>'ð‘„','ð‘…'=>'ð‘…','ð‘†'=>'ð‘†','ð‘‡'=>'ð‘‡','ð‘ˆ'=>'ð‘ˆ','ð‘‰'=>'ð‘‰','ð‘Š'=>'ð‘Š','ð‘‹'=>'ð‘‹','ð‘Œ'=>'ð‘Œ','ð‘'=>'ð‘','ð‘Ž'=>'ð‘Ž','ð‘'=>'ð‘','ð‘'=>'ð‘','ð‘‘'=>'ð‘‘','ð‘’'=>'ð‘’','ð‘“'=>'ð‘“','ð‘”'=>'ð‘”','ð‘•'=>'ð‘•','ð‘–'=>'ð‘–','ð‘—'=>'ð‘—','ð‘˜'=>'ð‘˜','ð‘™'=>'ð‘™','ð‘š'=>'ð‘š','ð‘›'=>'ð‘›','ð‘œ'=>'ð‘œ','ð‘'=>'ð‘','ð‘ž'=>'ð‘ž','ð‘Ÿ'=>'ð‘Ÿ','ð‘ '=>'ð‘ ','ð‘¡'=>'ð‘¡','ð‘¢'=>'ð‘¢','ð‘£'=>'ð‘£','ð‘¤'=>'ð‘¤','ð‘¥'=>'ð‘¥','ð‘¦'=>'ð‘¦','ð‘§'=>'ð‘§','ð‘¨'=>'ð‘¨','ð‘©'=>'ð‘©','ð‘ª'=>'ð‘ª','ð‘«'=>'ð‘«','ð‘¬'=>'ð‘¬','ð‘­'=>'ð‘­','ð‘®'=>'ð‘®','ð‘¯'=>'ð‘¯','ð‘°'=>'ð‘°','ð‘±'=>'ð‘±','ð‘²'=>'ð‘²','ð‘³'=>'ð‘³','ð‘´'=>'ð‘´','ð‘µ'=>'ð‘µ','ð‘¶'=>'ð‘¶','ð‘·'=>'ð‘·','ð‘¸'=>'ð‘¸','ð‘¹'=>'ð‘¹','ð‘º'=>'ð‘º','ð‘»'=>'ð‘»','ð‘¼'=>'ð‘¼','ð‘½'=>'ð‘½','ð‘¾'=>'ð‘¾','ð‘¿'=>'ð‘¿','ð’€'=>'ð’€','ð’'=>'ð’','ð’‚'=>'ð’‚','ð’ƒ'=>'ð’ƒ','ð’„'=>'ð’„','ð’…'=>'ð’…','ð’†'=>'ð’†','ð’‡'=>'ð’‡','ð’ˆ'=>'ð’ˆ','ð’‰'=>'ð’‰','ð’Š'=>'ð’Š','ð’‹'=>'ð’‹','ð’Œ'=>'ð’Œ','ð’'=>'ð’','ð’Ž'=>'ð’Ž','ð’'=>'ð’','ð’'=>'ð’','ð’‘'=>'ð’‘','ð’’'=>'ð’’','ð’“'=>'ð’“','ð’”'=>'ð’”','ð’•'=>'ð’•','ð’–'=>'ð’–','ð’—'=>'ð’—','ð’˜'=>'ð’˜','ð’™'=>'ð’™','ð’š'=>'ð’š','ð’›'=>'ð’›','ð’œ'=>'ð’œ','ð’'=>'ð’','ð’ '=>'0','ð’¡'=>'1','ð’¢'=>'2','ð’£'=>'3','ð’¤'=>'4','ð’¥'=>'5','ð’¦'=>'6','ð’§'=>'7','ð’¨'=>'8','ð’©'=>'9'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_33.php b/phpBB/includes/utf/data/search_indexer_33.php
new file mode 100644
index 0000000000..4e8762a646
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_33.php
@@ -0,0 +1 @@
+<?php return array('ð €'=>'ð €','ð '=>'ð ','ð ‚'=>'ð ‚','ð ƒ'=>'ð ƒ','ð „'=>'ð „','ð …'=>'ð …','ð ˆ'=>'ð ˆ','ð Š'=>'ð Š','ð ‹'=>'ð ‹','ð Œ'=>'ð Œ','ð '=>'ð ','ð Ž'=>'ð Ž','ð '=>'ð ','ð '=>'ð ','ð ‘'=>'ð ‘','ð ’'=>'ð ’','ð “'=>'ð “','ð ”'=>'ð ”','ð •'=>'ð •','ð –'=>'ð –','ð —'=>'ð —','ð ˜'=>'ð ˜','ð ™'=>'ð ™','ð š'=>'ð š','ð ›'=>'ð ›','ð œ'=>'ð œ','ð '=>'ð ','ð ž'=>'ð ž','ð Ÿ'=>'ð Ÿ','ð  '=>'ð  ','ð ¡'=>'ð ¡','ð ¢'=>'ð ¢','ð £'=>'ð £','ð ¤'=>'ð ¤','ð ¥'=>'ð ¥','ð ¦'=>'ð ¦','ð §'=>'ð §','ð ¨'=>'ð ¨','ð ©'=>'ð ©','ð ª'=>'ð ª','ð «'=>'ð «','ð ¬'=>'ð ¬','ð ­'=>'ð ­','ð ®'=>'ð ®','ð ¯'=>'ð ¯','ð °'=>'ð °','ð ±'=>'ð ±','ð ²'=>'ð ²','ð ³'=>'ð ³','ð ´'=>'ð ´','ð µ'=>'ð µ','ð ·'=>'ð ·','ð ¸'=>'ð ¸','ð ¼'=>'ð ¼','ð ¿'=>'ð ¿','ð¤€'=>'ð¤€','ð¤'=>'ð¤','ð¤‚'=>'ð¤‚','ð¤ƒ'=>'ð¤ƒ','ð¤„'=>'ð¤„','ð¤…'=>'ð¤…','ð¤†'=>'ð¤†','ð¤‡'=>'ð¤‡','ð¤ˆ'=>'ð¤ˆ','ð¤‰'=>'ð¤‰','ð¤Š'=>'ð¤Š','ð¤‹'=>'ð¤‹','ð¤Œ'=>'ð¤Œ','ð¤'=>'ð¤','ð¤Ž'=>'ð¤Ž','ð¤'=>'ð¤','ð¤'=>'ð¤','ð¤‘'=>'ð¤‘','ð¤’'=>'ð¤’','ð¤“'=>'ð¤“','ð¤”'=>'ð¤”','ð¤•'=>'ð¤•','ð¤–'=>'1','ð¤—'=>'10','ð¤˜'=>'20','ð¤™'=>'100','ð¨€'=>'ð¨€','ð¨'=>'ð¨','ð¨‚'=>'ð¨‚','ð¨ƒ'=>'ð¨ƒ','ð¨…'=>'ð¨…','ð¨†'=>'ð¨†','ð¨Œ'=>'ð¨Œ','ð¨'=>'ð¨','ð¨Ž'=>'ð¨Ž','ð¨'=>'ð¨','ð¨'=>'ð¨','ð¨‘'=>'ð¨‘','ð¨’'=>'ð¨’','ð¨“'=>'ð¨“','ð¨•'=>'ð¨•','ð¨–'=>'ð¨–','ð¨—'=>'ð¨—','ð¨™'=>'ð¨™','ð¨š'=>'ð¨š','ð¨›'=>'ð¨›','ð¨œ'=>'ð¨œ','ð¨'=>'ð¨','ð¨ž'=>'ð¨ž','ð¨Ÿ'=>'ð¨Ÿ','ð¨ '=>'ð¨ ','ð¨¡'=>'ð¨¡','ð¨¢'=>'ð¨¢','ð¨£'=>'ð¨£','ð¨¤'=>'ð¨¤','ð¨¥'=>'ð¨¥','ð¨¦'=>'ð¨¦','ð¨§'=>'ð¨§','ð¨¨'=>'ð¨¨','ð¨©'=>'ð¨©','ð¨ª'=>'ð¨ª','ð¨«'=>'ð¨«','ð¨¬'=>'ð¨¬','ð¨­'=>'ð¨­','ð¨®'=>'ð¨®','ð¨¯'=>'ð¨¯','ð¨°'=>'ð¨°','ð¨±'=>'ð¨±','ð¨²'=>'ð¨²','ð¨³'=>'ð¨³','ð¨¸'=>'ð¨¸','ð¨¹'=>'ð¨¹','ð¨º'=>'ð¨º','ð¨¿'=>'ð¨¿','ð©€'=>'1','ð©'=>'2','ð©‚'=>'3','ð©ƒ'=>'4','ð©„'=>'10','ð©…'=>'20','ð©†'=>'100','ð©‡'=>'1000'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_36.php b/phpBB/includes/utf/data/search_indexer_36.php
new file mode 100644
index 0000000000..8bf908e514
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_36.php
@@ -0,0 +1 @@
+<?php return array('ð’€€'=>'ð’€€','ð’€'=>'ð’€','𒀂'=>'𒀂','𒀃'=>'𒀃','𒀄'=>'𒀄','ð’€…'=>'ð’€…','𒀆'=>'𒀆','𒀇'=>'𒀇','𒀈'=>'𒀈','𒀉'=>'𒀉','𒀊'=>'𒀊','𒀋'=>'𒀋','𒀌'=>'𒀌','ð’€'=>'ð’€','𒀎'=>'𒀎','ð’€'=>'ð’€','ð’€'=>'ð’€','𒀑'=>'𒀑','ð’€’'=>'ð’€’','𒀓'=>'𒀓','ð’€”'=>'ð’€”','𒀕'=>'𒀕','ð’€–'=>'ð’€–','ð’€—'=>'ð’€—','𒀘'=>'𒀘','ð’€™'=>'ð’€™','𒀚'=>'𒀚','ð’€›'=>'ð’€›','𒀜'=>'𒀜','ð’€'=>'ð’€','𒀞'=>'𒀞','𒀟'=>'𒀟','ð’€ '=>'ð’€ ','𒀡'=>'𒀡','ð’€¢'=>'ð’€¢','ð’€£'=>'ð’€£','𒀤'=>'𒀤','ð’€¥'=>'ð’€¥','𒀦'=>'𒀦','𒀧'=>'𒀧','𒀨'=>'𒀨','𒀩'=>'𒀩','𒀪'=>'𒀪','𒀫'=>'𒀫','𒀬'=>'𒀬','ð’€­'=>'ð’€­','ð’€®'=>'ð’€®','𒀯'=>'𒀯','ð’€°'=>'ð’€°','ð’€±'=>'ð’€±','ð’€²'=>'ð’€²','ð’€³'=>'ð’€³','ð’€´'=>'ð’€´','ð’€µ'=>'ð’€µ','𒀶'=>'𒀶','ð’€·'=>'ð’€·','𒀸'=>'𒀸','ð’€¹'=>'ð’€¹','𒀺'=>'𒀺','ð’€»'=>'ð’€»','ð’€¼'=>'ð’€¼','ð’€½'=>'ð’€½','ð’€¾'=>'ð’€¾','𒀿'=>'𒀿','ð’€'=>'ð’€','ð’'=>'ð’','ð’‚'=>'ð’‚','ð’ƒ'=>'ð’ƒ','ð’„'=>'ð’„','ð’…'=>'ð’…','ð’†'=>'ð’†','ð’‡'=>'ð’‡','ð’ˆ'=>'ð’ˆ','ð’‰'=>'ð’‰','ð’Š'=>'ð’Š','ð’‹'=>'ð’‹','ð’Œ'=>'ð’Œ','ð’'=>'ð’','ð’Ž'=>'ð’Ž','ð’'=>'ð’','ð’'=>'ð’','ð’‘'=>'ð’‘','ð’’'=>'ð’’','ð’“'=>'ð’“','ð’”'=>'ð’”','ð’•'=>'ð’•','ð’–'=>'ð’–','ð’—'=>'ð’—','ð’˜'=>'ð’˜','ð’™'=>'ð’™','ð’š'=>'ð’š','ð’›'=>'ð’›','ð’œ'=>'ð’œ','ð’'=>'ð’','ð’ž'=>'ð’ž','ð’Ÿ'=>'ð’Ÿ','ð’ '=>'ð’ ','ð’¡'=>'ð’¡','ð’¢'=>'ð’¢','ð’£'=>'ð’£','ð’¤'=>'ð’¤','ð’¥'=>'ð’¥','ð’¦'=>'ð’¦','ð’§'=>'ð’§','ð’¨'=>'ð’¨','ð’©'=>'ð’©','ð’ª'=>'ð’ª','ð’«'=>'ð’«','ð’¬'=>'ð’¬','ð’­'=>'ð’­','ð’®'=>'ð’®','ð’¯'=>'ð’¯','ð’°'=>'ð’°','ð’±'=>'ð’±','ð’²'=>'ð’²','ð’³'=>'ð’³','ð’´'=>'ð’´','ð’µ'=>'ð’µ','ð’¶'=>'ð’¶','ð’·'=>'ð’·','ð’¸'=>'ð’¸','ð’¹'=>'ð’¹','ð’º'=>'ð’º','ð’»'=>'ð’»','ð’¼'=>'ð’¼','ð’½'=>'ð’½','ð’¾'=>'ð’¾','ð’¿'=>'ð’¿','ð’‚€'=>'ð’‚€','ð’‚'=>'ð’‚','ð’‚‚'=>'ð’‚‚','𒂃'=>'𒂃','ð’‚„'=>'ð’‚„','ð’‚…'=>'ð’‚…','𒂆'=>'𒂆','𒂇'=>'𒂇','𒂈'=>'𒂈','𒂉'=>'𒂉','ð’‚Š'=>'ð’‚Š','ð’‚‹'=>'ð’‚‹','ð’‚Œ'=>'ð’‚Œ','ð’‚'=>'ð’‚','ð’‚Ž'=>'ð’‚Ž','ð’‚'=>'ð’‚','ð’‚'=>'ð’‚','ð’‚‘'=>'ð’‚‘','ð’‚’'=>'ð’‚’','ð’‚“'=>'ð’‚“','ð’‚”'=>'ð’‚”','ð’‚•'=>'ð’‚•','ð’‚–'=>'ð’‚–','ð’‚—'=>'ð’‚—','𒂘'=>'𒂘','ð’‚™'=>'ð’‚™','ð’‚š'=>'ð’‚š','ð’‚›'=>'ð’‚›','ð’‚œ'=>'ð’‚œ','ð’‚'=>'ð’‚','ð’‚ž'=>'ð’‚ž','ð’‚Ÿ'=>'ð’‚Ÿ','ð’‚ '=>'ð’‚ ','ð’‚¡'=>'ð’‚¡','ð’‚¢'=>'ð’‚¢','ð’‚£'=>'ð’‚£','𒂤'=>'𒂤','ð’‚¥'=>'ð’‚¥','𒂦'=>'𒂦','𒂧'=>'𒂧','𒂨'=>'𒂨','ð’‚©'=>'ð’‚©','𒂪'=>'𒂪','ð’‚«'=>'ð’‚«','𒂬'=>'𒂬','ð’‚­'=>'ð’‚­','ð’‚®'=>'ð’‚®','𒂯'=>'𒂯','ð’‚°'=>'ð’‚°','ð’‚±'=>'ð’‚±','ð’‚²'=>'ð’‚²','ð’‚³'=>'ð’‚³','ð’‚´'=>'ð’‚´','ð’‚µ'=>'ð’‚µ','𒂶'=>'𒂶','ð’‚·'=>'ð’‚·','𒂸'=>'𒂸','ð’‚¹'=>'ð’‚¹','𒂺'=>'𒂺','ð’‚»'=>'ð’‚»','ð’‚¼'=>'ð’‚¼','ð’‚½'=>'ð’‚½','ð’‚¾'=>'ð’‚¾','ð’‚¿'=>'ð’‚¿','𒃀'=>'𒃀','ð’ƒ'=>'ð’ƒ','𒃂'=>'𒃂','𒃃'=>'𒃃','𒃄'=>'𒃄','ð’ƒ…'=>'ð’ƒ…','𒃆'=>'𒃆','𒃇'=>'𒃇','𒃈'=>'𒃈','𒃉'=>'𒃉','𒃊'=>'𒃊','𒃋'=>'𒃋','𒃌'=>'𒃌','ð’ƒ'=>'ð’ƒ','𒃎'=>'𒃎','ð’ƒ'=>'ð’ƒ','ð’ƒ'=>'ð’ƒ','𒃑'=>'𒃑','ð’ƒ’'=>'ð’ƒ’','𒃓'=>'𒃓','𒃔'=>'𒃔','𒃕'=>'𒃕','ð’ƒ–'=>'ð’ƒ–','ð’ƒ—'=>'ð’ƒ—','𒃘'=>'𒃘','𒃙'=>'𒃙','𒃚'=>'𒃚','𒃛'=>'𒃛','𒃜'=>'𒃜','ð’ƒ'=>'ð’ƒ','𒃞'=>'𒃞','𒃟'=>'𒃟','ð’ƒ '=>'ð’ƒ ','𒃡'=>'𒃡','𒃢'=>'𒃢','𒃣'=>'𒃣','𒃤'=>'𒃤','𒃥'=>'𒃥','𒃦'=>'𒃦','𒃧'=>'𒃧','𒃨'=>'𒃨','𒃩'=>'𒃩','𒃪'=>'𒃪','𒃫'=>'𒃫','𒃬'=>'𒃬','ð’ƒ­'=>'ð’ƒ­','𒃮'=>'𒃮','𒃯'=>'𒃯','ð’ƒ°'=>'ð’ƒ°','𒃱'=>'𒃱','𒃲'=>'𒃲','𒃳'=>'𒃳','ð’ƒ´'=>'ð’ƒ´','𒃵'=>'𒃵','𒃶'=>'𒃶','ð’ƒ·'=>'ð’ƒ·','𒃸'=>'𒃸','𒃹'=>'𒃹','𒃺'=>'𒃺','𒃻'=>'𒃻','𒃼'=>'𒃼','𒃽'=>'𒃽','𒃾'=>'𒃾','𒃿'=>'𒃿','ð’„€'=>'ð’„€','ð’„'=>'ð’„','ð’„‚'=>'ð’„‚','𒄃'=>'𒄃','ð’„„'=>'ð’„„','ð’„…'=>'ð’„…','𒄆'=>'𒄆','𒄇'=>'𒄇','𒄈'=>'𒄈','𒄉'=>'𒄉','ð’„Š'=>'ð’„Š','ð’„‹'=>'ð’„‹','ð’„Œ'=>'ð’„Œ','ð’„'=>'ð’„','ð’„Ž'=>'ð’„Ž','ð’„'=>'ð’„','ð’„'=>'ð’„','ð’„‘'=>'ð’„‘','ð’„’'=>'ð’„’','ð’„“'=>'ð’„“','ð’„”'=>'ð’„”','ð’„•'=>'ð’„•','ð’„–'=>'ð’„–','ð’„—'=>'ð’„—','𒄘'=>'𒄘','ð’„™'=>'ð’„™','ð’„š'=>'ð’„š','ð’„›'=>'ð’„›','ð’„œ'=>'ð’„œ','ð’„'=>'ð’„','ð’„ž'=>'ð’„ž','ð’„Ÿ'=>'ð’„Ÿ','ð’„ '=>'ð’„ ','ð’„¡'=>'ð’„¡','ð’„¢'=>'ð’„¢','ð’„£'=>'ð’„£','𒄤'=>'𒄤','ð’„¥'=>'ð’„¥','𒄦'=>'𒄦','𒄧'=>'𒄧','𒄨'=>'𒄨','ð’„©'=>'ð’„©','𒄪'=>'𒄪','ð’„«'=>'ð’„«','𒄬'=>'𒄬','ð’„­'=>'ð’„­','ð’„®'=>'ð’„®','𒄯'=>'𒄯','ð’„°'=>'ð’„°','ð’„±'=>'ð’„±','ð’„²'=>'ð’„²','ð’„³'=>'ð’„³','ð’„´'=>'ð’„´','ð’„µ'=>'ð’„µ','𒄶'=>'𒄶','ð’„·'=>'ð’„·','𒄸'=>'𒄸','ð’„¹'=>'ð’„¹','𒄺'=>'𒄺','ð’„»'=>'ð’„»','ð’„¼'=>'ð’„¼','ð’„½'=>'ð’„½','ð’„¾'=>'ð’„¾','ð’„¿'=>'ð’„¿','ð’…€'=>'ð’…€','ð’…'=>'ð’…','ð’…‚'=>'ð’…‚','ð’…ƒ'=>'ð’…ƒ','ð’…„'=>'ð’…„','ð’……'=>'ð’……','ð’…†'=>'ð’…†','ð’…‡'=>'ð’…‡','ð’…ˆ'=>'ð’…ˆ','ð’…‰'=>'ð’…‰','ð’…Š'=>'ð’…Š','ð’…‹'=>'ð’…‹','ð’…Œ'=>'ð’…Œ','ð’…'=>'ð’…','ð’…Ž'=>'ð’…Ž','ð’…'=>'ð’…','ð’…'=>'ð’…','ð’…‘'=>'ð’…‘','ð’…’'=>'ð’…’','ð’…“'=>'ð’…“','ð’…”'=>'ð’…”','ð’…•'=>'ð’…•','ð’…–'=>'ð’…–','ð’…—'=>'ð’…—','ð’…˜'=>'ð’…˜','ð’…™'=>'ð’…™','ð’…š'=>'ð’…š','ð’…›'=>'ð’…›','ð’…œ'=>'ð’…œ','ð’…'=>'ð’…','ð’…ž'=>'ð’…ž','ð’…Ÿ'=>'ð’…Ÿ','ð’… '=>'ð’… ','ð’…¡'=>'ð’…¡','ð’…¢'=>'ð’…¢','ð’…£'=>'ð’…£','ð’…¤'=>'ð’…¤','ð’…¥'=>'ð’…¥','ð’…¦'=>'ð’…¦','ð’…§'=>'ð’…§','ð’…¨'=>'ð’…¨','ð’…©'=>'ð’…©','ð’…ª'=>'ð’…ª','ð’…«'=>'ð’…«','ð’…¬'=>'ð’…¬','ð’…­'=>'ð’…­','ð’…®'=>'ð’…®','ð’…¯'=>'ð’…¯','ð’…°'=>'ð’…°','ð’…±'=>'ð’…±','ð’…²'=>'ð’…²','ð’…³'=>'ð’…³','ð’…´'=>'ð’…´','ð’…µ'=>'ð’…µ','ð’…¶'=>'ð’…¶','ð’…·'=>'ð’…·','ð’…¸'=>'ð’…¸','ð’…¹'=>'ð’…¹','ð’…º'=>'ð’…º','ð’…»'=>'ð’…»','ð’…¼'=>'ð’…¼','ð’…½'=>'ð’…½','ð’…¾'=>'ð’…¾','ð’…¿'=>'ð’…¿','𒆀'=>'𒆀','ð’†'=>'ð’†','𒆂'=>'𒆂','𒆃'=>'𒆃','𒆄'=>'𒆄','ð’†…'=>'ð’†…','𒆆'=>'𒆆','𒆇'=>'𒆇','𒆈'=>'𒆈','𒆉'=>'𒆉','𒆊'=>'𒆊','𒆋'=>'𒆋','𒆌'=>'𒆌','ð’†'=>'ð’†','𒆎'=>'𒆎','ð’†'=>'ð’†','ð’†'=>'ð’†','𒆑'=>'𒆑','ð’†’'=>'ð’†’','𒆓'=>'𒆓','𒆔'=>'𒆔','𒆕'=>'𒆕','ð’†–'=>'ð’†–','ð’†—'=>'ð’†—','𒆘'=>'𒆘','𒆙'=>'𒆙','𒆚'=>'𒆚','𒆛'=>'𒆛','𒆜'=>'𒆜','ð’†'=>'ð’†','𒆞'=>'𒆞','𒆟'=>'𒆟','ð’† '=>'ð’† ','𒆡'=>'𒆡','𒆢'=>'𒆢','𒆣'=>'𒆣','𒆤'=>'𒆤','𒆥'=>'𒆥','𒆦'=>'𒆦','𒆧'=>'𒆧','𒆨'=>'𒆨','𒆩'=>'𒆩','𒆪'=>'𒆪','𒆫'=>'𒆫','𒆬'=>'𒆬','ð’†­'=>'ð’†­','𒆮'=>'𒆮','𒆯'=>'𒆯','ð’†°'=>'ð’†°','𒆱'=>'𒆱','𒆲'=>'𒆲','𒆳'=>'𒆳','ð’†´'=>'ð’†´','𒆵'=>'𒆵','𒆶'=>'𒆶','ð’†·'=>'ð’†·','𒆸'=>'𒆸','𒆹'=>'𒆹','𒆺'=>'𒆺','𒆻'=>'𒆻','𒆼'=>'𒆼','𒆽'=>'𒆽','𒆾'=>'𒆾','𒆿'=>'𒆿','𒇀'=>'𒇀','ð’‡'=>'ð’‡','𒇂'=>'𒇂','𒇃'=>'𒇃','𒇄'=>'𒇄','ð’‡…'=>'ð’‡…','𒇆'=>'𒇆','𒇇'=>'𒇇','𒇈'=>'𒇈','𒇉'=>'𒇉','𒇊'=>'𒇊','𒇋'=>'𒇋','𒇌'=>'𒇌','ð’‡'=>'ð’‡','𒇎'=>'𒇎','ð’‡'=>'ð’‡','ð’‡'=>'ð’‡','𒇑'=>'𒇑','ð’‡’'=>'ð’‡’','𒇓'=>'𒇓','𒇔'=>'𒇔','𒇕'=>'𒇕','ð’‡–'=>'ð’‡–','ð’‡—'=>'ð’‡—','𒇘'=>'𒇘','𒇙'=>'𒇙','𒇚'=>'𒇚','𒇛'=>'𒇛','𒇜'=>'𒇜','ð’‡'=>'ð’‡','𒇞'=>'𒇞','𒇟'=>'𒇟','ð’‡ '=>'ð’‡ ','𒇡'=>'𒇡','𒇢'=>'𒇢','𒇣'=>'𒇣','𒇤'=>'𒇤','𒇥'=>'𒇥','𒇦'=>'𒇦','𒇧'=>'𒇧','𒇨'=>'𒇨','𒇩'=>'𒇩','𒇪'=>'𒇪','𒇫'=>'𒇫','𒇬'=>'𒇬','ð’‡­'=>'ð’‡­','𒇮'=>'𒇮','𒇯'=>'𒇯','ð’‡°'=>'ð’‡°','𒇱'=>'𒇱','𒇲'=>'𒇲','𒇳'=>'𒇳','ð’‡´'=>'ð’‡´','𒇵'=>'𒇵','𒇶'=>'𒇶','ð’‡·'=>'ð’‡·','𒇸'=>'𒇸','𒇹'=>'𒇹','𒇺'=>'𒇺','𒇻'=>'𒇻','𒇼'=>'𒇼','𒇽'=>'𒇽','𒇾'=>'𒇾','𒇿'=>'𒇿','𒈀'=>'𒈀','ð’ˆ'=>'ð’ˆ','𒈂'=>'𒈂','𒈃'=>'𒈃','𒈄'=>'𒈄','ð’ˆ…'=>'ð’ˆ…','𒈆'=>'𒈆','𒈇'=>'𒈇','𒈈'=>'𒈈','𒈉'=>'𒈉','𒈊'=>'𒈊','𒈋'=>'𒈋','𒈌'=>'𒈌','ð’ˆ'=>'ð’ˆ','𒈎'=>'𒈎','ð’ˆ'=>'ð’ˆ','ð’ˆ'=>'ð’ˆ','𒈑'=>'𒈑','ð’ˆ’'=>'ð’ˆ’','𒈓'=>'𒈓','𒈔'=>'𒈔','𒈕'=>'𒈕','ð’ˆ–'=>'ð’ˆ–','ð’ˆ—'=>'ð’ˆ—','𒈘'=>'𒈘','𒈙'=>'𒈙','𒈚'=>'𒈚','𒈛'=>'𒈛','𒈜'=>'𒈜','ð’ˆ'=>'ð’ˆ','𒈞'=>'𒈞','𒈟'=>'𒈟','ð’ˆ '=>'ð’ˆ ','𒈡'=>'𒈡','𒈢'=>'𒈢','𒈣'=>'𒈣','𒈤'=>'𒈤','𒈥'=>'𒈥','𒈦'=>'𒈦','𒈧'=>'𒈧','𒈨'=>'𒈨','𒈩'=>'𒈩','𒈪'=>'𒈪','𒈫'=>'𒈫','𒈬'=>'𒈬','ð’ˆ­'=>'ð’ˆ­','𒈮'=>'𒈮','𒈯'=>'𒈯','ð’ˆ°'=>'ð’ˆ°','𒈱'=>'𒈱','𒈲'=>'𒈲','𒈳'=>'𒈳','ð’ˆ´'=>'ð’ˆ´','𒈵'=>'𒈵','𒈶'=>'𒈶','ð’ˆ·'=>'ð’ˆ·','𒈸'=>'𒈸','𒈹'=>'𒈹','𒈺'=>'𒈺','𒈻'=>'𒈻','𒈼'=>'𒈼','𒈽'=>'𒈽','𒈾'=>'𒈾','𒈿'=>'𒈿','𒉀'=>'𒉀','ð’‰'=>'ð’‰','𒉂'=>'𒉂','𒉃'=>'𒉃','𒉄'=>'𒉄','ð’‰…'=>'ð’‰…','𒉆'=>'𒉆','𒉇'=>'𒉇','𒉈'=>'𒉈','𒉉'=>'𒉉','𒉊'=>'𒉊','𒉋'=>'𒉋','𒉌'=>'𒉌','ð’‰'=>'ð’‰','𒉎'=>'𒉎','ð’‰'=>'ð’‰','ð’‰'=>'ð’‰','𒉑'=>'𒉑','ð’‰’'=>'ð’‰’','𒉓'=>'𒉓','𒉔'=>'𒉔','𒉕'=>'𒉕','ð’‰–'=>'ð’‰–','ð’‰—'=>'ð’‰—','𒉘'=>'𒉘','𒉙'=>'𒉙','𒉚'=>'𒉚','𒉛'=>'𒉛','𒉜'=>'𒉜','ð’‰'=>'ð’‰','𒉞'=>'𒉞','𒉟'=>'𒉟','ð’‰ '=>'ð’‰ ','𒉡'=>'𒉡','𒉢'=>'𒉢','𒉣'=>'𒉣','𒉤'=>'𒉤','𒉥'=>'𒉥','𒉦'=>'𒉦','𒉧'=>'𒉧','𒉨'=>'𒉨','𒉩'=>'𒉩','𒉪'=>'𒉪','𒉫'=>'𒉫','𒉬'=>'𒉬','ð’‰­'=>'ð’‰­','𒉮'=>'𒉮','𒉯'=>'𒉯','ð’‰°'=>'ð’‰°','𒉱'=>'𒉱','𒉲'=>'𒉲','𒉳'=>'𒉳','ð’‰´'=>'ð’‰´','𒉵'=>'𒉵','𒉶'=>'𒉶','ð’‰·'=>'ð’‰·','𒉸'=>'𒉸','𒉹'=>'𒉹','𒉺'=>'𒉺','𒉻'=>'𒉻','𒉼'=>'𒉼','𒉽'=>'𒉽','𒉾'=>'𒉾','𒉿'=>'𒉿','ð’Š€'=>'ð’Š€','ð’Š'=>'ð’Š','ð’Š‚'=>'ð’Š‚','𒊃'=>'𒊃','ð’Š„'=>'ð’Š„','ð’Š…'=>'ð’Š…','𒊆'=>'𒊆','𒊇'=>'𒊇','𒊈'=>'𒊈','𒊉'=>'𒊉','ð’ŠŠ'=>'ð’ŠŠ','ð’Š‹'=>'ð’Š‹','ð’ŠŒ'=>'ð’ŠŒ','ð’Š'=>'ð’Š','ð’ŠŽ'=>'ð’ŠŽ','ð’Š'=>'ð’Š','ð’Š'=>'ð’Š','ð’Š‘'=>'ð’Š‘','ð’Š’'=>'ð’Š’','ð’Š“'=>'ð’Š“','ð’Š”'=>'ð’Š”','ð’Š•'=>'ð’Š•','ð’Š–'=>'ð’Š–','ð’Š—'=>'ð’Š—','𒊘'=>'𒊘','ð’Š™'=>'ð’Š™','ð’Šš'=>'ð’Šš','ð’Š›'=>'ð’Š›','ð’Šœ'=>'ð’Šœ','ð’Š'=>'ð’Š','ð’Šž'=>'ð’Šž','ð’ŠŸ'=>'ð’ŠŸ','ð’Š '=>'ð’Š ','ð’Š¡'=>'ð’Š¡','ð’Š¢'=>'ð’Š¢','ð’Š£'=>'ð’Š£','𒊤'=>'𒊤','ð’Š¥'=>'ð’Š¥','𒊦'=>'𒊦','𒊧'=>'𒊧','𒊨'=>'𒊨','ð’Š©'=>'ð’Š©','𒊪'=>'𒊪','ð’Š«'=>'ð’Š«','𒊬'=>'𒊬','ð’Š­'=>'ð’Š­','ð’Š®'=>'ð’Š®','𒊯'=>'𒊯','ð’Š°'=>'ð’Š°','𒊱'=>'𒊱','𒊲'=>'𒊲','𒊳'=>'𒊳','ð’Š´'=>'ð’Š´','𒊵'=>'𒊵','𒊶'=>'𒊶','ð’Š·'=>'ð’Š·','𒊸'=>'𒊸','𒊹'=>'𒊹','𒊺'=>'𒊺','ð’Š»'=>'ð’Š»','𒊼'=>'𒊼','𒊽'=>'𒊽','𒊾'=>'𒊾','ð’Š¿'=>'ð’Š¿','ð’‹€'=>'ð’‹€','ð’‹'=>'ð’‹','ð’‹‚'=>'ð’‹‚','𒋃'=>'𒋃','ð’‹„'=>'ð’‹„','ð’‹…'=>'ð’‹…','𒋆'=>'𒋆','𒋇'=>'𒋇','𒋈'=>'𒋈','𒋉'=>'𒋉','ð’‹Š'=>'ð’‹Š','ð’‹‹'=>'ð’‹‹','ð’‹Œ'=>'ð’‹Œ','ð’‹'=>'ð’‹','ð’‹Ž'=>'ð’‹Ž','ð’‹'=>'ð’‹','ð’‹'=>'ð’‹','ð’‹‘'=>'ð’‹‘','ð’‹’'=>'ð’‹’','ð’‹“'=>'ð’‹“','ð’‹”'=>'ð’‹”','ð’‹•'=>'ð’‹•','ð’‹–'=>'ð’‹–','ð’‹—'=>'ð’‹—','𒋘'=>'𒋘','ð’‹™'=>'ð’‹™','ð’‹š'=>'ð’‹š','ð’‹›'=>'ð’‹›','ð’‹œ'=>'ð’‹œ','ð’‹'=>'ð’‹','ð’‹ž'=>'ð’‹ž','ð’‹Ÿ'=>'ð’‹Ÿ','ð’‹ '=>'ð’‹ ','ð’‹¡'=>'ð’‹¡','ð’‹¢'=>'ð’‹¢','ð’‹£'=>'ð’‹£','𒋤'=>'𒋤','ð’‹¥'=>'ð’‹¥','𒋦'=>'𒋦','𒋧'=>'𒋧','𒋨'=>'𒋨','ð’‹©'=>'ð’‹©','𒋪'=>'𒋪','ð’‹«'=>'ð’‹«','𒋬'=>'𒋬','ð’‹­'=>'ð’‹­','ð’‹®'=>'ð’‹®','𒋯'=>'𒋯','ð’‹°'=>'ð’‹°','ð’‹±'=>'ð’‹±','ð’‹²'=>'ð’‹²','ð’‹³'=>'ð’‹³','ð’‹´'=>'ð’‹´','ð’‹µ'=>'ð’‹µ','𒋶'=>'𒋶','ð’‹·'=>'ð’‹·','𒋸'=>'𒋸','ð’‹¹'=>'ð’‹¹','𒋺'=>'𒋺','ð’‹»'=>'ð’‹»','ð’‹¼'=>'ð’‹¼','ð’‹½'=>'ð’‹½','ð’‹¾'=>'ð’‹¾','ð’‹¿'=>'ð’‹¿','𒌀'=>'𒌀','ð’Œ'=>'ð’Œ','𒌂'=>'𒌂','𒌃'=>'𒌃','𒌄'=>'𒌄','𒌅'=>'𒌅','𒌆'=>'𒌆','𒌇'=>'𒌇','𒌈'=>'𒌈','𒌉'=>'𒌉','𒌊'=>'𒌊','𒌋'=>'𒌋','𒌌'=>'𒌌','ð’Œ'=>'ð’Œ','𒌎'=>'𒌎','ð’Œ'=>'ð’Œ','ð’Œ'=>'ð’Œ','𒌑'=>'𒌑','𒌒'=>'𒌒','𒌓'=>'𒌓','𒌔'=>'𒌔','𒌕'=>'𒌕','𒌖'=>'𒌖','𒌗'=>'𒌗','𒌘'=>'𒌘','𒌙'=>'𒌙','𒌚'=>'𒌚','𒌛'=>'𒌛','𒌜'=>'𒌜','ð’Œ'=>'ð’Œ','𒌞'=>'𒌞','𒌟'=>'𒌟','𒌠'=>'𒌠','𒌡'=>'𒌡','𒌢'=>'𒌢','𒌣'=>'𒌣','𒌤'=>'𒌤','𒌥'=>'𒌥','𒌦'=>'𒌦','𒌧'=>'𒌧','𒌨'=>'𒌨','𒌩'=>'𒌩','𒌪'=>'𒌪','𒌫'=>'𒌫','𒌬'=>'𒌬','𒌭'=>'𒌭','𒌮'=>'𒌮','𒌯'=>'𒌯','𒌰'=>'𒌰','𒌱'=>'𒌱','𒌲'=>'𒌲','𒌳'=>'𒌳','𒌴'=>'𒌴','𒌵'=>'𒌵','𒌶'=>'𒌶','𒌷'=>'𒌷','𒌸'=>'𒌸','𒌹'=>'𒌹','𒌺'=>'𒌺','𒌻'=>'𒌻','𒌼'=>'𒌼','𒌽'=>'𒌽','𒌾'=>'𒌾','𒌿'=>'𒌿','ð’€'=>'ð’€','ð’'=>'ð’','ð’‚'=>'ð’‚','ð’ƒ'=>'ð’ƒ','ð’„'=>'ð’„','ð’…'=>'ð’…','ð’†'=>'ð’†','ð’‡'=>'ð’‡','ð’ˆ'=>'ð’ˆ','ð’‰'=>'ð’‰','ð’Š'=>'ð’Š','ð’‹'=>'ð’‹','ð’Œ'=>'ð’Œ','ð’'=>'ð’','ð’Ž'=>'ð’Ž','ð’'=>'ð’','ð’'=>'ð’','ð’‘'=>'ð’‘','ð’’'=>'ð’’','ð’“'=>'ð’“','ð’”'=>'ð’”','ð’•'=>'ð’•','ð’–'=>'ð’–','ð’—'=>'ð’—','ð’˜'=>'ð’˜','ð’™'=>'ð’™','ð’š'=>'ð’š','ð’›'=>'ð’›','ð’œ'=>'ð’œ','ð’'=>'ð’','ð’ž'=>'ð’ž','ð’Ÿ'=>'ð’Ÿ','ð’ '=>'ð’ ','ð’¡'=>'ð’¡','ð’¢'=>'ð’¢','ð’£'=>'ð’£','ð’¤'=>'ð’¤','ð’¥'=>'ð’¥','ð’¦'=>'ð’¦','ð’§'=>'ð’§','ð’¨'=>'ð’¨','ð’©'=>'ð’©','ð’ª'=>'ð’ª','ð’«'=>'ð’«','ð’¬'=>'ð’¬','ð’­'=>'ð’­','ð’®'=>'ð’®','ð’€'=>'2','ð’'=>'3','ð’‚'=>'4','ð’ƒ'=>'5','ð’„'=>'6','ð’…'=>'7','ð’†'=>'8','ð’‡'=>'9','ð’ˆ'=>'3','ð’‰'=>'4','ð’Š'=>'5','ð’‹'=>'6','ð’Œ'=>'7','ð’'=>'8','ð’Ž'=>'9','ð’'=>'4','ð’'=>'5','ð’‘'=>'6','ð’’'=>'7','ð’“'=>'8','ð’”'=>'9','ð’•'=>'1','ð’–'=>'2','ð’—'=>'3','ð’˜'=>'4','ð’™'=>'5','ð’š'=>'6','ð’›'=>'7','ð’œ'=>'8','ð’'=>'9','ð’ž'=>'1','ð’Ÿ'=>'2','ð’ '=>'3','ð’¡'=>'4','ð’¢'=>'5','ð’£'=>'2','ð’¤'=>'3','ð’¥'=>'3','ð’¦'=>'4','ð’§'=>'5','ð’¨'=>'6','ð’©'=>'7','ð’ª'=>'8','ð’«'=>'9','ð’¬'=>'1','ð’­'=>'2','ð’®'=>'3','ð’¯'=>'3','ð’°'=>'4','ð’±'=>'5','ð’²'=>'ð’²','ð’³'=>'ð’³','ð’´'=>'1','ð’µ'=>'2','ð’¶'=>'3','ð’·'=>'3','ð’¸'=>'4','ð’¹'=>'5','ð’º'=>'3','ð’»'=>'3','ð’¼'=>'4','ð’½'=>'4','ð’¾'=>'4','ð’¿'=>'4','ð’‘€'=>'6','ð’‘'=>'7','ð’‘‚'=>'7','𒑃'=>'7','ð’‘„'=>'8','ð’‘…'=>'8','𒑆'=>'9','𒑇'=>'9','𒑈'=>'9','𒑉'=>'9','ð’‘Š'=>'2','ð’‘‹'=>'3','ð’‘Œ'=>'4','ð’‘'=>'5','ð’‘Ž'=>'6','ð’‘'=>'1','ð’‘'=>'2','ð’‘‘'=>'3','ð’‘’'=>'4','ð’‘“'=>'4','ð’‘”'=>'5','ð’‘•'=>'5','ð’‘–'=>'ð’‘–','ð’‘—'=>'ð’‘—','𒑘'=>'1','ð’‘™'=>'2','ð’‘š'=>'1/3','ð’‘›'=>'2/3','ð’‘œ'=>'5/6','ð’‘'=>'1/3','ð’‘ž'=>'2/3','ð’‘Ÿ'=>'1/8','ð’‘ '=>'1/4','ð’‘¡'=>'1/6','ð’‘¢'=>'1/4'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_4.php b/phpBB/includes/utf/data/search_indexer_4.php
new file mode 100644
index 0000000000..51acbff1c2
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_4.php
@@ -0,0 +1 @@
+<?php return array('â°'=>'0','â±'=>'â±','â´'=>'4','âµ'=>'5','â¶'=>'6','â·'=>'7','â¸'=>'8','â¹'=>'9','â¿'=>'â¿','â‚€'=>'0','â‚'=>'1','â‚‚'=>'2','₃'=>'3','â‚„'=>'4','â‚…'=>'5','₆'=>'6','₇'=>'7','₈'=>'8','₉'=>'9','â‚'=>'â‚','â‚‘'=>'â‚‘','â‚’'=>'â‚’','â‚“'=>'â‚“','â‚”'=>'â‚”','âƒ'=>'âƒ','⃑'=>'⃑','⃒'=>'⃒','⃓'=>'⃓','⃔'=>'⃔','⃕'=>'⃕','⃖'=>'⃖','⃗'=>'⃗','⃘'=>'⃘','⃙'=>'⃙','⃚'=>'⃚','⃛'=>'⃛','⃜'=>'⃜','âƒ'=>'âƒ','⃞'=>'⃞','⃟'=>'⃟','⃠'=>'⃠','⃡'=>'⃡','⃢'=>'⃢','⃣'=>'⃣','⃤'=>'⃤','⃥'=>'⃥','⃦'=>'⃦','⃧'=>'⃧','⃨'=>'⃨','⃩'=>'⃩','⃪'=>'⃪','⃫'=>'⃫','⃬'=>'⃬','⃭'=>'⃭','⃮'=>'⃮','⃯'=>'⃯','â„‚'=>'â„‚','ℇ'=>'ℇ','â„Š'=>'â„Š','â„‹'=>'â„‹','â„Œ'=>'â„Œ','â„'=>'â„','â„Ž'=>'â„Ž','â„'=>'â„','â„'=>'â„','â„‘'=>'â„‘','â„’'=>'â„’','â„“'=>'â„“','â„•'=>'â„•','â„™'=>'â„™','â„š'=>'â„š','â„›'=>'â„›','â„œ'=>'â„œ','â„'=>'â„','ℤ'=>'ℤ','Ω'=>'ω','ℨ'=>'ℨ','K'=>'k','â„«'=>'Ã¥','ℬ'=>'ℬ','â„­'=>'â„­','ℯ'=>'ℯ','â„°'=>'â„°','ℱ'=>'ℱ','Ⅎ'=>'â…Ž','ℳ'=>'ℳ','â„´'=>'â„´','ℵ'=>'ℵ','ℶ'=>'ℶ','â„·'=>'â„·','ℸ'=>'ℸ','ℹ'=>'ℹ','ℼ'=>'ℼ','ℽ'=>'ℽ','ℾ'=>'ℾ','â„¿'=>'â„¿','â……'=>'â……','â…†'=>'â…†','â…‡'=>'â…‡','â…ˆ'=>'â…ˆ','â…‰'=>'â…‰','â…Ž'=>'â…Ž','â…“'=>'1/3','â…”'=>'2/3','â…•'=>'1/5','â…–'=>'2/5','â…—'=>'3/5','â…˜'=>'4/5','â…™'=>'1/6','â…š'=>'5/6','â…›'=>'1/8','â…œ'=>'3/8','â…'=>'5/8','â…ž'=>'7/8','â…Ÿ'=>'1','â… '=>'1','â…¡'=>'2','â…¢'=>'3','â…£'=>'4','â…¤'=>'5','â…¥'=>'6','â…¦'=>'7','â…§'=>'8','â…¨'=>'9','â…©'=>'10','â…ª'=>'11','â…«'=>'12','â…¬'=>'50','â…­'=>'100','â…®'=>'500','â…¯'=>'1000','â…°'=>'1','â…±'=>'2','â…²'=>'3','â…³'=>'4','â…´'=>'5','â…µ'=>'6','â…¶'=>'7','â…·'=>'8','â…¸'=>'9','â…¹'=>'10','â…º'=>'11','â…»'=>'12','â…¼'=>'50','â…½'=>'100','â…¾'=>'500','â…¿'=>'1000','ↀ'=>'1000','â†'=>'5000','ↂ'=>'10000','Ↄ'=>'ↄ','ↄ'=>'ↄ','â‘ '=>'1','â‘¡'=>'2','â‘¢'=>'3','â‘£'=>'4','⑤'=>'5','â‘¥'=>'6','⑦'=>'7','⑧'=>'8','⑨'=>'9','â‘©'=>'10','⑪'=>'11','â‘«'=>'12','⑬'=>'13','â‘­'=>'14','â‘®'=>'15','⑯'=>'16','â‘°'=>'17','⑱'=>'18','⑲'=>'19','⑳'=>'20','â‘´'=>'1','⑵'=>'2','⑶'=>'3','â‘·'=>'4','⑸'=>'5','⑹'=>'6','⑺'=>'7','â‘»'=>'8','⑼'=>'9','⑽'=>'10','⑾'=>'11','â‘¿'=>'12','â’€'=>'13','â’'=>'14','â’‚'=>'15','â’ƒ'=>'16','â’„'=>'17','â’…'=>'18','â’†'=>'19','â’‡'=>'20','â’ˆ'=>'1','â’‰'=>'2','â’Š'=>'3','â’‹'=>'4','â’Œ'=>'5','â’'=>'6','â’Ž'=>'7','â’'=>'8','â’'=>'9','â’‘'=>'10','â’’'=>'11','â’“'=>'12','â’”'=>'13','â’•'=>'14','â’–'=>'15','â’—'=>'16','â’˜'=>'17','â’™'=>'18','â’š'=>'19','â’›'=>'20','⓪'=>'0','â“«'=>'11','⓬'=>'12','â“­'=>'13','â“®'=>'14','⓯'=>'15','â“°'=>'16','⓱'=>'17','⓲'=>'18','⓳'=>'19','â“´'=>'20','⓵'=>'1','⓶'=>'2','â“·'=>'3','⓸'=>'4','⓹'=>'5','⓺'=>'6','â“»'=>'7','⓼'=>'8','⓽'=>'9','⓾'=>'10','â“¿'=>'0','â¶'=>'1','â·'=>'2','â¸'=>'3','â¹'=>'4','âº'=>'5','â»'=>'6','â¼'=>'7','â½'=>'8','â¾'=>'9','â¿'=>'10','➀'=>'1','âž'=>'2','âž‚'=>'3','➃'=>'4','âž„'=>'5','âž…'=>'6','➆'=>'7','➇'=>'8','➈'=>'9','➉'=>'10','➊'=>'1','âž‹'=>'2','➌'=>'3','âž'=>'4','➎'=>'5','âž'=>'6','âž'=>'7','âž‘'=>'8','âž’'=>'9','âž“'=>'10'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_448.php b/phpBB/includes/utf/data/search_indexer_448.php
new file mode 100644
index 0000000000..32ac28a549
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_448.php
@@ -0,0 +1 @@
+<?php return array('ó „€'=>'ó „€','ó „'=>'ó „','ó „‚'=>'ó „‚','󠄃'=>'󠄃','ó „„'=>'ó „„','ó „…'=>'ó „…','󠄆'=>'󠄆','󠄇'=>'󠄇','󠄈'=>'󠄈','󠄉'=>'󠄉','ó „Š'=>'ó „Š','ó „‹'=>'ó „‹','ó „Œ'=>'ó „Œ','ó „'=>'ó „','ó „Ž'=>'ó „Ž','ó „'=>'ó „','ó „'=>'ó „','ó „‘'=>'ó „‘','ó „’'=>'ó „’','ó „“'=>'ó „“','ó „”'=>'ó „”','ó „•'=>'ó „•','ó „–'=>'ó „–','ó „—'=>'ó „—','󠄘'=>'󠄘','ó „™'=>'ó „™','ó „š'=>'ó „š','ó „›'=>'ó „›','ó „œ'=>'ó „œ','ó „'=>'ó „','ó „ž'=>'ó „ž','ó „Ÿ'=>'ó „Ÿ','ó „ '=>'ó „ ','ó „¡'=>'ó „¡','ó „¢'=>'ó „¢','ó „£'=>'ó „£','󠄤'=>'󠄤','ó „¥'=>'ó „¥','󠄦'=>'󠄦','󠄧'=>'󠄧','󠄨'=>'󠄨','ó „©'=>'ó „©','󠄪'=>'󠄪','ó „«'=>'ó „«','󠄬'=>'󠄬','ó „­'=>'ó „­','ó „®'=>'ó „®','󠄯'=>'󠄯','ó „°'=>'ó „°','ó „±'=>'ó „±','ó „²'=>'ó „²','ó „³'=>'ó „³','ó „´'=>'ó „´','ó „µ'=>'ó „µ','󠄶'=>'󠄶','ó „·'=>'ó „·','󠄸'=>'󠄸','ó „¹'=>'ó „¹','󠄺'=>'󠄺','ó „»'=>'ó „»','ó „¼'=>'ó „¼','ó „½'=>'ó „½','ó „¾'=>'ó „¾','ó „¿'=>'ó „¿','ó …€'=>'ó …€','ó …'=>'ó …','ó …‚'=>'ó …‚','ó …ƒ'=>'ó …ƒ','ó …„'=>'ó …„','ó ……'=>'ó ……','ó …†'=>'ó …†','ó …‡'=>'ó …‡','ó …ˆ'=>'ó …ˆ','ó …‰'=>'ó …‰','ó …Š'=>'ó …Š','ó …‹'=>'ó …‹','ó …Œ'=>'ó …Œ','ó …'=>'ó …','ó …Ž'=>'ó …Ž','ó …'=>'ó …','ó …'=>'ó …','ó …‘'=>'ó …‘','ó …’'=>'ó …’','ó …“'=>'ó …“','ó …”'=>'ó …”','ó …•'=>'ó …•','ó …–'=>'ó …–','ó …—'=>'ó …—','ó …˜'=>'ó …˜','ó …™'=>'ó …™','ó …š'=>'ó …š','ó …›'=>'ó …›','ó …œ'=>'ó …œ','ó …'=>'ó …','ó …ž'=>'ó …ž','ó …Ÿ'=>'ó …Ÿ','ó … '=>'ó … ','ó …¡'=>'ó …¡','ó …¢'=>'ó …¢','ó …£'=>'ó …£','ó …¤'=>'ó …¤','ó …¥'=>'ó …¥','ó …¦'=>'ó …¦','ó …§'=>'ó …§','ó …¨'=>'ó …¨','ó …©'=>'ó …©','ó …ª'=>'ó …ª','ó …«'=>'ó …«','ó …¬'=>'ó …¬','ó …­'=>'ó …­','ó …®'=>'ó …®','ó …¯'=>'ó …¯','ó …°'=>'ó …°','ó …±'=>'ó …±','ó …²'=>'ó …²','ó …³'=>'ó …³','ó …´'=>'ó …´','ó …µ'=>'ó …µ','ó …¶'=>'ó …¶','ó …·'=>'ó …·','ó …¸'=>'ó …¸','ó …¹'=>'ó …¹','ó …º'=>'ó …º','ó …»'=>'ó …»','ó …¼'=>'ó …¼','ó …½'=>'ó …½','ó …¾'=>'ó …¾','ó …¿'=>'ó …¿','󠆀'=>'󠆀','ó †'=>'ó †','󠆂'=>'󠆂','󠆃'=>'󠆃','󠆄'=>'󠆄','ó †…'=>'ó †…','󠆆'=>'󠆆','󠆇'=>'󠆇','󠆈'=>'󠆈','󠆉'=>'󠆉','󠆊'=>'󠆊','󠆋'=>'󠆋','󠆌'=>'󠆌','ó †'=>'ó †','󠆎'=>'󠆎','ó †'=>'ó †','ó †'=>'ó †','󠆑'=>'󠆑','ó †’'=>'ó †’','󠆓'=>'󠆓','󠆔'=>'󠆔','󠆕'=>'󠆕','ó †–'=>'ó †–','ó †—'=>'ó †—','󠆘'=>'󠆘','󠆙'=>'󠆙','󠆚'=>'󠆚','󠆛'=>'󠆛','󠆜'=>'󠆜','ó †'=>'ó †','󠆞'=>'󠆞','󠆟'=>'󠆟','ó † '=>'ó † ','󠆡'=>'󠆡','󠆢'=>'󠆢','󠆣'=>'󠆣','󠆤'=>'󠆤','󠆥'=>'󠆥','󠆦'=>'󠆦','󠆧'=>'󠆧','󠆨'=>'󠆨','󠆩'=>'󠆩','󠆪'=>'󠆪','󠆫'=>'󠆫','󠆬'=>'󠆬','ó †­'=>'ó †­','󠆮'=>'󠆮','󠆯'=>'󠆯','ó †°'=>'ó †°','󠆱'=>'󠆱','󠆲'=>'󠆲','󠆳'=>'󠆳','ó †´'=>'ó †´','󠆵'=>'󠆵','󠆶'=>'󠆶','ó †·'=>'ó †·','󠆸'=>'󠆸','󠆹'=>'󠆹','󠆺'=>'󠆺','󠆻'=>'󠆻','󠆼'=>'󠆼','󠆽'=>'󠆽','󠆾'=>'󠆾','󠆿'=>'󠆿','󠇀'=>'󠇀','ó ‡'=>'ó ‡','󠇂'=>'󠇂','󠇃'=>'󠇃','󠇄'=>'󠇄','ó ‡…'=>'ó ‡…','󠇆'=>'󠇆','󠇇'=>'󠇇','󠇈'=>'󠇈','󠇉'=>'󠇉','󠇊'=>'󠇊','󠇋'=>'󠇋','󠇌'=>'󠇌','ó ‡'=>'ó ‡','󠇎'=>'󠇎','ó ‡'=>'ó ‡','ó ‡'=>'ó ‡','󠇑'=>'󠇑','ó ‡’'=>'ó ‡’','󠇓'=>'󠇓','󠇔'=>'󠇔','󠇕'=>'󠇕','ó ‡–'=>'ó ‡–','ó ‡—'=>'ó ‡—','󠇘'=>'󠇘','󠇙'=>'󠇙','󠇚'=>'󠇚','󠇛'=>'󠇛','󠇜'=>'󠇜','ó ‡'=>'ó ‡','󠇞'=>'󠇞','󠇟'=>'󠇟','ó ‡ '=>'ó ‡ ','󠇡'=>'󠇡','󠇢'=>'󠇢','󠇣'=>'󠇣','󠇤'=>'󠇤','󠇥'=>'󠇥','󠇦'=>'󠇦','󠇧'=>'󠇧','󠇨'=>'󠇨','󠇩'=>'󠇩','󠇪'=>'󠇪','󠇫'=>'󠇫','󠇬'=>'󠇬','ó ‡­'=>'ó ‡­','󠇮'=>'󠇮','󠇯'=>'󠇯'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_5.php b/phpBB/includes/utf/data/search_indexer_5.php
new file mode 100644
index 0000000000..0f1228a394
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_5.php
@@ -0,0 +1 @@
+<?php return array('â°€'=>'â°°','â°'=>'â°±','â°‚'=>'â°²','â°ƒ'=>'â°³','â°„'=>'â°´','â°…'=>'â°µ','â°†'=>'â°¶','â°‡'=>'â°·','â°ˆ'=>'â°¸','â°‰'=>'â°¹','â°Š'=>'â°º','â°‹'=>'â°»','â°Œ'=>'â°¼','â°'=>'â°½','â°Ž'=>'â°¾','â°'=>'â°¿','â°'=>'â±€','â°‘'=>'â±','â°’'=>'ⱂ','â°“'=>'ⱃ','â°”'=>'ⱄ','â°•'=>'â±…','â°–'=>'ⱆ','â°—'=>'ⱇ','â°˜'=>'ⱈ','â°™'=>'ⱉ','â°š'=>'ⱊ','â°›'=>'ⱋ','â°œ'=>'ⱌ','â°'=>'â±','â°ž'=>'ⱎ','â°Ÿ'=>'â±','â° '=>'â±','â°¡'=>'ⱑ','â°¢'=>'â±’','â°£'=>'ⱓ','â°¤'=>'â±”','â°¥'=>'ⱕ','â°¦'=>'â±–','â°§'=>'â±—','â°¨'=>'ⱘ','â°©'=>'â±™','â°ª'=>'ⱚ','â°«'=>'â±›','â°¬'=>'ⱜ','â°­'=>'â±','â°®'=>'ⱞ','â°°'=>'â°°','â°±'=>'â°±','â°²'=>'â°²','â°³'=>'â°³','â°´'=>'â°´','â°µ'=>'â°µ','â°¶'=>'â°¶','â°·'=>'â°·','â°¸'=>'â°¸','â°¹'=>'â°¹','â°º'=>'â°º','â°»'=>'â°»','â°¼'=>'â°¼','â°½'=>'â°½','â°¾'=>'â°¾','â°¿'=>'â°¿','â±€'=>'â±€','â±'=>'â±','ⱂ'=>'ⱂ','ⱃ'=>'ⱃ','ⱄ'=>'ⱄ','â±…'=>'â±…','ⱆ'=>'ⱆ','ⱇ'=>'ⱇ','ⱈ'=>'ⱈ','ⱉ'=>'ⱉ','ⱊ'=>'ⱊ','ⱋ'=>'ⱋ','ⱌ'=>'ⱌ','â±'=>'â±','ⱎ'=>'ⱎ','â±'=>'â±','â±'=>'â±','ⱑ'=>'ⱑ','â±’'=>'â±’','ⱓ'=>'ⱓ','â±”'=>'â±”','ⱕ'=>'ⱕ','â±–'=>'â±–','â±—'=>'â±—','ⱘ'=>'ⱘ','â±™'=>'â±™','ⱚ'=>'ⱚ','â±›'=>'â±›','ⱜ'=>'ⱜ','â±'=>'â±','ⱞ'=>'ⱞ','â± '=>'ⱡ','ⱡ'=>'ⱡ','â±¢'=>'É«','â±£'=>'áµ½','Ɽ'=>'ɽ','â±¥'=>'â±¥','ⱦ'=>'ⱦ','Ⱨ'=>'ⱨ','ⱨ'=>'ⱨ','Ⱪ'=>'ⱪ','ⱪ'=>'ⱪ','Ⱬ'=>'ⱬ','ⱬ'=>'ⱬ','â±´'=>'â±´','â±µ'=>'ⱶ','ⱶ'=>'ⱶ','â±·'=>'â±·','â²€'=>'â²','â²'=>'â²','Ⲃ'=>'ⲃ','ⲃ'=>'ⲃ','Ⲅ'=>'â²…','â²…'=>'â²…','Ⲇ'=>'ⲇ','ⲇ'=>'ⲇ','Ⲉ'=>'ⲉ','ⲉ'=>'ⲉ','Ⲋ'=>'ⲋ','ⲋ'=>'ⲋ','Ⲍ'=>'â²','â²'=>'â²','Ⲏ'=>'â²','â²'=>'â²','â²'=>'ⲑ','ⲑ'=>'ⲑ','â²’'=>'ⲓ','ⲓ'=>'ⲓ','â²”'=>'ⲕ','ⲕ'=>'ⲕ','â²–'=>'â²—','â²—'=>'â²—','Ⲙ'=>'â²™','â²™'=>'â²™','Ⲛ'=>'â²›','â²›'=>'â²›','Ⲝ'=>'â²','â²'=>'â²','Ⲟ'=>'ⲟ','ⲟ'=>'ⲟ','â² '=>'ⲡ','ⲡ'=>'ⲡ','â²¢'=>'â²£','â²£'=>'â²£','Ⲥ'=>'â²¥','â²¥'=>'â²¥','Ⲧ'=>'ⲧ','ⲧ'=>'ⲧ','Ⲩ'=>'ⲩ','ⲩ'=>'ⲩ','Ⲫ'=>'ⲫ','ⲫ'=>'ⲫ','Ⲭ'=>'â²­','â²­'=>'â²­','â²®'=>'ⲯ','ⲯ'=>'ⲯ','â²°'=>'â²±','â²±'=>'â²±','â²²'=>'â²³','â²³'=>'â²³','â²´'=>'â²µ','â²µ'=>'â²µ','Ⲷ'=>'â²·','â²·'=>'â²·','Ⲹ'=>'â²¹','â²¹'=>'â²¹','Ⲻ'=>'â²»','â²»'=>'â²»','â²¼'=>'â²½','â²½'=>'â²½','â²¾'=>'ⲿ','ⲿ'=>'ⲿ','â³€'=>'â³','â³'=>'â³','Ⳃ'=>'ⳃ','ⳃ'=>'ⳃ','Ⳅ'=>'â³…','â³…'=>'â³…','Ⳇ'=>'ⳇ','ⳇ'=>'ⳇ','Ⳉ'=>'ⳉ','ⳉ'=>'ⳉ','Ⳋ'=>'ⳋ','ⳋ'=>'ⳋ','Ⳍ'=>'â³','â³'=>'â³','Ⳏ'=>'â³','â³'=>'â³','â³'=>'ⳑ','ⳑ'=>'ⳑ','â³’'=>'ⳓ','ⳓ'=>'ⳓ','â³”'=>'ⳕ','ⳕ'=>'ⳕ','â³–'=>'â³—','â³—'=>'â³—','Ⳙ'=>'â³™','â³™'=>'â³™','Ⳛ'=>'â³›','â³›'=>'â³›','Ⳝ'=>'â³','â³'=>'â³','Ⳟ'=>'ⳟ','ⳟ'=>'ⳟ','â³ '=>'ⳡ','ⳡ'=>'ⳡ','â³¢'=>'â³£','â³£'=>'â³£','ⳤ'=>'ⳤ','â³½'=>'1/2','â´€'=>'â´€','â´'=>'â´','â´‚'=>'â´‚','â´ƒ'=>'â´ƒ','â´„'=>'â´„','â´…'=>'â´…','â´†'=>'â´†','â´‡'=>'â´‡','â´ˆ'=>'â´ˆ','â´‰'=>'â´‰','â´Š'=>'â´Š','â´‹'=>'â´‹','â´Œ'=>'â´Œ','â´'=>'â´','â´Ž'=>'â´Ž','â´'=>'â´','â´'=>'â´','â´‘'=>'â´‘','â´’'=>'â´’','â´“'=>'â´“','â´”'=>'â´”','â´•'=>'â´•','â´–'=>'â´–','â´—'=>'â´—','â´˜'=>'â´˜','â´™'=>'â´™','â´š'=>'â´š','â´›'=>'â´›','â´œ'=>'â´œ','â´'=>'â´','â´ž'=>'â´ž','â´Ÿ'=>'â´Ÿ','â´ '=>'â´ ','â´¡'=>'â´¡','â´¢'=>'â´¢','â´£'=>'â´£','â´¤'=>'â´¤','â´¥'=>'â´¥','â´°'=>'â´°','â´±'=>'â´±','â´²'=>'â´²','â´³'=>'â´³','â´´'=>'â´´','â´µ'=>'â´µ','â´¶'=>'â´¶','â´·'=>'â´·','â´¸'=>'â´¸','â´¹'=>'â´¹','â´º'=>'â´º','â´»'=>'â´»','â´¼'=>'â´¼','â´½'=>'â´½','â´¾'=>'â´¾','â´¿'=>'â´¿','âµ€'=>'âµ€','âµ'=>'âµ','ⵂ'=>'ⵂ','ⵃ'=>'ⵃ','ⵄ'=>'ⵄ','âµ…'=>'âµ…','ⵆ'=>'ⵆ','ⵇ'=>'ⵇ','ⵈ'=>'ⵈ','ⵉ'=>'ⵉ','ⵊ'=>'ⵊ','ⵋ'=>'ⵋ','ⵌ'=>'ⵌ','âµ'=>'âµ','ⵎ'=>'ⵎ','âµ'=>'âµ','âµ'=>'âµ','ⵑ'=>'ⵑ','âµ’'=>'âµ’','ⵓ'=>'ⵓ','âµ”'=>'âµ”','ⵕ'=>'ⵕ','âµ–'=>'âµ–','âµ—'=>'âµ—','ⵘ'=>'ⵘ','âµ™'=>'âµ™','ⵚ'=>'ⵚ','âµ›'=>'âµ›','ⵜ'=>'ⵜ','âµ'=>'âµ','ⵞ'=>'ⵞ','ⵟ'=>'ⵟ','âµ '=>'âµ ','ⵡ'=>'ⵡ','âµ¢'=>'âµ¢','âµ£'=>'âµ£','ⵤ'=>'ⵤ','âµ¥'=>'âµ¥','ⵯ'=>'ⵯ','ⶀ'=>'ⶀ','â¶'=>'â¶','ⶂ'=>'ⶂ','ⶃ'=>'ⶃ','ⶄ'=>'ⶄ','ⶅ'=>'ⶅ','ⶆ'=>'ⶆ','ⶇ'=>'ⶇ','ⶈ'=>'ⶈ','ⶉ'=>'ⶉ','ⶊ'=>'ⶊ','ⶋ'=>'ⶋ','ⶌ'=>'ⶌ','â¶'=>'â¶','ⶎ'=>'ⶎ','â¶'=>'â¶','â¶'=>'â¶','ⶑ'=>'ⶑ','ⶒ'=>'ⶒ','ⶓ'=>'ⶓ','ⶔ'=>'ⶔ','ⶕ'=>'ⶕ','ⶖ'=>'ⶖ','ⶠ'=>'ⶠ','ⶡ'=>'ⶡ','ⶢ'=>'ⶢ','ⶣ'=>'ⶣ','ⶤ'=>'ⶤ','ⶥ'=>'ⶥ','ⶦ'=>'ⶦ','ⶨ'=>'ⶨ','ⶩ'=>'ⶩ','ⶪ'=>'ⶪ','ⶫ'=>'ⶫ','ⶬ'=>'ⶬ','ⶭ'=>'ⶭ','ⶮ'=>'ⶮ','ⶰ'=>'ⶰ','ⶱ'=>'ⶱ','ⶲ'=>'ⶲ','ⶳ'=>'ⶳ','ⶴ'=>'ⶴ','ⶵ'=>'ⶵ','ⶶ'=>'ⶶ','ⶸ'=>'ⶸ','ⶹ'=>'ⶹ','ⶺ'=>'ⶺ','ⶻ'=>'ⶻ','ⶼ'=>'ⶼ','ⶽ'=>'ⶽ','ⶾ'=>'ⶾ','â·€'=>'â·€','â·'=>'â·','â·‚'=>'â·‚','â·ƒ'=>'â·ƒ','â·„'=>'â·„','â·…'=>'â·…','â·†'=>'â·†','â·ˆ'=>'â·ˆ','â·‰'=>'â·‰','â·Š'=>'â·Š','â·‹'=>'â·‹','â·Œ'=>'â·Œ','â·'=>'â·','â·Ž'=>'â·Ž','â·'=>'â·','â·‘'=>'â·‘','â·’'=>'â·’','â·“'=>'â·“','â·”'=>'â·”','â·•'=>'â·•','â·–'=>'â·–','â·˜'=>'â·˜','â·™'=>'â·™','â·š'=>'â·š','â·›'=>'â·›','â·œ'=>'â·œ','â·'=>'â·','â·ž'=>'â·ž'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_58.php b/phpBB/includes/utf/data/search_indexer_58.php
new file mode 100644
index 0000000000..8902bc7995
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_58.php
@@ -0,0 +1 @@
+<?php return array('ð…¥'=>'ð…¥','ð…¦'=>'ð…¦','ð…§'=>'ð…§','ð…¨'=>'ð…¨','ð…©'=>'ð…©','ð…­'=>'ð…­','ð…®'=>'ð…®','ð…¯'=>'ð…¯','ð…°'=>'ð…°','ð…±'=>'ð…±','ð…²'=>'ð…²','ð…»'=>'ð…»','ð…¼'=>'ð…¼','ð…½'=>'ð…½','ð…¾'=>'ð…¾','ð…¿'=>'ð…¿','ð†€'=>'ð†€','ð†'=>'ð†','ð†‚'=>'ð†‚','ð†…'=>'ð†…','ð††'=>'ð††','ð†‡'=>'ð†‡','ð†ˆ'=>'ð†ˆ','ð†‰'=>'ð†‰','ð†Š'=>'ð†Š','ð†‹'=>'ð†‹','ð†ª'=>'ð†ª','ð†«'=>'ð†«','ð†¬'=>'ð†¬','ð†­'=>'ð†­','ð‰‚'=>'ð‰‚','ð‰ƒ'=>'ð‰ƒ','ð‰„'=>'ð‰„','ð '=>'1','ð¡'=>'2','ð¢'=>'3','ð£'=>'4','ð¤'=>'5','ð¥'=>'6','ð¦'=>'7','ð§'=>'8','ð¨'=>'9','ð©'=>'10','ðª'=>'20','ð«'=>'30','ð¬'=>'40','ð­'=>'50','ð®'=>'60','ð¯'=>'70','ð°'=>'80','ð±'=>'90','ð€'=>'ð€','ð'=>'ð','ð‚'=>'ð‚','ðƒ'=>'ðƒ','ð„'=>'ð„','ð…'=>'ð…','ð†'=>'ð†','ð‡'=>'ð‡','ðˆ'=>'ðˆ','ð‰'=>'ð‰','ðŠ'=>'ðŠ','ð‹'=>'ð‹','ðŒ'=>'ðŒ','ð'=>'ð','ðŽ'=>'ðŽ','ð'=>'ð','ð'=>'ð','ð‘'=>'ð‘','ð’'=>'ð’','ð“'=>'ð“','ð”'=>'ð”','ð•'=>'ð•','ð–'=>'ð–','ð—'=>'ð—','ð˜'=>'ð˜','ð™'=>'ð™','ðš'=>'ðš','ð›'=>'ð›','ðœ'=>'ðœ','ð'=>'ð','ðž'=>'ðž','ðŸ'=>'ðŸ','ð '=>'ð ','ð¡'=>'ð¡','ð¢'=>'ð¢','ð£'=>'ð£','ð¤'=>'ð¤','ð¥'=>'ð¥','ð¦'=>'ð¦','ð§'=>'ð§','ð¨'=>'ð¨','ð©'=>'ð©','ðª'=>'ðª','ð«'=>'ð«','ð¬'=>'ð¬','ð­'=>'ð­','ð®'=>'ð®','ð¯'=>'ð¯','ð°'=>'ð°','ð±'=>'ð±','ð²'=>'ð²','ð³'=>'ð³','ð´'=>'ð´','ðµ'=>'ðµ','ð¶'=>'ð¶','ð·'=>'ð·','ð¸'=>'ð¸','ð¹'=>'ð¹','ðº'=>'ðº','ð»'=>'ð»','ð¼'=>'ð¼','ð½'=>'ð½','ð¾'=>'ð¾','ð¿'=>'ð¿','ð‘€'=>'ð‘€','ð‘'=>'ð‘','ð‘‚'=>'ð‘‚','ð‘ƒ'=>'ð‘ƒ','ð‘„'=>'ð‘„','ð‘…'=>'ð‘…','ð‘†'=>'ð‘†','ð‘‡'=>'ð‘‡','ð‘ˆ'=>'ð‘ˆ','ð‘‰'=>'ð‘‰','ð‘Š'=>'ð‘Š','ð‘‹'=>'ð‘‹','ð‘Œ'=>'ð‘Œ','ð‘'=>'ð‘','ð‘Ž'=>'ð‘Ž','ð‘'=>'ð‘','ð‘'=>'ð‘','ð‘‘'=>'ð‘‘','ð‘’'=>'ð‘’','ð‘“'=>'ð‘“','ð‘”'=>'ð‘”','ð‘–'=>'ð‘–','ð‘—'=>'ð‘—','ð‘˜'=>'ð‘˜','ð‘™'=>'ð‘™','ð‘š'=>'ð‘š','ð‘›'=>'ð‘›','ð‘œ'=>'ð‘œ','ð‘'=>'ð‘','ð‘ž'=>'ð‘ž','ð‘Ÿ'=>'ð‘Ÿ','ð‘ '=>'ð‘ ','ð‘¡'=>'ð‘¡','ð‘¢'=>'ð‘¢','ð‘£'=>'ð‘£','ð‘¤'=>'ð‘¤','ð‘¥'=>'ð‘¥','ð‘¦'=>'ð‘¦','ð‘§'=>'ð‘§','ð‘¨'=>'ð‘¨','ð‘©'=>'ð‘©','ð‘ª'=>'ð‘ª','ð‘«'=>'ð‘«','ð‘¬'=>'ð‘¬','ð‘­'=>'ð‘­','ð‘®'=>'ð‘®','ð‘¯'=>'ð‘¯','ð‘°'=>'ð‘°','ð‘±'=>'ð‘±','ð‘²'=>'ð‘²','ð‘³'=>'ð‘³','ð‘´'=>'ð‘´','ð‘µ'=>'ð‘µ','ð‘¶'=>'ð‘¶','ð‘·'=>'ð‘·','ð‘¸'=>'ð‘¸','ð‘¹'=>'ð‘¹','ð‘º'=>'ð‘º','ð‘»'=>'ð‘»','ð‘¼'=>'ð‘¼','ð‘½'=>'ð‘½','ð‘¾'=>'ð‘¾','ð‘¿'=>'ð‘¿','ð’€'=>'ð’€','ð’'=>'ð’','ð’‚'=>'ð’‚','ð’ƒ'=>'ð’ƒ','ð’„'=>'ð’„','ð’…'=>'ð’…','ð’†'=>'ð’†','ð’‡'=>'ð’‡','ð’ˆ'=>'ð’ˆ','ð’‰'=>'ð’‰','ð’Š'=>'ð’Š','ð’‹'=>'ð’‹','ð’Œ'=>'ð’Œ','ð’'=>'ð’','ð’Ž'=>'ð’Ž','ð’'=>'ð’','ð’'=>'ð’','ð’‘'=>'ð’‘','ð’’'=>'ð’’','ð’“'=>'ð’“','ð’”'=>'ð’”','ð’•'=>'ð’•','ð’–'=>'ð’–','ð’—'=>'ð’—','ð’˜'=>'ð’˜','ð’™'=>'ð’™','ð’š'=>'ð’š','ð’›'=>'ð’›','ð’œ'=>'ð’œ','ð’ž'=>'ð’ž','ð’Ÿ'=>'ð’Ÿ','ð’¢'=>'ð’¢','ð’¥'=>'ð’¥','ð’¦'=>'ð’¦','ð’©'=>'ð’©','ð’ª'=>'ð’ª','ð’«'=>'ð’«','ð’¬'=>'ð’¬','ð’®'=>'ð’®','ð’¯'=>'ð’¯','ð’°'=>'ð’°','ð’±'=>'ð’±','ð’²'=>'ð’²','ð’³'=>'ð’³','ð’´'=>'ð’´','ð’µ'=>'ð’µ','ð’¶'=>'ð’¶','ð’·'=>'ð’·','ð’¸'=>'ð’¸','ð’¹'=>'ð’¹','ð’»'=>'ð’»','ð’½'=>'ð’½','ð’¾'=>'ð’¾','ð’¿'=>'ð’¿','ð“€'=>'ð“€','ð“'=>'ð“','ð“‚'=>'ð“‚','ð“ƒ'=>'ð“ƒ','ð“…'=>'ð“…','ð“†'=>'ð“†','ð“‡'=>'ð“‡','ð“ˆ'=>'ð“ˆ','ð“‰'=>'ð“‰','ð“Š'=>'ð“Š','ð“‹'=>'ð“‹','ð“Œ'=>'ð“Œ','ð“'=>'ð“','ð“Ž'=>'ð“Ž','ð“'=>'ð“','ð“'=>'ð“','ð“‘'=>'ð“‘','ð“’'=>'ð“’','ð““'=>'ð““','ð“”'=>'ð“”','ð“•'=>'ð“•','ð“–'=>'ð“–','ð“—'=>'ð“—','ð“˜'=>'ð“˜','ð“™'=>'ð“™','ð“š'=>'ð“š','ð“›'=>'ð“›','ð“œ'=>'ð“œ','ð“'=>'ð“','ð“ž'=>'ð“ž','ð“Ÿ'=>'ð“Ÿ','ð“ '=>'ð“ ','ð“¡'=>'ð“¡','ð“¢'=>'ð“¢','ð“£'=>'ð“£','ð“¤'=>'ð“¤','ð“¥'=>'ð“¥','ð“¦'=>'ð“¦','ð“§'=>'ð“§','ð“¨'=>'ð“¨','ð“©'=>'ð“©','ð“ª'=>'ð“ª','ð“«'=>'ð“«','ð“¬'=>'ð“¬','ð“­'=>'ð“­','ð“®'=>'ð“®','ð“¯'=>'ð“¯','ð“°'=>'ð“°','ð“±'=>'ð“±','ð“²'=>'ð“²','ð“³'=>'ð“³','ð“´'=>'ð“´','ð“µ'=>'ð“µ','ð“¶'=>'ð“¶','ð“·'=>'ð“·','ð“¸'=>'ð“¸','ð“¹'=>'ð“¹','ð“º'=>'ð“º','ð“»'=>'ð“»','ð“¼'=>'ð“¼','ð“½'=>'ð“½','ð“¾'=>'ð“¾','ð“¿'=>'ð“¿','ð”€'=>'ð”€','ð”'=>'ð”','ð”‚'=>'ð”‚','ð”ƒ'=>'ð”ƒ','ð”„'=>'ð”„','ð”…'=>'ð”…','ð”‡'=>'ð”‡','ð”ˆ'=>'ð”ˆ','ð”‰'=>'ð”‰','ð”Š'=>'ð”Š','ð”'=>'ð”','ð”Ž'=>'ð”Ž','ð”'=>'ð”','ð”'=>'ð”','ð”‘'=>'ð”‘','ð”’'=>'ð”’','ð”“'=>'ð”“','ð””'=>'ð””','ð”–'=>'ð”–','ð”—'=>'ð”—','ð”˜'=>'ð”˜','ð”™'=>'ð”™','ð”š'=>'ð”š','ð”›'=>'ð”›','ð”œ'=>'ð”œ','ð”ž'=>'ð”ž','ð”Ÿ'=>'ð”Ÿ','ð” '=>'ð” ','ð”¡'=>'ð”¡','ð”¢'=>'ð”¢','ð”£'=>'ð”£','ð”¤'=>'ð”¤','ð”¥'=>'ð”¥','ð”¦'=>'ð”¦','ð”§'=>'ð”§','ð”¨'=>'ð”¨','ð”©'=>'ð”©','ð”ª'=>'ð”ª','ð”«'=>'ð”«','ð”¬'=>'ð”¬','ð”­'=>'ð”­','ð”®'=>'ð”®','ð”¯'=>'ð”¯','ð”°'=>'ð”°','ð”±'=>'ð”±','ð”²'=>'ð”²','ð”³'=>'ð”³','ð”´'=>'ð”´','ð”µ'=>'ð”µ','ð”¶'=>'ð”¶','ð”·'=>'ð”·','ð”¸'=>'ð”¸','ð”¹'=>'ð”¹','ð”»'=>'ð”»','ð”¼'=>'ð”¼','ð”½'=>'ð”½','ð”¾'=>'ð”¾','ð•€'=>'ð•€','ð•'=>'ð•','ð•‚'=>'ð•‚','ð•ƒ'=>'ð•ƒ','ð•„'=>'ð•„','ð•†'=>'ð•†','ð•Š'=>'ð•Š','ð•‹'=>'ð•‹','ð•Œ'=>'ð•Œ','ð•'=>'ð•','ð•Ž'=>'ð•Ž','ð•'=>'ð•','ð•'=>'ð•','ð•’'=>'ð•’','ð•“'=>'ð•“','ð•”'=>'ð•”','ð••'=>'ð••','ð•–'=>'ð•–','ð•—'=>'ð•—','ð•˜'=>'ð•˜','ð•™'=>'ð•™','ð•š'=>'ð•š','ð•›'=>'ð•›','ð•œ'=>'ð•œ','ð•'=>'ð•','ð•ž'=>'ð•ž','ð•Ÿ'=>'ð•Ÿ','ð• '=>'ð• ','ð•¡'=>'ð•¡','ð•¢'=>'ð•¢','ð•£'=>'ð•£','ð•¤'=>'ð•¤','ð•¥'=>'ð•¥','ð•¦'=>'ð•¦','ð•§'=>'ð•§','ð•¨'=>'ð•¨','ð•©'=>'ð•©','ð•ª'=>'ð•ª','ð•«'=>'ð•«','ð•¬'=>'ð•¬','ð•­'=>'ð•­','ð•®'=>'ð•®','ð•¯'=>'ð•¯','ð•°'=>'ð•°','ð•±'=>'ð•±','ð•²'=>'ð•²','ð•³'=>'ð•³','ð•´'=>'ð•´','ð•µ'=>'ð•µ','ð•¶'=>'ð•¶','ð•·'=>'ð•·','ð•¸'=>'ð•¸','ð•¹'=>'ð•¹','ð•º'=>'ð•º','ð•»'=>'ð•»','ð•¼'=>'ð•¼','ð•½'=>'ð•½','ð•¾'=>'ð•¾','ð•¿'=>'ð•¿','ð–€'=>'ð–€','ð–'=>'ð–','ð–‚'=>'ð–‚','ð–ƒ'=>'ð–ƒ','ð–„'=>'ð–„','ð–…'=>'ð–…','ð–†'=>'ð–†','ð–‡'=>'ð–‡','ð–ˆ'=>'ð–ˆ','ð–‰'=>'ð–‰','ð–Š'=>'ð–Š','ð–‹'=>'ð–‹','ð–Œ'=>'ð–Œ','ð–'=>'ð–','ð–Ž'=>'ð–Ž','ð–'=>'ð–','ð–'=>'ð–','ð–‘'=>'ð–‘','ð–’'=>'ð–’','ð–“'=>'ð–“','ð–”'=>'ð–”','ð–•'=>'ð–•','ð––'=>'ð––','ð–—'=>'ð–—','ð–˜'=>'ð–˜','ð–™'=>'ð–™','ð–š'=>'ð–š','ð–›'=>'ð–›','ð–œ'=>'ð–œ','ð–'=>'ð–','ð–ž'=>'ð–ž','ð–Ÿ'=>'ð–Ÿ','ð– '=>'ð– ','ð–¡'=>'ð–¡','ð–¢'=>'ð–¢','ð–£'=>'ð–£','ð–¤'=>'ð–¤','ð–¥'=>'ð–¥','ð–¦'=>'ð–¦','ð–§'=>'ð–§','ð–¨'=>'ð–¨','ð–©'=>'ð–©','ð–ª'=>'ð–ª','ð–«'=>'ð–«','ð–¬'=>'ð–¬','ð–­'=>'ð–­','ð–®'=>'ð–®','ð–¯'=>'ð–¯','ð–°'=>'ð–°','ð–±'=>'ð–±','ð–²'=>'ð–²','ð–³'=>'ð–³','ð–´'=>'ð–´','ð–µ'=>'ð–µ','ð–¶'=>'ð–¶','ð–·'=>'ð–·','ð–¸'=>'ð–¸','ð–¹'=>'ð–¹','ð–º'=>'ð–º','ð–»'=>'ð–»','ð–¼'=>'ð–¼','ð–½'=>'ð–½','ð–¾'=>'ð–¾','ð–¿'=>'ð–¿','ð—€'=>'ð—€','ð—'=>'ð—','ð—‚'=>'ð—‚','ð—ƒ'=>'ð—ƒ','ð—„'=>'ð—„','ð—…'=>'ð—…','ð—†'=>'ð—†','ð—‡'=>'ð—‡','ð—ˆ'=>'ð—ˆ','ð—‰'=>'ð—‰','ð—Š'=>'ð—Š','ð—‹'=>'ð—‹','ð—Œ'=>'ð—Œ','ð—'=>'ð—','ð—Ž'=>'ð—Ž','ð—'=>'ð—','ð—'=>'ð—','ð—‘'=>'ð—‘','ð—’'=>'ð—’','ð—“'=>'ð—“','ð—”'=>'ð—”','ð—•'=>'ð—•','ð—–'=>'ð—–','ð——'=>'ð——','ð—˜'=>'ð—˜','ð—™'=>'ð—™','ð—š'=>'ð—š','ð—›'=>'ð—›','ð—œ'=>'ð—œ','ð—'=>'ð—','ð—ž'=>'ð—ž','ð—Ÿ'=>'ð—Ÿ','ð— '=>'ð— ','ð—¡'=>'ð—¡','ð—¢'=>'ð—¢','ð—£'=>'ð—£','ð—¤'=>'ð—¤','ð—¥'=>'ð—¥','ð—¦'=>'ð—¦','ð—§'=>'ð—§','ð—¨'=>'ð—¨','ð—©'=>'ð—©','ð—ª'=>'ð—ª','ð—«'=>'ð—«','ð—¬'=>'ð—¬','ð—­'=>'ð—­','ð—®'=>'ð—®','ð—¯'=>'ð—¯','ð—°'=>'ð—°','ð—±'=>'ð—±','ð—²'=>'ð—²','ð—³'=>'ð—³','ð—´'=>'ð—´','ð—µ'=>'ð—µ','ð—¶'=>'ð—¶','ð—·'=>'ð—·','ð—¸'=>'ð—¸','ð—¹'=>'ð—¹','ð—º'=>'ð—º','ð—»'=>'ð—»','ð—¼'=>'ð—¼','ð—½'=>'ð—½','ð—¾'=>'ð—¾','ð—¿'=>'ð—¿','ð˜€'=>'ð˜€','ð˜'=>'ð˜','ð˜‚'=>'ð˜‚','ð˜ƒ'=>'ð˜ƒ','ð˜„'=>'ð˜„','ð˜…'=>'ð˜…','ð˜†'=>'ð˜†','ð˜‡'=>'ð˜‡','ð˜ˆ'=>'ð˜ˆ','ð˜‰'=>'ð˜‰','ð˜Š'=>'ð˜Š','ð˜‹'=>'ð˜‹','ð˜Œ'=>'ð˜Œ','ð˜'=>'ð˜','ð˜Ž'=>'ð˜Ž','ð˜'=>'ð˜','ð˜'=>'ð˜','ð˜‘'=>'ð˜‘','ð˜’'=>'ð˜’','ð˜“'=>'ð˜“','ð˜”'=>'ð˜”','ð˜•'=>'ð˜•','ð˜–'=>'ð˜–','ð˜—'=>'ð˜—','ð˜˜'=>'ð˜˜','ð˜™'=>'ð˜™','ð˜š'=>'ð˜š','ð˜›'=>'ð˜›','ð˜œ'=>'ð˜œ','ð˜'=>'ð˜','ð˜ž'=>'ð˜ž','ð˜Ÿ'=>'ð˜Ÿ','ð˜ '=>'ð˜ ','ð˜¡'=>'ð˜¡','ð˜¢'=>'ð˜¢','ð˜£'=>'ð˜£','ð˜¤'=>'ð˜¤','ð˜¥'=>'ð˜¥','ð˜¦'=>'ð˜¦','ð˜§'=>'ð˜§','ð˜¨'=>'ð˜¨','ð˜©'=>'ð˜©','ð˜ª'=>'ð˜ª','ð˜«'=>'ð˜«','ð˜¬'=>'ð˜¬','ð˜­'=>'ð˜­','ð˜®'=>'ð˜®','ð˜¯'=>'ð˜¯','ð˜°'=>'ð˜°','ð˜±'=>'ð˜±','ð˜²'=>'ð˜²','ð˜³'=>'ð˜³','ð˜´'=>'ð˜´','ð˜µ'=>'ð˜µ','ð˜¶'=>'ð˜¶','ð˜·'=>'ð˜·','ð˜¸'=>'ð˜¸','ð˜¹'=>'ð˜¹','ð˜º'=>'ð˜º','ð˜»'=>'ð˜»','ð˜¼'=>'ð˜¼','ð˜½'=>'ð˜½','ð˜¾'=>'ð˜¾','ð˜¿'=>'ð˜¿','ð™€'=>'ð™€','ð™'=>'ð™','ð™‚'=>'ð™‚','ð™ƒ'=>'ð™ƒ','ð™„'=>'ð™„','ð™…'=>'ð™…','ð™†'=>'ð™†','ð™‡'=>'ð™‡','ð™ˆ'=>'ð™ˆ','ð™‰'=>'ð™‰','ð™Š'=>'ð™Š','ð™‹'=>'ð™‹','ð™Œ'=>'ð™Œ','ð™'=>'ð™','ð™Ž'=>'ð™Ž','ð™'=>'ð™','ð™'=>'ð™','ð™‘'=>'ð™‘','ð™’'=>'ð™’','ð™“'=>'ð™“','ð™”'=>'ð™”','ð™•'=>'ð™•','ð™–'=>'ð™–','ð™—'=>'ð™—','ð™˜'=>'ð™˜','ð™™'=>'ð™™','ð™š'=>'ð™š','ð™›'=>'ð™›','ð™œ'=>'ð™œ','ð™'=>'ð™','ð™ž'=>'ð™ž','ð™Ÿ'=>'ð™Ÿ','ð™ '=>'ð™ ','ð™¡'=>'ð™¡','ð™¢'=>'ð™¢','ð™£'=>'ð™£','ð™¤'=>'ð™¤','ð™¥'=>'ð™¥','ð™¦'=>'ð™¦','ð™§'=>'ð™§','ð™¨'=>'ð™¨','ð™©'=>'ð™©','ð™ª'=>'ð™ª','ð™«'=>'ð™«','ð™¬'=>'ð™¬','ð™­'=>'ð™­','ð™®'=>'ð™®','ð™¯'=>'ð™¯','ð™°'=>'ð™°','ð™±'=>'ð™±','ð™²'=>'ð™²','ð™³'=>'ð™³','ð™´'=>'ð™´','ð™µ'=>'ð™µ','ð™¶'=>'ð™¶','ð™·'=>'ð™·','ð™¸'=>'ð™¸','ð™¹'=>'ð™¹','ð™º'=>'ð™º','ð™»'=>'ð™»','ð™¼'=>'ð™¼','ð™½'=>'ð™½','ð™¾'=>'ð™¾','ð™¿'=>'ð™¿','ðš€'=>'ðš€','ðš'=>'ðš','ðš‚'=>'ðš‚','ðšƒ'=>'ðšƒ','ðš„'=>'ðš„','ðš…'=>'ðš…','ðš†'=>'ðš†','ðš‡'=>'ðš‡','ðšˆ'=>'ðšˆ','ðš‰'=>'ðš‰','ðšŠ'=>'ðšŠ','ðš‹'=>'ðš‹','ðšŒ'=>'ðšŒ','ðš'=>'ðš','ðšŽ'=>'ðšŽ','ðš'=>'ðš','ðš'=>'ðš','ðš‘'=>'ðš‘','ðš’'=>'ðš’','ðš“'=>'ðš“','ðš”'=>'ðš”','ðš•'=>'ðš•','ðš–'=>'ðš–','ðš—'=>'ðš—','ðš˜'=>'ðš˜','ðš™'=>'ðš™','ðšš'=>'ðšš','ðš›'=>'ðš›','ðšœ'=>'ðšœ','ðš'=>'ðš','ðšž'=>'ðšž','ðšŸ'=>'ðšŸ','ðš '=>'ðš ','ðš¡'=>'ðš¡','ðš¢'=>'ðš¢','ðš£'=>'ðš£','ðš¤'=>'ðš¤','ðš¥'=>'ðš¥','ðš¨'=>'ðš¨','ðš©'=>'ðš©','ðšª'=>'ðšª','ðš«'=>'ðš«','ðš¬'=>'ðš¬','ðš­'=>'ðš­','ðš®'=>'ðš®','ðš¯'=>'ðš¯','ðš°'=>'ðš°','ðš±'=>'ðš±','ðš²'=>'ðš²','ðš³'=>'ðš³','ðš´'=>'ðš´','ðšµ'=>'ðšµ','ðš¶'=>'ðš¶','ðš·'=>'ðš·','ðš¸'=>'ðš¸','ðš¹'=>'ðš¹','ðšº'=>'ðšº','ðš»'=>'ðš»','ðš¼'=>'ðš¼','ðš½'=>'ðš½','ðš¾'=>'ðš¾','ðš¿'=>'ðš¿','ð›€'=>'ð›€','ð›‚'=>'ð›‚','ð›ƒ'=>'ð›ƒ','ð›„'=>'ð›„','ð›…'=>'ð›…','ð›†'=>'ð›†','ð›‡'=>'ð›‡','ð›ˆ'=>'ð›ˆ','ð›‰'=>'ð›‰','ð›Š'=>'ð›Š','ð›‹'=>'ð›‹','ð›Œ'=>'ð›Œ','ð›'=>'ð›','ð›Ž'=>'ð›Ž','ð›'=>'ð›','ð›'=>'ð›','ð›‘'=>'ð›‘','ð›’'=>'ð›’','ð›“'=>'ð›“','ð›”'=>'ð›”','ð›•'=>'ð›•','ð›–'=>'ð›–','ð›—'=>'ð›—','ð›˜'=>'ð›˜','ð›™'=>'ð›™','ð›š'=>'ð›š','ð›œ'=>'ð›œ','ð›'=>'ð›','ð›ž'=>'ð›ž','ð›Ÿ'=>'ð›Ÿ','ð› '=>'ð› ','ð›¡'=>'ð›¡','ð›¢'=>'ð›¢','ð›£'=>'ð›£','ð›¤'=>'ð›¤','ð›¥'=>'ð›¥','ð›¦'=>'ð›¦','ð›§'=>'ð›§','ð›¨'=>'ð›¨','ð›©'=>'ð›©','ð›ª'=>'ð›ª','ð›«'=>'ð›«','ð›¬'=>'ð›¬','ð›­'=>'ð›­','ð›®'=>'ð›®','ð›¯'=>'ð›¯','ð›°'=>'ð›°','ð›±'=>'ð›±','ð›²'=>'ð›²','ð›³'=>'ð›³','ð›´'=>'ð›´','ð›µ'=>'ð›µ','ð›¶'=>'ð›¶','ð›·'=>'ð›·','ð›¸'=>'ð›¸','ð›¹'=>'ð›¹','ð›º'=>'ð›º','ð›¼'=>'ð›¼','ð›½'=>'ð›½','ð›¾'=>'ð›¾','ð›¿'=>'ð›¿','ðœ€'=>'ðœ€','ðœ'=>'ðœ','ðœ‚'=>'ðœ‚','ðœƒ'=>'ðœƒ','ðœ„'=>'ðœ„','ðœ…'=>'ðœ…','ðœ†'=>'ðœ†','ðœ‡'=>'ðœ‡','ðœˆ'=>'ðœˆ','ðœ‰'=>'ðœ‰','ðœŠ'=>'ðœŠ','ðœ‹'=>'ðœ‹','ðœŒ'=>'ðœŒ','ðœ'=>'ðœ','ðœŽ'=>'ðœŽ','ðœ'=>'ðœ','ðœ'=>'ðœ','ðœ‘'=>'ðœ‘','ðœ’'=>'ðœ’','ðœ“'=>'ðœ“','ðœ”'=>'ðœ”','ðœ–'=>'ðœ–','ðœ—'=>'ðœ—','ðœ˜'=>'ðœ˜','ðœ™'=>'ðœ™','ðœš'=>'ðœš','ðœ›'=>'ðœ›','ðœœ'=>'ðœœ','ðœ'=>'ðœ','ðœž'=>'ðœž','ðœŸ'=>'ðœŸ','ðœ '=>'ðœ ','ðœ¡'=>'ðœ¡','ðœ¢'=>'ðœ¢','ðœ£'=>'ðœ£','ðœ¤'=>'ðœ¤','ðœ¥'=>'ðœ¥','ðœ¦'=>'ðœ¦','ðœ§'=>'ðœ§','ðœ¨'=>'ðœ¨','ðœ©'=>'ðœ©','ðœª'=>'ðœª','ðœ«'=>'ðœ«','ðœ¬'=>'ðœ¬','ðœ­'=>'ðœ­','ðœ®'=>'ðœ®','ðœ¯'=>'ðœ¯','ðœ°'=>'ðœ°','ðœ±'=>'ðœ±','ðœ²'=>'ðœ²','ðœ³'=>'ðœ³','ðœ´'=>'ðœ´','ðœ¶'=>'ðœ¶','ðœ·'=>'ðœ·','ðœ¸'=>'ðœ¸','ðœ¹'=>'ðœ¹','ðœº'=>'ðœº','ðœ»'=>'ðœ»','ðœ¼'=>'ðœ¼','ðœ½'=>'ðœ½','ðœ¾'=>'ðœ¾','ðœ¿'=>'ðœ¿','ð€'=>'ð€','ð'=>'ð','ð‚'=>'ð‚','ðƒ'=>'ðƒ','ð„'=>'ð„','ð…'=>'ð…','ð†'=>'ð†','ð‡'=>'ð‡','ðˆ'=>'ðˆ','ð‰'=>'ð‰','ðŠ'=>'ðŠ','ð‹'=>'ð‹','ðŒ'=>'ðŒ','ð'=>'ð','ðŽ'=>'ðŽ','ð'=>'ð','ð‘'=>'ð‘','ð’'=>'ð’','ð“'=>'ð“','ð”'=>'ð”','ð•'=>'ð•','ð–'=>'ð–','ð—'=>'ð—','ð˜'=>'ð˜','ð™'=>'ð™','ðš'=>'ðš','ð›'=>'ð›','ðœ'=>'ðœ','ð'=>'ð','ðž'=>'ðž','ðŸ'=>'ðŸ','ð '=>'ð ','ð¡'=>'ð¡','ð¢'=>'ð¢','ð£'=>'ð£','ð¤'=>'ð¤','ð¥'=>'ð¥','ð¦'=>'ð¦','ð§'=>'ð§','ð¨'=>'ð¨','ð©'=>'ð©','ðª'=>'ðª','ð«'=>'ð«','ð¬'=>'ð¬','ð­'=>'ð­','ð®'=>'ð®','ð°'=>'ð°','ð±'=>'ð±','ð²'=>'ð²','ð³'=>'ð³','ð´'=>'ð´','ðµ'=>'ðµ','ð¶'=>'ð¶','ð·'=>'ð·','ð¸'=>'ð¸','ð¹'=>'ð¹','ðº'=>'ðº','ð»'=>'ð»','ð¼'=>'ð¼','ð½'=>'ð½','ð¾'=>'ð¾','ð¿'=>'ð¿','ðž€'=>'ðž€','ðž'=>'ðž','ðž‚'=>'ðž‚','ðžƒ'=>'ðžƒ','ðž„'=>'ðž„','ðž…'=>'ðž…','ðž†'=>'ðž†','ðž‡'=>'ðž‡','ðžˆ'=>'ðžˆ','ðžŠ'=>'ðžŠ','ðž‹'=>'ðž‹','ðžŒ'=>'ðžŒ','ðž'=>'ðž','ðžŽ'=>'ðžŽ','ðž'=>'ðž','ðž'=>'ðž','ðž‘'=>'ðž‘','ðž’'=>'ðž’','ðž“'=>'ðž“','ðž”'=>'ðž”','ðž•'=>'ðž•','ðž–'=>'ðž–','ðž—'=>'ðž—','ðž˜'=>'ðž˜','ðž™'=>'ðž™','ðžš'=>'ðžš','ðž›'=>'ðž›','ðžœ'=>'ðžœ','ðž'=>'ðž','ðžž'=>'ðžž','ðžŸ'=>'ðžŸ','ðž '=>'ðž ','ðž¡'=>'ðž¡','ðž¢'=>'ðž¢','ðž£'=>'ðž£','ðž¤'=>'ðž¤','ðž¥'=>'ðž¥','ðž¦'=>'ðž¦','ðž§'=>'ðž§','ðž¨'=>'ðž¨','ðžª'=>'ðžª','ðž«'=>'ðž«','ðž¬'=>'ðž¬','ðž­'=>'ðž­','ðž®'=>'ðž®','ðž¯'=>'ðž¯','ðž°'=>'ðž°','ðž±'=>'ðž±','ðž²'=>'ðž²','ðž³'=>'ðž³','ðž´'=>'ðž´','ðžµ'=>'ðžµ','ðž¶'=>'ðž¶','ðž·'=>'ðž·','ðž¸'=>'ðž¸','ðž¹'=>'ðž¹','ðžº'=>'ðžº','ðž»'=>'ðž»','ðž¼'=>'ðž¼','ðž½'=>'ðž½','ðž¾'=>'ðž¾','ðž¿'=>'ðž¿','ðŸ€'=>'ðŸ€','ðŸ'=>'ðŸ','ðŸ‚'=>'ðŸ‚','ðŸ„'=>'ðŸ„','ðŸ…'=>'ðŸ…','ðŸ†'=>'ðŸ†','ðŸ‡'=>'ðŸ‡','ðŸˆ'=>'ðŸˆ','ðŸ‰'=>'ðŸ‰','ðŸŠ'=>'ðŸŠ','ðŸ‹'=>'ðŸ‹','ðŸŽ'=>'0','ðŸ'=>'1','ðŸ'=>'2','ðŸ‘'=>'3','ðŸ’'=>'4','ðŸ“'=>'5','ðŸ”'=>'6','ðŸ•'=>'7','ðŸ–'=>'8','ðŸ—'=>'9','ðŸ˜'=>'0','ðŸ™'=>'1','ðŸš'=>'2','ðŸ›'=>'3','ðŸœ'=>'4','ðŸ'=>'5','ðŸž'=>'6','ðŸŸ'=>'7','ðŸ '=>'8','ðŸ¡'=>'9','ðŸ¢'=>'0','ðŸ£'=>'1','ðŸ¤'=>'2','ðŸ¥'=>'3','ðŸ¦'=>'4','ðŸ§'=>'5','ðŸ¨'=>'6','ðŸ©'=>'7','ðŸª'=>'8','ðŸ«'=>'9','ðŸ¬'=>'0','ðŸ­'=>'1','ðŸ®'=>'2','ðŸ¯'=>'3','ðŸ°'=>'4','ðŸ±'=>'5','ðŸ²'=>'6','ðŸ³'=>'7','ðŸ´'=>'8','ðŸµ'=>'9','ðŸ¶'=>'0','ðŸ·'=>'1','ðŸ¸'=>'2','ðŸ¹'=>'3','ðŸº'=>'4','ðŸ»'=>'5','ðŸ¼'=>'6','ðŸ½'=>'7','ðŸ¾'=>'8','ðŸ¿'=>'9'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_6.php b/phpBB/includes/utf/data/search_indexer_6.php
new file mode 100644
index 0000000000..f6d2ac0665
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_6.php
@@ -0,0 +1 @@
+<?php return array('々'=>'々','〆'=>'〆','〇'=>'0','〡'=>'1','〢'=>'2','〣'=>'3','〤'=>'4','〥'=>'5','〦'=>'6','〧'=>'7','〨'=>'8','〩'=>'9','〪'=>'〪','〫'=>'〫','〬'=>'〬','〭'=>'〭','〮'=>'〮','〯'=>'〯','〱'=>'〱','〲'=>'〲','〳'=>'〳','〴'=>'〴','〵'=>'〵','〸'=>'10','〹'=>'20','〺'=>'30','〻'=>'〻','〼'=>'〼','ã'=>'ã','ã‚'=>'ã‚','ãƒ'=>'ãƒ','ã„'=>'ã„','ã…'=>'ã…','ã†'=>'ã†','ã‡'=>'ã‡','ãˆ'=>'ãˆ','ã‰'=>'ã‰','ãŠ'=>'ãŠ','ã‹'=>'ã‹','ãŒ'=>'ãŒ','ã'=>'ã','ãŽ'=>'ãŽ','ã'=>'ã','ã'=>'ã','ã‘'=>'ã‘','ã’'=>'ã’','ã“'=>'ã“','ã”'=>'ã”','ã•'=>'ã•','ã–'=>'ã–','ã—'=>'ã—','ã˜'=>'ã˜','ã™'=>'ã™','ãš'=>'ãš','ã›'=>'ã›','ãœ'=>'ãœ','ã'=>'ã','ãž'=>'ãž','ãŸ'=>'ãŸ','ã '=>'ã ','ã¡'=>'ã¡','ã¢'=>'ã¢','ã£'=>'ã£','ã¤'=>'ã¤','ã¥'=>'ã¥','ã¦'=>'ã¦','ã§'=>'ã§','ã¨'=>'ã¨','ã©'=>'ã©','ãª'=>'ãª','ã«'=>'ã«','ã¬'=>'ã¬','ã­'=>'ã­','ã®'=>'ã®','ã¯'=>'ã¯','ã°'=>'ã°','ã±'=>'ã±','ã²'=>'ã²','ã³'=>'ã³','ã´'=>'ã´','ãµ'=>'ãµ','ã¶'=>'ã¶','ã·'=>'ã·','ã¸'=>'ã¸','ã¹'=>'ã¹','ãº'=>'ãº','ã»'=>'ã»','ã¼'=>'ã¼','ã½'=>'ã½','ã¾'=>'ã¾','ã¿'=>'ã¿','ã‚€'=>'ã‚€','ã‚'=>'ã‚','ã‚‚'=>'ã‚‚','ゃ'=>'ゃ','ã‚„'=>'ã‚„','ã‚…'=>'ã‚…','ゆ'=>'ゆ','ょ'=>'ょ','よ'=>'よ','ら'=>'ら','ã‚Š'=>'ã‚Š','ã‚‹'=>'ã‚‹','ã‚Œ'=>'ã‚Œ','ã‚'=>'ã‚','ã‚Ž'=>'ã‚Ž','ã‚'=>'ã‚','ã‚'=>'ã‚','ã‚‘'=>'ã‚‘','ã‚’'=>'ã‚’','ã‚“'=>'ã‚“','ã‚”'=>'ã‚”','ã‚•'=>'ã‚•','ã‚–'=>'ã‚–','ã‚™'=>'ã‚™','ã‚š'=>'ã‚š','ã‚'=>'ã‚','ã‚ž'=>'ã‚ž','ã‚Ÿ'=>'ã‚Ÿ','ã‚¡'=>'ã‚¡','ã‚¢'=>'ã‚¢','ã‚£'=>'ã‚£','イ'=>'イ','ã‚¥'=>'ã‚¥','ウ'=>'ウ','ェ'=>'ェ','エ'=>'エ','ã‚©'=>'ã‚©','オ'=>'オ','ã‚«'=>'ã‚«','ガ'=>'ガ','ã‚­'=>'ã‚­','ã‚®'=>'ã‚®','ク'=>'ク','ã‚°'=>'ã‚°','ケ'=>'ケ','ゲ'=>'ゲ','コ'=>'コ','ã‚´'=>'ã‚´','サ'=>'サ','ザ'=>'ザ','ã‚·'=>'ã‚·','ジ'=>'ジ','ス'=>'ス','ズ'=>'ズ','ã‚»'=>'ã‚»','ゼ'=>'ゼ','ソ'=>'ソ','ゾ'=>'ゾ','ã‚¿'=>'ã‚¿','ダ'=>'ダ','ãƒ'=>'ãƒ','ヂ'=>'ヂ','ッ'=>'ッ','ツ'=>'ツ','ヅ'=>'ヅ','テ'=>'テ','デ'=>'デ','ト'=>'ト','ド'=>'ド','ナ'=>'ナ','ニ'=>'ニ','ヌ'=>'ヌ','ãƒ'=>'ãƒ','ノ'=>'ノ','ãƒ'=>'ãƒ','ãƒ'=>'ãƒ','パ'=>'パ','ヒ'=>'ヒ','ビ'=>'ビ','ピ'=>'ピ','フ'=>'フ','ブ'=>'ブ','プ'=>'プ','ヘ'=>'ヘ','ベ'=>'ベ','ペ'=>'ペ','ホ'=>'ホ','ボ'=>'ボ','ãƒ'=>'ãƒ','マ'=>'マ','ミ'=>'ミ','ム'=>'ム','メ'=>'メ','モ'=>'モ','ャ'=>'ャ','ヤ'=>'ヤ','ュ'=>'ュ','ユ'=>'ユ','ョ'=>'ョ','ヨ'=>'ヨ','ラ'=>'ラ','リ'=>'リ','ル'=>'ル','レ'=>'レ','ロ'=>'ロ','ヮ'=>'ヮ','ワ'=>'ワ','ヰ'=>'ヰ','ヱ'=>'ヱ','ヲ'=>'ヲ','ン'=>'ン','ヴ'=>'ヴ','ヵ'=>'ヵ','ヶ'=>'ヶ','ヷ'=>'ヷ','ヸ'=>'ヸ','ヹ'=>'ヹ','ヺ'=>'ヺ','ー'=>'ー','ヽ'=>'ヽ','ヾ'=>'ヾ','ヿ'=>'ヿ','ã„…'=>'ã„…','ㄆ'=>'ㄆ','ㄇ'=>'ㄇ','ㄈ'=>'ㄈ','ㄉ'=>'ㄉ','ã„Š'=>'ã„Š','ã„‹'=>'ã„‹','ã„Œ'=>'ã„Œ','ã„'=>'ã„','ã„Ž'=>'ã„Ž','ã„'=>'ã„','ã„'=>'ã„','ã„‘'=>'ã„‘','ã„’'=>'ã„’','ã„“'=>'ã„“','ã„”'=>'ã„”','ã„•'=>'ã„•','ã„–'=>'ã„–','ã„—'=>'ã„—','ㄘ'=>'ㄘ','ã„™'=>'ã„™','ã„š'=>'ã„š','ã„›'=>'ã„›','ã„œ'=>'ã„œ','ã„'=>'ã„','ã„ž'=>'ã„ž','ã„Ÿ'=>'ã„Ÿ','ã„ '=>'ã„ ','ã„¡'=>'ã„¡','ã„¢'=>'ã„¢','ã„£'=>'ã„£','ㄤ'=>'ㄤ','ã„¥'=>'ã„¥','ㄦ'=>'ㄦ','ㄧ'=>'ㄧ','ㄨ'=>'ㄨ','ã„©'=>'ã„©','ㄪ'=>'ㄪ','ã„«'=>'ã„«','ㄬ'=>'ㄬ','ㄱ'=>'ㄱ','ㄲ'=>'ㄲ','ㄳ'=>'ㄳ','ã„´'=>'ã„´','ㄵ'=>'ㄵ','ㄶ'=>'ㄶ','ã„·'=>'ã„·','ㄸ'=>'ㄸ','ㄹ'=>'ㄹ','ㄺ'=>'ㄺ','ã„»'=>'ã„»','ㄼ'=>'ㄼ','ㄽ'=>'ㄽ','ㄾ'=>'ㄾ','ã„¿'=>'ã„¿','ã…€'=>'ã…€','ã…'=>'ã…','ã…‚'=>'ã…‚','ã…ƒ'=>'ã…ƒ','ã…„'=>'ã…„','ã……'=>'ã……','ã…†'=>'ã…†','ã…‡'=>'ã…‡','ã…ˆ'=>'ã…ˆ','ã…‰'=>'ã…‰','ã…Š'=>'ã…Š','ã…‹'=>'ã…‹','ã…Œ'=>'ã…Œ','ã…'=>'ã…','ã…Ž'=>'ã…Ž','ã…'=>'ã…','ã…'=>'ã…','ã…‘'=>'ã…‘','ã…’'=>'ã…’','ã…“'=>'ã…“','ã…”'=>'ã…”','ã…•'=>'ã…•','ã…–'=>'ã…–','ã…—'=>'ã…—','ã…˜'=>'ã…˜','ã…™'=>'ã…™','ã…š'=>'ã…š','ã…›'=>'ã…›','ã…œ'=>'ã…œ','ã…'=>'ã…','ã…ž'=>'ã…ž','ã…Ÿ'=>'ã…Ÿ','ã… '=>'ã… ','ã…¡'=>'ã…¡','ã…¢'=>'ã…¢','ã…£'=>'ã…£','ã…¤'=>'ã…¤','ã…¥'=>'ã…¥','ã…¦'=>'ã…¦','ã…§'=>'ã…§','ã…¨'=>'ã…¨','ã…©'=>'ã…©','ã…ª'=>'ã…ª','ã…«'=>'ã…«','ã…¬'=>'ã…¬','ã…­'=>'ã…­','ã…®'=>'ã…®','ã…¯'=>'ã…¯','ã…°'=>'ã…°','ã…±'=>'ã…±','ã…²'=>'ã…²','ã…³'=>'ã…³','ã…´'=>'ã…´','ã…µ'=>'ã…µ','ã…¶'=>'ã…¶','ã…·'=>'ã…·','ã…¸'=>'ã…¸','ã…¹'=>'ã…¹','ã…º'=>'ã…º','ã…»'=>'ã…»','ã…¼'=>'ã…¼','ã…½'=>'ã…½','ã…¾'=>'ã…¾','ã…¿'=>'ã…¿','ㆀ'=>'ㆀ','ã†'=>'ã†','ㆂ'=>'ㆂ','ㆃ'=>'ㆃ','ㆄ'=>'ㆄ','ㆅ'=>'ㆅ','ㆆ'=>'ㆆ','ㆇ'=>'ㆇ','ㆈ'=>'ㆈ','ㆉ'=>'ㆉ','ㆊ'=>'ㆊ','ㆋ'=>'ㆋ','ㆌ'=>'ㆌ','ã†'=>'ã†','ㆎ'=>'ㆎ','㆒'=>'1','㆓'=>'2','㆔'=>'3','㆕'=>'4','ㆠ'=>'ㆠ','ㆡ'=>'ㆡ','ㆢ'=>'ㆢ','ㆣ'=>'ㆣ','ㆤ'=>'ㆤ','ㆥ'=>'ㆥ','ㆦ'=>'ㆦ','ㆧ'=>'ㆧ','ㆨ'=>'ㆨ','ㆩ'=>'ㆩ','ㆪ'=>'ㆪ','ㆫ'=>'ㆫ','ㆬ'=>'ㆬ','ㆭ'=>'ㆭ','ㆮ'=>'ㆮ','ㆯ'=>'ㆯ','ㆰ'=>'ㆰ','ㆱ'=>'ㆱ','ㆲ'=>'ㆲ','ㆳ'=>'ㆳ','ㆴ'=>'ㆴ','ㆵ'=>'ㆵ','ㆶ'=>'ㆶ','ㆷ'=>'ㆷ','ㇰ'=>'ㇰ','ㇱ'=>'ㇱ','ㇲ'=>'ㇲ','ㇳ'=>'ㇳ','ㇴ'=>'ㇴ','ㇵ'=>'ㇵ','ㇶ'=>'ㇶ','ㇷ'=>'ㇷ','ㇸ'=>'ㇸ','ㇹ'=>'ㇹ','ㇺ'=>'ㇺ','ㇻ'=>'ㇻ','ㇼ'=>'ㇼ','ㇽ'=>'ㇽ','ㇾ'=>'ㇾ','ㇿ'=>'ㇿ','㈠'=>'1','㈡'=>'2','㈢'=>'3','㈣'=>'4','㈤'=>'5','㈥'=>'6','㈦'=>'7','㈧'=>'8','㈨'=>'9','㈩'=>'10','㉑'=>'21','㉒'=>'22','㉓'=>'23','㉔'=>'24','㉕'=>'25','㉖'=>'26','㉗'=>'27','㉘'=>'28','㉙'=>'29','㉚'=>'30','㉛'=>'31','㉜'=>'32','ã‰'=>'33','㉞'=>'34','㉟'=>'35','㊀'=>'1','ãŠ'=>'2','㊂'=>'3','㊃'=>'4','㊄'=>'5','㊅'=>'6','㊆'=>'7','㊇'=>'8','㊈'=>'9','㊉'=>'10','㊱'=>'36','㊲'=>'37','㊳'=>'38','㊴'=>'39','㊵'=>'40','㊶'=>'41','㊷'=>'42','㊸'=>'43','㊹'=>'44','㊺'=>'45','㊻'=>'46','㊼'=>'47','㊽'=>'48','㊾'=>'49','㊿'=>'50','ã€'=>'ã€'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_64.php b/phpBB/includes/utf/data/search_indexer_64.php
new file mode 100644
index 0000000000..44d0beb624
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_64.php
@@ -0,0 +1 @@
+<?php return array('ð €€'=>'ð €€'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_84.php b/phpBB/includes/utf/data/search_indexer_84.php
new file mode 100644
index 0000000000..5c3f1d54b8
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_84.php
@@ -0,0 +1 @@
+<?php return array('𪛖'=>'𪛖'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_9.php b/phpBB/includes/utf/data/search_indexer_9.php
new file mode 100644
index 0000000000..bdf188291f
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_9.php
@@ -0,0 +1 @@
+<?php return array('䶵'=>'䶵','一'=>'一'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_95.php b/phpBB/includes/utf/data/search_indexer_95.php
new file mode 100644
index 0000000000..b0f8eed3aa
--- /dev/null
+++ b/phpBB/includes/utf/data/search_indexer_95.php
@@ -0,0 +1 @@
+<?php return array('丽'=>'丽','ð¯ '=>'ð¯ ','乁'=>'乁','𠄢'=>'𠄢','你'=>'你','侮'=>'侮','侻'=>'侻','倂'=>'倂','偺'=>'偺','備'=>'備','僧'=>'僧','像'=>'像','㒞'=>'㒞','ð¯ '=>'ð¯ ','免'=>'免','ð¯ '=>'ð¯ ','ð¯ '=>'ð¯ ','具'=>'具','𠔜'=>'𠔜','㒹'=>'㒹','內'=>'內','再'=>'再','𠕋'=>'𠕋','冗'=>'冗','冤'=>'冤','仌'=>'仌','冬'=>'冬','况'=>'况','𩇟'=>'𩇟','ð¯ '=>'ð¯ ','刃'=>'刃','㓟'=>'㓟','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','㔕'=>'㔕','勇'=>'勇','勉'=>'勉','勤'=>'勤','勺'=>'勺','包'=>'包','匆'=>'匆','北'=>'北','卉'=>'卉','卑'=>'卑','博'=>'博','即'=>'即','卽'=>'卽','卿'=>'卿','卿'=>'卿','卿'=>'卿','𠨬'=>'𠨬','灰'=>'灰','及'=>'及','叟'=>'叟','𠭣'=>'𠭣','叫'=>'叫','叱'=>'叱','吆'=>'吆','咞'=>'咞','吸'=>'吸','呈'=>'呈','周'=>'周','咢'=>'咢','ð¯¡'=>'ð¯¡','唐'=>'唐','啓'=>'啓','啣'=>'啣','善'=>'善','善'=>'善','喙'=>'喙','喫'=>'喫','喳'=>'喳','嗂'=>'嗂','圖'=>'圖','嘆'=>'嘆','ð¯¡'=>'ð¯¡','噑'=>'噑','ð¯¡'=>'ð¯¡','ð¯¡'=>'ð¯¡','壮'=>'壮','城'=>'城','埴'=>'埴','堍'=>'堍','型'=>'型','堲'=>'堲','報'=>'報','墬'=>'墬','𡓤'=>'𡓤','売'=>'売','壷'=>'壷','夆'=>'夆','ð¯¡'=>'ð¯¡','夢'=>'夢','奢'=>'奢','𡚨'=>'𡚨','𡛪'=>'𡛪','姬'=>'姬','娛'=>'娛','娧'=>'娧','姘'=>'姘','婦'=>'婦','㛮'=>'㛮','㛼'=>'㛼','嬈'=>'嬈','嬾'=>'嬾','嬾'=>'嬾','𡧈'=>'𡧈','寃'=>'寃','寘'=>'寘','寧'=>'寧','寳'=>'寳','𡬘'=>'𡬘','寿'=>'寿','将'=>'将','当'=>'当','尢'=>'尢','㞁'=>'㞁','屠'=>'屠','屮'=>'屮','峀'=>'峀','岍'=>'岍','𡷤'=>'𡷤','嵃'=>'嵃','𡷦'=>'𡷦','嵮'=>'嵮','嵫'=>'嵫','嵼'=>'嵼','ð¯¢'=>'ð¯¢','巢'=>'巢','㠯'=>'㠯','巽'=>'巽','帨'=>'帨','帽'=>'帽','幩'=>'幩','㡢'=>'㡢','𢆃'=>'𢆃','㡼'=>'㡼','庰'=>'庰','庳'=>'庳','ð¯¢'=>'ð¯¢','廊'=>'廊','ð¯¢'=>'ð¯¢','ð¯¢'=>'ð¯¢','𢌱'=>'𢌱','𢌱'=>'𢌱','舁'=>'舁','弢'=>'弢','弢'=>'弢','㣇'=>'㣇','𣊸'=>'𣊸','𦇚'=>'𦇚','形'=>'形','彫'=>'彫','㣣'=>'㣣','徚'=>'徚','ð¯¢'=>'ð¯¢','志'=>'志','忹'=>'忹','悁'=>'悁','㤺'=>'㤺','㤜'=>'㤜','悔'=>'悔','𢛔'=>'𢛔','惇'=>'惇','慈'=>'慈','慌'=>'慌','慎'=>'慎','慌'=>'慌','慺'=>'慺','憎'=>'憎','憲'=>'憲','憤'=>'憤','憯'=>'憯','懞'=>'懞','懲'=>'懲','懶'=>'懶','成'=>'成','戛'=>'戛','扝'=>'扝','抱'=>'抱','拔'=>'拔','捐'=>'捐','𢬌'=>'𢬌','挽'=>'挽','拼'=>'拼','捨'=>'捨','掃'=>'掃','揤'=>'揤','𢯱'=>'𢯱','搢'=>'搢','揅'=>'揅','ð¯£'=>'ð¯£','㨮'=>'㨮','摩'=>'摩','摾'=>'摾','撝'=>'撝','摷'=>'摷','㩬'=>'㩬','敏'=>'敏','敬'=>'敬','𣀊'=>'𣀊','旣'=>'旣','書'=>'書','ð¯£'=>'ð¯£','㬙'=>'㬙','ð¯£'=>'ð¯£','ð¯£'=>'ð¯£','㫤'=>'㫤','冒'=>'冒','冕'=>'冕','最'=>'最','暜'=>'暜','肭'=>'肭','䏙'=>'䏙','朗'=>'朗','望'=>'望','朡'=>'朡','杞'=>'杞','杓'=>'杓','ð¯£'=>'ð¯£','㭉'=>'㭉','柺'=>'柺','枅'=>'枅','桒'=>'桒','梅'=>'梅','𣑭'=>'𣑭','梎'=>'梎','栟'=>'栟','椔'=>'椔','㮝'=>'㮝','楂'=>'楂','榣'=>'榣','槪'=>'槪','檨'=>'檨','𣚣'=>'𣚣','櫛'=>'櫛','㰘'=>'㰘','次'=>'次','𣢧'=>'𣢧','歔'=>'歔','㱎'=>'㱎','歲'=>'歲','殟'=>'殟','殺'=>'殺','殻'=>'殻','𣪍'=>'𣪍','𡴋'=>'𡴋','𣫺'=>'𣫺','汎'=>'汎','𣲼'=>'𣲼','沿'=>'沿','泍'=>'泍','汧'=>'汧','洖'=>'洖','派'=>'派','ð¯¤'=>'ð¯¤','流'=>'流','浩'=>'浩','浸'=>'浸','涅'=>'涅','𣴞'=>'𣴞','洴'=>'洴','港'=>'港','湮'=>'湮','㴳'=>'㴳','滋'=>'滋','滇'=>'滇','ð¯¤'=>'ð¯¤','淹'=>'淹','ð¯¤'=>'ð¯¤','ð¯¤'=>'ð¯¤','𣾎'=>'𣾎','濆'=>'濆','瀹'=>'瀹','瀞'=>'瀞','瀛'=>'瀛','㶖'=>'㶖','灊'=>'灊','災'=>'災','灷'=>'灷','炭'=>'炭','𠔥'=>'𠔥','煅'=>'煅','ð¯¤'=>'ð¯¤','熜'=>'熜','𤎫'=>'𤎫','爨'=>'爨','爵'=>'爵','牐'=>'牐','𤘈'=>'𤘈','犀'=>'犀','犕'=>'犕','𤜵'=>'𤜵','𤠔'=>'𤠔','獺'=>'獺','王'=>'王','㺬'=>'㺬','玥'=>'玥','㺸'=>'㺸','㺸'=>'㺸','瑇'=>'瑇','瑜'=>'瑜','瑱'=>'瑱','璅'=>'璅','瓊'=>'瓊','㼛'=>'㼛','甤'=>'甤','𤰶'=>'𤰶','甾'=>'甾','𤲒'=>'𤲒','異'=>'異','𢆟'=>'𢆟','瘐'=>'瘐','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'𥁄','㿼'=>'㿼','䀈'=>'䀈','直'=>'直','ð¯¥'=>'ð¯¥','𥃲'=>'𥃲','𥄙'=>'𥄙','𥄳'=>'𥄳','眞'=>'眞','真'=>'真','真'=>'真','睊'=>'睊','䀹'=>'䀹','瞋'=>'瞋','䁆'=>'䁆','䂖'=>'䂖','ð¯¥'=>'ð¯¥','硎'=>'硎','ð¯¥'=>'ð¯¥','ð¯¥'=>'ð¯¥','䃣'=>'䃣','𥘦'=>'𥘦','祖'=>'祖','𥚚'=>'𥚚','𥛅'=>'𥛅','福'=>'福','秫'=>'秫','䄯'=>'䄯','穀'=>'穀','穊'=>'穊','穏'=>'穏','𥥼'=>'𥥼','ð¯¥'=>'ð¯¥','𥪧'=>'𥪧','竮'=>'竮','䈂'=>'䈂','𥮫'=>'𥮫','篆'=>'篆','築'=>'築','䈧'=>'䈧','𥲀'=>'𥲀','糒'=>'糒','䊠'=>'䊠','糨'=>'糨','糣'=>'糣','紀'=>'紀','𥾆'=>'𥾆','絣'=>'絣','䌁'=>'䌁','緇'=>'緇','縂'=>'縂','繅'=>'繅','䌴'=>'䌴','𦈨'=>'𦈨','𦉇'=>'𦉇','䍙'=>'䍙','𦋙'=>'𦋙','罺'=>'罺','𦌾'=>'𦌾','羕'=>'羕','翺'=>'翺','者'=>'者','𦓚'=>'𦓚','𦔣'=>'𦔣','聠'=>'聠','𦖨'=>'𦖨','聰'=>'聰','𣍟'=>'𣍟','ð¯¦'=>'ð¯¦','育'=>'育','脃'=>'脃','䐋'=>'䐋','脾'=>'脾','媵'=>'媵','𦞧'=>'𦞧','𦞵'=>'𦞵','𣎓'=>'𣎓','𣎜'=>'𣎜','舁'=>'舁','舄'=>'舄','ð¯¦'=>'ð¯¦','䑫'=>'䑫','ð¯¦'=>'ð¯¦','ð¯¦'=>'ð¯¦','芝'=>'芝','劳'=>'劳','花'=>'花','芳'=>'芳','芽'=>'芽','苦'=>'苦','𦬼'=>'𦬼','若'=>'若','茝'=>'茝','荣'=>'荣','莭'=>'莭','茣'=>'茣','ð¯¦'=>'ð¯¦','菧'=>'菧','著'=>'著','荓'=>'荓','菊'=>'菊','菌'=>'菌','菜'=>'菜','𦰶'=>'𦰶','𦵫'=>'𦵫','𦳕'=>'𦳕','䔫'=>'䔫','蓱'=>'蓱','蓳'=>'蓳','蔖'=>'蔖','𧏊'=>'𧏊','蕤'=>'蕤','𦼬'=>'𦼬','䕝'=>'䕝','䕡'=>'䕡','𦾱'=>'𦾱','𧃒'=>'𧃒','䕫'=>'䕫','虐'=>'虐','虜'=>'虜','虧'=>'虧','虩'=>'虩','蚩'=>'蚩','蚈'=>'蚈','蜎'=>'蜎','蛢'=>'蛢','蝹'=>'蝹','蜨'=>'蜨','蝫'=>'蝫','螆'=>'螆','䗗'=>'䗗','蟡'=>'蟡','ð¯§'=>'ð¯§','䗹'=>'䗹','衠'=>'衠','衣'=>'衣','𧙧'=>'𧙧','裗'=>'裗','裞'=>'裞','䘵'=>'䘵','裺'=>'裺','㒻'=>'㒻','𧢮'=>'𧢮','𧥦'=>'𧥦','ð¯§'=>'ð¯§','䛇'=>'䛇','ð¯§'=>'ð¯§','ð¯§'=>'ð¯§','變'=>'變','豕'=>'豕','𧲨'=>'𧲨','貫'=>'貫','賁'=>'賁','贛'=>'贛','起'=>'起','𧼯'=>'𧼯','𠠄'=>'𠠄','跋'=>'跋','趼'=>'趼','跰'=>'跰','ð¯§'=>'ð¯§','軔'=>'軔','輸'=>'輸','𨗒'=>'𨗒','𨗭'=>'𨗭','邔'=>'邔','郱'=>'郱','鄑'=>'鄑','𨜮'=>'𨜮','鄛'=>'鄛','鈸'=>'鈸','鋗'=>'鋗','鋘'=>'鋘','鉼'=>'鉼','鏹'=>'鏹','鐕'=>'鐕','𨯺'=>'𨯺','開'=>'開','䦕'=>'䦕','閷'=>'閷','𨵷'=>'𨵷','䧦'=>'䧦','雃'=>'雃','嶲'=>'嶲','霣'=>'霣','𩅅'=>'𩅅','𩈚'=>'𩈚','䩮'=>'䩮','䩶'=>'䩶','韠'=>'韠','𩐊'=>'𩐊','䪲'=>'䪲','𩒖'=>'𩒖','頋'=>'頋','頋'=>'頋','頩'=>'頩','ð¯¨'=>'ð¯¨','飢'=>'飢','䬳'=>'䬳','餩'=>'餩','馧'=>'馧','駂'=>'駂','駾'=>'駾','䯎'=>'䯎','𩬰'=>'𩬰','鬒'=>'鬒','鱀'=>'鱀','鳽'=>'鳽','ð¯¨'=>'ð¯¨','䳭'=>'䳭','ð¯¨'=>'ð¯¨','ð¯¨'=>'ð¯¨','䳸'=>'䳸','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','麻'=>'麻','䵖'=>'䵖','黹'=>'黹','黾'=>'黾','鼅'=>'鼅','鼏'=>'鼏','鼖'=>'鼖','鼻'=>'鼻','ð¯¨'=>'ð¯¨'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/utf_canonical_comp.php b/phpBB/includes/utf/data/utf_canonical_comp.php
new file mode 100644
index 0000000000..a3ed3ee602
--- /dev/null
+++ b/phpBB/includes/utf/data/utf_canonical_comp.php
@@ -0,0 +1,2 @@
+<?php
+$GLOBALS['utf_canonical_comp']=array('AÌ€'=>'À','AÌ'=>'Ã','AÌ‚'=>'Â','Ã'=>'Ã','Ä'=>'Ä','AÌŠ'=>'Ã…','Ç'=>'Ç','EÌ€'=>'È','EÌ'=>'É','EÌ‚'=>'Ê','Ë'=>'Ë','IÌ€'=>'ÃŒ','IÌ'=>'Ã','IÌ‚'=>'ÃŽ','Ï'=>'Ã','Ñ'=>'Ñ','OÌ€'=>'Ã’','OÌ'=>'Ó','OÌ‚'=>'Ô','Õ'=>'Õ','Ö'=>'Ö','UÌ€'=>'Ù','UÌ'=>'Ú','UÌ‚'=>'Û','Ü'=>'Ãœ','YÌ'=>'Ã','aÌ€'=>'à','aÌ'=>'á','aÌ‚'=>'â','ã'=>'ã','ä'=>'ä','aÌŠ'=>'Ã¥','ç'=>'ç','eÌ€'=>'è','eÌ'=>'é','eÌ‚'=>'ê','ë'=>'ë','iÌ€'=>'ì','iÌ'=>'í','iÌ‚'=>'î','ï'=>'ï','ñ'=>'ñ','oÌ€'=>'ò','oÌ'=>'ó','oÌ‚'=>'ô','õ'=>'õ','ö'=>'ö','uÌ€'=>'ù','uÌ'=>'ú','uÌ‚'=>'û','ü'=>'ü','yÌ'=>'ý','ÿ'=>'ÿ','AÌ„'=>'Ä€','aÌ„'=>'Ä','Ă'=>'Ä‚','ă'=>'ă','Ą'=>'Ä„','ą'=>'Ä…','CÌ'=>'Ć','cÌ'=>'ć','CÌ‚'=>'Ĉ','cÌ‚'=>'ĉ','Ċ'=>'ÄŠ','ċ'=>'Ä‹','CÌŒ'=>'ÄŒ','cÌŒ'=>'Ä','DÌŒ'=>'ÄŽ','dÌŒ'=>'Ä','EÌ„'=>'Ä’','eÌ„'=>'Ä“','Ĕ'=>'Ä”','ĕ'=>'Ä•','Ė'=>'Ä–','ė'=>'Ä—','Ę'=>'Ę','ę'=>'Ä™','EÌŒ'=>'Äš','eÌŒ'=>'Ä›','GÌ‚'=>'Äœ','gÌ‚'=>'Ä','Ğ'=>'Äž','ğ'=>'ÄŸ','Ġ'=>'Ä ','ġ'=>'Ä¡','Ģ'=>'Ä¢','ģ'=>'Ä£','HÌ‚'=>'Ĥ','hÌ‚'=>'Ä¥','Ĩ'=>'Ĩ','ĩ'=>'Ä©','IÌ„'=>'Ī','iÌ„'=>'Ä«','Ĭ'=>'Ĭ','ĭ'=>'Ä­','Į'=>'Ä®','į'=>'į','İ'=>'Ä°','JÌ‚'=>'Ä´','jÌ‚'=>'ĵ','Ķ'=>'Ķ','ķ'=>'Ä·','LÌ'=>'Ĺ','lÌ'=>'ĺ','Ļ'=>'Ä»','ļ'=>'ļ','LÌŒ'=>'Ľ','lÌŒ'=>'ľ','NÌ'=>'Ń','nÌ'=>'Å„','Ņ'=>'Å…','ņ'=>'ņ','NÌŒ'=>'Ň','nÌŒ'=>'ň','OÌ„'=>'ÅŒ','oÌ„'=>'Å','Ŏ'=>'ÅŽ','ŏ'=>'Å','OÌ‹'=>'Å','oÌ‹'=>'Å‘','RÌ'=>'Å”','rÌ'=>'Å•','Ŗ'=>'Å–','ŗ'=>'Å—','RÌŒ'=>'Ř','rÌŒ'=>'Å™','SÌ'=>'Åš','sÌ'=>'Å›','SÌ‚'=>'Åœ','sÌ‚'=>'Å','Ş'=>'Åž','ş'=>'ÅŸ','SÌŒ'=>'Å ','sÌŒ'=>'Å¡','Ţ'=>'Å¢','ţ'=>'Å£','TÌŒ'=>'Ť','tÌŒ'=>'Å¥','Ũ'=>'Ũ','ũ'=>'Å©','UÌ„'=>'Ū','uÌ„'=>'Å«','Ŭ'=>'Ŭ','ŭ'=>'Å­','UÌŠ'=>'Å®','uÌŠ'=>'ů','UÌ‹'=>'Å°','uÌ‹'=>'ű','Ų'=>'Ų','ų'=>'ų','WÌ‚'=>'Å´','wÌ‚'=>'ŵ','YÌ‚'=>'Ŷ','yÌ‚'=>'Å·','Ÿ'=>'Ÿ','ZÌ'=>'Ź','zÌ'=>'ź','Ż'=>'Å»','ż'=>'ż','ZÌŒ'=>'Ž','zÌŒ'=>'ž','OÌ›'=>'Æ ','oÌ›'=>'Æ¡','UÌ›'=>'Ư','uÌ›'=>'Æ°','AÌŒ'=>'Ç','aÌŒ'=>'ÇŽ','IÌŒ'=>'Ç','iÌŒ'=>'Ç','OÌŒ'=>'Ç‘','oÌŒ'=>'Ç’','UÌŒ'=>'Ç“','uÌŒ'=>'Ç”','Ǖ'=>'Ç•','ǖ'=>'Ç–','ÃœÌ'=>'Ç—','üÌ'=>'ǘ','Ǚ'=>'Ç™','ǚ'=>'Çš','Ǜ'=>'Ç›','ǜ'=>'Çœ','Ǟ'=>'Çž','ǟ'=>'ÇŸ','Ǡ'=>'Ç ','ǡ'=>'Ç¡','Ǣ'=>'Ç¢','ǣ'=>'Ç£','GÌŒ'=>'Ǧ','gÌŒ'=>'ǧ','KÌŒ'=>'Ǩ','kÌŒ'=>'Ç©','Ǫ'=>'Ǫ','ǫ'=>'Ç«','Ǭ'=>'Ǭ','Ç«Ì„'=>'Ç­','Æ·ÌŒ'=>'Ç®','Ê’ÌŒ'=>'ǯ','jÌŒ'=>'Ç°','GÌ'=>'Ç´','gÌ'=>'ǵ','NÌ€'=>'Ǹ','nÌ€'=>'ǹ','Ã…Ì'=>'Ǻ','Ã¥Ì'=>'Ç»','ÆÌ'=>'Ǽ','æÌ'=>'ǽ','ØÌ'=>'Ǿ','øÌ'=>'Ç¿','AÌ'=>'È€','aÌ'=>'È','AÌ‘'=>'È‚','aÌ‘'=>'ȃ','EÌ'=>'È„','eÌ'=>'È…','EÌ‘'=>'Ȇ','eÌ‘'=>'ȇ','IÌ'=>'Ȉ','iÌ'=>'ȉ','IÌ‘'=>'ÈŠ','iÌ‘'=>'È‹','OÌ'=>'ÈŒ','oÌ'=>'È','OÌ‘'=>'ÈŽ','oÌ‘'=>'È','RÌ'=>'È','rÌ'=>'È‘','RÌ‘'=>'È’','rÌ‘'=>'È“','UÌ'=>'È”','uÌ'=>'È•','UÌ‘'=>'È–','uÌ‘'=>'È—','Ș'=>'Ș','ș'=>'È™','Ț'=>'Èš','ț'=>'È›','HÌŒ'=>'Èž','hÌŒ'=>'ÈŸ','Ȧ'=>'Ȧ','ȧ'=>'ȧ','Ȩ'=>'Ȩ','ȩ'=>'È©','Ȫ'=>'Ȫ','ȫ'=>'È«','Ȭ'=>'Ȭ','ȭ'=>'È­','Ȯ'=>'È®','ȯ'=>'ȯ','Ȱ'=>'È°','ȱ'=>'ȱ','YÌ„'=>'Ȳ','yÌ„'=>'ȳ','̈Ì'=>'Í„','¨Ì'=>'Î…','ΑÌ'=>'Ά','ΕÌ'=>'Έ','ΗÌ'=>'Ή','ΙÌ'=>'Ί','ΟÌ'=>'ÎŒ','Î¥Ì'=>'ÎŽ','ΩÌ'=>'Î','ÏŠÌ'=>'Î','Ϊ'=>'Ϊ','Ϋ'=>'Ϋ','αÌ'=>'ά','εÌ'=>'έ','ηÌ'=>'ή','ιÌ'=>'ί','Ï‹Ì'=>'ΰ','ϊ'=>'ÏŠ','ϋ'=>'Ï‹','οÌ'=>'ÏŒ','Ï…Ì'=>'Ï','ωÌ'=>'ÏŽ','Ï’Ì'=>'Ï“','ϔ'=>'Ï”','Ѐ'=>'Ѐ','Ё'=>'Ð','ГÌ'=>'Ѓ','Ї'=>'Ї','КÌ'=>'ÐŒ','Ѝ'=>'Ð','Ў'=>'ÐŽ','Й'=>'Й','й'=>'й','ѐ'=>'Ñ','ё'=>'Ñ‘','гÌ'=>'Ñ“','ї'=>'Ñ—','кÌ'=>'Ñœ','ѝ'=>'Ñ','ў'=>'Ñž','Ñ´Ì'=>'Ѷ','ѵÌ'=>'Ñ·','Ӂ'=>'Ó','ӂ'=>'Ó‚','Ð̆'=>'Ó','ӑ'=>'Ó‘','Ð̈'=>'Ó’','ӓ'=>'Ó“','Ӗ'=>'Ó–','ӗ'=>'Ó—','Ӛ'=>'Óš','ӛ'=>'Ó›','Ӝ'=>'Óœ','ӝ'=>'Ó','Ӟ'=>'Óž','ӟ'=>'ÓŸ','Ӣ'=>'Ó¢','ӣ'=>'Ó£','Ӥ'=>'Ó¤','ӥ'=>'Ó¥','Ӧ'=>'Ó¦','ӧ'=>'Ó§','Ӫ'=>'Óª','ӫ'=>'Ó«','Ӭ'=>'Ó¬','Ñ̈'=>'Ó­','Ӯ'=>'Ó®','ӯ'=>'Ó¯','Ӱ'=>'Ó°','ӱ'=>'Ó±','Ӳ'=>'Ó²','ӳ'=>'Ó³','Ӵ'=>'Ó´','ӵ'=>'Óµ','Ӹ'=>'Ó¸','ӹ'=>'Ó¹','آ'=>'Ø¢','أ'=>'Ø£','ÙˆÙ”'=>'ؤ','إ'=>'Ø¥','ÙŠÙ”'=>'ئ','Û•Ù”'=>'Û€','ÛÙ”'=>'Û‚','Û’Ù”'=>'Û“','ऩ'=>'ऩ','ऱ'=>'ऱ','ऴ'=>'ऴ','ো'=>'ো','ৌ'=>'ৌ','ୈ'=>'à­ˆ','ୋ'=>'à­‹','ୌ'=>'à­Œ','ஔ'=>'à®”','ொ'=>'ொ','ோ'=>'ோ','ௌ'=>'ௌ','ై'=>'ై','ೀ'=>'à³€','ೇ'=>'ೇ','ೈ'=>'ೈ','ೊ'=>'ೊ','ೋ'=>'ೋ','ൊ'=>'ൊ','ോ'=>'ോ','ൌ'=>'ൌ','ේ'=>'à·š','à·™à·'=>'à·œ','ෝ'=>'à·','ෞ'=>'à·ž','ཱི'=>'ཱི','ཱུ'=>'ཱུ','ཱྀ'=>'à¾','ဦ'=>'ဦ','ᬆ'=>'ᬆ','ᬈ'=>'ᬈ','ᬊ'=>'ᬊ','ᬌ'=>'ᬌ','á¬á¬µ'=>'ᬎ','ᬒ'=>'ᬒ','ᬻ'=>'ᬻ','ᬽ'=>'ᬽ','ᭀ'=>'á­€','ᭁ'=>'á­','ᭃ'=>'á­ƒ','AÌ¥'=>'Ḁ','aÌ¥'=>'á¸','Ḃ'=>'Ḃ','ḃ'=>'ḃ','BÌ£'=>'Ḅ','bÌ£'=>'ḅ','Ḇ'=>'Ḇ','ḇ'=>'ḇ','ÇÌ'=>'Ḉ','çÌ'=>'ḉ','Ḋ'=>'Ḋ','ḋ'=>'ḋ','DÌ£'=>'Ḍ','dÌ£'=>'á¸','Ḏ'=>'Ḏ','ḏ'=>'á¸','Ḑ'=>'á¸','ḑ'=>'ḑ','DÌ­'=>'Ḓ','dÌ­'=>'ḓ','Ä’Ì€'=>'Ḕ','Ä“Ì€'=>'ḕ','Ä’Ì'=>'Ḗ','Ä“Ì'=>'ḗ','EÌ­'=>'Ḙ','eÌ­'=>'ḙ','EÌ°'=>'Ḛ','eÌ°'=>'ḛ','Ḝ'=>'Ḝ','ḝ'=>'á¸','Ḟ'=>'Ḟ','ḟ'=>'ḟ','GÌ„'=>'Ḡ','gÌ„'=>'ḡ','Ḣ'=>'Ḣ','ḣ'=>'ḣ','HÌ£'=>'Ḥ','hÌ£'=>'ḥ','Ḧ'=>'Ḧ','ḧ'=>'ḧ','Ḩ'=>'Ḩ','ḩ'=>'ḩ','HÌ®'=>'Ḫ','hÌ®'=>'ḫ','IÌ°'=>'Ḭ','iÌ°'=>'ḭ','ÃÌ'=>'Ḯ','ïÌ'=>'ḯ','KÌ'=>'Ḱ','kÌ'=>'ḱ','KÌ£'=>'Ḳ','kÌ£'=>'ḳ','Ḵ'=>'Ḵ','ḵ'=>'ḵ','LÌ£'=>'Ḷ','lÌ£'=>'ḷ','Ḹ'=>'Ḹ','ḹ'=>'ḹ','Ḻ'=>'Ḻ','ḻ'=>'ḻ','LÌ­'=>'Ḽ','lÌ­'=>'ḽ','MÌ'=>'Ḿ','mÌ'=>'ḿ','Ṁ'=>'á¹€','ṁ'=>'á¹','MÌ£'=>'Ṃ','mÌ£'=>'ṃ','Ṅ'=>'Ṅ','ṅ'=>'á¹…','NÌ£'=>'Ṇ','nÌ£'=>'ṇ','Ṉ'=>'Ṉ','ṉ'=>'ṉ','NÌ­'=>'Ṋ','nÌ­'=>'ṋ','ÕÌ'=>'Ṍ','õÌ'=>'á¹','Ṏ'=>'Ṏ','ṏ'=>'á¹','Ṑ'=>'á¹','ÅÌ€'=>'ṑ','ÅŒÌ'=>'á¹’','ÅÌ'=>'ṓ','PÌ'=>'á¹”','pÌ'=>'ṕ','Ṗ'=>'á¹–','ṗ'=>'á¹—','Ṙ'=>'Ṙ','ṙ'=>'á¹™','RÌ£'=>'Ṛ','rÌ£'=>'á¹›','Ṝ'=>'Ṝ','ṝ'=>'á¹','Ṟ'=>'Ṟ','ṟ'=>'ṟ','Ṡ'=>'á¹ ','ṡ'=>'ṡ','SÌ£'=>'á¹¢','sÌ£'=>'á¹£','Ṥ'=>'Ṥ','ṥ'=>'á¹¥','Ṧ'=>'Ṧ','ṧ'=>'ṧ','Ṩ'=>'Ṩ','ṩ'=>'ṩ','Ṫ'=>'Ṫ','ṫ'=>'ṫ','TÌ£'=>'Ṭ','tÌ£'=>'á¹­','Ṯ'=>'á¹®','ṯ'=>'ṯ','TÌ­'=>'á¹°','tÌ­'=>'á¹±','Ṳ'=>'á¹²','ṳ'=>'á¹³','UÌ°'=>'á¹´','uÌ°'=>'á¹µ','UÌ­'=>'Ṷ','uÌ­'=>'á¹·','ŨÌ'=>'Ṹ','Å©Ì'=>'á¹¹','Ṻ'=>'Ṻ','ṻ'=>'á¹»','Ṽ'=>'á¹¼','ṽ'=>'á¹½','VÌ£'=>'á¹¾','vÌ£'=>'ṿ','WÌ€'=>'Ẁ','wÌ€'=>'áº','WÌ'=>'Ẃ','wÌ'=>'ẃ','Ẅ'=>'Ẅ','ẅ'=>'ẅ','Ẇ'=>'Ẇ','ẇ'=>'ẇ','WÌ£'=>'Ẉ','wÌ£'=>'ẉ','Ẋ'=>'Ẋ','ẋ'=>'ẋ','Ẍ'=>'Ẍ','ẍ'=>'áº','Ẏ'=>'Ẏ','ẏ'=>'áº','ZÌ‚'=>'áº','zÌ‚'=>'ẑ','ZÌ£'=>'Ẓ','zÌ£'=>'ẓ','Ẕ'=>'Ẕ','ẕ'=>'ẕ','ẖ'=>'ẖ','ẗ'=>'ẗ','wÌŠ'=>'ẘ','yÌŠ'=>'ẙ','ẛ'=>'ẛ','AÌ£'=>'Ạ','aÌ£'=>'ạ','Ả'=>'Ả','ả'=>'ả','ÂÌ'=>'Ấ','âÌ'=>'ấ','Ầ'=>'Ầ','ầ'=>'ầ','Ẩ'=>'Ẩ','ẩ'=>'ẩ','Ẫ'=>'Ẫ','ẫ'=>'ẫ','Ậ'=>'Ậ','ậ'=>'ậ','Ä‚Ì'=>'Ắ','ăÌ'=>'ắ','Ä‚Ì€'=>'Ằ','ằ'=>'ằ','Ẳ'=>'Ẳ','ẳ'=>'ẳ','Ẵ'=>'Ẵ','ẵ'=>'ẵ','Ặ'=>'Ặ','ặ'=>'ặ','EÌ£'=>'Ẹ','eÌ£'=>'ẹ','Ẻ'=>'Ẻ','ẻ'=>'ẻ','Ẽ'=>'Ẽ','ẽ'=>'ẽ','ÊÌ'=>'Ế','êÌ'=>'ế','Ề'=>'Ề','ề'=>'á»','Ể'=>'Ể','ể'=>'ể','Ễ'=>'Ễ','ễ'=>'á»…','Ệ'=>'Ệ','ệ'=>'ệ','Ỉ'=>'Ỉ','ỉ'=>'ỉ','IÌ£'=>'Ị','iÌ£'=>'ị','OÌ£'=>'Ọ','oÌ£'=>'á»','Ỏ'=>'Ỏ','ỏ'=>'á»','ÔÌ'=>'á»','ôÌ'=>'ố','Ồ'=>'á»’','ồ'=>'ồ','Ổ'=>'á»”','ổ'=>'ổ','Ỗ'=>'á»–','ỗ'=>'á»—','Ộ'=>'Ộ','á»Ì‚'=>'á»™','Æ Ì'=>'Ớ','Æ¡Ì'=>'á»›','Ờ'=>'Ờ','Æ¡Ì€'=>'á»','Ở'=>'Ở','ở'=>'ở','Ỡ'=>'á» ','ỡ'=>'ỡ','Ợ'=>'Ợ','Æ¡Ì£'=>'ợ','UÌ£'=>'Ụ','uÌ£'=>'ụ','Ủ'=>'Ủ','ủ'=>'ủ','ƯÌ'=>'Ứ','Æ°Ì'=>'ứ','Ừ'=>'Ừ','Æ°Ì€'=>'ừ','Ử'=>'Ử','ử'=>'á»­','Ữ'=>'á»®','ữ'=>'ữ','Ự'=>'á»°','Æ°Ì£'=>'á»±','YÌ€'=>'Ỳ','yÌ€'=>'ỳ','YÌ£'=>'á»´','yÌ£'=>'ỵ','Ỷ'=>'Ỷ','ỷ'=>'á»·','Ỹ'=>'Ỹ','ỹ'=>'ỹ','ἀ'=>'á¼€','ἁ'=>'á¼','ἂ'=>'ἂ','á¼Ì€'=>'ἃ','á¼€Ì'=>'ἄ','á¼Ì'=>'á¼…','ἆ'=>'ἆ','á¼Í‚'=>'ἇ','Ἀ'=>'Ἀ','Ἁ'=>'Ἁ','Ἂ'=>'Ἂ','Ἃ'=>'Ἃ','ἈÌ'=>'Ἄ','ἉÌ'=>'á¼','Ἆ'=>'Ἆ','Ἇ'=>'á¼','ἐ'=>'á¼','ἑ'=>'ἑ','á¼Ì€'=>'á¼’','ἓ'=>'ἓ','á¼Ì'=>'á¼”','ἑÌ'=>'ἕ','Ἐ'=>'Ἐ','Ἑ'=>'á¼™','Ἒ'=>'Ἒ','Ἓ'=>'á¼›','ἘÌ'=>'Ἔ','á¼™Ì'=>'á¼','ἠ'=>'á¼ ','ἡ'=>'ἡ','ἢ'=>'á¼¢','ἣ'=>'á¼£','á¼ Ì'=>'ἤ','ἡÌ'=>'á¼¥','á¼ Í‚'=>'ἦ','ἧ'=>'ἧ','Ἠ'=>'Ἠ','Ἡ'=>'Ἡ','Ἢ'=>'Ἢ','Ἣ'=>'Ἣ','ἨÌ'=>'Ἤ','ἩÌ'=>'á¼­','Ἦ'=>'á¼®','Ἧ'=>'Ἧ','ἰ'=>'á¼°','ἱ'=>'á¼±','á¼°Ì€'=>'á¼²','ἳ'=>'á¼³','á¼°Ì'=>'á¼´','á¼±Ì'=>'á¼µ','á¼°Í‚'=>'ἶ','ἷ'=>'á¼·','Ἰ'=>'Ἰ','Ἱ'=>'á¼¹','Ἲ'=>'Ἲ','Ἳ'=>'á¼»','ἸÌ'=>'á¼¼','á¼¹Ì'=>'á¼½','Ἶ'=>'á¼¾','Ἷ'=>'Ἷ','ὀ'=>'á½€','ὁ'=>'á½','ὂ'=>'ὂ','á½Ì€'=>'ὃ','á½€Ì'=>'ὄ','á½Ì'=>'á½…','Ὀ'=>'Ὀ','Ὁ'=>'Ὁ','Ὂ'=>'Ὂ','Ὃ'=>'Ὃ','ὈÌ'=>'Ὄ','ὉÌ'=>'á½','Ï…Ì“'=>'á½','Ï…Ì”'=>'ὑ','á½Ì€'=>'á½’','ὓ'=>'ὓ','á½Ì'=>'á½”','ὑÌ'=>'ὕ','á½Í‚'=>'á½–','ὗ'=>'á½—','Ὑ'=>'á½™','Ὓ'=>'á½›','á½™Ì'=>'á½','Ὗ'=>'Ὗ','ὠ'=>'á½ ','ὡ'=>'ὡ','ὢ'=>'á½¢','ὣ'=>'á½£','á½ Ì'=>'ὤ','ὡÌ'=>'á½¥','á½ Í‚'=>'ὦ','ὧ'=>'ὧ','Ὠ'=>'Ὠ','Ὡ'=>'Ὡ','Ὢ'=>'Ὢ','Ὣ'=>'Ὣ','ὨÌ'=>'Ὤ','ὩÌ'=>'á½­','Ὦ'=>'á½®','Ὧ'=>'Ὧ','ὰ'=>'á½°','ὲ'=>'á½²','ὴ'=>'á½´','ὶ'=>'ὶ','ὸ'=>'ὸ','Ï…Ì€'=>'ὺ','ὼ'=>'á½¼','ᾀ'=>'á¾€','á¼Í…'=>'á¾','ᾂ'=>'ᾂ','ᾃ'=>'ᾃ','ᾄ'=>'ᾄ','á¼…Í…'=>'á¾…','ᾆ'=>'ᾆ','ᾇ'=>'ᾇ','ᾈ'=>'ᾈ','ᾉ'=>'ᾉ','ᾊ'=>'ᾊ','ᾋ'=>'ᾋ','ᾌ'=>'ᾌ','á¼Í…'=>'á¾','ᾎ'=>'ᾎ','á¼Í…'=>'á¾','á¼ Í…'=>'á¾','ᾑ'=>'ᾑ','ᾒ'=>'á¾’','ᾓ'=>'ᾓ','ᾔ'=>'á¾”','ᾕ'=>'ᾕ','ᾖ'=>'á¾–','ᾗ'=>'á¾—','ᾘ'=>'ᾘ','ᾙ'=>'á¾™','ᾚ'=>'ᾚ','ᾛ'=>'á¾›','ᾜ'=>'ᾜ','á¼­Í…'=>'á¾','ᾞ'=>'ᾞ','ᾟ'=>'ᾟ','á½ Í…'=>'á¾ ','ᾡ'=>'ᾡ','ᾢ'=>'á¾¢','ᾣ'=>'á¾£','ᾤ'=>'ᾤ','ᾥ'=>'á¾¥','ᾦ'=>'ᾦ','ᾧ'=>'ᾧ','ᾨ'=>'ᾨ','ᾩ'=>'ᾩ','ᾪ'=>'ᾪ','ᾫ'=>'ᾫ','ᾬ'=>'ᾬ','á½­Í…'=>'á¾­','ᾮ'=>'á¾®','ᾯ'=>'ᾯ','ᾰ'=>'á¾°','ᾱ'=>'á¾±','á½°Í…'=>'á¾²','ᾳ'=>'á¾³','ᾴ'=>'á¾´','ᾶ'=>'ᾶ','ᾷ'=>'á¾·','Ᾰ'=>'Ᾰ','Ᾱ'=>'á¾¹','Ὰ'=>'Ὰ','ᾼ'=>'á¾¼','῁'=>'á¿','á½´Í…'=>'á¿‚','ῃ'=>'ῃ','ῄ'=>'á¿„','ῆ'=>'ῆ','ῇ'=>'ῇ','Ὲ'=>'Ὲ','Ὴ'=>'á¿Š','ῌ'=>'á¿Œ','῍'=>'á¿','᾿Ì'=>'á¿Ž','῏'=>'á¿','ῐ'=>'á¿','ῑ'=>'á¿‘','ÏŠÌ€'=>'á¿’','ῖ'=>'á¿–','ÏŠÍ‚'=>'á¿—','Ῐ'=>'Ῐ','Ῑ'=>'á¿™','Ὶ'=>'á¿š','῝'=>'á¿','῾Ì'=>'á¿ž','῟'=>'á¿Ÿ','ῠ'=>'á¿ ','Ï…Ì„'=>'á¿¡','Ï‹Ì€'=>'á¿¢','ÏÌ“'=>'ῤ','ÏÌ”'=>'á¿¥','Ï…Í‚'=>'ῦ','Ï‹Í‚'=>'ῧ','Ῠ'=>'Ῠ','Ῡ'=>'á¿©','Ὺ'=>'Ὺ','Ῥ'=>'Ῥ','῭'=>'á¿­','ῲ'=>'ῲ','ῳ'=>'ῳ','ÏŽÍ…'=>'á¿´','ῶ'=>'ῶ','ῷ'=>'á¿·','Ὸ'=>'Ὸ','Ὼ'=>'Ὼ','ῼ'=>'ῼ','â†Ì¸'=>'↚','↛'=>'↛','↮'=>'↮','â‡Ì¸'=>'â‡','⇎'=>'⇎','⇏'=>'â‡','∄'=>'∄','∉'=>'∉','∌'=>'∌','∤'=>'∤','∦'=>'∦','≁'=>'â‰','≄'=>'≄','≇'=>'≇','≉'=>'≉','≠'=>'≠','≢'=>'≢','â‰Ì¸'=>'≭','≮'=>'≮','≯'=>'≯','≰'=>'≰','≱'=>'≱','≴'=>'≴','≵'=>'≵','≸'=>'≸','≹'=>'≹','⊀'=>'⊀','⊁'=>'âŠ','⊄'=>'⊄','⊅'=>'⊅','⊈'=>'⊈','⊉'=>'⊉','⊬'=>'⊬','⊭'=>'⊭','⊮'=>'⊮','⊯'=>'⊯','⋠'=>'â‹ ','⋡'=>'â‹¡','⋢'=>'â‹¢','⋣'=>'â‹£','⋪'=>'⋪','⋫'=>'â‹«','⋬'=>'⋬','⋭'=>'â‹­','ã‹ã‚™'=>'ãŒ','ãã‚™'=>'ãŽ','ãã‚™'=>'ã','ã‘ã‚™'=>'ã’','ã“ã‚™'=>'ã”','ã•ã‚™'=>'ã–','ã—ã‚™'=>'ã˜','ã™ã‚™'=>'ãš','ã›ã‚™'=>'ãœ','ãã‚™'=>'ãž','ãŸã‚™'=>'ã ','ã¡ã‚™'=>'ã¢','ã¤ã‚™'=>'ã¥','ã¦ã‚™'=>'ã§','ã¨ã‚™'=>'ã©','ã¯ã‚™'=>'ã°','ã¯ã‚š'=>'ã±','ã²ã‚™'=>'ã³','ã²ã‚š'=>'ã´','ãµã‚™'=>'ã¶','ãµã‚š'=>'ã·','ã¸ã‚™'=>'ã¹','ã¸ã‚š'=>'ãº','ã»ã‚™'=>'ã¼','ã»ã‚š'=>'ã½','ã†ã‚™'=>'ã‚”','ã‚ã‚™'=>'ã‚ž','ã‚«ã‚™'=>'ガ','ã‚­ã‚™'=>'ã‚®','グ'=>'ã‚°','ゲ'=>'ゲ','ゴ'=>'ã‚´','ザ'=>'ザ','ã‚·ã‚™'=>'ジ','ズ'=>'ズ','ゼ'=>'ゼ','ゾ'=>'ゾ','ã‚¿ã‚™'=>'ダ','ãƒã‚™'=>'ヂ','ヅ'=>'ヅ','デ'=>'デ','ド'=>'ド','ãƒã‚™'=>'ãƒ','ãƒã‚š'=>'パ','ビ'=>'ビ','ピ'=>'ピ','ブ'=>'ブ','プ'=>'プ','ベ'=>'ベ','ペ'=>'ペ','ボ'=>'ボ','ポ'=>'ãƒ','ヴ'=>'ヴ','ヷ'=>'ヷ','ヸ'=>'ヸ','ヹ'=>'ヹ','ヺ'=>'ヺ','ヾ'=>'ヾ'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/utf_canonical_decomp.php b/phpBB/includes/utf/data/utf_canonical_decomp.php
new file mode 100644
index 0000000000..460a0cf323
--- /dev/null
+++ b/phpBB/includes/utf/data/utf_canonical_decomp.php
@@ -0,0 +1,2 @@
+<?php
+$GLOBALS['utf_canonical_decomp']=array('À'=>'AÌ€','Ã'=>'AÌ','Â'=>'AÌ‚','Ã'=>'Ã','Ä'=>'Ä','Ã…'=>'AÌŠ','Ç'=>'Ç','È'=>'EÌ€','É'=>'EÌ','Ê'=>'EÌ‚','Ë'=>'Ë','ÃŒ'=>'IÌ€','Ã'=>'IÌ','ÃŽ'=>'IÌ‚','Ã'=>'Ï','Ñ'=>'Ñ','Ã’'=>'OÌ€','Ó'=>'OÌ','Ô'=>'OÌ‚','Õ'=>'Õ','Ö'=>'Ö','Ù'=>'UÌ€','Ú'=>'UÌ','Û'=>'UÌ‚','Ãœ'=>'Ü','Ã'=>'YÌ','à'=>'aÌ€','á'=>'aÌ','â'=>'aÌ‚','ã'=>'ã','ä'=>'ä','Ã¥'=>'aÌŠ','ç'=>'ç','è'=>'eÌ€','é'=>'eÌ','ê'=>'eÌ‚','ë'=>'ë','ì'=>'iÌ€','í'=>'iÌ','î'=>'iÌ‚','ï'=>'ï','ñ'=>'ñ','ò'=>'oÌ€','ó'=>'oÌ','ô'=>'oÌ‚','õ'=>'õ','ö'=>'ö','ù'=>'uÌ€','ú'=>'uÌ','û'=>'uÌ‚','ü'=>'ü','ý'=>'yÌ','ÿ'=>'ÿ','Ä€'=>'AÌ„','Ä'=>'aÌ„','Ä‚'=>'Ă','ă'=>'ă','Ä„'=>'Ą','Ä…'=>'ą','Ć'=>'CÌ','ć'=>'cÌ','Ĉ'=>'CÌ‚','ĉ'=>'cÌ‚','ÄŠ'=>'Ċ','Ä‹'=>'ċ','ÄŒ'=>'CÌŒ','Ä'=>'cÌŒ','ÄŽ'=>'DÌŒ','Ä'=>'dÌŒ','Ä’'=>'EÌ„','Ä“'=>'eÌ„','Ä”'=>'Ĕ','Ä•'=>'ĕ','Ä–'=>'Ė','Ä—'=>'ė','Ę'=>'Ę','Ä™'=>'ę','Äš'=>'EÌŒ','Ä›'=>'eÌŒ','Äœ'=>'GÌ‚','Ä'=>'gÌ‚','Äž'=>'Ğ','ÄŸ'=>'ğ','Ä '=>'Ġ','Ä¡'=>'ġ','Ä¢'=>'Ģ','Ä£'=>'ģ','Ĥ'=>'HÌ‚','Ä¥'=>'hÌ‚','Ĩ'=>'Ĩ','Ä©'=>'ĩ','Ī'=>'IÌ„','Ä«'=>'iÌ„','Ĭ'=>'Ĭ','Ä­'=>'ĭ','Ä®'=>'Į','į'=>'į','Ä°'=>'İ','Ä´'=>'JÌ‚','ĵ'=>'jÌ‚','Ķ'=>'Ķ','Ä·'=>'ķ','Ĺ'=>'LÌ','ĺ'=>'lÌ','Ä»'=>'Ļ','ļ'=>'ļ','Ľ'=>'LÌŒ','ľ'=>'lÌŒ','Ń'=>'NÌ','Å„'=>'nÌ','Å…'=>'Ņ','ņ'=>'ņ','Ň'=>'NÌŒ','ň'=>'nÌŒ','ÅŒ'=>'OÌ„','Å'=>'oÌ„','ÅŽ'=>'Ŏ','Å'=>'ŏ','Å'=>'OÌ‹','Å‘'=>'oÌ‹','Å”'=>'RÌ','Å•'=>'rÌ','Å–'=>'Ŗ','Å—'=>'ŗ','Ř'=>'RÌŒ','Å™'=>'rÌŒ','Åš'=>'SÌ','Å›'=>'sÌ','Åœ'=>'SÌ‚','Å'=>'sÌ‚','Åž'=>'Ş','ÅŸ'=>'ş','Å '=>'SÌŒ','Å¡'=>'sÌŒ','Å¢'=>'Ţ','Å£'=>'ţ','Ť'=>'TÌŒ','Å¥'=>'tÌŒ','Ũ'=>'Ũ','Å©'=>'ũ','Ū'=>'UÌ„','Å«'=>'uÌ„','Ŭ'=>'Ŭ','Å­'=>'ŭ','Å®'=>'UÌŠ','ů'=>'uÌŠ','Å°'=>'UÌ‹','ű'=>'uÌ‹','Ų'=>'Ų','ų'=>'ų','Å´'=>'WÌ‚','ŵ'=>'wÌ‚','Ŷ'=>'YÌ‚','Å·'=>'yÌ‚','Ÿ'=>'Ÿ','Ź'=>'ZÌ','ź'=>'zÌ','Å»'=>'Ż','ż'=>'ż','Ž'=>'ZÌŒ','ž'=>'zÌŒ','Æ '=>'OÌ›','Æ¡'=>'oÌ›','Ư'=>'UÌ›','Æ°'=>'uÌ›','Ç'=>'AÌŒ','ÇŽ'=>'aÌŒ','Ç'=>'IÌŒ','Ç'=>'iÌŒ','Ç‘'=>'OÌŒ','Ç’'=>'oÌŒ','Ç“'=>'UÌŒ','Ç”'=>'uÌŒ','Ç•'=>'Ǖ','Ç–'=>'ǖ','Ç—'=>'ÜÌ','ǘ'=>'üÌ','Ç™'=>'Ǚ','Çš'=>'ǚ','Ç›'=>'Ǜ','Çœ'=>'ǜ','Çž'=>'Ǟ','ÇŸ'=>'ǟ','Ç '=>'Ǡ','Ç¡'=>'ǡ','Ç¢'=>'Ǣ','Ç£'=>'ǣ','Ǧ'=>'GÌŒ','ǧ'=>'gÌŒ','Ǩ'=>'KÌŒ','Ç©'=>'kÌŒ','Ǫ'=>'Ǫ','Ç«'=>'ǫ','Ǭ'=>'Ǭ','Ç­'=>'ǭ','Ç®'=>'Æ·ÌŒ','ǯ'=>'Ê’ÌŒ','Ç°'=>'jÌŒ','Ç´'=>'GÌ','ǵ'=>'gÌ','Ǹ'=>'NÌ€','ǹ'=>'nÌ€','Ǻ'=>'AÌŠÌ','Ç»'=>'aÌŠÌ','Ǽ'=>'ÆÌ','ǽ'=>'æÌ','Ǿ'=>'ØÌ','Ç¿'=>'øÌ','È€'=>'AÌ','È'=>'aÌ','È‚'=>'AÌ‘','ȃ'=>'aÌ‘','È„'=>'EÌ','È…'=>'eÌ','Ȇ'=>'EÌ‘','ȇ'=>'eÌ‘','Ȉ'=>'IÌ','ȉ'=>'iÌ','ÈŠ'=>'IÌ‘','È‹'=>'iÌ‘','ÈŒ'=>'OÌ','È'=>'oÌ','ÈŽ'=>'OÌ‘','È'=>'oÌ‘','È'=>'RÌ','È‘'=>'rÌ','È’'=>'RÌ‘','È“'=>'rÌ‘','È”'=>'UÌ','È•'=>'uÌ','È–'=>'UÌ‘','È—'=>'uÌ‘','Ș'=>'Ș','È™'=>'ș','Èš'=>'Ț','È›'=>'ț','Èž'=>'HÌŒ','ÈŸ'=>'hÌŒ','Ȧ'=>'Ȧ','ȧ'=>'ȧ','Ȩ'=>'Ȩ','È©'=>'ȩ','Ȫ'=>'Ȫ','È«'=>'ȫ','Ȭ'=>'Ȭ','È­'=>'ȭ','È®'=>'Ȯ','ȯ'=>'ȯ','È°'=>'Ȱ','ȱ'=>'ȱ','Ȳ'=>'YÌ„','ȳ'=>'yÌ„','Í€'=>'Ì€','Í'=>'Ì','̓'=>'Ì“','Í„'=>'̈Ì','Í´'=>'ʹ',';'=>';','Î…'=>'¨Ì','Ά'=>'ΑÌ','·'=>'·','Έ'=>'ΕÌ','Ή'=>'ΗÌ','Ί'=>'ΙÌ','ÎŒ'=>'ΟÌ','ÎŽ'=>'Î¥Ì','Î'=>'ΩÌ','Î'=>'ϊÌ','Ϊ'=>'Ϊ','Ϋ'=>'Ϋ','ά'=>'αÌ','έ'=>'εÌ','ή'=>'ηÌ','ί'=>'ιÌ','ΰ'=>'ϋÌ','ÏŠ'=>'ϊ','Ï‹'=>'ϋ','ÏŒ'=>'οÌ','Ï'=>'Ï…Ì','ÏŽ'=>'ωÌ','Ï“'=>'Ï’Ì','Ï”'=>'ϔ','Ѐ'=>'Ѐ','Ð'=>'Ё','Ѓ'=>'ГÌ','Ї'=>'Ї','ÐŒ'=>'КÌ','Ð'=>'Ѝ','ÐŽ'=>'Ў','Й'=>'Й','й'=>'й','Ñ'=>'ѐ','Ñ‘'=>'ё','Ñ“'=>'гÌ','Ñ—'=>'ї','Ñœ'=>'кÌ','Ñ'=>'ѝ','Ñž'=>'ў','Ѷ'=>'Ñ´Ì','Ñ·'=>'ѵÌ','Ó'=>'Ӂ','Ó‚'=>'ӂ','Ó'=>'Ð̆','Ó‘'=>'ӑ','Ó’'=>'Ð̈','Ó“'=>'ӓ','Ó–'=>'Ӗ','Ó—'=>'ӗ','Óš'=>'Ӛ','Ó›'=>'ӛ','Óœ'=>'Ӝ','Ó'=>'ӝ','Óž'=>'Ӟ','ÓŸ'=>'ӟ','Ó¢'=>'Ӣ','Ó£'=>'ӣ','Ó¤'=>'Ӥ','Ó¥'=>'ӥ','Ó¦'=>'Ӧ','Ó§'=>'ӧ','Óª'=>'Ӫ','Ó«'=>'ӫ','Ó¬'=>'Ӭ','Ó­'=>'Ñ̈','Ó®'=>'Ӯ','Ó¯'=>'ӯ','Ó°'=>'Ӱ','Ó±'=>'ӱ','Ó²'=>'Ӳ','Ó³'=>'ӳ','Ó´'=>'Ӵ','Óµ'=>'ӵ','Ó¸'=>'Ӹ','Ó¹'=>'ӹ','Ø¢'=>'آ','Ø£'=>'أ','ؤ'=>'ÙˆÙ”','Ø¥'=>'إ','ئ'=>'ÙŠÙ”','Û€'=>'Û•Ù”','Û‚'=>'ÛÙ”','Û“'=>'Û’Ù”','ऩ'=>'ऩ','ऱ'=>'ऱ','ऴ'=>'ऴ','क़'=>'क़','ख़'=>'ख़','ग़'=>'ग़','ज़'=>'ज़','ड़'=>'ड़','à¥'=>'ढ़','फ़'=>'फ़','य़'=>'य़','ো'=>'ো','ৌ'=>'ৌ','ড়'=>'ড়','à§'=>'ঢ়','য়'=>'য়','ਲ਼'=>'ਲ਼','ਸ਼'=>'ਸ਼','à©™'=>'ਖ਼','à©š'=>'ਗ਼','à©›'=>'ਜ਼','à©ž'=>'ਫ਼','à­ˆ'=>'ୈ','à­‹'=>'ୋ','à­Œ'=>'ୌ','à­œ'=>'ଡ଼','à­'=>'ଢ଼','à®”'=>'ஔ','ொ'=>'ொ','ோ'=>'ோ','ௌ'=>'ௌ','ై'=>'ై','à³€'=>'ೀ','ೇ'=>'ೇ','ೈ'=>'ೈ','ೊ'=>'ೊ','ೋ'=>'ೋ','ൊ'=>'ൊ','ോ'=>'ോ','ൌ'=>'ൌ','à·š'=>'ේ','à·œ'=>'à·™à·','à·'=>'à·™à·à·Š','à·ž'=>'ෞ','གྷ'=>'གྷ','à½'=>'ཌྷ','དྷ'=>'དྷ','བྷ'=>'བྷ','ཛྷ'=>'ཛྷ','ཀྵ'=>'ཀྵ','ཱི'=>'ཱི','ཱུ'=>'ཱུ','ྲྀ'=>'ྲྀ','ླྀ'=>'ླྀ','à¾'=>'ཱྀ','ྒྷ'=>'ྒྷ','à¾'=>'ྜྷ','ྡྷ'=>'ྡྷ','ྦྷ'=>'ྦྷ','ྫྷ'=>'ྫྷ','ྐྵ'=>'à¾à¾µ','ဦ'=>'ဦ','ᬆ'=>'ᬆ','ᬈ'=>'ᬈ','ᬊ'=>'ᬊ','ᬌ'=>'ᬌ','ᬎ'=>'á¬á¬µ','ᬒ'=>'ᬒ','ᬻ'=>'ᬻ','ᬽ'=>'ᬽ','á­€'=>'ᭀ','á­'=>'ᭁ','á­ƒ'=>'ᭃ','Ḁ'=>'AÌ¥','á¸'=>'aÌ¥','Ḃ'=>'Ḃ','ḃ'=>'ḃ','Ḅ'=>'BÌ£','ḅ'=>'bÌ£','Ḇ'=>'Ḇ','ḇ'=>'ḇ','Ḉ'=>'ÇÌ','ḉ'=>'çÌ','Ḋ'=>'Ḋ','ḋ'=>'ḋ','Ḍ'=>'DÌ£','á¸'=>'dÌ£','Ḏ'=>'Ḏ','á¸'=>'ḏ','á¸'=>'Ḑ','ḑ'=>'ḑ','Ḓ'=>'DÌ­','ḓ'=>'dÌ­','Ḕ'=>'EÌ„Ì€','ḕ'=>'eÌ„Ì€','Ḗ'=>'EÌ„Ì','ḗ'=>'eÌ„Ì','Ḙ'=>'EÌ­','ḙ'=>'eÌ­','Ḛ'=>'EÌ°','ḛ'=>'eÌ°','Ḝ'=>'Ḝ','á¸'=>'ḝ','Ḟ'=>'Ḟ','ḟ'=>'ḟ','Ḡ'=>'GÌ„','ḡ'=>'gÌ„','Ḣ'=>'Ḣ','ḣ'=>'ḣ','Ḥ'=>'HÌ£','ḥ'=>'hÌ£','Ḧ'=>'Ḧ','ḧ'=>'ḧ','Ḩ'=>'Ḩ','ḩ'=>'ḩ','Ḫ'=>'HÌ®','ḫ'=>'hÌ®','Ḭ'=>'IÌ°','ḭ'=>'iÌ°','Ḯ'=>'ÏÌ','ḯ'=>'ïÌ','Ḱ'=>'KÌ','ḱ'=>'kÌ','Ḳ'=>'KÌ£','ḳ'=>'kÌ£','Ḵ'=>'Ḵ','ḵ'=>'ḵ','Ḷ'=>'LÌ£','ḷ'=>'lÌ£','Ḹ'=>'Ḹ','ḹ'=>'ḹ','Ḻ'=>'Ḻ','ḻ'=>'ḻ','Ḽ'=>'LÌ­','ḽ'=>'lÌ­','Ḿ'=>'MÌ','ḿ'=>'mÌ','á¹€'=>'Ṁ','á¹'=>'ṁ','Ṃ'=>'MÌ£','ṃ'=>'mÌ£','Ṅ'=>'Ṅ','á¹…'=>'ṅ','Ṇ'=>'NÌ£','ṇ'=>'nÌ£','Ṉ'=>'Ṉ','ṉ'=>'ṉ','Ṋ'=>'NÌ­','ṋ'=>'nÌ­','Ṍ'=>'ÕÌ','á¹'=>'õÌ','Ṏ'=>'Ṏ','á¹'=>'ṏ','á¹'=>'OÌ„Ì€','ṑ'=>'oÌ„Ì€','á¹’'=>'OÌ„Ì','ṓ'=>'oÌ„Ì','á¹”'=>'PÌ','ṕ'=>'pÌ','á¹–'=>'Ṗ','á¹—'=>'ṗ','Ṙ'=>'Ṙ','á¹™'=>'ṙ','Ṛ'=>'RÌ£','á¹›'=>'rÌ£','Ṝ'=>'Ṝ','á¹'=>'ṝ','Ṟ'=>'Ṟ','ṟ'=>'ṟ','á¹ '=>'Ṡ','ṡ'=>'ṡ','á¹¢'=>'SÌ£','á¹£'=>'sÌ£','Ṥ'=>'SÌ̇','á¹¥'=>'sÌ̇','Ṧ'=>'Ṧ','ṧ'=>'ṧ','Ṩ'=>'Ṩ','ṩ'=>'ṩ','Ṫ'=>'Ṫ','ṫ'=>'ṫ','Ṭ'=>'TÌ£','á¹­'=>'tÌ£','á¹®'=>'Ṯ','ṯ'=>'ṯ','á¹°'=>'TÌ­','á¹±'=>'tÌ­','á¹²'=>'Ṳ','á¹³'=>'ṳ','á¹´'=>'UÌ°','á¹µ'=>'uÌ°','Ṷ'=>'UÌ­','á¹·'=>'uÌ­','Ṹ'=>'ŨÌ','á¹¹'=>'ũÌ','Ṻ'=>'Ṻ','á¹»'=>'ṻ','á¹¼'=>'Ṽ','á¹½'=>'ṽ','á¹¾'=>'VÌ£','ṿ'=>'vÌ£','Ẁ'=>'WÌ€','áº'=>'wÌ€','Ẃ'=>'WÌ','ẃ'=>'wÌ','Ẅ'=>'Ẅ','ẅ'=>'ẅ','Ẇ'=>'Ẇ','ẇ'=>'ẇ','Ẉ'=>'WÌ£','ẉ'=>'wÌ£','Ẋ'=>'Ẋ','ẋ'=>'ẋ','Ẍ'=>'Ẍ','áº'=>'ẍ','Ẏ'=>'Ẏ','áº'=>'ẏ','áº'=>'ZÌ‚','ẑ'=>'zÌ‚','Ẓ'=>'ZÌ£','ẓ'=>'zÌ£','Ẕ'=>'Ẕ','ẕ'=>'ẕ','ẖ'=>'ẖ','ẗ'=>'ẗ','ẘ'=>'wÌŠ','ẙ'=>'yÌŠ','ẛ'=>'ẛ','Ạ'=>'AÌ£','ạ'=>'aÌ£','Ả'=>'Ả','ả'=>'ả','Ấ'=>'AÌ‚Ì','ấ'=>'aÌ‚Ì','Ầ'=>'AÌ‚Ì€','ầ'=>'aÌ‚Ì€','Ẩ'=>'Ẩ','ẩ'=>'ẩ','Ẫ'=>'Ẫ','ẫ'=>'ẫ','Ậ'=>'Ậ','ậ'=>'ậ','Ắ'=>'ĂÌ','ắ'=>'ăÌ','Ằ'=>'Ằ','ằ'=>'ằ','Ẳ'=>'Ẳ','ẳ'=>'ẳ','Ẵ'=>'Ẵ','ẵ'=>'ẵ','Ặ'=>'Ặ','ặ'=>'ặ','Ẹ'=>'EÌ£','ẹ'=>'eÌ£','Ẻ'=>'Ẻ','ẻ'=>'ẻ','Ẽ'=>'Ẽ','ẽ'=>'ẽ','Ế'=>'EÌ‚Ì','ế'=>'eÌ‚Ì','Ề'=>'EÌ‚Ì€','á»'=>'eÌ‚Ì€','Ể'=>'Ể','ể'=>'ể','Ễ'=>'Ễ','á»…'=>'ễ','Ệ'=>'Ệ','ệ'=>'ệ','Ỉ'=>'Ỉ','ỉ'=>'ỉ','Ị'=>'IÌ£','ị'=>'iÌ£','Ọ'=>'OÌ£','á»'=>'oÌ£','Ỏ'=>'Ỏ','á»'=>'ỏ','á»'=>'OÌ‚Ì','ố'=>'oÌ‚Ì','á»’'=>'OÌ‚Ì€','ồ'=>'oÌ‚Ì€','á»”'=>'Ổ','ổ'=>'ổ','á»–'=>'Ỗ','á»—'=>'ỗ','Ộ'=>'Ộ','á»™'=>'ộ','Ớ'=>'OÌ›Ì','á»›'=>'oÌ›Ì','Ờ'=>'Ờ','á»'=>'ờ','Ở'=>'Ở','ở'=>'ở','á» '=>'Ỡ','ỡ'=>'ỡ','Ợ'=>'Ợ','ợ'=>'ợ','Ụ'=>'UÌ£','ụ'=>'uÌ£','Ủ'=>'Ủ','ủ'=>'ủ','Ứ'=>'UÌ›Ì','ứ'=>'uÌ›Ì','Ừ'=>'Ừ','ừ'=>'ừ','Ử'=>'Ử','á»­'=>'ử','á»®'=>'Ữ','ữ'=>'ữ','á»°'=>'Ự','á»±'=>'ự','Ỳ'=>'YÌ€','ỳ'=>'yÌ€','á»´'=>'YÌ£','ỵ'=>'yÌ£','Ỷ'=>'Ỷ','á»·'=>'ỷ','Ỹ'=>'Ỹ','ỹ'=>'ỹ','á¼€'=>'ἀ','á¼'=>'ἁ','ἂ'=>'ἂ','ἃ'=>'ἃ','ἄ'=>'ἀÌ','á¼…'=>'ἁÌ','ἆ'=>'ἆ','ἇ'=>'ἇ','Ἀ'=>'Ἀ','Ἁ'=>'Ἁ','Ἂ'=>'Ἂ','Ἃ'=>'Ἃ','Ἄ'=>'ἈÌ','á¼'=>'ἉÌ','Ἆ'=>'Ἆ','á¼'=>'Ἇ','á¼'=>'ἐ','ἑ'=>'ἑ','á¼’'=>'ἒ','ἓ'=>'ἓ','á¼”'=>'ἐÌ','ἕ'=>'ἑÌ','Ἐ'=>'Ἐ','á¼™'=>'Ἑ','Ἒ'=>'Ἒ','á¼›'=>'Ἓ','Ἔ'=>'ἘÌ','á¼'=>'ἙÌ','á¼ '=>'ἠ','ἡ'=>'ἡ','á¼¢'=>'ἢ','á¼£'=>'ἣ','ἤ'=>'ἠÌ','á¼¥'=>'ἡÌ','ἦ'=>'ἦ','ἧ'=>'ἧ','Ἠ'=>'Ἠ','Ἡ'=>'Ἡ','Ἢ'=>'Ἢ','Ἣ'=>'Ἣ','Ἤ'=>'ἨÌ','á¼­'=>'ἩÌ','á¼®'=>'Ἦ','Ἧ'=>'Ἧ','á¼°'=>'ἰ','á¼±'=>'ἱ','á¼²'=>'ἲ','á¼³'=>'ἳ','á¼´'=>'ἰÌ','á¼µ'=>'ἱÌ','ἶ'=>'ἶ','á¼·'=>'ἷ','Ἰ'=>'Ἰ','á¼¹'=>'Ἱ','Ἲ'=>'Ἲ','á¼»'=>'Ἳ','á¼¼'=>'ἸÌ','á¼½'=>'ἹÌ','á¼¾'=>'Ἶ','Ἷ'=>'Ἷ','á½€'=>'ὀ','á½'=>'ὁ','ὂ'=>'ὂ','ὃ'=>'ὃ','ὄ'=>'ὀÌ','á½…'=>'ὁÌ','Ὀ'=>'Ὀ','Ὁ'=>'Ὁ','Ὂ'=>'Ὂ','Ὃ'=>'Ὃ','Ὄ'=>'ὈÌ','á½'=>'ὉÌ','á½'=>'Ï…Ì“','ὑ'=>'Ï…Ì”','á½’'=>'Ï…Ì“Ì€','ὓ'=>'ὓ','á½”'=>'Ï…Ì“Ì','ὕ'=>'Ï…Ì”Ì','á½–'=>'Ï…Ì“Í‚','á½—'=>'ὗ','á½™'=>'Ὑ','á½›'=>'Ὓ','á½'=>'ὙÌ','Ὗ'=>'Ὗ','á½ '=>'ὠ','ὡ'=>'ὡ','á½¢'=>'ὢ','á½£'=>'ὣ','ὤ'=>'ὠÌ','á½¥'=>'ὡÌ','ὦ'=>'ὦ','ὧ'=>'ὧ','Ὠ'=>'Ὠ','Ὡ'=>'Ὡ','Ὢ'=>'Ὢ','Ὣ'=>'Ὣ','Ὤ'=>'ὨÌ','á½­'=>'ὩÌ','á½®'=>'Ὦ','Ὧ'=>'Ὧ','á½°'=>'ὰ','á½±'=>'αÌ','á½²'=>'ὲ','á½³'=>'εÌ','á½´'=>'ὴ','á½µ'=>'ηÌ','ὶ'=>'ὶ','á½·'=>'ιÌ','ὸ'=>'ὸ','á½¹'=>'οÌ','ὺ'=>'Ï…Ì€','á½»'=>'Ï…Ì','á½¼'=>'ὼ','á½½'=>'ωÌ','á¾€'=>'ᾀ','á¾'=>'ᾁ','ᾂ'=>'ᾂ','ᾃ'=>'ᾃ','ᾄ'=>'ἀÌÍ…','á¾…'=>'ἁÌÍ…','ᾆ'=>'ᾆ','ᾇ'=>'ᾇ','ᾈ'=>'ᾈ','ᾉ'=>'ᾉ','ᾊ'=>'ᾊ','ᾋ'=>'ᾋ','ᾌ'=>'ἈÌÍ…','á¾'=>'ἉÌÍ…','ᾎ'=>'ᾎ','á¾'=>'ᾏ','á¾'=>'ᾐ','ᾑ'=>'ᾑ','á¾’'=>'ᾒ','ᾓ'=>'ᾓ','á¾”'=>'ἠÌÍ…','ᾕ'=>'ἡÌÍ…','á¾–'=>'ᾖ','á¾—'=>'ᾗ','ᾘ'=>'ᾘ','á¾™'=>'ᾙ','ᾚ'=>'ᾚ','á¾›'=>'ᾛ','ᾜ'=>'ἨÌÍ…','á¾'=>'ἩÌÍ…','ᾞ'=>'ᾞ','ᾟ'=>'ᾟ','á¾ '=>'ᾠ','ᾡ'=>'ᾡ','á¾¢'=>'ᾢ','á¾£'=>'ᾣ','ᾤ'=>'ὠÌÍ…','á¾¥'=>'ὡÌÍ…','ᾦ'=>'ᾦ','ᾧ'=>'ᾧ','ᾨ'=>'ᾨ','ᾩ'=>'ᾩ','ᾪ'=>'ᾪ','ᾫ'=>'ᾫ','ᾬ'=>'ὨÌÍ…','á¾­'=>'ὩÌÍ…','á¾®'=>'ᾮ','ᾯ'=>'ᾯ','á¾°'=>'ᾰ','á¾±'=>'ᾱ','á¾²'=>'ᾲ','á¾³'=>'ᾳ','á¾´'=>'αÌÍ…','ᾶ'=>'ᾶ','á¾·'=>'ᾷ','Ᾰ'=>'Ᾰ','á¾¹'=>'Ᾱ','Ὰ'=>'Ὰ','á¾»'=>'ΑÌ','á¾¼'=>'ᾼ','á¾¾'=>'ι','á¿'=>'῁','á¿‚'=>'ῂ','ῃ'=>'ῃ','á¿„'=>'ηÌÍ…','ῆ'=>'ῆ','ῇ'=>'ῇ','Ὲ'=>'Ὲ','Έ'=>'ΕÌ','á¿Š'=>'Ὴ','á¿‹'=>'ΗÌ','á¿Œ'=>'ῌ','á¿'=>'῍','á¿Ž'=>'᾿Ì','á¿'=>'῏','á¿'=>'ῐ','á¿‘'=>'ῑ','á¿’'=>'ῒ','á¿“'=>'ϊÌ','á¿–'=>'ῖ','á¿—'=>'ῗ','Ῐ'=>'Ῐ','á¿™'=>'Ῑ','á¿š'=>'Ὶ','á¿›'=>'ΙÌ','á¿'=>'῝','á¿ž'=>'῾Ì','á¿Ÿ'=>'῟','á¿ '=>'ῠ','á¿¡'=>'Ï…Ì„','á¿¢'=>'ῢ','á¿£'=>'ϋÌ','ῤ'=>'ÏÌ“','á¿¥'=>'ÏÌ”','ῦ'=>'Ï…Í‚','ῧ'=>'ῧ','Ῠ'=>'Ῠ','á¿©'=>'Ῡ','Ὺ'=>'Ὺ','á¿«'=>'Î¥Ì','Ῥ'=>'Ῥ','á¿­'=>'῭','á¿®'=>'¨Ì','`'=>'`','ῲ'=>'ῲ','ῳ'=>'ῳ','á¿´'=>'ωÌÍ…','ῶ'=>'ῶ','á¿·'=>'ῷ','Ὸ'=>'Ὸ','Ό'=>'ΟÌ','Ὼ'=>'Ὼ','á¿»'=>'ΩÌ','ῼ'=>'ῼ','´'=>'´',' '=>' ','â€'=>' ','Ω'=>'Ω','K'=>'K','â„«'=>'AÌŠ','↚'=>'â†Ì¸','↛'=>'↛','↮'=>'↮','â‡'=>'â‡Ì¸','⇎'=>'⇎','â‡'=>'⇏','∄'=>'∄','∉'=>'∉','∌'=>'∌','∤'=>'∤','∦'=>'∦','â‰'=>'≁','≄'=>'≄','≇'=>'≇','≉'=>'≉','≠'=>'≠','≢'=>'≢','≭'=>'â‰Ì¸','≮'=>'≮','≯'=>'≯','≰'=>'≰','≱'=>'≱','≴'=>'≴','≵'=>'≵','≸'=>'≸','≹'=>'≹','⊀'=>'⊀','âŠ'=>'⊁','⊄'=>'⊄','⊅'=>'⊅','⊈'=>'⊈','⊉'=>'⊉','⊬'=>'⊬','⊭'=>'⊭','⊮'=>'⊮','⊯'=>'⊯','â‹ '=>'⋠','â‹¡'=>'⋡','â‹¢'=>'⋢','â‹£'=>'⋣','⋪'=>'⋪','â‹«'=>'⋫','⋬'=>'⋬','â‹­'=>'⋭','〈'=>'〈','〉'=>'〉','â«œ'=>'â«Ì¸','ãŒ'=>'ã‹ã‚™','ãŽ'=>'ãã‚™','ã'=>'ãã‚™','ã’'=>'ã‘ã‚™','ã”'=>'ã“ã‚™','ã–'=>'ã•ã‚™','ã˜'=>'ã—ã‚™','ãš'=>'ã™ã‚™','ãœ'=>'ã›ã‚™','ãž'=>'ãã‚™','ã '=>'ãŸã‚™','ã¢'=>'ã¡ã‚™','ã¥'=>'ã¤ã‚™','ã§'=>'ã¦ã‚™','ã©'=>'ã¨ã‚™','ã°'=>'ã¯ã‚™','ã±'=>'ã¯ã‚š','ã³'=>'ã²ã‚™','ã´'=>'ã²ã‚š','ã¶'=>'ãµã‚™','ã·'=>'ãµã‚š','ã¹'=>'ã¸ã‚™','ãº'=>'ã¸ã‚š','ã¼'=>'ã»ã‚™','ã½'=>'ã»ã‚š','ã‚”'=>'ã†ã‚™','ã‚ž'=>'ã‚ã‚™','ガ'=>'ã‚«ã‚™','ã‚®'=>'ã‚­ã‚™','ã‚°'=>'グ','ゲ'=>'ゲ','ã‚´'=>'ゴ','ザ'=>'ザ','ジ'=>'ã‚·ã‚™','ズ'=>'ズ','ゼ'=>'ゼ','ゾ'=>'ゾ','ダ'=>'ã‚¿ã‚™','ヂ'=>'ãƒã‚™','ヅ'=>'ヅ','デ'=>'デ','ド'=>'ド','ãƒ'=>'ãƒã‚™','パ'=>'ãƒã‚š','ビ'=>'ビ','ピ'=>'ピ','ブ'=>'ブ','プ'=>'プ','ベ'=>'ベ','ペ'=>'ペ','ボ'=>'ボ','ãƒ'=>'ポ','ヴ'=>'ヴ','ヷ'=>'ヷ','ヸ'=>'ヸ','ヹ'=>'ヹ','ヺ'=>'ヺ','ヾ'=>'ヾ','豈'=>'豈','ï¤'=>'æ›´','車'=>'車','賈'=>'賈','滑'=>'滑','串'=>'串','句'=>'å¥','龜'=>'龜','龜'=>'龜','契'=>'契','金'=>'金','喇'=>'å–‡','奈'=>'奈','ï¤'=>'懶','癩'=>'癩','ï¤'=>'ç¾…','ï¤'=>'蘿','螺'=>'螺','裸'=>'裸','邏'=>'é‚','樂'=>'樂','洛'=>'æ´›','烙'=>'烙','珞'=>'çž','落'=>'è½','酪'=>'é…ª','駱'=>'駱','亂'=>'亂','卵'=>'åµ','ï¤'=>'欄','爛'=>'爛','蘭'=>'蘭','鸞'=>'鸞','嵐'=>'åµ','濫'=>'æ¿«','藍'=>'è—','襤'=>'襤','拉'=>'拉','臘'=>'臘','蠟'=>'è Ÿ','廊'=>'廊','朗'=>'朗','浪'=>'浪','狼'=>'狼','郎'=>'郎','來'=>'來','冷'=>'冷','勞'=>'å‹ž','擄'=>'æ“„','櫓'=>'æ«“','爐'=>'çˆ','盧'=>'盧','老'=>'è€','蘆'=>'蘆','虜'=>'虜','路'=>'è·¯','露'=>'露','魯'=>'é­¯','鷺'=>'é·º','碌'=>'碌','祿'=>'祿','綠'=>'綠','菉'=>'è‰','錄'=>'錄','鹿'=>'鹿','ï¥'=>'è«–','壟'=>'壟','弄'=>'弄','籠'=>'ç± ','聾'=>'è¾','牢'=>'牢','磊'=>'磊','賂'=>'賂','雷'=>'é›·','壘'=>'壘','屢'=>'å±¢','樓'=>'樓','ï¥'=>'æ·š','漏'=>'æ¼','ï¥'=>'ç´¯','ï¥'=>'縷','陋'=>'陋','勒'=>'å‹’','肋'=>'è‚‹','凜'=>'凜','凌'=>'凌','稜'=>'稜','綾'=>'綾','菱'=>'è±','陵'=>'陵','讀'=>'讀','拏'=>'æ‹','樂'=>'樂','ï¥'=>'諾','丹'=>'丹','寧'=>'寧','怒'=>'怒','率'=>'率','異'=>'ç•°','北'=>'北','磻'=>'磻','便'=>'便','復'=>'復','不'=>'ä¸','泌'=>'泌','數'=>'數','索'=>'ç´¢','參'=>'åƒ','塞'=>'å¡ž','省'=>'çœ','葉'=>'葉','說'=>'說','殺'=>'殺','辰'=>'è¾°','沈'=>'沈','拾'=>'拾','若'=>'è‹¥','掠'=>'掠','略'=>'ç•¥','亮'=>'亮','兩'=>'å…©','凉'=>'凉','梁'=>'æ¢','糧'=>'糧','良'=>'良','諒'=>'è«’','量'=>'é‡','勵'=>'勵','呂'=>'å‘‚','ï¦'=>'女','廬'=>'廬','旅'=>'æ—…','濾'=>'濾','礪'=>'礪','閭'=>'é–­','驪'=>'驪','麗'=>'麗','黎'=>'黎','力'=>'力','曆'=>'曆','歷'=>'æ­·','ï¦'=>'è½¢','年'=>'å¹´','ï¦'=>'æ†','ï¦'=>'戀','撚'=>'æ’š','漣'=>'æ¼£','煉'=>'ç…‰','璉'=>'ç’‰','秊'=>'秊','練'=>'ç·´','聯'=>'è¯','輦'=>'輦','蓮'=>'è“®','連'=>'連','鍊'=>'éŠ','列'=>'列','ï¦'=>'劣','咽'=>'å’½','烈'=>'烈','裂'=>'裂','說'=>'說','廉'=>'廉','念'=>'念','捻'=>'æ»','殮'=>'æ®®','簾'=>'ç°¾','獵'=>'çµ','令'=>'令','囹'=>'囹','寧'=>'寧','嶺'=>'嶺','怜'=>'怜','玲'=>'玲','瑩'=>'ç‘©','羚'=>'羚','聆'=>'è†','鈴'=>'鈴','零'=>'零','靈'=>'éˆ','領'=>'é ˜','例'=>'例','禮'=>'禮','醴'=>'醴','隸'=>'隸','惡'=>'惡','了'=>'了','僚'=>'僚','寮'=>'寮','尿'=>'å°¿','料'=>'æ–™','樂'=>'樂','燎'=>'燎','ï§'=>'療','蓼'=>'蓼','遼'=>'é¼','龍'=>'é¾','暈'=>'暈','阮'=>'阮','劉'=>'劉','杻'=>'æ»','柳'=>'柳','流'=>'æµ','溜'=>'溜','琉'=>'ç‰','ï§'=>'ç•™','硫'=>'ç¡«','ï§'=>'ç´','ï§'=>'é¡ž','六'=>'å…­','戮'=>'戮','陸'=>'陸','倫'=>'倫','崙'=>'å´™','淪'=>'æ·ª','輪'=>'輪','律'=>'律','慄'=>'æ…„','栗'=>'æ —','率'=>'率','隆'=>'隆','ï§'=>'利','吏'=>'å','履'=>'å±¥','易'=>'易','李'=>'æŽ','梨'=>'梨','泥'=>'æ³¥','理'=>'ç†','痢'=>'ç—¢','罹'=>'ç½¹','裏'=>'è£','裡'=>'裡','里'=>'里','離'=>'離','匿'=>'匿','溺'=>'溺','吝'=>'å','燐'=>'ç‡','璘'=>'ç’˜','藺'=>'è—º','隣'=>'隣','鱗'=>'é±—','麟'=>'麟','林'=>'æž—','淋'=>'æ·‹','臨'=>'臨','立'=>'ç«‹','笠'=>'笠','粒'=>'ç²’','狀'=>'ç‹€','炙'=>'ç‚™','識'=>'è­˜','什'=>'什','茶'=>'茶','刺'=>'刺','切'=>'切','ï¨'=>'度','拓'=>'æ‹“','糖'=>'ç³–','宅'=>'å®…','洞'=>'æ´ž','暴'=>'æš´','輻'=>'è¼»','行'=>'è¡Œ','降'=>'é™','見'=>'見','廓'=>'廓','兀'=>'å…€','ï¨'=>'å—€','ï¨'=>'å¡š','晴'=>'æ™´','凞'=>'凞','猪'=>'猪','益'=>'益','礼'=>'礼','神'=>'神','祥'=>'祥','福'=>'ç¦','靖'=>'é–','ï¨'=>'ç²¾','羽'=>'ç¾½','蘒'=>'蘒','諸'=>'諸','逸'=>'逸','都'=>'都','飯'=>'飯','飼'=>'飼','館'=>'館','鶴'=>'鶴','侮'=>'ä¾®','僧'=>'僧','免'=>'å…','勉'=>'勉','勤'=>'勤','卑'=>'å‘','喝'=>'å–','嘆'=>'嘆','器'=>'器','塀'=>'å¡€','墨'=>'墨','層'=>'層','屮'=>'å±®','悔'=>'æ‚”','慨'=>'æ…¨','憎'=>'憎','ï©€'=>'懲','ï©'=>'æ•','ï©‚'=>'æ—¢','暑'=>'æš‘','ï©„'=>'梅','ï©…'=>'æµ·','渚'=>'渚','漢'=>'æ¼¢','煮'=>'ç…®','爫'=>'爫','ï©Š'=>'ç¢','ï©‹'=>'碑','ï©Œ'=>'社','ï©'=>'祉','ï©Ž'=>'祈','ï©'=>'ç¥','ï©'=>'祖','ï©‘'=>'ç¥','ï©’'=>'ç¦','ï©“'=>'禎','ï©”'=>'ç©€','ï©•'=>'çª','ï©–'=>'節','ï©—'=>'ç·´','縉'=>'縉','ï©™'=>'ç¹','ï©š'=>'ç½²','ï©›'=>'者','ï©œ'=>'臭','ï©'=>'艹','ï©ž'=>'艹','ï©Ÿ'=>'è‘—','ï© '=>'è¤','ï©¡'=>'視','ï©¢'=>'è¬','ï©£'=>'謹','賓'=>'賓','ï©¥'=>'è´ˆ','辶'=>'辶','逸'=>'逸','難'=>'難','ï©©'=>'響','頻'=>'é »','ï©°'=>'並','况'=>'况','全'=>'å…¨','侀'=>'ä¾€','ï©´'=>'å……','冀'=>'冀','勇'=>'勇','ï©·'=>'勺','喝'=>'å–','啕'=>'å••','喙'=>'å–™','ï©»'=>'å—¢','塚'=>'å¡š','墳'=>'墳','奄'=>'奄','ï©¿'=>'奔','婢'=>'å©¢','ïª'=>'嬨','廒'=>'å»’','廙'=>'å»™','彩'=>'彩','徭'=>'å¾­','惘'=>'惘','慎'=>'æ…Ž','愈'=>'愈','憎'=>'憎','慠'=>'æ… ','懲'=>'懲','戴'=>'戴','ïª'=>'æ„','搜'=>'æœ','ïª'=>'æ‘’','ïª'=>'æ•–','晴'=>'æ™´','朗'=>'朗','望'=>'望','杖'=>'æ–','歹'=>'æ­¹','殺'=>'殺','流'=>'æµ','滛'=>'æ»›','滋'=>'滋','漢'=>'æ¼¢','瀞'=>'瀞','煮'=>'ç…®','ïª'=>'瞧','爵'=>'爵','犯'=>'犯','猪'=>'猪','瑱'=>'瑱','甆'=>'甆','画'=>'ç”»','瘝'=>'ç˜','瘟'=>'瘟','益'=>'益','盛'=>'ç››','直'=>'ç›´','睊'=>'çŠ','着'=>'ç€','磌'=>'磌','窱'=>'窱','節'=>'節','类'=>'ç±»','絛'=>'çµ›','練'=>'ç·´','缾'=>'ç¼¾','者'=>'者','荒'=>'è’','華'=>'è¯','蝹'=>'è¹','襁'=>'è¥','覆'=>'覆','視'=>'視','調'=>'調','諸'=>'諸','請'=>'è«‹','謁'=>'è¬','諾'=>'諾','諭'=>'è«­','謹'=>'謹','ï«€'=>'變','ï«'=>'è´ˆ','ï«‚'=>'輸','遲'=>'é²','ï«„'=>'醙','ï«…'=>'鉶','陼'=>'陼','難'=>'難','靖'=>'é–','韛'=>'韛','ï«Š'=>'響','ï«‹'=>'é ‹','ï«Œ'=>'é »','ï«'=>'鬒','ï«Ž'=>'龜','ï«'=>'𢡊','ï«'=>'𢡄','ï«‘'=>'ð£•','ï«’'=>'ã®','ï«“'=>'䀘','ï«”'=>'䀹','ï«•'=>'𥉉','ï«–'=>'ð¥³','ï«—'=>'𧻓','齃'=>'齃','ï«™'=>'龎','ï¬'=>'×™Ö´','ײַ'=>'ײַ','שׁ'=>'ש×','שׂ'=>'שׂ','שּׁ'=>'שּ×','שּׂ'=>'שּׂ','אַ'=>'×Ö·','אָ'=>'×Ö¸','אּ'=>'×Ö¼','בּ'=>'בּ','גּ'=>'×’Ö¼','דּ'=>'דּ','הּ'=>'×”Ö¼','וּ'=>'וּ','זּ'=>'×–Ö¼','טּ'=>'טּ','יּ'=>'×™Ö¼','ךּ'=>'ךּ','כּ'=>'×›Ö¼','לּ'=>'לּ','מּ'=>'מּ','ï­€'=>'× Ö¼','ï­'=>'סּ','ï­ƒ'=>'×£Ö¼','ï­„'=>'פּ','ï­†'=>'צּ','ï­‡'=>'קּ','ï­ˆ'=>'רּ','ï­‰'=>'שּ','ï­Š'=>'תּ','ï­‹'=>'וֹ','ï­Œ'=>'בֿ','ï­'=>'×›Ö¿','ï­Ž'=>'פֿ','ð…ž'=>'ð…—ð…¥','ð…Ÿ'=>'ð…˜ð…¥','ð… '=>'ð…˜ð…¥ð…®','ð…¡'=>'ð…˜ð…¥ð…¯','ð…¢'=>'ð…˜ð…¥ð…°','ð…£'=>'ð…˜ð…¥ð…±','ð…¤'=>'ð…˜ð…¥ð…²','ð†»'=>'ð†¹ð…¥','ð†¼'=>'ð†ºð…¥','ð†½'=>'ð†¹ð…¥ð…®','ð†¾'=>'ð†ºð…¥ð…®','ð†¿'=>'ð†¹ð…¥ð…¯','ð‡€'=>'ð†ºð…¥ð…¯','丽'=>'丽','ð¯ '=>'丸','乁'=>'ä¹','𠄢'=>'ð „¢','你'=>'ä½ ','侮'=>'ä¾®','侻'=>'ä¾»','倂'=>'倂','偺'=>'åº','備'=>'å‚™','僧'=>'僧','像'=>'åƒ','㒞'=>'ã’ž','ð¯ '=>'𠘺','免'=>'å…','ð¯ '=>'å…”','ð¯ '=>'å…¤','具'=>'å…·','𠔜'=>'𠔜','㒹'=>'ã’¹','內'=>'å…§','再'=>'å†','𠕋'=>'ð •‹','冗'=>'冗','冤'=>'冤','仌'=>'仌','冬'=>'冬','况'=>'况','𩇟'=>'𩇟','ð¯ '=>'凵','刃'=>'刃','㓟'=>'ã“Ÿ','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','㔕'=>'㔕','勇'=>'勇','勉'=>'勉','勤'=>'勤','勺'=>'勺','包'=>'包','匆'=>'匆','北'=>'北','卉'=>'å‰','卑'=>'å‘','博'=>'åš','即'=>'å³','卽'=>'å½','卿'=>'å¿','卿'=>'å¿','卿'=>'å¿','𠨬'=>'𠨬','灰'=>'ç°','及'=>'åŠ','叟'=>'åŸ','𠭣'=>'ð ­£','叫'=>'å«','叱'=>'å±','吆'=>'å†','咞'=>'å’ž','吸'=>'å¸','呈'=>'呈','周'=>'周','咢'=>'å’¢','ð¯¡'=>'哶','唐'=>'å”','啓'=>'å•“','啣'=>'å•£','善'=>'å–„','善'=>'å–„','喙'=>'å–™','喫'=>'å–«','喳'=>'å–³','嗂'=>'å—‚','圖'=>'圖','嘆'=>'嘆','ð¯¡'=>'圗','噑'=>'噑','ð¯¡'=>'å™´','ð¯¡'=>'切','壮'=>'壮','城'=>'城','埴'=>'埴','堍'=>'å ','型'=>'åž‹','堲'=>'å ²','報'=>'å ±','墬'=>'墬','𡓤'=>'𡓤','売'=>'売','壷'=>'壷','夆'=>'夆','ð¯¡'=>'多','夢'=>'夢','奢'=>'奢','𡚨'=>'𡚨','𡛪'=>'𡛪','姬'=>'姬','娛'=>'娛','娧'=>'娧','姘'=>'姘','婦'=>'婦','㛮'=>'ã›®','㛼'=>'㛼','嬈'=>'嬈','嬾'=>'嬾','嬾'=>'嬾','𡧈'=>'𡧈','寃'=>'寃','寘'=>'寘','寧'=>'寧','寳'=>'寳','𡬘'=>'𡬘','寿'=>'寿','将'=>'å°†','当'=>'当','尢'=>'å°¢','㞁'=>'ãž','屠'=>'å± ','屮'=>'å±®','峀'=>'å³€','岍'=>'å²','𡷤'=>'ð¡·¤','嵃'=>'嵃','𡷦'=>'ð¡·¦','嵮'=>'åµ®','嵫'=>'嵫','嵼'=>'åµ¼','ð¯¢'=>'å·¡','巢'=>'å·¢','㠯'=>'ã ¯','巽'=>'å·½','帨'=>'帨','帽'=>'帽','幩'=>'幩','㡢'=>'ã¡¢','𢆃'=>'𢆃','㡼'=>'㡼','庰'=>'庰','庳'=>'庳','ð¯¢'=>'庶','廊'=>'廊','ð¯¢'=>'𪎒','ð¯¢'=>'廾','𢌱'=>'𢌱','𢌱'=>'𢌱','舁'=>'èˆ','弢'=>'å¼¢','弢'=>'å¼¢','㣇'=>'㣇','𣊸'=>'𣊸','𦇚'=>'𦇚','形'=>'å½¢','彫'=>'彫','㣣'=>'㣣','徚'=>'徚','ð¯¢'=>'å¿','志'=>'å¿—','忹'=>'忹','悁'=>'æ‚','㤺'=>'㤺','㤜'=>'㤜','悔'=>'æ‚”','𢛔'=>'𢛔','惇'=>'惇','慈'=>'æ…ˆ','慌'=>'æ…Œ','慎'=>'æ…Ž','慌'=>'æ…Œ','慺'=>'æ…º','憎'=>'憎','憲'=>'憲','憤'=>'憤','憯'=>'憯','懞'=>'懞','懲'=>'懲','懶'=>'懶','成'=>'æˆ','戛'=>'戛','扝'=>'æ‰','抱'=>'抱','拔'=>'æ‹”','捐'=>'æ','𢬌'=>'𢬌','挽'=>'挽','拼'=>'拼','捨'=>'æ¨','掃'=>'掃','揤'=>'æ¤','𢯱'=>'𢯱','搢'=>'æ¢','揅'=>'æ…','ð¯£'=>'掩','㨮'=>'㨮','摩'=>'æ‘©','摾'=>'摾','撝'=>'æ’','摷'=>'æ‘·','㩬'=>'㩬','敏'=>'æ•','敬'=>'敬','𣀊'=>'𣀊','旣'=>'æ—£','書'=>'書','ð¯£'=>'晉','㬙'=>'㬙','ð¯£'=>'æš‘','ð¯£'=>'㬈','㫤'=>'㫤','冒'=>'冒','冕'=>'冕','最'=>'最','暜'=>'æšœ','肭'=>'è‚­','䏙'=>'ä™','朗'=>'朗','望'=>'望','朡'=>'朡','杞'=>'æž','杓'=>'æ“','ð¯£'=>'ð£ƒ','㭉'=>'ã­‰','柺'=>'柺','枅'=>'æž…','桒'=>'æ¡’','梅'=>'梅','𣑭'=>'𣑭','梎'=>'梎','栟'=>'æ Ÿ','椔'=>'椔','㮝'=>'ã®','楂'=>'楂','榣'=>'榣','槪'=>'槪','檨'=>'檨','𣚣'=>'𣚣','櫛'=>'æ«›','㰘'=>'ã°˜','次'=>'次','𣢧'=>'𣢧','歔'=>'æ­”','㱎'=>'㱎','歲'=>'æ­²','殟'=>'殟','殺'=>'殺','殻'=>'æ®»','𣪍'=>'ð£ª','𡴋'=>'ð¡´‹','𣫺'=>'𣫺','汎'=>'汎','𣲼'=>'𣲼','沿'=>'沿','泍'=>'æ³','汧'=>'汧','洖'=>'æ´–','派'=>'æ´¾','ð¯¤'=>'æµ·','流'=>'æµ','浩'=>'浩','浸'=>'浸','涅'=>'涅','𣴞'=>'𣴞','洴'=>'æ´´','港'=>'港','湮'=>'æ¹®','㴳'=>'ã´³','滋'=>'滋','滇'=>'滇','ð¯¤'=>'𣻑','淹'=>'æ·¹','ð¯¤'=>'æ½®','ð¯¤'=>'𣽞','𣾎'=>'𣾎','濆'=>'濆','瀹'=>'瀹','瀞'=>'瀞','瀛'=>'瀛','㶖'=>'㶖','灊'=>'çŠ','災'=>'ç½','灷'=>'ç·','炭'=>'ç‚­','𠔥'=>'𠔥','煅'=>'ç……','ð¯¤'=>'𤉣','熜'=>'熜','𤎫'=>'𤎫','爨'=>'爨','爵'=>'爵','牐'=>'ç‰','𤘈'=>'𤘈','犀'=>'犀','犕'=>'犕','𤜵'=>'𤜵','𤠔'=>'𤠔','獺'=>'çº','王'=>'王','㺬'=>'㺬','玥'=>'玥','㺸'=>'㺸','㺸'=>'㺸','瑇'=>'瑇','瑜'=>'ç‘œ','瑱'=>'瑱','璅'=>'ç’…','瓊'=>'ç“Š','㼛'=>'ã¼›','甤'=>'甤','𤰶'=>'𤰶','甾'=>'甾','𤲒'=>'𤲒','異'=>'ç•°','𢆟'=>'𢆟','瘐'=>'ç˜','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'ð¥„','㿼'=>'㿼','䀈'=>'䀈','直'=>'ç›´','ð¯¥'=>'𥃳','𥃲'=>'𥃲','𥄙'=>'𥄙','𥄳'=>'𥄳','眞'=>'眞','真'=>'真','真'=>'真','睊'=>'çŠ','䀹'=>'䀹','瞋'=>'çž‹','䁆'=>'ä†','䂖'=>'ä‚–','ð¯¥'=>'ð¥','硎'=>'ç¡Ž','ð¯¥'=>'碌','ð¯¥'=>'磌','䃣'=>'䃣','𥘦'=>'𥘦','祖'=>'祖','𥚚'=>'𥚚','𥛅'=>'𥛅','福'=>'ç¦','秫'=>'秫','䄯'=>'䄯','穀'=>'ç©€','穊'=>'ç©Š','穏'=>'ç©','𥥼'=>'𥥼','ð¯¥'=>'𥪧','𥪧'=>'𥪧','竮'=>'ç«®','䈂'=>'䈂','𥮫'=>'𥮫','篆'=>'篆','築'=>'築','䈧'=>'䈧','𥲀'=>'𥲀','糒'=>'ç³’','䊠'=>'䊠','糨'=>'糨','糣'=>'ç³£','紀'=>'ç´€','𥾆'=>'𥾆','絣'=>'çµ£','䌁'=>'äŒ','緇'=>'ç·‡','縂'=>'縂','繅'=>'ç¹…','䌴'=>'䌴','𦈨'=>'𦈨','𦉇'=>'𦉇','䍙'=>'ä™','𦋙'=>'𦋙','罺'=>'罺','𦌾'=>'𦌾','羕'=>'羕','翺'=>'翺','者'=>'者','𦓚'=>'𦓚','𦔣'=>'𦔣','聠'=>'è ','𦖨'=>'𦖨','聰'=>'è°','𣍟'=>'ð£Ÿ','ð¯¦'=>'ä•','育'=>'育','脃'=>'脃','䐋'=>'ä‹','脾'=>'脾','媵'=>'媵','𦞧'=>'𦞧','𦞵'=>'𦞵','𣎓'=>'𣎓','𣎜'=>'𣎜','舁'=>'èˆ','舄'=>'舄','ð¯¦'=>'辞','䑫'=>'ä‘«','ð¯¦'=>'芑','ð¯¦'=>'芋','芝'=>'èŠ','劳'=>'劳','花'=>'花','芳'=>'芳','芽'=>'芽','苦'=>'苦','𦬼'=>'𦬼','若'=>'è‹¥','茝'=>'èŒ','荣'=>'è£','莭'=>'莭','茣'=>'茣','ð¯¦'=>'莽','菧'=>'è§','著'=>'è‘—','荓'=>'è“','菊'=>'èŠ','菌'=>'èŒ','菜'=>'èœ','𦰶'=>'𦰶','𦵫'=>'𦵫','𦳕'=>'𦳕','䔫'=>'䔫','蓱'=>'蓱','蓳'=>'蓳','蔖'=>'è”–','𧏊'=>'ð§Š','蕤'=>'蕤','𦼬'=>'𦼬','䕝'=>'ä•','䕡'=>'ä•¡','𦾱'=>'𦾱','𧃒'=>'𧃒','䕫'=>'ä•«','虐'=>'è™','虜'=>'虜','虧'=>'虧','虩'=>'虩','蚩'=>'èš©','蚈'=>'蚈','蜎'=>'蜎','蛢'=>'蛢','蝹'=>'è¹','蜨'=>'蜨','蝫'=>'è«','螆'=>'螆','䗗'=>'ä——','蟡'=>'蟡','ð¯§'=>'è ','䗹'=>'ä—¹','衠'=>'è¡ ','衣'=>'è¡£','𧙧'=>'𧙧','裗'=>'裗','裞'=>'裞','䘵'=>'䘵','裺'=>'裺','㒻'=>'ã’»','𧢮'=>'𧢮','𧥦'=>'𧥦','ð¯§'=>'äš¾','䛇'=>'䛇','ð¯§'=>'誠','ð¯§'=>'è«­','變'=>'變','豕'=>'豕','𧲨'=>'𧲨','貫'=>'貫','賁'=>'è³','贛'=>'è´›','起'=>'èµ·','𧼯'=>'𧼯','𠠄'=>'ð  „','跋'=>'è·‹','趼'=>'趼','跰'=>'è·°','ð¯§'=>'𠣞','軔'=>'è»”','輸'=>'輸','𨗒'=>'𨗒','𨗭'=>'𨗭','邔'=>'é‚”','郱'=>'郱','鄑'=>'é„‘','𨜮'=>'𨜮','鄛'=>'é„›','鈸'=>'鈸','鋗'=>'é‹—','鋘'=>'鋘','鉼'=>'鉼','鏹'=>'é¹','鐕'=>'é•','𨯺'=>'𨯺','開'=>'é–‹','䦕'=>'䦕','閷'=>'é–·','𨵷'=>'𨵷','䧦'=>'䧦','雃'=>'雃','嶲'=>'嶲','霣'=>'霣','𩅅'=>'ð©……','𩈚'=>'𩈚','䩮'=>'ä©®','䩶'=>'䩶','韠'=>'韠','𩐊'=>'ð©Š','䪲'=>'䪲','𩒖'=>'ð©’–','頋'=>'é ‹','頋'=>'é ‹','頩'=>'é ©','ð¯¨'=>'ð©–¶','飢'=>'飢','䬳'=>'䬳','餩'=>'餩','馧'=>'馧','駂'=>'駂','駾'=>'駾','䯎'=>'䯎','𩬰'=>'𩬰','鬒'=>'鬒','鱀'=>'é±€','鳽'=>'é³½','ð¯¨'=>'䳎','䳭'=>'ä³­','ð¯¨'=>'鵧','ð¯¨'=>'𪃎','䳸'=>'䳸','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','麻'=>'麻','䵖'=>'äµ–','黹'=>'黹','黾'=>'黾','鼅'=>'é¼…','鼏'=>'é¼','鼖'=>'é¼–','鼻'=>'é¼»','ð¯¨'=>'𪘀'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/utf_compatibility_decomp.php b/phpBB/includes/utf/data/utf_compatibility_decomp.php
new file mode 100644
index 0000000000..08a7a047a4
--- /dev/null
+++ b/phpBB/includes/utf/data/utf_compatibility_decomp.php
@@ -0,0 +1,2 @@
+<?php
+$GLOBALS['utf_compatibility_decomp']=array(' '=>' ','¨'=>' ̈','ª'=>'a','¯'=>' Ì„','²'=>'2','³'=>'3','´'=>' Ì','µ'=>'μ','¸'=>' ̧','¹'=>'1','º'=>'o','¼'=>'1â„4','½'=>'1â„2','¾'=>'3â„4','À'=>'AÌ€','Ã'=>'AÌ','Â'=>'AÌ‚','Ã'=>'Ã','Ä'=>'Ä','Ã…'=>'AÌŠ','Ç'=>'Ç','È'=>'EÌ€','É'=>'EÌ','Ê'=>'EÌ‚','Ë'=>'Ë','ÃŒ'=>'IÌ€','Ã'=>'IÌ','ÃŽ'=>'IÌ‚','Ã'=>'Ï','Ñ'=>'Ñ','Ã’'=>'OÌ€','Ó'=>'OÌ','Ô'=>'OÌ‚','Õ'=>'Õ','Ö'=>'Ö','Ù'=>'UÌ€','Ú'=>'UÌ','Û'=>'UÌ‚','Ãœ'=>'Ü','Ã'=>'YÌ','à'=>'aÌ€','á'=>'aÌ','â'=>'aÌ‚','ã'=>'ã','ä'=>'ä','Ã¥'=>'aÌŠ','ç'=>'ç','è'=>'eÌ€','é'=>'eÌ','ê'=>'eÌ‚','ë'=>'ë','ì'=>'iÌ€','í'=>'iÌ','î'=>'iÌ‚','ï'=>'ï','ñ'=>'ñ','ò'=>'oÌ€','ó'=>'oÌ','ô'=>'oÌ‚','õ'=>'õ','ö'=>'ö','ù'=>'uÌ€','ú'=>'uÌ','û'=>'uÌ‚','ü'=>'ü','ý'=>'yÌ','ÿ'=>'ÿ','Ä€'=>'AÌ„','Ä'=>'aÌ„','Ä‚'=>'Ă','ă'=>'ă','Ä„'=>'Ą','Ä…'=>'ą','Ć'=>'CÌ','ć'=>'cÌ','Ĉ'=>'CÌ‚','ĉ'=>'cÌ‚','ÄŠ'=>'Ċ','Ä‹'=>'ċ','ÄŒ'=>'CÌŒ','Ä'=>'cÌŒ','ÄŽ'=>'DÌŒ','Ä'=>'dÌŒ','Ä’'=>'EÌ„','Ä“'=>'eÌ„','Ä”'=>'Ĕ','Ä•'=>'ĕ','Ä–'=>'Ė','Ä—'=>'ė','Ę'=>'Ę','Ä™'=>'ę','Äš'=>'EÌŒ','Ä›'=>'eÌŒ','Äœ'=>'GÌ‚','Ä'=>'gÌ‚','Äž'=>'Ğ','ÄŸ'=>'ğ','Ä '=>'Ġ','Ä¡'=>'ġ','Ä¢'=>'Ģ','Ä£'=>'ģ','Ĥ'=>'HÌ‚','Ä¥'=>'hÌ‚','Ĩ'=>'Ĩ','Ä©'=>'ĩ','Ī'=>'IÌ„','Ä«'=>'iÌ„','Ĭ'=>'Ĭ','Ä­'=>'ĭ','Ä®'=>'Į','į'=>'į','Ä°'=>'İ','IJ'=>'IJ','ij'=>'ij','Ä´'=>'JÌ‚','ĵ'=>'jÌ‚','Ķ'=>'Ķ','Ä·'=>'ķ','Ĺ'=>'LÌ','ĺ'=>'lÌ','Ä»'=>'Ļ','ļ'=>'ļ','Ľ'=>'LÌŒ','ľ'=>'lÌŒ','Ä¿'=>'L·','Å€'=>'l·','Ń'=>'NÌ','Å„'=>'nÌ','Å…'=>'Ņ','ņ'=>'ņ','Ň'=>'NÌŒ','ň'=>'nÌŒ','ʼn'=>'ʼn','ÅŒ'=>'OÌ„','Å'=>'oÌ„','ÅŽ'=>'Ŏ','Å'=>'ŏ','Å'=>'OÌ‹','Å‘'=>'oÌ‹','Å”'=>'RÌ','Å•'=>'rÌ','Å–'=>'Ŗ','Å—'=>'ŗ','Ř'=>'RÌŒ','Å™'=>'rÌŒ','Åš'=>'SÌ','Å›'=>'sÌ','Åœ'=>'SÌ‚','Å'=>'sÌ‚','Åž'=>'Ş','ÅŸ'=>'ş','Å '=>'SÌŒ','Å¡'=>'sÌŒ','Å¢'=>'Ţ','Å£'=>'ţ','Ť'=>'TÌŒ','Å¥'=>'tÌŒ','Ũ'=>'Ũ','Å©'=>'ũ','Ū'=>'UÌ„','Å«'=>'uÌ„','Ŭ'=>'Ŭ','Å­'=>'ŭ','Å®'=>'UÌŠ','ů'=>'uÌŠ','Å°'=>'UÌ‹','ű'=>'uÌ‹','Ų'=>'Ų','ų'=>'ų','Å´'=>'WÌ‚','ŵ'=>'wÌ‚','Ŷ'=>'YÌ‚','Å·'=>'yÌ‚','Ÿ'=>'Ÿ','Ź'=>'ZÌ','ź'=>'zÌ','Å»'=>'Ż','ż'=>'ż','Ž'=>'ZÌŒ','ž'=>'zÌŒ','Å¿'=>'s','Æ '=>'OÌ›','Æ¡'=>'oÌ›','Ư'=>'UÌ›','Æ°'=>'uÌ›','Ç„'=>'DZÌŒ','Ç…'=>'DzÌŒ','dž'=>'dzÌŒ','LJ'=>'LJ','Lj'=>'Lj','lj'=>'lj','ÇŠ'=>'NJ','Ç‹'=>'Nj','ÇŒ'=>'nj','Ç'=>'AÌŒ','ÇŽ'=>'aÌŒ','Ç'=>'IÌŒ','Ç'=>'iÌŒ','Ç‘'=>'OÌŒ','Ç’'=>'oÌŒ','Ç“'=>'UÌŒ','Ç”'=>'uÌŒ','Ç•'=>'Ǖ','Ç–'=>'ǖ','Ç—'=>'ÜÌ','ǘ'=>'üÌ','Ç™'=>'Ǚ','Çš'=>'ǚ','Ç›'=>'Ǜ','Çœ'=>'ǜ','Çž'=>'Ǟ','ÇŸ'=>'ǟ','Ç '=>'Ǡ','Ç¡'=>'ǡ','Ç¢'=>'Ǣ','Ç£'=>'ǣ','Ǧ'=>'GÌŒ','ǧ'=>'gÌŒ','Ǩ'=>'KÌŒ','Ç©'=>'kÌŒ','Ǫ'=>'Ǫ','Ç«'=>'ǫ','Ǭ'=>'Ǭ','Ç­'=>'ǭ','Ç®'=>'Æ·ÌŒ','ǯ'=>'Ê’ÌŒ','Ç°'=>'jÌŒ','DZ'=>'DZ','Dz'=>'Dz','dz'=>'dz','Ç´'=>'GÌ','ǵ'=>'gÌ','Ǹ'=>'NÌ€','ǹ'=>'nÌ€','Ǻ'=>'AÌŠÌ','Ç»'=>'aÌŠÌ','Ǽ'=>'ÆÌ','ǽ'=>'æÌ','Ǿ'=>'ØÌ','Ç¿'=>'øÌ','È€'=>'AÌ','È'=>'aÌ','È‚'=>'AÌ‘','ȃ'=>'aÌ‘','È„'=>'EÌ','È…'=>'eÌ','Ȇ'=>'EÌ‘','ȇ'=>'eÌ‘','Ȉ'=>'IÌ','ȉ'=>'iÌ','ÈŠ'=>'IÌ‘','È‹'=>'iÌ‘','ÈŒ'=>'OÌ','È'=>'oÌ','ÈŽ'=>'OÌ‘','È'=>'oÌ‘','È'=>'RÌ','È‘'=>'rÌ','È’'=>'RÌ‘','È“'=>'rÌ‘','È”'=>'UÌ','È•'=>'uÌ','È–'=>'UÌ‘','È—'=>'uÌ‘','Ș'=>'Ș','È™'=>'ș','Èš'=>'Ț','È›'=>'ț','Èž'=>'HÌŒ','ÈŸ'=>'hÌŒ','Ȧ'=>'Ȧ','ȧ'=>'ȧ','Ȩ'=>'Ȩ','È©'=>'ȩ','Ȫ'=>'Ȫ','È«'=>'ȫ','Ȭ'=>'Ȭ','È­'=>'ȭ','È®'=>'Ȯ','ȯ'=>'ȯ','È°'=>'Ȱ','ȱ'=>'ȱ','Ȳ'=>'YÌ„','ȳ'=>'yÌ„','Ê°'=>'h','ʱ'=>'ɦ','ʲ'=>'j','ʳ'=>'r','Ê´'=>'ɹ','ʵ'=>'É»','ʶ'=>'Ê','Ê·'=>'w','ʸ'=>'y','˘'=>' ̆','Ë™'=>' ̇','Ëš'=>' ÌŠ','Ë›'=>' ̨','Ëœ'=>' ̃','Ë'=>' Ì‹','Ë '=>'É£','Ë¡'=>'l','Ë¢'=>'s','Ë£'=>'x','ˤ'=>'Ê•','Í€'=>'Ì€','Í'=>'Ì','̓'=>'Ì“','Í„'=>'̈Ì','Í´'=>'ʹ','ͺ'=>' Í…',';'=>';','΄'=>' Ì','Î…'=>' ̈Ì','Ά'=>'ΑÌ','·'=>'·','Έ'=>'ΕÌ','Ή'=>'ΗÌ','Ί'=>'ΙÌ','ÎŒ'=>'ΟÌ','ÎŽ'=>'Î¥Ì','Î'=>'ΩÌ','Î'=>'ϊÌ','Ϊ'=>'Ϊ','Ϋ'=>'Ϋ','ά'=>'αÌ','έ'=>'εÌ','ή'=>'ηÌ','ί'=>'ιÌ','ΰ'=>'ϋÌ','ÏŠ'=>'ϊ','Ï‹'=>'ϋ','ÏŒ'=>'οÌ','Ï'=>'Ï…Ì','ÏŽ'=>'ωÌ','Ï'=>'β','Ï‘'=>'θ','Ï’'=>'Î¥','Ï“'=>'Î¥Ì','Ï”'=>'Ϋ','Ï•'=>'φ','Ï–'=>'Ï€','Ï°'=>'κ','ϱ'=>'Ï','ϲ'=>'Ï‚','Ï´'=>'Θ','ϵ'=>'ε','Ϲ'=>'Σ','Ѐ'=>'Ѐ','Ð'=>'Ё','Ѓ'=>'ГÌ','Ї'=>'Ї','ÐŒ'=>'КÌ','Ð'=>'Ѝ','ÐŽ'=>'Ў','Й'=>'Й','й'=>'й','Ñ'=>'ѐ','Ñ‘'=>'ё','Ñ“'=>'гÌ','Ñ—'=>'ї','Ñœ'=>'кÌ','Ñ'=>'ѝ','Ñž'=>'ў','Ѷ'=>'Ñ´Ì','Ñ·'=>'ѵÌ','Ó'=>'Ӂ','Ó‚'=>'ӂ','Ó'=>'Ð̆','Ó‘'=>'ӑ','Ó’'=>'Ð̈','Ó“'=>'ӓ','Ó–'=>'Ӗ','Ó—'=>'ӗ','Óš'=>'Ӛ','Ó›'=>'ӛ','Óœ'=>'Ӝ','Ó'=>'ӝ','Óž'=>'Ӟ','ÓŸ'=>'ӟ','Ó¢'=>'Ӣ','Ó£'=>'ӣ','Ó¤'=>'Ӥ','Ó¥'=>'ӥ','Ó¦'=>'Ӧ','Ó§'=>'ӧ','Óª'=>'Ӫ','Ó«'=>'ӫ','Ó¬'=>'Ӭ','Ó­'=>'Ñ̈','Ó®'=>'Ӯ','Ó¯'=>'ӯ','Ó°'=>'Ӱ','Ó±'=>'ӱ','Ó²'=>'Ӳ','Ó³'=>'ӳ','Ó´'=>'Ӵ','Óµ'=>'ӵ','Ó¸'=>'Ӹ','Ó¹'=>'ӹ','Ö‡'=>'Õ¥Ö‚','Ø¢'=>'آ','Ø£'=>'أ','ؤ'=>'ÙˆÙ”','Ø¥'=>'إ','ئ'=>'ÙŠÙ”','Ùµ'=>'اٴ','Ù¶'=>'وٴ','Ù·'=>'Û‡Ù´','Ù¸'=>'يٴ','Û€'=>'Û•Ù”','Û‚'=>'ÛÙ”','Û“'=>'Û’Ù”','ऩ'=>'ऩ','ऱ'=>'ऱ','ऴ'=>'ऴ','क़'=>'क़','ख़'=>'ख़','ग़'=>'ग़','ज़'=>'ज़','ड़'=>'ड़','à¥'=>'ढ़','फ़'=>'फ़','य़'=>'य़','ো'=>'ো','ৌ'=>'ৌ','ড়'=>'ড়','à§'=>'ঢ়','য়'=>'য়','ਲ਼'=>'ਲ਼','ਸ਼'=>'ਸ਼','à©™'=>'ਖ਼','à©š'=>'ਗ਼','à©›'=>'ਜ਼','à©ž'=>'ਫ਼','à­ˆ'=>'ୈ','à­‹'=>'ୋ','à­Œ'=>'ୌ','à­œ'=>'ଡ଼','à­'=>'ଢ଼','à®”'=>'ஔ','ொ'=>'ொ','ோ'=>'ோ','ௌ'=>'ௌ','ై'=>'ై','à³€'=>'ೀ','ೇ'=>'ೇ','ೈ'=>'ೈ','ೊ'=>'ೊ','ೋ'=>'ೋ','ൊ'=>'ൊ','ോ'=>'ോ','ൌ'=>'ൌ','à·š'=>'ේ','à·œ'=>'à·™à·','à·'=>'à·™à·à·Š','à·ž'=>'ෞ','ำ'=>'à¹à¸²','ຳ'=>'à»àº²','ໜ'=>'ຫນ','à»'=>'ຫມ','༌'=>'་','གྷ'=>'གྷ','à½'=>'ཌྷ','དྷ'=>'དྷ','བྷ'=>'བྷ','ཛྷ'=>'ཛྷ','ཀྵ'=>'ཀྵ','ཱི'=>'ཱི','ཱུ'=>'ཱུ','ྲྀ'=>'ྲྀ','ཷ'=>'ྲཱྀ','ླྀ'=>'ླྀ','ཹ'=>'ླཱྀ','à¾'=>'ཱྀ','ྒྷ'=>'ྒྷ','à¾'=>'ྜྷ','ྡྷ'=>'ྡྷ','ྦྷ'=>'ྦྷ','ྫྷ'=>'ྫྷ','ྐྵ'=>'à¾à¾µ','ဦ'=>'ဦ','ჼ'=>'ნ','ᬆ'=>'ᬆ','ᬈ'=>'ᬈ','ᬊ'=>'ᬊ','ᬌ'=>'ᬌ','ᬎ'=>'á¬á¬µ','ᬒ'=>'ᬒ','ᬻ'=>'ᬻ','ᬽ'=>'ᬽ','á­€'=>'ᭀ','á­'=>'ᭁ','á­ƒ'=>'ᭃ','á´¬'=>'A','á´­'=>'Æ','á´®'=>'B','á´°'=>'D','á´±'=>'E','á´²'=>'ÆŽ','á´³'=>'G','á´´'=>'H','á´µ'=>'I','á´¶'=>'J','á´·'=>'K','á´¸'=>'L','á´¹'=>'M','á´º'=>'N','á´¼'=>'O','á´½'=>'È¢','á´¾'=>'P','á´¿'=>'R','áµ€'=>'T','áµ'=>'U','ᵂ'=>'W','ᵃ'=>'a','ᵄ'=>'É','áµ…'=>'É‘','ᵆ'=>'á´‚','ᵇ'=>'b','ᵈ'=>'d','ᵉ'=>'e','ᵊ'=>'É™','ᵋ'=>'É›','ᵌ'=>'Éœ','áµ'=>'g','áµ'=>'k','áµ'=>'m','ᵑ'=>'Å‹','áµ’'=>'o','ᵓ'=>'É”','áµ”'=>'á´–','ᵕ'=>'á´—','áµ–'=>'p','áµ—'=>'t','ᵘ'=>'u','áµ™'=>'á´','ᵚ'=>'ɯ','áµ›'=>'v','ᵜ'=>'á´¥','áµ'=>'β','ᵞ'=>'γ','ᵟ'=>'δ','áµ '=>'φ','ᵡ'=>'χ','áµ¢'=>'i','áµ£'=>'r','ᵤ'=>'u','áµ¥'=>'v','ᵦ'=>'β','ᵧ'=>'γ','ᵨ'=>'Ï','ᵩ'=>'φ','ᵪ'=>'χ','ᵸ'=>'н','ᶛ'=>'É’','ᶜ'=>'c','á¶'=>'É•','ᶞ'=>'ð','ᶟ'=>'Éœ','ᶠ'=>'f','ᶡ'=>'ÉŸ','ᶢ'=>'É¡','ᶣ'=>'É¥','ᶤ'=>'ɨ','ᶥ'=>'É©','ᶦ'=>'ɪ','ᶧ'=>'áµ»','ᶨ'=>'Ê','ᶩ'=>'É­','ᶪ'=>'ᶅ','ᶫ'=>'ÊŸ','ᶬ'=>'ɱ','ᶭ'=>'É°','ᶮ'=>'ɲ','ᶯ'=>'ɳ','ᶰ'=>'É´','ᶱ'=>'ɵ','ᶲ'=>'ɸ','ᶳ'=>'Ê‚','ᶴ'=>'ʃ','ᶵ'=>'Æ«','ᶶ'=>'ʉ','ᶷ'=>'ÊŠ','ᶸ'=>'á´œ','ᶹ'=>'Ê‹','ᶺ'=>'ÊŒ','ᶻ'=>'z','ᶼ'=>'Ê','ᶽ'=>'Ê‘','ᶾ'=>'Ê’','ᶿ'=>'θ','Ḁ'=>'AÌ¥','á¸'=>'aÌ¥','Ḃ'=>'Ḃ','ḃ'=>'ḃ','Ḅ'=>'BÌ£','ḅ'=>'bÌ£','Ḇ'=>'Ḇ','ḇ'=>'ḇ','Ḉ'=>'ÇÌ','ḉ'=>'çÌ','Ḋ'=>'Ḋ','ḋ'=>'ḋ','Ḍ'=>'DÌ£','á¸'=>'dÌ£','Ḏ'=>'Ḏ','á¸'=>'ḏ','á¸'=>'Ḑ','ḑ'=>'ḑ','Ḓ'=>'DÌ­','ḓ'=>'dÌ­','Ḕ'=>'EÌ„Ì€','ḕ'=>'eÌ„Ì€','Ḗ'=>'EÌ„Ì','ḗ'=>'eÌ„Ì','Ḙ'=>'EÌ­','ḙ'=>'eÌ­','Ḛ'=>'EÌ°','ḛ'=>'eÌ°','Ḝ'=>'Ḝ','á¸'=>'ḝ','Ḟ'=>'Ḟ','ḟ'=>'ḟ','Ḡ'=>'GÌ„','ḡ'=>'gÌ„','Ḣ'=>'Ḣ','ḣ'=>'ḣ','Ḥ'=>'HÌ£','ḥ'=>'hÌ£','Ḧ'=>'Ḧ','ḧ'=>'ḧ','Ḩ'=>'Ḩ','ḩ'=>'ḩ','Ḫ'=>'HÌ®','ḫ'=>'hÌ®','Ḭ'=>'IÌ°','ḭ'=>'iÌ°','Ḯ'=>'ÏÌ','ḯ'=>'ïÌ','Ḱ'=>'KÌ','ḱ'=>'kÌ','Ḳ'=>'KÌ£','ḳ'=>'kÌ£','Ḵ'=>'Ḵ','ḵ'=>'ḵ','Ḷ'=>'LÌ£','ḷ'=>'lÌ£','Ḹ'=>'Ḹ','ḹ'=>'ḹ','Ḻ'=>'Ḻ','ḻ'=>'ḻ','Ḽ'=>'LÌ­','ḽ'=>'lÌ­','Ḿ'=>'MÌ','ḿ'=>'mÌ','á¹€'=>'Ṁ','á¹'=>'ṁ','Ṃ'=>'MÌ£','ṃ'=>'mÌ£','Ṅ'=>'Ṅ','á¹…'=>'ṅ','Ṇ'=>'NÌ£','ṇ'=>'nÌ£','Ṉ'=>'Ṉ','ṉ'=>'ṉ','Ṋ'=>'NÌ­','ṋ'=>'nÌ­','Ṍ'=>'ÕÌ','á¹'=>'õÌ','Ṏ'=>'Ṏ','á¹'=>'ṏ','á¹'=>'OÌ„Ì€','ṑ'=>'oÌ„Ì€','á¹’'=>'OÌ„Ì','ṓ'=>'oÌ„Ì','á¹”'=>'PÌ','ṕ'=>'pÌ','á¹–'=>'Ṗ','á¹—'=>'ṗ','Ṙ'=>'Ṙ','á¹™'=>'ṙ','Ṛ'=>'RÌ£','á¹›'=>'rÌ£','Ṝ'=>'Ṝ','á¹'=>'ṝ','Ṟ'=>'Ṟ','ṟ'=>'ṟ','á¹ '=>'Ṡ','ṡ'=>'ṡ','á¹¢'=>'SÌ£','á¹£'=>'sÌ£','Ṥ'=>'SÌ̇','á¹¥'=>'sÌ̇','Ṧ'=>'Ṧ','ṧ'=>'ṧ','Ṩ'=>'Ṩ','ṩ'=>'ṩ','Ṫ'=>'Ṫ','ṫ'=>'ṫ','Ṭ'=>'TÌ£','á¹­'=>'tÌ£','á¹®'=>'Ṯ','ṯ'=>'ṯ','á¹°'=>'TÌ­','á¹±'=>'tÌ­','á¹²'=>'Ṳ','á¹³'=>'ṳ','á¹´'=>'UÌ°','á¹µ'=>'uÌ°','Ṷ'=>'UÌ­','á¹·'=>'uÌ­','Ṹ'=>'ŨÌ','á¹¹'=>'ũÌ','Ṻ'=>'Ṻ','á¹»'=>'ṻ','á¹¼'=>'Ṽ','á¹½'=>'ṽ','á¹¾'=>'VÌ£','ṿ'=>'vÌ£','Ẁ'=>'WÌ€','áº'=>'wÌ€','Ẃ'=>'WÌ','ẃ'=>'wÌ','Ẅ'=>'Ẅ','ẅ'=>'ẅ','Ẇ'=>'Ẇ','ẇ'=>'ẇ','Ẉ'=>'WÌ£','ẉ'=>'wÌ£','Ẋ'=>'Ẋ','ẋ'=>'ẋ','Ẍ'=>'Ẍ','áº'=>'ẍ','Ẏ'=>'Ẏ','áº'=>'ẏ','áº'=>'ZÌ‚','ẑ'=>'zÌ‚','Ẓ'=>'ZÌ£','ẓ'=>'zÌ£','Ẕ'=>'Ẕ','ẕ'=>'ẕ','ẖ'=>'ẖ','ẗ'=>'ẗ','ẘ'=>'wÌŠ','ẙ'=>'yÌŠ','ẚ'=>'aʾ','ẛ'=>'ṡ','Ạ'=>'AÌ£','ạ'=>'aÌ£','Ả'=>'Ả','ả'=>'ả','Ấ'=>'AÌ‚Ì','ấ'=>'aÌ‚Ì','Ầ'=>'AÌ‚Ì€','ầ'=>'aÌ‚Ì€','Ẩ'=>'Ẩ','ẩ'=>'ẩ','Ẫ'=>'Ẫ','ẫ'=>'ẫ','Ậ'=>'Ậ','ậ'=>'ậ','Ắ'=>'ĂÌ','ắ'=>'ăÌ','Ằ'=>'Ằ','ằ'=>'ằ','Ẳ'=>'Ẳ','ẳ'=>'ẳ','Ẵ'=>'Ẵ','ẵ'=>'ẵ','Ặ'=>'Ặ','ặ'=>'ặ','Ẹ'=>'EÌ£','ẹ'=>'eÌ£','Ẻ'=>'Ẻ','ẻ'=>'ẻ','Ẽ'=>'Ẽ','ẽ'=>'ẽ','Ế'=>'EÌ‚Ì','ế'=>'eÌ‚Ì','Ề'=>'EÌ‚Ì€','á»'=>'eÌ‚Ì€','Ể'=>'Ể','ể'=>'ể','Ễ'=>'Ễ','á»…'=>'ễ','Ệ'=>'Ệ','ệ'=>'ệ','Ỉ'=>'Ỉ','ỉ'=>'ỉ','Ị'=>'IÌ£','ị'=>'iÌ£','Ọ'=>'OÌ£','á»'=>'oÌ£','Ỏ'=>'Ỏ','á»'=>'ỏ','á»'=>'OÌ‚Ì','ố'=>'oÌ‚Ì','á»’'=>'OÌ‚Ì€','ồ'=>'oÌ‚Ì€','á»”'=>'Ổ','ổ'=>'ổ','á»–'=>'Ỗ','á»—'=>'ỗ','Ộ'=>'Ộ','á»™'=>'ộ','Ớ'=>'OÌ›Ì','á»›'=>'oÌ›Ì','Ờ'=>'Ờ','á»'=>'ờ','Ở'=>'Ở','ở'=>'ở','á» '=>'Ỡ','ỡ'=>'ỡ','Ợ'=>'Ợ','ợ'=>'ợ','Ụ'=>'UÌ£','ụ'=>'uÌ£','Ủ'=>'Ủ','ủ'=>'ủ','Ứ'=>'UÌ›Ì','ứ'=>'uÌ›Ì','Ừ'=>'Ừ','ừ'=>'ừ','Ử'=>'Ử','á»­'=>'ử','á»®'=>'Ữ','ữ'=>'ữ','á»°'=>'Ự','á»±'=>'ự','Ỳ'=>'YÌ€','ỳ'=>'yÌ€','á»´'=>'YÌ£','ỵ'=>'yÌ£','Ỷ'=>'Ỷ','á»·'=>'ỷ','Ỹ'=>'Ỹ','ỹ'=>'ỹ','á¼€'=>'ἀ','á¼'=>'ἁ','ἂ'=>'ἂ','ἃ'=>'ἃ','ἄ'=>'ἀÌ','á¼…'=>'ἁÌ','ἆ'=>'ἆ','ἇ'=>'ἇ','Ἀ'=>'Ἀ','Ἁ'=>'Ἁ','Ἂ'=>'Ἂ','Ἃ'=>'Ἃ','Ἄ'=>'ἈÌ','á¼'=>'ἉÌ','Ἆ'=>'Ἆ','á¼'=>'Ἇ','á¼'=>'ἐ','ἑ'=>'ἑ','á¼’'=>'ἒ','ἓ'=>'ἓ','á¼”'=>'ἐÌ','ἕ'=>'ἑÌ','Ἐ'=>'Ἐ','á¼™'=>'Ἑ','Ἒ'=>'Ἒ','á¼›'=>'Ἓ','Ἔ'=>'ἘÌ','á¼'=>'ἙÌ','á¼ '=>'ἠ','ἡ'=>'ἡ','á¼¢'=>'ἢ','á¼£'=>'ἣ','ἤ'=>'ἠÌ','á¼¥'=>'ἡÌ','ἦ'=>'ἦ','ἧ'=>'ἧ','Ἠ'=>'Ἠ','Ἡ'=>'Ἡ','Ἢ'=>'Ἢ','Ἣ'=>'Ἣ','Ἤ'=>'ἨÌ','á¼­'=>'ἩÌ','á¼®'=>'Ἦ','Ἧ'=>'Ἧ','á¼°'=>'ἰ','á¼±'=>'ἱ','á¼²'=>'ἲ','á¼³'=>'ἳ','á¼´'=>'ἰÌ','á¼µ'=>'ἱÌ','ἶ'=>'ἶ','á¼·'=>'ἷ','Ἰ'=>'Ἰ','á¼¹'=>'Ἱ','Ἲ'=>'Ἲ','á¼»'=>'Ἳ','á¼¼'=>'ἸÌ','á¼½'=>'ἹÌ','á¼¾'=>'Ἶ','Ἷ'=>'Ἷ','á½€'=>'ὀ','á½'=>'ὁ','ὂ'=>'ὂ','ὃ'=>'ὃ','ὄ'=>'ὀÌ','á½…'=>'ὁÌ','Ὀ'=>'Ὀ','Ὁ'=>'Ὁ','Ὂ'=>'Ὂ','Ὃ'=>'Ὃ','Ὄ'=>'ὈÌ','á½'=>'ὉÌ','á½'=>'Ï…Ì“','ὑ'=>'Ï…Ì”','á½’'=>'Ï…Ì“Ì€','ὓ'=>'ὓ','á½”'=>'Ï…Ì“Ì','ὕ'=>'Ï…Ì”Ì','á½–'=>'Ï…Ì“Í‚','á½—'=>'ὗ','á½™'=>'Ὑ','á½›'=>'Ὓ','á½'=>'ὙÌ','Ὗ'=>'Ὗ','á½ '=>'ὠ','ὡ'=>'ὡ','á½¢'=>'ὢ','á½£'=>'ὣ','ὤ'=>'ὠÌ','á½¥'=>'ὡÌ','ὦ'=>'ὦ','ὧ'=>'ὧ','Ὠ'=>'Ὠ','Ὡ'=>'Ὡ','Ὢ'=>'Ὢ','Ὣ'=>'Ὣ','Ὤ'=>'ὨÌ','á½­'=>'ὩÌ','á½®'=>'Ὦ','Ὧ'=>'Ὧ','á½°'=>'ὰ','á½±'=>'αÌ','á½²'=>'ὲ','á½³'=>'εÌ','á½´'=>'ὴ','á½µ'=>'ηÌ','ὶ'=>'ὶ','á½·'=>'ιÌ','ὸ'=>'ὸ','á½¹'=>'οÌ','ὺ'=>'Ï…Ì€','á½»'=>'Ï…Ì','á½¼'=>'ὼ','á½½'=>'ωÌ','á¾€'=>'ᾀ','á¾'=>'ᾁ','ᾂ'=>'ᾂ','ᾃ'=>'ᾃ','ᾄ'=>'ἀÌÍ…','á¾…'=>'ἁÌÍ…','ᾆ'=>'ᾆ','ᾇ'=>'ᾇ','ᾈ'=>'ᾈ','ᾉ'=>'ᾉ','ᾊ'=>'ᾊ','ᾋ'=>'ᾋ','ᾌ'=>'ἈÌÍ…','á¾'=>'ἉÌÍ…','ᾎ'=>'ᾎ','á¾'=>'ᾏ','á¾'=>'ᾐ','ᾑ'=>'ᾑ','á¾’'=>'ᾒ','ᾓ'=>'ᾓ','á¾”'=>'ἠÌÍ…','ᾕ'=>'ἡÌÍ…','á¾–'=>'ᾖ','á¾—'=>'ᾗ','ᾘ'=>'ᾘ','á¾™'=>'ᾙ','ᾚ'=>'ᾚ','á¾›'=>'ᾛ','ᾜ'=>'ἨÌÍ…','á¾'=>'ἩÌÍ…','ᾞ'=>'ᾞ','ᾟ'=>'ᾟ','á¾ '=>'ᾠ','ᾡ'=>'ᾡ','á¾¢'=>'ᾢ','á¾£'=>'ᾣ','ᾤ'=>'ὠÌÍ…','á¾¥'=>'ὡÌÍ…','ᾦ'=>'ᾦ','ᾧ'=>'ᾧ','ᾨ'=>'ᾨ','ᾩ'=>'ᾩ','ᾪ'=>'ᾪ','ᾫ'=>'ᾫ','ᾬ'=>'ὨÌÍ…','á¾­'=>'ὩÌÍ…','á¾®'=>'ᾮ','ᾯ'=>'ᾯ','á¾°'=>'ᾰ','á¾±'=>'ᾱ','á¾²'=>'ᾲ','á¾³'=>'ᾳ','á¾´'=>'αÌÍ…','ᾶ'=>'ᾶ','á¾·'=>'ᾷ','Ᾰ'=>'Ᾰ','á¾¹'=>'Ᾱ','Ὰ'=>'Ὰ','á¾»'=>'ΑÌ','á¾¼'=>'ᾼ','á¾½'=>' Ì“','á¾¾'=>'ι','᾿'=>' Ì“','á¿€'=>' Í‚','á¿'=>' ̈͂','á¿‚'=>'ῂ','ῃ'=>'ῃ','á¿„'=>'ηÌÍ…','ῆ'=>'ῆ','ῇ'=>'ῇ','Ὲ'=>'Ὲ','Έ'=>'ΕÌ','á¿Š'=>'Ὴ','á¿‹'=>'ΗÌ','á¿Œ'=>'ῌ','á¿'=>' Ì“Ì€','á¿Ž'=>' Ì“Ì','á¿'=>' Ì“Í‚','á¿'=>'ῐ','á¿‘'=>'ῑ','á¿’'=>'ῒ','á¿“'=>'ϊÌ','á¿–'=>'ῖ','á¿—'=>'ῗ','Ῐ'=>'Ῐ','á¿™'=>'Ῑ','á¿š'=>'Ὶ','á¿›'=>'ΙÌ','á¿'=>' ̔̀','á¿ž'=>' Ì”Ì','á¿Ÿ'=>' ̔͂','á¿ '=>'ῠ','á¿¡'=>'Ï…Ì„','á¿¢'=>'ῢ','á¿£'=>'ϋÌ','ῤ'=>'ÏÌ“','á¿¥'=>'ÏÌ”','ῦ'=>'Ï…Í‚','ῧ'=>'ῧ','Ῠ'=>'Ῠ','á¿©'=>'Ῡ','Ὺ'=>'Ὺ','á¿«'=>'Î¥Ì','Ῥ'=>'Ῥ','á¿­'=>' ̈̀','á¿®'=>' ̈Ì','`'=>'`','ῲ'=>'ῲ','ῳ'=>'ῳ','á¿´'=>'ωÌÍ…','ῶ'=>'ῶ','á¿·'=>'ῷ','Ὸ'=>'Ὸ','Ό'=>'ΟÌ','Ὼ'=>'Ὼ','á¿»'=>'ΩÌ','ῼ'=>'ῼ','´'=>' Ì','῾'=>' Ì”',' '=>' ','â€'=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ','‑'=>'â€','‗'=>' ̳','․'=>'.','‥'=>'..','…'=>'...',' '=>' ','″'=>'′′','‴'=>'′′′','‶'=>'‵‵','‷'=>'‵‵‵','‼'=>'!!','‾'=>' Ì…','â‡'=>'??','âˆ'=>'?!','â‰'=>'!?','â—'=>'′′′′','âŸ'=>' ','â°'=>'0','â±'=>'i','â´'=>'4','âµ'=>'5','â¶'=>'6','â·'=>'7','â¸'=>'8','â¹'=>'9','âº'=>'+','â»'=>'−','â¼'=>'=','â½'=>'(','â¾'=>')','â¿'=>'n','â‚€'=>'0','â‚'=>'1','â‚‚'=>'2','₃'=>'3','â‚„'=>'4','â‚…'=>'5','₆'=>'6','₇'=>'7','₈'=>'8','₉'=>'9','â‚Š'=>'+','â‚‹'=>'−','â‚Œ'=>'=','â‚'=>'(','â‚Ž'=>')','â‚'=>'a','â‚‘'=>'e','â‚’'=>'o','â‚“'=>'x','â‚”'=>'É™','₨'=>'Rs','â„€'=>'a/c','â„'=>'a/s','â„‚'=>'C','℃'=>'°C','â„…'=>'c/o','℆'=>'c/u','ℇ'=>'Æ','℉'=>'°F','â„Š'=>'g','â„‹'=>'H','â„Œ'=>'H','â„'=>'H','â„Ž'=>'h','â„'=>'ħ','â„'=>'I','â„‘'=>'I','â„’'=>'L','â„“'=>'l','â„•'=>'N','â„–'=>'No','â„™'=>'P','â„š'=>'Q','â„›'=>'R','â„œ'=>'R','â„'=>'R','â„ '=>'SM','â„¡'=>'TEL','â„¢'=>'TM','ℤ'=>'Z','Ω'=>'Ω','ℨ'=>'Z','K'=>'K','â„«'=>'AÌŠ','ℬ'=>'B','â„­'=>'C','ℯ'=>'e','â„°'=>'E','ℱ'=>'F','ℳ'=>'M','â„´'=>'o','ℵ'=>'×','ℶ'=>'ב','â„·'=>'×’','ℸ'=>'ד','ℹ'=>'i','â„»'=>'FAX','ℼ'=>'Ï€','ℽ'=>'γ','ℾ'=>'Γ','â„¿'=>'Π','â…€'=>'∑','â……'=>'D','â…†'=>'d','â…‡'=>'e','â…ˆ'=>'i','â…‰'=>'j','â…“'=>'1â„3','â…”'=>'2â„3','â…•'=>'1â„5','â…–'=>'2â„5','â…—'=>'3â„5','â…˜'=>'4â„5','â…™'=>'1â„6','â…š'=>'5â„6','â…›'=>'1â„8','â…œ'=>'3â„8','â…'=>'5â„8','â…ž'=>'7â„8','â…Ÿ'=>'1â„','â… '=>'I','â…¡'=>'II','â…¢'=>'III','â…£'=>'IV','â…¤'=>'V','â…¥'=>'VI','â…¦'=>'VII','â…§'=>'VIII','â…¨'=>'IX','â…©'=>'X','â…ª'=>'XI','â…«'=>'XII','â…¬'=>'L','â…­'=>'C','â…®'=>'D','â…¯'=>'M','â…°'=>'i','â…±'=>'ii','â…²'=>'iii','â…³'=>'iv','â…´'=>'v','â…µ'=>'vi','â…¶'=>'vii','â…·'=>'viii','â…¸'=>'ix','â…¹'=>'x','â…º'=>'xi','â…»'=>'xii','â…¼'=>'l','â…½'=>'c','â…¾'=>'d','â…¿'=>'m','↚'=>'â†Ì¸','↛'=>'↛','↮'=>'↮','â‡'=>'â‡Ì¸','⇎'=>'⇎','â‡'=>'⇏','∄'=>'∄','∉'=>'∉','∌'=>'∌','∤'=>'∤','∦'=>'∦','∬'=>'∫∫','∭'=>'∫∫∫','∯'=>'∮∮','∰'=>'∮∮∮','â‰'=>'≁','≄'=>'≄','≇'=>'≇','≉'=>'≉','≠'=>'≠','≢'=>'≢','≭'=>'â‰Ì¸','≮'=>'≮','≯'=>'≯','≰'=>'≰','≱'=>'≱','≴'=>'≴','≵'=>'≵','≸'=>'≸','≹'=>'≹','⊀'=>'⊀','âŠ'=>'⊁','⊄'=>'⊄','⊅'=>'⊅','⊈'=>'⊈','⊉'=>'⊉','⊬'=>'⊬','⊭'=>'⊭','⊮'=>'⊮','⊯'=>'⊯','â‹ '=>'⋠','â‹¡'=>'⋡','â‹¢'=>'⋢','â‹£'=>'⋣','⋪'=>'⋪','â‹«'=>'⋫','⋬'=>'⋬','â‹­'=>'⋭','〈'=>'〈','〉'=>'〉','â‘ '=>'1','â‘¡'=>'2','â‘¢'=>'3','â‘£'=>'4','⑤'=>'5','â‘¥'=>'6','⑦'=>'7','⑧'=>'8','⑨'=>'9','â‘©'=>'10','⑪'=>'11','â‘«'=>'12','⑬'=>'13','â‘­'=>'14','â‘®'=>'15','⑯'=>'16','â‘°'=>'17','⑱'=>'18','⑲'=>'19','⑳'=>'20','â‘´'=>'(1)','⑵'=>'(2)','⑶'=>'(3)','â‘·'=>'(4)','⑸'=>'(5)','⑹'=>'(6)','⑺'=>'(7)','â‘»'=>'(8)','⑼'=>'(9)','⑽'=>'(10)','⑾'=>'(11)','â‘¿'=>'(12)','â’€'=>'(13)','â’'=>'(14)','â’‚'=>'(15)','â’ƒ'=>'(16)','â’„'=>'(17)','â’…'=>'(18)','â’†'=>'(19)','â’‡'=>'(20)','â’ˆ'=>'1.','â’‰'=>'2.','â’Š'=>'3.','â’‹'=>'4.','â’Œ'=>'5.','â’'=>'6.','â’Ž'=>'7.','â’'=>'8.','â’'=>'9.','â’‘'=>'10.','â’’'=>'11.','â’“'=>'12.','â’”'=>'13.','â’•'=>'14.','â’–'=>'15.','â’—'=>'16.','â’˜'=>'17.','â’™'=>'18.','â’š'=>'19.','â’›'=>'20.','â’œ'=>'(a)','â’'=>'(b)','â’ž'=>'(c)','â’Ÿ'=>'(d)','â’ '=>'(e)','â’¡'=>'(f)','â’¢'=>'(g)','â’£'=>'(h)','â’¤'=>'(i)','â’¥'=>'(j)','â’¦'=>'(k)','â’§'=>'(l)','â’¨'=>'(m)','â’©'=>'(n)','â’ª'=>'(o)','â’«'=>'(p)','â’¬'=>'(q)','â’­'=>'(r)','â’®'=>'(s)','â’¯'=>'(t)','â’°'=>'(u)','â’±'=>'(v)','â’²'=>'(w)','â’³'=>'(x)','â’´'=>'(y)','â’µ'=>'(z)','â’¶'=>'A','â’·'=>'B','â’¸'=>'C','â’¹'=>'D','â’º'=>'E','â’»'=>'F','â’¼'=>'G','â’½'=>'H','â’¾'=>'I','â’¿'=>'J','â“€'=>'K','â“'=>'L','â“‚'=>'M','Ⓝ'=>'N','â“„'=>'O','â“…'=>'P','Ⓠ'=>'Q','Ⓡ'=>'R','Ⓢ'=>'S','Ⓣ'=>'T','â“Š'=>'U','â“‹'=>'V','â“Œ'=>'W','â“'=>'X','â“Ž'=>'Y','â“'=>'Z','â“'=>'a','â“‘'=>'b','â“’'=>'c','â““'=>'d','â“”'=>'e','â“•'=>'f','â“–'=>'g','â“—'=>'h','ⓘ'=>'i','â“™'=>'j','â“š'=>'k','â“›'=>'l','â“œ'=>'m','â“'=>'n','â“ž'=>'o','â“Ÿ'=>'p','â“ '=>'q','â“¡'=>'r','â“¢'=>'s','â“£'=>'t','ⓤ'=>'u','â“¥'=>'v','ⓦ'=>'w','ⓧ'=>'x','ⓨ'=>'y','â“©'=>'z','⓪'=>'0','⨌'=>'∫∫∫∫','â©´'=>'::=','⩵'=>'==','⩶'=>'===','â«œ'=>'â«Ì¸','ⵯ'=>'ⵡ','⺟'=>'æ¯','⻳'=>'龟','â¼€'=>'一','â¼'=>'丨','⼂'=>'丶','⼃'=>'丿','⼄'=>'ä¹™','â¼…'=>'亅','⼆'=>'二','⼇'=>'亠','⼈'=>'人','⼉'=>'å„¿','⼊'=>'å…¥','⼋'=>'å…«','⼌'=>'冂','â¼'=>'冖','⼎'=>'冫','â¼'=>'几','â¼'=>'凵','⼑'=>'刀','â¼’'=>'力','⼓'=>'勹','â¼”'=>'匕','⼕'=>'匚','â¼–'=>'匸','â¼—'=>'å','⼘'=>'åœ','â¼™'=>'å©','⼚'=>'厂','â¼›'=>'厶','⼜'=>'åˆ','â¼'=>'å£','⼞'=>'å›—','⼟'=>'土','â¼ '=>'士','⼡'=>'夂','â¼¢'=>'夊','â¼£'=>'夕','⼤'=>'大','â¼¥'=>'女','⼦'=>'å­','⼧'=>'宀','⼨'=>'寸','⼩'=>'å°','⼪'=>'å°¢','⼫'=>'å°¸','⼬'=>'å±®','â¼­'=>'å±±','â¼®'=>'å·›','⼯'=>'å·¥','â¼°'=>'å·±','â¼±'=>'å·¾','â¼²'=>'å¹²','â¼³'=>'幺','â¼´'=>'广','â¼µ'=>'å»´','⼶'=>'廾','â¼·'=>'弋','⼸'=>'弓','â¼¹'=>'å½','⼺'=>'彡','â¼»'=>'å½³','â¼¼'=>'心','â¼½'=>'戈','â¼¾'=>'戶','⼿'=>'手','â½€'=>'支','â½'=>'æ”´','⽂'=>'æ–‡','⽃'=>'æ–—','⽄'=>'æ–¤','â½…'=>'æ–¹','⽆'=>'æ— ','⽇'=>'æ—¥','⽈'=>'æ›°','⽉'=>'月','⽊'=>'木','⽋'=>'欠','⽌'=>'æ­¢','â½'=>'æ­¹','⽎'=>'殳','â½'=>'毋','â½'=>'比','⽑'=>'毛','â½’'=>'æ°','⽓'=>'æ°”','â½”'=>'æ°´','⽕'=>'ç«','â½–'=>'爪','â½—'=>'父','⽘'=>'爻','â½™'=>'爿','⽚'=>'片','â½›'=>'牙','⽜'=>'牛','â½'=>'犬','⽞'=>'玄','⽟'=>'玉','â½ '=>'ç“œ','⽡'=>'瓦','â½¢'=>'甘','â½£'=>'生','⽤'=>'用','â½¥'=>'ç”°','⽦'=>'ç–‹','⽧'=>'ç–’','⽨'=>'癶','⽩'=>'白','⽪'=>'çš®','⽫'=>'çš¿','⽬'=>'ç›®','â½­'=>'矛','â½®'=>'矢','⽯'=>'石','â½°'=>'示','â½±'=>'禸','â½²'=>'禾','â½³'=>'ç©´','â½´'=>'ç«‹','â½µ'=>'竹','⽶'=>'ç±³','â½·'=>'糸','⽸'=>'缶','â½¹'=>'网','⽺'=>'羊','â½»'=>'ç¾½','â½¼'=>'è€','â½½'=>'而','â½¾'=>'耒','⽿'=>'耳','â¾€'=>'è¿','â¾'=>'肉','⾂'=>'臣','⾃'=>'自','⾄'=>'至','â¾…'=>'臼','⾆'=>'舌','⾇'=>'舛','⾈'=>'舟','⾉'=>'艮','⾊'=>'色','⾋'=>'艸','⾌'=>'è™','â¾'=>'虫','⾎'=>'è¡€','â¾'=>'è¡Œ','â¾'=>'è¡£','⾑'=>'襾','â¾’'=>'見','⾓'=>'角','â¾”'=>'言','⾕'=>'è°·','â¾–'=>'豆','â¾—'=>'豕','⾘'=>'豸','â¾™'=>'è²','⾚'=>'赤','â¾›'=>'èµ°','⾜'=>'足','â¾'=>'身','⾞'=>'車','⾟'=>'è¾›','â¾ '=>'è¾°','⾡'=>'è¾µ','â¾¢'=>'é‚‘','â¾£'=>'é…‰','⾤'=>'釆','â¾¥'=>'里','⾦'=>'金','⾧'=>'é•·','⾨'=>'é–€','⾩'=>'阜','⾪'=>'隶','⾫'=>'éš¹','⾬'=>'雨','â¾­'=>'é‘','â¾®'=>'éž','⾯'=>'é¢','â¾°'=>'é©','â¾±'=>'韋','â¾²'=>'韭','â¾³'=>'音','â¾´'=>'é ','â¾µ'=>'風','⾶'=>'飛','â¾·'=>'食','⾸'=>'首','â¾¹'=>'香','⾺'=>'馬','â¾»'=>'骨','â¾¼'=>'高','â¾½'=>'é«Ÿ','â¾¾'=>'鬥','⾿'=>'鬯','â¿€'=>'鬲','â¿'=>'鬼','â¿‚'=>'é­š','⿃'=>'é³¥','â¿„'=>'é¹µ','â¿…'=>'鹿','⿆'=>'麥','⿇'=>'麻','⿈'=>'黃','⿉'=>'é»','â¿Š'=>'黑','â¿‹'=>'黹','â¿Œ'=>'黽','â¿'=>'鼎','â¿Ž'=>'鼓','â¿'=>'é¼ ','â¿'=>'é¼»','â¿‘'=>'齊','â¿’'=>'é½’','â¿“'=>'é¾','â¿”'=>'龜','â¿•'=>'é¾ ',' '=>' ','〶'=>'〒','〸'=>'å','〹'=>'å„','〺'=>'å…','ãŒ'=>'ã‹ã‚™','ãŽ'=>'ãã‚™','ã'=>'ãã‚™','ã’'=>'ã‘ã‚™','ã”'=>'ã“ã‚™','ã–'=>'ã•ã‚™','ã˜'=>'ã—ã‚™','ãš'=>'ã™ã‚™','ãœ'=>'ã›ã‚™','ãž'=>'ãã‚™','ã '=>'ãŸã‚™','ã¢'=>'ã¡ã‚™','ã¥'=>'ã¤ã‚™','ã§'=>'ã¦ã‚™','ã©'=>'ã¨ã‚™','ã°'=>'ã¯ã‚™','ã±'=>'ã¯ã‚š','ã³'=>'ã²ã‚™','ã´'=>'ã²ã‚š','ã¶'=>'ãµã‚™','ã·'=>'ãµã‚š','ã¹'=>'ã¸ã‚™','ãº'=>'ã¸ã‚š','ã¼'=>'ã»ã‚™','ã½'=>'ã»ã‚š','ã‚”'=>'ã†ã‚™','ã‚›'=>' ã‚™','ã‚œ'=>' ã‚š','ã‚ž'=>'ã‚ã‚™','ã‚Ÿ'=>'より','ガ'=>'ã‚«ã‚™','ã‚®'=>'ã‚­ã‚™','ã‚°'=>'グ','ゲ'=>'ゲ','ã‚´'=>'ゴ','ザ'=>'ザ','ジ'=>'ã‚·ã‚™','ズ'=>'ズ','ゼ'=>'ゼ','ゾ'=>'ゾ','ダ'=>'ã‚¿ã‚™','ヂ'=>'ãƒã‚™','ヅ'=>'ヅ','デ'=>'デ','ド'=>'ド','ãƒ'=>'ãƒã‚™','パ'=>'ãƒã‚š','ビ'=>'ビ','ピ'=>'ピ','ブ'=>'ブ','プ'=>'プ','ベ'=>'ベ','ペ'=>'ペ','ボ'=>'ボ','ãƒ'=>'ポ','ヴ'=>'ヴ','ヷ'=>'ヷ','ヸ'=>'ヸ','ヹ'=>'ヹ','ヺ'=>'ヺ','ヾ'=>'ヾ','ヿ'=>'コト','ㄱ'=>'á„€','ㄲ'=>'á„','ㄳ'=>'ᆪ','ã„´'=>'á„‚','ㄵ'=>'ᆬ','ㄶ'=>'ᆭ','ã„·'=>'ᄃ','ㄸ'=>'á„„','ㄹ'=>'á„…','ㄺ'=>'ᆰ','ã„»'=>'ᆱ','ㄼ'=>'ᆲ','ㄽ'=>'ᆳ','ㄾ'=>'ᆴ','ã„¿'=>'ᆵ','ã…€'=>'á„š','ã…'=>'ᄆ','ã…‚'=>'ᄇ','ã…ƒ'=>'ᄈ','ã…„'=>'á„¡','ã……'=>'ᄉ','ã…†'=>'á„Š','ã…‡'=>'á„‹','ã…ˆ'=>'á„Œ','ã…‰'=>'á„','ã…Š'=>'á„Ž','ã…‹'=>'á„','ã…Œ'=>'á„','ã…'=>'á„‘','ã…Ž'=>'á„’','ã…'=>'á…¡','ã…'=>'á…¢','ã…‘'=>'á…£','ã…’'=>'á…¤','ã…“'=>'á…¥','ã…”'=>'á…¦','ã…•'=>'á…§','ã…–'=>'á…¨','ã…—'=>'á…©','ã…˜'=>'á…ª','ã…™'=>'á…«','ã…š'=>'á…¬','ã…›'=>'á…­','ã…œ'=>'á…®','ã…'=>'á…¯','ã…ž'=>'á…°','ã…Ÿ'=>'á…±','ã… '=>'á…²','ã…¡'=>'á…³','ã…¢'=>'á…´','ã…£'=>'á…µ','ã…¤'=>'á… ','ã…¥'=>'á„”','ã…¦'=>'á„•','ã…§'=>'ᇇ','ã…¨'=>'ᇈ','ã…©'=>'ᇌ','ã…ª'=>'ᇎ','ã…«'=>'ᇓ','ã…¬'=>'ᇗ','ã…­'=>'ᇙ','ã…®'=>'á„œ','ã…¯'=>'á‡','ã…°'=>'ᇟ','ã…±'=>'á„','ã…²'=>'á„ž','ã…³'=>'á„ ','ã…´'=>'á„¢','ã…µ'=>'á„£','ã…¶'=>'ᄧ','ã…·'=>'á„©','ã…¸'=>'á„«','ã…¹'=>'ᄬ','ã…º'=>'á„­','ã…»'=>'á„®','ã…¼'=>'ᄯ','ã…½'=>'ᄲ','ã…¾'=>'ᄶ','ã…¿'=>'á…€','ㆀ'=>'á…‡','ã†'=>'á…Œ','ㆂ'=>'ᇱ','ㆃ'=>'ᇲ','ㆄ'=>'á…—','ㆅ'=>'á…˜','ㆆ'=>'á…™','ㆇ'=>'ᆄ','ㆈ'=>'ᆅ','ㆉ'=>'ᆈ','ㆊ'=>'ᆑ','ㆋ'=>'ᆒ','ㆌ'=>'ᆔ','ã†'=>'ᆞ','ㆎ'=>'ᆡ','㆒'=>'一','㆓'=>'二','㆔'=>'三','㆕'=>'å››','㆖'=>'上','㆗'=>'中','㆘'=>'下','㆙'=>'甲','㆚'=>'ä¹™','㆛'=>'丙','㆜'=>'ä¸','ã†'=>'天','㆞'=>'地','㆟'=>'人','㈀'=>'(á„€)','ãˆ'=>'(á„‚)','㈂'=>'(ᄃ)','㈃'=>'(á„…)','㈄'=>'(ᄆ)','㈅'=>'(ᄇ)','㈆'=>'(ᄉ)','㈇'=>'(á„‹)','㈈'=>'(á„Œ)','㈉'=>'(á„Ž)','㈊'=>'(á„)','㈋'=>'(á„)','㈌'=>'(á„‘)','ãˆ'=>'(á„’)','㈎'=>'(가)','ãˆ'=>'(á„‚á…¡)','ãˆ'=>'(다)','㈑'=>'(á„…á…¡)','㈒'=>'(마)','㈓'=>'(바)','㈔'=>'(사)','㈕'=>'(á„‹á…¡)','㈖'=>'(자)','㈗'=>'(á„Žá…¡)','㈘'=>'(á„á…¡)','㈙'=>'(á„á…¡)','㈚'=>'(á„‘á…¡)','㈛'=>'(á„’á…¡)','㈜'=>'(주)','ãˆ'=>'(오전)','㈞'=>'(á„‹á…©á„’á…®)','㈠'=>'(一)','㈡'=>'(二)','㈢'=>'(三)','㈣'=>'(å››)','㈤'=>'(五)','㈥'=>'(å…­)','㈦'=>'(七)','㈧'=>'(å…«)','㈨'=>'(ä¹)','㈩'=>'(å)','㈪'=>'(月)','㈫'=>'(ç«)','㈬'=>'(æ°´)','㈭'=>'(木)','㈮'=>'(金)','㈯'=>'(土)','㈰'=>'(æ—¥)','㈱'=>'(æ ª)','㈲'=>'(有)','㈳'=>'(社)','㈴'=>'(å)','㈵'=>'(特)','㈶'=>'(財)','㈷'=>'(ç¥)','㈸'=>'(労)','㈹'=>'(代)','㈺'=>'(呼)','㈻'=>'(å­¦)','㈼'=>'(監)','㈽'=>'(ä¼)','㈾'=>'(資)','㈿'=>'(å”)','㉀'=>'(祭)','ã‰'=>'(休)','㉂'=>'(自)','㉃'=>'(至)','ã‰'=>'PTE','㉑'=>'21','㉒'=>'22','㉓'=>'23','㉔'=>'24','㉕'=>'25','㉖'=>'26','㉗'=>'27','㉘'=>'28','㉙'=>'29','㉚'=>'30','㉛'=>'31','㉜'=>'32','ã‰'=>'33','㉞'=>'34','㉟'=>'35','㉠'=>'á„€','㉡'=>'á„‚','㉢'=>'ᄃ','㉣'=>'á„…','㉤'=>'ᄆ','㉥'=>'ᄇ','㉦'=>'ᄉ','㉧'=>'á„‹','㉨'=>'á„Œ','㉩'=>'á„Ž','㉪'=>'á„','㉫'=>'á„','㉬'=>'á„‘','㉭'=>'á„’','㉮'=>'가','㉯'=>'á„‚á…¡','㉰'=>'다','㉱'=>'á„…á…¡','㉲'=>'마','㉳'=>'바','㉴'=>'사','㉵'=>'á„‹á…¡','㉶'=>'자','㉷'=>'á„Žá…¡','㉸'=>'á„á…¡','㉹'=>'á„á…¡','㉺'=>'á„‘á…¡','㉻'=>'á„’á…¡','㉼'=>'참고','㉽'=>'주의','㉾'=>'á„‹á…®','㊀'=>'一','ãŠ'=>'二','㊂'=>'三','㊃'=>'å››','㊄'=>'五','㊅'=>'å…­','㊆'=>'七','㊇'=>'å…«','㊈'=>'ä¹','㊉'=>'å','㊊'=>'月','㊋'=>'ç«','㊌'=>'æ°´','ãŠ'=>'木','㊎'=>'金','ãŠ'=>'土','ãŠ'=>'æ—¥','㊑'=>'æ ª','㊒'=>'有','㊓'=>'社','㊔'=>'å','㊕'=>'特','㊖'=>'財','㊗'=>'ç¥','㊘'=>'労','㊙'=>'秘','㊚'=>'ç”·','㊛'=>'女','㊜'=>'é©','ãŠ'=>'優','㊞'=>'å°','㊟'=>'注','㊠'=>'é …','㊡'=>'休','㊢'=>'写','㊣'=>'æ­£','㊤'=>'上','㊥'=>'中','㊦'=>'下','㊧'=>'å·¦','㊨'=>'å³','㊩'=>'医','㊪'=>'å®—','㊫'=>'å­¦','㊬'=>'監','㊭'=>'ä¼','㊮'=>'資','㊯'=>'å”','㊰'=>'夜','㊱'=>'36','㊲'=>'37','㊳'=>'38','㊴'=>'39','㊵'=>'40','㊶'=>'41','㊷'=>'42','㊸'=>'43','㊹'=>'44','㊺'=>'45','㊻'=>'46','㊼'=>'47','㊽'=>'48','㊾'=>'49','㊿'=>'50','ã‹€'=>'1月','ã‹'=>'2月','ã‹‚'=>'3月','㋃'=>'4月','ã‹„'=>'5月','ã‹…'=>'6月','㋆'=>'7月','㋇'=>'8月','㋈'=>'9月','㋉'=>'10月','ã‹Š'=>'11月','ã‹‹'=>'12月','ã‹Œ'=>'Hg','ã‹'=>'erg','ã‹Ž'=>'eV','ã‹'=>'LTD','ã‹'=>'ã‚¢','ã‹‘'=>'イ','ã‹’'=>'ウ','ã‹“'=>'エ','ã‹”'=>'オ','ã‹•'=>'ã‚«','ã‹–'=>'ã‚­','ã‹—'=>'ク','㋘'=>'ケ','ã‹™'=>'コ','ã‹š'=>'サ','ã‹›'=>'ã‚·','ã‹œ'=>'ス','ã‹'=>'ã‚»','ã‹ž'=>'ソ','ã‹Ÿ'=>'ã‚¿','ã‹ '=>'ãƒ','ã‹¡'=>'ツ','ã‹¢'=>'テ','ã‹£'=>'ト','㋤'=>'ナ','ã‹¥'=>'ニ','㋦'=>'ヌ','㋧'=>'ãƒ','㋨'=>'ノ','ã‹©'=>'ãƒ','㋪'=>'ヒ','ã‹«'=>'フ','㋬'=>'ヘ','ã‹­'=>'ホ','ã‹®'=>'マ','㋯'=>'ミ','ã‹°'=>'ム','㋱'=>'メ','㋲'=>'モ','㋳'=>'ヤ','ã‹´'=>'ユ','㋵'=>'ヨ','㋶'=>'ラ','ã‹·'=>'リ','㋸'=>'ル','㋹'=>'レ','㋺'=>'ロ','ã‹»'=>'ワ','㋼'=>'ヰ','㋽'=>'ヱ','㋾'=>'ヲ','㌀'=>'ã‚¢ãƒã‚šãƒ¼ãƒˆ','ãŒ'=>'アルファ','㌂'=>'アンペア','㌃'=>'アール','㌄'=>'イニング','㌅'=>'インãƒ','㌆'=>'ウォン','㌇'=>'エスクード','㌈'=>'エーカー','㌉'=>'オンス','㌊'=>'オーム','㌋'=>'カイリ','㌌'=>'カラット','ãŒ'=>'カロリー','㌎'=>'ガロン','ãŒ'=>'ガンマ','ãŒ'=>'ギガ','㌑'=>'ギニー','㌒'=>'キュリー','㌓'=>'ギルダー','㌔'=>'キロ','㌕'=>'キログラム','㌖'=>'キロメートル','㌗'=>'キロワット','㌘'=>'グラム','㌙'=>'グラムトン','㌚'=>'クルゼイロ','㌛'=>'クローãƒ','㌜'=>'ケース','ãŒ'=>'コルナ','㌞'=>'コーポ','㌟'=>'サイクル','㌠'=>'サンãƒãƒ¼ãƒ ','㌡'=>'シリング','㌢'=>'センãƒ','㌣'=>'セント','㌤'=>'ダース','㌥'=>'デシ','㌦'=>'ドル','㌧'=>'トン','㌨'=>'ナノ','㌩'=>'ノット','㌪'=>'ãƒã‚¤ãƒ„','㌫'=>'ãƒã‚šãƒ¼ã‚»ãƒ³ãƒˆ','㌬'=>'ãƒã‚šãƒ¼ãƒ„','㌭'=>'ãƒã‚™ãƒ¼ãƒ¬ãƒ«','㌮'=>'ピアストル','㌯'=>'ピクル','㌰'=>'ピコ','㌱'=>'ビル','㌲'=>'ファラッド','㌳'=>'フィート','㌴'=>'ブッシェル','㌵'=>'フラン','㌶'=>'ヘクタール','㌷'=>'ペソ','㌸'=>'ペニヒ','㌹'=>'ヘルツ','㌺'=>'ペンス','㌻'=>'ページ','㌼'=>'ベータ','㌽'=>'ポイント','㌾'=>'ボルト','㌿'=>'ホン','ã€'=>'ポンド','ã'=>'ホール','ã‚'=>'ホーン','ãƒ'=>'マイクロ','ã„'=>'マイル','ã…'=>'マッãƒ','ã†'=>'マルク','ã‡'=>'マンション','ãˆ'=>'ミクロン','ã‰'=>'ミリ','ãŠ'=>'ミリãƒã‚™ãƒ¼ãƒ«','ã‹'=>'メガ','ãŒ'=>'メガトン','ã'=>'メートル','ãŽ'=>'ヤード','ã'=>'ヤール','ã'=>'ユアン','ã‘'=>'リットル','ã’'=>'リラ','ã“'=>'ルピー','ã”'=>'ルーブル','ã•'=>'レム','ã–'=>'レントゲン','ã—'=>'ワット','ã˜'=>'0点','ã™'=>'1点','ãš'=>'2点','ã›'=>'3点','ãœ'=>'4点','ã'=>'5点','ãž'=>'6点','ãŸ'=>'7点','ã '=>'8点','ã¡'=>'9点','ã¢'=>'10点','ã£'=>'11点','ã¤'=>'12点','ã¥'=>'13点','ã¦'=>'14点','ã§'=>'15点','ã¨'=>'16点','ã©'=>'17点','ãª'=>'18点','ã«'=>'19点','ã¬'=>'20点','ã­'=>'21点','ã®'=>'22点','ã¯'=>'23点','ã°'=>'24点','ã±'=>'hPa','ã²'=>'da','ã³'=>'AU','ã´'=>'bar','ãµ'=>'oV','ã¶'=>'pc','ã·'=>'dm','ã¸'=>'dm2','ã¹'=>'dm3','ãº'=>'IU','ã»'=>'å¹³æˆ','ã¼'=>'昭和','ã½'=>'大正','ã¾'=>'明治','ã¿'=>'æ ªå¼ä¼šç¤¾','㎀'=>'pA','ãŽ'=>'nA','㎂'=>'μA','㎃'=>'mA','㎄'=>'kA','㎅'=>'KB','㎆'=>'MB','㎇'=>'GB','㎈'=>'cal','㎉'=>'kcal','㎊'=>'pF','㎋'=>'nF','㎌'=>'μF','ãŽ'=>'μg','㎎'=>'mg','ãŽ'=>'kg','ãŽ'=>'Hz','㎑'=>'kHz','㎒'=>'MHz','㎓'=>'GHz','㎔'=>'THz','㎕'=>'μl','㎖'=>'ml','㎗'=>'dl','㎘'=>'kl','㎙'=>'fm','㎚'=>'nm','㎛'=>'μm','㎜'=>'mm','ãŽ'=>'cm','㎞'=>'km','㎟'=>'mm2','㎠'=>'cm2','㎡'=>'m2','㎢'=>'km2','㎣'=>'mm3','㎤'=>'cm3','㎥'=>'m3','㎦'=>'km3','㎧'=>'m∕s','㎨'=>'m∕s2','㎩'=>'Pa','㎪'=>'kPa','㎫'=>'MPa','㎬'=>'GPa','㎭'=>'rad','㎮'=>'rad∕s','㎯'=>'rad∕s2','㎰'=>'ps','㎱'=>'ns','㎲'=>'μs','㎳'=>'ms','㎴'=>'pV','㎵'=>'nV','㎶'=>'μV','㎷'=>'mV','㎸'=>'kV','㎹'=>'MV','㎺'=>'pW','㎻'=>'nW','㎼'=>'μW','㎽'=>'mW','㎾'=>'kW','㎿'=>'MW','ã€'=>'kΩ','ã'=>'MΩ','ã‚'=>'a.m.','ãƒ'=>'Bq','ã„'=>'cc','ã…'=>'cd','ã†'=>'C∕kg','ã‡'=>'Co.','ãˆ'=>'dB','ã‰'=>'Gy','ãŠ'=>'ha','ã‹'=>'HP','ãŒ'=>'in','ã'=>'KK','ãŽ'=>'KM','ã'=>'kt','ã'=>'lm','ã‘'=>'ln','ã’'=>'log','ã“'=>'lx','ã”'=>'mb','ã•'=>'mil','ã–'=>'mol','ã—'=>'PH','ã˜'=>'p.m.','ã™'=>'PPM','ãš'=>'PR','ã›'=>'sr','ãœ'=>'Sv','ã'=>'Wb','ãž'=>'V∕m','ãŸ'=>'A∕m','ã '=>'1æ—¥','ã¡'=>'2æ—¥','ã¢'=>'3æ—¥','ã£'=>'4æ—¥','ã¤'=>'5æ—¥','ã¥'=>'6æ—¥','ã¦'=>'7æ—¥','ã§'=>'8æ—¥','ã¨'=>'9æ—¥','ã©'=>'10æ—¥','ãª'=>'11æ—¥','ã«'=>'12æ—¥','ã¬'=>'13æ—¥','ã­'=>'14æ—¥','ã®'=>'15æ—¥','ã¯'=>'16æ—¥','ã°'=>'17æ—¥','ã±'=>'18æ—¥','ã²'=>'19æ—¥','ã³'=>'20æ—¥','ã´'=>'21æ—¥','ãµ'=>'22æ—¥','ã¶'=>'23æ—¥','ã·'=>'24æ—¥','ã¸'=>'25æ—¥','ã¹'=>'26æ—¥','ãº'=>'27æ—¥','ã»'=>'28æ—¥','ã¼'=>'29æ—¥','ã½'=>'30æ—¥','ã¾'=>'31æ—¥','ã¿'=>'gal','豈'=>'豈','ï¤'=>'æ›´','車'=>'車','賈'=>'賈','滑'=>'滑','串'=>'串','句'=>'å¥','龜'=>'龜','龜'=>'龜','契'=>'契','金'=>'金','喇'=>'å–‡','奈'=>'奈','ï¤'=>'懶','癩'=>'癩','ï¤'=>'ç¾…','ï¤'=>'蘿','螺'=>'螺','裸'=>'裸','邏'=>'é‚','樂'=>'樂','洛'=>'æ´›','烙'=>'烙','珞'=>'çž','落'=>'è½','酪'=>'é…ª','駱'=>'駱','亂'=>'亂','卵'=>'åµ','ï¤'=>'欄','爛'=>'爛','蘭'=>'蘭','鸞'=>'鸞','嵐'=>'åµ','濫'=>'æ¿«','藍'=>'è—','襤'=>'襤','拉'=>'拉','臘'=>'臘','蠟'=>'è Ÿ','廊'=>'廊','朗'=>'朗','浪'=>'浪','狼'=>'狼','郎'=>'郎','來'=>'來','冷'=>'冷','勞'=>'å‹ž','擄'=>'æ“„','櫓'=>'æ«“','爐'=>'çˆ','盧'=>'盧','老'=>'è€','蘆'=>'蘆','虜'=>'虜','路'=>'è·¯','露'=>'露','魯'=>'é­¯','鷺'=>'é·º','碌'=>'碌','祿'=>'祿','綠'=>'綠','菉'=>'è‰','錄'=>'錄','鹿'=>'鹿','ï¥'=>'è«–','壟'=>'壟','弄'=>'弄','籠'=>'ç± ','聾'=>'è¾','牢'=>'牢','磊'=>'磊','賂'=>'賂','雷'=>'é›·','壘'=>'壘','屢'=>'å±¢','樓'=>'樓','ï¥'=>'æ·š','漏'=>'æ¼','ï¥'=>'ç´¯','ï¥'=>'縷','陋'=>'陋','勒'=>'å‹’','肋'=>'è‚‹','凜'=>'凜','凌'=>'凌','稜'=>'稜','綾'=>'綾','菱'=>'è±','陵'=>'陵','讀'=>'讀','拏'=>'æ‹','樂'=>'樂','ï¥'=>'諾','丹'=>'丹','寧'=>'寧','怒'=>'怒','率'=>'率','異'=>'ç•°','北'=>'北','磻'=>'磻','便'=>'便','復'=>'復','不'=>'ä¸','泌'=>'泌','數'=>'數','索'=>'ç´¢','參'=>'åƒ','塞'=>'å¡ž','省'=>'çœ','葉'=>'葉','說'=>'說','殺'=>'殺','辰'=>'è¾°','沈'=>'沈','拾'=>'拾','若'=>'è‹¥','掠'=>'掠','略'=>'ç•¥','亮'=>'亮','兩'=>'å…©','凉'=>'凉','梁'=>'æ¢','糧'=>'糧','良'=>'良','諒'=>'è«’','量'=>'é‡','勵'=>'勵','呂'=>'å‘‚','ï¦'=>'女','廬'=>'廬','旅'=>'æ—…','濾'=>'濾','礪'=>'礪','閭'=>'é–­','驪'=>'驪','麗'=>'麗','黎'=>'黎','力'=>'力','曆'=>'曆','歷'=>'æ­·','ï¦'=>'è½¢','年'=>'å¹´','ï¦'=>'æ†','ï¦'=>'戀','撚'=>'æ’š','漣'=>'æ¼£','煉'=>'ç…‰','璉'=>'ç’‰','秊'=>'秊','練'=>'ç·´','聯'=>'è¯','輦'=>'輦','蓮'=>'è“®','連'=>'連','鍊'=>'éŠ','列'=>'列','ï¦'=>'劣','咽'=>'å’½','烈'=>'烈','裂'=>'裂','說'=>'說','廉'=>'廉','念'=>'念','捻'=>'æ»','殮'=>'æ®®','簾'=>'ç°¾','獵'=>'çµ','令'=>'令','囹'=>'囹','寧'=>'寧','嶺'=>'嶺','怜'=>'怜','玲'=>'玲','瑩'=>'ç‘©','羚'=>'羚','聆'=>'è†','鈴'=>'鈴','零'=>'零','靈'=>'éˆ','領'=>'é ˜','例'=>'例','禮'=>'禮','醴'=>'醴','隸'=>'隸','惡'=>'惡','了'=>'了','僚'=>'僚','寮'=>'寮','尿'=>'å°¿','料'=>'æ–™','樂'=>'樂','燎'=>'燎','ï§'=>'療','蓼'=>'蓼','遼'=>'é¼','龍'=>'é¾','暈'=>'暈','阮'=>'阮','劉'=>'劉','杻'=>'æ»','柳'=>'柳','流'=>'æµ','溜'=>'溜','琉'=>'ç‰','ï§'=>'ç•™','硫'=>'ç¡«','ï§'=>'ç´','ï§'=>'é¡ž','六'=>'å…­','戮'=>'戮','陸'=>'陸','倫'=>'倫','崙'=>'å´™','淪'=>'æ·ª','輪'=>'輪','律'=>'律','慄'=>'æ…„','栗'=>'æ —','率'=>'率','隆'=>'隆','ï§'=>'利','吏'=>'å','履'=>'å±¥','易'=>'易','李'=>'æŽ','梨'=>'梨','泥'=>'æ³¥','理'=>'ç†','痢'=>'ç—¢','罹'=>'ç½¹','裏'=>'è£','裡'=>'裡','里'=>'里','離'=>'離','匿'=>'匿','溺'=>'溺','吝'=>'å','燐'=>'ç‡','璘'=>'ç’˜','藺'=>'è—º','隣'=>'隣','鱗'=>'é±—','麟'=>'麟','林'=>'æž—','淋'=>'æ·‹','臨'=>'臨','立'=>'ç«‹','笠'=>'笠','粒'=>'ç²’','狀'=>'ç‹€','炙'=>'ç‚™','識'=>'è­˜','什'=>'什','茶'=>'茶','刺'=>'刺','切'=>'切','ï¨'=>'度','拓'=>'æ‹“','糖'=>'ç³–','宅'=>'å®…','洞'=>'æ´ž','暴'=>'æš´','輻'=>'è¼»','行'=>'è¡Œ','降'=>'é™','見'=>'見','廓'=>'廓','兀'=>'å…€','ï¨'=>'å—€','ï¨'=>'å¡š','晴'=>'æ™´','凞'=>'凞','猪'=>'猪','益'=>'益','礼'=>'礼','神'=>'神','祥'=>'祥','福'=>'ç¦','靖'=>'é–','ï¨'=>'ç²¾','羽'=>'ç¾½','蘒'=>'蘒','諸'=>'諸','逸'=>'逸','都'=>'都','飯'=>'飯','飼'=>'飼','館'=>'館','鶴'=>'鶴','侮'=>'ä¾®','僧'=>'僧','免'=>'å…','勉'=>'勉','勤'=>'勤','卑'=>'å‘','喝'=>'å–','嘆'=>'嘆','器'=>'器','塀'=>'å¡€','墨'=>'墨','層'=>'層','屮'=>'å±®','悔'=>'æ‚”','慨'=>'æ…¨','憎'=>'憎','ï©€'=>'懲','ï©'=>'æ•','ï©‚'=>'æ—¢','暑'=>'æš‘','ï©„'=>'梅','ï©…'=>'æµ·','渚'=>'渚','漢'=>'æ¼¢','煮'=>'ç…®','爫'=>'爫','ï©Š'=>'ç¢','ï©‹'=>'碑','ï©Œ'=>'社','ï©'=>'祉','ï©Ž'=>'祈','ï©'=>'ç¥','ï©'=>'祖','ï©‘'=>'ç¥','ï©’'=>'ç¦','ï©“'=>'禎','ï©”'=>'ç©€','ï©•'=>'çª','ï©–'=>'節','ï©—'=>'ç·´','縉'=>'縉','ï©™'=>'ç¹','ï©š'=>'ç½²','ï©›'=>'者','ï©œ'=>'臭','ï©'=>'艹','ï©ž'=>'艹','ï©Ÿ'=>'è‘—','ï© '=>'è¤','ï©¡'=>'視','ï©¢'=>'è¬','ï©£'=>'謹','賓'=>'賓','ï©¥'=>'è´ˆ','辶'=>'辶','逸'=>'逸','難'=>'難','ï©©'=>'響','頻'=>'é »','ï©°'=>'並','况'=>'况','全'=>'å…¨','侀'=>'ä¾€','ï©´'=>'å……','冀'=>'冀','勇'=>'勇','ï©·'=>'勺','喝'=>'å–','啕'=>'å••','喙'=>'å–™','ï©»'=>'å—¢','塚'=>'å¡š','墳'=>'墳','奄'=>'奄','ï©¿'=>'奔','婢'=>'å©¢','ïª'=>'嬨','廒'=>'å»’','廙'=>'å»™','彩'=>'彩','徭'=>'å¾­','惘'=>'惘','慎'=>'æ…Ž','愈'=>'愈','憎'=>'憎','慠'=>'æ… ','懲'=>'懲','戴'=>'戴','ïª'=>'æ„','搜'=>'æœ','ïª'=>'æ‘’','ïª'=>'æ•–','晴'=>'æ™´','朗'=>'朗','望'=>'望','杖'=>'æ–','歹'=>'æ­¹','殺'=>'殺','流'=>'æµ','滛'=>'æ»›','滋'=>'滋','漢'=>'æ¼¢','瀞'=>'瀞','煮'=>'ç…®','ïª'=>'瞧','爵'=>'爵','犯'=>'犯','猪'=>'猪','瑱'=>'瑱','甆'=>'甆','画'=>'ç”»','瘝'=>'ç˜','瘟'=>'瘟','益'=>'益','盛'=>'ç››','直'=>'ç›´','睊'=>'çŠ','着'=>'ç€','磌'=>'磌','窱'=>'窱','節'=>'節','类'=>'ç±»','絛'=>'çµ›','練'=>'ç·´','缾'=>'ç¼¾','者'=>'者','荒'=>'è’','華'=>'è¯','蝹'=>'è¹','襁'=>'è¥','覆'=>'覆','視'=>'視','調'=>'調','諸'=>'諸','請'=>'è«‹','謁'=>'è¬','諾'=>'諾','諭'=>'è«­','謹'=>'謹','ï«€'=>'變','ï«'=>'è´ˆ','ï«‚'=>'輸','遲'=>'é²','ï«„'=>'醙','ï«…'=>'鉶','陼'=>'陼','難'=>'難','靖'=>'é–','韛'=>'韛','ï«Š'=>'響','ï«‹'=>'é ‹','ï«Œ'=>'é »','ï«'=>'鬒','ï«Ž'=>'龜','ï«'=>'𢡊','ï«'=>'𢡄','ï«‘'=>'ð£•','ï«’'=>'ã®','ï«“'=>'䀘','ï«”'=>'䀹','ï«•'=>'𥉉','ï«–'=>'ð¥³','ï«—'=>'𧻓','齃'=>'齃','ï«™'=>'龎','ff'=>'ff','ï¬'=>'fi','fl'=>'fl','ffi'=>'ffi','ffl'=>'ffl','ſt'=>'st','st'=>'st','ﬓ'=>'Õ´Õ¶','ﬔ'=>'Õ´Õ¥','ﬕ'=>'Õ´Õ«','ﬖ'=>'Õ¾Õ¶','ﬗ'=>'Õ´Õ­','ï¬'=>'×™Ö´','ײַ'=>'ײַ','ﬠ'=>'×¢','ﬡ'=>'×','ﬢ'=>'ד','ﬣ'=>'×”','ﬤ'=>'×›','ﬥ'=>'ל','ﬦ'=>'×','ﬧ'=>'ר','ﬨ'=>'ת','﬩'=>'+','שׁ'=>'ש×','שׂ'=>'שׂ','שּׁ'=>'שּ×','שּׂ'=>'שּׂ','אַ'=>'×Ö·','אָ'=>'×Ö¸','אּ'=>'×Ö¼','בּ'=>'בּ','גּ'=>'×’Ö¼','דּ'=>'דּ','הּ'=>'×”Ö¼','וּ'=>'וּ','זּ'=>'×–Ö¼','טּ'=>'טּ','יּ'=>'×™Ö¼','ךּ'=>'ךּ','כּ'=>'×›Ö¼','לּ'=>'לּ','מּ'=>'מּ','ï­€'=>'× Ö¼','ï­'=>'סּ','ï­ƒ'=>'×£Ö¼','ï­„'=>'פּ','ï­†'=>'צּ','ï­‡'=>'קּ','ï­ˆ'=>'רּ','ï­‰'=>'שּ','ï­Š'=>'תּ','ï­‹'=>'וֹ','ï­Œ'=>'בֿ','ï­'=>'×›Ö¿','ï­Ž'=>'פֿ','ï­'=>'×ל','ï­'=>'Ù±','ï­‘'=>'Ù±','ï­’'=>'Ù»','ï­“'=>'Ù»','ï­”'=>'Ù»','ï­•'=>'Ù»','ï­–'=>'Ù¾','ï­—'=>'Ù¾','ï­˜'=>'Ù¾','ï­™'=>'Ù¾','ï­š'=>'Ú€','ï­›'=>'Ú€','ï­œ'=>'Ú€','ï­'=>'Ú€','ï­ž'=>'Ùº','ï­Ÿ'=>'Ùº','ï­ '=>'Ùº','ï­¡'=>'Ùº','ï­¢'=>'Ù¿','ï­£'=>'Ù¿','ï­¤'=>'Ù¿','ï­¥'=>'Ù¿','ï­¦'=>'Ù¹','ï­§'=>'Ù¹','ï­¨'=>'Ù¹','ï­©'=>'Ù¹','ï­ª'=>'Ú¤','ï­«'=>'Ú¤','ï­¬'=>'Ú¤','ï­­'=>'Ú¤','ï­®'=>'Ú¦','ï­¯'=>'Ú¦','ï­°'=>'Ú¦','ï­±'=>'Ú¦','ï­²'=>'Ú„','ï­³'=>'Ú„','ï­´'=>'Ú„','ï­µ'=>'Ú„','ï­¶'=>'Úƒ','ï­·'=>'Úƒ','ï­¸'=>'Úƒ','ï­¹'=>'Úƒ','ï­º'=>'Ú†','ï­»'=>'Ú†','ï­¼'=>'Ú†','ï­½'=>'Ú†','ï­¾'=>'Ú‡','ï­¿'=>'Ú‡','ﮀ'=>'Ú‡','ï®'=>'Ú‡','ﮂ'=>'Ú','ﮃ'=>'Ú','ﮄ'=>'ÚŒ','ï®…'=>'ÚŒ','ﮆ'=>'ÚŽ','ﮇ'=>'ÚŽ','ﮈ'=>'Úˆ','ﮉ'=>'Úˆ','ﮊ'=>'Ú˜','ﮋ'=>'Ú˜','ﮌ'=>'Ú‘','ï®'=>'Ú‘','ﮎ'=>'Ú©','ï®'=>'Ú©','ï®'=>'Ú©','ﮑ'=>'Ú©','ï®’'=>'Ú¯','ﮓ'=>'Ú¯','ï®”'=>'Ú¯','ﮕ'=>'Ú¯','ï®–'=>'Ú³','ï®—'=>'Ú³','ﮘ'=>'Ú³','ï®™'=>'Ú³','ﮚ'=>'Ú±','ï®›'=>'Ú±','ﮜ'=>'Ú±','ï®'=>'Ú±','ﮞ'=>'Úº','ﮟ'=>'Úº','ï® '=>'Ú»','ﮡ'=>'Ú»','ﮢ'=>'Ú»','ﮣ'=>'Ú»','ﮤ'=>'Û•Ù”','ﮥ'=>'Û•Ù”','ﮦ'=>'Û','ﮧ'=>'Û','ﮨ'=>'Û','ﮩ'=>'Û','ﮪ'=>'Ú¾','ﮫ'=>'Ú¾','ﮬ'=>'Ú¾','ï®­'=>'Ú¾','ï®®'=>'Û’','ﮯ'=>'Û’','ï®°'=>'Û’Ù”','ï®±'=>'Û’Ù”','ﯓ'=>'Ú­','ﯔ'=>'Ú­','ﯕ'=>'Ú­','ﯖ'=>'Ú­','ﯗ'=>'Û‡','ﯘ'=>'Û‡','ﯙ'=>'Û†','ﯚ'=>'Û†','ﯛ'=>'Ûˆ','ﯜ'=>'Ûˆ','ï¯'=>'Û‡Ù´','ﯞ'=>'Û‹','ﯟ'=>'Û‹','ﯠ'=>'Û…','ﯡ'=>'Û…','ﯢ'=>'Û‰','ﯣ'=>'Û‰','ﯤ'=>'Û','ﯥ'=>'Û','ﯦ'=>'Û','ﯧ'=>'Û','ﯨ'=>'Ù‰','ﯩ'=>'Ù‰','ﯪ'=>'ئا','ﯫ'=>'ئا','ﯬ'=>'ÙŠÙ”Û•','ﯭ'=>'ÙŠÙ”Û•','ﯮ'=>'ÙŠÙ”Ùˆ','ﯯ'=>'ÙŠÙ”Ùˆ','ﯰ'=>'ÙŠÙ”Û‡','ﯱ'=>'ÙŠÙ”Û‡','ﯲ'=>'ÙŠÙ”Û†','ﯳ'=>'ÙŠÙ”Û†','ﯴ'=>'ÙŠÙ”Ûˆ','ﯵ'=>'ÙŠÙ”Ûˆ','ﯶ'=>'ÙŠÙ”Û','ﯷ'=>'ÙŠÙ”Û','ﯸ'=>'ÙŠÙ”Û','ﯹ'=>'ÙŠÙ”Ù‰','ﯺ'=>'ÙŠÙ”Ù‰','ﯻ'=>'ÙŠÙ”Ù‰','ﯼ'=>'ÛŒ','ﯽ'=>'ÛŒ','ﯾ'=>'ÛŒ','ﯿ'=>'ÛŒ','ï°€'=>'ئج','ï°'=>'ئح','ï°‚'=>'ÙŠÙ”Ù…','ï°ƒ'=>'ÙŠÙ”Ù‰','ï°„'=>'ÙŠÙ”ÙŠ','ï°…'=>'بج','ï°†'=>'بح','ï°‡'=>'بخ','ï°ˆ'=>'بم','ï°‰'=>'بى','ï°Š'=>'بي','ï°‹'=>'تج','ï°Œ'=>'تح','ï°'=>'تخ','ï°Ž'=>'تم','ï°'=>'تى','ï°'=>'تي','ï°‘'=>'ثج','ï°’'=>'ثم','ï°“'=>'ثى','ï°”'=>'ثي','ï°•'=>'جح','ï°–'=>'جم','ï°—'=>'حج','ï°˜'=>'حم','ï°™'=>'خج','ï°š'=>'خح','ï°›'=>'خم','ï°œ'=>'سج','ï°'=>'سح','ï°ž'=>'سخ','ï°Ÿ'=>'سم','ï° '=>'صح','ï°¡'=>'صم','ï°¢'=>'ضج','ï°£'=>'ضح','ï°¤'=>'ضخ','ï°¥'=>'ضم','ï°¦'=>'طح','ï°§'=>'طم','ï°¨'=>'ظم','ï°©'=>'عج','ï°ª'=>'عم','ï°«'=>'غج','ï°¬'=>'غم','ï°­'=>'Ùج','ï°®'=>'ÙØ­','ï°¯'=>'ÙØ®','ï°°'=>'ÙÙ…','ï°±'=>'ÙÙ‰','ï°²'=>'ÙÙŠ','ï°³'=>'قح','ï°´'=>'قم','ï°µ'=>'قى','ï°¶'=>'قي','ï°·'=>'كا','ï°¸'=>'كج','ï°¹'=>'كح','ï°º'=>'كخ','ï°»'=>'كل','ï°¼'=>'كم','ï°½'=>'كى','ï°¾'=>'كي','ï°¿'=>'لج','ï±€'=>'لح','ï±'=>'لخ','ﱂ'=>'لم','ﱃ'=>'لى','ﱄ'=>'لي','ï±…'=>'مج','ﱆ'=>'مح','ﱇ'=>'مخ','ﱈ'=>'مم','ﱉ'=>'مى','ﱊ'=>'مي','ﱋ'=>'نج','ﱌ'=>'نح','ï±'=>'نخ','ﱎ'=>'نم','ï±'=>'نى','ï±'=>'ني','ﱑ'=>'هج','ï±’'=>'هم','ﱓ'=>'هى','ï±”'=>'هي','ﱕ'=>'يج','ï±–'=>'يح','ï±—'=>'يخ','ﱘ'=>'يم','ï±™'=>'يى','ﱚ'=>'يي','ï±›'=>'ذٰ','ﱜ'=>'رٰ','ï±'=>'ىٰ','ﱞ'=>' ٌّ','ﱟ'=>' ÙÙ‘','ï± '=>' ÙŽÙ‘','ﱡ'=>' ÙÙ‘','ï±¢'=>' ÙÙ‘','ï±£'=>' ّٰ','ﱤ'=>'ئر','ï±¥'=>'ئز','ﱦ'=>'ÙŠÙ”Ù…','ﱧ'=>'ÙŠÙ”Ù†','ﱨ'=>'ÙŠÙ”Ù‰','ﱩ'=>'ÙŠÙ”ÙŠ','ﱪ'=>'بر','ﱫ'=>'بز','ﱬ'=>'بم','ï±­'=>'بن','ï±®'=>'بى','ﱯ'=>'بي','ï±°'=>'تر','ï±±'=>'تز','ï±²'=>'تم','ï±³'=>'تن','ï±´'=>'تى','ï±µ'=>'تي','ﱶ'=>'ثر','ï±·'=>'ثز','ﱸ'=>'ثم','ï±¹'=>'ثن','ﱺ'=>'ثى','ï±»'=>'ثي','ï±¼'=>'ÙÙ‰','ï±½'=>'ÙÙŠ','ï±¾'=>'قى','ﱿ'=>'قي','ï²€'=>'كا','ï²'=>'كل','ﲂ'=>'كم','ﲃ'=>'كى','ﲄ'=>'كي','ï²…'=>'لم','ﲆ'=>'لى','ﲇ'=>'لي','ﲈ'=>'ما','ﲉ'=>'مم','ﲊ'=>'نر','ﲋ'=>'نز','ﲌ'=>'نم','ï²'=>'نن','ﲎ'=>'نى','ï²'=>'ني','ï²'=>'ىٰ','ﲑ'=>'ير','ï²’'=>'يز','ﲓ'=>'يم','ï²”'=>'ين','ﲕ'=>'يى','ï²–'=>'يي','ï²—'=>'ئج','ﲘ'=>'ئح','ï²™'=>'ئخ','ﲚ'=>'ÙŠÙ”Ù…','ï²›'=>'ÙŠÙ”Ù‡','ﲜ'=>'بج','ï²'=>'بح','ﲞ'=>'بخ','ﲟ'=>'بم','ï² '=>'به','ﲡ'=>'تج','ï²¢'=>'تح','ï²£'=>'تخ','ﲤ'=>'تم','ï²¥'=>'ته','ﲦ'=>'ثم','ﲧ'=>'جح','ﲨ'=>'جم','ﲩ'=>'حج','ﲪ'=>'حم','ﲫ'=>'خج','ﲬ'=>'خم','ï²­'=>'سج','ï²®'=>'سح','ﲯ'=>'سخ','ï²°'=>'سم','ï²±'=>'صح','ï²²'=>'صخ','ï²³'=>'صم','ï²´'=>'ضج','ï²µ'=>'ضح','ﲶ'=>'ضخ','ï²·'=>'ضم','ﲸ'=>'طح','ï²¹'=>'ظم','ﲺ'=>'عج','ï²»'=>'عم','ï²¼'=>'غج','ï²½'=>'غم','ï²¾'=>'Ùج','ﲿ'=>'ÙØ­','ï³€'=>'ÙØ®','ï³'=>'ÙÙ…','ﳂ'=>'قح','ﳃ'=>'قم','ﳄ'=>'كج','ï³…'=>'كح','ﳆ'=>'كخ','ﳇ'=>'كل','ﳈ'=>'كم','ﳉ'=>'لج','ﳊ'=>'لح','ﳋ'=>'لخ','ﳌ'=>'لم','ï³'=>'له','ﳎ'=>'مج','ï³'=>'مح','ï³'=>'مخ','ﳑ'=>'مم','ï³’'=>'نج','ﳓ'=>'نح','ï³”'=>'نخ','ﳕ'=>'نم','ï³–'=>'نه','ï³—'=>'هج','ﳘ'=>'هم','ï³™'=>'هٰ','ﳚ'=>'يج','ï³›'=>'يح','ﳜ'=>'يخ','ï³'=>'يم','ﳞ'=>'يه','ﳟ'=>'ÙŠÙ”Ù…','ï³ '=>'ÙŠÙ”Ù‡','ﳡ'=>'بم','ï³¢'=>'به','ï³£'=>'تم','ﳤ'=>'ته','ï³¥'=>'ثم','ﳦ'=>'ثه','ﳧ'=>'سم','ﳨ'=>'سه','ﳩ'=>'شم','ﳪ'=>'شه','ﳫ'=>'كل','ﳬ'=>'كم','ï³­'=>'لم','ï³®'=>'نم','ﳯ'=>'نه','ï³°'=>'يم','ï³±'=>'يه','ï³²'=>'Ù€ÙŽÙ‘','ï³³'=>'Ù€ÙÙ‘','ï³´'=>'Ù€ÙÙ‘','ï³µ'=>'طى','ﳶ'=>'طي','ï³·'=>'عى','ﳸ'=>'عي','ï³¹'=>'غى','ﳺ'=>'غي','ï³»'=>'سى','ï³¼'=>'سي','ï³½'=>'شى','ï³¾'=>'شي','ﳿ'=>'حى','ï´€'=>'حي','ï´'=>'جى','ï´‚'=>'جي','ï´ƒ'=>'خى','ï´„'=>'خي','ï´…'=>'صى','ï´†'=>'صي','ï´‡'=>'ضى','ï´ˆ'=>'ضي','ï´‰'=>'شج','ï´Š'=>'شح','ï´‹'=>'شخ','ï´Œ'=>'شم','ï´'=>'شر','ï´Ž'=>'سر','ï´'=>'صر','ï´'=>'ضر','ï´‘'=>'طى','ï´’'=>'طي','ï´“'=>'عى','ï´”'=>'عي','ï´•'=>'غى','ï´–'=>'غي','ï´—'=>'سى','ï´˜'=>'سي','ï´™'=>'شى','ï´š'=>'شي','ï´›'=>'حى','ï´œ'=>'حي','ï´'=>'جى','ï´ž'=>'جي','ï´Ÿ'=>'خى','ï´ '=>'خي','ï´¡'=>'صى','ï´¢'=>'صي','ï´£'=>'ضى','ï´¤'=>'ضي','ï´¥'=>'شج','ï´¦'=>'شح','ï´§'=>'شخ','ï´¨'=>'شم','ï´©'=>'شر','ï´ª'=>'سر','ï´«'=>'صر','ï´¬'=>'ضر','ï´­'=>'شج','ï´®'=>'شح','ï´¯'=>'شخ','ï´°'=>'شم','ï´±'=>'سه','ï´²'=>'شه','ï´³'=>'طم','ï´´'=>'سج','ï´µ'=>'سح','ï´¶'=>'سخ','ï´·'=>'شج','ï´¸'=>'شح','ï´¹'=>'شخ','ï´º'=>'طم','ï´»'=>'ظم','ï´¼'=>'اً','ï´½'=>'اً','ïµ'=>'تجم','ﵑ'=>'تحج','ïµ’'=>'تحج','ﵓ'=>'تحم','ïµ”'=>'تخم','ﵕ'=>'تمج','ïµ–'=>'تمح','ïµ—'=>'تمخ','ﵘ'=>'جمح','ïµ™'=>'جمح','ﵚ'=>'حمي','ïµ›'=>'حمى','ﵜ'=>'سحج','ïµ'=>'سجح','ﵞ'=>'سجى','ﵟ'=>'سمح','ïµ '=>'سمح','ﵡ'=>'سمج','ïµ¢'=>'سمم','ïµ£'=>'سمم','ﵤ'=>'صحح','ïµ¥'=>'صحح','ﵦ'=>'صمم','ﵧ'=>'شحم','ﵨ'=>'شحم','ﵩ'=>'شجي','ﵪ'=>'شمخ','ﵫ'=>'شمخ','ﵬ'=>'شمم','ïµ­'=>'شمم','ïµ®'=>'ضحى','ﵯ'=>'ضخم','ïµ°'=>'ضخم','ïµ±'=>'طمح','ïµ²'=>'طمح','ïµ³'=>'طمم','ïµ´'=>'طمي','ïµµ'=>'عجم','ﵶ'=>'عمم','ïµ·'=>'عمم','ﵸ'=>'عمى','ïµ¹'=>'غمم','ﵺ'=>'غمي','ïµ»'=>'غمى','ïµ¼'=>'Ùخم','ïµ½'=>'Ùخم','ïµ¾'=>'قمح','ﵿ'=>'قمم','ﶀ'=>'لحم','ï¶'=>'لحي','ﶂ'=>'لحى','ﶃ'=>'لجج','ﶄ'=>'لجج','ﶅ'=>'لخم','ﶆ'=>'لخم','ﶇ'=>'لمح','ﶈ'=>'لمح','ﶉ'=>'محج','ﶊ'=>'محم','ﶋ'=>'محي','ﶌ'=>'مجح','ï¶'=>'مجم','ﶎ'=>'مخج','ï¶'=>'مخم','ﶒ'=>'مجخ','ﶓ'=>'همج','ﶔ'=>'همم','ﶕ'=>'نحم','ﶖ'=>'نحى','ﶗ'=>'نجم','ﶘ'=>'نجم','ﶙ'=>'نجى','ﶚ'=>'نمي','ﶛ'=>'نمى','ﶜ'=>'يمم','ï¶'=>'يمم','ﶞ'=>'بخي','ﶟ'=>'تجي','ﶠ'=>'تجى','ﶡ'=>'تخي','ﶢ'=>'تخى','ﶣ'=>'تمي','ﶤ'=>'تمى','ﶥ'=>'جمي','ﶦ'=>'جحى','ﶧ'=>'جمى','ﶨ'=>'سخى','ﶩ'=>'صحي','ﶪ'=>'شحي','ﶫ'=>'ضحي','ﶬ'=>'لجي','ﶭ'=>'لمي','ﶮ'=>'يحي','ﶯ'=>'يجي','ﶰ'=>'يمي','ﶱ'=>'ممي','ﶲ'=>'قمي','ﶳ'=>'نحي','ﶴ'=>'قمح','ﶵ'=>'لحم','ﶶ'=>'عمي','ﶷ'=>'كمي','ﶸ'=>'نجح','ﶹ'=>'مخي','ﶺ'=>'لجم','ﶻ'=>'كمم','ﶼ'=>'لجم','ﶽ'=>'نجح','ﶾ'=>'جحي','ﶿ'=>'حجي','ï·€'=>'مجي','ï·'=>'Ùمي','ï·‚'=>'بحي','ï·ƒ'=>'كمم','ï·„'=>'عجم','ï·…'=>'صمم','ï·†'=>'سخي','ï·‡'=>'نجي','ï·°'=>'صلے','ï·±'=>'قلے','ï·²'=>'الله','ï·³'=>'اكبر','ï·´'=>'محمد','ï·µ'=>'صلعم','ï·¶'=>'رسول','ï··'=>'عليه','ï·¸'=>'وسلم','ï·¹'=>'صلى','ï·º'=>'صلى الله عليه وسلم','ï·»'=>'جل جلاله','ï·¼'=>'ریال','ï¸'=>',','︑'=>'ã€','︒'=>'。','︓'=>':','︔'=>';','︕'=>'!','︖'=>'?','︗'=>'〖','︘'=>'〗','︙'=>'...','︰'=>'..','︱'=>'—','︲'=>'–','︳'=>'_','︴'=>'_','︵'=>'(','︶'=>')','︷'=>'{','︸'=>'}','︹'=>'〔','︺'=>'〕','︻'=>'ã€','︼'=>'】','︽'=>'《','︾'=>'》','︿'=>'〈','ï¹€'=>'〉','ï¹'=>'「','﹂'=>'ã€','﹃'=>'『','﹄'=>'ã€','﹇'=>'[','﹈'=>']','﹉'=>' Ì…','﹊'=>' Ì…','﹋'=>' Ì…','﹌'=>' Ì…','ï¹'=>'_','﹎'=>'_','ï¹'=>'_','ï¹'=>',','﹑'=>'ã€','ï¹’'=>'.','ï¹”'=>';','﹕'=>':','ï¹–'=>'?','ï¹—'=>'!','﹘'=>'—','ï¹™'=>'(','﹚'=>')','ï¹›'=>'{','﹜'=>'}','ï¹'=>'〔','﹞'=>'〕','﹟'=>'#','ï¹ '=>'&','﹡'=>'*','ï¹¢'=>'+','ï¹£'=>'-','﹤'=>'<','ï¹¥'=>'>','﹦'=>'=','﹨'=>'\\','﹩'=>'$','﹪'=>'%','﹫'=>'@','ï¹°'=>' Ù‹','ï¹±'=>'ـً','ï¹²'=>' ÙŒ','ï¹´'=>' Ù','ﹶ'=>' ÙŽ','ï¹·'=>'Ù€ÙŽ','ﹸ'=>' Ù','ï¹¹'=>'Ù€Ù','ﹺ'=>' Ù','ï¹»'=>'Ù€Ù','ï¹¼'=>' Ù‘','ï¹½'=>'ـّ','ï¹¾'=>' Ù’','ﹿ'=>'ـْ','ﺀ'=>'Ø¡','ïº'=>'آ','ﺂ'=>'آ','ﺃ'=>'أ','ﺄ'=>'أ','ﺅ'=>'ÙˆÙ”','ﺆ'=>'ÙˆÙ”','ﺇ'=>'إ','ﺈ'=>'إ','ﺉ'=>'ÙŠÙ”','ﺊ'=>'ÙŠÙ”','ﺋ'=>'ÙŠÙ”','ﺌ'=>'ÙŠÙ”','ïº'=>'ا','ﺎ'=>'ا','ïº'=>'ب','ïº'=>'ب','ﺑ'=>'ب','ﺒ'=>'ب','ﺓ'=>'Ø©','ﺔ'=>'Ø©','ﺕ'=>'ت','ﺖ'=>'ت','ﺗ'=>'ت','ﺘ'=>'ت','ﺙ'=>'Ø«','ﺚ'=>'Ø«','ﺛ'=>'Ø«','ﺜ'=>'Ø«','ïº'=>'ج','ﺞ'=>'ج','ﺟ'=>'ج','ﺠ'=>'ج','ﺡ'=>'Ø­','ﺢ'=>'Ø­','ﺣ'=>'Ø­','ﺤ'=>'Ø­','ﺥ'=>'Ø®','ﺦ'=>'Ø®','ﺧ'=>'Ø®','ﺨ'=>'Ø®','ﺩ'=>'د','ﺪ'=>'د','ﺫ'=>'Ø°','ﺬ'=>'Ø°','ﺭ'=>'ر','ﺮ'=>'ر','ﺯ'=>'ز','ﺰ'=>'ز','ﺱ'=>'س','ﺲ'=>'س','ﺳ'=>'س','ﺴ'=>'س','ﺵ'=>'Ø´','ﺶ'=>'Ø´','ﺷ'=>'Ø´','ﺸ'=>'Ø´','ﺹ'=>'ص','ﺺ'=>'ص','ﺻ'=>'ص','ﺼ'=>'ص','ﺽ'=>'ض','ﺾ'=>'ض','ﺿ'=>'ض','ﻀ'=>'ض','ï»'=>'Ø·','ﻂ'=>'Ø·','ﻃ'=>'Ø·','ﻄ'=>'Ø·','ï»…'=>'ظ','ﻆ'=>'ظ','ﻇ'=>'ظ','ﻈ'=>'ظ','ﻉ'=>'ع','ﻊ'=>'ع','ﻋ'=>'ع','ﻌ'=>'ع','ï»'=>'غ','ﻎ'=>'غ','ï»'=>'غ','ï»'=>'غ','ﻑ'=>'Ù','ï»’'=>'Ù','ﻓ'=>'Ù','ï»”'=>'Ù','ﻕ'=>'Ù‚','ï»–'=>'Ù‚','ï»—'=>'Ù‚','ﻘ'=>'Ù‚','ï»™'=>'Ùƒ','ﻚ'=>'Ùƒ','ï»›'=>'Ùƒ','ﻜ'=>'Ùƒ','ï»'=>'Ù„','ﻞ'=>'Ù„','ﻟ'=>'Ù„','ï» '=>'Ù„','ﻡ'=>'Ù…','ﻢ'=>'Ù…','ﻣ'=>'Ù…','ﻤ'=>'Ù…','ﻥ'=>'Ù†','ﻦ'=>'Ù†','ﻧ'=>'Ù†','ﻨ'=>'Ù†','ﻩ'=>'Ù‡','ﻪ'=>'Ù‡','ﻫ'=>'Ù‡','ﻬ'=>'Ù‡','ï»­'=>'Ùˆ','ï»®'=>'Ùˆ','ﻯ'=>'Ù‰','ï»°'=>'Ù‰','ï»±'=>'ÙŠ','ﻲ'=>'ÙŠ','ﻳ'=>'ÙŠ','ï»´'=>'ÙŠ','ﻵ'=>'لآ','ﻶ'=>'لآ','ï»·'=>'لأ','ﻸ'=>'لأ','ﻹ'=>'لإ','ﻺ'=>'لإ','ï»»'=>'لا','ﻼ'=>'لا','ï¼'=>'!','"'=>'"','#'=>'#','$'=>'$','ï¼…'=>'%','&'=>'&','''=>'\'','('=>'(',')'=>')','*'=>'*','+'=>'+',','=>',','ï¼'=>'-','.'=>'.','ï¼'=>'/','ï¼'=>'0','1'=>'1','ï¼’'=>'2','3'=>'3','ï¼”'=>'4','5'=>'5','ï¼–'=>'6','ï¼—'=>'7','8'=>'8','ï¼™'=>'9',':'=>':','ï¼›'=>';','<'=>'<','ï¼'=>'=','>'=>'>','?'=>'?','ï¼ '=>'@','A'=>'A','ï¼¢'=>'B','ï¼£'=>'C','D'=>'D','ï¼¥'=>'E','F'=>'F','G'=>'G','H'=>'H','I'=>'I','J'=>'J','K'=>'K','L'=>'L','ï¼­'=>'M','ï¼®'=>'N','O'=>'O','ï¼°'=>'P','ï¼±'=>'Q','ï¼²'=>'R','ï¼³'=>'S','ï¼´'=>'T','ï¼µ'=>'U','V'=>'V','ï¼·'=>'W','X'=>'X','ï¼¹'=>'Y','Z'=>'Z','ï¼»'=>'[','ï¼¼'=>'\\','ï¼½'=>']','ï¼¾'=>'^','_'=>'_','ï½€'=>'`','ï½'=>'a','b'=>'b','c'=>'c','d'=>'d','ï½…'=>'e','f'=>'f','g'=>'g','h'=>'h','i'=>'i','j'=>'j','k'=>'k','l'=>'l','ï½'=>'m','n'=>'n','ï½'=>'o','ï½'=>'p','q'=>'q','ï½’'=>'r','s'=>'s','ï½”'=>'t','u'=>'u','ï½–'=>'v','ï½—'=>'w','x'=>'x','ï½™'=>'y','z'=>'z','ï½›'=>'{','|'=>'|','ï½'=>'}','~'=>'~','⦅'=>'⦅','ï½ '=>'⦆','。'=>'。','ï½¢'=>'「','ï½£'=>'ã€','、'=>'ã€','ï½¥'=>'・','ヲ'=>'ヲ','ァ'=>'ã‚¡','ィ'=>'ã‚£','ゥ'=>'ã‚¥','ェ'=>'ェ','ォ'=>'ã‚©','ャ'=>'ャ','ï½­'=>'ュ','ï½®'=>'ョ','ッ'=>'ッ','ï½°'=>'ー','ï½±'=>'ã‚¢','ï½²'=>'イ','ï½³'=>'ウ','ï½´'=>'エ','ï½µ'=>'オ','カ'=>'ã‚«','ï½·'=>'ã‚­','ク'=>'ク','ï½¹'=>'ケ','コ'=>'コ','ï½»'=>'サ','ï½¼'=>'ã‚·','ï½½'=>'ス','ï½¾'=>'ã‚»','ソ'=>'ソ','ï¾€'=>'ã‚¿','ï¾'=>'ãƒ','ツ'=>'ツ','テ'=>'テ','ト'=>'ト','ï¾…'=>'ナ','ニ'=>'ニ','ヌ'=>'ヌ','ネ'=>'ãƒ','ノ'=>'ノ','ハ'=>'ãƒ','ヒ'=>'ヒ','フ'=>'フ','ï¾'=>'ヘ','ホ'=>'ホ','ï¾'=>'マ','ï¾'=>'ミ','ム'=>'ム','ï¾’'=>'メ','モ'=>'モ','ï¾”'=>'ヤ','ユ'=>'ユ','ï¾–'=>'ヨ','ï¾—'=>'ラ','リ'=>'リ','ï¾™'=>'ル','レ'=>'レ','ï¾›'=>'ロ','ワ'=>'ワ','ï¾'=>'ン','゙'=>'ã‚™','゚'=>'ã‚š','ï¾ '=>'á… ','ᄀ'=>'á„€','ï¾¢'=>'á„','ï¾£'=>'ᆪ','ᄂ'=>'á„‚','ï¾¥'=>'ᆬ','ᆭ'=>'ᆭ','ᄃ'=>'ᄃ','ᄄ'=>'á„„','ᄅ'=>'á„…','ᆰ'=>'ᆰ','ᆱ'=>'ᆱ','ᆲ'=>'ᆲ','ï¾­'=>'ᆳ','ï¾®'=>'ᆴ','ᆵ'=>'ᆵ','ï¾°'=>'á„š','ï¾±'=>'ᄆ','ï¾²'=>'ᄇ','ï¾³'=>'ᄈ','ï¾´'=>'á„¡','ï¾µ'=>'ᄉ','ᄊ'=>'á„Š','ï¾·'=>'á„‹','ᄌ'=>'á„Œ','ï¾¹'=>'á„','ᄎ'=>'á„Ž','ï¾»'=>'á„','ï¾¼'=>'á„','ï¾½'=>'á„‘','ï¾¾'=>'á„’','ï¿‚'=>'á…¡','ᅢ'=>'á…¢','ï¿„'=>'á…£','ï¿…'=>'á…¤','ᅥ'=>'á…¥','ᅦ'=>'á…¦','ï¿Š'=>'á…§','ï¿‹'=>'á…¨','ï¿Œ'=>'á…©','ï¿'=>'á…ª','ï¿Ž'=>'á…«','ï¿'=>'á…¬','ï¿’'=>'á…­','ï¿“'=>'á…®','ï¿”'=>'á…¯','ï¿•'=>'á…°','ï¿–'=>'á…±','ï¿—'=>'á…²','ï¿š'=>'á…³','ï¿›'=>'á…´','ï¿œ'=>'á…µ','ï¿ '=>'¢','ï¿¡'=>'£','ï¿¢'=>'¬','ï¿£'=>' Ì„','¦'=>'¦','ï¿¥'=>'Â¥','₩'=>'â‚©','│'=>'│','ï¿©'=>'â†','↑'=>'↑','ï¿«'=>'→','↓'=>'↓','ï¿­'=>'â– ','ï¿®'=>'â—‹','ð…ž'=>'ð…—ð…¥','ð…Ÿ'=>'ð…˜ð…¥','ð… '=>'ð…˜ð…¥ð…®','ð…¡'=>'ð…˜ð…¥ð…¯','ð…¢'=>'ð…˜ð…¥ð…°','ð…£'=>'ð…˜ð…¥ð…±','ð…¤'=>'ð…˜ð…¥ð…²','ð†»'=>'ð†¹ð…¥','ð†¼'=>'ð†ºð…¥','ð†½'=>'ð†¹ð…¥ð…®','ð†¾'=>'ð†ºð…¥ð…®','ð†¿'=>'ð†¹ð…¥ð…¯','ð‡€'=>'ð†ºð…¥ð…¯','ð€'=>'A','ð'=>'B','ð‚'=>'C','ðƒ'=>'D','ð„'=>'E','ð…'=>'F','ð†'=>'G','ð‡'=>'H','ðˆ'=>'I','ð‰'=>'J','ðŠ'=>'K','ð‹'=>'L','ðŒ'=>'M','ð'=>'N','ðŽ'=>'O','ð'=>'P','ð'=>'Q','ð‘'=>'R','ð’'=>'S','ð“'=>'T','ð”'=>'U','ð•'=>'V','ð–'=>'W','ð—'=>'X','ð˜'=>'Y','ð™'=>'Z','ðš'=>'a','ð›'=>'b','ðœ'=>'c','ð'=>'d','ðž'=>'e','ðŸ'=>'f','ð '=>'g','ð¡'=>'h','ð¢'=>'i','ð£'=>'j','ð¤'=>'k','ð¥'=>'l','ð¦'=>'m','ð§'=>'n','ð¨'=>'o','ð©'=>'p','ðª'=>'q','ð«'=>'r','ð¬'=>'s','ð­'=>'t','ð®'=>'u','ð¯'=>'v','ð°'=>'w','ð±'=>'x','ð²'=>'y','ð³'=>'z','ð´'=>'A','ðµ'=>'B','ð¶'=>'C','ð·'=>'D','ð¸'=>'E','ð¹'=>'F','ðº'=>'G','ð»'=>'H','ð¼'=>'I','ð½'=>'J','ð¾'=>'K','ð¿'=>'L','ð‘€'=>'M','ð‘'=>'N','ð‘‚'=>'O','ð‘ƒ'=>'P','ð‘„'=>'Q','ð‘…'=>'R','ð‘†'=>'S','ð‘‡'=>'T','ð‘ˆ'=>'U','ð‘‰'=>'V','ð‘Š'=>'W','ð‘‹'=>'X','ð‘Œ'=>'Y','ð‘'=>'Z','ð‘Ž'=>'a','ð‘'=>'b','ð‘'=>'c','ð‘‘'=>'d','ð‘’'=>'e','ð‘“'=>'f','ð‘”'=>'g','ð‘–'=>'i','ð‘—'=>'j','ð‘˜'=>'k','ð‘™'=>'l','ð‘š'=>'m','ð‘›'=>'n','ð‘œ'=>'o','ð‘'=>'p','ð‘ž'=>'q','ð‘Ÿ'=>'r','ð‘ '=>'s','ð‘¡'=>'t','ð‘¢'=>'u','ð‘£'=>'v','ð‘¤'=>'w','ð‘¥'=>'x','ð‘¦'=>'y','ð‘§'=>'z','ð‘¨'=>'A','ð‘©'=>'B','ð‘ª'=>'C','ð‘«'=>'D','ð‘¬'=>'E','ð‘­'=>'F','ð‘®'=>'G','ð‘¯'=>'H','ð‘°'=>'I','ð‘±'=>'J','ð‘²'=>'K','ð‘³'=>'L','ð‘´'=>'M','ð‘µ'=>'N','ð‘¶'=>'O','ð‘·'=>'P','ð‘¸'=>'Q','ð‘¹'=>'R','ð‘º'=>'S','ð‘»'=>'T','ð‘¼'=>'U','ð‘½'=>'V','ð‘¾'=>'W','ð‘¿'=>'X','ð’€'=>'Y','ð’'=>'Z','ð’‚'=>'a','ð’ƒ'=>'b','ð’„'=>'c','ð’…'=>'d','ð’†'=>'e','ð’‡'=>'f','ð’ˆ'=>'g','ð’‰'=>'h','ð’Š'=>'i','ð’‹'=>'j','ð’Œ'=>'k','ð’'=>'l','ð’Ž'=>'m','ð’'=>'n','ð’'=>'o','ð’‘'=>'p','ð’’'=>'q','ð’“'=>'r','ð’”'=>'s','ð’•'=>'t','ð’–'=>'u','ð’—'=>'v','ð’˜'=>'w','ð’™'=>'x','ð’š'=>'y','ð’›'=>'z','ð’œ'=>'A','ð’ž'=>'C','ð’Ÿ'=>'D','ð’¢'=>'G','ð’¥'=>'J','ð’¦'=>'K','ð’©'=>'N','ð’ª'=>'O','ð’«'=>'P','ð’¬'=>'Q','ð’®'=>'S','ð’¯'=>'T','ð’°'=>'U','ð’±'=>'V','ð’²'=>'W','ð’³'=>'X','ð’´'=>'Y','ð’µ'=>'Z','ð’¶'=>'a','ð’·'=>'b','ð’¸'=>'c','ð’¹'=>'d','ð’»'=>'f','ð’½'=>'h','ð’¾'=>'i','ð’¿'=>'j','ð“€'=>'k','ð“'=>'l','ð“‚'=>'m','ð“ƒ'=>'n','ð“…'=>'p','ð“†'=>'q','ð“‡'=>'r','ð“ˆ'=>'s','ð“‰'=>'t','ð“Š'=>'u','ð“‹'=>'v','ð“Œ'=>'w','ð“'=>'x','ð“Ž'=>'y','ð“'=>'z','ð“'=>'A','ð“‘'=>'B','ð“’'=>'C','ð““'=>'D','ð“”'=>'E','ð“•'=>'F','ð“–'=>'G','ð“—'=>'H','ð“˜'=>'I','ð“™'=>'J','ð“š'=>'K','ð“›'=>'L','ð“œ'=>'M','ð“'=>'N','ð“ž'=>'O','ð“Ÿ'=>'P','ð“ '=>'Q','ð“¡'=>'R','ð“¢'=>'S','ð“£'=>'T','ð“¤'=>'U','ð“¥'=>'V','ð“¦'=>'W','ð“§'=>'X','ð“¨'=>'Y','ð“©'=>'Z','ð“ª'=>'a','ð“«'=>'b','ð“¬'=>'c','ð“­'=>'d','ð“®'=>'e','ð“¯'=>'f','ð“°'=>'g','ð“±'=>'h','ð“²'=>'i','ð“³'=>'j','ð“´'=>'k','ð“µ'=>'l','ð“¶'=>'m','ð“·'=>'n','ð“¸'=>'o','ð“¹'=>'p','ð“º'=>'q','ð“»'=>'r','ð“¼'=>'s','ð“½'=>'t','ð“¾'=>'u','ð“¿'=>'v','ð”€'=>'w','ð”'=>'x','ð”‚'=>'y','ð”ƒ'=>'z','ð”„'=>'A','ð”…'=>'B','ð”‡'=>'D','ð”ˆ'=>'E','ð”‰'=>'F','ð”Š'=>'G','ð”'=>'J','ð”Ž'=>'K','ð”'=>'L','ð”'=>'M','ð”‘'=>'N','ð”’'=>'O','ð”“'=>'P','ð””'=>'Q','ð”–'=>'S','ð”—'=>'T','ð”˜'=>'U','ð”™'=>'V','ð”š'=>'W','ð”›'=>'X','ð”œ'=>'Y','ð”ž'=>'a','ð”Ÿ'=>'b','ð” '=>'c','ð”¡'=>'d','ð”¢'=>'e','ð”£'=>'f','ð”¤'=>'g','ð”¥'=>'h','ð”¦'=>'i','ð”§'=>'j','ð”¨'=>'k','ð”©'=>'l','ð”ª'=>'m','ð”«'=>'n','ð”¬'=>'o','ð”­'=>'p','ð”®'=>'q','ð”¯'=>'r','ð”°'=>'s','ð”±'=>'t','ð”²'=>'u','ð”³'=>'v','ð”´'=>'w','ð”µ'=>'x','ð”¶'=>'y','ð”·'=>'z','ð”¸'=>'A','ð”¹'=>'B','ð”»'=>'D','ð”¼'=>'E','ð”½'=>'F','ð”¾'=>'G','ð•€'=>'I','ð•'=>'J','ð•‚'=>'K','ð•ƒ'=>'L','ð•„'=>'M','ð•†'=>'O','ð•Š'=>'S','ð•‹'=>'T','ð•Œ'=>'U','ð•'=>'V','ð•Ž'=>'W','ð•'=>'X','ð•'=>'Y','ð•’'=>'a','ð•“'=>'b','ð•”'=>'c','ð••'=>'d','ð•–'=>'e','ð•—'=>'f','ð•˜'=>'g','ð•™'=>'h','ð•š'=>'i','ð•›'=>'j','ð•œ'=>'k','ð•'=>'l','ð•ž'=>'m','ð•Ÿ'=>'n','ð• '=>'o','ð•¡'=>'p','ð•¢'=>'q','ð•£'=>'r','ð•¤'=>'s','ð•¥'=>'t','ð•¦'=>'u','ð•§'=>'v','ð•¨'=>'w','ð•©'=>'x','ð•ª'=>'y','ð•«'=>'z','ð•¬'=>'A','ð•­'=>'B','ð•®'=>'C','ð•¯'=>'D','ð•°'=>'E','ð•±'=>'F','ð•²'=>'G','ð•³'=>'H','ð•´'=>'I','ð•µ'=>'J','ð•¶'=>'K','ð•·'=>'L','ð•¸'=>'M','ð•¹'=>'N','ð•º'=>'O','ð•»'=>'P','ð•¼'=>'Q','ð•½'=>'R','ð•¾'=>'S','ð•¿'=>'T','ð–€'=>'U','ð–'=>'V','ð–‚'=>'W','ð–ƒ'=>'X','ð–„'=>'Y','ð–…'=>'Z','ð–†'=>'a','ð–‡'=>'b','ð–ˆ'=>'c','ð–‰'=>'d','ð–Š'=>'e','ð–‹'=>'f','ð–Œ'=>'g','ð–'=>'h','ð–Ž'=>'i','ð–'=>'j','ð–'=>'k','ð–‘'=>'l','ð–’'=>'m','ð–“'=>'n','ð–”'=>'o','ð–•'=>'p','ð––'=>'q','ð–—'=>'r','ð–˜'=>'s','ð–™'=>'t','ð–š'=>'u','ð–›'=>'v','ð–œ'=>'w','ð–'=>'x','ð–ž'=>'y','ð–Ÿ'=>'z','ð– '=>'A','ð–¡'=>'B','ð–¢'=>'C','ð–£'=>'D','ð–¤'=>'E','ð–¥'=>'F','ð–¦'=>'G','ð–§'=>'H','ð–¨'=>'I','ð–©'=>'J','ð–ª'=>'K','ð–«'=>'L','ð–¬'=>'M','ð–­'=>'N','ð–®'=>'O','ð–¯'=>'P','ð–°'=>'Q','ð–±'=>'R','ð–²'=>'S','ð–³'=>'T','ð–´'=>'U','ð–µ'=>'V','ð–¶'=>'W','ð–·'=>'X','ð–¸'=>'Y','ð–¹'=>'Z','ð–º'=>'a','ð–»'=>'b','ð–¼'=>'c','ð–½'=>'d','ð–¾'=>'e','ð–¿'=>'f','ð—€'=>'g','ð—'=>'h','ð—‚'=>'i','ð—ƒ'=>'j','ð—„'=>'k','ð—…'=>'l','ð—†'=>'m','ð—‡'=>'n','ð—ˆ'=>'o','ð—‰'=>'p','ð—Š'=>'q','ð—‹'=>'r','ð—Œ'=>'s','ð—'=>'t','ð—Ž'=>'u','ð—'=>'v','ð—'=>'w','ð—‘'=>'x','ð—’'=>'y','ð—“'=>'z','ð—”'=>'A','ð—•'=>'B','ð—–'=>'C','ð——'=>'D','ð—˜'=>'E','ð—™'=>'F','ð—š'=>'G','ð—›'=>'H','ð—œ'=>'I','ð—'=>'J','ð—ž'=>'K','ð—Ÿ'=>'L','ð— '=>'M','ð—¡'=>'N','ð—¢'=>'O','ð—£'=>'P','ð—¤'=>'Q','ð—¥'=>'R','ð—¦'=>'S','ð—§'=>'T','ð—¨'=>'U','ð—©'=>'V','ð—ª'=>'W','ð—«'=>'X','ð—¬'=>'Y','ð—­'=>'Z','ð—®'=>'a','ð—¯'=>'b','ð—°'=>'c','ð—±'=>'d','ð—²'=>'e','ð—³'=>'f','ð—´'=>'g','ð—µ'=>'h','ð—¶'=>'i','ð—·'=>'j','ð—¸'=>'k','ð—¹'=>'l','ð—º'=>'m','ð—»'=>'n','ð—¼'=>'o','ð—½'=>'p','ð—¾'=>'q','ð—¿'=>'r','ð˜€'=>'s','ð˜'=>'t','ð˜‚'=>'u','ð˜ƒ'=>'v','ð˜„'=>'w','ð˜…'=>'x','ð˜†'=>'y','ð˜‡'=>'z','ð˜ˆ'=>'A','ð˜‰'=>'B','ð˜Š'=>'C','ð˜‹'=>'D','ð˜Œ'=>'E','ð˜'=>'F','ð˜Ž'=>'G','ð˜'=>'H','ð˜'=>'I','ð˜‘'=>'J','ð˜’'=>'K','ð˜“'=>'L','ð˜”'=>'M','ð˜•'=>'N','ð˜–'=>'O','ð˜—'=>'P','ð˜˜'=>'Q','ð˜™'=>'R','ð˜š'=>'S','ð˜›'=>'T','ð˜œ'=>'U','ð˜'=>'V','ð˜ž'=>'W','ð˜Ÿ'=>'X','ð˜ '=>'Y','ð˜¡'=>'Z','ð˜¢'=>'a','ð˜£'=>'b','ð˜¤'=>'c','ð˜¥'=>'d','ð˜¦'=>'e','ð˜§'=>'f','ð˜¨'=>'g','ð˜©'=>'h','ð˜ª'=>'i','ð˜«'=>'j','ð˜¬'=>'k','ð˜­'=>'l','ð˜®'=>'m','ð˜¯'=>'n','ð˜°'=>'o','ð˜±'=>'p','ð˜²'=>'q','ð˜³'=>'r','ð˜´'=>'s','ð˜µ'=>'t','ð˜¶'=>'u','ð˜·'=>'v','ð˜¸'=>'w','ð˜¹'=>'x','ð˜º'=>'y','ð˜»'=>'z','ð˜¼'=>'A','ð˜½'=>'B','ð˜¾'=>'C','ð˜¿'=>'D','ð™€'=>'E','ð™'=>'F','ð™‚'=>'G','ð™ƒ'=>'H','ð™„'=>'I','ð™…'=>'J','ð™†'=>'K','ð™‡'=>'L','ð™ˆ'=>'M','ð™‰'=>'N','ð™Š'=>'O','ð™‹'=>'P','ð™Œ'=>'Q','ð™'=>'R','ð™Ž'=>'S','ð™'=>'T','ð™'=>'U','ð™‘'=>'V','ð™’'=>'W','ð™“'=>'X','ð™”'=>'Y','ð™•'=>'Z','ð™–'=>'a','ð™—'=>'b','ð™˜'=>'c','ð™™'=>'d','ð™š'=>'e','ð™›'=>'f','ð™œ'=>'g','ð™'=>'h','ð™ž'=>'i','ð™Ÿ'=>'j','ð™ '=>'k','ð™¡'=>'l','ð™¢'=>'m','ð™£'=>'n','ð™¤'=>'o','ð™¥'=>'p','ð™¦'=>'q','ð™§'=>'r','ð™¨'=>'s','ð™©'=>'t','ð™ª'=>'u','ð™«'=>'v','ð™¬'=>'w','ð™­'=>'x','ð™®'=>'y','ð™¯'=>'z','ð™°'=>'A','ð™±'=>'B','ð™²'=>'C','ð™³'=>'D','ð™´'=>'E','ð™µ'=>'F','ð™¶'=>'G','ð™·'=>'H','ð™¸'=>'I','ð™¹'=>'J','ð™º'=>'K','ð™»'=>'L','ð™¼'=>'M','ð™½'=>'N','ð™¾'=>'O','ð™¿'=>'P','ðš€'=>'Q','ðš'=>'R','ðš‚'=>'S','ðšƒ'=>'T','ðš„'=>'U','ðš…'=>'V','ðš†'=>'W','ðš‡'=>'X','ðšˆ'=>'Y','ðš‰'=>'Z','ðšŠ'=>'a','ðš‹'=>'b','ðšŒ'=>'c','ðš'=>'d','ðšŽ'=>'e','ðš'=>'f','ðš'=>'g','ðš‘'=>'h','ðš’'=>'i','ðš“'=>'j','ðš”'=>'k','ðš•'=>'l','ðš–'=>'m','ðš—'=>'n','ðš˜'=>'o','ðš™'=>'p','ðšš'=>'q','ðš›'=>'r','ðšœ'=>'s','ðš'=>'t','ðšž'=>'u','ðšŸ'=>'v','ðš '=>'w','ðš¡'=>'x','ðš¢'=>'y','ðš£'=>'z','ðš¤'=>'ı','ðš¥'=>'È·','ðš¨'=>'Α','ðš©'=>'Î’','ðšª'=>'Γ','ðš«'=>'Δ','ðš¬'=>'Ε','ðš­'=>'Ζ','ðš®'=>'Η','ðš¯'=>'Θ','ðš°'=>'Ι','ðš±'=>'Κ','ðš²'=>'Λ','ðš³'=>'Îœ','ðš´'=>'Î','ðšµ'=>'Ξ','ðš¶'=>'Ο','ðš·'=>'Π','ðš¸'=>'Ρ','ðš¹'=>'Θ','ðšº'=>'Σ','ðš»'=>'Τ','ðš¼'=>'Î¥','ðš½'=>'Φ','ðš¾'=>'Χ','ðš¿'=>'Ψ','ð›€'=>'Ω','ð›'=>'∇','ð›‚'=>'α','ð›ƒ'=>'β','ð›„'=>'γ','ð›…'=>'δ','ð›†'=>'ε','ð›‡'=>'ζ','ð›ˆ'=>'η','ð›‰'=>'θ','ð›Š'=>'ι','ð›‹'=>'κ','ð›Œ'=>'λ','ð›'=>'μ','ð›Ž'=>'ν','ð›'=>'ξ','ð›'=>'ο','ð›‘'=>'Ï€','ð›’'=>'Ï','ð›“'=>'Ï‚','ð›”'=>'σ','ð›•'=>'Ï„','ð›–'=>'Ï…','ð›—'=>'φ','ð›˜'=>'χ','ð›™'=>'ψ','ð›š'=>'ω','ð››'=>'∂','ð›œ'=>'ε','ð›'=>'θ','ð›ž'=>'κ','ð›Ÿ'=>'φ','ð› '=>'Ï','ð›¡'=>'Ï€','ð›¢'=>'Α','ð›£'=>'Î’','ð›¤'=>'Γ','ð›¥'=>'Δ','ð›¦'=>'Ε','ð›§'=>'Ζ','ð›¨'=>'Η','ð›©'=>'Θ','ð›ª'=>'Ι','ð›«'=>'Κ','ð›¬'=>'Λ','ð›­'=>'Îœ','ð›®'=>'Î','ð›¯'=>'Ξ','ð›°'=>'Ο','ð›±'=>'Π','ð›²'=>'Ρ','ð›³'=>'Θ','ð›´'=>'Σ','ð›µ'=>'Τ','ð›¶'=>'Î¥','ð›·'=>'Φ','ð›¸'=>'Χ','ð›¹'=>'Ψ','ð›º'=>'Ω','ð›»'=>'∇','ð›¼'=>'α','ð›½'=>'β','ð›¾'=>'γ','ð›¿'=>'δ','ðœ€'=>'ε','ðœ'=>'ζ','ðœ‚'=>'η','ðœƒ'=>'θ','ðœ„'=>'ι','ðœ…'=>'κ','ðœ†'=>'λ','ðœ‡'=>'μ','ðœˆ'=>'ν','ðœ‰'=>'ξ','ðœŠ'=>'ο','ðœ‹'=>'Ï€','ðœŒ'=>'Ï','ðœ'=>'Ï‚','ðœŽ'=>'σ','ðœ'=>'Ï„','ðœ'=>'Ï…','ðœ‘'=>'φ','ðœ’'=>'χ','ðœ“'=>'ψ','ðœ”'=>'ω','ðœ•'=>'∂','ðœ–'=>'ε','ðœ—'=>'θ','ðœ˜'=>'κ','ðœ™'=>'φ','ðœš'=>'Ï','ðœ›'=>'Ï€','ðœœ'=>'Α','ðœ'=>'Î’','ðœž'=>'Γ','ðœŸ'=>'Δ','ðœ '=>'Ε','ðœ¡'=>'Ζ','ðœ¢'=>'Η','ðœ£'=>'Θ','ðœ¤'=>'Ι','ðœ¥'=>'Κ','ðœ¦'=>'Λ','ðœ§'=>'Îœ','ðœ¨'=>'Î','ðœ©'=>'Ξ','ðœª'=>'Ο','ðœ«'=>'Π','ðœ¬'=>'Ρ','ðœ­'=>'Θ','ðœ®'=>'Σ','ðœ¯'=>'Τ','ðœ°'=>'Î¥','ðœ±'=>'Φ','ðœ²'=>'Χ','ðœ³'=>'Ψ','ðœ´'=>'Ω','ðœµ'=>'∇','ðœ¶'=>'α','ðœ·'=>'β','ðœ¸'=>'γ','ðœ¹'=>'δ','ðœº'=>'ε','ðœ»'=>'ζ','ðœ¼'=>'η','ðœ½'=>'θ','ðœ¾'=>'ι','ðœ¿'=>'κ','ð€'=>'λ','ð'=>'μ','ð‚'=>'ν','ðƒ'=>'ξ','ð„'=>'ο','ð…'=>'Ï€','ð†'=>'Ï','ð‡'=>'Ï‚','ðˆ'=>'σ','ð‰'=>'Ï„','ðŠ'=>'Ï…','ð‹'=>'φ','ðŒ'=>'χ','ð'=>'ψ','ðŽ'=>'ω','ð'=>'∂','ð'=>'ε','ð‘'=>'θ','ð’'=>'κ','ð“'=>'φ','ð”'=>'Ï','ð•'=>'Ï€','ð–'=>'Α','ð—'=>'Î’','ð˜'=>'Γ','ð™'=>'Δ','ðš'=>'Ε','ð›'=>'Ζ','ðœ'=>'Η','ð'=>'Θ','ðž'=>'Ι','ðŸ'=>'Κ','ð '=>'Λ','ð¡'=>'Îœ','ð¢'=>'Î','ð£'=>'Ξ','ð¤'=>'Ο','ð¥'=>'Π','ð¦'=>'Ρ','ð§'=>'Θ','ð¨'=>'Σ','ð©'=>'Τ','ðª'=>'Î¥','ð«'=>'Φ','ð¬'=>'Χ','ð­'=>'Ψ','ð®'=>'Ω','ð¯'=>'∇','ð°'=>'α','ð±'=>'β','ð²'=>'γ','ð³'=>'δ','ð´'=>'ε','ðµ'=>'ζ','ð¶'=>'η','ð·'=>'θ','ð¸'=>'ι','ð¹'=>'κ','ðº'=>'λ','ð»'=>'μ','ð¼'=>'ν','ð½'=>'ξ','ð¾'=>'ο','ð¿'=>'Ï€','ðž€'=>'Ï','ðž'=>'Ï‚','ðž‚'=>'σ','ðžƒ'=>'Ï„','ðž„'=>'Ï…','ðž…'=>'φ','ðž†'=>'χ','ðž‡'=>'ψ','ðžˆ'=>'ω','ðž‰'=>'∂','ðžŠ'=>'ε','ðž‹'=>'θ','ðžŒ'=>'κ','ðž'=>'φ','ðžŽ'=>'Ï','ðž'=>'Ï€','ðž'=>'Α','ðž‘'=>'Î’','ðž’'=>'Γ','ðž“'=>'Δ','ðž”'=>'Ε','ðž•'=>'Ζ','ðž–'=>'Η','ðž—'=>'Θ','ðž˜'=>'Ι','ðž™'=>'Κ','ðžš'=>'Λ','ðž›'=>'Îœ','ðžœ'=>'Î','ðž'=>'Ξ','ðžž'=>'Ο','ðžŸ'=>'Π','ðž '=>'Ρ','ðž¡'=>'Θ','ðž¢'=>'Σ','ðž£'=>'Τ','ðž¤'=>'Î¥','ðž¥'=>'Φ','ðž¦'=>'Χ','ðž§'=>'Ψ','ðž¨'=>'Ω','ðž©'=>'∇','ðžª'=>'α','ðž«'=>'β','ðž¬'=>'γ','ðž­'=>'δ','ðž®'=>'ε','ðž¯'=>'ζ','ðž°'=>'η','ðž±'=>'θ','ðž²'=>'ι','ðž³'=>'κ','ðž´'=>'λ','ðžµ'=>'μ','ðž¶'=>'ν','ðž·'=>'ξ','ðž¸'=>'ο','ðž¹'=>'Ï€','ðžº'=>'Ï','ðž»'=>'Ï‚','ðž¼'=>'σ','ðž½'=>'Ï„','ðž¾'=>'Ï…','ðž¿'=>'φ','ðŸ€'=>'χ','ðŸ'=>'ψ','ðŸ‚'=>'ω','ðŸƒ'=>'∂','ðŸ„'=>'ε','ðŸ…'=>'θ','ðŸ†'=>'κ','ðŸ‡'=>'φ','ðŸˆ'=>'Ï','ðŸ‰'=>'Ï€','ðŸŠ'=>'Ïœ','ðŸ‹'=>'Ï','ðŸŽ'=>'0','ðŸ'=>'1','ðŸ'=>'2','ðŸ‘'=>'3','ðŸ’'=>'4','ðŸ“'=>'5','ðŸ”'=>'6','ðŸ•'=>'7','ðŸ–'=>'8','ðŸ—'=>'9','ðŸ˜'=>'0','ðŸ™'=>'1','ðŸš'=>'2','ðŸ›'=>'3','ðŸœ'=>'4','ðŸ'=>'5','ðŸž'=>'6','ðŸŸ'=>'7','ðŸ '=>'8','ðŸ¡'=>'9','ðŸ¢'=>'0','ðŸ£'=>'1','ðŸ¤'=>'2','ðŸ¥'=>'3','ðŸ¦'=>'4','ðŸ§'=>'5','ðŸ¨'=>'6','ðŸ©'=>'7','ðŸª'=>'8','ðŸ«'=>'9','ðŸ¬'=>'0','ðŸ­'=>'1','ðŸ®'=>'2','ðŸ¯'=>'3','ðŸ°'=>'4','ðŸ±'=>'5','ðŸ²'=>'6','ðŸ³'=>'7','ðŸ´'=>'8','ðŸµ'=>'9','ðŸ¶'=>'0','ðŸ·'=>'1','ðŸ¸'=>'2','ðŸ¹'=>'3','ðŸº'=>'4','ðŸ»'=>'5','ðŸ¼'=>'6','ðŸ½'=>'7','ðŸ¾'=>'8','ðŸ¿'=>'9','丽'=>'丽','ð¯ '=>'丸','乁'=>'ä¹','𠄢'=>'ð „¢','你'=>'ä½ ','侮'=>'ä¾®','侻'=>'ä¾»','倂'=>'倂','偺'=>'åº','備'=>'å‚™','僧'=>'僧','像'=>'åƒ','㒞'=>'ã’ž','ð¯ '=>'𠘺','免'=>'å…','ð¯ '=>'å…”','ð¯ '=>'å…¤','具'=>'å…·','𠔜'=>'𠔜','㒹'=>'ã’¹','內'=>'å…§','再'=>'å†','𠕋'=>'ð •‹','冗'=>'冗','冤'=>'冤','仌'=>'仌','冬'=>'冬','况'=>'况','𩇟'=>'𩇟','ð¯ '=>'凵','刃'=>'刃','㓟'=>'ã“Ÿ','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','㔕'=>'㔕','勇'=>'勇','勉'=>'勉','勤'=>'勤','勺'=>'勺','包'=>'包','匆'=>'匆','北'=>'北','卉'=>'å‰','卑'=>'å‘','博'=>'åš','即'=>'å³','卽'=>'å½','卿'=>'å¿','卿'=>'å¿','卿'=>'å¿','𠨬'=>'𠨬','灰'=>'ç°','及'=>'åŠ','叟'=>'åŸ','𠭣'=>'ð ­£','叫'=>'å«','叱'=>'å±','吆'=>'å†','咞'=>'å’ž','吸'=>'å¸','呈'=>'呈','周'=>'周','咢'=>'å’¢','ð¯¡'=>'哶','唐'=>'å”','啓'=>'å•“','啣'=>'å•£','善'=>'å–„','善'=>'å–„','喙'=>'å–™','喫'=>'å–«','喳'=>'å–³','嗂'=>'å—‚','圖'=>'圖','嘆'=>'嘆','ð¯¡'=>'圗','噑'=>'噑','ð¯¡'=>'å™´','ð¯¡'=>'切','壮'=>'壮','城'=>'城','埴'=>'埴','堍'=>'å ','型'=>'åž‹','堲'=>'å ²','報'=>'å ±','墬'=>'墬','𡓤'=>'𡓤','売'=>'売','壷'=>'壷','夆'=>'夆','ð¯¡'=>'多','夢'=>'夢','奢'=>'奢','𡚨'=>'𡚨','𡛪'=>'𡛪','姬'=>'姬','娛'=>'娛','娧'=>'娧','姘'=>'姘','婦'=>'婦','㛮'=>'ã›®','㛼'=>'㛼','嬈'=>'嬈','嬾'=>'嬾','嬾'=>'嬾','𡧈'=>'𡧈','寃'=>'寃','寘'=>'寘','寧'=>'寧','寳'=>'寳','𡬘'=>'𡬘','寿'=>'寿','将'=>'å°†','当'=>'当','尢'=>'å°¢','㞁'=>'ãž','屠'=>'å± ','屮'=>'å±®','峀'=>'å³€','岍'=>'å²','𡷤'=>'ð¡·¤','嵃'=>'嵃','𡷦'=>'ð¡·¦','嵮'=>'åµ®','嵫'=>'嵫','嵼'=>'åµ¼','ð¯¢'=>'å·¡','巢'=>'å·¢','㠯'=>'ã ¯','巽'=>'å·½','帨'=>'帨','帽'=>'帽','幩'=>'幩','㡢'=>'ã¡¢','𢆃'=>'𢆃','㡼'=>'㡼','庰'=>'庰','庳'=>'庳','ð¯¢'=>'庶','廊'=>'廊','ð¯¢'=>'𪎒','ð¯¢'=>'廾','𢌱'=>'𢌱','𢌱'=>'𢌱','舁'=>'èˆ','弢'=>'å¼¢','弢'=>'å¼¢','㣇'=>'㣇','𣊸'=>'𣊸','𦇚'=>'𦇚','形'=>'å½¢','彫'=>'彫','㣣'=>'㣣','徚'=>'徚','ð¯¢'=>'å¿','志'=>'å¿—','忹'=>'忹','悁'=>'æ‚','㤺'=>'㤺','㤜'=>'㤜','悔'=>'æ‚”','𢛔'=>'𢛔','惇'=>'惇','慈'=>'æ…ˆ','慌'=>'æ…Œ','慎'=>'æ…Ž','慌'=>'æ…Œ','慺'=>'æ…º','憎'=>'憎','憲'=>'憲','憤'=>'憤','憯'=>'憯','懞'=>'懞','懲'=>'懲','懶'=>'懶','成'=>'æˆ','戛'=>'戛','扝'=>'æ‰','抱'=>'抱','拔'=>'æ‹”','捐'=>'æ','𢬌'=>'𢬌','挽'=>'挽','拼'=>'拼','捨'=>'æ¨','掃'=>'掃','揤'=>'æ¤','𢯱'=>'𢯱','搢'=>'æ¢','揅'=>'æ…','ð¯£'=>'掩','㨮'=>'㨮','摩'=>'æ‘©','摾'=>'摾','撝'=>'æ’','摷'=>'æ‘·','㩬'=>'㩬','敏'=>'æ•','敬'=>'敬','𣀊'=>'𣀊','旣'=>'æ—£','書'=>'書','ð¯£'=>'晉','㬙'=>'㬙','ð¯£'=>'æš‘','ð¯£'=>'㬈','㫤'=>'㫤','冒'=>'冒','冕'=>'冕','最'=>'最','暜'=>'æšœ','肭'=>'è‚­','䏙'=>'ä™','朗'=>'朗','望'=>'望','朡'=>'朡','杞'=>'æž','杓'=>'æ“','ð¯£'=>'ð£ƒ','㭉'=>'ã­‰','柺'=>'柺','枅'=>'æž…','桒'=>'æ¡’','梅'=>'梅','𣑭'=>'𣑭','梎'=>'梎','栟'=>'æ Ÿ','椔'=>'椔','㮝'=>'ã®','楂'=>'楂','榣'=>'榣','槪'=>'槪','檨'=>'檨','𣚣'=>'𣚣','櫛'=>'æ«›','㰘'=>'ã°˜','次'=>'次','𣢧'=>'𣢧','歔'=>'æ­”','㱎'=>'㱎','歲'=>'æ­²','殟'=>'殟','殺'=>'殺','殻'=>'æ®»','𣪍'=>'ð£ª','𡴋'=>'ð¡´‹','𣫺'=>'𣫺','汎'=>'汎','𣲼'=>'𣲼','沿'=>'沿','泍'=>'æ³','汧'=>'汧','洖'=>'æ´–','派'=>'æ´¾','ð¯¤'=>'æµ·','流'=>'æµ','浩'=>'浩','浸'=>'浸','涅'=>'涅','𣴞'=>'𣴞','洴'=>'æ´´','港'=>'港','湮'=>'æ¹®','㴳'=>'ã´³','滋'=>'滋','滇'=>'滇','ð¯¤'=>'𣻑','淹'=>'æ·¹','ð¯¤'=>'æ½®','ð¯¤'=>'𣽞','𣾎'=>'𣾎','濆'=>'濆','瀹'=>'瀹','瀞'=>'瀞','瀛'=>'瀛','㶖'=>'㶖','灊'=>'çŠ','災'=>'ç½','灷'=>'ç·','炭'=>'ç‚­','𠔥'=>'𠔥','煅'=>'ç……','ð¯¤'=>'𤉣','熜'=>'熜','𤎫'=>'𤎫','爨'=>'爨','爵'=>'爵','牐'=>'ç‰','𤘈'=>'𤘈','犀'=>'犀','犕'=>'犕','𤜵'=>'𤜵','𤠔'=>'𤠔','獺'=>'çº','王'=>'王','㺬'=>'㺬','玥'=>'玥','㺸'=>'㺸','㺸'=>'㺸','瑇'=>'瑇','瑜'=>'ç‘œ','瑱'=>'瑱','璅'=>'ç’…','瓊'=>'ç“Š','㼛'=>'ã¼›','甤'=>'甤','𤰶'=>'𤰶','甾'=>'甾','𤲒'=>'𤲒','異'=>'ç•°','𢆟'=>'𢆟','瘐'=>'ç˜','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'ð¥„','㿼'=>'㿼','䀈'=>'䀈','直'=>'ç›´','ð¯¥'=>'𥃳','𥃲'=>'𥃲','𥄙'=>'𥄙','𥄳'=>'𥄳','眞'=>'眞','真'=>'真','真'=>'真','睊'=>'çŠ','䀹'=>'䀹','瞋'=>'çž‹','䁆'=>'ä†','䂖'=>'ä‚–','ð¯¥'=>'ð¥','硎'=>'ç¡Ž','ð¯¥'=>'碌','ð¯¥'=>'磌','䃣'=>'䃣','𥘦'=>'𥘦','祖'=>'祖','𥚚'=>'𥚚','𥛅'=>'𥛅','福'=>'ç¦','秫'=>'秫','䄯'=>'䄯','穀'=>'ç©€','穊'=>'ç©Š','穏'=>'ç©','𥥼'=>'𥥼','ð¯¥'=>'𥪧','𥪧'=>'𥪧','竮'=>'ç«®','䈂'=>'䈂','𥮫'=>'𥮫','篆'=>'篆','築'=>'築','䈧'=>'䈧','𥲀'=>'𥲀','糒'=>'ç³’','䊠'=>'䊠','糨'=>'糨','糣'=>'ç³£','紀'=>'ç´€','𥾆'=>'𥾆','絣'=>'çµ£','䌁'=>'äŒ','緇'=>'ç·‡','縂'=>'縂','繅'=>'ç¹…','䌴'=>'䌴','𦈨'=>'𦈨','𦉇'=>'𦉇','䍙'=>'ä™','𦋙'=>'𦋙','罺'=>'罺','𦌾'=>'𦌾','羕'=>'羕','翺'=>'翺','者'=>'者','𦓚'=>'𦓚','𦔣'=>'𦔣','聠'=>'è ','𦖨'=>'𦖨','聰'=>'è°','𣍟'=>'ð£Ÿ','ð¯¦'=>'ä•','育'=>'育','脃'=>'脃','䐋'=>'ä‹','脾'=>'脾','媵'=>'媵','𦞧'=>'𦞧','𦞵'=>'𦞵','𣎓'=>'𣎓','𣎜'=>'𣎜','舁'=>'èˆ','舄'=>'舄','ð¯¦'=>'辞','䑫'=>'ä‘«','ð¯¦'=>'芑','ð¯¦'=>'芋','芝'=>'èŠ','劳'=>'劳','花'=>'花','芳'=>'芳','芽'=>'芽','苦'=>'苦','𦬼'=>'𦬼','若'=>'è‹¥','茝'=>'èŒ','荣'=>'è£','莭'=>'莭','茣'=>'茣','ð¯¦'=>'莽','菧'=>'è§','著'=>'è‘—','荓'=>'è“','菊'=>'èŠ','菌'=>'èŒ','菜'=>'èœ','𦰶'=>'𦰶','𦵫'=>'𦵫','𦳕'=>'𦳕','䔫'=>'䔫','蓱'=>'蓱','蓳'=>'蓳','蔖'=>'è”–','𧏊'=>'ð§Š','蕤'=>'蕤','𦼬'=>'𦼬','䕝'=>'ä•','䕡'=>'ä•¡','𦾱'=>'𦾱','𧃒'=>'𧃒','䕫'=>'ä•«','虐'=>'è™','虜'=>'虜','虧'=>'虧','虩'=>'虩','蚩'=>'èš©','蚈'=>'蚈','蜎'=>'蜎','蛢'=>'蛢','蝹'=>'è¹','蜨'=>'蜨','蝫'=>'è«','螆'=>'螆','䗗'=>'ä——','蟡'=>'蟡','ð¯§'=>'è ','䗹'=>'ä—¹','衠'=>'è¡ ','衣'=>'è¡£','𧙧'=>'𧙧','裗'=>'裗','裞'=>'裞','䘵'=>'䘵','裺'=>'裺','㒻'=>'ã’»','𧢮'=>'𧢮','𧥦'=>'𧥦','ð¯§'=>'äš¾','䛇'=>'䛇','ð¯§'=>'誠','ð¯§'=>'è«­','變'=>'變','豕'=>'豕','𧲨'=>'𧲨','貫'=>'貫','賁'=>'è³','贛'=>'è´›','起'=>'èµ·','𧼯'=>'𧼯','𠠄'=>'ð  „','跋'=>'è·‹','趼'=>'趼','跰'=>'è·°','ð¯§'=>'𠣞','軔'=>'è»”','輸'=>'輸','𨗒'=>'𨗒','𨗭'=>'𨗭','邔'=>'é‚”','郱'=>'郱','鄑'=>'é„‘','𨜮'=>'𨜮','鄛'=>'é„›','鈸'=>'鈸','鋗'=>'é‹—','鋘'=>'鋘','鉼'=>'鉼','鏹'=>'é¹','鐕'=>'é•','𨯺'=>'𨯺','開'=>'é–‹','䦕'=>'䦕','閷'=>'é–·','𨵷'=>'𨵷','䧦'=>'䧦','雃'=>'雃','嶲'=>'嶲','霣'=>'霣','𩅅'=>'ð©……','𩈚'=>'𩈚','䩮'=>'ä©®','䩶'=>'䩶','韠'=>'韠','𩐊'=>'ð©Š','䪲'=>'䪲','𩒖'=>'ð©’–','頋'=>'é ‹','頋'=>'é ‹','頩'=>'é ©','ð¯¨'=>'ð©–¶','飢'=>'飢','䬳'=>'䬳','餩'=>'餩','馧'=>'馧','駂'=>'駂','駾'=>'駾','䯎'=>'䯎','𩬰'=>'𩬰','鬒'=>'鬒','鱀'=>'é±€','鳽'=>'é³½','ð¯¨'=>'䳎','䳭'=>'ä³­','ð¯¨'=>'鵧','ð¯¨'=>'𪃎','䳸'=>'䳸','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','麻'=>'麻','䵖'=>'äµ–','黹'=>'黹','黾'=>'黾','鼅'=>'é¼…','鼏'=>'é¼','鼖'=>'é¼–','鼻'=>'é¼»','ð¯¨'=>'𪘀'); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/utf_nfc_qc.php b/phpBB/includes/utf/data/utf_nfc_qc.php
new file mode 100644
index 0000000000..03031f8b6d
--- /dev/null
+++ b/phpBB/includes/utf/data/utf_nfc_qc.php
@@ -0,0 +1,2 @@
+<?php
+$GLOBALS['utf_nfc_qc']=array('Í€'=>1,'Í'=>1,'̓'=>1,'Í„'=>1,'Í´'=>1,';'=>1,'·'=>1,'क़'=>1,'ख़'=>1,'ग़'=>1,'ज़'=>1,'ड़'=>1,'à¥'=>1,'फ़'=>1,'य़'=>1,'ড়'=>1,'à§'=>1,'য়'=>1,'ਲ਼'=>1,'ਸ਼'=>1,'à©™'=>1,'à©š'=>1,'à©›'=>1,'à©ž'=>1,'à­œ'=>1,'à­'=>1,'གྷ'=>1,'à½'=>1,'དྷ'=>1,'བྷ'=>1,'ཛྷ'=>1,'ཀྵ'=>1,'ཱི'=>1,'ཱུ'=>1,'ྲྀ'=>1,'ླྀ'=>1,'à¾'=>1,'ྒྷ'=>1,'à¾'=>1,'ྡྷ'=>1,'ྦྷ'=>1,'ྫྷ'=>1,'ྐྵ'=>1,'á½±'=>1,'á½³'=>1,'á½µ'=>1,'á½·'=>1,'á½¹'=>1,'á½»'=>1,'á½½'=>1,'á¾»'=>1,'á¾¾'=>1,'Έ'=>1,'á¿‹'=>1,'á¿“'=>1,'á¿›'=>1,'á¿£'=>1,'á¿«'=>1,'á¿®'=>1,'`'=>1,'Ό'=>1,'á¿»'=>1,'´'=>1,' '=>1,'â€'=>1,'Ω'=>1,'K'=>1,'â„«'=>1,'〈'=>1,'〉'=>1,'â«œ'=>1,'豈'=>1,'ï¤'=>1,'車'=>1,'賈'=>1,'滑'=>1,'串'=>1,'句'=>1,'龜'=>1,'龜'=>1,'契'=>1,'金'=>1,'喇'=>1,'奈'=>1,'ï¤'=>1,'癩'=>1,'ï¤'=>1,'ï¤'=>1,'螺'=>1,'裸'=>1,'邏'=>1,'樂'=>1,'洛'=>1,'烙'=>1,'珞'=>1,'落'=>1,'酪'=>1,'駱'=>1,'亂'=>1,'卵'=>1,'ï¤'=>1,'爛'=>1,'蘭'=>1,'鸞'=>1,'嵐'=>1,'濫'=>1,'藍'=>1,'襤'=>1,'拉'=>1,'臘'=>1,'蠟'=>1,'廊'=>1,'朗'=>1,'浪'=>1,'狼'=>1,'郎'=>1,'來'=>1,'冷'=>1,'勞'=>1,'擄'=>1,'櫓'=>1,'爐'=>1,'盧'=>1,'老'=>1,'蘆'=>1,'虜'=>1,'路'=>1,'露'=>1,'魯'=>1,'鷺'=>1,'碌'=>1,'祿'=>1,'綠'=>1,'菉'=>1,'錄'=>1,'鹿'=>1,'ï¥'=>1,'壟'=>1,'弄'=>1,'籠'=>1,'聾'=>1,'牢'=>1,'磊'=>1,'賂'=>1,'雷'=>1,'壘'=>1,'屢'=>1,'樓'=>1,'ï¥'=>1,'漏'=>1,'ï¥'=>1,'ï¥'=>1,'陋'=>1,'勒'=>1,'肋'=>1,'凜'=>1,'凌'=>1,'稜'=>1,'綾'=>1,'菱'=>1,'陵'=>1,'讀'=>1,'拏'=>1,'樂'=>1,'ï¥'=>1,'丹'=>1,'寧'=>1,'怒'=>1,'率'=>1,'異'=>1,'北'=>1,'磻'=>1,'便'=>1,'復'=>1,'不'=>1,'泌'=>1,'數'=>1,'索'=>1,'參'=>1,'塞'=>1,'省'=>1,'葉'=>1,'說'=>1,'殺'=>1,'辰'=>1,'沈'=>1,'拾'=>1,'若'=>1,'掠'=>1,'略'=>1,'亮'=>1,'兩'=>1,'凉'=>1,'梁'=>1,'糧'=>1,'良'=>1,'諒'=>1,'量'=>1,'勵'=>1,'呂'=>1,'ï¦'=>1,'廬'=>1,'旅'=>1,'濾'=>1,'礪'=>1,'閭'=>1,'驪'=>1,'麗'=>1,'黎'=>1,'力'=>1,'曆'=>1,'歷'=>1,'ï¦'=>1,'年'=>1,'ï¦'=>1,'ï¦'=>1,'撚'=>1,'漣'=>1,'煉'=>1,'璉'=>1,'秊'=>1,'練'=>1,'聯'=>1,'輦'=>1,'蓮'=>1,'連'=>1,'鍊'=>1,'列'=>1,'ï¦'=>1,'咽'=>1,'烈'=>1,'裂'=>1,'說'=>1,'廉'=>1,'念'=>1,'捻'=>1,'殮'=>1,'簾'=>1,'獵'=>1,'令'=>1,'囹'=>1,'寧'=>1,'嶺'=>1,'怜'=>1,'玲'=>1,'瑩'=>1,'羚'=>1,'聆'=>1,'鈴'=>1,'零'=>1,'靈'=>1,'領'=>1,'例'=>1,'禮'=>1,'醴'=>1,'隸'=>1,'惡'=>1,'了'=>1,'僚'=>1,'寮'=>1,'尿'=>1,'料'=>1,'樂'=>1,'燎'=>1,'ï§'=>1,'蓼'=>1,'遼'=>1,'龍'=>1,'暈'=>1,'阮'=>1,'劉'=>1,'杻'=>1,'柳'=>1,'流'=>1,'溜'=>1,'琉'=>1,'ï§'=>1,'硫'=>1,'ï§'=>1,'ï§'=>1,'六'=>1,'戮'=>1,'陸'=>1,'倫'=>1,'崙'=>1,'淪'=>1,'輪'=>1,'律'=>1,'慄'=>1,'栗'=>1,'率'=>1,'隆'=>1,'ï§'=>1,'吏'=>1,'履'=>1,'易'=>1,'李'=>1,'梨'=>1,'泥'=>1,'理'=>1,'痢'=>1,'罹'=>1,'裏'=>1,'裡'=>1,'里'=>1,'離'=>1,'匿'=>1,'溺'=>1,'吝'=>1,'燐'=>1,'璘'=>1,'藺'=>1,'隣'=>1,'鱗'=>1,'麟'=>1,'林'=>1,'淋'=>1,'臨'=>1,'立'=>1,'笠'=>1,'粒'=>1,'狀'=>1,'炙'=>1,'識'=>1,'什'=>1,'茶'=>1,'刺'=>1,'切'=>1,'ï¨'=>1,'拓'=>1,'糖'=>1,'宅'=>1,'洞'=>1,'暴'=>1,'輻'=>1,'行'=>1,'降'=>1,'見'=>1,'廓'=>1,'兀'=>1,'ï¨'=>1,'ï¨'=>1,'晴'=>1,'凞'=>1,'猪'=>1,'益'=>1,'礼'=>1,'神'=>1,'祥'=>1,'福'=>1,'靖'=>1,'ï¨'=>1,'羽'=>1,'蘒'=>1,'諸'=>1,'逸'=>1,'都'=>1,'飯'=>1,'飼'=>1,'館'=>1,'鶴'=>1,'侮'=>1,'僧'=>1,'免'=>1,'勉'=>1,'勤'=>1,'卑'=>1,'喝'=>1,'嘆'=>1,'器'=>1,'塀'=>1,'墨'=>1,'層'=>1,'屮'=>1,'悔'=>1,'慨'=>1,'憎'=>1,'ï©€'=>1,'ï©'=>1,'ï©‚'=>1,'暑'=>1,'ï©„'=>1,'ï©…'=>1,'渚'=>1,'漢'=>1,'煮'=>1,'爫'=>1,'ï©Š'=>1,'ï©‹'=>1,'ï©Œ'=>1,'ï©'=>1,'ï©Ž'=>1,'ï©'=>1,'ï©'=>1,'ï©‘'=>1,'ï©’'=>1,'ï©“'=>1,'ï©”'=>1,'ï©•'=>1,'ï©–'=>1,'ï©—'=>1,'縉'=>1,'ï©™'=>1,'ï©š'=>1,'ï©›'=>1,'ï©œ'=>1,'ï©'=>1,'ï©ž'=>1,'ï©Ÿ'=>1,'ï© '=>1,'ï©¡'=>1,'ï©¢'=>1,'ï©£'=>1,'賓'=>1,'ï©¥'=>1,'辶'=>1,'逸'=>1,'難'=>1,'ï©©'=>1,'頻'=>1,'ï©°'=>1,'况'=>1,'全'=>1,'侀'=>1,'ï©´'=>1,'冀'=>1,'勇'=>1,'ï©·'=>1,'喝'=>1,'啕'=>1,'喙'=>1,'ï©»'=>1,'塚'=>1,'墳'=>1,'奄'=>1,'ï©¿'=>1,'婢'=>1,'ïª'=>1,'廒'=>1,'廙'=>1,'彩'=>1,'徭'=>1,'惘'=>1,'慎'=>1,'愈'=>1,'憎'=>1,'慠'=>1,'懲'=>1,'戴'=>1,'ïª'=>1,'搜'=>1,'ïª'=>1,'ïª'=>1,'晴'=>1,'朗'=>1,'望'=>1,'杖'=>1,'歹'=>1,'殺'=>1,'流'=>1,'滛'=>1,'滋'=>1,'漢'=>1,'瀞'=>1,'煮'=>1,'ïª'=>1,'爵'=>1,'犯'=>1,'猪'=>1,'瑱'=>1,'甆'=>1,'画'=>1,'瘝'=>1,'瘟'=>1,'益'=>1,'盛'=>1,'直'=>1,'睊'=>1,'着'=>1,'磌'=>1,'窱'=>1,'節'=>1,'类'=>1,'絛'=>1,'練'=>1,'缾'=>1,'者'=>1,'荒'=>1,'華'=>1,'蝹'=>1,'襁'=>1,'覆'=>1,'視'=>1,'調'=>1,'諸'=>1,'請'=>1,'謁'=>1,'諾'=>1,'諭'=>1,'謹'=>1,'ï«€'=>1,'ï«'=>1,'ï«‚'=>1,'遲'=>1,'ï«„'=>1,'ï«…'=>1,'陼'=>1,'難'=>1,'靖'=>1,'韛'=>1,'ï«Š'=>1,'ï«‹'=>1,'ï«Œ'=>1,'ï«'=>1,'ï«Ž'=>1,'ï«'=>1,'ï«'=>1,'ï«‘'=>1,'ï«’'=>1,'ï«“'=>1,'ï«”'=>1,'ï«•'=>1,'ï«–'=>1,'ï«—'=>1,'齃'=>1,'ï«™'=>1,'ï¬'=>1,'ײַ'=>1,'שׁ'=>1,'שׂ'=>1,'שּׁ'=>1,'שּׂ'=>1,'אַ'=>1,'אָ'=>1,'אּ'=>1,'בּ'=>1,'גּ'=>1,'דּ'=>1,'הּ'=>1,'וּ'=>1,'זּ'=>1,'טּ'=>1,'יּ'=>1,'ךּ'=>1,'כּ'=>1,'לּ'=>1,'מּ'=>1,'ï­€'=>1,'ï­'=>1,'ï­ƒ'=>1,'ï­„'=>1,'ï­†'=>1,'ï­‡'=>1,'ï­ˆ'=>1,'ï­‰'=>1,'ï­Š'=>1,'ï­‹'=>1,'ï­Œ'=>1,'ï­'=>1,'ï­Ž'=>1,'ð…ž'=>1,'ð…Ÿ'=>1,'ð… '=>1,'ð…¡'=>1,'ð…¢'=>1,'ð…£'=>1,'ð…¤'=>1,'ð†»'=>1,'ð†¼'=>1,'ð†½'=>1,'ð†¾'=>1,'ð†¿'=>1,'ð‡€'=>1,'丽'=>1,'ð¯ '=>1,'乁'=>1,'𠄢'=>1,'你'=>1,'侮'=>1,'侻'=>1,'倂'=>1,'偺'=>1,'備'=>1,'僧'=>1,'像'=>1,'㒞'=>1,'ð¯ '=>1,'免'=>1,'ð¯ '=>1,'ð¯ '=>1,'具'=>1,'𠔜'=>1,'㒹'=>1,'內'=>1,'再'=>1,'𠕋'=>1,'冗'=>1,'冤'=>1,'仌'=>1,'冬'=>1,'况'=>1,'𩇟'=>1,'ð¯ '=>1,'刃'=>1,'㓟'=>1,'刻'=>1,'剆'=>1,'割'=>1,'剷'=>1,'㔕'=>1,'勇'=>1,'勉'=>1,'勤'=>1,'勺'=>1,'包'=>1,'匆'=>1,'北'=>1,'卉'=>1,'卑'=>1,'博'=>1,'即'=>1,'卽'=>1,'卿'=>1,'卿'=>1,'卿'=>1,'𠨬'=>1,'灰'=>1,'及'=>1,'叟'=>1,'𠭣'=>1,'叫'=>1,'叱'=>1,'吆'=>1,'咞'=>1,'吸'=>1,'呈'=>1,'周'=>1,'咢'=>1,'ð¯¡'=>1,'唐'=>1,'啓'=>1,'啣'=>1,'善'=>1,'善'=>1,'喙'=>1,'喫'=>1,'喳'=>1,'嗂'=>1,'圖'=>1,'嘆'=>1,'ð¯¡'=>1,'噑'=>1,'ð¯¡'=>1,'ð¯¡'=>1,'壮'=>1,'城'=>1,'埴'=>1,'堍'=>1,'型'=>1,'堲'=>1,'報'=>1,'墬'=>1,'𡓤'=>1,'売'=>1,'壷'=>1,'夆'=>1,'ð¯¡'=>1,'夢'=>1,'奢'=>1,'𡚨'=>1,'𡛪'=>1,'姬'=>1,'娛'=>1,'娧'=>1,'姘'=>1,'婦'=>1,'㛮'=>1,'㛼'=>1,'嬈'=>1,'嬾'=>1,'嬾'=>1,'𡧈'=>1,'寃'=>1,'寘'=>1,'寧'=>1,'寳'=>1,'𡬘'=>1,'寿'=>1,'将'=>1,'当'=>1,'尢'=>1,'㞁'=>1,'屠'=>1,'屮'=>1,'峀'=>1,'岍'=>1,'𡷤'=>1,'嵃'=>1,'𡷦'=>1,'嵮'=>1,'嵫'=>1,'嵼'=>1,'ð¯¢'=>1,'巢'=>1,'㠯'=>1,'巽'=>1,'帨'=>1,'帽'=>1,'幩'=>1,'㡢'=>1,'𢆃'=>1,'㡼'=>1,'庰'=>1,'庳'=>1,'ð¯¢'=>1,'廊'=>1,'ð¯¢'=>1,'ð¯¢'=>1,'𢌱'=>1,'𢌱'=>1,'舁'=>1,'弢'=>1,'弢'=>1,'㣇'=>1,'𣊸'=>1,'𦇚'=>1,'形'=>1,'彫'=>1,'㣣'=>1,'徚'=>1,'ð¯¢'=>1,'志'=>1,'忹'=>1,'悁'=>1,'㤺'=>1,'㤜'=>1,'悔'=>1,'𢛔'=>1,'惇'=>1,'慈'=>1,'慌'=>1,'慎'=>1,'慌'=>1,'慺'=>1,'憎'=>1,'憲'=>1,'憤'=>1,'憯'=>1,'懞'=>1,'懲'=>1,'懶'=>1,'成'=>1,'戛'=>1,'扝'=>1,'抱'=>1,'拔'=>1,'捐'=>1,'𢬌'=>1,'挽'=>1,'拼'=>1,'捨'=>1,'掃'=>1,'揤'=>1,'𢯱'=>1,'搢'=>1,'揅'=>1,'ð¯£'=>1,'㨮'=>1,'摩'=>1,'摾'=>1,'撝'=>1,'摷'=>1,'㩬'=>1,'敏'=>1,'敬'=>1,'𣀊'=>1,'旣'=>1,'書'=>1,'ð¯£'=>1,'㬙'=>1,'ð¯£'=>1,'ð¯£'=>1,'㫤'=>1,'冒'=>1,'冕'=>1,'最'=>1,'暜'=>1,'肭'=>1,'䏙'=>1,'朗'=>1,'望'=>1,'朡'=>1,'杞'=>1,'杓'=>1,'ð¯£'=>1,'㭉'=>1,'柺'=>1,'枅'=>1,'桒'=>1,'梅'=>1,'𣑭'=>1,'梎'=>1,'栟'=>1,'椔'=>1,'㮝'=>1,'楂'=>1,'榣'=>1,'槪'=>1,'檨'=>1,'𣚣'=>1,'櫛'=>1,'㰘'=>1,'次'=>1,'𣢧'=>1,'歔'=>1,'㱎'=>1,'歲'=>1,'殟'=>1,'殺'=>1,'殻'=>1,'𣪍'=>1,'𡴋'=>1,'𣫺'=>1,'汎'=>1,'𣲼'=>1,'沿'=>1,'泍'=>1,'汧'=>1,'洖'=>1,'派'=>1,'ð¯¤'=>1,'流'=>1,'浩'=>1,'浸'=>1,'涅'=>1,'𣴞'=>1,'洴'=>1,'港'=>1,'湮'=>1,'㴳'=>1,'滋'=>1,'滇'=>1,'ð¯¤'=>1,'淹'=>1,'ð¯¤'=>1,'ð¯¤'=>1,'𣾎'=>1,'濆'=>1,'瀹'=>1,'瀞'=>1,'瀛'=>1,'㶖'=>1,'灊'=>1,'災'=>1,'灷'=>1,'炭'=>1,'𠔥'=>1,'煅'=>1,'ð¯¤'=>1,'熜'=>1,'𤎫'=>1,'爨'=>1,'爵'=>1,'牐'=>1,'𤘈'=>1,'犀'=>1,'犕'=>1,'𤜵'=>1,'𤠔'=>1,'獺'=>1,'王'=>1,'㺬'=>1,'玥'=>1,'㺸'=>1,'㺸'=>1,'瑇'=>1,'瑜'=>1,'瑱'=>1,'璅'=>1,'瓊'=>1,'㼛'=>1,'甤'=>1,'𤰶'=>1,'甾'=>1,'𤲒'=>1,'異'=>1,'𢆟'=>1,'瘐'=>1,'𤾡'=>1,'𤾸'=>1,'𥁄'=>1,'㿼'=>1,'䀈'=>1,'直'=>1,'ð¯¥'=>1,'𥃲'=>1,'𥄙'=>1,'𥄳'=>1,'眞'=>1,'真'=>1,'真'=>1,'睊'=>1,'䀹'=>1,'瞋'=>1,'䁆'=>1,'䂖'=>1,'ð¯¥'=>1,'硎'=>1,'ð¯¥'=>1,'ð¯¥'=>1,'䃣'=>1,'𥘦'=>1,'祖'=>1,'𥚚'=>1,'𥛅'=>1,'福'=>1,'秫'=>1,'䄯'=>1,'穀'=>1,'穊'=>1,'穏'=>1,'𥥼'=>1,'ð¯¥'=>1,'𥪧'=>1,'竮'=>1,'䈂'=>1,'𥮫'=>1,'篆'=>1,'築'=>1,'䈧'=>1,'𥲀'=>1,'糒'=>1,'䊠'=>1,'糨'=>1,'糣'=>1,'紀'=>1,'𥾆'=>1,'絣'=>1,'䌁'=>1,'緇'=>1,'縂'=>1,'繅'=>1,'䌴'=>1,'𦈨'=>1,'𦉇'=>1,'䍙'=>1,'𦋙'=>1,'罺'=>1,'𦌾'=>1,'羕'=>1,'翺'=>1,'者'=>1,'𦓚'=>1,'𦔣'=>1,'聠'=>1,'𦖨'=>1,'聰'=>1,'𣍟'=>1,'ð¯¦'=>1,'育'=>1,'脃'=>1,'䐋'=>1,'脾'=>1,'媵'=>1,'𦞧'=>1,'𦞵'=>1,'𣎓'=>1,'𣎜'=>1,'舁'=>1,'舄'=>1,'ð¯¦'=>1,'䑫'=>1,'ð¯¦'=>1,'ð¯¦'=>1,'芝'=>1,'劳'=>1,'花'=>1,'芳'=>1,'芽'=>1,'苦'=>1,'𦬼'=>1,'若'=>1,'茝'=>1,'荣'=>1,'莭'=>1,'茣'=>1,'ð¯¦'=>1,'菧'=>1,'著'=>1,'荓'=>1,'菊'=>1,'菌'=>1,'菜'=>1,'𦰶'=>1,'𦵫'=>1,'𦳕'=>1,'䔫'=>1,'蓱'=>1,'蓳'=>1,'蔖'=>1,'𧏊'=>1,'蕤'=>1,'𦼬'=>1,'䕝'=>1,'䕡'=>1,'𦾱'=>1,'𧃒'=>1,'䕫'=>1,'虐'=>1,'虜'=>1,'虧'=>1,'虩'=>1,'蚩'=>1,'蚈'=>1,'蜎'=>1,'蛢'=>1,'蝹'=>1,'蜨'=>1,'蝫'=>1,'螆'=>1,'䗗'=>1,'蟡'=>1,'ð¯§'=>1,'䗹'=>1,'衠'=>1,'衣'=>1,'𧙧'=>1,'裗'=>1,'裞'=>1,'䘵'=>1,'裺'=>1,'㒻'=>1,'𧢮'=>1,'𧥦'=>1,'ð¯§'=>1,'䛇'=>1,'ð¯§'=>1,'ð¯§'=>1,'變'=>1,'豕'=>1,'𧲨'=>1,'貫'=>1,'賁'=>1,'贛'=>1,'起'=>1,'𧼯'=>1,'𠠄'=>1,'跋'=>1,'趼'=>1,'跰'=>1,'ð¯§'=>1,'軔'=>1,'輸'=>1,'𨗒'=>1,'𨗭'=>1,'邔'=>1,'郱'=>1,'鄑'=>1,'𨜮'=>1,'鄛'=>1,'鈸'=>1,'鋗'=>1,'鋘'=>1,'鉼'=>1,'鏹'=>1,'鐕'=>1,'𨯺'=>1,'開'=>1,'䦕'=>1,'閷'=>1,'𨵷'=>1,'䧦'=>1,'雃'=>1,'嶲'=>1,'霣'=>1,'𩅅'=>1,'𩈚'=>1,'䩮'=>1,'䩶'=>1,'韠'=>1,'𩐊'=>1,'䪲'=>1,'𩒖'=>1,'頋'=>1,'頋'=>1,'頩'=>1,'ð¯¨'=>1,'飢'=>1,'䬳'=>1,'餩'=>1,'馧'=>1,'駂'=>1,'駾'=>1,'䯎'=>1,'𩬰'=>1,'鬒'=>1,'鱀'=>1,'鳽'=>1,'ð¯¨'=>1,'䳭'=>1,'ð¯¨'=>1,'ð¯¨'=>1,'䳸'=>1,'𪄅'=>1,'𪈎'=>1,'𪊑'=>1,'麻'=>1,'䵖'=>1,'黹'=>1,'黾'=>1,'鼅'=>1,'鼏'=>1,'鼖'=>1,'鼻'=>1,'ð¯¨'=>1,'Ì€'=>0,'Ì'=>0,'Ì‚'=>0,'̃'=>0,'Ì„'=>0,'̆'=>0,'̇'=>0,'̈'=>0,'̉'=>0,'ÌŠ'=>0,'Ì‹'=>0,'ÌŒ'=>0,'Ì'=>0,'Ì‘'=>0,'Ì“'=>0,'Ì”'=>0,'Ì›'=>0,'Ì£'=>0,'̤'=>0,'Ì¥'=>0,'̦'=>0,'̧'=>0,'̨'=>0,'Ì­'=>0,'Ì®'=>0,'Ì°'=>0,'̱'=>0,'̸'=>0,'Í‚'=>0,'Í…'=>0,'Ù“'=>0,'Ù”'=>0,'Ù•'=>0,'़'=>0,'া'=>0,'ৗ'=>0,'ା'=>0,'à­–'=>0,'à­—'=>0,'ா'=>0,'ௗ'=>0,'à±–'=>0,'ೂ'=>0,'ೕ'=>0,'à³–'=>0,'à´¾'=>0,'ൗ'=>0,'à·Š'=>0,'à·'=>0,'à·Ÿ'=>0,'ီ'=>0,'á…¡'=>0,'á…¢'=>0,'á…£'=>0,'á…¤'=>0,'á…¥'=>0,'á…¦'=>0,'á…§'=>0,'á…¨'=>0,'á…©'=>0,'á…ª'=>0,'á…«'=>0,'á…¬'=>0,'á…­'=>0,'á…®'=>0,'á…¯'=>0,'á…°'=>0,'á…±'=>0,'á…²'=>0,'á…³'=>0,'á…´'=>0,'á…µ'=>0,'ᆨ'=>0,'ᆩ'=>0,'ᆪ'=>0,'ᆫ'=>0,'ᆬ'=>0,'ᆭ'=>0,'ᆮ'=>0,'ᆯ'=>0,'ᆰ'=>0,'ᆱ'=>0,'ᆲ'=>0,'ᆳ'=>0,'ᆴ'=>0,'ᆵ'=>0,'ᆶ'=>0,'ᆷ'=>0,'ᆸ'=>0,'ᆹ'=>0,'ᆺ'=>0,'ᆻ'=>0,'ᆼ'=>0,'ᆽ'=>0,'ᆾ'=>0,'ᆿ'=>0,'ᇀ'=>0,'á‡'=>0,'ᇂ'=>0,'ᬵ'=>0,'ã‚™'=>0,'ã‚š'=>0); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/utf_nfkc_qc.php b/phpBB/includes/utf/data/utf_nfkc_qc.php
new file mode 100644
index 0000000000..da9a8a0e89
--- /dev/null
+++ b/phpBB/includes/utf/data/utf_nfkc_qc.php
@@ -0,0 +1,2 @@
+<?php
+$GLOBALS['utf_nfkc_qc']=array(' '=>1,'¨'=>1,'ª'=>1,'¯'=>1,'²'=>1,'³'=>1,'´'=>1,'µ'=>1,'¸'=>1,'¹'=>1,'º'=>1,'¼'=>1,'½'=>1,'¾'=>1,'IJ'=>1,'ij'=>1,'Ä¿'=>1,'Å€'=>1,'ʼn'=>1,'Å¿'=>1,'Ç„'=>1,'Ç…'=>1,'dž'=>1,'LJ'=>1,'Lj'=>1,'lj'=>1,'ÇŠ'=>1,'Ç‹'=>1,'ÇŒ'=>1,'DZ'=>1,'Dz'=>1,'dz'=>1,'Ê°'=>1,'ʱ'=>1,'ʲ'=>1,'ʳ'=>1,'Ê´'=>1,'ʵ'=>1,'ʶ'=>1,'Ê·'=>1,'ʸ'=>1,'˘'=>1,'Ë™'=>1,'Ëš'=>1,'Ë›'=>1,'Ëœ'=>1,'Ë'=>1,'Ë '=>1,'Ë¡'=>1,'Ë¢'=>1,'Ë£'=>1,'ˤ'=>1,'Í€'=>1,'Í'=>1,'̓'=>1,'Í„'=>1,'Í´'=>1,'ͺ'=>1,';'=>1,'΄'=>1,'Î…'=>1,'·'=>1,'Ï'=>1,'Ï‘'=>1,'Ï’'=>1,'Ï“'=>1,'Ï”'=>1,'Ï•'=>1,'Ï–'=>1,'Ï°'=>1,'ϱ'=>1,'ϲ'=>1,'Ï´'=>1,'ϵ'=>1,'Ϲ'=>1,'Ö‡'=>1,'Ùµ'=>1,'Ù¶'=>1,'Ù·'=>1,'Ù¸'=>1,'क़'=>1,'ख़'=>1,'ग़'=>1,'ज़'=>1,'ड़'=>1,'à¥'=>1,'फ़'=>1,'य़'=>1,'ড়'=>1,'à§'=>1,'য়'=>1,'ਲ਼'=>1,'ਸ਼'=>1,'à©™'=>1,'à©š'=>1,'à©›'=>1,'à©ž'=>1,'à­œ'=>1,'à­'=>1,'ำ'=>1,'ຳ'=>1,'ໜ'=>1,'à»'=>1,'༌'=>1,'གྷ'=>1,'à½'=>1,'དྷ'=>1,'བྷ'=>1,'ཛྷ'=>1,'ཀྵ'=>1,'ཱི'=>1,'ཱུ'=>1,'ྲྀ'=>1,'ཷ'=>1,'ླྀ'=>1,'ཹ'=>1,'à¾'=>1,'ྒྷ'=>1,'à¾'=>1,'ྡྷ'=>1,'ྦྷ'=>1,'ྫྷ'=>1,'ྐྵ'=>1,'ჼ'=>1,'á´¬'=>1,'á´­'=>1,'á´®'=>1,'á´°'=>1,'á´±'=>1,'á´²'=>1,'á´³'=>1,'á´´'=>1,'á´µ'=>1,'á´¶'=>1,'á´·'=>1,'á´¸'=>1,'á´¹'=>1,'á´º'=>1,'á´¼'=>1,'á´½'=>1,'á´¾'=>1,'á´¿'=>1,'áµ€'=>1,'áµ'=>1,'ᵂ'=>1,'ᵃ'=>1,'ᵄ'=>1,'áµ…'=>1,'ᵆ'=>1,'ᵇ'=>1,'ᵈ'=>1,'ᵉ'=>1,'ᵊ'=>1,'ᵋ'=>1,'ᵌ'=>1,'áµ'=>1,'áµ'=>1,'áµ'=>1,'ᵑ'=>1,'áµ’'=>1,'ᵓ'=>1,'áµ”'=>1,'ᵕ'=>1,'áµ–'=>1,'áµ—'=>1,'ᵘ'=>1,'áµ™'=>1,'ᵚ'=>1,'áµ›'=>1,'ᵜ'=>1,'áµ'=>1,'ᵞ'=>1,'ᵟ'=>1,'áµ '=>1,'ᵡ'=>1,'áµ¢'=>1,'áµ£'=>1,'ᵤ'=>1,'áµ¥'=>1,'ᵦ'=>1,'ᵧ'=>1,'ᵨ'=>1,'ᵩ'=>1,'ᵪ'=>1,'ᵸ'=>1,'ᶛ'=>1,'ᶜ'=>1,'á¶'=>1,'ᶞ'=>1,'ᶟ'=>1,'ᶠ'=>1,'ᶡ'=>1,'ᶢ'=>1,'ᶣ'=>1,'ᶤ'=>1,'ᶥ'=>1,'ᶦ'=>1,'ᶧ'=>1,'ᶨ'=>1,'ᶩ'=>1,'ᶪ'=>1,'ᶫ'=>1,'ᶬ'=>1,'ᶭ'=>1,'ᶮ'=>1,'ᶯ'=>1,'ᶰ'=>1,'ᶱ'=>1,'ᶲ'=>1,'ᶳ'=>1,'ᶴ'=>1,'ᶵ'=>1,'ᶶ'=>1,'ᶷ'=>1,'ᶸ'=>1,'ᶹ'=>1,'ᶺ'=>1,'ᶻ'=>1,'ᶼ'=>1,'ᶽ'=>1,'ᶾ'=>1,'ᶿ'=>1,'ẚ'=>1,'ẛ'=>1,'á½±'=>1,'á½³'=>1,'á½µ'=>1,'á½·'=>1,'á½¹'=>1,'á½»'=>1,'á½½'=>1,'á¾»'=>1,'á¾½'=>1,'á¾¾'=>1,'᾿'=>1,'á¿€'=>1,'á¿'=>1,'Έ'=>1,'á¿‹'=>1,'á¿'=>1,'á¿Ž'=>1,'á¿'=>1,'á¿“'=>1,'á¿›'=>1,'á¿'=>1,'á¿ž'=>1,'á¿Ÿ'=>1,'á¿£'=>1,'á¿«'=>1,'á¿­'=>1,'á¿®'=>1,'`'=>1,'Ό'=>1,'á¿»'=>1,'´'=>1,'῾'=>1,' '=>1,'â€'=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,'‑'=>1,'‗'=>1,'․'=>1,'‥'=>1,'…'=>1,' '=>1,'″'=>1,'‴'=>1,'‶'=>1,'‷'=>1,'‼'=>1,'‾'=>1,'â‡'=>1,'âˆ'=>1,'â‰'=>1,'â—'=>1,'âŸ'=>1,'â°'=>1,'â±'=>1,'â´'=>1,'âµ'=>1,'â¶'=>1,'â·'=>1,'â¸'=>1,'â¹'=>1,'âº'=>1,'â»'=>1,'â¼'=>1,'â½'=>1,'â¾'=>1,'â¿'=>1,'â‚€'=>1,'â‚'=>1,'â‚‚'=>1,'₃'=>1,'â‚„'=>1,'â‚…'=>1,'₆'=>1,'₇'=>1,'₈'=>1,'₉'=>1,'â‚Š'=>1,'â‚‹'=>1,'â‚Œ'=>1,'â‚'=>1,'â‚Ž'=>1,'â‚'=>1,'â‚‘'=>1,'â‚’'=>1,'â‚“'=>1,'â‚”'=>1,'₨'=>1,'â„€'=>1,'â„'=>1,'â„‚'=>1,'℃'=>1,'â„…'=>1,'℆'=>1,'ℇ'=>1,'℉'=>1,'â„Š'=>1,'â„‹'=>1,'â„Œ'=>1,'â„'=>1,'â„Ž'=>1,'â„'=>1,'â„'=>1,'â„‘'=>1,'â„’'=>1,'â„“'=>1,'â„•'=>1,'â„–'=>1,'â„™'=>1,'â„š'=>1,'â„›'=>1,'â„œ'=>1,'â„'=>1,'â„ '=>1,'â„¡'=>1,'â„¢'=>1,'ℤ'=>1,'Ω'=>1,'ℨ'=>1,'K'=>1,'â„«'=>1,'ℬ'=>1,'â„­'=>1,'ℯ'=>1,'â„°'=>1,'ℱ'=>1,'ℳ'=>1,'â„´'=>1,'ℵ'=>1,'ℶ'=>1,'â„·'=>1,'ℸ'=>1,'ℹ'=>1,'â„»'=>1,'ℼ'=>1,'ℽ'=>1,'ℾ'=>1,'â„¿'=>1,'â…€'=>1,'â……'=>1,'â…†'=>1,'â…‡'=>1,'â…ˆ'=>1,'â…‰'=>1,'â…“'=>1,'â…”'=>1,'â…•'=>1,'â…–'=>1,'â…—'=>1,'â…˜'=>1,'â…™'=>1,'â…š'=>1,'â…›'=>1,'â…œ'=>1,'â…'=>1,'â…ž'=>1,'â…Ÿ'=>1,'â… '=>1,'â…¡'=>1,'â…¢'=>1,'â…£'=>1,'â…¤'=>1,'â…¥'=>1,'â…¦'=>1,'â…§'=>1,'â…¨'=>1,'â…©'=>1,'â…ª'=>1,'â…«'=>1,'â…¬'=>1,'â…­'=>1,'â…®'=>1,'â…¯'=>1,'â…°'=>1,'â…±'=>1,'â…²'=>1,'â…³'=>1,'â…´'=>1,'â…µ'=>1,'â…¶'=>1,'â…·'=>1,'â…¸'=>1,'â…¹'=>1,'â…º'=>1,'â…»'=>1,'â…¼'=>1,'â…½'=>1,'â…¾'=>1,'â…¿'=>1,'∬'=>1,'∭'=>1,'∯'=>1,'∰'=>1,'〈'=>1,'〉'=>1,'â‘ '=>1,'â‘¡'=>1,'â‘¢'=>1,'â‘£'=>1,'⑤'=>1,'â‘¥'=>1,'⑦'=>1,'⑧'=>1,'⑨'=>1,'â‘©'=>1,'⑪'=>1,'â‘«'=>1,'⑬'=>1,'â‘­'=>1,'â‘®'=>1,'⑯'=>1,'â‘°'=>1,'⑱'=>1,'⑲'=>1,'⑳'=>1,'â‘´'=>1,'⑵'=>1,'⑶'=>1,'â‘·'=>1,'⑸'=>1,'⑹'=>1,'⑺'=>1,'â‘»'=>1,'⑼'=>1,'⑽'=>1,'⑾'=>1,'â‘¿'=>1,'â’€'=>1,'â’'=>1,'â’‚'=>1,'â’ƒ'=>1,'â’„'=>1,'â’…'=>1,'â’†'=>1,'â’‡'=>1,'â’ˆ'=>1,'â’‰'=>1,'â’Š'=>1,'â’‹'=>1,'â’Œ'=>1,'â’'=>1,'â’Ž'=>1,'â’'=>1,'â’'=>1,'â’‘'=>1,'â’’'=>1,'â’“'=>1,'â’”'=>1,'â’•'=>1,'â’–'=>1,'â’—'=>1,'â’˜'=>1,'â’™'=>1,'â’š'=>1,'â’›'=>1,'â’œ'=>1,'â’'=>1,'â’ž'=>1,'â’Ÿ'=>1,'â’ '=>1,'â’¡'=>1,'â’¢'=>1,'â’£'=>1,'â’¤'=>1,'â’¥'=>1,'â’¦'=>1,'â’§'=>1,'â’¨'=>1,'â’©'=>1,'â’ª'=>1,'â’«'=>1,'â’¬'=>1,'â’­'=>1,'â’®'=>1,'â’¯'=>1,'â’°'=>1,'â’±'=>1,'â’²'=>1,'â’³'=>1,'â’´'=>1,'â’µ'=>1,'â’¶'=>1,'â’·'=>1,'â’¸'=>1,'â’¹'=>1,'â’º'=>1,'â’»'=>1,'â’¼'=>1,'â’½'=>1,'â’¾'=>1,'â’¿'=>1,'â“€'=>1,'â“'=>1,'â“‚'=>1,'Ⓝ'=>1,'â“„'=>1,'â“…'=>1,'Ⓠ'=>1,'Ⓡ'=>1,'Ⓢ'=>1,'Ⓣ'=>1,'â“Š'=>1,'â“‹'=>1,'â“Œ'=>1,'â“'=>1,'â“Ž'=>1,'â“'=>1,'â“'=>1,'â“‘'=>1,'â“’'=>1,'â““'=>1,'â“”'=>1,'â“•'=>1,'â“–'=>1,'â“—'=>1,'ⓘ'=>1,'â“™'=>1,'â“š'=>1,'â“›'=>1,'â“œ'=>1,'â“'=>1,'â“ž'=>1,'â“Ÿ'=>1,'â“ '=>1,'â“¡'=>1,'â“¢'=>1,'â“£'=>1,'ⓤ'=>1,'â“¥'=>1,'ⓦ'=>1,'ⓧ'=>1,'ⓨ'=>1,'â“©'=>1,'⓪'=>1,'⨌'=>1,'â©´'=>1,'⩵'=>1,'⩶'=>1,'â«œ'=>1,'ⵯ'=>1,'⺟'=>1,'⻳'=>1,'â¼€'=>1,'â¼'=>1,'⼂'=>1,'⼃'=>1,'⼄'=>1,'â¼…'=>1,'⼆'=>1,'⼇'=>1,'⼈'=>1,'⼉'=>1,'⼊'=>1,'⼋'=>1,'⼌'=>1,'â¼'=>1,'⼎'=>1,'â¼'=>1,'â¼'=>1,'⼑'=>1,'â¼’'=>1,'⼓'=>1,'â¼”'=>1,'⼕'=>1,'â¼–'=>1,'â¼—'=>1,'⼘'=>1,'â¼™'=>1,'⼚'=>1,'â¼›'=>1,'⼜'=>1,'â¼'=>1,'⼞'=>1,'⼟'=>1,'â¼ '=>1,'⼡'=>1,'â¼¢'=>1,'â¼£'=>1,'⼤'=>1,'â¼¥'=>1,'⼦'=>1,'⼧'=>1,'⼨'=>1,'⼩'=>1,'⼪'=>1,'⼫'=>1,'⼬'=>1,'â¼­'=>1,'â¼®'=>1,'⼯'=>1,'â¼°'=>1,'â¼±'=>1,'â¼²'=>1,'â¼³'=>1,'â¼´'=>1,'â¼µ'=>1,'⼶'=>1,'â¼·'=>1,'⼸'=>1,'â¼¹'=>1,'⼺'=>1,'â¼»'=>1,'â¼¼'=>1,'â¼½'=>1,'â¼¾'=>1,'⼿'=>1,'â½€'=>1,'â½'=>1,'⽂'=>1,'⽃'=>1,'⽄'=>1,'â½…'=>1,'⽆'=>1,'⽇'=>1,'⽈'=>1,'⽉'=>1,'⽊'=>1,'⽋'=>1,'⽌'=>1,'â½'=>1,'⽎'=>1,'â½'=>1,'â½'=>1,'⽑'=>1,'â½’'=>1,'⽓'=>1,'â½”'=>1,'⽕'=>1,'â½–'=>1,'â½—'=>1,'⽘'=>1,'â½™'=>1,'⽚'=>1,'â½›'=>1,'⽜'=>1,'â½'=>1,'⽞'=>1,'⽟'=>1,'â½ '=>1,'⽡'=>1,'â½¢'=>1,'â½£'=>1,'⽤'=>1,'â½¥'=>1,'⽦'=>1,'⽧'=>1,'⽨'=>1,'⽩'=>1,'⽪'=>1,'⽫'=>1,'⽬'=>1,'â½­'=>1,'â½®'=>1,'⽯'=>1,'â½°'=>1,'â½±'=>1,'â½²'=>1,'â½³'=>1,'â½´'=>1,'â½µ'=>1,'⽶'=>1,'â½·'=>1,'⽸'=>1,'â½¹'=>1,'⽺'=>1,'â½»'=>1,'â½¼'=>1,'â½½'=>1,'â½¾'=>1,'⽿'=>1,'â¾€'=>1,'â¾'=>1,'⾂'=>1,'⾃'=>1,'⾄'=>1,'â¾…'=>1,'⾆'=>1,'⾇'=>1,'⾈'=>1,'⾉'=>1,'⾊'=>1,'⾋'=>1,'⾌'=>1,'â¾'=>1,'⾎'=>1,'â¾'=>1,'â¾'=>1,'⾑'=>1,'â¾’'=>1,'⾓'=>1,'â¾”'=>1,'⾕'=>1,'â¾–'=>1,'â¾—'=>1,'⾘'=>1,'â¾™'=>1,'⾚'=>1,'â¾›'=>1,'⾜'=>1,'â¾'=>1,'⾞'=>1,'⾟'=>1,'â¾ '=>1,'⾡'=>1,'â¾¢'=>1,'â¾£'=>1,'⾤'=>1,'â¾¥'=>1,'⾦'=>1,'⾧'=>1,'⾨'=>1,'⾩'=>1,'⾪'=>1,'⾫'=>1,'⾬'=>1,'â¾­'=>1,'â¾®'=>1,'⾯'=>1,'â¾°'=>1,'â¾±'=>1,'â¾²'=>1,'â¾³'=>1,'â¾´'=>1,'â¾µ'=>1,'⾶'=>1,'â¾·'=>1,'⾸'=>1,'â¾¹'=>1,'⾺'=>1,'â¾»'=>1,'â¾¼'=>1,'â¾½'=>1,'â¾¾'=>1,'⾿'=>1,'â¿€'=>1,'â¿'=>1,'â¿‚'=>1,'⿃'=>1,'â¿„'=>1,'â¿…'=>1,'⿆'=>1,'⿇'=>1,'⿈'=>1,'⿉'=>1,'â¿Š'=>1,'â¿‹'=>1,'â¿Œ'=>1,'â¿'=>1,'â¿Ž'=>1,'â¿'=>1,'â¿'=>1,'â¿‘'=>1,'â¿’'=>1,'â¿“'=>1,'â¿”'=>1,'â¿•'=>1,' '=>1,'〶'=>1,'〸'=>1,'〹'=>1,'〺'=>1,'ã‚›'=>1,'ã‚œ'=>1,'ã‚Ÿ'=>1,'ヿ'=>1,'ㄱ'=>1,'ㄲ'=>1,'ㄳ'=>1,'ã„´'=>1,'ㄵ'=>1,'ㄶ'=>1,'ã„·'=>1,'ㄸ'=>1,'ㄹ'=>1,'ㄺ'=>1,'ã„»'=>1,'ㄼ'=>1,'ㄽ'=>1,'ㄾ'=>1,'ã„¿'=>1,'ã…€'=>1,'ã…'=>1,'ã…‚'=>1,'ã…ƒ'=>1,'ã…„'=>1,'ã……'=>1,'ã…†'=>1,'ã…‡'=>1,'ã…ˆ'=>1,'ã…‰'=>1,'ã…Š'=>1,'ã…‹'=>1,'ã…Œ'=>1,'ã…'=>1,'ã…Ž'=>1,'ã…'=>1,'ã…'=>1,'ã…‘'=>1,'ã…’'=>1,'ã…“'=>1,'ã…”'=>1,'ã…•'=>1,'ã…–'=>1,'ã…—'=>1,'ã…˜'=>1,'ã…™'=>1,'ã…š'=>1,'ã…›'=>1,'ã…œ'=>1,'ã…'=>1,'ã…ž'=>1,'ã…Ÿ'=>1,'ã… '=>1,'ã…¡'=>1,'ã…¢'=>1,'ã…£'=>1,'ã…¤'=>1,'ã…¥'=>1,'ã…¦'=>1,'ã…§'=>1,'ã…¨'=>1,'ã…©'=>1,'ã…ª'=>1,'ã…«'=>1,'ã…¬'=>1,'ã…­'=>1,'ã…®'=>1,'ã…¯'=>1,'ã…°'=>1,'ã…±'=>1,'ã…²'=>1,'ã…³'=>1,'ã…´'=>1,'ã…µ'=>1,'ã…¶'=>1,'ã…·'=>1,'ã…¸'=>1,'ã…¹'=>1,'ã…º'=>1,'ã…»'=>1,'ã…¼'=>1,'ã…½'=>1,'ã…¾'=>1,'ã…¿'=>1,'ㆀ'=>1,'ã†'=>1,'ㆂ'=>1,'ㆃ'=>1,'ㆄ'=>1,'ㆅ'=>1,'ㆆ'=>1,'ㆇ'=>1,'ㆈ'=>1,'ㆉ'=>1,'ㆊ'=>1,'ㆋ'=>1,'ㆌ'=>1,'ã†'=>1,'ㆎ'=>1,'㆒'=>1,'㆓'=>1,'㆔'=>1,'㆕'=>1,'㆖'=>1,'㆗'=>1,'㆘'=>1,'㆙'=>1,'㆚'=>1,'㆛'=>1,'㆜'=>1,'ã†'=>1,'㆞'=>1,'㆟'=>1,'㈀'=>1,'ãˆ'=>1,'㈂'=>1,'㈃'=>1,'㈄'=>1,'㈅'=>1,'㈆'=>1,'㈇'=>1,'㈈'=>1,'㈉'=>1,'㈊'=>1,'㈋'=>1,'㈌'=>1,'ãˆ'=>1,'㈎'=>1,'ãˆ'=>1,'ãˆ'=>1,'㈑'=>1,'㈒'=>1,'㈓'=>1,'㈔'=>1,'㈕'=>1,'㈖'=>1,'㈗'=>1,'㈘'=>1,'㈙'=>1,'㈚'=>1,'㈛'=>1,'㈜'=>1,'ãˆ'=>1,'㈞'=>1,'㈠'=>1,'㈡'=>1,'㈢'=>1,'㈣'=>1,'㈤'=>1,'㈥'=>1,'㈦'=>1,'㈧'=>1,'㈨'=>1,'㈩'=>1,'㈪'=>1,'㈫'=>1,'㈬'=>1,'㈭'=>1,'㈮'=>1,'㈯'=>1,'㈰'=>1,'㈱'=>1,'㈲'=>1,'㈳'=>1,'㈴'=>1,'㈵'=>1,'㈶'=>1,'㈷'=>1,'㈸'=>1,'㈹'=>1,'㈺'=>1,'㈻'=>1,'㈼'=>1,'㈽'=>1,'㈾'=>1,'㈿'=>1,'㉀'=>1,'ã‰'=>1,'㉂'=>1,'㉃'=>1,'ã‰'=>1,'㉑'=>1,'㉒'=>1,'㉓'=>1,'㉔'=>1,'㉕'=>1,'㉖'=>1,'㉗'=>1,'㉘'=>1,'㉙'=>1,'㉚'=>1,'㉛'=>1,'㉜'=>1,'ã‰'=>1,'㉞'=>1,'㉟'=>1,'㉠'=>1,'㉡'=>1,'㉢'=>1,'㉣'=>1,'㉤'=>1,'㉥'=>1,'㉦'=>1,'㉧'=>1,'㉨'=>1,'㉩'=>1,'㉪'=>1,'㉫'=>1,'㉬'=>1,'㉭'=>1,'㉮'=>1,'㉯'=>1,'㉰'=>1,'㉱'=>1,'㉲'=>1,'㉳'=>1,'㉴'=>1,'㉵'=>1,'㉶'=>1,'㉷'=>1,'㉸'=>1,'㉹'=>1,'㉺'=>1,'㉻'=>1,'㉼'=>1,'㉽'=>1,'㉾'=>1,'㊀'=>1,'ãŠ'=>1,'㊂'=>1,'㊃'=>1,'㊄'=>1,'㊅'=>1,'㊆'=>1,'㊇'=>1,'㊈'=>1,'㊉'=>1,'㊊'=>1,'㊋'=>1,'㊌'=>1,'ãŠ'=>1,'㊎'=>1,'ãŠ'=>1,'ãŠ'=>1,'㊑'=>1,'㊒'=>1,'㊓'=>1,'㊔'=>1,'㊕'=>1,'㊖'=>1,'㊗'=>1,'㊘'=>1,'㊙'=>1,'㊚'=>1,'㊛'=>1,'㊜'=>1,'ãŠ'=>1,'㊞'=>1,'㊟'=>1,'㊠'=>1,'㊡'=>1,'㊢'=>1,'㊣'=>1,'㊤'=>1,'㊥'=>1,'㊦'=>1,'㊧'=>1,'㊨'=>1,'㊩'=>1,'㊪'=>1,'㊫'=>1,'㊬'=>1,'㊭'=>1,'㊮'=>1,'㊯'=>1,'㊰'=>1,'㊱'=>1,'㊲'=>1,'㊳'=>1,'㊴'=>1,'㊵'=>1,'㊶'=>1,'㊷'=>1,'㊸'=>1,'㊹'=>1,'㊺'=>1,'㊻'=>1,'㊼'=>1,'㊽'=>1,'㊾'=>1,'㊿'=>1,'ã‹€'=>1,'ã‹'=>1,'ã‹‚'=>1,'㋃'=>1,'ã‹„'=>1,'ã‹…'=>1,'㋆'=>1,'㋇'=>1,'㋈'=>1,'㋉'=>1,'ã‹Š'=>1,'ã‹‹'=>1,'ã‹Œ'=>1,'ã‹'=>1,'ã‹Ž'=>1,'ã‹'=>1,'ã‹'=>1,'ã‹‘'=>1,'ã‹’'=>1,'ã‹“'=>1,'ã‹”'=>1,'ã‹•'=>1,'ã‹–'=>1,'ã‹—'=>1,'㋘'=>1,'ã‹™'=>1,'ã‹š'=>1,'ã‹›'=>1,'ã‹œ'=>1,'ã‹'=>1,'ã‹ž'=>1,'ã‹Ÿ'=>1,'ã‹ '=>1,'ã‹¡'=>1,'ã‹¢'=>1,'ã‹£'=>1,'㋤'=>1,'ã‹¥'=>1,'㋦'=>1,'㋧'=>1,'㋨'=>1,'ã‹©'=>1,'㋪'=>1,'ã‹«'=>1,'㋬'=>1,'ã‹­'=>1,'ã‹®'=>1,'㋯'=>1,'ã‹°'=>1,'㋱'=>1,'㋲'=>1,'㋳'=>1,'ã‹´'=>1,'㋵'=>1,'㋶'=>1,'ã‹·'=>1,'㋸'=>1,'㋹'=>1,'㋺'=>1,'ã‹»'=>1,'㋼'=>1,'㋽'=>1,'㋾'=>1,'㌀'=>1,'ãŒ'=>1,'㌂'=>1,'㌃'=>1,'㌄'=>1,'㌅'=>1,'㌆'=>1,'㌇'=>1,'㌈'=>1,'㌉'=>1,'㌊'=>1,'㌋'=>1,'㌌'=>1,'ãŒ'=>1,'㌎'=>1,'ãŒ'=>1,'ãŒ'=>1,'㌑'=>1,'㌒'=>1,'㌓'=>1,'㌔'=>1,'㌕'=>1,'㌖'=>1,'㌗'=>1,'㌘'=>1,'㌙'=>1,'㌚'=>1,'㌛'=>1,'㌜'=>1,'ãŒ'=>1,'㌞'=>1,'㌟'=>1,'㌠'=>1,'㌡'=>1,'㌢'=>1,'㌣'=>1,'㌤'=>1,'㌥'=>1,'㌦'=>1,'㌧'=>1,'㌨'=>1,'㌩'=>1,'㌪'=>1,'㌫'=>1,'㌬'=>1,'㌭'=>1,'㌮'=>1,'㌯'=>1,'㌰'=>1,'㌱'=>1,'㌲'=>1,'㌳'=>1,'㌴'=>1,'㌵'=>1,'㌶'=>1,'㌷'=>1,'㌸'=>1,'㌹'=>1,'㌺'=>1,'㌻'=>1,'㌼'=>1,'㌽'=>1,'㌾'=>1,'㌿'=>1,'ã€'=>1,'ã'=>1,'ã‚'=>1,'ãƒ'=>1,'ã„'=>1,'ã…'=>1,'ã†'=>1,'ã‡'=>1,'ãˆ'=>1,'ã‰'=>1,'ãŠ'=>1,'ã‹'=>1,'ãŒ'=>1,'ã'=>1,'ãŽ'=>1,'ã'=>1,'ã'=>1,'ã‘'=>1,'ã’'=>1,'ã“'=>1,'ã”'=>1,'ã•'=>1,'ã–'=>1,'ã—'=>1,'ã˜'=>1,'ã™'=>1,'ãš'=>1,'ã›'=>1,'ãœ'=>1,'ã'=>1,'ãž'=>1,'ãŸ'=>1,'ã '=>1,'ã¡'=>1,'ã¢'=>1,'ã£'=>1,'ã¤'=>1,'ã¥'=>1,'ã¦'=>1,'ã§'=>1,'ã¨'=>1,'ã©'=>1,'ãª'=>1,'ã«'=>1,'ã¬'=>1,'ã­'=>1,'ã®'=>1,'ã¯'=>1,'ã°'=>1,'ã±'=>1,'ã²'=>1,'ã³'=>1,'ã´'=>1,'ãµ'=>1,'ã¶'=>1,'ã·'=>1,'ã¸'=>1,'ã¹'=>1,'ãº'=>1,'ã»'=>1,'ã¼'=>1,'ã½'=>1,'ã¾'=>1,'ã¿'=>1,'㎀'=>1,'ãŽ'=>1,'㎂'=>1,'㎃'=>1,'㎄'=>1,'㎅'=>1,'㎆'=>1,'㎇'=>1,'㎈'=>1,'㎉'=>1,'㎊'=>1,'㎋'=>1,'㎌'=>1,'ãŽ'=>1,'㎎'=>1,'ãŽ'=>1,'ãŽ'=>1,'㎑'=>1,'㎒'=>1,'㎓'=>1,'㎔'=>1,'㎕'=>1,'㎖'=>1,'㎗'=>1,'㎘'=>1,'㎙'=>1,'㎚'=>1,'㎛'=>1,'㎜'=>1,'ãŽ'=>1,'㎞'=>1,'㎟'=>1,'㎠'=>1,'㎡'=>1,'㎢'=>1,'㎣'=>1,'㎤'=>1,'㎥'=>1,'㎦'=>1,'㎧'=>1,'㎨'=>1,'㎩'=>1,'㎪'=>1,'㎫'=>1,'㎬'=>1,'㎭'=>1,'㎮'=>1,'㎯'=>1,'㎰'=>1,'㎱'=>1,'㎲'=>1,'㎳'=>1,'㎴'=>1,'㎵'=>1,'㎶'=>1,'㎷'=>1,'㎸'=>1,'㎹'=>1,'㎺'=>1,'㎻'=>1,'㎼'=>1,'㎽'=>1,'㎾'=>1,'㎿'=>1,'ã€'=>1,'ã'=>1,'ã‚'=>1,'ãƒ'=>1,'ã„'=>1,'ã…'=>1,'ã†'=>1,'ã‡'=>1,'ãˆ'=>1,'ã‰'=>1,'ãŠ'=>1,'ã‹'=>1,'ãŒ'=>1,'ã'=>1,'ãŽ'=>1,'ã'=>1,'ã'=>1,'ã‘'=>1,'ã’'=>1,'ã“'=>1,'ã”'=>1,'ã•'=>1,'ã–'=>1,'ã—'=>1,'ã˜'=>1,'ã™'=>1,'ãš'=>1,'ã›'=>1,'ãœ'=>1,'ã'=>1,'ãž'=>1,'ãŸ'=>1,'ã '=>1,'ã¡'=>1,'ã¢'=>1,'ã£'=>1,'ã¤'=>1,'ã¥'=>1,'ã¦'=>1,'ã§'=>1,'ã¨'=>1,'ã©'=>1,'ãª'=>1,'ã«'=>1,'ã¬'=>1,'ã­'=>1,'ã®'=>1,'ã¯'=>1,'ã°'=>1,'ã±'=>1,'ã²'=>1,'ã³'=>1,'ã´'=>1,'ãµ'=>1,'ã¶'=>1,'ã·'=>1,'ã¸'=>1,'ã¹'=>1,'ãº'=>1,'ã»'=>1,'ã¼'=>1,'ã½'=>1,'ã¾'=>1,'ã¿'=>1,'豈'=>1,'ï¤'=>1,'車'=>1,'賈'=>1,'滑'=>1,'串'=>1,'句'=>1,'龜'=>1,'龜'=>1,'契'=>1,'金'=>1,'喇'=>1,'奈'=>1,'ï¤'=>1,'癩'=>1,'ï¤'=>1,'ï¤'=>1,'螺'=>1,'裸'=>1,'邏'=>1,'樂'=>1,'洛'=>1,'烙'=>1,'珞'=>1,'落'=>1,'酪'=>1,'駱'=>1,'亂'=>1,'卵'=>1,'ï¤'=>1,'爛'=>1,'蘭'=>1,'鸞'=>1,'嵐'=>1,'濫'=>1,'藍'=>1,'襤'=>1,'拉'=>1,'臘'=>1,'蠟'=>1,'廊'=>1,'朗'=>1,'浪'=>1,'狼'=>1,'郎'=>1,'來'=>1,'冷'=>1,'勞'=>1,'擄'=>1,'櫓'=>1,'爐'=>1,'盧'=>1,'老'=>1,'蘆'=>1,'虜'=>1,'路'=>1,'露'=>1,'魯'=>1,'鷺'=>1,'碌'=>1,'祿'=>1,'綠'=>1,'菉'=>1,'錄'=>1,'鹿'=>1,'ï¥'=>1,'壟'=>1,'弄'=>1,'籠'=>1,'聾'=>1,'牢'=>1,'磊'=>1,'賂'=>1,'雷'=>1,'壘'=>1,'屢'=>1,'樓'=>1,'ï¥'=>1,'漏'=>1,'ï¥'=>1,'ï¥'=>1,'陋'=>1,'勒'=>1,'肋'=>1,'凜'=>1,'凌'=>1,'稜'=>1,'綾'=>1,'菱'=>1,'陵'=>1,'讀'=>1,'拏'=>1,'樂'=>1,'ï¥'=>1,'丹'=>1,'寧'=>1,'怒'=>1,'率'=>1,'異'=>1,'北'=>1,'磻'=>1,'便'=>1,'復'=>1,'不'=>1,'泌'=>1,'數'=>1,'索'=>1,'參'=>1,'塞'=>1,'省'=>1,'葉'=>1,'說'=>1,'殺'=>1,'辰'=>1,'沈'=>1,'拾'=>1,'若'=>1,'掠'=>1,'略'=>1,'亮'=>1,'兩'=>1,'凉'=>1,'梁'=>1,'糧'=>1,'良'=>1,'諒'=>1,'量'=>1,'勵'=>1,'呂'=>1,'ï¦'=>1,'廬'=>1,'旅'=>1,'濾'=>1,'礪'=>1,'閭'=>1,'驪'=>1,'麗'=>1,'黎'=>1,'力'=>1,'曆'=>1,'歷'=>1,'ï¦'=>1,'年'=>1,'ï¦'=>1,'ï¦'=>1,'撚'=>1,'漣'=>1,'煉'=>1,'璉'=>1,'秊'=>1,'練'=>1,'聯'=>1,'輦'=>1,'蓮'=>1,'連'=>1,'鍊'=>1,'列'=>1,'ï¦'=>1,'咽'=>1,'烈'=>1,'裂'=>1,'說'=>1,'廉'=>1,'念'=>1,'捻'=>1,'殮'=>1,'簾'=>1,'獵'=>1,'令'=>1,'囹'=>1,'寧'=>1,'嶺'=>1,'怜'=>1,'玲'=>1,'瑩'=>1,'羚'=>1,'聆'=>1,'鈴'=>1,'零'=>1,'靈'=>1,'領'=>1,'例'=>1,'禮'=>1,'醴'=>1,'隸'=>1,'惡'=>1,'了'=>1,'僚'=>1,'寮'=>1,'尿'=>1,'料'=>1,'樂'=>1,'燎'=>1,'ï§'=>1,'蓼'=>1,'遼'=>1,'龍'=>1,'暈'=>1,'阮'=>1,'劉'=>1,'杻'=>1,'柳'=>1,'流'=>1,'溜'=>1,'琉'=>1,'ï§'=>1,'硫'=>1,'ï§'=>1,'ï§'=>1,'六'=>1,'戮'=>1,'陸'=>1,'倫'=>1,'崙'=>1,'淪'=>1,'輪'=>1,'律'=>1,'慄'=>1,'栗'=>1,'率'=>1,'隆'=>1,'ï§'=>1,'吏'=>1,'履'=>1,'易'=>1,'李'=>1,'梨'=>1,'泥'=>1,'理'=>1,'痢'=>1,'罹'=>1,'裏'=>1,'裡'=>1,'里'=>1,'離'=>1,'匿'=>1,'溺'=>1,'吝'=>1,'燐'=>1,'璘'=>1,'藺'=>1,'隣'=>1,'鱗'=>1,'麟'=>1,'林'=>1,'淋'=>1,'臨'=>1,'立'=>1,'笠'=>1,'粒'=>1,'狀'=>1,'炙'=>1,'識'=>1,'什'=>1,'茶'=>1,'刺'=>1,'切'=>1,'ï¨'=>1,'拓'=>1,'糖'=>1,'宅'=>1,'洞'=>1,'暴'=>1,'輻'=>1,'行'=>1,'降'=>1,'見'=>1,'廓'=>1,'兀'=>1,'ï¨'=>1,'ï¨'=>1,'晴'=>1,'凞'=>1,'猪'=>1,'益'=>1,'礼'=>1,'神'=>1,'祥'=>1,'福'=>1,'靖'=>1,'ï¨'=>1,'羽'=>1,'蘒'=>1,'諸'=>1,'逸'=>1,'都'=>1,'飯'=>1,'飼'=>1,'館'=>1,'鶴'=>1,'侮'=>1,'僧'=>1,'免'=>1,'勉'=>1,'勤'=>1,'卑'=>1,'喝'=>1,'嘆'=>1,'器'=>1,'塀'=>1,'墨'=>1,'層'=>1,'屮'=>1,'悔'=>1,'慨'=>1,'憎'=>1,'ï©€'=>1,'ï©'=>1,'ï©‚'=>1,'暑'=>1,'ï©„'=>1,'ï©…'=>1,'渚'=>1,'漢'=>1,'煮'=>1,'爫'=>1,'ï©Š'=>1,'ï©‹'=>1,'ï©Œ'=>1,'ï©'=>1,'ï©Ž'=>1,'ï©'=>1,'ï©'=>1,'ï©‘'=>1,'ï©’'=>1,'ï©“'=>1,'ï©”'=>1,'ï©•'=>1,'ï©–'=>1,'ï©—'=>1,'縉'=>1,'ï©™'=>1,'ï©š'=>1,'ï©›'=>1,'ï©œ'=>1,'ï©'=>1,'ï©ž'=>1,'ï©Ÿ'=>1,'ï© '=>1,'ï©¡'=>1,'ï©¢'=>1,'ï©£'=>1,'賓'=>1,'ï©¥'=>1,'辶'=>1,'逸'=>1,'難'=>1,'ï©©'=>1,'頻'=>1,'ï©°'=>1,'况'=>1,'全'=>1,'侀'=>1,'ï©´'=>1,'冀'=>1,'勇'=>1,'ï©·'=>1,'喝'=>1,'啕'=>1,'喙'=>1,'ï©»'=>1,'塚'=>1,'墳'=>1,'奄'=>1,'ï©¿'=>1,'婢'=>1,'ïª'=>1,'廒'=>1,'廙'=>1,'彩'=>1,'徭'=>1,'惘'=>1,'慎'=>1,'愈'=>1,'憎'=>1,'慠'=>1,'懲'=>1,'戴'=>1,'ïª'=>1,'搜'=>1,'ïª'=>1,'ïª'=>1,'晴'=>1,'朗'=>1,'望'=>1,'杖'=>1,'歹'=>1,'殺'=>1,'流'=>1,'滛'=>1,'滋'=>1,'漢'=>1,'瀞'=>1,'煮'=>1,'ïª'=>1,'爵'=>1,'犯'=>1,'猪'=>1,'瑱'=>1,'甆'=>1,'画'=>1,'瘝'=>1,'瘟'=>1,'益'=>1,'盛'=>1,'直'=>1,'睊'=>1,'着'=>1,'磌'=>1,'窱'=>1,'節'=>1,'类'=>1,'絛'=>1,'練'=>1,'缾'=>1,'者'=>1,'荒'=>1,'華'=>1,'蝹'=>1,'襁'=>1,'覆'=>1,'視'=>1,'調'=>1,'諸'=>1,'請'=>1,'謁'=>1,'諾'=>1,'諭'=>1,'謹'=>1,'ï«€'=>1,'ï«'=>1,'ï«‚'=>1,'遲'=>1,'ï«„'=>1,'ï«…'=>1,'陼'=>1,'難'=>1,'靖'=>1,'韛'=>1,'ï«Š'=>1,'ï«‹'=>1,'ï«Œ'=>1,'ï«'=>1,'ï«Ž'=>1,'ï«'=>1,'ï«'=>1,'ï«‘'=>1,'ï«’'=>1,'ï«“'=>1,'ï«”'=>1,'ï«•'=>1,'ï«–'=>1,'ï«—'=>1,'齃'=>1,'ï«™'=>1,'ff'=>1,'ï¬'=>1,'fl'=>1,'ffi'=>1,'ffl'=>1,'ſt'=>1,'st'=>1,'ﬓ'=>1,'ﬔ'=>1,'ﬕ'=>1,'ﬖ'=>1,'ﬗ'=>1,'ï¬'=>1,'ײַ'=>1,'ﬠ'=>1,'ﬡ'=>1,'ﬢ'=>1,'ﬣ'=>1,'ﬤ'=>1,'ﬥ'=>1,'ﬦ'=>1,'ﬧ'=>1,'ﬨ'=>1,'﬩'=>1,'שׁ'=>1,'שׂ'=>1,'שּׁ'=>1,'שּׂ'=>1,'אַ'=>1,'אָ'=>1,'אּ'=>1,'בּ'=>1,'גּ'=>1,'דּ'=>1,'הּ'=>1,'וּ'=>1,'זּ'=>1,'טּ'=>1,'יּ'=>1,'ךּ'=>1,'כּ'=>1,'לּ'=>1,'מּ'=>1,'ï­€'=>1,'ï­'=>1,'ï­ƒ'=>1,'ï­„'=>1,'ï­†'=>1,'ï­‡'=>1,'ï­ˆ'=>1,'ï­‰'=>1,'ï­Š'=>1,'ï­‹'=>1,'ï­Œ'=>1,'ï­'=>1,'ï­Ž'=>1,'ï­'=>1,'ï­'=>1,'ï­‘'=>1,'ï­’'=>1,'ï­“'=>1,'ï­”'=>1,'ï­•'=>1,'ï­–'=>1,'ï­—'=>1,'ï­˜'=>1,'ï­™'=>1,'ï­š'=>1,'ï­›'=>1,'ï­œ'=>1,'ï­'=>1,'ï­ž'=>1,'ï­Ÿ'=>1,'ï­ '=>1,'ï­¡'=>1,'ï­¢'=>1,'ï­£'=>1,'ï­¤'=>1,'ï­¥'=>1,'ï­¦'=>1,'ï­§'=>1,'ï­¨'=>1,'ï­©'=>1,'ï­ª'=>1,'ï­«'=>1,'ï­¬'=>1,'ï­­'=>1,'ï­®'=>1,'ï­¯'=>1,'ï­°'=>1,'ï­±'=>1,'ï­²'=>1,'ï­³'=>1,'ï­´'=>1,'ï­µ'=>1,'ï­¶'=>1,'ï­·'=>1,'ï­¸'=>1,'ï­¹'=>1,'ï­º'=>1,'ï­»'=>1,'ï­¼'=>1,'ï­½'=>1,'ï­¾'=>1,'ï­¿'=>1,'ﮀ'=>1,'ï®'=>1,'ﮂ'=>1,'ﮃ'=>1,'ﮄ'=>1,'ï®…'=>1,'ﮆ'=>1,'ﮇ'=>1,'ﮈ'=>1,'ﮉ'=>1,'ﮊ'=>1,'ﮋ'=>1,'ﮌ'=>1,'ï®'=>1,'ﮎ'=>1,'ï®'=>1,'ï®'=>1,'ﮑ'=>1,'ï®’'=>1,'ﮓ'=>1,'ï®”'=>1,'ﮕ'=>1,'ï®–'=>1,'ï®—'=>1,'ﮘ'=>1,'ï®™'=>1,'ﮚ'=>1,'ï®›'=>1,'ﮜ'=>1,'ï®'=>1,'ﮞ'=>1,'ﮟ'=>1,'ï® '=>1,'ﮡ'=>1,'ﮢ'=>1,'ﮣ'=>1,'ﮤ'=>1,'ﮥ'=>1,'ﮦ'=>1,'ﮧ'=>1,'ﮨ'=>1,'ﮩ'=>1,'ﮪ'=>1,'ﮫ'=>1,'ﮬ'=>1,'ï®­'=>1,'ï®®'=>1,'ﮯ'=>1,'ï®°'=>1,'ï®±'=>1,'ﯓ'=>1,'ﯔ'=>1,'ﯕ'=>1,'ﯖ'=>1,'ﯗ'=>1,'ﯘ'=>1,'ﯙ'=>1,'ﯚ'=>1,'ﯛ'=>1,'ﯜ'=>1,'ï¯'=>1,'ﯞ'=>1,'ﯟ'=>1,'ﯠ'=>1,'ﯡ'=>1,'ﯢ'=>1,'ﯣ'=>1,'ﯤ'=>1,'ﯥ'=>1,'ﯦ'=>1,'ﯧ'=>1,'ﯨ'=>1,'ﯩ'=>1,'ﯪ'=>1,'ﯫ'=>1,'ﯬ'=>1,'ﯭ'=>1,'ﯮ'=>1,'ﯯ'=>1,'ﯰ'=>1,'ﯱ'=>1,'ﯲ'=>1,'ﯳ'=>1,'ﯴ'=>1,'ﯵ'=>1,'ﯶ'=>1,'ﯷ'=>1,'ﯸ'=>1,'ﯹ'=>1,'ﯺ'=>1,'ﯻ'=>1,'ﯼ'=>1,'ﯽ'=>1,'ﯾ'=>1,'ﯿ'=>1,'ï°€'=>1,'ï°'=>1,'ï°‚'=>1,'ï°ƒ'=>1,'ï°„'=>1,'ï°…'=>1,'ï°†'=>1,'ï°‡'=>1,'ï°ˆ'=>1,'ï°‰'=>1,'ï°Š'=>1,'ï°‹'=>1,'ï°Œ'=>1,'ï°'=>1,'ï°Ž'=>1,'ï°'=>1,'ï°'=>1,'ï°‘'=>1,'ï°’'=>1,'ï°“'=>1,'ï°”'=>1,'ï°•'=>1,'ï°–'=>1,'ï°—'=>1,'ï°˜'=>1,'ï°™'=>1,'ï°š'=>1,'ï°›'=>1,'ï°œ'=>1,'ï°'=>1,'ï°ž'=>1,'ï°Ÿ'=>1,'ï° '=>1,'ï°¡'=>1,'ï°¢'=>1,'ï°£'=>1,'ï°¤'=>1,'ï°¥'=>1,'ï°¦'=>1,'ï°§'=>1,'ï°¨'=>1,'ï°©'=>1,'ï°ª'=>1,'ï°«'=>1,'ï°¬'=>1,'ï°­'=>1,'ï°®'=>1,'ï°¯'=>1,'ï°°'=>1,'ï°±'=>1,'ï°²'=>1,'ï°³'=>1,'ï°´'=>1,'ï°µ'=>1,'ï°¶'=>1,'ï°·'=>1,'ï°¸'=>1,'ï°¹'=>1,'ï°º'=>1,'ï°»'=>1,'ï°¼'=>1,'ï°½'=>1,'ï°¾'=>1,'ï°¿'=>1,'ï±€'=>1,'ï±'=>1,'ﱂ'=>1,'ﱃ'=>1,'ﱄ'=>1,'ï±…'=>1,'ﱆ'=>1,'ﱇ'=>1,'ﱈ'=>1,'ﱉ'=>1,'ﱊ'=>1,'ﱋ'=>1,'ﱌ'=>1,'ï±'=>1,'ﱎ'=>1,'ï±'=>1,'ï±'=>1,'ﱑ'=>1,'ï±’'=>1,'ﱓ'=>1,'ï±”'=>1,'ﱕ'=>1,'ï±–'=>1,'ï±—'=>1,'ﱘ'=>1,'ï±™'=>1,'ﱚ'=>1,'ï±›'=>1,'ﱜ'=>1,'ï±'=>1,'ﱞ'=>1,'ﱟ'=>1,'ï± '=>1,'ﱡ'=>1,'ï±¢'=>1,'ï±£'=>1,'ﱤ'=>1,'ï±¥'=>1,'ﱦ'=>1,'ﱧ'=>1,'ﱨ'=>1,'ﱩ'=>1,'ﱪ'=>1,'ﱫ'=>1,'ﱬ'=>1,'ï±­'=>1,'ï±®'=>1,'ﱯ'=>1,'ï±°'=>1,'ï±±'=>1,'ï±²'=>1,'ï±³'=>1,'ï±´'=>1,'ï±µ'=>1,'ﱶ'=>1,'ï±·'=>1,'ﱸ'=>1,'ï±¹'=>1,'ﱺ'=>1,'ï±»'=>1,'ï±¼'=>1,'ï±½'=>1,'ï±¾'=>1,'ﱿ'=>1,'ï²€'=>1,'ï²'=>1,'ﲂ'=>1,'ﲃ'=>1,'ﲄ'=>1,'ï²…'=>1,'ﲆ'=>1,'ﲇ'=>1,'ﲈ'=>1,'ﲉ'=>1,'ﲊ'=>1,'ﲋ'=>1,'ﲌ'=>1,'ï²'=>1,'ﲎ'=>1,'ï²'=>1,'ï²'=>1,'ﲑ'=>1,'ï²’'=>1,'ﲓ'=>1,'ï²”'=>1,'ﲕ'=>1,'ï²–'=>1,'ï²—'=>1,'ﲘ'=>1,'ï²™'=>1,'ﲚ'=>1,'ï²›'=>1,'ﲜ'=>1,'ï²'=>1,'ﲞ'=>1,'ﲟ'=>1,'ï² '=>1,'ﲡ'=>1,'ï²¢'=>1,'ï²£'=>1,'ﲤ'=>1,'ï²¥'=>1,'ﲦ'=>1,'ﲧ'=>1,'ﲨ'=>1,'ﲩ'=>1,'ﲪ'=>1,'ﲫ'=>1,'ﲬ'=>1,'ï²­'=>1,'ï²®'=>1,'ﲯ'=>1,'ï²°'=>1,'ï²±'=>1,'ï²²'=>1,'ï²³'=>1,'ï²´'=>1,'ï²µ'=>1,'ﲶ'=>1,'ï²·'=>1,'ﲸ'=>1,'ï²¹'=>1,'ﲺ'=>1,'ï²»'=>1,'ï²¼'=>1,'ï²½'=>1,'ï²¾'=>1,'ﲿ'=>1,'ï³€'=>1,'ï³'=>1,'ﳂ'=>1,'ﳃ'=>1,'ﳄ'=>1,'ï³…'=>1,'ﳆ'=>1,'ﳇ'=>1,'ﳈ'=>1,'ﳉ'=>1,'ﳊ'=>1,'ﳋ'=>1,'ﳌ'=>1,'ï³'=>1,'ﳎ'=>1,'ï³'=>1,'ï³'=>1,'ﳑ'=>1,'ï³’'=>1,'ﳓ'=>1,'ï³”'=>1,'ﳕ'=>1,'ï³–'=>1,'ï³—'=>1,'ﳘ'=>1,'ï³™'=>1,'ﳚ'=>1,'ï³›'=>1,'ﳜ'=>1,'ï³'=>1,'ﳞ'=>1,'ﳟ'=>1,'ï³ '=>1,'ﳡ'=>1,'ï³¢'=>1,'ï³£'=>1,'ﳤ'=>1,'ï³¥'=>1,'ﳦ'=>1,'ﳧ'=>1,'ﳨ'=>1,'ﳩ'=>1,'ﳪ'=>1,'ﳫ'=>1,'ﳬ'=>1,'ï³­'=>1,'ï³®'=>1,'ﳯ'=>1,'ï³°'=>1,'ï³±'=>1,'ï³²'=>1,'ï³³'=>1,'ï³´'=>1,'ï³µ'=>1,'ﳶ'=>1,'ï³·'=>1,'ﳸ'=>1,'ï³¹'=>1,'ﳺ'=>1,'ï³»'=>1,'ï³¼'=>1,'ï³½'=>1,'ï³¾'=>1,'ﳿ'=>1,'ï´€'=>1,'ï´'=>1,'ï´‚'=>1,'ï´ƒ'=>1,'ï´„'=>1,'ï´…'=>1,'ï´†'=>1,'ï´‡'=>1,'ï´ˆ'=>1,'ï´‰'=>1,'ï´Š'=>1,'ï´‹'=>1,'ï´Œ'=>1,'ï´'=>1,'ï´Ž'=>1,'ï´'=>1,'ï´'=>1,'ï´‘'=>1,'ï´’'=>1,'ï´“'=>1,'ï´”'=>1,'ï´•'=>1,'ï´–'=>1,'ï´—'=>1,'ï´˜'=>1,'ï´™'=>1,'ï´š'=>1,'ï´›'=>1,'ï´œ'=>1,'ï´'=>1,'ï´ž'=>1,'ï´Ÿ'=>1,'ï´ '=>1,'ï´¡'=>1,'ï´¢'=>1,'ï´£'=>1,'ï´¤'=>1,'ï´¥'=>1,'ï´¦'=>1,'ï´§'=>1,'ï´¨'=>1,'ï´©'=>1,'ï´ª'=>1,'ï´«'=>1,'ï´¬'=>1,'ï´­'=>1,'ï´®'=>1,'ï´¯'=>1,'ï´°'=>1,'ï´±'=>1,'ï´²'=>1,'ï´³'=>1,'ï´´'=>1,'ï´µ'=>1,'ï´¶'=>1,'ï´·'=>1,'ï´¸'=>1,'ï´¹'=>1,'ï´º'=>1,'ï´»'=>1,'ï´¼'=>1,'ï´½'=>1,'ïµ'=>1,'ﵑ'=>1,'ïµ’'=>1,'ﵓ'=>1,'ïµ”'=>1,'ﵕ'=>1,'ïµ–'=>1,'ïµ—'=>1,'ﵘ'=>1,'ïµ™'=>1,'ﵚ'=>1,'ïµ›'=>1,'ﵜ'=>1,'ïµ'=>1,'ﵞ'=>1,'ﵟ'=>1,'ïµ '=>1,'ﵡ'=>1,'ïµ¢'=>1,'ïµ£'=>1,'ﵤ'=>1,'ïµ¥'=>1,'ﵦ'=>1,'ﵧ'=>1,'ﵨ'=>1,'ﵩ'=>1,'ﵪ'=>1,'ﵫ'=>1,'ﵬ'=>1,'ïµ­'=>1,'ïµ®'=>1,'ﵯ'=>1,'ïµ°'=>1,'ïµ±'=>1,'ïµ²'=>1,'ïµ³'=>1,'ïµ´'=>1,'ïµµ'=>1,'ﵶ'=>1,'ïµ·'=>1,'ﵸ'=>1,'ïµ¹'=>1,'ﵺ'=>1,'ïµ»'=>1,'ïµ¼'=>1,'ïµ½'=>1,'ïµ¾'=>1,'ﵿ'=>1,'ﶀ'=>1,'ï¶'=>1,'ﶂ'=>1,'ﶃ'=>1,'ﶄ'=>1,'ﶅ'=>1,'ﶆ'=>1,'ﶇ'=>1,'ﶈ'=>1,'ﶉ'=>1,'ﶊ'=>1,'ﶋ'=>1,'ﶌ'=>1,'ï¶'=>1,'ﶎ'=>1,'ï¶'=>1,'ﶒ'=>1,'ﶓ'=>1,'ﶔ'=>1,'ﶕ'=>1,'ﶖ'=>1,'ﶗ'=>1,'ﶘ'=>1,'ﶙ'=>1,'ﶚ'=>1,'ﶛ'=>1,'ﶜ'=>1,'ï¶'=>1,'ﶞ'=>1,'ﶟ'=>1,'ﶠ'=>1,'ﶡ'=>1,'ﶢ'=>1,'ﶣ'=>1,'ﶤ'=>1,'ﶥ'=>1,'ﶦ'=>1,'ﶧ'=>1,'ﶨ'=>1,'ﶩ'=>1,'ﶪ'=>1,'ﶫ'=>1,'ﶬ'=>1,'ﶭ'=>1,'ﶮ'=>1,'ﶯ'=>1,'ﶰ'=>1,'ﶱ'=>1,'ﶲ'=>1,'ﶳ'=>1,'ﶴ'=>1,'ﶵ'=>1,'ﶶ'=>1,'ﶷ'=>1,'ﶸ'=>1,'ﶹ'=>1,'ﶺ'=>1,'ﶻ'=>1,'ﶼ'=>1,'ﶽ'=>1,'ﶾ'=>1,'ﶿ'=>1,'ï·€'=>1,'ï·'=>1,'ï·‚'=>1,'ï·ƒ'=>1,'ï·„'=>1,'ï·…'=>1,'ï·†'=>1,'ï·‡'=>1,'ï·°'=>1,'ï·±'=>1,'ï·²'=>1,'ï·³'=>1,'ï·´'=>1,'ï·µ'=>1,'ï·¶'=>1,'ï··'=>1,'ï·¸'=>1,'ï·¹'=>1,'ï·º'=>1,'ï·»'=>1,'ï·¼'=>1,'ï¸'=>1,'︑'=>1,'︒'=>1,'︓'=>1,'︔'=>1,'︕'=>1,'︖'=>1,'︗'=>1,'︘'=>1,'︙'=>1,'︰'=>1,'︱'=>1,'︲'=>1,'︳'=>1,'︴'=>1,'︵'=>1,'︶'=>1,'︷'=>1,'︸'=>1,'︹'=>1,'︺'=>1,'︻'=>1,'︼'=>1,'︽'=>1,'︾'=>1,'︿'=>1,'ï¹€'=>1,'ï¹'=>1,'﹂'=>1,'﹃'=>1,'﹄'=>1,'﹇'=>1,'﹈'=>1,'﹉'=>1,'﹊'=>1,'﹋'=>1,'﹌'=>1,'ï¹'=>1,'﹎'=>1,'ï¹'=>1,'ï¹'=>1,'﹑'=>1,'ï¹’'=>1,'ï¹”'=>1,'﹕'=>1,'ï¹–'=>1,'ï¹—'=>1,'﹘'=>1,'ï¹™'=>1,'﹚'=>1,'ï¹›'=>1,'﹜'=>1,'ï¹'=>1,'﹞'=>1,'﹟'=>1,'ï¹ '=>1,'﹡'=>1,'ï¹¢'=>1,'ï¹£'=>1,'﹤'=>1,'ï¹¥'=>1,'﹦'=>1,'﹨'=>1,'﹩'=>1,'﹪'=>1,'﹫'=>1,'ï¹°'=>1,'ï¹±'=>1,'ï¹²'=>1,'ï¹´'=>1,'ﹶ'=>1,'ï¹·'=>1,'ﹸ'=>1,'ï¹¹'=>1,'ﹺ'=>1,'ï¹»'=>1,'ï¹¼'=>1,'ï¹½'=>1,'ï¹¾'=>1,'ﹿ'=>1,'ﺀ'=>1,'ïº'=>1,'ﺂ'=>1,'ﺃ'=>1,'ﺄ'=>1,'ﺅ'=>1,'ﺆ'=>1,'ﺇ'=>1,'ﺈ'=>1,'ﺉ'=>1,'ﺊ'=>1,'ﺋ'=>1,'ﺌ'=>1,'ïº'=>1,'ﺎ'=>1,'ïº'=>1,'ïº'=>1,'ﺑ'=>1,'ﺒ'=>1,'ﺓ'=>1,'ﺔ'=>1,'ﺕ'=>1,'ﺖ'=>1,'ﺗ'=>1,'ﺘ'=>1,'ﺙ'=>1,'ﺚ'=>1,'ﺛ'=>1,'ﺜ'=>1,'ïº'=>1,'ﺞ'=>1,'ﺟ'=>1,'ﺠ'=>1,'ﺡ'=>1,'ﺢ'=>1,'ﺣ'=>1,'ﺤ'=>1,'ﺥ'=>1,'ﺦ'=>1,'ﺧ'=>1,'ﺨ'=>1,'ﺩ'=>1,'ﺪ'=>1,'ﺫ'=>1,'ﺬ'=>1,'ﺭ'=>1,'ﺮ'=>1,'ﺯ'=>1,'ﺰ'=>1,'ﺱ'=>1,'ﺲ'=>1,'ﺳ'=>1,'ﺴ'=>1,'ﺵ'=>1,'ﺶ'=>1,'ﺷ'=>1,'ﺸ'=>1,'ﺹ'=>1,'ﺺ'=>1,'ﺻ'=>1,'ﺼ'=>1,'ﺽ'=>1,'ﺾ'=>1,'ﺿ'=>1,'ﻀ'=>1,'ï»'=>1,'ﻂ'=>1,'ﻃ'=>1,'ﻄ'=>1,'ï»…'=>1,'ﻆ'=>1,'ﻇ'=>1,'ﻈ'=>1,'ﻉ'=>1,'ﻊ'=>1,'ﻋ'=>1,'ﻌ'=>1,'ï»'=>1,'ﻎ'=>1,'ï»'=>1,'ï»'=>1,'ﻑ'=>1,'ï»’'=>1,'ﻓ'=>1,'ï»”'=>1,'ﻕ'=>1,'ï»–'=>1,'ï»—'=>1,'ﻘ'=>1,'ï»™'=>1,'ﻚ'=>1,'ï»›'=>1,'ﻜ'=>1,'ï»'=>1,'ﻞ'=>1,'ﻟ'=>1,'ï» '=>1,'ﻡ'=>1,'ﻢ'=>1,'ﻣ'=>1,'ﻤ'=>1,'ﻥ'=>1,'ﻦ'=>1,'ﻧ'=>1,'ﻨ'=>1,'ﻩ'=>1,'ﻪ'=>1,'ﻫ'=>1,'ﻬ'=>1,'ï»­'=>1,'ï»®'=>1,'ﻯ'=>1,'ï»°'=>1,'ï»±'=>1,'ﻲ'=>1,'ﻳ'=>1,'ï»´'=>1,'ﻵ'=>1,'ﻶ'=>1,'ï»·'=>1,'ﻸ'=>1,'ﻹ'=>1,'ﻺ'=>1,'ï»»'=>1,'ﻼ'=>1,'ï¼'=>1,'"'=>1,'#'=>1,'$'=>1,'ï¼…'=>1,'&'=>1,'''=>1,'('=>1,')'=>1,'*'=>1,'+'=>1,','=>1,'ï¼'=>1,'.'=>1,'ï¼'=>1,'ï¼'=>1,'1'=>1,'ï¼’'=>1,'3'=>1,'ï¼”'=>1,'5'=>1,'ï¼–'=>1,'ï¼—'=>1,'8'=>1,'ï¼™'=>1,':'=>1,'ï¼›'=>1,'<'=>1,'ï¼'=>1,'>'=>1,'?'=>1,'ï¼ '=>1,'A'=>1,'ï¼¢'=>1,'ï¼£'=>1,'D'=>1,'ï¼¥'=>1,'F'=>1,'G'=>1,'H'=>1,'I'=>1,'J'=>1,'K'=>1,'L'=>1,'ï¼­'=>1,'ï¼®'=>1,'O'=>1,'ï¼°'=>1,'ï¼±'=>1,'ï¼²'=>1,'ï¼³'=>1,'ï¼´'=>1,'ï¼µ'=>1,'V'=>1,'ï¼·'=>1,'X'=>1,'ï¼¹'=>1,'Z'=>1,'ï¼»'=>1,'ï¼¼'=>1,'ï¼½'=>1,'ï¼¾'=>1,'_'=>1,'ï½€'=>1,'ï½'=>1,'b'=>1,'c'=>1,'d'=>1,'ï½…'=>1,'f'=>1,'g'=>1,'h'=>1,'i'=>1,'j'=>1,'k'=>1,'l'=>1,'ï½'=>1,'n'=>1,'ï½'=>1,'ï½'=>1,'q'=>1,'ï½’'=>1,'s'=>1,'ï½”'=>1,'u'=>1,'ï½–'=>1,'ï½—'=>1,'x'=>1,'ï½™'=>1,'z'=>1,'ï½›'=>1,'|'=>1,'ï½'=>1,'~'=>1,'⦅'=>1,'ï½ '=>1,'。'=>1,'ï½¢'=>1,'ï½£'=>1,'、'=>1,'ï½¥'=>1,'ヲ'=>1,'ァ'=>1,'ィ'=>1,'ゥ'=>1,'ェ'=>1,'ォ'=>1,'ャ'=>1,'ï½­'=>1,'ï½®'=>1,'ッ'=>1,'ï½°'=>1,'ï½±'=>1,'ï½²'=>1,'ï½³'=>1,'ï½´'=>1,'ï½µ'=>1,'カ'=>1,'ï½·'=>1,'ク'=>1,'ï½¹'=>1,'コ'=>1,'ï½»'=>1,'ï½¼'=>1,'ï½½'=>1,'ï½¾'=>1,'ソ'=>1,'ï¾€'=>1,'ï¾'=>1,'ツ'=>1,'テ'=>1,'ト'=>1,'ï¾…'=>1,'ニ'=>1,'ヌ'=>1,'ネ'=>1,'ノ'=>1,'ハ'=>1,'ヒ'=>1,'フ'=>1,'ï¾'=>1,'ホ'=>1,'ï¾'=>1,'ï¾'=>1,'ム'=>1,'ï¾’'=>1,'モ'=>1,'ï¾”'=>1,'ユ'=>1,'ï¾–'=>1,'ï¾—'=>1,'リ'=>1,'ï¾™'=>1,'レ'=>1,'ï¾›'=>1,'ワ'=>1,'ï¾'=>1,'゙'=>1,'゚'=>1,'ï¾ '=>1,'ᄀ'=>1,'ï¾¢'=>1,'ï¾£'=>1,'ᄂ'=>1,'ï¾¥'=>1,'ᆭ'=>1,'ᄃ'=>1,'ᄄ'=>1,'ᄅ'=>1,'ᆰ'=>1,'ᆱ'=>1,'ᆲ'=>1,'ï¾­'=>1,'ï¾®'=>1,'ᆵ'=>1,'ï¾°'=>1,'ï¾±'=>1,'ï¾²'=>1,'ï¾³'=>1,'ï¾´'=>1,'ï¾µ'=>1,'ᄊ'=>1,'ï¾·'=>1,'ᄌ'=>1,'ï¾¹'=>1,'ᄎ'=>1,'ï¾»'=>1,'ï¾¼'=>1,'ï¾½'=>1,'ï¾¾'=>1,'ï¿‚'=>1,'ᅢ'=>1,'ï¿„'=>1,'ï¿…'=>1,'ᅥ'=>1,'ᅦ'=>1,'ï¿Š'=>1,'ï¿‹'=>1,'ï¿Œ'=>1,'ï¿'=>1,'ï¿Ž'=>1,'ï¿'=>1,'ï¿’'=>1,'ï¿“'=>1,'ï¿”'=>1,'ï¿•'=>1,'ï¿–'=>1,'ï¿—'=>1,'ï¿š'=>1,'ï¿›'=>1,'ï¿œ'=>1,'ï¿ '=>1,'ï¿¡'=>1,'ï¿¢'=>1,'ï¿£'=>1,'¦'=>1,'ï¿¥'=>1,'₩'=>1,'│'=>1,'ï¿©'=>1,'↑'=>1,'ï¿«'=>1,'↓'=>1,'ï¿­'=>1,'ï¿®'=>1,'ð…ž'=>1,'ð…Ÿ'=>1,'ð… '=>1,'ð…¡'=>1,'ð…¢'=>1,'ð…£'=>1,'ð…¤'=>1,'ð†»'=>1,'ð†¼'=>1,'ð†½'=>1,'ð†¾'=>1,'ð†¿'=>1,'ð‡€'=>1,'ð€'=>1,'ð'=>1,'ð‚'=>1,'ðƒ'=>1,'ð„'=>1,'ð…'=>1,'ð†'=>1,'ð‡'=>1,'ðˆ'=>1,'ð‰'=>1,'ðŠ'=>1,'ð‹'=>1,'ðŒ'=>1,'ð'=>1,'ðŽ'=>1,'ð'=>1,'ð'=>1,'ð‘'=>1,'ð’'=>1,'ð“'=>1,'ð”'=>1,'ð•'=>1,'ð–'=>1,'ð—'=>1,'ð˜'=>1,'ð™'=>1,'ðš'=>1,'ð›'=>1,'ðœ'=>1,'ð'=>1,'ðž'=>1,'ðŸ'=>1,'ð '=>1,'ð¡'=>1,'ð¢'=>1,'ð£'=>1,'ð¤'=>1,'ð¥'=>1,'ð¦'=>1,'ð§'=>1,'ð¨'=>1,'ð©'=>1,'ðª'=>1,'ð«'=>1,'ð¬'=>1,'ð­'=>1,'ð®'=>1,'ð¯'=>1,'ð°'=>1,'ð±'=>1,'ð²'=>1,'ð³'=>1,'ð´'=>1,'ðµ'=>1,'ð¶'=>1,'ð·'=>1,'ð¸'=>1,'ð¹'=>1,'ðº'=>1,'ð»'=>1,'ð¼'=>1,'ð½'=>1,'ð¾'=>1,'ð¿'=>1,'ð‘€'=>1,'ð‘'=>1,'ð‘‚'=>1,'ð‘ƒ'=>1,'ð‘„'=>1,'ð‘…'=>1,'ð‘†'=>1,'ð‘‡'=>1,'ð‘ˆ'=>1,'ð‘‰'=>1,'ð‘Š'=>1,'ð‘‹'=>1,'ð‘Œ'=>1,'ð‘'=>1,'ð‘Ž'=>1,'ð‘'=>1,'ð‘'=>1,'ð‘‘'=>1,'ð‘’'=>1,'ð‘“'=>1,'ð‘”'=>1,'ð‘–'=>1,'ð‘—'=>1,'ð‘˜'=>1,'ð‘™'=>1,'ð‘š'=>1,'ð‘›'=>1,'ð‘œ'=>1,'ð‘'=>1,'ð‘ž'=>1,'ð‘Ÿ'=>1,'ð‘ '=>1,'ð‘¡'=>1,'ð‘¢'=>1,'ð‘£'=>1,'ð‘¤'=>1,'ð‘¥'=>1,'ð‘¦'=>1,'ð‘§'=>1,'ð‘¨'=>1,'ð‘©'=>1,'ð‘ª'=>1,'ð‘«'=>1,'ð‘¬'=>1,'ð‘­'=>1,'ð‘®'=>1,'ð‘¯'=>1,'ð‘°'=>1,'ð‘±'=>1,'ð‘²'=>1,'ð‘³'=>1,'ð‘´'=>1,'ð‘µ'=>1,'ð‘¶'=>1,'ð‘·'=>1,'ð‘¸'=>1,'ð‘¹'=>1,'ð‘º'=>1,'ð‘»'=>1,'ð‘¼'=>1,'ð‘½'=>1,'ð‘¾'=>1,'ð‘¿'=>1,'ð’€'=>1,'ð’'=>1,'ð’‚'=>1,'ð’ƒ'=>1,'ð’„'=>1,'ð’…'=>1,'ð’†'=>1,'ð’‡'=>1,'ð’ˆ'=>1,'ð’‰'=>1,'ð’Š'=>1,'ð’‹'=>1,'ð’Œ'=>1,'ð’'=>1,'ð’Ž'=>1,'ð’'=>1,'ð’'=>1,'ð’‘'=>1,'ð’’'=>1,'ð’“'=>1,'ð’”'=>1,'ð’•'=>1,'ð’–'=>1,'ð’—'=>1,'ð’˜'=>1,'ð’™'=>1,'ð’š'=>1,'ð’›'=>1,'ð’œ'=>1,'ð’ž'=>1,'ð’Ÿ'=>1,'ð’¢'=>1,'ð’¥'=>1,'ð’¦'=>1,'ð’©'=>1,'ð’ª'=>1,'ð’«'=>1,'ð’¬'=>1,'ð’®'=>1,'ð’¯'=>1,'ð’°'=>1,'ð’±'=>1,'ð’²'=>1,'ð’³'=>1,'ð’´'=>1,'ð’µ'=>1,'ð’¶'=>1,'ð’·'=>1,'ð’¸'=>1,'ð’¹'=>1,'ð’»'=>1,'ð’½'=>1,'ð’¾'=>1,'ð’¿'=>1,'ð“€'=>1,'ð“'=>1,'ð“‚'=>1,'ð“ƒ'=>1,'ð“…'=>1,'ð“†'=>1,'ð“‡'=>1,'ð“ˆ'=>1,'ð“‰'=>1,'ð“Š'=>1,'ð“‹'=>1,'ð“Œ'=>1,'ð“'=>1,'ð“Ž'=>1,'ð“'=>1,'ð“'=>1,'ð“‘'=>1,'ð“’'=>1,'ð““'=>1,'ð“”'=>1,'ð“•'=>1,'ð“–'=>1,'ð“—'=>1,'ð“˜'=>1,'ð“™'=>1,'ð“š'=>1,'ð“›'=>1,'ð“œ'=>1,'ð“'=>1,'ð“ž'=>1,'ð“Ÿ'=>1,'ð“ '=>1,'ð“¡'=>1,'ð“¢'=>1,'ð“£'=>1,'ð“¤'=>1,'ð“¥'=>1,'ð“¦'=>1,'ð“§'=>1,'ð“¨'=>1,'ð“©'=>1,'ð“ª'=>1,'ð“«'=>1,'ð“¬'=>1,'ð“­'=>1,'ð“®'=>1,'ð“¯'=>1,'ð“°'=>1,'ð“±'=>1,'ð“²'=>1,'ð“³'=>1,'ð“´'=>1,'ð“µ'=>1,'ð“¶'=>1,'ð“·'=>1,'ð“¸'=>1,'ð“¹'=>1,'ð“º'=>1,'ð“»'=>1,'ð“¼'=>1,'ð“½'=>1,'ð“¾'=>1,'ð“¿'=>1,'ð”€'=>1,'ð”'=>1,'ð”‚'=>1,'ð”ƒ'=>1,'ð”„'=>1,'ð”…'=>1,'ð”‡'=>1,'ð”ˆ'=>1,'ð”‰'=>1,'ð”Š'=>1,'ð”'=>1,'ð”Ž'=>1,'ð”'=>1,'ð”'=>1,'ð”‘'=>1,'ð”’'=>1,'ð”“'=>1,'ð””'=>1,'ð”–'=>1,'ð”—'=>1,'ð”˜'=>1,'ð”™'=>1,'ð”š'=>1,'ð”›'=>1,'ð”œ'=>1,'ð”ž'=>1,'ð”Ÿ'=>1,'ð” '=>1,'ð”¡'=>1,'ð”¢'=>1,'ð”£'=>1,'ð”¤'=>1,'ð”¥'=>1,'ð”¦'=>1,'ð”§'=>1,'ð”¨'=>1,'ð”©'=>1,'ð”ª'=>1,'ð”«'=>1,'ð”¬'=>1,'ð”­'=>1,'ð”®'=>1,'ð”¯'=>1,'ð”°'=>1,'ð”±'=>1,'ð”²'=>1,'ð”³'=>1,'ð”´'=>1,'ð”µ'=>1,'ð”¶'=>1,'ð”·'=>1,'ð”¸'=>1,'ð”¹'=>1,'ð”»'=>1,'ð”¼'=>1,'ð”½'=>1,'ð”¾'=>1,'ð•€'=>1,'ð•'=>1,'ð•‚'=>1,'ð•ƒ'=>1,'ð•„'=>1,'ð•†'=>1,'ð•Š'=>1,'ð•‹'=>1,'ð•Œ'=>1,'ð•'=>1,'ð•Ž'=>1,'ð•'=>1,'ð•'=>1,'ð•’'=>1,'ð•“'=>1,'ð•”'=>1,'ð••'=>1,'ð•–'=>1,'ð•—'=>1,'ð•˜'=>1,'ð•™'=>1,'ð•š'=>1,'ð•›'=>1,'ð•œ'=>1,'ð•'=>1,'ð•ž'=>1,'ð•Ÿ'=>1,'ð• '=>1,'ð•¡'=>1,'ð•¢'=>1,'ð•£'=>1,'ð•¤'=>1,'ð•¥'=>1,'ð•¦'=>1,'ð•§'=>1,'ð•¨'=>1,'ð•©'=>1,'ð•ª'=>1,'ð•«'=>1,'ð•¬'=>1,'ð•­'=>1,'ð•®'=>1,'ð•¯'=>1,'ð•°'=>1,'ð•±'=>1,'ð•²'=>1,'ð•³'=>1,'ð•´'=>1,'ð•µ'=>1,'ð•¶'=>1,'ð•·'=>1,'ð•¸'=>1,'ð•¹'=>1,'ð•º'=>1,'ð•»'=>1,'ð•¼'=>1,'ð•½'=>1,'ð•¾'=>1,'ð•¿'=>1,'ð–€'=>1,'ð–'=>1,'ð–‚'=>1,'ð–ƒ'=>1,'ð–„'=>1,'ð–…'=>1,'ð–†'=>1,'ð–‡'=>1,'ð–ˆ'=>1,'ð–‰'=>1,'ð–Š'=>1,'ð–‹'=>1,'ð–Œ'=>1,'ð–'=>1,'ð–Ž'=>1,'ð–'=>1,'ð–'=>1,'ð–‘'=>1,'ð–’'=>1,'ð–“'=>1,'ð–”'=>1,'ð–•'=>1,'ð––'=>1,'ð–—'=>1,'ð–˜'=>1,'ð–™'=>1,'ð–š'=>1,'ð–›'=>1,'ð–œ'=>1,'ð–'=>1,'ð–ž'=>1,'ð–Ÿ'=>1,'ð– '=>1,'ð–¡'=>1,'ð–¢'=>1,'ð–£'=>1,'ð–¤'=>1,'ð–¥'=>1,'ð–¦'=>1,'ð–§'=>1,'ð–¨'=>1,'ð–©'=>1,'ð–ª'=>1,'ð–«'=>1,'ð–¬'=>1,'ð–­'=>1,'ð–®'=>1,'ð–¯'=>1,'ð–°'=>1,'ð–±'=>1,'ð–²'=>1,'ð–³'=>1,'ð–´'=>1,'ð–µ'=>1,'ð–¶'=>1,'ð–·'=>1,'ð–¸'=>1,'ð–¹'=>1,'ð–º'=>1,'ð–»'=>1,'ð–¼'=>1,'ð–½'=>1,'ð–¾'=>1,'ð–¿'=>1,'ð—€'=>1,'ð—'=>1,'ð—‚'=>1,'ð—ƒ'=>1,'ð—„'=>1,'ð—…'=>1,'ð—†'=>1,'ð—‡'=>1,'ð—ˆ'=>1,'ð—‰'=>1,'ð—Š'=>1,'ð—‹'=>1,'ð—Œ'=>1,'ð—'=>1,'ð—Ž'=>1,'ð—'=>1,'ð—'=>1,'ð—‘'=>1,'ð—’'=>1,'ð—“'=>1,'ð—”'=>1,'ð—•'=>1,'ð—–'=>1,'ð——'=>1,'ð—˜'=>1,'ð—™'=>1,'ð—š'=>1,'ð—›'=>1,'ð—œ'=>1,'ð—'=>1,'ð—ž'=>1,'ð—Ÿ'=>1,'ð— '=>1,'ð—¡'=>1,'ð—¢'=>1,'ð—£'=>1,'ð—¤'=>1,'ð—¥'=>1,'ð—¦'=>1,'ð—§'=>1,'ð—¨'=>1,'ð—©'=>1,'ð—ª'=>1,'ð—«'=>1,'ð—¬'=>1,'ð—­'=>1,'ð—®'=>1,'ð—¯'=>1,'ð—°'=>1,'ð—±'=>1,'ð—²'=>1,'ð—³'=>1,'ð—´'=>1,'ð—µ'=>1,'ð—¶'=>1,'ð—·'=>1,'ð—¸'=>1,'ð—¹'=>1,'ð—º'=>1,'ð—»'=>1,'ð—¼'=>1,'ð—½'=>1,'ð—¾'=>1,'ð—¿'=>1,'ð˜€'=>1,'ð˜'=>1,'ð˜‚'=>1,'ð˜ƒ'=>1,'ð˜„'=>1,'ð˜…'=>1,'ð˜†'=>1,'ð˜‡'=>1,'ð˜ˆ'=>1,'ð˜‰'=>1,'ð˜Š'=>1,'ð˜‹'=>1,'ð˜Œ'=>1,'ð˜'=>1,'ð˜Ž'=>1,'ð˜'=>1,'ð˜'=>1,'ð˜‘'=>1,'ð˜’'=>1,'ð˜“'=>1,'ð˜”'=>1,'ð˜•'=>1,'ð˜–'=>1,'ð˜—'=>1,'ð˜˜'=>1,'ð˜™'=>1,'ð˜š'=>1,'ð˜›'=>1,'ð˜œ'=>1,'ð˜'=>1,'ð˜ž'=>1,'ð˜Ÿ'=>1,'ð˜ '=>1,'ð˜¡'=>1,'ð˜¢'=>1,'ð˜£'=>1,'ð˜¤'=>1,'ð˜¥'=>1,'ð˜¦'=>1,'ð˜§'=>1,'ð˜¨'=>1,'ð˜©'=>1,'ð˜ª'=>1,'ð˜«'=>1,'ð˜¬'=>1,'ð˜­'=>1,'ð˜®'=>1,'ð˜¯'=>1,'ð˜°'=>1,'ð˜±'=>1,'ð˜²'=>1,'ð˜³'=>1,'ð˜´'=>1,'ð˜µ'=>1,'ð˜¶'=>1,'ð˜·'=>1,'ð˜¸'=>1,'ð˜¹'=>1,'ð˜º'=>1,'ð˜»'=>1,'ð˜¼'=>1,'ð˜½'=>1,'ð˜¾'=>1,'ð˜¿'=>1,'ð™€'=>1,'ð™'=>1,'ð™‚'=>1,'ð™ƒ'=>1,'ð™„'=>1,'ð™…'=>1,'ð™†'=>1,'ð™‡'=>1,'ð™ˆ'=>1,'ð™‰'=>1,'ð™Š'=>1,'ð™‹'=>1,'ð™Œ'=>1,'ð™'=>1,'ð™Ž'=>1,'ð™'=>1,'ð™'=>1,'ð™‘'=>1,'ð™’'=>1,'ð™“'=>1,'ð™”'=>1,'ð™•'=>1,'ð™–'=>1,'ð™—'=>1,'ð™˜'=>1,'ð™™'=>1,'ð™š'=>1,'ð™›'=>1,'ð™œ'=>1,'ð™'=>1,'ð™ž'=>1,'ð™Ÿ'=>1,'ð™ '=>1,'ð™¡'=>1,'ð™¢'=>1,'ð™£'=>1,'ð™¤'=>1,'ð™¥'=>1,'ð™¦'=>1,'ð™§'=>1,'ð™¨'=>1,'ð™©'=>1,'ð™ª'=>1,'ð™«'=>1,'ð™¬'=>1,'ð™­'=>1,'ð™®'=>1,'ð™¯'=>1,'ð™°'=>1,'ð™±'=>1,'ð™²'=>1,'ð™³'=>1,'ð™´'=>1,'ð™µ'=>1,'ð™¶'=>1,'ð™·'=>1,'ð™¸'=>1,'ð™¹'=>1,'ð™º'=>1,'ð™»'=>1,'ð™¼'=>1,'ð™½'=>1,'ð™¾'=>1,'ð™¿'=>1,'ðš€'=>1,'ðš'=>1,'ðš‚'=>1,'ðšƒ'=>1,'ðš„'=>1,'ðš…'=>1,'ðš†'=>1,'ðš‡'=>1,'ðšˆ'=>1,'ðš‰'=>1,'ðšŠ'=>1,'ðš‹'=>1,'ðšŒ'=>1,'ðš'=>1,'ðšŽ'=>1,'ðš'=>1,'ðš'=>1,'ðš‘'=>1,'ðš’'=>1,'ðš“'=>1,'ðš”'=>1,'ðš•'=>1,'ðš–'=>1,'ðš—'=>1,'ðš˜'=>1,'ðš™'=>1,'ðšš'=>1,'ðš›'=>1,'ðšœ'=>1,'ðš'=>1,'ðšž'=>1,'ðšŸ'=>1,'ðš '=>1,'ðš¡'=>1,'ðš¢'=>1,'ðš£'=>1,'ðš¤'=>1,'ðš¥'=>1,'ðš¨'=>1,'ðš©'=>1,'ðšª'=>1,'ðš«'=>1,'ðš¬'=>1,'ðš­'=>1,'ðš®'=>1,'ðš¯'=>1,'ðš°'=>1,'ðš±'=>1,'ðš²'=>1,'ðš³'=>1,'ðš´'=>1,'ðšµ'=>1,'ðš¶'=>1,'ðš·'=>1,'ðš¸'=>1,'ðš¹'=>1,'ðšº'=>1,'ðš»'=>1,'ðš¼'=>1,'ðš½'=>1,'ðš¾'=>1,'ðš¿'=>1,'ð›€'=>1,'ð›'=>1,'ð›‚'=>1,'ð›ƒ'=>1,'ð›„'=>1,'ð›…'=>1,'ð›†'=>1,'ð›‡'=>1,'ð›ˆ'=>1,'ð›‰'=>1,'ð›Š'=>1,'ð›‹'=>1,'ð›Œ'=>1,'ð›'=>1,'ð›Ž'=>1,'ð›'=>1,'ð›'=>1,'ð›‘'=>1,'ð›’'=>1,'ð›“'=>1,'ð›”'=>1,'ð›•'=>1,'ð›–'=>1,'ð›—'=>1,'ð›˜'=>1,'ð›™'=>1,'ð›š'=>1,'ð››'=>1,'ð›œ'=>1,'ð›'=>1,'ð›ž'=>1,'ð›Ÿ'=>1,'ð› '=>1,'ð›¡'=>1,'ð›¢'=>1,'ð›£'=>1,'ð›¤'=>1,'ð›¥'=>1,'ð›¦'=>1,'ð›§'=>1,'ð›¨'=>1,'ð›©'=>1,'ð›ª'=>1,'ð›«'=>1,'ð›¬'=>1,'ð›­'=>1,'ð›®'=>1,'ð›¯'=>1,'ð›°'=>1,'ð›±'=>1,'ð›²'=>1,'ð›³'=>1,'ð›´'=>1,'ð›µ'=>1,'ð›¶'=>1,'ð›·'=>1,'ð›¸'=>1,'ð›¹'=>1,'ð›º'=>1,'ð›»'=>1,'ð›¼'=>1,'ð›½'=>1,'ð›¾'=>1,'ð›¿'=>1,'ðœ€'=>1,'ðœ'=>1,'ðœ‚'=>1,'ðœƒ'=>1,'ðœ„'=>1,'ðœ…'=>1,'ðœ†'=>1,'ðœ‡'=>1,'ðœˆ'=>1,'ðœ‰'=>1,'ðœŠ'=>1,'ðœ‹'=>1,'ðœŒ'=>1,'ðœ'=>1,'ðœŽ'=>1,'ðœ'=>1,'ðœ'=>1,'ðœ‘'=>1,'ðœ’'=>1,'ðœ“'=>1,'ðœ”'=>1,'ðœ•'=>1,'ðœ–'=>1,'ðœ—'=>1,'ðœ˜'=>1,'ðœ™'=>1,'ðœš'=>1,'ðœ›'=>1,'ðœœ'=>1,'ðœ'=>1,'ðœž'=>1,'ðœŸ'=>1,'ðœ '=>1,'ðœ¡'=>1,'ðœ¢'=>1,'ðœ£'=>1,'ðœ¤'=>1,'ðœ¥'=>1,'ðœ¦'=>1,'ðœ§'=>1,'ðœ¨'=>1,'ðœ©'=>1,'ðœª'=>1,'ðœ«'=>1,'ðœ¬'=>1,'ðœ­'=>1,'ðœ®'=>1,'ðœ¯'=>1,'ðœ°'=>1,'ðœ±'=>1,'ðœ²'=>1,'ðœ³'=>1,'ðœ´'=>1,'ðœµ'=>1,'ðœ¶'=>1,'ðœ·'=>1,'ðœ¸'=>1,'ðœ¹'=>1,'ðœº'=>1,'ðœ»'=>1,'ðœ¼'=>1,'ðœ½'=>1,'ðœ¾'=>1,'ðœ¿'=>1,'ð€'=>1,'ð'=>1,'ð‚'=>1,'ðƒ'=>1,'ð„'=>1,'ð…'=>1,'ð†'=>1,'ð‡'=>1,'ðˆ'=>1,'ð‰'=>1,'ðŠ'=>1,'ð‹'=>1,'ðŒ'=>1,'ð'=>1,'ðŽ'=>1,'ð'=>1,'ð'=>1,'ð‘'=>1,'ð’'=>1,'ð“'=>1,'ð”'=>1,'ð•'=>1,'ð–'=>1,'ð—'=>1,'ð˜'=>1,'ð™'=>1,'ðš'=>1,'ð›'=>1,'ðœ'=>1,'ð'=>1,'ðž'=>1,'ðŸ'=>1,'ð '=>1,'ð¡'=>1,'ð¢'=>1,'ð£'=>1,'ð¤'=>1,'ð¥'=>1,'ð¦'=>1,'ð§'=>1,'ð¨'=>1,'ð©'=>1,'ðª'=>1,'ð«'=>1,'ð¬'=>1,'ð­'=>1,'ð®'=>1,'ð¯'=>1,'ð°'=>1,'ð±'=>1,'ð²'=>1,'ð³'=>1,'ð´'=>1,'ðµ'=>1,'ð¶'=>1,'ð·'=>1,'ð¸'=>1,'ð¹'=>1,'ðº'=>1,'ð»'=>1,'ð¼'=>1,'ð½'=>1,'ð¾'=>1,'ð¿'=>1,'ðž€'=>1,'ðž'=>1,'ðž‚'=>1,'ðžƒ'=>1,'ðž„'=>1,'ðž…'=>1,'ðž†'=>1,'ðž‡'=>1,'ðžˆ'=>1,'ðž‰'=>1,'ðžŠ'=>1,'ðž‹'=>1,'ðžŒ'=>1,'ðž'=>1,'ðžŽ'=>1,'ðž'=>1,'ðž'=>1,'ðž‘'=>1,'ðž’'=>1,'ðž“'=>1,'ðž”'=>1,'ðž•'=>1,'ðž–'=>1,'ðž—'=>1,'ðž˜'=>1,'ðž™'=>1,'ðžš'=>1,'ðž›'=>1,'ðžœ'=>1,'ðž'=>1,'ðžž'=>1,'ðžŸ'=>1,'ðž '=>1,'ðž¡'=>1,'ðž¢'=>1,'ðž£'=>1,'ðž¤'=>1,'ðž¥'=>1,'ðž¦'=>1,'ðž§'=>1,'ðž¨'=>1,'ðž©'=>1,'ðžª'=>1,'ðž«'=>1,'ðž¬'=>1,'ðž­'=>1,'ðž®'=>1,'ðž¯'=>1,'ðž°'=>1,'ðž±'=>1,'ðž²'=>1,'ðž³'=>1,'ðž´'=>1,'ðžµ'=>1,'ðž¶'=>1,'ðž·'=>1,'ðž¸'=>1,'ðž¹'=>1,'ðžº'=>1,'ðž»'=>1,'ðž¼'=>1,'ðž½'=>1,'ðž¾'=>1,'ðž¿'=>1,'ðŸ€'=>1,'ðŸ'=>1,'ðŸ‚'=>1,'ðŸƒ'=>1,'ðŸ„'=>1,'ðŸ…'=>1,'ðŸ†'=>1,'ðŸ‡'=>1,'ðŸˆ'=>1,'ðŸ‰'=>1,'ðŸŠ'=>1,'ðŸ‹'=>1,'ðŸŽ'=>1,'ðŸ'=>1,'ðŸ'=>1,'ðŸ‘'=>1,'ðŸ’'=>1,'ðŸ“'=>1,'ðŸ”'=>1,'ðŸ•'=>1,'ðŸ–'=>1,'ðŸ—'=>1,'ðŸ˜'=>1,'ðŸ™'=>1,'ðŸš'=>1,'ðŸ›'=>1,'ðŸœ'=>1,'ðŸ'=>1,'ðŸž'=>1,'ðŸŸ'=>1,'ðŸ '=>1,'ðŸ¡'=>1,'ðŸ¢'=>1,'ðŸ£'=>1,'ðŸ¤'=>1,'ðŸ¥'=>1,'ðŸ¦'=>1,'ðŸ§'=>1,'ðŸ¨'=>1,'ðŸ©'=>1,'ðŸª'=>1,'ðŸ«'=>1,'ðŸ¬'=>1,'ðŸ­'=>1,'ðŸ®'=>1,'ðŸ¯'=>1,'ðŸ°'=>1,'ðŸ±'=>1,'ðŸ²'=>1,'ðŸ³'=>1,'ðŸ´'=>1,'ðŸµ'=>1,'ðŸ¶'=>1,'ðŸ·'=>1,'ðŸ¸'=>1,'ðŸ¹'=>1,'ðŸº'=>1,'ðŸ»'=>1,'ðŸ¼'=>1,'ðŸ½'=>1,'ðŸ¾'=>1,'ðŸ¿'=>1,'丽'=>1,'ð¯ '=>1,'乁'=>1,'𠄢'=>1,'你'=>1,'侮'=>1,'侻'=>1,'倂'=>1,'偺'=>1,'備'=>1,'僧'=>1,'像'=>1,'㒞'=>1,'ð¯ '=>1,'免'=>1,'ð¯ '=>1,'ð¯ '=>1,'具'=>1,'𠔜'=>1,'㒹'=>1,'內'=>1,'再'=>1,'𠕋'=>1,'冗'=>1,'冤'=>1,'仌'=>1,'冬'=>1,'况'=>1,'𩇟'=>1,'ð¯ '=>1,'刃'=>1,'㓟'=>1,'刻'=>1,'剆'=>1,'割'=>1,'剷'=>1,'㔕'=>1,'勇'=>1,'勉'=>1,'勤'=>1,'勺'=>1,'包'=>1,'匆'=>1,'北'=>1,'卉'=>1,'卑'=>1,'博'=>1,'即'=>1,'卽'=>1,'卿'=>1,'卿'=>1,'卿'=>1,'𠨬'=>1,'灰'=>1,'及'=>1,'叟'=>1,'𠭣'=>1,'叫'=>1,'叱'=>1,'吆'=>1,'咞'=>1,'吸'=>1,'呈'=>1,'周'=>1,'咢'=>1,'ð¯¡'=>1,'唐'=>1,'啓'=>1,'啣'=>1,'善'=>1,'善'=>1,'喙'=>1,'喫'=>1,'喳'=>1,'嗂'=>1,'圖'=>1,'嘆'=>1,'ð¯¡'=>1,'噑'=>1,'ð¯¡'=>1,'ð¯¡'=>1,'壮'=>1,'城'=>1,'埴'=>1,'堍'=>1,'型'=>1,'堲'=>1,'報'=>1,'墬'=>1,'𡓤'=>1,'売'=>1,'壷'=>1,'夆'=>1,'ð¯¡'=>1,'夢'=>1,'奢'=>1,'𡚨'=>1,'𡛪'=>1,'姬'=>1,'娛'=>1,'娧'=>1,'姘'=>1,'婦'=>1,'㛮'=>1,'㛼'=>1,'嬈'=>1,'嬾'=>1,'嬾'=>1,'𡧈'=>1,'寃'=>1,'寘'=>1,'寧'=>1,'寳'=>1,'𡬘'=>1,'寿'=>1,'将'=>1,'当'=>1,'尢'=>1,'㞁'=>1,'屠'=>1,'屮'=>1,'峀'=>1,'岍'=>1,'𡷤'=>1,'嵃'=>1,'𡷦'=>1,'嵮'=>1,'嵫'=>1,'嵼'=>1,'ð¯¢'=>1,'巢'=>1,'㠯'=>1,'巽'=>1,'帨'=>1,'帽'=>1,'幩'=>1,'㡢'=>1,'𢆃'=>1,'㡼'=>1,'庰'=>1,'庳'=>1,'ð¯¢'=>1,'廊'=>1,'ð¯¢'=>1,'ð¯¢'=>1,'𢌱'=>1,'𢌱'=>1,'舁'=>1,'弢'=>1,'弢'=>1,'㣇'=>1,'𣊸'=>1,'𦇚'=>1,'形'=>1,'彫'=>1,'㣣'=>1,'徚'=>1,'ð¯¢'=>1,'志'=>1,'忹'=>1,'悁'=>1,'㤺'=>1,'㤜'=>1,'悔'=>1,'𢛔'=>1,'惇'=>1,'慈'=>1,'慌'=>1,'慎'=>1,'慌'=>1,'慺'=>1,'憎'=>1,'憲'=>1,'憤'=>1,'憯'=>1,'懞'=>1,'懲'=>1,'懶'=>1,'成'=>1,'戛'=>1,'扝'=>1,'抱'=>1,'拔'=>1,'捐'=>1,'𢬌'=>1,'挽'=>1,'拼'=>1,'捨'=>1,'掃'=>1,'揤'=>1,'𢯱'=>1,'搢'=>1,'揅'=>1,'ð¯£'=>1,'㨮'=>1,'摩'=>1,'摾'=>1,'撝'=>1,'摷'=>1,'㩬'=>1,'敏'=>1,'敬'=>1,'𣀊'=>1,'旣'=>1,'書'=>1,'ð¯£'=>1,'㬙'=>1,'ð¯£'=>1,'ð¯£'=>1,'㫤'=>1,'冒'=>1,'冕'=>1,'最'=>1,'暜'=>1,'肭'=>1,'䏙'=>1,'朗'=>1,'望'=>1,'朡'=>1,'杞'=>1,'杓'=>1,'ð¯£'=>1,'㭉'=>1,'柺'=>1,'枅'=>1,'桒'=>1,'梅'=>1,'𣑭'=>1,'梎'=>1,'栟'=>1,'椔'=>1,'㮝'=>1,'楂'=>1,'榣'=>1,'槪'=>1,'檨'=>1,'𣚣'=>1,'櫛'=>1,'㰘'=>1,'次'=>1,'𣢧'=>1,'歔'=>1,'㱎'=>1,'歲'=>1,'殟'=>1,'殺'=>1,'殻'=>1,'𣪍'=>1,'𡴋'=>1,'𣫺'=>1,'汎'=>1,'𣲼'=>1,'沿'=>1,'泍'=>1,'汧'=>1,'洖'=>1,'派'=>1,'ð¯¤'=>1,'流'=>1,'浩'=>1,'浸'=>1,'涅'=>1,'𣴞'=>1,'洴'=>1,'港'=>1,'湮'=>1,'㴳'=>1,'滋'=>1,'滇'=>1,'ð¯¤'=>1,'淹'=>1,'ð¯¤'=>1,'ð¯¤'=>1,'𣾎'=>1,'濆'=>1,'瀹'=>1,'瀞'=>1,'瀛'=>1,'㶖'=>1,'灊'=>1,'災'=>1,'灷'=>1,'炭'=>1,'𠔥'=>1,'煅'=>1,'ð¯¤'=>1,'熜'=>1,'𤎫'=>1,'爨'=>1,'爵'=>1,'牐'=>1,'𤘈'=>1,'犀'=>1,'犕'=>1,'𤜵'=>1,'𤠔'=>1,'獺'=>1,'王'=>1,'㺬'=>1,'玥'=>1,'㺸'=>1,'㺸'=>1,'瑇'=>1,'瑜'=>1,'瑱'=>1,'璅'=>1,'瓊'=>1,'㼛'=>1,'甤'=>1,'𤰶'=>1,'甾'=>1,'𤲒'=>1,'異'=>1,'𢆟'=>1,'瘐'=>1,'𤾡'=>1,'𤾸'=>1,'𥁄'=>1,'㿼'=>1,'䀈'=>1,'直'=>1,'ð¯¥'=>1,'𥃲'=>1,'𥄙'=>1,'𥄳'=>1,'眞'=>1,'真'=>1,'真'=>1,'睊'=>1,'䀹'=>1,'瞋'=>1,'䁆'=>1,'䂖'=>1,'ð¯¥'=>1,'硎'=>1,'ð¯¥'=>1,'ð¯¥'=>1,'䃣'=>1,'𥘦'=>1,'祖'=>1,'𥚚'=>1,'𥛅'=>1,'福'=>1,'秫'=>1,'䄯'=>1,'穀'=>1,'穊'=>1,'穏'=>1,'𥥼'=>1,'ð¯¥'=>1,'𥪧'=>1,'竮'=>1,'䈂'=>1,'𥮫'=>1,'篆'=>1,'築'=>1,'䈧'=>1,'𥲀'=>1,'糒'=>1,'䊠'=>1,'糨'=>1,'糣'=>1,'紀'=>1,'𥾆'=>1,'絣'=>1,'䌁'=>1,'緇'=>1,'縂'=>1,'繅'=>1,'䌴'=>1,'𦈨'=>1,'𦉇'=>1,'䍙'=>1,'𦋙'=>1,'罺'=>1,'𦌾'=>1,'羕'=>1,'翺'=>1,'者'=>1,'𦓚'=>1,'𦔣'=>1,'聠'=>1,'𦖨'=>1,'聰'=>1,'𣍟'=>1,'ð¯¦'=>1,'育'=>1,'脃'=>1,'䐋'=>1,'脾'=>1,'媵'=>1,'𦞧'=>1,'𦞵'=>1,'𣎓'=>1,'𣎜'=>1,'舁'=>1,'舄'=>1,'ð¯¦'=>1,'䑫'=>1,'ð¯¦'=>1,'ð¯¦'=>1,'芝'=>1,'劳'=>1,'花'=>1,'芳'=>1,'芽'=>1,'苦'=>1,'𦬼'=>1,'若'=>1,'茝'=>1,'荣'=>1,'莭'=>1,'茣'=>1,'ð¯¦'=>1,'菧'=>1,'著'=>1,'荓'=>1,'菊'=>1,'菌'=>1,'菜'=>1,'𦰶'=>1,'𦵫'=>1,'𦳕'=>1,'䔫'=>1,'蓱'=>1,'蓳'=>1,'蔖'=>1,'𧏊'=>1,'蕤'=>1,'𦼬'=>1,'䕝'=>1,'䕡'=>1,'𦾱'=>1,'𧃒'=>1,'䕫'=>1,'虐'=>1,'虜'=>1,'虧'=>1,'虩'=>1,'蚩'=>1,'蚈'=>1,'蜎'=>1,'蛢'=>1,'蝹'=>1,'蜨'=>1,'蝫'=>1,'螆'=>1,'䗗'=>1,'蟡'=>1,'ð¯§'=>1,'䗹'=>1,'衠'=>1,'衣'=>1,'𧙧'=>1,'裗'=>1,'裞'=>1,'䘵'=>1,'裺'=>1,'㒻'=>1,'𧢮'=>1,'𧥦'=>1,'ð¯§'=>1,'䛇'=>1,'ð¯§'=>1,'ð¯§'=>1,'變'=>1,'豕'=>1,'𧲨'=>1,'貫'=>1,'賁'=>1,'贛'=>1,'起'=>1,'𧼯'=>1,'𠠄'=>1,'跋'=>1,'趼'=>1,'跰'=>1,'ð¯§'=>1,'軔'=>1,'輸'=>1,'𨗒'=>1,'𨗭'=>1,'邔'=>1,'郱'=>1,'鄑'=>1,'𨜮'=>1,'鄛'=>1,'鈸'=>1,'鋗'=>1,'鋘'=>1,'鉼'=>1,'鏹'=>1,'鐕'=>1,'𨯺'=>1,'開'=>1,'䦕'=>1,'閷'=>1,'𨵷'=>1,'䧦'=>1,'雃'=>1,'嶲'=>1,'霣'=>1,'𩅅'=>1,'𩈚'=>1,'䩮'=>1,'䩶'=>1,'韠'=>1,'𩐊'=>1,'䪲'=>1,'𩒖'=>1,'頋'=>1,'頋'=>1,'頩'=>1,'ð¯¨'=>1,'飢'=>1,'䬳'=>1,'餩'=>1,'馧'=>1,'駂'=>1,'駾'=>1,'䯎'=>1,'𩬰'=>1,'鬒'=>1,'鱀'=>1,'鳽'=>1,'ð¯¨'=>1,'䳭'=>1,'ð¯¨'=>1,'ð¯¨'=>1,'䳸'=>1,'𪄅'=>1,'𪈎'=>1,'𪊑'=>1,'麻'=>1,'䵖'=>1,'黹'=>1,'黾'=>1,'鼅'=>1,'鼏'=>1,'鼖'=>1,'鼻'=>1,'ð¯¨'=>1,'Ì€'=>0,'Ì'=>0,'Ì‚'=>0,'̃'=>0,'Ì„'=>0,'̆'=>0,'̇'=>0,'̈'=>0,'̉'=>0,'ÌŠ'=>0,'Ì‹'=>0,'ÌŒ'=>0,'Ì'=>0,'Ì‘'=>0,'Ì“'=>0,'Ì”'=>0,'Ì›'=>0,'Ì£'=>0,'̤'=>0,'Ì¥'=>0,'̦'=>0,'̧'=>0,'̨'=>0,'Ì­'=>0,'Ì®'=>0,'Ì°'=>0,'̱'=>0,'̸'=>0,'Í‚'=>0,'Í…'=>0,'Ù“'=>0,'Ù”'=>0,'Ù•'=>0,'़'=>0,'া'=>0,'ৗ'=>0,'ା'=>0,'à­–'=>0,'à­—'=>0,'ா'=>0,'ௗ'=>0,'à±–'=>0,'ೂ'=>0,'ೕ'=>0,'à³–'=>0,'à´¾'=>0,'ൗ'=>0,'à·Š'=>0,'à·'=>0,'à·Ÿ'=>0,'ီ'=>0,'á…¡'=>0,'á…¢'=>0,'á…£'=>0,'á…¤'=>0,'á…¥'=>0,'á…¦'=>0,'á…§'=>0,'á…¨'=>0,'á…©'=>0,'á…ª'=>0,'á…«'=>0,'á…¬'=>0,'á…­'=>0,'á…®'=>0,'á…¯'=>0,'á…°'=>0,'á…±'=>0,'á…²'=>0,'á…³'=>0,'á…´'=>0,'á…µ'=>0,'ᆨ'=>0,'ᆩ'=>0,'ᆪ'=>0,'ᆫ'=>0,'ᆬ'=>0,'ᆭ'=>0,'ᆮ'=>0,'ᆯ'=>0,'ᆰ'=>0,'ᆱ'=>0,'ᆲ'=>0,'ᆳ'=>0,'ᆴ'=>0,'ᆵ'=>0,'ᆶ'=>0,'ᆷ'=>0,'ᆸ'=>0,'ᆹ'=>0,'ᆺ'=>0,'ᆻ'=>0,'ᆼ'=>0,'ᆽ'=>0,'ᆾ'=>0,'ᆿ'=>0,'ᇀ'=>0,'á‡'=>0,'ᇂ'=>0,'ᬵ'=>0,'ã‚™'=>0,'ã‚š'=>0); \ No newline at end of file
diff --git a/phpBB/includes/utf/data/utf_normalizer_common.php b/phpBB/includes/utf/data/utf_normalizer_common.php
new file mode 100644
index 0000000000..befc17d410
--- /dev/null
+++ b/phpBB/includes/utf/data/utf_normalizer_common.php
@@ -0,0 +1,4 @@
+<?php
+$GLOBALS['utf_jamo_index']=array('á„€'=>44032,'á„'=>44620,'á„‚'=>45208,'ᄃ'=>45796,'á„„'=>46384,'á„…'=>46972,'ᄆ'=>47560,'ᄇ'=>48148,'ᄈ'=>48736,'ᄉ'=>49324,'á„Š'=>49912,'á„‹'=>50500,'á„Œ'=>51088,'á„'=>51676,'á„Ž'=>52264,'á„'=>52852,'á„'=>53440,'á„‘'=>54028,'á„’'=>54616,'á…¡'=>0,'á…¢'=>28,'á…£'=>56,'á…¤'=>84,'á…¥'=>112,'á…¦'=>140,'á…§'=>168,'á…¨'=>196,'á…©'=>224,'á…ª'=>252,'á…«'=>280,'á…¬'=>308,'á…­'=>336,'á…®'=>364,'á…¯'=>392,'á…°'=>420,'á…±'=>448,'á…²'=>476,'á…³'=>504,'á…´'=>532,'á…µ'=>560,'ᆧ'=>0,'ᆨ'=>1,'ᆩ'=>2,'ᆪ'=>3,'ᆫ'=>4,'ᆬ'=>5,'ᆭ'=>6,'ᆮ'=>7,'ᆯ'=>8,'ᆰ'=>9,'ᆱ'=>10,'ᆲ'=>11,'ᆳ'=>12,'ᆴ'=>13,'ᆵ'=>14,'ᆶ'=>15,'ᆷ'=>16,'ᆸ'=>17,'ᆹ'=>18,'ᆺ'=>19,'ᆻ'=>20,'ᆼ'=>21,'ᆽ'=>22,'ᆾ'=>23,'ᆿ'=>24,'ᇀ'=>25,'á‡'=>26,'ᇂ'=>27);
+$GLOBALS['utf_jamo_type']=array('á„€'=>0,'á„'=>0,'á„‚'=>0,'ᄃ'=>0,'á„„'=>0,'á„…'=>0,'ᄆ'=>0,'ᄇ'=>0,'ᄈ'=>0,'ᄉ'=>0,'á„Š'=>0,'á„‹'=>0,'á„Œ'=>0,'á„'=>0,'á„Ž'=>0,'á„'=>0,'á„'=>0,'á„‘'=>0,'á„’'=>0,'á…¡'=>1,'á…¢'=>1,'á…£'=>1,'á…¤'=>1,'á…¥'=>1,'á…¦'=>1,'á…§'=>1,'á…¨'=>1,'á…©'=>1,'á…ª'=>1,'á…«'=>1,'á…¬'=>1,'á…­'=>1,'á…®'=>1,'á…¯'=>1,'á…°'=>1,'á…±'=>1,'á…²'=>1,'á…³'=>1,'á…´'=>1,'á…µ'=>1,'ᆧ'=>2,'ᆨ'=>2,'ᆩ'=>2,'ᆪ'=>2,'ᆫ'=>2,'ᆬ'=>2,'ᆭ'=>2,'ᆮ'=>2,'ᆯ'=>2,'ᆰ'=>2,'ᆱ'=>2,'ᆲ'=>2,'ᆳ'=>2,'ᆴ'=>2,'ᆵ'=>2,'ᆶ'=>2,'ᆷ'=>2,'ᆸ'=>2,'ᆹ'=>2,'ᆺ'=>2,'ᆻ'=>2,'ᆼ'=>2,'ᆽ'=>2,'ᆾ'=>2,'ᆿ'=>2,'ᇀ'=>2,'á‡'=>2,'ᇂ'=>2);
+$GLOBALS['utf_combining_class']=array('Ì€'=>230,'Ì'=>230,'Ì‚'=>230,'̃'=>230,'Ì„'=>230,'Ì…'=>230,'̆'=>230,'̇'=>230,'̈'=>230,'̉'=>230,'ÌŠ'=>230,'Ì‹'=>230,'ÌŒ'=>230,'Ì'=>230,'ÌŽ'=>230,'Ì'=>230,'Ì'=>230,'Ì‘'=>230,'Ì’'=>230,'Ì“'=>230,'Ì”'=>230,'Ì•'=>232,'Ì–'=>220,'Ì—'=>220,'̘'=>220,'Ì™'=>220,'Ìš'=>232,'Ì›'=>216,'Ìœ'=>220,'Ì'=>220,'Ìž'=>220,'ÌŸ'=>220,'Ì '=>220,'Ì¡'=>202,'Ì¢'=>202,'Ì£'=>220,'̤'=>220,'Ì¥'=>220,'̦'=>220,'̧'=>202,'̨'=>202,'Ì©'=>220,'̪'=>220,'Ì«'=>220,'̬'=>220,'Ì­'=>220,'Ì®'=>220,'̯'=>220,'Ì°'=>220,'̱'=>220,'̲'=>220,'̳'=>220,'Ì´'=>1,'̵'=>1,'̶'=>1,'Ì·'=>1,'̸'=>1,'̹'=>220,'̺'=>220,'Ì»'=>220,'̼'=>220,'̽'=>230,'̾'=>230,'Ì¿'=>230,'Í€'=>230,'Í'=>230,'Í‚'=>230,'̓'=>230,'Í„'=>230,'Í…'=>240,'͆'=>230,'͇'=>220,'͈'=>220,'͉'=>220,'ÍŠ'=>230,'Í‹'=>230,'ÍŒ'=>230,'Í'=>220,'ÍŽ'=>220,'Í'=>230,'Í‘'=>230,'Í’'=>230,'Í“'=>220,'Í”'=>220,'Í•'=>220,'Í–'=>220,'Í—'=>230,'͘'=>232,'Í™'=>220,'Íš'=>220,'Í›'=>230,'Íœ'=>233,'Í'=>234,'Íž'=>234,'ÍŸ'=>233,'Í '=>234,'Í¡'=>234,'Í¢'=>233,'Í£'=>230,'ͤ'=>230,'Í¥'=>230,'ͦ'=>230,'ͧ'=>230,'ͨ'=>230,'Í©'=>230,'ͪ'=>230,'Í«'=>230,'ͬ'=>230,'Í­'=>230,'Í®'=>230,'ͯ'=>230,'Òƒ'=>230,'Ò„'=>230,'Ò…'=>230,'Ò†'=>230,'Ö‘'=>220,'Ö’'=>230,'Ö“'=>230,'Ö”'=>230,'Ö•'=>230,'Ö–'=>220,'Ö—'=>230,'Ö˜'=>230,'Ö™'=>230,'Öš'=>222,'Ö›'=>220,'Öœ'=>230,'Ö'=>230,'Öž'=>230,'ÖŸ'=>230,'Ö '=>230,'Ö¡'=>230,'Ö¢'=>220,'Ö£'=>220,'Ö¤'=>220,'Ö¥'=>220,'Ö¦'=>220,'Ö§'=>220,'Ö¨'=>230,'Ö©'=>230,'Öª'=>220,'Ö«'=>230,'Ö¬'=>230,'Ö­'=>222,'Ö®'=>228,'Ö¯'=>230,'Ö°'=>10,'Ö±'=>11,'Ö²'=>12,'Ö³'=>13,'Ö´'=>14,'Öµ'=>15,'Ö¶'=>16,'Ö·'=>17,'Ö¸'=>18,'Ö¹'=>19,'Öº'=>19,'Ö»'=>20,'Ö¼'=>21,'Ö½'=>22,'Ö¿'=>23,'×'=>24,'ׂ'=>25,'ׄ'=>230,'×…'=>220,'ׇ'=>18,'Ø'=>230,'Ø‘'=>230,'Ø’'=>230,'Ø“'=>230,'Ø”'=>230,'Ø•'=>230,'Ù‹'=>27,'ÙŒ'=>28,'Ù'=>29,'ÙŽ'=>30,'Ù'=>31,'Ù'=>32,'Ù‘'=>33,'Ù’'=>34,'Ù“'=>230,'Ù”'=>230,'Ù•'=>220,'Ù–'=>220,'Ù—'=>230,'Ù˜'=>230,'Ù™'=>230,'Ùš'=>230,'Ù›'=>230,'Ùœ'=>220,'Ù'=>230,'Ùž'=>230,'Ù°'=>35,'Û–'=>230,'Û—'=>230,'Û˜'=>230,'Û™'=>230,'Ûš'=>230,'Û›'=>230,'Ûœ'=>230,'ÛŸ'=>230,'Û '=>230,'Û¡'=>230,'Û¢'=>230,'Û£'=>220,'Û¤'=>230,'Û§'=>230,'Û¨'=>230,'Ûª'=>220,'Û«'=>230,'Û¬'=>230,'Û­'=>220,'Ü‘'=>36,'Ü°'=>230,'ܱ'=>220,'ܲ'=>230,'ܳ'=>230,'Ü´'=>220,'ܵ'=>230,'ܶ'=>230,'Ü·'=>220,'ܸ'=>220,'ܹ'=>220,'ܺ'=>230,'Ü»'=>220,'ܼ'=>220,'ܽ'=>230,'ܾ'=>220,'Ü¿'=>230,'Ý€'=>230,'Ý'=>230,'Ý‚'=>220,'݃'=>230,'Ý„'=>220,'Ý…'=>230,'݆'=>220,'݇'=>230,'݈'=>220,'݉'=>230,'ÝŠ'=>230,'ß«'=>230,'߬'=>230,'ß­'=>230,'ß®'=>230,'߯'=>230,'ß°'=>230,'ß±'=>230,'ß²'=>220,'ß³'=>230,'़'=>7,'à¥'=>9,'॑'=>230,'॒'=>220,'॓'=>230,'॔'=>230,'়'=>7,'à§'=>9,'਼'=>7,'à©'=>9,'઼'=>7,'à«'=>9,'଼'=>7,'à­'=>9,'à¯'=>9,'à±'=>9,'ౕ'=>84,'à±–'=>91,'಼'=>7,'à³'=>9,'àµ'=>9,'à·Š'=>9,'ุ'=>103,'ู'=>103,'ฺ'=>9,'่'=>107,'้'=>107,'๊'=>107,'๋'=>107,'ຸ'=>118,'ູ'=>118,'່'=>122,'້'=>122,'໊'=>122,'໋'=>122,'༘'=>220,'༙'=>220,'༵'=>220,'༷'=>220,'༹'=>216,'ཱ'=>129,'ི'=>130,'ུ'=>132,'ེ'=>130,'ཻ'=>130,'ོ'=>130,'ཽ'=>130,'ྀ'=>130,'ྂ'=>230,'ྃ'=>230,'྄'=>9,'྆'=>230,'྇'=>230,'࿆'=>220,'့'=>7,'္'=>9,'áŸ'=>230,'᜔'=>9,'᜴'=>9,'្'=>9,'áŸ'=>230,'ᢩ'=>228,'᤹'=>222,'᤺'=>230,'᤻'=>220,'ᨗ'=>230,'ᨘ'=>220,'᬴'=>7,'á­„'=>9,'á­«'=>230,'á­¬'=>220,'á­­'=>230,'á­®'=>230,'á­¯'=>230,'á­°'=>230,'á­±'=>230,'á­²'=>230,'á­³'=>230,'á·€'=>230,'á·'=>230,'á·‚'=>220,'á·ƒ'=>230,'á·„'=>230,'á·…'=>230,'á·†'=>230,'á·‡'=>230,'á·ˆ'=>230,'á·‰'=>230,'á·Š'=>220,'á·¾'=>230,'á·¿'=>220,'âƒ'=>230,'⃑'=>230,'⃒'=>1,'⃓'=>1,'⃔'=>230,'⃕'=>230,'⃖'=>230,'⃗'=>230,'⃘'=>1,'⃙'=>1,'⃚'=>1,'⃛'=>230,'⃜'=>230,'⃡'=>230,'⃥'=>1,'⃦'=>1,'⃧'=>230,'⃨'=>220,'⃩'=>230,'⃪'=>1,'⃫'=>1,'⃬'=>220,'⃭'=>220,'⃮'=>220,'⃯'=>220,'〪'=>218,'〫'=>228,'〬'=>232,'〭'=>222,'〮'=>224,'〯'=>224,'ã‚™'=>8,'ã‚š'=>8,'ê †'=>9,'ﬞ'=>26,'︠'=>230,'︡'=>230,'︢'=>230,'︣'=>230,'ð¨'=>220,'ð¨'=>230,'ð¨¸'=>230,'ð¨¹'=>1,'ð¨º'=>220,'ð¨¿'=>9,'ð…¥'=>216,'ð…¦'=>216,'ð…§'=>1,'ð…¨'=>1,'ð…©'=>1,'ð…­'=>226,'ð…®'=>216,'ð…¯'=>216,'ð…°'=>216,'ð…±'=>216,'ð…²'=>216,'ð…»'=>220,'ð…¼'=>220,'ð…½'=>220,'ð…¾'=>220,'ð…¿'=>220,'ð†€'=>220,'ð†'=>220,'ð†‚'=>220,'ð†…'=>230,'ð††'=>230,'ð†‡'=>230,'ð†ˆ'=>230,'ð†‰'=>230,'ð†Š'=>220,'ð†‹'=>220,'ð†ª'=>230,'ð†«'=>230,'ð†¬'=>230,'ð†­'=>230,'ð‰‚'=>230,'ð‰ƒ'=>230,'ð‰„'=>230); \ No newline at end of file
diff --git a/phpBB/includes/utf/utf_normalizer.php b/phpBB/includes/utf/utf_normalizer.php
new file mode 100644
index 0000000000..a77952499a
--- /dev/null
+++ b/phpBB/includes/utf/utf_normalizer.php
@@ -0,0 +1,1516 @@
+<?php
+/**
+*
+* @package utf
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Some Unicode characters encoded in UTF-8
+*
+* Preserved for compatibility
+*/
+define('UTF8_REPLACEMENT', "\xEF\xBF\xBD");
+define('UTF8_MAX', "\xF4\x8F\xBF\xBF");
+define('UTF8_FFFE', "\xEF\xBF\xBE");
+define('UTF8_FFFF', "\xEF\xBF\xBF");
+define('UTF8_SURROGATE_FIRST', "\xED\xA0\x80");
+define('UTF8_SURROGATE_LAST', "\xED\xBF\xBF");
+define('UTF8_HANGUL_FIRST', "\xEA\xB0\x80");
+define('UTF8_HANGUL_LAST', "\xED\x9E\xA3");
+
+define('UTF8_CJK_FIRST', "\xE4\xB8\x80");
+define('UTF8_CJK_LAST', "\xE9\xBE\xBB");
+define('UTF8_CJK_B_FIRST', "\xF0\xA0\x80\x80");
+define('UTF8_CJK_B_LAST', "\xF0\xAA\x9B\x96");
+
+// Unset global variables
+unset($GLOBALS['utf_jamo_index'], $GLOBALS['utf_jamo_type'], $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_combining_class'], $GLOBALS['utf_canonical_comp'], $GLOBALS['utf_canonical_decomp'], $GLOBALS['utf_nfkc_qc'], $GLOBALS['utf_compatibility_decomp']);
+
+// NFC_QC and NFKC_QC values
+define('UNICODE_QC_MAYBE', 0);
+define('UNICODE_QC_NO', 1);
+
+// Contains all the ASCII characters appearing in UTF-8, sorted by frequency
+define('UTF8_ASCII_RANGE', "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F");
+
+// Contains all the tail bytes that can appear in the composition of a UTF-8 char
+define('UTF8_TRAILING_BYTES', "\xA9\xA0\xA8\x80\xAA\x99\xA7\xBB\xAB\x89\x94\x82\xB4\xA2\xAE\x83\xB0\xB9\xB8\x93\xAF\xBC\xB3\x81\xA4\xB2\x9C\xA1\xB5\xBE\xBD\xBA\x98\xAD\xB1\x84\x95\xA6\xB6\x88\x8D\x90\xB7\xBF\x92\x85\xA5\x97\x8C\x86\xA3\x8E\x9F\x8F\x87\x91\x9D\xAC\x9E\x8B\x96\x9B\x8A\x9A");
+
+// Constants used by the Hangul [de]composition algorithms
+define('UNICODE_HANGUL_SBASE', 0xAC00);
+define('UNICODE_HANGUL_LBASE', 0x1100);
+define('UNICODE_HANGUL_VBASE', 0x1161);
+define('UNICODE_HANGUL_TBASE', 0x11A7);
+define('UNICODE_HANGUL_SCOUNT', 11172);
+define('UNICODE_HANGUL_LCOUNT', 19);
+define('UNICODE_HANGUL_VCOUNT', 21);
+define('UNICODE_HANGUL_TCOUNT', 28);
+define('UNICODE_HANGUL_NCOUNT', 588);
+define('UNICODE_JAMO_L', 0);
+define('UNICODE_JAMO_V', 1);
+define('UNICODE_JAMO_T', 2);
+
+/**
+* Unicode normalization routines
+*
+* @package utf
+*/
+class utf_normalizer
+{
+ /**
+ * Validate, cleanup and normalize a string
+ *
+ * The ultimate convenience function! Clean up invalid UTF-8 sequences,
+ * and convert to Normal Form C, canonical composition.
+ *
+ * @param string &$str The dirty string
+ * @return string The same string, all shiny and cleaned-up
+ */
+ function cleanup(&$str)
+ {
+ // The string below is the list of all autorized characters, sorted by frequency in latin text
+ $pos = strspn($str, "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x0D");
+ $len = strlen($str);
+
+ if ($pos == $len)
+ {
+ // ASCII strings with no special chars return immediately
+ return;
+ }
+
+ // Note: we do not check for $GLOBALS['utf_canonical_decomp']. It is assumed they are always loaded together
+ if (!isset($GLOBALS['utf_nfc_qc']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
+ }
+
+ if (!isset($GLOBALS['utf_canonical_decomp']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
+ }
+
+ // Replace any byte in the range 0x00..0x1F, except for \r, \n and \t
+ // We replace those characters with a 0xFF byte, which is illegal in UTF-8 and will in turn be replaced with a UTF replacement char
+ $str = strtr(
+ $str,
+ "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F",
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ );
+
+ $str = utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']);
+ }
+
+ /**
+ * Validate and normalize a UTF string to NFC
+ *
+ * @param string &$str Unchecked UTF string
+ * @return string The string, validated and in normal form
+ */
+ function nfc(&$str)
+ {
+ $pos = strspn($str, UTF8_ASCII_RANGE);
+ $len = strlen($str);
+
+ if ($pos == $len)
+ {
+ // ASCII strings return immediately
+ return;
+ }
+
+ if (!isset($GLOBALS['utf_nfc_qc']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
+ }
+
+ if (!isset($GLOBALS['utf_canonical_decomp']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
+ }
+
+ $str = utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']);
+ }
+
+ /**
+ * Validate and normalize a UTF string to NFKC
+ *
+ * @param string &$str Unchecked UTF string
+ * @return string The string, validated and in normal form
+ */
+ function nfkc(&$str)
+ {
+ $pos = strspn($str, UTF8_ASCII_RANGE);
+ $len = strlen($str);
+
+ if ($pos == $len)
+ {
+ // ASCII strings return immediately
+ return;
+ }
+
+ if (!isset($GLOBALS['utf_nfkc_qc']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_nfkc_qc.' . $phpEx);
+ }
+
+ if (!isset($GLOBALS['utf_compatibility_decomp']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_compatibility_decomp.' . $phpEx);
+ }
+
+ $str = utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfkc_qc'], $GLOBALS['utf_compatibility_decomp']);
+ }
+
+ /**
+ * Validate and normalize a UTF string to NFD
+ *
+ * @param string &$str Unchecked UTF string
+ * @return string The string, validated and in normal form
+ */
+ function nfd(&$str)
+ {
+ $pos = strspn($str, UTF8_ASCII_RANGE);
+ $len = strlen($str);
+
+ if ($pos == $len)
+ {
+ // ASCII strings return immediately
+ return;
+ }
+
+ if (!isset($GLOBALS['utf_canonical_decomp']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
+ }
+
+ $str = utf_normalizer::decompose($str, $pos, $len, $GLOBALS['utf_canonical_decomp']);
+ }
+
+ /**
+ * Validate and normalize a UTF string to NFKD
+ *
+ * @param string &$str Unchecked UTF string
+ * @return string The string, validated and in normal form
+ */
+ function nfkd(&$str)
+ {
+ $pos = strspn($str, UTF8_ASCII_RANGE);
+ $len = strlen($str);
+
+ if ($pos == $len)
+ {
+ // ASCII strings return immediately
+ return;
+ }
+
+ if (!isset($GLOBALS['utf_compatibility_decomp']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_compatibility_decomp.' . $phpEx);
+ }
+
+ $str = utf_normalizer::decompose($str, $pos, $len, $GLOBALS['utf_compatibility_decomp']);
+ }
+
+
+ /**
+ * Recompose a UTF string
+ *
+ * @param string $str Unchecked UTF string
+ * @param integer $pos Position of the first UTF char (in bytes)
+ * @param integer $len Length of the string (in bytes)
+ * @param array &$qc Quick-check array, passed by reference but never modified
+ * @param array &$decomp_map Decomposition mapping, passed by reference but never modified
+ * @return string The string, validated and recomposed
+ *
+ * @access private
+ */
+ function recompose($str, $pos, $len, &$qc, &$decomp_map)
+ {
+ global $utf_combining_class, $utf_canonical_comp, $utf_jamo_type, $utf_jamo_index;
+
+ // Load some commonly-used tables
+ if (!isset($utf_jamo_index, $utf_jamo_type, $utf_combining_class))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_normalizer_common.' . $phpEx);
+ }
+
+ // Load the canonical composition table
+ if (!isset($utf_canonical_comp))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_canonical_comp.' . $phpEx);
+ }
+
+ // Buffer the last ASCII char before the UTF-8 stuff if applicable
+ $tmp = '';
+ $i = $tmp_pos = $last_cc = 0;
+
+ $buffer = ($pos) ? array(++$i => $str[$pos - 1]) : array();
+
+ // UTF char length array
+ // This array is used to determine the length of a UTF character.
+ // Be $c the result of ($str[$pos] & "\xF0") --where $str is the string we're operating on and $pos
+ // the position of the cursor--, if $utf_len_mask[$c] does not exist, the byte is an ASCII char.
+ // Otherwise, if $utf_len_mask[$c] is greater than 0, we have a the leading byte of a multibyte character
+ // whose length is $utf_len_mask[$c] and if it is equal to 0, the byte is a trailing byte.
+ $utf_len_mask = array(
+ // Leading bytes masks
+ "\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4,
+ // Trailing bytes masks
+ "\x80" => 0, "\x90" => 0, "\xA0" => 0, "\xB0" => 0
+ );
+
+ $extra_check = array(
+ "\xED" => 1, "\xEF" => 1, "\xC0" => 1, "\xC1" => 1, "\xE0" => 1, "\xF0" => 1,
+ "\xF4" => 1, "\xF5" => 1, "\xF6" => 1, "\xF7" => 1, "\xF8" => 1, "\xF9" => 1,
+ "\xFA" => 1, "\xFB" => 1, "\xFC" => 1, "\xFD" => 1, "\xFE" => 1, "\xFF" => 1
+ );
+
+ $utf_validation_mask = array(
+ 2 => "\xE0\xC0",
+ 3 => "\xF0\xC0\xC0",
+ 4 => "\xF8\xC0\xC0\xC0"
+ );
+
+ $utf_validation_check = array(
+ 2 => "\xC0\x80",
+ 3 => "\xE0\x80\x80",
+ 4 => "\xF0\x80\x80\x80"
+ );
+
+ // Main loop
+ do
+ {
+ // STEP 0: Capture the current char and buffer it
+ $c = $str[$pos];
+ $c_mask = $c & "\xF0";
+
+ if (isset($utf_len_mask[$c_mask]))
+ {
+ // Byte at $pos is either a leading byte or a missplaced trailing byte
+ if ($utf_len = $utf_len_mask[$c_mask])
+ {
+ // Capture the char
+ $buffer[++$i & 7] = $utf_char = substr($str, $pos, $utf_len);
+
+ // Let's find out if a thorough check is needed
+ if (isset($qc[$utf_char]))
+ {
+ // If the UTF char is in the qc array then it may not be in normal form. We do nothing here, the actual processing is below this "if" block
+ }
+ else if (isset($utf_combining_class[$utf_char]))
+ {
+ if ($utf_combining_class[$utf_char] < $last_cc)
+ {
+ // A combining character that is NOT canonically ordered
+ }
+ else
+ {
+ // A combining character that IS canonically ordered, skip to the next char
+ $last_cc = $utf_combining_class[$utf_char];
+
+ $pos += $utf_len;
+ continue;
+ }
+ }
+ else
+ {
+ // At this point, $utf_char holds a UTF char that we know is not a NF[K]C_QC and is not a combining character.
+ // It can be a singleton, a canonical composite, a replacement char or an even an ill-formed bunch of bytes. Let's find out
+ $last_cc = 0;
+
+ // Check that we have the correct number of trailing bytes
+ if (($utf_char & $utf_validation_mask[$utf_len]) != $utf_validation_check[$utf_len])
+ {
+ // Current char isn't well-formed or legal: either one or several trailing bytes are missing, or the Unicode char
+ // has been encoded in a five- or six- byte sequence
+ if ($utf_char[0] >= "\xF8")
+ {
+ if ($utf_char[0] < "\xFC")
+ {
+ $trailing_bytes = 4;
+ }
+ else if ($utf_char[0] > "\xFD")
+ {
+ $trailing_bytes = 0;
+ }
+ else
+ {
+ $trailing_bytes = 5;
+ }
+ }
+ else
+ {
+ $trailing_bytes = $utf_len - 1;
+ }
+
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $pos += strspn($str, UTF8_TRAILING_BYTES, ++$pos, $trailing_bytes);
+ $tmp_pos = $pos;
+
+ continue;
+ }
+
+ if (isset($extra_check[$c]))
+ {
+ switch ($c)
+ {
+ // Note: 0xED is quite common in Korean
+ case "\xED":
+ if ($utf_char >= "\xED\xA0\x80")
+ {
+ // Surrogates (U+D800..U+DFFF) are not allowed in UTF-8 (UTF sequence 0xEDA080..0xEDBFBF)
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $pos += $utf_len;
+ $tmp_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ // Note: 0xEF is quite common in Japanese
+ case "\xEF":
+ if ($utf_char == "\xEF\xBF\xBE" || $utf_char == "\xEF\xBF\xBF")
+ {
+ // U+FFFE and U+FFFF are explicitly disallowed (UTF sequence 0xEFBFBE..0xEFBFBF)
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $pos += $utf_len;
+ $tmp_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ case "\xC0":
+ case "\xC1":
+ if ($utf_char <= "\xC1\xBF")
+ {
+ // Overlong sequence: Unicode char U+0000..U+007F encoded as a double-byte UTF char
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $pos += $utf_len;
+ $tmp_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ case "\xE0":
+ if ($utf_char <= "\xE0\x9F\xBF")
+ {
+ // Unicode char U+0000..U+07FF encoded in 3 bytes
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $pos += $utf_len;
+ $tmp_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ case "\xF0":
+ if ($utf_char <= "\xF0\x8F\xBF\xBF")
+ {
+ // Unicode char U+0000..U+FFFF encoded in 4 bytes
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $pos += $utf_len;
+ $tmp_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ default:
+ // Five- and six- byte sequences do not need being checked for here anymore
+ if ($utf_char > UTF8_MAX)
+ {
+ // Out of the Unicode range
+ if ($utf_char[0] < "\xF8")
+ {
+ $trailing_bytes = 3;
+ }
+ else if ($utf_char[0] < "\xFC")
+ {
+ $trailing_bytes = 4;
+ }
+ else if ($utf_char[0] > "\xFD")
+ {
+ $trailing_bytes = 0;
+ }
+ else
+ {
+ $trailing_bytes = 5;
+ }
+
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $pos += strspn($str, UTF8_TRAILING_BYTES, ++$pos, $trailing_bytes);
+ $tmp_pos = $pos;
+ continue 2;
+ }
+ break;
+ }
+ }
+
+ // The char is a valid starter, move the cursor and go on
+ $pos += $utf_len;
+ continue;
+ }
+ }
+ else
+ {
+ // A trailing byte came out of nowhere, we will advance the cursor and treat the this byte and all following trailing bytes as if
+ // each of them was a Unicode replacement char
+ $spn = strspn($str, UTF8_TRAILING_BYTES, $pos);
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . str_repeat(UTF8_REPLACEMENT, $spn);
+
+ $pos += $spn;
+ $tmp_pos = $pos;
+ continue;
+ }
+
+
+ // STEP 1: Decompose current char
+
+ // We have found a character that is either:
+ // - in the NFC_QC/NFKC_QC list
+ // - a non-starter char that is not canonically ordered
+ //
+ // We are going to capture the shortest UTF sequence that satisfies these two conditions:
+ //
+ // 1 - If the sequence does not start at the begginning of the string, it must begin with a starter,
+ // and that starter must not have the NF[K]C_QC property equal to "MAYBE"
+ //
+ // 2 - If the sequence does not end at the end of the string, it must end with a non-starter and be
+ // immediately followed by a starter that is not on the QC list
+ //
+ $utf_seq = array();
+ $last_cc = 0;
+ $lpos = $pos;
+ $pos += $utf_len;
+
+ if (isset($decomp_map[$utf_char]))
+ {
+ $_pos = 0;
+ $_len = strlen($decomp_map[$utf_char]);
+
+ do
+ {
+ $_utf_len =& $utf_len_mask[$decomp_map[$utf_char][$_pos] & "\xF0"];
+
+ if (isset($_utf_len))
+ {
+ $utf_seq[] = substr($decomp_map[$utf_char], $_pos, $_utf_len);
+ $_pos += $_utf_len;
+ }
+ else
+ {
+ $utf_seq[] = $decomp_map[$utf_char][$_pos];
+ ++$_pos;
+ }
+ }
+ while ($_pos < $_len);
+ }
+ else
+ {
+ // The char is not decomposable
+ $utf_seq = array($utf_char);
+ }
+
+
+ // STEP 2: Capture the starter
+
+ // Check out the combining class of the first character of the UTF sequence
+ $k = 0;
+ if (isset($utf_combining_class[$utf_seq[0]]) || $qc[$utf_char] == UNICODE_QC_MAYBE)
+ {
+ // Not a starter, inspect previous characters
+ // The last 8 characters are kept in a buffer so that we don't have to capture them everytime.
+ // This is enough for all real-life strings but even if it wasn't, we can capture characters in backward mode,
+ // although it is slower than this method.
+ //
+ // In the following loop, $j starts at the previous buffered character ($i - 1, because current character is
+ // at offset $i) and process them in backward mode until we find a starter.
+ //
+ // $k is the index on each UTF character inside of our UTF sequence. At this time, $utf_seq contains one or more
+ // characters numbered 0 to n. $k starts at 0 and for each char we prepend we pre-decrement it and for numbering
+ $starter_found = 0;
+ $j_min = max(1, $i - 7);
+
+ for ($j = $i - 1; $j >= $j_min && $lpos > $tmp_pos; --$j)
+ {
+ $utf_char = $buffer[$j & 7];
+ $lpos -= strlen($utf_char);
+
+ if (isset($decomp_map[$utf_char]))
+ {
+ // The char is a composite, decompose for storage
+ $decomp_seq = array();
+ $_pos = 0;
+ $_len = strlen($decomp_map[$utf_char]);
+
+ do
+ {
+ $c = $decomp_map[$utf_char][$_pos];
+ $_utf_len =& $utf_len_mask[$c & "\xF0"];
+
+ if (isset($_utf_len))
+ {
+ $decomp_seq[] = substr($decomp_map[$utf_char], $_pos, $_utf_len);
+ $_pos += $_utf_len;
+ }
+ else
+ {
+ $decomp_seq[] = $c;
+ ++$_pos;
+ }
+ }
+ while ($_pos < $_len);
+
+ // Prepend the UTF sequence with our decomposed sequence
+ if (isset($decomp_seq[1]))
+ {
+ // The char expanded into several chars
+ $decomp_cnt = sizeof($decomp_seq);
+
+ foreach ($decomp_seq as $decomp_i => $decomp_char)
+ {
+ $utf_seq[$k + $decomp_i - $decomp_cnt] = $decomp_char;
+ }
+ $k -= $decomp_cnt;
+ }
+ else
+ {
+ // Decomposed to a single char, easier to prepend
+ $utf_seq[--$k] = $decomp_seq[0];
+ }
+ }
+ else
+ {
+ $utf_seq[--$k] = $utf_char;
+ }
+
+ if (!isset($utf_combining_class[$utf_seq[$k]]))
+ {
+ // We have found our starter
+ $starter_found = 1;
+ break;
+ }
+ }
+
+ if (!$starter_found && $lpos > $tmp_pos)
+ {
+ // The starter was not found in the buffer, let's rewind some more
+ do
+ {
+ // $utf_len_mask contains the masks of both leading bytes and trailing bytes. If $utf_en > 0 then it's a leading byte, otherwise it's a trailing byte.
+ $c = $str[--$lpos];
+ $c_mask = $c & "\xF0";
+
+ if (isset($utf_len_mask[$c_mask]))
+ {
+ // UTF byte
+ if ($utf_len = $utf_len_mask[$c_mask])
+ {
+ // UTF *leading* byte
+ $utf_char = substr($str, $lpos, $utf_len);
+
+ if (isset($decomp_map[$utf_char]))
+ {
+ // Decompose the character
+ $decomp_seq = array();
+ $_pos = 0;
+ $_len = strlen($decomp_map[$utf_char]);
+
+ do
+ {
+ $c = $decomp_map[$utf_char][$_pos];
+ $_utf_len =& $utf_len_mask[$c & "\xF0"];
+
+ if (isset($_utf_len))
+ {
+ $decomp_seq[] = substr($decomp_map[$utf_char], $_pos, $_utf_len);
+ $_pos += $_utf_len;
+ }
+ else
+ {
+ $decomp_seq[] = $c;
+ ++$_pos;
+ }
+ }
+ while ($_pos < $_len);
+
+ // Prepend the UTF sequence with our decomposed sequence
+ if (isset($decomp_seq[1]))
+ {
+ // The char expanded into several chars
+ $decomp_cnt = sizeof($decomp_seq);
+ foreach ($decomp_seq as $decomp_i => $utf_char)
+ {
+ $utf_seq[$k + $decomp_i - $decomp_cnt] = $utf_char;
+ }
+ $k -= $decomp_cnt;
+ }
+ else
+ {
+ // Decomposed to a single char, easier to prepend
+ $utf_seq[--$k] = $decomp_seq[0];
+ }
+ }
+ else
+ {
+ $utf_seq[--$k] = $utf_char;
+ }
+ }
+ }
+ else
+ {
+ // ASCII char
+ $utf_seq[--$k] = $c;
+ }
+ }
+ while ($lpos > $tmp_pos);
+ }
+ }
+
+
+ // STEP 3: Capture following combining modifiers
+
+ while ($pos < $len)
+ {
+ $c_mask = $str[$pos] & "\xF0";
+
+ if (isset($utf_len_mask[$c_mask]))
+ {
+ if ($utf_len = $utf_len_mask[$c_mask])
+ {
+ $utf_char = substr($str, $pos, $utf_len);
+ }
+ else
+ {
+ // A trailing byte came out of nowhere
+ // Trailing bytes are replaced with Unicode replacement chars, we will just ignore it for now, break out of the loop
+ // as if it was a starter (replacement chars ARE starters) and let the next loop replace it
+ break;
+ }
+
+ if (isset($utf_combining_class[$utf_char]) || isset($qc[$utf_char]))
+ {
+ // Combining character, add it to the sequence and move the cursor
+ if (isset($decomp_map[$utf_char]))
+ {
+ // Decompose the character
+ $_pos = 0;
+ $_len = strlen($decomp_map[$utf_char]);
+
+ do
+ {
+ $c = $decomp_map[$utf_char][$_pos];
+ $_utf_len =& $utf_len_mask[$c & "\xF0"];
+
+ if (isset($_utf_len))
+ {
+ $utf_seq[] = substr($decomp_map[$utf_char], $_pos, $_utf_len);
+ $_pos += $_utf_len;
+ }
+ else
+ {
+ $utf_seq[] = $c;
+ ++$_pos;
+ }
+ }
+ while ($_pos < $_len);
+ }
+ else
+ {
+ $utf_seq[] = $utf_char;
+ }
+
+ $pos += $utf_len;
+ }
+ else
+ {
+ // Combining class 0 and no QC, break out of the loop
+ // Note: we do not know if that character is valid. If it's not, the next iteration will replace it
+ break;
+ }
+ }
+ else
+ {
+ // ASCII chars are starters
+ break;
+ }
+ }
+
+
+ // STEP 4: Sort and combine
+
+ // Here we sort...
+ $k_max = $k + sizeof($utf_seq);
+
+ if (!$k && $k_max == 1)
+ {
+ // There is only one char in the UTF sequence, add it then jump to the next iteration of main loop
+ // Note: the two commented lines below can be enabled under PHP5 for a very small performance gain in most cases
+// if (substr_compare($str, $utf_seq[0], $lpos, $pos - $lpos))
+// {
+ $tmp .= substr($str, $tmp_pos, $lpos - $tmp_pos) . $utf_seq[0];
+ $tmp_pos = $pos;
+// }
+
+ continue;
+ }
+
+ // ...there we combine
+ if (isset($utf_combining_class[$utf_seq[$k]]))
+ {
+ $starter = $nf_seq = '';
+ }
+ else
+ {
+ $starter = $utf_seq[$k++];
+ $nf_seq = '';
+ }
+ $utf_sort = array();
+
+ // We add an empty char at the end of the UTF char sequence. It will act as a starter and trigger the sort/combine routine
+ // at the end of the string without altering it
+ $utf_seq[] = '';
+
+ do
+ {
+ $utf_char = $utf_seq[$k++];
+
+ if (isset($utf_combining_class[$utf_char]))
+ {
+ $utf_sort[$utf_combining_class[$utf_char]][] = $utf_char;
+ }
+ else
+ {
+ if (empty($utf_sort))
+ {
+ // No combining characters... check for a composite of the two starters
+ if (isset($utf_canonical_comp[$starter . $utf_char]))
+ {
+ // Good ol' composite character
+ $starter = $utf_canonical_comp[$starter . $utf_char];
+ }
+ else if (isset($utf_jamo_type[$utf_char]))
+ {
+ // Current char is a composable jamo
+ if (isset($utf_jamo_type[$starter]) && $utf_jamo_type[$starter] == UNICODE_JAMO_L && $utf_jamo_type[$utf_char] == UNICODE_JAMO_V)
+ {
+ // We have a L jamo followed by a V jamo, we are going to prefetch the next char to see if it's a T jamo
+ if (isset($utf_jamo_type[$utf_seq[$k]]) && $utf_jamo_type[$utf_seq[$k]] == UNICODE_JAMO_T)
+ {
+ // L+V+T jamos, combine to a LVT Hangul syllable ($k is incremented)
+ $cp = $utf_jamo_index[$starter] + $utf_jamo_index[$utf_char] + $utf_jamo_index[$utf_seq[$k]];
+ ++$k;
+ }
+ else
+ {
+ // L+V jamos, combine to a LV Hangul syllable
+ $cp = $utf_jamo_index[$starter] + $utf_jamo_index[$utf_char];
+ }
+
+ $starter = chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else
+ {
+ // Non-composable jamo, just add it to the sequence
+ $nf_seq .= $starter;
+ $starter = $utf_char;
+ }
+ }
+ else
+ {
+ // No composite, just add the first starter to the sequence then continue with the other one
+ $nf_seq .= $starter;
+ $starter = $utf_char;
+ }
+ }
+ else
+ {
+ ksort($utf_sort);
+
+ // For each class of combining characters
+ foreach ($utf_sort as $cc => $utf_chars)
+ {
+ $j = 0;
+
+ do
+ {
+ // Look for a composite
+ if (isset($utf_canonical_comp[$starter . $utf_chars[$j]]))
+ {
+ // Found a composite, replace the starter
+ $starter = $utf_canonical_comp[$starter . $utf_chars[$j]];
+ unset($utf_sort[$cc][$j]);
+ }
+ else
+ {
+ // No composite, all following characters in that class are blocked
+ break;
+ }
+ }
+ while (isset($utf_sort[$cc][++$j]));
+ }
+
+ // Add the starter to the normalized sequence, followed by non-starters in canonical order
+ $nf_seq .= $starter;
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ if (!empty($utf_chars))
+ {
+ $nf_seq .= implode('', $utf_chars);
+ }
+ }
+
+ // Reset the array and go on
+ $utf_sort = array();
+ $starter = $utf_char;
+ }
+ }
+ }
+ while ($k <= $k_max);
+
+ $tmp .= substr($str, $tmp_pos, $lpos - $tmp_pos) . $nf_seq;
+ $tmp_pos = $pos;
+ }
+ else
+ {
+ // Only a ASCII char can make the program get here
+ //
+ // First we skip the current byte with ++$pos, then we quickly skip following ASCII chars with strspn().
+ //
+ // The first two "if"'s here can be removed, with the consequences of being faster on latin text (lots of ASCII) and slower on
+ // multi-byte text (where the only ASCII chars are spaces and punctuation)
+ if (++$pos != $len)
+ {
+ if ($str[$pos] < "\x80")
+ {
+ $pos += strspn($str, UTF8_ASCII_RANGE, ++$pos);
+ $buffer[++$i & 7] = $str[$pos - 1];
+ }
+ else
+ {
+ $buffer[++$i & 7] = $c;
+ }
+ }
+ }
+ }
+ while ($pos < $len);
+
+ // Now is time to return the string
+ if ($tmp_pos)
+ {
+ // If the $tmp_pos cursor is not at the beggining of the string then at least one character was not in normal form. Replace $str with the fixed version
+ if ($tmp_pos == $len)
+ {
+ // The $tmp_pos cursor is at the end of $str, therefore $tmp holds the whole $str
+ return $tmp;
+ }
+ else
+ {
+ // The rightmost chunk of $str has not been appended to $tmp yet
+ return $tmp . substr($str, $tmp_pos);
+ }
+ }
+
+ // The string was already in normal form
+ return $str;
+ }
+
+ /**
+ * Decompose a UTF string
+ *
+ * @param string $str UTF string
+ * @param integer $pos Position of the first UTF char (in bytes)
+ * @param integer $len Length of the string (in bytes)
+ * @param array &$decomp_map Decomposition mapping, passed by reference but never modified
+ * @return string The string, decomposed and sorted canonically
+ *
+ * @access private
+ */
+ function decompose($str, $pos, $len, &$decomp_map)
+ {
+ global $utf_combining_class;
+
+ // Load some commonly-used tables
+ if (!isset($utf_combining_class))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_normalizer_common.' . $phpEx);
+ }
+
+ // UTF char length array
+ $utf_len_mask = array(
+ // Leading bytes masks
+ "\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4,
+ // Trailing bytes masks
+ "\x80" => 0, "\x90" => 0, "\xA0" => 0, "\xB0" => 0
+ );
+
+ // Some extra checks are triggered on the first byte of a UTF sequence
+ $extra_check = array(
+ "\xED" => 1, "\xEF" => 1, "\xC0" => 1, "\xC1" => 1, "\xE0" => 1, "\xF0" => 1,
+ "\xF4" => 1, "\xF5" => 1, "\xF6" => 1, "\xF7" => 1, "\xF8" => 1, "\xF9" => 1,
+ "\xFA" => 1, "\xFB" => 1, "\xFC" => 1, "\xFD" => 1, "\xFE" => 1, "\xFF" => 1
+ );
+
+ // These masks are used to check if a UTF sequence is well formed. Here are the only 3 lengths we acknowledge:
+ // - 2-byte: 110? ???? 10?? ????
+ // - 3-byte: 1110 ???? 10?? ???? 10?? ????
+ // - 4-byte: 1111 0??? 10?? ???? 10?? ???? 10?? ????
+ // Note that 5- and 6- byte sequences are automatically discarded
+ $utf_validation_mask = array(
+ 2 => "\xE0\xC0",
+ 3 => "\xF0\xC0\xC0",
+ 4 => "\xF8\xC0\xC0\xC0"
+ );
+
+ $utf_validation_check = array(
+ 2 => "\xC0\x80",
+ 3 => "\xE0\x80\x80",
+ 4 => "\xF0\x80\x80\x80"
+ );
+
+ $tmp = '';
+ $starter_pos = $pos;
+ $tmp_pos = $last_cc = $sort = $dump = 0;
+ $utf_sort = array();
+
+
+ // Main loop
+ do
+ {
+ // STEP 0: Capture the current char
+
+ $cur_mask = $str[$pos] & "\xF0";
+ if (isset($utf_len_mask[$cur_mask]))
+ {
+ if ($utf_len = $utf_len_mask[$cur_mask])
+ {
+ // Multibyte char
+ $utf_char = substr($str, $pos, $utf_len);
+ $pos += $utf_len;
+ }
+ else
+ {
+ // A trailing byte came out of nowhere, we will treat it and all following trailing bytes as if each of them was a Unicode
+ // replacement char and we will advance the cursor
+ $spn = strspn($str, UTF8_TRAILING_BYTES, $pos);
+
+ if ($dump)
+ {
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ // Dump combiners
+ if (!empty($utf_sort))
+ {
+ if ($sort)
+ {
+ ksort($utf_sort);
+ }
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ }
+
+ $tmp .= str_repeat(UTF8_REPLACEMENT, $spn);
+ $dump = $sort = 0;
+ }
+ else
+ {
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . str_repeat(UTF8_REPLACEMENT, $spn);
+ }
+
+ $pos += $spn;
+ $tmp_pos = $starter_pos = $pos;
+
+ $utf_sort = array();
+ $last_cc = 0;
+
+ continue;
+ }
+
+
+ // STEP 1: Decide what to do with current char
+
+ // Now, in that order:
+ // - check if that character is decomposable
+ // - check if that character is a non-starter
+ // - check if that character requires extra checks to be performed
+ if (isset($decomp_map[$utf_char]))
+ {
+ // Decompose the char
+ $_pos = 0;
+ $_len = strlen($decomp_map[$utf_char]);
+
+ do
+ {
+ $c = $decomp_map[$utf_char][$_pos];
+ $_utf_len =& $utf_len_mask[$c & "\xF0"];
+
+ if (isset($_utf_len))
+ {
+ $_utf_char = substr($decomp_map[$utf_char], $_pos, $_utf_len);
+ $_pos += $_utf_len;
+
+ if (isset($utf_combining_class[$_utf_char]))
+ {
+ // The character decomposed to a non-starter, buffer it for sorting
+ $utf_sort[$utf_combining_class[$_utf_char]][] = $_utf_char;
+
+ if ($utf_combining_class[$_utf_char] < $last_cc)
+ {
+ // Not canonically ordered, will require sorting
+ $sort = $dump = 1;
+ }
+ else
+ {
+ $dump = 1;
+ $last_cc = $utf_combining_class[$_utf_char];
+ }
+ }
+ else
+ {
+ // This character decomposition contains a starter, dump the buffer and continue
+ if ($dump)
+ {
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ // Dump combiners
+ if (!empty($utf_sort))
+ {
+ if ($sort)
+ {
+ ksort($utf_sort);
+ }
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ }
+
+ $tmp .= $_utf_char;
+ $dump = $sort = 0;
+ }
+ else
+ {
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos) . $_utf_char;
+ }
+
+ $tmp_pos = $starter_pos = $pos;
+ $utf_sort = array();
+ $last_cc = 0;
+ }
+ }
+ else
+ {
+ // This character decomposition contains an ASCII char, which is a starter. Dump the buffer and continue
+ ++$_pos;
+
+ if ($dump)
+ {
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ // Dump combiners
+ if (!empty($utf_sort))
+ {
+ if ($sort)
+ {
+ ksort($utf_sort);
+ }
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ }
+
+ $tmp .= $c;
+ $dump = $sort = 0;
+ }
+ else
+ {
+ $tmp .= substr($str, $tmp_pos, $pos - $utf_len - $tmp_pos) . $c;
+ }
+
+ $tmp_pos = $starter_pos = $pos;
+ $utf_sort = array();
+ $last_cc = 0;
+ }
+ }
+ while ($_pos < $_len);
+ }
+ else if (isset($utf_combining_class[$utf_char]))
+ {
+ // Combining character
+ if ($utf_combining_class[$utf_char] < $last_cc)
+ {
+ // Not in canonical order
+ $sort = $dump = 1;
+ }
+ else
+ {
+ $last_cc = $utf_combining_class[$utf_char];
+ }
+
+ $utf_sort[$utf_combining_class[$utf_char]][] = $utf_char;
+ }
+ else
+ {
+ // Non-decomposable starter, check out if it's a Hangul syllable
+ if ($utf_char < UTF8_HANGUL_FIRST || $utf_char > UTF8_HANGUL_LAST)
+ {
+ // Nope, regular UTF char, check that we have the correct number of trailing bytes
+ if (($utf_char & $utf_validation_mask[$utf_len]) != $utf_validation_check[$utf_len])
+ {
+ // Current char isn't well-formed or legal: either one or several trailing bytes are missing, or the Unicode char
+ // has been encoded in a five- or six- byte sequence.
+ // Move the cursor back to its original position then advance it to the position it should really be at
+ $pos -= $utf_len;
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ if (!empty($utf_sort))
+ {
+ ksort($utf_sort);
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ $utf_sort = array();
+ }
+
+ // Add a replacement char then another replacement char for every trailing byte.
+ //
+ // @todo I'm not entirely sure that's how we're supposed to mark invalidated byte sequences, check this
+ $spn = strspn($str, UTF8_TRAILING_BYTES, ++$pos);
+ $tmp .= str_repeat(UTF8_REPLACEMENT, $spn + 1);
+
+ $dump = $sort = 0;
+
+ $pos += $spn;
+ $tmp_pos = $pos;
+ continue;
+ }
+
+ if (isset($extra_check[$utf_char[0]]))
+ {
+ switch ($utf_char[0])
+ {
+ // Note: 0xED is quite common in Korean
+ case "\xED":
+ if ($utf_char >= "\xED\xA0\x80")
+ {
+ // Surrogates (U+D800..U+DFFF) are not allowed in UTF-8 (UTF sequence 0xEDA080..0xEDBFBF)
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ if (!empty($utf_sort))
+ {
+ ksort($utf_sort);
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ $utf_sort = array();
+ }
+
+ $tmp .= UTF8_REPLACEMENT;
+ $dump = $sort = 0;
+
+ $tmp_pos = $starter_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ // Note: 0xEF is quite common in Japanese
+ case "\xEF":
+ if ($utf_char == "\xEF\xBF\xBE" || $utf_char == "\xEF\xBF\xBF")
+ {
+ // U+FFFE and U+FFFF are explicitly disallowed (UTF sequence 0xEFBFBE..0xEFBFBF)
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ if (!empty($utf_sort))
+ {
+ ksort($utf_sort);
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ $utf_sort = array();
+ }
+
+ $tmp .= UTF8_REPLACEMENT;
+ $dump = $sort = 0;
+
+ $tmp_pos = $starter_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ case "\xC0":
+ case "\xC1":
+ if ($utf_char <= "\xC1\xBF")
+ {
+ // Overlong sequence: Unicode char U+0000..U+007F encoded as a double-byte UTF char
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ if (!empty($utf_sort))
+ {
+ ksort($utf_sort);
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ $utf_sort = array();
+ }
+
+ $tmp .= UTF8_REPLACEMENT;
+ $dump = $sort = 0;
+
+ $tmp_pos = $starter_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ case "\xE0":
+ if ($utf_char <= "\xE0\x9F\xBF")
+ {
+ // Unicode char U+0000..U+07FF encoded in 3 bytes
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ if (!empty($utf_sort))
+ {
+ ksort($utf_sort);
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ $utf_sort = array();
+ }
+
+ $tmp .= UTF8_REPLACEMENT;
+ $dump = $sort = 0;
+
+ $tmp_pos = $starter_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ case "\xF0":
+ if ($utf_char <= "\xF0\x8F\xBF\xBF")
+ {
+ // Unicode char U+0000..U+FFFF encoded in 4 bytes
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ if (!empty($utf_sort))
+ {
+ ksort($utf_sort);
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ $utf_sort = array();
+ }
+
+ $tmp .= UTF8_REPLACEMENT;
+ $dump = $sort = 0;
+
+ $tmp_pos = $starter_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ default:
+ if ($utf_char > UTF8_MAX)
+ {
+ // Out of the Unicode range
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ if (!empty($utf_sort))
+ {
+ ksort($utf_sort);
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ $utf_sort = array();
+ }
+
+ $tmp .= UTF8_REPLACEMENT;
+ $dump = $sort = 0;
+
+ $tmp_pos = $starter_pos = $pos;
+ continue 2;
+ }
+ break;
+ }
+ }
+ }
+ else
+ {
+ // Hangul syllable
+ $idx = (((ord($utf_char[0]) & 0x0F) << 12) | ((ord($utf_char[1]) & 0x3F) << 6) | (ord($utf_char[2]) & 0x3F)) - UNICODE_HANGUL_SBASE;
+
+ // LIndex can only range from 0 to 18, therefore it cannot influence the first two bytes of the L Jamo, which allows us to hardcode them (based on LBase).
+ //
+ // The same goes for VIndex, but for TIndex there's a catch: the value of the third byte could exceed 0xBF and we would have to increment the second byte
+ if ($t_index = $idx % UNICODE_HANGUL_TCOUNT)
+ {
+ if ($t_index < 25)
+ {
+ $utf_char = "\xE1\x84\x00\xE1\x85\x00\xE1\x86\x00";
+ $utf_char[8] = chr(0xA7 + $t_index);
+ }
+ else
+ {
+ $utf_char = "\xE1\x84\x00\xE1\x85\x00\xE1\x87\x00";
+ $utf_char[8] = chr(0x67 + $t_index);
+ }
+ }
+ else
+ {
+ $utf_char = "\xE1\x84\x00\xE1\x85\x00";
+ }
+
+ $utf_char[2] = chr(0x80 + (int) ($idx / UNICODE_HANGUL_NCOUNT));
+ $utf_char[5] = chr(0xA1 + (int) (($idx % UNICODE_HANGUL_NCOUNT) / UNICODE_HANGUL_TCOUNT));
+
+ // Just like other decompositions, the resulting Jamos must be dumped to the tmp string
+ $dump = 1;
+ }
+
+ // Do we need to dump stuff to the tmp string?
+ if ($dump)
+ {
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ // Dump combiners
+ if (!empty($utf_sort))
+ {
+ if ($sort)
+ {
+ ksort($utf_sort);
+ }
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ }
+
+ $tmp .= $utf_char;
+ $dump = $sort = 0;
+ $tmp_pos = $pos;
+ }
+
+ $last_cc = 0;
+ $utf_sort = array();
+ $starter_pos = $pos;
+ }
+ }
+ else
+ {
+ // ASCII char, which happens to be a starter (as any other ASCII char)
+ if ($dump)
+ {
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ // Dump combiners
+ if (!empty($utf_sort))
+ {
+ if ($sort)
+ {
+ ksort($utf_sort);
+ }
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ }
+
+ $tmp .= $str[$pos];
+ $dump = $sort = 0;
+ $tmp_pos = ++$pos;
+
+ $pos += strspn($str, UTF8_ASCII_RANGE, $pos);
+ }
+ else
+ {
+ $pos += strspn($str, UTF8_ASCII_RANGE, ++$pos);
+ }
+
+ $last_cc = 0;
+ $utf_sort = array();
+ $starter_pos = $pos;
+ }
+ }
+ while ($pos < $len);
+
+ // Now is time to return the string
+ if ($dump)
+ {
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ // Dump combiners
+ if (!empty($utf_sort))
+ {
+ if ($sort)
+ {
+ ksort($utf_sort);
+ }
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ }
+
+ return $tmp;
+ }
+ else if ($tmp_pos)
+ {
+ // If the $tmp_pos cursor was moved then at least one character was not in normal form. Replace $str with the fixed version
+ if ($tmp_pos == $len)
+ {
+ // The $tmp_pos cursor is at the end of $str, therefore $tmp holds the whole $str
+ return $tmp;
+ }
+ else
+ {
+ // The rightmost chunk of $str has not been appended to $tmp yet
+ return $tmp . substr($str, $tmp_pos);
+ }
+ }
+
+ // The string was already in normal form
+ return $str;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php
new file mode 100644
index 0000000000..6f3ac93305
--- /dev/null
+++ b/phpBB/includes/utf/utf_tools.php
@@ -0,0 +1,1995 @@
+<?php
+/**
+*
+* @package utf
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+// Enforce ASCII only string handling
+setlocale(LC_CTYPE, 'C');
+
+/**
+* UTF-8 tools
+*
+* Whenever possible, these functions will try to use PHP's built-in functions or
+* extensions, otherwise they will default to custom routines.
+*
+* @package utf
+*/
+
+if (!extension_loaded('xml'))
+{
+ /**
+ * Implementation of PHP's native utf8_encode for people without XML support
+ * This function exploits some nice things that ISO-8859-1 and UTF-8 have in common
+ *
+ * @param string $str ISO-8859-1 encoded data
+ * @return string UTF-8 encoded data
+ */
+ function utf8_encode($str)
+ {
+ $out = '';
+ for ($i = 0, $len = strlen($str); $i < $len; $i++)
+ {
+ $letter = $str[$i];
+ $num = ord($letter);
+ if ($num < 0x80)
+ {
+ $out .= $letter;
+ }
+ else if ($num < 0xC0)
+ {
+ $out .= "\xC2" . $letter;
+ }
+ else
+ {
+ $out .= "\xC3" . chr($num - 64);
+ }
+ }
+ return $out;
+ }
+
+ /**
+ * Implementation of PHP's native utf8_decode for people without XML support
+ *
+ * @param string $str UTF-8 encoded data
+ * @return string ISO-8859-1 encoded data
+ */
+ function utf8_decode($str)
+ {
+ $pos = 0;
+ $len = strlen($str);
+ $ret = '';
+
+ while ($pos < $len)
+ {
+ $ord = ord($str[$pos]) & 0xF0;
+ if ($ord === 0xC0 || $ord === 0xD0)
+ {
+ $charval = ((ord($str[$pos]) & 0x1F) << 6) | (ord($str[$pos + 1]) & 0x3F);
+ $pos += 2;
+ $ret .= (($charval < 256) ? chr($charval) : '?');
+ }
+ else if ($ord === 0xE0)
+ {
+ $ret .= '?';
+ $pos += 3;
+ }
+ else if ($ord === 0xF0)
+ {
+ $ret .= '?';
+ $pos += 4;
+ }
+ else
+ {
+ $ret .= $str[$pos];
+ ++$pos;
+ }
+ }
+ return $ret;
+ }
+}
+
+// mbstring is old and has it's functions around for older versions of PHP.
+// if mbstring is not loaded, we go into native mode.
+if (extension_loaded('mbstring'))
+{
+ mb_internal_encoding('UTF-8');
+
+ /**
+ * UTF-8 aware alternative to strrpos
+ * Find position of last occurrence of a char in a string
+ *
+ * Notes:
+ * - offset for mb_strrpos was added in 5.2.0, we emulate if it is lower
+ */
+ if (version_compare(PHP_VERSION, '5.2.0', '>='))
+ {
+ /**
+ * UTF-8 aware alternative to strrpos
+ * @ignore
+ */
+ function utf8_strrpos($str, $needle, $offset = null)
+ {
+ // Emulate behaviour of strrpos rather than raising warning
+ if (empty($str))
+ {
+ return false;
+ }
+
+ if (is_null($offset))
+ {
+ return mb_strrpos($str, $needle);
+ }
+ else
+ {
+ return mb_strrpos($str, $needle, $offset);
+ }
+ }
+ }
+ else
+ {
+ /**
+ * UTF-8 aware alternative to strrpos
+ * @ignore
+ */
+ function utf8_strrpos($str, $needle, $offset = null)
+ {
+ // offset for mb_strrpos was added in 5.2.0
+ if (is_null($offset))
+ {
+ // Emulate behaviour of strrpos rather than raising warning
+ if (empty($str))
+ {
+ return false;
+ }
+
+ return mb_strrpos($str, $needle);
+ }
+ else
+ {
+ if (!is_int($offset))
+ {
+ trigger_error('utf8_strrpos expects parameter 3 to be long', E_USER_ERROR);
+ return false;
+ }
+
+ $str = mb_substr($str, $offset);
+
+ if (false !== ($pos = mb_strrpos($str, $needle)))
+ {
+ return $pos + $offset;
+ }
+
+ return false;
+ }
+ }
+ }
+
+ /**
+ * UTF-8 aware alternative to strpos
+ * @ignore
+ */
+ function utf8_strpos($str, $needle, $offset = null)
+ {
+ if (is_null($offset))
+ {
+ return mb_strpos($str, $needle);
+ }
+ else
+ {
+ return mb_strpos($str, $needle, $offset);
+ }
+ }
+
+ /**
+ * UTF-8 aware alternative to strtolower
+ * @ignore
+ */
+ function utf8_strtolower($str)
+ {
+ return mb_strtolower($str);
+ }
+
+ /**
+ * UTF-8 aware alternative to strtoupper
+ * @ignore
+ */
+ function utf8_strtoupper($str)
+ {
+ return mb_strtoupper($str);
+ }
+
+ /**
+ * UTF-8 aware alternative to substr
+ * @ignore
+ */
+ function utf8_substr($str, $offset, $length = null)
+ {
+ if (is_null($length))
+ {
+ return mb_substr($str, $offset);
+ }
+ else
+ {
+ return mb_substr($str, $offset, $length);
+ }
+ }
+
+ /**
+ * Return the length (in characters) of a UTF-8 string
+ * @ignore
+ */
+ function utf8_strlen($text)
+ {
+ return mb_strlen($text, 'utf-8');
+ }
+}
+else
+{
+ /**
+ * UTF-8 aware alternative to strrpos
+ * Find position of last occurrence of a char in a string
+ *
+ * @author Harry Fuecks
+ * @param string $str haystack
+ * @param string $needle needle
+ * @param integer $offset (optional) offset (from left)
+ * @return mixed integer position or FALSE on failure
+ */
+ function utf8_strrpos($str, $needle, $offset = null)
+ {
+ if (is_null($offset))
+ {
+ $ar = explode($needle, $str);
+
+ if (sizeof($ar) > 1)
+ {
+ // Pop off the end of the string where the last match was made
+ array_pop($ar);
+ $str = join($needle, $ar);
+
+ return utf8_strlen($str);
+ }
+ return false;
+ }
+ else
+ {
+ if (!is_int($offset))
+ {
+ trigger_error('utf8_strrpos expects parameter 3 to be long', E_USER_ERROR);
+ return false;
+ }
+
+ $str = utf8_substr($str, $offset);
+
+ if (false !== ($pos = utf8_strrpos($str, $needle)))
+ {
+ return $pos + $offset;
+ }
+
+ return false;
+ }
+ }
+
+ /**
+ * UTF-8 aware alternative to strpos
+ * Find position of first occurrence of a string
+ *
+ * @author Harry Fuecks
+ * @param string $str haystack
+ * @param string $needle needle
+ * @param integer $offset offset in characters (from left)
+ * @return mixed integer position or FALSE on failure
+ */
+ function utf8_strpos($str, $needle, $offset = null)
+ {
+ if (is_null($offset))
+ {
+ $ar = explode($needle, $str);
+ if (sizeof($ar) > 1)
+ {
+ return utf8_strlen($ar[0]);
+ }
+ return false;
+ }
+ else
+ {
+ if (!is_int($offset))
+ {
+ trigger_error('utf8_strpos: Offset must be an integer', E_USER_ERROR);
+ return false;
+ }
+
+ $str = utf8_substr($str, $offset);
+
+ if (false !== ($pos = utf8_strpos($str, $needle)))
+ {
+ return $pos + $offset;
+ }
+
+ return false;
+ }
+ }
+
+ /**
+ * UTF-8 aware alternative to strtolower
+ * Make a string lowercase
+ * Note: The concept of a characters "case" only exists is some alphabets
+ * such as Latin, Greek, Cyrillic, Armenian and archaic Georgian - it does
+ * not exist in the Chinese alphabet, for example. See Unicode Standard
+ * Annex #21: Case Mappings
+ *
+ * @param string
+ * @return string string in lowercase
+ */
+ function utf8_strtolower($string)
+ {
+ static $utf8_upper_to_lower = array(
+ "\xC3\x80" => "\xC3\xA0", "\xC3\x81" => "\xC3\xA1",
+ "\xC3\x82" => "\xC3\xA2", "\xC3\x83" => "\xC3\xA3", "\xC3\x84" => "\xC3\xA4", "\xC3\x85" => "\xC3\xA5",
+ "\xC3\x86" => "\xC3\xA6", "\xC3\x87" => "\xC3\xA7", "\xC3\x88" => "\xC3\xA8", "\xC3\x89" => "\xC3\xA9",
+ "\xC3\x8A" => "\xC3\xAA", "\xC3\x8B" => "\xC3\xAB", "\xC3\x8C" => "\xC3\xAC", "\xC3\x8D" => "\xC3\xAD",
+ "\xC3\x8E" => "\xC3\xAE", "\xC3\x8F" => "\xC3\xAF", "\xC3\x90" => "\xC3\xB0", "\xC3\x91" => "\xC3\xB1",
+ "\xC3\x92" => "\xC3\xB2", "\xC3\x93" => "\xC3\xB3", "\xC3\x94" => "\xC3\xB4", "\xC3\x95" => "\xC3\xB5",
+ "\xC3\x96" => "\xC3\xB6", "\xC3\x98" => "\xC3\xB8", "\xC3\x99" => "\xC3\xB9", "\xC3\x9A" => "\xC3\xBA",
+ "\xC3\x9B" => "\xC3\xBB", "\xC3\x9C" => "\xC3\xBC", "\xC3\x9D" => "\xC3\xBD", "\xC3\x9E" => "\xC3\xBE",
+ "\xC4\x80" => "\xC4\x81", "\xC4\x82" => "\xC4\x83", "\xC4\x84" => "\xC4\x85", "\xC4\x86" => "\xC4\x87",
+ "\xC4\x88" => "\xC4\x89", "\xC4\x8A" => "\xC4\x8B", "\xC4\x8C" => "\xC4\x8D", "\xC4\x8E" => "\xC4\x8F",
+ "\xC4\x90" => "\xC4\x91", "\xC4\x92" => "\xC4\x93", "\xC4\x96" => "\xC4\x97", "\xC4\x98" => "\xC4\x99",
+ "\xC4\x9A" => "\xC4\x9B", "\xC4\x9C" => "\xC4\x9D", "\xC4\x9E" => "\xC4\x9F", "\xC4\xA0" => "\xC4\xA1",
+ "\xC4\xA2" => "\xC4\xA3", "\xC4\xA4" => "\xC4\xA5", "\xC4\xA6" => "\xC4\xA7", "\xC4\xA8" => "\xC4\xA9",
+ "\xC4\xAA" => "\xC4\xAB", "\xC4\xAE" => "\xC4\xAF", "\xC4\xB4" => "\xC4\xB5", "\xC4\xB6" => "\xC4\xB7",
+ "\xC4\xB9" => "\xC4\xBA", "\xC4\xBB" => "\xC4\xBC", "\xC4\xBD" => "\xC4\xBE", "\xC5\x81" => "\xC5\x82",
+ "\xC5\x83" => "\xC5\x84", "\xC5\x85" => "\xC5\x86", "\xC5\x87" => "\xC5\x88", "\xC5\x8A" => "\xC5\x8B",
+ "\xC5\x8C" => "\xC5\x8D", "\xC5\x90" => "\xC5\x91", "\xC5\x94" => "\xC5\x95", "\xC5\x96" => "\xC5\x97",
+ "\xC5\x98" => "\xC5\x99", "\xC5\x9A" => "\xC5\x9B", "\xC5\x9C" => "\xC5\x9D", "\xC5\x9E" => "\xC5\x9F",
+ "\xC5\xA0" => "\xC5\xA1", "\xC5\xA2" => "\xC5\xA3", "\xC5\xA4" => "\xC5\xA5", "\xC5\xA6" => "\xC5\xA7",
+ "\xC5\xA8" => "\xC5\xA9", "\xC5\xAA" => "\xC5\xAB", "\xC5\xAC" => "\xC5\xAD", "\xC5\xAE" => "\xC5\xAF",
+ "\xC5\xB0" => "\xC5\xB1", "\xC5\xB2" => "\xC5\xB3", "\xC5\xB4" => "\xC5\xB5", "\xC5\xB6" => "\xC5\xB7",
+ "\xC5\xB8" => "\xC3\xBF", "\xC5\xB9" => "\xC5\xBA", "\xC5\xBB" => "\xC5\xBC", "\xC5\xBD" => "\xC5\xBE",
+ "\xC6\xA0" => "\xC6\xA1", "\xC6\xAF" => "\xC6\xB0", "\xC8\x98" => "\xC8\x99", "\xC8\x9A" => "\xC8\x9B",
+ "\xCE\x86" => "\xCE\xAC", "\xCE\x88" => "\xCE\xAD", "\xCE\x89" => "\xCE\xAE", "\xCE\x8A" => "\xCE\xAF",
+ "\xCE\x8C" => "\xCF\x8C", "\xCE\x8E" => "\xCF\x8D", "\xCE\x8F" => "\xCF\x8E", "\xCE\x91" => "\xCE\xB1",
+ "\xCE\x92" => "\xCE\xB2", "\xCE\x93" => "\xCE\xB3", "\xCE\x94" => "\xCE\xB4", "\xCE\x95" => "\xCE\xB5",
+ "\xCE\x96" => "\xCE\xB6", "\xCE\x97" => "\xCE\xB7", "\xCE\x98" => "\xCE\xB8", "\xCE\x99" => "\xCE\xB9",
+ "\xCE\x9A" => "\xCE\xBA", "\xCE\x9B" => "\xCE\xBB", "\xCE\x9C" => "\xCE\xBC", "\xCE\x9D" => "\xCE\xBD",
+ "\xCE\x9E" => "\xCE\xBE", "\xCE\x9F" => "\xCE\xBF", "\xCE\xA0" => "\xCF\x80", "\xCE\xA1" => "\xCF\x81",
+ "\xCE\xA3" => "\xCF\x83", "\xCE\xA4" => "\xCF\x84", "\xCE\xA5" => "\xCF\x85", "\xCE\xA6" => "\xCF\x86",
+ "\xCE\xA7" => "\xCF\x87", "\xCE\xA8" => "\xCF\x88", "\xCE\xA9" => "\xCF\x89", "\xCE\xAA" => "\xCF\x8A",
+ "\xCE\xAB" => "\xCF\x8B", "\xD0\x81" => "\xD1\x91", "\xD0\x82" => "\xD1\x92", "\xD0\x83" => "\xD1\x93",
+ "\xD0\x84" => "\xD1\x94", "\xD0\x85" => "\xD1\x95", "\xD0\x86" => "\xD1\x96", "\xD0\x87" => "\xD1\x97",
+ "\xD0\x88" => "\xD1\x98", "\xD0\x89" => "\xD1\x99", "\xD0\x8A" => "\xD1\x9A", "\xD0\x8B" => "\xD1\x9B",
+ "\xD0\x8C" => "\xD1\x9C", "\xD0\x8E" => "\xD1\x9E", "\xD0\x8F" => "\xD1\x9F", "\xD0\x90" => "\xD0\xB0",
+ "\xD0\x91" => "\xD0\xB1", "\xD0\x92" => "\xD0\xB2", "\xD0\x93" => "\xD0\xB3", "\xD0\x94" => "\xD0\xB4",
+ "\xD0\x95" => "\xD0\xB5", "\xD0\x96" => "\xD0\xB6", "\xD0\x97" => "\xD0\xB7", "\xD0\x98" => "\xD0\xB8",
+ "\xD0\x99" => "\xD0\xB9", "\xD0\x9A" => "\xD0\xBA", "\xD0\x9B" => "\xD0\xBB", "\xD0\x9C" => "\xD0\xBC",
+ "\xD0\x9D" => "\xD0\xBD", "\xD0\x9E" => "\xD0\xBE", "\xD0\x9F" => "\xD0\xBF", "\xD0\xA0" => "\xD1\x80",
+ "\xD0\xA1" => "\xD1\x81", "\xD0\xA2" => "\xD1\x82", "\xD0\xA3" => "\xD1\x83", "\xD0\xA4" => "\xD1\x84",
+ "\xD0\xA5" => "\xD1\x85", "\xD0\xA6" => "\xD1\x86", "\xD0\xA7" => "\xD1\x87", "\xD0\xA8" => "\xD1\x88",
+ "\xD0\xA9" => "\xD1\x89", "\xD0\xAA" => "\xD1\x8A", "\xD0\xAB" => "\xD1\x8B", "\xD0\xAC" => "\xD1\x8C",
+ "\xD0\xAD" => "\xD1\x8D", "\xD0\xAE" => "\xD1\x8E", "\xD0\xAF" => "\xD1\x8F", "\xD2\x90" => "\xD2\x91",
+ "\xE1\xB8\x82" => "\xE1\xB8\x83", "\xE1\xB8\x8A" => "\xE1\xB8\x8B", "\xE1\xB8\x9E" => "\xE1\xB8\x9F", "\xE1\xB9\x80" => "\xE1\xB9\x81",
+ "\xE1\xB9\x96" => "\xE1\xB9\x97", "\xE1\xB9\xA0" => "\xE1\xB9\xA1", "\xE1\xB9\xAA" => "\xE1\xB9\xAB", "\xE1\xBA\x80" => "\xE1\xBA\x81",
+ "\xE1\xBA\x82" => "\xE1\xBA\x83", "\xE1\xBA\x84" => "\xE1\xBA\x85", "\xE1\xBB\xB2" => "\xE1\xBB\xB3"
+ );
+
+ return strtr(strtolower($string), $utf8_upper_to_lower);
+ }
+
+ /**
+ * UTF-8 aware alternative to strtoupper
+ * Make a string uppercase
+ * Note: The concept of a characters "case" only exists is some alphabets
+ * such as Latin, Greek, Cyrillic, Armenian and archaic Georgian - it does
+ * not exist in the Chinese alphabet, for example. See Unicode Standard
+ * Annex #21: Case Mappings
+ *
+ * @param string
+ * @return string string in uppercase
+ */
+ function utf8_strtoupper($string)
+ {
+ static $utf8_lower_to_upper = array(
+ "\xC3\xA0" => "\xC3\x80", "\xC3\xA1" => "\xC3\x81",
+ "\xC3\xA2" => "\xC3\x82", "\xC3\xA3" => "\xC3\x83", "\xC3\xA4" => "\xC3\x84", "\xC3\xA5" => "\xC3\x85",
+ "\xC3\xA6" => "\xC3\x86", "\xC3\xA7" => "\xC3\x87", "\xC3\xA8" => "\xC3\x88", "\xC3\xA9" => "\xC3\x89",
+ "\xC3\xAA" => "\xC3\x8A", "\xC3\xAB" => "\xC3\x8B", "\xC3\xAC" => "\xC3\x8C", "\xC3\xAD" => "\xC3\x8D",
+ "\xC3\xAE" => "\xC3\x8E", "\xC3\xAF" => "\xC3\x8F", "\xC3\xB0" => "\xC3\x90", "\xC3\xB1" => "\xC3\x91",
+ "\xC3\xB2" => "\xC3\x92", "\xC3\xB3" => "\xC3\x93", "\xC3\xB4" => "\xC3\x94", "\xC3\xB5" => "\xC3\x95",
+ "\xC3\xB6" => "\xC3\x96", "\xC3\xB8" => "\xC3\x98", "\xC3\xB9" => "\xC3\x99", "\xC3\xBA" => "\xC3\x9A",
+ "\xC3\xBB" => "\xC3\x9B", "\xC3\xBC" => "\xC3\x9C", "\xC3\xBD" => "\xC3\x9D", "\xC3\xBE" => "\xC3\x9E",
+ "\xC3\xBF" => "\xC5\xB8", "\xC4\x81" => "\xC4\x80", "\xC4\x83" => "\xC4\x82", "\xC4\x85" => "\xC4\x84",
+ "\xC4\x87" => "\xC4\x86", "\xC4\x89" => "\xC4\x88", "\xC4\x8B" => "\xC4\x8A", "\xC4\x8D" => "\xC4\x8C",
+ "\xC4\x8F" => "\xC4\x8E", "\xC4\x91" => "\xC4\x90", "\xC4\x93" => "\xC4\x92", "\xC4\x97" => "\xC4\x96",
+ "\xC4\x99" => "\xC4\x98", "\xC4\x9B" => "\xC4\x9A", "\xC4\x9D" => "\xC4\x9C", "\xC4\x9F" => "\xC4\x9E",
+ "\xC4\xA1" => "\xC4\xA0", "\xC4\xA3" => "\xC4\xA2", "\xC4\xA5" => "\xC4\xA4", "\xC4\xA7" => "\xC4\xA6",
+ "\xC4\xA9" => "\xC4\xA8", "\xC4\xAB" => "\xC4\xAA", "\xC4\xAF" => "\xC4\xAE", "\xC4\xB5" => "\xC4\xB4",
+ "\xC4\xB7" => "\xC4\xB6", "\xC4\xBA" => "\xC4\xB9", "\xC4\xBC" => "\xC4\xBB", "\xC4\xBE" => "\xC4\xBD",
+ "\xC5\x82" => "\xC5\x81", "\xC5\x84" => "\xC5\x83", "\xC5\x86" => "\xC5\x85", "\xC5\x88" => "\xC5\x87",
+ "\xC5\x8B" => "\xC5\x8A", "\xC5\x8D" => "\xC5\x8C", "\xC5\x91" => "\xC5\x90", "\xC5\x95" => "\xC5\x94",
+ "\xC5\x97" => "\xC5\x96", "\xC5\x99" => "\xC5\x98", "\xC5\x9B" => "\xC5\x9A", "\xC5\x9D" => "\xC5\x9C",
+ "\xC5\x9F" => "\xC5\x9E", "\xC5\xA1" => "\xC5\xA0", "\xC5\xA3" => "\xC5\xA2", "\xC5\xA5" => "\xC5\xA4",
+ "\xC5\xA7" => "\xC5\xA6", "\xC5\xA9" => "\xC5\xA8", "\xC5\xAB" => "\xC5\xAA", "\xC5\xAD" => "\xC5\xAC",
+ "\xC5\xAF" => "\xC5\xAE", "\xC5\xB1" => "\xC5\xB0", "\xC5\xB3" => "\xC5\xB2", "\xC5\xB5" => "\xC5\xB4",
+ "\xC5\xB7" => "\xC5\xB6", "\xC5\xBA" => "\xC5\xB9", "\xC5\xBC" => "\xC5\xBB", "\xC5\xBE" => "\xC5\xBD",
+ "\xC6\xA1" => "\xC6\xA0", "\xC6\xB0" => "\xC6\xAF", "\xC8\x99" => "\xC8\x98", "\xC8\x9B" => "\xC8\x9A",
+ "\xCE\xAC" => "\xCE\x86", "\xCE\xAD" => "\xCE\x88", "\xCE\xAE" => "\xCE\x89", "\xCE\xAF" => "\xCE\x8A",
+ "\xCE\xB1" => "\xCE\x91", "\xCE\xB2" => "\xCE\x92", "\xCE\xB3" => "\xCE\x93", "\xCE\xB4" => "\xCE\x94",
+ "\xCE\xB5" => "\xCE\x95", "\xCE\xB6" => "\xCE\x96", "\xCE\xB7" => "\xCE\x97", "\xCE\xB8" => "\xCE\x98",
+ "\xCE\xB9" => "\xCE\x99", "\xCE\xBA" => "\xCE\x9A", "\xCE\xBB" => "\xCE\x9B", "\xCE\xBC" => "\xCE\x9C",
+ "\xCE\xBD" => "\xCE\x9D", "\xCE\xBE" => "\xCE\x9E", "\xCE\xBF" => "\xCE\x9F", "\xCF\x80" => "\xCE\xA0",
+ "\xCF\x81" => "\xCE\xA1", "\xCF\x83" => "\xCE\xA3", "\xCF\x84" => "\xCE\xA4", "\xCF\x85" => "\xCE\xA5",
+ "\xCF\x86" => "\xCE\xA6", "\xCF\x87" => "\xCE\xA7", "\xCF\x88" => "\xCE\xA8", "\xCF\x89" => "\xCE\xA9",
+ "\xCF\x8A" => "\xCE\xAA", "\xCF\x8B" => "\xCE\xAB", "\xCF\x8C" => "\xCE\x8C", "\xCF\x8D" => "\xCE\x8E",
+ "\xCF\x8E" => "\xCE\x8F", "\xD0\xB0" => "\xD0\x90", "\xD0\xB1" => "\xD0\x91", "\xD0\xB2" => "\xD0\x92",
+ "\xD0\xB3" => "\xD0\x93", "\xD0\xB4" => "\xD0\x94", "\xD0\xB5" => "\xD0\x95", "\xD0\xB6" => "\xD0\x96",
+ "\xD0\xB7" => "\xD0\x97", "\xD0\xB8" => "\xD0\x98", "\xD0\xB9" => "\xD0\x99", "\xD0\xBA" => "\xD0\x9A",
+ "\xD0\xBB" => "\xD0\x9B", "\xD0\xBC" => "\xD0\x9C", "\xD0\xBD" => "\xD0\x9D", "\xD0\xBE" => "\xD0\x9E",
+ "\xD0\xBF" => "\xD0\x9F", "\xD1\x80" => "\xD0\xA0", "\xD1\x81" => "\xD0\xA1", "\xD1\x82" => "\xD0\xA2",
+ "\xD1\x83" => "\xD0\xA3", "\xD1\x84" => "\xD0\xA4", "\xD1\x85" => "\xD0\xA5", "\xD1\x86" => "\xD0\xA6",
+ "\xD1\x87" => "\xD0\xA7", "\xD1\x88" => "\xD0\xA8", "\xD1\x89" => "\xD0\xA9", "\xD1\x8A" => "\xD0\xAA",
+ "\xD1\x8B" => "\xD0\xAB", "\xD1\x8C" => "\xD0\xAC", "\xD1\x8D" => "\xD0\xAD", "\xD1\x8E" => "\xD0\xAE",
+ "\xD1\x8F" => "\xD0\xAF", "\xD1\x91" => "\xD0\x81", "\xD1\x92" => "\xD0\x82", "\xD1\x93" => "\xD0\x83",
+ "\xD1\x94" => "\xD0\x84", "\xD1\x95" => "\xD0\x85", "\xD1\x96" => "\xD0\x86", "\xD1\x97" => "\xD0\x87",
+ "\xD1\x98" => "\xD0\x88", "\xD1\x99" => "\xD0\x89", "\xD1\x9A" => "\xD0\x8A", "\xD1\x9B" => "\xD0\x8B",
+ "\xD1\x9C" => "\xD0\x8C", "\xD1\x9E" => "\xD0\x8E", "\xD1\x9F" => "\xD0\x8F", "\xD2\x91" => "\xD2\x90",
+ "\xE1\xB8\x83" => "\xE1\xB8\x82", "\xE1\xB8\x8B" => "\xE1\xB8\x8A", "\xE1\xB8\x9F" => "\xE1\xB8\x9E", "\xE1\xB9\x81" => "\xE1\xB9\x80",
+ "\xE1\xB9\x97" => "\xE1\xB9\x96", "\xE1\xB9\xA1" => "\xE1\xB9\xA0", "\xE1\xB9\xAB" => "\xE1\xB9\xAA", "\xE1\xBA\x81" => "\xE1\xBA\x80",
+ "\xE1\xBA\x83" => "\xE1\xBA\x82", "\xE1\xBA\x85" => "\xE1\xBA\x84", "\xE1\xBB\xB3" => "\xE1\xBB\xB2"
+ );
+
+ return strtr(strtoupper($string), $utf8_lower_to_upper);
+ }
+
+ /**
+ * UTF-8 aware alternative to substr
+ * Return part of a string given character offset (and optionally length)
+ *
+ * Note arguments: comparied to substr - if offset or length are
+ * not integers, this version will not complain but rather massages them
+ * into an integer.
+ *
+ * Note on returned values: substr documentation states false can be
+ * returned in some cases (e.g. offset > string length)
+ * mb_substr never returns false, it will return an empty string instead.
+ * This adopts the mb_substr approach
+ *
+ * Note on implementation: PCRE only supports repetitions of less than
+ * 65536, in order to accept up to MAXINT values for offset and length,
+ * we'll repeat a group of 65535 characters when needed.
+ *
+ * Note on implementation: calculating the number of characters in the
+ * string is a relatively expensive operation, so we only carry it out when
+ * necessary. It isn't necessary for +ve offsets and no specified length
+ *
+ * @author Chris Smith<chris@jalakai.co.uk>
+ * @param string $str
+ * @param integer $offset number of UTF-8 characters offset (from left)
+ * @param integer $length (optional) length in UTF-8 characters from offset
+ * @return mixed string or FALSE if failure
+ */
+ function utf8_substr($str, $offset, $length = NULL)
+ {
+ // generates E_NOTICE
+ // for PHP4 objects, but not PHP5 objects
+ $str = (string) $str;
+ $offset = (int) $offset;
+ if (!is_null($length))
+ {
+ $length = (int) $length;
+ }
+
+ // handle trivial cases
+ if ($length === 0 || ($offset < 0 && $length < 0 && $length < $offset))
+ {
+ return '';
+ }
+
+ // normalise negative offsets (we could use a tail
+ // anchored pattern, but they are horribly slow!)
+ if ($offset < 0)
+ {
+ // see notes
+ $strlen = utf8_strlen($str);
+ $offset = $strlen + $offset;
+ if ($offset < 0)
+ {
+ $offset = 0;
+ }
+ }
+
+ $op = '';
+ $lp = '';
+
+ // establish a pattern for offset, a
+ // non-captured group equal in length to offset
+ if ($offset > 0)
+ {
+ $ox = (int) ($offset / 65535);
+ $oy = $offset % 65535;
+
+ if ($ox)
+ {
+ $op = '(?:.{65535}){' . $ox . '}';
+ }
+
+ $op = '^(?:' . $op . '.{' . $oy . '})';
+ }
+ else
+ {
+ // offset == 0; just anchor the pattern
+ $op = '^';
+ }
+
+ // establish a pattern for length
+ if (is_null($length))
+ {
+ // the rest of the string
+ $lp = '(.*)$';
+ }
+ else
+ {
+ if (!isset($strlen))
+ {
+ // see notes
+ $strlen = utf8_strlen($str);
+ }
+
+ // another trivial case
+ if ($offset > $strlen)
+ {
+ return '';
+ }
+
+ if ($length > 0)
+ {
+ // reduce any length that would
+ // go passed the end of the string
+ $length = min($strlen - $offset, $length);
+
+ $lx = (int) ($length / 65535);
+ $ly = $length % 65535;
+
+ // negative length requires a captured group
+ // of length characters
+ if ($lx)
+ {
+ $lp = '(?:.{65535}){' . $lx . '}';
+ }
+ $lp = '(' . $lp . '.{'. $ly . '})';
+ }
+ else if ($length < 0)
+ {
+ if ($length < ($offset - $strlen))
+ {
+ return '';
+ }
+
+ $lx = (int)((-$length) / 65535);
+ $ly = (-$length) % 65535;
+
+ // negative length requires ... capture everything
+ // except a group of -length characters
+ // anchored at the tail-end of the string
+ if ($lx)
+ {
+ $lp = '(?:.{65535}){' . $lx . '}';
+ }
+ $lp = '(.*)(?:' . $lp . '.{' . $ly . '})$';
+ }
+ }
+
+ if (!preg_match('#' . $op . $lp . '#us', $str, $match))
+ {
+ return '';
+ }
+
+ return $match[1];
+ }
+
+ /**
+ * Return the length (in characters) of a UTF-8 string
+ *
+ * @param string $text UTF-8 string
+ * @return integer Length (in chars) of given string
+ */
+ function utf8_strlen($text)
+ {
+ // Since utf8_decode is replacing multibyte characters to ? strlen works fine
+ return strlen(utf8_decode($text));
+ }
+}
+
+/**
+* UTF-8 aware alternative to str_split
+* Convert a string to an array
+*
+* @author Harry Fuecks
+* @param string $str UTF-8 encoded
+* @param int $split_len number to characters to split string by
+* @return array characters in string reverses
+*/
+function utf8_str_split($str, $split_len = 1)
+{
+ if (!is_int($split_len) || $split_len < 1)
+ {
+ return false;
+ }
+
+ $len = utf8_strlen($str);
+ if ($len <= $split_len)
+ {
+ return array($str);
+ }
+
+ preg_match_all('/.{' . $split_len . '}|[^\x00]{1,' . $split_len . '}$/us', $str, $ar);
+ return $ar[0];
+}
+
+/**
+* UTF-8 aware alternative to strspn
+* Find length of initial segment matching the mask
+*
+* @author Harry Fuecks
+*/
+function utf8_strspn($str, $mask, $start = null, $length = null)
+{
+ if ($start !== null || $length !== null)
+ {
+ $str = utf8_substr($str, $start, $length);
+ }
+
+ preg_match('/^[' . $mask . ']+/u', $str, $matches);
+
+ if (isset($matches[0]))
+ {
+ return utf8_strlen($matches[0]);
+ }
+
+ return 0;
+}
+
+/**
+* UTF-8 aware alternative to ucfirst
+* Make a string's first character uppercase
+*
+* @author Harry Fuecks
+* @param string
+* @return string with first character as upper case (if applicable)
+*/
+function utf8_ucfirst($str)
+{
+ switch (utf8_strlen($str))
+ {
+ case 0:
+ return '';
+ break;
+
+ case 1:
+ return utf8_strtoupper($str);
+ break;
+
+ default:
+ preg_match('/^(.{1})(.*)$/us', $str, $matches);
+ return utf8_strtoupper($matches[1]) . $matches[2];
+ break;
+ }
+}
+
+/**
+* Recode a string to UTF-8
+*
+* If the encoding is not supported, the string is returned as-is
+*
+* @param string $string Original string
+* @param string $encoding Original encoding (lowered)
+* @return string The string, encoded in UTF-8
+*/
+function utf8_recode($string, $encoding)
+{
+ $encoding = strtolower($encoding);
+
+ if ($encoding == 'utf-8' || !is_string($string) || empty($string))
+ {
+ return $string;
+ }
+
+ // we force iso-8859-1 to be cp1252
+ if ($encoding == 'iso-8859-1')
+ {
+ $encoding = 'cp1252';
+ }
+ // convert iso-8859-8-i to iso-8859-8
+ else if ($encoding == 'iso-8859-8-i')
+ {
+ $encoding = 'iso-8859-8';
+ $string = hebrev($string);
+ }
+
+ // First, try iconv()
+ if (function_exists('iconv'))
+ {
+ $ret = @iconv($encoding, 'utf-8', $string);
+
+ if (!empty($ret))
+ {
+ return $ret;
+ }
+ }
+
+ // Try the mb_string extension
+ if (function_exists('mb_convert_encoding'))
+ {
+ // mbstring is nasty on PHP4, we must make *sure* that we send a good encoding
+ switch ($encoding)
+ {
+ case 'iso-8859-1':
+ case 'iso-8859-2':
+ case 'iso-8859-4':
+ case 'iso-8859-7':
+ case 'iso-8859-9':
+ case 'iso-8859-15':
+ case 'windows-1251':
+ case 'windows-1252':
+ case 'cp1252':
+ case 'shift_jis':
+ case 'euc-kr':
+ case 'big5':
+ case 'gb2312':
+ $ret = @mb_convert_encoding($string, 'utf-8', $encoding);
+
+ if (!empty($ret))
+ {
+ return $ret;
+ }
+ }
+ }
+
+ // Try the recode extension
+ if (function_exists('recode_string'))
+ {
+ $ret = @recode_string($encoding . '..utf-8', $string);
+
+ if (!empty($ret))
+ {
+ return $ret;
+ }
+ }
+
+ // If nothing works, check if we have a custom transcoder available
+ if (!preg_match('#^[a-z0-9_ \\-]+$#', $encoding))
+ {
+ // Make sure the encoding name is alphanumeric, we don't want it to be abused into loading arbitrary files
+ trigger_error('Unknown encoding: ' . $encoding, E_USER_ERROR);
+ }
+
+ global $phpbb_root_path, $phpEx;
+
+ // iso-8859-* character encoding
+ if (preg_match('/iso[_ -]?8859[_ -]?(\\d+)/', $encoding, $array))
+ {
+ switch ($array[1])
+ {
+ case '1':
+ case '2':
+ case '4':
+ case '7':
+ case '8':
+ case '9':
+ case '15':
+ if (!function_exists('iso_8859_' . $array[1]))
+ {
+ if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx))
+ {
+ trigger_error('Basic reencoder file is missing', E_USER_ERROR);
+ }
+ include($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx);
+ }
+ return call_user_func('iso_8859_' . $array[1], $string);
+ break;
+
+ default:
+ trigger_error('Unknown encoding: ' . $encoding, E_USER_ERROR);
+ break;
+ }
+ }
+
+ // CP/WIN character encoding
+ if (preg_match('/(?:cp|windows)[_\- ]?(\\d+)/', $encoding, $array))
+ {
+ switch ($array[1])
+ {
+ case '932':
+ break;
+ case '1250':
+ case '1251':
+ case '1252':
+ case '1254':
+ case '1255':
+ case '1256':
+ case '1257':
+ case '874':
+ if (!function_exists('cp' . $array[1]))
+ {
+ if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx))
+ {
+ trigger_error('Basic reencoder file is missing', E_USER_ERROR);
+ }
+ include($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx);
+ }
+ return call_user_func('cp' . $array[1], $string);
+ break;
+
+ default:
+ trigger_error('Unknown encoding: ' . $encoding, E_USER_ERROR);
+ break;
+ }
+ }
+
+ // TIS-620
+ if (preg_match('/tis[_ -]?620/', $encoding))
+ {
+ if (!function_exists('tis_620'))
+ {
+ if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx))
+ {
+ trigger_error('Basic reencoder file is missing', E_USER_ERROR);
+ }
+ include($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx);
+ }
+ return tis_620($string);
+ }
+
+ // SJIS
+ if (preg_match('/sjis(?:[_ -]?win)?|(?:cp|ibm)[_ -]?932|shift[_ -]?jis/', $encoding))
+ {
+ if (!function_exists('sjis'))
+ {
+ if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx))
+ {
+ trigger_error('CJK reencoder file is missing', E_USER_ERROR);
+ }
+ include($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx);
+ }
+ return sjis($string);
+ }
+
+ // EUC_KR
+ if (preg_match('/euc[_ -]?kr/', $encoding))
+ {
+ if (!function_exists('euc_kr'))
+ {
+ if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx))
+ {
+ trigger_error('CJK reencoder file is missing', E_USER_ERROR);
+ }
+ include($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx);
+ }
+ return euc_kr($string);
+ }
+
+ // BIG-5
+ if (preg_match('/big[_ -]?5/', $encoding))
+ {
+ if (!function_exists('big5'))
+ {
+ if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx))
+ {
+ trigger_error('CJK reencoder file is missing', E_USER_ERROR);
+ }
+ include($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx);
+ }
+ return big5($string);
+ }
+
+ // GB2312
+ if (preg_match('/gb[_ -]?2312/', $encoding))
+ {
+ if (!function_exists('gb2312'))
+ {
+ if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx))
+ {
+ trigger_error('CJK reencoder file is missing', E_USER_ERROR);
+ }
+ include($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx);
+ }
+ return gb2312($string);
+ }
+
+ // Trigger an error?! Fow now just give bad data :-(
+ trigger_error('Unknown encoding: ' . $encoding, E_USER_ERROR);
+ //return $string; // use utf_normalizer::cleanup() ?
+}
+
+/**
+* Replace all UTF-8 chars that are not in ASCII with their NCR
+*
+* @param string $text UTF-8 string in NFC
+* @return string ASCII string using NCRs for non-ASCII chars
+*/
+function utf8_encode_ncr($text)
+{
+ return preg_replace_callback('#[\\xC2-\\xF4][\\x80-\\xBF]{1,3}#', 'utf8_encode_ncr_callback', $text);
+}
+
+/**
+* Callback used in encode_ncr()
+*
+* Takes a UTF-8 char and replaces it with its NCR. Attention, $m is an array
+*
+* @param array $m 0-based numerically indexed array passed by preg_replace_callback()
+* @return string A HTML NCR if the character is valid, or the original string otherwise
+*/
+function utf8_encode_ncr_callback($m)
+{
+ return '&#' . utf8_ord($m[0]) . ';';
+}
+
+/**
+* Converts a UTF-8 char to an NCR
+*
+* @param string $chr UTF-8 char
+* @return integer UNICODE code point
+*/
+function utf8_ord($chr)
+{
+ switch (strlen($chr))
+ {
+ case 1:
+ return ord($chr);
+ break;
+
+ case 2:
+ return ((ord($chr[0]) & 0x1F) << 6) | (ord($chr[1]) & 0x3F);
+ break;
+
+ case 3:
+ return ((ord($chr[0]) & 0x0F) << 12) | ((ord($chr[1]) & 0x3F) << 6) | (ord($chr[2]) & 0x3F);
+ break;
+
+ case 4:
+ return ((ord($chr[0]) & 0x07) << 18) | ((ord($chr[1]) & 0x3F) << 12) | ((ord($chr[2]) & 0x3F) << 6) | (ord($chr[3]) & 0x3F);
+ break;
+
+ default:
+ return $chr;
+ }
+}
+
+/**
+* Converts an NCR to a UTF-8 char
+*
+* @param int $cp UNICODE code point
+* @return string UTF-8 char
+*/
+function utf8_chr($cp)
+{
+ if ($cp > 0xFFFF)
+ {
+ return chr(0xF0 | ($cp >> 18)) . chr(0x80 | (($cp >> 12) & 0x3F)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else if ($cp > 0x7FF)
+ {
+ return chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else if ($cp > 0x7F)
+ {
+ return chr(0xC0 | ($cp >> 6)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else
+ {
+ return chr($cp);
+ }
+}
+
+/**
+* Convert Numeric Character References to UTF-8 chars
+*
+* Notes:
+* - we do not convert NCRs recursively, if you pass &#38;#38; it will return &#38;
+* - we DO NOT check for the existence of the Unicode characters, therefore an entity may be converted to an inexistent codepoint
+*
+* @param string $text String to convert, encoded in UTF-8 (no normal form required)
+* @return string UTF-8 string where NCRs have been replaced with the actual chars
+*/
+function utf8_decode_ncr($text)
+{
+ return preg_replace_callback('/&#([0-9]{1,6}|x[0-9A-F]{1,5});/i', 'utf8_decode_ncr_callback', $text);
+}
+
+/**
+* Callback used in decode_ncr()
+*
+* Takes a NCR (in decimal or hexadecimal) and returns a UTF-8 char. Attention, $m is an array.
+* It will ignore most of invalid NCRs, but not all!
+*
+* @param array $m 0-based numerically indexed array passed by preg_replace_callback()
+* @return string UTF-8 char
+*/
+function utf8_decode_ncr_callback($m)
+{
+ $cp = (strncasecmp($m[1], 'x', 1)) ? $m[1] : hexdec(substr($m[1], 1));
+
+ return utf8_chr($cp);
+}
+
+/**
+* Case folds a unicode string as per Unicode 5.0, section 3.13
+*
+* @param string $text text to be case folded
+* @param string $option determines how we will fold the cases
+* @return string case folded text
+*/
+function utf8_case_fold($text, $option = 'full')
+{
+ static $uniarray = array();
+ global $phpbb_root_path, $phpEx;
+
+ // common is always set
+ if (!isset($uniarray['c']))
+ {
+ $uniarray['c'] = include($phpbb_root_path . 'includes/utf/data/case_fold_c.' . $phpEx);
+ }
+
+ // only set full if we need to
+ if ($option === 'full' && !isset($uniarray['f']))
+ {
+ $uniarray['f'] = include($phpbb_root_path . 'includes/utf/data/case_fold_f.' . $phpEx);
+ }
+
+ // only set simple if we need to
+ if ($option !== 'full' && !isset($uniarray['s']))
+ {
+ $uniarray['s'] = include($phpbb_root_path . 'includes/utf/data/case_fold_s.' . $phpEx);
+ }
+
+ // common is always replaced
+ $text = strtr($text, $uniarray['c']);
+
+ if ($option === 'full')
+ {
+ // full replaces a character with multiple characters
+ $text = strtr($text, $uniarray['f']);
+ }
+ else
+ {
+ // simple replaces a character with another character
+ $text = strtr($text, $uniarray['s']);
+ }
+
+ return $text;
+}
+
+/**
+* Takes the input and does a "special" case fold. It does minor normalization
+* and returns NFKC compatable text
+*
+* @param string $text text to be case folded
+* @param string $option determines how we will fold the cases
+* @return string case folded text
+*/
+function utf8_case_fold_nfkc($text, $option = 'full')
+{
+ static $fc_nfkc_closure = array(
+ "\xCD\xBA" => "\x20\xCE\xB9",
+ "\xCF\x92" => "\xCF\x85",
+ "\xCF\x93" => "\xCF\x8D",
+ "\xCF\x94" => "\xCF\x8B",
+ "\xCF\xB2" => "\xCF\x83",
+ "\xCF\xB9" => "\xCF\x83",
+ "\xE1\xB4\xAC" => "\x61",
+ "\xE1\xB4\xAD" => "\xC3\xA6",
+ "\xE1\xB4\xAE" => "\x62",
+ "\xE1\xB4\xB0" => "\x64",
+ "\xE1\xB4\xB1" => "\x65",
+ "\xE1\xB4\xB2" => "\xC7\x9D",
+ "\xE1\xB4\xB3" => "\x67",
+ "\xE1\xB4\xB4" => "\x68",
+ "\xE1\xB4\xB5" => "\x69",
+ "\xE1\xB4\xB6" => "\x6A",
+ "\xE1\xB4\xB7" => "\x6B",
+ "\xE1\xB4\xB8" => "\x6C",
+ "\xE1\xB4\xB9" => "\x6D",
+ "\xE1\xB4\xBA" => "\x6E",
+ "\xE1\xB4\xBC" => "\x6F",
+ "\xE1\xB4\xBD" => "\xC8\xA3",
+ "\xE1\xB4\xBE" => "\x70",
+ "\xE1\xB4\xBF" => "\x72",
+ "\xE1\xB5\x80" => "\x74",
+ "\xE1\xB5\x81" => "\x75",
+ "\xE1\xB5\x82" => "\x77",
+ "\xE2\x82\xA8" => "\x72\x73",
+ "\xE2\x84\x82" => "\x63",
+ "\xE2\x84\x83" => "\xC2\xB0\x63",
+ "\xE2\x84\x87" => "\xC9\x9B",
+ "\xE2\x84\x89" => "\xC2\xB0\x66",
+ "\xE2\x84\x8B" => "\x68",
+ "\xE2\x84\x8C" => "\x68",
+ "\xE2\x84\x8D" => "\x68",
+ "\xE2\x84\x90" => "\x69",
+ "\xE2\x84\x91" => "\x69",
+ "\xE2\x84\x92" => "\x6C",
+ "\xE2\x84\x95" => "\x6E",
+ "\xE2\x84\x96" => "\x6E\x6F",
+ "\xE2\x84\x99" => "\x70",
+ "\xE2\x84\x9A" => "\x71",
+ "\xE2\x84\x9B" => "\x72",
+ "\xE2\x84\x9C" => "\x72",
+ "\xE2\x84\x9D" => "\x72",
+ "\xE2\x84\xA0" => "\x73\x6D",
+ "\xE2\x84\xA1" => "\x74\x65\x6C",
+ "\xE2\x84\xA2" => "\x74\x6D",
+ "\xE2\x84\xA4" => "\x7A",
+ "\xE2\x84\xA8" => "\x7A",
+ "\xE2\x84\xAC" => "\x62",
+ "\xE2\x84\xAD" => "\x63",
+ "\xE2\x84\xB0" => "\x65",
+ "\xE2\x84\xB1" => "\x66",
+ "\xE2\x84\xB3" => "\x6D",
+ "\xE2\x84\xBB" => "\x66\x61\x78",
+ "\xE2\x84\xBE" => "\xCE\xB3",
+ "\xE2\x84\xBF" => "\xCF\x80",
+ "\xE2\x85\x85" => "\x64",
+ "\xE3\x89\x90" => "\x70\x74\x65",
+ "\xE3\x8B\x8C" => "\x68\x67",
+ "\xE3\x8B\x8E" => "\x65\x76",
+ "\xE3\x8B\x8F" => "\x6C\x74\x64",
+ "\xE3\x8D\xB1" => "\x68\x70\x61",
+ "\xE3\x8D\xB3" => "\x61\x75",
+ "\xE3\x8D\xB5" => "\x6F\x76",
+ "\xE3\x8D\xBA" => "\x69\x75",
+ "\xE3\x8E\x80" => "\x70\x61",
+ "\xE3\x8E\x81" => "\x6E\x61",
+ "\xE3\x8E\x82" => "\xCE\xBC\x61",
+ "\xE3\x8E\x83" => "\x6D\x61",
+ "\xE3\x8E\x84" => "\x6B\x61",
+ "\xE3\x8E\x85" => "\x6B\x62",
+ "\xE3\x8E\x86" => "\x6D\x62",
+ "\xE3\x8E\x87" => "\x67\x62",
+ "\xE3\x8E\x8A" => "\x70\x66",
+ "\xE3\x8E\x8B" => "\x6E\x66",
+ "\xE3\x8E\x8C" => "\xCE\xBC\x66",
+ "\xE3\x8E\x90" => "\x68\x7A",
+ "\xE3\x8E\x91" => "\x6B\x68\x7A",
+ "\xE3\x8E\x92" => "\x6D\x68\x7A",
+ "\xE3\x8E\x93" => "\x67\x68\x7A",
+ "\xE3\x8E\x94" => "\x74\x68\x7A",
+ "\xE3\x8E\xA9" => "\x70\x61",
+ "\xE3\x8E\xAA" => "\x6B\x70\x61",
+ "\xE3\x8E\xAB" => "\x6D\x70\x61",
+ "\xE3\x8E\xAC" => "\x67\x70\x61",
+ "\xE3\x8E\xB4" => "\x70\x76",
+ "\xE3\x8E\xB5" => "\x6E\x76",
+ "\xE3\x8E\xB6" => "\xCE\xBC\x76",
+ "\xE3\x8E\xB7" => "\x6D\x76",
+ "\xE3\x8E\xB8" => "\x6B\x76",
+ "\xE3\x8E\xB9" => "\x6D\x76",
+ "\xE3\x8E\xBA" => "\x70\x77",
+ "\xE3\x8E\xBB" => "\x6E\x77",
+ "\xE3\x8E\xBC" => "\xCE\xBC\x77",
+ "\xE3\x8E\xBD" => "\x6D\x77",
+ "\xE3\x8E\xBE" => "\x6B\x77",
+ "\xE3\x8E\xBF" => "\x6D\x77",
+ "\xE3\x8F\x80" => "\x6B\xCF\x89",
+ "\xE3\x8F\x81" => "\x6D\xCF\x89",
+ "\xE3\x8F\x83" => "\x62\x71",
+ "\xE3\x8F\x86" => "\x63\xE2\x88\x95\x6B\x67",
+ "\xE3\x8F\x87" => "\x63\x6F\x2E",
+ "\xE3\x8F\x88" => "\x64\x62",
+ "\xE3\x8F\x89" => "\x67\x79",
+ "\xE3\x8F\x8B" => "\x68\x70",
+ "\xE3\x8F\x8D" => "\x6B\x6B",
+ "\xE3\x8F\x8E" => "\x6B\x6D",
+ "\xE3\x8F\x97" => "\x70\x68",
+ "\xE3\x8F\x99" => "\x70\x70\x6D",
+ "\xE3\x8F\x9A" => "\x70\x72",
+ "\xE3\x8F\x9C" => "\x73\x76",
+ "\xE3\x8F\x9D" => "\x77\x62",
+ "\xE3\x8F\x9E" => "\x76\xE2\x88\x95\x6D",
+ "\xE3\x8F\x9F" => "\x61\xE2\x88\x95\x6D",
+ "\xF0\x9D\x90\x80" => "\x61",
+ "\xF0\x9D\x90\x81" => "\x62",
+ "\xF0\x9D\x90\x82" => "\x63",
+ "\xF0\x9D\x90\x83" => "\x64",
+ "\xF0\x9D\x90\x84" => "\x65",
+ "\xF0\x9D\x90\x85" => "\x66",
+ "\xF0\x9D\x90\x86" => "\x67",
+ "\xF0\x9D\x90\x87" => "\x68",
+ "\xF0\x9D\x90\x88" => "\x69",
+ "\xF0\x9D\x90\x89" => "\x6A",
+ "\xF0\x9D\x90\x8A" => "\x6B",
+ "\xF0\x9D\x90\x8B" => "\x6C",
+ "\xF0\x9D\x90\x8C" => "\x6D",
+ "\xF0\x9D\x90\x8D" => "\x6E",
+ "\xF0\x9D\x90\x8E" => "\x6F",
+ "\xF0\x9D\x90\x8F" => "\x70",
+ "\xF0\x9D\x90\x90" => "\x71",
+ "\xF0\x9D\x90\x91" => "\x72",
+ "\xF0\x9D\x90\x92" => "\x73",
+ "\xF0\x9D\x90\x93" => "\x74",
+ "\xF0\x9D\x90\x94" => "\x75",
+ "\xF0\x9D\x90\x95" => "\x76",
+ "\xF0\x9D\x90\x96" => "\x77",
+ "\xF0\x9D\x90\x97" => "\x78",
+ "\xF0\x9D\x90\x98" => "\x79",
+ "\xF0\x9D\x90\x99" => "\x7A",
+ "\xF0\x9D\x90\xB4" => "\x61",
+ "\xF0\x9D\x90\xB5" => "\x62",
+ "\xF0\x9D\x90\xB6" => "\x63",
+ "\xF0\x9D\x90\xB7" => "\x64",
+ "\xF0\x9D\x90\xB8" => "\x65",
+ "\xF0\x9D\x90\xB9" => "\x66",
+ "\xF0\x9D\x90\xBA" => "\x67",
+ "\xF0\x9D\x90\xBB" => "\x68",
+ "\xF0\x9D\x90\xBC" => "\x69",
+ "\xF0\x9D\x90\xBD" => "\x6A",
+ "\xF0\x9D\x90\xBE" => "\x6B",
+ "\xF0\x9D\x90\xBF" => "\x6C",
+ "\xF0\x9D\x91\x80" => "\x6D",
+ "\xF0\x9D\x91\x81" => "\x6E",
+ "\xF0\x9D\x91\x82" => "\x6F",
+ "\xF0\x9D\x91\x83" => "\x70",
+ "\xF0\x9D\x91\x84" => "\x71",
+ "\xF0\x9D\x91\x85" => "\x72",
+ "\xF0\x9D\x91\x86" => "\x73",
+ "\xF0\x9D\x91\x87" => "\x74",
+ "\xF0\x9D\x91\x88" => "\x75",
+ "\xF0\x9D\x91\x89" => "\x76",
+ "\xF0\x9D\x91\x8A" => "\x77",
+ "\xF0\x9D\x91\x8B" => "\x78",
+ "\xF0\x9D\x91\x8C" => "\x79",
+ "\xF0\x9D\x91\x8D" => "\x7A",
+ "\xF0\x9D\x91\xA8" => "\x61",
+ "\xF0\x9D\x91\xA9" => "\x62",
+ "\xF0\x9D\x91\xAA" => "\x63",
+ "\xF0\x9D\x91\xAB" => "\x64",
+ "\xF0\x9D\x91\xAC" => "\x65",
+ "\xF0\x9D\x91\xAD" => "\x66",
+ "\xF0\x9D\x91\xAE" => "\x67",
+ "\xF0\x9D\x91\xAF" => "\x68",
+ "\xF0\x9D\x91\xB0" => "\x69",
+ "\xF0\x9D\x91\xB1" => "\x6A",
+ "\xF0\x9D\x91\xB2" => "\x6B",
+ "\xF0\x9D\x91\xB3" => "\x6C",
+ "\xF0\x9D\x91\xB4" => "\x6D",
+ "\xF0\x9D\x91\xB5" => "\x6E",
+ "\xF0\x9D\x91\xB6" => "\x6F",
+ "\xF0\x9D\x91\xB7" => "\x70",
+ "\xF0\x9D\x91\xB8" => "\x71",
+ "\xF0\x9D\x91\xB9" => "\x72",
+ "\xF0\x9D\x91\xBA" => "\x73",
+ "\xF0\x9D\x91\xBB" => "\x74",
+ "\xF0\x9D\x91\xBC" => "\x75",
+ "\xF0\x9D\x91\xBD" => "\x76",
+ "\xF0\x9D\x91\xBE" => "\x77",
+ "\xF0\x9D\x91\xBF" => "\x78",
+ "\xF0\x9D\x92\x80" => "\x79",
+ "\xF0\x9D\x92\x81" => "\x7A",
+ "\xF0\x9D\x92\x9C" => "\x61",
+ "\xF0\x9D\x92\x9E" => "\x63",
+ "\xF0\x9D\x92\x9F" => "\x64",
+ "\xF0\x9D\x92\xA2" => "\x67",
+ "\xF0\x9D\x92\xA5" => "\x6A",
+ "\xF0\x9D\x92\xA6" => "\x6B",
+ "\xF0\x9D\x92\xA9" => "\x6E",
+ "\xF0\x9D\x92\xAA" => "\x6F",
+ "\xF0\x9D\x92\xAB" => "\x70",
+ "\xF0\x9D\x92\xAC" => "\x71",
+ "\xF0\x9D\x92\xAE" => "\x73",
+ "\xF0\x9D\x92\xAF" => "\x74",
+ "\xF0\x9D\x92\xB0" => "\x75",
+ "\xF0\x9D\x92\xB1" => "\x76",
+ "\xF0\x9D\x92\xB2" => "\x77",
+ "\xF0\x9D\x92\xB3" => "\x78",
+ "\xF0\x9D\x92\xB4" => "\x79",
+ "\xF0\x9D\x92\xB5" => "\x7A",
+ "\xF0\x9D\x93\x90" => "\x61",
+ "\xF0\x9D\x93\x91" => "\x62",
+ "\xF0\x9D\x93\x92" => "\x63",
+ "\xF0\x9D\x93\x93" => "\x64",
+ "\xF0\x9D\x93\x94" => "\x65",
+ "\xF0\x9D\x93\x95" => "\x66",
+ "\xF0\x9D\x93\x96" => "\x67",
+ "\xF0\x9D\x93\x97" => "\x68",
+ "\xF0\x9D\x93\x98" => "\x69",
+ "\xF0\x9D\x93\x99" => "\x6A",
+ "\xF0\x9D\x93\x9A" => "\x6B",
+ "\xF0\x9D\x93\x9B" => "\x6C",
+ "\xF0\x9D\x93\x9C" => "\x6D",
+ "\xF0\x9D\x93\x9D" => "\x6E",
+ "\xF0\x9D\x93\x9E" => "\x6F",
+ "\xF0\x9D\x93\x9F" => "\x70",
+ "\xF0\x9D\x93\xA0" => "\x71",
+ "\xF0\x9D\x93\xA1" => "\x72",
+ "\xF0\x9D\x93\xA2" => "\x73",
+ "\xF0\x9D\x93\xA3" => "\x74",
+ "\xF0\x9D\x93\xA4" => "\x75",
+ "\xF0\x9D\x93\xA5" => "\x76",
+ "\xF0\x9D\x93\xA6" => "\x77",
+ "\xF0\x9D\x93\xA7" => "\x78",
+ "\xF0\x9D\x93\xA8" => "\x79",
+ "\xF0\x9D\x93\xA9" => "\x7A",
+ "\xF0\x9D\x94\x84" => "\x61",
+ "\xF0\x9D\x94\x85" => "\x62",
+ "\xF0\x9D\x94\x87" => "\x64",
+ "\xF0\x9D\x94\x88" => "\x65",
+ "\xF0\x9D\x94\x89" => "\x66",
+ "\xF0\x9D\x94\x8A" => "\x67",
+ "\xF0\x9D\x94\x8D" => "\x6A",
+ "\xF0\x9D\x94\x8E" => "\x6B",
+ "\xF0\x9D\x94\x8F" => "\x6C",
+ "\xF0\x9D\x94\x90" => "\x6D",
+ "\xF0\x9D\x94\x91" => "\x6E",
+ "\xF0\x9D\x94\x92" => "\x6F",
+ "\xF0\x9D\x94\x93" => "\x70",
+ "\xF0\x9D\x94\x94" => "\x71",
+ "\xF0\x9D\x94\x96" => "\x73",
+ "\xF0\x9D\x94\x97" => "\x74",
+ "\xF0\x9D\x94\x98" => "\x75",
+ "\xF0\x9D\x94\x99" => "\x76",
+ "\xF0\x9D\x94\x9A" => "\x77",
+ "\xF0\x9D\x94\x9B" => "\x78",
+ "\xF0\x9D\x94\x9C" => "\x79",
+ "\xF0\x9D\x94\xB8" => "\x61",
+ "\xF0\x9D\x94\xB9" => "\x62",
+ "\xF0\x9D\x94\xBB" => "\x64",
+ "\xF0\x9D\x94\xBC" => "\x65",
+ "\xF0\x9D\x94\xBD" => "\x66",
+ "\xF0\x9D\x94\xBE" => "\x67",
+ "\xF0\x9D\x95\x80" => "\x69",
+ "\xF0\x9D\x95\x81" => "\x6A",
+ "\xF0\x9D\x95\x82" => "\x6B",
+ "\xF0\x9D\x95\x83" => "\x6C",
+ "\xF0\x9D\x95\x84" => "\x6D",
+ "\xF0\x9D\x95\x86" => "\x6F",
+ "\xF0\x9D\x95\x8A" => "\x73",
+ "\xF0\x9D\x95\x8B" => "\x74",
+ "\xF0\x9D\x95\x8C" => "\x75",
+ "\xF0\x9D\x95\x8D" => "\x76",
+ "\xF0\x9D\x95\x8E" => "\x77",
+ "\xF0\x9D\x95\x8F" => "\x78",
+ "\xF0\x9D\x95\x90" => "\x79",
+ "\xF0\x9D\x95\xAC" => "\x61",
+ "\xF0\x9D\x95\xAD" => "\x62",
+ "\xF0\x9D\x95\xAE" => "\x63",
+ "\xF0\x9D\x95\xAF" => "\x64",
+ "\xF0\x9D\x95\xB0" => "\x65",
+ "\xF0\x9D\x95\xB1" => "\x66",
+ "\xF0\x9D\x95\xB2" => "\x67",
+ "\xF0\x9D\x95\xB3" => "\x68",
+ "\xF0\x9D\x95\xB4" => "\x69",
+ "\xF0\x9D\x95\xB5" => "\x6A",
+ "\xF0\x9D\x95\xB6" => "\x6B",
+ "\xF0\x9D\x95\xB7" => "\x6C",
+ "\xF0\x9D\x95\xB8" => "\x6D",
+ "\xF0\x9D\x95\xB9" => "\x6E",
+ "\xF0\x9D\x95\xBA" => "\x6F",
+ "\xF0\x9D\x95\xBB" => "\x70",
+ "\xF0\x9D\x95\xBC" => "\x71",
+ "\xF0\x9D\x95\xBD" => "\x72",
+ "\xF0\x9D\x95\xBE" => "\x73",
+ "\xF0\x9D\x95\xBF" => "\x74",
+ "\xF0\x9D\x96\x80" => "\x75",
+ "\xF0\x9D\x96\x81" => "\x76",
+ "\xF0\x9D\x96\x82" => "\x77",
+ "\xF0\x9D\x96\x83" => "\x78",
+ "\xF0\x9D\x96\x84" => "\x79",
+ "\xF0\x9D\x96\x85" => "\x7A",
+ "\xF0\x9D\x96\xA0" => "\x61",
+ "\xF0\x9D\x96\xA1" => "\x62",
+ "\xF0\x9D\x96\xA2" => "\x63",
+ "\xF0\x9D\x96\xA3" => "\x64",
+ "\xF0\x9D\x96\xA4" => "\x65",
+ "\xF0\x9D\x96\xA5" => "\x66",
+ "\xF0\x9D\x96\xA6" => "\x67",
+ "\xF0\x9D\x96\xA7" => "\x68",
+ "\xF0\x9D\x96\xA8" => "\x69",
+ "\xF0\x9D\x96\xA9" => "\x6A",
+ "\xF0\x9D\x96\xAA" => "\x6B",
+ "\xF0\x9D\x96\xAB" => "\x6C",
+ "\xF0\x9D\x96\xAC" => "\x6D",
+ "\xF0\x9D\x96\xAD" => "\x6E",
+ "\xF0\x9D\x96\xAE" => "\x6F",
+ "\xF0\x9D\x96\xAF" => "\x70",
+ "\xF0\x9D\x96\xB0" => "\x71",
+ "\xF0\x9D\x96\xB1" => "\x72",
+ "\xF0\x9D\x96\xB2" => "\x73",
+ "\xF0\x9D\x96\xB3" => "\x74",
+ "\xF0\x9D\x96\xB4" => "\x75",
+ "\xF0\x9D\x96\xB5" => "\x76",
+ "\xF0\x9D\x96\xB6" => "\x77",
+ "\xF0\x9D\x96\xB7" => "\x78",
+ "\xF0\x9D\x96\xB8" => "\x79",
+ "\xF0\x9D\x96\xB9" => "\x7A",
+ "\xF0\x9D\x97\x94" => "\x61",
+ "\xF0\x9D\x97\x95" => "\x62",
+ "\xF0\x9D\x97\x96" => "\x63",
+ "\xF0\x9D\x97\x97" => "\x64",
+ "\xF0\x9D\x97\x98" => "\x65",
+ "\xF0\x9D\x97\x99" => "\x66",
+ "\xF0\x9D\x97\x9A" => "\x67",
+ "\xF0\x9D\x97\x9B" => "\x68",
+ "\xF0\x9D\x97\x9C" => "\x69",
+ "\xF0\x9D\x97\x9D" => "\x6A",
+ "\xF0\x9D\x97\x9E" => "\x6B",
+ "\xF0\x9D\x97\x9F" => "\x6C",
+ "\xF0\x9D\x97\xA0" => "\x6D",
+ "\xF0\x9D\x97\xA1" => "\x6E",
+ "\xF0\x9D\x97\xA2" => "\x6F",
+ "\xF0\x9D\x97\xA3" => "\x70",
+ "\xF0\x9D\x97\xA4" => "\x71",
+ "\xF0\x9D\x97\xA5" => "\x72",
+ "\xF0\x9D\x97\xA6" => "\x73",
+ "\xF0\x9D\x97\xA7" => "\x74",
+ "\xF0\x9D\x97\xA8" => "\x75",
+ "\xF0\x9D\x97\xA9" => "\x76",
+ "\xF0\x9D\x97\xAA" => "\x77",
+ "\xF0\x9D\x97\xAB" => "\x78",
+ "\xF0\x9D\x97\xAC" => "\x79",
+ "\xF0\x9D\x97\xAD" => "\x7A",
+ "\xF0\x9D\x98\x88" => "\x61",
+ "\xF0\x9D\x98\x89" => "\x62",
+ "\xF0\x9D\x98\x8A" => "\x63",
+ "\xF0\x9D\x98\x8B" => "\x64",
+ "\xF0\x9D\x98\x8C" => "\x65",
+ "\xF0\x9D\x98\x8D" => "\x66",
+ "\xF0\x9D\x98\x8E" => "\x67",
+ "\xF0\x9D\x98\x8F" => "\x68",
+ "\xF0\x9D\x98\x90" => "\x69",
+ "\xF0\x9D\x98\x91" => "\x6A",
+ "\xF0\x9D\x98\x92" => "\x6B",
+ "\xF0\x9D\x98\x93" => "\x6C",
+ "\xF0\x9D\x98\x94" => "\x6D",
+ "\xF0\x9D\x98\x95" => "\x6E",
+ "\xF0\x9D\x98\x96" => "\x6F",
+ "\xF0\x9D\x98\x97" => "\x70",
+ "\xF0\x9D\x98\x98" => "\x71",
+ "\xF0\x9D\x98\x99" => "\x72",
+ "\xF0\x9D\x98\x9A" => "\x73",
+ "\xF0\x9D\x98\x9B" => "\x74",
+ "\xF0\x9D\x98\x9C" => "\x75",
+ "\xF0\x9D\x98\x9D" => "\x76",
+ "\xF0\x9D\x98\x9E" => "\x77",
+ "\xF0\x9D\x98\x9F" => "\x78",
+ "\xF0\x9D\x98\xA0" => "\x79",
+ "\xF0\x9D\x98\xA1" => "\x7A",
+ "\xF0\x9D\x98\xBC" => "\x61",
+ "\xF0\x9D\x98\xBD" => "\x62",
+ "\xF0\x9D\x98\xBE" => "\x63",
+ "\xF0\x9D\x98\xBF" => "\x64",
+ "\xF0\x9D\x99\x80" => "\x65",
+ "\xF0\x9D\x99\x81" => "\x66",
+ "\xF0\x9D\x99\x82" => "\x67",
+ "\xF0\x9D\x99\x83" => "\x68",
+ "\xF0\x9D\x99\x84" => "\x69",
+ "\xF0\x9D\x99\x85" => "\x6A",
+ "\xF0\x9D\x99\x86" => "\x6B",
+ "\xF0\x9D\x99\x87" => "\x6C",
+ "\xF0\x9D\x99\x88" => "\x6D",
+ "\xF0\x9D\x99\x89" => "\x6E",
+ "\xF0\x9D\x99\x8A" => "\x6F",
+ "\xF0\x9D\x99\x8B" => "\x70",
+ "\xF0\x9D\x99\x8C" => "\x71",
+ "\xF0\x9D\x99\x8D" => "\x72",
+ "\xF0\x9D\x99\x8E" => "\x73",
+ "\xF0\x9D\x99\x8F" => "\x74",
+ "\xF0\x9D\x99\x90" => "\x75",
+ "\xF0\x9D\x99\x91" => "\x76",
+ "\xF0\x9D\x99\x92" => "\x77",
+ "\xF0\x9D\x99\x93" => "\x78",
+ "\xF0\x9D\x99\x94" => "\x79",
+ "\xF0\x9D\x99\x95" => "\x7A",
+ "\xF0\x9D\x99\xB0" => "\x61",
+ "\xF0\x9D\x99\xB1" => "\x62",
+ "\xF0\x9D\x99\xB2" => "\x63",
+ "\xF0\x9D\x99\xB3" => "\x64",
+ "\xF0\x9D\x99\xB4" => "\x65",
+ "\xF0\x9D\x99\xB5" => "\x66",
+ "\xF0\x9D\x99\xB6" => "\x67",
+ "\xF0\x9D\x99\xB7" => "\x68",
+ "\xF0\x9D\x99\xB8" => "\x69",
+ "\xF0\x9D\x99\xB9" => "\x6A",
+ "\xF0\x9D\x99\xBA" => "\x6B",
+ "\xF0\x9D\x99\xBB" => "\x6C",
+ "\xF0\x9D\x99\xBC" => "\x6D",
+ "\xF0\x9D\x99\xBD" => "\x6E",
+ "\xF0\x9D\x99\xBE" => "\x6F",
+ "\xF0\x9D\x99\xBF" => "\x70",
+ "\xF0\x9D\x9A\x80" => "\x71",
+ "\xF0\x9D\x9A\x81" => "\x72",
+ "\xF0\x9D\x9A\x82" => "\x73",
+ "\xF0\x9D\x9A\x83" => "\x74",
+ "\xF0\x9D\x9A\x84" => "\x75",
+ "\xF0\x9D\x9A\x85" => "\x76",
+ "\xF0\x9D\x9A\x86" => "\x77",
+ "\xF0\x9D\x9A\x87" => "\x78",
+ "\xF0\x9D\x9A\x88" => "\x79",
+ "\xF0\x9D\x9A\x89" => "\x7A",
+ "\xF0\x9D\x9A\xA8" => "\xCE\xB1",
+ "\xF0\x9D\x9A\xA9" => "\xCE\xB2",
+ "\xF0\x9D\x9A\xAA" => "\xCE\xB3",
+ "\xF0\x9D\x9A\xAB" => "\xCE\xB4",
+ "\xF0\x9D\x9A\xAC" => "\xCE\xB5",
+ "\xF0\x9D\x9A\xAD" => "\xCE\xB6",
+ "\xF0\x9D\x9A\xAE" => "\xCE\xB7",
+ "\xF0\x9D\x9A\xAF" => "\xCE\xB8",
+ "\xF0\x9D\x9A\xB0" => "\xCE\xB9",
+ "\xF0\x9D\x9A\xB1" => "\xCE\xBA",
+ "\xF0\x9D\x9A\xB2" => "\xCE\xBB",
+ "\xF0\x9D\x9A\xB3" => "\xCE\xBC",
+ "\xF0\x9D\x9A\xB4" => "\xCE\xBD",
+ "\xF0\x9D\x9A\xB5" => "\xCE\xBE",
+ "\xF0\x9D\x9A\xB6" => "\xCE\xBF",
+ "\xF0\x9D\x9A\xB7" => "\xCF\x80",
+ "\xF0\x9D\x9A\xB8" => "\xCF\x81",
+ "\xF0\x9D\x9A\xB9" => "\xCE\xB8",
+ "\xF0\x9D\x9A\xBA" => "\xCF\x83",
+ "\xF0\x9D\x9A\xBB" => "\xCF\x84",
+ "\xF0\x9D\x9A\xBC" => "\xCF\x85",
+ "\xF0\x9D\x9A\xBD" => "\xCF\x86",
+ "\xF0\x9D\x9A\xBE" => "\xCF\x87",
+ "\xF0\x9D\x9A\xBF" => "\xCF\x88",
+ "\xF0\x9D\x9B\x80" => "\xCF\x89",
+ "\xF0\x9D\x9B\x93" => "\xCF\x83",
+ "\xF0\x9D\x9B\xA2" => "\xCE\xB1",
+ "\xF0\x9D\x9B\xA3" => "\xCE\xB2",
+ "\xF0\x9D\x9B\xA4" => "\xCE\xB3",
+ "\xF0\x9D\x9B\xA5" => "\xCE\xB4",
+ "\xF0\x9D\x9B\xA6" => "\xCE\xB5",
+ "\xF0\x9D\x9B\xA7" => "\xCE\xB6",
+ "\xF0\x9D\x9B\xA8" => "\xCE\xB7",
+ "\xF0\x9D\x9B\xA9" => "\xCE\xB8",
+ "\xF0\x9D\x9B\xAA" => "\xCE\xB9",
+ "\xF0\x9D\x9B\xAB" => "\xCE\xBA",
+ "\xF0\x9D\x9B\xAC" => "\xCE\xBB",
+ "\xF0\x9D\x9B\xAD" => "\xCE\xBC",
+ "\xF0\x9D\x9B\xAE" => "\xCE\xBD",
+ "\xF0\x9D\x9B\xAF" => "\xCE\xBE",
+ "\xF0\x9D\x9B\xB0" => "\xCE\xBF",
+ "\xF0\x9D\x9B\xB1" => "\xCF\x80",
+ "\xF0\x9D\x9B\xB2" => "\xCF\x81",
+ "\xF0\x9D\x9B\xB3" => "\xCE\xB8",
+ "\xF0\x9D\x9B\xB4" => "\xCF\x83",
+ "\xF0\x9D\x9B\xB5" => "\xCF\x84",
+ "\xF0\x9D\x9B\xB6" => "\xCF\x85",
+ "\xF0\x9D\x9B\xB7" => "\xCF\x86",
+ "\xF0\x9D\x9B\xB8" => "\xCF\x87",
+ "\xF0\x9D\x9B\xB9" => "\xCF\x88",
+ "\xF0\x9D\x9B\xBA" => "\xCF\x89",
+ "\xF0\x9D\x9C\x8D" => "\xCF\x83",
+ "\xF0\x9D\x9C\x9C" => "\xCE\xB1",
+ "\xF0\x9D\x9C\x9D" => "\xCE\xB2",
+ "\xF0\x9D\x9C\x9E" => "\xCE\xB3",
+ "\xF0\x9D\x9C\x9F" => "\xCE\xB4",
+ "\xF0\x9D\x9C\xA0" => "\xCE\xB5",
+ "\xF0\x9D\x9C\xA1" => "\xCE\xB6",
+ "\xF0\x9D\x9C\xA2" => "\xCE\xB7",
+ "\xF0\x9D\x9C\xA3" => "\xCE\xB8",
+ "\xF0\x9D\x9C\xA4" => "\xCE\xB9",
+ "\xF0\x9D\x9C\xA5" => "\xCE\xBA",
+ "\xF0\x9D\x9C\xA6" => "\xCE\xBB",
+ "\xF0\x9D\x9C\xA7" => "\xCE\xBC",
+ "\xF0\x9D\x9C\xA8" => "\xCE\xBD",
+ "\xF0\x9D\x9C\xA9" => "\xCE\xBE",
+ "\xF0\x9D\x9C\xAA" => "\xCE\xBF",
+ "\xF0\x9D\x9C\xAB" => "\xCF\x80",
+ "\xF0\x9D\x9C\xAC" => "\xCF\x81",
+ "\xF0\x9D\x9C\xAD" => "\xCE\xB8",
+ "\xF0\x9D\x9C\xAE" => "\xCF\x83",
+ "\xF0\x9D\x9C\xAF" => "\xCF\x84",
+ "\xF0\x9D\x9C\xB0" => "\xCF\x85",
+ "\xF0\x9D\x9C\xB1" => "\xCF\x86",
+ "\xF0\x9D\x9C\xB2" => "\xCF\x87",
+ "\xF0\x9D\x9C\xB3" => "\xCF\x88",
+ "\xF0\x9D\x9C\xB4" => "\xCF\x89",
+ "\xF0\x9D\x9D\x87" => "\xCF\x83",
+ "\xF0\x9D\x9D\x96" => "\xCE\xB1",
+ "\xF0\x9D\x9D\x97" => "\xCE\xB2",
+ "\xF0\x9D\x9D\x98" => "\xCE\xB3",
+ "\xF0\x9D\x9D\x99" => "\xCE\xB4",
+ "\xF0\x9D\x9D\x9A" => "\xCE\xB5",
+ "\xF0\x9D\x9D\x9B" => "\xCE\xB6",
+ "\xF0\x9D\x9D\x9C" => "\xCE\xB7",
+ "\xF0\x9D\x9D\x9D" => "\xCE\xB8",
+ "\xF0\x9D\x9D\x9E" => "\xCE\xB9",
+ "\xF0\x9D\x9D\x9F" => "\xCE\xBA",
+ "\xF0\x9D\x9D\xA0" => "\xCE\xBB",
+ "\xF0\x9D\x9D\xA1" => "\xCE\xBC",
+ "\xF0\x9D\x9D\xA2" => "\xCE\xBD",
+ "\xF0\x9D\x9D\xA3" => "\xCE\xBE",
+ "\xF0\x9D\x9D\xA4" => "\xCE\xBF",
+ "\xF0\x9D\x9D\xA5" => "\xCF\x80",
+ "\xF0\x9D\x9D\xA6" => "\xCF\x81",
+ "\xF0\x9D\x9D\xA7" => "\xCE\xB8",
+ "\xF0\x9D\x9D\xA8" => "\xCF\x83",
+ "\xF0\x9D\x9D\xA9" => "\xCF\x84",
+ "\xF0\x9D\x9D\xAA" => "\xCF\x85",
+ "\xF0\x9D\x9D\xAB" => "\xCF\x86",
+ "\xF0\x9D\x9D\xAC" => "\xCF\x87",
+ "\xF0\x9D\x9D\xAD" => "\xCF\x88",
+ "\xF0\x9D\x9D\xAE" => "\xCF\x89",
+ "\xF0\x9D\x9E\x81" => "\xCF\x83",
+ "\xF0\x9D\x9E\x90" => "\xCE\xB1",
+ "\xF0\x9D\x9E\x91" => "\xCE\xB2",
+ "\xF0\x9D\x9E\x92" => "\xCE\xB3",
+ "\xF0\x9D\x9E\x93" => "\xCE\xB4",
+ "\xF0\x9D\x9E\x94" => "\xCE\xB5",
+ "\xF0\x9D\x9E\x95" => "\xCE\xB6",
+ "\xF0\x9D\x9E\x96" => "\xCE\xB7",
+ "\xF0\x9D\x9E\x97" => "\xCE\xB8",
+ "\xF0\x9D\x9E\x98" => "\xCE\xB9",
+ "\xF0\x9D\x9E\x99" => "\xCE\xBA",
+ "\xF0\x9D\x9E\x9A" => "\xCE\xBB",
+ "\xF0\x9D\x9E\x9B" => "\xCE\xBC",
+ "\xF0\x9D\x9E\x9C" => "\xCE\xBD",
+ "\xF0\x9D\x9E\x9D" => "\xCE\xBE",
+ "\xF0\x9D\x9E\x9E" => "\xCE\xBF",
+ "\xF0\x9D\x9E\x9F" => "\xCF\x80",
+ "\xF0\x9D\x9E\xA0" => "\xCF\x81",
+ "\xF0\x9D\x9E\xA1" => "\xCE\xB8",
+ "\xF0\x9D\x9E\xA2" => "\xCF\x83",
+ "\xF0\x9D\x9E\xA3" => "\xCF\x84",
+ "\xF0\x9D\x9E\xA4" => "\xCF\x85",
+ "\xF0\x9D\x9E\xA5" => "\xCF\x86",
+ "\xF0\x9D\x9E\xA6" => "\xCF\x87",
+ "\xF0\x9D\x9E\xA7" => "\xCF\x88",
+ "\xF0\x9D\x9E\xA8" => "\xCF\x89",
+ "\xF0\x9D\x9E\xBB" => "\xCF\x83",
+ "\xF0\x9D\x9F\x8A" => "\xCF\x9D",
+ );
+ global $phpbb_root_path, $phpEx;
+
+ // do the case fold
+ $text = utf8_case_fold($text, $option);
+
+ if (!class_exists('utf_normalizer'))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
+ }
+
+ // convert to NFKC
+ utf_normalizer::nfkc($text);
+
+ // FC_NFKC_Closure, http://www.unicode.org/Public/5.0.0/ucd/DerivedNormalizationProps.txt
+ $text = strtr($text, $fc_nfkc_closure);
+
+ return $text;
+}
+
+/**
+* Assume the input is NFC:
+* Takes the input and does a "special" case fold. It does minor normalization as well.
+*
+* @param string $text text to be case folded
+* @param string $option determines how we will fold the cases
+* @return string case folded text
+*/
+function utf8_case_fold_nfc($text, $option = 'full')
+{
+ static $uniarray = array();
+ static $ypogegrammeni = array(
+ "\xCD\xBA" => "\x20\xCD\x85",
+ "\xE1\xBE\x80" => "\xE1\xBC\x80\xCD\x85",
+ "\xE1\xBE\x81" => "\xE1\xBC\x81\xCD\x85",
+ "\xE1\xBE\x82" => "\xE1\xBC\x82\xCD\x85",
+ "\xE1\xBE\x83" => "\xE1\xBC\x83\xCD\x85",
+ "\xE1\xBE\x84" => "\xE1\xBC\x84\xCD\x85",
+ "\xE1\xBE\x85" => "\xE1\xBC\x85\xCD\x85",
+ "\xE1\xBE\x86" => "\xE1\xBC\x86\xCD\x85",
+ "\xE1\xBE\x87" => "\xE1\xBC\x87\xCD\x85",
+ "\xE1\xBE\x88" => "\xE1\xBC\x88\xCD\x85",
+ "\xE1\xBE\x89" => "\xE1\xBC\x89\xCD\x85",
+ "\xE1\xBE\x8A" => "\xE1\xBC\x8A\xCD\x85",
+ "\xE1\xBE\x8B" => "\xE1\xBC\x8B\xCD\x85",
+ "\xE1\xBE\x8C" => "\xE1\xBC\x8C\xCD\x85",
+ "\xE1\xBE\x8D" => "\xE1\xBC\x8D\xCD\x85",
+ "\xE1\xBE\x8E" => "\xE1\xBC\x8E\xCD\x85",
+ "\xE1\xBE\x8F" => "\xE1\xBC\x8F\xCD\x85",
+ "\xE1\xBE\x90" => "\xE1\xBC\xA0\xCD\x85",
+ "\xE1\xBE\x91" => "\xE1\xBC\xA1\xCD\x85",
+ "\xE1\xBE\x92" => "\xE1\xBC\xA2\xCD\x85",
+ "\xE1\xBE\x93" => "\xE1\xBC\xA3\xCD\x85",
+ "\xE1\xBE\x94" => "\xE1\xBC\xA4\xCD\x85",
+ "\xE1\xBE\x95" => "\xE1\xBC\xA5\xCD\x85",
+ "\xE1\xBE\x96" => "\xE1\xBC\xA6\xCD\x85",
+ "\xE1\xBE\x97" => "\xE1\xBC\xA7\xCD\x85",
+ "\xE1\xBE\x98" => "\xE1\xBC\xA8\xCD\x85",
+ "\xE1\xBE\x99" => "\xE1\xBC\xA9\xCD\x85",
+ "\xE1\xBE\x9A" => "\xE1\xBC\xAA\xCD\x85",
+ "\xE1\xBE\x9B" => "\xE1\xBC\xAB\xCD\x85",
+ "\xE1\xBE\x9C" => "\xE1\xBC\xAC\xCD\x85",
+ "\xE1\xBE\x9D" => "\xE1\xBC\xAD\xCD\x85",
+ "\xE1\xBE\x9E" => "\xE1\xBC\xAE\xCD\x85",
+ "\xE1\xBE\x9F" => "\xE1\xBC\xAF\xCD\x85",
+ "\xE1\xBE\xA0" => "\xE1\xBD\xA0\xCD\x85",
+ "\xE1\xBE\xA1" => "\xE1\xBD\xA1\xCD\x85",
+ "\xE1\xBE\xA2" => "\xE1\xBD\xA2\xCD\x85",
+ "\xE1\xBE\xA3" => "\xE1\xBD\xA3\xCD\x85",
+ "\xE1\xBE\xA4" => "\xE1\xBD\xA4\xCD\x85",
+ "\xE1\xBE\xA5" => "\xE1\xBD\xA5\xCD\x85",
+ "\xE1\xBE\xA6" => "\xE1\xBD\xA6\xCD\x85",
+ "\xE1\xBE\xA7" => "\xE1\xBD\xA7\xCD\x85",
+ "\xE1\xBE\xA8" => "\xE1\xBD\xA8\xCD\x85",
+ "\xE1\xBE\xA9" => "\xE1\xBD\xA9\xCD\x85",
+ "\xE1\xBE\xAA" => "\xE1\xBD\xAA\xCD\x85",
+ "\xE1\xBE\xAB" => "\xE1\xBD\xAB\xCD\x85",
+ "\xE1\xBE\xAC" => "\xE1\xBD\xAC\xCD\x85",
+ "\xE1\xBE\xAD" => "\xE1\xBD\xAD\xCD\x85",
+ "\xE1\xBE\xAE" => "\xE1\xBD\xAE\xCD\x85",
+ "\xE1\xBE\xAF" => "\xE1\xBD\xAF\xCD\x85",
+ "\xE1\xBE\xB2" => "\xE1\xBD\xB0\xCD\x85",
+ "\xE1\xBE\xB3" => "\xCE\xB1\xCD\x85",
+ "\xE1\xBE\xB4" => "\xCE\xAC\xCD\x85",
+ "\xE1\xBE\xB7" => "\xE1\xBE\xB6\xCD\x85",
+ "\xE1\xBE\xBC" => "\xCE\x91\xCD\x85",
+ "\xE1\xBF\x82" => "\xE1\xBD\xB4\xCD\x85",
+ "\xE1\xBF\x83" => "\xCE\xB7\xCD\x85",
+ "\xE1\xBF\x84" => "\xCE\xAE\xCD\x85",
+ "\xE1\xBF\x87" => "\xE1\xBF\x86\xCD\x85",
+ "\xE1\xBF\x8C" => "\xCE\x97\xCD\x85",
+ "\xE1\xBF\xB2" => "\xE1\xBD\xBC\xCD\x85",
+ "\xE1\xBF\xB3" => "\xCF\x89\xCD\x85",
+ "\xE1\xBF\xB4" => "\xCF\x8E\xCD\x85",
+ "\xE1\xBF\xB7" => "\xE1\xBF\xB6\xCD\x85",
+ "\xE1\xBF\xBC" => "\xCE\xA9\xCD\x85",
+ );
+ global $phpbb_root_path, $phpEx;
+
+ // perform a small trick, avoid further normalization on composed points that contain U+0345 in their decomposition
+ $text = strtr($text, $ypogegrammeni);
+
+ // do the case fold
+ $text = utf8_case_fold($text, $option);
+
+ return $text;
+}
+
+/**
+* A wrapper function for the normalizer which takes care of including the class if required and modifies the passed strings
+* to be in NFC (Normalization Form Composition).
+*
+* @param mixed $strings a string or an array of strings to normalize
+* @return mixed the normalized content, preserving array keys if array given.
+*/
+function utf8_normalize_nfc($strings)
+{
+ if (empty($strings))
+ {
+ return $strings;
+ }
+
+ if (!class_exists('utf_normalizer'))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
+ }
+
+ if (!is_array($strings))
+ {
+ utf_normalizer::nfc($strings);
+ }
+ else if (is_array($strings))
+ {
+ foreach ($strings as $key => $string)
+ {
+ if (is_array($string))
+ {
+ foreach ($string as $_key => $_string)
+ {
+ utf_normalizer::nfc($strings[$key][$_key]);
+ }
+ }
+ else
+ {
+ utf_normalizer::nfc($strings[$key]);
+ }
+ }
+ }
+
+ return $strings;
+}
+
+/**
+* This function is used to generate a "clean" version of a string.
+* Clean means that it is a case insensitive form (case folding) and that it is normalized (NFC).
+* Additionally a homographs of one character are transformed into one specific character (preferably ASCII
+* if it is an ASCII character).
+*
+* Please be aware that if you change something within this function or within
+* functions used here you need to rebuild/update the username_clean column in the users table. And all other
+* columns that store a clean string otherwise you will break this functionality.
+*
+* @param string $text An unclean string, mabye user input (has to be valid UTF-8!)
+* @return string Cleaned up version of the input string
+*/
+function utf8_clean_string($text)
+{
+ global $phpbb_root_path, $phpEx;
+
+ static $homographs = array();
+ if (empty($homographs))
+ {
+ $homographs = include($phpbb_root_path . 'includes/utf/data/confusables.' . $phpEx);
+ }
+
+ $text = utf8_case_fold_nfkc($text);
+ $text = strtr($text, $homographs);
+ // Other control characters
+ $text = preg_replace('#(?:[\x00-\x1F\x7F]+|(?:\xC2[\x80-\x9F])+)#', '', $text);
+
+ // we need to reduce multiple spaces to a single one
+ $text = preg_replace('# {2,}#', ' ', $text);
+
+ // we can use trim here as all the other space characters should have been turned
+ // into normal ASCII spaces by now
+ return trim($text);
+}
+
+/**
+* A wrapper for htmlspecialchars($value, ENT_COMPAT, 'UTF-8')
+*/
+function utf8_htmlspecialchars($value)
+{
+ return htmlspecialchars($value, ENT_COMPAT, 'UTF-8');
+}
+
+/**
+* Trying to convert returned system message to utf8
+*
+* PHP assumes such messages are ISO-8859-1 so we'll do that too
+* and if it breaks messages we'll blame it on them ;-)
+*/
+function utf8_convert_message($message)
+{
+ // First of all check if conversion is neded at all, as there is no point
+ // in converting ASCII messages from ISO-8859-1 to UTF-8
+ if (!preg_match('/[\x80-\xFF]/', $message))
+ {
+ return utf8_htmlspecialchars($message);
+ }
+
+ // else we need to convert some part of the message
+ return utf8_htmlspecialchars(utf8_recode($message, 'ISO-8859-1'));
+}
+
+/**
+* UTF8-compatible wordwrap replacement
+*
+* @param string $string The input string
+* @param int $width The column width. Defaults to 75.
+* @param string $break The line is broken using the optional break parameter. Defaults to '\n'.
+* @param bool $cut If the cut is set to TRUE, the string is always wrapped at the specified width. So if you have a word that is larger than the given width, it is broken apart.
+*
+* @return string the given string wrapped at the specified column.
+*
+*/
+function utf8_wordwrap($string, $width = 75, $break = "\n", $cut = false)
+{
+ // We first need to explode on $break, not destroying existing (intended) breaks
+ $lines = explode($break, $string);
+ $new_lines = array(0 => '');
+ $index = 0;
+
+ foreach ($lines as $line)
+ {
+ $words = explode(' ', $line);
+
+ for ($i = 0, $size = sizeof($words); $i < $size; $i++)
+ {
+ $word = $words[$i];
+
+ // If cut is true we need to cut the word if it is > width chars
+ if ($cut && utf8_strlen($word) > $width)
+ {
+ $words[$i] = utf8_substr($word, $width);
+ $word = utf8_substr($word, 0, $width);
+ $i--;
+ }
+
+ if (utf8_strlen($new_lines[$index] . $word) > $width)
+ {
+ $new_lines[$index] = substr($new_lines[$index], 0, -1);
+ $index++;
+ $new_lines[$index] = '';
+ }
+
+ $new_lines[$index] .= $word . ' ';
+ }
+
+ $new_lines[$index] = substr($new_lines[$index], 0, -1);
+ $index++;
+ $new_lines[$index] = '';
+ }
+
+ unset($new_lines[$index]);
+ return implode($break, $new_lines);
+}
+
+/**
+* UTF8-safe basename() function
+*
+* basename() has some limitations and is dependent on the locale setting
+* according to the PHP manual. Therefore we provide our own locale independant
+* basename function.
+*
+* @param string $filename The filename basename() should be applied to
+* @return string The basenamed filename
+*/
+function utf8_basename($filename)
+{
+ // We always check for forward slash AND backward slash
+ // because they could be mixed or "sneaked" in. ;)
+ // You know, never trust user input...
+ if (strpos($filename, '/') !== false)
+ {
+ $filename = utf8_substr($filename, utf8_strrpos($filename, '/') + 1);
+ }
+
+ if (strpos($filename, '\\') !== false)
+ {
+ $filename = utf8_substr($filename, utf8_strrpos($filename, '\\') + 1);
+ }
+
+ return $filename;
+}
+
+/**
+* UTF8-safe str_replace() function
+*
+* @param string $search The value to search for
+* @param string $replace The replacement string
+* @param string $subject The target string
+* @return string The resultant string
+*/
+function utf8_str_replace($search, $replace, $subject)
+{
+ if (!is_array($search))
+ {
+ $search = array($search);
+ if (is_array($replace))
+ {
+ $replace = (string) $replace;
+ trigger_error('Array to string conversion', E_USER_NOTICE);
+ }
+ }
+
+ $length = sizeof($search);
+
+ if (!is_array($replace))
+ {
+ $replace = array_fill(0, $length, $replace);
+ }
+ else
+ {
+ $replace = array_pad($replace, $length, '');
+ }
+
+ for ($i = 0; $i < $length; $i++)
+ {
+ $search_length = utf8_strlen($search[$i]);
+ $replace_length = utf8_strlen($replace[$i]);
+
+ $offset = 0;
+ while (($start = utf8_strpos($subject, $search[$i], $offset)) !== false)
+ {
+ $subject = utf8_substr($subject, 0, $start) . $replace[$i] . utf8_substr($subject, $start + $search_length);
+ $offset = $start + $replace_length;
+ }
+ }
+
+ return $subject;
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/index.php b/phpBB/index.php
new file mode 100644
index 0000000000..c3dbbd346e
--- /dev/null
+++ b/phpBB/index.php
@@ -0,0 +1,139 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+*/
+
+/**
+* @ignore
+*/
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup('viewforum');
+
+display_forums('', $config['load_moderators']);
+
+// Set some stats, get posts count from forums data if we... hum... retrieve all forums data
+$total_posts = $config['num_posts'];
+$total_topics = $config['num_topics'];
+$total_users = $config['num_users'];
+
+$l_total_user_s = ($total_users == 0) ? 'TOTAL_USERS_ZERO' : 'TOTAL_USERS_OTHER';
+$l_total_post_s = ($total_posts == 0) ? 'TOTAL_POSTS_ZERO' : 'TOTAL_POSTS_OTHER';
+$l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER';
+
+// Grab group details for legend display
+if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
+{
+ $sql = 'SELECT group_id, group_name, group_colour, group_type
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_legend = 1
+ ORDER BY group_name ASC';
+}
+else
+{
+ $sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
+ FROM ' . GROUPS_TABLE . ' g
+ LEFT JOIN ' . USER_GROUP_TABLE . ' ug
+ ON (
+ g.group_id = ug.group_id
+ AND ug.user_id = ' . $user->data['user_id'] . '
+ AND ug.user_pending = 0
+ )
+ WHERE g.group_legend = 1
+ AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
+ ORDER BY g.group_name ASC';
+}
+$result = $db->sql_query($sql);
+
+$legend = array();
+while ($row = $db->sql_fetchrow($result))
+{
+ $colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';
+ $group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
+
+ if ($row['group_name'] == 'BOTS' || ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')))
+ {
+ $legend[] = '<span' . $colour_text . '>' . $group_name . '</span>';
+ }
+ else
+ {
+ $legend[] = '<a' . $colour_text . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']) . '">' . $group_name . '</a>';
+ }
+}
+$db->sql_freeresult($result);
+
+$legend = implode(', ', $legend);
+
+// Generate birthday list if required ...
+$birthday_list = '';
+if ($config['load_birthdays'] && $config['allow_birthdays'])
+{
+ $now = getdate(time() + $user->timezone + $user->dst - date('Z'));
+ $sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday
+ FROM ' . USERS_TABLE . ' u
+ LEFT JOIN ' . BANLIST_TABLE . " b ON (u.user_id = b.ban_userid)
+ WHERE (b.ban_id IS NULL
+ OR b.ban_exclude = 1)
+ AND u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%'
+ AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $birthday_list .= (($birthday_list != '') ? ', ' : '') . get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
+
+ if ($age = (int) substr($row['user_birthday'], -4))
+ {
+ $birthday_list .= ' (' . ($now['year'] - $age) . ')';
+ }
+ }
+ $db->sql_freeresult($result);
+}
+
+// Assign index specific vars
+$template->assign_vars(array(
+ 'TOTAL_POSTS' => sprintf($user->lang[$l_total_post_s], $total_posts),
+ 'TOTAL_TOPICS' => sprintf($user->lang[$l_total_topic_s], $total_topics),
+ 'TOTAL_USERS' => sprintf($user->lang[$l_total_user_s], $total_users),
+ 'NEWEST_USER' => sprintf($user->lang['NEWEST_USER'], get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])),
+
+ 'LEGEND' => $legend,
+ 'BIRTHDAY_LIST' => $birthday_list,
+
+ 'FORUM_IMG' => $user->img('forum_read', 'NO_NEW_POSTS'),
+ 'FORUM_NEW_IMG' => $user->img('forum_unread', 'NEW_POSTS'),
+ 'FORUM_LOCKED_IMG' => $user->img('forum_read_locked', 'NO_NEW_POSTS_LOCKED'),
+ 'FORUM_NEW_LOCKED_IMG' => $user->img('forum_unread_locked', 'NO_NEW_POSTS_LOCKED'),
+
+ 'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
+ 'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false,
+
+ 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&amp;mark=forums') : '',
+ 'U_MCP' => ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=front', true, $user->session_id) : '')
+);
+
+// Output page
+page_header($user->lang['INDEX']);
+
+$template->set_filenames(array(
+ 'body' => 'index_body.html')
+);
+
+page_footer();
+
+?> \ No newline at end of file
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php
new file mode 100644
index 0000000000..5a6603883b
--- /dev/null
+++ b/phpBB/install/convertors/convert_phpbb20.php
@@ -0,0 +1,935 @@
+<?php
+/**
+*
+* @package install
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* NOTE to potential convertor authors. Please use this file to get
+* familiar with the structure since we added some bare explanations here.
+*
+* Since this file gets included more than once on one page you are not able to add functions to it.
+* Instead use a functions_ file.
+*
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+include($phpbb_root_path . 'config.' . $phpEx);
+unset($dbpasswd);
+
+/**
+* $convertor_data provides some basic information about this convertor which is
+* used on the initial list of convertors and to populate the default settings
+*/
+$convertor_data = array(
+ 'forum_name' => 'phpBB 2.0.x',
+ 'version' => '1.0.3',
+ 'phpbb_version' => '3.0.6',
+ 'author' => '<a href="http://www.phpbb.com/">phpBB Group</a>',
+ 'dbms' => $dbms,
+ 'dbhost' => $dbhost,
+ 'dbport' => $dbport,
+ 'dbuser' => $dbuser,
+ 'dbpasswd' => '',
+ 'dbname' => $dbname,
+ 'table_prefix' => 'phpbb_',
+ 'forum_path' => '../forums',
+ 'author_notes' => '',
+);
+
+/**
+* $tables is a list of the tables (minus prefix) which we expect to find in the
+* source forum. It is used to guess the prefix if the specified prefix is incorrect
+*/
+$tables = array(
+ 'auth_access',
+ 'banlist',
+ 'categories',
+ 'disallow',
+ 'forum_prune',
+ 'forums',
+ 'groups',
+ 'posts',
+ 'posts_text',
+ 'privmsgs',
+ 'privmsgs_text',
+ 'ranks',
+ 'smilies',
+ 'topics',
+ 'topics_watch',
+ 'user_group',
+ 'users',
+ 'vote_desc',
+ 'vote_results',
+ 'vote_voters',
+ 'words'
+);
+
+/**
+* $config_schema details how the board configuration information is stored in the source forum.
+*
+* 'table_format' can take the value 'file' to indicate a config file. In this case array_name
+* is set to indicate the name of the array the config values are stored in
+* 'table_format' can be an array if the values are stored in a table which is an assosciative array
+* (as per phpBB 2.0.x)
+* If left empty, values are assumed to be stored in a table where each config setting is
+* a column (as per phpBB 1.x)
+*
+* In either of the latter cases 'table_name' indicates the name of the table in the database
+*
+* 'settings' is an array which maps the name of the config directive in the source forum
+* to the config directive in phpBB3. It can either be a direct mapping or use a function.
+* Please note that the contents of the old config value are passed to the function, therefore
+* an in-built function requiring the variable passed by reference is not able to be used. Since
+* empty() is such a function we created the function is_empty() to be used instead.
+*/
+$config_schema = array(
+ 'table_name' => 'config',
+ 'table_format' => array('config_name' => 'config_value'),
+ 'settings' => array(
+ 'allow_bbcode' => 'allow_bbcode',
+ 'allow_smilies' => 'allow_smilies',
+ 'allow_sig' => 'allow_sig',
+ 'allow_namechange' => 'allow_namechange',
+ 'allow_avatar_local' => 'allow_avatar_local',
+ 'allow_avatar_remote' => 'allow_avatar_remote',
+ 'allow_avatar_upload' => 'allow_avatar_upload',
+ 'board_disable' => 'board_disable',
+ 'sitename' => 'phpbb_set_encoding(sitename)',
+ 'site_desc' => 'phpbb_set_encoding(site_desc)',
+ 'session_length' => 'session_length',
+ 'board_email_sig' => 'phpbb_set_encoding(board_email_sig)',
+ 'posts_per_page' => 'posts_per_page',
+ 'topics_per_page' => 'topics_per_page',
+ 'enable_confirm' => 'enable_confirm',
+ 'board_email_form' => 'board_email_form',
+ 'override_user_style' => 'override_user_style',
+ 'hot_threshold' => 'hot_threshold',
+ 'max_poll_options' => 'max_poll_options',
+ 'max_sig_chars' => 'max_sig_chars',
+ 'pm_max_msgs' => 'max_inbox_privmsgs',
+ 'smtp_delivery' => 'smtp_delivery',
+ 'smtp_host' => 'smtp_host',
+ 'smtp_username' => 'smtp_username',
+ 'smtp_password' => 'smtp_password',
+ 'require_activation' => 'require_activation',
+ 'flood_interval' => 'flood_interval',
+ 'avatar_filesize' => 'avatar_filesize',
+ 'avatar_max_width' => 'avatar_max_width',
+ 'avatar_max_height' => 'avatar_max_height',
+ 'default_dateformat' => 'default_dateformat',
+ 'board_timezone' => 'board_timezone',
+ 'allow_privmsg' => 'not(privmsg_disable)',
+ 'gzip_compress' => 'gzip_compress',
+ 'coppa_enable' => '!is_empty(coppa_mail)',
+ 'coppa_fax' => 'coppa_fax',
+ 'coppa_mail' => 'coppa_mail',
+ 'record_online_users' => 'record_online_users',
+ 'record_online_date' => 'record_online_date',
+ 'board_startdate' => 'board_startdate',
+ )
+);
+
+/**
+* $test_file is the name of a file which is present on the source
+* forum which can be used to check that the path specified by the
+* user was correct
+*/
+$test_file = 'modcp.php';
+
+/**
+* If this is set then we are not generating the first page of information but getting the conversion information.
+*/
+if (!$get_info)
+{
+ // Test to see if the birthday MOD is installed on the source forum
+ // Niels' birthday mod
+ if (get_config_value('birthday_required') !== false || get_config_value('bday_require') !== false)
+ {
+ define('MOD_BIRTHDAY', true);
+ }
+
+ // TerraFrost's validated birthday mod
+ if (get_config_value('bday_require') !== false)
+ {
+ define('MOD_BIRTHDAY_TERRA', true);
+ }
+
+ // Test to see if the attachment MOD is installed on the source forum
+ // If it is, we will convert this data as well
+ $src_db->sql_return_on_error(true);
+
+ $sql = "SELECT config_value
+ FROM {$convert->src_table_prefix}attachments_config
+ WHERE config_name = 'upload_dir'";
+ $result = $src_db->sql_query($sql);
+
+ if ($result && $row = $src_db->sql_fetchrow($result))
+ {
+ // Here the constant is defined
+ define('MOD_ATTACHMENT', true);
+
+ // Here i add more tables to be checked in the old forum
+ $tables += array(
+ 'attachments',
+ 'attachments_desc',
+ 'extensions',
+ 'extension_groups'
+ );
+
+ $src_db->sql_freeresult($result);
+ }
+ else if ($result)
+ {
+ $src_db->sql_freeresult($result);
+ }
+
+
+ /**
+ * Tests for further MODs can be included here.
+ * Please use constants for this, prefixing them with MOD_
+ */
+
+ $src_db->sql_return_on_error(false);
+
+ // Now let us set a temporary config variable for user id incrementing
+ $sql = "SELECT user_id
+ FROM {$convert->src_table_prefix}users
+ WHERE user_id = 1";
+ $result = $src_db->sql_query($sql);
+ $user_id = (int) $src_db->sql_fetchfield('user_id');
+ $src_db->sql_freeresult($result);
+
+ // If there is a user id 1, we need to increment user ids. :/
+ if ($user_id === 1)
+ {
+ // Try to get the maximum user id possible...
+ $sql = "SELECT MAX(user_id) AS max_user_id
+ FROM {$convert->src_table_prefix}users";
+ $result = $src_db->sql_query($sql);
+ $user_id = (int) $src_db->sql_fetchfield('max_user_id');
+ $src_db->sql_freeresult($result);
+
+ set_config('increment_user_id', ($user_id + 1), true);
+ }
+ else
+ {
+ set_config('increment_user_id', 0, true);
+ }
+
+ // Overwrite maximum avatar width/height
+ @define('DEFAULT_AVATAR_X_CUSTOM', get_config_value('avatar_max_width'));
+ @define('DEFAULT_AVATAR_Y_CUSTOM', get_config_value('avatar_max_height'));
+
+ // additional table used only during conversion
+ @define('USERCONV_TABLE', $table_prefix . 'userconv');
+
+/**
+* Description on how to use the convertor framework.
+*
+* 'schema' Syntax Description
+* -> 'target' => Target Table. If not specified the next table will be handled
+* -> 'primary' => Primary Key. If this is specified then this table is processed in batches
+* -> 'query_first' => array('target' or 'src', Query to execute before beginning the process
+* (if more than one then specified as array))
+* -> 'function_first' => Function to execute before beginning the process (if more than one then specified as array)
+* (This is mostly useful if variables need to be given to the converting process)
+* -> 'test_file' => This is not used at the moment but should be filled with a file from the old installation
+*
+* // DB Functions
+* 'distinct' => Add DISTINCT to the select query
+* 'where' => Add WHERE to the select query
+* 'group_by' => Add GROUP BY to the select query
+* 'left_join' => Add LEFT JOIN to the select query (if more than one joins specified as array)
+* 'having' => Add HAVING to the select query
+*
+* // DB INSERT array
+* This one consist of three parameters
+* First Parameter:
+* The key need to be filled within the target table
+* If this is empty, the target table gets not assigned the source value
+* Second Parameter:
+* Source value. If the first parameter is specified, it will be assigned this value.
+* If the first parameter is empty, this only gets added to the select query
+* Third Parameter:
+* Custom Function. Function to execute while storing source value into target table.
+* The functions return value get stored.
+* The function parameter consist of the value of the second parameter.
+*
+* types:
+* - empty string == execute nothing
+* - string == function to execute
+* - array == complex execution instructions
+*
+* Complex execution instructions:
+* @todo test complex execution instructions - in theory they will work fine
+*
+* By defining an array as the third parameter you are able to define some statements to be executed. The key
+* is defining what to execute, numbers can be appended...
+*
+* 'function' => execute function
+* 'execute' => run code, whereby all occurrences of {VALUE} get replaced by the last returned value.
+* The result *must* be assigned/stored to {RESULT}.
+* 'typecast' => typecast value
+*
+* The returned variables will be made always available to the next function to continue to work with.
+*
+* example (variable inputted is an integer of 1):
+*
+* array(
+* 'function1' => 'increment_by_one', // returned variable is 2
+* 'typecast' => 'string', // typecast variable to be a string
+* 'execute' => '{RESULT} = {VALUE} . ' is good';', // returned variable is '2 is good'
+* 'function2' => 'replace_good_with_bad', // returned variable is '2 is bad'
+* ),
+*
+*/
+
+ $convertor = array(
+ 'test_file' => 'viewtopic.php',
+
+ 'avatar_path' => get_config_value('avatar_path') . '/',
+ 'avatar_gallery_path' => get_config_value('avatar_gallery_path') . '/',
+ 'smilies_path' => get_config_value('smilies_path') . '/',
+ 'upload_path' => (defined('MOD_ATTACHMENT')) ? phpbb_get_files_dir() . '/' : '',
+ 'thumbnails' => (defined('MOD_ATTACHMENT')) ? array('thumbs/', 't_') : '',
+ 'ranks_path' => false, // phpBB 2.0.x had no config value for a ranks path
+
+ // We empty some tables to have clean data available
+ 'query_first' => array(
+ array('target', $convert->truncate_statement . SEARCH_RESULTS_TABLE),
+ array('target', $convert->truncate_statement . SEARCH_WORDLIST_TABLE),
+ array('target', $convert->truncate_statement . SEARCH_WORDMATCH_TABLE),
+ array('target', $convert->truncate_statement . LOG_TABLE),
+ ),
+
+// with this you are able to import all attachment files on the fly. For large boards this is not an option, therefore commented out by default.
+// Instead every file gets copied while processing the corresponding attachment entry.
+// if (defined("MOD_ATTACHMENT")) { import_attachment_files(); phpbb_copy_thumbnails(); }
+
+ // phpBB2 allowed some similar usernames to coexist which would have the same
+ // username_clean in phpBB3 which is not possible, so we'll give the admin a list
+ // of user ids and usernames and let him deicde what he wants to do with them
+ 'execute_first' => '
+ phpbb_create_userconv_table();
+ import_avatar_gallery();
+ if (defined("MOD_ATTACHMENT")) phpbb_import_attach_config();
+ phpbb_insert_forums();
+ ',
+
+ 'execute_last' => array('
+ add_bots();
+ ', '
+ update_folder_pm_count();
+ ', '
+ update_unread_count();
+ ', '
+ phpbb_convert_authentication(\'start\');
+ ', '
+ phpbb_convert_authentication(\'first\');
+ ', '
+ phpbb_convert_authentication(\'second\');
+ ', '
+ phpbb_convert_authentication(\'third\');
+ '),
+
+ 'schema' => array(
+ array(
+ 'target' => USERCONV_TABLE,
+ 'query_first' => array('target', $convert->truncate_statement . USERCONV_TABLE),
+
+
+ array('user_id', 'users.user_id', ''),
+ array('username_clean', 'users.username', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_clean_string')),
+ ),
+
+ array(
+ 'target' => (defined('MOD_ATTACHMENT')) ? ATTACHMENTS_TABLE : '',
+ 'primary' => 'attachments.attach_id',
+ 'query_first' => (defined('MOD_ATTACHMENT')) ? array('target', $convert->truncate_statement . ATTACHMENTS_TABLE) : '',
+ 'autoincrement' => 'attach_id',
+
+ array('attach_id', 'attachments.attach_id', ''),
+ array('post_msg_id', 'attachments.post_id', ''),
+ array('topic_id', 'posts.topic_id', ''),
+ array('in_message', 0, ''),
+ array('is_orphan', 0, ''),
+ array('poster_id', 'attachments.user_id_1 AS poster_id', 'phpbb_user_id'),
+ array('physical_filename', 'attachments_desc.physical_filename', 'import_attachment'),
+ array('real_filename', 'attachments_desc.real_filename', 'phpbb_set_encoding'),
+ array('download_count', 'attachments_desc.download_count', ''),
+ array('attach_comment', 'attachments_desc.comment', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')),
+ array('extension', 'attachments_desc.extension', ''),
+ array('mimetype', 'attachments_desc.mimetype', ''),
+ array('filesize', 'attachments_desc.filesize', ''),
+ array('filetime', 'attachments_desc.filetime', ''),
+ array('thumbnail', 'attachments_desc.thumbnail', ''),
+
+ 'where' => 'attachments_desc.attach_id = attachments.attach_id AND attachments.privmsgs_id = 0 AND posts.post_id = attachments.post_id',
+ 'group_by' => 'attachments.attach_id'
+ ),
+
+ array(
+ 'target' => (defined('MOD_ATTACHMENT')) ? ATTACHMENTS_TABLE : '',
+ 'primary' => 'attachments.attach_id',
+ 'autoincrement' => 'attach_id',
+
+ array('attach_id', 'attachments.attach_id', ''),
+ array('post_msg_id', 'attachments.privmsgs_id', ''),
+ array('topic_id', 0, ''),
+ array('in_message', 1, ''),
+ array('is_orphan', 0, ''),
+ array('poster_id', 'attachments.user_id_1 AS poster_id', 'phpbb_user_id'),
+ array('physical_filename', 'attachments_desc.physical_filename', 'import_attachment'),
+ array('real_filename', 'attachments_desc.real_filename', ''),
+ array('download_count', 'attachments_desc.download_count', ''),
+ array('attach_comment', 'attachments_desc.comment', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')),
+ array('extension', 'attachments_desc.extension', ''),
+ array('mimetype', 'attachments_desc.mimetype', ''),
+ array('filesize', 'attachments_desc.filesize', ''),
+ array('filetime', 'attachments_desc.filetime', ''),
+ array('thumbnail', 'attachments_desc.thumbnail', ''),
+
+ 'where' => 'attachments_desc.attach_id = attachments.attach_id AND attachments.post_id = 0',
+ 'group_by' => 'attachments.attach_id'
+ ),
+
+ array(
+ 'target' => (defined('MOD_ATTACHMENT')) ? EXTENSIONS_TABLE : '',
+ 'query_first' => (defined('MOD_ATTACHMENT')) ? array('target', $convert->truncate_statement . EXTENSIONS_TABLE) : '',
+ 'autoincrement' => 'extension_id',
+
+ array('extension_id', 'extensions.ext_id', ''),
+ array('group_id', 'extensions.group_id', ''),
+ array('extension', 'extensions.extension', ''),
+ ),
+
+ array(
+ 'target' => (defined('MOD_ATTACHMENT')) ? EXTENSION_GROUPS_TABLE : '',
+ 'query_first' => (defined('MOD_ATTACHMENT')) ? array('target', $convert->truncate_statement . EXTENSION_GROUPS_TABLE) : '',
+ 'autoincrement' => 'group_id',
+
+ array('group_id', 'extension_groups.group_id', ''),
+ array('group_name', 'extension_groups.group_name', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')),
+ array('cat_id', 'extension_groups.cat_id', 'phpbb_attachment_category'),
+ array('allow_group', 'extension_groups.allow_group', ''),
+ array('download_mode', 1, ''),
+ array('upload_icon', '', ''),
+ array('max_filesize', 'extension_groups.max_filesize', ''),
+ array('allowed_forums', 'extension_groups.forum_permissions', 'phpbb_attachment_forum_perms'),
+ array('allow_in_pm', 1, ''),
+ ),
+
+ array(
+ 'target' => BANLIST_TABLE,
+ 'execute_first' => 'phpbb_check_username_collisions();',
+ 'query_first' => array('target', $convert->truncate_statement . BANLIST_TABLE),
+
+ array('ban_ip', 'banlist.ban_ip', 'decode_ban_ip'),
+ array('ban_userid', 'banlist.ban_userid', 'phpbb_user_id'),
+ array('ban_email', 'banlist.ban_email', ''),
+ array('ban_reason', '', ''),
+ array('ban_give_reason', '', ''),
+
+ 'where' => "banlist.ban_ip NOT LIKE '%.%'",
+ ),
+
+ array(
+ 'target' => BANLIST_TABLE,
+
+ array('ban_ip', 'banlist.ban_ip', ''),
+ array('ban_userid', 0, ''),
+ array('ban_email', '', ''),
+ array('ban_reason', '', ''),
+ array('ban_give_reason', '', ''),
+
+ 'where' => "banlist.ban_ip LIKE '%.%'",
+ ),
+
+ array(
+ 'target' => DISALLOW_TABLE,
+ 'query_first' => array('target', $convert->truncate_statement . DISALLOW_TABLE),
+
+ array('disallow_username', 'disallow.disallow_username', 'phpbb_disallowed_username'),
+ ),
+
+ array(
+ 'target' => RANKS_TABLE,
+ 'query_first' => array('target', $convert->truncate_statement . RANKS_TABLE),
+ 'autoincrement' => 'rank_id',
+
+ array('rank_id', 'ranks.rank_id', ''),
+ array('rank_title', 'ranks.rank_title', array('function1' => 'phpbb_set_default_encoding', 'function2' => 'utf8_htmlspecialchars')),
+ array('rank_min', 'ranks.rank_min', array('typecast' => 'int', 'execute' => '{RESULT} = ({VALUE}[0] < 0) ? 0 : {VALUE}[0];')),
+ array('rank_special', 'ranks.rank_special', ''),
+ array('rank_image', 'ranks.rank_image', 'import_rank'),
+ ),
+
+ array(
+ 'target' => TOPICS_TABLE,
+ 'query_first' => array('target', $convert->truncate_statement . TOPICS_TABLE),
+ 'primary' => 'topics.topic_id',
+ 'autoincrement' => 'topic_id',
+
+ array('topic_id', 'topics.topic_id', ''),
+ array('forum_id', 'topics.forum_id', ''),
+ array('icon_id', 0, ''),
+ array('topic_poster', 'topics.topic_poster AS poster_id', 'phpbb_user_id'),
+ array('topic_attachment', ((defined('MOD_ATTACHMENT')) ? 'topics.topic_attachment' : 0), ''),
+ array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'),
+ array('topic_time', 'topics.topic_time', ''),
+ array('topic_views', 'topics.topic_views', ''),
+ array('topic_replies', 'topics.topic_replies', ''),
+ array('topic_replies_real', 'topics.topic_replies', ''),
+ array('topic_last_post_id', 'topics.topic_last_post_id', ''),
+ array('topic_status', 'topics.topic_status', 'is_topic_locked'),
+ array('topic_moved_id', 0, ''),
+ array('topic_type', 'topics.topic_type', 'phpbb_convert_topic_type'),
+ array('topic_first_post_id', 'topics.topic_first_post_id', ''),
+ array('topic_last_view_time', 'posts.post_time', 'intval'),
+ array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'phpbb_set_encoding', 'function3' => 'utf8_htmlspecialchars')),
+ array('poll_start', 'vote_desc.vote_start', 'null_to_zero'),
+ array('poll_length', 'vote_desc.vote_length', 'null_to_zero'),
+ array('poll_max_options', 1, ''),
+ array('poll_vote_change', 0, ''),
+
+ 'left_join' => array ( 'topics LEFT JOIN vote_desc ON topics.topic_id = vote_desc.topic_id AND topics.topic_vote = 1',
+ 'topics LEFT JOIN posts ON topics.topic_last_post_id = posts.post_id',
+ ),
+ 'where' => 'topics.topic_moved_id = 0',
+ ),
+
+ array(
+ 'target' => TOPICS_TABLE,
+ 'primary' => 'topics.topic_id',
+ 'autoincrement' => 'topic_id',
+
+ array('topic_id', 'topics.topic_id', ''),
+ array('forum_id', 'topics.forum_id', ''),
+ array('icon_id', 0, ''),
+ array('topic_poster', 'topics.topic_poster AS poster_id', 'phpbb_user_id'),
+ array('topic_attachment', ((defined('MOD_ATTACHMENT')) ? 'topics.topic_attachment' : 0), ''),
+ array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'),
+ array('topic_time', 'topics.topic_time', ''),
+ array('topic_views', 'topics.topic_views', ''),
+ array('topic_replies', 'topics.topic_replies', ''),
+ array('topic_replies_real', 'topics.topic_replies', ''),
+ array('topic_last_post_id', 'topics.topic_last_post_id', ''),
+ array('topic_status', ITEM_MOVED, ''),
+ array('topic_moved_id', 'topics.topic_moved_id', ''),
+ array('topic_type', 'topics.topic_type', 'phpbb_convert_topic_type'),
+ array('topic_first_post_id', 'topics.topic_first_post_id', ''),
+
+ array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'phpbb_set_encoding', 'function3' => 'utf8_htmlspecialchars')),
+ array('poll_start', 'vote_desc.vote_start', 'null_to_zero'),
+ array('poll_length', 'vote_desc.vote_length', 'null_to_zero'),
+ array('poll_max_options', 1, ''),
+ array('poll_vote_change', 0, ''),
+
+ 'left_join' => 'topics LEFT JOIN vote_desc ON topics.topic_id = vote_desc.topic_id AND topics.topic_vote = 1',
+ 'where' => 'topics.topic_moved_id <> 0',
+ ),
+
+ array(
+ 'target' => TOPICS_WATCH_TABLE,
+ 'primary' => 'topics_watch.topic_id',
+ 'query_first' => array('target', $convert->truncate_statement . TOPICS_WATCH_TABLE),
+
+ array('topic_id', 'topics_watch.topic_id', ''),
+ array('user_id', 'topics_watch.user_id', 'phpbb_user_id'),
+ array('notify_status', 'topics_watch.notify_status', ''),
+ ),
+
+ array(
+ 'target' => SMILIES_TABLE,
+ 'query_first' => array('target', $convert->truncate_statement . SMILIES_TABLE),
+ 'autoincrement' => 'smiley_id',
+
+ array('smiley_id', 'smilies.smilies_id', ''),
+ array('code', 'smilies.code', array('function1' => 'phpbb_smilie_html_decode', 'function2' => 'phpbb_set_encoding', 'function3' => 'utf8_htmlspecialchars')),
+ array('emotion', 'smilies.emoticon', 'phpbb_set_encoding'),
+ array('smiley_url', 'smilies.smile_url', 'import_smiley'),
+ array('smiley_width', 'smilies.smile_url', 'get_smiley_width'),
+ array('smiley_height', 'smilies.smile_url', 'get_smiley_height'),
+ array('smiley_order', 'smilies.smilies_id', ''),
+ array('display_on_posting', 'smilies.smilies_id', 'get_smiley_display'),
+
+ 'order_by' => 'smilies.smilies_id ASC',
+ ),
+
+ array(
+ 'target' => POLL_OPTIONS_TABLE,
+ 'primary' => 'vote_results.vote_option_id',
+ 'query_first' => array('target', $convert->truncate_statement . POLL_OPTIONS_TABLE),
+
+ array('poll_option_id', 'vote_results.vote_option_id', ''),
+ array('topic_id', 'vote_desc.topic_id', ''),
+ array('', 'topics.topic_poster AS poster_id', 'phpbb_user_id'),
+ array('poll_option_text', 'vote_results.vote_option_text', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')),
+ array('poll_option_total', 'vote_results.vote_result', ''),
+
+ 'where' => 'vote_results.vote_id = vote_desc.vote_id',
+ 'left_join' => 'vote_desc LEFT JOIN topics ON topics.topic_id = vote_desc.topic_id',
+ ),
+
+ array(
+ 'target' => POLL_VOTES_TABLE,
+ 'primary' => 'vote_desc.topic_id',
+ 'query_first' => array('target', $convert->truncate_statement . POLL_VOTES_TABLE),
+
+ array('poll_option_id', VOTE_CONVERTED, ''),
+ array('topic_id', 'vote_desc.topic_id', ''),
+ array('vote_user_id', 'vote_voters.vote_user_id', 'phpbb_user_id'),
+ array('vote_user_ip', 'vote_voters.vote_user_ip', 'decode_ip'),
+
+ 'where' => 'vote_voters.vote_id = vote_desc.vote_id',
+ ),
+
+ array(
+ 'target' => WORDS_TABLE,
+ 'primary' => 'words.word_id',
+ 'query_first' => array('target', $convert->truncate_statement . WORDS_TABLE),
+ 'autoincrement' => 'word_id',
+
+ array('word_id', 'words.word_id', ''),
+ array('word', 'words.word', 'phpbb_set_encoding'),
+ array('replacement', 'words.replacement', 'phpbb_set_encoding'),
+ ),
+
+ array(
+ 'target' => POSTS_TABLE,
+ 'primary' => 'posts.post_id',
+ 'autoincrement' => 'post_id',
+ 'query_first' => array('target', $convert->truncate_statement . POSTS_TABLE),
+ 'execute_first' => '
+ $config["max_post_chars"] = 0;
+ $config["min_post_chars"] = 0;
+ $config["max_quote_depth"] = 0;
+ ',
+
+ array('post_id', 'posts.post_id', ''),
+ array('topic_id', 'posts.topic_id', ''),
+ array('forum_id', 'posts.forum_id', ''),
+ array('poster_id', 'posts.poster_id', 'phpbb_user_id'),
+ array('icon_id', 0, ''),
+ array('poster_ip', 'posts.poster_ip', 'decode_ip'),
+ array('post_time', 'posts.post_time', ''),
+ array('enable_bbcode', 'posts.enable_bbcode', ''),
+ array('', 'posts.enable_html', ''),
+ array('enable_smilies', 'posts.enable_smilies', ''),
+ array('enable_sig', 'posts.enable_sig', ''),
+ array('enable_magic_url', 1, ''),
+ array('post_username', 'posts.post_username', 'phpbb_set_encoding'),
+ array('post_subject', 'posts_text.post_subject', 'phpbb_set_encoding'),
+ array('post_attachment', ((defined('MOD_ATTACHMENT')) ? 'posts.post_attachment' : 0), ''),
+ array('post_edit_time', 'posts.post_edit_time', array('typecast' => 'int')),
+ array('post_edit_count', 'posts.post_edit_count', ''),
+ array('post_edit_reason', '', ''),
+ array('post_edit_user', '', 'phpbb_post_edit_user'),
+
+ array('bbcode_uid', 'posts.post_time', 'make_uid'),
+ array('post_text', 'posts_text.post_text', 'phpbb_prepare_message'),
+ array('', 'posts_text.bbcode_uid AS old_bbcode_uid', ''),
+ array('bbcode_bitfield', '', 'get_bbcode_bitfield'),
+ array('post_checksum', '', ''),
+
+ // Commented out inline search indexing, this takes up a LOT of time. :D
+ // @todo We either need to enable this or call the rebuild search functionality post convert
+/* array('', '', 'search_indexing'),
+ array('', 'posts_text.post_text AS message', ''),
+ array('', 'posts_text.post_subject AS title', ''),*/
+
+ 'where' => 'posts.post_id = posts_text.post_id'
+ ),
+
+ array(
+ 'target' => PRIVMSGS_TABLE,
+ 'primary' => 'privmsgs.privmsgs_id',
+ 'autoincrement' => 'msg_id',
+ 'query_first' => array(
+ array('target', $convert->truncate_statement . PRIVMSGS_TABLE),
+ array('target', $convert->truncate_statement . PRIVMSGS_RULES_TABLE),
+ ),
+
+ 'execute_first' => '
+ $config["max_post_chars"] = 0;
+ $config["min_post_chars"] = 0;
+ $config["max_quote_depth"] = 0;
+ ',
+
+ array('msg_id', 'privmsgs.privmsgs_id', ''),
+ array('root_level', 0, ''),
+ array('author_id', 'privmsgs.privmsgs_from_userid AS poster_id', 'phpbb_user_id'),
+ array('icon_id', 0, ''),
+ array('author_ip', 'privmsgs.privmsgs_ip', 'decode_ip'),
+ array('message_time', 'privmsgs.privmsgs_date', ''),
+ array('enable_bbcode', 'privmsgs.privmsgs_enable_bbcode AS enable_bbcode', ''),
+ array('', 'privmsgs.privmsgs_enable_html AS enable_html', ''),
+ array('enable_smilies', 'privmsgs.privmsgs_enable_smilies AS enable_smilies', ''),
+ array('enable_magic_url', 1, ''),
+ array('enable_sig', 'privmsgs.privmsgs_attach_sig', ''),
+ array('message_subject', 'privmsgs.privmsgs_subject', 'phpbb_set_encoding'), // Already specialchared in 2.0.x
+ array('message_attachment', ((defined('MOD_ATTACHMENT')) ? 'privmsgs.privmsgs_attachment' : 0), ''),
+ array('message_edit_reason', '', ''),
+ array('message_edit_user', 0, ''),
+ array('message_edit_time', 0, ''),
+ array('message_edit_count', 0, ''),
+
+ array('bbcode_uid', 'privmsgs.privmsgs_date AS post_time', 'make_uid'),
+ array('message_text', 'privmsgs_text.privmsgs_text', 'phpbb_prepare_message'),
+ array('', 'privmsgs_text.privmsgs_bbcode_uid AS old_bbcode_uid', ''),
+ array('bbcode_bitfield', '', 'get_bbcode_bitfield'),
+ array('to_address', 'privmsgs.privmsgs_to_userid', 'phpbb_privmsgs_to_userid'),
+ array('bcc_address', '', ''),
+
+ 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id'
+ ),
+
+ array(
+ 'target' => PRIVMSGS_FOLDER_TABLE,
+ 'primary' => 'users.user_id',
+ 'query_first' => array('target', $convert->truncate_statement . PRIVMSGS_FOLDER_TABLE),
+
+ array('user_id', 'users.user_id', 'phpbb_user_id'),
+ array('folder_name', $user->lang['CONV_SAVED_MESSAGES'], ''),
+ array('pm_count', 0, ''),
+
+ 'where' => 'users.user_id <> -1',
+ ),
+
+ // Inbox
+ array(
+ 'target' => PRIVMSGS_TO_TABLE,
+ 'primary' => 'privmsgs.privmsgs_id',
+ 'query_first' => array('target', $convert->truncate_statement . PRIVMSGS_TO_TABLE),
+
+ array('msg_id', 'privmsgs.privmsgs_id', ''),
+ array('user_id', 'privmsgs.privmsgs_to_userid', 'phpbb_user_id'),
+ array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
+ array('pm_deleted', 0, ''),
+ array('pm_new', 'privmsgs.privmsgs_type', 'phpbb_new_pm'),
+ array('pm_unread', 'privmsgs.privmsgs_type', 'phpbb_unread_pm'),
+ array('pm_replied', 0, ''),
+ array('pm_marked', 0, ''),
+ array('pm_forwarded', 0, ''),
+ array('folder_id', PRIVMSGS_INBOX, ''),
+
+ 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id
+ AND (privmsgs.privmsgs_type = 0 OR privmsgs.privmsgs_type = 1 OR privmsgs.privmsgs_type = 5)',
+ ),
+
+ // Outbox
+ array(
+ 'target' => PRIVMSGS_TO_TABLE,
+ 'primary' => 'privmsgs.privmsgs_id',
+
+ array('msg_id', 'privmsgs.privmsgs_id', ''),
+ array('user_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
+ array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
+ array('pm_deleted', 0, ''),
+ array('pm_new', 0, ''),
+ array('pm_unread', 0, ''),
+ array('pm_replied', 0, ''),
+ array('pm_marked', 0, ''),
+ array('pm_forwarded', 0, ''),
+ array('folder_id', PRIVMSGS_OUTBOX, ''),
+
+ 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id
+ AND (privmsgs.privmsgs_type = 1 OR privmsgs.privmsgs_type = 5)',
+ ),
+
+ // Sentbox
+ array(
+ 'target' => PRIVMSGS_TO_TABLE,
+ 'primary' => 'privmsgs.privmsgs_id',
+
+ array('msg_id', 'privmsgs.privmsgs_id', ''),
+ array('user_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
+ array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
+ array('pm_deleted', 0, ''),
+ array('pm_new', 'privmsgs.privmsgs_type', 'phpbb_new_pm'),
+ array('pm_unread', 'privmsgs.privmsgs_type', 'phpbb_unread_pm'),
+ array('pm_replied', 0, ''),
+ array('pm_marked', 0, ''),
+ array('pm_forwarded', 0, ''),
+ array('folder_id', PRIVMSGS_SENTBOX, ''),
+
+ 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id
+ AND privmsgs.privmsgs_type = 2',
+ ),
+
+ // Savebox (SAVED IN)
+ array(
+ 'target' => PRIVMSGS_TO_TABLE,
+ 'primary' => 'privmsgs.privmsgs_id',
+
+ array('msg_id', 'privmsgs.privmsgs_id', ''),
+ array('user_id', 'privmsgs.privmsgs_to_userid', 'phpbb_user_id'),
+ array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
+ array('pm_deleted', 0, ''),
+ array('pm_new', 'privmsgs.privmsgs_type', 'phpbb_new_pm'),
+ array('pm_unread', 'privmsgs.privmsgs_type', 'phpbb_unread_pm'),
+ array('pm_replied', 0, ''),
+ array('pm_marked', 0, ''),
+ array('pm_forwarded', 0, ''),
+ array('folder_id', 'privmsgs.privmsgs_to_userid', 'phpbb_get_savebox_id'),
+
+ 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id
+ AND privmsgs.privmsgs_type = 3',
+ ),
+
+ // Savebox (SAVED OUT)
+ array(
+ 'target' => PRIVMSGS_TO_TABLE,
+ 'primary' => 'privmsgs.privmsgs_id',
+
+ array('msg_id', 'privmsgs.privmsgs_id', ''),
+ array('user_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
+ array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
+ array('pm_deleted', 0, ''),
+ array('pm_new', 'privmsgs.privmsgs_type', 'phpbb_new_pm'),
+ array('pm_unread', 'privmsgs.privmsgs_type', 'phpbb_unread_pm'),
+ array('pm_replied', 0, ''),
+ array('pm_marked', 0, ''),
+ array('pm_forwarded', 0, ''),
+ array('folder_id', 'privmsgs.privmsgs_from_userid', 'phpbb_get_savebox_id'),
+
+ 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id
+ AND privmsgs.privmsgs_type = 4',
+ ),
+
+ array(
+ 'target' => GROUPS_TABLE,
+ 'autoincrement' => 'group_id',
+ 'query_first' => array('target', $convert->truncate_statement . GROUPS_TABLE),
+
+ array('group_id', 'groups.group_id', ''),
+ array('group_type', 'groups.group_type', 'phpbb_convert_group_type'),
+ array('group_display', 0, ''),
+ array('group_legend', 0, ''),
+ array('group_name', 'groups.group_name', 'phpbb_convert_group_name'), // phpbb_set_encoding called in phpbb_convert_group_name
+ array('group_desc', 'groups.group_description', 'phpbb_set_encoding'),
+
+ 'where' => 'groups.group_single_user = 0',
+ ),
+
+ array(
+ 'target' => USER_GROUP_TABLE,
+ 'query_first' => array('target', $convert->truncate_statement . USER_GROUP_TABLE),
+ 'execute_first' => '
+ add_default_groups();
+ ',
+
+ array('group_id', 'groups.group_id', ''),
+ array('user_id', 'groups.group_moderator', 'phpbb_user_id'),
+ array('group_leader', 1, ''),
+ array('user_pending', 0, ''),
+
+ 'where' => 'groups.group_single_user = 0 AND groups.group_moderator <> 0',
+ ),
+
+ array(
+ 'target' => USER_GROUP_TABLE,
+
+ array('group_id', 'user_group.group_id', ''),
+ array('user_id', 'user_group.user_id', 'phpbb_user_id'),
+ array('group_leader', 0, ''),
+ array('user_pending', 'user_group.user_pending', ''),
+
+ 'where' => 'user_group.group_id = groups.group_id AND groups.group_single_user = 0 AND groups.group_moderator <> user_group.user_id',
+ ),
+
+ array(
+ 'target' => USERS_TABLE,
+ 'primary' => 'users.user_id',
+ 'autoincrement' => 'user_id',
+ 'query_first' => array(
+ array('target', 'DELETE FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS),
+ array('target', $convert->truncate_statement . BOTS_TABLE)
+ ),
+
+ 'execute_last' => '
+ remove_invalid_users();
+ ',
+
+ array('user_id', 'users.user_id', 'phpbb_user_id'),
+ array('', 'users.user_id AS poster_id', 'phpbb_user_id'),
+ array('user_type', 'users.user_active', 'set_user_type'),
+ array('group_id', 'users.user_level', 'phpbb_set_primary_group'),
+ array('user_regdate', 'users.user_regdate', ''),
+ array('username', 'users.username', 'phpbb_set_default_encoding'), // recode to utf8 with default lang
+ array('username_clean', 'users.username', array('function1' => 'phpbb_set_default_encoding', 'function2' => 'utf8_clean_string')),
+ array('user_password', 'users.user_password', 'phpbb_hash'),
+ array('user_pass_convert', 1, ''),
+ array('user_posts', 'users.user_posts', 'intval'),
+ array('user_email', 'users.user_email', 'strtolower'),
+ array('user_email_hash', 'users.user_email', 'gen_email_hash'),
+ array('user_birthday', ((defined('MOD_BIRTHDAY')) ? 'users.user_birthday' : ''), 'phpbb_get_birthday'),
+ array('user_lastvisit', 'users.user_lastvisit', 'intval'),
+ array('user_lastmark', 'users.user_lastvisit', 'intval'),
+ array('user_lang', $config['default_lang'], ''),
+ array('', 'users.user_lang', ''),
+ array('user_timezone', 'users.user_timezone', 'floatval'),
+ array('user_dateformat', 'users.user_dateformat', array('function1' => 'phpbb_set_encoding', 'function2' => 'fill_dateformat')),
+ array('user_inactive_reason', '', 'phpbb_inactive_reason'),
+ array('user_inactive_time', '', 'phpbb_inactive_time'),
+
+ array('user_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding')),
+ array('user_occ', 'users.user_occ', array('function1' => 'phpbb_set_encoding')),
+ array('user_website', 'users.user_website', 'validate_website'),
+ array('user_jabber', '', ''),
+ array('user_msnm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')),
+ array('user_yim', 'users.user_yim', array('function1' => 'phpbb_set_encoding')),
+ array('user_aim', 'users.user_aim', array('function1' => 'phpbb_set_encoding')),
+ array('user_icq', 'users.user_icq', array('function1' => 'phpbb_set_encoding')),
+ array('user_from', 'users.user_from', array('function1' => 'phpbb_set_encoding')),
+ array('user_rank', 'users.user_rank', 'intval'),
+ array('user_permissions', '', ''),
+
+ array('user_avatar', 'users.user_avatar', 'phpbb_import_avatar'),
+ array('user_avatar_type', 'users.user_avatar_type', 'phpbb_avatar_type'),
+ array('user_avatar_width', 'users.user_avatar', 'phpbb_get_avatar_width'),
+ array('user_avatar_height', 'users.user_avatar', 'phpbb_get_avatar_height'),
+
+ array('user_new_privmsg', 'users.user_new_privmsg', ''),
+ array('user_unread_privmsg', 0, ''), //'users.user_unread_privmsg'
+ array('user_last_privmsg', 'users.user_last_privmsg', 'intval'),
+ array('user_emailtime', 'users.user_emailtime', 'null_to_zero'),
+ array('user_notify', 'users.user_notify', 'intval'),
+ array('user_notify_pm', 'users.user_notify_pm', 'intval'),
+ array('user_notify_type', NOTIFY_EMAIL, ''),
+ array('user_allow_pm', 'users.user_allow_pm', 'intval'),
+ array('user_allow_viewonline', 'users.user_allow_viewonline', 'intval'),
+ array('user_allow_viewemail', 'users.user_viewemail', 'intval'),
+ array('user_actkey', 'users.user_actkey', ''),
+ array('user_newpasswd', '', ''), // Users need to re-request their password...
+ array('user_style', $config['default_style'], ''),
+
+ array('user_options', '', 'set_user_options'),
+ array('', 'users.user_popup_pm AS popuppm', ''),
+ array('', 'users.user_allowhtml AS html', ''),
+ array('', 'users.user_allowbbcode AS bbcode', ''),
+ array('', 'users.user_allowsmile AS smile', ''),
+ array('', 'users.user_attachsig AS attachsig',''),
+
+ array('user_sig_bbcode_uid', 'users.user_regdate', 'make_uid'),
+ array('user_sig', 'users.user_sig', 'phpbb_prepare_message'),
+ array('', 'users.user_sig_bbcode_uid AS old_bbcode_uid', ''),
+ array('user_sig_bbcode_bitfield', '', 'get_bbcode_bitfield'),
+ array('', 'users.user_regdate AS post_time', ''),
+
+ 'where' => 'users.user_id <> -1',
+ ),
+ ),
+ );
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
new file mode 100644
index 0000000000..b80c7673e3
--- /dev/null
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -0,0 +1,1867 @@
+<?php
+/**
+*
+* @package install
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Helper functions for phpBB 2.0.x to phpBB 3.0.x conversion
+*/
+
+/**
+* Set forum flags - only prune old polls by default
+*/
+function phpbb_forum_flags()
+{
+ // Set forum flags
+ $forum_flags = 0;
+
+ // FORUM_FLAG_LINK_TRACK
+ $forum_flags += 0;
+
+ // FORUM_FLAG_PRUNE_POLL
+ $forum_flags += FORUM_FLAG_PRUNE_POLL;
+
+ // FORUM_FLAG_PRUNE_ANNOUNCE
+ $forum_flags += 0;
+
+ // FORUM_FLAG_PRUNE_STICKY
+ $forum_flags += 0;
+
+ // FORUM_FLAG_ACTIVE_TOPICS
+ $forum_flags += 0;
+
+ // FORUM_FLAG_POST_REVIEW
+ $forum_flags += FORUM_FLAG_POST_REVIEW;
+
+ return $forum_flags;
+}
+
+/**
+* Insert/Convert forums
+*/
+function phpbb_insert_forums()
+{
+ global $db, $src_db, $same_db, $convert, $user, $config;
+
+ $db->sql_query($convert->truncate_statement . FORUMS_TABLE);
+
+ // Determine the highest id used within the old forums table (we add the categories after the forum ids)
+ $sql = 'SELECT MAX(forum_id) AS max_forum_id
+ FROM ' . $convert->src_table_prefix . 'forums';
+ $result = $src_db->sql_query($sql);
+ $max_forum_id = (int) $src_db->sql_fetchfield('max_forum_id');
+ $src_db->sql_freeresult($result);
+
+ $max_forum_id++;
+
+ // pruning disabled globally?
+ $sql = "SELECT config_value
+ FROM {$convert->src_table_prefix}config
+ WHERE config_name = 'prune_enable'";
+ $result = $src_db->sql_query($sql);
+ $prune_enabled = (int) $src_db->sql_fetchfield('config_value');
+ $src_db->sql_freeresult($result);
+
+
+ // Insert categories
+ $sql = 'SELECT cat_id, cat_title
+ FROM ' . $convert->src_table_prefix . 'categories
+ ORDER BY cat_order';
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+
+ $result = $src_db->sql_query($sql);
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+
+ switch ($db->sql_layer)
+ {
+ case 'mssql':
+ case 'mssql_odbc':
+ $db->sql_query('SET IDENTITY_INSERT ' . FORUMS_TABLE . ' ON');
+ break;
+ }
+
+ $cats_added = array();
+ while ($row = $src_db->sql_fetchrow($result))
+ {
+ $sql_ary = array(
+ 'forum_id' => (int) $max_forum_id,
+ 'forum_name' => ($row['cat_title']) ? htmlspecialchars(phpbb_set_default_encoding($row['cat_title']), ENT_COMPAT, 'UTF-8') : $user->lang['CATEGORY'],
+ 'parent_id' => 0,
+ 'forum_parents' => '',
+ 'forum_desc' => '',
+ 'forum_type' => FORUM_CAT,
+ 'forum_status' => ITEM_UNLOCKED,
+ 'forum_rules' => '',
+ );
+
+ $sql = 'SELECT MAX(right_id) AS right_id
+ FROM ' . FORUMS_TABLE;
+ $_result = $db->sql_query($sql);
+ $cat_row = $db->sql_fetchrow($_result);
+ $db->sql_freeresult($_result);
+
+ $sql_ary['left_id'] = (int) ($cat_row['right_id'] + 1);
+ $sql_ary['right_id'] = (int) ($cat_row['right_id'] + 2);
+
+ $sql = 'INSERT INTO ' . FORUMS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ $db->sql_query($sql);
+
+ $cats_added[$row['cat_id']] = $max_forum_id;
+ $max_forum_id++;
+ }
+ $src_db->sql_freeresult($result);
+
+ // There may be installations having forums with non-existant category ids.
+ // We try to catch them and add them to an "unknown" category instead of leaving them out.
+ $sql = 'SELECT cat_id
+ FROM ' . $convert->src_table_prefix . 'forums
+ GROUP BY cat_id';
+ $result = $src_db->sql_query($sql);
+
+ $unknown_cat_id = false;
+ while ($row = $src_db->sql_fetchrow($result))
+ {
+ // Catch those categories not been added before
+ if (!isset($cats_added[$row['cat_id']]))
+ {
+ $unknown_cat_id = true;
+ }
+ }
+ $src_db->sql_freeresult($result);
+
+ // Is there at least one category not known?
+ if ($unknown_cat_id === true)
+ {
+ $unknown_cat_id = 'ghost';
+
+ $sql_ary = array(
+ 'forum_id' => (int) $max_forum_id,
+ 'forum_name' => (string) $user->lang['CATEGORY'],
+ 'parent_id' => 0,
+ 'forum_parents' => '',
+ 'forum_desc' => '',
+ 'forum_type' => FORUM_CAT,
+ 'forum_status' => ITEM_UNLOCKED,
+ 'forum_rules' => '',
+ );
+
+ $sql = 'SELECT MAX(right_id) AS right_id
+ FROM ' . FORUMS_TABLE;
+ $_result = $db->sql_query($sql);
+ $cat_row = $db->sql_fetchrow($_result);
+ $db->sql_freeresult($_result);
+
+ $sql_ary['left_id'] = (int) ($cat_row['right_id'] + 1);
+ $sql_ary['right_id'] = (int) ($cat_row['right_id'] + 2);
+
+ $sql = 'INSERT INTO ' . FORUMS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ $db->sql_query($sql);
+
+ $cats_added[$unknown_cat_id] = $max_forum_id;
+ $max_forum_id++;
+ }
+
+ // Now insert the forums
+ $sql = 'SELECT f.forum_id, f.forum_name, f.cat_id, f.forum_desc, f.forum_status, f.prune_enable, f.prune_next, fp.prune_days, fp.prune_freq FROM ' . $convert->src_table_prefix . 'forums f
+ LEFT JOIN ' . $convert->src_table_prefix . 'forum_prune fp ON f.forum_id = fp.forum_id
+ GROUP BY f.forum_id, f.forum_name, f.cat_id, f.forum_desc, f.forum_status, f.prune_enable, f.prune_next, f.forum_order, fp.prune_days, fp.prune_freq
+ ORDER BY f.cat_id, f.forum_order';
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+
+ $result = $src_db->sql_query($sql);
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+
+ while ($row = $src_db->sql_fetchrow($result))
+ {
+ // Some might have forums here with an id not being "possible"...
+ // To be somewhat friendly we "change" the category id for those to a previously created ghost category
+ if (!isset($cats_added[$row['cat_id']]) && $unknown_cat_id !== false)
+ {
+ $row['cat_id'] = $unknown_cat_id;
+ }
+
+ if (!isset($cats_added[$row['cat_id']]))
+ {
+ continue;
+ }
+
+ // Define the new forums sql ary
+ $sql_ary = array(
+ 'forum_id' => (int) $row['forum_id'],
+ 'forum_name' => htmlspecialchars(phpbb_set_default_encoding($row['forum_name']), ENT_COMPAT, 'UTF-8'),
+ 'parent_id' => (int) $cats_added[$row['cat_id']],
+ 'forum_parents' => '',
+ 'forum_desc' => htmlspecialchars(phpbb_set_default_encoding($row['forum_desc']), ENT_COMPAT, 'UTF-8'),
+ 'forum_type' => FORUM_POST,
+ 'forum_status' => is_item_locked($row['forum_status']),
+ 'enable_prune' => ($prune_enabled) ? (int)$row['prune_enable'] : 0,
+ 'prune_next' => (int) null_to_zero($row['prune_next']),
+ 'prune_days' => (int) null_to_zero($row['prune_days']),
+ 'prune_viewed' => 0,
+ 'prune_freq' => (int) null_to_zero($row['prune_freq']),
+
+ 'forum_flags' => phpbb_forum_flags(),
+ 'forum_options' => 0,
+
+ // Default values
+ 'forum_desc_bitfield' => '',
+ 'forum_desc_options' => 7,
+ 'forum_desc_uid' => '',
+ 'forum_link' => '',
+ 'forum_password' => '',
+ 'forum_style' => 0,
+ 'forum_image' => '',
+ 'forum_rules' => '',
+ 'forum_rules_link' => '',
+ 'forum_rules_bitfield' => '',
+ 'forum_rules_options' => 7,
+ 'forum_rules_uid' => '',
+ 'forum_topics_per_page' => 0,
+ 'forum_posts' => 0,
+ 'forum_topics' => 0,
+ 'forum_topics_real' => 0,
+ 'forum_last_post_id' => 0,
+ 'forum_last_poster_id' => 0,
+ 'forum_last_post_subject' => '',
+ 'forum_last_post_time' => 0,
+ 'forum_last_poster_name' => '',
+ 'forum_last_poster_colour' => '',
+ 'display_on_index' => 1,
+ 'enable_indexing' => 1,
+ 'enable_icons' => 0,
+ );
+
+ // Now add the forums with proper left/right ids
+ $sql = 'SELECT left_id, right_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $cats_added[$row['cat_id']];
+ $_result = $db->sql_query($sql);
+ $cat_row = $db->sql_fetchrow($_result);
+ $db->sql_freeresult($_result);
+
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET left_id = left_id + 2, right_id = right_id + 2
+ WHERE left_id > ' . $cat_row['right_id'];
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET right_id = right_id + 2
+ WHERE ' . $cat_row['left_id'] . ' BETWEEN left_id AND right_id';
+ $db->sql_query($sql);
+
+ $sql_ary['left_id'] = (int) $cat_row['right_id'];
+ $sql_ary['right_id'] = (int) ($cat_row['right_id'] + 1);
+
+ $sql = 'INSERT INTO ' . FORUMS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ $db->sql_query($sql);
+ }
+ $src_db->sql_freeresult($result);
+
+ switch ($db->sql_layer)
+ {
+ case 'postgres':
+ $db->sql_query("SELECT SETVAL('" . FORUMS_TABLE . "_seq',(select case when max(forum_id)>0 then max(forum_id)+1 else 1 end from " . FORUMS_TABLE . '));');
+ break;
+
+ case 'mssql':
+ case 'mssql_odbc':
+ $db->sql_query('SET IDENTITY_INSERT ' . FORUMS_TABLE . ' OFF');
+ break;
+
+ case 'oracle':
+ $result = $db->sql_query('SELECT MAX(forum_id) as max_id FROM ' . FORUMS_TABLE);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $largest_id = (int) $row['max_id'];
+
+ if ($largest_id)
+ {
+ $db->sql_query('DROP SEQUENCE ' . FORUMS_TABLE . '_seq');
+ $db->sql_query('CREATE SEQUENCE ' . FORUMS_TABLE . '_seq START WITH ' . ($largest_id + 1));
+ }
+ break;
+ }
+}
+
+/**
+* Function for recoding text with the default language
+*
+* @param string $text text to recode to utf8
+* @param bool $grab_user_lang if set to true the function tries to use $convert_row['user_lang'] (and falls back to $convert_row['poster_id']) instead of the boards default language
+*/
+function phpbb_set_encoding($text, $grab_user_lang = true)
+{
+ global $lang_enc_array, $convert_row;
+ global $convert, $phpEx;
+
+ /*static $lang_enc_array = array(
+ 'korean' => 'euc-kr',
+ 'serbian' => 'windows-1250',
+ 'polish' => 'iso-8859-2',
+ 'kurdish' => 'windows-1254',
+ 'slovak' => 'Windows-1250',
+ 'russian' => 'windows-1251',
+ 'estonian' => 'iso-8859-4',
+ 'chinese_simplified' => 'gb2312',
+ 'macedonian' => 'windows-1251',
+ 'azerbaijani' => 'UTF-8',
+ 'romanian' => 'iso-8859-2',
+ 'romanian_diacritice' => 'iso-8859-2',
+ 'lithuanian' => 'windows-1257',
+ 'turkish' => 'iso-8859-9',
+ 'ukrainian' => 'windows-1251',
+ 'japanese' => 'shift_jis',
+ 'hungarian' => 'ISO-8859-2',
+ 'romanian_no_diacritics' => 'iso-8859-2',
+ 'mongolian' => 'UTF-8',
+ 'slovenian' => 'windows-1250',
+ 'bosnian' => 'windows-1250',
+ 'czech' => 'Windows-1250',
+ 'farsi' => 'Windows-1256',
+ 'croatian' => 'windows-1250',
+ 'greek' => 'iso-8859-7',
+ 'russian_tu' => 'windows-1251',
+ 'sakha' => 'UTF-8',
+ 'serbian_cyrillic' => 'windows-1251',
+ 'bulgarian' => 'windows-1251',
+ 'chinese_traditional_taiwan' => 'big5',
+ 'chinese_traditional' => 'big5',
+ 'arabic' => 'windows-1256',
+ 'hebrew' => 'WINDOWS-1255',
+ 'thai' => 'windows-874',
+ //'chinese_traditional_taiwan' => 'utf-8' // custom modified, we may have to do an include :-(
+ );*/
+
+ if (empty($lang_enc_array))
+ {
+ $lang_enc_array = array();
+ }
+
+ $get_lang = trim(get_config_value('default_lang'));
+
+ // Do we need the users language encoding?
+ if ($grab_user_lang && !empty($convert_row))
+ {
+ if (!empty($convert_row['user_lang']))
+ {
+ $get_lang = trim($convert_row['user_lang']);
+ }
+ else if (!empty($convert_row['poster_id']))
+ {
+ global $src_db, $same_db;
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+
+ $sql = 'SELECT user_lang
+ FROM ' . $convert->src_table_prefix . 'users
+ WHERE user_id = ' . (int) $convert_row['poster_id'];
+ $result = $src_db->sql_query($sql);
+ $get_lang = (string) $src_db->sql_fetchfield('user_lang');
+ $src_db->sql_freeresult($result);
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+
+ $get_lang = (!trim($get_lang)) ? trim(get_config_value('default_lang')) : trim($get_lang);
+ }
+ }
+
+ if (!isset($lang_enc_array[$get_lang]))
+ {
+ $filename = $convert->options['forum_path'] . '/language/lang_' . $get_lang . '/lang_main.' . $phpEx;
+
+ if (!file_exists($filename))
+ {
+ $get_lang = trim(get_config_value('default_lang'));
+ }
+
+ if (!isset($lang_enc_array[$get_lang]))
+ {
+ include($convert->options['forum_path'] . '/language/lang_' . $get_lang . '/lang_main.' . $phpEx);
+ $lang_enc_array[$get_lang] = $lang['ENCODING'];
+ unset($lang);
+ }
+ }
+
+ $encoding = $lang_enc_array[$get_lang];
+
+ return utf8_recode($text, $lang_enc_array[$get_lang]);
+}
+
+/**
+* Same as phpbb_set_encoding, but forcing boards default language
+*/
+function phpbb_set_default_encoding($text)
+{
+ return phpbb_set_encoding($text, false);
+}
+
+/**
+* Convert Birthday from Birthday MOD to phpBB Format
+*/
+function phpbb_get_birthday($birthday = '')
+{
+ if (defined('MOD_BIRTHDAY_TERRA'))
+ {
+ $birthday = (string) $birthday;
+
+ // stored as month, day, year
+ if (!$birthday)
+ {
+ return ' 0- 0- 0';
+ }
+
+ // We use the original mod code to retrieve the birthday (not ideal)
+ preg_match('/(..)(..)(....)/', sprintf('%08d', $birthday), $birthday_parts);
+
+ $month = $birthday_parts[1];
+ $day = $birthday_parts[2];
+ $year = $birthday_parts[3];
+
+ return sprintf('%2d-%2d-%4d', $day, $month, $year);
+ }
+ else
+ {
+ $birthday = (int) $birthday;
+
+ if (!$birthday || $birthday == 999999 || ((version_compare(PHP_VERSION, '5.1.0') < 0) && $birthday < 0))
+ {
+ return ' 0- 0- 0';
+ }
+
+ // The birthday mod from niels is using this code to transform to day/month/year
+ return sprintf('%2d-%2d-%4d', gmdate('j', $birthday * 86400 + 1), gmdate('n', $birthday * 86400 + 1), gmdate('Y', $birthday * 86400 + 1));
+ }
+}
+
+/**
+* Return correct user id value
+* Everyone's id will be one higher to allow the guest/anonymous user to have a positive id as well
+*/
+function phpbb_user_id($user_id)
+{
+ global $config;
+
+ // Increment user id if the old forum is having a user with the id 1
+ if (!isset($config['increment_user_id']))
+ {
+ global $src_db, $same_db, $convert;
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+
+ // Now let us set a temporary config variable for user id incrementing
+ $sql = "SELECT user_id
+ FROM {$convert->src_table_prefix}users
+ WHERE user_id = 1";
+ $result = $src_db->sql_query($sql);
+ $id = (int) $src_db->sql_fetchfield('user_id');
+ $src_db->sql_freeresult($result);
+
+ // Try to get the maximum user id possible...
+ $sql = "SELECT MAX(user_id) AS max_user_id
+ FROM {$convert->src_table_prefix}users";
+ $result = $src_db->sql_query($sql);
+ $max_id = (int) $src_db->sql_fetchfield('max_user_id');
+ $src_db->sql_freeresult($result);
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+
+ // If there is a user id 1, we need to increment user ids. :/
+ if ($id === 1)
+ {
+ set_config('increment_user_id', ($max_id + 1), true);
+ $config['increment_user_id'] = $max_id + 1;
+ }
+ else
+ {
+ set_config('increment_user_id', 0, true);
+ $config['increment_user_id'] = 0;
+ }
+ }
+
+ // If the old user id is -1 in 2.0.x it is the anonymous user...
+ if ($user_id == -1)
+ {
+ return ANONYMOUS;
+ }
+
+ if (!empty($config['increment_user_id']) && $user_id == 1)
+ {
+ return $config['increment_user_id'];
+ }
+
+ // A user id of 0 can happen, for example within the ban table if no user is banned...
+ // Within the posts and topics table this can be "dangerous" but is the fault of the user
+ // having mods installed (a poster id of 0 is not possible in 2.0.x).
+ // Therefore, we return the user id "as is".
+
+ return (int) $user_id;
+}
+
+/* Copy additional table fields from old forum to new forum if user wants this (for Mod compatibility for example)
+function phpbb_copy_table_fields()
+{
+}
+*/
+
+/**
+* Convert authentication
+* user, group and forum table has to be filled in order to work
+*/
+function phpbb_convert_authentication($mode)
+{
+ global $db, $src_db, $same_db, $convert, $user, $config, $cache;
+
+ if ($mode == 'start')
+ {
+ $db->sql_query($convert->truncate_statement . ACL_USERS_TABLE);
+ $db->sql_query($convert->truncate_statement . ACL_GROUPS_TABLE);
+
+ // What we will do is handling all 2.0.x admins as founder to replicate what is common in 2.0.x.
+ // After conversion the main admin need to make sure he is removing permissions and the founder status if wanted.
+
+
+ // Grab user ids of users with user_level of ADMIN
+ $sql = "SELECT user_id
+ FROM {$convert->src_table_prefix}users
+ WHERE user_level = 1
+ ORDER BY user_regdate ASC";
+ $result = $src_db->sql_query($sql);
+
+ while ($row = $src_db->sql_fetchrow($result))
+ {
+ $user_id = (int) phpbb_user_id($row['user_id']);
+ // Set founder admin...
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_type = ' . USER_FOUNDER . "
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
+ }
+ $src_db->sql_freeresult($result);
+
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = '" . $db->sql_escape('BOTS') . "'";
+ $result = $db->sql_query($sql);
+ $bot_group_id = (int) $db->sql_fetchfield('group_id');
+ $db->sql_freeresult($result);
+ }
+
+ // Grab forum auth information
+ $sql = "SELECT *
+ FROM {$convert->src_table_prefix}forums";
+ $result = $src_db->sql_query($sql);
+
+ $forum_access = array();
+ while ($row = $src_db->sql_fetchrow($result))
+ {
+ $forum_access[$row['forum_id']] = $row;
+ }
+ $src_db->sql_freeresult($result);
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+ // Grab user auth information from 2.0.x board
+ $sql = "SELECT ug.user_id, aa.*
+ FROM {$convert->src_table_prefix}auth_access aa, {$convert->src_table_prefix}user_group ug, {$convert->src_table_prefix}groups g, {$convert->src_table_prefix}forums f
+ WHERE g.group_id = aa.group_id
+ AND g.group_single_user = 1
+ AND ug.group_id = g.group_id
+ AND f.forum_id = aa.forum_id";
+ $result = $src_db->sql_query($sql);
+
+ $user_access = array();
+ while ($row = $src_db->sql_fetchrow($result))
+ {
+ $user_access[$row['forum_id']][] = $row;
+ }
+ $src_db->sql_freeresult($result);
+
+ // Grab group auth information
+ $sql = "SELECT g.group_id, aa.*
+ FROM {$convert->src_table_prefix}auth_access aa, {$convert->src_table_prefix}groups g
+ WHERE g.group_id = aa.group_id
+ AND g.group_single_user <> 1";
+ $result = $src_db->sql_query($sql);
+
+ $group_access = array();
+ while ($row = $src_db->sql_fetchrow($result))
+ {
+ $group_access[$row['forum_id']][] = $row;
+ }
+ $src_db->sql_freeresult($result);
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+
+ // Add Forum Access List
+ $auth_map = array(
+ 'auth_view' => array('f_', 'f_list'),
+ 'auth_read' => array('f_read', 'f_search'),
+ 'auth_post' => array('f_post', 'f_bbcode', 'f_smilies', 'f_img', 'f_sigs', 'f_postcount', 'f_report', 'f_subscribe', 'f_print', 'f_email'),
+ 'auth_reply' => 'f_reply',
+ 'auth_edit' => 'f_edit',
+ 'auth_delete' => 'f_delete',
+ 'auth_pollcreate' => 'f_poll',
+ 'auth_vote' => 'f_vote',
+ 'auth_announce' => 'f_announce',
+ 'auth_sticky' => 'f_sticky',
+ 'auth_attachments' => array('f_attach', 'f_download'),
+ 'auth_download' => 'f_download',
+ );
+
+ // Define the ACL constants used in 2.0 to make the code slightly more readable
+ define('AUTH_ALL', 0);
+ define('AUTH_REG', 1);
+ define('AUTH_ACL', 2);
+ define('AUTH_MOD', 3);
+ define('AUTH_ADMIN', 5);
+
+ // A mapping of the simple permissions used by 2.0
+ $simple_auth_ary = array(
+ 'public' => array(
+ 'auth_view' => AUTH_ALL,
+ 'auth_read' => AUTH_ALL,
+ 'auth_post' => AUTH_ALL,
+ 'auth_reply' => AUTH_ALL,
+ 'auth_edit' => AUTH_REG,
+ 'auth_delete' => AUTH_REG,
+ 'auth_sticky' => AUTH_MOD,
+ 'auth_announce' => AUTH_MOD,
+ 'auth_vote' => AUTH_REG,
+ 'auth_pollcreate' => AUTH_REG,
+ ),
+ 'registered' => array(
+ 'auth_view' => AUTH_ALL,
+ 'auth_read' => AUTH_ALL,
+ 'auth_post' => AUTH_REG,
+ 'auth_reply' => AUTH_REG,
+ 'auth_edit' => AUTH_REG,
+ 'auth_delete' => AUTH_REG,
+ 'auth_sticky' => AUTH_MOD,
+ 'auth_announce' => AUTH_MOD,
+ 'auth_vote' => AUTH_REG,
+ 'auth_pollcreate' => AUTH_REG,
+ ),
+ 'registered_hidden' => array(
+ 'auth_view' => AUTH_REG,
+ 'auth_read' => AUTH_REG,
+ 'auth_post' => AUTH_REG,
+ 'auth_reply' => AUTH_REG,
+ 'auth_edit' => AUTH_REG,
+ 'auth_delete' => AUTH_REG,
+ 'auth_sticky' => AUTH_MOD,
+ 'auth_announce' => AUTH_MOD,
+ 'auth_vote' => AUTH_REG,
+ 'auth_pollcreate' => AUTH_REG,
+ ),
+ 'private' => array(
+ 'auth_view' => AUTH_ALL,
+ 'auth_read' => AUTH_ACL,
+ 'auth_post' => AUTH_ACL,
+ 'auth_reply' => AUTH_ACL,
+ 'auth_edit' => AUTH_ACL,
+ 'auth_delete' => AUTH_ACL,
+ 'auth_sticky' => AUTH_ACL,
+ 'auth_announce' => AUTH_MOD,
+ 'auth_vote' => AUTH_ACL,
+ 'auth_pollcreate' => AUTH_ACL,
+ ),
+ 'private_hidden' => array(
+ 'auth_view' => AUTH_ACL,
+ 'auth_read' => AUTH_ACL,
+ 'auth_post' => AUTH_ACL,
+ 'auth_reply' => AUTH_ACL,
+ 'auth_edit' => AUTH_ACL,
+ 'auth_delete' => AUTH_ACL,
+ 'auth_sticky' => AUTH_ACL,
+ 'auth_announce' => AUTH_MOD,
+ 'auth_vote' => AUTH_ACL,
+ 'auth_pollcreate' => AUTH_ACL,
+ ),
+ 'moderator' => array(
+ 'auth_view' => AUTH_ALL,
+ 'auth_read' => AUTH_MOD,
+ 'auth_post' => AUTH_MOD,
+ 'auth_reply' => AUTH_MOD,
+ 'auth_edit' => AUTH_MOD,
+ 'auth_delete' => AUTH_MOD,
+ 'auth_sticky' => AUTH_MOD,
+ 'auth_announce' => AUTH_MOD,
+ 'auth_vote' => AUTH_MOD,
+ 'auth_pollcreate' => AUTH_MOD,
+ ),
+ 'moderator_hidden' => array(
+ 'auth_view' => AUTH_MOD,
+ 'auth_read' => AUTH_MOD,
+ 'auth_post' => AUTH_MOD,
+ 'auth_reply' => AUTH_MOD,
+ 'auth_edit' => AUTH_MOD,
+ 'auth_delete' => AUTH_MOD,
+ 'auth_sticky' => AUTH_MOD,
+ 'auth_announce' => AUTH_MOD,
+ 'auth_vote' => AUTH_MOD,
+ 'auth_pollcreate' => AUTH_MOD,
+ ),
+ );
+
+ if ($mode == 'start')
+ {
+ user_group_auth('guests', 'SELECT user_id, {GUESTS} FROM ' . USERS_TABLE . ' WHERE user_id = ' . ANONYMOUS, false);
+ user_group_auth('registered', 'SELECT user_id, {REGISTERED} FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS . " AND group_id <> $bot_group_id", false);
+
+ // Selecting from old table
+ if (!empty($config['increment_user_id']))
+ {
+ $auth_sql = 'SELECT user_id, {ADMINISTRATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1 AND user_id <> 1';
+ user_group_auth('administrators', $auth_sql, true);
+
+ $auth_sql = 'SELECT ' . $config['increment_user_id'] . ' as user_id, {ADMINISTRATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1 AND user_id = 1';
+ user_group_auth('administrators', $auth_sql, true);
+ }
+ else
+ {
+ $auth_sql = 'SELECT user_id, {ADMINISTRATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1';
+ user_group_auth('administrators', $auth_sql, true);
+ }
+
+ if (!empty($config['increment_user_id']))
+ {
+ $auth_sql = 'SELECT user_id, {GLOBAL_MODERATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1 AND user_id <> 1';
+ user_group_auth('global_moderators', $auth_sql, true);
+
+ $auth_sql = 'SELECT ' . $config['increment_user_id'] . ' as user_id, {GLOBAL_MODERATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1 AND user_id = 1';
+ user_group_auth('global_moderators', $auth_sql, true);
+ }
+ else
+ {
+ $auth_sql = 'SELECT user_id, {GLOBAL_MODERATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1';
+ user_group_auth('global_moderators', $auth_sql, true);
+ }
+ }
+ else if ($mode == 'first')
+ {
+ // Go through all 2.0.x forums
+ foreach ($forum_access as $forum)
+ {
+ $new_forum_id = (int) $forum['forum_id'];
+
+ // Administrators have full access to all forums whatever happens
+ mass_auth('group_role', $new_forum_id, 'administrators', 'FORUM_FULL');
+
+ $matched_type = '';
+ foreach ($simple_auth_ary as $key => $auth_levels)
+ {
+ $matched = 1;
+ foreach ($auth_levels as $k => $level)
+ {
+ if ($forum[$k] != $auth_levels[$k])
+ {
+ $matched = 0;
+ }
+ }
+
+ if ($matched)
+ {
+ $matched_type = $key;
+ break;
+ }
+ }
+
+ switch ($matched_type)
+ {
+ case 'public':
+ mass_auth('group_role', $new_forum_id, 'guests', 'FORUM_LIMITED');
+ mass_auth('group_role', $new_forum_id, 'registered', 'FORUM_LIMITED_POLLS');
+ mass_auth('group_role', $new_forum_id, 'bots', 'FORUM_BOT');
+ break;
+
+ case 'registered':
+ mass_auth('group_role', $new_forum_id, 'guests', 'FORUM_READONLY');
+ mass_auth('group_role', $new_forum_id, 'bots', 'FORUM_BOT');
+
+ // no break;
+
+ case 'registered_hidden':
+ mass_auth('group_role', $new_forum_id, 'registered', 'FORUM_POLLS');
+ break;
+
+ case 'private':
+ case 'private_hidden':
+ case 'moderator':
+ case 'moderator_hidden':
+ default:
+ // The permissions don't match a simple set, so we're going to have to map them directly
+
+ // No post approval for all, in 2.0.x this feature does not exist
+ mass_auth('group', $new_forum_id, 'guests', 'f_noapprove', ACL_YES);
+ mass_auth('group', $new_forum_id, 'registered', 'f_noapprove', ACL_YES);
+
+ // Go through authentication map
+ foreach ($auth_map as $old_auth_key => $new_acl)
+ {
+ // If old authentication key does not exist we continue
+ // This is helpful for mods adding additional authentication fields, we need to add them to the auth_map array
+ if (!isset($forum[$old_auth_key]))
+ {
+ continue;
+ }
+
+ // Now set the new ACL correctly
+ switch ($forum[$old_auth_key])
+ {
+ // AUTH_ALL
+ case AUTH_ALL:
+ mass_auth('group', $new_forum_id, 'guests', $new_acl, ACL_YES);
+ mass_auth('group', $new_forum_id, 'bots', $new_acl, ACL_YES);
+ mass_auth('group', $new_forum_id, 'registered', $new_acl, ACL_YES);
+ break;
+
+ // AUTH_REG
+ case AUTH_REG:
+ mass_auth('group', $new_forum_id, 'registered', $new_acl, ACL_YES);
+ break;
+
+ // AUTH_ACL
+ case AUTH_ACL:
+ // Go through the old group access list for this forum
+ if (isset($group_access[$forum['forum_id']]))
+ {
+ foreach ($group_access[$forum['forum_id']] as $index => $access)
+ {
+ // We only check for ACL_YES equivalence entry
+ if (isset($access[$old_auth_key]) && $access[$old_auth_key] == 1)
+ {
+ mass_auth('group', $new_forum_id, (int) $access['group_id'], $new_acl, ACL_YES);
+ }
+ }
+ }
+
+ if (isset($user_access[$forum['forum_id']]))
+ {
+ foreach ($user_access[$forum['forum_id']] as $index => $access)
+ {
+ // We only check for ACL_YES equivalence entry
+ if (isset($access[$old_auth_key]) && $access[$old_auth_key] == 1)
+ {
+ mass_auth('user', $new_forum_id, (int) phpbb_user_id($access['user_id']), $new_acl, ACL_YES);
+ }
+ }
+ }
+ break;
+
+ // AUTH_MOD
+ case AUTH_MOD:
+ if (isset($group_access[$forum['forum_id']]))
+ {
+ foreach ($group_access[$forum['forum_id']] as $index => $access)
+ {
+ // We only check for ACL_YES equivalence entry
+ if (isset($access[$old_auth_key]) && $access[$old_auth_key] == 1)
+ {
+ mass_auth('group', $new_forum_id, (int) $access['group_id'], $new_acl, ACL_YES);
+ }
+ }
+ }
+
+ if (isset($user_access[$forum['forum_id']]))
+ {
+ foreach ($user_access[$forum['forum_id']] as $index => $access)
+ {
+ // We only check for ACL_YES equivalence entry
+ if (isset($access[$old_auth_key]) && $access[$old_auth_key] == 1)
+ {
+ mass_auth('user', $new_forum_id, (int) phpbb_user_id($access['user_id']), $new_acl, ACL_YES);
+ }
+ }
+ }
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+ else if ($mode == 'second')
+ {
+ // Assign permission roles and other default permissions
+
+ // guests having u_download and u_search ability
+ $db->sql_query('INSERT INTO ' . ACL_GROUPS_TABLE . ' (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) SELECT ' . get_group_id('guests') . ', 0, auth_option_id, 0, 1 FROM ' . ACL_OPTIONS_TABLE . " WHERE auth_option IN ('u_', 'u_download', 'u_search')");
+
+ // administrators/global mods having full user features
+ mass_auth('group_role', 0, 'administrators', 'USER_FULL');
+ mass_auth('group_role', 0, 'global_moderators', 'USER_FULL');
+
+ // By default all converted administrators are given full access
+ mass_auth('group_role', 0, 'administrators', 'ADMIN_FULL');
+
+ // All registered users are assigned the standard user role
+ mass_auth('group_role', 0, 'registered', 'USER_STANDARD');
+ mass_auth('group_role', 0, 'registered_coppa', 'USER_STANDARD');
+
+ // Instead of administrators being global moderators we give the MOD_FULL role to global mods (admins already assigned to this group)
+ mass_auth('group_role', 0, 'global_moderators', 'MOD_FULL');
+
+ // And now those who have had their avatar rights removed get assigned a more restrictive role
+ $sql = 'SELECT user_id FROM ' . $convert->src_table_prefix . 'users
+ WHERE user_allowavatar = 0
+ AND user_id > 0';
+ $result = $src_db->sql_query($sql);
+
+ while ($row = $src_db->sql_fetchrow($result))
+ {
+ mass_auth('user_role', 0, (int) phpbb_user_id($row['user_id']), 'USER_NOAVATAR');
+ }
+ $src_db->sql_freeresult($result);
+
+ // And the same for those who have had their PM rights removed
+ $sql = 'SELECT user_id FROM ' . $convert->src_table_prefix . 'users
+ WHERE user_allow_pm = 0
+ AND user_id > 0';
+ $result = $src_db->sql_query($sql);
+
+ while ($row = $src_db->sql_fetchrow($result))
+ {
+ mass_auth('user_role', 0, (int) phpbb_user_id($row['user_id']), 'USER_NOPM');
+ }
+ $src_db->sql_freeresult($result);
+ }
+ else if ($mode == 'third')
+ {
+ // And now the moderators
+ // We make sure that they have at least standard access to the forums they moderate in addition to the moderating permissions
+
+ $mod_post_map = array(
+ 'auth_announce' => 'f_announce',
+ 'auth_sticky' => 'f_sticky'
+ );
+
+ foreach ($user_access as $forum_id => $access_map)
+ {
+ $forum_id = (int) $forum_id;
+
+ foreach ($access_map as $access)
+ {
+ if (isset($access['auth_mod']) && $access['auth_mod'] == 1)
+ {
+ mass_auth('user_role', $forum_id, (int) phpbb_user_id($access['user_id']), 'MOD_STANDARD');
+ mass_auth('user_role', $forum_id, (int) phpbb_user_id($access['user_id']), 'FORUM_STANDARD');
+ foreach ($mod_post_map as $old => $new)
+ {
+ if (isset($forum_access[$forum_id]) && isset($forum_access[$forum_id][$old]) && $forum_access[$forum_id][$old] == AUTH_MOD)
+ {
+ mass_auth('user', $forum_id, (int) phpbb_user_id($access['user_id']), $new, ACL_YES);
+ }
+ }
+ }
+ }
+ }
+
+ foreach ($group_access as $forum_id => $access_map)
+ {
+ $forum_id = (int) $forum_id;
+
+ foreach ($access_map as $access)
+ {
+ if (isset($access['auth_mod']) && $access['auth_mod'] == 1)
+ {
+ mass_auth('group_role', $forum_id, (int) $access['group_id'], 'MOD_STANDARD');
+ mass_auth('group_role', $forum_id, (int) $access['group_id'], 'FORUM_STANDARD');
+ foreach ($mod_post_map as $old => $new)
+ {
+ if (isset($forum_access[$forum_id]) && isset($forum_access[$forum_id][$old]) && $forum_access[$forum_id][$old] == AUTH_MOD)
+ {
+ mass_auth('group', $forum_id, (int) $access['group_id'], $new, ACL_YES);
+ }
+ }
+ }
+ }
+ }
+
+ // We grant everyone readonly access to the categories to ensure that the forums are visible
+ $sql = 'SELECT forum_id, forum_name, parent_id, left_id, right_id
+ FROM ' . FORUMS_TABLE . '
+ ORDER BY left_id ASC';
+ $result = $db->sql_query($sql);
+
+ $parent_forums = $forums = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['parent_id'] == 0)
+ {
+ mass_auth('group_role', $row['forum_id'], 'administrators', 'FORUM_FULL');
+ mass_auth('group_role', $row['forum_id'], 'global_moderators', 'FORUM_FULL');
+ $parent_forums[] = $row;
+ }
+ else
+ {
+ $forums[] = $row;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ global $auth;
+
+ // Let us see which groups have access to these forums...
+ foreach ($parent_forums as $row)
+ {
+ // Get the children
+ $branch = $forum_ids = array();
+
+ foreach ($forums as $key => $_row)
+ {
+ if ($_row['left_id'] > $row['left_id'] && $_row['left_id'] < $row['right_id'])
+ {
+ $branch[] = $_row;
+ $forum_ids[] = $_row['forum_id'];
+ continue;
+ }
+ }
+
+ if (sizeof($forum_ids))
+ {
+ // Now make sure the user is able to read these forums
+ $hold_ary = $auth->acl_group_raw_data(false, 'f_list', $forum_ids);
+
+ if (empty($hold_ary))
+ {
+ continue;
+ }
+
+ foreach ($hold_ary as $g_id => $f_id_ary)
+ {
+ $set_group = false;
+
+ foreach ($f_id_ary as $f_id => $auth_ary)
+ {
+ foreach ($auth_ary as $auth_option => $setting)
+ {
+ if ($setting == ACL_YES)
+ {
+ $set_group = true;
+ break 2;
+ }
+ }
+ }
+
+ if ($set_group)
+ {
+ mass_auth('group', $row['forum_id'], $g_id, 'f_list', ACL_YES);
+ }
+ }
+ }
+ }
+ }
+}
+
+/**
+* Set primary group.
+* Really simple and only based on user_level (remaining groups will be assigned later)
+*/
+function phpbb_set_primary_group($user_level)
+{
+ global $convert_row;
+
+ if ($user_level == 1)
+ {
+ return get_group_id('administrators');
+ }
+/* else if ($user_level == 2)
+ {
+ return get_group_id('global_moderators');
+ }
+ else if ($user_level == 0 && $convert_row['user_active'])*/
+ else if ($convert_row['user_active'])
+ {
+ return get_group_id('registered');
+ }
+
+ return 0;
+}
+
+/**
+* Convert the group name, making sure to avoid conflicts with 3.0 special groups
+*/
+function phpbb_convert_group_name($group_name)
+{
+ $default_groups = array(
+ 'GUESTS',
+ 'REGISTERED',
+ 'REGISTERED_COPPA',
+ 'GLOBAL_MODERATORS',
+ 'ADMINISTRATORS',
+ 'BOTS',
+ );
+
+ if (in_array(strtoupper($group_name), $default_groups))
+ {
+ return 'phpBB2 - ' . $group_name;
+ }
+
+ return phpbb_set_default_encoding($group_name);
+}
+
+/**
+* Convert the group type constants
+*/
+function phpbb_convert_group_type($group_type)
+{
+ switch ($group_type)
+ {
+ case 0:
+ return GROUP_OPEN;
+ break;
+
+ case 1:
+ return GROUP_CLOSED;
+ break;
+
+ case 2:
+ return GROUP_HIDDEN;
+ break;
+ }
+
+ // Never return GROUP_SPECIAL here, because only phpBB3's default groups are allowed to have this type set.
+ return GROUP_HIDDEN;
+}
+
+/**
+* Convert the topic type constants
+*/
+function phpbb_convert_topic_type($topic_type)
+{
+ switch ($topic_type)
+ {
+ case 0:
+ return POST_NORMAL;
+ break;
+
+ case 1:
+ return POST_STICKY;
+ break;
+
+ case 2:
+ return POST_ANNOUNCE;
+ break;
+
+ case 3:
+ return POST_GLOBAL;
+ break;
+ }
+
+ return POST_NORMAL;
+}
+
+function phpbb_replace_size($matches)
+{
+ return '[size=' . min(200, ceil(100.0 * (((double) $matches[1])/12.0))) . ':' . $matches[2] . ']';
+}
+
+/**
+* Reparse the message stripping out the bbcode_uid values and adding new ones and setting the bitfield
+* @todo What do we want to do about HTML in messages - currently it gets converted to the entities, but there may be some objections to this
+*/
+function phpbb_prepare_message($message)
+{
+ global $phpbb_root_path, $phpEx, $db, $convert, $user, $config, $cache, $convert_row, $message_parser;
+
+ if (!$message)
+ {
+ $convert->row['mp_bbcode_bitfield'] = $convert_row['mp_bbcode_bitfield'] = 0;
+ return '';
+ }
+
+ // Decode phpBB 2.0.x Message
+ if (isset($convert->row['old_bbcode_uid']) && $convert->row['old_bbcode_uid'] != '')
+ {
+ // Adjust size...
+ if (strpos($message, '[size=') !== false)
+ {
+ $message = preg_replace_callback('/\[size=(\d*):(' . $convert->row['old_bbcode_uid'] . ')\]/', 'phpbb_replace_size', $message);
+ }
+
+ $message = preg_replace('/\:(([a-z0-9]:)?)' . $convert->row['old_bbcode_uid'] . '/s', '', $message);
+ }
+
+ if (strpos($message, '[quote=') !== false)
+ {
+ $message = preg_replace('/\[quote="(.*?)"\]/s', '[quote=&quot;\1&quot;]', $message);
+ $message = preg_replace('/\[quote=\\\"(.*?)\\\"\]/s', '[quote=&quot;\1&quot;]', $message);
+
+ // let's hope that this solves more problems than it causes. Deal with escaped quotes.
+ $message = str_replace('\"', '&quot;', $message);
+ $message = str_replace('\&quot;', '&quot;', $message);
+ }
+
+ // Already the new user id ;)
+ $user_id = $convert->row['poster_id'];
+
+ $message = str_replace('<', '&lt;', $message);
+ $message = str_replace('>', '&gt;', $message);
+ $message = str_replace('<br />', "\n", $message);
+
+ // make the post UTF-8
+ $message = phpbb_set_encoding($message);
+
+ $message_parser->warn_msg = array(); // Reset the errors from the previous message
+ $message_parser->bbcode_uid = make_uid($convert->row['post_time']);
+ $message_parser->message = $message;
+ unset($message);
+
+ // Make sure options are set.
+// $enable_html = (!isset($row['enable_html'])) ? false : $row['enable_html'];
+ $enable_bbcode = (!isset($convert->row['enable_bbcode'])) ? true : $convert->row['enable_bbcode'];
+ $enable_smilies = (!isset($convert->row['enable_smilies'])) ? true : $convert->row['enable_smilies'];
+ $enable_magic_url = (!isset($convert->row['enable_magic_url'])) ? true : $convert->row['enable_magic_url'];
+
+ // parse($allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $update_this_message = true, $mode = 'post')
+ $message_parser->parse($enable_bbcode, $enable_magic_url, $enable_smilies);
+
+ if (sizeof($message_parser->warn_msg))
+ {
+ $msg_id = isset($convert->row['post_id']) ? $convert->row['post_id'] : $convert->row['privmsgs_id'];
+ $convert->p_master->error('<span style="color:red">' . $user->lang['POST_ID'] . ': ' . $msg_id . ' ' . $user->lang['CONV_ERROR_MESSAGE_PARSER'] . ': <br /><br />' . implode('<br />', $message_parser->warn_msg), __LINE__, __FILE__, true);
+ }
+
+ $convert->row['mp_bbcode_bitfield'] = $convert_row['mp_bbcode_bitfield'] = $message_parser->bbcode_bitfield;
+
+ $message = $message_parser->message;
+ unset($message_parser->message);
+
+ return $message;
+}
+
+/**
+* Return the bitfield calculated by the previous function
+*/
+function get_bbcode_bitfield()
+{
+ global $convert_row;
+
+ return $convert_row['mp_bbcode_bitfield'];
+}
+
+/**
+* Determine the last user to edit a post
+* In practice we only tracked edits by the original poster in 2.0.x so this will only be set if they had edited their own post
+*/
+function phpbb_post_edit_user()
+{
+ global $convert_row, $config;
+
+ if (isset($convert_row['post_edit_count']))
+ {
+ return phpbb_user_id($convert_row['poster_id']);
+ }
+
+ return 0;
+}
+
+/**
+* Obtain the path to uploaded files on the 2.0.x forum
+* This is only used if the Attachment MOD was installed
+*/
+function phpbb_get_files_dir()
+{
+ if (!defined('MOD_ATTACHMENT'))
+ {
+ return;
+ }
+
+ global $src_db, $same_db, $convert, $user, $config, $cache;
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+ $sql = 'SELECT config_value AS upload_dir
+ FROM ' . $convert->src_table_prefix . "attachments_config
+ WHERE config_name = 'upload_dir'";
+ $result = $src_db->sql_query($sql);
+ $upload_path = $src_db->sql_fetchfield('upload_dir');
+ $src_db->sql_freeresult($result);
+
+ $sql = 'SELECT config_value AS ftp_upload
+ FROM ' . $convert->src_table_prefix . "attachments_config
+ WHERE config_name = 'allow_ftp_upload'";
+ $result = $src_db->sql_query($sql);
+ $ftp_upload = (int) $src_db->sql_fetchfield('ftp_upload');
+ $src_db->sql_freeresult($result);
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+
+ if ($ftp_upload)
+ {
+ $convert->p_master->error($user->lang['CONV_ERROR_ATTACH_FTP_DIR'], __LINE__, __FILE__);
+ }
+
+ return $upload_path;
+}
+
+/**
+* Copy thumbnails of uploaded images from the 2.0.x forum
+* This is only used if the Attachment MOD was installed
+*/
+function phpbb_copy_thumbnails()
+{
+ global $db, $convert, $user, $config, $cache, $phpbb_root_path;
+
+ $src_path = $convert->options['forum_path'] . '/' . phpbb_get_files_dir() . '/thumbs/';
+
+ if ($handle = @opendir($src_path))
+ {
+ while ($entry = readdir($handle))
+ {
+ if ($entry[0] == '.')
+ {
+ continue;
+ }
+
+ if (is_dir($src_path . $entry))
+ {
+ continue;
+ }
+ else
+ {
+ copy_file($src_path . $entry, $config['upload_path'] . '/' . preg_replace('/^t_/', 'thumb_', $entry));
+ @unlink($phpbb_root_path . $config['upload_path'] . '/thumbs/' . $entry);
+ }
+ }
+ closedir($handle);
+ }
+}
+
+/**
+* Convert the attachment category constants
+* This is only used if the Attachment MOD was installed
+*/
+function phpbb_attachment_category($cat_id)
+{
+ switch ($cat_id)
+ {
+ case 1:
+ return ATTACHMENT_CATEGORY_IMAGE;
+ break;
+
+ case 2:
+ return ATTACHMENT_CATEGORY_WM;
+ break;
+
+ case 3:
+ return ATTACHMENT_CATEGORY_FLASH;
+ break;
+ }
+
+ return ATTACHMENT_CATEGORY_NONE;
+}
+
+/**
+* Obtain list of forums in which different attachment categories can be used
+*/
+function phpbb_attachment_forum_perms($forum_permissions)
+{
+ if (empty($forum_permissions))
+ {
+ return '';
+ }
+
+ // Decode forum permissions
+ $forum_ids = array();
+
+ $one_char_encoding = '#';
+ $two_char_encoding = '.';
+
+ $auth_len = 1;
+ for ($pos = 0; $pos < strlen($forum_permissions); $pos += $auth_len)
+ {
+ $forum_auth = substr($forum_permissions, $pos, 1);
+ if ($forum_auth == $one_char_encoding)
+ {
+ $auth_len = 1;
+ continue;
+ }
+ else if ($forum_auth == $two_char_encoding)
+ {
+ $auth_len = 2;
+ $pos--;
+ continue;
+ }
+
+ $forum_auth = substr($forum_permissions, $pos, $auth_len);
+ $forum_id = base64_unpack($forum_auth);
+
+ $forum_ids[] = (int) $forum_id;
+ }
+
+ if (sizeof($forum_ids))
+ {
+ return attachment_forum_perms($forum_ids);
+ }
+
+ return '';
+}
+
+/**
+* Convert the avatar type constants
+*/
+function phpbb_avatar_type($type)
+{
+ switch ($type)
+ {
+ case 1:
+ return AVATAR_UPLOAD;
+ break;
+
+ case 2:
+ return AVATAR_REMOTE;
+ break;
+
+ case 3:
+ return AVATAR_GALLERY;
+ break;
+ }
+
+ return 0;
+}
+
+
+/**
+* Just undos the replacing of '<' and '>'
+*/
+function phpbb_smilie_html_decode($code)
+{
+ $code = str_replace('&lt;', '<', $code);
+ return str_replace('&gt;', '>', $code);
+}
+
+/**
+* Transfer avatars, copying the image if it was uploaded
+*/
+function phpbb_import_avatar($user_avatar)
+{
+ global $convert_row;
+
+ if (!$convert_row['user_avatar_type'])
+ {
+ return '';
+ }
+ else if ($convert_row['user_avatar_type'] == 1)
+ {
+ // Uploaded avatar
+ return import_avatar($user_avatar, false, $convert_row['user_id']);
+ }
+ else if ($convert_row['user_avatar_type'] == 2)
+ {
+ // Remote avatar
+ return $user_avatar;
+ }
+ else if ($convert_row['user_avatar_type'] == 3)
+ {
+ // Gallery avatar
+ return $user_avatar;
+ }
+
+ return '';
+}
+
+
+/**
+* Find out about the avatar's dimensions
+*/
+function phpbb_get_avatar_height($user_avatar)
+{
+ global $convert_row;
+
+ if (empty($convert_row['user_avatar_type']))
+ {
+ return 0;
+ }
+ return get_avatar_height($user_avatar, 'phpbb_avatar_type', $convert_row['user_avatar_type']);
+}
+
+
+/**
+* Find out about the avatar's dimensions
+*/
+function phpbb_get_avatar_width($user_avatar)
+{
+ global $convert_row;
+
+ if (empty($convert_row['user_avatar_type']))
+ {
+ return 0;
+ }
+
+ return get_avatar_width($user_avatar, 'phpbb_avatar_type', $convert_row['user_avatar_type']);
+}
+
+
+/**
+* Calculate the correct to_address field for private messages
+*/
+function phpbb_privmsgs_to_userid($to_userid)
+{
+ global $config;
+
+ return 'u_' . phpbb_user_id($to_userid);
+}
+
+/**
+* Calculate whether a private message was unread using the bitfield
+*/
+function phpbb_unread_pm($pm_type)
+{
+ return ($pm_type == 5) ? 1 : 0;
+}
+
+/**
+* Calculate whether a private message was new using the bitfield
+*/
+function phpbb_new_pm($pm_type)
+{
+ return ($pm_type == 1) ? 1 : 0;
+}
+
+/**
+* Obtain the folder_id for the custom folder created to replace the savebox from 2.0.x (used to store saved private messages)
+*/
+function phpbb_get_savebox_id($user_id)
+{
+ global $db;
+
+ $user_id = phpbb_user_id($user_id);
+
+ // Only one custom folder, check only one
+ $sql = 'SELECT folder_id
+ FROM ' . PRIVMSGS_FOLDER_TABLE . '
+ WHERE user_id = ' . $user_id;
+ $result = $db->sql_query_limit($sql, 1);
+ $folder_id = (int) $db->sql_fetchfield('folder_id');
+ $db->sql_freeresult($result);
+
+ return $folder_id;
+}
+
+/**
+* Transfer attachment specific configuration options
+* These were not stored in the main config table on 2.0.x
+* This is only used if the Attachment MOD was installed
+*/
+function phpbb_import_attach_config()
+{
+ global $db, $src_db, $same_db, $convert, $config;
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+
+ $sql = 'SELECT *
+ FROM ' . $convert->src_table_prefix . 'attachments_config';
+ $result = $src_db->sql_query($sql);
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+
+ $attach_config = array();
+ while ($row = $src_db->sql_fetchrow($result))
+ {
+ $attach_config[$row['config_name']] = $row['config_value'];
+ }
+ $src_db->sql_freeresult($result);
+
+ set_config('allow_attachments', 1);
+
+ // old attachment mod? Must be very old if this entry do not exist...
+ if (!empty($attach_config['display_order']))
+ {
+ set_config('display_order', $attach_config['display_order']);
+ }
+ set_config('max_filesize', $attach_config['max_filesize']);
+ set_config('max_filesize_pm', $attach_config['max_filesize_pm']);
+ set_config('attachment_quota', $attach_config['attachment_quota']);
+ set_config('max_attachments', $attach_config['max_attachments']);
+ set_config('max_attachments_pm', $attach_config['max_attachments_pm']);
+ set_config('allow_pm_attach', $attach_config['allow_pm_attach']);
+
+ set_config('img_display_inlined', $attach_config['img_display_inlined']);
+ set_config('img_max_width', $attach_config['img_max_width']);
+ set_config('img_max_height', $attach_config['img_max_height']);
+ set_config('img_link_width', $attach_config['img_link_width']);
+ set_config('img_link_height', $attach_config['img_link_height']);
+ set_config('img_create_thumbnail', $attach_config['img_create_thumbnail']);
+ set_config('img_max_thumb_width', 400);
+ set_config('img_min_thumb_filesize', $attach_config['img_min_thumb_filesize']);
+ set_config('img_imagick', $attach_config['img_imagick']);
+}
+
+/**
+* Calculate the date a user became inactive
+*/
+function phpbb_inactive_time()
+{
+ global $convert_row;
+
+ if ($convert_row['user_active'])
+ {
+ return 0;
+ }
+
+ if ($convert_row['user_lastvisit'])
+ {
+ return $convert_row['user_lastvisit'];
+ }
+
+ return $convert_row['user_regdate'];
+}
+
+/**
+* Calculate the reason a user became inactive
+* We can't actually tell the difference between a manual deactivation and one for profile changes
+* from the data available to assume the latter
+*/
+function phpbb_inactive_reason()
+{
+ global $convert_row;
+
+ if ($convert_row['user_active'])
+ {
+ return 0;
+ }
+
+ if ($convert_row['user_lastvisit'])
+ {
+ return INACTIVE_PROFILE;
+ }
+
+ return INACTIVE_REGISTER;
+}
+
+/**
+* Adjust 2.0.x disallowed names to 3.0.x format
+*/
+function phpbb_disallowed_username($username)
+{
+ // Replace * with %
+ $username = phpbb_set_default_encoding(str_replace('*', '%', $username));
+ return utf8_htmlspecialchars($username);
+}
+
+/**
+* Checks whether there are any usernames on the old board that would map to the same
+* username_clean on phpBB3. Prints out a list if any exist and exits.
+*/
+function phpbb_create_userconv_table()
+{
+ global $db, $src_db, $convert, $table_prefix, $user, $lang;
+
+ $map_dbms = '';
+ switch ($db->sql_layer)
+ {
+ case 'mysql':
+ $map_dbms = 'mysql_40';
+ break;
+
+ case 'mysql4':
+ if (version_compare($db->sql_server_info(true), '4.1.3', '>='))
+ {
+ $map_dbms = 'mysql_41';
+ }
+ else
+ {
+ $map_dbms = 'mysql_40';
+ }
+ break;
+
+ case 'mysqli':
+ $map_dbms = 'mysql_41';
+ break;
+
+ case 'mssql':
+ case 'mssql_odbc':
+ $map_dbms = 'mssql';
+ break;
+
+ default:
+ $map_dbms = $db->sql_layer;
+ break;
+ }
+
+ // create a temporary table in which we store the clean usernames
+ $drop_sql = 'DROP TABLE ' . USERCONV_TABLE;
+ switch ($map_dbms)
+ {
+ case 'firebird':
+ $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' (
+ user_id INTEGER NOT NULL,
+ username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT \'\' NOT NULL COLLATE UNICODE
+ )';
+ break;
+
+ case 'mssql':
+ $create_sql = 'CREATE TABLE [' . USERCONV_TABLE . '] (
+ [user_id] [int] NOT NULL ,
+ [username_clean] [varchar] (255) DEFAULT (\'\') NOT NULL
+ )';
+ break;
+
+ case 'mysql_40':
+ $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' (
+ user_id mediumint(8) NOT NULL,
+ username_clean blob NOT NULL
+ )';
+ break;
+
+ case 'mysql_41':
+ $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' (
+ user_id mediumint(8) NOT NULL,
+ username_clean varchar(255) DEFAULT \'\' NOT NULL
+ ) CHARACTER SET `utf8` COLLATE `utf8_bin`';
+ break;
+
+ case 'oracle':
+ $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' (
+ user_id number(8) NOT NULL,
+ username_clean varchar2(255) DEFAULT \'\'
+ )';
+ break;
+
+ case 'postgres':
+ $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' (
+ user_id INT4 DEFAULT \'0\',
+ username_clean varchar_ci DEFAULT \'\' NOT NULL
+ )';
+ break;
+
+ case 'sqlite':
+ $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' (
+ user_id INTEGER NOT NULL DEFAULT \'0\',
+ username_clean varchar(255) NOT NULL DEFAULT \'\'
+ )';
+ break;
+ }
+
+ $db->sql_return_on_error(true);
+ $db->sql_query($drop_sql);
+ $db->sql_return_on_error(false);
+ $db->sql_query($create_sql);
+}
+
+function phpbb_check_username_collisions()
+{
+ global $db, $src_db, $convert, $table_prefix, $user, $lang;
+
+ // now find the clean version of the usernames that collide
+ $sql = 'SELECT username_clean
+ FROM ' . USERCONV_TABLE .'
+ GROUP BY username_clean
+ HAVING COUNT(user_id) > 1';
+ $result = $db->sql_query($sql);
+
+ $colliding_names = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $colliding_names[] = $row['username_clean'];
+ }
+ $db->sql_freeresult($result);
+
+ // there was at least one collision, the admin will have to solve it before conversion can continue
+ if (sizeof($colliding_names))
+ {
+ $sql = 'SELECT user_id, username_clean
+ FROM ' . USERCONV_TABLE . '
+ WHERE ' . $db->sql_in_set('username_clean', $colliding_names);
+ $result = $db->sql_query($sql);
+ unset($colliding_names);
+
+ $colliding_user_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $colliding_user_ids[(int) $row['user_id']] = $row['username_clean'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT username, user_id, user_posts
+ FROM ' . $convert->src_table_prefix . 'users
+ WHERE ' . $src_db->sql_in_set('user_id', array_keys($colliding_user_ids));
+ $result = $src_db->sql_query($sql);
+
+ $colliding_users = array();
+ while ($row = $src_db->sql_fetchrow($result))
+ {
+ $row['user_id'] = (int) $row['user_id'];
+ if (isset($colliding_user_ids[$row['user_id']]))
+ {
+ $colliding_users[$colliding_user_ids[$row['user_id']]][] = $row;
+ }
+ }
+ $src_db->sql_freeresult($result);
+ unset($colliding_user_ids);
+
+ $list = '';
+ foreach ($colliding_users as $username_clean => $users)
+ {
+ $list .= sprintf($user->lang['COLLIDING_CLEAN_USERNAME'], $username_clean) . "<br />\n";
+ foreach ($users as $i => $row)
+ {
+ $list .= sprintf($user->lang['COLLIDING_USER'], $row['user_id'], phpbb_set_default_encoding($row['username']), $row['user_posts']) . "<br />\n";
+ }
+ }
+
+ $lang['INST_ERR_FATAL'] = $user->lang['CONV_ERR_FATAL'];
+ $convert->p_master->error('<span style="color:red">' . $user->lang['COLLIDING_USERNAMES_FOUND'] . '</span></b><br /><br />' . $list . '<b>', __LINE__, __FILE__);
+ }
+
+ $drop_sql = 'DROP TABLE ' . USERCONV_TABLE;
+ $db->sql_query($drop_sql);
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/install/data/confusables.php b/phpBB/install/data/confusables.php
new file mode 100644
index 0000000000..c543ddfc81
--- /dev/null
+++ b/phpBB/install/data/confusables.php
@@ -0,0 +1,650 @@
+<?php
+/**
+*
+* @package install
+* @version $Id$
+* @copyright (c) 2007 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+function utf8_new_case_fold($text, $option = 'full')
+{
+ static $uniarray = array();
+ global $phpbb_root_path, $phpEx;
+
+ // common is always set
+ if (!isset($uniarray['c']))
+ {
+ $uniarray['c'] = include($phpbb_root_path . 'includes/utf/data/case_fold_c.' . $phpEx);
+ }
+
+ // only set full if we need to
+ if ($option === 'full' && !isset($uniarray['f']))
+ {
+ $uniarray['f'] = include($phpbb_root_path . 'includes/utf/data/case_fold_f.' . $phpEx);
+ }
+
+ // only set simple if we need to
+ if ($option !== 'full' && !isset($uniarray['s']))
+ {
+ $uniarray['s'] = include($phpbb_root_path . 'includes/utf/data/case_fold_s.' . $phpEx);
+ }
+
+ // common is always replaced
+ $text = strtr($text, $uniarray['c']);
+
+ if ($option === 'full')
+ {
+ // full replaces a character with multiple characters
+ $text = strtr($text, $uniarray['f']);
+ }
+ else
+ {
+ // simple replaces a character with another character
+ $text = strtr($text, $uniarray['s']);
+ }
+
+ return $text;
+}
+
+function utf8_new_case_fold_nfkc($text, $option = 'full')
+{
+ static $fc_nfkc_closure = array(
+ "\xCD\xBA" => "\x20\xCE\xB9",
+ "\xCF\x92" => "\xCF\x85",
+ "\xCF\x93" => "\xCF\x8D",
+ "\xCF\x94" => "\xCF\x8B",
+ "\xCF\xB2" => "\xCF\x83",
+ "\xCF\xB9" => "\xCF\x83",
+ "\xE1\xB4\xAC" => "\x61",
+ "\xE1\xB4\xAD" => "\xC3\xA6",
+ "\xE1\xB4\xAE" => "\x62",
+ "\xE1\xB4\xB0" => "\x64",
+ "\xE1\xB4\xB1" => "\x65",
+ "\xE1\xB4\xB2" => "\xC7\x9D",
+ "\xE1\xB4\xB3" => "\x67",
+ "\xE1\xB4\xB4" => "\x68",
+ "\xE1\xB4\xB5" => "\x69",
+ "\xE1\xB4\xB6" => "\x6A",
+ "\xE1\xB4\xB7" => "\x6B",
+ "\xE1\xB4\xB8" => "\x6C",
+ "\xE1\xB4\xB9" => "\x6D",
+ "\xE1\xB4\xBA" => "\x6E",
+ "\xE1\xB4\xBC" => "\x6F",
+ "\xE1\xB4\xBD" => "\xC8\xA3",
+ "\xE1\xB4\xBE" => "\x70",
+ "\xE1\xB4\xBF" => "\x72",
+ "\xE1\xB5\x80" => "\x74",
+ "\xE1\xB5\x81" => "\x75",
+ "\xE1\xB5\x82" => "\x77",
+ "\xE2\x82\xA8" => "\x72\x73",
+ "\xE2\x84\x82" => "\x63",
+ "\xE2\x84\x83" => "\xC2\xB0\x63",
+ "\xE2\x84\x87" => "\xC9\x9B",
+ "\xE2\x84\x89" => "\xC2\xB0\x66",
+ "\xE2\x84\x8B" => "\x68",
+ "\xE2\x84\x8C" => "\x68",
+ "\xE2\x84\x8D" => "\x68",
+ "\xE2\x84\x90" => "\x69",
+ "\xE2\x84\x91" => "\x69",
+ "\xE2\x84\x92" => "\x6C",
+ "\xE2\x84\x95" => "\x6E",
+ "\xE2\x84\x96" => "\x6E\x6F",
+ "\xE2\x84\x99" => "\x70",
+ "\xE2\x84\x9A" => "\x71",
+ "\xE2\x84\x9B" => "\x72",
+ "\xE2\x84\x9C" => "\x72",
+ "\xE2\x84\x9D" => "\x72",
+ "\xE2\x84\xA0" => "\x73\x6D",
+ "\xE2\x84\xA1" => "\x74\x65\x6C",
+ "\xE2\x84\xA2" => "\x74\x6D",
+ "\xE2\x84\xA4" => "\x7A",
+ "\xE2\x84\xA8" => "\x7A",
+ "\xE2\x84\xAC" => "\x62",
+ "\xE2\x84\xAD" => "\x63",
+ "\xE2\x84\xB0" => "\x65",
+ "\xE2\x84\xB1" => "\x66",
+ "\xE2\x84\xB3" => "\x6D",
+ "\xE2\x84\xBB" => "\x66\x61\x78",
+ "\xE2\x84\xBE" => "\xCE\xB3",
+ "\xE2\x84\xBF" => "\xCF\x80",
+ "\xE2\x85\x85" => "\x64",
+ "\xE3\x89\x90" => "\x70\x74\x65",
+ "\xE3\x8B\x8C" => "\x68\x67",
+ "\xE3\x8B\x8E" => "\x65\x76",
+ "\xE3\x8B\x8F" => "\x6C\x74\x64",
+ "\xE3\x8D\xB1" => "\x68\x70\x61",
+ "\xE3\x8D\xB3" => "\x61\x75",
+ "\xE3\x8D\xB5" => "\x6F\x76",
+ "\xE3\x8D\xBA" => "\x69\x75",
+ "\xE3\x8E\x80" => "\x70\x61",
+ "\xE3\x8E\x81" => "\x6E\x61",
+ "\xE3\x8E\x82" => "\xCE\xBC\x61",
+ "\xE3\x8E\x83" => "\x6D\x61",
+ "\xE3\x8E\x84" => "\x6B\x61",
+ "\xE3\x8E\x85" => "\x6B\x62",
+ "\xE3\x8E\x86" => "\x6D\x62",
+ "\xE3\x8E\x87" => "\x67\x62",
+ "\xE3\x8E\x8A" => "\x70\x66",
+ "\xE3\x8E\x8B" => "\x6E\x66",
+ "\xE3\x8E\x8C" => "\xCE\xBC\x66",
+ "\xE3\x8E\x90" => "\x68\x7A",
+ "\xE3\x8E\x91" => "\x6B\x68\x7A",
+ "\xE3\x8E\x92" => "\x6D\x68\x7A",
+ "\xE3\x8E\x93" => "\x67\x68\x7A",
+ "\xE3\x8E\x94" => "\x74\x68\x7A",
+ "\xE3\x8E\xA9" => "\x70\x61",
+ "\xE3\x8E\xAA" => "\x6B\x70\x61",
+ "\xE3\x8E\xAB" => "\x6D\x70\x61",
+ "\xE3\x8E\xAC" => "\x67\x70\x61",
+ "\xE3\x8E\xB4" => "\x70\x76",
+ "\xE3\x8E\xB5" => "\x6E\x76",
+ "\xE3\x8E\xB6" => "\xCE\xBC\x76",
+ "\xE3\x8E\xB7" => "\x6D\x76",
+ "\xE3\x8E\xB8" => "\x6B\x76",
+ "\xE3\x8E\xB9" => "\x6D\x76",
+ "\xE3\x8E\xBA" => "\x70\x77",
+ "\xE3\x8E\xBB" => "\x6E\x77",
+ "\xE3\x8E\xBC" => "\xCE\xBC\x77",
+ "\xE3\x8E\xBD" => "\x6D\x77",
+ "\xE3\x8E\xBE" => "\x6B\x77",
+ "\xE3\x8E\xBF" => "\x6D\x77",
+ "\xE3\x8F\x80" => "\x6B\xCF\x89",
+ "\xE3\x8F\x81" => "\x6D\xCF\x89",
+ "\xE3\x8F\x83" => "\x62\x71",
+ "\xE3\x8F\x86" => "\x63\xE2\x88\x95\x6B\x67",
+ "\xE3\x8F\x87" => "\x63\x6F\x2E",
+ "\xE3\x8F\x88" => "\x64\x62",
+ "\xE3\x8F\x89" => "\x67\x79",
+ "\xE3\x8F\x8B" => "\x68\x70",
+ "\xE3\x8F\x8D" => "\x6B\x6B",
+ "\xE3\x8F\x8E" => "\x6B\x6D",
+ "\xE3\x8F\x97" => "\x70\x68",
+ "\xE3\x8F\x99" => "\x70\x70\x6D",
+ "\xE3\x8F\x9A" => "\x70\x72",
+ "\xE3\x8F\x9C" => "\x73\x76",
+ "\xE3\x8F\x9D" => "\x77\x62",
+ "\xE3\x8F\x9E" => "\x76\xE2\x88\x95\x6D",
+ "\xE3\x8F\x9F" => "\x61\xE2\x88\x95\x6D",
+ "\xF0\x9D\x90\x80" => "\x61",
+ "\xF0\x9D\x90\x81" => "\x62",
+ "\xF0\x9D\x90\x82" => "\x63",
+ "\xF0\x9D\x90\x83" => "\x64",
+ "\xF0\x9D\x90\x84" => "\x65",
+ "\xF0\x9D\x90\x85" => "\x66",
+ "\xF0\x9D\x90\x86" => "\x67",
+ "\xF0\x9D\x90\x87" => "\x68",
+ "\xF0\x9D\x90\x88" => "\x69",
+ "\xF0\x9D\x90\x89" => "\x6A",
+ "\xF0\x9D\x90\x8A" => "\x6B",
+ "\xF0\x9D\x90\x8B" => "\x6C",
+ "\xF0\x9D\x90\x8C" => "\x6D",
+ "\xF0\x9D\x90\x8D" => "\x6E",
+ "\xF0\x9D\x90\x8E" => "\x6F",
+ "\xF0\x9D\x90\x8F" => "\x70",
+ "\xF0\x9D\x90\x90" => "\x71",
+ "\xF0\x9D\x90\x91" => "\x72",
+ "\xF0\x9D\x90\x92" => "\x73",
+ "\xF0\x9D\x90\x93" => "\x74",
+ "\xF0\x9D\x90\x94" => "\x75",
+ "\xF0\x9D\x90\x95" => "\x76",
+ "\xF0\x9D\x90\x96" => "\x77",
+ "\xF0\x9D\x90\x97" => "\x78",
+ "\xF0\x9D\x90\x98" => "\x79",
+ "\xF0\x9D\x90\x99" => "\x7A",
+ "\xF0\x9D\x90\xB4" => "\x61",
+ "\xF0\x9D\x90\xB5" => "\x62",
+ "\xF0\x9D\x90\xB6" => "\x63",
+ "\xF0\x9D\x90\xB7" => "\x64",
+ "\xF0\x9D\x90\xB8" => "\x65",
+ "\xF0\x9D\x90\xB9" => "\x66",
+ "\xF0\x9D\x90\xBA" => "\x67",
+ "\xF0\x9D\x90\xBB" => "\x68",
+ "\xF0\x9D\x90\xBC" => "\x69",
+ "\xF0\x9D\x90\xBD" => "\x6A",
+ "\xF0\x9D\x90\xBE" => "\x6B",
+ "\xF0\x9D\x90\xBF" => "\x6C",
+ "\xF0\x9D\x91\x80" => "\x6D",
+ "\xF0\x9D\x91\x81" => "\x6E",
+ "\xF0\x9D\x91\x82" => "\x6F",
+ "\xF0\x9D\x91\x83" => "\x70",
+ "\xF0\x9D\x91\x84" => "\x71",
+ "\xF0\x9D\x91\x85" => "\x72",
+ "\xF0\x9D\x91\x86" => "\x73",
+ "\xF0\x9D\x91\x87" => "\x74",
+ "\xF0\x9D\x91\x88" => "\x75",
+ "\xF0\x9D\x91\x89" => "\x76",
+ "\xF0\x9D\x91\x8A" => "\x77",
+ "\xF0\x9D\x91\x8B" => "\x78",
+ "\xF0\x9D\x91\x8C" => "\x79",
+ "\xF0\x9D\x91\x8D" => "\x7A",
+ "\xF0\x9D\x91\xA8" => "\x61",
+ "\xF0\x9D\x91\xA9" => "\x62",
+ "\xF0\x9D\x91\xAA" => "\x63",
+ "\xF0\x9D\x91\xAB" => "\x64",
+ "\xF0\x9D\x91\xAC" => "\x65",
+ "\xF0\x9D\x91\xAD" => "\x66",
+ "\xF0\x9D\x91\xAE" => "\x67",
+ "\xF0\x9D\x91\xAF" => "\x68",
+ "\xF0\x9D\x91\xB0" => "\x69",
+ "\xF0\x9D\x91\xB1" => "\x6A",
+ "\xF0\x9D\x91\xB2" => "\x6B",
+ "\xF0\x9D\x91\xB3" => "\x6C",
+ "\xF0\x9D\x91\xB4" => "\x6D",
+ "\xF0\x9D\x91\xB5" => "\x6E",
+ "\xF0\x9D\x91\xB6" => "\x6F",
+ "\xF0\x9D\x91\xB7" => "\x70",
+ "\xF0\x9D\x91\xB8" => "\x71",
+ "\xF0\x9D\x91\xB9" => "\x72",
+ "\xF0\x9D\x91\xBA" => "\x73",
+ "\xF0\x9D\x91\xBB" => "\x74",
+ "\xF0\x9D\x91\xBC" => "\x75",
+ "\xF0\x9D\x91\xBD" => "\x76",
+ "\xF0\x9D\x91\xBE" => "\x77",
+ "\xF0\x9D\x91\xBF" => "\x78",
+ "\xF0\x9D\x92\x80" => "\x79",
+ "\xF0\x9D\x92\x81" => "\x7A",
+ "\xF0\x9D\x92\x9C" => "\x61",
+ "\xF0\x9D\x92\x9E" => "\x63",
+ "\xF0\x9D\x92\x9F" => "\x64",
+ "\xF0\x9D\x92\xA2" => "\x67",
+ "\xF0\x9D\x92\xA5" => "\x6A",
+ "\xF0\x9D\x92\xA6" => "\x6B",
+ "\xF0\x9D\x92\xA9" => "\x6E",
+ "\xF0\x9D\x92\xAA" => "\x6F",
+ "\xF0\x9D\x92\xAB" => "\x70",
+ "\xF0\x9D\x92\xAC" => "\x71",
+ "\xF0\x9D\x92\xAE" => "\x73",
+ "\xF0\x9D\x92\xAF" => "\x74",
+ "\xF0\x9D\x92\xB0" => "\x75",
+ "\xF0\x9D\x92\xB1" => "\x76",
+ "\xF0\x9D\x92\xB2" => "\x77",
+ "\xF0\x9D\x92\xB3" => "\x78",
+ "\xF0\x9D\x92\xB4" => "\x79",
+ "\xF0\x9D\x92\xB5" => "\x7A",
+ "\xF0\x9D\x93\x90" => "\x61",
+ "\xF0\x9D\x93\x91" => "\x62",
+ "\xF0\x9D\x93\x92" => "\x63",
+ "\xF0\x9D\x93\x93" => "\x64",
+ "\xF0\x9D\x93\x94" => "\x65",
+ "\xF0\x9D\x93\x95" => "\x66",
+ "\xF0\x9D\x93\x96" => "\x67",
+ "\xF0\x9D\x93\x97" => "\x68",
+ "\xF0\x9D\x93\x98" => "\x69",
+ "\xF0\x9D\x93\x99" => "\x6A",
+ "\xF0\x9D\x93\x9A" => "\x6B",
+ "\xF0\x9D\x93\x9B" => "\x6C",
+ "\xF0\x9D\x93\x9C" => "\x6D",
+ "\xF0\x9D\x93\x9D" => "\x6E",
+ "\xF0\x9D\x93\x9E" => "\x6F",
+ "\xF0\x9D\x93\x9F" => "\x70",
+ "\xF0\x9D\x93\xA0" => "\x71",
+ "\xF0\x9D\x93\xA1" => "\x72",
+ "\xF0\x9D\x93\xA2" => "\x73",
+ "\xF0\x9D\x93\xA3" => "\x74",
+ "\xF0\x9D\x93\xA4" => "\x75",
+ "\xF0\x9D\x93\xA5" => "\x76",
+ "\xF0\x9D\x93\xA6" => "\x77",
+ "\xF0\x9D\x93\xA7" => "\x78",
+ "\xF0\x9D\x93\xA8" => "\x79",
+ "\xF0\x9D\x93\xA9" => "\x7A",
+ "\xF0\x9D\x94\x84" => "\x61",
+ "\xF0\x9D\x94\x85" => "\x62",
+ "\xF0\x9D\x94\x87" => "\x64",
+ "\xF0\x9D\x94\x88" => "\x65",
+ "\xF0\x9D\x94\x89" => "\x66",
+ "\xF0\x9D\x94\x8A" => "\x67",
+ "\xF0\x9D\x94\x8D" => "\x6A",
+ "\xF0\x9D\x94\x8E" => "\x6B",
+ "\xF0\x9D\x94\x8F" => "\x6C",
+ "\xF0\x9D\x94\x90" => "\x6D",
+ "\xF0\x9D\x94\x91" => "\x6E",
+ "\xF0\x9D\x94\x92" => "\x6F",
+ "\xF0\x9D\x94\x93" => "\x70",
+ "\xF0\x9D\x94\x94" => "\x71",
+ "\xF0\x9D\x94\x96" => "\x73",
+ "\xF0\x9D\x94\x97" => "\x74",
+ "\xF0\x9D\x94\x98" => "\x75",
+ "\xF0\x9D\x94\x99" => "\x76",
+ "\xF0\x9D\x94\x9A" => "\x77",
+ "\xF0\x9D\x94\x9B" => "\x78",
+ "\xF0\x9D\x94\x9C" => "\x79",
+ "\xF0\x9D\x94\xB8" => "\x61",
+ "\xF0\x9D\x94\xB9" => "\x62",
+ "\xF0\x9D\x94\xBB" => "\x64",
+ "\xF0\x9D\x94\xBC" => "\x65",
+ "\xF0\x9D\x94\xBD" => "\x66",
+ "\xF0\x9D\x94\xBE" => "\x67",
+ "\xF0\x9D\x95\x80" => "\x69",
+ "\xF0\x9D\x95\x81" => "\x6A",
+ "\xF0\x9D\x95\x82" => "\x6B",
+ "\xF0\x9D\x95\x83" => "\x6C",
+ "\xF0\x9D\x95\x84" => "\x6D",
+ "\xF0\x9D\x95\x86" => "\x6F",
+ "\xF0\x9D\x95\x8A" => "\x73",
+ "\xF0\x9D\x95\x8B" => "\x74",
+ "\xF0\x9D\x95\x8C" => "\x75",
+ "\xF0\x9D\x95\x8D" => "\x76",
+ "\xF0\x9D\x95\x8E" => "\x77",
+ "\xF0\x9D\x95\x8F" => "\x78",
+ "\xF0\x9D\x95\x90" => "\x79",
+ "\xF0\x9D\x95\xAC" => "\x61",
+ "\xF0\x9D\x95\xAD" => "\x62",
+ "\xF0\x9D\x95\xAE" => "\x63",
+ "\xF0\x9D\x95\xAF" => "\x64",
+ "\xF0\x9D\x95\xB0" => "\x65",
+ "\xF0\x9D\x95\xB1" => "\x66",
+ "\xF0\x9D\x95\xB2" => "\x67",
+ "\xF0\x9D\x95\xB3" => "\x68",
+ "\xF0\x9D\x95\xB4" => "\x69",
+ "\xF0\x9D\x95\xB5" => "\x6A",
+ "\xF0\x9D\x95\xB6" => "\x6B",
+ "\xF0\x9D\x95\xB7" => "\x6C",
+ "\xF0\x9D\x95\xB8" => "\x6D",
+ "\xF0\x9D\x95\xB9" => "\x6E",
+ "\xF0\x9D\x95\xBA" => "\x6F",
+ "\xF0\x9D\x95\xBB" => "\x70",
+ "\xF0\x9D\x95\xBC" => "\x71",
+ "\xF0\x9D\x95\xBD" => "\x72",
+ "\xF0\x9D\x95\xBE" => "\x73",
+ "\xF0\x9D\x95\xBF" => "\x74",
+ "\xF0\x9D\x96\x80" => "\x75",
+ "\xF0\x9D\x96\x81" => "\x76",
+ "\xF0\x9D\x96\x82" => "\x77",
+ "\xF0\x9D\x96\x83" => "\x78",
+ "\xF0\x9D\x96\x84" => "\x79",
+ "\xF0\x9D\x96\x85" => "\x7A",
+ "\xF0\x9D\x96\xA0" => "\x61",
+ "\xF0\x9D\x96\xA1" => "\x62",
+ "\xF0\x9D\x96\xA2" => "\x63",
+ "\xF0\x9D\x96\xA3" => "\x64",
+ "\xF0\x9D\x96\xA4" => "\x65",
+ "\xF0\x9D\x96\xA5" => "\x66",
+ "\xF0\x9D\x96\xA6" => "\x67",
+ "\xF0\x9D\x96\xA7" => "\x68",
+ "\xF0\x9D\x96\xA8" => "\x69",
+ "\xF0\x9D\x96\xA9" => "\x6A",
+ "\xF0\x9D\x96\xAA" => "\x6B",
+ "\xF0\x9D\x96\xAB" => "\x6C",
+ "\xF0\x9D\x96\xAC" => "\x6D",
+ "\xF0\x9D\x96\xAD" => "\x6E",
+ "\xF0\x9D\x96\xAE" => "\x6F",
+ "\xF0\x9D\x96\xAF" => "\x70",
+ "\xF0\x9D\x96\xB0" => "\x71",
+ "\xF0\x9D\x96\xB1" => "\x72",
+ "\xF0\x9D\x96\xB2" => "\x73",
+ "\xF0\x9D\x96\xB3" => "\x74",
+ "\xF0\x9D\x96\xB4" => "\x75",
+ "\xF0\x9D\x96\xB5" => "\x76",
+ "\xF0\x9D\x96\xB6" => "\x77",
+ "\xF0\x9D\x96\xB7" => "\x78",
+ "\xF0\x9D\x96\xB8" => "\x79",
+ "\xF0\x9D\x96\xB9" => "\x7A",
+ "\xF0\x9D\x97\x94" => "\x61",
+ "\xF0\x9D\x97\x95" => "\x62",
+ "\xF0\x9D\x97\x96" => "\x63",
+ "\xF0\x9D\x97\x97" => "\x64",
+ "\xF0\x9D\x97\x98" => "\x65",
+ "\xF0\x9D\x97\x99" => "\x66",
+ "\xF0\x9D\x97\x9A" => "\x67",
+ "\xF0\x9D\x97\x9B" => "\x68",
+ "\xF0\x9D\x97\x9C" => "\x69",
+ "\xF0\x9D\x97\x9D" => "\x6A",
+ "\xF0\x9D\x97\x9E" => "\x6B",
+ "\xF0\x9D\x97\x9F" => "\x6C",
+ "\xF0\x9D\x97\xA0" => "\x6D",
+ "\xF0\x9D\x97\xA1" => "\x6E",
+ "\xF0\x9D\x97\xA2" => "\x6F",
+ "\xF0\x9D\x97\xA3" => "\x70",
+ "\xF0\x9D\x97\xA4" => "\x71",
+ "\xF0\x9D\x97\xA5" => "\x72",
+ "\xF0\x9D\x97\xA6" => "\x73",
+ "\xF0\x9D\x97\xA7" => "\x74",
+ "\xF0\x9D\x97\xA8" => "\x75",
+ "\xF0\x9D\x97\xA9" => "\x76",
+ "\xF0\x9D\x97\xAA" => "\x77",
+ "\xF0\x9D\x97\xAB" => "\x78",
+ "\xF0\x9D\x97\xAC" => "\x79",
+ "\xF0\x9D\x97\xAD" => "\x7A",
+ "\xF0\x9D\x98\x88" => "\x61",
+ "\xF0\x9D\x98\x89" => "\x62",
+ "\xF0\x9D\x98\x8A" => "\x63",
+ "\xF0\x9D\x98\x8B" => "\x64",
+ "\xF0\x9D\x98\x8C" => "\x65",
+ "\xF0\x9D\x98\x8D" => "\x66",
+ "\xF0\x9D\x98\x8E" => "\x67",
+ "\xF0\x9D\x98\x8F" => "\x68",
+ "\xF0\x9D\x98\x90" => "\x69",
+ "\xF0\x9D\x98\x91" => "\x6A",
+ "\xF0\x9D\x98\x92" => "\x6B",
+ "\xF0\x9D\x98\x93" => "\x6C",
+ "\xF0\x9D\x98\x94" => "\x6D",
+ "\xF0\x9D\x98\x95" => "\x6E",
+ "\xF0\x9D\x98\x96" => "\x6F",
+ "\xF0\x9D\x98\x97" => "\x70",
+ "\xF0\x9D\x98\x98" => "\x71",
+ "\xF0\x9D\x98\x99" => "\x72",
+ "\xF0\x9D\x98\x9A" => "\x73",
+ "\xF0\x9D\x98\x9B" => "\x74",
+ "\xF0\x9D\x98\x9C" => "\x75",
+ "\xF0\x9D\x98\x9D" => "\x76",
+ "\xF0\x9D\x98\x9E" => "\x77",
+ "\xF0\x9D\x98\x9F" => "\x78",
+ "\xF0\x9D\x98\xA0" => "\x79",
+ "\xF0\x9D\x98\xA1" => "\x7A",
+ "\xF0\x9D\x98\xBC" => "\x61",
+ "\xF0\x9D\x98\xBD" => "\x62",
+ "\xF0\x9D\x98\xBE" => "\x63",
+ "\xF0\x9D\x98\xBF" => "\x64",
+ "\xF0\x9D\x99\x80" => "\x65",
+ "\xF0\x9D\x99\x81" => "\x66",
+ "\xF0\x9D\x99\x82" => "\x67",
+ "\xF0\x9D\x99\x83" => "\x68",
+ "\xF0\x9D\x99\x84" => "\x69",
+ "\xF0\x9D\x99\x85" => "\x6A",
+ "\xF0\x9D\x99\x86" => "\x6B",
+ "\xF0\x9D\x99\x87" => "\x6C",
+ "\xF0\x9D\x99\x88" => "\x6D",
+ "\xF0\x9D\x99\x89" => "\x6E",
+ "\xF0\x9D\x99\x8A" => "\x6F",
+ "\xF0\x9D\x99\x8B" => "\x70",
+ "\xF0\x9D\x99\x8C" => "\x71",
+ "\xF0\x9D\x99\x8D" => "\x72",
+ "\xF0\x9D\x99\x8E" => "\x73",
+ "\xF0\x9D\x99\x8F" => "\x74",
+ "\xF0\x9D\x99\x90" => "\x75",
+ "\xF0\x9D\x99\x91" => "\x76",
+ "\xF0\x9D\x99\x92" => "\x77",
+ "\xF0\x9D\x99\x93" => "\x78",
+ "\xF0\x9D\x99\x94" => "\x79",
+ "\xF0\x9D\x99\x95" => "\x7A",
+ "\xF0\x9D\x99\xB0" => "\x61",
+ "\xF0\x9D\x99\xB1" => "\x62",
+ "\xF0\x9D\x99\xB2" => "\x63",
+ "\xF0\x9D\x99\xB3" => "\x64",
+ "\xF0\x9D\x99\xB4" => "\x65",
+ "\xF0\x9D\x99\xB5" => "\x66",
+ "\xF0\x9D\x99\xB6" => "\x67",
+ "\xF0\x9D\x99\xB7" => "\x68",
+ "\xF0\x9D\x99\xB8" => "\x69",
+ "\xF0\x9D\x99\xB9" => "\x6A",
+ "\xF0\x9D\x99\xBA" => "\x6B",
+ "\xF0\x9D\x99\xBB" => "\x6C",
+ "\xF0\x9D\x99\xBC" => "\x6D",
+ "\xF0\x9D\x99\xBD" => "\x6E",
+ "\xF0\x9D\x99\xBE" => "\x6F",
+ "\xF0\x9D\x99\xBF" => "\x70",
+ "\xF0\x9D\x9A\x80" => "\x71",
+ "\xF0\x9D\x9A\x81" => "\x72",
+ "\xF0\x9D\x9A\x82" => "\x73",
+ "\xF0\x9D\x9A\x83" => "\x74",
+ "\xF0\x9D\x9A\x84" => "\x75",
+ "\xF0\x9D\x9A\x85" => "\x76",
+ "\xF0\x9D\x9A\x86" => "\x77",
+ "\xF0\x9D\x9A\x87" => "\x78",
+ "\xF0\x9D\x9A\x88" => "\x79",
+ "\xF0\x9D\x9A\x89" => "\x7A",
+ "\xF0\x9D\x9A\xA8" => "\xCE\xB1",
+ "\xF0\x9D\x9A\xA9" => "\xCE\xB2",
+ "\xF0\x9D\x9A\xAA" => "\xCE\xB3",
+ "\xF0\x9D\x9A\xAB" => "\xCE\xB4",
+ "\xF0\x9D\x9A\xAC" => "\xCE\xB5",
+ "\xF0\x9D\x9A\xAD" => "\xCE\xB6",
+ "\xF0\x9D\x9A\xAE" => "\xCE\xB7",
+ "\xF0\x9D\x9A\xAF" => "\xCE\xB8",
+ "\xF0\x9D\x9A\xB0" => "\xCE\xB9",
+ "\xF0\x9D\x9A\xB1" => "\xCE\xBA",
+ "\xF0\x9D\x9A\xB2" => "\xCE\xBB",
+ "\xF0\x9D\x9A\xB3" => "\xCE\xBC",
+ "\xF0\x9D\x9A\xB4" => "\xCE\xBD",
+ "\xF0\x9D\x9A\xB5" => "\xCE\xBE",
+ "\xF0\x9D\x9A\xB6" => "\xCE\xBF",
+ "\xF0\x9D\x9A\xB7" => "\xCF\x80",
+ "\xF0\x9D\x9A\xB8" => "\xCF\x81",
+ "\xF0\x9D\x9A\xB9" => "\xCE\xB8",
+ "\xF0\x9D\x9A\xBA" => "\xCF\x83",
+ "\xF0\x9D\x9A\xBB" => "\xCF\x84",
+ "\xF0\x9D\x9A\xBC" => "\xCF\x85",
+ "\xF0\x9D\x9A\xBD" => "\xCF\x86",
+ "\xF0\x9D\x9A\xBE" => "\xCF\x87",
+ "\xF0\x9D\x9A\xBF" => "\xCF\x88",
+ "\xF0\x9D\x9B\x80" => "\xCF\x89",
+ "\xF0\x9D\x9B\x93" => "\xCF\x83",
+ "\xF0\x9D\x9B\xA2" => "\xCE\xB1",
+ "\xF0\x9D\x9B\xA3" => "\xCE\xB2",
+ "\xF0\x9D\x9B\xA4" => "\xCE\xB3",
+ "\xF0\x9D\x9B\xA5" => "\xCE\xB4",
+ "\xF0\x9D\x9B\xA6" => "\xCE\xB5",
+ "\xF0\x9D\x9B\xA7" => "\xCE\xB6",
+ "\xF0\x9D\x9B\xA8" => "\xCE\xB7",
+ "\xF0\x9D\x9B\xA9" => "\xCE\xB8",
+ "\xF0\x9D\x9B\xAA" => "\xCE\xB9",
+ "\xF0\x9D\x9B\xAB" => "\xCE\xBA",
+ "\xF0\x9D\x9B\xAC" => "\xCE\xBB",
+ "\xF0\x9D\x9B\xAD" => "\xCE\xBC",
+ "\xF0\x9D\x9B\xAE" => "\xCE\xBD",
+ "\xF0\x9D\x9B\xAF" => "\xCE\xBE",
+ "\xF0\x9D\x9B\xB0" => "\xCE\xBF",
+ "\xF0\x9D\x9B\xB1" => "\xCF\x80",
+ "\xF0\x9D\x9B\xB2" => "\xCF\x81",
+ "\xF0\x9D\x9B\xB3" => "\xCE\xB8",
+ "\xF0\x9D\x9B\xB4" => "\xCF\x83",
+ "\xF0\x9D\x9B\xB5" => "\xCF\x84",
+ "\xF0\x9D\x9B\xB6" => "\xCF\x85",
+ "\xF0\x9D\x9B\xB7" => "\xCF\x86",
+ "\xF0\x9D\x9B\xB8" => "\xCF\x87",
+ "\xF0\x9D\x9B\xB9" => "\xCF\x88",
+ "\xF0\x9D\x9B\xBA" => "\xCF\x89",
+ "\xF0\x9D\x9C\x8D" => "\xCF\x83",
+ "\xF0\x9D\x9C\x9C" => "\xCE\xB1",
+ "\xF0\x9D\x9C\x9D" => "\xCE\xB2",
+ "\xF0\x9D\x9C\x9E" => "\xCE\xB3",
+ "\xF0\x9D\x9C\x9F" => "\xCE\xB4",
+ "\xF0\x9D\x9C\xA0" => "\xCE\xB5",
+ "\xF0\x9D\x9C\xA1" => "\xCE\xB6",
+ "\xF0\x9D\x9C\xA2" => "\xCE\xB7",
+ "\xF0\x9D\x9C\xA3" => "\xCE\xB8",
+ "\xF0\x9D\x9C\xA4" => "\xCE\xB9",
+ "\xF0\x9D\x9C\xA5" => "\xCE\xBA",
+ "\xF0\x9D\x9C\xA6" => "\xCE\xBB",
+ "\xF0\x9D\x9C\xA7" => "\xCE\xBC",
+ "\xF0\x9D\x9C\xA8" => "\xCE\xBD",
+ "\xF0\x9D\x9C\xA9" => "\xCE\xBE",
+ "\xF0\x9D\x9C\xAA" => "\xCE\xBF",
+ "\xF0\x9D\x9C\xAB" => "\xCF\x80",
+ "\xF0\x9D\x9C\xAC" => "\xCF\x81",
+ "\xF0\x9D\x9C\xAD" => "\xCE\xB8",
+ "\xF0\x9D\x9C\xAE" => "\xCF\x83",
+ "\xF0\x9D\x9C\xAF" => "\xCF\x84",
+ "\xF0\x9D\x9C\xB0" => "\xCF\x85",
+ "\xF0\x9D\x9C\xB1" => "\xCF\x86",
+ "\xF0\x9D\x9C\xB2" => "\xCF\x87",
+ "\xF0\x9D\x9C\xB3" => "\xCF\x88",
+ "\xF0\x9D\x9C\xB4" => "\xCF\x89",
+ "\xF0\x9D\x9D\x87" => "\xCF\x83",
+ "\xF0\x9D\x9D\x96" => "\xCE\xB1",
+ "\xF0\x9D\x9D\x97" => "\xCE\xB2",
+ "\xF0\x9D\x9D\x98" => "\xCE\xB3",
+ "\xF0\x9D\x9D\x99" => "\xCE\xB4",
+ "\xF0\x9D\x9D\x9A" => "\xCE\xB5",
+ "\xF0\x9D\x9D\x9B" => "\xCE\xB6",
+ "\xF0\x9D\x9D\x9C" => "\xCE\xB7",
+ "\xF0\x9D\x9D\x9D" => "\xCE\xB8",
+ "\xF0\x9D\x9D\x9E" => "\xCE\xB9",
+ "\xF0\x9D\x9D\x9F" => "\xCE\xBA",
+ "\xF0\x9D\x9D\xA0" => "\xCE\xBB",
+ "\xF0\x9D\x9D\xA1" => "\xCE\xBC",
+ "\xF0\x9D\x9D\xA2" => "\xCE\xBD",
+ "\xF0\x9D\x9D\xA3" => "\xCE\xBE",
+ "\xF0\x9D\x9D\xA4" => "\xCE\xBF",
+ "\xF0\x9D\x9D\xA5" => "\xCF\x80",
+ "\xF0\x9D\x9D\xA6" => "\xCF\x81",
+ "\xF0\x9D\x9D\xA7" => "\xCE\xB8",
+ "\xF0\x9D\x9D\xA8" => "\xCF\x83",
+ "\xF0\x9D\x9D\xA9" => "\xCF\x84",
+ "\xF0\x9D\x9D\xAA" => "\xCF\x85",
+ "\xF0\x9D\x9D\xAB" => "\xCF\x86",
+ "\xF0\x9D\x9D\xAC" => "\xCF\x87",
+ "\xF0\x9D\x9D\xAD" => "\xCF\x88",
+ "\xF0\x9D\x9D\xAE" => "\xCF\x89",
+ "\xF0\x9D\x9E\x81" => "\xCF\x83",
+ "\xF0\x9D\x9E\x90" => "\xCE\xB1",
+ "\xF0\x9D\x9E\x91" => "\xCE\xB2",
+ "\xF0\x9D\x9E\x92" => "\xCE\xB3",
+ "\xF0\x9D\x9E\x93" => "\xCE\xB4",
+ "\xF0\x9D\x9E\x94" => "\xCE\xB5",
+ "\xF0\x9D\x9E\x95" => "\xCE\xB6",
+ "\xF0\x9D\x9E\x96" => "\xCE\xB7",
+ "\xF0\x9D\x9E\x97" => "\xCE\xB8",
+ "\xF0\x9D\x9E\x98" => "\xCE\xB9",
+ "\xF0\x9D\x9E\x99" => "\xCE\xBA",
+ "\xF0\x9D\x9E\x9A" => "\xCE\xBB",
+ "\xF0\x9D\x9E\x9B" => "\xCE\xBC",
+ "\xF0\x9D\x9E\x9C" => "\xCE\xBD",
+ "\xF0\x9D\x9E\x9D" => "\xCE\xBE",
+ "\xF0\x9D\x9E\x9E" => "\xCE\xBF",
+ "\xF0\x9D\x9E\x9F" => "\xCF\x80",
+ "\xF0\x9D\x9E\xA0" => "\xCF\x81",
+ "\xF0\x9D\x9E\xA1" => "\xCE\xB8",
+ "\xF0\x9D\x9E\xA2" => "\xCF\x83",
+ "\xF0\x9D\x9E\xA3" => "\xCF\x84",
+ "\xF0\x9D\x9E\xA4" => "\xCF\x85",
+ "\xF0\x9D\x9E\xA5" => "\xCF\x86",
+ "\xF0\x9D\x9E\xA6" => "\xCF\x87",
+ "\xF0\x9D\x9E\xA7" => "\xCF\x88",
+ "\xF0\x9D\x9E\xA8" => "\xCF\x89",
+ "\xF0\x9D\x9E\xBB" => "\xCF\x83",
+ "\xF0\x9D\x9F\x8A" => "\xCF\x9D",
+ );
+ global $phpbb_root_path, $phpEx;
+
+ // do the case fold
+ $text = utf8_new_case_fold($text, $option);
+
+ if (!class_exists('utf_normalizer'))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
+ }
+
+ // convert to NFKC
+ utf_new_normalizer::nfkc($text);
+
+ // FC_NFKC_Closure, http://www.unicode.org/Public/5.0.0/ucd/DerivedNormalizationProps.txt
+ $text = strtr($text, $fc_nfkc_closure);
+
+ return $text;
+}
+
+return array('¡'=>'i','ǃ'=>'!','α'=>'a',' '=>' ','­'=>'','Û'=>'','Ü'=>'','á †'=>'','á Ž'=>'','​'=>'','‌'=>'','â€'=>'','
'=>'','
'=>'','â '=>'','â¡'=>'','â¢'=>'','â£'=>'','âª'=>'','â«'=>'','â¬'=>'','â­'=>'','â®'=>'','â¯'=>'',''=>'',''=>'',''=>'','ï¿»'=>'',''=>'','ð…³'=>'','ð…´'=>'','ð…µ'=>'','ð…¶'=>'','ð…·'=>'','ð…¸'=>'','ð…¹'=>'','ð…º'=>'','Û¬'=>'ÛŸ','̓'=>'Ì“','Ù'=>'Ì“','Öœ'=>'Ì','Í'=>'Ì','݇'=>'Ì','॔'=>'Ì','Í€'=>'Ì€','॓'=>'Ì€','ÌŒ'=>'̆','Ì‘'=>'Ì‚','Ö¯'=>'ÌŠ','ஂ'=>'ÌŠ','à¹'=>'ÌŠ','à»'=>'ÌŠ','ံ'=>'ÌŠ','ំ'=>'ÌŠ','៓'=>'ÌŠ','ã‚š'=>'ÌŠ','゚'=>'ÌŠ','ͦ'=>'ÌŠ','Í‚'=>'̃','ׄ'=>'̇','Ö¹'=>'̇','ׂ'=>'̇','×'=>'̇','Ý'=>'̇','ं'=>'̇','ਂ'=>'̇','ં'=>'̇','à¯'=>'̇','Ì…'=>'Ì„','〬'=>'̉','̱'=>'Ì ','॒'=>'Ì ','̧'=>'Ì¡','̦'=>'Ì¡','̨'=>'Ì¢','़'=>'Ì£','়'=>'Ì£','਼'=>'Ì£','઼'=>'Ì£','଼'=>'Ì£','͇'=>'̳','̶'=>'̵','ﱞ'=>'ï¹²Ù‘','ﱟ'=>'ï¹´Ù‘','ï³²'=>'ï¹·Ù‘','ï± '=>'ﹶّ','ï³³'=>'ï¹¹Ù‘','ﱡ'=>'ﹸّ','ï³´'=>'ï¹»Ù‘','ï±¢'=>'ﹺّ','ï±£'=>'ï¹¼Ù°','Ù´'=>'Ù”','Ý‚'=>'ܼ','౦'=>'o','೦'=>'o','゙'=>'ã‚™',' '=>' ',' '=>' ','â€'=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ','âŸ'=>' ',' '=>' ',' '=>' ',' '=>' ','`'=>'`','ï½€'=>'`','á¿€'=>'Ëœ','ï¼¾'=>'^','︿'=>'^','_'=>'_','ï¹'=>'_','﹎'=>'_','ï¹'=>'_','⌇'=>'︴','ï¼'=>'-','â€'=>'-','‑'=>'-','‒'=>'-','–'=>'-','﹘'=>'-','∼'=>'â“','ï½¥'=>'・','•'=>'・',','=>',','‚'=>',','Ù¬'=>'ØŒ','、'=>'ã€',';'=>';','ï¼›'=>';',':'=>':','Ö‰'=>':','︰'=>':','׃'=>':','â©´'=>'::=','.'=>'.','․'=>'.','Ü‚'=>'.','‥'=>'..','…'=>'...','。'=>'。','·'=>'·','‧'=>'·','∙'=>'·','â‹…'=>'·','á§'=>'·','ᔯ'=>'·4','áŒ'=>'·á','áŽ'=>'·áƒ','á'=>'·á„','á’'=>'·á…','á”'=>'·á†','á—'=>'·áŠ','á™'=>'·á‹','á·'=>'·á³','á‘€'=>'·á³','á‘‚'=>'·á´','á‘„'=>'·á¸','ᑆ'=>'·á¹','á‘—'=>'·ᑌ','á‘™'=>'·ᑎ','á‘›'=>'·á‘','á‘”'=>'·á‘','á‘'=>'·á‘','á‘Ÿ'=>'·ᑑ','á‘¡'=>'·ᑕ','á‘£'=>'·ᑖ','á‘´'=>'·ᑫ','ᑸ'=>'·ᑮ','ᑼ'=>'·ᑰ','ᑾ'=>'·ᑲ','á’€'=>'·ᑳ','á’’'=>'·ᒉ','á’”'=>'·ᒋ','á’–'=>'·ᒌ','á’š'=>'·ᒎ','á’œ'=>'·á’','á’ž'=>'·ᒑ','á’¬'=>'·ᒣ','á’®'=>'·ᒥ','á’°'=>'·ᒦ','á’²'=>'·ᒧ','á’´'=>'·ᒨ','á’¶'=>'·L','á’¸'=>'·ᒫ','ᓉ'=>'·ᓀ','á“‹'=>'·ᓇ','á“'=>'·ᓈ','á“œ'=>'·ᓓ','á“ž'=>'·ᓕ','á“ '=>'·ᓖ','á“¢'=>'·ᓗ','ᓤ'=>'·ᓘ','ᓦ'=>'·ᓚ','ᓨ'=>'·ᓛ','ᓶ'=>'·ᓭ','ᓸ'=>'·ᓯ','ᓺ'=>'·ᓰ','ᓼ'=>'·ᓱ','ᓾ'=>'·ᓲ','ᔀ'=>'·ᓴ','ᔂ'=>'·ᓵ','á”—'=>'·á”','á”™'=>'·ᔑ','á”›'=>'·ᔒ','á”'=>'·ᔓ','ᔟ'=>'·ᔔ','ᔡ'=>'·ᔕ','ᔣ'=>'·ᔖ','á”±'=>'·ᔨ','ᔳ'=>'·ᔩ','ᔵ'=>'·ᔪ','á”·'=>'·ᔫ','ᔹ'=>'·ᔭ','á”»'=>'·ᔮ','á•Ž'=>'·ᕌ','á•›'=>'·ᕚ','ᕨ'=>'·ᕧ','('=>'(','â‘´'=>'(1)','â’§'=>'(l)','⑽'=>'(10)','⑾'=>'(11)','â‘¿'=>'(12)','â’€'=>'(13)','â’'=>'(14)','â’‚'=>'(15)','â’ƒ'=>'(16)','â’„'=>'(17)','â’…'=>'(18)','â’†'=>'(19)','⑵'=>'(2)','â’‡'=>'(20)','⑶'=>'(3)','â‘·'=>'(4)','⑸'=>'(5)','⑹'=>'(6)','⑺'=>'(7)','â‘»'=>'(8)','⑼'=>'(9)','â’œ'=>'(a)','â’'=>'(b)','â’ž'=>'(c)','â’Ÿ'=>'(d)','â’ '=>'(e)','â’¡'=>'(f)','â’¢'=>'(g)','â’£'=>'(h)','â’¤'=>'(i)','â’¥'=>'(j)','â’¦'=>'(k)','â’¨'=>'(m)','â’©'=>'(n)','â’ª'=>'(o)','â’«'=>'(p)','â’¬'=>'(q)','â’­'=>'(r)','â’®'=>'(s)','â’¯'=>'(t)','â’°'=>'(u)','â’±'=>'(v)','â’²'=>'(w)','â’³'=>'(x)','â’´'=>'(y)','â’µ'=>'(z)','㈀'=>'(á„€)','㈎'=>'(ê°€)','ãˆ'=>'(á„‚)','ãˆ'=>'(나)','㈂'=>'(ᄃ)','ãˆ'=>'(다)','㈃'=>'(á„…)','㈑'=>'(ë¼)','㈄'=>'(ᄆ)','㈒'=>'(마)','㈅'=>'(ᄇ)','㈓'=>'(ë°”)','㈆'=>'(ᄉ)','㈔'=>'(사)','㈇'=>'(á„‹)','㈕'=>'(ì•„)','ãˆ'=>'(오전)','㈞'=>'(오후)','㈈'=>'(á„Œ)','㈖'=>'(ìž)','㈜'=>'(주)','㈉'=>'(á„Ž)','㈗'=>'(ì°¨)','㈊'=>'(á„)','㈘'=>'(ì¹´)','㈋'=>'(á„)','㈙'=>'(타)','㈌'=>'(á„‘)','㈚'=>'(파)','ãˆ'=>'(á„’)','㈛'=>'(하)','㈠'=>'(一)','㈦'=>'(七)','㈢'=>'(三)','㈨'=>'(ä¹)','㈡'=>'(二)','㈤'=>'(五)','㈹'=>'(代)','㈽'=>'(ä¼)','ã‰'=>'(休)','㈧'=>'(å…«)','㈥'=>'(å…­)','㈸'=>'(労)','㈩'=>'(å)','㈿'=>'(å”)','㈴'=>'(å)','㈺'=>'(呼)','㈣'=>'(å››)','㈯'=>'(土)','㈻'=>'(å­¦)','㈰'=>'(æ—¥)','㈪'=>'(月)','㈲'=>'(有)','㈭'=>'(木)','㈱'=>'(æ ª)','㈬'=>'(æ°´)','㈫'=>'(ç«)','㈵'=>'(特)','㈼'=>'(監)','㈳'=>'(社)','㈷'=>'(ç¥)','㉀'=>'(祭)','㉂'=>'(自)','㉃'=>'(至)','㈶'=>'(財)','㈾'=>'(資)','㈮'=>'(金)',')'=>')','ï¼»'=>'[','〔'=>'[','ï¼½'=>']','〕'=>']','ï½›'=>'{','ï½'=>'}','⦅'=>'⦅','ï½ '=>'⦆','ï½¢'=>'「','ï½£'=>'ã€','ï¼ '=>'@','*'=>'*','ï¼'=>'/','â„'=>'/','∕'=>'/','ï¼¼'=>'\\','&'=>'&','#'=>'#','ï¼…'=>'%','‶'=>'‵‵','‷'=>'‵‵‵','༌'=>'་','´'=>'ʹ','΄'=>'ʹ','´'=>'ʹ','\''=>'ʹ','''=>'ʹ','′'=>'ʹ','׳'=>'ʹ','Í´'=>'ʹ','ËŠ'=>'ʹ','"'=>'ʹʹ','"'=>'ʹʹ','″'=>'ʹʹ','〃'=>'ʹʹ','×´'=>'ʹʹ','ʺ'=>'ʹʹ','‴'=>'ʹʹʹ','â—'=>'ʹʹʹʹ','¯'=>'ˉ','ï¿£'=>'ˉ','‾'=>'ˉ','﹉'=>'ˉ','﹊'=>'ˉ','﹋'=>'ˉ','﹌'=>'ˉ','Ëš'=>'°','௵'=>'௳','ï¿©'=>'â†','ï¿«'=>'→','↑'=>'↑','↓'=>'↓','↵'=>'↲','⨡'=>'↾','ð››'=>'∂','ðœ•'=>'∂','ð'=>'∂','ðž‰'=>'∂','ðŸƒ'=>'∂','ð›'=>'∇','ð›»'=>'∇','ðœµ'=>'∇','ð¯'=>'∇','ðž©'=>'∇','+'=>'+','﬩'=>'+','‹'=>'<','<'=>'<','ï¼'=>'=','⩵'=>'==','⩶'=>'===','›'=>'>','>'=>'>','ï¿¢'=>'¬','¦'=>'¦','〜'=>'~','~'=>'~','﹨'=>'∖','â‹€'=>'∧','â‹'=>'∨','â‹‚'=>'∩','⋃'=>'∪','∯'=>'∮∮','∰'=>'∮∮∮','≣'=>'≡','â™'=>'⊕','☉'=>'⊙','⟂'=>'⊥','â–·'=>'⊲','â¨'=>'⋈','⨽'=>'⌙','☸'=>'⎈','⎮'=>'⎥','│'=>'│','â–'=>'â–Œ','ï¿­'=>'â– ','â˜'=>'â–¡','ï¿®'=>'â—‹','⦾'=>'â—Ž','〛'=>'⟧','〈'=>'⟨','〈'=>'⟨','〉'=>'⟩','〉'=>'⟩','⧙'=>'⦚','〶'=>'〒','ï½°'=>'ー','ï¿ '=>'¢','$'=>'$','ï¿¡'=>'£','ï¿¥'=>'Y̵','₩'=>'W̵','ï¼'=>'0','ðŸŽ'=>'0','ðŸ˜'=>'0','ðŸ¢'=>'0','ðŸ¬'=>'0','ðŸ¶'=>'0','০'=>'0','à­¦'=>'0','௦'=>'0','á '=>'0','〇'=>'0','ðŽ'=>'0','ð‘‚'=>'0','ð‘¶'=>'0','ð’ª'=>'0','ð“ž'=>'0','ð”’'=>'0','ð•†'=>'0','ð•º'=>'0','ð–®'=>'0','ð—¢'=>'0','ð˜–'=>'0','ð™Š'=>'0','ð™¾'=>'0','ðš¶'=>'0','ð›°'=>'0','ðœª'=>'0','ð¤'=>'0','ðžž'=>'0','âµ”'=>'0','à´ '=>'0','⊖'=>'0̵','ðš¯'=>'0̵','ðš¹'=>'0̵','ð›©'=>'0̵','ð›³'=>'0̵','ðœ£'=>'0̵','ðœ­'=>'0̵','ð'=>'0̵','ð§'=>'0̵','ðž—'=>'0̵','ðž¡'=>'0̵','â´±'=>'0̵','Ꮎ'=>'0̵','Û°'=>'Ù ','á­œ'=>'á­','ã˜'=>'0点','1'=>'1','ðŸ'=>'1','ðŸ™'=>'1','ðŸ£'=>'1','ðŸ­'=>'1','ðŸ·'=>'1','â„'=>'1','â„‘'=>'1','ðˆ'=>'1','ð¼'=>'1','ð‘°'=>'1','ð“˜'=>'1','ð•€'=>'1','ð•´'=>'1','ð–¨'=>'1','ð—œ'=>'1','ð˜'=>'1','ð™„'=>'1','ð™¸'=>'1','l'=>'l','l'=>'l','â…¼'=>'1','â„“'=>'l','ð¥'=>'l','ð‘™'=>'l','ð’'=>'l','ð“'=>'l','ð“µ'=>'l','ð”©'=>'l','ð•'=>'l','ð–‘'=>'l','ð—…'=>'l','ð—¹'=>'l','ð˜­'=>'l','ð™¡'=>'l','ðš•'=>'l','ðš°'=>'l','ð›ª'=>'l','ðœ¤'=>'l','ðž'=>'l','ðž˜'=>'l','â‘ '=>'➀','É­'=>'lÌ¢','É«'=>'lÌ´','Æš'=>'l̵','Å‚'=>'lÌ·','Û±'=>'Ù¡','â’ˆ'=>'1.','Å€'=>'l·','á’·'=>'1·','â‘©'=>'➉','â’‘'=>'10.','ã©'=>'10æ—¥','㋉'=>'10月','ã¢'=>'10点','â’’'=>'11.','ãª'=>'11æ—¥','ã‹Š'=>'11月','ã£'=>'11点','â’“'=>'12.','ã«'=>'12æ—¥','ã‹‹'=>'12月','ã¤'=>'12点','â’”'=>'13.','ã¬'=>'13æ—¥','ã¥'=>'13点','â’•'=>'14.','ã­'=>'14æ—¥','ã¦'=>'14点','â’–'=>'15.','ã®'=>'15æ—¥','ã§'=>'15点','â’—'=>'16.','ã¯'=>'16æ—¥','ã¨'=>'16点','â’˜'=>'17.','ã°'=>'17æ—¥','ã©'=>'17点','â’™'=>'18.','ã±'=>'18æ—¥','ãª'=>'18点','â’š'=>'19.','ã²'=>'19æ—¥','ã«'=>'19点','lj'=>'lj','ã '=>'1æ—¥','ã‹€'=>'1月','ã™'=>'1点','ï¼’'=>'2','ðŸ'=>'2','ðŸš'=>'2','ðŸ¤'=>'2','ðŸ®'=>'2','ðŸ¸'=>'2','á’¿'=>'2','â‘¡'=>'âž','Û²'=>'Ù¢','â’‰'=>'2.','â’›'=>'20.','ã³'=>'20æ—¥','ã¬'=>'20点','ã´'=>'21æ—¥','ã­'=>'21点','ãµ'=>'22æ—¥','ã®'=>'22点','ã¶'=>'23æ—¥','ã¯'=>'23点','ã·'=>'24æ—¥','ã°'=>'24点','ã¸'=>'25æ—¥','ã¹'=>'26æ—¥','ãº'=>'27æ—¥','ã»'=>'28æ—¥','ã¼'=>'29æ—¥','ã¡'=>'2æ—¥','ã‹'=>'2月','ãš'=>'2点','3'=>'3','ðŸ‘'=>'3','ðŸ›'=>'3','ðŸ¥'=>'3','ðŸ¯'=>'3','ðŸ¹'=>'3','â‘¢'=>'âž‚','Û³'=>'Ù£','â’Š'=>'3.','ã½'=>'30æ—¥','ã¾'=>'31æ—¥','ã¢'=>'3æ—¥','ã‹‚'=>'3月','ã›'=>'3点','ï¼”'=>'4','ðŸ’'=>'4','ðŸœ'=>'4','ðŸ¦'=>'4','ðŸ°'=>'4','ðŸº'=>'4','áŽ'=>'4','â‘£'=>'➃','â’‹'=>'4.','á”°'=>'4·','ã£'=>'4æ—¥','㋃'=>'4月','ãœ'=>'4点','5'=>'5','ðŸ“'=>'5','ðŸ'=>'5','ðŸ§'=>'5','ðŸ±'=>'5','ðŸ»'=>'5','⑤'=>'âž„','â’Œ'=>'5.','ã¤'=>'5æ—¥','ã‹„'=>'5月','ã'=>'5点','ï¼–'=>'6','ðŸ”'=>'6','ðŸž'=>'6','ðŸ¨'=>'6','ðŸ²'=>'6','ðŸ¼'=>'6','б'=>'6','â‘¥'=>'âž…','â’'=>'6.','ã¥'=>'6æ—¥','ã‹…'=>'6月','ãž'=>'6点','ï¼—'=>'7','ðŸ•'=>'7','ðŸŸ'=>'7','ðŸ©'=>'7','ðŸ³'=>'7','ðŸ½'=>'7','⑦'=>'➆','Û·'=>'Ù§','â’Ž'=>'7.','ã¦'=>'7æ—¥','㋆'=>'7月','ãŸ'=>'7点','ଃ'=>'8','৪'=>'8','੪'=>'8','8'=>'8','ðŸ–'=>'8','ðŸ '=>'8','ðŸª'=>'8','ðŸ´'=>'8','ðŸ¾'=>'8','È£'=>'8','⑧'=>'➇','Û¸'=>'Ù¨','â’'=>'8.','ã§'=>'8æ—¥','㋇'=>'8月','ã '=>'8点','੧'=>'9','à­¨'=>'9','৭'=>'9','ï¼™'=>'9','ðŸ—'=>'9','ðŸ¡'=>'9','ðŸ«'=>'9','ðŸµ'=>'9','ðŸ¿'=>'9','⑨'=>'➈','Û¹'=>'Ù©','â’'=>'9.','ã¨'=>'9æ—¥','㋈'=>'9月','ã¡'=>'9点','ï½'=>'a','ðš'=>'a','ð‘Ž'=>'a','ð’‚'=>'a','ð’¶'=>'a','ð“ª'=>'a','ð”ž'=>'a','ð•’'=>'a','ð–†'=>'a','ð–º'=>'a','ð—®'=>'a','ð˜¢'=>'a','ð™–'=>'a','ðšŠ'=>'a','â„€'=>'a/c','â„'=>'a/s','æ'=>'ae','b'=>'b','ð›'=>'b','ð‘'=>'b','ð’ƒ'=>'b','ð’·'=>'b','ð“«'=>'b','ð”Ÿ'=>'b','ð•“'=>'b','ð–‡'=>'b','ð–»'=>'b','ð—¯'=>'b','ð˜£'=>'b','ð™—'=>'b','ðš‹'=>'b','É“'=>'bÌ”','ƃ'=>'bÌ„','Æ€'=>'b̵','c'=>'c','â…½'=>'c','ðœ'=>'c','ð‘'=>'c','ð’„'=>'c','ð’¸'=>'c','ð“¬'=>'c','ð” '=>'c','ð•”'=>'c','ð–ˆ'=>'c','ð–¼'=>'c','ð—°'=>'c','ð˜¤'=>'c','ð™˜'=>'c','ðšŒ'=>'c','ð›“'=>'c','ðœ'=>'c','ð‡'=>'c','ðž'=>'c','ðž»'=>'c','â„…'=>'c/o','℆'=>'c/u','d'=>'d','â…¾'=>'d','â…†'=>'d','ð'=>'d','ð‘‘'=>'d','ð’…'=>'d','ð’¹'=>'d','ð“­'=>'d','ð”¡'=>'d','ð••'=>'d','ð–‰'=>'d','ð–½'=>'d','ð—±'=>'d','ð˜¥'=>'d','ð™™'=>'d','ðš'=>'d','É—'=>'dÌ”','ÆŒ'=>'dÌ„','É–'=>'dÌ¢','Ä‘'=>'d̵','dz'=>'dz','dž'=>'dž','ï½…'=>'e','ℯ'=>'e','â…‡'=>'e','ðž'=>'e','ð‘’'=>'e','ð’†'=>'e','ð“®'=>'e','ð”¢'=>'e','ð•–'=>'e','ð–Š'=>'e','ð–¾'=>'e','ð—²'=>'e','ð˜¦'=>'e','ð™š'=>'e','ðšŽ'=>'e','â´¹'=>'E','É™'=>'Ç','Éš'=>'ÇËž','â‹´'=>'É›','ð›†'=>'É›','ð›œ'=>'É›','ðœ€'=>'É›','ðœ–'=>'É›','ðœº'=>'É›','ð'=>'É›','ð´'=>'É›','ðžŠ'=>'É›','ðž®'=>'É›','ðŸ„'=>'É›','f'=>'f','ðŸ'=>'f','ð‘“'=>'f','ð’‡'=>'f','ð’»'=>'f','ð“¯'=>'f','ð”£'=>'f','ð•—'=>'f','ð–‹'=>'f','ð–¿'=>'f','ð—³'=>'f','ð˜§'=>'f','ð™›'=>'f','ðš'=>'f','Æ’'=>'fÌ¡','g'=>'g','â„Š'=>'g','ð '=>'g','ð‘”'=>'g','ð’ˆ'=>'g','ð“°'=>'g','ð”¤'=>'g','ð•˜'=>'g','ð–Œ'=>'g','ð—€'=>'g','ð—´'=>'g','ð˜¨'=>'g','ð™œ'=>'g','ðš'=>'g','É¡'=>'g','É '=>'gÌ”','Ç¥'=>'g̵','h'=>'h','â„Ž'=>'h','ð¡'=>'h','ð’‰'=>'h','ð’½'=>'h','ð“±'=>'h','ð”¥'=>'h','ð•™'=>'h','ð–'=>'h','ð—'=>'h','ð—µ'=>'h','ð˜©'=>'h','ð™'=>'h','ðš‘'=>'h','ɦ'=>'hÌ”','ħ'=>'h̵','â„'=>'h̵','῾'=>'Ê»','‘'=>'Ê»','‛'=>'Ê»','ʽ'=>'Ê»','â³'=>'i','i'=>'i','â…°'=>'i','ℹ'=>'i','â…ˆ'=>'i','ð¢'=>'i','ð‘–'=>'i','ð’Š'=>'i','ð’¾'=>'i','ð“²'=>'i','ð”¦'=>'i','ð•š'=>'i','ð–Ž'=>'i','ð—‚'=>'i','ð—¶'=>'i','ð˜ª'=>'i','ð™ž'=>'i','ðš’'=>'i','ı'=>'i','ðš¤'=>'i','ɪ'=>'i','É©'=>'i','ð›Š'=>'i','ðœ„'=>'i','ðœ¾'=>'i','ð¸'=>'i','ðž²'=>'i','ɨ'=>'i̵','â…±'=>'ii','â…²'=>'iii','ij'=>'ij','â…³'=>'iv','â…¸'=>'ix','j'=>'j','â…‰'=>'j','ð£'=>'j','ð‘—'=>'j','ð’‹'=>'j','ð’¿'=>'j','ð“³'=>'j','ð”§'=>'j','ð•›'=>'j','ð–'=>'j','ð—ƒ'=>'j','ð—·'=>'j','ð˜«'=>'j','ð™Ÿ'=>'j','ðš“'=>'j','ϳ'=>'j','ðš¥'=>'È·','k'=>'k','ð¤'=>'k','ð‘˜'=>'k','ð’Œ'=>'k','ð“€'=>'k','ð“´'=>'k','ð”¨'=>'k','ð•œ'=>'k','ð–'=>'k','ð—„'=>'k','ð—¸'=>'k','ð˜¬'=>'k','ð™ '=>'k','ðš”'=>'k','Æ™'=>'kÌ”','ï½'=>'m','â…¿'=>'m','ð¦'=>'m','ð‘š'=>'m','ð’Ž'=>'m','ð“‚'=>'m','ð“¶'=>'m','ð”ª'=>'m','ð•ž'=>'m','ð–’'=>'m','ð—†'=>'m','ð—º'=>'m','ð˜®'=>'m','ð™¢'=>'m','ðš–'=>'m','ɱ'=>'mÌ¡','n'=>'n','ð§'=>'n','ð‘›'=>'n','ð’'=>'n','ð“ƒ'=>'n','ð“·'=>'n','ð”«'=>'n','ð•Ÿ'=>'n','ð–“'=>'n','ð—‡'=>'n','ð—»'=>'n','ð˜¯'=>'n','ð™£'=>'n','ðš—'=>'n','ð'=>'N','ð‘'=>'N','ð‘µ'=>'N','ð’©'=>'N','ð“'=>'N','ð”‘'=>'N','ð•¹'=>'N','ð–­'=>'N','ð—¡'=>'N','ð˜•'=>'N','ð™‰'=>'N','ð™½'=>'N','ðš´'=>'N','ð›®'=>'N','ðœ¨'=>'N','ð¢'=>'N','ðžœ'=>'N','ɲ'=>'ņ','ɳ'=>'nÌ¢','Æž'=>'nÌ©','ð›ˆ'=>'nÌ©','ðœ‚'=>'nÌ©','ðœ¼'=>'nÌ©','ð¶'=>'nÌ©','ðž°'=>'nÌ©','ÇŒ'=>'nj','ï½'=>'o','â„´'=>'o','ð¨'=>'o','ð‘œ'=>'o','ð’'=>'o','ð“¸'=>'o','ð”¬'=>'o','ð• '=>'o','ð–”'=>'o','ð—ˆ'=>'o','ð—¼'=>'o','ð˜°'=>'o','ð™¤'=>'o','ðš˜'=>'o','á´'=>'o','ð›'=>'o','ðœŠ'=>'o','ð„'=>'o','ð¾'=>'o','ðž¸'=>'o','ɵ'=>'o̵','Ç¿'=>'o̵Ì','ø'=>'oÌ·','Å“'=>'oe','Æ¡'=>'oʼ','â´'=>'p','ï½'=>'p','ð©'=>'p','ð‘'=>'p','ð’‘'=>'p','ð“…'=>'p','ð“¹'=>'p','ð”­'=>'p','ð•¡'=>'p','ð–•'=>'p','ð—‰'=>'p','ð—½'=>'p','ð˜±'=>'p','ð™¥'=>'p','ðš™'=>'p','ð›’'=>'p','ð› '=>'p','ðœŒ'=>'p','ðœš'=>'p','ð†'=>'p','ð”'=>'p','ðž€'=>'p','ðžŽ'=>'p','ðžº'=>'p','ðŸˆ'=>'p','Æ¥'=>'pÌ”','q'=>'q','ðª'=>'q','ð‘ž'=>'q','ð’’'=>'q','ð“†'=>'q','ð“º'=>'q','ð”®'=>'q','ð•¢'=>'q','ð––'=>'q','ð—Š'=>'q','ð—¾'=>'q','ð˜²'=>'q','ð™¦'=>'q','ðšš'=>'q','ð'=>'Q','ð‘„'=>'Q','ð‘¸'=>'Q','ð’¬'=>'Q','ð“ '=>'Q','ð””'=>'Q','ð•¼'=>'Q','ð–°'=>'Q','ð—¤'=>'Q','ð˜˜'=>'Q','ð™Œ'=>'Q','ðš€'=>'Q','Ê '=>'qÌ”','ð›‹'=>'ĸ','ð›ž'=>'ĸ','ðœ…'=>'ĸ','ðœ˜'=>'ĸ','ðœ¿'=>'ĸ','ð’'=>'ĸ','ð¹'=>'ĸ','ðžŒ'=>'ĸ','ðž³'=>'ĸ','ðŸ†'=>'ĸ','ï½’'=>'r','ð«'=>'r','ð‘Ÿ'=>'r','ð’“'=>'r','ð“‡'=>'r','ð“»'=>'r','ð”¯'=>'r','ð•£'=>'r','ð–—'=>'r','ð—‹'=>'r','ð—¿'=>'r','ð˜³'=>'r','ð™§'=>'r','ðš›'=>'r','ɽ'=>'rÌ¢','ɼ'=>'rÌ©','s'=>'s','ð¬'=>'s','ð‘ '=>'s','ð’”'=>'s','ð“ˆ'=>'s','ð“¼'=>'s','ð”°'=>'s','ð•¤'=>'s','ð–˜'=>'s','ð—Œ'=>'s','ð˜€'=>'s','ð˜´'=>'s','ð™¨'=>'s','ðšœ'=>'s','ƽ'=>'s','Ê‚'=>'sÌ¢','∫'=>'ʃ','∬'=>'ʃʃ','∭'=>'ʃʃʃ','⨌'=>'ʃʃʃʃ','ï½”'=>'t','ð­'=>'t','ð‘¡'=>'t','ð’•'=>'t','ð“‰'=>'t','ð“½'=>'t','ð”±'=>'t','ð•¥'=>'t','ð–™'=>'t','ð—'=>'t','ð˜'=>'t','ð˜µ'=>'t','ð™©'=>'t','ðš'=>'t','ð‘‡'=>'T','ð‘»'=>'T','ð’¯'=>'T','ð“£'=>'T','ð”—'=>'T','ð•‹'=>'T','ð•¿'=>'T','ð–³'=>'T','ð—§'=>'T','ð˜›'=>'T','ð™'=>'T','ðšƒ'=>'T','ðš»'=>'T','ð›µ'=>'T','ðœ¯'=>'T','ð©'=>'T','ðž£'=>'T','Æ­'=>'tÌ”','È›'=>'Å£','Æ«'=>'Å£','ŧ'=>'t̵','u'=>'u','ð®'=>'u','ð‘¢'=>'u','ð’–'=>'u','ð“Š'=>'u','ð“¾'=>'u','ð”²'=>'u','ð•¦'=>'u','ð–š'=>'u','ð—Ž'=>'u','ð˜‚'=>'u','ð˜¶'=>'u','ð™ª'=>'u','ðšž'=>'u','ÊŠ'=>'u','Ê‹'=>'u','ð›–'=>'u','ðœ'=>'u','ðŠ'=>'u','ðž„'=>'u','ðž¾'=>'u','ð‘ˆ'=>'U','ð‘¼'=>'U','ð’°'=>'U','ð“¤'=>'U','ð”˜'=>'U','ð•Œ'=>'U','ð–€'=>'U','ð–´'=>'U','ð—¨'=>'U','ð˜œ'=>'U','ð™'=>'U','ðš„'=>'U','ï½–'=>'v','â…´'=>'v','ð¯'=>'v','ð‘£'=>'v','ð’—'=>'v','ð“‹'=>'v','ð“¿'=>'v','ð”³'=>'v','ð•§'=>'v','ð–›'=>'v','ð—'=>'v','ð˜ƒ'=>'v','ð˜·'=>'v','ð™«'=>'v','ðšŸ'=>'v','ð›Ž'=>'v','ðœˆ'=>'v','ð‚'=>'v','ð¼'=>'v','ðž¶'=>'v','â…µ'=>'vi','â…¶'=>'vii','â…·'=>'viii','ɯ'=>'w','ï½—'=>'w','ð°'=>'w','ð‘¤'=>'w','ð’˜'=>'w','ð“Œ'=>'w','ð”€'=>'w','ð”´'=>'w','ð•¨'=>'w','ð–œ'=>'w','ð—'=>'w','ð˜„'=>'w','ð˜¸'=>'w','ð™¬'=>'w','ðš '=>'w','ð‘Š'=>'W','ð‘¾'=>'W','ð’²'=>'W','ð“¦'=>'W','ð”š'=>'W','ð•Ž'=>'W','ð–‚'=>'W','ð–¶'=>'W','ð—ª'=>'W','ð˜ž'=>'W','ð™’'=>'W','ðš†'=>'W','×'=>'x','x'=>'x','â…¹'=>'x','ð±'=>'x','ð‘¥'=>'x','ð’™'=>'x','ð“'=>'x','ð”'=>'x','ð”µ'=>'x','ð•©'=>'x','ð–'=>'x','ð—‘'=>'x','ð˜…'=>'x','ð˜¹'=>'x','ð™­'=>'x','ðš¡'=>'x','á™­'=>'X','ð‘‹'=>'X','ð‘¿'=>'X','ð’³'=>'X','ð“§'=>'X','ð”›'=>'X','ð•'=>'X','ð–ƒ'=>'X','ð–·'=>'X','ð—«'=>'X','ð˜Ÿ'=>'X','ð™“'=>'X','ðš‡'=>'X','ðš¾'=>'X','ð›¸'=>'X','ðœ²'=>'X','ð¬'=>'X','ðž¦'=>'X','â…º'=>'xi','â…»'=>'xii','ï½™'=>'y','ð²'=>'y','ð‘¦'=>'y','ð’š'=>'y','ð“Ž'=>'y','ð”‚'=>'y','ð”¶'=>'y','ð•ª'=>'y','ð–ž'=>'y','ð—’'=>'y','ð˜†'=>'y','ð˜º'=>'y','ð™®'=>'y','ðš¢'=>'y','Æ´'=>'yÌ”','z'=>'z','ð³'=>'z','ð‘§'=>'z','ð’›'=>'z','ð“'=>'z','ð”ƒ'=>'z','ð”·'=>'z','ð•«'=>'z','ð–Ÿ'=>'z','ð—“'=>'z','ð˜‡'=>'z','ð˜»'=>'z','ð™¯'=>'z','ðš£'=>'z','È¥'=>'zÌ¡','Ê'=>'zÌ¢','ƶ'=>'z̵','È'=>'Ê’','?'=>'Ê”','?'=>'Ê”','â‡'=>'ʔʔ','âˆ'=>'ʔǃ','á¾½'=>'ʼ','᾿'=>'ʼ','’'=>'ʼ','ʾ'=>'ʼ','!'=>'ǃ','ï¼'=>'ǃ','â‰'=>'ǃʔ','‼'=>'ǃǃ','âº'=>'α','ð›‚'=>'α','ð›¼'=>'α','ðœ¶'=>'α','ð°'=>'α','ðžª'=>'α','ð›ƒ'=>'β','ð›½'=>'β','ðœ·'=>'β','ð±'=>'β','ðž«'=>'β','ℽ'=>'γ','ð›„'=>'γ','ð›¾'=>'γ','ðœ¸'=>'γ','ð²'=>'γ','ðž¬'=>'γ','ð›…'=>'δ','ð›¿'=>'δ','ðœ¹'=>'δ','ð³'=>'δ','ðž­'=>'δ','ðŸ‹'=>'Ï','ð›‡'=>'ζ','ðœ'=>'ζ','ðœ»'=>'ζ','ðµ'=>'ζ','ðž¯'=>'ζ','â¬'=>'θ','ð›‰'=>'θ','ð›'=>'θ','ðœƒ'=>'θ','ðœ—'=>'θ','ðœ½'=>'θ','ð‘'=>'θ','ð·'=>'θ','ðž‹'=>'θ','ðž±'=>'θ','ðŸ…'=>'θ','ð›Œ'=>'λ','ðœ†'=>'λ','ð€'=>'λ','ðº'=>'λ','ðž´'=>'λ','ð›¬'=>'Λ','ðœ¦'=>'Λ','ð '=>'Λ','ðžš'=>'Λ','ð›'=>'μ','ðœ‡'=>'μ','ð'=>'μ','ð»'=>'μ','ðžµ'=>'μ','ð›'=>'ξ','ðœ‰'=>'ξ','ðƒ'=>'ξ','ð½'=>'ξ','ðž·'=>'ξ','ð›¯'=>'Ξ','ðœ©'=>'Ξ','ð£'=>'Ξ','ðž'=>'Ξ','ℼ'=>'Ï€','ð›‘'=>'Ï€','ð›¡'=>'Ï€','ðœ‹'=>'Ï€','ðœ›'=>'Ï€','ð…'=>'Ï€','ð•'=>'Ï€','ð¿'=>'Ï€','ðž'=>'Ï€','ðž¹'=>'Ï€','ðŸ‰'=>'Ï€','á´¨'=>'Ï€','âˆ'=>'Π','ðš·'=>'Π','ð›±'=>'Π','ðœ«'=>'Π','ð¥'=>'Π','ðžŸ'=>'Π','ð›”'=>'σ','ðœŽ'=>'σ','ðˆ'=>'σ','ðž‚'=>'σ','ðž¼'=>'σ','ð›•'=>'Ï„','ðœ'=>'Ï„','ð‰'=>'Ï„','ðžƒ'=>'Ï„','ðž½'=>'Ï„','ð˜'=>'Y','ð‘Œ'=>'Y','ð’€'=>'Y','ð’´'=>'Y','ð“¨'=>'Y','ð”œ'=>'Y','ð•'=>'Y','ð–„'=>'Y','ð–¸'=>'Y','ð—¬'=>'Y','ð˜ '=>'Y','ð™”'=>'Y','ðšˆ'=>'Y','ðš¼'=>'Y','ð›¶'=>'Y','ðœ°'=>'Y','ðª'=>'Y','ðž¤'=>'Y','ð›—'=>'φ','ð›Ÿ'=>'φ','ðœ‘'=>'φ','ðœ™'=>'φ','ð‹'=>'φ','ð“'=>'φ','ðž…'=>'φ','ðž'=>'φ','ðž¿'=>'φ','ðŸ‡'=>'φ','ð›·'=>'Φ','ðœ±'=>'Φ','ð«'=>'Φ','ðž¥'=>'Φ','ð›˜'=>'χ','ðœ’'=>'χ','ðŒ'=>'χ','ðž†'=>'χ','ðŸ€'=>'χ','ð›™'=>'ψ','ðœ“'=>'ψ','ð'=>'ψ','ðž‡'=>'ψ','ðŸ'=>'ψ','ð›¹'=>'Ψ','ðœ³'=>'Ψ','ð­'=>'Ψ','ðž§'=>'Ψ','âµ'=>'ω','ð›š'=>'ω','ðœ”'=>'ω','ðŽ'=>'ω','ðžˆ'=>'ω','ðŸ‚'=>'ω','Ó•'=>'ae','Ò“'=>'r̵','Ò‘'=>'rá‘Š','Ò—'=>'ж̩','Ò™'=>'з̡','Ó'=>'i','Ò‹'=>'й̡','Ò›'=>'ĸ̩','ÒŸ'=>'ĸ̵','á´«'=>'л','Ó†'=>'л̡','ÓŽ'=>'м̡','ÓŠ'=>'н̡','Óˆ'=>'н̡','Ò£'=>'н̩','Ó©'=>'o̵','ѳ'=>'o̵','Ò«'=>'cÌ¡','Ò­'=>'Ñ‚Ì©','Ò¯'=>'y','Ò±'=>'y̵','Ñ›'=>'h̵','ѽ'=>'Ñ¡Òƒ','ÓŒ'=>'Ò·','Ò¿'=>'ҽ̢','Ò'=>'Ь̵','Õ¦'=>'q','Õ¼'=>'n','ℵ'=>'×','ﬡ'=>'×','אָ'=>'אַ','אּ'=>'אַ','ï­'=>'×ל','ℶ'=>'ב','â„·'=>'×’','ℸ'=>'ד','ﬢ'=>'ד','ﬣ'=>'×”','ﬤ'=>'×›','ﬥ'=>'ל','ﬦ'=>'×','ﬠ'=>'×¢','ﬧ'=>'ר','ﬨ'=>'ת','ﺀ'=>'Ø¡','ﺂ'=>'Ø¢','ïº'=>'Ø¢','ﺄ'=>'Ø£','ﺃ'=>'Ø£','Ùµ'=>'أ','ï­‘'=>'Ù±','ï­'=>'Ù±','ﺆ'=>'ؤ','ﺅ'=>'ؤ','Ù¶'=>'ÙˆÙ”','ﺈ'=>'Ø¥','ﺇ'=>'Ø¥','ﺋ'=>'ئ','ﺌ'=>'ئ','ﺊ'=>'ئ','ﺉ'=>'ئ','ﯫ'=>'ئا','ﯪ'=>'ئا','ﯸ'=>'ئٻ','ﯷ'=>'ئٻ','ﯶ'=>'ئٻ','ï²—'=>'ئج','ï°€'=>'ئج','ﲘ'=>'ئح','ï°'=>'ئح','ï²™'=>'ئخ','ﱤ'=>'ئر','ï±¥'=>'ئز','ﲚ'=>'ئم','ﳟ'=>'ئم','ﱦ'=>'ئم','ï°‚'=>'ئم','ﱧ'=>'ئن','ï²›'=>'ئه','ï³ '=>'ئه','ﯭ'=>'ئه','ﯬ'=>'ئه','ﯯ'=>'ئو','ﯮ'=>'ئو','ﯳ'=>'ئۆ','ﯲ'=>'ئۆ','ﯱ'=>'ئۇ','ﯰ'=>'ئۇ','ﯵ'=>'ئۈ','ﯴ'=>'ئۈ','ﯻ'=>'ئى','ﯺ'=>'ئى','ﱨ'=>'ئى','ﯹ'=>'ئى','ï°ƒ'=>'ئى','ﱩ'=>'ئى','ï°„'=>'ئى','ﺎ'=>'ا','ïº'=>'ا','ï´¼'=>'اً','ï´½'=>'اً','ï·³'=>'اكبر','ï·²'=>'الله','ﺑ'=>'ب','ﺒ'=>'ب','ïº'=>'ب','ïº'=>'ب','ﲜ'=>'بج','ï°…'=>'بج','ï²'=>'بح','ï°†'=>'بح','ï·‚'=>'بحى','ﲞ'=>'بخ','ï°‡'=>'بخ','ﶞ'=>'بخى','ﱪ'=>'بر','ﱫ'=>'بز','ﲟ'=>'بم','ﳡ'=>'بم','ﱬ'=>'بم','ï°ˆ'=>'بم','ï±­'=>'بن','ï² '=>'به','ï³¢'=>'به','ï±®'=>'بى','ï°‰'=>'بى','ﱯ'=>'بى','ï°Š'=>'بى','ï­”'=>'Ù»','ï­•'=>'Ù»','ï­“'=>'Ù»','ï­’'=>'Ù»','Û'=>'Ù»','ﯦ'=>'Ù»','ﯧ'=>'Ù»','ﯥ'=>'Ù»','ﯤ'=>'Ù»','ï­˜'=>'Ù¾','ï­™'=>'Ù¾','ï­—'=>'Ù¾','ï­–'=>'Ù¾','ï­œ'=>'Ú€','ï­'=>'Ú€','ï­›'=>'Ú€','ï­š'=>'Ú€','ﺔ'=>'Ø©','ﺓ'=>'Ø©','ﺗ'=>'ت','ﺘ'=>'ت','ﺖ'=>'ت','ﺕ'=>'ت','ﲡ'=>'تج','ï°‹'=>'تج','ïµ'=>'تجم','ﶠ'=>'تجى','ﶟ'=>'تجى','ï²¢'=>'تح','ï°Œ'=>'تح','ïµ’'=>'تحج','ﵑ'=>'تحج','ﵓ'=>'تحم','ï²£'=>'تخ','ï°'=>'تخ','ïµ”'=>'تخم','ﶢ'=>'تخى','ﶡ'=>'تخى','ï±°'=>'تر','ï±±'=>'تز','ﲤ'=>'تم','ï³£'=>'تم','ï±²'=>'تم','ï°Ž'=>'تم','ﵕ'=>'تمج','ïµ–'=>'تمح','ïµ—'=>'تمخ','ﶤ'=>'تمى','ﶣ'=>'تمى','ï±³'=>'تن','ï²¥'=>'ته','ﳤ'=>'ته','ï±´'=>'تى','ï°'=>'تى','ï±µ'=>'تى','ï°'=>'تى','ﺛ'=>'Ø«','ﺜ'=>'Ø«','ﺚ'=>'Ø«','ﺙ'=>'Ø«','ï°‘'=>'ثج','ﱶ'=>'ثر','ï±·'=>'ثز','ﲦ'=>'ثم','ï³¥'=>'ثم','ﱸ'=>'ثم','ï°’'=>'ثم','ï±¹'=>'ثن','ﳦ'=>'ثه','ﱺ'=>'ثى','ï°“'=>'ثى','ï±»'=>'ثى','ï°”'=>'ثى','ï­¨'=>'Ù¹','ï­©'=>'Ù¹','ï­§'=>'Ù¹','ï­¦'=>'Ù¹','Ú»'=>'Ù¹','ﮢ'=>'Ù¹','ﮣ'=>'Ù¹','ﮡ'=>'Ù¹','ï® '=>'Ù¹','ï­ '=>'Ùº','ï­¡'=>'Ùº','ï­Ÿ'=>'Ùº','ï­ž'=>'Ùº','ï­¤'=>'Ù¿','ï­¥'=>'Ù¿','ï­£'=>'Ù¿','ï­¢'=>'Ù¿','ﺟ'=>'ج','ﺠ'=>'ج','ﺞ'=>'ج','ïº'=>'ج','ﲧ'=>'جح','ï°•'=>'جح','ﶦ'=>'جحى','ﶾ'=>'جحى','ï·»'=>'جل جلاله','ﲨ'=>'جم','ï°–'=>'جم','ïµ™'=>'جمح','ﵘ'=>'جمح','ﶧ'=>'جمى','ﶥ'=>'جمى','ï´'=>'جى','ï´'=>'جى','ï´ž'=>'جى','ï´‚'=>'جى','ï­¸'=>'Úƒ','ï­¹'=>'Úƒ','ï­·'=>'Úƒ','ï­¶'=>'Úƒ','ï­´'=>'Ú„','ï­µ'=>'Ú„','ï­³'=>'Ú„','ï­²'=>'Ú„','ï­¼'=>'Ú†','ï­½'=>'Ú†','ï­»'=>'Ú†','ï­º'=>'Ú†','ﮀ'=>'Ú‡','ï®'=>'Ú‡','ï­¿'=>'Ú‡','ï­¾'=>'Ú‡','ﺣ'=>'Ø­','ﺤ'=>'Ø­','ﺢ'=>'Ø­','ﺡ'=>'Ø­','ﲩ'=>'حج','ï°—'=>'حج','ﶿ'=>'حجى','ﲪ'=>'حم','ï°˜'=>'حم','ïµ›'=>'حمى','ﵚ'=>'حمى','ï´›'=>'حى','ﳿ'=>'حى','ï´œ'=>'حى','ï´€'=>'حى','ﺧ'=>'Ø®','ﺨ'=>'Ø®','ﺦ'=>'Ø®','ﺥ'=>'Ø®','ﲫ'=>'خج','ï°™'=>'خج','ï°š'=>'خح','ﲬ'=>'خم','ï°›'=>'خم','ï´Ÿ'=>'خى','ï´ƒ'=>'خى','ï´ '=>'خى','ï´„'=>'خى','ﺪ'=>'د','ﺩ'=>'د','ﺬ'=>'Ø°','ﺫ'=>'Ø°','ï±›'=>'ذٰ','ﮉ'=>'Úˆ','ﮈ'=>'Úˆ','ï®…'=>'ÚŒ','ﮄ'=>'ÚŒ','ﮃ'=>'Ú','ﮂ'=>'Ú','ﮇ'=>'ÚŽ','ﮆ'=>'ÚŽ','ﺮ'=>'ر','ﺭ'=>'ر','ﱜ'=>'رٰ','ï·¶'=>'رسول','ï·¼'=>'رىال','ﺰ'=>'ز','ﺯ'=>'ز','ï®'=>'Ú‘','ﮌ'=>'Ú‘','ﮋ'=>'Ú˜','ﮊ'=>'Ú˜','ﺳ'=>'س','ﺴ'=>'س','ﺲ'=>'س','ﺱ'=>'س','ï²­'=>'سج','ï´´'=>'سج','ï°œ'=>'سج','ïµ'=>'سجح','ﵞ'=>'سجى','ï²®'=>'سح','ï´µ'=>'سح','ï°'=>'سح','ﵜ'=>'سحج','ﲯ'=>'سخ','ï´¶'=>'سخ','ï°ž'=>'سخ','ﶨ'=>'سخى','ï·†'=>'سخى','ï´ª'=>'سر','ï´Ž'=>'سر','ï²°'=>'سم','ﳧ'=>'سم','ï°Ÿ'=>'سم','ﵡ'=>'سمج','ïµ '=>'سمح','ﵟ'=>'سمح','ïµ£'=>'سمم','ïµ¢'=>'سمم','ï´±'=>'سه','ﳨ'=>'سه','ï´—'=>'سى','ï³»'=>'سى','ï´˜'=>'سى','ï³¼'=>'سى','ﺷ'=>'Ø´','ﺸ'=>'Ø´','ﺶ'=>'Ø´','ﺵ'=>'Ø´','ï´­'=>'شج','ï´·'=>'شج','ï´¥'=>'شج','ï´‰'=>'شج','ﵩ'=>'شجى','ï´®'=>'شح','ï´¸'=>'شح','ï´¦'=>'شح','ï´Š'=>'شح','ﵨ'=>'شحم','ﵧ'=>'شحم','ﶪ'=>'شحى','ï´¯'=>'شخ','ï´¹'=>'شخ','ï´§'=>'شخ','ï´‹'=>'شخ','ï´©'=>'شر','ï´'=>'شر','ï´°'=>'شم','ﳩ'=>'شم','ï´¨'=>'شم','ï´Œ'=>'شم','ﵫ'=>'شمخ','ﵪ'=>'شمخ','ïµ­'=>'شمم','ﵬ'=>'شمم','ï´²'=>'شه','ﳪ'=>'شه','ï´™'=>'شى','ï³½'=>'شى','ï´š'=>'شى','ï³¾'=>'شى','ﺻ'=>'ص','ﺼ'=>'ص','ﺺ'=>'ص','ﺹ'=>'ص','ï²±'=>'صح','ï° '=>'صح','ïµ¥'=>'صحح','ﵤ'=>'صحح','ﶩ'=>'صحى','ï²²'=>'صخ','ï´«'=>'صر','ï´'=>'صر','ï·µ'=>'صلعم','ï·¹'=>'صلى','ï·º'=>'صلى الله علىه وسلم','ï·°'=>'صلے','ï²³'=>'صم','ï°¡'=>'صم','ï·…'=>'صمم','ﵦ'=>'صمم','ï´¡'=>'صى','ï´…'=>'صى','ï´¢'=>'صى','ï´†'=>'صى','ﺿ'=>'ض','ﻀ'=>'ض','ﺾ'=>'ض','ﺽ'=>'ض','ï²´'=>'ضج','ï°¢'=>'ضج','ï²µ'=>'ضح','ï°£'=>'ضح','ïµ®'=>'ضحى','ﶫ'=>'ضحى','ﲶ'=>'ضخ','ï°¤'=>'ضخ','ïµ°'=>'ضخم','ﵯ'=>'ضخم','ï´¬'=>'ضر','ï´'=>'ضر','ï²·'=>'ضم','ï°¥'=>'ضم','ï´£'=>'ضى','ï´‡'=>'ضى','ï´¤'=>'ضى','ï´ˆ'=>'ضى','ﻃ'=>'Ø·','ﻄ'=>'Ø·','ﻂ'=>'Ø·','ï»'=>'Ø·','ﲸ'=>'طح','ï°¦'=>'طح','ï´³'=>'طم','ï´º'=>'طم','ï°§'=>'طم','ïµ²'=>'طمح','ïµ±'=>'طمح','ïµ³'=>'طمم','ïµ´'=>'طمى','ï´‘'=>'طى','ï³µ'=>'طى','ï´’'=>'طى','ﳶ'=>'طى','ﻇ'=>'ظ','ﻈ'=>'ظ','ﻆ'=>'ظ','ï»…'=>'ظ','ï²¹'=>'ظم','ï´»'=>'ظم','ï°¨'=>'ظم','ﻋ'=>'ع','ﻌ'=>'ع','ﻊ'=>'ع','ﻉ'=>'ع','ﲺ'=>'عج','ï°©'=>'عج','ï·„'=>'عجم','ïµµ'=>'عجم','ï··'=>'علىه','ï²»'=>'عم','ï°ª'=>'عم','ïµ·'=>'عمم','ﵶ'=>'عمم','ﵸ'=>'عمى','ﶶ'=>'عمى','ï´“'=>'عى','ï³·'=>'عى','ï´”'=>'عى','ﳸ'=>'عى','ï»'=>'غ','ï»'=>'غ','ﻎ'=>'غ','ï»'=>'غ','ï²¼'=>'غج','ï°«'=>'غج','ï²½'=>'غم','ï°¬'=>'غم','ïµ¹'=>'غمم','ïµ»'=>'غمى','ﵺ'=>'غمى','ï´•'=>'غى','ï³¹'=>'غى','ï´–'=>'غى','ﳺ'=>'غى','ﻓ'=>'Ù','ï»”'=>'Ù','ï»’'=>'Ù','ﻑ'=>'Ù','ï²¾'=>'Ùج','ï°­'=>'Ùج','ﲿ'=>'ÙØ­','ï°®'=>'ÙØ­','ï³€'=>'ÙØ®','ï°¯'=>'ÙØ®','ïµ½'=>'Ùخم','ïµ¼'=>'Ùخم','ï³'=>'ÙÙ…','ï°°'=>'ÙÙ…','ï·'=>'Ùمى','ï±¼'=>'ÙÙ‰','ï°±'=>'ÙÙ‰','ï±½'=>'ÙÙ‰','ï°²'=>'ÙÙ‰','ï­¬'=>'Ú¤','ï­­'=>'Ú¤','ï­«'=>'Ú¤','ï­ª'=>'Ú¤','ï­°'=>'Ú¦','ï­±'=>'Ú¦','ï­¯'=>'Ú¦','ï­®'=>'Ú¦','ï»—'=>'Ù‚','ﻘ'=>'Ù‚','ï»–'=>'Ù‚','ﻕ'=>'Ù‚','ﳂ'=>'قح','ï°³'=>'قح','ï·±'=>'قلے','ﳃ'=>'قم','ï°´'=>'قم','ﶴ'=>'قمح','ïµ¾'=>'قمح','ﵿ'=>'قمم','ﶲ'=>'قمى','ï±¾'=>'قى','ï°µ'=>'قى','ﱿ'=>'قى','ï°¶'=>'قى','ï»›'=>'Ùƒ','ﻜ'=>'Ùƒ','ﻚ'=>'Ùƒ','ï»™'=>'Ùƒ','Ú©'=>'Ùƒ','ï®'=>'Ùƒ','ﮑ'=>'Ùƒ','ï®'=>'Ùƒ','ﮎ'=>'Ùƒ','ï²€'=>'كا','ï°·'=>'كا','ﳄ'=>'كج','ï°¸'=>'كج','ï³…'=>'كح','ï°¹'=>'كح','ﳆ'=>'كخ','ï°º'=>'كخ','ﳇ'=>'كل','ﳫ'=>'كل','ï²'=>'كل','ï°»'=>'كل','ﳈ'=>'كم','ﳬ'=>'كم','ﲂ'=>'كم','ï°¼'=>'كم','ï·ƒ'=>'كمم','ﶻ'=>'كمم','ﶷ'=>'كمى','ﲃ'=>'كى','ï°½'=>'كى','ﲄ'=>'كى','ï°¾'=>'كى','ﯕ'=>'Ú­','ﯖ'=>'Ú­','ﯔ'=>'Ú­','ﯓ'=>'Ú­','ï®”'=>'Ú¯','ﮕ'=>'Ú¯','ﮓ'=>'Ú¯','ï®’'=>'Ú¯','ﮜ'=>'Ú±','ï®'=>'Ú±','ï®›'=>'Ú±','ﮚ'=>'Ú±','ﮘ'=>'Ú³','ï®™'=>'Ú³','ï®—'=>'Ú³','ï®–'=>'Ú³','ﻟ'=>'Ù„','ï» '=>'Ù„','ﻞ'=>'Ù„','ï»'=>'Ù„','ﻶ'=>'لآ','ﻵ'=>'لآ','ﻸ'=>'لأ','ï»·'=>'لأ','ﻺ'=>'لإ','ﻹ'=>'لإ','ﻼ'=>'لا','ï»»'=>'لا','ﳉ'=>'لج','ï°¿'=>'لج','ﶃ'=>'لجج','ﶄ'=>'لجج','ﶺ'=>'لجم','ﶼ'=>'لجم','ﶬ'=>'لجى','ﳊ'=>'لح','ï±€'=>'لح','ﶵ'=>'لحم','ﶀ'=>'لحم','ﶂ'=>'لحى','ï¶'=>'لحى','ﳋ'=>'لخ','ï±'=>'لخ','ﶆ'=>'لخم','ﶅ'=>'لخم','ﳌ'=>'لم','ï³­'=>'لم','ï²…'=>'لم','ﱂ'=>'لم','ﶈ'=>'لمح','ﶇ'=>'لمح','ﶭ'=>'لمى','ï³'=>'له','ﲆ'=>'لى','ﱃ'=>'لى','ﲇ'=>'لى','ﱄ'=>'لى','ﻣ'=>'Ù…','ﻤ'=>'Ù…','ﻢ'=>'Ù…','ﻡ'=>'Ù…','ﲈ'=>'ما','ﳎ'=>'مج','ï±…'=>'مج','ﶌ'=>'مجح','ﶒ'=>'مجخ','ï¶'=>'مجم','ï·€'=>'مجى','ï³'=>'مح','ﱆ'=>'مح','ﶉ'=>'محج','ﶊ'=>'محم','ï·´'=>'محمد','ﶋ'=>'محى','ï³'=>'مخ','ﱇ'=>'مخ','ﶎ'=>'مخج','ï¶'=>'مخم','ﶹ'=>'مخى','ﳑ'=>'مم','ﲉ'=>'مم','ﱈ'=>'مم','ﶱ'=>'ممى','ﱉ'=>'مى','ﱊ'=>'مى','ﻧ'=>'Ù†','ﻨ'=>'Ù†','ﻦ'=>'Ù†','ﻥ'=>'Ù†','ï³’'=>'نج','ﱋ'=>'نج','ﶸ'=>'نجح','ﶽ'=>'نجح','ﶘ'=>'نجم','ﶗ'=>'نجم','ﶙ'=>'نجى','ï·‡'=>'نجى','ﳓ'=>'نح','ﱌ'=>'نح','ﶕ'=>'نحم','ﶖ'=>'نحى','ﶳ'=>'نحى','ï³”'=>'نخ','ï±'=>'نخ','ﲊ'=>'نر','ﲋ'=>'نز','ﳕ'=>'نم','ï³®'=>'نم','ﲌ'=>'نم','ﱎ'=>'نم','ﶛ'=>'نمى','ﶚ'=>'نمى','ï²'=>'نن','ï³–'=>'نه','ﳯ'=>'نه','ﲎ'=>'نى','ï±'=>'نى','ï²'=>'نى','ï±'=>'نى','ﮟ'=>'Úº','ﮞ'=>'Úº','ﻫ'=>'Ù‡','ﻬ'=>'Ù‡','ﻪ'=>'Ù‡','ﻩ'=>'Ù‡','Ú¾'=>'Ù‡','ﮬ'=>'Ù‡','ï®­'=>'Ù‡','ﮫ'=>'Ù‡','ﮪ'=>'Ù‡','Û'=>'Ù‡','ﮨ'=>'Ù‡','ﮩ'=>'Ù‡','ﮧ'=>'Ù‡','ﮦ'=>'Ù‡','Û•'=>'Ù‡','ï³™'=>'هٰ','ï³—'=>'هج','ﱑ'=>'هج','ﳘ'=>'هم','ï±’'=>'هم','ﶓ'=>'همج','ﶔ'=>'همم','ﱓ'=>'هى','ï±”'=>'هى','ﮥ'=>'Û€','ﮤ'=>'Û€','ï»®'=>'Ùˆ','ï»­'=>'Ùˆ','ï·¸'=>'وسلم','ﯡ'=>'Û…','ﯠ'=>'Û…','ﯚ'=>'Û†','ﯙ'=>'Û†','ﯘ'=>'Û‡','ﯗ'=>'Û‡','Ù·'=>'Û‡Ù”','ï¯'=>'Û‡Ù”','ﯜ'=>'Ûˆ','ﯛ'=>'Ûˆ','ﯣ'=>'Û‰','ﯢ'=>'Û‰','ﯟ'=>'Û‹','ﯞ'=>'Û‹','ﯨ'=>'Ù‰','ﯩ'=>'Ù‰','ï»°'=>'Ù‰','ﻯ'=>'Ù‰','ÙŠ'=>'Ù‰','ﻳ'=>'Ù‰','ï»´'=>'Ù‰','ﻲ'=>'Ù‰','ï»±'=>'Ù‰','ÛŒ'=>'Ù‰','ﯾ'=>'Ù‰','ﯿ'=>'Ù‰','ﯽ'=>'Ù‰','ﯼ'=>'Ù‰','Ù¸'=>'Ù‰Ù”','ï²'=>'ىٰ','ï±'=>'ىٰ','ﳚ'=>'ىج','ﱕ'=>'ىج','ﶯ'=>'ىجى','ï³›'=>'ىح','ï±–'=>'ىح','ﶮ'=>'ىحى','ﳜ'=>'ىخ','ï±—'=>'ىخ','ﲑ'=>'ىر','ï²’'=>'ىز','ï³'=>'ىم','ï³°'=>'ىم','ﲓ'=>'ىم','ﱘ'=>'ىم','ï¶'=>'ىمم','ﶜ'=>'ىمم','ﶰ'=>'ىمى','ï²”'=>'ىن','ﳞ'=>'ىه','ï³±'=>'ىه','ﲕ'=>'ىى','ï±™'=>'ىى','ï²–'=>'ىى','ﱚ'=>'ىى','Û§'=>'Û¦','ﮯ'=>'Û’','ï®®'=>'Û’','ï®±'=>'Û“','ï®°'=>'Û“','∃'=>'â´º','आ'=>'अा','ऒ'=>'अाॆ','ओ'=>'अाे','औ'=>'अाै','ऄ'=>'अॆ','ऑ'=>'अॉ','à¤'=>'à¤à¥…','ऎ'=>'à¤à¥†','à¤'=>'à¤à¥‡','ई'=>'रà¥à¤‡','আ'=>'অা','ৠ'=>'ঋৃ','ৡ'=>'ঌৢ','ਉ'=>'ੳà©','ਊ'=>'ੳੂ','ਆ'=>'ਅਾ','à¨'=>'ਅੈ','ਔ'=>'ਅੌ','ਇ'=>'ੲਿ','ਈ'=>'ੲੀ','à¨'=>'ੲੇ','આ'=>'અા','ઑ'=>'અાૅ','ઓ'=>'અાે','ઔ'=>'અાૈ','àª'=>'અૅ','àª'=>'અે','àª'=>'અૈ','ଆ'=>'ଅା','௮'=>'à®…','à®°'=>'ஈ','ா'=>'ஈ','௫'=>'ஈà¯','௨'=>'உ','ஊ'=>'உள','௭'=>'எ','௷'=>'எவ','ஜ'=>'à®','௧'=>'க','௪'=>'ச','௬'=>'சà¯','௲'=>'சூ','௺'=>'நீ','ை'=>'ன','௴'=>'மீ','௰'=>'ய','ௗ'=>'ள','௸'=>'à®·','ொ'=>'ெஈ','ௌ'=>'ெள','ோ'=>'ேஈ','à± '=>'à°‹à°¾','ౡ'=>'ఌా','à°”'=>'ఒౌ','à°“'=>'ఒౕ','à°¢'=>'à°¡Ì£','à°­'=>'బ̣','à°·'=>'వ̣','à°¹'=>'వా','à°®'=>'à°µà±','ూ'=>'à±à°¾','ౄ'=>'ృా','ೡ'=>'ಌಾ','ಔ'=>'ఒౌ','à´ˆ'=>'ഇൗ','à´Š'=>'உൗ','à´'=>'എെ','à´“'=>'à´’à´¾','à´”'=>'ഒൗ','ൡ'=>'à´ž','൫'=>'à´¦àµà´°','à´Œ'=>'നூ','à´™'=>'നூ','൯'=>'à´¨àµ','à´±'=>'à´°','൪'=>'à´°àµ','൮'=>'à´µàµ','ീ'=>'ி','ൂ'=>'ூ','ൃ'=>'ூ','ൈ'=>'െെ','ฃ'=>'ข','ด'=>'ค','ต'=>'ค','ม'=>'ฆ','ซ'=>'ช','à¸'=>'ฎ','ท'=>'ฑ','ๅ'=>'า','ำ'=>'̊า','à¹'=>'เเ','ໜ'=>'ຫນ','à»'=>'ຫມ','ຳ'=>'̊າ','ཷ'=>'ྲཱྀ','ཹ'=>'ླཱྀ','á€'=>'o','ឣ'=>'អ','á§'=>'ᦞ','á­’'=>'á¬','á­“'=>'ᬑ','á­˜'=>'ᬨ','ᢖ'=>'á¡œ','á¡•'=>'á µ','á’'=>'Ꭱ','Ꮍ'=>'y','ð€'=>'A','ð´'=>'A','ð‘¨'=>'A','ð’œ'=>'A','ð“'=>'A','ð”„'=>'A','ð”¸'=>'A','ð•¬'=>'A','ð– '=>'A','ð—”'=>'A','ð˜ˆ'=>'A','ð˜¼'=>'A','ð™°'=>'A','ðš¨'=>'A','ð›¢'=>'A','ðœœ'=>'A','ð–'=>'A','ðž'=>'A','ð‰'=>'J','ð½'=>'J','ð‘±'=>'J','ð’¥'=>'J','ð“™'=>'J','ð”'=>'J','ð•'=>'J','ð•µ'=>'J','ð–©'=>'J','ð—'=>'J','ð˜‘'=>'J','ð™…'=>'J','ð™¹'=>'J','á§'=>'J','â‹¿'=>'E','â„°'=>'E','ð„'=>'E','ð¸'=>'E','ð‘¬'=>'E','ð“”'=>'E','ð”ˆ'=>'E','ð”¼'=>'E','ð•°'=>'E','ð–¤'=>'E','ð—˜'=>'E','ð˜Œ'=>'E','ð™€'=>'E','ð™´'=>'E','ðš¬'=>'E','ð›¦'=>'E','ðœ '=>'E','ðš'=>'E','ðž”'=>'E','ℾ'=>'Ꮁ','ðšª'=>'Ꮁ','ð›¤'=>'Ꮁ','ðœž'=>'Ꮁ','ð˜'=>'Ꮁ','ðž’'=>'Ꮁ','á”'=>'w','ℳ'=>'M','ðŒ'=>'M','ð‘€'=>'M','ð‘´'=>'M','ð“œ'=>'M','ð”'=>'M','ð•„'=>'M','ð•¸'=>'M','ð–¬'=>'M','ð— '=>'M','ð˜”'=>'M','ð™ˆ'=>'M','ð™¼'=>'M','ðš³'=>'M','ð›­'=>'M','ðœ§'=>'M','ð¡'=>'M','ðž›'=>'M','â„‹'=>'H','â„Œ'=>'H','â„'=>'H','ð‡'=>'H','ð»'=>'H','ð‘¯'=>'H','ð“—'=>'H','ð•³'=>'H','ð–§'=>'H','ð—›'=>'H','ð˜'=>'H','ð™ƒ'=>'H','ð™·'=>'H','ðš®'=>'H','ð›¨'=>'H','ðœ¢'=>'H','ðœ'=>'H','ðž–'=>'H','ð†'=>'G','ðº'=>'G','ð‘®'=>'G','ð’¢'=>'G','ð“–'=>'G','ð”Š'=>'G','ð”¾'=>'G','ð•²'=>'G','ð–¦'=>'G','ð—š'=>'G','ð˜Ž'=>'G','ð™‚'=>'G','ð™¶'=>'G','á³'=>'G','ℤ'=>'Z','ℨ'=>'Z','ð™'=>'Z','ð‘'=>'Z','ð’'=>'Z','ð’µ'=>'Z','ð“©'=>'Z','ð–…'=>'Z','ð–¹'=>'Z','ð—­'=>'Z','ð˜¡'=>'Z','ð™•'=>'Z','ðš‰'=>'Z','ðš­'=>'Z','ð›§'=>'Z','ðœ¡'=>'Z','ð›'=>'Z','ðž•'=>'Z','ð’'=>'S','ð‘†'=>'S','ð‘º'=>'S','ð’®'=>'S','ð“¢'=>'S','ð”–'=>'S','ð•Š'=>'S','ð•¾'=>'S','ð–²'=>'S','ð—¦'=>'S','ð˜š'=>'S','ð™Ž'=>'S','ðš‚'=>'S','áš'=>'S','ð•'=>'V','ð‘‰'=>'V','ð‘½'=>'V','ð’±'=>'V','ð“¥'=>'V','ð”™'=>'V','ð•'=>'V','ð–'=>'V','ð–µ'=>'V','ð—©'=>'V','ð˜'=>'V','ð™‘'=>'V','ðš…'=>'V','â„’'=>'L','ð‹'=>'L','ð¿'=>'L','ð‘³'=>'L','ð“›'=>'L','ð”'=>'L','ð•ƒ'=>'L','ð•·'=>'L','ð–«'=>'L','ð—Ÿ'=>'L','ð˜“'=>'L','ð™‡'=>'L','ð™»'=>'L','∑'=>'C','â…€'=>'C','â„‚'=>'C','â„­'=>'C','ð‚'=>'C','ð¶'=>'C','ð‘ª'=>'C','ð’ž'=>'C','ð“’'=>'C','ð•®'=>'C','ð–¢'=>'C','ð—–'=>'C','ð˜Š'=>'C','ð˜¾'=>'C','ð™²'=>'C','ðšº'=>'C','ð›´'=>'C','ðœ®'=>'C','ð¨'=>'C','ðž¢'=>'C','â„™'=>'P','ð'=>'P','ð‘ƒ'=>'P','ð‘·'=>'P','ð’«'=>'P','ð“Ÿ'=>'P','ð”“'=>'P','ð•»'=>'P','ð–¯'=>'P','ð—£'=>'P','ð˜—'=>'P','ð™‹'=>'P','ð™¿'=>'P','ðš¸'=>'P','ð›²'=>'P','ðœ¬'=>'P','ð¦'=>'P','ðž '=>'P','ðŠ'=>'K','ð¾'=>'K','ð‘²'=>'K','ð’¦'=>'K','ð“š'=>'K','ð”Ž'=>'K','ð•‚'=>'K','ð•¶'=>'K','ð–ª'=>'K','ð—ž'=>'K','ð˜’'=>'K','ð™†'=>'K','ð™º'=>'K','ðš±'=>'K','ð›«'=>'K','ðœ¥'=>'K','ðŸ'=>'K','ðž™'=>'K','ℬ'=>'B','ð'=>'B','ðµ'=>'B','ð‘©'=>'B','ð“‘'=>'B','ð”…'=>'B','ð”¹'=>'B','ð•­'=>'B','ð–¡'=>'B','ð—•'=>'B','ð˜‰'=>'B','ð˜½'=>'B','ð™±'=>'B','ðš©'=>'B','ð›£'=>'B','ðœ'=>'B','ð—'=>'B','ðž‘'=>'B','á'=>'á·','∆'=>'áƒ','ðš«'=>'áƒ','ð›¥'=>'áƒ','ðœŸ'=>'áƒ','ð™'=>'áƒ','ðž“'=>'áƒ','á'=>'áƒÂ·','á‘'=>'á„·','á“'=>'á…·','á•'=>'á†Â·','á˜'=>'áŠÂ·','áš'=>'á‹Â·','á“‘'=>'á¡','ᑶ'=>'·P','ᑺ'=>'·d','á’˜'=>'·J','á‘'=>'á³Â·','ᑃ'=>'á´Â·','á‘…'=>'á¸Â·','ᑇ'=>'á¹Â·','ˈ'=>'á‘Š','ᑘ'=>'ᑌ·','ᑧ'=>'ᑌᑊ','á‘š'=>'ᑎ·','ᑨ'=>'á‘Žá‘Š','á‘œ'=>'á‘·','á‘ž'=>'á‘·','á‘©'=>'á‘á‘Š','á‘ '=>'ᑑ·','á‘¢'=>'ᑕ·','ᑪ'=>'á‘•á‘Š','ᑤ'=>'ᑖ·','ᑵ'=>'ᑫ·','á’…'=>'á‘«á‘Š','á‘·'=>'P·','á’†'=>'Pá‘Š','ᑹ'=>'ᑮ·','á‘»'=>'d·','á’‡'=>'dá‘Š','ᑽ'=>'ᑰ·','á‘¿'=>'ᑲ·','á’ˆ'=>'ᑲᑊ','á’'=>'ᑳ·','ᘃ'=>'á’‰','á’“'=>'ᒉ·','á’•'=>'ᒋ·','á’—'=>'ᒌ·','á’™'=>'J·','á’›'=>'ᒎ·','ᘂ'=>'á’','á’'=>'á’·','á’Ÿ'=>'ᒑ·','á’­'=>'ᒣ·','á’¯'=>'ᒥ·','á’±'=>'ᒦ·','á’³'=>'ᒧ·','á’µ'=>'ᒨ·','á’¹'=>'ᒫ·','á“Š'=>'ᓀ·','á“Œ'=>'ᓇ·','á“Ž'=>'ᓈᒫ','ᘄ'=>'á““','á“'=>'ᓓ·','á“Ÿ'=>'ᓕ·','á“¡'=>'ᓖ·','á“£'=>'ᓗ·','á“¥'=>'ᓘ·','ᘇ'=>'á“š','ᓧ'=>'ᓚ·','á“©'=>'ᓛ·','á“·'=>'ᓭ·','ᓹ'=>'ᓯ·','á“»'=>'ᓰ·','ᓽ'=>'ᓱ·','á“¿'=>'ᓲ·','á”'=>'ᓴ·','ᔃ'=>'ᓵ·','ᔌ'=>'ᔋá¸','á”'=>'ᔋᑕ','ᔎ'=>'ᔋᑲ','á”'=>'ᔋá’','ᔘ'=>'á”·','ᔚ'=>'ᔑ·','ᔜ'=>'ᔒ·','ᔞ'=>'ᔓ·','á” '=>'ᔔ·','ᔢ'=>'ᔕ·','ᔤ'=>'ᔖ·','ᔲ'=>'ᔨ·','á”´'=>'ᔩ·','ᔶ'=>'ᔪ·','ᔸ'=>'ᔫ·','ᔺ'=>'ᔭ·','ᔼ'=>'ᔮ·','á™®'=>'x','ᕽ'=>'x','ᘢ'=>'ᕃ','ᘣ'=>'ᕆ','ᘤ'=>'á•Š','á•'=>'ᕌ·','ᙯ'=>'á•á‘«','ᕾ'=>'á•á‘¬','á•¿'=>'á•P','á–€'=>'á•á‘®','á–'=>'á•d','á–‚'=>'á•á‘°','á–ƒ'=>'á•á‘²','á–„'=>'á•á‘³','á–…'=>'á•á’ƒ','á•œ'=>'ᕚ·','á•©'=>'ᕧ·','â„›'=>'R','â„œ'=>'R','â„'=>'R','ð‘'=>'R','ð‘…'=>'R','ð‘¹'=>'R','ð“¡'=>'R','ð•½'=>'R','ð–±'=>'R','ð—¥'=>'R','ð˜™'=>'R','ð™'=>'R','ðš'=>'R','á™°'=>'á–•á’‰','á–Ž'=>'á–•á’Š','á–'=>'á–•á’‹','á–'=>'á–•á’Œ','á–‘'=>'á–•J','á–’'=>'á–•á’Ž','á–“'=>'á–•á’','á–”'=>'á–•á’‘','á™±'=>'á––á’‹','ᙲ'=>'á––á’Œ','ᙳ'=>'á––J','á™´'=>'á––á’Ž','ᙵ'=>'á––á’','ᙶ'=>'á––á’‘','ℱ'=>'F','ð…'=>'F','ð¹'=>'F','ð‘­'=>'F','ð“•'=>'F','ð”‰'=>'F','ð”½'=>'F','ð•±'=>'F','ð–¥'=>'F','ð—™'=>'F','ð˜'=>'F','ð™'=>'F','ð™µ'=>'F','ðŸŠ'=>'F','â……'=>'D','ðƒ'=>'D','ð·'=>'D','ð‘«'=>'D','ð’Ÿ'=>'D','ð““'=>'D','ð”‡'=>'D','ð”»'=>'D','ð•¯'=>'D','ð–£'=>'D','ð——'=>'D','ð˜‹'=>'D','ð˜¿'=>'D','ð™³'=>'D','á—ª'=>'D','℧'=>'ᘮ','ᘴ'=>'ᘮ','ð›€'=>'ᘯ','ð›º'=>'ᘯ','ðœ´'=>'ᘯ','ð®'=>'ᘯ','ðž¨'=>'ᘯ','ᘵ'=>'ᘯ','ㄱ'=>'á„€','ᄀ'=>'á„€','ᆨ'=>'á„€','ㄲ'=>'á„','ï¾¢'=>'á„','ᆩ'=>'á„','ã„´'=>'á„‚','ᄂ'=>'á„‚','ᆫ'=>'á„‚','ã„·'=>'ᄃ','ᄃ'=>'ᄃ','ᆮ'=>'ᄃ','ㄸ'=>'á„„','ᄄ'=>'á„„','ㄹ'=>'á„…','ᄅ'=>'á„…','ᆯ'=>'á„…','ã…'=>'ᄆ','ï¾±'=>'ᄆ','ᆷ'=>'ᄆ','ã…‚'=>'ᄇ','ï¾²'=>'ᄇ','ᆸ'=>'ᄇ','ã…ƒ'=>'ᄈ','ï¾³'=>'ᄈ','ã……'=>'ᄉ','ï¾µ'=>'ᄉ','ᆺ'=>'ᄉ','ã…†'=>'á„Š','ᄊ'=>'á„Š','ᆻ'=>'á„Š','ã…‡'=>'á„‹','ï¾·'=>'á„‹','ᆼ'=>'á„‹','ã…ˆ'=>'á„Œ','ᄌ'=>'á„Œ','ᆽ'=>'á„Œ','ã…‰'=>'á„','ï¾¹'=>'á„','ã…Š'=>'á„Ž','ᄎ'=>'á„Ž','ᆾ'=>'á„Ž','ã…‹'=>'á„','ï¾»'=>'á„','ᆿ'=>'á„','ã…Œ'=>'á„','ï¾¼'=>'á„','ᇀ'=>'á„','ã…'=>'á„‘','ï¾½'=>'á„‘','á‡'=>'á„‘','ã…Ž'=>'á„’','ï¾¾'=>'á„’','ᇂ'=>'á„’','ᇅ'=>'á„“','ã…¥'=>'á„”','ã…¦'=>'á„•','ᇆ'=>'á„•','ᇊ'=>'á„—','á‡'=>'ᄘ','á‡'=>'á„™','ã…€'=>'á„š','ï¾°'=>'á„š','á„»'=>'á„š','ᆶ'=>'á„š','ã…®'=>'á„œ','ᇜ'=>'á„œ','ã…±'=>'á„','ᇢ'=>'á„','ã…²'=>'á„ž','ã…³'=>'á„ ','ã…„'=>'á„¡','ï¾´'=>'á„¡','ᆹ'=>'á„¡','ã…´'=>'á„¢','ã…µ'=>'á„£','ã…¶'=>'ᄧ','ã…·'=>'á„©','ã…¸'=>'á„«','ᇦ'=>'á„«','ã…¹'=>'ᄬ','ã…º'=>'á„­','ᇧ'=>'á„­','ã…»'=>'á„®','ã…¼'=>'ᄯ','ᇨ'=>'ᄯ','ᇩ'=>'á„°','ã…½'=>'ᄲ','ᇪ'=>'ᄲ','ã…¾'=>'ᄶ','ã…¿'=>'á…€','ᇫ'=>'á…€','ᇬ'=>'á…','ᇱ'=>'á……','ㆂ'=>'á……','ᇲ'=>'á…†','ㆃ'=>'á…†','ㆀ'=>'á…‡','ᇮ'=>'á…‡','ã†'=>'á…Œ','ᇰ'=>'á…Œ','ᇳ'=>'á…–','ㆄ'=>'á…—','ᇴ'=>'á…—','ㆅ'=>'á…˜','ㆆ'=>'á…™','ᇹ'=>'á…™','ã…¤'=>'á… ','ï¾ '=>'á… ','ã…'=>'á…¡','ï¿‚'=>'á…¡','ã…'=>'á…¢','ᅢ'=>'á…¢','ã…‘'=>'á…£','ï¿„'=>'á…£','ã…’'=>'á…¤','ï¿…'=>'á…¤','ã…“'=>'á…¥','ᅥ'=>'á…¥','ã…”'=>'á…¦','ᅦ'=>'á…¦','ã…•'=>'á…§','ï¿Š'=>'á…§','ã…–'=>'á…¨','ï¿‹'=>'á…¨','ã…—'=>'á…©','ï¿Œ'=>'á…©','ã…˜'=>'á…ª','ï¿'=>'á…ª','ã…™'=>'á…«','ï¿Ž'=>'á…«','ã…š'=>'á…¬','ï¿'=>'á…¬','ã…›'=>'á…­','ï¿’'=>'á…­','ã…œ'=>'á…®','ï¿“'=>'á…®','ã…'=>'á…¯','ï¿”'=>'á…¯','ã…ž'=>'á…°','ï¿•'=>'á…°','ã…Ÿ'=>'á…±','ï¿–'=>'á…±','ã… '=>'á…²','ï¿—'=>'á…²','ã…¡'=>'一','ï¿š'=>'一','ã…¢'=>'á…´','ï¿›'=>'á…´','ã…£'=>'丨','ï¿œ'=>'丨','ㆇ'=>'ᆄ','ᆆ'=>'ᆄ','ㆈ'=>'ᆅ','ㆉ'=>'ᆈ','ㆊ'=>'ᆑ','ㆋ'=>'ᆒ','ㆌ'=>'ᆔ','ã†'=>'ᆞ','ㆎ'=>'ᆡ','ㄳ'=>'ᆪ','ï¾£'=>'ᆪ','ㄵ'=>'ᆬ','ï¾¥'=>'ᆬ','ㄶ'=>'ᆭ','ᆭ'=>'ᆭ','ㄺ'=>'ᆰ','ᆰ'=>'ᆰ','ã„»'=>'ᆱ','ᆱ'=>'ᆱ','ㄼ'=>'ᆲ','ᆲ'=>'ᆲ','ㄽ'=>'ᆳ','ï¾­'=>'ᆳ','ㄾ'=>'ᆴ','ï¾®'=>'ᆴ','ã„¿'=>'ᆵ','ᆵ'=>'ᆵ','ã…§'=>'ᇇ','ã…¨'=>'ᇈ','ã…©'=>'ᇌ','ã…ª'=>'ᇎ','ã…«'=>'ᇓ','ã…¬'=>'ᇗ','ã…­'=>'ᇙ','ã…¯'=>'á‡','ã…°'=>'ᇟ','ァ'=>'ã‚¡','ï½±'=>'ã‚¢','ィ'=>'ã‚£','ï½²'=>'イ','ゥ'=>'ã‚¥','ï½³'=>'ウ','ェ'=>'ェ','ï½´'=>'エ','ォ'=>'ã‚©','ï½µ'=>'オ','カ'=>'ã‚«','ï½·'=>'ã‚­','ク'=>'ク','ï½¹'=>'ケ','コ'=>'コ','ï½»'=>'サ','ï½¼'=>'ã‚·','ï½½'=>'ス','ï½¾'=>'ã‚»','ソ'=>'ソ','ï¾€'=>'ã‚¿','ï¾'=>'ãƒ','ッ'=>'ッ','ツ'=>'ツ','テ'=>'テ','ト'=>'ト','ï¾…'=>'ナ','ニ'=>'ニ','ヌ'=>'ヌ','ネ'=>'ãƒ','ノ'=>'ノ','ハ'=>'ãƒ','ヒ'=>'ヒ','フ'=>'フ','ï¾'=>'ã¸','ホ'=>'ホ','ï¾'=>'マ','⧄'=>'〼','ï¾'=>'ミ','ム'=>'ム','ï¾’'=>'メ','モ'=>'モ','ャ'=>'ャ','ï¾”'=>'ヤ','ï½­'=>'ュ','ユ'=>'ユ','ï½®'=>'ョ','ï¾–'=>'ヨ','ï¾—'=>'ラ','リ'=>'リ','ï¾™'=>'ル','レ'=>'レ','ï¾›'=>'ロ','ワ'=>'ワ','ヲ'=>'ヲ','ï¾'=>'ン','ê’ž'=>'êŠ','ê’¬'=>'ê','ê’œ'=>'ꃀ','ê’¿'=>'ꉙ','ê’¾'=>'ꊱ','ê“€'=>'ꎫ','ê“‚'=>'ꎵ','ê’º'=>'ꎿ','ê’°'=>'ê‚','ð’ '=>'ð’†','—'=>'一','―'=>'一','−'=>'一','─'=>'一','â¼€'=>'一','不'=>'ä¸','ï©°'=>'並','|'=>'丨','|'=>'丨','∣'=>'丨','â¼'=>'丨','‖'=>'丨丨','∥'=>'丨丨','串'=>'串','⼂'=>'丶','ð¯ '=>'丸','丹'=>'丹','丽'=>'丽','⼃'=>'丿','乁'=>'ä¹','⼄'=>'ä¹™','亂'=>'亂','â¼…'=>'亅','了'=>'了','⼆'=>'二','⼇'=>'亠','亮'=>'亮','⼈'=>'人','什'=>'什','仌'=>'仌','令'=>'令','你'=>'ä½ ','倂'=>'ä½µ','倂'=>'ä½µ','侀'=>'ä¾€','來'=>'來','例'=>'例','侮'=>'ä¾®','侮'=>'ä¾®','侻'=>'ä¾»','便'=>'便','值'=>'値','倫'=>'倫','偺'=>'åº','備'=>'å‚™','像'=>'åƒ','僚'=>'僚','僧'=>'僧','僧'=>'僧','⼉'=>'å„¿','兀'=>'å…€','ï©´'=>'å……','免'=>'å…','免'=>'å…','ð¯ '=>'å…”','ð¯ '=>'å…¤','⼊'=>'å…¥','內'=>'å…§','全'=>'å…¨','兩'=>'å…©','⼋'=>'å…«','六'=>'å…­','具'=>'å…·','冀'=>'冀','⼌'=>'冂','再'=>'å†','冒'=>'冒','冕'=>'冕','â¼'=>'冖','冗'=>'冗','冤'=>'冤','⼎'=>'冫','冬'=>'冬','况'=>'况','况'=>'况','冷'=>'冷','凉'=>'凉','凌'=>'凌','凜'=>'凜','凞'=>'凞','â¼'=>'几','ð¯ '=>'凵','â¼'=>'凵','⼑'=>'刀','刃'=>'刃','切'=>'切','ð¯¡'=>'切','列'=>'列','ï§'=>'利','刺'=>'刺','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','劉'=>'劉','力'=>'力','â¼’'=>'力','ï¦'=>'劣','劳'=>'劳','勇'=>'勇','勇'=>'勇','勉'=>'勉','勉'=>'勉','勒'=>'å‹’','勞'=>'å‹ž','勤'=>'勤','勤'=>'勤','勵'=>'勵','⼓'=>'勹','ï©·'=>'勺','勺'=>'勺','包'=>'包','匆'=>'匆','â¼”'=>'匕','北'=>'北','北'=>'北','⼕'=>'匚','â¼–'=>'匸','匿'=>'匿','â¼—'=>'å','〸'=>'å','〹'=>'å„','〺'=>'å…','卉'=>'å‰','卑'=>'å‘','卑'=>'å‘','博'=>'åš','⼘'=>'åœ','â¼™'=>'å©','即'=>'å³','卵'=>'åµ','卽'=>'å½','卿'=>'å¿','卿'=>'å¿','卿'=>'å¿','⼚'=>'厂','â¼›'=>'厶','參'=>'åƒ','⼜'=>'åˆ','及'=>'åŠ','叟'=>'åŸ','â¼'=>'å£','句'=>'å¥','叫'=>'å«','叱'=>'å±','吆'=>'å†','吏'=>'å','吝'=>'å','吸'=>'å¸','呂'=>'å‘‚','呈'=>'呈','周'=>'周','咞'=>'å’ž','咢'=>'å’¢','咽'=>'å’½','ð¯¡'=>'哶','唐'=>'å”','啓'=>'å•“','å•Ÿ'=>'å•“','啕'=>'å••','啣'=>'å•£','善'=>'å–„','善'=>'å–„','喇'=>'å–‡','喙'=>'å–™','喙'=>'å–™','喝'=>'å–','喝'=>'å–','喫'=>'å–«','喳'=>'å–³','ï¨'=>'å—€','嗂'=>'å—‚','ï©»'=>'å—¢','嘆'=>'嘆','嘆'=>'嘆','噑'=>'噑','器'=>'器','ð¯¡'=>'å™´','⼞'=>'å›—','囹'=>'囹','圖'=>'圖','ð¯¡'=>'圗','⼟'=>'土','型'=>'åž‹','城'=>'城','埴'=>'埴','堍'=>'å ','報'=>'å ±','堲'=>'å ²','塀'=>'å¡€','ï¨'=>'å¡š','塚'=>'å¡š','塞'=>'å¡ž','å¡«'=>'å¡¡','墨'=>'墨','壿'=>'墫','墬'=>'墬','墳'=>'墳','壘'=>'壘','壟'=>'壟','â¼ '=>'士','壮'=>'壮','売'=>'売','壷'=>'壷','⼡'=>'夂','夆'=>'夆','â¼¢'=>'夊','â¼£'=>'夕','ð¯¡'=>'多','夢'=>'夢','⼤'=>'大','奄'=>'奄','奈'=>'奈','契'=>'契','ï©¿'=>'奔','奢'=>'奢','ï¦'=>'女','â¼¥'=>'女','姘'=>'姘','姬'=>'姬','娛'=>'娛','娧'=>'娧','婢'=>'å©¢','婦'=>'婦','嬀'=>'媯','媵'=>'媵','嬈'=>'嬈','ïª'=>'嬨','嬾'=>'嬾','嬾'=>'嬾','⼦'=>'å­','⼧'=>'宀','宅'=>'å®…','寃'=>'寃','寘'=>'寘','寧'=>'寧','寧'=>'寧','寧'=>'寧','寮'=>'寮','寳'=>'寳','⼨'=>'寸','寿'=>'寿','将'=>'å°†','⼩'=>'å°','尢'=>'å°¢','⼪'=>'å°¢','⼫'=>'å°¸','尿'=>'å°¿','屠'=>'å± ','屢'=>'å±¢','層'=>'層','履'=>'å±¥','屮'=>'å±®','屮'=>'å±®','⼬'=>'å±®','â¼­'=>'å±±','岍'=>'å²','峀'=>'å³€','崙'=>'å´™','嵃'=>'嵃','嵐'=>'åµ','嵫'=>'嵫','嵮'=>'åµ®','嵼'=>'åµ¼','嶲'=>'嶲','嶺'=>'嶺','â¼®'=>'å·›','ð¯¢'=>'å·¡','巢'=>'å·¢','⼯'=>'å·¥','â¼°'=>'å·±','巽'=>'å·½','â¼±'=>'å·¾','帲'=>'帡','帨'=>'帨','帽'=>'帽','幩'=>'幩','â¼²'=>'å¹²','年'=>'å¹´','â¼³'=>'幺','â¼´'=>'广','ï¨'=>'度','庰'=>'庰','庳'=>'庳','ð¯¢'=>'庶','廉'=>'廉','廊'=>'廊','廊'=>'廊','廒'=>'å»’','廓'=>'廓','廙'=>'å»™','廬'=>'廬','â¼µ'=>'å»´','ð¯¢'=>'廾','⼶'=>'廾','弄'=>'弄','â¼·'=>'弋','⼸'=>'弓','弢'=>'å¼¢','弢'=>'å¼¢','â¼¹'=>'å½','当'=>'当','⼺'=>'彡','形'=>'å½¢','彩'=>'彩','彫'=>'彫','â¼»'=>'å½³','律'=>'律','徚'=>'徚','復'=>'復','徭'=>'å¾­','â¼¼'=>'心','ð¯¢'=>'å¿','志'=>'å¿—','念'=>'念','忹'=>'忹','怒'=>'怒','怜'=>'怜','悁'=>'æ‚','悔'=>'æ‚”','悔'=>'æ‚”','惇'=>'惇','惘'=>'惘','惡'=>'惡','愈'=>'愈','慄'=>'æ…„','慈'=>'æ…ˆ','慌'=>'æ…Œ','慌'=>'æ…Œ','慎'=>'æ…Ž','慎'=>'æ…Ž','慠'=>'æ… ','慨'=>'æ…¨','慺'=>'æ…º','憎'=>'憎','憎'=>'憎','憎'=>'憎','ï¦'=>'æ†','憤'=>'憤','憯'=>'憯','憲'=>'憲','懞'=>'懞','ï©€'=>'懲','懲'=>'懲','懲'=>'懲','ï¤'=>'懶','懶'=>'懶','ï¦'=>'戀','â¼½'=>'戈','成'=>'æˆ','戛'=>'戛','戮'=>'戮','戴'=>'戴','â¼¾'=>'戶','⼿'=>'手','扝'=>'æ‰','抱'=>'抱','拉'=>'拉','拏'=>'æ‹','拓'=>'æ‹“','拔'=>'æ‹”','拼'=>'拼','拾'=>'拾','挽'=>'挽','捐'=>'æ','捨'=>'æ¨','捻'=>'æ»','掃'=>'掃','掠'=>'掠','ð¯£'=>'掩','ïª'=>'æ„','揅'=>'æ…','揤'=>'æ¤','ã©'=>'æ‰','搜'=>'æœ','搢'=>'æ¢','ïª'=>'æ‘’','摩'=>'æ‘©','摷'=>'æ‘·','摾'=>'摾','撚'=>'æ’š','撝'=>'æ’','擄'=>'æ“„','â½€'=>'支','â½'=>'æ”´','ï©'=>'æ•','敏'=>'æ•','ïª'=>'æ•–','敬'=>'敬','數'=>'數','⽂'=>'æ–‡','⽃'=>'æ–—','料'=>'æ–™','⽄'=>'æ–¤','â½…'=>'æ–¹','旅'=>'æ—…','⽆'=>'æ— ','ï©‚'=>'æ—¢','旣'=>'æ—£','⽇'=>'æ—¥','易'=>'易','ð¯£'=>'晉','晩'=>'晚','䀿'=>'晣','晴'=>'æ™´','晴'=>'æ™´','暈'=>'暈','暑'=>'æš‘','ð¯£'=>'æš‘','暜'=>'æšœ','暴'=>'æš´','曆'=>'曆','⽈'=>'æ›°','ï¤'=>'æ›´','ã«š'=>'曶','書'=>'書','最'=>'最','⽉'=>'月','肦'=>'朌','èƒ'=>'æœ','胊'=>'æœ','è„'=>'朓','朗'=>'朗','朗'=>'朗','朗'=>'朗','脧'=>'朘','望'=>'望','望'=>'望','朡'=>'朡','膧'=>'朣','⽊'=>'木','李'=>'æŽ','杓'=>'æ“','杖'=>'æ–','杞'=>'æž','柿'=>'æ®','杻'=>'æ»','枅'=>'æž…','林'=>'æž—','柳'=>'柳','柺'=>'柺','栗'=>'æ —','栟'=>'æ Ÿ','桒'=>'æ¡’','梁'=>'æ¢','ï©„'=>'梅','梅'=>'梅','梎'=>'梎','梨'=>'梨','椔'=>'椔','楂'=>'楂','樧'=>'æ¦','榣'=>'榣','槪'=>'槪','樂'=>'樂','樂'=>'樂','樂'=>'樂','樓'=>'樓','檨'=>'檨','櫓'=>'æ«“','櫛'=>'æ«›','ï¤'=>'欄','⽋'=>'欠','次'=>'次','歔'=>'æ­”','⽌'=>'æ­¢','歲'=>'æ­²','歷'=>'æ­·','歹'=>'æ­¹','â½'=>'æ­¹','殟'=>'殟','殮'=>'æ®®','⽎'=>'殳','殺'=>'殺','殺'=>'殺','殺'=>'殺','殻'=>'æ®»','â½'=>'毋','⺟'=>'æ¯','â½'=>'比','⽑'=>'毛','â½’'=>'æ°','⽓'=>'æ°”','â½”'=>'æ°´','汎'=>'汎','汧'=>'汧','沈'=>'沈','沿'=>'沿','泌'=>'泌','泍'=>'æ³','泥'=>'æ³¥','洖'=>'æ´–','洛'=>'æ´›','洞'=>'æ´ž','洴'=>'æ´´','派'=>'æ´¾','流'=>'æµ','流'=>'æµ','流'=>'æµ','浩'=>'浩','浪'=>'浪','ï©…'=>'æµ·','ð¯¤'=>'æµ·','浸'=>'浸','涅'=>'涅','淋'=>'æ·‹','ï¥'=>'æ·š','淪'=>'æ·ª','淹'=>'æ·¹','渚'=>'渚','港'=>'港','湮'=>'æ¹®','æ½™'=>'溈','溜'=>'溜','溺'=>'溺','滇'=>'滇','滋'=>'滋','滋'=>'滋','滑'=>'滑','滛'=>'æ»›','漏'=>'æ¼','漢'=>'æ¼¢','漢'=>'æ¼¢','漣'=>'æ¼£','ð¯¤'=>'æ½®','濆'=>'濆','濫'=>'æ¿«','濾'=>'濾','瀛'=>'瀛','瀞'=>'瀞','瀞'=>'瀞','瀹'=>'瀹','灊'=>'çŠ','⽕'=>'ç«','灰'=>'ç°','灷'=>'ç·','災'=>'ç½','炙'=>'ç‚™','炭'=>'ç‚­','烈'=>'烈','烙'=>'烙','煅'=>'ç……','煉'=>'ç…‰','煮'=>'ç…®','煮'=>'ç…®','熜'=>'熜','燎'=>'燎','燐'=>'ç‡','爐'=>'çˆ','爛'=>'爛','爨'=>'爨','â½–'=>'爪','爫'=>'爫','⺤'=>'爫','爵'=>'爵','爵'=>'爵','â½—'=>'父','⽘'=>'爻','â½™'=>'爿','⽚'=>'片','牐'=>'ç‰','â½›'=>'牙','⽜'=>'牛','牢'=>'牢','犀'=>'犀','犕'=>'犕','â½'=>'犬','犯'=>'犯','狀'=>'ç‹€','狼'=>'狼','猪'=>'猪','猪'=>'猪','獵'=>'çµ','獺'=>'çº','⽞'=>'玄','率'=>'率','率'=>'率','⽟'=>'玉','王'=>'王','玥'=>'玥','玲'=>'玲','珞'=>'çž','理'=>'ç†','琉'=>'ç‰','ï©Š'=>'ç¢','瑇'=>'瑇','瑜'=>'ç‘œ','瑩'=>'ç‘©','瑱'=>'瑱','瑱'=>'瑱','璅'=>'ç’…','璉'=>'ç’‰','璘'=>'ç’˜','瓊'=>'ç“Š','â½ '=>'ç“œ','⽡'=>'瓦','甆'=>'甆','â½¢'=>'甘','â½£'=>'生','甤'=>'甤','⽤'=>'用','â½¥'=>'ç”°','画'=>'ç”»','甾'=>'甾','ï§'=>'ç•™','略'=>'ç•¥','異'=>'ç•°','異'=>'ç•°','⽦'=>'ç–‹','⽧'=>'ç–’','痢'=>'ç—¢','瘐'=>'ç˜','瘝'=>'ç˜','瘟'=>'瘟','ï§'=>'療','癩'=>'癩','⽨'=>'癶','⽩'=>'白','⽪'=>'çš®','⽫'=>'çš¿','益'=>'益','益'=>'益','盛'=>'ç››','盧'=>'盧','⽬'=>'ç›®','直'=>'ç›´','直'=>'ç›´','省'=>'çœ','眞'=>'眞','真'=>'真','真'=>'真','着'=>'ç€','睊'=>'çŠ','睊'=>'çŠ','瞋'=>'çž‹','ïª'=>'瞧','â½­'=>'矛','â½®'=>'矢','⽯'=>'石','ç¡'=>'ç ”','硎'=>'ç¡Ž','硫'=>'ç¡«','碌'=>'碌','ð¯¥'=>'碌','ï©‹'=>'碑','磊'=>'磊','磌'=>'磌','ð¯¥'=>'磌','磻'=>'磻','礪'=>'礪','â½°'=>'示','礼'=>'礼','ï©Œ'=>'社','ï©Ž'=>'祈','ï©'=>'祉','ï©'=>'ç¥','ï©'=>'祖','祖'=>'祖','ï©‘'=>'ç¥','神'=>'神','祥'=>'祥','祿'=>'祿','ï©’'=>'ç¦','ï©“'=>'禎','福'=>'ç¦','福'=>'ç¦','禮'=>'禮','â½±'=>'禸','â½²'=>'禾','秊'=>'秊','秫'=>'秫','稜'=>'稜','ï©”'=>'ç©€','穀'=>'ç©€','穊'=>'ç©Š','穏'=>'ç©','â½³'=>'ç©´','ï©•'=>'çª','窱'=>'窱','立'=>'ç«‹','â½´'=>'ç«‹','竮'=>'ç«®','â½µ'=>'竹','笠'=>'笠','ï©–'=>'節','節'=>'節','篆'=>'篆','築'=>'築','簾'=>'ç°¾','籠'=>'ç± ','⽶'=>'ç±³','类'=>'ç±»','粒'=>'ç²’','ï¨'=>'ç²¾','糒'=>'ç³’','糖'=>'ç³–','糣'=>'ç³£','糧'=>'糧','糨'=>'糨','â½·'=>'糸','紀'=>'ç´€','ï§'=>'ç´','索'=>'ç´¢','ï¥'=>'ç´¯','絶'=>'絕','絛'=>'çµ›','絣'=>'çµ£','綠'=>'綠','綾'=>'綾','緇'=>'ç·‡','練'=>'ç·´','ï©—'=>'ç·´','練'=>'ç·´','縂'=>'縂','縉'=>'縉','ï¥'=>'縷','ï©™'=>'ç¹','繅'=>'ç¹…','⽸'=>'缶','缾'=>'ç¼¾','â½¹'=>'网','⺫'=>'ç½’','ï©š'=>'ç½²','罹'=>'ç½¹','罺'=>'罺','ï¤'=>'ç¾…','⽺'=>'羊','羕'=>'羕','羚'=>'羚','羽'=>'ç¾½','â½»'=>'ç¾½','翺'=>'翺','老'=>'è€','â½¼'=>'è€','ï©›'=>'者','者'=>'者','者'=>'者','â½½'=>'而','â½¾'=>'耒','⽿'=>'耳','聆'=>'è†','聠'=>'è ','聯'=>'è¯','聰'=>'è°','聾'=>'è¾','â¾€'=>'è¿','â¾'=>'肉','肋'=>'è‚‹','肭'=>'è‚­','育'=>'育','㬵'=>'胶','è…'=>'胼','脃'=>'脃','脾'=>'脾','臘'=>'臘','⾂'=>'臣','臨'=>'臨','⾃'=>'自','ï©œ'=>'臭','⾄'=>'至','â¾…'=>'臼','舁'=>'èˆ','舁'=>'èˆ','舄'=>'舄','⾆'=>'舌','⾇'=>'舛','⾈'=>'舟','⾉'=>'艮','良'=>'良','⾊'=>'色','⾋'=>'艸','ï©'=>'艹','ï©ž'=>'艹','ð¯¦'=>'芋','ð¯¦'=>'芑','芝'=>'èŠ','花'=>'花','芳'=>'芳','芽'=>'芽','若'=>'è‹¥','若'=>'è‹¥','苦'=>'苦','茝'=>'èŒ','茣'=>'茣','茶'=>'茶','荒'=>'è’','荓'=>'è“','荣'=>'è£','莭'=>'莭','ð¯¦'=>'莽','菉'=>'è‰','菊'=>'èŠ','菌'=>'èŒ','菜'=>'èœ','菧'=>'è§','華'=>'è¯','菱'=>'è±','落'=>'è½','葉'=>'葉','ï©Ÿ'=>'è‘—','著'=>'è‘—','蔿'=>'è’','蓮'=>'è“®','蓱'=>'蓱','蓳'=>'蓳','蓼'=>'蓼','蔖'=>'è”–','蕤'=>'蕤','藍'=>'è—','藺'=>'è—º','蘆'=>'蘆','蘒'=>'蘒','蘭'=>'蘭','è™'=>'蘷','ï¤'=>'蘿','⾌'=>'è™','虐'=>'è™','虜'=>'虜','虜'=>'虜','虧'=>'虧','虩'=>'虩','â¾'=>'虫','蚈'=>'蚈','蚩'=>'èš©','蛢'=>'蛢','蜎'=>'蜎','蜨'=>'蜨','蝫'=>'è«','蝹'=>'è¹','蝹'=>'è¹','螆'=>'螆','螺'=>'螺','蟡'=>'蟡','ð¯§'=>'è ','蠟'=>'è Ÿ','⾎'=>'è¡€','行'=>'è¡Œ','â¾'=>'è¡Œ','衠'=>'è¡ ','衣'=>'è¡£','â¾'=>'è¡£','裂'=>'裂','裏'=>'è£','裗'=>'裗','裞'=>'裞','裡'=>'裡','裸'=>'裸','裺'=>'裺','ï© '=>'è¤','襁'=>'è¥','襤'=>'襤','⾑'=>'襾','覆'=>'覆','見'=>'見','â¾’'=>'見','ï©¡'=>'視','視'=>'視','⾓'=>'角','â¾”'=>'言','䚶'=>'訞','詽'=>'訮','ð¯§'=>'誠','說'=>'說','說'=>'說','調'=>'調','請'=>'è«‹','諒'=>'è«’','ï¥'=>'è«–','諭'=>'è«­','ð¯§'=>'è«­','諸'=>'諸','諸'=>'諸','ï¥'=>'諾','諾'=>'諾','ï©¢'=>'è¬','謁'=>'è¬','ï©£'=>'謹','謹'=>'謹','識'=>'è­˜','讀'=>'讀','è®'=>'讆','ï«€'=>'變','變'=>'變','⾕'=>'è°·','â¾–'=>'豆','豈'=>'豈','豕'=>'豕','â¾—'=>'豕','⾘'=>'豸','â¾™'=>'è²','貫'=>'貫','賁'=>'è³','賂'=>'賂','賈'=>'賈','賓'=>'賓','ï©¥'=>'è´ˆ','ï«'=>'è´ˆ','贛'=>'è´›','⾚'=>'赤','â¾›'=>'èµ°','起'=>'èµ·','趆'=>'赿','⾜'=>'足','趼'=>'趼','跋'=>'è·‹','è·º'=>'è·¥','路'=>'è·¯','跰'=>'è·°','躛'=>'躗','â¾'=>'身','車'=>'車','⾞'=>'車','軔'=>'è»”','輧'=>'軿','輦'=>'輦','輪'=>'輪','ï«‚'=>'輸','輸'=>'輸','輻'=>'è¼»','ï¦'=>'è½¢','⾟'=>'è¾›','ð¯¦'=>'辞','辰'=>'è¾°','â¾ '=>'è¾°','⾡'=>'è¾µ','辶'=>'辶','⻌'=>'辶','連'=>'連','逸'=>'逸','逸'=>'逸','遲'=>'é²','遼'=>'é¼','邏'=>'é‚','â¾¢'=>'é‚‘','邔'=>'é‚”','郎'=>'郎','郱'=>'郱','都'=>'都','鄑'=>'é„‘','鄛'=>'é„›','â¾£'=>'é…‰','酪'=>'é…ª','ï«„'=>'醙','醴'=>'醴','⾤'=>'釆','里'=>'里','â¾¥'=>'里','量'=>'é‡','金'=>'金','⾦'=>'金','鈴'=>'鈴','鈸'=>'鈸','ï«…'=>'鉶','鉼'=>'鉼','鋗'=>'é‹—','鋘'=>'鋘','錄'=>'錄','鍊'=>'éŠ','鎮'=>'鎭','鏹'=>'é¹','鐕'=>'é•','⾧'=>'é•·','⾨'=>'é–€','開'=>'é–‹','閭'=>'é–­','閷'=>'é–·','⾩'=>'阜','阮'=>'阮','陋'=>'陋','降'=>'é™','陵'=>'陵','陸'=>'陸','陼'=>'陼','隆'=>'隆','隣'=>'隣','⾪'=>'隶','隸'=>'隸','⾫'=>'éš¹','雃'=>'雃','離'=>'離','難'=>'難','難'=>'難','⾬'=>'雨','零'=>'零','雷'=>'é›·','霣'=>'霣','露'=>'露','靈'=>'éˆ','â¾­'=>'é‘','靖'=>'é–','靖'=>'é–','â¾®'=>'éž','⾯'=>'é¢','â¾°'=>'é©','â¾±'=>'韋','韛'=>'韛','韠'=>'韠','â¾²'=>'韭','â¾³'=>'音','ï©©'=>'響','ï«Š'=>'響','â¾´'=>'é ','ï«‹'=>'é ‹','頋'=>'é ‹','頋'=>'é ‹','領'=>'é ˜','頩'=>'é ©','頻'=>'é »','ï«Œ'=>'é »','ï§'=>'é¡ž','â¾µ'=>'風','⾶'=>'飛','â»'=>'食','â¾·'=>'食','飢'=>'飢','飯'=>'飯','飼'=>'飼','館'=>'館','餩'=>'餩','⾸'=>'首','â¾¹'=>'香','馧'=>'馧','⾺'=>'馬','駂'=>'駂','駱'=>'駱','駾'=>'駾','驪'=>'驪','â¾»'=>'骨','â¾¼'=>'高','â¾½'=>'é«Ÿ','ï«'=>'鬒','鬒'=>'鬒','â¾¾'=>'鬥','⾿'=>'鬯','â¿€'=>'鬲','â¿'=>'鬼','â¿‚'=>'é­š','魯'=>'é­¯','鱀'=>'é±€','鱗'=>'é±—','⿃'=>'é³¥','鳽'=>'é³½','ð¯¨'=>'鵧','鶴'=>'鶴','鷺'=>'é·º','鸞'=>'鸞','鹃'=>'鹂','â¿„'=>'é¹µ','鹿'=>'鹿','â¿…'=>'鹿','麗'=>'麗','麟'=>'麟','⿆'=>'麥','麻'=>'麻','⿇'=>'麻','⿈'=>'黃','⿉'=>'é»','黎'=>'黎','â¿Š'=>'黑','黹'=>'黹','â¿‹'=>'黹','â¿Œ'=>'黽','黾'=>'黾','鼅'=>'é¼…','â¿'=>'鼎','鼏'=>'é¼','â¿Ž'=>'鼓','鼖'=>'é¼–','â¿'=>'é¼ ','鼻'=>'é¼»','â¿'=>'é¼»','齃'=>'齃','â¿‘'=>'齊','â¿’'=>'é½’','龍'=>'é¾','â¿“'=>'é¾','ï«™'=>'龎','龜'=>'龜','龜'=>'龜','ï«Ž'=>'龜','â¿”'=>'龜','⻳'=>'龟','â¿•'=>'é¾ ','㒞'=>'ã’ž','㒹'=>'ã’¹','㒻'=>'ã’»','㓟'=>'ã“Ÿ','㔕'=>'㔕','䎛'=>'ã–ˆ','㛮'=>'ã›®','㛼'=>'㛼','㞁'=>'ãž','㠯'=>'ã ¯','㡢'=>'ã¡¢','㡼'=>'㡼','㣇'=>'㣇','㣣'=>'㣣','㤜'=>'㤜','㤺'=>'㤺','㨮'=>'㨮','㩬'=>'㩬','㫤'=>'㫤','ð¯£'=>'㬈','㬙'=>'㬙','ä '=>'㬻','㭉'=>'ã­‰','ï«’'=>'ã®','㮝'=>'ã®','㰘'=>'ã°˜','㱎'=>'㱎','㴳'=>'ã´³','㶖'=>'㶖','㺬'=>'㺬','㺸'=>'㺸','㺸'=>'㺸','㼛'=>'ã¼›','㿼'=>'㿼','䀈'=>'䀈','ï«“'=>'䀘','ï«”'=>'䀹','䀹'=>'䀹','䁆'=>'ä†','䂖'=>'ä‚–','䃣'=>'䃣','䄯'=>'䄯','䈂'=>'䈂','䈧'=>'䈧','䊠'=>'䊠','䌁'=>'äŒ','䌴'=>'䌴','䍙'=>'ä™','ð¯¦'=>'ä•','䏙'=>'ä™','䐋'=>'ä‹','䑫'=>'ä‘«','䔫'=>'䔫','䕝'=>'ä•','䕡'=>'ä•¡','䕫'=>'ä•«','䗗'=>'ä——','䗹'=>'ä—¹','䘵'=>'䘵','ð¯§'=>'äš¾','䛇'=>'䛇','䦕'=>'䦕','䧦'=>'䧦','䩮'=>'ä©®','䩶'=>'䩶','䪲'=>'䪲','䬳'=>'䬳','䯎'=>'䯎','ð¯¨'=>'䳎','䳭'=>'ä³­','䳸'=>'䳸','䵖'=>'äµ–','𠄢'=>'ð „¢','𠔜'=>'𠔜','𠔥'=>'𠔥','𠕋'=>'ð •‹','ð¯ '=>'𠘺','𠠄'=>'ð  „','ð¯§'=>'𠣞','𠨬'=>'𠨬','𠭣'=>'ð ­£','𡓤'=>'𡓤','𡚨'=>'𡚨','𡛪'=>'𡛪','𡧈'=>'𡧈','𡬘'=>'𡬘','𡴋'=>'ð¡´‹','𡷤'=>'ð¡·¤','𡷦'=>'ð¡·¦','𢆃'=>'𢆃','𢆟'=>'𢆟','𢌱'=>'𢌱','𢌱'=>'𢌱','𢛔'=>'𢛔','ï«'=>'𢡄','ï«'=>'𢡊','𢬌'=>'𢬌','𢯱'=>'𢯱','𣀊'=>'𣀊','𣊸'=>'𣊸','𣍟'=>'ð£Ÿ','𣎓'=>'𣎓','𣎜'=>'𣎜','ð¯£'=>'ð£ƒ','ï«‘'=>'ð£•','𣑭'=>'𣑭','𣚣'=>'𣚣','𣢧'=>'𣢧','𣪍'=>'ð£ª','𣫺'=>'𣫺','𣲼'=>'𣲼','𣴞'=>'𣴞','ð¯¤'=>'𣻑','ð¯¤'=>'𣽞','𣾎'=>'𣾎','ð¯¤'=>'𤉣','𤎫'=>'𤎫','𤘈'=>'𤘈','𤜵'=>'𤜵','𤠔'=>'𤠔','𤰶'=>'𤰶','𤲒'=>'𤲒','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'ð¥„','𥃲'=>'𥃲','ð¯¥'=>'𥃳','𥄙'=>'𥄙','𥄳'=>'𥄳','ï«•'=>'𥉉','ð¯¥'=>'ð¥','𥘦'=>'𥘦','𥚚'=>'𥚚','𥛅'=>'𥛅','𥥼'=>'𥥼','ð¯¥'=>'𥪧','𥪧'=>'𥪧','𥮫'=>'𥮫','𥲀'=>'𥲀','ï«–'=>'ð¥³','𥾆'=>'𥾆','𦇚'=>'𦇚','𦈨'=>'𦈨','𦉇'=>'𦉇','𦋙'=>'𦋙','𦌾'=>'𦌾','𦓚'=>'𦓚','𦔣'=>'𦔣','𦖨'=>'𦖨','𦞧'=>'𦞧','𦞵'=>'𦞵','𦬼'=>'𦬼','𦰶'=>'𦰶','𦳕'=>'𦳕','𦵫'=>'𦵫','𦼬'=>'𦼬','𦾱'=>'𦾱','𧃒'=>'𧃒','𧏊'=>'ð§Š','𧙧'=>'𧙧','𧢮'=>'𧢮','𧥦'=>'𧥦','𧲨'=>'𧲨','ï«—'=>'𧻓','𧼯'=>'𧼯','𨗒'=>'𨗒','𨗭'=>'𨗭','𨜮'=>'𨜮','𨯺'=>'𨯺','𨵷'=>'𨵷','𩅅'=>'ð©……','𩇟'=>'𩇟','𩈚'=>'𩈚','𩐊'=>'ð©Š','𩒖'=>'ð©’–','ð¯¨'=>'ð©–¶','𩬰'=>'𩬰','ð¯¨'=>'𪃎','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','ð¯¢'=>'𪎒','ð¯¨'=>'𪘀','℃'=>'°C','℉'=>'°F','ℇ'=>'Æ','â„»'=>'FAX','â„•'=>'N','â„–'=>'No','â„š'=>'Q','₨'=>'Rs','ð“'=>'T','â„¡'=>'TEL','ð”'=>'U','ð–'=>'W','â‚©'=>'W̵','ð—'=>'X','Â¥'=>'Y̵','ðš²'=>'Λ','ðšµ'=>'Ξ','â„¿'=>'Π','ϲ'=>'c','Ï’'=>'Y','ðš½'=>'Φ','ðš¿'=>'Ψ','Ñ£'=>'Ь̵','ਃ'=>'ঃ','ಃ'=>'à°ƒ','່'=>'่','់'=>'่','້'=>'้','໊'=>'๊','໋'=>'๋','៕'=>'๚','៚'=>'๛','ÑŠ'=>'ˉb','៙'=>'à¹','೧'=>'౧','૨'=>'२','೨'=>'౨','à«©'=>'३','૪'=>'४','à«®'=>'८','೯'=>'౯','а'=>'a','á'=>'b','á–¯'=>'b','Ñ'=>'c','Ô'=>'d','ᑯ'=>'d','е'=>'e','Ó™'=>'Ç','ε'=>'É›','Ñ”'=>'É›','Ö„'=>'f','Ö'=>'g','Ò»'=>'h','Õ°'=>'h','á‚'=>'h','á²'=>'hÌ”','ι'=>'i','Ñ–'=>'i','Ꭵ'=>'i','ј'=>'j','Õµ'=>'j','á—°'=>'m','Õ¸'=>'n','η'=>'nÌ©','à°‚'=>'o','ಂ'=>'o','à´‚'=>'o','०'=>'o','੦'=>'o','૦'=>'o','à¹'=>'o','à»'=>'o','ο'=>'o','о'=>'o','Ö…'=>'o','á€'=>'o','Ï'=>'p','Ñ€'=>'p','á´©'=>'á´˜','Õ£'=>'q','κ'=>'ĸ','к'=>'ĸ','á´¦'=>'r','г'=>'r','Ñ•'=>'s','Ï…'=>'u','Õ½'=>'u','ν'=>'v','ѵ'=>'v','Ꮃ'=>'w','á—¯'=>'w','Ñ…'=>'x','á•'=>'x','у'=>'y','Ꭹ'=>'y','Ó¡'=>'Ê’','ჳ'=>'Ê’','Ï©'=>'ƨ','ÑŒ'=>'Æ…','Ñ‹'=>'Æ…i','É‘'=>'α','Õ®'=>'δ','á•·'=>'δ','п'=>'Ï€','ɸ'=>'φ','Ñ„'=>'φ','Ê™'=>'в','Éœ'=>'з','á´'=>'м','Êœ'=>'н','É¢'=>'Ô','á´›'=>'Ñ‚','á´™'=>'Ñ','ઽ'=>'ऽ','à«'=>'à¥','à«‚'=>'ू','à©‹'=>'ॆ','à©'=>'à¥','à«'=>'à¥','à´‰'=>'உ','à´œ'=>'à®','à´£'=>'ண','à´´'=>'à®´','à´¿'=>'ி','àµ'=>'ூ','ಅ'=>'à°…','ಆ'=>'à°†','ಇ'=>'à°‡','ಒ'=>'à°’','ಓ'=>'ఒౕ','ಜ'=>'à°œ','ಞ'=>'à°ž','ಣ'=>'à°£','à°¥'=>'à°§Ö¼','ಯ'=>'à°¯','à° '=>'à°°Ö¼','ಱ'=>'à°±','ಲ'=>'à°²','ඌ'=>'à´¨àµà´¨','ஶ'=>'à´¶','ຈ'=>'จ','ບ'=>'บ','ປ'=>'ป','àº'=>'à¸','ພ'=>'พ','ຟ'=>'ฟ','àº'=>'ย','។'=>'ฯ','áž·'=>'ิ','ី'=>'ี','áž¹'=>'ึ','ឺ'=>'ื','ຸ'=>'ุ','ູ'=>'ู','á—…'=>'A','á’'=>'J','ᕼ'=>'H','á¯'=>'V','á‘­'=>'P','á—·'=>'B','ヘ'=>'ã¸','ð‘'=>'ðŽ‚','ð“'=>'ðŽ“','𒀸'=>'ðŽš','á…³'=>'一','Ç€'=>'丨','á…µ'=>'丨','Ꭺ'=>'A','á´'=>'B','áŸ'=>'C','á—ž'=>'D','Ꭼ'=>'E','á–´'=>'F','á€'=>'G','Ꮋ'=>'H','Ꭻ'=>'J','á¦'=>'K','áž'=>'L','Ꮇ'=>'M','á¢'=>'P','á–‡'=>'R','á•'=>'S','á™'=>'V','áƒ'=>'Z');
+
+?> \ No newline at end of file
diff --git a/phpBB/install/data/new_normalizer.php b/phpBB/install/data/new_normalizer.php
new file mode 100644
index 0000000000..e266f73408
--- /dev/null
+++ b/phpBB/install/data/new_normalizer.php
@@ -0,0 +1,196 @@
+<?php
+/**
+*
+* @package install
+* @version $Id$
+* @copyright (c) 2007 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* A wrapper function for the normalizer which takes care of including the class if required and modifies the passed strings
+* to be in NFC (Normalization Form Composition).
+*
+* @param mixed $strings a string or an array of strings to normalize
+* @return mixed the normalized content, preserving array keys if array given.
+*/
+function utf8_new_normalize_nfc($strings)
+{
+ if (empty($strings))
+ {
+ return $strings;
+ }
+
+ if (!is_array($strings))
+ {
+ utf_new_normalizer::nfc($strings);
+ }
+ else if (is_array($strings))
+ {
+ foreach ($strings as $key => $string)
+ {
+ if (is_array($string))
+ {
+ foreach ($string as $_key => $_string)
+ {
+ utf_new_normalizer::nfc($strings[$key][$_key]);
+ }
+ }
+ else
+ {
+ utf_new_normalizer::nfc($strings[$key]);
+ }
+ }
+ }
+
+ return $strings;
+}
+
+class utf_new_normalizer
+{
+ /**
+ * Validate, cleanup and normalize a string
+ *
+ * The ultimate convenience function! Clean up invalid UTF-8 sequences,
+ * and convert to Normal Form C, canonical composition.
+ *
+ * @param string &$str The dirty string
+ * @return string The same string, all shiny and cleaned-up
+ */
+ function cleanup(&$str)
+ {
+ // The string below is the list of all autorized characters, sorted by frequency in latin text
+ $pos = strspn($str, "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x0D");
+ $len = strlen($str);
+
+ if ($pos == $len)
+ {
+ // ASCII strings with no special chars return immediately
+ return;
+ }
+
+ // Note: we do not check for $GLOBALS['utf_canonical_decomp']. It is assumed they are always loaded together
+ if (!isset($GLOBALS['utf_nfc_qc']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
+ }
+
+ if (!isset($GLOBALS['utf_canonical_decomp']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
+ }
+
+ // Replace any byte in the range 0x00..0x1F, except for \r, \n and \t
+ // We replace those characters with a 0xFF byte, which is illegal in UTF-8 and will in turn be replaced with a UTF replacement char
+ $str = strtr(
+ $str,
+ "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F",
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ );
+
+ $str = utf_new_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']);
+ }
+
+ /**
+ * Validate and normalize a UTF string to NFC
+ *
+ * @param string &$str Unchecked UTF string
+ * @return string The string, validated and in normal form
+ */
+ function nfc(&$str)
+ {
+ $pos = strspn($str, UTF8_ASCII_RANGE);
+ $len = strlen($str);
+
+ if ($pos == $len)
+ {
+ // ASCII strings return immediately
+ return;
+ }
+
+ if (!isset($GLOBALS['utf_nfc_qc']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
+ }
+
+ if (!isset($GLOBALS['utf_canonical_decomp']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
+ }
+
+ $str = utf_new_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']);
+ }
+
+ /**
+ * Validate and normalize a UTF string to NFKC
+ *
+ * @param string &$str Unchecked UTF string
+ * @return string The string, validated and in normal form
+ */
+ function nfkc(&$str)
+ {
+ $pos = strspn($str, UTF8_ASCII_RANGE);
+ $len = strlen($str);
+
+ if ($pos == $len)
+ {
+ // ASCII strings return immediately
+ return;
+ }
+
+ if (!isset($GLOBALS['utf_nfkc_qc']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_nfkc_qc.' . $phpEx);
+ }
+
+ if (!isset($GLOBALS['utf_compatibility_decomp']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_compatibility_decomp.' . $phpEx);
+ }
+
+ $str = utf_new_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfkc_qc'], $GLOBALS['utf_compatibility_decomp']);
+ }
+
+ /**
+ * Recompose a UTF string
+ *
+ * @param string $str Unchecked UTF string
+ * @param integer $pos Position of the first UTF char (in bytes)
+ * @param integer $len Length of the string (in bytes)
+ * @param array &$qc Quick-check array, passed by reference but never modified
+ * @param array &$decomp_map Decomposition mapping, passed by reference but never modified
+ * @return string The string, validated and recomposed
+ *
+ * @access private
+ */
+ function recompose($str, $pos, $len, &$qc, &$decomp_map)
+ {
+ global $utf_canonical_comp;
+
+ // Load the canonical composition table
+ if (!isset($utf_canonical_comp))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_canonical_comp.' . $phpEx);
+ }
+
+ return utf_normalizer::recompose($str, $pos, $len, $qc, $decomp_map);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
new file mode 100644
index 0000000000..ce223cf302
--- /dev/null
+++ b/phpBB/install/database_update.php
@@ -0,0 +1,3387 @@
+<?php
+/**
+*
+* @package install
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+$updates_to_version = '3.0.6-RC3';
+
+// Enter any version to update from to test updates. The version within the db will not be updated.
+$debug_from_version = false;
+
+// Which oldest version does this updater support?
+$oldest_from_version = '3.0.0';
+
+// Return if we "just include it" to find out for which version the database update is responsible for
+if (defined('IN_PHPBB') && defined('IN_INSTALL'))
+{
+ return;
+}
+
+/**
+*/
+define('IN_PHPBB', true);
+define('IN_INSTALL', true);
+
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+
+// Report all errors, except notices
+//error_reporting(E_ALL ^ E_NOTICE);
+error_reporting(E_ALL);
+
+@set_time_limit(0);
+
+// Include essential scripts
+include($phpbb_root_path . 'config.' . $phpEx);
+
+if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
+{
+ die("Please read: <a href='../docs/INSTALL.html'>INSTALL.html</a> before attempting to update.");
+}
+
+// Load Extensions
+if (!empty($load_extensions))
+{
+ $load_extensions = explode(',', $load_extensions);
+
+ foreach ($load_extensions as $extension)
+ {
+ @dl(trim($extension));
+ }
+}
+
+// Include files
+require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx);
+require($phpbb_root_path . 'includes/cache.' . $phpEx);
+require($phpbb_root_path . 'includes/template.' . $phpEx);
+require($phpbb_root_path . 'includes/session.' . $phpEx);
+require($phpbb_root_path . 'includes/auth.' . $phpEx);
+
+require($phpbb_root_path . 'includes/functions.' . $phpEx);
+
+if (file_exists($phpbb_root_path . 'includes/functions_content.' . $phpEx))
+{
+ require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
+}
+
+require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+require($phpbb_root_path . 'includes/constants.' . $phpEx);
+require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
+require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
+
+// If we are on PHP >= 6.0.0 we do not need some code
+if (version_compare(PHP_VERSION, '6.0.0-dev', '>='))
+{
+ /**
+ * @ignore
+ */
+ define('STRIP', false);
+}
+else
+{
+ @set_magic_quotes_runtime(0);
+ define('STRIP', (get_magic_quotes_gpc()) ? true : false);
+}
+
+$user = new user();
+$cache = new cache();
+$db = new $sql_db();
+
+// Add own hook handler, if present. :o
+if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
+{
+ require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
+ $phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
+
+ foreach ($cache->obtain_hooks() as $hook)
+ {
+ @include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
+ }
+}
+else
+{
+ $phpbb_hook = false;
+}
+
+// Connect to DB
+$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false);
+
+// We do not need this any longer, unset for safety purposes
+unset($dbpasswd);
+
+$user->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : '';
+
+$sql = "SELECT config_value
+ FROM " . CONFIG_TABLE . "
+ WHERE config_name = 'default_lang'";
+$result = $db->sql_query($sql);
+$row = $db->sql_fetchrow($result);
+$db->sql_freeresult($result);
+
+$language = basename(request_var('language', ''));
+
+if (!$language)
+{
+ $language = $row['config_value'];
+}
+
+if (!file_exists($phpbb_root_path . 'language/' . $language))
+{
+ die('No language found!');
+}
+
+// And finally, load the relevant language files
+include($phpbb_root_path . 'language/' . $language . '/common.' . $phpEx);
+include($phpbb_root_path . 'language/' . $language . '/acp/common.' . $phpEx);
+include($phpbb_root_path . 'language/' . $language . '/install.' . $phpEx);
+
+// Set PHP error handler to ours
+//set_error_handler('msg_handler');
+
+// Define some variables for the database update
+$inline_update = (request_var('type', 0)) ? true : false;
+
+// To let set_config() calls succeed, we need to make the config array available globally
+$config = array();
+
+$sql = 'SELECT *
+ FROM ' . CONFIG_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $config[$row['config_name']] = $row['config_value'];
+}
+$db->sql_freeresult($result);
+
+// We do not include DB Tools here, because we can not be sure the file is up-to-date ;)
+// Instead, this file defines a clean db_tools version (we are also not able to provide a different file, else the database update will not work standalone)
+$db_tools = new updater_db_tools($db, true);
+
+$database_update_info = database_update_info();
+
+$error_ary = array();
+$errored = false;
+
+header('Content-type: text/html; charset=UTF-8');
+
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $lang['DIRECTION']; ?>" lang="<?php echo $lang['USER_LANG']; ?>" xml:lang="<?php echo $lang['USER_LANG']; ?>">
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<meta http-equiv="content-language" content="<?php echo $lang['USER_LANG']; ?>" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="imagetoolbar" content="no" />
+
+<title><?php echo $lang['UPDATING_TO_LATEST_STABLE']; ?></title>
+
+<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+
+</head>
+
+<body>
+<div id="wrap">
+ <div id="page-header">&nbsp;</div>
+
+ <div id="page-body">
+ <div id="acp">
+ <div class="panel">
+ <span class="corners-top"><span></span></span>
+ <div id="content">
+ <div id="main" class="install-body">
+
+ <h1><?php echo $lang['UPDATING_TO_LATEST_STABLE']; ?></h1>
+
+ <br />
+
+ <p><?php echo $lang['DATABASE_TYPE']; ?> :: <strong><?php echo $db->sql_layer; ?></strong><br />
+<?php
+
+if ($debug_from_version !== false)
+{
+ $config['version'] = $debug_from_version;
+}
+
+echo $lang['PREVIOUS_VERSION'] . ' :: <strong>' . $config['version'] . '</strong><br />';
+echo $lang['UPDATED_VERSION'] . ' :: <strong>' . $updates_to_version . '</strong></p>';
+
+$current_version = str_replace('rc', 'RC', strtolower($config['version']));
+$latest_version = str_replace('rc', 'RC', strtolower($updates_to_version));
+$orig_version = $config['version'];
+
+// Fill DB version
+if (empty($config['dbms_version']))
+{
+ set_config('dbms_version', $db->sql_server_info(true));
+}
+
+// Firebird update from Firebord 2.0 to 2.1+ required?
+if ($db->sql_layer == 'firebird')
+{
+ // We do not trust any PHP5 function enabled, we will simply test for a function new in 2.1
+ $db->sql_return_on_error(true);
+
+ $sql = 'SELECT 1 FROM RDB$DATABASE
+ WHERE BIN_AND(10, 1) = 0';
+ $result = $db->sql_query($sql);
+
+ if (!$result || $db->sql_error_triggered)
+ {
+ echo '<br /><br />';
+ echo '<h1>' . $lang['ERROR'] . '</h1><br />';
+
+ echo '<p>' . $lang['FIREBIRD_DBMS_UPDATE_REQUIRED'] . '</p>';
+
+ _print_footer();
+
+ exit_handler();
+ exit;
+ }
+
+ $db->sql_freeresult($result);
+ $db->sql_return_on_error(false);
+}
+
+// MySQL update from MySQL 3.x/4.x to > 4.1.x required?
+if ($db->sql_layer == 'mysql' || $db->sql_layer == 'mysql4' || $db->sql_layer == 'mysqli')
+{
+ // Verify by fetching column... if the column type matches the new type we update dbms_version...
+ $sql = "SHOW COLUMNS FROM " . CONFIG_TABLE;
+ $result = $db->sql_query($sql);
+
+ $column_type = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $field = strtolower($row['Field']);
+
+ if ($field == 'config_value')
+ {
+ $column_type = strtolower($row['Type']);
+ break;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // If column type is blob, but mysql version says we are on > 4.1.3, then the schema needs an update
+ if (strpos($column_type, 'blob') !== false && version_compare($db->sql_server_info(true), '4.1.3', '>='))
+ {
+ echo '<br /><br />';
+ echo '<h1>' . $lang['ERROR'] . '</h1><br />';
+
+ echo '<p>' . sprintf($lang['MYSQL_SCHEMA_UPDATE_REQUIRED'], $config['dbms_version'], $db->sql_server_info(true)) . '</p>';
+
+ _print_footer();
+
+ exit_handler();
+ exit;
+ }
+}
+
+// Now check if the user wants to update from a version we no longer support updates from
+if (version_compare($current_version, $oldest_from_version, '<'))
+{
+ echo '<br /><br /><h1>' . $lang['ERROR'] . '</h1><br />';
+ echo '<p>' . sprintf($lang['DB_UPDATE_NOT_SUPPORTED'], $oldest_from_version, $current_version) . '</p>';
+
+ _print_footer();
+ exit_handler();
+ exit;
+}
+
+// If the latest version and the current version are 'unequal', we will update the version_update_from, else we do not update anything.
+if ($inline_update)
+{
+ if ($current_version !== $latest_version)
+ {
+ set_config('version_update_from', $orig_version);
+ }
+}
+else
+{
+ // If not called from the update script, we will actually remove the traces
+ $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'");
+}
+
+// Schema updates
+?>
+ <br /><br />
+
+ <h1><?php echo $lang['UPDATE_DATABASE_SCHEMA']; ?></h1>
+
+ <br />
+ <p><?php echo $lang['PROGRESS']; ?> :: <strong>
+
+<?php
+
+flush();
+
+// We go through the schema changes from the lowest to the highest version
+// We try to also include versions 'in-between'...
+$no_updates = true;
+$versions = array_keys($database_update_info);
+for ($i = 0; $i < sizeof($versions); $i++)
+{
+ $version = $versions[$i];
+ $schema_changes = $database_update_info[$version];
+
+ $next_version = (isset($versions[$i + 1])) ? $versions[$i + 1] : $updates_to_version;
+
+ // If the installed version to be updated to is < than the current version, and if the current version is >= as the version to be updated to next, we will skip the process
+ if (version_compare($version, $current_version, '<') && version_compare($current_version, $next_version, '>='))
+ {
+ continue;
+ }
+
+ if (!sizeof($schema_changes))
+ {
+ continue;
+ }
+
+ $no_updates = false;
+
+ $statements = $db_tools->perform_schema_changes($schema_changes);
+
+ foreach ($statements as $sql)
+ {
+ _sql($sql, $errored, $error_ary);
+ }
+}
+
+_write_result($no_updates, $errored, $error_ary);
+
+// Data updates
+$error_ary = array();
+$errored = $no_updates = false;
+
+?>
+
+<br /><br />
+<h1><?php echo $lang['UPDATING_DATA']; ?></h1>
+<br />
+<p><?php echo $lang['PROGRESS']; ?> :: <strong>
+
+<?php
+
+flush();
+
+$no_updates = true;
+$versions = array_keys($database_update_info);
+
+// some code magic
+for ($i = 0; $i < sizeof($versions); $i++)
+{
+ $version = $versions[$i];
+ $next_version = (isset($versions[$i + 1])) ? $versions[$i + 1] : $updates_to_version;
+
+ // If the installed version to be updated to is < than the current version, and if the current version is >= as the version to be updated to next, we will skip the process
+ if (version_compare($version, $current_version, '<') && version_compare($current_version, $next_version, '>='))
+ {
+ continue;
+ }
+
+ change_database_data($no_updates, $version);
+}
+
+_write_result($no_updates, $errored, $error_ary);
+
+$error_ary = array();
+$errored = $no_updates = false;
+
+?>
+
+<br /><br />
+<h1><?php echo $lang['UPDATE_VERSION_OPTIMIZE']; ?></h1>
+<br />
+<p><?php echo $lang['PROGRESS']; ?> :: <strong>
+
+<?php
+
+flush();
+
+if ($debug_from_version === false)
+{
+ // update the version
+ $sql = "UPDATE " . CONFIG_TABLE . "
+ SET config_value = '$updates_to_version'
+ WHERE config_name = 'version'";
+ _sql($sql, $errored, $error_ary);
+}
+
+// Reset permissions
+$sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_permissions = '',
+ user_perm_from = 0";
+_sql($sql, $errored, $error_ary);
+
+// Update the dbms version if everything is ok...
+set_config('dbms_version', $db->sql_server_info(true));
+
+/* Optimize/vacuum analyze the tables where appropriate
+// this should be done for each version in future along with
+// the version number update
+switch ($db->sql_layer)
+{
+ case 'mysql':
+ case 'mysqli':
+ case 'mysql4':
+ $sql = 'OPTIMIZE TABLE ' . $table_prefix . 'auth_access, ' . $table_prefix . 'banlist, ' . $table_prefix . 'categories, ' . $table_prefix . 'config, ' . $table_prefix . 'disallow, ' . $table_prefix . 'forum_prune, ' . $table_prefix . 'forums, ' . $table_prefix . 'groups, ' . $table_prefix . 'posts, ' . $table_prefix . 'posts_text, ' . $table_prefix . 'privmsgs, ' . $table_prefix . 'privmsgs_text, ' . $table_prefix . 'ranks, ' . $table_prefix . 'search_results, ' . $table_prefix . 'search_wordlist, ' . $table_prefix . 'search_wordmatch, ' . $table_prefix . 'sessions_keys' . $table_prefix . 'smilies, ' . $table_prefix . 'themes, ' . $table_prefix . 'themes_name, ' . $table_prefix . 'topics, ' . $table_prefix . 'topics_watch, ' . $table_prefix . 'user_group, ' . $table_prefix . 'users, ' . $table_prefix . 'vote_desc, ' . $table_prefix . 'vote_results, ' . $table_prefix . 'vote_voters, ' . $table_prefix . 'words';
+ _sql($sql, $errored, $error_ary);
+ break;
+
+ case 'postgresql':
+ _sql("VACUUM ANALYZE", $errored, $error_ary);
+ break;
+}
+*/
+
+_write_result($no_updates, $errored, $error_ary);
+
+?>
+
+<br />
+<h1><?php echo $lang['UPDATE_COMPLETED']; ?></h1>
+
+<br />
+
+<?php
+
+if (!$inline_update)
+{
+?>
+
+ <p style="color:red"><?php echo $lang['UPDATE_FILES_NOTICE']; ?></p>
+
+ <p><?php echo $lang['COMPLETE_LOGIN_TO_BOARD']; ?></p>
+
+<?php
+}
+else
+{
+?>
+
+ <p><?php echo ((isset($lang['INLINE_UPDATE_SUCCESSFUL'])) ? $lang['INLINE_UPDATE_SUCCESSFUL'] : 'The database update was successful. Now you need to continue the update process.'); ?></p>
+
+ <p><a href="<?php echo append_sid("{$phpbb_root_path}install/index.{$phpEx}", "mode=update&amp;sub=file_check&amp;lang=$language"); ?>" class="button1"><?php echo (isset($lang['CONTINUE_UPDATE_NOW'])) ? $lang['CONTINUE_UPDATE_NOW'] : 'Continue the update process now'; ?></a></p>
+
+<?php
+}
+
+// Add database update to log
+add_log('admin', 'LOG_UPDATE_DATABASE', $orig_version, $updates_to_version);
+
+// Now we purge the session table as well as all cache files
+$cache->purge();
+
+_print_footer();
+
+garbage_collection();
+
+if (function_exists('exit_handler'))
+{
+ exit_handler();
+}
+
+/**
+* Print out footer
+*/
+function _print_footer()
+{
+ echo <<<EOF
+ </div>
+ </div>
+ <span class="corners-bottom"><span></span></span>
+ </div>
+ </div>
+ </div>
+
+ <div id="page-footer">
+ Powered by phpBB &copy; 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>
+ </div>
+</div>
+
+</body>
+</html>
+EOF;
+}
+
+/**
+* Function for triggering an sql statement
+*/
+function _sql($sql, &$errored, &$error_ary, $echo_dot = true)
+{
+ global $db;
+
+ if (defined('DEBUG_EXTRA'))
+ {
+ echo "<br />\n{$sql}\n<br />";
+ }
+
+ $db->sql_return_on_error(true);
+
+ $result = $db->sql_query($sql);
+ if ($db->sql_error_triggered)
+ {
+ $errored = true;
+ $error_ary['sql'][] = $db->sql_error_sql;
+ $error_ary['error_code'][] = $db->sql_error_returned;
+ }
+
+ $db->sql_return_on_error(false);
+
+ if ($echo_dot)
+ {
+ echo ". \n";
+ flush();
+ }
+
+ return $result;
+}
+
+function _write_result($no_updates, $errored, $error_ary)
+{
+ global $lang;
+
+ if ($no_updates)
+ {
+ echo ' ' . $lang['NO_UPDATES_REQUIRED'] . '</strong></p>';
+ }
+ else
+ {
+ echo ' <span class="success">' . $lang['DONE'] . '</span></strong><br />' . $lang['RESULT'] . ' :: ';
+
+ if ($errored)
+ {
+ echo ' <strong>' . $lang['SOME_QUERIES_FAILED'] . '</strong> <ul>';
+
+ for ($i = 0; $i < sizeof($error_ary['sql']); $i++)
+ {
+ echo '<li>' . $lang['ERROR'] . ' :: <strong>' . htmlspecialchars($error_ary['error_code'][$i]['message']) . '</strong><br />';
+ echo $lang['SQL'] . ' :: <strong>' . htmlspecialchars($error_ary['sql'][$i]) . '</strong><br /><br /></li>';
+ }
+
+ echo '</ul> <br /><br />' . $lang['SQL_FAILURE_EXPLAIN'] . '</p>';
+ }
+ else
+ {
+ echo '<strong>' . $lang['NO_ERRORS'] . '</strong></p>';
+ }
+ }
+}
+
+function _add_modules($modules_to_install)
+{
+ global $phpbb_root_path, $phpEx, $db;
+
+ include_once($phpbb_root_path . 'includes/acp/acp_modules.' . $phpEx);
+
+ $_module = new acp_modules();
+
+ foreach ($modules_to_install as $module_mode => $module_data)
+ {
+ $_module->module_class = $module_data['class'];
+
+ // Determine parent id first
+ $sql = 'SELECT module_id
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = '" . $db->sql_escape($module_data['class']) . "'
+ AND module_langname = '" . $db->sql_escape($module_data['cat']) . "'
+ AND module_mode = ''
+ AND module_basename = ''";
+ $result = $db->sql_query($sql);
+
+ // There may be more than one categories with the same name
+ $categories = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $categories[] = (int) $row['module_id'];
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($categories))
+ {
+ continue;
+ }
+
+ // Add the module to all categories found
+ foreach ($categories as $parent_id)
+ {
+ // Check if the module already exists
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename = '" . $db->sql_escape($module_data['base']) . "'
+ AND module_class = '" . $db->sql_escape($module_data['class']) . "'
+ AND module_langname = '" . $db->sql_escape($module_data['title']) . "'
+ AND module_mode = '" . $db->sql_escape($module_mode) . "'
+ AND module_auth = '" . $db->sql_escape($module_data['auth']) . "'
+ AND parent_id = {$parent_id}";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // If it exists, we simply continue with the next category
+ if ($row)
+ {
+ continue;
+ }
+
+ // Build the module sql row
+ $module_row = array(
+ 'module_basename' => $module_data['base'],
+ 'module_enabled' => (isset($module_data['enabled'])) ? (int) $module_data['enabled'] : 1,
+ 'module_display' => (isset($module_data['display'])) ? (int) $module_data['display'] : 1,
+ 'parent_id' => $parent_id,
+ 'module_class' => $module_data['class'],
+ 'module_langname' => $module_data['title'],
+ 'module_mode' => $module_mode,
+ 'module_auth' => $module_data['auth'],
+ );
+
+ $_module->update_module_data($module_row, true);
+
+ // Ok, do we need to re-order the module, move it up or down?
+ if (!isset($module_data['after']))
+ {
+ continue;
+ }
+
+ $after_mode = $module_data['after'][0];
+ $after_langname = $module_data['after'][1];
+
+ // First of all, get the module id for the module this one has to be placed after
+ $sql = 'SELECT left_id
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = '" . $db->sql_escape($module_data['class']) . "'
+ AND module_basename = '" . $db->sql_escape($module_data['base']) . "'
+ AND module_langname = '" . $db->sql_escape($after_langname) . "'
+ AND module_mode = '" . $db->sql_escape($after_mode) . "'
+ AND parent_id = '{$parent_id}'";
+ $result = $db->sql_query($sql);
+ $first_left_id = (int) $db->sql_fetchfield('left_id');
+ $db->sql_freeresult($result);
+
+ if (!$first_left_id)
+ {
+ continue;
+ }
+
+ // Ok, count the number of modules between $after_mode and the added module
+ $sql = 'SELECT COUNT(module_id) as num_modules
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = '" . $db->sql_escape($module_data['class']) . "'
+ AND parent_id = {$parent_id}
+ AND left_id BETWEEN {$first_left_id} AND {$module_row['left_id']}
+ GROUP BY left_id
+ ORDER BY left_id";
+ $result = $db->sql_query($sql);
+ $steps = (int) $db->sql_fetchfield('num_modules');
+ $db->sql_freeresult($result);
+
+ // We need to substract 2
+ $steps -= 2;
+
+ if ($steps <= 0)
+ {
+ continue;
+ }
+
+ // Ok, move module up $num_modules times. ;)
+ $_module->move_module_by($module_row, 'move_up', $steps);
+ }
+ }
+
+ $_module->remove_cache_file();
+}
+
+/****************************************************************************
+* ADD YOUR DATABASE SCHEMA CHANGES HERE *
+*****************************************************************************/
+function database_update_info()
+{
+ return array(
+ // Changes from 3.0.0 to the next version
+ '3.0.0' => array(
+ // Add the following columns
+ 'add_columns' => array(
+ FORUMS_TABLE => array(
+ 'display_subforum_list' => array('BOOL', 1),
+ ),
+ SESSIONS_TABLE => array(
+ 'session_forum_id' => array('UINT', 0),
+ ),
+ ),
+ 'add_index' => array(
+ SESSIONS_TABLE => array(
+ 'session_forum_id' => array('session_forum_id'),
+ ),
+ GROUPS_TABLE => array(
+ 'group_legend_name' => array('group_legend', 'group_name'),
+ ),
+ ),
+ 'drop_keys' => array(
+ GROUPS_TABLE => array('group_legend'),
+ ),
+ ),
+ // No changes from 3.0.1-RC1 to 3.0.1
+ '3.0.1-RC1' => array(),
+ // No changes from 3.0.1 to 3.0.2-RC1
+ '3.0.1' => array(),
+ // Changes from 3.0.2-RC1 to 3.0.2-RC2
+ '3.0.2-RC1' => array(
+ 'change_columns' => array(
+ DRAFTS_TABLE => array(
+ 'draft_subject' => array('STEXT_UNI', ''),
+ ),
+ FORUMS_TABLE => array(
+ 'forum_last_post_subject' => array('STEXT_UNI', ''),
+ ),
+ POSTS_TABLE => array(
+ 'post_subject' => array('STEXT_UNI', '', 'true_sort'),
+ ),
+ PRIVMSGS_TABLE => array(
+ 'message_subject' => array('STEXT_UNI', ''),
+ ),
+ TOPICS_TABLE => array(
+ 'topic_title' => array('STEXT_UNI', '', 'true_sort'),
+ 'topic_last_post_subject' => array('STEXT_UNI', ''),
+ ),
+ ),
+ 'drop_keys' => array(
+ SESSIONS_TABLE => array('session_forum_id'),
+ ),
+ 'add_index' => array(
+ SESSIONS_TABLE => array(
+ 'session_fid' => array('session_forum_id'),
+ ),
+ ),
+ ),
+ // No changes from 3.0.2-RC2 to 3.0.2
+ '3.0.2-RC2' => array(),
+
+ // Changes from 3.0.2 to 3.0.3-RC1
+ '3.0.2' => array(
+ // Add the following columns
+ 'add_columns' => array(
+ STYLES_TEMPLATE_TABLE => array(
+ 'template_inherits_id' => array('UINT:4', 0),
+ 'template_inherit_path' => array('VCHAR', ''),
+ ),
+ GROUPS_TABLE => array(
+ 'group_max_recipients' => array('UINT', 0),
+ ),
+ ),
+ ),
+
+ // No changes from 3.0.3-RC1 to 3.0.3
+ '3.0.3-RC1' => array(),
+
+ // Changes from 3.0.3 to 3.0.4-RC1
+ '3.0.3' => array(
+ 'add_columns' => array(
+ PROFILE_FIELDS_TABLE => array(
+ 'field_show_profile' => array('BOOL', 0),
+ ),
+ ),
+ 'change_columns' => array(
+ STYLES_TABLE => array(
+ 'style_id' => array('UINT', NULL, 'auto_increment'),
+ 'template_id' => array('UINT', 0),
+ 'theme_id' => array('UINT', 0),
+ 'imageset_id' => array('UINT', 0),
+ ),
+ STYLES_IMAGESET_TABLE => array(
+ 'imageset_id' => array('UINT', NULL, 'auto_increment'),
+ ),
+ STYLES_IMAGESET_DATA_TABLE => array(
+ 'image_id' => array('UINT', NULL, 'auto_increment'),
+ 'imageset_id' => array('UINT', 0),
+ ),
+ STYLES_THEME_TABLE => array(
+ 'theme_id' => array('UINT', NULL, 'auto_increment'),
+ ),
+ STYLES_TEMPLATE_TABLE => array(
+ 'template_id' => array('UINT', NULL, 'auto_increment'),
+ ),
+ STYLES_TEMPLATE_DATA_TABLE => array(
+ 'template_id' => array('UINT', 0),
+ ),
+ FORUMS_TABLE => array(
+ 'forum_style' => array('UINT', 0),
+ ),
+ USERS_TABLE => array(
+ 'user_style' => array('UINT', 0),
+ ),
+ ),
+ ),
+
+ // Changes from 3.0.4-RC1 to 3.0.4
+ '3.0.4-RC1' => array(),
+
+ // Changes from 3.0.4 to 3.0.5-RC1
+ '3.0.4' => array(
+ 'change_columns' => array(
+ FORUMS_TABLE => array(
+ 'forum_style' => array('UINT', 0),
+ ),
+ ),
+ ),
+
+ // No changes from 3.0.5-RC1 to 3.0.5
+ '3.0.5-RC1' => array(),
+
+ // Changes from 3.0.5 to 3.0.6-RC1
+ '3.0.5' => array(
+ 'add_columns' => array(
+ CONFIRM_TABLE => array(
+ 'attempts' => array('UINT', 0),
+ ),
+ USERS_TABLE => array(
+ 'user_new' => array('BOOL', 1),
+ 'user_reminded' => array('TINT:4', 0),
+ 'user_reminded_time'=> array('TIMESTAMP', 0),
+ ),
+ GROUPS_TABLE => array(
+ 'group_skip_auth' => array('BOOL', 0, 'after' => 'group_founder_manage'),
+ ),
+ PRIVMSGS_TABLE => array(
+ 'message_reported' => array('BOOL', 0),
+ ),
+ REPORTS_TABLE => array(
+ 'pm_id' => array('UINT', 0),
+ ),
+ PROFILE_FIELDS_TABLE => array(
+ 'field_show_on_vt' => array('BOOL', 0),
+ ),
+ FORUMS_TABLE => array(
+ 'forum_options' => array('UINT:20', 0),
+ ),
+ ),
+ 'change_columns' => array(
+ USERS_TABLE => array(
+ 'user_options' => array('UINT:11', 230271),
+ ),
+ ),
+ 'add_index' => array(
+ REPORTS_TABLE => array(
+ 'post_id' => array('post_id'),
+ 'pm_id' => array('pm_id'),
+ ),
+ POSTS_TABLE => array(
+ 'post_username' => array('post_username'),
+ ),
+ ),
+ ),
+ // Changes from 3.0.6-RC1 to 3.0.6-RC2
+ '3.0.6-RC1' => array(
+ 'drop_keys' => array(
+ LOG_TABLE => array('log_time'),
+ ),
+ ),
+ // No changes from 3.0.6-RC2 to 3.0.6-RC3
+ '3.0.6-RC2' => array(),
+ );
+}
+
+/****************************************************************************
+* ADD YOUR DATABASE DATA CHANGES HERE *
+* REMEMBER: You NEED to enter a schema array above and a data array here, *
+* even if both or one of them are empty. *
+*****************************************************************************/
+function change_database_data(&$no_updates, $version)
+{
+ global $db, $errored, $error_ary, $config, $phpbb_root_path, $phpEx;
+
+ switch ($version)
+ {
+ case '3.0.0':
+
+ $sql = 'UPDATE ' . TOPICS_TABLE . "
+ SET topic_last_view_time = topic_last_post_time
+ WHERE topic_last_view_time = 0";
+ _sql($sql, $errored, $error_ary);
+
+ // Update smiley sizes
+ $smileys = array('icon_e_surprised.gif', 'icon_eek.gif', 'icon_cool.gif', 'icon_lol.gif', 'icon_mad.gif', 'icon_razz.gif', 'icon_redface.gif', 'icon_cry.gif', 'icon_evil.gif', 'icon_twisted.gif', 'icon_rolleyes.gif', 'icon_exclaim.gif', 'icon_question.gif', 'icon_idea.gif', 'icon_arrow.gif', 'icon_neutral.gif', 'icon_mrgreen.gif', 'icon_e_ugeek.gif');
+
+ foreach ($smileys as $smiley)
+ {
+ if (file_exists($phpbb_root_path . 'images/smilies/' . $smiley))
+ {
+ list($width, $height) = getimagesize($phpbb_root_path . 'images/smilies/' . $smiley);
+
+ $sql = 'UPDATE ' . SMILIES_TABLE . '
+ SET smiley_width = ' . $width . ', smiley_height = ' . $height . "
+ WHERE smiley_url = '" . $db->sql_escape($smiley) . "'";
+
+ _sql($sql, $errored, $error_ary);
+ }
+ }
+
+ $no_updates = false;
+ break;
+
+ // No changes from 3.0.1-RC1 to 3.0.1
+ case '3.0.1-RC1':
+ break;
+
+ // changes from 3.0.1 to 3.0.2-RC1
+ case '3.0.1':
+
+ set_config('referer_validation', '1');
+ set_config('check_attachment_content', '1');
+ set_config('mime_triggers', 'body|head|html|img|plaintext|a href|pre|script|table|title');
+
+ $no_updates = false;
+ break;
+
+ // No changes from 3.0.2-RC1 to 3.0.2-RC2
+ case '3.0.2-RC1':
+ break;
+
+ // No changes from 3.0.2-RC2 to 3.0.2
+ case '3.0.2-RC2':
+ break;
+
+ // Changes from 3.0.2 to 3.0.3-RC1
+ case '3.0.2':
+ set_config('enable_queue_trigger', '0');
+ set_config('queue_trigger_posts', '3');
+
+ set_config('pm_max_recipients', '0');
+
+ // Set maximum number of recipients for the registered users, bots, guests group
+ $sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_max_recipients = 5
+ WHERE ' . $db->sql_in_set('group_name', array('GUESTS', 'REGISTERED', 'REGISTERED_COPPA', 'BOTS'));
+ _sql($sql, $errored, $error_ary);
+
+ // Not prefilling yet
+ set_config('dbms_version', '');
+
+ // Add new permission u_masspm_group and duplicate settings from u_masspm
+ include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
+ $auth_admin = new auth_admin();
+
+ // Only add the new permission if it does not already exist
+ if (empty($auth_admin->acl_options['id']['u_masspm_group']))
+ {
+ $auth_admin->acl_add_option(array('global' => array('u_masspm_group')));
+
+ // Now the tricky part, filling the permission
+ $old_id = $auth_admin->acl_options['id']['u_masspm'];
+ $new_id = $auth_admin->acl_options['id']['u_masspm_group'];
+
+ $tables = array(ACL_GROUPS_TABLE, ACL_ROLES_DATA_TABLE, ACL_USERS_TABLE);
+
+ foreach ($tables as $table)
+ {
+ $sql = 'SELECT *
+ FROM ' . $table . '
+ WHERE auth_option_id = ' . $old_id;
+ $result = _sql($sql, $errored, $error_ary);
+
+ $sql_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $row['auth_option_id'] = $new_id;
+ $sql_ary[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($sql_ary))
+ {
+ $db->sql_multi_insert($table, $sql_ary);
+ }
+ }
+
+ // Remove any old permission entries
+ $auth_admin->acl_clear_prefetch();
+ }
+
+ /**
+ * Do not resync post counts here. An admin may do this later from the ACP
+ $start = 0;
+ $step = ($config['num_posts']) ? (max((int) ($config['num_posts'] / 5), 20000)) : 20000;
+
+ $sql = 'UPDATE ' . USERS_TABLE . ' SET user_posts = 0';
+ _sql($sql, $errored, $error_ary);
+
+ do
+ {
+ $sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
+ FROM ' . POSTS_TABLE . '
+ WHERE post_id BETWEEN ' . ($start + 1) . ' AND ' . ($start + $step) . '
+ AND post_postcount = 1 AND post_approved = 1
+ GROUP BY poster_id';
+ $result = _sql($sql, $errored, $error_ary);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ do
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . " SET user_posts = user_posts + {$row['num_posts']} WHERE user_id = {$row['poster_id']}";
+ _sql($sql, $errored, $error_ary);
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ $start += $step;
+ }
+ else
+ {
+ $start = 0;
+ }
+ $db->sql_freeresult($result);
+ }
+ while ($start);
+ */
+
+ $sql = 'UPDATE ' . MODULES_TABLE . '
+ SET module_auth = \'acl_a_email && cfg_email_enable\'
+ WHERE module_class = \'acp\'
+ AND module_basename = \'email\'';
+ _sql($sql, $errored, $error_ary);
+
+ $no_updates = false;
+ break;
+
+ // Changes from 3.0.3-RC1 to 3.0.3
+ case '3.0.3-RC1':
+ $sql = 'UPDATE ' . LOG_TABLE . "
+ SET log_operation = 'LOG_DELETE_TOPIC'
+ WHERE log_operation = 'LOG_TOPIC_DELETED'";
+ _sql($sql, $errored, $error_ary);
+
+ $no_updates = false;
+ break;
+
+ // Changes from 3.0.3 to 3.0.4-RC1
+ case '3.0.3':
+ // Update the Custom Profile Fields based on previous settings to the new format
+ $sql = 'SELECT field_id, field_required, field_show_on_reg, field_hide
+ FROM ' . PROFILE_FIELDS_TABLE;
+ $result = _sql($sql, $errored, $error_ary);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $sql_ary = array(
+ 'field_required' => 0,
+ 'field_show_on_reg' => 0,
+ 'field_hide' => 0,
+ 'field_show_profile'=> 0,
+ );
+
+ if ($row['field_required'])
+ {
+ $sql_ary['field_required'] = $sql_ary['field_show_on_reg'] = $sql_ary['field_show_profile'] = 1;
+ }
+ else if ($row['field_show_on_reg'])
+ {
+ $sql_ary['field_show_on_reg'] = $sql_ary['field_show_profile'] = 1;
+ }
+ else if ($row['field_hide'])
+ {
+ // Only administrators and moderators can see this CPF, if the view is enabled, they can see it, otherwise just admins in the acp_users module
+ $sql_ary['field_hide'] = 1;
+ }
+ else
+ {
+ // equivelant to "none", which is the "Display in user control panel" option
+ $sql_ary['field_show_profile'] = 1;
+ }
+
+ _sql('UPDATE ' . PROFILE_FIELDS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE field_id = ' . $row['field_id'], $errored, $error_ary);
+ }
+ $no_updates = false;
+
+ break;
+
+ // Changes from 3.0.4-RC1 to 3.0.4
+ case '3.0.4-RC1':
+ break;
+
+ // Changes from 3.0.4 to 3.0.5-RC1
+ case '3.0.4':
+
+ // Captcha config variables
+ set_config('captcha_gd_wave', 0);
+ set_config('captcha_gd_3d_noise', 1);
+ set_config('captcha_gd_fonts', 1);
+ set_config('confirm_refresh', 1);
+
+ // Maximum number of keywords
+ set_config('max_num_search_keywords', 10);
+
+ // Remove static config var and put it back as dynamic variable
+ $sql = 'UPDATE ' . CONFIG_TABLE . "
+ SET is_dynamic = 1
+ WHERE config_name = 'search_indexing_state'";
+ _sql($sql, $errored, $error_ary);
+
+ // Hash old MD5 passwords
+ $sql = 'SELECT user_id, user_password
+ FROM ' . USERS_TABLE . '
+ WHERE user_pass_convert = 1';
+ $result = _sql($sql, $errored, $error_ary);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (strlen($row['user_password']) == 32)
+ {
+ $sql_ary = array(
+ 'user_password' => phpbb_hash($row['user_password']),
+ );
+
+ _sql('UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE user_id = ' . $row['user_id'], $errored, $error_ary);
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // Adjust bot entry
+ $sql = 'UPDATE ' . BOTS_TABLE . "
+ SET bot_agent = 'ichiro/'
+ WHERE bot_agent = 'ichiro/2'";
+ _sql($sql, $errored, $error_ary);
+
+
+ // Before we are able to add a unique key to auth_option, we need to remove duplicate entries
+
+ // We get duplicate entries first
+ $sql = 'SELECT auth_option
+ FROM ' . ACL_OPTIONS_TABLE . '
+ GROUP BY auth_option
+ HAVING COUNT(*) >= 2';
+ $result = $db->sql_query($sql);
+
+ $auth_options = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $auth_options[] = $row['auth_option'];
+ }
+ $db->sql_freeresult($result);
+
+ // Remove specific auth options
+ if (!empty($auth_options))
+ {
+ foreach ($auth_options as $option)
+ {
+ // Select auth_option_ids... the largest id will be preserved
+ $sql = 'SELECT auth_option_id
+ FROM ' . ACL_OPTIONS_TABLE . "
+ WHERE auth_option = '" . $db->sql_escape($option) . "'
+ ORDER BY auth_option_id DESC";
+ // sql_query_limit not possible here, due to bug in postgresql layer
+ $result = $db->sql_query($sql);
+
+ // Skip first row, this is our original auth option we want to preserve
+ $row = $db->sql_fetchrow($result);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // Ok, remove this auth option...
+ _sql('DELETE FROM ' . ACL_OPTIONS_TABLE . ' WHERE auth_option_id = ' . $row['auth_option_id'], $errored, $error_ary);
+ _sql('DELETE FROM ' . ACL_ROLES_DATA_TABLE . ' WHERE auth_option_id = ' . $row['auth_option_id'], $errored, $error_ary);
+ _sql('DELETE FROM ' . ACL_GROUPS_TABLE . ' WHERE auth_option_id = ' . $row['auth_option_id'], $errored, $error_ary);
+ _sql('DELETE FROM ' . ACL_USERS_TABLE . ' WHERE auth_option_id = ' . $row['auth_option_id'], $errored, $error_ary);
+ }
+ $db->sql_freeresult($result);
+ }
+ }
+
+ // Now make auth_option UNIQUE, by dropping the old index and adding a UNIQUE one.
+ $changes = array(
+ 'drop_keys' => array(
+ ACL_OPTIONS_TABLE => array('auth_option'),
+ ),
+ 'add_unique_index' => array(
+ ACL_OPTIONS_TABLE => array(
+ 'auth_option' => array('auth_option'),
+ ),
+ ),
+ );
+
+ global $db_tools;
+
+ $statements = $db_tools->perform_schema_changes($changes);
+
+ foreach ($statements as $sql)
+ {
+ _sql($sql, $errored, $error_ary);
+ }
+
+ $no_updates = false;
+
+ break;
+
+ // No changes from 3.0.5-RC1 to 3.0.5
+ case '3.0.5-RC1':
+ break;
+
+ // Changes from 3.0.5 to 3.0.6-RC1
+ case '3.0.5':
+ // Let's see if the GD Captcha can be enabled... we simply look for what *is* enabled...
+ if (!empty($config['captcha_gd']) && !isset($config['captcha_plugin']))
+ {
+ set_config('captcha_plugin', 'phpbb_captcha_gd');
+ }
+ else if (!isset($config['captcha_plugin']))
+ {
+ set_config('captcha_plugin', 'phpbb_captcha_nogd');
+ }
+
+ // Entries for the Feed Feature
+ set_config('feed_enable', '0');
+ set_config('feed_limit', '10');
+
+ set_config('feed_overall_forums', '1');
+ set_config('feed_overall_forums_limit', '15');
+
+ set_config('feed_overall_topics', '0');
+ set_config('feed_overall_topics_limit', '15');
+
+ set_config('feed_forum', '1');
+ set_config('feed_topic', '1');
+ set_config('feed_item_statistics', '1');
+
+ // Entries for smiley pagination
+ set_config('smilies_per_page', '50');
+
+ // Entry for reporting PMs
+ set_config('allow_pm_report', '1');
+
+ // Install modules
+ $modules_to_install = array(
+ 'feed' => array(
+ 'base' => 'board',
+ 'class' => 'acp',
+ 'title' => 'ACP_FEED_SETTINGS',
+ 'auth' => 'acl_a_board',
+ 'cat' => 'ACP_BOARD_CONFIGURATION',
+ 'after' => array('signature', 'ACP_SIGNATURE_SETTINGS')
+ ),
+ 'warnings' => array(
+ 'base' => 'users',
+ 'class' => 'acp',
+ 'title' => 'ACP_USER_WARNINGS',
+ 'auth' => 'acl_a_user',
+ 'display' => 0,
+ 'cat' => 'ACP_CAT_USERS',
+ 'after' => array('feedback', 'ACP_USER_FEEDBACK')
+ ),
+ 'send_statistics' => array(
+ 'base' => 'send_statistics',
+ 'class' => 'acp',
+ 'title' => 'ACP_SEND_STATISTICS',
+ 'auth' => 'acl_a_server',
+ 'cat' => 'ACP_SERVER_CONFIGURATION'
+ ),
+ 'setting_forum_copy' => array(
+ 'base' => 'permissions',
+ 'class' => 'acp',
+ 'title' => 'ACP_FORUM_PERMISSIONS_COPY',
+ 'auth' => 'acl_a_fauth && acl_a_authusers && acl_a_authgroups && acl_a_mauth',
+ 'cat' => 'ACP_FORUM_BASED_PERMISSIONS',
+ 'after' => array('setting_forum_local', 'ACP_FORUM_PERMISSIONS')
+ ),
+ 'pm_reports' => array(
+ 'base' => 'pm_reports',
+ 'class' => 'mcp',
+ 'title' => 'MCP_PM_REPORTS_OPEN',
+ 'auth' => 'aclf_m_report',
+ 'cat' => 'MCP_REPORTS'
+ ),
+ 'pm_reports_closed' => array(
+ 'base' => 'pm_reports',
+ 'class' => 'mcp',
+ 'title' => 'MCP_PM_REPORTS_CLOSED',
+ 'auth' => 'aclf_m_report',
+ 'cat' => 'MCP_REPORTS'
+ ),
+ 'pm_report_details' => array(
+ 'base' => 'pm_reports',
+ 'class' => 'mcp',
+ 'title' => 'MCP_PM_REPORT_DETAILS',
+ 'auth' => 'aclf_m_report',
+ 'cat' => 'MCP_REPORTS'
+ ),
+ );
+
+ _add_modules($modules_to_install);
+
+ // Add newly_registered group... but check if it already exists (we always supported running the updater on any schema)
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = 'NEWLY_REGISTERED'";
+ $result = $db->sql_query($sql);
+ $group_id = (int) $db->sql_fetchfield('group_id');
+ $db->sql_freeresult($result);
+
+ if (!$group_id)
+ {
+ $sql = 'INSERT INTO ' . GROUPS_TABLE . " (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('NEWLY_REGISTERED', 3, 0, '', 0, '', '', '', 5)";
+ _sql($sql, $errored, $error_ary);
+
+ $group_id = $db->sql_nextid();
+ }
+
+ // Insert new user role... at the end of the chain
+ $sql = 'SELECT role_id
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_name = 'ROLE_USER_NEW_MEMBER'
+ AND role_type = 'u_'";
+ $result = $db->sql_query($sql);
+ $u_role = (int) $db->sql_fetchfield('role_id');
+ $db->sql_freeresult($result);
+
+ if (!$u_role)
+ {
+ $sql = 'SELECT MAX(role_order) as max_order_id
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_type = 'u_'";
+ $result = $db->sql_query($sql);
+ $next_order_id = (int) $db->sql_fetchfield('max_order_id');
+ $db->sql_freeresult($result);
+
+ $next_order_id++;
+
+ $sql = 'INSERT INTO ' . ACL_ROLES_TABLE . " (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_NEW_MEMBER', 'ROLE_DESCRIPTION_USER_NEW_MEMBER', 'u_', $next_order_id)";
+ _sql($sql, $errored, $error_ary);
+ $u_role = $db->sql_nextid();
+
+ if (!$errored)
+ {
+ // Now add the correct data to the roles...
+ // The standard role says that new users are not able to send a PM, Mass PM, are not able to PM groups
+ $sql = 'INSERT INTO ' . ACL_ROLES_DATA_TABLE . " (role_id, auth_option_id, auth_setting) SELECT $u_role, auth_option_id, 0 FROM " . ACL_OPTIONS_TABLE . " WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_sendpm', 'u_masspm', 'u_masspm_group')";
+ _sql($sql, $errored, $error_ary);
+
+ // Add user role to group
+ $sql = 'INSERT INTO ' . ACL_GROUPS_TABLE . " (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES ($group_id, 0, 0, $u_role, 0)";
+ _sql($sql, $errored, $error_ary);
+ }
+ }
+
+ // Insert new forum role
+ $sql = 'SELECT role_id
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_name = 'ROLE_FORUM_NEW_MEMBER'
+ AND role_type = 'f_'";
+ $result = $db->sql_query($sql);
+ $f_role = (int) $db->sql_fetchfield('role_id');
+ $db->sql_freeresult($result);
+
+ if (!$f_role)
+ {
+ $sql = 'SELECT MAX(role_order) as max_order_id
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_type = 'f_'";
+ $result = $db->sql_query($sql);
+ $next_order_id = (int) $db->sql_fetchfield('max_order_id');
+ $db->sql_freeresult($result);
+
+ $next_order_id++;
+
+ $sql = 'INSERT INTO ' . ACL_ROLES_TABLE . " (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_NEW_MEMBER', 'ROLE_DESCRIPTION_FORUM_NEW_MEMBER', 'f_', $next_order_id)";
+ _sql($sql, $errored, $error_ary);
+ $f_role = $db->sql_nextid();
+
+ if (!$errored)
+ {
+ $sql = 'INSERT INTO ' . ACL_ROLES_DATA_TABLE . " (role_id, auth_option_id, auth_setting) SELECT $f_role, auth_option_id, 0 FROM " . ACL_OPTIONS_TABLE . " WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_noapprove')";
+ _sql($sql, $errored, $error_ary);
+ }
+ }
+
+ // Set every members user_new column to 0 (old users) only if there is no one yet (this makes sure we do not execute this more than once)
+ $sql = 'SELECT 1
+ FROM ' . USERS_TABLE . '
+ WHERE user_new = 0';
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . ' SET user_new = 0';
+ _sql($sql, $errored, $error_ary);
+ }
+
+ // Newly registered users limit
+ if (!isset($config['new_member_post_limit']))
+ {
+ set_config('new_member_post_limit', (!empty($config['enable_queue_trigger'])) ? $config['queue_trigger_posts'] : 0);
+ }
+
+ if (!isset($config['new_member_group_default']))
+ {
+ set_config('new_member_group_default', 0);
+ }
+
+ // To mimick the old "feature" we will assign the forum role to every forum, regardless of the setting (this makes sure there are no "this does not work!!!! YUO!!!" posts...
+ // Check if the role is already assigned...
+ $sql = 'SELECT forum_id
+ FROM ' . ACL_GROUPS_TABLE . '
+ WHERE group_id = ' . $group_id . '
+ AND auth_role_id = ' . $f_role;
+ $result = $db->sql_query($sql);
+ $is_options = (int) $db->sql_fetchfield('forum_id');
+ $db->sql_freeresult($result);
+
+ // Not assigned at all... :/
+ if (!$is_options)
+ {
+ // Get postable forums
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_type != ' . FORUM_LINK;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ _sql('INSERT INTO ' . ACL_GROUPS_TABLE . ' (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (' . $group_id . ', ' . (int) $row['forum_id'] . ', 0, ' . $f_role . ', 0)', $errored, $error_ary);
+ }
+ $db->sql_freeresult($result);
+ }
+
+ // Clear permissions...
+ include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
+ $auth_admin = new auth_admin();
+ $auth_admin->acl_clear_prefetch();
+
+ if (!isset($config['allow_avatar']))
+ {
+ if ($config['allow_avatar_upload'] || $config['allow_avatar_local'] || $config['allow_avatar_remote'])
+ {
+ set_config('allow_avatar', '1');
+ }
+ else
+ {
+ set_config('allow_avatar', '0');
+ }
+ }
+
+ if (!isset($config['allow_avatar_remote_upload']))
+ {
+ if ($config['allow_avatar_remote'] && $config['allow_avatar_upload'])
+ {
+ set_config('allow_avatar_remote_upload', '1');
+ }
+ else
+ {
+ set_config('allow_avatar_remote_upload', '0');
+ }
+ }
+
+ // Minimum number of characters
+ if (!isset($config['min_post_chars']))
+ {
+ set_config('min_post_chars', '1');
+ }
+
+ if (!isset($config['allow_quick_reply']))
+ {
+ set_config('allow_quick_reply', '1');
+ }
+
+ // Set every members user_options column to enable
+ // bbcode, smilies and URLs for signatures by default
+ $sql = 'SELECT user_options
+ FROM ' . USERS_TABLE . '
+ WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')';
+ $result = $db->sql_query_limit($sql, 1);
+ $user_option = (int) $db->sql_fetchfield('user_options');
+ $db->sql_freeresult($result);
+
+ // Check if we already updated the database by checking bit 15 which we used to store the sig_bbcode option
+ if (!($user_option & 1 << 15))
+ {
+ // 229376 is the added value to enable all three signature options
+ $sql = 'UPDATE ' . USERS_TABLE . ' SET user_options = user_options + 229376';
+ _sql($sql, $errored, $error_ary);
+ }
+
+ if (!isset($config['delete_time']))
+ {
+ set_config('delete_time', $config['edit_time']);
+ }
+
+ $no_updates = false;
+ break;
+
+ // No changes from 3.0.6-RC1 to 3.0.6-RC2
+ case '3.0.6-RC1':
+ break;
+
+ // Changes from 3.0.6-RC2 to 3.0.6-RC3
+ case '3.0.6-RC2':
+
+ // Update the Custom Profile Fields based on previous settings to the new format
+ $sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . '
+ SET field_show_on_vt = 1
+ WHERE field_hide = 0
+ AND (field_required = 1 OR field_show_on_reg = 1 OR field_show_profile = 1)';
+ _sql($sql, $errored, $error_ary);
+ $no_updates = false;
+
+ break;
+ }
+}
+
+
+/**
+* Database Tools for handling cross-db actions such as altering columns, etc.
+* Currently not supported is returning SQL for creating tables.
+*
+* @package dbal
+*/
+class updater_db_tools
+{
+ /**
+ * Current sql layer
+ */
+ var $sql_layer = '';
+
+ /**
+ * @var object DB object
+ */
+ var $db = NULL;
+
+ /**
+ * The Column types for every database we support
+ * @var array
+ */
+ var $dbms_type_map = array(
+ 'mysql_41' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'mediumint(8) UNSIGNED',
+ 'UINT:' => 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'smallint(4) UNSIGNED',
+ 'BOOL' => 'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'text',
+ 'XSTEXT_UNI'=> 'varchar(100)',
+ 'STEXT' => 'text',
+ 'STEXT_UNI' => 'varchar(255)',
+ 'TEXT' => 'text',
+ 'TEXT_UNI' => 'text',
+ 'MTEXT' => 'mediumtext',
+ 'MTEXT_UNI' => 'mediumtext',
+ 'TIMESTAMP' => 'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar(255)',
+ 'VARBINARY' => 'varbinary(255)',
+ ),
+
+ 'mysql_40' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'mediumint(8) UNSIGNED',
+ 'UINT:' => 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'smallint(4) UNSIGNED',
+ 'BOOL' => 'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varbinary(255)',
+ 'VCHAR:' => 'varbinary(%d)',
+ 'CHAR:' => 'binary(%d)',
+ 'XSTEXT' => 'blob',
+ 'XSTEXT_UNI'=> 'blob',
+ 'STEXT' => 'blob',
+ 'STEXT_UNI' => 'blob',
+ 'TEXT' => 'blob',
+ 'TEXT_UNI' => 'blob',
+ 'MTEXT' => 'mediumblob',
+ 'MTEXT_UNI' => 'mediumblob',
+ 'TIMESTAMP' => 'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'blob',
+ 'VCHAR_UNI:'=> array('varbinary(%d)', 'limit' => array('mult', 3, 255, 'blob')),
+ 'VCHAR_CI' => 'blob',
+ 'VARBINARY' => 'varbinary(255)',
+ ),
+
+ 'firebird' => array(
+ 'INT:' => 'INTEGER',
+ 'BINT' => 'DOUBLE PRECISION',
+ 'UINT' => 'INTEGER',
+ 'UINT:' => 'INTEGER',
+ 'TINT:' => 'INTEGER',
+ 'USINT' => 'INTEGER',
+ 'BOOL' => 'INTEGER',
+ 'VCHAR' => 'VARCHAR(255) CHARACTER SET NONE',
+ 'VCHAR:' => 'VARCHAR(%d) CHARACTER SET NONE',
+ 'CHAR:' => 'CHAR(%d) CHARACTER SET NONE',
+ 'XSTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
+ 'STEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
+ 'TEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
+ 'MTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
+ 'XSTEXT_UNI'=> 'VARCHAR(100) CHARACTER SET UTF8',
+ 'STEXT_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
+ 'TEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
+ 'MTEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
+ 'TIMESTAMP' => 'INTEGER',
+ 'DECIMAL' => 'DOUBLE PRECISION',
+ 'DECIMAL:' => 'DOUBLE PRECISION',
+ 'PDECIMAL' => 'DOUBLE PRECISION',
+ 'PDECIMAL:' => 'DOUBLE PRECISION',
+ 'VCHAR_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
+ 'VCHAR_UNI:'=> 'VARCHAR(%d) CHARACTER SET UTF8',
+ 'VCHAR_CI' => 'VARCHAR(255) CHARACTER SET UTF8',
+ 'VARBINARY' => 'CHAR(255) CHARACTER SET NONE',
+ ),
+
+ 'mssql' => array(
+ 'INT:' => '[int]',
+ 'BINT' => '[float]',
+ 'UINT' => '[int]',
+ 'UINT:' => '[int]',
+ 'TINT:' => '[int]',
+ 'USINT' => '[int]',
+ 'BOOL' => '[int]',
+ 'VCHAR' => '[varchar] (255)',
+ 'VCHAR:' => '[varchar] (%d)',
+ 'CHAR:' => '[char] (%d)',
+ 'XSTEXT' => '[varchar] (1000)',
+ 'STEXT' => '[varchar] (3000)',
+ 'TEXT' => '[varchar] (8000)',
+ 'MTEXT' => '[text]',
+ 'XSTEXT_UNI'=> '[varchar] (100)',
+ 'STEXT_UNI' => '[varchar] (255)',
+ 'TEXT_UNI' => '[varchar] (4000)',
+ 'MTEXT_UNI' => '[text]',
+ 'TIMESTAMP' => '[int]',
+ 'DECIMAL' => '[float]',
+ 'DECIMAL:' => '[float]',
+ 'PDECIMAL' => '[float]',
+ 'PDECIMAL:' => '[float]',
+ 'VCHAR_UNI' => '[varchar] (255)',
+ 'VCHAR_UNI:'=> '[varchar] (%d)',
+ 'VCHAR_CI' => '[varchar] (255)',
+ 'VARBINARY' => '[varchar] (255)',
+ ),
+
+ 'oracle' => array(
+ 'INT:' => 'number(%d)',
+ 'BINT' => 'number(20)',
+ 'UINT' => 'number(8)',
+ 'UINT:' => 'number(%d)',
+ 'TINT:' => 'number(%d)',
+ 'USINT' => 'number(4)',
+ 'BOOL' => 'number(1)',
+ 'VCHAR' => 'varchar2(255)',
+ 'VCHAR:' => 'varchar2(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'varchar2(1000)',
+ 'STEXT' => 'varchar2(3000)',
+ 'TEXT' => 'clob',
+ 'MTEXT' => 'clob',
+ 'XSTEXT_UNI'=> 'varchar2(300)',
+ 'STEXT_UNI' => 'varchar2(765)',
+ 'TEXT_UNI' => 'clob',
+ 'MTEXT_UNI' => 'clob',
+ 'TIMESTAMP' => 'number(11)',
+ 'DECIMAL' => 'number(5, 2)',
+ 'DECIMAL:' => 'number(%d, 2)',
+ 'PDECIMAL' => 'number(6, 3)',
+ 'PDECIMAL:' => 'number(%d, 3)',
+ 'VCHAR_UNI' => 'varchar2(765)',
+ 'VCHAR_UNI:'=> array('varchar2(%d)', 'limit' => array('mult', 3, 765, 'clob')),
+ 'VCHAR_CI' => 'varchar2(255)',
+ 'VARBINARY' => 'raw(255)',
+ ),
+
+ 'sqlite' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'INTEGER UNSIGNED', //'mediumint(8) UNSIGNED',
+ 'UINT:' => 'INTEGER UNSIGNED', // 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'INTEGER UNSIGNED', //'mediumint(4) UNSIGNED',
+ 'BOOL' => 'INTEGER UNSIGNED', //'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'text(65535)',
+ 'STEXT' => 'text(65535)',
+ 'TEXT' => 'text(65535)',
+ 'MTEXT' => 'mediumtext(16777215)',
+ 'XSTEXT_UNI'=> 'text(65535)',
+ 'STEXT_UNI' => 'text(65535)',
+ 'TEXT_UNI' => 'text(65535)',
+ 'MTEXT_UNI' => 'mediumtext(16777215)',
+ 'TIMESTAMP' => 'INTEGER UNSIGNED', //'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar(255)',
+ 'VARBINARY' => 'blob',
+ ),
+
+ 'postgres' => array(
+ 'INT:' => 'INT4',
+ 'BINT' => 'INT8',
+ 'UINT' => 'INT4', // unsigned
+ 'UINT:' => 'INT4', // unsigned
+ 'USINT' => 'INT2', // unsigned
+ 'BOOL' => 'INT2', // unsigned
+ 'TINT:' => 'INT2',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'varchar(1000)',
+ 'STEXT' => 'varchar(3000)',
+ 'TEXT' => 'varchar(8000)',
+ 'MTEXT' => 'TEXT',
+ 'XSTEXT_UNI'=> 'varchar(100)',
+ 'STEXT_UNI' => 'varchar(255)',
+ 'TEXT_UNI' => 'varchar(4000)',
+ 'MTEXT_UNI' => 'TEXT',
+ 'TIMESTAMP' => 'INT4', // unsigned
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar_ci',
+ 'VARBINARY' => 'bytea',
+ ),
+ );
+
+ /**
+ * A list of types being unsigned for better reference in some db's
+ * @var array
+ */
+ var $unsigned_types = array('UINT', 'UINT:', 'USINT', 'BOOL', 'TIMESTAMP');
+
+ /**
+ * A list of supported DBMS. We change this class to support more DBMS, the DBMS itself only need to follow some rules.
+ * @var array
+ */
+ var $supported_dbms = array('firebird', 'mssql', 'mysql_40', 'mysql_41', 'oracle', 'postgres', 'sqlite');
+
+ /**
+ * This is set to true if user only wants to return the 'to-be-executed' SQL statement(s) (as an array).
+ * This mode has no effect on some methods (inserting of data for example). This is expressed within the methods command.
+ */
+ var $return_statements = false;
+
+ /**
+ * Constructor. Set DB Object and set {@link $return_statements return_statements}.
+ *
+ * @param phpbb_dbal $db DBAL object
+ * @param bool $return_statements True if only statements should be returned and no SQL being executed
+ */
+ function updater_db_tools(&$db, $return_statements = false)
+ {
+ $this->db = $db;
+ $this->return_statements = $return_statements;
+
+ // Determine mapping database type
+ switch ($this->db->sql_layer)
+ {
+ case 'mysql':
+ $this->sql_layer = 'mysql_40';
+ break;
+
+ case 'mysql4':
+ if (version_compare($this->db->sql_server_info(true), '4.1.3', '>='))
+ {
+ $this->sql_layer = 'mysql_41';
+ }
+ else
+ {
+ $this->sql_layer = 'mysql_40';
+ }
+ break;
+
+ case 'mysqli':
+ $this->sql_layer = 'mysql_41';
+ break;
+
+ case 'mssql':
+ case 'mssql_odbc':
+ $this->sql_layer = 'mssql';
+ break;
+
+ default:
+ $this->sql_layer = $this->db->sql_layer;
+ break;
+ }
+ }
+
+ /**
+ * Handle passed database update array.
+ * Expected structure...
+ * Key being one of the following
+ * change_columns: Column changes (only type, not name)
+ * add_columns: Add columns to a table
+ * drop_keys: Dropping keys
+ * drop_columns: Removing/Dropping columns
+ * add_primary_keys: adding primary keys
+ * add_unique_index: adding an unique index
+ * add_index: adding an index
+ *
+ * The values are in this format:
+ * {TABLE NAME} => array(
+ * {COLUMN NAME} => array({COLUMN TYPE}, {DEFAULT VALUE}, {OPTIONAL VARIABLES}),
+ * {KEY/INDEX NAME} => array({COLUMN NAMES}),
+ * )
+ *
+ * For more information have a look at /develop/create_schema_files.php (only available through SVN)
+ */
+ function perform_schema_changes($schema_changes)
+ {
+ if (empty($schema_changes))
+ {
+ return;
+ }
+
+ $statements = array();
+ $sqlite = false;
+
+ // For SQLite we need to perform the schema changes in a much more different way
+ if ($this->db->sql_layer == 'sqlite' && $this->return_statements)
+ {
+ $sqlite_data = array();
+ $sqlite = true;
+ }
+
+ // Change columns?
+ if (!empty($schema_changes['change_columns']))
+ {
+ foreach ($schema_changes['change_columns'] as $table => $columns)
+ {
+ foreach ($columns as $column_name => $column_data)
+ {
+ // If the column exists we change it, else we add it ;)
+ if ($column_exists = $this->sql_column_exists($table, $column_name))
+ {
+ $result = $this->sql_column_change($table, $column_name, $column_data, true);
+ }
+ else
+ {
+ $result = $this->sql_column_add($table, $column_name, $column_data, true);
+ }
+
+ if ($sqlite)
+ {
+ if ($column_exists)
+ {
+ $sqlite_data[$table]['change_columns'][] = $result;
+ }
+ else
+ {
+ $sqlite_data[$table]['add_columns'][] = $result;
+ }
+ }
+ else if ($this->return_statements)
+ {
+ $statements = array_merge($statements, $result);
+ }
+ }
+ }
+ }
+
+ // Add columns?
+ if (!empty($schema_changes['add_columns']))
+ {
+ foreach ($schema_changes['add_columns'] as $table => $columns)
+ {
+ foreach ($columns as $column_name => $column_data)
+ {
+ // Only add the column if it does not exist yet
+ if ($column_exists = $this->sql_column_exists($table, $column_name))
+ {
+ continue;
+ // This is commented out here because it can take tremendous time on updates
+// $result = $this->sql_column_change($table, $column_name, $column_data, true);
+ }
+ else
+ {
+ $result = $this->sql_column_add($table, $column_name, $column_data, true);
+ }
+
+ if ($sqlite)
+ {
+ if ($column_exists)
+ {
+ continue;
+// $sqlite_data[$table]['change_columns'][] = $result;
+ }
+ else
+ {
+ $sqlite_data[$table]['add_columns'][] = $result;
+ }
+ }
+ else if ($this->return_statements)
+ {
+ $statements = array_merge($statements, $result);
+ }
+ }
+ }
+ }
+
+ // Remove keys?
+ if (!empty($schema_changes['drop_keys']))
+ {
+ foreach ($schema_changes['drop_keys'] as $table => $indexes)
+ {
+ foreach ($indexes as $index_name)
+ {
+ if (!$this->sql_index_exists($table, $index_name))
+ {
+ continue;
+ }
+
+ $result = $this->sql_index_drop($table, $index_name);
+
+ if ($this->return_statements)
+ {
+ $statements = array_merge($statements, $result);
+ }
+ }
+ }
+ }
+
+ // Drop columns?
+ if (!empty($schema_changes['drop_columns']))
+ {
+ foreach ($schema_changes['drop_columns'] as $table => $columns)
+ {
+ foreach ($columns as $column)
+ {
+ // Only remove the column if it exists...
+ if ($this->sql_column_exists($table, $column))
+ {
+ $result = $this->sql_column_remove($table, $column, true);
+
+ if ($sqlite)
+ {
+ $sqlite_data[$table]['drop_columns'][] = $result;
+ }
+ else if ($this->return_statements)
+ {
+ $statements = array_merge($statements, $result);
+ }
+ }
+ }
+ }
+ }
+
+ // Add primary keys?
+ if (!empty($schema_changes['add_primary_keys']))
+ {
+ foreach ($schema_changes['add_primary_keys'] as $table => $columns)
+ {
+ $result = $this->sql_create_primary_key($table, $columns, true);
+
+ if ($sqlite)
+ {
+ $sqlite_data[$table]['primary_key'] = $result;
+ }
+ else if ($this->return_statements)
+ {
+ $statements = array_merge($statements, $result);
+ }
+ }
+ }
+
+ // Add unqiue indexes?
+ if (!empty($schema_changes['add_unique_index']))
+ {
+ foreach ($schema_changes['add_unique_index'] as $table => $index_array)
+ {
+ foreach ($index_array as $index_name => $column)
+ {
+ if ($this->sql_unique_index_exists($table, $index_name))
+ {
+ continue;
+ }
+
+ $result = $this->sql_create_unique_index($table, $index_name, $column);
+
+ if ($this->return_statements)
+ {
+ $statements = array_merge($statements, $result);
+ }
+ }
+ }
+ }
+
+ // Add indexes?
+ if (!empty($schema_changes['add_index']))
+ {
+ foreach ($schema_changes['add_index'] as $table => $index_array)
+ {
+ foreach ($index_array as $index_name => $column)
+ {
+ if ($this->sql_index_exists($table, $index_name))
+ {
+ continue;
+ }
+
+ $result = $this->sql_create_index($table, $index_name, $column);
+
+ if ($this->return_statements)
+ {
+ $statements = array_merge($statements, $result);
+ }
+ }
+ }
+ }
+
+ if ($sqlite)
+ {
+ foreach ($sqlite_data as $table_name => $sql_schema_changes)
+ {
+ // Create temporary table with original data
+ $statements[] = 'begin';
+
+ $sql = "SELECT sql
+ FROM sqlite_master
+ WHERE type = 'table'
+ AND name = '{$table_name}'
+ ORDER BY type DESC, name;";
+ $result = $this->db->sql_query($sql);
+
+ if (!$result)
+ {
+ continue;
+ }
+
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ // Create a backup table and populate it, destroy the existing one
+ $statements[] = preg_replace('#CREATE\s+TABLE\s+"?' . $table_name . '"?#i', 'CREATE TEMPORARY TABLE ' . $table_name . '_temp', $row['sql']);
+ $statements[] = 'INSERT INTO ' . $table_name . '_temp SELECT * FROM ' . $table_name;
+ $statements[] = 'DROP TABLE ' . $table_name;
+
+ // Get the columns...
+ preg_match('#\((.*)\)#s', $row['sql'], $matches);
+
+ $plain_table_cols = trim($matches[1]);
+ $new_table_cols = preg_split('/,(?![\s\w]+\))/m', $plain_table_cols);
+ $column_list = array();
+
+ foreach ($new_table_cols as $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if ($entities[0] == 'PRIMARY')
+ {
+ continue;
+ }
+ $column_list[] = $entities[0];
+ }
+
+ // note down the primary key notation because sqlite only supports adding it to the end for the new table
+ $primary_key = false;
+ $_new_cols = array();
+
+ foreach ($new_table_cols as $key => $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if ($entities[0] == 'PRIMARY')
+ {
+ $primary_key = $declaration;
+ continue;
+ }
+ $_new_cols[] = $declaration;
+ }
+
+ $new_table_cols = $_new_cols;
+
+ // First of all... change columns
+ if (!empty($sql_schema_changes['change_columns']))
+ {
+ foreach ($sql_schema_changes['change_columns'] as $column_sql)
+ {
+ foreach ($new_table_cols as $key => $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if (strpos($column_sql, $entities[0] . ' ') === 0)
+ {
+ $new_table_cols[$key] = $column_sql;
+ }
+ }
+ }
+ }
+
+ if (!empty($sql_schema_changes['add_columns']))
+ {
+ foreach ($sql_schema_changes['add_columns'] as $column_sql)
+ {
+ $new_table_cols[] = $column_sql;
+ }
+ }
+
+ // Now drop them...
+ if (!empty($sql_schema_changes['drop_columns']))
+ {
+ foreach ($sql_schema_changes['drop_columns'] as $column_name)
+ {
+ // Remove from column list...
+ $new_column_list = array();
+ foreach ($column_list as $key => $value)
+ {
+ if ($value === $column_name)
+ {
+ continue;
+ }
+
+ $new_column_list[] = $value;
+ }
+
+ $column_list = $new_column_list;
+
+ // Remove from table...
+ $_new_cols = array();
+ foreach ($new_table_cols as $key => $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if (strpos($column_name . ' ', $entities[0] . ' ') === 0)
+ {
+ continue;
+ }
+ $_new_cols[] = $declaration;
+ }
+ $new_table_cols = $_new_cols;
+ }
+ }
+
+ // Primary key...
+ if (!empty($sql_schema_changes['primary_key']))
+ {
+ $new_table_cols[] = 'PRIMARY KEY (' . implode(', ', $sql_schema_changes['primary_key']) . ')';
+ }
+ // Add a new one or the old primary key
+ else if ($primary_key !== false)
+ {
+ $new_table_cols[] = $primary_key;
+ }
+
+ $columns = implode(',', $column_list);
+
+ // create a new table and fill it up. destroy the temp one
+ $statements[] = 'CREATE TABLE ' . $table_name . ' (' . implode(',', $new_table_cols) . ');';
+ $statements[] = 'INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;';
+ $statements[] = 'DROP TABLE ' . $table_name . '_temp';
+
+ $statements[] = 'commit';
+ }
+ }
+
+ if ($this->return_statements)
+ {
+ return $statements;
+ }
+ }
+
+ /**
+ * Check if a specified column exist
+ *
+ * @param string $table Table to check the column at
+ * @param string $column_name The column to check
+ *
+ * @return bool True if column exists, else false
+ */
+ function sql_column_exists($table, $column_name)
+ {
+ switch ($this->sql_layer)
+ {
+ case 'mysql_40':
+ case 'mysql_41':
+
+ $sql = "SHOW COLUMNS FROM $table";
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // lower case just in case
+ if (strtolower($row['Field']) == $column_name)
+ {
+ $this->db->sql_freeresult($result);
+ return true;
+ }
+ }
+ $this->db->sql_freeresult($result);
+ return false;
+ break;
+
+ // PostgreSQL has a way of doing this in a much simpler way but would
+ // not allow us to support all versions of PostgreSQL
+ case 'postgres':
+ $sql = "SELECT a.attname
+ FROM pg_class c, pg_attribute a
+ WHERE c.relname = '{$table}'
+ AND a.attnum > 0
+ AND a.attrelid = c.oid";
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // lower case just in case
+ if (strtolower($row['attname']) == $column_name)
+ {
+ $this->db->sql_freeresult($result);
+ return true;
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ return false;
+ break;
+
+ // same deal with PostgreSQL, we must perform more complex operations than
+ // we technically could
+ case 'mssql':
+ $sql = "SELECT c.name
+ FROM syscolumns c
+ LEFT JOIN sysobjects o ON c.id = o.id
+ WHERE o.name = '{$table}'";
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // lower case just in case
+ if (strtolower($row['name']) == $column_name)
+ {
+ $this->db->sql_freeresult($result);
+ return true;
+ }
+ }
+ $this->db->sql_freeresult($result);
+ return false;
+ break;
+
+ case 'oracle':
+ $sql = "SELECT column_name
+ FROM user_tab_columns
+ WHERE LOWER(table_name) = '" . strtolower($table) . "'";
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // lower case just in case
+ if (strtolower($row['column_name']) == $column_name)
+ {
+ $this->db->sql_freeresult($result);
+ return true;
+ }
+ }
+ $this->db->sql_freeresult($result);
+ return false;
+ break;
+
+ case 'firebird':
+ $sql = "SELECT RDB\$FIELD_NAME as FNAME
+ FROM RDB\$RELATION_FIELDS
+ WHERE RDB\$RELATION_NAME = '" . strtoupper($table) . "'";
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // lower case just in case
+ if (strtolower($row['fname']) == $column_name)
+ {
+ $this->db->sql_freeresult($result);
+ return true;
+ }
+ }
+ $this->db->sql_freeresult($result);
+ return false;
+ break;
+
+ // ugh, SQLite
+ case 'sqlite':
+ $sql = "SELECT sql
+ FROM sqlite_master
+ WHERE type = 'table'
+ AND name = '{$table}'";
+ $result = $this->db->sql_query($sql);
+
+ if (!$result)
+ {
+ return false;
+ }
+
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ preg_match('#\((.*)\)#s', $row['sql'], $matches);
+
+ $cols = trim($matches[1]);
+ $col_array = preg_split('/,(?![\s\w]+\))/m', $cols);
+
+ foreach ($col_array as $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if ($entities[0] == 'PRIMARY')
+ {
+ continue;
+ }
+
+ if (strtolower($entities[0]) == $column_name)
+ {
+ return true;
+ }
+ }
+ return false;
+ break;
+ }
+ }
+
+ /**
+ * Check if a specified index exists in table. Does not return PRIMARY KEY and UNIQUE indexes.
+ *
+ * @param string $table_name Table to check the index at
+ * @param string $index_name The index name to check
+ *
+ * @return bool True if index exists, else false
+ */
+ function sql_index_exists($table_name, $index_name)
+ {
+ if ($this->sql_layer == 'mssql')
+ {
+ $sql = "EXEC sp_statistics '$table_name'";
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if ($row['TYPE'] == 3)
+ {
+ if (strtolower($row['INDEX_NAME']) == strtolower($index_name))
+ {
+ $this->db->sql_freeresult($result);
+ return true;
+ }
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ return false;
+ }
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ $sql = "SELECT LOWER(RDB\$INDEX_NAME) as index_name
+ FROM RDB\$INDICES
+ WHERE RDB\$RELATION_NAME = '" . strtoupper($table_name) . "'
+ AND RDB\$UNIQUE_FLAG IS NULL
+ AND RDB\$FOREIGN_KEY IS NULL";
+ $col = 'index_name';
+ break;
+
+ case 'postgres':
+ $sql = "SELECT ic.relname as index_name
+ FROM pg_class bc, pg_class ic, pg_index i
+ WHERE (bc.oid = i.indrelid)
+ AND (ic.oid = i.indexrelid)
+ AND (bc.relname = '" . $table_name . "')
+ AND (i.indisunique != 't')
+ AND (i.indisprimary != 't')";
+ $col = 'index_name';
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $sql = 'SHOW KEYS
+ FROM ' . $table_name;
+ $col = 'Key_name';
+ break;
+
+ case 'oracle':
+ $sql = "SELECT index_name
+ FROM user_indexes
+ WHERE table_name = '" . strtoupper($table_name) . "'
+ AND generated = 'N'
+ AND uniqueness = 'NONUNIQUE'";
+ $col = 'index_name';
+ break;
+
+ case 'sqlite':
+ $sql = "PRAGMA index_list('" . $table_name . "');";
+ $col = 'name';
+ break;
+ }
+
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if (($this->sql_layer == 'mysql_40' || $this->sql_layer == 'mysql_41') && !$row['Non_unique'])
+ {
+ continue;
+ }
+
+ // These DBMS prefix index name with the table name
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ case 'oracle':
+ case 'postgres':
+ case 'sqlite':
+ $row[$col] = substr($row[$col], strlen($table_name) + 1);
+ break;
+ }
+
+ if (strtolower($row[$col]) == strtolower($index_name))
+ {
+ $this->db->sql_freeresult($result);
+ return true;
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ return false;
+ }
+
+ /**
+ * Check if a specified UNIQUE index exists in table.
+ *
+ * @param string $table_name Table to check the index at
+ * @param string $index_name The index name to check
+ *
+ * @return bool True if index exists, else false
+ */
+ function sql_unique_index_exists($table_name, $index_name)
+ {
+ if ($this->sql_layer == 'mssql')
+ {
+ $sql = "EXEC sp_statistics '$table_name'";
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // Usually NON_UNIQUE is the column we want to check, but we allow for both
+ if ($row['TYPE'] == 3)
+ {
+ if (strtolower($row['INDEX_NAME']) == strtolower($index_name))
+ {
+ $this->db->sql_freeresult($result);
+ return true;
+ }
+ }
+ }
+ $this->db->sql_freeresult($result);
+ return false;
+ }
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ $sql = "SELECT LOWER(RDB\$INDEX_NAME) as index_name
+ FROM RDB\$INDICES
+ WHERE RDB\$RELATION_NAME = '" . strtoupper($table_name) . "'
+ AND RDB\$UNIQUE_FLAG IS NOT NULL
+ AND RDB\$FOREIGN_KEY IS NULL";
+ $col = 'index_name';
+ break;
+
+ case 'postgres':
+ $sql = "SELECT ic.relname as index_name, i.indisunique
+ FROM pg_class bc, pg_class ic, pg_index i
+ WHERE (bc.oid = i.indrelid)
+ AND (ic.oid = i.indexrelid)
+ AND (bc.relname = '" . $table_name . "')
+ AND (i.indisprimary != 't')";
+ $col = 'index_name';
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $sql = 'SHOW KEYS
+ FROM ' . $table_name;
+ $col = 'Key_name';
+ break;
+
+ case 'oracle':
+ $sql = "SELECT index_name, table_owner
+ FROM user_indexes
+ WHERE table_name = '" . strtoupper($table_name) . "'
+ AND generated = 'N'
+ AND uniqueness = 'UNIQUE'
+ AND index_name LIKE 'U_%'";
+ $col = 'index_name';
+ break;
+
+ case 'sqlite':
+ $sql = "PRAGMA index_list('" . $table_name . "') WHERE unique = 1;";
+ $col = 'name';
+ break;
+ }
+
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if (($this->sql_layer == 'mysql_40' || $this->sql_layer == 'mysql_41') && ($row['Non_unique'] || $row[$col] == 'PRIMARY'))
+ {
+ continue;
+ }
+
+ if ($this->sql_layer == 'sqlite' && !$row['unique'])
+ {
+ continue;
+ }
+
+ if ($this->sql_layer == 'postgres' && $row['indisunique'] != 't')
+ {
+ continue;
+ }
+
+ // These DBMS prefix index name with the table name
+ switch ($this->sql_layer)
+ {
+ case 'oracle':
+ $row[$col] = substr($row[$col], strlen('U_' . $row['table_owner']) + 1);
+ break;
+
+ case 'firebird':
+ case 'postgres':
+ case 'sqlite':
+ $row[$col] = substr($row[$col], strlen($table_name) + 1);
+ break;
+ }
+
+ if (strtolower($row[$col]) == strtolower($index_name))
+ {
+ $this->db->sql_freeresult($result);
+ return true;
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ return false;
+ }
+
+ /**
+ * Private method for performing sql statements (either execute them or return them)
+ * @access private
+ */
+ function _sql_run_sql($statements)
+ {
+ if ($this->return_statements)
+ {
+ return $statements;
+ }
+
+ // We could add error handling here...
+ foreach ($statements as $sql)
+ {
+ if ($sql === 'begin')
+ {
+ $this->db->sql_transaction('begin');
+ }
+ else if ($sql === 'commit')
+ {
+ $this->db->sql_transaction('commit');
+ }
+ else
+ {
+ $this->db->sql_query($sql);
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Function to prepare some column information for better usage
+ * @access private
+ */
+ function sql_prepare_column_data($table_name, $column_name, $column_data)
+ {
+ // Get type
+ if (strpos($column_data[0], ':') !== false)
+ {
+ list($orig_column_type, $column_length) = explode(':', $column_data[0]);
+ if (!is_array($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']))
+ {
+ $column_type = sprintf($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':'], $column_length);
+ }
+ else
+ {
+ if (isset($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['rule']))
+ {
+ switch ($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['rule'][0])
+ {
+ case 'div':
+ $column_length /= $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['rule'][1];
+ $column_length = ceil($column_length);
+ $column_type = sprintf($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':'][0], $column_length);
+ break;
+ }
+ }
+
+ if (isset($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit']))
+ {
+ switch ($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][0])
+ {
+ case 'mult':
+ $column_length *= $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][1];
+ if ($column_length > $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][2])
+ {
+ $column_type = $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][3];
+ }
+ else
+ {
+ $column_type = sprintf($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':'][0], $column_length);
+ }
+ break;
+ }
+ }
+ }
+ $orig_column_type .= ':';
+ }
+ else
+ {
+ $orig_column_type = $column_data[0];
+ $column_type = $this->dbms_type_map[$this->sql_layer][$column_data[0]];
+ }
+
+ // Adjust default value if db-dependant specified
+ if (is_array($column_data[1]))
+ {
+ $column_data[1] = (isset($column_data[1][$this->sql_layer])) ? $column_data[1][$this->sql_layer] : $column_data[1]['default'];
+ }
+
+ $sql = '';
+
+ $return_array = array();
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ $sql .= " {$column_type} ";
+ $return_array['column_type_sql_type'] = " {$column_type} ";
+
+ if (!is_null($column_data[1]))
+ {
+ $sql .= 'DEFAULT ' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ' ';
+ $return_array['column_type_sql_default'] = ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ' ';
+ }
+
+ $sql .= 'NOT NULL';
+
+ // This is a UNICODE column and thus should be given it's fair share
+ if (preg_match('/^X?STEXT_UNI|VCHAR_(CI|UNI:?)/', $column_data[0]))
+ {
+ $sql .= ' COLLATE UNICODE';
+ }
+
+ $return_array['auto_increment'] = false;
+ if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
+ {
+ $return_array['auto_increment'] = true;
+ }
+
+ break;
+
+ case 'mssql':
+ $sql .= " {$column_type} ";
+ $sql_default = " {$column_type} ";
+
+ // For adding columns we need the default definition
+ if (!is_null($column_data[1]))
+ {
+ // For hexadecimal values do not use single quotes
+ if (strpos($column_data[1], '0x') === 0)
+ {
+ $return_array['default'] = 'DEFAULT (' . $column_data[1] . ') ';
+ $sql_default .= $return_array['default'];
+ }
+ else
+ {
+ $return_array['default'] = 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') ';
+ $sql_default .= $return_array['default'];
+ }
+ }
+
+ if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
+ {
+// $sql .= 'IDENTITY (1, 1) ';
+ $sql_default .= 'IDENTITY (1, 1) ';
+ }
+
+ $return_array['textimage'] = $column_type === '[text]';
+
+ $sql .= 'NOT NULL';
+ $sql_default .= 'NOT NULL';
+
+ $return_array['column_type_sql_default'] = $sql_default;
+
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $sql .= " {$column_type} ";
+
+ // For hexadecimal values do not use single quotes
+ if (!is_null($column_data[1]) && substr($column_type, -4) !== 'text' && substr($column_type, -4) !== 'blob')
+ {
+ $sql .= (strpos($column_data[1], '0x') === 0) ? "DEFAULT {$column_data[1]} " : "DEFAULT '{$column_data[1]}' ";
+ }
+ $sql .= 'NOT NULL';
+
+ if (isset($column_data[2]))
+ {
+ if ($column_data[2] == 'auto_increment')
+ {
+ $sql .= ' auto_increment';
+ }
+ else if ($this->sql_layer === 'mysql_41' && $column_data[2] == 'true_sort')
+ {
+ $sql .= ' COLLATE utf8_unicode_ci';
+ }
+ }
+
+ break;
+
+ case 'oracle':
+ $sql .= " {$column_type} ";
+ $sql .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}' " : '';
+
+ // In Oracle empty strings ('') are treated as NULL.
+ // Therefore in oracle we allow NULL's for all DEFAULT '' entries
+ // Oracle does not like setting NOT NULL on a column that is already NOT NULL (this happens only on number fields)
+ if (!preg_match('/number/i', $column_type))
+ {
+ $sql .= ($column_data[1] === '') ? '' : 'NOT NULL';
+ }
+
+ $return_array['auto_increment'] = false;
+ if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
+ {
+ $return_array['auto_increment'] = true;
+ }
+
+ break;
+
+ case 'postgres':
+ $return_array['column_type'] = $column_type;
+
+ $sql .= " {$column_type} ";
+
+ $return_array['auto_increment'] = false;
+ if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
+ {
+ $default_val = "nextval('{$table_name}_seq')";
+ $return_array['auto_increment'] = true;
+ }
+ else if (!is_null($column_data[1]))
+ {
+ $default_val = "'" . $column_data[1] . "'";
+ $return_array['null'] = 'NOT NULL';
+ $sql .= 'NOT NULL ';
+ }
+
+ $return_array['default'] = $default_val;
+
+ $sql .= "DEFAULT {$default_val}";
+
+ // Unsigned? Then add a CHECK contraint
+ if (in_array($orig_column_type, $this->unsigned_types))
+ {
+ $return_array['constraint'] = "CHECK ({$column_name} >= 0)";
+ $sql .= " CHECK ({$column_name} >= 0)";
+ }
+
+ break;
+
+ case 'sqlite':
+ $return_array['primary_key_set'] = false;
+ if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
+ {
+ $sql .= ' INTEGER PRIMARY KEY';
+ $return_array['primary_key_set'] = true;
+ }
+ else
+ {
+ $sql .= ' ' . $column_type;
+ }
+
+ $sql .= ' NOT NULL ';
+ $sql .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}'" : '';
+
+ break;
+ }
+
+ $return_array['column_type_sql'] = $sql;
+
+ return $return_array;
+ }
+
+ /**
+ * Add new column
+ */
+ function sql_column_add($table_name, $column_name, $column_data, $inline = false)
+ {
+ $column_data = $this->sql_prepare_column_data($table_name, $column_name, $column_data);
+ $statements = array();
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ // Does not support AFTER statement, only POSITION (and there you need the column position)
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ADD "' . strtoupper($column_name) . '" ' . $column_data['column_type_sql'];
+ break;
+
+ case 'mssql':
+ // Does not support AFTER, only through temporary table
+ $statements[] = 'ALTER TABLE [' . $table_name . '] ADD [' . $column_name . '] ' . $column_data['column_type_sql_default'];
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $after = (!empty($column_data['after'])) ? ' AFTER ' . $column_data['after'] : '';
+ $statements[] = 'ALTER TABLE `' . $table_name . '` ADD COLUMN `' . $column_name . '` ' . $column_data['column_type_sql'] . $after;
+ break;
+
+ case 'oracle':
+ // Does not support AFTER, only through temporary table
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ADD ' . $column_name . ' ' . $column_data['column_type_sql'];
+ break;
+
+ case 'postgres':
+ // Does not support AFTER, only through temporary table
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ADD COLUMN "' . $column_name . '" ' . $column_data['column_type_sql'];
+ break;
+
+ case 'sqlite':
+
+ if ($inline && $this->return_statements)
+ {
+ return $column_name . ' ' . $column_data['column_type_sql'];
+ }
+
+ if (version_compare(sqlite_libversion(), '3.0') == -1)
+ {
+ $sql = "SELECT sql
+ FROM sqlite_master
+ WHERE type = 'table'
+ AND name = '{$table_name}'
+ ORDER BY type DESC, name;";
+ $result = $this->db->sql_query($sql);
+
+ if (!$result)
+ {
+ break;
+ }
+
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $statements[] = 'begin';
+
+ // Create a backup table and populate it, destroy the existing one
+ $statements[] = preg_replace('#CREATE\s+TABLE\s+"?' . $table_name . '"?#i', 'CREATE TEMPORARY TABLE ' . $table_name . '_temp', $row['sql']);
+ $statements[] = 'INSERT INTO ' . $table_name . '_temp SELECT * FROM ' . $table_name;
+ $statements[] = 'DROP TABLE ' . $table_name;
+
+ preg_match('#\((.*)\)#s', $row['sql'], $matches);
+
+ $new_table_cols = trim($matches[1]);
+ $old_table_cols = preg_split('/,(?![\s\w]+\))/m', $new_table_cols);
+ $column_list = array();
+
+ foreach ($old_table_cols as $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if ($entities[0] == 'PRIMARY')
+ {
+ continue;
+ }
+ $column_list[] = $entities[0];
+ }
+
+ $columns = implode(',', $column_list);
+
+ $new_table_cols = $column_name . ' ' . $column_data['column_type_sql'] . ',' . $new_table_cols;
+
+ // create a new table and fill it up. destroy the temp one
+ $statements[] = 'CREATE TABLE ' . $table_name . ' (' . $new_table_cols . ');';
+ $statements[] = 'INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;';
+ $statements[] = 'DROP TABLE ' . $table_name . '_temp';
+
+ $statements[] = 'commit';
+ }
+ else
+ {
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ADD ' . $column_name . ' [' . $column_data['column_type_sql'] . ']';
+ }
+ break;
+ }
+
+ return $this->_sql_run_sql($statements);
+ }
+
+ /**
+ * Drop column
+ */
+ function sql_column_remove($table_name, $column_name, $inline = false)
+ {
+ $statements = array();
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ $statements[] = 'ALTER TABLE ' . $table_name . ' DROP "' . strtoupper($column_name) . '"';
+ break;
+
+ case 'mssql':
+ $statements[] = 'ALTER TABLE [' . $table_name . '] DROP COLUMN [' . $column_name . ']';
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $statements[] = 'ALTER TABLE `' . $table_name . '` DROP COLUMN `' . $column_name . '`';
+ break;
+
+ case 'oracle':
+ $statements[] = 'ALTER TABLE ' . $table_name . ' DROP ' . $column_name;
+ break;
+
+ case 'postgres':
+ $statements[] = 'ALTER TABLE ' . $table_name . ' DROP COLUMN "' . $column_name . '"';
+ break;
+
+ case 'sqlite':
+
+ if ($inline && $this->return_statements)
+ {
+ return $column_name;
+ }
+
+ if (version_compare(sqlite_libversion(), '3.0') == -1)
+ {
+ $sql = "SELECT sql
+ FROM sqlite_master
+ WHERE type = 'table'
+ AND name = '{$table_name}'
+ ORDER BY type DESC, name;";
+ $result = $this->db->sql_query($sql);
+
+ if (!$result)
+ {
+ break;
+ }
+
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $statements[] = 'begin';
+
+ // Create a backup table and populate it, destroy the existing one
+ $statements[] = preg_replace('#CREATE\s+TABLE\s+"?' . $table_name . '"?#i', 'CREATE TEMPORARY TABLE ' . $table_name . '_temp', $row['sql']);
+ $statements[] = 'INSERT INTO ' . $table_name . '_temp SELECT * FROM ' . $table_name;
+ $statements[] = 'DROP TABLE ' . $table_name;
+
+ preg_match('#\((.*)\)#s', $row['sql'], $matches);
+
+ $new_table_cols = trim($matches[1]);
+ $old_table_cols = preg_split('/,(?![\s\w]+\))/m', $new_table_cols);
+ $column_list = array();
+
+ foreach ($old_table_cols as $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if ($entities[0] == 'PRIMARY' || $entities[0] === $column_name)
+ {
+ continue;
+ }
+ $column_list[] = $entities[0];
+ }
+
+ $columns = implode(',', $column_list);
+
+ $new_table_cols = $new_table_cols = preg_replace('/' . $column_name . '[^,]+(?:,|$)/m', '', $new_table_cols);
+
+ // create a new table and fill it up. destroy the temp one
+ $statements[] = 'CREATE TABLE ' . $table_name . ' (' . $new_table_cols . ');';
+ $statements[] = 'INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;';
+ $statements[] = 'DROP TABLE ' . $table_name . '_temp';
+
+ $statements[] = 'commit';
+ }
+ else
+ {
+ $statements[] = 'ALTER TABLE ' . $table_name . ' DROP COLUMN ' . $column_name;
+ }
+ break;
+ }
+
+ return $this->_sql_run_sql($statements);
+ }
+
+ /**
+ * Drop Index
+ */
+ function sql_index_drop($table_name, $index_name)
+ {
+ $statements = array();
+
+ switch ($this->sql_layer)
+ {
+ case 'mssql':
+ $statements[] = 'DROP INDEX ' . $table_name . '.' . $index_name;
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $statements[] = 'DROP INDEX ' . $index_name . ' ON ' . $table_name;
+ break;
+
+ case 'firebird':
+ case 'oracle':
+ case 'postgres':
+ case 'sqlite':
+ $statements[] = 'DROP INDEX ' . $table_name . '_' . $index_name;
+ break;
+ }
+
+ return $this->_sql_run_sql($statements);
+ }
+
+ /**
+ * Add primary key
+ */
+ function sql_create_primary_key($table_name, $column, $inline = false)
+ {
+ $statements = array();
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ case 'postgres':
+ case 'mysql_40':
+ case 'mysql_41':
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ADD PRIMARY KEY (' . implode(', ', $column) . ')';
+ break;
+
+ case 'mssql':
+ $sql = "ALTER TABLE [{$table_name}] WITH NOCHECK ADD ";
+ $sql .= "CONSTRAINT [PK_{$table_name}] PRIMARY KEY CLUSTERED (";
+ $sql .= '[' . implode("],\n\t\t[", $column) . ']';
+ $sql .= ') ON [PRIMARY]';
+
+ $statements[] = $sql;
+ break;
+
+ case 'oracle':
+ $statements[] = 'ALTER TABLE ' . $table_name . 'add CONSTRAINT pk_' . $table_name . ' PRIMARY KEY (' . implode(', ', $column) . ')';
+ break;
+
+ case 'sqlite':
+
+ if ($inline && $this->return_statements)
+ {
+ return $column;
+ }
+
+ $sql = "SELECT sql
+ FROM sqlite_master
+ WHERE type = 'table'
+ AND name = '{$table_name}'
+ ORDER BY type DESC, name;";
+ $result = $this->db->sql_query($sql);
+
+ if (!$result)
+ {
+ break;
+ }
+
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $statements[] = 'begin';
+
+ // Create a backup table and populate it, destroy the existing one
+ $statements[] = preg_replace('#CREATE\s+TABLE\s+"?' . $table_name . '"?#i', 'CREATE TEMPORARY TABLE ' . $table_name . '_temp', $row['sql']);
+ $statements[] = 'INSERT INTO ' . $table_name . '_temp SELECT * FROM ' . $table_name;
+ $statements[] = 'DROP TABLE ' . $table_name;
+
+ preg_match('#\((.*)\)#s', $row['sql'], $matches);
+
+ $new_table_cols = trim($matches[1]);
+ $old_table_cols = preg_split('/,(?![\s\w]+\))/m', $new_table_cols);
+ $column_list = array();
+
+ foreach ($old_table_cols as $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ if ($entities[0] == 'PRIMARY')
+ {
+ continue;
+ }
+ $column_list[] = $entities[0];
+ }
+
+ $columns = implode(',', $column_list);
+
+ // create a new table and fill it up. destroy the temp one
+ $statements[] = 'CREATE TABLE ' . $table_name . ' (' . $new_table_cols . ', PRIMARY KEY (' . implode(', ', $column) . '));';
+ $statements[] = 'INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;';
+ $statements[] = 'DROP TABLE ' . $table_name . '_temp';
+
+ $statements[] = 'commit';
+ break;
+ }
+
+ return $this->_sql_run_sql($statements);
+ }
+
+ /**
+ * Add unique index
+ */
+ function sql_create_unique_index($table_name, $index_name, $column)
+ {
+ $statements = array();
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ case 'postgres':
+ case 'oracle':
+ case 'sqlite':
+ $statements[] = 'CREATE UNIQUE INDEX ' . $table_name . '_' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')';
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $statements[] = 'CREATE UNIQUE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')';
+ break;
+
+ case 'mssql':
+ $statements[] = 'CREATE UNIQUE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ') ON [PRIMARY]';
+ break;
+ }
+
+ return $this->_sql_run_sql($statements);
+ }
+
+ /**
+ * Add index
+ */
+ function sql_create_index($table_name, $index_name, $column)
+ {
+ $statements = array();
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ case 'postgres':
+ case 'oracle':
+ case 'sqlite':
+ $statements[] = 'CREATE INDEX ' . $table_name . '_' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')';
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $statements[] = 'CREATE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')';
+ break;
+
+ case 'mssql':
+ $statements[] = 'CREATE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ') ON [PRIMARY]';
+ break;
+ }
+
+ return $this->_sql_run_sql($statements);
+ }
+
+ /**
+ * Change column type (not name!)
+ */
+ function sql_column_change($table_name, $column_name, $column_data, $inline = false)
+ {
+ $column_data = $this->sql_prepare_column_data($table_name, $column_name, $column_data);
+ $statements = array();
+
+ switch ($this->sql_layer)
+ {
+ case 'firebird':
+ // Change type...
+ if (!empty($column_data['column_type_sql_default']))
+ {
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql_type'];
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" SET DEFAULT ' . ' ' . $column_data['column_type_sql_default'];
+ }
+ else
+ {
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql'];
+ }
+ break;
+
+ case 'mssql':
+ $statements[] = 'ALTER TABLE [' . $table_name . '] ALTER COLUMN [' . $column_name . '] ' . $column_data['column_type_sql'];
+
+ if (!empty($column_data['default']))
+ {
+ // Using TRANSACT-SQL for this statement because we do not want to have colliding data if statements are executed at a later stage
+ $statements[] = "DECLARE @drop_default_name VARCHAR(100), @cmd VARCHAR(1000)
+ SET @drop_default_name =
+ (SELECT so.name FROM sysobjects so
+ JOIN sysconstraints sc ON so.id = sc.constid
+ WHERE object_name(so.parent_obj) = '{$table_name}'
+ AND so.xtype = 'D'
+ AND sc.colid = (SELECT colid FROM syscolumns
+ WHERE id = object_id('{$table_name}')
+ AND name = '{$column_name}'))
+ IF @drop_default_name <> ''
+ BEGIN
+ SET @cmd = 'ALTER TABLE [{$table_name}] DROP CONSTRAINT [' + @drop_default_name + ']'
+ EXEC(@cmd)
+ END
+ SET @cmd = 'ALTER TABLE [{$table_name}] ADD CONSTRAINT [DF_{$table_name}_{$column_name}_1] {$column_data['default']} FOR [{$column_name}]'
+ EXEC(@cmd)";
+ }
+ break;
+
+ case 'mysql_40':
+ case 'mysql_41':
+ $statements[] = 'ALTER TABLE `' . $table_name . '` CHANGE `' . $column_name . '` `' . $column_name . '` ' . $column_data['column_type_sql'];
+ break;
+
+ case 'oracle':
+ $statements[] = 'ALTER TABLE ' . $table_name . ' MODIFY ' . $column_name . ' ' . $column_data['column_type_sql'];
+ break;
+
+ case 'postgres':
+ $sql = 'ALTER TABLE ' . $table_name . ' ';
+
+ $sql_array = array();
+ $sql_array[] = 'ALTER COLUMN ' . $column_name . ' TYPE ' . $column_data['column_type'];
+
+ if (isset($column_data['null']))
+ {
+ if ($column_data['null'] == 'NOT NULL')
+ {
+ $sql_array[] = 'ALTER COLUMN ' . $column_name . ' SET NOT NULL';
+ }
+ else if ($column_data['null'] == 'NULL')
+ {
+ $sql_array[] = 'ALTER COLUMN ' . $column_name . ' DROP NOT NULL';
+ }
+ }
+
+ if (isset($column_data['default']))
+ {
+ $sql_array[] = 'ALTER COLUMN ' . $column_name . ' SET DEFAULT ' . $column_data['default'];
+ }
+
+ // we don't want to double up on constraints if we change different number data types
+ if (isset($column_data['constraint']))
+ {
+ $constraint_sql = "SELECT consrc as constraint_data
+ FROM pg_constraint, pg_class bc
+ WHERE conrelid = bc.oid
+ AND bc.relname = '{$table_name}'
+ AND NOT EXISTS (
+ SELECT *
+ FROM pg_constraint as c, pg_inherits as i
+ WHERE i.inhrelid = pg_constraint.conrelid
+ AND c.conname = pg_constraint.conname
+ AND c.consrc = pg_constraint.consrc
+ AND c.conrelid = i.inhparent
+ )";
+
+ $constraint_exists = false;
+
+ $result = $this->db->sql_query($constraint_sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if (trim($row['constraint_data']) == trim($column_data['constraint']))
+ {
+ $constraint_exists = true;
+ break;
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ if (!$constraint_exists)
+ {
+ $sql_array[] = 'ADD ' . $column_data['constraint'];
+ }
+ }
+
+ $sql .= implode(', ', $sql_array);
+
+ $statements[] = $sql;
+ break;
+
+ case 'sqlite':
+
+ if ($inline && $this->return_statements)
+ {
+ return $column_name . ' ' . $column_data['column_type_sql'];
+ }
+
+ $sql = "SELECT sql
+ FROM sqlite_master
+ WHERE type = 'table'
+ AND name = '{$table_name}'
+ ORDER BY type DESC, name;";
+ $result = $this->db->sql_query($sql);
+
+ if (!$result)
+ {
+ break;
+ }
+
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $statements[] = 'begin';
+
+ // Create a temp table and populate it, destroy the existing one
+ $statements[] = preg_replace('#CREATE\s+TABLE\s+"?' . $table_name . '"?#i', 'CREATE TEMPORARY TABLE ' . $table_name . '_temp', $row['sql']);
+ $statements[] = 'INSERT INTO ' . $table_name . '_temp SELECT * FROM ' . $table_name;
+ $statements[] = 'DROP TABLE ' . $table_name;
+
+ preg_match('#\((.*)\)#s', $row['sql'], $matches);
+
+ $new_table_cols = trim($matches[1]);
+ $old_table_cols = preg_split('/,(?![\s\w]+\))/m', $new_table_cols);
+ $column_list = array();
+
+ foreach ($old_table_cols as $key => $declaration)
+ {
+ $entities = preg_split('#\s+#', trim($declaration));
+ $column_list[] = $entities[0];
+ if ($entities[0] == $column_name)
+ {
+ $old_table_cols[$key] = $column_name . ' ' . $column_data['column_type_sql'];
+ }
+ }
+
+ $columns = implode(',', $column_list);
+
+ // create a new table and fill it up. destroy the temp one
+ $statements[] = 'CREATE TABLE ' . $table_name . ' (' . implode(',', $old_table_cols) . ');';
+ $statements[] = 'INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;';
+ $statements[] = 'DROP TABLE ' . $table_name . '_temp';
+
+ $statements[] = 'commit';
+
+ break;
+ }
+
+ return $this->_sql_run_sql($statements);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
new file mode 100644
index 0000000000..47f1787030
--- /dev/null
+++ b/phpBB/install/index.php
@@ -0,0 +1,808 @@
+<?php
+/**
+*
+* @package install
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**#@+
+* @ignore
+*/
+define('IN_PHPBB', true);
+define('IN_INSTALL', true);
+/**#@-*/
+
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+
+// Report all errors, except notices
+error_reporting(E_ALL ^ E_NOTICE);
+
+// @todo Review this test and see if we can find out what it is which prevents PHP 4.2.x from even displaying the page with requirements on it
+if (version_compare(PHP_VERSION, '4.3.3') < 0)
+{
+ die('You are running an unsupported PHP version. Please upgrade to PHP 4.3.3 or higher before trying to install phpBB 3.0');
+}
+
+/*
+* Remove variables created by register_globals from the global scope
+* Thanks to Matt Kavanagh
+*/
+function deregister_globals()
+{
+ $not_unset = array(
+ 'GLOBALS' => true,
+ '_GET' => true,
+ '_POST' => true,
+ '_COOKIE' => true,
+ '_REQUEST' => true,
+ '_SERVER' => true,
+ '_SESSION' => true,
+ '_ENV' => true,
+ '_FILES' => true,
+ 'phpEx' => true,
+ 'phpbb_root_path' => true
+ );
+
+ // Not only will array_merge and array_keys give a warning if
+ // a parameter is not an array, array_merge will actually fail.
+ // So we check if _SESSION has been initialised.
+ if (!isset($_SESSION) || !is_array($_SESSION))
+ {
+ $_SESSION = array();
+ }
+
+ // Merge all into one extremely huge array; unset this later
+ $input = array_merge(
+ array_keys($_GET),
+ array_keys($_POST),
+ array_keys($_COOKIE),
+ array_keys($_SERVER),
+ array_keys($_SESSION),
+ array_keys($_ENV),
+ array_keys($_FILES)
+ );
+
+ foreach ($input as $varname)
+ {
+ if (isset($not_unset[$varname]))
+ {
+ // Hacking attempt. No point in continuing unless it's a COOKIE
+ if ($varname !== 'GLOBALS' || isset($_GET['GLOBALS']) || isset($_POST['GLOBALS']) || isset($_SERVER['GLOBALS']) || isset($_SESSION['GLOBALS']) || isset($_ENV['GLOBALS']) || isset($_FILES['GLOBALS']))
+ {
+ exit;
+ }
+ else
+ {
+ $cookie = &$_COOKIE;
+ while (isset($cookie['GLOBALS']))
+ {
+ foreach ($cookie['GLOBALS'] as $registered_var => $value)
+ {
+ if (!isset($not_unset[$registered_var]))
+ {
+ unset($GLOBALS[$registered_var]);
+ }
+ }
+ $cookie = &$cookie['GLOBALS'];
+ }
+ }
+ }
+
+ unset($GLOBALS[$varname]);
+ }
+
+ unset($input);
+}
+
+// If we are on PHP >= 6.0.0 we do not need some code
+if (version_compare(PHP_VERSION, '6.0.0-dev', '>='))
+{
+ /**
+ * @ignore
+ */
+ define('STRIP', false);
+}
+else
+{
+ @set_magic_quotes_runtime(0);
+
+ // Be paranoid with passed vars
+ if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
+ {
+ deregister_globals();
+ }
+
+ define('STRIP', (get_magic_quotes_gpc()) ? true : false);
+}
+
+// Try to override some limits - maybe it helps some...
+@set_time_limit(0);
+$mem_limit = @ini_get('memory_limit');
+if (!empty($mem_limit))
+{
+ $unit = strtolower(substr($mem_limit, -1, 1));
+ $mem_limit = (int) $mem_limit;
+
+ if ($unit == 'k')
+ {
+ $mem_limit = floor($mem_limit / 1024);
+ }
+ else if ($unit == 'g')
+ {
+ $mem_limit *= 1024;
+ }
+ else if (is_numeric($unit))
+ {
+ $mem_limit = floor((int) ($mem_limit . $unit) / 1048576);
+ }
+ $mem_limit = max(128, $mem_limit) . 'M';
+}
+else
+{
+ $mem_limit = '128M';
+}
+@ini_set('memory_limit', $mem_limit);
+
+// Include essential scripts
+require($phpbb_root_path . 'includes/functions.' . $phpEx);
+
+if (file_exists($phpbb_root_path . 'includes/functions_content.' . $phpEx))
+{
+ require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
+}
+
+include($phpbb_root_path . 'includes/auth.' . $phpEx);
+include($phpbb_root_path . 'includes/session.' . $phpEx);
+include($phpbb_root_path . 'includes/template.' . $phpEx);
+include($phpbb_root_path . 'includes/acm/acm_file.' . $phpEx);
+include($phpbb_root_path . 'includes/cache.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
+require($phpbb_root_path . 'includes/functions_install.' . $phpEx);
+
+// Try and load an appropriate language if required
+$language = basename(request_var('language', ''));
+
+if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !$language)
+{
+ $accept_lang_ary = explode(',', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));
+ foreach ($accept_lang_ary as $accept_lang)
+ {
+ // Set correct format ... guess full xx_yy form
+ $accept_lang = substr($accept_lang, 0, 2) . '_' . substr($accept_lang, 3, 2);
+
+ if (file_exists($phpbb_root_path . 'language/' . $accept_lang) && is_dir($phpbb_root_path . 'language/' . $accept_lang))
+ {
+ $language = $accept_lang;
+ break;
+ }
+ else
+ {
+ // No match on xx_yy so try xx
+ $accept_lang = substr($accept_lang, 0, 2);
+ if (file_exists($phpbb_root_path . 'language/' . $accept_lang) && is_dir($phpbb_root_path . 'language/' . $accept_lang))
+ {
+ $language = $accept_lang;
+ break;
+ }
+ }
+ }
+}
+
+// No appropriate language found ... so let's use the first one in the language
+// dir, this may or may not be English
+if (!$language)
+{
+ $dir = @opendir($phpbb_root_path . 'language');
+
+ if (!$dir)
+ {
+ die('Unable to access the language directory');
+ exit;
+ }
+
+ while (($file = readdir($dir)) !== false)
+ {
+ $path = $phpbb_root_path . 'language/' . $file;
+
+ if (!is_file($path) && !is_link($path) && file_exists($path . '/iso.txt'))
+ {
+ $language = $file;
+ break;
+ }
+ }
+ closedir($dir);
+}
+
+if (!file_exists($phpbb_root_path . 'language/' . $language) || !is_dir($phpbb_root_path . 'language/' . $language))
+{
+ die('No language found!');
+}
+
+// And finally, load the relevant language files
+include($phpbb_root_path . 'language/' . $language . '/common.' . $phpEx);
+include($phpbb_root_path . 'language/' . $language . '/acp/common.' . $phpEx);
+include($phpbb_root_path . 'language/' . $language . '/acp/board.' . $phpEx);
+include($phpbb_root_path . 'language/' . $language . '/install.' . $phpEx);
+include($phpbb_root_path . 'language/' . $language . '/posting.' . $phpEx);
+
+// usually we would need every single constant here - and it would be consistent. For 3.0.x, use a dirty hack... :(
+
+// Define needed constants
+define('CHMOD_ALL', 7);
+define('CHMOD_READ', 4);
+define('CHMOD_WRITE', 2);
+define('CHMOD_EXECUTE', 1);
+
+$mode = request_var('mode', 'overview');
+$sub = request_var('sub', '');
+
+// Set PHP error handler to ours
+set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
+
+$user = new user();
+$auth = new auth();
+$cache = new cache();
+$template = new template();
+
+// Add own hook handler, if present. :o
+if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
+{
+ require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
+ $phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
+
+ foreach ($cache->obtain_hooks() as $hook)
+ {
+ @include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
+ }
+}
+else
+{
+ $phpbb_hook = false;
+}
+
+// Set some standard variables we want to force
+$config = array(
+ 'load_tplcompile' => '1'
+);
+
+$template->set_custom_template('../adm/style', 'admin');
+$template->assign_var('T_TEMPLATE_PATH', '../adm/style');
+
+// the acp template is never stored in the database
+$user->theme['template_storedb'] = false;
+
+$install = new module();
+
+$install->create('install', "index.$phpEx", $mode, $sub);
+$install->load();
+
+// Generate the page
+$install->page_header();
+$install->generate_navigation();
+
+$template->set_filenames(array(
+ 'body' => $install->get_tpl_name())
+);
+
+$install->page_footer();
+
+/**
+* @package install
+*/
+class module
+{
+ var $id = 0;
+ var $type = 'install';
+ var $module_ary = array();
+ var $filename;
+ var $module_url = '';
+ var $tpl_name = '';
+ var $mode;
+ var $sub;
+
+ /**
+ * Private methods, should not be overwritten
+ */
+ function create($module_type, $module_url, $selected_mod = false, $selected_submod = false)
+ {
+ global $db, $config, $phpEx, $phpbb_root_path;
+
+ $module = array();
+
+ // Grab module information using Bart's "neat-o-module" system (tm)
+ $dir = @opendir('.');
+
+ if (!$dir)
+ {
+ $this->error('Unable to access the installation directory', __LINE__, __FILE__);
+ }
+
+ $setmodules = 1;
+ while (($file = readdir($dir)) !== false)
+ {
+ if (preg_match('#^install_(.*?)\.' . $phpEx . '$#', $file))
+ {
+ include($file);
+ }
+ }
+ closedir($dir);
+
+ unset($setmodules);
+
+ if (!sizeof($module))
+ {
+ $this->error('No installation modules found', __LINE__, __FILE__);
+ }
+
+ // Order to use and count further if modules get assigned to the same position or not having an order
+ $max_module_order = 1000;
+
+ foreach ($module as $row)
+ {
+ // Module order not specified or module already assigned at this position?
+ if (!isset($row['module_order']) || isset($this->module_ary[$row['module_order']]))
+ {
+ $row['module_order'] = $max_module_order;
+ $max_module_order++;
+ }
+
+ $this->module_ary[$row['module_order']]['name'] = $row['module_title'];
+ $this->module_ary[$row['module_order']]['filename'] = $row['module_filename'];
+ $this->module_ary[$row['module_order']]['subs'] = $row['module_subs'];
+ $this->module_ary[$row['module_order']]['stages'] = $row['module_stages'];
+
+ if (strtolower($selected_mod) == strtolower($row['module_title']))
+ {
+ $this->id = (int) $row['module_order'];
+ $this->filename = (string) $row['module_filename'];
+ $this->module_url = (string) $module_url;
+ $this->mode = (string) $selected_mod;
+ // Check that the sub-mode specified is valid or set a default if not
+ if (is_array($row['module_subs']))
+ {
+ $this->sub = strtolower((in_array(strtoupper($selected_submod), $row['module_subs'])) ? $selected_submod : $row['module_subs'][0]);
+ }
+ else if (is_array($row['module_stages']))
+ {
+ $this->sub = strtolower((in_array(strtoupper($selected_submod), $row['module_stages'])) ? $selected_submod : $row['module_stages'][0]);
+ }
+ else
+ {
+ $this->sub = '';
+ }
+ }
+ } // END foreach
+ } // END create
+
+ /**
+ * Load and run the relevant module if applicable
+ */
+ function load($mode = false, $run = true)
+ {
+ global $phpbb_root_path, $phpEx;
+
+ if ($run)
+ {
+ if (!empty($mode))
+ {
+ $this->mode = $mode;
+ }
+
+ $module = $this->filename;
+ if (!class_exists($module))
+ {
+ $this->error('Module "' . htmlspecialchars($module) . '" not accessible.', __LINE__, __FILE__);
+ }
+ $this->module = new $module($this);
+
+ if (method_exists($this->module, 'main'))
+ {
+ $this->module->main($this->mode, $this->sub);
+ }
+ }
+ }
+
+ /**
+ * Output the standard page header
+ */
+ function page_header()
+ {
+ if (defined('HEADER_INC'))
+ {
+ return;
+ }
+
+ define('HEADER_INC', true);
+ global $template, $lang, $stage, $phpbb_root_path;
+
+ $template->assign_vars(array(
+ 'L_CHANGE' => $lang['CHANGE'],
+ 'L_INSTALL_PANEL' => $lang['INSTALL_PANEL'],
+ 'L_SELECT_LANG' => $lang['SELECT_LANG'],
+ 'L_SKIP' => $lang['SKIP'],
+ 'PAGE_TITLE' => $this->get_page_title(),
+ 'T_IMAGE_PATH' => $phpbb_root_path . 'adm/images/',
+
+ 'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
+ 'S_CONTENT_FLOW_BEGIN' => ($lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
+ 'S_CONTENT_FLOW_END' => ($lang['DIRECTION'] == 'ltr') ? 'right' : 'left',
+ 'S_CONTENT_ENCODING' => 'UTF-8',
+
+ 'S_USER_LANG' => $lang['USER_LANG'],
+ )
+ );
+
+ header('Content-type: text/html; charset=UTF-8');
+ header('Cache-Control: private, no-cache="set-cookie"');
+ header('Expires: 0');
+ header('Pragma: no-cache');
+
+ return;
+ }
+
+ /**
+ * Output the standard page footer
+ */
+ function page_footer()
+ {
+ global $db, $template;
+
+ $template->display('body');
+
+ // Close our DB connection.
+ if (!empty($db) && is_object($db))
+ {
+ $db->sql_close();
+ }
+
+ if (function_exists('exit_handler'))
+ {
+ exit_handler();
+ }
+ }
+
+ /**
+ * Returns desired template name
+ */
+ function get_tpl_name()
+ {
+ return $this->module->tpl_name . '.html';
+ }
+
+ /**
+ * Returns the desired page title
+ */
+ function get_page_title()
+ {
+ global $lang;
+
+ if (!isset($this->module->page_title))
+ {
+ return '';
+ }
+
+ return (isset($lang[$this->module->page_title])) ? $lang[$this->module->page_title] : $this->module->page_title;
+ }
+
+ /**
+ * Generate an HTTP/1.1 header to redirect the user to another page
+ * This is used during the installation when we do not have a database available to call the normal redirect function
+ * @param string $page The page to redirect to relative to the installer root path
+ */
+ function redirect($page)
+ {
+ // HTTP_HOST is having the correct browser url in most cases...
+ $server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
+ $server_port = (!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT');
+ $secure = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 1 : 0;
+
+ $script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
+ if (!$script_name)
+ {
+ $script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
+ }
+
+ // Replace backslashes and doubled slashes (could happen on some proxy setups)
+ $script_name = str_replace(array('\\', '//'), '/', $script_name);
+ $script_path = trim(dirname($script_name));
+
+ $url = (($secure) ? 'https://' : 'http://') . $server_name;
+
+ if ($server_port && (($secure && $server_port <> 443) || (!$secure && $server_port <> 80)))
+ {
+ // HTTP HOST can carry a port number...
+ if (strpos($server_name, ':') === false)
+ {
+ $url .= ':' . $server_port;
+ }
+ }
+
+ $url .= $script_path . '/' . $page;
+ header('Location: ' . $url);
+ exit;
+ }
+
+ /**
+ * Generate the navigation tabs
+ */
+ function generate_navigation()
+ {
+ global $lang, $template, $phpEx, $language;
+
+ if (is_array($this->module_ary))
+ {
+ @ksort($this->module_ary);
+ foreach ($this->module_ary as $cat_ary)
+ {
+ $cat = $cat_ary['name'];
+ $l_cat = (!empty($lang['CAT_' . $cat])) ? $lang['CAT_' . $cat] : preg_replace('#_#', ' ', $cat);
+ $cat = strtolower($cat);
+ $url = $this->module_url . "?mode=$cat&amp;language=$language";
+
+ if ($this->mode == $cat)
+ {
+ $template->assign_block_vars('t_block1', array(
+ 'L_TITLE' => $l_cat,
+ 'S_SELECTED' => true,
+ 'U_TITLE' => $url,
+ ));
+
+ if (is_array($this->module_ary[$this->id]['subs']))
+ {
+ $subs = $this->module_ary[$this->id]['subs'];
+ foreach ($subs as $option)
+ {
+ $l_option = (!empty($lang['SUB_' . $option])) ? $lang['SUB_' . $option] : preg_replace('#_#', ' ', $option);
+ $option = strtolower($option);
+ $url = $this->module_url . '?mode=' . $this->mode . "&amp;sub=$option&amp;language=$language";
+
+ $template->assign_block_vars('l_block1', array(
+ 'L_TITLE' => $l_option,
+ 'S_SELECTED' => ($this->sub == $option),
+ 'U_TITLE' => $url,
+ ));
+ }
+ }
+
+ if (is_array($this->module_ary[$this->id]['stages']))
+ {
+ $subs = $this->module_ary[$this->id]['stages'];
+ $matched = false;
+ foreach ($subs as $option)
+ {
+ $l_option = (!empty($lang['STAGE_' . $option])) ? $lang['STAGE_' . $option] : preg_replace('#_#', ' ', $option);
+ $option = strtolower($option);
+ $matched = ($this->sub == $option) ? true : $matched;
+
+ $template->assign_block_vars('l_block2', array(
+ 'L_TITLE' => $l_option,
+ 'S_SELECTED' => ($this->sub == $option),
+ 'S_COMPLETE' => !$matched,
+ ));
+ }
+ }
+ }
+ else
+ {
+ $template->assign_block_vars('t_block1', array(
+ 'L_TITLE' => $l_cat,
+ 'S_SELECTED' => false,
+ 'U_TITLE' => $url,
+ ));
+ }
+ }
+ }
+ }
+
+ /**
+ * Output an error message
+ * If skip is true, return and continue execution, else exit
+ */
+ function error($error, $line, $file, $skip = false)
+ {
+ global $lang, $db, $template;
+
+ if ($skip)
+ {
+ $template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $lang['INST_ERR'],
+ ));
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => basename($file) . ' [ ' . $line . ' ]',
+ 'RESULT' => '<b style="color:red">' . $error . '</b>',
+ ));
+
+ return;
+ }
+
+ echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
+ echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">';
+ echo '<head>';
+ echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
+ echo '<title>' . $lang['INST_ERR_FATAL'] . '</title>';
+ echo '<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />';
+ echo '</head>';
+ echo '<body id="errorpage">';
+ echo '<div id="wrap">';
+ echo ' <div id="page-header">';
+ echo ' </div>';
+ echo ' <div id="page-body">';
+ echo ' <div id="acp">';
+ echo ' <div class="panel">';
+ echo ' <span class="corners-top"><span></span></span>';
+ echo ' <div id="content">';
+ echo ' <h1>' . $lang['INST_ERR_FATAL'] . '</h1>';
+ echo ' <p>' . $lang['INST_ERR_FATAL'] . "</p>\n";
+ echo ' <p>' . basename($file) . ' [ ' . $line . " ]</p>\n";
+ echo ' <p><b>' . $error . "</b></p>\n";
+ echo ' </div>';
+ echo ' <span class="corners-bottom"><span></span></span>';
+ echo ' </div>';
+ echo ' </div>';
+ echo ' </div>';
+ echo ' <div id="page-footer">';
+ echo ' Powered by phpBB &copy; 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>';
+ echo ' </div>';
+ echo '</div>';
+ echo '</body>';
+ echo '</html>';
+
+ if (!empty($db) && is_object($db))
+ {
+ $db->sql_close();
+ }
+
+ exit_handler();
+ }
+
+ /**
+ * Output an error message for a database related problem
+ * If skip is true, return and continue execution, else exit
+ */
+ function db_error($error, $sql, $line, $file, $skip = false)
+ {
+ global $lang, $db, $template;
+
+ if ($skip)
+ {
+ $template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $lang['INST_ERR_FATAL'],
+ ));
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => basename($file) . ' [ ' . $line . ' ]',
+ 'RESULT' => '<b style="color:red">' . $error . '</b><br />&#187; SQL:' . $sql,
+ ));
+
+ return;
+ }
+
+ $template->set_filenames(array(
+ 'body' => 'install_error.html')
+ );
+ $this->page_header();
+ $this->generate_navigation();
+
+ $template->assign_vars(array(
+ 'MESSAGE_TITLE' => $lang['INST_ERR_FATAL_DB'],
+ 'MESSAGE_TEXT' => '<p>' . basename($file) . ' [ ' . $line . ' ]</p><p>SQL : ' . $sql . '</p><p><b>' . $error . '</b></p>',
+ ));
+
+ // Rollback if in transaction
+ if ($db->transaction)
+ {
+ $db->sql_transaction('rollback');
+ }
+
+ $this->page_footer();
+ }
+
+ /**
+ * Generate the relevant HTML for an input field and the associated label and explanatory text
+ */
+ function input_field($name, $type, $value='', $options='')
+ {
+ global $lang;
+ $tpl_type = explode(':', $type);
+ $tpl = '';
+
+ switch ($tpl_type[0])
+ {
+ case 'text':
+ case 'password':
+ $size = (int) $tpl_type[1];
+ $maxlength = (int) $tpl_type[2];
+
+ $tpl = '<input id="' . $name . '" type="' . $tpl_type[0] . '"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="' . $name . '" value="' . $value . '" />';
+ break;
+
+ case 'textarea':
+ $rows = (int) $tpl_type[1];
+ $cols = (int) $tpl_type[2];
+
+ $tpl = '<textarea id="' . $name . '" name="' . $name . '" rows="' . $rows . '" cols="' . $cols . '">' . $value . '</textarea>';
+ break;
+
+ case 'radio':
+ $key_yes = ($value) ? ' checked="checked" id="' . $name . '"' : '';
+ $key_no = (!$value) ? ' checked="checked" id="' . $name . '"' : '';
+
+ $tpl_type_cond = explode('_', $tpl_type[1]);
+ $type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true;
+
+ $tpl_no = '<label><input type="radio" name="' . $name . '" value="0"' . $key_no . ' class="radio" /> ' . (($type_no) ? $lang['NO'] : $lang['DISABLED']) . '</label>';
+ $tpl_yes = '<label><input type="radio" name="' . $name . '" value="1"' . $key_yes . ' class="radio" /> ' . (($type_no) ? $lang['YES'] : $lang['ENABLED']) . '</label>';
+
+ $tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . '&nbsp;&nbsp;' . $tpl_no : $tpl_no . '&nbsp;&nbsp;' . $tpl_yes;
+ break;
+
+ case 'select':
+ eval('$s_options = ' . str_replace('{VALUE}', $value, $options) . ';');
+ $tpl = '<select id="' . $name . '" name="' . $name . '">' . $s_options . '</select>';
+ break;
+
+ case 'custom':
+ eval('$tpl = ' . str_replace('{VALUE}', $value, $options) . ';');
+ break;
+
+ default:
+ break;
+ }
+
+ return $tpl;
+ }
+
+ /**
+ * Generate the drop down of available language packs
+ */
+ function inst_language_select($default = '')
+ {
+ global $phpbb_root_path, $phpEx;
+
+ $dir = @opendir($phpbb_root_path . 'language');
+
+ if (!$dir)
+ {
+ $this->error('Unable to access the language directory', __LINE__, __FILE__);
+ }
+
+ while ($file = readdir($dir))
+ {
+ $path = $phpbb_root_path . 'language/' . $file;
+
+ if ($file == '.' || $file == '..' || is_link($path) || is_file($path) || $file == 'CVS')
+ {
+ continue;
+ }
+
+ if (file_exists($path . '/iso.txt'))
+ {
+ list($displayname, $localname) = @file($path . '/iso.txt');
+ $lang[$localname] = $file;
+ }
+ }
+ closedir($dir);
+
+ @asort($lang);
+ @reset($lang);
+
+ $user_select = '';
+ foreach ($lang as $displayname => $filename)
+ {
+ $selected = (strtolower($default) == strtolower($filename)) ? ' selected="selected"' : '';
+ $user_select .= '<option value="' . $filename . '"' . $selected . '>' . ucwords($displayname) . '</option>';
+ }
+
+ return $user_select;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
new file mode 100644
index 0000000000..7f1b9de5b6
--- /dev/null
+++ b/phpBB/install/install_convert.php
@@ -0,0 +1,2114 @@
+<?php
+/**
+*
+* @package install
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+*/
+
+if (!defined('IN_INSTALL'))
+{
+ // Someone has tried to access the file direct. This is not a good idea, so exit
+ exit;
+}
+
+if (!empty($setmodules))
+{
+ $module[] = array(
+ 'module_type' => 'install',
+ 'module_title' => 'CONVERT',
+ 'module_filename' => substr(basename(__FILE__), 0, -strlen($phpEx)-1),
+ 'module_order' => 20,
+ 'module_subs' => '',
+ 'module_stages' => array('INTRO', 'SETTINGS', 'IN_PROGRESS', 'FINAL'),
+ 'module_reqs' => ''
+ );
+}
+
+/**
+* Class holding all convertor-specific details.
+* @package install
+*/
+class convert
+{
+ var $options = array();
+
+ var $convertor_tag = '';
+ var $src_dbms = '';
+ var $src_dbhost = '';
+ var $src_dbport = '';
+ var $src_dbuser = '';
+ var $src_dbpasswd = '';
+ var $src_dbname = '';
+ var $src_table_prefix = '';
+
+ var $convertor_data = array();
+ var $tables = array();
+ var $config_schema = array();
+ var $convertor = array();
+ var $src_truncate_statement = 'DELETE FROM ';
+ var $truncate_statement = 'DELETE FROM ';
+
+ var $fulltext_search;
+
+ // Batch size, can be adjusted by the conversion file
+ // For big boards a value of 6000 seems to be optimal
+ var $batch_size = 2000;
+ // Number of rows to be inserted at once (extended insert) if supported
+ // For installations having enough memory a value of 60 may be good.
+ var $num_wait_rows = 20;
+
+ // Mysqls internal recoding engine messing up with our (better) functions? We at least support more encodings than mysql so should use it in favor.
+ var $mysql_convert = false;
+
+ var $p_master;
+
+ function convert(&$p_master)
+ {
+ $this->p_master = &$p_master;
+ }
+}
+
+/**
+* Convert class for conversions
+* @package install
+*/
+class install_convert extends module
+{
+ /**
+ * Variables used while converting, they are accessible from the global variable $convert
+ */
+ function install_convert(&$p_master)
+ {
+ $this->p_master = &$p_master;
+ }
+
+ function main($mode, $sub)
+ {
+ global $lang, $template, $phpbb_root_path, $phpEx, $cache, $config, $language, $table_prefix;
+ global $convert;
+
+ $this->tpl_name = 'install_convert';
+ $this->mode = $mode;
+
+ $convert = new convert($this->p_master);
+
+ switch ($sub)
+ {
+ case 'intro':
+ // Try opening config file
+ // @todo If phpBB is not installed, we need to do a cut-down installation here
+ // For now, we redirect to the installation script instead
+ if (@file_exists($phpbb_root_path . 'config.' . $phpEx))
+ {
+ include($phpbb_root_path . 'config.' . $phpEx);
+ }
+
+ if (!defined('PHPBB_INSTALLED'))
+ {
+ $template->assign_vars(array(
+ 'S_NOT_INSTALLED' => true,
+ 'TITLE' => $lang['BOARD_NOT_INSTALLED'],
+ 'BODY' => sprintf($lang['BOARD_NOT_INSTALLED_EXPLAIN'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=install&amp;language=' . $language)),
+ ));
+
+ return;
+ }
+
+ require($phpbb_root_path . 'config.' . $phpEx);
+ require($phpbb_root_path . 'includes/constants.' . $phpEx);
+ require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
+ require($phpbb_root_path . 'includes/functions_convert.' . $phpEx);
+
+ $db = new $sql_db();
+ $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true);
+ unset($dbpasswd);
+
+ // We need to fill the config to let internal functions correctly work
+ $sql = 'SELECT *
+ FROM ' . CONFIG_TABLE;
+ $result = $db->sql_query($sql);
+
+ $config = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $config[$row['config_name']] = $row['config_value'];
+ }
+ $db->sql_freeresult($result);
+
+ // Detect if there is already a conversion in progress at this point and offer to resume
+ // It's quite possible that the user will get disconnected during a large conversion so they need to be able to resume it
+ $new_conversion = request_var('new_conv', 0);
+
+ if ($new_conversion)
+ {
+ $config['convert_progress'] = '';
+ $config['convert_db_server'] = '';
+ $config['convert_db_user'] = '';
+ $db->sql_query('DELETE FROM ' . CONFIG_TABLE . "
+ WHERE config_name = 'convert_progress'
+ OR config_name = 'convert_db_server'
+ OR config_name = 'convert_db_user'"
+ );
+ }
+
+ // Let's see if there is a conversion in the works...
+ $options = array();
+ if (!empty($config['convert_progress']) && !empty($config['convert_db_server']) && !empty($config['convert_db_user']) && !empty($config['convert_options']))
+ {
+ $options = unserialize($config['convert_progress']);
+ $options = array_merge($options, unserialize($config['convert_db_server']), unserialize($config['convert_db_user']), unserialize($config['convert_options']));
+ }
+
+ // This information should have already been checked once, but do it again for safety
+ if (!empty($options) && !empty($options['tag']) &&
+ isset($options['dbms']) &&
+ isset($options['dbhost']) &&
+ isset($options['dbport']) &&
+ isset($options['dbuser']) &&
+ isset($options['dbpasswd']) &&
+ isset($options['dbname']) &&
+ isset($options['table_prefix']))
+ {
+ $this->page_title = $lang['CONTINUE_CONVERT'];
+
+ $template->assign_vars(array(
+ 'TITLE' => $lang['CONTINUE_CONVERT'],
+ 'BODY' => $lang['CONTINUE_CONVERT_BODY'],
+ 'L_NEW' => $lang['CONVERT_NEW_CONVERSION'],
+ 'L_CONTINUE' => $lang['CONTINUE_OLD_CONVERSION'],
+ 'S_CONTINUE' => true,
+
+ 'U_NEW_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&amp;sub=intro&amp;new_conv=1&amp;language=$language",
+ 'U_CONTINUE_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&amp;sub=in_progress&amp;tag={$options['tag']}{$options['step']}&amp;language=$language",
+ ));
+
+ return;
+ }
+
+ $this->list_convertors($sub);
+
+ break;
+
+ case 'settings':
+ $this->get_convert_settings($sub);
+ break;
+
+ case 'in_progress':
+ $this->convert_data($sub);
+ break;
+
+ case 'final':
+ $this->page_title = $lang['CONVERT_COMPLETE'];
+
+ $template->assign_vars(array(
+ 'TITLE' => $lang['CONVERT_COMPLETE'],
+ 'BODY' => $lang['CONVERT_COMPLETE_EXPLAIN'],
+ ));
+
+ // If we reached this step (conversion completed) we want to purge the cache and log the user out.
+ // This is for making sure the session get not screwed due to the 3.0.x users table being completely new.
+ $cache->purge();
+
+ require($phpbb_root_path . 'config.' . $phpEx);
+ require($phpbb_root_path . 'includes/constants.' . $phpEx);
+ require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
+ require($phpbb_root_path . 'includes/functions_convert.' . $phpEx);
+
+ $db = new $sql_db();
+ $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true);
+ unset($dbpasswd);
+
+ $sql = 'SELECT config_value
+ FROM ' . CONFIG_TABLE . '
+ WHERE config_name = \'search_type\'';
+ $result = $db->sql_query($sql);
+
+ if ($db->sql_fetchfield('config_value') != 'fulltext_mysql')
+ {
+ $template->assign_vars(array(
+ 'S_ERROR_BOX' => true,
+ 'ERROR_TITLE' => $lang['SEARCH_INDEX_UNCONVERTED'],
+ 'ERROR_MSG' => $lang['SEARCH_INDEX_UNCONVERTED_EXPLAIN'],
+ ));
+ }
+
+ switch ($db->sql_layer)
+ {
+ case 'sqlite':
+ case 'firebird':
+ $db->sql_query('DELETE FROM ' . SESSIONS_KEYS_TABLE);
+ $db->sql_query('DELETE FROM ' . SESSIONS_TABLE);
+ break;
+
+ default:
+ $db->sql_query('TRUNCATE TABLE ' . SESSIONS_KEYS_TABLE);
+ $db->sql_query('TRUNCATE TABLE ' . SESSIONS_TABLE);
+ break;
+ }
+
+ break;
+ }
+ }
+
+ /**
+ * Generate a list of all available conversion modules
+ */
+ function list_convertors($sub)
+ {
+ global $lang, $language, $template, $phpbb_root_path, $phpEx;
+
+ $this->page_title = $lang['SUB_INTRO'];
+
+ $template->assign_vars(array(
+ 'TITLE' => $lang['CONVERT_INTRO'],
+ 'BODY' => $lang['CONVERT_INTRO_BODY'],
+
+ 'L_AUTHOR' => $lang['AUTHOR'],
+ 'L_AVAILABLE_CONVERTORS' => $lang['AVAILABLE_CONVERTORS'],
+ 'L_CONVERT' => $lang['CONVERT'],
+ 'L_NO_CONVERTORS' => $lang['NO_CONVERTORS'],
+ 'L_OPTIONS' => $lang['CONVERT_OPTIONS'],
+ 'L_SOFTWARE' => $lang['SOFTWARE'],
+ 'L_VERSION' => $lang['VERSION'],
+
+ 'S_LIST' => true,
+ ));
+
+ $convertors = $sort = array();
+ $get_info = true;
+
+ $handle = @opendir('./convertors/');
+
+ if (!$handle)
+ {
+ $this->error('Unable to access the convertors directory', __LINE__, __FILE__);
+ }
+
+ while ($entry = readdir($handle))
+ {
+ if (preg_match('/^convert_([a-z0-9_]+).' . $phpEx . '$/i', $entry, $m))
+ {
+ include('./convertors/' . $entry);
+ if (isset($convertor_data))
+ {
+ $sort[strtolower($convertor_data['forum_name'])] = sizeof($convertors);
+
+ $convertors[] = array(
+ 'tag' => $m[1],
+ 'forum_name' => $convertor_data['forum_name'],
+ 'version' => $convertor_data['version'],
+ 'dbms' => $convertor_data['dbms'],
+ 'dbhost' => $convertor_data['dbhost'],
+ 'dbport' => $convertor_data['dbport'],
+ 'dbuser' => $convertor_data['dbuser'],
+ 'dbpasswd' => $convertor_data['dbpasswd'],
+ 'dbname' => $convertor_data['dbname'],
+ 'table_prefix' => $convertor_data['table_prefix'],
+ 'author' => $convertor_data['author']
+ );
+ }
+ unset($convertor_data);
+ }
+ }
+ closedir($handle);
+
+ @ksort($sort);
+
+ foreach ($sort as $void => $index)
+ {
+ $template->assign_block_vars('convertors', array(
+ 'AUTHOR' => $convertors[$index]['author'],
+ 'SOFTWARE' => $convertors[$index]['forum_name'],
+ 'VERSION' => $convertors[$index]['version'],
+
+ 'U_CONVERT' => $this->p_master->module_url . "?mode={$this->mode}&amp;language=$language&amp;sub=settings&amp;tag=" . $convertors[$index]['tag'],
+ ));
+ }
+ }
+
+ /**
+ */
+ function get_convert_settings($sub)
+ {
+ global $lang, $language, $template, $db, $phpbb_root_path, $phpEx, $config, $cache;
+
+ require($phpbb_root_path . 'config.' . $phpEx);
+ require($phpbb_root_path . 'includes/constants.' . $phpEx);
+ require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
+ require($phpbb_root_path . 'includes/functions_convert.' . $phpEx);
+
+ $db = new $sql_db();
+ $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true);
+ unset($dbpasswd);
+
+ $this->page_title = $lang['STAGE_SETTINGS'];
+
+ // We need to fill the config to let internal functions correctly work
+ $sql = 'SELECT *
+ FROM ' . CONFIG_TABLE;
+ $result = $db->sql_query($sql);
+
+ $config = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $config[$row['config_name']] = $row['config_value'];
+ }
+ $db->sql_freeresult($result);
+
+ $convertor_tag = request_var('tag', '');
+
+ if (empty($convertor_tag))
+ {
+ $this->p_master->error($lang['NO_CONVERT_SPECIFIED'], __LINE__, __FILE__);
+ }
+ $get_info = true;
+
+ // check security implications of direct inclusion
+ $convertor_tag = basename($convertor_tag);
+ if (!file_exists('./convertors/convert_' . $convertor_tag . '.' . $phpEx))
+ {
+ $this->p_master->error($lang['CONVERT_NOT_EXIST'], __LINE__, __FILE__);
+ }
+
+ include('./convertors/convert_' . $convertor_tag . '.' . $phpEx);
+
+ // The test_file is a file that should be present in the location of the old board.
+ if (!isset($test_file))
+ {
+ $this->p_master->error($lang['DEV_NO_TEST_FILE'], __LINE__, __FILE__);
+ }
+
+ $submit = (isset($_POST['submit'])) ? true : false;
+
+ $src_dbms = request_var('src_dbms', $convertor_data['dbms']);
+ $src_dbhost = request_var('src_dbhost', $convertor_data['dbhost']);
+ $src_dbport = request_var('src_dbport', $convertor_data['dbport']);
+ $src_dbuser = request_var('src_dbuser', $convertor_data['dbuser']);
+ $src_dbpasswd = request_var('src_dbpasswd', $convertor_data['dbpasswd']);
+ $src_dbname = request_var('src_dbname', $convertor_data['dbname']);
+ $src_table_prefix = request_var('src_table_prefix', $convertor_data['table_prefix']);
+ $forum_path = request_var('forum_path', $convertor_data['forum_path']);
+ $refresh = request_var('refresh', 1);
+
+ // Default URL of the old board
+ // @todo Are we going to use this for attempting to convert URL references in posts, or should we remove it?
+ // -> We should convert old urls to the new relative urls format
+ // $src_url = request_var('src_url', 'Not in use at the moment');
+
+ // strip trailing slash from old forum path
+ $forum_path = (strlen($forum_path) && $forum_path[strlen($forum_path) - 1] == '/') ? substr($forum_path, 0, -1) : $forum_path;
+
+ $error = array();
+ if ($submit)
+ {
+ if (!@file_exists('./../' . $forum_path . '/' . $test_file))
+ {
+ $error[] = sprintf($lang['COULD_NOT_FIND_PATH'], $forum_path);
+ }
+
+ $connect_test = false;
+ $available_dbms = get_available_dbms(false, true, true);
+
+ if (!isset($available_dbms[$src_dbms]) || !$available_dbms[$src_dbms]['AVAILABLE'])
+ {
+ $error['db'][] = $lang['INST_ERR_NO_DB'];
+ $connect_test = false;
+ }
+ else
+ {
+ $connect_test = connect_check_db(true, $error, $available_dbms[$src_dbms], $src_table_prefix, $src_dbhost, $src_dbuser, htmlspecialchars_decode($src_dbpasswd), $src_dbname, $src_dbport, true, ($src_dbms == $dbms) ? false : true, false);
+ }
+
+ // The forum prefix of the old and the new forum can only be the same if two different databases are used.
+ if ($src_table_prefix == $table_prefix && $src_dbms == $dbms && $src_dbhost == $dbhost && $src_dbport == $dbport && $src_dbname == $dbname)
+ {
+ $error[] = sprintf($lang['TABLE_PREFIX_SAME'], $src_table_prefix);
+ }
+
+ // Check table prefix
+ if (!sizeof($error))
+ {
+ // initiate database connection to old db if old and new db differ
+ global $src_db, $same_db;
+ $src_db = $same_db = false;
+
+ if ($src_dbms != $dbms || $src_dbhost != $dbhost || $src_dbport != $dbport || $src_dbname != $dbname || $src_dbuser != $dbuser)
+ {
+ $sql_db = 'dbal_' . $src_dbms;
+ $src_db = new $sql_db();
+ $src_db->sql_connect($src_dbhost, $src_dbuser, htmlspecialchars_decode($src_dbpasswd), $src_dbname, $src_dbport, false, true);
+ $same_db = false;
+ }
+ else
+ {
+ $src_db = $db;
+ $same_db = true;
+ }
+
+ $src_db->sql_return_on_error(true);
+ $db->sql_return_on_error(true);
+
+ // Try to select one row from the first table to see if the prefix is OK
+ $result = $src_db->sql_query_limit('SELECT * FROM ' . $src_table_prefix . $tables[0], 1);
+
+ if (!$result)
+ {
+ $prefixes = array();
+
+ $tables_existing = get_tables($src_db);
+ $tables_existing = array_map('strtolower', $tables_existing);
+ foreach ($tables_existing as $table_name)
+ {
+ compare_table($tables, $table_name, $prefixes);
+ }
+ unset($tables_existing);
+
+ foreach ($prefixes as $prefix => $count)
+ {
+ if ($count >= sizeof($tables))
+ {
+ $possible_prefix = $prefix;
+ break;
+ }
+ }
+
+ $msg = '';
+ if (!empty($convertor_data['table_prefix']))
+ {
+ $msg .= sprintf($lang['DEFAULT_PREFIX_IS'], $convertor_data['forum_name'], $convertor_data['table_prefix']);
+ }
+
+ if (!empty($possible_prefix))
+ {
+ $msg .= '<br />';
+ $msg .= ($possible_prefix == '*') ? $lang['BLANK_PREFIX_FOUND'] : sprintf($lang['PREFIX_FOUND'], $possible_prefix);
+ $src_table_prefix = ($possible_prefix == '*') ? '' : $possible_prefix;
+ }
+
+ $error[] = $msg;
+ }
+ $src_db->sql_freeresult($result);
+ $src_db->sql_return_on_error(false);
+ }
+
+ if (!sizeof($error))
+ {
+ // Save convertor Status
+ set_config('convert_progress', serialize(array(
+ 'step' => '',
+ 'table_prefix' => $src_table_prefix,
+ 'tag' => $convertor_tag,
+ )), true);
+ set_config('convert_db_server', serialize(array(
+ 'dbms' => $src_dbms,
+ 'dbhost' => $src_dbhost,
+ 'dbport' => $src_dbport,
+ 'dbname' => $src_dbname,
+ )), true);
+ set_config('convert_db_user', serialize(array(
+ 'dbuser' => $src_dbuser,
+ 'dbpasswd' => $src_dbpasswd,
+ )), true);
+
+ // Save options
+ set_config('convert_options', serialize(array('forum_path' => './../' . $forum_path, 'refresh' => $refresh)), true);
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['VERIFY_OPTIONS'],
+ 'RESULT' => $lang['CONVERT_SETTINGS_VERIFIED'],
+ ));
+
+ $template->assign_vars(array(
+ 'L_SUBMIT' => $lang['BEGIN_CONVERT'],
+// 'S_HIDDEN' => $s_hidden_fields,
+ 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&amp;sub=in_progress&amp;tag=$convertor_tag&amp;language=$language",
+ ));
+
+ return;
+ }
+ else
+ {
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['VERIFY_OPTIONS'],
+ 'RESULT' => '<b style="color:red">' . implode('<br />', $error) . '</b>',
+ ));
+ }
+ } // end submit
+
+ foreach ($this->convert_options as $config_key => $vars)
+ {
+ if (!is_array($vars) && strpos($config_key, 'legend') === false)
+ {
+ continue;
+ }
+
+ if (strpos($config_key, 'legend') !== false)
+ {
+ $template->assign_block_vars('options', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $lang[$vars])
+ );
+
+ continue;
+ }
+
+ $options = isset($vars['options']) ? $vars['options'] : '';
+
+ $template->assign_block_vars('options', array(
+ 'KEY' => $config_key,
+ 'TITLE' => $lang[$vars['lang']],
+ 'S_EXPLAIN' => $vars['explain'],
+ 'S_LEGEND' => false,
+ 'TITLE_EXPLAIN' => ($vars['explain']) ? $lang[$vars['lang'] . '_EXPLAIN'] : '',
+ 'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $$config_key, $options),
+ )
+ );
+ }
+
+ $template->assign_vars(array(
+ 'TITLE' => $lang['STAGE_SETTINGS'],
+ 'BODY' => $lang['CONV_OPTIONS_BODY'],
+ 'L_SUBMIT' => $lang['BEGIN_CONVERT'],
+ 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&amp;sub=settings&amp;tag=$convertor_tag&amp;language=$language",
+ ));
+ }
+
+ /**
+ * The function which does the actual work (or dispatches it to the relevant places)
+ */
+ function convert_data($sub)
+ {
+ global $template, $user, $phpbb_root_path, $phpEx, $db, $lang, $config, $cache;
+ global $convert, $convert_row, $message_parser, $skip_rows, $language;
+
+ require($phpbb_root_path . 'config.' . $phpEx);
+ require($phpbb_root_path . 'includes/constants.' . $phpEx);
+ require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
+ require($phpbb_root_path . 'includes/functions_convert.' . $phpEx);
+
+ $db = new $sql_db();
+ $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true);
+ unset($dbpasswd);
+
+ $sql = 'SELECT *
+ FROM ' . CONFIG_TABLE;
+ $result = $db->sql_query($sql);
+
+ $config = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $config[$row['config_name']] = $row['config_value'];
+ }
+ $db->sql_freeresult($result);
+
+ // Override a couple of config variables for the duration
+ $config['max_quote_depth'] = 0;
+
+ // @todo Need to confirm that max post length in source is <= max post length in destination or there may be interesting formatting issues
+ $config['max_post_chars'] = $config['min_post_chars'] = 0;
+
+ // Set up a user as well. We _should_ have enough of a database here at this point to do this
+ // and it helps for any core code we call
+ $user->session_begin();
+ $user->page = $user->extract_current_page($phpbb_root_path);
+
+ // This is a little bit of a fudge, but it allows the language entries to be available to the
+ // core code without us loading them again
+ $user->lang = &$lang;
+
+ $this->page_title = $user->lang['STAGE_IN_PROGRESS'];
+
+ $convert->options = array();
+ if (isset($config['convert_progress']))
+ {
+ $convert->options = unserialize($config['convert_progress']);
+ $convert->options = array_merge($convert->options, unserialize($config['convert_db_server']), unserialize($config['convert_db_user']), unserialize($config['convert_options']));
+ }
+
+ // This information should have already been checked once, but do it again for safety
+ if (empty($convert->options) || empty($convert->options['tag']) ||
+ !isset($convert->options['dbms']) ||
+ !isset($convert->options['dbhost']) ||
+ !isset($convert->options['dbport']) ||
+ !isset($convert->options['dbuser']) ||
+ !isset($convert->options['dbpasswd']) ||
+ !isset($convert->options['dbname']) ||
+ !isset($convert->options['table_prefix']))
+ {
+ $this->p_master->error($user->lang['NO_CONVERT_SPECIFIED'], __LINE__, __FILE__);
+ }
+
+ // Make some short variables accessible, for easier referencing
+ $convert->convertor_tag = basename($convert->options['tag']);
+ $convert->src_dbms = $convert->options['dbms'];
+ $convert->src_dbhost = $convert->options['dbhost'];
+ $convert->src_dbport = $convert->options['dbport'];
+ $convert->src_dbuser = $convert->options['dbuser'];
+ $convert->src_dbpasswd = $convert->options['dbpasswd'];
+ $convert->src_dbname = $convert->options['dbname'];
+ $convert->src_table_prefix = $convert->options['table_prefix'];
+
+ // initiate database connection to old db if old and new db differ
+ global $src_db, $same_db;
+ $src_db = $same_db = null;
+ if ($convert->src_dbms != $dbms || $convert->src_dbhost != $dbhost || $convert->src_dbport != $dbport || $convert->src_dbname != $dbname || $convert->src_dbuser != $dbuser)
+ {
+ if ($convert->src_dbms != $dbms)
+ {
+ require($phpbb_root_path . 'includes/db/' . $convert->src_dbms . '.' . $phpEx);
+ }
+ $sql_db = 'dbal_' . $convert->src_dbms;
+ $src_db = new $sql_db();
+ $src_db->sql_connect($convert->src_dbhost, $convert->src_dbuser, htmlspecialchars_decode($convert->src_dbpasswd), $convert->src_dbname, $convert->src_dbport, false, true);
+ $same_db = false;
+ }
+ else
+ {
+ $src_db = $db;
+ $same_db = true;
+ }
+
+ $convert->mysql_convert = false;
+ switch ($src_db->sql_layer)
+ {
+ case 'sqlite':
+ case 'firebird':
+ $convert->src_truncate_statement = 'DELETE FROM ';
+ break;
+
+ // Thanks MySQL, for silently converting...
+ case 'mysql':
+ case 'mysql4':
+ if (version_compare($src_db->sql_server_info(true), '4.1.3', '>='))
+ {
+ $convert->mysql_convert = true;
+ }
+ $convert->src_truncate_statement = 'TRUNCATE TABLE ';
+ break;
+
+ case 'mysqli':
+ $convert->mysql_convert = true;
+ $convert->src_truncate_statement = 'TRUNCATE TABLE ';
+ break;
+
+ default:
+ $convert->src_truncate_statement = 'TRUNCATE TABLE ';
+ break;
+ }
+
+ if ($convert->mysql_convert && !$same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+
+ switch ($db->sql_layer)
+ {
+ case 'sqlite':
+ case 'firebird':
+ $convert->truncate_statement = 'DELETE FROM ';
+ break;
+
+ default:
+ $convert->truncate_statement = 'TRUNCATE TABLE ';
+ break;
+ }
+
+ $get_info = false;
+
+ // check security implications of direct inclusion
+ if (!file_exists('./convertors/convert_' . $convert->convertor_tag . '.' . $phpEx))
+ {
+ $this->p_master->error($user->lang['CONVERT_NOT_EXIST'], __LINE__, __FILE__);
+ }
+
+ if (file_exists('./convertors/functions_' . $convert->convertor_tag . '.' . $phpEx))
+ {
+ include('./convertors/functions_' . $convert->convertor_tag . '.' . $phpEx);
+ }
+
+ $get_info = true;
+ include('./convertors/convert_' . $convert->convertor_tag . '.' . $phpEx);
+
+ // Map some variables...
+ $convert->convertor_data = $convertor_data;
+ $convert->tables = $tables;
+ $convert->config_schema = $config_schema;
+
+ // Now include the real data
+ $get_info = false;
+ include('./convertors/convert_' . $convert->convertor_tag . '.' . $phpEx);
+
+ $convert->convertor_data = $convertor_data;
+ $convert->tables = $tables;
+ $convert->config_schema = $config_schema;
+ $convert->convertor = $convertor;
+
+ // The test_file is a file that should be present in the location of the old board.
+ if (!file_exists($convert->options['forum_path'] . '/' . $test_file))
+ {
+ $this->p_master->error(sprintf($user->lang['COULD_NOT_FIND_PATH'], $convert->options['forum_path']), __LINE__, __FILE__);
+ }
+
+ $search_type = basename(trim($config['search_type']));
+
+ // For conversions we are a bit less strict and set to a search backend we know exist...
+ if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
+ {
+ $search_type = 'fulltext_native';
+ set_config('search_type', $search_type);
+ }
+
+ if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
+ {
+ trigger_error('NO_SUCH_SEARCH_MODULE');
+ }
+
+ require($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx);
+
+ $error = false;
+ $convert->fulltext_search = new $search_type($error);
+
+ if ($error)
+ {
+ trigger_error($error);
+ }
+
+ include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
+ $message_parser = new parse_message();
+
+ $jump = request_var('jump', 0);
+ $final_jump = request_var('final_jump', 0);
+ $sync_batch = request_var('sync_batch', -1);
+ $last_statement = request_var('last', 0);
+
+ // We are running sync...
+ if ($sync_batch >= 0)
+ {
+ $this->sync_forums($sync_batch);
+ return;
+ }
+
+ if ($jump)
+ {
+ $this->jump($jump, $last_statement);
+ return;
+ }
+
+ if ($final_jump)
+ {
+ $this->final_jump($final_jump);
+ return;
+ }
+
+ $current_table = request_var('current_table', 0);
+ $old_current_table = min(-1, $current_table - 1);
+ $skip_rows = request_var('skip_rows', 0);
+
+ if (!$current_table && !$skip_rows)
+ {
+ if (empty($_REQUEST['confirm']))
+ {
+ // If avatars / ranks / smilies folders are specified make sure they are writable
+ $bad_folders = array();
+
+ $local_paths = array(
+ 'avatar_path' => path($config['avatar_path']),
+ 'avatar_gallery_path' => path($config['avatar_gallery_path']),
+ 'icons_path' => path($config['icons_path']),
+ 'ranks_path' => path($config['ranks_path']),
+ 'smilies_path' => path($config['smilies_path'])
+ );
+
+ foreach ($local_paths as $folder => $local_path)
+ {
+ if (isset($convert->convertor[$folder]))
+ {
+ if (empty($convert->convertor['test_file']))
+ {
+ // test_file is mandantory at the moment so this should never be reached, but just in case...
+ $this->p_master->error($user->lang['DEV_NO_TEST_FILE'], __LINE__, __FILE__);
+ }
+
+ if (!$local_path || !@is_writable($phpbb_root_path . $local_path))
+ {
+ if (!$local_path)
+ {
+ $bad_folders[] = sprintf($user->lang['CONFIG_PHPBB_EMPTY'], $folder);
+ }
+ else
+ {
+ $bad_folders[] = $local_path;
+ }
+ }
+ }
+ }
+
+ if (sizeof($bad_folders))
+ {
+ $msg = (sizeof($bad_folders) == 1) ? $user->lang['MAKE_FOLDER_WRITABLE'] : $user->lang['MAKE_FOLDERS_WRITABLE'];
+ sort($bad_folders);
+ $this->p_master->error(sprintf($msg, implode('<br />', $bad_folders)), __LINE__, __FILE__, true);
+
+ $template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['INSTALL_TEST'],
+ 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&amp;sub=in_progress&amp;tag={$convert->convertor_tag}&amp;language=$language",
+ ));
+ return;
+ }
+
+ // Grab all the tables used in convertor
+ $missing_tables = $tables_list = $aliases = array();
+
+ foreach ($convert->convertor['schema'] as $schema)
+ {
+ // Skip those not used (because of addons/plugins not detected)
+ if (!$schema['target'])
+ {
+ continue;
+ }
+
+ foreach ($schema as $key => $val)
+ {
+ // we're dealing with an array like:
+ // array('forum_status', 'forums.forum_status', 'is_item_locked')
+ if (is_int($key) && !empty($val[1]))
+ {
+ $temp_data = $val[1];
+ if (!is_array($temp_data))
+ {
+ $temp_data = array($temp_data);
+ }
+
+ foreach ($temp_data as $val)
+ {
+ if (preg_match('/([a-z0-9_]+)\.([a-z0-9_]+)\)* ?A?S? ?([a-z0-9_]*?)\.?([a-z0-9_]*)$/i', $val, $m))
+ {
+ $table = $convert->src_table_prefix . $m[1];
+ $tables_list[$table] = $table;
+
+ if (!empty($m[3]))
+ {
+ $aliases[] = $convert->src_table_prefix . $m[3];
+ }
+ }
+ }
+ }
+ // 'left_join' => 'topics LEFT JOIN vote_desc ON topics.topic_id = vote_desc.topic_id AND topics.topic_vote = 1'
+ else if ($key == 'left_join')
+ {
+ // Convert the value if it wasn't an array already.
+ if (!is_array($val))
+ {
+ $val = array($val);
+ }
+
+ for ($j = 0; $j < sizeof($val); ++$j)
+ {
+ if (preg_match('/LEFT JOIN ([a-z0-9_]+) AS ([a-z0-9_]+)/i', $val[$j], $m))
+ {
+ $table = $convert->src_table_prefix . $m[1];
+ $tables_list[$table] = $table;
+
+ if (!empty($m[2]))
+ {
+ $aliases[] = $convert->src_table_prefix . $m[2];
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // Remove aliased tables from $tables_list
+ foreach ($aliases as $alias)
+ {
+ unset($tables_list[$alias]);
+ }
+
+ // Check if the tables that we need exist
+ $src_db->sql_return_on_error(true);
+ foreach ($tables_list as $table => $null)
+ {
+ $sql = 'SELECT 1 FROM ' . $table;
+ $_result = $src_db->sql_query_limit($sql, 1);
+
+ if (!$_result)
+ {
+ $missing_tables[] = $table;
+ }
+ $src_db->sql_freeresult($_result);
+ }
+ $src_db->sql_return_on_error(false);
+
+ // Throw an error if some tables are missing
+ // We used to do some guessing here, but since we have a suggestion of possible values earlier, I don't see it adding anything here to do it again
+
+ if (sizeof($missing_tables) == sizeof($tables_list))
+ {
+ $this->p_master->error($user->lang['NO_TABLES_FOUND'] . ' ' . $user->lang['CHECK_TABLE_PREFIX'], __LINE__, __FILE__);
+ }
+ else if (sizeof($missing_tables))
+ {
+ $this->p_master->error(sprintf($user->lang['TABLES_MISSING'], implode(', ', $missing_tables)) . '<br /><br />' . $user->lang['CHECK_TABLE_PREFIX'], __LINE__, __FILE__);
+ }
+
+ $url = $this->save_convert_progress('&amp;confirm=1');
+ $msg = $user->lang['PRE_CONVERT_COMPLETE'];
+
+ if ($convert->convertor_data['author_notes'])
+ {
+ $msg .= '</p><p>' . sprintf($user->lang['AUTHOR_NOTES'], $convert->convertor_data['author_notes']);
+ }
+
+ $template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'],
+ 'L_MESSAGE' => $msg,
+ 'U_ACTION' => $url,
+ ));
+
+ return;
+ } // if (empty($_REQUEST['confirm']))
+
+ $template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $user->lang['STARTING_CONVERT'],
+ ));
+
+ // Convert the config table and load the settings of the old board
+ if (!empty($convert->config_schema))
+ {
+ restore_config($convert->config_schema);
+
+ // Override a couple of config variables for the duration
+ $config['max_quote_depth'] = 0;
+
+ // @todo Need to confirm that max post length in source is <= max post length in destination or there may be interesting formatting issues
+ $config['max_post_chars'] = $config['min_post_chars'] = 0;
+ }
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $user->lang['CONFIG_CONVERT'],
+ 'RESULT' => $user->lang['DONE'],
+ ));
+
+ // Now process queries and execute functions that have to be executed prior to the conversion
+ if (!empty($convert->convertor['execute_first']))
+ {
+ eval($convert->convertor['execute_first']);
+ }
+
+ if (!empty($convert->convertor['query_first']))
+ {
+ if (!is_array($convert->convertor['query_first']))
+ {
+ $convert->convertor['query_first'] = array('target', array($convert->convertor['query_first']));
+ }
+ else if (!is_array($convert->convertor['query_first'][0]))
+ {
+ $convert->convertor['query_first'] = array(array($convert->convertor['query_first'][0], $convert->convertor['query_first'][1]));
+ }
+
+ foreach ($convert->convertor['query_first'] as $query_first)
+ {
+ if ($query_first[0] == 'src')
+ {
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+
+ $src_db->sql_query($query_first[1]);
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+ }
+ else
+ {
+ $db->sql_query($query_first[1]);
+ }
+ }
+ }
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $user->lang['PREPROCESS_STEP'],
+ 'RESULT' => $user->lang['DONE'],
+ ));
+ } // if (!$current_table && !$skip_rows)
+
+ $template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $user->lang['FILLING_TABLES'],
+ ));
+
+ // This loop takes one target table and processes it
+ while ($current_table < sizeof($convert->convertor['schema']))
+ {
+ $schema = $convert->convertor['schema'][$current_table];
+
+ // The target table isn't set, this can be because a module (for example the attachement mod) is taking care of this.
+ if (empty($schema['target']))
+ {
+ $current_table++;
+ continue;
+ }
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => sprintf($user->lang['FILLING_TABLE'], $schema['target']),
+ ));
+
+ // This is only the case when we first start working on the tables.
+ if (!$skip_rows)
+ {
+ // process execute_first and query_first for this table...
+ if (!empty($schema['execute_first']))
+ {
+ eval($schema['execute_first']);
+ }
+
+ if (!empty($schema['query_first']))
+ {
+ if (!is_array($schema['query_first']))
+ {
+ $schema['query_first'] = array('target', array($schema['query_first']));
+ }
+ else if (!is_array($schema['query_first'][0]))
+ {
+ $schema['query_first'] = array(array($schema['query_first'][0], $schema['query_first'][1]));
+ }
+
+ foreach ($schema['query_first'] as $query_first)
+ {
+ if ($query_first[0] == 'src')
+ {
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+ $src_db->sql_query($query_first[1]);
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+ }
+ else
+ {
+ $db->sql_query($query_first[1]);
+ }
+ }
+ }
+
+ if (!empty($schema['autoincrement']))
+ {
+ switch ($db->sql_layer)
+ {
+ case 'postgres':
+ $db->sql_query("SELECT SETVAL('" . $schema['target'] . "_seq',(select case when max(" . $schema['autoincrement'] . ")>0 then max(" . $schema['autoincrement'] . ")+1 else 1 end from " . $schema['target'] . '));');
+ break;
+
+ case 'oracle':
+ $result = $db->sql_query('SELECT MAX(' . $schema['autoincrement'] . ') as max_id FROM ' . $schema['target']);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $largest_id = (int) $row['max_id'];
+
+ if ($largest_id)
+ {
+ $db->sql_query('DROP SEQUENCE ' . $schema['target'] . '_seq');
+ $db->sql_query('CREATE SEQUENCE ' . $schema['target'] . '_seq START WITH ' . ($largest_id + 1));
+ }
+ break;
+ }
+ }
+ }
+
+ // Process execute_always for this table
+ // This is for code which needs to be executed on every pass of this table if
+ // it gets split because of time restrictions
+ if (!empty($schema['execute_always']))
+ {
+ eval($schema['execute_always']);
+ }
+
+ //
+ // Set up some variables
+ //
+ // $waiting_rows holds rows for multirows insertion (MySQL only)
+ // $src_tables holds unique tables with aliases to select from
+ // $src_fields will quickly refer source fields (or aliases) corresponding to the current index
+ // $select_fields holds the names of the fields to retrieve
+ //
+
+ $sql_data = array(
+ 'source_fields' => array(),
+ 'target_fields' => array(),
+ 'source_tables' => array(),
+ 'select_fields' => array(),
+ );
+
+ // This statement is building the keys for later insertion.
+ $insert_query = $this->build_insert_query($schema, $sql_data, $current_table);
+
+ // If no source table is affected, we skip the table
+ if (empty($sql_data['source_tables']))
+ {
+ $skip_rows = 0;
+ $current_table++;
+ continue;
+ }
+
+ $distinct = (!empty($schema['distinct'])) ? 'DISTINCT ' : '';
+
+ $sql = 'SELECT ' . $distinct . implode(', ', $sql_data['select_fields']) . " \nFROM " . implode(', ', $sql_data['source_tables']);
+
+ // Where
+ $sql .= (!empty($schema['where'])) ? "\nWHERE (" . $schema['where'] . ')' : '';
+
+ // Group By
+ if (!empty($schema['group_by']))
+ {
+ $schema['group_by'] = array($schema['group_by']);
+ foreach ($sql_data['select_fields'] as $select)
+ {
+ $alias = strpos(strtolower($select), ' as ');
+ $select = ($alias) ? substr($select, 0, $alias) : $select;
+ if (!in_array($select, $schema['group_by']))
+ {
+ $schema['group_by'][] = $select;
+ }
+ }
+ }
+ $sql .= (!empty($schema['group_by'])) ? "\nGROUP BY " . implode(', ', $schema['group_by']) : '';
+
+ // Having
+ $sql .= (!empty($schema['having'])) ? "\nHAVING " . $schema['having'] : '';
+
+ // Order By
+ if (empty($schema['order_by']) && !empty($schema['primary']))
+ {
+ $schema['order_by'] = $schema['primary'];
+ }
+ $sql .= (!empty($schema['order_by'])) ? "\nORDER BY " . $schema['order_by'] : '';
+
+ // Counting basically holds the amount of rows processed.
+ $counting = -1;
+ $batch_time = 0;
+
+ while ($counting === -1 || ($counting >= $convert->batch_size && still_on_time()))
+ {
+ $old_current_table = $current_table;
+
+ $rows = '';
+ $waiting_rows = array();
+
+ if (!empty($batch_time))
+ {
+ $mtime = explode(' ', microtime());
+ $mtime = $mtime[0] + $mtime[1];
+ $rows = ceil($counting/($mtime - $batch_time)) . " rows/s ($counting rows) | ";
+ }
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => "skip_rows = $skip_rows",
+ 'RESULT' => $rows . ((defined('DEBUG_EXTRA') && function_exists('memory_get_usage')) ? ceil(memory_get_usage()/1024) . ' ' . $user->lang['KIB'] : ''),
+ ));
+
+ $mtime = explode(' ', microtime());
+ $batch_time = $mtime[0] + $mtime[1];
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+
+ // Take skip rows into account and only fetch batch_size amount of rows
+ $___result = $src_db->sql_query_limit($sql, $convert->batch_size, $skip_rows);
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+
+ // This loop processes each row
+ $counting = 0;
+
+ $convert->row = $convert_row = array();
+
+ if (!empty($schema['autoincrement']))
+ {
+ switch ($db->sql_layer)
+ {
+ case 'mssql':
+ case 'mssql_odbc':
+ $db->sql_query('SET IDENTITY_INSERT ' . $schema['target'] . ' ON');
+ break;
+ }
+ }
+
+ // Now handle the rows until time is over or no more rows to process...
+ while ($counting === 0 || still_on_time())
+ {
+ $convert_row = $src_db->sql_fetchrow($___result);
+
+ if (!$convert_row)
+ {
+ // move to the next batch or table
+ break;
+ }
+
+ // With this we are able to always save the last state
+ $convert->row = $convert_row;
+
+ // Increment the counting variable, it stores the number of rows we have processed
+ $counting++;
+
+ $insert_values = array();
+
+ $sql_flag = $this->process_row($schema, $sql_data, $insert_values);
+
+ if ($sql_flag === true)
+ {
+ switch ($db->sql_layer)
+ {
+ // If MySQL, we'll wait to have num_wait_rows rows to submit at once
+ case 'mysql':
+ case 'mysql4':
+ case 'mysqli':
+ $waiting_rows[] = '(' . implode(', ', $insert_values) . ')';
+
+ if (sizeof($waiting_rows) >= $convert->num_wait_rows)
+ {
+ $errored = false;
+
+ $db->sql_return_on_error(true);
+
+ if (!$db->sql_query($insert_query . implode(', ', $waiting_rows)))
+ {
+ $errored = true;
+ }
+ $db->sql_return_on_error(false);
+
+ if ($errored)
+ {
+ $db->sql_return_on_error(true);
+
+ // Because it errored out we will try to insert the rows one by one... most of the time this
+ // is caused by duplicate entries - but we also do not want to miss one...
+ foreach ($waiting_rows as $waiting_sql)
+ {
+ if (!$db->sql_query($insert_query . $waiting_sql))
+ {
+ $this->p_master->db_error($user->lang['DB_ERR_INSERT'], htmlspecialchars($insert_query . $waiting_sql) . '<br /><br />' . htmlspecialchars(print_r($db->_sql_error(), true)), __LINE__, __FILE__, true);
+ }
+ }
+
+ $db->sql_return_on_error(false);
+ }
+
+ $waiting_rows = array();
+ }
+
+ break;
+
+ default:
+ $insert_sql = $insert_query . '(' . implode(', ', $insert_values) . ')';
+
+ $db->sql_return_on_error(true);
+
+ if (!$db->sql_query($insert_sql))
+ {
+ $this->p_master->db_error($user->lang['DB_ERR_INSERT'], htmlspecialchars($insert_sql) . '<br /><br />' . htmlspecialchars(print_r($db->_sql_error(), true)), __LINE__, __FILE__, true);
+ }
+ $db->sql_return_on_error(false);
+
+ $waiting_rows = array();
+
+ break;
+ }
+ }
+
+ $skip_rows++;
+ }
+ $src_db->sql_freeresult($___result);
+
+ // We might still have some rows waiting
+ if (sizeof($waiting_rows))
+ {
+ $errored = false;
+ $db->sql_return_on_error(true);
+
+ if (!$db->sql_query($insert_query . implode(', ', $waiting_rows)))
+ {
+ $errored = true;
+ }
+ $db->sql_return_on_error(false);
+
+ if ($errored)
+ {
+ $db->sql_return_on_error(true);
+
+ // Because it errored out we will try to insert the rows one by one... most of the time this
+ // is caused by duplicate entries - but we also do not want to miss one...
+ foreach ($waiting_rows as $waiting_sql)
+ {
+ $db->sql_query($insert_query . $waiting_sql);
+ $this->p_master->db_error($user->lang['DB_ERR_INSERT'], htmlspecialchars($insert_query . $waiting_sql) . '<br /><br />' . htmlspecialchars(print_r($db->_sql_error(), true)), __LINE__, __FILE__, true);
+ }
+
+ $db->sql_return_on_error(false);
+ }
+
+ $waiting_rows = array();
+ }
+
+ if (!empty($schema['autoincrement']))
+ {
+ switch ($db->sql_layer)
+ {
+ case 'mssql':
+ case 'mssql_odbc':
+ $db->sql_query('SET IDENTITY_INSERT ' . $schema['target'] . ' OFF');
+ break;
+
+ case 'postgres':
+ $db->sql_query("SELECT SETVAL('" . $schema['target'] . "_seq',(select case when max(" . $schema['autoincrement'] . ")>0 then max(" . $schema['autoincrement'] . ")+1 else 1 end from " . $schema['target'] . '));');
+ break;
+
+ case 'oracle':
+ $result = $db->sql_query('SELECT MAX(' . $schema['autoincrement'] . ') as max_id FROM ' . $schema['target']);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $largest_id = (int) $row['max_id'];
+
+ if ($largest_id)
+ {
+ $db->sql_query('DROP SEQUENCE ' . $schema['target'] . '_seq');
+ $db->sql_query('CREATE SEQUENCE ' . $schema['target'] . '_seq START WITH ' . ($largest_id + 1));
+ }
+ break;
+ }
+ }
+ }
+
+ // When we reach this point, either the current table has been processed or we're running out of time.
+ if (still_on_time() && $counting < $convert->batch_size/* && !defined('DEBUG_EXTRA')*/)
+ {
+ $skip_rows = 0;
+ $current_table++;
+ }
+ else
+ {/*
+ if (still_on_time() && $counting < $convert->batch_size)
+ {
+ $skip_rows = 0;
+ $current_table++;
+ }*/
+
+ // Looks like we ran out of time.
+ $url = $this->save_convert_progress('&amp;current_table=' . $current_table . '&amp;skip_rows=' . $skip_rows);
+
+ $current_table++;
+// $percentage = ($skip_rows == 0) ? 0 : floor(100 / ($total_rows / $skip_rows));
+
+ $msg = sprintf($user->lang['STEP_PERCENT_COMPLETED'], $current_table, sizeof($convert->convertor['schema']));
+
+ $template->assign_vars(array(
+ 'L_MESSAGE' => $msg,
+ 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'],
+ 'U_ACTION' => $url,
+ ));
+
+ $this->meta_refresh($url);
+ return;
+ }
+ }
+
+ // Process execute_last then we'll be done
+ $url = $this->save_convert_progress('&amp;jump=1');
+
+ $template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['FINAL_STEP'],
+ 'U_ACTION' => $url,
+ ));
+
+ $this->meta_refresh($url);
+ return;
+ }
+
+ /**
+ * Sync function being executed at the middle, some functions need to be executed after a successful sync.
+ */
+ function sync_forums($sync_batch)
+ {
+ global $template, $user, $db, $phpbb_root_path, $phpEx, $config, $cache;
+ global $convert;
+
+ $template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $user->lang['SYNC_TOPICS'],
+ ));
+
+ $batch_size = $convert->batch_size;
+
+ $sql = 'SELECT MIN(topic_id) as min_value, MAX(topic_id) AS max_value
+ FROM ' . TOPICS_TABLE;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // Set values of minimum/maximum primary value for this table.
+ $primary_min = $row['min_value'];
+ $primary_max = $row['max_value'];
+
+ if ($sync_batch == 0)
+ {
+ $sync_batch = (int) $primary_min;
+ }
+
+ if ($sync_batch == 0)
+ {
+ $sync_batch = 1;
+ }
+
+ // Fetch a batch of rows, process and insert them.
+ while ($sync_batch <= $primary_max && still_on_time())
+ {
+ $end = ($sync_batch + $batch_size - 1);
+
+ // Sync all topics in batch mode...
+ sync('topic_approved', 'range', 'topic_id BETWEEN ' . $sync_batch . ' AND ' . $end, true, false);
+ sync('topic', 'range', 'topic_id BETWEEN ' . $sync_batch . ' AND ' . $end, true, true);
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => sprintf($user->lang['SYNC_TOPIC_ID'], $sync_batch, ($sync_batch + $batch_size)) . ((defined('DEBUG_EXTRA') && function_exists('memory_get_usage')) ? ' [' . ceil(memory_get_usage()/1024) . ' ' . $user->lang['KIB'] . ']' : ''),
+ 'RESULT' => $user->lang['DONE'],
+ ));
+
+ $sync_batch += $batch_size;
+ }
+
+ if ($sync_batch >= $primary_max)
+ {
+ $url = $this->save_convert_progress('&amp;final_jump=1');
+
+ $template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'],
+ 'U_ACTION' => $url,
+ ));
+
+ $this->meta_refresh($url);
+ return;
+ }
+ else
+ {
+ $sync_batch--;
+ }
+
+ $url = $this->save_convert_progress('&amp;sync_batch=' . $sync_batch);
+
+ $template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'],
+ 'U_ACTION' => $url,
+ ));
+
+ $this->meta_refresh($url);
+ return;
+ }
+
+ /**
+ * Save the convertor status
+ */
+ function save_convert_progress($step)
+ {
+ global $convert, $language;
+
+ // Save convertor Status
+ set_config('convert_progress', serialize(array(
+ 'step' => $step,
+ 'table_prefix' => $convert->src_table_prefix,
+ 'tag' => $convert->convertor_tag,
+ )), true);
+
+ set_config('convert_db_server', serialize(array(
+ 'dbms' => $convert->src_dbms,
+ 'dbhost' => $convert->src_dbhost,
+ 'dbport' => $convert->src_dbport,
+ 'dbname' => $convert->src_dbname,
+ )), true);
+
+ set_config('convert_db_user', serialize(array(
+ 'dbuser' => $convert->src_dbuser,
+ 'dbpasswd' => $convert->src_dbpasswd,
+ )), true);
+
+ return $this->p_master->module_url . "?mode={$this->mode}&amp;sub=in_progress&amp;tag={$convert->convertor_tag}$step&amp;language=$language";
+ }
+
+ /**
+ * Finish conversion, the last function to be called.
+ */
+ function finish_conversion()
+ {
+ global $db, $phpbb_root_path, $phpEx, $convert, $config, $language, $user, $template;
+
+ $db->sql_query('DELETE FROM ' . CONFIG_TABLE . "
+ WHERE config_name = 'convert_progress'
+ OR config_name = 'convert_options'
+ OR config_name = 'convert_db_server'
+ OR config_name = 'convert_db_user'");
+ $db->sql_query('DELETE FROM ' . SESSIONS_TABLE);
+
+ @unlink($phpbb_root_path . 'cache/data_global.' . $phpEx);
+ cache_moderators();
+
+ // And finally, add a note to the log
+ add_log('admin', 'LOG_INSTALL_CONVERTED', $convert->convertor_data['forum_name'], $config['version']);
+
+ $url = $this->p_master->module_url . "?mode={$this->mode}&amp;sub=final&amp;language=$language";
+
+ $template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['FINAL_STEP'],
+ 'U_ACTION' => $url,
+ ));
+
+ $this->meta_refresh($url);
+ return;
+ }
+
+ /**
+ * This function marks the steps after syncing
+ */
+ function final_jump($final_jump)
+ {
+ global $template, $user, $src_db, $same_db, $db, $phpbb_root_path, $phpEx, $config, $cache;
+ global $convert;
+
+ $template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $user->lang['PROCESS_LAST'],
+ ));
+
+ if ($final_jump == 1)
+ {
+ $db->sql_return_on_error(true);
+
+ update_topics_posted();
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $user->lang['UPDATE_TOPICS_POSTED'],
+ 'RESULT' => $user->lang['DONE'],
+ ));
+
+ if ($db->sql_error_triggered)
+ {
+ $template->assign_vars(array(
+ 'S_ERROR_BOX' => true,
+ 'ERROR_TITLE' => $user->lang['UPDATE_TOPICS_POSTED'],
+ 'ERROR_MSG' => $user->lang['UPDATE_TOPICS_POSTED_ERR'],
+ ));
+ }
+ $db->sql_return_on_error(false);
+
+ $this->finish_conversion();
+ return;
+ }
+ }
+
+ /**
+ * This function marks the steps before syncing (jump=1)
+ */
+ function jump($jump, $last_statement)
+ {
+ global $template, $user, $src_db, $same_db, $db, $phpbb_root_path, $phpEx, $config, $cache;
+ global $convert;
+
+ $template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $user->lang['PROCESS_LAST'],
+ ));
+
+ if ($jump == 1)
+ {
+ // Execute 'last' statements/queries
+ if (!empty($convert->convertor['execute_last']))
+ {
+ if (!is_array($convert->convertor['execute_last']))
+ {
+ eval($convert->convertor['execute_last']);
+ }
+ else
+ {
+ while ($last_statement < sizeof($convert->convertor['execute_last']))
+ {
+ eval($convert->convertor['execute_last'][$last_statement]);
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $convert->convertor['execute_last'][$last_statement],
+ 'RESULT' => $user->lang['DONE'],
+ ));
+
+ $last_statement++;
+ $url = $this->save_convert_progress('&amp;jump=1&amp;last=' . $last_statement);
+
+ $percentage = ($last_statement == 0) ? 0 : floor(100 / (sizeof($convert->convertor['execute_last']) / $last_statement));
+ $msg = sprintf($user->lang['STEP_PERCENT_COMPLETED'], $last_statement, sizeof($convert->convertor['execute_last']), $percentage);
+
+ $template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['CONTINUE_LAST'],
+ 'L_MESSAGE' => $msg,
+ 'U_ACTION' => $url,
+ ));
+
+ $this->meta_refresh($url);
+ return;
+ }
+ }
+ }
+
+ if (!empty($convert->convertor['query_last']))
+ {
+ if (!is_array($convert->convertor['query_last']))
+ {
+ $convert->convertor['query_last'] = array('target', array($convert->convertor['query_last']));
+ }
+ else if (!is_array($convert->convertor['query_last'][0]))
+ {
+ $convert->convertor['query_last'] = array(array($convert->convertor['query_last'][0], $convert->convertor['query_last'][1]));
+ }
+
+ foreach ($convert->convertor['query_last'] as $query_last)
+ {
+ if ($query_last[0] == 'src')
+ {
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+
+ $src_db->sql_query($query_last[1]);
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+ }
+ else
+ {
+ $db->sql_query($query_last[1]);
+ }
+ }
+ }
+
+ // Sanity check
+ $db->sql_return_on_error(false);
+ $src_db->sql_return_on_error(false);
+
+ fix_empty_primary_groups();
+
+ if (!isset($config['board_startdate']))
+ {
+ $sql = 'SELECT MIN(user_regdate) AS board_startdate
+ FROM ' . USERS_TABLE;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (($row['board_startdate'] < $config['board_startdate'] && $row['board_startdate'] > 0) || !isset($config['board_startdate']))
+ {
+ set_config('board_startdate', $row['board_startdate']);
+ $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_regdate = ' . $row['board_startdate'] . ' WHERE user_id = ' . ANONYMOUS);
+ }
+ }
+
+ update_dynamic_config();
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $user->lang['CLEAN_VERIFY'],
+ 'RESULT' => $user->lang['DONE'],
+ ));
+
+ $url = $this->save_convert_progress('&amp;jump=2');
+
+ $template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'],
+ 'U_ACTION' => $url,
+ ));
+
+ $this->meta_refresh($url);
+ return;
+ }
+
+ if ($jump == 2)
+ {
+ $db->sql_query('UPDATE ' . USERS_TABLE . " SET user_permissions = ''");
+
+ // TODO: sync() is likely going to bomb out on forums with a considerable amount of topics.
+ // TODO: the sync function is able to handle FROM-TO values, we should use them here (batch processing)
+ sync('forum', '', '', false, true);
+ $cache->destroy('sql', FORUMS_TABLE);
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $user->lang['SYNC_FORUMS'],
+ 'RESULT' => $user->lang['DONE'],
+ ));
+
+ // Continue with synchronizing the forums...
+ $url = $this->save_convert_progress('&amp;sync_batch=0');
+
+ $template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'],
+ 'U_ACTION' => $url,
+ ));
+
+ $this->meta_refresh($url);
+ return;
+ }
+ }
+
+ function build_insert_query(&$schema, &$sql_data, $current_table)
+ {
+ global $db, $user;
+ global $convert;
+
+ // Can we use IGNORE with this DBMS?
+ $sql_ignore = (strpos($db->sql_layer, 'mysql') === 0 && !defined('DEBUG_EXTRA')) ? 'IGNORE ' : '';
+ $insert_query = 'INSERT ' . $sql_ignore . 'INTO ' . $schema['target'] . ' (';
+
+ $aliases = array();
+
+ $sql_data = array(
+ 'source_fields' => array(),
+ 'target_fields' => array(),
+ 'source_tables' => array(),
+ 'select_fields' => array(),
+ );
+
+ foreach ($schema as $key => $val)
+ {
+ // Example: array('group_name', 'extension_groups.group_name', 'htmlspecialchars'),
+ if (is_int($key))
+ {
+ if (!empty($val[0]))
+ {
+ // Target fields
+ $sql_data['target_fields'][$val[0]] = $key;
+ $insert_query .= $val[0] . ', ';
+ }
+
+ if (!is_array($val[1]))
+ {
+ $val[1] = array($val[1]);
+ }
+
+ foreach ($val[1] as $valkey => $value_1)
+ {
+ // This should cover about any case:
+ //
+ // table.field => SELECT table.field FROM table
+ // table.field AS alias => SELECT table.field AS alias FROM table
+ // table.field AS table2.alias => SELECT table2.field AS alias FROM table table2
+ // table.field AS table2.field => SELECT table2.field FROM table table2
+ //
+ if (preg_match('/^([a-z0-9_]+)\.([a-z0-9_]+)( +AS +(([a-z0-9_]+?)\.)?([a-z0-9_]+))?$/i', $value_1, $m))
+ {
+ // There is 'AS ...' in the field names
+ if (!empty($m[3]))
+ {
+ $value_1 = ($m[2] == $m[6]) ? $m[1] . '.' . $m[2] : $m[1] . '.' . $m[2] . ' AS ' . $m[6];
+
+ // Table alias: store it then replace the source table with it
+ if (!empty($m[5]) && $m[5] != $m[1])
+ {
+ $aliases[$m[5]] = $m[1];
+ $value_1 = str_replace($m[1] . '.' . $m[2], $m[5] . '.' . $m[2], $value_1);
+ }
+ }
+ else
+ {
+ // No table alias
+ $sql_data['source_tables'][$m[1]] = (empty($convert->src_table_prefix)) ? $m[1] : $convert->src_table_prefix . $m[1] . ' ' . $m[1];
+ }
+
+ $sql_data['select_fields'][$value_1] = $value_1;
+ $sql_data['source_fields'][$key][$valkey] = (!empty($m[6])) ? $m[6] : $m[2];
+ }
+ }
+ }
+ else if ($key == 'where' || $key == 'group_by' || $key == 'order_by' || $key == 'having')
+ {
+ if (@preg_match_all('/([a-z0-9_]+)\.([a-z0-9_]+)/i', $val, $m))
+ {
+ foreach ($m[1] as $value)
+ {
+ $sql_data['source_tables'][$value] = (empty($convert->src_table_prefix)) ? $value : $convert->src_table_prefix . $value . ' ' . $value;
+ }
+ }
+ }
+ }
+
+ // Add the aliases to the list of tables
+ foreach ($aliases as $alias => $table)
+ {
+ $sql_data['source_tables'][$alias] = $convert->src_table_prefix . $table . ' ' . $alias;
+ }
+
+ // 'left_join' => 'forums LEFT JOIN forum_prune ON forums.forum_id = forum_prune.forum_id',
+ if (!empty($schema['left_join']))
+ {
+ if (!is_array($schema['left_join']))
+ {
+ $schema['left_join'] = array($schema['left_join']);
+ }
+
+ foreach ($schema['left_join'] as $left_join)
+ {
+ // This won't handle concatened LEFT JOINs
+ if (!preg_match('/([a-z0-9_]+) LEFT JOIN ([a-z0-9_]+) A?S? ?([a-z0-9_]*?) ?(ON|USING)(.*)/i', $left_join, $m))
+ {
+ $this->p_master->error(sprintf($user->lang['NOT_UNDERSTAND'], 'LEFT JOIN', $left_join, $current_table, $schema['target']), __LINE__, __FILE__);
+ }
+
+ if (!empty($aliases[$m[2]]))
+ {
+ if (!empty($m[3]))
+ {
+ $this->p_master->error(sprintf($user->lang['NAMING_CONFLICT'], $m[2], $m[3], $schema['left_join']), __LINE__, __FILE__);
+ }
+
+ $m[2] = $aliases[$m[2]];
+ $m[3] = $m[2];
+ }
+
+ $right_table = $convert->src_table_prefix . $m[2];
+ if (!empty($m[3]))
+ {
+ unset($sql_data['source_tables'][$m[3]]);
+ }
+ else if ($m[2] != $m[1])
+ {
+ unset($sql_data['source_tables'][$m[2]]);
+ }
+
+ if (strpos($sql_data['source_tables'][$m[1]], "\nLEFT JOIN") !== false)
+ {
+ $sql_data['source_tables'][$m[1]] = '(' . $sql_data['source_tables'][$m[1]] . ")\nLEFT JOIN $right_table";
+ }
+ else
+ {
+ $sql_data['source_tables'][$m[1]] .= "\nLEFT JOIN $right_table";
+ }
+
+ if (!empty($m[3]))
+ {
+ unset($sql_data['source_tables'][$m[3]]);
+ $sql_data['source_tables'][$m[1]] .= ' AS ' . $m[3];
+ }
+ else if (!empty($convert->src_table_prefix))
+ {
+ $sql_data['source_tables'][$m[1]] .= ' AS ' . $m[2];
+ }
+ $sql_data['source_tables'][$m[1]] .= ' ' . $m[4] . $m[5];
+ }
+ }
+
+ // Remove ", " from the end of the insert query
+ $insert_query = substr($insert_query, 0, -2) . ') VALUES ';
+
+ return $insert_query;
+ }
+
+ /**
+ * Function for processing the currently handled row
+ */
+ function process_row(&$schema, &$sql_data, &$insert_values)
+ {
+ global $template, $user, $phpbb_root_path, $phpEx, $db, $lang, $config, $cache;
+ global $convert, $convert_row;
+
+ $sql_flag = false;
+
+ foreach ($schema as $key => $fields)
+ {
+ // We are only interested in the lines with:
+ // array('comment', 'attachments_desc.comment', 'htmlspecialchars'),
+ if (is_int($key))
+ {
+ if (!is_array($fields[1]))
+ {
+ $fields[1] = array($fields[1]);
+ }
+
+ $firstkey_set = false;
+ $firstkey = 0;
+
+ foreach ($fields[1] as $inner_key => $inner_value)
+ {
+ if (!$firstkey_set)
+ {
+ $firstkey = $inner_key;
+ $firstkey_set = true;
+ }
+
+ $src_field = isset($sql_data['source_fields'][$key][$inner_key]) ? $sql_data['source_fields'][$key][$inner_key] : '';
+
+ if (!empty($src_field))
+ {
+ $fields[1][$inner_key] = $convert->row[$src_field];
+ }
+ }
+
+ if (!empty($fields[0]))
+ {
+ // We have a target field, if we haven't set $sql_flag yet it will be set to TRUE.
+ // If a function has already set it to FALSE it won't change it.
+ if ($sql_flag === false)
+ {
+ $sql_flag = true;
+ }
+
+ // No function assigned?
+ if (empty($fields[2]))
+ {
+ $value = $fields[1][$firstkey];
+ }
+ else if (is_array($fields[2]))
+ {
+ // Execute complex function/eval/typecast
+ $value = $fields[1];
+
+ foreach ($fields[2] as $type => $execution)
+ {
+ if (strpos($type, 'typecast') === 0)
+ {
+ if (!is_array($value))
+ {
+ $value = array($value);
+ }
+ $value = $value[0];
+ settype($value, $execution);
+ }
+ else if (strpos($type, 'function') === 0)
+ {
+ if (!is_array($value))
+ {
+ $value = array($value);
+ }
+
+ $value = call_user_func_array($execution, $value);
+ }
+ else if (strpos($type, 'execute') === 0)
+ {
+ if (!is_array($value))
+ {
+ $value = array($value);
+ }
+
+ $execution = str_replace('{RESULT}', '$value', $execution);
+ $execution = str_replace('{VALUE}', '$value', $execution);
+ eval($execution);
+ }
+ }
+ }
+ else
+ {
+ $value = call_user_func_array($fields[2], $fields[1]);
+ }
+
+ if (is_null($value))
+ {
+ $value = '';
+ }
+
+ $insert_values[] = $db->_sql_validate_value($value);
+ }
+ else if (!empty($fields[2]))
+ {
+ if (is_array($fields[2]))
+ {
+ // Execute complex function/eval/typecast
+ $value = '';
+
+ foreach ($fields[2] as $type => $execution)
+ {
+ if (strpos($type, 'typecast') === 0)
+ {
+ $value = settype($value, $execution);
+ }
+ else if (strpos($type, 'function') === 0)
+ {
+ if (!is_array($value))
+ {
+ $value = array($value);
+ }
+
+ $value = call_user_func_array($execution, $value);
+ }
+ else if (strpos($type, 'execute') === 0)
+ {
+ if (!is_array($value))
+ {
+ $value = array($value);
+ }
+
+ $execution = str_replace('{RESULT}', '$value', $execution);
+ $execution = str_replace('{VALUE}', '$value', $execution);
+ eval($execution);
+ }
+ }
+ }
+ else
+ {
+ call_user_func_array($fields[2], $fields[1]);
+ }
+ }
+ }
+ }
+
+ return $sql_flag;
+ }
+
+ /**
+ * Own meta refresh function to be able to change the global time used
+ */
+ function meta_refresh($url)
+ {
+ global $convert, $template;
+
+ if ($convert->options['refresh'])
+ {
+ // Because we should not rely on correct settings, we simply use the relative path here directly.
+ $template->assign_vars(array(
+ 'S_REFRESH' => true,
+ 'META' => '<meta http-equiv="refresh" content="5;url=' . $url . '" />')
+ );
+ }
+ }
+
+ /**
+ * The information below will be used to build the input fields presented to the user
+ */
+ var $convert_options = array(
+ 'legend1' => 'SPECIFY_OPTIONS',
+ 'src_dbms' => array('lang' => 'DBMS', 'type' => 'select', 'options' => 'dbms_select(\'{VALUE}\', true)', 'explain' => false),
+ 'src_dbhost' => array('lang' => 'DB_HOST', 'type' => 'text:25:100', 'explain' => true),
+ 'src_dbport' => array('lang' => 'DB_PORT', 'type' => 'text:25:100', 'explain' => true),
+ 'src_dbname' => array('lang' => 'DB_NAME', 'type' => 'text:25:100', 'explain' => false),
+ 'src_dbuser' => array('lang' => 'DB_USERNAME', 'type' => 'text:25:100', 'explain' => false),
+ 'src_dbpasswd' => array('lang' => 'DB_PASSWORD', 'type' => 'password:25:100', 'explain' => false),
+ 'src_table_prefix' => array('lang' => 'TABLE_PREFIX', 'type' => 'text:25:100', 'explain' => false),
+ //'src_url' => array('lang' => 'FORUM_ADDRESS', 'type' => 'text:50:100', 'explain' => true),
+ 'forum_path' => array('lang' => 'FORUM_PATH', 'type' => 'text:25:100', 'explain' => true),
+ 'refresh' => array('lang' => 'REFRESH_PAGE', 'type' => 'radio:yes_no', 'explain' => true),
+ );
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
new file mode 100644
index 0000000000..1b8553fb7a
--- /dev/null
+++ b/phpBB/install/install_install.php
@@ -0,0 +1,2243 @@
+<?php
+/**
+*
+* @package install
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+*/
+if (!defined('IN_INSTALL'))
+{
+ // Someone has tried to access the file direct. This is not a good idea, so exit
+ exit;
+}
+
+if (!empty($setmodules))
+{
+ // If phpBB is already installed we do not include this module
+ if (@file_exists($phpbb_root_path . 'config.' . $phpEx) && !file_exists($phpbb_root_path . 'cache/install_lock'))
+ {
+ include_once($phpbb_root_path . 'config.' . $phpEx);
+
+ if (defined('PHPBB_INSTALLED'))
+ {
+ return;
+ }
+ }
+
+ $module[] = array(
+ 'module_type' => 'install',
+ 'module_title' => 'INSTALL',
+ 'module_filename' => substr(basename(__FILE__), 0, -strlen($phpEx)-1),
+ 'module_order' => 10,
+ 'module_subs' => '',
+ 'module_stages' => array('INTRO', 'REQUIREMENTS', 'DATABASE', 'ADMINISTRATOR', 'CONFIG_FILE', 'ADVANCED', 'CREATE_TABLE', 'FINAL'),
+ 'module_reqs' => ''
+ );
+}
+
+/**
+* Installation
+* @package install
+*/
+class install_install extends module
+{
+ function install_install(&$p_master)
+ {
+ $this->p_master = &$p_master;
+ }
+
+ function main($mode, $sub)
+ {
+ global $lang, $template, $language, $phpbb_root_path;
+
+ switch ($sub)
+ {
+ case 'intro':
+ $this->page_title = $lang['SUB_INTRO'];
+
+ $template->assign_vars(array(
+ 'TITLE' => $lang['INSTALL_INTRO'],
+ 'BODY' => $lang['INSTALL_INTRO_BODY'],
+ 'L_SUBMIT' => $lang['NEXT_STEP'],
+ 'S_LANG_SELECT' => '<select id="language" name="language">' . $this->p_master->inst_language_select($language) . '</select>',
+ 'U_ACTION' => $this->p_master->module_url . "?mode=$mode&amp;sub=requirements&amp;language=$language",
+ ));
+
+ break;
+
+ case 'requirements':
+ $this->check_server_requirements($mode, $sub);
+
+ break;
+
+ case 'database':
+ $this->obtain_database_settings($mode, $sub);
+
+ break;
+
+ case 'administrator':
+ $this->obtain_admin_settings($mode, $sub);
+
+ break;
+
+ case 'config_file':
+ $this->create_config_file($mode, $sub);
+
+ break;
+
+ case 'advanced':
+ $this->obtain_advanced_settings($mode, $sub);
+
+ break;
+
+ case 'create_table':
+ $this->load_schema($mode, $sub);
+ break;
+
+ case 'final':
+ $this->build_search_index($mode, $sub);
+ $this->add_modules($mode, $sub);
+ $this->add_language($mode, $sub);
+ $this->add_bots($mode, $sub);
+ $this->email_admin($mode, $sub);
+
+ // Remove the lock file
+ @unlink($phpbb_root_path . 'cache/install_lock');
+
+ break;
+ }
+
+ $this->tpl_name = 'install_install';
+ }
+
+ /**
+ * Checks that the server we are installing on meets the requirements for running phpBB
+ */
+ function check_server_requirements($mode, $sub)
+ {
+ global $lang, $template, $phpbb_root_path, $phpEx, $language;
+
+ $this->page_title = $lang['STAGE_REQUIREMENTS'];
+
+ $template->assign_vars(array(
+ 'TITLE' => $lang['REQUIREMENTS_TITLE'],
+ 'BODY' => $lang['REQUIREMENTS_EXPLAIN'],
+ ));
+
+ $passed = array('php' => false, 'db' => false, 'files' => false, 'pcre' => false, 'imagesize' => false,);
+
+ // Test for basic PHP settings
+ $template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $lang['PHP_SETTINGS'],
+ 'LEGEND_EXPLAIN' => $lang['PHP_SETTINGS_EXPLAIN'],
+ ));
+
+ // Test the minimum PHP version
+ $php_version = PHP_VERSION;
+
+ if (version_compare($php_version, '4.3.3') < 0)
+ {
+ $result = '<strong style="color:red">' . $lang['NO'] . '</strong>';
+ }
+ else
+ {
+ $passed['php'] = true;
+
+ // We also give feedback on whether we're running in safe mode
+ $result = '<strong style="color:green">' . $lang['YES'];
+ if (@ini_get('safe_mode') == '1' || strtolower(@ini_get('safe_mode')) == 'on')
+ {
+ $result .= ', ' . $lang['PHP_SAFE_MODE'];
+ }
+ $result .= '</strong>';
+ }
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['PHP_VERSION_REQD'],
+ 'RESULT' => $result,
+
+ 'S_EXPLAIN' => false,
+ 'S_LEGEND' => false,
+ ));
+
+ // Check for register_globals being enabled
+ if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
+ {
+ $result = '<strong style="color:red">' . $lang['NO'] . '</strong>';
+ }
+ else
+ {
+ $result = '<strong style="color:green">' . $lang['YES'] . '</strong>';
+ }
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['PHP_REGISTER_GLOBALS'],
+ 'TITLE_EXPLAIN' => $lang['PHP_REGISTER_GLOBALS_EXPLAIN'],
+ 'RESULT' => $result,
+
+ 'S_EXPLAIN' => true,
+ 'S_LEGEND' => false,
+ ));
+
+
+ // Check for url_fopen
+ if (@ini_get('allow_url_fopen') == '1' || strtolower(@ini_get('allow_url_fopen')) == 'on')
+ {
+ $result = '<strong style="color:green">' . $lang['YES'] . '</strong>';
+ }
+ else
+ {
+ $result = '<strong style="color:red">' . $lang['NO'] . '</strong>';
+ }
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['PHP_URL_FOPEN_SUPPORT'],
+ 'TITLE_EXPLAIN' => $lang['PHP_URL_FOPEN_SUPPORT_EXPLAIN'],
+ 'RESULT' => $result,
+
+ 'S_EXPLAIN' => true,
+ 'S_LEGEND' => false,
+ ));
+
+
+ // Check for getimagesize
+ if (@function_exists('getimagesize'))
+ {
+ $passed['imagesize'] = true;
+ $result = '<strong style="color:green">' . $lang['YES'] . '</strong>';
+ }
+ else
+ {
+ $result = '<strong style="color:red">' . $lang['NO'] . '</strong>';
+ }
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['PHP_GETIMAGESIZE_SUPPORT'],
+ 'TITLE_EXPLAIN' => $lang['PHP_GETIMAGESIZE_SUPPORT_EXPLAIN'],
+ 'RESULT' => $result,
+
+ 'S_EXPLAIN' => true,
+ 'S_LEGEND' => false,
+ ));
+
+ // Check for PCRE UTF-8 support
+ if (@preg_match('//u', ''))
+ {
+ $passed['pcre'] = true;
+ $result = '<strong style="color:green">' . $lang['YES'] . '</strong>';
+ }
+ else
+ {
+ $result = '<strong style="color:red">' . $lang['NO'] . '</strong>';
+ }
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['PCRE_UTF_SUPPORT'],
+ 'TITLE_EXPLAIN' => $lang['PCRE_UTF_SUPPORT_EXPLAIN'],
+ 'RESULT' => $result,
+
+ 'S_EXPLAIN' => true,
+ 'S_LEGEND' => false,
+ ));
+
+/**
+* Better not enabling and adding to the loaded extensions due to the specific requirements needed
+ if (!@extension_loaded('mbstring'))
+ {
+ can_load_dll('mbstring');
+ }
+*/
+
+ $passed['mbstring'] = true;
+ if (@extension_loaded('mbstring'))
+ {
+ // Test for available database modules
+ $template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $lang['MBSTRING_CHECK'],
+ 'LEGEND_EXPLAIN' => $lang['MBSTRING_CHECK_EXPLAIN'],
+ ));
+
+ $checks = array(
+ array('func_overload', '&', MB_OVERLOAD_MAIL|MB_OVERLOAD_STRING),
+ array('encoding_translation', '!=', 0),
+ array('http_input', '!=', 'pass'),
+ array('http_output', '!=', 'pass')
+ );
+
+ foreach ($checks as $mb_checks)
+ {
+ $ini_val = @ini_get('mbstring.' . $mb_checks[0]);
+ switch ($mb_checks[1])
+ {
+ case '&':
+ if (intval($ini_val) & $mb_checks[2])
+ {
+ $result = '<strong style="color:red">' . $lang['NO'] . '</strong>';
+ $passed['mbstring'] = false;
+ }
+ else
+ {
+ $result = '<strong style="color:green">' . $lang['YES'] . '</strong>';
+ }
+ break;
+
+ case '!=':
+ if ($ini_val != $mb_checks[2])
+ {
+ $result = '<strong style="color:red">' . $lang['NO'] . '</strong>';
+ $passed['mbstring'] = false;
+ }
+ else
+ {
+ $result = '<strong style="color:green">' . $lang['YES'] . '</strong>';
+ }
+ break;
+ }
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['MBSTRING_' . strtoupper($mb_checks[0])],
+ 'TITLE_EXPLAIN' => $lang['MBSTRING_' . strtoupper($mb_checks[0]) . '_EXPLAIN'],
+ 'RESULT' => $result,
+
+ 'S_EXPLAIN' => true,
+ 'S_LEGEND' => false,
+ ));
+ }
+ }
+
+ // Test for available database modules
+ $template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $lang['PHP_SUPPORTED_DB'],
+ 'LEGEND_EXPLAIN' => $lang['PHP_SUPPORTED_DB_EXPLAIN'],
+ ));
+
+ $available_dbms = get_available_dbms(false, true);
+ $passed['db'] = $available_dbms['ANY_DB_SUPPORT'];
+ unset($available_dbms['ANY_DB_SUPPORT']);
+
+ foreach ($available_dbms as $db_name => $db_ary)
+ {
+ if (!$db_ary['AVAILABLE'])
+ {
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['DLL_' . strtoupper($db_name)],
+ 'RESULT' => '<span style="color:red">' . $lang['UNAVAILABLE'] . '</span>',
+
+ 'S_EXPLAIN' => false,
+ 'S_LEGEND' => false,
+ ));
+ }
+ else
+ {
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['DLL_' . strtoupper($db_name)],
+ 'RESULT' => '<strong style="color:green">' . $lang['AVAILABLE'] . '</strong>',
+
+ 'S_EXPLAIN' => false,
+ 'S_LEGEND' => false,
+ ));
+ }
+ }
+
+ // Test for other modules
+ $template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $lang['PHP_OPTIONAL_MODULE'],
+ 'LEGEND_EXPLAIN' => $lang['PHP_OPTIONAL_MODULE_EXPLAIN'],
+ ));
+
+ foreach ($this->php_dlls_other as $dll)
+ {
+ if (!@extension_loaded($dll))
+ {
+ if (!can_load_dll($dll))
+ {
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['DLL_' . strtoupper($dll)],
+ 'RESULT' => '<strong style="color:red">' . $lang['UNAVAILABLE'] . '</strong>',
+
+ 'S_EXPLAIN' => false,
+ 'S_LEGEND' => false,
+ ));
+ continue;
+ }
+ }
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['DLL_' . strtoupper($dll)],
+ 'RESULT' => '<strong style="color:green">' . $lang['AVAILABLE'] . '</strong>',
+
+ 'S_EXPLAIN' => false,
+ 'S_LEGEND' => false,
+ ));
+ }
+
+ // Can we find Imagemagick anywhere on the system?
+ $exe = (DIRECTORY_SEPARATOR == '\\') ? '.exe' : '';
+
+ $magic_home = getenv('MAGICK_HOME');
+ $img_imagick = '';
+ if (empty($magic_home))
+ {
+ $locations = array('C:/WINDOWS/', 'C:/WINNT/', 'C:/WINDOWS/SYSTEM/', 'C:/WINNT/SYSTEM/', 'C:/WINDOWS/SYSTEM32/', 'C:/WINNT/SYSTEM32/', '/usr/bin/', '/usr/sbin/', '/usr/local/bin/', '/usr/local/sbin/', '/opt/', '/usr/imagemagick/', '/usr/bin/imagemagick/');
+ $path_locations = str_replace('\\', '/', (explode(($exe) ? ';' : ':', getenv('PATH'))));
+
+ $locations = array_merge($path_locations, $locations);
+ foreach ($locations as $location)
+ {
+ // The path might not end properly, fudge it
+ if (substr($location, -1, 1) !== '/')
+ {
+ $location .= '/';
+ }
+
+ if (@file_exists($location) && @is_readable($location . 'mogrify' . $exe) && @filesize($location . 'mogrify' . $exe) > 3000)
+ {
+ $img_imagick = str_replace('\\', '/', $location);
+ continue;
+ }
+ }
+ }
+ else
+ {
+ $img_imagick = str_replace('\\', '/', $magic_home);
+ }
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['APP_MAGICK'],
+ 'RESULT' => ($img_imagick) ? '<strong style="color:green">' . $lang['AVAILABLE'] . ', ' . $img_imagick . '</strong>' : '<strong style="color:blue">' . $lang['NO_LOCATION'] . '</strong>',
+
+ 'S_EXPLAIN' => false,
+ 'S_LEGEND' => false,
+ ));
+
+ // Check permissions on files/directories we need access to
+ $template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $lang['FILES_REQUIRED'],
+ 'LEGEND_EXPLAIN' => $lang['FILES_REQUIRED_EXPLAIN'],
+ ));
+
+ $directories = array('cache/', 'files/', 'store/');
+
+ umask(0);
+
+ $passed['files'] = true;
+ foreach ($directories as $dir)
+ {
+ $exists = $write = false;
+
+ // Try to create the directory if it does not exist
+ if (!file_exists($phpbb_root_path . $dir))
+ {
+ @mkdir($phpbb_root_path . $dir, 0777);
+ phpbb_chmod($phpbb_root_path . $dir, CHMOD_READ | CHMOD_WRITE);
+ }
+
+ // Now really check
+ if (file_exists($phpbb_root_path . $dir) && is_dir($phpbb_root_path . $dir))
+ {
+ phpbb_chmod($phpbb_root_path . $dir, CHMOD_READ | CHMOD_WRITE);
+ $exists = true;
+ }
+
+ // Now check if it is writable by storing a simple file
+ $fp = @fopen($phpbb_root_path . $dir . 'test_lock', 'wb');
+ if ($fp !== false)
+ {
+ $write = true;
+ }
+ @fclose($fp);
+
+ @unlink($phpbb_root_path . $dir . 'test_lock');
+
+ $passed['files'] = ($exists && $write && $passed['files']) ? true : false;
+
+ $exists = ($exists) ? '<strong style="color:green">' . $lang['FOUND'] . '</strong>' : '<strong style="color:red">' . $lang['NOT_FOUND'] . '</strong>';
+ $write = ($write) ? ', <strong style="color:green">' . $lang['WRITABLE'] . '</strong>' : (($exists) ? ', <strong style="color:red">' . $lang['UNWRITABLE'] . '</strong>' : '');
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $dir,
+ 'RESULT' => $exists . $write,
+
+ 'S_EXPLAIN' => false,
+ 'S_LEGEND' => false,
+ ));
+ }
+
+ // Check permissions on files/directories it would be useful access to
+ $template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $lang['FILES_OPTIONAL'],
+ 'LEGEND_EXPLAIN' => $lang['FILES_OPTIONAL_EXPLAIN'],
+ ));
+
+ $directories = array('config.' . $phpEx, 'images/avatars/upload/');
+
+ foreach ($directories as $dir)
+ {
+ $write = $exists = true;
+ if (file_exists($phpbb_root_path . $dir))
+ {
+ if (!@is_writable($phpbb_root_path . $dir))
+ {
+ $write = false;
+ }
+ }
+ else
+ {
+ $write = $exists = false;
+ }
+
+ $exists_str = ($exists) ? '<strong style="color:green">' . $lang['FOUND'] . '</strong>' : '<strong style="color:red">' . $lang['NOT_FOUND'] . '</strong>';
+ $write_str = ($write) ? ', <strong style="color:green">' . $lang['WRITABLE'] . '</strong>' : (($exists) ? ', <strong style="color:red">' . $lang['UNWRITABLE'] . '</strong>' : '');
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $dir,
+ 'RESULT' => $exists_str . $write_str,
+
+ 'S_EXPLAIN' => false,
+ 'S_LEGEND' => false,
+ ));
+ }
+
+ // And finally where do we want to go next (well today is taken isn't it :P)
+ $s_hidden_fields = ($img_imagick) ? '<input type="hidden" name="img_imagick" value="' . addslashes($img_imagick) . '" />' : '';
+
+ $url = (!in_array(false, $passed)) ? $this->p_master->module_url . "?mode=$mode&amp;sub=database&amp;language=$language" : $this->p_master->module_url . "?mode=$mode&amp;sub=requirements&amp;language=$language ";
+ $submit = (!in_array(false, $passed)) ? $lang['INSTALL_START'] : $lang['INSTALL_TEST'];
+
+
+ $template->assign_vars(array(
+ 'L_SUBMIT' => $submit,
+ 'S_HIDDEN' => $s_hidden_fields,
+ 'U_ACTION' => $url,
+ ));
+ }
+
+ /**
+ * Obtain the information required to connect to the database
+ */
+ function obtain_database_settings($mode, $sub)
+ {
+ global $lang, $template, $phpEx;
+
+ $this->page_title = $lang['STAGE_DATABASE'];
+
+ // Obtain any submitted data
+ $data = $this->get_submitted_data();
+
+ $connect_test = false;
+ $error = array();
+ $available_dbms = get_available_dbms(false, true);
+
+ // Has the user opted to test the connection?
+ if (isset($_POST['testdb']))
+ {
+ if (!isset($available_dbms[$data['dbms']]) || !$available_dbms[$data['dbms']]['AVAILABLE'])
+ {
+ $error[] = $lang['INST_ERR_NO_DB'];
+ $connect_test = false;
+ }
+ else
+ {
+ $connect_test = connect_check_db(true, $error, $available_dbms[$data['dbms']], $data['table_prefix'], $data['dbhost'], $data['dbuser'], htmlspecialchars_decode($data['dbpasswd']), $data['dbname'], $data['dbport']);
+ }
+
+ $template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $lang['DB_CONNECTION'],
+ 'LEGEND_EXPLAIN' => false,
+ ));
+
+ if ($connect_test)
+ {
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['DB_TEST'],
+ 'RESULT' => '<strong style="color:green">' . $lang['SUCCESSFUL_CONNECT'] . '</strong>',
+
+ 'S_EXPLAIN' => false,
+ 'S_LEGEND' => false,
+ ));
+ }
+ else
+ {
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['DB_TEST'],
+ 'RESULT' => '<strong style="color:red">' . implode('<br />', $error) . '</strong>',
+
+ 'S_EXPLAIN' => false,
+ 'S_LEGEND' => false,
+ ));
+ }
+ }
+
+ if (!$connect_test)
+ {
+ // Update the list of available DBMS modules to only contain those which can be used
+ $available_dbms_temp = array();
+ foreach ($available_dbms as $type => $dbms_ary)
+ {
+ if (!$dbms_ary['AVAILABLE'])
+ {
+ continue;
+ }
+
+ $available_dbms_temp[$type] = $dbms_ary;
+ }
+
+ $available_dbms = &$available_dbms_temp;
+
+ // And now for the main part of this page
+ $data['table_prefix'] = (!empty($data['table_prefix']) ? $data['table_prefix'] : 'phpbb_');
+
+ foreach ($this->db_config_options as $config_key => $vars)
+ {
+ if (!is_array($vars) && strpos($config_key, 'legend') === false)
+ {
+ continue;
+ }
+
+ if (strpos($config_key, 'legend') !== false)
+ {
+ $template->assign_block_vars('options', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $lang[$vars])
+ );
+
+ continue;
+ }
+
+ $options = isset($vars['options']) ? $vars['options'] : '';
+
+ $template->assign_block_vars('options', array(
+ 'KEY' => $config_key,
+ 'TITLE' => $lang[$vars['lang']],
+ 'S_EXPLAIN' => $vars['explain'],
+ 'S_LEGEND' => false,
+ 'TITLE_EXPLAIN' => ($vars['explain']) ? $lang[$vars['lang'] . '_EXPLAIN'] : '',
+ 'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $data[$config_key], $options),
+ )
+ );
+ }
+ }
+
+ // And finally where do we want to go next (well today is taken isn't it :P)
+ $s_hidden_fields = ($data['img_imagick']) ? '<input type="hidden" name="img_imagick" value="' . addslashes($data['img_imagick']) . '" />' : '';
+ $s_hidden_fields .= '<input type="hidden" name="language" value="' . $data['language'] . '" />';
+ if ($connect_test)
+ {
+ foreach ($this->db_config_options as $config_key => $vars)
+ {
+ if (!is_array($vars))
+ {
+ continue;
+ }
+ $s_hidden_fields .= '<input type="hidden" name="' . $config_key . '" value="' . $data[$config_key] . '" />';
+ }
+ }
+
+ $url = ($connect_test) ? $this->p_master->module_url . "?mode=$mode&amp;sub=administrator" : $this->p_master->module_url . "?mode=$mode&amp;sub=database";
+ $s_hidden_fields .= ($connect_test) ? '' : '<input type="hidden" name="testdb" value="true" />';
+
+ $submit = $lang['NEXT_STEP'];
+
+ $template->assign_vars(array(
+ 'L_SUBMIT' => $submit,
+ 'S_HIDDEN' => $s_hidden_fields,
+ 'U_ACTION' => $url,
+ ));
+ }
+
+ /**
+ * Obtain the administrator's name, password and email address
+ */
+ function obtain_admin_settings($mode, $sub)
+ {
+ global $lang, $template, $phpEx;
+
+ $this->page_title = $lang['STAGE_ADMINISTRATOR'];
+
+ // Obtain any submitted data
+ $data = $this->get_submitted_data();
+
+ if ($data['dbms'] == '')
+ {
+ // Someone's been silly and tried calling this page direct
+ // So we send them back to the start to do it again properly
+ $this->p_master->redirect("index.$phpEx?mode=install");
+ }
+
+ $s_hidden_fields = ($data['img_imagick']) ? '<input type="hidden" name="img_imagick" value="' . addslashes($data['img_imagick']) . '" />' : '';
+ $passed = false;
+
+ $data['default_lang'] = ($data['default_lang'] !== '') ? $data['default_lang'] : $data['language'];
+
+ if (isset($_POST['check']))
+ {
+ $error = array();
+
+ // Check the entered email address and password
+ if ($data['admin_name'] == '' || $data['admin_pass1'] == '' || $data['admin_pass2'] == '' || $data['board_email1'] == '' || $data['board_email2'] == '')
+ {
+ $error[] = $lang['INST_ERR_MISSING_DATA'];
+ }
+
+ if ($data['admin_pass1'] != $data['admin_pass2'] && $data['admin_pass1'] != '')
+ {
+ $error[] = $lang['INST_ERR_PASSWORD_MISMATCH'];
+ }
+
+ // Test against the default username rules
+ if ($data['admin_name'] != '' && utf8_strlen($data['admin_name']) < 3)
+ {
+ $error[] = $lang['INST_ERR_USER_TOO_SHORT'];
+ }
+
+ if ($data['admin_name'] != '' && utf8_strlen($data['admin_name']) > 20)
+ {
+ $error[] = $lang['INST_ERR_USER_TOO_LONG'];
+ }
+
+ // Test against the default password rules
+ if ($data['admin_pass1'] != '' && utf8_strlen($data['admin_pass1']) < 6)
+ {
+ $error[] = $lang['INST_ERR_PASSWORD_TOO_SHORT'];
+ }
+
+ if ($data['admin_pass1'] != '' && utf8_strlen($data['admin_pass1']) > 30)
+ {
+ $error[] = $lang['INST_ERR_PASSWORD_TOO_LONG'];
+ }
+
+ if ($data['board_email1'] != $data['board_email2'] && $data['board_email1'] != '')
+ {
+ $error[] = $lang['INST_ERR_EMAIL_MISMATCH'];
+ }
+
+ if ($data['board_email1'] != '' && !preg_match('/^' . get_preg_expression('email') . '$/i', $data['board_email1']))
+ {
+ $error[] = $lang['INST_ERR_EMAIL_INVALID'];
+ }
+
+ $template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $lang['STAGE_ADMINISTRATOR'],
+ 'LEGEND_EXPLAIN' => false,
+ ));
+
+ if (!sizeof($error))
+ {
+ $passed = true;
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['ADMIN_TEST'],
+ 'RESULT' => '<strong style="color:green">' . $lang['TESTS_PASSED'] . '</strong>',
+
+ 'S_EXPLAIN' => false,
+ 'S_LEGEND' => false,
+ ));
+ }
+ else
+ {
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['ADMIN_TEST'],
+ 'RESULT' => '<strong style="color:red">' . implode('<br />', $error) . '</strong>',
+
+ 'S_EXPLAIN' => false,
+ 'S_LEGEND' => false,
+ ));
+ }
+ }
+
+ if (!$passed)
+ {
+ foreach ($this->admin_config_options as $config_key => $vars)
+ {
+ if (!is_array($vars) && strpos($config_key, 'legend') === false)
+ {
+ continue;
+ }
+
+ if (strpos($config_key, 'legend') !== false)
+ {
+ $template->assign_block_vars('options', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $lang[$vars])
+ );
+
+ continue;
+ }
+
+ $options = isset($vars['options']) ? $vars['options'] : '';
+
+ $template->assign_block_vars('options', array(
+ 'KEY' => $config_key,
+ 'TITLE' => $lang[$vars['lang']],
+ 'S_EXPLAIN' => $vars['explain'],
+ 'S_LEGEND' => false,
+ 'TITLE_EXPLAIN' => ($vars['explain']) ? $lang[$vars['lang'] . '_EXPLAIN'] : '',
+ 'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $data[$config_key], $options),
+ )
+ );
+ }
+ }
+ else
+ {
+ foreach ($this->admin_config_options as $config_key => $vars)
+ {
+ if (!is_array($vars))
+ {
+ continue;
+ }
+ $s_hidden_fields .= '<input type="hidden" name="' . $config_key . '" value="' . $data[$config_key] . '" />';
+ }
+ }
+
+ $s_hidden_fields .= ($data['img_imagick']) ? '<input type="hidden" name="img_imagick" value="' . addslashes($data['img_imagick']) . '" />' : '';
+ $s_hidden_fields .= '<input type="hidden" name="language" value="' . $data['language'] . '" />';
+
+ foreach ($this->db_config_options as $config_key => $vars)
+ {
+ if (!is_array($vars))
+ {
+ continue;
+ }
+ $s_hidden_fields .= '<input type="hidden" name="' . $config_key . '" value="' . $data[$config_key] . '" />';
+ }
+
+ $submit = $lang['NEXT_STEP'];
+
+ $url = ($passed) ? $this->p_master->module_url . "?mode=$mode&amp;sub=config_file" : $this->p_master->module_url . "?mode=$mode&amp;sub=administrator";
+ $s_hidden_fields .= ($passed) ? '' : '<input type="hidden" name="check" value="true" />';
+
+ $template->assign_vars(array(
+ 'L_SUBMIT' => $submit,
+ 'S_HIDDEN' => $s_hidden_fields,
+ 'U_ACTION' => $url,
+ ));
+ }
+
+ /**
+ * Writes the config file to disk, or if unable to do so offers alternative methods
+ */
+ function create_config_file($mode, $sub)
+ {
+ global $lang, $template, $phpbb_root_path, $phpEx;
+
+ $this->page_title = $lang['STAGE_CONFIG_FILE'];
+
+ // Obtain any submitted data
+ $data = $this->get_submitted_data();
+
+ if ($data['dbms'] == '')
+ {
+ // Someone's been silly and tried calling this page direct
+ // So we send them back to the start to do it again properly
+ $this->p_master->redirect("index.$phpEx?mode=install");
+ }
+
+ $s_hidden_fields = ($data['img_imagick']) ? '<input type="hidden" name="img_imagick" value="' . addslashes($data['img_imagick']) . '" />' : '';
+ $s_hidden_fields .= '<input type="hidden" name="language" value="' . $data['language'] . '" />';
+ $written = false;
+
+ // Create a list of any PHP modules we wish to have loaded
+ $load_extensions = array();
+ $available_dbms = get_available_dbms($data['dbms']);
+ $check_exts = array_merge(array($available_dbms[$data['dbms']]['MODULE']), $this->php_dlls_other);
+
+ foreach ($check_exts as $dll)
+ {
+ if (!@extension_loaded($dll))
+ {
+ if (!can_load_dll($dll))
+ {
+ continue;
+ }
+
+ $load_extensions[] = $dll . '.' . PHP_SHLIB_SUFFIX;
+ }
+ }
+
+ // Create a lock file to indicate that there is an install in progress
+ $fp = @fopen($phpbb_root_path . 'cache/install_lock', 'wb');
+ if ($fp === false)
+ {
+ // We were unable to create the lock file - abort
+ $this->p_master->error($lang['UNABLE_WRITE_LOCK'], __LINE__, __FILE__);
+ }
+ @fclose($fp);
+
+ @chmod($phpbb_root_path . 'cache/install_lock', 0777);
+
+ $load_extensions = implode(',', $load_extensions);
+
+ // Time to convert the data provided into a config file
+ $config_data = "<?php\n";
+ $config_data .= "// phpBB 3.0.x auto-generated configuration file\n// Do not change anything in this file!\n";
+
+ $config_data_array = array(
+ 'dbms' => $available_dbms[$data['dbms']]['DRIVER'],
+ 'dbhost' => $data['dbhost'],
+ 'dbport' => $data['dbport'],
+ 'dbname' => $data['dbname'],
+ 'dbuser' => $data['dbuser'],
+ 'dbpasswd' => htmlspecialchars_decode($data['dbpasswd']),
+ 'table_prefix' => $data['table_prefix'],
+ 'acm_type' => 'file',
+ 'load_extensions' => $load_extensions,
+ );
+
+ foreach ($config_data_array as $key => $value)
+ {
+ $config_data .= "\${$key} = '" . str_replace("'", "\\'", str_replace('\\', '\\\\', $value)) . "';\n";
+ }
+ unset($config_data_array);
+
+ $config_data .= "\n@define('PHPBB_INSTALLED', true);\n";
+ $config_data .= "// @define('DEBUG', true);\n";
+ $config_data .= "// @define('DEBUG_EXTRA', true);\n";
+ $config_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused!
+
+ // Attempt to write out the config file directly. If it works, this is the easiest way to do it ...
+ if ((file_exists($phpbb_root_path . 'config.' . $phpEx) && is_writable($phpbb_root_path . 'config.' . $phpEx)) || is_writable($phpbb_root_path))
+ {
+ // Assume it will work ... if nothing goes wrong below
+ $written = true;
+
+ if (!($fp = @fopen($phpbb_root_path . 'config.' . $phpEx, 'w')))
+ {
+ // Something went wrong ... so let's try another method
+ $written = false;
+ }
+
+ if (!(@fwrite($fp, $config_data)))
+ {
+ // Something went wrong ... so let's try another method
+ $written = false;
+ }
+
+ @fclose($fp);
+
+ if ($written)
+ {
+ // We may revert back to chmod() if we see problems with users not able to change their config.php file directly
+ phpbb_chmod($phpbb_root_path . 'config.' . $phpEx, CHMOD_READ);
+ }
+ }
+
+ if (isset($_POST['dldone']))
+ {
+ // Do a basic check to make sure that the file has been uploaded
+ // Note that all we check is that the file has _something_ in it
+ // We don't compare the contents exactly - if they can't upload
+ // a single file correctly, it's likely they will have other problems....
+ if (filesize($phpbb_root_path . 'config.' . $phpEx) > 10)
+ {
+ $written = true;
+ }
+ }
+
+ $config_options = array_merge($this->db_config_options, $this->admin_config_options);
+
+ foreach ($config_options as $config_key => $vars)
+ {
+ if (!is_array($vars))
+ {
+ continue;
+ }
+ $s_hidden_fields .= '<input type="hidden" name="' . $config_key . '" value="' . $data[$config_key] . '" />';
+ }
+
+ if (!$written)
+ {
+ // OK, so it didn't work let's try the alternatives
+
+ if (isset($_POST['dlconfig']))
+ {
+ // They want a copy of the file to download, so send the relevant headers and dump out the data
+ header("Content-Type: text/x-delimtext; name=\"config.$phpEx\"");
+ header("Content-disposition: attachment; filename=config.$phpEx");
+ echo $config_data;
+ exit;
+ }
+
+ // The option to download the config file is always available, so output it here
+ $template->assign_vars(array(
+ 'BODY' => $lang['CONFIG_FILE_UNABLE_WRITE'],
+ 'L_DL_CONFIG' => $lang['DL_CONFIG'],
+ 'L_DL_CONFIG_EXPLAIN' => $lang['DL_CONFIG_EXPLAIN'],
+ 'L_DL_DONE' => $lang['DONE'],
+ 'L_DL_DOWNLOAD' => $lang['DL_DOWNLOAD'],
+ 'S_HIDDEN' => $s_hidden_fields,
+ 'S_SHOW_DOWNLOAD' => true,
+ 'U_ACTION' => $this->p_master->module_url . "?mode=$mode&amp;sub=config_file",
+ ));
+ return;
+ }
+ else
+ {
+ $template->assign_vars(array(
+ 'BODY' => $lang['CONFIG_FILE_WRITTEN'],
+ 'L_SUBMIT' => $lang['NEXT_STEP'],
+ 'S_HIDDEN' => $s_hidden_fields,
+ 'U_ACTION' => $this->p_master->module_url . "?mode=$mode&amp;sub=advanced",
+ ));
+ return;
+ }
+ }
+
+ /**
+ * Provide an opportunity to customise some advanced settings during the install
+ * in case it is necessary for them to be set to access later
+ */
+ function obtain_advanced_settings($mode, $sub)
+ {
+ global $lang, $template, $phpEx;
+
+ $this->page_title = $lang['STAGE_ADVANCED'];
+
+ // Obtain any submitted data
+ $data = $this->get_submitted_data();
+
+ if ($data['dbms'] == '')
+ {
+ // Someone's been silly and tried calling this page direct
+ // So we send them back to the start to do it again properly
+ $this->p_master->redirect("index.$phpEx?mode=install");
+ }
+
+ $s_hidden_fields = ($data['img_imagick']) ? '<input type="hidden" name="img_imagick" value="' . addslashes($data['img_imagick']) . '" />' : '';
+ $s_hidden_fields .= '<input type="hidden" name="language" value="' . $data['language'] . '" />';
+
+ // HTTP_HOST is having the correct browser url in most cases...
+ $server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
+
+ // HTTP HOST can carry a port number...
+ if (strpos($server_name, ':') !== false)
+ {
+ $server_name = substr($server_name, 0, strpos($server_name, ':'));
+ }
+
+ $data['email_enable'] = ($data['email_enable'] !== '') ? $data['email_enable'] : true;
+ $data['server_name'] = ($data['server_name'] !== '') ? $data['server_name'] : $server_name;
+ $data['server_port'] = ($data['server_port'] !== '') ? $data['server_port'] : ((!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT'));
+ $data['server_protocol'] = ($data['server_protocol'] !== '') ? $data['server_protocol'] : ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://');
+ $data['cookie_secure'] = ($data['cookie_secure'] !== '') ? $data['cookie_secure'] : ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? true : false);
+
+ if ($data['script_path'] === '')
+ {
+ $name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
+ if (!$name)
+ {
+ $name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
+ }
+
+ // Replace backslashes and doubled slashes (could happen on some proxy setups)
+ $name = str_replace(array('\\', '//', '/install'), '/', $name);
+ $data['script_path'] = trim(dirname($name));
+ }
+
+ foreach ($this->advanced_config_options as $config_key => $vars)
+ {
+ if (!is_array($vars) && strpos($config_key, 'legend') === false)
+ {
+ continue;
+ }
+
+ if (strpos($config_key, 'legend') !== false)
+ {
+ $template->assign_block_vars('options', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $lang[$vars])
+ );
+
+ continue;
+ }
+
+ $options = isset($vars['options']) ? $vars['options'] : '';
+
+ $template->assign_block_vars('options', array(
+ 'KEY' => $config_key,
+ 'TITLE' => $lang[$vars['lang']],
+ 'S_EXPLAIN' => $vars['explain'],
+ 'S_LEGEND' => false,
+ 'TITLE_EXPLAIN' => ($vars['explain']) ? $lang[$vars['lang'] . '_EXPLAIN'] : '',
+ 'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $data[$config_key], $options),
+ )
+ );
+ }
+
+ $config_options = array_merge($this->db_config_options, $this->admin_config_options);
+ foreach ($config_options as $config_key => $vars)
+ {
+ if (!is_array($vars))
+ {
+ continue;
+ }
+ $s_hidden_fields .= '<input type="hidden" name="' . $config_key . '" value="' . $data[$config_key] . '" />';
+ }
+
+ $submit = $lang['NEXT_STEP'];
+
+ $url = $this->p_master->module_url . "?mode=$mode&amp;sub=create_table";
+
+ $template->assign_vars(array(
+ 'BODY' => $lang['STAGE_ADVANCED_EXPLAIN'],
+ 'L_SUBMIT' => $submit,
+ 'S_HIDDEN' => $s_hidden_fields,
+ 'U_ACTION' => $url,
+ ));
+ }
+
+ /**
+ * Load the contents of the schema into the database and then alter it based on what has been input during the installation
+ */
+ function load_schema($mode, $sub)
+ {
+ global $db, $lang, $template, $phpbb_root_path, $phpEx;
+
+ $this->page_title = $lang['STAGE_CREATE_TABLE'];
+ $s_hidden_fields = '';
+
+ // Obtain any submitted data
+ $data = $this->get_submitted_data();
+
+ if ($data['dbms'] == '')
+ {
+ // Someone's been silly and tried calling this page direct
+ // So we send them back to the start to do it again properly
+ $this->p_master->redirect("index.$phpEx?mode=install");
+ }
+
+ // HTTP_HOST is having the correct browser url in most cases...
+ $server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
+ $referer = (!empty($_SERVER['HTTP_REFERER'])) ? strtolower($_SERVER['HTTP_REFERER']) : getenv('HTTP_REFERER');
+
+ // HTTP HOST can carry a port number...
+ if (strpos($server_name, ':') !== false)
+ {
+ $server_name = substr($server_name, 0, strpos($server_name, ':'));
+ }
+
+ $cookie_domain = ($data['server_name'] != '') ? $data['server_name'] : $server_name;
+
+ // Try to come up with the best solution for cookie domain...
+ if (strpos($cookie_domain, 'www.') === 0)
+ {
+ $cookie_domain = str_replace('www.', '.', $cookie_domain);
+ }
+
+ // If we get here and the extension isn't loaded it should be safe to just go ahead and load it
+ $available_dbms = get_available_dbms($data['dbms']);
+
+ if (!isset($available_dbms[$data['dbms']]))
+ {
+ // Someone's been silly and tried providing a non-existant dbms
+ $this->p_master->redirect("index.$phpEx?mode=install");
+ }
+
+ $dbms = $available_dbms[$data['dbms']]['DRIVER'];
+
+ // Load the appropriate database class if not already loaded
+ include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
+
+ // Instantiate the database
+ $db = new $sql_db();
+ $db->sql_connect($data['dbhost'], $data['dbuser'], htmlspecialchars_decode($data['dbpasswd']), $data['dbname'], $data['dbport'], false, false);
+
+ // NOTE: trigger_error does not work here.
+ $db->sql_return_on_error(true);
+
+ // If mysql is chosen, we need to adjust the schema filename slightly to reflect the correct version. ;)
+ if ($data['dbms'] == 'mysql')
+ {
+ if (version_compare($db->sql_server_info(true), '4.1.3', '>='))
+ {
+ $available_dbms[$data['dbms']]['SCHEMA'] .= '_41';
+ }
+ else
+ {
+ $available_dbms[$data['dbms']]['SCHEMA'] .= '_40';
+ }
+ }
+
+ // Ok we have the db info go ahead and read in the relevant schema
+ // and work on building the table
+ $dbms_schema = 'schemas/' . $available_dbms[$data['dbms']]['SCHEMA'] . '_schema.sql';
+
+ // How should we treat this schema?
+ $remove_remarks = $available_dbms[$data['dbms']]['COMMENTS'];
+ $delimiter = $available_dbms[$data['dbms']]['DELIM'];
+
+ $sql_query = @file_get_contents($dbms_schema);
+
+ $sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query);
+
+ $remove_remarks($sql_query);
+
+ $sql_query = split_sql_file($sql_query, $delimiter);
+
+ foreach ($sql_query as $sql)
+ {
+ //$sql = trim(str_replace('|', ';', $sql));
+ if (!$db->sql_query($sql))
+ {
+ $error = $db->sql_error();
+ $this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__);
+ }
+ }
+ unset($sql_query);
+
+ // Ok tables have been built, let's fill in the basic information
+ $sql_query = file_get_contents('schemas/schema_data.sql');
+
+ // Deal with any special comments
+ switch ($data['dbms'])
+ {
+ case 'mssql':
+ case 'mssql_odbc':
+ $sql_query = preg_replace('#\# MSSQL IDENTITY (phpbb_[a-z_]+) (ON|OFF) \##s', 'SET IDENTITY_INSERT \1 \2;', $sql_query);
+ break;
+
+ case 'postgres':
+ $sql_query = preg_replace('#\# POSTGRES (BEGIN|COMMIT) \##s', '\1; ', $sql_query);
+ break;
+ }
+
+ // Change prefix
+ $sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query);
+
+ // Change language strings...
+ $sql_query = preg_replace_callback('#\{L_([A-Z0-9\-_]*)\}#s', 'adjust_language_keys_callback', $sql_query);
+
+ // Since there is only one schema file we know the comment style and are able to remove it directly with remove_remarks
+ remove_remarks($sql_query);
+ $sql_query = split_sql_file($sql_query, ';');
+
+ foreach ($sql_query as $sql)
+ {
+ //$sql = trim(str_replace('|', ';', $sql));
+ if (!$db->sql_query($sql))
+ {
+ $error = $db->sql_error();
+ $this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__);
+ }
+ }
+ unset($sql_query);
+
+ $current_time = time();
+
+ $user_ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : '';
+
+ if ($data['script_path'] !== '/')
+ {
+ // Adjust destination path (no trailing slash)
+ if (substr($data['script_path'], -1) == '/')
+ {
+ $data['script_path'] = substr($data['script_path'], 0, -1);
+ }
+
+ $data['script_path'] = str_replace(array('../', './'), '', $data['script_path']);
+
+ if ($data['script_path'][0] != '/')
+ {
+ $data['script_path'] = '/' . $data['script_path'];
+ }
+ }
+
+ // Set default config and post data, this applies to all DB's
+ $sql_ary = array(
+ 'INSERT INTO ' . $data['table_prefix'] . "config (config_name, config_value)
+ VALUES ('board_startdate', '$current_time')",
+
+ 'INSERT INTO ' . $data['table_prefix'] . "config (config_name, config_value)
+ VALUES ('default_lang', '" . $db->sql_escape($data['default_lang']) . "')",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($data['img_imagick']) . "'
+ WHERE config_name = 'img_imagick'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($data['server_name']) . "'
+ WHERE config_name = 'server_name'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($data['server_port']) . "'
+ WHERE config_name = 'server_port'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($data['board_email1']) . "'
+ WHERE config_name = 'board_email'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($data['board_email1']) . "'
+ WHERE config_name = 'board_contact'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($cookie_domain) . "'
+ WHERE config_name = 'cookie_domain'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($lang['default_dateformat']) . "'
+ WHERE config_name = 'default_dateformat'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($data['email_enable']) . "'
+ WHERE config_name = 'email_enable'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($data['smtp_delivery']) . "'
+ WHERE config_name = 'smtp_delivery'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($data['smtp_host']) . "'
+ WHERE config_name = 'smtp_host'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($data['smtp_auth']) . "'
+ WHERE config_name = 'smtp_auth_method'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($data['smtp_user']) . "'
+ WHERE config_name = 'smtp_username'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($data['smtp_pass']) . "'
+ WHERE config_name = 'smtp_password'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($data['cookie_secure']) . "'
+ WHERE config_name = 'cookie_secure'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($data['force_server_vars']) . "'
+ WHERE config_name = 'force_server_vars'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($data['script_path']) . "'
+ WHERE config_name = 'script_path'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($data['server_protocol']) . "'
+ WHERE config_name = 'server_protocol'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($data['admin_name']) . "'
+ WHERE config_name = 'newest_username'",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . md5(mt_rand()) . "'
+ WHERE config_name = 'avatar_salt'",
+
+ 'UPDATE ' . $data['table_prefix'] . "users
+ SET username = '" . $db->sql_escape($data['admin_name']) . "', user_password='" . $db->sql_escape(md5($data['admin_pass1'])) . "', user_ip = '" . $db->sql_escape($user_ip) . "', user_lang = '" . $db->sql_escape($data['default_lang']) . "', user_email='" . $db->sql_escape($data['board_email1']) . "', user_dateformat='" . $db->sql_escape($lang['default_dateformat']) . "', user_email_hash = " . $db->sql_escape(phpbb_email_hash($data['board_email1'])) . ", username_clean = '" . $db->sql_escape(utf8_clean_string($data['admin_name'])) . "'
+ WHERE username = 'Admin'",
+
+ 'UPDATE ' . $data['table_prefix'] . "moderator_cache
+ SET username = '" . $db->sql_escape($data['admin_name']) . "'
+ WHERE username = 'Admin'",
+
+ 'UPDATE ' . $data['table_prefix'] . "forums
+ SET forum_last_poster_name = '" . $db->sql_escape($data['admin_name']) . "'
+ WHERE forum_last_poster_name = 'Admin'",
+
+ 'UPDATE ' . $data['table_prefix'] . "topics
+ SET topic_first_poster_name = '" . $db->sql_escape($data['admin_name']) . "', topic_last_poster_name = '" . $db->sql_escape($data['admin_name']) . "'
+ WHERE topic_first_poster_name = 'Admin'
+ OR topic_last_poster_name = 'Admin'",
+
+ 'UPDATE ' . $data['table_prefix'] . "users
+ SET user_regdate = $current_time",
+
+ 'UPDATE ' . $data['table_prefix'] . "posts
+ SET post_time = $current_time, poster_ip = '" . $db->sql_escape($user_ip) . "'",
+
+ 'UPDATE ' . $data['table_prefix'] . "topics
+ SET topic_time = $current_time, topic_last_post_time = $current_time",
+
+ 'UPDATE ' . $data['table_prefix'] . "forums
+ SET forum_last_post_time = $current_time",
+
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($db->sql_server_info(true)) . "'
+ WHERE config_name = 'dbms_version'",
+ );
+
+ if (@extension_loaded('gd') || can_load_dll('gd'))
+ {
+ $sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = 'phpbb_captcha_gd'
+ WHERE config_name = 'captcha_plugin'";
+
+ $sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '1'
+ WHERE config_name = 'captcha_gd'";
+ }
+
+ $ref = substr($referer, strpos($referer, '://') + 3);
+
+ if (!(stripos($ref, $server_name) === 0))
+ {
+ $sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '0'
+ WHERE config_name = 'referer_validation'";
+ }
+
+ // We set a (semi-)unique cookie name to bypass login issues related to the cookie name.
+ $cookie_name = 'phpbb3_';
+ $rand_str = md5(mt_rand());
+ $rand_str = str_replace('0', 'z', base_convert($rand_str, 16, 35));
+ $rand_str = substr($rand_str, 0, 5);
+ $cookie_name .= strtolower($rand_str);
+
+ $sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . $db->sql_escape($cookie_name) . "'
+ WHERE config_name = 'cookie_name'";
+
+ foreach ($sql_ary as $sql)
+ {
+ //$sql = trim(str_replace('|', ';', $sql));
+
+ if (!$db->sql_query($sql))
+ {
+ $error = $db->sql_error();
+ $this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__);
+ }
+ }
+
+ $submit = $lang['NEXT_STEP'];
+
+ $url = $this->p_master->module_url . "?mode=$mode&amp;sub=final";
+
+ $template->assign_vars(array(
+ 'BODY' => $lang['STAGE_CREATE_TABLE_EXPLAIN'],
+ 'L_SUBMIT' => $submit,
+ 'S_HIDDEN' => build_hidden_fields($data),
+ 'U_ACTION' => $url,
+ ));
+ }
+
+ /**
+ * Build the search index...
+ */
+ function build_search_index($mode, $sub)
+ {
+ global $db, $lang, $phpbb_root_path, $phpEx, $config;
+
+ // Obtain any submitted data
+ $data = $this->get_submitted_data();
+ $table_prefix = $data['table_prefix'];
+
+ // If we get here and the extension isn't loaded it should be safe to just go ahead and load it
+ $available_dbms = get_available_dbms($data['dbms']);
+
+ if (!isset($available_dbms[$data['dbms']]))
+ {
+ // Someone's been silly and tried providing a non-existant dbms
+ $this->p_master->redirect("index.$phpEx?mode=install");
+ }
+
+ $dbms = $available_dbms[$data['dbms']]['DRIVER'];
+
+ // Load the appropriate database class if not already loaded
+ include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
+
+ // Instantiate the database
+ $db = new $sql_db();
+ $db->sql_connect($data['dbhost'], $data['dbuser'], htmlspecialchars_decode($data['dbpasswd']), $data['dbname'], $data['dbport'], false, false);
+
+ // NOTE: trigger_error does not work here.
+ $db->sql_return_on_error(true);
+
+ include_once($phpbb_root_path . 'includes/constants.' . $phpEx);
+ include_once($phpbb_root_path . 'includes/search/fulltext_native.' . $phpEx);
+
+ // Fill the config array - it is needed by those functions we call
+ $sql = 'SELECT *
+ FROM ' . CONFIG_TABLE;
+ $result = $db->sql_query($sql);
+
+ $config = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $config[$row['config_name']] = $row['config_value'];
+ }
+ $db->sql_freeresult($result);
+
+ $error = false;
+ $search = new fulltext_native($error);
+
+ $sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id
+ FROM ' . POSTS_TABLE;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $search->index('post', $row['post_id'], $row['post_text'], $row['post_subject'], $row['poster_id'], $row['forum_id']);
+ }
+ $db->sql_freeresult($result);
+ }
+
+ /**
+ * Populate the module tables
+ */
+ function add_modules($mode, $sub)
+ {
+ global $db, $lang, $phpbb_root_path, $phpEx;
+
+ include_once($phpbb_root_path . 'includes/acp/acp_modules.' . $phpEx);
+
+ $_module = new acp_modules();
+ $module_classes = array('acp', 'mcp', 'ucp');
+
+ // Add categories
+ foreach ($module_classes as $module_class)
+ {
+ $categories = array();
+
+ // Set the module class
+ $_module->module_class = $module_class;
+
+ foreach ($this->module_categories[$module_class] as $cat_name => $subs)
+ {
+ $module_data = array(
+ 'module_basename' => '',
+ 'module_enabled' => 1,
+ 'module_display' => 1,
+ 'parent_id' => 0,
+ 'module_class' => $module_class,
+ 'module_langname' => $cat_name,
+ 'module_mode' => '',
+ 'module_auth' => '',
+ );
+
+ // Add category
+ $_module->update_module_data($module_data, true);
+
+ // Check for last sql error happened
+ if ($db->sql_error_triggered)
+ {
+ $error = $db->sql_error($db->sql_error_sql);
+ $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__);
+ }
+
+ $categories[$cat_name]['id'] = (int) $module_data['module_id'];
+ $categories[$cat_name]['parent_id'] = 0;
+
+ // Create sub-categories...
+ if (is_array($subs))
+ {
+ foreach ($subs as $level2_name)
+ {
+ $module_data = array(
+ 'module_basename' => '',
+ 'module_enabled' => 1,
+ 'module_display' => 1,
+ 'parent_id' => (int) $categories[$cat_name]['id'],
+ 'module_class' => $module_class,
+ 'module_langname' => $level2_name,
+ 'module_mode' => '',
+ 'module_auth' => '',
+ );
+
+ $_module->update_module_data($module_data, true);
+
+ // Check for last sql error happened
+ if ($db->sql_error_triggered)
+ {
+ $error = $db->sql_error($db->sql_error_sql);
+ $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__);
+ }
+
+ $categories[$level2_name]['id'] = (int) $module_data['module_id'];
+ $categories[$level2_name]['parent_id'] = (int) $categories[$cat_name]['id'];
+ }
+ }
+ }
+
+ // Get the modules we want to add... returned sorted by name
+ $module_info = $_module->get_module_infos('', $module_class);
+
+ foreach ($module_info as $module_basename => $fileinfo)
+ {
+ foreach ($fileinfo['modes'] as $module_mode => $row)
+ {
+ foreach ($row['cat'] as $cat_name)
+ {
+ if (!isset($categories[$cat_name]))
+ {
+ continue;
+ }
+
+ $module_data = array(
+ 'module_basename' => $module_basename,
+ 'module_enabled' => 1,
+ 'module_display' => (isset($row['display'])) ? (int) $row['display'] : 1,
+ 'parent_id' => (int) $categories[$cat_name]['id'],
+ 'module_class' => $module_class,
+ 'module_langname' => $row['title'],
+ 'module_mode' => $module_mode,
+ 'module_auth' => $row['auth'],
+ );
+
+ $_module->update_module_data($module_data, true);
+
+ // Check for last sql error happened
+ if ($db->sql_error_triggered)
+ {
+ $error = $db->sql_error($db->sql_error_sql);
+ $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__);
+ }
+ }
+ }
+ }
+
+ // Move some of the modules around since the code above will put them in the wrong place
+ if ($module_class == 'acp')
+ {
+ // Move main module 4 up...
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename = 'main'
+ AND module_class = 'acp'
+ AND module_mode = 'main'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $_module->move_module_by($row, 'move_up', 4);
+
+ // Move permissions intro screen module 4 up...
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename = 'permissions'
+ AND module_class = 'acp'
+ AND module_mode = 'intro'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $_module->move_module_by($row, 'move_up', 4);
+
+ // Move manage users screen module 5 up...
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename = 'users'
+ AND module_class = 'acp'
+ AND module_mode = 'overview'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $_module->move_module_by($row, 'move_up', 5);
+ }
+
+ if ($module_class == 'ucp')
+ {
+ // Move attachment module 4 down...
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename = 'attachments'
+ AND module_class = 'ucp'
+ AND module_mode = 'attachments'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $_module->move_module_by($row, 'move_down', 4);
+ }
+
+ // And now for the special ones
+ // (these are modules which appear in multiple categories and thus get added manually to some for more control)
+ if (isset($this->module_extras[$module_class]))
+ {
+ foreach ($this->module_extras[$module_class] as $cat_name => $mods)
+ {
+ $sql = 'SELECT module_id, left_id, right_id
+ FROM ' . MODULES_TABLE . "
+ WHERE module_langname = '" . $db->sql_escape($cat_name) . "'
+ AND module_class = '" . $db->sql_escape($module_class) . "'";
+ $result = $db->sql_query_limit($sql, 1);
+ $row2 = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ foreach ($mods as $mod_name)
+ {
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_langname = '" . $db->sql_escape($mod_name) . "'
+ AND module_class = '" . $db->sql_escape($module_class) . "'
+ AND module_basename <> ''";
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $module_data = array(
+ 'module_basename' => $row['module_basename'],
+ 'module_enabled' => (int) $row['module_enabled'],
+ 'module_display' => (int) $row['module_display'],
+ 'parent_id' => (int) $row2['module_id'],
+ 'module_class' => $row['module_class'],
+ 'module_langname' => $row['module_langname'],
+ 'module_mode' => $row['module_mode'],
+ 'module_auth' => $row['module_auth'],
+ );
+
+ $_module->update_module_data($module_data, true);
+
+ // Check for last sql error happened
+ if ($db->sql_error_triggered)
+ {
+ $error = $db->sql_error($db->sql_error_sql);
+ $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__);
+ }
+ }
+ }
+ }
+
+ $_module->remove_cache_file();
+ }
+ }
+
+ /**
+ * Populate the language tables
+ */
+ function add_language($mode, $sub)
+ {
+ global $db, $lang, $phpbb_root_path, $phpEx;
+
+ $dir = @opendir($phpbb_root_path . 'language');
+
+ if (!$dir)
+ {
+ $this->error('Unable to access the language directory', __LINE__, __FILE__);
+ }
+
+ while (($file = readdir($dir)) !== false)
+ {
+ $path = $phpbb_root_path . 'language/' . $file;
+
+ if ($file == '.' || $file == '..' || is_link($path) || is_file($path) || $file == 'CVS')
+ {
+ continue;
+ }
+
+ if (is_dir($path) && file_exists($path . '/iso.txt'))
+ {
+ $lang_file = file("$path/iso.txt");
+
+ $lang_pack = array(
+ 'lang_iso' => basename($path),
+ 'lang_dir' => basename($path),
+ 'lang_english_name' => trim(htmlspecialchars($lang_file[0])),
+ 'lang_local_name' => trim(htmlspecialchars($lang_file[1], ENT_COMPAT, 'UTF-8')),
+ 'lang_author' => trim(htmlspecialchars($lang_file[2], ENT_COMPAT, 'UTF-8')),
+ );
+
+ $db->sql_query('INSERT INTO ' . LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $lang_pack));
+
+ if ($db->sql_error_triggered)
+ {
+ $error = $db->sql_error($db->sql_error_sql);
+ $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__);
+ }
+
+ $valid_localized = array(
+ 'icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply',
+ );
+
+ $sql_ary = array();
+
+ $sql = 'SELECT *
+ FROM ' . STYLES_IMAGESET_TABLE;
+ $result = $db->sql_query($sql);
+
+ while ($imageset_row = $db->sql_fetchrow($result))
+ {
+ if (@file_exists("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$lang_pack['lang_iso']}/imageset.cfg"))
+ {
+ $cfg_data_imageset_data = parse_cfg_file("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$lang_pack['lang_iso']}/imageset.cfg");
+ foreach ($cfg_data_imageset_data as $image_name => $value)
+ {
+ if (strpos($value, '*') !== false)
+ {
+ if (substr($value, -1, 1) === '*')
+ {
+ list($image_filename, $image_height) = explode('*', $value);
+ $image_width = 0;
+ }
+ else
+ {
+ list($image_filename, $image_height, $image_width) = explode('*', $value);
+ }
+ }
+ else
+ {
+ $image_filename = $value;
+ $image_height = $image_width = 0;
+ }
+
+ if (strpos($image_name, 'img_') === 0 && $image_filename)
+ {
+ $image_name = substr($image_name, 4);
+ if (in_array($image_name, $valid_localized))
+ {
+ $sql_ary[] = array(
+ 'image_name' => (string) $image_name,
+ 'image_filename' => (string) $image_filename,
+ 'image_height' => (int) $image_height,
+ 'image_width' => (int) $image_width,
+ 'imageset_id' => (int) $imageset_row['imageset_id'],
+ 'image_lang' => (string) $lang_pack['lang_iso'],
+ );
+ }
+ }
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($sql_ary))
+ {
+ $db->sql_multi_insert(STYLES_IMAGESET_DATA_TABLE, $sql_ary);
+
+ if ($db->sql_error_triggered)
+ {
+ $error = $db->sql_error($db->sql_error_sql);
+ $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__);
+ }
+ }
+ }
+ }
+ closedir($dir);
+ }
+
+ /**
+ * Add search robots to the database
+ */
+ function add_bots($mode, $sub)
+ {
+ global $db, $lang, $phpbb_root_path, $phpEx, $config;
+
+ // Obtain any submitted data
+ $data = $this->get_submitted_data();
+
+ // Fill the config array - it is needed by those functions we call
+ $sql = 'SELECT *
+ FROM ' . CONFIG_TABLE;
+ $result = $db->sql_query($sql);
+
+ $config = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $config[$row['config_name']] = $row['config_value'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = 'BOTS'";
+ $result = $db->sql_query($sql);
+ $group_id = (int) $db->sql_fetchfield('group_id');
+ $db->sql_freeresult($result);
+
+ if (!$group_id)
+ {
+ // If we reach this point then something has gone very wrong
+ $this->p_master->error($lang['NO_GROUP'], __LINE__, __FILE__);
+ }
+
+ if (!function_exists('user_add'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
+
+ foreach ($this->bot_list as $bot_name => $bot_ary)
+ {
+ $user_row = array(
+ 'user_type' => USER_IGNORE,
+ 'group_id' => $group_id,
+ 'username' => $bot_name,
+ 'user_regdate' => time(),
+ 'user_password' => '',
+ 'user_colour' => '9E8DA7',
+ 'user_email' => '',
+ 'user_lang' => $data['default_lang'],
+ 'user_style' => 1,
+ 'user_timezone' => 0,
+ 'user_dateformat' => $lang['default_dateformat'],
+ 'user_allow_massemail' => 0,
+ );
+
+ $user_id = user_add($user_row);
+
+ if (!$user_id)
+ {
+ // If we can't insert this user then continue to the next one to avoid inconsistant data
+ $this->p_master->db_error('Unable to insert bot into users table', $db->sql_error_sql, __LINE__, __FILE__, true);
+ continue;
+ }
+
+ $sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'bot_active' => 1,
+ 'bot_name' => (string) $bot_name,
+ 'user_id' => (int) $user_id,
+ 'bot_agent' => (string) $bot_ary[0],
+ 'bot_ip' => (string) $bot_ary[1],
+ ));
+
+ $result = $db->sql_query($sql);
+ }
+ }
+
+ /**
+ * Sends an email to the board administrator with their password and some useful links
+ */
+ function email_admin($mode, $sub)
+ {
+ global $auth, $config, $db, $lang, $template, $user, $phpbb_root_path, $phpEx;
+
+ $this->page_title = $lang['STAGE_FINAL'];
+
+ // Obtain any submitted data
+ $data = $this->get_submitted_data();
+
+ $sql = 'SELECT *
+ FROM ' . CONFIG_TABLE;
+ $result = $db->sql_query($sql);
+
+ $config = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $config[$row['config_name']] = $row['config_value'];
+ }
+ $db->sql_freeresult($result);
+
+ $user->session_begin();
+ $auth->login($data['admin_name'], $data['admin_pass1'], false, true, true);
+
+ // OK, Now that we've reached this point we can be confident that everything
+ // is installed and working......I hope :)
+ // So it's time to send an email to the administrator confirming the details
+ // they entered
+
+ if ($config['email_enable'])
+ {
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+
+ $messenger = new messenger(false);
+
+ $messenger->template('installed', $data['language']);
+
+ $messenger->to($data['board_email1'], $data['admin_name']);
+
+ $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
+ $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
+ $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
+ $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
+
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($data['admin_name']),
+ 'PASSWORD' => htmlspecialchars_decode($data['admin_pass1']))
+ );
+
+ $messenger->send(NOTIFY_EMAIL);
+ }
+
+ // And finally, add a note to the log
+ add_log('admin', 'LOG_INSTALL_INSTALLED', $config['version']);
+
+ $template->assign_vars(array(
+ 'TITLE' => $lang['INSTALL_CONGRATS'],
+ 'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], $config['version'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=convert&amp;language=' . $data['language']), '../docs/README.html'),
+ 'L_SUBMIT' => $lang['INSTALL_LOGIN'],
+ 'U_ACTION' => append_sid($phpbb_root_path . 'adm/index.' . $phpEx, 'i=send_statistics&amp;mode=send_statistics'),
+ ));
+ }
+
+ /**
+ * Generate a list of available mail server authentication methods
+ */
+ function mail_auth_select($selected_method)
+ {
+ global $lang;
+
+ $auth_methods = array('PLAIN', 'LOGIN', 'CRAM-MD5', 'DIGEST-MD5', 'POP-BEFORE-SMTP');
+ $s_smtp_auth_options = '';
+
+ foreach ($auth_methods as $method)
+ {
+ $s_smtp_auth_options .= '<option value="' . $method . '"' . (($selected_method == $method) ? ' selected="selected"' : '') . '>' . $lang['SMTP_' . str_replace('-', '_', $method)] . '</option>';
+ }
+
+ return $s_smtp_auth_options;
+ }
+
+ /**
+ * Get submitted data
+ */
+ function get_submitted_data()
+ {
+ return array(
+ 'language' => basename(request_var('language', '')),
+ 'dbms' => request_var('dbms', ''),
+ 'dbhost' => request_var('dbhost', ''),
+ 'dbport' => request_var('dbport', ''),
+ 'dbuser' => request_var('dbuser', ''),
+ 'dbpasswd' => request_var('dbpasswd', '', true),
+ 'dbname' => request_var('dbname', ''),
+ 'table_prefix' => request_var('table_prefix', ''),
+ 'default_lang' => basename(request_var('default_lang', '')),
+ 'admin_name' => utf8_normalize_nfc(request_var('admin_name', '', true)),
+ 'admin_pass1' => request_var('admin_pass1', '', true),
+ 'admin_pass2' => request_var('admin_pass2', '', true),
+ 'board_email1' => strtolower(request_var('board_email1', '')),
+ 'board_email2' => strtolower(request_var('board_email2', '')),
+ 'img_imagick' => request_var('img_imagick', ''),
+ 'ftp_path' => request_var('ftp_path', ''),
+ 'ftp_user' => request_var('ftp_user', ''),
+ 'ftp_pass' => request_var('ftp_pass', ''),
+ 'email_enable' => request_var('email_enable', ''),
+ 'smtp_delivery' => request_var('smtp_delivery', ''),
+ 'smtp_host' => request_var('smtp_host', ''),
+ 'smtp_auth' => request_var('smtp_auth', ''),
+ 'smtp_user' => request_var('smtp_user', ''),
+ 'smtp_pass' => request_var('smtp_pass', ''),
+ 'cookie_secure' => request_var('cookie_secure', ''),
+ 'force_server_vars' => request_var('force_server_vars', ''),
+ 'server_protocol' => request_var('server_protocol', ''),
+ 'server_name' => request_var('server_name', ''),
+ 'server_port' => request_var('server_port', ''),
+ 'script_path' => request_var('script_path', ''),
+ );
+ }
+
+ /**
+ * The information below will be used to build the input fields presented to the user
+ */
+ var $db_config_options = array(
+ 'legend1' => 'DB_CONFIG',
+ 'dbms' => array('lang' => 'DBMS', 'type' => 'select', 'options' => 'dbms_select(\'{VALUE}\')', 'explain' => false),
+ 'dbhost' => array('lang' => 'DB_HOST', 'type' => 'text:25:100', 'explain' => true),
+ 'dbport' => array('lang' => 'DB_PORT', 'type' => 'text:25:100', 'explain' => true),
+ 'dbname' => array('lang' => 'DB_NAME', 'type' => 'text:25:100', 'explain' => false),
+ 'dbuser' => array('lang' => 'DB_USERNAME', 'type' => 'text:25:100', 'explain' => false),
+ 'dbpasswd' => array('lang' => 'DB_PASSWORD', 'type' => 'password:25:100', 'explain' => false),
+ 'table_prefix' => array('lang' => 'TABLE_PREFIX', 'type' => 'text:25:100', 'explain' => false),
+ );
+ var $admin_config_options = array(
+ 'legend1' => 'ADMIN_CONFIG',
+ 'default_lang' => array('lang' => 'DEFAULT_LANG', 'type' => 'select', 'options' => '$this->module->inst_language_select(\'{VALUE}\')', 'explain' => false),
+ 'admin_name' => array('lang' => 'ADMIN_USERNAME', 'type' => 'text:25:100', 'explain' => true),
+ 'admin_pass1' => array('lang' => 'ADMIN_PASSWORD', 'type' => 'password:25:100', 'explain' => true),
+ 'admin_pass2' => array('lang' => 'ADMIN_PASSWORD_CONFIRM', 'type' => 'password:25:100', 'explain' => false),
+ 'board_email1' => array('lang' => 'CONTACT_EMAIL', 'type' => 'text:25:100', 'explain' => false),
+ 'board_email2' => array('lang' => 'CONTACT_EMAIL_CONFIRM', 'type' => 'text:25:100', 'explain' => false),
+ );
+ var $advanced_config_options = array(
+ 'legend1' => 'ACP_EMAIL_SETTINGS',
+ 'email_enable' => array('lang' => 'ENABLE_EMAIL', 'type' => 'radio:enabled_disabled', 'explain' => true),
+ 'smtp_delivery' => array('lang' => 'USE_SMTP', 'type' => 'radio:yes_no', 'explain' => true),
+ 'smtp_host' => array('lang' => 'SMTP_SERVER', 'type' => 'text:25:50', 'explain' => false),
+ 'smtp_auth' => array('lang' => 'SMTP_AUTH_METHOD', 'type' => 'select', 'options' => '$this->module->mail_auth_select(\'{VALUE}\')', 'explain' => true),
+ 'smtp_user' => array('lang' => 'SMTP_USERNAME', 'type' => 'text:25:255', 'explain' => true),
+ 'smtp_pass' => array('lang' => 'SMTP_PASSWORD', 'type' => 'password:25:255', 'explain' => true),
+
+ 'legend2' => 'SERVER_URL_SETTINGS',
+ 'cookie_secure' => array('lang' => 'COOKIE_SECURE', 'type' => 'radio:enabled_disabled', 'explain' => true),
+ 'force_server_vars' => array('lang' => 'FORCE_SERVER_VARS', 'type' => 'radio:yes_no', 'explain' => true),
+ 'server_protocol' => array('lang' => 'SERVER_PROTOCOL', 'type' => 'text:10:10', 'explain' => true),
+ 'server_name' => array('lang' => 'SERVER_NAME', 'type' => 'text:40:255', 'explain' => true),
+ 'server_port' => array('lang' => 'SERVER_PORT', 'type' => 'text:5:5', 'explain' => true),
+ 'script_path' => array('lang' => 'SCRIPT_PATH', 'type' => 'text::255', 'explain' => true),
+ );
+
+ /**
+ * Specific PHP modules we may require for certain optional or extended features
+ */
+ var $php_dlls_other = array('zlib', 'ftp', 'gd', 'xml');
+
+ /**
+ * A list of the web-crawlers/bots we recognise by default
+ *
+ * Candidates but not included:
+ * 'Accoona [Bot]' 'Accoona-AI-Agent/'
+ * 'ASPseek [Crawler]' 'ASPseek/'
+ * 'Boitho [Crawler]' 'boitho.com-dc/'
+ * 'Bunnybot [Bot]' 'powered by www.buncat.de'
+ * 'Cosmix [Bot]' 'cfetch/'
+ * 'Crawler Search [Crawler]' '.Crawler-Search.de'
+ * 'Findexa [Crawler]' 'Findexa Crawler ('
+ * 'GBSpider [Spider]' 'GBSpider v'
+ * 'genie [Bot]' 'genieBot ('
+ * 'Hogsearch [Bot]' 'oegp v. 1.3.0'
+ * 'Insuranco [Bot]' 'InsurancoBot'
+ * 'IRLbot [Bot]' 'http://irl.cs.tamu.edu/crawler'
+ * 'ISC Systems [Bot]' 'ISC Systems iRc Search'
+ * 'Jyxobot [Bot]' 'Jyxobot/'
+ * 'Kraehe [Metasuche]' '-DIE-KRAEHE- META-SEARCH-ENGINE/'
+ * 'LinkWalker' 'LinkWalker'
+ * 'MMSBot [Bot]' 'http://www.mmsweb.at/bot.html'
+ * 'Naver [Bot]' 'nhnbot@naver.com)'
+ * 'NetResearchServer' 'NetResearchServer/'
+ * 'Nimble [Crawler]' 'NimbleCrawler'
+ * 'Ocelli [Bot]' 'Ocelli/'
+ * 'Onsearch [Bot]' 'onCHECK-Robot'
+ * 'Orange [Spider]' 'OrangeSpider'
+ * 'Sproose [Bot]' 'http://www.sproose.com/bot'
+ * 'Susie [Sync]' '!Susie (http://www.sync2it.com/susie)'
+ * 'Tbot [Bot]' 'Tbot/'
+ * 'Thumbshots [Capture]' 'thumbshots-de-Bot'
+ * 'Vagabondo [Crawler]' 'http://webagent.wise-guys.nl/'
+ * 'Walhello [Bot]' 'appie 1.1 (www.walhello.com)'
+ * 'WissenOnline [Bot]' 'WissenOnline-Bot'
+ * 'WWWeasel [Bot]' 'WWWeasel Robot v'
+ * 'Xaldon [Spider]' 'Xaldon WebSpider'
+ */
+ var $bot_list = array(
+ 'AdsBot [Google]' => array('AdsBot-Google', ''),
+ 'Alexa [Bot]' => array('ia_archiver', ''),
+ 'Alta Vista [Bot]' => array('Scooter/', ''),
+ 'Ask Jeeves [Bot]' => array('Ask Jeeves', ''),
+ 'Baidu [Spider]' => array('Baiduspider+(', ''),
+ 'Exabot [Bot]' => array('Exabot/', ''),
+ 'FAST Enterprise [Crawler]' => array('FAST Enterprise Crawler', ''),
+ 'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''),
+ 'Francis [Bot]' => array('http://www.neomo.de/', ''),
+ 'Gigabot [Bot]' => array('Gigabot/', ''),
+ 'Google Adsense [Bot]' => array('Mediapartners-Google', ''),
+ 'Google Desktop' => array('Google Desktop', ''),
+ 'Google Feedfetcher' => array('Feedfetcher-Google', ''),
+ 'Google [Bot]' => array('Googlebot', ''),
+ 'Heise IT-Markt [Crawler]' => array('heise-IT-Markt-Crawler', ''),
+ 'Heritrix [Crawler]' => array('heritrix/1.', ''),
+ 'IBM Research [Bot]' => array('ibm.com/cs/crawler', ''),
+ 'ICCrawler - ICjobs' => array('ICCrawler - ICjobs', ''),
+ 'ichiro [Crawler]' => array('ichiro/', ''),
+ 'Majestic-12 [Bot]' => array('MJ12bot/', ''),
+ 'Metager [Bot]' => array('MetagerBot/', ''),
+ 'MSN NewsBlogs' => array('msnbot-NewsBlogs/', ''),
+ 'MSN [Bot]' => array('msnbot/', ''),
+ 'MSNbot Media' => array('msnbot-media/', ''),
+ 'NG-Search [Bot]' => array('NG-Search/', ''),
+ 'Nutch [Bot]' => array('http://lucene.apache.org/nutch/', ''),
+ 'Nutch/CVS [Bot]' => array('NutchCVS/', ''),
+ 'OmniExplorer [Bot]' => array('OmniExplorer_Bot/', ''),
+ 'Online link [Validator]' => array('online link validator', ''),
+ 'psbot [Picsearch]' => array('psbot/0', ''),
+ 'Seekport [Bot]' => array('Seekbot/', ''),
+ 'Sensis [Crawler]' => array('Sensis Web Crawler', ''),
+ 'SEO Crawler' => array('SEO search Crawler/', ''),
+ 'Seoma [Crawler]' => array('Seoma [SEO Crawler]', ''),
+ 'SEOSearch [Crawler]' => array('SEOsearch/', ''),
+ 'Snappy [Bot]' => array('Snappy/1.1 ( http://www.urltrends.com/ )', ''),
+ 'Steeler [Crawler]' => array('http://www.tkl.iis.u-tokyo.ac.jp/~crawler/', ''),
+ 'Synoo [Bot]' => array('SynooBot/', ''),
+ 'Telekom [Bot]' => array('crawleradmin.t-info@telekom.de', ''),
+ 'TurnitinBot [Bot]' => array('TurnitinBot/', ''),
+ 'Voyager [Bot]' => array('voyager/1.0', ''),
+ 'W3 [Sitesearch]' => array('W3 SiteSearch Crawler', ''),
+ 'W3C [Linkcheck]' => array('W3C-checklink/', ''),
+ 'W3C [Validator]' => array('W3C_*Validator', ''),
+ 'WiseNut [Bot]' => array('http://www.WISEnutbot.com', ''),
+ 'YaCy [Bot]' => array('yacybot', ''),
+ 'Yahoo MMCrawler [Bot]' => array('Yahoo-MMCrawler/', ''),
+ 'Yahoo Slurp [Bot]' => array('Yahoo! DE Slurp', ''),
+ 'Yahoo [Bot]' => array('Yahoo! Slurp', ''),
+ 'YahooSeeker [Bot]' => array('YahooSeeker/', ''),
+ );
+
+ /**
+ * Define the module structure so that we can populate the database without
+ * needing to hard-code module_id values
+ */
+ var $module_categories = array(
+ 'acp' => array(
+ 'ACP_CAT_GENERAL' => array(
+ 'ACP_QUICK_ACCESS',
+ 'ACP_BOARD_CONFIGURATION',
+ 'ACP_CLIENT_COMMUNICATION',
+ 'ACP_SERVER_CONFIGURATION',
+ ),
+ 'ACP_CAT_FORUMS' => array(
+ 'ACP_MANAGE_FORUMS',
+ 'ACP_FORUM_BASED_PERMISSIONS',
+ ),
+ 'ACP_CAT_POSTING' => array(
+ 'ACP_MESSAGES',
+ 'ACP_ATTACHMENTS',
+ ),
+ 'ACP_CAT_USERGROUP' => array(
+ 'ACP_CAT_USERS',
+ 'ACP_GROUPS',
+ 'ACP_USER_SECURITY',
+ ),
+ 'ACP_CAT_PERMISSIONS' => array(
+ 'ACP_GLOBAL_PERMISSIONS',
+ 'ACP_FORUM_BASED_PERMISSIONS',
+ 'ACP_PERMISSION_ROLES',
+ 'ACP_PERMISSION_MASKS',
+ ),
+ 'ACP_CAT_STYLES' => array(
+ 'ACP_STYLE_MANAGEMENT',
+ 'ACP_STYLE_COMPONENTS',
+ ),
+ 'ACP_CAT_MAINTENANCE' => array(
+ 'ACP_FORUM_LOGS',
+ 'ACP_CAT_DATABASE',
+ ),
+ 'ACP_CAT_SYSTEM' => array(
+ 'ACP_AUTOMATION',
+ 'ACP_GENERAL_TASKS',
+ 'ACP_MODULE_MANAGEMENT',
+ ),
+ 'ACP_CAT_DOT_MODS' => null,
+ ),
+ 'mcp' => array(
+ 'MCP_MAIN' => null,
+ 'MCP_QUEUE' => null,
+ 'MCP_REPORTS' => null,
+ 'MCP_NOTES' => null,
+ 'MCP_WARN' => null,
+ 'MCP_LOGS' => null,
+ 'MCP_BAN' => null,
+ ),
+ 'ucp' => array(
+ 'UCP_MAIN' => null,
+ 'UCP_PROFILE' => null,
+ 'UCP_PREFS' => null,
+ 'UCP_PM' => null,
+ 'UCP_USERGROUPS' => null,
+ 'UCP_ZEBRA' => null,
+ ),
+ );
+
+ var $module_extras = array(
+ 'acp' => array(
+ 'ACP_QUICK_ACCESS' => array(
+ 'ACP_MANAGE_USERS',
+ 'ACP_GROUPS_MANAGE',
+ 'ACP_MANAGE_FORUMS',
+ 'ACP_MOD_LOGS',
+ 'ACP_BOTS',
+ 'ACP_PHP_INFO',
+ ),
+ 'ACP_FORUM_BASED_PERMISSIONS' => array(
+ 'ACP_FORUM_PERMISSIONS',
+ 'ACP_FORUM_PERMISSIONS_COPY',
+ 'ACP_FORUM_MODERATORS',
+ 'ACP_USERS_FORUM_PERMISSIONS',
+ 'ACP_GROUPS_FORUM_PERMISSIONS',
+ ),
+ ),
+ );
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/install/install_main.php b/phpBB/install/install_main.php
new file mode 100644
index 0000000000..e9f35efa1d
--- /dev/null
+++ b/phpBB/install/install_main.php
@@ -0,0 +1,78 @@
+<?php
+/**
+*
+* @package install
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+*/
+
+if ( !defined('IN_INSTALL') )
+{
+ // Someone has tried to access the file direct. This is not a good idea, so exit
+ exit;
+}
+
+if (!empty($setmodules))
+{
+ $module[] = array(
+ 'module_type' => 'install',
+ 'module_title' => 'OVERVIEW',
+ 'module_filename' => substr(basename(__FILE__), 0, -strlen($phpEx)-1),
+ 'module_order' => 0,
+ 'module_subs' => array('INTRO', 'LICENSE', 'SUPPORT'),
+ 'module_stages' => '',
+ 'module_reqs' => ''
+ );
+}
+
+/**
+* Main Tab - Installation
+* @package install
+*/
+class install_main extends module
+{
+ function install_main(&$p_master)
+ {
+ $this->p_master = &$p_master;
+ }
+
+ function main($mode, $sub)
+ {
+ global $lang, $template, $language;
+
+ switch ($sub)
+ {
+ case 'intro' :
+ $title = $lang['SUB_INTRO'];
+ $body = $lang['OVERVIEW_BODY'];
+ break;
+
+ case 'license' :
+ $title = $lang['GPL'];
+ $body = implode("<br/>\n", file('../docs/COPYING'));
+ break;
+
+ case 'support' :
+ $title = $lang['SUB_SUPPORT'];
+ $body = $lang['SUPPORT_BODY'];
+ break;
+ }
+
+ $this->tpl_name = 'install_main';
+ $this->page_title = $title;
+
+ $template->assign_vars(array(
+ 'TITLE' => $title,
+ 'BODY' => $body,
+
+ 'S_LANG_SELECT' => '<select id="language" name="language">' . $this->p_master->inst_language_select($language) . '</select>',
+ ));
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
new file mode 100644
index 0000000000..ab7ec35705
--- /dev/null
+++ b/phpBB/install/install_update.php
@@ -0,0 +1,1705 @@
+<?php
+/**
+*
+* @package install
+* @version $Id$
+* @copyright (c) 2006 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+* @todo check for writable cache/store/files directory
+*/
+
+/**
+*/
+if (!defined('IN_INSTALL'))
+{
+ // Someone has tried to access the file directly. This is not a good idea, so exit
+ exit;
+}
+
+if (!empty($setmodules))
+{
+ // If phpBB is not installed we do not include this module
+ if (@file_exists($phpbb_root_path . 'config.' . $phpEx) && !@file_exists($phpbb_root_path . 'cache/install_lock'))
+ {
+ include_once($phpbb_root_path . 'config.' . $phpEx);
+
+ if (!defined('PHPBB_INSTALLED'))
+ {
+ return;
+ }
+ }
+ else
+ {
+ return;
+ }
+
+ $module[] = array(
+ 'module_type' => 'update',
+ 'module_title' => 'UPDATE',
+ 'module_filename' => substr(basename(__FILE__), 0, -strlen($phpEx)-1),
+ 'module_order' => 30,
+ 'module_subs' => '',
+ 'module_stages' => array('INTRO', 'VERSION_CHECK', 'UPDATE_DB', 'FILE_CHECK', 'UPDATE_FILES'),
+ 'module_reqs' => ''
+ );
+}
+
+/**
+* Update Installation
+* @package install
+*/
+class install_update extends module
+{
+ var $p_master;
+ var $update_info;
+
+ var $old_location;
+ var $new_location;
+ var $latest_version;
+ var $current_version;
+ var $unequal_version;
+
+ var $update_to_version;
+
+ // Set to false
+ var $test_update = false;
+
+ function install_update(&$p_master)
+ {
+ $this->p_master = &$p_master;
+ }
+
+ function main($mode, $sub)
+ {
+ global $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth;
+
+ $this->tpl_name = 'install_update';
+ $this->page_title = 'UPDATE_INSTALLATION';
+ $this->unequal_version = false;
+
+ $this->old_location = $phpbb_root_path . 'install/update/old/';
+ $this->new_location = $phpbb_root_path . 'install/update/new/';
+
+ // Init DB
+ require($phpbb_root_path . 'config.' . $phpEx);
+ require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
+ require($phpbb_root_path . 'includes/constants.' . $phpEx);
+
+ // Special options for conflicts/modified files
+ define('MERGE_NO_MERGE_NEW', 1);
+ define('MERGE_NO_MERGE_MOD', 2);
+ define('MERGE_NEW_FILE', 3);
+ define('MERGE_MOD_FILE', 4);
+
+ $db = new $sql_db();
+
+ // Connect to DB
+ $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false);
+
+ // We do not need this any longer, unset for safety purposes
+ unset($dbpasswd);
+
+ $config = array();
+
+ $sql = 'SELECT config_name, config_value
+ FROM ' . CONFIG_TABLE;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $config[$row['config_name']] = $row['config_value'];
+ }
+ $db->sql_freeresult($result);
+
+ // Force template recompile
+ $config['load_tplcompile'] = 1;
+
+ // First of all, init the user session
+ $user->session_begin();
+ $auth->acl($user->data);
+
+ $user->setup('install');
+
+ // If we are within the intro page we need to make sure we get up-to-date version info
+ if ($sub == 'intro')
+ {
+ $cache->destroy('_version_info');
+ }
+
+ // Set custom template again. ;)
+ $template->set_custom_template('../adm/style', 'admin');
+
+ // still, the acp template is never stored in the database
+ $user->theme['template_storedb'] = false;
+
+ // Get current and latest version
+ if (($latest_version = $cache->get('_version_info')) === false)
+ {
+ $this->latest_version = $this->get_file('version_info');
+ $cache->put('_version_info', $this->latest_version);
+ }
+ else
+ {
+ $this->latest_version = $latest_version;
+ }
+
+ // For the current version we trick a bit. ;)
+ $this->current_version = (!empty($config['version_update_from'])) ? $config['version_update_from'] : $config['version'];
+
+ $up_to_date = (version_compare(str_replace('rc', 'RC', strtolower($this->current_version)), str_replace('rc', 'RC', strtolower($this->latest_version)), '<')) ? false : true;
+
+ // Check for a valid update directory, else point the user to the phpbb.com website
+ if (!file_exists($phpbb_root_path . 'install/update') || !file_exists($phpbb_root_path . 'install/update/index.' . $phpEx) || !file_exists($this->old_location) || !file_exists($this->new_location))
+ {
+ $template->assign_vars(array(
+ 'S_ERROR' => true,
+ 'ERROR_MSG' => ($up_to_date) ? $user->lang['NO_UPDATE_FILES_UP_TO_DATE'] : sprintf($user->lang['NO_UPDATE_FILES_OUTDATED'], $config['version'], $this->current_version, $this->latest_version))
+ );
+
+ return;
+ }
+
+ $this->update_info = $this->get_file('update_info');
+
+ // Make sure the update directory holds the correct information
+ // Since admins are able to run the update/checks more than once we only check if the current version is lower or equal than the version to which we update to.
+ if (version_compare(str_replace('rc', 'RC', strtolower($this->current_version)), str_replace('rc', 'RC', strtolower($this->update_info['version']['to'])), '>'))
+ {
+ $template->assign_vars(array(
+ 'S_ERROR' => true,
+ 'ERROR_MSG' => sprintf($user->lang['INCOMPATIBLE_UPDATE_FILES'], $config['version'], $this->update_info['version']['from'], $this->update_info['version']['to']))
+ );
+
+ return;
+ }
+
+ // Check if the update files stored are for the latest version...
+ if ($this->latest_version != $this->update_info['version']['to'])
+ {
+ $this->unequal_version = true;
+
+ $template->assign_vars(array(
+ 'S_WARNING' => true,
+ 'WARNING_MSG' => sprintf($user->lang['OLD_UPDATE_FILES'], $this->update_info['version']['from'], $this->update_info['version']['to'], $this->latest_version))
+ );
+ }
+
+ // We store the "update to" version, because it is not always the latest. ;)
+ $this->update_to_version = $this->update_info['version']['to'];
+
+ // Fill DB version
+ if (empty($config['dbms_version']))
+ {
+ set_config('dbms_version', $db->sql_server_info(true));
+ }
+
+ if ($this->test_update === false)
+ {
+ // Got the updater template itself updated? If so, we are able to directly use it - but only if all three files are present
+ if (in_array('adm/style/install_update.html', $this->update_info['files']))
+ {
+ $this->tpl_name = '../../install/update/new/adm/style/install_update';
+ }
+
+ // What about the language file? Got it updated?
+ if (in_array('language/en/install.' . $phpEx, $this->update_info['files']))
+ {
+ $lang = array();
+ include($this->new_location . 'language/en/install.' . $phpEx);
+ // only add new keys to user's language in english
+ $new_keys = array_diff(array_keys($lang), array_keys($user->lang));
+ foreach ($new_keys as $i => $new_key)
+ {
+ $user->lang[$new_key] = $lang[$new_key];
+ }
+ }
+ }
+
+ // Include renderer and engine
+ $this->include_file('includes/diff/diff.' . $phpEx);
+ $this->include_file('includes/diff/engine.' . $phpEx);
+ $this->include_file('includes/diff/renderer.' . $phpEx);
+
+ // Make sure we stay at the file check if checking the files again
+ if (!empty($_POST['check_again']))
+ {
+ $sub = $this->p_master->sub = 'file_check';
+ }
+
+ switch ($sub)
+ {
+ case 'intro':
+ $this->page_title = 'UPDATE_INSTALLATION';
+
+ $template->assign_vars(array(
+ 'S_INTRO' => true,
+ 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=version_check"),
+ ));
+
+ // Make sure the update list is destroyed.
+ $cache->destroy('_update_list');
+ $cache->destroy('_diff_files');
+ break;
+
+ case 'version_check':
+ $this->page_title = 'STAGE_VERSION_CHECK';
+
+ $template->assign_vars(array(
+ 'S_UP_TO_DATE' => $up_to_date,
+ 'S_VERSION_CHECK' => true,
+
+ 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=file_check"),
+ 'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=update_db"),
+
+ 'LATEST_VERSION' => $this->latest_version,
+ 'CURRENT_VERSION' => $this->current_version)
+ );
+
+ // Print out version the update package updates to
+ if ($this->unequal_version)
+ {
+ $template->assign_var('PACKAGE_VERSION', $this->update_info['version']['to']);
+ }
+
+ break;
+
+ case 'update_db':
+
+ // Make sure the database update is valid for the latest version
+ $valid = false;
+ $updates_to_version = '';
+
+ if (file_exists($phpbb_root_path . 'install/database_update.' . $phpEx))
+ {
+ include_once($phpbb_root_path . 'install/database_update.' . $phpEx);
+
+ if ($updates_to_version === $this->update_info['version']['to'])
+ {
+ $valid = true;
+ }
+ }
+
+ // Should not happen at all
+ if (!$valid)
+ {
+ trigger_error($user->lang['DATABASE_UPDATE_INFO_OLD'], E_USER_ERROR);
+ }
+
+ // Just a precaution
+ $cache->purge();
+
+ // Redirect the user to the database update script with some explanations...
+ $template->assign_vars(array(
+ 'S_DB_UPDATE' => true,
+ 'S_DB_UPDATE_FINISHED' => ($config['version'] == $this->update_info['version']['to']) ? true : false,
+ 'U_DB_UPDATE' => append_sid($phpbb_root_path . 'install/database_update.' . $phpEx, 'type=1&amp;language=' . $user->data['user_lang']),
+ 'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=update_db"),
+ 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=file_check"),
+ ));
+
+ break;
+
+ case 'file_check':
+
+ // Make sure the previous file collection is no longer valid...
+ $cache->destroy('_diff_files');
+
+ $this->page_title = 'STAGE_FILE_CHECK';
+
+ // Now make sure our update list is correct if the admin refreshes
+ $action = request_var('action', '');
+
+ // We are directly within an update. To make sure our update list is correct we check its status.
+ $update_list = (!empty($_POST['check_again'])) ? false : $cache->get('_update_list');
+ $modified = ($update_list !== false) ? @filemtime($cache->cache_dir . 'data_update_list.' . $phpEx) : 0;
+
+ // Make sure the list is up-to-date
+ if ($update_list !== false)
+ {
+ $get_new_list = false;
+ foreach ($this->update_info['files'] as $file)
+ {
+ if (file_exists($phpbb_root_path . $file) && filemtime($phpbb_root_path . $file) > $modified)
+ {
+ $get_new_list = true;
+ break;
+ }
+ }
+ }
+ else
+ {
+ $get_new_list = true;
+ }
+
+ if (!$get_new_list && $update_list['status'] != -1)
+ {
+ $get_new_list = true;
+ }
+
+ if ($get_new_list)
+ {
+ $this->get_update_structure($update_list);
+ $cache->put('_update_list', $update_list);
+
+ // Refresh the page if we are still not finished...
+ if ($update_list['status'] != -1)
+ {
+ $refresh_url = append_sid($this->p_master->module_url, "mode=$mode&amp;sub=file_check");
+ meta_refresh(2, $refresh_url);
+
+ $template->assign_vars(array(
+ 'S_IN_PROGRESS' => true,
+ 'S_COLLECTED' => (int) $update_list['status'],
+ 'S_TO_COLLECT' => sizeof($this->update_info['files']),
+ 'L_IN_PROGRESS' => $user->lang['COLLECTING_FILE_DIFFS'],
+ 'L_IN_PROGRESS_EXPLAIN' => sprintf($user->lang['NUMBER_OF_FILES_COLLECTED'], (int) $update_list['status'], sizeof($this->update_info['files'])),
+ ));
+
+ return;
+ }
+ }
+
+ if ($action == 'diff')
+ {
+ $this->show_diff($update_list);
+ return;
+ }
+
+ if (sizeof($update_list['no_update']))
+ {
+ $template->assign_vars(array(
+ 'S_NO_UPDATE_FILES' => true,
+ 'NO_UPDATE_FILES' => implode(', ', array_map('htmlspecialchars', $update_list['no_update'])))
+ );
+ }
+
+ // Now assign the list to the template
+ foreach ($update_list as $status => $filelist)
+ {
+ if ($status == 'no_update' || !sizeof($filelist) || $status == 'status')
+ {
+ continue;
+ }
+
+/* $template->assign_block_vars('files', array(
+ 'S_STATUS' => true,
+ 'STATUS' => $status,
+ 'L_STATUS' => $user->lang['STATUS_' . strtoupper($status)],
+ 'TITLE' => $user->lang['FILES_' . strtoupper($status)],
+ 'EXPLAIN' => $user->lang['FILES_' . strtoupper($status) . '_EXPLAIN'],
+ )
+ );*/
+
+ foreach ($filelist as $file_struct)
+ {
+ $s_binary = (!empty($this->update_info['binary']) && in_array($file_struct['filename'], $this->update_info['binary'])) ? true : false;
+
+ $filename = htmlspecialchars($file_struct['filename']);
+ if (strrpos($filename, '/') !== false)
+ {
+ $dir_part = substr($filename, 0, strrpos($filename, '/') + 1);
+ $file_part = substr($filename, strrpos($filename, '/') + 1);
+ }
+ else
+ {
+ $dir_part = '';
+ $file_part = $filename;
+ }
+
+ $diff_url = append_sid($this->p_master->module_url, "mode=$mode&amp;sub=file_check&amp;action=diff&amp;status=$status&amp;file=" . urlencode($file_struct['filename']));
+
+ $template->assign_block_vars($status, array(
+ 'STATUS' => $status,
+
+ 'FILENAME' => $filename,
+ 'DIR_PART' => $dir_part,
+ 'FILE_PART' => $file_part,
+ 'NUM_CONFLICTS' => (isset($file_struct['conflicts'])) ? $file_struct['conflicts'] : 0,
+
+ 'S_CUSTOM' => ($file_struct['custom']) ? true : false,
+ 'S_BINARY' => $s_binary,
+ 'CUSTOM_ORIGINAL' => ($file_struct['custom']) ? $file_struct['original'] : '',
+
+ 'U_SHOW_DIFF' => $diff_url,
+ 'L_SHOW_DIFF' => ($status != 'up_to_date') ? $user->lang['SHOW_DIFF_' . strtoupper($status)] : '',
+
+ 'U_VIEW_MOD_FILE' => $diff_url . '&amp;op=' . MERGE_MOD_FILE,
+ 'U_VIEW_NEW_FILE' => $diff_url . '&amp;op=' . MERGE_NEW_FILE,
+ 'U_VIEW_NO_MERGE_MOD' => $diff_url . '&amp;op=' . MERGE_NO_MERGE_MOD,
+ 'U_VIEW_NO_MERGE_NEW' => $diff_url . '&amp;op=' . MERGE_NO_MERGE_NEW,
+ ));
+ }
+ }
+
+ $all_up_to_date = true;
+ foreach ($update_list as $status => $filelist)
+ {
+ if ($status != 'up_to_date' && $status != 'custom' && $status != 'status' && sizeof($filelist))
+ {
+ $all_up_to_date = false;
+ break;
+ }
+ }
+
+ $template->assign_vars(array(
+ 'S_FILE_CHECK' => true,
+ 'S_ALL_UP_TO_DATE' => $all_up_to_date,
+ 'S_VERSION_UP_TO_DATE' => $up_to_date,
+ 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=file_check"),
+ 'U_UPDATE_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=update_files"),
+ 'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=update_db"),
+ ));
+
+ if ($all_up_to_date)
+ {
+ // Add database update to log
+ add_log('admin', 'LOG_UPDATE_PHPBB', $this->current_version, $this->update_to_version);
+
+ // Refresh prosilver css data - this may cause some unhappy users, but
+ $sql = 'SELECT *
+ FROM ' . STYLES_THEME_TABLE . "
+ WHERE LOWER(theme_name) = 'prosilver'";
+ $result = $db->sql_query($sql);
+ $theme = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($theme)
+ {
+ $recache = (empty($theme['theme_data'])) ? true : false;
+ $update_time = time();
+
+ // We test for stylesheet.css because it is faster and most likely the only file changed on common themes
+ if (!$recache && $theme['theme_mtime'] < @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css'))
+ {
+ $recache = true;
+ $update_time = @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css');
+ }
+ else if (!$recache)
+ {
+ $last_change = $theme['theme_mtime'];
+ $dir = @opendir("{$phpbb_root_path}styles/{$theme['theme_path']}/theme");
+
+ if ($dir)
+ {
+ while (($entry = readdir($dir)) !== false)
+ {
+ if (substr(strrchr($entry, '.'), 1) == 'css' && $last_change < @filemtime("{$phpbb_root_path}styles/{$theme['theme_path']}/theme/{$entry}"))
+ {
+ $recache = true;
+ break;
+ }
+ }
+ closedir($dir);
+ }
+ }
+
+ if ($recache)
+ {
+ // Instead of re-caching here, we simply remove theme_data... HAR HAR HAR (think about a carribean pirate)
+ $sql = 'UPDATE ' . STYLES_THEME_TABLE . " SET theme_data = ''
+ WHERE theme_id = " . $theme['theme_id'];
+ $db->sql_query($sql);
+
+ $cache->destroy('sql', STYLES_THEME_TABLE);
+ $cache->destroy('sql', STYLES_TABLE);
+ }
+ }
+
+ $db->sql_return_on_error(true);
+ $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'");
+ $db->sql_return_on_error(false);
+
+ $cache->purge();
+ }
+
+ break;
+
+ case 'update_files':
+
+ $this->page_title = 'STAGE_UPDATE_FILES';
+
+ $s_hidden_fields = '';
+ $params = array();
+ $conflicts = request_var('conflict', array('' => 0));
+ $modified = request_var('modified', array('' => 0));
+
+ foreach ($conflicts as $filename => $merge_option)
+ {
+ $s_hidden_fields .= '<input type="hidden" name="conflict[' . htmlspecialchars($filename) . ']" value="' . $merge_option . '" />';
+ $params[] = 'conflict[' . urlencode($filename) . ']=' . urlencode($merge_option);
+ }
+
+ foreach ($modified as $filename => $merge_option)
+ {
+ if (!$merge_option)
+ {
+ continue;
+ }
+ $s_hidden_fields .= '<input type="hidden" name="modified[' . htmlspecialchars($filename) . ']" value="' . $merge_option . '" />';
+ $params[] = 'modified[' . urlencode($filename) . ']=' . urlencode($merge_option);
+ }
+
+ $no_update = request_var('no_update', array(0 => ''));
+
+ foreach ($no_update as $index => $filename)
+ {
+ $s_hidden_fields .= '<input type="hidden" name="no_update[]" value="' . htmlspecialchars($filename) . '" />';
+ $params[] = 'no_update[]=' . urlencode($filename);
+ }
+
+ // Before the user is choosing his preferred method, let's create the content list...
+ $update_list = $cache->get('_update_list');
+
+ if ($update_list === false)
+ {
+ trigger_error($user->lang['NO_UPDATE_INFO'], E_USER_ERROR);
+ }
+
+ // Check if the conflicts data is valid
+ if (sizeof($conflicts))
+ {
+ $conflict_filenames = array();
+ foreach ($update_list['conflict'] as $files)
+ {
+ $conflict_filenames[] = $files['filename'];
+ }
+
+ $new_conflicts = array();
+ foreach ($conflicts as $filename => $diff_method)
+ {
+ if (in_array($filename, $conflict_filenames))
+ {
+ $new_conflicts[$filename] = $diff_method;
+ }
+ }
+
+ $conflicts = $new_conflicts;
+ }
+
+ // Build list for modifications
+ if (sizeof($modified))
+ {
+ $modified_filenames = array();
+ foreach ($update_list['modified'] as $files)
+ {
+ $modified_filenames[] = $files['filename'];
+ }
+
+ $new_modified = array();
+ foreach ($modified as $filename => $diff_method)
+ {
+ if (in_array($filename, $modified_filenames))
+ {
+ $new_modified[$filename] = $diff_method;
+ }
+ }
+
+ $modified = $new_modified;
+ }
+
+ // Check number of conflicting files, they need to be equal. For modified files the number can differ
+ if (sizeof($update_list['conflict']) != sizeof($conflicts))
+ {
+ trigger_error($user->lang['MERGE_SELECT_ERROR'], E_USER_ERROR);
+ }
+
+ // Before we do anything, let us diff the files and store the raw file information "somewhere"
+ $get_files = false;
+ $file_list = $cache->get('_diff_files');
+
+ if ($file_list === false || $file_list['status'] != -1)
+ {
+ $get_files = true;
+ }
+
+ if ($get_files)
+ {
+ if ($file_list === false)
+ {
+ $file_list = array(
+ 'status' => 0,
+ );
+ }
+
+ $processed = 0;
+ foreach ($update_list as $status => $files)
+ {
+ if (!is_array($files))
+ {
+ continue;
+ }
+
+ foreach ($files as $file_struct)
+ {
+ // Skip this file if the user selected to not update it
+ if (in_array($file_struct['filename'], $no_update))
+ {
+ continue;
+ }
+
+ // Already handled... then skip of course...
+ if (isset($file_list[$file_struct['filename']]))
+ {
+ continue;
+ }
+
+ // Refresh if we reach 5 diffs...
+ if ($processed >= 5)
+ {
+ $cache->put('_diff_files', $file_list);
+
+ if (!empty($_REQUEST['download']))
+ {
+ $params[] = 'download=1';
+ }
+
+ $redirect_url = append_sid($this->p_master->module_url, "mode=$mode&amp;sub=update_files&amp;" . implode('&amp;', $params));
+ meta_refresh(3, $redirect_url);
+
+ $template->assign_vars(array(
+ 'S_IN_PROGRESS' => true,
+ 'L_IN_PROGRESS' => $user->lang['MERGING_FILES'],
+ 'L_IN_PROGRESS_EXPLAIN' => $user->lang['MERGING_FILES_EXPLAIN'],
+ ));
+
+ return;
+ }
+
+ $original_filename = ($file_struct['custom']) ? $file_struct['original'] : $file_struct['filename'];
+
+ switch ($status)
+ {
+ case 'modified':
+
+ $option = (isset($modified[$file_struct['filename']])) ? $modified[$file_struct['filename']] : 0;
+
+ switch ($option)
+ {
+ case MERGE_NO_MERGE_NEW:
+ $contents = file_get_contents($this->new_location . $original_filename);
+ break;
+
+ case MERGE_NO_MERGE_MOD:
+ $contents = file_get_contents($phpbb_root_path . $file_struct['filename']);
+ break;
+
+ default:
+ $diff = $this->return_diff($this->old_location . $original_filename, $phpbb_root_path . $file_struct['filename'], $this->new_location . $original_filename);
+
+ $contents = implode("\n", $diff->merged_output());
+ unset($diff);
+ break;
+ }
+
+ $file_list[$file_struct['filename']] = '_file_' . md5($file_struct['filename']);
+ $cache->put($file_list[$file_struct['filename']], base64_encode($contents));
+
+ $file_list['status']++;
+ $processed++;
+
+ break;
+
+ case 'conflict':
+
+ $option = $conflicts[$file_struct['filename']];
+ $contents = '';
+
+ switch ($option)
+ {
+ case MERGE_NO_MERGE_NEW:
+ $contents = file_get_contents($this->new_location . $original_filename);
+ break;
+
+ case MERGE_NO_MERGE_MOD:
+ $contents = file_get_contents($phpbb_root_path . $file_struct['filename']);
+ break;
+
+ default:
+
+ $diff = $this->return_diff($this->old_location . $original_filename, $phpbb_root_path . $file_struct['filename'], $this->new_location . $original_filename);
+
+ if ($option == MERGE_NEW_FILE)
+ {
+ $contents = implode("\n", $diff->merged_new_output());
+ }
+ else if ($option == MERGE_MOD_FILE)
+ {
+ $contents = implode("\n", $diff->merged_orig_output());
+ }
+ else
+ {
+ unset($diff);
+ break 2;
+ }
+
+ unset($diff);
+ break;
+ }
+
+ $file_list[$file_struct['filename']] = '_file_' . md5($file_struct['filename']);
+ $cache->put($file_list[$file_struct['filename']], base64_encode($contents));
+
+ $file_list['status']++;
+ $processed++;
+
+ break;
+ }
+ }
+ }
+ }
+
+ $file_list['status'] = -1;
+ $cache->put('_diff_files', $file_list);
+
+ if (!empty($_REQUEST['download']))
+ {
+ $this->include_file('includes/functions_compress.' . $phpEx);
+
+ $use_method = request_var('use_method', '');
+ $methods = array('.tar');
+
+ $available_methods = array('.tar.gz' => 'zlib', '.tar.bz2' => 'bz2', '.zip' => 'zlib');
+ foreach ($available_methods as $type => $module)
+ {
+ if (!@extension_loaded($module))
+ {
+ continue;
+ }
+
+ $methods[] = $type;
+ }
+
+ // Let the user decide in which format he wants to have the pack
+ if (!$use_method)
+ {
+ $this->page_title = 'SELECT_DOWNLOAD_FORMAT';
+
+ $radio_buttons = '';
+ foreach ($methods as $method)
+ {
+ $radio_buttons .= '<label><input type="radio"' . ((!$radio_buttons) ? ' id="use_method"' : '') . ' class="radio" value="' . $method . '" name="use_method" /> ' . $method . '</label>';
+ }
+
+ $template->assign_vars(array(
+ 'S_DOWNLOAD_FILES' => true,
+ 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=update_files"),
+ 'RADIO_BUTTONS' => $radio_buttons,
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields)
+ );
+
+ // To ease the update process create a file location map
+ $update_list = $cache->get('_update_list');
+ $script_path = ($config['force_server_vars']) ? (($config['script_path'] == '/') ? '/' : $config['script_path'] . '/') : $user->page['root_script_path'];
+
+ foreach ($update_list as $status => $files)
+ {
+ if ($status == 'up_to_date' || $status == 'no_update' || $status == 'status')
+ {
+ continue;
+ }
+
+ foreach ($files as $file_struct)
+ {
+ if (in_array($file_struct['filename'], $no_update))
+ {
+ continue;
+ }
+
+ $template->assign_block_vars('location', array(
+ 'SOURCE' => htmlspecialchars($file_struct['filename']),
+ 'DESTINATION' => $script_path . htmlspecialchars($file_struct['filename']),
+ ));
+ }
+ }
+ return;
+ }
+
+ if (!in_array($use_method, $methods))
+ {
+ $use_method = '.tar';
+ }
+
+ $update_mode = 'download';
+ }
+ else
+ {
+ $this->include_file('includes/functions_transfer.' . $phpEx);
+
+ // Choose FTP, if not available use fsock...
+ $method = basename(request_var('method', ''));
+ $submit = (isset($_POST['submit'])) ? true : false;
+ $test_ftp_connection = request_var('test_connection', '');
+
+ if (!$method || !class_exists($method))
+ {
+ $method = 'ftp';
+ $methods = transfer::methods();
+
+ if (!in_array('ftp', $methods))
+ {
+ $method = $methods[0];
+ }
+ }
+
+ $test_connection = false;
+ if ($test_ftp_connection || $submit)
+ {
+ $transfer = new $method(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
+ $test_connection = $transfer->open_session();
+
+ // Make sure that the directory is correct by checking for the existence of common.php
+ if ($test_connection === true)
+ {
+ // Check for common.php file
+ if (!$transfer->file_exists($phpbb_root_path, 'common.' . $phpEx))
+ {
+ $test_connection = 'ERR_WRONG_PATH_TO_PHPBB';
+ }
+ }
+
+ $transfer->close_session();
+
+ // Make sure the login details are correct before continuing
+ if ($submit && $test_connection !== true)
+ {
+ $submit = false;
+ $test_ftp_connection = true;
+ }
+ }
+
+ $s_hidden_fields .= build_hidden_fields(array('method' => $method));
+
+ if (!$submit)
+ {
+ $this->page_title = 'SELECT_FTP_SETTINGS';
+
+ if (!class_exists($method))
+ {
+ trigger_error('Method does not exist.', E_USER_ERROR);
+ }
+
+ $requested_data = call_user_func(array($method, 'data'));
+ foreach ($requested_data as $data => $default)
+ {
+ $template->assign_block_vars('data', array(
+ 'DATA' => $data,
+ 'NAME' => $user->lang[strtoupper($method . '_' . $data)],
+ 'EXPLAIN' => $user->lang[strtoupper($method . '_' . $data) . '_EXPLAIN'],
+ 'DEFAULT' => (!empty($_REQUEST[$data])) ? request_var($data, '') : $default
+ ));
+ }
+
+ $template->assign_vars(array(
+ 'S_CONNECTION_SUCCESS' => ($test_ftp_connection && $test_connection === true) ? true : false,
+ 'S_CONNECTION_FAILED' => ($test_ftp_connection && $test_connection !== true) ? true : false,
+ 'ERROR_MSG' => ($test_ftp_connection && $test_connection !== true) ? $user->lang[$test_connection] : '',
+
+ 'S_FTP_UPLOAD' => true,
+ 'UPLOAD_METHOD' => $method,
+ 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=update_files"),
+ 'U_DOWNLOAD_METHOD' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=update_files&amp;download=1"),
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields,
+ ));
+
+ return;
+ }
+
+ $update_mode = 'upload';
+ }
+
+ // Now update the installation or download the archive...
+ $download_filename = 'update_' . $this->update_info['version']['from'] . '_to_' . $this->update_info['version']['to'];
+ $archive_filename = $download_filename . '_' . time() . '_' . unique_id();
+
+ // Now init the connection
+ if ($update_mode == 'download')
+ {
+ if (function_exists('phpbb_is_writable') && !phpbb_is_writable($phpbb_root_path . 'store/'))
+ {
+ trigger_error(sprintf($user->lang['DIRECTORY_NOT_WRITABLE'], $phpbb_root_path . 'store/'), E_USER_ERROR);
+ }
+
+ if ($use_method == '.zip')
+ {
+ $compress = new compress_zip('w', $phpbb_root_path . 'store/' . $archive_filename . $use_method);
+ }
+ else
+ {
+ $compress = new compress_tar('w', $phpbb_root_path . 'store/' . $archive_filename . $use_method, $use_method);
+ }
+ }
+ else
+ {
+ $transfer = new $method(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
+ $transfer->open_session();
+ }
+
+ // Ok, go through the update list and do the operations based on their status
+ foreach ($update_list as $status => $files)
+ {
+ if (!is_array($files))
+ {
+ continue;
+ }
+
+ foreach ($files as $file_struct)
+ {
+ // Skip this file if the user selected to not update it
+ if (in_array($file_struct['filename'], $no_update))
+ {
+ continue;
+ }
+
+ $original_filename = ($file_struct['custom']) ? $file_struct['original'] : $file_struct['filename'];
+
+ switch ($status)
+ {
+ case 'new':
+ case 'new_conflict':
+ case 'not_modified':
+
+ if ($update_mode == 'download')
+ {
+ $compress->add_custom_file($this->new_location . $original_filename, $file_struct['filename']);
+ }
+ else
+ {
+ if ($status != 'new')
+ {
+ $transfer->rename($file_struct['filename'], $file_struct['filename'] . '.bak');
+ }
+
+ // New directory too?
+ $dirname = dirname($file_struct['filename']);
+
+ if ($dirname && !file_exists($phpbb_root_path . $dirname))
+ {
+ $transfer->make_dir($dirname);
+ }
+
+ $transfer->copy_file($this->new_location . $original_filename, $file_struct['filename']);
+ }
+ break;
+
+ case 'modified':
+
+ $contents = base64_decode($cache->get($file_list[$file_struct['filename']]));
+
+ if ($update_mode == 'download')
+ {
+ $compress->add_data($contents, $file_struct['filename']);
+ }
+ else
+ {
+ // @todo add option to specify if a backup file should be created?
+ $transfer->rename($file_struct['filename'], $file_struct['filename'] . '.bak');
+ $transfer->write_file($file_struct['filename'], $contents);
+ }
+ break;
+
+ case 'conflict':
+
+ $contents = base64_decode($cache->get($file_list[$file_struct['filename']]));
+
+ if ($update_mode == 'download')
+ {
+ $compress->add_data($contents, $file_struct['filename']);
+ }
+ else
+ {
+ $transfer->rename($file_struct['filename'], $file_struct['filename'] . '.bak');
+ $transfer->write_file($file_struct['filename'], $contents);
+ }
+ break;
+ }
+ }
+ }
+
+ if ($update_mode == 'download')
+ {
+ $compress->close();
+
+ $compress->download($archive_filename, $download_filename);
+ @unlink($phpbb_root_path . 'store/' . $archive_filename . $use_method);
+
+ exit;
+ }
+ else
+ {
+ $transfer->close_session();
+
+ $template->assign_vars(array(
+ 'S_UPLOAD_SUCCESS' => true,
+ 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=file_check"))
+ );
+ return;
+ }
+
+ break;
+
+ }
+ }
+
+ /**
+ * Show file diff
+ */
+ function show_diff(&$update_list)
+ {
+ global $phpbb_root_path, $template, $user;
+
+ $this->tpl_name = 'install_update_diff';
+
+ // Got the diff template itself updated? If so, we are able to directly use it
+ if (in_array('adm/style/install_update_diff.html', $this->update_info['files']))
+ {
+ $this->tpl_name = '../../install/update/new/adm/style/install_update_diff';
+ }
+
+ $this->page_title = 'VIEWING_FILE_DIFF';
+
+ $status = request_var('status', '');
+ $file = request_var('file', '');
+ $diff_mode = request_var('diff_mode', 'inline');
+
+ // First of all make sure the file is within our file update list with the correct status
+ $found_entry = array();
+ foreach ($update_list[$status] as $index => $file_struct)
+ {
+ if ($file_struct['filename'] === $file)
+ {
+ $found_entry = $update_list[$status][$index];
+ }
+ }
+
+ if (empty($found_entry))
+ {
+ trigger_error($user->lang['FILE_DIFF_NOT_ALLOWED'], E_USER_ERROR);
+ }
+
+ // If the status is 'up_to_date' then we do not need to show a diff
+ if ($status == 'up_to_date')
+ {
+ trigger_error($user->lang['FILE_ALREADY_UP_TO_DATE'], E_USER_ERROR);
+ }
+
+ $original_file = ($found_entry['custom']) ? $found_entry['original'] : $file;
+
+ // Get the correct diff
+ switch ($status)
+ {
+ case 'conflict':
+ $option = request_var('op', 0);
+
+ switch ($option)
+ {
+ case MERGE_NO_MERGE_NEW:
+ case MERGE_NO_MERGE_MOD:
+
+ $diff = $this->return_diff(array(), ($option == MERGE_NO_MERGE_NEW) ? $this->new_location . $original_file : $phpbb_root_path . $file);
+
+ $template->assign_var('S_DIFF_NEW_FILE', true);
+ $diff_mode = 'inline';
+ $this->page_title = 'VIEWING_FILE_CONTENTS';
+
+ break;
+
+ // Merge differences and use new phpBB code for conflicted blocks
+ case MERGE_NEW_FILE:
+ case MERGE_MOD_FILE:
+
+ $diff = $this->return_diff($this->old_location . $original_file, $phpbb_root_path . $file, $this->new_location . $original_file);
+
+ $template->assign_vars(array(
+ 'S_DIFF_CONFLICT_FILE' => true,
+ 'NUM_CONFLICTS' => $diff->get_num_conflicts())
+ );
+
+ $diff = $this->return_diff($phpbb_root_path . $file, ($option == MERGE_NEW_FILE) ? $diff->merged_new_output() : $diff->merged_orig_output());
+ break;
+
+ // Download conflict file
+ default:
+
+ $diff = $this->return_diff($this->old_location . $original_file, $phpbb_root_path . $file, $this->new_location . $original_file);
+
+ header('Pragma: no-cache');
+ header("Content-Type: application/octetstream; name=\"$file\"");
+ header("Content-disposition: attachment; filename=$file");
+
+ @set_time_limit(0);
+
+ echo implode("\n", $diff->get_conflicts_content());
+
+ flush();
+ exit;
+
+ break;
+ }
+
+ break;
+
+ case 'modified':
+ $option = request_var('op', 0);
+
+ switch ($option)
+ {
+ case MERGE_NO_MERGE_NEW:
+ case MERGE_NO_MERGE_MOD:
+
+ $diff = $this->return_diff(array(), ($option == MERGE_NO_MERGE_NEW) ? $this->new_location . $original_file : $phpbb_root_path . $file);
+
+ $template->assign_var('S_DIFF_NEW_FILE', true);
+ $diff_mode = 'inline';
+ $this->page_title = 'VIEWING_FILE_CONTENTS';
+
+ break;
+
+ default:
+ $diff = $this->return_diff($this->old_location . $original_file, $phpbb_root_path . $original_file, $this->new_location . $file);
+ $diff = $this->return_diff($phpbb_root_path . $file, $diff->merged_output());
+ break;
+ }
+ break;
+
+ case 'not_modified':
+ case 'new_conflict':
+ $diff = $this->return_diff($phpbb_root_path . $file, $this->new_location . $original_file);
+ break;
+
+ case 'new':
+
+ $diff = $this->return_diff(array(), $this->new_location . $original_file);
+
+ $template->assign_var('S_DIFF_NEW_FILE', true);
+ $diff_mode = 'inline';
+ $this->page_title = 'VIEWING_FILE_CONTENTS';
+
+ break;
+ }
+
+ $diff_mode_options = '';
+ foreach (array('side_by_side', 'inline', 'unified', 'raw') as $option)
+ {
+ $diff_mode_options .= '<option value="' . $option . '"' . (($diff_mode == $option) ? ' selected="selected"' : '') . '>' . $user->lang['DIFF_' . strtoupper($option)] . '</option>';
+ }
+
+ // Now the correct renderer
+ $render_class = 'diff_renderer_' . $diff_mode;
+
+ if (!class_exists($render_class))
+ {
+ trigger_error('Chosen diff mode is not supported', E_USER_ERROR);
+ }
+
+ $renderer = new $render_class();
+
+ $template->assign_vars(array(
+ 'DIFF_CONTENT' => $renderer->get_diff_content($diff),
+ 'DIFF_MODE' => $diff_mode,
+ 'S_DIFF_MODE_OPTIONS' => $diff_mode_options,
+ 'S_SHOW_DIFF' => true,
+ ));
+
+ unset($diff, $renderer);
+ }
+
+ /**
+ * Collect all file status infos we need for the update by diffing all files
+ */
+ function get_update_structure(&$update_list)
+ {
+ global $phpbb_root_path, $phpEx, $user;
+
+ if ($update_list === false)
+ {
+ $update_list = array(
+ 'up_to_date' => array(),
+ 'new' => array(),
+ 'not_modified' => array(),
+ 'modified' => array(),
+ 'new_conflict' => array(),
+ 'conflict' => array(),
+ 'no_update' => array(),
+ 'status' => 0,
+ );
+ }
+
+ /* if (!empty($this->update_info['custom']))
+ {
+ foreach ($this->update_info['custom'] as $original_file => $file_ary)
+ {
+ foreach ($file_ary as $index => $file)
+ {
+ $this->make_update_diff($update_list, $original_file, $file, true);
+ }
+ }
+ } */
+
+ // Get a list of those files which are completely new by checking with file_exists...
+ $num_bytes_processed = 0;
+
+ foreach ($this->update_info['files'] as $index => $file)
+ {
+ if (is_int($update_list['status']) && $index < $update_list['status'])
+ {
+ continue;
+ }
+
+ if ($num_bytes_processed >= 500 * 1024)
+ {
+ return;
+ }
+
+ if (!file_exists($phpbb_root_path . $file))
+ {
+ // Make sure the update files are consistent by checking if the file is in new_files...
+ if (!file_exists($this->new_location . $file))
+ {
+ trigger_error($user->lang['INCOMPLETE_UPDATE_FILES'], E_USER_ERROR);
+ }
+
+ // If the file exists within the old directory the file got removed and we will write it back
+ // not a biggie, but we might want to state this circumstance separately later.
+ // if (file_exists($this->old_location . $file))
+ // {
+ // $update_list['removed'][] = $file;
+ // }
+
+ /* Only include a new file as new if the underlying path exist
+ // The path normally do not exist if the original style or language has been removed
+ if (file_exists($phpbb_root_path . dirname($file)))
+ {
+ $this->get_custom_info($update_list['new'], $file);
+ $update_list['new'][] = array('filename' => $file, 'custom' => false);
+ }
+ else
+ {
+ // Do not include style-related or language-related content
+ if (strpos($file, 'styles/') !== 0 && strpos($file, 'language/') !== 0)
+ {
+ $update_list['no_update'][] = $file;
+ }
+ }*/
+
+ if (file_exists($phpbb_root_path . dirname($file)) || (strpos($file, 'styles/') !== 0 && strpos($file, 'language/') !== 0))
+ {
+ $this->get_custom_info($update_list['new'], $file);
+ $update_list['new'][] = array('filename' => $file, 'custom' => false);
+ }
+
+ // unset($this->update_info['files'][$index]);
+ }
+ else
+ {
+ // not modified?
+ $this->make_update_diff($update_list, $file, $file);
+ }
+
+ $num_bytes_processed += (file_exists($this->new_location . $file)) ? filesize($this->new_location . $file) : 100 * 1024;
+ $update_list['status']++;
+ }
+
+ $update_list['status'] = -1;
+/* if (!sizeof($this->update_info['files']))
+ {
+ return $update_list;
+ }
+
+ // Now diff the remaining files to get information about their status (not modified/modified/up-to-date)
+
+ // not modified?
+ foreach ($this->update_info['files'] as $index => $file)
+ {
+ $this->make_update_diff($update_list, $file, $file);
+ }
+
+ // Now to the styles...
+ if (empty($this->update_info['custom']))
+ {
+ return $update_list;
+ }
+
+ foreach ($this->update_info['custom'] as $original_file => $file_ary)
+ {
+ foreach ($file_ary as $index => $file)
+ {
+ $this->make_update_diff($update_list, $original_file, $file, true);
+ }
+ }
+
+ return $update_list;*/
+ }
+
+ /**
+ * Compare files for storage in update_list
+ */
+ function make_update_diff(&$update_list, $original_file, $file, $custom = false)
+ {
+ global $phpbb_root_path, $user;
+
+ $update_ary = array('filename' => $file, 'custom' => $custom);
+
+ if ($custom)
+ {
+ $update_ary['original'] = $original_file;
+ }
+
+ // we only want to know if the files are successfully merged and newlines could result in errors (duplicate addition of lines and such things)
+ // Therefore we check for empty diffs with two methods, preserving newlines and not preserving them (which mostly works best, therefore the first option)
+
+ // On a successfull update the new location file exists but the old one does not exist.
+ // Check for this circumstance, the new file need to be up-to-date with the current file then...
+ if (!file_exists($this->old_location . $original_file) && file_exists($this->new_location . $original_file) && file_exists($phpbb_root_path . $file))
+ {
+ $tmp = array(
+ 'file1' => file_get_contents($this->new_location . $original_file),
+ 'file2' => file_get_contents($phpbb_root_path . $file),
+ );
+
+ // We need to diff the contents here to make sure the file is really the one we expect
+ $diff = new diff($tmp['file1'], $tmp['file2'], false);
+ $empty = $diff->is_empty();
+
+ unset($tmp, $diff);
+
+ // if there are no differences we have an up-to-date file...
+ if ($empty)
+ {
+ $update_list['up_to_date'][] = $update_ary;
+ return;
+ }
+
+ // If no other status matches we have another file in the way...
+ $update_list['new_conflict'][] = $update_ary;
+ return;
+ }
+
+ // Old file removed?
+ if (file_exists($this->old_location . $original_file) && !file_exists($this->new_location . $original_file))
+ {
+ return;
+ }
+
+ // Check for existance, else abort immediately
+ if (!file_exists($this->old_location . $original_file) || !file_exists($this->new_location . $original_file))
+ {
+ trigger_error($user->lang['INCOMPLETE_UPDATE_FILES'], E_USER_ERROR);
+ }
+
+ $preserve_cr_ary = array(false, true);
+
+ foreach ($preserve_cr_ary as $preserve_cr)
+ {
+ $tmp = array(
+ 'file1' => file_get_contents($this->old_location . $original_file),
+ 'file2' => file_get_contents($phpbb_root_path . $file),
+ );
+
+ // We need to diff the contents here to make sure the file is really the one we expect
+ $diff = new diff($tmp['file1'], $tmp['file2'], $preserve_cr);
+ $empty_1 = $diff->is_empty();
+
+ unset($tmp, $diff);
+
+ $tmp = array(
+ 'file1' => file_get_contents($this->new_location . $original_file),
+ 'file2' => file_get_contents($phpbb_root_path . $file),
+ );
+
+ $diff = new diff($tmp['file1'], $tmp['file2'], $preserve_cr);
+ $empty_2 = $diff->is_empty();
+
+ unset($tmp, $diff);
+
+ // If the file is not modified we are finished here...
+ if ($empty_1)
+ {
+ // Further check if it is already up to date - it could happen that non-modified files
+ // slip through
+ if ($empty_2)
+ {
+ $update_list['up_to_date'][] = $update_ary;
+ return;
+ }
+
+ $update_list['not_modified'][] = $update_ary;
+ return;
+ }
+
+ // If the file had been modified then we need to check if it is already up to date
+
+ // if there are no differences we have an up-to-date file...
+ if ($empty_2)
+ {
+ $update_list['up_to_date'][] = $update_ary;
+ return;
+ }
+ }
+
+ $conflicts = false;
+
+ foreach ($preserve_cr_ary as $preserve_cr)
+ {
+ // if the file is modified we try to make sure a merge succeed
+ $tmp = array(
+ 'orig' => file_get_contents($this->old_location . $original_file),
+ 'final1' => file_get_contents($phpbb_root_path . $file),
+ 'final2' => file_get_contents($this->new_location . $original_file),
+ );
+
+ $diff = new diff3($tmp['orig'], $tmp['final1'], $tmp['final2'], $preserve_cr);
+ unset($tmp);
+
+ if (!$diff->get_num_conflicts())
+ {
+ $tmp = array(
+ 'file1' => file_get_contents($phpbb_root_path . $file),
+ 'file2' => implode("\n", $diff->merged_output()),
+ );
+
+ // now compare the merged output with the original file to see if the modified file is up to date
+ $diff2 = new diff($tmp['file1'], $tmp['file2'], $preserve_cr);
+ $empty = $diff2->is_empty();
+
+ unset($diff, $diff2);
+
+ if ($empty)
+ {
+ $update_list['up_to_date'][] = $update_ary;
+ return;
+ }
+
+ // If we preserve cr tag it as modified because the conflict would not show in this mode anyway
+ if ($preserve_cr)
+ {
+ $update_list['modified'][] = $update_ary;
+ return;
+ }
+ }
+ else
+ {
+ // There is one special case... users having merged with a conflicting file... we need to check this
+ $tmp = array(
+ 'file1' => file_get_contents($phpbb_root_path . $file),
+ 'file2' => implode("\n", $diff->merged_new_output()),
+ );
+
+ $diff2 = new diff($tmp['file1'], $tmp['file2'], $preserve_cr);
+ $empty = $diff2->is_empty();
+
+ if (!$empty)
+ {
+ unset($tmp, $diff2);
+
+ // We check if the user merged with his output
+ $tmp = array(
+ 'file1' => file_get_contents($phpbb_root_path . $file),
+ 'file2' => implode("\n", $diff->merged_orig_output()),
+ );
+
+ $diff2 = new diff($tmp['file1'], $tmp['file2'], $preserve_cr);
+ $empty = $diff2->is_empty();
+ }
+
+ if (!$empty)
+ {
+ $conflicts = $diff->get_num_conflicts();
+ }
+
+ unset($diff, $diff2);
+
+ if ($empty)
+ {
+ // A conflict got resolved...
+ $update_list['up_to_date'][] = $update_ary;
+ return;
+ }
+ }
+ }
+
+ if ($conflicts !== false)
+ {
+ $update_ary['conflicts'] = $conflicts;
+ $update_list['conflict'][] = $update_ary;
+ return;
+ }
+
+ // If no other status matches we have a modified file...
+ $update_list['modified'][] = $update_ary;
+ }
+
+ /**
+ * Update update_list with custom new files
+ */
+ function get_custom_info(&$update_list, $file)
+ {
+ if (empty($this->update_info['custom']))
+ {
+ return;
+ }
+
+ if (isset($this->update_info['custom'][$file]))
+ {
+ foreach ($this->update_info['custom'][$file] as $_file)
+ {
+ $update_list[] = array('filename' => $_file, 'custom' => true, 'original' => $file);
+ }
+ }
+ }
+
+ /**
+ * Get remote file
+ */
+ function get_file($mode)
+ {
+ global $user, $db;
+
+ $errstr = '';
+ $errno = 0;
+
+ switch ($mode)
+ {
+ case 'version_info':
+ global $phpbb_root_path, $phpEx;
+ $info = get_remote_file('www.phpbb.com', '/updatecheck', ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno);
+
+ if ($info !== false)
+ {
+ $info = explode("\n", $info);
+ $info = trim($info[0]);
+ }
+
+ if ($this->test_update !== false)
+ {
+ $info = $this->test_update;
+ }
+
+ // If info is false the fsockopen function may not be working. Instead get the latest version from our update file (and pray it is up-to-date)
+ if ($info === false)
+ {
+ $update_info = array();
+ include($phpbb_root_path . 'install/update/index.' . $phpEx);
+ $info = (empty($update_info) || !is_array($update_info)) ? false : $update_info;
+
+ if ($info !== false)
+ {
+ $info = (!empty($info['version']['to'])) ? trim($info['version']['to']) : false;
+ }
+ }
+ break;
+
+ case 'update_info':
+ global $phpbb_root_path, $phpEx;
+
+ $update_info = array();
+ include($phpbb_root_path . 'install/update/index.' . $phpEx);
+
+ $info = (empty($update_info) || !is_array($update_info)) ? false : $update_info;
+ $errstr = ($info === false) ? $user->lang['WRONG_INFO_FILE_FORMAT'] : '';
+
+ if ($info !== false)
+ {
+ // We assume that all file extensions have been renamed to .$phpEx,
+ // if someone is using a non .php file extension for php files.
+ // However, in $update_info['files'] we use hardcoded .php.
+ // We therefore replace .php with .$phpEx.
+ $info['files'] = preg_replace('/\.php$/i', ".$phpEx", $info['files']);
+
+ // Adjust the update info file to hold some specific style-related information
+ $info['custom'] = array();
+/*
+ // Get custom installed styles...
+ $sql = 'SELECT template_name, template_path
+ FROM ' . STYLES_TEMPLATE_TABLE . "
+ WHERE LOWER(template_name) NOT IN ('subsilver2', 'prosilver')";
+ $result = $db->sql_query($sql);
+
+ $templates = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $templates[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($templates))
+ {
+ foreach ($info['files'] as $filename)
+ {
+ // Template update?
+ if (strpos(strtolower($filename), 'styles/prosilver/template/') === 0)
+ {
+ foreach ($templates as $row)
+ {
+ $info['custom'][$filename][] = str_replace('/prosilver/', '/' . $row['template_path'] . '/', $filename);
+ }
+ }
+ }
+ }
+*/
+ }
+ break;
+
+ default:
+ trigger_error('Mode for getting remote file not specified', E_USER_ERROR);
+ break;
+ }
+
+ if ($info === false)
+ {
+ trigger_error($errstr, E_USER_ERROR);
+ }
+
+ return $info;
+ }
+
+ /**
+ * Function for including files...
+ */
+ function include_file($filename)
+ {
+ global $phpbb_root_path, $phpEx;
+
+ if (!empty($this->update_info['files']) && in_array($filename, $this->update_info['files']))
+ {
+ include_once($this->new_location . $filename);
+ }
+ else
+ {
+ include_once($phpbb_root_path . $filename);
+ }
+ }
+
+ /**
+ * Wrapper for returning a diff object
+ */
+ function return_diff()
+ {
+ $args = func_get_args();
+ $three_way_diff = (func_num_args() > 2) ? true : false;
+
+ $file1 = array_shift($args);
+ $file2 = array_shift($args);
+
+ $tmp['file1'] = (!empty($file1) && is_string($file1)) ? file_get_contents($file1) : $file1;
+ $tmp['file2'] = (!empty($file2) && is_string($file2)) ? file_get_contents($file2) : $file2;
+
+ if ($three_way_diff)
+ {
+ $file3 = array_shift($args);
+ $tmp['file3'] = (!empty($file3) && is_string($file3)) ? file_get_contents($file3) : $file3;
+
+ $diff = new diff3($tmp['file1'], $tmp['file2'], $tmp['file3']);
+ }
+ else
+ {
+ $diff = new diff($tmp['file1'], $tmp['file2']);
+ }
+
+ unset($tmp);
+
+ return $diff;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/install/phpinfo.php b/phpBB/install/phpinfo.php
new file mode 100644
index 0000000000..6480abf34a
--- /dev/null
+++ b/phpBB/install/phpinfo.php
@@ -0,0 +1,5 @@
+<?php
+
+phpinfo();
+
+?> \ No newline at end of file
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
new file mode 100644
index 0000000000..f3defe9a54
--- /dev/null
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -0,0 +1,1453 @@
+#
+# $Id$
+#
+
+
+# Table: 'phpbb_attachments'
+CREATE TABLE phpbb_attachments (
+ attach_id INTEGER NOT NULL,
+ post_msg_id INTEGER DEFAULT 0 NOT NULL,
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ in_message INTEGER DEFAULT 0 NOT NULL,
+ poster_id INTEGER DEFAULT 0 NOT NULL,
+ is_orphan INTEGER DEFAULT 1 NOT NULL,
+ physical_filename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ real_filename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ download_count INTEGER DEFAULT 0 NOT NULL,
+ attach_comment BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ extension VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ mimetype VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ filesize INTEGER DEFAULT 0 NOT NULL,
+ filetime INTEGER DEFAULT 0 NOT NULL,
+ thumbnail INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_attachments ADD PRIMARY KEY (attach_id);;
+
+CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments(filetime);;
+CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments(post_msg_id);;
+CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments(topic_id);;
+CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments(poster_id);;
+CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments(is_orphan);;
+
+CREATE GENERATOR phpbb_attachments_gen;;
+SET GENERATOR phpbb_attachments_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_attachments FOR phpbb_attachments
+BEFORE INSERT
+AS
+BEGIN
+ NEW.attach_id = GEN_ID(phpbb_attachments_gen, 1);
+END;;
+
+
+# Table: 'phpbb_acl_groups'
+CREATE TABLE phpbb_acl_groups (
+ group_id INTEGER DEFAULT 0 NOT NULL,
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ auth_option_id INTEGER DEFAULT 0 NOT NULL,
+ auth_role_id INTEGER DEFAULT 0 NOT NULL,
+ auth_setting INTEGER DEFAULT 0 NOT NULL
+);;
+
+CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups(group_id);;
+CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups(auth_option_id);;
+CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups(auth_role_id);;
+
+# Table: 'phpbb_acl_options'
+CREATE TABLE phpbb_acl_options (
+ auth_option_id INTEGER NOT NULL,
+ auth_option VARCHAR(50) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ is_global INTEGER DEFAULT 0 NOT NULL,
+ is_local INTEGER DEFAULT 0 NOT NULL,
+ founder_only INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_acl_options ADD PRIMARY KEY (auth_option_id);;
+
+CREATE UNIQUE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options(auth_option);;
+
+CREATE GENERATOR phpbb_acl_options_gen;;
+SET GENERATOR phpbb_acl_options_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_acl_options FOR phpbb_acl_options
+BEFORE INSERT
+AS
+BEGIN
+ NEW.auth_option_id = GEN_ID(phpbb_acl_options_gen, 1);
+END;;
+
+
+# Table: 'phpbb_acl_roles'
+CREATE TABLE phpbb_acl_roles (
+ role_id INTEGER NOT NULL,
+ role_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ role_description BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ role_type VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ role_order INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_acl_roles ADD PRIMARY KEY (role_id);;
+
+CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles(role_type);;
+CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles(role_order);;
+
+CREATE GENERATOR phpbb_acl_roles_gen;;
+SET GENERATOR phpbb_acl_roles_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_acl_roles FOR phpbb_acl_roles
+BEFORE INSERT
+AS
+BEGIN
+ NEW.role_id = GEN_ID(phpbb_acl_roles_gen, 1);
+END;;
+
+
+# Table: 'phpbb_acl_roles_data'
+CREATE TABLE phpbb_acl_roles_data (
+ role_id INTEGER DEFAULT 0 NOT NULL,
+ auth_option_id INTEGER DEFAULT 0 NOT NULL,
+ auth_setting INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_acl_roles_data ADD PRIMARY KEY (role_id, auth_option_id);;
+
+CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data(auth_option_id);;
+
+# Table: 'phpbb_acl_users'
+CREATE TABLE phpbb_acl_users (
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ auth_option_id INTEGER DEFAULT 0 NOT NULL,
+ auth_role_id INTEGER DEFAULT 0 NOT NULL,
+ auth_setting INTEGER DEFAULT 0 NOT NULL
+);;
+
+CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users(user_id);;
+CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users(auth_option_id);;
+CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users(auth_role_id);;
+
+# Table: 'phpbb_banlist'
+CREATE TABLE phpbb_banlist (
+ ban_id INTEGER NOT NULL,
+ ban_userid INTEGER DEFAULT 0 NOT NULL,
+ ban_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ ban_email VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ ban_start INTEGER DEFAULT 0 NOT NULL,
+ ban_end INTEGER DEFAULT 0 NOT NULL,
+ ban_exclude INTEGER DEFAULT 0 NOT NULL,
+ ban_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ ban_give_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
+);;
+
+ALTER TABLE phpbb_banlist ADD PRIMARY KEY (ban_id);;
+
+CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist(ban_end);;
+CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist(ban_userid, ban_exclude);;
+CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist(ban_email, ban_exclude);;
+CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist(ban_ip, ban_exclude);;
+
+CREATE GENERATOR phpbb_banlist_gen;;
+SET GENERATOR phpbb_banlist_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_banlist FOR phpbb_banlist
+BEFORE INSERT
+AS
+BEGIN
+ NEW.ban_id = GEN_ID(phpbb_banlist_gen, 1);
+END;;
+
+
+# Table: 'phpbb_bbcodes'
+CREATE TABLE phpbb_bbcodes (
+ bbcode_id INTEGER DEFAULT 0 NOT NULL,
+ bbcode_tag VARCHAR(16) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ bbcode_helpline VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ display_on_posting INTEGER DEFAULT 0 NOT NULL,
+ bbcode_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ bbcode_tpl BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ first_pass_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ first_pass_replace BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ second_pass_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ second_pass_replace BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_bbcodes ADD PRIMARY KEY (bbcode_id);;
+
+CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes(display_on_posting);;
+
+# Table: 'phpbb_bookmarks'
+CREATE TABLE phpbb_bookmarks (
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_bookmarks ADD PRIMARY KEY (topic_id, user_id);;
+
+
+# Table: 'phpbb_bots'
+CREATE TABLE phpbb_bots (
+ bot_id INTEGER NOT NULL,
+ bot_active INTEGER DEFAULT 1 NOT NULL,
+ bot_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ bot_agent VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ bot_ip VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_bots ADD PRIMARY KEY (bot_id);;
+
+CREATE INDEX phpbb_bots_bot_active ON phpbb_bots(bot_active);;
+
+CREATE GENERATOR phpbb_bots_gen;;
+SET GENERATOR phpbb_bots_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_bots FOR phpbb_bots
+BEFORE INSERT
+AS
+BEGIN
+ NEW.bot_id = GEN_ID(phpbb_bots_gen, 1);
+END;;
+
+
+# Table: 'phpbb_config'
+CREATE TABLE phpbb_config (
+ config_name VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ config_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ is_dynamic INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_config ADD PRIMARY KEY (config_name);;
+
+CREATE INDEX phpbb_config_is_dynamic ON phpbb_config(is_dynamic);;
+
+# Table: 'phpbb_confirm'
+CREATE TABLE phpbb_confirm (
+ confirm_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ confirm_type INTEGER DEFAULT 0 NOT NULL,
+ code VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ seed INTEGER DEFAULT 0 NOT NULL,
+ attempts INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_confirm ADD PRIMARY KEY (session_id, confirm_id);;
+
+CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm(confirm_type);;
+
+# Table: 'phpbb_disallow'
+CREATE TABLE phpbb_disallow (
+ disallow_id INTEGER NOT NULL,
+ disallow_username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
+);;
+
+ALTER TABLE phpbb_disallow ADD PRIMARY KEY (disallow_id);;
+
+
+CREATE GENERATOR phpbb_disallow_gen;;
+SET GENERATOR phpbb_disallow_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_disallow FOR phpbb_disallow
+BEFORE INSERT
+AS
+BEGIN
+ NEW.disallow_id = GEN_ID(phpbb_disallow_gen, 1);
+END;;
+
+
+# Table: 'phpbb_drafts'
+CREATE TABLE phpbb_drafts (
+ draft_id INTEGER NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ save_time INTEGER DEFAULT 0 NOT NULL,
+ draft_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ draft_message BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_drafts ADD PRIMARY KEY (draft_id);;
+
+CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts(save_time);;
+
+CREATE GENERATOR phpbb_drafts_gen;;
+SET GENERATOR phpbb_drafts_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_drafts FOR phpbb_drafts
+BEFORE INSERT
+AS
+BEGIN
+ NEW.draft_id = GEN_ID(phpbb_drafts_gen, 1);
+END;;
+
+
+# Table: 'phpbb_extensions'
+CREATE TABLE phpbb_extensions (
+ extension_id INTEGER NOT NULL,
+ group_id INTEGER DEFAULT 0 NOT NULL,
+ extension VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_extensions ADD PRIMARY KEY (extension_id);;
+
+
+CREATE GENERATOR phpbb_extensions_gen;;
+SET GENERATOR phpbb_extensions_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_extensions FOR phpbb_extensions
+BEFORE INSERT
+AS
+BEGIN
+ NEW.extension_id = GEN_ID(phpbb_extensions_gen, 1);
+END;;
+
+
+# Table: 'phpbb_extension_groups'
+CREATE TABLE phpbb_extension_groups (
+ group_id INTEGER NOT NULL,
+ group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ cat_id INTEGER DEFAULT 0 NOT NULL,
+ allow_group INTEGER DEFAULT 0 NOT NULL,
+ download_mode INTEGER DEFAULT 1 NOT NULL,
+ upload_icon VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ max_filesize INTEGER DEFAULT 0 NOT NULL,
+ allowed_forums BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
+ allow_in_pm INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_extension_groups ADD PRIMARY KEY (group_id);;
+
+
+CREATE GENERATOR phpbb_extension_groups_gen;;
+SET GENERATOR phpbb_extension_groups_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_extension_groups FOR phpbb_extension_groups
+BEFORE INSERT
+AS
+BEGIN
+ NEW.group_id = GEN_ID(phpbb_extension_groups_gen, 1);
+END;;
+
+
+# Table: 'phpbb_forums'
+CREATE TABLE phpbb_forums (
+ forum_id INTEGER NOT NULL,
+ parent_id INTEGER DEFAULT 0 NOT NULL,
+ left_id INTEGER DEFAULT 0 NOT NULL,
+ right_id INTEGER DEFAULT 0 NOT NULL,
+ forum_parents BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
+ forum_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ forum_desc BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ forum_desc_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ forum_desc_options INTEGER DEFAULT 7 NOT NULL,
+ forum_desc_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ forum_link VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ forum_password VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ forum_style INTEGER DEFAULT 0 NOT NULL,
+ forum_image VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ forum_rules BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ forum_rules_link VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ forum_rules_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ forum_rules_options INTEGER DEFAULT 7 NOT NULL,
+ forum_rules_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ forum_topics_per_page INTEGER DEFAULT 0 NOT NULL,
+ forum_type INTEGER DEFAULT 0 NOT NULL,
+ forum_status INTEGER DEFAULT 0 NOT NULL,
+ forum_posts INTEGER DEFAULT 0 NOT NULL,
+ forum_topics INTEGER DEFAULT 0 NOT NULL,
+ forum_topics_real INTEGER DEFAULT 0 NOT NULL,
+ forum_last_post_id INTEGER DEFAULT 0 NOT NULL,
+ forum_last_poster_id INTEGER DEFAULT 0 NOT NULL,
+ forum_last_post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ forum_last_post_time INTEGER DEFAULT 0 NOT NULL,
+ forum_last_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ forum_last_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ forum_flags INTEGER DEFAULT 32 NOT NULL,
+ forum_options INTEGER DEFAULT 0 NOT NULL,
+ display_subforum_list INTEGER DEFAULT 1 NOT NULL,
+ display_on_index INTEGER DEFAULT 1 NOT NULL,
+ enable_indexing INTEGER DEFAULT 1 NOT NULL,
+ enable_icons INTEGER DEFAULT 1 NOT NULL,
+ enable_prune INTEGER DEFAULT 0 NOT NULL,
+ prune_next INTEGER DEFAULT 0 NOT NULL,
+ prune_days INTEGER DEFAULT 0 NOT NULL,
+ prune_viewed INTEGER DEFAULT 0 NOT NULL,
+ prune_freq INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_forums ADD PRIMARY KEY (forum_id);;
+
+CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums(left_id, right_id);;
+CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums(forum_last_post_id);;
+
+CREATE GENERATOR phpbb_forums_gen;;
+SET GENERATOR phpbb_forums_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_forums FOR phpbb_forums
+BEFORE INSERT
+AS
+BEGIN
+ NEW.forum_id = GEN_ID(phpbb_forums_gen, 1);
+END;;
+
+
+# Table: 'phpbb_forums_access'
+CREATE TABLE phpbb_forums_access (
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_forums_access ADD PRIMARY KEY (forum_id, user_id, session_id);;
+
+
+# Table: 'phpbb_forums_track'
+CREATE TABLE phpbb_forums_track (
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ mark_time INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_forums_track ADD PRIMARY KEY (user_id, forum_id);;
+
+
+# Table: 'phpbb_forums_watch'
+CREATE TABLE phpbb_forums_watch (
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ notify_status INTEGER DEFAULT 0 NOT NULL
+);;
+
+CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch(forum_id);;
+CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch(user_id);;
+CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch(notify_status);;
+
+# Table: 'phpbb_groups'
+CREATE TABLE phpbb_groups (
+ group_id INTEGER NOT NULL,
+ group_type INTEGER DEFAULT 1 NOT NULL,
+ group_founder_manage INTEGER DEFAULT 0 NOT NULL,
+ group_skip_auth INTEGER DEFAULT 0 NOT NULL,
+ group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ group_desc BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ group_desc_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ group_desc_options INTEGER DEFAULT 7 NOT NULL,
+ group_desc_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ group_display INTEGER DEFAULT 0 NOT NULL,
+ group_avatar VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ group_avatar_type INTEGER DEFAULT 0 NOT NULL,
+ group_avatar_width INTEGER DEFAULT 0 NOT NULL,
+ group_avatar_height INTEGER DEFAULT 0 NOT NULL,
+ group_rank INTEGER DEFAULT 0 NOT NULL,
+ group_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ group_sig_chars INTEGER DEFAULT 0 NOT NULL,
+ group_receive_pm INTEGER DEFAULT 0 NOT NULL,
+ group_message_limit INTEGER DEFAULT 0 NOT NULL,
+ group_max_recipients INTEGER DEFAULT 0 NOT NULL,
+ group_legend INTEGER DEFAULT 1 NOT NULL
+);;
+
+ALTER TABLE phpbb_groups ADD PRIMARY KEY (group_id);;
+
+CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups(group_legend, group_name);;
+
+CREATE GENERATOR phpbb_groups_gen;;
+SET GENERATOR phpbb_groups_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_groups FOR phpbb_groups
+BEFORE INSERT
+AS
+BEGIN
+ NEW.group_id = GEN_ID(phpbb_groups_gen, 1);
+END;;
+
+
+# Table: 'phpbb_icons'
+CREATE TABLE phpbb_icons (
+ icons_id INTEGER NOT NULL,
+ icons_url VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ icons_width INTEGER DEFAULT 0 NOT NULL,
+ icons_height INTEGER DEFAULT 0 NOT NULL,
+ icons_order INTEGER DEFAULT 0 NOT NULL,
+ display_on_posting INTEGER DEFAULT 1 NOT NULL
+);;
+
+ALTER TABLE phpbb_icons ADD PRIMARY KEY (icons_id);;
+
+CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons(display_on_posting);;
+
+CREATE GENERATOR phpbb_icons_gen;;
+SET GENERATOR phpbb_icons_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_icons FOR phpbb_icons
+BEFORE INSERT
+AS
+BEGIN
+ NEW.icons_id = GEN_ID(phpbb_icons_gen, 1);
+END;;
+
+
+# Table: 'phpbb_lang'
+CREATE TABLE phpbb_lang (
+ lang_id INTEGER NOT NULL,
+ lang_iso VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ lang_dir VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ lang_english_name VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ lang_local_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ lang_author VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
+);;
+
+ALTER TABLE phpbb_lang ADD PRIMARY KEY (lang_id);;
+
+CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang(lang_iso);;
+
+CREATE GENERATOR phpbb_lang_gen;;
+SET GENERATOR phpbb_lang_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_lang FOR phpbb_lang
+BEFORE INSERT
+AS
+BEGIN
+ NEW.lang_id = GEN_ID(phpbb_lang_gen, 1);
+END;;
+
+
+# Table: 'phpbb_log'
+CREATE TABLE phpbb_log (
+ log_id INTEGER NOT NULL,
+ log_type INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ reportee_id INTEGER DEFAULT 0 NOT NULL,
+ log_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ log_time INTEGER DEFAULT 0 NOT NULL,
+ log_operation BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ log_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_log ADD PRIMARY KEY (log_id);;
+
+CREATE INDEX phpbb_log_log_type ON phpbb_log(log_type);;
+CREATE INDEX phpbb_log_log_time ON phpbb_log(log_time);;
+CREATE INDEX phpbb_log_forum_id ON phpbb_log(forum_id);;
+CREATE INDEX phpbb_log_topic_id ON phpbb_log(topic_id);;
+CREATE INDEX phpbb_log_reportee_id ON phpbb_log(reportee_id);;
+CREATE INDEX phpbb_log_user_id ON phpbb_log(user_id);;
+
+CREATE GENERATOR phpbb_log_gen;;
+SET GENERATOR phpbb_log_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_log FOR phpbb_log
+BEFORE INSERT
+AS
+BEGIN
+ NEW.log_id = GEN_ID(phpbb_log_gen, 1);
+END;;
+
+
+# Table: 'phpbb_moderator_cache'
+CREATE TABLE phpbb_moderator_cache (
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ group_id INTEGER DEFAULT 0 NOT NULL,
+ group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ display_on_index INTEGER DEFAULT 1 NOT NULL
+);;
+
+CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache(display_on_index);;
+CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache(forum_id);;
+
+# Table: 'phpbb_modules'
+CREATE TABLE phpbb_modules (
+ module_id INTEGER NOT NULL,
+ module_enabled INTEGER DEFAULT 1 NOT NULL,
+ module_display INTEGER DEFAULT 1 NOT NULL,
+ module_basename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ module_class VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ parent_id INTEGER DEFAULT 0 NOT NULL,
+ left_id INTEGER DEFAULT 0 NOT NULL,
+ right_id INTEGER DEFAULT 0 NOT NULL,
+ module_langname VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ module_mode VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ module_auth VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_modules ADD PRIMARY KEY (module_id);;
+
+CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules(left_id, right_id);;
+CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules(module_enabled);;
+CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules(module_class, left_id);;
+
+CREATE GENERATOR phpbb_modules_gen;;
+SET GENERATOR phpbb_modules_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_modules FOR phpbb_modules
+BEFORE INSERT
+AS
+BEGIN
+ NEW.module_id = GEN_ID(phpbb_modules_gen, 1);
+END;;
+
+
+# Table: 'phpbb_poll_options'
+CREATE TABLE phpbb_poll_options (
+ poll_option_id INTEGER DEFAULT 0 NOT NULL,
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ poll_option_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ poll_option_total INTEGER DEFAULT 0 NOT NULL
+);;
+
+CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options(poll_option_id);;
+CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options(topic_id);;
+
+# Table: 'phpbb_poll_votes'
+CREATE TABLE phpbb_poll_votes (
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ poll_option_id INTEGER DEFAULT 0 NOT NULL,
+ vote_user_id INTEGER DEFAULT 0 NOT NULL,
+ vote_user_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes(topic_id);;
+CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes(vote_user_id);;
+CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes(vote_user_ip);;
+
+# Table: 'phpbb_posts'
+CREATE TABLE phpbb_posts (
+ post_id INTEGER NOT NULL,
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ poster_id INTEGER DEFAULT 0 NOT NULL,
+ icon_id INTEGER DEFAULT 0 NOT NULL,
+ poster_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ post_time INTEGER DEFAULT 0 NOT NULL,
+ post_approved INTEGER DEFAULT 1 NOT NULL,
+ post_reported INTEGER DEFAULT 0 NOT NULL,
+ enable_bbcode INTEGER DEFAULT 1 NOT NULL,
+ enable_smilies INTEGER DEFAULT 1 NOT NULL,
+ enable_magic_url INTEGER DEFAULT 1 NOT NULL,
+ enable_sig INTEGER DEFAULT 1 NOT NULL,
+ post_username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ post_checksum VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ post_attachment INTEGER DEFAULT 0 NOT NULL,
+ bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ post_postcount INTEGER DEFAULT 1 NOT NULL,
+ post_edit_time INTEGER DEFAULT 0 NOT NULL,
+ post_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ post_edit_user INTEGER DEFAULT 0 NOT NULL,
+ post_edit_count INTEGER DEFAULT 0 NOT NULL,
+ post_edit_locked INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_posts ADD PRIMARY KEY (post_id);;
+
+CREATE INDEX phpbb_posts_forum_id ON phpbb_posts(forum_id);;
+CREATE INDEX phpbb_posts_topic_id ON phpbb_posts(topic_id);;
+CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts(poster_ip);;
+CREATE INDEX phpbb_posts_poster_id ON phpbb_posts(poster_id);;
+CREATE INDEX phpbb_posts_post_approved ON phpbb_posts(post_approved);;
+CREATE INDEX phpbb_posts_post_username ON phpbb_posts(post_username);;
+CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts(topic_id, post_time);;
+
+CREATE GENERATOR phpbb_posts_gen;;
+SET GENERATOR phpbb_posts_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_posts FOR phpbb_posts
+BEFORE INSERT
+AS
+BEGIN
+ NEW.post_id = GEN_ID(phpbb_posts_gen, 1);
+END;;
+
+
+# Table: 'phpbb_privmsgs'
+CREATE TABLE phpbb_privmsgs (
+ msg_id INTEGER NOT NULL,
+ root_level INTEGER DEFAULT 0 NOT NULL,
+ author_id INTEGER DEFAULT 0 NOT NULL,
+ icon_id INTEGER DEFAULT 0 NOT NULL,
+ author_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ message_time INTEGER DEFAULT 0 NOT NULL,
+ enable_bbcode INTEGER DEFAULT 1 NOT NULL,
+ enable_smilies INTEGER DEFAULT 1 NOT NULL,
+ enable_magic_url INTEGER DEFAULT 1 NOT NULL,
+ enable_sig INTEGER DEFAULT 1 NOT NULL,
+ message_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ message_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ message_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ message_edit_user INTEGER DEFAULT 0 NOT NULL,
+ message_attachment INTEGER DEFAULT 0 NOT NULL,
+ bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ message_edit_time INTEGER DEFAULT 0 NOT NULL,
+ message_edit_count INTEGER DEFAULT 0 NOT NULL,
+ to_address BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ bcc_address BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ message_reported INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_privmsgs ADD PRIMARY KEY (msg_id);;
+
+CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs(author_ip);;
+CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs(message_time);;
+CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs(author_id);;
+CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs(root_level);;
+
+CREATE GENERATOR phpbb_privmsgs_gen;;
+SET GENERATOR phpbb_privmsgs_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_privmsgs FOR phpbb_privmsgs
+BEFORE INSERT
+AS
+BEGIN
+ NEW.msg_id = GEN_ID(phpbb_privmsgs_gen, 1);
+END;;
+
+
+# Table: 'phpbb_privmsgs_folder'
+CREATE TABLE phpbb_privmsgs_folder (
+ folder_id INTEGER NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ folder_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ pm_count INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_privmsgs_folder ADD PRIMARY KEY (folder_id);;
+
+CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder(user_id);;
+
+CREATE GENERATOR phpbb_privmsgs_folder_gen;;
+SET GENERATOR phpbb_privmsgs_folder_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_privmsgs_folder FOR phpbb_privmsgs_folder
+BEFORE INSERT
+AS
+BEGIN
+ NEW.folder_id = GEN_ID(phpbb_privmsgs_folder_gen, 1);
+END;;
+
+
+# Table: 'phpbb_privmsgs_rules'
+CREATE TABLE phpbb_privmsgs_rules (
+ rule_id INTEGER NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ rule_check INTEGER DEFAULT 0 NOT NULL,
+ rule_connection INTEGER DEFAULT 0 NOT NULL,
+ rule_string VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ rule_user_id INTEGER DEFAULT 0 NOT NULL,
+ rule_group_id INTEGER DEFAULT 0 NOT NULL,
+ rule_action INTEGER DEFAULT 0 NOT NULL,
+ rule_folder_id INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_privmsgs_rules ADD PRIMARY KEY (rule_id);;
+
+CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules(user_id);;
+
+CREATE GENERATOR phpbb_privmsgs_rules_gen;;
+SET GENERATOR phpbb_privmsgs_rules_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_privmsgs_rules FOR phpbb_privmsgs_rules
+BEFORE INSERT
+AS
+BEGIN
+ NEW.rule_id = GEN_ID(phpbb_privmsgs_rules_gen, 1);
+END;;
+
+
+# Table: 'phpbb_privmsgs_to'
+CREATE TABLE phpbb_privmsgs_to (
+ msg_id INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ author_id INTEGER DEFAULT 0 NOT NULL,
+ pm_deleted INTEGER DEFAULT 0 NOT NULL,
+ pm_new INTEGER DEFAULT 1 NOT NULL,
+ pm_unread INTEGER DEFAULT 1 NOT NULL,
+ pm_replied INTEGER DEFAULT 0 NOT NULL,
+ pm_marked INTEGER DEFAULT 0 NOT NULL,
+ pm_forwarded INTEGER DEFAULT 0 NOT NULL,
+ folder_id INTEGER DEFAULT 0 NOT NULL
+);;
+
+CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to(msg_id);;
+CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to(author_id);;
+CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to(user_id, folder_id);;
+
+# Table: 'phpbb_profile_fields'
+CREATE TABLE phpbb_profile_fields (
+ field_id INTEGER NOT NULL,
+ field_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ field_type INTEGER DEFAULT 0 NOT NULL,
+ field_ident VARCHAR(20) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ field_length VARCHAR(20) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ field_minlen VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ field_maxlen VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ field_novalue VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ field_default_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ field_validation VARCHAR(20) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ field_required INTEGER DEFAULT 0 NOT NULL,
+ field_show_on_reg INTEGER DEFAULT 0 NOT NULL,
+ field_show_on_vt INTEGER DEFAULT 0 NOT NULL,
+ field_show_profile INTEGER DEFAULT 0 NOT NULL,
+ field_hide INTEGER DEFAULT 0 NOT NULL,
+ field_no_view INTEGER DEFAULT 0 NOT NULL,
+ field_active INTEGER DEFAULT 0 NOT NULL,
+ field_order INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_profile_fields ADD PRIMARY KEY (field_id);;
+
+CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields(field_type);;
+CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields(field_order);;
+
+CREATE GENERATOR phpbb_profile_fields_gen;;
+SET GENERATOR phpbb_profile_fields_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_profile_fields FOR phpbb_profile_fields
+BEFORE INSERT
+AS
+BEGIN
+ NEW.field_id = GEN_ID(phpbb_profile_fields_gen, 1);
+END;;
+
+
+# Table: 'phpbb_profile_fields_data'
+CREATE TABLE phpbb_profile_fields_data (
+ user_id INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_profile_fields_data ADD PRIMARY KEY (user_id);;
+
+
+# Table: 'phpbb_profile_fields_lang'
+CREATE TABLE phpbb_profile_fields_lang (
+ field_id INTEGER DEFAULT 0 NOT NULL,
+ lang_id INTEGER DEFAULT 0 NOT NULL,
+ option_id INTEGER DEFAULT 0 NOT NULL,
+ field_type INTEGER DEFAULT 0 NOT NULL,
+ lang_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
+);;
+
+ALTER TABLE phpbb_profile_fields_lang ADD PRIMARY KEY (field_id, lang_id, option_id);;
+
+
+# Table: 'phpbb_profile_lang'
+CREATE TABLE phpbb_profile_lang (
+ field_id INTEGER DEFAULT 0 NOT NULL,
+ lang_id INTEGER DEFAULT 0 NOT NULL,
+ lang_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ lang_explain BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ lang_default_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
+);;
+
+ALTER TABLE phpbb_profile_lang ADD PRIMARY KEY (field_id, lang_id);;
+
+
+# Table: 'phpbb_ranks'
+CREATE TABLE phpbb_ranks (
+ rank_id INTEGER NOT NULL,
+ rank_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ rank_min INTEGER DEFAULT 0 NOT NULL,
+ rank_special INTEGER DEFAULT 0 NOT NULL,
+ rank_image VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_ranks ADD PRIMARY KEY (rank_id);;
+
+
+CREATE GENERATOR phpbb_ranks_gen;;
+SET GENERATOR phpbb_ranks_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_ranks FOR phpbb_ranks
+BEFORE INSERT
+AS
+BEGIN
+ NEW.rank_id = GEN_ID(phpbb_ranks_gen, 1);
+END;;
+
+
+# Table: 'phpbb_reports'
+CREATE TABLE phpbb_reports (
+ report_id INTEGER NOT NULL,
+ reason_id INTEGER DEFAULT 0 NOT NULL,
+ post_id INTEGER DEFAULT 0 NOT NULL,
+ pm_id INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ user_notify INTEGER DEFAULT 0 NOT NULL,
+ report_closed INTEGER DEFAULT 0 NOT NULL,
+ report_time INTEGER DEFAULT 0 NOT NULL,
+ report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_reports ADD PRIMARY KEY (report_id);;
+
+CREATE INDEX phpbb_reports_post_id ON phpbb_reports(post_id);;
+CREATE INDEX phpbb_reports_pm_id ON phpbb_reports(pm_id);;
+
+CREATE GENERATOR phpbb_reports_gen;;
+SET GENERATOR phpbb_reports_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_reports FOR phpbb_reports
+BEFORE INSERT
+AS
+BEGIN
+ NEW.report_id = GEN_ID(phpbb_reports_gen, 1);
+END;;
+
+
+# Table: 'phpbb_reports_reasons'
+CREATE TABLE phpbb_reports_reasons (
+ reason_id INTEGER NOT NULL,
+ reason_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ reason_description BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ reason_order INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_reports_reasons ADD PRIMARY KEY (reason_id);;
+
+
+CREATE GENERATOR phpbb_reports_reasons_gen;;
+SET GENERATOR phpbb_reports_reasons_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_reports_reasons FOR phpbb_reports_reasons
+BEFORE INSERT
+AS
+BEGIN
+ NEW.reason_id = GEN_ID(phpbb_reports_reasons_gen, 1);
+END;;
+
+
+# Table: 'phpbb_search_results'
+CREATE TABLE phpbb_search_results (
+ search_key VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ search_time INTEGER DEFAULT 0 NOT NULL,
+ search_keywords BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ search_authors BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_search_results ADD PRIMARY KEY (search_key);;
+
+
+# Table: 'phpbb_search_wordlist'
+CREATE TABLE phpbb_search_wordlist (
+ word_id INTEGER NOT NULL,
+ word_text VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ word_common INTEGER DEFAULT 0 NOT NULL,
+ word_count INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_search_wordlist ADD PRIMARY KEY (word_id);;
+
+CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist(word_text);;
+CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist(word_count);;
+
+CREATE GENERATOR phpbb_search_wordlist_gen;;
+SET GENERATOR phpbb_search_wordlist_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_search_wordlist FOR phpbb_search_wordlist
+BEFORE INSERT
+AS
+BEGIN
+ NEW.word_id = GEN_ID(phpbb_search_wordlist_gen, 1);
+END;;
+
+
+# Table: 'phpbb_search_wordmatch'
+CREATE TABLE phpbb_search_wordmatch (
+ post_id INTEGER DEFAULT 0 NOT NULL,
+ word_id INTEGER DEFAULT 0 NOT NULL,
+ title_match INTEGER DEFAULT 0 NOT NULL
+);;
+
+CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch(word_id, post_id, title_match);;
+CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch(word_id);;
+CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch(post_id);;
+
+# Table: 'phpbb_sessions'
+CREATE TABLE phpbb_sessions (
+ session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ session_user_id INTEGER DEFAULT 0 NOT NULL,
+ session_forum_id INTEGER DEFAULT 0 NOT NULL,
+ session_last_visit INTEGER DEFAULT 0 NOT NULL,
+ session_start INTEGER DEFAULT 0 NOT NULL,
+ session_time INTEGER DEFAULT 0 NOT NULL,
+ session_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ session_browser VARCHAR(150) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ session_forwarded_for VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ session_page VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ session_viewonline INTEGER DEFAULT 1 NOT NULL,
+ session_autologin INTEGER DEFAULT 0 NOT NULL,
+ session_admin INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_sessions ADD PRIMARY KEY (session_id);;
+
+CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions(session_time);;
+CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions(session_user_id);;
+CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions(session_forum_id);;
+
+# Table: 'phpbb_sessions_keys'
+CREATE TABLE phpbb_sessions_keys (
+ key_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ last_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ last_login INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_sessions_keys ADD PRIMARY KEY (key_id, user_id);;
+
+CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys(last_login);;
+
+# Table: 'phpbb_sitelist'
+CREATE TABLE phpbb_sitelist (
+ site_id INTEGER NOT NULL,
+ site_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ site_hostname VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ ip_exclude INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_sitelist ADD PRIMARY KEY (site_id);;
+
+
+CREATE GENERATOR phpbb_sitelist_gen;;
+SET GENERATOR phpbb_sitelist_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_sitelist FOR phpbb_sitelist
+BEFORE INSERT
+AS
+BEGIN
+ NEW.site_id = GEN_ID(phpbb_sitelist_gen, 1);
+END;;
+
+
+# Table: 'phpbb_smilies'
+CREATE TABLE phpbb_smilies (
+ smiley_id INTEGER NOT NULL,
+ code VARCHAR(50) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ emotion VARCHAR(50) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ smiley_url VARCHAR(50) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ smiley_width INTEGER DEFAULT 0 NOT NULL,
+ smiley_height INTEGER DEFAULT 0 NOT NULL,
+ smiley_order INTEGER DEFAULT 0 NOT NULL,
+ display_on_posting INTEGER DEFAULT 1 NOT NULL
+);;
+
+ALTER TABLE phpbb_smilies ADD PRIMARY KEY (smiley_id);;
+
+CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies(display_on_posting);;
+
+CREATE GENERATOR phpbb_smilies_gen;;
+SET GENERATOR phpbb_smilies_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_smilies FOR phpbb_smilies
+BEFORE INSERT
+AS
+BEGIN
+ NEW.smiley_id = GEN_ID(phpbb_smilies_gen, 1);
+END;;
+
+
+# Table: 'phpbb_styles'
+CREATE TABLE phpbb_styles (
+ style_id INTEGER NOT NULL,
+ style_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ style_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ style_active INTEGER DEFAULT 1 NOT NULL,
+ template_id INTEGER DEFAULT 0 NOT NULL,
+ theme_id INTEGER DEFAULT 0 NOT NULL,
+ imageset_id INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_styles ADD PRIMARY KEY (style_id);;
+
+CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles(style_name);;
+CREATE INDEX phpbb_styles_template_id ON phpbb_styles(template_id);;
+CREATE INDEX phpbb_styles_theme_id ON phpbb_styles(theme_id);;
+CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles(imageset_id);;
+
+CREATE GENERATOR phpbb_styles_gen;;
+SET GENERATOR phpbb_styles_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_styles FOR phpbb_styles
+BEFORE INSERT
+AS
+BEGIN
+ NEW.style_id = GEN_ID(phpbb_styles_gen, 1);
+END;;
+
+
+# Table: 'phpbb_styles_template'
+CREATE TABLE phpbb_styles_template (
+ template_id INTEGER NOT NULL,
+ template_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ template_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ template_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT 'kNg=' NOT NULL,
+ template_storedb INTEGER DEFAULT 0 NOT NULL,
+ template_inherits_id INTEGER DEFAULT 0 NOT NULL,
+ template_inherit_path VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_styles_template ADD PRIMARY KEY (template_id);;
+
+CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template(template_name);;
+
+CREATE GENERATOR phpbb_styles_template_gen;;
+SET GENERATOR phpbb_styles_template_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_styles_template FOR phpbb_styles_template
+BEFORE INSERT
+AS
+BEGIN
+ NEW.template_id = GEN_ID(phpbb_styles_template_gen, 1);
+END;;
+
+
+# Table: 'phpbb_styles_template_data'
+CREATE TABLE phpbb_styles_template_data (
+ template_id INTEGER DEFAULT 0 NOT NULL,
+ template_filename VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ template_included BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
+ template_mtime INTEGER DEFAULT 0 NOT NULL,
+ template_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
+);;
+
+CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data(template_id);;
+CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data(template_filename);;
+
+# Table: 'phpbb_styles_theme'
+CREATE TABLE phpbb_styles_theme (
+ theme_id INTEGER NOT NULL,
+ theme_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ theme_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ theme_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ theme_storedb INTEGER DEFAULT 0 NOT NULL,
+ theme_mtime INTEGER DEFAULT 0 NOT NULL,
+ theme_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_styles_theme ADD PRIMARY KEY (theme_id);;
+
+CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme(theme_name);;
+
+CREATE GENERATOR phpbb_styles_theme_gen;;
+SET GENERATOR phpbb_styles_theme_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_styles_theme FOR phpbb_styles_theme
+BEFORE INSERT
+AS
+BEGIN
+ NEW.theme_id = GEN_ID(phpbb_styles_theme_gen, 1);
+END;;
+
+
+# Table: 'phpbb_styles_imageset'
+CREATE TABLE phpbb_styles_imageset (
+ imageset_id INTEGER NOT NULL,
+ imageset_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ imageset_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ imageset_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_styles_imageset ADD PRIMARY KEY (imageset_id);;
+
+CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset(imageset_name);;
+
+CREATE GENERATOR phpbb_styles_imageset_gen;;
+SET GENERATOR phpbb_styles_imageset_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_styles_imageset FOR phpbb_styles_imageset
+BEFORE INSERT
+AS
+BEGIN
+ NEW.imageset_id = GEN_ID(phpbb_styles_imageset_gen, 1);
+END;;
+
+
+# Table: 'phpbb_styles_imageset_data'
+CREATE TABLE phpbb_styles_imageset_data (
+ image_id INTEGER NOT NULL,
+ image_name VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ image_filename VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ image_lang VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ image_height INTEGER DEFAULT 0 NOT NULL,
+ image_width INTEGER DEFAULT 0 NOT NULL,
+ imageset_id INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_styles_imageset_data ADD PRIMARY KEY (image_id);;
+
+CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data(imageset_id);;
+
+CREATE GENERATOR phpbb_styles_imageset_data_gen;;
+SET GENERATOR phpbb_styles_imageset_data_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_styles_imageset_data FOR phpbb_styles_imageset_data
+BEFORE INSERT
+AS
+BEGIN
+ NEW.image_id = GEN_ID(phpbb_styles_imageset_data_gen, 1);
+END;;
+
+
+# Table: 'phpbb_topics'
+CREATE TABLE phpbb_topics (
+ topic_id INTEGER NOT NULL,
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ icon_id INTEGER DEFAULT 0 NOT NULL,
+ topic_attachment INTEGER DEFAULT 0 NOT NULL,
+ topic_approved INTEGER DEFAULT 1 NOT NULL,
+ topic_reported INTEGER DEFAULT 0 NOT NULL,
+ topic_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ topic_poster INTEGER DEFAULT 0 NOT NULL,
+ topic_time INTEGER DEFAULT 0 NOT NULL,
+ topic_time_limit INTEGER DEFAULT 0 NOT NULL,
+ topic_views INTEGER DEFAULT 0 NOT NULL,
+ topic_replies INTEGER DEFAULT 0 NOT NULL,
+ topic_replies_real INTEGER DEFAULT 0 NOT NULL,
+ topic_status INTEGER DEFAULT 0 NOT NULL,
+ topic_type INTEGER DEFAULT 0 NOT NULL,
+ topic_first_post_id INTEGER DEFAULT 0 NOT NULL,
+ topic_first_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ topic_first_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ topic_last_post_id INTEGER DEFAULT 0 NOT NULL,
+ topic_last_poster_id INTEGER DEFAULT 0 NOT NULL,
+ topic_last_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ topic_last_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ topic_last_post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ topic_last_post_time INTEGER DEFAULT 0 NOT NULL,
+ topic_last_view_time INTEGER DEFAULT 0 NOT NULL,
+ topic_moved_id INTEGER DEFAULT 0 NOT NULL,
+ topic_bumped INTEGER DEFAULT 0 NOT NULL,
+ topic_bumper INTEGER DEFAULT 0 NOT NULL,
+ poll_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ poll_start INTEGER DEFAULT 0 NOT NULL,
+ poll_length INTEGER DEFAULT 0 NOT NULL,
+ poll_max_options INTEGER DEFAULT 1 NOT NULL,
+ poll_last_vote INTEGER DEFAULT 0 NOT NULL,
+ poll_vote_change INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_topics ADD PRIMARY KEY (topic_id);;
+
+CREATE INDEX phpbb_topics_forum_id ON phpbb_topics(forum_id);;
+CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics(forum_id, topic_type);;
+CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics(topic_last_post_time);;
+CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics(topic_approved);;
+CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics(forum_id, topic_approved, topic_last_post_id);;
+CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics(forum_id, topic_last_post_time, topic_moved_id);;
+
+CREATE GENERATOR phpbb_topics_gen;;
+SET GENERATOR phpbb_topics_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_topics FOR phpbb_topics
+BEFORE INSERT
+AS
+BEGIN
+ NEW.topic_id = GEN_ID(phpbb_topics_gen, 1);
+END;;
+
+
+# Table: 'phpbb_topics_track'
+CREATE TABLE phpbb_topics_track (
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ mark_time INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_topics_track ADD PRIMARY KEY (user_id, topic_id);;
+
+CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track(forum_id);;
+
+# Table: 'phpbb_topics_posted'
+CREATE TABLE phpbb_topics_posted (
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ topic_posted INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_topics_posted ADD PRIMARY KEY (user_id, topic_id);;
+
+
+# Table: 'phpbb_topics_watch'
+CREATE TABLE phpbb_topics_watch (
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ notify_status INTEGER DEFAULT 0 NOT NULL
+);;
+
+CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch(topic_id);;
+CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch(user_id);;
+CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch(notify_status);;
+
+# Table: 'phpbb_user_group'
+CREATE TABLE phpbb_user_group (
+ group_id INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ group_leader INTEGER DEFAULT 0 NOT NULL,
+ user_pending INTEGER DEFAULT 1 NOT NULL
+);;
+
+CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group(group_id);;
+CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group(user_id);;
+CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group(group_leader);;
+
+# Table: 'phpbb_users'
+CREATE TABLE phpbb_users (
+ user_id INTEGER NOT NULL,
+ user_type INTEGER DEFAULT 0 NOT NULL,
+ group_id INTEGER DEFAULT 3 NOT NULL,
+ user_permissions BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_perm_from INTEGER DEFAULT 0 NOT NULL,
+ user_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_regdate INTEGER DEFAULT 0 NOT NULL,
+ username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_password VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_passchg INTEGER DEFAULT 0 NOT NULL,
+ user_pass_convert INTEGER DEFAULT 0 NOT NULL,
+ user_email VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_email_hash DOUBLE PRECISION DEFAULT 0 NOT NULL,
+ user_birthday VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_lastvisit INTEGER DEFAULT 0 NOT NULL,
+ user_lastmark INTEGER DEFAULT 0 NOT NULL,
+ user_lastpost_time INTEGER DEFAULT 0 NOT NULL,
+ user_lastpage VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_last_confirm_key VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_last_search INTEGER DEFAULT 0 NOT NULL,
+ user_warnings INTEGER DEFAULT 0 NOT NULL,
+ user_last_warning INTEGER DEFAULT 0 NOT NULL,
+ user_login_attempts INTEGER DEFAULT 0 NOT NULL,
+ user_inactive_reason INTEGER DEFAULT 0 NOT NULL,
+ user_inactive_time INTEGER DEFAULT 0 NOT NULL,
+ user_posts INTEGER DEFAULT 0 NOT NULL,
+ user_lang VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_timezone DOUBLE PRECISION DEFAULT 0 NOT NULL,
+ user_dst INTEGER DEFAULT 0 NOT NULL,
+ user_dateformat VARCHAR(30) CHARACTER SET UTF8 DEFAULT 'd M Y H:i' NOT NULL COLLATE UNICODE,
+ user_style INTEGER DEFAULT 0 NOT NULL,
+ user_rank INTEGER DEFAULT 0 NOT NULL,
+ user_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_new_privmsg INTEGER DEFAULT 0 NOT NULL,
+ user_unread_privmsg INTEGER DEFAULT 0 NOT NULL,
+ user_last_privmsg INTEGER DEFAULT 0 NOT NULL,
+ user_message_rules INTEGER DEFAULT 0 NOT NULL,
+ user_full_folder INTEGER DEFAULT -3 NOT NULL,
+ user_emailtime INTEGER DEFAULT 0 NOT NULL,
+ user_topic_show_days INTEGER DEFAULT 0 NOT NULL,
+ user_topic_sortby_type VARCHAR(1) CHARACTER SET NONE DEFAULT 't' NOT NULL,
+ user_topic_sortby_dir VARCHAR(1) CHARACTER SET NONE DEFAULT 'd' NOT NULL,
+ user_post_show_days INTEGER DEFAULT 0 NOT NULL,
+ user_post_sortby_type VARCHAR(1) CHARACTER SET NONE DEFAULT 't' NOT NULL,
+ user_post_sortby_dir VARCHAR(1) CHARACTER SET NONE DEFAULT 'a' NOT NULL,
+ user_notify INTEGER DEFAULT 0 NOT NULL,
+ user_notify_pm INTEGER DEFAULT 1 NOT NULL,
+ user_notify_type INTEGER DEFAULT 0 NOT NULL,
+ user_allow_pm INTEGER DEFAULT 1 NOT NULL,
+ user_allow_viewonline INTEGER DEFAULT 1 NOT NULL,
+ user_allow_viewemail INTEGER DEFAULT 1 NOT NULL,
+ user_allow_massemail INTEGER DEFAULT 1 NOT NULL,
+ user_options INTEGER DEFAULT 230271 NOT NULL,
+ user_avatar VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_avatar_type INTEGER DEFAULT 0 NOT NULL,
+ user_avatar_width INTEGER DEFAULT 0 NOT NULL,
+ user_avatar_height INTEGER DEFAULT 0 NOT NULL,
+ user_sig BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ user_sig_bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_sig_bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_from VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_icq VARCHAR(15) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_aim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_yim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_msnm VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_jabber VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_website VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_occ BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ user_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ user_actkey VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_newpasswd VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_form_salt VARCHAR(32) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_new INTEGER DEFAULT 1 NOT NULL,
+ user_reminded INTEGER DEFAULT 0 NOT NULL,
+ user_reminded_time INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_users ADD PRIMARY KEY (user_id);;
+
+CREATE INDEX phpbb_users_user_birthday ON phpbb_users(user_birthday);;
+CREATE INDEX phpbb_users_user_email_hash ON phpbb_users(user_email_hash);;
+CREATE INDEX phpbb_users_user_type ON phpbb_users(user_type);;
+CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users(username_clean);;
+
+CREATE GENERATOR phpbb_users_gen;;
+SET GENERATOR phpbb_users_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_users FOR phpbb_users
+BEFORE INSERT
+AS
+BEGIN
+ NEW.user_id = GEN_ID(phpbb_users_gen, 1);
+END;;
+
+
+# Table: 'phpbb_warnings'
+CREATE TABLE phpbb_warnings (
+ warning_id INTEGER NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ post_id INTEGER DEFAULT 0 NOT NULL,
+ log_id INTEGER DEFAULT 0 NOT NULL,
+ warning_time INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_warnings ADD PRIMARY KEY (warning_id);;
+
+
+CREATE GENERATOR phpbb_warnings_gen;;
+SET GENERATOR phpbb_warnings_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_warnings FOR phpbb_warnings
+BEFORE INSERT
+AS
+BEGIN
+ NEW.warning_id = GEN_ID(phpbb_warnings_gen, 1);
+END;;
+
+
+# Table: 'phpbb_words'
+CREATE TABLE phpbb_words (
+ word_id INTEGER NOT NULL,
+ word VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ replacement VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
+);;
+
+ALTER TABLE phpbb_words ADD PRIMARY KEY (word_id);;
+
+
+CREATE GENERATOR phpbb_words_gen;;
+SET GENERATOR phpbb_words_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_words FOR phpbb_words
+BEFORE INSERT
+AS
+BEGIN
+ NEW.word_id = GEN_ID(phpbb_words_gen, 1);
+END;;
+
+
+# Table: 'phpbb_zebra'
+CREATE TABLE phpbb_zebra (
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ zebra_id INTEGER DEFAULT 0 NOT NULL,
+ friend INTEGER DEFAULT 0 NOT NULL,
+ foe INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_zebra ADD PRIMARY KEY (user_id, zebra_id);;
+
+
diff --git a/phpBB/install/schemas/index.htm b/phpBB/install/schemas/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/install/schemas/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
new file mode 100644
index 0000000000..ac7c0928cd
--- /dev/null
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -0,0 +1,1740 @@
+/*
+
+ $Id$
+
+*/
+
+BEGIN TRANSACTION
+GO
+
+/*
+ Table: 'phpbb_attachments'
+*/
+CREATE TABLE [phpbb_attachments] (
+ [attach_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [post_msg_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [in_message] [int] DEFAULT (0) NOT NULL ,
+ [poster_id] [int] DEFAULT (0) NOT NULL ,
+ [is_orphan] [int] DEFAULT (1) NOT NULL ,
+ [physical_filename] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [real_filename] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [download_count] [int] DEFAULT (0) NOT NULL ,
+ [attach_comment] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [extension] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [mimetype] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [filesize] [int] DEFAULT (0) NOT NULL ,
+ [filetime] [int] DEFAULT (0) NOT NULL ,
+ [thumbnail] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_attachments] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_attachments] PRIMARY KEY CLUSTERED
+ (
+ [attach_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [filetime] ON [phpbb_attachments]([filetime]) ON [PRIMARY]
+GO
+
+CREATE INDEX [post_msg_id] ON [phpbb_attachments]([post_msg_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [topic_id] ON [phpbb_attachments]([topic_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [poster_id] ON [phpbb_attachments]([poster_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [is_orphan] ON [phpbb_attachments]([is_orphan]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_acl_groups'
+*/
+CREATE TABLE [phpbb_acl_groups] (
+ [group_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [auth_option_id] [int] DEFAULT (0) NOT NULL ,
+ [auth_role_id] [int] DEFAULT (0) NOT NULL ,
+ [auth_setting] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [group_id] ON [phpbb_acl_groups]([group_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [auth_opt_id] ON [phpbb_acl_groups]([auth_option_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [auth_role_id] ON [phpbb_acl_groups]([auth_role_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_acl_options'
+*/
+CREATE TABLE [phpbb_acl_options] (
+ [auth_option_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [auth_option] [varchar] (50) DEFAULT ('') NOT NULL ,
+ [is_global] [int] DEFAULT (0) NOT NULL ,
+ [is_local] [int] DEFAULT (0) NOT NULL ,
+ [founder_only] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_acl_options] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_acl_options] PRIMARY KEY CLUSTERED
+ (
+ [auth_option_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE UNIQUE INDEX [auth_option] ON [phpbb_acl_options]([auth_option]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_acl_roles'
+*/
+CREATE TABLE [phpbb_acl_roles] (
+ [role_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [role_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [role_description] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [role_type] [varchar] (10) DEFAULT ('') NOT NULL ,
+ [role_order] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_acl_roles] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_acl_roles] PRIMARY KEY CLUSTERED
+ (
+ [role_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [role_type] ON [phpbb_acl_roles]([role_type]) ON [PRIMARY]
+GO
+
+CREATE INDEX [role_order] ON [phpbb_acl_roles]([role_order]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_acl_roles_data'
+*/
+CREATE TABLE [phpbb_acl_roles_data] (
+ [role_id] [int] DEFAULT (0) NOT NULL ,
+ [auth_option_id] [int] DEFAULT (0) NOT NULL ,
+ [auth_setting] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_acl_roles_data] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_acl_roles_data] PRIMARY KEY CLUSTERED
+ (
+ [role_id],
+ [auth_option_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [ath_op_id] ON [phpbb_acl_roles_data]([auth_option_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_acl_users'
+*/
+CREATE TABLE [phpbb_acl_users] (
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [auth_option_id] [int] DEFAULT (0) NOT NULL ,
+ [auth_role_id] [int] DEFAULT (0) NOT NULL ,
+ [auth_setting] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_id] ON [phpbb_acl_users]([user_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [auth_option_id] ON [phpbb_acl_users]([auth_option_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [auth_role_id] ON [phpbb_acl_users]([auth_role_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_banlist'
+*/
+CREATE TABLE [phpbb_banlist] (
+ [ban_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [ban_userid] [int] DEFAULT (0) NOT NULL ,
+ [ban_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [ban_email] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [ban_start] [int] DEFAULT (0) NOT NULL ,
+ [ban_end] [int] DEFAULT (0) NOT NULL ,
+ [ban_exclude] [int] DEFAULT (0) NOT NULL ,
+ [ban_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [ban_give_reason] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_banlist] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_banlist] PRIMARY KEY CLUSTERED
+ (
+ [ban_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [ban_end] ON [phpbb_banlist]([ban_end]) ON [PRIMARY]
+GO
+
+CREATE INDEX [ban_user] ON [phpbb_banlist]([ban_userid], [ban_exclude]) ON [PRIMARY]
+GO
+
+CREATE INDEX [ban_email] ON [phpbb_banlist]([ban_email], [ban_exclude]) ON [PRIMARY]
+GO
+
+CREATE INDEX [ban_ip] ON [phpbb_banlist]([ban_ip], [ban_exclude]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_bbcodes'
+*/
+CREATE TABLE [phpbb_bbcodes] (
+ [bbcode_id] [int] DEFAULT (0) NOT NULL ,
+ [bbcode_tag] [varchar] (16) DEFAULT ('') NOT NULL ,
+ [bbcode_helpline] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [display_on_posting] [int] DEFAULT (0) NOT NULL ,
+ [bbcode_match] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [bbcode_tpl] [text] DEFAULT ('') NOT NULL ,
+ [first_pass_match] [text] DEFAULT ('') NOT NULL ,
+ [first_pass_replace] [text] DEFAULT ('') NOT NULL ,
+ [second_pass_match] [text] DEFAULT ('') NOT NULL ,
+ [second_pass_replace] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_bbcodes] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_bbcodes] PRIMARY KEY CLUSTERED
+ (
+ [bbcode_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [display_on_post] ON [phpbb_bbcodes]([display_on_posting]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_bookmarks'
+*/
+CREATE TABLE [phpbb_bookmarks] (
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_bookmarks] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_bookmarks] PRIMARY KEY CLUSTERED
+ (
+ [topic_id],
+ [user_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_bots'
+*/
+CREATE TABLE [phpbb_bots] (
+ [bot_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [bot_active] [int] DEFAULT (1) NOT NULL ,
+ [bot_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [bot_agent] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [bot_ip] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_bots] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_bots] PRIMARY KEY CLUSTERED
+ (
+ [bot_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [bot_active] ON [phpbb_bots]([bot_active]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_config'
+*/
+CREATE TABLE [phpbb_config] (
+ [config_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [config_value] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [is_dynamic] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_config] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_config] PRIMARY KEY CLUSTERED
+ (
+ [config_name]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [is_dynamic] ON [phpbb_config]([is_dynamic]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_confirm'
+*/
+CREATE TABLE [phpbb_confirm] (
+ [confirm_id] [char] (32) DEFAULT ('') NOT NULL ,
+ [session_id] [char] (32) DEFAULT ('') NOT NULL ,
+ [confirm_type] [int] DEFAULT (0) NOT NULL ,
+ [code] [varchar] (8) DEFAULT ('') NOT NULL ,
+ [seed] [int] DEFAULT (0) NOT NULL ,
+ [attempts] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_confirm] PRIMARY KEY CLUSTERED
+ (
+ [session_id],
+ [confirm_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [confirm_type] ON [phpbb_confirm]([confirm_type]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_disallow'
+*/
+CREATE TABLE [phpbb_disallow] (
+ [disallow_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [disallow_username] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_disallow] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_disallow] PRIMARY KEY CLUSTERED
+ (
+ [disallow_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_drafts'
+*/
+CREATE TABLE [phpbb_drafts] (
+ [draft_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [save_time] [int] DEFAULT (0) NOT NULL ,
+ [draft_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [draft_message] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_drafts] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_drafts] PRIMARY KEY CLUSTERED
+ (
+ [draft_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [save_time] ON [phpbb_drafts]([save_time]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_extensions'
+*/
+CREATE TABLE [phpbb_extensions] (
+ [extension_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [group_id] [int] DEFAULT (0) NOT NULL ,
+ [extension] [varchar] (100) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_extensions] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_extensions] PRIMARY KEY CLUSTERED
+ (
+ [extension_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_extension_groups'
+*/
+CREATE TABLE [phpbb_extension_groups] (
+ [group_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [cat_id] [int] DEFAULT (0) NOT NULL ,
+ [allow_group] [int] DEFAULT (0) NOT NULL ,
+ [download_mode] [int] DEFAULT (1) NOT NULL ,
+ [upload_icon] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [max_filesize] [int] DEFAULT (0) NOT NULL ,
+ [allowed_forums] [varchar] (8000) DEFAULT ('') NOT NULL ,
+ [allow_in_pm] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_extension_groups] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_extension_groups] PRIMARY KEY CLUSTERED
+ (
+ [group_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_forums'
+*/
+CREATE TABLE [phpbb_forums] (
+ [forum_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [parent_id] [int] DEFAULT (0) NOT NULL ,
+ [left_id] [int] DEFAULT (0) NOT NULL ,
+ [right_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_parents] [text] DEFAULT ('') NOT NULL ,
+ [forum_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_desc] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [forum_desc_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_desc_options] [int] DEFAULT (7) NOT NULL ,
+ [forum_desc_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
+ [forum_link] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_password] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [forum_style] [int] DEFAULT (0) NOT NULL ,
+ [forum_image] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_rules] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [forum_rules_link] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_rules_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_rules_options] [int] DEFAULT (7) NOT NULL ,
+ [forum_rules_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
+ [forum_topics_per_page] [int] DEFAULT (0) NOT NULL ,
+ [forum_type] [int] DEFAULT (0) NOT NULL ,
+ [forum_status] [int] DEFAULT (0) NOT NULL ,
+ [forum_posts] [int] DEFAULT (0) NOT NULL ,
+ [forum_topics] [int] DEFAULT (0) NOT NULL ,
+ [forum_topics_real] [int] DEFAULT (0) NOT NULL ,
+ [forum_last_post_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_last_poster_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_last_post_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_last_post_time] [int] DEFAULT (0) NOT NULL ,
+ [forum_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
+ [forum_flags] [int] DEFAULT (32) NOT NULL ,
+ [forum_options] [int] DEFAULT (0) NOT NULL ,
+ [display_subforum_list] [int] DEFAULT (1) NOT NULL ,
+ [display_on_index] [int] DEFAULT (1) NOT NULL ,
+ [enable_indexing] [int] DEFAULT (1) NOT NULL ,
+ [enable_icons] [int] DEFAULT (1) NOT NULL ,
+ [enable_prune] [int] DEFAULT (0) NOT NULL ,
+ [prune_next] [int] DEFAULT (0) NOT NULL ,
+ [prune_days] [int] DEFAULT (0) NOT NULL ,
+ [prune_viewed] [int] DEFAULT (0) NOT NULL ,
+ [prune_freq] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_forums] PRIMARY KEY CLUSTERED
+ (
+ [forum_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [left_right_id] ON [phpbb_forums]([left_id], [right_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_lastpost_id] ON [phpbb_forums]([forum_last_post_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_forums_access'
+*/
+CREATE TABLE [phpbb_forums_access] (
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [session_id] [char] (32) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_forums_access] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_forums_access] PRIMARY KEY CLUSTERED
+ (
+ [forum_id],
+ [user_id],
+ [session_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_forums_track'
+*/
+CREATE TABLE [phpbb_forums_track] (
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [mark_time] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_forums_track] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_forums_track] PRIMARY KEY CLUSTERED
+ (
+ [user_id],
+ [forum_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_forums_watch'
+*/
+CREATE TABLE [phpbb_forums_watch] (
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [notify_status] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_id] ON [phpbb_forums_watch]([forum_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_id] ON [phpbb_forums_watch]([user_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [notify_stat] ON [phpbb_forums_watch]([notify_status]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_groups'
+*/
+CREATE TABLE [phpbb_groups] (
+ [group_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [group_type] [int] DEFAULT (1) NOT NULL ,
+ [group_founder_manage] [int] DEFAULT (0) NOT NULL ,
+ [group_skip_auth] [int] DEFAULT (0) NOT NULL ,
+ [group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [group_desc] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [group_desc_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [group_desc_options] [int] DEFAULT (7) NOT NULL ,
+ [group_desc_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
+ [group_display] [int] DEFAULT (0) NOT NULL ,
+ [group_avatar] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [group_avatar_type] [int] DEFAULT (0) NOT NULL ,
+ [group_avatar_width] [int] DEFAULT (0) NOT NULL ,
+ [group_avatar_height] [int] DEFAULT (0) NOT NULL ,
+ [group_rank] [int] DEFAULT (0) NOT NULL ,
+ [group_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
+ [group_sig_chars] [int] DEFAULT (0) NOT NULL ,
+ [group_receive_pm] [int] DEFAULT (0) NOT NULL ,
+ [group_message_limit] [int] DEFAULT (0) NOT NULL ,
+ [group_max_recipients] [int] DEFAULT (0) NOT NULL ,
+ [group_legend] [int] DEFAULT (1) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_groups] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_groups] PRIMARY KEY CLUSTERED
+ (
+ [group_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [group_legend_name] ON [phpbb_groups]([group_legend], [group_name]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_icons'
+*/
+CREATE TABLE [phpbb_icons] (
+ [icons_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [icons_url] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [icons_width] [int] DEFAULT (0) NOT NULL ,
+ [icons_height] [int] DEFAULT (0) NOT NULL ,
+ [icons_order] [int] DEFAULT (0) NOT NULL ,
+ [display_on_posting] [int] DEFAULT (1) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_icons] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_icons] PRIMARY KEY CLUSTERED
+ (
+ [icons_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [display_on_posting] ON [phpbb_icons]([display_on_posting]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_lang'
+*/
+CREATE TABLE [phpbb_lang] (
+ [lang_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [lang_iso] [varchar] (30) DEFAULT ('') NOT NULL ,
+ [lang_dir] [varchar] (30) DEFAULT ('') NOT NULL ,
+ [lang_english_name] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [lang_local_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [lang_author] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_lang] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_lang] PRIMARY KEY CLUSTERED
+ (
+ [lang_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [lang_iso] ON [phpbb_lang]([lang_iso]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_log'
+*/
+CREATE TABLE [phpbb_log] (
+ [log_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [log_type] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [reportee_id] [int] DEFAULT (0) NOT NULL ,
+ [log_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [log_time] [int] DEFAULT (0) NOT NULL ,
+ [log_operation] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [log_data] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_log] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_log] PRIMARY KEY CLUSTERED
+ (
+ [log_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [log_type] ON [phpbb_log]([log_type]) ON [PRIMARY]
+GO
+
+CREATE INDEX [log_time] ON [phpbb_log]([log_time]) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_id] ON [phpbb_log]([forum_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [topic_id] ON [phpbb_log]([topic_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [reportee_id] ON [phpbb_log]([reportee_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_id] ON [phpbb_log]([user_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_moderator_cache'
+*/
+CREATE TABLE [phpbb_moderator_cache] (
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [username] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [group_id] [int] DEFAULT (0) NOT NULL ,
+ [group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [display_on_index] [int] DEFAULT (1) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [disp_idx] ON [phpbb_moderator_cache]([display_on_index]) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_id] ON [phpbb_moderator_cache]([forum_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_modules'
+*/
+CREATE TABLE [phpbb_modules] (
+ [module_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [module_enabled] [int] DEFAULT (1) NOT NULL ,
+ [module_display] [int] DEFAULT (1) NOT NULL ,
+ [module_basename] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [module_class] [varchar] (10) DEFAULT ('') NOT NULL ,
+ [parent_id] [int] DEFAULT (0) NOT NULL ,
+ [left_id] [int] DEFAULT (0) NOT NULL ,
+ [right_id] [int] DEFAULT (0) NOT NULL ,
+ [module_langname] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [module_mode] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [module_auth] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_modules] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_modules] PRIMARY KEY CLUSTERED
+ (
+ [module_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [left_right_id] ON [phpbb_modules]([left_id], [right_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [module_enabled] ON [phpbb_modules]([module_enabled]) ON [PRIMARY]
+GO
+
+CREATE INDEX [class_left_id] ON [phpbb_modules]([module_class], [left_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_poll_options'
+*/
+CREATE TABLE [phpbb_poll_options] (
+ [poll_option_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [poll_option_text] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [poll_option_total] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [poll_opt_id] ON [phpbb_poll_options]([poll_option_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [topic_id] ON [phpbb_poll_options]([topic_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_poll_votes'
+*/
+CREATE TABLE [phpbb_poll_votes] (
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [poll_option_id] [int] DEFAULT (0) NOT NULL ,
+ [vote_user_id] [int] DEFAULT (0) NOT NULL ,
+ [vote_user_ip] [varchar] (40) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [topic_id] ON [phpbb_poll_votes]([topic_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [vote_user_id] ON [phpbb_poll_votes]([vote_user_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [vote_user_ip] ON [phpbb_poll_votes]([vote_user_ip]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_posts'
+*/
+CREATE TABLE [phpbb_posts] (
+ [post_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [poster_id] [int] DEFAULT (0) NOT NULL ,
+ [icon_id] [int] DEFAULT (0) NOT NULL ,
+ [poster_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [post_time] [int] DEFAULT (0) NOT NULL ,
+ [post_approved] [int] DEFAULT (1) NOT NULL ,
+ [post_reported] [int] DEFAULT (0) NOT NULL ,
+ [enable_bbcode] [int] DEFAULT (1) NOT NULL ,
+ [enable_smilies] [int] DEFAULT (1) NOT NULL ,
+ [enable_magic_url] [int] DEFAULT (1) NOT NULL ,
+ [enable_sig] [int] DEFAULT (1) NOT NULL ,
+ [post_username] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [post_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [post_text] [text] DEFAULT ('') NOT NULL ,
+ [post_checksum] [varchar] (32) DEFAULT ('') NOT NULL ,
+ [post_attachment] [int] DEFAULT (0) NOT NULL ,
+ [bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
+ [post_postcount] [int] DEFAULT (1) NOT NULL ,
+ [post_edit_time] [int] DEFAULT (0) NOT NULL ,
+ [post_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [post_edit_user] [int] DEFAULT (0) NOT NULL ,
+ [post_edit_count] [int] DEFAULT (0) NOT NULL ,
+ [post_edit_locked] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_posts] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_posts] PRIMARY KEY CLUSTERED
+ (
+ [post_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_id] ON [phpbb_posts]([forum_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [topic_id] ON [phpbb_posts]([topic_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [poster_ip] ON [phpbb_posts]([poster_ip]) ON [PRIMARY]
+GO
+
+CREATE INDEX [poster_id] ON [phpbb_posts]([poster_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [post_approved] ON [phpbb_posts]([post_approved]) ON [PRIMARY]
+GO
+
+CREATE INDEX [post_username] ON [phpbb_posts]([post_username]) ON [PRIMARY]
+GO
+
+CREATE INDEX [tid_post_time] ON [phpbb_posts]([topic_id], [post_time]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_privmsgs'
+*/
+CREATE TABLE [phpbb_privmsgs] (
+ [msg_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [root_level] [int] DEFAULT (0) NOT NULL ,
+ [author_id] [int] DEFAULT (0) NOT NULL ,
+ [icon_id] [int] DEFAULT (0) NOT NULL ,
+ [author_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [message_time] [int] DEFAULT (0) NOT NULL ,
+ [enable_bbcode] [int] DEFAULT (1) NOT NULL ,
+ [enable_smilies] [int] DEFAULT (1) NOT NULL ,
+ [enable_magic_url] [int] DEFAULT (1) NOT NULL ,
+ [enable_sig] [int] DEFAULT (1) NOT NULL ,
+ [message_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [message_text] [text] DEFAULT ('') NOT NULL ,
+ [message_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [message_edit_user] [int] DEFAULT (0) NOT NULL ,
+ [message_attachment] [int] DEFAULT (0) NOT NULL ,
+ [bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
+ [message_edit_time] [int] DEFAULT (0) NOT NULL ,
+ [message_edit_count] [int] DEFAULT (0) NOT NULL ,
+ [to_address] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [bcc_address] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [message_reported] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_privmsgs] PRIMARY KEY CLUSTERED
+ (
+ [msg_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [author_ip] ON [phpbb_privmsgs]([author_ip]) ON [PRIMARY]
+GO
+
+CREATE INDEX [message_time] ON [phpbb_privmsgs]([message_time]) ON [PRIMARY]
+GO
+
+CREATE INDEX [author_id] ON [phpbb_privmsgs]([author_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [root_level] ON [phpbb_privmsgs]([root_level]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_privmsgs_folder'
+*/
+CREATE TABLE [phpbb_privmsgs_folder] (
+ [folder_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [folder_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [pm_count] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_privmsgs_folder] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_privmsgs_folder] PRIMARY KEY CLUSTERED
+ (
+ [folder_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_id] ON [phpbb_privmsgs_folder]([user_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_privmsgs_rules'
+*/
+CREATE TABLE [phpbb_privmsgs_rules] (
+ [rule_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [rule_check] [int] DEFAULT (0) NOT NULL ,
+ [rule_connection] [int] DEFAULT (0) NOT NULL ,
+ [rule_string] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [rule_user_id] [int] DEFAULT (0) NOT NULL ,
+ [rule_group_id] [int] DEFAULT (0) NOT NULL ,
+ [rule_action] [int] DEFAULT (0) NOT NULL ,
+ [rule_folder_id] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_privmsgs_rules] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_privmsgs_rules] PRIMARY KEY CLUSTERED
+ (
+ [rule_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_id] ON [phpbb_privmsgs_rules]([user_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_privmsgs_to'
+*/
+CREATE TABLE [phpbb_privmsgs_to] (
+ [msg_id] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [author_id] [int] DEFAULT (0) NOT NULL ,
+ [pm_deleted] [int] DEFAULT (0) NOT NULL ,
+ [pm_new] [int] DEFAULT (1) NOT NULL ,
+ [pm_unread] [int] DEFAULT (1) NOT NULL ,
+ [pm_replied] [int] DEFAULT (0) NOT NULL ,
+ [pm_marked] [int] DEFAULT (0) NOT NULL ,
+ [pm_forwarded] [int] DEFAULT (0) NOT NULL ,
+ [folder_id] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [msg_id] ON [phpbb_privmsgs_to]([msg_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [author_id] ON [phpbb_privmsgs_to]([author_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [usr_flder_id] ON [phpbb_privmsgs_to]([user_id], [folder_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_profile_fields'
+*/
+CREATE TABLE [phpbb_profile_fields] (
+ [field_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [field_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [field_type] [int] DEFAULT (0) NOT NULL ,
+ [field_ident] [varchar] (20) DEFAULT ('') NOT NULL ,
+ [field_length] [varchar] (20) DEFAULT ('') NOT NULL ,
+ [field_minlen] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [field_maxlen] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [field_novalue] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [field_default_value] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [field_validation] [varchar] (20) DEFAULT ('') NOT NULL ,
+ [field_required] [int] DEFAULT (0) NOT NULL ,
+ [field_show_on_reg] [int] DEFAULT (0) NOT NULL ,
+ [field_show_on_vt] [int] DEFAULT (0) NOT NULL ,
+ [field_show_profile] [int] DEFAULT (0) NOT NULL ,
+ [field_hide] [int] DEFAULT (0) NOT NULL ,
+ [field_no_view] [int] DEFAULT (0) NOT NULL ,
+ [field_active] [int] DEFAULT (0) NOT NULL ,
+ [field_order] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_profile_fields] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_profile_fields] PRIMARY KEY CLUSTERED
+ (
+ [field_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [fld_type] ON [phpbb_profile_fields]([field_type]) ON [PRIMARY]
+GO
+
+CREATE INDEX [fld_ordr] ON [phpbb_profile_fields]([field_order]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_profile_fields_data'
+*/
+CREATE TABLE [phpbb_profile_fields_data] (
+ [user_id] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_profile_fields_data] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_profile_fields_data] PRIMARY KEY CLUSTERED
+ (
+ [user_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_profile_fields_lang'
+*/
+CREATE TABLE [phpbb_profile_fields_lang] (
+ [field_id] [int] DEFAULT (0) NOT NULL ,
+ [lang_id] [int] DEFAULT (0) NOT NULL ,
+ [option_id] [int] DEFAULT (0) NOT NULL ,
+ [field_type] [int] DEFAULT (0) NOT NULL ,
+ [lang_value] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_profile_fields_lang] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_profile_fields_lang] PRIMARY KEY CLUSTERED
+ (
+ [field_id],
+ [lang_id],
+ [option_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_profile_lang'
+*/
+CREATE TABLE [phpbb_profile_lang] (
+ [field_id] [int] DEFAULT (0) NOT NULL ,
+ [lang_id] [int] DEFAULT (0) NOT NULL ,
+ [lang_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [lang_explain] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [lang_default_value] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_profile_lang] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_profile_lang] PRIMARY KEY CLUSTERED
+ (
+ [field_id],
+ [lang_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_ranks'
+*/
+CREATE TABLE [phpbb_ranks] (
+ [rank_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [rank_title] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [rank_min] [int] DEFAULT (0) NOT NULL ,
+ [rank_special] [int] DEFAULT (0) NOT NULL ,
+ [rank_image] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_ranks] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_ranks] PRIMARY KEY CLUSTERED
+ (
+ [rank_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_reports'
+*/
+CREATE TABLE [phpbb_reports] (
+ [report_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [reason_id] [int] DEFAULT (0) NOT NULL ,
+ [post_id] [int] DEFAULT (0) NOT NULL ,
+ [pm_id] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [user_notify] [int] DEFAULT (0) NOT NULL ,
+ [report_closed] [int] DEFAULT (0) NOT NULL ,
+ [report_time] [int] DEFAULT (0) NOT NULL ,
+ [report_text] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_reports] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_reports] PRIMARY KEY CLUSTERED
+ (
+ [report_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [post_id] ON [phpbb_reports]([post_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [pm_id] ON [phpbb_reports]([pm_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_reports_reasons'
+*/
+CREATE TABLE [phpbb_reports_reasons] (
+ [reason_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [reason_title] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [reason_description] [text] DEFAULT ('') NOT NULL ,
+ [reason_order] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_reports_reasons] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_reports_reasons] PRIMARY KEY CLUSTERED
+ (
+ [reason_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_search_results'
+*/
+CREATE TABLE [phpbb_search_results] (
+ [search_key] [varchar] (32) DEFAULT ('') NOT NULL ,
+ [search_time] [int] DEFAULT (0) NOT NULL ,
+ [search_keywords] [text] DEFAULT ('') NOT NULL ,
+ [search_authors] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_search_results] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_search_results] PRIMARY KEY CLUSTERED
+ (
+ [search_key]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_search_wordlist'
+*/
+CREATE TABLE [phpbb_search_wordlist] (
+ [word_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [word_text] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [word_common] [int] DEFAULT (0) NOT NULL ,
+ [word_count] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_search_wordlist] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_search_wordlist] PRIMARY KEY CLUSTERED
+ (
+ [word_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE UNIQUE INDEX [wrd_txt] ON [phpbb_search_wordlist]([word_text]) ON [PRIMARY]
+GO
+
+CREATE INDEX [wrd_cnt] ON [phpbb_search_wordlist]([word_count]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_search_wordmatch'
+*/
+CREATE TABLE [phpbb_search_wordmatch] (
+ [post_id] [int] DEFAULT (0) NOT NULL ,
+ [word_id] [int] DEFAULT (0) NOT NULL ,
+ [title_match] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE UNIQUE INDEX [unq_mtch] ON [phpbb_search_wordmatch]([word_id], [post_id], [title_match]) ON [PRIMARY]
+GO
+
+CREATE INDEX [word_id] ON [phpbb_search_wordmatch]([word_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [post_id] ON [phpbb_search_wordmatch]([post_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_sessions'
+*/
+CREATE TABLE [phpbb_sessions] (
+ [session_id] [char] (32) DEFAULT ('') NOT NULL ,
+ [session_user_id] [int] DEFAULT (0) NOT NULL ,
+ [session_forum_id] [int] DEFAULT (0) NOT NULL ,
+ [session_last_visit] [int] DEFAULT (0) NOT NULL ,
+ [session_start] [int] DEFAULT (0) NOT NULL ,
+ [session_time] [int] DEFAULT (0) NOT NULL ,
+ [session_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [session_browser] [varchar] (150) DEFAULT ('') NOT NULL ,
+ [session_forwarded_for] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [session_page] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [session_viewonline] [int] DEFAULT (1) NOT NULL ,
+ [session_autologin] [int] DEFAULT (0) NOT NULL ,
+ [session_admin] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_sessions] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_sessions] PRIMARY KEY CLUSTERED
+ (
+ [session_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [session_time] ON [phpbb_sessions]([session_time]) ON [PRIMARY]
+GO
+
+CREATE INDEX [session_user_id] ON [phpbb_sessions]([session_user_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [session_fid] ON [phpbb_sessions]([session_forum_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_sessions_keys'
+*/
+CREATE TABLE [phpbb_sessions_keys] (
+ [key_id] [char] (32) DEFAULT ('') NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [last_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [last_login] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_sessions_keys] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_sessions_keys] PRIMARY KEY CLUSTERED
+ (
+ [key_id],
+ [user_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [last_login] ON [phpbb_sessions_keys]([last_login]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_sitelist'
+*/
+CREATE TABLE [phpbb_sitelist] (
+ [site_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [site_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [site_hostname] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [ip_exclude] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_sitelist] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_sitelist] PRIMARY KEY CLUSTERED
+ (
+ [site_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_smilies'
+*/
+CREATE TABLE [phpbb_smilies] (
+ [smiley_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [code] [varchar] (50) DEFAULT ('') NOT NULL ,
+ [emotion] [varchar] (50) DEFAULT ('') NOT NULL ,
+ [smiley_url] [varchar] (50) DEFAULT ('') NOT NULL ,
+ [smiley_width] [int] DEFAULT (0) NOT NULL ,
+ [smiley_height] [int] DEFAULT (0) NOT NULL ,
+ [smiley_order] [int] DEFAULT (0) NOT NULL ,
+ [display_on_posting] [int] DEFAULT (1) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_smilies] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_smilies] PRIMARY KEY CLUSTERED
+ (
+ [smiley_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [display_on_post] ON [phpbb_smilies]([display_on_posting]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_styles'
+*/
+CREATE TABLE [phpbb_styles] (
+ [style_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [style_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [style_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [style_active] [int] DEFAULT (1) NOT NULL ,
+ [template_id] [int] DEFAULT (0) NOT NULL ,
+ [theme_id] [int] DEFAULT (0) NOT NULL ,
+ [imageset_id] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_styles] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_styles] PRIMARY KEY CLUSTERED
+ (
+ [style_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE UNIQUE INDEX [style_name] ON [phpbb_styles]([style_name]) ON [PRIMARY]
+GO
+
+CREATE INDEX [template_id] ON [phpbb_styles]([template_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [theme_id] ON [phpbb_styles]([theme_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [imageset_id] ON [phpbb_styles]([imageset_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_styles_template'
+*/
+CREATE TABLE [phpbb_styles_template] (
+ [template_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [template_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [template_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [template_path] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [bbcode_bitfield] [varchar] (255) DEFAULT ('kNg=') NOT NULL ,
+ [template_storedb] [int] DEFAULT (0) NOT NULL ,
+ [template_inherits_id] [int] DEFAULT (0) NOT NULL ,
+ [template_inherit_path] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_styles_template] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_styles_template] PRIMARY KEY CLUSTERED
+ (
+ [template_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE UNIQUE INDEX [tmplte_nm] ON [phpbb_styles_template]([template_name]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_styles_template_data'
+*/
+CREATE TABLE [phpbb_styles_template_data] (
+ [template_id] [int] DEFAULT (0) NOT NULL ,
+ [template_filename] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [template_included] [varchar] (8000) DEFAULT ('') NOT NULL ,
+ [template_mtime] [int] DEFAULT (0) NOT NULL ,
+ [template_data] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+CREATE INDEX [tid] ON [phpbb_styles_template_data]([template_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [tfn] ON [phpbb_styles_template_data]([template_filename]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_styles_theme'
+*/
+CREATE TABLE [phpbb_styles_theme] (
+ [theme_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [theme_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [theme_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [theme_path] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [theme_storedb] [int] DEFAULT (0) NOT NULL ,
+ [theme_mtime] [int] DEFAULT (0) NOT NULL ,
+ [theme_data] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_styles_theme] PRIMARY KEY CLUSTERED
+ (
+ [theme_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE UNIQUE INDEX [theme_name] ON [phpbb_styles_theme]([theme_name]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_styles_imageset'
+*/
+CREATE TABLE [phpbb_styles_imageset] (
+ [imageset_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [imageset_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [imageset_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [imageset_path] [varchar] (100) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_styles_imageset] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_styles_imageset] PRIMARY KEY CLUSTERED
+ (
+ [imageset_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE UNIQUE INDEX [imgset_nm] ON [phpbb_styles_imageset]([imageset_name]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_styles_imageset_data'
+*/
+CREATE TABLE [phpbb_styles_imageset_data] (
+ [image_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [image_name] [varchar] (200) DEFAULT ('') NOT NULL ,
+ [image_filename] [varchar] (200) DEFAULT ('') NOT NULL ,
+ [image_lang] [varchar] (30) DEFAULT ('') NOT NULL ,
+ [image_height] [int] DEFAULT (0) NOT NULL ,
+ [image_width] [int] DEFAULT (0) NOT NULL ,
+ [imageset_id] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_styles_imageset_data] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_styles_imageset_data] PRIMARY KEY CLUSTERED
+ (
+ [image_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [i_d] ON [phpbb_styles_imageset_data]([imageset_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_topics'
+*/
+CREATE TABLE [phpbb_topics] (
+ [topic_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [icon_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_attachment] [int] DEFAULT (0) NOT NULL ,
+ [topic_approved] [int] DEFAULT (1) NOT NULL ,
+ [topic_reported] [int] DEFAULT (0) NOT NULL ,
+ [topic_title] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [topic_poster] [int] DEFAULT (0) NOT NULL ,
+ [topic_time] [int] DEFAULT (0) NOT NULL ,
+ [topic_time_limit] [int] DEFAULT (0) NOT NULL ,
+ [topic_views] [int] DEFAULT (0) NOT NULL ,
+ [topic_replies] [int] DEFAULT (0) NOT NULL ,
+ [topic_replies_real] [int] DEFAULT (0) NOT NULL ,
+ [topic_status] [int] DEFAULT (0) NOT NULL ,
+ [topic_type] [int] DEFAULT (0) NOT NULL ,
+ [topic_first_post_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_first_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [topic_first_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
+ [topic_last_post_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_last_poster_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [topic_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
+ [topic_last_post_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [topic_last_post_time] [int] DEFAULT (0) NOT NULL ,
+ [topic_last_view_time] [int] DEFAULT (0) NOT NULL ,
+ [topic_moved_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_bumped] [int] DEFAULT (0) NOT NULL ,
+ [topic_bumper] [int] DEFAULT (0) NOT NULL ,
+ [poll_title] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [poll_start] [int] DEFAULT (0) NOT NULL ,
+ [poll_length] [int] DEFAULT (0) NOT NULL ,
+ [poll_max_options] [int] DEFAULT (1) NOT NULL ,
+ [poll_last_vote] [int] DEFAULT (0) NOT NULL ,
+ [poll_vote_change] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_topics] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_topics] PRIMARY KEY CLUSTERED
+ (
+ [topic_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_id] ON [phpbb_topics]([forum_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_id_type] ON [phpbb_topics]([forum_id], [topic_type]) ON [PRIMARY]
+GO
+
+CREATE INDEX [last_post_time] ON [phpbb_topics]([topic_last_post_time]) ON [PRIMARY]
+GO
+
+CREATE INDEX [topic_approved] ON [phpbb_topics]([topic_approved]) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_appr_last] ON [phpbb_topics]([forum_id], [topic_approved], [topic_last_post_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [fid_time_moved] ON [phpbb_topics]([forum_id], [topic_last_post_time], [topic_moved_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_topics_track'
+*/
+CREATE TABLE [phpbb_topics_track] (
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [mark_time] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_topics_track] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_topics_track] PRIMARY KEY CLUSTERED
+ (
+ [user_id],
+ [topic_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_id] ON [phpbb_topics_track]([forum_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_topics_posted'
+*/
+CREATE TABLE [phpbb_topics_posted] (
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_posted] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_topics_posted] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_topics_posted] PRIMARY KEY CLUSTERED
+ (
+ [user_id],
+ [topic_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_topics_watch'
+*/
+CREATE TABLE [phpbb_topics_watch] (
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [notify_status] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [topic_id] ON [phpbb_topics_watch]([topic_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_id] ON [phpbb_topics_watch]([user_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [notify_stat] ON [phpbb_topics_watch]([notify_status]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_user_group'
+*/
+CREATE TABLE [phpbb_user_group] (
+ [group_id] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [group_leader] [int] DEFAULT (0) NOT NULL ,
+ [user_pending] [int] DEFAULT (1) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [group_id] ON [phpbb_user_group]([group_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_id] ON [phpbb_user_group]([user_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [group_leader] ON [phpbb_user_group]([group_leader]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_users'
+*/
+CREATE TABLE [phpbb_users] (
+ [user_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [user_type] [int] DEFAULT (0) NOT NULL ,
+ [group_id] [int] DEFAULT (3) NOT NULL ,
+ [user_permissions] [text] DEFAULT ('') NOT NULL ,
+ [user_perm_from] [int] DEFAULT (0) NOT NULL ,
+ [user_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [user_regdate] [int] DEFAULT (0) NOT NULL ,
+ [username] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [username_clean] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_password] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [user_passchg] [int] DEFAULT (0) NOT NULL ,
+ [user_pass_convert] [int] DEFAULT (0) NOT NULL ,
+ [user_email] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [user_email_hash] [float] DEFAULT (0) NOT NULL ,
+ [user_birthday] [varchar] (10) DEFAULT ('') NOT NULL ,
+ [user_lastvisit] [int] DEFAULT (0) NOT NULL ,
+ [user_lastmark] [int] DEFAULT (0) NOT NULL ,
+ [user_lastpost_time] [int] DEFAULT (0) NOT NULL ,
+ [user_lastpage] [varchar] (200) DEFAULT ('') NOT NULL ,
+ [user_last_confirm_key] [varchar] (10) DEFAULT ('') NOT NULL ,
+ [user_last_search] [int] DEFAULT (0) NOT NULL ,
+ [user_warnings] [int] DEFAULT (0) NOT NULL ,
+ [user_last_warning] [int] DEFAULT (0) NOT NULL ,
+ [user_login_attempts] [int] DEFAULT (0) NOT NULL ,
+ [user_inactive_reason] [int] DEFAULT (0) NOT NULL ,
+ [user_inactive_time] [int] DEFAULT (0) NOT NULL ,
+ [user_posts] [int] DEFAULT (0) NOT NULL ,
+ [user_lang] [varchar] (30) DEFAULT ('') NOT NULL ,
+ [user_timezone] [float] DEFAULT (0) NOT NULL ,
+ [user_dst] [int] DEFAULT (0) NOT NULL ,
+ [user_dateformat] [varchar] (30) DEFAULT ('d M Y H:i') NOT NULL ,
+ [user_style] [int] DEFAULT (0) NOT NULL ,
+ [user_rank] [int] DEFAULT (0) NOT NULL ,
+ [user_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
+ [user_new_privmsg] [int] DEFAULT (0) NOT NULL ,
+ [user_unread_privmsg] [int] DEFAULT (0) NOT NULL ,
+ [user_last_privmsg] [int] DEFAULT (0) NOT NULL ,
+ [user_message_rules] [int] DEFAULT (0) NOT NULL ,
+ [user_full_folder] [int] DEFAULT (-3) NOT NULL ,
+ [user_emailtime] [int] DEFAULT (0) NOT NULL ,
+ [user_topic_show_days] [int] DEFAULT (0) NOT NULL ,
+ [user_topic_sortby_type] [varchar] (1) DEFAULT ('t') NOT NULL ,
+ [user_topic_sortby_dir] [varchar] (1) DEFAULT ('d') NOT NULL ,
+ [user_post_show_days] [int] DEFAULT (0) NOT NULL ,
+ [user_post_sortby_type] [varchar] (1) DEFAULT ('t') NOT NULL ,
+ [user_post_sortby_dir] [varchar] (1) DEFAULT ('a') NOT NULL ,
+ [user_notify] [int] DEFAULT (0) NOT NULL ,
+ [user_notify_pm] [int] DEFAULT (1) NOT NULL ,
+ [user_notify_type] [int] DEFAULT (0) NOT NULL ,
+ [user_allow_pm] [int] DEFAULT (1) NOT NULL ,
+ [user_allow_viewonline] [int] DEFAULT (1) NOT NULL ,
+ [user_allow_viewemail] [int] DEFAULT (1) NOT NULL ,
+ [user_allow_massemail] [int] DEFAULT (1) NOT NULL ,
+ [user_options] [int] DEFAULT (230271) NOT NULL ,
+ [user_avatar] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_avatar_type] [int] DEFAULT (0) NOT NULL ,
+ [user_avatar_width] [int] DEFAULT (0) NOT NULL ,
+ [user_avatar_height] [int] DEFAULT (0) NOT NULL ,
+ [user_sig] [text] DEFAULT ('') NOT NULL ,
+ [user_sig_bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
+ [user_sig_bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_from] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [user_icq] [varchar] (15) DEFAULT ('') NOT NULL ,
+ [user_aim] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_yim] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_msnm] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_jabber] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_website] [varchar] (200) DEFAULT ('') NOT NULL ,
+ [user_occ] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [user_interests] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [user_actkey] [varchar] (32) DEFAULT ('') NOT NULL ,
+ [user_newpasswd] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [user_form_salt] [varchar] (32) DEFAULT ('') NOT NULL ,
+ [user_new] [int] DEFAULT (1) NOT NULL ,
+ [user_reminded] [int] DEFAULT (0) NOT NULL ,
+ [user_reminded_time] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_users] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_users] PRIMARY KEY CLUSTERED
+ (
+ [user_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_birthday] ON [phpbb_users]([user_birthday]) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_email_hash] ON [phpbb_users]([user_email_hash]) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_type] ON [phpbb_users]([user_type]) ON [PRIMARY]
+GO
+
+CREATE UNIQUE INDEX [username_clean] ON [phpbb_users]([username_clean]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_warnings'
+*/
+CREATE TABLE [phpbb_warnings] (
+ [warning_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [post_id] [int] DEFAULT (0) NOT NULL ,
+ [log_id] [int] DEFAULT (0) NOT NULL ,
+ [warning_time] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_warnings] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_warnings] PRIMARY KEY CLUSTERED
+ (
+ [warning_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_words'
+*/
+CREATE TABLE [phpbb_words] (
+ [word_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [word] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [replacement] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_words] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_words] PRIMARY KEY CLUSTERED
+ (
+ [word_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_zebra'
+*/
+CREATE TABLE [phpbb_zebra] (
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [zebra_id] [int] DEFAULT (0) NOT NULL ,
+ [friend] [int] DEFAULT (0) NOT NULL ,
+ [foe] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_zebra] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_zebra] PRIMARY KEY CLUSTERED
+ (
+ [user_id],
+ [zebra_id]
+ ) ON [PRIMARY]
+GO
+
+
+
+COMMIT
+GO
+
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
new file mode 100644
index 0000000000..4fcead787b
--- /dev/null
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -0,0 +1,1016 @@
+#
+# $Id$
+#
+
+# Table: 'phpbb_attachments'
+CREATE TABLE phpbb_attachments (
+ attach_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ post_msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ in_message tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ is_orphan tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ physical_filename varbinary(255) DEFAULT '' NOT NULL,
+ real_filename varbinary(255) DEFAULT '' NOT NULL,
+ download_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ attach_comment blob NOT NULL,
+ extension varbinary(100) DEFAULT '' NOT NULL,
+ mimetype varbinary(100) DEFAULT '' NOT NULL,
+ filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
+ filetime int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ thumbnail tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (attach_id),
+ KEY filetime (filetime),
+ KEY post_msg_id (post_msg_id),
+ KEY topic_id (topic_id),
+ KEY poster_id (poster_id),
+ KEY is_orphan (is_orphan)
+);
+
+
+# Table: 'phpbb_acl_groups'
+CREATE TABLE phpbb_acl_groups (
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_setting tinyint(2) DEFAULT '0' NOT NULL,
+ KEY group_id (group_id),
+ KEY auth_opt_id (auth_option_id),
+ KEY auth_role_id (auth_role_id)
+);
+
+
+# Table: 'phpbb_acl_options'
+CREATE TABLE phpbb_acl_options (
+ auth_option_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ auth_option varbinary(50) DEFAULT '' NOT NULL,
+ is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (auth_option_id),
+ UNIQUE auth_option (auth_option)
+);
+
+
+# Table: 'phpbb_acl_roles'
+CREATE TABLE phpbb_acl_roles (
+ role_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ role_name blob NOT NULL,
+ role_description blob NOT NULL,
+ role_type varbinary(10) DEFAULT '' NOT NULL,
+ role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (role_id),
+ KEY role_type (role_type),
+ KEY role_order (role_order)
+);
+
+
+# Table: 'phpbb_acl_roles_data'
+CREATE TABLE phpbb_acl_roles_data (
+ role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_setting tinyint(2) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (role_id, auth_option_id),
+ KEY ath_op_id (auth_option_id)
+);
+
+
+# Table: 'phpbb_acl_users'
+CREATE TABLE phpbb_acl_users (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_setting tinyint(2) DEFAULT '0' NOT NULL,
+ KEY user_id (user_id),
+ KEY auth_option_id (auth_option_id),
+ KEY auth_role_id (auth_role_id)
+);
+
+
+# Table: 'phpbb_banlist'
+CREATE TABLE phpbb_banlist (
+ ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_ip varbinary(40) DEFAULT '' NOT NULL,
+ ban_email blob NOT NULL,
+ ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_reason blob NOT NULL,
+ ban_give_reason blob NOT NULL,
+ PRIMARY KEY (ban_id),
+ KEY ban_end (ban_end),
+ KEY ban_user (ban_userid, ban_exclude),
+ KEY ban_email (ban_email(255), ban_exclude),
+ KEY ban_ip (ban_ip, ban_exclude)
+);
+
+
+# Table: 'phpbb_bbcodes'
+CREATE TABLE phpbb_bbcodes (
+ bbcode_id tinyint(3) DEFAULT '0' NOT NULL,
+ bbcode_tag varbinary(16) DEFAULT '' NOT NULL,
+ bbcode_helpline blob NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_match blob NOT NULL,
+ bbcode_tpl mediumblob NOT NULL,
+ first_pass_match mediumblob NOT NULL,
+ first_pass_replace mediumblob NOT NULL,
+ second_pass_match mediumblob NOT NULL,
+ second_pass_replace mediumblob NOT NULL,
+ PRIMARY KEY (bbcode_id),
+ KEY display_on_post (display_on_posting)
+);
+
+
+# Table: 'phpbb_bookmarks'
+CREATE TABLE phpbb_bookmarks (
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (topic_id, user_id)
+);
+
+
+# Table: 'phpbb_bots'
+CREATE TABLE phpbb_bots (
+ bot_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ bot_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ bot_name blob NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ bot_agent varbinary(255) DEFAULT '' NOT NULL,
+ bot_ip varbinary(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (bot_id),
+ KEY bot_active (bot_active)
+);
+
+
+# Table: 'phpbb_config'
+CREATE TABLE phpbb_config (
+ config_name varbinary(255) DEFAULT '' NOT NULL,
+ config_value blob NOT NULL,
+ is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (config_name),
+ KEY is_dynamic (is_dynamic)
+);
+
+
+# Table: 'phpbb_confirm'
+CREATE TABLE phpbb_confirm (
+ confirm_id binary(32) DEFAULT '' NOT NULL,
+ session_id binary(32) DEFAULT '' NOT NULL,
+ confirm_type tinyint(3) DEFAULT '0' NOT NULL,
+ code varbinary(8) DEFAULT '' NOT NULL,
+ seed int(10) UNSIGNED DEFAULT '0' NOT NULL,
+ attempts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (session_id, confirm_id),
+ KEY confirm_type (confirm_type)
+);
+
+
+# Table: 'phpbb_disallow'
+CREATE TABLE phpbb_disallow (
+ disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ disallow_username blob NOT NULL,
+ PRIMARY KEY (disallow_id)
+);
+
+
+# Table: 'phpbb_drafts'
+CREATE TABLE phpbb_drafts (
+ draft_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ save_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ draft_subject blob NOT NULL,
+ draft_message mediumblob NOT NULL,
+ PRIMARY KEY (draft_id),
+ KEY save_time (save_time)
+);
+
+
+# Table: 'phpbb_extensions'
+CREATE TABLE phpbb_extensions (
+ extension_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ extension varbinary(100) DEFAULT '' NOT NULL,
+ PRIMARY KEY (extension_id)
+);
+
+
+# Table: 'phpbb_extension_groups'
+CREATE TABLE phpbb_extension_groups (
+ group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ group_name blob NOT NULL,
+ cat_id tinyint(2) DEFAULT '0' NOT NULL,
+ allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ upload_icon varbinary(255) DEFAULT '' NOT NULL,
+ max_filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
+ allowed_forums blob NOT NULL,
+ allow_in_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (group_id)
+);
+
+
+# Table: 'phpbb_forums'
+CREATE TABLE phpbb_forums (
+ forum_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_parents mediumblob NOT NULL,
+ forum_name blob NOT NULL,
+ forum_desc blob NOT NULL,
+ forum_desc_bitfield varbinary(255) DEFAULT '' NOT NULL,
+ forum_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
+ forum_desc_uid varbinary(8) DEFAULT '' NOT NULL,
+ forum_link blob NOT NULL,
+ forum_password varbinary(120) DEFAULT '' NOT NULL,
+ forum_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_image varbinary(255) DEFAULT '' NOT NULL,
+ forum_rules blob NOT NULL,
+ forum_rules_link blob NOT NULL,
+ forum_rules_bitfield varbinary(255) DEFAULT '' NOT NULL,
+ forum_rules_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
+ forum_rules_uid varbinary(8) DEFAULT '' NOT NULL,
+ forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL,
+ forum_type tinyint(4) DEFAULT '0' NOT NULL,
+ forum_status tinyint(4) DEFAULT '0' NOT NULL,
+ forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_post_subject blob NOT NULL,
+ forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_poster_name blob NOT NULL,
+ forum_last_poster_colour varbinary(6) DEFAULT '' NOT NULL,
+ forum_flags tinyint(4) DEFAULT '32' NOT NULL,
+ forum_options int(20) UNSIGNED DEFAULT '0' NOT NULL,
+ display_subforum_list tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_indexing tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_icons tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_prune tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_next int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_days mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_viewed mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_freq mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (forum_id),
+ KEY left_right_id (left_id, right_id),
+ KEY forum_lastpost_id (forum_last_post_id)
+);
+
+
+# Table: 'phpbb_forums_access'
+CREATE TABLE phpbb_forums_access (
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_id binary(32) DEFAULT '' NOT NULL,
+ PRIMARY KEY (forum_id, user_id, session_id)
+);
+
+
+# Table: 'phpbb_forums_track'
+CREATE TABLE phpbb_forums_track (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, forum_id)
+);
+
+
+# Table: 'phpbb_forums_watch'
+CREATE TABLE phpbb_forums_watch (
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY forum_id (forum_id),
+ KEY user_id (user_id),
+ KEY notify_stat (notify_status)
+);
+
+
+# Table: 'phpbb_groups'
+CREATE TABLE phpbb_groups (
+ group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ group_type tinyint(4) DEFAULT '1' NOT NULL,
+ group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_skip_auth tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_name blob NOT NULL,
+ group_desc blob NOT NULL,
+ group_desc_bitfield varbinary(255) DEFAULT '' NOT NULL,
+ group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
+ group_desc_uid varbinary(8) DEFAULT '' NOT NULL,
+ group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_avatar varbinary(255) DEFAULT '' NOT NULL,
+ group_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
+ group_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ group_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_colour varbinary(6) DEFAULT '' NOT NULL,
+ group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_receive_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_legend tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ PRIMARY KEY (group_id),
+ KEY group_legend_name (group_legend, group_name(255))
+);
+
+
+# Table: 'phpbb_icons'
+CREATE TABLE phpbb_icons (
+ icons_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ icons_url varbinary(255) DEFAULT '' NOT NULL,
+ icons_width tinyint(4) DEFAULT '0' NOT NULL,
+ icons_height tinyint(4) DEFAULT '0' NOT NULL,
+ icons_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ PRIMARY KEY (icons_id),
+ KEY display_on_posting (display_on_posting)
+);
+
+
+# Table: 'phpbb_lang'
+CREATE TABLE phpbb_lang (
+ lang_id tinyint(4) NOT NULL auto_increment,
+ lang_iso varbinary(30) DEFAULT '' NOT NULL,
+ lang_dir varbinary(30) DEFAULT '' NOT NULL,
+ lang_english_name blob NOT NULL,
+ lang_local_name blob NOT NULL,
+ lang_author blob NOT NULL,
+ PRIMARY KEY (lang_id),
+ KEY lang_iso (lang_iso)
+);
+
+
+# Table: 'phpbb_log'
+CREATE TABLE phpbb_log (
+ log_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ log_type tinyint(4) DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ log_ip varbinary(40) DEFAULT '' NOT NULL,
+ log_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ log_operation blob NOT NULL,
+ log_data mediumblob NOT NULL,
+ PRIMARY KEY (log_id),
+ KEY log_type (log_type),
+ KEY log_time (log_time),
+ KEY forum_id (forum_id),
+ KEY topic_id (topic_id),
+ KEY reportee_id (reportee_id),
+ KEY user_id (user_id)
+);
+
+
+# Table: 'phpbb_moderator_cache'
+CREATE TABLE phpbb_moderator_cache (
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ username blob NOT NULL,
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_name blob NOT NULL,
+ display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ KEY disp_idx (display_on_index),
+ KEY forum_id (forum_id)
+);
+
+
+# Table: 'phpbb_modules'
+CREATE TABLE phpbb_modules (
+ module_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ module_basename varbinary(255) DEFAULT '' NOT NULL,
+ module_class varbinary(10) DEFAULT '' NOT NULL,
+ parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ module_langname varbinary(255) DEFAULT '' NOT NULL,
+ module_mode varbinary(255) DEFAULT '' NOT NULL,
+ module_auth varbinary(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (module_id),
+ KEY left_right_id (left_id, right_id),
+ KEY module_enabled (module_enabled),
+ KEY class_left_id (module_class, left_id)
+);
+
+
+# Table: 'phpbb_poll_options'
+CREATE TABLE phpbb_poll_options (
+ poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_option_text blob NOT NULL,
+ poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY poll_opt_id (poll_option_id),
+ KEY topic_id (topic_id)
+);
+
+
+# Table: 'phpbb_poll_votes'
+CREATE TABLE phpbb_poll_votes (
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
+ vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ vote_user_ip varbinary(40) DEFAULT '' NOT NULL,
+ KEY topic_id (topic_id),
+ KEY vote_user_id (vote_user_id),
+ KEY vote_user_ip (vote_user_ip)
+);
+
+
+# Table: 'phpbb_posts'
+CREATE TABLE phpbb_posts (
+ post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_ip varbinary(40) DEFAULT '' NOT NULL,
+ post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ post_username blob NOT NULL,
+ post_subject blob NOT NULL,
+ post_text mediumblob NOT NULL,
+ post_checksum varbinary(32) DEFAULT '' NOT NULL,
+ post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL,
+ bbcode_uid varbinary(8) DEFAULT '' NOT NULL,
+ post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ post_edit_reason blob NOT NULL,
+ post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (post_id),
+ KEY forum_id (forum_id),
+ KEY topic_id (topic_id),
+ KEY poster_ip (poster_ip),
+ KEY poster_id (poster_id),
+ KEY post_approved (post_approved),
+ KEY post_username (post_username(255)),
+ KEY tid_post_time (topic_id, post_time)
+);
+
+
+# Table: 'phpbb_privmsgs'
+CREATE TABLE phpbb_privmsgs (
+ msg_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ author_ip varbinary(40) DEFAULT '' NOT NULL,
+ message_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ message_subject blob NOT NULL,
+ message_text mediumblob NOT NULL,
+ message_edit_reason blob NOT NULL,
+ message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL,
+ bbcode_uid varbinary(8) DEFAULT '' NOT NULL,
+ message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ to_address blob NOT NULL,
+ bcc_address blob NOT NULL,
+ message_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (msg_id),
+ KEY author_ip (author_ip),
+ KEY message_time (message_time),
+ KEY author_id (author_id),
+ KEY root_level (root_level)
+);
+
+
+# Table: 'phpbb_privmsgs_folder'
+CREATE TABLE phpbb_privmsgs_folder (
+ folder_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ folder_name blob NOT NULL,
+ pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (folder_id),
+ KEY user_id (user_id)
+);
+
+
+# Table: 'phpbb_privmsgs_rules'
+CREATE TABLE phpbb_privmsgs_rules (
+ rule_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_string blob NOT NULL,
+ rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_folder_id int(11) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (rule_id),
+ KEY user_id (user_id)
+);
+
+
+# Table: 'phpbb_privmsgs_to'
+CREATE TABLE phpbb_privmsgs_to (
+ msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ pm_unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ pm_replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ folder_id int(11) DEFAULT '0' NOT NULL,
+ KEY msg_id (msg_id),
+ KEY author_id (author_id),
+ KEY usr_flder_id (user_id, folder_id)
+);
+
+
+# Table: 'phpbb_profile_fields'
+CREATE TABLE phpbb_profile_fields (
+ field_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ field_name blob NOT NULL,
+ field_type tinyint(4) DEFAULT '0' NOT NULL,
+ field_ident varbinary(20) DEFAULT '' NOT NULL,
+ field_length varbinary(20) DEFAULT '' NOT NULL,
+ field_minlen varbinary(255) DEFAULT '' NOT NULL,
+ field_maxlen varbinary(255) DEFAULT '' NOT NULL,
+ field_novalue blob NOT NULL,
+ field_default_value blob NOT NULL,
+ field_validation varbinary(60) DEFAULT '' NOT NULL,
+ field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_on_vt tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (field_id),
+ KEY fld_type (field_type),
+ KEY fld_ordr (field_order)
+);
+
+
+# Table: 'phpbb_profile_fields_data'
+CREATE TABLE phpbb_profile_fields_data (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id)
+);
+
+
+# Table: 'phpbb_profile_fields_lang'
+CREATE TABLE phpbb_profile_fields_lang (
+ field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ field_type tinyint(4) DEFAULT '0' NOT NULL,
+ lang_value blob NOT NULL,
+ PRIMARY KEY (field_id, lang_id, option_id)
+);
+
+
+# Table: 'phpbb_profile_lang'
+CREATE TABLE phpbb_profile_lang (
+ field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_name blob NOT NULL,
+ lang_explain blob NOT NULL,
+ lang_default_value blob NOT NULL,
+ PRIMARY KEY (field_id, lang_id)
+);
+
+
+# Table: 'phpbb_ranks'
+CREATE TABLE phpbb_ranks (
+ rank_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ rank_title blob NOT NULL,
+ rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ rank_image varbinary(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (rank_id)
+);
+
+
+# Table: 'phpbb_reports'
+CREATE TABLE phpbb_reports (
+ report_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ reason_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ report_text mediumblob NOT NULL,
+ PRIMARY KEY (report_id),
+ KEY post_id (post_id),
+ KEY pm_id (pm_id)
+);
+
+
+# Table: 'phpbb_reports_reasons'
+CREATE TABLE phpbb_reports_reasons (
+ reason_id smallint(4) UNSIGNED NOT NULL auto_increment,
+ reason_title blob NOT NULL,
+ reason_description mediumblob NOT NULL,
+ reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (reason_id)
+);
+
+
+# Table: 'phpbb_search_results'
+CREATE TABLE phpbb_search_results (
+ search_key varbinary(32) DEFAULT '' NOT NULL,
+ search_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ search_keywords mediumblob NOT NULL,
+ search_authors mediumblob NOT NULL,
+ PRIMARY KEY (search_key)
+);
+
+
+# Table: 'phpbb_search_wordlist'
+CREATE TABLE phpbb_search_wordlist (
+ word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ word_text blob NOT NULL,
+ word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ word_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (word_id),
+ UNIQUE wrd_txt (word_text(255)),
+ KEY wrd_cnt (word_count)
+);
+
+
+# Table: 'phpbb_search_wordmatch'
+CREATE TABLE phpbb_search_wordmatch (
+ post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ UNIQUE unq_mtch (word_id, post_id, title_match),
+ KEY word_id (word_id),
+ KEY post_id (post_id)
+);
+
+
+# Table: 'phpbb_sessions'
+CREATE TABLE phpbb_sessions (
+ session_id binary(32) DEFAULT '' NOT NULL,
+ session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ session_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ session_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ session_ip varbinary(40) DEFAULT '' NOT NULL,
+ session_browser varbinary(150) DEFAULT '' NOT NULL,
+ session_forwarded_for varbinary(255) DEFAULT '' NOT NULL,
+ session_page blob NOT NULL,
+ session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (session_id),
+ KEY session_time (session_time),
+ KEY session_user_id (session_user_id),
+ KEY session_fid (session_forum_id)
+);
+
+
+# Table: 'phpbb_sessions_keys'
+CREATE TABLE phpbb_sessions_keys (
+ key_id binary(32) DEFAULT '' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ last_ip varbinary(40) DEFAULT '' NOT NULL,
+ last_login int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (key_id, user_id),
+ KEY last_login (last_login)
+);
+
+
+# Table: 'phpbb_sitelist'
+CREATE TABLE phpbb_sitelist (
+ site_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ site_ip varbinary(40) DEFAULT '' NOT NULL,
+ site_hostname varbinary(255) DEFAULT '' NOT NULL,
+ ip_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (site_id)
+);
+
+
+# Table: 'phpbb_smilies'
+CREATE TABLE phpbb_smilies (
+ smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ code varbinary(150) DEFAULT '' NOT NULL,
+ emotion varbinary(150) DEFAULT '' NOT NULL,
+ smiley_url varbinary(50) DEFAULT '' NOT NULL,
+ smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ smiley_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ PRIMARY KEY (smiley_id),
+ KEY display_on_post (display_on_posting)
+);
+
+
+# Table: 'phpbb_styles'
+CREATE TABLE phpbb_styles (
+ style_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ style_name blob NOT NULL,
+ style_copyright blob NOT NULL,
+ style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ theme_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (style_id),
+ UNIQUE style_name (style_name(255)),
+ KEY template_id (template_id),
+ KEY theme_id (theme_id),
+ KEY imageset_id (imageset_id)
+);
+
+
+# Table: 'phpbb_styles_template'
+CREATE TABLE phpbb_styles_template (
+ template_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ template_name blob NOT NULL,
+ template_copyright blob NOT NULL,
+ template_path varbinary(100) DEFAULT '' NOT NULL,
+ bbcode_bitfield varbinary(255) DEFAULT 'kNg=' NOT NULL,
+ template_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL,
+ template_inherit_path varbinary(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (template_id),
+ UNIQUE tmplte_nm (template_name(255))
+);
+
+
+# Table: 'phpbb_styles_template_data'
+CREATE TABLE phpbb_styles_template_data (
+ template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ template_filename varbinary(100) DEFAULT '' NOT NULL,
+ template_included blob NOT NULL,
+ template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ template_data mediumblob NOT NULL,
+ KEY tid (template_id),
+ KEY tfn (template_filename)
+);
+
+
+# Table: 'phpbb_styles_theme'
+CREATE TABLE phpbb_styles_theme (
+ theme_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ theme_name blob NOT NULL,
+ theme_copyright blob NOT NULL,
+ theme_path varbinary(100) DEFAULT '' NOT NULL,
+ theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ theme_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ theme_data mediumblob NOT NULL,
+ PRIMARY KEY (theme_id),
+ UNIQUE theme_name (theme_name(255))
+);
+
+
+# Table: 'phpbb_styles_imageset'
+CREATE TABLE phpbb_styles_imageset (
+ imageset_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ imageset_name blob NOT NULL,
+ imageset_copyright blob NOT NULL,
+ imageset_path varbinary(100) DEFAULT '' NOT NULL,
+ PRIMARY KEY (imageset_id),
+ UNIQUE imgset_nm (imageset_name(255))
+);
+
+
+# Table: 'phpbb_styles_imageset_data'
+CREATE TABLE phpbb_styles_imageset_data (
+ image_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ image_name varbinary(200) DEFAULT '' NOT NULL,
+ image_filename varbinary(200) DEFAULT '' NOT NULL,
+ image_lang varbinary(30) DEFAULT '' NOT NULL,
+ image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (image_id),
+ KEY i_d (imageset_id)
+);
+
+
+# Table: 'phpbb_topics'
+CREATE TABLE phpbb_topics (
+ topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_title blob NOT NULL,
+ topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_replies_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_status tinyint(3) DEFAULT '0' NOT NULL,
+ topic_type tinyint(3) DEFAULT '0' NOT NULL,
+ topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_first_poster_name blob NOT NULL,
+ topic_first_poster_colour varbinary(6) DEFAULT '' NOT NULL,
+ topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_last_poster_name blob NOT NULL,
+ topic_last_poster_colour varbinary(6) DEFAULT '' NOT NULL,
+ topic_last_post_subject blob NOT NULL,
+ topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_title blob NOT NULL,
+ poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
+ poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (topic_id),
+ KEY forum_id (forum_id),
+ KEY forum_id_type (forum_id, topic_type),
+ KEY last_post_time (topic_last_post_time),
+ KEY topic_approved (topic_approved),
+ KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id),
+ KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id)
+);
+
+
+# Table: 'phpbb_topics_track'
+CREATE TABLE phpbb_topics_track (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, topic_id),
+ KEY forum_id (forum_id)
+);
+
+
+# Table: 'phpbb_topics_posted'
+CREATE TABLE phpbb_topics_posted (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, topic_id)
+);
+
+
+# Table: 'phpbb_topics_watch'
+CREATE TABLE phpbb_topics_watch (
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY topic_id (topic_id),
+ KEY user_id (user_id),
+ KEY notify_stat (notify_status)
+);
+
+
+# Table: 'phpbb_user_group'
+CREATE TABLE phpbb_user_group (
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_leader tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_pending tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ KEY group_id (group_id),
+ KEY user_id (user_id),
+ KEY group_leader (group_leader)
+);
+
+
+# Table: 'phpbb_users'
+CREATE TABLE phpbb_users (
+ user_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_type tinyint(2) DEFAULT '0' NOT NULL,
+ group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL,
+ user_permissions mediumblob NOT NULL,
+ user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_ip varbinary(40) DEFAULT '' NOT NULL,
+ user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ username blob NOT NULL,
+ username_clean blob NOT NULL,
+ user_password varbinary(120) DEFAULT '' NOT NULL,
+ user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_email blob NOT NULL,
+ user_email_hash bigint(20) DEFAULT '0' NOT NULL,
+ user_birthday varbinary(10) DEFAULT '' NOT NULL,
+ user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lastpage blob NOT NULL,
+ user_last_confirm_key varbinary(10) DEFAULT '' NOT NULL,
+ user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_warnings tinyint(4) DEFAULT '0' NOT NULL,
+ user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_login_attempts tinyint(4) DEFAULT '0' NOT NULL,
+ user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL,
+ user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lang varbinary(30) DEFAULT '' NOT NULL,
+ user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
+ user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_dateformat varbinary(90) DEFAULT 'd M Y H:i' NOT NULL,
+ user_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_colour varbinary(6) DEFAULT '' NOT NULL,
+ user_new_privmsg int(4) DEFAULT '0' NOT NULL,
+ user_unread_privmsg int(4) DEFAULT '0' NOT NULL,
+ user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_full_folder int(11) DEFAULT '-3' NOT NULL,
+ user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_topic_sortby_type varbinary(1) DEFAULT 't' NOT NULL,
+ user_topic_sortby_dir varbinary(1) DEFAULT 'd' NOT NULL,
+ user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_post_sortby_type varbinary(1) DEFAULT 't' NOT NULL,
+ user_post_sortby_dir varbinary(1) DEFAULT 'a' NOT NULL,
+ user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_notify_type tinyint(4) DEFAULT '0' NOT NULL,
+ user_allow_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_options int(11) UNSIGNED DEFAULT '230271' NOT NULL,
+ user_avatar varbinary(255) DEFAULT '' NOT NULL,
+ user_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
+ user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_sig mediumblob NOT NULL,
+ user_sig_bbcode_uid varbinary(8) DEFAULT '' NOT NULL,
+ user_sig_bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL,
+ user_from blob NOT NULL,
+ user_icq varbinary(15) DEFAULT '' NOT NULL,
+ user_aim blob NOT NULL,
+ user_yim blob NOT NULL,
+ user_msnm blob NOT NULL,
+ user_jabber blob NOT NULL,
+ user_website blob NOT NULL,
+ user_occ blob NOT NULL,
+ user_interests blob NOT NULL,
+ user_actkey varbinary(32) DEFAULT '' NOT NULL,
+ user_newpasswd varbinary(120) DEFAULT '' NOT NULL,
+ user_form_salt varbinary(96) DEFAULT '' NOT NULL,
+ user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_reminded tinyint(4) DEFAULT '0' NOT NULL,
+ user_reminded_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id),
+ KEY user_birthday (user_birthday),
+ KEY user_email_hash (user_email_hash),
+ KEY user_type (user_type),
+ UNIQUE username_clean (username_clean(255))
+);
+
+
+# Table: 'phpbb_warnings'
+CREATE TABLE phpbb_warnings (
+ warning_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ log_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ warning_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (warning_id)
+);
+
+
+# Table: 'phpbb_words'
+CREATE TABLE phpbb_words (
+ word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ word blob NOT NULL,
+ replacement blob NOT NULL,
+ PRIMARY KEY (word_id)
+);
+
+
+# Table: 'phpbb_zebra'
+CREATE TABLE phpbb_zebra (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ zebra_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ friend tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ foe tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, zebra_id)
+);
+
+
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
new file mode 100644
index 0000000000..34adf5674e
--- /dev/null
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -0,0 +1,1016 @@
+#
+# $Id$
+#
+
+# Table: 'phpbb_attachments'
+CREATE TABLE phpbb_attachments (
+ attach_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ post_msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ in_message tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ is_orphan tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ physical_filename varchar(255) DEFAULT '' NOT NULL,
+ real_filename varchar(255) DEFAULT '' NOT NULL,
+ download_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ attach_comment text NOT NULL,
+ extension varchar(100) DEFAULT '' NOT NULL,
+ mimetype varchar(100) DEFAULT '' NOT NULL,
+ filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
+ filetime int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ thumbnail tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (attach_id),
+ KEY filetime (filetime),
+ KEY post_msg_id (post_msg_id),
+ KEY topic_id (topic_id),
+ KEY poster_id (poster_id),
+ KEY is_orphan (is_orphan)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_acl_groups'
+CREATE TABLE phpbb_acl_groups (
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_setting tinyint(2) DEFAULT '0' NOT NULL,
+ KEY group_id (group_id),
+ KEY auth_opt_id (auth_option_id),
+ KEY auth_role_id (auth_role_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_acl_options'
+CREATE TABLE phpbb_acl_options (
+ auth_option_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ auth_option varchar(50) DEFAULT '' NOT NULL,
+ is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (auth_option_id),
+ UNIQUE auth_option (auth_option)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_acl_roles'
+CREATE TABLE phpbb_acl_roles (
+ role_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ role_name varchar(255) DEFAULT '' NOT NULL,
+ role_description text NOT NULL,
+ role_type varchar(10) DEFAULT '' NOT NULL,
+ role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (role_id),
+ KEY role_type (role_type),
+ KEY role_order (role_order)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_acl_roles_data'
+CREATE TABLE phpbb_acl_roles_data (
+ role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_setting tinyint(2) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (role_id, auth_option_id),
+ KEY ath_op_id (auth_option_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_acl_users'
+CREATE TABLE phpbb_acl_users (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_setting tinyint(2) DEFAULT '0' NOT NULL,
+ KEY user_id (user_id),
+ KEY auth_option_id (auth_option_id),
+ KEY auth_role_id (auth_role_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_banlist'
+CREATE TABLE phpbb_banlist (
+ ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_ip varchar(40) DEFAULT '' NOT NULL,
+ ban_email varchar(100) DEFAULT '' NOT NULL,
+ ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_reason varchar(255) DEFAULT '' NOT NULL,
+ ban_give_reason varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (ban_id),
+ KEY ban_end (ban_end),
+ KEY ban_user (ban_userid, ban_exclude),
+ KEY ban_email (ban_email, ban_exclude),
+ KEY ban_ip (ban_ip, ban_exclude)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_bbcodes'
+CREATE TABLE phpbb_bbcodes (
+ bbcode_id tinyint(3) DEFAULT '0' NOT NULL,
+ bbcode_tag varchar(16) DEFAULT '' NOT NULL,
+ bbcode_helpline varchar(255) DEFAULT '' NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_match text NOT NULL,
+ bbcode_tpl mediumtext NOT NULL,
+ first_pass_match mediumtext NOT NULL,
+ first_pass_replace mediumtext NOT NULL,
+ second_pass_match mediumtext NOT NULL,
+ second_pass_replace mediumtext NOT NULL,
+ PRIMARY KEY (bbcode_id),
+ KEY display_on_post (display_on_posting)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_bookmarks'
+CREATE TABLE phpbb_bookmarks (
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (topic_id, user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_bots'
+CREATE TABLE phpbb_bots (
+ bot_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ bot_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ bot_name varchar(255) DEFAULT '' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ bot_agent varchar(255) DEFAULT '' NOT NULL,
+ bot_ip varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (bot_id),
+ KEY bot_active (bot_active)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_config'
+CREATE TABLE phpbb_config (
+ config_name varchar(255) DEFAULT '' NOT NULL,
+ config_value varchar(255) DEFAULT '' NOT NULL,
+ is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (config_name),
+ KEY is_dynamic (is_dynamic)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_confirm'
+CREATE TABLE phpbb_confirm (
+ confirm_id char(32) DEFAULT '' NOT NULL,
+ session_id char(32) DEFAULT '' NOT NULL,
+ confirm_type tinyint(3) DEFAULT '0' NOT NULL,
+ code varchar(8) DEFAULT '' NOT NULL,
+ seed int(10) UNSIGNED DEFAULT '0' NOT NULL,
+ attempts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (session_id, confirm_id),
+ KEY confirm_type (confirm_type)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_disallow'
+CREATE TABLE phpbb_disallow (
+ disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ disallow_username varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (disallow_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_drafts'
+CREATE TABLE phpbb_drafts (
+ draft_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ save_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ draft_subject varchar(255) DEFAULT '' NOT NULL,
+ draft_message mediumtext NOT NULL,
+ PRIMARY KEY (draft_id),
+ KEY save_time (save_time)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_extensions'
+CREATE TABLE phpbb_extensions (
+ extension_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ extension varchar(100) DEFAULT '' NOT NULL,
+ PRIMARY KEY (extension_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_extension_groups'
+CREATE TABLE phpbb_extension_groups (
+ group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ group_name varchar(255) DEFAULT '' NOT NULL,
+ cat_id tinyint(2) DEFAULT '0' NOT NULL,
+ allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ upload_icon varchar(255) DEFAULT '' NOT NULL,
+ max_filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
+ allowed_forums text NOT NULL,
+ allow_in_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (group_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_forums'
+CREATE TABLE phpbb_forums (
+ forum_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_parents mediumtext NOT NULL,
+ forum_name varchar(255) DEFAULT '' NOT NULL,
+ forum_desc text NOT NULL,
+ forum_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
+ forum_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
+ forum_desc_uid varchar(8) DEFAULT '' NOT NULL,
+ forum_link varchar(255) DEFAULT '' NOT NULL,
+ forum_password varchar(40) DEFAULT '' NOT NULL,
+ forum_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_image varchar(255) DEFAULT '' NOT NULL,
+ forum_rules text NOT NULL,
+ forum_rules_link varchar(255) DEFAULT '' NOT NULL,
+ forum_rules_bitfield varchar(255) DEFAULT '' NOT NULL,
+ forum_rules_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
+ forum_rules_uid varchar(8) DEFAULT '' NOT NULL,
+ forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL,
+ forum_type tinyint(4) DEFAULT '0' NOT NULL,
+ forum_status tinyint(4) DEFAULT '0' NOT NULL,
+ forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_post_subject varchar(255) DEFAULT '' NOT NULL,
+ forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_poster_name varchar(255) DEFAULT '' NOT NULL,
+ forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
+ forum_flags tinyint(4) DEFAULT '32' NOT NULL,
+ forum_options int(20) UNSIGNED DEFAULT '0' NOT NULL,
+ display_subforum_list tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_indexing tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_icons tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_prune tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_next int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_days mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_viewed mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_freq mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (forum_id),
+ KEY left_right_id (left_id, right_id),
+ KEY forum_lastpost_id (forum_last_post_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_forums_access'
+CREATE TABLE phpbb_forums_access (
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_id char(32) DEFAULT '' NOT NULL,
+ PRIMARY KEY (forum_id, user_id, session_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_forums_track'
+CREATE TABLE phpbb_forums_track (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, forum_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_forums_watch'
+CREATE TABLE phpbb_forums_watch (
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY forum_id (forum_id),
+ KEY user_id (user_id),
+ KEY notify_stat (notify_status)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_groups'
+CREATE TABLE phpbb_groups (
+ group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ group_type tinyint(4) DEFAULT '1' NOT NULL,
+ group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_skip_auth tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_name varchar(255) DEFAULT '' NOT NULL,
+ group_desc text NOT NULL,
+ group_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
+ group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
+ group_desc_uid varchar(8) DEFAULT '' NOT NULL,
+ group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_avatar varchar(255) DEFAULT '' NOT NULL,
+ group_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
+ group_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ group_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_colour varchar(6) DEFAULT '' NOT NULL,
+ group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_receive_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_legend tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ PRIMARY KEY (group_id),
+ KEY group_legend_name (group_legend, group_name)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_icons'
+CREATE TABLE phpbb_icons (
+ icons_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ icons_url varchar(255) DEFAULT '' NOT NULL,
+ icons_width tinyint(4) DEFAULT '0' NOT NULL,
+ icons_height tinyint(4) DEFAULT '0' NOT NULL,
+ icons_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ PRIMARY KEY (icons_id),
+ KEY display_on_posting (display_on_posting)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_lang'
+CREATE TABLE phpbb_lang (
+ lang_id tinyint(4) NOT NULL auto_increment,
+ lang_iso varchar(30) DEFAULT '' NOT NULL,
+ lang_dir varchar(30) DEFAULT '' NOT NULL,
+ lang_english_name varchar(100) DEFAULT '' NOT NULL,
+ lang_local_name varchar(255) DEFAULT '' NOT NULL,
+ lang_author varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (lang_id),
+ KEY lang_iso (lang_iso)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_log'
+CREATE TABLE phpbb_log (
+ log_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ log_type tinyint(4) DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ log_ip varchar(40) DEFAULT '' NOT NULL,
+ log_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ log_operation text NOT NULL,
+ log_data mediumtext NOT NULL,
+ PRIMARY KEY (log_id),
+ KEY log_type (log_type),
+ KEY log_time (log_time),
+ KEY forum_id (forum_id),
+ KEY topic_id (topic_id),
+ KEY reportee_id (reportee_id),
+ KEY user_id (user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_moderator_cache'
+CREATE TABLE phpbb_moderator_cache (
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ username varchar(255) DEFAULT '' NOT NULL,
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_name varchar(255) DEFAULT '' NOT NULL,
+ display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ KEY disp_idx (display_on_index),
+ KEY forum_id (forum_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_modules'
+CREATE TABLE phpbb_modules (
+ module_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ module_basename varchar(255) DEFAULT '' NOT NULL,
+ module_class varchar(10) DEFAULT '' NOT NULL,
+ parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ module_langname varchar(255) DEFAULT '' NOT NULL,
+ module_mode varchar(255) DEFAULT '' NOT NULL,
+ module_auth varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (module_id),
+ KEY left_right_id (left_id, right_id),
+ KEY module_enabled (module_enabled),
+ KEY class_left_id (module_class, left_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_poll_options'
+CREATE TABLE phpbb_poll_options (
+ poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_option_text text NOT NULL,
+ poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY poll_opt_id (poll_option_id),
+ KEY topic_id (topic_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_poll_votes'
+CREATE TABLE phpbb_poll_votes (
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
+ vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ vote_user_ip varchar(40) DEFAULT '' NOT NULL,
+ KEY topic_id (topic_id),
+ KEY vote_user_id (vote_user_id),
+ KEY vote_user_ip (vote_user_ip)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_posts'
+CREATE TABLE phpbb_posts (
+ post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_ip varchar(40) DEFAULT '' NOT NULL,
+ post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ post_username varchar(255) DEFAULT '' NOT NULL,
+ post_subject varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
+ post_text mediumtext NOT NULL,
+ post_checksum varchar(32) DEFAULT '' NOT NULL,
+ post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
+ bbcode_uid varchar(8) DEFAULT '' NOT NULL,
+ post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ post_edit_reason varchar(255) DEFAULT '' NOT NULL,
+ post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (post_id),
+ KEY forum_id (forum_id),
+ KEY topic_id (topic_id),
+ KEY poster_ip (poster_ip),
+ KEY poster_id (poster_id),
+ KEY post_approved (post_approved),
+ KEY post_username (post_username),
+ KEY tid_post_time (topic_id, post_time)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_privmsgs'
+CREATE TABLE phpbb_privmsgs (
+ msg_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ author_ip varchar(40) DEFAULT '' NOT NULL,
+ message_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ message_subject varchar(255) DEFAULT '' NOT NULL,
+ message_text mediumtext NOT NULL,
+ message_edit_reason varchar(255) DEFAULT '' NOT NULL,
+ message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
+ bbcode_uid varchar(8) DEFAULT '' NOT NULL,
+ message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ to_address text NOT NULL,
+ bcc_address text NOT NULL,
+ message_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (msg_id),
+ KEY author_ip (author_ip),
+ KEY message_time (message_time),
+ KEY author_id (author_id),
+ KEY root_level (root_level)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_privmsgs_folder'
+CREATE TABLE phpbb_privmsgs_folder (
+ folder_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ folder_name varchar(255) DEFAULT '' NOT NULL,
+ pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (folder_id),
+ KEY user_id (user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_privmsgs_rules'
+CREATE TABLE phpbb_privmsgs_rules (
+ rule_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_string varchar(255) DEFAULT '' NOT NULL,
+ rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_folder_id int(11) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (rule_id),
+ KEY user_id (user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_privmsgs_to'
+CREATE TABLE phpbb_privmsgs_to (
+ msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ pm_unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ pm_replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ folder_id int(11) DEFAULT '0' NOT NULL,
+ KEY msg_id (msg_id),
+ KEY author_id (author_id),
+ KEY usr_flder_id (user_id, folder_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_profile_fields'
+CREATE TABLE phpbb_profile_fields (
+ field_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ field_name varchar(255) DEFAULT '' NOT NULL,
+ field_type tinyint(4) DEFAULT '0' NOT NULL,
+ field_ident varchar(20) DEFAULT '' NOT NULL,
+ field_length varchar(20) DEFAULT '' NOT NULL,
+ field_minlen varchar(255) DEFAULT '' NOT NULL,
+ field_maxlen varchar(255) DEFAULT '' NOT NULL,
+ field_novalue varchar(255) DEFAULT '' NOT NULL,
+ field_default_value varchar(255) DEFAULT '' NOT NULL,
+ field_validation varchar(20) DEFAULT '' NOT NULL,
+ field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_on_vt tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (field_id),
+ KEY fld_type (field_type),
+ KEY fld_ordr (field_order)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_profile_fields_data'
+CREATE TABLE phpbb_profile_fields_data (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_profile_fields_lang'
+CREATE TABLE phpbb_profile_fields_lang (
+ field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ field_type tinyint(4) DEFAULT '0' NOT NULL,
+ lang_value varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (field_id, lang_id, option_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_profile_lang'
+CREATE TABLE phpbb_profile_lang (
+ field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_name varchar(255) DEFAULT '' NOT NULL,
+ lang_explain text NOT NULL,
+ lang_default_value varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (field_id, lang_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_ranks'
+CREATE TABLE phpbb_ranks (
+ rank_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ rank_title varchar(255) DEFAULT '' NOT NULL,
+ rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ rank_image varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (rank_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_reports'
+CREATE TABLE phpbb_reports (
+ report_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ reason_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ report_text mediumtext NOT NULL,
+ PRIMARY KEY (report_id),
+ KEY post_id (post_id),
+ KEY pm_id (pm_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_reports_reasons'
+CREATE TABLE phpbb_reports_reasons (
+ reason_id smallint(4) UNSIGNED NOT NULL auto_increment,
+ reason_title varchar(255) DEFAULT '' NOT NULL,
+ reason_description mediumtext NOT NULL,
+ reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (reason_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_search_results'
+CREATE TABLE phpbb_search_results (
+ search_key varchar(32) DEFAULT '' NOT NULL,
+ search_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ search_keywords mediumtext NOT NULL,
+ search_authors mediumtext NOT NULL,
+ PRIMARY KEY (search_key)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_search_wordlist'
+CREATE TABLE phpbb_search_wordlist (
+ word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ word_text varchar(255) DEFAULT '' NOT NULL,
+ word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ word_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (word_id),
+ UNIQUE wrd_txt (word_text),
+ KEY wrd_cnt (word_count)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_search_wordmatch'
+CREATE TABLE phpbb_search_wordmatch (
+ post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ UNIQUE unq_mtch (word_id, post_id, title_match),
+ KEY word_id (word_id),
+ KEY post_id (post_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_sessions'
+CREATE TABLE phpbb_sessions (
+ session_id char(32) DEFAULT '' NOT NULL,
+ session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ session_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ session_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ session_ip varchar(40) DEFAULT '' NOT NULL,
+ session_browser varchar(150) DEFAULT '' NOT NULL,
+ session_forwarded_for varchar(255) DEFAULT '' NOT NULL,
+ session_page varchar(255) DEFAULT '' NOT NULL,
+ session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (session_id),
+ KEY session_time (session_time),
+ KEY session_user_id (session_user_id),
+ KEY session_fid (session_forum_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_sessions_keys'
+CREATE TABLE phpbb_sessions_keys (
+ key_id char(32) DEFAULT '' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ last_ip varchar(40) DEFAULT '' NOT NULL,
+ last_login int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (key_id, user_id),
+ KEY last_login (last_login)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_sitelist'
+CREATE TABLE phpbb_sitelist (
+ site_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ site_ip varchar(40) DEFAULT '' NOT NULL,
+ site_hostname varchar(255) DEFAULT '' NOT NULL,
+ ip_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (site_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_smilies'
+CREATE TABLE phpbb_smilies (
+ smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ code varchar(50) DEFAULT '' NOT NULL,
+ emotion varchar(50) DEFAULT '' NOT NULL,
+ smiley_url varchar(50) DEFAULT '' NOT NULL,
+ smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ smiley_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ PRIMARY KEY (smiley_id),
+ KEY display_on_post (display_on_posting)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_styles'
+CREATE TABLE phpbb_styles (
+ style_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ style_name varchar(255) DEFAULT '' NOT NULL,
+ style_copyright varchar(255) DEFAULT '' NOT NULL,
+ style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ theme_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (style_id),
+ UNIQUE style_name (style_name),
+ KEY template_id (template_id),
+ KEY theme_id (theme_id),
+ KEY imageset_id (imageset_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_styles_template'
+CREATE TABLE phpbb_styles_template (
+ template_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ template_name varchar(255) DEFAULT '' NOT NULL,
+ template_copyright varchar(255) DEFAULT '' NOT NULL,
+ template_path varchar(100) DEFAULT '' NOT NULL,
+ bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL,
+ template_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL,
+ template_inherit_path varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (template_id),
+ UNIQUE tmplte_nm (template_name)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_styles_template_data'
+CREATE TABLE phpbb_styles_template_data (
+ template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ template_filename varchar(100) DEFAULT '' NOT NULL,
+ template_included text NOT NULL,
+ template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ template_data mediumtext NOT NULL,
+ KEY tid (template_id),
+ KEY tfn (template_filename)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_styles_theme'
+CREATE TABLE phpbb_styles_theme (
+ theme_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ theme_name varchar(255) DEFAULT '' NOT NULL,
+ theme_copyright varchar(255) DEFAULT '' NOT NULL,
+ theme_path varchar(100) DEFAULT '' NOT NULL,
+ theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ theme_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ theme_data mediumtext NOT NULL,
+ PRIMARY KEY (theme_id),
+ UNIQUE theme_name (theme_name)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_styles_imageset'
+CREATE TABLE phpbb_styles_imageset (
+ imageset_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ imageset_name varchar(255) DEFAULT '' NOT NULL,
+ imageset_copyright varchar(255) DEFAULT '' NOT NULL,
+ imageset_path varchar(100) DEFAULT '' NOT NULL,
+ PRIMARY KEY (imageset_id),
+ UNIQUE imgset_nm (imageset_name)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_styles_imageset_data'
+CREATE TABLE phpbb_styles_imageset_data (
+ image_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ image_name varchar(200) DEFAULT '' NOT NULL,
+ image_filename varchar(200) DEFAULT '' NOT NULL,
+ image_lang varchar(30) DEFAULT '' NOT NULL,
+ image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (image_id),
+ KEY i_d (imageset_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_topics'
+CREATE TABLE phpbb_topics (
+ topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_title varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
+ topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_replies_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_status tinyint(3) DEFAULT '0' NOT NULL,
+ topic_type tinyint(3) DEFAULT '0' NOT NULL,
+ topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_first_poster_name varchar(255) DEFAULT '' NOT NULL,
+ topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL,
+ topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_last_poster_name varchar(255) DEFAULT '' NOT NULL,
+ topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
+ topic_last_post_subject varchar(255) DEFAULT '' NOT NULL,
+ topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_title varchar(255) DEFAULT '' NOT NULL,
+ poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
+ poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (topic_id),
+ KEY forum_id (forum_id),
+ KEY forum_id_type (forum_id, topic_type),
+ KEY last_post_time (topic_last_post_time),
+ KEY topic_approved (topic_approved),
+ KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id),
+ KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_topics_track'
+CREATE TABLE phpbb_topics_track (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, topic_id),
+ KEY forum_id (forum_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_topics_posted'
+CREATE TABLE phpbb_topics_posted (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, topic_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_topics_watch'
+CREATE TABLE phpbb_topics_watch (
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY topic_id (topic_id),
+ KEY user_id (user_id),
+ KEY notify_stat (notify_status)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_user_group'
+CREATE TABLE phpbb_user_group (
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_leader tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_pending tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ KEY group_id (group_id),
+ KEY user_id (user_id),
+ KEY group_leader (group_leader)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_users'
+CREATE TABLE phpbb_users (
+ user_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_type tinyint(2) DEFAULT '0' NOT NULL,
+ group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL,
+ user_permissions mediumtext NOT NULL,
+ user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_ip varchar(40) DEFAULT '' NOT NULL,
+ user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ username varchar(255) DEFAULT '' NOT NULL,
+ username_clean varchar(255) DEFAULT '' NOT NULL,
+ user_password varchar(40) DEFAULT '' NOT NULL,
+ user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_email varchar(100) DEFAULT '' NOT NULL,
+ user_email_hash bigint(20) DEFAULT '0' NOT NULL,
+ user_birthday varchar(10) DEFAULT '' NOT NULL,
+ user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lastpage varchar(200) DEFAULT '' NOT NULL,
+ user_last_confirm_key varchar(10) DEFAULT '' NOT NULL,
+ user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_warnings tinyint(4) DEFAULT '0' NOT NULL,
+ user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_login_attempts tinyint(4) DEFAULT '0' NOT NULL,
+ user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL,
+ user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lang varchar(30) DEFAULT '' NOT NULL,
+ user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
+ user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL,
+ user_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_colour varchar(6) DEFAULT '' NOT NULL,
+ user_new_privmsg int(4) DEFAULT '0' NOT NULL,
+ user_unread_privmsg int(4) DEFAULT '0' NOT NULL,
+ user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_full_folder int(11) DEFAULT '-3' NOT NULL,
+ user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL,
+ user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL,
+ user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL,
+ user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL,
+ user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_notify_type tinyint(4) DEFAULT '0' NOT NULL,
+ user_allow_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_options int(11) UNSIGNED DEFAULT '230271' NOT NULL,
+ user_avatar varchar(255) DEFAULT '' NOT NULL,
+ user_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
+ user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_sig mediumtext NOT NULL,
+ user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL,
+ user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
+ user_from varchar(100) DEFAULT '' NOT NULL,
+ user_icq varchar(15) DEFAULT '' NOT NULL,
+ user_aim varchar(255) DEFAULT '' NOT NULL,
+ user_yim varchar(255) DEFAULT '' NOT NULL,
+ user_msnm varchar(255) DEFAULT '' NOT NULL,
+ user_jabber varchar(255) DEFAULT '' NOT NULL,
+ user_website varchar(200) DEFAULT '' NOT NULL,
+ user_occ text NOT NULL,
+ user_interests text NOT NULL,
+ user_actkey varchar(32) DEFAULT '' NOT NULL,
+ user_newpasswd varchar(40) DEFAULT '' NOT NULL,
+ user_form_salt varchar(32) DEFAULT '' NOT NULL,
+ user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_reminded tinyint(4) DEFAULT '0' NOT NULL,
+ user_reminded_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id),
+ KEY user_birthday (user_birthday),
+ KEY user_email_hash (user_email_hash),
+ KEY user_type (user_type),
+ UNIQUE username_clean (username_clean)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_warnings'
+CREATE TABLE phpbb_warnings (
+ warning_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ log_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ warning_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (warning_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_words'
+CREATE TABLE phpbb_words (
+ word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ word varchar(255) DEFAULT '' NOT NULL,
+ replacement varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (word_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_zebra'
+CREATE TABLE phpbb_zebra (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ zebra_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ friend tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ foe tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, zebra_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
new file mode 100644
index 0000000000..15692ea984
--- /dev/null
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -0,0 +1,1898 @@
+/*
+
+ $Id$
+
+*/
+
+/*
+ This first section is optional, however its probably the best method
+ of running phpBB on Oracle. If you already have a tablespace and user created
+ for phpBB you can leave this section commented out!
+
+ The first set of statements create a phpBB tablespace and a phpBB user,
+ make sure you change the password of the phpBB user before you run this script!!
+*/
+
+/*
+CREATE TABLESPACE "PHPBB"
+ LOGGING
+ DATAFILE 'E:\ORACLE\ORADATA\LOCAL\PHPBB.ora'
+ SIZE 10M
+ AUTOEXTEND ON NEXT 10M
+ MAXSIZE 100M;
+
+CREATE USER "PHPBB"
+ PROFILE "DEFAULT"
+ IDENTIFIED BY "phpbb_password"
+ DEFAULT TABLESPACE "PHPBB"
+ QUOTA UNLIMITED ON "PHPBB"
+ ACCOUNT UNLOCK;
+
+GRANT ANALYZE ANY TO "PHPBB";
+GRANT CREATE SEQUENCE TO "PHPBB";
+GRANT CREATE SESSION TO "PHPBB";
+GRANT CREATE TABLE TO "PHPBB";
+GRANT CREATE TRIGGER TO "PHPBB";
+GRANT CREATE VIEW TO "PHPBB";
+GRANT "CONNECT" TO "PHPBB";
+
+COMMIT;
+DISCONNECT;
+
+CONNECT phpbb/phpbb_password;
+*/
+/*
+ Table: 'phpbb_attachments'
+*/
+CREATE TABLE phpbb_attachments (
+ attach_id number(8) NOT NULL,
+ post_msg_id number(8) DEFAULT '0' NOT NULL,
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ in_message number(1) DEFAULT '0' NOT NULL,
+ poster_id number(8) DEFAULT '0' NOT NULL,
+ is_orphan number(1) DEFAULT '1' NOT NULL,
+ physical_filename varchar2(255) DEFAULT '' ,
+ real_filename varchar2(255) DEFAULT '' ,
+ download_count number(8) DEFAULT '0' NOT NULL,
+ attach_comment clob DEFAULT '' ,
+ extension varchar2(100) DEFAULT '' ,
+ mimetype varchar2(100) DEFAULT '' ,
+ filesize number(20) DEFAULT '0' NOT NULL,
+ filetime number(11) DEFAULT '0' NOT NULL,
+ thumbnail number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_attachments PRIMARY KEY (attach_id)
+)
+/
+
+CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime)
+/
+CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id)
+/
+CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id)
+/
+CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id)
+/
+CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan)
+/
+
+CREATE SEQUENCE phpbb_attachments_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_attachments
+BEFORE INSERT ON phpbb_attachments
+FOR EACH ROW WHEN (
+ new.attach_id IS NULL OR new.attach_id = 0
+)
+BEGIN
+ SELECT phpbb_attachments_seq.nextval
+ INTO :new.attach_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_acl_groups'
+*/
+CREATE TABLE phpbb_acl_groups (
+ group_id number(8) DEFAULT '0' NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ auth_option_id number(8) DEFAULT '0' NOT NULL,
+ auth_role_id number(8) DEFAULT '0' NOT NULL,
+ auth_setting number(2) DEFAULT '0' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id)
+/
+CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id)
+/
+CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id)
+/
+
+/*
+ Table: 'phpbb_acl_options'
+*/
+CREATE TABLE phpbb_acl_options (
+ auth_option_id number(8) NOT NULL,
+ auth_option varchar2(50) DEFAULT '' ,
+ is_global number(1) DEFAULT '0' NOT NULL,
+ is_local number(1) DEFAULT '0' NOT NULL,
+ founder_only number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_acl_options PRIMARY KEY (auth_option_id),
+ CONSTRAINT u_phpbb_auth_option UNIQUE (auth_option)
+)
+/
+
+
+CREATE SEQUENCE phpbb_acl_options_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_acl_options
+BEFORE INSERT ON phpbb_acl_options
+FOR EACH ROW WHEN (
+ new.auth_option_id IS NULL OR new.auth_option_id = 0
+)
+BEGIN
+ SELECT phpbb_acl_options_seq.nextval
+ INTO :new.auth_option_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_acl_roles'
+*/
+CREATE TABLE phpbb_acl_roles (
+ role_id number(8) NOT NULL,
+ role_name varchar2(765) DEFAULT '' ,
+ role_description clob DEFAULT '' ,
+ role_type varchar2(10) DEFAULT '' ,
+ role_order number(4) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_acl_roles PRIMARY KEY (role_id)
+)
+/
+
+CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type)
+/
+CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order)
+/
+
+CREATE SEQUENCE phpbb_acl_roles_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_acl_roles
+BEFORE INSERT ON phpbb_acl_roles
+FOR EACH ROW WHEN (
+ new.role_id IS NULL OR new.role_id = 0
+)
+BEGIN
+ SELECT phpbb_acl_roles_seq.nextval
+ INTO :new.role_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_acl_roles_data'
+*/
+CREATE TABLE phpbb_acl_roles_data (
+ role_id number(8) DEFAULT '0' NOT NULL,
+ auth_option_id number(8) DEFAULT '0' NOT NULL,
+ auth_setting number(2) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_acl_roles_data PRIMARY KEY (role_id, auth_option_id)
+)
+/
+
+CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id)
+/
+
+/*
+ Table: 'phpbb_acl_users'
+*/
+CREATE TABLE phpbb_acl_users (
+ user_id number(8) DEFAULT '0' NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ auth_option_id number(8) DEFAULT '0' NOT NULL,
+ auth_role_id number(8) DEFAULT '0' NOT NULL,
+ auth_setting number(2) DEFAULT '0' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id)
+/
+CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id)
+/
+CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id)
+/
+
+/*
+ Table: 'phpbb_banlist'
+*/
+CREATE TABLE phpbb_banlist (
+ ban_id number(8) NOT NULL,
+ ban_userid number(8) DEFAULT '0' NOT NULL,
+ ban_ip varchar2(40) DEFAULT '' ,
+ ban_email varchar2(300) DEFAULT '' ,
+ ban_start number(11) DEFAULT '0' NOT NULL,
+ ban_end number(11) DEFAULT '0' NOT NULL,
+ ban_exclude number(1) DEFAULT '0' NOT NULL,
+ ban_reason varchar2(765) DEFAULT '' ,
+ ban_give_reason varchar2(765) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_banlist PRIMARY KEY (ban_id)
+)
+/
+
+CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end)
+/
+CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude)
+/
+CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude)
+/
+CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude)
+/
+
+CREATE SEQUENCE phpbb_banlist_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_banlist
+BEFORE INSERT ON phpbb_banlist
+FOR EACH ROW WHEN (
+ new.ban_id IS NULL OR new.ban_id = 0
+)
+BEGIN
+ SELECT phpbb_banlist_seq.nextval
+ INTO :new.ban_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_bbcodes'
+*/
+CREATE TABLE phpbb_bbcodes (
+ bbcode_id number(3) DEFAULT '0' NOT NULL,
+ bbcode_tag varchar2(16) DEFAULT '' ,
+ bbcode_helpline varchar2(765) DEFAULT '' ,
+ display_on_posting number(1) DEFAULT '0' NOT NULL,
+ bbcode_match clob DEFAULT '' ,
+ bbcode_tpl clob DEFAULT '' ,
+ first_pass_match clob DEFAULT '' ,
+ first_pass_replace clob DEFAULT '' ,
+ second_pass_match clob DEFAULT '' ,
+ second_pass_replace clob DEFAULT '' ,
+ CONSTRAINT pk_phpbb_bbcodes PRIMARY KEY (bbcode_id)
+)
+/
+
+CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting)
+/
+
+/*
+ Table: 'phpbb_bookmarks'
+*/
+CREATE TABLE phpbb_bookmarks (
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_bookmarks PRIMARY KEY (topic_id, user_id)
+)
+/
+
+
+/*
+ Table: 'phpbb_bots'
+*/
+CREATE TABLE phpbb_bots (
+ bot_id number(8) NOT NULL,
+ bot_active number(1) DEFAULT '1' NOT NULL,
+ bot_name varchar2(765) DEFAULT '' ,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ bot_agent varchar2(255) DEFAULT '' ,
+ bot_ip varchar2(255) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_bots PRIMARY KEY (bot_id)
+)
+/
+
+CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active)
+/
+
+CREATE SEQUENCE phpbb_bots_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_bots
+BEFORE INSERT ON phpbb_bots
+FOR EACH ROW WHEN (
+ new.bot_id IS NULL OR new.bot_id = 0
+)
+BEGIN
+ SELECT phpbb_bots_seq.nextval
+ INTO :new.bot_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_config'
+*/
+CREATE TABLE phpbb_config (
+ config_name varchar2(255) DEFAULT '' ,
+ config_value varchar2(765) DEFAULT '' ,
+ is_dynamic number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_config PRIMARY KEY (config_name)
+)
+/
+
+CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic)
+/
+
+/*
+ Table: 'phpbb_confirm'
+*/
+CREATE TABLE phpbb_confirm (
+ confirm_id char(32) DEFAULT '' ,
+ session_id char(32) DEFAULT '' ,
+ confirm_type number(3) DEFAULT '0' NOT NULL,
+ code varchar2(8) DEFAULT '' ,
+ seed number(10) DEFAULT '0' NOT NULL,
+ attempts number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_confirm PRIMARY KEY (session_id, confirm_id)
+)
+/
+
+CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type)
+/
+
+/*
+ Table: 'phpbb_disallow'
+*/
+CREATE TABLE phpbb_disallow (
+ disallow_id number(8) NOT NULL,
+ disallow_username varchar2(765) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_disallow PRIMARY KEY (disallow_id)
+)
+/
+
+
+CREATE SEQUENCE phpbb_disallow_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_disallow
+BEFORE INSERT ON phpbb_disallow
+FOR EACH ROW WHEN (
+ new.disallow_id IS NULL OR new.disallow_id = 0
+)
+BEGIN
+ SELECT phpbb_disallow_seq.nextval
+ INTO :new.disallow_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_drafts'
+*/
+CREATE TABLE phpbb_drafts (
+ draft_id number(8) NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ save_time number(11) DEFAULT '0' NOT NULL,
+ draft_subject varchar2(765) DEFAULT '' ,
+ draft_message clob DEFAULT '' ,
+ CONSTRAINT pk_phpbb_drafts PRIMARY KEY (draft_id)
+)
+/
+
+CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time)
+/
+
+CREATE SEQUENCE phpbb_drafts_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_drafts
+BEFORE INSERT ON phpbb_drafts
+FOR EACH ROW WHEN (
+ new.draft_id IS NULL OR new.draft_id = 0
+)
+BEGIN
+ SELECT phpbb_drafts_seq.nextval
+ INTO :new.draft_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_extensions'
+*/
+CREATE TABLE phpbb_extensions (
+ extension_id number(8) NOT NULL,
+ group_id number(8) DEFAULT '0' NOT NULL,
+ extension varchar2(100) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_extensions PRIMARY KEY (extension_id)
+)
+/
+
+
+CREATE SEQUENCE phpbb_extensions_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_extensions
+BEFORE INSERT ON phpbb_extensions
+FOR EACH ROW WHEN (
+ new.extension_id IS NULL OR new.extension_id = 0
+)
+BEGIN
+ SELECT phpbb_extensions_seq.nextval
+ INTO :new.extension_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_extension_groups'
+*/
+CREATE TABLE phpbb_extension_groups (
+ group_id number(8) NOT NULL,
+ group_name varchar2(765) DEFAULT '' ,
+ cat_id number(2) DEFAULT '0' NOT NULL,
+ allow_group number(1) DEFAULT '0' NOT NULL,
+ download_mode number(1) DEFAULT '1' NOT NULL,
+ upload_icon varchar2(255) DEFAULT '' ,
+ max_filesize number(20) DEFAULT '0' NOT NULL,
+ allowed_forums clob DEFAULT '' ,
+ allow_in_pm number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_extension_groups PRIMARY KEY (group_id)
+)
+/
+
+
+CREATE SEQUENCE phpbb_extension_groups_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_extension_groups
+BEFORE INSERT ON phpbb_extension_groups
+FOR EACH ROW WHEN (
+ new.group_id IS NULL OR new.group_id = 0
+)
+BEGIN
+ SELECT phpbb_extension_groups_seq.nextval
+ INTO :new.group_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_forums'
+*/
+CREATE TABLE phpbb_forums (
+ forum_id number(8) NOT NULL,
+ parent_id number(8) DEFAULT '0' NOT NULL,
+ left_id number(8) DEFAULT '0' NOT NULL,
+ right_id number(8) DEFAULT '0' NOT NULL,
+ forum_parents clob DEFAULT '' ,
+ forum_name varchar2(765) DEFAULT '' ,
+ forum_desc clob DEFAULT '' ,
+ forum_desc_bitfield varchar2(255) DEFAULT '' ,
+ forum_desc_options number(11) DEFAULT '7' NOT NULL,
+ forum_desc_uid varchar2(8) DEFAULT '' ,
+ forum_link varchar2(765) DEFAULT '' ,
+ forum_password varchar2(120) DEFAULT '' ,
+ forum_style number(8) DEFAULT '0' NOT NULL,
+ forum_image varchar2(255) DEFAULT '' ,
+ forum_rules clob DEFAULT '' ,
+ forum_rules_link varchar2(765) DEFAULT '' ,
+ forum_rules_bitfield varchar2(255) DEFAULT '' ,
+ forum_rules_options number(11) DEFAULT '7' NOT NULL,
+ forum_rules_uid varchar2(8) DEFAULT '' ,
+ forum_topics_per_page number(4) DEFAULT '0' NOT NULL,
+ forum_type number(4) DEFAULT '0' NOT NULL,
+ forum_status number(4) DEFAULT '0' NOT NULL,
+ forum_posts number(8) DEFAULT '0' NOT NULL,
+ forum_topics number(8) DEFAULT '0' NOT NULL,
+ forum_topics_real number(8) DEFAULT '0' NOT NULL,
+ forum_last_post_id number(8) DEFAULT '0' NOT NULL,
+ forum_last_poster_id number(8) DEFAULT '0' NOT NULL,
+ forum_last_post_subject varchar2(765) DEFAULT '' ,
+ forum_last_post_time number(11) DEFAULT '0' NOT NULL,
+ forum_last_poster_name varchar2(765) DEFAULT '' ,
+ forum_last_poster_colour varchar2(6) DEFAULT '' ,
+ forum_flags number(4) DEFAULT '32' NOT NULL,
+ forum_options number(20) DEFAULT '0' NOT NULL,
+ display_subforum_list number(1) DEFAULT '1' NOT NULL,
+ display_on_index number(1) DEFAULT '1' NOT NULL,
+ enable_indexing number(1) DEFAULT '1' NOT NULL,
+ enable_icons number(1) DEFAULT '1' NOT NULL,
+ enable_prune number(1) DEFAULT '0' NOT NULL,
+ prune_next number(11) DEFAULT '0' NOT NULL,
+ prune_days number(8) DEFAULT '0' NOT NULL,
+ prune_viewed number(8) DEFAULT '0' NOT NULL,
+ prune_freq number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_forums PRIMARY KEY (forum_id)
+)
+/
+
+CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id)
+/
+CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id)
+/
+
+CREATE SEQUENCE phpbb_forums_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_forums
+BEFORE INSERT ON phpbb_forums
+FOR EACH ROW WHEN (
+ new.forum_id IS NULL OR new.forum_id = 0
+)
+BEGIN
+ SELECT phpbb_forums_seq.nextval
+ INTO :new.forum_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_forums_access'
+*/
+CREATE TABLE phpbb_forums_access (
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ session_id char(32) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_forums_access PRIMARY KEY (forum_id, user_id, session_id)
+)
+/
+
+
+/*
+ Table: 'phpbb_forums_track'
+*/
+CREATE TABLE phpbb_forums_track (
+ user_id number(8) DEFAULT '0' NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ mark_time number(11) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_forums_track PRIMARY KEY (user_id, forum_id)
+)
+/
+
+
+/*
+ Table: 'phpbb_forums_watch'
+*/
+CREATE TABLE phpbb_forums_watch (
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ notify_status number(1) DEFAULT '0' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id)
+/
+CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id)
+/
+CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status)
+/
+
+/*
+ Table: 'phpbb_groups'
+*/
+CREATE TABLE phpbb_groups (
+ group_id number(8) NOT NULL,
+ group_type number(4) DEFAULT '1' NOT NULL,
+ group_founder_manage number(1) DEFAULT '0' NOT NULL,
+ group_skip_auth number(1) DEFAULT '0' NOT NULL,
+ group_name varchar2(255) DEFAULT '' ,
+ group_desc clob DEFAULT '' ,
+ group_desc_bitfield varchar2(255) DEFAULT '' ,
+ group_desc_options number(11) DEFAULT '7' NOT NULL,
+ group_desc_uid varchar2(8) DEFAULT '' ,
+ group_display number(1) DEFAULT '0' NOT NULL,
+ group_avatar varchar2(255) DEFAULT '' ,
+ group_avatar_type number(2) DEFAULT '0' NOT NULL,
+ group_avatar_width number(4) DEFAULT '0' NOT NULL,
+ group_avatar_height number(4) DEFAULT '0' NOT NULL,
+ group_rank number(8) DEFAULT '0' NOT NULL,
+ group_colour varchar2(6) DEFAULT '' ,
+ group_sig_chars number(8) DEFAULT '0' NOT NULL,
+ group_receive_pm number(1) DEFAULT '0' NOT NULL,
+ group_message_limit number(8) DEFAULT '0' NOT NULL,
+ group_max_recipients number(8) DEFAULT '0' NOT NULL,
+ group_legend number(1) DEFAULT '1' NOT NULL,
+ CONSTRAINT pk_phpbb_groups PRIMARY KEY (group_id)
+)
+/
+
+CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name)
+/
+
+CREATE SEQUENCE phpbb_groups_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_groups
+BEFORE INSERT ON phpbb_groups
+FOR EACH ROW WHEN (
+ new.group_id IS NULL OR new.group_id = 0
+)
+BEGIN
+ SELECT phpbb_groups_seq.nextval
+ INTO :new.group_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_icons'
+*/
+CREATE TABLE phpbb_icons (
+ icons_id number(8) NOT NULL,
+ icons_url varchar2(255) DEFAULT '' ,
+ icons_width number(4) DEFAULT '0' NOT NULL,
+ icons_height number(4) DEFAULT '0' NOT NULL,
+ icons_order number(8) DEFAULT '0' NOT NULL,
+ display_on_posting number(1) DEFAULT '1' NOT NULL,
+ CONSTRAINT pk_phpbb_icons PRIMARY KEY (icons_id)
+)
+/
+
+CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting)
+/
+
+CREATE SEQUENCE phpbb_icons_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_icons
+BEFORE INSERT ON phpbb_icons
+FOR EACH ROW WHEN (
+ new.icons_id IS NULL OR new.icons_id = 0
+)
+BEGIN
+ SELECT phpbb_icons_seq.nextval
+ INTO :new.icons_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_lang'
+*/
+CREATE TABLE phpbb_lang (
+ lang_id number(4) NOT NULL,
+ lang_iso varchar2(30) DEFAULT '' ,
+ lang_dir varchar2(30) DEFAULT '' ,
+ lang_english_name varchar2(300) DEFAULT '' ,
+ lang_local_name varchar2(765) DEFAULT '' ,
+ lang_author varchar2(765) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_lang PRIMARY KEY (lang_id)
+)
+/
+
+CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso)
+/
+
+CREATE SEQUENCE phpbb_lang_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_lang
+BEFORE INSERT ON phpbb_lang
+FOR EACH ROW WHEN (
+ new.lang_id IS NULL OR new.lang_id = 0
+)
+BEGIN
+ SELECT phpbb_lang_seq.nextval
+ INTO :new.lang_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_log'
+*/
+CREATE TABLE phpbb_log (
+ log_id number(8) NOT NULL,
+ log_type number(4) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ reportee_id number(8) DEFAULT '0' NOT NULL,
+ log_ip varchar2(40) DEFAULT '' ,
+ log_time number(11) DEFAULT '0' NOT NULL,
+ log_operation clob DEFAULT '' ,
+ log_data clob DEFAULT '' ,
+ CONSTRAINT pk_phpbb_log PRIMARY KEY (log_id)
+)
+/
+
+CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type)
+/
+CREATE INDEX phpbb_log_log_time ON phpbb_log (log_time)
+/
+CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id)
+/
+CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id)
+/
+CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id)
+/
+CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id)
+/
+
+CREATE SEQUENCE phpbb_log_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_log
+BEFORE INSERT ON phpbb_log
+FOR EACH ROW WHEN (
+ new.log_id IS NULL OR new.log_id = 0
+)
+BEGIN
+ SELECT phpbb_log_seq.nextval
+ INTO :new.log_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_moderator_cache'
+*/
+CREATE TABLE phpbb_moderator_cache (
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ username varchar2(765) DEFAULT '' ,
+ group_id number(8) DEFAULT '0' NOT NULL,
+ group_name varchar2(765) DEFAULT '' ,
+ display_on_index number(1) DEFAULT '1' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index)
+/
+CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id)
+/
+
+/*
+ Table: 'phpbb_modules'
+*/
+CREATE TABLE phpbb_modules (
+ module_id number(8) NOT NULL,
+ module_enabled number(1) DEFAULT '1' NOT NULL,
+ module_display number(1) DEFAULT '1' NOT NULL,
+ module_basename varchar2(255) DEFAULT '' ,
+ module_class varchar2(10) DEFAULT '' ,
+ parent_id number(8) DEFAULT '0' NOT NULL,
+ left_id number(8) DEFAULT '0' NOT NULL,
+ right_id number(8) DEFAULT '0' NOT NULL,
+ module_langname varchar2(255) DEFAULT '' ,
+ module_mode varchar2(255) DEFAULT '' ,
+ module_auth varchar2(255) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_modules PRIMARY KEY (module_id)
+)
+/
+
+CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id)
+/
+CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled)
+/
+CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id)
+/
+
+CREATE SEQUENCE phpbb_modules_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_modules
+BEFORE INSERT ON phpbb_modules
+FOR EACH ROW WHEN (
+ new.module_id IS NULL OR new.module_id = 0
+)
+BEGIN
+ SELECT phpbb_modules_seq.nextval
+ INTO :new.module_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_poll_options'
+*/
+CREATE TABLE phpbb_poll_options (
+ poll_option_id number(4) DEFAULT '0' NOT NULL,
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ poll_option_text clob DEFAULT '' ,
+ poll_option_total number(8) DEFAULT '0' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id)
+/
+CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id)
+/
+
+/*
+ Table: 'phpbb_poll_votes'
+*/
+CREATE TABLE phpbb_poll_votes (
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ poll_option_id number(4) DEFAULT '0' NOT NULL,
+ vote_user_id number(8) DEFAULT '0' NOT NULL,
+ vote_user_ip varchar2(40) DEFAULT ''
+)
+/
+
+CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id)
+/
+CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id)
+/
+CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip)
+/
+
+/*
+ Table: 'phpbb_posts'
+*/
+CREATE TABLE phpbb_posts (
+ post_id number(8) NOT NULL,
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ poster_id number(8) DEFAULT '0' NOT NULL,
+ icon_id number(8) DEFAULT '0' NOT NULL,
+ poster_ip varchar2(40) DEFAULT '' ,
+ post_time number(11) DEFAULT '0' NOT NULL,
+ post_approved number(1) DEFAULT '1' NOT NULL,
+ post_reported number(1) DEFAULT '0' NOT NULL,
+ enable_bbcode number(1) DEFAULT '1' NOT NULL,
+ enable_smilies number(1) DEFAULT '1' NOT NULL,
+ enable_magic_url number(1) DEFAULT '1' NOT NULL,
+ enable_sig number(1) DEFAULT '1' NOT NULL,
+ post_username varchar2(765) DEFAULT '' ,
+ post_subject varchar2(765) DEFAULT '' ,
+ post_text clob DEFAULT '' ,
+ post_checksum varchar2(32) DEFAULT '' ,
+ post_attachment number(1) DEFAULT '0' NOT NULL,
+ bbcode_bitfield varchar2(255) DEFAULT '' ,
+ bbcode_uid varchar2(8) DEFAULT '' ,
+ post_postcount number(1) DEFAULT '1' NOT NULL,
+ post_edit_time number(11) DEFAULT '0' NOT NULL,
+ post_edit_reason varchar2(765) DEFAULT '' ,
+ post_edit_user number(8) DEFAULT '0' NOT NULL,
+ post_edit_count number(4) DEFAULT '0' NOT NULL,
+ post_edit_locked number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_posts PRIMARY KEY (post_id)
+)
+/
+
+CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id)
+/
+CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id)
+/
+CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip)
+/
+CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id)
+/
+CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved)
+/
+CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username)
+/
+CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time)
+/
+
+CREATE SEQUENCE phpbb_posts_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_posts
+BEFORE INSERT ON phpbb_posts
+FOR EACH ROW WHEN (
+ new.post_id IS NULL OR new.post_id = 0
+)
+BEGIN
+ SELECT phpbb_posts_seq.nextval
+ INTO :new.post_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_privmsgs'
+*/
+CREATE TABLE phpbb_privmsgs (
+ msg_id number(8) NOT NULL,
+ root_level number(8) DEFAULT '0' NOT NULL,
+ author_id number(8) DEFAULT '0' NOT NULL,
+ icon_id number(8) DEFAULT '0' NOT NULL,
+ author_ip varchar2(40) DEFAULT '' ,
+ message_time number(11) DEFAULT '0' NOT NULL,
+ enable_bbcode number(1) DEFAULT '1' NOT NULL,
+ enable_smilies number(1) DEFAULT '1' NOT NULL,
+ enable_magic_url number(1) DEFAULT '1' NOT NULL,
+ enable_sig number(1) DEFAULT '1' NOT NULL,
+ message_subject varchar2(765) DEFAULT '' ,
+ message_text clob DEFAULT '' ,
+ message_edit_reason varchar2(765) DEFAULT '' ,
+ message_edit_user number(8) DEFAULT '0' NOT NULL,
+ message_attachment number(1) DEFAULT '0' NOT NULL,
+ bbcode_bitfield varchar2(255) DEFAULT '' ,
+ bbcode_uid varchar2(8) DEFAULT '' ,
+ message_edit_time number(11) DEFAULT '0' NOT NULL,
+ message_edit_count number(4) DEFAULT '0' NOT NULL,
+ to_address clob DEFAULT '' ,
+ bcc_address clob DEFAULT '' ,
+ message_reported number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_privmsgs PRIMARY KEY (msg_id)
+)
+/
+
+CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip)
+/
+CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time)
+/
+CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id)
+/
+CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level)
+/
+
+CREATE SEQUENCE phpbb_privmsgs_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_privmsgs
+BEFORE INSERT ON phpbb_privmsgs
+FOR EACH ROW WHEN (
+ new.msg_id IS NULL OR new.msg_id = 0
+)
+BEGIN
+ SELECT phpbb_privmsgs_seq.nextval
+ INTO :new.msg_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_privmsgs_folder'
+*/
+CREATE TABLE phpbb_privmsgs_folder (
+ folder_id number(8) NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ folder_name varchar2(765) DEFAULT '' ,
+ pm_count number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_privmsgs_folder PRIMARY KEY (folder_id)
+)
+/
+
+CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id)
+/
+
+CREATE SEQUENCE phpbb_privmsgs_folder_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_privmsgs_folder
+BEFORE INSERT ON phpbb_privmsgs_folder
+FOR EACH ROW WHEN (
+ new.folder_id IS NULL OR new.folder_id = 0
+)
+BEGIN
+ SELECT phpbb_privmsgs_folder_seq.nextval
+ INTO :new.folder_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_privmsgs_rules'
+*/
+CREATE TABLE phpbb_privmsgs_rules (
+ rule_id number(8) NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ rule_check number(8) DEFAULT '0' NOT NULL,
+ rule_connection number(8) DEFAULT '0' NOT NULL,
+ rule_string varchar2(765) DEFAULT '' ,
+ rule_user_id number(8) DEFAULT '0' NOT NULL,
+ rule_group_id number(8) DEFAULT '0' NOT NULL,
+ rule_action number(8) DEFAULT '0' NOT NULL,
+ rule_folder_id number(11) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_privmsgs_rules PRIMARY KEY (rule_id)
+)
+/
+
+CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id)
+/
+
+CREATE SEQUENCE phpbb_privmsgs_rules_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_privmsgs_rules
+BEFORE INSERT ON phpbb_privmsgs_rules
+FOR EACH ROW WHEN (
+ new.rule_id IS NULL OR new.rule_id = 0
+)
+BEGIN
+ SELECT phpbb_privmsgs_rules_seq.nextval
+ INTO :new.rule_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_privmsgs_to'
+*/
+CREATE TABLE phpbb_privmsgs_to (
+ msg_id number(8) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ author_id number(8) DEFAULT '0' NOT NULL,
+ pm_deleted number(1) DEFAULT '0' NOT NULL,
+ pm_new number(1) DEFAULT '1' NOT NULL,
+ pm_unread number(1) DEFAULT '1' NOT NULL,
+ pm_replied number(1) DEFAULT '0' NOT NULL,
+ pm_marked number(1) DEFAULT '0' NOT NULL,
+ pm_forwarded number(1) DEFAULT '0' NOT NULL,
+ folder_id number(11) DEFAULT '0' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id)
+/
+CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id)
+/
+CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id)
+/
+
+/*
+ Table: 'phpbb_profile_fields'
+*/
+CREATE TABLE phpbb_profile_fields (
+ field_id number(8) NOT NULL,
+ field_name varchar2(765) DEFAULT '' ,
+ field_type number(4) DEFAULT '0' NOT NULL,
+ field_ident varchar2(20) DEFAULT '' ,
+ field_length varchar2(20) DEFAULT '' ,
+ field_minlen varchar2(255) DEFAULT '' ,
+ field_maxlen varchar2(255) DEFAULT '' ,
+ field_novalue varchar2(765) DEFAULT '' ,
+ field_default_value varchar2(765) DEFAULT '' ,
+ field_validation varchar2(60) DEFAULT '' ,
+ field_required number(1) DEFAULT '0' NOT NULL,
+ field_show_on_reg number(1) DEFAULT '0' NOT NULL,
+ field_show_on_vt number(1) DEFAULT '0' NOT NULL,
+ field_show_profile number(1) DEFAULT '0' NOT NULL,
+ field_hide number(1) DEFAULT '0' NOT NULL,
+ field_no_view number(1) DEFAULT '0' NOT NULL,
+ field_active number(1) DEFAULT '0' NOT NULL,
+ field_order number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_profile_fields PRIMARY KEY (field_id)
+)
+/
+
+CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type)
+/
+CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order)
+/
+
+CREATE SEQUENCE phpbb_profile_fields_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_profile_fields
+BEFORE INSERT ON phpbb_profile_fields
+FOR EACH ROW WHEN (
+ new.field_id IS NULL OR new.field_id = 0
+)
+BEGIN
+ SELECT phpbb_profile_fields_seq.nextval
+ INTO :new.field_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_profile_fields_data'
+*/
+CREATE TABLE phpbb_profile_fields_data (
+ user_id number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_profile_fields_data PRIMARY KEY (user_id)
+)
+/
+
+
+/*
+ Table: 'phpbb_profile_fields_lang'
+*/
+CREATE TABLE phpbb_profile_fields_lang (
+ field_id number(8) DEFAULT '0' NOT NULL,
+ lang_id number(8) DEFAULT '0' NOT NULL,
+ option_id number(8) DEFAULT '0' NOT NULL,
+ field_type number(4) DEFAULT '0' NOT NULL,
+ lang_value varchar2(765) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_profile_fields_lang PRIMARY KEY (field_id, lang_id, option_id)
+)
+/
+
+
+/*
+ Table: 'phpbb_profile_lang'
+*/
+CREATE TABLE phpbb_profile_lang (
+ field_id number(8) DEFAULT '0' NOT NULL,
+ lang_id number(8) DEFAULT '0' NOT NULL,
+ lang_name varchar2(765) DEFAULT '' ,
+ lang_explain clob DEFAULT '' ,
+ lang_default_value varchar2(765) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_profile_lang PRIMARY KEY (field_id, lang_id)
+)
+/
+
+
+/*
+ Table: 'phpbb_ranks'
+*/
+CREATE TABLE phpbb_ranks (
+ rank_id number(8) NOT NULL,
+ rank_title varchar2(765) DEFAULT '' ,
+ rank_min number(8) DEFAULT '0' NOT NULL,
+ rank_special number(1) DEFAULT '0' NOT NULL,
+ rank_image varchar2(255) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_ranks PRIMARY KEY (rank_id)
+)
+/
+
+
+CREATE SEQUENCE phpbb_ranks_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_ranks
+BEFORE INSERT ON phpbb_ranks
+FOR EACH ROW WHEN (
+ new.rank_id IS NULL OR new.rank_id = 0
+)
+BEGIN
+ SELECT phpbb_ranks_seq.nextval
+ INTO :new.rank_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_reports'
+*/
+CREATE TABLE phpbb_reports (
+ report_id number(8) NOT NULL,
+ reason_id number(4) DEFAULT '0' NOT NULL,
+ post_id number(8) DEFAULT '0' NOT NULL,
+ pm_id number(8) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ user_notify number(1) DEFAULT '0' NOT NULL,
+ report_closed number(1) DEFAULT '0' NOT NULL,
+ report_time number(11) DEFAULT '0' NOT NULL,
+ report_text clob DEFAULT '' ,
+ CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id)
+)
+/
+
+CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id)
+/
+CREATE INDEX phpbb_reports_pm_id ON phpbb_reports (pm_id)
+/
+
+CREATE SEQUENCE phpbb_reports_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_reports
+BEFORE INSERT ON phpbb_reports
+FOR EACH ROW WHEN (
+ new.report_id IS NULL OR new.report_id = 0
+)
+BEGIN
+ SELECT phpbb_reports_seq.nextval
+ INTO :new.report_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_reports_reasons'
+*/
+CREATE TABLE phpbb_reports_reasons (
+ reason_id number(4) NOT NULL,
+ reason_title varchar2(765) DEFAULT '' ,
+ reason_description clob DEFAULT '' ,
+ reason_order number(4) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_reports_reasons PRIMARY KEY (reason_id)
+)
+/
+
+
+CREATE SEQUENCE phpbb_reports_reasons_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_reports_reasons
+BEFORE INSERT ON phpbb_reports_reasons
+FOR EACH ROW WHEN (
+ new.reason_id IS NULL OR new.reason_id = 0
+)
+BEGIN
+ SELECT phpbb_reports_reasons_seq.nextval
+ INTO :new.reason_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_search_results'
+*/
+CREATE TABLE phpbb_search_results (
+ search_key varchar2(32) DEFAULT '' ,
+ search_time number(11) DEFAULT '0' NOT NULL,
+ search_keywords clob DEFAULT '' ,
+ search_authors clob DEFAULT '' ,
+ CONSTRAINT pk_phpbb_search_results PRIMARY KEY (search_key)
+)
+/
+
+
+/*
+ Table: 'phpbb_search_wordlist'
+*/
+CREATE TABLE phpbb_search_wordlist (
+ word_id number(8) NOT NULL,
+ word_text varchar2(765) DEFAULT '' ,
+ word_common number(1) DEFAULT '0' NOT NULL,
+ word_count number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_search_wordlist PRIMARY KEY (word_id),
+ CONSTRAINT u_phpbb_wrd_txt UNIQUE (word_text)
+)
+/
+
+CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count)
+/
+
+CREATE SEQUENCE phpbb_search_wordlist_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_search_wordlist
+BEFORE INSERT ON phpbb_search_wordlist
+FOR EACH ROW WHEN (
+ new.word_id IS NULL OR new.word_id = 0
+)
+BEGIN
+ SELECT phpbb_search_wordlist_seq.nextval
+ INTO :new.word_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_search_wordmatch'
+*/
+CREATE TABLE phpbb_search_wordmatch (
+ post_id number(8) DEFAULT '0' NOT NULL,
+ word_id number(8) DEFAULT '0' NOT NULL,
+ title_match number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT u_phpbb_unq_mtch UNIQUE (word_id, post_id, title_match)
+)
+/
+
+CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id)
+/
+CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id)
+/
+
+/*
+ Table: 'phpbb_sessions'
+*/
+CREATE TABLE phpbb_sessions (
+ session_id char(32) DEFAULT '' ,
+ session_user_id number(8) DEFAULT '0' NOT NULL,
+ session_forum_id number(8) DEFAULT '0' NOT NULL,
+ session_last_visit number(11) DEFAULT '0' NOT NULL,
+ session_start number(11) DEFAULT '0' NOT NULL,
+ session_time number(11) DEFAULT '0' NOT NULL,
+ session_ip varchar2(40) DEFAULT '' ,
+ session_browser varchar2(150) DEFAULT '' ,
+ session_forwarded_for varchar2(255) DEFAULT '' ,
+ session_page varchar2(765) DEFAULT '' ,
+ session_viewonline number(1) DEFAULT '1' NOT NULL,
+ session_autologin number(1) DEFAULT '0' NOT NULL,
+ session_admin number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_sessions PRIMARY KEY (session_id)
+)
+/
+
+CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time)
+/
+CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id)
+/
+CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id)
+/
+
+/*
+ Table: 'phpbb_sessions_keys'
+*/
+CREATE TABLE phpbb_sessions_keys (
+ key_id char(32) DEFAULT '' ,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ last_ip varchar2(40) DEFAULT '' ,
+ last_login number(11) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_sessions_keys PRIMARY KEY (key_id, user_id)
+)
+/
+
+CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login)
+/
+
+/*
+ Table: 'phpbb_sitelist'
+*/
+CREATE TABLE phpbb_sitelist (
+ site_id number(8) NOT NULL,
+ site_ip varchar2(40) DEFAULT '' ,
+ site_hostname varchar2(255) DEFAULT '' ,
+ ip_exclude number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_sitelist PRIMARY KEY (site_id)
+)
+/
+
+
+CREATE SEQUENCE phpbb_sitelist_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_sitelist
+BEFORE INSERT ON phpbb_sitelist
+FOR EACH ROW WHEN (
+ new.site_id IS NULL OR new.site_id = 0
+)
+BEGIN
+ SELECT phpbb_sitelist_seq.nextval
+ INTO :new.site_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_smilies'
+*/
+CREATE TABLE phpbb_smilies (
+ smiley_id number(8) NOT NULL,
+ code varchar2(150) DEFAULT '' ,
+ emotion varchar2(150) DEFAULT '' ,
+ smiley_url varchar2(50) DEFAULT '' ,
+ smiley_width number(4) DEFAULT '0' NOT NULL,
+ smiley_height number(4) DEFAULT '0' NOT NULL,
+ smiley_order number(8) DEFAULT '0' NOT NULL,
+ display_on_posting number(1) DEFAULT '1' NOT NULL,
+ CONSTRAINT pk_phpbb_smilies PRIMARY KEY (smiley_id)
+)
+/
+
+CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting)
+/
+
+CREATE SEQUENCE phpbb_smilies_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_smilies
+BEFORE INSERT ON phpbb_smilies
+FOR EACH ROW WHEN (
+ new.smiley_id IS NULL OR new.smiley_id = 0
+)
+BEGIN
+ SELECT phpbb_smilies_seq.nextval
+ INTO :new.smiley_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_styles'
+*/
+CREATE TABLE phpbb_styles (
+ style_id number(8) NOT NULL,
+ style_name varchar2(765) DEFAULT '' ,
+ style_copyright varchar2(765) DEFAULT '' ,
+ style_active number(1) DEFAULT '1' NOT NULL,
+ template_id number(8) DEFAULT '0' NOT NULL,
+ theme_id number(8) DEFAULT '0' NOT NULL,
+ imageset_id number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_styles PRIMARY KEY (style_id),
+ CONSTRAINT u_phpbb_style_name UNIQUE (style_name)
+)
+/
+
+CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id)
+/
+CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id)
+/
+CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id)
+/
+
+CREATE SEQUENCE phpbb_styles_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_styles
+BEFORE INSERT ON phpbb_styles
+FOR EACH ROW WHEN (
+ new.style_id IS NULL OR new.style_id = 0
+)
+BEGIN
+ SELECT phpbb_styles_seq.nextval
+ INTO :new.style_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_styles_template'
+*/
+CREATE TABLE phpbb_styles_template (
+ template_id number(8) NOT NULL,
+ template_name varchar2(765) DEFAULT '' ,
+ template_copyright varchar2(765) DEFAULT '' ,
+ template_path varchar2(100) DEFAULT '' ,
+ bbcode_bitfield varchar2(255) DEFAULT 'kNg=' NOT NULL,
+ template_storedb number(1) DEFAULT '0' NOT NULL,
+ template_inherits_id number(4) DEFAULT '0' NOT NULL,
+ template_inherit_path varchar2(255) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_styles_template PRIMARY KEY (template_id),
+ CONSTRAINT u_phpbb_tmplte_nm UNIQUE (template_name)
+)
+/
+
+
+CREATE SEQUENCE phpbb_styles_template_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_styles_template
+BEFORE INSERT ON phpbb_styles_template
+FOR EACH ROW WHEN (
+ new.template_id IS NULL OR new.template_id = 0
+)
+BEGIN
+ SELECT phpbb_styles_template_seq.nextval
+ INTO :new.template_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_styles_template_data'
+*/
+CREATE TABLE phpbb_styles_template_data (
+ template_id number(8) DEFAULT '0' NOT NULL,
+ template_filename varchar2(100) DEFAULT '' ,
+ template_included clob DEFAULT '' ,
+ template_mtime number(11) DEFAULT '0' NOT NULL,
+ template_data clob DEFAULT ''
+)
+/
+
+CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id)
+/
+CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename)
+/
+
+/*
+ Table: 'phpbb_styles_theme'
+*/
+CREATE TABLE phpbb_styles_theme (
+ theme_id number(8) NOT NULL,
+ theme_name varchar2(765) DEFAULT '' ,
+ theme_copyright varchar2(765) DEFAULT '' ,
+ theme_path varchar2(100) DEFAULT '' ,
+ theme_storedb number(1) DEFAULT '0' NOT NULL,
+ theme_mtime number(11) DEFAULT '0' NOT NULL,
+ theme_data clob DEFAULT '' ,
+ CONSTRAINT pk_phpbb_styles_theme PRIMARY KEY (theme_id),
+ CONSTRAINT u_phpbb_theme_name UNIQUE (theme_name)
+)
+/
+
+
+CREATE SEQUENCE phpbb_styles_theme_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_styles_theme
+BEFORE INSERT ON phpbb_styles_theme
+FOR EACH ROW WHEN (
+ new.theme_id IS NULL OR new.theme_id = 0
+)
+BEGIN
+ SELECT phpbb_styles_theme_seq.nextval
+ INTO :new.theme_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_styles_imageset'
+*/
+CREATE TABLE phpbb_styles_imageset (
+ imageset_id number(8) NOT NULL,
+ imageset_name varchar2(765) DEFAULT '' ,
+ imageset_copyright varchar2(765) DEFAULT '' ,
+ imageset_path varchar2(100) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_styles_imageset PRIMARY KEY (imageset_id),
+ CONSTRAINT u_phpbb_imgset_nm UNIQUE (imageset_name)
+)
+/
+
+
+CREATE SEQUENCE phpbb_styles_imageset_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_styles_imageset
+BEFORE INSERT ON phpbb_styles_imageset
+FOR EACH ROW WHEN (
+ new.imageset_id IS NULL OR new.imageset_id = 0
+)
+BEGIN
+ SELECT phpbb_styles_imageset_seq.nextval
+ INTO :new.imageset_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_styles_imageset_data'
+*/
+CREATE TABLE phpbb_styles_imageset_data (
+ image_id number(8) NOT NULL,
+ image_name varchar2(200) DEFAULT '' ,
+ image_filename varchar2(200) DEFAULT '' ,
+ image_lang varchar2(30) DEFAULT '' ,
+ image_height number(4) DEFAULT '0' NOT NULL,
+ image_width number(4) DEFAULT '0' NOT NULL,
+ imageset_id number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_styles_imageset_data PRIMARY KEY (image_id)
+)
+/
+
+CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id)
+/
+
+CREATE SEQUENCE phpbb_styles_imageset_data_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_styles_imageset_data
+BEFORE INSERT ON phpbb_styles_imageset_data
+FOR EACH ROW WHEN (
+ new.image_id IS NULL OR new.image_id = 0
+)
+BEGIN
+ SELECT phpbb_styles_imageset_data_seq.nextval
+ INTO :new.image_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_topics'
+*/
+CREATE TABLE phpbb_topics (
+ topic_id number(8) NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ icon_id number(8) DEFAULT '0' NOT NULL,
+ topic_attachment number(1) DEFAULT '0' NOT NULL,
+ topic_approved number(1) DEFAULT '1' NOT NULL,
+ topic_reported number(1) DEFAULT '0' NOT NULL,
+ topic_title varchar2(765) DEFAULT '' ,
+ topic_poster number(8) DEFAULT '0' NOT NULL,
+ topic_time number(11) DEFAULT '0' NOT NULL,
+ topic_time_limit number(11) DEFAULT '0' NOT NULL,
+ topic_views number(8) DEFAULT '0' NOT NULL,
+ topic_replies number(8) DEFAULT '0' NOT NULL,
+ topic_replies_real number(8) DEFAULT '0' NOT NULL,
+ topic_status number(3) DEFAULT '0' NOT NULL,
+ topic_type number(3) DEFAULT '0' NOT NULL,
+ topic_first_post_id number(8) DEFAULT '0' NOT NULL,
+ topic_first_poster_name varchar2(765) DEFAULT '' ,
+ topic_first_poster_colour varchar2(6) DEFAULT '' ,
+ topic_last_post_id number(8) DEFAULT '0' NOT NULL,
+ topic_last_poster_id number(8) DEFAULT '0' NOT NULL,
+ topic_last_poster_name varchar2(765) DEFAULT '' ,
+ topic_last_poster_colour varchar2(6) DEFAULT '' ,
+ topic_last_post_subject varchar2(765) DEFAULT '' ,
+ topic_last_post_time number(11) DEFAULT '0' NOT NULL,
+ topic_last_view_time number(11) DEFAULT '0' NOT NULL,
+ topic_moved_id number(8) DEFAULT '0' NOT NULL,
+ topic_bumped number(1) DEFAULT '0' NOT NULL,
+ topic_bumper number(8) DEFAULT '0' NOT NULL,
+ poll_title varchar2(765) DEFAULT '' ,
+ poll_start number(11) DEFAULT '0' NOT NULL,
+ poll_length number(11) DEFAULT '0' NOT NULL,
+ poll_max_options number(4) DEFAULT '1' NOT NULL,
+ poll_last_vote number(11) DEFAULT '0' NOT NULL,
+ poll_vote_change number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_topics PRIMARY KEY (topic_id)
+)
+/
+
+CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id)
+/
+CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type)
+/
+CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time)
+/
+CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved)
+/
+CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id)
+/
+CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id)
+/
+
+CREATE SEQUENCE phpbb_topics_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_topics
+BEFORE INSERT ON phpbb_topics
+FOR EACH ROW WHEN (
+ new.topic_id IS NULL OR new.topic_id = 0
+)
+BEGIN
+ SELECT phpbb_topics_seq.nextval
+ INTO :new.topic_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_topics_track'
+*/
+CREATE TABLE phpbb_topics_track (
+ user_id number(8) DEFAULT '0' NOT NULL,
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ mark_time number(11) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_topics_track PRIMARY KEY (user_id, topic_id)
+)
+/
+
+CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id)
+/
+
+/*
+ Table: 'phpbb_topics_posted'
+*/
+CREATE TABLE phpbb_topics_posted (
+ user_id number(8) DEFAULT '0' NOT NULL,
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ topic_posted number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_topics_posted PRIMARY KEY (user_id, topic_id)
+)
+/
+
+
+/*
+ Table: 'phpbb_topics_watch'
+*/
+CREATE TABLE phpbb_topics_watch (
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ notify_status number(1) DEFAULT '0' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id)
+/
+CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id)
+/
+CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status)
+/
+
+/*
+ Table: 'phpbb_user_group'
+*/
+CREATE TABLE phpbb_user_group (
+ group_id number(8) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ group_leader number(1) DEFAULT '0' NOT NULL,
+ user_pending number(1) DEFAULT '1' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id)
+/
+CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id)
+/
+CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader)
+/
+
+/*
+ Table: 'phpbb_users'
+*/
+CREATE TABLE phpbb_users (
+ user_id number(8) NOT NULL,
+ user_type number(2) DEFAULT '0' NOT NULL,
+ group_id number(8) DEFAULT '3' NOT NULL,
+ user_permissions clob DEFAULT '' ,
+ user_perm_from number(8) DEFAULT '0' NOT NULL,
+ user_ip varchar2(40) DEFAULT '' ,
+ user_regdate number(11) DEFAULT '0' NOT NULL,
+ username varchar2(255) DEFAULT '' ,
+ username_clean varchar2(255) DEFAULT '' ,
+ user_password varchar2(120) DEFAULT '' ,
+ user_passchg number(11) DEFAULT '0' NOT NULL,
+ user_pass_convert number(1) DEFAULT '0' NOT NULL,
+ user_email varchar2(300) DEFAULT '' ,
+ user_email_hash number(20) DEFAULT '0' NOT NULL,
+ user_birthday varchar2(10) DEFAULT '' ,
+ user_lastvisit number(11) DEFAULT '0' NOT NULL,
+ user_lastmark number(11) DEFAULT '0' NOT NULL,
+ user_lastpost_time number(11) DEFAULT '0' NOT NULL,
+ user_lastpage varchar2(600) DEFAULT '' ,
+ user_last_confirm_key varchar2(10) DEFAULT '' ,
+ user_last_search number(11) DEFAULT '0' NOT NULL,
+ user_warnings number(4) DEFAULT '0' NOT NULL,
+ user_last_warning number(11) DEFAULT '0' NOT NULL,
+ user_login_attempts number(4) DEFAULT '0' NOT NULL,
+ user_inactive_reason number(2) DEFAULT '0' NOT NULL,
+ user_inactive_time number(11) DEFAULT '0' NOT NULL,
+ user_posts number(8) DEFAULT '0' NOT NULL,
+ user_lang varchar2(30) DEFAULT '' ,
+ user_timezone number(5, 2) DEFAULT '0' NOT NULL,
+ user_dst number(1) DEFAULT '0' NOT NULL,
+ user_dateformat varchar2(90) DEFAULT 'd M Y H:i' NOT NULL,
+ user_style number(8) DEFAULT '0' NOT NULL,
+ user_rank number(8) DEFAULT '0' NOT NULL,
+ user_colour varchar2(6) DEFAULT '' ,
+ user_new_privmsg number(4) DEFAULT '0' NOT NULL,
+ user_unread_privmsg number(4) DEFAULT '0' NOT NULL,
+ user_last_privmsg number(11) DEFAULT '0' NOT NULL,
+ user_message_rules number(1) DEFAULT '0' NOT NULL,
+ user_full_folder number(11) DEFAULT '-3' NOT NULL,
+ user_emailtime number(11) DEFAULT '0' NOT NULL,
+ user_topic_show_days number(4) DEFAULT '0' NOT NULL,
+ user_topic_sortby_type varchar2(1) DEFAULT 't' NOT NULL,
+ user_topic_sortby_dir varchar2(1) DEFAULT 'd' NOT NULL,
+ user_post_show_days number(4) DEFAULT '0' NOT NULL,
+ user_post_sortby_type varchar2(1) DEFAULT 't' NOT NULL,
+ user_post_sortby_dir varchar2(1) DEFAULT 'a' NOT NULL,
+ user_notify number(1) DEFAULT '0' NOT NULL,
+ user_notify_pm number(1) DEFAULT '1' NOT NULL,
+ user_notify_type number(4) DEFAULT '0' NOT NULL,
+ user_allow_pm number(1) DEFAULT '1' NOT NULL,
+ user_allow_viewonline number(1) DEFAULT '1' NOT NULL,
+ user_allow_viewemail number(1) DEFAULT '1' NOT NULL,
+ user_allow_massemail number(1) DEFAULT '1' NOT NULL,
+ user_options number(11) DEFAULT '230271' NOT NULL,
+ user_avatar varchar2(255) DEFAULT '' ,
+ user_avatar_type number(2) DEFAULT '0' NOT NULL,
+ user_avatar_width number(4) DEFAULT '0' NOT NULL,
+ user_avatar_height number(4) DEFAULT '0' NOT NULL,
+ user_sig clob DEFAULT '' ,
+ user_sig_bbcode_uid varchar2(8) DEFAULT '' ,
+ user_sig_bbcode_bitfield varchar2(255) DEFAULT '' ,
+ user_from varchar2(300) DEFAULT '' ,
+ user_icq varchar2(15) DEFAULT '' ,
+ user_aim varchar2(765) DEFAULT '' ,
+ user_yim varchar2(765) DEFAULT '' ,
+ user_msnm varchar2(765) DEFAULT '' ,
+ user_jabber varchar2(765) DEFAULT '' ,
+ user_website varchar2(600) DEFAULT '' ,
+ user_occ clob DEFAULT '' ,
+ user_interests clob DEFAULT '' ,
+ user_actkey varchar2(32) DEFAULT '' ,
+ user_newpasswd varchar2(120) DEFAULT '' ,
+ user_form_salt varchar2(96) DEFAULT '' ,
+ user_new number(1) DEFAULT '1' NOT NULL,
+ user_reminded number(4) DEFAULT '0' NOT NULL,
+ user_reminded_time number(11) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_users PRIMARY KEY (user_id),
+ CONSTRAINT u_phpbb_username_clean UNIQUE (username_clean)
+)
+/
+
+CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday)
+/
+CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash)
+/
+CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type)
+/
+
+CREATE SEQUENCE phpbb_users_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_users
+BEFORE INSERT ON phpbb_users
+FOR EACH ROW WHEN (
+ new.user_id IS NULL OR new.user_id = 0
+)
+BEGIN
+ SELECT phpbb_users_seq.nextval
+ INTO :new.user_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_warnings'
+*/
+CREATE TABLE phpbb_warnings (
+ warning_id number(8) NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ post_id number(8) DEFAULT '0' NOT NULL,
+ log_id number(8) DEFAULT '0' NOT NULL,
+ warning_time number(11) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_warnings PRIMARY KEY (warning_id)
+)
+/
+
+
+CREATE SEQUENCE phpbb_warnings_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_warnings
+BEFORE INSERT ON phpbb_warnings
+FOR EACH ROW WHEN (
+ new.warning_id IS NULL OR new.warning_id = 0
+)
+BEGIN
+ SELECT phpbb_warnings_seq.nextval
+ INTO :new.warning_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_words'
+*/
+CREATE TABLE phpbb_words (
+ word_id number(8) NOT NULL,
+ word varchar2(765) DEFAULT '' ,
+ replacement varchar2(765) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_words PRIMARY KEY (word_id)
+)
+/
+
+
+CREATE SEQUENCE phpbb_words_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_words
+BEFORE INSERT ON phpbb_words
+FOR EACH ROW WHEN (
+ new.word_id IS NULL OR new.word_id = 0
+)
+BEGIN
+ SELECT phpbb_words_seq.nextval
+ INTO :new.word_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_zebra'
+*/
+CREATE TABLE phpbb_zebra (
+ user_id number(8) DEFAULT '0' NOT NULL,
+ zebra_id number(8) DEFAULT '0' NOT NULL,
+ friend number(1) DEFAULT '0' NOT NULL,
+ foe number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_zebra PRIMARY KEY (user_id, zebra_id)
+)
+/
+
+
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
new file mode 100644
index 0000000000..46e77e64b4
--- /dev/null
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -0,0 +1,1291 @@
+/*
+
+ $Id$
+
+*/
+
+BEGIN;
+
+/*
+ Domain definition
+*/
+CREATE DOMAIN varchar_ci AS varchar(255) NOT NULL DEFAULT ''::character varying;
+
+/*
+ Operation Functions
+*/
+CREATE FUNCTION _varchar_ci_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) = LOWER($2)' LANGUAGE SQL STRICT;
+CREATE FUNCTION _varchar_ci_not_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) != LOWER($2)' LANGUAGE SQL STRICT;
+CREATE FUNCTION _varchar_ci_less_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) < LOWER($2)' LANGUAGE SQL STRICT;
+CREATE FUNCTION _varchar_ci_less_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) <= LOWER($2)' LANGUAGE SQL STRICT;
+CREATE FUNCTION _varchar_ci_greater_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) > LOWER($2)' LANGUAGE SQL STRICT;
+CREATE FUNCTION _varchar_ci_greater_equals(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) >= LOWER($2)' LANGUAGE SQL STRICT;
+
+/*
+ Operators
+*/
+CREATE OPERATOR <(
+ PROCEDURE = _varchar_ci_less_than,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = >,
+ NEGATOR = >=,
+ RESTRICT = scalarltsel,
+ JOIN = scalarltjoinsel);
+
+CREATE OPERATOR <=(
+ PROCEDURE = _varchar_ci_less_equal,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = >=,
+ NEGATOR = >,
+ RESTRICT = scalarltsel,
+ JOIN = scalarltjoinsel);
+
+CREATE OPERATOR >(
+ PROCEDURE = _varchar_ci_greater_than,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = <,
+ NEGATOR = <=,
+ RESTRICT = scalargtsel,
+ JOIN = scalargtjoinsel);
+
+CREATE OPERATOR >=(
+ PROCEDURE = _varchar_ci_greater_equals,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = <=,
+ NEGATOR = <,
+ RESTRICT = scalargtsel,
+ JOIN = scalargtjoinsel);
+
+CREATE OPERATOR <>(
+ PROCEDURE = _varchar_ci_not_equal,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = <>,
+ NEGATOR = =,
+ RESTRICT = neqsel,
+ JOIN = neqjoinsel);
+
+CREATE OPERATOR =(
+ PROCEDURE = _varchar_ci_equal,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = =,
+ NEGATOR = <>,
+ RESTRICT = eqsel,
+ JOIN = eqjoinsel,
+ HASHES,
+ MERGES,
+ SORT1= <);
+
+/*
+ Table: 'phpbb_attachments'
+*/
+CREATE SEQUENCE phpbb_attachments_seq;
+
+CREATE TABLE phpbb_attachments (
+ attach_id INT4 DEFAULT nextval('phpbb_attachments_seq'),
+ post_msg_id INT4 DEFAULT '0' NOT NULL CHECK (post_msg_id >= 0),
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ in_message INT2 DEFAULT '0' NOT NULL CHECK (in_message >= 0),
+ poster_id INT4 DEFAULT '0' NOT NULL CHECK (poster_id >= 0),
+ is_orphan INT2 DEFAULT '1' NOT NULL CHECK (is_orphan >= 0),
+ physical_filename varchar(255) DEFAULT '' NOT NULL,
+ real_filename varchar(255) DEFAULT '' NOT NULL,
+ download_count INT4 DEFAULT '0' NOT NULL CHECK (download_count >= 0),
+ attach_comment varchar(4000) DEFAULT '' NOT NULL,
+ extension varchar(100) DEFAULT '' NOT NULL,
+ mimetype varchar(100) DEFAULT '' NOT NULL,
+ filesize INT4 DEFAULT '0' NOT NULL CHECK (filesize >= 0),
+ filetime INT4 DEFAULT '0' NOT NULL CHECK (filetime >= 0),
+ thumbnail INT2 DEFAULT '0' NOT NULL CHECK (thumbnail >= 0),
+ PRIMARY KEY (attach_id)
+);
+
+CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime);
+CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id);
+CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id);
+CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id);
+CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan);
+
+/*
+ Table: 'phpbb_acl_groups'
+*/
+CREATE TABLE phpbb_acl_groups (
+ group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0),
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ auth_option_id INT4 DEFAULT '0' NOT NULL CHECK (auth_option_id >= 0),
+ auth_role_id INT4 DEFAULT '0' NOT NULL CHECK (auth_role_id >= 0),
+ auth_setting INT2 DEFAULT '0' NOT NULL
+);
+
+CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id);
+CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id);
+CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id);
+
+/*
+ Table: 'phpbb_acl_options'
+*/
+CREATE SEQUENCE phpbb_acl_options_seq;
+
+CREATE TABLE phpbb_acl_options (
+ auth_option_id INT4 DEFAULT nextval('phpbb_acl_options_seq'),
+ auth_option varchar(50) DEFAULT '' NOT NULL,
+ is_global INT2 DEFAULT '0' NOT NULL CHECK (is_global >= 0),
+ is_local INT2 DEFAULT '0' NOT NULL CHECK (is_local >= 0),
+ founder_only INT2 DEFAULT '0' NOT NULL CHECK (founder_only >= 0),
+ PRIMARY KEY (auth_option_id)
+);
+
+CREATE UNIQUE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options (auth_option);
+
+/*
+ Table: 'phpbb_acl_roles'
+*/
+CREATE SEQUENCE phpbb_acl_roles_seq;
+
+CREATE TABLE phpbb_acl_roles (
+ role_id INT4 DEFAULT nextval('phpbb_acl_roles_seq'),
+ role_name varchar(255) DEFAULT '' NOT NULL,
+ role_description varchar(4000) DEFAULT '' NOT NULL,
+ role_type varchar(10) DEFAULT '' NOT NULL,
+ role_order INT2 DEFAULT '0' NOT NULL CHECK (role_order >= 0),
+ PRIMARY KEY (role_id)
+);
+
+CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type);
+CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order);
+
+/*
+ Table: 'phpbb_acl_roles_data'
+*/
+CREATE TABLE phpbb_acl_roles_data (
+ role_id INT4 DEFAULT '0' NOT NULL CHECK (role_id >= 0),
+ auth_option_id INT4 DEFAULT '0' NOT NULL CHECK (auth_option_id >= 0),
+ auth_setting INT2 DEFAULT '0' NOT NULL,
+ PRIMARY KEY (role_id, auth_option_id)
+);
+
+CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id);
+
+/*
+ Table: 'phpbb_acl_users'
+*/
+CREATE TABLE phpbb_acl_users (
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ auth_option_id INT4 DEFAULT '0' NOT NULL CHECK (auth_option_id >= 0),
+ auth_role_id INT4 DEFAULT '0' NOT NULL CHECK (auth_role_id >= 0),
+ auth_setting INT2 DEFAULT '0' NOT NULL
+);
+
+CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id);
+CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
+CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
+
+/*
+ Table: 'phpbb_banlist'
+*/
+CREATE SEQUENCE phpbb_banlist_seq;
+
+CREATE TABLE phpbb_banlist (
+ ban_id INT4 DEFAULT nextval('phpbb_banlist_seq'),
+ ban_userid INT4 DEFAULT '0' NOT NULL CHECK (ban_userid >= 0),
+ ban_ip varchar(40) DEFAULT '' NOT NULL,
+ ban_email varchar(100) DEFAULT '' NOT NULL,
+ ban_start INT4 DEFAULT '0' NOT NULL CHECK (ban_start >= 0),
+ ban_end INT4 DEFAULT '0' NOT NULL CHECK (ban_end >= 0),
+ ban_exclude INT2 DEFAULT '0' NOT NULL CHECK (ban_exclude >= 0),
+ ban_reason varchar(255) DEFAULT '' NOT NULL,
+ ban_give_reason varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (ban_id)
+);
+
+CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end);
+CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude);
+CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude);
+CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude);
+
+/*
+ Table: 'phpbb_bbcodes'
+*/
+CREATE TABLE phpbb_bbcodes (
+ bbcode_id INT2 DEFAULT '0' NOT NULL,
+ bbcode_tag varchar(16) DEFAULT '' NOT NULL,
+ bbcode_helpline varchar(255) DEFAULT '' NOT NULL,
+ display_on_posting INT2 DEFAULT '0' NOT NULL CHECK (display_on_posting >= 0),
+ bbcode_match varchar(4000) DEFAULT '' NOT NULL,
+ bbcode_tpl TEXT DEFAULT '' NOT NULL,
+ first_pass_match TEXT DEFAULT '' NOT NULL,
+ first_pass_replace TEXT DEFAULT '' NOT NULL,
+ second_pass_match TEXT DEFAULT '' NOT NULL,
+ second_pass_replace TEXT DEFAULT '' NOT NULL,
+ PRIMARY KEY (bbcode_id)
+);
+
+CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting);
+
+/*
+ Table: 'phpbb_bookmarks'
+*/
+CREATE TABLE phpbb_bookmarks (
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ PRIMARY KEY (topic_id, user_id)
+);
+
+
+/*
+ Table: 'phpbb_bots'
+*/
+CREATE SEQUENCE phpbb_bots_seq;
+
+CREATE TABLE phpbb_bots (
+ bot_id INT4 DEFAULT nextval('phpbb_bots_seq'),
+ bot_active INT2 DEFAULT '1' NOT NULL CHECK (bot_active >= 0),
+ bot_name varchar(255) DEFAULT '' NOT NULL,
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ bot_agent varchar(255) DEFAULT '' NOT NULL,
+ bot_ip varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (bot_id)
+);
+
+CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active);
+
+/*
+ Table: 'phpbb_config'
+*/
+CREATE TABLE phpbb_config (
+ config_name varchar(255) DEFAULT '' NOT NULL,
+ config_value varchar(255) DEFAULT '' NOT NULL,
+ is_dynamic INT2 DEFAULT '0' NOT NULL CHECK (is_dynamic >= 0),
+ PRIMARY KEY (config_name)
+);
+
+CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic);
+
+/*
+ Table: 'phpbb_confirm'
+*/
+CREATE TABLE phpbb_confirm (
+ confirm_id char(32) DEFAULT '' NOT NULL,
+ session_id char(32) DEFAULT '' NOT NULL,
+ confirm_type INT2 DEFAULT '0' NOT NULL,
+ code varchar(8) DEFAULT '' NOT NULL,
+ seed INT4 DEFAULT '0' NOT NULL CHECK (seed >= 0),
+ attempts INT4 DEFAULT '0' NOT NULL CHECK (attempts >= 0),
+ PRIMARY KEY (session_id, confirm_id)
+);
+
+CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type);
+
+/*
+ Table: 'phpbb_disallow'
+*/
+CREATE SEQUENCE phpbb_disallow_seq;
+
+CREATE TABLE phpbb_disallow (
+ disallow_id INT4 DEFAULT nextval('phpbb_disallow_seq'),
+ disallow_username varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (disallow_id)
+);
+
+
+/*
+ Table: 'phpbb_drafts'
+*/
+CREATE SEQUENCE phpbb_drafts_seq;
+
+CREATE TABLE phpbb_drafts (
+ draft_id INT4 DEFAULT nextval('phpbb_drafts_seq'),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ save_time INT4 DEFAULT '0' NOT NULL CHECK (save_time >= 0),
+ draft_subject varchar(255) DEFAULT '' NOT NULL,
+ draft_message TEXT DEFAULT '' NOT NULL,
+ PRIMARY KEY (draft_id)
+);
+
+CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time);
+
+/*
+ Table: 'phpbb_extensions'
+*/
+CREATE SEQUENCE phpbb_extensions_seq;
+
+CREATE TABLE phpbb_extensions (
+ extension_id INT4 DEFAULT nextval('phpbb_extensions_seq'),
+ group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0),
+ extension varchar(100) DEFAULT '' NOT NULL,
+ PRIMARY KEY (extension_id)
+);
+
+
+/*
+ Table: 'phpbb_extension_groups'
+*/
+CREATE SEQUENCE phpbb_extension_groups_seq;
+
+CREATE TABLE phpbb_extension_groups (
+ group_id INT4 DEFAULT nextval('phpbb_extension_groups_seq'),
+ group_name varchar(255) DEFAULT '' NOT NULL,
+ cat_id INT2 DEFAULT '0' NOT NULL,
+ allow_group INT2 DEFAULT '0' NOT NULL CHECK (allow_group >= 0),
+ download_mode INT2 DEFAULT '1' NOT NULL CHECK (download_mode >= 0),
+ upload_icon varchar(255) DEFAULT '' NOT NULL,
+ max_filesize INT4 DEFAULT '0' NOT NULL CHECK (max_filesize >= 0),
+ allowed_forums varchar(8000) DEFAULT '' NOT NULL,
+ allow_in_pm INT2 DEFAULT '0' NOT NULL CHECK (allow_in_pm >= 0),
+ PRIMARY KEY (group_id)
+);
+
+
+/*
+ Table: 'phpbb_forums'
+*/
+CREATE SEQUENCE phpbb_forums_seq;
+
+CREATE TABLE phpbb_forums (
+ forum_id INT4 DEFAULT nextval('phpbb_forums_seq'),
+ parent_id INT4 DEFAULT '0' NOT NULL CHECK (parent_id >= 0),
+ left_id INT4 DEFAULT '0' NOT NULL CHECK (left_id >= 0),
+ right_id INT4 DEFAULT '0' NOT NULL CHECK (right_id >= 0),
+ forum_parents TEXT DEFAULT '' NOT NULL,
+ forum_name varchar(255) DEFAULT '' NOT NULL,
+ forum_desc varchar(4000) DEFAULT '' NOT NULL,
+ forum_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
+ forum_desc_options INT4 DEFAULT '7' NOT NULL CHECK (forum_desc_options >= 0),
+ forum_desc_uid varchar(8) DEFAULT '' NOT NULL,
+ forum_link varchar(255) DEFAULT '' NOT NULL,
+ forum_password varchar(40) DEFAULT '' NOT NULL,
+ forum_style INT4 DEFAULT '0' NOT NULL CHECK (forum_style >= 0),
+ forum_image varchar(255) DEFAULT '' NOT NULL,
+ forum_rules varchar(4000) DEFAULT '' NOT NULL,
+ forum_rules_link varchar(255) DEFAULT '' NOT NULL,
+ forum_rules_bitfield varchar(255) DEFAULT '' NOT NULL,
+ forum_rules_options INT4 DEFAULT '7' NOT NULL CHECK (forum_rules_options >= 0),
+ forum_rules_uid varchar(8) DEFAULT '' NOT NULL,
+ forum_topics_per_page INT2 DEFAULT '0' NOT NULL,
+ forum_type INT2 DEFAULT '0' NOT NULL,
+ forum_status INT2 DEFAULT '0' NOT NULL,
+ forum_posts INT4 DEFAULT '0' NOT NULL CHECK (forum_posts >= 0),
+ forum_topics INT4 DEFAULT '0' NOT NULL CHECK (forum_topics >= 0),
+ forum_topics_real INT4 DEFAULT '0' NOT NULL CHECK (forum_topics_real >= 0),
+ forum_last_post_id INT4 DEFAULT '0' NOT NULL CHECK (forum_last_post_id >= 0),
+ forum_last_poster_id INT4 DEFAULT '0' NOT NULL CHECK (forum_last_poster_id >= 0),
+ forum_last_post_subject varchar(255) DEFAULT '' NOT NULL,
+ forum_last_post_time INT4 DEFAULT '0' NOT NULL CHECK (forum_last_post_time >= 0),
+ forum_last_poster_name varchar(255) DEFAULT '' NOT NULL,
+ forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
+ forum_flags INT2 DEFAULT '32' NOT NULL,
+ forum_options INT4 DEFAULT '0' NOT NULL CHECK (forum_options >= 0),
+ display_subforum_list INT2 DEFAULT '1' NOT NULL CHECK (display_subforum_list >= 0),
+ display_on_index INT2 DEFAULT '1' NOT NULL CHECK (display_on_index >= 0),
+ enable_indexing INT2 DEFAULT '1' NOT NULL CHECK (enable_indexing >= 0),
+ enable_icons INT2 DEFAULT '1' NOT NULL CHECK (enable_icons >= 0),
+ enable_prune INT2 DEFAULT '0' NOT NULL CHECK (enable_prune >= 0),
+ prune_next INT4 DEFAULT '0' NOT NULL CHECK (prune_next >= 0),
+ prune_days INT4 DEFAULT '0' NOT NULL CHECK (prune_days >= 0),
+ prune_viewed INT4 DEFAULT '0' NOT NULL CHECK (prune_viewed >= 0),
+ prune_freq INT4 DEFAULT '0' NOT NULL CHECK (prune_freq >= 0),
+ PRIMARY KEY (forum_id)
+);
+
+CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id);
+CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id);
+
+/*
+ Table: 'phpbb_forums_access'
+*/
+CREATE TABLE phpbb_forums_access (
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ session_id char(32) DEFAULT '' NOT NULL,
+ PRIMARY KEY (forum_id, user_id, session_id)
+);
+
+
+/*
+ Table: 'phpbb_forums_track'
+*/
+CREATE TABLE phpbb_forums_track (
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ mark_time INT4 DEFAULT '0' NOT NULL CHECK (mark_time >= 0),
+ PRIMARY KEY (user_id, forum_id)
+);
+
+
+/*
+ Table: 'phpbb_forums_watch'
+*/
+CREATE TABLE phpbb_forums_watch (
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ notify_status INT2 DEFAULT '0' NOT NULL CHECK (notify_status >= 0)
+);
+
+CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id);
+CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id);
+CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status);
+
+/*
+ Table: 'phpbb_groups'
+*/
+CREATE SEQUENCE phpbb_groups_seq;
+
+CREATE TABLE phpbb_groups (
+ group_id INT4 DEFAULT nextval('phpbb_groups_seq'),
+ group_type INT2 DEFAULT '1' NOT NULL,
+ group_founder_manage INT2 DEFAULT '0' NOT NULL CHECK (group_founder_manage >= 0),
+ group_skip_auth INT2 DEFAULT '0' NOT NULL CHECK (group_skip_auth >= 0),
+ group_name varchar_ci DEFAULT '' NOT NULL,
+ group_desc varchar(4000) DEFAULT '' NOT NULL,
+ group_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
+ group_desc_options INT4 DEFAULT '7' NOT NULL CHECK (group_desc_options >= 0),
+ group_desc_uid varchar(8) DEFAULT '' NOT NULL,
+ group_display INT2 DEFAULT '0' NOT NULL CHECK (group_display >= 0),
+ group_avatar varchar(255) DEFAULT '' NOT NULL,
+ group_avatar_type INT2 DEFAULT '0' NOT NULL,
+ group_avatar_width INT2 DEFAULT '0' NOT NULL CHECK (group_avatar_width >= 0),
+ group_avatar_height INT2 DEFAULT '0' NOT NULL CHECK (group_avatar_height >= 0),
+ group_rank INT4 DEFAULT '0' NOT NULL CHECK (group_rank >= 0),
+ group_colour varchar(6) DEFAULT '' NOT NULL,
+ group_sig_chars INT4 DEFAULT '0' NOT NULL CHECK (group_sig_chars >= 0),
+ group_receive_pm INT2 DEFAULT '0' NOT NULL CHECK (group_receive_pm >= 0),
+ group_message_limit INT4 DEFAULT '0' NOT NULL CHECK (group_message_limit >= 0),
+ group_max_recipients INT4 DEFAULT '0' NOT NULL CHECK (group_max_recipients >= 0),
+ group_legend INT2 DEFAULT '1' NOT NULL CHECK (group_legend >= 0),
+ PRIMARY KEY (group_id)
+);
+
+CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name);
+
+/*
+ Table: 'phpbb_icons'
+*/
+CREATE SEQUENCE phpbb_icons_seq;
+
+CREATE TABLE phpbb_icons (
+ icons_id INT4 DEFAULT nextval('phpbb_icons_seq'),
+ icons_url varchar(255) DEFAULT '' NOT NULL,
+ icons_width INT2 DEFAULT '0' NOT NULL,
+ icons_height INT2 DEFAULT '0' NOT NULL,
+ icons_order INT4 DEFAULT '0' NOT NULL CHECK (icons_order >= 0),
+ display_on_posting INT2 DEFAULT '1' NOT NULL CHECK (display_on_posting >= 0),
+ PRIMARY KEY (icons_id)
+);
+
+CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting);
+
+/*
+ Table: 'phpbb_lang'
+*/
+CREATE SEQUENCE phpbb_lang_seq;
+
+CREATE TABLE phpbb_lang (
+ lang_id INT2 DEFAULT nextval('phpbb_lang_seq'),
+ lang_iso varchar(30) DEFAULT '' NOT NULL,
+ lang_dir varchar(30) DEFAULT '' NOT NULL,
+ lang_english_name varchar(100) DEFAULT '' NOT NULL,
+ lang_local_name varchar(255) DEFAULT '' NOT NULL,
+ lang_author varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (lang_id)
+);
+
+CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso);
+
+/*
+ Table: 'phpbb_log'
+*/
+CREATE SEQUENCE phpbb_log_seq;
+
+CREATE TABLE phpbb_log (
+ log_id INT4 DEFAULT nextval('phpbb_log_seq'),
+ log_type INT2 DEFAULT '0' NOT NULL,
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ reportee_id INT4 DEFAULT '0' NOT NULL CHECK (reportee_id >= 0),
+ log_ip varchar(40) DEFAULT '' NOT NULL,
+ log_time INT4 DEFAULT '0' NOT NULL CHECK (log_time >= 0),
+ log_operation varchar(4000) DEFAULT '' NOT NULL,
+ log_data TEXT DEFAULT '' NOT NULL,
+ PRIMARY KEY (log_id)
+);
+
+CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type);
+CREATE INDEX phpbb_log_log_time ON phpbb_log (log_time);
+CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id);
+CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id);
+CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id);
+CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id);
+
+/*
+ Table: 'phpbb_moderator_cache'
+*/
+CREATE TABLE phpbb_moderator_cache (
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ username varchar(255) DEFAULT '' NOT NULL,
+ group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0),
+ group_name varchar(255) DEFAULT '' NOT NULL,
+ display_on_index INT2 DEFAULT '1' NOT NULL CHECK (display_on_index >= 0)
+);
+
+CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index);
+CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id);
+
+/*
+ Table: 'phpbb_modules'
+*/
+CREATE SEQUENCE phpbb_modules_seq;
+
+CREATE TABLE phpbb_modules (
+ module_id INT4 DEFAULT nextval('phpbb_modules_seq'),
+ module_enabled INT2 DEFAULT '1' NOT NULL CHECK (module_enabled >= 0),
+ module_display INT2 DEFAULT '1' NOT NULL CHECK (module_display >= 0),
+ module_basename varchar(255) DEFAULT '' NOT NULL,
+ module_class varchar(10) DEFAULT '' NOT NULL,
+ parent_id INT4 DEFAULT '0' NOT NULL CHECK (parent_id >= 0),
+ left_id INT4 DEFAULT '0' NOT NULL CHECK (left_id >= 0),
+ right_id INT4 DEFAULT '0' NOT NULL CHECK (right_id >= 0),
+ module_langname varchar(255) DEFAULT '' NOT NULL,
+ module_mode varchar(255) DEFAULT '' NOT NULL,
+ module_auth varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (module_id)
+);
+
+CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id);
+CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled);
+CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id);
+
+/*
+ Table: 'phpbb_poll_options'
+*/
+CREATE TABLE phpbb_poll_options (
+ poll_option_id INT2 DEFAULT '0' NOT NULL,
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ poll_option_text varchar(4000) DEFAULT '' NOT NULL,
+ poll_option_total INT4 DEFAULT '0' NOT NULL CHECK (poll_option_total >= 0)
+);
+
+CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id);
+CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id);
+
+/*
+ Table: 'phpbb_poll_votes'
+*/
+CREATE TABLE phpbb_poll_votes (
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ poll_option_id INT2 DEFAULT '0' NOT NULL,
+ vote_user_id INT4 DEFAULT '0' NOT NULL CHECK (vote_user_id >= 0),
+ vote_user_ip varchar(40) DEFAULT '' NOT NULL
+);
+
+CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id);
+CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id);
+CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip);
+
+/*
+ Table: 'phpbb_posts'
+*/
+CREATE SEQUENCE phpbb_posts_seq;
+
+CREATE TABLE phpbb_posts (
+ post_id INT4 DEFAULT nextval('phpbb_posts_seq'),
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ poster_id INT4 DEFAULT '0' NOT NULL CHECK (poster_id >= 0),
+ icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0),
+ poster_ip varchar(40) DEFAULT '' NOT NULL,
+ post_time INT4 DEFAULT '0' NOT NULL CHECK (post_time >= 0),
+ post_approved INT2 DEFAULT '1' NOT NULL CHECK (post_approved >= 0),
+ post_reported INT2 DEFAULT '0' NOT NULL CHECK (post_reported >= 0),
+ enable_bbcode INT2 DEFAULT '1' NOT NULL CHECK (enable_bbcode >= 0),
+ enable_smilies INT2 DEFAULT '1' NOT NULL CHECK (enable_smilies >= 0),
+ enable_magic_url INT2 DEFAULT '1' NOT NULL CHECK (enable_magic_url >= 0),
+ enable_sig INT2 DEFAULT '1' NOT NULL CHECK (enable_sig >= 0),
+ post_username varchar(255) DEFAULT '' NOT NULL,
+ post_subject varchar(255) DEFAULT '' NOT NULL,
+ post_text TEXT DEFAULT '' NOT NULL,
+ post_checksum varchar(32) DEFAULT '' NOT NULL,
+ post_attachment INT2 DEFAULT '0' NOT NULL CHECK (post_attachment >= 0),
+ bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
+ bbcode_uid varchar(8) DEFAULT '' NOT NULL,
+ post_postcount INT2 DEFAULT '1' NOT NULL CHECK (post_postcount >= 0),
+ post_edit_time INT4 DEFAULT '0' NOT NULL CHECK (post_edit_time >= 0),
+ post_edit_reason varchar(255) DEFAULT '' NOT NULL,
+ post_edit_user INT4 DEFAULT '0' NOT NULL CHECK (post_edit_user >= 0),
+ post_edit_count INT2 DEFAULT '0' NOT NULL CHECK (post_edit_count >= 0),
+ post_edit_locked INT2 DEFAULT '0' NOT NULL CHECK (post_edit_locked >= 0),
+ PRIMARY KEY (post_id)
+);
+
+CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id);
+CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id);
+CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip);
+CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id);
+CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved);
+CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username);
+CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time);
+
+/*
+ Table: 'phpbb_privmsgs'
+*/
+CREATE SEQUENCE phpbb_privmsgs_seq;
+
+CREATE TABLE phpbb_privmsgs (
+ msg_id INT4 DEFAULT nextval('phpbb_privmsgs_seq'),
+ root_level INT4 DEFAULT '0' NOT NULL CHECK (root_level >= 0),
+ author_id INT4 DEFAULT '0' NOT NULL CHECK (author_id >= 0),
+ icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0),
+ author_ip varchar(40) DEFAULT '' NOT NULL,
+ message_time INT4 DEFAULT '0' NOT NULL CHECK (message_time >= 0),
+ enable_bbcode INT2 DEFAULT '1' NOT NULL CHECK (enable_bbcode >= 0),
+ enable_smilies INT2 DEFAULT '1' NOT NULL CHECK (enable_smilies >= 0),
+ enable_magic_url INT2 DEFAULT '1' NOT NULL CHECK (enable_magic_url >= 0),
+ enable_sig INT2 DEFAULT '1' NOT NULL CHECK (enable_sig >= 0),
+ message_subject varchar(255) DEFAULT '' NOT NULL,
+ message_text TEXT DEFAULT '' NOT NULL,
+ message_edit_reason varchar(255) DEFAULT '' NOT NULL,
+ message_edit_user INT4 DEFAULT '0' NOT NULL CHECK (message_edit_user >= 0),
+ message_attachment INT2 DEFAULT '0' NOT NULL CHECK (message_attachment >= 0),
+ bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
+ bbcode_uid varchar(8) DEFAULT '' NOT NULL,
+ message_edit_time INT4 DEFAULT '0' NOT NULL CHECK (message_edit_time >= 0),
+ message_edit_count INT2 DEFAULT '0' NOT NULL CHECK (message_edit_count >= 0),
+ to_address varchar(4000) DEFAULT '' NOT NULL,
+ bcc_address varchar(4000) DEFAULT '' NOT NULL,
+ message_reported INT2 DEFAULT '0' NOT NULL CHECK (message_reported >= 0),
+ PRIMARY KEY (msg_id)
+);
+
+CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip);
+CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time);
+CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id);
+CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level);
+
+/*
+ Table: 'phpbb_privmsgs_folder'
+*/
+CREATE SEQUENCE phpbb_privmsgs_folder_seq;
+
+CREATE TABLE phpbb_privmsgs_folder (
+ folder_id INT4 DEFAULT nextval('phpbb_privmsgs_folder_seq'),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ folder_name varchar(255) DEFAULT '' NOT NULL,
+ pm_count INT4 DEFAULT '0' NOT NULL CHECK (pm_count >= 0),
+ PRIMARY KEY (folder_id)
+);
+
+CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id);
+
+/*
+ Table: 'phpbb_privmsgs_rules'
+*/
+CREATE SEQUENCE phpbb_privmsgs_rules_seq;
+
+CREATE TABLE phpbb_privmsgs_rules (
+ rule_id INT4 DEFAULT nextval('phpbb_privmsgs_rules_seq'),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ rule_check INT4 DEFAULT '0' NOT NULL CHECK (rule_check >= 0),
+ rule_connection INT4 DEFAULT '0' NOT NULL CHECK (rule_connection >= 0),
+ rule_string varchar(255) DEFAULT '' NOT NULL,
+ rule_user_id INT4 DEFAULT '0' NOT NULL CHECK (rule_user_id >= 0),
+ rule_group_id INT4 DEFAULT '0' NOT NULL CHECK (rule_group_id >= 0),
+ rule_action INT4 DEFAULT '0' NOT NULL CHECK (rule_action >= 0),
+ rule_folder_id INT4 DEFAULT '0' NOT NULL,
+ PRIMARY KEY (rule_id)
+);
+
+CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id);
+
+/*
+ Table: 'phpbb_privmsgs_to'
+*/
+CREATE TABLE phpbb_privmsgs_to (
+ msg_id INT4 DEFAULT '0' NOT NULL CHECK (msg_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ author_id INT4 DEFAULT '0' NOT NULL CHECK (author_id >= 0),
+ pm_deleted INT2 DEFAULT '0' NOT NULL CHECK (pm_deleted >= 0),
+ pm_new INT2 DEFAULT '1' NOT NULL CHECK (pm_new >= 0),
+ pm_unread INT2 DEFAULT '1' NOT NULL CHECK (pm_unread >= 0),
+ pm_replied INT2 DEFAULT '0' NOT NULL CHECK (pm_replied >= 0),
+ pm_marked INT2 DEFAULT '0' NOT NULL CHECK (pm_marked >= 0),
+ pm_forwarded INT2 DEFAULT '0' NOT NULL CHECK (pm_forwarded >= 0),
+ folder_id INT4 DEFAULT '0' NOT NULL
+);
+
+CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id);
+CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id);
+CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id);
+
+/*
+ Table: 'phpbb_profile_fields'
+*/
+CREATE SEQUENCE phpbb_profile_fields_seq;
+
+CREATE TABLE phpbb_profile_fields (
+ field_id INT4 DEFAULT nextval('phpbb_profile_fields_seq'),
+ field_name varchar(255) DEFAULT '' NOT NULL,
+ field_type INT2 DEFAULT '0' NOT NULL,
+ field_ident varchar(20) DEFAULT '' NOT NULL,
+ field_length varchar(20) DEFAULT '' NOT NULL,
+ field_minlen varchar(255) DEFAULT '' NOT NULL,
+ field_maxlen varchar(255) DEFAULT '' NOT NULL,
+ field_novalue varchar(255) DEFAULT '' NOT NULL,
+ field_default_value varchar(255) DEFAULT '' NOT NULL,
+ field_validation varchar(20) DEFAULT '' NOT NULL,
+ field_required INT2 DEFAULT '0' NOT NULL CHECK (field_required >= 0),
+ field_show_on_reg INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_reg >= 0),
+ field_show_on_vt INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_vt >= 0),
+ field_show_profile INT2 DEFAULT '0' NOT NULL CHECK (field_show_profile >= 0),
+ field_hide INT2 DEFAULT '0' NOT NULL CHECK (field_hide >= 0),
+ field_no_view INT2 DEFAULT '0' NOT NULL CHECK (field_no_view >= 0),
+ field_active INT2 DEFAULT '0' NOT NULL CHECK (field_active >= 0),
+ field_order INT4 DEFAULT '0' NOT NULL CHECK (field_order >= 0),
+ PRIMARY KEY (field_id)
+);
+
+CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type);
+CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order);
+
+/*
+ Table: 'phpbb_profile_fields_data'
+*/
+CREATE TABLE phpbb_profile_fields_data (
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ PRIMARY KEY (user_id)
+);
+
+
+/*
+ Table: 'phpbb_profile_fields_lang'
+*/
+CREATE TABLE phpbb_profile_fields_lang (
+ field_id INT4 DEFAULT '0' NOT NULL CHECK (field_id >= 0),
+ lang_id INT4 DEFAULT '0' NOT NULL CHECK (lang_id >= 0),
+ option_id INT4 DEFAULT '0' NOT NULL CHECK (option_id >= 0),
+ field_type INT2 DEFAULT '0' NOT NULL,
+ lang_value varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (field_id, lang_id, option_id)
+);
+
+
+/*
+ Table: 'phpbb_profile_lang'
+*/
+CREATE TABLE phpbb_profile_lang (
+ field_id INT4 DEFAULT '0' NOT NULL CHECK (field_id >= 0),
+ lang_id INT4 DEFAULT '0' NOT NULL CHECK (lang_id >= 0),
+ lang_name varchar(255) DEFAULT '' NOT NULL,
+ lang_explain varchar(4000) DEFAULT '' NOT NULL,
+ lang_default_value varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (field_id, lang_id)
+);
+
+
+/*
+ Table: 'phpbb_ranks'
+*/
+CREATE SEQUENCE phpbb_ranks_seq;
+
+CREATE TABLE phpbb_ranks (
+ rank_id INT4 DEFAULT nextval('phpbb_ranks_seq'),
+ rank_title varchar(255) DEFAULT '' NOT NULL,
+ rank_min INT4 DEFAULT '0' NOT NULL CHECK (rank_min >= 0),
+ rank_special INT2 DEFAULT '0' NOT NULL CHECK (rank_special >= 0),
+ rank_image varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (rank_id)
+);
+
+
+/*
+ Table: 'phpbb_reports'
+*/
+CREATE SEQUENCE phpbb_reports_seq;
+
+CREATE TABLE phpbb_reports (
+ report_id INT4 DEFAULT nextval('phpbb_reports_seq'),
+ reason_id INT2 DEFAULT '0' NOT NULL CHECK (reason_id >= 0),
+ post_id INT4 DEFAULT '0' NOT NULL CHECK (post_id >= 0),
+ pm_id INT4 DEFAULT '0' NOT NULL CHECK (pm_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ user_notify INT2 DEFAULT '0' NOT NULL CHECK (user_notify >= 0),
+ report_closed INT2 DEFAULT '0' NOT NULL CHECK (report_closed >= 0),
+ report_time INT4 DEFAULT '0' NOT NULL CHECK (report_time >= 0),
+ report_text TEXT DEFAULT '' NOT NULL,
+ PRIMARY KEY (report_id)
+);
+
+CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id);
+CREATE INDEX phpbb_reports_pm_id ON phpbb_reports (pm_id);
+
+/*
+ Table: 'phpbb_reports_reasons'
+*/
+CREATE SEQUENCE phpbb_reports_reasons_seq;
+
+CREATE TABLE phpbb_reports_reasons (
+ reason_id INT2 DEFAULT nextval('phpbb_reports_reasons_seq'),
+ reason_title varchar(255) DEFAULT '' NOT NULL,
+ reason_description TEXT DEFAULT '' NOT NULL,
+ reason_order INT2 DEFAULT '0' NOT NULL CHECK (reason_order >= 0),
+ PRIMARY KEY (reason_id)
+);
+
+
+/*
+ Table: 'phpbb_search_results'
+*/
+CREATE TABLE phpbb_search_results (
+ search_key varchar(32) DEFAULT '' NOT NULL,
+ search_time INT4 DEFAULT '0' NOT NULL CHECK (search_time >= 0),
+ search_keywords TEXT DEFAULT '' NOT NULL,
+ search_authors TEXT DEFAULT '' NOT NULL,
+ PRIMARY KEY (search_key)
+);
+
+
+/*
+ Table: 'phpbb_search_wordlist'
+*/
+CREATE SEQUENCE phpbb_search_wordlist_seq;
+
+CREATE TABLE phpbb_search_wordlist (
+ word_id INT4 DEFAULT nextval('phpbb_search_wordlist_seq'),
+ word_text varchar(255) DEFAULT '' NOT NULL,
+ word_common INT2 DEFAULT '0' NOT NULL CHECK (word_common >= 0),
+ word_count INT4 DEFAULT '0' NOT NULL CHECK (word_count >= 0),
+ PRIMARY KEY (word_id)
+);
+
+CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist (word_text);
+CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count);
+
+/*
+ Table: 'phpbb_search_wordmatch'
+*/
+CREATE TABLE phpbb_search_wordmatch (
+ post_id INT4 DEFAULT '0' NOT NULL CHECK (post_id >= 0),
+ word_id INT4 DEFAULT '0' NOT NULL CHECK (word_id >= 0),
+ title_match INT2 DEFAULT '0' NOT NULL CHECK (title_match >= 0)
+);
+
+CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch (word_id, post_id, title_match);
+CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id);
+CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id);
+
+/*
+ Table: 'phpbb_sessions'
+*/
+CREATE TABLE phpbb_sessions (
+ session_id char(32) DEFAULT '' NOT NULL,
+ session_user_id INT4 DEFAULT '0' NOT NULL CHECK (session_user_id >= 0),
+ session_forum_id INT4 DEFAULT '0' NOT NULL CHECK (session_forum_id >= 0),
+ session_last_visit INT4 DEFAULT '0' NOT NULL CHECK (session_last_visit >= 0),
+ session_start INT4 DEFAULT '0' NOT NULL CHECK (session_start >= 0),
+ session_time INT4 DEFAULT '0' NOT NULL CHECK (session_time >= 0),
+ session_ip varchar(40) DEFAULT '' NOT NULL,
+ session_browser varchar(150) DEFAULT '' NOT NULL,
+ session_forwarded_for varchar(255) DEFAULT '' NOT NULL,
+ session_page varchar(255) DEFAULT '' NOT NULL,
+ session_viewonline INT2 DEFAULT '1' NOT NULL CHECK (session_viewonline >= 0),
+ session_autologin INT2 DEFAULT '0' NOT NULL CHECK (session_autologin >= 0),
+ session_admin INT2 DEFAULT '0' NOT NULL CHECK (session_admin >= 0),
+ PRIMARY KEY (session_id)
+);
+
+CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time);
+CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id);
+CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id);
+
+/*
+ Table: 'phpbb_sessions_keys'
+*/
+CREATE TABLE phpbb_sessions_keys (
+ key_id char(32) DEFAULT '' NOT NULL,
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ last_ip varchar(40) DEFAULT '' NOT NULL,
+ last_login INT4 DEFAULT '0' NOT NULL CHECK (last_login >= 0),
+ PRIMARY KEY (key_id, user_id)
+);
+
+CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login);
+
+/*
+ Table: 'phpbb_sitelist'
+*/
+CREATE SEQUENCE phpbb_sitelist_seq;
+
+CREATE TABLE phpbb_sitelist (
+ site_id INT4 DEFAULT nextval('phpbb_sitelist_seq'),
+ site_ip varchar(40) DEFAULT '' NOT NULL,
+ site_hostname varchar(255) DEFAULT '' NOT NULL,
+ ip_exclude INT2 DEFAULT '0' NOT NULL CHECK (ip_exclude >= 0),
+ PRIMARY KEY (site_id)
+);
+
+
+/*
+ Table: 'phpbb_smilies'
+*/
+CREATE SEQUENCE phpbb_smilies_seq;
+
+CREATE TABLE phpbb_smilies (
+ smiley_id INT4 DEFAULT nextval('phpbb_smilies_seq'),
+ code varchar(50) DEFAULT '' NOT NULL,
+ emotion varchar(50) DEFAULT '' NOT NULL,
+ smiley_url varchar(50) DEFAULT '' NOT NULL,
+ smiley_width INT2 DEFAULT '0' NOT NULL CHECK (smiley_width >= 0),
+ smiley_height INT2 DEFAULT '0' NOT NULL CHECK (smiley_height >= 0),
+ smiley_order INT4 DEFAULT '0' NOT NULL CHECK (smiley_order >= 0),
+ display_on_posting INT2 DEFAULT '1' NOT NULL CHECK (display_on_posting >= 0),
+ PRIMARY KEY (smiley_id)
+);
+
+CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting);
+
+/*
+ Table: 'phpbb_styles'
+*/
+CREATE SEQUENCE phpbb_styles_seq;
+
+CREATE TABLE phpbb_styles (
+ style_id INT4 DEFAULT nextval('phpbb_styles_seq'),
+ style_name varchar(255) DEFAULT '' NOT NULL,
+ style_copyright varchar(255) DEFAULT '' NOT NULL,
+ style_active INT2 DEFAULT '1' NOT NULL CHECK (style_active >= 0),
+ template_id INT4 DEFAULT '0' NOT NULL CHECK (template_id >= 0),
+ theme_id INT4 DEFAULT '0' NOT NULL CHECK (theme_id >= 0),
+ imageset_id INT4 DEFAULT '0' NOT NULL CHECK (imageset_id >= 0),
+ PRIMARY KEY (style_id)
+);
+
+CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name);
+CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id);
+CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id);
+CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id);
+
+/*
+ Table: 'phpbb_styles_template'
+*/
+CREATE SEQUENCE phpbb_styles_template_seq;
+
+CREATE TABLE phpbb_styles_template (
+ template_id INT4 DEFAULT nextval('phpbb_styles_template_seq'),
+ template_name varchar(255) DEFAULT '' NOT NULL,
+ template_copyright varchar(255) DEFAULT '' NOT NULL,
+ template_path varchar(100) DEFAULT '' NOT NULL,
+ bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL,
+ template_storedb INT2 DEFAULT '0' NOT NULL CHECK (template_storedb >= 0),
+ template_inherits_id INT4 DEFAULT '0' NOT NULL CHECK (template_inherits_id >= 0),
+ template_inherit_path varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (template_id)
+);
+
+CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name);
+
+/*
+ Table: 'phpbb_styles_template_data'
+*/
+CREATE TABLE phpbb_styles_template_data (
+ template_id INT4 DEFAULT '0' NOT NULL CHECK (template_id >= 0),
+ template_filename varchar(100) DEFAULT '' NOT NULL,
+ template_included varchar(8000) DEFAULT '' NOT NULL,
+ template_mtime INT4 DEFAULT '0' NOT NULL CHECK (template_mtime >= 0),
+ template_data TEXT DEFAULT '' NOT NULL
+);
+
+CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id);
+CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename);
+
+/*
+ Table: 'phpbb_styles_theme'
+*/
+CREATE SEQUENCE phpbb_styles_theme_seq;
+
+CREATE TABLE phpbb_styles_theme (
+ theme_id INT4 DEFAULT nextval('phpbb_styles_theme_seq'),
+ theme_name varchar(255) DEFAULT '' NOT NULL,
+ theme_copyright varchar(255) DEFAULT '' NOT NULL,
+ theme_path varchar(100) DEFAULT '' NOT NULL,
+ theme_storedb INT2 DEFAULT '0' NOT NULL CHECK (theme_storedb >= 0),
+ theme_mtime INT4 DEFAULT '0' NOT NULL CHECK (theme_mtime >= 0),
+ theme_data TEXT DEFAULT '' NOT NULL,
+ PRIMARY KEY (theme_id)
+);
+
+CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name);
+
+/*
+ Table: 'phpbb_styles_imageset'
+*/
+CREATE SEQUENCE phpbb_styles_imageset_seq;
+
+CREATE TABLE phpbb_styles_imageset (
+ imageset_id INT4 DEFAULT nextval('phpbb_styles_imageset_seq'),
+ imageset_name varchar(255) DEFAULT '' NOT NULL,
+ imageset_copyright varchar(255) DEFAULT '' NOT NULL,
+ imageset_path varchar(100) DEFAULT '' NOT NULL,
+ PRIMARY KEY (imageset_id)
+);
+
+CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset (imageset_name);
+
+/*
+ Table: 'phpbb_styles_imageset_data'
+*/
+CREATE SEQUENCE phpbb_styles_imageset_data_seq;
+
+CREATE TABLE phpbb_styles_imageset_data (
+ image_id INT4 DEFAULT nextval('phpbb_styles_imageset_data_seq'),
+ image_name varchar(200) DEFAULT '' NOT NULL,
+ image_filename varchar(200) DEFAULT '' NOT NULL,
+ image_lang varchar(30) DEFAULT '' NOT NULL,
+ image_height INT2 DEFAULT '0' NOT NULL CHECK (image_height >= 0),
+ image_width INT2 DEFAULT '0' NOT NULL CHECK (image_width >= 0),
+ imageset_id INT4 DEFAULT '0' NOT NULL CHECK (imageset_id >= 0),
+ PRIMARY KEY (image_id)
+);
+
+CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id);
+
+/*
+ Table: 'phpbb_topics'
+*/
+CREATE SEQUENCE phpbb_topics_seq;
+
+CREATE TABLE phpbb_topics (
+ topic_id INT4 DEFAULT nextval('phpbb_topics_seq'),
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0),
+ topic_attachment INT2 DEFAULT '0' NOT NULL CHECK (topic_attachment >= 0),
+ topic_approved INT2 DEFAULT '1' NOT NULL CHECK (topic_approved >= 0),
+ topic_reported INT2 DEFAULT '0' NOT NULL CHECK (topic_reported >= 0),
+ topic_title varchar(255) DEFAULT '' NOT NULL,
+ topic_poster INT4 DEFAULT '0' NOT NULL CHECK (topic_poster >= 0),
+ topic_time INT4 DEFAULT '0' NOT NULL CHECK (topic_time >= 0),
+ topic_time_limit INT4 DEFAULT '0' NOT NULL CHECK (topic_time_limit >= 0),
+ topic_views INT4 DEFAULT '0' NOT NULL CHECK (topic_views >= 0),
+ topic_replies INT4 DEFAULT '0' NOT NULL CHECK (topic_replies >= 0),
+ topic_replies_real INT4 DEFAULT '0' NOT NULL CHECK (topic_replies_real >= 0),
+ topic_status INT2 DEFAULT '0' NOT NULL,
+ topic_type INT2 DEFAULT '0' NOT NULL,
+ topic_first_post_id INT4 DEFAULT '0' NOT NULL CHECK (topic_first_post_id >= 0),
+ topic_first_poster_name varchar(255) DEFAULT '' NOT NULL,
+ topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL,
+ topic_last_post_id INT4 DEFAULT '0' NOT NULL CHECK (topic_last_post_id >= 0),
+ topic_last_poster_id INT4 DEFAULT '0' NOT NULL CHECK (topic_last_poster_id >= 0),
+ topic_last_poster_name varchar(255) DEFAULT '' NOT NULL,
+ topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
+ topic_last_post_subject varchar(255) DEFAULT '' NOT NULL,
+ topic_last_post_time INT4 DEFAULT '0' NOT NULL CHECK (topic_last_post_time >= 0),
+ topic_last_view_time INT4 DEFAULT '0' NOT NULL CHECK (topic_last_view_time >= 0),
+ topic_moved_id INT4 DEFAULT '0' NOT NULL CHECK (topic_moved_id >= 0),
+ topic_bumped INT2 DEFAULT '0' NOT NULL CHECK (topic_bumped >= 0),
+ topic_bumper INT4 DEFAULT '0' NOT NULL CHECK (topic_bumper >= 0),
+ poll_title varchar(255) DEFAULT '' NOT NULL,
+ poll_start INT4 DEFAULT '0' NOT NULL CHECK (poll_start >= 0),
+ poll_length INT4 DEFAULT '0' NOT NULL CHECK (poll_length >= 0),
+ poll_max_options INT2 DEFAULT '1' NOT NULL,
+ poll_last_vote INT4 DEFAULT '0' NOT NULL CHECK (poll_last_vote >= 0),
+ poll_vote_change INT2 DEFAULT '0' NOT NULL CHECK (poll_vote_change >= 0),
+ PRIMARY KEY (topic_id)
+);
+
+CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id);
+CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type);
+CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time);
+CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved);
+CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id);
+CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id);
+
+/*
+ Table: 'phpbb_topics_track'
+*/
+CREATE TABLE phpbb_topics_track (
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ mark_time INT4 DEFAULT '0' NOT NULL CHECK (mark_time >= 0),
+ PRIMARY KEY (user_id, topic_id)
+);
+
+CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id);
+
+/*
+ Table: 'phpbb_topics_posted'
+*/
+CREATE TABLE phpbb_topics_posted (
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ topic_posted INT2 DEFAULT '0' NOT NULL CHECK (topic_posted >= 0),
+ PRIMARY KEY (user_id, topic_id)
+);
+
+
+/*
+ Table: 'phpbb_topics_watch'
+*/
+CREATE TABLE phpbb_topics_watch (
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ notify_status INT2 DEFAULT '0' NOT NULL CHECK (notify_status >= 0)
+);
+
+CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id);
+CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id);
+CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status);
+
+/*
+ Table: 'phpbb_user_group'
+*/
+CREATE TABLE phpbb_user_group (
+ group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ group_leader INT2 DEFAULT '0' NOT NULL CHECK (group_leader >= 0),
+ user_pending INT2 DEFAULT '1' NOT NULL CHECK (user_pending >= 0)
+);
+
+CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id);
+CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id);
+CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader);
+
+/*
+ Table: 'phpbb_users'
+*/
+CREATE SEQUENCE phpbb_users_seq;
+
+CREATE TABLE phpbb_users (
+ user_id INT4 DEFAULT nextval('phpbb_users_seq'),
+ user_type INT2 DEFAULT '0' NOT NULL,
+ group_id INT4 DEFAULT '3' NOT NULL CHECK (group_id >= 0),
+ user_permissions TEXT DEFAULT '' NOT NULL,
+ user_perm_from INT4 DEFAULT '0' NOT NULL CHECK (user_perm_from >= 0),
+ user_ip varchar(40) DEFAULT '' NOT NULL,
+ user_regdate INT4 DEFAULT '0' NOT NULL CHECK (user_regdate >= 0),
+ username varchar_ci DEFAULT '' NOT NULL,
+ username_clean varchar_ci DEFAULT '' NOT NULL,
+ user_password varchar(40) DEFAULT '' NOT NULL,
+ user_passchg INT4 DEFAULT '0' NOT NULL CHECK (user_passchg >= 0),
+ user_pass_convert INT2 DEFAULT '0' NOT NULL CHECK (user_pass_convert >= 0),
+ user_email varchar(100) DEFAULT '' NOT NULL,
+ user_email_hash INT8 DEFAULT '0' NOT NULL,
+ user_birthday varchar(10) DEFAULT '' NOT NULL,
+ user_lastvisit INT4 DEFAULT '0' NOT NULL CHECK (user_lastvisit >= 0),
+ user_lastmark INT4 DEFAULT '0' NOT NULL CHECK (user_lastmark >= 0),
+ user_lastpost_time INT4 DEFAULT '0' NOT NULL CHECK (user_lastpost_time >= 0),
+ user_lastpage varchar(200) DEFAULT '' NOT NULL,
+ user_last_confirm_key varchar(10) DEFAULT '' NOT NULL,
+ user_last_search INT4 DEFAULT '0' NOT NULL CHECK (user_last_search >= 0),
+ user_warnings INT2 DEFAULT '0' NOT NULL,
+ user_last_warning INT4 DEFAULT '0' NOT NULL CHECK (user_last_warning >= 0),
+ user_login_attempts INT2 DEFAULT '0' NOT NULL,
+ user_inactive_reason INT2 DEFAULT '0' NOT NULL,
+ user_inactive_time INT4 DEFAULT '0' NOT NULL CHECK (user_inactive_time >= 0),
+ user_posts INT4 DEFAULT '0' NOT NULL CHECK (user_posts >= 0),
+ user_lang varchar(30) DEFAULT '' NOT NULL,
+ user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
+ user_dst INT2 DEFAULT '0' NOT NULL CHECK (user_dst >= 0),
+ user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL,
+ user_style INT4 DEFAULT '0' NOT NULL CHECK (user_style >= 0),
+ user_rank INT4 DEFAULT '0' NOT NULL CHECK (user_rank >= 0),
+ user_colour varchar(6) DEFAULT '' NOT NULL,
+ user_new_privmsg INT4 DEFAULT '0' NOT NULL,
+ user_unread_privmsg INT4 DEFAULT '0' NOT NULL,
+ user_last_privmsg INT4 DEFAULT '0' NOT NULL CHECK (user_last_privmsg >= 0),
+ user_message_rules INT2 DEFAULT '0' NOT NULL CHECK (user_message_rules >= 0),
+ user_full_folder INT4 DEFAULT '-3' NOT NULL,
+ user_emailtime INT4 DEFAULT '0' NOT NULL CHECK (user_emailtime >= 0),
+ user_topic_show_days INT2 DEFAULT '0' NOT NULL CHECK (user_topic_show_days >= 0),
+ user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL,
+ user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL,
+ user_post_show_days INT2 DEFAULT '0' NOT NULL CHECK (user_post_show_days >= 0),
+ user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL,
+ user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL,
+ user_notify INT2 DEFAULT '0' NOT NULL CHECK (user_notify >= 0),
+ user_notify_pm INT2 DEFAULT '1' NOT NULL CHECK (user_notify_pm >= 0),
+ user_notify_type INT2 DEFAULT '0' NOT NULL,
+ user_allow_pm INT2 DEFAULT '1' NOT NULL CHECK (user_allow_pm >= 0),
+ user_allow_viewonline INT2 DEFAULT '1' NOT NULL CHECK (user_allow_viewonline >= 0),
+ user_allow_viewemail INT2 DEFAULT '1' NOT NULL CHECK (user_allow_viewemail >= 0),
+ user_allow_massemail INT2 DEFAULT '1' NOT NULL CHECK (user_allow_massemail >= 0),
+ user_options INT4 DEFAULT '230271' NOT NULL CHECK (user_options >= 0),
+ user_avatar varchar(255) DEFAULT '' NOT NULL,
+ user_avatar_type INT2 DEFAULT '0' NOT NULL,
+ user_avatar_width INT2 DEFAULT '0' NOT NULL CHECK (user_avatar_width >= 0),
+ user_avatar_height INT2 DEFAULT '0' NOT NULL CHECK (user_avatar_height >= 0),
+ user_sig TEXT DEFAULT '' NOT NULL,
+ user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL,
+ user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
+ user_from varchar(100) DEFAULT '' NOT NULL,
+ user_icq varchar(15) DEFAULT '' NOT NULL,
+ user_aim varchar(255) DEFAULT '' NOT NULL,
+ user_yim varchar(255) DEFAULT '' NOT NULL,
+ user_msnm varchar(255) DEFAULT '' NOT NULL,
+ user_jabber varchar(255) DEFAULT '' NOT NULL,
+ user_website varchar(200) DEFAULT '' NOT NULL,
+ user_occ varchar(4000) DEFAULT '' NOT NULL,
+ user_interests varchar(4000) DEFAULT '' NOT NULL,
+ user_actkey varchar(32) DEFAULT '' NOT NULL,
+ user_newpasswd varchar(40) DEFAULT '' NOT NULL,
+ user_form_salt varchar(32) DEFAULT '' NOT NULL,
+ user_new INT2 DEFAULT '1' NOT NULL CHECK (user_new >= 0),
+ user_reminded INT2 DEFAULT '0' NOT NULL,
+ user_reminded_time INT4 DEFAULT '0' NOT NULL CHECK (user_reminded_time >= 0),
+ PRIMARY KEY (user_id)
+);
+
+CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday);
+CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash);
+CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type);
+CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users (username_clean);
+
+/*
+ Table: 'phpbb_warnings'
+*/
+CREATE SEQUENCE phpbb_warnings_seq;
+
+CREATE TABLE phpbb_warnings (
+ warning_id INT4 DEFAULT nextval('phpbb_warnings_seq'),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ post_id INT4 DEFAULT '0' NOT NULL CHECK (post_id >= 0),
+ log_id INT4 DEFAULT '0' NOT NULL CHECK (log_id >= 0),
+ warning_time INT4 DEFAULT '0' NOT NULL CHECK (warning_time >= 0),
+ PRIMARY KEY (warning_id)
+);
+
+
+/*
+ Table: 'phpbb_words'
+*/
+CREATE SEQUENCE phpbb_words_seq;
+
+CREATE TABLE phpbb_words (
+ word_id INT4 DEFAULT nextval('phpbb_words_seq'),
+ word varchar(255) DEFAULT '' NOT NULL,
+ replacement varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (word_id)
+);
+
+
+/*
+ Table: 'phpbb_zebra'
+*/
+CREATE TABLE phpbb_zebra (
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ zebra_id INT4 DEFAULT '0' NOT NULL CHECK (zebra_id >= 0),
+ friend INT2 DEFAULT '0' NOT NULL CHECK (friend >= 0),
+ foe INT2 DEFAULT '0' NOT NULL CHECK (foe >= 0),
+ PRIMARY KEY (user_id, zebra_id)
+);
+
+
+
+COMMIT; \ No newline at end of file
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
new file mode 100644
index 0000000000..18bd8d8e9a
--- /dev/null
+++ b/phpBB/install/schemas/schema_data.sql
@@ -0,0 +1,829 @@
+#
+# $Id$
+#
+
+# POSTGRES BEGIN #
+
+# -- Config
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('active_sessions', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_attachments', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_autologin', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_local', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remote', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remote_upload', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bbcode', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_birthdays', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bookmarks', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_emailreuse', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_forum_notify', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_mass_pm', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_name_chars', 'USERNAME_CHARS_ANY');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_namechange', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_nocensors', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_pm_attach', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_pm_report', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_post_flash', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_post_links', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_privmsg', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_quick_reply', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_bbcode', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_flash', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_img', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_links', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_pm', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_smilies', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_smilies', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_topic_notify', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('attachment_quota', '52428800');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_bbcode_pm', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_flash_pm', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_img_pm', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_method', 'db');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_smilies_pm', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_filesize', '6144');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_gallery_path', 'images/avatars/gallery');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_height', '90');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width', '90');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_min_height', '20');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_min_width', '20');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_path', 'images/avatars/upload');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_salt', 'phpbb_avatar');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_contact', 'contact@yourdomain.tld');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable_msg', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_dst', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email', 'address@yourdomain.tld');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_sig', '{L_CONFIG_BOARD_EMAIL_SIG}');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_hide_emails', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('browser_check', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('bump_interval', '10');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('bump_type', 'd');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('cache_gc', '7200');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_plugin', 'phpbb_captcha_nogd');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_foreground_noise', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_x_grid', '25');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_y_grid', '25');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_wave', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_3d_noise', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_fonts', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('confirm_refresh', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('check_attachment_content', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('check_dnsbl', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('chg_passforce', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_domain', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_name', 'phpbb3');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_path', '/');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_secure', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_enable', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_fax', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_mail', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('database_gc', '604800');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('dbms_version', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_dateformat', 'D M d, Y g:i a');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('display_last_edited', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('display_order', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('edit_time', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('delete_time', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_check_mx', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_enable', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_function_name', 'mail');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_package_size', '50');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_pm_icons', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_post_confirm', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_enable', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_limit', '10');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall_forums', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall_forums_limit', '15');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall_topics', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall_topics_limit', '15');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_forum', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_topic', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_item_statistics', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval', '15');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('force_server_vars', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('form_token_lifetime', '7200');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('form_token_mintime', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('form_token_sid_guests', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('forward_pm', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('forwarded_for_check', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('full_folder_action', '2');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_mysql_max_word_len', '254');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_mysql_min_word_len', '4');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_common_thres', '5');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_load_upd', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_max_chars', '14');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_min_chars', '3');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold', '25');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('icons_path', 'images/icons');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_create_thumbnail', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_display_inlined', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_imagick', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_link_height', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_link_width', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_height', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_thumb_width', '400');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_width', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_min_thumb_filesize', '12000');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_check', '3');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_enable', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_host', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_password', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_package_size', '20');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_port', '5222');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_use_ssl', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_username', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_base_dn', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_email', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_password', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_port', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_server', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_uid', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_user', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_user_filter', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_load', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_search_load', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_anon_lastread', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_birthdays', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_memberlist', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewprofile', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_track', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online_guests', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online_time', '5');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_onlinetrack', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_search', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_tplcompile', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_user_activity', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_attachments', '3');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_attachments_pm', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_autologin_time', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_filesize', '262144');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_filesize_pm', '262144');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_login_attempts', '3');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_name_chars', '20');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_num_search_keywords', '10');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_pass_chars', '100');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_poll_options', '10');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_chars', '60000');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_font_size', '200');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_img_height', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_img_width', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_smilies', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_urls', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_quote_depth', '3');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_reg_attempts', '5');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_chars', '255');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_font_size', '200');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_img_height', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_img_width', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_smilies', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_urls', '5');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_name_chars', '3');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_pass_chars', '6');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_post_chars', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_search_author_chars', '3');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('mime_triggers', 'body|head|html|img|plaintext|a href|pre|script|table|title');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('new_member_post_limit', '3');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('new_member_group_default', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('pass_complex', 'PASS_TYPE_ANY');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_edit_time', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_boxes', '4');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_msgs', '50');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_recipients', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page', '10');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('print_pm', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('queue_interval', '600');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('ranks_path', 'images/ranks');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('referer_validation', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_block_size', '250');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_gc', '7200');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_interval', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_anonymous_interval', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_type', 'fulltext_native');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_store_results', '1800');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('secure_allow_deny', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('secure_allow_empty_referer', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('secure_downloads', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_protocol', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_gc', '3600');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_length', '3600');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('site_desc', '{L_CONFIG_SITE_DESC}');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('sitename', '{L_CONFIG_SITENAME}');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('smilies_path', 'images/smilies');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('smilies_per_page', '50');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_auth_method', 'PLAIN');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_delivery', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_port', '25');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page', '25');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.6-RC2');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
+
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('cache_last_gc', '0', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('cron_lock', '0', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('database_last_gc', '0', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('last_queue_run', '0', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('newest_user_colour', 'AA0000', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('newest_user_id', '2', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('newest_username', '', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_files', '0', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_posts', '1', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_topics', '1', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_users', '1', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('rand_seed', '0', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('rand_seed_last_update', '0', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_date', '0', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_users', '0', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('search_indexing_state', '', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('search_last_gc', '0', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('session_last_gc', '0', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('upload_dir_size', '0', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('warnings_last_gc', '0', 1);
+
+# -- Forum related auth options
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_announce', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_attach', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_bbcode', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_bump', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_delete', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_download', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_edit', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_email', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_flash', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_icons', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_ignoreflood', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_img', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_list', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_noapprove', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_poll', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_post', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_postcount', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_print', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_read', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_reply', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_report', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_search', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_sigs', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_smilies', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_sticky', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_subscribe', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_user_lock', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_vote', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_votechg', 1);
+
+# -- Moderator related auth options
+INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_', 1, 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_approve', 1, 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_chgposter', 1, 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_delete', 1, 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_edit', 1, 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_info', 1, 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_lock', 1, 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_merge', 1, 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_move', 1, 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_report', 1, 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_split', 1, 1);
+
+# -- Global moderator auth option (not a local option)
+INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_ban', 0, 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_warn', 0, 1);
+
+# -- Admin related auth options
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_aauth', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_attach', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_authgroups', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_authusers', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_backup', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_ban', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_bbcode', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_board', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_bots', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_clearlogs', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_email', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_fauth', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_forum', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_forumadd', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_forumdel', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_group', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_groupadd', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_groupdel', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_icons', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_jabber', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_language', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_mauth', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_modules', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_names', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_phpinfo', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_profile', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_prune', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_ranks', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_reasons', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_roles', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_search', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_server', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_styles', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_switchperm', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_uauth', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_user', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_userdel', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_viewauth', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_viewlogs', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_words', 1);
+
+# -- User related auth options
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_attach', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgavatar', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgcensors', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgemail', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chggrp', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgname', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgpasswd', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_download', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_hideonline', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_ignoreflood', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_masspm', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_masspm_group', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_attach', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_bbcode', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_delete', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_download', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_edit', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_emailpm', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_flash', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_forward', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_img', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_printpm', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_smilies', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_readpm', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_savedrafts', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_search', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_sendemail', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_sendim', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_sendpm', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_sig', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_viewonline', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_viewprofile', 1);
+
+
+# -- standard auth roles
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_ADMIN_STANDARD', 'ROLE_DESCRIPTION_ADMIN_STANDARD', 'a_', 1);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_ADMIN_FORUM', 'ROLE_DESCRIPTION_ADMIN_FORUM', 'a_', 3);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_ADMIN_USERGROUP', 'ROLE_DESCRIPTION_ADMIN_USERGROUP', 'a_', 4);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_ADMIN_FULL', 'ROLE_DESCRIPTION_ADMIN_FULL', 'a_', 2);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_FULL', 'ROLE_DESCRIPTION_USER_FULL', 'u_', 3);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_STANDARD', 'ROLE_DESCRIPTION_USER_STANDARD', 'u_', 1);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_LIMITED', 'ROLE_DESCRIPTION_USER_LIMITED', 'u_', 2);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_NOPM', 'ROLE_DESCRIPTION_USER_NOPM', 'u_', 4);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_NOAVATAR', 'ROLE_DESCRIPTION_USER_NOAVATAR', 'u_', 5);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_MOD_FULL', 'ROLE_DESCRIPTION_MOD_FULL', 'm_', 3);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_MOD_STANDARD', 'ROLE_DESCRIPTION_MOD_STANDARD', 'm_', 1);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_MOD_SIMPLE', 'ROLE_DESCRIPTION_MOD_SIMPLE', 'm_', 2);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_MOD_QUEUE', 'ROLE_DESCRIPTION_MOD_QUEUE', 'm_', 4);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_FULL', 'ROLE_DESCRIPTION_FORUM_FULL', 'f_', 7);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_STANDARD', 'ROLE_DESCRIPTION_FORUM_STANDARD', 'f_', 5);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_NOACCESS', 'ROLE_DESCRIPTION_FORUM_NOACCESS', 'f_', 1);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_READONLY', 'ROLE_DESCRIPTION_FORUM_READONLY', 'f_', 2);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_LIMITED', 'ROLE_DESCRIPTION_FORUM_LIMITED', 'f_', 3);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_BOT', 'ROLE_DESCRIPTION_FORUM_BOT', 'f_', 9);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_ONQUEUE', 'ROLE_DESCRIPTION_FORUM_ONQUEUE', 'f_', 8);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_POLLS', 'ROLE_DESCRIPTION_FORUM_POLLS', 'f_', 6);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_LIMITED_POLLS', 'ROLE_DESCRIPTION_FORUM_LIMITED_POLLS', 'f_', 4);
+
+# 23
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_NEW_MEMBER', 'ROLE_DESCRIPTION_USER_NEW_MEMBER', 'u_', 6);
+
+# 24
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_NEW_MEMBER', 'ROLE_DESCRIPTION_FORUM_NEW_MEMBER', 'f_', 10);
+
+# -- phpbb_styles
+INSERT INTO phpbb_styles (style_name, style_copyright, style_active, template_id, theme_id, imageset_id) VALUES ('prosilver', '&copy; phpBB Group', 1, 1, 1, 1);
+
+# -- phpbb_styles_imageset
+INSERT INTO phpbb_styles_imageset (imageset_name, imageset_copyright, imageset_path) VALUES ('prosilver', '&copy; phpBB Group', 'prosilver');
+
+# -- phpbb_styles_imageset_data
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('site_logo', 'site_logo.gif', '', 52, 139, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_link', 'forum_link.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read', 'forum_read.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read_locked', 'forum_read_locked.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read_subforum', 'forum_read_subforum.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread', 'forum_unread.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread_locked', 'forum_unread_locked.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread_subforum', 'forum_unread_subforum.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_moved', 'topic_moved.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read', 'topic_read.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_mine', 'topic_read_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_hot', 'topic_read_hot.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_hot_mine', 'topic_read_hot_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_locked', 'topic_read_locked.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_locked_mine', 'topic_read_locked_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread', 'topic_unread.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_mine', 'topic_unread_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_hot', 'topic_unread_hot.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_hot_mine', 'topic_unread_hot_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_locked', 'topic_unread_locked.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_locked_mine', 'topic_unread_locked_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read', 'sticky_read.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_mine', 'sticky_read_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_locked', 'sticky_read_locked.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_locked_mine', 'sticky_read_locked_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread', 'sticky_unread.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_mine', 'sticky_unread_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_locked', 'sticky_unread_locked.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_locked_mine', 'sticky_unread_locked_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read', 'announce_read.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_mine', 'announce_read_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_locked', 'announce_read_locked.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_locked_mine', 'announce_read_locked_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread', 'announce_unread.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_mine', 'announce_unread_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_locked', 'announce_unread_locked.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read', 'announce_read.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_mine', 'announce_read_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_locked', 'announce_read_locked.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_locked_mine', 'announce_read_locked_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread', 'announce_unread.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_mine', 'announce_unread_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_locked', 'announce_unread_locked.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('pm_read', 'topic_read.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('pm_unread', 'topic_unread.gif', '', 27, 27, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_back_top', 'icon_back_top.gif', '', 11, 11, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_aim', 'icon_contact_aim.gif', '', 20, 20, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_email', 'icon_contact_email.gif', '', 20, 20, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_icq', 'icon_contact_icq.gif', '', 20, 20, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_jabber', 'icon_contact_jabber.gif', '', 20, 20, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_msnm', 'icon_contact_msnm.gif', '', 20, 20, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_www', 'icon_contact_www.gif', '', 20, 20, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_yahoo', 'icon_contact_yahoo.gif', '', 20, 20, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_delete', 'icon_post_delete.gif', '', 20, 20, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_info', 'icon_post_info.gif', '', 20, 20, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_report', 'icon_post_report.gif', '', 20, 20, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_target', 'icon_post_target.gif', '', 9, 11, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_target_unread', 'icon_post_target_unread.gif', '', 9, 11, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_attach', 'icon_topic_attach.gif', '', 10, 7, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_latest', 'icon_topic_latest.gif', '', 9, 11, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_newest', 'icon_topic_newest.gif', '', 9, 11, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_reported', 'icon_topic_reported.gif', '', 14, 16, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_unapproved', 'icon_topic_unapproved.gif', '', 14, 16, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_warn', 'icon_user_warn.gif', '', 20, 20, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('subforum_read', 'subforum_read.gif', '', 9, 11, 1);
+INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('subforum_unread', 'subforum_unread.gif', '', 9, 11, 1);
+
+# -- phpbb_styles_template
+INSERT INTO phpbb_styles_template (template_name, template_copyright, template_path, bbcode_bitfield, template_storedb) VALUES ('prosilver', '&copy; phpBB Group', 'prosilver', 'lNg=', 0);
+
+# -- phpbb_styles_theme
+INSERT INTO phpbb_styles_theme (theme_name, theme_copyright, theme_path, theme_storedb, theme_data) VALUES ('prosilver', '&copy; phpBB Group', 'prosilver', 1, '');
+
+# -- Forums
+INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_FIRST_CATEGORY}', '', 1, 4, 0, 0, 1, 1, 1, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0, '');
+
+INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 1, 1, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 0, 0, '');
+
+# -- Users / Anonymous user
+INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0);
+
+# -- username: Admin password: admin (change this or remove it once everything is working!)
+INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
+
+# -- Groups
+INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GUESTS', 3, 0, '', 0, '', '', '', 5);
+INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('REGISTERED', 3, 0, '', 0, '', '', '', 5);
+INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('REGISTERED_COPPA', 3, 0, '', 0, '', '', '', 5);
+INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GLOBAL_MODERATORS', 3, 0, '00AA00', 1, '', '', '', 0);
+INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('ADMINISTRATORS', 3, 1, 'AA0000', 1, '', '', '', 0);
+INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('BOTS', 3, 0, '9E8DA7', 0, '', '', '', 5);
+INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('NEWLY_REGISTERED', 3, 0, '', 0, '', '', '', 5);
+
+# -- User -> Group
+INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VALUES (1, 1, 0, 0);
+INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VALUES (2, 2, 0, 0);
+INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VALUES (4, 2, 0, 0);
+INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VALUES (5, 2, 0, 1);
+
+# -- Ranks
+INSERT INTO phpbb_ranks (rank_title, rank_min, rank_special, rank_image) VALUES ('{L_RANKS_SITE_ADMIN_TITLE}', 0, 1, '');
+
+# -- Roles data
+
+# Standard Admin (a_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 1, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%' AND auth_option NOT IN ('a_switchperm', 'a_jabber', 'a_phpinfo', 'a_server', 'a_backup', 'a_styles', 'a_clearlogs', 'a_modules', 'a_language', 'a_email', 'a_bots', 'a_search', 'a_aauth', 'a_roles');
+
+# Forum admin (a_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 2, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%' AND auth_option IN ('a_', 'a_authgroups', 'a_authusers', 'a_fauth', 'a_forum', 'a_forumadd', 'a_forumdel', 'a_mauth', 'a_prune', 'a_uauth', 'a_viewauth', 'a_viewlogs');
+
+# User and Groups Admin (a_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 3, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%' AND auth_option IN ('a_', 'a_authgroups', 'a_authusers', 'a_ban', 'a_group', 'a_groupadd', 'a_groupdel', 'a_ranks', 'a_uauth', 'a_user', 'a_viewauth', 'a_viewlogs');
+
+# Full Admin (a_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 4, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%';
+
+# All Features (u_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 5, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%';
+
+# Standard Features (u_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 6, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_flash', 'u_pm_forward');
+
+# Limited Features (u_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 7, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_attach', 'u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_attach', 'u_pm_emailpm', 'u_pm_flash', 'u_savedrafts', 'u_search', 'u_sendemail', 'u_sendim', 'u_masspm', 'u_masspm_group');
+
+# No Private Messages (u_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 8, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_', 'u_chgavatar', 'u_chgcensors', 'u_chgemail', 'u_chgpasswd', 'u_download', 'u_hideonline', 'u_sig', 'u_viewprofile');
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 8, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_readpm', 'u_sendpm', 'u_masspm', 'u_masspm_group');
+
+# No Avatar (u_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 9, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_attach', 'u_chgavatar', 'u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_attach', 'u_pm_emailpm', 'u_pm_flash', 'u_savedrafts', 'u_search', 'u_sendemail', 'u_sendim', 'u_masspm', 'u_masspm_group');
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 9, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_chgavatar', 'u_masspm', 'u_masspm_group');
+
+# Full Moderator (m_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 10, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%';
+
+# Standard Moderator (m_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 11, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option NOT IN ('m_ban', 'm_chgposter');
+
+# Simple Moderator (m_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_delete', 'm_edit', 'm_info', 'm_report');
+
+# Queue Moderator (m_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 13, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_approve', 'm_edit');
+
+# Full Access (f_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 14, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%';
+
+# Standard Access (f_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 15, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_flash', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock');
+
+# No Access (f_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 16, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option = 'f_';
+
+# Read Only Access (f_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 17, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_read', 'f_search', 'f_subscribe', 'f_print');
+
+# Limited Access (f_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 18, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_attach', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock', 'f_votechg');
+
+# Bot Access (f_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 19, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_read', 'f_print');
+
+# On Moderation Queue (f_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 20, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock', 'f_votechg', 'f_noapprove');
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 20, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_noapprove');
+
+# Standard Access + Polls (f_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 21, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_flash', 'f_ignoreflood', 'f_sticky', 'f_user_lock');
+
+# Limited Access + Polls (f_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 22, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_attach', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_sticky', 'f_user_lock', 'f_votechg');
+
+# New Member (u_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 23, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_sendpm', 'u_masspm', 'u_masspm_group');
+
+# New Member (f_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 24, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_noapprove');
+
+
+# Permissions
+
+# GUESTS - u_download and u_search ability
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) SELECT 1, 0, auth_option_id, 0, 1 FROM phpbb_acl_options WHERE auth_option IN ('u_', 'u_download', 'u_search');
+
+# Admin user - full user features
+INSERT INTO phpbb_acl_users (user_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (2, 0, 0, 5, 0);
+
+# ADMINISTRATOR Group - full user features
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (5, 0, 0, 5, 0);
+
+# ADMINISTRATOR Group - standard admin
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (5, 0, 0, 1, 0);
+
+# REGISTERED and REGISTERED_COPPA having standard user features
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (2, 0, 0, 6, 0);
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (3, 0, 0, 6, 0);
+
+# GLOBAL_MODERATORS having full user features
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (4, 0, 0, 5, 0);
+
+# GLOBAL_MODERATORS having full global moderator access
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (4, 0, 0, 10, 0);
+
+# Giving all groups read only access to the first category
+# since administrators and moderators are already within the registered users group we do not need to set them here
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (1, 1, 0, 17, 0);
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (2, 1, 0, 17, 0);
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (3, 1, 0, 17, 0);
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (6, 1, 0, 17, 0);
+
+# Giving access to the first forum
+
+# guests having read only access
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (1, 2, 0, 17, 0);
+
+# registered and registered_coppa having standard access
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (2, 2, 0, 15, 0);
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (3, 2, 0, 15, 0);
+
+# global moderators having standard access + polls
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (4, 2, 0, 21, 0);
+
+# administrators having full forum and full moderator access
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (5, 2, 0, 14, 0);
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (5, 2, 0, 10, 0);
+
+# Bots having bot access
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (6, 2, 0, 19, 0);
+
+# NEW MEMBERS aren't allowed to PM
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (7, 0, 0, 23, 0);
+
+# NEW MEMBERS on the queue
+INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (7, 2, 0, 24, 0);
+
+
+# -- Demo Topic
+INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, topic_views, topic_replies, topic_replies_real, forum_id, topic_status, topic_type, topic_first_post_id, topic_first_poster_name, topic_first_poster_colour, topic_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_last_poster_colour, topic_last_post_subject, topic_last_post_time, topic_last_view_time, poll_title) VALUES ('{L_TOPICS_TOPIC_TITLE}', 2, 972086460, 0, 0, 0, 2, 0, 0, 1, 'Admin', 'AA0000', 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, 972086460, '');
+
+# -- Demo Post
+INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, icon_id, post_time, post_username, poster_ip, post_subject, post_text, post_checksum, bbcode_uid) VALUES (1, 2, 2, 0, 972086460, '', '127.0.0.1', '{L_TOPICS_TOPIC_TITLE}', '{L_DEFAULT_INSTALL_POST}', '5dd683b17f641daf84c040bfefc58ce9', '');
+
+# -- Admin posted to the demo topic
+INSERT INTO phpbb_topics_posted (user_id, topic_id, topic_posted) VALUES (2, 1, 1);
+
+# -- Smilies
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':D', 'icon_e_biggrin.gif', '{L_SMILIES_VERY_HAPPY}', 15, 17, 1);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-D', 'icon_e_biggrin.gif', '{L_SMILIES_VERY_HAPPY}', 15, 17, 2);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':grin:', 'icon_e_biggrin.gif', '{L_SMILIES_VERY_HAPPY}', 15, 17, 3);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':)', 'icon_e_smile.gif', '{L_SMILIES_SMILE}', 15, 17, 4);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-)', 'icon_e_smile.gif', '{L_SMILIES_SMILE}', 15, 17, 5);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':smile:', 'icon_e_smile.gif', '{L_SMILIES_SMILE}', 15, 17, 6);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (';)', 'icon_e_wink.gif', '{L_SMILIES_WINK}', 15, 17, 7);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (';-)', 'icon_e_wink.gif', '{L_SMILIES_WINK}', 15, 17, 8);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':wink:', 'icon_e_wink.gif', '{L_SMILIES_WINK}', 15, 17, 9);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':(', 'icon_e_sad.gif', '{L_SMILIES_SAD}', 15, 17, 10);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-(', 'icon_e_sad.gif', '{L_SMILIES_SAD}', 15, 17, 11);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':sad:', 'icon_e_sad.gif', '{L_SMILIES_SAD}', 15, 17, 12);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':o', 'icon_e_surprised.gif', '{L_SMILIES_SURPRISED}', 15, 17, 13);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-o', 'icon_e_surprised.gif', '{L_SMILIES_SURPRISED}', 15, 17, 14);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':eek:', 'icon_e_surprised.gif', '{L_SMILIES_SURPRISED}', 15, 17, 15);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':shock:', 'icon_eek.gif', '{L_SMILIES_SHOCKED}', 15, 17, 16);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':?', 'icon_e_confused.gif', '{L_SMILIES_CONFUSED}', 15, 17, 17);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-?', 'icon_e_confused.gif', '{L_SMILIES_CONFUSED}', 15, 17, 18);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':???:', 'icon_e_confused.gif', '{L_SMILIES_CONFUSED}', 15, 17, 19);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES ('8-)', 'icon_cool.gif', '{L_SMILIES_COOL}', 15, 17, 20);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':cool:', 'icon_cool.gif', '{L_SMILIES_COOL}', 15, 17, 21);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':lol:', 'icon_lol.gif', '{L_SMILIES_LAUGHING}', 15, 17, 22);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':x', 'icon_mad.gif', '{L_SMILIES_MAD}', 15, 17, 23);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-x', 'icon_mad.gif', '{L_SMILIES_MAD}', 15, 17, 24);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':mad:', 'icon_mad.gif', '{L_SMILIES_MAD}', 15, 17, 25);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':P', 'icon_razz.gif', '{L_SMILIES_RAZZ}', 15, 17, 26);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-P', 'icon_razz.gif', '{L_SMILIES_RAZZ}', 15, 17, 27);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':razz:', 'icon_razz.gif', '{L_SMILIES_RAZZ}', 15, 17, 28);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':oops:', 'icon_redface.gif', '{L_SMILIES_EMARRASSED}', 15, 17, 29);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':cry:', 'icon_cry.gif', '{L_SMILIES_CRYING}', 15, 17, 30);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':evil:', 'icon_evil.gif', '{L_SMILIES_EVIL}', 15, 17, 31);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':twisted:', 'icon_twisted.gif', '{L_SMILIES_TWISTED_EVIL}', 15, 17, 32);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':roll:', 'icon_rolleyes.gif', '{L_SMILIES_ROLLING_EYES}', 15, 17, 33);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':!:', 'icon_exclaim.gif', '{L_SMILIES_EXCLAMATION}', 15, 17, 34);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':?:', 'icon_question.gif', '{L_SMILIES_QUESTION}', 15, 17, 35);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':idea:', 'icon_idea.gif', '{L_SMILIES_IDEA}', 15, 17, 36);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':arrow:', 'icon_arrow.gif', '{L_SMILIES_ARROW}', 15, 17, 37);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':|', 'icon_neutral.gif', '{L_SMILIES_NEUTRAL}', 15, 17, 38);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':-|', 'icon_neutral.gif', '{L_SMILIES_NEUTRAL}', 15, 17, 39);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':mrgreen:', 'icon_mrgreen.gif', '{L_SMILIES_MR_GREEN}', 15, 17, 40);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':geek:', 'icon_e_geek.gif', '{L_SMILIES_GEEK}', 17, 17, 41);
+INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':ugeek:', 'icon_e_ugeek.gif', '{L_SMILIES_UBER_GEEK}', 17, 18, 42);
+
+# -- icons
+INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/fire.gif', 16, 16, 1, 1);
+INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/redface.gif', 16, 16, 9, 1);
+INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/mrgreen.gif', 16, 16, 10, 1);
+INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/heart.gif', 16, 16, 4, 1);
+INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/star.gif', 16, 16, 2, 1);
+INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/radioactive.gif', 16, 16, 3, 1);
+INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/thinking.gif', 16, 16, 5, 1);
+INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/info.gif', 16, 16, 8, 1);
+INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/question.gif', 16, 16, 6, 1);
+INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/alert.gif', 16, 16, 7, 1);
+
+# -- reasons
+INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('warez', '{L_REPORT_WAREZ}', 1);
+INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('spam', '{L_REPORT_SPAM}', 2);
+INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('off_topic', '{L_REPORT_OFF_TOPIC}', 3);
+INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('other', '{L_REPORT_OTHER}', 4);
+
+# -- extension_groups
+INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_IMAGES}', 1, 1, 1, '', 0, '');
+INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_ARCHIVES}', 0, 1, 1, '', 0, '');
+INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_PLAIN_TEXT}', 0, 0, 1, '', 0, '');
+INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_DOCUMENTS}', 0, 0, 1, '', 0, '');
+INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_REAL_MEDIA}', 3, 0, 1, '', 0, '');
+INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_WINDOWS_MEDIA}', 2, 0, 1, '', 0, '');
+INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_FLASH_FILES}', 5, 0, 1, '', 0, '');
+INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_QUICKTIME_MEDIA}', 6, 0, 1, '', 0, '');
+INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_DOWNLOADABLE_FILES}', 0, 0, 1, '', 0, '');
+
+# -- extensions
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'gif');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'png');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'jpeg');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'jpg');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'tif');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'tiff');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'tga');
+
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'gtar');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'gz');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'tar');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'zip');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'rar');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'ace');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'torrent');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'tgz');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'bz2');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, '7z');
+
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'txt');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'c');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'h');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'cpp');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'hpp');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'diz');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'csv');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'ini');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'log');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'js');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'xml');
+
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'xls');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'xlsx');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'xlsm');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'xlsb');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'doc');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'docx');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'docm');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'dot');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'dotx');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'dotm');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'pdf');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'ai');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'ps');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'ppt');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'pptx');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'pptm');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'odg');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'odp');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'ods');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'odt');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'rtf');
+
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (5, 'rm');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (5, 'ram');
+
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (6, 'wma');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (6, 'wmv');
+
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (7, 'swf');
+
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'mov');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'm4v');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'm4a');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'mp4');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, '3gp');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, '3g2');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'qt');
+
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'mpeg');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'mpg');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'mp3');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogg');
+INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogm');
+
+# POSTGRES COMMIT # \ No newline at end of file
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
new file mode 100644
index 0000000000..d754219cdf
--- /dev/null
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -0,0 +1,985 @@
+#
+# $Id$
+#
+
+BEGIN TRANSACTION;
+
+# Table: 'phpbb_attachments'
+CREATE TABLE phpbb_attachments (
+ attach_id INTEGER PRIMARY KEY NOT NULL ,
+ post_msg_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ in_message INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ is_orphan INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ physical_filename varchar(255) NOT NULL DEFAULT '',
+ real_filename varchar(255) NOT NULL DEFAULT '',
+ download_count INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ attach_comment text(65535) NOT NULL DEFAULT '',
+ extension varchar(100) NOT NULL DEFAULT '',
+ mimetype varchar(100) NOT NULL DEFAULT '',
+ filesize INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ filetime INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ thumbnail INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime);
+CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id);
+CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id);
+CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id);
+CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan);
+
+# Table: 'phpbb_acl_groups'
+CREATE TABLE phpbb_acl_groups (
+ group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ auth_role_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ auth_setting tinyint(2) NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id);
+CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id);
+CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id);
+
+# Table: 'phpbb_acl_options'
+CREATE TABLE phpbb_acl_options (
+ auth_option_id INTEGER PRIMARY KEY NOT NULL ,
+ auth_option varchar(50) NOT NULL DEFAULT '',
+ is_global INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ is_local INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ founder_only INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE UNIQUE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options (auth_option);
+
+# Table: 'phpbb_acl_roles'
+CREATE TABLE phpbb_acl_roles (
+ role_id INTEGER PRIMARY KEY NOT NULL ,
+ role_name varchar(255) NOT NULL DEFAULT '',
+ role_description text(65535) NOT NULL DEFAULT '',
+ role_type varchar(10) NOT NULL DEFAULT '',
+ role_order INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type);
+CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order);
+
+# Table: 'phpbb_acl_roles_data'
+CREATE TABLE phpbb_acl_roles_data (
+ role_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ auth_setting tinyint(2) NOT NULL DEFAULT '0',
+ PRIMARY KEY (role_id, auth_option_id)
+);
+
+CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id);
+
+# Table: 'phpbb_acl_users'
+CREATE TABLE phpbb_acl_users (
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ auth_role_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ auth_setting tinyint(2) NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id);
+CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
+CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
+
+# Table: 'phpbb_banlist'
+CREATE TABLE phpbb_banlist (
+ ban_id INTEGER PRIMARY KEY NOT NULL ,
+ ban_userid INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ ban_ip varchar(40) NOT NULL DEFAULT '',
+ ban_email varchar(100) NOT NULL DEFAULT '',
+ ban_start INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ ban_end INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ ban_exclude INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ ban_reason varchar(255) NOT NULL DEFAULT '',
+ ban_give_reason varchar(255) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end);
+CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude);
+CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude);
+CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude);
+
+# Table: 'phpbb_bbcodes'
+CREATE TABLE phpbb_bbcodes (
+ bbcode_id tinyint(3) NOT NULL DEFAULT '0',
+ bbcode_tag varchar(16) NOT NULL DEFAULT '',
+ bbcode_helpline varchar(255) NOT NULL DEFAULT '',
+ display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ bbcode_match text(65535) NOT NULL DEFAULT '',
+ bbcode_tpl mediumtext(16777215) NOT NULL DEFAULT '',
+ first_pass_match mediumtext(16777215) NOT NULL DEFAULT '',
+ first_pass_replace mediumtext(16777215) NOT NULL DEFAULT '',
+ second_pass_match mediumtext(16777215) NOT NULL DEFAULT '',
+ second_pass_replace mediumtext(16777215) NOT NULL DEFAULT '',
+ PRIMARY KEY (bbcode_id)
+);
+
+CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting);
+
+# Table: 'phpbb_bookmarks'
+CREATE TABLE phpbb_bookmarks (
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (topic_id, user_id)
+);
+
+
+# Table: 'phpbb_bots'
+CREATE TABLE phpbb_bots (
+ bot_id INTEGER PRIMARY KEY NOT NULL ,
+ bot_active INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ bot_name text(65535) NOT NULL DEFAULT '',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ bot_agent varchar(255) NOT NULL DEFAULT '',
+ bot_ip varchar(255) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active);
+
+# Table: 'phpbb_config'
+CREATE TABLE phpbb_config (
+ config_name varchar(255) NOT NULL DEFAULT '',
+ config_value varchar(255) NOT NULL DEFAULT '',
+ is_dynamic INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (config_name)
+);
+
+CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic);
+
+# Table: 'phpbb_confirm'
+CREATE TABLE phpbb_confirm (
+ confirm_id char(32) NOT NULL DEFAULT '',
+ session_id char(32) NOT NULL DEFAULT '',
+ confirm_type tinyint(3) NOT NULL DEFAULT '0',
+ code varchar(8) NOT NULL DEFAULT '',
+ seed INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ attempts INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (session_id, confirm_id)
+);
+
+CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type);
+
+# Table: 'phpbb_disallow'
+CREATE TABLE phpbb_disallow (
+ disallow_id INTEGER PRIMARY KEY NOT NULL ,
+ disallow_username varchar(255) NOT NULL DEFAULT ''
+);
+
+
+# Table: 'phpbb_drafts'
+CREATE TABLE phpbb_drafts (
+ draft_id INTEGER PRIMARY KEY NOT NULL ,
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ save_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ draft_subject text(65535) NOT NULL DEFAULT '',
+ draft_message mediumtext(16777215) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time);
+
+# Table: 'phpbb_extensions'
+CREATE TABLE phpbb_extensions (
+ extension_id INTEGER PRIMARY KEY NOT NULL ,
+ group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ extension varchar(100) NOT NULL DEFAULT ''
+);
+
+
+# Table: 'phpbb_extension_groups'
+CREATE TABLE phpbb_extension_groups (
+ group_id INTEGER PRIMARY KEY NOT NULL ,
+ group_name varchar(255) NOT NULL DEFAULT '',
+ cat_id tinyint(2) NOT NULL DEFAULT '0',
+ allow_group INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ download_mode INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ upload_icon varchar(255) NOT NULL DEFAULT '',
+ max_filesize INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ allowed_forums text(65535) NOT NULL DEFAULT '',
+ allow_in_pm INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+
+# Table: 'phpbb_forums'
+CREATE TABLE phpbb_forums (
+ forum_id INTEGER PRIMARY KEY NOT NULL ,
+ parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ left_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ right_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_parents mediumtext(16777215) NOT NULL DEFAULT '',
+ forum_name text(65535) NOT NULL DEFAULT '',
+ forum_desc text(65535) NOT NULL DEFAULT '',
+ forum_desc_bitfield varchar(255) NOT NULL DEFAULT '',
+ forum_desc_options INTEGER UNSIGNED NOT NULL DEFAULT '7',
+ forum_desc_uid varchar(8) NOT NULL DEFAULT '',
+ forum_link varchar(255) NOT NULL DEFAULT '',
+ forum_password varchar(40) NOT NULL DEFAULT '',
+ forum_style INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_image varchar(255) NOT NULL DEFAULT '',
+ forum_rules text(65535) NOT NULL DEFAULT '',
+ forum_rules_link varchar(255) NOT NULL DEFAULT '',
+ forum_rules_bitfield varchar(255) NOT NULL DEFAULT '',
+ forum_rules_options INTEGER UNSIGNED NOT NULL DEFAULT '7',
+ forum_rules_uid varchar(8) NOT NULL DEFAULT '',
+ forum_topics_per_page tinyint(4) NOT NULL DEFAULT '0',
+ forum_type tinyint(4) NOT NULL DEFAULT '0',
+ forum_status tinyint(4) NOT NULL DEFAULT '0',
+ forum_posts INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_topics INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_topics_real INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_last_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_last_poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_last_post_subject text(65535) NOT NULL DEFAULT '',
+ forum_last_post_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_last_poster_name varchar(255) NOT NULL DEFAULT '',
+ forum_last_poster_colour varchar(6) NOT NULL DEFAULT '',
+ forum_flags tinyint(4) NOT NULL DEFAULT '32',
+ forum_options INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ display_subforum_list INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ display_on_index INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_indexing INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_icons INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_prune INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ prune_next INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ prune_days INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ prune_viewed INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ prune_freq INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id);
+CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id);
+
+# Table: 'phpbb_forums_access'
+CREATE TABLE phpbb_forums_access (
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ session_id char(32) NOT NULL DEFAULT '',
+ PRIMARY KEY (forum_id, user_id, session_id)
+);
+
+
+# Table: 'phpbb_forums_track'
+CREATE TABLE phpbb_forums_track (
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ mark_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (user_id, forum_id)
+);
+
+
+# Table: 'phpbb_forums_watch'
+CREATE TABLE phpbb_forums_watch (
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ notify_status INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id);
+CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id);
+CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status);
+
+# Table: 'phpbb_groups'
+CREATE TABLE phpbb_groups (
+ group_id INTEGER PRIMARY KEY NOT NULL ,
+ group_type tinyint(4) NOT NULL DEFAULT '1',
+ group_founder_manage INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_skip_auth INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_name varchar(255) NOT NULL DEFAULT '',
+ group_desc text(65535) NOT NULL DEFAULT '',
+ group_desc_bitfield varchar(255) NOT NULL DEFAULT '',
+ group_desc_options INTEGER UNSIGNED NOT NULL DEFAULT '7',
+ group_desc_uid varchar(8) NOT NULL DEFAULT '',
+ group_display INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_avatar varchar(255) NOT NULL DEFAULT '',
+ group_avatar_type tinyint(2) NOT NULL DEFAULT '0',
+ group_avatar_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_avatar_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_rank INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_colour varchar(6) NOT NULL DEFAULT '',
+ group_sig_chars INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_receive_pm INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_message_limit INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_max_recipients INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_legend INTEGER UNSIGNED NOT NULL DEFAULT '1'
+);
+
+CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name);
+
+# Table: 'phpbb_icons'
+CREATE TABLE phpbb_icons (
+ icons_id INTEGER PRIMARY KEY NOT NULL ,
+ icons_url varchar(255) NOT NULL DEFAULT '',
+ icons_width tinyint(4) NOT NULL DEFAULT '0',
+ icons_height tinyint(4) NOT NULL DEFAULT '0',
+ icons_order INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '1'
+);
+
+CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting);
+
+# Table: 'phpbb_lang'
+CREATE TABLE phpbb_lang (
+ lang_id INTEGER PRIMARY KEY NOT NULL ,
+ lang_iso varchar(30) NOT NULL DEFAULT '',
+ lang_dir varchar(30) NOT NULL DEFAULT '',
+ lang_english_name varchar(100) NOT NULL DEFAULT '',
+ lang_local_name varchar(255) NOT NULL DEFAULT '',
+ lang_author varchar(255) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso);
+
+# Table: 'phpbb_log'
+CREATE TABLE phpbb_log (
+ log_id INTEGER PRIMARY KEY NOT NULL ,
+ log_type tinyint(4) NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ reportee_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ log_ip varchar(40) NOT NULL DEFAULT '',
+ log_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ log_operation text(65535) NOT NULL DEFAULT '',
+ log_data mediumtext(16777215) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type);
+CREATE INDEX phpbb_log_log_time ON phpbb_log (log_time);
+CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id);
+CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id);
+CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id);
+CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id);
+
+# Table: 'phpbb_moderator_cache'
+CREATE TABLE phpbb_moderator_cache (
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ username varchar(255) NOT NULL DEFAULT '',
+ group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_name varchar(255) NOT NULL DEFAULT '',
+ display_on_index INTEGER UNSIGNED NOT NULL DEFAULT '1'
+);
+
+CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index);
+CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id);
+
+# Table: 'phpbb_modules'
+CREATE TABLE phpbb_modules (
+ module_id INTEGER PRIMARY KEY NOT NULL ,
+ module_enabled INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ module_display INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ module_basename varchar(255) NOT NULL DEFAULT '',
+ module_class varchar(10) NOT NULL DEFAULT '',
+ parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ left_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ right_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ module_langname varchar(255) NOT NULL DEFAULT '',
+ module_mode varchar(255) NOT NULL DEFAULT '',
+ module_auth varchar(255) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id);
+CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled);
+CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id);
+
+# Table: 'phpbb_poll_options'
+CREATE TABLE phpbb_poll_options (
+ poll_option_id tinyint(4) NOT NULL DEFAULT '0',
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poll_option_text text(65535) NOT NULL DEFAULT '',
+ poll_option_total INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id);
+CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id);
+
+# Table: 'phpbb_poll_votes'
+CREATE TABLE phpbb_poll_votes (
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poll_option_id tinyint(4) NOT NULL DEFAULT '0',
+ vote_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ vote_user_ip varchar(40) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id);
+CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id);
+CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip);
+
+# Table: 'phpbb_posts'
+CREATE TABLE phpbb_posts (
+ post_id INTEGER PRIMARY KEY NOT NULL ,
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poster_ip varchar(40) NOT NULL DEFAULT '',
+ post_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ post_approved INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ post_reported INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_magic_url INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_sig INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ post_username varchar(255) NOT NULL DEFAULT '',
+ post_subject text(65535) NOT NULL DEFAULT '',
+ post_text mediumtext(16777215) NOT NULL DEFAULT '',
+ post_checksum varchar(32) NOT NULL DEFAULT '',
+ post_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ bbcode_bitfield varchar(255) NOT NULL DEFAULT '',
+ bbcode_uid varchar(8) NOT NULL DEFAULT '',
+ post_postcount INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ post_edit_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ post_edit_reason text(65535) NOT NULL DEFAULT '',
+ post_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ post_edit_count INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ post_edit_locked INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id);
+CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id);
+CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip);
+CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id);
+CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved);
+CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username);
+CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time);
+
+# Table: 'phpbb_privmsgs'
+CREATE TABLE phpbb_privmsgs (
+ msg_id INTEGER PRIMARY KEY NOT NULL ,
+ root_level INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ author_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ author_ip varchar(40) NOT NULL DEFAULT '',
+ message_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_magic_url INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_sig INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ message_subject text(65535) NOT NULL DEFAULT '',
+ message_text mediumtext(16777215) NOT NULL DEFAULT '',
+ message_edit_reason text(65535) NOT NULL DEFAULT '',
+ message_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ message_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ bbcode_bitfield varchar(255) NOT NULL DEFAULT '',
+ bbcode_uid varchar(8) NOT NULL DEFAULT '',
+ message_edit_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ message_edit_count INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ to_address text(65535) NOT NULL DEFAULT '',
+ bcc_address text(65535) NOT NULL DEFAULT '',
+ message_reported INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip);
+CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time);
+CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id);
+CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level);
+
+# Table: 'phpbb_privmsgs_folder'
+CREATE TABLE phpbb_privmsgs_folder (
+ folder_id INTEGER PRIMARY KEY NOT NULL ,
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ folder_name varchar(255) NOT NULL DEFAULT '',
+ pm_count INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id);
+
+# Table: 'phpbb_privmsgs_rules'
+CREATE TABLE phpbb_privmsgs_rules (
+ rule_id INTEGER PRIMARY KEY NOT NULL ,
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ rule_check INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ rule_connection INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ rule_string varchar(255) NOT NULL DEFAULT '',
+ rule_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ rule_group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ rule_action INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ rule_folder_id int(11) NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id);
+
+# Table: 'phpbb_privmsgs_to'
+CREATE TABLE phpbb_privmsgs_to (
+ msg_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ author_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ pm_deleted INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ pm_new INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ pm_unread INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ pm_replied INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ pm_marked INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ pm_forwarded INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ folder_id int(11) NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id);
+CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id);
+CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id);
+
+# Table: 'phpbb_profile_fields'
+CREATE TABLE phpbb_profile_fields (
+ field_id INTEGER PRIMARY KEY NOT NULL ,
+ field_name varchar(255) NOT NULL DEFAULT '',
+ field_type tinyint(4) NOT NULL DEFAULT '0',
+ field_ident varchar(20) NOT NULL DEFAULT '',
+ field_length varchar(20) NOT NULL DEFAULT '',
+ field_minlen varchar(255) NOT NULL DEFAULT '',
+ field_maxlen varchar(255) NOT NULL DEFAULT '',
+ field_novalue varchar(255) NOT NULL DEFAULT '',
+ field_default_value varchar(255) NOT NULL DEFAULT '',
+ field_validation varchar(20) NOT NULL DEFAULT '',
+ field_required INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_show_on_reg INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_show_on_vt INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_show_profile INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_hide INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_no_view INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_active INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_order INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type);
+CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order);
+
+# Table: 'phpbb_profile_fields_data'
+CREATE TABLE phpbb_profile_fields_data (
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (user_id)
+);
+
+
+# Table: 'phpbb_profile_fields_lang'
+CREATE TABLE phpbb_profile_fields_lang (
+ field_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ lang_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_type tinyint(4) NOT NULL DEFAULT '0',
+ lang_value varchar(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (field_id, lang_id, option_id)
+);
+
+
+# Table: 'phpbb_profile_lang'
+CREATE TABLE phpbb_profile_lang (
+ field_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ lang_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ lang_name varchar(255) NOT NULL DEFAULT '',
+ lang_explain text(65535) NOT NULL DEFAULT '',
+ lang_default_value varchar(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (field_id, lang_id)
+);
+
+
+# Table: 'phpbb_ranks'
+CREATE TABLE phpbb_ranks (
+ rank_id INTEGER PRIMARY KEY NOT NULL ,
+ rank_title varchar(255) NOT NULL DEFAULT '',
+ rank_min INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ rank_special INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ rank_image varchar(255) NOT NULL DEFAULT ''
+);
+
+
+# Table: 'phpbb_reports'
+CREATE TABLE phpbb_reports (
+ report_id INTEGER PRIMARY KEY NOT NULL ,
+ reason_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ pm_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_notify INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ report_closed INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ report_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ report_text mediumtext(16777215) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id);
+CREATE INDEX phpbb_reports_pm_id ON phpbb_reports (pm_id);
+
+# Table: 'phpbb_reports_reasons'
+CREATE TABLE phpbb_reports_reasons (
+ reason_id INTEGER PRIMARY KEY NOT NULL ,
+ reason_title varchar(255) NOT NULL DEFAULT '',
+ reason_description mediumtext(16777215) NOT NULL DEFAULT '',
+ reason_order INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+
+# Table: 'phpbb_search_results'
+CREATE TABLE phpbb_search_results (
+ search_key varchar(32) NOT NULL DEFAULT '',
+ search_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ search_keywords mediumtext(16777215) NOT NULL DEFAULT '',
+ search_authors mediumtext(16777215) NOT NULL DEFAULT '',
+ PRIMARY KEY (search_key)
+);
+
+
+# Table: 'phpbb_search_wordlist'
+CREATE TABLE phpbb_search_wordlist (
+ word_id INTEGER PRIMARY KEY NOT NULL ,
+ word_text varchar(255) NOT NULL DEFAULT '',
+ word_common INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ word_count INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist (word_text);
+CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count);
+
+# Table: 'phpbb_search_wordmatch'
+CREATE TABLE phpbb_search_wordmatch (
+ post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ word_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ title_match INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch (word_id, post_id, title_match);
+CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id);
+CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id);
+
+# Table: 'phpbb_sessions'
+CREATE TABLE phpbb_sessions (
+ session_id char(32) NOT NULL DEFAULT '',
+ session_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ session_forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ session_last_visit INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ session_start INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ session_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ session_ip varchar(40) NOT NULL DEFAULT '',
+ session_browser varchar(150) NOT NULL DEFAULT '',
+ session_forwarded_for varchar(255) NOT NULL DEFAULT '',
+ session_page varchar(255) NOT NULL DEFAULT '',
+ session_viewonline INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ session_autologin INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ session_admin INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (session_id)
+);
+
+CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time);
+CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id);
+CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id);
+
+# Table: 'phpbb_sessions_keys'
+CREATE TABLE phpbb_sessions_keys (
+ key_id char(32) NOT NULL DEFAULT '',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ last_ip varchar(40) NOT NULL DEFAULT '',
+ last_login INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (key_id, user_id)
+);
+
+CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login);
+
+# Table: 'phpbb_sitelist'
+CREATE TABLE phpbb_sitelist (
+ site_id INTEGER PRIMARY KEY NOT NULL ,
+ site_ip varchar(40) NOT NULL DEFAULT '',
+ site_hostname varchar(255) NOT NULL DEFAULT '',
+ ip_exclude INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+
+# Table: 'phpbb_smilies'
+CREATE TABLE phpbb_smilies (
+ smiley_id INTEGER PRIMARY KEY NOT NULL ,
+ code varchar(50) NOT NULL DEFAULT '',
+ emotion varchar(50) NOT NULL DEFAULT '',
+ smiley_url varchar(50) NOT NULL DEFAULT '',
+ smiley_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ smiley_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ smiley_order INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '1'
+);
+
+CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting);
+
+# Table: 'phpbb_styles'
+CREATE TABLE phpbb_styles (
+ style_id INTEGER PRIMARY KEY NOT NULL ,
+ style_name varchar(255) NOT NULL DEFAULT '',
+ style_copyright varchar(255) NOT NULL DEFAULT '',
+ style_active INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ template_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ theme_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ imageset_id INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name);
+CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id);
+CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id);
+CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id);
+
+# Table: 'phpbb_styles_template'
+CREATE TABLE phpbb_styles_template (
+ template_id INTEGER PRIMARY KEY NOT NULL ,
+ template_name varchar(255) NOT NULL DEFAULT '',
+ template_copyright varchar(255) NOT NULL DEFAULT '',
+ template_path varchar(100) NOT NULL DEFAULT '',
+ bbcode_bitfield varchar(255) NOT NULL DEFAULT 'kNg=',
+ template_storedb INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ template_inherits_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ template_inherit_path varchar(255) NOT NULL DEFAULT ''
+);
+
+CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name);
+
+# Table: 'phpbb_styles_template_data'
+CREATE TABLE phpbb_styles_template_data (
+ template_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ template_filename varchar(100) NOT NULL DEFAULT '',
+ template_included text(65535) NOT NULL DEFAULT '',
+ template_mtime INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ template_data mediumtext(16777215) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id);
+CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename);
+
+# Table: 'phpbb_styles_theme'
+CREATE TABLE phpbb_styles_theme (
+ theme_id INTEGER PRIMARY KEY NOT NULL ,
+ theme_name varchar(255) NOT NULL DEFAULT '',
+ theme_copyright varchar(255) NOT NULL DEFAULT '',
+ theme_path varchar(100) NOT NULL DEFAULT '',
+ theme_storedb INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ theme_mtime INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ theme_data mediumtext(16777215) NOT NULL DEFAULT ''
+);
+
+CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name);
+
+# Table: 'phpbb_styles_imageset'
+CREATE TABLE phpbb_styles_imageset (
+ imageset_id INTEGER PRIMARY KEY NOT NULL ,
+ imageset_name varchar(255) NOT NULL DEFAULT '',
+ imageset_copyright varchar(255) NOT NULL DEFAULT '',
+ imageset_path varchar(100) NOT NULL DEFAULT ''
+);
+
+CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset (imageset_name);
+
+# Table: 'phpbb_styles_imageset_data'
+CREATE TABLE phpbb_styles_imageset_data (
+ image_id INTEGER PRIMARY KEY NOT NULL ,
+ image_name varchar(200) NOT NULL DEFAULT '',
+ image_filename varchar(200) NOT NULL DEFAULT '',
+ image_lang varchar(30) NOT NULL DEFAULT '',
+ image_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ image_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ imageset_id INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id);
+
+# Table: 'phpbb_topics'
+CREATE TABLE phpbb_topics (
+ topic_id INTEGER PRIMARY KEY NOT NULL ,
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_approved INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ topic_reported INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_title text(65535) NOT NULL DEFAULT '',
+ topic_poster INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_time_limit INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_views INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_replies INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_replies_real INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_status tinyint(3) NOT NULL DEFAULT '0',
+ topic_type tinyint(3) NOT NULL DEFAULT '0',
+ topic_first_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_first_poster_name varchar(255) NOT NULL DEFAULT '',
+ topic_first_poster_colour varchar(6) NOT NULL DEFAULT '',
+ topic_last_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_last_poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_last_poster_name varchar(255) NOT NULL DEFAULT '',
+ topic_last_poster_colour varchar(6) NOT NULL DEFAULT '',
+ topic_last_post_subject text(65535) NOT NULL DEFAULT '',
+ topic_last_post_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_last_view_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_moved_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_bumped INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_bumper INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poll_title text(65535) NOT NULL DEFAULT '',
+ poll_start INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poll_length INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poll_max_options tinyint(4) NOT NULL DEFAULT '1',
+ poll_last_vote INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poll_vote_change INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id);
+CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type);
+CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time);
+CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved);
+CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id);
+CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id);
+
+# Table: 'phpbb_topics_track'
+CREATE TABLE phpbb_topics_track (
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ mark_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (user_id, topic_id)
+);
+
+CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id);
+
+# Table: 'phpbb_topics_posted'
+CREATE TABLE phpbb_topics_posted (
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_posted INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (user_id, topic_id)
+);
+
+
+# Table: 'phpbb_topics_watch'
+CREATE TABLE phpbb_topics_watch (
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ notify_status INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id);
+CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id);
+CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status);
+
+# Table: 'phpbb_user_group'
+CREATE TABLE phpbb_user_group (
+ group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_leader INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_pending INTEGER UNSIGNED NOT NULL DEFAULT '1'
+);
+
+CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id);
+CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id);
+CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader);
+
+# Table: 'phpbb_users'
+CREATE TABLE phpbb_users (
+ user_id INTEGER PRIMARY KEY NOT NULL ,
+ user_type tinyint(2) NOT NULL DEFAULT '0',
+ group_id INTEGER UNSIGNED NOT NULL DEFAULT '3',
+ user_permissions mediumtext(16777215) NOT NULL DEFAULT '',
+ user_perm_from INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_ip varchar(40) NOT NULL DEFAULT '',
+ user_regdate INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ username varchar(255) NOT NULL DEFAULT '',
+ username_clean varchar(255) NOT NULL DEFAULT '',
+ user_password varchar(40) NOT NULL DEFAULT '',
+ user_passchg INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_pass_convert INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_email varchar(100) NOT NULL DEFAULT '',
+ user_email_hash bigint(20) NOT NULL DEFAULT '0',
+ user_birthday varchar(10) NOT NULL DEFAULT '',
+ user_lastvisit INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_lastmark INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_lastpost_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_lastpage varchar(200) NOT NULL DEFAULT '',
+ user_last_confirm_key varchar(10) NOT NULL DEFAULT '',
+ user_last_search INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_warnings tinyint(4) NOT NULL DEFAULT '0',
+ user_last_warning INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_login_attempts tinyint(4) NOT NULL DEFAULT '0',
+ user_inactive_reason tinyint(2) NOT NULL DEFAULT '0',
+ user_inactive_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_posts INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_lang varchar(30) NOT NULL DEFAULT '',
+ user_timezone decimal(5,2) NOT NULL DEFAULT '0',
+ user_dst INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_dateformat varchar(30) NOT NULL DEFAULT 'd M Y H:i',
+ user_style INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_rank INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_colour varchar(6) NOT NULL DEFAULT '',
+ user_new_privmsg int(4) NOT NULL DEFAULT '0',
+ user_unread_privmsg int(4) NOT NULL DEFAULT '0',
+ user_last_privmsg INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_message_rules INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_full_folder int(11) NOT NULL DEFAULT '-3',
+ user_emailtime INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_topic_show_days INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_topic_sortby_type varchar(1) NOT NULL DEFAULT 't',
+ user_topic_sortby_dir varchar(1) NOT NULL DEFAULT 'd',
+ user_post_show_days INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_post_sortby_type varchar(1) NOT NULL DEFAULT 't',
+ user_post_sortby_dir varchar(1) NOT NULL DEFAULT 'a',
+ user_notify INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_notify_pm INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ user_notify_type tinyint(4) NOT NULL DEFAULT '0',
+ user_allow_pm INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ user_allow_viewonline INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ user_allow_viewemail INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ user_allow_massemail INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ user_options INTEGER UNSIGNED NOT NULL DEFAULT '230271',
+ user_avatar varchar(255) NOT NULL DEFAULT '',
+ user_avatar_type tinyint(2) NOT NULL DEFAULT '0',
+ user_avatar_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_avatar_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_sig mediumtext(16777215) NOT NULL DEFAULT '',
+ user_sig_bbcode_uid varchar(8) NOT NULL DEFAULT '',
+ user_sig_bbcode_bitfield varchar(255) NOT NULL DEFAULT '',
+ user_from varchar(100) NOT NULL DEFAULT '',
+ user_icq varchar(15) NOT NULL DEFAULT '',
+ user_aim varchar(255) NOT NULL DEFAULT '',
+ user_yim varchar(255) NOT NULL DEFAULT '',
+ user_msnm varchar(255) NOT NULL DEFAULT '',
+ user_jabber varchar(255) NOT NULL DEFAULT '',
+ user_website varchar(200) NOT NULL DEFAULT '',
+ user_occ text(65535) NOT NULL DEFAULT '',
+ user_interests text(65535) NOT NULL DEFAULT '',
+ user_actkey varchar(32) NOT NULL DEFAULT '',
+ user_newpasswd varchar(40) NOT NULL DEFAULT '',
+ user_form_salt varchar(32) NOT NULL DEFAULT '',
+ user_new INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ user_reminded tinyint(4) NOT NULL DEFAULT '0',
+ user_reminded_time INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday);
+CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash);
+CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type);
+CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users (username_clean);
+
+# Table: 'phpbb_warnings'
+CREATE TABLE phpbb_warnings (
+ warning_id INTEGER PRIMARY KEY NOT NULL ,
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ log_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ warning_time INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+
+# Table: 'phpbb_words'
+CREATE TABLE phpbb_words (
+ word_id INTEGER PRIMARY KEY NOT NULL ,
+ word varchar(255) NOT NULL DEFAULT '',
+ replacement varchar(255) NOT NULL DEFAULT ''
+);
+
+
+# Table: 'phpbb_zebra'
+CREATE TABLE phpbb_zebra (
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ zebra_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ friend INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ foe INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (user_id, zebra_id)
+);
+
+
+
+COMMIT; \ No newline at end of file
diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php
new file mode 100644
index 0000000000..f6369b6739
--- /dev/null
+++ b/phpBB/language/en/acp/attachments.php
@@ -0,0 +1,164 @@
+<?php
+/**
+*
+* acp_attachments [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'ACP_ATTACHMENT_SETTINGS_EXPLAIN' => 'Here you can configure the main settings for attachments and the associated special categories.',
+ 'ACP_EXTENSION_GROUPS_EXPLAIN' => 'Here you can add, delete, modify or disable your extension groups. Further options include the assignment of a special category to them, changing the download mechanism and defining an upload icon which will be displayed in front of the attachment which belongs to the group.',
+ 'ACP_MANAGE_EXTENSIONS_EXPLAIN' => 'Here you can manage your allowed extensions. To activate your extensions, please refer to the extension groups management panel. We strongly recommend not to allow scripting extensions (such as <code>php</code>, <code>php3</code>, <code>php4</code>, <code>phtml</code>, <code>pl</code>, <code>cgi</code>, <code>py</code>, <code>rb</code>, <code>asp</code>, <code>aspx</code>, and so forth…).',
+ 'ACP_ORPHAN_ATTACHMENTS_EXPLAIN' => 'Here you are able to see orphaned files. This happens mostly if users are attaching files but not submitting the post. You are able to delete the files or attach them to existing posts. Attaching to posts requires a valid post ID, you have to determine this ID by yourself. This will assign the already uploaded attachment to the post you entered.',
+ 'ADD_EXTENSION' => 'Add extension',
+ 'ADD_EXTENSION_GROUP' => 'Add extension group',
+ 'ADMIN_UPLOAD_ERROR' => 'Errors while trying to attach file: “%sâ€.',
+ 'ALLOWED_FORUMS' => 'Allowed forums',
+ 'ALLOWED_FORUMS_EXPLAIN' => 'Able to post the assigned extensions at the selected (or all if selected) forums.',
+ 'ALLOWED_IN_PM_POST' => 'Allowed',
+ 'ALLOW_ATTACHMENTS' => 'Allow attachments',
+ 'ALLOW_ALL_FORUMS' => 'Allow all forums',
+ 'ALLOW_IN_PM' => 'Allowed in private messaging',
+ 'ALLOW_PM_ATTACHMENTS' => 'Allow attachments in private messages',
+ 'ALLOW_SELECTED_FORUMS' => 'Only forums selected below',
+ 'ASSIGNED_EXTENSIONS' => 'Assigned extensions',
+ 'ASSIGNED_GROUP' => 'Assigned extension group',
+ 'ATTACH_EXTENSIONS_URL' => 'Extensions',
+ 'ATTACH_EXT_GROUPS_URL' => 'Extension groups',
+ 'ATTACH_ID' => 'ID',
+ 'ATTACH_MAX_FILESIZE' => 'Maximum file size',
+ 'ATTACH_MAX_FILESIZE_EXPLAIN' => 'Maximum size of each file, with 0 being unlimited.',
+ 'ATTACH_MAX_PM_FILESIZE' => 'Maximum file size messaging',
+ 'ATTACH_MAX_PM_FILESIZE_EXPLAIN' => 'Maximum size of each file, with 0 being unlimited, attached to a private message.',
+ 'ATTACH_ORPHAN_URL' => 'Orphan attachments',
+ 'ATTACH_POST_ID' => 'Post ID',
+ 'ATTACH_QUOTA' => 'Total attachment quota',
+ 'ATTACH_QUOTA_EXPLAIN' => 'Maximum drive space available for attachments for the whole board, with 0 being unlimited.',
+ 'ATTACH_TO_POST' => 'Attach file to post',
+
+ 'CAT_FLASH_FILES' => 'Flash files',
+ 'CAT_IMAGES' => 'Images',
+ 'CAT_QUICKTIME_FILES' => 'Quicktime media files',
+ 'CAT_RM_FILES' => 'RealMedia media files',
+ 'CAT_WM_FILES' => 'Windows Media media files',
+ 'CHECK_CONTENT' => 'Check attachment files',
+ 'CHECK_CONTENT_EXPLAIN' => 'Some browsers can be tricked to assume an incorrect mimetype for uploaded files. This option ensures that such files likely to cause this are rejected.',
+ 'CREATE_GROUP' => 'Create new group',
+ 'CREATE_THUMBNAIL' => 'Create thumbnail',
+ 'CREATE_THUMBNAIL_EXPLAIN' => 'Create a thumbnail in all possible situations.',
+
+ 'DEFINE_ALLOWED_IPS' => 'Define allowed IPs/hostnames',
+ 'DEFINE_DISALLOWED_IPS' => 'Define disallowed IPs/hostnames',
+ 'DOWNLOAD_ADD_IPS_EXPLAIN' => 'To specify several different IPs or hostnames enter each on a new line. To specify a range of IP addresses separate the start and end with a hyphen (-), to specify a wildcard use “*â€.',
+ 'DOWNLOAD_REMOVE_IPS_EXPLAIN' => 'You can remove (or un-exclude) multiple IP addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded IPs have a blue background.',
+ 'DISPLAY_INLINED' => 'Display images inline',
+ 'DISPLAY_INLINED_EXPLAIN' => 'If set to No image attachments will show as a link.',
+ 'DISPLAY_ORDER' => 'Attachment display order',
+ 'DISPLAY_ORDER_EXPLAIN' => 'Display attachments ordered by time.',
+
+ 'EDIT_EXTENSION_GROUP' => 'Edit extension group',
+ 'EXCLUDE_ENTERED_IP' => 'Enable this to exclude the entered IP/hostname.',
+ 'EXCLUDE_FROM_ALLOWED_IP' => 'Exclude IP from allowed IPs/hostnames',
+ 'EXCLUDE_FROM_DISALLOWED_IP' => 'Exclude IP from disallowed IPs/hostnames',
+ 'EXTENSIONS_UPDATED' => 'Extensions successfully updated.',
+ 'EXTENSION_EXIST' => 'The extension %s already exists.',
+ 'EXTENSION_GROUP' => 'Extension group',
+ 'EXTENSION_GROUPS' => 'Extension groups',
+ 'EXTENSION_GROUP_DELETED' => 'Extension group successfully deleted.',
+ 'EXTENSION_GROUP_EXIST' => 'The extension group %s already exists.',
+
+ 'GO_TO_EXTENSIONS' => 'Go to extension management screen',
+ 'GROUP_NAME' => 'Group name',
+
+ 'IMAGE_LINK_SIZE' => 'Image link dimensions',
+ 'IMAGE_LINK_SIZE_EXPLAIN' => 'Display image attachment as an inline text link if image is larger than this. To disable this behaviour, set the values to 0px by 0px.',
+ 'IMAGICK_PATH' => 'Imagemagick path',
+ 'IMAGICK_PATH_EXPLAIN' => 'Full path to the imagemagick convert application, e.g. <samp>/usr/bin/</samp>.',
+
+ 'MAX_ATTACHMENTS' => 'Maximum number of attachments per post',
+ 'MAX_ATTACHMENTS_PM' => 'Maximum number of attachments per private message',
+ 'MAX_EXTGROUP_FILESIZE' => 'Maximum file size',
+ 'MAX_IMAGE_SIZE' => 'Maximum image dimensions',
+ 'MAX_IMAGE_SIZE_EXPLAIN' => 'Maximum size of image attachments. Set both values to 0px by 0px to disable dimension checking.',
+ 'MAX_THUMB_WIDTH' => 'Maximum thumbnail width in pixel',
+ 'MAX_THUMB_WIDTH_EXPLAIN' => 'A generated thumbnail will not exceed the width set here.',
+ 'MIN_THUMB_FILESIZE' => 'Minimum thumbnail file size',
+ 'MIN_THUMB_FILESIZE_EXPLAIN' => 'Do not create a thumbnail for images smaller than this.',
+ 'MODE_INLINE' => 'Inline',
+ 'MODE_PHYSICAL' => 'Physical',
+
+ 'NOT_ALLOWED_IN_PM' => 'Only allowed in posts',
+ 'NOT_ALLOWED_IN_PM_POST' => 'Not allowed',
+ 'NOT_ASSIGNED' => 'Not assigned',
+ 'NO_EXT_GROUP' => 'None',
+ 'NO_EXT_GROUP_NAME' => 'No group name entered',
+ 'NO_EXT_GROUP_SPECIFIED' => 'No extension group specified.',
+ 'NO_FILE_CAT' => 'None',
+ 'NO_IMAGE' => 'No image',
+ 'NO_THUMBNAIL_SUPPORT' => 'Thumbnail support has been disabled. For proper functionality either the GD extension need to be available or imagemagick being installed. Both were not found.',
+ 'NO_UPLOAD_DIR' => 'The upload directory you specified does not exist.',
+ 'NO_WRITE_UPLOAD' => 'The upload directory you specified cannot be written to. Please alter the permissions to allow the webserver to write to it.',
+
+ 'ONLY_ALLOWED_IN_PM' => 'Only allowed in private messages',
+ 'ORDER_ALLOW_DENY' => 'Allow',
+ 'ORDER_DENY_ALLOW' => 'Deny',
+
+ 'REMOVE_ALLOWED_IPS' => 'Remove or un-exclude <em>allowed</em> IPs/hostnames',
+ 'REMOVE_DISALLOWED_IPS' => 'Remove or un-exclude <em>disallowed</em> IPs/hostnames',
+
+ 'SEARCH_IMAGICK' => 'Search for Imagemagick',
+ 'SECURE_ALLOW_DENY' => 'Allow/Deny list',
+ 'SECURE_ALLOW_DENY_EXPLAIN' => 'Change the default behaviour when secure downloads are enabled of the Allow/Deny list to that of a <strong>whitelist</strong> (Allow) or a <strong>blacklist</strong> (Deny).',
+ 'SECURE_DOWNLOADS' => 'Enable secure downloads',
+ 'SECURE_DOWNLOADS_EXPLAIN' => 'With this option enabled, downloads are limited to IP’s/hostnames you define.',
+ 'SECURE_DOWNLOAD_NOTICE' => 'Secure Downloads are not enabled. The settings below will be applied after enabling secure downloads.',
+ 'SECURE_DOWNLOAD_UPDATE_SUCCESS'=> 'The IP list has been updated successfully.',
+ 'SECURE_EMPTY_REFERRER' => 'Allow empty referrer',
+ 'SECURE_EMPTY_REFERRER_EXPLAIN' => 'Secure downloads are based on referrers. Do you want to allow downloads for those omitting the referrer?',
+ 'SETTINGS_CAT_IMAGES' => 'Image category settings',
+ 'SPECIAL_CATEGORY' => 'Special category',
+ 'SPECIAL_CATEGORY_EXPLAIN' => 'Special categories differ between the way presented within posts.',
+ 'SUCCESSFULLY_UPLOADED' => 'Successfully uploaded.',
+ 'SUCCESS_EXTENSION_GROUP_ADD' => 'Extension group successfully added.',
+ 'SUCCESS_EXTENSION_GROUP_EDIT' => 'Extension group successfully updated.',
+
+ 'UPLOADING_FILES' => 'Uploading files',
+ 'UPLOADING_FILE_TO' => 'Uploading file “%1$s†to post number %2$d…',
+ 'UPLOAD_DENIED_FORUM' => 'You do not have the permission to upload files to forum “%sâ€.',
+ 'UPLOAD_DIR' => 'Upload directory',
+ 'UPLOAD_DIR_EXPLAIN' => 'Storage path for attachments. Please note that if you change this directory while already having uploaded attachments you need to manually copy the files to their new location.',
+ 'UPLOAD_ICON' => 'Upload icon',
+ 'UPLOAD_NOT_DIR' => 'The upload location you specified does not appear to be a directory.',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/ban.php b/phpBB/language/en/acp/ban.php
new file mode 100644
index 0000000000..099834d1e4
--- /dev/null
+++ b/phpBB/language/en/acp/ban.php
@@ -0,0 +1,82 @@
+<?php
+/**
+*
+* acp_ban [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+// Banning
+$lang = array_merge($lang, array(
+ '1_HOUR' => '1 hour',
+ '30_MINS' => '30 minutes',
+ '6_HOURS' => '6 hours',
+
+ 'ACP_BAN_EXPLAIN' => 'Here you can control the banning of users by name, IP or e-mail address. These methods prevent a user reaching any part of the board. You can give a short (maximum 3000 characters) reason for the ban if you wish. This will be displayed in the admin log. The duration of a ban can also be specified. If you want the ban to end on a specific date rather than after a set time period select <span style="text-decoration: underline;">Until -&gt;</span> for the ban length and enter a date in <kbd>YYYY-MM-DD</kbd> format.',
+
+ 'BAN_EXCLUDE' => 'Exclude from banning',
+ 'BAN_LENGTH' => 'Length of ban',
+ 'BAN_REASON' => 'Reason for ban',
+ 'BAN_GIVE_REASON' => 'Reason shown to the banned',
+ 'BAN_UPDATE_SUCCESSFUL' => 'The banlist has been updated successfully.',
+ 'BANNED_UNTIL_DATE' => 'until %s', // Example: "until Mon 13.Jul.2009, 14:44"
+ 'BANNED_UNTIL_DURATION' => '%1$s (until %2$s)', // Example: "7 days (until Tue 14.Jul.2009, 14:44)"
+
+ 'EMAIL_BAN' => 'Ban one or more e-mail addresses',
+ 'EMAIL_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered e-mail address from all current bans.',
+ 'EMAIL_BAN_EXPLAIN' => 'To specify more than one e-mail address enter each on a new line. To match partial addresses use * as the wildcard, e.g. <samp>*@hotmail.com</samp>, <samp>*@*.domain.tld</samp>, etc.',
+ 'EMAIL_NO_BANNED' => 'No banned e-mail addresses',
+ 'EMAIL_UNBAN' => 'Un-ban or un-exclude e-mails',
+ 'EMAIL_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple e-mail addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded e-mail addresses are emphasised.',
+
+ 'IP_BAN' => 'Ban one or more IPs',
+ 'IP_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered IP from all current bans.',
+ 'IP_BAN_EXPLAIN' => 'To specify several different IPs or hostnames enter each on a new line. To specify a range of IP addresses separate the start and end with a hyphen (-), to specify a wildcard use “*â€.',
+ 'IP_HOSTNAME' => 'IP addresses or hostnames',
+ 'IP_NO_BANNED' => 'No banned IP addresses',
+ 'IP_UNBAN' => 'Un-ban or un-exclude IPs',
+ 'IP_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple IP addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded IPs are emphasised.',
+
+ 'LENGTH_BAN_INVALID' => 'The date has to be formatted <kbd>YYYY-MM-DD</kbd>.',
+
+ 'PERMANENT' => 'Permanent',
+
+ 'UNTIL' => 'Until',
+ 'USER_BAN' => 'Ban one or more usernames',
+ 'USER_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered users from all current bans.',
+ 'USER_BAN_EXPLAIN' => 'You can ban multiple users in one go by entering each name on a new line. Use the <span style="text-decoration: underline;">Find a member</span> facility to look up and add one or more users automatically.',
+ 'USER_NO_BANNED' => 'No banned usernames',
+ 'USER_UNBAN' => 'Un-ban or un-exclude usernames',
+ 'USER_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded users are emphasised.',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
new file mode 100644
index 0000000000..8797a1210a
--- /dev/null
+++ b/phpBB/language/en/acp/board.php
@@ -0,0 +1,532 @@
+<?php
+/**
+*
+* acp_board [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+// Board Settings
+$lang = array_merge($lang, array(
+ 'ACP_BOARD_SETTINGS_EXPLAIN' => 'Here you can determine the basic operation of your board, give it a fitting name and description, and among other settings adjust the default values for timezone and language.',
+ 'CUSTOM_DATEFORMAT' => 'Custom…',
+ 'DEFAULT_DATE_FORMAT' => 'Date format',
+ 'DEFAULT_DATE_FORMAT_EXPLAIN' => 'The date format is the same as the PHP <code>date</code> function.',
+ 'DEFAULT_LANGUAGE' => 'Default language',
+ 'DEFAULT_STYLE' => 'Default style',
+ 'DISABLE_BOARD' => 'Disable board',
+ 'DISABLE_BOARD_EXPLAIN' => 'This will make the board unavailable to users. You can also enter a short (255 character) message to display if you wish.',
+ 'OVERRIDE_STYLE' => 'Override user style',
+ 'OVERRIDE_STYLE_EXPLAIN' => 'Replaces user’s style with the default.',
+ 'SITE_DESC' => 'Site description',
+ 'SITE_NAME' => 'Site name',
+ 'SYSTEM_DST' => 'Enable Summer Time/<abbr title="Daylight Saving Time">DST</abbr>',
+ 'SYSTEM_TIMEZONE' => 'System timezone',
+ 'WARNINGS_EXPIRE' => 'Warning duration',
+ 'WARNINGS_EXPIRE_EXPLAIN' => 'Number of days that will elapse before the warning will automatically expire from a user’s record.',
+));
+
+// Board Features
+$lang = array_merge($lang, array(
+ 'ACP_BOARD_FEATURES_EXPLAIN' => 'Here you can enable/disable several board features.',
+
+ 'ALLOW_ATTACHMENTS' => 'Allow attachments',
+ 'ALLOW_BIRTHDAYS' => 'Allow birthdays',
+ 'ALLOW_BIRTHDAYS_EXPLAIN' => 'Allow birthdays to be entered and age being displayed in profiles. Please note the birthday list within the board index is controlled by a separate load setting.',
+ 'ALLOW_BOOKMARKS' => 'Allow bookmarking topics',
+ 'ALLOW_BOOKMARKS_EXPLAIN' => 'User is able to store personal bookmarks.',
+ 'ALLOW_BBCODE' => 'Allow BBCode',
+ 'ALLOW_FORUM_NOTIFY' => 'Allow subscribing to forums',
+ 'ALLOW_NAME_CHANGE' => 'Allow username changes',
+ 'ALLOW_NO_CENSORS' => 'Allow disabling of word censoring',
+ 'ALLOW_NO_CENSORS_EXPLAIN' => 'Users can choose to disable the automatic word censoring of posts and private messages.',
+ 'ALLOW_PM_ATTACHMENTS' => 'Allow attachments in private messages',
+ 'ALLOW_PM_REPORT' => 'Allow users to report private messages',
+ 'ALLOW_PM_REPORT_EXPLAIN' => 'If this setting is enabled, users have the option of reporting a private message they have received or sent to the board’s moderators. These private messages will then be visible in the Moderator Control Panel.',
+ 'ALLOW_QUICK_REPLY' => 'Allow quick reply',
+ 'ALLOW_QUICK_REPLY_EXPLAIN' => 'This setting defines if quick reply is enabled or not. If this setting is enabled, forums need to have their quick reply option enabled too.',
+ 'ALLOW_SIG' => 'Allow signatures',
+ 'ALLOW_SIG_BBCODE' => 'Allow BBCode in user signatures',
+ 'ALLOW_SIG_FLASH' => 'Allow use of <code>[FLASH]</code> BBCode tag in user signatures',
+ 'ALLOW_SIG_IMG' => 'Allow use of <code>[IMG]</code> BBCode tag in user signatures',
+ 'ALLOW_SIG_LINKS' => 'Allow use of links in user signatures',
+ 'ALLOW_SIG_LINKS_EXPLAIN' => 'If disallowed the <code>[URL]</code> BBCode tag and automatic/magic URLs are disabled.',
+ 'ALLOW_SIG_SMILIES' => 'Allow use of smilies in user signatures',
+ 'ALLOW_SMILIES' => 'Allow smilies',
+ 'ALLOW_TOPIC_NOTIFY' => 'Allow subscribing to topics',
+ 'BOARD_PM' => 'Private messaging',
+ 'BOARD_PM_EXPLAIN' => 'Enable or disable private messaging for all users.',
+));
+
+// Avatar Settings
+$lang = array_merge($lang, array(
+ 'ACP_AVATAR_SETTINGS_EXPLAIN' => 'Avatars are generally small, unique images a user can associate with themselves. Depending on the style they are usually displayed below the username when viewing topics. Here you can determine how users can define their avatars. Please note that in order to upload avatars you need to have created the directory you name below and ensure it can be written to by the web server. Please also note that file size limits are only imposed on uploaded avatars, they do not apply to remotely linked images.',
+
+ 'ALLOW_AVATARS' => 'Enable avatars',
+ 'ALLOW_AVATARS_EXPLAIN' => 'Allow general usage of avatars;<br />If you disable avatars in general or avatars of a certain mode, the disabled avatars will no longer be shown on the board, but users will still be able to download their own avatars in the User Control Panel.',
+ 'ALLOW_LOCAL' => 'Enable gallery avatars',
+ 'ALLOW_REMOTE' => 'Enable remote avatars',
+ 'ALLOW_REMOTE_EXPLAIN' => 'Avatars linked to from another website.',
+ 'ALLOW_REMOTE_UPLOAD' => 'Enable remote avatar uploading',
+ 'ALLOW_REMOTE_UPLOAD_EXPLAIN' => 'Allow uploading of avatars from another website.',
+ 'ALLOW_UPLOAD' => 'Enable avatar uploading',
+ 'AVATAR_GALLERY_PATH' => 'Avatar gallery path',
+ 'AVATAR_GALLERY_PATH_EXPLAIN' => 'Path under your phpBB root directory for pre-loaded images, e.g. <samp>images/avatars/gallery</samp>.',
+ 'AVATAR_STORAGE_PATH' => 'Avatar storage path',
+ 'AVATAR_STORAGE_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/avatars/upload</samp>.',
+ 'MAX_AVATAR_SIZE' => 'Maximum avatar dimensions',
+ 'MAX_AVATAR_SIZE_EXPLAIN' => 'Width x Height in pixels.',
+ 'MAX_FILESIZE' => 'Maximum avatar file size',
+ 'MAX_FILESIZE_EXPLAIN' => 'For uploaded avatar files.',
+ 'MIN_AVATAR_SIZE' => 'Minimum avatar dimensions',
+ 'MIN_AVATAR_SIZE_EXPLAIN' => 'Width x Height in pixels.',
+));
+
+// Message Settings
+$lang = array_merge($lang, array(
+ 'ACP_MESSAGE_SETTINGS_EXPLAIN' => 'Here you can set all default settings for private messaging.',
+
+ 'ALLOW_BBCODE_PM' => 'Allow BBCode in private messages',
+ 'ALLOW_FLASH_PM' => 'Allow use of <code>[FLASH]</code> BBCode tag',
+ 'ALLOW_FLASH_PM_EXPLAIN' => 'Note that the ability to use flash in private messages, if enabled here, also depends on the permissions.',
+ 'ALLOW_FORWARD_PM' => 'Allow forwarding of private messages',
+ 'ALLOW_IMG_PM' => 'Allow use of <code>[IMG]</code> BBCode tag',
+ 'ALLOW_MASS_PM' => 'Allow sending of private messages to multiple users and groups',
+ 'ALLOW_MASS_PM_EXPLAIN' => 'Sending to groups can be adjusted per group within the group settings page.',
+ 'ALLOW_PRINT_PM' => 'Allow print view in private messaging',
+ 'ALLOW_QUOTE_PM' => 'Allow quotes in private messages',
+ 'ALLOW_SIG_PM' => 'Allow signature in private messages',
+ 'ALLOW_SMILIES_PM' => 'Allow smilies in private messages',
+ 'BOXES_LIMIT' => 'Maximum private messages per box',
+ 'BOXES_LIMIT_EXPLAIN' => 'Users may receive no more than this many messages in each of their private message boxes. Set this value to 0 to allow unlimited messages.',
+ 'BOXES_MAX' => 'Maximum private message folders',
+ 'BOXES_MAX_EXPLAIN' => 'By default users may create this many personal folders for private messages.',
+ 'ENABLE_PM_ICONS' => 'Enable use of topic icons in private messages',
+ 'FULL_FOLDER_ACTION' => 'Full folder default action',
+ 'FULL_FOLDER_ACTION_EXPLAIN'=> 'Default action to take if a user’s folder is full assuming the user’s folder action, if set at all, is not applicable. The only exception is for the “Sent messages†folder where the default action is always to delete old messages.',
+ 'HOLD_NEW_MESSAGES' => 'Hold new messages',
+ 'PM_EDIT_TIME' => 'Limit editing time',
+ 'PM_EDIT_TIME_EXPLAIN' => 'Limits the time available to edit a private message not already delivered. Setting the value to 0 disables this behaviour.',
+ 'PM_MAX_RECIPIENTS' => 'Maximum number of allowed recipients',
+ 'PM_MAX_RECIPIENTS_EXPLAIN' => 'The maximum number of allowed recipients in a private message. If 0 is entered, an unlimited number is allowed. This setting can be adjusted for every group within the group settings page.',
+));
+
+// Post Settings
+$lang = array_merge($lang, array(
+ 'ACP_POST_SETTINGS_EXPLAIN' => 'Here you can set all default settings for posting.',
+ 'ALLOW_POST_LINKS' => 'Allow links in posts/private messages',
+ 'ALLOW_POST_LINKS_EXPLAIN' => 'If disallowed the <code>[URL]</code> BBCode tag and automatic/magic URLs are disabled.',
+ 'ALLOW_POST_FLASH' => 'Allow use of <code>[FLASH]</code> BBCode tag in posts',
+ 'ALLOW_POST_FLASH_EXPLAIN' => 'If disallowed the <code>[FLASH]</code> BBCode tag is disabled in posts. Otherwise the permission system controls which users can use the <code>[FLASH]</code> BBCode tag.',
+
+ 'BUMP_INTERVAL' => 'Bump interval',
+ 'BUMP_INTERVAL_EXPLAIN' => 'Number of minutes, hours or days between the last post to a topic and the ability to bump this topic.',
+ 'CHAR_LIMIT' => 'Maximum characters per post/message',
+ 'CHAR_LIMIT_EXPLAIN' => 'The number of characters allowed within a post/private message. Set to 0 for unlimited characters.',
+ 'DELETE_TIME' => 'Limit deleting time',
+ 'DELETE_TIME_EXPLAIN' => 'Limits the time available to delete a new post. Setting the value to 0 disables this behaviour.',
+ 'DISPLAY_LAST_EDITED' => 'Display last edited time information',
+ 'DISPLAY_LAST_EDITED_EXPLAIN' => 'Choose if the last edited by information to be displayed on posts.',
+ 'EDIT_TIME' => 'Limit editing time',
+ 'EDIT_TIME_EXPLAIN' => 'Limits the time available to edit a new post. Setting the value to 0 disables this behaviour.',
+ 'FLOOD_INTERVAL' => 'Flood interval',
+ 'FLOOD_INTERVAL_EXPLAIN' => 'Number of seconds a user must wait between posting new messages. To enable users to ignore this alter their permissions.',
+ 'HOT_THRESHOLD' => 'Popular topic threshold',
+ 'HOT_THRESHOLD_EXPLAIN' => 'Posts per topic threshold required for the popular topic annotation. Set to 0 to disable popular topics.',
+ 'MAX_POLL_OPTIONS' => 'Maximum number of poll options',
+ 'MAX_POST_FONT_SIZE' => 'Maximum font size per post',
+ 'MAX_POST_FONT_SIZE_EXPLAIN' => 'Maximum font size allowed in a post. Set to 0 for unlimited font size.',
+ 'MAX_POST_IMG_HEIGHT' => 'Maximum image height per post',
+ 'MAX_POST_IMG_HEIGHT_EXPLAIN' => 'Maximum height of an image/flash file in postings. Set to 0 for unlimited size.',
+ 'MAX_POST_IMG_WIDTH' => 'Maximum image width per post',
+ 'MAX_POST_IMG_WIDTH_EXPLAIN' => 'Maximum width of an image/flash file in postings. Set to 0 for unlimited size.',
+ 'MAX_POST_URLS' => 'Maximum links per post',
+ 'MAX_POST_URLS_EXPLAIN' => 'Maximum number of URLs in a post. Set to 0 for unlimited links.',
+ 'MIN_CHAR_LIMIT' => 'Minimum characters per post/message',
+ 'MIN_CHAR_LIMIT_EXPLAIN' => 'The minimum number of characters the user need to enter within a post/private message.',
+ 'POSTING' => 'Posting',
+ 'POSTS_PER_PAGE' => 'Posts per page',
+ 'QUOTE_DEPTH_LIMIT' => 'Maximum nested quotes per post',
+ 'QUOTE_DEPTH_LIMIT_EXPLAIN' => 'Maximum number of nested quotes in a post. Set to 0 for unlimited depth.',
+ 'SMILIES_LIMIT' => 'Maximum smilies per post',
+ 'SMILIES_LIMIT_EXPLAIN' => 'Maximum number of smilies in a post. Set to 0 for unlimited smilies.',
+ 'SMILIES_PER_PAGE' => 'Smilies per page',
+ 'TOPICS_PER_PAGE' => 'Topics per page',
+));
+
+// Signature Settings
+$lang = array_merge($lang, array(
+ 'ACP_SIGNATURE_SETTINGS_EXPLAIN' => 'Here you can set all default settings for signatures.',
+
+ 'MAX_SIG_FONT_SIZE' => 'Maximum signature font size',
+ 'MAX_SIG_FONT_SIZE_EXPLAIN' => 'Maximum font size allowed in user signatures. Set to 0 for unlimited size.',
+ 'MAX_SIG_IMG_HEIGHT' => 'Maximum signature image height',
+ 'MAX_SIG_IMG_HEIGHT_EXPLAIN' => 'Maximum height of an image/flash file in user signatures. Set to 0 for unlimited height.',
+ 'MAX_SIG_IMG_WIDTH' => 'Maximum signature image width',
+ 'MAX_SIG_IMG_WIDTH_EXPLAIN' => 'Maximum width of an image/flash file in user signatures. Set to 0 for unlimited width.',
+ 'MAX_SIG_LENGTH' => 'Maximum signature length',
+ 'MAX_SIG_LENGTH_EXPLAIN' => 'Maximum number of characters in user signatures.',
+ 'MAX_SIG_SMILIES' => 'Maximum smilies per signature',
+ 'MAX_SIG_SMILIES_EXPLAIN' => 'Maximum smilies allowed in user signatures. Set to 0 for unlimited smilies.',
+ 'MAX_SIG_URLS' => 'Maximum signature links',
+ 'MAX_SIG_URLS_EXPLAIN' => 'Maximum number of links in user signatures. Set to 0 for unlimited links.',
+));
+
+// Registration Settings
+$lang = array_merge($lang, array(
+ 'ACP_REGISTER_SETTINGS_EXPLAIN' => 'Here you are able to define registration and profile related settings.',
+
+ 'ACC_ACTIVATION' => 'Account activation',
+ 'ACC_ACTIVATION_EXPLAIN' => 'This determines whether users have immediate access to the board or if confirmation is required. You can also completely disable new registrations.',
+ 'NEW_MEMBER_POST_LIMIT' => 'New member post limit',
+ 'NEW_MEMBER_POST_LIMIT_EXPLAIN' => 'New members are within the <em>Newly Registered Users</em> group until they reach this number of posts. You can use this group to keep them from using the PM system or to review their posts. <strong>A value of 0 disables this feature.</strong>',
+ 'NEW_MEMBER_GROUP_DEFAULT' => 'Set Newly Registered Users group to default',
+ 'NEW_MEMBER_GROUP_DEFAULT_EXPLAIN' => 'If set to yes and a new member post limit is specified newly registered users will be not only put into the <em>Newly Registered Users</em> group, but this group also being their default one. This may come in handy if you want to assign a group default rank and/or avatar the user then inherits.',
+
+ 'ACC_ADMIN' => 'By Admin',
+ 'ACC_DISABLE' => 'Disable',
+ 'ACC_NONE' => 'None',
+ 'ACC_USER' => 'By User',
+// 'ACC_USER_ADMIN' => 'User + Admin',
+ 'ALLOW_EMAIL_REUSE' => 'Allow e-mail address re-use',
+ 'ALLOW_EMAIL_REUSE_EXPLAIN' => 'Different users can register with the same e-mail address.',
+ 'COPPA' => 'COPPA',
+ 'COPPA_FAX' => 'COPPA fax number',
+ 'COPPA_MAIL' => 'COPPA mailing address',
+ 'COPPA_MAIL_EXPLAIN' => 'This is the mailing address where parents will send COPPA registration forms.',
+ 'ENABLE_COPPA' => 'Enable COPPA',
+ 'ENABLE_COPPA_EXPLAIN' => 'This requires users to declare whether they are 13 or over for compliance with the U.S. COPPA. If this is disabled the COPPA specific groups will no longer be displayed.',
+ 'MAX_CHARS' => 'Max',
+ 'MIN_CHARS' => 'Min',
+ 'NO_AUTH_PLUGIN' => 'No suitable auth plugin found.',
+ 'PASSWORD_LENGTH' => 'Password length',
+ 'PASSWORD_LENGTH_EXPLAIN' => 'Minimum and maximum number of characters in passwords.',
+ 'REG_LIMIT' => 'Registration attempts',
+ 'REG_LIMIT_EXPLAIN' => 'Number of attempts users can make at the confirmation code before being locked out that session.',
+ 'USERNAME_ALPHA_ONLY' => 'Alphanumeric only',
+ 'USERNAME_ALPHA_SPACERS' => 'Alphanumeric and spacers',
+ 'USERNAME_ASCII' => 'ASCII (no international unicode)',
+ 'USERNAME_LETTER_NUM' => 'Any letter and number',
+ 'USERNAME_LETTER_NUM_SPACERS' => 'Any letter, number, and spacer',
+ 'USERNAME_CHARS' => 'Limit username chars',
+ 'USERNAME_CHARS_ANY' => 'Any character',
+ 'USERNAME_CHARS_EXPLAIN' => 'Restrict type of characters that may be used in usernames, spacers are: space, -, +, _, [ and ].',
+ 'USERNAME_LENGTH' => 'Username length',
+ 'USERNAME_LENGTH_EXPLAIN' => 'Minimum and maximum number of characters in usernames.',
+));
+
+// Feeds
+$lang = array_merge($lang, array(
+ 'ACP_FEED_MANAGEMENT' => 'General Syndication Feeds settings',
+ 'ACP_FEED_MANAGEMENT_EXPLAIN' => 'This Module makes available various ATOM Feeds, parsing any BBCode in posts to make them readable in external feeds.',
+
+ 'ACP_FEED_ENABLE' => 'Enable Feeds',
+ 'ACP_FEED_ENABLE_EXPLAIN' => 'Turns on or off ATOM Feeds for the entire board.<br />Disabling this switches off all Feeds, no matter how the options below are set.',
+ 'ACP_FEED_LIMIT' => 'Number of items',
+ 'ACP_FEED_LIMIT_EXPLAIN' => 'The maximum number of feed items to display.',
+
+ 'ACP_FEED_OVERALL_FORUMS' => 'Enable overall forums feed',
+ 'ACP_FEED_OVERALL_FORUMS_EXPLAIN' => 'This feed displays the latest posts from all forums topics.',
+ 'ACP_FEED_OVERALL_FORUMS_LIMIT' => 'Number of items per page to display in the forums feed',
+
+ 'ACP_FEED_OVERALL_TOPIC' => 'Enable overall topics feed',
+ 'ACP_FEED_OVERALL_TOPIC_EXPLAIN' => 'Enables the “All Topics†feed',
+ 'ACP_FEED_OVERALL_TOPIC_LIMIT' => 'Number of items per page to display in the topics feed',
+ 'ACP_FEED_FORUM' => 'Enable Per-Forum Feeds',
+ 'ACP_FEED_FORUM_EXPLAIN' => 'Single forum new posts.',
+ 'ACP_FEED_TOPIC' => 'Enable Per-Topic Feeds',
+ 'ACP_FEED_TOPIC_EXPLAIN' => 'Single topics new posts.',
+ 'ACP_FEED_NEWS' => 'News Feeds',
+ 'ACP_FEED_NEWS_EXPLAIN' => 'Pull the first post from these forums. Select no forums to disable news feed.<br />Select multiple forums by holding <samp>CTRL</samp> and clicking.',
+
+ 'ACP_FEED_GENERAL' => 'General Feed Settings',
+
+ 'ACP_FEED_ITEM_STATISTICS' => 'Item statistics',
+ 'ACP_FEED_ITEM_STATISTICS_EXPLAIN' => 'Display individual statistics underneath feed items<br />(Posted by, date and time, Replies, Views)',
+ 'ACP_FEED_EXCLUDE_ID' => 'Exclude these forums',
+ 'ACP_FEED_EXCLUDE_ID_EXPLAIN' => 'Content from these will be <strong>not included in feeds</strong>. Select no forum to pull data from all forums.<br />Select/Deselect multiple forums by holding <samp>CTRL</samp> and clicking.',
+));
+
+// Visual Confirmation Settings
+$lang = array_merge($lang, array(
+ 'ACP_VC_SETTINGS_EXPLAIN' => 'Here you can select and configure CAPTCHA plugins, which implement various ways to reject registration attempts from so-called spambots.',
+ 'AVAILABLE_CAPTCHAS' => 'Available plugins',
+ 'CAPTCHA_UNAVAILABLE' => 'The CAPTCHA cannot be selected as its requirements are not met.',
+ 'CAPTCHA_GD' => 'GD CAPTCHA',
+ 'CAPTCHA_GD_3D' => 'GD 3D Captcha',
+ 'CAPTCHA_GD_FOREGROUND_NOISE' => 'GD CAPTCHA foreground noise',
+ 'CAPTCHA_GD_EXPLAIN' => 'Use GD to make a more advanced CAPTCHA.',
+ 'CAPTCHA_GD_FOREGROUND_NOISE_EXPLAIN' => 'Use foreground noise to make the GD based CAPTCHA harder.',
+ 'CAPTCHA_GD_X_GRID' => 'GD CAPTCHA background noise x-axis',
+ 'CAPTCHA_GD_X_GRID_EXPLAIN' => 'Use lower settings of this to make the GD based CAPTCHA harder. 0 will disable x-axis background noise.',
+ 'CAPTCHA_GD_Y_GRID' => 'GD CAPTCHA background noise y-axis',
+ 'CAPTCHA_GD_Y_GRID_EXPLAIN' => 'Use lower settings of this to make the GD based CAPTCHA harder. 0 will disable y-axis background noise.',
+ 'CAPTCHA_GD_WAVE' => 'GD CAPTCHA wave distortion',
+ 'CAPTCHA_GD_WAVE_EXPLAIN' => 'This applies a wave distortion to the CAPTCHA.',
+ 'CAPTCHA_GD_3D_NOISE' => 'Add 3D-noise objects',
+ 'CAPTCHA_GD_3D_NOISE_EXPLAIN' => 'This adds additional objects to the CAPTCHA, over the letters.',
+ 'CAPTCHA_GD_FONTS' => 'Use different fonts',
+ 'CAPTCHA_GD_FONTS_EXPLAIN' => 'This setting controls how many different letter shapes are used. You can just use the default shapes or introduce altered letters. Adding lowercase letters is also possible.',
+ 'CAPTCHA_FONT_DEFAULT' => 'Default',
+ 'CAPTCHA_FONT_NEW' => 'New Shapes',
+ 'CAPTCHA_FONT_LOWER' => 'Also use lowercase',
+ 'CAPTCHA_NO_GD' => 'CAPTCHA without GD',
+ 'CAPTCHA_PREVIEW_MSG' => 'Your changes to the visual confirmation setting were not saved. This is just a preview.',
+ 'CAPTCHA_PREVIEW_EXPLAIN' => 'The CAPTCHA as it would look like using the current selection.',
+
+ 'CAPTCHA_SELECT' => 'Installed CAPTCHA plugins',
+ 'CAPTCHA_SELECT_EXPLAIN' => 'The dropdown holds the CAPTCHA plugins recognized by the board. Gray entries are not available right now and might need configuration prior to use.',
+ 'CAPTCHA_CONFIGURE' => 'Configure CAPTCHAs',
+ 'CAPTCHA_CONFIGURE_EXPLAIN' => 'Change the settings for the selected CAPTCHA.',
+ 'CONFIGURE' => 'Configure',
+ 'CAPTCHA_NO_OPTIONS' => 'This CAPTCHA has no configuration options.',
+
+ 'VISUAL_CONFIRM_POST' => 'Enable visual confirmation for guest postings',
+ 'VISUAL_CONFIRM_POST_EXPLAIN' => 'Requires anonymous users to enter a random code matching an image to help prevent mass postings.',
+ 'VISUAL_CONFIRM_REG' => 'Enable visual confirmation for registrations',
+ 'VISUAL_CONFIRM_REG_EXPLAIN' => 'Requires new users to enter a random code matching an image to help prevent mass registrations.',
+ 'VISUAL_CONFIRM_REFRESH' => 'Enable users to refresh the confirmation image',
+ 'VISUAL_CONFIRM_REFRESH_EXPLAIN' => 'Allows users to request new confirmation codes, if they are unable to solve the VC during registration. Some plugins might not support this option.',
+));
+
+// Cookie Settings
+$lang = array_merge($lang, array(
+ 'ACP_COOKIE_SETTINGS_EXPLAIN' => 'These details define the data used to send cookies to your users browsers. In most cases the default values for the cookie settings should be sufficient. If you do need to change any do so with care, incorrect settings can prevent users logging in.',
+
+ 'COOKIE_DOMAIN' => 'Cookie domain',
+ 'COOKIE_NAME' => 'Cookie name',
+ 'COOKIE_PATH' => 'Cookie path',
+ 'COOKIE_SECURE' => 'Cookie secure',
+ 'COOKIE_SECURE_EXPLAIN' => 'If your server is running via SSL set this to enabled else leave as disabled. Having this enabled and not running via SSL will result in server errors during redirects.',
+ 'ONLINE_LENGTH' => 'View online time span',
+ 'ONLINE_LENGTH_EXPLAIN' => 'Number of minutes after which inactive users will not appear in “Who is online†listings. The higher this value the greater is the processing required to generate the listing.',
+ 'SESSION_LENGTH' => 'Session length',
+ 'SESSION_LENGTH_EXPLAIN' => 'Sessions will expire after this time, in seconds.',
+));
+
+// Load Settings
+$lang = array_merge($lang, array(
+ 'ACP_LOAD_SETTINGS_EXPLAIN' => 'Here you can enable and disable certain board functions to reduce the amount of processing required. On most servers there is no need to disable any functions. However on certain systems or in shared hosting environments it may be beneficial to disable capabilities you do not really need. You can also specify limits for system load and active sessions beyond which the board will go offline.',
+
+ 'CUSTOM_PROFILE_FIELDS' => 'Custom profile fields',
+ 'LIMIT_LOAD' => 'Limit system load',
+ 'LIMIT_LOAD_EXPLAIN' => 'If the system’s 1-minute load average exceeds this value the board will automatically go offline. A value of 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers and where this information is accessible. The value here resets itself to 0 if phpBB was unable to get the load limit.',
+ 'LIMIT_SESSIONS' => 'Limit sessions',
+ 'LIMIT_SESSIONS_EXPLAIN' => 'If the number of sessions exceeds this value within a one minute period the board will go offline. Set to 0 for unlimited sessions.',
+ 'LOAD_CPF_MEMBERLIST' => 'Allow styles to display custom profile fields in memberlist',
+ 'LOAD_CPF_VIEWPROFILE' => 'Display custom profile fields in user profiles',
+ 'LOAD_CPF_VIEWTOPIC' => 'Display custom profile fields on topic pages',
+ 'LOAD_USER_ACTIVITY' => 'Show user’s activity',
+ 'LOAD_USER_ACTIVITY_EXPLAIN' => 'Displays active topic/forum in user profiles and user control panel. It is recommended to disable this on boards with more than one million posts.',
+ 'RECOMPILE_STYLES' => 'Recompile stale style components',
+ 'RECOMPILE_STYLES_EXPLAIN' => 'Check for updated style components on filesystem and recompile.',
+ 'YES_ANON_READ_MARKING' => 'Enable topic marking for guests',
+ 'YES_ANON_READ_MARKING_EXPLAIN' => 'Stores read/unread status information for guests. If disabled posts are always read for guests.',
+ 'YES_BIRTHDAYS' => 'Enable birthday listing',
+ 'YES_BIRTHDAYS_EXPLAIN' => 'If disabled the birthday listing is no longer displayed. To let this setting take effect the birthday feature needs to be enabled too.',
+ 'YES_JUMPBOX' => 'Enable display of jumpbox',
+ 'YES_MODERATORS' => 'Enable display of moderators',
+ 'YES_ONLINE' => 'Enable online user listings',
+ 'YES_ONLINE_EXPLAIN' => 'Display online user information on index, forum and topic pages.',
+ 'YES_ONLINE_GUESTS' => 'Enable online guest listings in viewonline',
+ 'YES_ONLINE_GUESTS_EXPLAIN' => 'Allow display of guest user information in viewonline.',
+ 'YES_ONLINE_TRACK' => 'Enable display of user online/offline information',
+ 'YES_ONLINE_TRACK_EXPLAIN' => 'Display online information for user in profiles and topic pages.',
+ 'YES_POST_MARKING' => 'Enable dotted topics',
+ 'YES_POST_MARKING_EXPLAIN' => 'Indicates whether user has posted to a topic.',
+ 'YES_READ_MARKING' => 'Enable server-side topic marking',
+ 'YES_READ_MARKING_EXPLAIN' => 'Stores read/unread status information in the database rather than a cookie.',
+));
+
+// Auth settings
+$lang = array_merge($lang, array(
+ 'ACP_AUTH_SETTINGS_EXPLAIN' => 'phpBB supports authentication plug-ins, or modules. These allow you determine how users are authenticated when they log into the board. By default three plug-ins are provided; DB, LDAP and Apache. Not all methods require additional information so only fill out fields if they are relevant to the selected method.',
+
+ 'AUTH_METHOD' => 'Select an authentication method',
+
+ 'APACHE_SETUP_BEFORE_USE' => 'You have to setup apache authentication before you switch phpBB to this authentication method. Keep in mind that the username you use for apache authentication has to be the same as your phpBB username. Apache authentication can only be used with mod_php (not with a CGI version) and safe_mode disabled.',
+
+ 'LDAP_DN' => 'LDAP base <var>dn</var>',
+ 'LDAP_DN_EXPLAIN' => 'This is the Distinguished Name, locating the user information, e.g. <samp>o=My Company,c=US</samp>.',
+ 'LDAP_EMAIL' => 'LDAP e-mail attribute',
+ 'LDAP_EMAIL_EXPLAIN' => 'Set this to the name of your user entry e-mail attribute (if one exists) in order to automatically set the e-mail address for new users. Leaving this empty results in empty e-mail address for users who log in for the first time.',
+ 'LDAP_INCORRECT_USER_PASSWORD' => 'Binding to LDAP server failed with specified user/password.',
+ 'LDAP_NO_EMAIL' => 'The specified e-mail attribute does not exist.',
+ 'LDAP_NO_IDENTITY' => 'Could not find a login identity for %s.',
+ 'LDAP_PASSWORD' => 'LDAP password',
+ 'LDAP_PASSWORD_EXPLAIN' => 'Leave blank to use anonymous binding. Else fill in the password for the above user. Required for Active Directory Servers. <strong>WARNING:</strong> This password will be stored as plain text in the database visible to everybody who can access your database or who can view this configuration page.',
+ 'LDAP_PORT' => 'LDAP server port',
+ 'LDAP_PORT_EXPLAIN' => 'Optionally you can specify a port which should be used to connect to the LDAP server instead of the default port 389.',
+ 'LDAP_SERVER' => 'LDAP server name',
+ 'LDAP_SERVER_EXPLAIN' => 'If using LDAP this is the hostname or IP address of the LDAP server. Alternatively you can specify an URL like ldap://hostname:port/',
+ 'LDAP_UID' => 'LDAP <var>uid</var>',
+ 'LDAP_UID_EXPLAIN' => 'This is the key under which to search for a given login identity, e.g. <var>uid</var>, <var>sn</var>, etc.',
+ 'LDAP_USER' => 'LDAP user <var>dn</var>',
+ 'LDAP_USER_EXPLAIN' => 'Leave blank to use anonymous binding. If filled in phpBB uses the specified distinguished name on login attempts to find the correct user, e.g. <samp>uid=Username,ou=MyUnit,o=MyCompany,c=US</samp>. Required for Active Directory Servers.',
+ 'LDAP_USER_FILTER' => 'LDAP user filter',
+ 'LDAP_USER_FILTER_EXPLAIN' => 'Optionally you can further limit the searched objects with additional filters. For example <samp>objectClass=posixGroup</samp> would result in the use of <samp>(&amp;(uid=$username)(objectClass=posixGroup))</samp>',
+));
+
+// Server Settings
+$lang = array_merge($lang, array(
+ 'ACP_SERVER_SETTINGS_EXPLAIN' => 'Here you define server and domain dependant settings. Please ensure the data you enter is accurate, errors will result in e-mails containing incorrect information. When entering the domain name remember it does include http:// or other protocol term. Only alter the port number if you know your server uses a different value, port 80 is correct in most cases.',
+
+ 'ENABLE_GZIP' => 'Enable GZip compression',
+ 'ENABLE_GZIP_EXPLAIN' => 'Generated content will be compressed prior to sending it to the user. This can reduce network traffic but will also increase CPU usage on both server and client side. Requires zlib PHP extension to be loaded.',
+ 'FORCE_SERVER_VARS' => 'Force server URL settings',
+ 'FORCE_SERVER_VARS_EXPLAIN' => 'If set to yes the server settings defined here will be used in favour of the automatically determined values.',
+ 'ICONS_PATH' => 'Post icons storage path',
+ 'ICONS_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/icons</samp>.',
+ 'PATH_SETTINGS' => 'Path settings',
+ 'RANKS_PATH' => 'Rank image storage path',
+ 'RANKS_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/ranks</samp>.',
+ 'SCRIPT_PATH' => 'Script path',
+ 'SCRIPT_PATH_EXPLAIN' => 'The path where phpBB is located relative to the domain name, e.g. <samp>/phpBB3</samp>.',
+ 'SERVER_NAME' => 'Domain name',
+ 'SERVER_NAME_EXPLAIN' => 'The domain name this board runs from (for example: <samp>www.example.com</samp>).',
+ 'SERVER_PORT' => 'Server port',
+ 'SERVER_PORT_EXPLAIN' => 'The port your server is running on, usually 80, only change if different.',
+ 'SERVER_PROTOCOL' => 'Server protocol',
+ 'SERVER_PROTOCOL_EXPLAIN' => 'This is used as the server protocol if these settings are forced. If empty or not forced the protocol is determined by the cookie secure settings (<samp>http://</samp> or <samp>https://</samp>).',
+ 'SERVER_URL_SETTINGS' => 'Server URL settings',
+ 'SMILIES_PATH' => 'Smilies storage path',
+ 'SMILIES_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/smilies</samp>.',
+ 'UPLOAD_ICONS_PATH' => 'Extension group icons storage path',
+ 'UPLOAD_ICONS_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/upload_icons</samp>.',
+));
+
+// Security Settings
+$lang = array_merge($lang, array(
+ 'ACP_SECURITY_SETTINGS_EXPLAIN' => 'Here you are able to define session and login related settings.',
+
+ 'ALL' => 'All',
+ 'ALLOW_AUTOLOGIN' => 'Allow persistent logins',
+ 'ALLOW_AUTOLOGIN_EXPLAIN' => 'Determines whether users can autologin when they visit the board.',
+ 'AUTOLOGIN_LENGTH' => 'Persistent login key expiration length (in days)',
+ 'AUTOLOGIN_LENGTH_EXPLAIN' => 'Number of days after which persistent login keys are removed or zero to disable.',
+ 'BROWSER_VALID' => 'Validate browser',
+ 'BROWSER_VALID_EXPLAIN' => 'Enables browser validation for each session improving security.',
+ 'CHECK_DNSBL' => 'Check IP against DNS Blackhole List',
+ 'CHECK_DNSBL_EXPLAIN' => 'If enabled the user’s IP address is checked against the following DNSBL services on registration and posting: <a href="http://spamcop.net">spamcop.net</a> and <a href="http://www.spamhaus.org">www.spamhaus.org</a>. This lookup may take a while, depending on the server’s configuration. If slowdowns are experienced or too many false positives reported it is recommended to disable this check.',
+ 'CLASS_B' => 'A.B',
+ 'CLASS_C' => 'A.B.C',
+ 'EMAIL_CHECK_MX' => 'Check e-mail domain for valid MX record',
+ 'EMAIL_CHECK_MX_EXPLAIN' => 'If enabled, the e-mail domain provided on registration and profile changes is checked for a valid MX record.',
+ 'FORCE_PASS_CHANGE' => 'Force password change',
+ 'FORCE_PASS_CHANGE_EXPLAIN' => 'Require user to change their password after a set number of days. Setting this value to 0 disables this behaviour.',
+ 'FORM_TIME_MAX' => 'Maximum time to submit forms',
+ 'FORM_TIME_MAX_EXPLAIN' => 'The time a user has to submit a form. Use -1 to disable. Note that a form might become invalid if the session expires, regardless of this setting.',
+ 'FORM_SID_GUESTS' => 'Tie forms to guest sessions',
+ 'FORM_SID_GUESTS_EXPLAIN' => 'If enabled, the form token issued to guests will be session-exclusive. This can cause problems with some ISPs.',
+ 'FORWARDED_FOR_VALID' => 'Validated <var>X_FORWARDED_FOR</var> header',
+ 'FORWARDED_FOR_VALID_EXPLAIN' => 'Sessions will only be continued if the sent <var>X_FORWARDED_FOR</var> header equals the one sent with the previous request. Bans will be checked against IPs in <var>X_FORWARDED_FOR</var> too.',
+ 'IP_VALID' => 'Session IP validation',
+ 'IP_VALID_EXPLAIN' => 'Determines how much of the users IP is used to validate a session; <samp>All</samp> compares the complete address, <samp>A.B.C</samp> the first x.x.x, <samp>A.B</samp> the first x.x, <samp>None</samp> disables checking. On IPv6 addresses <samp>A.B.C</samp> compares the first 4 blocks and <samp>A.B</samp> the first 3 blocks.',
+ 'MAX_LOGIN_ATTEMPTS' => 'Maximum number of login attempts',
+ 'MAX_LOGIN_ATTEMPTS_EXPLAIN' => 'After this number of failed logins the user needs to additionally confirm his login visually (visual confirmation).',
+ 'NO_IP_VALIDATION' => 'None',
+ 'NO_REF_VALIDATION' => 'None',
+ 'PASSWORD_TYPE' => 'Password complexity',
+ 'PASSWORD_TYPE_EXPLAIN' => 'Determines how complex a password needs to be when set or altered, subsequent options include the previous ones.',
+ 'PASS_TYPE_ALPHA' => 'Must contain letters and numbers',
+ 'PASS_TYPE_ANY' => 'No requirements',
+ 'PASS_TYPE_CASE' => 'Must be mixed case',
+ 'PASS_TYPE_SYMBOL' => 'Must contain symbols',
+ 'REF_HOST' => 'Only validate host',
+ 'REF_PATH' => 'Also validate path',
+ 'REFERER_VALID' => 'Validate Referer',
+ 'REFERER_VALID_EXPLAIN' => 'If enabled, the referer of POST requests will be checked against the host/script path settings. This may cause issues with boards using several domains and or external logins.',
+ 'TPL_ALLOW_PHP' => 'Allow php in templates',
+ 'TPL_ALLOW_PHP_EXPLAIN' => 'If this option is enabled, <code>PHP</code> and <code>INCLUDEPHP</code> statements will be recognised and parsed in templates.',
+));
+
+// Email Settings
+$lang = array_merge($lang, array(
+ 'ACP_EMAIL_SETTINGS_EXPLAIN' => 'This information is used when the board sends e-mails to your users. Please ensure the e-mail address you specify is valid, any bounced or undeliverable messages will likely be sent to that address. If your host does not provide a native (PHP based) e-mail service you can instead send messages directly using SMTP. This requires the address of an appropriate server (ask your provider if necessary). If the server requires authentication (and only if it does) enter the necessary username, password and authentication method.',
+
+ 'ADMIN_EMAIL' => 'Return e-mail address',
+ 'ADMIN_EMAIL_EXPLAIN' => 'This will be used as the return address on all e-mails, the technical contact e-mail address. It will always be used as the <samp>Return-Path</samp> and <samp>Sender</samp> address in e-mails.',
+ 'BOARD_EMAIL_FORM' => 'Users send e-mail via board',
+ 'BOARD_EMAIL_FORM_EXPLAIN' => 'Instead of showing the users e-mail address users are able to send e-mails via the board.',
+ 'BOARD_HIDE_EMAILS' => 'Hide e-mail addresses',
+ 'BOARD_HIDE_EMAILS_EXPLAIN' => 'This function keeps e-mail addresses completely private.',
+ 'CONTACT_EMAIL' => 'Contact e-mail address',
+ 'CONTACT_EMAIL_EXPLAIN' => 'This address will be used whenever a specific contact point is needed, e.g. spam, error output, etc. It will always be used as the <samp>From</samp> and <samp>Reply-To</samp> address in e-mails.',
+ 'EMAIL_FUNCTION_NAME' => 'E-mail function name',
+ 'EMAIL_FUNCTION_NAME_EXPLAIN' => 'The e-mail function used to send mails through PHP.',
+ 'EMAIL_PACKAGE_SIZE' => 'E-mail package size',
+ 'EMAIL_PACKAGE_SIZE_EXPLAIN' => 'This is the number of maximum e-mails sent out in one package. This setting is applied to the internal message queue; set this value to 0 if you have problems with non-delivered notification e-mails.',
+ 'EMAIL_SIG' => 'E-mail signature',
+ 'EMAIL_SIG_EXPLAIN' => 'This text will be attached to all e-mails the board sends.',
+ 'ENABLE_EMAIL' => 'Enable board-wide e-mails',
+ 'ENABLE_EMAIL_EXPLAIN' => 'If this is set to disabled no e-mails will be sent by the board at all. <em>Note the user and admin account activation settings require this setting to be enabled. If currently using “user†or “admin†activation in the activation settings, disabling this setting will require no activation of new accounts.</em>',
+ 'SMTP_AUTH_METHOD' => 'Authentication method for SMTP',
+ 'SMTP_AUTH_METHOD_EXPLAIN' => 'Only used if a username/password is set, ask your provider if you are unsure which method to use.',
+ 'SMTP_CRAM_MD5' => 'CRAM-MD5',
+ 'SMTP_DIGEST_MD5' => 'DIGEST-MD5',
+ 'SMTP_LOGIN' => 'LOGIN',
+ 'SMTP_PASSWORD' => 'SMTP password',
+ 'SMTP_PASSWORD_EXPLAIN' => 'Only enter a password if your SMTP server requires it.',
+ 'SMTP_PLAIN' => 'PLAIN',
+ 'SMTP_POP_BEFORE_SMTP' => 'POP-BEFORE-SMTP',
+ 'SMTP_PORT' => 'SMTP server port',
+ 'SMTP_PORT_EXPLAIN' => 'Only change this if you know your SMTP server is on a different port.',
+ 'SMTP_SERVER' => 'SMTP server address',
+ 'SMTP_SETTINGS' => 'SMTP settings',
+ 'SMTP_USERNAME' => 'SMTP username',
+ 'SMTP_USERNAME_EXPLAIN' => 'Only enter a username if your SMTP server requires it.',
+ 'USE_SMTP' => 'Use SMTP server for e-mail',
+ 'USE_SMTP_EXPLAIN' => 'Select “Yes†if you want or have to send e-mail via a named server instead of the local mail function.',
+));
+
+// Jabber settings
+$lang = array_merge($lang, array(
+ 'ACP_JABBER_SETTINGS_EXPLAIN' => 'Here you can enable and control the use of Jabber for instant messaging and board notifications. Jabber is an open source protocol and therefore available for use by anyone. Some Jabber servers include gateways or transports which allow you to contact users on other networks. Not all servers offer all transports and changes in protocols can prevent transports from operating. Please be sure to enter already registered account details - phpBB will use the details you enter here as is.',
+
+ 'JAB_ENABLE' => 'Enable Jabber',
+ 'JAB_ENABLE_EXPLAIN' => 'Enables use of Jabber messaging and notifications.',
+ 'JAB_GTALK_NOTE' => 'Please note that GTalk will not work because the <samp>dns_get_record</samp> function could not be found. This function is not available in PHP4, and is not implemented on Windows platforms. It currently does not work on BSD-based systems, including Mac OS.',
+ 'JAB_PACKAGE_SIZE' => 'Jabber package size',
+ 'JAB_PACKAGE_SIZE_EXPLAIN' => 'This is the number of messages sent in one package. If set to 0 the message is sent immediately and will not be queued for later sending.',
+ 'JAB_PASSWORD' => 'Jabber password',
+ 'JAB_PORT' => 'Jabber port',
+ 'JAB_PORT_EXPLAIN' => 'Leave blank unless you know it is not port 5222.',
+ 'JAB_SERVER' => 'Jabber server',
+ 'JAB_SERVER_EXPLAIN' => 'See %sjabber.org%s for a list of servers.',
+ 'JAB_SETTINGS_CHANGED' => 'Jabber settings changed successfully.',
+ 'JAB_USE_SSL' => 'Use SSL to connect',
+ 'JAB_USE_SSL_EXPLAIN' => 'If enabled a secure connection is tried to be established. The Jabber port will be modified to 5223 if port 5222 is specified.',
+ 'JAB_USERNAME' => 'Jabber username or JID',
+ 'JAB_USERNAME_EXPLAIN' => 'Specify a registered username or a valid JID. The username will not be checked for validity. If you only specify a username, then your JID will be the username and the server you specified above. Else, specify a valid JID, for example user@jabber.org.',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/bots.php b/phpBB/language/en/acp/bots.php
new file mode 100644
index 0000000000..3b63f2ea2e
--- /dev/null
+++ b/phpBB/language/en/acp/bots.php
@@ -0,0 +1,73 @@
+<?php
+/**
+*
+* acp_bots [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+// Bot settings
+$lang = array_merge($lang, array(
+ 'BOTS' => 'Manage bots',
+ 'BOTS_EXPLAIN' => '“Botsâ€, “spiders†or “crawlers†are automated agents most commonly used by search engines to update their databases. Since they rarely make proper use of sessions they can distort visitor counts, increase load and sometimes fail to index sites correctly. Here you can define a special type of user to overcome these problems.',
+ 'BOT_ACTIVATE' => 'Activate',
+ 'BOT_ACTIVE' => 'Bot active',
+ 'BOT_ADD' => 'Add bot',
+ 'BOT_ADDED' => 'New bot successfully added.',
+ 'BOT_AGENT' => 'Agent match',
+ 'BOT_AGENT_EXPLAIN' => 'A string matching the bots browser agent, partial matches are allowed.',
+ 'BOT_DEACTIVATE' => 'Deactivate',
+ 'BOT_DELETED' => 'Bot deleted successfully.',
+ 'BOT_EDIT' => 'Edit bots',
+ 'BOT_EDIT_EXPLAIN' => 'Here you can add or edit an existing bot entry. You may define an agent string and/or one or more IP addresses (or range of addresses) to match. Be careful when defining matching agent strings or addresses. You may also specify a style and language that the bot will view the board using. This may allow you to reduce bandwidth use by setting a simple style for bots. Remember to set appropriate permissions for the special Bot usergroup.',
+ 'BOT_LANG' => 'Bot language',
+ 'BOT_LANG_EXPLAIN' => 'The language presented to the bot as it browses.',
+ 'BOT_LAST_VISIT' => 'Last visit',
+ 'BOT_IP' => 'Bot IP address',
+ 'BOT_IP_EXPLAIN' => 'Partial matches are allowed, separate addresses with a comma.',
+ 'BOT_NAME' => 'Bot name',
+ 'BOT_NAME_EXPLAIN' => 'Used only for your own information.',
+ 'BOT_NAME_TAKEN' => 'The name is already in use on your board and can’t be used for the Bot.',
+ 'BOT_NEVER' => 'Never',
+ 'BOT_STYLE' => 'Bot style',
+ 'BOT_STYLE_EXPLAIN' => 'The style used for the board by the bot.',
+ 'BOT_UPDATED' => 'Existing bot updated successfully.',
+
+ 'ERR_BOT_AGENT_MATCHES_UA' => 'The bot agent you supplied is similar to the one you are currently using. Please adjust the agent for this bot.',
+ 'ERR_BOT_NO_IP' => 'The IP addresses you supplied were invalid or the hostname could not be resolved.',
+ 'ERR_BOT_NO_MATCHES' => 'You must supply at least one of an agent or IP for this bot match.',
+
+ 'NO_BOT' => 'Found no bot with the specified ID.',
+ 'NO_BOT_GROUP' => 'Unable to find special bot group.',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
new file mode 100644
index 0000000000..94188f4b1b
--- /dev/null
+++ b/phpBB/language/en/acp/common.php
@@ -0,0 +1,741 @@
+<?php
+/**
+*
+* acp_common [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+// Common
+$lang = array_merge($lang, array(
+ 'ACP_ADMINISTRATORS' => 'Administrators',
+ 'ACP_ADMIN_LOGS' => 'Admin log',
+ 'ACP_ADMIN_ROLES' => 'Admin roles',
+ 'ACP_ATTACHMENTS' => 'Attachments',
+ 'ACP_ATTACHMENT_SETTINGS' => 'Attachment settings',
+ 'ACP_AUTH_SETTINGS' => 'Authentication',
+ 'ACP_AUTOMATION' => 'Automation',
+ 'ACP_AVATAR_SETTINGS' => 'Avatar settings',
+
+ 'ACP_BACKUP' => 'Backup',
+ 'ACP_BAN' => 'Banning',
+ 'ACP_BAN_EMAILS' => 'Ban e-mails',
+ 'ACP_BAN_IPS' => 'Ban IPs',
+ 'ACP_BAN_USERNAMES' => 'Ban usernames',
+ 'ACP_BBCODES' => 'BBCodes',
+ 'ACP_BOARD_CONFIGURATION' => 'Board configuration',
+ 'ACP_BOARD_FEATURES' => 'Board features',
+ 'ACP_BOARD_MANAGEMENT' => 'Board management',
+ 'ACP_BOARD_SETTINGS' => 'Board settings',
+ 'ACP_BOTS' => 'Spiders/Robots',
+
+ 'ACP_CAPTCHA' => 'CAPTCHA',
+
+ 'ACP_CAT_DATABASE' => 'Database',
+ 'ACP_CAT_DOT_MODS' => '.MODs',
+ 'ACP_CAT_FORUMS' => 'Forums',
+ 'ACP_CAT_GENERAL' => 'General',
+ 'ACP_CAT_MAINTENANCE' => 'Maintenance',
+ 'ACP_CAT_PERMISSIONS' => 'Permissions',
+ 'ACP_CAT_POSTING' => 'Posting',
+ 'ACP_CAT_STYLES' => 'Styles',
+ 'ACP_CAT_SYSTEM' => 'System',
+ 'ACP_CAT_USERGROUP' => 'Users and Groups',
+ 'ACP_CAT_USERS' => 'Users',
+ 'ACP_CLIENT_COMMUNICATION' => 'Client communication',
+ 'ACP_COOKIE_SETTINGS' => 'Cookie settings',
+ 'ACP_CRITICAL_LOGS' => 'Error log',
+ 'ACP_CUSTOM_PROFILE_FIELDS' => 'Custom profile fields',
+
+ 'ACP_DATABASE' => 'Database management',
+ 'ACP_DISALLOW' => 'Disallow',
+ 'ACP_DISALLOW_USERNAMES' => 'Disallow usernames',
+
+ 'ACP_EMAIL_SETTINGS' => 'E-mail settings',
+ 'ACP_EXTENSION_GROUPS' => 'Manage extension groups',
+
+ 'ACP_FORUM_BASED_PERMISSIONS' => 'Forum based permissions',
+ 'ACP_FORUM_LOGS' => 'Forum logs',
+ 'ACP_FORUM_MANAGEMENT' => 'Forum management',
+ 'ACP_FORUM_MODERATORS' => 'Forum moderators',
+ 'ACP_FORUM_PERMISSIONS' => 'Forum permissions',
+ 'ACP_FORUM_PERMISSIONS_COPY' => 'Copy forum permissions',
+ 'ACP_FORUM_ROLES' => 'Forum roles',
+
+ 'ACP_GENERAL_CONFIGURATION' => 'General configuration',
+ 'ACP_GENERAL_TASKS' => 'General tasks',
+ 'ACP_GLOBAL_MODERATORS' => 'Global moderators',
+ 'ACP_GLOBAL_PERMISSIONS' => 'Global permissions',
+ 'ACP_GROUPS' => 'Groups',
+ 'ACP_GROUPS_FORUM_PERMISSIONS' => 'Groups’ forum permissions',
+ 'ACP_GROUPS_MANAGE' => 'Manage groups',
+ 'ACP_GROUPS_MANAGEMENT' => 'Group management',
+ 'ACP_GROUPS_PERMISSIONS' => 'Groups’ permissions',
+
+ 'ACP_ICONS' => 'Topic icons',
+ 'ACP_ICONS_SMILIES' => 'Topic icons/smilies',
+ 'ACP_IMAGESETS' => 'Imagesets',
+ 'ACP_INACTIVE_USERS' => 'Inactive users',
+ 'ACP_INDEX' => 'ACP index',
+
+ 'ACP_JABBER_SETTINGS' => 'Jabber settings',
+
+ 'ACP_LANGUAGE' => 'Language management',
+ 'ACP_LANGUAGE_PACKS' => 'Language packs',
+ 'ACP_LOAD_SETTINGS' => 'Load settings',
+ 'ACP_LOGGING' => 'Logging',
+
+ 'ACP_MAIN' => 'ACP index',
+ 'ACP_MANAGE_EXTENSIONS' => 'Manage extensions',
+ 'ACP_MANAGE_FORUMS' => 'Manage forums',
+ 'ACP_MANAGE_RANKS' => 'Manage ranks',
+ 'ACP_MANAGE_REASONS' => 'Manage report/denial reasons',
+ 'ACP_MANAGE_USERS' => 'Manage users',
+ 'ACP_MASS_EMAIL' => 'Mass e-mail',
+ 'ACP_MESSAGES' => 'Messages',
+ 'ACP_MESSAGE_SETTINGS' => 'Private message settings',
+ 'ACP_MODULE_MANAGEMENT' => 'Module management',
+ 'ACP_MOD_LOGS' => 'Moderator log',
+ 'ACP_MOD_ROLES' => 'Moderator roles',
+
+ 'ACP_NO_ITEMS' => 'There are no items yet.',
+
+ 'ACP_ORPHAN_ATTACHMENTS' => 'Orphaned attachments',
+
+ 'ACP_PERMISSIONS' => 'Permissions',
+ 'ACP_PERMISSION_MASKS' => 'Permission masks',
+ 'ACP_PERMISSION_ROLES' => 'Permission roles',
+ 'ACP_PERMISSION_TRACE' => 'Permission trace',
+ 'ACP_PHP_INFO' => 'PHP information',
+ 'ACP_POST_SETTINGS' => 'Post settings',
+ 'ACP_PRUNE_FORUMS' => 'Prune forums',
+ 'ACP_PRUNE_USERS' => 'Prune users',
+ 'ACP_PRUNING' => 'Pruning',
+
+ 'ACP_QUICK_ACCESS' => 'Quick access',
+
+ 'ACP_RANKS' => 'Ranks',
+ 'ACP_REASONS' => 'Report/denial reasons',
+ 'ACP_REGISTER_SETTINGS' => 'User registration settings',
+
+ 'ACP_RESTORE' => 'Restore',
+
+ 'ACP_FEED' => 'Feed management',
+ 'ACP_FEED_SETTINGS' => 'Feed settings',
+
+ 'ACP_SEARCH' => 'Search configuration',
+ 'ACP_SEARCH_INDEX' => 'Search index',
+ 'ACP_SEARCH_SETTINGS' => 'Search settings',
+
+ 'ACP_SECURITY_SETTINGS' => 'Security settings',
+ 'ACP_SEND_STATISTICS' => 'Send statistical information',
+ 'ACP_SERVER_CONFIGURATION' => 'Server configuration',
+ 'ACP_SERVER_SETTINGS' => 'Server settings',
+ 'ACP_SIGNATURE_SETTINGS' => 'Signature settings',
+ 'ACP_SMILIES' => 'Smilies',
+ 'ACP_STYLE_COMPONENTS' => 'Style components',
+ 'ACP_STYLE_MANAGEMENT' => 'Style management',
+ 'ACP_STYLES' => 'Styles',
+
+ 'ACP_SUBMIT_CHANGES' => 'Submit changes',
+
+ 'ACP_TEMPLATES' => 'Templates',
+ 'ACP_THEMES' => 'Themes',
+
+ 'ACP_UPDATE' => 'Updating',
+ 'ACP_USERS_FORUM_PERMISSIONS' => 'Users’ forum permissions',
+ 'ACP_USERS_LOGS' => 'User logs',
+ 'ACP_USERS_PERMISSIONS' => 'Users’ permissions',
+ 'ACP_USER_ATTACH' => 'Attachments',
+ 'ACP_USER_AVATAR' => 'Avatar',
+ 'ACP_USER_FEEDBACK' => 'Feedback',
+ 'ACP_USER_GROUPS' => 'Groups',
+ 'ACP_USER_MANAGEMENT' => 'User management',
+ 'ACP_USER_OVERVIEW' => 'Overview',
+ 'ACP_USER_PERM' => 'Permissions',
+ 'ACP_USER_PREFS' => 'Preferences',
+ 'ACP_USER_PROFILE' => 'Profile',
+ 'ACP_USER_RANK' => 'Rank',
+ 'ACP_USER_ROLES' => 'User roles',
+ 'ACP_USER_SECURITY' => 'User security',
+ 'ACP_USER_SIG' => 'Signature',
+ 'ACP_USER_WARNINGS' => 'Warnings',
+
+ 'ACP_VC_SETTINGS' => 'CAPTCHA module settings',
+ 'ACP_VC_CAPTCHA_DISPLAY' => 'CAPTCHA image preview',
+ 'ACP_VERSION_CHECK' => 'Check for updates',
+ 'ACP_VIEW_ADMIN_PERMISSIONS' => 'View administrative permissions',
+ 'ACP_VIEW_FORUM_MOD_PERMISSIONS' => 'View forum moderation permissions',
+ 'ACP_VIEW_FORUM_PERMISSIONS' => 'View forum-based permissions',
+ 'ACP_VIEW_GLOBAL_MOD_PERMISSIONS' => 'View global moderation permissions',
+ 'ACP_VIEW_USER_PERMISSIONS' => 'View user-based permissions',
+
+ 'ACP_WORDS' => 'Word censoring',
+
+ 'ACTION' => 'Action',
+ 'ACTIONS' => 'Actions',
+ 'ACTIVATE' => 'Activate',
+ 'ADD' => 'Add',
+ 'ADMIN' => 'Administration',
+ 'ADMIN_INDEX' => 'Admin index',
+ 'ADMIN_PANEL' => 'Administration Control Panel',
+
+ 'ADM_LOGOUT' => 'ACP&nbsp;Logout',
+ 'ADM_LOGGED_OUT' => 'Successfully logged out from Administration Control Panel',
+
+ 'BACK' => 'Back',
+
+ 'COLOUR_SWATCH' => 'Web-safe colour swatch',
+ 'CONFIG_UPDATED' => 'Configuration updated successfully.',
+
+ 'DEACTIVATE' => 'Deactivate',
+ 'DIRECTORY_DOES_NOT_EXIST' => 'The entered path “%s†does not exist.',
+ 'DIRECTORY_NOT_DIR' => 'The entered path “%s†is not a directory.',
+ 'DIRECTORY_NOT_WRITABLE' => 'The entered path “%s†is not writable.',
+ 'DISABLE' => 'Disable',
+ 'DOWNLOAD' => 'Download',
+ 'DOWNLOAD_AS' => 'Download as',
+ 'DOWNLOAD_STORE' => 'Download or store file',
+ 'DOWNLOAD_STORE_EXPLAIN' => 'You may directly download the file or save it in your <samp>store/</samp> folder.',
+
+ 'EDIT' => 'Edit',
+ 'ENABLE' => 'Enable',
+ 'EXPORT_DOWNLOAD' => 'Download',
+ 'EXPORT_STORE' => 'Store',
+
+ 'GENERAL_OPTIONS' => 'General options',
+ 'GENERAL_SETTINGS' => 'General settings',
+ 'GLOBAL_MASK' => 'Global permission mask',
+
+ 'INSTALL' => 'Install',
+ 'IP' => 'User IP',
+ 'IP_HOSTNAME' => 'IP addresses or hostnames',
+
+ 'LOGGED_IN_AS' => 'You are logged in as:',
+ 'LOGIN_ADMIN' => 'To administer the board you must be an authenticated user.',
+ 'LOGIN_ADMIN_CONFIRM' => 'To administer the board you must re-authenticate yourself.',
+ 'LOGIN_ADMIN_SUCCESS' => 'You have successfully authenticated and will now be redirected to the Administration Control Panel.',
+ 'LOOK_UP_FORUM' => 'Select a forum',
+ 'LOOK_UP_FORUMS_EXPLAIN'=> 'You are able to select more than one forum.',
+
+ 'MANAGE' => 'Manage',
+ 'MENU_TOGGLE' => 'Hide or display the side menu',
+ 'MORE' => 'More', // Not used at the moment
+ 'MORE_INFORMATION' => 'More information »',
+ 'MOVE_DOWN' => 'Move down',
+ 'MOVE_UP' => 'Move up',
+
+ 'NOTIFY' => 'Notification',
+ 'NO_ADMIN' => 'You are not authorised to administrate this board.',
+ 'NO_EMAILS_DEFINED' => 'No valid e-mail addresses found.',
+ 'NO_PASSWORD_SUPPLIED' => 'You need to enter your password to access the Administration Control Panel.',
+
+ 'OFF' => 'Off',
+ 'ON' => 'On',
+
+ 'PARSE_BBCODE' => 'Parse BBCode',
+ 'PARSE_SMILIES' => 'Parse smilies',
+ 'PARSE_URLS' => 'Parse links',
+ 'PERMISSIONS_TRANSFERRED' => 'Permissions transferred',
+ 'PERMISSIONS_TRANSFERRED_EXPLAIN' => 'You currently have the permissions from %1$s. You are able to browse the board with this user’s permissions, but not access the administration control panel since admin permissions were not transferred. You can <a href="%2$s"><strong>revert to your permission set</strong></a> at any time.',
+ 'PIXEL' => 'px',
+ 'PROCEED_TO_ACP' => '%sProceed to the ACP%s',
+
+ 'REMIND' => 'Remind',
+ 'RESYNC' => 'Resynchronise',
+ 'RETURN_TO' => 'Return to…',
+
+ 'SELECT_ANONYMOUS' => 'Select anonymous user',
+ 'SELECT_OPTION' => 'Select option',
+
+ 'SETTING_TOO_LOW' => 'The provided value for the setting “%1$s†is too low. The minimum acceptable value is %2$d.',
+ 'SETTING_TOO_BIG' => 'The provided value for the setting “%1$s†is too high. The maximum acceptable value is %2$d.',
+ 'SETTING_TOO_LONG' => 'The provided value for the setting “%1$s†is too long. The maximum acceptable length is %2$d.',
+ 'SETTING_TOO_SHORT' => 'The provided value for the setting “%1$s†is too short. The minimum acceptable length is %2$d.',
+
+ 'SHOW_ALL_OPERATIONS' => 'Show all operations',
+
+ 'UCP' => 'User Control Panel',
+ 'USERNAMES_EXPLAIN' => 'Place each username on a separate line.',
+ 'USER_CONTROL_PANEL' => 'User Control Panel',
+
+ 'WARNING' => 'Warning',
+));
+
+// PHP info
+$lang = array_merge($lang, array(
+ 'ACP_PHP_INFO_EXPLAIN' => 'This page lists information on the version of PHP installed on this server. It includes details of loaded modules, available variables and default settings. This information may be useful when diagnosing problems. Please be aware that some hosting companies will limit what information is displayed here for security reasons. You are advised to not give out any details on this page except when asked by <a href="http://www.phpbb.com/about/team/">official team members</a> on the support forums.',
+
+ 'NO_PHPINFO_AVAILABLE' => 'Information about your PHP configuration is unable to be determined. Phpinfo() has been disabled for security reasons.',
+));
+
+// Logs
+$lang = array_merge($lang, array(
+ 'ACP_ADMIN_LOGS_EXPLAIN' => 'This lists all the actions carried out by board administrators. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.',
+ 'ACP_CRITICAL_LOGS_EXPLAIN' => 'This lists the actions carried out by the board itself. This log provides you with information you are able to use for solving specific problems, for example non-delivery of e-mails. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.',
+ 'ACP_MOD_LOGS_EXPLAIN' => 'This lists all actions done on forums, topics and posts as well as actions carried out on users by moderators, including banning. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.',
+ 'ACP_USERS_LOGS_EXPLAIN' => 'This lists all actions carried out by users or on users (reports, warnings and user notes).',
+ 'ALL_ENTRIES' => 'All entries',
+
+ 'DISPLAY_LOG' => 'Display entries from previous',
+
+ 'NO_ENTRIES' => 'No log entries for this period.',
+
+ 'SORT_IP' => 'IP address',
+ 'SORT_DATE' => 'Date',
+ 'SORT_ACTION' => 'Log action',
+));
+
+// Index page
+$lang = array_merge($lang, array(
+ 'ADMIN_INTRO' => 'Thank you for choosing phpBB as your board solution. This screen will give you a quick overview of all the various statistics of your board. The links on the left hand side of this screen allow you to control every aspect of your board experience. Each page will have instructions on how to use the tools.',
+ 'ADMIN_LOG' => 'Logged administrator actions',
+ 'ADMIN_LOG_INDEX_EXPLAIN' => 'This gives an overview of the last five actions carried out by board administrators. A full copy of the log can be viewed from the appropriate menu item or following the link below.',
+ 'AVATAR_DIR_SIZE' => 'Avatar directory size',
+
+ 'BOARD_STARTED' => 'Board started',
+ 'BOARD_VERSION' => 'Board version',
+
+ 'DATABASE_SERVER_INFO' => 'Database server',
+ 'DATABASE_SIZE' => 'Database size',
+
+ 'FILES_PER_DAY' => 'Attachments per day',
+ 'FORUM_STATS' => 'Board statistics',
+
+ 'GZIP_COMPRESSION' => 'GZip compression',
+
+ 'NOT_AVAILABLE' => 'Not available',
+ 'NUMBER_FILES' => 'Number of attachments',
+ 'NUMBER_POSTS' => 'Number of posts',
+ 'NUMBER_TOPICS' => 'Number of topics',
+ 'NUMBER_USERS' => 'Number of users',
+ 'NUMBER_ORPHAN' => 'Orphan attachments',
+
+ 'POSTS_PER_DAY' => 'Posts per day',
+
+ 'PURGE_CACHE' => 'Purge the cache',
+ 'PURGE_CACHE_CONFIRM' => 'Are you sure you wish to purge the cache?',
+ 'PURGE_CACHE_EXPLAIN' => 'Purge all cache related items, this includes any cached template files or queries.',
+
+ 'PURGE_SESSIONS' => 'Purge all sessions',
+ 'PURGE_SESSIONS_CONFIRM' => 'Are you sure you wish to purge all sessions? This will log out all users.',
+ 'PURGE_SESSIONS_EXPLAIN' => 'Purge all sessions. This will log out all users by truncating the session table.',
+
+ 'RESET_DATE' => 'Reset board’s start date',
+ 'RESET_DATE_CONFIRM' => 'Are you sure you wish to reset the board’s start date?',
+ 'RESET_ONLINE' => 'Reset most users ever online',
+ 'RESET_ONLINE_CONFIRM' => 'Are you sure you wish to reset the most users ever online counter?',
+ 'RESYNC_POSTCOUNTS' => 'Resynchronise post counts',
+ 'RESYNC_POSTCOUNTS_EXPLAIN' => 'Only existing posts will be taken into consideration. Pruned posts will not be counted.',
+ 'RESYNC_POSTCOUNTS_CONFIRM' => 'Are you sure you wish to resynchronise post counts?',
+ 'RESYNC_POST_MARKING' => 'Resynchronise dotted topics',
+ 'RESYNC_POST_MARKING_CONFIRM' => 'Are you sure you wish to resynchronise dotted topics?',
+ 'RESYNC_POST_MARKING_EXPLAIN' => 'First unmarks all topics and then correctly marks topics that have seen any activity during the past six months.',
+ 'RESYNC_STATS' => 'Resynchronise statistics',
+ 'RESYNC_STATS_CONFIRM' => 'Are you sure you wish to resynchronise statistics?',
+ 'RESYNC_STATS_EXPLAIN' => 'Recalculates the total number of posts, topics, users and files.',
+ 'RUN' => 'Run now',
+
+ 'STATISTIC' => 'Statistic',
+ 'STATISTIC_RESYNC_OPTIONS' => 'Resynchronise or reset statistics',
+
+ 'TOPICS_PER_DAY' => 'Topics per day',
+
+ 'UPLOAD_DIR_SIZE' => 'Size of posted attachments',
+ 'USERS_PER_DAY' => 'Users per day',
+
+ 'VALUE' => 'Value',
+ 'VERSIONCHECK_FAIL' => 'Failed to obtain latest version information.',
+ 'VERSIONCHECK_FORCE_UPDATE' => 'Re-Check version',
+ 'VIEW_ADMIN_LOG' => 'View administrator log',
+ 'VIEW_INACTIVE_USERS' => 'View inactive users',
+
+ 'WELCOME_PHPBB' => 'Welcome to phpBB',
+ 'WRITABLE_CONFIG' => 'Your config file (config.php) is currently world-writable. We strongly encourage you to change the permissions to 640 or at least to 644 (for example: <a href="http://en.wikipedia.org/wiki/Chmod" rel="external">chmod</a> 640 config.php).',
+));
+
+// Inactive Users
+$lang = array_merge($lang, array(
+ 'INACTIVE_DATE' => 'Inactive date',
+ 'INACTIVE_REASON' => 'Reason',
+ 'INACTIVE_REASON_MANUAL' => 'Account deactivated by administrator',
+ 'INACTIVE_REASON_PROFILE' => 'Profile details changed',
+ 'INACTIVE_REASON_REGISTER' => 'Newly registered account',
+ 'INACTIVE_REASON_REMIND' => 'Forced user account reactivation',
+ 'INACTIVE_REASON_UNKNOWN' => 'Unknown',
+ 'INACTIVE_USERS' => 'Inactive users',
+ 'INACTIVE_USERS_EXPLAIN' => 'This is a list of users who have registered but whose accounts are inactive. You can activate, delete or remind (by sending an e-mail) these users if you wish.',
+ 'INACTIVE_USERS_EXPLAIN_INDEX' => 'This is a list of the last 10 registered users who have inactive accounts. A full list is available from the appropriate menu item or by following the link below from where you can activate, delete or remind (by sending an e-mail) these users if you wish.',
+
+ 'NO_INACTIVE_USERS' => 'No inactive users',
+
+ 'SORT_INACTIVE' => 'Inactive date',
+ 'SORT_LAST_VISIT' => 'Last visit',
+ 'SORT_REASON' => 'Reason',
+ 'SORT_REG_DATE' => 'Registration date',
+ 'SORT_LAST_REMINDER'=> 'Last reminded',
+ 'SORT_REMINDER' => 'Reminder sent',
+
+ 'USER_IS_INACTIVE' => 'User is inactive',
+));
+
+// Send statistics page
+$lang = array_merge($lang, array(
+ 'EXPLAIN_SEND_STATISTICS' => 'Please send information about your server and board configurations to phpBB for statistical analysis. All information that could identify you or your website has been removed - the data is entirely <strong>anonymous</strong>. We base decisions about future phpBB versions on this information. The statistics are made available publically. We also share this data with the PHP project, the programming language phpBB is made with.',
+ 'EXPLAIN_SHOW_STATISTICS' => 'Using the button below you can preview all variables that will be transmitted.',
+ 'DONT_SEND_STATISTICS' => 'Return to the ACP if you do not wish to send statistical information to phpBB.',
+ 'GO_ACP_MAIN' => 'Go to the ACP start page',
+ 'HIDE_STATISTICS' => 'Hide details',
+ 'SEND_STATISTICS' => 'Send statistical information',
+ 'SHOW_STATISTICS' => 'Show details',
+ 'THANKS_SEND_STATISTICS' => 'Thank you for submitting your information.',
+));
+
+// Log Entries
+$lang = array_merge($lang, array(
+ 'LOG_ACL_ADD_USER_GLOBAL_U_' => '<strong>Added or edited users’ user permissions</strong><br />» %s',
+ 'LOG_ACL_ADD_GROUP_GLOBAL_U_' => '<strong>Added or edited groups’ user permissions</strong><br />» %s',
+ 'LOG_ACL_ADD_USER_GLOBAL_M_' => '<strong>Added or edited users’ global moderator permissions</strong><br />» %s',
+ 'LOG_ACL_ADD_GROUP_GLOBAL_M_' => '<strong>Added or edited groups’ global moderator permissions</strong><br />» %s',
+ 'LOG_ACL_ADD_USER_GLOBAL_A_' => '<strong>Added or edited users’ administrator permissions</strong><br />» %s',
+ 'LOG_ACL_ADD_GROUP_GLOBAL_A_' => '<strong>Added or edited groups’ administrator permissions</strong><br />» %s',
+
+ 'LOG_ACL_ADD_ADMIN_GLOBAL_A_' => '<strong>Added or edited Administrators</strong><br />» %s',
+ 'LOG_ACL_ADD_MOD_GLOBAL_M_' => '<strong>Added or edited Global Moderators</strong><br />» %s',
+
+ 'LOG_ACL_ADD_USER_LOCAL_F_' => '<strong>Added or edited users’ forum access</strong> from %1$s<br />» %2$s',
+ 'LOG_ACL_ADD_USER_LOCAL_M_' => '<strong>Added or edited users’ forum moderator access</strong> from %1$s<br />» %2$s',
+ 'LOG_ACL_ADD_GROUP_LOCAL_F_' => '<strong>Added or edited groups’ forum access</strong> from %1$s<br />» %2$s',
+ 'LOG_ACL_ADD_GROUP_LOCAL_M_' => '<strong>Added or edited groups’ forum moderator access</strong> from %1$s<br />» %2$s',
+
+ 'LOG_ACL_ADD_MOD_LOCAL_M_' => '<strong>Added or edited Moderators</strong> from %1$s<br />» %2$s',
+ 'LOG_ACL_ADD_FORUM_LOCAL_F_' => '<strong>Added or edited forum permissions</strong> from %1$s<br />» %2$s',
+
+ 'LOG_ACL_DEL_ADMIN_GLOBAL_A_' => '<strong>Removed Administrators</strong><br />» %s',
+ 'LOG_ACL_DEL_MOD_GLOBAL_M_' => '<strong>Removed Global Moderators</strong><br />» %s',
+ 'LOG_ACL_DEL_MOD_LOCAL_M_' => '<strong>Removed Moderators</strong> from %1$s<br />» %2$s',
+ 'LOG_ACL_DEL_FORUM_LOCAL_F_' => '<strong>Removed User/Group forum permissions</strong> from %1$s<br />» %2$s',
+
+ 'LOG_ACL_TRANSFER_PERMISSIONS' => '<strong>Permissions transferred from</strong><br />» %s',
+ 'LOG_ACL_RESTORE_PERMISSIONS' => '<strong>Own permissions restored after using permissions from</strong><br />» %s',
+
+ 'LOG_ADMIN_AUTH_FAIL' => '<strong>Failed administration login attempt</strong>',
+ 'LOG_ADMIN_AUTH_SUCCESS' => '<strong>Successful administration login</strong>',
+
+ 'LOG_ATTACHMENTS_DELETED' => '<strong>Removed user attachments</strong><br />» %s',
+
+ 'LOG_ATTACH_EXT_ADD' => '<strong>Added or edited attachment extension</strong><br />» %s',
+ 'LOG_ATTACH_EXT_DEL' => '<strong>Removed attachment extension</strong><br />» %s',
+ 'LOG_ATTACH_EXT_UPDATE' => '<strong>Updated attachment extension</strong><br />» %s',
+ 'LOG_ATTACH_EXTGROUP_ADD' => '<strong>Added extension group</strong><br />» %s',
+ 'LOG_ATTACH_EXTGROUP_EDIT' => '<strong>Edited extension group</strong><br />» %s',
+ 'LOG_ATTACH_EXTGROUP_DEL' => '<strong>Removed extension group</strong><br />» %s',
+ 'LOG_ATTACH_FILEUPLOAD' => '<strong>Orphan File uploaded to Post</strong><br />» ID %1$d - %2$s',
+ 'LOG_ATTACH_ORPHAN_DEL' => '<strong>Orphan Files deleted</strong><br />» %s',
+
+ 'LOG_BAN_EXCLUDE_USER' => '<strong>Excluded user from ban</strong> for reason “<em>%1$s</em>â€<br />» %2$s',
+ 'LOG_BAN_EXCLUDE_IP' => '<strong>Excluded IP from ban</strong> for reason “<em>%1$s</em>â€<br />» %2$s',
+ 'LOG_BAN_EXCLUDE_EMAIL' => '<strong>Excluded e-mail from ban</strong> for reason “<em>%1$s</em>â€<br />» %2$s',
+ 'LOG_BAN_USER' => '<strong>Banned user</strong> for reason “<em>%1$s</em>â€<br />» %2$s',
+ 'LOG_BAN_IP' => '<strong>Banned IP</strong> for reason “<em>%1$s</em>â€<br />» %2$s',
+ 'LOG_BAN_EMAIL' => '<strong>Banned e-mail</strong> for reason “<em>%1$s</em>â€<br />» %2$s',
+ 'LOG_UNBAN_USER' => '<strong>Unbanned user</strong><br />» %s',
+ 'LOG_UNBAN_IP' => '<strong>Unbanned IP</strong><br />» %s',
+ 'LOG_UNBAN_EMAIL' => '<strong>Unbanned e-mail</strong><br />» %s',
+
+ 'LOG_BBCODE_ADD' => '<strong>Added new BBCode</strong><br />» %s',
+ 'LOG_BBCODE_EDIT' => '<strong>Edited BBCode</strong><br />» %s',
+ 'LOG_BBCODE_DELETE' => '<strong>Deleted BBCode</strong><br />» %s',
+
+ 'LOG_BOT_ADDED' => '<strong>New bot added</strong><br />» %s',
+ 'LOG_BOT_DELETE' => '<strong>Deleted bot</strong><br />» %s',
+ 'LOG_BOT_UPDATED' => '<strong>Existing bot updated</strong><br />» %s',
+
+ 'LOG_CLEAR_ADMIN' => '<strong>Cleared admin log</strong>',
+ 'LOG_CLEAR_CRITICAL' => '<strong>Cleared error log</strong>',
+ 'LOG_CLEAR_MOD' => '<strong>Cleared moderator log</strong>',
+ 'LOG_CLEAR_USER' => '<strong>Cleared user log</strong><br />» %s',
+ 'LOG_CLEAR_USERS' => '<strong>Cleared user logs</strong>',
+
+ 'LOG_CONFIG_ATTACH' => '<strong>Altered attachment settings</strong>',
+ 'LOG_CONFIG_AUTH' => '<strong>Altered authentication settings</strong>',
+ 'LOG_CONFIG_AVATAR' => '<strong>Altered avatar settings</strong>',
+ 'LOG_CONFIG_COOKIE' => '<strong>Altered cookie settings</strong>',
+ 'LOG_CONFIG_EMAIL' => '<strong>Altered e-mail settings</strong>',
+ 'LOG_CONFIG_FEATURES' => '<strong>Altered board features</strong>',
+ 'LOG_CONFIG_LOAD' => '<strong>Altered load settings</strong>',
+ 'LOG_CONFIG_MESSAGE' => '<strong>Altered private message settings</strong>',
+ 'LOG_CONFIG_POST' => '<strong>Altered post settings</strong>',
+ 'LOG_CONFIG_REGISTRATION' => '<strong>Altered user registration settings</strong>',
+ 'LOG_CONFIG_FEED' => '<strong>Altered syndication feeds settings</strong>',
+ 'LOG_CONFIG_SEARCH' => '<strong>Altered search settings</strong>',
+ 'LOG_CONFIG_SECURITY' => '<strong>Altered security settings</strong>',
+ 'LOG_CONFIG_SERVER' => '<strong>Altered server settings</strong>',
+ 'LOG_CONFIG_SETTINGS' => '<strong>Altered board settings</strong>',
+ 'LOG_CONFIG_SIGNATURE' => '<strong>Altered signature settings</strong>',
+ 'LOG_CONFIG_VISUAL' => '<strong>Altered antibot settings</strong>',
+
+ 'LOG_APPROVE_TOPIC' => '<strong>Approved topic</strong><br />» %s',
+ 'LOG_BUMP_TOPIC' => '<strong>User bumped topic</strong><br />» %s',
+ 'LOG_DELETE_POST' => '<strong>Deleted post “%1$s†written by</strong><br />» %2$s',
+ 'LOG_DELETE_SHADOW_TOPIC' => '<strong>Deleted shadow topic</strong><br />» %s',
+ 'LOG_DELETE_TOPIC' => '<strong>Deleted topic “%1$s†written by</strong><br />» %2$s',
+ 'LOG_FORK' => '<strong>Copied topic</strong><br />» from %s',
+ 'LOG_LOCK' => '<strong>Locked topic</strong><br />» %s',
+ 'LOG_LOCK_POST' => '<strong>Locked post</strong><br />» %s',
+ 'LOG_MERGE' => '<strong>Merged posts</strong> into topic<br />» %s',
+ 'LOG_MOVE' => '<strong>Moved topic</strong><br />» from %1$s to %2$s',
+ 'LOG_PM_REPORT_CLOSED' => '<strong>Closed PM report</strong><br />» %s',
+ 'LOG_PM_REPORT_DELETED' => '<strong>Deleted PM report</strong><br />» %s',
+ 'LOG_POST_APPROVED' => '<strong>Approved post</strong><br />» %s',
+ 'LOG_POST_DISAPPROVED' => '<strong>Disapproved post “%1$s†with the following reason</strong><br />» %2$s',
+ 'LOG_POST_EDITED' => '<strong>Edited post “%1$s†written by</strong><br />» %2$s',
+ 'LOG_REPORT_CLOSED' => '<strong>Closed report</strong><br />» %s',
+ 'LOG_REPORT_DELETED' => '<strong>Deleted report</strong><br />» %s',
+ 'LOG_SPLIT_DESTINATION' => '<strong>Moved split posts</strong><br />» to %s',
+ 'LOG_SPLIT_SOURCE' => '<strong>Split posts</strong><br />» from %s',
+
+ 'LOG_TOPIC_APPROVED' => '<strong>Approved topic</strong><br />» %s',
+ 'LOG_TOPIC_DISAPPROVED' => '<strong>Disapproved topic “%1$s†with the following reason</strong><br />%2$s',
+ 'LOG_TOPIC_RESYNC' => '<strong>Resynchronised topic counters</strong><br />» %s',
+ 'LOG_TOPIC_TYPE_CHANGED' => '<strong>Changed topic type</strong><br />» %s',
+ 'LOG_UNLOCK' => '<strong>Unlocked topic</strong><br />» %s',
+ 'LOG_UNLOCK_POST' => '<strong>Unlocked post</strong><br />» %s',
+
+ 'LOG_DISALLOW_ADD' => '<strong>Added disallowed username</strong><br />» %s',
+ 'LOG_DISALLOW_DELETE' => '<strong>Deleted disallowed username</strong>',
+
+ 'LOG_DB_BACKUP' => '<strong>Database backup</strong>',
+ 'LOG_DB_DELETE' => '<strong>Deleted database backup</strong>',
+ 'LOG_DB_RESTORE' => '<strong>Restored database backup</strong>',
+
+ 'LOG_DOWNLOAD_EXCLUDE_IP' => '<strong>Excluded IP/hostname from download list</strong><br />» %s',
+ 'LOG_DOWNLOAD_IP' => '<strong>Added IP/hostname to download list</strong><br />» %s',
+ 'LOG_DOWNLOAD_REMOVE_IP' => '<strong>Removed IP/hostname from download list</strong><br />» %s',
+
+ 'LOG_ERROR_JABBER' => '<strong>Jabber error</strong><br />» %s',
+ 'LOG_ERROR_EMAIL' => '<strong>E-mail error</strong><br />» %s',
+
+ 'LOG_FORUM_ADD' => '<strong>Created new forum</strong><br />» %s',
+ 'LOG_FORUM_COPIED_PERMISSIONS' => '<strong>Copied forum permissions</strong> from %1$s<br />» %2$s',
+ 'LOG_FORUM_DEL_FORUM' => '<strong>Deleted forum</strong><br />» %s',
+ 'LOG_FORUM_DEL_FORUMS' => '<strong>Deleted forum and its subforums</strong><br />» %s',
+ 'LOG_FORUM_DEL_MOVE_FORUMS' => '<strong>Deleted forum and moved subforums</strong> to %1$s<br />» %2$s',
+ 'LOG_FORUM_DEL_MOVE_POSTS' => '<strong>Deleted forum and moved posts </strong> to %1$s<br />» %2$s',
+ 'LOG_FORUM_DEL_MOVE_POSTS_FORUMS' => '<strong>Deleted forum and its subforums, moved posts</strong> to %1$s<br />» %2$s',
+ 'LOG_FORUM_DEL_MOVE_POSTS_MOVE_FORUMS' => '<strong>Deleted forum, moved posts</strong> to %1$s <strong>and subforums</strong> to %2$s<br />» %3$s',
+ 'LOG_FORUM_DEL_POSTS' => '<strong>Deleted forum and its posts</strong><br />» %s',
+ 'LOG_FORUM_DEL_POSTS_FORUMS' => '<strong>Deleted forum, its posts and subforums</strong><br />» %s',
+ 'LOG_FORUM_DEL_POSTS_MOVE_FORUMS' => '<strong>Deleted forum and its posts, moved subforums</strong> to %1$s<br />» %2$s',
+ 'LOG_FORUM_EDIT' => '<strong>Edited forum details</strong><br />» %s',
+ 'LOG_FORUM_MOVE_DOWN' => '<strong>Moved forum</strong> %1$s <strong>below</strong> %2$s',
+ 'LOG_FORUM_MOVE_UP' => '<strong>Moved forum</strong> %1$s <strong>above</strong> %2$s',
+ 'LOG_FORUM_SYNC' => '<strong>Re-synchronised forum</strong><br />» %s',
+
+ 'LOG_GENERAL_ERROR' => '<strong>A general error occured</strong>: %1$s <br />» %2$s',
+
+ 'LOG_GROUP_CREATED' => '<strong>New usergroup created</strong><br />» %s',
+ 'LOG_GROUP_DEFAULTS' => '<strong>Group “%1$s†made default for members</strong><br />» %2$s',
+ 'LOG_GROUP_DELETE' => '<strong>Usergroup deleted</strong><br />» %s',
+ 'LOG_GROUP_DEMOTED' => '<strong>Leaders demoted in usergroup</strong> %1$s<br />» %2$s',
+ 'LOG_GROUP_PROMOTED' => '<strong>Members promoted to leader in usergroup</strong> %1$s<br />» %2$s',
+ 'LOG_GROUP_REMOVE' => '<strong>Members removed from usergroup</strong> %1$s<br />» %2$s',
+ 'LOG_GROUP_UPDATED' => '<strong>Usergroup details updated</strong><br />» %s',
+ 'LOG_MODS_ADDED' => '<strong>Added new leaders to usergroup</strong> %1$s<br />» %2$s',
+ 'LOG_USERS_ADDED' => '<strong>Added new members to usergroup</strong> %1$s<br />» %2$s',
+ 'LOG_USERS_APPROVED' => '<strong>Users approved in usergroup</strong> %1$s<br />» %2$s',
+ 'LOG_USERS_PENDING' => '<strong>Users requested to join group “%1$s†and need to be approved</strong><br />» %2$s',
+
+ 'LOG_IMAGE_GENERATION_ERROR' => '<strong>Error while creating image</strong><br />» Error in %1$s on line %2$s: %3$s',
+
+ 'LOG_IMAGESET_ADD_DB' => '<strong>Added new imageset to database</strong><br />» %s',
+ 'LOG_IMAGESET_ADD_FS' => '<strong>Add new imageset on filesystem</strong><br />» %s',
+ 'LOG_IMAGESET_DELETE' => '<strong>Deleted imageset</strong><br />» %s',
+ 'LOG_IMAGESET_EDIT_DETAILS' => '<strong>Edited imageset details</strong><br />» %s',
+ 'LOG_IMAGESET_EDIT' => '<strong>Edited imageset</strong><br />» %s',
+ 'LOG_IMAGESET_EXPORT' => '<strong>Exported imageset</strong><br />» %s',
+ 'LOG_IMAGESET_LANG_MISSING' => '<strong>Imageset misses “%2$s†localisation</strong><br />» %1$s',
+ 'LOG_IMAGESET_LANG_REFRESHED' => '<strong>Refreshed “%2$s†localisation of imageset</strong><br />» %1$s',
+ 'LOG_IMAGESET_REFRESHED' => '<strong>Refreshed imageset</strong><br />» %s',
+
+ 'LOG_INACTIVE_ACTIVATE' => '<strong>Activated inactive users</strong><br />» %s',
+ 'LOG_INACTIVE_DELETE' => '<strong>Deleted inactive users</strong><br />» %s',
+ 'LOG_INACTIVE_REMIND' => '<strong>Sent reminder e-mails to inactive users</strong><br />» %s',
+ 'LOG_INSTALL_CONVERTED' => '<strong>Converted from %1$s to phpBB %2$s</strong>',
+ 'LOG_INSTALL_INSTALLED' => '<strong>Installed phpBB %s</strong>',
+
+ 'LOG_IP_BROWSER_FORWARDED_CHECK' => '<strong>Session IP/browser/X_FORWARDED_FOR check failed</strong><br />»User IP “<em>%1$s</em>†checked against session IP “<em>%2$s</em>â€, user browser string “<em>%3$s</em>†checked against session browser string “<em>%4$s</em>†and user X_FORWARDED_FOR string “<em>%5$s</em>†checked against session X_FORWARDED_FOR string “<em>%6$s</em>â€.',
+
+ 'LOG_JAB_CHANGED' => '<strong>Jabber account changed</strong>',
+ 'LOG_JAB_PASSCHG' => '<strong>Jabber password changed</strong>',
+ 'LOG_JAB_REGISTER' => '<strong>Jabber account registered</strong>',
+ 'LOG_JAB_SETTINGS_CHANGED' => '<strong>Jabber settings changed</strong>',
+
+ 'LOG_LANGUAGE_PACK_DELETED' => '<strong>Deleted language pack</strong><br />» %s',
+ 'LOG_LANGUAGE_PACK_INSTALLED' => '<strong>Installed language pack</strong><br />» %s',
+ 'LOG_LANGUAGE_PACK_UPDATED' => '<strong>Updated language pack details</strong><br />» %s',
+ 'LOG_LANGUAGE_FILE_REPLACED' => '<strong>Replaced language file</strong><br />» %s',
+ 'LOG_LANGUAGE_FILE_SUBMITTED' => '<strong>Submitted language file and placed in store folder</strong><br />» %s',
+
+ 'LOG_MASS_EMAIL' => '<strong>Sent mass e-mail</strong><br />» %s',
+
+ 'LOG_MCP_CHANGE_POSTER' => '<strong>Changed poster in topic “%1$sâ€</strong><br />» from %2$s to %3$s',
+
+ 'LOG_MODULE_DISABLE' => '<strong>Module disabled</strong><br />» %s',
+ 'LOG_MODULE_ENABLE' => '<strong>Module enabled</strong><br />» %s',
+ 'LOG_MODULE_MOVE_DOWN' => '<strong>Module moved down</strong><br />» %1$s below %2$s',
+ 'LOG_MODULE_MOVE_UP' => '<strong>Module moved up</strong><br />» %1$s above %2$s',
+ 'LOG_MODULE_REMOVED' => '<strong>Module removed</strong><br />» %s',
+ 'LOG_MODULE_ADD' => '<strong>Module added</strong><br />» %s',
+ 'LOG_MODULE_EDIT' => '<strong>Module edited</strong><br />» %s',
+
+ 'LOG_A_ROLE_ADD' => '<strong>Admin role added</strong><br />» %s',
+ 'LOG_A_ROLE_EDIT' => '<strong>Admin role edited</strong><br />» %s',
+ 'LOG_A_ROLE_REMOVED' => '<strong>Admin role removed</strong><br />» %s',
+ 'LOG_F_ROLE_ADD' => '<strong>Forum role added</strong><br />» %s',
+ 'LOG_F_ROLE_EDIT' => '<strong>Forum role edited</strong><br />» %s',
+ 'LOG_F_ROLE_REMOVED' => '<strong>Forum role removed</strong><br />» %s',
+ 'LOG_M_ROLE_ADD' => '<strong>Moderator role added</strong><br />» %s',
+ 'LOG_M_ROLE_EDIT' => '<strong>Moderator role edited</strong><br />» %s',
+ 'LOG_M_ROLE_REMOVED' => '<strong>Moderator role removed</strong><br />» %s',
+ 'LOG_U_ROLE_ADD' => '<strong>User role added</strong><br />» %s',
+ 'LOG_U_ROLE_EDIT' => '<strong>User role edited</strong><br />» %s',
+ 'LOG_U_ROLE_REMOVED' => '<strong>User role removed</strong><br />» %s',
+
+ 'LOG_PROFILE_FIELD_ACTIVATE' => '<strong>Profile field activated</strong><br />» %s',
+ 'LOG_PROFILE_FIELD_CREATE' => '<strong>Profile field added</strong><br />» %s',
+ 'LOG_PROFILE_FIELD_DEACTIVATE' => '<strong>Profile field deactivated</strong><br />» %s',
+ 'LOG_PROFILE_FIELD_EDIT' => '<strong>Profile field changed</strong><br />» %s',
+ 'LOG_PROFILE_FIELD_REMOVED' => '<strong>Profile field removed</strong><br />» %s',
+
+ 'LOG_PRUNE' => '<strong>Pruned forums</strong><br />» %s',
+ 'LOG_AUTO_PRUNE' => '<strong>Auto-pruned forums</strong><br />» %s',
+ 'LOG_PRUNE_USER_DEAC' => '<strong>Users deactivated</strong><br />» %s',
+ 'LOG_PRUNE_USER_DEL_DEL' => '<strong>Users pruned and posts deleted</strong><br />» %s',
+ 'LOG_PRUNE_USER_DEL_ANON' => '<strong>Users pruned and posts retained</strong><br />» %s',
+
+ 'LOG_PURGE_CACHE' => '<strong>Purged cache</strong>',
+ 'LOG_PURGE_SESSIONS' => '<strong>Purged sessions</strong>',
+
+
+ 'LOG_RANK_ADDED' => '<strong>Added new rank</strong><br />» %s',
+ 'LOG_RANK_REMOVED' => '<strong>Removed rank</strong><br />» %s',
+ 'LOG_RANK_UPDATED' => '<strong>Updated rank</strong><br />» %s',
+
+ 'LOG_REASON_ADDED' => '<strong>Added report/denial reason</strong><br />» %s',
+ 'LOG_REASON_REMOVED' => '<strong>Removed report/denial reason</strong><br />» %s',
+ 'LOG_REASON_UPDATED' => '<strong>Updated report/denial reason</strong><br />» %s',
+
+ 'LOG_REFERER_INVALID' => '<strong>Referer validation failed</strong><br />»Referer was “<em>%1$s</em>â€. The request was rejected and the session killed.',
+ 'LOG_RESET_DATE' => '<strong>Board start date reset</strong>',
+ 'LOG_RESET_ONLINE' => '<strong>Most users online reset</strong>',
+ 'LOG_RESYNC_POSTCOUNTS' => '<strong>User post counts resynchronised</strong>',
+ 'LOG_RESYNC_POST_MARKING' => '<strong>Dotted topics resynchronised</strong>',
+ 'LOG_RESYNC_STATS' => '<strong>Post, topic and user statistics resynchronised</strong>',
+
+ 'LOG_SEARCH_INDEX_CREATED' => '<strong>Created search index for</strong><br />» %s',
+ 'LOG_SEARCH_INDEX_REMOVED' => '<strong>Removed search index for</strong><br />» %s',
+ 'LOG_STYLE_ADD' => '<strong>Added new style</strong><br />» %s',
+ 'LOG_STYLE_DELETE' => '<strong>Deleted style</strong><br />» %s',
+ 'LOG_STYLE_EDIT_DETAILS' => '<strong>Edited style</strong><br />» %s',
+ 'LOG_STYLE_EXPORT' => '<strong>Exported style</strong><br />» %s',
+
+ 'LOG_TEMPLATE_ADD_DB' => '<strong>Added new template set to database</strong><br />» %s',
+ 'LOG_TEMPLATE_ADD_FS' => '<strong>Add new template set on filesystem</strong><br />» %s',
+ 'LOG_TEMPLATE_CACHE_CLEARED' => '<strong>Deleted cached versions of template files in template set <em>%1$s</em></strong><br />» %2$s',
+ 'LOG_TEMPLATE_DELETE' => '<strong>Deleted template set</strong><br />» %s',
+ 'LOG_TEMPLATE_EDIT' => '<strong>Edited template set <em>%1$s</em></strong><br />» %2$s',
+ 'LOG_TEMPLATE_EDIT_DETAILS' => '<strong>Edited template details</strong><br />» %s',
+ 'LOG_TEMPLATE_EXPORT' => '<strong>Exported template set</strong><br />» %s',
+ 'LOG_TEMPLATE_REFRESHED' => '<strong>Refreshed template set</strong><br />» %s',
+
+ 'LOG_THEME_ADD_DB' => '<strong>Added new theme to database</strong><br />» %s',
+ 'LOG_THEME_ADD_FS' => '<strong>Add new theme on filesystem</strong><br />» %s',
+ 'LOG_THEME_DELETE' => '<strong>Theme deleted</strong><br />» %s',
+ 'LOG_THEME_EDIT_DETAILS' => '<strong>Edited theme details</strong><br />» %s',
+ 'LOG_THEME_EDIT' => '<strong>Edited theme <em>%1$s</em></strong>',
+ 'LOG_THEME_EDIT_FILE' => '<strong>Edited theme <em>%1$s</em></strong><br />» Modified file <em>%2$s</em>',
+ 'LOG_THEME_EXPORT' => '<strong>Exported theme</strong><br />» %s',
+ 'LOG_THEME_REFRESHED' => '<strong>Refreshed theme</strong><br />» %s',
+
+ 'LOG_UPDATE_DATABASE' => '<strong>Updated Database from version %1$s to version %2$s</strong>',
+ 'LOG_UPDATE_PHPBB' => '<strong>Updated phpBB from version %1$s to version %2$s</strong>',
+
+ 'LOG_USER_ACTIVE' => '<strong>User activated</strong><br />» %s',
+ 'LOG_USER_BAN_USER' => '<strong>Banned User via user management</strong> for reason “<em>%1$s</em>â€<br />» %2$s',
+ 'LOG_USER_BAN_IP' => '<strong>Banned IP via user management</strong> for reason “<em>%1$s</em>â€<br />» %2$s',
+ 'LOG_USER_BAN_EMAIL' => '<strong>Banned e-mail via user management</strong> for reason “<em>%1$s</em>â€<br />» %2$s',
+ 'LOG_USER_DELETED' => '<strong>Deleted user</strong><br />» %s',
+ 'LOG_USER_DEL_ATTACH' => '<strong>Removed all attachments made by the user</strong><br />» %s',
+ 'LOG_USER_DEL_AVATAR' => '<strong>Removed user avatar</strong><br />» %s',
+ 'LOG_USER_DEL_OUTBOX' => '<strong>Emptied user outbox</strong><br />» %s',
+ 'LOG_USER_DEL_POSTS' => '<strong>Removed all posts made by the user</strong><br />» %s',
+ 'LOG_USER_DEL_SIG' => '<strong>Removed user signature</strong><br />» %s',
+ 'LOG_USER_INACTIVE' => '<strong>User deactivated</strong><br />» %s',
+ 'LOG_USER_MOVE_POSTS' => '<strong>Moved user posts</strong><br />» posts by “%1$s†to forum “%2$sâ€',
+ 'LOG_USER_NEW_PASSWORD' => '<strong>Changed user password</strong><br />» %s',
+ 'LOG_USER_REACTIVATE' => '<strong>Forced user account reactivation</strong><br />» %s',
+ 'LOG_USER_REMOVED_NR' => '<strong>Removed newly registered flag from user</strong><br />» %s',
+
+ 'LOG_USER_UPDATE_EMAIL' => '<strong>User “%1$s†changed e-mail</strong><br />» from “%2$s†to “%3$sâ€',
+ 'LOG_USER_UPDATE_NAME' => '<strong>Changed username</strong><br />» from “%1$s†to “%2$sâ€',
+ 'LOG_USER_USER_UPDATE' => '<strong>Updated user details</strong><br />» %s',
+
+ 'LOG_USER_ACTIVE_USER' => '<strong>User account activated</strong>',
+ 'LOG_USER_DEL_AVATAR_USER' => '<strong>User avatar removed</strong>',
+ 'LOG_USER_DEL_SIG_USER' => '<strong>User signature removed</strong>',
+ 'LOG_USER_FEEDBACK' => '<strong>Added user feedback</strong><br />» %s',
+ 'LOG_USER_GENERAL' => '<strong>Entry added:</strong><br />» %s',
+ 'LOG_USER_INACTIVE_USER' => '<strong>User account de-activated</strong>',
+ 'LOG_USER_LOCK' => '<strong>User locked own topic</strong><br />» %s',
+ 'LOG_USER_MOVE_POSTS_USER' => '<strong>Moved all posts to forum</strong>» %s',
+ 'LOG_USER_REACTIVATE_USER' => '<strong>Forced user account reactivation</strong>',
+ 'LOG_USER_UNLOCK' => '<strong>User unlocked own topic</strong><br />» %s',
+ 'LOG_USER_WARNING' => '<strong>Added user warning</strong><br />» %s',
+ 'LOG_USER_WARNING_BODY' => '<strong>The following warning was issued to this user</strong><br />» %s',
+
+ 'LOG_USER_GROUP_CHANGE' => '<strong>User changed default group</strong><br />» %s',
+ 'LOG_USER_GROUP_DEMOTE' => '<strong>User demoted as leaders from usergroup</strong><br />» %s',
+ 'LOG_USER_GROUP_JOIN' => '<strong>User joined group</strong><br />» %s',
+ 'LOG_USER_GROUP_JOIN_PENDING' => '<strong>User joined group and needs to be approved</strong><br />» %s',
+ 'LOG_USER_GROUP_RESIGN' => '<strong>User resigned membership from group</strong><br />» %s',
+
+ 'LOG_WARNING_DELETED' => '<strong>Deleted user warning</strong><br />» %s',
+ 'LOG_WARNINGS_DELETED' => '<strong>Deleted %2$s user warnings</strong><br />» %1$s', // Example: '<strong>Deleted 2 user warnings</strong><br />» username'
+ 'LOG_WARNINGS_DELETED_ALL' => '<strong>Deleted all user warnings</strong><br />» %s',
+
+ 'LOG_WORD_ADD' => '<strong>Added word censor</strong><br />» %s',
+ 'LOG_WORD_DELETE' => '<strong>Deleted word censor</strong><br />» %s',
+ 'LOG_WORD_EDIT' => '<strong>Edited word censor</strong><br />» %s',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/database.php b/phpBB/language/en/acp/database.php
new file mode 100644
index 0000000000..ae8f76d6b7
--- /dev/null
+++ b/phpBB/language/en/acp/database.php
@@ -0,0 +1,76 @@
+<?php
+/**
+*
+* acp_database [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+// Database Backup/Restore
+$lang = array_merge($lang, array(
+ 'ACP_BACKUP_EXPLAIN' => 'Here you can backup all your phpBB related data. You may store the resulting archive in your <samp>store/</samp> folder or download it directly. Depending on your server configuration you may be able to compress the file in a number of formats.',
+ 'ACP_RESTORE_EXPLAIN' => 'This will perform a full restore of all phpBB tables from a saved file. If your server supports it you may use a gzip or bzip2 compressed text file and it will automatically be decompressed. <strong>WARNING</strong> This will overwrite any existing data. The restore may take a long time to process please do not move from this page till it is complete. Backups are stored in the <samp>store/</samp> folder and are assumed to be generated by phpBB’s backup functionality. Restoring backups that were not created by the built in system may or may not work.',
+
+ 'BACKUP_DELETE' => 'The backup file has been deleted successfully.',
+ 'BACKUP_INVALID' => 'The selected file to backup is invalid.',
+ 'BACKUP_OPTIONS' => 'Backup options',
+ 'BACKUP_SUCCESS' => 'The backup file has been created successfully.',
+ 'BACKUP_TYPE' => 'Backup type',
+
+ 'DATABASE' => 'Database utilities',
+ 'DATA_ONLY' => 'Data only',
+ 'DELETE_BACKUP' => 'Delete backup',
+ 'DELETE_SELECTED_BACKUP' => 'Are you sure you want to delete the selected backup?',
+ 'DESELECT_ALL' => 'Deselect all',
+ 'DOWNLOAD_BACKUP' => 'Download backup',
+
+ 'FILE_TYPE' => 'File type',
+ 'FILE_WRITE_FAIL' => 'Unable to write file to storage folder.',
+ 'FULL_BACKUP' => 'Full',
+
+ 'RESTORE_FAILURE' => 'The backup file may be corrupt.',
+ 'RESTORE_OPTIONS' => 'Restore options',
+ 'RESTORE_SUCCESS' => 'The database has been successfully restored.<br /><br />Your board should be back to the state it was when the backup was made.',
+
+ 'SELECT_ALL' => 'Select all',
+ 'SELECT_FILE' => 'Select a file',
+ 'START_BACKUP' => 'Start backup',
+ 'START_RESTORE' => 'Start restore',
+ 'STORE_AND_DOWNLOAD' => 'Store and download',
+ 'STORE_LOCAL' => 'Store file locally',
+ 'STRUCTURE_ONLY' => 'Structure only',
+
+ 'TABLE_SELECT' => 'Table select',
+ 'TABLE_SELECT_ERROR'=> 'You must select at least one table.',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/email.php b/phpBB/language/en/acp/email.php
new file mode 100644
index 0000000000..4427bfff01
--- /dev/null
+++ b/phpBB/language/en/acp/email.php
@@ -0,0 +1,67 @@
+<?php
+/**
+*
+* acp_email [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+// Email settings
+$lang = array_merge($lang, array(
+ 'ACP_MASS_EMAIL_EXPLAIN' => 'Here you can e-mail a message to either all of your users or all users of a specific group <strong>having the option to receive mass e-mails enabled</strong>. To achieve this an e-mail will be sent out to the administrative e-mail address supplied, with a blind carbon copy sent to all recipients. The default setting is to only include 50 recipients in such an e-mail, for more recipients more e-mails will be sent. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time, you will be notified when the script has completed.',
+ 'ALL_USERS' => 'All users',
+
+ 'COMPOSE' => 'Compose',
+
+ 'EMAIL_SEND_ERROR' => 'There were one or more errors while sending the e-mail. Please check the %sError log%s for detailed error messages.',
+ 'EMAIL_SENT' => 'This message has been sent.',
+ 'EMAIL_SENT_QUEUE' => 'This message has been queued for sending.',
+
+ 'LOG_SESSION' => 'Log mail session to critical log',
+
+ 'SEND_IMMEDIATELY' => 'Send immediately',
+ 'SEND_TO_GROUP' => 'Send to group',
+ 'SEND_TO_USERS' => 'Send to users',
+ 'SEND_TO_USERS_EXPLAIN' => 'Entering names here will override any group selected above. Enter each username on a new line.',
+
+ 'MAIL_HIGH_PRIORITY' => 'High',
+ 'MAIL_LOW_PRIORITY' => 'Low',
+ 'MAIL_NORMAL_PRIORITY' => 'Normal',
+ 'MAIL_PRIORITY' => 'Mail priority',
+ 'MASS_MESSAGE' => 'Your message',
+ 'MASS_MESSAGE_EXPLAIN' => 'Please note that you may enter only plain text. All markup will be removed before sending.',
+
+ 'NO_EMAIL_MESSAGE' => 'You must enter a message.',
+ 'NO_EMAIL_SUBJECT' => 'You must specify a subject for your message.',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/forums.php b/phpBB/language/en/acp/forums.php
new file mode 100644
index 0000000000..371a184fb7
--- /dev/null
+++ b/phpBB/language/en/acp/forums.php
@@ -0,0 +1,160 @@
+<?php
+/**
+*
+* acp_forums [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+// Forum Admin
+$lang = array_merge($lang, array(
+ 'AUTO_PRUNE_DAYS' => 'Auto-prune post age',
+ 'AUTO_PRUNE_DAYS_EXPLAIN' => 'Number of days since last post after which topic is removed.',
+ 'AUTO_PRUNE_FREQ' => 'Auto-prune frequency',
+ 'AUTO_PRUNE_FREQ_EXPLAIN' => 'Time in days between pruning events.',
+ 'AUTO_PRUNE_VIEWED' => 'Auto-prune post viewed age',
+ 'AUTO_PRUNE_VIEWED_EXPLAIN' => 'Number of days since topic was viewed after which topic is removed.',
+
+ 'CONTINUE' => 'Continue',
+ 'COPY_PERMISSIONS' => 'Copy permissions from',
+ 'COPY_PERMISSIONS_EXPLAIN' => 'To ease up the permission setup for your new forum, you can copy the permissions of an existing forum.',
+ 'COPY_PERMISSIONS_ADD_EXPLAIN' => 'Once created, the forum will have the same permissions as the one you select here. If no forum is selected the newly created forum will not be visible until permissions had been set.',
+ 'COPY_PERMISSIONS_EDIT_EXPLAIN' => 'If you select to copy permissions, the forum will have the same permissions as the one you select here. This will overwrite any permissions you have previously set for this forum with the permissions of the forum you select here. If no forum is selected the current permissions will be kept.',
+ 'COPY_TO_ACL' => 'Alternatively, you are also able to %sset up new permissions%s for this forum.',
+ 'CREATE_FORUM' => 'Create new forum',
+
+ 'DECIDE_MOVE_DELETE_CONTENT' => 'Delete content or move to forum',
+ 'DECIDE_MOVE_DELETE_SUBFORUMS' => 'Delete subforums or move to forum',
+ 'DEFAULT_STYLE' => 'Default style',
+ 'DELETE_ALL_POSTS' => 'Delete posts',
+ 'DELETE_SUBFORUMS' => 'Delete subforums and posts',
+ 'DISPLAY_ACTIVE_TOPICS' => 'Enable active topics',
+ 'DISPLAY_ACTIVE_TOPICS_EXPLAIN' => 'If set to yes active topics in selected subforums will be displayed under this category.',
+
+ 'EDIT_FORUM' => 'Edit forum',
+ 'ENABLE_INDEXING' => 'Enable search indexing',
+ 'ENABLE_INDEXING_EXPLAIN' => 'If set to yes posts made to this forum will be indexed for searching.',
+ 'ENABLE_POST_REVIEW' => 'Enable post review',
+ 'ENABLE_POST_REVIEW_EXPLAIN' => 'If set to yes users are able to review their post if new posts were made to the topic while users wrote theirs. This should be disabled for chat forums.',
+ 'ENABLE_QUICK_REPLY' => 'Enable quick reply',
+ 'ENABLE_QUICK_REPLY_EXPLAIN' => 'If set to yes users get a quick reply box for this forum. If the global option for quick reply is disabled or the forum not postable to the quick reply box will not be displayed, even if set to yes here.',
+ 'ENABLE_RECENT' => 'Display active topics',
+ 'ENABLE_RECENT_EXPLAIN' => 'If set to yes topics made to this forum will be shown in the active topics list.',
+ 'ENABLE_TOPIC_ICONS' => 'Enable topic icons',
+
+ 'FORUM_ADMIN' => 'Forum administration',
+ 'FORUM_ADMIN_EXPLAIN' => 'In phpBB3 there are no categories, everything is forum based. Each forum can have an unlimited number of sub-forums and you can determine whether each may be posted to or not (i.e. whether it acts like an old category). Here you can add, edit, delete, lock, unlock individual forums as well as set certain additional controls. If your posts and topics have got out of sync you can also resynchronise a forum. <strong>You need to copy or set appropriate permissions for newly created forums to have them displayed.</strong>',
+ 'FORUM_AUTO_PRUNE' => 'Enable auto-pruning',
+ 'FORUM_AUTO_PRUNE_EXPLAIN' => 'Prunes the forum of topics, set the frequency/age parameters below.',
+ 'FORUM_CREATED' => 'Forum created successfully.',
+ 'FORUM_DATA_NEGATIVE' => 'Pruning parameters cannot be negative.',
+ 'FORUM_DESC_TOO_LONG' => 'The forum description is too long, it must be less than 4000 characters.',
+ 'FORUM_DELETE' => 'Delete forum',
+ 'FORUM_DELETE_EXPLAIN' => 'The form below will allow you to delete a forum. If the forum is postable you are able to decide where you want to put all topics (or forums) it contained.',
+ 'FORUM_DELETED' => 'Forum successfully deleted.',
+ 'FORUM_DESC' => 'Description',
+ 'FORUM_DESC_EXPLAIN' => 'Any HTML markup entered here will be displayed as is.',
+ 'FORUM_EDIT_EXPLAIN' => 'The form below will allow you to customise this forum. Please note that moderation and post count controls are set via forum permissions for each user or usergroup.',
+ 'FORUM_IMAGE' => 'Forum image',
+ 'FORUM_IMAGE_EXPLAIN' => 'Location, relative to the phpBB root directory, of an additional image to associate with this forum.',
+ 'FORUM_IMAGE_NO_EXIST' => 'The specified forum image does not exist',
+ 'FORUM_LINK_EXPLAIN' => 'Full URL (including the protocol, i.e.: <samp>http://</samp>) to the destination location that clicking this forum will take the user, e.g.: <samp>http://www.phpbb.com/</samp>.',
+ 'FORUM_LINK_TRACK' => 'Track link redirects',
+ 'FORUM_LINK_TRACK_EXPLAIN' => 'Records the number of times a forum link was clicked.',
+ 'FORUM_NAME' => 'Forum name',
+ 'FORUM_NAME_EMPTY' => 'You must enter a name for this forum.',
+ 'FORUM_PARENT' => 'Parent forum',
+ 'FORUM_PASSWORD' => 'Forum password',
+ 'FORUM_PASSWORD_CONFIRM' => 'Confirm forum password',
+ 'FORUM_PASSWORD_CONFIRM_EXPLAIN' => 'Only needs to be set if a forum password is entered.',
+ 'FORUM_PASSWORD_EXPLAIN' => 'Defines a password for this forum, use the permission system in preference.',
+ 'FORUM_PASSWORD_UNSET' => 'Remove forum password',
+ 'FORUM_PASSWORD_UNSET_EXPLAIN' => 'Check here if you want to remove the forum password.',
+ 'FORUM_PASSWORD_OLD' => 'The forum password is using an old encryption and should be changed.',
+ 'FORUM_PASSWORD_MISMATCH' => 'The passwords you entered did not match.',
+ 'FORUM_PRUNE_SETTINGS' => 'Forum prune settings',
+ 'FORUM_RESYNCED' => 'Forum “%s†successfully resynced',
+ 'FORUM_RULES_EXPLAIN' => 'Forum rules are displayed at any page within the given forum.',
+ 'FORUM_RULES_LINK' => 'Link to forum rules',
+ 'FORUM_RULES_LINK_EXPLAIN' => 'You are able to enter the URL of the page/post containing your forum rules here. This setting will override the forum rules text you specified.',
+ 'FORUM_RULES_PREVIEW' => 'Forum rules preview',
+ 'FORUM_RULES_TOO_LONG' => 'The forum rules must be less than 4000 characters.',
+ 'FORUM_SETTINGS' => 'Forum settings',
+ 'FORUM_STATUS' => 'Forum status',
+ 'FORUM_STYLE' => 'Forum style',
+ 'FORUM_TOPICS_PAGE' => 'Topics per page',
+ 'FORUM_TOPICS_PAGE_EXPLAIN' => 'If non-zero this value will override the default topics per page setting.',
+ 'FORUM_TYPE' => 'Forum type',
+ 'FORUM_UPDATED' => 'Forum information updated successfully.',
+
+ 'FORUM_WITH_SUBFORUMS_NOT_TO_LINK' => 'You want to change a postable forum having subforums to a link. Please move all subforums out of this forum before you proceed, because after changing to a link you are no longer able to see the subforums currently connected to this forum.',
+
+ 'GENERAL_FORUM_SETTINGS' => 'General forum settings',
+
+ 'LINK' => 'Link',
+ 'LIST_INDEX' => 'List subforum in parent-forum’s legend',
+ 'LIST_INDEX_EXPLAIN' => 'Displays this forum on the index and elsewhere as a link within the legend of its parent-forum if the parent-forum’s “List subforums in legend†option is enabled.',
+ 'LIST_SUBFORUMS' => 'List subforums in legend',
+ 'LIST_SUBFORUMS_EXPLAIN' => 'Displays this forum’s subforums on the index and elsewhere as a link within the legend if their “List subforum in parent-forum’s legend†option is enabled.',
+ 'LOCKED' => 'Locked',
+
+ 'MOVE_POSTS_NO_POSTABLE_FORUM' => 'The forum you selected for moving the posts to is not postable. Please select a postable forum.',
+ 'MOVE_POSTS_TO' => 'Move posts to',
+ 'MOVE_SUBFORUMS_TO' => 'Move subforums to',
+
+ 'NO_DESTINATION_FORUM' => 'You have not specified a forum to move content to.',
+ 'NO_FORUM_ACTION' => 'No action defined for what happens with the forum content.',
+ 'NO_PARENT' => 'No parent',
+ 'NO_PERMISSIONS' => 'Do not copy permissions',
+ 'NO_PERMISSION_FORUM_ADD' => 'You do not have the necessary permissions to add forums.',
+ 'NO_PERMISSION_FORUM_DELETE' => 'You do not have the necessary permissions to delete forums.',
+
+ 'PARENT_IS_LINK_FORUM' => 'The parent you specified is a forum link. Link forums are not able to hold other forums, please specify a category or forum as the parent forum.',
+ 'PARENT_NOT_EXIST' => 'Parent does not exist.',
+ 'PRUNE_ANNOUNCEMENTS' => 'Prune announcements',
+ 'PRUNE_STICKY' => 'Prune stickies',
+ 'PRUNE_OLD_POLLS' => 'Prune old polls',
+ 'PRUNE_OLD_POLLS_EXPLAIN' => 'Removes topics with polls not voted in for post age days.',
+
+ 'REDIRECT_ACL' => 'Now you are able to %sset permissions%s for this forum.',
+
+ 'SYNC_IN_PROGRESS' => 'Synchronizing forum',
+ 'SYNC_IN_PROGRESS_EXPLAIN' => 'Currently resyncing topic range %1$d/%2$d.',
+
+ 'TYPE_CAT' => 'Category',
+ 'TYPE_FORUM' => 'Forum',
+ 'TYPE_LINK' => 'Link',
+
+ 'UNLOCKED' => 'Unlocked',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php
new file mode 100644
index 0000000000..e8c1a3c494
--- /dev/null
+++ b/phpBB/language/en/acp/groups.php
@@ -0,0 +1,132 @@
+<?php
+/**
+*
+* acp_groups [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'ACP_GROUPS_MANAGE_EXPLAIN' => 'From this panel you can administrate all your usergroups. You can delete, create and edit existing groups. Furthermore, you may choose group leaders, toggle open/hidden/closed group status and set the group name and description.',
+ 'ADD_USERS' => 'Add users',
+ 'ADD_USERS_EXPLAIN' => 'Here you can add new users to the group. You may select whether this group becomes the new default for the selected users. Additionally you can define them as group leaders. Please enter each username on a separate line.',
+
+ 'COPY_PERMISSIONS' => 'Copy permissions from',
+ 'COPY_PERMISSIONS_EXPLAIN' => 'Once created, the group will have the same permissions as the one you select here.',
+ 'CREATE_GROUP' => 'Create new group',
+
+ 'GROUPS_NO_MEMBERS' => 'This group has no members',
+ 'GROUPS_NO_MODS' => 'No group leaders defined',
+
+ 'GROUP_APPROVE' => 'Approve member',
+ 'GROUP_APPROVED' => 'Approved members',
+ 'GROUP_AVATAR' => 'Group avatar',
+ 'GROUP_AVATAR_EXPLAIN' => 'This image will be displayed in the Group Control Panel.',
+ 'GROUP_CLOSED' => 'Closed',
+ 'GROUP_COLOR' => 'Group colour',
+ 'GROUP_COLOR_EXPLAIN' => 'Defines the colour members’ usernames will appear in, leave blank for user default.',
+ 'GROUP_CONFIRM_ADD_USER' => 'Are you sure that you want to add the user %1$s to the group?',
+ 'GROUP_CONFIRM_ADD_USERS' => 'Are you sure that you want to add the users %1$s to the group?',
+ 'GROUP_CREATED' => 'Group has been created successfully.',
+ 'GROUP_DEFAULT' => 'Make group default for member',
+ 'GROUP_DEFS_UPDATED' => 'Default group set for all selected members.',
+ 'GROUP_DELETE' => 'Remove member from group',
+ 'GROUP_DELETED' => 'Group deleted and user default groups set successfully.',
+ 'GROUP_DEMOTE' => 'Demote group leader',
+ 'GROUP_DESC' => 'Group description',
+ 'GROUP_DETAILS' => 'Group details',
+ 'GROUP_EDIT_EXPLAIN' => 'Here you can edit an existing group. You can change its name, description and type (open, closed, etc.). You can also set certain group wide options such as colouration, rank, etc. Changes made here override users’ current settings. Please note that group members can override group-avatar settings, unless you set appropriate user permissions.',
+ 'GROUP_ERR_USERS_EXIST' => 'The specified users are already members of this group.',
+ 'GROUP_FOUNDER_MANAGE' => 'Founder manage only',
+ 'GROUP_FOUNDER_MANAGE_EXPLAIN' => 'Restrict management of this group to founders only. Users having group permissions are still able to see this group as well as this group’s members.',
+ 'GROUP_HIDDEN' => 'Hidden',
+ 'GROUP_LANG' => 'Group language',
+ 'GROUP_LEAD' => 'Group leaders',
+ 'GROUP_LEADERS_ADDED' => 'New leaders added to group successfully.',
+ 'GROUP_LEGEND' => 'Display group in legend',
+ 'GROUP_LIST' => 'Current members',
+ 'GROUP_LIST_EXPLAIN' => 'This is a complete list of all the current users with membership of this group. You can delete members (except in certain special groups) or add new ones as you see fit.',
+ 'GROUP_MEMBERS' => 'Group members',
+ 'GROUP_MEMBERS_EXPLAIN' => 'This is a complete listing of all the members of this usergroup. It includes separate sections for leaders, pending and existing members. From here you can manage all aspects of who has membership of this group and what their role is. To remove a leader but keep them in the group use Demote rather than delete. Similarly use Promote to make an existing member a leader.',
+ 'GROUP_MESSAGE_LIMIT' => 'Group private message limit per folder',
+ 'GROUP_MESSAGE_LIMIT_EXPLAIN' => 'This setting overrides the per-user folder message limit. A value of 0 means the user default limit will be used.',
+ 'GROUP_MODS_ADDED' => 'New group leaders added successfully.',
+ 'GROUP_MODS_DEMOTED' => 'Group leaders demoted successfully.',
+ 'GROUP_MODS_PROMOTED' => 'Group members promoted successfully.',
+ 'GROUP_NAME' => 'Group name',
+ 'GROUP_NAME_TAKEN' => 'The group name you entered is already in use, please select an alternative.',
+ 'GROUP_OPEN' => 'Open',
+ 'GROUP_PENDING' => 'Pending members',
+ 'GROUP_MAX_RECIPIENTS' => 'Maximum number of allowed recipients per private message',
+ 'GROUP_MAX_RECIPIENTS_EXPLAIN' => 'The maximum number of allowed recipients in a private message. If 0 is entered, the board-wide setting is used.',
+ 'GROUP_OPTIONS_SAVE' => 'Group wide options',
+ 'GROUP_PROMOTE' => 'Promote to group leader',
+ 'GROUP_RANK' => 'Group rank',
+ 'GROUP_RECEIVE_PM' => 'Group able to receive private messages',
+ 'GROUP_RECEIVE_PM_EXPLAIN' => 'Please note that hidden groups are not able to be messaged, regardless of this setting.',
+ 'GROUP_REQUEST' => 'Request',
+ 'GROUP_SETTINGS_SAVE' => 'Group wide settings',
+ 'GROUP_SKIP_AUTH' => 'Exempt group leader from permissions',
+ 'GROUP_SKIP_AUTH_EXPLAIN' => 'If enabled group leader no longer inherit permissions from the group.',
+ 'GROUP_TYPE' => 'Group type',
+ 'GROUP_TYPE_EXPLAIN' => 'This determines which users can join or view this group.',
+ 'GROUP_UPDATED' => 'Group preferences updated successfully.',
+
+ 'GROUP_USERS_ADDED' => 'New users added to group successfully.',
+ 'GROUP_USERS_EXIST' => 'The selected users are already members.',
+ 'GROUP_USERS_REMOVE' => 'Users removed from group and new defaults set successfully.',
+
+ 'MAKE_DEFAULT_FOR_ALL' => 'Make default group for every member',
+ 'MEMBERS' => 'Members',
+
+ 'NO_GROUP' => 'No group specified.',
+ 'NO_GROUPS_CREATED' => 'No groups created yet.',
+ 'NO_PERMISSIONS' => 'Do not copy permissions',
+ 'NO_USERS' => 'You haven’t entered any users.',
+ 'NO_USERS_ADDED' => 'No users were added to the group.',
+ 'NO_VALID_USERS' => 'You haven’t entered any users eligible for that action.',
+
+ 'SPECIAL_GROUPS' => 'Pre-defined groups',
+ 'SPECIAL_GROUPS_EXPLAIN' => 'Pre-defined groups are special groups, they cannot be deleted or directly modified. However you can still add users and alter basic settings.',
+
+ 'TOTAL_MEMBERS' => 'Members',
+
+ 'USERS_APPROVED' => 'Users approved successfully.',
+ 'USER_DEFAULT' => 'User default',
+ 'USER_DEF_GROUPS' => 'User defined groups',
+ 'USER_DEF_GROUPS_EXPLAIN' => 'These are groups created by you or another admin on this board. You can manage memberships as well as edit group properties or even delete the group.',
+ 'USER_GROUP_DEFAULT' => 'Set as default group',
+ 'USER_GROUP_DEFAULT_EXPLAIN' => 'Saying yes here will set this group as the default group for the added users.',
+ 'USER_GROUP_LEADER' => 'Set as group leader',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/index.htm b/phpBB/language/en/acp/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/language/en/acp/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/language/en/acp/language.php b/phpBB/language/en/acp/language.php
new file mode 100644
index 0000000000..4d11309ebb
--- /dev/null
+++ b/phpBB/language/en/acp/language.php
@@ -0,0 +1,102 @@
+<?php
+/**
+*
+* acp_language [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'ACP_FILES' => 'Admin language files',
+ 'ACP_LANGUAGE_PACKS_EXPLAIN' => 'Here you are able to install/remove language packs. The default language pack is marked with an asterisk (*).',
+
+ 'EMAIL_FILES' => 'E-mail templates',
+
+ 'FILE_CONTENTS' => 'File contents',
+ 'FILE_FROM_STORAGE' => 'File from storage folder',
+
+ 'HELP_FILES' => 'Help files',
+
+ 'INSTALLED_LANGUAGE_PACKS' => 'Installed language packs',
+ 'INVALID_LANGUAGE_PACK' => 'The selected language pack seems to be not valid. Please verify the language pack and upload it again if necessary.',
+ 'INVALID_UPLOAD_METHOD' => 'The selected upload method is not valid, please choose a different method.',
+
+ 'LANGUAGE_DETAILS_UPDATED' => 'Language details successfully updated.',
+ 'LANGUAGE_ENTRIES' => 'Language entries',
+ 'LANGUAGE_ENTRIES_EXPLAIN' => 'Here you are able to change existing language pack entries or not already translated ones.<br /><strong>Note:</strong> Once you changed a language file, the changes will be stored within a separate folder for you to download. The changes will not be seen by your users until you replace the original language files at your webspace (by uploading them).',
+ 'LANGUAGE_FILES' => 'Language files',
+ 'LANGUAGE_KEY' => 'Language key',
+ 'LANGUAGE_PACK_ALREADY_INSTALLED' => 'This language pack is already installed.',
+ 'LANGUAGE_PACK_DELETED' => 'The language pack <strong>%s</strong> has been removed successfully. All users using this language have been reset to the boards default language.',
+ 'LANGUAGE_PACK_DETAILS' => 'Language pack details',
+ 'LANGUAGE_PACK_INSTALLED' => 'The language pack <strong>%s</strong> has been successfully installed.',
+ 'LANGUAGE_PACK_ISO' => 'ISO',
+ 'LANGUAGE_PACK_LOCALNAME' => 'Local name',
+ 'LANGUAGE_PACK_NAME' => 'Name',
+ 'LANGUAGE_PACK_NOT_EXIST' => 'The selected language pack does not exist.',
+ 'LANGUAGE_PACK_USED_BY' => 'Used by (including robots)',
+ 'LANGUAGE_VARIABLE' => 'Language variable',
+ 'LANG_AUTHOR' => 'Language pack author',
+ 'LANG_ENGLISH_NAME' => 'English name',
+ 'LANG_ISO_CODE' => 'ISO code',
+ 'LANG_LOCAL_NAME' => 'Local name',
+
+ 'MISSING_LANGUAGE_FILE' => 'Missing language file: <strong style="color:red">%s</strong>',
+ 'MISSING_LANG_VARIABLES' => 'Missing language variables',
+ 'MODS_FILES' => 'MODs language files',
+
+ 'NO_FILE_SELECTED' => 'You haven’t specified a language file.',
+ 'NO_LANG_ID' => 'You haven’t specified a language pack.',
+ 'NO_REMOVE_DEFAULT_LANG' => 'You are not able to remove the default language pack.<br />If you want to remove this language pack, change your boards default language first.',
+ 'NO_UNINSTALLED_LANGUAGE_PACKS' => 'No uninstalled language packs',
+
+ 'REMOVE_FROM_STORAGE_FOLDER' => 'Remove from storage folder',
+
+ 'SELECT_DOWNLOAD_FORMAT' => 'Select download format',
+ 'SUBMIT_AND_DOWNLOAD' => 'Submit and download file',
+ 'SUBMIT_AND_UPLOAD' => 'Submit and upload file',
+
+ 'THOSE_MISSING_LANG_FILES' => 'The following language files are missing from the %s language folder',
+ 'THOSE_MISSING_LANG_VARIABLES' => 'The following language variables are missing from the <strong>%s</strong> language pack',
+
+ 'UNINSTALLED_LANGUAGE_PACKS' => 'Uninstalled language packs',
+
+ 'UNABLE_TO_WRITE_FILE' => 'The file could not be written to %s.',
+ 'UPLOAD_COMPLETED' => 'The upload was completed successfully.',
+ 'UPLOAD_FAILED' => 'The upload failed for unknown reasons. You may need to replace the relevant file manually.',
+ 'UPLOAD_METHOD' => 'Upload method',
+ 'UPLOAD_SETTINGS' => 'Upload settings',
+
+ 'WRONG_LANGUAGE_FILE' => 'Selected language file is invalid.',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/modules.php b/phpBB/language/en/acp/modules.php
new file mode 100644
index 0000000000..875b24a94b
--- /dev/null
+++ b/phpBB/language/en/acp/modules.php
@@ -0,0 +1,84 @@
+<?php
+/**
+*
+* acp_modules [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'ACP_MODULE_MANAGEMENT_EXPLAIN' => 'Here you are able to manage all kind of modules. Please note that the ACP has a three-level menu structure (Category -> Category -> Module) whereby the others having a two-level menu structure (Category -> Module) which must be kept. Please also be aware that you may lock out yourself if you disable or delete the modules responsible for the module management itself.',
+ 'ADD_MODULE' => 'Add module',
+ 'ADD_MODULE_CONFIRM' => 'Are you sure you want to add the selected module with the selected mode?',
+ 'ADD_MODULE_TITLE' => 'Add module',
+
+ 'CANNOT_REMOVE_MODULE' => 'Unable to remove module, it has assigned children. Please remove or move all children before performing this action.',
+ 'CATEGORY' => 'Category',
+ 'CHOOSE_MODE' => 'Choose module mode',
+ 'CHOOSE_MODE_EXPLAIN' => 'Choose the modules mode being used.',
+ 'CHOOSE_MODULE' => 'Choose module',
+ 'CHOOSE_MODULE_EXPLAIN' => 'Choose the file being called by this module.',
+ 'CREATE_MODULE' => 'Create new module',
+
+ 'DEACTIVATED_MODULE' => 'Deactivated module',
+ 'DELETE_MODULE' => 'Delete module',
+ 'DELETE_MODULE_CONFIRM' => 'Are you sure you want to remove this module?',
+
+ 'EDIT_MODULE' => 'Edit module',
+ 'EDIT_MODULE_EXPLAIN' => 'Here you are able to enter module specific settings.',
+
+ 'HIDDEN_MODULE' => 'Hidden module',
+
+ 'MODULE' => 'Module',
+ 'MODULE_ADDED' => 'Module successfully added.',
+ 'MODULE_DELETED' => 'Module successfully removed.',
+ 'MODULE_DISPLAYED' => 'Module displayed',
+ 'MODULE_DISPLAYED_EXPLAIN' => 'If you do not wish to display this module, but want to use it, set this to no.',
+ 'MODULE_EDITED' => 'Module successfully edited.',
+ 'MODULE_ENABLED' => 'Module enabled',
+ 'MODULE_LANGNAME' => 'Module language name',
+ 'MODULE_LANGNAME_EXPLAIN' => 'Enter the displayed module name. Use language constant if name is served from language file.',
+ 'MODULE_TYPE' => 'Module type',
+
+ 'NO_CATEGORY_TO_MODULE' => 'Unable to turn category into module. Please remove/move all children before performing this action.',
+ 'NO_MODULE' => 'No module found.',
+ 'NO_MODULE_ID' => 'No module id specified.',
+ 'NO_MODULE_LANGNAME' => 'No module language name specified.',
+ 'NO_PARENT' => 'No Parent',
+
+ 'PARENT' => 'Parent',
+ 'PARENT_NO_EXIST' => 'Parent does not exist.',
+
+ 'SELECT_MODULE' => 'Select a module',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/permissions.php b/phpBB/language/en/acp/permissions.php
new file mode 100644
index 0000000000..cf248cffdb
--- /dev/null
+++ b/phpBB/language/en/acp/permissions.php
@@ -0,0 +1,289 @@
+<?php
+/**
+*
+* acp_permissions [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'ACP_PERMISSIONS_EXPLAIN' => '
+ <p>Permissions are highly granular and grouped into four major sections, which are:</p>
+
+ <h2>Global Permissions</h2>
+ <p>These are used to control access on a global level and apply to the entire bulletin board. They are further divided into Users’ Permissions, Groups’ Permissions, Administrators and Global Moderators.</p>
+
+ <h2>Forum Based Permissions</h2>
+ <p>These are used to control access on a per forum basis. They are further divided into Forum Permissions, Forum Moderators, Users’ Forum Permissions and Groups’ Forum Permissions.</p>
+
+ <h2>Permission Roles</h2>
+ <p>These are used to create different sets of permissions for the different permission types later being able to be assigned on a role-based basis. The default roles should cover the administration of bulletin boards large and small, though within each of the four divisions, you can add/edit/delete roles as you see fit.</p>
+
+ <h2>Permission Masks</h2>
+ <p>These are used to view the effective permissions assigned to Users, Moderators (Local and Global), Administrators or Forums.</p>
+
+ <br />
+
+ <p>For further information on setting up and managing permissions on your phpBB3 board, please see <a href="http://www.phpbb.com/support/documentation/3.0/quickstart/quick_permissions.html">Chapter 1.5 of our Quick Start Guide</a>.</p>
+ ',
+
+ 'ACL_NEVER' => 'Never',
+ 'ACL_SET' => 'Setting permissions',
+ 'ACL_SET_EXPLAIN' => 'Permissions are based on a simple <samp>YES</samp>/<samp>NO</samp> system. Setting an option to <samp>NEVER</samp> for a user or usergroup overrides any other value assigned to it. If you do not wish to assign a value for an option for this user or group select <samp>NO</samp>. If values are assigned for this option elsewhere they will be used in preference, else <samp>NEVER</samp> is assumed. All objects marked (with the checkbox in front of them) will copy the permission set you defined.',
+ 'ACL_SETTING' => 'Setting',
+
+ 'ACL_TYPE_A_' => 'Administrative permissions',
+ 'ACL_TYPE_F_' => 'Forum permissions',
+ 'ACL_TYPE_M_' => 'Moderative permissions',
+ 'ACL_TYPE_U_' => 'User permissions',
+
+ 'ACL_TYPE_GLOBAL_A_' => 'Administrative permissions',
+ 'ACL_TYPE_GLOBAL_U_' => 'User permissions',
+ 'ACL_TYPE_GLOBAL_M_' => 'Global Moderator permissions',
+ 'ACL_TYPE_LOCAL_M_' => 'Forum Moderator permissions',
+ 'ACL_TYPE_LOCAL_F_' => 'Forum permissions',
+
+ 'ACL_NO' => 'No',
+ 'ACL_VIEW' => 'Viewing permissions',
+ 'ACL_VIEW_EXPLAIN' => 'Here you can see the effective permissions the user/group is having. A red square indicates that the user/group does not have the permission, a green square indicates that the user/group does have the permission.',
+ 'ACL_YES' => 'Yes',
+
+ 'ACP_ADMINISTRATORS_EXPLAIN' => 'Here you can assign administrator permissions to users or groups. All users with administrator permissions can view the administration control panel.',
+ 'ACP_FORUM_MODERATORS_EXPLAIN' => 'Here you can assign users and groups as forum moderators. To assign users access to forums, to define global moderative permissions or administrators please use the appropriate page.',
+ 'ACP_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can alter which users and groups can access which forums. To assign moderators or define administrators please use the appropriate page.',
+ 'ACP_FORUM_PERMISSIONS_COPY_EXPLAIN' => 'Here you can copy forum permissions from one forum to one or more other forums.',
+ 'ACP_GLOBAL_MODERATORS_EXPLAIN' => 'Here you can assign global moderator permissions to users or groups. These moderators are like ordinary moderators except they have access to every forum on your board.',
+ 'ACP_GROUPS_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can assign forum permissions to groups.',
+ 'ACP_GROUPS_PERMISSIONS_EXPLAIN' => 'Here you can assign global permissions to groups - user permissions, global moderator permissions and administrator permissions. User permissions include capabilities such as the use of avatars, sending private messages, et cetera; global moderator permissions such as approving posts, manage topics, manage bans, et cetera and lastly administrator permissions such as altering permissions, define custom BBCodes, manage forums, et cetera. Individual users permissions should only be changed in rare occasions, the preferred method is putting users in groups and assigning the group’s permissions.',
+ 'ACP_ADMIN_ROLES_EXPLAIN' => 'Here you are able to manage the roles for administrative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.',
+ 'ACP_FORUM_ROLES_EXPLAIN' => 'Here you are able to manage the roles for forum permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.',
+ 'ACP_MOD_ROLES_EXPLAIN' => 'Here you are able to manage the roles for moderative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.',
+ 'ACP_USER_ROLES_EXPLAIN' => 'Here you are able to manage the roles for user permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.',
+ 'ACP_USERS_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can assign forum permissions to users.',
+ 'ACP_USERS_PERMISSIONS_EXPLAIN' => 'Here you can assign global permissions to users - user permissions, global moderator permissions and administrator permissions. User permissions include capabilities such as the use of avatars, sending private messages, et cetera; global moderator permissions such as approving posts, manage topics, manage bans, et cetera and lastly administrator permissions such as altering permissions, define custom BBCodes, manage forums, et cetera. To alter these settings for large numbers of users the Group permissions system is the preferred method. User’s permissions should only be changed in rare occasions, the preferred method is putting users in groups and assigning the group’s permissions.',
+ 'ACP_VIEW_ADMIN_PERMISSIONS_EXPLAIN' => 'Here you can view the effective administrative permissions assigned to the selected users/groups.',
+ 'ACP_VIEW_GLOBAL_MOD_PERMISSIONS_EXPLAIN' => 'Here you can view the global moderative permissions assigned to the selected users/groups.',
+ 'ACP_VIEW_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can view the forum permissions assigned to the selected users/groups and forums.',
+ 'ACP_VIEW_FORUM_MOD_PERMISSIONS_EXPLAIN' => 'Here you can view the forum moderator permissions assigned to the selected users/groups and forums.',
+ 'ACP_VIEW_USER_PERMISSIONS_EXPLAIN' => 'Here you can view the effective user permissions assigned to the selected users/groups.',
+
+ 'ADD_GROUPS' => 'Add groups',
+ 'ADD_PERMISSIONS' => 'Add permissions',
+ 'ADD_USERS' => 'Add users',
+ 'ADVANCED_PERMISSIONS' => 'Advanced Permissions',
+ 'ALL_GROUPS' => 'Select all groups',
+ 'ALL_NEVER' => 'All <samp>NEVER</samp>',
+ 'ALL_NO' => 'All <samp>NO</samp>',
+ 'ALL_USERS' => 'Select all users',
+ 'ALL_YES' => 'All <samp>YES</samp>',
+ 'APPLY_ALL_PERMISSIONS' => 'Apply all permissions',
+ 'APPLY_PERMISSIONS' => 'Apply permissions',
+ 'APPLY_PERMISSIONS_EXPLAIN' => 'The permissions and role defined for this item will only be applied to this item and all checked items.',
+ 'AUTH_UPDATED' => 'Permissions have been updated.',
+
+ 'COPY_PERMISSIONS_CONFIRM' => 'Are you sure you wish to carry out this operation? Please be aware that this will overwrite any existing permissions on the selected targets.',
+ 'COPY_PERMISSIONS_FORUM_FROM_EXPLAIN' => 'The source forum you want to copy permissions from.',
+ 'COPY_PERMISSIONS_FORUM_TO_EXPLAIN' => 'The destination forums you want the copied permissions applied to.',
+ 'COPY_PERMISSIONS_FROM' => 'Copy permissions from',
+ 'COPY_PERMISSIONS_TO' => 'Apply permissions to',
+
+ 'CREATE_ROLE' => 'Create role',
+ 'CREATE_ROLE_FROM' => 'Use settings from…',
+ 'CUSTOM' => 'Custom…',
+
+ 'DEFAULT' => 'Default',
+ 'DELETE_ROLE' => 'Delete role',
+ 'DELETE_ROLE_CONFIRM' => 'Are you sure you want to remove this role? Items having this role assigned will <strong>not</strong> lose their permission settings.',
+ 'DISPLAY_ROLE_ITEMS' => 'View items using this role',
+
+ 'EDIT_PERMISSIONS' => 'Edit permissions',
+ 'EDIT_ROLE' => 'Edit role',
+
+ 'GROUPS_NOT_ASSIGNED' => 'No group assigned to this role',
+
+ 'LOOK_UP_GROUP' => 'Look up usergroup',
+ 'LOOK_UP_USER' => 'Look up user',
+
+ 'MANAGE_GROUPS' => 'Manage groups',
+ 'MANAGE_USERS' => 'Manage users',
+
+ 'NO_AUTH_SETTING_FOUND' => 'Permission settings not defined.',
+ 'NO_ROLE_ASSIGNED' => 'No role assigned…',
+ 'NO_ROLE_ASSIGNED_EXPLAIN' => 'Setting to this role does not change permissions on the right. If you want to unset/remove all permissions you should use the “All <samp>NO</samp>†link.',
+ 'NO_ROLE_AVAILABLE' => 'No role available',
+ 'NO_ROLE_NAME_SPECIFIED' => 'Please give the role a name.',
+ 'NO_ROLE_SELECTED' => 'Role could not be found.',
+ 'NO_USER_GROUP_SELECTED' => 'You haven’t selected any user or group.',
+
+ 'ONLY_FORUM_DEFINED' => 'You only defined forums in your selection. Please also select at least one user or one group.',
+
+ 'PERMISSION_APPLIED_TO_ALL' => 'Permissions and role will also be applied to all checked objects',
+ 'PLUS_SUBFORUMS' => '+Subforums',
+
+ 'REMOVE_PERMISSIONS' => 'Remove permissions',
+ 'REMOVE_ROLE' => 'Remove role',
+ 'RESULTING_PERMISSION' => 'Resulting permission',
+ 'ROLE' => 'Role',
+ 'ROLE_ADD_SUCCESS' => 'Role successfully added.',
+ 'ROLE_ASSIGNED_TO' => 'Users/Groups assigned to %s',
+ 'ROLE_DELETED' => 'Role successfully removed.',
+ 'ROLE_DESCRIPTION' => 'Role description',
+
+ 'ROLE_ADMIN_FORUM' => 'Forum Admin',
+ 'ROLE_ADMIN_FULL' => 'Full Admin',
+ 'ROLE_ADMIN_STANDARD' => 'Standard Admin',
+ 'ROLE_ADMIN_USERGROUP' => 'User and Groups Admin',
+ 'ROLE_FORUM_BOT' => 'Bot Access',
+ 'ROLE_FORUM_FULL' => 'Full Access',
+ 'ROLE_FORUM_LIMITED' => 'Limited Access',
+ 'ROLE_FORUM_LIMITED_POLLS' => 'Limited Access + Polls',
+ 'ROLE_FORUM_NOACCESS' => 'No Access',
+ 'ROLE_FORUM_ONQUEUE' => 'On Moderation Queue',
+ 'ROLE_FORUM_POLLS' => 'Standard Access + Polls',
+ 'ROLE_FORUM_READONLY' => 'Read Only Access',
+ 'ROLE_FORUM_STANDARD' => 'Standard Access',
+ 'ROLE_FORUM_NEW_MEMBER' => 'Newly registered User',
+ 'ROLE_MOD_FULL' => 'Full Moderator',
+ 'ROLE_MOD_QUEUE' => 'Queue Moderator',
+ 'ROLE_MOD_SIMPLE' => 'Simple Moderator',
+ 'ROLE_MOD_STANDARD' => 'Standard Moderator',
+ 'ROLE_USER_FULL' => 'All Features',
+ 'ROLE_USER_LIMITED' => 'Limited Features',
+ 'ROLE_USER_NOAVATAR' => 'No Avatar',
+ 'ROLE_USER_NOPM' => 'No Private Messages',
+ 'ROLE_USER_STANDARD' => 'Standard Features',
+ 'ROLE_USER_NEW_MEMBER' => 'Newly registered User',
+
+
+ 'ROLE_DESCRIPTION_ADMIN_FORUM' => 'Can access the forum management and forum permission settings.',
+ 'ROLE_DESCRIPTION_ADMIN_FULL' => 'Has access to all administrative functions of this board.<br />Not recommended.',
+ 'ROLE_DESCRIPTION_ADMIN_STANDARD' => 'Has access to most administrative features but is not allowed to use server or system related tools.',
+ 'ROLE_DESCRIPTION_ADMIN_USERGROUP' => 'Can manage groups and users: Able to change permissions, settings, manage bans, and manage ranks.',
+ 'ROLE_DESCRIPTION_FORUM_BOT' => 'This role is recommended for bots and search spiders.',
+ 'ROLE_DESCRIPTION_FORUM_FULL' => 'Can use all forum features, including posting of announcements and stickies. Can also ignore the flood limit.<br />Not recommended for normal users.',
+ 'ROLE_DESCRIPTION_FORUM_LIMITED' => 'Can use some forum features, but cannot attach files or use post icons.',
+ 'ROLE_DESCRIPTION_FORUM_LIMITED_POLLS' => 'As per Limited Access but can also create polls.',
+ 'ROLE_DESCRIPTION_FORUM_NOACCESS' => 'Can neither see nor access the forum.',
+ 'ROLE_DESCRIPTION_FORUM_ONQUEUE' => 'Can use most forum features including attachments, but posts and topics need to be approved by a moderator.',
+ 'ROLE_DESCRIPTION_FORUM_POLLS' => 'Like Standard Access but can also create polls.',
+ 'ROLE_DESCRIPTION_FORUM_READONLY' => 'Can read the forum, but cannot create new topics or reply to posts.',
+ 'ROLE_DESCRIPTION_FORUM_STANDARD' => 'Can use most forum features including attachments and deleting own topics, but cannot lock own topics, and cannot create polls.',
+ 'ROLE_DESCRIPTION_FORUM_NEW_MEMBER' => 'A role for members of the special newly registered users group; contains <samp>NEVER</samp> permissions to lock features for new users.',
+ 'ROLE_DESCRIPTION_MOD_FULL' => 'Can use all moderating features, including banning.',
+ 'ROLE_DESCRIPTION_MOD_QUEUE' => 'Can use the Moderation Queue to validate and edit posts, but nothing else.',
+ 'ROLE_DESCRIPTION_MOD_SIMPLE' => 'Can only use basic topic actions. Cannot send warnings or use moderation queue.',
+ 'ROLE_DESCRIPTION_MOD_STANDARD' => 'Can use most moderating tools, but cannot ban users or change the post author.',
+ 'ROLE_DESCRIPTION_USER_FULL' => 'Can use all available forum features for users, including changing the user name or ignoring the flood limit.<br />Not recommended.',
+ 'ROLE_DESCRIPTION_USER_LIMITED' => 'Can access some of the user features. Attachments, e-mails, or instant messages are not allowed.',
+ 'ROLE_DESCRIPTION_USER_NOAVATAR' => 'Has a limited feature set and is not allowed to use the Avatar feature.',
+ 'ROLE_DESCRIPTION_USER_NOPM' => 'Has a limited feature set, and is not allowed to use Private Messages.',
+ 'ROLE_DESCRIPTION_USER_STANDARD' => 'Can access most but not all user features. Cannot change user name or ignore the flood limit, for instance.',
+ 'ROLE_DESCRIPTION_USER_NEW_MEMBER' => 'A role for members of the special newly registered users group; contains <samp>NEVER</samp> permissions to lock features for new users.',
+
+ 'ROLE_DESCRIPTION_EXPLAIN' => 'You are able to enter a short explanation of what the role is doing or for what it is meant for. The text you enter here will be displayed within the permissions screens too.',
+ 'ROLE_DESCRIPTION_LONG' => 'The role description is too long, please limit it to 4000 characters.',
+ 'ROLE_DETAILS' => 'Role details',
+ 'ROLE_EDIT_SUCCESS' => 'Role successfully edited.',
+ 'ROLE_NAME' => 'Role name',
+ 'ROLE_NAME_ALREADY_EXIST' => 'A role named <strong>%s</strong> already exist for the specified permission type.',
+ 'ROLE_NOT_ASSIGNED' => 'Role has not been assigned yet.',
+
+ 'SELECTED_FORUM_NOT_EXIST' => 'The selected forum(s) do not exist.',
+ 'SELECTED_GROUP_NOT_EXIST' => 'The selected group(s) do not exist.',
+ 'SELECTED_USER_NOT_EXIST' => 'The selected user(s) do not exist.',
+ 'SELECT_FORUM_SUBFORUM_EXPLAIN' => 'The forum you select here will include all subforums into the selection.',
+ 'SELECT_ROLE' => 'Select role…',
+ 'SELECT_TYPE' => 'Select type',
+ 'SET_PERMISSIONS' => 'Set permissions',
+ 'SET_ROLE_PERMISSIONS' => 'Set role permissions',
+ 'SET_USERS_PERMISSIONS' => 'Set users permissions',
+ 'SET_USERS_FORUM_PERMISSIONS' => 'Set users forum permissions',
+
+ 'TRACE_DEFAULT' => 'By default every permission is <samp>NO</samp> (unset). So the permission can be overwritten by other settings.',
+ 'TRACE_FOR' => 'Trace for',
+ 'TRACE_GLOBAL_SETTING' => '%s (global)',
+ 'TRACE_GROUP_NEVER_TOTAL_NEVER' => 'This group’s permission is set to <samp>NEVER</samp> like the total result so the old result is kept.',
+ 'TRACE_GROUP_NEVER_TOTAL_NEVER_LOCAL' => 'This group’s permission for this forum is set to <samp>NEVER</samp> like the total result so the old result is kept.',
+ 'TRACE_GROUP_NEVER_TOTAL_NO' => 'This group’s permission is set to <samp>NEVER</samp> which becomes the new total value because it wasn’t set yet (set to <samp>NO</samp>).',
+ 'TRACE_GROUP_NEVER_TOTAL_NO_LOCAL' => 'This group’s permission for this forum is set to <samp>NEVER</samp> which becomes the new total value because it wasn’t set yet (set to <samp>NO</samp>).',
+ 'TRACE_GROUP_NEVER_TOTAL_YES' => 'This group’s permission is set to <samp>NEVER</samp> which overwrites the total <samp>YES</samp> to a <samp>NEVER</samp> for this user.',
+ 'TRACE_GROUP_NEVER_TOTAL_YES_LOCAL' => 'This group’s permission for this forum is set to <samp>NEVER</samp> which overwrites the total <samp>YES</samp> to a <samp>NEVER</samp> for this user.',
+ 'TRACE_GROUP_NO' => 'The permission is <samp>NO</samp> for this group so the old total value is kept.',
+ 'TRACE_GROUP_NO_LOCAL' => 'The permission is <samp>NO</samp> for this group within this forum so the old total value is kept.',
+ 'TRACE_GROUP_YES_TOTAL_NEVER' => 'This group’s permission is set to <samp>YES</samp> but the total <samp>NEVER</samp> cannot be overwritten.',
+ 'TRACE_GROUP_YES_TOTAL_NEVER_LOCAL' => 'This group’s permission for this forum is set to <samp>YES</samp> but the total <samp>NEVER</samp> cannot be overwritten.',
+ 'TRACE_GROUP_YES_TOTAL_NO' => 'This group’s permission is set to <samp>YES</samp> which becomes the new total value because it wasn’t set yet (set to <samp>NO</samp>).',
+ 'TRACE_GROUP_YES_TOTAL_NO_LOCAL' => 'This group’s permission for this forum is set to <samp>YES</samp> which becomes the new total value because it wasn’t set yet (set to <samp>NO</samp>).',
+ 'TRACE_GROUP_YES_TOTAL_YES' => 'This group’s permission is set to <samp>YES</samp> and the total permission is already set to <samp>YES</samp>, so the total result is kept.',
+ 'TRACE_GROUP_YES_TOTAL_YES_LOCAL' => 'This group’s permission for this forum is set to <samp>YES</samp> and the total permission is already set to <samp>YES</samp>, so the total result is kept.',
+ 'TRACE_PERMISSION' => 'Trace permission - %s',
+ 'TRACE_RESULT' => 'Trace result',
+ 'TRACE_SETTING' => 'Trace setting',
+
+ 'TRACE_USER_GLOBAL_YES_TOTAL_YES' => 'The forum independent user permission evaluates to <samp>YES</samp> but the total permission is already set to <samp>YES</samp>, so the total result is kept. %sTrace global permission%s',
+ 'TRACE_USER_GLOBAL_YES_TOTAL_NEVER' => 'The forum independent user permission evaluates to <samp>YES</samp> which overwrites the current local result <samp>NEVER</samp>. %sTrace global permission%s',
+ 'TRACE_USER_GLOBAL_NEVER_TOTAL_KEPT' => 'The forum independent user permission evaluates to <samp>NEVER</samp> which doesn’t influence the local permission. %sTrace global permission%s',
+
+ 'TRACE_USER_FOUNDER' => 'The user is a founder, therefore admin permissions are always set to <samp>YES</samp>.',
+ 'TRACE_USER_KEPT' => 'The user’s permission is <samp>NO</samp> so the old total value is kept.',
+ 'TRACE_USER_KEPT_LOCAL' => 'The user’s permission for this forum is <samp>NO</samp> so the old total value is kept.',
+ 'TRACE_USER_NEVER_TOTAL_NEVER' => 'The user’s permission is set to <samp>NEVER</samp> and the total value is set to <samp>NEVER</samp>, so nothing is changed.',
+ 'TRACE_USER_NEVER_TOTAL_NEVER_LOCAL' => 'The user’s permission for this forum is set to <samp>NEVER</samp> and the total value is set to <samp>NEVER</samp>, so nothing is changed.',
+ 'TRACE_USER_NEVER_TOTAL_NO' => 'The user’s permission is set to <samp>NEVER</samp> which becomes the total value because it was set to NO.',
+ 'TRACE_USER_NEVER_TOTAL_NO_LOCAL' => 'The user’s permission for this forum is set to <samp>NEVER</samp> which becomes the total value because it was set to NO.',
+ 'TRACE_USER_NEVER_TOTAL_YES' => 'The user’s permission is set to <samp>NEVER</samp> and overwrites the previous <samp>YES</samp>.',
+ 'TRACE_USER_NEVER_TOTAL_YES_LOCAL' => 'The user’s permission for this forum is set to <samp>NEVER</samp> and overwrites the previous <samp>YES</samp>.',
+ 'TRACE_USER_NO_TOTAL_NO' => 'The user’s permission is <samp>NO</samp> and the total value was set to NO so it defaults to <samp>NEVER</samp>.',
+ 'TRACE_USER_NO_TOTAL_NO_LOCAL' => 'The user’s permission for this forum is <samp>NO</samp> and the total value was set to NO so it defaults to <samp>NEVER</samp>.',
+ 'TRACE_USER_YES_TOTAL_NEVER' => 'The user’s permission is set to <samp>YES</samp> but the total <samp>NEVER</samp> cannot be overwritten.',
+ 'TRACE_USER_YES_TOTAL_NEVER_LOCAL' => 'The user’s permission for this forum is set to <samp>YES</samp> but the total <samp>NEVER</samp> cannot be overwritten.',
+ 'TRACE_USER_YES_TOTAL_NO' => 'The user’s permission is set to <samp>YES</samp> which becomes the total value because it was set to <samp>NO</samp>.',
+ 'TRACE_USER_YES_TOTAL_NO_LOCAL' => 'The user’s permission for this forum is set to <samp>YES</samp> which becomes the total value because it was set to <samp>NO</samp>.',
+ 'TRACE_USER_YES_TOTAL_YES' => 'The user’s permission is set to <samp>YES</samp> and the total value is set to <samp>YES</samp>, so nothing is changed.',
+ 'TRACE_USER_YES_TOTAL_YES_LOCAL' => 'The user’s permission for this forum is set to <samp>YES</samp> and the total value is set to <samp>YES</samp>, so nothing is changed.',
+ 'TRACE_WHO' => 'Who',
+ 'TRACE_TOTAL' => 'Total',
+
+ 'USERS_NOT_ASSIGNED' => 'No user assigned to this role',
+ 'USER_IS_MEMBER_OF_DEFAULT' => 'is a member of the following pre-defined groups',
+ 'USER_IS_MEMBER_OF_CUSTOM' => 'is a member of the following user defined groups',
+
+ 'VIEW_ASSIGNED_ITEMS' => 'View assigned items',
+ 'VIEW_LOCAL_PERMS' => 'Local permissions',
+ 'VIEW_GLOBAL_PERMS' => 'Global permissions',
+ 'VIEW_PERMISSIONS' => 'View permissions',
+
+ 'WRONG_PERMISSION_TYPE' => 'Wrong permission type selected.',
+ 'WRONG_PERMISSION_SETTING_FORMAT' => 'The permission settings are in a wrong format, phpBB is not able to process them correctly.',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php
new file mode 100644
index 0000000000..945a675861
--- /dev/null
+++ b/phpBB/language/en/acp/permissions_phpbb.php
@@ -0,0 +1,241 @@
+<?php
+/**
+* acp_permissions_phpbb (phpBB Permission Set) [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+/**
+* MODDERS PLEASE NOTE
+*
+* You are able to put your permission sets into a separate file too by
+* prefixing the new file with permissions_ and putting it into the acp
+* language folder.
+*
+* An example of how the file could look like:
+*
+* <code>
+*
+* if (empty($lang) || !is_array($lang))
+* {
+* $lang = array();
+* }
+*
+* // Adding new category
+* $lang['permission_cat']['bugs'] = 'Bugs';
+*
+* // Adding new permission set
+* $lang['permission_type']['bug_'] = 'Bug Permissions';
+*
+* // Adding the permissions
+* $lang = array_merge($lang, array(
+* 'acl_bug_view' => array('lang' => 'Can view bug reports', 'cat' => 'bugs'),
+* 'acl_bug_post' => array('lang' => 'Can post bugs', 'cat' => 'post'), // Using a phpBB category here
+* ));
+*
+* </code>
+*/
+
+// Define categories and permission types
+$lang = array_merge($lang, array(
+ 'permission_cat' => array(
+ 'actions' => 'Actions',
+ 'content' => 'Content',
+ 'forums' => 'Forums',
+ 'misc' => 'Misc',
+ 'permissions' => 'Permissions',
+ 'pm' => 'Private messages',
+ 'polls' => 'Polls',
+ 'post' => 'Post',
+ 'post_actions' => 'Post actions',
+ 'posting' => 'Posting',
+ 'profile' => 'Profile',
+ 'settings' => 'Settings',
+ 'topic_actions' => 'Topic actions',
+ 'user_group' => 'Users &amp; Groups',
+ ),
+
+ // With defining 'global' here we are able to specify what is printed out if the permission is within the global scope.
+ 'permission_type' => array(
+ 'u_' => 'User permissions',
+ 'a_' => 'Admin permissions',
+ 'm_' => 'Moderator permissions',
+ 'f_' => 'Forum permissions',
+ 'global' => array(
+ 'm_' => 'Global moderator permissions',
+ ),
+ ),
+));
+
+// User Permissions
+$lang = array_merge($lang, array(
+ 'acl_u_viewprofile' => array('lang' => 'Can view profiles, memberlist and online list', 'cat' => 'profile'),
+ 'acl_u_chgname' => array('lang' => 'Can change username', 'cat' => 'profile'),
+ 'acl_u_chgpasswd' => array('lang' => 'Can change password', 'cat' => 'profile'),
+ 'acl_u_chgemail' => array('lang' => 'Can change e-mail address', 'cat' => 'profile'),
+ 'acl_u_chgavatar' => array('lang' => 'Can change avatar', 'cat' => 'profile'),
+ 'acl_u_chggrp' => array('lang' => 'Can change default usergroup', 'cat' => 'profile'),
+
+ 'acl_u_attach' => array('lang' => 'Can attach files', 'cat' => 'post'),
+ 'acl_u_download' => array('lang' => 'Can download files', 'cat' => 'post'),
+ 'acl_u_savedrafts' => array('lang' => 'Can save drafts', 'cat' => 'post'),
+ 'acl_u_chgcensors' => array('lang' => 'Can disable word censors', 'cat' => 'post'),
+ 'acl_u_sig' => array('lang' => 'Can use signature', 'cat' => 'post'),
+
+ 'acl_u_sendpm' => array('lang' => 'Can send private messages', 'cat' => 'pm'),
+ 'acl_u_masspm' => array('lang' => 'Can send messages to multiple users', 'cat' => 'pm'),
+ 'acl_u_masspm_group'=> array('lang' => 'Can send messages to groups', 'cat' => 'pm'),
+ 'acl_u_readpm' => array('lang' => 'Can read private messages', 'cat' => 'pm'),
+ 'acl_u_pm_edit' => array('lang' => 'Can edit own private messages', 'cat' => 'pm'),
+ 'acl_u_pm_delete' => array('lang' => 'Can remove private messages from own folder', 'cat' => 'pm'),
+ 'acl_u_pm_forward' => array('lang' => 'Can forward private messages', 'cat' => 'pm'),
+ 'acl_u_pm_emailpm' => array('lang' => 'Can e-mail private messages', 'cat' => 'pm'),
+ 'acl_u_pm_printpm' => array('lang' => 'Can print private messages', 'cat' => 'pm'),
+ 'acl_u_pm_attach' => array('lang' => 'Can attach files in private messages', 'cat' => 'pm'),
+ 'acl_u_pm_download' => array('lang' => 'Can download files in private messages', 'cat' => 'pm'),
+ 'acl_u_pm_bbcode' => array('lang' => 'Can use BBCode in private messages', 'cat' => 'pm'),
+ 'acl_u_pm_smilies' => array('lang' => 'Can use smilies in private messages', 'cat' => 'pm'),
+ 'acl_u_pm_img' => array('lang' => 'Can use [img] BBCode tag in private messages', 'cat' => 'pm'),
+ 'acl_u_pm_flash' => array('lang' => 'Can use [flash] BBCode tag in private messages', 'cat' => 'pm'),
+
+ 'acl_u_sendemail' => array('lang' => 'Can send e-mails', 'cat' => 'misc'),
+ 'acl_u_sendim' => array('lang' => 'Can send instant messages', 'cat' => 'misc'),
+ 'acl_u_ignoreflood' => array('lang' => 'Can ignore flood limit', 'cat' => 'misc'),
+ 'acl_u_hideonline' => array('lang' => 'Can hide online status', 'cat' => 'misc'),
+ 'acl_u_viewonline' => array('lang' => 'Can view hidden online users', 'cat' => 'misc'),
+ 'acl_u_search' => array('lang' => 'Can search board', 'cat' => 'misc'),
+));
+
+// Forum Permissions
+$lang = array_merge($lang, array(
+ 'acl_f_list' => array('lang' => 'Can see forum', 'cat' => 'post'),
+ 'acl_f_read' => array('lang' => 'Can read forum', 'cat' => 'post'),
+ 'acl_f_post' => array('lang' => 'Can start new topics', 'cat' => 'post'),
+ 'acl_f_reply' => array('lang' => 'Can reply to topics', 'cat' => 'post'),
+ 'acl_f_icons' => array('lang' => 'Can use topic/post icons', 'cat' => 'post'),
+ 'acl_f_announce' => array('lang' => 'Can post announcements', 'cat' => 'post'),
+ 'acl_f_sticky' => array('lang' => 'Can post stickies', 'cat' => 'post'),
+
+ 'acl_f_poll' => array('lang' => 'Can create polls', 'cat' => 'polls'),
+ 'acl_f_vote' => array('lang' => 'Can vote in polls', 'cat' => 'polls'),
+ 'acl_f_votechg' => array('lang' => 'Can change existing vote', 'cat' => 'polls'),
+
+ 'acl_f_attach' => array('lang' => 'Can attach files', 'cat' => 'content'),
+ 'acl_f_download' => array('lang' => 'Can download files', 'cat' => 'content'),
+ 'acl_f_sigs' => array('lang' => 'Can use signatures', 'cat' => 'content'),
+ 'acl_f_bbcode' => array('lang' => 'Can use BBCode', 'cat' => 'content'),
+ 'acl_f_smilies' => array('lang' => 'Can use smilies', 'cat' => 'content'),
+ 'acl_f_img' => array('lang' => 'Can use [img] BBCode tag', 'cat' => 'content'),
+ 'acl_f_flash' => array('lang' => 'Can use [flash] BBCode tag', 'cat' => 'content'),
+
+ 'acl_f_edit' => array('lang' => 'Can edit own posts', 'cat' => 'actions'),
+ 'acl_f_delete' => array('lang' => 'Can delete own posts', 'cat' => 'actions'),
+ 'acl_f_user_lock' => array('lang' => 'Can lock own topics', 'cat' => 'actions'),
+ 'acl_f_bump' => array('lang' => 'Can bump topics', 'cat' => 'actions'),
+ 'acl_f_report' => array('lang' => 'Can report posts', 'cat' => 'actions'),
+ 'acl_f_subscribe' => array('lang' => 'Can subscribe forum', 'cat' => 'actions'),
+ 'acl_f_print' => array('lang' => 'Can print topics', 'cat' => 'actions'),
+ 'acl_f_email' => array('lang' => 'Can e-mail topics', 'cat' => 'actions'),
+
+ 'acl_f_search' => array('lang' => 'Can search the forum', 'cat' => 'misc'),
+ 'acl_f_ignoreflood' => array('lang' => 'Can ignore flood limit', 'cat' => 'misc'),
+ 'acl_f_postcount' => array('lang' => 'Increment post counter<br /><em>Please note that this setting only affects new posts.</em>', 'cat' => 'misc'),
+ 'acl_f_noapprove' => array('lang' => 'Can post without approval', 'cat' => 'misc'),
+));
+
+// Moderator Permissions
+$lang = array_merge($lang, array(
+ 'acl_m_edit' => array('lang' => 'Can edit posts', 'cat' => 'post_actions'),
+ 'acl_m_delete' => array('lang' => 'Can delete posts', 'cat' => 'post_actions'),
+ 'acl_m_approve' => array('lang' => 'Can approve posts', 'cat' => 'post_actions'),
+ 'acl_m_report' => array('lang' => 'Can close and delete reports', 'cat' => 'post_actions'),
+ 'acl_m_chgposter' => array('lang' => 'Can change post author', 'cat' => 'post_actions'),
+
+ 'acl_m_move' => array('lang' => 'Can move topics', 'cat' => 'topic_actions'),
+ 'acl_m_lock' => array('lang' => 'Can lock topics', 'cat' => 'topic_actions'),
+ 'acl_m_split' => array('lang' => 'Can split topics', 'cat' => 'topic_actions'),
+ 'acl_m_merge' => array('lang' => 'Can merge topics', 'cat' => 'topic_actions'),
+
+ 'acl_m_info' => array('lang' => 'Can view post details', 'cat' => 'misc'),
+ 'acl_m_warn' => array('lang' => 'Can issue warnings<br /><em>This setting is only assigned globally. It is not forum based.</em>', 'cat' => 'misc'), // This moderator setting is only global (and not local)
+ 'acl_m_ban' => array('lang' => 'Can manage bans<br /><em>This setting is only assigned globally. It is not forum based.</em>', 'cat' => 'misc'), // This moderator setting is only global (and not local)
+));
+
+// Admin Permissions
+$lang = array_merge($lang, array(
+ 'acl_a_board' => array('lang' => 'Can alter board settings/check for updates', 'cat' => 'settings'),
+ 'acl_a_server' => array('lang' => 'Can alter server/communication settings', 'cat' => 'settings'),
+ 'acl_a_jabber' => array('lang' => 'Can alter Jabber settings', 'cat' => 'settings'),
+ 'acl_a_phpinfo' => array('lang' => 'Can view php settings', 'cat' => 'settings'),
+
+ 'acl_a_forum' => array('lang' => 'Can manage forums', 'cat' => 'forums'),
+ 'acl_a_forumadd' => array('lang' => 'Can add new forums', 'cat' => 'forums'),
+ 'acl_a_forumdel' => array('lang' => 'Can delete forums', 'cat' => 'forums'),
+ 'acl_a_prune' => array('lang' => 'Can prune forums', 'cat' => 'forums'),
+
+ 'acl_a_icons' => array('lang' => 'Can alter topic/post icons and smilies', 'cat' => 'posting'),
+ 'acl_a_words' => array('lang' => 'Can alter word censors', 'cat' => 'posting'),
+ 'acl_a_bbcode' => array('lang' => 'Can define BBCode tags', 'cat' => 'posting'),
+ 'acl_a_attach' => array('lang' => 'Can alter attachment related settings', 'cat' => 'posting'),
+
+ 'acl_a_user' => array('lang' => 'Can manage users<br /><em>This also includes seeing the users browser agent within the viewonline list.</em>', 'cat' => 'user_group'),
+ 'acl_a_userdel' => array('lang' => 'Can delete/prune users', 'cat' => 'user_group'),
+ 'acl_a_group' => array('lang' => 'Can manage groups', 'cat' => 'user_group'),
+ 'acl_a_groupadd' => array('lang' => 'Can add new groups', 'cat' => 'user_group'),
+ 'acl_a_groupdel' => array('lang' => 'Can delete groups', 'cat' => 'user_group'),
+ 'acl_a_ranks' => array('lang' => 'Can manage ranks', 'cat' => 'user_group'),
+ 'acl_a_profile' => array('lang' => 'Can manage custom profile fields', 'cat' => 'user_group'),
+ 'acl_a_names' => array('lang' => 'Can manage disallowed names', 'cat' => 'user_group'),
+ 'acl_a_ban' => array('lang' => 'Can manage bans', 'cat' => 'user_group'),
+
+ 'acl_a_viewauth' => array('lang' => 'Can view permission masks', 'cat' => 'permissions'),
+ 'acl_a_authgroups' => array('lang' => 'Can alter permissions for individual groups', 'cat' => 'permissions'),
+ 'acl_a_authusers' => array('lang' => 'Can alter permissions for individual users', 'cat' => 'permissions'),
+ 'acl_a_fauth' => array('lang' => 'Can alter forum permission class', 'cat' => 'permissions'),
+ 'acl_a_mauth' => array('lang' => 'Can alter moderator permission class', 'cat' => 'permissions'),
+ 'acl_a_aauth' => array('lang' => 'Can alter admin permission class', 'cat' => 'permissions'),
+ 'acl_a_uauth' => array('lang' => 'Can alter user permission class', 'cat' => 'permissions'),
+ 'acl_a_roles' => array('lang' => 'Can manage roles', 'cat' => 'permissions'),
+ 'acl_a_switchperm' => array('lang' => 'Can use others permissions', 'cat' => 'permissions'),
+
+ 'acl_a_styles' => array('lang' => 'Can manage styles', 'cat' => 'misc'),
+ 'acl_a_viewlogs' => array('lang' => 'Can view logs', 'cat' => 'misc'),
+ 'acl_a_clearlogs' => array('lang' => 'Can clear logs', 'cat' => 'misc'),
+ 'acl_a_modules' => array('lang' => 'Can manage modules', 'cat' => 'misc'),
+ 'acl_a_language' => array('lang' => 'Can manage language packs', 'cat' => 'misc'),
+ 'acl_a_email' => array('lang' => 'Can send mass e-mail', 'cat' => 'misc'),
+ 'acl_a_bots' => array('lang' => 'Can manage bots', 'cat' => 'misc'),
+ 'acl_a_reasons' => array('lang' => 'Can manage report/denial reasons', 'cat' => 'misc'),
+ 'acl_a_backup' => array('lang' => 'Can backup/restore database', 'cat' => 'misc'),
+ 'acl_a_search' => array('lang' => 'Can manage search backends and settings', 'cat' => 'misc'),
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php
new file mode 100644
index 0000000000..531e07f7ef
--- /dev/null
+++ b/phpBB/language/en/acp/posting.php
@@ -0,0 +1,276 @@
+<?php
+/**
+*
+* acp_posting [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+// BBCodes
+// Note to translators: you can translate everything but what's between { and }
+$lang = array_merge($lang, array(
+ 'ACP_BBCODES_EXPLAIN' => 'BBCode is a special implementation of HTML offering greater control over what and how something is displayed. From this page you can add, remove and edit custom BBCodes.',
+ 'ADD_BBCODE' => 'Add a new BBCode',
+
+ 'BBCODE_ADDED' => 'BBCode added successfully.',
+ 'BBCODE_EDITED' => 'BBCode edited successfully.',
+ 'BBCODE_NOT_EXIST' => 'The BBCode you selected does not exist.',
+ 'BBCODE_HELPLINE' => 'Help line',
+ 'BBCODE_HELPLINE_EXPLAIN' => 'This field contains the mouse over text of the BBCode.',
+ 'BBCODE_HELPLINE_TEXT' => 'Help line text',
+ 'BBCODE_HELPLINE_TOO_LONG' => 'The help line you entered is too long.',
+
+ 'BBCODE_INVALID_TAG_NAME' => 'The BBCode tag name that you selected already exists.',
+ 'BBCODE_INVALID' => 'Your BBCode is constructed in an invalid form.',
+ 'BBCODE_OPEN_ENDED_TAG' => 'Your custom BBCode must contain both an opening and a closing tag.',
+ 'BBCODE_TAG' => 'Tag',
+ 'BBCODE_TAG_TOO_LONG' => 'The tag name you selected is too long.',
+ 'BBCODE_TAG_DEF_TOO_LONG' => 'The tag definition that you have entered is too long, please shorten your tag definition.',
+ 'BBCODE_USAGE' => 'BBCode usage',
+ 'BBCODE_USAGE_EXAMPLE' => '[highlight={COLOR}]{TEXT}[/highlight]<br /><br />[font={SIMPLETEXT1}]{SIMPLETEXT2}[/font]',
+ 'BBCODE_USAGE_EXPLAIN' => 'Here you define how to use the BBCode. Replace any variable input by the corresponding token (%ssee below%s).',
+
+ 'EXAMPLE' => 'Example:',
+ 'EXAMPLES' => 'Examples:',
+
+ 'HTML_REPLACEMENT' => 'HTML replacement',
+ 'HTML_REPLACEMENT_EXAMPLE' => '&lt;span style="background-color: {COLOR};"&gt;{TEXT}&lt;/span&gt;<br /><br />&lt;span style="font-family: {SIMPLETEXT1};"&gt;{SIMPLETEXT2}&lt;/span&gt;',
+ 'HTML_REPLACEMENT_EXPLAIN' => 'Here you define the default HTML replacement. Do not forget to put back tokens you used above!',
+
+ 'TOKEN' => 'Token',
+ 'TOKENS' => 'Tokens',
+ 'TOKENS_EXPLAIN' => 'Tokens are placeholders for user input. The input will be validated only if it matches the corresponding definition. If needed, you can number them by adding a number as the last character between the braces, e.g. {TEXT1}, {TEXT2}.<br /><br />Within the HTML replacement you can also use any language string present in your language/ directory like this: {L_<em>&lt;STRINGNAME&gt;</em>} where <em>&lt;STRINGNAME&gt;</em> is the name of the translated string you want to add. For example, {L_WROTE} will be displayed as “wrote†or its translation according to user’s locale.<br /><br /><strong>Please note that only tokens listed below are able to be used within custom BBCodes.</strong>',
+ 'TOKEN_DEFINITION' => 'What can it be?',
+ 'TOO_MANY_BBCODES' => 'You cannot create any more BBCodes. Please remove one or more BBCodes then try again.',
+
+ 'tokens' => array(
+ 'TEXT' => 'Any text, including foreign characters, numbers, etc… You should not use this token in HTML tags. Instead try to use IDENTIFIER or SIMPLETEXT.',
+ 'SIMPLETEXT' => 'Characters from the latin alphabet (A-Z), numbers, spaces, commas, dots, minus, plus, hyphen and underscore',
+ 'IDENTIFIER' => 'Characters from the latin alphabet (A-Z), numbers, hyphen and underscore',
+ 'NUMBER' => 'Any series of digits',
+ 'EMAIL' => 'A valid e-mail address',
+ 'URL' => 'A valid URL using any protocol (http, ftp, etc… cannot be used for javascript exploits). If none is given, “http://†is prefixed to the string.',
+ 'LOCAL_URL' => 'A local URL. The URL must be relative to the topic page and cannot contain a server name or protocol.',
+ 'COLOR' => 'A HTML colour, can be either in the numeric form <samp>#FF1234</samp> or a <a href="http://www.w3.org/TR/CSS21/syndata.html#value-def-color">CSS colour keyword</a> such as <samp>fuchsia</samp> or <samp>InactiveBorder</samp>'
+ )
+));
+
+// Smilies and topic icons
+$lang = array_merge($lang, array(
+ 'ACP_ICONS_EXPLAIN' => 'From this page you can add, remove and edit the icons users may add to their topics or posts. These icons are generally displayed next to topic titles on the forum listing, or the post subjects in topic listings. You can also install and create new packages of icons.',
+ 'ACP_SMILIES_EXPLAIN' => 'Smilies or emoticons are typically small, sometimes animated images used to convey an emotion or feeling. From this page you can add, remove and edit the emoticons users can use in their posts and private messages. You can also install and create new packages of smilies.',
+ 'ADD_SMILIES' => 'Add multiple smilies',
+ 'ADD_SMILEY_CODE' => 'Add additional smiley code',
+ 'ADD_ICONS' => 'Add multiple icons',
+ 'AFTER_ICONS' => 'After %s',
+ 'AFTER_SMILIES' => 'After %s',
+
+ 'CODE' => 'Code',
+ 'CURRENT_ICONS' => 'Current icons',
+ 'CURRENT_ICONS_EXPLAIN' => 'Choose what to do with the currently installed icons.',
+ 'CURRENT_SMILIES' => 'Current smilies',
+ 'CURRENT_SMILIES_EXPLAIN' => 'Choose what to do with the currently installed smilies.',
+
+ 'DISPLAY_ON_POSTING' => 'Display on posting page',
+ 'DISPLAY_POSTING' => 'On posting page',
+ 'DISPLAY_POSTING_NO' => 'Not on posting page',
+
+
+
+ 'EDIT_ICONS' => 'Edit icons',
+ 'EDIT_SMILIES' => 'Edit smilies',
+ 'EMOTION' => 'Emotion',
+ 'EXPORT_ICONS' => 'Export and download icons.pak',
+ 'EXPORT_ICONS_EXPLAIN' => '%sOn clicking this link, the configuration for your installed icons will be packaged into <samp>icons.pak</samp> which once downloaded can be used to create a <samp>.zip</samp> or <samp>.tgz</samp> file containing all of your icons plus this <samp>icons.pak</samp> configuration file%s.',
+ 'EXPORT_SMILIES' => 'Export and download smilies.pak',
+ 'EXPORT_SMILIES_EXPLAIN' => '%sOn clicking this link, the configuration for your installed smilies will be packaged into <samp>smilies.pak</samp> which once downloaded can be used to create a <samp>.zip</samp> or <samp>.tgz</samp> file containing all of your smilies plus this <samp>smilies.pak</samp> configuration file%s.',
+
+ 'FIRST' => 'First',
+
+ 'ICONS_ADD' => 'Add a new icon',
+ 'ICONS_NONE_ADDED' => 'No icons were added.',
+ 'ICONS_ONE_ADDED' => 'The icon has been added successfully.',
+ 'ICONS_ADDED' => 'The icons have been added successfully.',
+ 'ICONS_CONFIG' => 'Icon configuration',
+ 'ICONS_DELETED' => 'The icon has been removed successfully.',
+ 'ICONS_EDIT' => 'Edit icon',
+ 'ICONS_ONE_EDITED' => 'The icon has been updated successfully.',
+ 'ICONS_NONE_EDITED' => 'No icons were updated.',
+ 'ICONS_EDITED' => 'The icons have been updated successfully.',
+ 'ICONS_HEIGHT' => 'Icon height',
+ 'ICONS_IMAGE' => 'Icon image',
+ 'ICONS_IMPORTED' => 'The icons pack has been installed successfully.',
+ 'ICONS_IMPORT_SUCCESS' => 'The icons pack was imported successfully.',
+ 'ICONS_LOCATION' => 'Icon location',
+ 'ICONS_NOT_DISPLAYED' => 'The following icons are not displayed on the posting page',
+ 'ICONS_ORDER' => 'Icon order',
+ 'ICONS_URL' => 'Icon image file',
+ 'ICONS_WIDTH' => 'Icon width',
+ 'IMPORT_ICONS' => 'Install icons package',
+ 'IMPORT_SMILIES' => 'Install smilies package',
+
+ 'KEEP_ALL' => 'Keep all',
+
+ 'MASS_ADD_SMILIES' => 'Add multiple smilies',
+
+ 'NO_ICONS_ADD' => 'There are no icons available for adding.',
+ 'NO_ICONS_EDIT' => 'There are no icons available for modifying.',
+ 'NO_ICONS_EXPORT' => 'You have no icons with which to create a package.',
+ 'NO_ICONS_PAK' => 'No icon packages found.',
+ 'NO_SMILIES_ADD' => 'There are no smilies available for adding.',
+ 'NO_SMILIES_EDIT' => 'There are no smilies available for modifying.',
+ 'NO_SMILIES_EXPORT' => 'You have no smilies with which to create a package.',
+ 'NO_SMILIES_PAK' => 'No smiley packages found.',
+
+ 'PAK_FILE_NOT_READABLE' => 'Could not read <samp>.pak</samp> file.',
+
+ 'REPLACE_MATCHES' => 'Replace matches',
+
+ 'SELECT_PACKAGE' => 'Select a package file',
+ 'SMILIES_ADD' => 'Add a new smiley',
+ 'SMILIES_NONE_ADDED' => 'No smilies were added.',
+ 'SMILIES_ONE_ADDED' => 'The smiley has been added successfully.',
+ 'SMILIES_ADDED' => 'The smilies have been added successfully.',
+ 'SMILIES_CODE' => 'Smiley code',
+ 'SMILIES_CONFIG' => 'Smiley configuration',
+ 'SMILIES_DELETED' => 'The smiley has been removed successfully.',
+ 'SMILIES_EDIT' => 'Edit smiley',
+ 'SMILIE_NO_CODE' => 'The smilie “%s†was ignored, as there was no code entered.',
+ 'SMILIE_NO_EMOTION' => 'The smilie “%s†was ignored, as there was no emotion entered.',
+ 'SMILIES_NONE_EDITED' => 'No smilies were updated.',
+ 'SMILIES_ONE_EDITED' => 'The smiley has been updated successfully.',
+ 'SMILIES_EDITED' => 'The smilies have been updated successfully.',
+ 'SMILIES_EMOTION' => 'Emotion',
+ 'SMILIES_HEIGHT' => 'Smiley height',
+ 'SMILIES_IMAGE' => 'Smiley image',
+ 'SMILIES_IMPORTED' => 'The smilies pack has been installed successfully.',
+ 'SMILIES_IMPORT_SUCCESS' => 'The smilies pack was imported successfully.',
+ 'SMILIES_LOCATION' => 'Smiley location',
+ 'SMILIES_NOT_DISPLAYED' => 'The following smilies are not displayed on the posting page',
+ 'SMILIES_ORDER' => 'Smiley order',
+ 'SMILIES_URL' => 'Smiley image file',
+ 'SMILIES_WIDTH' => 'Smiley width',
+
+ 'TOO_MANY_SMILIES' => 'Limit of %d smilies reached.',
+
+ 'WRONG_PAK_TYPE' => 'The specified package does not contain the appropriate data.',
+));
+
+// Word censors
+$lang = array_merge($lang, array(
+ 'ACP_WORDS_EXPLAIN' => 'From this control panel you can add, edit, and remove words that will be automatically censored on your forums. People are still allowed to register with usernames containing these words. Wildcards (*) are accepted in the word field, e.g. *test* will match detestable, test* would match testing, *test would match detest.',
+ 'ADD_WORD' => 'Add new word',
+
+ 'EDIT_WORD' => 'Edit word censor',
+ 'ENTER_WORD' => 'You must enter a word and its replacement.',
+
+ 'NO_WORD' => 'No word selected for editing.',
+
+ 'REPLACEMENT' => 'Replacement',
+
+ 'UPDATE_WORD' => 'Update word censor',
+
+ 'WORD' => 'Word',
+ 'WORD_ADDED' => 'The word censor has been successfully added.',
+ 'WORD_REMOVED' => 'The selected word censor has been successfully removed.',
+ 'WORD_UPDATED' => 'The selected word censor has been successfully updated.',
+));
+
+// Ranks
+$lang = array_merge($lang, array(
+ 'ACP_RANKS_EXPLAIN' => 'Using this form you can add, edit, view and delete ranks. You can also create special ranks which can be applied to a user via the user management facility.',
+ 'ADD_RANK' => 'Add new rank',
+
+ 'MUST_SELECT_RANK' => 'You must select a rank.',
+
+ 'NO_ASSIGNED_RANK' => 'No special rank assigned.',
+ 'NO_RANK_TITLE' => 'You haven’t specified a title for the rank.',
+ 'NO_UPDATE_RANKS' => 'The rank was successfully deleted. However user accounts using this rank were not updated. You will need to manually reset the rank on these accounts.',
+
+ 'RANK_ADDED' => 'The rank was successfully added.',
+ 'RANK_IMAGE' => 'Rank image',
+ 'RANK_IMAGE_EXPLAIN' => 'Use this to define a small image associated with the rank. The path is relative to the root phpBB directory.',
+ 'RANK_IMAGE_IN_USE' => '(In use)',
+ 'RANK_MINIMUM' => 'Minimum posts',
+ 'RANK_REMOVED' => 'The rank was successfully deleted.',
+ 'RANK_SPECIAL' => 'Set as special rank',
+ 'RANK_TITLE' => 'Rank title',
+ 'RANK_UPDATED' => 'The rank was successfully updated.',
+));
+
+// Disallow Usernames
+$lang = array_merge($lang, array(
+ 'ACP_DISALLOW_EXPLAIN' => 'Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of *. Please note that you will not be allowed to specify any username that has already been registered, you must first delete that name then disallow it.',
+ 'ADD_DISALLOW_EXPLAIN' => 'You can disallow a username using the wildcard character * to match any character.',
+ 'ADD_DISALLOW_TITLE' => 'Add a disallowed username',
+
+ 'DELETE_DISALLOW_EXPLAIN' => 'You can remove a disallowed username by selecting the username from this list and clicking submit.',
+ 'DELETE_DISALLOW_TITLE' => 'Remove a disallowed username',
+ 'DISALLOWED_ALREADY' => 'The name you entered could not be disallowed. It either already exists in the list, exists in the word censor list, or a matching username is present.',
+ 'DISALLOWED_DELETED' => 'The disallowed username has been successfully removed.',
+ 'DISALLOW_SUCCESSFUL' => 'The disallowed username has been successfully added.',
+
+ 'NO_DISALLOWED' => 'No disallowed usernames',
+ 'NO_USERNAME_SPECIFIED' => 'You haven’t selected or entered a username to operate with.',
+));
+
+// Reasons
+$lang = array_merge($lang, array(
+ 'ACP_REASONS_EXPLAIN' => 'Here you can manage the reasons used in reports and denial messages when disapproving posts. There is one default reason (marked with a *) you are not able to remove, this reason is normally used for custom messages if no reason fits.',
+ 'ADD_NEW_REASON' => 'Add new reason',
+ 'AVAILABLE_TITLES' => 'Available localised reason titles',
+
+ 'IS_NOT_TRANSLATED' => 'Reason has <strong>not</strong> been localised.',
+ 'IS_NOT_TRANSLATED_EXPLAIN' => 'Reason has <strong>not</strong> been localised. If you want to provide the localised form, specify the correct key from the language files report reasons section.',
+ 'IS_TRANSLATED' => 'Reason has been localised.',
+ 'IS_TRANSLATED_EXPLAIN' => 'Reason has been localised. If the title you enter here is specified within the language files report reasons section, the localised form of the title and description will be used.',
+
+ 'NO_REASON' => 'Reason could not be found.',
+ 'NO_REASON_INFO' => 'You have to specify a title and a description for this reason.',
+ 'NO_REMOVE_DEFAULT_REASON' => 'You are not able to remove the default reason “Otherâ€.',
+
+ 'REASON_ADD' => 'Add report/denial reason',
+ 'REASON_ADDED' => 'Report/denial reason successfully added.',
+ 'REASON_ALREADY_EXIST' => 'A reason with this title already exist, please enter another title for this reason.',
+ 'REASON_DESCRIPTION' => 'Reason description',
+ 'REASON_DESC_TRANSLATED' => 'Displayed reason description',
+ 'REASON_EDIT' => 'Edit report/denial reason',
+ 'REASON_EDIT_EXPLAIN' => 'Here you are able to add or edit a reason. If the reason is translated the localised version is used instead of the description entered here.',
+ 'REASON_REMOVED' => 'Report/denial reason successfully removed.',
+ 'REASON_TITLE' => 'Reason title',
+ 'REASON_TITLE_TRANSLATED' => 'Displayed reason title',
+ 'REASON_UPDATED' => 'Report/denial reason successfully updated.',
+
+ 'USED_IN_REPORTS' => 'Used in reports',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php
new file mode 100644
index 0000000000..a25dcd174b
--- /dev/null
+++ b/phpBB/language/en/acp/profile.php
@@ -0,0 +1,156 @@
+<?php
+/**
+*
+* acp_profile [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+// Custom profile fields
+$lang = array_merge($lang, array(
+ 'ADDED_PROFILE_FIELD' => 'Successfully added custom profile field.',
+ 'ALPHA_ONLY' => 'Alphanumeric only',
+ 'ALPHA_SPACERS' => 'Alphanumeric and spacers',
+ 'ALWAYS_TODAY' => 'Always the current date',
+
+ 'BOOL_ENTRIES_EXPLAIN' => 'Enter your options now',
+ 'BOOL_TYPE_EXPLAIN' => 'Define the type, either a checkbox or radio buttons. A checkbox will only be displayed if it is checked for a given user. In that case the <strong>second</strong> language option will be used. Radio buttons will display regardless of their value.',
+
+ 'CHANGED_PROFILE_FIELD' => 'Successfully changed profile field.',
+ 'CHARS_ANY' => 'Any character',
+ 'CHECKBOX' => 'Checkbox',
+ 'COLUMNS' => 'Columns',
+ 'CP_LANG_DEFAULT_VALUE' => 'Default value',
+ 'CP_LANG_EXPLAIN' => 'Field description',
+ 'CP_LANG_EXPLAIN_EXPLAIN' => 'The explanation for this field presented to the user.',
+ 'CP_LANG_NAME' => 'Field name/title presented to the user',
+ 'CP_LANG_OPTIONS' => 'Options',
+ 'CREATE_NEW_FIELD' => 'Create new field',
+ 'CUSTOM_FIELDS_NOT_TRANSLATED' => 'At least one custom profile field has not yet been translated. Please enter the required information by clicking on the “Translate†link.',
+
+ 'DEFAULT_ISO_LANGUAGE' => 'Default language [%s]',
+ 'DEFAULT_LANGUAGE_NOT_FILLED' => 'The language entries for the default language are not filled for this profile field.',
+ 'DEFAULT_VALUE' => 'Default value',
+ 'DELETE_PROFILE_FIELD' => 'Remove profile field',
+ 'DELETE_PROFILE_FIELD_CONFIRM' => 'Are you sure you want to delete this profile field?',
+ 'DISPLAY_AT_PROFILE' => 'Display in user control panel',
+ 'DISPLAY_AT_PROFILE_EXPLAIN' => 'The user is able to change this profile field within the user control panel.',
+ 'DISPLAY_AT_REGISTER' => 'Display on registration screen',
+ 'DISPLAY_AT_REGISTER_EXPLAIN' => 'If this option is enabled, the field will be displayed on registration.',
+ 'DISPLAY_ON_VT' => 'Display on viewtopic screen',
+ 'DISPLAY_ON_VT_EXPLAIN' => 'If this option is enabled, the field will be displayed in the mini-profile on the topic screen.',
+ 'DISPLAY_PROFILE_FIELD' => 'Publicly display profile field',
+ 'DISPLAY_PROFILE_FIELD_EXPLAIN' => 'The profile field will be shown in all locations allowed within the load settings. Setting this to “no†will hide the field from topic pages, profiles and the memberlist.',
+ 'DROPDOWN_ENTRIES_EXPLAIN' => 'Enter your options now, every option in one line.',
+
+ 'EDIT_DROPDOWN_LANG_EXPLAIN' => 'Please note that you are able to change your options text and also able to add new options to the end. It is not advised to add new options between existing options - this could result in wrong options assigned to your users. This can also happen if you remove options in-between. Removing options from the end result in users having assigned this item now reverting back to the default one.',
+ 'EMPTY_FIELD_IDENT' => 'Empty field identification',
+ 'EMPTY_USER_FIELD_NAME' => 'Please enter a field name/title',
+ 'ENTRIES' => 'Entries',
+ 'EVERYTHING_OK' => 'Everything OK',
+
+ 'FIELD_BOOL' => 'Boolean (Yes/No)',
+ 'FIELD_DATE' => 'Date',
+ 'FIELD_DESCRIPTION' => 'Field description',
+ 'FIELD_DESCRIPTION_EXPLAIN' => 'The explanation for this field presented to the user.',
+ 'FIELD_DROPDOWN' => 'Dropdown box',
+ 'FIELD_IDENT' => 'Field identification',
+ 'FIELD_IDENT_ALREADY_EXIST' => 'The chosen field identification already exist. Please choose another name.',
+ 'FIELD_IDENT_EXPLAIN' => 'The field identification is a name to identify the profile field within the database and the templates.',
+ 'FIELD_INT' => 'Numbers',
+ 'FIELD_LENGTH' => 'Length of input box',
+ 'FIELD_NOT_FOUND' => 'Profile field not found.',
+ 'FIELD_STRING' => 'Single text field',
+ 'FIELD_TEXT' => 'Textarea',
+ 'FIELD_TYPE' => 'Field type',
+ 'FIELD_TYPE_EXPLAIN' => 'You are not able to change the field type later.',
+ 'FIELD_VALIDATION' => 'Field validation',
+ 'FIRST_OPTION' => 'First option',
+
+ 'HIDE_PROFILE_FIELD' => 'Hide profile field',
+ 'HIDE_PROFILE_FIELD_EXPLAIN' => 'Hide the profile field from all other users except the user, administrators and moderators who are still able to see this field. If the Display in user control panel option is disabled, the user will not be able to see or change this field and the field can only be changed by administrators.',
+
+ 'INVALID_CHARS_FIELD_IDENT' => 'Field identification can only contain lowercase a-z and _',
+ 'INVALID_FIELD_IDENT_LEN' => 'Field identification can only be 17 characters long',
+ 'ISO_LANGUAGE' => 'Language [%s]',
+
+ 'LANG_SPECIFIC_OPTIONS' => 'Language specific options [<strong>%s</strong>]',
+
+ 'MAX_FIELD_CHARS' => 'Maximum number of characters',
+ 'MAX_FIELD_NUMBER' => 'Highest allowed number',
+ 'MIN_FIELD_CHARS' => 'Minimum number of characters',
+ 'MIN_FIELD_NUMBER' => 'Lowest allowed number',
+
+ 'NO_FIELD_ENTRIES' => 'No entries defined',
+ 'NO_FIELD_ID' => 'No field id specified.',
+ 'NO_FIELD_TYPE' => 'No Field type specified.',
+ 'NO_VALUE_OPTION' => 'Option equal to non entered value',
+ 'NO_VALUE_OPTION_EXPLAIN' => 'Value for a non-entry. If the field is required, the user gets an error if he choose the option selected here.',
+ 'NUMBERS_ONLY' => 'Only numbers (0-9)',
+
+ 'PROFILE_BASIC_OPTIONS' => 'Basic options',
+ 'PROFILE_FIELD_ACTIVATED' => 'Profile field successfully activated.',
+ 'PROFILE_FIELD_DEACTIVATED' => 'Profile field successfully deactivated.',
+ 'PROFILE_LANG_OPTIONS' => 'Language specific options',
+ 'PROFILE_TYPE_OPTIONS' => 'Profile type specific options',
+
+ 'RADIO_BUTTONS' => 'Radio buttons',
+ 'REMOVED_PROFILE_FIELD' => 'Successfully removed profile field.',
+ 'REQUIRED_FIELD' => 'Required field',
+ 'REQUIRED_FIELD_EXPLAIN' => 'Force profile field to be filled out or specified by user or administrator. If display at registration screen option is disabled, the field will only be required when the user edits their profile.',
+ 'ROWS' => 'Rows',
+
+ 'SAVE' => 'Save',
+ 'SECOND_OPTION' => 'Second option',
+ 'STEP_1_EXPLAIN_CREATE' => 'Here you can enter the first basic parameters of your new profile field. This information is needed for the second step where you’ll be able to set remaining options and tweak your profile field further.',
+ 'STEP_1_EXPLAIN_EDIT' => 'Here you can change the basic parameters of your profile field. The relevant options are re-calculated within the second step.',
+ 'STEP_1_TITLE_CREATE' => 'Add profile field',
+ 'STEP_1_TITLE_EDIT' => 'Edit profile field',
+ 'STEP_2_EXPLAIN_CREATE' => 'Here you are able to define some common options you may want to adjust.',
+ 'STEP_2_EXPLAIN_EDIT' => 'Here you are able to change some common options.<br /><strong>Please note that changes to profile fields will not affect existing profile fields entered by your users.</strong>',
+ 'STEP_2_TITLE_CREATE' => 'Profile type specific options',
+ 'STEP_2_TITLE_EDIT' => 'Profile type specific options',
+ 'STEP_3_EXPLAIN_CREATE' => 'Since you have more than one board language installed, you have to fill out the remaining language items too. The profile field will work with the default language enabled, you are able to fill out the remaining language items later too.',
+ 'STEP_3_EXPLAIN_EDIT' => 'Since you have more than one board language installed, you now can change or add the remaining language items too. The profile field will work with the default language enabled.',
+ 'STEP_3_TITLE_CREATE' => 'Remaining language definitions',
+ 'STEP_3_TITLE_EDIT' => 'Language definitions',
+ 'STRING_DEFAULT_VALUE_EXPLAIN' => 'Enter a default phrase to be displayed, a default value. Leave empty if you want to show it empty at the first place.',
+
+ 'TEXT_DEFAULT_VALUE_EXPLAIN' => 'Enter a default text to be displayed, a default value. Leave empty if you want to show it empty at the first place.',
+ 'TRANSLATE' => 'Translate',
+
+ 'USER_FIELD_NAME' => 'Field name/title presented to the user',
+
+ 'VISIBILITY_OPTION' => 'Visibility options',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/prune.php b/phpBB/language/en/acp/prune.php
new file mode 100644
index 0000000000..8a06225102
--- /dev/null
+++ b/phpBB/language/en/acp/prune.php
@@ -0,0 +1,91 @@
+<?php
+/**
+*
+* acp_prune [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+// User pruning
+$lang = array_merge($lang, array(
+ 'ACP_PRUNE_USERS_EXPLAIN' => 'This section allows you to delete or deactivate users on your board. Accounts can be filtered in a variety of ways; by post count, most recent activity, etc. Criteria may be combined to narrow down which accounts are affected. For example, you can prune users with fewer than 10 posts, who were also inactive after 2002-01-01. Alternatively, you may skip the criteria selection completely by entering a list of users (each on a separate line) into the text field. Take care with this facility! Once a user is deleted, there is no way to reverse the action.',
+
+ 'DEACTIVATE_DELETE' => 'Deactivate or delete',
+ 'DEACTIVATE_DELETE_EXPLAIN' => 'Choose whether to deactivate users or delete them entirely. Please note that deleted users cannot be restored!',
+ 'DELETE_USERS' => 'Delete',
+ 'DELETE_USER_POSTS' => 'Delete pruned user posts',
+ 'DELETE_USER_POSTS_EXPLAIN' => 'Removes posts made by deleted users, has no effect if users are deactivated.',
+
+ 'JOINED_EXPLAIN' => 'Enter a date in <kbd>YYYY-MM-DD</kbd> format.',
+
+ 'LAST_ACTIVE_EXPLAIN' => 'Enter a date in <kbd>YYYY-MM-DD</kbd> format. Enter <kbd>0000-00-00</kbd> to prune users who never logged in, <em>Before</em> and <em>After</em> conditions will be ignored.',
+
+ 'PRUNE_USERS_LIST' => 'Users to be pruned',
+ 'PRUNE_USERS_LIST_DELETE' => 'With the selected critera for pruning users the following accounts will be removed.',
+ 'PRUNE_USERS_LIST_DEACTIVATE' => 'With the selected critera for pruning users the following accounts will be deactivated.',
+
+ 'SELECT_USERS_EXPLAIN' => 'Enter specific usernames here, they will be used in preference to the criteria above. Founders cannot be pruned.',
+
+ 'USER_DEACTIVATE_SUCCESS' => 'The selected users have been deactivated successfully.',
+ 'USER_DELETE_SUCCESS' => 'The selected users have been deleted successfully.',
+ 'USER_PRUNE_FAILURE' => 'No users fit the selected criteria.',
+
+ 'WRONG_ACTIVE_JOINED_DATE' => 'The date entered is wrong, it is expected in <kbd>YYYY-MM-DD</kbd> format.',
+));
+
+// Forum Pruning
+$lang = array_merge($lang, array(
+ 'ACP_PRUNE_FORUMS_EXPLAIN' => 'This will delete any topic which has not been posted to or viewed within the number of days you select. If you do not enter a number then all topics will be deleted. By default, it will not remove topics in which polls are still running nor will it remove stickies and announcements.',
+
+ 'FORUM_PRUNE' => 'Forum prune',
+
+ 'NO_PRUNE' => 'No forums pruned.',
+
+ 'SELECTED_FORUM' => 'Selected forum',
+ 'SELECTED_FORUMS' => 'Selected forums',
+
+ 'POSTS_PRUNED' => 'Posts pruned',
+ 'PRUNE_ANNOUNCEMENTS' => 'Prune announcements',
+ 'PRUNE_FINISHED_POLLS' => 'Prune closed polls',
+ 'PRUNE_FINISHED_POLLS_EXPLAIN' => 'Removes topics with polls which have ended.',
+ 'PRUNE_FORUM_CONFIRM' => 'Are you sure you want to prune the selected forums with the settings specified? Once removed, there is no way to recover the pruned posts and topics.',
+ 'PRUNE_NOT_POSTED' => 'Days since last posted',
+ 'PRUNE_NOT_VIEWED' => 'Days since last viewed',
+ 'PRUNE_OLD_POLLS' => 'Prune old polls',
+ 'PRUNE_OLD_POLLS_EXPLAIN' => 'Removes topics with polls not voted in for post age days.',
+ 'PRUNE_STICKY' => 'Prune stickies',
+ 'PRUNE_SUCCESS' => 'Pruning of forums was successful.',
+
+ 'TOPICS_PRUNED' => 'Topics pruned',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php
new file mode 100644
index 0000000000..88eed9d948
--- /dev/null
+++ b/phpBB/language/en/acp/search.php
@@ -0,0 +1,107 @@
+<?php
+/**
+*
+* acp_search [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'ACP_SEARCH_INDEX_EXPLAIN' => 'Here you can manage the search backend’s indexes. Since you normally use only one backend you should delete all indexes that you do not make use of. After altering some of the search settings (e.g. the number of minimum/maximum chars) it might be worth recreating the index so it reflects those changes.',
+ 'ACP_SEARCH_SETTINGS_EXPLAIN' => 'Here you can define what search backend will be used for indexing posts and performing searches. You can set various options that can influence how much processing these actions require. Some of these settings are the same for all search engine backends.',
+
+ 'COMMON_WORD_THRESHOLD' => 'Common word threshold',
+ 'COMMON_WORD_THRESHOLD_EXPLAIN' => 'Words which are contained in a greater percentage of all posts will be regarded as common. Common words are ignored in search queries. Set to zero to disable. Only takes effect if there are more than 100 posts. If you want words that are currently regarded as common to be reconsidered you have to recreate the index.',
+ 'CONFIRM_SEARCH_BACKEND' => 'Are you sure you wish to switch to a different search backend? After changing the search backend you will have to create an index for the new search backend. If you don’t plan on switching back to the old search backend you can also delete the old backend’s index in order to free system resources.',
+ 'CONTINUE_DELETING_INDEX' => 'Continue previous index removal process',
+ 'CONTINUE_DELETING_INDEX_EXPLAIN' => 'An index removal process has been started. In order to access the search index page you will have to complete it or cancel it.',
+ 'CONTINUE_INDEXING' => 'Continue previous indexing process',
+ 'CONTINUE_INDEXING_EXPLAIN' => 'An indexing process has been started. In order to access the search index page you will have to complete it or cancel it.',
+ 'CREATE_INDEX' => 'Create index',
+
+ 'DELETE_INDEX' => 'Delete index',
+ 'DELETING_INDEX_IN_PROGRESS' => 'Deleting the index in progress',
+ 'DELETING_INDEX_IN_PROGRESS_EXPLAIN' => 'The search backend is currently cleaning its index. This can take a few minutes.',
+
+ 'FULLTEXT_MYSQL_INCOMPATIBLE_VERSION' => 'The MySQL fulltext backend can only be used with MySQL4 and above.',
+ 'FULLTEXT_MYSQL_NOT_MYISAM' => 'MySQL fulltext indexes can only be used with MyISAM tables.',
+ 'FULLTEXT_MYSQL_TOTAL_POSTS' => 'Total number of indexed posts',
+ 'FULLTEXT_MYSQL_MBSTRING' => 'Support for non-latin UTF-8 characters using mbstring:',
+ 'FULLTEXT_MYSQL_PCRE' => 'Support for non-latin UTF-8 characters using PCRE:',
+ 'FULLTEXT_MYSQL_MBSTRING_EXPLAIN' => 'If PCRE does not have unicode character properties, the search backend will try to use mbstring’s regular expression engine.',
+ 'FULLTEXT_MYSQL_PCRE_EXPLAIN' => 'This search backend requires PCRE unicode character properties, only available in PHP 4.4, 5.1 and above, if you want to search for non-latin characters.',
+
+ 'GENERAL_SEARCH_SETTINGS' => 'General search settings',
+ 'GO_TO_SEARCH_INDEX' => 'Go to search index page',
+
+ 'INDEX_STATS' => 'Index statistics',
+ 'INDEXING_IN_PROGRESS' => 'Indexing in progress',
+ 'INDEXING_IN_PROGRESS_EXPLAIN' => 'The search backend is currently indexing all posts on the board. This can take from a few minutes to a few hours depending on your board’s size.',
+
+ 'LIMIT_SEARCH_LOAD' => 'Search page system load limit',
+ 'LIMIT_SEARCH_LOAD_EXPLAIN' => 'If the 1 minute system load exceeds this value the search page will go offline, 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers.',
+
+ 'MAX_SEARCH_CHARS' => 'Max characters indexed by search',
+ 'MAX_SEARCH_CHARS_EXPLAIN' => 'Words with no more than this many characters will be indexed for searching.',
+ 'MAX_NUM_SEARCH_KEYWORDS' => 'Maximum number of allowed keywords',
+ 'MAX_NUM_SEARCH_KEYWORDS_EXPLAIN' => 'Maximum number of words the user is able to search for. A value of 0 allows an unlimited number of words.',
+ 'MIN_SEARCH_CHARS' => 'Min characters indexed by search',
+ 'MIN_SEARCH_CHARS_EXPLAIN' => 'Words with at least this many characters will be indexed for searching.',
+ 'MIN_SEARCH_AUTHOR_CHARS' => 'Min author name characters',
+ 'MIN_SEARCH_AUTHOR_CHARS_EXPLAIN' => 'Users have to enter at least this many characters of the name when performing a wildcard author search. If the author’s username is shorter than this number you can still search for the author’s posts by entering the complete username.',
+
+ 'PROGRESS_BAR' => 'Progress bar',
+
+ 'SEARCH_GUEST_INTERVAL' => 'Guest search flood interval',
+ 'SEARCH_GUEST_INTERVAL_EXPLAIN' => 'Number of seconds guests must wait between searches. If one guest searches all others have to wait until the time interval passed.',
+ 'SEARCH_INDEX_CREATE_REDIRECT' => 'All posts up to post id %1$d have now been indexed, of which %2$d posts were within this step.<br />The current rate of indexing is approximately %3$.1f posts per second.<br />Indexing in progress…',
+ 'SEARCH_INDEX_DELETE_REDIRECT' => 'All posts up to post id %1$d have been removed from the search index.<br />Deleting in progress…',
+ 'SEARCH_INDEX_CREATED' => 'Successfully indexed all posts in the board database.',
+ 'SEARCH_INDEX_REMOVED' => 'Successfully deleted the search index for this backend.',
+ 'SEARCH_INTERVAL' => 'User search flood interval',
+ 'SEARCH_INTERVAL_EXPLAIN' => 'Number of seconds users must wait between searches. This interval is checked independently for each user.',
+ 'SEARCH_STORE_RESULTS' => 'Search result cache length',
+ 'SEARCH_STORE_RESULTS_EXPLAIN' => 'Cached search results will expire after this time, in seconds. Set to 0 if you want to disable search cache.',
+ 'SEARCH_TYPE' => 'Search backend',
+ 'SEARCH_TYPE_EXPLAIN' => 'phpBB allows you to choose the backend that is used for searching text in post contents. By default the search will use phpBB’s own fulltext search.',
+ 'SWITCHED_SEARCH_BACKEND' => 'You switched the search backend. In order to use the new search backend you should make sure that there is an index for the backend you chose.',
+
+ 'TOTAL_WORDS' => 'Total number of indexed words',
+ 'TOTAL_MATCHES' => 'Total number of word to post relations indexed',
+
+ 'YES_SEARCH' => 'Enable search facilities',
+ 'YES_SEARCH_EXPLAIN' => 'Enables user facing search functionality including member search.',
+ 'YES_SEARCH_UPDATE' => 'Enable fulltext updating',
+ 'YES_SEARCH_UPDATE_EXPLAIN' => 'Updating of fulltext indexes when posting, overridden if search is disabled.',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php
new file mode 100644
index 0000000000..247d8a4140
--- /dev/null
+++ b/phpBB/language/en/acp/styles.php
@@ -0,0 +1,434 @@
+<?php
+/**
+*
+* acp_styles [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'ACP_IMAGESETS_EXPLAIN' => 'Imagesets comprise all the button, forum, folder, etc. and other non-style specific images used by the board. Here you can edit, export or delete existing imagesets and import or activate new sets.',
+ 'ACP_STYLES_EXPLAIN' => 'Here you can manage the available styles on your board. A style consists of a template, theme and imageset. You may alter existing styles, delete, deactivate, reactivate, create or import new ones. You can also see what a style will look like using the preview function. The current default style is noted by the presence of an asterisk (*). Also listed is the total user count for each style, note that overriding user styles will not be reflected here.',
+ 'ACP_TEMPLATES_EXPLAIN' => 'A template set comprises all the markup used to generate the layout of your board. Here you can edit existing template sets, delete, export, import and preview sets. You can also modify the templating code used to generate BBCode.',
+ 'ACP_THEMES_EXPLAIN' => 'From here you can create, install, edit, delete and export themes. A theme is the combination of colours and images that are applied to your templates to define the basic look of your board. The range of options open to you depends on the configuration of your server and phpBB installation, see the manual for further details. Please note that when creating new themes the use of an existing theme as a basis is optional.',
+ 'ADD_IMAGESET' => 'Create imageset',
+ 'ADD_IMAGESET_EXPLAIN' => 'Here you can create a new imageset. Depending on your server configuration and file permissions you may have additional options here. For example you may be able to base this imageset on an existing one. You may also be able to upload or import (from the store directory) a imageset archive. If you upload or import an archive the imageset name can be optionally taken from the archive name (to do this leave the imageset name blank).',
+ 'ADD_STYLE' => 'Create style',
+ 'ADD_STYLE_EXPLAIN' => 'Here you can create a new style. Depending on your server configuration and file permissions you may have additional options. For example you may be able to base this style on an existing one. You may also be able to upload or import (from the store directory) a style archive. If you upload or import an archive the style name will be determined automatically.',
+ 'ADD_TEMPLATE' => 'Create template',
+ 'ADD_TEMPLATE_EXPLAIN' => 'Here you can add a new template. Depending on your server configuration and file permissions you may have additional options here. For example you may be able to base this template set on an existing one. You may also be able to upload or import (from the store directory) a template archive. If you upload or import an archive the template name can be optionally taken from the archive name (to do this leave the template name blank).',
+ 'ADD_THEME' => 'Create theme',
+ 'ADD_THEME_EXPLAIN' => 'Here you can add a new theme. Depending on your server configuration and file permissions you may have additional options here. For example you may be able to base this theme on an existing one. You may also be able to upload or import (from the store directory) a theme archive. If you upload or import an archive the theme name can be optionally taken from the archive name (to do this leave the theme name blank).',
+ 'ARCHIVE_FORMAT' => 'Archive file type',
+ 'AUTOMATIC_EXPLAIN' => 'Leave blank to attempt automatic detection.',
+
+ 'BACKGROUND' => 'Background',
+ 'BACKGROUND_COLOUR' => 'Background colour',
+ 'BACKGROUND_IMAGE' => 'Background image',
+ 'BACKGROUND_REPEAT' => 'Background repeat',
+ 'BOLD' => 'Bold',
+
+ 'CACHE' => 'Cache',
+ 'CACHE_CACHED' => 'Cached',
+ 'CACHE_FILENAME' => 'Template file',
+ 'CACHE_FILESIZE' => 'File size',
+ 'CACHE_MODIFIED' => 'Modified',
+ 'CONFIRM_IMAGESET_REFRESH' => 'Are you sure you wish to refresh all imageset data? The settings from the imageset configuration file will overwrite all modifications to the imageset which have been carried out with the imageset editor.',
+ 'CONFIRM_TEMPLATE_CLEAR_CACHE' => 'Are you sure you wish to clear all cached versions of your template files?',
+ 'CONFIRM_TEMPLATE_REFRESH' => 'Are you sure you wish to refresh all template data in the database with the contents of the template files on the filesystem? This will overwrite all modifications which have been carried out with the template editor while the template was stored in the database.',
+ 'CONFIRM_THEME_REFRESH' => 'Are you sure you wish to refresh the theme data stored in the database with the contents of the theme on the filesystem? This will overwrite all modifications which have been carried out with the theme editor while the theme was stored in the database.',
+ 'COPYRIGHT' => 'Copyright',
+ 'CREATE_IMAGESET' => 'Create new imageset',
+ 'CREATE_STYLE' => 'Create new style',
+ 'CREATE_TEMPLATE' => 'Create new template set',
+ 'CREATE_THEME' => 'Create new theme',
+ 'CURRENT_IMAGE' => 'Current image',
+
+ 'DEACTIVATE_DEFAULT' => 'You cannot deactivate the default style.',
+ 'DELETE_FROM_FS' => 'Delete from filesystem',
+ 'DELETE_IMAGESET' => 'Delete imageset',
+ 'DELETE_IMAGESET_EXPLAIN' => 'Here you can remove the selected imageset from the database. Additionally, if you have permission you can elect to remove the set from the filesystem. Please note that there is no undo capability. When the imageset is deleted it is gone for good. It is recommended that you first export your set for possible future use.',
+ 'DELETE_STYLE' => 'Delete style',
+ 'DELETE_STYLE_EXPLAIN' => 'Here you can remove the selected style. You cannot remove all the style elements from here. These must be deleted individually via their respective forms. Take care in deleting styles there is no undo facility.',
+ 'DELETE_TEMPLATE' => 'Delete template',
+ 'DELETE_TEMPLATE_EXPLAIN' => 'Here you can remove the selected template set from the database. Additionally, if you have permission you can elect to remove the set from the filesystem. Please note that there is no undo capability. When the templates are deleted they are gone for good. It is recommended that you first export your set for possible future use.',
+ 'DELETE_THEME' => 'Delete theme',
+ 'DELETE_THEME_EXPLAIN' => 'Here you can remove the selected theme from the database. Additionally, if you have permission you can elect to remove the theme from the filesystem. Please note that there is no undo capability. When the theme is deleted it is gone for good. It is recommended that you first export your theme for possible future use.',
+ 'DETAILS' => 'Details',
+ 'DIMENSIONS_EXPLAIN' => 'Selecting yes here will include width/height parameters.',
+
+
+ 'EDIT_DETAILS_IMAGESET' => 'Edit imageset details',
+ 'EDIT_DETAILS_IMAGESET_EXPLAIN' => 'Here you can edit certain imageset details such as its name.',
+ 'EDIT_DETAILS_STYLE' => 'Edit style',
+ 'EDIT_DETAILS_STYLE_EXPLAIN' => 'Using the form below you can modify this existing style. You may alter the combination of template, theme and imageset which define the style itself. You may also make the style the default one.',
+ 'EDIT_DETAILS_TEMPLATE' => 'Edit template details',
+ 'EDIT_DETAILS_TEMPLATE_EXPLAIN' => 'Here you can edit certain template details such as its name. You may also have the option to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your template set can be written to by the web server.',
+ 'EDIT_DETAILS_THEME' => 'Edit theme details',
+ 'EDIT_DETAILS_THEME_EXPLAIN' => 'Here you can edit certain theme details such as its name. You may also have the option to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your stylesheet can be written to by the web server.',
+ 'EDIT_IMAGESET' => 'Edit imageset',
+ 'EDIT_IMAGESET_EXPLAIN' => 'Here you can edit the individual images which define the imageset. You can also specify dimensions for the image. Dimensions are optional, specifying them can overcome certain rendering issues with some browsers. By not specifying them you reduce the size of the database record a little.',
+ 'EDIT_TEMPLATE' => 'Edit template',
+ 'EDIT_TEMPLATE_EXPLAIN' => 'Here you can edit your template set directly. Please remember that these edits are permanent and cannot be undone once submitted. If PHP can write to the template files in your styles directory any changes here will be written directly to those files. If PHP cannot write to those files they will be copied into the database and all changes will only be reflected there. Please take care when editing your template set, remember to close all replacement variable terms {XXXX} and conditional statements.',
+ 'EDIT_TEMPLATE_STORED_DB' => 'The template file was unwritable so the template set is now stored in the database containing the modified file.',
+ 'EDIT_THEME' => 'Edit theme',
+ 'EDIT_THEME_EXPLAIN' => 'Here you can edit the selected theme, changing colours, images, etc.',
+ 'EDIT_THEME_STORED_DB' => 'The stylesheet file was unwritable so the stylesheet is now stored in the database containing your modification.',
+ 'EDIT_THEME_STORE_PARSED' => 'The theme requires that its stylesheet is parsed. This is only possible if it’s stored in the database.',
+ 'EDITOR_DISABLED' => 'The template editor is disabled.',
+ 'EXPORT' => 'Export',
+
+ 'FOREGROUND' => 'Foreground',
+ 'FONT_COLOUR' => 'Font colour',
+ 'FONT_FACE' => 'Font face',
+ 'FONT_FACE_EXPLAIN' => 'You can specify multiple fonts separated by commas. If a user doesn’t have the first font installed the first other working font will be chosen.',
+ 'FONT_SIZE' => 'Font size',
+
+ 'GLOBAL_IMAGES' => 'Global',
+
+ 'HIDE_CSS' => 'Hide raw CSS',
+
+ 'IMAGE_WIDTH' => 'Image width',
+ 'IMAGE_HEIGHT' => 'Image height',
+ 'IMAGE' => 'Image',
+ 'IMAGE_NAME' => 'Image name',
+ 'IMAGE_PARAMETER' => 'Parameter',
+ 'IMAGE_VALUE' => 'Value',
+ 'IMAGESET_ADDED' => 'New imageset added on filesystem.',
+ 'IMAGESET_ADDED_DB' => 'New imageset added to database.',
+ 'IMAGESET_DELETED' => 'Imageset deleted successfully.',
+ 'IMAGESET_DELETED_FS' => 'Imageset removed from database but some files may remain on the filesystem.',
+ 'IMAGESET_DETAILS_UPDATED' => 'Imageset details successfully updated.',
+ 'IMAGESET_ERR_ARCHIVE' => 'Please select an archive method.',
+ 'IMAGESET_ERR_COPY_LONG' => 'The copyright can be no longer than 60 characters.',
+ 'IMAGESET_ERR_NAME_CHARS' => 'The imageset name can only contain alphanumeric characters, -, +, _ and space.',
+ 'IMAGESET_ERR_NAME_EXIST' => 'A imageset with that name already exists.',
+ 'IMAGESET_ERR_NAME_LONG' => 'The imageset name can be no longer than 30 characters.',
+ 'IMAGESET_ERR_NOT_IMAGESET' => 'The archive you specified does not contain a valid imageset.',
+ 'IMAGESET_ERR_STYLE_NAME' => 'You must supply a name for this imageset.',
+ 'IMAGESET_EXPORT' => 'Export imageset',
+ 'IMAGESET_EXPORT_EXPLAIN' => 'Here you can export an imageset in the form of an archive. This archive will contain all the data necessary to install the set of images on another board. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.',
+ 'IMAGESET_EXPORTED' => 'Imageset exported successfully and stored in %s.',
+ 'IMAGESET_NAME' => 'Imageset name',
+ 'IMAGESET_REFRESHED' => 'Imageset refreshed successfully.',
+ 'IMAGESET_UPDATED' => 'Imageset updated successfully.',
+ 'ITALIC' => 'Italic',
+
+ 'IMG_CAT_BUTTONS' => 'Localised buttons',
+ 'IMG_CAT_CUSTOM' => 'Custom images',
+ 'IMG_CAT_FOLDERS' => 'Topic icons',
+ 'IMG_CAT_FORUMS' => 'Forum icons',
+ 'IMG_CAT_ICONS' => 'General icons',
+ 'IMG_CAT_LOGOS' => 'Logos',
+ 'IMG_CAT_POLLS' => 'Polling images',
+ 'IMG_CAT_UI' => 'General user interface elements',
+ 'IMG_CAT_USER' => 'Additional images',
+
+ 'IMG_SITE_LOGO' => 'Main logo',
+ 'IMG_UPLOAD_BAR' => 'Upload progress bar',
+ 'IMG_POLL_LEFT' => 'Poll left end',
+ 'IMG_POLL_CENTER' => 'Poll centre',
+ 'IMG_POLL_RIGHT' => 'Poll right end',
+ 'IMG_ICON_FRIEND' => 'Add as friend',
+ 'IMG_ICON_FOE' => 'Add as foe',
+
+ 'IMG_FORUM_LINK' => 'Forum link',
+ 'IMG_FORUM_READ' => 'Forum',
+ 'IMG_FORUM_READ_LOCKED' => 'Forum locked',
+ 'IMG_FORUM_READ_SUBFORUM' => 'Subforum',
+ 'IMG_FORUM_UNREAD' => 'Forum new posts',
+ 'IMG_FORUM_UNREAD_LOCKED' => 'Forum new posts locked',
+ 'IMG_FORUM_UNREAD_SUBFORUM' => 'Subforum new posts',
+ 'IMG_SUBFORUM_READ' => 'Legend subforum',
+ 'IMG_SUBFORUM_UNREAD' => 'Legend subforum new posts',
+
+ 'IMG_TOPIC_MOVED' => 'Topic moved',
+
+ 'IMG_TOPIC_READ' => 'Topic',
+ 'IMG_TOPIC_READ_MINE' => 'Topic posted to',
+ 'IMG_TOPIC_READ_HOT' => 'Topic popular',
+ 'IMG_TOPIC_READ_HOT_MINE' => 'Topic popular posted to',
+ 'IMG_TOPIC_READ_LOCKED' => 'Topic locked',
+ 'IMG_TOPIC_READ_LOCKED_MINE' => 'Topic locked posted to',
+
+ 'IMG_TOPIC_UNREAD' => 'Topic new posts',
+ 'IMG_TOPIC_UNREAD_MINE' => 'Topic posted to new',
+ 'IMG_TOPIC_UNREAD_HOT' => 'Topic popular new posts',
+ 'IMG_TOPIC_UNREAD_HOT_MINE' => 'Topic popular posted to new',
+ 'IMG_TOPIC_UNREAD_LOCKED' => 'Topic locked new',
+ 'IMG_TOPIC_UNREAD_LOCKED_MINE' => 'Topic locked posted to new',
+
+ 'IMG_STICKY_READ' => 'Sticky topic',
+ 'IMG_STICKY_READ_MINE' => 'Sticky topic posted to',
+ 'IMG_STICKY_READ_LOCKED' => 'Sticky topic locked',
+ 'IMG_STICKY_READ_LOCKED_MINE' => 'Sticky topic locked posted to',
+ 'IMG_STICKY_UNREAD' => 'Sticky topic new posts',
+ 'IMG_STICKY_UNREAD_MINE' => 'Sticky topic posted to new',
+ 'IMG_STICKY_UNREAD_LOCKED' => 'Sticky topic locked new posts',
+ 'IMG_STICKY_UNREAD_LOCKED_MINE' => 'Sticky topic locked posted to new',
+
+ 'IMG_ANNOUNCE_READ' => 'Announcement',
+ 'IMG_ANNOUNCE_READ_MINE' => 'Announcement posted to',
+ 'IMG_ANNOUNCE_READ_LOCKED' => 'Announcement locked',
+ 'IMG_ANNOUNCE_READ_LOCKED_MINE' => 'Announcement locked posted to',
+ 'IMG_ANNOUNCE_UNREAD' => 'Announcement new posts',
+ 'IMG_ANNOUNCE_UNREAD_MINE' => 'Announcement posted to new',
+ 'IMG_ANNOUNCE_UNREAD_LOCKED' => 'Announcement locked new posts',
+ 'IMG_ANNOUNCE_UNREAD_LOCKED_MINE' => 'Announcement locked posted to new',
+
+ 'IMG_GLOBAL_READ' => 'Global',
+ 'IMG_GLOBAL_READ_MINE' => 'Global posted to',
+ 'IMG_GLOBAL_READ_LOCKED' => 'Global locked',
+ 'IMG_GLOBAL_READ_LOCKED_MINE' => 'Global locked posted to',
+ 'IMG_GLOBAL_UNREAD' => 'Global new posts',
+ 'IMG_GLOBAL_UNREAD_MINE' => 'Global posted to new',
+ 'IMG_GLOBAL_UNREAD_LOCKED' => 'Global locked new posts',
+ 'IMG_GLOBAL_UNREAD_LOCKED_MINE' => 'Global locked posted to new',
+
+ 'IMG_PM_READ' => 'Read private message',
+ 'IMG_PM_UNREAD' => 'Unread private message',
+
+ 'IMG_ICON_BACK_TOP' => 'Top',
+
+ 'IMG_ICON_CONTACT_AIM' => 'AIM',
+ 'IMG_ICON_CONTACT_EMAIL' => 'Send e-mail',
+ 'IMG_ICON_CONTACT_ICQ' => 'ICQ',
+ 'IMG_ICON_CONTACT_JABBER' => 'Jabber',
+ 'IMG_ICON_CONTACT_MSNM' => 'MSNM',
+ 'IMG_ICON_CONTACT_PM' => 'Send message',
+ 'IMG_ICON_CONTACT_YAHOO' => 'YIM',
+ 'IMG_ICON_CONTACT_WWW' => 'Website',
+
+ 'IMG_ICON_POST_DELETE' => 'Delete post',
+ 'IMG_ICON_POST_EDIT' => 'Edit post',
+ 'IMG_ICON_POST_INFO' => 'Show post details',
+ 'IMG_ICON_POST_QUOTE' => 'Quote post',
+ 'IMG_ICON_POST_REPORT' => 'Report post',
+ 'IMG_ICON_POST_TARGET' => 'Minipost',
+ 'IMG_ICON_POST_TARGET_UNREAD' => 'New minipost',
+
+
+ 'IMG_ICON_TOPIC_ATTACH' => 'Attachment',
+ 'IMG_ICON_TOPIC_LATEST' => 'Last post',
+ 'IMG_ICON_TOPIC_NEWEST' => 'Last unread post',
+ 'IMG_ICON_TOPIC_REPORTED' => 'Post reported',
+ 'IMG_ICON_TOPIC_UNAPPROVED' => 'Post unapproved',
+
+ 'IMG_ICON_USER_ONLINE' => 'User online',
+ 'IMG_ICON_USER_OFFLINE' => 'User offline',
+ 'IMG_ICON_USER_PROFILE' => 'Show profile',
+ 'IMG_ICON_USER_SEARCH' => 'Search posts',
+ 'IMG_ICON_USER_WARN' => 'Warn user',
+
+ 'IMG_BUTTON_PM_FORWARD' => 'Forward private message',
+ 'IMG_BUTTON_PM_NEW' => 'New private message',
+ 'IMG_BUTTON_PM_REPLY' => 'Reply private message',
+ 'IMG_BUTTON_TOPIC_LOCKED' => 'Topic locked',
+ 'IMG_BUTTON_TOPIC_NEW' => 'New topic',
+ 'IMG_BUTTON_TOPIC_REPLY' => 'Reply topic',
+
+ 'IMG_USER_ICON1' => 'User defined image 1',
+ 'IMG_USER_ICON2' => 'User defined image 2',
+ 'IMG_USER_ICON3' => 'User defined image 3',
+ 'IMG_USER_ICON4' => 'User defined image 4',
+ 'IMG_USER_ICON5' => 'User defined image 5',
+ 'IMG_USER_ICON6' => 'User defined image 6',
+ 'IMG_USER_ICON7' => 'User defined image 7',
+ 'IMG_USER_ICON8' => 'User defined image 8',
+ 'IMG_USER_ICON9' => 'User defined image 9',
+ 'IMG_USER_ICON10' => 'User defined image 10',
+
+ 'INCLUDE_DIMENSIONS' => 'Include dimensions',
+ 'INCLUDE_IMAGESET' => 'Include imageset',
+ 'INCLUDE_TEMPLATE' => 'Include template',
+ 'INCLUDE_THEME' => 'Include theme',
+ 'INHERITING_FROM' => 'Inherits from',
+ 'INSTALL_IMAGESET' => 'Install imageset',
+ 'INSTALL_IMAGESET_EXPLAIN' => 'Here you can install your selected imageset. You can edit certain details if you wish or use the installation defaults.',
+ 'INSTALL_STYLE' => 'Install style',
+ 'INSTALL_STYLE_EXPLAIN' => 'Here you can install a new style and if appropriate the corresponding style elements. If you already have the relevant style elements installed they will not be overwritten. Some styles require existing style elements to already be installed. If you try installing such a style and do not have the required elements you will be notified.',
+ 'INSTALL_TEMPLATE' => 'Install Template',
+ 'INSTALL_TEMPLATE_EXPLAIN' => 'Here you can install a new template set. Depending on your server configuration you may have a number of options here.',
+ 'INSTALL_THEME' => 'Install theme',
+ 'INSTALL_THEME_EXPLAIN' => 'Here you can install your selected theme. You can edit certain details if you wish or use the installation defaults.',
+ 'INSTALLED_IMAGESET' => 'Installed imagesets',
+ 'INSTALLED_STYLE' => 'Installed styles',
+ 'INSTALLED_TEMPLATE' => 'Installed templates',
+ 'INSTALLED_THEME' => 'Installed themes',
+
+ 'LINE_SPACING' => 'Line spacing',
+ 'LOCALISED_IMAGES' => 'Localised',
+ 'LOCATION_DISABLED_EXPLAIN' => 'This setting is inherited and cannot be changed.',
+
+
+ 'NO_CLASS' => 'Cannot find class in stylesheet.',
+ 'NO_IMAGESET' => 'Cannot find imageset on filesystem.',
+ 'NO_IMAGE' => 'No image',
+ 'NO_IMAGE_ERROR' => 'Cannot find image on filesystem.',
+ 'NO_STYLE' => 'Cannot find style on filesystem.',
+ 'NO_TEMPLATE' => 'Cannot find template on filesystem.',
+ 'NO_THEME' => 'Cannot find theme on filesystem.',
+ 'NO_UNINSTALLED_IMAGESET' => 'No uninstalled imagesets detected.',
+ 'NO_UNINSTALLED_STYLE' => 'No uninstalled styles detected.',
+ 'NO_UNINSTALLED_TEMPLATE' => 'No uninstalled templates detected.',
+ 'NO_UNINSTALLED_THEME' => 'No uninstalled themes detected.',
+ 'NO_UNIT' => 'None',
+
+ 'ONLY_IMAGESET' => 'This is the only remaining imageset, you cannot delete it.',
+ 'ONLY_STYLE' => 'This is the only remaining style, you cannot delete it.',
+ 'ONLY_TEMPLATE' => 'This is the only remaining template set, you cannot delete it.',
+ 'ONLY_THEME' => 'This is the only remaining theme, you cannot delete it.',
+ 'OPTIONAL_BASIS' => 'Optional basis',
+
+ 'REFRESH' => 'Refresh',
+ 'REPEAT_NO' => 'None',
+ 'REPEAT_X' => 'Only horizontally',
+ 'REPEAT_Y' => 'Only vertically',
+ 'REPEAT_ALL' => 'Both directions',
+ 'REPLACE_IMAGESET' => 'Replace imageset with',
+ 'REPLACE_IMAGESET_EXPLAIN' => 'This imageset will replace the one you are deleting in any styles that use it.',
+ 'REPLACE_STYLE' => 'Replace style with',
+ 'REPLACE_STYLE_EXPLAIN' => 'This style will replace the one being deleted for members that use it.',
+ 'REPLACE_TEMPLATE' => 'Replace template with',
+ 'REPLACE_TEMPLATE_EXPLAIN' => 'This template set will replace the one you are deleting in any styles that use it.',
+ 'REPLACE_THEME' => 'Replace theme with',
+ 'REPLACE_THEME_EXPLAIN' => 'This theme will replace the one you are deleting in any styles that use it.',
+ 'REQUIRES_IMAGESET' => 'This style requires the %s imageset to be installed.',
+ 'REQUIRES_TEMPLATE' => 'This style requires the %s template set to be installed.',
+ 'REQUIRES_THEME' => 'This style requires the %s theme to be installed.',
+
+ 'SELECT_IMAGE' => 'Select image',
+ 'SELECT_TEMPLATE' => 'Select template file',
+ 'SELECT_THEME' => 'Select theme file',
+ 'SELECTED_IMAGE' => 'Selected image',
+ 'SELECTED_IMAGESET' => 'Selected imageset',
+ 'SELECTED_TEMPLATE' => 'Selected template',
+ 'SELECTED_TEMPLATE_FILE' => 'Selected template file',
+ 'SELECTED_THEME' => 'Selected theme',
+ 'SELECTED_THEME_FILE' => 'Selected theme file',
+ 'STORE_DATABASE' => 'Database',
+ 'STORE_FILESYSTEM' => 'Filesystem',
+ 'STYLE_ACTIVATE' => 'Activate',
+ 'STYLE_ACTIVE' => 'Active',
+ 'STYLE_ADDED' => 'Style added successfully.',
+ 'STYLE_DEACTIVATE' => 'Deactivate',
+ 'STYLE_DEFAULT' => 'Make default style',
+ 'STYLE_DELETED' => 'Style deleted successfully.',
+ 'STYLE_DETAILS_UPDATED' => 'Style edited successfully.',
+ 'STYLE_ERR_ARCHIVE' => 'Please select an archive method.',
+ 'STYLE_ERR_COPY_LONG' => 'The copyright can be no longer than 60 characters.',
+ 'STYLE_ERR_MORE_ELEMENTS' => 'You must select at least one style element.',
+ 'STYLE_ERR_NAME_CHARS' => 'The style name can only contain alphanumeric characters, -, +, _ and space.',
+ 'STYLE_ERR_NAME_EXIST' => 'A style with that name already exists.',
+ 'STYLE_ERR_NAME_LONG' => 'The style name can be no longer than 30 characters.',
+ 'STYLE_ERR_NO_IDS' => 'You must select a template, theme and imageset for this style.',
+ 'STYLE_ERR_NOT_STYLE' => 'The imported or uploaded file did not contain a valid style archive.',
+ 'STYLE_ERR_STYLE_NAME' => 'You must supply a name for this style.',
+ 'STYLE_EXPORT' => 'Export style',
+ 'STYLE_EXPORT_EXPLAIN' => 'Here you can export a style in the form of an archive. A style does not need to contain all elements but it must contain at least one. For example if you have created a new theme and imageset for a commonly used template you could simply export the theme and imageset and omit the template. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.',
+ 'STYLE_EXPORTED' => 'Style exported successfully and stored in %s.',
+ 'STYLE_IMAGESET' => 'Imageset',
+ 'STYLE_NAME' => 'Style name',
+ 'STYLE_TEMPLATE' => 'Template',
+ 'STYLE_THEME' => 'Theme',
+ 'STYLE_USED_BY' => 'Used by (including robots)',
+
+ 'TEMPLATE_ADDED' => 'Template set added and stored on filesystem.',
+ 'TEMPLATE_ADDED_DB' => 'Template set added and stored in database.',
+ 'TEMPLATE_CACHE' => 'Template cache',
+ 'TEMPLATE_CACHE_EXPLAIN' => 'By default phpBB caches the compiled version of its templates. This decreases the load on the server each time a page is viewed and thus may reduce the page generation time. Here you can view the cache status of each file and delete individual files or the entire cache.',
+ 'TEMPLATE_CACHE_CLEARED' => 'Template cache cleared successfully.',
+ 'TEMPLATE_CACHE_EMPTY' => 'There are no cached templates.',
+ 'TEMPLATE_DELETED' => 'Template set deleted successfully.',
+ 'TEMPLATE_DELETE_DEPENDENT' => 'The template set cannot be deleted as there are one or more other template sets inheriting from it:',
+ 'TEMPLATE_DELETED_FS' => 'Template set removed from database but some files may remain on the filesystem.',
+ 'TEMPLATE_DETAILS_UPDATED' => 'Template details successfully updated.',
+ 'TEMPLATE_EDITOR' => 'Raw HTML template editor',
+ 'TEMPLATE_EDITOR_HEIGHT' => 'Template editor height',
+ 'TEMPLATE_ERR_ARCHIVE' => 'Please select an archive method.',
+ 'TEMPLATE_ERR_CACHE_READ' => 'The cache directory used to store cached versions of template files could not be opened.',
+ 'TEMPLATE_ERR_COPY_LONG' => 'The copyright can be no longer than 60 characters.',
+ 'TEMPLATE_ERR_NAME_CHARS' => 'The template name can only contain alphanumeric characters, -, +, _ and space.',
+ 'TEMPLATE_ERR_NAME_EXIST' => 'A template set with that name already exists.',
+ 'TEMPLATE_ERR_NAME_LONG' => 'The template name can be no longer than 30 characters.',
+ 'TEMPLATE_ERR_NOT_TEMPLATE' => 'The archive you specified does not contain a valid template set.',
+ 'TEMPLATE_ERR_REQUIRED_OR_INCOMPLETE' => 'The new template set requires the template %s to be installed and not inheriting itself.',
+ 'TEMPLATE_ERR_STYLE_NAME' => 'You must supply a name for this template.',
+ 'TEMPLATE_EXPORT' => 'Export templates',
+ 'TEMPLATE_EXPORT_EXPLAIN' => 'Here you can export a template set in the form of an archive. This archive will contain all the files necessary to install the templates on another board. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.',
+ 'TEMPLATE_EXPORTED' => 'Templates exported successfully and stored in %s.',
+ 'TEMPLATE_FILE' => 'Template file',
+ 'TEMPLATE_FILE_UPDATED' => 'Template file updated successfully.',
+ 'TEMPLATE_INHERITS' => 'This template sets inherits from %s and thus cannot have a different storage setting than its super template.',
+ 'TEMPLATE_LOCATION' => 'Store templates in',
+ 'TEMPLATE_LOCATION_EXPLAIN' => 'Images are always stored on the filesystem.',
+ 'TEMPLATE_NAME' => 'Template name',
+ 'TEMPLATE_FILE_NOT_WRITABLE'=> 'Unable to write to template file %s. Please check the permissions for the directory and the files.',
+ 'TEMPLATE_REFRESHED' => 'Template refreshed successfully.',
+
+ 'THEME_ADDED' => 'New theme added on filesystem.',
+ 'THEME_ADDED_DB' => 'New theme added to database.',
+ 'THEME_CLASS_ADDED' => 'Custom class added successfully.',
+ 'THEME_DELETED' => 'Theme deleted successfully.',
+ 'THEME_DELETED_FS' => 'Theme removed from database but files remain on the filesystem.',
+ 'THEME_DETAILS_UPDATED' => 'Theme details successfully updated.',
+ 'THEME_EDITOR' => 'Theme editor',
+ 'THEME_EDITOR_HEIGHT' => 'Theme editor height',
+ 'THEME_ERR_ARCHIVE' => 'Please select an archive method.',
+ 'THEME_ERR_CLASS_CHARS' => 'Only alphanumeric characters plus ., :, -, _ and # are valid in class names.',
+ 'THEME_ERR_COPY_LONG' => 'The copyright can be no longer than 60 characters.',
+ 'THEME_ERR_NAME_CHARS' => 'The theme name can only contain alphanumeric characters, -, +, _ and space.',
+ 'THEME_ERR_NAME_EXIST' => 'A theme with that name already exists.',
+ 'THEME_ERR_NAME_LONG' => 'The theme name can be no longer than 30 characters.',
+ 'THEME_ERR_NOT_THEME' => 'The archive you specified does not contain a valid theme.',
+ 'THEME_ERR_REFRESH_FS' => 'This theme is stored on the filesystem so there is no need to refresh it.',
+ 'THEME_ERR_STYLE_NAME' => 'You must supply a name for this theme.',
+ 'THEME_FILE' => 'Theme file',
+ 'THEME_EXPORT' => 'Export Theme',
+ 'THEME_EXPORT_EXPLAIN' => 'Here you can export a theme in the form of an archive. This archive will contain all the data necessary to install the theme on another board. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.',
+ 'THEME_EXPORTED' => 'Theme exported successfully and stored in %s.',
+ 'THEME_LOCATION' => 'Store stylesheet in',
+ 'THEME_LOCATION_EXPLAIN' => 'Images are always stored on the filesystem.',
+ 'THEME_NAME' => 'Theme name',
+ 'THEME_REFRESHED' => 'Theme refreshed successfully.',
+ 'THEME_UPDATED' => 'Theme updated successfully.',
+
+ 'UNDERLINE' => 'Underline',
+ 'UNINSTALLED_IMAGESET' => 'Uninstalled imagesets',
+ 'UNINSTALLED_STYLE' => 'Uninstalled styles',
+ 'UNINSTALLED_TEMPLATE' => 'Uninstalled templates',
+ 'UNINSTALLED_THEME' => 'Uninstalled themes',
+ 'UNSET' => 'Undefined',
+
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/users.php b/phpBB/language/en/acp/users.php
new file mode 100644
index 0000000000..8d9bf0d486
--- /dev/null
+++ b/phpBB/language/en/acp/users.php
@@ -0,0 +1,141 @@
+<?php
+/**
+*
+* acp_users [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'ADMIN_SIG_PREVIEW' => 'Signature preview',
+ 'AT_LEAST_ONE_FOUNDER' => 'You are not able to change this founder to a normal user. There needs to be at least one founder enabled for this board. If you want to change this users founder status, promote another user to be a founder first.',
+
+ 'BAN_ALREADY_ENTERED' => 'The ban had been previously entered successfully. The ban list has not been updated.',
+ 'BAN_SUCCESSFUL' => 'Ban entered successfully.',
+
+ 'CANNOT_BAN_FOUNDER' => 'You are not allowed to ban founder accounts.',
+ 'CANNOT_BAN_YOURSELF' => 'You are not allowed to ban yourself.',
+ 'CANNOT_DEACTIVATE_BOT' => 'You are not allowed to deactivate bot accounts. Please deactivate the bot within the bots page instead.',
+ 'CANNOT_DEACTIVATE_FOUNDER' => 'You are not allowed to deactivate founder accounts.',
+ 'CANNOT_DEACTIVATE_YOURSELF' => 'You are not allowed to deactivate your own account.',
+ 'CANNOT_FORCE_REACT_BOT' => 'You are not allowed to force reactivation on bot accounts. Please reactivate the bot within the bots page instead.',
+ 'CANNOT_FORCE_REACT_FOUNDER' => 'You are not allowed to force reactivation on founder accounts.',
+ 'CANNOT_FORCE_REACT_YOURSELF' => 'You are not allowed to force reactivation of your own account.',
+ 'CANNOT_REMOVE_ANONYMOUS' => 'You are not able to remove the guest user account.',
+ 'CANNOT_REMOVE_YOURSELF' => 'You are not allowed to remove your own user account.',
+ 'CANNOT_SET_FOUNDER_IGNORED' => 'You are not able to promote ignored users to be founders.',
+ 'CANNOT_SET_FOUNDER_INACTIVE' => 'You need to activate users before you promote them to founders, only activated users are able to be promoted.',
+ 'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing the users e-mail address.',
+
+ 'DELETE_POSTS' => 'Delete posts',
+ 'DELETE_USER' => 'Delete user',
+ 'DELETE_USER_EXPLAIN' => 'Please note that deleting a user is final, they cannot be recovered.',
+
+ 'FORCE_REACTIVATION_SUCCESS' => 'Successfully forced reactivation.',
+ 'FOUNDER' => 'Founder',
+ 'FOUNDER_EXPLAIN' => 'Founders have all administrative permissions and can never be banned, deleted or altered by non-founder members.',
+
+ 'GROUP_APPROVE' => 'Approve member',
+ 'GROUP_DEFAULT' => 'Make group default for member',
+ 'GROUP_DELETE' => 'Remove member from group',
+ 'GROUP_DEMOTE' => 'Demote group leader',
+ 'GROUP_PROMOTE' => 'Promote to group leader',
+
+ 'IP_WHOIS_FOR' => 'IP whois for %s',
+
+ 'LAST_ACTIVE' => 'Last active',
+
+ 'MOVE_POSTS_EXPLAIN' => 'Please select the forum to which you wish to move all the posts this user has made.',
+
+ 'NO_SPECIAL_RANK' => 'No special rank assigned',
+ 'NO_WARNINGS' => 'No warnings.',
+ 'NOT_MANAGE_FOUNDER' => 'You tried to manage a user with founder status. Only founders are allowed to manage other founders.',
+
+ 'QUICK_TOOLS' => 'Quick tools',
+
+ 'REGISTERED' => 'Registered',
+ 'REGISTERED_IP' => 'Registered from IP',
+ 'RETAIN_POSTS' => 'Retain posts',
+
+ 'SELECT_FORM' => 'Select form',
+ 'SELECT_USER' => 'Select user',
+
+ 'USER_ADMIN' => 'User administration',
+ 'USER_ADMIN_ACTIVATE' => 'Activate account',
+ 'USER_ADMIN_ACTIVATED' => 'User activated successfully.',
+ 'USER_ADMIN_AVATAR_REMOVED' => 'Successfully removed avatar from user account.',
+ 'USER_ADMIN_BAN_EMAIL' => 'Ban by e-mail',
+ 'USER_ADMIN_BAN_EMAIL_REASON' => 'E-mail address banned via user management',
+ 'USER_ADMIN_BAN_IP' => 'Ban by IP',
+ 'USER_ADMIN_BAN_IP_REASON' => 'IP banned via user management',
+ 'USER_ADMIN_BAN_NAME_REASON' => 'Username banned via user management',
+ 'USER_ADMIN_BAN_USER' => 'Ban by username',
+ 'USER_ADMIN_DEACTIVATE' => 'Deactivate account',
+ 'USER_ADMIN_DEACTIVED' => 'User deactivated successfully.',
+ 'USER_ADMIN_DEL_ATTACH' => 'Delete all attachments',
+ 'USER_ADMIN_DEL_AVATAR' => 'Delete avatar',
+ 'USER_ADMIN_DEL_OUTBOX' => 'Empty PM outbox',
+ 'USER_ADMIN_DEL_POSTS' => 'Delete all posts',
+ 'USER_ADMIN_DEL_SIG' => 'Delete signature',
+ 'USER_ADMIN_EXPLAIN' => 'Here you can change your users information and certain specific options.',
+ 'USER_ADMIN_FORCE' => 'Force reactivation',
+ 'USER_ADMIN_LEAVE_NR' => 'Remove from Newly Registered',
+ 'USER_ADMIN_MOVE_POSTS' => 'Move all posts',
+ 'USER_ADMIN_SIG_REMOVED' => 'Successfully removed signature from user account.',
+ 'USER_ATTACHMENTS_REMOVED' => 'Successfully removed all attachments made by this user.',
+ 'USER_AVATAR_NOT_ALLOWED' => 'The avatar cannot be displayed because avatars have been disallowed.',
+ 'USER_AVATAR_UPDATED' => 'Successfully updated user avatars details.',
+ 'USER_AVATAR_TYPE_NOT_ALLOWED' => 'The current avatar cannot be displayed because its type has been disallowed.',
+ 'USER_CUSTOM_PROFILE_FIELDS' => 'Custom profile fields',
+ 'USER_DELETED' => 'User deleted successfully.',
+ 'USER_GROUP_ADD' => 'Add user to group',
+ 'USER_GROUP_NORMAL' => 'User defined groups user is a member of',
+ 'USER_GROUP_PENDING' => 'Groups user is in pending mode',
+ 'USER_GROUP_SPECIAL' => 'Pre-defined groups user is a member of',
+ 'USER_LIFTED_NR' => 'Successfully removed the user’s newly registered status.',
+ 'USER_NO_ATTACHMENTS' => 'There are no attached files to display.',
+ 'USER_OUTBOX_EMPTIED' => 'Successfully emptied user’s private message outbox.',
+ 'USER_OUTBOX_EMPTY' => 'The user’s private message outbox was already empty.',
+ 'USER_OVERVIEW_UPDATED' => 'User details updated.',
+ 'USER_POSTS_DELETED' => 'Successfully removed all posts made by this user.',
+ 'USER_POSTS_MOVED' => 'Successfully moved users posts to target forum.',
+ 'USER_PREFS_UPDATED' => 'User preferences updated.',
+ 'USER_PROFILE' => 'User profile',
+ 'USER_PROFILE_UPDATED' => 'User profile updated.',
+ 'USER_RANK' => 'User rank',
+ 'USER_RANK_UPDATED' => 'User rank updated.',
+ 'USER_SIG_UPDATED' => 'User signature successfully updated.',
+ 'USER_WARNING_LOG_DELETED' => 'No information available. Possibly the log entry has been deleted.',
+ 'USER_TOOLS' => 'Basic tools',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/captcha_qa.php b/phpBB/language/en/captcha_qa.php
new file mode 100644
index 0000000000..1d443e995a
--- /dev/null
+++ b/phpBB/language/en/captcha_qa.php
@@ -0,0 +1,63 @@
+<?php
+/**
+*
+* captcha_qa [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2009 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'CAPTCHA_QA' => 'Q&amp;A CAPTCHA',
+ 'CONFIRM_QUESTION_EXPLAIN' => 'This question is a means of identifying and preventing automated submissions.',
+ 'CONFIRM_QUESTION_WRONG' => 'You have provided an invalid answer to the confirmation question.',
+
+ 'QUESTION_ANSWERS' => 'Answers',
+ 'ANSWERS_EXPLAIN' => 'Please enter valid answers to the question, one per line.',
+ 'CONFIRM_QUESTION' => 'Question',
+
+ 'ANSWER' => 'Answer',
+ 'EDIT_QUESTION' => 'Edit Question',
+ 'QUESTIONS' => 'Questions',
+ 'QUESTIONS_EXPLAIN' => 'During registration, users will be asked one of the questions specified here. To use this plugin, at least one question must be set in the default language. These questions should be easy for your target audience to answer, but beyond the ability of a bot capable of running a Googleâ„¢ search. Using a large and regulary changed set of questions will yield the best results. Enable the strict setting if your question relies on punctuation or capitalisation.',
+ 'QUESTION_DELETED' => 'Question deleted',
+ 'QUESTION_LANG' => 'Language',
+ 'QUESTION_LANG_EXPLAIN' => 'The language that this question and its answers are written in.',
+ 'QUESTION_STRICT' => 'Strict check',
+ 'QUESTION_STRICT_EXPLAIN' => 'If enabled, capitalisation and whitespace will also be enforced.',
+
+ 'QUESTION_TEXT' => 'Question',
+ 'QUESTION_TEXT_EXPLAIN' => 'The question that will be asked on registration.',
+
+ 'QA_ERROR_MSG' => 'Please fill in all fields and enter at least one answer.',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/captcha_recaptcha.php b/phpBB/language/en/captcha_recaptcha.php
new file mode 100644
index 0000000000..897e8a4979
--- /dev/null
+++ b/phpBB/language/en/captcha_recaptcha.php
@@ -0,0 +1,52 @@
+<?php
+/**
+*
+* recaptcha [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2009 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'RECAPTCHA_LANG' => 'en',
+ 'RECAPTCHA_NOT_AVAILABLE' => 'In order to use reCaptcha, you must create an account on <a href="http://recaptcha.net">reCaptcha.net</a>.',
+ 'CAPTCHA_RECAPTCHA' => 'reCaptcha',
+ 'RECAPTCHA_INCORRECT' => 'The visual confirmation code you submitted was incorrect',
+
+ 'RECAPTCHA_PUBLIC' => 'Public reCaptcha key',
+ 'RECAPTCHA_PUBLIC_EXPLAIN' => 'Your public reCaptcha key. Keys can be obtained on <a href="http://recaptcha.net">reCaptcha.net</a>.',
+ 'RECAPTCHA_PRIVATE' => 'Private reCaptcha key',
+ 'RECAPTCHA_PRIVATE_EXPLAIN' => 'Your private reCaptcha key. Keys can be obtained on <a href="http://recaptcha.net">reCaptcha.net</a>.',
+
+ 'RECAPTCHA_EXPLAIN' => 'In an effort to prevent automatic submissions, we require that you enter both of the words displayed below into the text field underneath.',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
new file mode 100644
index 0000000000..b97445f186
--- /dev/null
+++ b/phpBB/language/en/common.php
@@ -0,0 +1,866 @@
+<?php
+/**
+*
+* common [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ †…
+//
+
+$lang = array_merge($lang, array(
+ 'TRANSLATION_INFO' => '',
+ 'DIRECTION' => 'ltr',
+ 'DATE_FORMAT' => '|d M Y|', // 01 Jan 2007 (with Relative days enabled)
+ 'USER_LANG' => 'en-gb',
+
+ '1_DAY' => '1 day',
+ '1_MONTH' => '1 month',
+ '1_YEAR' => '1 year',
+ '2_WEEKS' => '2 weeks',
+ '3_MONTHS' => '3 months',
+ '6_MONTHS' => '6 months',
+ '7_DAYS' => '7 days',
+
+ 'ACCOUNT_ALREADY_ACTIVATED' => 'Your account has already been activated.',
+ 'ACCOUNT_DEACTIVATED' => 'Your account has been manually deactivated and is only able to be reactivated by an administrator.',
+ 'ACCOUNT_NOT_ACTIVATED' => 'Your account has not been activated yet.',
+ 'ACP' => 'Administration Control Panel',
+ 'ACTIVE' => 'active',
+ 'ACTIVE_ERROR' => 'The specified username is currently inactive. If you have problems activating your account, please contact a board administrator.',
+ 'ADMINISTRATOR' => 'Administrator',
+ 'ADMINISTRATORS' => 'Administrators',
+ 'AGE' => 'Age',
+ 'AIM' => 'AIM',
+ 'ALLOWED' => 'Allowed',
+ 'ALL_FILES' => 'All files',
+ 'ALL_FORUMS' => 'All forums',
+ 'ALL_MESSAGES' => 'All messages',
+ 'ALL_POSTS' => 'All posts',
+ 'ALL_TIMES' => 'All times are %1$s %2$s',
+ 'ALL_TOPICS' => 'All Topics',
+ 'AND' => 'And',
+ 'ARE_WATCHING_FORUM' => 'You have subscribed to be notified of new posts in this forum.',
+ 'ARE_WATCHING_TOPIC' => 'You have subscribed to be notified of new posts in this topic.',
+ 'ASCENDING' => 'Ascending',
+ 'ATTACHMENTS' => 'Attachments',
+ 'ATTACHED_IMAGE_NOT_IMAGE' => 'The image file you tried to attach is invalid.',
+ 'AUTHOR' => 'Author',
+ 'AUTH_NO_PROFILE_CREATED' => 'The creation of a user profile was unsuccessful.',
+ 'AVATAR_DISALLOWED_CONTENT' => 'The upload was rejected because the uploaded file was identified as a possible attack vector.',
+ 'AVATAR_DISALLOWED_EXTENSION' => 'This file cannot be displayed because the extension <strong>%s</strong> is not allowed.',
+ 'AVATAR_EMPTY_REMOTE_DATA' => 'The specified avatar could not be uploaded because the remote data appears to be invalid or corrupted.',
+ 'AVATAR_EMPTY_FILEUPLOAD' => 'The uploaded avatar file is empty.',
+ 'AVATAR_INVALID_FILENAME' => '%s is an invalid filename.',
+ 'AVATAR_NOT_UPLOADED' => 'Avatar could not be uploaded.',
+ 'AVATAR_NO_SIZE' => 'The width or height of the linked avatar could not be determined. Please enter them manually.',
+ 'AVATAR_PARTIAL_UPLOAD' => 'The specified file was only partially uploaded.',
+ 'AVATAR_PHP_SIZE_NA' => 'The avatar’s filesize is too large.<br />The maximum allowed filesize set in php.ini could not be determined.',
+ 'AVATAR_PHP_SIZE_OVERRUN' => 'The avatar’s filesize is too large. The maximum allowed upload size is %1$d %2$s.<br />Please note this is set in php.ini and cannot be overridden.',
+ 'AVATAR_URL_INVALID' => 'The URL you specified is invalid.',
+ 'AVATAR_URL_NOT_FOUND' => 'The file specified could not be found.',
+ 'AVATAR_WRONG_FILESIZE' => 'The avatar’s filesize must be between 0 and %1d %2s.',
+ 'AVATAR_WRONG_SIZE' => 'The submitted avatar is %5$d pixels wide and %6$d pixels high. Avatars must be at least %1$d pixels wide and %2$d pixels high, but no larger than %3$d pixels wide and %4$d pixels high.',
+
+ 'BACK_TO_TOP' => 'Top',
+ 'BACK_TO_PREV' => 'Back to previous page',
+ 'BAN_TRIGGERED_BY_EMAIL'=> 'A ban has been issued on your e-mail address.',
+ 'BAN_TRIGGERED_BY_IP' => 'A ban has been issued on your IP address.',
+ 'BAN_TRIGGERED_BY_USER' => 'A ban has been issued on your username.',
+ 'BBCODE_GUIDE' => 'BBCode guide',
+ 'BCC' => 'BCC',
+ 'BIRTHDAYS' => 'Birthdays',
+ 'BOARD_BAN_PERM' => 'You have been <strong>permanently</strong> banned from this board.<br /><br />Please contact the %2$sBoard Administrator%3$s for more information.',
+ 'BOARD_BAN_REASON' => 'Reason given for ban: <strong>%s</strong>',
+ 'BOARD_BAN_TIME' => 'You have been banned from this board until <strong>%1$s</strong>.<br /><br />Please contact the %2$sBoard Administrator%3$s for more information.',
+ 'BOARD_DISABLE' => 'Sorry but this board is currently unavailable.',
+ 'BOARD_DISABLED' => 'This board is currently disabled.',
+ 'BOARD_UNAVAILABLE' => 'Sorry but the board is temporarily unavailable, please try again in a few minutes.',
+ 'BROWSING_FORUM' => 'Users browsing this forum: %1$s',
+ 'BROWSING_FORUM_GUEST' => 'Users browsing this forum: %1$s and %2$d guest',
+ 'BROWSING_FORUM_GUESTS' => 'Users browsing this forum: %1$s and %2$d guests',
+ 'BYTES' => 'Bytes',
+
+ 'CANCEL' => 'Cancel',
+ 'CHANGE' => 'Change',
+ 'CHANGE_FONT_SIZE' => 'Change font size',
+ 'CHANGING_PREFERENCES' => 'Changing board preferences',
+ 'CHANGING_PROFILE' => 'Changing profile settings',
+ 'CLICK_VIEW_PRIVMSG' => '%sGo to your inbox%s',
+ 'COLLAPSE_VIEW' => 'Collapse view',
+ 'CLOSE_WINDOW' => 'Close window',
+ 'COLOUR_SWATCH' => 'Colour swatch',
+ 'COMMA_SEPARATOR' => ', ', // Used in pagination of ACP & prosilver, use localised comma if appropriate, eg: Ideographic or Arabic
+ 'CONFIRM' => 'Confirm',
+ 'CONFIRM_CODE' => 'Confirmation code',
+ 'CONFIRM_CODE_EXPLAIN' => 'Enter the code exactly as it appears. All letters are case insensitive, there is no zero.',
+ 'CONFIRM_CODE_WRONG' => 'The confirmation code you entered was incorrect.',
+ 'CONFIRM_OPERATION' => 'Are you sure you wish to carry out this operation?',
+ 'CONGRATULATIONS' => 'Congratulations to',
+ 'CONNECTION_FAILED' => 'Connection failed.',
+ 'CONNECTION_SUCCESS' => 'Connection was successful!',
+ 'COOKIES_DELETED' => 'All board cookies successfully deleted.',
+ 'CURRENT_TIME' => 'It is currently %s',
+
+ 'DAY' => 'Day',
+ 'DAYS' => 'Days',
+ 'DELETE' => 'Delete',
+ 'DELETE_ALL' => 'Delete all',
+ 'DELETE_COOKIES' => 'Delete all board cookies',
+ 'DELETE_MARKED' => 'Delete marked',
+ 'DELETE_POST' => 'Delete post',
+ 'DELIMITER' => 'Delimiter',
+ 'DESCENDING' => 'Descending',
+ 'DISABLED' => 'Disabled',
+ 'DISPLAY' => 'Display',
+ 'DISPLAY_GUESTS' => 'Display guests',
+ 'DISPLAY_MESSAGES' => 'Display messages from previous',
+ 'DISPLAY_POSTS' => 'Display posts from previous',
+ 'DISPLAY_TOPICS' => 'Display topics from previous',
+ 'DOWNLOADED' => 'Downloaded',
+ 'DOWNLOADING_FILE' => 'Downloading file',
+ 'DOWNLOAD_COUNT' => 'Downloaded %d time',
+ 'DOWNLOAD_COUNTS' => 'Downloaded %d times',
+ 'DOWNLOAD_COUNT_NONE' => 'Not downloaded yet',
+ 'VIEWED_COUNT' => 'Viewed %d time',
+ 'VIEWED_COUNTS' => 'Viewed %d times',
+ 'VIEWED_COUNT_NONE' => 'Not viewed yet',
+
+ 'EDIT_POST' => 'Edit post',
+ 'EMAIL' => 'E-mail', // Short form for EMAIL_ADDRESS
+ 'EMAIL_ADDRESS' => 'E-mail address',
+ 'EMAIL_SMTP_ERROR_RESPONSE' => 'Ran into problems sending e-mail at <strong>Line %1$s</strong>. Response: %2$s.',
+ 'EMPTY_SUBJECT' => 'You must specify a subject when posting a new topic.',
+ 'EMPTY_MESSAGE_SUBJECT' => 'You must specify a subject when composing a new message.',
+ 'ENABLED' => 'Enabled',
+ 'ENCLOSURE' => 'Enclosure',
+ 'ERR_CHANGING_DIRECTORY' => 'Unable to change directory.',
+ 'ERR_CONNECTING_SERVER' => 'Error connecting to the server.',
+ 'ERR_JAB_AUTH' => 'Could not authorise on Jabber server.',
+ 'ERR_JAB_CONNECT' => 'Could not connect to Jabber server.',
+ 'ERR_UNABLE_TO_LOGIN' => 'The specified username or password is incorrect.',
+ 'ERR_UNWATCHING' => 'An error occured while trying to unsubscribe.',
+ 'ERR_WATCHING' => 'An error occured while trying to subscribe.',
+ 'ERR_WRONG_PATH_TO_PHPBB' => 'The phpBB path specified appears to be invalid.',
+ 'EXPAND_VIEW' => 'Expand view',
+ 'EXTENSION' => 'Extension',
+ 'EXTENSION_DISABLED_AFTER_POSTING' => 'The extension <strong>%s</strong> has been deactivated and can no longer be displayed.',
+
+ 'FAQ' => 'FAQ',
+ 'FAQ_EXPLAIN' => 'Frequently Asked Questions',
+ 'FILENAME' => 'Filename',
+ 'FILESIZE' => 'File size',
+ 'FILEDATE' => 'File date',
+ 'FILE_COMMENT' => 'File comment',
+ 'FILE_NOT_FOUND' => 'The requested file could not be found.',
+ 'FIND_USERNAME' => 'Find a member',
+ 'FOLDER' => 'Folder',
+ 'FORGOT_PASS' => 'I forgot my password',
+ 'FORM_INVALID' => 'The submitted form was invalid. Try submitting again.',
+ 'FORUM' => 'Forum',
+ 'FORUMS' => 'Forums',
+ 'FORUMS_MARKED' => 'All forums have been marked read.',
+ 'FORUM_CAT' => 'Forum category',
+ 'FORUM_INDEX' => 'Board index',
+ 'FORUM_LINK' => 'Forum link',
+ 'FORUM_LOCATION' => 'Forum location',
+ 'FORUM_LOCKED' => 'Forum locked',
+ 'FORUM_RULES' => 'Forum rules',
+ 'FORUM_RULES_LINK' => 'Please click here to view the forum rules',
+ 'FROM' => 'from',
+ 'FSOCK_DISABLED' => 'The operation could not be completed because the <var>fsockopen</var> function has been disabled or the server being queried could not be found.',
+
+ 'FTP_FSOCK_HOST' => 'FTP host',
+ 'FTP_FSOCK_HOST_EXPLAIN' => 'FTP server used to connect your site.',
+ 'FTP_FSOCK_PASSWORD' => 'FTP password',
+ 'FTP_FSOCK_PASSWORD_EXPLAIN' => 'Password for your FTP username.',
+ 'FTP_FSOCK_PORT' => 'FTP port',
+ 'FTP_FSOCK_PORT_EXPLAIN' => 'Port used to connect to your server.',
+ 'FTP_FSOCK_ROOT_PATH' => 'Path to phpBB',
+ 'FTP_FSOCK_ROOT_PATH_EXPLAIN' => 'Path from the root to your phpBB board.',
+ 'FTP_FSOCK_TIMEOUT' => 'FTP timeout',
+ 'FTP_FSOCK_TIMEOUT_EXPLAIN' => 'The amount of time, in seconds, that the system will wait for a reply from your server.',
+ 'FTP_FSOCK_USERNAME' => 'FTP username',
+ 'FTP_FSOCK_USERNAME_EXPLAIN' => 'Username used to connect to your server.',
+
+ 'FTP_HOST' => 'FTP host',
+ 'FTP_HOST_EXPLAIN' => 'FTP server used to connect your site.',
+ 'FTP_PASSWORD' => 'FTP password',
+ 'FTP_PASSWORD_EXPLAIN' => 'Password for your FTP username.',
+ 'FTP_PORT' => 'FTP port',
+ 'FTP_PORT_EXPLAIN' => 'Port used to connect to your server.',
+ 'FTP_ROOT_PATH' => 'Path to phpBB',
+ 'FTP_ROOT_PATH_EXPLAIN' => 'Path from the root to your phpBB board.',
+ 'FTP_TIMEOUT' => 'FTP timeout',
+ 'FTP_TIMEOUT_EXPLAIN' => 'The amount of time, in seconds, that the system will wait for a reply from your server.',
+ 'FTP_USERNAME' => 'FTP username',
+ 'FTP_USERNAME_EXPLAIN' => 'Username used to connect to your server.',
+
+ 'GENERAL_ERROR' => 'General Error',
+ 'GB' => 'GB',
+ 'GIB' => 'GiB',
+ 'GO' => 'Go',
+ 'GOTO_PAGE' => 'Go to page',
+ 'GROUP' => 'Group',
+ 'GROUPS' => 'Groups',
+ 'GROUP_ERR_TYPE' => 'Inappropriate group type specified.',
+ 'GROUP_ERR_USERNAME' => 'No group name specified.',
+ 'GROUP_ERR_USER_LONG' => 'Group names cannot exceed 60 characters. The specified group name is too long.',
+ 'GUEST' => 'Guest',
+ 'GUEST_USERS_ONLINE' => 'There are %d guest users online',
+ 'GUEST_USERS_TOTAL' => '%d guests',
+ 'GUEST_USERS_ZERO_ONLINE' => 'There are 0 guest users online',
+ 'GUEST_USERS_ZERO_TOTAL' => '0 guests',
+ 'GUEST_USER_ONLINE' => 'There is %d guest user online',
+ 'GUEST_USER_TOTAL' => '%d guest',
+ 'G_ADMINISTRATORS' => 'Administrators',
+ 'G_BOTS' => 'Bots',
+ 'G_GUESTS' => 'Guests',
+ 'G_REGISTERED' => 'Registered users',
+ 'G_REGISTERED_COPPA' => 'Registered COPPA users',
+ 'G_GLOBAL_MODERATORS' => 'Global moderators',
+ 'G_NEWLY_REGISTERED' => 'Newly registered users',
+
+ 'HIDDEN_USERS_ONLINE' => '%d hidden users online',
+ 'HIDDEN_USERS_TOTAL' => '%d hidden',
+ 'HIDDEN_USERS_TOTAL_AND' => '%d hidden and ',
+ 'HIDDEN_USERS_ZERO_ONLINE' => '0 hidden users online',
+ 'HIDDEN_USERS_ZERO_TOTAL' => '0 hidden',
+ 'HIDDEN_USERS_ZERO_TOTAL_AND' => '0 hidden and ',
+ 'HIDDEN_USER_ONLINE' => '%d hidden user online',
+ 'HIDDEN_USER_TOTAL' => '%d hidden',
+ 'HIDDEN_USER_TOTAL_AND' => '%d hidden and ',
+ 'HIDE_GUESTS' => 'Hide guests',
+ 'HIDE_ME' => 'Hide my online status this session',
+ 'HOURS' => 'Hours',
+ 'HOME' => 'Home',
+
+ 'ICQ' => 'ICQ',
+ 'ICQ_STATUS' => 'ICQ status',
+ 'IF' => 'If',
+ 'IMAGE' => 'Image',
+ 'IMAGE_FILETYPE_INVALID' => 'Image file type %d for mimetype %s not supported.',
+ 'IMAGE_FILETYPE_MISMATCH' => 'Image file type mismatch: expected extension %1$s but extension %2$s given.',
+ 'IN' => 'in',
+ 'INDEX' => 'Index page',
+ 'INFORMATION' => 'Information',
+ 'INTERESTS' => 'Interests',
+ 'INVALID_DIGEST_CHALLENGE' => 'Invalid digest challenge.',
+ 'INVALID_EMAIL_LOG' => '<strong>%s</strong> possibly an invalid e-mail address?',
+ 'IP' => 'IP',
+ 'IP_BLACKLISTED' => 'Your IP %1$s has been blocked because it is blacklisted. For details please see <a href="%2$s">%2$s</a>.',
+
+ 'JABBER' => 'Jabber',
+ 'JOINED' => 'Joined',
+ 'JUMP_PAGE' => 'Enter the page number you wish to go to',
+ 'JUMP_TO' => 'Jump to',
+ 'JUMP_TO_PAGE' => 'Click to jump to page…',
+
+ 'KB' => 'KB',
+ 'KIB' => 'KiB',
+
+ 'LAST_POST' => 'Last post',
+ 'LAST_UPDATED' => 'Last updated',
+ 'LAST_VISIT' => 'Last visit',
+ 'LDAP_NO_LDAP_EXTENSION' => 'LDAP extension not available.',
+ 'LDAP_NO_SERVER_CONNECTION' => 'Could not connect to LDAP server.',
+ 'LEGEND' => 'Legend',
+ 'LOCATION' => 'Location',
+ 'LOCK_POST' => 'Lock post',
+ 'LOCK_POST_EXPLAIN' => 'Prevent editing',
+ 'LOCK_TOPIC' => 'Lock topic',
+ 'LOGIN' => 'Login',
+ 'LOGIN_CHECK_PM' => 'Log in to check your private messages.',
+ 'LOGIN_CONFIRMATION' => 'Confirmation of login',
+ 'LOGIN_CONFIRM_EXPLAIN' => 'To prevent brute forcing accounts the board requires you to enter a confirmation code after a maximum amount of failed logins. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.',
+ 'LOGIN_ERROR_ATTEMPTS' => 'You exceeded the maximum allowed number of login attempts. In addition to your username and password you now also have to enter the confirm code from the image you see below.',
+ 'LOGIN_ERROR_EXTERNAL_AUTH_APACHE' => 'You have not been authenticated by Apache.',
+ 'LOGIN_ERROR_PASSWORD' => 'You have specified an incorrect password. Please check your password and try again. If you continue to have problems please contact the %sBoard Administrator%s.',
+ 'LOGIN_ERROR_PASSWORD_CONVERT' => 'It was not possible to convert your password when updating this bulletin board’s software. Please %srequest a new password%s. If you continue to have problems please contact the %sBoard Administrator%s.',
+ 'LOGIN_ERROR_USERNAME' => 'You have specified an incorrect username. Please check your username and try again. If you continue to have problems please contact the %sBoard Administrator%s.',
+ 'LOGIN_FORUM' => 'To view or post in this forum you must enter its password.',
+ 'LOGIN_INFO' => 'In order to login you must be registered. Registering takes only a few moments but gives you increased capabilities. The board administrator may also grant additional permissions to registered users. Before you register please ensure you are familiar with our terms of use and related policies. Please ensure you read any forum rules as you navigate around the board.',
+ 'LOGIN_VIEWFORUM' => 'The board requires you to be registered and logged in to view this forum.',
+ 'LOGIN_EXPLAIN_EDIT' => 'In order to edit posts in this forum you have to be registered and logged in.',
+ 'LOGIN_EXPLAIN_VIEWONLINE' => 'In order to view the online list you have to be registered and logged in.',
+ 'LOGOUT' => 'Logout',
+ 'LOGOUT_USER' => 'Logout [ %s ]',
+ 'LOG_ME_IN' => 'Log me on automatically each visit',
+
+ 'MARK' => 'Mark',
+ 'MARK_ALL' => 'Mark all',
+ 'MARK_FORUMS_READ' => 'Mark forums read',
+ 'MB' => 'MB',
+ 'MIB' => 'MiB',
+ 'MCP' => 'Moderator Control Panel',
+ 'MEMBERLIST' => 'Members',
+ 'MEMBERLIST_EXPLAIN' => 'View complete list of members',
+ 'MERGE' => 'Merge',
+ 'MERGE_POSTS' => 'Merge posts',
+ 'MERGE_TOPIC' => 'Merge topic',
+ 'MESSAGE' => 'Message',
+ 'MESSAGES' => 'Messages',
+ 'MESSAGE_BODY' => 'Message body',
+ 'MINUTES' => 'Minutes',
+ 'MODERATE' => 'Moderate',
+ 'MODERATOR' => 'Moderator',
+ 'MODERATORS' => 'Moderators',
+ 'MONTH' => 'Month',
+ 'MOVE' => 'Move',
+ 'MSNM' => 'MSNM/WLM',
+
+ 'NA' => 'N/A',
+ 'NEWEST_USER' => 'Our newest member <strong>%s</strong>',
+ 'NEW_MESSAGE' => 'New message',
+ 'NEW_MESSAGES' => 'New messages',
+ 'NEW_PM' => '<strong>%d</strong> new message',
+ 'NEW_PMS' => '<strong>%d</strong> new messages',
+ 'NEW_POST' => 'New post',
+ 'NEW_POSTS' => 'New posts',
+ 'NEXT' => 'Next', // Used in pagination
+ 'NEXT_STEP' => 'Next',
+ 'NEVER' => 'Never',
+ 'NO' => 'No',
+ 'NOT_ALLOWED_MANAGE_GROUP' => 'You are not allowed to manage this group.',
+ 'NOT_AUTHORISED' => 'You are not authorised to access this area.',
+ 'NOT_WATCHING_FORUM' => 'You are no longer subscribed to updates on this forum.',
+ 'NOT_WATCHING_TOPIC' => 'You are no longer subscribed to this topic.',
+ 'NOTIFY_ADMIN' => 'Please notify the board administrator or webmaster.',
+ 'NOTIFY_ADMIN_EMAIL' => 'Please notify the board administrator or webmaster: <a href="mailto:%1$s">%1$s</a>',
+ 'NO_ACCESS_ATTACHMENT' => 'You are not allowed to access this file.',
+ 'NO_ACTION' => 'No action specified.',
+ 'NO_ADMINISTRATORS' => 'There are no administrators.',
+ 'NO_AUTH_ADMIN' => 'Access to the Administration Control Panel is not allowed as you do not have administrative permissions.',
+ 'NO_AUTH_ADMIN_USER_DIFFER' => 'You are not able to re-authenticate as a different user.',
+ 'NO_AUTH_OPERATION' => 'You do not have the necessary permissions to complete this operation.',
+ 'NO_CONNECT_TO_SMTP_HOST' => 'Could not connect to smtp host : %1$s : %2$s',
+ 'NO_BIRTHDAYS' => 'No birthdays today',
+ 'NO_EMAIL_MESSAGE' => 'E-mail message was blank.',
+ 'NO_EMAIL_RESPONSE_CODE' => 'Could not get mail server response codes.',
+ 'NO_EMAIL_SUBJECT' => 'No e-mail subject specified.',
+ 'NO_FORUM' => 'The forum you selected does not exist.',
+ 'NO_FORUMS' => 'This board has no forums.',
+ 'NO_GROUP' => 'The requested usergroup does not exist.',
+ 'NO_GROUP_MEMBERS' => 'This group currently has no members.',
+ 'NO_IPS_DEFINED' => 'No IP addresses or hostnames defined',
+ 'NO_MEMBERS' => 'No members found for this search criterion.',
+ 'NO_MESSAGES' => 'No messages',
+ 'NO_MODE' => 'No mode specified.',
+ 'NO_MODERATORS' => 'There are no moderators.',
+ 'NO_NEW_MESSAGES' => 'No new messages',
+ 'NO_NEW_PM' => '<strong>0</strong> new messages',
+ 'NO_NEW_POSTS' => 'No new posts',
+ 'NO_ONLINE_USERS' => 'No registered users',
+ 'NO_POSTS' => 'No posts',
+ 'NO_POSTS_TIME_FRAME' => 'No posts exist inside this topic for the selected time frame.',
+ 'NO_FEED_ENABLED' => 'Feeds are not available on this board.',
+ 'NO_FEED' => 'The requested feed is not available.',
+ 'NO_SUBJECT' => 'No subject specified', // Used for posts having no subject defined but displayed within management pages.
+ 'NO_SUCH_SEARCH_MODULE' => 'The specified search backend doesn’t exist.',
+ 'NO_SUPPORTED_AUTH_METHODS' => 'No supported authentication methods.',
+ 'NO_TOPIC' => 'The requested topic does not exist.',
+ 'NO_TOPIC_FORUM' => 'The topic or forum no longer exists.',
+ 'NO_TOPICS' => 'There are no topics or posts in this forum.',
+ 'NO_TOPICS_TIME_FRAME' => 'No topics exist inside this forum for the selected time frame.',
+ 'NO_UNREAD_PM' => '<strong>0</strong> unread messages',
+ 'NO_UPLOAD_FORM_FOUND' => 'Upload initiated but no valid file upload form found.',
+ 'NO_USER' => 'The requested user does not exist.',
+ 'NO_USERS' => 'The requested users do not exist.',
+ 'NO_USER_SPECIFIED' => 'No username was specified.',
+
+ // Nullar/Singular/Plural language entry. The key numbers define the number range in which a certain grammatical expression is valid.
+ 'NUM_POSTS_IN_QUEUE' => array(
+ 0 => 'No posts in queue', // 0
+ 1 => '1 post in queue', // 1
+ 2 => '%d posts in queue', // 2+
+ ),
+
+ 'OCCUPATION' => 'Occupation',
+ 'OFFLINE' => 'Offline',
+ 'ONLINE' => 'Online',
+ 'ONLINE_BUDDIES' => 'Online friends',
+ 'ONLINE_USERS_TOTAL' => 'In total there are <strong>%d</strong> users online :: ',
+ 'ONLINE_USERS_ZERO_TOTAL' => 'In total there are <strong>0</strong> users online :: ',
+ 'ONLINE_USER_TOTAL' => 'In total there is <strong>%d</strong> user online :: ',
+ 'OPTIONS' => 'Options',
+
+ 'PAGE_OF' => 'Page <strong>%1$d</strong> of <strong>%2$d</strong>',
+ 'PASSWORD' => 'Password',
+ 'PLAY_QUICKTIME_FILE' => 'Play Quicktime file',
+ 'PM' => 'PM',
+ 'POSTING_MESSAGE' => 'Posting message in %s',
+ 'POSTING_PRIVATE_MESSAGE' => 'Composing private message',
+ 'POST' => 'Post',
+ 'POST_ANNOUNCEMENT' => 'Announce',
+ 'POST_STICKY' => 'Sticky',
+ 'POSTED' => 'Posted',
+ 'POSTED_IN_FORUM' => 'in',
+ 'POSTED_ON_DATE' => 'on',
+ 'POSTS' => 'Posts',
+ 'POSTS_UNAPPROVED' => 'At least one post in this topic has not been approved.',
+ 'POST_BY_AUTHOR' => 'by',
+ 'POST_BY_FOE' => 'This post was made by <strong>%1$s</strong> who is currently on your ignore list. %2$sDisplay this post%3$s.',
+ 'POST_DAY' => '%.2f posts per day',
+ 'POST_DETAILS' => 'Post details',
+ 'POST_NEW_TOPIC' => 'Post new topic',
+ 'POST_PCT' => '%.2f%% of all posts',
+ 'POST_PCT_ACTIVE' => '%.2f%% of user’s posts',
+ 'POST_PCT_ACTIVE_OWN' => '%.2f%% of your posts',
+ 'POST_REPLY' => 'Post a reply',
+ 'POST_REPORTED' => 'Click to view report',
+ 'POST_SUBJECT' => 'Post subject',
+ 'POST_TIME' => 'Post time',
+ 'POST_TOPIC' => 'Post a new topic',
+ 'POST_UNAPPROVED' => 'This post is waiting for approval',
+ 'PREVIEW' => 'Preview',
+ 'PREVIOUS' => 'Previous', // Used in pagination
+ 'PREVIOUS_STEP' => 'Previous',
+ 'PRIVACY' => 'Privacy policy',
+ 'PRIVATE_MESSAGE' => 'Private message',
+ 'PRIVATE_MESSAGES' => 'Private messages',
+ 'PRIVATE_MESSAGING' => 'Private messaging',
+ 'PROFILE' => 'User Control Panel',
+
+ 'READING_FORUM' => 'Viewing topics in %s',
+ 'READING_GLOBAL_ANNOUNCE' => 'Reading global announcement',
+ 'READING_LINK' => 'Following forum link %s',
+ 'READING_TOPIC' => 'Reading topic in %s',
+ 'READ_PROFILE' => 'Profile',
+ 'REASON' => 'Reason',
+ 'RECORD_ONLINE_USERS' => 'Most users ever online was <strong>%1$s</strong> on %2$s',
+ 'REDIRECT' => 'Redirect',
+ 'REDIRECTS' => 'Total redirects',
+ 'REGISTER' => 'Register',
+ 'REGISTERED_USERS' => 'Registered users:',
+ 'REG_USERS_ONLINE' => 'There are %d registered users and ',
+ 'REG_USERS_TOTAL' => '%d registered, ',
+ 'REG_USERS_TOTAL_AND' => '%d registered and ',
+ 'REG_USERS_ZERO_ONLINE' => 'There are 0 registered users and ',
+ 'REG_USERS_ZERO_TOTAL' => '0 registered, ',
+ 'REG_USERS_ZERO_TOTAL_AND' => '0 registered and ',
+ 'REG_USER_ONLINE' => 'There is %d registered user and ',
+ 'REG_USER_TOTAL' => '%d registered, ',
+ 'REG_USER_TOTAL_AND' => '%d registered and ',
+ 'REMOVE' => 'Remove',
+ 'REMOVE_INSTALL' => 'Please delete, move or rename the install directory before you use your board. If this directory is still present, only the Administration Control Panel (ACP) will be accessible.',
+ 'REPLIES' => 'Replies',
+ 'REPLY_WITH_QUOTE' => 'Reply with quote',
+ 'REPLYING_GLOBAL_ANNOUNCE' => 'Replying to global announcement',
+ 'REPLYING_MESSAGE' => 'Replying to message in %s',
+ 'REPORT_BY' => 'Report by',
+ 'REPORT_POST' => 'Report this post',
+ 'REPORTING_POST' => 'Reporting post',
+ 'RESEND_ACTIVATION' => 'Resend activation e-mail',
+ 'RESET' => 'Reset',
+ 'RESTORE_PERMISSIONS' => 'Restore permissions',
+ 'RETURN_INDEX' => '%sReturn to the index page%s',
+ 'RETURN_FORUM' => '%sReturn to the forum last visited%s',
+ 'RETURN_PAGE' => '%sReturn to the previous page%s',
+ 'RETURN_TOPIC' => '%sReturn to the topic last visited%s',
+ 'RETURN_TO' => 'Return to',
+ 'FEED' => 'Feed',
+ 'FEED_NEWS' => 'News',
+ 'RULES_ATTACH_CAN' => 'You <strong>can</strong> post attachments in this forum',
+ 'RULES_ATTACH_CANNOT' => 'You <strong>cannot</strong> post attachments in this forum',
+ 'RULES_DELETE_CAN' => 'You <strong>can</strong> delete your posts in this forum',
+ 'RULES_DELETE_CANNOT' => 'You <strong>cannot</strong> delete your posts in this forum',
+ 'RULES_DOWNLOAD_CAN' => 'You <strong>can</strong> download attachments in this forum',
+ 'RULES_DOWNLOAD_CANNOT' => 'You <strong>cannot</strong> download attachments in this forum',
+ 'RULES_EDIT_CAN' => 'You <strong>can</strong> edit your posts in this forum',
+ 'RULES_EDIT_CANNOT' => 'You <strong>cannot</strong> edit your posts in this forum',
+ 'RULES_LOCK_CAN' => 'You <strong>can</strong> lock your topics in this forum',
+ 'RULES_LOCK_CANNOT' => 'You <strong>cannot</strong> lock your topics in this forum',
+ 'RULES_POST_CAN' => 'You <strong>can</strong> post new topics in this forum',
+ 'RULES_POST_CANNOT' => 'You <strong>cannot</strong> post new topics in this forum',
+ 'RULES_REPLY_CAN' => 'You <strong>can</strong> reply to topics in this forum',
+ 'RULES_REPLY_CANNOT' => 'You <strong>cannot</strong> reply to topics in this forum',
+ 'RULES_VOTE_CAN' => 'You <strong>can</strong> vote in polls in this forum',
+ 'RULES_VOTE_CANNOT' => 'You <strong>cannot</strong> vote in polls in this forum',
+
+ 'SEARCH' => 'Search',
+ 'SEARCH_MINI' => 'Search…',
+ 'SEARCH_ADV' => 'Advanced search',
+ 'SEARCH_ADV_EXPLAIN' => 'View the advanced search options',
+ 'SEARCH_KEYWORDS' => 'Search for keywords',
+ 'SEARCHING_FORUMS' => 'Searching forums',
+ 'SEARCH_ACTIVE_TOPICS' => 'View active topics',
+ 'SEARCH_FOR' => 'Search for',
+ 'SEARCH_FORUM' => 'Search this forum…',
+ 'SEARCH_NEW' => 'View new posts',
+ 'SEARCH_POSTS_BY' => 'Search posts by',
+ 'SEARCH_SELF' => 'View your posts',
+ 'SEARCH_TOPIC' => 'Search this topic…',
+ 'SEARCH_UNANSWERED' => 'View unanswered posts',
+ 'SEARCH_UNREAD' => 'View unread posts',
+ 'SECONDS' => 'Seconds',
+ 'SELECT' => 'Select',
+ 'SELECT_ALL_CODE' => 'Select all',
+ 'SELECT_DESTINATION_FORUM' => 'Please select a destination forum',
+ 'SELECT_FORUM' => 'Select a forum',
+ 'SEND_EMAIL' => 'E-mail', // Used for submit buttons
+ 'SEND_EMAIL_USER' => 'E-mail', // Used as: {L_SEND_EMAIL_USER} {USERNAME} -> E-mail UserX
+ 'SEND_PRIVATE_MESSAGE' => 'Send private message',
+ 'SETTINGS' => 'Settings',
+ 'SIGNATURE' => 'Signature',
+ 'SKIP' => 'Skip to content',
+ 'SMTP_NO_AUTH_SUPPORT' => 'SMTP server does not support authentication.',
+ 'SORRY_AUTH_READ' => 'You are not authorised to read this forum.',
+ 'SORRY_AUTH_VIEW_ATTACH' => 'You are not authorised to download this attachment.',
+ 'SORT_BY' => 'Sort by',
+ 'SORT_JOINED' => 'Joined date',
+ 'SORT_LOCATION' => 'Location',
+ 'SORT_RANK' => 'Rank',
+ 'SORT_POSTS' => 'Posts',
+ 'SORT_TOPIC_TITLE' => 'Topic title',
+ 'SORT_USERNAME' => 'Username',
+ 'SPLIT_TOPIC' => 'Split topic',
+ 'SQL_ERROR_OCCURRED' => 'An SQL error occurred while fetching this page. Please contact the %sBoard Administrator%s if this problem persists.',
+ 'STATISTICS' => 'Statistics',
+ 'START_WATCHING_FORUM' => 'Subscribe forum',
+ 'START_WATCHING_TOPIC' => 'Subscribe topic',
+ 'STOP_WATCHING_FORUM' => 'Unsubscribe forum',
+ 'STOP_WATCHING_TOPIC' => 'Unsubscribe topic',
+ 'SUBFORUM' => 'Subforum',
+ 'SUBFORUMS' => 'Subforums',
+ 'SUBJECT' => 'Subject',
+ 'SUBMIT' => 'Submit',
+
+ 'TERMS_USE' => 'Terms of use',
+ 'TEST_CONNECTION' => 'Test connection',
+ 'THE_TEAM' => 'The team',
+ 'TIME' => 'Time',
+
+ 'TOO_LONG' => 'The value you entered is too long.',
+
+ 'TOO_LONG_AIM' => 'The screenname you entered is too long.',
+ 'TOO_LONG_CONFIRM_CODE' => 'The confirm code you entered is too long.',
+ 'TOO_LONG_DATEFORMAT' => 'The date format you entered is too long.',
+ 'TOO_LONG_ICQ' => 'The ICQ number you entered is too long.',
+ 'TOO_LONG_INTERESTS' => 'The interests you entered is too long.',
+ 'TOO_LONG_JABBER' => 'The Jabber account name you entered is too long.',
+ 'TOO_LONG_LOCATION' => 'The location you entered is too long.',
+ 'TOO_LONG_MSN' => 'The MSNM/WLM name you entered is too long.',
+ 'TOO_LONG_NEW_PASSWORD' => 'The password you entered is too long.',
+ 'TOO_LONG_OCCUPATION' => 'The occupation you entered is too long.',
+ 'TOO_LONG_PASSWORD_CONFIRM' => 'The password confirmation you entered is too long.',
+ 'TOO_LONG_USER_PASSWORD' => 'The password you entered is too long.',
+ 'TOO_LONG_USERNAME' => 'The username you entered is too long.',
+ 'TOO_LONG_EMAIL' => 'The e-mail address you entered is too long.',
+ 'TOO_LONG_EMAIL_CONFIRM' => 'The e-mail address confirmation you entered is too long.',
+ 'TOO_LONG_WEBSITE' => 'The website address you entered is too long.',
+ 'TOO_LONG_YIM' => 'The Yahoo! Messenger name you entered is too long.',
+
+ 'TOO_MANY_VOTE_OPTIONS' => 'You have tried to vote for too many options.',
+
+ 'TOO_SHORT' => 'The value you entered is too short.',
+
+ 'TOO_SHORT_AIM' => 'The screenname you entered is too short.',
+ 'TOO_SHORT_CONFIRM_CODE' => 'The confirm code you entered is too short.',
+ 'TOO_SHORT_DATEFORMAT' => 'The date format you entered is too short.',
+ 'TOO_SHORT_ICQ' => 'The ICQ number you entered is too short.',
+ 'TOO_SHORT_INTERESTS' => 'The interests you entered is too short.',
+ 'TOO_SHORT_JABBER' => 'The Jabber account name you entered is too short.',
+ 'TOO_SHORT_LOCATION' => 'The location you entered is too short.',
+ 'TOO_SHORT_MSN' => 'The MSNM/WLM name you entered is too short.',
+ 'TOO_SHORT_NEW_PASSWORD' => 'The password you entered is too short.',
+ 'TOO_SHORT_OCCUPATION' => 'The occupation you entered is too short.',
+ 'TOO_SHORT_PASSWORD_CONFIRM' => 'The password confirmation you entered is too short.',
+ 'TOO_SHORT_USER_PASSWORD' => 'The password you entered is too short.',
+ 'TOO_SHORT_USERNAME' => 'The username you entered is too short.',
+ 'TOO_SHORT_EMAIL' => 'The e-mail address you entered is too short.',
+ 'TOO_SHORT_EMAIL_CONFIRM' => 'The e-mail address confirmation you entered is too short.',
+ 'TOO_SHORT_WEBSITE' => 'The website address you entered is too short.',
+ 'TOO_SHORT_YIM' => 'The Yahoo! Messenger name you entered is too short.',
+
+ 'TOPIC' => 'Topic',
+ 'TOPICS' => 'Topics',
+ 'TOPICS_UNAPPROVED' => 'At least one topic in this forum has not been approved.',
+ 'TOPIC_ICON' => 'Topic icon',
+ 'TOPIC_LOCKED' => 'This topic is locked, you cannot edit posts or make further replies.',
+ 'TOPIC_LOCKED_SHORT'=> 'Topic locked',
+ 'TOPIC_MOVED' => 'Moved topic',
+ 'TOPIC_REVIEW' => 'Topic review',
+ 'TOPIC_TITLE' => 'Topic title',
+ 'TOPIC_UNAPPROVED' => 'This topic has not been approved',
+ 'TOTAL_ATTACHMENTS' => 'Attachment(s)',
+ 'TOTAL_LOG' => '1 log',
+ 'TOTAL_LOGS' => '%d logs',
+ 'TOTAL_NO_PM' => '0 private messages in total',
+ 'TOTAL_PM' => '1 private message in total',
+ 'TOTAL_PMS' => '%d private messages in total',
+ 'TOTAL_POSTS' => 'Total posts',
+ 'TOTAL_POSTS_OTHER' => 'Total posts <strong>%d</strong>',
+ 'TOTAL_POSTS_ZERO' => 'Total posts <strong>0</strong>',
+ 'TOPIC_REPORTED' => 'This topic has been reported',
+ 'TOTAL_TOPICS_OTHER'=> 'Total topics <strong>%d</strong>',
+ 'TOTAL_TOPICS_ZERO' => 'Total topics <strong>0</strong>',
+ 'TOTAL_USERS_OTHER' => 'Total members <strong>%d</strong>',
+ 'TOTAL_USERS_ZERO' => 'Total members <strong>0</strong>',
+ 'TRACKED_PHP_ERROR' => 'Tracked PHP errors: %s',
+
+ 'UNABLE_GET_IMAGE_SIZE' => 'It was not possible to determine the dimensions of the image.',
+ 'UNABLE_TO_DELIVER_FILE'=> 'Unable to deliver file.',
+ 'UNKNOWN_BROWSER' => 'Unknown browser',
+ 'UNMARK_ALL' => 'Unmark all',
+ 'UNREAD_MESSAGES' => 'Unread messages',
+ 'UNREAD_PM' => '<strong>%d</strong> unread message',
+ 'UNREAD_PMS' => '<strong>%d</strong> unread messages',
+ 'UNWATCHED_FORUMS' => 'You are no longer subscribed to the selected forums.',
+ 'UNWATCHED_TOPICS' => 'You are no longer subscribed to the selected topics.',
+ 'UNWATCHED_FORUMS_TOPICS' => 'You are no longer subscribed to the selected entries.',
+ 'UPDATE' => 'Update',
+ 'UPLOAD_IN_PROGRESS' => 'The upload is currently in progress.',
+ 'URL_REDIRECT' => 'If your browser does not support meta redirection %splease click HERE to be redirected%s.',
+ 'USERGROUPS' => 'Groups',
+ 'USERNAME' => 'Username',
+ 'USERNAMES' => 'Usernames',
+ 'USER_AVATAR' => 'User avatar',
+ 'USER_CANNOT_READ' => 'You cannot read posts in this forum.',
+ 'USER_POST' => '%d Post',
+ 'USER_POSTS' => '%d Posts',
+ 'USERS' => 'Users',
+ 'USE_PERMISSIONS' => 'Test out user’s permissions',
+
+ 'USER_NEW_PERMISSION_DISALLOWED' => 'We are sorry, but you are not authorised to use this feature. You may have just registered here and may need to participate more to be able to use this feature.',
+
+ 'VARIANT_DATE_SEPARATOR' => ' / ', // Used in date format dropdown, eg: "Today, 13:37 / 01 Jan 2007, 13:37" ... to join a relative date with calendar date
+ 'VIEWED' => 'Viewed',
+ 'VIEWING_FAQ' => 'Viewing FAQ',
+ 'VIEWING_MEMBERS' => 'Viewing member details',
+ 'VIEWING_ONLINE' => 'Viewing who is online',
+ 'VIEWING_MCP' => 'Viewing moderator control panel',
+ 'VIEWING_MEMBER_PROFILE' => 'Viewing member profile',
+ 'VIEWING_PRIVATE_MESSAGES' => 'Viewing private messages',
+ 'VIEWING_REGISTER' => 'Registering account',
+ 'VIEWING_UCP' => 'Viewing user control panel',
+ 'VIEWS' => 'Views',
+ 'VIEW_BOOKMARKS' => 'View bookmarks',
+ 'VIEW_FORUM_LOGS' => 'View Logs',
+ 'VIEW_LATEST_POST' => 'View the latest post',
+ 'VIEW_NEWEST_POST' => 'View first unread post',
+ 'VIEW_NOTES' => 'View user notes',
+ 'VIEW_ONLINE_TIME' => 'based on users active over the past %d minute',
+ 'VIEW_ONLINE_TIMES' => 'based on users active over the past %d minutes',
+ 'VIEW_TOPIC' => 'View topic',
+ 'VIEW_TOPIC_ANNOUNCEMENT' => 'Announcement: ',
+ 'VIEW_TOPIC_GLOBAL' => 'Global Announcement: ',
+ 'VIEW_TOPIC_LOCKED' => 'Locked: ',
+ 'VIEW_TOPIC_LOGS' => 'View logs',
+ 'VIEW_TOPIC_MOVED' => 'Moved: ',
+ 'VIEW_TOPIC_POLL' => 'Poll: ',
+ 'VIEW_TOPIC_STICKY' => 'Sticky: ',
+ 'VISIT_WEBSITE' => 'Visit website',
+
+ 'WARNINGS' => 'Warnings',
+ 'WARN_USER' => 'Warn user',
+ 'WELCOME_SUBJECT' => 'Welcome to %s forums',
+ 'WEBSITE' => 'Website',
+ 'WHOIS' => 'Whois',
+ 'WHO_IS_ONLINE' => 'Who is online',
+ 'WRONG_PASSWORD' => 'You entered an incorrect password.',
+
+ 'WRONG_DATA_ICQ' => 'The number you entered is not a valid ICQ number.',
+ 'WRONG_DATA_JABBER' => 'The name you entered is not a valid Jabber account name.',
+ 'WRONG_DATA_LANG' => 'The language you specified is not valid.',
+ 'WRONG_DATA_WEBSITE' => 'The website address has to be a valid URL, including the protocol. For example http://www.example.com/.',
+ 'WROTE' => 'wrote',
+
+ 'YEAR' => 'Year',
+ 'YEAR_MONTH_DAY' => '(YYYY-MM-DD)',
+ 'YES' => 'Yes',
+ 'YIM' => 'YIM',
+ 'YOU_LAST_VISIT' => 'Last visit was: %s',
+ 'YOU_NEW_PM' => 'A new private message is waiting for you in your Inbox.',
+ 'YOU_NEW_PMS' => 'New private messages are waiting for you in your Inbox.',
+ 'YOU_NO_NEW_PM' => 'No new private messages are waiting for you.',
+
+ 'datetime' => array(
+ 'TODAY' => 'Today',
+ 'TOMORROW' => 'Tomorrow',
+ 'YESTERDAY' => 'Yesterday',
+ 'AGO' => array(
+ 0 => 'less than a minute ago',
+ 1 => '%d minute ago',
+ 2 => '%d minutes ago',
+ 60 => '1 hour ago',
+ ),
+
+ 'Sunday' => 'Sunday',
+ 'Monday' => 'Monday',
+ 'Tuesday' => 'Tuesday',
+ 'Wednesday' => 'Wednesday',
+ 'Thursday' => 'Thursday',
+ 'Friday' => 'Friday',
+ 'Saturday' => 'Saturday',
+
+ 'Sun' => 'Sun',
+ 'Mon' => 'Mon',
+ 'Tue' => 'Tue',
+ 'Wed' => 'Wed',
+ 'Thu' => 'Thu',
+ 'Fri' => 'Fri',
+ 'Sat' => 'Sat',
+
+ 'January' => 'January',
+ 'February' => 'February',
+ 'March' => 'March',
+ 'April' => 'April',
+ 'May' => 'May',
+ 'June' => 'June',
+ 'July' => 'July',
+ 'August' => 'August',
+ 'September' => 'September',
+ 'October' => 'October',
+ 'November' => 'November',
+ 'December' => 'December',
+
+ 'Jan' => 'Jan',
+ 'Feb' => 'Feb',
+ 'Mar' => 'Mar',
+ 'Apr' => 'Apr',
+ 'May_short' => 'May', // Short representation of "May". May_short used because in English the short and long date are the same for May.
+ 'Jun' => 'Jun',
+ 'Jul' => 'Jul',
+ 'Aug' => 'Aug',
+ 'Sep' => 'Sep',
+ 'Oct' => 'Oct',
+ 'Nov' => 'Nov',
+ 'Dec' => 'Dec',
+ ),
+
+ 'tz' => array(
+ '-12' => 'UTC - 12 hours',
+ '-11' => 'UTC - 11 hours',
+ '-10' => 'UTC - 10 hours',
+ '-9.5' => 'UTC - 9:30 hours',
+ '-9' => 'UTC - 9 hours',
+ '-8' => 'UTC - 8 hours',
+ '-7' => 'UTC - 7 hours',
+ '-6' => 'UTC - 6 hours',
+ '-5' => 'UTC - 5 hours',
+ '-4.5' => 'UTC - 4:30 hours',
+ '-4' => 'UTC - 4 hours',
+ '-3.5' => 'UTC - 3:30 hours',
+ '-3' => 'UTC - 3 hours',
+ '-2' => 'UTC - 2 hours',
+ '-1' => 'UTC - 1 hour',
+ '0' => 'UTC',
+ '1' => 'UTC + 1 hour',
+ '2' => 'UTC + 2 hours',
+ '3' => 'UTC + 3 hours',
+ '3.5' => 'UTC + 3:30 hours',
+ '4' => 'UTC + 4 hours',
+ '4.5' => 'UTC + 4:30 hours',
+ '5' => 'UTC + 5 hours',
+ '5.5' => 'UTC + 5:30 hours',
+ '5.75' => 'UTC + 5:45 hours',
+ '6' => 'UTC + 6 hours',
+ '6.5' => 'UTC + 6:30 hours',
+ '7' => 'UTC + 7 hours',
+ '8' => 'UTC + 8 hours',
+ '8.75' => 'UTC + 8:45 hours',
+ '9' => 'UTC + 9 hours',
+ '9.5' => 'UTC + 9:30 hours',
+ '10' => 'UTC + 10 hours',
+ '10.5' => 'UTC + 10:30 hours',
+ '11' => 'UTC + 11 hours',
+ '11.5' => 'UTC + 11:30 hours',
+ '12' => 'UTC + 12 hours',
+ '12.75' => 'UTC + 12:45 hours',
+ '13' => 'UTC + 13 hours',
+ '14' => 'UTC + 14 hours',
+ 'dst' => '[ <abbr title="Daylight Saving Time">DST</abbr> ]',
+ ),
+
+ 'tz_zones' => array(
+ '-12' => '[UTC - 12] Baker Island Time',
+ '-11' => '[UTC - 11] Niue Time, Samoa Standard Time',
+ '-10' => '[UTC - 10] Hawaii-Aleutian Standard Time, Cook Island Time',
+ '-9.5' => '[UTC - 9:30] Marquesas Islands Time',
+ '-9' => '[UTC - 9] Alaska Standard Time, Gambier Island Time',
+ '-8' => '[UTC - 8] Pacific Standard Time',
+ '-7' => '[UTC - 7] Mountain Standard Time',
+ '-6' => '[UTC - 6] Central Standard Time',
+ '-5' => '[UTC - 5] Eastern Standard Time',
+ '-4.5' => '[UTC - 4:30] Venezuelan Standard Time',
+ '-4' => '[UTC - 4] Atlantic Standard Time',
+ '-3.5' => '[UTC - 3:30] Newfoundland Standard Time',
+ '-3' => '[UTC - 3] Amazon Standard Time, Central Greenland Time',
+ '-2' => '[UTC - 2] Fernando de Noronha Time, South Georgia &amp; the South Sandwich Islands Time',
+ '-1' => '[UTC - 1] Azores Standard Time, Cape Verde Time, Eastern Greenland Time',
+ '0' => '[UTC] Western European Time, Greenwich Mean Time',
+ '1' => '[UTC + 1] Central European Time, West African Time',
+ '2' => '[UTC + 2] Eastern European Time, Central African Time',
+ '3' => '[UTC + 3] Moscow Standard Time, Eastern African Time',
+ '3.5' => '[UTC + 3:30] Iran Standard Time',
+ '4' => '[UTC + 4] Gulf Standard Time, Samara Standard Time',
+ '4.5' => '[UTC + 4:30] Afghanistan Time',
+ '5' => '[UTC + 5] Pakistan Standard Time, Yekaterinburg Standard Time',
+ '5.5' => '[UTC + 5:30] Indian Standard Time, Sri Lanka Time',
+ '5.75' => '[UTC + 5:45] Nepal Time',
+ '6' => '[UTC + 6] Bangladesh Time, Bhutan Time, Novosibirsk Standard Time',
+ '6.5' => '[UTC + 6:30] Cocos Islands Time, Myanmar Time',
+ '7' => '[UTC + 7] Indochina Time, Krasnoyarsk Standard Time',
+ '8' => '[UTC + 8] Chinese Standard Time, Australian Western Standard Time, Irkutsk Standard Time',
+ '8.75' => '[UTC + 8:45] Southeastern Western Australia Standard Time',
+ '9' => '[UTC + 9] Japan Standard Time, Korea Standard Time, Chita Standard Time',
+ '9.5' => '[UTC + 9:30] Australian Central Standard Time',
+ '10' => '[UTC + 10] Australian Eastern Standard Time, Vladivostok Standard Time',
+ '10.5' => '[UTC + 10:30] Lord Howe Standard Time',
+ '11' => '[UTC + 11] Solomon Island Time, Magadan Standard Time',
+ '11.5' => '[UTC + 11:30] Norfolk Island Time',
+ '12' => '[UTC + 12] New Zealand Time, Fiji Time, Kamchatka Standard Time',
+ '12.75' => '[UTC + 12:45] Chatham Islands Time',
+ '13' => '[UTC + 13] Tonga Time, Phoenix Islands Time',
+ '14' => '[UTC + 14] Line Island Time',
+ ),
+
+ // The value is only an example and will get replaced by the current time on view
+ 'dateformats' => array(
+ 'd M Y, H:i' => '01 Jan 2007, 13:37',
+ 'd M Y H:i' => '01 Jan 2007 13:37',
+ 'M jS, \'y, H:i' => 'Jan 1st, \'07, 13:37',
+ 'D M d, Y g:i a' => 'Mon Jan 01, 2007 1:37 pm',
+ 'F jS, Y, g:i a' => 'January 1st, 2007, 1:37 pm',
+ '|d M Y|, H:i' => 'Today, 13:37 / 01 Jan 2007, 13:37',
+ '|F jS, Y|, g:i a' => 'Today, 1:37 pm / January 1st, 2007, 1:37 pm'
+ ),
+
+ // The default dateformat which will be used on new installs in this language
+ // Translators should change this if a the usual date format is different
+ 'default_dateformat' => 'D M d, Y g:i a', // Mon Jan 01, 2007 1:37 pm
+
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/email/admin_activate.txt b/phpBB/language/en/email/admin_activate.txt
new file mode 100644
index 0000000000..8b11f1b450
--- /dev/null
+++ b/phpBB/language/en/email/admin_activate.txt
@@ -0,0 +1,14 @@
+Subject: Activate user account
+
+Hello,
+
+The account owned by "{USERNAME}" has been deactivated or newly created, you should check the details of this user (if required) and handle it appropriately.
+
+Use this link to view the user's profile:
+{U_USER_DETAILS}
+
+Use this link to activate the account:
+{U_ACTIVATE}
+
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/admin_send_email.txt b/phpBB/language/en/email/admin_send_email.txt
new file mode 100644
index 0000000000..6687404527
--- /dev/null
+++ b/phpBB/language/en/email/admin_send_email.txt
@@ -0,0 +1,14 @@
+
+The following is an e-mail sent to you by an administrator of "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address:
+
+{CONTACT_EMAIL}
+
+Include this full e-mail (particularly the headers).
+
+Message sent to you follows:
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+{MESSAGE}
+
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/admin_welcome_activated.txt b/phpBB/language/en/email/admin_welcome_activated.txt
new file mode 100644
index 0000000000..c16a403f00
--- /dev/null
+++ b/phpBB/language/en/email/admin_welcome_activated.txt
@@ -0,0 +1,7 @@
+Subject: Account activated
+
+Hello {USERNAME},
+
+Your account on "{SITENAME}" has now been activated, you may login using the username and password you received in a previous e-mail.
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/admin_welcome_inactive.txt b/phpBB/language/en/email/admin_welcome_inactive.txt
new file mode 100644
index 0000000000..af3ac9ca87
--- /dev/null
+++ b/phpBB/language/en/email/admin_welcome_inactive.txt
@@ -0,0 +1,19 @@
+Subject: Welcome to "{SITENAME}"
+
+{WELCOME_MSG}
+
+Please keep this e-mail for your records. Your account information is as follows:
+
+----------------------------
+Username: {USERNAME}
+
+Board URL: {U_BOARD}
+----------------------------
+
+Your account is currently inactive and will need to be approved by an administrator before you can log in. Another email will be sent when this had occured.
+
+Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account.
+
+Thank you for registering.
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/coppa_resend_inactive.txt b/phpBB/language/en/email/coppa_resend_inactive.txt
new file mode 100644
index 0000000000..c3e4af576d
--- /dev/null
+++ b/phpBB/language/en/email/coppa_resend_inactive.txt
@@ -0,0 +1,42 @@
+Subject: Welcome to "{SITENAME}"
+
+{WELCOME_MSG}
+
+In compliance with the COPPA, your account is currently inactive.
+
+Please print this message and have your parent or guardian sign and date it. Then fax it to:
+
+{FAX_INFO}
+
+OR mail it to:
+
+{MAIL_INFO}
+
+------------------------------ CUT HERE ------------------------------
+Permission to participate at "{SITENAME}" - {U_BOARD}
+
+Username: {USERNAME}
+E-mail: {EMAIL_ADDRESS}
+
+I HAVE REVIEWED THE INFORMATION PROVIDED BY MY CHILD AND HEREBY GRANT PERMISSION TO "{SITENAME}" TO STORE THIS INFORMATION.
+I UNDERSTAND THIS INFORMATION CAN BE CHANGED AT ANY TIME BY ENTERING A PASSWORD.
+I UNDERSTAND THAT I MAY REQUEST FOR THIS INFORMATION TO BE REMOVED FROM "{SITENAME}" AT ANY TIME.
+
+
+Parent or guardian
+(print your name here): _____________________
+
+(sign here): __________________
+
+Date: _______________
+
+------------------------------ CUT HERE ------------------------------
+
+
+Once the administrator has received the above form via fax or regular mail, your account will be activated.
+
+Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account.
+
+Thank you for registering.
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/coppa_welcome_inactive.txt b/phpBB/language/en/email/coppa_welcome_inactive.txt
new file mode 100644
index 0000000000..c3e4af576d
--- /dev/null
+++ b/phpBB/language/en/email/coppa_welcome_inactive.txt
@@ -0,0 +1,42 @@
+Subject: Welcome to "{SITENAME}"
+
+{WELCOME_MSG}
+
+In compliance with the COPPA, your account is currently inactive.
+
+Please print this message and have your parent or guardian sign and date it. Then fax it to:
+
+{FAX_INFO}
+
+OR mail it to:
+
+{MAIL_INFO}
+
+------------------------------ CUT HERE ------------------------------
+Permission to participate at "{SITENAME}" - {U_BOARD}
+
+Username: {USERNAME}
+E-mail: {EMAIL_ADDRESS}
+
+I HAVE REVIEWED THE INFORMATION PROVIDED BY MY CHILD AND HEREBY GRANT PERMISSION TO "{SITENAME}" TO STORE THIS INFORMATION.
+I UNDERSTAND THIS INFORMATION CAN BE CHANGED AT ANY TIME BY ENTERING A PASSWORD.
+I UNDERSTAND THAT I MAY REQUEST FOR THIS INFORMATION TO BE REMOVED FROM "{SITENAME}" AT ANY TIME.
+
+
+Parent or guardian
+(print your name here): _____________________
+
+(sign here): __________________
+
+Date: _______________
+
+------------------------------ CUT HERE ------------------------------
+
+
+Once the administrator has received the above form via fax or regular mail, your account will be activated.
+
+Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account.
+
+Thank you for registering.
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/email_notify.txt b/phpBB/language/en/email/email_notify.txt
new file mode 100644
index 0000000000..0d0ac7fc28
--- /dev/null
+++ b/phpBB/language/en/email/email_notify.txt
@@ -0,0 +1,17 @@
+Subject: "{SITENAME}" - E-mail a friend
+
+Hello {TO_USERNAME},
+
+This e-mail was sent from "{SITENAME}" by {FROM_USERNAME} who thought you may be interested in the following topic:
+
+{TOPIC_NAME}
+
+You can find it at:
+
+{U_TOPIC}
+
+A message from {FROM_USERNAME} may also be included below. Please note that this message has not been seen or approved by the board administrators. If you wish to complain about having received this e-mail please contact the board administrator at {BOARD_CONTACT}. Please quote the message headers when contacting this address.
+
+----------
+
+{MESSAGE} \ No newline at end of file
diff --git a/phpBB/language/en/email/forum_notify.txt b/phpBB/language/en/email/forum_notify.txt
new file mode 100644
index 0000000000..fae5a83885
--- /dev/null
+++ b/phpBB/language/en/email/forum_notify.txt
@@ -0,0 +1,19 @@
+Subject: Forum post notification - "{FORUM_NAME}"
+
+Hello {USERNAME},
+
+You are receiving this notification because you are watching the forum, "{FORUM_NAME}" at "{SITENAME}". This forum has received a new reply to the topic "{TOPIC_TITLE}" since your last visit. You can use the following link to view the last unread reply, no more notifications will be sent until you visit the topic.
+
+{U_NEWEST_POST}
+
+If you want to view the topic, click the following link:
+{U_TOPIC}
+
+If you want to view the forum, click the following link:
+{U_FORUM}
+
+If you no longer wish to watch this forum you can either click the "Unsubscribe forum" link found in the forum above, or by clicking the following link:
+
+{U_STOP_WATCHING_FORUM}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/group_added.txt b/phpBB/language/en/email/group_added.txt
new file mode 100644
index 0000000000..9464aae094
--- /dev/null
+++ b/phpBB/language/en/email/group_added.txt
@@ -0,0 +1,11 @@
+Subject: You have been added to this usergroup
+
+Congratulations,
+
+You have been added to the "{GROUP_NAME}" group on "{SITENAME}".
+This action was done by a group leader or the site administrator, contact them for more information.
+
+You can view your groups information here:
+{U_GROUP}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/group_approved.txt b/phpBB/language/en/email/group_approved.txt
new file mode 100644
index 0000000000..24afefcd07
--- /dev/null
+++ b/phpBB/language/en/email/group_approved.txt
@@ -0,0 +1,10 @@
+Subject: Your request has been approved
+
+Congratulations,
+
+Your request to join the "{GROUP_NAME}" group on "{SITENAME}" has been approved.
+Click on the following link to see your group membership.
+
+{U_GROUP}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/group_request.txt b/phpBB/language/en/email/group_request.txt
new file mode 100644
index 0000000000..75840831fb
--- /dev/null
+++ b/phpBB/language/en/email/group_request.txt
@@ -0,0 +1,10 @@
+Subject: A request to join your group has been made
+
+Dear {USERNAME},
+
+The user "{REQUEST_USERNAME}" has requested to join the group "{GROUP_NAME}" you moderate on "{SITENAME}".
+To approve or deny this request for group membership please visit the following link:
+
+{U_PENDING}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/index.htm b/phpBB/language/en/email/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/language/en/email/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/language/en/email/installed.txt b/phpBB/language/en/email/installed.txt
new file mode 100644
index 0000000000..2aa03a7f33
--- /dev/null
+++ b/phpBB/language/en/email/installed.txt
@@ -0,0 +1,19 @@
+Subject: phpBB installed
+
+Congratulations,
+
+You have successfully installed phpBB on your server.
+
+This e-mail contains important information regarding your installation and should be kept for reference. Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account.
+
+----------------------------
+Username: {USERNAME}
+
+Board URL: {U_BOARD}
+----------------------------
+
+Useful information regarding the phpBB software can be found in the docs folder of your installation and on phpBB.com's support page - http://www.phpbb.com/support/
+
+In order to keep your board safe and secure, we highly recommended keeping current with software releases. For your convenience, a mailing list is available at the page referenced above.
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/newtopic_notify.txt b/phpBB/language/en/email/newtopic_notify.txt
new file mode 100644
index 0000000000..529bbf0f8f
--- /dev/null
+++ b/phpBB/language/en/email/newtopic_notify.txt
@@ -0,0 +1,13 @@
+Subject: New topic notification - "{FORUM_NAME}"
+
+Hello {USERNAME},
+
+You are receiving this notification because you are watching the forum, "{FORUM_NAME}" at "{SITENAME}". This forum has received a new topic since your last visit, "{TOPIC_TITLE}". You can use the following link to view the forum, no more notifications will be sent until you visit the forum.
+
+{U_FORUM}
+
+If you no longer wish to watch this forum you can either click the "Unsubscribe forum" link found in the forum above, or by clicking the following link:
+
+{U_STOP_WATCHING_FORUM}
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/pm_report_closed.txt b/phpBB/language/en/email/pm_report_closed.txt
new file mode 100644
index 0000000000..1b9f4a6658
--- /dev/null
+++ b/phpBB/language/en/email/pm_report_closed.txt
@@ -0,0 +1,8 @@
+Subject: Report closed - "{PM_SUBJECT}"
+
+Hello {USERNAME},
+
+You are receiving this notification because the report you filed regarding the private message "{PM_SUBJECT}" at "{SITENAME}" has been tended to by a moderator or administrator. The report is now closed. If you have further questions, please contact {CLOSER_NAME} by private message.
+
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/pm_report_deleted.txt b/phpBB/language/en/email/pm_report_deleted.txt
new file mode 100644
index 0000000000..a868837841
--- /dev/null
+++ b/phpBB/language/en/email/pm_report_deleted.txt
@@ -0,0 +1,8 @@
+Subject: Report deleted - "{PM_SUBJECT}"
+
+Hello {USERNAME},
+
+You are receiving this notification because the report you filed regarding the private message "{PM_SUBJECT}" at "{SITENAME}" was deleted by a moderator or administrator.
+
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/post_approved.txt b/phpBB/language/en/email/post_approved.txt
new file mode 100644
index 0000000000..e715b54026
--- /dev/null
+++ b/phpBB/language/en/email/post_approved.txt
@@ -0,0 +1,14 @@
+Subject: Post approved - "{POST_SUBJECT}"
+
+Hello {USERNAME},
+
+You are receiving this notification because your post "{POST_SUBJECT}" at "{SITENAME}" was approved by a moderator or administrator.
+
+If you want to view the post, click the following link:
+{U_VIEW_POST}
+
+If you want to view the topic, click the following link:
+{U_VIEW_TOPIC}
+
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/post_disapproved.txt b/phpBB/language/en/email/post_disapproved.txt
new file mode 100644
index 0000000000..3bc64bb611
--- /dev/null
+++ b/phpBB/language/en/email/post_disapproved.txt
@@ -0,0 +1,12 @@
+Subject: Post disapproved - "{POST_SUBJECT}"
+
+Hello {USERNAME},
+
+You are receiving this notification because your post "{POST_SUBJECT}" at "{SITENAME}" was disapproved by a moderator or administrator.
+
+The following reason was given for the disapproval:
+
+{REASON}
+
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/privmsg_notify.txt b/phpBB/language/en/email/privmsg_notify.txt
new file mode 100644
index 0000000000..d363df7973
--- /dev/null
+++ b/phpBB/language/en/email/privmsg_notify.txt
@@ -0,0 +1,15 @@
+Subject: New private message has arrived
+
+Hello {USERNAME},
+
+You have received a new private message from "{AUTHOR_NAME}" to your account on "{SITENAME}" with the following subject:
+
+{SUBJECT}
+
+You can view your new message by clicking on the following link:
+
+{U_INBOX}
+
+You have requested that you be notified on this event, remember that you can always choose not to be notified of new messages by changing the appropriate setting in your profile.
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/profile_send_email.txt b/phpBB/language/en/email/profile_send_email.txt
new file mode 100644
index 0000000000..9fb19e7eb1
--- /dev/null
+++ b/phpBB/language/en/email/profile_send_email.txt
@@ -0,0 +1,13 @@
+
+Hello {TO_USERNAME},
+
+The following is an e-mail sent to you by {FROM_USERNAME} via your account on "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address:
+
+{BOARD_CONTACT}
+
+Include this full e-mail (particularly the headers). Please note that the reply address to this e-mail has been set to that of {FROM_USERNAME}.
+
+Message sent to you follows
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+{MESSAGE}
diff --git a/phpBB/language/en/email/profile_send_im.txt b/phpBB/language/en/email/profile_send_im.txt
new file mode 100644
index 0000000000..02c820c69d
--- /dev/null
+++ b/phpBB/language/en/email/profile_send_im.txt
@@ -0,0 +1,13 @@
+
+Hello {TO_USERNAME},
+
+The following is a message sent to you by {FROM_USERNAME} via your account on "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address:
+
+{BOARD_CONTACT}
+
+Include this full message. Please note that the sender address has been set to the boards IM account.
+
+Message sent to you follows
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+{MESSAGE}
diff --git a/phpBB/language/en/email/report_closed.txt b/phpBB/language/en/email/report_closed.txt
new file mode 100644
index 0000000000..eb7ef22b5e
--- /dev/null
+++ b/phpBB/language/en/email/report_closed.txt
@@ -0,0 +1,8 @@
+Subject: Report closed - "{POST_SUBJECT}"
+
+Hello {USERNAME},
+
+You are receiving this notification because the report you filed on the post "{POST_SUBJECT}" in "{TOPIC_TITLE}" at "{SITENAME}" was handled by a moderator or by an administrator. The report was afterwards closed. If you have further questions contact {CLOSER_NAME} with a personal message.
+
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/report_deleted.txt b/phpBB/language/en/email/report_deleted.txt
new file mode 100644
index 0000000000..4292ca2239
--- /dev/null
+++ b/phpBB/language/en/email/report_deleted.txt
@@ -0,0 +1,8 @@
+Subject: Report deleted - "{POST_SUBJECT}"
+
+Hello {USERNAME},
+
+You are receiving this notification because the report you filed on the post "{POST_SUBJECT}" in "{TOPIC_TITLE}" at "{SITENAME}" was deleted by a moderator or by an administrator.
+
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/topic_approved.txt b/phpBB/language/en/email/topic_approved.txt
new file mode 100644
index 0000000000..ffda378d30
--- /dev/null
+++ b/phpBB/language/en/email/topic_approved.txt
@@ -0,0 +1,11 @@
+Subject: Topic approved - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because your topic "{TOPIC_TITLE}" at "{SITENAME}" was approved by a moderator or administrator.
+
+If you want to view the topic, click the following link:
+{U_VIEW_TOPIC}
+
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/topic_disapproved.txt b/phpBB/language/en/email/topic_disapproved.txt
new file mode 100644
index 0000000000..49ef58bf39
--- /dev/null
+++ b/phpBB/language/en/email/topic_disapproved.txt
@@ -0,0 +1,12 @@
+Subject: Topic disapproved - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because your topic "{TOPIC_TITLE}" at "{SITENAME}" was disapproved by a moderator or administrator.
+
+The following reason was given for the disapproval:
+
+{REASON}
+
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/topic_notify.txt b/phpBB/language/en/email/topic_notify.txt
new file mode 100644
index 0000000000..99587b28e0
--- /dev/null
+++ b/phpBB/language/en/email/topic_notify.txt
@@ -0,0 +1,20 @@
+Subject: Topic reply notification - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because you are watching the topic, "{TOPIC_TITLE}" at "{SITENAME}". This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.
+
+If you want to view the newest post made since your last visit, click the following link:
+{U_NEWEST_POST}
+
+If you want to view the topic, click the following link:
+{U_TOPIC}
+
+If you want to view the forum, click the following link:
+{U_FORUM}
+
+If you no longer wish to watch this topic you can either click the "Unsubscribe topic" link found at the bottom of the topic above, or by clicking the following link:
+
+{U_STOP_WATCHING_TOPIC}
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/user_activate.txt b/phpBB/language/en/email/user_activate.txt
new file mode 100644
index 0000000000..7d7960c4c5
--- /dev/null
+++ b/phpBB/language/en/email/user_activate.txt
@@ -0,0 +1,9 @@
+Subject: Reactivate your account
+
+Hello {USERNAME},
+
+Your account on "{SITENAME}" has been deactivated, most likely due to changes made to your profile. In order to reactivate your account you must click on the link below:
+
+{U_ACTIVATE}
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/user_activate_inactive.txt b/phpBB/language/en/email/user_activate_inactive.txt
new file mode 100644
index 0000000000..a90773d48c
--- /dev/null
+++ b/phpBB/language/en/email/user_activate_inactive.txt
@@ -0,0 +1,7 @@
+Subject: Your account has been deactivated
+
+Hello {USERNAME},
+
+Your account on "{SITENAME}" has been deactivated, most likely due to changes made to your profile. The administrator of the board will need to activate it before you can log in. You will receive another notification when this has occurred.
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/user_activate_passwd.txt b/phpBB/language/en/email/user_activate_passwd.txt
new file mode 100644
index 0000000000..695be115f8
--- /dev/null
+++ b/phpBB/language/en/email/user_activate_passwd.txt
@@ -0,0 +1,17 @@
+Subject: New password activation
+
+Hello {USERNAME}
+
+You are receiving this notification because you have (or someone pretending to be you has) requested a new password be sent for your account on "{SITENAME}". If you did not request this notification then please ignore it, if you keep receiving it please contact the board administrator.
+
+To use the new password you need to activate it. To do this click the link provided below.
+
+{U_ACTIVATE}
+
+If successful you will be able to login using the following password:
+
+Password: {PASSWORD}
+
+You can of course change this password yourself via the profile page. If you have any difficulties please contact the board administrator.
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/user_reactivate_account.txt b/phpBB/language/en/email/user_reactivate_account.txt
new file mode 100644
index 0000000000..4ef7dd899a
--- /dev/null
+++ b/phpBB/language/en/email/user_reactivate_account.txt
@@ -0,0 +1,19 @@
+Subject: Reactivate your account on "{SITENAME}"
+
+A board administrator requested that your account be reactivated. Your account is currently inactive.
+Please follow the steps listed here to reactivate your account.
+
+Please keep this e-mail for your records. Your account information is as follows:
+
+----------------------------
+Username: {USERNAME}
+----------------------------
+
+Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account.
+
+Please visit the following link to reactivate your account:
+
+{U_ACTIVATE}
+
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/user_remind_inactive.txt b/phpBB/language/en/email/user_remind_inactive.txt
new file mode 100644
index 0000000000..1ba28329f6
--- /dev/null
+++ b/phpBB/language/en/email/user_remind_inactive.txt
@@ -0,0 +1,11 @@
+Subject: Inactive account reminder
+
+Hello {USERNAME},
+
+This notification is a reminder that your account at "{SITENAME}", created on {REGISTER_DATE}, remains inactive. If you would like to activate this account, please visit the following link:
+
+{U_ACTIVATE}
+
+Thank you for registering at "{SITENAME}", we look forward to your participation.
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/user_resend_inactive.txt b/phpBB/language/en/email/user_resend_inactive.txt
new file mode 100644
index 0000000000..4638d6df63
--- /dev/null
+++ b/phpBB/language/en/email/user_resend_inactive.txt
@@ -0,0 +1,20 @@
+Subject: Welcome to "{SITENAME}"
+
+{WELCOME_MSG}
+
+Please keep this e-mail for your records. Your account information is as follows:
+
+----------------------------
+Username: {USERNAME}
+----------------------------
+
+Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account.
+
+Please visit the following link in order to activate your account:
+
+{U_ACTIVATE}
+
+
+Thank you for registering.
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/user_welcome.txt b/phpBB/language/en/email/user_welcome.txt
new file mode 100644
index 0000000000..2648769dfd
--- /dev/null
+++ b/phpBB/language/en/email/user_welcome.txt
@@ -0,0 +1,17 @@
+Subject: Welcome to "{SITENAME}"
+
+{WELCOME_MSG}
+
+Please keep this e-mail for your records. Your account information is as follows:
+
+----------------------------
+Username: {USERNAME}
+
+Board URL: {U_BOARD}
+----------------------------
+
+Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account.
+
+Thank you for registering.
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/user_welcome_inactive.txt b/phpBB/language/en/email/user_welcome_inactive.txt
new file mode 100644
index 0000000000..1b72b1c5a8
--- /dev/null
+++ b/phpBB/language/en/email/user_welcome_inactive.txt
@@ -0,0 +1,21 @@
+Subject: Welcome to "{SITENAME}"
+
+{WELCOME_MSG}
+
+Please keep this e-mail for your records. Your account information is as follows:
+
+----------------------------
+Username: {USERNAME}
+
+Board URL: {U_BOARD}
+----------------------------
+
+Please visit the following link in order to activate your account:
+
+{U_ACTIVATE}
+
+Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account.
+
+Thank you for registering.
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/groups.php b/phpBB/language/en/groups.php
new file mode 100644
index 0000000000..9f72d4070f
--- /dev/null
+++ b/phpBB/language/en/groups.php
@@ -0,0 +1,96 @@
+<?php
+/**
+*
+* groups [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'ALREADY_DEFAULT_GROUP' => 'The selected group is already your default group.',
+ 'ALREADY_IN_GROUP' => 'You are already a member of the selected group.',
+ 'ALREADY_IN_GROUP_PENDING' => 'You already requested joining the selected group.',
+
+ 'CANNOT_JOIN_GROUP' => 'You are not able to join this group. You are only able to join open and freely open groups.',
+ 'CANNOT_RESIGN_GROUP' => 'You are not able to resign from this group. You are only able to resign from open and freely open groups.',
+ 'CHANGED_DEFAULT_GROUP' => 'Successfully changed default group.',
+
+ 'GROUP_AVATAR' => 'Group avatar',
+ 'GROUP_CHANGE_DEFAULT' => 'Are you sure you want to change your default membership to the group “%s�',
+ 'GROUP_CLOSED' => 'Closed',
+ 'GROUP_DESC' => 'Group description',
+ 'GROUP_HIDDEN' => 'Hidden',
+ 'GROUP_INFORMATION' => 'Usergroup information',
+ 'GROUP_IS_CLOSED' => 'This is a closed group, new members can only join upon invitation of a group leader.',
+ 'GROUP_IS_FREE' => 'This is a freely open group, all new members are welcome.',
+ 'GROUP_IS_HIDDEN' => 'This is a hidden group, only members of this group can view its membership.',
+ 'GROUP_IS_OPEN' => 'This is an open group, members can apply to join.',
+ 'GROUP_IS_SPECIAL' => 'This is a special group, special groups are managed by the board administrators.',
+ 'GROUP_JOIN' => 'Join group',
+ 'GROUP_JOIN_CONFIRM' => 'Are you sure you want to join the selected group?',
+ 'GROUP_JOIN_PENDING' => 'Request to join group',
+ 'GROUP_JOIN_PENDING_CONFIRM' => 'Are you sure you want to request joining the selected group?',
+ 'GROUP_JOINED' => 'Successfully joined selected group.',
+ 'GROUP_JOINED_PENDING' => 'Successfully requested group membership. Please wait for a group leader to approve your membership.',
+ 'GROUP_LIST' => 'Manage users',
+ 'GROUP_MEMBERS' => 'Group members',
+ 'GROUP_NAME' => 'Group name',
+ 'GROUP_OPEN' => 'Open',
+ 'GROUP_RANK' => 'Group rank',
+ 'GROUP_RESIGN_MEMBERSHIP' => 'Resign group membership',
+ 'GROUP_RESIGN_MEMBERSHIP_CONFIRM' => 'Are you sure you want to resign your membership from the selected group?',
+ 'GROUP_RESIGN_PENDING' => 'Resign a pending group membership',
+ 'GROUP_RESIGN_PENDING_CONFIRM' => 'Are you sure you want to resign your pending membership from the selected group?',
+ 'GROUP_RESIGNED_MEMBERSHIP' => 'You were successfully removed from the selected group.',
+ 'GROUP_RESIGNED_PENDING' => 'Your pending membership was successfully removed from the selected group.',
+ 'GROUP_TYPE' => 'Group type',
+ 'GROUP_UNDISCLOSED' => 'Hidden group',
+ 'FORUM_UNDISCLOSED' => 'Moderating hidden forum(s)',
+
+ 'LOGIN_EXPLAIN_GROUP' => 'You need to login to view group details.',
+
+ 'NO_LEADERS' => 'You are not a leader of any group.',
+ 'NOT_LEADER_OF_GROUP' => 'The requested operation cannot be taken because you are not a leader of the selected group.',
+ 'NOT_MEMBER_OF_GROUP' => 'The requested operation cannot be taken because you are not a member of the selected group or your membership has not been approved yet.',
+ 'NOT_RESIGN_FROM_DEFAULT_GROUP' => 'You are not allowed to resign from your default group.',
+
+ 'PRIMARY_GROUP' => 'Primary group',
+
+ 'REMOVE_SELECTED' => 'Remove selected',
+
+ 'USER_GROUP_CHANGE' => 'From “%1$s†group to “%2$sâ€',
+ 'USER_GROUP_DEMOTE' => 'Demote leadership',
+ 'USER_GROUP_DEMOTE_CONFIRM' => 'Are you sure you want to demote as group leader from the selected group?',
+ 'USER_GROUP_DEMOTED' => 'Successfully demoted your leadership.',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/help_bbcode.php b/phpBB/language/en/help_bbcode.php
new file mode 100644
index 0000000000..df5f950e3e
--- /dev/null
+++ b/phpBB/language/en/help_bbcode.php
@@ -0,0 +1,116 @@
+<?php
+/**
+*
+* help_bbcode [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$help = array(
+ array(
+ 0 => '--',
+ 1 => 'Introduction'
+ ),
+ array(
+ 0 => 'What is BBCode?',
+ 1 => 'BBCode is a special implementation of HTML. Whether you can actually use BBCode in your posts on the forum is determined by the administrator. In addition you can disable BBCode on a per post basis via the posting form. BBCode itself is similar in style to HTML, tags are enclosed in square brackets [ and ] rather than &lt; and &gt; and it offers greater control over what and how something is displayed. Depending on the template you are using you may find adding BBCode to your posts is made much easier through a clickable interface above the message area on the posting form. Even with this you may find the following guide useful.'
+ ),
+ array(
+ 0 => '--',
+ 1 => 'Text Formatting'
+ ),
+ array(
+ 0 => 'How to create bold, italic and underlined text',
+ 1 => 'BBCode includes tags to allow you to quickly change the basic style of your text. This is achieved in the following ways: <ul><li>To make a piece of text bold enclose it in <strong>[b][/b]</strong>, e.g. <br /><br /><strong>[b]</strong>Hello<strong>[/b]</strong><br /><br />will become <strong>Hello</strong></li><li>For underlining use <strong>[u][/u]</strong>, for example:<br /><br /><strong>[u]</strong>Good Morning<strong>[/u]</strong><br /><br />becomes <span style="text-decoration: underline">Good Morning</span></li><li>To italicise text use <strong>[i][/i]</strong>, e.g.<br /><br />This is <strong>[i]</strong>Great!<strong>[/i]</strong><br /><br />would give This is <i>Great!</i></li></ul>'
+ ),
+ array(
+ 0 => 'How to change the text colour or size',
+ 1 => 'To alter the colour or size of your text the following tags can be used. Keep in mind that how the output appears will depend on the viewers browser and system: <ul><li>Changing the colour of text is achieved by wrapping it in <strong>[color=][/color]</strong>. You can specify either a recognised colour name (eg. red, blue, yellow, etc.) or the hexadecimal triplet alternative, e.g. #FFFFFF, #000000. For example, to create red text you could use:<br /><br /><strong>[color=red]</strong>Hello!<strong>[/color]</strong><br /><br />or<br /><br /><strong>[color=#FF0000]</strong>Hello!<strong>[/color]</strong><br /><br />Both will output <span style="color:red">Hello!</span></li><li>Changing the text size is achieved in a similar way using <strong>[size=][/size]</strong>. This tag is dependent on the template the user has selected but the recommended format is a numerical value representing the text size in percent, starting at 20 (very small) through to 200 (very large) by default. For example:<br /><br /><strong>[size=30]</strong>SMALL<strong>[/size]</strong><br /><br />will generally be <span style="font-size:30%;">SMALL</span><br /><br />whereas:<br /><br /><strong>[size=200]</strong>HUGE!<strong>[/size]</strong><br /><br />will be <span style="font-size:200%;">HUGE!</span></li></ul>'
+ ),
+ array(
+ 0 => 'Can I combine formatting tags?',
+ 1 => 'Yes, of course you can, for example to get someones attention you may write:<br /><br /><strong>[size=200][color=red][b]</strong>LOOK AT ME!<strong>[/b][/color][/size]</strong><br /><br />this would output <span style="color:red;font-size:200%;"><strong>LOOK AT ME!</strong></span><br /><br />We don’t recommend you output lots of text that looks like this though! Remember it is up to you, the poster, to ensure tags are closed correctly. For example the following is incorrect:<br /><br /><strong>[b][u]</strong>This is wrong<strong>[/b][/u]</strong>'
+ ),
+ array(
+ 0 => '--',
+ 1 => 'Quoting and outputting fixed-width text'
+ ),
+ array(
+ 0 => 'Quoting text in replies',
+ 1 => 'There are two ways you can quote text, with a reference or without.<ul><li>When you utilise the Quote function to reply to a post on the board you should notice that the post text is added to the message window enclosed in a <strong>[quote=&quot;&quot;][/quote]</strong> block. This method allows you to quote with a reference to a person or whatever else you choose to put! For example to quote a piece of text Mr. Blobby wrote you would enter:<br /><br /><strong>[quote=&quot;Mr. Blobby&quot;]</strong>The text Mr. Blobby wrote would go here<strong>[/quote]</strong><br /><br />The resulting output will automatically add &quot;Mr. Blobby wrote:&quot; before the actual text. Remember you <strong>must</strong> include the quotation marks &quot;&quot; around the name you are quoting, they are not optional.</li><li>The second method allows you to blindly quote something. To utilise this enclose the text in <strong>[quote][/quote]</strong> tags. When you view the message it will simply show the text within a quotation block.</li></ul>'
+ ),
+ array(
+ 0 => 'Outputting code or fixed width data',
+ 1 => 'If you want to output a piece of code or in fact anything that requires a fixed width, e.g. Courier type font you should enclose the text in <strong>[code][/code]</strong> tags, e.g.<br /><br /><strong>[code]</strong>echo &quot;This is some code&quot;;<strong>[/code]</strong><br /><br />All formatting used within <strong>[code][/code]</strong> tags is retained when you later view it. PHP syntax highlighting can be enabled using <strong>[code=php][/code]</strong> and is recommended when posting PHP code samples as it improves readability.'
+ ),
+ array(
+ 0 => '--',
+ 1 => 'Generating lists'
+ ),
+ array(
+ 0 => 'Creating an Unordered list',
+ 1 => 'BBCode supports two types of lists, unordered and ordered. They are essentially the same as their HTML equivalents. An unordered list outputs each item in your list sequentially one after the other indenting each with a bullet character. To create an unordered list you use <strong>[list][/list]</strong> and define each item within the list using <strong>[*]</strong>. For example to list your favourite colours you could use:<br /><br /><strong>[list]</strong><br /><strong>[*]</strong>Red<br /><strong>[*]</strong>Blue<br /><strong>[*]</strong>Yellow<br /><strong>[/list]</strong><br /><br />This would generate the following list:<ul><li>Red</li><li>Blue</li><li>Yellow</li></ul>'
+ ),
+ array(
+ 0 => 'Creating an Ordered list',
+ 1 => 'The second type of list, an ordered list, gives you control over what is output before each item. To create an ordered list you use <strong>[list=1][/list]</strong> to create a numbered list or alternatively <strong>[list=a][/list]</strong> for an alphabetical list. As with the unordered list, items are specified using <strong>[*]</strong>. For example:<br /><br /><strong>[list=1]</strong><br /><strong>[*]</strong>Go to the shops<br /><strong>[*]</strong>Buy a new computer<br /><strong>[*]</strong>Swear at computer when it crashes<br /><strong>[/list]</strong><br /><br />will generate the following:<ol style="list-style-type: decimal;"><li>Go to the shops</li><li>Buy a new computer</li><li>Swear at computer when it crashes</li></ol>Whereas for an alphabetical list you would use:<br /><br /><strong>[list=a]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: lower-alpha"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol>'
+ ),
+ // This block will switch the FAQ-Questions to the second template column
+ array(
+ 0 => '--',
+ 1 => '--'
+ ),
+ array(
+ 0 => '--',
+ 1 => 'Creating Links'
+ ),
+ array(
+ 0 => 'Linking to another site',
+ 1 => 'phpBB BBCode supports a number of ways of creating URIs (Uniform Resource Indicators) better known as URLs.<ul><li>The first of these uses the <strong>[url=][/url]</strong> tag, whatever you type after the = sign will cause the contents of that tag to act as a URL. For example to link to phpBB.com you could use:<br /><br /><strong>[url=http://www.phpbb.com/]</strong>Visit phpBB!<strong>[/url]</strong><br /><br />This would generate the following link, <a href="http://www.phpbb.com/">Visit phpBB!</a> Please notice that the link opens in the same window or a new window depending on the users browser preferences.</li><li>If you want the URL itself displayed as the link you can do this by simply using:<br /><br /><strong>[url]</strong>http://www.phpbb.com/<strong>[/url]</strong><br /><br />This would generate the following link, <a href="http://www.phpbb.com/">http://www.phpbb.com/</a></li><li>Additionally, phpBB features something called <i>Magic Links</i>, this will turn any syntactically correct URL into a link without you needing to specify any tags or even the leading http://. For example typing www.phpbb.com into your message will automatically lead to <a href="http://www.phpbb.com/">www.phpbb.com</a> being output when you view the message.</li><li>The same thing applies equally to e-mail addresses, you can either specify an address explicitly for example:<br /><br /><strong>[email]</strong>no.one@domain.adr<strong>[/email]</strong><br /><br />which will output <a href="mailto:no.one@domain.adr">no.one@domain.adr</a> or you can just type no.one@domain.adr into your message and it will be automatically converted when you view.</li></ul>As with all the BBCode tags you can wrap URLs around any of the other tags such as <strong>[img][/img]</strong> (see next entry), <strong>[b][/b]</strong>, etc. As with the formatting tags it is up to you to ensure the correct open and close order is following, for example:<br /><br /><strong>[url=http://www.google.com/][img]</strong>http://www.google.com/intl/en_ALL/images/logo.gif<strong>[/url][/img]</strong><br /><br />is <span style="text-decoration: underline">not</span> correct which may lead to your post being deleted so take care.'
+ ),
+ array(
+ 0 => '--',
+ 1 => 'Showing images in posts'
+ ),
+ array(
+ 0 => 'Adding an image to a post',
+ 1 => 'phpBB BBCode incorporates a tag for including images in your posts. Two very important things to remember when using this tag are: many users do not appreciate lots of images being shown in posts and secondly the image you display must already be available on the internet (it cannot exist only on your computer for example, unless you run a webserver!). To display an image you must surround the URL pointing to the image with <strong>[img][/img]</strong> tags. For example:<br /><br /><strong>[img]</strong>http://www.google.com/intl/en_ALL/images/logo.gif<strong>[/img]</strong><br /><br />As noted in the URL section above you can wrap an image in a <strong>[url][/url]</strong> tag if you wish, e.g.<br /><br /><strong>[url=http://www.google.com/][img]</strong>http://www.google.com/intl/en_ALL/images/logo.gif<strong>[/img][/url]</strong><br /><br />would generate:<br /><br /><a href="http://www.google.com/"><img src="http://www.google.com/intl/en_ALL/images/logo.gif" alt="" /></a>'
+ ),
+ array(
+ 0 => 'Adding attachments into a post',
+ 1 => 'Attachments can now be placed in any part of a post by using the new <strong>[attachment=][/attachment]</strong> BBCode, if the attachments functionality has been enabled by a board administrator and if you are given the appropriate permissions to create attachments. Within the posting screen is a drop-down box (respectively a button) for placing attachments inline.'
+ ),
+ array(
+ 0 => '--',
+ 1 => 'Other matters'
+ ),
+ array(
+ 0 => 'Can I add my own tags?',
+ 1 => 'If you are an administrator on this board and have the proper permissions, you can add further BBCodes through the Custom BBCodes section.'
+ )
+);
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/help_faq.php b/phpBB/language/en/help_faq.php
new file mode 100644
index 0000000000..88b2cc273d
--- /dev/null
+++ b/phpBB/language/en/help_faq.php
@@ -0,0 +1,344 @@
+<?php
+/**
+*
+* help_faq [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$help = array(
+ array(
+ 0 => '--',
+ 1 => 'Login and Registration Issues'
+ ),
+ array(
+ 0 => 'Why can’t I login?',
+ 1 => 'There are several reasons why this could occur. First, ensure your username and password are correct. If they are, contact the board owner to make sure you haven’t been banned. It is also possible the website owner has a configuration error on their end, and they would need to fix it.'
+ ),
+ array(
+ 0 => 'Why do I need to register at all?',
+ 1 => 'You may not have to, it is up to the administrator of the board as to whether you need to register in order to post messages. However; registration will give you access to additional features not available to guest users such as definable avatar images, private messaging, emailing of fellow users, usergroup subscription, etc. It only takes a few moments to register so it is recommended you do so.'
+ ),
+ array(
+ 0 => 'Why do I get logged off automatically?',
+ 1 => 'If you do not check the <em>Log me in automatically</em> box when you login, the board will only keep you logged in for a preset time. This prevents misuse of your account by anyone else. To stay logged in, check the box during login. This is not recommended if you access the board from a shared computer, e.g. library, internet cafe, university computer lab, etc. If you do not see this checkbox, it means the board administrator has disabled this feature.'
+ ),
+ array(
+ 0 => 'How do I prevent my username appearing in the online user listings?',
+ 1 => 'Within your User Control Panel, under “Board preferencesâ€, you will find the option <em>Hide your online status</em>. Enable this option with <samp>Yes</samp> and you will only appear to the administrators, moderators and yourself. You will be counted as a hidden user.'
+ ),
+ array(
+ 0 => 'I’ve lost my password!',
+ 1 => 'Don’t panic! While your password cannot be retrieved, it can easily be reset. Visit the login page and click <em>I’ve forgotten my password</em>. Follow the instructions and you should be able to log in again shortly.'
+ ),
+ array(
+ 0 => 'I registered but cannot login!',
+ 1 => 'First, check your username and password. If they are correct, then one of two things may have happened. If COPPA support is enabled and you specified being under 13 years old during registration, you will have to follow the instructions you received. Some boards will also require new registrations to be activated, either by yourself or by an administrator before you can logon; this information was present during registration. If you were sent an e-mail, follow the instructions. If you did not receive an e-mail, you may have provided an incorrect e-mail address or the e-mail may have been picked up by a spam filer. If you are sure the e-mail address you provided is correct, try contacting an administrator.'
+ ),
+ array(
+ 0 => 'I registered in the past but cannot login any more?!',
+ 1 => 'Attempt to locate the e-mail sent to you when you first registered, check your username and password and try again. It is possible an administrator has deactivated or deleted your account for some reason. Also, many boards periodically remove users who have not posted for a long time to reduce the size of the database. If this has happened, try registering again and being more involved in discussions.'
+ ),
+ array(
+ 0 => 'What is COPPA?',
+ 1 => 'COPPA, or the Child Online Privacy and Protection Act of 1998, is a law in the United States requiring websites which can potentially collect information from minors under the age of 13 to have written parental consent or some other method of legal guardian acknowledgment, allowing the collection of personally identifiable information from a minor under the age of 13. If you are unsure if this applies to you as someone trying to register or to the website you are trying to register on, contact legal counsel for assistance. Please note that the phpBB Group cannot provide legal advice and is not a point of contact for legal concerns of any kind, except as outlined below.',
+ ),
+ array(
+ 0 => 'Why can’t I register?',
+ 1 => 'It is possible the website owner has banned your IP address or disallowed the username you are attempting to register. The website owner could have also disabled registration to prevent new visitors from signing up. Contact a board administrator for assistance.',
+ ),
+ array(
+ 0 => 'What does the “Delete all board cookies†do?',
+ 1 => '“Delete all board cookies†deletes the cookies created by phpBB which keep you authenticated and logged into the board. It also provides functions such as read tracking if they have been enabled by the board owner. If you are having login or logout problems, deleting board cookies may help.',
+ ),
+ array(
+ 0 => '--',
+ 1 => 'User Preferences and settings'
+ ),
+ array(
+ 0 => 'How do I change my settings?',
+ 1 => 'If you are a registered user, all your settings are stored in the board database. To alter them, visit your User Control Panel; a link can usually be found at the top of board pages. This system will allow you to change all your settings and preferences.'
+ ),
+ array(
+ 0 => 'The times are not correct!',
+ 1 => 'It is possible the time displayed is from a timezone different from the one you are in. If this is the case, visit your User Control Panel and change your timezone to match your particular area, e.g. London, Paris, New York, Sydney, etc. Please note that changing the timezone, like most settings, can only be done by registered users. If you are not registered, this is a good time to do so.'
+ ),
+ array(
+ 0 => 'I changed the timezone and the time is still wrong!',
+ 1 => 'If you are sure you have set the timezone and Summer Time/DST correctly and the time is still incorrect, then the time stored on the server clock is incorrect. Please notify an administrator to correct the problem.'
+ ),
+ array(
+ 0 => 'My language is not in the list!',
+ 1 => 'Either the administrator has not installed your language or nobody has translated this board into your language. Try asking the board administrator if they can install the language pack you need. If the language pack does not exist, feel free to create a new translation. More information can be found at the phpBB website (see link at the bottom of board pages).'
+ ),
+ array(
+ 0 => 'How do I show an image below my username?',
+ 1 => 'There are two images that may appear below a username when viewing posts. Depending on the used style, the first may be an image associated with your rank, generally in the form of stars, blocks or dots, indicating how many posts you have made or your status on the board. The second, usually a larger image, is known as an avatar and is generally unique or personal to each user. It is up to the board administrator to enable avatars and to choose the way in which avatars can be made available. If you are unable to use avatars, contact a board administrator and ask them for their reasons.'
+ ),
+ array(
+ 0 => 'What is my rank and how do I change it?',
+ 1 => 'Ranks, which appear below your username, indicate the number of posts you have made or identify certain users, e.g. moderators and administrators. In general, you cannot directly change the wording of any board ranks as they are set by the board administrator. Please do not abuse the board by posting unnecessarily just to increase your rank. Most boards will not tolerate this and the moderator or administrator will simply lower your post count.'
+ ),
+ array(
+ 0 => 'When I click the e-mail link for a user it asks me to login?',
+ 1 => 'Only registered users can send e-mail to other users via the built-in e-mail form, and only if the administrator has enabled this feature. This is to prevent malicious use of the e-mail system by anonymous users.'
+ ),
+ array(
+ 0 => '--',
+ 1 => 'Posting Issues'
+ ),
+ array(
+ 0 => 'How do I post a topic in a forum?',
+ 1 => 'To post a new topic in a forum, click the relevant button on either the forum or topic screens. You may need to register before you can post a message. A list of your permissions in each forum is available at the bottom of the forum and topic screens. Example: You can post new topics, You can vote in polls, etc.'
+ ),
+ array(
+ 0 => 'How do I edit or delete a post?',
+ 1 => 'Unless you are a board administrator or moderator, you can only edit or delete your own posts. You can edit a post by clicking the edit button for the relevant post, sometimes for only a limited time after the post was made. If someone has already replied to the post, you will find a small piece of text output below the post when you return to the topic which lists the number of times you edited it along with the date and time. This will only appear if someone has made a reply; it will not appear if a moderator or administrator edited the post, though they may leave a note as to why they’ve edited the post at their own digression. Please note that normal users cannot delete a post once someone has replied.'
+ ),
+ array(
+ 0 => 'How do I add a signature to my post?',
+ 1 => 'To add a signature to a post you must first create one via your User Control Panel. Once created, you can check the <em>Attach a signature</em> box on the posting form to add your signature. You can also add a signature by default to all your posts by checking the appropriate radio button in your profile. If you do so, you can still prevent a signature being added to individual posts by un-checking the add signature box within the posting form.'
+ ),
+ array(
+ 0 => 'How do I create a poll?',
+ 1 => 'When posting a new topic or editing the first post of a topic, click the “Poll creation†tab below the main posting form; if you cannot see this, you do not have appropriate permissions to create polls. Enter a title and at least two options in the appropriate fields, making sure each option is on a separate line in the textarea. You can also set the number of options users may select during voting under “Options per userâ€, a time limit in days for the poll (0 for infinite duration) and lastly the option to allow users to amend their votes.'
+ ),
+ array(
+ 0 => 'Why can’t I add more poll options?',
+ 1 => 'The limit for poll options is set by the board administrator. If you feel you need to add more options to your poll then the allowed amount, contact the board administrator.'
+ ),
+ array(
+ 0 => 'How do I edit or delete a poll?',
+ 1 => 'As with posts, polls can only be edited by the original poster, a moderator or an administrator. To edit a poll, click to edit the first post in the topic; this always has the poll associated with it. If no one has cast a vote, users can delete the poll or edit any poll option. However, if members have already placed votes, only moderators or administrators can edit or delete it. This prevents the poll’s options from being changed mid-way through a poll.'
+ ),
+ array(
+ 0 => 'Why can’t I access a forum?',
+ 1 => 'Some forums may be limited to certain users or groups. To view, read, post or perform another action you may need special permissions. Contact a moderator or board administrator to grant you access.'
+ ),
+ array(
+ 0 => 'Why can’t I add attachments?',
+ 1 => 'Attachment permissions are granted on a per forum, per group, or per user basis. The board administrator may not have allowed attachments to be added for the specific forum you are posting in, or perhaps only certain groups can post attachments. Contact the board administrator if you are unsure about why you are unable to add attachments.'
+ ),
+ array(
+ 0 => 'Why did I receive a warning?',
+ 1 => 'Each board administrator has their own set of rules for their site. If you have broken a rule, you may be issued a warning. Please note that this is the board administrator’s decision, and the phpBB Group has nothing to do with the warnings on the given site. Contact the board administrator if you are unsure about why you were issued a warning.'
+ ),
+ array(
+ 0 => 'How can I report posts to a moderator?',
+ 1 => 'If the board administrator has allowed it, you should see a button for reporting posts next to the post you wish to report. Clicking this will walk you through the steps necessary to report the post.'
+ ),
+ array(
+ 0 => 'What is the “Save†button for in topic posting?',
+ 1 => 'This allows you to save passages to be completed and submitted at a later date. To reload a saved passage, visit the User Control Panel.'
+ ),
+ array(
+ 0 => 'Why does my post need to be approved?',
+ 1 => 'The board administrator may have decided that posts in the forum you are posting to require review before submission. It is also possible that the administrator has placed you in a group of users whose posts require review before submission. Please contact the board administrator for further details.'
+ ),
+ array(
+ 0 => 'How do I bump my topic?',
+ 1 => 'By clicking the “Bump topic†link when you are viewing it, you can “bump†the topic to the top of the forum on the first page. However, if you do not see this, then topic bumping may be disabled or the time allowance between bumps has not yet been reached. It is also possible to bump the topic simply by replying to it, however, be sure to follow the board rules when doing so.'
+ ),
+ array(
+ 0 => '--',
+ 1 => 'Formatting and Topic Types'
+ ),
+ array(
+ 0 => 'What is BBCode?',
+ 1 => 'BBCode is a special implementation of HTML, offering great formatting control on particular objects in a post. The use of BBCode is granted by the administrator, but it can also be disabled on a per post basis from the posting form. BBCode itself is similar in style to HTML, but tags are enclosed in square brackets [ and ] rather than &lt; and &gt;. For more information on BBCode see the guide which can be accessed from the posting page.'
+ ),
+ array(
+ 0 => 'Can I use HTML?',
+ 1 => 'No. It is not possible to post HTML on this board and have it rendered as HTML. Most formatting which can be carried out using HTML can be applied using BBCode instead.'
+ ),
+ array(
+ 0 => 'What are Smilies?',
+ 1 => 'Smilies, or Emoticons, are small images which can be used to express a feeling using a short code, e.g. :) denotes happy, while :( denotes sad. The full list of emoticons can be seen in the posting form. Try not to overuse smilies, however, as they can quickly render a post unreadable and a moderator may edit them out or remove the post altogether. The board administrator may also have set a limit to the number of smilies you may use within a post.'
+ ),
+ array(
+ 0 => 'Can I post images?',
+ 1 => 'Yes, images can be shown in your posts. If the administrator has allowed attachments, you may be able to upload the image to the board. Otherwise, you must link to an image stored on a publicly accessible web server, e.g. http://www.example.com/my-picture.gif. You cannot link to pictures stored on your own PC (unless it is a publicly accessible server) nor images stored behind authentication mechanisms, e.g. hotmail or yahoo mailboxes, password protected sites, etc. To display the image use the BBCode [img] tag.'
+ ),
+ array(
+ 0 => 'What are global announcements?',
+ 1 => 'Global announcements contain important information and you should read them whenever possible. They will appear at the top of every forum and within your User Control Panel. Global announcement permissions are granted by the board administrator.'
+ ),
+ array(
+ 0 => 'What are announcements?',
+ 1 => 'Announcements often contain important information for the forum you are currently reading and you should read them whenever possible. Announcements appear at the top of every page in the forum to which they are posted. As with global announcements, announcement permissions are granted by the board administrator.'
+ ),
+ array(
+ 0 => 'What are sticky topics?',
+ 1 => 'Sticky topics within the forum appear below announcements and only on the first page. They are often quite important so you should read them whenever possible. As with announcements and global announcements, sticky topic permissions are granted by the board administrator.'
+ ),
+ array(
+ 0 => 'What are locked topics?',
+ 1 => 'Locked topics are topics where users can no longer reply and any poll it contained was automatically ended. Topics may be locked for many reasons and were set this way by either the forum moderator or board administrator. You may also be able to lock your own topics depending on the permissions you are granted by the board administrator.'
+ ),
+ array(
+ 0 => 'What are topic icons?',
+ 1 => 'Topic icons are author chosen images associated with posts to indicate their content. The ability to use topic icons depends on the permissions set by the board administrator.'
+ ),
+ // This block will switch the FAQ-Questions to the second template column
+ array(
+ 0 => '--',
+ 1 => '--'
+ ),
+ array(
+ 0 => '--',
+ 1 => 'User Levels and Groups'
+ ),
+ array(
+ 0 => 'What are Administrators?',
+ 1 => 'Administrators are members assigned with the highest level of control over the entire board. These members can control all facets of board operation, including setting permissions, banning users, creating usergroups or moderators, etc., dependent upon the board founder and what permissions he or she has given the other administrators. They may also have full moderator capabilities in all forums, depending on the settings put forth by the board founder.'
+ ),
+ array(
+ 0 => 'What are Moderators?',
+ 1 => 'Moderators are individuals (or groups of individuals) who look after the forums from day to day. They have the authority to edit or delete posts and lock, unlock, move, delete and split topics in the forum they moderate. Generally, moderators are present to prevent users from going off-topic or posting abusive or offensive material.'
+ ),
+ array(
+ 0 => 'What are usergroups?',
+ 1 => 'Usergroups are groups of users that divide the community into manageable sections board administrators can work with. Each user can belong to several groups and each group can be assigned individual permissions. This provides an easy way for administrators to change permissions for many users at once, such as changing moderator permissions or granting users access to a private forum.'
+ ),
+ array(
+ 0 => 'Where are the usergroups and how do I join one?',
+ 1 => 'You can view all usergroups via the “Usergroups†link within your User Control Panel. If you would like to join one, proceed by clicking the appropriate button. Not all groups have open access, however. Some may require approval to join, some may be closed and some may even have hidden memberships. If the group is open, you can join it by clicking the appropriate button. If a group requires approval to join you may request to join by clicking the appropriate button. The user group leader will need to approve your request and may ask why you want to join the group. Please do not harass a group leader if they reject your request; they will have their reasons.'
+ ),
+ array(
+ 0 => 'How do I become a usergroup leader?',
+ 1 => 'A usergroup leader is usually assigned when usergroups are initially created by a board administrator. If you are interested in creating a usergroup, your first point of contact should be an administrator; try sending a private message.',
+ ),
+ array(
+ 0 => 'Why do some usergroups appear in a different colour?',
+ 1 => 'It is possible for the board administrator to assign a colour to the members of a usergroup to make it easy to identify the members of this group.'
+ ),
+ array(
+ 0 => 'What is a “Default usergroup�',
+ 1 => 'If you are a member of more than one usergroup, your default is used to determine which group colour and group rank should be shown for you by default. The board administrator may grant you permission to change your default usergroup via your User Control Panel.'
+ ),
+ array(
+ 0 => 'What is “The team†link?',
+ 1 => 'This page provides you with a list of board staff, including board administrators and moderators and other details such as the forums they moderate.'
+ ),
+ array(
+ 0 => '--',
+ 1 => 'Private Messaging'
+ ),
+ array(
+ 0 => 'I cannot send private messages!',
+ 1 => 'There are three reasons for this; you are not registered and/or not logged on, the board administrator has disabled private messaging for the entire board, or the board administrator has prevented you from sending messages. Contact a board administrator for more information.'
+ ),
+ array(
+ 0 => 'I keep getting unwanted private messages!',
+ 1 => 'You can block a user from sending you private messages by using message rules within your User Control Panel. If you are receiving abusive private messages from a particular user, inform a board administrator; they have the power to prevent a user from sending private messages.'
+ ),
+ array(
+ 0 => 'I have received a spamming or abusive e-mail from someone on this board!',
+ 1 => 'We are sorry to hear that. The e-mail form feature of this board includes safeguards to try and track users who send such posts, so e-mail the board administrator with a full copy of the e-mail you received. It is very important that this includes the headers that contain the details of the user that sent the e-mail. The board administrator can then take action.'
+ ),
+ array(
+ 0 => '--',
+ 1 => 'Friends and Foes'
+ ),
+ array(
+ 0 => 'What are my Friends and Foes lists?',
+ 1 => 'You can use these lists to organise other members of the board. Members added to your friends list will be listed within your User Control Panel for quick access to see their online status and to send them private messages. Subject to template support, posts from these users may also be highlighted. If you add a user to your foes list, any posts they make will be hidden by default.'
+ ),
+ array(
+ 0 => 'How can I add / remove users to my Friends or Foes list?',
+ 1 => 'You can add users to your list in two ways. Within each user’s profile, there is a link to add them to either your Friend or Foe list. Alternatively, from your User Control Panel, you can directly add users by entering their member name. You may also remove users from your list using the same page.'
+ ),
+ array(
+ 0 => '--',
+ 1 => 'Searching the Forums'
+ ),
+ array(
+ 0 => 'How can I search a forum or forums?',
+ 1 => 'Enter a search term in the search box located on the index, forum or topic pages. Advanced search can be accessed by clicking the “Advance Search†link which is available on all pages on the forum. How to access the search may depend on the style used.'
+ ),
+ array(
+ 0 => 'Why does my search return no results?',
+ 1 => 'Your search was probably too vague and included many common terms which are not indexed by phpBB3. Be more specific and use the options available within Advanced search.'
+ ),
+ array(
+ 0 => 'Why does my search return a blank page!?',
+ 1 => 'Your search returned too many results for the webserver to handle. Use “Advanced search†and be more specific in the terms used and forums that are to be searched.'
+ ),
+ array(
+ 0 => 'How do I search for members?',
+ 1 => 'Visit to the “Members†page and click the “Find a member†link.'
+ ),
+ array(
+ 0 => 'How can I find my own posts and topics?',
+ 1 => 'Your own posts can be retrieved either by clicking the “Search user’s posts†within the User Control Panel or via your own profile page. To search for your topics, use the Advanced search page and fill in the various options appropriately.'
+ ),
+ array(
+ 0 => '--',
+ 1 => 'Topic Subscriptions and Bookmarks'
+ ),
+ array(
+ 0 => 'What is the difference between bookmarking and subscribing?',
+ 1 => 'Bookmarking in phpBB3 is much like bookmarking in your web browser. You aren’t alerted when there’s an update, but you can come back to the topic later. Subscribing, however, will notify you when there is an update to the topic or forum on the board via your preferred method or methods.'
+ ),
+ array(
+ 0 => 'How do I subscribe to specific forums or topics?',
+ 1 => 'To subscribe to a specific forum, click the “Subscribe forum†link upon entering the forum. To subscribe to a topic, reply to the topic with the subscribe checkbox checked or click the “Subscribe topic†link within the topic itself.'
+ ),
+ array(
+ 0 => 'How do I remove my subscriptions?',
+ 1 => 'To remove your subscriptions, go to your User Control Panel and follow the links to your subscriptions.'
+ ),
+ array(
+ 0 => '--',
+ 1 => 'Attachments'
+ ),
+ array(
+ 0 => 'What attachments are allowed on this board?',
+ 1 => 'Each board administrator can allow or disallow certain attachment types. If you are unsure what is allowed to be uploaded, contact the board administrator for assistance.'
+ ),
+ array(
+ 0 => 'How do I find all my attachments?',
+ 1 => 'To find your list of attachments that you have uploaded, go to your User Control Panel and follow the links to the attachments section.'
+ ),
+ array(
+ 0 => '--',
+ 1 => 'phpBB 3 Issues'
+ ),
+ array(
+ 0 => 'Who wrote this bulletin board?',
+ 1 => 'This software (in its unmodified form) is produced, released and is copyright <a href="http://www.phpbb.com/">phpBB Group</a>. It is made available under the GNU General Public License and may be freely distributed. See the link for more details.'
+ ),
+ array(
+ 0 => 'Why isn’t X feature available?',
+ 1 => 'This software was written by and licensed through phpBB Group. If you believe a feature needs to be added, please visit the phpbb.com website and see what phpBB Group have to say. Please do not post feature requests to the board at phpbb.com, the group uses SourceForge to handle tasking of new features. Please read through the forums and see what, if any, our position may already be for a feature and then follow the procedure given there.'
+ ),
+ array(
+ 0 => 'Who do I contact about abusive and/or legal matters related to this board?',
+ 1 => 'Any of the administrators listed on the “The team†page should be an appropriate point of contact for your complaints. If this still gets no response then you should contact the owner of the domain (do a <a href="http://www.google.com/search?q=whois">whois lookup</a>) or, if this is running on a free service (e.g. Yahoo!, free.fr, f2s.com, etc.), the management or abuse department of that service. Please note that the phpBB Group has <strong>absolutely no jurisdiction</strong> and cannot in any way be held liable over how, where or by whom this board is used. Do not contact the phpBB Group in relation to any legal (cease and desist, liable, defamatory comment, etc.) matter <strong>not directly related</strong> to the phpBB.com website or the discrete software of phpBB itself. If you do e-mail phpBB Group <strong>about any third party</strong> use of this software then you should expect a terse response or no response at all.'
+ )
+);
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/index.htm b/phpBB/language/en/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/language/en/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
new file mode 100644
index 0000000000..9543c712da
--- /dev/null
+++ b/phpBB/language/en/install.php
@@ -0,0 +1,635 @@
+<?php
+/**
+*
+* install [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'ADMIN_CONFIG' => 'Administrator configuration',
+ 'ADMIN_PASSWORD' => 'Administrator password',
+ 'ADMIN_PASSWORD_CONFIRM' => 'Confirm administrator password',
+ 'ADMIN_PASSWORD_EXPLAIN' => 'Please enter a password between 6 and 30 characters in length.',
+ 'ADMIN_TEST' => 'Check administrator settings',
+ 'ADMIN_USERNAME' => 'Administrator username',
+ 'ADMIN_USERNAME_EXPLAIN' => 'Please enter a username between 3 and 20 characters in length.',
+ 'APP_MAGICK' => 'Imagemagick support [ Attachments ]',
+ 'AUTHOR_NOTES' => 'Author notes<br />» %s',
+ 'AVAILABLE' => 'Available',
+ 'AVAILABLE_CONVERTORS' => 'Available convertors',
+
+ 'BEGIN_CONVERT' => 'Begin conversion',
+ 'BLANK_PREFIX_FOUND' => 'A scan of your tables has shown a valid installation using no table prefix.',
+ 'BOARD_NOT_INSTALLED' => 'No installation found',
+ 'BOARD_NOT_INSTALLED_EXPLAIN' => 'The phpBB Unified Convertor Framework requires a default installation of phpBB3 to function, please <a href="%s">proceed by first installing phpBB3</a>.',
+
+ 'CATEGORY' => 'Category',
+ 'CACHE_STORE' => 'Cache type',
+ 'CACHE_STORE_EXPLAIN' => 'The physical location where data is cached, filesystem is preferred.',
+ 'CAT_CONVERT' => 'Convert',
+ 'CAT_INSTALL' => 'Install',
+ 'CAT_OVERVIEW' => 'Overview',
+ 'CAT_UPDATE' => 'Update',
+ 'CHANGE' => 'Change',
+ 'CHECK_TABLE_PREFIX' => 'Please check your table prefix and try again.',
+ 'CLEAN_VERIFY' => 'Cleaning up and verifying the final structure',
+ 'CLEANING_USERNAMES' => 'Cleaning usernames',
+ 'COLLIDING_CLEAN_USERNAME' => '<strong>%s</strong> is the clean username for:',
+ 'COLLIDING_USERNAMES_FOUND' => 'Colliding usernames were found on your old board. In order to complete the conversion please delete or rename these users so that there is only one user on your old board for each clean username.',
+ 'COLLIDING_USER' => '» user id: <strong>%d</strong> username: <strong>%s</strong> (%d posts)',
+ 'CONFIG_CONVERT' => 'Converting the configuration',
+ 'CONFIG_FILE_UNABLE_WRITE' => 'It was not possible to write the configuration file. Alternative methods for this file to be created are presented below.',
+ 'CONFIG_FILE_WRITTEN' => 'The configuration file has been written. You may now proceed to the next step of the installation.',
+ 'CONFIG_PHPBB_EMPTY' => 'The phpBB3 config variable for “%s†is empty.',
+ 'CONFIG_RETRY' => 'Retry',
+ 'CONTACT_EMAIL_CONFIRM' => 'Confirm contact e-mail',
+ 'CONTINUE_CONVERT' => 'Continue conversion',
+ 'CONTINUE_CONVERT_BODY' => 'A previous conversion attempt has been determined. You are now able to choose between starting a new conversion or continuing the conversion.',
+ 'CONTINUE_LAST' => 'Continue last statements',
+ 'CONTINUE_OLD_CONVERSION' => 'Continue previously started conversion',
+ 'CONVERT' => 'Convert',
+ 'CONVERT_COMPLETE' => 'Conversion completed',
+ 'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.0. You can now login and <a href="../">access your board</a>. Please ensure that the settings were transferred correctly before enabling your board by deleting the install directory. Remember that help on using phpBB is available online via the <a href="http://www.phpbb.com/support/documentation/3.0/">Documentation</a> and the <a href="http://www.phpbb.com/community/viewforum.php?f=46">support forums</a>.',
+ 'CONVERT_INTRO' => 'Welcome to the phpBB Unified Convertor Framework',
+ 'CONVERT_INTRO_BODY' => 'From here, you are able to import data from other (installed) board systems. The list below shows all the conversion modules currently available. If there is no convertor shown in this list for the board software you wish to convert from, please check our website where further conversion modules may be available for download.',
+ 'CONVERT_NEW_CONVERSION' => 'New conversion',
+ 'CONVERT_NOT_EXIST' => 'The specified convertor does not exist.',
+ 'CONVERT_OPTIONS' => 'Options',
+ 'CONVERT_SETTINGS_VERIFIED' => 'The information you entered has been verified. To start the conversion process, please push the button below.',
+ 'CONV_ERR_FATAL' => 'Fatal conversion error',
+
+ 'CONV_ERROR_ATTACH_FTP_DIR' => 'FTP upload for attachments is enabled at the old board. Please disable the FTP upload option and make sure a valid upload directory is specified, then copy all attachment files to this new web accessible directory. Once you have done this, restart the convertor.',
+ 'CONV_ERROR_CONFIG_EMPTY' => 'There is no configuration information available for the conversion.',
+ 'CONV_ERROR_FORUM_ACCESS' => 'Unable to get forum access information.',
+ 'CONV_ERROR_GET_CATEGORIES' => 'Unable to get categories.',
+ 'CONV_ERROR_GET_CONFIG' => 'Could not retrieve your board configuration.',
+ 'CONV_ERROR_COULD_NOT_READ' => 'Unable to access/read “%sâ€.',
+ 'CONV_ERROR_GROUP_ACCESS' => 'Unable to get group authentication information.',
+ 'CONV_ERROR_INCONSISTENT_GROUPS' => 'Inconsistency in groups table detected in add_bots() - you need to add all special groups if you do it manually.',
+ 'CONV_ERROR_INSERT_BOT' => 'Unable to insert bot into users table.',
+ 'CONV_ERROR_INSERT_BOTGROUP' => 'Unable to insert bot into bots table.',
+ 'CONV_ERROR_INSERT_USER_GROUP' => 'Unable to insert user into user_group table.',
+ 'CONV_ERROR_MESSAGE_PARSER' => 'Message parser error',
+ 'CONV_ERROR_NO_AVATAR_PATH' => 'Note to developer: you must specify $convertor[\'avatar_path\'] to use %s.',
+ 'CONV_ERROR_NO_FORUM_PATH' => 'The relative path to the source board has not been specified.',
+ 'CONV_ERROR_NO_GALLERY_PATH' => 'Note to developer: you must specify $convertor[\'avatar_gallery_path\'] to use %s.',
+ 'CONV_ERROR_NO_GROUP' => 'Group “%1$s†could not be found in %2$s.',
+ 'CONV_ERROR_NO_RANKS_PATH' => 'Note to developer: you must specify $convertor[\'ranks_path\'] to use %s.',
+ 'CONV_ERROR_NO_SMILIES_PATH' => 'Note to developer: you must specify $convertor[\'smilies_path\'] to use %s.',
+ 'CONV_ERROR_NO_UPLOAD_DIR' => 'Note to developer: you must specify $convertor[\'upload_path\'] to use %s.',
+ 'CONV_ERROR_PERM_SETTING' => 'Unable to insert/update permission setting.',
+ 'CONV_ERROR_PM_COUNT' => 'Unable to select folder pm count.',
+ 'CONV_ERROR_REPLACE_CATEGORY' => 'Unable to insert new forum replacing old category.',
+ 'CONV_ERROR_REPLACE_FORUM' => 'Unable to insert new forum replacing old forum.',
+ 'CONV_ERROR_USER_ACCESS' => 'Unable to get user authentication information.',
+ 'CONV_ERROR_WRONG_GROUP' => 'Wrong group “%1$s†defined in %2$s.',
+ 'CONV_OPTIONS_BODY' => 'This page collects the data required to access the source board. Enter the database details of your former board; the converter will not change anything in the database given below. The source board should be disabled to allow a consistent conversion.',
+ 'CONV_SAVED_MESSAGES' => 'Saved messages',
+
+ 'COULD_NOT_COPY' => 'Could not copy file <strong>%1$s</strong> to <strong>%2$s</strong><br /><br />Please check that the target directory exists and is writable by the webserver.',
+ 'COULD_NOT_FIND_PATH' => 'Could not find path to your former board. Please check your settings and try again.<br />» %s was specified as the source path.',
+
+ 'DBMS' => 'Database type',
+ 'DB_CONFIG' => 'Database configuration',
+ 'DB_CONNECTION' => 'Database connection',
+ 'DB_ERR_INSERT' => 'Error while processing <code>INSERT</code> query.',
+ 'DB_ERR_LAST' => 'Error while processing <var>query_last</var>.',
+ 'DB_ERR_QUERY_FIRST' => 'Error while executing <var>query_first</var>.',
+ 'DB_ERR_QUERY_FIRST_TABLE' => 'Error while executing <var>query_first</var>, %s (“%sâ€).',
+ 'DB_ERR_SELECT' => 'Error while running <code>SELECT</code> query.',
+ 'DB_HOST' => 'Database server hostname or DSN',
+ 'DB_HOST_EXPLAIN' => 'DSN stands for Data Source Name and is relevant only for ODBC installs.',
+ 'DB_NAME' => 'Database name',
+ 'DB_PASSWORD' => 'Database password',
+ 'DB_PORT' => 'Database server port',
+ 'DB_PORT_EXPLAIN' => 'Leave this blank unless you know the server operates on a non-standard port.',
+ 'DB_UPDATE_NOT_SUPPORTED' => 'We are sorry, but this script does not support updating from versions of phpBB prior to “%1$sâ€. The version you currently have installed is “%2$sâ€. Please update to a previous version before running this script. Assistance with this is available in the Support Forum on phpBB.com.',
+ 'DB_USERNAME' => 'Database username',
+ 'DB_TEST' => 'Test connection',
+ 'DEFAULT_LANG' => 'Default board language',
+ 'DEFAULT_PREFIX_IS' => 'The convertor was not able to find tables with the specified prefix. Please make sure you have entered the correct details for the board you are converting from. The default table prefix for %1$s is <strong>%2$s</strong>.',
+ 'DEV_NO_TEST_FILE' => 'No value has been specified for the test_file variable in the convertor. If you are a user of this convertor, you should not be seeing this error, please report this message to the convertor author. If you are a convertor author, you must specify the name of a file which exists in the source board to allow the path to it to be verified.',
+ 'DIRECTORIES_AND_FILES' => 'Directory and file setup',
+ 'DISABLE_KEYS' => 'Disabling keys',
+ 'DLL_FIREBIRD' => 'Firebird',
+ 'DLL_FTP' => 'Remote FTP support [ Installation ]',
+ 'DLL_GD' => 'GD graphics support [ Visual Confirmation ]',
+ 'DLL_MBSTRING' => 'Multi-byte character support',
+ 'DLL_MSSQL' => 'MSSQL Server 2000+',
+ 'DLL_MSSQL_ODBC' => 'MSSQL Server 2000+ via ODBC',
+ 'DLL_MYSQL' => 'MySQL',
+ 'DLL_MYSQLI' => 'MySQL with MySQLi Extension',
+ 'DLL_ORACLE' => 'Oracle',
+ 'DLL_POSTGRES' => 'PostgreSQL 7.x/8.x',
+ 'DLL_SQLITE' => 'SQLite',
+ 'DLL_XML' => 'XML support [ Jabber ]',
+ 'DLL_ZLIB' => 'zlib compression support [ gz, .tar.gz, .zip ]',
+ 'DL_CONFIG' => 'Download config',
+ 'DL_CONFIG_EXPLAIN' => 'You may download the complete config.php to your own PC. You will then need to upload the file manually, replacing any existing config.php in your phpBB 3.0 root directory. Please remember to upload the file in ASCII format (see your FTP application documentation if you are unsure how to achieve this). When you have uploaded the config.php please click “Done†to move to the next stage.',
+ 'DL_DOWNLOAD' => 'Download',
+ 'DONE' => 'Done',
+
+ 'ENABLE_KEYS' => 'Re-enabling keys. This can take a while.',
+
+ 'FILES_OPTIONAL' => 'Optional files and directories',
+ 'FILES_OPTIONAL_EXPLAIN' => '<strong>Optional</strong> - These files, directories or permission settings are not required. The installation system will attempt to use various techniques to create them if they do not exist or cannot be written to. However, the presence of these will speed installation.',
+ 'FILES_REQUIRED' => 'Files and Directories',
+ 'FILES_REQUIRED_EXPLAIN' => '<strong>Required</strong> - In order to function correctly phpBB needs to be able to access or write to certain files or directories. If you see “Not Found†you need to create the relevant file or directory. If you see “Unwritable†you need to change the permissions on the file or directory to allow phpBB to write to it.',
+ 'FILLING_TABLE' => 'Filling table <strong>%s</strong>',
+ 'FILLING_TABLES' => 'Filling tables',
+
+ 'FIREBIRD_DBMS_UPDATE_REQUIRED' => 'phpBB no longer supports Firebird/Interbase prior to Version 2.1. Please update your Firebird installation to at least 2.1.0 before proceeding with the update.',
+
+ 'FINAL_STEP' => 'Process final step',
+ 'FORUM_ADDRESS' => 'Board address',
+ 'FORUM_ADDRESS_EXPLAIN' => 'This is the URL of your former board, for example <samp>http://www.example.com/phpBB2/</samp>. If an address is entered here and not left empty every instance of this address will be replaced by your new board address within messages, private messages and signatures.',
+ 'FORUM_PATH' => 'Board path',
+ 'FORUM_PATH_EXPLAIN' => 'This is the <strong>relative</strong> path on disk to your former board from the <strong>root of this phpBB3 installation</strong>.',
+ 'FOUND' => 'Found',
+ 'FTP_CONFIG' => 'Transfer config by FTP',
+ 'FTP_CONFIG_EXPLAIN' => 'phpBB has detected the presence of the FTP module on this server. You may attempt to install your config.php via this if you wish. You will need to supply the information listed below. Remember your username and password are those to your server! (ask your hosting provider for details if you are unsure what these are).',
+ 'FTP_PATH' => 'FTP path',
+ 'FTP_PATH_EXPLAIN' => 'This is the path from your root directory to that of phpBB, e.g. <samp>htdocs/phpBB3/</samp>.',
+ 'FTP_UPLOAD' => 'Upload',
+
+ 'GPL' => 'General Public License',
+
+ 'INITIAL_CONFIG' => 'Basic configuration',
+ 'INITIAL_CONFIG_EXPLAIN' => 'Now that install has determined your server can run phpBB you need to supply some specific information. If you do not know how to connect to your database please contact your hosting provider (in the first instance) or use the phpBB support forums. When entering data please ensure you check it thoroughly before continuing.',
+ 'INSTALL_CONGRATS' => 'Congratulations!',
+ 'INSTALL_CONGRATS_EXPLAIN' => '
+ You have successfully installed phpBB %1$s. Please proceed by choosing one of the following options:</p>
+ <h2>Convert an existing board to phpBB3</h2>
+ <p>The phpBB Unified Convertor Framework supports the conversion of phpBB 2.0.x and other board systems to phpBB3. If you have an existing board that you wish to convert, please <a href="%2$s">proceed to the convertor</a>.</p>
+ <h2>Go live with your phpBB3!</h2>
+ <p>Clicking the button below will take you to a form for submitting statistical data to phpBB in your Administration Control Panel (ACP). We would appreciate it if you could help us by sending that information. Afterwards you should take some time to examine the options available to you. Remember that help is available online via the <a href="http://www.phpbb.com/support/documentation/3.0/">Documentation</a>, <a href="%3$s">README</a> and the <a href="http://www.phpbb.com/community/viewforum.php?f=46">Support Forums</a>.</p><p><strong>Please delete, move or rename the install directory before using your board. While this directory exists, only the Administration Control Panel (ACP) will be accessible.</strong>',
+ 'INSTALL_INTRO' => 'Welcome to Installation',
+
+ 'INSTALL_INTRO_BODY' => 'With this option, it is possible to install phpBB3 onto your server.</p><p>In order to proceed, you will need your database settings. If you do not know your database settings, please contact your host and ask for them. You will not be able to continue without them. You need:</p>
+
+ <ul>
+ <li>The Database Type - the database you will be using.</li>
+ <li>The Database server hostname or DSN - the address of the database server.</li>
+ <li>The Database server port - the port of the database server (most of the time this is not needed).</li>
+ <li>The Database name - the name of the database on the server.</li>
+ <li>The Database username and Database password - the login data to access the database.</li>
+ </ul>
+
+ <p><strong>Note:</strong> if you are installing using SQLite, you should enter the full path to your database file in the DSN field and leave the username and password fields blank. For security reasons, you should make sure that the database file is not stored in a location accessible from the web.</p>
+
+ <p>phpBB3 supports the following databases:</p>
+ <ul>
+ <li>MySQL 3.23 or above (MySQLi supported)</li>
+ <li>PostgreSQL 7.3+</li>
+ <li>SQLite 2.8.2+</li>
+ <li>Firebird 2.1+</li>
+ <li>MS SQL Server 2000 or above (directly or via ODBC)</li>
+ <li>Oracle</li>
+ </ul>
+
+ <p>Only those databases supported on your server will be displayed.',
+ 'INSTALL_INTRO_NEXT' => 'To commence the installation, please press the button below.',
+ 'INSTALL_LOGIN' => 'Login',
+ 'INSTALL_NEXT' => 'Next stage',
+ 'INSTALL_NEXT_FAIL' => 'Some tests failed and you should correct these problems before proceeding to the next stage. Failure to do so may result in an incomplete installation.',
+ 'INSTALL_NEXT_PASS' => 'All the basic tests have been passed and you may proceed to the next stage of installation. If you have changed any permissions, modules, etc. and wish to re-test you can do so if you wish.',
+ 'INSTALL_PANEL' => 'Installation Panel',
+ 'INSTALL_SEND_CONFIG' => 'Unfortunately phpBB could not write the configuration information directly to your config.php. This may be because the file does not exist or is not writable. A number of options will be listed below enabling you to complete installation of config.php.',
+ 'INSTALL_START' => 'Start install',
+ 'INSTALL_TEST' => 'Test again',
+ 'INST_ERR' => 'Installation error',
+ 'INST_ERR_DB_CONNECT' => 'Could not connect to the database, see error message below.',
+ 'INST_ERR_DB_FORUM_PATH' => 'The database file specified is within your board directory tree. You should put this file in a non web-accessible location.',
+ 'INST_ERR_DB_NO_ERROR' => 'No error message given.',
+ 'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the “MySQL with MySQLi Extension†option you have selected. Please try the “MySQL†option instead.',
+ 'INST_ERR_DB_NO_SQLITE' => 'The version of the SQLite extension you have installed is too old, it must be upgraded to at least 2.8.2.',
+ 'INST_ERR_DB_NO_ORACLE' => 'The version of Oracle installed on this machine requires you to set the <var>NLS_CHARACTERSET</var> parameter to <var>UTF8</var>. Either upgrade your installation to 9.2+ or change the parameter.',
+ 'INST_ERR_DB_NO_FIREBIRD' => 'The version of Firebird installed on this machine is older than 2.1, please upgrade to a newer version.',
+ 'INST_ERR_DB_NO_FIREBIRD_PS'=> 'The database you selected for Firebird has a page size less than 8192, it must be at least 8192.',
+ 'INST_ERR_DB_NO_POSTGRES' => 'The database you have selected was not created in <var>UNICODE</var> or <var>UTF8</var> encoding. Try installing with a database in <var>UNICODE</var> or <var>UTF8</var> encoding.',
+ 'INST_ERR_DB_NO_NAME' => 'No database name specified.',
+ 'INST_ERR_EMAIL_INVALID' => 'The e-mail address you entered is invalid.',
+ 'INST_ERR_EMAIL_MISMATCH' => 'The e-mails you entered did not match.',
+ 'INST_ERR_FATAL' => 'Fatal installation error',
+ 'INST_ERR_FATAL_DB' => 'A fatal and unrecoverable database error has occurred. This may be because the specified user does not have appropriate permissions to <code>CREATE TABLES</code> or <code>INSERT</code> data, etc. Further information may be given below. Please contact your hosting provider in the first instance or the support forums of phpBB for further assistance.',
+ 'INST_ERR_FTP_PATH' => 'Could not change to the given directory, please check the path.',
+ 'INST_ERR_FTP_LOGIN' => 'Could not login to FTP server, check your username and password.',
+ 'INST_ERR_MISSING_DATA' => 'You must fill out all fields in this block.',
+ 'INST_ERR_NO_DB' => 'Cannot load the PHP module for the selected database type.',
+ 'INST_ERR_PASSWORD_MISMATCH' => 'The passwords you entered did not match.',
+ 'INST_ERR_PASSWORD_TOO_LONG' => 'The password you entered is too long. The maximum length is 30 characters.',
+ 'INST_ERR_PASSWORD_TOO_SHORT' => 'The password you entered is too short. The minimum length is 6 characters.',
+ 'INST_ERR_PREFIX' => 'Tables with the specified prefix already exist, please choose an alternative.',
+ 'INST_ERR_PREFIX_INVALID' => 'The table prefix you have specified is invalid for your database. Please try another, removing characters such as the hyphen.',
+ 'INST_ERR_PREFIX_TOO_LONG' => 'The table prefix you have specified is too long. The maximum length is %d characters.',
+ 'INST_ERR_USER_TOO_LONG' => 'The username you entered is too long. The maximum length is 20 characters.',
+ 'INST_ERR_USER_TOO_SHORT' => 'The username you entered is too short. The minimum length is 3 characters.',
+ 'INVALID_PRIMARY_KEY' => 'Invalid primary key : %s',
+
+ 'LONG_SCRIPT_EXECUTION' => 'Please note that this can take a while... Please do not stop the script.',
+
+ // mbstring
+ 'MBSTRING_CHECK' => '<samp>mbstring</samp> extension check',
+ 'MBSTRING_CHECK_EXPLAIN' => '<strong>Required</strong> - <samp>mbstring</samp> is a PHP extension that provides multibyte string functions. Certain features of mbstring are not compatible with phpBB and must be disabled.',
+ 'MBSTRING_FUNC_OVERLOAD' => 'Function overloading',
+ 'MBSTRING_FUNC_OVERLOAD_EXPLAIN' => '<var>mbstring.func_overload</var> must be set to either 0 or 4.',
+ 'MBSTRING_ENCODING_TRANSLATION' => 'Transparent character encoding',
+ 'MBSTRING_ENCODING_TRANSLATION_EXPLAIN' => '<var>mbstring.encoding_translation</var> must be set to 0.',
+ 'MBSTRING_HTTP_INPUT' => 'HTTP input character conversion',
+ 'MBSTRING_HTTP_INPUT_EXPLAIN' => '<var>mbstring.http_input</var> must be set to <samp>pass</samp>.',
+ 'MBSTRING_HTTP_OUTPUT' => 'HTTP output character conversion',
+ 'MBSTRING_HTTP_OUTPUT_EXPLAIN' => '<var>mbstring.http_output</var> must be set to <samp>pass</samp>.',
+
+ 'MAKE_FOLDER_WRITABLE' => 'Please make sure that this folder exists and is writable by the webserver then try again:<br />»<strong>%s</strong>.',
+ 'MAKE_FOLDERS_WRITABLE' => 'Please make sure that these folders exist and are writable by the webserver then try again:<br />»<strong>%s</strong>.',
+
+ 'MYSQL_SCHEMA_UPDATE_REQUIRED' => 'Your MySQL database schema for phpBB is outdated. phpBB detected a schema for MySQL 3.x/4.x, but the server runs on MySQL %2$s.<br /><strong>Before you proceed the update, you need to upgrade the schema.</strong><br /><br />Please refer to the <a href="http://www.phpbb.com/kb/article/doesnt-have-a-default-value-errors/">Knowledge Base article about upgrading the MySQL schema</a>. If you encounter problems, please use <a href="http://www.phpbb.com/community/viewforum.php?f=46">our support forums</a>.',
+
+ 'NAMING_CONFLICT' => 'Naming conflict: %s and %s are both aliases<br /><br />%s',
+ 'NEXT_STEP' => 'Proceed to next step',
+ 'NOT_FOUND' => 'Cannot find',
+ 'NOT_UNDERSTAND' => 'Could not understand %s #%d, table %s (“%sâ€)',
+ 'NO_CONVERTORS' => 'No convertors are available for use.',
+ 'NO_CONVERT_SPECIFIED' => 'No convertor specified.',
+ 'NO_LOCATION' => 'Cannot determine location. If you know Imagemagick is installed, you may specify the location later within your administration control panel',
+ 'NO_TABLES_FOUND' => 'No tables found.',
+
+ 'OVERVIEW_BODY' => 'Welcome to phpBB3!<br /><br />phpBBâ„¢ is the most widely used open source bulletin board solution in the world. phpBB3 is the latest installment in a package line started in 2000. Like its predecessors, phpBB3 is feature-rich, user-friendly, and fully supported by the phpBB Team. phpBB3 greatly improves on what made phpBB2 popular, and adds commonly requested features that were not present in previous versions. We hope it exceeds your expectations.<br /><br />This installation system will guide you through installing phpBB3, updating to the latest version of phpBB3 from past releases, as well as converting to phpBB3 from a different discussion board system (including phpBB2). For more information, we encourage you to read <a href="../docs/INSTALL.html">the installation guide</a>.<br /><br />To read the phpBB3 license or learn about obtaining support and our stance on it, please select the respective options from the side menu. To continue, please select the appropriate tab above.',
+
+ 'PCRE_UTF_SUPPORT' => 'PCRE UTF-8 support',
+ 'PCRE_UTF_SUPPORT_EXPLAIN' => 'phpBB will <strong>not</strong> run if your PHP installation is not compiled with UTF-8 support in the PCRE extension.',
+ 'PHP_GETIMAGESIZE_SUPPORT' => 'PHP function getimagesize() is available',
+ 'PHP_GETIMAGESIZE_SUPPORT_EXPLAIN' => '<strong>Required</strong> - In order for phpBB to function correctly, the getimagesize function needs to be available.',
+ 'PHP_OPTIONAL_MODULE' => 'Optional modules',
+ 'PHP_OPTIONAL_MODULE_EXPLAIN' => '<strong>Optional</strong> - These modules or applications are optional. However, if they are available they will enable extra features.',
+ 'PHP_SUPPORTED_DB' => 'Supported databases',
+ 'PHP_SUPPORTED_DB_EXPLAIN' => '<strong>Required</strong> - You must have support for at least one compatible database within PHP. If no database modules are shown as available you should contact your hosting provider or review the relevant PHP installation documentation for advice.',
+ 'PHP_REGISTER_GLOBALS' => 'PHP setting <var>register_globals</var> is disabled',
+ 'PHP_REGISTER_GLOBALS_EXPLAIN' => 'phpBB will still run if this setting is enabled, but if possible, it is recommended that register_globals is disabled on your PHP install for security reasons.',
+ 'PHP_SAFE_MODE' => 'Safe mode',
+ 'PHP_SETTINGS' => 'PHP version and settings',
+ 'PHP_SETTINGS_EXPLAIN' => '<strong>Required</strong> - You must be running at least version 4.3.3 of PHP in order to install phpBB. If <var>safe mode</var> is displayed below your PHP installation is running in that mode. This will impose limitations on remote administration and similar features.',
+ 'PHP_URL_FOPEN_SUPPORT' => 'PHP setting <var>allow_url_fopen</var> is enabled',
+ 'PHP_URL_FOPEN_SUPPORT_EXPLAIN' => '<strong>Optional</strong> - This setting is optional, however certain phpBB functions like off-site avatars will not work properly without it. ',
+ 'PHP_VERSION_REQD' => 'PHP version >= 4.3.3',
+ 'POST_ID' => 'Post ID',
+ 'PREFIX_FOUND' => 'A scan of your tables has shown a valid installation using <strong>%s</strong> as table prefix.',
+ 'PREPROCESS_STEP' => 'Executing pre-processing functions/queries',
+ 'PRE_CONVERT_COMPLETE' => 'All pre-conversion steps have successfully been completed. You may now begin the actual conversion process. Please note that you may have to manually do and adjust several things. After conversion, especially check the permissions assigned, rebuild your search index which is not converted and also make sure files got copied correctly, for example avatars and smilies.',
+ 'PROCESS_LAST' => 'Processing last statements',
+
+ 'REFRESH_PAGE' => 'Refresh page to continue conversion',
+ 'REFRESH_PAGE_EXPLAIN' => 'If set to yes, the convertor will refresh the page to continue the conversion after having finished a step. If this is your first conversion for testing purposes and to determine any errors in advance, we suggest to set this to No.',
+ 'REQUIREMENTS_TITLE' => 'Installation compatibility',
+ 'REQUIREMENTS_EXPLAIN' => 'Before proceeding with the full installation phpBB will carry out some tests on your server configuration and files to ensure that you are able to install and run phpBB. Please ensure you read through the results thoroughly and do not proceed until all the required tests are passed. If you wish to use any of the features depending on the optional tests, you should ensure that these tests are passed also.',
+ 'RETRY_WRITE' => 'Retry writing config',
+ 'RETRY_WRITE_EXPLAIN' => 'If you wish you can change the permissions on config.php to allow phpBB to write to it. Should you wish to do that you can click Retry below to try again. Remember to return the permissions on config.php after phpBB has finished installation.',
+
+ 'SCRIPT_PATH' => 'Script path',
+ 'SCRIPT_PATH_EXPLAIN' => 'The path where phpBB is located relative to the domain name, e.g. <samp>/phpBB3</samp>.',
+ 'SELECT_LANG' => 'Select language',
+ 'SERVER_CONFIG' => 'Server configuration',
+ 'SEARCH_INDEX_UNCONVERTED' => 'Search index was not converted',
+ 'SEARCH_INDEX_UNCONVERTED_EXPLAIN' => 'Your old search index was not converted. Searching will always yield an empty result. To create a new search index go to the Administration Control Panel, select Maintenance and then choose Search index from the submenu.',
+ 'SOFTWARE' => 'Board software',
+ 'SPECIFY_OPTIONS' => 'Specify conversion options',
+ 'STAGE_ADMINISTRATOR' => 'Administrator details',
+ 'STAGE_ADVANCED' => 'Advanced settings',
+ 'STAGE_ADVANCED_EXPLAIN' => 'The settings on this page are only necessary to set if you know that you require something different from the default. If you are unsure, just proceed to the next page, as these settings can be altered from the Administration Control Panel later.',
+ 'STAGE_CONFIG_FILE' => 'Configuration file',
+ 'STAGE_CREATE_TABLE' => 'Create database tables',
+ 'STAGE_CREATE_TABLE_EXPLAIN' => 'The database tables used by phpBB 3.0 have been created and populated with some initial data. Proceed to the next screen to finish installing phpBB.',
+ 'STAGE_DATABASE' => 'Database settings',
+ 'STAGE_FINAL' => 'Final stage',
+ 'STAGE_INTRO' => 'Introduction',
+ 'STAGE_IN_PROGRESS' => 'Conversion in progress',
+ 'STAGE_REQUIREMENTS' => 'Requirements',
+ 'STAGE_SETTINGS' => 'Settings',
+ 'STARTING_CONVERT' => 'Starting conversion process',
+ 'STEP_PERCENT_COMPLETED' => 'Step <strong>%d</strong> of <strong>%d</strong>',
+ 'SUB_INTRO' => 'Introduction',
+ 'SUB_LICENSE' => 'License',
+ 'SUB_SUPPORT' => 'Support',
+ 'SUCCESSFUL_CONNECT' => 'Successful connection',
+ 'SUPPORT_BODY' => 'Full support will be provided for the current stable release of phpBB3, free of charge. This includes:</p><ul><li>installation</li><li>configuration</li><li>technical questions</li><li>problems relating to potential bugs in the software</li><li>updating from Release Candidate (RC) versions to the latest stable version</li><li>converting from phpBB 2.0.x to phpBB3</li><li>converting from other discussion board software to phpBB3 (please see the <a href="http://www.phpbb.com/community/viewforum.php?f=65">Convertors Forum</a>)</li></ul><p>We encourage users still running beta versions of phpBB3 to replace their installation with a fresh copy of the latest version.</p><h2>MODs / Styles</h2><p>For issues relating to MODs, please post in the appropriate <a href="http://www.phpbb.com/community/viewforum.php?f=81">Modifications Forum</a>.<br />For issues relating to styles, templates and imagesets, please post in the appropriate <a href="http://www.phpbb.com/community/viewforum.php?f=80">Styles Forum</a>.<br /><br />If your question relates to a specific package, please post directly in the topic dedicated to the package.</p><h2>Obtaining Support</h2><p><a href="http://www.phpbb.com/community/viewtopic.php?f=14&amp;t=571070">The phpBB Welcome Package</a><br /><a href="http://www.phpbb.com/support/">Support Section</a><br /><a href="http://www.phpbb.com/support/documentation/3.0/quickstart/">Quick Start Guide</a><br /><br />To ensure you stay up to date with the latest news and releases, why not <a href="http://www.phpbb.com/support/">subscribe to our mailing list</a>?<br /><br />',
+ 'SYNC_FORUMS' => 'Starting to synchronise forums',
+ 'SYNC_POST_COUNT' => 'Synchronising post_counts',
+ 'SYNC_POST_COUNT_ID' => 'Synchronising post_counts from <var>entry</var> %1$s to %2$s.',
+ 'SYNC_TOPICS' => 'Starting to synchronise topics',
+ 'SYNC_TOPIC_ID' => 'Synchronising topics from <var>topic_id</var> %1$s to %2$s.',
+
+ 'TABLES_MISSING' => 'Could not find these tables<br />» <strong>%s</strong>.',
+ 'TABLE_PREFIX' => 'Prefix for tables in database',
+ 'TABLE_PREFIX_SAME' => 'The table prefix needs to be the one used by the software you are converting from.<br />» Specified table prefix was %s.',
+ 'TESTS_PASSED' => 'Tests passed',
+ 'TESTS_FAILED' => 'Tests failed',
+
+ 'UNABLE_WRITE_LOCK' => 'Unable to write lock file.',
+ 'UNAVAILABLE' => 'Unavailable',
+ 'UNWRITABLE' => 'Unwritable',
+ 'UPDATE_TOPICS_POSTED' => 'Generating topics posted information',
+ 'UPDATE_TOPICS_POSTED_ERR' => 'An error occured while generating topics posted information. You can retry this step in the ACP after the conversion process is completed.',
+ 'VERIFY_OPTIONS' => 'Verifying conversion options',
+ 'VERSION' => 'Version',
+
+ 'WELCOME_INSTALL' => 'Welcome to phpBB3 Installation',
+ 'WRITABLE' => 'Writable',
+));
+
+// Updater
+$lang = array_merge($lang, array(
+ 'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version. You should now <a href="../ucp.php?mode=login&amp;redirect=adm/index.php%3Fi=send_statistics%26mode=send_statistics">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the <a href="../ucp.php?mode=login&amp;redirect=adm/index.php%3Fi=send_statistics%26mode=send_statistics">Send statistics</a> module in your ACP.',
+ 'ARCHIVE_FILE' => 'Source file within archive',
+
+ 'BACK' => 'Back',
+ 'BINARY_FILE' => 'Binary file',
+ 'BOT' => 'Spider/Robot',
+
+ 'CHANGE_CLEAN_NAMES' => 'The method used to make sure a username is not used by multiple users has been changed. There are some users which have the same name when compared with the new method. You have to delete or rename these users to make sure that each name is only used by one user before you can proceed.',
+ 'CHECK_FILES' => 'Check files',
+ 'CHECK_FILES_AGAIN' => 'Check files again',
+ 'CHECK_FILES_EXPLAIN' => 'Within the next step all files will be checked against the update files - this can take a while if this is the first file check.',
+ 'CHECK_FILES_UP_TO_DATE' => 'According to your database your version is up to date. You may want to proceed with the file check to make sure all files are really up to date with the latest phpBB version.',
+ 'CHECK_UPDATE_DATABASE' => 'Continue update process',
+ 'COLLECTED_INFORMATION' => 'File information',
+ 'COLLECTED_INFORMATION_EXPLAIN' => 'The list below shows information about the files needing an update. Please read the information in front of every status block to see what they mean and what you may need to do to perform a successful update.',
+ 'COLLECTING_FILE_DIFFS' => 'Collecting file differences',
+ 'COMPLETE_LOGIN_TO_BOARD' => 'You should now <a href="../ucp.php?mode=login">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory!',
+ 'CONTINUE_UPDATE_NOW' => 'Continue the update process now', // Shown within the database update script at the end if called from the updater
+ 'CONTINUE_UPDATE' => 'Continue update now', // Shown after file upload to indicate the update process is not yet finished
+ 'CURRENT_FILE' => 'Begin of Conflict - Original File code before update',
+ 'CURRENT_VERSION' => 'Current version',
+
+ 'DATABASE_TYPE' => 'Database type',
+ 'DATABASE_UPDATE_INFO_OLD' => 'The database update file within the install directory is outdated. Please make sure you uploaded the correct version of the file.',
+ 'DELETE_USER_REMOVE' => 'Delete user and remove posts',
+ 'DELETE_USER_RETAIN' => 'Delete user but keep posts',
+ 'DESTINATION' => 'Destination file',
+ 'DIFF_INLINE' => 'Inline',
+ 'DIFF_RAW' => 'Raw unified diff',
+ 'DIFF_SEP_EXPLAIN' => 'Code block used within the updated/new file',
+ 'DIFF_SIDE_BY_SIDE' => 'Side by Side',
+ 'DIFF_UNIFIED' => 'Unified diff',
+ 'DO_NOT_UPDATE' => 'Do not update this file',
+ 'DONE' => 'Done',
+ 'DOWNLOAD' => 'Download',
+ 'DOWNLOAD_AS' => 'Download as',
+ 'DOWNLOAD_UPDATE_METHOD_BUTTON' => 'Download modified files archive (recommended)',
+ 'DOWNLOAD_CONFLICTS' => 'Download conflicts for this file',
+ 'DOWNLOAD_CONFLICTS_EXPLAIN' => 'Search for &lt;&lt;&lt; to spot conflicts',
+ 'DOWNLOAD_UPDATE_METHOD' => 'Download modified files archive',
+ 'DOWNLOAD_UPDATE_METHOD_EXPLAIN' => 'Once downloaded you should unpack the archive. You will find the modified files you need to upload to your phpBB root directory within it. Please upload the files to their respective locations then. After you have uploaded all files, please check the files again with the other button below.',
+
+ 'ERROR' => 'Error',
+ 'EDIT_USERNAME' => 'Edit username',
+
+ 'FILE_ALREADY_UP_TO_DATE' => 'File is already up to date.',
+ 'FILE_DIFF_NOT_ALLOWED' => 'File not allowed to be diffed.',
+ 'FILE_USED' => 'Information used from', // Single file
+ 'FILES_CONFLICT' => 'Conflict files',
+ 'FILES_CONFLICT_EXPLAIN' => 'The following files are modified and do not represent the original files from the old version. phpBB determined that these files create conflicts if they are tried to be merged. Please investigate the conflicts and try to manually resolve them or continue the update choosing the preferred merging method. If you resolve the conflicts manually check the files again after you modified them. You are also able to choose between the preferred merge method for every file. The first one will result in a file where the conflicting lines from your old file will be lost, the other one will result in losing the changes from the newer file.',
+ 'FILES_MODIFIED' => 'Modified files',
+ 'FILES_MODIFIED_EXPLAIN' => 'The following files are modified and do not represent the original files from the old version. The updated file will be a merge between your modifications and the new file.',
+ 'FILES_NEW' => 'New files',
+ 'FILES_NEW_EXPLAIN' => 'The following files currently do not exist within your installation. These files will be added to your installation.',
+ 'FILES_NEW_CONFLICT' => 'New conflicting files',
+ 'FILES_NEW_CONFLICT_EXPLAIN' => 'The following files are new within the latest version but it has been determined that there is already a file with the same name within the same position. This file will be overwritten by the new file.',
+ 'FILES_NOT_MODIFIED' => 'Not modified files',
+ 'FILES_NOT_MODIFIED_EXPLAIN' => 'The following files are not modified and represent the original phpBB files from the version you want to update from.',
+ 'FILES_UP_TO_DATE' => 'Already updated files',
+ 'FILES_UP_TO_DATE_EXPLAIN' => 'The following files are already up to date and do not need to be updated.',
+ 'FTP_SETTINGS' => 'FTP settings',
+ 'FTP_UPDATE_METHOD' => 'FTP upload',
+
+ 'INCOMPATIBLE_UPDATE_FILES' => 'The update files found are incompatible with your installed version. Your installed version is %1$s and the update file is for updating phpBB %2$s to %3$s.',
+ 'INCOMPLETE_UPDATE_FILES' => 'The update files are incomplete.',
+ 'INLINE_UPDATE_SUCCESSFUL' => 'The database update was successful. Now you need to continue the update process.',
+
+ 'KEEP_OLD_NAME' => 'Keep username',
+
+ 'LATEST_VERSION' => 'Latest version',
+ 'LINE' => 'Line',
+ 'LINE_ADDED' => 'Added',
+ 'LINE_MODIFIED' => 'Modified',
+ 'LINE_REMOVED' => 'Removed',
+ 'LINE_UNMODIFIED' => 'Unmodified',
+ 'LOGIN_UPDATE_EXPLAIN' => 'In order to update your installation you need to login first.',
+
+ 'MAPPING_FILE_STRUCTURE' => 'To ease the upload here are the file locations which map your phpBB installation.',
+
+ 'MERGE_MODIFICATIONS_OPTION' => 'Merge modifications',
+
+ 'MERGE_NO_MERGE_NEW_OPTION' => 'Do not merge - use new file',
+ 'MERGE_NO_MERGE_MOD_OPTION' => 'Do not merge - use currently installed file',
+ 'MERGE_MOD_FILE_OPTION' => 'Merge modifications (removes new phpBB code within conflicting block)',
+ 'MERGE_NEW_FILE_OPTION' => 'Merge modifications (removes modified code within conflicting block)',
+ 'MERGE_SELECT_ERROR' => 'Conflicting file merge modes are not correctly selected.',
+ 'MERGING_FILES' => 'Merging differences',
+ 'MERGING_FILES_EXPLAIN' => 'Currently collecting final file changes.<br /><br />Please wait until phpBB has completed all operations on changed files.',
+
+ 'NEW_FILE' => 'End of Conflict',
+ 'NEW_USERNAME' => 'New username',
+ 'NO_AUTH_UPDATE' => 'Not authorised to update',
+ 'NO_ERRORS' => 'No errors',
+ 'NO_UPDATE_FILES' => 'Not updating the following files',
+ 'NO_UPDATE_FILES_EXPLAIN' => 'The following files are new or modified but the directory they normally reside in could not be found on your installation. If this list contains files to other directories than language/ or styles/ than you may have modified your directory structure and the update may be incomplete.',
+ 'NO_UPDATE_FILES_OUTDATED' => 'No valid update directory was found, please make sure you uploaded the relevant files.<br /><br />Your installation does <strong>not</strong> seem to be up to date. Updates are available for your version of phpBB %1$s, please visit <a href="http://www.phpbb.com/downloads/" rel="external">http://www.phpbb.com/downloads/</a> to obtain the correct package to update from Version %2$s to Version %3$s.',
+ 'NO_UPDATE_FILES_UP_TO_DATE' => 'Your version is up to date. There is no need to run the update tool. If you want to make an integrity check on your files make sure you uploaded the correct update files.',
+ 'NO_UPDATE_INFO' => 'Update file information could not be found.',
+ 'NO_UPDATES_REQUIRED' => 'No updates required',
+ 'NO_VISIBLE_CHANGES' => 'No visible changes',
+ 'NOTICE' => 'Notice',
+ 'NUM_CONFLICTS' => 'Number of conflicts',
+ 'NUMBER_OF_FILES_COLLECTED' => 'Currently differences from %1$d of %2$d files have been checked.<br />Please wait until all files are checked.',
+
+ 'OLD_UPDATE_FILES' => 'Update files are out of date. The update files found are for updating from phpBB %1$s to phpBB %2$s but the latest version of phpBB is %3$s.',
+
+ 'PACKAGE_UPDATES_TO' => 'Current package updates to version',
+ 'PERFORM_DATABASE_UPDATE' => 'Perform database update',
+ 'PERFORM_DATABASE_UPDATE_EXPLAIN' => 'Below you will find a button to the database update script. The database update can take a while, so please do not stop the execution if it seems to hang. After the database update has been performed just follow the instructions to continue the update process.',
+ 'PREVIOUS_VERSION' => 'Previous version',
+ 'PROGRESS' => 'Progress',
+
+ 'RESULT' => 'Result',
+ 'RUN_DATABASE_SCRIPT' => 'Update my database now',
+
+ 'SELECT_DIFF_MODE' => 'Select diff mode',
+ 'SELECT_DOWNLOAD_FORMAT' => 'Select download archive format',
+ 'SELECT_FTP_SETTINGS' => 'Select FTP settings',
+ 'SHOW_DIFF_CONFLICT' => 'Show differences/conflicts',
+ 'SHOW_DIFF_FINAL' => 'Show resulting file',
+ 'SHOW_DIFF_MODIFIED' => 'Show merged differences',
+ 'SHOW_DIFF_NEW' => 'Show file contents',
+ 'SHOW_DIFF_NEW_CONFLICT' => 'Show differences',
+ 'SHOW_DIFF_NOT_MODIFIED' => 'Show differences',
+ 'SOME_QUERIES_FAILED' => 'Some queries failed, the statements and errors are listing below.',
+ 'SQL' => 'SQL',
+ 'SQL_FAILURE_EXPLAIN' => 'This is probably nothing to worry about, update will continue. Should this fail to complete you may need to seek help at our support forums. See <a href="../docs/README.html">README</a> for details on how to obtain advice.',
+ 'STAGE_FILE_CHECK' => 'Check files',
+ 'STAGE_UPDATE_DB' => 'Update database',
+ 'STAGE_UPDATE_FILES' => 'Update files',
+ 'STAGE_VERSION_CHECK' => 'Version check',
+ 'STATUS_CONFLICT' => 'Modified file producing conflicts',
+ 'STATUS_MODIFIED' => 'Modified file',
+ 'STATUS_NEW' => 'New file',
+ 'STATUS_NEW_CONFLICT' => 'Conflicting new file',
+ 'STATUS_NOT_MODIFIED' => 'Not modified file',
+ 'STATUS_UP_TO_DATE' => 'Already updated file',
+
+ 'TOGGLE_DISPLAY' => 'View/Hide file list',
+ 'TRY_DOWNLOAD_METHOD' => 'You may want to try the download modified files method.<br />This method always works and is also the recommended update path.',
+ 'TRY_DOWNLOAD_METHOD_BUTTON'=> 'Try this method now',
+
+ 'UPDATE_COMPLETED' => 'Update completed',
+ 'UPDATE_DATABASE' => 'Update database',
+ 'UPDATE_DATABASE_EXPLAIN' => 'Within the next step the database will be updated.',
+ 'UPDATE_DATABASE_SCHEMA' => 'Updating database schema',
+ 'UPDATE_FILES' => 'Update files',
+ 'UPDATE_FILES_NOTICE' => 'Please make sure you have updated your board files too, this file is only updating your database.',
+ 'UPDATE_INSTALLATION' => 'Update phpBB installation',
+ 'UPDATE_INSTALLATION_EXPLAIN' => 'With this option, it is possible to update your phpBB installation to the latest version.<br />During the process all of your files will be checked for their integrity. You are able to review all differences and files before the update.<br /><br />The file update itself can be done in two different ways.</p><h2>Manual Update</h2><p>With this update you only download your personal set of changed files to make sure you do not lose your file modifications you may have done. After you downloaded this package you need to manually upload the files to their correct position under your phpBB root directory. Once done, you are able to do the file check stage again to see if you moved the files to their correct location.</p><h2>Automatic Update with FTP</h2><p>This method is similar to the first one but without the need to download the changed files and uploading them on your own. This will be done for you. In order to use this method you need to know your FTP login details since you will be asked for them. Once finished you will be redirected to the file check again to make sure everything got updated correctly.<br /><br />',
+ 'UPDATE_INSTRUCTIONS' => '
+
+ <h1>Release announcement</h1>
+
+ <p>Please read <a href="%1$s" title="%1$s"><strong>the release announcement for the latest version</strong></a> before you continue your update process, it may contain useful information. It also contains full download links as well as the change log.</p>
+
+ <br />
+
+ <h1>How to update your installation with the Automatic Update Package</h1>
+
+ <p>The recommended way of updating your installation listed here is only valid for the automatic update package. You are also able to update your installation using the methods listed within the INSTALL.html document. The steps for updating phpBB3 automatically are:</p>
+
+ <ul style="margin-left: 20px; font-size: 1.1em;">
+ <li>Go to the <a href="http://www.phpbb.com/downloads/" title="http://www.phpbb.com/downloads/">phpBB.com downloads page</a> and download the "Automatic Update Package" archive.<br /><br /></li>
+ <li>Unpack the archive.<br /><br /></li>
+ <li>Upload the complete uncompressed install folder to your phpBB root directory (where your config.php file is).<br /><br /></li>
+ </ul>
+
+ <p>Once uploaded your board will be offline for normal users due to the install directory you uploaded now present.<br /><br />
+ <strong><a href="%2$s" title="%2$s">Now start the update process by pointing your browser to the install folder</a>.</strong><br />
+ <br />
+ You will then be guided through the update process. You will be notified once the update is complete.
+ </p>
+ ',
+ 'UPDATE_INSTRUCTIONS_INCOMPLETE' => '
+
+ <h1>Incomplete update detected</h1>
+
+ <p>phpBB detected an incomplete automatic update. Please make sure you followed every step within the automatic update tool. Below you will find the link again, or go directly to your install directory.</p>
+ ',
+ 'UPDATE_METHOD' => 'Update method',
+ 'UPDATE_METHOD_EXPLAIN' => 'You are now able to choose your preferred update method. Using the FTP upload will present you with a form you need to enter your FTP account details into. With this method the files will be automatically moved to the new location and backups of the old files being created by appending .bak to the filename. If you choose to download the modified files you are able to unpack and upload them to their correct location manually later.',
+ 'UPDATE_REQUIRES_FILE' => 'The updater requires that the following file is present: %s',
+ 'UPDATE_SUCCESS' => 'Update was successful',
+ 'UPDATE_SUCCESS_EXPLAIN' => 'Successfully updated all files. The next step involves checking all files again to make sure the files got updated correctly.',
+ 'UPDATE_VERSION_OPTIMIZE' => 'Updating version and optimising tables',
+ 'UPDATING_DATA' => 'Updating data',
+ 'UPDATING_TO_LATEST_STABLE' => 'Updating database to latest stable release',
+ 'UPDATED_VERSION' => 'Updated version',
+ 'UPLOAD_METHOD' => 'Upload method',
+
+ 'UPDATE_DB_SUCCESS' => 'Database update was successful.',
+ 'USER_ACTIVE' => 'Active user',
+ 'USER_INACTIVE' => 'Inactive user',
+
+ 'VERSION_CHECK' => 'Version check',
+ 'VERSION_CHECK_EXPLAIN' => 'Checks to see if your phpBB installation is up to date.',
+ 'VERSION_NOT_UP_TO_DATE' => 'Your phpBB installation is not up to date. Please continue the update process.',
+ 'VERSION_NOT_UP_TO_DATE_ACP' => 'Your phpBB installation is not up to date.<br />Below is a link to the release announcement, which contains more information as well as instructions on updating.',
+ 'VERSION_NOT_UP_TO_DATE_TITLE' => 'Your phpBB installation is not up to date.',
+ 'VERSION_UP_TO_DATE' => 'Your phpBB installation is up to date. Although there are no updates available at this time, you may continue in order to perform a file validity check.',
+ 'VERSION_UP_TO_DATE_ACP' => 'Your phpBB installation is up to date. There are no updates available at this time.',
+ 'VIEWING_FILE_CONTENTS' => 'Viewing file contents',
+ 'VIEWING_FILE_DIFF' => 'Viewing file differences',
+
+ 'WRONG_INFO_FILE_FORMAT' => 'Wrong info file format',
+));
+
+// Default database schema entries...
+$lang = array_merge($lang, array(
+ 'CONFIG_BOARD_EMAIL_SIG' => 'Thanks, The Management',
+ 'CONFIG_SITE_DESC' => 'A short text to describe your forum',
+ 'CONFIG_SITENAME' => 'yourdomain.com',
+
+ 'DEFAULT_INSTALL_POST' => 'This is an example post in your phpBB3 installation. Everything seems to be working. You may delete this post if you like and continue to set up your board. During the installation process your first category and your first forum are assigned an appropriate set of permissions for the predefined usergroups administrators, bots, global moderators, guests, registered users and registered COPPA users. If you also choose to delete your first category and your first forum, do not forget to assign permissions for all these usergroups for all new categories and forums you create. It is recommended to rename your first category and your first forum and copy permissions from these while creating new categories and forums. Have fun!',
+
+ 'EXT_GROUP_ARCHIVES' => 'Archives',
+ 'EXT_GROUP_DOCUMENTS' => 'Documents',
+ 'EXT_GROUP_DOWNLOADABLE_FILES' => 'Downloadable Files',
+ 'EXT_GROUP_FLASH_FILES' => 'Flash Files',
+ 'EXT_GROUP_IMAGES' => 'Images',
+ 'EXT_GROUP_PLAIN_TEXT' => 'Plain Text',
+ 'EXT_GROUP_QUICKTIME_MEDIA' => 'Quicktime Media',
+ 'EXT_GROUP_REAL_MEDIA' => 'Real Media',
+ 'EXT_GROUP_WINDOWS_MEDIA' => 'Windows Media',
+
+ 'FORUMS_FIRST_CATEGORY' => 'Your first category',
+ 'FORUMS_TEST_FORUM_DESC' => 'Description of your first forum.',
+ 'FORUMS_TEST_FORUM_TITLE' => 'Your first forum',
+
+ 'RANKS_SITE_ADMIN_TITLE' => 'Site Admin',
+ 'REPORT_WAREZ' => 'The post contains links to illegal or pirated software.',
+ 'REPORT_SPAM' => 'The reported post has the only purpose to advertise for a website or another product.',
+ 'REPORT_OFF_TOPIC' => 'The reported post is off topic.',
+ 'REPORT_OTHER' => 'The reported post does not fit into any other category, please use the further information field.',
+
+ 'SMILIES_ARROW' => 'Arrow',
+ 'SMILIES_CONFUSED' => 'Confused',
+ 'SMILIES_COOL' => 'Cool',
+ 'SMILIES_CRYING' => 'Crying or Very Sad',
+ 'SMILIES_EMARRASSED' => 'Embarrassed',
+ 'SMILIES_EVIL' => 'Evil or Very Mad',
+ 'SMILIES_EXCLAMATION' => 'Exclamation',
+ 'SMILIES_GEEK' => 'Geek',
+ 'SMILIES_IDEA' => 'Idea',
+ 'SMILIES_LAUGHING' => 'Laughing',
+ 'SMILIES_MAD' => 'Mad',
+ 'SMILIES_MR_GREEN' => 'Mr. Green',
+ 'SMILIES_NEUTRAL' => 'Neutral',
+ 'SMILIES_QUESTION' => 'Question',
+ 'SMILIES_RAZZ' => 'Razz',
+ 'SMILIES_ROLLING_EYES' => 'Rolling Eyes',
+ 'SMILIES_SAD' => 'Sad',
+ 'SMILIES_SHOCKED' => 'Shocked',
+ 'SMILIES_SMILE' => 'Smile',
+ 'SMILIES_SURPRISED' => 'Surprised',
+ 'SMILIES_TWISTED_EVIL' => 'Twisted Evil',
+ 'SMILIES_UBER_GEEK' => 'Uber Geek',
+ 'SMILIES_VERY_HAPPY' => 'Very Happy',
+ 'SMILIES_WINK' => 'Wink',
+
+ 'TOPICS_TOPIC_TITLE' => 'Welcome to phpBB3',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/iso.txt b/phpBB/language/en/iso.txt
new file mode 100644
index 0000000000..c421dd4316
--- /dev/null
+++ b/phpBB/language/en/iso.txt
@@ -0,0 +1,3 @@
+British English
+British English
+phpBB Group \ No newline at end of file
diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php
new file mode 100644
index 0000000000..ab03cdb0be
--- /dev/null
+++ b/phpBB/language/en/mcp.php
@@ -0,0 +1,402 @@
+<?php
+/**
+*
+* mcp [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'ACTION' => 'Action',
+ 'ACTION_NOTE' => 'Action/Note',
+ 'ADD_FEEDBACK' => 'Add feedback',
+ 'ADD_FEEDBACK_EXPLAIN' => 'If you would like to add a report on this please fill out the following form. Only use plain text; HTML, BBCode, etc. are not permitted.',
+ 'ADD_WARNING' => 'Add warning',
+ 'ADD_WARNING_EXPLAIN' => 'To send a warning to this user please fill out the following form. Only use plain text; HTML, BBCode, etc. are not permitted.',
+ 'ALL_ENTRIES' => 'All entries',
+ 'ALL_NOTES_DELETED' => 'Successfully removed all user notes.',
+ 'ALL_REPORTS' => 'All reports',
+ 'ALREADY_REPORTED' => 'This post has already been reported.',
+ 'ALREADY_REPORTED_PM' => 'This private message has already been reported.',
+ 'ALREADY_WARNED' => 'A warning has already been issued for this post.',
+ 'APPROVE' => 'Approve',
+ 'APPROVE_POST' => 'Approve post',
+ 'APPROVE_POST_CONFIRM' => 'Are you sure you want to approve this post?',
+ 'APPROVE_POSTS' => 'Approve posts',
+ 'APPROVE_POSTS_CONFIRM' => 'Are you sure you want to approve the selected posts?',
+
+ 'CANNOT_MOVE_SAME_FORUM'=> 'You cannot move a topic to the forum it’s already in.',
+ 'CANNOT_WARN_ANONYMOUS' => 'You cannot warn unregistered guest users.',
+ 'CANNOT_WARN_SELF' => 'You cannot warn yourself.',
+ 'CAN_LEAVE_BLANK' => 'This can be left blank.',
+ 'CHANGE_POSTER' => 'Change poster',
+ 'CLOSE_PM_REPORT' => 'Close PM report',
+ 'CLOSE_PM_REPORT_CONFIRM' => 'Are you sure you want to close the selected PM report?',
+ 'CLOSE_PM_REPORTS' => 'Close PM reports',
+ 'CLOSE_PM_REPORTS_CONFIRM' => 'Are you sure you want to close the selected PM reports?',
+ 'CLOSE_REPORT' => 'Close report',
+ 'CLOSE_REPORT_CONFIRM' => 'Are you sure you want to close the selected report?',
+ 'CLOSE_REPORTS' => 'Close reports',
+ 'CLOSE_REPORTS_CONFIRM' => 'Are you sure you want to close the selected reports?',
+
+ 'DELETE_PM_REPORT' => 'Delete PM report',
+ 'DELETE_PM_REPORT_CONFIRM' => 'Are you sure you want to delete the selected PM report?',
+ 'DELETE_PM_REPORTS' => 'Delete PM reports',
+ 'DELETE_PM_REPORTS_CONFIRM' => 'Are you sure you want to delete the selected PM reports?',
+ 'DELETE_POSTS' => 'Delete posts',
+ 'DELETE_POSTS_CONFIRM' => 'Are you sure you want to delete these posts?',
+ 'DELETE_POST_CONFIRM' => 'Are you sure you want to delete this post?',
+ 'DELETE_REPORT' => 'Delete report',
+ 'DELETE_REPORT_CONFIRM' => 'Are you sure you want to delete the selected report?',
+ 'DELETE_REPORTS' => 'Delete reports',
+ 'DELETE_REPORTS_CONFIRM' => 'Are you sure you want to delete the selected reports?',
+ 'DELETE_SHADOW_TOPIC' => 'Delete shadow topic',
+ 'DELETE_TOPICS' => 'Delete selected topics',
+ 'DELETE_TOPICS_CONFIRM' => 'Are you sure you want to delete these topics?',
+ 'DELETE_TOPIC_CONFIRM' => 'Are you sure you want to delete this topic?',
+ 'DISAPPROVE' => 'Disapprove',
+ 'DISAPPROVE_REASON' => 'Reason for disapproval',
+ 'DISAPPROVE_POST' => 'Disapprove post',
+ 'DISAPPROVE_POST_CONFIRM' => 'Are you sure you want to disapprove this post?',
+ 'DISAPPROVE_POSTS' => 'Disapprove posts',
+ 'DISAPPROVE_POSTS_CONFIRM' => 'Are you sure you want to disapprove the selected posts?',
+ 'DISPLAY_LOG' => 'Display entries from previous',
+ 'DISPLAY_OPTIONS' => 'Display options',
+
+ 'EMPTY_REPORT' => 'You must enter a description when selecting this reason.',
+ 'EMPTY_TOPICS_REMOVED_WARNING' => 'Please note that one or several topics have been removed from the database because they were or become empty.',
+
+ 'FEEDBACK' => 'Feedback',
+ 'FORK' => 'Copy',
+ 'FORK_TOPIC' => 'Copy topic',
+ 'FORK_TOPIC_CONFIRM' => 'Are you sure you want to copy this topic?',
+ 'FORK_TOPICS' => 'Copy selected topics',
+ 'FORK_TOPICS_CONFIRM' => 'Are you sure you want to copy the selected topics?',
+ 'FORUM_DESC' => 'Description',
+ 'FORUM_NAME' => 'Forum name',
+ 'FORUM_NOT_EXIST' => 'The forum you selected does not exist.',
+ 'FORUM_NOT_POSTABLE' => 'The forum you selected cannot be posted to.',
+ 'FORUM_STATUS' => 'Forum status',
+ 'FORUM_STYLE' => 'Forum style',
+
+ 'GLOBAL_ANNOUNCEMENT' => 'Global announcement',
+
+ 'IP_INFO' => 'IP address information',
+ 'IPS_POSTED_FROM' => 'IP addresses this user has posted from',
+
+ 'LATEST_LOGS' => 'Latest 5 logged actions',
+ 'LATEST_REPORTED' => 'Latest 5 reports',
+ 'LATEST_REPORTED_PMS' => 'Latest 5 PM reports',
+ 'LATEST_UNAPPROVED' => 'Latest 5 posts awaiting approval',
+ 'LATEST_WARNING_TIME' => 'Latest warning issued',
+ 'LATEST_WARNINGS' => 'Latest 5 warnings',
+ 'LEAVE_SHADOW' => 'Leave shadow topic in place',
+ 'LIST_REPORT' => '1 report',
+ 'LIST_REPORTS' => '%d reports',
+ 'LOCK' => 'Lock',
+ 'LOCK_POST_POST' => 'Lock post',
+ 'LOCK_POST_POST_CONFIRM' => 'Are you sure you want to prevent editing this post?',
+ 'LOCK_POST_POSTS' => 'Lock selected posts',
+ 'LOCK_POST_POSTS_CONFIRM' => 'Are you sure you want to prevent editing the selected posts?',
+ 'LOCK_TOPIC_CONFIRM' => 'Are you sure you want to lock this topic?',
+ 'LOCK_TOPICS' => 'Lock selected topics',
+ 'LOCK_TOPICS_CONFIRM' => 'Are you sure you want to lock all selected topics?',
+ 'LOGS_CURRENT_TOPIC' => 'Currently viewing logs of:',
+ 'LOGIN_EXPLAIN_MCP' => 'To moderate this forum you must login.',
+ 'LOGVIEW_VIEWTOPIC' => 'View topic',
+ 'LOGVIEW_VIEWLOGS' => 'View topic log',
+ 'LOGVIEW_VIEWFORUM' => 'View forum',
+ 'LOOKUP_ALL' => 'Look up all IPs',
+ 'LOOKUP_IP' => 'Look up IP',
+
+ 'MARKED_NOTES_DELETED' => 'Successfully removed all marked user notes.',
+
+ 'MCP_ADD' => 'Add a warning',
+
+ 'MCP_BAN' => 'Banning',
+ 'MCP_BAN_EMAILS' => 'Ban e-mails',
+ 'MCP_BAN_IPS' => 'Ban IPs',
+ 'MCP_BAN_USERNAMES' => 'Ban Usernames',
+
+ 'MCP_LOGS' => 'Moderator logs',
+ 'MCP_LOGS_FRONT' => 'Front page',
+ 'MCP_LOGS_FORUM_VIEW' => 'Forum logs',
+ 'MCP_LOGS_TOPIC_VIEW' => 'Topic logs',
+
+ 'MCP_MAIN' => 'Main',
+ 'MCP_MAIN_FORUM_VIEW' => 'View forum',
+ 'MCP_MAIN_FRONT' => 'Front page',
+ 'MCP_MAIN_POST_DETAILS' => 'Post details',
+ 'MCP_MAIN_TOPIC_VIEW' => 'View topic',
+ 'MCP_MAKE_ANNOUNCEMENT' => 'Modify to “Announcementâ€',
+ 'MCP_MAKE_ANNOUNCEMENT_CONFIRM' => 'Are you sure you want to change this topic to an “Announcement�',
+ 'MCP_MAKE_ANNOUNCEMENTS' => 'Modify to “Announcementsâ€',
+ 'MCP_MAKE_ANNOUNCEMENTS_CONFIRM'=> 'Are you sure you want to change the selected topics to “Announcements�',
+ 'MCP_MAKE_GLOBAL' => 'Modify to “Global announcementâ€',
+ 'MCP_MAKE_GLOBAL_CONFIRM' => 'Are you sure you want to change this topic to a “Global announcement�',
+ 'MCP_MAKE_GLOBALS' => 'Modify to “Global announcementsâ€',
+ 'MCP_MAKE_GLOBALS_CONFIRM' => 'Are you sure you want to change the selected topics to “Global announcements�',
+ 'MCP_MAKE_STICKY' => 'Modify to “Stickyâ€',
+ 'MCP_MAKE_STICKY_CONFIRM' => 'Are you sure you want to change this topic to a “Sticky�',
+ 'MCP_MAKE_STICKIES' => 'Modify to “Stickiesâ€',
+ 'MCP_MAKE_STICKIES_CONFIRM' => 'Are you sure you want to change the selected topics to “Stickies�',
+ 'MCP_MAKE_NORMAL' => 'Modify to “Standard Topicâ€',
+ 'MCP_MAKE_NORMAL_CONFIRM' => 'Are you sure you want to change this topic to a “Standard Topic�',
+ 'MCP_MAKE_NORMALS' => 'Modify to “Standard Topicsâ€',
+ 'MCP_MAKE_NORMALS_CONFIRM' => 'Are you sure you want to change the selected topics to “Standard Topics�',
+
+ 'MCP_NOTES' => 'User notes',
+ 'MCP_NOTES_FRONT' => 'Front page',
+ 'MCP_NOTES_USER' => 'User details',
+
+ 'MCP_POST_REPORTS' => 'Reports issued on this post',
+
+ 'MCP_PM_REPORTS' => 'Reported PMs',
+ 'MCP_PM_REPORT_DETAILS' => 'PM Report details',
+ 'MCP_PM_REPORTS_CLOSED' => 'Closed PM reports',
+ 'MCP_PM_REPORTS_CLOSED_EXPLAIN' => 'This is a list of all reports about private messages which have previously been resolved.',
+ 'MCP_PM_REPORTS_OPEN' => 'Open PM reports',
+ 'MCP_PM_REPORTS_OPEN_EXPLAIN' => 'This is a list of all reported private messages which are still to be handled.',
+
+ 'MCP_REPORTS' => 'Reported messages',
+ 'MCP_REPORT_DETAILS' => 'Report details',
+ 'MCP_REPORTS_CLOSED' => 'Closed reports',
+ 'MCP_REPORTS_CLOSED_EXPLAIN' => 'This is a list of all reports about posts which have previously been resolved.',
+ 'MCP_REPORTS_OPEN' => 'Open reports',
+ 'MCP_REPORTS_OPEN_EXPLAIN' => 'This is a list of all reported posts which are still to be handled.',
+
+ 'MCP_QUEUE' => 'Moderation queue',
+ 'MCP_QUEUE_APPROVE_DETAILS' => 'Approve details',
+ 'MCP_QUEUE_UNAPPROVED_POSTS' => 'Posts awaiting approval',
+ 'MCP_QUEUE_UNAPPROVED_POSTS_EXPLAIN' => 'This is a list of all posts which require approving before they will be visible to users.',
+ 'MCP_QUEUE_UNAPPROVED_TOPICS' => 'Topics awaiting approval',
+ 'MCP_QUEUE_UNAPPROVED_TOPICS_EXPLAIN' => 'This is a list of all topics which require approving before they will be visible to users.',
+
+ 'MCP_VIEW_USER' => 'View warnings for a specific user',
+
+ 'MCP_WARN' => 'Warnings',
+ 'MCP_WARN_FRONT' => 'Front page',
+ 'MCP_WARN_LIST' => 'List warnings',
+ 'MCP_WARN_POST' => 'Warn for specific post',
+ 'MCP_WARN_USER' => 'Warn user',
+
+ 'MERGE_POSTS' => 'Merge posts',
+ 'MERGE_POSTS_CONFIRM' => 'Are you sure you want to merge the selected posts?',
+ 'MERGE_TOPIC_EXPLAIN' => 'Using the form below you can merge selected posts into another topic. These posts will not be reordered and will appear as if the users posted them to the new topic.<br />Please enter the destination topic id or click on “Select topic†to search for one.',
+ 'MERGE_TOPIC_ID' => 'Destination topic identification number',
+ 'MERGE_TOPICS' => 'Merge topics',
+ 'MERGE_TOPICS_CONFIRM' => 'Are you sure you want to merge the selected topics?',
+ 'MODERATE_FORUM' => 'Moderate forum',
+ 'MODERATE_TOPIC' => 'Moderate topic',
+ 'MODERATE_POST' => 'Moderate post',
+ 'MOD_OPTIONS' => 'Moderator options',
+ 'MORE_INFO' => 'Further information',
+ 'MOST_WARNINGS' => 'Users with most warnings',
+ 'MOVE_TOPIC_CONFIRM' => 'Are you sure you want to move the topic into a new forum?',
+ 'MOVE_TOPICS' => 'Move selected topics',
+ 'MOVE_TOPICS_CONFIRM' => 'Are you sure you want to move the selected topics into a new forum?',
+
+ 'NOTIFY_POSTER_APPROVAL' => 'Notify poster about approval?',
+ 'NOTIFY_POSTER_DISAPPROVAL' => 'Notify poster about disapproval?',
+ 'NOTIFY_USER_WARN' => 'Notify user about warning?',
+ 'NOT_MODERATOR' => 'You are not a moderator of this forum.',
+ 'NO_DESTINATION_FORUM' => 'Please select a forum for destination.',
+ 'NO_DESTINATION_FORUM_FOUND' => 'There is no destination forum available.',
+ 'NO_ENTRIES' => 'No log entries for this period.',
+ 'NO_FEEDBACK' => 'No feedback exists for this user.',
+ 'NO_FINAL_TOPIC_SELECTED' => 'You have to select a destination topic for merging posts.',
+ 'NO_MATCHES_FOUND' => 'No matches found.',
+ 'NO_POST' => 'You have to select a post in order to warn the user for a post.',
+ 'NO_POST_REPORT' => 'This post was not reported.',
+ 'NO_POST_SELECTED' => 'You must select at least one post to perform this action.',
+ 'NO_REASON_DISAPPROVAL' => 'Please give an appropriate reason for disapproval.',
+ 'NO_REPORT' => 'No report found',
+ 'NO_REPORTS' => 'No reports found',
+ 'NO_REPORT_SELECTED' => 'You must select at least one report to perform this action.',
+ 'NO_TOPIC_ICON' => 'None',
+ 'NO_TOPIC_SELECTED' => 'You must select at least one topic to perform this action.',
+ 'NO_TOPICS_QUEUE' => 'There are no topics waiting for approval.',
+
+ 'ONLY_TOPIC' => 'Only topic “%sâ€',
+ 'OTHER_USERS' => 'Other users posting from this IP',
+
+ 'PM_REPORT_CLOSED_SUCCESS' => 'The selected PM report has been closed successfully.',
+ 'PM_REPORT_DELETED_SUCCESS' => 'The selected PM report has been deleted successfully.',
+ 'PM_REPORTED_SUCCESS' => 'This private message has been successfully reported.',
+ 'PM_REPORT_TOTAL' => 'In total there is <strong>1</strong> PM report to review.',
+ 'PM_REPORTS_TOTAL' => 'In total there are <strong>%d</strong> PM reports to review.',
+ 'PM_REPORTS_ZERO_TOTAL' => 'There are no PM reports to review.',
+ 'PM_REPORT_DETAILS' => 'Private message report details',
+ 'POSTER' => 'Poster',
+ 'POSTS_APPROVED_SUCCESS' => 'The selected posts have been approved.',
+ 'POSTS_DELETED_SUCCESS' => 'The selected posts have been successfully removed from the database.',
+ 'POSTS_DISAPPROVED_SUCCESS' => 'The selected posts have been disapproved.',
+ 'POSTS_LOCKED_SUCCESS' => 'The selected posts have been locked successfully.',
+ 'POSTS_MERGED_SUCCESS' => 'The selected posts have been merged.',
+ 'POSTS_UNLOCKED_SUCCESS' => 'The selected posts have been unlocked successfully.',
+ 'POSTS_PER_PAGE' => 'Posts per page',
+ 'POSTS_PER_PAGE_EXPLAIN' => '(Set to 0 to view all posts.)',
+ 'POST_APPROVED_SUCCESS' => 'The selected post has been approved.',
+ 'POST_DELETED_SUCCESS' => 'The selected post has been successfully removed from the database.',
+ 'POST_DISAPPROVED_SUCCESS' => 'The selected post has been disapproved.',
+ 'POST_LOCKED_SUCCESS' => 'Post locked successfully.',
+ 'POST_NOT_EXIST' => 'The post you requested does not exist.',
+ 'POST_REPORTED_SUCCESS' => 'This post has been successfully reported.',
+ 'POST_UNLOCKED_SUCCESS' => 'Post unlocked successfully.',
+
+ 'READ_USERNOTES' => 'User notes',
+ 'READ_WARNINGS' => 'User warnings',
+ 'REPORTER' => 'Reporter',
+ 'REPORTED' => 'Reported',
+ 'REPORTED_BY' => 'Reported by',
+ 'REPORTED_ON_DATE' => 'on',
+ 'REPORTS_CLOSED_SUCCESS' => 'The selected reports have been closed successfully.',
+ 'REPORTS_DELETED_SUCCESS' => 'The selected reports have been deleted successfully.',
+ 'REPORTS_TOTAL' => 'In total there are <strong>%d</strong> reports to review.',
+ 'REPORTS_ZERO_TOTAL' => 'There are no reports to review.',
+ 'REPORT_CLOSED' => 'This report has already been closed.',
+ 'REPORT_CLOSED_SUCCESS' => 'The selected report has been closed successfully.',
+ 'REPORT_DELETED_SUCCESS' => 'The selected report has been deleted successfully.',
+ 'REPORT_DETAILS' => 'Report details',
+ 'REPORT_MESSAGE' => 'Report this message',
+ 'REPORT_MESSAGE_EXPLAIN' => 'Use this form to report the selected private message. Reporting should generally be used only if the message breaks forum rules. <strong>Reporting a private message will make its contents visible to all moderators.</strong>',
+ 'REPORT_NOTIFY' => 'Notify me',
+ 'REPORT_NOTIFY_EXPLAIN' => 'Informs you when your report is dealt with.',
+ 'REPORT_POST_EXPLAIN' => 'Use this form to report the selected post to the forum moderators and board administrators. Reporting should generally be used only if the post breaks forum rules.',
+ 'REPORT_REASON' => 'Report reason',
+ 'REPORT_TIME' => 'Report time',
+ 'REPORT_TOTAL' => 'In total there is <strong>1</strong> report to review.',
+ 'RESYNC' => 'Resync',
+ 'RETURN_MESSAGE' => '%sReturn to the message%s',
+ 'RETURN_NEW_FORUM' => '%sGo to the new forum%s',
+ 'RETURN_NEW_TOPIC' => '%sGo to the new topic%s',
+ 'RETURN_PM' => '%sReturn to the private message%s',
+ 'RETURN_POST' => '%sReturn to the post%s',
+ 'RETURN_QUEUE' => '%sReturn to the queue%s',
+ 'RETURN_REPORTS' => '%sReturn to the reports%s',
+ 'RETURN_TOPIC_SIMPLE' => '%sReturn to the topic%s',
+
+ 'SEARCH_POSTS_BY_USER' => 'Search posts by',
+ 'SELECT_ACTION' => 'Select desired action',
+ 'SELECT_FORUM_GLOBAL_ANNOUNCEMENT' => 'Please select the forum you wish this global announcement to be displayed.',
+ 'SELECT_FORUM_GLOBAL_ANNOUNCEMENTS' => 'One or more of the selected topics are global announcements. Please select the forum you wish these to be displayed.',
+ 'SELECT_MERGE' => 'Select for merge',
+ 'SELECT_TOPICS_FROM' => 'Select topics from',
+ 'SELECT_TOPIC' => 'Select topic',
+ 'SELECT_USER' => 'Select user',
+ 'SORT_ACTION' => 'Log action',
+ 'SORT_DATE' => 'Date',
+ 'SORT_IP' => 'IP address',
+ 'SORT_WARNINGS' => 'Warnings',
+ 'SPLIT_AFTER' => 'Split topic from selected post onwards',
+ 'SPLIT_FORUM' => 'Forum for new topic',
+ 'SPLIT_POSTS' => 'Split selected posts',
+ 'SPLIT_SUBJECT' => 'New topic title',
+ 'SPLIT_TOPIC_ALL' => 'Split topic from selected posts',
+ 'SPLIT_TOPIC_ALL_CONFIRM' => 'Are you sure you want to split this topic?',
+ 'SPLIT_TOPIC_BEYOND' => 'Split topic at selected post',
+ 'SPLIT_TOPIC_BEYOND_CONFIRM' => 'Are you sure you want to split this topic at the selected post?',
+ 'SPLIT_TOPIC_EXPLAIN' => 'Using the form below you can split a topic in two, either by selecting the posts individually or by splitting at a selected post.',
+
+ 'THIS_POST_IP' => 'IP for this post',
+ 'TOPICS_APPROVED_SUCCESS' => 'The selected topics have been approved.',
+ 'TOPICS_DELETED_SUCCESS' => 'The selected topics have been successfully removed from the database.',
+ 'TOPICS_DISAPPROVED_SUCCESS'=> 'The selected topics have been disapproved.',
+ 'TOPICS_FORKED_SUCCESS' => 'The selected topics have been copied successfully.',
+ 'TOPICS_LOCKED_SUCCESS' => 'The selected topics have been locked.',
+ 'TOPICS_MOVED_SUCCESS' => 'The selected topics have been moved successfully.',
+ 'TOPICS_RESYNC_SUCCESS' => 'The selected topics have been resynchronised.',
+ 'TOPICS_TYPE_CHANGED' => 'Topic types changed successfully.',
+ 'TOPICS_UNLOCKED_SUCCESS' => 'The selected topics have been unlocked.',
+ 'TOPIC_APPROVED_SUCCESS' => 'The selected topic has been approved.',
+ 'TOPIC_DELETED_SUCCESS' => 'The selected topic has been successfully removed from the database.',
+ 'TOPIC_DISAPPROVED_SUCCESS' => 'The selected topic has been disapproved.',
+ 'TOPIC_FORKED_SUCCESS' => 'The selected topic has been copied successfully.',
+ 'TOPIC_LOCKED_SUCCESS' => 'The selected topic has been locked.',
+ 'TOPIC_MOVED_SUCCESS' => 'The selected topic has been moved successfully.',
+ 'TOPIC_NOT_EXIST' => 'The topic you selected does not exist.',
+ 'TOPIC_RESYNC_SUCCESS' => 'The selected topic has been resynchronised.',
+ 'TOPIC_SPLIT_SUCCESS' => 'The selected topic has been split successfully.',
+ 'TOPIC_TIME' => 'Topic time',
+ 'TOPIC_TYPE_CHANGED' => 'Topic type changed successfully.',
+ 'TOPIC_UNLOCKED_SUCCESS' => 'The selected topic has been unlocked.',
+ 'TOTAL_WARNINGS' => 'Total Warnings',
+
+ 'UNAPPROVED_POSTS_TOTAL' => 'In total there are <strong>%d</strong> posts waiting for approval.',
+ 'UNAPPROVED_POSTS_ZERO_TOTAL' => 'There are no posts waiting for approval.',
+ 'UNAPPROVED_POST_TOTAL' => 'In total there is <strong>1</strong> post waiting for approval.',
+ 'UNLOCK' => 'Unlock',
+ 'UNLOCK_POST' => 'Unlock post',
+ 'UNLOCK_POST_EXPLAIN' => 'Allow editing',
+ 'UNLOCK_POST_POST' => 'Unlock post',
+ 'UNLOCK_POST_POST_CONFIRM' => 'Are you sure you want to allow editing this post?',
+ 'UNLOCK_POST_POSTS' => 'Unlock selected posts',
+ 'UNLOCK_POST_POSTS_CONFIRM' => 'Are you sure you want to allow editing the selected posts?',
+ 'UNLOCK_TOPIC' => 'Unlock topic',
+ 'UNLOCK_TOPIC_CONFIRM' => 'Are you sure you want to unlock this topic?',
+ 'UNLOCK_TOPICS' => 'Unlock selected topics',
+ 'UNLOCK_TOPICS_CONFIRM' => 'Are you sure you want to unlock all selected topics?',
+ 'USER_CANNOT_POST' => 'You cannot post in this forum.',
+ 'USER_CANNOT_REPORT' => 'You cannot report posts in this forum.',
+ 'USER_FEEDBACK_ADDED' => 'User feedback added successfully.',
+ 'USER_WARNING_ADDED' => 'User warned successfully.',
+
+ 'VIEW_DETAILS' => 'View details',
+ 'VIEW_PM' => 'View private message',
+ 'VIEW_POST' => 'View post',
+
+ 'WARNED_USERS' => 'Warned users',
+ 'WARNED_USERS_EXPLAIN' => 'This is a list of users with unexpired warnings issued to them.',
+ 'WARNING_PM_BODY' => 'The following is a warning which has been issued to you by an administrator or moderator of this site.[quote]%s[/quote]',
+ 'WARNING_PM_SUBJECT' => 'Board warning issued',
+ 'WARNING_POST_DEFAULT' => 'This is a warning regarding the following post made by you: %s .',
+ 'WARNINGS_ZERO_TOTAL' => 'No warnings exist.',
+
+ 'YOU_SELECTED_TOPIC' => 'You selected topic number %d: %s.',
+
+ 'report_reasons' => array(
+ 'TITLE' => array(
+ 'WAREZ' => 'Warez',
+ 'SPAM' => 'Spam',
+ 'OFF_TOPIC' => 'Off-topic',
+ 'OTHER' => 'Other',
+ ),
+ 'DESCRIPTION' => array(
+ 'WAREZ' => 'The message contains links to illegal or pirated software.',
+ 'SPAM' => 'The reported message has the only purpose to advertise for a website or another product.',
+ 'OFF_TOPIC' => 'The reported message is off topic.',
+ 'OTHER' => 'The reported message does not fit into any other category, please use the further information field.',
+ )
+ ),
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php
new file mode 100644
index 0000000000..e7a9c6b88d
--- /dev/null
+++ b/phpBB/language/en/memberlist.php
@@ -0,0 +1,150 @@
+<?php
+/**
+*
+* memberlist [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'ABOUT_USER' => 'Profile',
+ 'ACTIVE_IN_FORUM' => 'Most active forum',
+ 'ACTIVE_IN_TOPIC' => 'Most active topic',
+ 'ADD_FOE' => 'Add foe',
+ 'ADD_FRIEND' => 'Add friend',
+ 'AFTER' => 'After',
+
+ 'ALL' => 'All',
+
+ 'BEFORE' => 'Before',
+
+ 'CC_EMAIL' => 'Send a copy of this e-mail to yourself.',
+ 'CONTACT_USER' => 'Contact',
+
+ 'DEST_LANG' => 'Language',
+ 'DEST_LANG_EXPLAIN' => 'Select an appropriate language (if available) for the recipient of this message.',
+
+ 'EMAIL_BODY_EXPLAIN' => 'This message will be sent as plain text, do not include any HTML or BBCode. The return address for this message will be set to your e-mail address.',
+ 'EMAIL_DISABLED' => 'Sorry but all e-mail related functions have been disabled.',
+ 'EMAIL_SENT' => 'The e-mail has been sent.',
+ 'EMAIL_TOPIC_EXPLAIN' => 'This message will be sent as plain text, do not include any HTML or BBCode. Please note that the topic information is already included in the message. The return address for this message will be set to your e-mail address.',
+ 'EMPTY_ADDRESS_EMAIL' => 'You must provide a valid e-mail address for the recipient.',
+ 'EMPTY_MESSAGE_EMAIL' => 'You must enter a message to be emailed.',
+ 'EMPTY_MESSAGE_IM' => 'You must enter a message to be send.',
+ 'EMPTY_NAME_EMAIL' => 'You must enter the real name of the recipient.',
+ 'EMPTY_SUBJECT_EMAIL' => 'You must specify a subject for the e-mail.',
+ 'EQUAL_TO' => 'Equal to',
+
+ 'FIND_USERNAME_EXPLAIN' => 'Use this form to search for specific members. You do not need to fill out all fields. To match partial data use * as a wildcard. When entering dates use the format <kbd>YYYY-MM-DD</kbd>, e.g. <samp>2004-02-29</samp>. Use the mark checkboxes to select one or more usernames (several usernames may be accepted depending on the form itself) and click the Select Marked button to return to the previous form.',
+ 'FLOOD_EMAIL_LIMIT' => 'You cannot send another e-mail at this time. Please try again later.',
+
+ 'GROUP_LEADER' => 'Group leader',
+
+ 'HIDE_MEMBER_SEARCH' => 'Hide member search',
+
+ 'IM_ADD_CONTACT' => 'Add Contact',
+ 'IM_AIM' => 'Please note that you need AOL Instant Messenger installed to use this.',
+ 'IM_AIM_EXPRESS' => 'AIM Express',
+ 'IM_DOWNLOAD_APP' => 'Download application',
+ 'IM_ICQ' => 'Please note that users may have selected to not receive unsolicited instant messages.',
+ 'IM_JABBER' => 'Please note that users may have selected to not receive unsolicited instant messages.',
+ 'IM_JABBER_SUBJECT' => 'This is an automated message please do not reply! Message from user %1$s at %2$s.',
+ 'IM_MESSAGE' => 'Your message',
+ 'IM_MSNM' => 'Please note that you need Windows Messenger installed to use this.',
+ 'IM_MSNM_BROWSER' => 'Your browser does not support this.',
+ 'IM_MSNM_CONNECT' => 'MSNM is not connected.\nYou have to connect to MSNM to continue.',
+ 'IM_NAME' => 'Your Name',
+ 'IM_NO_DATA' => 'There is no suitable contact information for this user.',
+ 'IM_NO_JABBER' => 'Sorry, direct messaging of Jabber users is not supported on this board. You will need a Jabber client installed on your system to contact the recipient above.',
+ 'IM_RECIPIENT' => 'Recipient',
+ 'IM_SEND' => 'Send message',
+ 'IM_SEND_MESSAGE' => 'Send message',
+ 'IM_SENT_JABBER' => 'Your message to %1$s has been sent successfully.',
+ 'IM_USER' => 'Send an instant message',
+
+ 'LAST_ACTIVE' => 'Last active',
+ 'LESS_THAN' => 'Less than',
+ 'LIST_USER' => '1 user',
+ 'LIST_USERS' => '%d users',
+ 'LOGIN_EXPLAIN_LEADERS' => 'The board requires you to be registered and logged in to view the team listing.',
+ 'LOGIN_EXPLAIN_MEMBERLIST' => 'The board requires you to be registered and logged in to access the memberlist.',
+ 'LOGIN_EXPLAIN_SEARCHUSER' => 'The board requires you to be registered and logged in to search users.',
+ 'LOGIN_EXPLAIN_VIEWPROFILE' => 'The board requires you to be registered and logged in to view profiles.',
+
+ 'MORE_THAN' => 'More than',
+
+ 'NO_EMAIL' => 'You are not permitted to send e-mail to this user.',
+ 'NO_VIEW_USERS' => 'You are not authorised to view the member list or profiles.',
+
+ 'ORDER' => 'Order',
+ 'OTHER' => 'Other',
+
+ 'POST_IP' => 'Posted from IP/domain',
+
+ 'RANK' => 'Rank',
+ 'REAL_NAME' => 'Recipient name',
+ 'RECIPIENT' => 'Recipient',
+ 'REMOVE_FOE' => 'Remove foe',
+ 'REMOVE_FRIEND' => 'Remove friend',
+
+ 'SEARCH_USER_POSTS' => 'Search user’s posts',
+ 'SELECT_MARKED' => 'Select marked',
+ 'SELECT_SORT_METHOD' => 'Select sort method',
+ 'SEND_AIM_MESSAGE' => 'Send AIM message',
+ 'SEND_ICQ_MESSAGE' => 'Send ICQ message',
+ 'SEND_IM' => 'Instant messaging',
+ 'SEND_JABBER_MESSAGE' => 'Send Jabber message',
+ 'SEND_MESSAGE' => 'Message',
+ 'SEND_MSNM_MESSAGE' => 'Send MSNM/WLM message',
+ 'SEND_YIM_MESSAGE' => 'Send YIM message',
+ 'SORT_EMAIL' => 'E-mail',
+ 'SORT_LAST_ACTIVE' => 'Last active',
+ 'SORT_POST_COUNT' => 'Post count',
+
+ 'USERNAME_BEGINS_WITH' => 'Username begins with',
+ 'USER_ADMIN' => 'Administrate user',
+ 'USER_BAN' => 'Banning',
+ 'USER_FORUM' => 'User statistics',
+ 'USER_LAST_REMINDED' => array(
+ 0 => 'No reminder sent at this time',
+ 1 => '%1$d reminder sent<br />» %2$s',
+ ),
+ 'USER_ONLINE' => 'Online',
+ 'USER_PRESENCE' => 'Board presence',
+
+ 'VIEWING_PROFILE' => 'Viewing profile - %s',
+ 'VISITED' => 'Last visited',
+
+ 'WWW' => 'Website',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/mods/index.htm b/phpBB/language/en/mods/index.htm
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/phpBB/language/en/mods/index.htm
diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php
new file mode 100644
index 0000000000..8016a233fd
--- /dev/null
+++ b/phpBB/language/en/posting.php
@@ -0,0 +1,225 @@
+<?php
+/**
+*
+* posting [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'ADD_ATTACHMENT' => 'Upload attachment',
+ 'ADD_ATTACHMENT_EXPLAIN' => 'If you wish to attach one or more files enter the details below.',
+ 'ADD_FILE' => 'Add the file',
+ 'ADD_POLL' => 'Poll creation',
+ 'ADD_POLL_EXPLAIN' => 'If you do not want to add a poll to your topic leave the fields blank.',
+ 'ALREADY_DELETED' => 'Sorry but this message is already deleted.',
+ 'ATTACH_QUOTA_REACHED' => 'Sorry, the board attachment quota has been reached.',
+ 'ATTACH_SIG' => 'Attach a signature (signatures can be altered via the UCP)',
+
+ 'BBCODE_A_HELP' => 'Inline uploaded attachment: [attachment=]filename.ext[/attachment]',
+ 'BBCODE_B_HELP' => 'Bold text: [b]text[/b]',
+ 'BBCODE_C_HELP' => 'Code display: [code]code[/code]',
+ 'BBCODE_E_HELP' => 'List: Add list element',
+ 'BBCODE_F_HELP' => 'Font size: [size=85]small text[/size]',
+ 'BBCODE_IS_OFF' => '%sBBCode%s is <em>OFF</em>',
+ 'BBCODE_IS_ON' => '%sBBCode%s is <em>ON</em>',
+ 'BBCODE_I_HELP' => 'Italic text: [i]text[/i]',
+ 'BBCODE_L_HELP' => 'List: [list]text[/list]',
+ 'BBCODE_LISTITEM_HELP' => 'List item: [*]text[/*]',
+ 'BBCODE_O_HELP' => 'Ordered list: [list=]text[/list]',
+ 'BBCODE_P_HELP' => 'Insert image: [img]http://image_url[/img]',
+ 'BBCODE_Q_HELP' => 'Quote text: [quote]text[/quote]',
+ 'BBCODE_S_HELP' => 'Font colour: [color=red]text[/color] Tip: you can also use color=#FF0000',
+ 'BBCODE_U_HELP' => 'Underline text: [u]text[/u]',
+ 'BBCODE_W_HELP' => 'Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url]',
+ 'BBCODE_D_HELP' => 'Flash: [flash=width,height]http://url[/flash]',
+ 'BUMP_ERROR' => 'You cannot bump this topic so soon after the last post.',
+
+ 'CANNOT_DELETE_REPLIED' => 'Sorry but you may only delete posts which have not been replied to.',
+ 'CANNOT_EDIT_POST_LOCKED' => 'This post has been locked. You can no longer edit that post.',
+ 'CANNOT_EDIT_TIME' => 'You can no longer edit or delete that post.',
+ 'CANNOT_POST_ANNOUNCE' => 'Sorry but you cannot post announcements.',
+ 'CANNOT_POST_STICKY' => 'Sorry but you cannot post sticky topics.',
+ 'CHANGE_TOPIC_TO' => 'Change topic type to',
+ 'CLOSE_TAGS' => 'Close tags',
+ 'CURRENT_TOPIC' => 'Current topic',
+
+ 'DELETE_FILE' => 'Delete file',
+ 'DELETE_MESSAGE' => 'Delete message',
+ 'DELETE_MESSAGE_CONFIRM' => 'Are you sure you want to delete this message?',
+ 'DELETE_OWN_POSTS' => 'Sorry but you can only delete your own posts.',
+ 'DELETE_POST_CONFIRM' => 'Are you sure you want to delete this post?',
+ 'DELETE_POST_WARN' => 'Once deleted the post cannot be recovered',
+ 'DISABLE_BBCODE' => 'Disable BBCode',
+ 'DISABLE_MAGIC_URL' => 'Do not automatically parse URLs',
+ 'DISABLE_SMILIES' => 'Disable smilies',
+ 'DISALLOWED_CONTENT' => 'The upload was rejected because the uploaded file was identified as a possible attack vector.',
+ 'DISALLOWED_EXTENSION' => 'The extension %s is not allowed.',
+ 'DRAFT_LOADED' => 'Draft loaded into posting area, you may want to finish your post now.<br />Your draft will be deleted after submitting this post.',
+ 'DRAFT_LOADED_PM' => 'Draft loaded into message area, you may want to finish your private message now.<br />Your draft will be deleted after submitting this private message.',
+ 'DRAFT_SAVED' => 'Draft successfully saved.',
+ 'DRAFT_TITLE' => 'Draft title',
+
+ 'EDIT_REASON' => 'Reason for editing this post',
+ 'EMPTY_FILEUPLOAD' => 'The uploaded file is empty.',
+ 'EMPTY_MESSAGE' => 'You must enter a message when posting.',
+ 'EMPTY_REMOTE_DATA' => 'File could not be uploaded, please try uploading the file manually.',
+
+ 'FLASH_IS_OFF' => '[flash] is <em>OFF</em>',
+ 'FLASH_IS_ON' => '[flash] is <em>ON</em>',
+ 'FLOOD_ERROR' => 'You cannot make another post so soon after your last.',
+ 'FONT_COLOR' => 'Font colour',
+ 'FONT_COLOR_HIDE' => 'Hide font colour',
+ 'FONT_HUGE' => 'Huge',
+ 'FONT_LARGE' => 'Large',
+ 'FONT_NORMAL' => 'Normal',
+ 'FONT_SIZE' => 'Font size',
+ 'FONT_SMALL' => 'Small',
+ 'FONT_TINY' => 'Tiny',
+
+ 'GENERAL_UPLOAD_ERROR' => 'Could not upload attachment to %s.',
+
+ 'IMAGES_ARE_OFF' => '[img] is <em>OFF</em>',
+ 'IMAGES_ARE_ON' => '[img] is <em>ON</em>',
+ 'INVALID_FILENAME' => '%s is an invalid filename.',
+
+ 'LOAD' => 'Load',
+ 'LOAD_DRAFT' => 'Load draft',
+ 'LOAD_DRAFT_EXPLAIN' => 'Here you are able to select the draft you want to continue writing. Your current post will be cancelled, all current post contents will be deleted. View, edit and delete drafts within your User Control Panel.',
+ 'LOGIN_EXPLAIN_BUMP' => 'You need to login in order to bump topics within this forum.',
+ 'LOGIN_EXPLAIN_DELETE' => 'You need to login in order to delete posts within this forum.',
+ 'LOGIN_EXPLAIN_POST' => 'You need to login in order to post within this forum.',
+ 'LOGIN_EXPLAIN_QUOTE' => 'You need to login in order to quote posts within this forum.',
+ 'LOGIN_EXPLAIN_REPLY' => 'You need to login in order to reply to topics within this forum.',
+
+ 'MAX_FONT_SIZE_EXCEEDED' => 'You may only use fonts up to size %1$d.',
+ 'MAX_FLASH_HEIGHT_EXCEEDED' => 'Your flash files may only be up to %1$d pixels high.',
+ 'MAX_FLASH_WIDTH_EXCEEDED' => 'Your flash files may only be up to %1$d pixels wide.',
+ 'MAX_IMG_HEIGHT_EXCEEDED' => 'Your images may only be up to %1$d pixels high.',
+ 'MAX_IMG_WIDTH_EXCEEDED' => 'Your images may only be up to %1$d pixels wide.',
+
+ 'MESSAGE_BODY_EXPLAIN' => 'Enter your message here, it may contain no more than <strong>%d</strong> characters.',
+ 'MESSAGE_DELETED' => 'This message has been deleted successfully.',
+ 'MORE_SMILIES' => 'View more smilies',
+
+ 'NOTIFY_REPLY' => 'Notify me when a reply is posted',
+ 'NOT_UPLOADED' => 'File could not be uploaded.',
+ 'NO_DELETE_POLL_OPTIONS' => 'You cannot delete existing poll options.',
+ 'NO_PM_ICON' => 'No PM icon',
+ 'NO_POLL_TITLE' => 'You have to enter a poll title.',
+ 'NO_POST' => 'The requested post does not exist.',
+ 'NO_POST_MODE' => 'No post mode specified.',
+
+ 'PARTIAL_UPLOAD' => 'The uploaded file was only partially uploaded.',
+ 'PHP_SIZE_NA' => 'The attachment’s file size is too large.<br />Could not determine the maximum size defined by PHP in php.ini.',
+ 'PHP_SIZE_OVERRUN' => 'The attachment’s file size is too large, the maximum upload size is %1$d %2$s.<br />Please note this is set in php.ini and cannot be overridden.',
+ 'PLACE_INLINE' => 'Place inline',
+ 'POLL_DELETE' => 'Delete poll',
+ 'POLL_FOR' => 'Run poll for',
+ 'POLL_FOR_EXPLAIN' => 'Enter 0 or leave blank for a never ending poll.',
+ 'POLL_MAX_OPTIONS' => 'Options per user',
+ 'POLL_MAX_OPTIONS_EXPLAIN' => 'This is the number of options each user may select when voting.',
+ 'POLL_OPTIONS' => 'Poll options',
+ 'POLL_OPTIONS_EXPLAIN' => 'Place each option on a new line. You may enter up to <strong>%d</strong> options.',
+ 'POLL_OPTIONS_EDIT_EXPLAIN' => 'Place each option on a new line. You may enter up to <strong>%d</strong> options. If you remove or add options all previous votes will be reset.',
+ 'POLL_QUESTION' => 'Poll question',
+ 'POLL_TITLE_TOO_LONG' => 'The poll title must contain fewer than 100 characters.',
+ 'POLL_TITLE_COMP_TOO_LONG' => 'The parsed size of your poll title is too large, consider removing BBCodes or smilies.',
+ 'POLL_VOTE_CHANGE' => 'Allow re-voting',
+ 'POLL_VOTE_CHANGE_EXPLAIN' => 'If enabled users are able to change their vote.',
+ 'POSTED_ATTACHMENTS' => 'Posted attachments',
+ 'POST_APPROVAL_NOTIFY' => 'You will be notified when your post has been approved.',
+ 'POST_CONFIRMATION' => 'Confirmation of post',
+ 'POST_CONFIRM_EXPLAIN' => 'To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.',
+ 'POST_DELETED' => 'This message has been deleted successfully.',
+ 'POST_EDITED' => 'This message has been edited successfully.',
+ 'POST_EDITED_MOD' => 'This message has been edited successfully, but it will need to be approved by a moderator before it is publicly viewable.',
+ 'POST_GLOBAL' => 'Global',
+ 'POST_ICON' => 'Post icon',
+ 'POST_NORMAL' => 'Normal',
+ 'POST_REVIEW' => 'Post review',
+ 'POST_REVIEW_EDIT' => 'Post review',
+ 'POST_REVIEW_EDIT_EXPLAIN' => 'This post has been altered by another user while you were editing it. You may wish to review the current version of this post and adjust your edits.',
+ 'POST_REVIEW_EXPLAIN' => 'At least one new post has been made to this topic. You may wish to review your post in light of this.',
+ 'POST_STORED' => 'This message has been posted successfully.',
+ 'POST_STORED_MOD' => 'This message has been submitted successfully, but it will need to be approved by a moderator before it is publicly viewable.',
+ 'POST_TOPIC_AS' => 'Post topic as',
+ 'PROGRESS_BAR' => 'Progress bar',
+
+ 'QUOTE_DEPTH_EXCEEDED' => 'You may embed only %1$d quotes within each other.',
+
+ 'SAVE' => 'Save',
+ 'SAVE_DATE' => 'Saved at',
+ 'SAVE_DRAFT' => 'Save draft',
+ 'SAVE_DRAFT_CONFIRM' => 'Please note that saved drafts only include the subject and the message, any other element will be removed. Do you want to save your draft now?',
+ 'SMILIES' => 'Smilies',
+ 'SMILIES_ARE_OFF' => 'Smilies are <em>OFF</em>',
+ 'SMILIES_ARE_ON' => 'Smilies are <em>ON</em>',
+ 'STICKY_ANNOUNCE_TIME_LIMIT'=> 'Sticky/Announcement time limit',
+ 'STICK_TOPIC_FOR' => 'Stick topic for',
+ 'STICK_TOPIC_FOR_EXPLAIN' => 'Enter 0 or leave blank for a never ending Sticky/Announcement. Please note that this number is relative to the date of the post.',
+ 'STYLES_TIP' => 'Tip: Styles can be applied quickly to selected text.',
+
+ 'TOO_FEW_CHARS' => 'Your message contains too few characters.',
+ 'TOO_FEW_CHARS_LIMIT' => 'Your message contains %1$d characters. The minimum number of characters you need to enter is %2$d.',
+ 'TOO_FEW_POLL_OPTIONS' => 'You must enter at least two poll options.',
+ 'TOO_MANY_ATTACHMENTS' => 'Cannot add another attachment, %d is the maximum.',
+ 'TOO_MANY_CHARS' => 'Your message contains too many characters.',
+ 'TOO_MANY_CHARS_POST' => 'Your message contains %1$d characters. The maximum number of allowed characters is %2$d.',
+ 'TOO_MANY_CHARS_SIG' => 'Your signature contains %1$d characters. The maximum number of allowed characters is %2$d.',
+ 'TOO_MANY_POLL_OPTIONS' => 'You have tried to enter too many poll options.',
+ 'TOO_MANY_SMILIES' => 'Your message contains too many smilies. The maximum number of smilies allowed is %d.',
+ 'TOO_MANY_URLS' => 'Your message contains too many URLs. The maximum number of URLs allowed is %d.',
+ 'TOO_MANY_USER_OPTIONS' => 'You cannot specify more options per user than existing poll options.',
+ 'TOPIC_BUMPED' => 'Topic has been bumped successfully.',
+
+ 'UNAUTHORISED_BBCODE' => 'You cannot use certain BBCodes: %s.',
+ 'UNGLOBALISE_EXPLAIN' => 'To switch this topic back from being global to a normal topic, you need to select the forum you wish this topic to be displayed.',
+ 'UPDATE_COMMENT' => 'Update comment',
+ 'URL_INVALID' => 'The URL you specified is invalid.',
+ 'URL_NOT_FOUND' => 'The file specified could not be found.',
+ 'URL_IS_OFF' => '[url] is <em>OFF</em>',
+ 'URL_IS_ON' => '[url] is <em>ON</em>',
+ 'USER_CANNOT_BUMP' => 'You cannot bump topics in this forum.',
+ 'USER_CANNOT_DELETE' => 'You cannot delete posts in this forum.',
+ 'USER_CANNOT_EDIT' => 'You cannot edit posts in this forum.',
+ 'USER_CANNOT_REPLY' => 'You cannot reply in this forum.',
+ 'USER_CANNOT_FORUM_POST' => 'You are not able to do posting operations on this forum due to the forum type not supporting it.',
+
+ 'VIEW_MESSAGE' => '%sView your submitted message%s',
+ 'VIEW_PRIVATE_MESSAGE' => '%sView your submitted private message%s',
+
+ 'WRONG_FILESIZE' => 'The file is too big, maximum allowed size is %1d %2s.',
+ 'WRONG_SIZE' => 'The image must be at least %1$d pixels wide, %2$d pixels high and at most %3$d pixels wide and %4$d pixels high. The submitted image is %5$d pixels wide and %6$d pixels high.',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php
new file mode 100644
index 0000000000..be92391a4e
--- /dev/null
+++ b/phpBB/language/en/search.php
@@ -0,0 +1,104 @@
+<?php
+/**
+*
+* search [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'ALL_AVAILABLE' => 'All available',
+ 'ALL_RESULTS' => 'All results',
+
+ 'DISPLAY_RESULTS' => 'Display results as',
+
+ 'FOUND_SEARCH_MATCH' => 'Search found %d match',
+ 'FOUND_SEARCH_MATCHES' => 'Search found %d matches',
+ 'FOUND_MORE_SEARCH_MATCHES' => 'Search found more than %d matches',
+
+ 'GLOBAL' => 'Global announcement',
+
+ 'IGNORED_TERMS' => 'ignored',
+ 'IGNORED_TERMS_EXPLAIN' => 'The following words in your search query were ignored because they are too common words: <strong>%s</strong>.',
+
+ 'JUMP_TO_POST' => 'Jump to post',
+
+ 'LOGIN_EXPLAIN_EGOSEARCH' => 'The board requires you to be registered and logged in to view your own posts.',
+ 'LOGIN_EXPLAIN_UNREADSEARCH'=> 'The board requires you to be registered and logged in to view your unread posts.',
+
+ 'MAX_NUM_SEARCH_KEYWORDS_REFINE' => 'You specified too many words to search for. Please do not enter more than %1$d words.',
+
+ 'NO_KEYWORDS' => 'You must specify at least one word to search for. Each word must consist of at least %d characters and must not contain more than %d characters excluding wildcards.',
+ 'NO_RECENT_SEARCHES' => 'No searches have been carried out recently.',
+ 'NO_SEARCH' => 'Sorry but you are not permitted to use the search system.',
+ 'NO_SEARCH_RESULTS' => 'No suitable matches were found.',
+ 'NO_SEARCH_TIME' => 'Sorry but you cannot use search at this time. Please try again in a few minutes.',
+ 'WORD_IN_NO_POST' => 'No posts were found because the word <strong>%s</strong> is not contained in any post.',
+ 'WORDS_IN_NO_POST' => 'No posts were found because the words <strong>%s</strong> are not contained in any post.',
+
+ 'POST_CHARACTERS' => 'characters of posts',
+
+ 'RECENT_SEARCHES' => 'Recent searches',
+ 'RESULT_DAYS' => 'Limit results to previous',
+ 'RESULT_SORT' => 'Sort results by',
+ 'RETURN_FIRST' => 'Return first',
+ 'RETURN_TO_SEARCH_ADV' => 'Return to advanced search',
+
+ 'SEARCHED_FOR' => 'Search term used',
+ 'SEARCHED_TOPIC' => 'Searched topic',
+ 'SEARCH_ALL_TERMS' => 'Search for all terms or use query as entered',
+ 'SEARCH_ANY_TERMS' => 'Search for any terms',
+ 'SEARCH_AUTHOR' => 'Search for author',
+ 'SEARCH_AUTHOR_EXPLAIN' => 'Use * as a wildcard for partial matches.',
+ 'SEARCH_FIRST_POST' => 'First post of topics only',
+ 'SEARCH_FORUMS' => 'Search in forums',
+ 'SEARCH_FORUMS_EXPLAIN' => 'Select the forum or forums you wish to search in. Subforums are searched automatically if you do not disable “search subforums“ below.',
+ 'SEARCH_IN_RESULTS' => 'Search these results',
+ 'SEARCH_KEYWORDS_EXPLAIN' => 'Place <strong>+</strong> in front of a word which must be found and <strong>-</strong> in front of a word which must not be found. Put a list of words separated by <strong>|</strong> into brackets if only one of the words must be found. Use * as a wildcard for partial matches.',
+ 'SEARCH_MSG_ONLY' => 'Message text only',
+ 'SEARCH_OPTIONS' => 'Search options',
+ 'SEARCH_QUERY' => 'Search query',
+ 'SEARCH_SUBFORUMS' => 'Search subforums',
+ 'SEARCH_TITLE_MSG' => 'Post subjects and message text',
+ 'SEARCH_TITLE_ONLY' => 'Topic titles only',
+ 'SEARCH_WITHIN' => 'Search within',
+ 'SORT_ASCENDING' => 'Ascending',
+ 'SORT_AUTHOR' => 'Author',
+ 'SORT_DESCENDING' => 'Descending',
+ 'SORT_FORUM' => 'Forum',
+ 'SORT_POST_SUBJECT' => 'Post subject',
+ 'SORT_TIME' => 'Post time',
+
+ 'TOO_FEW_AUTHOR_CHARS' => 'You must specify at least %d characters of the authors name.',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/search_ignore_words.php b/phpBB/language/en/search_ignore_words.php
new file mode 100644
index 0000000000..2dfdc0df13
--- /dev/null
+++ b/phpBB/language/en/search_ignore_words.php
@@ -0,0 +1,272 @@
+<?php
+/**
+*
+* search_ignore_words [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+$words = array(
+ 'a',
+ 'about',
+ 'after',
+ 'ago',
+ 'all',
+ 'almost',
+ 'along',
+ 'alot',
+ 'also',
+ 'am',
+ 'an',
+ 'and',
+ 'answer',
+ 'any',
+ 'anybody',
+ 'anybodys',
+ 'anywhere',
+ 'are',
+ 'arent',
+ 'around',
+ 'as',
+ 'ask',
+ 'askd',
+ 'at',
+ 'bad',
+ 'be',
+ 'because',
+ 'been',
+ 'before',
+ 'being',
+ 'best',
+ 'better',
+ 'between',
+ 'big',
+ 'btw',
+ 'but',
+ 'by',
+ 'can',
+ 'cant',
+ 'come',
+ 'could',
+ 'couldnt',
+ 'day',
+ 'days',
+ 'days',
+ 'did',
+ 'didnt',
+ 'do',
+ 'does',
+ 'doesnt',
+ 'dont',
+ 'down',
+ 'each',
+ 'etc',
+ 'either',
+ 'else',
+ 'even',
+ 'ever',
+ 'every',
+ 'everybody',
+ 'everybodys',
+ 'everyone',
+ 'far',
+ 'find',
+ 'for',
+ 'found',
+ 'from',
+ 'get',
+ 'go',
+ 'going',
+ 'gone',
+ 'good',
+ 'got',
+ 'gotten',
+ 'had',
+ 'has',
+ 'have',
+ 'havent',
+ 'having',
+ 'her',
+ 'here',
+ 'hers',
+ 'him',
+ 'his',
+ 'home',
+ 'how',
+ 'hows',
+ 'href',
+ 'I',
+ 'Ive',
+ 'if',
+ 'in',
+ 'ini',
+ 'into',
+ 'is',
+ 'isnt',
+ 'it',
+ 'its',
+ 'its',
+ 'just',
+ 'know',
+ 'large',
+ 'less',
+ 'like',
+ 'liked',
+ 'little',
+ 'looking',
+ 'look',
+ 'looked',
+ 'looking',
+ 'lot',
+ 'maybe',
+ 'many',
+ 'me',
+ 'more',
+ 'most',
+ 'much',
+ 'must',
+ 'mustnt',
+ 'my',
+ 'near',
+ 'need',
+ 'never',
+ 'new',
+ 'news',
+ 'no',
+ 'none',
+ 'not',
+ 'nothing',
+ 'now',
+ 'of',
+ 'off',
+ 'often',
+ 'old',
+ 'on',
+ 'once',
+ 'only',
+ 'oops',
+ 'or',
+ 'other',
+ 'our',
+ 'ours',
+ 'out',
+ 'over',
+ 'page',
+ 'please',
+ 'put',
+ 'question',
+ 'questions',
+ 'questioned',
+ 'quote',
+ 'rather',
+ 'really',
+ 'recent',
+ 'said',
+ 'saw',
+ 'say',
+ 'says',
+ 'she',
+ 'see',
+ 'sees',
+ 'should',
+ 'sites',
+ 'small',
+ 'so',
+ 'some',
+ 'something',
+ 'sometime',
+ 'somewhere',
+ 'soon',
+ 'take',
+ 'than',
+ 'true',
+ 'thank',
+ 'that',
+ 'thatd',
+ 'thats',
+ 'the',
+ 'their',
+ 'theirs',
+ 'theres',
+ 'theirs',
+ 'them',
+ 'then',
+ 'there',
+ 'these',
+ 'they',
+ 'theyll',
+ 'theyd',
+ 'theyre',
+ 'this',
+ 'those',
+ 'though',
+ 'through',
+ 'thus',
+ 'time',
+ 'times',
+ 'to',
+ 'too',
+ 'under',
+ 'until',
+ 'untrue',
+ 'up',
+ 'upon',
+ 'use',
+ 'users',
+ 'version',
+ 'very',
+ 'via',
+ 'want',
+ 'was',
+ 'way',
+ 'we',
+ 'well',
+ 'went',
+ 'were',
+ 'werent',
+ 'what',
+ 'when',
+ 'where',
+ 'which',
+ 'who',
+ 'whom',
+ 'whose',
+ 'why',
+ 'wide',
+ 'will',
+ 'with',
+ 'within',
+ 'without',
+ 'wont',
+ 'world',
+ 'worse',
+ 'worst',
+ 'would',
+ 'wrote',
+ 'www',
+ 'yes',
+ 'yet',
+ 'you',
+ 'youd',
+ 'youll',
+ 'your',
+ 'youre',
+ 'yours',
+ 'AFAIK',
+ 'IIRC',
+ 'LOL',
+ 'ROTF',
+ 'ROTFLMAO',
+ 'YMMV',
+);
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/search_synonyms.php b/phpBB/language/en/search_synonyms.php
new file mode 100644
index 0000000000..b85c39e5d5
--- /dev/null
+++ b/phpBB/language/en/search_synonyms.php
@@ -0,0 +1,191 @@
+<?php
+/**
+*
+* search_synonyms [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+$synonyms = array(
+ 'abcense' => 'absence',
+ 'abridgement' => 'abridgment',
+ 'accomodate' => 'accommodate',
+ 'acknowledgment' => 'acknowledgement',
+ 'airplane' => 'aeroplane',
+ 'allright' => 'alright ',
+ 'andy' => 'andrew',
+ 'anemia' => 'anaemia',
+ 'anemic' => 'anaemic',
+ 'anesthesia' => 'anaesthesia',
+ 'appologize' => 'appologise',
+ 'archean' => 'archaean',
+ 'archeology' => 'archaeology',
+ 'archeozoic' => 'archaeozoic',
+ 'armor' => 'armour',
+ 'artic' => 'arctic',
+ 'attachment' => 'attachement',
+ 'attendence' => 'attendance',
+
+ 'barbecue' => 'barbeque',
+ 'behavior' => 'behaviour',
+ 'biassed' => 'biased',
+ 'biol' => 'biology',
+ 'buletin' => 'bulletin',
+
+ 'calender' => 'calendar',
+ 'canceled' => 'cancelled',
+ 'car' => 'automobile',
+ 'catalog' => 'catalogue',
+ 'cenozoic' => 'caenozoic',
+ 'center' => 'centre',
+ 'check' => 'cheque',
+ 'color' => 'colour',
+ 'comission' => 'commission',
+ 'comittee' => 'committee',
+ 'commitee' => 'committee',
+ 'conceed' => 'concede',
+ 'creating' => 'createing',
+ 'curiculum' => 'curriculum',
+
+ 'defense' => 'defence',
+ 'develope' => 'develop',
+ 'discription' => 'description',
+ 'dulness' => 'dullness',
+
+ 'encyclopedia' => 'encyclopaedia',
+ 'enroll' => 'enrol',
+ 'esthetic' => 'aesthetic',
+ 'etiology' => 'aetiology',
+ 'exhorbitant' => 'exorbitant',
+ 'exhuberant' => 'exuberant',
+ 'existance' => 'existence',
+
+ 'favorite' => 'favourite',
+ 'fetus' => 'foetus',
+ 'ficticious' => 'fictitious',
+ 'flavor' => 'flavour',
+ 'flourescent' => 'fluorescent',
+ 'foriegn' => 'foreign',
+ 'fourty' => 'forty',
+
+ 'gage' => 'guage',
+ 'geneology' => 'genealogy',
+ 'grammer' => 'grammar',
+ 'gray' => 'grey',
+ 'guerilla' => 'guerrilla',
+ 'gynecology' => 'gynaecology',
+
+ 'harbor' => 'harbour',
+ 'heighth' => 'height',
+ 'hemaglobin' => 'haemaglobin',
+ 'hematin' => 'haematin',
+ 'hematite' => 'haematite',
+ 'hematology' => 'haematology',
+ 'honor' => 'honour',
+
+ 'innoculate' => 'inoculate',
+ 'installment' => 'instalment',
+ 'irrelevent' => 'irrelevant',
+ 'irrevelant' => 'irrelevant',
+
+ 'jeweler' => 'jeweller',
+ 'judgement' => 'judgment',
+
+ 'labeled' => 'labelled',
+ 'labor' => 'labour',
+ 'laborer' => 'labourer',
+ 'laborers' => 'labourers',
+ 'laboring' => 'labouring',
+ 'licence' => 'license',
+ 'liesure' => 'leisure',
+ 'liquify' => 'liquefy',
+
+ 'maintainance' => 'maintenance',
+ 'maintenence' => 'maintenance',
+ 'medieval' => 'mediaeval',
+ 'meter' => 'metre',
+ 'milage' => 'mileage',
+ 'millipede' => 'millepede',
+ 'miscelaneous' => 'miscellaneous',
+ 'morgage' => 'mortgage',
+
+ 'noticable' => 'noticeable',
+
+ 'occurence' => 'occurrence',
+ 'offense' => 'offence',
+ 'ommision' => 'omission',
+ 'ommission' => 'omission',
+ 'optimize' => 'optimise',
+ 'organize' => 'organise',
+
+ 'pajamas' => 'pyjamas',
+ 'paleography' => 'palaeography',
+ 'paleolithic' => 'palaeolithic',
+ 'paleontological' => 'palaeontological',
+ 'paleontologist' => 'palaeontologist',
+ 'paleontology' => 'palaeontology',
+ 'paleozoic' => 'palaeozoic',
+ 'pamplet' => 'pamphlet',
+ 'paralell' => 'parallel',
+ 'parl' => 'parliament',
+ 'parlt' => 'parliament',
+ 'pediatric' => 'paediatric',
+ 'pediatrician' => 'paediatrician',
+ 'pediatrics' => 'paediatrics',
+ 'pedodontia' => 'paedodontia',
+ 'pedodontics' => 'paedodontics',
+ 'personel' => 'personnel',
+ 'practise' => 'practice',
+ 'program' => 'programme',
+ 'psych' => 'psychology',
+
+ 'questionaire' => 'questionnaire',
+
+ 'rarify' => 'rarefy',
+ 'reccomend' => 'recommend',
+ 'recieve' => 'receive',
+ 'resistence' => 'resistance',
+ 'restaraunt' => 'restaurant',
+
+ 'savior' => 'saviour',
+ 'sep' => 'september',
+ 'seperate' => 'separate',
+ 'sept' => 'september',
+ 'sieze' => 'seize',
+ 'summarize' => 'summarise',
+ 'summerize' => 'summarise',
+ 'superceed' => 'supercede',
+ 'superintendant' => 'superintendent',
+ 'supersede' => 'supercede',
+ 'suprise' => 'surprise',
+ 'surprize' => 'surprise',
+ 'synchronise' => 'synchronize',
+
+ 'temperary' => 'temporary',
+ 'theater' => 'theatre',
+ 'threshhold' => 'threshold',
+ 'transfered' => 'transferred',
+ 'truely' => 'truly',
+ 'truley' => 'truly',
+
+ 'useable' => 'usable',
+
+ 'valor' => 'valour',
+ 'vigor' => 'vigour',
+ 'vol' => 'volume',
+
+ 'whack' => 'wack',
+ 'withold' => 'withhold',
+
+ 'yeild' => 'yield',
+);
+?> \ No newline at end of file
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
new file mode 100644
index 0000000000..4b79a4b6ca
--- /dev/null
+++ b/phpBB/language/en/ucp.php
@@ -0,0 +1,555 @@
+<?php
+/**
+*
+* ucp [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+// Privacy policy and T&C
+$lang = array_merge($lang, array(
+ 'TERMS_OF_USE_CONTENT' => 'By accessing “%1$s†(hereinafter “weâ€, “usâ€, “ourâ€, “%1$sâ€, “%2$sâ€), you agree to be legally bound by the following terms. If you do not agree to be legally bound by all of the following terms then please do not access and/or use “%1$sâ€. We may change these at any time and we’ll do our utmost in informing you, though it would be prudent to review this regularly yourself as your continued usage of “%1$s†after changes mean you agree to be legally bound by these terms as they are updated and/or amended.<br />
+ <br />
+ Our forums are powered by phpBB (hereinafter “theyâ€, “themâ€, “theirâ€, “phpBB softwareâ€, “www.phpbb.comâ€, “phpBB Groupâ€, “phpBB Teamsâ€) which is a bulletin board solution released under the “<a href="http://opensource.org/licenses/gpl-license.php">General Public License</a>†(hereinafter “GPLâ€) and can be downloaded from <a href="http://www.phpbb.com/">www.phpbb.com</a>. The phpBB software only facilitates internet based discussions, the phpBB Group are not responsible for what we allow and/or disallow as permissible content and/or conduct. For further information about phpBB, please see: <a href="http://www.phpbb.com/">http://www.phpbb.com/</a>.<br />
+ <br />
+ You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate any laws be it of your country, the country where “%1$s†is hosted or International Law. Doing so may lead to you being immediately and permanently banned, with notification of your Internet Service Provider if deemed required by us. The IP address of all posts are recorded to aid in enforcing these conditions. You agree that “%1$s†have the right to remove, edit, move or close any topic at any time should we see fit. As a user you agree to any information you have entered to being stored in a database. While this information will not be disclosed to any third party without your consent, neither “%1$s†nor phpBB shall be held responsible for any hacking attempt that may lead to the data being compromised.
+ ',
+
+ 'PRIVACY_POLICY' => 'This policy explains in detail how “%1$s†along with its affiliated companies (hereinafter “weâ€, “usâ€, “ourâ€, “%1$sâ€, “%2$sâ€) and phpBB (hereinafter “theyâ€, “themâ€, “theirâ€, “phpBB softwareâ€, “www.phpbb.comâ€, “phpBB Groupâ€, “phpBB Teamsâ€) use any information collected during any session of usage by you (hereinafter “your informationâ€).<br />
+ <br />
+ Your information is collected via two ways. Firstly, by browsing “%1$s†will cause the phpBB software to create a number of cookies, which are small text files that are downloaded on to your computer’s web browser temporary files. The first two cookies just contain a user identifier (hereinafter “user-idâ€) and an anonymous session identifier (hereinafter “session-idâ€), automatically assigned to you by the phpBB software. A third cookie will be created once you have browsed topics within “%1$s†and is used to store which topics have been read, thereby improving your user experience.<br />
+ <br />
+ We may also create cookies external to the phpBB software whilst browsing “%1$sâ€, though these are outside the scope of this document which is intended to only cover the pages created by the phpBB software. The second way in which we collect your information is by what you submit to us. This can be, and is not limited to: posting as an anonymous user (hereinafter “anonymous postsâ€), registering on “%1$s†(hereinafter “your accountâ€) and posts submitted by you after registration and whilst logged in (hereinafter “your postsâ€).<br />
+ <br />
+ Your account will at a bare minimum contain a uniquely identifiable name (hereinafter “your user nameâ€), a personal password used for logging into your account (hereinafter “your passwordâ€) and a personal, valid e-mail address (hereinafter “your e-mailâ€). Your information for your account at “%1$s†is protected by data-protection laws applicable in the country that hosts us. Any information beyond your user name, your password, and your e-mail address required by “%1$s†during the registration process is either mandatory or optional, at the discretion of “%1$sâ€. In all cases, you have the option of what information in your account is publicly displayed. Furthermore, within your account, you have the option to opt-in or opt-out of automatically generated e-mails from the phpBB software.<br />
+ <br />
+ Your password is ciphered (a one-way hash) so that it is secure. However, it is recommended that you do not reuse the same password across a number of different websites. Your password is the means of accessing your account at “%1$sâ€, so please guard it carefully and under no circumstance will anyone affiliated with “%1$sâ€, phpBB or another 3rd party, legitimately ask you for your password. Should you forget your password for your account, you can use the “I forgot my password†feature provided by the phpBB software. This process will ask you to submit your user name and your e-mail, then the phpBB software will generate a new password to reclaim your account.<br />
+ ',
+));
+
+// Common language entries
+$lang = array_merge($lang, array(
+ 'ACCOUNT_ACTIVE' => 'Your account has now been activated. Thank you for registering.',
+ 'ACCOUNT_ACTIVE_ADMIN' => 'The account has now been activated.',
+ 'ACCOUNT_ACTIVE_PROFILE' => 'Your account has now been successfully reactivated.',
+ 'ACCOUNT_ADDED' => 'Thank you for registering, your account has been created. You may now login with your username and password.',
+ 'ACCOUNT_COPPA' => 'Your account has been created but has to be approved, please check your e-mail for details.',
+ 'ACCOUNT_EMAIL_CHANGED' => 'Your account has been updated. However, this board requires account reactivation on e-mail changes. An activation key has been sent to the new e-mail address you provided. Please check your e-mail for further information.',
+ 'ACCOUNT_EMAIL_CHANGED_ADMIN' => 'Your account has been updated. However, this board requires account reactivation by the administrators on e-mail changes. An e-mail has been sent to them and you will be informed when your account has been reactivated.',
+ 'ACCOUNT_INACTIVE' => 'Your account has been created. However, this board requires account activation, an activation key has been sent to the e-mail address you provided. Please check your e-mail for further information.',
+ 'ACCOUNT_INACTIVE_ADMIN' => 'Your account has been created. However, this board requires account activation by the administrator group. An e-mail has been sent to them and you will be informed when your account has been activated.',
+ 'ACTIVATION_EMAIL_SENT' => 'The activation e-mail has been sent to your e-mail address.',
+ 'ACTIVATION_EMAIL_SENT_ADMIN' => 'The activation e-mail has been sent to the administrators e-mail addresses.',
+ 'ADD' => 'Add',
+ 'ADD_BCC' => 'Add [BCC]',
+ 'ADD_FOES' => 'Add new foes',
+ 'ADD_FOES_EXPLAIN' => 'You may enter several usernames each on a different line.',
+ 'ADD_FOLDER' => 'Add folder',
+ 'ADD_FRIENDS' => 'Add new friends',
+ 'ADD_FRIENDS_EXPLAIN' => 'You may enter several usernames each on a different line.',
+ 'ADD_NEW_RULE' => 'Add new rule',
+ 'ADD_RULE' => 'Add rule',
+ 'ADD_TO' => 'Add [To]',
+ 'ADD_USERS_UCP_EXPLAIN' => 'Here you can add new users to the group. You may select whether this group becomes the new default for the selected users. Please enter each username on a separate line.',
+ 'ADMIN_EMAIL' => 'Administrators can e-mail me information',
+ 'AGREE' => 'I agree to these terms',
+ 'ALLOW_PM' => 'Allow users to send you private messages',
+ 'ALLOW_PM_EXPLAIN' => 'Note that administrators and moderators will always be able to send you messages.',
+ 'ALREADY_ACTIVATED' => 'You have already activated your account.',
+ 'ATTACHMENTS_EXPLAIN' => 'This is a list of attachments you have made in posts to this board.',
+ 'ATTACHMENTS_DELETED' => 'Attachments successfully deleted.',
+ 'ATTACHMENT_DELETED' => 'Attachment successfully deleted.',
+ 'AVATAR_CATEGORY' => 'Category',
+ 'AVATAR_EXPLAIN' => 'Maximum dimensions; width: %1$d pixels, height: %2$d pixels, file size: %3$.2f KiB.',
+ 'AVATAR_FEATURES_DISABLED' => 'The avatar functionality is currently disabled.',
+ 'AVATAR_GALLERY' => 'Local gallery',
+ 'AVATAR_GENERAL_UPLOAD_ERROR' => 'Could not upload avatar to %s.',
+ 'AVATAR_NOT_ALLOWED' => 'Your avatar cannot be displayed because avatars have been disallowed.',
+ 'AVATAR_PAGE' => 'Page',
+ 'AVATAR_TYPE_NOT_ALLOWED' => 'Your current avatar cannot be displayed because its type has been disallowed.',
+
+ 'BACK_TO_DRAFTS' => 'Back to saved drafts',
+ 'BACK_TO_LOGIN' => 'Back to login screen',
+ 'BIRTHDAY' => 'Birthday',
+ 'BIRTHDAY_EXPLAIN' => 'Setting a year will list your age when it is your birthday.',
+ 'BOARD_DATE_FORMAT' => 'My date format',
+ 'BOARD_DATE_FORMAT_EXPLAIN' => 'The syntax used is identical to the PHP <a href="http://www.php.net/date">date()</a> function.',
+ 'BOARD_DST' => 'Summer Time/<abbr title="Daylight Saving Time">DST</abbr> is in effect',
+ 'BOARD_LANGUAGE' => 'My language',
+ 'BOARD_STYLE' => 'My board style',
+ 'BOARD_TIMEZONE' => 'My timezone',
+ 'BOOKMARKS' => 'Bookmarks',
+ 'BOOKMARKS_EXPLAIN' => 'You can bookmark topics for future reference. Select the checkbox for any bookmark you wish to delete, then press the <em>Remove marked bookmarks</em> button.',
+ 'BOOKMARKS_DISABLED' => 'Bookmarks are disabled on this board.',
+ 'BOOKMARKS_REMOVED' => 'Bookmarks removed successfully.',
+
+ 'CANNOT_EDIT_MESSAGE_TIME' => 'You can no longer edit or delete that message.',
+ 'CANNOT_MOVE_TO_SAME_FOLDER'=> 'Messages cannot be moved to the folder you want to remove.',
+ 'CANNOT_MOVE_FROM_SPECIAL' => 'Messages cannot be moved from the outbox.',
+ 'CANNOT_RENAME_FOLDER' => 'This folder cannot be renamed.',
+ 'CANNOT_REMOVE_FOLDER' => 'This folder cannot be removed.',
+ 'CHANGE_DEFAULT_GROUP' => 'Change default group',
+ 'CHANGE_PASSWORD' => 'Change password',
+ 'CLICK_RETURN_FOLDER' => '%1$sReturn to your “%3$s†folder%2$s',
+ 'CONFIRMATION' => 'Confirmation of registration',
+ 'CONFIRM_CHANGES' => 'Confirm changes',
+ 'CONFIRM_EMAIL' => 'Confirm e-mail address',
+ 'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing your e-mail address.',
+ 'CONFIRM_EXPLAIN' => 'To prevent automated registrations the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.',
+ 'VC_REFRESH' => 'Refresh confirmation code',
+ 'VC_REFRESH_EXPLAIN' => 'If you cannot read the code you can request a new one by clicking the button.',
+
+ 'CONFIRM_PASSWORD' => 'Confirm password',
+ 'CONFIRM_PASSWORD_EXPLAIN' => 'You only need to confirm your password if you changed it above.',
+ 'COPPA_BIRTHDAY' => 'To continue with the registration procedure please tell us when you were born.',
+ 'COPPA_COMPLIANCE' => 'COPPA compliance',
+ 'COPPA_EXPLAIN' => 'Please note that clicking submit will create your account. However it cannot be activated until a parent or guardian approves your registration. You will be emailed a copy of the necessary form with details of where to send it.',
+ 'CREATE_FOLDER' => 'Add folder…',
+ 'CURRENT_IMAGE' => 'Current image',
+ 'CURRENT_PASSWORD' => 'Current password',
+ 'CURRENT_PASSWORD_EXPLAIN' => 'You must confirm your current password if you wish to change it, alter your e-mail address or username.',
+ 'CUR_PASSWORD_ERROR' => 'The current password you entered is incorrect.',
+ 'CUSTOM_DATEFORMAT' => 'Custom…',
+
+ 'DEFAULT_ACTION' => 'Default action',
+ 'DEFAULT_ACTION_EXPLAIN' => 'This action will be triggered if none of the above is applicable.',
+ 'DEFAULT_ADD_SIG' => 'Attach my signature by default',
+ 'DEFAULT_BBCODE' => 'Enable BBCode by default',
+ 'DEFAULT_NOTIFY' => 'Notify me upon replies by default',
+ 'DEFAULT_SMILIES' => 'Enable smilies by default',
+ 'DEFINED_RULES' => 'Defined rules',
+ 'DELETED_TOPIC' => 'Topic has been removed.',
+ 'DELETE_ATTACHMENT' => 'Delete attachment',
+ 'DELETE_ATTACHMENTS' => 'Delete attachments',
+ 'DELETE_ATTACHMENT_CONFIRM' => 'Are you sure you want to delete this attachment?',
+ 'DELETE_ATTACHMENTS_CONFIRM'=> 'Are you sure you want to delete these attachments?',
+ 'DELETE_AVATAR' => 'Delete image',
+ 'DELETE_COOKIES_CONFIRM' => 'Are you sure you want to delete all cookies set by this board?',
+ 'DELETE_MARKED_PM' => 'Delete marked messages',
+ 'DELETE_MARKED_PM_CONFIRM' => 'Are you sure you want to delete all marked messages?',
+ 'DELETE_OLDEST_MESSAGES' => 'Delete oldest messages',
+ 'DELETE_MESSAGE' => 'Delete message',
+ 'DELETE_MESSAGE_CONFIRM' => 'Are you sure you want to delete this private message?',
+ 'DELETE_MESSAGES_IN_FOLDER' => 'Delete all messages within removed folder',
+ 'DELETE_RULE' => 'Delete rule',
+ 'DELETE_RULE_CONFIRM' => 'Are you sure you want to delete this rule?',
+ 'DEMOTE_SELECTED' => 'Demote selected',
+ 'DISABLE_CENSORS' => 'Enable word censoring',
+ 'DISPLAY_GALLERY' => 'Display gallery',
+ 'DOMAIN_NO_MX_RECORD_EMAIL' => 'The entered e-mail domain has no valid MX record.',
+ 'DOWNLOADS' => 'Downloads',
+ 'DRAFTS_DELETED' => 'All selected drafts were successfully deleted.',
+ 'DRAFTS_EXPLAIN' => 'Here you can view, edit and delete your saved drafts.',
+ 'DRAFT_UPDATED' => 'Draft successfully updated.',
+
+ 'EDIT_DRAFT_EXPLAIN' => 'Here you are able to edit your draft. Drafts do not contain attachment and poll information.',
+ 'EMAIL_BANNED_EMAIL' => 'The e-mail address you entered is not allowed to be used.',
+ 'EMAIL_INVALID_EMAIL' => 'The e-mail address you entered is invalid.',
+ 'EMAIL_REMIND' => 'This must be the e-mail address associated with your account. If you have not changed this via your user control panel then it is the e-mail address you registered your account with.',
+ 'EMAIL_TAKEN_EMAIL' => 'The entered e-mail address is already in use.',
+ 'EMPTY_DRAFT' => 'You must enter a message to submit your changes.',
+ 'EMPTY_DRAFT_TITLE' => 'You must enter a draft title.',
+ 'EXPORT_AS_XML' => 'Export as XML',
+ 'EXPORT_AS_CSV' => 'Export as CSV',
+ 'EXPORT_AS_CSV_EXCEL' => 'Export as CSV (Excel)',
+ 'EXPORT_AS_TXT' => 'Export as TXT',
+ 'EXPORT_AS_MSG' => 'Export as MSG',
+ 'EXPORT_FOLDER' => 'Export this view',
+
+ 'FIELD_REQUIRED' => 'The field “%s†must be completed.',
+ 'FIELD_TOO_SHORT' => 'The field “%1$s†is too short, a minimum of %2$d characters is required.',
+ 'FIELD_TOO_LONG' => 'The field “%1$s†is too long, a maximum of %2$d characters is allowed.',
+ 'FIELD_TOO_SMALL' => 'The value of “%1$s†is too small, a minimum value of %2$d is required.',
+ 'FIELD_TOO_LARGE' => 'The value of “%1$s†is too large, a maximum value of %2$d is allowed.',
+ 'FIELD_INVALID_CHARS_NUMBERS_ONLY' => 'The field “%s†has invalid characters, only numbers are allowed.',
+ 'FIELD_INVALID_CHARS_ALPHA_ONLY' => 'The field “%s†has invalid characters, only alphanumeric characters are allowed.',
+ 'FIELD_INVALID_CHARS_SPACERS_ONLY' => 'The field “%s†has invalid characters, only alphanumeric, space or -+_[] characters are allowed.',
+ 'FIELD_INVALID_DATE' => 'The field “%s†has an invalid date.',
+
+ 'FOE_MESSAGE' => 'Message from foe',
+ 'FOES_EXPLAIN' => 'Foes are users which will be ignored by default. Posts by these users will not be fully visible. Personal messages from foes are still permitted. Please note that you cannot ignore moderators or administrators.',
+ 'FOES_UPDATED' => 'Your foes list has been updated successfully.',
+ 'FOLDER_ADDED' => 'Folder successfully added.',
+ 'FOLDER_MESSAGE_STATUS' => '%1$d from %2$d messages stored',
+ 'FOLDER_NAME_EMPTY' => 'You must enter a name for this folder.',
+ 'FOLDER_NAME_EXIST' => 'Folder <strong>%s</strong> already exists.',
+ 'FOLDER_OPTIONS' => 'Folder options',
+ 'FOLDER_RENAMED' => 'Folder successfully renamed.',
+ 'FOLDER_REMOVED' => 'Folder successfully removed.',
+ 'FOLDER_STATUS_MSG' => 'Folder is %1$d%% full (%2$d from %3$d messages stored)',
+ 'FORWARD_PM' => 'Forward PM',
+ 'FORCE_PASSWORD_EXPLAIN' => 'Before you may continue browsing the board you are required to change your password.',
+ 'FRIEND_MESSAGE' => 'Message from friend',
+ 'FRIENDS' => 'Friends',
+ 'FRIENDS_EXPLAIN' => 'Friends enable you quick access to members you communicate with frequently. If the template has relevant support any posts made by a friend may be highlighted.',
+ 'FRIENDS_OFFLINE' => 'Offline',
+ 'FRIENDS_ONLINE' => 'Online',
+ 'FRIENDS_UPDATED' => 'Your friends list has been updated successfully.',
+ 'FULL_FOLDER_OPTION_CHANGED'=> 'The action to take when a folder is full has been changed successfully.',
+ 'FWD_ORIGINAL_MESSAGE' => '-------- Original Message --------',
+ 'FWD_SUBJECT' => 'Subject: %s',
+ 'FWD_DATE' => 'Date: %s',
+ 'FWD_FROM' => 'From: %s',
+ 'FWD_TO' => 'To: %s',
+
+ 'GLOBAL_ANNOUNCEMENT' => 'Global announcement',
+
+ 'HIDE_ONLINE' => 'Hide my online status',
+ 'HIDE_ONLINE_EXPLAIN' => 'Changing this setting won’t become effective until your next visit to the board.',
+ 'HOLD_NEW_MESSAGES' => 'Do not accept new messages (New messages will be held back until enough space is available)',
+ 'HOLD_NEW_MESSAGES_SHORT' => 'New messages will be held back',
+
+ 'IF_FOLDER_FULL' => 'If folder is full',
+ 'IMPORTANT_NEWS' => 'Important announcements',
+ 'INVALID_USER_BIRTHDAY' => 'The entered birthday is not a valid date.',
+ 'INVALID_CHARS_USERNAME' => 'The username contains forbidden characters.',
+ 'INVALID_CHARS_NEW_PASSWORD'=> 'The password does not contain the required characters.',
+ 'ITEMS_REQUIRED' => 'The items marked with * are required profile fields and need to be filled out.',
+
+ 'JOIN_SELECTED' => 'Join selected',
+
+ 'LANGUAGE' => 'Language',
+ 'LINK_REMOTE_AVATAR' => 'Link off-site',
+ 'LINK_REMOTE_AVATAR_EXPLAIN'=> 'Enter the URL of the location containing the avatar image you wish to link to.',
+ 'LINK_REMOTE_SIZE' => 'Avatar dimensions',
+ 'LINK_REMOTE_SIZE_EXPLAIN' => 'Specify the width and height of the avatar, leave blank to attempt automatic verification.',
+ 'LOGIN_EXPLAIN_UCP' => 'Please login in order to access the User Control Panel.',
+ 'LOGIN_REDIRECT' => 'You have been successfully logged in.',
+ 'LOGOUT_FAILED' => 'You were not logged out, as the request did not match your session. Please contact the board administrator if you continue to experience problems.',
+ 'LOGOUT_REDIRECT' => 'You have been successfully logged out.',
+
+ 'MARK_IMPORTANT' => 'Mark/Unmark as important',
+ 'MARKED_MESSAGE' => 'Marked message',
+ 'MAX_FOLDER_REACHED' => 'Maximum number of allowed user defined folders reached.',
+ 'MESSAGE_BY_AUTHOR' => 'by',
+ 'MESSAGE_COLOURS' => 'Message colours',
+ 'MESSAGE_DELETED' => 'Message successfully deleted.',
+ 'MESSAGE_HISTORY' => 'Message history',
+ 'MESSAGE_REMOVED_FROM_OUTBOX' => 'This message has been removed by its author before it was delivered.',
+ 'MESSAGE_SENT_ON' => 'on',
+ 'MESSAGE_STORED' => 'This message has been sent successfully.',
+ 'MESSAGE_TO' => 'To',
+ 'MESSAGES_DELETED' => 'Messages successfully deleted',
+ 'MOVE_DELETED_MESSAGES_TO' => 'Move messages from removed folder to',
+ 'MOVE_DOWN' => 'Move down',
+ 'MOVE_MARKED_TO_FOLDER' => 'Move marked to %s',
+ 'MOVE_PM_ERROR' => 'An error occurred while moving the messages to the new folder, only %1d from %2d messages were moved.',
+ 'MOVE_TO_FOLDER' => 'Move to folder',
+ 'MOVE_UP' => 'Move up',
+
+ 'NEW_EMAIL_ERROR' => 'The e-mail addresses you entered do not match.',
+ 'NEW_FOLDER_NAME' => 'New folder name',
+ 'NEW_PASSWORD' => 'New password',
+ 'NEW_PASSWORD_ERROR' => 'The passwords you entered do not match.',
+ 'NOTIFY_METHOD' => 'Notification method',
+ 'NOTIFY_METHOD_BOTH' => 'Both',
+ 'NOTIFY_METHOD_EMAIL' => 'E-mail only',
+ 'NOTIFY_METHOD_EXPLAIN' => 'Method for sending messages sent via this board.',
+ 'NOTIFY_METHOD_IM' => 'Jabber only',
+ 'NOTIFY_ON_PM' => 'Notify me on new private messages',
+ 'NOT_ADDED_FRIENDS_ANONYMOUS' => 'You cannot add the anonymous user to your friends list.',
+ 'NOT_ADDED_FRIENDS_BOTS' => 'You cannot add bots to your friends list.',
+ 'NOT_ADDED_FRIENDS_FOES' => 'You cannot add users to your friends list who are on your foes list.',
+ 'NOT_ADDED_FRIENDS_SELF' => 'You cannot add yourself to the friends list.',
+ 'NOT_ADDED_FOES_MOD_ADMIN' => 'You cannot add administrators and moderators to your foes list.',
+ 'NOT_ADDED_FOES_ANONYMOUS' => 'You cannot add the anonymous user to your foes list.',
+ 'NOT_ADDED_FOES_BOTS' => 'You cannot add bots to your foes list.',
+ 'NOT_ADDED_FOES_FRIENDS' => 'You cannot add users to your foes list who are on your friends list.',
+ 'NOT_ADDED_FOES_SELF' => 'You cannot add yourself to the foes list.',
+ 'NOT_AGREE' => 'I do not agree to these terms',
+ 'NOT_ENOUGH_SPACE_FOLDER' => 'The destination folder “%s†seems to be full. The requested action has not been taken.',
+ 'NOT_MOVED_MESSAGE' => 'You have 1 private message currently on hold because of full folder.',
+ 'NOT_MOVED_MESSAGES' => 'You have %d private messages currently on hold because of full folder.',
+ 'NO_ACTION_MODE' => 'No message action specified.',
+ 'NO_AUTHOR' => 'No author defined for this message',
+ 'NO_AVATAR_CATEGORY' => 'None',
+
+ 'NO_AUTH_DELETE_MESSAGE' => 'You are not authorised to delete private messages.',
+ 'NO_AUTH_EDIT_MESSAGE' => 'You are not authorised to edit private messages.',
+ 'NO_AUTH_FORWARD_MESSAGE' => 'You are not authorised to forward private messages.',
+ 'NO_AUTH_GROUP_MESSAGE' => 'You are not authorised to send private messages to groups.',
+ 'NO_AUTH_PASSWORD_REMINDER' => 'You are not authorised to request a new password.',
+ 'NO_AUTH_READ_HOLD_MESSAGE' => 'You are not authorised to read private messages that are on hold.',
+ 'NO_AUTH_READ_MESSAGE' => 'You are not authorised to read private messages.',
+ 'NO_AUTH_READ_REMOVED_MESSAGE' => 'You are not able to read this message because it was removed by the author.',
+ 'NO_AUTH_SEND_MESSAGE' => 'You are not authorised to send private messages.',
+ 'NO_AUTH_SIGNATURE' => 'You are not authorised to define a signature.',
+
+ 'NO_BCC_RECIPIENT' => 'None',
+ 'NO_BOOKMARKS' => 'You have no bookmarks.',
+ 'NO_BOOKMARKS_SELECTED' => 'You have selected no bookmarks.',
+ 'NO_EDIT_READ_MESSAGE' => 'Private message cannot be edited because it has already been read.',
+ 'NO_EMAIL_USER' => 'The e-mail/username information submitted could not be found.',
+ 'NO_FOES' => 'No foes currently defined',
+ 'NO_FRIENDS' => 'No friends currently defined',
+ 'NO_FRIENDS_OFFLINE' => 'No friends offline',
+ 'NO_FRIENDS_ONLINE' => 'No friends online',
+ 'NO_GROUP_SELECTED' => 'No group specified.',
+ 'NO_IMPORTANT_NEWS' => 'No important announcements present.',
+ 'NO_MESSAGE' => 'Private message could not be found.',
+ 'NO_NEW_FOLDER_NAME' => 'You have to specify a new folder name.',
+ 'NO_NEWER_PM' => 'No newer messages.',
+ 'NO_OLDER_PM' => 'No older messages.',
+ 'NO_PASSWORD_SUPPLIED' => 'You cannot login without a password.',
+ 'NO_RECIPIENT' => 'No recipient defined.',
+ 'NO_RULES_DEFINED' => 'No rules defined.',
+ 'NO_SAVED_DRAFTS' => 'No drafts saved.',
+ 'NO_TO_RECIPIENT' => 'None',
+ 'NO_WATCHED_FORUMS' => 'You are not subscribed to any forums.',
+ 'NO_WATCHED_SELECTED' => 'You have not selected any subscribed topics or forums.',
+ 'NO_WATCHED_TOPICS' => 'You are not subscribed to any topics.',
+
+ 'PASS_TYPE_ALPHA_EXPLAIN' => 'Password must be between %1$d and %2$d characters long, must contain letters in mixed case and must contain numbers.',
+ 'PASS_TYPE_ANY_EXPLAIN' => 'Must be between %1$d and %2$d characters.',
+ 'PASS_TYPE_CASE_EXPLAIN' => 'Password must be between %1$d and %2$d characters long and must contain letters in mixed case.',
+ 'PASS_TYPE_SYMBOL_EXPLAIN' => 'Password must be between %1$d and %2$d characters long, must contain letters in mixed case, must contain numbers and must contain symbols.',
+ 'PASSWORD' => 'Password',
+ 'PASSWORD_ACTIVATED' => 'Your new password has been activated.',
+ 'PASSWORD_UPDATED' => 'A new password was sent to your registered e-mail address.',
+ 'PERMISSIONS_RESTORED' => 'Successfully restored original permissions.',
+ 'PERMISSIONS_TRANSFERRED' => 'Successfully transferred permissions from <strong>%s</strong>, you are now able to browse the board with this user’s permissions.<br />Please note that admin permissions were not transferred. You are able to revert to your permission set at any time.',
+ 'PM_DISABLED' => 'Private messaging has been disabled on this board.',
+ 'PM_FROM' => 'From',
+ 'PM_FROM_REMOVED_AUTHOR' => 'This message was sent by a user no longer registered.',
+ 'PM_ICON' => 'PM icon',
+ 'PM_INBOX' => 'Inbox',
+ 'PM_NO_USERS' => 'The requested users to be added do not exist.',
+ 'PM_OUTBOX' => 'Outbox',
+ 'PM_SENTBOX' => 'Sent messages',
+ 'PM_SUBJECT' => 'Message subject',
+ 'PM_TO' => 'Send to',
+ 'PM_USERS_REMOVED_NO_PM' => 'Some users couldn’t be added as they have disabled private message receipt.',
+ 'POPUP_ON_PM' => 'Pop up window on new private message',
+ 'POST_EDIT_PM' => 'Edit message',
+ 'POST_FORWARD_PM' => 'Forward message',
+ 'POST_NEW_PM' => 'Compose message',
+ 'POST_PM_LOCKED' => 'Private messaging is locked.',
+ 'POST_PM_POST' => 'Quote post',
+ 'POST_QUOTE_PM' => 'Quote message',
+ 'POST_REPLY_PM' => 'Reply to message',
+ 'PRINT_PM' => 'Print view',
+ 'PREFERENCES_UPDATED' => 'Your preferences have been updated.',
+ 'PROFILE_INFO_NOTICE' => 'Please note that this information may be viewable to other members. Be careful when including any personal details. Any fields marked with a * must be completed.',
+ 'PROFILE_UPDATED' => 'Your profile has been updated.',
+
+ 'RECIPIENT' => 'Recipient',
+ 'RECIPIENTS' => 'Recipients',
+ 'REGISTRATION' => 'Registration',
+ 'RELEASE_MESSAGES' => '%sRelease all on-hold messages%s… they will be re-sorted into the appropriate folder if enough space is made available.',
+ 'REMOVE_ADDRESS' => 'Remove address',
+ 'REMOVE_SELECTED_BOOKMARKS' => 'Remove selected bookmarks',
+ 'REMOVE_SELECTED_BOOKMARKS_CONFIRM' => 'Are you sure you want to delete all selected bookmarks?',
+ 'REMOVE_BOOKMARK_MARKED' => 'Remove marked bookmarks',
+ 'REMOVE_FOLDER' => 'Remove folder',
+ 'REMOVE_FOLDER_CONFIRM' => 'Are you sure you want to remove this folder?',
+ 'RENAME' => 'Rename',
+ 'RENAME_FOLDER' => 'Rename folder',
+ 'REPLIED_MESSAGE' => 'Replied to message',
+ 'REPLY_TO_ALL' => 'Reply to sender and all recipients.',
+ 'REPORT_PM' => 'Report private message',
+ 'RESIGN_SELECTED' => 'Resign selected',
+ 'RETURN_FOLDER' => '%1$sReturn to previous folder%2$s',
+ 'RETURN_UCP' => '%sReturn to the User Control Panel%s',
+ 'RULE_ADDED' => 'Rule successfully added.',
+ 'RULE_ALREADY_DEFINED' => 'This rule was defined previously.',
+ 'RULE_DELETED' => 'Rule successfully removed.',
+ 'RULE_NOT_DEFINED' => 'Rule not correctly specified.',
+ 'RULE_REMOVED_MESSAGE' => 'One private message had been removed due to private message filters.',
+ 'RULE_REMOVED_MESSAGES' => '%d private messages were removed due to private message filters.',
+
+ 'SAME_PASSWORD_ERROR' => 'The new password you entered is the same as your current password.',
+ 'SEARCH_YOUR_POSTS' => 'Show your posts',
+ 'SEND_PASSWORD' => 'Send password',
+ 'SENT_AT' => 'Sent', // Used before dates in private messages
+ 'SHOW_EMAIL' => 'Users can contact me by e-mail',
+ 'SIGNATURE_EXPLAIN' => 'This is a block of text that can be added to posts you make. There is a %d character limit.',
+ 'SIGNATURE_PREVIEW' => 'Your signature will appear like this in posts',
+ 'SIGNATURE_TOO_LONG' => 'Your signature is too long.',
+ 'SORT' => 'Sort',
+ 'SORT_COMMENT' => 'File comment',
+ 'SORT_DOWNLOADS' => 'Downloads',
+ 'SORT_EXTENSION' => 'Extension',
+ 'SORT_FILENAME' => 'Filename',
+ 'SORT_POST_TIME' => 'Post time',
+ 'SORT_SIZE' => 'File size',
+
+ 'TIMEZONE' => 'Timezone',
+ 'TO' => 'To',
+ 'TOO_MANY_RECIPIENTS' => 'You tried to send a private message to too many recipients.',
+ 'TOO_MANY_REGISTERS' => 'You have exceeded the maximum number of registration attempts for this session. Please try again later.',
+
+ 'UCP' => 'User Control Panel',
+ 'UCP_ACTIVATE' => 'Activate account',
+ 'UCP_ADMIN_ACTIVATE' => 'Please note that you will need to enter a valid e-mail address before your account is activated. The administrator will review your account and if approved you will receive an e-mail at the address you specified.',
+ 'UCP_AIM' => 'AOL Instant Messenger',
+ 'UCP_ATTACHMENTS' => 'Attachments',
+ 'UCP_COPPA_BEFORE' => 'Before %s',
+ 'UCP_COPPA_ON_AFTER' => 'On or after %s',
+ 'UCP_EMAIL_ACTIVATE' => 'Please note that you will need to enter a valid e-mail address before your account is activated. You will receive an e-mail at the address you provide that contains an account activation link.',
+ 'UCP_ICQ' => 'ICQ number',
+ 'UCP_JABBER' => 'Jabber address',
+
+ 'UCP_MAIN' => 'Overview',
+ 'UCP_MAIN_ATTACHMENTS' => 'Manage attachments',
+ 'UCP_MAIN_BOOKMARKS' => 'Manage bookmarks',
+ 'UCP_MAIN_DRAFTS' => 'Manage drafts',
+ 'UCP_MAIN_FRONT' => 'Front page',
+ 'UCP_MAIN_SUBSCRIBED' => 'Manage subscriptions',
+
+ 'UCP_MSNM' => 'WL/MSN Messenger',
+ 'UCP_NO_ATTACHMENTS' => 'You have posted no files.',
+
+ 'UCP_PREFS' => 'Board preferences',
+ 'UCP_PREFS_PERSONAL' => 'Edit global settings',
+ 'UCP_PREFS_POST' => 'Edit posting defaults',
+ 'UCP_PREFS_VIEW' => 'Edit display options',
+
+ 'UCP_PM' => 'Private messages',
+ 'UCP_PM_COMPOSE' => 'Compose message',
+ 'UCP_PM_DRAFTS' => 'Manage PM drafts',
+ 'UCP_PM_OPTIONS' => 'Rules, folders &amp; settings',
+ 'UCP_PM_POPUP' => 'Private messages',
+ 'UCP_PM_POPUP_TITLE' => 'Private message popup',
+ 'UCP_PM_UNREAD' => 'Unread messages',
+ 'UCP_PM_VIEW' => 'View messages',
+
+ 'UCP_PROFILE' => 'Profile',
+ 'UCP_PROFILE_AVATAR' => 'Edit avatar',
+ 'UCP_PROFILE_PROFILE_INFO' => 'Edit profile',
+ 'UCP_PROFILE_REG_DETAILS' => 'Edit account settings',
+ 'UCP_PROFILE_SIGNATURE' => 'Edit signature',
+
+ 'UCP_USERGROUPS' => 'Usergroups',
+ 'UCP_USERGROUPS_MEMBER' => 'Edit memberships',
+ 'UCP_USERGROUPS_MANAGE' => 'Manage groups',
+
+ 'UCP_REGISTER_DISABLE' => 'Creating a new account is currently not possible.',
+ 'UCP_REMIND' => 'Send password',
+ 'UCP_RESEND' => 'Send activation e-mail',
+ 'UCP_WELCOME' => 'Welcome to the User Control Panel. From here you can monitor, view and update your profile, preferences, subscribed forums and topics. You can also send messages to other users (if permitted). Please ensure you read any announcements before continuing.',
+ 'UCP_YIM' => 'Yahoo Messenger',
+ 'UCP_ZEBRA' => 'Friends &amp; Foes',
+ 'UCP_ZEBRA_FOES' => 'Manage foes',
+ 'UCP_ZEBRA_FRIENDS' => 'Manage friends',
+ 'UNKNOWN_FOLDER' => 'Unknown folder',
+ 'UNWATCH_MARKED' => 'Unwatch marked',
+ 'UPLOAD_AVATAR_FILE' => 'Upload from your machine',
+ 'UPLOAD_AVATAR_URL' => 'Upload from a URL',
+ 'UPLOAD_AVATAR_URL_EXPLAIN' => 'Enter the URL of the location containing the image. The image will be copied to this site.',
+ 'USERNAME_ALPHA_ONLY_EXPLAIN' => 'Username must be between %1$d and %2$d chars long and use only alphanumeric characters.',
+ 'USERNAME_ALPHA_SPACERS_EXPLAIN'=> 'Username must be between %1$d and %2$d chars long and use alphanumeric, space or -+_[] characters.',
+ 'USERNAME_ASCII_EXPLAIN' => 'Username must be between %1$d and %2$d chars long and use only ASCII characters, so no special symbols.',
+ 'USERNAME_LETTER_NUM_EXPLAIN' => 'Username must be between %1$d and %2$d chars long and use only letter or number characters.',
+ 'USERNAME_LETTER_NUM_SPACERS_EXPLAIN'=> 'Username must be between %1$d and %2$d chars long and use letter, number, space or -+_[] characters.',
+ 'USERNAME_CHARS_ANY_EXPLAIN' => 'Length must be between %1$d and %2$d characters.',
+ 'USERNAME_TAKEN_USERNAME' => 'The username you entered is already in use, please select an alternative.',
+ 'USERNAME_DISALLOWED_USERNAME' => 'The username you entered has been disallowed or contains a disallowed word. Please choose a different name.',
+ 'USER_NOT_FOUND_OR_INACTIVE' => 'The usernames you specified could either not be found or are not activated users.',
+
+ 'VIEW_AVATARS' => 'Display avatars',
+ 'VIEW_EDIT' => 'View/Edit',
+ 'VIEW_FLASH' => 'Display Flash animations',
+ 'VIEW_IMAGES' => 'Display images within posts',
+ 'VIEW_NEXT_HISTORY' => 'Next PM in history',
+ 'VIEW_NEXT_PM' => 'Next PM',
+ 'VIEW_PM' => 'View message',
+ 'VIEW_PM_INFO' => 'Message details',
+ 'VIEW_PM_MESSAGE' => '1 message',
+ 'VIEW_PM_MESSAGES' => '%d messages',
+ 'VIEW_PREVIOUS_HISTORY' => 'Previous PM in history',
+ 'VIEW_PREVIOUS_PM' => 'Previous PM',
+ 'VIEW_SIGS' => 'Display signatures',
+ 'VIEW_SMILIES' => 'Display smilies as images',
+ 'VIEW_TOPICS_DAYS' => 'Display topics from previous days',
+ 'VIEW_TOPICS_DIR' => 'Display topic order direction',
+ 'VIEW_TOPICS_KEY' => 'Display topics ordering by',
+ 'VIEW_POSTS_DAYS' => 'Display posts from previous days',
+ 'VIEW_POSTS_DIR' => 'Display post order direction',
+ 'VIEW_POSTS_KEY' => 'Display posts ordering by',
+
+ 'WATCHED_EXPLAIN' => 'Below is a list of forums and topics you are subscribed to. You will be notified of new posts in either. To unsubscribe mark the forum or topic and then press the <em>Unwatch marked</em> button.',
+ 'WATCHED_FORUMS' => 'Watched forums',
+ 'WATCHED_TOPICS' => 'Watched topics',
+ 'WRONG_ACTIVATION' => 'The activation key you supplied does not match any in the database.',
+
+ 'YOUR_DETAILS' => 'Your activity',
+ 'YOUR_FOES' => 'Your foes',
+ 'YOUR_FOES_EXPLAIN' => 'To remove usernames select them and click submit.',
+ 'YOUR_FRIENDS' => 'Your friends',
+ 'YOUR_FRIENDS_EXPLAIN' => 'To remove usernames select them and click submit.',
+ 'YOUR_WARNINGS' => 'Your warning level',
+
+ 'PM_ACTION' => array(
+ 'PLACE_INTO_FOLDER' => 'Place into folder',
+ 'MARK_AS_READ' => 'Mark as read',
+ 'MARK_AS_IMPORTANT' => 'Mark message',
+ 'DELETE_MESSAGE' => 'Delete message'
+ ),
+ 'PM_CHECK' => array(
+ 'SUBJECT' => 'Subject',
+ 'SENDER' => 'Sender',
+ 'MESSAGE' => 'Message',
+ 'STATUS' => 'Message status',
+ 'TO' => 'Sent To'
+ ),
+ 'PM_RULE' => array(
+ 'IS_LIKE' => 'is like',
+ 'IS_NOT_LIKE' => 'is not like',
+ 'IS' => 'is',
+ 'IS_NOT' => 'is not',
+ 'BEGINS_WITH' => 'begins with',
+ 'ENDS_WITH' => 'ends with',
+ 'IS_FRIEND' => 'is friend',
+ 'IS_FOE' => 'is foe',
+ 'IS_USER' => 'is user',
+ 'IS_GROUP' => 'is in usergroup',
+ 'ANSWERED' => 'answered',
+ 'FORWARDED' => 'forwarded',
+ 'TO_GROUP' => 'to my default usergroup',
+ 'TO_ME' => 'to me'
+ ),
+
+
+ 'GROUPS_EXPLAIN' => 'Usergroups enable board admins to better administer users. By default you will be placed in a specific group, this is your default group. This group defines how you may appear to other users, for example your username colouration, avatar, rank, etc. Depending on whether the administrator allows it you may be allowed to change your default group. You may also be placed in or allowed to join other groups. Some groups may give you additional permissions to view content or increase your capabilities in other areas.',
+ 'GROUP_LEADER' => 'Leaderships',
+ 'GROUP_MEMBER' => 'Memberships',
+ 'GROUP_PENDING' => 'Pending memberships',
+ 'GROUP_NONMEMBER' => 'Non-memberships',
+ 'GROUP_DETAILS' => 'Group details',
+
+ 'NO_LEADER' => 'No group leaderships',
+ 'NO_MEMBER' => 'No group memberships',
+ 'NO_PENDING' => 'No pending memberships',
+ 'NO_NONMEMBER' => 'No non-member groups',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/viewforum.php b/phpBB/language/en/viewforum.php
new file mode 100644
index 0000000000..546f91587d
--- /dev/null
+++ b/phpBB/language/en/viewforum.php
@@ -0,0 +1,66 @@
+<?php
+/**
+*
+* viewforum [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'ACTIVE_TOPICS' => 'Active topics',
+ 'ANNOUNCEMENTS' => 'Announcements',
+
+ 'FORUM_PERMISSIONS' => 'Forum permissions',
+
+ 'ICON_ANNOUNCEMENT' => 'Announcement',
+ 'ICON_STICKY' => 'Sticky',
+
+ 'LOGIN_NOTIFY_FORUM' => 'You have been notified about this forum, please login to view it.',
+
+ 'MARK_TOPICS_READ' => 'Mark topics read',
+
+ 'NEW_POSTS_HOT' => 'New posts [ Popular ]',
+ 'NEW_POSTS_LOCKED' => 'New posts [ Locked ]',
+ 'NO_NEW_POSTS_HOT' => 'No new posts [ Popular ]',
+ 'NO_NEW_POSTS_LOCKED' => 'No new posts [ Locked ]',
+ 'NO_READ_ACCESS' => 'You do not have the required permissions to read topics within this forum.',
+
+ 'POST_FORUM_LOCKED' => 'Forum is locked',
+
+ 'TOPICS_MARKED' => 'The topics for this forum have now been marked read.',
+
+ 'VIEW_FORUM' => 'View forum',
+ 'VIEW_FORUM_TOPIC' => '1 topic',
+ 'VIEW_FORUM_TOPICS' => '%d topics',
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php
new file mode 100644
index 0000000000..3e1874f1ab
--- /dev/null
+++ b/phpBB/language/en/viewtopic.php
@@ -0,0 +1,117 @@
+<?php
+/**
+*
+* viewtopic [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'ATTACHMENT' => 'Attachment',
+ 'ATTACHMENT_FUNCTIONALITY_DISABLED' => 'The attachments feature has been disabled.',
+
+ 'BOOKMARK_ADDED' => 'Bookmarked topic successfully.',
+ 'BOOKMARK_ERR' => 'Bookmarking the topic failed. Please try again.',
+ 'BOOKMARK_REMOVED' => 'Removed bookmarked topic successfully.',
+ 'BOOKMARK_TOPIC' => 'Bookmark topic',
+ 'BOOKMARK_TOPIC_REMOVE' => 'Remove from bookmarks',
+ 'BUMPED_BY' => 'Last bumped by %1$s on %2$s.',
+ 'BUMP_TOPIC' => 'Bump topic',
+
+ 'CODE' => 'Code',
+ 'COLLAPSE_QR' => 'Hide Quick Reply',
+
+ 'DELETE_TOPIC' => 'Delete topic',
+ 'DOWNLOAD_NOTICE' => 'You do not have the required permissions to view the files attached to this post.',
+
+ 'EDITED_TIMES_TOTAL' => 'Last edited by %1$s on %2$s, edited %3$d times in total.',
+ 'EDITED_TIME_TOTAL' => 'Last edited by %1$s on %2$s, edited %3$d time in total.',
+ 'EMAIL_TOPIC' => 'E-mail friend',
+ 'ERROR_NO_ATTACHMENT' => 'The selected attachment does not exist anymore.',
+
+ 'FILE_NOT_FOUND_404' => 'The file <strong>%s</strong> does not exist.',
+ 'FORK_TOPIC' => 'Copy topic',
+ 'FULL_EDITOR' => 'Full Editor',
+
+ 'LINKAGE_FORBIDDEN' => 'You are not authorised to view, download or link from/to this site.',
+ 'LOGIN_NOTIFY_TOPIC' => 'You have been notified about this topic, please login to view it.',
+ 'LOGIN_VIEWTOPIC' => 'The board requires you to be registered and logged in to view this topic.',
+
+ 'MAKE_ANNOUNCE' => 'Change to “Announcementâ€',
+ 'MAKE_GLOBAL' => 'Change to “Globalâ€',
+ 'MAKE_NORMAL' => 'Change to “Standard Topicâ€',
+ 'MAKE_STICKY' => 'Change to “Stickyâ€',
+ 'MAX_OPTIONS_SELECT' => 'You may select up to <strong>%d</strong> options',
+ 'MAX_OPTION_SELECT' => 'You may select <strong>1</strong> option',
+ 'MISSING_INLINE_ATTACHMENT' => 'The attachment <strong>%s</strong> is no longer available',
+ 'MOVE_TOPIC' => 'Move topic',
+
+ 'NO_ATTACHMENT_SELECTED'=> 'You haven’t selected an attachment to download or view.',
+ 'NO_NEWER_TOPICS' => 'There are no newer topics in this forum.',
+ 'NO_OLDER_TOPICS' => 'There are no older topics in this forum.',
+ 'NO_UNREAD_POSTS' => 'There are no new unread posts for this topic.',
+ 'NO_VOTE_OPTION' => 'You must specify an option when voting.',
+ 'NO_VOTES' => 'No votes',
+
+ 'POLL_ENDED_AT' => 'Poll ended at %s',
+ 'POLL_RUN_TILL' => 'Poll runs till %s',
+ 'POLL_VOTED_OPTION' => 'You voted for this option',
+ 'PRINT_TOPIC' => 'Print view',
+
+ 'QUICK_MOD' => 'Quick-mod tools',
+ 'QUICKREPLY' => 'Quick Reply',
+ 'QUOTE' => 'Quote',
+
+ 'REPLY_TO_TOPIC' => 'Reply to topic',
+ 'RETURN_POST' => '%sReturn to the post%s',
+
+ 'SHOW_QR' => 'Quick Reply',
+ 'SUBMIT_VOTE' => 'Submit vote',
+
+ 'TOTAL_VOTES' => 'Total votes',
+
+ 'UNLOCK_TOPIC' => 'Unlock topic',
+
+ 'VIEW_INFO' => 'Post details',
+ 'VIEW_NEXT_TOPIC' => 'Next topic',
+ 'VIEW_PREVIOUS_TOPIC' => 'Previous topic',
+ 'VIEW_RESULTS' => 'View results',
+ 'VIEW_TOPIC_POST' => '1 post',
+ 'VIEW_TOPIC_POSTS' => '%d posts',
+ 'VIEW_UNREAD_POST' => 'First unread post',
+ 'VISIT_WEBSITE' => 'WWW',
+ 'VOTE_SUBMITTED' => 'Your vote has been cast.',
+ 'VOTE_CONVERTED' => 'Changing votes is not supported for converted polls.',
+
+));
+
+?> \ No newline at end of file
diff --git a/phpBB/language/index.htm b/phpBB/language/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/language/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
new file mode 100644
index 0000000000..48cd68500f
--- /dev/null
+++ b/phpBB/mcp.php
@@ -0,0 +1,915 @@
+<?php
+/**
+*
+* @package mcp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+require($phpbb_root_path . 'includes/functions_module.' . $phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup('mcp');
+
+$module = new p_master();
+
+// Setting a variable to let the style designer know where he is...
+$template->assign_var('S_IN_MCP', true);
+
+// Basic parameter data
+$id = request_var('i', '');
+
+if (isset($_REQUEST['mode']) && is_array($_REQUEST['mode']))
+{
+ $mode = request_var('mode', array(''));
+ list($mode, ) = each($mode);
+}
+else
+{
+ $mode = request_var('mode', '');
+}
+
+// Only Moderators can go beyond this point
+if (!$user->data['is_registered'])
+{
+ if ($user->data['is_bot'])
+ {
+ redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
+ }
+
+ login_box('', $user->lang['LOGIN_EXPLAIN_MCP']);
+}
+
+$quickmod = (isset($_REQUEST['quickmod'])) ? true : false;
+$action = request_var('action', '');
+$action_ary = request_var('action', array('' => 0));
+
+$forum_action = request_var('forum_action', '');
+if ($forum_action !== '' && !empty($_POST['sort']))
+{
+ $action = $forum_action;
+}
+
+if (sizeof($action_ary))
+{
+ list($action, ) = each($action_ary);
+}
+unset($action_ary);
+
+if ($mode == 'topic_logs')
+{
+ $id = 'logs';
+ $quickmod = false;
+}
+
+$post_id = request_var('p', 0);
+$topic_id = request_var('t', 0);
+$forum_id = request_var('f', 0);
+$report_id = request_var('r', 0);
+$user_id = request_var('u', 0);
+$username = utf8_normalize_nfc(request_var('username', '', true));
+
+if ($post_id)
+{
+ // We determine the topic and forum id here, to make sure the moderator really has moderative rights on this post
+ $sql = 'SELECT topic_id, forum_id
+ FROM ' . POSTS_TABLE . "
+ WHERE post_id = $post_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $topic_id = (int) $row['topic_id'];
+ $forum_id = (int) ($row['forum_id']) ? $row['forum_id'] : $forum_id;
+}
+else if ($topic_id)
+{
+ $sql = 'SELECT forum_id
+ FROM ' . TOPICS_TABLE . "
+ WHERE topic_id = $topic_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $forum_id = (int) $row['forum_id'];
+}
+
+// If the user doesn't have any moderator powers (globally or locally) he can't access the mcp
+if (!$auth->acl_getf_global('m_'))
+{
+ // Except he is using one of the quickmod tools for users
+ $user_quickmod_actions = array(
+ 'lock' => 'f_user_lock',
+ 'make_sticky' => 'f_sticky',
+ 'make_announce' => 'f_announce',
+ 'make_global' => 'f_announce',
+ 'make_normal' => array('f_announce', 'f_sticky')
+ );
+
+ $allow_user = false;
+ if ($quickmod && isset($user_quickmod_actions[$action]) && $user->data['is_registered'] && $auth->acl_gets($user_quickmod_actions[$action], $forum_id))
+ {
+ $topic_info = get_topic_data(array($topic_id));
+ if ($topic_info[$topic_id]['topic_poster'] == $user->data['user_id'])
+ {
+ $allow_user = true;
+ }
+ }
+
+ if (!$allow_user)
+ {
+ trigger_error('NOT_AUTHORISED');
+ }
+}
+
+// if the user cannot read the forum he tries to access then we won't allow mcp access either
+if ($forum_id && !$auth->acl_get('f_read', $forum_id))
+{
+ trigger_error('NOT_AUTHORISED');
+}
+
+if ($forum_id)
+{
+ $module->acl_forum_id = $forum_id;
+}
+
+// Instantiate module system and generate list of available modules
+$module->list_modules('mcp');
+
+if ($quickmod)
+{
+ $mode = 'quickmod';
+
+ switch ($action)
+ {
+ case 'lock':
+ case 'unlock':
+ case 'lock_post':
+ case 'unlock_post':
+ case 'make_sticky':
+ case 'make_announce':
+ case 'make_global':
+ case 'make_normal':
+ case 'fork':
+ case 'move':
+ case 'delete_post':
+ case 'delete_topic':
+ $module->load('mcp', 'main', 'quickmod');
+ return;
+ break;
+
+ case 'topic_logs':
+ // Reset start parameter if we jumped from the quickmod dropdown
+ if (request_var('start', 0))
+ {
+ $_REQUEST['start'] = 0;
+ }
+
+ $module->set_active('logs', 'topic_logs');
+ break;
+
+ case 'merge_topic':
+ $module->set_active('main', 'forum_view');
+ break;
+
+ case 'split':
+ case 'merge':
+ $module->set_active('main', 'topic_view');
+ break;
+
+ default:
+ trigger_error("$action not allowed as quickmod", E_USER_ERROR);
+ break;
+ }
+}
+else
+{
+ // Select the active module
+ $module->set_active($id, $mode);
+}
+
+// Hide some of the options if we don't have the relevant information to use them
+if (!$post_id)
+{
+ $module->set_display('main', 'post_details', false);
+ $module->set_display('warn', 'warn_post', false);
+}
+
+if ($mode == '' || $mode == 'unapproved_topics' || $mode == 'unapproved_posts')
+{
+ $module->set_display('queue', 'approve_details', false);
+}
+
+if ($mode == '' || $mode == 'reports' || $mode == 'reports_closed' || $mode == 'pm_reports' || $mode == 'pm_reports_closed' || $mode == 'pm_report_details')
+{
+ $module->set_display('reports', 'report_details', false);
+}
+
+if ($mode == '' || $mode == 'reports' || $mode == 'reports_closed' || $mode == 'pm_reports' || $mode == 'pm_reports_closed' || $mode == 'report_details')
+{
+ $module->set_display('pm_reports', 'pm_report_details', false);
+}
+
+if (!$topic_id)
+{
+ $module->set_display('main', 'topic_view', false);
+ $module->set_display('logs', 'topic_logs', false);
+}
+
+if (!$forum_id)
+{
+ $module->set_display('main', 'forum_view', false);
+ $module->set_display('logs', 'forum_logs', false);
+}
+
+if (!$user_id && $username == '')
+{
+ $module->set_display('notes', 'user_notes', false);
+ $module->set_display('warn', 'warn_user', false);
+}
+
+// Load and execute the relevant module
+$module->load_active();
+
+// Assign data to the template engine for the list of modules
+$module->assign_tpl_vars(append_sid("{$phpbb_root_path}mcp.$phpEx"));
+
+// Generate urls for letting the moderation control panel being accessed in different modes
+$template->assign_vars(array(
+ 'U_MCP' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main'),
+ 'U_MCP_FORUM' => ($forum_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&amp;mode=forum_view&amp;f=$forum_id") : '',
+ 'U_MCP_TOPIC' => ($forum_id && $topic_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&amp;mode=topic_view&amp;t=$topic_id") : '',
+ 'U_MCP_POST' => ($forum_id && $topic_id && $post_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&amp;mode=post_details&amp;t=$topic_id&amp;p=$post_id") : '',
+));
+
+// Generate the page, do not display/query online list
+$module->display($module->get_page_title(), false);
+
+/**
+* Functions used to generate additional URL paramters
+*/
+function _module__url($mode, &$module_row)
+{
+ return extra_url();
+}
+
+function _module_notes_url($mode, &$module_row)
+{
+ if ($mode == 'front')
+ {
+ return '';
+ }
+
+ global $user_id;
+ return ($user_id) ? "&amp;u=$user_id" : '';
+}
+
+function _module_warn_url($mode, &$module_row)
+{
+ if ($mode == 'front' || $mode == 'list')
+ {
+ global $forum_id;
+
+ return ($forum_id) ? "&amp;f=$forum_id" : '';
+ }
+
+ if ($mode == 'warn_post')
+ {
+ global $forum_id, $post_id;
+
+ $url_extra = ($forum_id) ? "&amp;f=$forum_id" : '';
+ $url_extra .= ($post_id) ? "&amp;p=$post_id" : '';
+
+ return $url_extra;
+ }
+ else
+ {
+ global $user_id;
+
+ return ($user_id) ? "&amp;u=$user_id" : '';
+ }
+}
+
+function _module_main_url($mode, &$module_row)
+{
+ return extra_url();
+}
+
+function _module_logs_url($mode, &$module_row)
+{
+ return extra_url();
+}
+
+function _module_ban_url($mode, &$module_row)
+{
+ return extra_url();
+}
+
+function _module_queue_url($mode, &$module_row)
+{
+ return extra_url();
+}
+
+function _module_reports_url($mode, &$module_row)
+{
+ return extra_url();
+}
+
+function extra_url()
+{
+ global $forum_id, $topic_id, $post_id, $report_id, $user_id;
+
+ $url_extra = '';
+ $url_extra .= ($forum_id) ? "&amp;f=$forum_id" : '';
+ $url_extra .= ($topic_id) ? "&amp;t=$topic_id" : '';
+ $url_extra .= ($post_id) ? "&amp;p=$post_id" : '';
+ $url_extra .= ($user_id) ? "&amp;u=$user_id" : '';
+ $url_extra .= ($report_id) ? "&amp;r=$report_id" : '';
+
+ return $url_extra;
+}
+
+/**
+* Get simple topic data
+*/
+function get_topic_data($topic_ids, $acl_list = false, $read_tracking = false)
+{
+ global $auth, $db, $config, $user;
+ static $rowset = array();
+
+ $topics = array();
+
+ if (!sizeof($topic_ids))
+ {
+ return array();
+ }
+
+ // cache might not contain read tracking info, so we can't use it if read
+ // tracking information is requested
+ if (!$read_tracking)
+ {
+ $cache_topic_ids = array_intersect($topic_ids, array_keys($rowset));
+ $topic_ids = array_diff($topic_ids, array_keys($rowset));
+ }
+ else
+ {
+ $cache_topic_ids = array();
+ }
+
+ if (sizeof($topic_ids))
+ {
+ $sql_array = array(
+ 'SELECT' => 't.*, f.*',
+
+ 'FROM' => array(
+ TOPICS_TABLE => 't',
+ ),
+
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(FORUMS_TABLE => 'f'),
+ 'ON' => 'f.forum_id = t.forum_id'
+ )
+ ),
+
+ 'WHERE' => $db->sql_in_set('t.topic_id', $topic_ids)
+ );
+
+ if ($read_tracking && $config['load_db_lastread'])
+ {
+ $sql_array['SELECT'] .= ', tt.mark_time, ft.mark_time as forum_mark_time';
+
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(TOPICS_TRACK_TABLE => 'tt'),
+ 'ON' => 'tt.user_id = ' . $user->data['user_id'] . ' AND t.topic_id = tt.topic_id'
+ );
+
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
+ 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND t.forum_id = ft.forum_id'
+ );
+ }
+
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!$row['forum_id'])
+ {
+ // Global Announcement?
+ $row['forum_id'] = request_var('f', 0);
+ }
+
+ $rowset[$row['topic_id']] = $row;
+
+ if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
+ {
+ continue;
+ }
+
+ $topics[$row['topic_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ foreach ($cache_topic_ids as $id)
+ {
+ if (!$acl_list || $auth->acl_gets($acl_list, $rowset[$id]['forum_id']))
+ {
+ $topics[$id] = $rowset[$id];
+ }
+ }
+
+ return $topics;
+}
+
+/**
+* Get simple post data
+*/
+function get_post_data($post_ids, $acl_list = false, $read_tracking = false)
+{
+ global $db, $auth, $config, $user;
+
+ $rowset = array();
+
+ if (!sizeof($post_ids))
+ {
+ return array();
+ }
+
+ $sql_array = array(
+ 'SELECT' => 'p.*, u.*, t.*, f.*',
+
+ 'FROM' => array(
+ USERS_TABLE => 'u',
+ POSTS_TABLE => 'p',
+ TOPICS_TABLE => 't',
+ ),
+
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(FORUMS_TABLE => 'f'),
+ 'ON' => 'f.forum_id = t.forum_id'
+ )
+ ),
+
+ 'WHERE' => $db->sql_in_set('p.post_id', $post_ids) . '
+ AND u.user_id = p.poster_id
+ AND t.topic_id = p.topic_id',
+ );
+
+ if ($read_tracking && $config['load_db_lastread'])
+ {
+ $sql_array['SELECT'] .= ', tt.mark_time, ft.mark_time as forum_mark_time';
+
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(TOPICS_TRACK_TABLE => 'tt'),
+ 'ON' => 'tt.user_id = ' . $user->data['user_id'] . ' AND t.topic_id = tt.topic_id'
+ );
+
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
+ 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND t.forum_id = ft.forum_id'
+ );
+ }
+
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $result = $db->sql_query($sql);
+ unset($sql_array);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (!$row['forum_id'])
+ {
+ // Global Announcement?
+ $row['forum_id'] = request_var('f', 0);
+ }
+
+ if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
+ {
+ continue;
+ }
+
+ if (!$row['post_approved'] && !$auth->acl_get('m_approve', $row['forum_id']))
+ {
+ // Moderators without the permission to approve post should at least not see them. ;)
+ continue;
+ }
+
+ $rowset[$row['post_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ return $rowset;
+}
+
+/**
+* Get simple forum data
+*/
+function get_forum_data($forum_id, $acl_list = 'f_list', $read_tracking = false)
+{
+ global $auth, $db, $user, $config;
+
+ $rowset = array();
+
+ if (!is_array($forum_id))
+ {
+ $forum_id = array($forum_id);
+ }
+
+ if (!sizeof($forum_id))
+ {
+ return array();
+ }
+
+ if ($read_tracking && $config['load_db_lastread'])
+ {
+ $read_tracking_join = ' LEFT JOIN ' . FORUMS_TRACK_TABLE . ' ft ON (ft.user_id = ' . $user->data['user_id'] . '
+ AND ft.forum_id = f.forum_id)';
+ $read_tracking_select = ', ft.mark_time';
+ }
+ else
+ {
+ $read_tracking_join = $read_tracking_select = '';
+ }
+
+ $sql = "SELECT f.* $read_tracking_select
+ FROM " . FORUMS_TABLE . " f$read_tracking_join
+ WHERE " . $db->sql_in_set('f.forum_id', $forum_id);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
+ {
+ continue;
+ }
+
+ if ($auth->acl_get('m_approve', $row['forum_id']))
+ {
+ $row['forum_topics'] = $row['forum_topics_real'];
+ }
+
+ $rowset[$row['forum_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ return $rowset;
+}
+
+/**
+* Get simple pm data
+*/
+function get_pm_data($pm_ids)
+{
+ global $db, $auth, $config, $user;
+
+ $rowset = array();
+
+ if (!sizeof($pm_ids))
+ {
+ return array();
+ }
+
+ $sql_array = array(
+ 'SELECT' => 'p.*, u.*',
+
+ 'FROM' => array(
+ USERS_TABLE => 'u',
+ PRIVMSGS_TABLE => 'p',
+ ),
+
+ 'WHERE' => $db->sql_in_set('p.msg_id', $pm_ids) . '
+ AND u.user_id = p.author_id',
+ );
+
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $result = $db->sql_query($sql);
+ unset($sql_array);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $rowset[$row['msg_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ return $rowset;
+}
+
+/**
+* sorting in mcp
+*
+* @param string $where_sql should either be WHERE (default if ommited) or end with AND or OR
+*
+* $mode reports and reports_closed: the $where parameters uses aliases p for posts table and r for report table
+* $mode unapproved_posts: the $where parameters uses aliases p for posts table and t for topic table
+*/
+function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, &$sort_order_sql, &$total, $forum_id = 0, $topic_id = 0, $where_sql = 'WHERE')
+{
+ global $db, $user, $auth, $template;
+
+ $sort_days = request_var('st', 0);
+ $min_time = ($sort_days) ? time() - ($sort_days * 86400) : 0;
+
+ switch ($mode)
+ {
+ case 'viewforum':
+ $type = 'topics';
+ $default_key = 't';
+ $default_dir = 'd';
+
+ $sql = 'SELECT COUNT(topic_id) AS total
+ FROM ' . TOPICS_TABLE . "
+ $where_sql forum_id = $forum_id
+ AND topic_type NOT IN (" . POST_ANNOUNCE . ', ' . POST_GLOBAL . ")
+ AND topic_last_post_time >= $min_time";
+
+ if (!$auth->acl_get('m_approve', $forum_id))
+ {
+ $sql .= 'AND topic_approved = 1';
+ }
+ break;
+
+ case 'viewtopic':
+ $type = 'posts';
+ $default_key = 't';
+ $default_dir = 'a';
+
+ $sql = 'SELECT COUNT(post_id) AS total
+ FROM ' . POSTS_TABLE . "
+ $where_sql topic_id = $topic_id
+ AND post_time >= $min_time";
+
+ if (!$auth->acl_get('m_approve', $forum_id))
+ {
+ $sql .= 'AND post_approved = 1';
+ }
+ break;
+
+ case 'unapproved_posts':
+ $type = 'posts';
+ $default_key = 't';
+ $default_dir = 'd';
+ $where_sql .= ($topic_id) ? ' p.topic_id = ' . $topic_id . ' AND' : '';
+
+ $sql = 'SELECT COUNT(p.post_id) AS total
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
+ $where_sql " . $db->sql_in_set('p.forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'))) . '
+ AND p.post_approved = 0
+ AND t.topic_id = p.topic_id
+ AND t.topic_first_post_id <> p.post_id';
+
+ if ($min_time)
+ {
+ $sql .= ' AND post_time >= ' . $min_time;
+ }
+ break;
+
+ case 'unapproved_topics':
+ $type = 'topics';
+ $default_key = 't';
+ $default_dir = 'd';
+
+ $sql = 'SELECT COUNT(topic_id) AS total
+ FROM ' . TOPICS_TABLE . "
+ $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'))) . '
+ AND topic_approved = 0';
+
+ if ($min_time)
+ {
+ $sql .= ' AND topic_time >= ' . $min_time;
+ }
+ break;
+
+ case 'pm_reports':
+ case 'pm_reports_closed':
+ case 'reports':
+ case 'reports_closed':
+ $pm = (strpos($mode, 'pm_') === 0) ? true : false;
+
+ $type = ($pm) ? 'pm_reports' : 'reports';
+ $default_key = 't';
+ $default_dir = 'd';
+ $limit_time_sql = ($min_time) ? "AND r.report_time >= $min_time" : '';
+
+ if ($topic_id)
+ {
+ $where_sql .= ' p.topic_id = ' . $topic_id . ' AND ';
+ }
+ else if ($forum_id)
+ {
+ $where_sql .= ' p.forum_id = ' . $forum_id . ' AND ';
+ }
+ else if (!$pm)
+ {
+ $where_sql .= ' ' . $db->sql_in_set('p.forum_id', get_forum_list(array('!f_read', '!m_report')), true, true) . ' AND ';
+ }
+
+ if ($mode == 'reports' || $mode == 'pm_reports')
+ {
+ $where_sql .= ' r.report_closed = 0 AND ';
+ }
+ else
+ {
+ $where_sql .= ' r.report_closed = 1 AND ';
+ }
+
+ if ($pm)
+ {
+ $sql = 'SELECT COUNT(r.report_id) AS total
+ FROM ' . REPORTS_TABLE . ' r, ' . PRIVMSGS_TABLE . " p
+ $where_sql r.post_id = 0
+ AND p.msg_id = r.pm_id
+ $limit_time_sql";
+ }
+ else
+ {
+ $sql = 'SELECT COUNT(r.report_id) AS total
+ FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . " p
+ $where_sql r.pm_id = 0
+ AND p.post_id = r.post_id
+ $limit_time_sql";
+ }
+ break;
+
+ case 'viewlogs':
+ $type = 'logs';
+ $default_key = 't';
+ $default_dir = 'd';
+
+ $sql = 'SELECT COUNT(log_id) AS total
+ FROM ' . LOG_TABLE . "
+ $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_'))) . '
+ AND log_time >= ' . $min_time . '
+ AND log_type = ' . LOG_MOD;
+ break;
+ }
+
+ $sort_key = request_var('sk', $default_key);
+ $sort_dir = request_var('sd', $default_dir);
+ $sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
+
+ switch ($type)
+ {
+ case 'topics':
+ $limit_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'tt' => $user->lang['TOPIC_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']);
+
+ $sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'tt' => 't.topic_time', 'r' => (($auth->acl_get('m_approve', $forum_id)) ? 't.topic_replies_real' : 't.topic_replies'), 's' => 't.topic_title', 'v' => 't.topic_views');
+ $limit_time_sql = ($min_time) ? "AND t.topic_last_post_time >= $min_time" : '';
+ break;
+
+ case 'posts':
+ $limit_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']);
+ $sort_by_sql = array('a' => 'u.username_clean', 't' => 'p.post_time', 's' => 'p.post_subject');
+ $limit_time_sql = ($min_time) ? "AND p.post_time >= $min_time" : '';
+ break;
+
+ case 'reports':
+ $limit_days = array(0 => $user->lang['ALL_REPORTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_text = array('a' => $user->lang['AUTHOR'], 'r' => $user->lang['REPORTER'], 'p' => $user->lang['POST_TIME'], 't' => $user->lang['REPORT_TIME'], 's' => $user->lang['SUBJECT']);
+ $sort_by_sql = array('a' => 'u.username_clean', 'r' => 'ru.username', 'p' => 'p.post_time', 't' => 'r.report_time', 's' => 'p.post_subject');
+ break;
+
+ case 'pm_reports':
+ $limit_days = array(0 => $user->lang['ALL_REPORTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_text = array('a' => $user->lang['AUTHOR'], 'r' => $user->lang['REPORTER'], 'p' => $user->lang['POST_TIME'], 't' => $user->lang['REPORT_TIME'], 's' => $user->lang['SUBJECT']);
+ $sort_by_sql = array('a' => 'u.username_clean', 'r' => 'ru.username', 'p' => 'p.message_time', 't' => 'r.report_time', 's' => 'p.message_subject');
+ break;
+
+ case 'logs':
+ $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_text = array('u' => $user->lang['SORT_USERNAME'], 't' => $user->lang['SORT_DATE'], 'i' => $user->lang['SORT_IP'], 'o' => $user->lang['SORT_ACTION']);
+
+ $sort_by_sql = array('u' => 'u.username_clean', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation');
+ $limit_time_sql = ($min_time) ? "AND l.log_time >= $min_time" : '';
+ break;
+ }
+
+ if (!isset($sort_by_sql[$sort_key]))
+ {
+ $sort_key = $default_key;
+ }
+
+ $sort_order_sql = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
+
+ $s_limit_days = $s_sort_key = $s_sort_dir = $sort_url = '';
+ gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $sort_url);
+
+ $template->assign_vars(array(
+ 'S_SELECT_SORT_DIR' => $s_sort_dir,
+ 'S_SELECT_SORT_KEY' => $s_sort_key,
+ 'S_SELECT_SORT_DAYS' => $s_limit_days)
+ );
+
+ if (($sort_days && $mode != 'viewlogs') || in_array($mode, array('reports', 'unapproved_topics', 'unapproved_posts')) || $where_sql != 'WHERE')
+ {
+ $result = $db->sql_query($sql);
+ $total = (int) $db->sql_fetchfield('total');
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $total = -1;
+ }
+}
+
+/**
+* Validate ids
+*
+* @param array &$ids The relevant ids to check
+* @param string $table The table to find the ids in
+* @param string $sql_id The ids relevant column name
+* @param array $acl_list A list of permissions the user need to have
+* @param mixed $singe_forum Limit to one forum id (int) or the first forum found (true)
+*
+* @return mixed False if no ids were able to be retrieved, true if at least one id left.
+* Additionally, this value can be the forum_id assigned if $single_forum was set.
+* Therefore checking the result for with !== false is the best method.
+*/
+function check_ids(&$ids, $table, $sql_id, $acl_list = false, $single_forum = false)
+{
+ global $db, $auth;
+
+ if (!is_array($ids) || empty($ids))
+ {
+ return false;
+ }
+
+ $sql = "SELECT $sql_id, forum_id FROM $table
+ WHERE " . $db->sql_in_set($sql_id, $ids);
+ $result = $db->sql_query($sql);
+
+ $ids = array();
+ $forum_id = false;
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($acl_list && $row['forum_id'] && !$auth->acl_gets($acl_list, $row['forum_id']))
+ {
+ continue;
+ }
+
+ if ($acl_list && !$row['forum_id'] && !$auth->acl_getf_global($acl_list))
+ {
+ continue;
+ }
+
+ // Limit forum? If not, just assign the id.
+ if ($single_forum === false)
+ {
+ $ids[] = $row[$sql_id];
+ continue;
+ }
+
+ // Limit forum to a specific forum id?
+ // This can get really tricky, because we do not want to create a failure on global topics. :)
+ if ($row['forum_id'])
+ {
+ if ($single_forum !== true && $row['forum_id'] == (int) $single_forum)
+ {
+ $forum_id = (int) $single_forum;
+ }
+ else if ($forum_id === false)
+ {
+ $forum_id = $row['forum_id'];
+ }
+
+ if ($row['forum_id'] == $forum_id)
+ {
+ $ids[] = $row[$sql_id];
+ }
+ }
+ else
+ {
+ // Always add a global topic
+ $ids[] = $row[$sql_id];
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($ids))
+ {
+ return false;
+ }
+
+ // If forum id is false and ids populated we may have only global announcements selected (returning 0 because of (int) $forum_id)
+
+ return ($single_forum === false) ? true : (int) $forum_id;
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
new file mode 100644
index 0000000000..11ff9e7685
--- /dev/null
+++ b/phpBB/memberlist.php
@@ -0,0 +1,1681 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup(array('memberlist', 'groups'));
+
+// Grab data
+$mode = request_var('mode', '');
+$action = request_var('action', '');
+$user_id = request_var('u', ANONYMOUS);
+$username = request_var('un', '', true);
+$group_id = request_var('g', 0);
+$topic_id = request_var('t', 0);
+
+// Check our mode...
+if (!in_array($mode, array('', 'group', 'viewprofile', 'email', 'contact', 'searchuser', 'leaders')))
+{
+ trigger_error('NO_MODE');
+}
+
+switch ($mode)
+{
+ case 'email':
+ break;
+
+ default:
+ // Can this user view profiles/memberlist?
+ if (!$auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
+ {
+ if ($user->data['user_id'] != ANONYMOUS)
+ {
+ trigger_error('NO_VIEW_USERS');
+ }
+
+ login_box('', ((isset($user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)])) ? $user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)] : $user->lang['LOGIN_EXPLAIN_MEMBERLIST']));
+ }
+ break;
+}
+
+$start = request_var('start', 0);
+$submit = (isset($_POST['submit'])) ? true : false;
+
+$default_key = 'c';
+$sort_key = request_var('sk', $default_key);
+$sort_dir = request_var('sd', 'a');
+
+
+// Grab rank information for later
+$ranks = $cache->obtain_ranks();
+
+
+// What do you want to do today? ... oops, I think that line is taken ...
+switch ($mode)
+{
+ case 'leaders':
+ // Display a listing of board admins, moderators
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ $page_title = $user->lang['THE_TEAM'];
+ $template_html = 'memberlist_leaders.html';
+
+ $user_ary = $auth->acl_get_list(false, array('a_', 'm_'), false);
+
+ $admin_id_ary = $global_mod_id_ary = $mod_id_ary = $forum_id_ary = array();
+ foreach ($user_ary as $forum_id => $forum_ary)
+ {
+ foreach ($forum_ary as $auth_option => $id_ary)
+ {
+ if (!$forum_id)
+ {
+ if ($auth_option == 'a_')
+ {
+ $admin_id_ary = array_merge($admin_id_ary, $id_ary);
+ }
+ else
+ {
+ $global_mod_id_ary = array_merge($global_mod_id_ary, $id_ary);
+ }
+ continue;
+ }
+ else
+ {
+ $mod_id_ary = array_merge($mod_id_ary, $id_ary);
+ }
+
+ if ($forum_id)
+ {
+ foreach ($id_ary as $id)
+ {
+ $forum_id_ary[$id][] = $forum_id;
+ }
+ }
+ }
+ }
+
+ $admin_id_ary = array_unique($admin_id_ary);
+ $global_mod_id_ary = array_unique($global_mod_id_ary);
+
+ $mod_id_ary = array_merge($mod_id_ary, $global_mod_id_ary);
+ $mod_id_ary = array_unique($mod_id_ary);
+
+ // Admin group id...
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = 'ADMINISTRATORS'";
+ $result = $db->sql_query($sql);
+ $admin_group_id = (int) $db->sql_fetchfield('group_id');
+ $db->sql_freeresult($result);
+
+ // Get group memberships for the admin id ary...
+ $admin_memberships = group_memberships($admin_group_id, $admin_id_ary);
+
+ $admin_user_ids = array();
+
+ if (!empty($admin_memberships))
+ {
+ // ok, we only need the user ids...
+ foreach ($admin_memberships as $row)
+ {
+ $admin_user_ids[$row['user_id']] = true;
+ }
+ }
+ unset($admin_memberships);
+
+ $sql = 'SELECT forum_id, forum_name
+ FROM ' . FORUMS_TABLE;
+ $result = $db->sql_query($sql);
+
+ $forums = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forums[$row['forum_id']] = $row['forum_name'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = $db->sql_build_query('SELECT', array(
+ 'SELECT' => 'u.user_id, u.group_id as default_group, u.username, u.username_clean, u.user_colour, u.user_rank, u.user_posts, u.user_allow_pm, g.group_id, g.group_name, g.group_colour, g.group_type, ug.user_id as ug_user_id',
+
+ 'FROM' => array(
+ USERS_TABLE => 'u',
+ GROUPS_TABLE => 'g'
+ ),
+
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(USER_GROUP_TABLE => 'ug'),
+ 'ON' => 'ug.group_id = g.group_id AND ug.user_pending = 0 AND ug.user_id = ' . $user->data['user_id']
+ )
+ ),
+
+ 'WHERE' => $db->sql_in_set('u.user_id', array_unique(array_merge($admin_id_ary, $mod_id_ary)), false, true) . '
+ AND u.group_id = g.group_id',
+
+ 'ORDER_BY' => 'g.group_name ASC, u.username_clean ASC'
+ ));
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $which_row = (in_array($row['user_id'], $admin_id_ary)) ? 'admin' : 'mod';
+
+ // We sort out admins not within the 'Administrators' group.
+ // Else, we will list those as admin only having the permission to view logs for example.
+ if ($which_row == 'admin' && empty($admin_user_ids[$row['user_id']]))
+ {
+ // Remove from admin_id_ary, because the user may be a mod instead
+ unset($admin_id_ary[array_search($row['user_id'], $admin_id_ary)]);
+
+ if (!in_array($row['user_id'], $mod_id_ary) && !in_array($row['user_id'], $global_mod_id_ary))
+ {
+ continue;
+ }
+ else
+ {
+ $which_row = 'mod';
+ }
+ }
+
+ $s_forum_select = '';
+ $undisclosed_forum = false;
+
+ if (isset($forum_id_ary[$row['user_id']]) && !in_array($row['user_id'], $global_mod_id_ary))
+ {
+ if ($which_row == 'mod' && sizeof(array_diff(array_keys($forums), $forum_id_ary[$row['user_id']])))
+ {
+ foreach ($forum_id_ary[$row['user_id']] as $forum_id)
+ {
+ if (isset($forums[$forum_id]))
+ {
+ if ($auth->acl_get('f_list', $forum_id))
+ {
+ $s_forum_select .= '<option value="">' . $forums[$forum_id] . '</option>';
+ }
+ else
+ {
+ $undisclosed_forum = true;
+ }
+ }
+ }
+ }
+ }
+
+ // If the mod is only moderating non-viewable forums we skip the user. There is no gain in displaying the person then...
+ if (!$s_forum_select && $undisclosed_forum)
+ {
+// $s_forum_select = '<option value="">' . $user->lang['FORUM_UNDISCLOSED'] . '</option>';
+ continue;
+ }
+
+ // The person is moderating several "public" forums, therefore the person should be listed, but not giving the real group name if hidden.
+ if ($row['group_type'] == GROUP_HIDDEN && !$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $row['ug_user_id'] != $user->data['user_id'])
+ {
+ $group_name = $user->lang['GROUP_UNDISCLOSED'];
+ $u_group = '';
+ }
+ else
+ {
+ $group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
+ $u_group = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']);
+ }
+
+ $rank_title = $rank_img = '';
+ get_user_rank($row['user_rank'], (($row['user_id'] == ANONYMOUS) ? false : $row['user_posts']), $rank_title, $rank_img, $rank_img_src);
+
+ $template->assign_block_vars($which_row, array(
+ 'USER_ID' => $row['user_id'],
+ 'FORUMS' => $s_forum_select,
+ 'RANK_TITLE' => $rank_title,
+ 'GROUP_NAME' => $group_name,
+ 'GROUP_COLOR' => $row['group_colour'],
+
+ 'RANK_IMG' => $rank_img,
+ 'RANK_IMG_SRC' => $rank_img_src,
+
+ 'U_GROUP' => $u_group,
+ 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($row['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $row['user_id']) : '',
+
+ 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USER_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
+ 'U_VIEW_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
+ ));
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']))
+ );
+ break;
+
+ case 'contact':
+
+ $page_title = $user->lang['IM_USER'];
+ $template_html = 'memberlist_im.html';
+
+ if (!$auth->acl_get('u_sendim'))
+ {
+ trigger_error('NOT_AUTHORISED');
+ }
+
+ $presence_img = '';
+ switch ($action)
+ {
+ case 'aim':
+ $lang = 'AIM';
+ $sql_field = 'user_aim';
+ $s_select = 'S_SEND_AIM';
+ $s_action = '';
+ break;
+
+ case 'msnm':
+ $lang = 'MSNM';
+ $sql_field = 'user_msnm';
+ $s_select = 'S_SEND_MSNM';
+ $s_action = '';
+ break;
+
+ case 'jabber':
+ $lang = 'JABBER';
+ $sql_field = 'user_jabber';
+ $s_select = (@extension_loaded('xml') && $config['jab_enable']) ? 'S_SEND_JABBER' : 'S_NO_SEND_JABBER';
+ $s_action = append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&amp;action=$action&amp;u=$user_id");
+ break;
+
+ default:
+ trigger_error('NO_MODE', E_USER_ERROR);
+ break;
+ }
+
+ // Grab relevant data
+ $sql = "SELECT user_id, username, user_email, user_lang, $sql_field
+ FROM " . USERS_TABLE . "
+ WHERE user_id = $user_id
+ AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error('NO_USER');
+ }
+ else if (empty($row[$sql_field]))
+ {
+ trigger_error('IM_NO_DATA');
+ }
+
+ // Post data grab actions
+ switch ($action)
+ {
+ case 'jabber':
+ add_form_key('memberlist_messaging');
+
+ if ($submit && @extension_loaded('xml') && $config['jab_enable'])
+ {
+ if (check_form_key('memberlist_messaging'))
+ {
+
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+
+ $subject = sprintf($user->lang['IM_JABBER_SUBJECT'], $user->data['username'], $config['server_name']);
+ $message = utf8_normalize_nfc(request_var('message', '', true));
+
+ if (empty($message))
+ {
+ trigger_error('EMPTY_MESSAGE_IM');
+ }
+
+ $messenger = new messenger(false);
+
+ $messenger->template('profile_send_im', $row['user_lang']);
+ $messenger->subject(htmlspecialchars_decode($subject));
+
+ $messenger->replyto($user->data['user_email']);
+ $messenger->im($row['user_jabber'], $row['username']);
+
+ $messenger->assign_vars(array(
+ 'BOARD_CONTACT' => $config['board_contact'],
+ 'FROM_USERNAME' => htmlspecialchars_decode($user->data['username']),
+ 'TO_USERNAME' => htmlspecialchars_decode($row['username']),
+ 'MESSAGE' => htmlspecialchars_decode($message))
+ );
+
+ $messenger->send(NOTIFY_IM);
+
+ $s_select = 'S_SENT_JABBER';
+ }
+ else
+ {
+ trigger_error('FORM_INVALID');
+ }
+ }
+ break;
+ }
+
+ // Send vars to the template
+ $template->assign_vars(array(
+ 'IM_CONTACT' => $row[$sql_field],
+ 'A_IM_CONTACT' => addslashes($row[$sql_field]),
+
+ 'U_AIM_CONTACT' => ($action == 'aim') ? 'aim:addbuddy?screenname=' . urlencode($row[$sql_field]) : '',
+ 'U_AIM_MESSAGE' => ($action == 'aim') ? 'aim:goim?screenname=' . urlencode($row[$sql_field]) . '&amp;message=' . urlencode($config['sitename']) : '',
+
+ 'USERNAME' => $row['username'],
+ 'CONTACT_NAME' => $row[$sql_field],
+ 'SITENAME' => $config['sitename'],
+
+ 'PRESENCE_IMG' => $presence_img,
+
+ 'L_SEND_IM_EXPLAIN' => $user->lang['IM_' . $lang],
+ 'L_IM_SENT_JABBER' => sprintf($user->lang['IM_SENT_JABBER'], $row['username']),
+
+ $s_select => true,
+ 'S_IM_ACTION' => $s_action)
+ );
+
+ break;
+
+ case 'viewprofile':
+ // Display a profile
+ if ($user_id == ANONYMOUS && !$username)
+ {
+ trigger_error('NO_USER');
+ }
+
+ // Get user...
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . '
+ WHERE ' . (($username) ? "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'" : "user_id = $user_id");
+ $result = $db->sql_query($sql);
+ $member = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$member)
+ {
+ trigger_error('NO_USER');
+ }
+
+ // a_user admins and founder are able to view inactive users and bots to be able to manage them more easily
+ // Normal users are able to see at least users having only changed their profile settings but not yet reactivated.
+ if (!$auth->acl_get('a_user') && $user->data['user_type'] != USER_FOUNDER)
+ {
+ if ($member['user_type'] == USER_IGNORE)
+ {
+ trigger_error('NO_USER');
+ }
+ else if ($member['user_type'] == USER_INACTIVE && $member['user_inactive_reason'] != INACTIVE_PROFILE)
+ {
+ trigger_error('NO_USER');
+ }
+ }
+
+ $user_id = (int) $member['user_id'];
+
+ // Do the SQL thang
+ $sql = 'SELECT g.group_id, g.group_name, g.group_type
+ FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . " ug
+ WHERE ug.user_id = $user_id
+ AND g.group_id = ug.group_id" . ((!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' AND g.group_type <> ' . GROUP_HIDDEN : '') . '
+ AND ug.user_pending = 0
+ ORDER BY g.group_type, g.group_name';
+ $result = $db->sql_query($sql);
+
+ $group_options = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $group_options .= '<option value="' . $row['group_id'] . '"' . (($row['group_id'] == $member['group_id']) ? ' selected="selected"' : '') . '>' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
+ }
+ $db->sql_freeresult($result);
+
+ // What colour is the zebra
+ $sql = 'SELECT friend, foe
+ FROM ' . ZEBRA_TABLE . "
+ WHERE zebra_id = $user_id
+ AND user_id = {$user->data['user_id']}";
+
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $foe = ($row['foe']) ? true : false;
+ $friend = ($row['friend']) ? true : false;
+ $db->sql_freeresult($result);
+
+ if ($config['load_onlinetrack'])
+ {
+ $sql = 'SELECT MAX(session_time) AS session_time, MIN(session_viewonline) AS session_viewonline
+ FROM ' . SESSIONS_TABLE . "
+ WHERE session_user_id = $user_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $member['session_time'] = (isset($row['session_time'])) ? $row['session_time'] : 0;
+ $member['session_viewonline'] = (isset($row['session_viewonline'])) ? $row['session_viewonline'] : 0;
+ unset($row);
+ }
+
+ if ($config['load_user_activity'])
+ {
+ display_user_activity($member);
+ }
+
+ // Do the relevant calculations
+ $memberdays = max(1, round((time() - $member['user_regdate']) / 86400));
+ $posts_per_day = $member['user_posts'] / $memberdays;
+ $percentage = ($config['num_posts']) ? min(100, ($member['user_posts'] / $config['num_posts']) * 100) : 0;
+
+
+ if ($member['user_sig'])
+ {
+ $member['user_sig'] = censor_text($member['user_sig']);
+
+ if ($member['user_sig_bbcode_bitfield'])
+ {
+ include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+ $bbcode = new bbcode();
+ $bbcode->bbcode_second_pass($member['user_sig'], $member['user_sig_bbcode_uid'], $member['user_sig_bbcode_bitfield']);
+ }
+
+ $member['user_sig'] = bbcode_nl2br($member['user_sig']);
+ $member['user_sig'] = smiley_text($member['user_sig']);
+ }
+
+ $poster_avatar = get_user_avatar($member['user_avatar'], $member['user_avatar_type'], $member['user_avatar_width'], $member['user_avatar_height']);
+
+ // We need to check if the modules 'zebra' ('friends' & 'foes' mode), 'notes' ('user_notes' mode) and 'warn' ('warn_user' mode) are accessible to decide if we can display appropriate links
+ $zebra_enabled = $friends_enabled = $foes_enabled = $user_notes_enabled = $warn_user_enabled = false;
+
+ // Only check if the user is logged in
+ if ($user->data['is_registered'])
+ {
+ if (!class_exists('p_master'))
+ {
+ include($phpbb_root_path . 'includes/functions_module.' . $phpEx);
+ }
+ $module = new p_master();
+
+ $module->list_modules('ucp');
+ $module->list_modules('mcp');
+
+ $user_notes_enabled = ($module->loaded('notes', 'user_notes')) ? true : false;
+ $warn_user_enabled = ($module->loaded('warn', 'warn_user')) ? true : false;
+ $zebra_enabled = ($module->loaded('zebra')) ? true : false;
+ $friends_enabled = ($module->loaded('zebra', 'friends')) ? true : false;
+ $foes_enabled = ($module->loaded('zebra', 'foes')) ? true : false;
+
+ unset($module);
+ }
+
+ $template->assign_vars(show_profile($member, $user_notes_enabled, $warn_user_enabled));
+
+ // Custom Profile Fields
+ $profile_fields = array();
+ if ($config['load_cpf_viewprofile'])
+ {
+ include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
+ $cp = new custom_profile();
+ $profile_fields = $cp->generate_profile_fields_template('grab', $user_id);
+ $profile_fields = (isset($profile_fields[$user_id])) ? $cp->generate_profile_fields_template('show', false, $profile_fields[$user_id]) : array();
+ }
+
+ // If the user has m_approve permission or a_user permission, then list then display unapproved posts
+ if ($auth->acl_getf_global('m_approve') || $auth->acl_get('a_user'))
+ {
+ $sql = 'SELECT COUNT(post_id) as posts_in_queue
+ FROM ' . POSTS_TABLE . '
+ WHERE poster_id = ' . $user_id . '
+ AND post_approved = 0';
+ $result = $db->sql_query($sql);
+ $member['posts_in_queue'] = (int) $db->sql_fetchfield('posts_in_queue');
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $member['posts_in_queue'] = 0;
+ }
+
+ $template->assign_vars(array(
+ 'L_POSTS_IN_QUEUE' => $user->lang('NUM_POSTS_IN_QUEUE', $member['posts_in_queue']),
+
+ 'POSTS_DAY' => sprintf($user->lang['POST_DAY'], $posts_per_day),
+ 'POSTS_PCT' => sprintf($user->lang['POST_PCT'], $percentage),
+
+ 'OCCUPATION' => (!empty($member['user_occ'])) ? censor_text($member['user_occ']) : '',
+ 'INTERESTS' => (!empty($member['user_interests'])) ? censor_text($member['user_interests']) : '',
+ 'SIGNATURE' => $member['user_sig'],
+ 'POSTS_IN_QUEUE'=> $member['posts_in_queue'],
+
+ 'AVATAR_IMG' => $poster_avatar,
+ 'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']),
+ 'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']),
+ 'WWW_IMG' => $user->img('icon_contact_www', $user->lang['WWW']),
+ 'ICQ_IMG' => $user->img('icon_contact_icq', $user->lang['ICQ']),
+ 'AIM_IMG' => $user->img('icon_contact_aim', $user->lang['AIM']),
+ 'MSN_IMG' => $user->img('icon_contact_msnm', $user->lang['MSNM']),
+ 'YIM_IMG' => $user->img('icon_contact_yahoo', $user->lang['YIM']),
+ 'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']),
+ 'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
+
+ 'S_PROFILE_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group'),
+ 'S_GROUP_OPTIONS' => $group_options,
+ 'S_CUSTOM_FIELDS' => (isset($profile_fields['row']) && sizeof($profile_fields['row'])) ? true : false,
+
+ 'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", 'i=users&amp;mode=overview&amp;u=' . $user_id, true, $user->session_id) : '',
+ 'U_USER_BAN' => ($auth->acl_get('m_ban') && $user_id != $user->data['user_id']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=ban&amp;mode=user&amp;u=' . $user_id, true, $user->session_id) : '',
+ 'U_MCP_QUEUE' => ($auth->acl_getf_global('m_approve')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue', true, $user->session_id) : '',
+
+ 'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_id) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=switch_perm&amp;u={$user_id}&amp;hash=" . generate_link_hash('switchperm')) : '',
+
+ 'S_USER_NOTES' => ($user_notes_enabled) ? true : false,
+ 'S_WARN_USER' => ($warn_user_enabled) ? true : false,
+ 'S_ZEBRA' => ($user->data['user_id'] != $user_id && $user->data['is_registered'] && $zebra_enabled) ? true : false,
+ 'U_ADD_FRIEND' => (!$friend && !$foe && $friends_enabled) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&amp;add=' . urlencode(htmlspecialchars_decode($member['username']))) : '',
+ 'U_ADD_FOE' => (!$friend && !$foe && $foes_enabled) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&amp;mode=foes&amp;add=' . urlencode(htmlspecialchars_decode($member['username']))) : '',
+ 'U_REMOVE_FRIEND' => ($friend && $friends_enabled) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&amp;remove=1&amp;usernames[]=' . $user_id) : '',
+ 'U_REMOVE_FOE' => ($foe && $foes_enabled) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&amp;remove=1&amp;mode=foes&amp;usernames[]=' . $user_id) : '',
+ ));
+
+ if (!empty($profile_fields['row']))
+ {
+ $template->assign_vars($profile_fields['row']);
+ }
+
+ if (!empty($profile_fields['blockrow']))
+ {
+ foreach ($profile_fields['blockrow'] as $field_data)
+ {
+ $template->assign_block_vars('custom_fields', $field_data);
+ }
+ }
+
+ // Inactive reason/account?
+ if ($member['user_type'] == USER_INACTIVE)
+ {
+ $user->add_lang('acp/common');
+
+ $inactive_reason = $user->lang['INACTIVE_REASON_UNKNOWN'];
+
+ switch ($member['user_inactive_reason'])
+ {
+ case INACTIVE_REGISTER:
+ $inactive_reason = $user->lang['INACTIVE_REASON_REGISTER'];
+ break;
+
+ case INACTIVE_PROFILE:
+ $inactive_reason = $user->lang['INACTIVE_REASON_PROFILE'];
+ break;
+
+ case INACTIVE_MANUAL:
+ $inactive_reason = $user->lang['INACTIVE_REASON_MANUAL'];
+ break;
+
+ case INACTIVE_REMIND:
+ $inactive_reason = $user->lang['INACTIVE_REASON_REMIND'];
+ break;
+ }
+
+ $template->assign_vars(array(
+ 'S_USER_INACTIVE' => true,
+ 'USER_INACTIVE_REASON' => $inactive_reason)
+ );
+ }
+
+ // Now generate page title
+ $page_title = sprintf($user->lang['VIEWING_PROFILE'], $member['username']);
+ $template_html = 'memberlist_view.html';
+
+ break;
+
+ case 'email':
+
+ // Send an email
+ $page_title = $user->lang['SEND_EMAIL'];
+ $template_html = 'memberlist_email.html';
+
+ add_form_key('memberlist_email');
+
+ if (!$config['email_enable'])
+ {
+ trigger_error('EMAIL_DISABLED');
+ }
+
+ if (!$auth->acl_get('u_sendemail'))
+ {
+ trigger_error('NO_EMAIL');
+ }
+
+ // Are we trying to abuse the facility?
+ if (time() - $user->data['user_emailtime'] < $config['flood_interval'])
+ {
+ trigger_error('FLOOD_EMAIL_LIMIT');
+ }
+
+ // Determine action...
+ $user_id = request_var('u', 0);
+ $topic_id = request_var('t', 0);
+
+ // Send email to user...
+ if ($user_id)
+ {
+ if ($user_id == ANONYMOUS || !$config['board_email_form'])
+ {
+ trigger_error('NO_EMAIL');
+ }
+
+ // Get the appropriate username, etc.
+ $sql = 'SELECT username, user_email, user_allow_viewemail, user_lang, user_jabber, user_notify_type
+ FROM ' . USERS_TABLE . "
+ WHERE user_id = $user_id
+ AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error('NO_USER');
+ }
+
+ // Can we send email to this user?
+ if (!$row['user_allow_viewemail'] && !$auth->acl_get('a_user'))
+ {
+ trigger_error('NO_EMAIL');
+ }
+ }
+ else if ($topic_id)
+ {
+ // Send topic heads-up to email address
+ $sql = 'SELECT forum_id, topic_title
+ FROM ' . TOPICS_TABLE . "
+ WHERE topic_id = $topic_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error('NO_TOPIC');
+ }
+
+ if ($row['forum_id'])
+ {
+ if (!$auth->acl_get('f_read', $row['forum_id']))
+ {
+ trigger_error('SORRY_AUTH_READ');
+ }
+
+ if (!$auth->acl_get('f_email', $row['forum_id']))
+ {
+ trigger_error('NO_EMAIL');
+ }
+ }
+ else
+ {
+ // If global announcement, we need to check if the user is able to at least read and email in one forum...
+ if (!$auth->acl_getf_global('f_read'))
+ {
+ trigger_error('SORRY_AUTH_READ');
+ }
+
+ if (!$auth->acl_getf_global('f_email'))
+ {
+ trigger_error('NO_EMAIL');
+ }
+ }
+ }
+ else
+ {
+ trigger_error('NO_EMAIL');
+ }
+
+ $error = array();
+
+ $name = utf8_normalize_nfc(request_var('name', '', true));
+ $email = request_var('email', '');
+ $email_lang = request_var('lang', $config['default_lang']);
+ $subject = utf8_normalize_nfc(request_var('subject', '', true));
+ $message = utf8_normalize_nfc(request_var('message', '', true));
+ $cc = (isset($_POST['cc_email'])) ? true : false;
+ $submit = (isset($_POST['submit'])) ? true : false;
+
+ if ($submit)
+ {
+ if (!check_form_key('memberlist_email'))
+ {
+ $error[] = 'FORM_INVALID';
+ }
+ if ($user_id)
+ {
+ if (!$subject)
+ {
+ $error[] = $user->lang['EMPTY_SUBJECT_EMAIL'];
+ }
+
+ if (!$message)
+ {
+ $error[] = $user->lang['EMPTY_MESSAGE_EMAIL'];
+ }
+
+ $name = $row['username'];
+ $email_lang = $row['user_lang'];
+ $email = $row['user_email'];
+ }
+ else
+ {
+ if (!$email || !preg_match('/^' . get_preg_expression('email') . '$/i', $email))
+ {
+ $error[] = $user->lang['EMPTY_ADDRESS_EMAIL'];
+ }
+
+ if (!$name)
+ {
+ $error[] = $user->lang['EMPTY_NAME_EMAIL'];
+ }
+ }
+
+ if (!sizeof($error))
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_emailtime = ' . time() . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+
+ include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ $messenger = new messenger(false);
+ $email_tpl = ($user_id) ? 'profile_send_email' : 'email_notify';
+
+ $mail_to_users = array();
+
+ $mail_to_users[] = array(
+ 'email_lang' => $email_lang,
+ 'email' => $email,
+ 'name' => $name,
+ 'username' => ($user_id) ? $row['username'] : '',
+ 'to_name' => $name,
+ 'user_jabber' => ($user_id) ? $row['user_jabber'] : '',
+ 'user_notify_type' => ($user_id) ? $row['user_notify_type'] : NOTIFY_EMAIL,
+ 'topic_title' => (!$user_id) ? $row['topic_title'] : '',
+ 'forum_id' => (!$user_id) ? $row['forum_id'] : 0,
+ );
+
+ // Ok, now the same email if CC specified, but without exposing the users email address
+ if ($cc)
+ {
+ $mail_to_users[] = array(
+ 'email_lang' => $user->data['user_lang'],
+ 'email' => $user->data['user_email'],
+ 'name' => $user->data['username'],
+ 'username' => $user->data['username'],
+ 'to_name' => $name,
+ 'user_jabber' => $user->data['user_jabber'],
+ 'user_notify_type' => ($user_id) ? $user->data['user_notify_type'] : NOTIFY_EMAIL,
+ 'topic_title' => (!$user_id) ? $row['topic_title'] : '',
+ 'forum_id' => (!$user_id) ? $row['forum_id'] : 0,
+ );
+ }
+
+ foreach ($mail_to_users as $row)
+ {
+ $messenger->template($email_tpl, $row['email_lang']);
+ $messenger->replyto($user->data['user_email']);
+ $messenger->to($row['email'], $row['name']);
+
+ if ($user_id)
+ {
+ $messenger->subject(htmlspecialchars_decode($subject));
+ $messenger->im($row['user_jabber'], $row['username']);
+ $notify_type = $row['user_notify_type'];
+ }
+ else
+ {
+ $notify_type = NOTIFY_EMAIL;
+ }
+
+ $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
+ $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
+ $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
+ $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
+
+ $messenger->assign_vars(array(
+ 'BOARD_CONTACT' => $config['board_contact'],
+ 'TO_USERNAME' => htmlspecialchars_decode($row['to_name']),
+ 'FROM_USERNAME' => htmlspecialchars_decode($user->data['username']),
+ 'MESSAGE' => htmlspecialchars_decode($message))
+ );
+
+ if ($topic_id)
+ {
+ $messenger->assign_vars(array(
+ 'TOPIC_NAME' => htmlspecialchars_decode($row['topic_title']),
+ 'U_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=" . $row['forum_id'] . "&t=$topic_id")
+ );
+ }
+
+ $messenger->send($notify_type);
+ }
+
+ meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
+ $message = ($user_id) ? sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>') : sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$row['forum_id']}&amp;t=$topic_id") . '">', '</a>');
+ trigger_error($user->lang['EMAIL_SENT'] . '<br /><br />' . $message);
+ }
+ }
+
+ if ($user_id)
+ {
+ $template->assign_vars(array(
+ 'S_SEND_USER' => true,
+ 'USERNAME' => $row['username'],
+
+ 'L_EMAIL_BODY_EXPLAIN' => $user->lang['EMAIL_BODY_EXPLAIN'],
+ 'S_POST_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&amp;u=' . $user_id))
+ );
+ }
+ else
+ {
+ $template->assign_vars(array(
+ 'EMAIL' => $email,
+ 'NAME' => $name,
+ 'S_LANG_OPTIONS' => language_select($email_lang),
+
+ 'L_EMAIL_BODY_EXPLAIN' => $user->lang['EMAIL_TOPIC_EXPLAIN'],
+ 'S_POST_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&amp;t=' . $topic_id))
+ );
+ }
+
+ $template->assign_vars(array(
+ 'ERROR_MESSAGE' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'SUBJECT' => $subject,
+ 'MESSAGE' => $message,
+ )
+ );
+
+ break;
+
+ case 'group':
+ default:
+ // The basic memberlist
+ $page_title = $user->lang['MEMBERLIST'];
+ $template_html = 'memberlist_body.html';
+
+ // Sorting
+ $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_LOCATION'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'f' => $user->lang['WEBSITE'], 'g' => $user->lang['ICQ'], 'h' => $user->lang['AIM'], 'i' => $user->lang['MSNM'], 'j' => $user->lang['YIM'], 'k' => $user->lang['JABBER']);
+ $sort_key_sql = array('a' => 'u.username_clean', 'b' => 'u.user_from', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'f' => 'u.user_website', 'g' => 'u.user_icq', 'h' => 'u.user_aim', 'i' => 'u.user_msnm', 'j' => 'u.user_yim', 'k' => 'u.user_jabber');
+
+ if ($auth->acl_get('a_user'))
+ {
+ $sort_key_text['e'] = $user->lang['SORT_EMAIL'];
+ $sort_key_sql['e'] = 'u.user_email';
+ }
+
+ if ($auth->acl_get('u_viewonline'))
+ {
+ $sort_key_text['l'] = $user->lang['SORT_LAST_ACTIVE'];
+ $sort_key_sql['l'] = 'u.user_lastvisit';
+ }
+
+ $sort_key_text['m'] = $user->lang['SORT_RANK'];
+ $sort_key_sql['m'] = 'u.user_rank';
+
+ $sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
+
+ $s_sort_key = '';
+ foreach ($sort_key_text as $key => $value)
+ {
+ $selected = ($sort_key == $key) ? ' selected="selected"' : '';
+ $s_sort_key .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
+ }
+
+ $s_sort_dir = '';
+ foreach ($sort_dir_text as $key => $value)
+ {
+ $selected = ($sort_dir == $key) ? ' selected="selected"' : '';
+ $s_sort_dir .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
+ }
+
+ // Additional sorting options for user search ... if search is enabled, if not
+ // then only admins can make use of this (for ACP functionality)
+ $sql_select = $sql_where_data = $sql_from = $sql_where = $order_by = '';
+
+
+ $form = request_var('form', '');
+ $field = request_var('field', '');
+ $select_single = request_var('select_single', false);
+
+ // Search URL parameters, if any of these are in the URL we do a search
+ $search_params = array('username', 'email', 'icq', 'aim', 'yahoo', 'msn', 'jabber', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip');
+
+ // We validate form and field here, only id/class allowed
+ $form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
+ $field = (!preg_match('/^[a-z0-9_-]+$/i', $field)) ? '' : $field;
+ if (($mode == 'searchuser' || sizeof(array_intersect(array_keys($_GET), $search_params)) > 0) && ($config['load_search'] || $auth->acl_get('a_')))
+ {
+ $username = request_var('username', '', true);
+ $email = strtolower(request_var('email', ''));
+ $icq = request_var('icq', '');
+ $aim = request_var('aim', '');
+ $yahoo = request_var('yahoo', '');
+ $msn = request_var('msn', '');
+ $jabber = request_var('jabber', '');
+ $search_group_id = request_var('search_group_id', 0);
+
+ $joined_select = request_var('joined_select', 'lt');
+ $active_select = request_var('active_select', 'lt');
+ $count_select = request_var('count_select', 'eq');
+ $joined = explode('-', request_var('joined', ''));
+ $active = explode('-', request_var('active', ''));
+ $count = (request_var('count', '') !== '') ? request_var('count', 0) : '';
+ $ipdomain = request_var('ip', '');
+
+ $find_key_match = array('lt' => '<', 'gt' => '>', 'eq' => '=');
+
+ $find_count = array('lt' => $user->lang['LESS_THAN'], 'eq' => $user->lang['EQUAL_TO'], 'gt' => $user->lang['MORE_THAN']);
+ $s_find_count = '';
+ foreach ($find_count as $key => $value)
+ {
+ $selected = ($count_select == $key) ? ' selected="selected"' : '';
+ $s_find_count .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
+ }
+
+ $find_time = array('lt' => $user->lang['BEFORE'], 'gt' => $user->lang['AFTER']);
+ $s_find_join_time = '';
+ foreach ($find_time as $key => $value)
+ {
+ $selected = ($joined_select == $key) ? ' selected="selected"' : '';
+ $s_find_join_time .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
+ }
+
+ $s_find_active_time = '';
+ foreach ($find_time as $key => $value)
+ {
+ $selected = ($active_select == $key) ? ' selected="selected"' : '';
+ $s_find_active_time .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
+ }
+
+ $sql_where .= ($username) ? ' AND u.username_clean ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($username))) : '';
+ $sql_where .= ($auth->acl_get('a_user') && $email) ? ' AND u.user_email ' . $db->sql_like_expression(str_replace('*', $db->any_char, $email)) . ' ' : '';
+ $sql_where .= ($icq) ? ' AND u.user_icq ' . $db->sql_like_expression(str_replace('*', $db->any_char, $icq)) . ' ' : '';
+ $sql_where .= ($aim) ? ' AND u.user_aim ' . $db->sql_like_expression(str_replace('*', $db->any_char, $aim)) . ' ' : '';
+ $sql_where .= ($yahoo) ? ' AND u.user_yim ' . $db->sql_like_expression(str_replace('*', $db->any_char, $yahoo)) . ' ' : '';
+ $sql_where .= ($msn) ? ' AND u.user_msnm ' . $db->sql_like_expression(str_replace('*', $db->any_char, $msn)) . ' ' : '';
+ $sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->any_char, $jabber)) . ' ' : '';
+ $sql_where .= (is_numeric($count)) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : '';
+ $sql_where .= (sizeof($joined) > 1) ? " AND u.user_regdate " . $find_key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, intval($joined[1]), intval($joined[2]), intval($joined[0])) : '';
+ $sql_where .= ($auth->acl_get('u_viewonline') && sizeof($active) > 1) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : '';
+ $sql_where .= ($search_group_id) ? " AND u.user_id = ug.user_id AND ug.group_id = $search_group_id AND ug.user_pending = 0 " : '';
+
+ if ($search_group_id)
+ {
+ $sql_from = ', ' . USER_GROUP_TABLE . ' ug ';
+ }
+
+ if ($ipdomain && $auth->acl_getf_global('m_info'))
+ {
+ if (strspn($ipdomain, 'abcdefghijklmnopqrstuvwxyz'))
+ {
+ $hostnames = gethostbynamel($ipdomain);
+
+ if ($hostnames !== false)
+ {
+ $ips = "'" . implode('\', \'', array_map(array($db, 'sql_escape'), preg_replace('#([0-9]{1,3}\.[0-9]{1,3}[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})#', "\\1", gethostbynamel($ipdomain)))) . "'";
+ }
+ else
+ {
+ $ips = false;
+ }
+ }
+ else
+ {
+ $ips = "'" . str_replace('*', '%', $db->sql_escape($ipdomain)) . "'";
+ }
+
+ if ($ips === false)
+ {
+ // A minor fudge but it does the job :D
+ $sql_where .= " AND u.user_id = 0";
+ }
+ else
+ {
+ $ip_forums = array_keys($auth->acl_getf('m_info', true));
+
+ $sql = 'SELECT DISTINCT poster_id
+ FROM ' . POSTS_TABLE . '
+ WHERE poster_ip ' . ((strpos($ips, '%') !== false) ? 'LIKE' : 'IN') . " ($ips)
+ AND forum_id IN (0, " . implode(', ', $ip_forums) . ')';
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $ip_sql = array();
+ do
+ {
+ $ip_sql[] = $row['poster_id'];
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ $sql_where .= ' AND ' . $db->sql_in_set('u.user_id', $ip_sql);
+ }
+ else
+ {
+ // A minor fudge but it does the job :D
+ $sql_where .= " AND u.user_id = 0";
+ }
+ unset($ip_forums);
+
+ $db->sql_freeresult($result);
+ }
+ }
+ }
+
+ $first_char = request_var('first_char', '');
+
+ if ($first_char == 'other')
+ {
+ for ($i = 97; $i < 123; $i++)
+ {
+ $sql_where .= ' AND u.username_clean NOT ' . $db->sql_like_expression(chr($i) . $db->any_char);
+ }
+ }
+ else if ($first_char)
+ {
+ $sql_where .= ' AND u.username_clean ' . $db->sql_like_expression(substr($first_char, 0, 1) . $db->any_char);
+ }
+
+ // Are we looking at a usergroup? If so, fetch additional info
+ // and further restrict the user info query
+ if ($mode == 'group')
+ {
+ // We JOIN here to save a query for determining membership for hidden groups. ;)
+ $sql = 'SELECT g.*, ug.user_id
+ FROM ' . GROUPS_TABLE . ' g
+ LEFT JOIN ' . USER_GROUP_TABLE . ' ug ON (ug.user_pending = 0 AND ug.user_id = ' . $user->data['user_id'] . " AND ug.group_id = $group_id)
+ WHERE g.group_id = $group_id";
+ $result = $db->sql_query($sql);
+ $group_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$group_row)
+ {
+ trigger_error('NO_GROUP');
+ }
+
+ switch ($group_row['group_type'])
+ {
+ case GROUP_OPEN:
+ $group_row['l_group_type'] = 'OPEN';
+ break;
+
+ case GROUP_CLOSED:
+ $group_row['l_group_type'] = 'CLOSED';
+ break;
+
+ case GROUP_HIDDEN:
+ $group_row['l_group_type'] = 'HIDDEN';
+
+ // Check for membership or special permissions
+ if (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $group_row['user_id'] != $user->data['user_id'])
+ {
+ trigger_error('NO_GROUP');
+ }
+ break;
+
+ case GROUP_SPECIAL:
+ $group_row['l_group_type'] = 'SPECIAL';
+ break;
+
+ case GROUP_FREE:
+ $group_row['l_group_type'] = 'FREE';
+ break;
+ }
+
+ // Misusing the avatar function for displaying group avatars...
+ $avatar_img = get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR');
+
+ $rank_title = $rank_img = $rank_img_src = '';
+ if ($group_row['group_rank'])
+ {
+ if (isset($ranks['special'][$group_row['group_rank']]))
+ {
+ $rank_title = $ranks['special'][$group_row['group_rank']]['rank_title'];
+ }
+ $rank_img = (!empty($ranks['special'][$group_row['group_rank']]['rank_image'])) ? '<img src="' . $config['ranks_path'] . '/' . $ranks['special'][$group_row['group_rank']]['rank_image'] . '" alt="' . $ranks['special'][$group_row['group_rank']]['rank_title'] . '" title="' . $ranks['special'][$group_row['group_rank']]['rank_title'] . '" /><br />' : '';
+ $rank_img_src = (!empty($ranks['special'][$group_row['group_rank']]['rank_image'])) ? $config['ranks_path'] . '/' . $ranks['special'][$group_row['group_rank']]['rank_image'] : '';
+ }
+ else
+ {
+ $rank_title = '';
+ $rank_img = '';
+ $rank_img_src = '';
+ }
+
+ $template->assign_vars(array(
+ 'GROUP_DESC' => generate_text_for_display($group_row['group_desc'], $group_row['group_desc_uid'], $group_row['group_desc_bitfield'], $group_row['group_desc_options']),
+ 'GROUP_NAME' => ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'],
+ 'GROUP_COLOR' => $group_row['group_colour'],
+ 'GROUP_TYPE' => $user->lang['GROUP_IS_' . $group_row['l_group_type']],
+ 'GROUP_RANK' => $rank_title,
+
+ 'AVATAR_IMG' => $avatar_img,
+ 'RANK_IMG' => $rank_img,
+ 'RANK_IMG_SRC' => $rank_img_src,
+
+ 'U_PM' => ($auth->acl_get('u_sendpm') && $auth->acl_get('u_masspm_group') && $group_row['group_receive_pm'] && $config['allow_privmsg'] && $config['allow_mass_pm']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;g=' . $group_id) : '',)
+ );
+
+ $sql_select = ', ug.group_leader';
+ $sql_from = ', ' . USER_GROUP_TABLE . ' ug ';
+ $order_by = 'ug.group_leader DESC, ';
+
+ $sql_where .= " AND ug.user_pending = 0 AND u.user_id = ug.user_id AND ug.group_id = $group_id";
+ $sql_where_data = " AND u.user_id = ug.user_id AND ug.group_id = $group_id";
+ }
+
+ // Sorting and order
+ if (!isset($sort_key_sql[$sort_key]))
+ {
+ $sort_key = $default_key;
+ }
+
+ $order_by .= $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
+
+ // Unfortunately we must do this here for sorting by rank, else the sort order is applied wrongly
+ if ($sort_key == 'm')
+ {
+ $order_by .= ', u.user_posts DESC';
+ }
+
+ // Count the users ...
+ if ($sql_where)
+ {
+ $sql = 'SELECT COUNT(u.user_id) AS total_users
+ FROM ' . USERS_TABLE . " u$sql_from
+ WHERE u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ")
+ $sql_where";
+ $result = $db->sql_query($sql);
+ $total_users = (int) $db->sql_fetchfield('total_users');
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $total_users = $config['num_users'];
+ }
+
+ $s_char_options = '<option value=""' . ((!$first_char) ? ' selected="selected"' : '') . '>&nbsp; &nbsp;</option>';
+ for ($i = 97; $i < 123; $i++)
+ {
+ $s_char_options .= '<option value="' . chr($i) . '"' . (($first_char == chr($i)) ? ' selected="selected"' : '') . '>' . chr($i-32) . '</option>';
+ }
+ $s_char_options .= '<option value="other"' . (($first_char == 'other') ? ' selected="selected"' : '') . '>' . $user->lang['OTHER'] . '</option>';
+
+ // Build a relevant pagination_url
+ $params = $sort_params = array();
+
+ // We do not use request_var() here directly to save some calls (not all variables are set)
+ $check_params = array(
+ 'g' => array('g', 0),
+ 'sk' => array('sk', $default_key),
+ 'sd' => array('sd', 'a'),
+ 'form' => array('form', ''),
+ 'field' => array('field', ''),
+ 'select_single' => array('select_single', $select_single),
+ 'username' => array('username', '', true),
+ 'email' => array('email', ''),
+ 'icq' => array('icq', ''),
+ 'aim' => array('aim', ''),
+ 'yahoo' => array('yahoo', ''),
+ 'msn' => array('msn', ''),
+ 'jabber' => array('jabber', ''),
+ 'search_group_id' => array('search_group_id', 0),
+ 'joined_select' => array('joined_select', 'lt'),
+ 'active_select' => array('active_select', 'lt'),
+ 'count_select' => array('count_select', 'eq'),
+ 'joined' => array('joined', ''),
+ 'active' => array('active', ''),
+ 'count' => (request_var('count', '') !== '') ? array('count', 0) : array('count', ''),
+ 'ip' => array('ip', ''),
+ 'first_char' => array('first_char', ''),
+ );
+
+ foreach ($check_params as $key => $call)
+ {
+ if (!isset($_REQUEST[$key]))
+ {
+ continue;
+ }
+
+ $param = call_user_func_array('request_var', $call);
+ $param = urlencode($key) . '=' . ((is_string($param)) ? urlencode($param) : $param);
+ $params[] = $param;
+
+ if ($key != 'sk' && $key != 'sd')
+ {
+ $sort_params[] = $param;
+ }
+ }
+
+ $u_hide_find_member = append_sid("{$phpbb_root_path}memberlist.$phpEx", "start=$start" . (!empty($params) ? '&amp;' . implode('&amp;', $params) : ''));
+
+ if ($mode)
+ {
+ $params[] = "mode=$mode";
+ }
+ $sort_params[] = "mode=$mode";
+
+ $pagination_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", implode('&amp;', $params));
+ $sort_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", implode('&amp;', $sort_params));
+
+ unset($search_params, $sort_params);
+
+ // Some search user specific data
+ if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_')))
+ {
+ $group_selected = request_var('search_group_id', 0);
+ $s_group_select = '<option value="0"' . ((!$group_selected) ? ' selected="selected"' : '') . '>&nbsp;</option>';
+ $group_ids = array();
+
+ /**
+ * @todo add this to a separate function (function is responsible for returning the groups the user is able to see based on the users group membership)
+ */
+
+ if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
+ {
+ $sql = 'SELECT group_id, group_name, group_type
+ FROM ' . GROUPS_TABLE;
+
+ if (!$config['coppa_enable'])
+ {
+ $sql .= " WHERE group_name <> 'REGISTERED_COPPA'";
+ }
+
+ $sql .= ' ORDER BY group_name ASC';
+ }
+ else
+ {
+ $sql = 'SELECT g.group_id, g.group_name, g.group_type
+ FROM ' . GROUPS_TABLE . ' g
+ LEFT JOIN ' . USER_GROUP_TABLE . ' ug
+ ON (
+ g.group_id = ug.group_id
+ AND ug.user_id = ' . $user->data['user_id'] . '
+ AND ug.user_pending = 0
+ )
+ WHERE (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')';
+
+ if (!$config['coppa_enable'])
+ {
+ $sql .= " AND g.group_name <> 'REGISTERED_COPPA'";
+ }
+
+ $sql .= ' ORDER BY g.group_name ASC';
+ }
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $group_ids[] = $row['group_id'];
+ $s_group_select .= '<option value="' . $row['group_id'] . '"' . (($group_selected == $row['group_id']) ? ' selected="selected"' : '') . '>' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
+ }
+ $db->sql_freeresult($result);
+
+ if ($group_selected !== 0 && !in_array($group_selected, $group_ids))
+ {
+ trigger_error('NO_GROUP');
+ }
+
+ $template->assign_vars(array(
+ 'USERNAME' => $username,
+ 'EMAIL' => $email,
+ 'ICQ' => $icq,
+ 'AIM' => $aim,
+ 'YAHOO' => $yahoo,
+ 'MSNM' => $msn,
+ 'JABBER' => $jabber,
+ 'JOINED' => implode('-', $joined),
+ 'ACTIVE' => implode('-', $active),
+ 'COUNT' => $count,
+ 'IP' => $ipdomain,
+
+ 'S_IP_SEARCH_ALLOWED' => ($auth->acl_getf_global('m_info')) ? true : false,
+ 'S_EMAIL_SEARCH_ALLOWED'=> ($auth->acl_get('a_user')) ? true : false,
+ 'S_IN_SEARCH_POPUP' => ($form && $field) ? true : false,
+ 'S_SEARCH_USER' => true,
+ 'S_FORM_NAME' => $form,
+ 'S_FIELD_NAME' => $field,
+ 'S_SELECT_SINGLE' => $select_single,
+ 'S_COUNT_OPTIONS' => $s_find_count,
+ 'S_SORT_OPTIONS' => $s_sort_key,
+ 'S_JOINED_TIME_OPTIONS' => $s_find_join_time,
+ 'S_ACTIVE_TIME_OPTIONS' => $s_find_active_time,
+ 'S_GROUP_SELECT' => $s_group_select,
+ 'S_USER_SEARCH_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&amp;form=$form&amp;field=$field"))
+ );
+ }
+
+ // Get us some users :D
+ $sql = "SELECT u.user_id
+ FROM " . USERS_TABLE . " u
+ $sql_from
+ WHERE u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ")
+ $sql_where
+ ORDER BY $order_by";
+ $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
+
+ $user_list = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $user_list[] = (int) $row['user_id'];
+ }
+ $db->sql_freeresult($result);
+ $leaders_set = false;
+ // So, did we get any users?
+ if (sizeof($user_list))
+ {
+ // Session time?! Session time...
+ $sql = 'SELECT session_user_id, MAX(session_time) AS session_time
+ FROM ' . SESSIONS_TABLE . '
+ WHERE session_time >= ' . (time() - $config['session_length']) . '
+ AND ' . $db->sql_in_set('session_user_id', $user_list) . '
+ GROUP BY session_user_id';
+ $result = $db->sql_query($sql);
+
+ $session_times = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $session_times[$row['session_user_id']] = $row['session_time'];
+ }
+ $db->sql_freeresult($result);
+
+ // Do the SQL thang
+ if ($mode == 'group')
+ {
+ $sql = "SELECT u.*
+ $sql_select
+ FROM " . USERS_TABLE . " u
+ $sql_from
+ WHERE " . $db->sql_in_set('u.user_id', $user_list) . "
+ $sql_where_data";
+ }
+ else
+ {
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $user_list);
+ }
+ $result = $db->sql_query($sql);
+
+ $id_cache = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $row['session_time'] = (!empty($session_times[$row['user_id']])) ? $session_times[$row['user_id']] : 0;
+ $row['last_visit'] = (!empty($row['session_time'])) ? $row['session_time'] : $row['user_lastvisit'];
+
+ $id_cache[$row['user_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ // Load custom profile fields
+ if ($config['load_cpf_memberlist'])
+ {
+ include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
+ $cp = new custom_profile();
+
+ // Grab all profile fields from users in id cache for later use - similar to the poster cache
+ $profile_fields_cache = $cp->generate_profile_fields_template('grab', $user_list);
+ }
+
+ // If we sort by last active date we need to adjust the id cache due to user_lastvisit not being the last active date...
+ if ($sort_key == 'l')
+ {
+// uasort($id_cache, create_function('$first, $second', "return (\$first['last_visit'] == \$second['last_visit']) ? 0 : ((\$first['last_visit'] < \$second['last_visit']) ? $lesser_than : ($lesser_than * -1));"));
+ usort($user_list, '_sort_last_active');
+ }
+
+ for ($i = 0, $end = sizeof($user_list); $i < $end; ++$i)
+ {
+ $user_id = $user_list[$i];
+ $row =& $id_cache[$user_id];
+ $is_leader = (isset($row['group_leader']) && $row['group_leader']) ? true : false;
+ $leaders_set = ($leaders_set || $is_leader);
+
+ $cp_row = array();
+ if ($config['load_cpf_memberlist'])
+ {
+ $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template('show', false, $profile_fields_cache[$user_id]) : array();
+ }
+
+ $memberrow = array_merge(show_profile($row), array(
+ 'ROW_NUMBER' => $i + ($start + 1),
+
+ 'S_CUSTOM_PROFILE' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false,
+ 'S_GROUP_LEADER' => $is_leader,
+
+ 'U_VIEW_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $user_id))
+ );
+
+ if (isset($cp_row['row']) && sizeof($cp_row['row']))
+ {
+ $memberrow = array_merge($memberrow, $cp_row['row']);
+ }
+
+ $template->assign_block_vars('memberrow', $memberrow);
+
+ if (isset($cp_row['blockrow']) && sizeof($cp_row['blockrow']))
+ {
+ foreach ($cp_row['blockrow'] as $field_data)
+ {
+ $template->assign_block_vars('memberrow.custom_fields', $field_data);
+ }
+ }
+
+ unset($id_cache[$user_id]);
+ }
+ }
+
+ // Generate page
+ $template->assign_vars(array(
+ 'PAGINATION' => generate_pagination($pagination_url, $total_users, $config['topics_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($total_users, $config['topics_per_page'], $start),
+ 'TOTAL_USERS' => ($total_users == 1) ? $user->lang['LIST_USER'] : sprintf($user->lang['LIST_USERS'], $total_users),
+
+ 'PROFILE_IMG' => $user->img('icon_user_profile', $user->lang['PROFILE']),
+ 'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']),
+ 'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']),
+ 'WWW_IMG' => $user->img('icon_contact_www', $user->lang['WWW']),
+ 'ICQ_IMG' => $user->img('icon_contact_icq', $user->lang['ICQ']),
+ 'AIM_IMG' => $user->img('icon_contact_aim', $user->lang['AIM']),
+ 'MSN_IMG' => $user->img('icon_contact_msnm', $user->lang['MSNM']),
+ 'YIM_IMG' => $user->img('icon_contact_yahoo', $user->lang['YIM']),
+ 'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']),
+ 'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
+
+ 'U_FIND_MEMBER' => ($config['load_search'] || $auth->acl_get('a_')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser' . (($start) ? "&amp;start=$start" : '') . (!empty($params) ? '&amp;' . implode('&amp;', $params) : '')) : '',
+ 'U_HIDE_FIND_MEMBER' => ($mode == 'searchuser') ? $u_hide_find_member : '',
+ 'U_SORT_USERNAME' => $sort_url . '&amp;sk=a&amp;sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_FROM' => $sort_url . '&amp;sk=b&amp;sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_JOINED' => $sort_url . '&amp;sk=c&amp;sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_POSTS' => $sort_url . '&amp;sk=d&amp;sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_EMAIL' => $sort_url . '&amp;sk=e&amp;sd=' . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_WEBSITE' => $sort_url . '&amp;sk=f&amp;sd=' . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_LOCATION' => $sort_url . '&amp;sk=b&amp;sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_ICQ' => $sort_url . '&amp;sk=g&amp;sd=' . (($sort_key == 'g' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_AIM' => $sort_url . '&amp;sk=h&amp;sd=' . (($sort_key == 'h' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_MSN' => $sort_url . '&amp;sk=i&amp;sd=' . (($sort_key == 'i' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_YIM' => $sort_url . '&amp;sk=j&amp;sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_ACTIVE' => ($auth->acl_get('u_viewonline')) ? $sort_url . '&amp;sk=l&amp;sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a') : '',
+ 'U_SORT_RANK' => $sort_url . '&amp;sk=m&amp;sd=' . (($sort_key == 'm' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_LIST_CHAR' => $sort_url . '&amp;sk=a&amp;sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'),
+
+ 'S_SHOW_GROUP' => ($mode == 'group') ? true : false,
+ 'S_VIEWONLINE' => $auth->acl_get('u_viewonline'),
+ 'S_LEADERS_SET' => $leaders_set,
+ 'S_MODE_SELECT' => $s_sort_key,
+ 'S_ORDER_SELECT' => $s_sort_dir,
+ 'S_CHAR_OPTIONS' => $s_char_options,
+ 'S_MODE_ACTION' => $pagination_url)
+ );
+}
+
+// Output the page
+page_header($page_title, false);
+
+$template->set_filenames(array(
+ 'body' => $template_html)
+);
+make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
+
+page_footer();
+
+/**
+* Prepare profile data
+*/
+function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = false)
+{
+ global $config, $auth, $template, $user, $phpEx, $phpbb_root_path;
+
+ $username = $data['username'];
+ $user_id = $data['user_id'];
+
+ $rank_title = $rank_img = $rank_img_src = '';
+ get_user_rank($data['user_rank'], (($user_id == ANONYMOUS) ? false : $data['user_posts']), $rank_title, $rank_img, $rank_img_src);
+
+ if (!empty($data['user_allow_viewemail']) || $auth->acl_get('a_user'))
+ {
+ $email = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&amp;u=' . $user_id) : (($config['board_hide_emails'] && !$auth->acl_get('a_user')) ? '' : 'mailto:' . $data['user_email']);
+ }
+ else
+ {
+ $email = '';
+ }
+
+ if ($config['load_onlinetrack'])
+ {
+ $update_time = $config['load_online_time'] * 60;
+ $online = (time() - $update_time < $data['session_time'] && ((isset($data['session_viewonline']) && $data['session_viewonline']) || $auth->acl_get('u_viewonline'))) ? true : false;
+ }
+ else
+ {
+ $online = false;
+ }
+
+ if ($data['user_allow_viewonline'] || $auth->acl_get('u_viewonline'))
+ {
+ $last_visit = (!empty($data['session_time'])) ? $data['session_time'] : $data['user_lastvisit'];
+ }
+ else
+ {
+ $last_visit = '';
+ }
+
+ $age = '';
+
+ if ($config['allow_birthdays'] && $data['user_birthday'])
+ {
+ list($bday_day, $bday_month, $bday_year) = array_map('intval', explode('-', $data['user_birthday']));
+
+ if ($bday_year)
+ {
+ $now = getdate(time() + $user->timezone + $user->dst - date('Z'));
+
+ $diff = $now['mon'] - $bday_month;
+ if ($diff == 0)
+ {
+ $diff = ($now['mday'] - $bday_day < 0) ? 1 : 0;
+ }
+ else
+ {
+ $diff = ($diff < 0) ? 1 : 0;
+ }
+
+ $age = (int) ($now['year'] - $bday_year - $diff);
+ }
+ }
+
+ // Dump it out to the template
+ return array(
+ 'AGE' => $age,
+ 'RANK_TITLE' => $rank_title,
+ 'JOINED' => $user->format_date($data['user_regdate']),
+ 'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit),
+ 'POSTS' => ($data['user_posts']) ? $data['user_posts'] : 0,
+ 'WARNINGS' => isset($data['user_warnings']) ? $data['user_warnings'] : 0,
+
+ 'USERNAME_FULL' => get_username_string('full', $user_id, $username, $data['user_colour']),
+ 'USERNAME' => get_username_string('username', $user_id, $username, $data['user_colour']),
+ 'USER_COLOR' => get_username_string('colour', $user_id, $username, $data['user_colour']),
+ 'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $username, $data['user_colour']),
+
+ 'A_USERNAME' => addslashes(get_username_string('username', $user_id, $username, $data['user_colour'])),
+
+ 'AVATAR_IMG' => get_user_avatar($data['user_avatar'], $data['user_avatar_type'], $data['user_avatar_width'], $data['user_avatar_height']),
+ 'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : (($online) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
+ 'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false,
+ 'RANK_IMG' => $rank_img,
+ 'RANK_IMG_SRC' => $rank_img_src,
+ 'ICQ_STATUS_IMG' => (!empty($data['user_icq'])) ? '<img src="http://web.icq.com/whitepages/online?icq=' . $data['user_icq'] . '&amp;img=5" width="18" height="18" />' : '',
+ 'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false,
+
+ 'S_WARNINGS' => ($auth->acl_getf_global('m_') || $auth->acl_get('m_warn')) ? true : false,
+
+ 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$user_id&amp;sr=posts") : '',
+ 'U_NOTES' => ($user_notes_enabled && $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $user_id, true, $user->session_id) : '',
+ 'U_WARN' => ($warn_user_enabled && $auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $user_id, true, $user->session_id) : '',
+ 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($data['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $user_id) : '',
+ 'U_EMAIL' => $email,
+ 'U_WWW' => (!empty($data['user_website'])) ? $data['user_website'] : '',
+ 'U_SHORT_WWW' => (!empty($data['user_website'])) ? ((strlen($data['user_website']) > 55) ? substr($data['user_website'], 0, 39) . ' ... ' . substr($data['user_website'], -10) : $data['user_website']) : '',
+ 'U_ICQ' => ($data['user_icq']) ? 'http://www.icq.com/people/webmsg.php?to=' . urlencode($data['user_icq']) : '',
+ 'U_AIM' => ($data['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=aim&amp;u=' . $user_id) : '',
+ 'U_YIM' => ($data['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($data['user_yim']) . '&amp;.src=pg' : '',
+ 'U_MSN' => ($data['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=msnm&amp;u=' . $user_id) : '',
+ 'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=jabber&amp;u=' . $user_id) : '',
+ 'LOCATION' => ($data['user_from']) ? $data['user_from'] : '',
+
+ 'USER_ICQ' => $data['user_icq'],
+ 'USER_AIM' => $data['user_aim'],
+ 'USER_YIM' => $data['user_yim'],
+ 'USER_MSN' => $data['user_msnm'],
+ 'USER_JABBER' => $data['user_jabber'],
+ 'USER_JABBER_IMG' => ($data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
+
+ 'L_VIEWING_PROFILE' => sprintf($user->lang['VIEWING_PROFILE'], $username),
+ );
+}
+
+function _sort_last_active($first, $second)
+{
+ global $id_cache, $sort_dir;
+
+ $lesser_than = ($sort_dir === 'd') ? -1 : 1;
+
+ if (isset($id_cache[$first]['group_leader']) && $id_cache[$first]['group_leader'] && (!isset($id_cache[$second]['group_leader']) || !$id_cache[$second]['group_leader']))
+ {
+ return -1;
+ }
+ else if (isset($id_cache[$second]['group_leader']) && (!isset($id_cache[$first]['group_leader']) || !$id_cache[$first]['group_leader']) && $id_cache[$second]['group_leader'])
+ {
+ return 1;
+ }
+ else
+ {
+ return $lesser_than * (int) ($id_cache[$first]['last_visit'] - $id_cache[$second]['last_visit']);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/posting.php b/phpBB/posting.php
new file mode 100644
index 0000000000..1c7cd95b81
--- /dev/null
+++ b/phpBB/posting.php
@@ -0,0 +1,1592 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
+
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+
+
+// Grab only parameters needed here
+$post_id = request_var('p', 0);
+$topic_id = request_var('t', 0);
+$forum_id = request_var('f', 0);
+$draft_id = request_var('d', 0);
+$lastclick = request_var('lastclick', 0);
+
+$submit = (isset($_POST['post'])) ? true : false;
+$preview = (isset($_POST['preview'])) ? true : false;
+$save = (isset($_POST['save'])) ? true : false;
+$load = (isset($_POST['load'])) ? true : false;
+$delete = (isset($_POST['delete'])) ? true : false;
+$cancel = (isset($_POST['cancel']) && !isset($_POST['save'])) ? true : false;
+
+$refresh = (isset($_POST['add_file']) || isset($_POST['delete_file']) || isset($_POST['full_editor']) || isset($_POST['cancel_unglobalise']) || $save || $load) ? true : false;
+$mode = ($delete && !$preview && !$refresh && $submit) ? 'delete' : request_var('mode', '');
+
+$error = $post_data = array();
+$current_time = time();
+
+if ($config['enable_post_confirm'] && !$user->data['is_registered'])
+{
+ include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
+ $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $captcha->init(CONFIRM_POST);
+}
+
+// Was cancel pressed? If so then redirect to the appropriate page
+if ($cancel || ($current_time - $lastclick < 2 && $submit))
+{
+ $f = ($forum_id) ? 'f=' . $forum_id . '&amp;' : '';
+ $redirect = ($post_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $f . 'p=' . $post_id) . '#p' . $post_id : (($topic_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $f . 't=' . $topic_id) : (($forum_id) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) : append_sid("{$phpbb_root_path}index.$phpEx")));
+ redirect($redirect);
+}
+
+if (in_array($mode, array('post', 'reply', 'quote', 'edit', 'delete')) && !$forum_id)
+{
+ trigger_error('NO_FORUM');
+}
+
+// We need to know some basic information in all cases before we do anything.
+switch ($mode)
+{
+ case 'post':
+ $sql = 'SELECT *
+ FROM ' . FORUMS_TABLE . "
+ WHERE forum_id = $forum_id";
+ break;
+
+ case 'bump':
+ case 'reply':
+ if (!$topic_id)
+ {
+ trigger_error('NO_TOPIC');
+ }
+
+ // Force forum id
+ $sql = 'SELECT forum_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_id = ' . $topic_id;
+ $result = $db->sql_query($sql);
+ $f_id = (int) $db->sql_fetchfield('forum_id');
+ $db->sql_freeresult($result);
+
+ $forum_id = (!$f_id) ? $forum_id : $f_id;
+
+ $sql = 'SELECT f.*, t.*
+ FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f
+ WHERE t.topic_id = $topic_id
+ AND (f.forum_id = t.forum_id
+ OR f.forum_id = $forum_id)
+ AND t.topic_approved = 1";
+ break;
+
+ case 'quote':
+ case 'edit':
+ case 'delete':
+ if (!$post_id)
+ {
+ $user->setup('posting');
+ trigger_error('NO_POST');
+ }
+
+ // Force forum id
+ $sql = 'SELECT forum_id
+ FROM ' . POSTS_TABLE . '
+ WHERE post_id = ' . $post_id;
+ $result = $db->sql_query($sql);
+ $f_id = (int) $db->sql_fetchfield('forum_id');
+ $db->sql_freeresult($result);
+
+ $forum_id = (!$f_id) ? $forum_id : $f_id;
+
+ $sql = 'SELECT f.*, t.*, p.*, u.username, u.username_clean, u.user_sig, u.user_sig_bbcode_uid, u.user_sig_bbcode_bitfield
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f, ' . USERS_TABLE . " u
+ WHERE p.post_id = $post_id
+ AND t.topic_id = p.topic_id
+ AND u.user_id = p.poster_id
+ AND (f.forum_id = t.forum_id
+ OR f.forum_id = $forum_id)" .
+ (($auth->acl_get('m_approve', $forum_id) && $mode != 'quote') ? '' : 'AND p.post_approved = 1');
+ break;
+
+ case 'smilies':
+ $sql = '';
+ generate_smilies('window', $forum_id);
+ break;
+
+ case 'popup':
+ if ($forum_id)
+ {
+ $sql = 'SELECT forum_style
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $forum_id;
+ }
+ else
+ {
+ upload_popup();
+ return;
+ }
+ break;
+
+ default:
+ $sql = '';
+ break;
+}
+
+if (!$sql)
+{
+ $user->setup('posting');
+ trigger_error('NO_POST_MODE');
+}
+
+$result = $db->sql_query($sql);
+$post_data = $db->sql_fetchrow($result);
+$db->sql_freeresult($result);
+
+if (!$post_data)
+{
+ if (!($mode == 'post' || $mode == 'bump' || $mode == 'reply'))
+ {
+ $user->setup('posting');
+ }
+ trigger_error(($mode == 'post' || $mode == 'bump' || $mode == 'reply') ? 'NO_TOPIC' : 'NO_POST');
+}
+
+if ($mode == 'popup')
+{
+ upload_popup($post_data['forum_style']);
+ return;
+}
+
+$user->setup(array('posting', 'mcp', 'viewtopic'), $post_data['forum_style']);
+
+// Use post_row values in favor of submitted ones...
+$forum_id = (!empty($post_data['forum_id'])) ? (int) $post_data['forum_id'] : (int) $forum_id;
+$topic_id = (!empty($post_data['topic_id'])) ? (int) $post_data['topic_id'] : (int) $topic_id;
+$post_id = (!empty($post_data['post_id'])) ? (int) $post_data['post_id'] : (int) $post_id;
+
+// Need to login to passworded forum first?
+if ($post_data['forum_password'])
+{
+ login_forum_box(array(
+ 'forum_id' => $forum_id,
+ 'forum_password' => $post_data['forum_password'])
+ );
+}
+
+// Check permissions
+if ($user->data['is_bot'])
+{
+ redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
+}
+
+// Is the user able to read within this forum?
+if (!$auth->acl_get('f_read', $forum_id))
+{
+ if ($user->data['user_id'] != ANONYMOUS)
+ {
+ trigger_error('USER_CANNOT_READ');
+ }
+
+ login_box('', $user->lang['LOGIN_EXPLAIN_POST']);
+}
+
+// Permission to do the action asked?
+$is_authed = false;
+
+switch ($mode)
+{
+ case 'post':
+ if ($auth->acl_get('f_post', $forum_id))
+ {
+ $is_authed = true;
+ }
+ break;
+
+ case 'bump':
+ if ($auth->acl_get('f_bump', $forum_id))
+ {
+ $is_authed = true;
+ }
+ break;
+
+ case 'quote':
+
+ $post_data['post_edit_locked'] = 0;
+
+ // no break;
+
+ case 'reply':
+ if ($auth->acl_get('f_reply', $forum_id))
+ {
+ $is_authed = true;
+ }
+ break;
+
+ case 'edit':
+ if ($user->data['is_registered'] && $auth->acl_gets('f_edit', 'm_edit', $forum_id))
+ {
+ $is_authed = true;
+ }
+ break;
+
+ case 'delete':
+ if ($user->data['is_registered'] && $auth->acl_gets('f_delete', 'm_delete', $forum_id))
+ {
+ $is_authed = true;
+ }
+ break;
+}
+
+if (!$is_authed)
+{
+ $check_auth = ($mode == 'quote') ? 'reply' : $mode;
+
+ if ($user->data['is_registered'])
+ {
+ trigger_error('USER_CANNOT_' . strtoupper($check_auth));
+ }
+
+ login_box('', $user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)]);
+}
+
+// Is the user able to post within this forum?
+if ($post_data['forum_type'] != FORUM_POST && in_array($mode, array('post', 'bump', 'quote', 'reply')))
+{
+ trigger_error('USER_CANNOT_FORUM_POST');
+}
+
+// Forum/Topic locked?
+if (($post_data['forum_status'] == ITEM_LOCKED || (isset($post_data['topic_status']) && $post_data['topic_status'] == ITEM_LOCKED)) && !$auth->acl_get('m_edit', $forum_id))
+{
+ trigger_error(($post_data['forum_status'] == ITEM_LOCKED) ? 'FORUM_LOCKED' : 'TOPIC_LOCKED');
+}
+
+// Can we edit this post ... if we're a moderator with rights then always yes
+// else it depends on editing times, lock status and if we're the correct user
+if ($mode == 'edit' && !$auth->acl_get('m_edit', $forum_id))
+{
+ if ($user->data['user_id'] != $post_data['poster_id'])
+ {
+ trigger_error('USER_CANNOT_EDIT');
+ }
+
+ if (!($post_data['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time']))
+ {
+ trigger_error('CANNOT_EDIT_TIME');
+ }
+
+ if ($post_data['post_edit_locked'])
+ {
+ trigger_error('CANNOT_EDIT_POST_LOCKED');
+ }
+}
+
+// Handle delete mode...
+if ($mode == 'delete')
+{
+ handle_post_delete($forum_id, $topic_id, $post_id, $post_data);
+ return;
+}
+
+// Handle bump mode...
+if ($mode == 'bump')
+{
+ if ($bump_time = bump_topic_allowed($forum_id, $post_data['topic_bumped'], $post_data['topic_last_post_time'], $post_data['topic_poster'], $post_data['topic_last_poster_id'])
+ && check_link_hash(request_var('hash', ''), "topic_{$post_data['topic_id']}"))
+ {
+ $db->sql_transaction('begin');
+
+ $sql = 'UPDATE ' . POSTS_TABLE . "
+ SET post_time = $current_time
+ WHERE post_id = {$post_data['topic_last_post_id']}
+ AND topic_id = $topic_id";
+ $db->sql_query($sql);
+
+ $sql = 'UPDATE ' . TOPICS_TABLE . "
+ SET topic_last_post_time = $current_time,
+ topic_bumped = 1,
+ topic_bumper = " . $user->data['user_id'] . "
+ WHERE topic_id = $topic_id";
+ $db->sql_query($sql);
+
+ update_post_information('forum', $forum_id);
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_lastpost_time = $current_time
+ WHERE user_id = " . $user->data['user_id'];
+ $db->sql_query($sql);
+
+ $db->sql_transaction('commit');
+
+ markread('post', $forum_id, $topic_id, $current_time);
+
+ add_log('mod', $forum_id, $topic_id, 'LOG_BUMP_TOPIC', $post_data['topic_title']);
+
+ $meta_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p={$post_data['topic_last_post_id']}") . "#p{$post_data['topic_last_post_id']}";
+ meta_refresh(3, $meta_url);
+
+ $message = $user->lang['TOPIC_BUMPED'] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $meta_url . '">', '</a>');
+ $message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
+
+ trigger_error($message);
+ }
+
+ trigger_error('BUMP_ERROR');
+}
+
+// Subject length limiting to 60 characters if first post...
+if ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_data['post_id']))
+{
+ $template->assign_var('S_NEW_MESSAGE', true);
+}
+
+// Determine some vars
+if (isset($post_data['poster_id']) && $post_data['poster_id'] == ANONYMOUS)
+{
+ $post_data['quote_username'] = (!empty($post_data['post_username'])) ? $post_data['post_username'] : $user->lang['GUEST'];
+}
+else
+{
+ $post_data['quote_username'] = isset($post_data['username']) ? $post_data['username'] : '';
+}
+
+$post_data['post_edit_locked'] = (isset($post_data['post_edit_locked'])) ? (int) $post_data['post_edit_locked'] : 0;
+$post_data['post_subject_md5'] = (isset($post_data['post_subject']) && $mode == 'edit') ? md5($post_data['post_subject']) : '';
+$post_data['post_subject'] = (in_array($mode, array('quote', 'edit'))) ? $post_data['post_subject'] : ((isset($post_data['topic_title'])) ? $post_data['topic_title'] : '');
+$post_data['topic_time_limit'] = (isset($post_data['topic_time_limit'])) ? (($post_data['topic_time_limit']) ? (int) $post_data['topic_time_limit'] / 86400 : (int) $post_data['topic_time_limit']) : 0;
+$post_data['poll_length'] = (!empty($post_data['poll_length'])) ? (int) $post_data['poll_length'] / 86400 : 0;
+$post_data['poll_start'] = (!empty($post_data['poll_start'])) ? (int) $post_data['poll_start'] : 0;
+$post_data['icon_id'] = (!isset($post_data['icon_id']) || in_array($mode, array('quote', 'reply'))) ? 0 : (int) $post_data['icon_id'];
+$post_data['poll_options'] = array();
+
+// Get Poll Data
+if ($post_data['poll_start'])
+{
+ $sql = 'SELECT poll_option_text
+ FROM ' . POLL_OPTIONS_TABLE . "
+ WHERE topic_id = $topic_id
+ ORDER BY poll_option_id";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_data['poll_options'][] = trim($row['poll_option_text']);
+ }
+ $db->sql_freeresult($result);
+}
+
+$orig_poll_options_size = sizeof($post_data['poll_options']);
+
+$message_parser = new parse_message();
+
+if (isset($post_data['post_text']))
+{
+ $message_parser->message = &$post_data['post_text'];
+ unset($post_data['post_text']);
+}
+
+// Set some default variables
+$uninit = array('post_attachment' => 0, 'poster_id' => $user->data['user_id'], 'enable_magic_url' => 0, 'topic_status' => 0, 'topic_type' => POST_NORMAL, 'post_subject' => '', 'topic_title' => '', 'post_time' => 0, 'post_edit_reason' => '', 'notify_set' => 0);
+
+foreach ($uninit as $var_name => $default_value)
+{
+ if (!isset($post_data[$var_name]))
+ {
+ $post_data[$var_name] = $default_value;
+ }
+}
+unset($uninit);
+
+// Always check if the submitted attachment data is valid and belongs to the user.
+// Further down (especially in submit_post()) we do not check this again.
+$message_parser->get_submitted_attachment_data($post_data['poster_id']);
+
+if ($post_data['post_attachment'] && !$submit && !$refresh && !$preview && $mode == 'edit')
+{
+ // Do not change to SELECT *
+ $sql = 'SELECT attach_id, is_orphan, attach_comment, real_filename
+ FROM ' . ATTACHMENTS_TABLE . "
+ WHERE post_msg_id = $post_id
+ AND in_message = 0
+ AND is_orphan = 0
+ ORDER BY filetime DESC";
+ $result = $db->sql_query($sql);
+ $message_parser->attachment_data = array_merge($message_parser->attachment_data, $db->sql_fetchrowset($result));
+ $db->sql_freeresult($result);
+}
+
+if ($post_data['poster_id'] == ANONYMOUS)
+{
+ $post_data['username'] = ($mode == 'quote' || $mode == 'edit') ? trim($post_data['post_username']) : '';
+}
+else
+{
+ $post_data['username'] = ($mode == 'quote' || $mode == 'edit') ? trim($post_data['username']) : '';
+}
+
+$post_data['enable_urls'] = $post_data['enable_magic_url'];
+
+if ($mode != 'edit')
+{
+ $post_data['enable_sig'] = ($config['allow_sig'] && $user->optionget('attachsig')) ? true: false;
+ $post_data['enable_smilies'] = ($config['allow_smilies'] && $user->optionget('smilies')) ? true : false;
+ $post_data['enable_bbcode'] = ($config['allow_bbcode'] && $user->optionget('bbcode')) ? true : false;
+ $post_data['enable_urls'] = true;
+}
+
+$post_data['enable_magic_url'] = $post_data['drafts'] = false;
+
+// User own some drafts?
+if ($user->data['is_registered'] && $auth->acl_get('u_savedrafts') && ($mode == 'reply' || $mode == 'post' || $mode == 'quote'))
+{
+ $sql = 'SELECT draft_id
+ FROM ' . DRAFTS_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'] .
+ (($forum_id) ? ' AND forum_id = ' . (int) $forum_id : '') .
+ (($topic_id) ? ' AND topic_id = ' . (int) $topic_id : '') .
+ (($draft_id) ? " AND draft_id <> $draft_id" : '');
+ $result = $db->sql_query_limit($sql, 1);
+
+ if ($db->sql_fetchrow($result))
+ {
+ $post_data['drafts'] = true;
+ }
+ $db->sql_freeresult($result);
+}
+
+$check_value = (($post_data['enable_bbcode']+1) << 8) + (($post_data['enable_smilies']+1) << 4) + (($post_data['enable_urls']+1) << 2) + (($post_data['enable_sig']+1) << 1);
+
+// Check if user is watching this topic
+if ($mode != 'post' && $config['allow_topic_notify'] && $user->data['is_registered'])
+{
+ $sql = 'SELECT topic_id
+ FROM ' . TOPICS_WATCH_TABLE . '
+ WHERE topic_id = ' . $topic_id . '
+ AND user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+ $post_data['notify_set'] = (int) $db->sql_fetchfield('topic_id');
+ $db->sql_freeresult($result);
+}
+
+// Do we want to edit our post ?
+if ($mode == 'edit' && $post_data['bbcode_uid'])
+{
+ $message_parser->bbcode_uid = $post_data['bbcode_uid'];
+}
+
+// HTML, BBCode, Smilies, Images and Flash status
+$bbcode_status = ($config['allow_bbcode'] && $auth->acl_get('f_bbcode', $forum_id)) ? true : false;
+$smilies_status = ($config['allow_smilies'] && $auth->acl_get('f_smilies', $forum_id)) ? true : false;
+$img_status = ($bbcode_status && $auth->acl_get('f_img', $forum_id)) ? true : false;
+$url_status = ($config['allow_post_links']) ? true : false;
+$flash_status = ($bbcode_status && $auth->acl_get('f_flash', $forum_id) && $config['allow_post_flash']) ? true : false;
+$quote_status = true;
+
+// Save Draft
+if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts') && ($mode == 'reply' || $mode == 'post' || $mode == 'quote'))
+{
+ $subject = utf8_normalize_nfc(request_var('subject', '', true));
+ $subject = (!$subject && $mode != 'post') ? $post_data['topic_title'] : $subject;
+ $message = utf8_normalize_nfc(request_var('message', '', true));
+
+ if ($subject && $message)
+ {
+ if (confirm_box(true))
+ {
+ $sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'user_id' => (int) $user->data['user_id'],
+ 'topic_id' => (int) $topic_id,
+ 'forum_id' => (int) $forum_id,
+ 'save_time' => (int) $current_time,
+ 'draft_subject' => (string) $subject,
+ 'draft_message' => (string) $message)
+ );
+ $db->sql_query($sql);
+
+ $meta_info = ($mode == 'post') ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) : append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id");
+
+ meta_refresh(3, $meta_info);
+
+ $message = $user->lang['DRAFT_SAVED'] . '<br /><br />';
+ $message .= ($mode != 'post') ? sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $meta_info . '">', '</a>') . '<br /><br />' : '';
+ $message .= sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
+
+ trigger_error($message);
+ }
+ else
+ {
+ $s_hidden_fields = build_hidden_fields(array(
+ 'mode' => $mode,
+ 'save' => true,
+ 'f' => $forum_id,
+ 't' => $topic_id,
+ 'subject' => $subject,
+ 'message' => $message,
+ 'attachment_data' => $message_parser->attachment_data,
+ )
+ );
+
+ $hidden_fields = array(
+ 'icon_id' => 0,
+
+ 'disable_bbcode' => false,
+ 'disable_smilies' => false,
+ 'disable_magic_url' => false,
+ 'attach_sig' => true,
+ 'lock_topic' => false,
+
+ 'topic_type' => POST_NORMAL,
+ 'topic_time_limit' => 0,
+
+ 'poll_title' => '',
+ 'poll_option_text' => '',
+ 'poll_max_options' => 1,
+ 'poll_length' => 0,
+ 'poll_vote_change' => false,
+ );
+
+ foreach ($hidden_fields as $name => $default)
+ {
+ if (!isset($_POST[$name]))
+ {
+ // Don't include it, if its not available
+ unset($hidden_fields[$name]);
+ continue;
+ }
+
+ if (is_bool($default))
+ {
+ // Use the string representation
+ $hidden_fields[$name] = request_var($name, '');
+ }
+ else
+ {
+ $hidden_fields[$name] = request_var($name, $default);
+ }
+ }
+
+ $s_hidden_fields .= build_hidden_fields($hidden_fields);
+
+ confirm_box(false, 'SAVE_DRAFT', $s_hidden_fields);
+ }
+ }
+ else
+ {
+ if (utf8_clean_string($subject) === '')
+ {
+ $error[] = $user->lang['EMPTY_SUBJECT'];
+ }
+
+ if (utf8_clean_string($message) === '')
+ {
+ $error[] = $user->lang['TOO_FEW_CHARS'];
+ }
+ }
+ unset($subject, $message);
+}
+
+// Load requested Draft
+if ($draft_id && ($mode == 'reply' || $mode == 'quote' || $mode == 'post') && $user->data['is_registered'] && $auth->acl_get('u_savedrafts'))
+{
+ $sql = 'SELECT draft_subject, draft_message
+ FROM ' . DRAFTS_TABLE . "
+ WHERE draft_id = $draft_id
+ AND user_id = " . $user->data['user_id'];
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row)
+ {
+ $post_data['post_subject'] = $row['draft_subject'];
+ $message_parser->message = $row['draft_message'];
+
+ $template->assign_var('S_DRAFT_LOADED', true);
+ }
+ else
+ {
+ $draft_id = 0;
+ }
+}
+
+// Load draft overview
+if ($load && ($mode == 'reply' || $mode == 'quote' || $mode == 'post') && $post_data['drafts'])
+{
+ load_drafts($topic_id, $forum_id);
+}
+
+
+if ($submit || $preview || $refresh)
+{
+ $post_data['topic_cur_post_id'] = request_var('topic_cur_post_id', 0);
+ $post_data['post_subject'] = utf8_normalize_nfc(request_var('subject', '', true));
+ $message_parser->message = utf8_normalize_nfc(request_var('message', '', true));
+
+ $post_data['username'] = utf8_normalize_nfc(request_var('username', $post_data['username'], true));
+ $post_data['post_edit_reason'] = (!empty($_POST['edit_reason']) && $mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? utf8_normalize_nfc(request_var('edit_reason', '', true)) : '';
+
+ $post_data['orig_topic_type'] = $post_data['topic_type'];
+ $post_data['topic_type'] = request_var('topic_type', (($mode != 'post') ? (int) $post_data['topic_type'] : POST_NORMAL));
+ $post_data['topic_time_limit'] = request_var('topic_time_limit', (($mode != 'post') ? (int) $post_data['topic_time_limit'] : 0));
+
+ if ($post_data['enable_icons'] && $auth->acl_get('f_icons', $forum_id))
+ {
+ $post_data['icon_id'] = request_var('icon', (int) $post_data['icon_id']);
+ }
+
+ $post_data['enable_bbcode'] = (!$bbcode_status || isset($_POST['disable_bbcode'])) ? false : true;
+ $post_data['enable_smilies'] = (!$smilies_status || isset($_POST['disable_smilies'])) ? false : true;
+ $post_data['enable_urls'] = (isset($_POST['disable_magic_url'])) ? 0 : 1;
+ $post_data['enable_sig'] = (!$config['allow_sig'] || !$auth->acl_get('f_sigs', $forum_id) || !$auth->acl_get('u_sig')) ? false : ((isset($_POST['attach_sig']) && $user->data['is_registered']) ? true : false);
+
+ if ($config['allow_topic_notify'] && $user->data['is_registered'])
+ {
+ $notify = (isset($_POST['notify'])) ? true : false;
+ }
+ else
+ {
+ $notify = false;
+ }
+
+ $topic_lock = (isset($_POST['lock_topic'])) ? true : false;
+ $post_lock = (isset($_POST['lock_post'])) ? true : false;
+ $poll_delete = (isset($_POST['poll_delete'])) ? true : false;
+
+ if ($submit)
+ {
+ $status_switch = (($post_data['enable_bbcode']+1) << 8) + (($post_data['enable_smilies']+1) << 4) + (($post_data['enable_urls']+1) << 2) + (($post_data['enable_sig']+1) << 1);
+ $status_switch = ($status_switch != $check_value);
+ }
+ else
+ {
+ $status_switch = 1;
+ }
+
+ // Delete Poll
+ if ($poll_delete && $mode == 'edit' && sizeof($post_data['poll_options']) &&
+ ((!$post_data['poll_last_vote'] && $post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id)) || $auth->acl_get('m_delete', $forum_id)))
+ {
+ if ($submit && check_form_key('posting'))
+ {
+ $sql = 'DELETE FROM ' . POLL_OPTIONS_TABLE . "
+ WHERE topic_id = $topic_id";
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . POLL_VOTES_TABLE . "
+ WHERE topic_id = $topic_id";
+ $db->sql_query($sql);
+
+ $topic_sql = array(
+ 'poll_title' => '',
+ 'poll_start' => 0,
+ 'poll_length' => 0,
+ 'poll_last_vote' => 0,
+ 'poll_max_options' => 0,
+ 'poll_vote_change' => 0
+ );
+
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $topic_sql) . "
+ WHERE topic_id = $topic_id";
+ $db->sql_query($sql);
+ }
+
+ $post_data['poll_title'] = $post_data['poll_option_text'] = '';
+ $post_data['poll_vote_change'] = $post_data['poll_max_options'] = $post_data['poll_length'] = 0;
+ }
+ else
+ {
+ $post_data['poll_title'] = utf8_normalize_nfc(request_var('poll_title', '', true));
+ $post_data['poll_length'] = request_var('poll_length', 0);
+ $post_data['poll_option_text'] = utf8_normalize_nfc(request_var('poll_option_text', '', true));
+ $post_data['poll_max_options'] = request_var('poll_max_options', 1);
+ $post_data['poll_vote_change'] = ($auth->acl_get('f_votechg', $forum_id) && $auth->acl_get('f_vote', $forum_id) && isset($_POST['poll_vote_change'])) ? 1 : 0;
+ }
+
+ // If replying/quoting and last post id has changed
+ // give user option to continue submit or return to post
+ // notify and show user the post made between his request and the final submit
+ if (($mode == 'reply' || $mode == 'quote') && $post_data['topic_cur_post_id'] && $post_data['topic_cur_post_id'] != $post_data['topic_last_post_id'])
+ {
+ // Only do so if it is allowed forum-wide
+ if ($post_data['forum_flags'] & FORUM_FLAG_POST_REVIEW)
+ {
+ if (topic_review($topic_id, $forum_id, 'post_review', $post_data['topic_cur_post_id']))
+ {
+ $template->assign_var('S_POST_REVIEW', true);
+ }
+
+ $submit = false;
+ $refresh = true;
+ }
+ }
+
+ // Parse Attachments - before checksum is calculated
+ $message_parser->parse_attachments('fileupload', $mode, $forum_id, $submit, $preview, $refresh);
+
+ // Grab md5 'checksum' of new message
+ $message_md5 = md5($message_parser->message);
+
+ // If editing and checksum has changed we know the post was edited while we're editing
+ // Notify and show user the changed post
+ if ($mode == 'edit' && $post_data['forum_flags'] & FORUM_FLAG_POST_REVIEW)
+ {
+ $edit_post_message_checksum = request_var('edit_post_message_checksum', '');
+ $edit_post_subject_checksum = request_var('edit_post_subject_checksum', '');
+
+ // $post_data['post_checksum'] is the checksum of the post submitted in the meantime
+ // $message_md5 is the checksum of the post we're about to submit
+ // $edit_post_message_checksum is the checksum of the post we're editing
+ // ...
+
+ // We make sure nobody else made exactly the same change
+ // we're about to submit by also checking $message_md5 != $post_data['post_checksum']
+ if (($edit_post_message_checksum !== '' && $edit_post_message_checksum != $post_data['post_checksum'] && $message_md5 != $post_data['post_checksum'])
+ || ($edit_post_subject_checksum !== '' && $edit_post_subject_checksum != $post_data['post_subject_md5'] && md5($post_data['post_subject']) != $post_data['post_subject_md5']))
+ {
+ if (topic_review($topic_id, $forum_id, 'post_review_edit', $post_id))
+ {
+ $template->assign_vars(array(
+ 'S_POST_REVIEW' => true,
+
+ 'L_POST_REVIEW' => $user->lang['POST_REVIEW_EDIT'],
+ 'L_POST_REVIEW_EXPLAIN' => $user->lang['POST_REVIEW_EDIT_EXPLAIN'],
+ ));
+ }
+
+ $submit = false;
+ $refresh = true;
+ }
+ }
+
+ // Check checksum ... don't re-parse message if the same
+ $update_message = ($mode != 'edit' || $message_md5 != $post_data['post_checksum'] || $status_switch || strlen($post_data['bbcode_uid']) < BBCODE_UID_LEN) ? true : false;
+
+ // Also check if subject got updated...
+ $update_subject = $mode != 'edit' || ($post_data['post_subject_md5'] && $post_data['post_subject_md5'] != md5($post_data['post_subject']));
+
+ // Parse message
+ if ($update_message)
+ {
+ if (sizeof($message_parser->warn_msg))
+ {
+ $error[] = implode('<br />', $message_parser->warn_msg);
+ $message_parser->warn_msg = array();
+ }
+
+ $message_parser->parse($post_data['enable_bbcode'], ($config['allow_post_links']) ? $post_data['enable_urls'] : false, $post_data['enable_smilies'], $img_status, $flash_status, $quote_status, $config['allow_post_links']);
+
+ // On a refresh we do not care about message parsing errors
+ if (sizeof($message_parser->warn_msg) && $refresh)
+ {
+ $message_parser->warn_msg = array();
+ }
+ }
+ else
+ {
+ $message_parser->bbcode_bitfield = $post_data['bbcode_bitfield'];
+ }
+
+ if ($mode != 'edit' && !$preview && !$refresh && $config['flood_interval'] && !$auth->acl_get('f_ignoreflood', $forum_id))
+ {
+ // Flood check
+ $last_post_time = 0;
+
+ if ($user->data['is_registered'])
+ {
+ $last_post_time = $user->data['user_lastpost_time'];
+ }
+ else
+ {
+ $sql = 'SELECT post_time AS last_post_time
+ FROM ' . POSTS_TABLE . "
+ WHERE poster_ip = '" . $user->ip . "'
+ AND post_time > " . ($current_time - $config['flood_interval']);
+ $result = $db->sql_query_limit($sql, 1);
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $last_post_time = $row['last_post_time'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if ($last_post_time && ($current_time - $last_post_time) < intval($config['flood_interval']))
+ {
+ $error[] = $user->lang['FLOOD_ERROR'];
+ }
+ }
+
+ // Validate username
+ if (($post_data['username'] && !$user->data['is_registered']) || ($mode == 'edit' && $post_data['poster_id'] == ANONYMOUS && $post_data['username'] && $post_data['post_username'] && $post_data['post_username'] != $post_data['username']))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ if (($result = validate_username($post_data['username'], (!empty($post_data['post_username'])) ? $post_data['post_username'] : '')) !== false)
+ {
+ $user->add_lang('ucp');
+ $error[] = $user->lang[$result . '_USERNAME'];
+ }
+ }
+
+ if ($config['enable_post_confirm'] && !$user->data['is_registered'] && in_array($mode, array('quote', 'post', 'reply')))
+ {
+ $captcha_data = array(
+ 'message' => utf8_normalize_nfc(request_var('message', '', true)),
+ 'subject' => utf8_normalize_nfc(request_var('subject', '', true)),
+ 'username' => utf8_normalize_nfc(request_var('username', '', true)),
+ );
+ $vc_response = $captcha->validate($captcha_data);
+ if ($vc_response)
+ {
+ $error[] = $vc_response;
+ }
+ }
+
+ // check form
+ if (($submit || $preview) && !check_form_key('posting'))
+ {
+ $error[] = $user->lang['FORM_INVALID'];
+ }
+
+ // Parse subject
+ if (!$preview && !$refresh && utf8_clean_string($post_data['post_subject']) === '' && ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_id)))
+ {
+ $error[] = $user->lang['EMPTY_SUBJECT'];
+ }
+
+ $post_data['poll_last_vote'] = (isset($post_data['poll_last_vote'])) ? $post_data['poll_last_vote'] : 0;
+
+ if ($post_data['poll_option_text'] &&
+ ($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_post_id']/* && (!$post_data['poll_last_vote'] || $auth->acl_get('m_edit', $forum_id))*/))
+ && $auth->acl_get('f_poll', $forum_id))
+ {
+ $poll = array(
+ 'poll_title' => $post_data['poll_title'],
+ 'poll_length' => $post_data['poll_length'],
+ 'poll_max_options' => $post_data['poll_max_options'],
+ 'poll_option_text' => $post_data['poll_option_text'],
+ 'poll_start' => $post_data['poll_start'],
+ 'poll_last_vote' => $post_data['poll_last_vote'],
+ 'poll_vote_change' => $post_data['poll_vote_change'],
+ 'enable_bbcode' => $post_data['enable_bbcode'],
+ 'enable_urls' => $post_data['enable_urls'],
+ 'enable_smilies' => $post_data['enable_smilies'],
+ 'img_status' => $img_status
+ );
+
+ $message_parser->parse_poll($poll);
+
+ $post_data['poll_options'] = (isset($poll['poll_options'])) ? $poll['poll_options'] : '';
+ $post_data['poll_title'] = (isset($poll['poll_title'])) ? $poll['poll_title'] : '';
+
+ /* We reset votes, therefore also allow removing options
+ if ($post_data['poll_last_vote'] && ($poll['poll_options_size'] < $orig_poll_options_size))
+ {
+ $message_parser->warn_msg[] = $user->lang['NO_DELETE_POLL_OPTIONS'];
+ }*/
+ }
+ else
+ {
+ $poll = array();
+ }
+
+ // Check topic type
+ if ($post_data['topic_type'] != POST_NORMAL && ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_id)))
+ {
+ switch ($post_data['topic_type'])
+ {
+ case POST_GLOBAL:
+ case POST_ANNOUNCE:
+ $auth_option = 'f_announce';
+ break;
+
+ case POST_STICKY:
+ $auth_option = 'f_sticky';
+ break;
+
+ default:
+ $auth_option = '';
+ break;
+ }
+
+ if (!$auth->acl_get($auth_option, $forum_id))
+ {
+ // There is a special case where a user edits his post whereby the topic type got changed by an admin/mod.
+ // Another case would be a mod not having sticky permissions for example but edit permissions.
+ if ($mode == 'edit')
+ {
+ // To prevent non-authed users messing around with the topic type we reset it to the original one.
+ $post_data['topic_type'] = $post_data['orig_topic_type'];
+ }
+ else
+ {
+ $error[] = $user->lang['CANNOT_POST_' . str_replace('F_', '', strtoupper($auth_option))];
+ }
+ }
+ }
+
+ if (sizeof($message_parser->warn_msg))
+ {
+ $error[] = implode('<br />', $message_parser->warn_msg);
+ }
+
+ // DNSBL check
+ if ($config['check_dnsbl'] && !$refresh)
+ {
+ if (($dnsbl = $user->check_dnsbl('post')) !== false)
+ {
+ $error[] = sprintf($user->lang['IP_BLACKLISTED'], $user->ip, $dnsbl[1]);
+ }
+ }
+
+ // Store message, sync counters
+ if (!sizeof($error) && $submit)
+ {
+ // Check if we want to de-globalize the topic... and ask for new forum
+ if ($post_data['topic_type'] != POST_GLOBAL)
+ {
+ $sql = 'SELECT topic_type, forum_id
+ FROM ' . TOPICS_TABLE . "
+ WHERE topic_id = $topic_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row && !$row['forum_id'] && $row['topic_type'] == POST_GLOBAL)
+ {
+ $to_forum_id = request_var('to_forum_id', 0);
+
+ if ($to_forum_id)
+ {
+ $sql = 'SELECT forum_type
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $to_forum_id;
+ $result = $db->sql_query($sql);
+ $forum_type = (int) $db->sql_fetchfield('forum_type');
+ $db->sql_freeresult($result);
+
+ if ($forum_type != FORUM_POST || !$auth->acl_get('f_post', $to_forum_id))
+ {
+ $to_forum_id = 0;
+ }
+ }
+
+ if (!$to_forum_id)
+ {
+ include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+
+ $template->assign_vars(array(
+ 'S_FORUM_SELECT' => make_forum_select(false, false, false, true, true, true),
+ 'S_UNGLOBALISE' => true)
+ );
+
+ $submit = false;
+ $refresh = true;
+ }
+ else
+ {
+ if (!$auth->acl_get('f_post', $to_forum_id))
+ {
+ // This will only be triggered if the user tried to trick the forum.
+ trigger_error('NOT_AUTHORISED');
+ }
+
+ $forum_id = $to_forum_id;
+ }
+ }
+ }
+
+ if ($submit)
+ {
+ // Lock/Unlock Topic
+ $change_topic_status = $post_data['topic_status'];
+ $perm_lock_unlock = ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && !empty($post_data['topic_poster']) && $user->data['user_id'] == $post_data['topic_poster'] && $post_data['topic_status'] == ITEM_UNLOCKED)) ? true : false;
+
+ if ($post_data['topic_status'] == ITEM_LOCKED && !$topic_lock && $perm_lock_unlock)
+ {
+ $change_topic_status = ITEM_UNLOCKED;
+ }
+ else if ($post_data['topic_status'] == ITEM_UNLOCKED && $topic_lock && $perm_lock_unlock)
+ {
+ $change_topic_status = ITEM_LOCKED;
+ }
+
+ if ($change_topic_status != $post_data['topic_status'])
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . "
+ SET topic_status = $change_topic_status
+ WHERE topic_id = $topic_id
+ AND topic_moved_id = 0";
+ $db->sql_query($sql);
+
+ $user_lock = ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && $user->data['user_id'] == $post_data['topic_poster']) ? 'USER_' : '';
+
+ add_log('mod', $forum_id, $topic_id, 'LOG_' . $user_lock . (($change_topic_status == ITEM_LOCKED) ? 'LOCK' : 'UNLOCK'), $post_data['topic_title']);
+ }
+
+ // Lock/Unlock Post Edit
+ if ($mode == 'edit' && $post_data['post_edit_locked'] == ITEM_LOCKED && !$post_lock && $auth->acl_get('m_edit', $forum_id))
+ {
+ $post_data['post_edit_locked'] = ITEM_UNLOCKED;
+ }
+ else if ($mode == 'edit' && $post_data['post_edit_locked'] == ITEM_UNLOCKED && $post_lock && $auth->acl_get('m_edit', $forum_id))
+ {
+ $post_data['post_edit_locked'] = ITEM_LOCKED;
+ }
+
+ $data = array(
+ 'topic_title' => (empty($post_data['topic_title'])) ? $post_data['post_subject'] : $post_data['topic_title'],
+ 'topic_first_post_id' => (isset($post_data['topic_first_post_id'])) ? (int) $post_data['topic_first_post_id'] : 0,
+ 'topic_last_post_id' => (isset($post_data['topic_last_post_id'])) ? (int) $post_data['topic_last_post_id'] : 0,
+ 'topic_time_limit' => (int) $post_data['topic_time_limit'],
+ 'topic_attachment' => (isset($post_data['topic_attachment'])) ? (int) $post_data['topic_attachment'] : 0,
+ 'post_id' => (int) $post_id,
+ 'topic_id' => (int) $topic_id,
+ 'forum_id' => (int) $forum_id,
+ 'icon_id' => (int) $post_data['icon_id'],
+ 'poster_id' => (int) $post_data['poster_id'],
+ 'enable_sig' => (bool) $post_data['enable_sig'],
+ 'enable_bbcode' => (bool) $post_data['enable_bbcode'],
+ 'enable_smilies' => (bool) $post_data['enable_smilies'],
+ 'enable_urls' => (bool) $post_data['enable_urls'],
+ 'enable_indexing' => (bool) $post_data['enable_indexing'],
+ 'message_md5' => (string) $message_md5,
+ 'post_time' => (isset($post_data['post_time'])) ? (int) $post_data['post_time'] : $current_time,
+ 'post_checksum' => (isset($post_data['post_checksum'])) ? (string) $post_data['post_checksum'] : '',
+ 'post_edit_reason' => $post_data['post_edit_reason'],
+ 'post_edit_user' => ($mode == 'edit') ? $user->data['user_id'] : ((isset($post_data['post_edit_user'])) ? (int) $post_data['post_edit_user'] : 0),
+ 'forum_parents' => $post_data['forum_parents'],
+ 'forum_name' => $post_data['forum_name'],
+ 'notify' => $notify,
+ 'notify_set' => $post_data['notify_set'],
+ 'poster_ip' => (isset($post_data['poster_ip'])) ? $post_data['poster_ip'] : $user->ip,
+ 'post_edit_locked' => (int) $post_data['post_edit_locked'],
+ 'bbcode_bitfield' => $message_parser->bbcode_bitfield,
+ 'bbcode_uid' => $message_parser->bbcode_uid,
+ 'message' => $message_parser->message,
+ 'attachment_data' => $message_parser->attachment_data,
+ 'filename_data' => $message_parser->filename_data,
+
+ 'topic_approved' => (isset($post_data['topic_approved'])) ? $post_data['topic_approved'] : false,
+ 'post_approved' => (isset($post_data['post_approved'])) ? $post_data['post_approved'] : false,
+ );
+
+ if ($mode == 'edit')
+ {
+ $data['topic_replies_real'] = $post_data['topic_replies_real'];
+ $data['topic_replies'] = $post_data['topic_replies'];
+ }
+
+ // The last parameter tells submit_post if search indexer has to be run
+ $redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message, ($update_message || $update_subject) ? true : false);
+
+ if ($config['enable_post_confirm'] && !$user->data['is_registered'] && (isset($captcha) && $captcha->is_solved() === true) && ($mode == 'post' || $mode == 'reply' || $mode == 'quote'))
+ {
+ $captcha->reset();
+ }
+
+ // Check the permissions for post approval. Moderators are not affected.
+ if ((!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) || !empty($post_data['force_approved_state']))
+ {
+ meta_refresh(10, $redirect_url);
+ $message = ($mode == 'edit') ? $user->lang['POST_EDITED_MOD'] : $user->lang['POST_STORED_MOD'];
+ $message .= (($user->data['user_id'] == ANONYMOUS) ? '' : ' '. $user->lang['POST_APPROVAL_NOTIFY']);
+ }
+ else
+ {
+ meta_refresh(3, $redirect_url);
+
+ $message = ($mode == 'edit') ? 'POST_EDITED' : 'POST_STORED';
+ $message = $user->lang[$message] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $redirect_url . '">', '</a>');
+ }
+
+ $message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $data['forum_id']) . '">', '</a>');
+ trigger_error($message);
+ }
+ }
+}
+
+// Preview
+if (!sizeof($error) && $preview)
+{
+ $post_data['post_time'] = ($mode == 'edit') ? $post_data['post_time'] : $current_time;
+
+ $preview_message = $message_parser->format_display($post_data['enable_bbcode'], $post_data['enable_urls'], $post_data['enable_smilies'], false);
+
+ $preview_signature = ($mode == 'edit') ? $post_data['user_sig'] : $user->data['user_sig'];
+ $preview_signature_uid = ($mode == 'edit') ? $post_data['user_sig_bbcode_uid'] : $user->data['user_sig_bbcode_uid'];
+ $preview_signature_bitfield = ($mode == 'edit') ? $post_data['user_sig_bbcode_bitfield'] : $user->data['user_sig_bbcode_bitfield'];
+
+ // Signature
+ if ($post_data['enable_sig'] && $config['allow_sig'] && $preview_signature && $auth->acl_get('f_sigs', $forum_id))
+ {
+ $parse_sig = new parse_message($preview_signature);
+ $parse_sig->bbcode_uid = $preview_signature_uid;
+ $parse_sig->bbcode_bitfield = $preview_signature_bitfield;
+
+ // Not sure about parameters for bbcode/smilies/urls... in signatures
+ $parse_sig->format_display($config['allow_sig_bbcode'], true, $config['allow_sig_smilies']);
+ $preview_signature = $parse_sig->message;
+ unset($parse_sig);
+ }
+ else
+ {
+ $preview_signature = '';
+ }
+
+ $preview_subject = censor_text($post_data['post_subject']);
+
+ // Poll Preview
+ if (!$poll_delete && ($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_post_id']/* && (!$post_data['poll_last_vote'] || $auth->acl_get('m_edit', $forum_id))*/))
+ && $auth->acl_get('f_poll', $forum_id))
+ {
+ $parse_poll = new parse_message($post_data['poll_title']);
+ $parse_poll->bbcode_uid = $message_parser->bbcode_uid;
+ $parse_poll->bbcode_bitfield = $message_parser->bbcode_bitfield;
+
+ $parse_poll->format_display($post_data['enable_bbcode'], $post_data['enable_urls'], $post_data['enable_smilies']);
+
+ if ($post_data['poll_length'])
+ {
+ $poll_end = ($post_data['poll_length'] * 86400) + (($post_data['poll_start']) ? $post_data['poll_start'] : time());
+ }
+
+ $template->assign_vars(array(
+ 'S_HAS_POLL_OPTIONS' => (sizeof($post_data['poll_options'])),
+ 'S_IS_MULTI_CHOICE' => ($post_data['poll_max_options'] > 1) ? true : false,
+
+ 'POLL_QUESTION' => $parse_poll->message,
+
+ 'L_POLL_LENGTH' => ($post_data['poll_length']) ? sprintf($user->lang['POLL_RUN_TILL'], $user->format_date($poll_end)) : '',
+ 'L_MAX_VOTES' => ($post_data['poll_max_options'] == 1) ? $user->lang['MAX_OPTION_SELECT'] : sprintf($user->lang['MAX_OPTIONS_SELECT'], $post_data['poll_max_options']))
+ );
+
+ $parse_poll->message = implode("\n", $post_data['poll_options']);
+ $parse_poll->format_display($post_data['enable_bbcode'], $post_data['enable_urls'], $post_data['enable_smilies']);
+ $preview_poll_options = explode('<br />', $parse_poll->message);
+ unset($parse_poll);
+
+ foreach ($preview_poll_options as $key => $option)
+ {
+ $template->assign_block_vars('poll_option', array(
+ 'POLL_OPTION_CAPTION' => $option,
+ 'POLL_OPTION_ID' => $key + 1)
+ );
+ }
+ unset($preview_poll_options);
+ }
+
+ // Attachment Preview
+ if (sizeof($message_parser->attachment_data))
+ {
+ $template->assign_var('S_HAS_ATTACHMENTS', true);
+
+ $update_count = array();
+ $attachment_data = $message_parser->attachment_data;
+
+ parse_attachments($forum_id, $preview_message, $attachment_data, $update_count, true);
+
+ foreach ($attachment_data as $i => $attachment)
+ {
+ $template->assign_block_vars('attachment', array(
+ 'DISPLAY_ATTACHMENT' => $attachment)
+ );
+ }
+ unset($attachment_data);
+ }
+
+ if (!sizeof($error))
+ {
+ $template->assign_vars(array(
+ 'PREVIEW_SUBJECT' => $preview_subject,
+ 'PREVIEW_MESSAGE' => $preview_message,
+ 'PREVIEW_SIGNATURE' => $preview_signature,
+
+ 'S_DISPLAY_PREVIEW' => true)
+ );
+ }
+}
+
+// Decode text for message display
+$post_data['bbcode_uid'] = ($mode == 'quote' && !$preview && !$refresh && !sizeof($error)) ? $post_data['bbcode_uid'] : $message_parser->bbcode_uid;
+$message_parser->decode_message($post_data['bbcode_uid']);
+
+if ($mode == 'quote' && !$submit && !$preview && !$refresh)
+{
+ if ($config['allow_bbcode'])
+ {
+ $message_parser->message = '[quote=&quot;' . $post_data['quote_username'] . '&quot;]' . censor_text(trim($message_parser->message)) . "[/quote]\n";
+ }
+ else
+ {
+ $offset = 0;
+ $quote_string = "&gt; ";
+ $message = censor_text(trim($message_parser->message));
+ // see if we are nesting. It's easily tricked but should work for one level of nesting
+ if (strpos($message, "&gt;") !== false)
+ {
+ $offset = 10;
+ }
+ $message = utf8_wordwrap($message, 75 + $offset, "\n");
+
+ $message = $quote_string . $message;
+ $message = str_replace("\n", "\n" . $quote_string, $message);
+ $message_parser->message = $post_data['quote_username'] . " " . $user->lang['WROTE'] . " :\n" . $message . "\n";
+ }
+}
+
+if (($mode == 'reply' || $mode == 'quote') && !$submit && !$preview && !$refresh)
+{
+ $post_data['post_subject'] = ((strpos($post_data['post_subject'], 'Re: ') !== 0) ? 'Re: ' : '') . censor_text($post_data['post_subject']);
+}
+
+$attachment_data = $message_parser->attachment_data;
+$filename_data = $message_parser->filename_data;
+$post_data['post_text'] = $message_parser->message;
+
+if (sizeof($post_data['poll_options']) && $post_data['poll_title'])
+{
+ $message_parser->message = $post_data['poll_title'];
+ $message_parser->bbcode_uid = $post_data['bbcode_uid'];
+
+ $message_parser->decode_message();
+ $post_data['poll_title'] = $message_parser->message;
+
+ $message_parser->message = implode("\n", $post_data['poll_options']);
+ $message_parser->decode_message();
+ $post_data['poll_options'] = explode("\n", $message_parser->message);
+}
+
+// MAIN POSTING PAGE BEGINS HERE
+
+// Forum moderators?
+$moderators = array();
+if ($config['load_moderators'])
+{
+ get_moderators($moderators, $forum_id);
+}
+
+// Generate smiley listing
+generate_smilies('inline', $forum_id);
+
+// Generate inline attachment select box
+posting_gen_inline_attachments($attachment_data);
+
+// Do show topic type selection only in first post.
+$topic_type_toggle = false;
+
+if ($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_post_id']))
+{
+ $topic_type_toggle = posting_gen_topic_types($forum_id, $post_data['topic_type']);
+}
+
+$s_topic_icons = false;
+if ($post_data['enable_icons'] && $auth->acl_get('f_icons', $forum_id))
+{
+ $s_topic_icons = posting_gen_topic_icons($mode, $post_data['icon_id']);
+}
+
+$bbcode_checked = (isset($post_data['enable_bbcode'])) ? !$post_data['enable_bbcode'] : (($config['allow_bbcode']) ? !$user->optionget('bbcode') : 1);
+$smilies_checked = (isset($post_data['enable_smilies'])) ? !$post_data['enable_smilies'] : (($config['allow_smilies']) ? !$user->optionget('smilies') : 1);
+$urls_checked = (isset($post_data['enable_urls'])) ? !$post_data['enable_urls'] : 0;
+$sig_checked = $post_data['enable_sig'];
+$lock_topic_checked = (isset($topic_lock) && $topic_lock) ? $topic_lock : (($post_data['topic_status'] == ITEM_LOCKED) ? 1 : 0);
+$lock_post_checked = (isset($post_lock)) ? $post_lock : $post_data['post_edit_locked'];
+
+// If the user is replying or posting and not already watching this topic but set to always being notified we need to overwrite this setting
+$notify_set = ($mode != 'edit' && $config['allow_topic_notify'] && $user->data['is_registered'] && !$post_data['notify_set']) ? $user->data['user_notify'] : $post_data['notify_set'];
+$notify_checked = (isset($notify)) ? $notify : (($mode == 'post') ? $user->data['user_notify'] : $notify_set);
+
+// Page title & action URL, include session_id for security purpose
+$s_action = append_sid("{$phpbb_root_path}posting.$phpEx", "mode=$mode&amp;f=$forum_id", true, $user->session_id);
+$s_action .= ($topic_id) ? "&amp;t=$topic_id" : '';
+$s_action .= ($post_id) ? "&amp;p=$post_id" : '';
+
+switch ($mode)
+{
+ case 'post':
+ $page_title = $user->lang['POST_TOPIC'];
+ break;
+
+ case 'quote':
+ case 'reply':
+ $page_title = $user->lang['POST_REPLY'];
+ break;
+
+ case 'delete':
+ case 'edit':
+ $page_title = $user->lang['EDIT_POST'];
+ break;
+}
+
+// Build Navigation Links
+generate_forum_nav($post_data);
+
+// Build Forum Rules
+generate_forum_rules($post_data);
+
+// Posting uses is_solved for legacy reasons. Plugins have to use is_solved to force themselves to be displayed.
+if ($config['enable_post_confirm'] && !$user->data['is_registered'] && (isset($captcha) && $captcha->is_solved() === false) && ($mode == 'post' || $mode == 'reply' || $mode == 'quote'))
+{
+
+ $template->assign_vars(array(
+ 'S_CONFIRM_CODE' => true,
+ 'CAPTCHA_TEMPLATE' => $captcha->get_template(),
+ ));
+}
+
+$s_hidden_fields = ($mode == 'reply' || $mode == 'quote') ? '<input type="hidden" name="topic_cur_post_id" value="' . $post_data['topic_last_post_id'] . '" />' : '';
+$s_hidden_fields .= '<input type="hidden" name="lastclick" value="' . $current_time . '" />';
+$s_hidden_fields .= ($draft_id || isset($_REQUEST['draft_loaded'])) ? '<input type="hidden" name="draft_loaded" value="' . request_var('draft_loaded', $draft_id) . '" />' : '';
+
+if ($mode == 'edit')
+{
+ $s_hidden_fields .= build_hidden_fields(array(
+ 'edit_post_message_checksum' => $post_data['post_checksum'],
+ 'edit_post_subject_checksum' => $post_data['post_subject_md5'],
+ ));
+}
+
+// Add the confirm id/code pair to the hidden fields, else an error is displayed on next submit/preview
+if (isset($captcha) && $captcha->is_solved() !== false)
+{
+ $s_hidden_fields .= build_hidden_fields($captcha->get_hidden_fields());
+}
+
+$form_enctype = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !$config['allow_attachments'] || !$auth->acl_get('u_attach') || !$auth->acl_get('f_attach', $forum_id)) ? '' : ' enctype="multipart/form-data"';
+add_form_key('posting');
+
+
+// Start assigning vars for main posting page ...
+$template->assign_vars(array(
+ 'L_POST_A' => $page_title,
+ 'L_ICON' => ($mode == 'reply' || $mode == 'quote' || ($mode == 'edit' && $post_id != $post_data['topic_first_post_id'])) ? $user->lang['POST_ICON'] : $user->lang['TOPIC_ICON'],
+ 'L_MESSAGE_BODY_EXPLAIN' => (intval($config['max_post_chars'])) ? sprintf($user->lang['MESSAGE_BODY_EXPLAIN'], intval($config['max_post_chars'])) : '',
+
+ 'FORUM_NAME' => $post_data['forum_name'],
+ 'FORUM_DESC' => ($post_data['forum_desc']) ? generate_text_for_display($post_data['forum_desc'], $post_data['forum_desc_uid'], $post_data['forum_desc_bitfield'], $post_data['forum_desc_options']) : '',
+ 'TOPIC_TITLE' => censor_text($post_data['topic_title']),
+ 'MODERATORS' => (sizeof($moderators)) ? implode(', ', $moderators[$forum_id]) : '',
+ 'USERNAME' => ((!$preview && $mode != 'quote') || $preview) ? $post_data['username'] : '',
+ 'SUBJECT' => $post_data['post_subject'],
+ 'MESSAGE' => $post_data['post_text'],
+ 'BBCODE_STATUS' => ($bbcode_status) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>'),
+ 'IMG_STATUS' => ($img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
+ 'FLASH_STATUS' => ($flash_status) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
+ 'SMILIES_STATUS' => ($smilies_status) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
+ 'URL_STATUS' => ($bbcode_status && $url_status) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
+ 'MAX_FONT_SIZE' => (int) $config['max_post_font_size'],
+ 'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['POST']),
+ 'POST_DATE' => ($post_data['post_time']) ? $user->format_date($post_data['post_time']) : '',
+ 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'TOPIC_TIME_LIMIT' => (int) $post_data['topic_time_limit'],
+ 'EDIT_REASON' => $post_data['post_edit_reason'],
+ 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id"),
+ 'U_VIEW_TOPIC' => ($mode != 'post') ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id") : '',
+ 'U_PROGRESS_BAR' => append_sid("{$phpbb_root_path}posting.$phpEx", "f=$forum_id&amp;mode=popup"),
+ 'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_root_path}posting.$phpEx", "f=$forum_id&amp;mode=popup")),
+
+ 'S_PRIVMSGS' => false,
+ 'S_CLOSE_PROGRESS_WINDOW' => (isset($_POST['add_file'])) ? true : false,
+ 'S_EDIT_POST' => ($mode == 'edit') ? true : false,
+ 'S_EDIT_REASON' => ($mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? true : false,
+ 'S_DISPLAY_USERNAME' => (!$user->data['is_registered'] || ($mode == 'edit' && $post_data['poster_id'] == ANONYMOUS)) ? true : false,
+ 'S_SHOW_TOPIC_ICONS' => $s_topic_icons,
+ 'S_DELETE_ALLOWED' => ($mode == 'edit' && (($post_id == $post_data['topic_last_post_id'] && $post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id) && !$post_data['post_edit_locked'] && ($post_data['post_time'] > time() - ($config['delete_time'] * 60) || !$config['delete_time'])) || $auth->acl_get('m_delete', $forum_id))) ? true : false,
+ 'S_BBCODE_ALLOWED' => $bbcode_status,
+ 'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '',
+ 'S_SMILIES_ALLOWED' => $smilies_status,
+ 'S_SMILIES_CHECKED' => ($smilies_checked) ? ' checked="checked"' : '',
+ 'S_SIG_ALLOWED' => ($auth->acl_get('f_sigs', $forum_id) && $config['allow_sig'] && $user->data['is_registered']) ? true : false,
+ 'S_SIGNATURE_CHECKED' => ($sig_checked) ? ' checked="checked"' : '',
+ 'S_NOTIFY_ALLOWED' => (!$user->data['is_registered'] || ($mode == 'edit' && $user->data['user_id'] != $post_data['poster_id']) || !$config['allow_topic_notify'] || !$config['email_enable']) ? false : true,
+ 'S_NOTIFY_CHECKED' => ($notify_checked) ? ' checked="checked"' : '',
+ 'S_LOCK_TOPIC_ALLOWED' => (($mode == 'edit' || $mode == 'reply' || $mode == 'quote') && ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && !empty($post_data['topic_poster']) && $user->data['user_id'] == $post_data['topic_poster'] && $post_data['topic_status'] == ITEM_UNLOCKED))) ? true : false,
+ 'S_LOCK_TOPIC_CHECKED' => ($lock_topic_checked) ? ' checked="checked"' : '',
+ 'S_LOCK_POST_ALLOWED' => ($mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? true : false,
+ 'S_LOCK_POST_CHECKED' => ($lock_post_checked) ? ' checked="checked"' : '',
+ 'S_LINKS_ALLOWED' => $url_status,
+ 'S_MAGIC_URL_CHECKED' => ($urls_checked) ? ' checked="checked"' : '',
+ 'S_TYPE_TOGGLE' => $topic_type_toggle,
+ 'S_SAVE_ALLOWED' => ($auth->acl_get('u_savedrafts') && $user->data['is_registered'] && $mode != 'edit') ? true : false,
+ 'S_HAS_DRAFTS' => ($auth->acl_get('u_savedrafts') && $user->data['is_registered'] && $post_data['drafts']) ? true : false,
+ 'S_FORM_ENCTYPE' => $form_enctype,
+
+ 'S_BBCODE_IMG' => $img_status,
+ 'S_BBCODE_URL' => $url_status,
+ 'S_BBCODE_FLASH' => $flash_status,
+ 'S_BBCODE_QUOTE' => $quote_status,
+
+ 'S_POST_ACTION' => $s_action,
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields)
+);
+
+// Build custom bbcodes array
+display_custom_bbcodes();
+
+// Poll entry
+if (($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_post_id']/* && (!$post_data['poll_last_vote'] || $auth->acl_get('m_edit', $forum_id))*/))
+ && $auth->acl_get('f_poll', $forum_id))
+{
+ $template->assign_vars(array(
+ 'S_SHOW_POLL_BOX' => true,
+ 'S_POLL_VOTE_CHANGE' => ($auth->acl_get('f_votechg', $forum_id) && $auth->acl_get('f_vote', $forum_id)),
+ 'S_POLL_DELETE' => ($mode == 'edit' && sizeof($post_data['poll_options']) && ((!$post_data['poll_last_vote'] && $post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id)) || $auth->acl_get('m_delete', $forum_id))),
+ 'S_POLL_DELETE_CHECKED' => (!empty($poll_delete)) ? true : false,
+
+ 'L_POLL_OPTIONS_EXPLAIN' => sprintf($user->lang['POLL_OPTIONS_' . (($mode == 'edit') ? 'EDIT_' : '') . 'EXPLAIN'], $config['max_poll_options']),
+
+ 'VOTE_CHANGE_CHECKED' => (!empty($post_data['poll_vote_change'])) ? ' checked="checked"' : '',
+ 'POLL_TITLE' => (isset($post_data['poll_title'])) ? $post_data['poll_title'] : '',
+ 'POLL_OPTIONS' => (!empty($post_data['poll_options'])) ? implode("\n", $post_data['poll_options']) : '',
+ 'POLL_MAX_OPTIONS' => (isset($post_data['poll_max_options'])) ? (int) $post_data['poll_max_options'] : 1,
+ 'POLL_LENGTH' => $post_data['poll_length'])
+ );
+}
+
+// Show attachment box for adding attachments if true
+$allowed = ($auth->acl_get('f_attach', $forum_id) && $auth->acl_get('u_attach') && $config['allow_attachments'] && $form_enctype);
+
+// Attachment entry
+posting_gen_attachment_entry($attachment_data, $filename_data, $allowed);
+
+// Output page ...
+page_header($page_title, false);
+
+$template->set_filenames(array(
+ 'body' => 'posting_body.html')
+);
+
+make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
+
+// Topic review
+if ($mode == 'reply' || $mode == 'quote')
+{
+ if (topic_review($topic_id, $forum_id))
+ {
+ $template->assign_var('S_DISPLAY_REVIEW', true);
+ }
+}
+
+page_footer();
+
+/**
+* Show upload popup (progress bar)
+*/
+function upload_popup($forum_style = 0)
+{
+ global $template, $user;
+
+ ($forum_style) ? $user->setup('posting', $forum_style) : $user->setup('posting');
+
+ page_header($user->lang['PROGRESS_BAR'], false);
+
+ $template->set_filenames(array(
+ 'popup' => 'posting_progress_bar.html')
+ );
+
+ $template->assign_vars(array(
+ 'PROGRESS_BAR' => $user->img('upload_bar', $user->lang['UPLOAD_IN_PROGRESS']))
+ );
+
+ $template->display('popup');
+
+ garbage_collection();
+ exit_handler();
+}
+
+/**
+* Do the various checks required for removing posts as well as removing it
+*/
+function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data)
+{
+ global $user, $db, $auth, $config;
+ global $phpbb_root_path, $phpEx;
+
+ // If moderator removing post or user itself removing post, present a confirmation screen
+ if ($auth->acl_get('m_delete', $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get('f_delete', $forum_id) && $post_id == $post_data['topic_last_post_id'] && !$post_data['post_edit_locked'] && ($post_data['post_time'] > time() - ($config['delete_time'] * 60) || !$config['delete_time'])))
+ {
+ $s_hidden_fields = build_hidden_fields(array(
+ 'p' => $post_id,
+ 'f' => $forum_id,
+ 'mode' => 'delete')
+ );
+
+ if (confirm_box(true))
+ {
+ $data = array(
+ 'topic_first_post_id' => $post_data['topic_first_post_id'],
+ 'topic_last_post_id' => $post_data['topic_last_post_id'],
+ 'topic_replies_real' => $post_data['topic_replies_real'],
+ 'topic_approved' => $post_data['topic_approved'],
+ 'topic_type' => $post_data['topic_type'],
+ 'post_approved' => $post_data['post_approved'],
+ 'post_reported' => $post_data['post_reported'],
+ 'post_time' => $post_data['post_time'],
+ 'poster_id' => $post_data['poster_id'],
+ 'post_postcount' => $post_data['post_postcount']
+ );
+
+ $next_post_id = delete_post($forum_id, $topic_id, $post_id, $data);
+ $post_username = ($post_data['poster_id'] == ANONYMOUS && !empty($post_data['post_username'])) ? $post_data['post_username'] : $post_data['username'];
+
+ if ($next_post_id === false)
+ {
+ add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_TOPIC', $post_data['topic_title'], $post_username);
+
+ $meta_info = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id");
+ $message = $user->lang['POST_DELETED'];
+ }
+ else
+ {
+ add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_POST', $post_data['post_subject'], $post_username);
+
+ $meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p=$next_post_id") . "#p$next_post_id";
+ $message = $user->lang['POST_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $meta_info . '">', '</a>');
+ }
+
+ meta_refresh(3, $meta_info);
+ $message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
+ trigger_error($message);
+ }
+ else
+ {
+ confirm_box(false, 'DELETE_POST', $s_hidden_fields);
+ }
+ }
+
+ // If we are here the user is not able to delete - present the correct error message
+ if ($post_data['poster_id'] != $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id))
+ {
+ trigger_error('DELETE_OWN_POSTS');
+ }
+
+ if ($post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id) && $post_id != $post_data['topic_last_post_id'])
+ {
+ trigger_error('CANNOT_DELETE_REPLIED');
+ }
+
+ trigger_error('USER_CANNOT_DELETE');
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/report.php b/phpBB/report.php
new file mode 100644
index 0000000000..d154acf03b
--- /dev/null
+++ b/phpBB/report.php
@@ -0,0 +1,238 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup('mcp');
+
+$forum_id = request_var('f', 0);
+$post_id = request_var('p', 0);
+$pm_id = request_var('pm', 0);
+$reason_id = request_var('reason_id', 0);
+$report_text = utf8_normalize_nfc(request_var('report_text', '', true));
+$user_notify = ($user->data['is_registered']) ? request_var('notify', 0) : false;
+
+$submit = (isset($_POST['submit'])) ? true : false;
+
+if (!$post_id && (!$pm_id || !$config['allow_pm_report']))
+{
+ trigger_error('NO_POST_SELECTED');
+}
+
+if ($post_id)
+{
+ $redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;p=$post_id") . "#p$post_id";
+ $pm_id = 0;
+}
+else
+{
+ $redirect_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&mode=view&p=$pm_id");
+ $post_id = 0;
+ $forum_id = 0;
+}
+
+// Has the report been cancelled?
+if (isset($_POST['cancel']))
+{
+ redirect($redirect_url);
+}
+
+if ($post_id)
+{
+ // Grab all relevant data
+ $sql = 'SELECT t.*, p.*
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
+ WHERE p.post_id = $post_id
+ AND p.topic_id = t.topic_id";
+ $result = $db->sql_query($sql);
+ $report_data = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$report_data)
+ {
+ trigger_error('POST_NOT_EXIST');
+ }
+
+ $forum_id = (int) ($report_data['forum_id']) ? $report_data['forum_id'] : $forum_id;
+ $topic_id = (int) $report_data['topic_id'];
+
+ $sql = 'SELECT *
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $forum_id;
+ $result = $db->sql_query($sql);
+ $forum_data = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$forum_data)
+ {
+ trigger_error('FORUM_NOT_EXIST');
+ }
+
+ // Check required permissions
+ $acl_check_ary = array('f_list' => 'POST_NOT_EXIST', 'f_read' => 'USER_CANNOT_READ', 'f_report' => 'USER_CANNOT_REPORT');
+
+ foreach ($acl_check_ary as $acl => $error)
+ {
+ if (!$auth->acl_get($acl, $forum_id))
+ {
+ trigger_error($error);
+ }
+ }
+ unset($acl_check_ary);
+
+ if ($report_data['post_reported'])
+ {
+ $message = $user->lang['ALREADY_REPORTED'];
+ $message .= '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>');
+ trigger_error($message);
+ }
+}
+else
+{
+ // Grab all relevant data
+ $sql = 'SELECT p.*, pt.*
+ FROM ' . PRIVMSGS_TABLE . ' p, ' . PRIVMSGS_TO_TABLE . " pt
+ WHERE p.msg_id = $pm_id
+ AND p.msg_id = pt.msg_id
+ AND (p.author_id = " . $user->data['user_id'] . " OR pt.user_id = " . $user->data['user_id'] . ")";
+ $result = $db->sql_query($sql);
+ $report_data = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$report_data)
+ {
+ $user->add_lang('ucp');
+ trigger_error('NO_MESSAGE');
+ }
+
+ if ($report_data['message_reported'])
+ {
+ $message = $user->lang['ALREADY_REPORTED_PM'];
+ $message .= '<br /><br />' . sprintf($user->lang['RETURN_PM'], '<a href="' . $redirect_url . '">', '</a>');
+ trigger_error($message);
+ }
+}
+
+// Submit report?
+if ($submit && $reason_id)
+{
+ $sql = 'SELECT *
+ FROM ' . REPORTS_REASONS_TABLE . "
+ WHERE reason_id = $reason_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row || (!$report_text && strtolower($row['reason_title']) == 'other'))
+ {
+ trigger_error('EMPTY_REPORT');
+ }
+
+ $sql_ary = array(
+ 'reason_id' => (int) $reason_id,
+ 'post_id' => $post_id,
+ 'pm_id' => $pm_id,
+ 'user_id' => (int) $user->data['user_id'],
+ 'user_notify' => (int) $user_notify,
+ 'report_closed' => 0,
+ 'report_time' => (int) time(),
+ 'report_text' => (string) $report_text
+ );
+
+ $sql = 'INSERT INTO ' . REPORTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ $db->sql_query($sql);
+ $report_id = $db->sql_nextid();
+
+ if ($post_id)
+ {
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET post_reported = 1
+ WHERE post_id = ' . $post_id;
+ $db->sql_query($sql);
+
+ if (!$report_data['topic_reported'])
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_reported = 1
+ WHERE topic_id = ' . $report_data['topic_id'] . '
+ OR topic_moved_id = ' . $report_data['topic_id'];
+ $db->sql_query($sql);
+ }
+
+ $lang_return = $user->lang['RETURN_TOPIC'];
+ $lang_success = $user->lang['POST_REPORTED_SUCCESS'];
+ }
+ else
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . '
+ SET message_reported = 1
+ WHERE msg_id = ' . $pm_id;
+ $db->sql_query($sql);
+
+ $sql_ary = array(
+ 'msg_id' => $pm_id,
+ 'user_id' => ANONYMOUS,
+ 'author_id' => (int) $report_data['author_id'],
+ 'pm_deleted' => 0,
+ 'pm_new' => 0,
+ 'pm_unread' => 0,
+ 'pm_replied' => 0,
+ 'pm_marked' => 0,
+ 'pm_forwarded' => 0,
+ 'folder_id' => PRIVMSGS_INBOX,
+ );
+
+ $sql = 'INSERT INTO ' . PRIVMSGS_TO_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ $db->sql_query($sql);
+
+ $lang_return = $user->lang['RETURN_PM'];
+ $lang_success = $user->lang['PM_REPORTED_SUCCESS'];
+ }
+
+ meta_refresh(3, $redirect_url);
+
+ $message = $lang_success . '<br /><br />' . sprintf($lang_return, '<a href="' . $redirect_url . '">', '</a>');
+ trigger_error($message);
+}
+
+// Generate the reasons
+display_reasons($reason_id);
+
+$template->assign_vars(array(
+ 'S_REPORT_POST' => ($pm_id) ? false : true,
+ 'REPORT_TEXT' => $report_text,
+ 'S_REPORT_ACTION' => append_sid("{$phpbb_root_path}report.$phpEx", 'f=' . $forum_id . '&amp;p=' . $post_id . '&amp;pm=' . $pm_id),
+
+ 'S_NOTIFY' => $user_notify,
+ 'S_CAN_NOTIFY' => ($user->data['is_registered']) ? true : false)
+);
+
+generate_forum_nav($forum_data);
+
+// Start output of page
+page_header($user->lang['REPORT_POST']);
+
+$template->set_filenames(array(
+ 'body' => 'report_body.html')
+);
+
+page_footer();
+
+?> \ No newline at end of file
diff --git a/phpBB/search.php b/phpBB/search.php
new file mode 100644
index 0000000000..258297d088
--- /dev/null
+++ b/phpBB/search.php
@@ -0,0 +1,1192 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup('search');
+
+// Define initial vars
+$mode = request_var('mode', '');
+$search_id = request_var('search_id', '');
+$start = max(request_var('start', 0), 0);
+$post_id = request_var('p', 0);
+$topic_id = request_var('t', 0);
+$view = request_var('view', '');
+
+$submit = request_var('submit', false);
+$keywords = utf8_normalize_nfc(request_var('keywords', '', true));
+$add_keywords = utf8_normalize_nfc(request_var('add_keywords', '', true));
+$author = request_var('author', '', true);
+$author_id = request_var('author_id', 0);
+$show_results = ($topic_id) ? 'posts' : request_var('sr', 'posts');
+$show_results = ($show_results == 'posts') ? 'posts' : 'topics';
+$search_terms = request_var('terms', 'all');
+$search_fields = request_var('sf', 'all');
+$search_child = request_var('sc', true);
+
+$sort_days = request_var('st', 0);
+$sort_key = request_var('sk', 't');
+$sort_dir = request_var('sd', 'd');
+
+$return_chars = request_var('ch', ($topic_id) ? -1 : 300);
+$search_forum = request_var('fid', array(0));
+
+// Is user able to search? Has search been disabled?
+if (!$auth->acl_get('u_search') || !$auth->acl_getf_global('f_search') || !$config['load_search'])
+{
+ $template->assign_var('S_NO_SEARCH', true);
+ trigger_error('NO_SEARCH');
+}
+
+// Check search load limit
+if ($user->load && $config['limit_search_load'] && ($user->load > doubleval($config['limit_search_load'])))
+{
+ $template->assign_var('S_NO_SEARCH', true);
+ trigger_error('NO_SEARCH_TIME');
+}
+
+// Check flood limit ... if applicable
+$interval = ($user->data['user_id'] == ANONYMOUS) ? $config['search_anonymous_interval'] : $config['search_interval'];
+if ($interval && !$auth->acl_get('u_ignoreflood'))
+{
+ if ($user->data['user_last_search'] > time() - $interval)
+ {
+ $template->assign_var('S_NO_SEARCH', true);
+ trigger_error('NO_SEARCH_TIME');
+ }
+}
+
+// Define some vars
+$limit_days = array(0 => $user->lang['ALL_RESULTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+$sort_by_text = array('a' => $user->lang['SORT_AUTHOR'], 't' => $user->lang['SORT_TIME'], 'f' => $user->lang['SORT_FORUM'], 'i' => $user->lang['SORT_TOPIC_TITLE'], 's' => $user->lang['SORT_POST_SUBJECT']);
+
+$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
+gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
+
+if ($keywords || $author || $author_id || $search_id || $submit)
+{
+ // clear arrays
+ $id_ary = array();
+
+ // egosearch is an author search
+ if ($search_id == 'egosearch')
+ {
+ $author_id = $user->data['user_id'];
+
+ if ($user->data['user_id'] == ANONYMOUS)
+ {
+ login_box('', $user->lang['LOGIN_EXPLAIN_EGOSEARCH']);
+ }
+ }
+
+ // search for unread posts needs user to be logged in
+ // if topics tracking for guests is disabled
+ if ($search_id == 'unreadposts' && !$config['load_anon_lastread'] && !$user->data['is_registered'])
+ {
+ login_box('', $user->lang['LOGIN_EXPLAIN_UNREADSEARCH']);
+ }
+
+ // If we are looking for authors get their ids
+ $author_id_ary = array();
+ $sql_author_match = '';
+ if ($author_id)
+ {
+ $author_id_ary[] = $author_id;
+ }
+ else if ($author)
+ {
+ if ((strpos($author, '*') !== false) && (utf8_strlen(str_replace(array('*', '%'), '', $author)) < $config['min_search_author_chars']))
+ {
+ trigger_error(sprintf($user->lang['TOO_FEW_AUTHOR_CHARS'], $config['min_search_author_chars']));
+ }
+
+ $sql_where = (strpos($author, '*') !== false) ? ' username_clean ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($author))) : " username_clean = '" . $db->sql_escape(utf8_clean_string($author)) . "'";
+
+ $sql = 'SELECT user_id
+ FROM ' . USERS_TABLE . "
+ WHERE $sql_where
+ AND user_type <> " . USER_IGNORE;
+ $result = $db->sql_query_limit($sql, 100);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $author_id_ary[] = (int) $row['user_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql_where = (strpos($author, '*') !== false) ? ' post_username ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($author))) : " post_username = '" . $db->sql_escape(utf8_clean_string($author)) . "'";
+
+ $sql = 'SELECT 1 as guest_post
+ FROM ' . POSTS_TABLE . "
+ WHERE $sql_where
+ AND poster_id = " . ANONYMOUS;
+ $result = $db->sql_query_limit($sql, 1);
+ $found_guest_post = $db->sql_fetchfield('guest_post');
+ $db->sql_freeresult($result);
+
+ if ($found_guest_post)
+ {
+ $author_id_ary[] = ANONYMOUS;
+ $sql_author_match = (strpos($author, '*') !== false) ? ' ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($author))) : " = '" . $db->sql_escape(utf8_clean_string($author)) . "'";
+ }
+
+ if (!sizeof($author_id_ary))
+ {
+ trigger_error('NO_SEARCH_RESULTS');
+ }
+ }
+
+ // if we search in an existing search result just add the additional keywords. But we need to use "all search terms"-mode
+ // so we can keep the old keywords in their old mode, but add the new ones as required words
+ if ($add_keywords)
+ {
+ if ($search_terms == 'all')
+ {
+ $keywords .= ' ' . $add_keywords;
+ }
+ else
+ {
+ $search_terms = 'all';
+ $keywords = implode(' |', explode(' ', preg_replace('#\s+#u', ' ', $keywords))) . ' ' .$add_keywords;
+ }
+ }
+
+ // Which forums should not be searched? Author searches are also carried out in unindexed forums
+ if (empty($keywords) && sizeof($author_id_ary))
+ {
+ $ex_fid_ary = array_keys($auth->acl_getf('!f_read', true));
+ }
+ else
+ {
+ $ex_fid_ary = array_unique(array_merge(array_keys($auth->acl_getf('!f_read', true)), array_keys($auth->acl_getf('!f_search', true))));
+ }
+
+ $not_in_fid = (sizeof($ex_fid_ary)) ? 'WHERE ' . $db->sql_in_set('f.forum_id', $ex_fid_ary, true) . " OR (f.forum_password <> '' AND fa.user_id <> " . (int) $user->data['user_id'] . ')' : "";
+
+ $sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.right_id, f.forum_password, f.forum_flags, fa.user_id
+ FROM ' . FORUMS_TABLE . ' f
+ LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa ON (fa.forum_id = f.forum_id
+ AND fa.session_id = '" . $db->sql_escape($user->session_id) . "')
+ $not_in_fid
+ ORDER BY f.left_id";
+ $result = $db->sql_query($sql);
+
+ $right_id = 0;
+ $reset_search_forum = true;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['forum_password'] && $row['user_id'] != $user->data['user_id'])
+ {
+ $ex_fid_ary[] = (int) $row['forum_id'];
+ continue;
+ }
+
+ // Exclude forums from active topics
+ if (!($row['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS) && ($search_id == 'active_topics'))
+ {
+ $ex_fid_ary[] = (int) $row['forum_id'];
+ continue;
+ }
+
+ if (sizeof($search_forum))
+ {
+ if ($search_child)
+ {
+ if (in_array($row['forum_id'], $search_forum) && $row['right_id'] > $right_id)
+ {
+ $right_id = (int) $row['right_id'];
+ }
+ else if ($row['right_id'] < $right_id)
+ {
+ continue;
+ }
+ }
+
+ if (!in_array($row['forum_id'], $search_forum))
+ {
+ $ex_fid_ary[] = (int) $row['forum_id'];
+ $reset_search_forum = false;
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+
+ // find out in which forums the user is allowed to view approved posts
+ if ($auth->acl_get('m_approve'))
+ {
+ $m_approve_fid_ary = array(-1);
+ $m_approve_fid_sql = '';
+ }
+ else if ($auth->acl_getf_global('m_approve'))
+ {
+ $m_approve_fid_ary = array_diff(array_keys($auth->acl_getf('!m_approve', true)), $ex_fid_ary);
+ $m_approve_fid_sql = ' AND (p.post_approved = 1' . ((sizeof($m_approve_fid_ary)) ? ' OR ' . $db->sql_in_set('p.forum_id', $m_approve_fid_ary, true) : '') . ')';
+ }
+ else
+ {
+ $m_approve_fid_ary = array();
+ $m_approve_fid_sql = ' AND p.post_approved = 1';
+ }
+
+ if ($reset_search_forum)
+ {
+ $search_forum = array();
+ }
+
+ // Select which method we'll use to obtain the post_id or topic_id information
+ $search_type = basename($config['search_type']);
+
+ if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
+ {
+ trigger_error('NO_SUCH_SEARCH_MODULE');
+ }
+
+ require("{$phpbb_root_path}includes/search/$search_type.$phpEx");
+
+ // We do some additional checks in the module to ensure it can actually be utilised
+ $error = false;
+ $search = new $search_type($error);
+
+ if ($error)
+ {
+ trigger_error($error);
+ }
+
+ // let the search module split up the keywords
+ if ($keywords)
+ {
+ $correct_query = $search->split_keywords($keywords, $search_terms);
+ if (!$correct_query || (empty($search->search_query) && !sizeof($author_id_ary) && !$search_id))
+ {
+ $ignored = (sizeof($search->common_words)) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], implode(' ', $search->common_words)) . '<br />' : '';
+ trigger_error($ignored . sprintf($user->lang['NO_KEYWORDS'], $search->word_length['min'], $search->word_length['max']));
+ }
+ }
+
+ if (!$keywords && sizeof($author_id_ary))
+ {
+ // if it is an author search we want to show topics by default
+ $show_results = ($topic_id) ? 'posts' : request_var('sr', ($search_id == 'egosearch') ? 'topics' : 'posts');
+ $show_results = ($show_results == 'posts') ? 'posts' : 'topics';
+ }
+
+ // define some variables needed for retrieving post_id/topic_id information
+ $sort_by_sql = array('a' => 'u.username_clean', 't' => (($show_results == 'posts') ? 'p.post_time' : 't.topic_last_post_time'), 'f' => 'f.forum_id', 'i' => 't.topic_title', 's' => (($show_results == 'posts') ? 'p.post_subject' : 't.topic_title'));
+
+ // pre-made searches
+ $sql = $field = $l_search_title = '';
+ if ($search_id)
+ {
+ switch ($search_id)
+ {
+ // Oh holy Bob, bring us some activity...
+ case 'active_topics':
+ $l_search_title = $user->lang['SEARCH_ACTIVE_TOPICS'];
+ $show_results = 'topics';
+ $sort_key = 't';
+ $sort_dir = 'd';
+ $sort_days = request_var('st', 7);
+ $sort_by_sql['t'] = 't.topic_last_post_time';
+
+ gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
+ $s_sort_key = $s_sort_dir = '';
+
+ $last_post_time_sql = ($sort_days) ? ' AND t.topic_last_post_time > ' . (time() - ($sort_days * 24 * 3600)) : '';
+
+ $sql = 'SELECT t.topic_last_post_time, t.topic_id
+ FROM ' . TOPICS_TABLE . " t
+ WHERE t.topic_moved_id = 0
+ $last_post_time_sql
+ " . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . '
+ ' . ((sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '') . '
+ ORDER BY t.topic_last_post_time DESC';
+ $field = 'topic_id';
+ break;
+
+ case 'unanswered':
+ $l_search_title = $user->lang['SEARCH_UNANSWERED'];
+ $show_results = request_var('sr', 'topics');
+ $show_results = ($show_results == 'posts') ? 'posts' : 'topics';
+ $sort_by_sql['t'] = ($show_results == 'posts') ? 'p.post_time' : 't.topic_last_post_time';
+ $sort_by_sql['s'] = ($show_results == 'posts') ? 'p.post_subject' : 't.topic_title';
+ $sql_sort = 'ORDER BY ' . $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
+
+ $sort_join = ($sort_key == 'f') ? FORUMS_TABLE . ' f, ' : '';
+ $sql_sort = ($sort_key == 'f') ? ' AND f.forum_id = p.forum_id ' . $sql_sort : $sql_sort;
+
+ if ($sort_days)
+ {
+ $last_post_time = 'AND p.post_time > ' . (time() - ($sort_days * 24 * 3600));
+ }
+ else
+ {
+ $last_post_time = '';
+ }
+
+ if ($sort_key == 'a')
+ {
+ $sort_join = USERS_TABLE . ' u, ';
+ $sql_sort = ' AND u.user_id = p.poster_id ' . $sql_sort;
+ }
+ if ($show_results == 'posts')
+ {
+ $sql = "SELECT p.post_id
+ FROM $sort_join" . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
+ WHERE t.topic_replies = 0
+ AND p.topic_id = t.topic_id
+ $last_post_time
+ $m_approve_fid_sql
+ " . ((sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '') . "
+ $sql_sort";
+ $field = 'post_id';
+ }
+ else
+ {
+ $sql = 'SELECT DISTINCT ' . $sort_by_sql[$sort_key] . ", p.topic_id
+ FROM $sort_join" . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
+ WHERE t.topic_replies = 0
+ AND t.topic_moved_id = 0
+ AND p.topic_id = t.topic_id
+ $last_post_time
+ $m_approve_fid_sql
+ " . ((sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '') . "
+ $sql_sort";
+ $field = 'topic_id';
+ }
+ break;
+
+ case 'unreadposts':
+ $l_search_title = $user->lang['SEARCH_UNREAD'];
+ // force sorting
+ $show_results = 'topics';
+ $sort_key = 't';
+ $sort_by_sql['t'] = 't.topic_last_post_time';
+ $sql_sort = 'ORDER BY ' . $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
+
+ $sql_where = 'AND t.topic_moved_id = 0
+ ' . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . '
+ ' . ((sizeof($ex_fid_ary)) ? 'AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '');
+
+ gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
+ $s_sort_key = $s_sort_dir = $u_sort_param = $s_limit_days = '';
+
+ $unread_list = array();
+ $unread_list = get_unread_topics($user->data['user_id'], $sql_where, $sql_sort);
+
+ if (!empty($unread_list))
+ {
+ $sql = 'SELECT t.topic_id
+ FROM ' . TOPICS_TABLE . ' t
+ WHERE ' . $db->sql_in_set('t.topic_id', array_keys($unread_list)) . "
+ $sql_sort";
+ $field = 'topic_id';
+ }
+ break;
+
+ case 'newposts':
+ $l_search_title = $user->lang['SEARCH_NEW'];
+ // force sorting
+ $show_results = (request_var('sr', 'topics') == 'posts') ? 'posts' : 'topics';
+ $sort_key = 't';
+ $sort_dir = 'd';
+ $sort_by_sql['t'] = ($show_results == 'posts') ? 'p.post_time' : 't.topic_last_post_time';
+ $sql_sort = 'ORDER BY ' . $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
+
+ gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
+ $s_sort_key = $s_sort_dir = $u_sort_param = $s_limit_days = '';
+
+ if ($show_results == 'posts')
+ {
+ $sql = 'SELECT p.post_id
+ FROM ' . POSTS_TABLE . ' p
+ WHERE p.post_time > ' . $user->data['user_lastvisit'] . "
+ $m_approve_fid_sql
+ " . ((sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '') . "
+ $sql_sort";
+ $field = 'post_id';
+ }
+ else
+ {
+ $sql = 'SELECT t.topic_id
+ FROM ' . TOPICS_TABLE . ' t
+ WHERE t.topic_last_post_time > ' . $user->data['user_lastvisit'] . '
+ AND t.topic_moved_id = 0
+ ' . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . '
+ ' . ((sizeof($ex_fid_ary)) ? 'AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '') . "
+ $sql_sort";
+/*
+ [Fix] queued replies missing from "view new posts" (Bug #42705 - Patch by Paul)
+ - Creates temporary table, query is far from optimized
+
+ $sql = 'SELECT t.topic_id
+ FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p
+ WHERE p.post_time > ' . $user->data['user_lastvisit'] . '
+ AND t.topic_id = p.topic_id
+ AND t.topic_moved_id = 0
+ ' . $m_approve_fid_sql . '
+ ' . ((sizeof($ex_fid_ary)) ? 'AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '') . "
+ GROUP BY t.topic_id
+ $sql_sort";
+*/
+ $field = 'topic_id';
+ }
+ break;
+
+ case 'egosearch':
+ $l_search_title = $user->lang['SEARCH_SELF'];
+ break;
+ }
+ }
+
+ // show_results should not change after this
+ $per_page = ($show_results == 'posts') ? $config['posts_per_page'] : $config['topics_per_page'];
+ $total_match_count = 0;
+
+ if ($search_id)
+ {
+ if ($sql)
+ {
+ // only return up to 1000 ids (the last one will be removed later)
+ $result = $db->sql_query_limit($sql, 1001 - $start, $start);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $id_ary[] = (int) $row[$field];
+ }
+ $db->sql_freeresult($result);
+
+ $total_match_count = sizeof($id_ary) + $start;
+ $id_ary = array_slice($id_ary, 0, $per_page);
+ }
+ else
+ {
+ $search_id = '';
+ }
+ }
+
+ // make sure that some arrays are always in the same order
+ sort($ex_fid_ary);
+ sort($m_approve_fid_ary);
+ sort($author_id_ary);
+
+ if (!empty($search->search_query))
+ {
+ $total_match_count = $search->keyword_search($show_results, $search_fields, $search_terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_id_ary, $sql_author_match, $id_ary, $start, $per_page);
+ }
+ else if (sizeof($author_id_ary))
+ {
+ $firstpost_only = ($search_fields === 'firstpost' || $search_fields == 'titleonly') ? true : false;
+ $total_match_count = $search->author_search($show_results, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_id_ary, $sql_author_match, $id_ary, $start, $per_page);
+ }
+
+ // For some searches we need to print out the "no results" page directly to allow re-sorting/refining the search options.
+ if (!sizeof($id_ary) && !$search_id)
+ {
+ trigger_error('NO_SEARCH_RESULTS');
+ }
+
+ $sql_where = '';
+
+ if (sizeof($id_ary))
+ {
+ $sql_where .= $db->sql_in_set(($show_results == 'posts') ? 'p.post_id' : 't.topic_id', $id_ary);
+ $sql_where .= (sizeof($ex_fid_ary)) ? ' AND (' . $db->sql_in_set('f.forum_id', $ex_fid_ary, true) . ' OR f.forum_id IS NULL)' : '';
+ $sql_where .= ($show_results == 'posts') ? $m_approve_fid_sql : str_replace(array('p.post_approved', 'p.forum_id'), array('t.topic_approved', 't.forum_id'), $m_approve_fid_sql);
+ }
+
+ if ($show_results == 'posts')
+ {
+ include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+ }
+ else
+ {
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ }
+
+ $user->add_lang('viewtopic');
+
+ // Grab icons
+ $icons = $cache->obtain_icons();
+
+ // Output header
+ if ($search_id && ($total_match_count > 1000))
+ {
+ // limit the number to 1000 for pre-made searches
+ $total_match_count--;
+ $l_search_matches = sprintf($user->lang['FOUND_MORE_SEARCH_MATCHES'], $total_match_count);
+ }
+ else
+ {
+ $l_search_matches = ($total_match_count == 1) ? sprintf($user->lang['FOUND_SEARCH_MATCH'], $total_match_count) : sprintf($user->lang['FOUND_SEARCH_MATCHES'], $total_match_count);
+ }
+
+ // define some vars for urls
+ $hilit = implode('|', explode(' ', preg_replace('#\s+#u', ' ', str_replace(array('+', '-', '|', '(', ')', '&quot;'), ' ', $keywords))));
+ // Do not allow *only* wildcard being used for hilight
+ $hilit = (strspn($hilit, '*') === strlen($hilit)) ? '' : $hilit;
+
+ $u_hilit = urlencode(htmlspecialchars_decode(str_replace('|', ' ', $hilit)));
+ $u_show_results = '&amp;sr=' . $show_results;
+ $u_search_forum = implode('&amp;fid%5B%5D=', $search_forum);
+
+ $u_search = append_sid("{$phpbb_root_path}search.$phpEx", $u_sort_param . $u_show_results);
+ $u_search .= ($search_id) ? '&amp;search_id=' . $search_id : '';
+ $u_search .= ($u_hilit) ? '&amp;keywords=' . urlencode(htmlspecialchars_decode($keywords)) : '';
+ $u_search .= ($search_terms != 'all') ? '&amp;terms=' . $search_terms : '';
+ $u_search .= ($topic_id) ? '&amp;t=' . $topic_id : '';
+ $u_search .= ($author) ? '&amp;author=' . urlencode(htmlspecialchars_decode($author)) : '';
+ $u_search .= ($author_id) ? '&amp;author_id=' . $author_id : '';
+ $u_search .= ($u_search_forum) ? '&amp;fid%5B%5D=' . $u_search_forum : '';
+ $u_search .= (!$search_child) ? '&amp;sc=0' : '';
+ $u_search .= ($search_fields != 'all') ? '&amp;sf=' . $search_fields : '';
+ $u_search .= ($return_chars != 300) ? '&amp;ch=' . $return_chars : '';
+
+ $template->assign_vars(array(
+ 'SEARCH_TITLE' => $l_search_title,
+ 'SEARCH_MATCHES' => $l_search_matches,
+ 'SEARCH_WORDS' => $search->search_query,
+ 'IGNORED_WORDS' => (sizeof($search->common_words)) ? implode(' ', $search->common_words) : '',
+ 'PAGINATION' => generate_pagination($u_search, $total_match_count, $per_page, $start),
+ 'PAGE_NUMBER' => on_page($total_match_count, $per_page, $start),
+ 'TOTAL_MATCHES' => $total_match_count,
+ 'SEARCH_IN_RESULTS' => ($search_id) ? false : true,
+
+ 'S_SELECT_SORT_DIR' => $s_sort_dir,
+ 'S_SELECT_SORT_KEY' => $s_sort_key,
+ 'S_SELECT_SORT_DAYS' => $s_limit_days,
+ 'S_SEARCH_ACTION' => $u_search,
+ 'S_SHOW_TOPICS' => ($show_results == 'posts') ? false : true,
+
+ 'GOTO_PAGE_IMG' => $user->img('icon_post_target', 'GOTO_PAGE'),
+ 'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
+ 'REPORTED_IMG' => $user->img('icon_topic_reported', 'TOPIC_REPORTED'),
+ 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPIC_UNAPPROVED'),
+ 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
+
+ 'U_SEARCH_WORDS' => $u_search,
+ ));
+
+ if ($sql_where)
+ {
+ if ($show_results == 'posts')
+ {
+ // @todo Joining this query to the one below?
+ $sql = 'SELECT zebra_id, friend, foe
+ FROM ' . ZEBRA_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+
+ $zebra = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $zebra[($row['friend']) ? 'friend' : 'foe'][] = $row['zebra_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT p.*, f.forum_id, f.forum_name, t.*, u.username, u.username_clean, u.user_sig, u.user_sig_bbcode_uid, u.user_colour
+ FROM ' . POSTS_TABLE . ' p
+ LEFT JOIN ' . TOPICS_TABLE . ' t ON (p.topic_id = t.topic_id)
+ LEFT JOIN ' . FORUMS_TABLE . ' f ON (p.forum_id = f.forum_id)
+ LEFT JOIN ' . USERS_TABLE . " u ON (p.poster_id = u.user_id)
+ WHERE $sql_where";
+ }
+ else
+ {
+ $sql_from = TOPICS_TABLE . ' t
+ LEFT JOIN ' . FORUMS_TABLE . ' f ON (f.forum_id = t.forum_id)
+ ' . (($sort_key == 'a') ? ' LEFT JOIN ' . USERS_TABLE . ' u ON (u.user_id = t.topic_poster) ' : '');
+ $sql_select = 't.*, f.forum_id, f.forum_name';
+
+ if ($user->data['is_registered'])
+ {
+ if ($config['load_db_track'] && $author_id !== $user->data['user_id'])
+ {
+ $sql_from .= ' LEFT JOIN ' . TOPICS_POSTED_TABLE . ' tp ON (tp.user_id = ' . $user->data['user_id'] . '
+ AND t.topic_id = tp.topic_id)';
+ $sql_select .= ', tp.topic_posted';
+ }
+
+ if ($config['load_db_lastread'])
+ {
+ $sql_from .= ' LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.user_id = ' . $user->data['user_id'] . '
+ AND t.topic_id = tt.topic_id)
+ LEFT JOIN ' . FORUMS_TRACK_TABLE . ' ft ON (ft.user_id = ' . $user->data['user_id'] . '
+ AND ft.forum_id = f.forum_id)';
+ $sql_select .= ', tt.mark_time, ft.mark_time as f_mark_time';
+ }
+ }
+
+ if ($config['load_anon_lastread'] || ($user->data['is_registered'] && !$config['load_db_lastread']))
+ {
+ $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
+ }
+
+ $sql = "SELECT $sql_select
+ FROM $sql_from
+ WHERE $sql_where";
+ }
+ $sql .= ' ORDER BY ' . $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
+ $result = $db->sql_query($sql);
+ $result_topic_id = 0;
+
+ $rowset = array();
+
+ if ($show_results == 'topics')
+ {
+ $forums = $rowset = $shadow_topic_list = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['topic_status'] == ITEM_MOVED)
+ {
+ $shadow_topic_list[$row['topic_moved_id']] = $row['topic_id'];
+ }
+
+ $rowset[$row['topic_id']] = $row;
+
+ if (!isset($forums[$row['forum_id']]) && $user->data['is_registered'] && $config['load_db_lastread'])
+ {
+ $forums[$row['forum_id']]['mark_time'] = $row['f_mark_time'];
+ }
+ $forums[$row['forum_id']]['topic_list'][] = $row['topic_id'];
+ $forums[$row['forum_id']]['rowset'][$row['topic_id']] = &$rowset[$row['topic_id']];
+ }
+ $db->sql_freeresult($result);
+
+ // If we have some shadow topics, update the rowset to reflect their topic information
+ if (sizeof($shadow_topic_list))
+ {
+ $sql = 'SELECT *
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', array_keys($shadow_topic_list));
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $orig_topic_id = $shadow_topic_list[$row['topic_id']];
+
+ // We want to retain some values
+ $row = array_merge($row, array(
+ 'topic_moved_id' => $rowset[$orig_topic_id]['topic_moved_id'],
+ 'topic_status' => $rowset[$orig_topic_id]['topic_status'],
+ 'forum_name' => $rowset[$orig_topic_id]['forum_name'])
+ );
+
+ $rowset[$orig_topic_id] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+ unset($shadow_topic_list);
+
+ foreach ($forums as $forum_id => $forum)
+ {
+ if ($user->data['is_registered'] && $config['load_db_lastread'])
+ {
+ $topic_tracking_info[$forum_id] = get_topic_tracking($forum_id, $forum['topic_list'], $forum['rowset'], array($forum_id => $forum['mark_time']), ($forum_id) ? false : $forum['topic_list']);
+ }
+ else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ $topic_tracking_info[$forum_id] = get_complete_topic_tracking($forum_id, $forum['topic_list'], ($forum_id) ? false : $forum['topic_list']);
+
+ if (!$user->data['is_registered'])
+ {
+ $user->data['user_lastmark'] = (isset($tracking_topics['l'])) ? (int) (base_convert($tracking_topics['l'], 36, 10) + $config['board_startdate']) : 0;
+ }
+ }
+ }
+ unset($forums);
+ }
+ else
+ {
+ $bbcode_bitfield = $text_only_message = '';
+ $attach_list = array();
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // We pre-process some variables here for later usage
+ $row['post_text'] = censor_text($row['post_text']);
+
+ $text_only_message = $row['post_text'];
+ // make list items visible as such
+ if ($row['bbcode_uid'])
+ {
+ $text_only_message = str_replace('[*:' . $row['bbcode_uid'] . ']', '&sdot;&nbsp;', $text_only_message);
+ // no BBCode in text only message
+ strip_bbcode($text_only_message, $row['bbcode_uid']);
+ }
+
+ if ($return_chars == -1 || utf8_strlen($text_only_message) < ($return_chars + 3))
+ {
+ $row['display_text_only'] = false;
+ $bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
+
+ // Does this post have an attachment? If so, add it to the list
+ if ($row['post_attachment'] && $config['allow_attachments'])
+ {
+ $attach_list[$row['forum_id']][] = $row['post_id'];
+ }
+ }
+ else
+ {
+ $row['post_text'] = $text_only_message;
+ $row['display_text_only'] = true;
+ }
+
+ $rowset[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ unset($text_only_message);
+
+ // Instantiate BBCode if needed
+ if ($bbcode_bitfield !== '')
+ {
+ include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+ $bbcode = new bbcode(base64_encode($bbcode_bitfield));
+ }
+
+ // Pull attachment data
+ if (sizeof($attach_list))
+ {
+ $use_attach_list = $attach_list;
+ $attach_list = array();
+
+ foreach ($use_attach_list as $forum_id => $_list)
+ {
+ if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id))
+ {
+ $attach_list = array_merge($attach_list, $_list);
+ }
+ }
+ }
+
+ if (sizeof($attach_list))
+ {
+ $sql = 'SELECT *
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('post_msg_id', $attach_list) . '
+ AND in_message = 0
+ ORDER BY filetime DESC, post_msg_id ASC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $attachments[$row['post_msg_id']][] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+ }
+
+ if ($hilit)
+ {
+ // Remove bad highlights
+ $hilit_array = array_filter(explode('|', $hilit), 'strlen');
+ foreach ($hilit_array as $key => $value)
+ {
+ $hilit_array[$key] = str_replace('\*', '\w*?', preg_quote($value, '#'));
+ $hilit_array[$key] = preg_replace('#(^|\s)\\\\w\*\?(\s|$)#', '$1\w+?$2', $hilit_array[$key]);
+ }
+ $hilit = implode('|', $hilit_array);
+ }
+
+ foreach ($rowset as $row)
+ {
+ $forum_id = $row['forum_id'];
+ $result_topic_id = $row['topic_id'];
+ $topic_title = censor_text($row['topic_title']);
+
+ // we need to select a forum id for this global topic
+ if (!$forum_id)
+ {
+ if (!isset($g_forum_id))
+ {
+ // Get a list of forums the user cannot read
+ $forum_ary = array_unique(array_keys($auth->acl_getf('!f_read', true)));
+
+ // Determine first forum the user is able to read (must not be a category)
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_type = ' . FORUM_POST;
+
+ if (sizeof($forum_ary))
+ {
+ $sql .= ' AND ' . $db->sql_in_set('forum_id', $forum_ary, true);
+ }
+
+ $result = $db->sql_query_limit($sql, 1);
+ $g_forum_id = (int) $db->sql_fetchfield('forum_id');
+ }
+ $u_forum_id = $g_forum_id;
+ }
+ else
+ {
+ $u_forum_id = $forum_id;
+ }
+
+ $view_topic_url_params = "f=$u_forum_id&amp;t=$result_topic_id" . (($u_hilit) ? "&amp;hilit=$u_hilit" : '');
+ $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);
+
+ $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
+
+ if ($show_results == 'topics')
+ {
+ if ($config['load_db_track'] && $author_id === $user->data['user_id'])
+ {
+ $row['topic_posted'] = 1;
+ }
+
+ $folder_img = $folder_alt = $topic_type = '';
+ topic_status($row, $replies, (isset($topic_tracking_info[$forum_id][$row['topic_id']]) && $row['topic_last_post_time'] > $topic_tracking_info[$forum_id][$row['topic_id']]) ? true : false, $folder_img, $folder_alt, $topic_type);
+
+ $unread_topic = (isset($topic_tracking_info[$forum_id][$row['topic_id']]) && $row['topic_last_post_time'] > $topic_tracking_info[$forum_id][$row['topic_id']]) ? true : false;
+
+ $topic_unapproved = (!$row['topic_approved'] && $auth->acl_get('m_approve', $forum_id)) ? true : false;
+ $posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $forum_id)) ? true : false;
+ $u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&amp;t=$result_topic_id", true, $user->session_id) : '';
+
+ $row['topic_title'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['topic_title']);
+
+ $tpl_ary = array(
+ 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
+ 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
+ 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
+ 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
+ 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+
+ 'PAGINATION' => topic_generate_pagination($replies, $view_topic_url),
+ 'TOPIC_TYPE' => $topic_type,
+
+ 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
+ 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
+ 'TOPIC_FOLDER_IMG_ALT' => $user->lang[$folder_alt],
+ 'TOPIC_FOLDER_IMG_WIDTH'=> $user->img($folder_img, '', false, '', 'width'),
+ 'TOPIC_FOLDER_IMG_HEIGHT' => $user->img($folder_img, '', false, '', 'height'),
+
+ 'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
+ 'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
+ 'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
+ 'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? $user->img('icon_topic_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '',
+
+ 'S_TOPIC_GLOBAL' => (!$forum_id) ? true : false,
+ 'S_TOPIC_TYPE' => $row['topic_type'],
+ 'S_USER_POSTED' => (!empty($row['mark_type'])) ? true : false,
+ 'S_UNREAD_TOPIC' => $unread_topic,
+
+ 'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_get('m_report', $forum_id)) ? true : false,
+ 'S_TOPIC_UNAPPROVED' => $topic_unapproved,
+ 'S_POSTS_UNAPPROVED' => $posts_unapproved,
+
+ 'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&amp;p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
+ 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&amp;view=unread') . '#unread',
+ 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=reports&amp;t=' . $result_topic_id, true, $user->session_id),
+ 'U_MCP_QUEUE' => $u_mcp_queue,
+ );
+ }
+ else
+ {
+ if ((isset($zebra['foe']) && in_array($row['poster_id'], $zebra['foe'])) && (!$view || $view != 'show' || $post_id != $row['post_id']))
+ {
+ $template->assign_block_vars('searchresults', array(
+ 'S_IGNORE_POST' => true,
+
+ 'L_IGNORE_POST' => sprintf($user->lang['POST_BY_FOE'], $row['username'], "<a href=\"$u_search&amp;start=$start&amp;p=" . $row['post_id'] . '&amp;view=show#p' . $row['post_id'] . '">', '</a>'))
+ );
+
+ continue;
+ }
+
+ // Replace naughty words such as farty pants
+ $row['post_subject'] = censor_text($row['post_subject']);
+
+ if ($row['display_text_only'])
+ {
+ // now find context for the searched words
+ $row['post_text'] = get_context($row['post_text'], array_filter(explode('|', $hilit), 'strlen'), $return_chars);
+ $row['post_text'] = bbcode_nl2br($row['post_text']);
+ }
+ else
+ {
+ // Second parse bbcode here
+ if ($row['bbcode_bitfield'])
+ {
+ $bbcode->bbcode_second_pass($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield']);
+ }
+
+ $row['post_text'] = bbcode_nl2br($row['post_text']);
+ $row['post_text'] = smiley_text($row['post_text']);
+
+ if (!empty($attachments[$row['post_id']]))
+ {
+ parse_attachments($forum_id, $row['post_text'], $attachments[$row['post_id']], $update_count);
+
+ // we only display inline attachments
+ unset($attachments[$row['post_id']]);
+ }
+ }
+
+ if ($hilit)
+ {
+ // post highlighting
+ $row['post_text'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['post_text']);
+ $row['post_subject'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['post_subject']);
+ }
+
+ $tpl_ary = array(
+ 'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+ 'U_POST_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
+
+ 'POST_SUBJECT' => $row['post_subject'],
+ 'POST_DATE' => (!empty($row['post_time'])) ? $user->format_date($row['post_time']) : '',
+ 'MESSAGE' => $row['post_text']
+ );
+ }
+
+ $template->assign_block_vars('searchresults', array_merge($tpl_ary, array(
+ 'FORUM_ID' => $forum_id,
+ 'TOPIC_ID' => $result_topic_id,
+ 'POST_ID' => ($show_results == 'posts') ? $row['post_id'] : false,
+
+ 'FORUM_TITLE' => $row['forum_name'],
+ 'TOPIC_TITLE' => $topic_title,
+ 'TOPIC_REPLIES' => $replies,
+ 'TOPIC_VIEWS' => $row['topic_views'],
+
+ 'U_VIEW_TOPIC' => $view_topic_url,
+ 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
+ 'U_VIEW_POST' => (!empty($row['post_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=" . $row['topic_id'] . '&amp;p=' . $row['post_id'] . (($u_hilit) ? '&amp;hilit=' . $u_hilit : '')) . '#p' . $row['post_id'] : '')
+ ));
+ }
+
+ if ($topic_id && ($topic_id == $result_topic_id))
+ {
+ $template->assign_vars(array(
+ 'SEARCH_TOPIC' => $topic_title,
+ 'U_SEARCH_TOPIC' => $view_topic_url
+ ));
+ }
+ }
+ unset($rowset);
+
+ page_header(($l_search_title) ? $l_search_title : $user->lang['SEARCH']);
+
+ $template->set_filenames(array(
+ 'body' => 'search_results.html')
+ );
+ make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
+
+ page_footer();
+}
+
+// Search forum
+$s_forums = '';
+$sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.left_id, f.right_id, f.forum_password, f.enable_indexing, fa.user_id
+ FROM ' . FORUMS_TABLE . ' f
+ LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa ON (fa.forum_id = f.forum_id
+ AND fa.session_id = '" . $db->sql_escape($user->session_id) . "')
+ ORDER BY f.left_id ASC";
+$result = $db->sql_query($sql);
+
+$right = $cat_right = $padding_inc = 0;
+$padding = $forum_list = $holding = '';
+$pad_store = array('0' => '');
+
+while ($row = $db->sql_fetchrow($result))
+{
+ if ($row['forum_type'] == FORUM_CAT && ($row['left_id'] + 1 == $row['right_id']))
+ {
+ // Non-postable forum with no subforums, don't display
+ continue;
+ }
+
+ if ($row['forum_type'] == FORUM_POST && ($row['left_id'] + 1 == $row['right_id']) && !$row['enable_indexing'])
+ {
+ // Postable forum with no subforums and indexing disabled, don't display
+ continue;
+ }
+
+ if ($row['forum_type'] == FORUM_LINK || ($row['forum_password'] && !$row['user_id']))
+ {
+ // if this forum is a link or password protected (user has not entered the password yet) then skip to the next branch
+ continue;
+ }
+
+ if ($row['left_id'] < $right)
+ {
+ $padding .= '&nbsp; &nbsp;';
+ $pad_store[$row['parent_id']] = $padding;
+ }
+ else if ($row['left_id'] > $right + 1)
+ {
+ if (isset($pad_store[$row['parent_id']]))
+ {
+ $padding = $pad_store[$row['parent_id']];
+ }
+ else
+ {
+ continue;
+ }
+ }
+
+ $right = $row['right_id'];
+
+ if ($auth->acl_gets('!f_search', '!f_list', $row['forum_id']))
+ {
+ // if the user does not have permissions to search or see this forum skip only this forum/category
+ continue;
+ }
+
+ $selected = (in_array($row['forum_id'], $search_forum)) ? ' selected="selected"' : '';
+
+ if ($row['left_id'] > $cat_right)
+ {
+ // make sure we don't forget anything
+ $s_forums .= $holding;
+ $holding = '';
+ }
+
+ if ($row['right_id'] - $row['left_id'] > 1)
+ {
+ $cat_right = max($cat_right, $row['right_id']);
+
+ $holding .= '<option value="' . $row['forum_id'] . '"' . $selected . '>' . $padding . $row['forum_name'] . '</option>';
+ }
+ else
+ {
+ $s_forums .= $holding . '<option value="' . $row['forum_id'] . '"' . $selected . '>' . $padding . $row['forum_name'] . '</option>';
+ $holding = '';
+ }
+}
+
+if ($holding)
+{
+ $s_forums .= $holding;
+}
+
+$db->sql_freeresult($result);
+unset($pad_store);
+
+if (!$s_forums)
+{
+ trigger_error('NO_SEARCH');
+}
+
+// Number of chars returned
+$s_characters = '<option value="-1">' . $user->lang['ALL_AVAILABLE'] . '</option>';
+$s_characters .= '<option value="0">0</option>';
+$s_characters .= '<option value="25">25</option>';
+$s_characters .= '<option value="50">50</option>';
+
+for ($i = 100; $i <= 1000 ; $i += 100)
+{
+ $selected = ($i == 300) ? ' selected="selected"' : '';
+ $s_characters .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
+}
+
+$s_hidden_fields = array('t' => $topic_id);
+
+if ($_SID)
+{
+ $s_hidden_fields['sid'] = $_SID;
+}
+
+if (!empty($_EXTRA_URL))
+{
+ foreach ($_EXTRA_URL as $url_param)
+ {
+ $url_param = explode('=', $url_param, 2);
+ $s_hidden_fields[$url_param[0]] = $url_param[1];
+ }
+}
+
+$template->assign_vars(array(
+ 'S_SEARCH_ACTION' => append_sid("{$phpbb_root_path}search.$phpEx", false, true, 0), // We force no ?sid= appending by using 0
+ 'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields),
+ 'S_CHARACTER_OPTIONS' => $s_characters,
+ 'S_FORUM_OPTIONS' => $s_forums,
+ 'S_SELECT_SORT_DIR' => $s_sort_dir,
+ 'S_SELECT_SORT_KEY' => $s_sort_key,
+ 'S_SELECT_SORT_DAYS' => $s_limit_days,
+ 'S_IN_SEARCH' => true,
+));
+
+// only show recent searches to search administrators
+if ($auth->acl_get('a_search'))
+{
+ // Handle large objects differently for Oracle and MSSQL
+ switch ($db->sql_layer)
+ {
+ case 'oracle':
+ $sql = 'SELECT search_time, search_keywords
+ FROM ' . SEARCH_RESULTS_TABLE . '
+ WHERE dbms_lob.getlength(search_keywords) > 0
+ ORDER BY search_time DESC';
+ break;
+
+ case 'mssql':
+ case 'mssql_odbc':
+ $sql = 'SELECT search_time, search_keywords
+ FROM ' . SEARCH_RESULTS_TABLE . '
+ WHERE DATALENGTH(search_keywords) > 0
+ ORDER BY search_time DESC';
+ break;
+
+ default:
+ $sql = 'SELECT search_time, search_keywords
+ FROM ' . SEARCH_RESULTS_TABLE . '
+ WHERE search_keywords <> \'\'
+ ORDER BY search_time DESC';
+ break;
+ }
+ $result = $db->sql_query_limit($sql, 5);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $keywords = $row['search_keywords'];
+
+ $template->assign_block_vars('recentsearch', array(
+ 'KEYWORDS' => $keywords,
+ 'TIME' => $user->format_date($row['search_time']),
+
+ 'U_KEYWORDS' => append_sid("{$phpbb_root_path}search.$phpEx", 'keywords=' . urlencode(htmlspecialchars_decode($keywords)))
+ ));
+ }
+ $db->sql_freeresult($result);
+}
+
+// Output the basic page
+page_header($user->lang['SEARCH']);
+
+$template->set_filenames(array(
+ 'body' => 'search_body.html')
+);
+make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
+
+page_footer();
+
+?> \ No newline at end of file
diff --git a/phpBB/store/.htaccess b/phpBB/store/.htaccess
new file mode 100644
index 0000000000..aa5afc1640
--- /dev/null
+++ b/phpBB/store/.htaccess
@@ -0,0 +1,4 @@
+<Files *>
+ Order Allow,Deny
+ Deny from All
+</Files> \ No newline at end of file
diff --git a/phpBB/store/index.htm b/phpBB/store/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/store/index.htm
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+</body>
+</html>
diff --git a/phpBB/style.php b/phpBB/style.php
new file mode 100644
index 0000000000..0b4c3d0d41
--- /dev/null
+++ b/phpBB/style.php
@@ -0,0 +1,293 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+
+// Report all errors, except notices
+error_reporting(E_ALL ^ E_NOTICE);
+
+require($phpbb_root_path . 'config.' . $phpEx);
+
+if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
+{
+ exit;
+}
+
+if (version_compare(PHP_VERSION, '6.0.0-dev', '<'))
+{
+ @set_magic_quotes_runtime(0);
+}
+
+// Load Extensions
+if (!empty($load_extensions))
+{
+ $load_extensions = explode(',', $load_extensions);
+
+ foreach ($load_extensions as $extension)
+ {
+ @dl(trim($extension));
+ }
+}
+
+
+$sid = (isset($_GET['sid']) && !is_array($_GET['sid'])) ? htmlspecialchars($_GET['sid']) : '';
+$id = (isset($_GET['id'])) ? intval($_GET['id']) : 0;
+
+if (strspn($sid, 'abcdefABCDEF0123456789') !== strlen($sid))
+{
+ $sid = '';
+}
+
+// This is a simple script to grab and output the requested CSS data stored in the DB
+// We include a session_id check to try and limit 3rd party linking ... unless they
+// happen to have a current session it will output nothing. We will also cache the
+// resulting CSS data for five minutes ... anything to reduce the load on the SQL
+// server a little
+if ($id)
+{
+ // Include files
+ require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx);
+ require($phpbb_root_path . 'includes/cache.' . $phpEx);
+ require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
+ require($phpbb_root_path . 'includes/constants.' . $phpEx);
+ require($phpbb_root_path . 'includes/functions.' . $phpEx);
+
+ $db = new $sql_db();
+ $cache = new cache();
+
+ // Connect to DB
+ if (!@$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false))
+ {
+ exit;
+ }
+ unset($dbpasswd);
+
+ $config = $cache->obtain_config();
+ $user = false;
+
+ if ($sid)
+ {
+ $sql = 'SELECT u.user_id, u.user_lang
+ FROM ' . SESSIONS_TABLE . ' s, ' . USERS_TABLE . " u
+ WHERE s.session_id = '" . $db->sql_escape($sid) . "'
+ AND s.session_user_id = u.user_id";
+ $result = $db->sql_query($sql);
+ $user = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+
+ $recompile = $config['load_tplcompile'];
+ if (!$user)
+ {
+ $id = ($id) ? $id : $config['default_style'];
+// Commented out because calls do not always include the SID anymore
+// $recompile = false;
+ $user = array('user_id' => ANONYMOUS);
+ }
+
+ $sql = 'SELECT s.style_id, c.theme_id, c.theme_data, c.theme_path, c.theme_name, c.theme_mtime, i.*, t.template_path
+ FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c, ' . STYLES_IMAGESET_TABLE . ' i
+ WHERE s.style_id = ' . $id . '
+ AND t.template_id = s.template_id
+ AND c.theme_id = s.theme_id
+ AND i.imageset_id = s.imageset_id';
+ $result = $db->sql_query($sql, 300);
+ $theme = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$theme)
+ {
+ exit;
+ }
+
+ if ($user['user_id'] == ANONYMOUS)
+ {
+ $user['user_lang'] = $config['default_lang'];
+ }
+
+ $user_image_lang = (file_exists($phpbb_root_path . 'styles/' . $theme['imageset_path'] . '/imageset/' . $user['user_lang'])) ? $user['user_lang'] : $config['default_lang'];
+
+ // Same query in session.php
+ $sql = 'SELECT *
+ FROM ' . STYLES_IMAGESET_DATA_TABLE . '
+ WHERE imageset_id = ' . $theme['imageset_id'] . "
+ AND image_filename <> ''
+ AND image_lang IN ('" . $db->sql_escape($user_image_lang) . "', '')";
+ $result = $db->sql_query($sql, 3600);
+
+ $img_array = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $img_array[$row['image_name']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ // gzip_compression
+ if ($config['gzip_compress'])
+ {
+ // IE6 is not able to compress the style (do not ask us why!)
+ $browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? strtolower(htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT'])) : '';
+
+ if ($browser && strpos($browser, 'msie 6.0') === false && @extension_loaded('zlib') && !headers_sent())
+ {
+ ob_start('ob_gzhandler');
+ }
+ }
+
+ // Expire time of seven days if not recached
+ $expire_time = 7*86400;
+ $recache = false;
+
+ // Re-cache stylesheet data if necessary
+ if ($recompile || empty($theme['theme_data']))
+ {
+ $recache = (empty($theme['theme_data'])) ? true : false;
+ $update_time = time();
+
+ // We test for stylesheet.css because it is faster and most likely the only file changed on common themes
+ if (!$recache && $theme['theme_mtime'] < @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css'))
+ {
+ $recache = true;
+ $update_time = @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css');
+ }
+ else if (!$recache)
+ {
+ $last_change = $theme['theme_mtime'];
+ $dir = @opendir("{$phpbb_root_path}styles/{$theme['theme_path']}/theme");
+
+ if ($dir)
+ {
+ while (($entry = readdir($dir)) !== false)
+ {
+ if (substr(strrchr($entry, '.'), 1) == 'css' && $last_change < @filemtime("{$phpbb_root_path}styles/{$theme['theme_path']}/theme/{$entry}"))
+ {
+ $recache = true;
+ break;
+ }
+ }
+ closedir($dir);
+ }
+ }
+ }
+
+ if ($recache)
+ {
+ include_once($phpbb_root_path . 'includes/acp/acp_styles.' . $phpEx);
+
+ $theme['theme_data'] = acp_styles::db_theme_data($theme);
+ $theme['theme_mtime'] = $update_time;
+
+ // Save CSS contents
+ $sql_ary = array(
+ 'theme_mtime' => $theme['theme_mtime'],
+ 'theme_data' => $theme['theme_data']
+ );
+
+ $sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE theme_id = {$theme['theme_id']}";
+ $db->sql_query($sql);
+
+ $cache->destroy('sql', STYLES_THEME_TABLE);
+ }
+
+ // Only set the expire time if the theme changed data is older than 30 minutes - to cope with changes from the ACP
+ if ($recache || $theme['theme_mtime'] > (time() - 1800))
+ {
+ header('Expires: 0');
+ }
+ else
+ {
+ header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + $expire_time));
+ }
+
+ header('Content-type: text/css; charset=UTF-8');
+
+ // Parse Theme Data
+ $replace = array(
+ '{T_THEME_PATH}' => "{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme',
+ '{T_TEMPLATE_PATH}' => "{$phpbb_root_path}styles/" . $theme['template_path'] . '/template',
+ '{T_IMAGESET_PATH}' => "{$phpbb_root_path}styles/" . $theme['imageset_path'] . '/imageset',
+ '{T_IMAGESET_LANG_PATH}' => "{$phpbb_root_path}styles/" . $theme['imageset_path'] . '/imageset/' . $user_image_lang,
+ '{T_STYLESHEET_NAME}' => $theme['theme_name'],
+ '{S_USER_LANG}' => $user['user_lang']
+ );
+
+ $theme['theme_data'] = str_replace(array_keys($replace), array_values($replace), $theme['theme_data']);
+
+ $matches = array();
+ preg_match_all('#\{IMG_([A-Za-z0-9_]*?)_(WIDTH|HEIGHT|SRC)\}#', $theme['theme_data'], $matches);
+
+ $imgs = $find = $replace = array();
+ if (isset($matches[0]) && sizeof($matches[0]))
+ {
+ foreach ($matches[1] as $i => $img)
+ {
+ $img = strtolower($img);
+ $find[] = $matches[0][$i];
+
+ if (!isset($img_array[$img]))
+ {
+ $replace[] = '';
+ continue;
+ }
+
+ if (!isset($imgs[$img]))
+ {
+ $img_data = &$img_array[$img];
+ $imgsrc = ($img_data['image_lang'] ? $img_data['image_lang'] . '/' : '') . $img_data['image_filename'];
+ $imgs[$img] = array(
+ 'src' => $phpbb_root_path . 'styles/' . $theme['imageset_path'] . '/imageset/' . $imgsrc,
+ 'width' => $img_data['image_width'],
+ 'height' => $img_data['image_height'],
+ );
+ }
+
+ switch ($matches[2][$i])
+ {
+ case 'SRC':
+ $replace[] = $imgs[$img]['src'];
+ break;
+
+ case 'WIDTH':
+ $replace[] = $imgs[$img]['width'];
+ break;
+
+ case 'HEIGHT':
+ $replace[] = $imgs[$img]['height'];
+ break;
+
+ default:
+ continue;
+ }
+ }
+
+ if (sizeof($find))
+ {
+ $theme['theme_data'] = str_replace($find, $replace, $theme['theme_data']);
+ }
+ }
+
+ echo $theme['theme_data'];
+
+ if (!empty($cache))
+ {
+ $cache->unload();
+ }
+ $db->sql_close();
+}
+
+exit;
+
+?> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/imageset/announce_read.gif b/phpBB/styles/prosilver/imageset/announce_read.gif
new file mode 100644
index 0000000000..33e4a5e852
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/announce_read.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/announce_read_locked.gif b/phpBB/styles/prosilver/imageset/announce_read_locked.gif
new file mode 100644
index 0000000000..76ead8a02c
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/announce_read_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/announce_read_locked_mine.gif b/phpBB/styles/prosilver/imageset/announce_read_locked_mine.gif
new file mode 100644
index 0000000000..2105d21f10
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/announce_read_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/announce_read_mine.gif b/phpBB/styles/prosilver/imageset/announce_read_mine.gif
new file mode 100644
index 0000000000..ad928330e6
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/announce_read_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/announce_unread.gif b/phpBB/styles/prosilver/imageset/announce_unread.gif
new file mode 100644
index 0000000000..4a789f70f0
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/announce_unread.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/announce_unread_locked.gif b/phpBB/styles/prosilver/imageset/announce_unread_locked.gif
new file mode 100644
index 0000000000..76dcc6ca71
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/announce_unread_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/announce_unread_locked_mine.gif b/phpBB/styles/prosilver/imageset/announce_unread_locked_mine.gif
new file mode 100644
index 0000000000..53782fc3dc
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/announce_unread_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/announce_unread_mine.gif b/phpBB/styles/prosilver/imageset/announce_unread_mine.gif
new file mode 100644
index 0000000000..e01e920b59
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/announce_unread_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/button_pm_forward.gif b/phpBB/styles/prosilver/imageset/en/button_pm_forward.gif
new file mode 100644
index 0000000000..3384df34be
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/en/button_pm_forward.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/button_pm_new.gif b/phpBB/styles/prosilver/imageset/en/button_pm_new.gif
new file mode 100644
index 0000000000..cc0381c6b2
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/en/button_pm_new.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/button_pm_reply.gif b/phpBB/styles/prosilver/imageset/en/button_pm_reply.gif
new file mode 100644
index 0000000000..3275b06d52
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/en/button_pm_reply.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/button_topic_locked.gif b/phpBB/styles/prosilver/imageset/en/button_topic_locked.gif
new file mode 100644
index 0000000000..b08918a24f
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/en/button_topic_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/button_topic_new.gif b/phpBB/styles/prosilver/imageset/en/button_topic_new.gif
new file mode 100644
index 0000000000..5b7b1e0e60
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/en/button_topic_new.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/button_topic_reply.gif b/phpBB/styles/prosilver/imageset/en/button_topic_reply.gif
new file mode 100644
index 0000000000..e900c80c70
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/en/button_topic_reply.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/icon_contact_pm.gif b/phpBB/styles/prosilver/imageset/en/icon_contact_pm.gif
new file mode 100644
index 0000000000..ec190118fe
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/en/icon_contact_pm.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/icon_post_edit.gif b/phpBB/styles/prosilver/imageset/en/icon_post_edit.gif
new file mode 100644
index 0000000000..19006f95a7
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/en/icon_post_edit.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/icon_post_quote.gif b/phpBB/styles/prosilver/imageset/en/icon_post_quote.gif
new file mode 100644
index 0000000000..c3708a1477
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/en/icon_post_quote.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/icon_user_online.gif b/phpBB/styles/prosilver/imageset/en/icon_user_online.gif
new file mode 100644
index 0000000000..6b571ffce0
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/en/icon_user_online.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/imageset.cfg b/phpBB/styles/prosilver/imageset/en/imageset.cfg
new file mode 100644
index 0000000000..a23eb170fb
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/en/imageset.cfg
@@ -0,0 +1,35 @@
+#
+# phpBB Imageset Configuration File
+#
+# @package phpBB3
+# @copyright (c) 2006 phpBB Group
+# @license http://opensource.org/licenses/gpl-license.php GNU Public License
+#
+#
+# At the left is the name, please do not change this
+# At the right the value is entered
+# For on/off options the valid values are on, off, 1, 0, true and false
+#
+# Values get trimmed, if you want to add a space in front or at the end of
+# the value, then enclose the value with single or double quotes.
+# Single and double quotes do not need to be escaped.
+#
+#
+
+# Images
+img_icon_contact_pm = icon_contact_pm.gif*20*28
+
+img_icon_post_edit = icon_post_edit.gif*20*42
+img_icon_post_quote = icon_post_quote.gif*20*54
+
+img_icon_user_online = icon_user_online.gif*58*58
+img_icon_user_offline =
+img_icon_user_search =
+
+img_button_pm_forward = button_pm_forward.gif*25*96
+img_button_pm_new = button_pm_new.gif*25*84
+img_button_pm_reply = button_pm_reply.gif*25*96
+
+img_button_topic_locked = button_topic_locked.gif*25*88
+img_button_topic_new = button_topic_new.gif*25*96
+img_button_topic_reply = button_topic_reply.gif*25*96
diff --git a/phpBB/styles/prosilver/imageset/en/index.htm b/phpBB/styles/prosilver/imageset/en/index.htm
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/en/index.htm
diff --git a/phpBB/styles/prosilver/imageset/forum_link.gif b/phpBB/styles/prosilver/imageset/forum_link.gif
new file mode 100644
index 0000000000..01fb1c4e1e
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/forum_link.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/forum_read.gif b/phpBB/styles/prosilver/imageset/forum_read.gif
new file mode 100644
index 0000000000..82ceee0784
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/forum_read.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/forum_read_locked.gif b/phpBB/styles/prosilver/imageset/forum_read_locked.gif
new file mode 100644
index 0000000000..450bf28c3c
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/forum_read_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/forum_read_subforum.gif b/phpBB/styles/prosilver/imageset/forum_read_subforum.gif
new file mode 100644
index 0000000000..5e97bc94ce
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/forum_read_subforum.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/forum_unread.gif b/phpBB/styles/prosilver/imageset/forum_unread.gif
new file mode 100644
index 0000000000..5a305d2470
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/forum_unread.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/forum_unread_locked.gif b/phpBB/styles/prosilver/imageset/forum_unread_locked.gif
new file mode 100644
index 0000000000..34f1d46ad7
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/forum_unread_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/forum_unread_subforum.gif b/phpBB/styles/prosilver/imageset/forum_unread_subforum.gif
new file mode 100644
index 0000000000..5ddd1b2cba
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/forum_unread_subforum.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_back_top.gif b/phpBB/styles/prosilver/imageset/icon_back_top.gif
new file mode 100644
index 0000000000..4d2b8f3822
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_back_top.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_contact_aim.gif b/phpBB/styles/prosilver/imageset/icon_contact_aim.gif
new file mode 100644
index 0000000000..be039fcde2
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_contact_aim.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_contact_email.gif b/phpBB/styles/prosilver/imageset/icon_contact_email.gif
new file mode 100644
index 0000000000..caa3683005
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_contact_email.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_contact_icq.gif b/phpBB/styles/prosilver/imageset/icon_contact_icq.gif
new file mode 100644
index 0000000000..48a09373eb
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_contact_icq.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_contact_jabber.gif b/phpBB/styles/prosilver/imageset/icon_contact_jabber.gif
new file mode 100644
index 0000000000..e335433e97
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_contact_jabber.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_contact_msnm.gif b/phpBB/styles/prosilver/imageset/icon_contact_msnm.gif
new file mode 100644
index 0000000000..b82253599b
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_contact_msnm.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_contact_www.gif b/phpBB/styles/prosilver/imageset/icon_contact_www.gif
new file mode 100644
index 0000000000..83cee9728d
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_contact_www.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_contact_yahoo.gif b/phpBB/styles/prosilver/imageset/icon_contact_yahoo.gif
new file mode 100644
index 0000000000..305f297fdb
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_contact_yahoo.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_offline.gif b/phpBB/styles/prosilver/imageset/icon_offline.gif
new file mode 100644
index 0000000000..c5e41a41db
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_offline.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_online.gif b/phpBB/styles/prosilver/imageset/icon_online.gif
new file mode 100644
index 0000000000..18e43cd0c6
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_online.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_post_delete.gif b/phpBB/styles/prosilver/imageset/icon_post_delete.gif
new file mode 100644
index 0000000000..f51ffc24a6
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_post_delete.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_post_info.gif b/phpBB/styles/prosilver/imageset/icon_post_info.gif
new file mode 100644
index 0000000000..af089d8656
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_post_info.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_post_report.gif b/phpBB/styles/prosilver/imageset/icon_post_report.gif
new file mode 100644
index 0000000000..72c6ae89d0
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_post_report.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_post_target.gif b/phpBB/styles/prosilver/imageset/icon_post_target.gif
new file mode 100644
index 0000000000..a29dbffa35
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_post_target.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_post_target_unread.gif b/phpBB/styles/prosilver/imageset/icon_post_target_unread.gif
new file mode 100644
index 0000000000..e97eeb2b2e
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_post_target_unread.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_rate_bad.gif b/phpBB/styles/prosilver/imageset/icon_rate_bad.gif
new file mode 100644
index 0000000000..7901889408
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_rate_bad.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_rate_good.gif b/phpBB/styles/prosilver/imageset/icon_rate_good.gif
new file mode 100644
index 0000000000..6d23034d71
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_rate_good.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_topic_attach.gif b/phpBB/styles/prosilver/imageset/icon_topic_attach.gif
new file mode 100644
index 0000000000..9a70638650
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_topic_attach.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_topic_latest.gif b/phpBB/styles/prosilver/imageset/icon_topic_latest.gif
new file mode 100644
index 0000000000..d79d31ac43
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_topic_latest.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_topic_newest.gif b/phpBB/styles/prosilver/imageset/icon_topic_newest.gif
new file mode 100644
index 0000000000..0aa19884b5
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_topic_newest.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_topic_reported.gif b/phpBB/styles/prosilver/imageset/icon_topic_reported.gif
new file mode 100644
index 0000000000..006b1e2291
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_topic_reported.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_topic_unapproved.gif b/phpBB/styles/prosilver/imageset/icon_topic_unapproved.gif
new file mode 100644
index 0000000000..09d8f387a7
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_topic_unapproved.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_user_warn.gif b/phpBB/styles/prosilver/imageset/icon_user_warn.gif
new file mode 100644
index 0000000000..9c4ad98e5c
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/icon_user_warn.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/imageset.cfg b/phpBB/styles/prosilver/imageset/imageset.cfg
new file mode 100644
index 0000000000..c838dffd03
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/imageset.cfg
@@ -0,0 +1,116 @@
+#
+# phpBB Imageset Configuration File
+#
+# @package phpBB3
+# @copyright (c) 2006 phpBB Group
+# @license http://opensource.org/licenses/gpl-license.php GNU Public License
+#
+#
+# At the left is the name, please do not change this
+# At the right the value is entered
+# For on/off options the valid values are on, off, 1, 0, true and false
+#
+# Values get trimmed, if you want to add a space in front or at the end of
+# the value, then enclose the value with single or double quotes.
+# Single and double quotes do not need to be escaped.
+#
+#
+
+# General Information about this style
+name = prosilver
+copyright = &copy; phpBB Group, 2007
+version = 3.0.6
+
+# Images
+img_site_logo = site_logo.gif*52*139
+img_poll_left =
+img_poll_center =
+img_poll_right =
+img_icon_friend =
+img_icon_foe =
+
+img_forum_link = forum_link.gif*27*27
+img_forum_read = forum_read.gif*27*27
+img_forum_read_locked = forum_read_locked.gif*27*27
+img_forum_read_subforum = forum_read_subforum.gif*27*27
+img_forum_unread = forum_unread.gif*27*27
+img_forum_unread_locked = forum_unread_locked.gif*27*27
+img_forum_unread_subforum = forum_unread_subforum.gif*27*27
+
+img_topic_moved = topic_moved.gif*27*27
+
+img_topic_read = topic_read.gif*27*27
+img_topic_read_mine = topic_read_mine.gif*27*27
+img_topic_read_hot = topic_read_hot.gif*27*27
+img_topic_read_hot_mine = topic_read_hot_mine.gif*27*27
+img_topic_read_locked = topic_read_locked.gif*27*27
+img_topic_read_locked_mine = topic_read_locked_mine.gif*27*27
+
+img_topic_unread = topic_unread.gif*27*27
+img_topic_unread_mine = topic_unread_mine.gif*27*27
+img_topic_unread_hot = topic_unread_hot.gif*27*27
+img_topic_unread_hot_mine = topic_unread_hot_mine.gif*27*27
+img_topic_unread_locked = topic_unread_locked.gif*27*27
+img_topic_unread_locked_mine = topic_unread_locked_mine.gif*27*27
+
+img_sticky_read = sticky_read.gif*27*27
+img_sticky_read_mine = sticky_read_mine.gif*27*27
+img_sticky_read_locked = sticky_read_locked.gif*27*27
+img_sticky_read_locked_mine = sticky_read_locked_mine.gif*27*27
+img_sticky_unread = sticky_unread.gif*27*27
+img_sticky_unread_mine = sticky_unread_mine.gif*27*27
+img_sticky_unread_locked = sticky_unread_locked.gif*27*27
+img_sticky_unread_locked_mine = sticky_unread_locked_mine.gif*27*27
+
+img_announce_read = announce_read.gif*27*27
+img_announce_read_mine = announce_read_mine.gif*27*27
+img_announce_read_locked = announce_read_locked.gif*27*27
+img_announce_read_locked_mine = announce_read_locked_mine.gif*27*27
+img_announce_unread = announce_unread.gif*27*27
+img_announce_unread_mine = announce_unread_mine.gif*27*27
+img_announce_unread_locked = announce_unread_locked.gif*27*27
+img_announce_unread_locked_mine = announce_unread_locked_mine.gif*27*27
+
+img_global_read = announce_read.gif*27*27
+img_global_read_mine = announce_read_mine.gif*27*27
+img_global_read_locked = announce_read_locked.gif*27*27
+img_global_read_locked_mine = announce_read_locked_mine.gif*27*27
+img_global_unread = announce_unread.gif*27*27
+img_global_unread_mine = announce_unread_mine.gif*27*27
+img_global_unread_locked = announce_unread_locked.gif*27*27
+img_global_unread_locked_mine = announce_unread_locked_mine.gif*27*27
+
+img_subforum_read = subforum_read.gif*9*11
+img_subforum_unread = subforum_unread.gif*9*11
+
+img_pm_read = topic_read.gif*27*27
+img_pm_unread = topic_unread.gif*27*27
+
+img_icon_back_top = icon_back_top.gif*11*11
+
+img_icon_contact_aim = icon_contact_aim.gif*20*20
+img_icon_contact_email = icon_contact_email.gif*20*20
+img_icon_contact_icq = icon_contact_icq.gif*20*20
+img_icon_contact_jabber = icon_contact_jabber.gif*20*20
+img_icon_contact_msnm = icon_contact_msnm.gif*20*20
+
+img_icon_contact_www = icon_contact_www.gif*20*20
+img_icon_contact_yahoo = icon_contact_yahoo.gif*20*20
+
+img_icon_post_delete = icon_post_delete.gif*20*20
+
+img_icon_post_info = icon_post_info.gif*20*20
+
+img_icon_post_report = icon_post_report.gif*20*20
+img_icon_post_target = icon_post_target.gif*9*11
+img_icon_post_target_unread = icon_post_target_unread.gif*9*11
+
+img_icon_topic_attach = icon_topic_attach.gif*10*7
+img_icon_topic_latest = icon_topic_latest.gif*9*11
+img_icon_topic_newest = icon_topic_newest.gif*9*11
+img_icon_topic_reported = icon_topic_reported.gif*14*16
+img_icon_topic_unapproved = icon_topic_unapproved.gif*14*16
+
+img_icon_user_profile =
+
+img_icon_user_warn = icon_user_warn.gif*20*20
diff --git a/phpBB/styles/prosilver/imageset/index.htm b/phpBB/styles/prosilver/imageset/index.htm
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/index.htm
diff --git a/phpBB/styles/prosilver/imageset/site_logo.gif b/phpBB/styles/prosilver/imageset/site_logo.gif
new file mode 100644
index 0000000000..909114c377
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/site_logo.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/sticky_read.gif b/phpBB/styles/prosilver/imageset/sticky_read.gif
new file mode 100644
index 0000000000..59e42833db
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/sticky_read.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/sticky_read_locked.gif b/phpBB/styles/prosilver/imageset/sticky_read_locked.gif
new file mode 100644
index 0000000000..79f581be79
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/sticky_read_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/sticky_read_locked_mine.gif b/phpBB/styles/prosilver/imageset/sticky_read_locked_mine.gif
new file mode 100644
index 0000000000..ad056086e5
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/sticky_read_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/sticky_read_mine.gif b/phpBB/styles/prosilver/imageset/sticky_read_mine.gif
new file mode 100644
index 0000000000..49e8b3f01c
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/sticky_read_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/sticky_unread.gif b/phpBB/styles/prosilver/imageset/sticky_unread.gif
new file mode 100644
index 0000000000..ae6d5954b1
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/sticky_unread.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/sticky_unread_locked.gif b/phpBB/styles/prosilver/imageset/sticky_unread_locked.gif
new file mode 100644
index 0000000000..5792b8649a
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/sticky_unread_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/sticky_unread_locked_mine.gif b/phpBB/styles/prosilver/imageset/sticky_unread_locked_mine.gif
new file mode 100644
index 0000000000..93495770c8
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/sticky_unread_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/sticky_unread_mine.gif b/phpBB/styles/prosilver/imageset/sticky_unread_mine.gif
new file mode 100644
index 0000000000..2580ca0518
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/sticky_unread_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/subforum_read.gif b/phpBB/styles/prosilver/imageset/subforum_read.gif
new file mode 100644
index 0000000000..595595c296
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/subforum_read.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/subforum_unread.gif b/phpBB/styles/prosilver/imageset/subforum_unread.gif
new file mode 100644
index 0000000000..b2b661dc78
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/subforum_unread.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_moved.gif b/phpBB/styles/prosilver/imageset/topic_moved.gif
new file mode 100644
index 0000000000..3275cd6ef9
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/topic_moved.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_read.gif b/phpBB/styles/prosilver/imageset/topic_read.gif
new file mode 100644
index 0000000000..0347ffc1e9
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/topic_read.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_read_hot.gif b/phpBB/styles/prosilver/imageset/topic_read_hot.gif
new file mode 100644
index 0000000000..dcb6f3bd60
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/topic_read_hot.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_read_hot_mine.gif b/phpBB/styles/prosilver/imageset/topic_read_hot_mine.gif
new file mode 100644
index 0000000000..1e5498a9be
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/topic_read_hot_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_read_locked.gif b/phpBB/styles/prosilver/imageset/topic_read_locked.gif
new file mode 100644
index 0000000000..83bc8bd02f
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/topic_read_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_read_locked_mine.gif b/phpBB/styles/prosilver/imageset/topic_read_locked_mine.gif
new file mode 100644
index 0000000000..360f9d989a
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/topic_read_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_read_mine.gif b/phpBB/styles/prosilver/imageset/topic_read_mine.gif
new file mode 100644
index 0000000000..4972a4e0a5
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/topic_read_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_unread.gif b/phpBB/styles/prosilver/imageset/topic_unread.gif
new file mode 100644
index 0000000000..542a998258
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/topic_unread.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_unread_hot.gif b/phpBB/styles/prosilver/imageset/topic_unread_hot.gif
new file mode 100644
index 0000000000..e712f6e827
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/topic_unread_hot.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_unread_hot_mine.gif b/phpBB/styles/prosilver/imageset/topic_unread_hot_mine.gif
new file mode 100644
index 0000000000..fa8b167c64
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/topic_unread_hot_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_unread_locked.gif b/phpBB/styles/prosilver/imageset/topic_unread_locked.gif
new file mode 100644
index 0000000000..4fb8fa9517
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/topic_unread_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_unread_locked_mine.gif b/phpBB/styles/prosilver/imageset/topic_unread_locked_mine.gif
new file mode 100644
index 0000000000..4ee6cfe423
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/topic_unread_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_unread_mine.gif b/phpBB/styles/prosilver/imageset/topic_unread_mine.gif
new file mode 100644
index 0000000000..e73da38df7
--- /dev/null
+++ b/phpBB/styles/prosilver/imageset/topic_unread_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg
new file mode 100644
index 0000000000..219106e9b6
--- /dev/null
+++ b/phpBB/styles/prosilver/style.cfg
@@ -0,0 +1,22 @@
+#
+# phpBB Style Configuration File
+#
+# @package phpBB3
+# @copyright (c) 2005 phpBB Group
+# @license http://opensource.org/licenses/gpl-license.php GNU Public License
+#
+#
+# At the left is the name, please do not change this
+# At the right the value is entered
+# For on/off options the valid values are on, off, 1, 0, true and false
+#
+# Values get trimmed, if you want to add a space in front or at the end of
+# the value, then enclose the value with single or double quotes.
+# Single and double quotes do not need to be escaped.
+#
+#
+
+# General Information about this style
+name = prosilver
+copyright = &copy; phpBB Group, 2007
+version = 3.0.6 \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/attachment.html b/phpBB/styles/prosilver/template/attachment.html
new file mode 100644
index 0000000000..cc5aacff2f
--- /dev/null
+++ b/phpBB/styles/prosilver/template/attachment.html
@@ -0,0 +1,122 @@
+
+<!-- BEGIN _file -->
+ <!-- IF _file.S_DENIED -->
+ <p>[{_file.DENIED_MESSAGE}]</p>
+ <!-- ELSE -->
+
+ <!-- IF _file.S_THUMBNAIL -->
+ <dl class="thumbnail">
+ <dt><a href="{_file.U_DOWNLOAD_LINK}"><img src="{_file.THUMB_IMAGE}" alt="{_file.DOWNLOAD_NAME}" title="{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}" /></a></dt>
+ <!-- IF _file.COMMENT --><dd> {_file.COMMENT}</dd><!-- ENDIF -->
+ </dl>
+ <!-- ENDIF -->
+
+
+ <!-- IF _file.S_IMAGE -->
+ <dl class="file">
+ <dt class="attach-image"><img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}" onclick="viewableArea(this);" /></dt>
+ <!-- IF _file.COMMENT --><dd><em>{_file.COMMENT}</em></dd><!-- ENDIF -->
+ <dd>{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}</dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF _file.S_FILE -->
+ <dl class="file">
+ <dt><!-- IF _file.UPLOAD_ICON -->{_file.UPLOAD_ICON} <!-- ENDIF --><a class="postlink" href="{_file.U_DOWNLOAD_LINK}">{_file.DOWNLOAD_NAME}</a></dt>
+ <!-- IF _file.COMMENT --><dd><em>{_file.COMMENT}</em></dd><!-- ENDIF -->
+ <dd>({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}</dd>
+ </dl>
+ <!-- ENDIF -->
+
+
+
+ <!-- IF _file.S_WM_FILE -->
+ <!-- method used here from http://alistapart.com/articles/byebyeembed / autosizing seems to not work always, this will not fix -->
+ <object width="320" height="285" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" id="wmstream_{_file.ATTACH_ID}">
+ <param name="url" value="{_file.U_DOWNLOAD_LINK}" />
+ <param name="showcontrols" value="1" />
+ <param name="showdisplay" value="0" />
+ <param name="showstatusbar" value="0" />
+ <param name="autosize" value="1" />
+ <param name="autostart" value="0" />
+ <param name="visible" value="1" />
+ <param name="animationstart" value="0" />
+ <param name="loop" value="0" />
+ <param name="src" value="{_file.U_DOWNLOAD_LINK}" />
+ <!--[if !IE]>-->
+ <object width="320" height="285" type="video/x-ms-wmv" data="{_file.U_DOWNLOAD_LINK}">
+ <param name="src" value="{_file.U_DOWNLOAD_LINK}" />
+ <param name="controller" value="1" />
+ <param name="showcontrols" value="1" />
+ <param name="showdisplay" value="0" />
+ <param name="showstatusbar" value="0" />
+ <param name="autosize" value="1" />
+ <param name="autostart" value="0" />
+ <param name="visible" value="1" />
+ <param name="animationstart" value="0" />
+ <param name="loop" value="0" />
+ </object>
+ <!--<![endif]-->
+ </object>
+
+ <!-- ELSEIF _file.S_FLASH_FILE -->
+ <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{_file.WIDTH}" height="{_file.HEIGHT}">
+ <param name="movie" value="{_file.U_VIEW_LINK}" />
+ <param name="play" value="true" />
+ <param name="loop" value="true" />
+ <param name="quality" value="high" />
+ <param name="allowScriptAccess" value="never" />
+ <param name="allowNetworking" value="internal" />
+ <embed src="{_file.U_VIEW_LINK}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{_file.WIDTH}" height="{_file.HEIGHT}" play="true" loop="true" quality="high" allowscriptaccess="never" allownetworking="internal"></embed>
+ </object>
+ <!-- ELSEIF _file.S_QUICKTIME_FILE -->
+ <object id="qtstream_{_file.ATTACH_ID}" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0" width="0" height="16">
+ <param name="src" value="{_file.U_DOWNLOAD_LINK}" />
+ <param name="controller" value="true" />
+ <param name="autoplay" value="false" />
+ <param name="type" value="video/quicktime" />
+ <embed name="qtstream_{_file.ATTACH_ID}" src="{_file.U_DOWNLOAD_LINK}" pluginspage="http://www.apple.com/quicktime/download/" enablejavascript="true" controller="true" width="0" height="16" type="video/quicktime" autoplay="false"></embed>
+ </object>
+ <!-- ELSEIF _file.S_RM_FILE -->
+ <object id="rmstream_{_file.ATTACH_ID}" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="200" height="50">
+ <param name="src" value="{_file.U_DOWNLOAD_LINK}" />
+ <param name="autostart" value="false" />
+ <param name="controls" value="ImageWindow" />
+ <param name="console" value="ctrls_{_file.ATTACH_ID}" />
+ <param name="prefetch" value="false" />
+ <embed name="rmstream_{_file.ATTACH_ID}" type="audio/x-pn-realaudio-plugin" src="{_file.U_DOWNLOAD_LINK}" width="0" height="0" autostart="false" controls="ImageWindow" console="ctrls_{_file.ATTACH_ID}" prefetch="false"></embed>
+ </object>
+ <br />
+ <object id="ctrls_{_file.ATTACH_ID}" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="0" height="36">
+ <param name="controls" value="ControlPanel" />
+ <param name="console" value="ctrls_{_file.ATTACH_ID}" />
+ <embed name="ctrls_{_file.ATTACH_ID}" type="audio/x-pn-realaudio-plugin" width="200" height="36" controls="ControlPanel" console="ctrls_{_file.ATTACH_ID}"></embed>
+ </object>
+
+ <script type="text/javascript">
+ // <![CDATA[
+ if (document.rmstream_{_file.ATTACH_ID}.GetClipWidth)
+ {
+ while (!document.rmstream_{_file.ATTACH_ID}.GetClipWidth())
+ {
+ }
+
+ var width = document.rmstream_{_file.ATTACH_ID}.GetClipWidth();
+ var height = document.rmstream_{_file.ATTACH_ID}.GetClipHeight();
+
+ document.rmstream_{_file.ATTACH_ID}.width = width;
+ document.rmstream_{_file.ATTACH_ID}.height = height;
+ document.ctrls_{_file.ATTACH_ID}.width = width;
+ }
+ // ]]>
+ </script>
+ <!-- ENDIF -->
+
+ <!-- IF _file.S_WM_FILE or _file.S_RM_FILE or _file.S_FLASH_FILE or _file.S_QUICKTIME_FILE -->
+ <p>
+ <!-- IF _file.S_QUICKTIME_FILE --><a href="#" onclick="play_qt_file(document.qtstream_{_file.ATTACH_ID}); return false;">[ {L_PLAY_QUICKTIME_FILE} ]</a> <!-- ENDIF -->
+ <a href="{_file.U_DOWNLOAD_LINK}">{_file.DOWNLOAD_NAME}</a> [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOAD_COUNT} ]</p>
+ <!-- ENDIF -->
+
+ <!-- ENDIF -->
+<!-- END _file -->
diff --git a/phpBB/styles/prosilver/template/bbcode.html b/phpBB/styles/prosilver/template/bbcode.html
new file mode 100644
index 0000000000..bb90c46ced
--- /dev/null
+++ b/phpBB/styles/prosilver/template/bbcode.html
@@ -0,0 +1,40 @@
+<!-- BEGIN ulist_open --><ul style="list-style-type: {LIST_TYPE}"><!-- END ulist_open -->
+<!-- BEGIN ulist_open_default --><ul><!-- END ulist_open_default -->
+<!-- BEGIN ulist_close --></ul><!-- END ulist_close -->
+
+<!-- BEGIN olist_open --><ol style="list-style-type: {LIST_TYPE}"><!-- END olist_open -->
+<!-- BEGIN olist_close --></ol><!-- END olist_close -->
+
+<!-- BEGIN listitem --><li><!-- END listitem -->
+<!-- BEGIN listitem_close --></li><!-- END listitem_close -->
+
+<!-- BEGIN quote_username_open --><blockquote><div><cite>{USERNAME} {L_WROTE}:</cite><!-- END quote_username_open -->
+<!-- BEGIN quote_open --><blockquote class="uncited"><div><!-- END quote_open -->
+<!-- BEGIN quote_close --></div></blockquote><!-- END quote_close -->
+
+<!-- BEGIN code_open --><dl class="codebox"><dt>{L_CODE}: <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></dt><dd><code><!-- END code_open -->
+<!-- BEGIN code_close --></code></dd></dl><!-- END code_close -->
+
+<!-- BEGIN inline_attachment_open --><div class="inline-attachment"><!-- END inline_attachment_open -->
+<!-- BEGIN inline_attachment_close --></div><!-- END inline_attachment_close -->
+
+<!-- BEGIN b_open --><strong><!-- END b_open -->
+<!-- BEGIN b_close --></strong><!-- END b_close -->
+
+<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open -->
+<!-- BEGIN u_close --></span><!-- END u_close -->
+
+<!-- BEGIN i_open --><em><!-- END i_open -->
+<!-- BEGIN i_close --></em><!-- END i_close -->
+
+<!-- BEGIN color --><span style="color: {COLOR}">{TEXT}</span><!-- END color -->
+
+<!-- BEGIN size --><span style="font-size: {SIZE}%; line-height: 116%;">{TEXT}</span><!-- END size -->
+
+<!-- BEGIN img --><img src="{URL}" alt="{L_IMAGE}" /><!-- END img -->
+
+<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
+
+<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->
+
+<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/captcha_default.html b/phpBB/styles/prosilver/template/captcha_default.html
new file mode 100644
index 0000000000..bccf231251
--- /dev/null
+++ b/phpBB/styles/prosilver/template/captcha_default.html
@@ -0,0 +1,24 @@
+<!-- IF S_TYPE == 1 -->
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_CONFIRMATION}</h3>
+ <p>{L_CONFIRM_EXPLAIN}</p>
+
+ <fieldset class="fields2">
+<!-- ENDIF -->
+
+ <dl>
+ <dt><label for="confirm_code">{L_CONFIRM_CODE}:</label></dt>
+ <dd><img src="{CONFIRM_IMAGE_LINK}" alt="{L_CONFIRM_CODE}" /></dd>
+ <dd><input type="text" name="confirm_code" id="confirm_code" size="8" maxlength="8" tabindex="{$CAPTCHA_TAB_INDEX}" class="inputbox narrow" title="{L_CONFIRM_CODE}" />
+ <!-- IF S_CONFIRM_REFRESH --><input type="submit" name="refresh_vc" id="refresh_vc" class="button2" value="{L_VC_REFRESH}" /><!-- ENDIF -->
+ <input type="hidden" name="confirm_id" id="confirm_id" value="{CONFIRM_ID}" /></dd>
+ <dd>{L_CONFIRM_CODE_EXPLAIN}</dd>
+ </dl>
+
+<!-- IF S_TYPE == 1 -->
+ </fieldset>
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/captcha_qa.html b/phpBB/styles/prosilver/template/captcha_qa.html
new file mode 100644
index 0000000000..0b18ada3bb
--- /dev/null
+++ b/phpBB/styles/prosilver/template/captcha_qa.html
@@ -0,0 +1,21 @@
+<!-- IF S_TYPE == 1 -->
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_CONFIRMATION}</h3>
+ <fieldset class="fields2">
+<!-- ENDIF -->
+
+ <dl>
+ <dt><label>{QA_CONFIRM_QUESTION}:</label><br /><span>{L_CONFIRM_QUESTION_EXPLAIN}</span></dt>
+ <dd>
+ <input type="text" tabindex="{$CAPTCHA_TAB_INDEX}" name="qa_answer" id="answer" size="45" class="inputbox autowidth" title="{L_ANSWER}" />
+ <input type="hidden" name="qa_confirm_id" id="qa_confirm_id" value="{QA_CONFIRM_ID}" />
+ </dd>
+ </dl>
+
+<!-- IF S_TYPE == 1 -->
+ </fieldset>
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/captcha_recaptcha.html b/phpBB/styles/prosilver/template/captcha_recaptcha.html
new file mode 100644
index 0000000000..cc4db0b760
--- /dev/null
+++ b/phpBB/styles/prosilver/template/captcha_recaptcha.html
@@ -0,0 +1,49 @@
+<!-- IF S_TYPE == 1 -->
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_CONFIRMATION}</h3>
+ <p>{L_CONFIRM_EXPLAIN}</p>
+
+ <fieldset class="fields2">
+<!-- ENDIF -->
+
+<!-- IF S_RECAPTCHA_AVAILABLE -->
+ <dl>
+ <dt><label>{L_CONFIRM_CODE}</label>:<br /><span>{L_RECAPTCHA_EXPLAIN}</span></dt>
+ <dd>
+ <script type="text/javascript">
+ // <![CDATA[
+ var RecaptchaOptions = {
+ lang : '{L_RECAPTCHA_LANG}',
+ tabindex : <!-- IF $CAPTCHA_TAB_INDEX -->{$CAPTCHA_TAB_INDEX}<!-- ELSE -->10<!-- ENDIF -->
+ };
+ // ]]>
+ </script>
+ <script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}"></script>
+ <script type="text/javascript">
+ // <![CDATA[
+ <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
+ document.getElementById('recaptcha_table').style.direction = 'ltr';
+ <!-- ENDIF -->
+ // ]]>
+ </script>
+ <noscript>
+ <div>
+ <object data="{RECAPTCHA_SERVER}/noscript?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" type="text/html" height="300" width="500"></object><br />
+ <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
+ <input type="hidden" name="recaptcha_response_field" value="manual_challenge" />
+ </div>
+ </noscript>
+
+ </dd>
+ </dl>
+<!-- ELSE -->
+{L_RECAPTCHA_NOT_AVAILABLE}
+<!-- ENDIF -->
+
+<!-- IF S_TYPE == 1 -->
+ </fieldset>
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/confirm_body.html b/phpBB/styles/prosilver/template/confirm_body.html
new file mode 100644
index 0000000000..5b783915a4
--- /dev/null
+++ b/phpBB/styles/prosilver/template/confirm_body.html
@@ -0,0 +1,20 @@
+<!-- INCLUDE overall_header.html -->
+
+<form id="confirm" action="{S_CONFIRM_ACTION}" method="post">
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h2>{MESSAGE_TITLE}</h2>
+ <p>{MESSAGE_TEXT}</p>
+
+ <fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}
+ <input type="submit" name="confirm" value="{L_YES}" class="button2" />&nbsp;
+ <input type="submit" name="cancel" value="{L_NO}" class="button2" />
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+</form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/custom_profile_fields.html b/phpBB/styles/prosilver/template/custom_profile_fields.html
new file mode 100644
index 0000000000..44c68f532b
--- /dev/null
+++ b/phpBB/styles/prosilver/template/custom_profile_fields.html
@@ -0,0 +1,31 @@
+<!-- BEGIN dropdown -->
+<select name="{dropdown.FIELD_IDENT}" id="{dropdown.FIELD_IDENT}">
+ <!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options -->
+</select>
+<!-- END dropdown -->
+
+<!-- BEGIN text -->
+<textarea name="{text.FIELD_IDENT}" id="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}" class="inputbox autowidth">{text.FIELD_VALUE}</textarea>
+<!-- END text -->
+
+<!-- BEGIN string -->
+<input type="text" class="inputbox autowidth" name="{string.FIELD_IDENT}" id="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
+<!-- END string -->
+
+<!-- BEGIN bool -->
+<!-- IF bool.FIELD_LENGTH eq 1 -->
+ <!-- BEGIN options --><label for="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}"><input type="radio" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /> {bool.options.VALUE}</label> <!-- END options -->
+<!-- ELSE -->
+ <input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}"<!-- IF bool.FIELD_VALUE --> checked="checked"<!-- ENDIF --> />
+<!-- ENDIF -->
+<!-- END bool -->
+
+<!-- BEGIN int -->
+<input type="text" class="inputbox autowidth" name="{int.FIELD_IDENT}" id="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" />
+<!-- END int -->
+
+<!-- BEGIN date -->
+<label for="{date.FIELD_IDENT}_day">{L_DAY}: <select name="{date.FIELD_IDENT}_day" id="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select></label>
+<label for="{date.FIELD_IDENT}_month">{L_MONTH}: <select name="{date.FIELD_IDENT}_month" id="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select></label>
+<label for="{date.FIELD_IDENT}_year">{L_YEAR}: <select name="{date.FIELD_IDENT}_year" id="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select></label>
+<!-- END date -->
diff --git a/phpBB/styles/prosilver/template/drafts.html b/phpBB/styles/prosilver/template/drafts.html
new file mode 100644
index 0000000000..dea3bb414e
--- /dev/null
+++ b/phpBB/styles/prosilver/template/drafts.html
@@ -0,0 +1,44 @@
+
+
+<!-- IF .draftrow -->
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_LOAD_DRAFT}</h3>
+ <p>{L_LOAD_DRAFT_EXPLAIN}</p>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="<!-- IF not S_PRIVMSGS -->forumbg<!-- ELSE -->panel<!-- ENDIF -->">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <ul class="topiclist">
+ <li class="header">
+ <dl>
+ <dt>{L_LOAD_DRAFT}</dt>
+ <dd class="posted">{L_SAVE_DATE}</dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist<!-- IF not S_PRIVMSGS --> topics<!-- ELSE --> cplist<!-- ENDIF -->">
+
+ <!-- BEGIN draftrow -->
+ <li class="row<!-- IF draftrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl>
+ <dt>
+ <a href="{draftrow.U_INSERT}" title="{L_LOAD_DRAFT}" class="topictitle">{draftrow.DRAFT_SUBJECT}</a><br />
+ <!-- IF not S_PRIVMSGS --><!-- IF draftrow.S_LINK_TOPIC -->{L_TOPIC}: <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a>
+ <!-- ELSEIF draftrow.S_LINK_FORUM -->{L_FORUM}: <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a>
+ <!-- ELSE -->{L_NO_TOPIC_FORUM}<!-- ENDIF --><!-- ENDIF -->
+ </dt>
+ <dd class="posted">{draftrow.DATE}</dd>
+ </dl>
+ </li>
+ <!-- END draftrow -->
+
+ </ul>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js
new file mode 100644
index 0000000000..1699f783d5
--- /dev/null
+++ b/phpBB/styles/prosilver/template/editor.js
@@ -0,0 +1,449 @@
+/**
+* bbCode control by subBlue design [ www.subBlue.com ]
+* Includes unixsafe colour palette selector by SHS`
+*/
+
+// Startup variables
+var imageTag = false;
+var theSelection = false;
+
+var bbcodeEnabled = true;
+// Check for Browser & Platform for PC & IE specific bits
+// More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
+var clientPC = navigator.userAgent.toLowerCase(); // Get client info
+var clientVer = parseInt(navigator.appVersion); // Get browser version
+
+var is_ie = ((clientPC.indexOf('msie') != -1) && (clientPC.indexOf('opera') == -1));
+var is_win = ((clientPC.indexOf('win') != -1) || (clientPC.indexOf('16bit') != -1));
+var baseHeight;
+
+/**
+* Shows the help messages in the helpline window
+*/
+function helpline(help)
+{
+ document.forms[form_name].helpbox.value = help_line[help];
+}
+
+/**
+* Fix a bug involving the TextRange object. From
+* http://www.frostjedi.com/terra/scripts/demo/caretBug.html
+*/
+function initInsertions()
+{
+ var doc;
+
+ if (document.forms[form_name])
+ {
+ doc = document;
+ }
+ else
+ {
+ doc = opener.document;
+ }
+
+ var textarea = doc.forms[form_name].elements[text_name];
+
+ if (is_ie && typeof(baseHeight) != 'number')
+ {
+ textarea.focus();
+ baseHeight = doc.selection.createRange().duplicate().boundingHeight;
+
+ if (!document.forms[form_name])
+ {
+ document.body.focus();
+ }
+ }
+}
+
+/**
+* bbstyle
+*/
+function bbstyle(bbnumber)
+{
+ if (bbnumber != -1)
+ {
+ bbfontstyle(bbtags[bbnumber], bbtags[bbnumber+1]);
+ }
+ else
+ {
+ insert_text('[*]');
+ document.forms[form_name].elements[text_name].focus();
+ }
+}
+
+/**
+* Apply bbcodes
+*/
+function bbfontstyle(bbopen, bbclose)
+{
+ theSelection = false;
+
+ var textarea = document.forms[form_name].elements[text_name];
+
+ textarea.focus();
+
+ if ((clientVer >= 4) && is_ie && is_win)
+ {
+ // Get text selection
+ theSelection = document.selection.createRange().text;
+
+ if (theSelection)
+ {
+ // Add tags around selection
+ document.selection.createRange().text = bbopen + theSelection + bbclose;
+ document.forms[form_name].elements[text_name].focus();
+ theSelection = '';
+ return;
+ }
+ }
+ else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0))
+ {
+ mozWrap(document.forms[form_name].elements[text_name], bbopen, bbclose);
+ document.forms[form_name].elements[text_name].focus();
+ theSelection = '';
+ return;
+ }
+
+ //The new position for the cursor after adding the bbcode
+ var caret_pos = getCaretPosition(textarea).start;
+ var new_pos = caret_pos + bbopen.length;
+
+ // Open tag
+ insert_text(bbopen + bbclose);
+
+ // Center the cursor when we don't have a selection
+ // Gecko and proper browsers
+ if (!isNaN(textarea.selectionStart))
+ {
+ textarea.selectionStart = new_pos;
+ textarea.selectionEnd = new_pos;
+ }
+ // IE
+ else if (document.selection)
+ {
+ var range = textarea.createTextRange();
+ range.move("character", new_pos);
+ range.select();
+ storeCaret(textarea);
+ }
+
+ textarea.focus();
+ return;
+}
+
+/**
+* Insert text at position
+*/
+function insert_text(text, spaces, popup)
+{
+ var textarea;
+
+ if (!popup)
+ {
+ textarea = document.forms[form_name].elements[text_name];
+ }
+ else
+ {
+ textarea = opener.document.forms[form_name].elements[text_name];
+ }
+ if (spaces)
+ {
+ text = ' ' + text + ' ';
+ }
+
+ if (!isNaN(textarea.selectionStart))
+ {
+ var sel_start = textarea.selectionStart;
+ var sel_end = textarea.selectionEnd;
+
+ mozWrap(textarea, text, '')
+ textarea.selectionStart = sel_start + text.length;
+ textarea.selectionEnd = sel_end + text.length;
+ }
+ else if (textarea.createTextRange && textarea.caretPos)
+ {
+ if (baseHeight != textarea.caretPos.boundingHeight)
+ {
+ textarea.focus();
+ storeCaret(textarea);
+ }
+
+ var caret_pos = textarea.caretPos;
+ caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text;
+ }
+ else
+ {
+ textarea.value = textarea.value + text;
+ }
+ if (!popup)
+ {
+ textarea.focus();
+ }
+}
+
+/**
+* Add inline attachment at position
+*/
+function attach_inline(index, filename)
+{
+ insert_text('[attachment=' + index + ']' + filename + '[/attachment]');
+ document.forms[form_name].elements[text_name].focus();
+}
+
+/**
+* Add quote text to message
+*/
+function addquote(post_id, username)
+{
+ var message_name = 'message_' + post_id;
+ var theSelection = '';
+ var divarea = false;
+
+ if (document.all)
+ {
+ divarea = document.all[message_name];
+ }
+ else
+ {
+ divarea = document.getElementById(message_name);
+ }
+
+ // Get text selection - not only the post content :(
+ if (window.getSelection)
+ {
+ theSelection = window.getSelection().toString();
+ }
+ else if (document.getSelection)
+ {
+ theSelection = document.getSelection();
+ }
+ else if (document.selection)
+ {
+ theSelection = document.selection.createRange().text;
+ }
+
+ if (theSelection == '' || typeof theSelection == 'undefined' || theSelection == null)
+ {
+ if (divarea.innerHTML)
+ {
+ theSelection = divarea.innerHTML.replace(/<br>/ig, '\n');
+ theSelection = theSelection.replace(/<br\/>/ig, '\n');
+ theSelection = theSelection.replace(/&lt\;/ig, '<');
+ theSelection = theSelection.replace(/&gt\;/ig, '>');
+ theSelection = theSelection.replace(/&amp\;/ig, '&');
+ theSelection = theSelection.replace(/&nbsp\;/ig, ' ');
+ }
+ else if (document.all)
+ {
+ theSelection = divarea.innerText;
+ }
+ else if (divarea.textContent)
+ {
+ theSelection = divarea.textContent;
+ }
+ else if (divarea.firstChild.nodeValue)
+ {
+ theSelection = divarea.firstChild.nodeValue;
+ }
+ }
+
+ if (theSelection)
+ {
+ if (bbcodeEnabled)
+ {
+ insert_text('[quote="' + username + '"]' + theSelection + '[/quote]');
+ }
+ else
+ {
+ var lines = split_lines(theSelection);
+ for (i = 0; i < lines.length; i++)
+ {
+ insert_text('> ' + lines[i] + '\n')
+ }
+ }
+ }
+
+ return;
+}
+
+function split_lines(text)
+{
+ var lines = text.split('\n');
+ var splitLines = new Array();
+ var j = 0;
+ for(i = 0; i < lines.length; i++)
+ {
+ if (lines[i].length <= 80)
+ {
+ splitLines[j] = lines[i];
+ j++;
+ }
+ else
+ {
+ var line = lines[i];
+ do
+ {
+ var splitAt = line.indexOf(' ', 80);
+
+ if (splitAt == -1)
+ {
+ splitLines[j] = line;
+ j++
+ }
+ else
+ {
+ splitLines[j] = line.substring(0, splitAt);
+ line = line.substring(splitAt);
+ j++;
+ }
+ }
+ while(splitAt != -1)
+ }
+ }
+ return splitLines;
+}
+/**
+* From http://www.massless.org/mozedit/
+*/
+function mozWrap(txtarea, open, close)
+{
+ var selLength = (typeof(txtarea.textLength) == 'undefined') ? txtarea.value.length : txtarea.textLength;
+ var selStart = txtarea.selectionStart;
+ var selEnd = txtarea.selectionEnd;
+ var scrollTop = txtarea.scrollTop;
+
+ if (selEnd == 1 || selEnd == 2)
+ {
+ selEnd = selLength;
+ }
+
+ var s1 = (txtarea.value).substring(0,selStart);
+ var s2 = (txtarea.value).substring(selStart, selEnd)
+ var s3 = (txtarea.value).substring(selEnd, selLength);
+
+ txtarea.value = s1 + open + s2 + close + s3;
+ txtarea.selectionStart = selEnd + open.length + close.length;
+ txtarea.selectionEnd = txtarea.selectionStart;
+ txtarea.focus();
+ txtarea.scrollTop = scrollTop;
+
+ return;
+}
+
+/**
+* Insert at Caret position. Code from
+* http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
+*/
+function storeCaret(textEl)
+{
+ if (textEl.createTextRange)
+ {
+ textEl.caretPos = document.selection.createRange().duplicate();
+ }
+}
+
+/**
+* Color pallette
+*/
+function colorPalette(dir, width, height)
+{
+ var r = 0, g = 0, b = 0;
+ var numberList = new Array(6);
+ var color = '';
+
+ numberList[0] = '00';
+ numberList[1] = '40';
+ numberList[2] = '80';
+ numberList[3] = 'BF';
+ numberList[4] = 'FF';
+
+ document.writeln('<table cellspacing="1" cellpadding="0" border="0">');
+
+ for (r = 0; r < 5; r++)
+ {
+ if (dir == 'h')
+ {
+ document.writeln('<tr>');
+ }
+
+ for (g = 0; g < 5; g++)
+ {
+ if (dir == 'v')
+ {
+ document.writeln('<tr>');
+ }
+
+ for (b = 0; b < 5; b++)
+ {
+ color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
+ document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">');
+ document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
+ document.writeln('</td>');
+ }
+
+ if (dir == 'v')
+ {
+ document.writeln('</tr>');
+ }
+ }
+
+ if (dir == 'h')
+ {
+ document.writeln('</tr>');
+ }
+ }
+ document.writeln('</table>');
+}
+
+
+/**
+* Caret Position object
+*/
+function caretPosition()
+{
+ var start = null;
+ var end = null;
+}
+
+
+/**
+* Get the caret position in an textarea
+*/
+function getCaretPosition(txtarea)
+{
+ var caretPos = new caretPosition();
+
+ // simple Gecko/Opera way
+ if(txtarea.selectionStart || txtarea.selectionStart == 0)
+ {
+ caretPos.start = txtarea.selectionStart;
+ caretPos.end = txtarea.selectionEnd;
+ }
+ // dirty and slow IE way
+ else if(document.selection)
+ {
+
+ // get current selection
+ var range = document.selection.createRange();
+
+ // a new selection of the whole textarea
+ var range_all = document.body.createTextRange();
+ range_all.moveToElementText(txtarea);
+
+ // calculate selection start point by moving beginning of range_all to beginning of range
+ var sel_start;
+ for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++)
+ {
+ range_all.moveStart('character', 1);
+ }
+
+ txtarea.sel_start = sel_start;
+
+ // we ignore the end value for IE, this is already dirty enough and we don't need it
+ caretPos.start = txtarea.sel_start;
+ caretPos.end = txtarea.sel_start;
+ }
+
+ return caretPos;
+} \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/faq_body.html b/phpBB/styles/prosilver/template/faq_body.html
new file mode 100644
index 0000000000..36d677a505
--- /dev/null
+++ b/phpBB/styles/prosilver/template/faq_body.html
@@ -0,0 +1,52 @@
+<!-- INCLUDE overall_header.html -->
+
+<h2>{L_FAQ_TITLE}</h2>
+
+
+<div class="panel bg1" id="faqlinks">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="column1">
+ <!-- BEGIN faq_block -->
+ <!-- IF faq_block.SWITCH_COLUMN or (SWITCH_COLUMN_MANUALLY and faq_block.S_ROW_COUNT == 4) -->
+ </div>
+
+ <div class="column2">
+ <!-- ENDIF -->
+
+ <dl class="faq">
+ <dt><strong>{faq_block.BLOCK_TITLE}</strong></dt>
+ <!-- BEGIN faq_row -->
+ <dd><a href="#f{faq_block.S_ROW_COUNT}r{faq_block.faq_row.S_ROW_COUNT}">{faq_block.faq_row.FAQ_QUESTION}</a></dd>
+ <!-- END faq_row -->
+ </dl>
+ <!-- END faq_block -->
+ </div>
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+
+
+<div class="clear"></div>
+
+<!-- BEGIN faq_block -->
+ <div class="panel <!-- IF faq_block.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+ <h2>{faq_block.BLOCK_TITLE}</h2>
+ <!-- BEGIN faq_row -->
+ <dl class="faq">
+ <dt id="f{faq_block.S_ROW_COUNT}r{faq_block.faq_row.S_ROW_COUNT}"><strong>{faq_block.faq_row.FAQ_QUESTION}</strong></dt>
+ <dd>{faq_block.faq_row.FAQ_ANSWER}</dd>
+ <dd><a href="#faqlinks" class="top2">{L_BACK_TO_TOP}</a></dd>
+ </dl>
+ <!-- IF not faq_block.faq_row.S_LAST_ROW --><hr class="dashed" /><!-- ENDIF -->
+ <!-- END faq_row -->
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+<!-- END faq_block -->
+
+<!-- INCLUDE jumpbox.html -->
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
new file mode 100644
index 0000000000..11e4315e2a
--- /dev/null
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -0,0 +1,403 @@
+/**
+* phpBB3 forum functions
+*/
+
+/**
+* Window popup
+*/
+function popup(url, width, height, name)
+{
+ if (!name)
+ {
+ name = '_popup';
+ }
+
+ window.open(url.replace(/&amp;/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes, width=' + width);
+ return false;
+}
+
+/**
+* Jump to page
+*/
+function jumpto()
+{
+ var page = prompt(jump_page, on_page);
+
+ if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
+ {
+ if (base_url.indexOf('?') == -1)
+ {
+ document.location.href = base_url + '?start=' + ((page - 1) * per_page);
+ }
+ else
+ {
+ document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + ((page - 1) * per_page);
+ }
+ }
+}
+
+/**
+* Mark/unmark checklist
+* id = ID of parent container, name = name prefix, state = state [true/false]
+*/
+function marklist(id, name, state)
+{
+ var parent = document.getElementById(id);
+ if (!parent)
+ {
+ eval('parent = document.' + id);
+ }
+
+ if (!parent)
+ {
+ return;
+ }
+
+ var rb = parent.getElementsByTagName('input');
+
+ for (var r = 0; r < rb.length; r++)
+ {
+ if (rb[r].name.substr(0, name.length) == name)
+ {
+ rb[r].checked = state;
+ }
+ }
+}
+
+/**
+* Resize viewable area for attached image or topic review panel (possibly others to come)
+* e = element
+*/
+function viewableArea(e, itself)
+{
+ if (!e) return;
+ if (!itself)
+ {
+ e = e.parentNode;
+ }
+
+ if (!e.vaHeight)
+ {
+ // Store viewable area height before changing style to auto
+ e.vaHeight = e.offsetHeight;
+ e.vaMaxHeight = e.style.maxHeight;
+ e.style.height = 'auto';
+ e.style.maxHeight = 'none';
+ e.style.overflow = 'visible';
+ }
+ else
+ {
+ // Restore viewable area height to the default
+ e.style.height = e.vaHeight + 'px';
+ e.style.overflow = 'auto';
+ e.style.maxHeight = e.vaMaxHeight;
+ e.vaHeight = false;
+ }
+}
+
+/**
+* Set display of page element
+* s[-1,0,1] = hide,toggle display,show
+*/
+function dE(n, s)
+{
+ var e = document.getElementById(n);
+
+ if (!s)
+ {
+ s = (e.style.display == '' || e.style.display == 'block') ? -1 : 1;
+ }
+ e.style.display = (s == 1) ? 'block' : 'none';
+}
+
+/**
+* Alternate display of subPanels
+*/
+function subPanels(p)
+{
+ var i, e, t;
+
+ if (typeof(p) == 'string')
+ {
+ show_panel = p;
+ }
+
+ for (i = 0; i < panels.length; i++)
+ {
+ e = document.getElementById(panels[i]);
+ t = document.getElementById(panels[i] + '-tab');
+
+ if (e)
+ {
+ if (panels[i] == show_panel)
+ {
+ e.style.display = 'block';
+ if (t)
+ {
+ t.className = 'activetab';
+ }
+ }
+ else
+ {
+ e.style.display = 'none';
+ if (t)
+ {
+ t.className = '';
+ }
+ }
+ }
+ }
+}
+
+/**
+* Call print preview
+*/
+function printPage()
+{
+ if (is_ie)
+ {
+ printPreview();
+ }
+ else
+ {
+ window.print();
+ }
+}
+
+/**
+* Show/hide groups of blocks
+* c = CSS style name
+* e = checkbox element
+* t = toggle dispay state (used to show 'grip-show' image in the profile block when hiding the profiles)
+*/
+function displayBlocks(c, e, t)
+{
+ var s = (e.checked == true) ? 1 : -1;
+
+ if (t)
+ {
+ s *= -1;
+ }
+
+ var divs = document.getElementsByTagName("DIV");
+
+ for (var d = 0; d < divs.length; d++)
+ {
+ if (divs[d].className.indexOf(c) == 0)
+ {
+ divs[d].style.display = (s == 1) ? 'none' : 'block';
+ }
+ }
+}
+
+function selectCode(a)
+{
+ // Get ID of code block
+ var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];
+
+ // Not IE
+ if (window.getSelection)
+ {
+ var s = window.getSelection();
+ // Safari
+ if (s.setBaseAndExtent)
+ {
+ s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
+ }
+ // Firefox and Opera
+ else
+ {
+ // workaround for bug # 42885
+ if (window.opera && e.innerHTML.substring(e.innerHTML.length - 4) == '<BR>')
+ {
+ e.innerHTML = e.innerHTML + '&nbsp;';
+ }
+
+ var r = document.createRange();
+ r.selectNodeContents(e);
+ s.removeAllRanges();
+ s.addRange(r);
+ }
+ }
+ // Some older browsers
+ else if (document.getSelection)
+ {
+ var s = document.getSelection();
+ var r = document.createRange();
+ r.selectNodeContents(e);
+ s.removeAllRanges();
+ s.addRange(r);
+ }
+ // IE
+ else if (document.selection)
+ {
+ var r = document.body.createTextRange();
+ r.moveToElementText(e);
+ r.select();
+ }
+}
+
+/**
+* Play quicktime file by determining it's width/height
+* from the displayed rectangle area
+*/
+function play_qt_file(obj)
+{
+ var rectangle = obj.GetRectangle();
+
+ if (rectangle)
+ {
+ rectangle = rectangle.split(',');
+ var x1 = parseInt(rectangle[0]);
+ var x2 = parseInt(rectangle[2]);
+ var y1 = parseInt(rectangle[1]);
+ var y2 = parseInt(rectangle[3]);
+
+ var width = (x1 < 0) ? (x1 * -1) + x2 : x2 - x1;
+ var height = (y1 < 0) ? (y1 * -1) + y2 : y2 - y1;
+ }
+ else
+ {
+ var width = 200;
+ var height = 0;
+ }
+
+ obj.width = width;
+ obj.height = height + 16;
+
+ obj.SetControllerVisible(true);
+ obj.Play();
+}
+
+/**
+* Check if the nodeName of elem is name
+* @author jQuery
+*/
+function is_node_name(elem, name)
+{
+ return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
+}
+
+/**
+* Check if elem is in array, return position
+* @author jQuery
+*/
+function is_in_array(elem, array)
+{
+ for (var i = 0, length = array.length; i < length; i++)
+ // === is correct (IE)
+ if (array[i] === elem)
+ return i;
+
+ return -1;
+}
+
+/**
+* Find Element, type and class in tree
+* Not used, but may come in handy for those not using JQuery
+* @author jQuery.find, Meik Sievertsen
+*/
+function find_in_tree(node, tag, type, class_name)
+{
+ var result, element, i = 0, length = node.childNodes.length;
+
+ for (element = node.childNodes[0]; i < length; element = node.childNodes[++i])
+ {
+ if (!element || element.nodeType != 1) continue;
+
+ if ((!tag || is_node_name(element, tag)) && (!type || element.type == type) && (!class_name || is_in_array(class_name, (element.className || element).toString().split(/\s+/)) > -1))
+ {
+ return element;
+ }
+
+ if (element.childNodes.length)
+ result = find_in_tree(element, tag, type, class_name);
+
+ if (result) return result;
+ }
+}
+
+/**
+* Usually used for onkeypress event, to submit a form on enter
+*/
+function submit_default_button(event, selector, class_name)
+{
+ // Add which for key events
+ if (!event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode))
+ event.which = event.charCode || event.keyCode;
+
+ // Keycode is not return, then return. ;)
+ if (event.which != 13)
+ return true;
+
+ var current = selector['parentNode'];
+
+ // Search parent form element
+ while (current && (!current.nodeName || current.nodeType != 1 || !is_node_name(current, 'form')) && current != document)
+ current = current['parentNode'];
+
+ // Find the input submit button with the class name
+ //current = find_in_tree(current, 'input', 'submit', class_name);
+ var input_tags = current.getElementsByTagName('input');
+ current = false;
+
+ for (var i = 0, element = input_tags[0]; i < input_tags.length; element = input_tags[++i])
+ {
+ if (element.type == 'submit' && is_in_array(class_name, (element.className || element).toString().split(/\s+/)) > -1)
+ current = element;
+ }
+
+ if (!current)
+ return true;
+
+ // Submit form
+ current.focus();
+ current.click();
+ return false;
+}
+
+/**
+* Apply onkeypress event for forcing default submit button on ENTER key press
+* The jQuery snippet used is based on http://greatwebguy.com/programming/dom/default-html-button-submit-on-enter-with-jquery/
+* The non-jQuery code is a mimick of the jQuery code ;)
+*/
+function apply_onkeypress_event()
+{
+ // jQuery code in case jQuery is used
+ if (jquery_present)
+ {
+ $('form input').live('keypress', function (e)
+ {
+ var default_button = $(this).parents('form').find('input[type=submit].default-submit-action');
+
+ if (!default_button || default_button.length <= 0)
+ return true;
+
+ if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13))
+ {
+ default_button.click();
+ return false;
+ }
+
+ return true;
+ });
+
+ return;
+ }
+
+ var input_tags = document.getElementsByTagName('input');
+
+ for (var i = 0, element = input_tags[0]; i < input_tags.length ; element = input_tags[++i])
+ {
+ if (element.type == 'hidden')
+ continue;
+
+ // onkeydown is possible too
+ element.onkeypress = function (evt) { submit_default_button((evt || window.event), this, 'default-submit-action'); };
+ }
+}
+
+/**
+* Detect JQuery existance. We currently do not deliver it, but some styles do, so why not benefit from it. ;)
+*/
+var jquery_present = typeof jQuery == 'function';
diff --git a/phpBB/styles/prosilver/template/forumlist_body.html b/phpBB/styles/prosilver/template/forumlist_body.html
new file mode 100644
index 0000000000..e9ed5d9daf
--- /dev/null
+++ b/phpBB/styles/prosilver/template/forumlist_body.html
@@ -0,0 +1,68 @@
+
+<!-- BEGIN forumrow -->
+ <!-- IF (forumrow.S_IS_CAT and not forumrow.S_FIRST_ROW) or forumrow.S_NO_CAT -->
+ </ul>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW or forumrow.S_NO_CAT -->
+ <div class="forabg">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <ul class="topiclist">
+ <li class="header">
+ <dl class="icon">
+ <dt><!-- IF forumrow.S_IS_CAT --><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a><!-- ELSE -->{L_FORUM}<!-- ENDIF --></dt>
+ <dd class="topics">{L_TOPICS}</dd>
+ <dd class="posts">{L_POSTS}</dd>
+ <dd class="lastpost"><span>{L_LAST_POST}</span></dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist forums">
+ <!-- ENDIF -->
+
+ <!-- IF not forumrow.S_IS_CAT -->
+ <li class="row">
+ <dl class="icon" style="background-image: url({forumrow.FORUM_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
+ <dt title="{forumrow.FORUM_FOLDER_IMG_ALT}">
+ <!-- IF S_ENABLE_FEEDS and forumrow.S_FEED_ENABLED --><!-- <a class="feed-icon-forum" title="{L_FEED} - {forumrow.FORUM_NAME}" href="{U_FEED}?f={forumrow.FORUM_ID}"><img src="{T_THEME_PATH}/images/feed.gif" alt="{L_FEED} - {forumrow.FORUM_NAME}" /></a> --><!-- ENDIF -->
+
+ <!-- IF forumrow.FORUM_IMAGE --><span class="forum-image">{forumrow.FORUM_IMAGE}</span><!-- ENDIF -->
+ <a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a><br />
+ {forumrow.FORUM_DESC}
+ <!-- IF forumrow.MODERATORS -->
+ <br /><strong>{forumrow.L_MODERATOR_STR}:</strong> {forumrow.MODERATORS}
+ <!-- ENDIF -->
+ <!-- IF forumrow.SUBFORUMS and forumrow.S_LIST_SUBFORUMS --><br /><strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}<!-- ENDIF -->
+ </dt>
+ <!-- IF forumrow.CLICKS -->
+ <dd class="redirect"><span>{L_REDIRECTS}: {forumrow.CLICKS}</span></dd>
+ <!-- ELSEIF not forumrow.S_IS_LINK -->
+ <dd class="topics">{forumrow.TOPICS} <dfn>{L_TOPICS}</dfn></dd>
+ <dd class="posts">{forumrow.POSTS} <dfn>{L_POSTS}</dfn></dd>
+ <dd class="lastpost"><span>
+ <!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}">{UNAPPROVED_IMG}</a><!-- ENDIF -->
+ <!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn> {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
+ <!-- IF not S_IS_BOT --><a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{forumrow.LAST_POST_TIME}<!-- ELSE -->{L_NO_POSTS}<br />&nbsp;<!-- ENDIF --></span>
+ </dd>
+ <!-- ENDIF -->
+ </dl>
+ </li>
+ <!-- ENDIF -->
+
+ <!-- IF forumrow.S_LAST_ROW -->
+ </ul>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
+
+<!-- BEGINELSE -->
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <strong>{L_NO_FORUMS}</strong>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+<!-- END forumrow -->
diff --git a/phpBB/styles/prosilver/template/index.htm b/phpBB/styles/prosilver/template/index.htm
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/phpBB/styles/prosilver/template/index.htm
diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html
new file mode 100644
index 0000000000..3ed8724361
--- /dev/null
+++ b/phpBB/styles/prosilver/template/index_body.html
@@ -0,0 +1,47 @@
+<!-- INCLUDE overall_header.html -->
+
+<p class="{S_CONTENT_FLOW_END}<!-- IF S_USER_LOGGED_IN --> rightside<!-- ENDIF -->"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ELSE -->{CURRENT_TIME}<!-- ENDIF --></p>
+<!-- IF U_MCP --><p>{CURRENT_TIME} <br />[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ELSEIF S_USER_LOGGED_IN --><p>{CURRENT_TIME}</p><!-- ENDIF -->
+
+<!-- IF S_DISPLAY_SEARCH or (S_USER_LOGGED_IN and not S_IS_BOT) -->
+<ul class="linklist">
+ <!-- IF S_DISPLAY_SEARCH -->
+ <li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><!-- IF S_USER_LOGGED_IN --> &bull; <a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a> &bull; <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF --> &bull; <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li>
+ <!-- ENDIF -->
+ <!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
+</ul>
+<!-- ENDIF -->
+
+<!-- INCLUDE forumlist_body.html -->
+
+<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
+ <form method="post" action="{S_LOGIN_ACTION}" class="headerspace">
+ <h3><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a><!-- IF S_REGISTER_ENABLED -->&nbsp; &bull; &nbsp;<a href="{U_REGISTER}">{L_REGISTER}</a><!-- ENDIF --></h3>
+ <fieldset class="quick-login">
+ <label for="username">{L_USERNAME}:</label>&nbsp;<input type="text" name="username" id="username" size="10" class="inputbox" title="{L_USERNAME}" />
+ <label for="password">{L_PASSWORD}:</label>&nbsp;<input type="password" name="password" id="password" size="10" class="inputbox" title="{L_PASSWORD}" />
+ <!-- IF S_AUTOLOGIN_ENABLED -->
+ | <label for="autologin">{L_LOG_ME_IN} <input type="checkbox" name="autologin" id="autologin" /></label>
+ <!-- ENDIF -->
+ <input type="submit" name="login" value="{L_LOGIN}" class="button2" />
+ </fieldset>
+ </form>
+<!-- ENDIF -->
+
+<!-- IF S_DISPLAY_ONLINE_LIST -->
+ <!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
+ <p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
+ <!-- IF LEGEND --><br /><em>{L_LEGEND}: {LEGEND}</em><!-- ENDIF --></p>
+<!-- ENDIF -->
+
+<!-- IF S_DISPLAY_BIRTHDAY_LIST and BIRTHDAY_LIST -->
+ <h3>{L_BIRTHDAYS}</h3>
+ <p><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <strong>{BIRTHDAY_LIST}</strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p>
+<!-- ENDIF -->
+
+<!-- IF NEWEST_USER -->
+ <h3>{L_STATISTICS}</h3>
+ <p>{TOTAL_POSTS} &bull; {TOTAL_TOPICS} &bull; {TOTAL_USERS} &bull; {NEWEST_USER}</p>
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/jumpbox.html b/phpBB/styles/prosilver/template/jumpbox.html
new file mode 100644
index 0000000000..f7b4fca609
--- /dev/null
+++ b/phpBB/styles/prosilver/template/jumpbox.html
@@ -0,0 +1,33 @@
+
+<!-- IF S_VIEWTOPIC -->
+ <p></p><p><a href="{U_VIEW_FORUM}" class="left-box {S_CONTENT_FLOW_BEGIN}" accesskey="r">{L_RETURN_TO} {FORUM_NAME}</a></p>
+<!-- ELSEIF S_VIEWFORUM -->
+ <p></p><p><a href="{U_INDEX}" class="left-box {S_CONTENT_FLOW_BEGIN}" accesskey="r">{L_RETURN_TO} {L_INDEX}</a></p>
+<!-- ELSEIF SEARCH_TOPIC -->
+ <p></p><p><a class="left-box {S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}" accesskey="r">{L_RETURN_TO}: {SEARCH_TOPIC}</a></p>
+<!-- ELSEIF S_SEARCH_ACTION -->
+ <p></p><p><a class="left-box {S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}" accesskey="r">{L_RETURN_TO_SEARCH_ADV}</a></p>
+<!-- ENDIF -->
+
+<!-- IF S_DISPLAY_JUMPBOX -->
+ <form method="post" id="jumpbox" action="{S_JUMPBOX_ACTION}" onsubmit="if(document.jumpbox.f.value == -1){return false;}">
+
+ <!-- IF $CUSTOM_FIELDSET_CLASS -->
+ <fieldset class="{$CUSTOM_FIELDSET_CLASS}">
+ <!-- ELSE -->
+ <fieldset class="jumpbox">
+ <!-- ENDIF -->
+ <label for="f" accesskey="j"><!-- IF S_IN_MCP and S_MERGE_SELECT -->{L_SELECT_TOPICS_FROM}<!-- ELSEIF S_IN_MCP -->{L_MODERATE_FORUM}<!-- ELSE -->{L_JUMP_TO}<!-- ENDIF -->:</label>
+ <select name="f" id="f" onchange="if(this.options[this.selectedIndex].value != -1){ document.forms['jumpbox'].submit() }">
+ <!-- BEGIN jumpbox_forums -->
+ <!-- IF jumpbox_forums.S_FORUM_COUNT == 1 --><option value="-1">------------------</option><!-- ENDIF -->
+ <option value="{jumpbox_forums.FORUM_ID}"{jumpbox_forums.SELECTED}><!-- BEGIN level -->&nbsp; &nbsp;<!-- END level -->{jumpbox_forums.FORUM_NAME}</option>
+ <!-- END jumpbox_forums -->
+ </select>
+ <input type="submit" value="{L_GO}" class="button2" />
+ </fieldset>
+ </form>
+
+<!-- ELSE -->
+ <br /><br />
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/login_body.html b/phpBB/styles/prosilver/template/login_body.html
new file mode 100644
index 0000000000..495e8661b9
--- /dev/null
+++ b/phpBB/styles/prosilver/template/login_body.html
@@ -0,0 +1,64 @@
+<!-- INCLUDE overall_header.html -->
+
+<form action="{S_LOGIN_ACTION}" method="post" id="login">
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+ <h2><!-- IF LOGIN_EXPLAIN -->{LOGIN_EXPLAIN}<!-- ELSE -->{L_LOGIN}<!-- ENDIF --></h2>
+
+ <fieldset <!-- IF not S_CONFIRM_CODE -->class="fields1"<!-- ELSE -->class="fields2"<!-- ENDIF -->>
+ <!-- IF LOGIN_ERROR --><div class="error">{LOGIN_ERROR}</div><!-- ENDIF -->
+ <dl>
+ <dt><label for="{USERNAME_CREDENTIAL}">{L_USERNAME}:</label></dt>
+ <dd><input type="text" tabindex="1" name="{USERNAME_CREDENTIAL}" id="{USERNAME_CREDENTIAL}" size="25" value="{USERNAME}" class="inputbox autowidth" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="{PASSWORD_CREDENTIAL}">{L_PASSWORD}:</label></dt>
+ <dd><input type="password" tabindex="2" id="{PASSWORD_CREDENTIAL}" name="{PASSWORD_CREDENTIAL}" size="25" class="inputbox autowidth" /></dd>
+ <!-- IF S_DISPLAY_FULL_LOGIN and (U_SEND_PASSWORD or U_RESEND_ACTIVATION) -->
+ <!-- IF U_SEND_PASSWORD --><dd><a href="{U_SEND_PASSWORD}">{L_FORGOT_PASS}</a></dd><!-- ENDIF -->
+ <!-- IF U_RESEND_ACTIVATION --><dd><a href="{U_RESEND_ACTIVATION}">{L_RESEND_ACTIVATION}</a></dd><!-- ENDIF -->
+ <!-- ENDIF -->
+ </dl>
+ <!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
+ <!-- DEFINE $CAPTCHA_TAB_INDEX = 3 -->
+ <!-- INCLUDE {CAPTCHA_TEMPLATE} -->
+ <!-- ENDIF -->
+ <!-- IF S_DISPLAY_FULL_LOGIN -->
+ <dl>
+ <!-- IF S_AUTOLOGIN_ENABLED --><dd><label for="autologin"><input type="checkbox" name="autologin" id="autologin" tabindex="4" /> {L_LOG_ME_IN}</label></dd><!-- ENDIF -->
+ <dd><label for="viewonline"><input type="checkbox" name="viewonline" id="viewonline" tabindex="5" /> {L_HIDE_ME}</label></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <dl>
+ <dt>&nbsp;</dt>
+ <dd>{S_HIDDEN_FIELDS}<input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" /></dd>
+ </dl>
+
+ </fieldset>
+ </div>
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+
+<!-- IF not S_ADMIN_AUTH and S_REGISTER_ENABLED -->
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+ <h3>{L_REGISTER}</h3>
+ <p>{L_LOGIN_INFO}</p>
+ <p><strong><a href="{U_TERMS_USE}">{L_TERMS_USE}</a> | <a href="{U_PRIVACY}">{L_PRIVACY}</a></strong></p>
+ <hr class="dashed" />
+ <p><a href="{U_REGISTER}" class="button2">{L_REGISTER}</a></p>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+<!-- ENDIF -->
+
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/login_forum.html b/phpBB/styles/prosilver/template/login_forum.html
new file mode 100644
index 0000000000..1278a2e9a8
--- /dev/null
+++ b/phpBB/styles/prosilver/template/login_forum.html
@@ -0,0 +1,35 @@
+<!-- INCLUDE overall_header.html -->
+
+<h2 class="solo">{L_LOGIN} {FORUM_NAME}</h2>
+
+<form id="login_forum" method="post" action="{S_LOGIN_ACTION}">
+{S_FORM_TOKEN}
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_LOGIN_FORUM}</p>
+
+ <fieldset class="fields2">
+ <!-- IF LOGIN_ERROR -->
+ <dl>
+ <dt>&nbsp;</dt>
+ <dd class="error">{LOGIN_ERROR}</dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="password">{L_PASSWORD}:</label></dt>
+ <dd><input class="inputbox narrow" type="password" name="password" id="password" size="25" tabindex="1" /></dd>
+ </dl>
+ <dl class="fields2">
+ <dt>&nbsp;</dt>
+ <dd>{S_HIDDEN_FIELDS}<input type="submit" name="login" id="login" class="button1" value="{L_LOGIN}" tabindex="2" /></dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+</form>
+
+<!-- INCLUDE jumpbox.html -->
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_approve.html b/phpBB/styles/prosilver/template/mcp_approve.html
new file mode 100644
index 0000000000..329205e2a2
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_approve.html
@@ -0,0 +1,53 @@
+<!-- INCLUDE overall_header.html -->
+
+<form id="confirm" action="{S_CONFIRM_ACTION}" method="post">
+<div class="panel">
+ {S_FORM_TOKEN}
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+
+ <h2>{MESSAGE_TITLE}</h2>
+ <!-- IF ADDITIONAL_MSG --><p>{ADDITIONAL_MSG}</p><!-- ENDIF -->
+
+ <fieldset>
+ <!-- IF S_NOTIFY_POSTER -->
+ <dl class="panel">
+ <dt>&nbsp;</dt>
+ <dd><label><input type="checkbox" name="notify_poster" checked="checked" /> <!-- IF S_APPROVE -->{L_NOTIFY_POSTER_APPROVAL}<!-- ELSE -->{L_NOTIFY_POSTER_DISAPPROVAL}<!-- ENDIF --></label></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF not S_APPROVE -->
+ <dl class="fields2 nobg">
+ <dt><label>{L_DISAPPROVE_REASON}:</label></dt>
+ <dd><select name="reason_id">
+ <!-- BEGIN reason --><option value="{reason.ID}"<!-- IF reason.S_SELECTED --> selected="selected"<!-- ENDIF -->>{reason.DESCRIPTION}</option><!-- END reason -->
+ </select>
+ </dd>
+ </dl>
+ <dl class="fields2 nobg">
+ <dt><label for="reason">{L_MORE_INFO}:</label><br /><span>{L_CAN_LEAVE_BLANK}</span></dt>
+ <dd><textarea class="inputbox" name="reason" id="reason" rows="4" cols="40">{REASON}</textarea></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <dl class="fields2 nobg">
+ <dt>&nbsp;</dt>
+ <dd><strong>{MESSAGE_TEXT}</strong></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{YES_VALUE}" class="button1" />&nbsp;
+ <input type="submit" name="cancel" value="{L_NO}" class="button2" />
+ </fieldset>
+
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_ban.html b/phpBB/styles/prosilver/template/mcp_ban.html
new file mode 100644
index 0000000000..460c95e2a1
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_ban.html
@@ -0,0 +1,128 @@
+<!-- INCLUDE mcp_header.html -->
+
+<script type="text/javascript">
+// <![CDATA[
+
+ var ban_length = new Array();
+ ban_length[-1] = '';
+ <!-- BEGIN ban_length -->
+ ban_length['{ban_length.BAN_ID}'] = '{ban_length.A_LENGTH}';
+ <!-- END ban_length -->
+
+ var ban_reason = new Array();
+ ban_reason[-1] = '';
+ <!-- BEGIN ban_reason -->
+ ban_reason['{ban_reason.BAN_ID}'] = '{ban_reason.A_REASON}';
+ <!-- END ban_reason -->
+
+ var ban_give_reason = new Array();
+ ban_give_reason[-1] = '';
+ <!-- BEGIN ban_give_reason -->
+ ban_give_reason['{ban_give_reason.BAN_ID}'] = '{ban_give_reason.A_REASON}';
+ <!-- END ban_give_reason -->
+
+ function display_details(option)
+ {
+ document.getElementById('unbangivereason').innerHTML = ban_give_reason[option];
+ document.getElementById('unbanreason').innerHTML = ban_reason[option];
+ document.getElementById('unbanlength').innerHTML = ban_length[option];
+ }
+
+// ]]>
+</script>
+
+<form id="mcp_ban" method="post" action="{U_ACTION}">
+
+<h2>{L_TITLE}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_TITLE}</h3>
+ <p>{L_EXPLAIN}</p>
+
+ <fieldset>
+ <dl>
+ <dt><label for="ban">{L_BAN_CELL}:</label></dt>
+ <dd><label for="ban"><textarea name="ban" id="ban" class="inputbox" cols="40" rows="3">{BAN_QUANTIFIER}</textarea></label></dd>
+ <!-- IF S_USERNAME_BAN --><dd><strong><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></strong></dd><!-- ENDIF -->
+ </dl>
+ <dl>
+ <dt><label for="banlength">{L_BAN_LENGTH}:</label></dt>
+ <dd><label for="banlength"><select name="banlength" id="banlength" onchange="if(this.value==-1){document.getElementById('banlengthother').style.display = 'block';}else{document.getElementById('banlengthother').style.display='none';}">{S_BAN_END_OPTIONS}</select></label></dd>
+ <dd id="banlengthother" style="display: none;"><label><input type="text" name="banlengthother" class="inputbox" /><br /><span>{L_YEAR_MONTH_DAY}</span></label></dd>
+ </dl>
+ <dl>
+ <dt><label for="banreason">{L_BAN_REASON}:</label></dt>
+ <dd><input name="banreason" id="banreason" type="text" class="inputbox" maxlength="255" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="bangivereason">{L_BAN_GIVE_REASON}:</label></dt>
+ <dd><input name="bangivereason" id="bangivereason" type="text" class="inputbox" maxlength="255" /></dd>
+ </dl>
+
+ <hr />
+
+ <dl>
+ <dt><label for="banexclude0">{L_BAN_EXCLUDE}:</label><br /><span>{L_BAN_EXCLUDE_EXPLAIN}</span></dt>
+ <dd>
+ <label for="banexclude1"><input type="radio" name="banexclude" id="banexclude1" value="1" /> {L_YES}</label>
+ <label for="banexclude0"><input type="radio" name="banexclude" id="banexclude0" value="0" checked="checked" /> {L_NO}</label>
+ </dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="bansubmit" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+</fieldset>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_UNBAN_TITLE}</h3>
+ <p>{L_UNBAN_EXPLAIN}</p>
+
+ <!-- IF S_BANNED_OPTIONS -->
+ <fieldset>
+ <dl>
+ <dt><label for="unban">{L_BAN_CELL}:</label></dt>
+ <dd><select name="unban[]" id="unban" multiple="multiple" size="5" onchange="if (this.selectedIndex != -1) {display_details(this.options[this.selectedIndex].value);}">{BANNED_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt>{L_BAN_LENGTH}:</dt>
+ <dd><strong id="unbanlength"></strong></dd>
+ </dl>
+ <dl>
+ <dt>{L_BAN_REASON}:</dt>
+ <dd><strong id="unbanreason"></strong></dd>
+ </dl>
+ <dl>
+ <dt>{L_BAN_GIVE_REASON}:</dt>
+ <dd><strong id="unbangivereason"></strong></dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="unbansubmit" value="{L_SUBMIT}" class="button1" />
+ </fieldset>
+
+ <!-- ELSE -->
+
+ <p><strong>{L_NO_BAN_CELL}</strong></p>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <!-- ENDIF -->
+</form>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_footer.html b/phpBB/styles/prosilver/template/mcp_footer.html
new file mode 100644
index 0000000000..5a48d95f23
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_footer.html
@@ -0,0 +1,9 @@
+
+ </div>
+ <div class="clear"></div>
+
+ </div>
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html
new file mode 100644
index 0000000000..2c98f7c9fa
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_forum.html
@@ -0,0 +1,111 @@
+<!-- INCLUDE mcp_header.html -->
+
+<!-- DEFINE $CUSTOM_FIELDSET_CLASS = 'forum-selection2' -->
+<!-- INCLUDE jumpbox.html -->
+
+<h2><a href="{U_VIEW_FORUM}">{L_FORUM}: {FORUM_NAME}</a></h2>
+
+<form method="post" id="mcp" action="{S_MCP_ACTION}">
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <!-- IF PAGINATION or TOTAL_TOPICS -->
+ <ul class="linklist">
+ <li class="rightside pagination">
+ <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS}<!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+ <!-- ENDIF -->
+
+ <!-- IF .topicrow -->
+ <ul class="topiclist">
+ <li class="header">
+ <dl class="icon">
+ <dt>{L_TOPICS}</dt>
+ <dd class="posts">{L_REPLIES}</dd>
+ <dd class="lastpost"><span>{L_LAST_POST}</span></dd>
+ <!-- IF not S_MERGE_SELECT --><dd class="mark">{L_MARK}</dd><!-- ENDIF -->
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist">
+
+ <!-- BEGIN topicrow -->
+ <li class="row<!-- IF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ENDIF -->">
+ <dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
+ <dt <!-- IF topicrow.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF -->>
+ <!-- IF topicrow.S_SELECT_TOPIC --><a href="{topicrow.U_SELECT_TOPIC}" class="topictitle">[ {L_SELECT_MERGE} ]</a>&nbsp;&nbsp; <!-- ENDIF -->
+ <a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
+ <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF -->
+ <!-- IF topicrow.S_MOVED_TOPIC and S_CAN_DELETE -->&nbsp;<a href="{topicrow.U_DELETE_TOPIC}" class="topictitle">[ {L_DELETE_SHADOW_TOPIC} ]</a><!-- ENDIF -->
+ <br />
+ <!-- IF topicrow.PAGINATION --><strong class="pagination"><span>{topicrow.PAGINATION}</span></strong><!-- ENDIF -->
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME} </dt>
+ <dd class="posts">{topicrow.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
+ <dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}<br />{topicrow.LAST_POST_TIME}</span>
+ </dd>
+ <!-- IF not S_MERGE_SELECT -->
+ <dd class="mark">
+ <!-- IF not topicrow.S_MOVED_TOPIC --><input type="checkbox" name="topic_id_list[]" value="{topicrow.TOPIC_ID}"<!-- IF topicrow.S_TOPIC_CHECKED --> checked="checked"<!-- ENDIF --> /><!-- ELSE -->&nbsp;<!-- ENDIF -->
+ </dd>
+ <!-- ENDIF -->
+ </dl>
+ </li>
+ <!-- END topicrow -->
+ </ul>
+ <!-- ELSE -->
+ <ul class="topiclist">
+ <li><p class="notopics">{L_NO_TOPICS}</p></li>
+ </ul>
+ <!-- ENDIF -->
+
+ <fieldset class="display-options">
+ <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <label>{L_DISPLAY_TOPICS}: {S_SELECT_SORT_DAYS}</label>
+ <label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
+ <label>{S_SELECT_SORT_DIR} <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
+ </fieldset>
+
+ <hr />
+
+ <!-- IF PAGINATION or TOTAL_TOPICS -->
+ <ul class="linklist">
+ <li class="rightside pagination">
+ <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS}<!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="display-actions">
+ <!-- IF not S_MERGE_SELECT -->
+ <select name="action">
+ <option value="" selected="selected">{L_SELECT_ACTION}</option>
+ <!-- IF S_CAN_DELETE --><option value="delete_topic">{L_DELETE}</option><!-- ENDIF -->
+ <!-- IF S_CAN_MERGE --><option value="merge_topics">{L_MERGE}</option><!-- ENDIF -->
+ <!-- IF S_CAN_MOVE --><option value="move">{L_MOVE}</option><!-- ENDIF -->
+ <!-- IF S_CAN_FORK --><option value="fork">{L_FORK}</option><!-- ENDIF -->
+ <!-- IF S_CAN_LOCK --><option value="lock">{L_LOCK}</option><option value="unlock">{L_UNLOCK}</option><!-- ENDIF -->
+ <!-- IF S_CAN_SYNC --><option value="resync">{L_RESYNC}</option><!-- ENDIF -->
+ <!-- IF S_CAN_MAKE_NORMAL --><option value="make_normal">{L_MAKE_NORMAL}</option><!-- ENDIF -->
+ <!-- IF S_CAN_MAKE_STICKY --><option value="make_sticky">{L_MAKE_STICKY}</option><!-- ENDIF -->
+ <!-- IF S_CAN_MAKE_ANNOUNCE -->
+ <option value="make_announce">{L_MAKE_ANNOUNCE}</option>
+ <option value="make_global">{L_MAKE_GLOBAL}</option>
+ <!-- ENDIF -->
+ </select>
+ <input class="button2" type="submit" value="{L_SUBMIT}" />
+ <div><a href="#" onclick="marklist('mcp', 'topic_id_list', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'topic_id_list', false); return false;">{L_UNMARK_ALL}</a></div>
+ <!-- ENDIF -->
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_front.html b/phpBB/styles/prosilver/template/mcp_front.html
new file mode 100644
index 0000000000..0891948fb6
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_front.html
@@ -0,0 +1,184 @@
+<!-- INCLUDE mcp_header.html -->
+
+<h2>{PAGE_TITLE}</h2>
+
+<!-- IF S_SHOW_UNAPPROVED -->
+
+ <form id="mcp_queue" method="post" action="{S_MCP_QUEUE_ACTION}">
+
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_LATEST_UNAPPROVED}</h3>
+ <!-- IF S_HAS_UNAPPROVED_POSTS --><p>{L_UNAPPROVED_TOTAL}</p><!-- ENDIF -->
+
+ <!-- IF .unapproved -->
+ <ul class="topiclist">
+ <li class="header">
+ <dl>
+ <dt>{L_VIEW_DETAILS}</dt>
+ <dd class="moderation"><span>{L_TOPIC} &amp; {L_FORUM}</span></dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist">
+
+ <!-- BEGIN unapproved -->
+ <li class="row<!-- IF unapproved.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl>
+ <dt>
+ <a href="{unapproved.U_POST_DETAILS}" class="topictitle">{unapproved.SUBJECT}</a> {unapproved.ATTACH_ICON_IMG}<br />
+ <!-- IF report.PAGINATION --><strong class="pagination"><span>{report.PAGINATION}</span></strong><!-- ENDIF -->
+ {L_POSTED} {L_POST_BY_AUTHOR} {unapproved.AUTHOR_FULL} &raquo; {unapproved.POST_TIME}
+ </dt>
+ <dd class="moderation"><span>
+ {L_TOPIC}: <a href="{unapproved.U_TOPIC}">{unapproved.TOPIC_TITLE}</a> [<a href="{unapproved.U_MCP_TOPIC}">{L_MODERATE}</a>]<br />
+ {L_FORUM}: <!-- IF unapproved.U_FORUM --><a href="{unapproved.U_FORUM}">{unapproved.FORUM_NAME}</a><!-- ELSE -->{unapproved.FORUM_NAME}<!-- ENDIF --><!-- IF unapproved.U_MCP_FORUM --> [<a href="{unapproved.U_MCP_FORUM}">{L_MODERATE}</a>]<!-- ENDIF --></span>
+ </dd>
+
+ <dd class="mark"><input type="checkbox" name="post_id_list[]" value="{unapproved.POST_ID}" /></dd>
+ </dl>
+ </li>
+ <!-- END unapproved -->
+ </ul>
+ <!-- ELSE -->
+ <p>{L_UNAPPROVED_POSTS_ZERO_TOTAL}</p>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+ {S_FORM_TOKEN}
+ </div>
+
+ <!-- IF .unapproved -->
+ <fieldset class="display-actions">
+ {S_HIDDEN_FIELDS}
+ <input class="button2" type="submit" name="action[disapprove]" value="{L_DISAPPROVE}" />&nbsp;
+ <input class="button1" type="submit" name="action[approve]" value="{L_APPROVE}" />
+ <div><a href="#" onclick="marklist('mcp_queue', 'post_id_list', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp_queue', 'post_id_list', false); return false;">{L_UNMARK_ALL}</a></div>
+ </fieldset>
+ <!-- ENDIF -->
+ </form>
+<!-- ENDIF -->
+
+<!-- IF S_SHOW_REPORTS -->
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_LATEST_REPORTED}</h3>
+ <!-- IF S_HAS_REPORTS --><p>{L_REPORTS_TOTAL}</p><!-- ENDIF -->
+
+ <!-- IF .report -->
+ <ul class="topiclist">
+ <li class="header">
+ <dl>
+ <dt>{L_VIEW_DETAILS}</dt>
+ <dd class="moderation"><span>{L_REPORTER} &amp; {L_FORUM}</span></dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist">
+
+ <!-- BEGIN report -->
+ <li class="row<!-- IF report.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl>
+ <dt>
+ <a href="{report.U_POST_DETAILS}#reports" class="topictitle">{report.SUBJECT}</a> {report.ATTACH_ICON_IMG}<br />
+ <span>{L_POSTED} {L_POST_BY_AUTHOR} {report.AUTHOR_FULL} &raquo; {report.POST_TIME}</span>
+ </dt>
+ <dd class="moderation">
+ <span>{L_REPORTED} {L_POST_BY_AUTHOR} {report.REPORTER_FULL} {L_REPORTED_ON_DATE} {report.REPORT_TIME}<br />
+ {L_FORUM}: <a href="{report.U_FORUM}">{report.FORUM_NAME}</a></span>
+ </dd>
+ </dl>
+ </li>
+ <!-- END report -->
+ </ul>
+ <!-- ELSE -->
+ <p>{L_REPORTS_ZERO_TOTAL}</p>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+<!-- ENDIF -->
+
+<!-- IF S_SHOW_PM_REPORTS -->
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_LATEST_REPORTED_PMS}</h3>
+ <!-- IF S_HAS_PM_REPORTS --><p>{L_PM_REPORTS_TOTAL}</p><!-- ENDIF -->
+
+ <!-- IF .pm_report -->
+ <ul class="topiclist">
+ <li class="header">
+ <dl>
+ <dt>{L_VIEW_DETAILS}</dt>
+ <dd class="moderation"><span>{L_REPORTER}</span></dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist">
+
+ <!-- BEGIN pm_report -->
+ <li class="row<!-- IF report.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl>
+ <dt>
+ <a href="{pm_report.U_PM_DETAILS}" class="topictitle">{pm_report.PM_SUBJECT}</a> {pm_report.ATTACH_ICON_IMG}<br />
+ <span>{L_MESSAGE_BY_AUTHOR} {pm_report.PM_AUTHOR_FULL} &raquo; {pm_report.PM_TIME}</span><br />
+ <span>{L_MESSAGE_TO} {pm_report.RECIPIENTS}</span>
+ </dt>
+ <dd class="moderation">
+ <span>{L_REPORTED} {L_POST_BY_AUTHOR} {pm_report.REPORTER_FULL} {L_REPORTED_ON_DATE} {pm_report.REPORT_TIME}</span>
+ </dd>
+ </dl>
+ </li>
+ <!-- END pm_report -->
+ </ul>
+ <!-- ELSE -->
+ <p>{L_PM_REPORTS_ZERO_TOTAL}</p>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+<!-- ENDIF -->
+
+<!-- IF S_SHOW_LOGS -->
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_LATEST_LOGS}</h3>
+
+ <table class="table1" cellspacing="0">
+ <thead>
+ <tr>
+ <th class="name">{L_ACTION}</th>
+ <th class="name">{L_USERNAME}</th>
+ <th class="name">{L_IP}</th>
+ <th class="name">{L_VIEW_TOPIC}</th>
+ <th class="name">{L_VIEW_TOPIC_LOGS}</th>
+ <th class="name">{L_TIME}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN log -->
+ <tr class="<!-- IF log.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <td>{log.ACTION}</td>
+ <td><span>{log.USERNAME}</span></td>
+ <td><span>{log.IP}</span></td>
+ <td><span><!-- IF log.U_VIEW_TOPIC --><a href="{log.U_VIEW_TOPIC}" title="{L_VIEW_TOPIC}">{L_VIEW_TOPIC}</a><!-- ENDIF -->&nbsp;</span></td>
+ <td><span><!-- IF log.U_VIEWLOGS --><a href="{log.U_VIEWLOGS}">{L_VIEW_TOPIC_LOGS}</a><!-- ENDIF -->&nbsp;</span></td>
+ <td><span>{log.TIME}</span></td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td colspan="6">{L_NO_ENTRIES}</td>
+ </tr>
+ <!-- END log -->
+ </tbody>
+ </table>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+<!-- ENDIF -->
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_header.html b/phpBB/styles/prosilver/template/mcp_header.html
new file mode 100644
index 0000000000..13cc7e12cf
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_header.html
@@ -0,0 +1,67 @@
+<!-- INCLUDE overall_header.html -->
+
+<h2>{L_MCP}</h2>
+
+<!-- IF U_MCP -->
+ <p class="linkmcp">
+ [ <a href="{U_MCP}">{L_MCP}</a><!-- IF U_MCP_FORUM --> | <a href="{U_MCP_FORUM}">{L_MODERATE_FORUM}</a><!-- ENDIF -->
+ <!-- IF U_MCP_TOPIC --> | <a href="{U_MCP_TOPIC}">{L_MODERATE_TOPIC}</a><!-- ENDIF -->
+ <!-- IF U_MCP_POST --> | <a href="{U_MCP_POST}">{L_MODERATE_POST}</a><!-- ENDIF --> ]
+ </p>
+<!-- ENDIF -->
+
+<div id="tabs">
+ <ul>
+ <!-- BEGIN l_block1 -->
+ <li<!-- IF l_block1.S_SELECTED --> class="activetab"<!-- ENDIF -->><a href="{l_block1.U_TITLE}"><span>{l_block1.L_TITLE}</span></a></li>
+ <!-- END l_block1 -->
+ </ul>
+</div>
+
+<div class="panel bg3">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div style="width: 100%;">
+
+ <div id="cp-menu">
+ <div id="navigation">
+ <ul>
+ <!-- BEGIN l_block1 -->
+ <!-- IF l_block1.S_SELECTED -->
+ <!-- BEGIN l_block2 -->
+ <!-- IF l_block1.l_block2.S_SELECTED -->
+ <li id="active-subsection"><a href="{l_block1.l_block2.U_TITLE}"><span>{l_block1.l_block2.L_TITLE}<!-- IF l_block1.l_block2.ADD_ITEM --> ({l_block1.l_block2.ADD_ITEM})<!-- ENDIF --></span></a></li>
+ <!-- ELSE -->
+ <li><a href="{l_block1.l_block2.U_TITLE}"><span>{l_block1.l_block2.L_TITLE}<!-- IF l_block1.l_block2.ADD_ITEM --> ({l_block1.l_block2.ADD_ITEM})<!-- ENDIF --></span></a></li>
+ <!-- ENDIF -->
+ <!-- END l_block2 -->
+ <!-- ENDIF -->
+ <!-- END l_block1 -->
+ </ul>
+ </div>
+ </div>
+
+ <div id="cp-main" class="mcp-main">
+ <!-- IF MESSAGE -->
+ <div class="content">
+ <h2>{L_MESSAGE}</h2>
+ <p class="error">{MESSAGE}</p>
+ <p><!-- BEGIN return_links -->{return_links.MESSAGE_LINK}<br /><br /><!-- END return_links --></p>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF CONFIRM_MESSAGE -->
+ <form id="confirm" method="post" action="{S_CONFIRM_ACTION}"{S_FORM_ENCTYPE}>
+
+ <div class="content">
+ <h2>{L_PLEASE_CONFIRM}</h2>
+ <p>{CONFIRM_MESSAGE}</p>
+
+ <fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}<input class="button1" type="submit" name="submit" value="{L_YES}" />&nbsp;
+ <input class="button2" type="cancel" value="{L_NO}" />
+ </fieldset>
+ </div>
+
+ </form>
+ <!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/mcp_logs.html b/phpBB/styles/prosilver/template/mcp_logs.html
new file mode 100644
index 0000000000..494f63cb1b
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_logs.html
@@ -0,0 +1,90 @@
+<!-- INCLUDE mcp_header.html -->
+
+<h2>{L_TITLE}</h2>
+
+<form method="post" id="mcp" action="{U_POST_ACTION}">
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <ul class="linklist">
+ <li class="leftside">
+ {L_SEARCH_KEYWORDS}: <input type="text" class="inputbox autowidth" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
+ </li>
+ <li class="rightside pagination">
+ <!-- IF TOTAL -->{TOTAL} <!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+
+ <table cellspacing="1" class="table1">
+ <thead>
+ <tr>
+ <th>{L_USERNAME}</th>
+ <th style="text-align: center">{L_IP}</th>
+ <th style="text-align: center">{L_TIME}</th>
+ <th>{L_ACTION}</th>
+ <!-- IF S_CLEAR_ALLOWED --><th>{L_MARK}</th><!-- ENDIF -->
+ </tr>
+ </thead>
+ <tbody>
+ <!-- IF S_LOGS -->
+ <!-- BEGIN log -->
+ <!-- IF log.S_ROW_COUNT is even --><tr class="bg1"><!-- ELSE --><tr class="bg2"><!-- ENDIF -->
+ <td>{log.USERNAME}</td>
+ <td style="text-align: center">{log.IP}</td>
+ <td style="text-align: center">{log.DATE}</td>
+ <td>{log.ACTION}<br />
+ {log.DATA}
+ </td>
+ <!-- IF S_CLEAR_ALLOWED --><td style="width: 5%" align="center"><input type="checkbox" name="mark[]" value="{log.ID}" /></td><!-- ENDIF -->
+ </tr>
+ <!-- END log -->
+ <!-- ELSE -->
+ <tr>
+ <td class="bg1" colspan="<!-- IF S_CLEAR_ALLOWED -->5<!-- ELSE -->4<!-- ENDIF -->" align="center"><span class="gen">{L_NO_ENTRIES}</span></td>
+ </tr>
+ <!-- ENDIF -->
+ </tbody>
+ </table>
+
+ <!-- IF .log -->
+ <fieldset class="display-options">
+ <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <label>{L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS}</label>
+ <label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
+ <label>{S_SELECT_SORT_DIR}</label>
+ <input type="submit" name="sort" value="{L_GO}" class="button2" />
+ </fieldset>
+
+ <hr />
+
+ <ul class="linklist">
+ <li class="rightside pagination">
+ <!-- IF TOTAL -->{TOTAL} <!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+ {S_FORM_TOKEN}
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <!-- IF S_CLEAR_ALLOWED -->
+ <fieldset class="display-actions">
+ <input class="button2" type="submit" name="action[del_all]" value="{L_DELETE_ALL}" />
+ &nbsp;<input class="button1" type="submit" value="{L_DELETE_MARKED}" name="action[del_marked]" />
+
+ <div><a href="#" onclick="marklist('mcp', 'mark', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'mark', false); return false;">{L_UNMARK_ALL}</a></div>
+ </fieldset>
+ <!-- ENDIF -->
+ <!-- ELSE -->
+ {S_FORM_TOKEN}
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
+</form>
+
+<br />
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_message.html b/phpBB/styles/prosilver/template/mcp_message.html
new file mode 100644
index 0000000000..1fde48b2cc
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_message.html
@@ -0,0 +1,8 @@
+<!-- INCLUDE mcp_header.html -->
+
+<div class="content">
+ <h2>{MESSAGE_TITLE}</h2>
+ <p>{MESSAGE_TEXT}</p>
+</div>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_move.html b/phpBB/styles/prosilver/template/mcp_move.html
new file mode 100644
index 0000000000..804d76b14b
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_move.html
@@ -0,0 +1,36 @@
+<!-- INCLUDE overall_header.html -->
+
+<form id="confirm" action="{S_CONFIRM_ACTION}" method="post">
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+ <h2>{MESSAGE_TITLE}</h2>
+ <!-- IF ADDITIONAL_MSG --><p>{ADDITIONAL_MSG}</p><!-- ENDIF -->
+
+ <fieldset>
+ <dl class="fields2">
+ <dt><label>{L_SELECT_DESTINATION_FORUM}:</label></dt>
+ <dd><select name="to_forum_id">{S_FORUM_SELECT}</select></dd>
+ <!-- IF S_CAN_LEAVE_SHADOW --><dd><label for="move_leave_shadow"><input type="checkbox" name="move_leave_shadow" id="move_leave_shadow" checked="checked" />{L_LEAVE_SHADOW}</label></dd><!-- ENDIF -->
+ </dl>
+ <dl class="fields2">
+ <dt>&nbsp;</dt>
+ <dd><strong>{MESSAGE_TEXT}</strong></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{YES_VALUE}" class="button1" />&nbsp;
+ <input type="submit" name="cancel" value="{L_NO}" class="button2" />
+ {S_FORM_TOKEN}
+ </fieldset>
+
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_notes_front.html b/phpBB/styles/prosilver/template/mcp_notes_front.html
new file mode 100644
index 0000000000..045a7619ed
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_notes_front.html
@@ -0,0 +1,28 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form method="post" id="mcp" action="{U_POST_ACTION}">
+
+<h2>{L_TITLE}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <fieldset>
+ <dl>
+ <dt><label for="username">{L_SELECT_USER}:</label></dt>
+ <dd><input name="username" id="username" type="text" class="inputbox" /></dd>
+ <dd><strong><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></strong></dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="submit-buttons">
+ <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="submituser" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_notes_user.html b/phpBB/styles/prosilver/template/mcp_notes_user.html
new file mode 100644
index 0000000000..c7c089ecad
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_notes_user.html
@@ -0,0 +1,125 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form method="post" id="mcp" action="{U_POST_ACTION}">
+
+<h2>{L_TITLE}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{USERNAME_FULL}</h3>
+
+ <div>
+ <div class="column1">
+ <!-- IF AVATAR_IMG --><div>{AVATAR_IMG}</div><!-- ENDIF -->
+ </div>
+
+ <div class="column2">
+ <dl class="details">
+ <!-- IF RANK_TITLE --><dt>{L_RANK}:</dt><dd>{RANK_TITLE}</dd><!-- ENDIF -->
+ <!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE -->&nbsp;<!-- ELSE -->{L_RANK}:<!-- ENDIF --></dt><dd>{RANK_IMG}</dd><!-- ENDIF -->
+ <dt>{L_JOINED}:</dt><dd>{JOINED}</dd>
+ <dt>{L_TOTAL_POSTS}:</dt><dd>{POSTS}</dd>
+ <dt>{L_WARNINGS}: </dt><dd>{WARNINGS}</dd>
+ </dl>
+ </div>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_ADD_FEEDBACK}</h3>
+ <p>{L_ADD_FEEDBACK_EXPLAIN}</p>
+
+ <fieldset>
+ <textarea name="usernote" id="usernote" class="inputbox" cols="40" rows="3"></textarea>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="action[add_feedback]" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+</fieldset>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <ul class="linklist">
+ <li class="leftside">
+ {L_SEARCH_KEYWORDS}: <input type="text" class="inputbox autowidth" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
+ </li>
+ <li class="rightside pagination">
+ <!-- IF TOTAL_REPORTS -->{TOTAL_REPORTS} <!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+
+ <table cellspacing="1" class="table1">
+ <thead>
+ <tr>
+ <th>{L_REPORT_BY}</th>
+ <th style="text-align: center">{L_IP}</th>
+ <th style="text-align: center">{L_TIME}</th>
+ <th>{L_ACTION_NOTE}</th>
+ <!-- IF S_CLEAR_ALLOWED --><th>{L_MARK}</th><!-- ENDIF -->
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN usernotes -->
+ <!-- IF usernotes.S_ROW_COUNT is even --><tr class="bg1"><!-- ELSE --><tr class="bg2"><!-- ENDIF -->
+ <td>{usernotes.REPORT_BY}</td>
+ <td style="text-align: center">{usernotes.IP}</td>
+ <td style="text-align: center">{usernotes.REPORT_AT}</td>
+ <td>{usernotes.ACTION}</td>
+
+ <!-- IF S_CLEAR_ALLOWED --><td width="5%" align="center"><input type="checkbox" name="marknote[]" id="note-{usernotes.ID}" value="{usernotes.ID}" /></td><!-- ENDIF -->
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td class="bg1" colspan="<!-- IF S_CLEAR_ALLOWED -->5<!-- ELSE -->4<!-- ENDIF -->" align="center"><span class="gen">{L_NO_ENTRIES}</span></td>
+ </tr>
+ <!-- END usernames -->
+ </tbody>
+ </table>
+
+ <hr />
+
+ <fieldset class="display-options">
+ <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <label>{L_DISPLAY_LOG}: {S_SELECT_SORT_DAYS}</label>
+ <label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label>
+ <input type="submit" name="sort" value="{L_GO}" class="button2" />
+ </fieldset>
+
+ <hr />
+
+ <ul class="linklist">
+ <li class="rightside pagination">
+ <!-- IF TOTAL_REPORTS -->{TOTAL_REPORTS}<!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- IF S_CLEAR_ALLOWED -->
+<fieldset class="display-actions">
+ <input class="button2" type="submit" name="action[del_all]" value="{L_DELETE_ALL}" />
+ &nbsp;<input class="button1" type="submit" name="action[del_marked]" value="{L_DELETE_MARKED}" />
+</fieldset>
+
+<fieldset class="display-actions">
+ <div><a href="#" onclick="marklist('mcp', 'marknote', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('mcp', 'marknote', false); return false;">{L_UNMARK_ALL}</a></div>
+</fieldset>
+<!-- ENDIF -->
+</form>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_post.html b/phpBB/styles/prosilver/template/mcp_post.html
new file mode 100644
index 0000000000..8a3c8e7309
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_post.html
@@ -0,0 +1,297 @@
+<!-- INCLUDE mcp_header.html -->
+
+<!-- IF S_MCP_REPORT -->
+ <!-- IF S_PM -->
+ <h2>{L_PM_REPORT_DETAILS}</h2>
+ <!-- ELSE -->
+ <h2>{L_REPORT_DETAILS}</h2>
+ <!-- ENDIF -->
+
+ <div id="report" class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="postbody">
+ <h3>{L_REPORT_REASON}: {REPORT_REASON_TITLE}</h3>
+ <p class="author">{L_REPORTED} {L_POST_BY_AUTHOR} {REPORTER_FULL} &laquo; {REPORT_DATE}</p>
+ <!-- IF not S_POST_REPORTED -->
+ <p class="rules">{L_REPORT_CLOSED}</p>
+ <!-- ENDIF -->
+ <div class="content">
+ <!-- IF REPORT_TEXT -->
+ {REPORT_TEXT}
+ <!-- ELSE -->
+ {REPORT_REASON_DESCRIPTION}
+ <!-- ENDIF -->
+ </div>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <form method="post" id="mcp_report" action="{S_CLOSE_ACTION}">
+
+ <fieldset class="submit-buttons">
+ <!-- IF S_POST_REPORTED -->
+ <input class="button1" type="submit" value="{L_CLOSE_REPORT}" name="action[close]" /> &nbsp;
+ <!-- ENDIF -->
+ <input class="button2" type="submit" value="{L_DELETE_REPORT}" name="action[delete]" />
+ <input type="hidden" name="report_id_list[]" value="{REPORT_ID}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ELSE -->
+ <h2>{L_POST_DETAILS}</h2>
+<!-- ENDIF -->
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="postbody">
+ <!-- IF U_EDIT -->
+ <ul class="profile-icons">
+ <li class="edit-icon"><a href="{U_EDIT}" title="{L_EDIT_POST}"><span>{L_EDIT_POST}</span></a></li>
+ </ul>
+ <!-- ENDIF -->
+
+ <h3><a href="{U_VIEW_POST}">{POST_SUBJECT}</a></h3>
+ <!-- IF S_PM -->
+ <p class="author">
+ <strong>{L_SENT_AT}:</strong> {POST_DATE}
+ <br /><strong>{L_PM_FROM}:</strong> {POST_AUTHOR_FULL}
+ <!-- IF S_TO_RECIPIENT --><br /><strong>{L_TO}:</strong> <!-- BEGIN to_recipient --><!-- IF to_recipient.NAME_FULL -->{to_recipient.NAME_FULL}<!-- ELSE --><a href="{to_recipient.U_VIEW}" style="color:<!-- IF to_recipient.COLOUR -->{to_recipient.COLOUR}<!-- ELSEIF to_recipient.IS_GROUP -->#0000FF<!-- ENDIF -->;">{to_recipient.NAME}</a><!-- ENDIF -->&nbsp;<!-- END to_recipient --><!-- ENDIF -->
+ <!-- IF S_BCC_RECIPIENT --><br /><strong>{L_BCC}:</strong> <!-- BEGIN bcc_recipient --><!-- IF bcc_recipient.NAME_FULL -->{bcc_recipient.NAME_FULL}<!-- ELSE --><a href="{bcc_recipient.U_VIEW}" style="color:<!-- IF bcc_recipient.COLOUR -->{bcc_recipient.COLOUR}<!-- ELSEIF bcc_recipient.IS_GROUP -->#0000FF<!-- ENDIF -->;">{bcc_recipient.NAME}</a><!-- ENDIF -->&nbsp;<!-- END bcc_recipient --><!-- ENDIF -->
+ </p>
+ <!-- ELSE -->
+ <p class="author">{MINI_POST_IMG} {L_POSTED} {L_POST_BY_AUTHOR} {POST_AUTHOR_FULL} &raquo; {POST_DATE}</p>
+ <!-- ENDIF -->
+
+ <!-- IF S_POST_UNAPPROVED -->
+ <form method="post" id="mcp_approve" action="{U_APPROVE_ACTION}">
+
+ <p class="rules">
+ <input class="button1" type="submit" value="{L_APPROVE}" name="action[approve]" /> &nbsp;
+ <input class="button2" type="submit" value="{L_DISAPPROVE}" name="action[disapprove]" />
+ <input type="hidden" name="post_id_list[]" value="{POST_ID}" />
+ {S_FORM_TOKEN}
+ </p>
+ </form>
+ <!-- ENDIF -->
+
+ <!-- IF S_MESSAGE_REPORTED -->
+ <p class="rules">
+ {REPORTED_IMG} <a href="{U_MCP_REPORT}"><strong>{L_MESSAGE_REPORTED}</strong></a>
+ </p>
+ <!-- ENDIF -->
+
+ <div class="content">
+ {POST_PREVIEW}
+ </div>
+
+ <!-- IF S_HAS_ATTACHMENTS -->
+ <dl class="attachbox">
+ <dt>{L_ATTACHMENTS}</dt>
+ <!-- BEGIN attachment -->
+ <dd>{attachment.DISPLAY_ATTACHMENT}</dd>
+ <!-- END attachment -->
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF SIGNATURE -->
+ <div id="sig{POST_ID}" class="signature">{SIGNATURE}</div>
+ <!-- ENDIF -->
+
+ <!-- IF S_MCP_REPORT and S_CAN_VIEWIP -->
+ <hr />
+ <div>{L_THIS_POST_IP}: <!-- IF U_WHOIS -->
+ <a href="{U_WHOIS}"><!-- IF POST_IPADDR -->{POST_IPADDR}<!-- ELSE -->{POST_IP}<!-- ENDIF --></a> (<!-- IF POST_IPADDR -->{POST_IP}<!-- ELSE --><a href="{U_LOOKUP_IP}">{L_LOOKUP_IP}</a><!-- ENDIF -->)
+ <!-- ELSE -->
+ <!-- IF POST_IPADDR -->{POST_IPADDR} ({POST_IP})<!-- ELSE -->{POST_IP}<!-- IF U_LOOKUP_IP --> (<a href="{U_LOOKUP_IP}">{L_LOOKUP_IP}</a>)<!-- ENDIF --><!-- ENDIF -->
+ <!-- ENDIF --></div>
+ <!-- ENDIF -->
+
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- IF S_CAN_LOCK_POST or S_CAN_DELETE_POST or S_CAN_CHGPOSTER -->
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_MOD_OPTIONS}</h3>
+ <!-- IF S_CAN_CHGPOSTER -->
+ <form method="post" id="mcp_chgposter" action="{U_POST_ACTION}">
+
+ <fieldset>
+ <dl>
+ <dt><label>{L_CHANGE_POSTER}:</label></dt>
+ <!-- IF S_USER_SELECT --><dd><select name="u">{S_USER_SELECT}</select> <input type="submit" class="button2" name="action[chgposter_ip]" value="{L_CONFIRM}" /></dd><!-- ENDIF -->
+ <dd style="margin-top:3px;">
+ <input class="inputbox autowidth" type="text" name="username" value="" />
+ <input type="submit" class="button2" name="action[chgposter]" value="{L_CONFIRM}" />
+ <br />
+ <span>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span>
+ </dd>
+ </dl>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+ <!-- ENDIF -->
+
+ <!-- IF S_CAN_LOCK_POST or S_CAN_DELETE_POST -->
+ <form method="post" id="mcp" action="{U_MCP_ACTION}">
+
+ <fieldset>
+ <dl>
+ <dt><label>{L_MOD_OPTIONS}:</label></dt>
+ <dd><select name="action">
+ <!-- IF S_CAN_LOCK_POST --><!-- IF S_POST_LOCKED --><option value="unlock_post">{L_UNLOCK_POST} [{L_UNLOCK_POST_EXPLAIN}]</option><!-- ELSE --><option value="lock_post">{L_LOCK_POST} [{L_LOCK_POST_EXPLAIN}]</option><!-- ENDIF --><!-- ENDIF -->
+ <!-- IF S_CAN_DELETE_POST --><option value="delete_post">{L_DELETE_POST}</option><!-- ENDIF -->
+ </select> <input class="button2" type="submit" value="{L_SUBMIT}" />
+ </dd>
+ </dl>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+<!-- ENDIF -->
+
+
+<!-- IF S_MCP_QUEUE or S_MCP_REPORT or RETURN_TOPIC -->
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p><!-- IF S_MCP_QUEUE -->{RETURN_QUEUE} | {RETURN_TOPIC_SIMPLE} | {RETURN_POST}<!-- ELSEIF S_MCP_REPORT -->{RETURN_REPORTS}<!-- IF not S_PM --> | <a href="{U_VIEW_POST}">{L_VIEW_POST}</a> | <a href="{U_VIEW_TOPIC}">{L_VIEW_TOPIC}</a> | <a href="{U_VIEW_FORUM}">{L_VIEW_FORUM}</a><!-- ENDIF --><!-- ELSE -->{RETURN_TOPIC}<!-- ENDIF --></p>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+<!-- ENDIF -->
+
+<!-- IF S_MCP_QUEUE -->
+<!-- ELSE -->
+
+ <!-- IF S_SHOW_USER_NOTES -->
+ <div class="panel" id="usernotes">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <form method="post" id="mcp_notes" action="{U_POST_ACTION}">
+
+ <!-- IF S_USER_NOTES -->
+ <h3>{L_FEEDBACK}</h3>
+
+ <!-- BEGIN usernotes -->
+ <span class="small"><strong>{L_REPORTED_BY}: {usernotes.REPORT_BY} &laquo; {usernotes.REPORT_AT}</strong></span>
+ <!-- IF S_CLEAR_ALLOWED --><div class="right-box"><input type="checkbox" name="marknote[]" value="{usernotes.ID}" /></div><!-- ENDIF -->
+ <div class="postbody">{usernotes.ACTION}</div>
+
+ <hr class="dashed" />
+ <!-- END usernotes -->
+
+ <!-- IF S_CLEAR_ALLOWED -->
+ <fieldset class="submit-buttons">
+ <input class="button2" type="submit" name="action[del_all]" value="{L_DELETE_ALL}" />&nbsp;
+ <input class="button2" type="submit" name="action[del_marked]" value="{L_DELETE_MARKED}" />
+ </fieldset>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+
+ <h3>{L_ADD_FEEDBACK}</h3>
+ <p>{L_ADD_FEEDBACK_EXPLAIN}</p>
+
+ <fieldset>
+ <textarea name="usernote" rows="4" cols="76" class="inputbox"></textarea>
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" name="action[add_feedback]" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" value="{L_RESET}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF S_SHOW_REPORTS -->
+ <div class="panel" id="reports">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_MCP_POST_REPORTS}</h3>
+
+ <!-- BEGIN reports -->
+ <span class="small"><strong>{L_REPORTED_BY}: <!-- IF reports.U_REPORTER --><a href="{reports.U_REPORTER}">{reports.REPORTER}</a><!-- ELSE -->{reports.REPORTER}<!-- ENDIF --> &laquo; {reports.REPORT_TIME}</strong></span>
+ <p><em>{reports.REASON_TITLE}: {reports.REASON_DESC}</em><!-- IF reports.REPORT_TEXT --><br />{reports.REPORT_TEXT}<!-- ENDIF --></p>
+ <!-- END reports -->
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF S_CAN_VIEWIP and not S_MCP_REPORT -->
+ <div class="panel" id="ip">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_THIS_POST_IP}: <!-- IF U_WHOIS -->
+ <a href="{U_WHOIS}"><!-- IF POST_IPADDR -->{POST_IPADDR}<!-- ELSE -->{POST_IP}<!-- ENDIF --></a> (<!-- IF POST_IPADDR -->{POST_IP}<!-- ELSE --><a href="{U_LOOKUP_IP}">{L_LOOKUP_IP}</a><!-- ENDIF -->)
+ <!-- ELSE -->
+ <!-- IF POST_IPADDR -->{POST_IPADDR} ({POST_IP})<!-- ELSE -->{POST_IP}<!-- IF U_LOOKUP_IP --> (<a href="{U_LOOKUP_IP}">{L_LOOKUP_IP}</a>)<!-- ENDIF --><!-- ENDIF -->
+ <!-- ENDIF --></p>
+
+ <table class="table1" cellspacing="1">
+ <thead>
+ <tr>
+ <th class="name">{L_OTHER_USERS}</th>
+ <th class="posts">{L_POSTS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN userrow -->
+ <tr class="<!-- IF userrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <td><!-- IF userrow.U_PROFILE --><a href="{userrow.U_PROFILE}">{userrow.USERNAME}</a><!-- ELSE -->{userrow.USERNAME}<!-- ENDIF --></td>
+ <td class="posts"><a href="{userrow.U_SEARCHPOSTS}" title="{L_SEARCH_POSTS_BY} {userrow.USERNAME}">{userrow.NUM_POSTS}</a></td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td colspan="2">{L_NO_MATCHES_FOUND}</td>
+ </tr>
+ <!-- END userrow -->
+ </tbody>
+ </table>
+
+ <table class="table1" cellspacing="1">
+ <thead>
+ <tr>
+ <th class="name">{L_IPS_POSTED_FROM}</th>
+ <th class="posts">{L_POSTS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN iprow -->
+ <tr class="<!-- IF iprow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <td><!-- IF iprow.HOSTNAME --><a href="{iprow.U_WHOIS}">{iprow.HOSTNAME}</a> ({iprow.IP})<!-- ELSE --><a href="{iprow.U_WHOIS}">{iprow.IP}</a> (<a href="{iprow.U_LOOKUP_IP}">{L_LOOKUP_IP}</a>)<!-- ENDIF --></td>
+ <td class="posts">{iprow.NUM_POSTS}</td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td colspan="2">{L_NO_MATCHES_FOUND}</td>
+ </tr>
+ <!-- END iprow -->
+ </tbody>
+ </table>
+
+ <p><a href="{U_LOOKUP_ALL}#ip">{L_LOOKUP_ALL}</a></p>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
+
+<!-- ENDIF -->
+
+<!-- IF S_TOPIC_REVIEW --><!-- INCLUDE posting_topic_review.html --><!-- ENDIF -->
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_queue.html b/phpBB/styles/prosilver/template/mcp_queue.html
new file mode 100644
index 0000000000..57fb149257
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_queue.html
@@ -0,0 +1,96 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form id="mcp" method="post" action="{S_MCP_ACTION}">
+
+<fieldset class="forum-selection">
+ <label for="fo">{L_FORUM}: <select name="f" id="fo">{S_FORUM_OPTIONS}</select></label>
+ <input type="submit" name="sort" value="{L_GO}" class="button2" />
+ {S_FORM_TOKEN}
+</fieldset>
+
+<h2>{L_TITLE}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_EXPLAIN}</p>
+
+ <!-- IF .postrow -->
+ <ul class="linklist">
+ <li class="rightside pagination">
+ <!-- IF TOTAL --> {TOTAL}<!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+ <ul class="topiclist">
+ <li class="header">
+ <dl>
+ <dt><!-- IF S_TOPICS -->{L_TOPIC}<!-- ELSE -->{L_POST}<!-- ENDIF --></dt>
+ <dd class="moderation"><span><!-- IF not S_TOPICS -->{L_TOPIC} &amp; <!-- ENDIF -->{L_FORUM}</span></dd>
+ <dd class="mark">{L_MARK}</dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist">
+
+ <!-- BEGIN postrow -->
+
+ <!-- IF postrow.S_DELETED_TOPIC -->
+ <li><p class="notopics">{L_DELETED_TOPIC}</p></li>
+ <!-- ELSE -->
+
+ <li class="row<!-- IF postrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl>
+ <dt>
+ <a href="{postrow.U_VIEW_DETAILS}" class="topictitle">{postrow.POST_SUBJECT}</a> <br />
+ <span>{L_POSTED} {L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} &raquo; {postrow.POST_TIME}</span>
+ </dt>
+ <dd class="moderation">
+ <span>
+ <!-- IF S_TOPICS --><br /><!-- ELSE -->{L_TOPIC}: <a href="{postrow.U_TOPIC}">{postrow.TOPIC_TITLE}</a> <br /><!-- ENDIF -->
+ {L_FORUM}: <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a>
+ </span>
+ </dd>
+
+
+ <dd class="mark"><input type="checkbox" name="post_id_list[]" value="{postrow.POST_ID}" /></dd>
+ </dl>
+ </li>
+ <!-- ENDIF -->
+ <!-- END postrow -->
+ </ul>
+
+ <fieldset class="display-options">
+ <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <label>{L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS}</label>
+ <label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label>
+ <!-- IF TOPIC_ID --><label><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" />&nbsp; <strong>{L_ONLY_TOPIC}</strong></label><!-- ENDIF -->
+ <input type="submit" name="sort" value="{L_GO}" class="button2" />
+ </fieldset>
+
+ <hr />
+
+ <ul class="linklist">
+ <li class="rightside pagination">
+ <!-- IF TOTAL -->{TOTAL}<!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+ <!-- ELSE -->
+ <p class="notopics"><strong><!-- IF S_TOPICS -->{L_NO_TOPICS_QUEUE}<!-- ELSE -->{L_UNAPPROVED_POSTS_ZERO_TOTAL}<!-- ENDIF --></strong></p>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- IF .postrow -->
+ <fieldset class="display-actions">
+ <input class="button2" type="submit" name="action[disapprove]" value="{L_DISAPPROVE}" />&nbsp;
+ <input class="button1" type="submit" name="action[approve]" value="{L_APPROVE}" />
+ <div><a href="#" onclick="marklist('mcp', 'post_id_list', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'post_id_list', false); return false;">{L_UNMARK_ALL}</a></div>
+ </fieldset>
+<!-- ENDIF -->
+</form>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_reports.html b/phpBB/styles/prosilver/template/mcp_reports.html
new file mode 100644
index 0000000000..649154deb4
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_reports.html
@@ -0,0 +1,98 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form id="mcp" method="post" action="{S_MCP_ACTION}">
+
+<!-- IF not S_PM -->
+<fieldset class="forum-selection">
+ <label for="fo">{L_FORUM}: <select name="f" id="fo">{S_FORUM_OPTIONS}</select></label>
+ <input type="submit" name="sort" value="{L_GO}" class="button2" />
+ {S_FORM_TOKEN}
+</fieldset>
+<!-- ENDIF -->
+
+<h2>{L_TITLE}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_EXPLAIN}</p>
+
+ <!-- IF .postrow -->
+ <ul class="linklist">
+ <li class="rightside pagination">
+ <!-- IF TOTAL -->{TOTAL_REPORTS}<!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+ <ul class="topiclist">
+ <li class="header">
+ <dl>
+ <dt>{L_VIEW_DETAILS}</dt>
+ <dd class="moderation"><span>{L_REPORTER}<!-- IF not S_PM --> &amp; {L_FORUM}<!-- ENDIF --></span></dd>
+ <dd class="mark">{L_MARK}</dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist">
+
+ <!-- BEGIN postrow -->
+ <li class="row<!-- IF postrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl>
+ <!-- IF S_PM -->
+ <dt>
+ <a href="{postrow.U_VIEW_DETAILS}" class="topictitle">{postrow.PM_SUBJECT}</a> {postrow.ATTACH_ICON_IMG}<br />
+ <span>{L_MESSAGE_BY_AUTHOR} {postrow.PM_AUTHOR_FULL} &raquo; {postrow.PM_TIME}</span><br />
+ <span>{L_MESSAGE_TO} {postrow.RECIPIENTS}</span>
+ </dt>
+ <dd class="moderation">
+ <span>{postrow.REPORTER_FULL} &laquo; {postrow.REPORT_TIME}</span>
+ </dd>
+ <!-- ELSE -->
+ <dt>
+ <a href="{postrow.U_VIEW_DETAILS}" class="topictitle">{postrow.POST_SUBJECT}</a> {postrow.ATTACH_ICON_IMG}<br />
+ <span>{L_POSTED} {L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} &raquo; {postrow.POST_TIME}</span>
+ </dt>
+ <dd class="moderation">
+ <span>{postrow.REPORTER_FULL} &laquo; {postrow.REPORT_TIME}<br />
+ {L_FORUM}: <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a></span>
+ </dd>
+ <!-- ENDIF -->
+ <dd class="mark"><input type="checkbox" name="report_id_list[]" value="{postrow.REPORT_ID}" /></dd>
+ </dl>
+ </li>
+ <!-- END postrow -->
+ </ul>
+
+ <fieldset class="display-options">
+ <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <label>{L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS}</label>
+ <label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label>
+ <!-- IF TOPIC_ID --><label><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" />&nbsp; <strong>{L_ONLY_TOPIC}</strong></label><!-- ENDIF -->
+ <input type="submit" name="sort" value="{L_GO}" class="button2" />
+ </fieldset>
+ <hr />
+ <ul class="linklist">
+ <li class="rightside pagination">
+ <!-- IF TOTAL -->{TOTAL_REPORTS}<!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+
+ <!-- ELSE -->
+ <p><strong>{L_NO_REPORTS}</strong></p>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- IF .postrow -->
+ <fieldset class="display-actions">
+ <input class="button2" type="submit" value="{L_DELETE_REPORTS}" name="action[delete]" />
+ <!-- IF not S_CLOSED -->&nbsp;<input class="button1" type="submit" name="action[close]" value="{L_CLOSE_REPORTS}" /><!-- ENDIF -->
+ <div><a href="#" onclick="marklist('mcp', 'report_id_list', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'report_id_list', false); return false;">{L_UNMARK_ALL}</a></div>
+ </fieldset>
+<!-- ENDIF -->
+</form>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html
new file mode 100644
index 0000000000..db36ebf5ac
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_topic.html
@@ -0,0 +1,170 @@
+<!-- INCLUDE mcp_header.html -->
+
+<h2><a href="{U_VIEW_TOPIC}">{L_TOPIC}: {TOPIC_TITLE}</a></h2>
+
+<script type="text/javascript">
+// <![CDATA[
+var panels = new Array('display-panel', 'split-panel', 'merge-panel');
+
+<!-- IF S_MERGE_VIEW -->
+ var show_panel = 'merge-panel';
+<!-- ELSEIF S_SPLIT_VIEW -->
+ var show_panel = 'split-panel';
+<!-- ELSE -->
+ var show_panel = 'display-panel';
+<!-- ENDIF -->
+
+onload_functions.push('subPanels()');
+
+// ]]>
+</script>
+
+<div id="minitabs">
+ <ul>
+ <li id="display-panel-tab"<!-- IF not S_MERGE_VIEW --> class="activetab"<!-- ENDIF -->>
+ <span class="corners-top"><span></span></span>
+ <a href="#minitabs" onclick="subPanels('display-panel'); return false;"><span>{L_DISPLAY_OPTIONS}</span></a>
+ </li>
+ <li id="split-panel-tab">
+ <span class="corners-top"><span></span></span>
+ <a href="#minitabs" onclick="subPanels('split-panel'); return false;"><span>{L_SPLIT_TOPIC}</span></a>
+ </li>
+ <li id="merge-panel-tab"<!-- IF S_MERGE_VIEW --> class="activetab"<!-- ENDIF -->>
+ <span class="corners-top"><span></span></span>
+ <a href="#minitabs" onclick="subPanels('merge-panel'); return false;"><span>{L_MERGE_TOPIC}</span></a>
+ </li>
+ </ul>
+</div>
+
+<form id="mcp" method="post" action="{S_MCP_ACTION}">
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <fieldset id="display-panel" class="fields2">
+ <dl>
+ <dt><label for="posts_per_page">{L_POSTS_PER_PAGE}:</label><br /><span>{L_POSTS_PER_PAGE_EXPLAIN}</span></dt>
+ <dd><input class="inputbox autowidth" type="text" name="posts_per_page" id="posts_per_page" size="6" value="{POSTS_PER_PAGE}" /></dd>
+ </dl>
+ <dl>
+ <dt><label>{L_DISPLAY_POSTS}:</label></dt>
+ <dd>{S_SELECT_SORT_DAYS}&nbsp;&nbsp;<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label> <input type="submit" name="sort" value="{L_GO}" class="button2" /></dd>
+ </dl>
+ </fieldset>
+
+<!-- IF S_CAN_SPLIT -->
+ <fieldset id="split-panel" class="fields2">
+ <p>{L_SPLIT_TOPIC_EXPLAIN}</p>
+
+ <!-- IF S_SHOW_TOPIC_ICONS -->
+ <dl>
+ <dt><label for="icon">{L_TOPIC_ICON}:</label></dt>
+ <dd><label for="icon"><input type="radio" name="icon" id="icon" value="0" checked="checked" /> {L_NO_TOPIC_ICON}</label>
+ <!-- BEGIN topic_icon --><label for="icon-{topic_icon.ICON_ID}"><input type="radio" name="icon" id="icon-{topic_icon.ICON_ID}" value="{topic_icon.ICON_ID}" {topic_icon.S_ICON_CHECKED} /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" /></label> <!-- END topic_icon --></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <dl>
+ <dt><label for="subject">{L_SPLIT_SUBJECT}:</label></dt>
+ <dd><input type="text" name="subject" id="subject" size="45" maxlength="64" tabindex="2" value="{SPLIT_SUBJECT}" title="{L_SPLIT_SUBJECT}" class="inputbox" /></dd>
+ </dl>
+ <dl>
+ <dt><label>{L_SPLIT_FORUM}:</label></dt>
+ <dd><select name="to_forum_id">{S_FORUM_SELECT}</select></dd>
+ </dl>
+ </fieldset>
+<!-- ENDIF -->
+
+<!-- IF S_CAN_MERGE -->
+ <fieldset id="merge-panel" class="fields2">
+ <p>{L_MERGE_TOPIC_EXPLAIN}</p>
+ <dl>
+ <dt><label for="to_topic_id">{L_MERGE_TOPIC_ID}:</label></dt>
+ <dd>
+ <input class="inputbox autowidth" type="text" size="6" name="to_topic_id" id="to_topic_id" value="{TO_TOPIC_ID}" />
+ <a href="{U_SELECT_TOPIC}" >{L_SELECT_TOPIC}</a>
+ </dd>
+ <!-- IF TO_TOPIC_INFO --><dd>{TO_TOPIC_INFO}</dd><!-- ENDIF -->
+ </dl>
+ </fieldset>
+<!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3 id="review">
+ <span class="right-box"><a href="#review" onclick="viewableArea(getElementById('topicreview'), true); var rev_text = getElementById('review').getElementsByTagName('a').item(0).firstChild; if (rev_text.data == '{LA_EXPAND_VIEW}'){rev_text.data = '{LA_COLLAPSE_VIEW}'; } else if (rev_text.data == '{LA_COLLAPSE_VIEW}'){rev_text.data = '{LA_EXPAND_VIEW}'};">{L_EXPAND_VIEW}</a></span>
+ {L_TOPIC_REVIEW}: {TOPIC_TITLE}
+ </h3>
+
+ <div id="topicreview">
+ <!-- BEGIN postrow -->
+ <div class="post <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="postbody" id="pr{postrow.POST_ID}">
+ <ul class="profile-icons"><li class="info-icon"><a href="{postrow.U_POST_DETAILS}" title="{L_POST_DETAILS}"><span>{L_POST_DETAILS}</span></a></li><li>{L_SELECT}: <input type="checkbox" name="post_id_list[]" value="{postrow.POST_ID}"<!-- IF postrow.S_CHECKED --> checked="checked"<!-- ENDIF --> /></li></ul>
+
+ <h3><a href="{postrow.U_POST_DETAILS}">{postrow.POST_SUBJECT}</a></h3>
+ <p class="author"><a href="#pr{postrow.POST_ID}">{postrow.MINI_POST_IMG}</a> {L_POSTED} {postrow.POST_DATE} {L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong><!-- IF postrow.U_MCP_DETAILS --> [ <a href="{postrow.U_MCP_DETAILS}">{L_POST_DETAILS}</a> ]<!-- ENDIF --></p>
+
+ <!-- IF postrow.S_POST_UNAPPROVED or postrow.S_POST_REPORTED -->
+ <p class="rules">
+ <!-- IF postrow.S_POST_UNAPPROVED -->{UNAPPROVED_IMG} <a href="{postrow.U_MCP_APPROVE}"><strong>{L_POST_UNAPPROVED}</strong></a><br /><!-- ENDIF -->
+ <!-- IF postrow.S_POST_REPORTED -->{REPORTED_IMG} <a href="{postrow.U_MCP_REPORT}"><strong>{L_POST_REPORTED}</strong></a><!-- ENDIF -->
+ </p>
+ <!-- ENDIF -->
+
+ <div class="content" id="message_{postrow.POST_ID}">{postrow.MESSAGE}</div>
+
+ <!-- IF postrow.S_HAS_ATTACHMENTS -->
+ <dl class="attachbox">
+ <dt>{L_ATTACHMENTS}</dt>
+ <!-- BEGIN attachment -->
+ <dd>{postrow.attachment.DISPLAY_ATTACHMENT}</dd>
+ <!-- END attachment -->
+ </dl>
+ <!-- ENDIF -->
+
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- END postrow -->
+ </div>
+
+ <hr />
+
+ <!-- IF PAGINATION or TOTAL_POSTS -->
+ <ul class="linklist">
+ <li class="rightside pagination">
+ <!-- IF TOTAL_POSTS --> {TOTAL_POSTS}<!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="display-actions">
+ <select name="action">
+ <option value="" selected="selected">{L_SELECT_ACTION}</option>
+ <!-- IF S_CAN_APPROVE --><option value="approve">{L_APPROVE_POSTS}</option><!-- ENDIF -->
+ <!-- IF S_CAN_LOCK --><option value="lock_post">{L_LOCK_POST_POSTS} [ {L_LOCK_POST_EXPLAIN} ]</option><option value="unlock_post">{L_UNLOCK_POST_POSTS}</option><!-- ENDIF -->
+ <!-- IF S_CAN_DELETE --><option value="delete_post">{L_DELETE_POSTS}</option><!-- ENDIF -->
+ <!-- IF S_CAN_MERGE --><option value="merge_posts"<!-- IF S_MERGE_VIEW --> selected="selected"<!-- ENDIF -->>{L_MERGE_POSTS}</option><!-- ENDIF -->
+ <!-- IF S_CAN_SPLIT --><option value="split_all"<!-- IF S_SPLIT_VIEW --> selected="selected"<!-- ENDIF -->>{L_SPLIT_POSTS}</option><option value="split_beyond">{L_SPLIT_AFTER}</option><!-- ENDIF -->
+ </select>&nbsp;
+ <input class="button1" type="submit" name="mcp_topic_submit" value="{L_SUBMIT}" />
+ <div><a href="#" onclick="marklist('mcp', 'post', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'post', false); return false;">{L_UNMARK_ALL}</a></div>
+{S_HIDDEN_FIELDS}
+{S_FORM_TOKEN}
+</fieldset>
+
+</form>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_viewlogs.html b/phpBB/styles/prosilver/template/mcp_viewlogs.html
new file mode 100644
index 0000000000..264152d3ae
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_viewlogs.html
@@ -0,0 +1,53 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form method="post" id="mcp" action="{S_MCP_ACTION}">
+
+<table class="tablebg" width="100%" cellspacing="1" cellpadding="2" border="0">
+<tr>
+ <th colspan="<!-- IF S_TOPIC_ID -->4<!-- ELSE -->5<!-- ENDIF -->" height="28" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th>
+</tr>
+<tr>
+ <td colspan="<!-- IF S_TOPIC_ID -->4<!-- ELSE -->5<!-- ENDIF -->" class="cat" height="28" align="center"><span class="gensmall">{L_DISPLAY_LOG}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /></span></td>
+</tr>
+<tr>
+ <th width="15%" height="28" nowrap="nowrap">{L_USERNAME}</th>
+ <th width="12%" nowrap="nowrap">{L_IP}</th>
+ <th width="18%" nowrap="nowrap">{L_TIME}</th>
+ <th width="45%" nowrap="nowrap">{L_ACTION}</th>
+ <!-- IF not S_TOPIC_ID --><th width="8%" nowrap="nowrap"></th><!-- ENDIF -->
+</tr>
+<!-- IF S_TOPIC_ID -->
+ <tr>
+ <td class="bg3" colspan="5"><span class="gensmall">{L_LOGS_CURRENT_TOPIC} <a href="{U_VIEW_TOPIC}"><strong>{TOPIC_NAME}</strong></a></td>
+ </tr>
+<!-- ENDIF -->
+
+<!-- BEGIN log -->
+<tr>
+ <td class="bg1" nowrap="nowrap"><span class="gen">{log.USERNAME}</span></td>
+ <td class="bg1" align="center" nowrap="nowrap"><span class="gen">{log.IP}</span></td>
+ <td class="bg1" align="center" nowrap="nowrap"><span class="gensmall">{log.TIME}</span></td>
+ <td class="bg1"><span class="gen">{log.ACTION}</span></td>
+ <!-- IF not S_TOPIC_ID -->
+ <td class="bg1" align="center" nowrap="nowrap"><span class="gensmall"><!-- IF log.U_VIEW_TOPIC --><a href="{log.U_VIEW_TOPIC}">{L_VIEW_TOPIC}</a><!-- IF log.U_VIEWLOGS --> | <!-- ENDIF --><!-- ENDIF --><!-- IF log.U_VIEWLOGS --><a href="{log.U_VIEWLOGS}">{L_VIEW_TOPIC_LOGS}</a><!-- ENDIF --></span></td>
+ <!-- ENDIF -->
+</tr>
+<!-- BEGINELSE -->
+ <tr>
+ <td class="bg1" colspan="<!-- IF S_TOPIC_ID -->4<!-- ELSE -->5<!-- ENDIF -->" align="center"><span class="gen">{L_NO_ENTRIES}</span></td>
+ </tr>
+<!-- END log -->
+<div>
+ {S_FORM_TOKEN}
+</div>
+</table>
+</form>
+
+<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
+<tr>
+ <td class="nav" align="left" valign="middle">{PAGE_NUMBER}</td>
+ <td align="right" valign="top" nowrap="nowrap"><!-- IF PAGINATION --><strong><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a> <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}">{L_PREVIOUS}</a>&nbsp;&nbsp;<!-- ENDIF -->{PAGINATION}<!-- IF NEXT_PAGE -->&nbsp;&nbsp;<a href="{NEXT_PAGE}">{L_NEXT}</a><!-- ENDIF --></strong><!-- ENDIF --></td>
+</tr>
+</table>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_warn_front.html b/phpBB/styles/prosilver/template/mcp_warn_front.html
new file mode 100644
index 0000000000..fc8fa37fab
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_warn_front.html
@@ -0,0 +1,97 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form method="post" id="mcp" action="{U_POST_ACTION}">
+
+<h2>{L_WARN_USER}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_SELECT_USER}</h3>
+
+ <fieldset>
+ <dl>
+ <dt><label for="username">{L_SELECT_USER}:</label></dt>
+ <dd><input name="username" id="username" type="text" class="inputbox" /></dd>
+ <dd><strong><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></strong></dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="submit-buttons">
+ <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="submituser" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_MOST_WARNINGS}</h3>
+
+ <!-- IF .highest -->
+ <table class="table1" cellspacing="0">
+ <thead>
+ <tr>
+ <th class="name">{L_USERNAME}</th>
+ <th class="name">{L_WARNINGS}</th>
+ <th class="name">{L_LATEST_WARNING_TIME}</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+
+ <!-- BEGIN highest -->
+ <tr class="<!-- IF highest.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <td>{highest.USERNAME_FULL}</td>
+ <td>{highest.WARNINGS}</td>
+ <td>{highest.WARNING_TIME}</td>
+ <td><a href="{highest.U_NOTES}">{L_VIEW_NOTES}</a></td>
+ </tr>
+ <!-- END latest -->
+ </tbody>
+ </table>
+ <!-- ELSE -->
+ <p><strong>{L_WARNINGS_ZERO_TOTAL}</strong></p>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_LATEST_WARNINGS}</h3>
+
+ <!-- IF .latest -->
+ <table class="table1" cellspacing="0">
+ <thead>
+ <tr>
+ <th class="name">{L_USERNAME}</th>
+ <th class="name">{L_TIME}</th>
+ <th class="name">{L_TOTAL_WARNINGS}</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN latest -->
+ <tr class="<!-- IF latest.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <td>{latest.USERNAME_FULL}</td>
+ <td>{latest.WARNING_TIME}</td>
+ <td>{latest.WARNINGS}</td>
+ <td><a href="{latest.U_NOTES}">{L_VIEW_NOTES}</a></td>
+ </tr>
+ <!-- END latest -->
+ </tbody>
+ </table>
+ <!-- ELSE -->
+ <p><strong>{L_WARNINGS_ZERO_TOTAL}</strong></p>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_warn_list.html b/phpBB/styles/prosilver/template/mcp_warn_list.html
new file mode 100644
index 0000000000..3da7c4c389
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_warn_list.html
@@ -0,0 +1,66 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form method="post" id="mcp" action="{U_POST_ACTION}">
+
+<h2>{L_WARNED_USERS}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_WARNED_USERS_EXPLAIN}</p>
+
+ <!-- IF .user -->
+ <ul class="linklist">
+ <li class="rightside pagination">
+ <!-- IF TOTAL_USERS -->{TOTAL_USERS} <!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+
+ <table class="table1" cellspacing="0">
+ <thead>
+ <tr>
+ <th class="name">{L_USERNAME}</th>
+ <th class="name">{L_WARNINGS}</th>
+ <th class="name">{L_LATEST_WARNING_TIME}</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+
+ <!-- BEGIN user -->
+ <tr class="<!-- IF user.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <td>{user.USERNAME_FULL}</td>
+ <td>{user.WARNINGS}</td>
+ <td>{user.WARNING_TIME}</td>
+ <td><a href="{user.U_NOTES}">{L_VIEW_NOTES}</a></td>
+ </tr>
+ <!-- END user -->
+ </tbody>
+ </table>
+
+ <fieldset class="display-options">
+ <label>{L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS}</label>
+ <label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label>
+ <input type="submit" name="sort" value="{L_GO}" class="button2" />
+ </fieldset>
+ <hr />
+
+ <ul class="linklist">
+ <li class="rightside pagination">
+ <!-- IF TOTAL_USERS -->{TOTAL_USERS} <!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+ <!-- ELSE -->
+ <p><strong>{L_WARNINGS_ZERO_TOTAL}</strong></p>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+
+{S_FORM_TOKEN}
+</div>
+
+</form>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_warn_post.html b/phpBB/styles/prosilver/template/mcp_warn_post.html
new file mode 100644
index 0000000000..d09209f5a4
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_warn_post.html
@@ -0,0 +1,74 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form method="post" id="mcp" action="{U_POST_ACTION}">
+
+<h2>{L_MCP_WARN_POST}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3><!-- IF USER_COLOR --><span style="color: #{USER_COLOR}">{USERNAME}</span><!-- ELSE -->{USERNAME}<!-- ENDIF --></h3>
+
+ <div>
+ <div class="column1">
+ <!-- IF AVATAR_IMG --><div>{AVATAR_IMG}</div><!-- ENDIF -->
+ </div>
+
+ <div class="column2">
+ <dl class="details">
+ <!-- IF RANK_TITLE --><dt>{L_RANK}:</dt><dd>{RANK_TITLE}</dd><!-- ENDIF -->
+ <!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE -->&nbsp;<!-- ELSE -->{L_RANK}:<!-- ENDIF --></dt><dd>{RANK_IMG}</dd><!-- ENDIF -->
+ <dt>{L_JOINED}:</dt><dd>{JOINED}</dd>
+ <dt>{L_TOTAL_POSTS}:</dt><dd>{POSTS}</dd>
+ <dt>{L_WARNINGS}: </dt><dd>{WARNINGS}</dd>
+ </dl>
+ </div>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_POST_DETAILS}</h3>
+
+ <div class="postbody">
+
+ <div class="content">
+ {POST}
+ </div>
+
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_ADD_WARNING}</h3>
+ <p>{L_ADD_WARNING_EXPLAIN}</p>
+
+ <fieldset>
+ <textarea name="warning" id="warning" class="inputbox" cols="40" rows="3">{L_WARNING_POST_DEFAULT}</textarea>
+ <!-- IF S_CAN_NOTIFY -->
+ <br /><br />
+ <dl class="panel">
+ <dt>&nbsp;</dt>
+ <dd><label><input type="checkbox" name="notify_user" checked="checked" /> {L_NOTIFY_USER_WARN}</label></dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="submit-buttons">
+ <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="action[add_warning]" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_warn_user.html b/phpBB/styles/prosilver/template/mcp_warn_user.html
new file mode 100644
index 0000000000..dfc167399f
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_warn_user.html
@@ -0,0 +1,58 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form method="post" id="mcp" action="{U_POST_ACTION}">
+
+<h2>{L_WARN_USER}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{USERNAME_FULL}</h3>
+
+ <div>
+ <div class="column1">
+ <!-- IF AVATAR_IMG --><div>{AVATAR_IMG}</div><!-- ENDIF -->
+ </div>
+
+ <div class="column2">
+ <dl class="details">
+ <!-- IF RANK_TITLE --><dt>{L_RANK}:</dt><dd>{RANK_TITLE}</dd><!-- ENDIF -->
+ <!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE -->&nbsp;<!-- ELSE -->{L_RANK}:<!-- ENDIF --></dt><dd>{RANK_IMG}</dd><!-- ENDIF -->
+ <dt>{L_JOINED}:</dt><dd>{JOINED}</dd>
+ <dt>{L_TOTAL_POSTS}:</dt><dd>{POSTS}</dd>
+ <dt>{L_WARNINGS}: </dt><dd>{WARNINGS}</dd>
+ </dl>
+ </div>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_ADD_WARNING}</h3>
+ <p>{L_ADD_WARNING_EXPLAIN}</p>
+
+ <fieldset>
+ <textarea name="warning" id="warning" class="inputbox" cols="40" rows="3"></textarea>
+ <!-- IF S_CAN_NOTIFY -->
+ <br /><br />
+ <dl class="panel">
+ <dt>&nbsp;</dt>
+ <dd><label><input type="checkbox" name="notify_user" checked="checked" /> {L_NOTIFY_USER_WARN}</label></dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="submit-buttons">
+ <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="action[add_warning]" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_whois.html b/phpBB/styles/prosilver/template/mcp_whois.html
new file mode 100644
index 0000000000..5872bd0b91
--- /dev/null
+++ b/phpBB/styles/prosilver/template/mcp_whois.html
@@ -0,0 +1,16 @@
+<!-- INCLUDE mcp_header.html -->
+<h2>{L_WHOIS}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_RETURN_POST}">{L_RETURN_POST}</a></p>
+ <div class="postbody"><div class="content">
+ <pre>{WHOIS}</pre>
+ </div></div>
+ <p><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_RETURN_POST}">{L_RETURN_POST}</a></p>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html
new file mode 100644
index 0000000000..197cbd4a0c
--- /dev/null
+++ b/phpBB/styles/prosilver/template/memberlist_body.html
@@ -0,0 +1,184 @@
+<!-- IF S_IN_SEARCH_POPUP -->
+ <!-- INCLUDE simple_header.html -->
+ <!-- INCLUDE memberlist_search.html -->
+ <form method="post" id="results" action="{S_MODE_ACTION}" onsubmit="insert_marked(this.user); return false">
+
+<!-- ELSEIF S_SEARCH_USER -->
+ <!-- INCLUDE overall_header.html -->
+ <!-- INCLUDE memberlist_search.html -->
+ <form method="post" action="{S_MODE_ACTION}">
+
+<!-- ELSE -->
+ <!-- INCLUDE overall_header.html -->
+ <form method="post" action="{S_MODE_ACTION}">
+
+<!-- ENDIF -->
+
+ <!-- IF S_SHOW_GROUP -->
+
+ <h2<!-- IF GROUP_COLOR --> style="color:#{GROUP_COLOR};"<!-- ENDIF -->>{GROUP_NAME}</h2>
+ <p>{GROUP_DESC} {GROUP_TYPE}</p>
+ <p>
+ <!-- IF AVATAR_IMG -->{AVATAR_IMG}<!-- ENDIF -->
+ <!-- IF RANK_IMG -->{RANK_IMG}<!-- ENDIF -->
+ <!-- IF GROUP_RANK -->{GROUP_RANK}<!-- ENDIF -->
+ </p>
+
+ <!-- ELSE -->
+ <h2 class="solo">{PAGE_TITLE}<!-- IF SEARCH_WORDS -->: <a href="{U_SEARCH_WORDS}">{SEARCH_WORDS}</a><!-- ENDIF --></h2>
+
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <ul class="linklist">
+ <li>
+
+ <!-- IF U_FIND_MEMBER and not S_SEARCH_USER --><a href="{U_FIND_MEMBER}">{L_FIND_USERNAME}</a> &bull; <!-- ELSEIF S_SEARCH_USER and U_HIDE_FIND_MEMBER and not S_IN_SEARCH_POPUP --><a href="{U_HIDE_FIND_MEMBER}">{L_HIDE_MEMBER_SEARCH}</a> &bull; <!-- ENDIF -->
+ <strong style="font-size: 0.95em;"><a href="{S_MODE_ACTION}&amp;first_char=">{L_ALL}</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=a#memberlist">A</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=b#memberlist">B</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=c#memberlist">C</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=d#memberlist">D</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=e#memberlist">E</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=f#memberlist">F</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=g#memberlist">G</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=h#memberlist">H</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=i#memberlist">I</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=j#memberlist">J</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=k#memberlist">K</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=l#memberlist">L</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=m#memberlist">M</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=n#memberlist">N</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=o#memberlist">O</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=p#memberlist">P</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=q#memberlist">Q</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=r#memberlist">R</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=s#memberlist">S</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=t#memberlist">T</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=u#memberlist">U</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=v#memberlist">V</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=w#memberlist">W</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=x#memberlist">X</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=y#memberlist">Y</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=z#memberlist">Z</a>&nbsp;
+ <a href="{S_MODE_ACTION}&amp;first_char=other">#</a></strong>
+ </li>
+ <li class="rightside pagination">
+ {TOTAL_USERS} &bull;
+ <!-- IF PAGINATION --><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE -->{PAGE_NUMBER}<!-- ENDIF -->
+ </li>
+ </ul>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
+ <!-- IF S_LEADERS_SET or not S_SHOW_GROUP or not .memberrow -->
+ <div class="forumbg forumbg-table">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <table class="table1" cellspacing="1" id="memberlist">
+ <thead>
+ <tr>
+ <th class="name"><span class="rank-img"><a href="{U_SORT_RANK}">{L_RANK}</a></span><a href="{U_SORT_USERNAME}"><!-- IF S_SHOW_GROUP and .memberrow -->{L_GROUP_LEADER}<!-- ELSE -->{L_USERNAME}<!-- ENDIF --></a></th>
+ <th class="posts"><a href="{U_SORT_POSTS}#memberlist">{L_POSTS}</a></th>
+ <th class="info"><a href="{U_SORT_WEBSITE}#memberlist">{L_WEBSITE}</a>{L_COMMA_SEPARATOR}<a href="{U_SORT_LOCATION}">{L_LOCATION}</a></th>
+ <th class="joined"><a href="{U_SORT_JOINED}#memberlist">{L_JOINED}</a></th>
+ <!-- IF U_SORT_ACTIVE --><th class="active"><a href="{U_SORT_ACTIVE}#memberlist">{L_LAST_ACTIVE}</a></th><!-- ENDIF -->
+ </tr>
+ </thead>
+ <tbody>
+ <!-- ENDIF -->
+ <!-- BEGIN memberrow -->
+ <!-- IF S_SHOW_GROUP -->
+ <!-- IF not memberrow.S_GROUP_LEADER and not $S_MEMBER_HEADER -->
+ <!-- IF S_LEADERS_SET and memberrow.S_FIRST_ROW -->
+ <tr class="bg1">
+ <td colspan="<!-- IF U_SORT_ACTIVE -->5<!-- ELSE -->4<!-- ENDIF -->">&nbsp;</td>
+ </tr>
+ <!-- ENDIF -->
+<!-- IF S_LEADERS_SET -->
+ </tbody>
+ </table>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+<!-- ENDIF -->
+<div class="forumbg">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <table class="table1" cellspacing="1">
+ <thead>
+ <tr>
+ <!-- IF not S_LEADERS_SET -->
+ <th class="name"><span class="rank-img"><a href="{U_SORT_RANK}">{L_RANK}</a></span><a href="{U_SORT_USERNAME}"><!-- IF S_SHOW_GROUP -->{L_GROUP_MEMBERS}<!-- ELSE -->{L_USERNAME}<!-- ENDIF --></a></th>
+ <th class="posts"><a href="{U_SORT_POSTS}#memberlist">{L_POSTS}</a></th>
+ <th class="info"><a href="{U_SORT_WEBSITE}#memberlist">{L_WEBSITE}</a>{L_COMMA_SEPARATOR}<a href="{U_SORT_LOCATION}">{L_LOCATION}</a></th>
+ <th class="joined"><a href="{U_SORT_JOINED}#memberlist">{L_JOINED}</a></th>
+ <!-- IF U_SORT_ACTIVE --><th class="active"><a href="{U_SORT_ACTIVE}#memberlist">{L_LAST_ACTIVE}</a></th><!-- ENDIF -->
+ <!-- ELSEIF S_SHOW_GROUP -->
+ <th class="name">{L_GROUP_MEMBERS}</th>
+ <th class="posts">&nbsp;</th>
+ <th class="info">&nbsp;</th>
+ <th class="joined">&nbsp;</th>
+ <!-- IF U_SORT_ACTIVE --><th class="active">&nbsp;</th><!-- ENDIF -->
+ <!-- ENDIF -->
+ </tr>
+ </thead>
+ <tbody>
+ <!-- DEFINE $S_MEMBER_HEADER = 1 -->
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+
+ <tr class="<!-- IF memberrow.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <td><!-- IF memberrow.RANK_IMG --><span class="rank-img">{memberrow.RANK_IMG}</span><!-- ELSE --><span class="rank-img">{memberrow.RANK_TITLE}</span><!-- ENDIF --><!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><input type="checkbox" name="user" value="{memberrow.USERNAME}" /> <!-- ENDIF -->{memberrow.USERNAME_FULL}<!-- IF S_SELECT_SINGLE --><br />[&nbsp;<a href="#" onclick="insert_single('{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a>&nbsp;]<!-- ENDIF --></td>
+ <td class="posts"><!-- IF memberrow.POSTS and S_DISPLAY_SEARCH --><a href="{memberrow.U_SEARCH_USER}" title="{L_SEARCH_USER_POSTS}">{memberrow.POSTS}</a><!-- ELSE -->{memberrow.POSTS}<!-- ENDIF --></td>
+ <td class="info"><!-- IF memberrow.U_WWW or memberrow.LOCATION --><!-- IF memberrow.U_WWW --><div><a href="{memberrow.U_WWW}" title="{L_VISIT_WEBSITE}: {memberrow.U_WWW}">{memberrow.U_SHORT_WWW}</a></div><!-- ENDIF --><!-- IF memberrow.LOCATION --><div>{memberrow.LOCATION}</div><!-- ENDIF --><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
+ <td>{memberrow.JOINED}</td>
+ <!-- IF S_VIEWONLINE --><td>{memberrow.VISITED}&nbsp;</td><!-- ENDIF -->
+ </tr>
+ <!-- BEGINELSE -->
+ <tr class="bg1">
+ <td colspan="<!-- IF S_VIEWONLINE -->5<!-- ELSE -->4<!-- ENDIF -->">{L_NO_MEMBERS}</td>
+ </tr>
+ <!-- END memberrow -->
+ </tbody>
+ </table>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE -->
+<fieldset class="display-actions">
+ <input type="submit" name="submit" value="{L_SELECT_MARKED}" class="button2" />
+ <div><a href="#" onclick="marklist('results', 'user', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('results', 'user', false); return false;">{L_UNMARK_ALL}</a></div>
+</fieldset>
+<!-- ENDIF -->
+
+<!-- IF S_IN_SEARCH_POPUP -->
+</form>
+<form method="post" id="sort-results" action="{S_MODE_ACTION}">
+<!-- ENDIF -->
+
+<!-- IF S_IN_SEARCH_POPUP and not S_SEARCH_USER -->
+<fieldset class="display-options">
+ <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <label for="sk">{L_SELECT_SORT_METHOD}: <select name="sk" id="sk">{S_MODE_SELECT}</select></label>
+ <label for="sd">{L_ORDER} <select name="sd" id="sd">{S_ORDER_SELECT}</select> <input type="submit" name="sort" value="{L_SUBMIT}" class="button2" /></label>
+</fieldset>
+<!-- ENDIF -->
+
+</form>
+
+<hr />
+
+<ul class="linklist">
+ <li class="rightside pagination">{TOTAL_USERS} &bull; <!-- IF PAGINATION --><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE -->{PAGE_NUMBER}<!-- ENDIF --></li>
+</ul>
+
+<!-- IF S_IN_SEARCH_POPUP -->
+ <!-- INCLUDE simple_footer.html -->
+<!-- ELSE -->
+ <!-- INCLUDE jumpbox.html -->
+ <!-- INCLUDE overall_footer.html -->
+<!-- ENDIF --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/memberlist_email.html b/phpBB/styles/prosilver/template/memberlist_email.html
new file mode 100644
index 0000000000..e8870d8921
--- /dev/null
+++ b/phpBB/styles/prosilver/template/memberlist_email.html
@@ -0,0 +1,65 @@
+<!-- INCLUDE overall_header.html -->
+
+<h2 class="titlespace">{L_SEND_EMAIL_USER} {USERNAME}</h2>
+
+<form method="post" action="{S_POST_ACTION}" id="post">
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+ <!-- IF ERROR_MESSAGE --><p class="error">{ERROR_MESSAGE}</p><!-- ENDIF -->
+ <fieldset class="fields2">
+ <!-- IF S_SEND_USER -->
+ <dl>
+ <dt><label>{L_RECIPIENT}:</label></dt>
+ <dd><strong>{USERNAME}</strong></dd>
+ </dl>
+ <dl>
+ <dt><label for="subject">{L_SUBJECT}:</label></dt>
+ <dd><input class="inputbox autowidth" type="text" name="subject" id="subject" size="50" tabindex="1" value="{SUBJECT}" /></dd>
+ </dl>
+ <!-- ELSE -->
+ <dl>
+ <dt><label for="email">{L_EMAIL_ADDRESS}:</label></dt>
+ <dd><input class="inputbox autowidth" type="text" name="email" id="email" size="50" maxlength="100" tabindex="2" value="{EMAIL}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="name">{L_REAL_NAME}:</label></dt>
+ <dd><input class="inputbox autowidth" type="text" name="name" id="name" size="50" tabindex="3" value="{NAME}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="lang">{L_DEST_LANG}:</label><br />
+ <span>{L_DEST_LANG_EXPLAIN}</span></dt>
+ <dd><select name="lang">{S_LANG_OPTIONS}</select></dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="message">{L_MESSAGE_BODY}:</label><br />
+ <span>{L_EMAIL_BODY_EXPLAIN}</span></dt>
+ <dd><textarea class="inputbox" name="message" id="message" rows="15" cols="76" tabindex="4">{MESSAGE}</textarea></dd>
+ </dl>
+ <dl>
+ <dt>&nbsp;</dt>
+ <dd><label for="cc_email"><input type="checkbox" name="cc_email" id="cc_email" value="1" checked="checked" tabindex="5" /> {L_CC_EMAIL}</label></dd>
+ </dl>
+ </fieldset>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="content">
+ <fieldset class="submit-buttons">
+ <input type="submit" tabindex="6" name="submit" class="button1" value="{L_SEND_EMAIL}" />
+ </fieldset>
+ </div>
+ <span class="corners-bottom"><span></span></span></div>
+{S_FORM_TOKEN}
+</div>
+
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/memberlist_im.html b/phpBB/styles/prosilver/template/memberlist_im.html
new file mode 100644
index 0000000000..acc7ec359b
--- /dev/null
+++ b/phpBB/styles/prosilver/template/memberlist_im.html
@@ -0,0 +1,158 @@
+<!-- INCLUDE simple_header.html -->
+
+<!-- MSNM info from http://www.cdolive.net/ - doesn't seem to work with MSN Messenger -->
+<h2 class="solo">{L_SEND_IM}</h2>
+
+<form method="post" action="{S_IM_ACTION}">
+
+<div class="panel bg2">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_SEND_IM_EXPLAIN}</p>
+
+ <fieldset>
+ <dl class="fields2">
+ <dt><label>{L_IM_RECIPIENT}:</label></dt>
+ <dd><strong>{USERNAME}</strong><!-- IF S_SEND_ICQ or S_SEND_AIM or S_SEND_MSNM or S_NO_SEND_JABBER --> [ {IM_CONTACT} ]<!-- ENDIF --><!-- IF PRESENCE_IMG --> {PRESENCE_IMG}<!-- ENDIF --></dd>
+ </dl>
+
+ <!-- IF S_SEND_ICQ -->
+ <dl class="fields2">
+ <dt><label for="from">{L_IM_NAME}:</label></dt>
+ <dd><input class="inputbox autowidth" type="text" name="from" id="from" size="20" /></dd>
+ </dl>
+ <dl class="fields2">
+ <dt><label for="body">{L_IM_MESSAGE}:</label></dt>
+ <dd><textarea class="inputbox autowidth" name="body" id="body" rows="5" cols="45"></textarea></dd>
+ </dl>
+ <dl class="fields2">
+ <dt>&nbsp;</dt>
+ <dd><input class="button1" name="submit" type="submit" value="{L_IM_SEND}" /></dd>
+ </dl>
+ <input type="hidden" name="fromemail" value="{EMAIL}" />
+ <input type="hidden" name="subject" value="{SITENAME}" />
+ <input type="hidden" name="to" value="{IM_CONTACT}" />
+ <!-- ENDIF -->
+
+ <!-- IF S_SEND_AIM -->
+ <dl class="fields2">
+ <dt>&nbsp;</dt>
+ <dd><a href="{U_AIM_CONTACT}">{L_IM_ADD_CONTACT}</a></dd>
+ <dd><a href="{U_AIM_MESSAGE}">{L_IM_SEND_MESSAGE}</a></dd>
+ <dd><a href="http://www.aim.com/download.adp">{L_IM_DOWNLOAD_APP}</a> | <a href="http://aimexpress.oscar.aol.com/aimexpress/launch.adp?Brand=AIM">{L_IM_AIM_EXPRESS}</a></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF S_SEND_MSNM -->
+ <dl class="fields2">
+ <dt>&nbsp;</dt>
+ <dd><object classid="clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28" codetype="application/x-oleobject" id="objMessengerApp" width="0" height="0"></object></dd>
+ <dd><a href="#" onclick="add_contact('{A_IM_CONTACT}'); return false;">{L_IM_ADD_CONTACT}</a></dd>
+ <dd><a href="#" onclick="im_contact('{A_IM_CONTACT}'); return false;">{L_IM_SEND_MESSAGE}</a></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF S_SEND_JABBER -->
+ <dl class="fields2">
+ <dt><label for="message">{L_IM_MESSAGE}:</label></dt>
+ <dd><textarea class="inputbox autowidth" name="message" id="message" rows="5" cols="45"></textarea></dd>
+ </dl>
+ <dl class="fields2">
+ <dt>&nbsp;</dt>
+ <dd><input class="button1" name="submit" type="submit" value="{L_IM_SEND}" /></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF S_NO_SEND_JABBER -->
+ <dl class="fields2">
+ <dt>&nbsp;</dt>
+ <dd>{L_IM_NO_JABBER}</dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF S_SENT_JABBER -->
+ <dl class="fields2">
+ <dt>&nbsp;</dt>
+ <dd>{L_IM_SENT_JABBER}</dd>
+ </dl>
+ <!-- ENDIF -->
+ {S_FORM_TOKEN}
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+</form>
+
+<a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>
+
+<script type="text/javascript">
+// <![CDATA[
+
+ /** The following will not work with Windows Vista **/
+
+ var app = document.getElementById('objMessengerApp');
+
+ /**
+ * Check whether the browser supports this and whether MSNM is connected
+ */
+ function msn_supported()
+ {
+ // Does the browser support the MSNM object?
+ if (app.MyStatus)
+ {
+ // Is MSNM connected?
+ if (app.MyStatus == 1)
+ {
+ alert('{LA_IM_MSNM_CONNECT}');
+ return false;
+ }
+ }
+ else
+ {
+ alert('{LA_IM_MSNM_BROWSER}');
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Add to your contact list
+ */
+ function add_contact(address)
+ {
+ if (msn_supported())
+ {
+ // Could return an error while MSNM is connecting, don't want that
+ try
+ {
+ app.AddContact(0, address);
+ }
+ catch (e)
+ {
+ return;
+ }
+ }
+}
+
+/**
+* Write IM to contact
+*/
+function im_contact(address)
+{
+ if (msn_supported())
+ {
+ // Could return an error while MSNM is connecting, don't want that
+ try
+ {
+ app.InstantMessage(address);
+ }
+ catch (e)
+ {
+ return;
+ }
+ }
+}
+// ]]>
+</script>
+
+<!-- INCLUDE simple_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/memberlist_leaders.html b/phpBB/styles/prosilver/template/memberlist_leaders.html
new file mode 100644
index 0000000000..3917498050
--- /dev/null
+++ b/phpBB/styles/prosilver/template/memberlist_leaders.html
@@ -0,0 +1,76 @@
+<!-- INCLUDE overall_header.html -->
+
+<h2 class="solo">{PAGE_TITLE}</h2>
+
+<form method="post" action="{S_MODE_ACTION}">
+
+<div class="forumbg">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <table class="table1" cellspacing="1">
+ <thead>
+ <tr>
+ <th class="name"><span class="rank-img">{L_RANK}&nbsp;</span>{L_ADMINISTRATORS}</th>
+ <th class="info">{L_PRIMARY_GROUP}</th>
+ <th class="info">{L_FORUMS}</th>
+ </tr>
+ </thead>
+ <tbody>
+<!-- BEGIN admin -->
+ <tr class="<!-- IF admin.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <td><!-- IF admin.RANK_IMG --><span class="rank-img">{admin.RANK_IMG}</span><!-- ELSE --><span class="rank-img">{admin.RANK_TITLE}</span><!-- ENDIF -->{admin.USERNAME_FULL}</td>
+ <td class="info"><!-- IF admin.U_GROUP -->
+ <a<!-- IF admin.GROUP_COLOR --> style="font-weight: bold; color:#{admin.GROUP_COLOR}"<!-- ENDIF --> href="{admin.U_GROUP}">{admin.GROUP_NAME}</a>
+ <!-- ELSE -->
+ {admin.GROUP_NAME}
+ <!-- ENDIF --></td>
+ <td class="info">-</td>
+ </tr>
+<!-- BEGINELSE -->
+ <tr class="bg1">
+ <td colspan="3"><strong>{L_NO_ADMINISTRATORS}</strong></td>
+ </tr>
+<!-- END admin -->
+ </tbody>
+ </table>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="forumbg">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <table class="table1" cellspacing="1">
+ <thead>
+ <tr>
+ <th class="name">{L_MODERATORS}</th>
+ <th class="info">&nbsp;</th>
+ <th class="info">&nbsp;</th>
+ </tr>
+ </thead>
+ <tbody>
+<!-- BEGIN mod -->
+ <tr class="<!-- IF mod.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <td><!-- IF mod.RANK_IMG --><span class="rank-img">{mod.RANK_IMG}</span><!-- ELSE --><span class="rank-img">{mod.RANK_TITLE}</span><!-- ENDIF -->{mod.USERNAME_FULL}</td>
+ <td class="info"><!-- IF mod.U_GROUP -->
+ <a<!-- IF mod.GROUP_COLOR --> style="font-weight: bold; color:#{mod.GROUP_COLOR}"<!-- ENDIF --> href="{mod.U_GROUP}">{mod.GROUP_NAME}</a>
+ <!-- ELSE -->
+ {mod.GROUP_NAME}
+ <!-- ENDIF --></td>
+ <td class="info"><!-- IF not mod.FORUMS -->{L_ALL_FORUMS}<!-- ELSE --><select style="width: 100%;">{mod.FORUMS}</select><!-- ENDIF --></td>
+ </tr>
+<!-- BEGINELSE -->
+ <tr class="bg1">
+ <td colspan="3"><strong>{L_NO_MODERATORS}</strong></td>
+ </tr>
+<!-- END mod -->
+ </tbody>
+ </table>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+</form>
+
+<!-- INCLUDE jumpbox.html -->
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html
new file mode 100644
index 0000000000..b95185a6f2
--- /dev/null
+++ b/phpBB/styles/prosilver/template/memberlist_search.html
@@ -0,0 +1,124 @@
+<!-- IF S_IN_SEARCH_POPUP -->
+<!-- You should retain this javascript in your own template! -->
+<script type="text/javascript">
+// <![CDATA[
+function insert_user(user)
+{
+ opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value = ( opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value.length && opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.type == "textarea" ) ? opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value + "\n" + user : user;
+}
+
+function insert_marked(users)
+{
+ if (typeof(users.length) == "undefined")
+ {
+ if (users.checked)
+ {
+ insert_user(users.value);
+ }
+ }
+ else if (users.length > 0)
+ {
+ for (i = 0; i < users.length; i++)
+ {
+ if (users[i].checked)
+ {
+ insert_user(users[i].value);
+ }
+ }
+ }
+
+ self.close();
+}
+
+function insert_single(user)
+{
+ opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value = user;
+ self.close();
+}
+// ]]>
+</script>
+<script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script>
+<!-- ENDIF -->
+
+<h2 class="solo">{L_FIND_USERNAME}</h2>
+
+<form method="post" action="{S_MODE_ACTION}" id="search_memberlist">
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_FIND_USERNAME_EXPLAIN}</p>
+
+ <fieldset class="fields1 column1">
+ <dl>
+ <dt><label for="username">{L_USERNAME}:</label></dt>
+ <dd><input type="text" name="username" id="username" value="{USERNAME}" class="inputbox" /></dd>
+ </dl>
+<!-- IF S_EMAIL_SEARCH_ALLOWED -->
+ <dl>
+ <dt><label for="email">{L_EMAIL}:</label></dt>
+ <dd><input type="text" name="email" id="email" value="{EMAIL}" class="inputbox" /></dd>
+ </dl>
+<!-- ENDIF -->
+ <dl>
+ <dt><label for="icq">{L_ICQ}:</label></dt>
+ <dd><input type="text" name="icq" id="icq" value="{ICQ}" class="inputbox" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="aim">{L_AIM}:</label></dt>
+ <dd><input type="text" name="aim" id="aim" value="{AIM}" class="inputbox" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="yahoo">{L_YIM}:</label></dt>
+ <dd><input type="text" name="yahoo" id="yahoo" value="{YAHOO}" class="inputbox" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="msn">{L_MSNM}:</label></dt>
+ <dd><input type="text" name="msn" id="msn" value="{MSNM}" class="inputbox" /></dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="fields1 column2">
+ <dl>
+ <dt><label for="joined">{L_JOINED}:</label></dt>
+ <dd><select name="joined_select">{S_JOINED_TIME_OPTIONS}</select> <input class="inputbox medium" type="text" name="joined" id="joined" value="{JOINED}" /></dd>
+ </dl>
+<!-- IF S_VIEWONLINE -->
+ <dl>
+ <dt><label for="active">{L_LAST_ACTIVE}:</label></dt>
+ <dd><select name="active_select">{S_ACTIVE_TIME_OPTIONS}</select> <input class="inputbox medium" type="text" name="active" id="active" value="{ACTIVE}" /></dd>
+ </dl>
+<!-- ENDIF -->
+ <dl>
+ <dt><label for="count">{L_POSTS}:</label></dt>
+ <dd><select name="count_select">{S_COUNT_OPTIONS}</select> <input class="inputbox medium" type="text" name="count" id="count" value="{COUNT}" /></dd>
+ </dl>
+<!-- IF S_IP_SEARCH_ALLOWED -->
+ <dl>
+ <dt><label for="ip">{L_POST_IP}:</label></dt>
+ <dd><input class="inputbox medium" type="text" name="ip" id="ip" value="{IP}" /></dd>
+ </dl>
+<!-- ENDIF -->
+ <dl>
+ <dt><label for="search_group_id">{L_GROUP}:</label></dt>
+ <dd><select name="search_group_id" id="search_group_id">{S_GROUP_SELECT}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="sk" class="label3">{L_SORT_BY}:</label></dt>
+ <dd><select name="sk" id="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select></dd>
+ </dl>
+ </fieldset>
+
+ <div class="clear"></div>
+
+ <hr />
+
+ <fieldset class="submit-buttons">
+ <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="submit" value="{L_SEARCH}" class="button1" />
+ {S_FORM_TOKEN}
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+</form>
diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html
new file mode 100644
index 0000000000..031bfec6ff
--- /dev/null
+++ b/phpBB/styles/prosilver/template/memberlist_view.html
@@ -0,0 +1,116 @@
+<!-- INCLUDE overall_header.html -->
+
+<h2>{PAGE_TITLE}</h2>
+
+<form method="post" action="{S_PROFILE_ACTION}" id="viewprofile">
+<div class="panel bg1<!-- IF S_ONLINE --> online<!-- ENDIF -->">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <!-- IF AVATAR_IMG -->
+ <dl class="left-box">
+ <dt>{AVATAR_IMG}</dt>
+ <!-- IF RANK_TITLE --><dd style="text-align: center;">{RANK_TITLE}</dd><!-- ENDIF -->
+ <!-- IF RANK_IMG --><dd style="text-align: center;">{RANK_IMG}</dd><!-- ENDIF -->
+ </dl>
+ <!-- ENDIF -->
+
+ <dl class="left-box details" style="width: 80%;">
+ <dt>{L_USERNAME}:</dt>
+ <dd>
+ <!-- IF USER_COLOR --><span style="color: {USER_COLOR}; font-weight: bold;"><!-- ELSE --><span><!-- ENDIF -->{USERNAME}</span>
+ <!-- IF U_USER_ADMIN --> [ <a href="{U_USER_ADMIN}">{L_USER_ADMIN}</a> ]<!-- ENDIF -->
+ <!-- IF U_USER_BAN --> [ <a href="{U_USER_BAN}">{L_USER_BAN}</a> ]<!-- ENDIF -->
+ <!-- IF U_SWITCH_PERMISSIONS --> [ <a href="{U_SWITCH_PERMISSIONS}">{L_USE_PERMISSIONS}</a> ]<!-- ENDIF -->
+ </dd>
+ <!-- IF not AVATAR_IMG -->
+ <!-- IF RANK_TITLE --><dt>{L_RANK}:</dt> <dd>{RANK_TITLE}</dd><!-- ENDIF -->
+ <!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE -->&nbsp;<!-- ELSE -->{L_RANK}:<!-- ENDIF --></dt> <dd>{RANK_IMG}</dd><!-- ENDIF -->
+ <!-- ENDIF -->
+ <!-- IF S_USER_INACTIVE --><dt>{L_USER_IS_INACTIVE}:</dt> <dd>{USER_INACTIVE_REASON}</dd><!-- ENDIF -->
+ <!-- IF LOCATION --><dt>{L_LOCATION}:</dt> <dd>{LOCATION}</dd><!-- ENDIF -->
+ <!-- IF AGE --><dt>{L_AGE}:</dt> <dd>{AGE}</dd><!-- ENDIF -->
+ <!-- IF OCCUPATION --><dt>{L_OCCUPATION}:</dt> <dd>{OCCUPATION}</dd><!-- ENDIF -->
+ <!-- IF INTERESTS --><dt>{L_INTERESTS}:</dt> <dd>{INTERESTS}</dd><!-- ENDIF -->
+ <!-- IF S_GROUP_OPTIONS --><dt>{L_USERGROUPS}:</dt> <dd><select name="g">{S_GROUP_OPTIONS}</select> <input type="submit" name="submit" value="{L_GO}" class="button2" /></dd><!-- ENDIF -->
+ <!-- BEGIN custom_fields --><dt>{custom_fields.PROFILE_FIELD_NAME}:</dt> <dd>{custom_fields.PROFILE_FIELD_VALUE}</dd><!-- END custom_fields -->
+ <!-- IF S_USER_LOGGED_IN and S_ZEBRA -->
+ <!-- IF U_REMOVE_FRIEND -->
+ <dt>&nbsp;</dt> <dd><a href="{U_REMOVE_FRIEND}"><strong>{L_REMOVE_FRIEND}</strong></a></dd>
+ <!-- ELSEIF U_REMOVE_FOE -->
+ <dt>&nbsp;</dt> <dd><a href="{U_REMOVE_FOE}"><strong>{L_REMOVE_FOE}</strong></a></dd>
+ <!-- ELSE -->
+ <!-- IF U_ADD_FRIEND -->
+ <dt>&nbsp;</dt> <dd><a href="{U_ADD_FRIEND}"><strong>{L_ADD_FRIEND}</strong></a></dd>
+ <!-- ENDIF -->
+ <!-- IF U_ADD_FOE -->
+ <dt>&nbsp;</dt> <dd><a href="{U_ADD_FOE}"><strong>{L_ADD_FOE}</strong></a></dd>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+ </dl>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="panel bg2">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="column1">
+
+ <h3>{L_CONTACT_USER} {USERNAME}</h3>
+
+ <dl class="details">
+ <!-- IF U_EMAIL --><dt>{L_EMAIL_ADDRESS}:</dt> <dd><a href="{U_EMAIL}">{L_SEND_EMAIL_USER} {USERNAME}</a></dd><!-- ENDIF -->
+ <!-- IF U_WWW --><dt>{L_WEBSITE}:</dt> <dd><a href="{U_WWW}" title="{L_VISIT_WEBSITE}: {U_WWW}">{U_WWW}</a></dd><!-- ENDIF -->
+ <!-- IF U_PM --><dt>{L_PM}:</dt> <dd><a href="{U_PM}">{L_SEND_PRIVATE_MESSAGE}</a></dd><!-- ENDIF -->
+ <!-- IF U_MSN or USER_MSN --><dt>{L_MSNM}:</dt> <dd><!-- IF U_MSN --><a href="{U_MSN}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_MSNM_MESSAGE}</a><!-- ELSE -->{USER_MSN}<!-- ENDIF --></dd><!-- ENDIF -->
+ <!-- IF U_YIM or USER_YIM --><dt>{L_YIM}:</dt> <dd><!-- IF U_YIM --><a href="{U_YIM}" onclick="popup(this.href, 780, 550); return false;">{L_SEND_YIM_MESSAGE}</a><!-- ELSE -->{USER_YIM}<!-- ENDIF --></dd><!-- ENDIF -->
+ <!-- IF U_AIM or USER_AIM --><dt>{L_AIM}:</dt> <dd><!-- IF U_AIM --><a href="{U_AIM}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_AIM_MESSAGE}</a><!-- ELSE -->{USER_AIM}<!-- ENDIF --></dd><!-- ENDIF -->
+ <!-- IF U_ICQ or USER_ICQ --><dt>{L_ICQ}:</dt> <dd><!-- IF U_ICQ --><a href="{U_ICQ}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_ICQ_MESSAGE}</a><!-- ELSE -->{USER_ICQ}<!-- ENDIF --></dd><!-- ENDIF -->
+ <!-- IF U_JABBER and S_JABBER_ENABLED --><dt>{L_JABBER}:</dt> <dd><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_JABBER_MESSAGE}</a></dd><!-- ELSEIF USER_JABBER --><dt>{L_JABBER}:</dt> <dd>{USER_JABBER}</dd><!-- ENDIF -->
+ <!-- IF S_PROFILE_FIELD1 -->
+ <!-- NOTE: Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
+ <dt>{postrow.PROFILE_FIELD1_NAME}:</dt> <dd>{postrow.PROFILE_FIELD1_VALUE}</dd>
+ <!-- ENDIF -->
+ </dl>
+ </div>
+
+ <div class="column2">
+ <h3>{L_USER_FORUM}</h3>
+ <dl class="details">
+ <dt>{L_JOINED}:</dt> <dd>{JOINED}</dd>
+ <dt>{L_VISITED}:</dt> <dd>{VISITED}</dd>
+ <!-- IF S_WARNINGS -->
+ <dt>{L_WARNINGS}: </dt>
+ <dd><strong>{WARNINGS}</strong><!-- IF U_NOTES or U_WARN --> [ <!-- IF U_NOTES --><a href="{U_NOTES}">{L_VIEW_NOTES}</a><!-- ENDIF --> <!-- IF U_WARN --><!-- IF U_NOTES --> | <!-- ENDIF --><a href="{U_WARN}">{L_WARN_USER}</a><!-- ENDIF --> ]<!-- ENDIF --></dd>
+ <!-- ENDIF -->
+ <dt>{L_TOTAL_POSTS}:</dt>
+ <dd>{POSTS} <!-- IF S_DISPLAY_SEARCH -->| <strong><a href="{U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a></strong><!-- ENDIF -->
+ <!-- IF POSTS_PCT --><br />({POSTS_PCT} / {POSTS_DAY})<!-- ENDIF -->
+ <!-- IF POSTS_IN_QUEUE and U_MCP_QUEUE --><br />(<a href="{U_MCP_QUEUE}">{L_POSTS_IN_QUEUE}</a>)<!-- ELSEIF POSTS_IN_QUEUE --><br />({L_POSTS_IN_QUEUE})<!-- ENDIF -->
+ </dd>
+ <!-- IF S_SHOW_ACTIVITY and POSTS -->
+ <dt>{L_ACTIVE_IN_FORUM}:</dt> <dd><!-- IF ACTIVE_FORUM --><strong><a href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></strong><br />({ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT})<!-- ELSE --> - <!-- ENDIF --></dd>
+ <dt>{L_ACTIVE_IN_TOPIC}:</dt> <dd><!-- IF ACTIVE_TOPIC --><strong><a href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></strong><br />({ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT})<!-- ELSE --> - <!-- ENDIF --></dd>
+ <!-- ENDIF -->
+ </dl>
+ </div>
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- IF SIGNATURE -->
+<div class="panel bg1">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_SIGNATURE}</h3>
+
+ <div class="postbody"><div class="signature" style="border-top:none; margin-top: 0;">{SIGNATURE}</div></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+<!-- ENDIF -->
+
+</form>
+
+<!-- INCLUDE jumpbox.html -->
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/message_body.html b/phpBB/styles/prosilver/template/message_body.html
new file mode 100644
index 0000000000..896f0b826e
--- /dev/null
+++ b/phpBB/styles/prosilver/template/message_body.html
@@ -0,0 +1,11 @@
+<!-- INCLUDE overall_header.html -->
+
+<div class="panel" id="message">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <h2>{MESSAGE_TITLE}</h2>
+ <p>{MESSAGE_TEXT}</p>
+ <!-- IF SCRIPT_NAME == "search" and not S_BOARD_DISABLED and not S_NO_SEARCH and L_RETURN_TO_SEARCH_ADV --><p><a href="{U_SEARCH}" class="{S_CONTENT_FLOW_BEGIN}">{L_RETURN_TO_SEARCH_ADV}</a></p><!-- ENDIF -->
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
new file mode 100644
index 0000000000..4da1308e14
--- /dev/null
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -0,0 +1,48 @@
+ </div>
+
+<div id="page-footer">
+
+ <div class="navbar">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <ul class="linklist">
+ <li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a></li>
+ <!-- IF not S_IS_BOT -->
+ <!-- IF S_WATCH_FORUM_LINK --><li <!-- IF S_WATCHING_FORUM -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a href="{S_WATCH_FORUM_LINK}" title="{S_WATCH_FORUM_TITLE}">{S_WATCH_FORUM_TITLE}</a></li><!-- ENDIF -->
+ <!-- IF U_WATCH_TOPIC --><li <!-- IF S_WATCHING_TOPIC -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a href="{U_WATCH_TOPIC}" title="{L_WATCH_TOPIC}">{L_WATCH_TOPIC}</a></li><!-- ENDIF -->
+ <!-- IF U_BOOKMARK_TOPIC --><li class="icon-bookmark"><a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}">{L_BOOKMARK_TOPIC}</a></li><!-- ENDIF -->
+ <!-- IF U_BUMP_TOPIC --><li class="icon-bump"><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}">{L_BUMP_TOPIC}</a></li><!-- ENDIF -->
+ <!-- ENDIF -->
+ <li class="rightside"><!-- IF U_TEAM --><a href="{U_TEAM}">{L_THE_TEAM}</a> &bull; <!-- ENDIF --><!-- IF not S_IS_BOT --><a href="{U_DELETE_COOKIES}">{L_DELETE_COOKIES}</a> &bull; <!-- ENDIF -->{S_TIMEZONE}</li>
+ </ul>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+<!--
+ We request you retain the full copyright notice below including the link to www.phpbb.com.
+ This not only gives respect to the large amount of time given freely by the developers
+ but also helps build interest, traffic and use of phpBB3. If you (honestly) cannot retain
+ the full copyright we ask you at least leave in place the "Powered by phpBB" line, with
+ "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our
+ forums may be affected.
+
+ The phpBB Group : 2006
+//-->
+
+ <div class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a> &copy; 2000, 2002, 2005, 2007 phpBB Group
+ <!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
+ <!-- IF DEBUG_OUTPUT --><br />{DEBUG_OUTPUT}<!-- ENDIF -->
+ <!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- ENDIF -->
+ </div>
+</div>
+
+</div>
+
+<div>
+ <a id="bottom" name="bottom" accesskey="z"></a>
+ <!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF -->
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html
new file mode 100644
index 0000000000..7c8903b474
--- /dev/null
+++ b/phpBB/styles/prosilver/template/overall_header.html
@@ -0,0 +1,184 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="content-language" content="{S_USER_LANG}" />
+<meta http-equiv="imagetoolbar" content="no" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
+<meta name="keywords" content="" />
+<meta name="description" content="" />
+<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
+{META}
+<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
+
+<!-- IF S_ENABLE_FEEDS -->
+ <link rel="alternate" type="application/atom+xml" title="{L_FEED} - {SITENAME}" href="{U_FEED}" />
+ <!-- IF S_ENABLE_FEEDS_NEWS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_NEWS}" href="{U_FEED}?mode=news" /><!-- ENDIF -->
+ <!-- IF S_ENABLE_FEEDS_FORUMS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_ALL_FORUMS}" href="{U_FEED}?mode=forums" /><!-- ENDIF -->
+ <!-- IF S_ENABLE_FEEDS_TOPICS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_ALL_TOPICS}" href="{U_FEED}?mode=topics" /><!-- ENDIF -->
+ <!-- IF S_ENABLE_FEEDS_FORUM and S_FORUM_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FORUM} - {FORUM_NAME}" href="{U_FEED}?f={S_FORUM_ID}" /><!-- ENDIF -->
+ <!-- IF S_ENABLE_FEEDS_TOPIC and S_TOPIC_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_TOPIC} - {TOPIC_TITLE}" href="{U_FEED}?f={S_FORUM_ID}&amp;t={S_TOPIC_ID}" /><!-- ENDIF -->
+<!-- ENDIF -->
+
+<!--
+ phpBB style name: prosilver
+ Based on style: prosilver (this is the default phpBB3 style)
+ Original author: Tom Beddard ( http://www.subBlue.com/ )
+ Modified by:
+
+ NOTE: This page was generated by phpBB, the free open-source bulletin board package.
+ The phpBB Group is not responsible for the content of this page and forum. For more information
+ about phpBB please visit http://www.phpbb.com
+-->
+
+<script type="text/javascript">
+// <![CDATA[
+ var jump_page = '{LA_JUMP_PAGE}:';
+ var on_page = '{ON_PAGE}';
+ var per_page = '{PER_PAGE}';
+ var base_url = '{A_BASE_URL}';
+ var style_cookie = 'phpBBstyle';
+ var style_cookie_settings = '{A_COOKIE_SETTINGS}';
+ var onload_functions = new Array();
+ var onunload_functions = new Array();
+
+ <!-- IF S_USER_PM_POPUP -->
+ if ({S_NEW_PM})
+ {
+ var url = '{UA_POPUP_PM}';
+ window.open(url.replace(/&amp;/g, '&'), '_phpbbprivmsg', 'height=225,resizable=yes,scrollbars=yes, width=400');
+ }
+ <!-- ENDIF -->
+
+ /**
+ * Find a member
+ */
+ function find_username(url)
+ {
+ popup(url, 760, 570, '_usersearch');
+ return false;
+ }
+
+ /**
+ * New function for handling multiple calls to window.onload and window.unload by pentapenguin
+ */
+ window.onload = function()
+ {
+ for (var i = 0; i < onload_functions.length; i++)
+ {
+ eval(onload_functions[i]);
+ }
+ }
+
+ window.onunload = function()
+ {
+ for (var i = 0; i < onunload_functions.length; i++)
+ {
+ eval(onunload_functions[i]);
+ }
+ }
+
+// ]]>
+</script>
+<script type="text/javascript" src="{T_TEMPLATE_PATH}/styleswitcher.js"></script>
+<script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script>
+
+<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
+<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
+
+<link href="{T_THEME_PATH}/normal.css" rel="stylesheet" type="text/css" title="A" />
+<link href="{T_THEME_PATH}/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
+<link href="{T_THEME_PATH}/large.css" rel="alternate stylesheet" type="text/css" title="A++" />
+
+<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
+ <link href="{T_THEME_PATH}/bidi.css" rel="stylesheet" type="text/css" media="screen, projection" />
+<!-- ENDIF -->
+
+</head>
+
+<body id="phpbb" class="section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}">
+
+<div id="wrap">
+ <a id="top" name="top" accesskey="t"></a>
+ <div id="page-header">
+ <div class="headerbar">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div id="site-description">
+ <a href="{U_INDEX}" title="{L_INDEX}" id="logo">{SITE_LOGO_IMG}</a>
+ <h1>{SITENAME}</h1>
+ <p>{SITE_DESCRIPTION}</p>
+ <p class="skiplink"><a href="#start_here">{L_SKIP}</a></p>
+ </div>
+
+ <!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
+ <div id="search-box">
+ <form action="{U_SEARCH}" method="post" id="search">
+ <fieldset>
+ <input name="keywords" id="keywords" type="text" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" />
+ <input class="button2" value="{L_SEARCH}" type="submit" /><br />
+ <a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a> {S_SEARCH_HIDDEN_FIELDS}
+ </fieldset>
+ </form>
+ </div>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <div class="navbar">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <ul class="linklist navlinks">
+ <li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a> <!-- BEGIN navlinks --> <strong>&#8249;</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></li>
+
+ <li class="rightside"><a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="{L_CHANGE_FONT_SIZE}">{L_CHANGE_FONT_SIZE}</a></li>
+
+ <!-- IF U_EMAIL_TOPIC --><li class="rightside"><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}" class="sendemail">{L_EMAIL_TOPIC}</a></li><!-- ENDIF -->
+ <!-- IF U_EMAIL_PM --><li class="rightside"><a href="{U_EMAIL_PM}" title="{L_EMAIL_PM}" class="sendemail">{L_EMAIL_PM}</a></li><!-- ENDIF -->
+ <!-- IF U_PRINT_TOPIC --><li class="rightside"><a href="{U_PRINT_TOPIC}" title="{L_PRINT_TOPIC}" accesskey="p" class="print">{L_PRINT_TOPIC}</a></li><!-- ENDIF -->
+ <!-- IF U_PRINT_PM --><li class="rightside"><a href="{U_PRINT_PM}" title="{L_PRINT_PM}" accesskey="p" class="print">{L_PRINT_PM}</a></li><!-- ENDIF -->
+ </ul>
+
+ <!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
+ <ul class="linklist leftside">
+ <li class="icon-ucp">
+ <a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="e">{L_PROFILE}</a>
+ <!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF -->
+ <!-- IF S_DISPLAY_SEARCH --> &bull;
+ <a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a>
+ <!-- ENDIF -->
+ <!-- IF U_RESTORE_PERMISSIONS --> &bull;
+ <a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a>
+ <!-- ENDIF -->
+ </li>
+ </ul>
+ <!-- ENDIF -->
+
+ <ul class="linklist rightside">
+ <li class="icon-faq"><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></li>
+ <!-- IF not S_IS_BOT -->
+ <!-- IF S_DISPLAY_MEMBERLIST --><li class="icon-members"><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST_EXPLAIN}">{L_MEMBERLIST}</a></li><!-- ENDIF -->
+ <!-- IF not S_USER_LOGGED_IN and S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) --><li class="icon-register"><a href="{U_REGISTER}">{L_REGISTER}</a></li><!-- ENDIF -->
+ <li class="icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x">{L_LOGIN_LOGOUT}</a></li>
+ <!-- ENDIF -->
+ </ul>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ </div>
+
+ <a name="start_here"></a>
+ <div id="page-body">
+ <!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN and (U_MCP or U_ACP) -->
+ <div id="information" class="rules">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <strong>{L_INFORMATION}:</strong> {L_BOARD_DISABLED}
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/posting_attach_body.html b/phpBB/styles/prosilver/template/posting_attach_body.html
new file mode 100644
index 0000000000..d39405487d
--- /dev/null
+++ b/phpBB/styles/prosilver/template/posting_attach_body.html
@@ -0,0 +1,21 @@
+<div class="panel bg3" id="attach-panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_ADD_ATTACHMENT_EXPLAIN}</p>
+
+ <fieldset class="fields2">
+ <dl>
+ <dt><label for="fileupload">{L_FILENAME}:</label></dt>
+ <dd>
+ <input type="file" name="fileupload" id="fileupload" maxlength="{FILESIZE}" value="" class="inputbox autowidth" />
+ <input type="submit" name="add_file" value="{L_ADD_FILE}" class="button2" onclick="upload = true;" />
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="filecomment">{L_FILE_COMMENT}:</label></dt>
+ <dd><textarea name="filecomment" id="filecomment" rows="1" cols="40" class="inputbox autowidth">{FILE_COMMENT}</textarea></dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
diff --git a/phpBB/styles/prosilver/template/posting_body.html b/phpBB/styles/prosilver/template/posting_body.html
new file mode 100644
index 0000000000..73b82700c5
--- /dev/null
+++ b/phpBB/styles/prosilver/template/posting_body.html
@@ -0,0 +1,6 @@
+
+<!-- IF S_PRIVMSGS -->
+ <!-- INCLUDE posting_pm_layout.html -->
+<!-- ELSE -->
+ <!-- INCLUDE posting_layout.html -->
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html
new file mode 100644
index 0000000000..4d866681f0
--- /dev/null
+++ b/phpBB/styles/prosilver/template/posting_buttons.html
@@ -0,0 +1,108 @@
+
+<script type="text/javascript">
+// <![CDATA[
+ var form_name = 'postform';
+ var text_name = <!-- IF $SIG_EDIT -->'signature'<!-- ELSE -->'message'<!-- ENDIF -->;
+ var load_draft = false;
+ var upload = false;
+
+ // Define the bbCode tags
+ var bbcode = new Array();
+ var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
+ var imageTag = false;
+
+ // Helpline messages
+ var help_line = {
+ b: '{LA_BBCODE_B_HELP}',
+ i: '{LA_BBCODE_I_HELP}',
+ u: '{LA_BBCODE_U_HELP}',
+ q: '{LA_BBCODE_Q_HELP}',
+ c: '{LA_BBCODE_C_HELP}',
+ l: '{LA_BBCODE_L_HELP}',
+ o: '{LA_BBCODE_O_HELP}',
+ p: '{LA_BBCODE_P_HELP}',
+ w: '{LA_BBCODE_W_HELP}',
+ a: '{LA_BBCODE_A_HELP}',
+ s: '{LA_BBCODE_S_HELP}',
+ f: '{LA_BBCODE_F_HELP}',
+ e: '{LA_BBCODE_E_HELP}',
+ d: '{LA_BBCODE_D_HELP}'
+ <!-- BEGIN custom_tags -->
+ ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}'
+ <!-- END custom_tags -->
+ }
+
+ var panels = new Array('options-panel', 'attach-panel', 'poll-panel');
+ var show_panel = 'options-panel';
+
+
+// ]]>
+</script>
+<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
+
+<!-- IF S_BBCODE_ALLOWED -->
+<div id="colour_palette" style="display: none;">
+ <dl style="clear: left;">
+ <dt><label>{L_FONT_COLOR}:</label></dt>
+ <dd>
+ <script type="text/javascript">
+ // <![CDATA[
+ function change_palette()
+ {
+ dE('colour_palette');
+ e = document.getElementById('colour_palette');
+
+ if (e.style.display == 'block')
+ {
+ document.getElementById('bbpalette').value = '{LA_FONT_COLOR_HIDE}';
+ }
+ else
+ {
+ document.getElementById('bbpalette').value = '{LA_FONT_COLOR}';
+ }
+ }
+
+ colorPalette('h', 15, 10);
+ // ]]>
+ </script>
+ </dd>
+ </dl>
+</div>
+
+<div id="format-buttons">
+ <input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" />
+ <input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" title="{L_BBCODE_I_HELP}" />
+ <input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" title="{L_BBCODE_U_HELP}" />
+ <!-- IF S_BBCODE_QUOTE -->
+ <input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" title="{L_BBCODE_Q_HELP}" />
+ <!-- ENDIF -->
+ <input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" title="{L_BBCODE_C_HELP}" />
+ <input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" title="{L_BBCODE_L_HELP}" />
+ <input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" title="{L_BBCODE_O_HELP}" />
+ <input type="button" class="button2" accesskey="t" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" title="{L_BBCODE_LISTITEM_HELP}" />
+ <!-- IF S_BBCODE_IMG -->
+ <input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" title="{L_BBCODE_P_HELP}" />
+ <!-- ENDIF -->
+ <!-- IF S_LINKS_ALLOWED -->
+ <input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" title="{L_BBCODE_W_HELP}" />
+ <!-- ENDIF -->
+ <!-- IF S_BBCODE_FLASH -->
+ <input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" title="{L_BBCODE_D_HELP}" />
+ <!-- ENDIF -->
+ <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}">
+ <option value="50">{L_FONT_TINY}</option>
+ <option value="85">{L_FONT_SMALL}</option>
+ <option value="100" selected="selected">{L_FONT_NORMAL}</option>
+ <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 150 -->
+ <option value="150">{L_FONT_LARGE}</option>
+ <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 200 -->
+ <option value="200">{L_FONT_HUGE}</option>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+ </select>
+ <input type="button" class="button2" name="bbpalette" id="bbpalette" value="{L_FONT_COLOR}" onclick="change_palette();" title="{L_BBCODE_S_HELP}" />
+ <!-- BEGIN custom_tags -->
+ <input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" />
+ <!-- END custom_tags -->
+</div>
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html
new file mode 100644
index 0000000000..9476242d11
--- /dev/null
+++ b/phpBB/styles/prosilver/template/posting_editor.html
@@ -0,0 +1,266 @@
+<script type="text/javascript">
+// <![CDATA[
+ onload_functions.push('apply_onkeypress_event()');
+// ]]>
+</script>
+
+<fieldset class="fields1">
+ <!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
+
+ <!-- IF S_PRIVMSGS and not S_SHOW_DRAFTS -->
+
+ <div class="column1">
+ <!-- IF S_ALLOW_MASS_PM -->
+ <!-- IF .to_recipient -->
+ <dl>
+ <dt><label>{L_TO}:</label></dt>
+ <dd>
+ <!-- BEGIN to_recipient -->
+ <!-- IF not to_recipient.S_FIRST_ROW and to_recipient.S_ROW_COUNT mod 2 eq 0 --></dd><dd><!-- ENDIF -->
+ <!-- IF to_recipient.IS_GROUP --><a href="{to_recipient.U_VIEW}"><strong>{to_recipient.NAME}</strong></a>&nbsp;<!-- ELSE -->{to_recipient.NAME_FULL}&nbsp;<!-- ENDIF -->
+ <!-- IF not S_EDIT_POST --><input type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="x" class="button2" />&nbsp;<!-- ENDIF -->
+ <!-- END to_recipient -->
+ </dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF .bcc_recipient -->
+ <dl>
+ <dt><label>{L_BCC}:</label></dt>
+ <dd>
+ <!-- BEGIN bcc_recipient -->
+ <!-- IF not bcc_recipient.S_FIRST_ROW and bcc_recipient.S_ROW_COUNT mod 2 eq 0 --></dd><dd><!-- ENDIF -->
+ <!-- IF bcc_recipient.IS_GROUP --><a href="{bcc_recipient.U_VIEW}"><strong>{bcc_recipient.NAME}</strong></a><!-- ELSE -->{bcc_recipient.NAME_FULL}&nbsp;<!-- ENDIF -->
+ <!-- IF not S_EDIT_POST --><input type="submit" name="remove_{bcc_recipient.TYPE}[{bcc_recipient.UG_ID}]" value="x" class="button2" />&nbsp;<!-- ENDIF -->
+ <!-- END bcc_recipient -->
+ </dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF not S_EDIT_POST -->
+ <dl class="pmlist">
+ <dt><textarea id="username_list" name="username_list" class="inputbox" cols="50" rows="2"></textarea></dt>
+ <dd><span><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></span></dd>
+ <dd><input type="submit" name="add_to" value="{L_ADD}" class="button2" /></dd>
+ <dd><input type="submit" name="add_bcc" value="{L_ADD_BCC}" class="button2" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- ELSE -->
+ <dl>
+ <dt><label for="username_list">{L_TO}:</label><!-- IF not S_EDIT_POST --><br /><span><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false">{L_FIND_USERNAME}</a></span><!-- ENDIF --></dt>
+ <!-- IF .to_recipient -->
+ <dd>
+ <!-- BEGIN to_recipient -->
+ <!-- IF not to_recipient.S_FIRST_ROW and to_recipient.S_ROW_COUNT mod 2 eq 0 --></dd><dd><!-- ENDIF -->
+ <!-- IF to_recipient.IS_GROUP --><a href="{to_recipient.U_VIEW}"><strong>{to_recipient.NAME}</strong></a><!-- ELSE -->{to_recipient.NAME_FULL}&nbsp;<!-- ENDIF -->
+ <!-- IF not S_EDIT_POST --><input type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="x" class="button2" />&nbsp;<!-- ENDIF -->
+ <!-- END to_recipient -->
+ </dd>
+ <!-- ENDIF -->
+
+ <!-- IF not S_EDIT_POST -->
+ <dd><input class="inputbox" type="text" name="username_list" id="username_list" size="20" value="" /> <input type="submit" name="add_to" value="{L_ADD}" class="button2" /></dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- ENDIF -->
+
+ </div>
+
+ <!-- IF S_GROUP_OPTIONS -->
+ <div class="column2">
+ <dl>
+ <dd><label for="group_list">{L_USERGROUPS}:</label> <select name="group_list[]" id="group_list" multiple="multiple" size="4" class="inputbox">{S_GROUP_OPTIONS}</select></dd>
+ </dl>
+ </div>
+ <!-- ENDIF -->
+
+ <div class="clear"></div>
+
+ <!-- ENDIF -->
+
+ <!-- IF S_DELETE_ALLOWED -->
+ <dl>
+ <dt><label for="delete">{L_DELETE_POST}:</label></dt>
+ <dd><label for="delete"><input type="checkbox" name="delete" id="delete" /> {L_DELETE_POST_WARN}</label></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF S_SHOW_TOPIC_ICONS or S_SHOW_PM_ICONS -->
+ <dl>
+ <dt><label for="icon">{L_ICON}:</label></dt>
+ <dd>
+ <label for="icon"><input type="radio" name="icon" id="icon" value="0" checked="checked" /> <!-- IF S_SHOW_TOPIC_ICONS -->{L_NO_TOPIC_ICON}<!-- ELSE -->{L_NO_PM_ICON}<!-- ENDIF --></label>
+ <!-- BEGIN topic_icon --><label for="icon-{topic_icon.ICON_ID}"><input type="radio" name="icon" id="icon-{topic_icon.ICON_ID}" value="{topic_icon.ICON_ID}" {topic_icon.S_ICON_CHECKED} /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" /></label> <!-- END topic_icon -->
+ </dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF not S_PRIVMSGS and S_DISPLAY_USERNAME -->
+ <dl style="clear: left;">
+ <dt><label for="username">{L_USERNAME}:</label></dt>
+ <dd><input type="text" tabindex="1" name="username" id="username" size="25" value="{USERNAME}" class="inputbox autowidth" /></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF S_POST_ACTION or S_PRIVMSGS or S_EDIT_DRAFT -->
+ <dl style="clear: left;">
+ <dt><label for="subject">{L_SUBJECT}:</label></dt>
+ <dd><input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /></dd>
+ </dl>
+ <!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
+ <!-- DEFINE $CAPTCHA_TAB_INDEX = 3 -->
+ <!-- INCLUDE {CAPTCHA_TEMPLATE} -->
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+
+ <!-- INCLUDE posting_buttons.html -->
+
+ <div id="smiley-box">
+ <!-- IF S_SMILIES_ALLOWED and .smiley -->
+ <strong>{L_SMILIES}</strong><br />
+ <!-- BEGIN smiley -->
+ <a href="#" onclick="insert_text('{smiley.A_SMILEY_CODE}', true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" /></a>
+ <!-- END smiley -->
+ <!-- ENDIF -->
+ <!-- IF S_SHOW_SMILEY_LINK and S_SMILIES_ALLOWED-->
+ <br /><a href="{U_MORE_SMILIES}" onclick="popup(this.href, 300, 350, '_phpbbsmilies'); return false;">{L_MORE_SMILIES}</a>
+ <!-- ENDIF -->
+
+ <!-- IF BBCODE_STATUS -->
+ <!-- IF .smiley --><hr /><!-- ENDIF -->
+ {BBCODE_STATUS}<br />
+ <!-- IF S_BBCODE_ALLOWED -->
+ {IMG_STATUS}<br />
+ {FLASH_STATUS}<br />
+ {URL_STATUS}<br />
+ <!-- ENDIF -->
+ {SMILIES_STATUS}
+ <!-- ENDIF -->
+ <!-- IF S_EDIT_DRAFT || S_DISPLAY_REVIEW -->
+ <!-- IF S_DISPLAY_REVIEW --><hr /><!-- ENDIF -->
+ <!-- IF S_EDIT_DRAFT --><strong><a href="{S_UCP_ACTION}">{L_BACK_TO_DRAFTS}</a></strong><!-- ENDIF -->
+ <!-- IF S_DISPLAY_REVIEW --><strong><a href="#review">{L_TOPIC_REVIEW}</a></strong><!-- ENDIF -->
+ <!-- ENDIF -->
+ </div>
+
+ <div id="message-box">
+ <textarea <!-- IF S_UCP_ACTION and not S_PRIVMSGS and not S_EDIT_DRAFT -->name="signature" id="signature" style="height: 9em;"<!-- ELSE -->name="message" id="message"<!-- ENDIF --> rows="15" cols="76" tabindex="4" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" class="inputbox">{MESSAGE}{DRAFT_MESSAGE}{SIGNATURE}</textarea>
+ </div>
+</fieldset>
+
+<!-- IF $EXTRA_POSTING_OPTIONS eq 1 -->
+
+ <!-- IF not S_SHOW_DRAFTS -->
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF S_HAS_ATTACHMENTS -->
+ <div class="panel bg2">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <h3>{L_POSTED_ATTACHMENTS}</h3>
+
+ <fieldset class="fields2">
+
+ <!-- BEGIN attach_row -->
+ <dl>
+
+ <dt><label for="comment_list_{attach_row.ASSOC_INDEX}">{L_FILE_COMMENT}:</label></dt>
+ <dd><textarea name="comment_list[{attach_row.ASSOC_INDEX}]" id="comment_list_{attach_row.ASSOC_INDEX}" rows="1" cols="35" class="inputbox">{attach_row.FILE_COMMENT}</textarea></dd>
+ <dd><a href="{attach_row.U_VIEW_ATTACHMENT}" class="{S_CONTENT_FLOW_END}">{attach_row.FILENAME}</a></dd>
+ <dd style="margin-top: 5px;">
+ <!-- IF S_INLINE_ATTACHMENT_OPTIONS --><input type="button" value="{L_PLACE_INLINE}" onclick="attach_inline({attach_row.ASSOC_INDEX}, '{attach_row.A_FILENAME}');" class="button2" />&nbsp; <!-- ENDIF -->
+ <input type="submit" name="delete_file[{attach_row.ASSOC_INDEX}]" value="{L_DELETE_FILE}" class="button2" />
+ </dd>
+ </dl>
+ {attach_row.S_HIDDEN}
+ <!-- IF not attach_row.S_LAST_ROW --><hr class="dashed" /><!-- ENDIF -->
+ <!-- END attach_row -->
+
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF not S_SHOW_DRAFTS and not $SIG_EDIT eq 1 -->
+ <div class="panel bg2">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <fieldset class="submit-buttons">
+ {S_HIDDEN_ADDRESS_FIELD}
+ {S_HIDDEN_FIELDS}
+ <!-- IF S_HAS_DRAFTS --><input type="submit" accesskey="d" tabindex="8" name="load" value="{L_LOAD}" class="button2" onclick="load_draft = true;" />&nbsp; <!-- ENDIF -->
+ <!-- IF S_SAVE_ALLOWED --><input type="submit" accesskey="k" tabindex="7" name="save" value="{L_SAVE}" class="button2" />&nbsp; <!-- ENDIF -->
+ <input type="submit" tabindex="5" name="preview" value="{L_PREVIEW}" class="button1"<!-- IF not S_PRIVMSGS --> onclick="document.getElementById('postform').action += '#preview';"<!-- ENDIF --> />&nbsp;
+ <input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1 default-submit-action" />&nbsp;
+
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF not S_PRIVMSGS and not S_SHOW_DRAFTS and not $SIG_EDIT eq 1 -->
+ <div id="tabs">
+ <ul>
+ <li id="options-panel-tab" class="activetab"><a href="#tabs" onclick="subPanels('options-panel'); return false;"><span>{L_OPTIONS}</span></a></li>
+ <!-- IF S_SHOW_ATTACH_BOX --><li id="attach-panel-tab"><a href="#tabs" onclick="subPanels('attach-panel'); return false;"><span>{L_ADD_ATTACHMENT}</span></a></li><!-- ENDIF -->
+ <!-- IF S_SHOW_POLL_BOX || S_POLL_DELETE --><li id="poll-panel-tab"><a href="#tabs" onclick="subPanels('poll-panel'); return false;"><span>{L_ADD_POLL}</span></a></li><!-- ENDIF -->
+ </ul>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF not S_SHOW_DRAFTS and not $SIG_EDIT eq 1 -->
+ <div class="panel bg3" id="options-panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <fieldset class="fields1">
+ <!-- IF S_BBCODE_ALLOWED -->
+ <div><label for="disable_bbcode"><input type="checkbox" name="disable_bbcode" id="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE}</label></div>
+ <!-- ENDIF -->
+ <!-- IF S_SMILIES_ALLOWED -->
+ <div><label for="disable_smilies"><input type="checkbox" name="disable_smilies" id="disable_smilies"{S_SMILIES_CHECKED} /> {L_DISABLE_SMILIES}</label></div>
+ <!-- ENDIF -->
+ <!-- IF S_LINKS_ALLOWED -->
+ <div><label for="disable_magic_url"><input type="checkbox" name="disable_magic_url" id="disable_magic_url"{S_MAGIC_URL_CHECKED} /> {L_DISABLE_MAGIC_URL}</label></div>
+ <!-- ENDIF -->
+ <!-- IF S_SIG_ALLOWED -->
+ <div><label for="attach_sig"><input type="checkbox" name="attach_sig" id="attach_sig"{S_SIGNATURE_CHECKED} /> {L_ATTACH_SIG}</label></div>
+ <!-- ENDIF -->
+ <!-- IF S_NOTIFY_ALLOWED -->
+ <div><label for="notify"><input type="checkbox" name="notify" id="notify"{S_NOTIFY_CHECKED} /> {L_NOTIFY_REPLY}</label></div>
+ <!-- ENDIF -->
+ <!-- IF S_LOCK_TOPIC_ALLOWED -->
+ <div><label for="lock_topic"><input type="checkbox" name="lock_topic" id="lock_topic"{S_LOCK_TOPIC_CHECKED} /> {L_LOCK_TOPIC}</label></div>
+ <!-- ENDIF -->
+ <!-- IF S_LOCK_POST_ALLOWED -->
+ <div><label for="lock_post"><input type="checkbox" name="lock_post" id="lock_post"{S_LOCK_POST_CHECKED} /> {L_LOCK_POST} [{L_LOCK_POST_EXPLAIN}]</label></div>
+ <!-- ENDIF -->
+
+ <!-- IF S_TYPE_TOGGLE or S_TOPIC_TYPE_ANNOUNCE or S_TOPIC_TYPE_STICKY -->
+ <hr class="dashed" />
+ <!-- ENDIF -->
+
+ <!-- IF S_TYPE_TOGGLE -->
+ <dl>
+ <dt><label for="topic_type-0"><!-- IF S_EDIT_POST -->{L_CHANGE_TOPIC_TO}<!-- ELSE -->{L_POST_TOPIC_AS}<!-- ENDIF -->:</label></dt>
+ <dd><!-- BEGIN topic_type --><label for="topic_type-{topic_type.VALUE}"><input type="radio" name="topic_type" id="topic_type-{topic_type.VALUE}" value="{topic_type.VALUE}"{topic_type.S_CHECKED} />{topic_type.L_TOPIC_TYPE}</label> <!-- END topic_type --></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF S_TOPIC_TYPE_ANNOUNCE or S_TOPIC_TYPE_STICKY -->
+ <dl>
+ <dt><label for="topic_time_limit">{L_STICK_TOPIC_FOR}:</label></dt>
+ <dd><label for="topic_time_limit"><input type="text" name="topic_time_limit" id="topic_time_limit" size="3" maxlength="3" value="{TOPIC_TIME_LIMIT}" class="inputbox autowidth" /> {L_DAYS}</label></dd>
+ <dd>{L_STICK_TOPIC_FOR_EXPLAIN}</dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF S_EDIT_REASON -->
+ <dl>
+ <dt><label for="edit_reason">{L_EDIT_REASON}:</label></dt>
+ <dd><input type="text" name="edit_reason" id="edit_reason" value="{EDIT_REASON}" class="inputbox" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+ <!-- ENDIF -->
+
+<!-- ENDIF --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/posting_layout.html b/phpBB/styles/prosilver/template/posting_layout.html
new file mode 100644
index 0000000000..b81c8162d7
--- /dev/null
+++ b/phpBB/styles/prosilver/template/posting_layout.html
@@ -0,0 +1,90 @@
+<!-- INCLUDE overall_header.html -->
+
+<!-- IF TOPIC_TITLE -->
+ <h2><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
+<!-- ELSE -->
+ <h2><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>
+ <!-- ENDIF -->
+
+<!-- IF S_FORUM_RULES -->
+ <div class="rules">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <!-- IF U_FORUM_RULES -->
+ <a href="{U_FORUM_RULES}">{L_FORUM_RULES}</a>
+ <!-- ELSE -->
+ <strong>{L_FORUM_RULES}</strong><br />
+ {FORUM_RULES}
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+<!-- ENDIF -->
+
+<form id="postform" method="post" action="{S_POST_ACTION}"{S_FORM_ENCTYPE}>
+
+<!-- IF S_DRAFT_LOADED -->
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_INFORMATION}</h3>
+ <p>{L_DRAFT_LOADED}</p>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+<!-- ENDIF -->
+
+<!-- IF S_SHOW_DRAFTS --><!-- INCLUDE drafts.html --><!-- ENDIF -->
+
+<!-- IF S_POST_REVIEW --><!-- INCLUDE posting_review.html --><!-- ENDIF -->
+
+<!-- IF S_UNGLOBALISE -->
+ <div class="panel bg3">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <fieldset class="fields1">
+ <h2>{L_SELECT_DESTINATION_FORUM}</h2>
+ <p>{L_UNGLOBALISE_EXPLAIN}</p>
+ <dl>
+ <dt><label for="to_forum_id">{L_MOVE}:</label></dt>
+ <dd><select id="to_forum_id" name="to_forum_id">{S_FORUM_SELECT}</select></dd>
+ </dl>
+
+ <dl>
+ <dt>&nbsp;</dt>
+ <dd><input class="button1" type="submit" name="post" value="{L_CONFIRM}" /> <input class="button2" type="submit" name="cancel_unglobalise" value="{L_CANCEL}" /></dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+<!-- ENDIF -->
+
+<!-- IF S_DISPLAY_PREVIEW --><!-- INCLUDE posting_preview.html --><!-- ENDIF -->
+
+<div class="panel" id="postingbox">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_POST_A}</h3>
+
+ <!-- DEFINE $EXTRA_POSTING_OPTIONS = 1 -->
+ <!-- INCLUDE posting_editor.html -->
+ {S_FORM_TOKEN}
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- IF S_SHOW_ATTACH_BOX --><!-- INCLUDE posting_attach_body.html --><!-- ENDIF -->
+
+<!-- IF S_SHOW_POLL_BOX or S_POLL_DELETE --><!-- INCLUDE posting_poll_body.html --><!-- ENDIF -->
+
+<!-- IF S_DISPLAY_REVIEW --><!-- INCLUDE posting_topic_review.html --><!-- ENDIF -->
+
+</form>
+<!-- IF not S_PRIVMSGS -->
+<script type="text/javascript">
+// <![CDATA[
+ subPanels(show_panel);
+// ]]>
+</script>
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/posting_pm_layout.html b/phpBB/styles/prosilver/template/posting_pm_layout.html
new file mode 100644
index 0000000000..48812da102
--- /dev/null
+++ b/phpBB/styles/prosilver/template/posting_pm_layout.html
@@ -0,0 +1,35 @@
+<!-- INCLUDE ucp_header.html -->
+
+<!-- IF S_DRAFT_LOADED -->
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_INFORMATION}</h3>
+ <p>{L_DRAFT_LOADED_PM}</p>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+<!-- ENDIF -->
+
+<!-- IF S_SHOW_DRAFTS --><!-- INCLUDE drafts.html --><!-- ENDIF -->
+
+<!-- IF S_DISPLAY_PREVIEW --><!-- INCLUDE posting_preview.html --><!-- ENDIF -->
+
+<h2>{L_TITLE}</h2>
+
+<div class="panel" id="postingbox">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <!-- DEFINE $EXTRA_POSTING_OPTIONS = 1 -->
+ <!-- INCLUDE posting_editor.html -->
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- IF S_SHOW_ATTACH_BOX --><!-- INCLUDE posting_attach_body.html --><!-- ENDIF -->
+
+<!-- IF S_DISPLAY_REVIEW --><!-- INCLUDE posting_topic_review.html --><!-- ENDIF -->
+
+<!-- IF S_DISPLAY_HISTORY --><!-- INCLUDE ucp_pm_history.html --><!-- ENDIF -->
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/posting_poll_body.html b/phpBB/styles/prosilver/template/posting_poll_body.html
new file mode 100644
index 0000000000..ba0014ce57
--- /dev/null
+++ b/phpBB/styles/prosilver/template/posting_poll_body.html
@@ -0,0 +1,56 @@
+<div class="panel bg3" id="poll-panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <!-- IF S_SHOW_POLL_BOX -->
+ <p>{L_ADD_POLL_EXPLAIN}</p>
+ <!-- ENDIF -->
+
+ <fieldset class="fields2">
+ <!-- IF S_SHOW_POLL_BOX -->
+ <!-- IF S_POLL_DELETE -->
+ <dl>
+ <dt><label for="poll_delete">{L_POLL_DELETE}:</label></dt>
+ <dd><label for="poll_delete"><input type="checkbox" name="poll_delete" id="poll_delete"<!-- IF S_POLL_DELETE_CHECKED --> checked="checked"<!-- ENDIF --> /> </label></dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="poll_title">{L_POLL_QUESTION}:</label></dt>
+ <dd><input type="text" name="poll_title" id="poll_title" maxlength="255" value="{POLL_TITLE}" class="inputbox" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="poll_option_text">{L_POLL_OPTIONS}:</label><br /><span>{L_POLL_OPTIONS_EXPLAIN}</span></dt>
+ <dd><textarea name="poll_option_text" id="poll_option_text" rows="5" cols="35" class="inputbox">{POLL_OPTIONS}</textarea></dd>
+ </dl>
+
+ <hr class="dashed" />
+
+ <dl>
+ <dt><label for="poll_max_options">{L_POLL_MAX_OPTIONS}:</label></dt>
+ <dd><input type="text" name="poll_max_options" id="poll_max_options" size="3" maxlength="3" value="{POLL_MAX_OPTIONS}" class="inputbox autowidth" /></dd>
+ <dd>{L_POLL_MAX_OPTIONS_EXPLAIN}</dd>
+ </dl>
+ <dl>
+ <dt><label for="poll_length">{L_POLL_FOR}:</label></dt>
+ <dd><label for="poll_length"><input type="text" name="poll_length" id="poll_length" size="3" maxlength="3" value="{POLL_LENGTH}" class="inputbox autowidth" /> {L_DAYS}</label></dd>
+ <dd>{L_POLL_FOR_EXPLAIN}</dd>
+ </dl>
+
+ <!-- IF S_POLL_VOTE_CHANGE -->
+ <hr class="dashed" />
+
+ <dl>
+ <dt><label for="poll_vote_change">{L_POLL_VOTE_CHANGE}:</label></dt>
+ <dd><label for="poll_vote_change"><input type="checkbox" id="poll_vote_change" name="poll_vote_change"{VOTE_CHANGE_CHECKED} /> {L_POLL_VOTE_CHANGE_EXPLAIN}</label></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- ELSEIF S_POLL_DELETE -->
+ <dl class="fields1">
+ <dt><label for="poll_delete">{L_POLL_DELETE}:</label></dt>
+ <dd><label for="poll_delete"><input type="checkbox" name="poll_delete" id="poll_delete"<!-- IF S_POLL_DELETE_CHECKED --> checked="checked"<!-- ENDIF --> /> </label></dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
diff --git a/phpBB/styles/prosilver/template/posting_preview.html b/phpBB/styles/prosilver/template/posting_preview.html
new file mode 100644
index 0000000000..82227c23b0
--- /dev/null
+++ b/phpBB/styles/prosilver/template/posting_preview.html
@@ -0,0 +1,47 @@
+<div class="post <!-- IF S_PRIVMSGS -->pm<!-- ELSE -->bg2<!-- ENDIF -->" id="preview">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+<!-- IF S_HAS_POLL_OPTIONS -->
+ <div class="content">
+ <h2>{L_PREVIEW}: {POLL_QUESTION}</h2>
+ <p class="author"><!-- IF L_POLL_LENGTH -->{L_POLL_LENGTH}<br /><!-- ENDIF -->{L_MAX_VOTES}</p>
+
+ <fieldset class="polls">
+ <!-- BEGIN poll_option -->
+ <dl>
+ <dt><label for="vote_{poll_option.POLL_OPTION_ID}">{poll_option.POLL_OPTION_CAPTION}</label></dt>
+ <dd style="width: auto;"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></dd>
+ </dl>
+ <!-- END poll_option -->
+ </fieldset>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="post bg2">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+<!-- ENDIF -->
+
+ <div class="postbody">
+ <h3>{L_PREVIEW}: {PREVIEW_SUBJECT}</h3>
+
+ <div class="content">{PREVIEW_MESSAGE}</div>
+
+ <!-- IF .attachment -->
+ <dl class="attachbox">
+ <dt>{L_ATTACHMENTS}</dt>
+ <!-- BEGIN attachment -->
+ <dd>{attachment.DISPLAY_ATTACHMENT}</dd>
+ <!-- END attachment -->
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF PREVIEW_SIGNATURE --><div class="signature">{PREVIEW_SIGNATURE}</div><!-- ENDIF -->
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<hr />
diff --git a/phpBB/styles/prosilver/template/posting_review.html b/phpBB/styles/prosilver/template/posting_review.html
new file mode 100644
index 0000000000..78b994c989
--- /dev/null
+++ b/phpBB/styles/prosilver/template/posting_review.html
@@ -0,0 +1,35 @@
+<h3>{L_POST_REVIEW}</h3>
+
+<p>{L_POST_REVIEW_EXPLAIN}</p>
+
+<!-- BEGIN post_review_row -->
+<!-- IF post_review_row.S_IGNORE_POST -->
+<div class="post bg3 post-ignore">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ {post_review_row.L_IGNORE_POST}
+<!-- ELSE -->
+<div class="post <!-- IF post_review_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF post_review_row.ONLINE_STATUS --> online<!-- ENDIF -->">
+ <div class="inner"><span class="corners-top"><span></span></span>
+<!-- ENDIF -->
+
+ <div class="postbody" id="ppr{post_review_row.POST_ID}">
+ <h3><a href="#ppr{post_review_row.POST_ID}">{post_review_row.POST_SUBJECT}</a></h3>
+ <p class="author"><!-- IF S_IS_BOT -->{post_review_row.MINI_POST_IMG}<!-- ELSE --><a href="{post_review_row.U_MINI_POST}">{post_review_row.MINI_POST_IMG}</a><!-- ENDIF --> {L_POST_BY_AUTHOR}<strong> {post_review_row.POST_AUTHOR_FULL}</strong> &raquo; {post_review_row.POST_DATE}</p>
+ <div class="content">{post_review_row.MESSAGE}</div>
+
+ <!-- IF post_review_row.S_HAS_ATTACHMENTS -->
+ <dl class="attachbox">
+ <dt>{L_ATTACHMENTS}</dt>
+ <!-- BEGIN attachment -->
+ <dd>{post_review_row.attachment.DISPLAY_ATTACHMENT}</dd>
+ <!-- END attachment -->
+ </dl>
+ <!-- ENDIF -->
+
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+<!-- END post_review_row -->
+
+<hr /> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/posting_smilies.html b/phpBB/styles/prosilver/template/posting_smilies.html
new file mode 100644
index 0000000000..fdd0d7ada1
--- /dev/null
+++ b/phpBB/styles/prosilver/template/posting_smilies.html
@@ -0,0 +1,23 @@
+<!-- INCLUDE simple_header.html -->
+
+<script type="text/javascript">
+// <![CDATA[
+ var form_name = 'postform';
+ var text_name = 'message';
+// ]]>
+</script>
+<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
+
+<h2>{L_SMILIES}</h2>
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <!-- BEGIN smiley -->
+ <a href="#" onclick="initInsertions(); insert_text('{smiley.A_SMILEY_CODE}', true, true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" /></a>
+ <!-- END smiley -->
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+<div>{PAGINATION}</div>
+<a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>
+
+<!-- INCLUDE simple_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/posting_topic_review.html b/phpBB/styles/prosilver/template/posting_topic_review.html
new file mode 100644
index 0000000000..0d68a02758
--- /dev/null
+++ b/phpBB/styles/prosilver/template/posting_topic_review.html
@@ -0,0 +1,59 @@
+
+<h3 id="review">
+ <span class="right-box"><a href="#review" onclick="viewableArea(getElementById('topicreview'), true); var rev_text = getElementById('review').getElementsByTagName('a').item(0).firstChild; if (rev_text.data == '{LA_EXPAND_VIEW}'){rev_text.data = '{LA_COLLAPSE_VIEW}'; } else if (rev_text.data == '{LA_COLLAPSE_VIEW}'){rev_text.data = '{LA_EXPAND_VIEW}'};">{L_EXPAND_VIEW}</a></span>
+ {L_TOPIC_REVIEW}: {TOPIC_TITLE}
+</h3>
+
+<div id="topicreview">
+<script type="text/javascript">
+// <![CDATA[
+ bbcodeEnabled = {S_BBCODE_ALLOWED};
+// ]]>
+</script>
+ <!-- BEGIN topic_review_row -->
+
+ <!-- IF topic_review_row.S_IGNORE_POST -->
+ <div class="post bg3 post-ignore">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ {topic_review_row.L_IGNORE_POST}
+ <!-- ELSE -->
+ <div class="post <!-- IF topic_review_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <!-- ENDIF -->
+
+ <div class="postbody" id="pr{topic_review_row.POST_ID}">
+ <!-- IF topic_review_row.POSTER_QUOTE and topic_review_row.DECODED_MESSAGE -->
+ <ul class="profile-icons">
+ <li class="quote-icon"><a href="#postingbox" onclick="addquote({topic_review_row.POST_ID}, '{topic_review_row.POSTER_QUOTE}');" title="{L_QUOTE} {topic_review_row.POST_AUTHOR}"><span>{L_QUOTE} {topic_review_row.POST_AUTHOR}</span></a></li>
+ </ul>
+ <!-- ENDIF -->
+ <!-- IF topic_review_row.U_MCP_DETAILS --><div class="right-box"><a href="{topic_review_row.U_MCP_DETAILS}">{L_POST_DETAILS}</a></div><!-- ENDIF -->
+ <h3><a href="#pr{topic_review_row.POST_ID}">{topic_review_row.POST_SUBJECT}</a></h3>
+ <p class="author"><!-- IF S_IS_BOT -->{topic_review_row.MINI_POST_IMG}<!-- ELSE --><a href="{topic_review_row.U_MINI_POST}">{topic_review_row.MINI_POST_IMG}</a><!-- ENDIF --> {L_POST_BY_AUTHOR} <strong>{topic_review_row.POST_AUTHOR_FULL}</strong> &raquo; {topic_review_row.POST_DATE} </p>
+ <div class="content">{topic_review_row.MESSAGE}</div>
+
+ <!-- IF topic_review_row.S_HAS_ATTACHMENTS -->
+ <dl class="attachbox">
+ <dt>{L_ATTACHMENTS}</dt>
+ <!-- BEGIN attachment -->
+ <dd>{topic_review_row.attachment.DISPLAY_ATTACHMENT}</dd>
+ <!-- END attachment -->
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF topic_review_row.POSTER_QUOTE and topic_review_row.DECODED_MESSAGE -->
+ <div id="message_{topic_review_row.POST_ID}" style="display: none;">{topic_review_row.DECODED_MESSAGE}</div>
+ <!-- ENDIF -->
+ </div>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- END topic_review_row -->
+</div>
+
+<hr />
+
+<!-- IF S_MCP_REPORT -->
+ <p><a href="#report" class="top2">{L_BACK_TO_TOP}</a></p>
+<!-- ELSE -->
+ <p><a href="#postingbox" class="top2">{L_BACK_TO_TOP}</a></p>
+<!-- ENDIF --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/quickreply_editor.html b/phpBB/styles/prosilver/template/quickreply_editor.html
new file mode 100644
index 0000000000..1ec8e2b643
--- /dev/null
+++ b/phpBB/styles/prosilver/template/quickreply_editor.html
@@ -0,0 +1,79 @@
+<script type="text/javascript">
+// <![CDATA[
+ function hide_qr()
+ {
+ dE('qr_editor_div');
+ dE('qr_showeditor_div');
+ return true;
+ }
+
+
+ function init_qr()
+ {
+ dE('qr_showeditor_div');
+ return true;
+ }
+ onload_functions.push('init_qr();');
+ // ]]>
+</script>
+<noscript>
+ <form method="post" action="{U_QR_ACTION}">
+ <div class="panel" id="qr_ns_editor_div">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="content">
+ <h2>{L_QUICKREPLY}</h2>
+ <fieldset class="fields1">
+ <dl style="clear: left;">
+ <dt><label for="subject">{L_SUBJECT}:</label></dt>
+ <dd><input type="text" name="subject" id="subject-ns" size="45" maxlength="64" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>
+ </dl>
+ <div id="message-box-ns">
+ <textarea style="height: 9em;" name="message" rows="7" cols="76" tabindex="3" class="inputbox"></textarea>
+ </div>
+ </fieldset>
+ <fieldset class="submit-buttons">
+ {S_FORM_TOKEN}
+ {QR_HIDDEN_FIELDS}
+ <input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />&nbsp;
+ <input type="submit" accesskey="f" tabindex="7" name="full_editor" value="{L_FULL_EDITOR}" class="button2" />&nbsp;
+ </fieldset>
+ </div>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ </form>
+</noscript>
+<form method="post" action="{U_QR_ACTION}">
+ <div class="panel" style="display: none" id="qr_editor_div">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="content">
+ <h2>{L_QUICKREPLY}</h2>
+ <fieldset class="fields1">
+ <dl style="clear: left;">
+ <dt><label for="subject">{L_SUBJECT}:</label></dt>
+ <dd><input type="text" name="subject" id="subject" size="45" maxlength="64" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>
+ </dl>
+ <div id="message-box">
+ <textarea style="height: 9em;" name="message" rows="7" cols="76" tabindex="3" class="inputbox"></textarea>
+ </div>
+ </fieldset>
+ <fieldset class="submit-buttons">
+ {S_FORM_TOKEN}
+ {QR_HIDDEN_FIELDS}
+ <input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />&nbsp;
+ <input type="submit" accesskey="f" tabindex="6" name="full_editor" value="{L_FULL_EDITOR}" class="button2" />&nbsp;
+ </fieldset>
+ <a href="" class="right-box up" onclick="hide_qr(); return false;" title="{L_COLLAPSE_QR}">{L_COLLAPSE_QR}</a>
+ </div>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <div class="panel" style="display: none" id="qr_showeditor_div" >
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+ <fieldset class="submit-buttons">
+ <input type="submit" name="show_qr" tabindex="1" class="button2" value="{L_SHOW_QR}" onclick="hide_qr();return false;"/>
+ </fieldset>
+ </div>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+</form>
diff --git a/phpBB/styles/prosilver/template/report_body.html b/phpBB/styles/prosilver/template/report_body.html
new file mode 100644
index 0000000000..b0c6e08049
--- /dev/null
+++ b/phpBB/styles/prosilver/template/report_body.html
@@ -0,0 +1,51 @@
+<!-- INCLUDE overall_header.html -->
+
+<h2 class="titlespace"><!-- IF S_REPORT_POST -->{L_REPORT_POST}<!-- ELSE -->{L_REPORT_MESSAGE}<!-- ENDIF --></h2>
+
+<form method="post" action="{S_REPORT_ACTION}" id="report">
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+ <p><!-- IF S_REPORT_POST -->{L_REPORT_POST_EXPLAIN}<!-- ELSE -->{L_REPORT_MESSAGE_EXPLAIN}<!-- ENDIF --></p>
+
+ <fieldset>
+ <dl class="fields2">
+ <dt><label for="reason_id">{L_REASON}:</label></dt>
+ <dd><select name="reason_id" id="reason_id" class="full"><!-- BEGIN reason --><option value="{reason.ID}"<!-- IF reason.S_SELECTED --> selected="selected"<!-- ENDIF -->>{reason.DESCRIPTION}</option><!-- END reason --></select></dd>
+ </dl>
+ <!-- IF S_CAN_NOTIFY -->
+ <dl class="fields2">
+ <dt><label for="notify1">{L_REPORT_NOTIFY}:</label><br /><span>{L_REPORT_NOTIFY_EXPLAIN}</span></dt>
+ <dd>
+ <label for="notify1"><input type="radio" name="notify" id="notify1" value="1" <!-- IF not S_NOTIFY -->checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="notify0"><input type="radio" name="notify" id="notify0" value="0" <!-- IF S_NOTIFY -->checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl class="fields2">
+ <dt><label for="report_text">{L_MORE_INFO}:</label><br /><span>{L_CAN_LEAVE_BLANK}</span></dt>
+ <dd><textarea name="report_text" id="report_text" rows="10" cols="76" class="inputbox">{REPORT_TEXT}</textarea></dd>
+ </dl>
+ </fieldset>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+ <fieldset class="submit-buttons">
+ <input type="submit" name="submit" class="button1" value="{L_SUBMIT}" />&nbsp;
+ <input type="submit" name="cancel" class="button2" value="{L_CANCEL}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/search_body.html b/phpBB/styles/prosilver/template/search_body.html
new file mode 100644
index 0000000000..612641b141
--- /dev/null
+++ b/phpBB/styles/prosilver/template/search_body.html
@@ -0,0 +1,122 @@
+<!-- INCLUDE overall_header.html -->
+
+<h2 class="solo">{L_SEARCH}</h2>
+
+<form method="get" action="{S_SEARCH_ACTION}">
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <h3>{L_SEARCH_QUERY}</h3>
+
+ <fieldset>
+ <dl>
+ <dt><label for="keywords">{L_SEARCH_KEYWORDS}:</label><br /><span>{L_SEARCH_KEYWORDS_EXPLAIN}</span></dt>
+ <dd><input type="text" class="inputbox" name="keywords" id="keywords" size="40" title="{L_SEARCH_KEYWORDS}" /></dd>
+ <dd><label for="terms1"><input type="radio" name="terms" id="terms1" value="all" checked="checked" /> {L_SEARCH_ALL_TERMS}</label></dd>
+ <dd><label for="terms2"><input type="radio" name="terms" id="terms2" value="any" /> {L_SEARCH_ANY_TERMS}</label></dd>
+ </dl>
+ <dl>
+ <dt><label for="author">{L_SEARCH_AUTHOR}:</label><br /><span>{L_SEARCH_AUTHOR_EXPLAIN}</span></dt>
+ <dd><input type="text" class="inputbox" name="author" id="author" size="40" title="{L_SEARCH_AUTHOR}" /></dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="panel bg2">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_SEARCH_OPTIONS}</h3>
+
+ <fieldset>
+ <dl>
+ <dt><label for="search_forum">{L_SEARCH_FORUMS}:</label><br /><span>{L_SEARCH_FORUMS_EXPLAIN}</span></dt>
+ <dd><select name="fid[]" id="search_forum" multiple="multiple" size="8" title="{L_SEARCH_FORUMS}">{S_FORUM_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="search_child1">{L_SEARCH_SUBFORUMS}:</label></dt>
+ <dd>
+ <label for="search_child1"><input type="radio" name="sc" id="search_child1" value="1" checked="checked" /> {L_YES}</label>
+ <label for="search_child2"><input type="radio" name="sc" id="search_child2" value="0" /> {L_NO}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="sf1">{L_SEARCH_WITHIN}:</label></dt>
+ <dd><label for="sf1"><input type="radio" name="sf" id="sf1" value="all" checked="checked" /> {L_SEARCH_TITLE_MSG}</label></dd>
+ <dd><label for="sf2"><input type="radio" name="sf" id="sf2" value="msgonly" /> {L_SEARCH_MSG_ONLY}</label></dd>
+ <dd><label for="sf3"><input type="radio" name="sf" id="sf3" value="titleonly" /> {L_SEARCH_TITLE_ONLY}</label></dd>
+ <dd><label for="sf4"><input type="radio" name="sf" id="sf4" value="firstpost" /> {L_SEARCH_FIRST_POST}</label></dd>
+ </dl>
+
+ <hr class="dashed" />
+
+ <dl>
+ <dt><label for="show_results1">{L_DISPLAY_RESULTS}:</label></dt>
+ <dd>
+ <label for="show_results1"><input type="radio" name="sr" id="show_results1" value="posts" checked="checked" /> {L_POSTS}</label>
+ <label for="show_results2"><input type="radio" name="sr" id="show_results2" value="topics" /> {L_TOPICS}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="sd">{L_RESULT_SORT}:</label></dt>
+ <dd>{S_SELECT_SORT_KEY}&nbsp;
+ <label for="sa"><input type="radio" name="sd" id="sa" value="a" /> {L_SORT_ASCENDING}</label>
+ <label for="sd"><input type="radio" name="sd" id="sd" value="d" checked="checked" /> {L_SORT_DESCENDING}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label>{L_RESULT_DAYS}:</label></dt>
+ <dd>{S_SELECT_SORT_DAYS}</dd>
+ </dl>
+ <dl>
+ <dt><label>{L_RETURN_FIRST}:</label></dt>
+ <dd><select name="ch" title="{L_RETURN_FIRST}">{S_CHARACTER_OPTIONS}</select> {L_POST_CHARACTERS}</dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="panel bg3">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="submit" value="{L_SEARCH}" class="button1" />
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+</form>
+
+<!-- IF .recentsearch -->
+<div class="forumbg">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <table class="table1" cellspacing="1">
+ <thead>
+ <tr>
+ <th colspan="2" class="name">{L_RECENT_SEARCHES}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN recentsearch -->
+ <tr class="<!-- IF recentsearch.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <td><a href="{recentsearch.U_KEYWORDS}">{recentsearch.KEYWORDS}</a></td>
+ <td class="active"><span>&nbsp;{recentsearch.TIME}</span></td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr class="bg1">
+ <td colspan="2">{L_NO_RECENT_SEARCHES}</td>
+ </tr>
+ <!-- END recentsearch -->
+ </tbody>
+ </table>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html
new file mode 100644
index 0000000000..c38a37452b
--- /dev/null
+++ b/phpBB/styles/prosilver/template/search_results.html
@@ -0,0 +1,160 @@
+<!-- INCLUDE overall_header.html -->
+
+<h2><!-- IF SEARCH_TITLE -->{SEARCH_TITLE}<!-- ELSE -->{SEARCH_MATCHES}<!-- ENDIF --><!-- IF SEARCH_WORDS -->: <a href="{U_SEARCH_WORDS}">{SEARCH_WORDS}</a><!-- ENDIF --></h2>
+<!-- IF IGNORED_WORDS --> <p>{L_IGNORED_TERMS}: <strong>{IGNORED_WORDS}</strong></p><!-- ENDIF -->
+
+<!-- IF SEARCH_TOPIC -->
+ <p><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}">{L_RETURN_TO}: {SEARCH_TOPIC}</a></p>
+<!-- ELSE -->
+ <p><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}">{L_RETURN_TO_SEARCH_ADV}</a></p>
+<!-- ENDIF -->
+
+<!-- IF PAGINATION or SEARCH_MATCHES or PAGE_NUMBER -->
+ <form method="post" action="{S_SEARCH_ACTION}">
+
+ <div class="topic-actions">
+
+ <!-- IF SEARCH_MATCHES -->
+ <div class="search-box">
+ <!-- IF SEARCH_IN_RESULTS -->
+ <label for="add_keywords">{L_SEARCH_IN_RESULTS}: <input type="text" name="add_keywords" id="add_keywords" value="" class="inputbox narrow" /></label>
+ <input class="button2" type="submit" name="submit" value="{L_SEARCH}" />
+ <!-- ENDIF -->
+ </div>
+ <!-- ENDIF -->
+
+ <div class="rightside pagination">
+ {SEARCH_MATCHES}<!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->
+ </div>
+ </div>
+
+ </form>
+<!-- ENDIF -->
+
+<!-- IF S_SHOW_TOPICS -->
+
+ <!-- IF .searchresults -->
+ <div class="forumbg">
+
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <ul class="topiclist">
+ <li class="header">
+ <dl class="icon">
+ <dt>{L_TOPICS}</dt>
+ <dd class="posts">{L_REPLIES}</dd>
+ <dd class="views">{L_VIEWS}</dd>
+ <dd class="lastpost"><span>{L_LAST_POST}</span></dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist topics">
+
+ <!-- BEGIN searchresults -->
+ <li class="row<!-- IF searchresults.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl class="icon" style="background-image: url({searchresults.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
+ <dt <!-- IF searchresults.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{searchresults.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF -->>
+ <!-- IF searchresults.S_UNREAD_TOPIC --><a href="{searchresults.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->
+ <a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a> {searchresults.ATTACH_ICON_IMG}
+ <!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED --><a href="{searchresults.U_MCP_QUEUE}">{searchresults.UNAPPROVED_IMG}</a> <!-- ENDIF -->
+ <!-- IF searchresults.S_TOPIC_REPORTED --><a href="{searchresults.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
+ <!-- IF searchresults.PAGINATION --><strong class="pagination"><span>{searchresults.PAGINATION}</span></strong><!-- ENDIF -->
+ {L_POST_BY_AUTHOR} {searchresults.TOPIC_AUTHOR_FULL} &raquo; {searchresults.FIRST_POST_TIME}
+ <!-- IF not searchresults.S_TOPIC_GLOBAL -->{L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a><!-- ELSE --> ({L_GLOBAL})<!-- ENDIF -->
+ </dt>
+ <dd class="posts">{searchresults.TOPIC_REPLIES}</dd>
+ <dd class="views">{searchresults.TOPIC_VIEWS}</dd>
+ <dd class="lastpost"><span>
+ {L_POST_BY_AUTHOR} {searchresults.LAST_POST_AUTHOR_FULL}
+ <!-- IF not S_IS_BOT --><a href="{searchresults.U_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{searchresults.LAST_POST_TIME}<br /> </span>
+ </dd>
+ </dl>
+ </li>
+ <!-- END searchresults -->
+ </ul>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ELSE -->
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <strong>{L_NO_SEARCH_RESULTS}</strong>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
+
+<!-- ELSE -->
+
+ <!-- BEGIN searchresults -->
+ <div class="search post <!-- IF searchresults.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF searchresults.S_POST_REPORTED --> reported<!-- ENDIF -->">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <!-- IF searchresults.S_IGNORE_POST -->
+ <div class="postbody">
+ {searchresults.L_IGNORE_POST}
+ </div>
+ <!-- ELSE -->
+ <div class="postbody">
+ <h3><a href="{searchresults.U_VIEW_POST}">{searchresults.POST_SUBJECT}</a></h3>
+ <div class="content">{searchresults.MESSAGE}</div>
+ </div>
+
+ <dl class="postprofile">
+ <dt class="author">{L_POST_BY_AUTHOR} {searchresults.POST_AUTHOR_FULL}</dt>
+ <dd>{searchresults.POST_DATE}</dd>
+ <dd>&nbsp;</dd>
+ <!-- IF searchresults.FORUM_TITLE -->
+ <dd>{L_FORUM}: <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a></dd>
+ <dd>{L_TOPIC}: <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a></dd>
+ <!-- ELSE -->
+ <dd>{L_GLOBAL}: <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a></dd>
+ <!-- ENDIF -->
+ <dd>{L_REPLIES}: <strong>{searchresults.TOPIC_REPLIES}</strong></dd>
+ <dd>{L_VIEWS}: <strong>{searchresults.TOPIC_VIEWS}</strong></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF not searchresults.S_IGNORE_POST -->
+ <ul class="searchresults">
+ <li ><a href="{searchresults.U_VIEW_POST}" class="{S_CONTENT_FLOW_END}">{L_JUMP_TO_POST}</a></li>
+ </ul>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- BEGINELSE -->
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <strong>{L_NO_SEARCH_RESULTS}</strong>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- END searchresults -->
+<!-- ENDIF -->
+
+<!-- IF PAGINATION or .searchresults or S_SELECT_SORT_KEY or S_SELECT_SORT_DAYS -->
+ <form method="post" action="{S_SEARCH_ACTION}">
+
+ <fieldset class="display-options">
+ <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF S_SELECT_SORT_DAYS or S_SELECT_SORT_KEY -->
+ <label><!-- IF S_SHOW_TOPICS -->{L_DISPLAY_POSTS}<!-- ELSE -->{L_SORT_BY}</label><label><!-- ENDIF --> {S_SELECT_SORT_DAYS}<!-- IF S_SELECT_SORT_KEY --></label> <label>{S_SELECT_SORT_KEY}</label>
+ <label>{S_SELECT_SORT_DIR} <!-- ELSE --></label><!-- ENDIF --><input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
+ <!-- ENDIF -->
+ </fieldset>
+
+ </form>
+
+ <hr />
+<!-- ENDIF -->
+
+<!-- IF PAGINATION or .searchresults or PAGE_NUMBER -->
+ <ul class="linklist">
+ <li class="rightside pagination">
+ {SEARCH_MATCHES}<!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->
+ </li>
+ </ul>
+<!-- ENDIF -->
+
+<!-- INCLUDE jumpbox.html -->
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/simple_footer.html b/phpBB/styles/prosilver/template/simple_footer.html
new file mode 100644
index 0000000000..e64e209368
--- /dev/null
+++ b/phpBB/styles/prosilver/template/simple_footer.html
@@ -0,0 +1,20 @@
+ </div>
+<!--
+ We request you retain the full copyright notice below including the link to www.phpbb.com.
+ This not only gives respect to the large amount of time given freely by the developers
+ but also helps build interest, traffic and use of phpBB3. If you (honestly) cannot retain
+ the full copyright we ask you at least leave in place the "Powered by phpBB" line, with
+ "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our
+ forums may be affected.
+
+ The phpBB Group : 2006
+//-->
+
+ <div class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a> &copy; 2000, 2002, 2005, 2007 phpBB Group
+ <!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
+ <!-- IF DEBUG_OUTPUT --><br />{DEBUG_OUTPUT}<!-- ENDIF -->
+ </div>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html
new file mode 100644
index 0000000000..0e2409586c
--- /dev/null
+++ b/phpBB/styles/prosilver/template/simple_header.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="content-language" content="{S_USER_LANG}" />
+<meta http-equiv="imagetoolbar" content="no" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
+<meta name="keywords" content="" />
+<meta name="description" content="" />
+{META}
+<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
+
+<script type="text/javascript">
+// <![CDATA[
+
+ var jump_page = '{LA_JUMP_PAGE}:';
+ var on_page = '{ON_PAGE}';
+ var per_page = '{PER_PAGE}';
+ var base_url = '{A_BASE_URL}';
+ var style_cookie = 'phpBBstyle';
+ var onload_functions = new Array();
+ var onunload_functions = new Array();
+ var style_cookie_settings = '{A_COOKIE_SETTINGS}';
+
+ /**
+ * New function for handling multiple calls to window.onload and window.unload by pentapenguin
+ */
+ window.onload = function()
+ {
+ for (var i = 0; i < onload_functions.length; i++)
+ {
+ eval(onload_functions[i]);
+ }
+ }
+
+ window.onunload = function()
+ {
+ for (var i = 0; i < onunload_functions.length; i++)
+ {
+ eval(onunload_functions[i]);
+ }
+ }
+
+// ]]>
+</script>
+<script type="text/javascript" src="{T_TEMPLATE_PATH}/styleswitcher.js"></script>
+<script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script>
+
+<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
+<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
+
+<link href="{T_THEME_PATH}/normal.css" rel="alternate stylesheet" type="text/css" title="A" />
+<link href="{T_THEME_PATH}/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
+<link href="{T_THEME_PATH}/large.css" rel="alternate stylesheet" type="text/css" title="A++" />
+
+<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
+ <link href="{T_THEME_PATH}/bidi.css" rel="stylesheet" type="text/css" media="screen, projection" />
+<!-- ENDIF -->
+
+<!-- DEFINE $POPUP = 1 -->
+
+</head>
+
+<body id="phpbb" class="{S_CONTENT_DIRECTION}">
+
+<div id="simple-wrap">
+ <a id="top" name="top" accesskey="t"></a>
+ <div id="page-body"> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/styleswitcher.js b/phpBB/styles/prosilver/template/styleswitcher.js
new file mode 100644
index 0000000000..bbcac9b69c
--- /dev/null
+++ b/phpBB/styles/prosilver/template/styleswitcher.js
@@ -0,0 +1,193 @@
+
+function fontsizeup(event)
+{
+ // Skip tabs; 9 being the ASCII code for a tab
+ if (event && getKeyCode(event) == 9)
+ {
+ return true;
+ }
+
+ var active = getActiveStyleSheet();
+
+ switch (active)
+ {
+ case 'A--':
+ setActiveStyleSheet('A-');
+ break;
+
+ case 'A-':
+ setActiveStyleSheet('A');
+ break;
+
+ case 'A':
+ setActiveStyleSheet('A+');
+ break;
+
+ case 'A+':
+ setActiveStyleSheet('A++');
+ break;
+
+ case 'A++':
+ setActiveStyleSheet('A');
+ break;
+
+ default:
+ setActiveStyleSheet('A');
+ break;
+ }
+
+ return false;
+}
+
+function fontsizedown(event)
+{
+ // Skip tabs
+ if (event && getKeyCode(event) == 9)
+ {
+ return true;
+ }
+
+ var active = getActiveStyleSheet();
+
+ switch (active)
+ {
+ case 'A++' :
+ setActiveStyleSheet('A+');
+ break;
+
+ case 'A+' :
+ setActiveStyleSheet('A');
+ break;
+
+ case 'A' :
+ setActiveStyleSheet('A-');
+ break;
+
+ case 'A-' :
+ setActiveStyleSheet('A--');
+ break;
+
+ case 'A--' :
+ break;
+
+ default :
+ setActiveStyleSheet('A--');
+ break;
+ }
+
+ return false;
+}
+
+function getKeyCode(event)
+{
+ // IE doesn't fire the onkeypress event for tabs
+ // Reference: http://www.quirksmode.org/js/keys.html
+
+ var code = (event.keyCode) ? event.keyCode : 0;
+
+ // Probably using FF
+ if (!code && event.charCode)
+ {
+ code = event.charCode;
+ }
+
+ return code;
+}
+
+function setActiveStyleSheet(title)
+{
+ var i, a, main;
+
+ for (i = 0; (a = document.getElementsByTagName('link')[i]); i++)
+ {
+ if (a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title'))
+ {
+ a.disabled = true;
+ if (a.getAttribute('title') == title)
+ {
+ a.disabled = false;
+ }
+ }
+ }
+}
+
+function getActiveStyleSheet()
+{
+ var i, a;
+
+ for (i = 0; (a = document.getElementsByTagName('link')[i]); i++)
+ {
+ if (a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title') && !a.disabled)
+ {
+ return a.getAttribute('title');
+ }
+ }
+
+ return null;
+}
+
+function getPreferredStyleSheet()
+{
+ return ('A-');
+}
+
+function createCookie(name, value, days)
+{
+ if (days)
+ {
+ var date = new Date();
+ date.setTime(date.getTime() + (days*24*60*60*1000));
+ var expires = '; expires=' + date.toGMTString();
+ }
+ else
+ {
+ expires = '';
+ }
+
+ document.cookie = name + '=' + value + expires + style_cookie_settings;
+}
+
+function readCookie(name)
+{
+ var nameEQ = name + '=';
+ var ca = document.cookie.split(';');
+
+ for (var i = 0; i < ca.length; i++)
+ {
+ var c = ca[i];
+
+ while (c.charAt(0) == ' ')
+ {
+ c = c.substring(1, c.length);
+ }
+
+ if (c.indexOf(nameEQ) == 0)
+ {
+ return c.substring(nameEQ.length, c.length);
+ }
+ }
+
+ return null;
+}
+
+function load_cookie()
+{
+ var cookie = readCookie('style_cookie');
+ var title = cookie ? cookie : getPreferredStyleSheet();
+ setActiveStyleSheet(title);
+}
+
+function unload_cookie()
+{
+ var title = getActiveStyleSheet();
+ createCookie('style_cookie', title, 365);
+}
+
+onload_functions.push('load_cookie()');
+onunload_functions.push('unload_cookie()');
+
+/*
+var cookie = readCookie("style");
+var title = cookie ? cookie : getPreferredStyleSheet();
+setActiveStyleSheet(title);
+*/
diff --git a/phpBB/styles/prosilver/template/template.cfg b/phpBB/styles/prosilver/template/template.cfg
new file mode 100644
index 0000000000..22328dd50b
--- /dev/null
+++ b/phpBB/styles/prosilver/template/template.cfg
@@ -0,0 +1,25 @@
+#
+# phpBB Template Configuration File
+#
+# @package phpBB3
+# @copyright (c) 2006 phpBB Group
+# @license http://opensource.org/licenses/gpl-license.php GNU Public License
+#
+#
+# At the left is the name, please do not change this
+# At the right the value is entered
+# For on/off options the valid values are on, off, 1, 0, true and false
+#
+# Values get trimmed, if you want to add a space in front or at the end of
+# the value, then enclose the value with single or double quotes.
+# Single and double quotes do not need to be escaped.
+#
+#
+
+# General Information about this template
+name = prosilver
+copyright = &copy; phpBB Group, 2007
+version = 3.0.6
+
+# Defining a different template bitfield
+template_bitfield = lNg=
diff --git a/phpBB/styles/prosilver/template/ucp_agreement.html b/phpBB/styles/prosilver/template/ucp_agreement.html
new file mode 100644
index 0000000000..3825abc08f
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_agreement.html
@@ -0,0 +1,73 @@
+<!-- INCLUDE overall_header.html -->
+
+<!-- IF S_SHOW_COPPA or S_REGISTRATION -->
+
+<!-- IF S_LANG_OPTIONS -->
+<script type="text/javascript">
+// <![CDATA[
+ /**
+ * Change language
+ */
+ function change_language(lang_iso)
+ {
+ document.forms['register'].change_lang.value = lang_iso;
+ document.forms['register'].submit();
+ }
+
+// ]]>
+</script>
+
+ <form method="post" action="{S_UCP_ACTION}" id="register">
+ <p class="rightside">
+ <label for="lang">{L_LANGUAGE}:</label><select name="lang" id="lang" onchange="change_language(this.value); return false;" title="{L_LANGUAGE}">{S_LANG_OPTIONS}</select>
+ {S_HIDDEN_FIELDS}
+ </p>
+ </form>
+
+ <div class="clear"></div>
+
+<!-- ENDIF -->
+
+ <form method="post" action="{S_UCP_ACTION}" id="agreement">
+
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="content">
+ <h2>{SITENAME} - {L_REGISTRATION}</h2>
+ <p><!-- IF S_SHOW_COPPA -->{L_COPPA_BIRTHDAY}<!-- ELSE -->{L_TERMS_OF_USE}<!-- ENDIF --></p>
+ </div>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <fieldset class="submit-buttons">
+ <!-- IF S_SHOW_COPPA -->
+ <strong><a href="{U_COPPA_NO}" class="button1">{L_COPPA_NO}</a></strong>&nbsp; <a href="{U_COPPA_YES}" class="button2">{L_COPPA_YES}</a>
+ <!-- ELSE -->
+ <input type="submit" name="agreed" id="agreed" value="{L_AGREE}" class="button1" />&nbsp;
+ <input type="submit" name="not_agreed" value="{L_NOT_AGREE}" class="button2" />
+ <!-- ENDIF -->
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ </fieldset>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ </form>
+
+<!-- ELSEIF S_AGREEMENT -->
+
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="content">
+ <h2>{SITENAME} - {AGREEMENT_TITLE}</h2>
+ <p>{AGREEMENT_TEXT}</p>
+ <hr class="dashed" />
+ <p><a href="{U_BACK}" class="button2">{L_BACK}</a></p>
+ </div>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html
new file mode 100644
index 0000000000..8052fdc435
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_attachments.html
@@ -0,0 +1,78 @@
+<!-- INCLUDE ucp_header.html -->
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<h2>{L_TITLE}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_ATTACHMENTS_EXPLAIN}</p>
+
+ <!-- IF .attachrow -->
+ <ul class="linklist">
+ <li class="rightside pagination">
+ <!-- IF TOTAL_ATTACHMENTS -->{TOTAL_ATTACHMENTS} {L_TITLE}<!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+
+ <ul class="topiclist">
+ <li class="header">
+ <dl>
+ <dt style="width: 40%"><a href="{U_SORT_FILENAME}">{L_FILENAME}</a></dt>
+ <dd class="extra"><a href="{U_SORT_DOWNLOADS}">{L_DOWNLOADS}</a></dd>
+ <dd class="time"><span><a href="{U_SORT_POST_TIME}">{L_POST_TIME}</a></span></dd>
+ <dd class="mark">{L_MARK}</dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist">
+
+ <!-- BEGIN attachrow -->
+ <li class="row<!-- IF attachrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl>
+ <dt style="width: 40%"><a href="{attachrow.U_VIEW_ATTACHMENT}" class="topictitle">{attachrow.FILENAME}</a> ({attachrow.SIZE})<br />
+ <!-- IF attachrow.S_IN_MESSAGE -->{L_PM}: <!-- ELSE -->{L_TOPIC}: <!-- ENDIF --><a href="{attachrow.U_VIEW_TOPIC}">{attachrow.TOPIC_TITLE}</a></dt>
+ <dd class="extra">{attachrow.DOWNLOAD_COUNT}</dd>
+ <dd class="time"><span>{attachrow.POST_TIME}</span></dd>
+ <dd class="mark"><input type="checkbox" name="attachment[{attachrow.ATTACH_ID}]" value="1" /></dd>
+ </dl>
+ </li>
+ <!-- END attachrow -->
+ </ul>
+
+ <fieldset class="display-options">
+ <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <label for="sk">{L_SORT_BY}: <select name="sk" id="sk">{S_SORT_OPTIONS}</select></label>
+ <label><select name="sd" id="sd">{S_ORDER_SELECT}</select></label>
+ <input class="button2" type="submit" name="sort" value="{L_SORT}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+
+ <hr />
+
+ <ul class="linklist">
+ <li class="rightside pagination">
+ <!-- IF TOTAL_ATTACHMENTS -->{TOTAL_ATTACHMENTS} {L_TITLE}<!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+ <!-- ELSE -->
+ <p><strong>{L_UCP_NO_ATTACHMENTS}</strong></p>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- IF S_ATTACHMENT_ROWS -->
+ <fieldset class="display-actions">
+ <input class="button2" type="submit" name="delete" value="{L_DELETE_MARKED}" />
+ <div><a href="#" onclick="marklist('ucp', 'attachment', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('ucp', 'attachment', false); return false;">{L_UNMARK_ALL}</a></div>
+ {S_FORM_TOKEN}
+ </fieldset>
+<!-- ENDIF -->
+</form>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options.html b/phpBB/styles/prosilver/template/ucp_avatar_options.html
new file mode 100644
index 0000000000..57aa82ca7b
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_avatar_options.html
@@ -0,0 +1,70 @@
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <!-- IF not S_AVATARS_ENABLED -->
+ <p>{L_AVATAR_FEATURES_DISABLED}</p>
+ <!-- ENDIF -->
+
+ <fieldset>
+ <!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
+ <dl>
+ <dt><label>{L_CURRENT_IMAGE}:</label><br /><span>{L_AVATAR_EXPLAIN}</span></dt>
+ <dd><!-- IF AVATAR -->{AVATAR}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF --></dd>
+ <dd><label for="delete"><input type="checkbox" name="delete" id="delete" /> {L_DELETE_AVATAR}</label></dd>
+ </dl>
+
+ <!-- IF S_UPLOAD_AVATAR_FILE -->
+ <dl>
+ <dt><label for="uploadfile">{L_UPLOAD_AVATAR_FILE}:</label></dt>
+ <dd><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" /><input type="file" name="uploadfile" id="uploadfile" class="inputbox autowidth" /></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF S_UPLOAD_AVATAR_URL -->
+ <dl>
+ <dt><label for="uploadurl">{L_UPLOAD_AVATAR_URL}:</label><br /><span>{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></dt>
+ <dd><input type="text" name="uploadurl" id="uploadurl" value="{AVATAR_URL}" class="inputbox" /></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF S_LINK_AVATAR -->
+ <dl>
+ <dt><label for="remotelink">{L_LINK_REMOTE_AVATAR}:</label><br /><span>{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></dt>
+ <dd><input type="text" name="remotelink" id="remotelink" value="{AVATAR_REMOTE}" class="inputbox" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="width">{L_LINK_REMOTE_SIZE}:</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></dt>
+ <dd>
+ <label for="width"><input type="text" name="width" id="width" size="3" value="{AVATAR_WIDTH}" class="inputbox autowidth" /> px</label> &times;&nbsp;
+ <label for="height"><input type="text" name="height" id="height" size="3" value="{AVATAR_HEIGHT}" class="inputbox autowidth" /> px</label>
+ </dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+
+ <!-- IF S_IN_AVATAR_GALLERY -->
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_AVATAR_GALLERY}</h3>
+
+ <fieldset>
+ <label for="category">{L_AVATAR_CATEGORY}: <select name="category" id="category">{S_CAT_OPTIONS}</select></label>
+ <input type="submit" value="{L_GO}" name="display_gallery" class="button2" />
+ <input type="submit" name="cancel" value="{L_CANCEL}" class="button2" />
+ </fieldset>
+
+ <div id="gallery">
+ <!-- BEGIN avatar_row --><!-- BEGIN avatar_column -->
+ <label for="av-{avatar_row.S_ROW_COUNT}-{avatar_row.avatar_column.S_ROW_COUNT}"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" alt="" /><br />
+ <input type="radio" name="avatar_select" id="av-{avatar_row.S_ROW_COUNT}-{avatar_row.avatar_column.S_ROW_COUNT}" value="{avatar_row.avatar_column.AVATAR_FILE}" /></label>
+ <!-- END avatar_column --><!-- END avatar_row -->
+ </div>
+
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
diff --git a/phpBB/styles/prosilver/template/ucp_footer.html b/phpBB/styles/prosilver/template/ucp_footer.html
new file mode 100644
index 0000000000..4b3b14b4b7
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_footer.html
@@ -0,0 +1,15 @@
+
+ </div>
+ <div class="clear"></div>
+
+ </div>
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+<!-- IF S_COMPOSE_PM -->
+<div>{S_FORM_TOKEN}</div>
+</form>
+<!-- ENDIF -->
+
+<!-- INCLUDE jumpbox.html -->
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_groups_manage.html b/phpBB/styles/prosilver/template/ucp_groups_manage.html
new file mode 100644
index 0000000000..2171250621
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_groups_manage.html
@@ -0,0 +1,232 @@
+<!-- INCLUDE ucp_header.html -->
+
+<h2<!-- IF GROUP_COLOR --> style="color:#{GROUP_COLOR};"<!-- ENDIF -->>{L_USERGROUPS}<!-- IF GROUP_NAME --> :: {GROUP_NAME}<!-- ENDIF --></h2>
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_GROUPS_EXPLAIN}</p>
+
+ <!-- IF S_EDIT -->
+ <h3>{L_GROUP_DETAILS}</h3>
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <fieldset>
+ <dl>
+ <dt><label for="group_name">{L_GROUP_NAME}:</label></dt>
+ <dd><!-- IF S_SPECIAL_GROUP --><strong<!-- IF GROUP_COLOUR --> style="color: #{GROUP_COLOUR};"<!-- ENDIF -->>{GROUP_NAME}</strong> <input name="group_name" type="hidden" value="{GROUP_INTERNAL_NAME}" />
+ <!-- ELSE --><input name="group_name" type="text" id="group_name" value="{GROUP_INTERNAL_NAME}" class="inputbox" /><!-- ENDIF --></dd>
+ </dl>
+ <dl>
+ <dt><label for="group_desc">{L_GROUP_DESC}:</label></dt>
+ <dd><textarea id="group_desc" name="group_desc" rows="5" cols="45" class="inputbox">{GROUP_DESC}</textarea></dd>
+ <dd><label for="desc_parse_bbcode"><input type="checkbox" class="radio" name="desc_parse_bbcode" id="desc_parse_bbcode"<!-- IF S_DESC_BBCODE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_BBCODE}</label>&nbsp;<label for="desc_parse_smilies"><input type="checkbox" class="radio" name="desc_parse_smilies" id="desc_parse_smilies"<!-- IF S_DESC_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES}</label>&nbsp;<label for="desc_parse_urls"><input type="checkbox" class="radio" name="desc_parse_urls" id="desc_parse_urls"<!-- IF S_DESC_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS}</label></dd>
+ </dl>
+ <!-- IF not S_SPECIAL_GROUP -->
+ <dl>
+ <dt><label for="group_type1">{L_GROUP_TYPE}:</label><br /><span>{L_GROUP_TYPE_EXPLAIN}</span></dt>
+ <dd>
+ <label for="group_type1"><input type="radio" class="radio" name="group_type" id="group_type1" value="{GROUP_TYPE_FREE}"{GROUP_FREE} /> {L_GROUP_OPEN}</label>
+ <label for="group_type2"><input type="radio" class="radio" name="group_type" id="group_type2" value="{GROUP_TYPE_OPEN}"{GROUP_OPEN} /> {L_GROUP_REQUEST}</label>
+ <label for="group_type3"><input type="radio" class="radio" name="group_type" id="group_type3" value="{GROUP_TYPE_CLOSED}"{GROUP_CLOSED} /> {L_GROUP_CLOSED}</label>
+ <label for="group_type4"><input type="radio" class="radio" name="group_type" id="group_type4" value="{GROUP_TYPE_HIDDEN}"{GROUP_HIDDEN} /> {L_GROUP_HIDDEN}</label>
+ </dd>
+ </dl>
+ <!-- ELSE -->
+ <input name="group_type" type="hidden" value="{GROUP_TYPE_SPECIAL}" />
+ <!-- ENDIF -->
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <h3>{L_GROUP_SETTINGS_SAVE}</h3>
+
+ <fieldset>
+ <dl>
+ <dt><label for="group_colour">{L_GROUP_COLOR}:</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></dt>
+ <dd><input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="7" maxlength="7" class="inputbox narrow" /> <span style="background-color: {GROUP_COLOUR};">&nbsp;&nbsp;&nbsp;</span> [ <a href="{U_SWATCH}" onclick="popup(this.href, 636, 150, '_swatch'); return false;">{L_COLOUR_SWATCH}</a> ]</dd>
+ </dl>
+ <dl>
+ <dt><label for="group_rank">{L_GROUP_RANK}:</label></dt>
+ <dd><select name="group_rank" id="group_rank">{S_RANK_OPTIONS}</select></dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- INCLUDE ucp_avatar_options.html -->
+
+<fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}
+ <!-- IF S_DISPLAY_GALLERY --><input type="submit" name="display_gallery" value="{L_DISPLAY_GALLERY}" class="button2" />&nbsp; <!-- ENDIF -->
+ <!-- IF S_IN_AVATAR_GALLERY --><input type="submit" name="cancel" value="{L_CANCEL}" class="button2" />&nbsp; <!-- ELSE -->
+ <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp; <!-- ENDIF -->
+ <input type="submit" name="update" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+</fieldset>
+
+<!-- ELSEIF S_LIST -->
+
+ <!-- IF .leader -->
+ <table class="table1" cellspacing="1">
+ <thead>
+ <tr>
+ <th class="name">{L_GROUP_LEAD}</th>
+ <th class="info">{L_GROUP_DEFAULT}</th>
+ <th class="posts">{L_POSTS}</th>
+ <th class="joined">{L_JOINED}</th>
+ <th class="mark">{L_MARK}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN leader -->
+ <tr class="<!-- IF leader.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <td class="name">{leader.USERNAME_FULL}</td>
+ <td><!-- IF leader.S_GROUP_DEFAULT -->{L_YES}<!-- ELSE -->{L_NO}<!-- ENDIF --></td>
+ <td class="posts">{leader.USER_POSTS}</td>
+ <td class="joined">{leader.JOINED}</td>
+ <td class="mark">&nbsp;</td>
+ </tr>
+ <!-- END leader -->
+ </tbody>
+ </table>
+ <!-- ENDIF -->
+
+ <!-- BEGIN member -->
+ <!-- IF member.S_PENDING -->
+ <table class="table1" cellspacing="1">
+ <thead>
+ <tr>
+ <th class="name">{L_GROUP_PENDING}</th>
+ <th class="info">{L_GROUP_DEFAULT}</th>
+ <th class="posts">{L_POSTS}</th>
+ <th class="joined">{L_JOINED}</th>
+ <th class="mark">{L_MARK}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- ELSEIF member.S_APPROVED -->
+ <!-- IF member.S_PENDING_SET -->
+ </tbody>
+ </table>
+ <!-- ENDIF -->
+ <table class="table1" cellspacing="1">
+ <thead>
+ <tr>
+ <th class="name">{L_GROUP_APPROVED}</th>
+ <th class="info">{L_GROUP_DEFAULT}</th>
+ <th class="posts">{L_POSTS}</th>
+ <th class="joined">{L_JOINED}</th>
+ <th class="mark">{L_MARK}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- ELSE -->
+ <tr class="<!-- IF member.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <td class="name">{member.USERNAME_FULL}</td>
+ <td><!-- IF member.S_GROUP_DEFAULT -->{L_YES}<!-- ELSE -->{L_NO}<!-- ENDIF --></td>
+ <td class="posts">{member.USER_POSTS}</td>
+ <td class="joined">{member.JOINED}</td>
+ <td class="mark"><input type="checkbox" name="mark[]" value="{member.USER_ID}" /></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- BEGINELSE -->
+ <tr>
+ <td class="bg1" colspan="5">{L_GROUPS_NO_MEMBERS}</td>
+ </tr>
+ <!-- END member -->
+ </tbody>
+ </table>
+
+ <ul class="linklist">
+ <li class="leftside pagination">
+ <!-- IF PAGINATION --><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span><!-- ELSE -->{S_ON_PAGE}<!-- ENDIF -->
+ </li>
+ </ul>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="display-actions">
+ <select name="action"><option value="">{L_SELECT_OPTION}</option>{S_ACTION_OPTIONS}</select>
+ <input class="button2" type="submit" name="update" value="{L_SUBMIT}" />
+ <div><a href="#" onclick="marklist('ucp', 'mark', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('ucp', 'mark', false); return false;">{L_UNMARK_ALL}</a></div>
+</fieldset>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>{L_ADD_USERS}</h3>
+
+ <p>{L_ADD_USERS_UCP_EXPLAIN}</p>
+
+ <fieldset>
+ <dl>
+ <dt><label for="default0">{L_USER_GROUP_DEFAULT}:</label><br /><span>{L_USER_GROUP_DEFAULT_EXPLAIN}</span></dt>
+ <dd>
+ <label for="default1"><input type="radio" name="default" id="default1" value="1" /> {L_YES}</label>
+ <label for="default0"><input type="radio" name="default" id="default0" value="0" checked="checked" /> {L_NO}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="usernames">{L_USERNAME}:</label><br /><span>{L_USERNAMES_EXPLAIN}</span></dt>
+ <dd><textarea name="usernames" id="usernames" rows="3" cols="30" class="inputbox"></textarea></dd>
+ <dd><strong><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></strong></dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="submit-buttons">
+ <input class="button1" type="submit" name="addusers" value="{L_SUBMIT}" />
+ {S_FORM_TOKEN}
+</fieldset>
+
+<!-- ELSE -->
+
+ <!-- IF .leader -->
+ <ul class="topiclist">
+ <li class="header">
+ <dl>
+ <dt>{L_GROUP_LEADER}</dt>
+ <dd class="info"><span>{L_OPTIONS}</span></dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist">
+
+ <!-- BEGIN leader -->
+ <li class="row<!-- IF attachrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl>
+ <dt><a href="{leader.U_EDIT}" class="topictitle"<!-- IF leader.GROUP_COLOUR --> style="color: #{leader.GROUP_COLOUR};"<!-- ENDIF -->>{leader.GROUP_NAME}</a>
+ <!-- IF leader.GROUP_DESC --><br />{leader.GROUP_DESC}<!-- ENDIF --></dt>
+ <dd class="option"><span><a href="{leader.U_EDIT}" >{L_EDIT}</a></span></dd>
+ <dd class="option"><span><a href="{leader.U_LIST}">{L_GROUP_LIST}</a></span></dd>
+ </dl>
+ </li>
+ <!-- END leader -->
+ </ul>
+ <!-- ELSE -->
+ <p><strong>{L_NO_LEADERS}</strong></p>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- ENDIF -->
+</form>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_groups_membership.html b/phpBB/styles/prosilver/template/ucp_groups_membership.html
new file mode 100644
index 0000000000..a147dbf89f
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_groups_membership.html
@@ -0,0 +1,164 @@
+<!-- INCLUDE ucp_header.html -->
+
+<h2>{L_USERGROUPS}</h2>
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_GROUPS_EXPLAIN}</p>
+ <!-- DEFINE $SHOW_BUTTONS = 0 -->
+ <!-- IF .leader -->
+ <ul class="topiclist">
+ <li class="header">
+ <dl>
+ <dt>{L_GROUP_LEADER}</dt>
+ <dd class="mark">{L_SELECT}</dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist">
+
+ <!-- BEGIN leader -->
+ <!-- IF not leader.GROUP_SPECIAL -->
+ <!-- DEFINE $SHOW_BUTTONS = 1 -->
+ <!-- ENDIF -->
+ <li class="row<!-- IF leader.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl>
+ <dt><!-- IF S_CHANGE_DEFAULT --><input title="{L_CHANGE_DEFAULT_GROUP}" type="radio" name="default"<!-- IF leader.S_GROUP_DEFAULT --> checked="checked"<!-- ENDIF --> value="{leader.GROUP_ID}" /> <!-- ENDIF -->
+ <a href="{leader.U_VIEW_GROUP}" class="forumtitle"<!-- IF leader.GROUP_COLOUR --> style="color:#{leader.GROUP_COLOUR}"<!-- ENDIF -->>{leader.GROUP_NAME}</a>
+ <!-- IF leader.GROUP_DESC --><br />{leader.GROUP_DESC}<!-- ENDIF -->
+ <!-- IF not leader.GROUP_SPECIAL --><br /><i>{leader.GROUP_STATUS}</i><!-- ENDIF -->
+ </dt>
+ <dd class="mark"><input type="radio" name="selected" value="{leader.GROUP_ID}" <!-- IF leader.GROUP_SPECIAL -->disabled="disabled"<!-- ENDIF --> /></dd>
+ </dl>
+ </li>
+ <!-- END leader -->
+ </ul>
+ <!-- ENDIF -->
+
+ <!-- IF .member -->
+ <ul class="topiclist">
+ <li class="header">
+ <dl>
+ <dt>{L_GROUP_MEMBER}</dt>
+ <dd class="mark">{L_SELECT}</dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist">
+
+ <!-- BEGIN member -->
+ <!-- IF not member.GROUP_SPECIAL -->
+ <!-- DEFINE $SHOW_BUTTONS = 1 -->
+ <!-- ENDIF -->
+ <li class="row<!-- IF member.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl>
+ <dt><!-- IF S_CHANGE_DEFAULT --><input title="{L_CHANGE_DEFAULT_GROUP}" type="radio" name="default"<!-- IF member.S_GROUP_DEFAULT --> checked="checked"<!-- ENDIF --> value="{member.GROUP_ID}" /> <!-- ENDIF -->
+ <a href="{member.U_VIEW_GROUP}" class="forumtitle"<!-- IF member.GROUP_COLOUR --> style="color:#{member.GROUP_COLOUR}"<!-- ENDIF -->>{member.GROUP_NAME}</a>
+ <!-- IF member.GROUP_DESC --><br />{member.GROUP_DESC}<!-- ENDIF -->
+ <!-- IF not member.GROUP_SPECIAL --><br /><i>{member.GROUP_STATUS}</i><!-- ENDIF -->
+ </dt>
+ <dd class="mark"><input type="radio" name="selected" value="{member.GROUP_ID}" <!-- IF member.GROUP_SPECIAL -->disabled="disabled"<!-- ENDIF --> /></dd>
+ </dl>
+ </li>
+ <!-- END member -->
+ </ul>
+ <!-- ENDIF -->
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- IF .pending -->
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <ul class="topiclist">
+ <li class="header">
+ <dl>
+ <dt>{L_GROUP_PENDING}</dt>
+ <dd class="mark">{L_SELECT}</dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist">
+
+ <!-- BEGIN pending -->
+ <!-- IF not pending.GROUP_SPECIAL -->
+ <!-- DEFINE $SHOW_BUTTONS = 1 -->
+ <!-- ENDIF -->
+ <li class="row<!-- IF pending.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl>
+ <dt>
+ <a href="{pending.U_VIEW_GROUP}" class="forumtitle"<!-- IF pending.GROUP_COLOUR --> style="color:#{pending.GROUP_COLOUR}"<!-- ENDIF -->>{pending.GROUP_NAME}</a>
+ <!-- IF pending.GROUP_DESC --><br />{pending.GROUP_DESC}<!-- ENDIF -->
+ <!-- IF not pending.GROUP_SPECIAL --><br /><i>{pending.GROUP_STATUS}</i><!-- ENDIF -->
+ </dt>
+ <dd class="mark"><input type="radio" name="selected" value="{pending.GROUP_ID}" <!-- IF pending.GROUP_SPECIAL -->disabled="diabled"<!-- ENDIF --> /></dd>
+ </dl>
+ </li>
+ <!-- END pending -->
+ </ul>
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+<!-- ENDIF -->
+<!-- IF .nonmember -->
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <ul class="topiclist">
+ <li class="header">
+ <dl>
+ <dt>{L_GROUP_NONMEMBER}</dt>
+ <dd class="mark">{L_SELECT}</dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist">
+
+ <!-- BEGIN nonmember -->
+ <!-- IF nonmember.S_CAN_JOIN -->
+ <!-- DEFINE $SHOW_BUTTONS = 1 -->
+ <!-- ENDIF -->
+ <li class="row<!-- IF nonmember.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl>
+ <dt>
+ <a href="{nonmember.U_VIEW_GROUP}" class="forumtitle"<!-- IF nonmember.GROUP_COLOUR --> style="color:#{nonmember.GROUP_COLOUR}"<!-- ENDIF -->>{nonmember.GROUP_NAME}</a>
+ <!-- IF nonmember.GROUP_DESC --><br />{nonmember.GROUP_DESC}<!-- ENDIF -->
+ <!-- IF not nonmember.GROUP_SPECIAL --><br /><i>{nonmember.GROUP_STATUS}</i><!-- ENDIF -->
+ </dt>
+ <dd class="mark"><input type="radio" name="selected" value="{nonmember.GROUP_ID}" <!-- IF not nonmember.S_CAN_JOIN -->disabled="disabled"<!-- ENDIF --> /></dd>
+ </dl>
+ </li>
+ <!-- END nonmember -->
+ </ul>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+<!-- ENDIF -->
+
+
+ <!-- IF S_CHANGE_DEFAULT or $SHOW_BUTTONS eq 1 -->
+ <fieldset>
+ <!-- IF S_CHANGE_DEFAULT -->
+ <div class="left-box">
+ <input class="button2" type="submit" name="change_default" value="{L_CHANGE_DEFAULT_GROUP}" />
+ {S_FORM_TOKEN}
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF $SHOW_BUTTONS eq 1 -->
+ <div class="right-box">
+ <label for="action">{L_SELECT}:</label>
+ <select name="action" id="action">
+ <option value="join">{L_JOIN_SELECTED}</option>
+ <option value="resign">{L_RESIGN_SELECTED}</option>
+ <option value="demote">{L_DEMOTE_SELECTED}</option>
+ </select>&nbsp;
+ <input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
+ {S_FORM_TOKEN}
+ </div>
+ <!-- ENDIF -->
+ </fieldset>
+ <!-- ENDIF -->
+
+</form>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_header.html b/phpBB/styles/prosilver/template/ucp_header.html
new file mode 100644
index 0000000000..4d008564c4
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_header.html
@@ -0,0 +1,101 @@
+<!-- INCLUDE overall_header.html -->
+
+<h2>{L_UCP}</h2>
+
+<div id="tabs">
+ <ul>
+ <!-- BEGIN t_block1 -->
+ <li <!-- IF t_block1.S_SELECTED -->class="activetab"<!-- ENDIF -->><a href="{t_block1.U_TITLE}"><span>{t_block1.L_TITLE}</span></a></li>
+ <!-- END t_block1 -->
+ </ul>
+</div>
+
+<!-- IF S_COMPOSE_PM -->
+<form id="postform" method="post" action="{S_POST_ACTION}"{S_FORM_ENCTYPE}>
+<!-- ENDIF -->
+
+<div class="panel bg3">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div style="width: 100%;">
+
+ <div id="cp-menu">
+ <div id="navigation">
+
+ <!-- IF S_PRIVMSGS -->
+ <!-- BEGIN t_block2 -->
+ <!-- IF S_PRIVMSGS and not t_block2.S_LAST_ROW -->
+ <ul>
+ <!-- IF t_block2.S_SELECTED -->
+ <li id="active-subsection"><a href="{t_block2.U_TITLE}"><span>{t_block2.L_TITLE}</span></a></li>
+ <!-- ELSE -->
+ <li><a href="{t_block2.U_TITLE}"><span>{t_block2.L_TITLE}</span></a></li>
+ <!-- ENDIF -->
+ </ul>
+ <!-- ENDIF -->
+ <!-- END t_block2 -->
+
+ <hr />
+ <!-- BEGIN folder -->
+ <!-- IF folder.S_FIRST_ROW --><ul><!-- ENDIF -->
+ <!-- IF folder.S_CUR_FOLDER -->
+ <li id="active-subsection"><a href="{folder.U_FOLDER}"><!-- IF folder.UNREAD_MESSAGES > 0 --><strong>{folder.FOLDER_NAME} ({folder.UNREAD_MESSAGES})</strong><!-- ELSE -->{folder.FOLDER_NAME}<!-- ENDIF --></a></li>
+ <!-- ELSE -->
+ <li><a href="{folder.U_FOLDER}"><span><!-- IF folder.UNREAD_MESSAGES > 0 --><strong>{folder.FOLDER_NAME} ({folder.UNREAD_MESSAGES})</strong><!-- ELSE -->{folder.FOLDER_NAME}<!-- ENDIF --></span></a></li>
+ <!-- ENDIF -->
+ <!-- IF folder.S_LAST_ROW --></ul><!-- ENDIF -->
+ <!-- END folder -->
+ <hr />
+ <!-- ENDIF -->
+
+ <ul>
+ <!-- BEGIN t_block2 -->
+ <!-- IF (S_PRIVMSGS and t_block2.S_LAST_ROW) or not S_PRIVMSGS -->
+ <!-- IF t_block2.S_SELECTED -->
+ <li id="active-subsection"><a href="{t_block2.U_TITLE}"><span>{t_block2.L_TITLE}</span></a></li>
+ <!-- ELSE -->
+ <li><a href="{t_block2.U_TITLE}"><span>{t_block2.L_TITLE}</span></a></li>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+ <!-- END t_block2 -->
+ </ul>
+ </div>
+
+ <!-- IF .friends_online or .friends_offline -->
+ <div class="cp-mini">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <dl class="mini">
+ <dt>{L_FRIENDS}</dt>
+
+ <!-- BEGIN friends_online -->
+ <dd class="friend-online" title="{L_FRIENDS_ONLINE}">{friends_online.USERNAME_FULL} <!-- IF S_SHOW_PM_BOX --> <input type="submit" name="add_to[{friends_online.USER_ID}]" value="{L_ADD}" class="button2" /><!-- ENDIF --><!-- IF friends_online.S_LAST_ROW and .friends_offline --><hr /><!-- ENDIF --></dd>
+ <!-- END friends_online -->
+
+ <!-- BEGIN friends_offline -->
+ <dd class="friend-offline" title="{L_FRIENDS_OFFLINE}">{friends_offline.USERNAME_FULL} <!-- IF S_SHOW_PM_BOX --><input type="submit" name="add_to[{friends_offline.USER_ID}]" value="{L_ADD}" class="button2" /><!-- ENDIF --></dd>
+ <!-- END friends_offline -->
+ </dl>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF S_SHOW_COLOUR_LEGEND -->
+ <div class="cp-mini">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <dl class="mini">
+ <dt>{L_MESSAGE_COLOURS}</dt>
+ <!-- BEGIN pm_colour_info -->
+ <dd class="pm-legend<!-- IF pm_colour_info.CLASS --> {pm_colour_info.CLASS}<!-- ENDIF -->"><!-- IF pm_colour_info.IMG -->{pm_colour_info.IMG} <!-- ENDIF -->{pm_colour_info.LANG}</dd>
+ <!-- END pm_colour_info -->
+ </dl>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
+
+ </div>
+
+ <div id="cp-main" class="ucp-main">
diff --git a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
new file mode 100644
index 0000000000..9d7c4ce1aa
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
@@ -0,0 +1,75 @@
+<!-- INCLUDE ucp_header.html -->
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<h2>{L_TITLE}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_BOOKMARKS_EXPLAIN}</p>
+
+<!-- IF S_NO_DISPLAY_BOOKMARKS -->
+ <p class="error">{L_BOOKMARKS_DISABLED}</p>
+<!-- ELSE -->
+
+<!-- IF .topicrow -->
+ <ul class="topiclist">
+ <li class="header">
+ <dl class="icon">
+ <dt>{L_BOOKMARKS}</dt>
+ <dd class="lastpost"><span>{L_LAST_POST}</span></dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist">
+
+ <!-- BEGIN topicrow -->
+ <li class="row<!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ELSEIF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <!-- IF topicrow.S_DELETED_TOPIC -->
+ <dl><dt><strong>{L_DELETED_TOPIC}</strong></dt>
+ <dd class="mark"><input type="checkbox" name="t[{topicrow.TOPIC_ID}]" id="t{topicrow.TOPIC_ID}" /></dd>
+ </dl>
+ <!-- ELSE -->
+ <dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
+ <dt<!-- IF topicrow.TOPIC_ICON_IMG --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
+ <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
+ <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
+ <!-- IF topicrow.PAGINATION --><strong class="pagination"><span>{topicrow.PAGINATION}</span></strong><!-- ENDIF -->
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+ </dt>
+ <dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
+ <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{topicrow.LAST_POST_TIME}</span>
+ </dd>
+ <dd class="mark"><input type="checkbox" name="t[{topicrow.TOPIC_ID}]" id="t{topicrow.TOPIC_ID}" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ </li>
+ <!-- END topicrow -->
+ </ul>
+ <ul class="linklist">
+ <li class="rightside pagination">
+ <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} <!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+<!-- ELSE -->
+ <p><strong>{L_NO_BOOKMARKS}</strong></p>
+<!-- ENDIF -->
+
+<!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- IF .topicrow and not S_NO_DISPLAY_BOOKMARKS -->
+ <fieldset class="display-actions">
+ <input type="submit" name="unbookmark" value="{L_REMOVE_BOOKMARK_MARKED}" class="button2" />
+ <div><a href="#" onclick="marklist('ucp', '', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('ucp', '', false); return false;">{L_UNMARK_ALL}</a></div>
+ {S_FORM_TOKEN}
+ </fieldset>
+<!-- ENDIF -->
+</form>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_main_drafts.html b/phpBB/styles/prosilver/template/ucp_main_drafts.html
new file mode 100644
index 0000000000..dffe0a37ef
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_main_drafts.html
@@ -0,0 +1,73 @@
+<!-- INCLUDE ucp_header.html -->
+
+<form id="postform" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<h2>{L_TITLE}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_DRAFTS_EXPLAIN}</p>
+
+<!-- IF S_EDIT_DRAFT -->
+
+ <!-- INCLUDE posting_editor.html -->
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="submit" value="{L_SAVE}" class="button1" />
+ {S_FORM_TOKEN}
+ </fieldset>
+
+<!-- ELSE -->
+
+ <!-- IF .draftrow -->
+ <ul class="topiclist">
+ <li class="header">
+ <dl>
+ <dt>{L_DRAFT_TITLE}</dt>
+ <dd class="info"><span>{L_SAVE_DATE}</span></dd>
+ <dd class="mark">{L_MARK}</dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist">
+
+ <!-- BEGIN draftrow -->
+ <li class="row<!-- IF draftrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl>
+ <dt>
+ <a class="topictitle" href="{draftrow.U_VIEW_EDIT}">{draftrow.DRAFT_SUBJECT}</a><br />
+ <!-- IF draftrow.S_LINK_TOPIC -->{L_TOPIC}: <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a>
+ <!-- ELSEIF draftrow.S_LINK_FORUM -->{L_FORUM}: <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a>
+ <!-- ELSEIF S_PRIVMSGS -->
+ <!-- ELSE -->{L_NO_TOPIC_FORUM}<!-- ENDIF -->
+ </dt>
+ <dd class="info"><span>{draftrow.DATE}<br /><!-- IF draftrow.U_INSERT --><a href="{draftrow.U_INSERT}">{L_LOAD_DRAFT}</a> &bull; <!-- ENDIF --><a href="{draftrow.U_VIEW_EDIT}">{L_VIEW_EDIT}</a></span></dd>
+ <dd class="mark"><input type="checkbox" name="d[{draftrow.DRAFT_ID}]" id="d{draftrow.DRAFT_ID}" /></dd>
+ </dl>
+ </li>
+ <!-- END draftrow -->
+ </ul>
+ <!-- ELSE -->
+ <p><strong>{L_NO_SAVED_DRAFTS}</strong></p>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <!-- IF .draftrow -->
+ <fieldset class="display-actions">
+ <input class="button2" type="submit" name="delete" value="{L_DELETE_MARKED}" />
+ <div><a href="#" onclick="marklist('postform', '', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('postform', '', false); return false;">{L_UNMARK_ALL}</a></div>
+ {S_FORM_TOKEN}
+ </fieldset>
+ <!-- ENDIF -->
+
+<!-- ENDIF -->
+
+</form>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_main_front.html b/phpBB/styles/prosilver/template/ucp_main_front.html
new file mode 100644
index 0000000000..39c5d4f396
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_main_front.html
@@ -0,0 +1,45 @@
+<!-- INCLUDE ucp_header.html -->
+
+<h2>{L_TITLE}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_UCP_WELCOME}</p>
+
+<!-- IF .topicrow -->
+ <h3>{L_IMPORTANT_NEWS}</h3>
+
+ <ul class="topiclist cplist">
+ <!-- BEGIN topicrow -->
+ <li class="row<!-- IF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
+ <dt <!-- IF topicrow.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF -->>
+ <!-- IF topicrow.S_UNREAD --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><br />
+ <!-- IF topicrow.PAGINATION --><strong class="pagination"><span>{topicrow.PAGINATION}</span></strong><!-- ENDIF -->
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+ </dt>
+ <dd class="lastpost"><span>{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
+ <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{topicrow.LAST_POST_TIME}</span>
+ </dd>
+ </dl>
+ </li>
+ <!-- END topicrow -->
+ </ul>
+<!-- ENDIF -->
+
+ <h3>{L_YOUR_DETAILS}</h3>
+
+ <dl class="details">
+ <dt>{L_JOINED}:</dt> <dd>{JOINED}</dd>
+ <dt>{L_VISITED}:</dt> <dd>{LAST_VISIT_YOU}</dd>
+ <dt>{L_TOTAL_POSTS}:</dt> <dd><!-- IF POSTS_PCT -->{POSTS}<!-- IF S_DISPLAY_SEARCH --> | <strong><a href="{U_SEARCH_USER}">{L_SEARCH_YOUR_POSTS}</a></strong><!-- ENDIF --><br />({POSTS_DAY} / {POSTS_PCT})<!-- ELSE -->{POSTS}<!-- ENDIF --></dd>
+ <!-- IF ACTIVE_FORUM --><dt>{L_ACTIVE_IN_FORUM}:</dt> <dd><strong><a href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></strong><br />({ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT})</dd><!-- ENDIF -->
+ <!-- IF ACTIVE_TOPIC --><dt>{L_ACTIVE_IN_TOPIC}:</dt> <dd><strong><a href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></strong><br />({ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT})</dd><!-- ENDIF -->
+ <!-- IF WARNINGS --><dt>{L_YOUR_WARNINGS}:</dt> <dd class="error">{WARNING_IMG} [{WARNINGS}]</dd><!-- ENDIF -->
+ </dl>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
new file mode 100644
index 0000000000..210537ced8
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
@@ -0,0 +1,92 @@
+<!-- INCLUDE ucp_header.html -->
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<h2>{L_TITLE}</h2>
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_WATCHED_EXPLAIN}</p>
+
+<!-- IF .forumrow -->
+ <ul class="topiclist">
+ <li class="header">
+ <dl class="icon">
+ <dt>{L_WATCHED_FORUMS}</dt>
+ <dd class="lastpost">{L_LAST_POST}</dd>
+ <dd class="mark">{L_MARK}</dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist">
+
+ <!-- BEGIN forumrow -->
+ <li class="row<!-- IF forumrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl class="icon" style="background-image: url({forumrow.FORUM_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
+ <dt><a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a><br />{forumrow.FORUM_DESC}</dt>
+ <dd class="lastpost"><!-- IF forumrow.LAST_POST_TIME --><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {forumrow.LAST_POST_AUTHOR_FULL}
+ <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{forumrow.LAST_POST_TIME}</span>
+ <!-- ELSE -->{L_NO_POSTS}<br />&nbsp;<!-- ENDIF -->
+ </dd>
+ <dd class="mark"><input type="checkbox" name="f[{forumrow.FORUM_ID}]" id="f{forumrow.FORUM_ID}" /></dd>
+ </dl>
+ </li>
+ <!-- END forumrow -->
+ </ul>
+<!-- ELSEIF S_FORUM_NOTIFY -->
+ <p><strong>{L_NO_WATCHED_FORUMS}</strong></p>
+<!-- ENDIF -->
+
+<!-- IF .topicrow -->
+ <ul class="topiclist">
+ <li class="header">
+ <dl class="icon">
+ <dt>{L_WATCHED_TOPICS}</dt>
+ <dd class="lastpost">{L_LAST_POST}</dd>
+ <dd class="mark">{L_MARK}</dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist">
+
+ <!-- BEGIN topicrow -->
+ <li class="row<!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ELSEIF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
+ <dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
+ <dt<!-- IF topicrow.TOPIC_ICON_IMG --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
+ <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
+ <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
+ <!-- IF topicrow.PAGINATION --><strong class="pagination"><span>{topicrow.PAGINATION}</span></strong><!-- ENDIF -->
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+ </dt>
+ <dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
+ <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{topicrow.LAST_POST_TIME}</span>
+ </dd>
+ <dd class="mark"><input type="checkbox" name="t[{topicrow.TOPIC_ID}]" id="t{topicrow.TOPIC_ID}" /></dd>
+ </dl>
+ </li>
+ <!-- END topicrow -->
+ </ul>
+ <ul class="linklist">
+ <li class="rightside pagination">
+ <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} <!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ </ul>
+<!-- ELSEIF S_TOPIC_NOTIFY -->
+ <p><strong>{L_NO_WATCHED_TOPICS}</strong></p>
+<!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- IF .topicrow or .forumrow -->
+ <fieldset class="display-actions">
+ <input type="submit" name="unwatch" value="{L_UNWATCH_MARKED}" class="button2" />
+ <div><a href="#" onclick="marklist('ucp', 't', true); marklist('ucp', 'f', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('ucp', 't', false); marklist('ucp', 'f', false); return false;">{L_UNMARK_ALL}</a></div>
+ {S_FORM_TOKEN}
+ </fieldset>
+<!-- ENDIF -->
+</form>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_pm_history.html b/phpBB/styles/prosilver/template/ucp_pm_history.html
new file mode 100644
index 0000000000..88efcf95be
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_pm_history.html
@@ -0,0 +1,32 @@
+
+<h3 id="review">
+ <span class="right-box"><a href="#review" onclick="viewableArea(getElementById('topicreview'), true); var rev_text = getElementById('review').getElementsByTagName('a').item(0).firstChild; if (rev_text.data == '{LA_EXPAND_VIEW}'){rev_text.data = '{LA_COLLAPSE_VIEW}'; } else if (rev_text.data == '{LA_COLLAPSE_VIEW}'){rev_text.data = '{LA_EXPAND_VIEW}'};">{L_EXPAND_VIEW}</a></span>
+ {L_MESSAGE_HISTORY}: {HISTORY_TITLE}
+</h3>
+
+<div id="topicreview">
+ <!-- BEGIN history_row -->
+ <div class="post <!-- IF history_row.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="postbody" id="pr{history_row.MSG_ID}">
+ <!-- IF history_row.U_QUOTE or history_row.MESSAGE_AUTHOR_QUOTE -->
+ <ul class="profile-icons">
+ <li class="quote-icon"><a <!-- IF history_row.U_QUOTE -->href="{history_row.U_QUOTE}"<!-- ELSE -->href="#postingbox" onclick="addquote({history_row.MSG_ID}, '{history_row.MESSAGE_AUTHOR_QUOTE}');"<!-- ENDIF --> title="{L_QUOTE} {history_row.MESSAGE_AUTHOR}"><span>{L_QUOTE} {history_row.MESSAGE_AUTHOR}</span></a></li>
+ </ul>
+ <!-- ENDIF -->
+
+ <h3><a href="{history_row.U_VIEW_MESSAGE}" <!-- IF history_row.S_CURRENT_MSG -->class="current"<!-- ENDIF -->>{history_row.SUBJECT}</a></h3>
+ <p class="author">{history_row.MINI_POST_IMG} {L_SENT_AT}: <strong>{history_row.SENT_DATE}</strong><br />
+ {L_MESSAGE_BY_AUTHOR} {history_row.MESSAGE_AUTHOR_FULL}</p>
+ <div class="content">{history_row.MESSAGE}</div>
+ <div id="message_{history_row.MSG_ID}" style="display: none;">{history_row.DECODED_MESSAGE}</div>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- END history_row -->
+</div>
+
+<hr />
+<p><a href="#cp-main" class="top2">{L_BACK_TO_TOP}</a></p>
diff --git a/phpBB/styles/prosilver/template/ucp_pm_message_footer.html b/phpBB/styles/prosilver/template/ucp_pm_message_footer.html
new file mode 100644
index 0000000000..acf6f24af1
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_pm_message_footer.html
@@ -0,0 +1,2 @@
+<div>{S_FORM_TOKEN}</div>
+</form>
diff --git a/phpBB/styles/prosilver/template/ucp_pm_message_header.html b/phpBB/styles/prosilver/template/ucp_pm_message_header.html
new file mode 100644
index 0000000000..fcebab0868
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_pm_message_header.html
@@ -0,0 +1,35 @@
+<h2>{L_TITLE}<!-- IF CUR_FOLDER_NAME -->: {CUR_FOLDER_NAME}<!-- ENDIF --></h2>
+
+<div class="panel clearfix pm-panel-header<!-- IF S_VIEW_MESSAGE --> pm<!-- ENDIF -->">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <!-- IF FOLDER_STATUS and FOLDER_MAX_MESSAGES neq 0 --><p>{FOLDER_STATUS}</p><!-- ENDIF -->
+
+ <!-- IF U_POST_REPLY_PM or U_POST_NEW_TOPIC or U_FORWARD_PM -->
+ <div class="buttons">
+ <!-- IF U_POST_REPLY_PM --><div class="pmreply-icon clearfix"><a title="{L_POST_REPLY_PM}" href="{U_POST_REPLY_PM}"><span></span>{L_POST_REPLY_PM}</a></div>
+ <!-- ELSEIF U_POST_NEW_TOPIC --><div class="newpm-icon"><a href="{U_POST_NEW_TOPIC}" accesskey="n" title="{L_UCP_PM_COMPOSE}"><span></span>{L_UCP_PM_COMPOSE}</a></div><!-- ENDIF -->
+ <!-- IF U_FORWARD_PM --><div class="forwardpm-icon"><a title="{L_POST_FORWARD_PM}" href="{U_FORWARD_PM}"><span></span>{L_FORWARD_PM}</a></div><!-- ENDIF -->
+ </div>
+
+ <!-- IF U_POST_REPLY_PM and S_PM_RECIPIENTS gt 1 -->
+ <div class="reply-all"><a title="{L_REPLY_TO_ALL}" href="{U_POST_REPLY_ALL}">&raquo; {L_REPLY_TO_ALL}</a></div>
+ <!-- ENDIF -->
+
+ <!-- ENDIF -->
+
+ <!-- IF TOTAL_MESSAGES or S_VIEW_MESSAGE -->
+ <ul class="linklist pm-return-to">
+ <li class="rightside pagination">
+ <!-- IF S_VIEW_MESSAGE --><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_CURRENT_FOLDER}">{L_RETURN_TO} {CUR_FOLDER_NAME}</a><!-- ENDIF -->
+ <!-- IF FOLDER_CUR_MESSAGES neq 0 -->
+ <!-- IF TOTAL_MESSAGES -->{TOTAL_MESSAGES}<!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- ENDIF -->
+ </li>
+ </ul>
+ <!-- ENDIF -->
+ </div>
+</div>
+
+<form id="viewfolder" method="post" action="{S_PM_ACTION}">
diff --git a/phpBB/styles/prosilver/template/ucp_pm_options.html b/phpBB/styles/prosilver/template/ucp_pm_options.html
new file mode 100644
index 0000000000..a8693ac9b9
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_pm_options.html
@@ -0,0 +1,131 @@
+<!-- INCLUDE ucp_header.html -->
+
+<h2>{L_TITLE}</h2>
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}">
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <!-- IF ERROR_MESSAGE --><p class="error">{ERROR_MESSAGE}</p><!-- ENDIF -->
+ <!-- IF NOTIFICATION_MESSAGE --><p class="error">{NOTIFICATION_MESSAGE}</p><!-- ENDIF -->
+
+ <h3>{L_DEFINED_RULES}</h3>
+
+ <ol class="def-rules">
+ <!-- BEGIN rule -->
+ <li><div class="right-box"><input type="submit" name="delete_rule[{rule.RULE_ID}]" value="{L_DELETE_RULE}" class="button2" /></div><strong>{L_IF}</strong> {rule.CHECK} <em>{rule.RULE}</em> <!-- IF rule.STRING --><strong>{rule.STRING}</strong> | <!-- ENDIF -->{rule.ACTION}<!-- IF rule.FOLDER -->: {rule.FOLDER}<!-- ENDIF --><div style="clear: both;"></div></li>
+ <!-- BEGINELSE -->
+ <li><strong>{L_NO_RULES_DEFINED}</strong></li>
+ <!-- END rule -->
+ </ol>
+
+ <h3>{L_ADD_NEW_RULE}</h3>
+
+ <fieldset class="fields2">
+
+ <!-- IF S_CHECK_DEFINED -->
+ <dl>
+ <dt><label<!-- IF S_CHECK_SELECT --> for="check_option"<!-- ENDIF -->>{L_IF}:</label></dt>
+ <dd>
+ <!-- IF S_CHECK_SELECT --><select name="check_option" id="check_option">{S_CHECK_OPTIONS}</select> <input type="submit" name="next" value="{L_NEXT_STEP}" class="button2" /><!-- ELSE -->{CHECK_CURRENT}<input type="hidden" name="check_option" value="{CHECK_OPTION}" /><!-- ENDIF -->
+ </dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF S_RULE_DEFINED -->
+ <dl>
+ <dt><!-- IF S_RULE_SELECT --><input type="submit" name="back[rule]" value="{L_PREVIOUS_STEP}" class="button2" /><!-- ELSE --><label>&nbsp;</label><!-- ENDIF --></dt>
+ <dd><!-- IF S_RULE_SELECT --><select name="rule_option" id="rule_option">{S_RULE_OPTIONS}</select> <input type="submit" name="next" value="{L_NEXT_STEP}" class="button2" /><!-- ELSE --><em>{RULE_CURRENT}</em><input type="hidden" name="rule_option" value="{RULE_OPTION}" /><!-- ENDIF --></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF S_COND_DEFINED -->
+ <!-- IF S_COND_SELECT or COND_CURRENT -->
+ <dl>
+ <dt><!-- IF S_COND_SELECT --><input type="submit" name="back[cond]" value="{L_PREVIOUS_STEP}" class="button2" /><!-- ELSE --><label>&nbsp;</label><!-- ENDIF --></dt>
+ <dd>
+ <!-- IF S_COND_SELECT -->
+ <!-- IF S_TEXT_CONDITION -->
+ <input type="text" name="rule_string" value="{CURRENT_STRING}" class="inputbox medium" maxlength="250" />
+ <!-- ELSEIF S_USER_CONDITION -->
+ <input type="text" name="rule_string" value="{CURRENT_STRING}" class="inputbox tiny" />&nbsp;<span>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span>
+ <!-- ELSEIF S_GROUP_CONDITION -->
+ <input type="hidden" name="rule_string" value="{CURRENT_STRING}" /><!-- IF S_GROUP_OPTIONS --><select name="rule_group_id">{S_GROUP_OPTIONS}</select><!-- ELSE -->{L_NO_GROUPS}<!-- ENDIF -->
+ <!-- ENDIF -->
+ <input type="submit" name="next" value="{L_NEXT_STEP}" class="button2" />
+ <!-- ELSE -->
+ <strong>{COND_CURRENT}</strong><input type="hidden" name="rule_string" value="{CURRENT_STRING}" /><input type="hidden" name="rule_user_id" value="{CURRENT_USER_ID}" /><input type="hidden" name="rule_group_id" value="{CURRENT_GROUP_ID}" />
+ <!-- ENDIF -->
+ </dd>
+ </dl>
+ <!-- ENDIF -->
+ <input type="hidden" name="cond_option" value="{COND_OPTION}" />
+ <!-- ENDIF -->
+
+
+ <!-- IF NONE_CONDITION --><input type="hidden" name="cond_option" value="none" /><!-- ENDIF -->
+
+ <!-- IF S_ACTION_DEFINED -->
+ <dl>
+ <dt><!-- IF S_ACTION_SELECT --><input type="submit" name="back[action]" value="{L_PREVIOUS_STEP}" class="button2" /><!-- ELSE --><label>&nbsp;</label><!-- ENDIF --></dt>
+ <dd><!-- IF S_ACTION_SELECT --> <select name="action_option">{S_ACTION_OPTIONS}</select> <input type="submit" name="add_rule" value="{L_ADD_RULE}" class="button1" /><!-- ELSE -->{ACTION_CURRENT}<input type="hidden" name="action_option" value="{ACTION_OPTION}" /><!-- ENDIF --></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ </fieldset>
+
+ <h3>{L_FOLDER_OPTIONS}</h3>
+
+ <fieldset class="fields2">
+
+ <!-- IF not S_MAX_FOLDER_ZERO -->
+ <dl>
+ <dt><label for="foldername">{L_ADD_FOLDER}:</label></dt>
+ <dd><!-- IF S_MAX_FOLDER_REACHED -->{L_MAX_FOLDER_REACHED}<!-- ELSE --><input type="text" class="inputbox medium" name="foldername" id="foldername" size="30" maxlength="30" /> <input class="button2" type="submit" name="addfolder" value="{L_ADD}" /><!-- ENDIF --></dd>
+ </dl>
+ <!-- IF S_FOLDER_OPTIONS --><hr class="dashed" /><!-- ENDIF -->
+ <!-- ENDIF -->
+
+
+
+ <!-- IF S_FOLDER_OPTIONS -->
+ <dl>
+ <dt><label for="rename_folder_id">{L_RENAME_FOLDER}:</label></dt>
+ <dd><select name="rename_folder_id" id="rename_folder_id">{S_FOLDER_OPTIONS}</select></dd>
+ <dt><label for="new_folder_name">{L_NEW_FOLDER_NAME}:</label></dt>
+ <dd><input type="text" class="inputbox tiny" name="new_folder_name" id="new_folder_name" maxlength="30" /> <input class="button2" type="submit" name="rename_folder" value="{L_RENAME}" /></dd>
+ </dl>
+ <hr class="dashed" />
+ <dl>
+ <dt><label for="remove_folder_id">{L_REMOVE_FOLDER}:</label></dt>
+ <dd><select name="remove_folder_id" id="remove_folder_id">{S_FOLDER_OPTIONS}</select></dd>
+ <dd style="margin-top: 3px;"><label for="remove_action1"><input type="radio" name="remove_action" id="remove_action1" value="1" checked="checked" /> {L_MOVE_DELETED_MESSAGES_TO}:</label> <select name="move_to">{S_TO_FOLDER_OPTIONS}</select></dd>
+ <dd style="margin-top: 3px;"><label for="remove_action2"><input type="radio" name="remove_action" id="remove_action2" value="2" /> {L_DELETE_MESSAGES_IN_FOLDER}</label></dd>
+ <dd style="margin-top: 3px;"><input class="button2" type="submit" name="remove_folder" value="{L_REMOVE}" /></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <hr class="dashed" />
+
+ <dl>
+ <dt><label for="full_action1">{L_IF_FOLDER_FULL}:</label></dt>
+ <dd style="margin-top: 3px;"><label for="full_action1"><input type="radio" name="full_action" id="full_action1" value="1"{S_DELETE_CHECKED} /> {L_DELETE_OLDEST_MESSAGES}</label></dd>
+ <dd style="margin-top: 3px;"><label for="full_action2"><input type="radio" name="full_action" id="full_action2" value="2"{S_MOVE_CHECKED} /> {L_MOVE_TO_FOLDER}:</label> <select name="full_move_to">{S_FULL_FOLDER_OPTIONS}</select></dd>
+ <dd style="margin-top: 3px;"><label for="full_action3" style="white-space:normal;"><input type="radio" name="full_action" id="full_action3" value="3"{S_HOLD_CHECKED} /> {L_HOLD_NEW_MESSAGES}</label></dd>
+ </dl>
+
+
+ <dl>
+ <dt><label>{L_DEFAULT_ACTION}:</label><br /><span>{L_DEFAULT_ACTION_EXPLAIN}</span></dt>
+ <dd>{DEFAULT_ACTION}</dd>
+ <dd><input class="button2" type="submit" name="fullfolder" value="{L_CHANGE}" /></dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+ {S_FORM_TOKEN}
+</div>
+</form>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_pm_popup.html b/phpBB/styles/prosilver/template/ucp_pm_popup.html
new file mode 100644
index 0000000000..325362dc4d
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_pm_popup.html
@@ -0,0 +1,25 @@
+<!-- INCLUDE simple_header.html -->
+
+<script type="text/javascript">
+// <![CDATA[
+/**
+* Jump to inbox
+*/
+function jump_to_inbox(url)
+{
+ opener.document.location.href = url.replace(/&amp;/g, '&');
+ window.close();
+}
+// ]]>
+</script>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="content">
+ <p><!-- IF S_NOT_LOGGED_IN -->{L_LOGIN_CHECK_PM}<!-- ELSE -->{MESSAGE}<br /><br />{CLICK_TO_VIEW}<!-- ENDIF --></p>
+ <p class="small"><a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a></p>
+ </div>
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- INCLUDE simple_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
new file mode 100644
index 0000000000..7b309a74f7
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
@@ -0,0 +1,130 @@
+<!-- INCLUDE ucp_header.html -->
+
+<!-- IF not PROMPT -->
+ <!-- INCLUDE ucp_pm_message_header.html -->
+ <div class="panel pm-panel-message"><div>
+<!-- ENDIF -->
+
+<!-- IF PROMPT -->
+ <h2>{L_EXPORT_AS_CSV}</h2>
+ <form id="viewfolder" method="post" action="{S_PM_ACTION}">
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <h3>{L_OPTIONS}</h3>
+ <fieldset>
+ <dl>
+ <dt><label for="delimiter">{L_DELIMITER}:</label></dt>
+ <dd><input class="inputbox" type="text" id="delimiter" name="delimiter" value="," /></dd>
+ </dl>
+ <dl>
+ <dt><label for="enclosure">{L_ENCLOSURE}:</label></dt>
+ <dd><input class="inputbox" type="text" id="enclosure" name="enclosure" value="&#034;" /></dd>
+ </dl>
+ </fieldset>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <fieldset class="submit-buttons">
+ <input type="hidden" name="export_option" value="CSV" />
+ <input class="button1" type="submit" name="submit_export" value="{L_EXPORT_FOLDER}" />&nbsp;
+ <input class="button2" type="reset" value="Reset" name="reset" />&nbsp;
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- ELSE -->
+
+ <!-- IF NUM_REMOVED -->
+ <div class="notice">
+ <p>{RULE_REMOVED_MESSAGES}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF NUM_NOT_MOVED -->
+ <div class="notice">
+ <p>{NOT_MOVED_MESSAGES}<br />{RELEASE_MESSAGE_INFO}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF .messagerow -->
+ <ul class="topiclist">
+ <li class="header">
+ <dl>
+ <dt>{L_MESSAGE}</dt>
+ <dd class="mark">{L_MARK}</dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist pmlist">
+
+ <!-- BEGIN messagerow -->
+ <li class="row<!-- IF messagerow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF messagerow.PM_CLASS --> {messagerow.PM_CLASS}<!-- ENDIF -->">
+ <dl class="icon" style="background-image: url({messagerow.FOLDER_IMG_SRC}); background-repeat: no-repeat;">
+ <dt<!-- IF messagerow.PM_ICON_URL and S_PM_ICONS --> style="background-image: url({messagerow.PM_ICON_URL}); background-repeat: no-repeat;"<!-- ENDIF -->>
+
+ <!-- IF messagerow.S_PM_DELETED -->
+ <a href="{messagerow.U_REMOVE_PM}" class="topictitle">{L_DELETE_MESSAGE}</a><br />
+ <span class="error">{L_MESSAGE_REMOVED_FROM_OUTBOX}</span>
+ <!-- ELSE -->
+ <a href="{messagerow.U_VIEW_PM}" class="topictitle">{messagerow.SUBJECT}</a>
+ <!-- ENDIF -->
+ <!-- IF messagerow.S_AUTHOR_DELETED -->
+ <br /><em class="small">{L_PM_FROM_REMOVED_AUTHOR}</em>
+ <!-- ENDIF -->
+
+ <!-- IF messagerow.S_TOPIC_REPORTED --><a href="{messagerow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --> {messagerow.ATTACH_ICON_IMG}<br />
+ <!-- IF S_SHOW_RECIPIENTS -->{L_MESSAGE_TO} {messagerow.RECIPIENTS}<!-- ELSE -->{L_MESSAGE_BY_AUTHOR} {messagerow.MESSAGE_AUTHOR_FULL} &raquo; {messagerow.SENT_TIME}<!-- ENDIF -->
+ </dt>
+ <!-- IF S_SHOW_RECIPIENTS --><dd class="info"><span>{L_SENT_AT}: {messagerow.SENT_TIME}</span></dd><!-- ENDIF -->
+ <!-- IF S_UNREAD --><dd class="info"><!-- IF messagerow.FOLDER --><a href="{messagerow.U_FOLDER}">{messagerow.FOLDER}</a><!-- ELSE -->{L_UNKNOWN_FOLDER}<!-- ENDIF --></dd><!-- ENDIF -->
+ <dd class="mark"><input type="checkbox" name="marked_msg_id[]" value="{messagerow.MESSAGE_ID}" /></dd>
+ </dl>
+ </li>
+ <!-- END messagerow -->
+
+ </ul>
+ <!-- ELSE -->
+ <p><strong>
+ <!-- IF S_COMPOSE_PM_VIEW and S_NO_AUTH_SEND_MESSAGE -->
+ <!-- IF S_USER_NEW -->{L_USER_NEW_PERMISSION_DISALLOWED}<!-- ELSE -->{L_NO_AUTH_SEND_MESSAGE}<!-- ENDIF -->
+ <!-- ELSE -->
+ {L_NO_MESSAGES}
+ <!-- ENDIF -->
+ </strong></p>
+ <!-- ENDIF -->
+
+ <!-- IF FOLDER_CUR_MESSAGES neq 0 -->
+ <fieldset class="display-actions">
+ <div class="left-box"><label for="export_option">{L_EXPORT_FOLDER}: <select name="export_option" id="export_option"><option value="CSV">{L_EXPORT_AS_CSV}</option><option value="CSV_EXCEL">{L_EXPORT_AS_CSV_EXCEL}</option><option value="XML">{L_EXPORT_AS_XML}</option></select></label> <input class="button2" type="submit" name="submit_export" value="{L_GO}" /><br /></div>
+ <select name="mark_option">{S_MARK_OPTIONS}{S_MOVE_MARKED_OPTIONS}</select> <input class="button2" type="submit" name="submit_mark" value="{L_GO}" />
+ <div><a href="#" onclick="marklist('viewfolder', 'marked_msg', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('viewfolder', 'marked_msg', false); return false;">{L_UNMARK_ALL}</a></div>
+ </fieldset>
+
+ <hr />
+
+ <ul class="linklist">
+ <!-- IF TOTAL_MESSAGES or S_VIEW_MESSAGE -->
+ <li class="rightside pagination">
+ <!-- IF TOTAL_MESSAGES -->{TOTAL_MESSAGES}<!-- ENDIF -->
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </li>
+ <!-- ENDIF -->
+ </ul>
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <!-- IF FOLDER_CUR_MESSAGES neq 0 -->
+ <fieldset class="display-options">
+ <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <label>{L_DISPLAY}: {S_SELECT_SORT_DAYS}</label>
+ <label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
+ <label>{S_SELECT_SORT_DIR} <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
+ <input type="hidden" name="cur_folder_id" value="{CUR_FOLDER_ID}" />
+ </fieldset>
+ <!-- ENDIF -->
+
+ <!-- INCLUDE ucp_pm_message_footer.html -->
+<!-- ENDIF -->
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
new file mode 100644
index 0000000000..df0cf25e82
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
@@ -0,0 +1,111 @@
+ <!-- INCLUDE ucp_header.html -->
+
+<!-- INCLUDE ucp_pm_message_header.html -->
+
+
+<!-- IF S_DISPLAY_HISTORY and (U_VIEW_PREVIOUS_HISTORY or U_VIEW_NEXT_HISTORY) -->
+ <fieldset class="display-options clearfix bg1 pm-message-nav">
+ <!-- IF U_VIEW_PREVIOUS_HISTORY --><a href="{U_VIEW_PREVIOUS_HISTORY}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_VIEW_PREVIOUS_HISTORY}</a><!-- ENDIF -->
+ <!-- IF U_VIEW_NEXT_HISTORY --><a href="{U_VIEW_NEXT_HISTORY}" class="right-box {S_CONTENT_FLOW_END}">{L_VIEW_NEXT_HISTORY}</a><!-- ENDIF -->
+ </fieldset>
+<!-- ENDIF -->
+
+
+<div id="post-{MESSAGE_ID}" class="panel clearfix post pm-panel-message pm<!-- IF S_POST_UNAPPROVED or S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF S_ONLINE --> online<!-- ENDIF -->">
+<div>
+
+ <div class="postbody">
+
+ <!-- IF U_DELETE or U_EDIT or U_QUOTE or U_REPORT -->
+ <ul class="profile-icons">
+ <!-- IF U_EDIT --><li class="edit-icon"><a href="{U_EDIT}" title="{L_POST_EDIT_PM}"><span>{L_POST_EDIT_PM}</span></a></li><!-- ENDIF -->
+ <!-- IF U_DELETE --><li class="delete-icon"><a href="{U_DELETE}" title="{L_DELETE_MESSAGE}"><span>{L_DELETE_MESSAGE}</span></a></li><!-- ENDIF -->
+ <!-- IF U_REPORT --><li class="report-icon"><a href="{U_REPORT}" title="{L_REPORT_PM}"><span>{L_REPORT_PM}</span></a></li><!-- ENDIF -->
+ <!-- IF U_QUOTE --><li class="quote-icon"><a href="{U_QUOTE}" title="{L_POST_QUOTE_PM}"><span>{L_POST_QUOTE_PM}</span></a></li><!-- ENDIF -->
+ </ul>
+ <!-- ENDIF -->
+
+ <h3 class="first">{SUBJECT}</h3>
+
+ <p class="author">
+ <strong>{L_SENT_AT}:</strong> {SENT_DATE}
+ <br /><strong>{L_PM_FROM}:</strong> {MESSAGE_AUTHOR_FULL}
+ <!-- IF S_TO_RECIPIENT --><br /><strong>{L_TO}:</strong> <!-- BEGIN to_recipient --><!-- IF to_recipient.NAME_FULL -->{to_recipient.NAME_FULL}<!-- ELSE --><a href="{to_recipient.U_VIEW}" style="color:<!-- IF to_recipient.COLOUR -->{to_recipient.COLOUR}<!-- ELSEIF to_recipient.IS_GROUP -->#0000FF<!-- ENDIF -->;">{to_recipient.NAME}</a><!-- ENDIF -->&nbsp;<!-- END to_recipient --><!-- ENDIF -->
+ <!-- IF S_BCC_RECIPIENT --><br /><strong>{L_BCC}:</strong> <!-- BEGIN bcc_recipient --><!-- IF bcc_recipient.NAME_FULL -->{bcc_recipient.NAME_FULL}<!-- ELSE --><a href="{bcc_recipient.U_VIEW}" style="color:<!-- IF bcc_recipient.COLOUR -->{bcc_recipient.COLOUR}<!-- ELSEIF bcc_recipient.IS_GROUP -->#0000FF<!-- ENDIF -->;">{bcc_recipient.NAME}</a><!-- ENDIF -->&nbsp;<!-- END bcc_recipient --><!-- ENDIF -->
+ </p>
+
+
+ <div class="content">{MESSAGE}</div>
+
+ <!-- IF S_HAS_ATTACHMENTS -->
+ <dl class="attachbox">
+ <dt>{L_ATTACHMENTS}</dt>
+ <!-- BEGIN attachment -->
+ <dd>{attachment.DISPLAY_ATTACHMENT}</dd>
+ <!-- END attachment -->
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF S_DISPLAY_NOTICE -->
+ <div class="rules">{L_DOWNLOAD_NOTICE}</div>
+ <!-- ENDIF -->
+
+ <!-- IF EDITED_MESSAGE or EDIT_REASON -->
+ <div class="notice">{EDITED_MESSAGE}
+ <!-- IF EDIT_REASON --><br /><strong>{L_REASON}:</strong> <em>{EDIT_REASON}</em><!-- ENDIF -->
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF SIGNATURE -->
+ <div id="sig{MESSAGE_ID}" class="signature">{SIGNATURE}</div>
+ <!-- ENDIF -->
+ </div>
+
+ <dl class="postprofile" id="profile{MESSAGE_ID}">
+ <dt><!-- IF AUTHOR_AVATAR --><a href="{U_MESSAGE_AUTHOR}">{AUTHOR_AVATAR}</a><br /><!-- ENDIF -->{MESSAGE_AUTHOR_FULL}</dt>
+ <!-- IF RANK_TITLE --><dd>{RANK_TITLE}</dd><!-- ENDIF -->
+ <!-- IF RANK_IMG --><dd>{RANK_IMG}</dd><!-- ENDIF -->
+ <dd>&nbsp;</dd>
+ <dd><strong>{L_POSTS}:</strong> {AUTHOR_POSTS}</dd>
+ <!-- IF AUTHOR_JOINED --><dd><strong>{L_JOINED}:</strong> {AUTHOR_JOINED}</dd><!-- ENDIF -->
+ <!-- IF AUTHOR_FROM --><dd><strong>{L_LOCATION}:</strong> {AUTHOR_FROM}</dd><!-- ENDIF -->
+
+ <!-- IF U_PM or U_EMAIL or U_WWW or U_MSN or U_ICQ or U_YIM or U_AIM or U_JABBER -->
+ <dd>
+ <ul class="profile-icons">
+ <!-- IF U_PM --><li class="pm-icon"><a href="{U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
+ <!-- IF U_EMAIL --><li class="email-icon"><a href="{U_EMAIL}" title="{L_SEND_EMAIL_USER} {MESSAGE_AUTHOR}"><span>{L_SEND_EMAIL_USER} {MESSAGE_AUTHOR}</span></a></li><!-- ENDIF -->
+ <!-- IF U_WWW --><li class="web-icon"><a href="{U_WWW}" title="{L_VISIT_WEBSITE}: {U_WWW}"><span>{L_WEBSITE}</span></a></li><!-- ENDIF -->
+ <!-- IF U_MSN --><li class="msnm-icon"><a href="{U_MSN}" onclick="popup(this.href, 550, 320); return false;" title="{L_MSNM}"><span>{L_MSNM}</span></a></li><!-- ENDIF -->
+ <!-- IF U_ICQ --><li class="icq-icon"><a href="{U_ICQ}" onclick="popup(this.href, 550, 320); return false;" title="{L_ICQ}"><span>{L_ICQ}</span></a></li><!-- ENDIF -->
+ <!-- IF U_YIM --><li class="yahoo-icon"><a href="{U_YIM}" onclick="popup(this.href, 780, 550); return false;" title="{L_YIM}"><span>{L_YIM}</span></a></li><!-- ENDIF -->
+ <!-- IF U_AIM --><li class="aim-icon"><a href="{U_AIM}" onclick="popup(this.href, 550, 320); return false;" title="{L_AIM}"><span>{L_AIM}</span></a></li><!-- ENDIF -->
+ <!-- IF U_JABBER --><li class="jabber-icon"><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span>{L_JABBER}</span></a></li><!-- ENDIF -->
+ </ul>
+ </dd>
+ <!-- ENDIF -->
+ </dl>
+
+ <div class="back2top"><a href="#top" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- IF S_VIEW_MESSAGE -->
+<fieldset class="display-options">
+ <!-- IF U_PREVIOUS_PM --><a href="{U_PREVIOUS_PM}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_VIEW_PREVIOUS_PM}</a><!-- ENDIF -->
+ <!-- IF U_NEXT_PM --><a href="{U_NEXT_PM}" class="right-box {S_CONTENT_FLOW_END}">{L_VIEW_NEXT_PM}</a><!-- ENDIF -->
+
+ <!-- IF S_MARK_OPTIONS --><label for="mark_option"><select name="mark_option" id="mark_option">{S_MARK_OPTIONS}</select></label>&nbsp;<input class="button2" type="submit" name="submit_mark" value="{L_GO}" /><!-- ENDIF -->
+ <!-- IF not S_UNREAD and not S_SPECIAL_FOLDER --><label for="dest_folder"><!-- IF S_VIEW_MESSAGE -->{L_MOVE_TO_FOLDER}: <!-- ELSE -->{L_MOVE_MARKED_TO_FOLDER}<!-- ENDIF --> <select name="dest_folder" id="dest_folder">{S_TO_FOLDER_OPTIONS}</select></label> <input class="button2" type="submit" name="move_pm" value="{L_GO}" /><!-- ENDIF -->
+ <input type="hidden" name="marked_msg_id[]" value="{MSG_ID}" />
+ <input type="hidden" name="cur_folder_id" value="{CUR_FOLDER_ID}" />
+ <input type="hidden" name="p" value="{MSG_ID}" />
+</fieldset>
+<!-- ENDIF -->
+
+<!-- INCLUDE ucp_pm_message_footer.html -->
+
+<!-- IF S_DISPLAY_HISTORY --><!-- INCLUDE ucp_pm_history.html --><!-- ENDIF -->
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
new file mode 100644
index 0000000000..2f2778f496
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
@@ -0,0 +1,130 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<head>
+<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="content-language" content="{S_USER_LANG}" />
+<title>{SITENAME} :: {PAGE_TITLE}</title>
+
+<style type="text/css">
+/* <![CDATA[ */
+body {
+ font-family: Verdana,serif;
+ font-size: 10pt;
+}
+
+td {
+ font-family: Verdana,serif;
+ font-size: 10pt;
+ line-height: 150%;
+}
+
+.code, .quote {
+ font-size: smaller;
+ border: black solid 1px;
+}
+
+.forum {
+ font-family: Arial,Helvetica,sans-serif;
+ font-weight: bold;
+ font-size: 18pt;
+}
+
+.topic {
+ font-family: Arial,Helvetica,sans-serif;
+ font-size: 14pt;
+ font-weight: bold;
+}
+
+.gensmall {
+ font-size: 8pt;
+}
+
+hr {
+ color: #888888;
+ height: 3px;
+ border-style: solid;
+}
+
+hr.sep {
+ color: #AAAAAA;
+ height: 1px;
+ border-style: dashed;
+}
+/* ]]> */
+</style>
+
+</head>
+<body>
+
+<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
+<tr>
+ <td colspan="2" align="center"><span class="forum">{SITENAME}</span><br /><span class="gensmall">{L_PRIVATE_MESSAGING}</a></span></td>
+</tr>
+<tr>
+ <td colspan="2"><br /></td>
+</tr>
+<tr>
+ <td><span class="topic">{SUBJECT}</span><br /></td>
+ <td align="right" valign="bottom"><span class="gensmall">{PAGE_NUMBER}</span></td>
+</tr>
+</table>
+
+<hr width="85%" />
+
+<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
+<tr>
+ <td width="10%" nowrap="nowrap">{L_PM_FROM}:&nbsp;</td>
+ <td><strong>{MESSAGE_AUTHOR}</strong> [ {SENT_DATE} ]</td>
+</tr>
+
+<!-- IF S_TO_RECIPIENT -->
+ <tr>
+ <td width="10%" nowrap="nowrap">{L_TO}:</td>
+ <td>
+ <!-- BEGIN to_recipient -->
+ <!-- IF to_recipient.COLOUR --><span style="color:{to_recipient.COLOUR}"><!-- ELSE --><span<!-- IF to_recipient.IS_GROUP --> class="sep"<!-- ENDIF -->><!-- ENDIF -->{to_recipient.NAME}</span>&nbsp;
+ <!-- END to_recipient -->
+ </td>
+ </tr>
+<!-- ENDIF -->
+
+<!-- IF S_BCC_RECIPIENT -->
+ <tr>
+ <td width="10%" nowrap="nowrap">{L_BCC}:</td>
+ <td>
+ <!-- BEGIN bcc_recipient -->
+ <!-- IF bcc_recipient.COLOUR --><span style="color:{bcc_recipient.COLOUR}"><!-- ELSE --><span<!-- IF bcc_recipient.IS_GROUP --> class="sep"<!-- ENDIF -->><!-- ENDIF -->{bcc_recipient.NAME}</span>&nbsp;
+ <!-- END bcc_recipient -->
+ </td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <td colspan="2"><hr class="sep" />{MESSAGE}</td>
+</tr>
+</table>
+
+<hr width="85%" />
+<!--
+ We request you retain the full copyright notice below including the link to www.phpbb.com.
+ This not only gives respect to the large amount of time given freely by the developers
+ but also helps build interest, traffic and use of phpBB3. If you (honestly) cannot retain
+ the full copyright we ask you at least leave in place the "Powered by phpBB" line, with
+ "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our
+ forums may be affected.
+
+ The phpBB Group : 2006
+//-->
+
+<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
+<tr>
+ <td><span class="gensmall">{PAGE_NUMBER}</span></td>
+ <td align="{S_CONTENT_FLOW_END}"><span class="gensmall">{S_TIMEZONE}</span></td>
+</tr>
+<tr>
+ <td colspan="2" align="center"><span class="gensmall">Powered by phpBB &copy; 2000, 2002, 2005, 2007 phpBB Group<br />http://www.phpbb.com/</span></td>
+</tr>
+</table>
+
+</body>
+</html> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_prefs_personal.html b/phpBB/styles/prosilver/template/ucp_prefs_personal.html
new file mode 100644
index 0000000000..9022346627
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_prefs_personal.html
@@ -0,0 +1,144 @@
+<!-- INCLUDE ucp_header.html -->
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<h2>{L_TITLE}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <fieldset>
+ <!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
+ <dl>
+ <dt><label for="viewemail0">{L_SHOW_EMAIL}:</label></dt>
+ <dd>
+ <label for="viewemail1"><input type="radio" name="viewemail" id="viewemail1" value="1"<!-- IF S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="viewemail0"><input type="radio" name="viewemail" id="viewemail0" value="0"<!-- IF not S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="massemail1">{L_ADMIN_EMAIL}:</label></dt>
+ <dd>
+ <label for="massemail1"><input type="radio" name="massemail" id="massemail1" value="1"<!-- IF S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="massemail0"><input type="radio" name="massemail" id="massemail0" value="0"<!-- IF not S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="allowpm1">{L_ALLOW_PM}:</label><br /><span>{L_ALLOW_PM_EXPLAIN}</span></dt>
+ <dd>
+ <label for="allowpm1"><input type="radio" name="allowpm" id="allowpm1" value="1"<!-- IF S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="allowpm0"><input type="radio" name="allowpm" id="allowpm0" value="0"<!-- IF not S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <!-- IF S_CAN_HIDE_ONLINE -->
+ <dl>
+ <dt><label for="hideonline0">{L_HIDE_ONLINE}:</label><br /><span>{L_HIDE_ONLINE_EXPLAIN}</span></dt>
+ <dd>
+ <label for="hideonline1"><input type="radio" name="hideonline" id="hideonline1" value="1"<!-- IF S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="hideonline0"><input type="radio" name="hideonline" id="hideonline0" value="0"<!-- IF not S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF S_SELECT_NOTIFY -->
+ <dl>
+ <dt><label for="notifymethod0">{L_NOTIFY_METHOD}:</label></dt>
+ <dd>
+ <label for="notifymethod0"><input type="radio" name="notifymethod" id="notifymethod0" value="0"<!-- IF S_NOTIFY_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_EMAIL}</label>
+ <label for="notifymethod1"><input type="radio" name="notifymethod" id="notifymethod1" value="1"<!-- IF S_NOTIFY_IM --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_IM}</label>
+ <label for="notifymethod2"><input type="radio" name="notifymethod" id="notifymethod2" value="2"<!-- IF S_NOTIFY_BOTH --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_BOTH}</label>
+ </dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="notifypm1">{L_NOTIFY_ON_PM}:</label></dt>
+ <dd>
+ <label for="notifypm1"><input type="radio" name="notifypm" id="notifypm1" value="1"<!-- IF S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="notifypm0"><input type="radio" name="notifypm" id="notifypm0" value="0"<!-- IF not S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="popuppm0">{L_POPUP_ON_PM}:</label></dt>
+ <dd>
+ <label for="popuppm1"><input type="radio" name="popuppm" id="popuppm1" value="1"<!-- IF S_POPUP_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="popuppm0"><input type="radio" name="popuppm" id="popuppm0" value="0"<!-- IF not S_POPUP_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="lang">{L_BOARD_LANGUAGE}:</label></dt>
+ <dd><select name="lang" id="lang">{S_LANG_OPTIONS}</select></dd>
+ </dl>
+ <!-- IF S_STYLE_OPTIONS -->
+ <dl>
+ <dt><label for="style">{L_BOARD_STYLE}:</label></dt>
+ <dd><select name="style" id="style">{S_STYLE_OPTIONS}</select></dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="timezone">{L_BOARD_TIMEZONE}:</label></dt>
+ <dd><select name="tz" id="timezone" class="autowidth">{S_TZ_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="dst1">{L_BOARD_DST}:</label></dt>
+ <dd>
+ <label for="dst1"><input type="radio" name="dst" id="dst1" value="1"<!-- IF S_DST --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="dst0"><input type="radio" name="dst" id="dst0" value="0"<!-- IF not S_DST --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="dateformat">{L_BOARD_DATE_FORMAT}:</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt>
+ <dd>
+ <select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">
+ {S_DATEFORMAT_OPTIONS}
+ </select>
+ </dd>
+ <dd id="custom_date" style="display:none;"><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" class="inputbox narrow" style="margin-top: 3px;" /></dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<script type="text/javascript">
+// <![CDATA[
+ var date_format = '{A_DATE_FORMAT}';
+ var default_dateformat = '{A_DEFAULT_DATEFORMAT}';
+
+ function customDates()
+ {
+ var e = document.getElementById('dateoptions');
+
+ e.selectedIndex = e.length - 1;
+
+ // Loop and match date_format in menu
+ for (var i = 0; i < e.length; i++)
+ {
+ if (e.options[i].value == date_format)
+ {
+ e.selectedIndex = i;
+ break;
+ }
+ }
+
+ // Show/hide custom field
+ if (e.selectedIndex == e.length - 1)
+ {
+ dE('custom_date',1);
+ }
+ else
+ {
+ dE('custom_date',-1);
+ }
+ }
+
+ customDates();
+// ]]>
+</script>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_prefs_post.html b/phpBB/styles/prosilver/template/ucp_prefs_post.html
new file mode 100644
index 0000000000..74af90ca5a
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_prefs_post.html
@@ -0,0 +1,51 @@
+<!-- INCLUDE ucp_header.html -->
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<h2>{L_TITLE}</h2>
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <fieldset>
+ <!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
+ <dl>
+ <dt><label for="bbcode1">{L_DEFAULT_BBCODE}:</label></dt>
+ <dd>
+ <label for="bbcode1"><input type="radio" name="bbcode" id="bbcode1" value="1"<!-- IF S_BBCODE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="bbcode0"><input type="radio" name="bbcode" id="bbcode0" value="0"<!-- IF not S_BBCODE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="smilies1">{L_DEFAULT_SMILIES}:</label></dt>
+ <dd>
+ <label for="smilies1"><input type="radio" name="smilies" id="smilies1" value="1"<!-- IF S_SMILIES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="smilies0"><input type="radio" name="smilies" id="smilies0" value="0"<!-- IF not S_SMILIES --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="sig1">{L_DEFAULT_ADD_SIG}:</label></dt>
+ <dd>
+ <label for="sig1"><input type="radio" name="sig" id="sig1" value="1"<!-- IF S_SIG --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="sig0"><input type="radio" name="sig" id="sig0" value="0"<!-- IF not S_SIG --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="notify1">{L_DEFAULT_NOTIFY}:</label></dt>
+ <dd>
+ <label for="notify1"><input type="radio" name="notify" id="notify1" value="1"<!-- IF S_NOTIFY --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="notify0"><input type="radio" name="notify" id="notify0" value="0"<!-- IF not S_NOTIFY --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_prefs_view.html b/phpBB/styles/prosilver/template/ucp_prefs_view.html
new file mode 100644
index 0000000000..dc773584df
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_prefs_view.html
@@ -0,0 +1,94 @@
+<!-- INCLUDE ucp_header.html -->
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<h2>{L_TITLE}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <fieldset>
+ <!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
+ <dl>
+ <dt><label for="images1">{L_VIEW_IMAGES}:</label></dt>
+ <dd>
+ <label for="images1"><input type="radio" name="images" id="images1" value="1"<!-- IF S_IMAGES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="images0"><input type="radio" name="images" id="images0" value="0"<!-- IF not S_IMAGES --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="flash0">{L_VIEW_FLASH}:</label></dt>
+ <dd>
+ <label for="flash1"><input type="radio" name="flash" id="flash1" value="1"<!-- IF S_FLASH --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="flash0"><input type="radio" name="flash" id="flash0" value="0"<!-- IF not S_FLASH --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="smilies1">{L_VIEW_SMILIES}:</label></dt>
+ <dd>
+ <label for="smilies1"><input type="radio" name="smilies" id="smilies1" value="1"<!-- IF S_SMILIES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="smilies0"><input type="radio" name="smilies" id="smilies0" value="0"<!-- IF not S_SMILIES --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="sigs1">{L_VIEW_SIGS}:</label></dt>
+ <dd>
+ <label for="sigs1"><input type="radio" name="sigs" id="sigs1" value="1"<!-- IF S_SIGS --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="sigs0"><input type="radio" name="sigs" id="sigs0" value="0"<!-- IF not S_SIGS --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="avatars1">{L_VIEW_AVATARS}:</label></dt>
+ <dd>
+ <label for="avatars1"><input type="radio" name="avatars" id="avatars1" value="1"<!-- IF S_AVATARS --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="avatars0"><input type="radio" name="avatars" id="avatars0" value="0"<!-- IF not S_AVATARS --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <!-- IF S_CHANGE_CENSORS -->
+ <dl>
+ <dt><label for="wordcensor1">{L_DISABLE_CENSORS}:</label></dt>
+ <dd>
+ <label for="wordcensor1"><input type="radio" name="wordcensor" id="wordcensor1" value="1"<!-- IF S_DISABLE_CENSORS --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="wordcensor0"><input type="radio" name="wordcensor" id="wordcensor0" value="0"<!-- IF not S_DISABLE_CENSORS --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+ <!-- ENDIF -->
+ <hr />
+ <dl>
+ <dt><label>{L_VIEW_TOPICS_DAYS}:</label></dt>
+ <dd>{S_TOPIC_SORT_DAYS}</dd>
+ </dl>
+ <dl>
+ <dt><label>{L_VIEW_TOPICS_KEY}:</label></dt>
+ <dd>{S_TOPIC_SORT_KEY}</dd>
+ </dl>
+ <dl>
+ <dt><label>{L_VIEW_TOPICS_DIR}:</label></dt>
+ <dd>{S_TOPIC_SORT_DIR}</dd>
+ </dl>
+ <hr />
+ <dl>
+ <dt><label>{L_VIEW_POSTS_DAYS}:</label></dt>
+ <dd>{S_POST_SORT_DAYS}</dd>
+ </dl>
+ <dl>
+ <dt><label>{L_VIEW_POSTS_KEY}:</label></dt>
+ <dd>{S_POST_SORT_KEY}</dd>
+ </dl>
+ <dl>
+ <dt><label>{L_VIEW_POSTS_DIR}:</label></dt>
+ <dd>{S_POST_SORT_DIR}</dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_profile_avatar.html b/phpBB/styles/prosilver/template/ucp_profile_avatar.html
new file mode 100644
index 0000000000..2669ed3c22
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_profile_avatar.html
@@ -0,0 +1,19 @@
+<!-- INCLUDE ucp_header.html -->
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<h2>{L_TITLE}</h2>
+
+<!-- INCLUDE ucp_avatar_options.html -->
+
+<fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}
+ <!-- IF S_DISPLAY_GALLERY --><input type="submit" name="display_gallery" value="{L_DISPLAY_GALLERY}" class="button2" />&nbsp; <!-- ENDIF -->
+ <!-- IF S_IN_AVATAR_GALLERY --><input type="submit" name="cancel" value="{L_CANCEL}" class="button2" />&nbsp; <!-- ELSE -->
+ <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp; <!-- ENDIF -->
+ <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
new file mode 100644
index 0000000000..1bd54619b9
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
@@ -0,0 +1,79 @@
+<!-- INCLUDE ucp_header.html -->
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<h2>{L_TITLE}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <p>{L_PROFILE_INFO_NOTICE}</p>
+
+ <fieldset>
+ <!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
+ <dl>
+ <dt><label for="icq">{L_UCP_ICQ}:</label></dt>
+ <dd><input type="text" name="icq" id="icq" maxlength="15" value="{ICQ}" class="inputbox" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="aim">{L_UCP_AIM}:</label></dt>
+ <dd><input type="text" name="aim" id="aim" maxlength="255" value="{AIM}" class="inputbox" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="msn">{L_UCP_MSNM}:</label></dt>
+ <dd><input type="text" name="msn" id="msn" maxlength="255" value="{MSN}" class="inputbox" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="yim">{L_UCP_YIM}:</label></dt>
+ <dd><input type="text" name="yim" id="yim" maxlength="255" value="{YIM}" class="inputbox" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="jabber">{L_UCP_JABBER}:</label></dt>
+ <dd><input type="text" name="jabber" id="jabber" maxlength="255" value="{JABBER}" class="inputbox" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="website">{L_WEBSITE}:</label></dt>
+ <dd><input type="text" name="website" id="website" maxlength="255" value="{WEBSITE}" class="inputbox" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="location">{L_LOCATION}:</label></dt>
+ <dd><input type="text" name="location" id="location" maxlength="255" value="{LOCATION}" class="inputbox" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="occupation">{L_OCCUPATION}:</label></dt>
+ <dd><textarea name="occupation" id="occupation" class="inputbox" rows="3" cols="30">{OCCUPATION}</textarea></dd>
+ </dl>
+ <dl>
+ <dt><label for="interests">{L_INTERESTS}:</label></dt>
+ <dd><textarea name="interests" id="interests" class="inputbox" rows="3" cols="30">{INTERESTS}</textarea></dd>
+ </dl>
+ <!-- IF S_BIRTHDAYS_ENABLED -->
+ <dl>
+ <dt><label for="bday_day">{L_BIRTHDAY}:</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
+ <dd>
+ <label for="bday_day">{L_DAY}: <select name="bday_day" id="bday_day" style="width: 4em;">{S_BIRTHDAY_DAY_OPTIONS}</select></label>
+ <label for="bday_month">{L_MONTH}: <select name="bday_month" id="bday_month" style="width: 4em;">{S_BIRTHDAY_MONTH_OPTIONS}</select></label>
+ <label for="bday_year">{L_YEAR}: <select name="bday_year" id="bday_year" style="width: 6em;">{S_BIRTHDAY_YEAR_OPTIONS}</select></label>
+ </dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- BEGIN profile_fields -->
+ <dl>
+ <dt><label<!-- IF profile_fields.FIELD_ID --> for="{profile_fields.FIELD_ID}"<!-- ENDIF -->>{profile_fields.LANG_NAME}:<!-- IF profile_fields.S_REQUIRED --> *<!-- ENDIF --></label>
+ <!-- IF profile_fields.LANG_EXPLAIN --><br /><span>{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF --></dt>
+ <!-- IF profile_fields.ERROR --><dd class="error">{profile_fields.ERROR}</dd><!-- ENDIF -->
+ <dd>{profile_fields.FIELD}</dd>
+ </dl>
+ <!-- END profile_fields -->
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_profile_reg_details.html b/phpBB/styles/prosilver/template/ucp_profile_reg_details.html
new file mode 100644
index 0000000000..edd58d5e25
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_profile_reg_details.html
@@ -0,0 +1,63 @@
+<!-- INCLUDE ucp_header.html -->
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<h2>{L_TITLE}</h2>
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <!-- IF S_FORCE_PASSWORD -->
+ <p>{L_FORCE_PASSWORD_EXPLAIN}</p>
+ <!-- ENDIF -->
+
+ <fieldset>
+ <!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
+ <dl>
+ <dt><label <!-- IF S_CHANGE_USERNAME -->for="username"<!-- ENDIF -->>{L_USERNAME}:</label><br /><span>{L_USERNAME_EXPLAIN}</span></dt>
+ <dd><!-- IF S_CHANGE_USERNAME --><input type="text" name="username" id="username" value="{USERNAME}" class="inputbox" title="{L_USERNAME}" /><!-- ELSE --><strong>{USERNAME}</strong><!-- ENDIF --></dd>
+ </dl>
+ <dl>
+ <dt><label for="email">{L_EMAIL_ADDRESS}:</label></dt>
+ <dd><!-- IF S_CHANGE_EMAIL --><input type="text" name="email" id="email" maxlength="100" value="{EMAIL}" class="inputbox" title="{L_EMAIL_ADDRESS}" /><!-- ELSE --><strong>{EMAIL}</strong><!-- ENDIF --></dd>
+ </dl>
+ <!-- IF S_CHANGE_EMAIL -->
+ <dl>
+ <dt><label for="email_confirm">{L_CONFIRM_EMAIL}:</label><br /><span>{L_CONFIRM_EMAIL_EXPLAIN}</span></dt>
+ <dd><input type="text" name="email_confirm" id="email_confirm" maxlength="100" value="{CONFIRM_EMAIL}" class="inputbox" title="{L_CONFIRM_EMAIL}" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF S_CHANGE_PASSWORD -->
+ <dl>
+ <dt><label for="new_password">{L_NEW_PASSWORD}:</label><br /><span>{L_CHANGE_PASSWORD_EXPLAIN}</span></dt>
+ <dd><input type="password" name="new_password" id="new_password" maxlength="255" value="{NEW_PASSWORD}" class="inputbox" title="{L_CHANGE_PASSWORD}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="password_confirm">{L_CONFIRM_PASSWORD}:</label><br /><span>{L_CONFIRM_PASSWORD_EXPLAIN}</span></dt>
+ <dd><input type="password" name="password_confirm" id="password_confirm" maxlength="255" value="{PASSWORD_CONFIRM}" class="inputbox" title="{L_CONFIRM_PASSWORD}" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <fieldset>
+ <dl>
+ <dt><label for="cur_password">{L_CURRENT_PASSWORD}:</label><br /><span>{L_CURRENT_PASSWORD_EXPLAIN}</span></dt>
+ <dd><input type="password" name="cur_password" id="cur_password" maxlength="255" value="{CUR_PASSWORD}" class="inputbox" title="{L_CURRENT_PASSWORD}" /></dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_profile_signature.html b/phpBB/styles/prosilver/template/ucp_profile_signature.html
new file mode 100644
index 0000000000..5d25d2d9f4
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_profile_signature.html
@@ -0,0 +1,51 @@
+<!-- INCLUDE ucp_header.html -->
+
+<form id="postform" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<h2>{L_TITLE}</h2>
+
+<!-- IF SIGNATURE_PREVIEW -->
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <h3>{L_SIGNATURE_PREVIEW}</h3>
+ <div class="postbody">
+ <div class="signature" style="border-top:none; margin-top: 0; ">{SIGNATURE_PREVIEW}</div>
+ </div>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+<!-- ENDIF -->
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_SIGNATURE_EXPLAIN}</p>
+
+ <!-- DEFINE $SIG_EDIT = 1 -->
+ <!-- INCLUDE posting_editor.html -->
+ <h3>{L_OPTIONS}</h3>
+ <fieldset>
+ <!-- IF S_BBCODE_ALLOWED -->
+ <div><label for="disable_bbcode"><input type="checkbox" name="disable_bbcode" id="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE}</label></div>
+ <!-- ENDIF -->
+ <!-- IF S_SMILIES_ALLOWED -->
+ <div><label for="disable_smilies"><input type="checkbox" name="disable_smilies" id="disable_smilies"{S_SMILIES_CHECKED} /> {L_DISABLE_SMILIES}</label></div>
+ <!-- ENDIF -->
+ <!-- IF S_LINKS_ALLOWED -->
+ <div><label for="disable_magic_url"><input type="checkbox" name="disable_magic_url" id="disable_magic_url"{S_MAGIC_URL_CHECKED} /> {L_DISABLE_MAGIC_URL}</label></div>
+ <!-- ENDIF -->
+
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}
+ <input type="reset" name="reset" value="{L_RESET}" class="button2" />&nbsp;
+ <input type="submit" name="preview" value="{L_PREVIEW}" class="button2" />&nbsp;
+ <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html
new file mode 100644
index 0000000000..e63abaec05
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_register.html
@@ -0,0 +1,113 @@
+<!-- INCLUDE overall_header.html -->
+
+<script type="text/javascript">
+// <![CDATA[
+ /**
+ * Change language
+ */
+ function change_language(lang_iso)
+ {
+ document.forms['register'].change_lang.value = lang_iso;
+ document.forms['register'].submit.click();
+ }
+
+ <!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_REFRESH -->
+ onload_functions.push('apply_onkeypress_event()');
+ <!-- ENDIF -->
+
+// ]]>
+</script>
+
+<form method="post" action="{S_UCP_ACTION}" id="register">
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h2>{SITENAME} - {L_REGISTRATION}</h2>
+
+ <fieldset class="fields2">
+ <!-- IF ERROR --><dl><dd class="error">{ERROR}</dd></dl><!-- ENDIF -->
+ <!-- IF L_REG_COND -->
+ <dl><dd><strong>{L_REG_COND}</strong></dd></dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="username">{L_USERNAME}:</label><br /><span>{L_USERNAME_EXPLAIN}</span></dt>
+ <dd><input type="text" tabindex="1" name="username" id="username" size="25" value="{USERNAME}" class="inputbox autowidth" title="{L_USERNAME}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="email">{L_EMAIL_ADDRESS}:</label></dt>
+ <dd><input type="text" tabindex="2" name="email" id="email" size="25" maxlength="100" value="{EMAIL}" class="inputbox autowidth" title="{L_EMAIL_ADDRESS}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="email_confirm">{L_CONFIRM_EMAIL}:</label></dt>
+ <dd><input type="text" tabindex="3" name="email_confirm" id="email_confirm" size="25" maxlength="100" value="{EMAIL_CONFIRM}" class="inputbox autowidth" title="{L_CONFIRM_EMAIL}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="new_password">{L_PASSWORD}:</label><br /><span>{L_PASSWORD_EXPLAIN}</span></dt>
+ <dd><input type="password" tabindex="4" name="new_password" id="new_password" size="25" value="{PASSWORD}" class="inputbox autowidth" title="{L_NEW_PASSWORD}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="password_confirm">{L_CONFIRM_PASSWORD}:</label></dt>
+ <dd><input type="password" tabindex="5" name="password_confirm" id="password_confirm" size="25" value="{PASSWORD_CONFIRM}" class="inputbox autowidth" title="{L_CONFIRM_PASSWORD}" /></dd>
+ </dl>
+
+ <hr />
+
+ <dl>
+ <dt><label for="lang">{L_LANGUAGE}:</label></dt>
+ <dd><select name="lang" id="lang" onchange="change_language(this.value); return false;" tabindex="6" title="{L_LANGUAGE}">{S_LANG_OPTIONS}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="tz">{L_TIMEZONE}:</label></dt>
+ <dd><select name="tz" id="tz" tabindex="7" class="autowidth">{S_TZ_OPTIONS}</select></dd>
+ </dl>
+
+ <!-- IF .profile_fields -->
+ <dl><dd><strong>{L_ITEMS_REQUIRED}</strong></dd></dl>
+
+ <!-- BEGIN profile_fields -->
+ <dl>
+ <dt><label<!-- IF profile_fields.FIELD_ID --> for="{profile_fields.FIELD_ID}"<!-- ENDIF -->>{profile_fields.LANG_NAME}:<!-- IF profile_fields.S_REQUIRED --> *<!-- ENDIF --></label>
+ <!-- IF profile_fields.LANG_EXPLAIN --><br /><span>{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF -->
+ <!-- IF profile_fields.ERROR --><br /><span class="error">{profile_fields.ERROR}</span><!-- ENDIF --></dt>
+ <dd>{profile_fields.FIELD}</dd>
+ </dl>
+ <!-- END profile_fields -->
+ <!-- ENDIF -->
+
+ </fieldset>
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+<!-- IF CAPTCHA_TEMPLATE -->
+ <!-- DEFINE $CAPTCHA_TAB_INDEX = 8 -->
+ <!-- INCLUDE {CAPTCHA_TEMPLATE} -->
+<!-- ENDIF -->
+
+<!-- IF S_COPPA -->
+
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h4>{L_COPPA_COMPLIANCE}</h4>
+
+ <p>{L_COPPA_EXPLAIN}</p>
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+<!-- ENDIF -->
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}
+ <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" tabindex="9" name="submit" id="submit" value="{L_SUBMIT}" class="button1 default-submit-action" />
+ {S_FORM_TOKEN}
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_remind.html b/phpBB/styles/prosilver/template/ucp_remind.html
new file mode 100644
index 0000000000..7dbc23b733
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_remind.html
@@ -0,0 +1,32 @@
+<!-- INCLUDE overall_header.html -->
+
+<form action="{S_PROFILE_ACTION}" method="post" id="remind">
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+ <h2>{L_SEND_PASSWORD}</h2>
+
+ <fieldset>
+ <dl>
+ <dt><label for="username">{L_USERNAME}:</label></dt>
+ <dd><input class="inputbox narrow" type="text" name="username" id="username" size="25" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="email">{L_EMAIL_ADDRESS}:</label><br /><span>{L_EMAIL_REMIND}</span></dt>
+ <dd><input class="inputbox narrow" type="text" name="email" id="email" size="25" maxlength="100" /></dd>
+ </dl>
+ <dl>
+ <dt>&nbsp;</dt>
+ <dd>{S_HIDDEN_FIELDS}<input type="submit" name="submit" id="submit" class="button1" value="{L_SUBMIT}" tabindex="2" />&nbsp; <input type="reset" value="{L_RESET}" name="reset" class="button2" /></dd>
+ </dl>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_resend.html b/phpBB/styles/prosilver/template/ucp_resend.html
new file mode 100644
index 0000000000..840e972995
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_resend.html
@@ -0,0 +1,32 @@
+<!-- INCLUDE overall_header.html -->
+
+
+<form action="{S_PROFILE_ACTION}" method="post" id="resend">
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+ <h2>{L_UCP_RESEND}</h2>
+
+ <fieldset>
+ <dl>
+ <dt><label for="username">{L_USERNAME}:</label></dt>
+ <dd><input class="inputbox narrow" type="text" name="username" id="username" size="25" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="email">{L_EMAIL_ADDRESS}:</label><br /><span>{L_EMAIL_REMIND}</span></dt>
+ <dd><input class="inputbox narrow" type="text" name="email" id="email" size="25" maxlength="100" /></dd>
+ </dl>
+ <dl>
+ <dt>&nbsp;</dt>
+ <dd>{S_HIDDEN_FIELDS}{S_FORM_TOKEN}<input type="submit" name="submit" id="submit" class="button1" value="{L_SUBMIT}" tabindex="2" />&nbsp; <input type="reset" value="{L_RESET}" name="reset" class="button2" /></dd>
+ </dl>
+ </fieldset>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_zebra_foes.html b/phpBB/styles/prosilver/template/ucp_zebra_foes.html
new file mode 100644
index 0000000000..3c1b1cddce
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_zebra_foes.html
@@ -0,0 +1,41 @@
+<!-- INCLUDE ucp_header.html -->
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<h2>{L_TITLE}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_FOES_EXPLAIN}</p>
+
+ <fieldset class="fields2">
+ <!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
+ <dl>
+ <dt><label <!-- IF S_USERNAME_OPTIONS -->for="usernames"<!-- ENDIF -->>{L_YOUR_FOES}:</label><br /><span>{L_YOUR_FOES_EXPLAIN}</span></dt>
+ <dd>
+ <!-- IF S_USERNAME_OPTIONS -->
+ <select name="usernames[]" id="usernames" multiple="multiple" size="5">{S_USERNAME_OPTIONS}</select>
+ <!-- ELSE -->
+ <strong>{L_NO_FOES}</strong>
+ <!-- ENDIF -->
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="add">{L_ADD_FOES}:</label><br /><span>{L_ADD_FOES_EXPLAIN}</span></dt>
+ <dd><textarea name="add" id="add" rows="3" cols="30" class="inputbox">{USERNAMES}</textarea></dd>
+ <dd><strong><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></strong></dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_zebra_friends.html b/phpBB/styles/prosilver/template/ucp_zebra_friends.html
new file mode 100644
index 0000000000..1e0efbfdf8
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_zebra_friends.html
@@ -0,0 +1,41 @@
+<!-- INCLUDE ucp_header.html -->
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<h2>{L_TITLE}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>{L_FRIENDS_EXPLAIN}</p>
+
+ <fieldset class="fields2">
+ <!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
+ <dl>
+ <dt><label <!-- IF S_USERNAME_OPTIONS -->for="usernames"<!-- ENDIF -->>{L_YOUR_FRIENDS}:</label><br /><span>{L_YOUR_FRIENDS_EXPLAIN}</span></dt>
+ <dd>
+ <!-- IF S_USERNAME_OPTIONS -->
+ <select name="usernames[]" id="usernames" multiple="multiple" size="5">{S_USERNAME_OPTIONS}</select>
+ <!-- ELSE -->
+ <strong>{L_NO_FRIENDS}</strong>
+ <!-- ENDIF -->
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="add">{L_ADD_FRIENDS}:</label><br /><span>{L_ADD_FRIENDS_EXPLAIN}</span></dt>
+ <dd><textarea name="add" id="add" rows="3" cols="30" class="inputbox">{USERNAMES}</textarea></dd>
+ <dd><strong><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></strong></dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
+</fieldset>
+</form>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
new file mode 100644
index 0000000000..70fd5c8496
--- /dev/null
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -0,0 +1,218 @@
+<!-- INCLUDE overall_header.html -->
+<!-- IF U_MCP --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF -->
+<h2><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>
+
+<!-- IF FORUM_DESC or MODERATORS or U_MCP -->
+<div>
+ <!-- NOTE: remove the style="display: none" when you want to have the forum description on the forum body -->
+ <!-- IF FORUM_DESC --><div style="display: none !important;">{FORUM_DESC}<br /></div><!-- ENDIF -->
+ <!-- IF MODERATORS --><strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->:</strong> {MODERATORS}<!-- ENDIF -->
+</div>
+<!-- ENDIF -->
+
+<!-- IF S_FORUM_RULES -->
+ <div class="rules">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <!-- IF U_FORUM_RULES -->
+ <a href="{U_FORUM_RULES}">{L_FORUM_RULES}</a>
+ <!-- ELSE -->
+ <strong>{L_FORUM_RULES}</strong><br />
+ {FORUM_RULES}
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+<!-- ENDIF -->
+
+<!-- IF S_HAS_SUBFORUM -->
+<!-- IF not S_IS_BOT and U_MARK_FORUMS -->
+<ul class="linklist">
+ <li class="rightside"><a href="{U_MARK_FORUMS}">{L_MARK_FORUMS_READ}</a></li>
+</ul>
+<!-- ENDIF -->
+ <!-- INCLUDE forumlist_body.html -->
+<!-- ENDIF -->
+
+<!-- IF S_DISPLAY_POST_INFO or PAGINATION or TOTAL_POSTS or TOTAL_TOPICS -->
+ <div class="topic-actions" <!-- IF S_HAS_SUBFORUM -->style="margin-top: 2em;"<!-- ENDIF -->>
+
+ <!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
+ <div class="buttons">
+ <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->"><a href="{U_POST_NEW_TOPIC}" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF --></a></div>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF S_DISPLAY_SEARCHBOX -->
+ <div class="search-box">
+ <form method="post" id="forum-search" action="{S_SEARCHBOX_ACTION}">
+ <fieldset>
+ <input class="inputbox search tiny" type="text" name="keywords" id="search_keywords" size="20" value="{L_SEARCH_FORUM}" onclick="if (this.value == '{LA_SEARCH_FORUM}') this.value = '';" onblur="if (this.value == '') this.value = '{LA_SEARCH_FORUM}';" />
+ <input class="button2" type="submit" value="{L_SEARCH}" />
+ <input type="hidden" value="{FORUM_ID}" name="fid[]" />
+ </fieldset>
+ </form>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF PAGINATION or TOTAL_POSTS or TOTAL_TOPICS -->
+ <div class="pagination">
+ <!-- IF not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}" accesskey="m">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF --><!-- IF TOTAL_TOPICS -->{TOTAL_TOPICS}<!-- ENDIF -->
+ <!-- IF PAGE_NUMBER -->
+ <!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->
+ <!-- ENDIF -->
+ </div>
+ <!-- ENDIF -->
+
+ </div>
+<!-- ENDIF -->
+
+<!-- IF S_NO_READ_ACCESS -->
+
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <strong>{L_NO_READ_ACCESS}</strong>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
+
+ <form action="{S_LOGIN_ACTION}" method="post">
+
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+ <h3><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a><!-- IF S_REGISTER_ENABLED -->&nbsp; &bull; &nbsp;<a href="{U_REGISTER}">{L_REGISTER}</a><!-- ENDIF --></h3>
+
+ <fieldset class="fields1">
+ <dl>
+ <dt><label for="username">{L_USERNAME}:</label></dt>
+ <dd><input type="text" tabindex="1" name="username" id="username" size="25" value="{USERNAME}" class="inputbox autowidth" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="password">{L_PASSWORD}:</label></dt>
+ <dd><input type="password" tabindex="2" id="password" name="password" size="25" class="inputbox autowidth" /></dd>
+ <!-- IF S_AUTOLOGIN_ENABLED --><dd><label for="autologin"><input type="checkbox" name="autologin" id="autologin" tabindex="3" /> {L_LOG_ME_IN}</label></dd><!-- ENDIF -->
+ <dd><label for="viewonline"><input type="checkbox" name="viewonline" id="viewonline" tabindex="4" /> {L_HIDE_ME}</label></dd>
+ </dl>
+ <dl>
+ <dt>&nbsp;</dt>
+ <dd><input type="submit" name="login" tabindex="5" value="{L_LOGIN}" class="button1" /></dd>
+ </dl>
+ </fieldset>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ </form>
+
+ <!-- ENDIF -->
+
+<!-- ENDIF -->
+
+<!-- BEGIN topicrow -->
+
+ <!-- IF not topicrow.S_TOPIC_TYPE_SWITCH and not topicrow.S_FIRST_ROW -->
+ </ul>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF topicrow.S_FIRST_ROW or not topicrow.S_TOPIC_TYPE_SWITCH -->
+ <div class="forumbg<!-- IF topicrow.S_TOPIC_TYPE_SWITCH --> announcement<!-- ENDIF -->">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <ul class="topiclist">
+ <li class="header">
+ <dl class="icon">
+ <dt><!-- IF S_DISPLAY_ACTIVE -->{L_ACTIVE_TOPICS}<!-- ELSEIF topicrow.S_TOPIC_TYPE_SWITCH and topicrow.S_TOPIC_TYPE gt 1 -->{L_ANNOUNCEMENTS}<!-- ELSE -->{L_TOPICS}<!-- ENDIF --></dt>
+ <dd class="posts">{L_REPLIES}</dd>
+ <dd class="views">{L_VIEWS}</dd>
+ <dd class="lastpost"><span>{L_LAST_POST}</span></dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist topics">
+ <!-- ENDIF -->
+
+ <li class="row<!-- IF topicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE --> announce<!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --> sticky<!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ENDIF -->">
+ <dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
+ <dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
+ <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
+ <!-- IF topicrow.PAGINATION --><strong class="pagination"><span>{topicrow.PAGINATION}</span></strong><!-- ENDIF -->
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+ </dt>
+ <dd class="posts">{topicrow.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
+ <dd class="views">{topicrow.VIEWS} <dfn>{L_VIEWS}</dfn></dd>
+ <dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
+ <!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{topicrow.LAST_POST_TIME}</span>
+ </dd>
+ </dl>
+ </li>
+
+ <!-- IF topicrow.S_LAST_ROW -->
+ </ul>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
+
+<!-- BEGINELSE -->
+ <!-- IF S_IS_POSTABLE -->
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <strong>{L_NO_TOPICS}</strong>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+ <!-- ENDIF -->
+<!-- END topicrow -->
+
+<!-- IF S_SELECT_SORT_DAYS and not S_DISPLAY_ACTIVE -->
+ <form method="post" action="{S_FORUM_ACTION}">
+ <fieldset class="display-options">
+ <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF not S_IS_BOT -->
+ <label>{L_DISPLAY_TOPICS}: {S_SELECT_SORT_DAYS}</label>
+ <label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
+ <label>{S_SELECT_SORT_DIR} <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
+ <!-- ENDIF -->
+ </fieldset>
+ </form>
+ <hr />
+<!-- ENDIF -->
+
+<!-- IF .topicrow and not S_DISPLAY_ACTIVE -->
+ <div class="topic-actions">
+ <!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
+ <div class="buttons">
+ <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->"><a href="{U_POST_NEW_TOPIC}"><span></span><!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF --></a></div>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF PAGINATION or TOTAL_POSTS or TOTAL_TOPICS -->
+ <div class="pagination">
+ <!-- IF TOTAL_TOPICS and not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF -->
+ <!-- IF TOTAL_POSTS and not NEWEST_USER --> {TOTAL_POSTS}<!-- ELSEIF TOTAL_TOPICS and not NEWEST_USER --> {TOTAL_TOPICS}<!-- ENDIF -->
+ <!-- IF TOTAL_USERS -->{TOTAL_USERS}<!-- ENDIF -->
+ <!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a>
+ &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->
+ </div>
+ <!-- ENDIF -->
+ </div>
+<!-- ENDIF -->
+
+<!-- INCLUDE jumpbox.html -->
+
+<!-- IF S_DISPLAY_ONLINE_LIST -->
+ <h3><!-- IF U_VIEWONLINE --><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a><!-- ELSE -->{L_WHO_IS_ONLINE}<!-- ENDIF --></h3>
+ <p>{LOGGED_IN_USER_LIST}</p>
+<!-- ENDIF -->
+
+<!-- IF S_DISPLAY_POST_INFO -->
+ <h3>{L_FORUM_PERMISSIONS}</h3>
+ <p><!-- BEGIN rules -->{rules.RULE}<br /><!-- END rules --></p>
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/viewonline_body.html b/phpBB/styles/prosilver/template/viewonline_body.html
new file mode 100644
index 0000000000..b111d743f9
--- /dev/null
+++ b/phpBB/styles/prosilver/template/viewonline_body.html
@@ -0,0 +1,57 @@
+<!-- INCLUDE overall_header.html -->
+
+<h2>{TOTAL_REGISTERED_USERS_ONLINE}</h2>
+<p>{TOTAL_GUEST_USERS_ONLINE}<!-- IF S_SWITCH_GUEST_DISPLAY --> &bull; <a href="{U_SWITCH_GUEST_DISPLAY}">{L_SWITCH_GUEST_DISPLAY}</a><!-- ENDIF --></p>
+
+<ul class="linklist">
+ <li class="rightside pagination"><!-- IF PAGINATION --><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE -->{PAGE_NUMBER}<!-- ENDIF --></li>
+</ul>
+
+<div class="forumbg">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <table class="table1" cellspacing="1">
+
+ <!-- IF .user_row -->
+ <thead>
+ <tr>
+ <th class="name"><a href="{U_SORT_USERNAME}">{L_USERNAME}</a></th>
+ <th class="info"><a href="{U_SORT_LOCATION}">{L_FORUM_LOCATION}</a></th>
+ <th class="active"><a href="{U_SORT_UPDATED}">{L_LAST_UPDATED}</a></th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN user_row -->
+ <tr class="<!-- IF user_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <td>{user_row.USERNAME_FULL}<!-- IF user_row.USER_IP --> <span style="margin-left: 30px;">{L_IP}: <a href="{user_row.U_USER_IP}">{user_row.USER_IP}</a> &#187; <a href="{user_row.U_WHOIS}" onclick="popup(this.href, 750, 500); return false;">{L_WHOIS}</a></span><!-- ENDIF -->
+ <!-- IF user_row.USER_BROWSER --><br />{user_row.USER_BROWSER}<!-- ENDIF --></td>
+ <td class="info"><a href="{user_row.U_FORUM_LOCATION}">{user_row.FORUM_LOCATION}</a></td>
+ <td class="active">{user_row.LASTUPDATE}</td>
+ </tr>
+ <!-- END user_row -->
+ <!-- ELSE -->
+ <tbody>
+ <tr class="bg1">
+ <td colspan="3">{L_NO_ONLINE_USERS}<!-- IF S_SWITCH_GUEST_DISPLAY --> &bull; <a href="{U_SWITCH_GUEST_DISPLAY}">{L_SWITCH_GUEST_DISPLAY}</a><!-- ENDIF --></td>
+ </tr>
+ <!-- ENDIF -->
+ </tbody>
+ </table>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- IF PREVIOUS_PAGE or NEXT_PAGE -->
+<fieldset class="display-options right-box">
+ <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ELSE -->{L_PREVIOUS}<!-- ENDIF --> &bull; <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ELSE -->{L_NEXT}<!-- ENDIF -->
+</fieldset>
+<!-- ENDIF -->
+
+<!-- IF LEGEND --><p><em>{L_LEGEND}: {LEGEND}</em></p><!-- ENDIF -->
+
+<ul class="linklist">
+ <li class="rightside pagination"><!-- IF PAGINATION --><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE -->{PAGE_NUMBER}<!-- ENDIF --></li>
+</ul>
+
+<!-- INCLUDE jumpbox.html -->
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/viewonline_whois.html b/phpBB/styles/prosilver/template/viewonline_whois.html
new file mode 100644
index 0000000000..a9c6473727
--- /dev/null
+++ b/phpBB/styles/prosilver/template/viewonline_whois.html
@@ -0,0 +1,16 @@
+<!-- INCLUDE simple_header.html -->
+
+<h2>{L_WHOIS}</h2>
+
+<div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="postbody"><div class="content">
+ <pre>{WHOIS}</pre>
+ </div></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+<a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>
+
+<!-- INCLUDE simple_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
new file mode 100644
index 0000000000..24c57b9a7e
--- /dev/null
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -0,0 +1,275 @@
+<!-- INCLUDE overall_header.html -->
+<!-- IF U_MCP --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF -->
+<h2><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
+<!-- NOTE: remove the style="display: none" when you want to have the forum description on the topic body -->
+<!-- IF FORUM_DESC --><div style="display: none !important;">{FORUM_DESC}<br /></div><!-- ENDIF -->
+
+<!-- IF MODERATORS or U_MCP -->
+ <p>
+ <!-- IF MODERATORS -->
+ <strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->:</strong> {MODERATORS}
+ <!-- ENDIF -->
+
+ </p>
+<!-- ENDIF -->
+
+<!-- IF S_FORUM_RULES -->
+ <div class="rules">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <!-- IF U_FORUM_RULES -->
+ <a href="{U_FORUM_RULES}">{L_FORUM_RULES}</a>
+ <!-- ELSE -->
+ <strong>{L_FORUM_RULES}</strong><br />
+ {FORUM_RULES}
+ <!-- ENDIF -->
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+<!-- ENDIF -->
+
+<div class="topic-actions">
+
+ <div class="buttons">
+ <!-- IF not S_IS_BOT and S_DISPLAY_REPLY_INFO -->
+ <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED_SHORT}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></a></div>
+ <!-- ENDIF -->
+ </div>
+
+ <!-- IF S_DISPLAY_SEARCHBOX -->
+ <div class="search-box">
+ <form method="post" id="topic-search" action="{S_SEARCHBOX_ACTION}">
+ <fieldset>
+ <input class="inputbox search tiny" type="text" name="keywords" id="search_keywords" size="20" value="{L_SEARCH_TOPIC}" onclick="if(this.value=='{LA_SEARCH_TOPIC}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_TOPIC}';" />
+ <input class="button2" type="submit" value="{L_SEARCH}" />
+ <input type="hidden" value="{TOPIC_ID}" name="t" />
+ <input type="hidden" value="msgonly" name="sf" />
+ </fieldset>
+ </form>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF PAGINATION or TOTAL_POSTS -->
+ <div class="pagination">
+ <!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </div>
+ <!-- ENDIF -->
+
+</div>
+<div class="clear"></div>
+
+<!-- IF S_HAS_POLL -->
+ <form method="post" action="{S_POLL_ACTION}">
+
+ <div class="panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="content">
+ <h2>{POLL_QUESTION}</h2>
+ <p class="author">{L_POLL_LENGTH}<!-- IF S_CAN_VOTE and L_POLL_LENGTH --><br /><!-- ENDIF --><!-- IF S_CAN_VOTE -->{L_MAX_VOTES}<!-- ENDIF --></p>
+
+ <fieldset class="polls">
+ <!-- BEGIN poll_option -->
+ <dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF -->>
+ <dt><!-- IF S_CAN_VOTE --><label for="vote_{poll_option.POLL_OPTION_ID}">{poll_option.POLL_OPTION_CAPTION}</label><!-- ELSE -->{poll_option.POLL_OPTION_CAPTION}<!-- ENDIF --></dt>
+ <!-- IF S_CAN_VOTE --><dd style="width: auto;"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></dd><!-- ENDIF -->
+ <!-- IF S_DISPLAY_RESULTS --><dd class="resultbar"><div class="<!-- IF poll_option.POLL_OPTION_PCT < 20 -->pollbar1<!-- ELSEIF poll_option.POLL_OPTION_PCT < 40 -->pollbar2<!-- ELSEIF poll_option.POLL_OPTION_PCT < 60 -->pollbar3<!-- ELSEIF poll_option.POLL_OPTION_PCT < 80 -->pollbar4<!-- ELSE -->pollbar5<!-- ENDIF -->" style="width:{poll_option.POLL_OPTION_PERCENT};">{poll_option.POLL_OPTION_RESULT}</div></dd>
+ <dd><!-- IF poll_option.POLL_OPTION_RESULT == 0 -->{L_NO_VOTES}<!-- ELSE -->{poll_option.POLL_OPTION_PERCENT}<!-- ENDIF --></dd><!-- ENDIF -->
+ </dl>
+ <!-- END poll_option -->
+
+ <!-- IF S_DISPLAY_RESULTS -->
+ <dl>
+ <dt>&nbsp;</dt>
+ <dd class="resultbar">{L_TOTAL_VOTES} : {TOTAL_VOTES}</dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF S_CAN_VOTE -->
+ <dl style="border-top: none;">
+ <dt>&nbsp;</dt>
+ <dd class="resultbar"><input type="submit" name="update" value="{L_SUBMIT_VOTE}" class="button1" /></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF not S_DISPLAY_RESULTS -->
+ <dl style="border-top: none;">
+ <dt>&nbsp;</dt>
+ <dd class="resultbar"><a href="{U_VIEW_RESULTS}">{L_VIEW_RESULTS}</a></dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+ </div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ {S_FORM_TOKEN}
+ {S_HIDDEN_FIELDS}
+ </div>
+
+
+ </form>
+ <hr />
+<!-- ENDIF -->
+
+<!-- BEGIN postrow -->
+ <!-- IF postrow.S_FIRST_UNREAD --><a id="unread"></a><!-- ENDIF -->
+ <div id="p{postrow.POST_ID}" class="post <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_ONLINE and not postrow.S_IGNORE_POST --> online<!-- ENDIF -->">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <div class="postbody">
+ <!-- IF postrow.S_IGNORE_POST -->
+ <div class="ignore">{postrow.L_IGNORE_POST}</div>
+ <!-- ELSE -->
+
+ <!-- IF not S_IS_BOT -->
+ <!-- IF postrow.U_EDIT or postrow.U_DELETE or postrow.U_REPORT or postrow.U_WARN or postrow.U_INFO or postrow.U_QUOTE -->
+ <ul class="profile-icons">
+ <!-- IF postrow.U_EDIT --><li class="edit-icon"><a href="{postrow.U_EDIT}" title="{L_EDIT_POST}"><span>{L_EDIT_POST}</span></a></li><!-- ENDIF -->
+ <!-- IF postrow.U_DELETE --><li class="delete-icon"><a href="{postrow.U_DELETE}" title="{L_DELETE_POST}"><span>{L_DELETE_POST}</span></a></li><!-- ENDIF -->
+ <!-- IF postrow.U_REPORT --><li class="report-icon"><a href="{postrow.U_REPORT}" title="{L_REPORT_POST}"><span>{L_REPORT_POST}</span></a></li><!-- ENDIF -->
+ <!-- IF postrow.U_WARN --><li class="warn-icon"><a href="{postrow.U_WARN}" title="{L_WARN_USER}"><span>{L_WARN_USER}</span></a></li><!-- ENDIF -->
+ <!-- IF postrow.U_INFO --><li class="info-icon"><a href="{postrow.U_INFO}" title="{L_INFORMATION}"><span>{L_INFORMATION}</span></a></li><!-- ENDIF -->
+ <!-- IF postrow.U_QUOTE --><li class="quote-icon"><a href="{postrow.U_QUOTE}" title="{L_REPLY_WITH_QUOTE}"><span>{L_REPLY_WITH_QUOTE}</span></a></li><!-- ENDIF -->
+ </ul>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+
+ <h3 <!-- IF postrow.S_FIRST_ROW -->class="first"<!-- ENDIF -->><!-- IF postrow.POST_ICON_IMG --><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="" /> <!-- ENDIF --><a href="#p{postrow.POST_ID}">{postrow.POST_SUBJECT}</a></h3>
+ <p class="author"><!-- IF S_IS_BOT -->{postrow.MINI_POST_IMG}<!-- ELSE --><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a><!-- ENDIF -->{L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong> &raquo; {postrow.POST_DATE} </p>
+
+ <!-- IF postrow.S_POST_UNAPPROVED or postrow.S_POST_REPORTED -->
+ <p class="rules">
+ <!-- IF postrow.S_POST_UNAPPROVED -->{UNAPPROVED_IMG} <a href="{postrow.U_MCP_APPROVE}"><strong>{L_POST_UNAPPROVED}</strong></a><br /><!-- ENDIF -->
+ <!-- IF postrow.S_POST_REPORTED -->{REPORTED_IMG} <a href="{postrow.U_MCP_REPORT}"><strong>{L_POST_REPORTED}</strong></a><!-- ENDIF -->
+ </p>
+ <!-- ENDIF -->
+
+ <div class="content">{postrow.MESSAGE}</div>
+
+ <!-- IF postrow.S_HAS_ATTACHMENTS -->
+ <dl class="attachbox">
+ <dt>{L_ATTACHMENTS}</dt>
+ <!-- BEGIN attachment -->
+ <dd>{postrow.attachment.DISPLAY_ATTACHMENT}</dd>
+ <!-- END attachment -->
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF postrow.S_DISPLAY_NOTICE --><div class="rules">{L_DOWNLOAD_NOTICE}</div><!-- ENDIF -->
+ <!-- IF postrow.EDITED_MESSAGE or postrow.EDIT_REASON -->
+ <div class="notice">{postrow.EDITED_MESSAGE}
+ <!-- IF postrow.EDIT_REASON --><br /><strong>{L_REASON}:</strong> <em>{postrow.EDIT_REASON}</em><!-- ENDIF -->
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF postrow.BUMPED_MESSAGE --><div class="notice"><br /><br />{postrow.BUMPED_MESSAGE}</div><!-- ENDIF -->
+ <!-- IF postrow.SIGNATURE --><div id="sig{postrow.POST_ID}" class="signature">{postrow.SIGNATURE}</div><!-- ENDIF -->
+ <!-- ENDIF -->
+
+ </div>
+
+ <!-- IF not postrow.S_IGNORE_POST -->
+ <dl class="postprofile" id="profile{postrow.POST_ID}">
+ <dt>
+ <!-- IF postrow.POSTER_AVATAR -->
+ <!-- IF postrow.U_POST_AUTHOR --><a href="{postrow.U_POST_AUTHOR}">{postrow.POSTER_AVATAR}</a><!-- ELSE -->{postrow.POSTER_AVATAR}<!-- ENDIF --><br />
+ <!-- ENDIF -->
+ <!-- IF not postrow.U_POST_AUTHOR --><strong>{postrow.POST_AUTHOR_FULL}</strong><!-- ELSE -->{postrow.POST_AUTHOR_FULL}<!-- ENDIF -->
+ </dt>
+
+ <!-- IF postrow.RANK_TITLE or postrow.RANK_IMG --><dd>{postrow.RANK_TITLE}<!-- IF postrow.RANK_TITLE and postrow.RANK_IMG --><br /><!-- ENDIF -->{postrow.RANK_IMG}</dd><!-- ENDIF -->
+
+ <dd>&nbsp;</dd>
+
+ <!-- IF postrow.POSTER_POSTS != '' --><dd><strong>{L_POSTS}:</strong> {postrow.POSTER_POSTS}</dd><!-- ENDIF -->
+ <!-- IF postrow.POSTER_JOINED --><dd><strong>{L_JOINED}:</strong> {postrow.POSTER_JOINED}</dd><!-- ENDIF -->
+ <!-- IF postrow.POSTER_FROM --><dd><strong>{L_LOCATION}:</strong> {postrow.POSTER_FROM}</dd><!-- ENDIF -->
+
+ <!-- IF postrow.S_PROFILE_FIELD1 -->
+ <!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
+ <dd><strong>{postrow.PROFILE_FIELD1_NAME}:</strong> {postrow.PROFILE_FIELD1_VALUE}</dd>
+ <!-- ENDIF -->
+
+ <!-- BEGIN custom_fields -->
+ <dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
+ <!-- END custom_fields -->
+
+ <!-- IF not S_IS_BOT -->
+ <!-- IF postrow.U_PM or postrow.U_EMAIL or postrow.U_WWW or postrow.U_MSN or postrow.U_ICQ or postrow.U_YIM or postrow.U_AIM or postrow.U_JABBER -->
+ <dd>
+ <ul class="profile-icons">
+ <!-- IF postrow.U_PM --><li class="pm-icon"><a href="{postrow.U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
+ <!-- IF postrow.U_EMAIL --><li class="email-icon"><a href="{postrow.U_EMAIL}" title="{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}"><span>{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}</span></a></li><!-- ENDIF -->
+ <!-- IF postrow.U_WWW --><li class="web-icon"><a href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}"><span>{L_WEBSITE}</span></a></li><!-- ENDIF -->
+ <!-- IF postrow.U_MSN --><li class="msnm-icon"><a href="{postrow.U_MSN}" onclick="popup(this.href, 550, 320); return false;" title="{L_MSNM}"><span>{L_MSNM}</span></a></li><!-- ENDIF -->
+ <!-- IF postrow.U_ICQ --><li class="icq-icon"><a href="{postrow.U_ICQ}" onclick="popup(this.href, 550, 320); return false;" title="{L_ICQ}"><span>{L_ICQ}</span></a></li><!-- ENDIF -->
+ <!-- IF postrow.U_YIM --><li class="yahoo-icon"><a href="{postrow.U_YIM}" onclick="popup(this.href, 780, 550); return false;" title="{L_YIM}"><span>{L_YIM}</span></a></li><!-- ENDIF -->
+ <!-- IF postrow.U_AIM --><li class="aim-icon"><a href="{postrow.U_AIM}" onclick="popup(this.href, 550, 320); return false;" title="{L_AIM}"><span>{L_AIM}</span></a></li><!-- ENDIF -->
+ <!-- IF postrow.U_JABBER --><li class="jabber-icon"><a href="{postrow.U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span>{L_JABBER}</span></a></li><!-- ENDIF -->
+ </ul>
+ </dd>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+
+ </dl>
+ <!-- ENDIF -->
+
+ <div class="back2top"><a href="#wrap" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></div>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <hr class="divider" />
+<!-- END postrow -->
+<!-- IF S_QUICK_REPLY -->
+ <!-- INCLUDE quickreply_editor.html -->
+<!-- ENDIF -->
+<!-- IF S_NUM_POSTS > 1 or PREVIOUS_PAGE -->
+ <form id="viewtopic" method="post" action="{S_TOPIC_ACTION}">
+
+ <fieldset class="display-options" style="margin-top: 0; ">
+ <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF not S_IS_BOT -->
+ <label>{L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS}</label>
+ <label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label> <label>{S_SELECT_SORT_DIR} <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
+ <!-- ENDIF -->
+ </fieldset>
+
+ </form>
+ <hr />
+<!-- ENDIF -->
+
+<div class="topic-actions">
+ <div class="buttons">
+ <!-- IF not S_IS_BOT and S_DISPLAY_REPLY_INFO -->
+ <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED_SHORT}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></a></div>
+ <!-- ENDIF -->
+ </div>
+
+ <!-- IF PAGINATION or TOTAL_POSTS -->
+ <div class="pagination">
+ {TOTAL_POSTS}
+ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ </div>
+ <!-- ENDIF -->
+</div>
+
+<!-- INCLUDE jumpbox.html -->
+
+<!-- IF S_TOPIC_MOD -->
+ <form method="post" action="{S_MOD_ACTION}">
+ <fieldset class="quickmod">
+ <label for="quick-mod-select">{L_QUICK_MOD}:</label> {S_TOPIC_MOD} <input type="submit" value="{L_GO}" class="button2" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+<!-- ENDIF -->
+
+<!-- IF S_DISPLAY_ONLINE_LIST -->
+ <h3><!-- IF U_VIEWONLINE --><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a><!-- ELSE -->{L_WHO_IS_ONLINE}<!-- ENDIF --></h3>
+ <p>{LOGGED_IN_USER_LIST}</p>
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/viewtopic_print.html b/phpBB/styles/prosilver/template/viewtopic_print.html
new file mode 100644
index 0000000000..be1feb9208
--- /dev/null
+++ b/phpBB/styles/prosilver/template/viewtopic_print.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="content-language" content="{S_USER_LANG}" />
+<meta http-equiv="imagetoolbar" content="no" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
+<meta name="keywords" content="" />
+<meta name="description" content="" />
+<meta name="robots" content="noindex" />
+{META}
+<title>{SITENAME} &bull; {PAGE_TITLE}</title>
+
+<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" />
+</head>
+
+<body id="phpbb">
+<div id="wrap">
+ <a id="top" name="top" accesskey="t"></a>
+
+ <div id="page-header">
+ <h1>{SITENAME}</h1>
+ <p>{SITE_DESCRIPTION}<br /><a href="{U_FORUM}">{U_FORUM}</a></p>
+
+ <h2>{TOPIC_TITLE}</h2>
+ <p><a href="{U_TOPIC}">{U_TOPIC}</a></p>
+ </div>
+
+ <div id="page-body">
+ <div class="page-number">{PAGE_NUMBER}</div>
+ <!-- BEGIN postrow -->
+ <div class="post">
+ <h3>{postrow.POST_SUBJECT}</h3>
+ <div class="date">{postrow.MINI_POST_IMG}{L_POSTED}: <strong>{postrow.POST_DATE}</strong></div>
+ <div class="author">{L_POST_BY_AUTHOR} <strong<!-- IF postrow.POST_AUTHOR_COLOUR --> style="color: {postrow.POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{postrow.POST_AUTHOR}</strong></div>
+ <div class="content">{postrow.MESSAGE}</div>
+ </div>
+ <hr />
+ <!-- END postrow -->
+ </div>
+
+<!--
+ We request you retain the full copyright notice below including the link to www.phpbb.com.
+ This not only gives respect to the large amount of time given freely by the developers
+ but also helps build interest, traffic and use of phpBB3. If you (honestly) cannot retain
+ the full copyright we ask you at least leave in place the "Powered by phpBB" line, with
+ "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our
+ forums may be affected.
+
+ The phpBB Group : 2006
+//-->
+ <div id="page-footer">
+ <div class="page-number">{S_TIMEZONE}<br />{PAGE_NUMBER}</div>
+ <div class="copyright">Powered by phpBB &copy; 2000, 2002, 2005, 2007 phpBB Group<br />http://www.phpbb.com/</div>
+ </div>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css
new file mode 100644
index 0000000000..be7cdab2b9
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/bidi.css
@@ -0,0 +1,750 @@
+/* proSilver RTL definitions
+---------------------------------------- */
+
+/**
+* common.css
+*/
+.rtl h1 {
+ margin-right: 0;
+ margin-left: 200px;
+}
+
+.rtl p.right {
+ text-align: left;
+}
+
+.rtl div.rules ul {
+ margin-left: 0;
+ margin-right: 20px;
+}
+
+/* Main blocks
+---------------------------------------- */
+.rtl #logo {
+ float: right;
+ padding: 10px 10px 0 13px;
+}
+
+/* Search box
+--------------------------------------------- */
+.rtl #search-box {
+ float: left;
+ text-align: left;
+ margin-right: 0;
+ margin-left: 5px;
+}
+
+.rtl #search-box li {
+ text-align: left;
+}
+
+.rtl #search-box img {
+ margin-right: 0;
+ margin-left: 3px;
+}
+
+.rtl #site-description {
+ float: right;
+}
+
+.rtl #site-description h1 {
+ margin-left: 0;
+}
+
+/* Round cornered boxes and backgrounds
+---------------------------------------- */
+.rtl .post {
+ background-position: 0 0;
+}
+
+/* Horizontal lists
+----------------------------------------*/
+.rtl ul.linklist li {
+ float: right;
+ margin-right: 0;
+ margin-left: 5px;
+}
+
+.rtl ul.linklist li.rightside, .rtl p.rightside {
+ float: left;
+ margin-right: 5px;
+ margin-left: 0;
+ text-align: left;
+}
+
+.rtl ul.leftside li, .rtl ul.rightside li {
+ float: left;
+}
+
+.rtl ul.leftside {
+ float: right;
+ margin-left: 5px;
+ margin-right: 0;
+ text-align: right;
+}
+
+.rtl ul.rightside {
+ float: left;
+ margin-left: -5px;
+ margin-right: 5px;
+ text-align: left;
+}
+
+/* Table styles
+----------------------------------------*/
+.rtl table.table1 thead th {
+ padding: 0 3px 4px 0;
+}
+
+.rtl table.table1 thead th span {
+ padding-left: 0;
+ padding-right: 7px;
+}
+
+.rtl table.table1 tbody th {
+ text-align: right;
+}
+
+/* Specific column styles */
+.rtl table.table1 .name { text-align: right; }
+.rtl table.table1 .joined { text-align: right; }
+.rtl table.table1 .active { text-align: right; }
+.rtl table.table1 .info { text-align: right; }
+.rtl table.table1 thead .autocol { padding-left: 0; padding-right: 1em; }
+
+.rtl table.table1 span.rank-img {
+ float: left;
+}
+
+.rtl table.info tbody th {
+ text-align: left;
+}
+
+.rtl .forumbg table.table1 {
+ margin: 0 -1px -1px -2px;
+}
+
+/* Misc layout styles
+---------------------------------------- */
+/* column[1-2] styles are containers for two column layouts
+ Also see tweaks.css */
+.rtl .column1 {
+ float: right;
+ clear: right;
+}
+
+.rtl .column2 {
+ float: left;
+ clear: left;
+}
+
+/* General classes for placing floating blocks */
+.rtl .left-box {
+ float: right;
+ text-align: right;
+}
+
+.rtl .right-box {
+ float: left;
+ text-align: left;
+}
+
+.rtl dl.details dt {
+ float: right;
+ clear: right;
+ text-align: left;
+}
+
+.rtl dl.details dd {
+ margin-right: 0;
+ margin-left: 0;
+ padding-right: 5px;
+ padding-left: 0;
+ float: right;
+}
+
+*:first-child+html dl.details dd {
+ margin-right: 30%;
+ float: none;
+}
+
+* html dl.details dd {
+ margin-right: 30%;
+ float: none;
+}
+
+/* Pagination
+---------------------------------------- */
+.rtl .pagination {
+ text-align: left;
+ float: left;
+ padding-left: 5px;
+}
+
+/* Pagination in viewforum for multipage topics */
+.rtl .row .pagination {
+ float: left;
+ padding: 1px 0 1px 15px;
+}
+
+.rtl .pagination span {
+ direction: ltr;
+}
+
+.rtl .pagination span.page-sep {
+ display: inline;
+ visibility: hidden;
+ position: absolute;
+}
+
+/* Miscellaneous styles
+---------------------------------------- */
+.rtl #forum-permissions {
+ float: left;
+ padding-right: 5px;
+ padding-left: 0;
+ margin-right: 5px;
+ margin-left: 0;
+ text-align: left;
+}
+
+.rtl .forabg {
+ width: 99%; /* fix for IE6 */
+}
+
+.rtl .forumbg {
+ width: 99%; /* fix for IE6 */
+}
+
+/**
+* links.css
+*/
+
+/* Back to top of page */
+.rtl .back2top {
+ text-align: left;
+}
+
+.rtl a.top {
+ float: left;
+}
+
+.rtl a.top2 {
+ padding-left: 0;
+ padding-right: 15px;
+}
+
+.rtl .skiplink {
+ /* invisible skip link, used for accessibility */
+ position: relative;
+ width: 1px;
+ height: 1px;
+ overflow: hidden;
+ display: block;
+ left: 0;
+}
+
+.rtl a.feed-icon-forum {
+ float: left;
+}
+
+/**
+* content.css
+*/
+.rtl ul.topiclist dfn {
+ /* Labels for post/view counts */
+ position: relative;
+ width: 1px;
+ height: 1px;
+ overflow: hidden;
+ display: block;
+ left: 0;
+}
+
+.rtl ul.topiclist dt {
+ float: right;
+}
+
+.rtl ul.topiclist dl {
+ position: static; /* fix for IE6 */
+}
+
+.rtl ul.topiclist dd {
+ float: right;
+ border-right-width: 1px;
+ border-right-style: solid;
+ border-left: none;
+}
+
+.rtl ul.topiclist li.row dt a.subforum {
+ padding-right: 12px;
+ background-position: right;
+ position: static;
+}
+
+.rtl .forum-image {
+ float: right;
+ margin-right: 0;
+ margin-left: 5px;
+}
+
+.rtl li.header dt, .rtl li.header dd {
+ border-right-width: 0;
+}
+
+.rtl li.header dd {
+ margin-left: 0;
+ margin-right: 1px;
+}
+
+.rtl dl.icon {
+ background-position: 99.5% 50%;
+}
+
+.rtl li.header dl.icon dt {
+ /* Tweak for headers alignment when folder icon used */
+ padding-right: 0;
+ padding-left: 50px;
+}
+
+.rtl dl.icon dt {
+ padding-left: 0;
+ padding-right: 45px; /* Space for folder icon */
+ background-position: 99.5% 95%; /* Position of topic icon */
+}
+
+.rtl dd.lastpost span, .rtl ul.topiclist dd.searchby span, .rtl ul.topiclist dd.info span, .rtl ul.topiclist dd.time span, .rtl dd.redirect span, .rtl dd.moderation span {
+ padding-left: 0;
+ padding-right: 5px;
+}
+
+.rtl dd.mark {
+ float: left !important;
+}
+
+.rtl ul.topiclist dd.searchextra {
+ margin-left: 0;
+ margin-right: 5px;
+ border-right: none;
+}
+
+/* Post body styles
+----------------------------------------*/
+.rtl .postbody {
+ float: right;
+}
+
+/* Topic review panel
+----------------------------------------*/
+.rtl #topicreview {
+ padding-right: 0;
+ padding-left: 5px;
+}
+
+/* Content container styles
+----------------------------------------*/
+.rtl .content ul, .rtl .content ol {
+ margin-right: 3em;
+ margin-left: 0;
+}
+
+/* Post author */
+.rtl p.author {
+ margin: 0 0 0.6em 15em;
+}
+
+.rtl .signature {
+ clear: right;
+}
+
+.rtl .notice {
+ clear: right;
+}
+
+/* Jump to post link for now */
+.rtl ul.searchresults {
+ text-align: left;
+}
+
+/* BB Code styles
+----------------------------------------*/
+/* Quote block */
+.rtl blockquote {
+ margin: 0.5em 25px 0 1px;
+ background-position: 99% 5px;
+}
+
+.rtl blockquote blockquote {
+ /* Nested quotes */
+ margin: 0.5em 15px 0 1px;
+}
+
+.rtl blockquote cite {
+ /* Username/source of quoter */
+ margin-right: 20px;
+ margin-left: 0;
+}
+
+.rtl blockquote dl.codebox {
+ margin-right: 0;
+}
+
+.rtl code {
+ direction: ltr;
+}
+
+/* Attachments
+----------------------------------------*/
+.rtl .attachbox {
+ float: right;
+ margin: 5px 0 5px 5px;
+ clear: right;
+}
+
+.rtl .attachbox dd {
+ clear: right;
+}
+
+.rtl .attachbox p {
+ clear: right;
+}
+
+.rtl .attachbox p.stats {
+ clear: right;
+}
+
+/* Post poll styles
+----------------------------------------*/
+.rtl fieldset.polls dt {
+ text-align: right;
+ float: right;
+ border-left: none;
+}
+
+.rtl fieldset.polls dd {
+ float: right;
+ border-right: none;
+ margin-right: 0;
+}
+
+.rtl fieldset.polls dd div {
+ text-align: left;
+}
+
+.rtl .pollbar1, .rtl .pollbar2, .rtl .pollbar3, .rtl .pollbar4, .rtl .pollbar5 {
+ border-left-width: 1px;
+ border-left-style: solid;
+ border-right: none;
+}
+
+/* Poster profile block
+----------------------------------------*/
+.rtl .postprofile {
+ border-left: none;
+ border-right-width: 1px;
+ border-right-style: solid;
+ float: left;
+/* text-align: right; */
+}
+
+.rtl .pm .postprofile {
+ border-right-width: 1px;
+ border-right-style: solid;
+ border-left: none;
+}
+
+.rtl .postprofile dd, .rtl .postprofile dt {
+ margin-left: 0;
+ margin-right: 8px;
+}
+
+.rtl .online {
+ background-position: 0 0;
+}
+
+.rtl dl.pmlist dd {
+ margin-right: 61% !important;
+ margin-left: 0 !important;
+}
+
+/**
+* buttons.css
+*/
+/* Rollover buttons
+ Based on: http://wellstyled.com/css-nopreload-rollovers.html
+----------------------------------------*/
+.rtl .buttons {
+ float: right;
+}
+
+/* Rollover state */
+.rtl .buttons div {
+ margin: 0 1px 0 5px;
+}
+
+/* Sub-header (navigation bar)
+--------------------------------------------- */
+.rtl a.print, .rtl a.sendemail, .rtl a.fontsize {
+ text-align: right;
+}
+
+/* Icon images
+---------------------------------------- */
+.rtl .sitehome, .rtl .icon-faq, .rtl .icon-members, .rtl .icon-home, .rtl .icon-ucp, .rtl .icon-register, .rtl .icon-logout,
+.rtl .icon-bookmark, .rtl .icon-bump, .rtl .icon-subscribe, .rtl .icon-unsubscribe, .rtl .icon-pages, .rtl .icon-search {
+ background-position: 100% 50%;
+ padding: 1px 17px 0 0;
+}
+
+/* Poster profile icons
+----------------------------------------*/
+/* Rollover state */
+.rtl .postprofile ul.profile-icons li {
+ float: right;
+ margin: 0 0 3px 6px;
+}
+
+/* Positioning of moderator icons */
+.rtl .postbody ul.profile-icons {
+ float: left;
+}
+
+/**
+* cp.css
+*/
+/* proSilver Control Panel Styles
+---------------------------------------- */
+
+
+/* Main CP box
+----------------------------------------*/
+.rtl #cp-menu {
+ float: right;
+}
+
+.rtl #cp-main {
+ float: right;
+}
+
+.rtl #cp-main .panel ol {
+ margin-right: 2em;
+ margin-left: 0;
+}
+
+.rtl #cp-main .pagination {
+ float: left;
+}
+
+.rtl #cp-main .buttons {
+ margin-right: 0;
+ margin-left: 0;
+}
+
+/* CP tabbed menu
+----------------------------------------*/
+.rtl #tabs {
+ margin: 20px 7px -1px 0;
+}
+
+.rtl #tabs a {
+ float: right;
+}
+
+/*.rtl #tabs a span {
+ float: right;
+}*/
+
+/* Mini tabbed menu used in MCP
+----------------------------------------*/
+.rtl #minitabs {
+ margin: -20px 0 0 7px;
+}
+
+.rtl #minitabs li {
+ float: left;
+ margin-right: 2px;
+ margin-left: 0;
+}
+
+/* UCP navigation menu
+----------------------------------------*/
+
+/* Preferences pane layout
+----------------------------------------*/
+.rtl #cp-main h2 {
+ margin-left: 0;
+ margin-right: 10px;
+}
+
+/* Friends list */
+.rtl .cp-mini {
+ margin: 10px 5px 10px 15px;
+}
+
+/* PM Styles
+----------------------------------------*/
+
+/* Defined rules list for PM options */
+.rtl ol.def-rules {
+ padding-right: 0;
+}
+
+/* PM marking colours */
+.rtl .pm-legend {
+ border-right-width: 10px;
+ border-right-style: solid;
+ border-left-width: 0;
+ padding-left: 0;
+ padding-right: 3px;
+}
+
+/* Avatar gallery */
+.rtl #gallery label {
+ float: right;
+}
+
+/**
+* forms.css
+*/
+
+/* General form styles
+----------------------------------------*/
+
+.rtl option {
+ padding-right: 0;
+ padding-left: 1em;
+}
+
+.rtl label {
+ padding-right: 0;
+ padding-left: 5px;
+}
+
+/* Definition list layout for forms
+---------------------------------------- */
+.rtl fieldset dt {
+ float: right;
+ text-align: right;
+}
+
+.rtl fieldset dd {
+ margin-left: 0;
+ margin-right: 41%;
+}
+
+/* Specific layout 1 */
+.rtl fieldset.fields1 dt {
+ border-left-width: 0;
+ border-right-width: 1px;
+}
+
+.rtl fieldset.fields1 dd {
+ margin-right: 10em;
+ margin-left: 0;
+ border-right-width: 0;
+ border-left-width: 1px;
+}
+
+/* Specific layout 2 */
+.rtl fieldset.fields2 dt {
+ border-right-width: 1px;
+ border-left-width: 0;
+}
+
+.rtl fieldset.fields2 dd {
+ margin-right: 16em;
+ margin-left: 0;
+ border-left-width: 1px;
+ border-right-width: 0;
+}
+
+/* Form elements */
+.rtl dt label {
+ text-align: right;
+}
+
+.rtl dd input, .rtl dd textarea {
+ margin-left: 3px;
+ margin-right: 0;
+}
+
+/* Quick-login on index page */
+.rtl fieldset.quick-login input.inputbox {
+ margin-left: 5px;
+ margin-right: 0;
+}
+
+.rtl fieldset.quick-login label {
+ padding-left: 2px;
+ padding-right: 0;
+}
+
+/* Display options on viewtopic/viewforum pages */
+.rtl fieldset.display-options label {
+ padding-left: 2px;
+ padding-right: 0;
+}
+
+/* Display actions for ucp and mcp pages */
+.rtl fieldset.display-actions {
+ text-align: left;
+ padding-left: 1em;
+ padding-right: 0;
+}
+
+.rtl fieldset.display-actions label {
+ padding-left: 2px;
+ padding-right: 0;
+}
+
+/* MCP forum selection*/
+.rtl fieldset.forum-selection {
+ float: left;
+}
+
+.rtl fieldset.forum-selection2 {
+ float: left;
+}
+
+/* Jumpbox */
+.rtl fieldset.jumpbox {
+ text-align: left;
+}
+
+.rtl fieldset.quickmod {
+ float: left;
+ text-align: left;
+}
+
+/* Posting page styles
+----------------------------------------*/
+
+/* Emoticons panel */
+.rtl #smiley-box {
+ float: left;
+}
+
+/* Form button styles
+---------------------------------------- */
+
+/* Topic and forum Search */
+.rtl .search-box {
+ margin-right: 5px;
+ margin-left: 0;
+ float: right;
+}
+
+.rtl input.search {
+ background-position: right 1px;
+ padding-right: 17px;
+ padding-left: 0;
+}
+
+/**
+* tweaks.css
+*/
+
+/** Reference: Bug #27155 */
+.rtl #wrap, .rtl .headerbar, .rtl #site-description, .rtl .navbar {
+ position: relative;
+}
diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css
new file mode 100644
index 0000000000..6cffdc5930
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/buttons.css
@@ -0,0 +1,169 @@
+/* proSilver Button Styles
+---------------------------------------- */
+
+/* Rollover buttons
+ Based on: http://wellstyled.com/css-nopreload-rollovers.html
+----------------------------------------*/
+.buttons {
+ float: left;
+ width: auto;
+ height: auto;
+}
+
+/* Rollover state */
+.buttons div {
+ float: left;
+ margin: 0 5px 0 0;
+ background-position: 0 100%;
+}
+
+/* Rolloff state */
+.buttons div a {
+ display: block;
+ width: 100%;
+ height: 100%;
+ background-position: 0 0;
+ position: relative;
+ overflow: hidden;
+}
+
+/* Hide <a> text and hide off-state image when rolling over (prevents flicker in IE) */
+/*.buttons div span { display: none; }*/
+/*.buttons div a:hover { background-image: none; }*/
+.buttons div span { position: absolute; width: 100%; height: 100%; cursor: pointer;}
+.buttons div a:hover span { background-position: 0 100%; }
+
+/* Big button images */
+.reply-icon span { background: transparent none 0 0 no-repeat; }
+.post-icon span { background: transparent none 0 0 no-repeat; }
+.locked-icon span { background: transparent none 0 0 no-repeat; }
+.pmreply-icon span { background: none 0 0 no-repeat; }
+.newpm-icon span { background: none 0 0 no-repeat; }
+.forwardpm-icon span { background: none 0 0 no-repeat; }
+
+/* Set big button dimensions */
+.buttons div.reply-icon { width: {IMG_BUTTON_TOPIC_REPLY_WIDTH}px; height: {IMG_BUTTON_TOPIC_REPLY_HEIGHT}px; }
+.buttons div.post-icon { width: {IMG_BUTTON_TOPIC_NEW_WIDTH}px; height: {IMG_BUTTON_TOPIC_NEW_HEIGHT}px; }
+.buttons div.locked-icon { width: {IMG_BUTTON_TOPIC_LOCKED_WIDTH}px; height: {IMG_BUTTON_TOPIC_LOCKED_HEIGHT}px; }
+.buttons div.pmreply-icon { width: {IMG_BUTTON_PM_REPLY_WIDTH}px; height: {IMG_BUTTON_PM_REPLY_HEIGHT}px; }
+.buttons div.newpm-icon { width: {IMG_BUTTON_PM_NEW_WIDTH}px; height: {IMG_BUTTON_PM_NEW_HEIGHT}px; }
+.buttons div.forwardpm-icon { width: {IMG_BUTTON_PM_FORWARD_WIDTH}px; height: {IMG_BUTTON_PM_FORWARD_HEIGHT}px; }
+
+/* Sub-header (navigation bar)
+--------------------------------------------- */
+a.print, a.sendemail, a.fontsize {
+ display: block;
+ overflow: hidden;
+ height: 18px;
+ text-indent: -5000px;
+ text-align: left;
+ background-repeat: no-repeat;
+}
+
+a.print {
+ background-image: none;
+ width: 22px;
+}
+
+a.sendemail {
+ background-image: none;
+ width: 22px;
+}
+
+a.fontsize {
+ background-image: none;
+ background-position: 0 -1px;
+ width: 29px;
+}
+
+a.fontsize:hover {
+ background-position: 0 -20px;
+ text-decoration: none;
+}
+
+/* Icon images
+---------------------------------------- */
+.sitehome, .icon-faq, .icon-members, .icon-home, .icon-ucp, .icon-register, .icon-logout,
+.icon-bookmark, .icon-bump, .icon-subscribe, .icon-unsubscribe, .icon-pages, .icon-search {
+ background-position: 0 50%;
+ background-repeat: no-repeat;
+ background-image: none;
+ padding: 1px 0 0 17px;
+}
+
+/* Poster profile icons
+----------------------------------------*/
+ul.profile-icons {
+ padding-top: 10px;
+ list-style: none;
+}
+
+/* Rollover state */
+ul.profile-icons li {
+ float: left;
+ margin: 0 6px 3px 0;
+ background-position: 0 100%;
+}
+
+/* Rolloff state */
+ul.profile-icons li a {
+ display: block;
+ width: 100%;
+ height: 100%;
+ background-position: 0 0;
+}
+
+/* Hide <a> text and hide off-state image when rolling over (prevents flicker in IE) */
+ul.profile-icons li span { display:none; }
+ul.profile-icons li a:hover { background: none; }
+
+/* Positioning of moderator icons */
+.postbody ul.profile-icons {
+ float: right;
+ width: auto;
+ padding: 0;
+}
+
+.postbody ul.profile-icons li {
+ margin: 0 3px;
+}
+
+/* Profile & navigation icons */
+.email-icon, .email-icon a { background: none top left no-repeat; }
+.aim-icon, .aim-icon a { background: none top left no-repeat; }
+.yahoo-icon, .yahoo-icon a { background: none top left no-repeat; }
+.web-icon, .web-icon a { background: none top left no-repeat; }
+.msnm-icon, .msnm-icon a { background: none top left no-repeat; }
+.icq-icon, .icq-icon a { background: none top left no-repeat; }
+.jabber-icon, .jabber-icon a { background: none top left no-repeat; }
+.pm-icon, .pm-icon a { background: none top left no-repeat; }
+.quote-icon, .quote-icon a { background: none top left no-repeat; }
+
+/* Moderator icons */
+.report-icon, .report-icon a { background: none top left no-repeat; }
+.warn-icon, .warn-icon a { background: none top left no-repeat; }
+.edit-icon, .edit-icon a { background: none top left no-repeat; }
+.delete-icon, .delete-icon a { background: none top left no-repeat; }
+.info-icon, .info-icon a { background: none top left no-repeat; }
+
+/* Set profile icon dimensions */
+ul.profile-icons li.email-icon { width: {IMG_ICON_CONTACT_EMAIL_WIDTH}px; height: {IMG_ICON_CONTACT_EMAIL_HEIGHT}px; }
+ul.profile-icons li.aim-icon { width: {IMG_ICON_CONTACT_AIM_WIDTH}px; height: {IMG_ICON_CONTACT_AIM_HEIGHT}px; }
+ul.profile-icons li.yahoo-icon { width: {IMG_ICON_CONTACT_YAHOO_WIDTH}px; height: {IMG_ICON_CONTACT_YAHOO_HEIGHT}px; }
+ul.profile-icons li.web-icon { width: {IMG_ICON_CONTACT_WWW_WIDTH}px; height: {IMG_ICON_CONTACT_WWW_HEIGHT}px; }
+ul.profile-icons li.msnm-icon { width: {IMG_ICON_CONTACT_MSNM_WIDTH}px; height: {IMG_ICON_CONTACT_MSNM_HEIGHT}px; }
+ul.profile-icons li.icq-icon { width: {IMG_ICON_CONTACT_ICQ_WIDTH}px; height: {IMG_ICON_CONTACT_ICQ_HEIGHT}px; }
+ul.profile-icons li.jabber-icon { width: {IMG_ICON_CONTACT_JABBER_WIDTH}px; height: {IMG_ICON_CONTACT_JABBER_HEIGHT}px; }
+ul.profile-icons li.pm-icon { width: {IMG_ICON_CONTACT_PM_WIDTH}px; height: {IMG_ICON_CONTACT_PM_HEIGHT}px; }
+ul.profile-icons li.quote-icon { width: {IMG_ICON_POST_QUOTE_WIDTH}px; height: {IMG_ICON_POST_QUOTE_HEIGHT}px; }
+ul.profile-icons li.report-icon { width: {IMG_ICON_POST_REPORT_WIDTH}px; height: {IMG_ICON_POST_REPORT_HEIGHT}px; }
+ul.profile-icons li.edit-icon { width: {IMG_ICON_POST_EDIT_WIDTH}px; height: {IMG_ICON_POST_EDIT_HEIGHT}px; }
+ul.profile-icons li.delete-icon { width: {IMG_ICON_POST_DELETE_WIDTH}px; height: {IMG_ICON_POST_DELETE_HEIGHT}px; }
+ul.profile-icons li.info-icon { width: {IMG_ICON_POST_INFO_WIDTH}px; height: {IMG_ICON_POST_INFO_HEIGHT}px; }
+ul.profile-icons li.warn-icon { width: {IMG_ICON_USER_WARN_WIDTH}px; height: {IMG_ICON_USER_WARN_HEIGHT}px; }
+
+/* Fix profile icon default margins */
+ul.profile-icons li.edit-icon { margin: 0 0 0 3px; }
+ul.profile-icons li.quote-icon { margin: 0 0 0 10px; }
+ul.profile-icons li.info-icon, ul.profile-icons li.report-icon { margin: 0 3px 0 0; }
+
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
new file mode 100644
index 0000000000..2c0606001c
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -0,0 +1,1018 @@
+/*
+--------------------------------------------------------------
+Colours and backgrounds for common.css
+-------------------------------------------------------------- */
+
+html, body {
+ color: #536482;
+ background-color: #FFFFFF;
+}
+
+h1 {
+ color: #FFFFFF;
+}
+
+h2 {
+ color: #28313F;
+}
+
+h3 {
+ border-bottom-color: #CCCCCC;
+ color: #115098;
+}
+
+hr {
+ border-color: #FFFFFF;
+ border-top-color: #CCCCCC;
+}
+
+hr.dashed {
+ border-top-color: #CCCCCC;
+}
+
+/* Search box
+--------------------------------------------- */
+
+#search-box {
+ color: #FFFFFF;
+}
+
+#search-box #keywords {
+ background-color: #FFF;
+}
+
+#search-box input {
+ border-color: #0075B0;
+}
+
+/* Round cornered boxes and backgrounds
+---------------------------------------- */
+.headerbar {
+ background-color: #12A3EB;
+ background-image: url("{T_THEME_PATH}/images/bg_header.gif");
+ color: #FFFFFF;
+}
+
+.navbar {
+ background-color: #cadceb;
+}
+
+.forabg {
+ background-color: #0076b1;
+ background-image: url("{T_THEME_PATH}/images/bg_list.gif");
+}
+
+.forumbg {
+ background-color: #12A3EB;
+ background-image: url("{T_THEME_PATH}/images/bg_header.gif");
+}
+
+.panel {
+ background-color: #ECF1F3;
+ color: #28313F;
+}
+
+.post:target .content {
+ color: #000000;
+}
+
+.post:target h3 a {
+ color: #000000;
+}
+
+.bg1 { background-color: #ECF3F7; }
+.bg2 { background-color: #e1ebf2; }
+.bg3 { background-color: #cadceb; }
+
+.ucprowbg {
+ background-color: #DCDEE2;
+}
+
+.fieldsbg {
+ background-color: #E7E8EA;
+}
+
+span.corners-top {
+ background-image: url("{T_THEME_PATH}/images/corners_left.png");
+}
+
+span.corners-top span {
+ background-image: url("{T_THEME_PATH}/images/corners_right.png");
+}
+
+span.corners-bottom {
+ background-image: url("{T_THEME_PATH}/images/corners_left.png");
+}
+
+span.corners-bottom span {
+ background-image: url("{T_THEME_PATH}/images/corners_right.png");
+}
+
+/* Horizontal lists
+----------------------------------------*/
+
+ul.navlinks {
+ border-bottom-color: #FFFFFF;
+}
+
+/* Table styles
+----------------------------------------*/
+table.table1 thead th {
+ color: #FFFFFF;
+}
+
+table.table1 tbody tr {
+ border-color: #BFC1CF;
+}
+
+table.table1 tbody tr:hover, table.table1 tbody tr.hover {
+ background-color: #CFE1F6;
+ color: #000;
+}
+
+table.table1 td {
+ color: #536482;
+}
+
+table.table1 tbody td {
+ border-top-color: #FAFAFA;
+}
+
+table.table1 tbody th {
+ border-bottom-color: #000000;
+ color: #333333;
+ background-color: #FFFFFF;
+}
+
+table.info tbody th {
+ color: #000000;
+}
+
+/* Misc layout styles
+---------------------------------------- */
+dl.details dt {
+ color: #000000;
+}
+
+dl.details dd {
+ color: #536482;
+}
+
+.sep {
+ color: #1198D9;
+}
+
+/* Pagination
+---------------------------------------- */
+
+.pagination span strong {
+ color: #FFFFFF;
+ background-color: #4692BF;
+ border-color: #4692BF;
+}
+
+.pagination span a, .pagination span a:link, .pagination span a:visited, .pagination span a:active {
+ color: #5C758C;
+ background-color: #ECEDEE;
+ border-color: #B4BAC0;
+}
+
+.pagination span a:hover {
+ border-color: #368AD2;
+ background-color: #368AD2;
+ color: #FFF;
+}
+
+/* Pagination in viewforum for multipage topics */
+.row .pagination {
+ background-image: url("{T_THEME_PATH}/images/icon_pages.gif");
+}
+
+.row .pagination span a, li.pagination span a {
+ background-color: #FFFFFF;
+}
+
+.row .pagination span a:hover, li.pagination span a:hover {
+ background-color: #368AD2;
+}
+
+/* Miscellaneous styles
+---------------------------------------- */
+
+.copyright {
+ color: #555555;
+}
+
+.error {
+ color: #BC2A4D;
+}
+
+.reported {
+ background-color: #F7ECEF;
+}
+
+li.reported:hover {
+ background-color: #ECD5D8 !important;
+}
+.sticky, .announce {
+ /* you can add a background for stickies and announcements*/
+}
+
+div.rules {
+ background-color: #ECD5D8;
+ color: #BC2A4D;
+}
+
+p.rules {
+ background-color: #ECD5D8;
+ background-image: none;
+}
+
+/*
+--------------------------------------------------------------
+Colours and backgrounds for links.css
+-------------------------------------------------------------- */
+
+a:link { color: #105289; }
+a:visited { color: #105289; }
+a:hover { color: #D31141; }
+a:active { color: #368AD2; }
+
+/* Links on gradient backgrounds */
+#search-box a:link, .navbg a:link, .forumbg .header a:link, .forabg .header a:link, th a:link {
+ color: #FFFFFF;
+}
+
+#search-box a:visited, .navbg a:visited, .forumbg .header a:visited, .forabg .header a:visited, th a:visited {
+ color: #FFFFFF;
+}
+
+#search-box a:hover, .navbg a:hover, .forumbg .header a:hover, .forabg .header a:hover, th a:hover {
+ color: #A8D8FF;
+}
+
+#search-box a:active, .navbg a:active, .forumbg .header a:active, .forabg .header a:active, th a:active {
+ color: #C8E6FF;
+}
+
+/* Links for forum/topic lists */
+a.forumtitle {
+ color: #105289;
+}
+
+/* a.forumtitle:visited { color: #105289; } */
+
+a.forumtitle:hover {
+ color: #BC2A4D;
+}
+
+a.forumtitle:active {
+ color: #105289;
+}
+
+a.topictitle {
+ color: #105289;
+}
+
+/* a.topictitle:visited { color: #368AD2; } */
+
+a.topictitle:hover {
+ color: #BC2A4D;
+}
+
+a.topictitle:active {
+ color: #105289;
+}
+
+/* Post body links */
+.postlink {
+ color: #368AD2;
+ border-bottom-color: #368AD2;
+}
+
+.postlink:visited {
+ color: #5D8FBD;
+ border-bottom-color: #666666;
+}
+
+.postlink:active {
+ color: #368AD2;
+}
+
+.postlink:hover {
+ background-color: #D0E4F6;
+ color: #0D4473;
+}
+
+.signature a, .signature a:visited, .signature a:active, .signature a:hover {
+ background-color: transparent;
+}
+
+/* Profile links */
+.postprofile a:link, .postprofile a:active, .postprofile a:visited, .postprofile dt.author a {
+ color: #105289;
+}
+
+.postprofile a:hover, .postprofile dt.author a:hover {
+ color: #D31141;
+}
+
+/* Profile searchresults */
+.search .postprofile a {
+ color: #105289;
+}
+
+.search .postprofile a:hover {
+ color: #D31141;
+}
+
+/* Back to top of page */
+a.top {
+ background-image: url("{IMG_ICON_BACK_TOP_SRC}");
+}
+
+a.top2 {
+ background-image: url("{IMG_ICON_BACK_TOP_SRC}");
+}
+
+/* Arrow links */
+a.up { background-image: url("{T_THEME_PATH}/images/arrow_up.gif") }
+a.down { background-image: url("{T_THEME_PATH}/images/arrow_down.gif") }
+a.left { background-image: url("{T_THEME_PATH}/images/arrow_left.gif") }
+a.right { background-image: url("{T_THEME_PATH}/images/arrow_right.gif") }
+
+a.up:hover {
+ background-color: transparent;
+}
+
+a.left:hover {
+ color: #368AD2;
+}
+
+a.right:hover {
+ color: #368AD2;
+}
+
+
+/*
+--------------------------------------------------------------
+Colours and backgrounds for content.css
+-------------------------------------------------------------- */
+
+ul.forums {
+ background-color: #eef5f9;
+ background-image: url("{T_THEME_PATH}/images/gradient.gif");
+}
+
+ul.topiclist li {
+ color: #4C5D77;
+}
+
+ul.topiclist dd {
+ border-left-color: #FFFFFF;
+}
+
+.rtl ul.topiclist dd {
+ border-right-color: #fff;
+ border-left-color: transparent;
+}
+
+ul.topiclist li.row dt a.subforum.read {
+ background-image: url("{IMG_SUBFORUM_READ_SRC}");
+}
+
+ul.topiclist li.row dt a.subforum.unread {
+ background-image: url("{IMG_SUBFORUM_UNREAD_SRC}");
+}
+
+li.row {
+ border-top-color: #FFFFFF;
+ border-bottom-color: #00608F;
+}
+
+li.row strong {
+ color: #000000;
+}
+
+li.row:hover {
+ background-color: #F6F4D0;
+}
+
+li.row:hover dd {
+ border-left-color: #CCCCCC;
+}
+
+.rtl li.row:hover dd {
+ border-right-color: #CCCCCC;
+ border-left-color: transparent;
+}
+
+li.header dt, li.header dd {
+ color: #FFFFFF;
+}
+
+/* Forum list column styles */
+ul.topiclist dd.searchextra {
+ color: #333333;
+}
+
+/* Post body styles
+----------------------------------------*/
+.postbody {
+ color: #333333;
+}
+
+/* Content container styles
+----------------------------------------*/
+.content {
+ color: #333333;
+}
+
+.content h2, .panel h2 {
+ color: #115098;
+ border-bottom-color: #CCCCCC;
+}
+
+dl.faq dt {
+ color: #333333;
+}
+
+.posthilit {
+ background-color: #F3BFCC;
+ color: #BC2A4D;
+}
+
+/* Post signature */
+.signature {
+ border-top-color: #CCCCCC;
+}
+
+/* Post noticies */
+.notice {
+ border-top-color: #CCCCCC;
+}
+
+/* BB Code styles
+----------------------------------------*/
+/* Quote block */
+blockquote {
+ background-color: #EBEADD;
+ background-image: url("{T_THEME_PATH}/images/quote.gif");
+ border-color:#DBDBCE;
+}
+
+.rtl blockquote {
+ background-image: url("{T_THEME_PATH}/images/quote_rtl.gif");
+}
+
+blockquote blockquote {
+ /* Nested quotes */
+ background-color:#EFEED9;
+}
+
+blockquote blockquote blockquote {
+ /* Nested quotes */
+ background-color: #EBEADD;
+}
+
+/* Code block */
+dl.codebox {
+ background-color: #FFFFFF;
+ border-color: #C9D2D8;
+}
+
+dl.codebox dt {
+ border-bottom-color: #CCCCCC;
+}
+
+dl.codebox code {
+ color: #2E8B57;
+}
+
+.syntaxbg { color: #FFFFFF; }
+.syntaxcomment { color: #FF8000; }
+.syntaxdefault { color: #0000BB; }
+.syntaxhtml { color: #000000; }
+.syntaxkeyword { color: #007700; }
+.syntaxstring { color: #DD0000; }
+
+/* Attachments
+----------------------------------------*/
+.attachbox {
+ background-color: #FFFFFF;
+ border-color: #C9D2D8;
+}
+
+.pm-message .attachbox {
+ background-color: #F2F3F3;
+}
+
+.attachbox dd {
+ border-top-color: #C9D2D8;
+}
+
+.attachbox p {
+ color: #666666;
+}
+
+.attachbox p.stats {
+ color: #666666;
+}
+
+.attach-image img {
+ border-color: #999999;
+}
+
+/* Inline image thumbnails */
+
+dl.file dd {
+ color: #666666;
+}
+
+dl.thumbnail img {
+ border-color: #666666;
+ background-color: #FFFFFF;
+}
+
+dl.thumbnail dd {
+ color: #666666;
+}
+
+dl.thumbnail dt a:hover {
+ background-color: #EEEEEE;
+}
+
+dl.thumbnail dt a:hover img {
+ border-color: #368AD2;
+}
+
+/* Post poll styles
+----------------------------------------*/
+
+fieldset.polls dl {
+ border-top-color: #DCDEE2;
+ color: #666666;
+}
+
+fieldset.polls dl.voted {
+ color: #000000;
+}
+
+fieldset.polls dd div {
+ color: #FFFFFF;
+}
+
+.rtl .pollbar1, .rtl .pollbar2, .rtl .pollbar3, .rtl .pollbar4, .rtl .pollbar5 {
+ border-right-color: transparent;
+}
+
+.pollbar1 {
+ background-color: #AA2346;
+ border-bottom-color: #74162C;
+ border-right-color: #74162C;
+}
+
+.rtl .pollbar1 {
+ border-left-color: #74162C;
+}
+
+.pollbar2 {
+ background-color: #BE1E4A;
+ border-bottom-color: #8C1C38;
+ border-right-color: #8C1C38;
+}
+
+.rtl .pollbar2 {
+ border-left-color: #8C1C38;
+}
+
+.pollbar3 {
+ background-color: #D11A4E;
+ border-bottom-color: #AA2346;
+ border-right-color: #AA2346;
+}
+
+.rtl .pollbar3 {
+ border-left-color: #AA2346;
+}
+
+.pollbar4 {
+ background-color: #E41653;
+ border-bottom-color: #BE1E4A;
+ border-right-color: #BE1E4A;
+}
+
+.rtl .pollbar4 {
+ border-left-color: #BE1E4A;
+}
+
+.pollbar5 {
+ background-color: #F81157;
+ border-bottom-color: #D11A4E;
+ border-right-color: #D11A4E;
+}
+
+.rtl .pollbar5 {
+ border-left-color: #D11A4E;
+}
+
+/* Poster profile block
+----------------------------------------*/
+.postprofile {
+ color: #666666;
+ border-left-color: #FFFFFF;
+}
+
+.rtl .postprofile {
+ border-right-color: #FFFFFF;
+ border-left-color: transparent;
+}
+
+.pm .postprofile {
+ border-left-color: #DDDDDD;
+}
+
+.rtl .pm .postprofile {
+ border-right-color: #DDDDDD;
+ border-left-color: transparent;
+}
+
+.postprofile strong {
+ color: #000000;
+}
+
+.online {
+ background-image: url("{T_IMAGESET_LANG_PATH}/icon_user_online.gif");
+}
+
+/*
+--------------------------------------------------------------
+Colours and backgrounds for buttons.css
+-------------------------------------------------------------- */
+
+/* Big button images */
+.reply-icon span { background-image: url("{IMG_BUTTON_TOPIC_REPLY_SRC}"); }
+.post-icon span { background-image: url("{IMG_BUTTON_TOPIC_NEW_SRC}"); }
+.locked-icon span { background-image: url("{IMG_BUTTON_TOPIC_LOCKED_SRC}"); }
+.pmreply-icon span { background-image: url("{IMG_BUTTON_PM_REPLY_SRC}") ;}
+.newpm-icon span { background-image: url("{IMG_BUTTON_PM_NEW_SRC}") ;}
+.forwardpm-icon span { background-image: url("{IMG_BUTTON_PM_FORWARD_SRC}") ;}
+
+a.print {
+ background-image: url("{T_THEME_PATH}/images/icon_print.gif");
+}
+
+a.sendemail {
+ background-image: url("{T_THEME_PATH}/images/icon_sendemail.gif");
+}
+
+a.fontsize {
+ background-image: url("{T_THEME_PATH}/images/icon_fontsize.gif");
+}
+
+/* Icon images
+---------------------------------------- */
+.sitehome { background-image: url("{T_THEME_PATH}/images/icon_home.gif"); }
+.icon-faq { background-image: url("{T_THEME_PATH}/images/icon_faq.gif"); }
+.icon-members { background-image: url("{T_THEME_PATH}/images/icon_members.gif"); }
+.icon-home { background-image: url("{T_THEME_PATH}/images/icon_home.gif"); }
+.icon-ucp { background-image: url("{T_THEME_PATH}/images/icon_ucp.gif"); }
+.icon-register { background-image: url("{T_THEME_PATH}/images/icon_register.gif"); }
+.icon-logout { background-image: url("{T_THEME_PATH}/images/icon_logout.gif"); }
+.icon-bookmark { background-image: url("{T_THEME_PATH}/images/icon_bookmark.gif"); }
+.icon-bump { background-image: url("{T_THEME_PATH}/images/icon_bump.gif"); }
+.icon-subscribe { background-image: url("{T_THEME_PATH}/images/icon_subscribe.gif"); }
+.icon-unsubscribe { background-image: url("{T_THEME_PATH}/images/icon_unsubscribe.gif"); }
+.icon-pages { background-image: url("{T_THEME_PATH}/images/icon_pages.gif"); }
+.icon-search { background-image: url("{T_THEME_PATH}/images/icon_search.gif"); }
+
+/* Profile & navigation icons */
+.email-icon, .email-icon a { background-image: url("{IMG_ICON_CONTACT_EMAIL_SRC}"); }
+.aim-icon, .aim-icon a { background-image: url("{IMG_ICON_CONTACT_AIM_SRC}"); }
+.yahoo-icon, .yahoo-icon a { background-image: url("{IMG_ICON_CONTACT_YAHOO_SRC}"); }
+.web-icon, .web-icon a { background-image: url("{IMG_ICON_CONTACT_WWW_SRC}"); }
+.msnm-icon, .msnm-icon a { background-image: url("{IMG_ICON_CONTACT_MSNM_SRC}"); }
+.icq-icon, .icq-icon a { background-image: url("{IMG_ICON_CONTACT_ICQ_SRC}"); }
+.jabber-icon, .jabber-icon a { background-image: url("{IMG_ICON_CONTACT_JABBER_SRC}"); }
+.pm-icon, .pm-icon a { background-image: url("{IMG_ICON_CONTACT_PM_SRC}"); }
+.quote-icon, .quote-icon a { background-image: url("{IMG_ICON_POST_QUOTE_SRC}"); }
+
+/* Moderator icons */
+.report-icon, .report-icon a { background-image: url("{IMG_ICON_POST_REPORT_SRC}"); }
+.edit-icon, .edit-icon a { background-image: url("{IMG_ICON_POST_EDIT_SRC}"); }
+.delete-icon, .delete-icon a { background-image: url("{IMG_ICON_POST_DELETE_SRC}"); }
+.info-icon, .info-icon a { background-image: url("{IMG_ICON_POST_INFO_SRC}"); }
+.warn-icon, .warn-icon a { background-image: url("{IMG_ICON_USER_WARN_SRC}"); } /* Need updated warn icon */
+
+/*
+--------------------------------------------------------------
+Colours and backgrounds for cp.css
+-------------------------------------------------------------- */
+
+/* Main CP box
+----------------------------------------*/
+
+#cp-main h3, #cp-main hr, #cp-menu hr {
+ border-color: #A4B3BF;
+}
+
+#cp-main .panel li.row {
+ border-bottom-color: #B5C1CB;
+ border-top-color: #F9F9F9;
+}
+
+ul.cplist {
+ border-top-color: #B5C1CB;
+}
+
+#cp-main .panel li.header dd, #cp-main .panel li.header dt {
+ color: #000000;
+}
+
+#cp-main table.table1 thead th {
+ color: #333333;
+ border-bottom-color: #333333;
+}
+
+#cp-main .pm-message {
+ border-color: #DBDEE2;
+ background-color: #FFFFFF;
+}
+
+/* CP tabbed menu
+----------------------------------------*/
+#tabs a {
+ background-image: url("{T_THEME_PATH}/images/bg_tabs1.gif");
+}
+
+#tabs a span {
+ background-image: url("{T_THEME_PATH}/images/bg_tabs2.gif");
+ color: #536482;
+}
+
+#tabs a:hover span {
+ color: #BC2A4D;
+}
+
+#tabs .activetab a {
+ border-bottom-color: #CADCEB;
+}
+
+#tabs .activetab a span {
+ color: #333333;
+}
+
+#tabs .activetab a:hover span {
+ color: #000000;
+}
+
+/* Mini tabbed menu used in MCP
+----------------------------------------*/
+#minitabs li {
+ background-color: #E1EBF2;
+}
+
+#minitabs li.activetab {
+ background-color: #F9F9F9;
+}
+
+#minitabs li.activetab a, #minitabs li.activetab a:hover {
+ color: #333333;
+}
+
+/* UCP navigation menu
+----------------------------------------*/
+
+/* Link styles for the sub-section links */
+#navigation a {
+ color: #333;
+ background-color: #B2C2CF;
+ background-image: url("{T_THEME_PATH}/images/bg_menu.gif");
+}
+
+.rtl #navigation a {
+ background-image: url("{T_THEME_PATH}/images/bg_menu_rtl.gif");
+ background-position: 0 100%;
+}
+
+#navigation a:hover {
+ background-color: #aabac6;
+ color: #BC2A4D;
+}
+
+#navigation #active-subsection a {
+ color: #D31141;
+ background-color: #F9F9F9;
+ background-image: none;
+}
+
+#navigation #active-subsection a:hover {
+ color: #D31141;
+}
+
+/* Preferences pane layout
+----------------------------------------*/
+#cp-main h2 {
+ color: #333333;
+}
+
+#cp-main .panel {
+ background-color: #F9F9F9;
+}
+
+#cp-main .pm {
+ background-color: #FFFFFF;
+}
+
+#cp-main span.corners-top, #cp-menu span.corners-top {
+ background-image: url("{T_THEME_PATH}/images/corners_left2.gif");
+}
+
+#cp-main span.corners-top span, #cp-menu span.corners-top span {
+ background-image: url("{T_THEME_PATH}/images/corners_right2.gif");
+}
+
+#cp-main span.corners-bottom, #cp-menu span.corners-bottom {
+ background-image: url("{T_THEME_PATH}/images/corners_left2.gif");
+}
+
+#cp-main span.corners-bottom span, #cp-menu span.corners-bottom span {
+ background-image: url("{T_THEME_PATH}/images/corners_right2.gif");
+}
+
+/* Topicreview */
+#cp-main .panel #topicreview span.corners-top, #cp-menu .panel #topicreview span.corners-top {
+ background-image: url("{T_THEME_PATH}/images/corners_left.gif");
+}
+
+#cp-main .panel #topicreview span.corners-top span, #cp-menu .panel #topicreview span.corners-top span {
+ background-image: url("{T_THEME_PATH}/images/corners_right.gif");
+}
+
+#cp-main .panel #topicreview span.corners-bottom, #cp-menu .panel #topicreview span.corners-bottom {
+ background-image: url("{T_THEME_PATH}/images/corners_left.gif");
+}
+
+#cp-main .panel #topicreview span.corners-bottom span, #cp-menu .panel #topicreview span.corners-bottom span {
+ background-image: url("{T_THEME_PATH}/images/corners_right.gif");
+}
+
+/* Friends list */
+.cp-mini {
+ background-color: #eef5f9;
+}
+
+dl.mini dt {
+ color: #425067;
+}
+
+/* PM Styles
+----------------------------------------*/
+/* PM Message history */
+.current {
+ color: #000000 !important;
+}
+
+/* PM panel adjustments */
+.pm-panel-header,
+#cp-main .pm-message-nav {
+ border-bottom-color: #A4B3BF;
+}
+
+/* PM marking colours */
+.pmlist li.pm_message_reported_colour, .pm_message_reported_colour {
+ border-left-color: #BC2A4D;
+ border-right-color: #BC2A4D;
+}
+
+.pmlist li.pm_marked_colour, .pm_marked_colour {
+ border-color: #FF6600;
+}
+
+.pmlist li.pm_replied_colour, .pm_replied_colour {
+ border-color: #A9B8C2;
+}
+
+.pmlist li.pm_friend_colour, .pm_friend_colour {
+ border-color: #5D8FBD;
+}
+
+.pmlist li.pm_foe_colour, .pm_foe_colour {
+ border-color: #000000;
+}
+
+/* Avatar gallery */
+#gallery label {
+ background-color: #FFFFFF;
+ border-color: #CCC;
+}
+
+#gallery label:hover {
+ background-color: #EEE;
+}
+
+/*
+--------------------------------------------------------------
+Colours and backgrounds for forms.css
+-------------------------------------------------------------- */
+
+/* General form styles
+----------------------------------------*/
+select {
+ border-color: #666666;
+ background-color: #FAFAFA;
+ color: #000;
+}
+
+label {
+ color: #425067;
+}
+
+option.disabled-option {
+ color: graytext;
+}
+
+/* Definition list layout for forms
+---------------------------------------- */
+dd label {
+ color: #333;
+}
+
+/* Hover effects */
+fieldset dl:hover dt label {
+ color: #000000;
+}
+
+fieldset.fields2 dl:hover dt label {
+ color: inherit;
+}
+
+/* Quick-login on index page */
+fieldset.quick-login input.inputbox {
+ background-color: #F2F3F3;
+}
+
+/* Posting page styles
+----------------------------------------*/
+
+#message-box textarea {
+ color: #333333;
+}
+
+/* Input field styles
+---------------------------------------- */
+.inputbox {
+ background-color: #FFFFFF;
+ border-color: #B4BAC0;
+ color: #333333;
+}
+
+.inputbox:hover {
+ border-color: #11A3EA;
+}
+
+.inputbox:focus {
+ border-color: #11A3EA;
+ color: #0F4987;
+}
+
+/* Form button styles
+---------------------------------------- */
+
+a.button1, input.button1, input.button3, a.button2, input.button2 {
+ color: #000;
+ background-color: #FAFAFA;
+ background-image: url("{T_THEME_PATH}/images/bg_button.gif");
+}
+
+a.button1, input.button1 {
+ border-color: #666666;
+}
+
+input.button3 {
+ background-image: none;
+}
+
+/* Alternative button */
+a.button2, input.button2, input.button3 {
+ border-color: #666666;
+}
+
+/* <a> button in the style of the form buttons */
+a.button1, a.button1:link, a.button1:visited, a.button1:active, a.button2, a.button2:link, a.button2:visited, a.button2:active {
+ color: #000000;
+}
+
+/* Hover states */
+a.button1:hover, input.button1:hover, a.button2:hover, input.button2:hover, input.button3:hover {
+ border-color: #BC2A4D;
+ color: #BC2A4D;
+}
+
+input.search {
+ background-image: url("{T_THEME_PATH}/images/icon_textbox_search.gif");
+}
+
+input.disabled {
+ color: #666666;
+}
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
new file mode 100644
index 0000000000..a86f723f81
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -0,0 +1,632 @@
+/* General proSilver Markup Styles
+---------------------------------------- */
+
+* {
+ /* Reset browsers default margin, padding and font sizes */
+ margin: 0;
+ padding: 0;
+}
+
+html {
+ font-size: 100%;
+ /* Always show a scrollbar for short pages - stops the jump when the scrollbar appears. non-IE browsers */
+ height: 101%;
+}
+
+body {
+ /* Text-Sizing with ems: http://www.clagnut.com/blog/348/ */
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ color: #828282;
+ background-color: #FFFFFF;
+ /*font-size: 62.5%; This sets the default font size to be equivalent to 10px */
+ font-size: 10px;
+ margin: 0;
+ padding: 12px 0;
+}
+
+h1 {
+ /* Forum name */
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+ margin-right: 200px;
+ color: #FFFFFF;
+ margin-top: 15px;
+ font-weight: bold;
+ font-size: 2em;
+}
+
+h2 {
+ /* Forum header titles */
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ color: #3f3f3f;
+ font-size: 2em;
+ margin: 0.8em 0 0.2em 0;
+}
+
+h2.solo {
+ margin-bottom: 1em;
+}
+
+h3 {
+ /* Sub-headers (also used as post headers, but defined later) */
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ text-transform: uppercase;
+ border-bottom: 1px solid #CCCCCC;
+ margin-bottom: 3px;
+ padding-bottom: 2px;
+ font-size: 1.05em;
+ color: #989898;
+ margin-top: 20px;
+}
+
+h4 {
+ /* Forum and topic list titles */
+ font-family: "Trebuchet MS", Verdana, Helvetica, Arial, Sans-serif;
+ font-size: 1.3em;
+}
+
+p {
+ line-height: 1.3em;
+ font-size: 1.1em;
+ margin-bottom: 1.5em;
+}
+
+img {
+ border-width: 0;
+}
+
+hr {
+ /* Also see tweaks.css */
+ border: 0 none #FFFFFF;
+ border-top: 1px solid #CCCCCC;
+ height: 1px;
+ margin: 5px 0;
+ display: block;
+ clear: both;
+}
+
+hr.dashed {
+ border-top: 1px dashed #CCCCCC;
+ margin: 10px 0;
+}
+
+hr.divider {
+ display: none;
+}
+
+p.right {
+ text-align: right;
+}
+
+/* Main blocks
+---------------------------------------- */
+#wrap {
+ padding: 0 20px;
+ min-width: 650px;
+}
+
+#simple-wrap {
+ padding: 6px 10px;
+}
+
+#page-body {
+ margin: 4px 0;
+ clear: both;
+}
+
+#page-footer {
+ clear: both;
+}
+
+#page-footer h3 {
+ margin-top: 20px;
+}
+
+#logo {
+ float: left;
+ width: auto;
+ padding: 10px 13px 0 10px;
+}
+
+a#logo:hover {
+ text-decoration: none;
+}
+
+/* Search box
+--------------------------------------------- */
+#search-box {
+ color: #FFFFFF;
+ position: relative;
+ margin-top: 30px;
+ margin-right: 5px;
+ display: block;
+ float: right;
+ text-align: right;
+ white-space: nowrap; /* For Opera */
+}
+
+#search-box #keywords {
+ width: 95px;
+ background-color: #FFF;
+}
+
+#search-box input {
+ border: 1px solid #b0b0b0;
+}
+
+/* .button1 style defined later, just a few tweaks for the search button version */
+#search-box input.button1 {
+ padding: 1px 5px;
+}
+
+#search-box li {
+ text-align: right;
+ margin-top: 4px;
+}
+
+#search-box img {
+ vertical-align: middle;
+ margin-right: 3px;
+}
+
+/* Site description and logo */
+#site-description {
+ float: left;
+ width: 70%;
+}
+
+#site-description h1 {
+ margin-right: 0;
+}
+
+/* Round cornered boxes and backgrounds
+---------------------------------------- */
+.headerbar {
+ background: #ebebeb none repeat-x 0 0;
+ color: #FFFFFF;
+ margin-bottom: 4px;
+ padding: 0 5px;
+}
+
+.navbar {
+ background-color: #ebebeb;
+ padding: 0 10px;
+}
+
+.forabg {
+ background: #b1b1b1 none repeat-x 0 0;
+ margin-bottom: 4px;
+ padding: 0 5px;
+ clear: both;
+}
+
+.forumbg {
+ background: #ebebeb none repeat-x 0 0;
+ margin-bottom: 4px;
+ padding: 0 5px;
+ clear: both;
+}
+
+.panel {
+ margin-bottom: 4px;
+ padding: 0 10px;
+ background-color: #f3f3f3;
+ color: #3f3f3f;
+}
+
+.post {
+ padding: 0 10px;
+ margin-bottom: 4px;
+ background-repeat: no-repeat;
+ background-position: 100% 0;
+}
+
+.post:target .content {
+ color: #000000;
+}
+
+.post:target h3 a {
+ color: #000000;
+}
+
+.bg1 { background-color: #f7f7f7;}
+.bg2 { background-color: #f2f2f2; }
+.bg3 { background-color: #ebebeb; }
+
+.rowbg {
+ margin: 5px 5px 2px 5px;
+}
+
+.ucprowbg {
+ background-color: #e2e2e2;
+}
+
+.fieldsbg {
+ /*border: 1px #DBDEE2 solid;*/
+ background-color: #eaeaea;
+}
+
+span.corners-top, span.corners-bottom, span.corners-top span, span.corners-bottom span {
+ font-size: 1px;
+ line-height: 1px;
+ display: block;
+ height: 5px;
+ background-repeat: no-repeat;
+}
+
+span.corners-top {
+ background-image: none;
+ background-position: 0 0;
+ margin: 0 -5px;
+}
+
+span.corners-top span {
+ background-image: none;
+ background-position: 100% 0;
+}
+
+span.corners-bottom {
+ background-image: none;
+ background-position: 0 100%;
+ margin: 0 -5px;
+ clear: both;
+}
+
+span.corners-bottom span {
+ background-image: none;
+ background-position: 100% 100%;
+}
+
+.headbg span.corners-bottom {
+ margin-bottom: -1px;
+}
+
+.post span.corners-top, .post span.corners-bottom, .panel span.corners-top, .panel span.corners-bottom, .navbar span.corners-top, .navbar span.corners-bottom {
+ margin: 0 -10px;
+}
+
+.rules span.corners-top {
+ margin: 0 -10px 5px -10px;
+}
+
+.rules span.corners-bottom {
+ margin: 5px -10px 0 -10px;
+}
+
+/* Horizontal lists
+----------------------------------------*/
+ul.linklist {
+ display: block;
+ margin: 0;
+}
+
+ul.linklist li {
+ display: block;
+ list-style-type: none;
+ float: left;
+ width: auto;
+ margin-right: 5px;
+ font-size: 1.1em;
+ line-height: 2.2em;
+}
+
+ul.linklist li.rightside, p.rightside {
+ float: right;
+ margin-right: 0;
+ margin-left: 5px;
+ text-align: right;
+}
+
+ul.navlinks {
+ padding-bottom: 1px;
+ margin-bottom: 1px;
+ border-bottom: 1px solid #FFFFFF;
+ font-weight: bold;
+}
+
+ul.leftside {
+ float: left;
+ margin-left: 0;
+ margin-right: 5px;
+ text-align: left;
+}
+
+ul.rightside {
+ float: right;
+ margin-left: 5px;
+ margin-right: -5px;
+ text-align: right;
+}
+
+/* Table styles
+----------------------------------------*/
+table.table1 {
+ /* See tweaks.css */
+}
+
+#ucp-main table.table1 {
+ padding: 2px;
+}
+
+table.table1 thead th {
+ font-weight: normal;
+ text-transform: uppercase;
+ color: #FFFFFF;
+ line-height: 1.3em;
+ font-size: 1em;
+ padding: 0 0 4px 3px;
+}
+
+table.table1 thead th span {
+ padding-left: 7px;
+}
+
+table.table1 tbody tr {
+ border: 1px solid #cfcfcf;
+}
+
+table.table1 tbody tr:hover, table.table1 tbody tr.hover {
+ background-color: #f6f6f6;
+ color: #000;
+}
+
+table.table1 td {
+ color: #6a6a6a;
+ font-size: 1.1em;
+}
+
+table.table1 tbody td {
+ padding: 5px;
+ border-top: 1px solid #FAFAFA;
+}
+
+table.table1 tbody th {
+ padding: 5px;
+ border-bottom: 1px solid #000000;
+ text-align: left;
+ color: #333333;
+ background-color: #FFFFFF;
+}
+
+/* Specific column styles */
+table.table1 .name { text-align: left; }
+table.table1 .posts { text-align: center !important; width: 7%; }
+table.table1 .joined { text-align: left; width: 15%; }
+table.table1 .active { text-align: left; width: 15%; }
+table.table1 .mark { text-align: center; width: 7%; }
+table.table1 .info { text-align: left; width: 30%; }
+table.table1 .info div { width: 100%; white-space: normal; overflow: hidden; }
+table.table1 .autocol { line-height: 2em; white-space: nowrap; }
+table.table1 thead .autocol { padding-left: 1em; }
+
+table.table1 span.rank-img {
+ float: right;
+ width: auto;
+}
+
+table.info td {
+ padding: 3px;
+}
+
+table.info tbody th {
+ padding: 3px;
+ text-align: right;
+ vertical-align: top;
+ color: #000000;
+ font-weight: normal;
+}
+
+.forumbg table.table1 {
+ margin: 0 -2px -1px -1px;
+}
+
+/* Misc layout styles
+---------------------------------------- */
+/* column[1-2] styles are containers for two column layouts
+ Also see tweaks.css */
+.column1 {
+ float: left;
+ clear: left;
+ width: 49%;
+}
+
+.column2 {
+ float: right;
+ clear: right;
+ width: 49%;
+}
+
+/* General classes for placing floating blocks */
+.left-box {
+ float: left;
+ width: auto;
+ text-align: left;
+}
+
+.right-box {
+ float: right;
+ width: auto;
+ text-align: right;
+}
+
+dl.details {
+ /*font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;*/
+ font-size: 1.1em;
+}
+
+dl.details dt {
+ float: left;
+ clear: left;
+ width: 30%;
+ text-align: right;
+ color: #000000;
+ display: block;
+}
+
+dl.details dd {
+ margin-left: 0;
+ padding-left: 5px;
+ margin-bottom: 5px;
+ color: #828282;
+ float: left;
+ width: 65%;
+}
+
+/* Pagination
+---------------------------------------- */
+.pagination {
+ height: 1%; /* IE tweak (holly hack) */
+ width: auto;
+ text-align: right;
+ margin-top: 5px;
+ float: right;
+}
+
+.pagination span.page-sep {
+ display: none;
+}
+
+li.pagination {
+ margin-top: 0;
+}
+
+.pagination strong, .pagination b {
+ font-weight: normal;
+}
+
+.pagination span strong {
+ padding: 0 2px;
+ margin: 0 2px;
+ font-weight: normal;
+ color: #FFFFFF;
+ background-color: #bfbfbf;
+ border: 1px solid #bfbfbf;
+ font-size: 0.9em;
+}
+
+.pagination span a, .pagination span a:link, .pagination span a:visited, .pagination span a:active {
+ font-weight: normal;
+ text-decoration: none;
+ color: #747474;
+ margin: 0 2px;
+ padding: 0 2px;
+ background-color: #eeeeee;
+ border: 1px solid #bababa;
+ font-size: 0.9em;
+ line-height: 1.5em;
+}
+
+.pagination span a:hover {
+ border-color: #d2d2d2;
+ background-color: #d2d2d2;
+ color: #FFF;
+ text-decoration: none;
+}
+
+.pagination img {
+ vertical-align: middle;
+}
+
+/* Pagination in viewforum for multipage topics */
+.row .pagination {
+ display: block;
+ float: right;
+ width: auto;
+ margin-top: 0;
+ padding: 1px 0 1px 15px;
+ font-size: 0.9em;
+ background: none 0 50% no-repeat;
+}
+
+.row .pagination span a, li.pagination span a {
+ background-color: #FFFFFF;
+}
+
+.row .pagination span a:hover, li.pagination span a:hover {
+ background-color: #d2d2d2;
+}
+
+/* Miscellaneous styles
+---------------------------------------- */
+#forum-permissions {
+ float: right;
+ width: auto;
+ padding-left: 5px;
+ margin-left: 5px;
+ margin-top: 10px;
+ text-align: right;
+}
+
+.copyright {
+ padding: 5px;
+ text-align: center;
+ color: #555555;
+}
+
+.small {
+ font-size: 0.9em !important;
+}
+
+.titlespace {
+ margin-bottom: 15px;
+}
+
+.headerspace {
+ margin-top: 20px;
+}
+
+.error {
+ color: #bcbcbc;
+ font-weight: bold;
+ font-size: 1em;
+}
+
+.reported {
+ background-color: #f7f7f7;
+}
+
+li.reported:hover {
+ background-color: #ececec;
+}
+
+div.rules {
+ background-color: #ececec;
+ color: #bcbcbc;
+ padding: 0 10px;
+ margin: 10px 0;
+ font-size: 1.1em;
+}
+
+div.rules ul, div.rules ol {
+ margin-left: 20px;
+}
+
+p.rules {
+ background-color: #ececec;
+ background-image: none;
+ padding: 5px;
+}
+
+p.rules img {
+ vertical-align: middle;
+ padding-top: 5px;
+}
+
+p.rules a {
+ vertical-align: middle;
+ clear: both;
+}
+
+#top {
+ position: absolute;
+ top: -20px;
+}
+
+.clear {
+ display: block;
+ clear: both;
+ font-size: 1px;
+ line-height: 1px;
+ background: transparent;
+}
diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css
new file mode 100644
index 0000000000..417537e660
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/content.css
@@ -0,0 +1,772 @@
+/* proSilver Content Styles
+---------------------------------------- */
+
+ul.topiclist {
+ display: block;
+ list-style-type: none;
+ margin: 0;
+}
+
+ul.forums {
+ background: #f9f9f9 none repeat-x 0 0;
+}
+
+ul.topiclist li {
+ display: block;
+ list-style-type: none;
+ color: #777777;
+ margin: 0;
+}
+
+ul.topiclist dl {
+ position: relative;
+}
+
+ul.topiclist li.row dl {
+ padding: 2px 0;
+}
+
+ul.topiclist dt {
+ display: block;
+ float: left;
+ width: 50%;
+ font-size: 1.1em;
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+ul.topiclist dd {
+ display: block;
+ float: left;
+ border-left: 1px solid #FFFFFF;
+ padding: 4px 0;
+}
+
+ul.topiclist dfn {
+ /* Labels for post/view counts */
+ position: absolute;
+ left: -999px;
+ width: 990px;
+}
+
+ul.topiclist li.row dt a.subforum {
+ background-image: none;
+ background-position: 0 50%;
+ background-repeat: no-repeat;
+ position: relative;
+ white-space: nowrap;
+ padding: 0 0 0 12px;
+}
+
+.forum-image {
+ float: left;
+ padding-top: 5px;
+ margin-right: 5px;
+}
+
+li.row {
+ border-top: 1px solid #FFFFFF;
+ border-bottom: 1px solid #8f8f8f;
+}
+
+li.row strong {
+ font-weight: normal;
+ color: #000000;
+}
+
+li.row:hover {
+ background-color: #f6f6f6;
+}
+
+li.row:hover dd {
+ border-left-color: #CCCCCC;
+}
+
+li.header dt, li.header dd {
+ line-height: 1em;
+ border-left-width: 0;
+ margin: 2px 0 4px 0;
+ color: #FFFFFF;
+ padding-top: 2px;
+ padding-bottom: 2px;
+ font-size: 1em;
+ font-family: Arial, Helvetica, sans-serif;
+ text-transform: uppercase;
+}
+
+li.header dt {
+ font-weight: bold;
+}
+
+li.header dd {
+ margin-left: 1px;
+}
+
+li.header dl.icon {
+ min-height: 0;
+}
+
+li.header dl.icon dt {
+ /* Tweak for headers alignment when folder icon used */
+ padding-left: 0;
+ padding-right: 50px;
+}
+
+/* Forum list column styles */
+dl.icon {
+ min-height: 35px;
+ background-position: 10px 50%; /* Position of folder icon */
+ background-repeat: no-repeat;
+}
+
+dl.icon dt {
+ padding-left: 45px; /* Space for folder icon */
+ background-repeat: no-repeat;
+ background-position: 5px 95%; /* Position of topic icon */
+}
+
+dd.posts, dd.topics, dd.views {
+ width: 8%;
+ text-align: center;
+ line-height: 2.2em;
+ font-size: 1.2em;
+}
+
+/* List in forum description */
+dl.icon dt ol,
+dl.icon dt ul {
+ list-style-position: inside;
+ margin-left: 1em;
+}
+
+dl.icon dt li {
+ display: list-item;
+ list-style-type: inherit;
+}
+
+dd.lastpost {
+ width: 25%;
+ font-size: 1.1em;
+}
+
+dd.redirect {
+ font-size: 1.1em;
+ line-height: 2.5em;
+}
+
+dd.moderation {
+ font-size: 1.1em;
+}
+
+dd.lastpost span, ul.topiclist dd.searchby span, ul.topiclist dd.info span, ul.topiclist dd.time span, dd.redirect span, dd.moderation span {
+ display: block;
+ padding-left: 5px;
+}
+
+dd.time {
+ width: auto;
+ line-height: 200%;
+ font-size: 1.1em;
+}
+
+dd.extra {
+ width: 12%;
+ line-height: 200%;
+ text-align: center;
+ font-size: 1.1em;
+}
+
+dd.mark {
+ float: right !important;
+ width: 9%;
+ text-align: center;
+ line-height: 200%;
+ font-size: 1.2em;
+}
+
+dd.info {
+ width: 30%;
+}
+
+dd.option {
+ width: 15%;
+ line-height: 200%;
+ text-align: center;
+ font-size: 1.1em;
+}
+
+dd.searchby {
+ width: 47%;
+ font-size: 1.1em;
+ line-height: 1em;
+}
+
+ul.topiclist dd.searchextra {
+ margin-left: 5px;
+ padding: 0.2em 0;
+ font-size: 1.1em;
+ color: #333333;
+ border-left: none;
+ clear: both;
+ width: 98%;
+ overflow: hidden;
+}
+
+/* Container for post/reply buttons and pagination */
+.topic-actions {
+ margin-bottom: 3px;
+ font-size: 1.1em;
+ height: 28px;
+ min-height: 28px;
+}
+div[class].topic-actions {
+ height: auto;
+}
+
+/* Post body styles
+----------------------------------------*/
+.postbody {
+ padding: 0;
+ line-height: 1.48em;
+ color: #333333;
+ width: 76%;
+ float: left;
+ clear: both;
+}
+
+.postbody .ignore {
+ font-size: 1.1em;
+}
+
+.postbody h3.first {
+ /* The first post on the page uses this */
+ font-size: 1.7em;
+}
+
+.postbody h3 {
+ /* Postbody requires a different h3 format - so change it here */
+ font-size: 1.5em;
+ padding: 2px 0 0 0;
+ margin: 0 0 0.3em 0 !important;
+ text-transform: none;
+ border: none;
+ font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
+ line-height: 125%;
+}
+
+.postbody h3 img {
+ /* Also see tweaks.css */
+ vertical-align: bottom;
+}
+
+.postbody .content {
+ font-size: 1.3em;
+}
+
+.search .postbody {
+ width: 68%
+}
+
+/* Topic review panel
+----------------------------------------*/
+#review {
+ margin-top: 2em;
+}
+
+#topicreview {
+ padding-right: 5px;
+ overflow: auto;
+ height: 300px;
+}
+
+#topicreview .postbody {
+ width: auto;
+ float: none;
+ margin: 0;
+ height: auto;
+}
+
+#topicreview .post {
+ height: auto;
+}
+
+#topicreview h2 {
+ border-bottom-width: 0;
+}
+
+.post-ignore .postbody {
+ display: none;
+}
+
+/* Content container styles
+----------------------------------------*/
+.content {
+ min-height: 3em;
+ overflow: hidden;
+ line-height: 1.4em;
+ font-family: "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
+ font-size: 1em;
+ color: #333333;
+ padding-bottom: 1px;
+}
+
+.content h2, .panel h2 {
+ font-weight: normal;
+ color: #989898;
+ border-bottom: 1px solid #CCCCCC;
+ font-size: 1.6em;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ padding-bottom: 0.5em;
+}
+
+.panel h3 {
+ margin: 0.5em 0;
+}
+
+.panel p {
+ font-size: 1.2em;
+ margin-bottom: 1em;
+ line-height: 1.4em;
+}
+
+.content p {
+ font-family: "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
+ font-size: 1.2em;
+ margin-bottom: 1em;
+ line-height: 1.4em;
+}
+
+dl.faq {
+ font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
+ font-size: 1.1em;
+ margin-top: 1em;
+ margin-bottom: 2em;
+ line-height: 1.4em;
+}
+
+dl.faq dt {
+ font-weight: bold;
+ color: #333333;
+}
+
+.content dl.faq {
+ font-size: 1.2em;
+ margin-bottom: 0.5em;
+}
+
+.content li {
+ list-style-type: inherit;
+}
+
+.content ul, .content ol {
+ margin-bottom: 1em;
+ margin-left: 3em;
+}
+
+.posthilit {
+ background-color: #f3f3f3;
+ color: #BCBCBC;
+ padding: 0 2px 1px 2px;
+}
+
+.announce, .unreadpost {
+ /* Highlight the announcements & unread posts box */
+ border-left-color: #BCBCBC;
+ border-right-color: #BCBCBC;
+}
+
+/* Post author */
+p.author {
+ margin: 0 15em 0.6em 0;
+ padding: 0 0 5px 0;
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ font-size: 1em;
+ line-height: 1.2em;
+}
+
+/* Post signature */
+.signature {
+ margin-top: 1.5em;
+ padding-top: 0.2em;
+ font-size: 1.1em;
+ border-top: 1px solid #CCCCCC;
+ clear: left;
+ line-height: 140%;
+ overflow: hidden;
+ width: 100%;
+}
+
+dd .signature {
+ margin: 0;
+ padding: 0;
+ clear: none;
+ border: none;
+}
+
+.signature li {
+ list-style-type: inherit;
+}
+
+.signature ul, .signature ol {
+ margin-bottom: 1em;
+ margin-left: 3em;
+}
+
+/* Post noticies */
+.notice {
+ font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
+ width: auto;
+ margin-top: 1.5em;
+ padding-top: 0.2em;
+ font-size: 1em;
+ border-top: 1px dashed #CCCCCC;
+ clear: left;
+ line-height: 130%;
+}
+
+/* Jump to post link for now */
+ul.searchresults {
+ list-style: none;
+ text-align: right;
+ clear: both;
+}
+
+/* BB Code styles
+----------------------------------------*/
+/* Quote block */
+blockquote {
+ background: #ebebeb none 6px 8px no-repeat;
+ border: 1px solid #dbdbdb;
+ font-size: 0.95em;
+ margin: 0.5em 1px 0 25px;
+ overflow: hidden;
+ padding: 5px;
+}
+
+blockquote blockquote {
+ /* Nested quotes */
+ background-color: #bababa;
+ font-size: 1em;
+ margin: 0.5em 1px 0 15px;
+}
+
+blockquote blockquote blockquote {
+ /* Nested quotes */
+ background-color: #e4e4e4;
+}
+
+blockquote cite {
+ /* Username/source of quoter */
+ font-style: normal;
+ font-weight: bold;
+ margin-left: 20px;
+ display: block;
+ font-size: 0.9em;
+}
+
+blockquote cite cite {
+ font-size: 1em;
+}
+
+blockquote.uncited {
+ padding-top: 25px;
+}
+
+/* Code block */
+dl.codebox {
+ padding: 3px;
+ background-color: #FFFFFF;
+ border: 1px solid #d8d8d8;
+ font-size: 1em;
+}
+
+dl.codebox dt {
+ text-transform: uppercase;
+ border-bottom: 1px solid #CCCCCC;
+ margin-bottom: 3px;
+ font-size: 0.8em;
+ font-weight: bold;
+ display: block;
+}
+
+blockquote dl.codebox {
+ margin-left: 0;
+}
+
+dl.codebox code {
+ /* Also see tweaks.css */
+ overflow: auto;
+ display: block;
+ height: auto;
+ max-height: 200px;
+ white-space: normal;
+ padding-top: 5px;
+ font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono;
+ line-height: 1.3em;
+ color: #8b8b8b;
+ margin: 2px 0;
+}
+
+.syntaxbg { color: #FFFFFF; }
+.syntaxcomment { color: #000000; }
+.syntaxdefault { color: #bcbcbc; }
+.syntaxhtml { color: #000000; }
+.syntaxkeyword { color: #585858; }
+.syntaxstring { color: #a7a7a7; }
+
+/* Attachments
+----------------------------------------*/
+.attachbox {
+ float: left;
+ width: auto;
+ margin: 5px 5px 5px 0;
+ padding: 6px;
+ background-color: #FFFFFF;
+ border: 1px dashed #d8d8d8;
+ clear: left;
+}
+
+.pm-message .attachbox {
+ background-color: #f3f3f3;
+}
+
+.attachbox dt {
+ font-family: Arial, Helvetica, sans-serif;
+ text-transform: uppercase;
+}
+
+.attachbox dd {
+ margin-top: 4px;
+ padding-top: 4px;
+ clear: left;
+ border-top: 1px solid #d8d8d8;
+}
+
+.attachbox dd dd {
+ border: none;
+}
+
+.attachbox p {
+ line-height: 110%;
+ color: #666666;
+ font-weight: normal;
+ clear: left;
+}
+
+.attachbox p.stats
+{
+ line-height: 110%;
+ color: #666666;
+ font-weight: normal;
+ clear: left;
+}
+
+.attach-image {
+ margin: 3px 0;
+ width: 100%;
+ max-height: 350px;
+ overflow: auto;
+}
+
+.attach-image img {
+ border: 1px solid #999999;
+/* cursor: move; */
+ cursor: default;
+}
+
+/* Inline image thumbnails */
+div.inline-attachment dl.thumbnail, div.inline-attachment dl.file {
+ display: block;
+ margin-bottom: 4px;
+}
+
+div.inline-attachment p {
+ font-size: 100%;
+}
+
+dl.file {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ display: block;
+}
+
+dl.file dt {
+ text-transform: none;
+ margin: 0;
+ padding: 0;
+ font-weight: bold;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+}
+
+dl.file dd {
+ color: #666666;
+ margin: 0;
+ padding: 0;
+}
+
+dl.thumbnail img {
+ padding: 3px;
+ border: 1px solid #666666;
+ background-color: #FFF;
+}
+
+dl.thumbnail dd {
+ color: #666666;
+ font-style: italic;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+}
+
+.attachbox dl.thumbnail dd {
+ font-size: 100%;
+}
+
+dl.thumbnail dt a:hover {
+ background-color: #EEEEEE;
+}
+
+dl.thumbnail dt a:hover img {
+ border: 1px solid #d2d2d2;
+}
+
+/* Post poll styles
+----------------------------------------*/
+fieldset.polls {
+ font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
+}
+
+fieldset.polls dl {
+ margin-top: 5px;
+ border-top: 1px solid #e2e2e2;
+ padding: 5px 0 0 0;
+ line-height: 120%;
+ color: #666666;
+}
+
+fieldset.polls dl.voted {
+ font-weight: bold;
+ color: #000000;
+}
+
+fieldset.polls dt {
+ text-align: left;
+ float: left;
+ display: block;
+ width: 30%;
+ border-right: none;
+ padding: 0;
+ margin: 0;
+ font-size: 1.1em;
+}
+
+fieldset.polls dd {
+ float: left;
+ width: 10%;
+ border-left: none;
+ padding: 0 5px;
+ margin-left: 0;
+ font-size: 1.1em;
+}
+
+fieldset.polls dd.resultbar {
+ width: 50%;
+}
+
+fieldset.polls dd input {
+ margin: 2px 0;
+}
+
+fieldset.polls dd div {
+ text-align: right;
+ font-family: Arial, Helvetica, sans-serif;
+ color: #FFFFFF;
+ font-weight: bold;
+ padding: 0 2px;
+ overflow: visible;
+ min-width: 2%;
+}
+
+.pollbar1 {
+ background-color: #aaaaaa;
+ border-bottom: 1px solid #747474;
+ border-right: 1px solid #747474;
+}
+
+.pollbar2 {
+ background-color: #bebebe;
+ border-bottom: 1px solid #8c8c8c;
+ border-right: 1px solid #8c8c8c;
+}
+
+.pollbar3 {
+ background-color: #D1D1D1;
+ border-bottom: 1px solid #aaaaaa;
+ border-right: 1px solid #aaaaaa;
+}
+
+.pollbar4 {
+ background-color: #e4e4e4;
+ border-bottom: 1px solid #bebebe;
+ border-right: 1px solid #bebebe;
+}
+
+.pollbar5 {
+ background-color: #f8f8f8;
+ border-bottom: 1px solid #D1D1D1;
+ border-right: 1px solid #D1D1D1;
+}
+
+/* Poster profile block
+----------------------------------------*/
+.postprofile {
+ /* Also see tweaks.css */
+ margin: 5px 0 10px 0;
+ min-height: 80px;
+ color: #666666;
+ border-left: 1px solid #FFFFFF;
+ width: 22%;
+ float: right;
+ display: inline;
+}
+.pm .postprofile {
+ border-left: 1px solid #DDDDDD;
+}
+
+.postprofile dd, .postprofile dt {
+ line-height: 1.2em;
+ margin-left: 8px;
+}
+
+.postprofile strong {
+ font-weight: normal;
+ color: #000000;
+}
+
+.avatar {
+ border: none;
+ margin-bottom: 3px;
+}
+
+.online {
+ background-image: none;
+ background-position: 100% 0;
+ background-repeat: no-repeat;
+}
+
+/* Poster profile used by search*/
+.search .postprofile {
+ width: 30%;
+}
+
+/* pm list in compose message if mass pm is enabled */
+dl.pmlist dt {
+ width: 60% !important;
+}
+
+dl.pmlist dt textarea {
+ width: 95%;
+}
+
+dl.pmlist dd {
+ margin-left: 61% !important;
+ margin-bottom: 2px;
+} \ No newline at end of file
diff --git a/phpBB/styles/prosilver/theme/cp.css b/phpBB/styles/prosilver/theme/cp.css
new file mode 100644
index 0000000000..1e0edc616f
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/cp.css
@@ -0,0 +1,452 @@
+/* proSilver Control Panel Styles
+---------------------------------------- */
+
+
+/* Main CP box
+----------------------------------------*/
+#cp-menu {
+ float:left;
+ width: 19%;
+ margin-top: 1em;
+ margin-bottom: 5px;
+}
+
+#cp-main {
+ float: left;
+ width: 81%;
+}
+
+#cp-main .content {
+ padding: 0;
+}
+
+#cp-main h3, #cp-main hr, #cp-menu hr {
+ border-color: #bfbfbf;
+}
+
+#cp-main .panel p {
+ font-size: 1.1em;
+}
+
+#cp-main .panel ol {
+ margin-left: 2em;
+ font-size: 1.1em;
+}
+
+#cp-main .panel li.row {
+ border-bottom: 1px solid #cbcbcb;
+ border-top: 1px solid #F9F9F9;
+}
+
+ul.cplist {
+ margin-bottom: 5px;
+ border-top: 1px solid #cbcbcb;
+}
+
+#cp-main .panel li.header dd, #cp-main .panel li.header dt {
+ color: #000000;
+ margin-bottom: 2px;
+}
+
+#cp-main table.table1 {
+ margin-bottom: 1em;
+}
+
+#cp-main table.table1 thead th {
+ color: #333333;
+ font-weight: bold;
+ border-bottom: 1px solid #333333;
+ padding: 5px;
+}
+
+#cp-main table.table1 tbody th {
+ font-style: italic;
+ background-color: transparent !important;
+ border-bottom: none;
+}
+
+#cp-main .pagination {
+ float: right;
+ width: auto;
+ padding-top: 1px;
+}
+
+#cp-main .postbody p {
+ font-size: 1.1em;
+}
+
+#cp-main .pm-message {
+ border: 1px solid #e2e2e2;
+ margin: 10px 0;
+ background-color: #FFFFFF;
+ width: auto;
+ float: none;
+}
+
+.pm-message h2 {
+ padding-bottom: 5px;
+}
+
+#cp-main .postbody h3, #cp-main .box2 h3 {
+ margin-top: 0;
+}
+
+#cp-main .buttons {
+ margin-left: 0;
+}
+
+#cp-main ul.linklist {
+ margin: 0;
+}
+
+/* MCP Specific tweaks */
+.mcp-main .postbody {
+ width: 100%;
+}
+
+/* CP tabbed menu
+----------------------------------------*/
+#tabs {
+ line-height: normal;
+ margin: 20px 0 -1px 7px;
+ min-width: 570px;
+}
+
+#tabs ul {
+ margin:0;
+ padding: 0;
+ list-style: none;
+}
+
+#tabs li {
+ display: inline;
+ margin: 0;
+ padding: 0;
+ font-size: 1em;
+ font-weight: bold;
+}
+
+#tabs a {
+ float: left;
+ background: none no-repeat 0% -35px;
+ margin: 0 1px 0 0;
+ padding: 0 0 0 5px;
+ text-decoration: none;
+ position: relative;
+ cursor: pointer;
+}
+
+#tabs a span {
+ float: left;
+ display: block;
+ background: none no-repeat 100% -35px;
+ padding: 6px 10px 6px 5px;
+ color: #828282;
+ white-space: nowrap;
+}
+
+#tabs a:hover span {
+ color: #bcbcbc;
+}
+
+#tabs .activetab a {
+ background-position: 0 0;
+ border-bottom: 1px solid #ebebeb;
+}
+
+#tabs .activetab a span {
+ background-position: 100% 0;
+ padding-bottom: 7px;
+ color: #333333;
+}
+
+#tabs a:hover {
+ background-position: 0 -70px;
+}
+
+#tabs a:hover span {
+ background-position:100% -70px;
+}
+
+#tabs .activetab a:hover {
+ background-position: 0 0;
+}
+
+#tabs .activetab a:hover span {
+ color: #000000;
+ background-position: 100% 0;
+}
+
+/* Mini tabbed menu used in MCP
+----------------------------------------*/
+#minitabs {
+ line-height: normal;
+ margin: -20px 7px 0 0;
+}
+
+#minitabs ul {
+ margin:0;
+ padding: 0;
+ list-style: none;
+}
+
+#minitabs li {
+ display: block;
+ float: right;
+ padding: 0 10px 4px 10px;
+ font-size: 1em;
+ font-weight: bold;
+ background-color: #f2f2f2;
+ margin-left: 2px;
+}
+
+#minitabs a {
+}
+
+#minitabs a:hover {
+ text-decoration: none;
+}
+
+#minitabs li.activetab {
+ background-color: #F9F9F9;
+}
+
+#minitabs li.activetab a, #minitabs li.activetab a:hover {
+ color: #333333;
+}
+
+/* UCP navigation menu
+----------------------------------------*/
+/* Container for sub-navigation list */
+#navigation {
+ width: 100%;
+ padding-top: 36px;
+}
+
+#navigation ul {
+ list-style:none;
+}
+
+/* Default list state */
+#navigation li {
+ margin: 1px 0;
+ padding: 0;
+ font-weight: bold;
+ display: inline;
+}
+
+/* Link styles for the sub-section links */
+#navigation a {
+ display: block;
+ padding: 5px;
+ margin: 1px 0;
+ text-decoration: none;
+ font-weight: bold;
+ color: #333;
+ background: #cfcfcf none repeat-y 100% 0;
+}
+
+#navigation a:hover {
+ text-decoration: none;
+ background-color: #c6c6c6;
+ color: #bcbcbc;
+ background-image: none;
+}
+
+#navigation #active-subsection a {
+ display: block;
+ color: #d3d3d3;
+ background-color: #F9F9F9;
+ background-image: none;
+}
+
+#navigation #active-subsection a:hover {
+ color: #d3d3d3;
+}
+
+/* Preferences pane layout
+----------------------------------------*/
+#cp-main h2 {
+ border-bottom: none;
+ padding: 0;
+ margin-left: 10px;
+ color: #333333;
+}
+
+#cp-main .panel {
+ background-color: #F9F9F9;
+}
+
+#cp-main .pm {
+ background-color: #FFFFFF;
+}
+
+#cp-main span.corners-top, #cp-menu span.corners-top {
+ background-image: none;
+}
+
+#cp-main span.corners-top span, #cp-menu span.corners-top span {
+ background-image: none;
+}
+
+#cp-main span.corners-bottom, #cp-menu span.corners-bottom {
+ background-image: none;
+}
+
+#cp-main span.corners-bottom span, #cp-menu span.corners-bottom span {
+ background-image: none;
+}
+
+/* Topicreview */
+#cp-main .panel #topicreview span.corners-top, #cp-menu .panel #topicreview span.corners-top {
+ background-image: none;
+}
+
+#cp-main .panel #topicreview span.corners-top span, #cp-menu .panel #topicreview span.corners-top span {
+ background-image: none;
+}
+
+#cp-main .panel #topicreview span.corners-bottom, #cp-menu .panel #topicreview span.corners-bottom {
+ background-image: none;
+}
+
+#cp-main .panel #topicreview span.corners-bottom span, #cp-menu .panel #topicreview span.corners-bottom span {
+ background-image: none;
+}
+
+/* Friends list */
+.cp-mini {
+ background-color: #f9f9f9;
+ padding: 0 5px;
+ margin: 10px 15px 10px 5px;
+}
+
+.cp-mini span.corners-top, .cp-mini span.corners-bottom {
+ margin: 0 -5px;
+}
+
+dl.mini dt {
+ font-weight: bold;
+ color: #676767;
+}
+
+dl.mini dd {
+ padding-top: 4px;
+}
+
+.friend-online {
+ font-weight: bold;
+}
+
+.friend-offline {
+ font-style: italic;
+}
+
+/* PM Styles
+----------------------------------------*/
+#pm-menu {
+ line-height: 2.5em;
+}
+
+/* PM panel adjustments */
+.pm-panel-header {
+ margin: 0;
+ padding-bottom: 10px;
+ border-bottom: 1px dashed #A4B3BF;
+}
+
+.reply-all {
+ display: block;
+ padding-top: 4px;
+ clear: both;
+ float: left;
+}
+
+.pm-panel-message {
+ padding-top: 10px;
+}
+
+.pm-return-to {
+ padding-top: 23px;
+}
+
+#cp-main .pm-message-nav {
+ margin: 0;
+ padding: 2px 10px 5px 10px;
+ border-bottom: 1px dashed #A4B3BF;
+}
+
+/* PM Message history */
+.current {
+ color: #999999;
+}
+
+/* Defined rules list for PM options */
+ol.def-rules {
+ padding-left: 0;
+}
+
+ol.def-rules li {
+ line-height: 180%;
+ padding: 1px;
+}
+
+/* PM marking colours */
+.pmlist li.bg1 {
+ border: solid 3px transparent;
+ border-width: 0 3px;
+}
+
+.pmlist li.bg2 {
+ border: solid 3px transparent;
+ border-width: 0 3px;
+}
+
+.pmlist li.pm_message_reported_colour, .pm_message_reported_colour {
+ border-left-color: #bcbcbc;
+ border-right-color: #bcbcbc;
+}
+
+.pmlist li.pm_marked_colour, .pm_marked_colour {
+ border: solid 3px #ffffff;
+ border-width: 0 3px;
+}
+
+.pmlist li.pm_replied_colour, .pm_replied_colour {
+ border: solid 3px #c2c2c2;
+ border-width: 0 3px;
+}
+
+.pmlist li.pm_friend_colour, .pm_friend_colour {
+ border: solid 3px #bdbdbd;
+ border-width: 0 3px;
+}
+
+.pmlist li.pm_foe_colour, .pm_foe_colour {
+ border: solid 3px #000000;
+ border-width: 0 3px;
+}
+
+.pm-legend {
+ border-left-width: 10px;
+ border-left-style: solid;
+ border-right-width: 0;
+ margin-bottom: 3px;
+ padding-left: 3px;
+}
+
+/* Avatar gallery */
+#gallery label {
+ position: relative;
+ float: left;
+ margin: 10px;
+ padding: 5px;
+ width: auto;
+ background: #FFFFFF;
+ border: 1px solid #CCC;
+ text-align: center;
+}
+
+#gallery label:hover {
+ background-color: #EEE;
+}
diff --git a/phpBB/styles/prosilver/theme/forms.css b/phpBB/styles/prosilver/theme/forms.css
new file mode 100644
index 0000000000..a280218e75
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/forms.css
@@ -0,0 +1,384 @@
+/* proSilver Form Styles
+---------------------------------------- */
+
+/* General form styles
+----------------------------------------*/
+fieldset {
+ border-width: 0;
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ font-size: 1.1em;
+}
+
+input {
+ font-weight: normal;
+ cursor: pointer;
+ vertical-align: middle;
+ padding: 0 3px;
+ font-size: 1em;
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+}
+
+select {
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ font-weight: normal;
+ cursor: pointer;
+ vertical-align: middle;
+ border: 1px solid #666666;
+ padding: 1px;
+ background-color: #FAFAFA;
+}
+
+option {
+ padding-right: 1em;
+}
+
+option.disabled-option {
+ color: graytext;
+}
+
+textarea {
+ font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
+ width: 60%;
+ padding: 2px;
+ font-size: 1em;
+ line-height: 1.4em;
+}
+
+label {
+ cursor: default;
+ padding-right: 5px;
+ color: #676767;
+}
+
+label input {
+ vertical-align: middle;
+}
+
+label img {
+ vertical-align: middle;
+}
+
+/* Definition list layout for forms
+---------------------------------------- */
+fieldset dl {
+ padding: 4px 0;
+}
+
+fieldset dt {
+ float: left;
+ width: 40%;
+ text-align: left;
+ display: block;
+}
+
+fieldset dd {
+ margin-left: 41%;
+ vertical-align: top;
+ margin-bottom: 3px;
+}
+
+/* Specific layout 1 */
+fieldset.fields1 dt {
+ width: 15em;
+ border-right-width: 0;
+}
+
+fieldset.fields1 dd {
+ margin-left: 15em;
+ border-left-width: 0;
+}
+
+fieldset.fields1 {
+ background-color: transparent;
+}
+
+fieldset.fields1 div {
+ margin-bottom: 3px;
+}
+
+/* Specific layout 2 */
+fieldset.fields2 dt {
+ width: 15em;
+ border-right-width: 0;
+}
+
+fieldset.fields2 dd {
+ margin-left: 16em;
+ border-left-width: 0;
+}
+
+/* Form elements */
+dt label {
+ font-weight: bold;
+ text-align: left;
+}
+
+dd label {
+ white-space: nowrap;
+ color: #333;
+}
+
+dd input, dd textarea {
+ margin-right: 3px;
+}
+
+dd select {
+ width: auto;
+}
+
+dd textarea {
+ width: 85%;
+}
+
+/* Hover effects */
+fieldset dl:hover dt label {
+ color: #000000;
+}
+
+fieldset.fields2 dl:hover dt label {
+ color: inherit;
+}
+
+#timezone {
+ width: 95%;
+}
+
+* html #timezone {
+ width: 50%;
+}
+
+/* Quick-login on index page */
+fieldset.quick-login {
+ margin-top: 5px;
+}
+
+fieldset.quick-login input {
+ width: auto;
+}
+
+fieldset.quick-login input.inputbox {
+ width: 15%;
+ vertical-align: middle;
+ margin-right: 5px;
+ background-color: #f3f3f3;
+}
+
+fieldset.quick-login label {
+ white-space: nowrap;
+ padding-right: 2px;
+}
+
+/* Display options on viewtopic/viewforum pages */
+fieldset.display-options {
+ text-align: center;
+ margin: 3px 0 5px 0;
+}
+
+fieldset.display-options label {
+ white-space: nowrap;
+ padding-right: 2px;
+}
+
+fieldset.display-options a {
+ margin-top: 3px;
+}
+
+/* Display actions for ucp and mcp pages */
+fieldset.display-actions {
+ text-align: right;
+ line-height: 2em;
+ white-space: nowrap;
+ padding-right: 1em;
+}
+
+fieldset.display-actions label {
+ white-space: nowrap;
+ padding-right: 2px;
+}
+
+fieldset.sort-options {
+ line-height: 2em;
+}
+
+/* MCP forum selection*/
+fieldset.forum-selection {
+ margin: 5px 0 3px 0;
+ float: right;
+}
+
+fieldset.forum-selection2 {
+ margin: 13px 0 3px 0;
+ float: right;
+}
+
+/* Jumpbox */
+fieldset.jumpbox {
+ text-align: right;
+ margin-top: 15px;
+ height: 2.5em;
+}
+
+fieldset.quickmod {
+ width: 50%;
+ float: right;
+ text-align: right;
+ height: 2.5em;
+}
+
+/* Submit button fieldset */
+fieldset.submit-buttons {
+ text-align: center;
+ vertical-align: middle;
+ margin: 5px 0;
+}
+
+fieldset.submit-buttons input {
+ vertical-align: middle;
+ padding-top: 3px;
+ padding-bottom: 3px;
+}
+
+/* Posting page styles
+----------------------------------------*/
+
+/* Buttons used in the editor */
+#format-buttons {
+ margin: 15px 0 2px 0;
+}
+
+#format-buttons input, #format-buttons select {
+ vertical-align: middle;
+}
+
+/* Main message box */
+#message-box {
+ width: 80%;
+}
+
+#message-box textarea {
+ font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
+ width: 100%;
+ font-size: 1.2em;
+ color: #333333;
+}
+
+/* Emoticons panel */
+#smiley-box {
+ width: 18%;
+ float: right;
+}
+
+#smiley-box img {
+ margin: 3px;
+}
+
+/* Input field styles
+---------------------------------------- */
+.inputbox {
+ background-color: #FFFFFF;
+ border: 1px solid #c0c0c0;
+ color: #333333;
+ padding: 2px;
+ cursor: text;
+}
+
+.inputbox:hover {
+ border: 1px solid #eaeaea;
+}
+
+.inputbox:focus {
+ border: 1px solid #eaeaea;
+ color: #4b4b4b;
+}
+
+input.inputbox { width: 85%; }
+input.medium { width: 50%; }
+input.narrow { width: 25%; }
+input.tiny { width: 125px; }
+
+textarea.inputbox {
+ width: 85%;
+}
+
+.autowidth {
+ width: auto !important;
+}
+
+/* Form button styles
+---------------------------------------- */
+input.button1, input.button2 {
+ font-size: 1em;
+}
+
+a.button1, input.button1, input.button3, a.button2, input.button2 {
+ width: auto !important;
+ padding-top: 1px;
+ padding-bottom: 1px;
+ font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
+ color: #000;
+ background: #FAFAFA none repeat-x top;
+}
+
+a.button1, input.button1 {
+ font-weight: bold;
+ border: 1px solid #666666;
+}
+
+input.button3 {
+ padding: 0;
+ margin: 0;
+ line-height: 5px;
+ height: 12px;
+ background-image: none;
+ font-variant: small-caps;
+}
+
+/* Alternative button */
+a.button2, input.button2, input.button3 {
+ border: 1px solid #666666;
+}
+
+/* <a> button in the style of the form buttons */
+a.button1, a.button1:link, a.button1:visited, a.button1:active, a.button2, a.button2:link, a.button2:visited, a.button2:active {
+ text-decoration: none;
+ color: #000000;
+ padding: 2px 8px;
+ line-height: 250%;
+ vertical-align: text-bottom;
+ background-position: 0 1px;
+}
+
+/* Hover states */
+a.button1:hover, input.button1:hover, a.button2:hover, input.button2:hover, input.button3:hover {
+ border: 1px solid #BCBCBC;
+ background-position: 0 100%;
+ color: #BCBCBC;
+}
+
+input.disabled {
+ font-weight: normal;
+ color: #666666;
+}
+
+/* Topic and forum Search */
+.search-box {
+ margin-top: 3px;
+ margin-left: 5px;
+ float: left;
+}
+
+.search-box input {
+}
+
+input.search {
+ background-image: none;
+ background-repeat: no-repeat;
+ background-position: left 1px;
+ padding-left: 17px;
+}
+
+.full { width: 95%; }
+.medium { width: 50%;}
+.narrow { width: 25%;}
+.tiny { width: 10%;}
+
diff --git a/phpBB/styles/prosilver/theme/images/arrow_down.gif b/phpBB/styles/prosilver/theme/images/arrow_down.gif
new file mode 100644
index 0000000000..e45c365ecc
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/arrow_down.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/arrow_left.gif b/phpBB/styles/prosilver/theme/images/arrow_left.gif
new file mode 100644
index 0000000000..076a5596f1
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/arrow_left.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/arrow_right.gif b/phpBB/styles/prosilver/theme/images/arrow_right.gif
new file mode 100644
index 0000000000..c5827a401f
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/arrow_right.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/arrow_up.gif b/phpBB/styles/prosilver/theme/images/arrow_up.gif
new file mode 100644
index 0000000000..38b5a62c17
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/arrow_up.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/bg_button.gif b/phpBB/styles/prosilver/theme/images/bg_button.gif
new file mode 100644
index 0000000000..03172ff5c6
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/bg_button.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/bg_header.gif b/phpBB/styles/prosilver/theme/images/bg_header.gif
new file mode 100644
index 0000000000..351de9f46a
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/bg_header.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/bg_list.gif b/phpBB/styles/prosilver/theme/images/bg_list.gif
new file mode 100644
index 0000000000..89f8963fde
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/bg_list.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/bg_menu.gif b/phpBB/styles/prosilver/theme/images/bg_menu.gif
new file mode 100644
index 0000000000..4a9f5a9174
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/bg_menu.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/bg_menu_rtl.gif b/phpBB/styles/prosilver/theme/images/bg_menu_rtl.gif
new file mode 100644
index 0000000000..10add09a17
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/bg_menu_rtl.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/bg_tabs1.gif b/phpBB/styles/prosilver/theme/images/bg_tabs1.gif
new file mode 100644
index 0000000000..335a72c711
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/bg_tabs1.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/bg_tabs2.gif b/phpBB/styles/prosilver/theme/images/bg_tabs2.gif
new file mode 100644
index 0000000000..a2142d5432
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/bg_tabs2.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/corners_left.gif b/phpBB/styles/prosilver/theme/images/corners_left.gif
new file mode 100644
index 0000000000..206e50368d
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/corners_left.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/corners_left.png b/phpBB/styles/prosilver/theme/images/corners_left.png
new file mode 100644
index 0000000000..256bde3daa
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/corners_left.png
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/corners_left2.gif b/phpBB/styles/prosilver/theme/images/corners_left2.gif
new file mode 100644
index 0000000000..fa27ce3ba2
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/corners_left2.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/corners_right.gif b/phpBB/styles/prosilver/theme/images/corners_right.gif
new file mode 100644
index 0000000000..0ba66d50b2
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/corners_right.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/corners_right.png b/phpBB/styles/prosilver/theme/images/corners_right.png
new file mode 100644
index 0000000000..df41823b4c
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/corners_right.png
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/corners_right2.gif b/phpBB/styles/prosilver/theme/images/corners_right2.gif
new file mode 100644
index 0000000000..2d689446ee
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/corners_right2.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/created_by.jpg b/phpBB/styles/prosilver/theme/images/created_by.jpg
new file mode 100644
index 0000000000..68d56e2013
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/created_by.jpg
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/feed.gif b/phpBB/styles/prosilver/theme/images/feed.gif
new file mode 100644
index 0000000000..ff19905874
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/feed.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/gradient.gif b/phpBB/styles/prosilver/theme/images/gradient.gif
new file mode 100644
index 0000000000..21dc11f13b
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/gradient.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_bookmark.gif b/phpBB/styles/prosilver/theme/images/icon_bookmark.gif
new file mode 100644
index 0000000000..2644293f7d
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_bookmark.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_bump.gif b/phpBB/styles/prosilver/theme/images/icon_bump.gif
new file mode 100644
index 0000000000..014cd9bd15
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_bump.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_faq.gif b/phpBB/styles/prosilver/theme/images/icon_faq.gif
new file mode 100644
index 0000000000..4e26460629
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_faq.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_fontsize.gif b/phpBB/styles/prosilver/theme/images/icon_fontsize.gif
new file mode 100644
index 0000000000..1c7d83527c
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_fontsize.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_home.gif b/phpBB/styles/prosilver/theme/images/icon_home.gif
new file mode 100644
index 0000000000..8ae9004534
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_home.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_logout.gif b/phpBB/styles/prosilver/theme/images/icon_logout.gif
new file mode 100644
index 0000000000..b8ad5c4e5c
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_logout.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_members.gif b/phpBB/styles/prosilver/theme/images/icon_members.gif
new file mode 100644
index 0000000000..48e3e5f5f3
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_members.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_pages.gif b/phpBB/styles/prosilver/theme/images/icon_pages.gif
new file mode 100644
index 0000000000..44cc34500e
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_pages.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_print.gif b/phpBB/styles/prosilver/theme/images/icon_print.gif
new file mode 100644
index 0000000000..a71dfdde70
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_print.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_register.gif b/phpBB/styles/prosilver/theme/images/icon_register.gif
new file mode 100644
index 0000000000..9ecf126c4f
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_register.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_search.gif b/phpBB/styles/prosilver/theme/images/icon_search.gif
new file mode 100644
index 0000000000..8492cd308c
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_search.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_sendemail.gif b/phpBB/styles/prosilver/theme/images/icon_sendemail.gif
new file mode 100644
index 0000000000..f6b8aa10e1
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_sendemail.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_subscribe.gif b/phpBB/styles/prosilver/theme/images/icon_subscribe.gif
new file mode 100644
index 0000000000..5ca18af80a
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_subscribe.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_textbox_search.gif b/phpBB/styles/prosilver/theme/images/icon_textbox_search.gif
new file mode 100644
index 0000000000..b3b51d8425
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_textbox_search.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_ucp.gif b/phpBB/styles/prosilver/theme/images/icon_ucp.gif
new file mode 100644
index 0000000000..2a5fcc3f0c
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_ucp.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_unsubscribe.gif b/phpBB/styles/prosilver/theme/images/icon_unsubscribe.gif
new file mode 100644
index 0000000000..27013fc1cb
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_unsubscribe.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/index.htm b/phpBB/styles/prosilver/theme/images/index.htm
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/index.htm
diff --git a/phpBB/styles/prosilver/theme/images/no_avatar.gif b/phpBB/styles/prosilver/theme/images/no_avatar.gif
new file mode 100644
index 0000000000..80539c8c71
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/no_avatar.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/quote.gif b/phpBB/styles/prosilver/theme/images/quote.gif
new file mode 100644
index 0000000000..d1992273e6
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/quote.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/quote_rtl.gif b/phpBB/styles/prosilver/theme/images/quote_rtl.gif
new file mode 100644
index 0000000000..ac719cf280
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/quote_rtl.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/index.htm b/phpBB/styles/prosilver/theme/index.htm
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/index.htm
diff --git a/phpBB/styles/prosilver/theme/large.css b/phpBB/styles/prosilver/theme/large.css
new file mode 100644
index 0000000000..dfb1d2c2e6
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/large.css
@@ -0,0 +1,3 @@
+body {
+ font-size: 12px;
+} \ No newline at end of file
diff --git a/phpBB/styles/prosilver/theme/links.css b/phpBB/styles/prosilver/theme/links.css
new file mode 100644
index 0000000000..4284157326
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/links.css
@@ -0,0 +1,213 @@
+/* proSilver Link Styles
+---------------------------------------- */
+
+a:link { color: #898989; text-decoration: none; }
+a:visited { color: #898989; text-decoration: none; }
+a:hover { color: #d3d3d3; text-decoration: underline; }
+a:active { color: #d2d2d2; text-decoration: none; }
+
+/* Coloured usernames */
+.username-coloured {
+ font-weight: bold;
+ display: inline !important;
+ padding: 0 !important;
+}
+
+/* Links on gradient backgrounds */
+#search-box a:link, .navbg a:link, .forumbg .header a:link, .forabg .header a:link, th a:link {
+ color: #FFFFFF;
+ text-decoration: none;
+}
+
+#search-box a:visited, .navbg a:visited, .forumbg .header a:visited, .forabg .header a:visited, th a:visited {
+ color: #FFFFFF;
+ text-decoration: none;
+}
+
+#search-box a:hover, .navbg a:hover, .forumbg .header a:hover, .forabg .header a:hover, th a:hover {
+ color: #ffffff;
+ text-decoration: underline;
+}
+
+#search-box a:active, .navbg a:active, .forumbg .header a:active, .forabg .header a:active, th a:active {
+ color: #ffffff;
+ text-decoration: none;
+}
+
+/* Links for forum/topic lists */
+a.forumtitle {
+ font-family: "Trebuchet MS", Helvetica, Arial, Sans-serif;
+ font-size: 1.2em;
+ font-weight: bold;
+ color: #898989;
+ text-decoration: none;
+}
+
+/* a.forumtitle:visited { color: #898989; } */
+
+a.forumtitle:hover {
+ color: #bcbcbc;
+ text-decoration: underline;
+}
+
+a.forumtitle:active {
+ color: #898989;
+}
+
+a.topictitle {
+ font-family: "Trebuchet MS", Helvetica, Arial, Sans-serif;
+ font-size: 1.2em;
+ font-weight: bold;
+ color: #898989;
+ text-decoration: none;
+}
+
+/* a.topictitle:visited { color: #d2d2d2; } */
+
+a.topictitle:hover {
+ color: #bcbcbc;
+ text-decoration: underline;
+}
+
+a.topictitle:active {
+ color: #898989;
+}
+
+/* Post body links */
+.postlink {
+ text-decoration: none;
+ color: #d2d2d2;
+ border-bottom: 1px solid #d2d2d2;
+ padding-bottom: 0;
+}
+
+.postlink:visited {
+ color: #bdbdbd;
+ border-bottom-style: dotted;
+ border-bottom-color: #666666;
+}
+
+.postlink:active {
+ color: #d2d2d2;
+}
+
+.postlink:hover {
+ background-color: #f6f6f6;
+ text-decoration: none;
+ color: #404040;
+}
+
+.signature a, .signature a:visited, .signature a:active, .signature a:hover {
+ border: none;
+ text-decoration: underline;
+ background-color: transparent;
+}
+
+/* Profile links */
+.postprofile a:link, .postprofile a:active, .postprofile a:visited, .postprofile dt.author a {
+ font-weight: bold;
+ color: #898989;
+ text-decoration: none;
+}
+
+.postprofile a:hover, .postprofile dt.author a:hover {
+ text-decoration: underline;
+ color: #d3d3d3;
+}
+
+
+/* Profile searchresults */
+.search .postprofile a {
+ color: #898989;
+ text-decoration: none;
+ font-weight: normal;
+}
+
+.search .postprofile a:hover {
+ color: #d3d3d3;
+ text-decoration: underline;
+}
+
+/* Back to top of page */
+.back2top {
+ clear: both;
+ height: 11px;
+ text-align: right;
+}
+
+a.top {
+ background: none no-repeat top left;
+ text-decoration: none;
+ width: {IMG_ICON_BACK_TOP_WIDTH}px;
+ height: {IMG_ICON_BACK_TOP_HEIGHT}px;
+ display: block;
+ float: right;
+ overflow: hidden;
+ letter-spacing: 1000px;
+ text-indent: 11px;
+}
+
+a.top2 {
+ background: none no-repeat 0 50%;
+ text-decoration: none;
+ padding-left: 15px;
+}
+
+/* Arrow links */
+a.up { background: none no-repeat left center; }
+a.down { background: none no-repeat right center; }
+a.left { background: none no-repeat 3px 60%; }
+a.right { background: none no-repeat 95% 60%; }
+
+a.up, a.up:link, a.up:active, a.up:visited {
+ padding-left: 10px;
+ text-decoration: none;
+ border-bottom-width: 0;
+}
+
+a.up:hover {
+ background-position: left top;
+ background-color: transparent;
+}
+
+a.down, a.down:link, a.down:active, a.down:visited {
+ padding-right: 10px;
+}
+
+a.down:hover {
+ background-position: right bottom;
+ text-decoration: none;
+}
+
+a.left, a.left:active, a.left:visited {
+ padding-left: 12px;
+}
+
+a.left:hover {
+ color: #d2d2d2;
+ text-decoration: none;
+ background-position: 0 60%;
+}
+
+a.right, a.right:active, a.right:visited {
+ padding-right: 12px;
+}
+
+a.right:hover {
+ color: #d2d2d2;
+ text-decoration: none;
+ background-position: 100% 60%;
+}
+
+/* invisible skip link, used for accessibility */
+.skiplink {
+ position: absolute;
+ left: -999px;
+ width: 990px;
+}
+
+/* Feed icon in forumlist_body.html */
+a.feed-icon-forum {
+ float: right;
+ margin: 3px;
+}
diff --git a/phpBB/styles/prosilver/theme/medium.css b/phpBB/styles/prosilver/theme/medium.css
new file mode 100644
index 0000000000..4c992f9fd8
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/medium.css
@@ -0,0 +1,3 @@
+body {
+ font-size: 11px;
+} \ No newline at end of file
diff --git a/phpBB/styles/prosilver/theme/normal.css b/phpBB/styles/prosilver/theme/normal.css
new file mode 100644
index 0000000000..d0783d1882
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/normal.css
@@ -0,0 +1,3 @@
+body {
+ font-size: 10px;
+} \ No newline at end of file
diff --git a/phpBB/styles/prosilver/theme/print.css b/phpBB/styles/prosilver/theme/print.css
new file mode 100644
index 0000000000..6dfb5c4726
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/print.css
@@ -0,0 +1,142 @@
+/* proSilver Print Style Sheet
+-------------------------------------------------
+ Author: subBlue ( http://www.subBlue.com/ )
+ Version: 25 August 2004
+
+ Copyright 2004 phpBB Group
+-------------------------------------------------*/
+
+
+/* Lots still TODO here! */
+
+/* General markup styles */
+* {
+ padding: 0;
+ margin: 0;
+}
+
+body {
+ font: 11pt Verdana, Arial, Helvetica, sans-serif;
+ color:#000000;
+}
+
+a:link { color: #000000; text-decoration: none; }
+a:visited { color: #000000; text-decoration: none; }
+a:active { color: #000000; text-decoration: none; }
+
+img, .noprint, #sub-header, #sub-footer, .navbar, .box1, .divider, .signature { display: none; }
+/* Display smilies (Bug #47265) */
+.content img {
+ display: inline;
+}
+
+/* Container for the main body */
+#wrap {
+ margin: 0 2em;
+}
+
+p { font-size: 85%; }
+.copyright { font-size: 75%; }
+.page-number { float:right; width: auto; text-align: right; font-size: 75%; }
+
+h1, h2, h3, h1 a, h2 a, h3 a {
+ font-family: "Trebuchet MS",georgia,Verdana,Sans-serif;
+ color: #000000;
+ background: none;
+ text-decoration: none;
+ font-weight: bold;
+}
+
+h1 { font-size: 20pt; }
+h2 { font-size: 16pt; margin-top: 1em; }
+h3 { font-size: 14pt; margin-top: 1em; }
+
+.content {
+ font-size: 11pt;
+ line-height: 14pt;
+ margin-bottom: 1em;
+ font-family: "Lucida Grande", "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
+ overflow: hidden;
+}
+
+/* CSS2 Print tip from: http://www.alistapart.com/articles/goingtoprint/ */
+.postbody a:link, .postbody a:visited, .postbody a:active, .postbody a:hover {
+ text-decoration: underline;
+ padding: 0.1em 0.2em;
+ margin: -0.1em -0.2em;
+ color: #666;
+ background: none;
+ font-size: 100%;
+}
+
+html>body .postbody a:link:after, html>body .postbody a:visited:after {
+ content: " (" attr(href) ") ";
+ font-size: 90%;
+ text-decoration: none;
+}
+
+hr {
+ height: 1px;
+ background-color: #999999;
+ border-width: 0;
+}
+
+.author {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 75%;
+ margin-bottom: 0.6em;
+}
+
+.date {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ float: right;
+ position: relative;
+ text-align: right;
+ font-size: 75%;
+}
+
+/* Dont want to print url for names or titles in content area */
+.postbody .author a:link, .postbody .author a:visited,
+html>body .postbody .author a:link:after,
+html>body .postbody .author a:visited:after,
+.postquote .quote-by a:link, .postquote .quote-by a:visited,
+html>body .postquote .quote-by a:link:after,
+html>body .postquote .quote-by a:visited:after,
+html>body .postbody h1 a:link:after, html>body .postbody h2 a:link:after {
+ text-decoration: none;
+ content: "";
+}
+
+/* Poster profile */
+.postprofile { display: none; }
+.grip-show { display:none; }
+
+/* Quote */
+.postquote, blockquote {
+ font-size: 85%;
+ margin: 1em 18% 1em 4%;
+ padding: 0.5em;
+ position: relative;
+ line-height: 1.5em;
+ border: 1px #999999 solid;
+}
+
+.postquote img { display: none; }
+.postquote span { display: block; }
+.postquote span .postquote { font-size: 100%; }
+.quote-by, blockquote cite {
+ color: black;
+ display : block;
+ font-weight: bold;
+}
+
+/* List */
+ol, ul {
+ margin-left: 15pt
+}
+
+/* Misc page elements */
+div.spacer { clear: both; }
+
+/* Accessibility tweaks: Mozilla.org */
+.skip_link { display: none; }
diff --git a/phpBB/styles/prosilver/theme/stylesheet.css b/phpBB/styles/prosilver/theme/stylesheet.css
new file mode 100644
index 0000000000..c7db605bbb
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/stylesheet.css
@@ -0,0 +1,19 @@
+/* phpBB 3.0 Style Sheet
+ --------------------------------------------------------------
+ Style name: proSilver
+ Based on style: proSilver (this is the default phpBB 3 style)
+ Original author: subBlue ( http://www.subBlue.com/ )
+ Modified by:
+
+ Copyright 2006 phpBB Group ( http://www.phpbb.com/ )
+ --------------------------------------------------------------
+*/
+
+@import url("common.css");
+@import url("links.css");
+@import url("content.css");
+@import url("buttons.css");
+@import url("cp.css");
+@import url("forms.css");
+@import url("tweaks.css");
+@import url("colours.css");
diff --git a/phpBB/styles/prosilver/theme/theme.cfg b/phpBB/styles/prosilver/theme/theme.cfg
new file mode 100644
index 0000000000..91a35bbcc8
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/theme.cfg
@@ -0,0 +1,35 @@
+#
+# phpBB Theme Configuration File
+#
+# @package phpBB3
+# @copyright (c) 2006 phpBB Group
+# @license http://opensource.org/licenses/gpl-license.php GNU Public License
+#
+#
+# At the left is the name, please do not change this
+# At the right the value is entered
+# For on/off options the valid values are on, off, 1, 0, true and false
+#
+# Values get trimmed, if you want to add a space in front or at the end of
+# the value, then enclose the value with single or double quotes.
+# Single and double quotes do not need to be escaped.
+#
+# Available and used values:
+# parse_css_file
+#
+
+# General Information about this theme
+name = prosilver
+copyright = &copy; phpBB Group, 2007
+version = 3.0.6
+
+# Some configuration options
+
+#
+# You have to turn this option on if you want to use the
+# path template variables ({T_IMAGESET_PATH} for example) within
+# your css file.
+# This is mostly the case if you want to use language specific
+# images within your css file.
+#
+parse_css_file = 1
diff --git a/phpBB/styles/prosilver/theme/tweaks.css b/phpBB/styles/prosilver/theme/tweaks.css
new file mode 100644
index 0000000000..782e682b9d
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/tweaks.css
@@ -0,0 +1,92 @@
+/* proSilver Style Sheet Tweaks
+
+These style definitions are mainly IE specific
+tweaks required due to its poor CSS support.
+-------------------------------------------------*/
+
+* html table, * html select, * html input { font-size: 100%; }
+* html hr { margin: 0; }
+* html span.corners-top, * html span.corners-bottom { background-image: url("{T_THEME_PATH}/images/corners_left.gif"); }
+* html span.corners-top span, * html span.corners-bottom span { background-image: url("{T_THEME_PATH}/images/corners_right.gif"); }
+
+table.table1 {
+ width: 99%; /* IE < 6 browsers */
+ /* Tantek hack */
+ voice-family: "\"}\"";
+ voice-family: inherit;
+ width: 100%;
+}
+html>body table.table1 { width: 100%; } /* Reset 100% for opera */
+
+* html ul.topiclist li { position: relative; }
+* html .postbody h3 img { vertical-align: middle; }
+
+/* Form styles */
+html>body dd label input { vertical-align: text-bottom; } /* Align checkboxes/radio buttons nicely */
+
+* html input.button1, * html input.button2 {
+ padding-bottom: 0;
+ margin-bottom: 1px;
+}
+
+/* Misc layout styles */
+* html .column1, * html .column2 { width: 45%; }
+
+/* Nice method for clearing floated blocks without having to insert any extra markup (like spacer above)
+ From http://www.positioniseverything.net/easyclearing.html
+#tabs:after, #minitabs:after, .post:after, .navbar:after, fieldset dl:after, ul.topiclist dl:after, ul.linklist:after, dl.polls:after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}*/
+
+.clearfix, #tabs, #minitabs, fieldset dl, ul.topiclist dl, dl.polls {
+ height: 1%;
+ overflow: hidden;
+}
+
+/* viewtopic fix */
+* html .post {
+ height: 25%;
+ overflow: hidden;
+}
+
+/* navbar fix */
+* html .clearfix, * html .navbar, ul.linklist {
+ height: 4%;
+ overflow: hidden;
+}
+
+/* Simple fix so forum and topic lists always have a min-height set, even in IE6
+ From http://www.dustindiaz.com/min-height-fast-hack */
+dl.icon {
+ min-height: 35px;
+ height: auto !important;
+ height: 35px;
+}
+
+* html li.row dl.icon dt {
+ height: 35px;
+ overflow: visible;
+}
+
+* html #search-box {
+ width: 25%;
+}
+
+/* Correctly clear floating for details on profile view */
+*:first-child+html dl.details dd {
+ margin-left: 30%;
+ float: none;
+}
+
+* html dl.details dd {
+ margin-left: 30%;
+ float: none;
+}
+
+* html .forumbg table.table1 {
+ margin: 0 -2px 0px -1px;
+}
diff --git a/phpBB/styles/subsilver2/imageset/announce_read.gif b/phpBB/styles/subsilver2/imageset/announce_read.gif
new file mode 100644
index 0000000000..0589feb14f
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/announce_read.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/announce_read_locked.gif b/phpBB/styles/subsilver2/imageset/announce_read_locked.gif
new file mode 100644
index 0000000000..a738616e06
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/announce_read_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/announce_read_locked_mine.gif b/phpBB/styles/subsilver2/imageset/announce_read_locked_mine.gif
new file mode 100644
index 0000000000..f7ffe7f8dd
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/announce_read_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/announce_read_mine.gif b/phpBB/styles/subsilver2/imageset/announce_read_mine.gif
new file mode 100644
index 0000000000..636d353867
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/announce_read_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/announce_unread.gif b/phpBB/styles/subsilver2/imageset/announce_unread.gif
new file mode 100644
index 0000000000..56b2702b17
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/announce_unread.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/announce_unread_locked.gif b/phpBB/styles/subsilver2/imageset/announce_unread_locked.gif
new file mode 100644
index 0000000000..37033da653
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/announce_unread_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/announce_unread_locked_mine.gif b/phpBB/styles/subsilver2/imageset/announce_unread_locked_mine.gif
new file mode 100644
index 0000000000..d91f2520ca
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/announce_unread_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/announce_unread_mine.gif b/phpBB/styles/subsilver2/imageset/announce_unread_mine.gif
new file mode 100644
index 0000000000..e1dd23a0bf
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/announce_unread_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/button_pm_new.gif b/phpBB/styles/subsilver2/imageset/en/button_pm_new.gif
new file mode 100644
index 0000000000..07df748d3a
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/button_pm_new.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/button_pm_reply.gif b/phpBB/styles/subsilver2/imageset/en/button_pm_reply.gif
new file mode 100644
index 0000000000..c476f06a44
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/button_pm_reply.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/button_topic_locked.gif b/phpBB/styles/subsilver2/imageset/en/button_topic_locked.gif
new file mode 100644
index 0000000000..124a2d4a7d
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/button_topic_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/button_topic_new.gif b/phpBB/styles/subsilver2/imageset/en/button_topic_new.gif
new file mode 100644
index 0000000000..66e1007129
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/button_topic_new.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/button_topic_reply.gif b/phpBB/styles/subsilver2/imageset/en/button_topic_reply.gif
new file mode 100644
index 0000000000..e8fe5115a0
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/button_topic_reply.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_contact_aim.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_aim.gif
new file mode 100644
index 0000000000..c6533e2817
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_contact_aim.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_contact_email.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_email.gif
new file mode 100644
index 0000000000..f126a1960d
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_contact_email.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_contact_icq.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_icq.gif
new file mode 100644
index 0000000000..ba3fa12436
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_contact_icq.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_contact_jabber.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_jabber.gif
new file mode 100644
index 0000000000..be2e53f9c2
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_contact_jabber.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_contact_msnm.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_msnm.gif
new file mode 100644
index 0000000000..e3a5901bfc
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_contact_msnm.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_contact_pm.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_pm.gif
new file mode 100644
index 0000000000..26ac558c2f
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_contact_pm.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_contact_www.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_www.gif
new file mode 100644
index 0000000000..14a33b36a5
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_contact_www.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_contact_yahoo.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_yahoo.gif
new file mode 100644
index 0000000000..d11711789f
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_contact_yahoo.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_post_delete.gif b/phpBB/styles/subsilver2/imageset/en/icon_post_delete.gif
new file mode 100644
index 0000000000..e008e5ff9f
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_post_delete.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_post_edit.gif b/phpBB/styles/subsilver2/imageset/en/icon_post_edit.gif
new file mode 100644
index 0000000000..1511ee34d3
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_post_edit.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_post_info.gif b/phpBB/styles/subsilver2/imageset/en/icon_post_info.gif
new file mode 100644
index 0000000000..166de2724f
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_post_info.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_post_quote.gif b/phpBB/styles/subsilver2/imageset/en/icon_post_quote.gif
new file mode 100644
index 0000000000..4cf103280c
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_post_quote.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_post_report.gif b/phpBB/styles/subsilver2/imageset/en/icon_post_report.gif
new file mode 100644
index 0000000000..9a3f65b1e3
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_post_report.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_user_offline.gif b/phpBB/styles/subsilver2/imageset/en/icon_user_offline.gif
new file mode 100644
index 0000000000..3065f4d7fe
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_user_offline.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_user_online.gif b/phpBB/styles/subsilver2/imageset/en/icon_user_online.gif
new file mode 100644
index 0000000000..b950612c57
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_user_online.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_user_profile.gif b/phpBB/styles/subsilver2/imageset/en/icon_user_profile.gif
new file mode 100644
index 0000000000..d9cf7f4c4a
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_user_profile.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_user_search.gif b/phpBB/styles/subsilver2/imageset/en/icon_user_search.gif
new file mode 100644
index 0000000000..46475fbf4c
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_user_search.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_user_warn.gif b/phpBB/styles/subsilver2/imageset/en/icon_user_warn.gif
new file mode 100644
index 0000000000..44cbcc953a
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/icon_user_warn.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/imageset.cfg b/phpBB/styles/subsilver2/imageset/en/imageset.cfg
new file mode 100644
index 0000000000..c0cc699737
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/en/imageset.cfg
@@ -0,0 +1,47 @@
+#
+# phpBB Imageset Configuration File
+#
+# @package phpBB3
+# @copyright (c) 2005 phpBB Group
+# @license http://opensource.org/licenses/gpl-license.php GNU Public License
+#
+#
+# At the left is the name, please do not change this
+# At the right the value is entered
+# For on/off options the valid values are on, off, 1, 0, true and false
+#
+# Values get trimmed, if you want to add a space in front or at the end of
+# the value, then enclose the value with single or double quotes.
+# Single and double quotes do not need to be escaped.
+#
+#
+
+# Images
+img_icon_contact_aim = icon_contact_aim.gif
+img_icon_contact_email = icon_contact_email.gif
+img_icon_contact_icq = icon_contact_icq.gif
+img_icon_contact_jabber = icon_contact_jabber.gif
+img_icon_contact_msnm = icon_contact_msnm.gif
+img_icon_contact_pm = icon_contact_pm.gif
+img_icon_contact_yahoo = icon_contact_yahoo.gif
+img_icon_contact_www = icon_contact_www.gif
+
+img_icon_post_delete = icon_post_delete.gif
+img_icon_post_edit = icon_post_edit.gif
+img_icon_post_info = icon_post_info.gif
+img_icon_post_quote = icon_post_quote.gif
+img_icon_post_report = icon_post_report.gif
+
+img_icon_user_online = icon_user_online.gif
+img_icon_user_offline = icon_user_offline.gif
+img_icon_user_profile = icon_user_profile.gif
+img_icon_user_search = icon_user_search.gif
+img_icon_user_warn = icon_user_warn.gif
+
+img_button_pm_forward =
+img_button_pm_new = button_pm_new.gif
+img_button_pm_reply = button_pm_reply.gif
+img_button_topic_locked = button_topic_locked.gif
+img_button_topic_new = button_topic_new.gif
+img_button_topic_reply = button_topic_reply.gif
+
diff --git a/phpBB/styles/subsilver2/imageset/forum_link.gif b/phpBB/styles/subsilver2/imageset/forum_link.gif
new file mode 100644
index 0000000000..d5e86d47d7
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/forum_link.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/forum_read.gif b/phpBB/styles/subsilver2/imageset/forum_read.gif
new file mode 100644
index 0000000000..9b2bc47c67
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/forum_read.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/forum_read_locked.gif b/phpBB/styles/subsilver2/imageset/forum_read_locked.gif
new file mode 100644
index 0000000000..436f3d21c8
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/forum_read_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/forum_read_subforum.gif b/phpBB/styles/subsilver2/imageset/forum_read_subforum.gif
new file mode 100644
index 0000000000..9179303e7f
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/forum_read_subforum.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/forum_unread.gif b/phpBB/styles/subsilver2/imageset/forum_unread.gif
new file mode 100644
index 0000000000..5eec565b38
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/forum_unread.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/forum_unread_locked.gif b/phpBB/styles/subsilver2/imageset/forum_unread_locked.gif
new file mode 100644
index 0000000000..58a79c376c
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/forum_unread_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/forum_unread_subforum.gif b/phpBB/styles/subsilver2/imageset/forum_unread_subforum.gif
new file mode 100644
index 0000000000..af3c93b1a1
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/forum_unread_subforum.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/icon_post_target.gif b/phpBB/styles/subsilver2/imageset/icon_post_target.gif
new file mode 100644
index 0000000000..d172abb060
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/icon_post_target.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/icon_post_target_unread.gif b/phpBB/styles/subsilver2/imageset/icon_post_target_unread.gif
new file mode 100644
index 0000000000..8ec44a1787
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/icon_post_target_unread.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/icon_topic_attach.gif b/phpBB/styles/subsilver2/imageset/icon_topic_attach.gif
new file mode 100644
index 0000000000..1c9c89bc70
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/icon_topic_attach.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/icon_topic_latest.gif b/phpBB/styles/subsilver2/imageset/icon_topic_latest.gif
new file mode 100644
index 0000000000..b45e57aedb
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/icon_topic_latest.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/icon_topic_newest.gif b/phpBB/styles/subsilver2/imageset/icon_topic_newest.gif
new file mode 100644
index 0000000000..eca2861836
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/icon_topic_newest.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/icon_topic_reported.gif b/phpBB/styles/subsilver2/imageset/icon_topic_reported.gif
new file mode 100644
index 0000000000..026092854a
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/icon_topic_reported.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/icon_topic_unapproved.gif b/phpBB/styles/subsilver2/imageset/icon_topic_unapproved.gif
new file mode 100644
index 0000000000..2ccaf19c23
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/icon_topic_unapproved.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/imageset.cfg b/phpBB/styles/subsilver2/imageset/imageset.cfg
new file mode 100644
index 0000000000..97fd0d8949
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/imageset.cfg
@@ -0,0 +1,100 @@
+#
+# phpBB Imageset Configuration File
+#
+# @package phpBB3
+# @copyright (c) 2005 phpBB Group
+# @license http://opensource.org/licenses/gpl-license.php GNU Public License
+#
+#
+# At the left is the name, please do not change this
+# At the right the value is entered
+# For on/off options the valid values are on, off, 1, 0, true and false
+#
+# Values get trimmed, if you want to add a space in front or at the end of
+# the value, then enclose the value with single or double quotes.
+# Single and double quotes do not need to be escaped.
+#
+#
+
+# General Information about this style
+name = subsilver2
+copyright = &copy; phpBB Group, 2003
+version = 3.0.6
+
+# Images
+img_site_logo = site_logo.gif*94*170
+img_upload_bar = upload_bar.gif*16*280
+img_poll_left = poll_left.gif*12*4
+img_poll_center = poll_center.gif*12*1
+img_poll_right = poll_right.gif*12*4
+img_icon_friend =
+img_icon_foe =
+
+img_forum_link = forum_link.gif*25*46
+img_forum_read = forum_read.gif*25*46
+img_forum_read_locked = forum_read_locked.gif*25*46
+img_forum_read_subforum = forum_read_subforum.gif*25*46
+img_forum_unread = forum_unread.gif*25*46
+img_forum_unread_locked = forum_unread_locked.gif*25*46
+img_forum_unread_subforum = forum_unread_subforum.gif*25*46
+
+img_topic_moved = topic_moved.gif*18*19
+
+img_topic_read = topic_read.gif*18*19
+img_topic_read_mine = topic_read_mine.gif*18*19
+img_topic_read_hot = topic_read_hot.gif*18*19
+img_topic_read_hot_mine = topic_read_hot_mine.gif*18*19
+img_topic_read_locked = topic_read_locked.gif*18*19
+img_topic_read_locked_mine = topic_read_locked_mine.gif*18*19
+
+img_topic_unread = topic_unread.gif*18*19
+img_topic_unread_mine = topic_unread_mine.gif*18*19
+img_topic_unread_hot = topic_unread_hot.gif*18*19
+img_topic_unread_hot_mine = topic_unread_hot_mine.gif*18*19
+img_topic_unread_locked = topic_unread_locked.gif*18*19
+img_topic_unread_locked_mine = topic_unread_locked_mine.gif*18*19
+
+img_sticky_read = sticky_read.gif*18*19
+img_sticky_read_mine = sticky_read_mine.gif*18*19
+img_sticky_read_locked = sticky_read_locked.gif*18*19
+img_sticky_read_locked_mine = sticky_read_locked_mine.gif*18*19
+img_sticky_unread = sticky_unread.gif*18*19
+img_sticky_unread_mine = sticky_unread_mine.gif*18*19
+img_sticky_unread_locked = sticky_unread_locked.gif*18*19
+img_sticky_unread_locked_mine = sticky_unread_locked_mine.gif*18*19
+
+img_announce_read = announce_read.gif*18*19
+img_announce_read_mine = announce_read_mine.gif*18*19
+img_announce_read_locked = announce_read_locked.gif*18*19
+img_announce_read_locked_mine = announce_read_locked_mine.gif*18*19
+img_announce_unread = announce_unread.gif*18*19
+img_announce_unread_mine = announce_unread_mine.gif*18*19
+img_announce_unread_locked = announce_unread_locked.gif*18*19
+img_announce_unread_locked_mine = announce_unread_locked_mine.gif*18*19
+
+img_global_read = announce_read.gif*18*19
+img_global_read_mine = announce_read_mine.gif*18*19
+img_global_read_locked = announce_read_locked.gif*18*19
+img_global_read_locked_mine = announce_read_locked_mine.gif*18*19
+img_global_unread = announce_unread.gif*18*19
+img_global_unread_mine = announce_unread_mine.gif*18*19
+img_global_unread_locked = announce_unread_locked.gif*18*19
+img_global_unread_locked_mine = announce_unread_locked_mine.gif*18*19
+
+img_subforum_read =
+img_subforum_unread =
+
+img_pm_read = topic_read.gif*18*19
+img_pm_unread = topic_unread.gif*18*19
+
+img_icon_back_top =
+
+img_icon_post_target = icon_post_target.gif*9*12
+img_icon_post_target_unread = icon_post_target_unread.gif*9*12
+
+img_icon_topic_attach = icon_topic_attach.gif*18*14
+img_icon_topic_latest = icon_topic_latest.gif*9*18
+img_icon_topic_newest = icon_topic_newest.gif*9*18
+img_icon_topic_reported = icon_topic_reported.gif*18*19
+img_icon_topic_unapproved = icon_topic_unapproved.gif*18*19
+
diff --git a/phpBB/styles/subsilver2/imageset/poll_center.gif b/phpBB/styles/subsilver2/imageset/poll_center.gif
new file mode 100644
index 0000000000..99473151ec
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/poll_center.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/poll_left.gif b/phpBB/styles/subsilver2/imageset/poll_left.gif
new file mode 100644
index 0000000000..269088b81d
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/poll_left.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/poll_right.gif b/phpBB/styles/subsilver2/imageset/poll_right.gif
new file mode 100644
index 0000000000..f9584e23a1
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/poll_right.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/site_logo.gif b/phpBB/styles/subsilver2/imageset/site_logo.gif
new file mode 100644
index 0000000000..abce3cd51d
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/site_logo.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/sticky_read.gif b/phpBB/styles/subsilver2/imageset/sticky_read.gif
new file mode 100644
index 0000000000..09861a996c
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/sticky_read.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/sticky_read_locked.gif b/phpBB/styles/subsilver2/imageset/sticky_read_locked.gif
new file mode 100644
index 0000000000..24bca303d6
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/sticky_read_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/sticky_read_locked_mine.gif b/phpBB/styles/subsilver2/imageset/sticky_read_locked_mine.gif
new file mode 100644
index 0000000000..3fd04ec3a9
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/sticky_read_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/sticky_read_mine.gif b/phpBB/styles/subsilver2/imageset/sticky_read_mine.gif
new file mode 100644
index 0000000000..381634c364
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/sticky_read_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/sticky_unread.gif b/phpBB/styles/subsilver2/imageset/sticky_unread.gif
new file mode 100644
index 0000000000..dd2e366543
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/sticky_unread.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/sticky_unread_locked.gif b/phpBB/styles/subsilver2/imageset/sticky_unread_locked.gif
new file mode 100644
index 0000000000..608f4822e3
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/sticky_unread_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/sticky_unread_locked_mine.gif b/phpBB/styles/subsilver2/imageset/sticky_unread_locked_mine.gif
new file mode 100644
index 0000000000..fe5e115312
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/sticky_unread_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/sticky_unread_mine.gif b/phpBB/styles/subsilver2/imageset/sticky_unread_mine.gif
new file mode 100644
index 0000000000..b5fc3b3627
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/sticky_unread_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_moved.gif b/phpBB/styles/subsilver2/imageset/topic_moved.gif
new file mode 100644
index 0000000000..fe758f02ca
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/topic_moved.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_read.gif b/phpBB/styles/subsilver2/imageset/topic_read.gif
new file mode 100644
index 0000000000..c16bfa75d5
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/topic_read.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_read_hot.gif b/phpBB/styles/subsilver2/imageset/topic_read_hot.gif
new file mode 100644
index 0000000000..a7a7e8fc78
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/topic_read_hot.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_read_hot_mine.gif b/phpBB/styles/subsilver2/imageset/topic_read_hot_mine.gif
new file mode 100644
index 0000000000..853452a74b
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/topic_read_hot_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_read_locked.gif b/phpBB/styles/subsilver2/imageset/topic_read_locked.gif
new file mode 100644
index 0000000000..10eb776972
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/topic_read_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_read_locked_mine.gif b/phpBB/styles/subsilver2/imageset/topic_read_locked_mine.gif
new file mode 100644
index 0000000000..3f24928b48
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/topic_read_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_read_mine.gif b/phpBB/styles/subsilver2/imageset/topic_read_mine.gif
new file mode 100644
index 0000000000..560927aa06
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/topic_read_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_unread.gif b/phpBB/styles/subsilver2/imageset/topic_unread.gif
new file mode 100644
index 0000000000..4e56157dce
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/topic_unread.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_unread_hot.gif b/phpBB/styles/subsilver2/imageset/topic_unread_hot.gif
new file mode 100644
index 0000000000..ceef4919d5
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/topic_unread_hot.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_unread_hot_mine.gif b/phpBB/styles/subsilver2/imageset/topic_unread_hot_mine.gif
new file mode 100644
index 0000000000..1c748f708a
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/topic_unread_hot_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_unread_locked.gif b/phpBB/styles/subsilver2/imageset/topic_unread_locked.gif
new file mode 100644
index 0000000000..720e210289
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/topic_unread_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_unread_locked_mine.gif b/phpBB/styles/subsilver2/imageset/topic_unread_locked_mine.gif
new file mode 100644
index 0000000000..90873431ef
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/topic_unread_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_unread_mine.gif b/phpBB/styles/subsilver2/imageset/topic_unread_mine.gif
new file mode 100644
index 0000000000..34fd2ec179
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/topic_unread_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/upload_bar.gif b/phpBB/styles/subsilver2/imageset/upload_bar.gif
new file mode 100644
index 0000000000..75cf61c59e
--- /dev/null
+++ b/phpBB/styles/subsilver2/imageset/upload_bar.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/style.cfg b/phpBB/styles/subsilver2/style.cfg
new file mode 100644
index 0000000000..5eaaac782d
--- /dev/null
+++ b/phpBB/styles/subsilver2/style.cfg
@@ -0,0 +1,22 @@
+#
+# phpBB Style Configuration File
+#
+# @package phpBB3
+# @copyright (c) 2005 phpBB Group
+# @license http://opensource.org/licenses/gpl-license.php GNU Public License
+#
+#
+# At the left is the name, please do not change this
+# At the right the value is entered
+# For on/off options the valid values are on, off, 1, 0, true and false
+#
+# Values get trimmed, if you want to add a space in front or at the end of
+# the value, then enclose the value with single or double quotes.
+# Single and double quotes do not need to be escaped.
+#
+#
+
+# General Information about this style
+name = subsilver2
+copyright = &copy; 2005 phpBB Group
+version = 3.0.6
diff --git a/phpBB/styles/subsilver2/template/attachment.html b/phpBB/styles/subsilver2/template/attachment.html
new file mode 100644
index 0000000000..d54994fe67
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/attachment.html
@@ -0,0 +1,121 @@
+
+<!-- BEGIN _file -->
+
+ <!-- IF _file.S_DENIED -->
+ <span class="genmed">[{_file.DENIED_MESSAGE}]</span><br />
+ <!-- ELSE -->
+
+ <!-- IF _file.COMMENT -->
+ <span class="gensmall"><b>{L_FILE_COMMENT}:</b> {_file.COMMENT}</span><br />
+ <!-- ENDIF -->
+
+ <!-- IF _file.S_THUMBNAIL -->
+ <a href="{_file.U_DOWNLOAD_LINK}"><img src="{_file.THUMB_IMAGE}" alt="{_file.DOWNLOAD_NAME}" /></a><br />
+ <span class="gensmall">{_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOAD_COUNT} ]</span>
+ <!-- ENDIF -->
+
+ <!-- IF _file.S_IMAGE -->
+ <img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}" /><br />
+ <span class="gensmall">{_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOAD_COUNT} ]</span>
+ <!-- ENDIF -->
+
+ <!-- IF _file.S_FILE -->
+ <span class="genmed">
+ <!-- IF _file.UPLOAD_ICON -->{_file.UPLOAD_ICON} <!-- ENDIF -->
+ <a href="{_file.U_DOWNLOAD_LINK}">{_file.DOWNLOAD_NAME}</a> [{_file.FILESIZE} {_file.SIZE_LANG}]
+ </span><br />
+ <span class="gensmall">{_file.L_DOWNLOAD_COUNT}</span>
+ <!-- ENDIF -->
+
+ <!-- IF _file.S_WM_FILE -->
+ <!-- method used here from http://alistapart.com/articles/byebyeembed / autosizing seems to not work always, this will not fix -->
+ <object width="320" height="285" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" id="wmstream_{_file.ATTACH_ID}">
+ <param name="url" value="{_file.U_DOWNLOAD_LINK}" />
+ <param name="showcontrols" value="1" />
+ <param name="showdisplay" value="0" />
+ <param name="showstatusbar" value="0" />
+ <param name="autosize" value="1" />
+ <param name="autostart" value="0" />
+ <param name="visible" value="1" />
+ <param name="animationstart" value="0" />
+ <param name="loop" value="0" />
+ <param name="src" value="{_file.U_DOWNLOAD_LINK}" />
+ <!--[if !IE]>-->
+ <object width="320" height="285" type="video/x-ms-wmv" data="{_file.U_DOWNLOAD_LINK}">
+ <param name="src" value="{_file.U_DOWNLOAD_LINK}" />
+ <param name="controller" value="1" />
+ <param name="showcontrols" value="1" />
+ <param name="showdisplay" value="0" />
+ <param name="showstatusbar" value="0" />
+ <param name="autosize" value="1" />
+ <param name="autostart" value="0" />
+ <param name="visible" value="1" />
+ <param name="animationstart" value="0" />
+ <param name="loop" value="0" />
+ </object>
+ <!--<![endif]-->
+ </object>
+
+ <!-- ELSEIF _file.S_FLASH_FILE -->
+ <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{_file.WIDTH}" height="{_file.HEIGHT}">
+ <param name="movie" value="{_file.U_DOWNLOAD_LINK}" />
+ <param name="play" value="true" />
+ <param name="loop" value="true" />
+ <param name="quality" value="high" />
+ <param name="allowScriptAccess" value="never" />
+ <param name="allowNetworking" value="internal" />
+ <embed src="{_file.U_DOWNLOAD_LINK}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{_file.WIDTH}" height="{_file.HEIGHT}" play="true" loop="true" quality="high" allowscriptaccess="never" allownetworking="internal"></embed>
+ </object>
+ <!-- ELSEIF _file.S_QUICKTIME_FILE -->
+ <object id="qtstream_{_file.ATTACH_ID}" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0" width="0" height="16">
+ <param name="src" value="{_file.U_DOWNLOAD_LINK}">
+ <param name="controller" value="true">
+ <param name="autoplay" value="false" />
+ <param name="type" value="video/quicktime">
+ <embed name="qtstream_{_file.ATTACH_ID}" src="{_file.U_DOWNLOAD_LINK}" pluginspage="http://www.apple.com/quicktime/download/" enablejavascript="true" controller="true" width="0" height="16" type="video/quicktime" autoplay="false">
+ </object>
+ <!-- ELSEIF _file.S_RM_FILE -->
+ <object id="rmstream_{_file.ATTACH_ID}" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="200" height="50">
+ <param name="src" value="{_file.U_DOWNLOAD_LINK}">
+ <param name="autostart" value="false">
+ <param name="controls" value="ImageWindow">
+ <param name="console" value="ctrls_{_file.ATTACH_ID}">
+ <param name="prefetch" value="false">
+ <embed name="rmstream_{_file.ATTACH_ID}" type="audio/x-pn-realaudio-plugin" src="{_file.U_DOWNLOAD_LINK}" width="0" height="0" autostart="false" controls="ImageWindow" console="ctrls_{_file.ATTACH_ID}" prefetch="false"></embed>
+ </object>
+ <br />
+ <object id="ctrls_{_file.ATTACH_ID}" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="0" height="36">
+ <param name="controls" value="ControlPanel">
+ <param name="console" value="ctrls_{_file.ATTACH_ID}">
+ <embed name="ctrls_{_file.ATTACH_ID}" type="audio/x-pn-realaudio-plugin" width="200" height="36" controls="ControlPanel" console="ctrls_{_file.ATTACH_ID}"></embed>
+ </object>
+
+ <script type="text/javascript">
+ // <![CDATA[
+ if (document.rmstream_{_file.ATTACH_ID}.GetClipWidth)
+ {
+ while (!document.rmstream_{_file.ATTACH_ID}.GetClipWidth())
+ {
+ }
+
+ var width = document.rmstream_{_file.ATTACH_ID}.GetClipWidth();
+ var height = document.rmstream_{_file.ATTACH_ID}.GetClipHeight();
+
+ document.rmstream_{_file.ATTACH_ID}.width = width;
+ document.rmstream_{_file.ATTACH_ID}.height = height;
+ document.ctrls_{_file.ATTACH_ID}.width = width;
+ }
+ // ]]>
+ </script>
+ <!-- ENDIF -->
+
+ <!-- IF _file.S_WM_FILE or _file.S_RM_FILE or _file.S_FLASH_FILE or _file.S_QUICKTIME_FILE -->
+ <br />
+ <!-- IF _file.S_QUICKTIME_FILE --><a href="#" onclick="play_qt_file(document.qtstream_{_file.ATTACH_ID}); return false;">[ {L_PLAY_QUICKTIME_FILE} ]</a> <!-- ENDIF -->
+ <span class="gensmall"><a href="{_file.U_DOWNLOAD_LINK}">{_file.DOWNLOAD_NAME}</a> [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOAD_COUNT} ]</span>
+ <!-- ENDIF -->
+
+ <br />
+ <!-- ENDIF -->
+
+<!-- END _file -->
diff --git a/phpBB/styles/subsilver2/template/bbcode.html b/phpBB/styles/subsilver2/template/bbcode.html
new file mode 100644
index 0000000000..50162740d0
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/bbcode.html
@@ -0,0 +1,69 @@
+<!-- BEGIN ulist_open --><ul style="list-style-type: {LIST_TYPE}"><!-- END ulist_open -->
+<!-- BEGIN ulist_open_default --><ul><!-- END ulist_open_default -->
+<!-- BEGIN ulist_close --></ul><!-- END ulist_close -->
+
+<!-- BEGIN olist_open --><ol style="list-style-type: {LIST_TYPE}"><!-- END olist_open -->
+<!-- BEGIN olist_close --></ol><!-- END olist_close -->
+
+<!-- BEGIN listitem --><li><!-- END listitem -->
+<!-- BEGIN listitem_close --></li><!-- END listitem_close -->
+
+<!-- BEGIN quote_username_open -->
+<div class="quotetitle">{USERNAME} {L_WROTE}:</div><div class="quotecontent">
+<!-- END quote_username_open -->
+
+<!-- BEGIN quote_open -->
+<div class="quotetitle"><b>{L_QUOTE}:</b></div><div class="quotecontent">
+<!-- END quote_open -->
+
+<!-- BEGIN quote_close -->
+</div>
+<!-- END quote_close -->
+
+<!-- BEGIN code_open -->
+<div class="codetitle"><b>{L_CODE}:</b></div><div class="codecontent">
+<!-- END code_open -->
+
+<!-- BEGIN code_close -->
+</div>
+<!-- END code_close -->
+
+<!-- BEGIN inline_attachment_open -->
+<div class="attachtitle">{L_ATTACHMENT}:</div><div class="attachcontent">
+<!-- END inline_attachment_open -->
+
+<!-- BEGIN inline_attachment_close -->
+</div>
+<!-- END inline_attachment_close -->
+
+
+<!-- BEGIN b_open --><strong><!-- END b_open -->
+<!-- BEGIN b_close --></strong><!-- END b_close -->
+
+<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open -->
+<!-- BEGIN u_close --></span><!-- END u_close -->
+
+<!-- BEGIN i_open --><em><!-- END i_open -->
+<!-- BEGIN i_close --></em><!-- END i_close -->
+
+<!-- BEGIN color --><span style="color: {COLOR}">{TEXT}</span><!-- END color -->
+
+<!-- BEGIN size --><span style="font-size: {SIZE}%; line-height: normal">{TEXT}</span><!-- END size -->
+
+<!-- BEGIN img --><img src="{URL}" alt="{L_IMAGE}" /><!-- END img -->
+
+<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
+
+<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->
+
+<!-- BEGIN flash -->
+ <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}">
+ <param name="movie" value="{URL}" />
+ <param name="play" value="false" />
+ <param name="loop" value="false" />
+ <param name="quality" value="high" />
+ <param name="allowScriptAccess" value="never" />
+ <param name="allowNetworking" value="internal" />
+ <embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed>
+ </object>
+<!-- END flash -->
diff --git a/phpBB/styles/subsilver2/template/breadcrumbs.html b/phpBB/styles/subsilver2/template/breadcrumbs.html
new file mode 100644
index 0000000000..ad180250ce
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/breadcrumbs.html
@@ -0,0 +1,8 @@
+ <table class="tablebg" width="100%" cellspacing="1" cellpadding="0" style="margin-top: 5px;">
+ <tr>
+ <td class="row1">
+ <p class="breadcrumbs"><a href="{U_INDEX}">{L_INDEX}</a><!-- BEGIN navlinks --> &#187; <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></p>
+ <p class="datetime">{S_TIMEZONE}</p>
+ </td>
+ </tr>
+ </table> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/captcha_default.html b/phpBB/styles/subsilver2/template/captcha_default.html
new file mode 100644
index 0000000000..eaf7a30944
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/captcha_default.html
@@ -0,0 +1,15 @@
+ <tr>
+ <th colspan="2" valign="middle">{L_CONFIRM_CODE}</th>
+ </tr>
+ <tr>
+ <td class="row3" colspan="2"><span class="gensmall">{L_CONFIRM_EXPLAIN}</span></td>
+ </tr>
+ <tr>
+ <td class="row1" colspan="2" align="center"><img src="{CONFIRM_IMAGE_LINK}" alt="{L_CONFIRM_CODE}" />
+ <input type="hidden" name="confirm_id" id="confirm_id" value="{CONFIRM_ID}" /></td>
+ </tr>
+ <tr>
+ <td class="row1"><b class="genmed">{L_CONFIRM_CODE}:</b><br /><span class="gensmall">{L_CONFIRM_CODE_EXPLAIN}</span></td>
+ <td class="row2"><input class="post" type="text" name="confirm_code" size="8" maxlength="8" />
+ <!-- IF S_CONFIRM_REFRESH --><input type="submit" name="refresh_vc" id="refresh_vc" class="button2" value="{L_VC_REFRESH}" /><!-- ENDIF --></td>
+ </tr>
diff --git a/phpBB/styles/subsilver2/template/captcha_qa.html b/phpBB/styles/subsilver2/template/captcha_qa.html
new file mode 100644
index 0000000000..dc8d5505a1
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/captcha_qa.html
@@ -0,0 +1,8 @@
+ <tr>
+ <th colspan="2" valign="middle">{QA_CONFIRM_QUESTION}</th>
+ </tr>
+ <tr>
+ <td class="row1"><b class="genmed">{QA_CONFIRM_QUESTION}:</b><br /></td>
+ <td class="row2"><input class="post" type="text" name="qa_answer" size="80" /></td>
+ <input type="hidden" name="qa_confirm_id" id="confirm_id" value="{QA_CONFIRM_ID}" /></td>
+ </tr>
diff --git a/phpBB/styles/subsilver2/template/captcha_recaptcha.html b/phpBB/styles/subsilver2/template/captcha_recaptcha.html
new file mode 100644
index 0000000000..cacdbeead7
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/captcha_recaptcha.html
@@ -0,0 +1,35 @@
+<!-- IF S_RECAPTCHA_AVAILABLE -->
+ <tr>
+ <th colspan="2" valign="middle">{L_CONFIRM_CODE}</th>
+ </tr>
+ <tr>
+ <td class="row1"><b class="genmed">{L_CONFIRM_CODE}:</b><br /><span class="gensmall">{L_RECAPTCHA_EXPLAIN}</span></td>
+ <td class="row2">
+ <script type="text/javascript">
+ // <![CDATA[
+ var RecaptchaOptions = {
+ lang : '{L_RECAPTCHA_LANG}',
+ tabindex : <!-- IF $CAPTCHA_TAB_INDEX -->{$CAPTCHA_TAB_INDEX}<!-- ELSE -->10<!-- ENDIF -->
+ };
+ // ]]>
+ </script>
+ <script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" ></script>
+ <script type="text/javascript">
+ // <![CDATA[
+ <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
+ document.getElementById('recaptcha_table').style.direction = 'ltr';
+ <!-- ENDIF -->
+ // ]]>
+ </script>
+
+ <noscript>
+ <iframe src="{RECAPTCHA_SERVER}/noscript?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" height="300" width="500" frameborder="0"></iframe><br />
+ <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
+ <input type="hidden" name="recaptcha_response_field" value="manual_challenge" />
+ </noscript>
+ </td>
+ </tr>
+
+<!-- ELSE -->
+{L_RECAPTCHA_NOT_AVAILABLE}
+<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/confirm_body.html b/phpBB/styles/subsilver2/template/confirm_body.html
new file mode 100644
index 0000000000..92c2481c2d
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/confirm_body.html
@@ -0,0 +1,28 @@
+<!-- INCLUDE overall_header.html -->
+
+<div id="pagecontent">
+
+ <form name="confirm" action="{S_CONFIRM_ACTION}" method="post">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th>{MESSAGE_TITLE}</th>
+ </tr>
+ <tr>
+ <td class="row1" align="center"><br /><p class="gen">{MESSAGE_TEXT}</p><br />{S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{YES_VALUE}" class="btnmain" />&nbsp;&nbsp;<input type="submit" name="cancel" value="{L_NO}" class="btnlite" /></td>
+ </tr>
+ </table>
+
+ </form>
+
+</div>
+
+<br clear="all" />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<br clear="all" />
+
+<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/custom_profile_fields.html b/phpBB/styles/subsilver2/template/custom_profile_fields.html
new file mode 100644
index 0000000000..c8f287ddb4
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/custom_profile_fields.html
@@ -0,0 +1,31 @@
+<!-- BEGIN dropdown -->
+ <select name="{dropdown.FIELD_IDENT}">
+ <!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options -->
+ </select>
+<!-- END dropdown -->
+
+<!-- BEGIN text -->
+ <textarea name="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}">{text.FIELD_VALUE}</textarea>
+<!-- END text -->
+
+<!-- BEGIN string -->
+ <input type="text" class="post" name="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
+<!-- END string -->
+
+<!-- BEGIN bool -->
+ <!-- IF bool.FIELD_LENGTH eq 1 -->
+ <!-- BEGIN options --><input type="radio" class="radio" name="{bool.FIELD_IDENT}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /><span class="genmed">{bool.options.VALUE}</span>&nbsp; &nbsp;<!-- END options -->
+ <!-- ELSE -->
+ <input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" value="1"<!-- IF bool.FIELD_VALUE eq 1 --> checked="checked"<!-- ENDIF --> />
+ <!-- ENDIF -->
+<!-- END bool -->
+
+<!-- BEGIN int -->
+ <input type="text" class="post" name="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" />
+<!-- END int -->
+
+<!-- BEGIN date -->
+ <span class="genmed">{L_DAY}:</span> <select name="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select>
+ <span class="genmed">{L_MONTH}:</span> <select name="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select>
+ <span class="genmed">{L_YEAR}:</span> <select name="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select>
+<!-- END date -->
diff --git a/phpBB/styles/subsilver2/template/editor.js b/phpBB/styles/subsilver2/template/editor.js
new file mode 100644
index 0000000000..b4a426df4e
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/editor.js
@@ -0,0 +1,401 @@
+/**
+* bbCode control by subBlue design [ www.subBlue.com ]
+* Includes unixsafe colour palette selector by SHS`
+*/
+
+// Startup variables
+var imageTag = false;
+var theSelection = false;
+
+// Check for Browser & Platform for PC & IE specific bits
+// More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
+var clientPC = navigator.userAgent.toLowerCase(); // Get client info
+var clientVer = parseInt(navigator.appVersion); // Get browser version
+
+var is_ie = ((clientPC.indexOf('msie') != -1) && (clientPC.indexOf('opera') == -1));
+var is_win = ((clientPC.indexOf('win') != -1) || (clientPC.indexOf('16bit') != -1));
+
+var baseHeight;
+
+/**
+* Shows the help messages in the helpline window
+*/
+function helpline(help)
+{
+ document.forms[form_name].helpbox.value = help_line[help];
+}
+
+/**
+* Fix a bug involving the TextRange object. From
+* http://www.frostjedi.com/terra/scripts/demo/caretBug.html
+*/
+function initInsertions()
+{
+ var doc;
+
+ if (document.forms[form_name])
+ {
+ doc = document;
+ }
+ else
+ {
+ doc = opener.document;
+ }
+
+ var textarea = doc.forms[form_name].elements[text_name];
+ if (is_ie && typeof(baseHeight) != 'number')
+ {
+ textarea.focus();
+ baseHeight = doc.selection.createRange().duplicate().boundingHeight;
+
+ if (!document.forms[form_name])
+ {
+ document.body.focus();
+ }
+ }
+}
+
+/**
+* bbstyle
+*/
+function bbstyle(bbnumber)
+{
+ if (bbnumber != -1)
+ {
+ bbfontstyle(bbtags[bbnumber], bbtags[bbnumber+1]);
+ }
+ else
+ {
+ insert_text('[*]');
+ document.forms[form_name].elements[text_name].focus();
+ }
+}
+
+/**
+* Apply bbcodes
+*/
+function bbfontstyle(bbopen, bbclose)
+{
+ theSelection = false;
+
+ var textarea = document.forms[form_name].elements[text_name];
+
+ textarea.focus();
+
+ if ((clientVer >= 4) && is_ie && is_win)
+ {
+ // Get text selection
+ theSelection = document.selection.createRange().text;
+
+ if (theSelection)
+ {
+ // Add tags around selection
+ document.selection.createRange().text = bbopen + theSelection + bbclose;
+ document.forms[form_name].elements[text_name].focus();
+ theSelection = '';
+ return;
+ }
+ }
+ else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0))
+ {
+ mozWrap(document.forms[form_name].elements[text_name], bbopen, bbclose);
+ document.forms[form_name].elements[text_name].focus();
+ theSelection = '';
+ return;
+ }
+
+ //The new position for the cursor after adding the bbcode
+ var caret_pos = getCaretPosition(textarea).start;
+ var new_pos = caret_pos + bbopen.length;
+
+ // Open tag
+ insert_text(bbopen + bbclose);
+
+ // Center the cursor when we don't have a selection
+ // Gecko and proper browsers
+ if (!isNaN(textarea.selectionStart))
+ {
+ textarea.selectionStart = new_pos;
+ textarea.selectionEnd = new_pos;
+ }
+ // IE
+ else if (document.selection)
+ {
+ var range = textarea.createTextRange();
+ range.move("character", new_pos);
+ range.select();
+ storeCaret(textarea);
+ }
+
+ textarea.focus();
+ return;
+}
+
+/**
+* Insert text at position
+*/
+function insert_text(text, spaces, popup)
+{
+ var textarea;
+
+ if (!popup)
+ {
+ textarea = document.forms[form_name].elements[text_name];
+ }
+ else
+ {
+ textarea = opener.document.forms[form_name].elements[text_name];
+ }
+ if (spaces)
+ {
+ text = ' ' + text + ' ';
+ }
+
+ if (!isNaN(textarea.selectionStart))
+ {
+ var sel_start = textarea.selectionStart;
+ var sel_end = textarea.selectionEnd;
+
+ mozWrap(textarea, text, '')
+ textarea.selectionStart = sel_start + text.length;
+ textarea.selectionEnd = sel_end + text.length;
+ }
+
+ else if (textarea.createTextRange && textarea.caretPos)
+ {
+ if (baseHeight != textarea.caretPos.boundingHeight)
+ {
+ textarea.focus();
+ storeCaret(textarea);
+ }
+ var caret_pos = textarea.caretPos;
+ caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text;
+
+ }
+ else
+ {
+ textarea.value = textarea.value + text;
+ }
+ if (!popup)
+ {
+ textarea.focus();
+ }
+
+}
+
+/**
+* Add inline attachment at position
+*/
+function attach_inline(index, filename)
+{
+ insert_text('[attachment=' + index + ']' + filename + '[/attachment]');
+ document.forms[form_name].elements[text_name].focus();
+}
+
+/**
+* Add quote text to message
+*/
+function addquote(post_id, username)
+{
+ var message_name = 'message_' + post_id;
+ var theSelection = '';
+ var divarea = false;
+
+ if (document.all)
+ {
+ divarea = document.all[message_name];
+ }
+ else
+ {
+ divarea = document.getElementById(message_name);
+ }
+
+ // Get text selection - not only the post content :(
+ if (window.getSelection)
+ {
+ theSelection = window.getSelection().toString();
+ }
+ else if (document.getSelection)
+ {
+ theSelection = document.getSelection();
+ }
+ else if (document.selection)
+ {
+ theSelection = document.selection.createRange().text;
+ }
+
+ if (theSelection == '' || typeof theSelection == 'undefined' || theSelection == null)
+ {
+ if (divarea.innerHTML)
+ {
+ theSelection = divarea.innerHTML.replace(/<br>/ig, '\n');
+ theSelection = theSelection.replace(/<br\/>/ig, '\n');
+ theSelection = theSelection.replace(/&lt\;/ig, '<');
+ theSelection = theSelection.replace(/&gt\;/ig, '>');
+ theSelection = theSelection.replace(/&amp\;/ig, '&');
+ }
+ else if (document.all)
+ {
+ theSelection = divarea.innerText;
+ }
+ else if (divarea.textContent)
+ {
+ theSelection = divarea.textContent;
+ }
+ else if (divarea.firstChild.nodeValue)
+ {
+ theSelection = divarea.firstChild.nodeValue;
+ }
+ }
+
+ if (theSelection)
+ {
+ insert_text('[quote="' + username + '"]' + theSelection + '[/quote]');
+ }
+
+ return;
+}
+
+/**
+* From http://www.massless.org/mozedit/
+*/
+function mozWrap(txtarea, open, close)
+{
+ var selLength = (typeof(txtarea.textLength) == 'undefined') ? txtarea.value.length : txtarea.textLength;
+ var selStart = txtarea.selectionStart;
+ var selEnd = txtarea.selectionEnd;
+ var scrollTop = txtarea.scrollTop;
+
+ if (selEnd == 1 || selEnd == 2)
+ {
+ selEnd = selLength;
+ }
+
+ var s1 = (txtarea.value).substring(0,selStart);
+ var s2 = (txtarea.value).substring(selStart, selEnd)
+ var s3 = (txtarea.value).substring(selEnd, selLength);
+
+ txtarea.value = s1 + open + s2 + close + s3;
+ txtarea.selectionStart = selEnd + open.length + close.length;
+ txtarea.selectionEnd = txtarea.selectionStart;
+ txtarea.focus();
+ txtarea.scrollTop = scrollTop;
+
+ return;
+}
+
+/**
+* Insert at Caret position. Code from
+* http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
+*/
+function storeCaret(textEl)
+{
+ if (textEl.createTextRange)
+ {
+ textEl.caretPos = document.selection.createRange().duplicate();
+ }
+}
+
+/**
+* Color pallette
+*/
+function colorPalette(dir, width, height)
+{
+ var r = 0, g = 0, b = 0;
+ var numberList = new Array(6);
+ var color = '';
+
+ numberList[0] = '00';
+ numberList[1] = '40';
+ numberList[2] = '80';
+ numberList[3] = 'BF';
+ numberList[4] = 'FF';
+
+ document.writeln('<table cellspacing="1" cellpadding="0" border="0">');
+
+ for (r = 0; r < 5; r++)
+ {
+ if (dir == 'h')
+ {
+ document.writeln('<tr>');
+ }
+
+ for (g = 0; g < 5; g++)
+ {
+ if (dir == 'v')
+ {
+ document.writeln('<tr>');
+ }
+
+ for (b = 0; b < 5; b++)
+ {
+ color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
+ document.write('<td bgcolor="#' + color + '">');
+ document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;" onmouseover="helpline(\'s\');" onmouseout="helpline(\'tip\');"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
+ document.writeln('</td>');
+ }
+
+ if (dir == 'v')
+ {
+ document.writeln('</tr>');
+ }
+ }
+
+ if (dir == 'h')
+ {
+ document.writeln('</tr>');
+ }
+ }
+ document.writeln('</table>');
+}
+
+
+/**
+* Caret Position object
+*/
+function caretPosition()
+{
+ var start = null;
+ var end = null;
+}
+
+
+/**
+* Get the caret position in an textarea
+*/
+function getCaretPosition(txtarea)
+{
+ var caretPos = new caretPosition();
+
+ // simple Gecko/Opera way
+ if(txtarea.selectionStart || txtarea.selectionStart == 0)
+ {
+ caretPos.start = txtarea.selectionStart;
+ caretPos.end = txtarea.selectionEnd;
+ }
+ // dirty and slow IE way
+ else if(document.selection)
+ {
+ // get current selection
+ var range = document.selection.createRange();
+
+ // a new selection of the whole textarea
+ var range_all = document.body.createTextRange();
+ range_all.moveToElementText(txtarea);
+
+ // calculate selection start point by moving beginning of range_all to beginning of range
+ var sel_start;
+ for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++)
+ {
+ range_all.moveStart('character', 1);
+ }
+
+ txtarea.sel_start = sel_start;
+
+ // we ignore the end value for IE, this is already dirty enough and we don't need it
+ caretPos.start = txtarea.sel_start;
+ caretPos.end = txtarea.sel_start;
+ }
+
+ return caretPos;
+} \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/faq_body.html b/phpBB/styles/subsilver2/template/faq_body.html
new file mode 100644
index 0000000000..bbd9b82b19
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/faq_body.html
@@ -0,0 +1,63 @@
+<!-- INCLUDE overall_header.html -->
+
+<a name="faqtop"></a>
+
+<div id="pagecontent">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th>{L_FAQ_TITLE}</th>
+ </tr>
+ <tr>
+ <td class="row1">
+ <!-- BEGIN faq_block -->
+ <span class="gen"><b>{faq_block.BLOCK_TITLE}</b></span><br />
+ <!-- BEGIN faq_row -->
+ <span class="gen"><a class="postlink" href="#f{faq_block.S_ROW_COUNT}r{faq_block.faq_row.S_ROW_COUNT}">{faq_block.faq_row.FAQ_QUESTION}</a></span><br />
+ <!-- END faq_row -->
+ <br />
+ <!-- END faq_block -->
+ </td>
+ </tr>
+ <tr>
+ <td class="cat">&nbsp;</td>
+ </tr>
+ </table>
+
+ <br clear="all" />
+
+ <!-- BEGIN faq_block -->
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="cat" align="center"><h4>{faq_block.BLOCK_TITLE}</h4></td>
+ </tr>
+ <!-- BEGIN faq_row -->
+ <tr>
+ <!-- IF faq_block.faq_row.S_ROW_COUNT is even -->
+ <td class="row1" valign="top">
+ <!-- ELSE -->
+ <td class="row2" valign="top">
+ <!-- ENDIF -->
+ <div class="postbody"><a name="f{faq_block.S_ROW_COUNT}r{faq_block.faq_row.S_ROW_COUNT}"></a><b>&#187; {faq_block.faq_row.FAQ_QUESTION}</b></div>
+ <div class="postbody">{faq_block.faq_row.FAQ_ANSWER}</div>
+ <p class="gensmall"><a href="#faqtop">{L_BACK_TO_TOP}</a></p>
+ </td>
+ </tr>
+ <tr>
+ <td class="spacer" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
+ </tr>
+ <!-- END faq_row -->
+ </table>
+
+ <br clear="all" />
+ <!-- END faq_block -->
+
+</div>
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<br clear="all" />
+
+<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/forumlist_body.html b/phpBB/styles/subsilver2/template/forumlist_body.html
new file mode 100644
index 0000000000..a994e9e676
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/forumlist_body.html
@@ -0,0 +1,74 @@
+<table class="tablebg" cellspacing="1" width="100%">
+<tr>
+ <td class="cat" colspan="5" align="{S_CONTENT_FLOW_END}"><!-- IF not S_IS_BOT and U_MARK_FORUMS --><a class="nav" href="{U_MARK_FORUMS}">{L_MARK_FORUMS_READ}</a><!-- ENDIF -->&nbsp;</td>
+</tr>
+<tr>
+ <th colspan="2">&nbsp;{L_FORUM}&nbsp;</th>
+ <th width="50">&nbsp;{L_TOPICS}&nbsp;</th>
+ <th width="50">&nbsp;{L_POSTS}&nbsp;</th>
+ <th>&nbsp;{L_LAST_POST}&nbsp;</th>
+</tr>
+<!-- BEGIN forumrow -->
+ <!-- IF forumrow.S_IS_CAT -->
+ <tr>
+ <td class="cat" colspan="2"><h4><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a></h4></td>
+ <td class="catdiv" colspan="3">&nbsp;</td>
+ </tr>
+ <!-- ELSEIF forumrow.S_IS_LINK -->
+ <tr>
+ <td class="row1" width="50" align="center">{forumrow.FORUM_FOLDER_IMG}</td>
+ <td class="row1">
+ <!-- IF forumrow.FORUM_IMAGE -->
+ <div style="float: {S_CONTENT_FLOW_BEGIN}; margin-{S_CONTENT_FLOW_END}: 5px;">{forumrow.FORUM_IMAGE}</div>
+ <!-- ENDIF -->
+ <a class="forumlink" href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a>
+ <p class="forumdesc">{forumrow.FORUM_DESC}</p>
+ </td>
+ <!-- IF forumrow.CLICKS -->
+ <td class="row2" colspan="3" align="center"><span class="genmed">{L_REDIRECTS}: {forumrow.CLICKS}</span></td>
+ <!-- ELSE -->
+ <td class="row2" colspan="3" align="center">&nbsp;</td>
+ <!-- ENDIF -->
+ </tr>
+ <!-- ELSE -->
+ <!-- IF forumrow.S_NO_CAT -->
+ <tr>
+ <td class="cat" colspan="2"><h4>{L_FORUM}</h4></td>
+ <td class="catdiv" colspan="3">&nbsp;</td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td class="row1" width="50" align="center">{forumrow.FORUM_FOLDER_IMG}</td>
+ <td class="row1" width="100%">
+ <!-- IF forumrow.FORUM_IMAGE -->
+ <div style="float: {S_CONTENT_FLOW_BEGIN}; margin-{S_CONTENT_FLOW_END}: 5px;">{forumrow.FORUM_IMAGE}</div>
+ <!-- ENDIF -->
+ <a class="forumlink" href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a>
+ <p class="forumdesc">{forumrow.FORUM_DESC}</p>
+ <!-- IF forumrow.MODERATORS -->
+ <p class="forumdesc"><strong>{forumrow.L_MODERATOR_STR}:</strong> {forumrow.MODERATORS}</p>
+ <!-- ENDIF -->
+ <!-- IF forumrow.SUBFORUMS and forumrow.S_LIST_SUBFORUMS -->
+ <p class="forumdesc"><strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}</p>
+ <!-- ENDIF -->
+ </td>
+ <td class="row2" align="center"><p class="topicdetails">{forumrow.TOPICS}</p></td>
+ <td class="row2" align="center"><p class="topicdetails">{forumrow.POSTS}</p></td>
+ <td class="row2" align="center" nowrap="nowrap">
+ <!-- IF forumrow.LAST_POST_TIME -->
+ <p class="topicdetails"><!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}">{UNAPPROVED_IMG}</a>&nbsp;<!-- ENDIF -->{forumrow.LAST_POST_TIME}</p>
+ <p class="topicdetails">{forumrow.LAST_POSTER_FULL}
+ <!-- IF not S_IS_BOT --><a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a><!-- ENDIF -->
+ </p>
+ <!-- ELSE -->
+ <p class="topicdetails">{L_NO_POSTS}</p>
+ <!-- ENDIF -->
+ </td>
+ </tr>
+ <!-- ENDIF -->
+<!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="5" align="center"><p class="gensmall">{L_NO_FORUMS}</p></td>
+ </tr>
+<!-- END forumrow -->
+</table> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/index.htm b/phpBB/styles/subsilver2/template/index.htm
new file mode 100644
index 0000000000..4763c05f0e
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/index.htm
@@ -0,0 +1,16 @@
+<html>
+<head>
+<title>subSilver created by subBlue Design</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td align="center" valign="middle"><a href="http://www.subblue.com/" target="_new"><img src="images/created_by.jpg" width="400" height="300" alt="Created by subBlue Design" /></a></td>
+ </tr>
+</table>
+
+</body>
+</html> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/index_body.html b/phpBB/styles/subsilver2/template/index_body.html
new file mode 100644
index 0000000000..8b6c1167b3
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/index_body.html
@@ -0,0 +1,102 @@
+<!-- INCLUDE overall_header.html -->
+
+<!-- IF U_MCP -->
+ <div id="pageheader">
+ <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
+ </div>
+
+ <br clear="all" /><br />
+<!-- ENDIF -->
+
+<!-- INCLUDE forumlist_body.html -->
+
+<!-- IF not S_IS_BOT or U_TEAM -->
+<span class="gensmall"><!-- IF not S_IS_BOT --><a href="{U_DELETE_COOKIES}">{L_DELETE_COOKIES}</a><!-- ENDIF --><!-- IF not S_IS_BOT and U_TEAM --> | <!-- ENDIF --><!-- IF U_TEAM --><a href="{U_TEAM}">{L_THE_TEAM}</a><!-- ENDIF --></span><br />
+<!-- ENDIF -->
+
+<br clear="all" />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<!-- IF S_DISPLAY_ONLINE_LIST -->
+ <br clear="all" />
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="cat" colspan="2"><!-- IF U_VIEWONLINE --><h4><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h4><!-- ELSE --><h4>{L_WHO_IS_ONLINE}</h4><!-- ENDIF --></td>
+ </tr>
+ <tr>
+ <!-- IF LEGEND -->
+ <td class="row1" rowspan="2" align="center" valign="middle"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
+ <!-- ELSE -->
+ <td class="row1" align="center" valign="middle"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
+ <!-- ENDIF -->
+ <td class="row1" width="100%"><span class="genmed">{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /><br />{LOGGED_IN_USER_LIST}</span></td>
+ </tr>
+ <!-- IF LEGEND -->
+ <tr>
+ <td class="row1"><b class="gensmall">{L_LEGEND} :: {LEGEND}</b></td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+<!-- ENDIF -->
+
+<!-- IF S_DISPLAY_BIRTHDAY_LIST -->
+ <br clear="all" />
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="cat" colspan="2"><h4>{L_BIRTHDAYS}</h4></td>
+ </tr>
+ <tr>
+ <td class="row1" align="center" valign="middle"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_BIRTHDAYS}" /></td>
+ <td class="row1" width="100%"><p class="genmed"><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <b>{BIRTHDAY_LIST}</b><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p></td>
+ </tr>
+ </table>
+<!-- ENDIF -->
+
+<br clear="all" />
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <td class="cat" colspan="2"><h4>{L_STATISTICS}</h4></td>
+</tr>
+<tr>
+ <td class="row1"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_STATISTICS}" /></td>
+ <td class="row1" width="100%" valign="middle"><p class="genmed">{TOTAL_POSTS} | {TOTAL_TOPICS} | {TOTAL_USERS} | {NEWEST_USER}</p></td>
+</tr>
+</table>
+
+<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
+ <br clear="all" />
+
+ <form method="post" action="{S_LOGIN_ACTION}">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="cat"><h4><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></h4></td>
+ </tr>
+ <tr>
+ <td class="row1" align="center"><span class="genmed">{L_USERNAME}:</span> <input class="post" type="text" name="username" size="10" />&nbsp; <span class="genmed">{L_PASSWORD}:</span> <input class="post" type="password" name="password" size="10" />&nbsp; <!-- IF S_AUTOLOGIN_ENABLED --> <span class="gensmall">{L_LOG_ME_IN}</span> <input type="checkbox" class="radio" name="autologin" /><!-- ENDIF -->&nbsp; <input type="submit" class="btnmain" name="login" value="{L_LOGIN}" /></td>
+ </tr>
+ </table>
+ {S_FORM_TOKEN}
+ </form>
+<!-- ENDIF -->
+
+<br clear="all" />
+
+<table class="legend">
+<tr>
+ <td width="20" align="center">{FORUM_NEW_IMG}</td>
+ <td><span class="gensmall">{L_NEW_POSTS}</span></td>
+ <td>&nbsp;&nbsp;</td>
+ <td width="20" align="center">{FORUM_IMG}</td>
+ <td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
+ <td>&nbsp;&nbsp;</td>
+ <td width="20" align="center">{FORUM_LOCKED_IMG}</td>
+ <td><span class="gensmall">{L_FORUM_LOCKED}</span></td>
+</tr>
+</table>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/jumpbox.html b/phpBB/styles/subsilver2/template/jumpbox.html
new file mode 100644
index 0000000000..f46fed9f27
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/jumpbox.html
@@ -0,0 +1,19 @@
+
+<!-- IF S_DISPLAY_JUMPBOX -->
+ <form method="post" name="jumpbox" action="{S_JUMPBOX_ACTION}" onsubmit="if(document.jumpbox.f.value == -1){return false;}">
+
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td nowrap="nowrap"><span class="gensmall"><!-- IF S_IN_MCP and S_MERGE_SELECT -->{L_SELECT_TOPICS_FROM}<!-- ELSEIF S_IN_MCP -->{L_MODERATE_FORUM}<!-- ELSE -->{L_JUMP_TO}<!-- ENDIF -->:</span>&nbsp;<select name="f" onchange="if(this.options[this.selectedIndex].value != -1){ document.forms['jumpbox'].submit() }">
+
+ <!-- BEGIN jumpbox_forums -->
+ <!-- IF jumpbox_forums.S_FORUM_COUNT eq 1 --><option value="-1">------------------</option><!-- ENDIF -->
+ <option value="{jumpbox_forums.FORUM_ID}"{jumpbox_forums.SELECTED}><!-- BEGIN level -->&nbsp; &nbsp;<!-- END level -->{jumpbox_forums.FORUM_NAME}</option>
+ <!-- END jumpbox_forums -->
+
+ </select>&nbsp;<input class="btnlite" type="submit" value="{L_GO}" /></td>
+ </tr>
+ </table>
+
+ </form>
+<!-- ENDIF --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/login_body.html b/phpBB/styles/subsilver2/template/login_body.html
new file mode 100644
index 0000000000..810a7376f2
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/login_body.html
@@ -0,0 +1,91 @@
+<!-- INCLUDE overall_header.html -->
+
+<form action="{S_LOGIN_ACTION}" method="post">
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <!-- IF not S_ADMIN_AUTH -->
+ <th colspan="2">{L_LOGIN}</th>
+ <!-- ELSE -->
+ <th>{LOGIN_EXPLAIN}</th>
+ <!-- ENDIF -->
+</tr>
+<!-- IF LOGIN_EXPLAIN && not S_ADMIN_AUTH -->
+ <tr>
+ <td class="row3" colspan="2" align="center"><span class="gensmall">{LOGIN_EXPLAIN}</span></td>
+ </tr>
+<!-- ENDIF -->
+<tr><!-- IF not S_ADMIN_AUTH and S_REGISTER_ENABLED -->
+ <td class="row1" width="50%">
+ <p class="genmed">{L_LOGIN_INFO}</p>
+
+ <p class="genmed" align="center">
+ <a href="{U_TERMS_USE}">{L_TERMS_USE}</a> | <a href="{U_PRIVACY}">{L_PRIVACY}</a>
+ </p>
+ </td>
+ <!-- ENDIF -->
+ <td <!-- IF not S_ADMIN_AUTH -->class="row2"<!-- ELSE -->class="row1"<!-- ENDIF -->>
+
+ <table align="center" cellspacing="1" cellpadding="4" style="width: 100%;">
+ <!-- IF LOGIN_ERROR -->
+ <tr>
+ <td class="gensmall" colspan="2" align="center"><span class="error">{LOGIN_ERROR}</span></td>
+ </tr>
+ <!-- ENDIF -->
+
+ <tr>
+ <td valign="top" <!-- IF S_ADMIN_AUTH -->style="width: 50%; text-align: {S_CONTENT_FLOW_END};"<!-- ENDIF -->><b class="gensmall">{L_USERNAME}:</b></td>
+ <td><input class="post" type="text" name="{USERNAME_CREDENTIAL}" size="25" value="{USERNAME}" tabindex="1" />
+ <!-- IF not S_ADMIN_AUTH and S_REGISTER_ENABLED -->
+ <br /><a class="gensmall" href="{U_REGISTER}">{L_REGISTER}</a>
+ <!-- ENDIF -->
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" <!-- IF S_ADMIN_AUTH -->style="width: 50%; text-align: {S_CONTENT_FLOW_END};"<!-- ENDIF -->><b class="gensmall">{L_PASSWORD}:</b></td>
+ <td>
+ <input class="post" type="password" name="{PASSWORD_CREDENTIAL}" size="25" tabindex="2" />
+ <!-- IF U_SEND_PASSWORD --><br /><a class="gensmall" href="{U_SEND_PASSWORD}">{L_FORGOT_PASS}</a><!-- ENDIF -->
+ <!-- IF U_RESEND_ACTIVATION and not S_ADMIN_AUTH --><br /><a class="gensmall" href="{U_RESEND_ACTIVATION}">{L_RESEND_ACTIVATION}</a><!-- ENDIF -->
+ </td>
+ </tr>
+ <!-- IF S_DISPLAY_FULL_LOGIN -->
+ <!-- IF S_AUTOLOGIN_ENABLED -->
+ <tr>
+ <td>&nbsp;</td>
+ <td><input type="checkbox" class="radio" name="autologin" tabindex="3" /> <span class="gensmall">{L_LOG_ME_IN}</span></td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td>&nbsp;</td>
+ <td><input type="checkbox" class="radio" name="viewonline" tabindex="4" /> <span class="gensmall">{L_HIDE_ME}</span></td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+ </td>
+</tr>
+
+<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
+</table>
+<table class="tablebg" width="100%" cellspacing="1">
+
+ <!-- INCLUDE {CAPTCHA_TEMPLATE} -->
+<!-- ENDIF -->
+
+<tr>
+ <td class="cat" <!-- IF not S_ADMIN_AUTH or S_CONFIRM_CODE -->colspan="2"<!-- ENDIF --> align="center">{S_HIDDEN_FIELDS}<input type="submit" name="login" class="btnmain" value="{L_LOGIN}" tabindex="5" /></td>
+</tr>
+</table>
+{S_FORM_TOKEN}
+
+</form>
+
+<br clear="all" />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<br clear="all" />
+
+<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/login_forum.html b/phpBB/styles/subsilver2/template/login_forum.html
new file mode 100644
index 0000000000..c3d57085df
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/login_forum.html
@@ -0,0 +1,47 @@
+<!-- INCLUDE overall_header.html -->
+
+<div id="pagecontent">
+
+ <form name="login_forum" method="post" action="{S_LOGIN_ACTION}">
+
+ <table class="tablebg" width="100%" cellspacing="1" align="center">
+ <tr>
+ <th>{L_LOGIN}</th>
+ </tr>
+ <tr>
+ <td class="row3" align="center"><span class="gensmall">{L_LOGIN_FORUM}</span></td>
+ </tr>
+ <tr>
+ <td class="row1" align="center">
+
+ <table cellspacing="1" cellpadding="4" border="0">
+ <!-- IF LOGIN_ERROR -->
+ <tr>
+ <td class="gensmall" colspan="2" align="center"><span class="error">{LOGIN_ERROR}</span></td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td class="gensmall"><b>{L_PASSWORD}:</b></td>
+ <td><input class="post" type="password" name="password" size="25" tabindex="2" /></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="login" class="btnmain" value="{L_LOGIN}" tabindex="3" /></td>
+ </tr>
+ </table>
+ {S_FORM_TOKEN}
+ </form>
+
+</div>
+
+<br clear="all" />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<br clear="all" />
+
+<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_approve.html b/phpBB/styles/subsilver2/template/mcp_approve.html
new file mode 100644
index 0000000000..2d2013f05c
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_approve.html
@@ -0,0 +1,49 @@
+<!-- INCLUDE overall_header.html -->
+
+<div id="pagecontent">
+
+ <form name="confirm" action="{S_CONFIRM_ACTION}" method="post">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th>{MESSAGE_TITLE}</th>
+ </tr>
+ <tr>
+ <td class="row1" align="center">
+ <!-- IF ADDITIONAL_MSG -->
+ <span class="gen error">{ADDITIONAL_MSG}</span><br />
+ <!-- ENDIF -->
+ <!-- IF S_NOTIFY_POSTER -->
+ <input type="checkbox" class="radio" name="notify_poster" checked="checked" /><span class="gen"><!-- IF S_APPROVE -->{L_NOTIFY_POSTER_APPROVAL}<!-- ELSE -->{L_NOTIFY_POSTER_DISAPPROVAL}<!-- ENDIF --></span><br />
+ <!-- ENDIF -->
+ <!-- IF not S_APPROVE -->
+ <br />
+ <table border="0" width="90%" cellspacing="2" cellpadding="1">
+ <tr>
+ <td class="row1" width="22%"><b class="gen">{L_DISAPPROVE_REASON}:</b></td>
+ <td class="row1" width="78%"><select name="reason_id"><!-- BEGIN reason --><option value="{reason.ID}"<!-- IF reason.S_SELECTED --> selected="selected"<!-- ENDIF -->>{reason.DESCRIPTION}</option><!-- END reason --></select></td>
+ </tr>
+ <tr>
+ <td class="row1" valign="top"><span class="gen"><b>{L_MORE_INFO}:</b></span><br /><span class="gensmall">{L_CAN_LEAVE_BLANK}</span></td>
+ <td class="row1"><textarea class="post" style="width:500px" name="reason" rows="10" cols="40">{REASON}</textarea></td>
+ </tr>
+ </table>
+ <br />
+ <!-- ENDIF -->
+ <br />{S_HIDDEN_FIELDS}<span class="gen">{MESSAGE_TEXT}</span><br /><br />
+ <input type="submit" name="confirm" value="{YES_VALUE}" class="btnmain" />&nbsp;&nbsp;<input type="submit" name="cancel" value="{L_NO}" class="btnlite" /></span>
+ </td>
+ </tr>
+ </table>
+ {S_FORM_TOKEN}
+ </form>
+
+</div>
+
+<br clear="all" />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<br clear="all" />
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_ban.html b/phpBB/styles/subsilver2/template/mcp_ban.html
new file mode 100644
index 0000000000..0e352b57dd
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_ban.html
@@ -0,0 +1,109 @@
+<!-- INCLUDE mcp_header.html -->
+
+<script type="text/javascript">
+// <![CDATA[
+
+ var ban_length = new Array();
+ ban_length[-1] = '';
+ <!-- BEGIN ban_length -->
+ ban_length['{ban_length.BAN_ID}'] = '{ban_length.A_LENGTH}';
+ <!-- END ban_length -->
+
+ var ban_reason = new Array();
+ ban_reason[-1] = '';
+ <!-- BEGIN ban_reason -->
+ ban_reason['{ban_reason.BAN_ID}'] = '{ban_reason.A_REASON}';
+ <!-- END ban_reason -->
+
+ var ban_give_reason = new Array();
+ ban_give_reason[-1] = '';
+ <!-- BEGIN ban_give_reason -->
+ ban_give_reason['{ban_give_reason.BAN_ID}'] = '{ban_give_reason.A_REASON}';
+ <!-- END ban_give_reason -->
+
+ function display_details(option)
+ {
+ document.getElementById('mcp_ban').unbangivereason.value = ban_give_reason[option];
+ document.getElementById('mcp_ban').unbanreason.value = ban_reason[option];
+ document.getElementById('mcp_ban').unbanlength.value = ban_length[option];
+ }
+
+// ]]>
+</script>
+
+<form id="mcp_ban" method="post" action="{U_ACTION}">
+
+<table width="100%" class="tablebg" cellspacing="1" cellpadding="4" border="0">
+<tr>
+ <th colspan="2" nowrap="nowrap">{L_TITLE}</th>
+</tr>
+<tr>
+ <td class="row3" colspan="2">{L_EXPLAIN}</td>
+</tr>
+<tr>
+ <td class="row1" width="45%" valign="top"><b>{L_BAN_CELL}:</b></td>
+ <td class="row2">
+ <textarea name="ban" id="ban" cols="40" rows="3" class="post">{USERNAMES}</textarea>
+ <!-- IF S_USERNAME_BAN --><br />[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]<!-- ENDIF -->
+ </td>
+</tr>
+<tr>
+ <td class="row1" valign="top"><b>{L_BAN_LENGTH}:</b></td>
+ <td class="row2"><select name="banlength">{S_BAN_END_OPTIONS}</select><br /><input type="text" name="banlengthother" class="post" /> {L_YEAR_MONTH_DAY}</td>
+</tr>
+<tr>
+ <td class="row1" valign="top"><b>{L_BAN_EXCLUDE}:</b><br /><span class="gensmall">{L_BAN_EXCLUDE_EXPLAIN}</span></td>
+ <td class="row2"><input type="radio" class="radio" name="banexclude" value="1" /> {L_YES} &nbsp; <input type="radio" class="radio" name="banexclude" value="0" checked="checked" /> {L_NO}</td>
+</tr>
+<tr>
+ <td class="row1" valign="top"><b>{L_BAN_REASON}:</b></td>
+ <td class="row2"><input name="banreason" type="text" class="post" maxlength="255" /></td>
+</tr>
+<tr>
+ <td class="row1" valign="top"><b>{L_BAN_GIVE_REASON}:</b></td>
+ <td class="row2"><input name="bangivereason" type="text" class="post" maxlength="255" /></td>
+</tr>
+<tr>
+ <td class="cat" colspan="2" align="center"><input type="submit" name="bansubmit" value="{L_SUBMIT}" class="btnmain" />&nbsp; <input type="reset" value="{L_RESET}" class="btnlite" />&nbsp;</td>
+</tr>
+</table>
+
+<br /><br />
+
+<table width="100%" class="tablebg" cellspacing="1" cellpadding="4" border="0">
+<tr>
+ <th colspan="2" nowrap="nowrap">{L_UNBAN_TITLE}</th>
+</tr>
+<tr>
+ <td class="row3" colspan="2">{L_UNBAN_EXPLAIN}</td>
+</tr>
+<!-- IF S_BANNED_OPTIONS -->
+ <tr>
+ <td class="row1" valign="top" width="45%"><b>{L_BAN_CELL}:</b></td>
+ <td class="row2"><select name="unban[]" multiple="multiple" size="10" style="width: 50%" onchange="if (this.selectedIndex > -1) display_details(this.options[this.selectedIndex].value); else display_details(-1);">{BANNED_OPTIONS}</select></td>
+ </tr>
+ <tr>
+ <td class="row1" valign="top"><b>{L_BAN_LENGTH}:</b></td>
+ <td class="row2"><input style="border: 0; width: 100%" type="text" name="unbanlength" disabled="disabled" /></td>
+ </tr>
+ <tr>
+ <td class="row1" valign="top"><b>{L_BAN_REASON}:</b></td>
+ <td class="row2"><textarea style="border: 0; width: 100%" name="unbanreason" disabled="disabled" rows="5" cols="80">&nbsp;</textarea></td>
+ </tr>
+ <tr>
+ <td class="row1" valign="top"><b>{L_BAN_GIVE_REASON}:</b></td>
+ <td class="row2"><textarea style="border: 0; width: 100%" name="unbangivereason" disabled="disabled" rows="5" cols="80">&nbsp;</textarea></td>
+ </tr>
+ <tr>
+ <td class="cat" colspan="2" align="center"><input type="submit" name="unbansubmit" value="{L_SUBMIT}" class="btnmain" />&nbsp; <input type="reset" value="{L_RESET}" class="btnlite" />&nbsp;</td>
+ </tr>
+<!-- ELSE -->
+ <tr>
+ <td class="row1" colspan="2"><b>{L_NO_BAN_CELL}</b></td>
+ </tr>
+<!-- ENDIF -->
+</table>
+{S_FORM_TOKEN}
+</form>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_footer.html b/phpBB/styles/subsilver2/template/mcp_footer.html
new file mode 100644
index 0000000000..3105c15ae4
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_footer.html
@@ -0,0 +1,27 @@
+
+ </td>
+ </tr>
+ </table>
+
+ <!-- IF PAGINATION -->
+ <table width="80%" align="{S_CONTENT_FLOW_END}" cellspacing="1">
+ <tr>
+ <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
+ <td class="gensmall" nowrap="nowrap">&nbsp;[ <!-- IF TOTAL_TOPICS -->{TOTAL_TOPICS}<!-- ELSEIF TOTAL_POSTS -->{TOTAL_POSTS}<!-- ELSE -->{TOTAL}<!-- ENDIF --> ]&nbsp;</td>
+ <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
+ </tr>
+ </table>
+ <br />
+ <!-- ENDIF -->
+
+</div>
+
+<br clear="all" />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<br clear="all" />
+
+<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_forum.html b/phpBB/styles/subsilver2/template/mcp_forum.html
new file mode 100644
index 0000000000..80a6047858
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_forum.html
@@ -0,0 +1,89 @@
+<!-- INCLUDE mcp_header.html -->
+
+<!-- IF S_MERGE_SELECT --><div style="float: {S_CONTENT_FLOW_END};"><!-- INCLUDE jumpbox.html --></div><!-- ENDIF -->
+
+<!-- IF U_VIEW_FORUM_LOGS --><a href="{U_VIEW_FORUM_LOGS}">{L_VIEW_FORUM_LOGS}</a><!-- ENDIF -->
+
+<!-- IF S_MERGE_SELECT --><br clear="{S_CONTENT_FLOW_END}" /><!-- ENDIF -->
+
+<form method="post" id="mcp" action="{S_MCP_ACTION}">
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <td class="cat" colspan="6" align="center"><span class="gensmall">{L_DISPLAY_TOPICS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td>
+</tr>
+<tr>
+ <th width="4%" nowrap="nowrap">&nbsp;</th>
+ <th nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
+ <th width="8%" nowrap="nowrap">&nbsp;{L_REPLIES}&nbsp;</th>
+ <th width="17%" nowrap="nowrap">&nbsp;{L_LAST_POST}&nbsp;</th>
+ <th width="5%" nowrap="nowrap">&nbsp;{L_MARK}&nbsp;</th>
+</tr>
+<!-- BEGIN topicrow -->
+ <tr>
+ <td class="row1" width="25" align="center">{topicrow.TOPIC_FOLDER_IMG}</td>
+ <!-- IF S_TOPIC_ICONS -->
+ <!-- td class="row1" width="25" align="center">{topicrow.TOPIC_ICON_IMG}</td -->
+ <!-- ENDIF -->
+ <td class="row1">
+ <!-- IF topicrow.S_SELECT_TOPIC -->
+ <span class="genmed">[ <a href="{topicrow.U_SELECT_TOPIC}">{L_SELECT_MERGE}</a> ]&nbsp;</span>
+ <!-- ENDIF -->
+ <p class="topictitle">{NEWEST_POST_IMG} {topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a>
+ <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
+ <a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a>&nbsp;
+ <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_REPORTED and topicrow.U_MCP_REPORT -->
+ <a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a>&nbsp;
+ <!-- ENDIF -->
+ <!-- IF topicrow.S_MOVED_TOPIC and S_CAN_DELETE -->
+ [ <a href="{topicrow.U_DELETE_TOPIC}">{L_DELETE_SHADOW_TOPIC}</a> ]&nbsp;
+ <!-- ENDIF -->
+ </p>
+ </td>
+ <td class="row1" width="50" align="center"><p class="topicdetails">{topicrow.REPLIES}</p></td>
+ <td class="row1" width="120" align="center"><p class="topicdetails">{topicrow.LAST_POST_TIME}</p></td>
+ <td class="row2" align="center">
+ <!-- IF not topicrow.S_MOVED_TOPIC and not S_MERGE_SELECT --><input type="checkbox" class="radio" name="topic_id_list[]" value="{topicrow.TOPIC_ID}"<!-- IF topicrow.S_TOPIC_CHECKED --> checked="checked"<!-- ENDIF --> /><!-- ELSE -->&nbsp;<!-- ENDIF -->
+ </td>
+ </tr>
+<!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="8" align="center"><p class="gen">{L_NO_TOPICS}</p></td>
+ </tr>
+<!-- END topicrow -->
+<!-- IF not S_MERGE_SELECT -->
+<tr>
+ <td class="cat" colspan="6" align="{S_CONTENT_FLOW_END}">
+ <select name="action">
+ <option value="" selected="selected">{L_SELECT_ACTION}</option>
+ <!-- IF S_CAN_DELETE --><option value="delete_topic">{L_DELETE}</option><!-- ENDIF -->
+ <!-- IF S_CAN_MERGE --><option value="merge_topics">{L_MERGE}</option><!-- ENDIF -->
+ <!-- IF S_CAN_MOVE --><option value="move">{L_MOVE}</option><!-- ENDIF -->
+ <!-- IF S_CAN_FORK --><option value="fork">{L_FORK}</option><!-- ENDIF -->
+ <!-- IF S_CAN_LOCK --><option value="lock">{L_LOCK}</option><option value="unlock">{L_UNLOCK}</option><!-- ENDIF -->
+ <!-- IF S_CAN_SYNC --><option value="resync">{L_RESYNC}</option><!-- ENDIF -->
+ <!-- IF S_CAN_MAKE_NORMAL --><option value="make_normal">{L_MAKE_NORMAL}</option><!-- ENDIF -->
+ <!-- IF S_CAN_MAKE_STICKY --><option value="make_sticky">{L_MAKE_STICKY}</option><!-- ENDIF -->
+ <!-- IF S_CAN_MAKE_ANNOUNCE -->
+ <option value="make_announce">{L_MAKE_ANNOUNCE}</option>
+ <option value="make_global">{L_MAKE_GLOBAL}</option>
+ <!-- ENDIF -->
+ </select>
+ <input class="btnmain" type="submit" value="{L_SUBMIT}" />
+ </td>
+</tr>
+<!-- ENDIF -->
+</table>
+{S_FORM_TOKEN}
+</form>
+
+<!-- IF not S_MERGE_SELECT -->
+<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
+<tr>
+ <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="gensmall"><a href="#" onclick="marklist('mcp', 'topic_id_list', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'topic_id_list', false); return false;">{L_UNMARK_ALL}</a></b></td>
+</tr>
+</table>
+<!-- ENDIF -->
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_front.html b/phpBB/styles/subsilver2/template/mcp_front.html
new file mode 100644
index 0000000000..7c63039259
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_front.html
@@ -0,0 +1,155 @@
+<!-- INCLUDE mcp_header.html -->
+
+<!-- IF S_SHOW_UNAPPROVED -->
+ <form name="mcp_queue" method="post" action="{S_MCP_QUEUE_ACTION}">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="row3" colspan="6" align="center"><b class="gen">{L_LATEST_UNAPPROVED}</b></td>
+ </tr>
+ <tr>
+ <th>&nbsp;{L_FORUM}&nbsp;</th>
+ <th>&nbsp;{L_TOPIC}&nbsp;</th>
+ <th>&nbsp;{L_SUBJECT}&nbsp;</th>
+ <th>&nbsp;{L_AUTHOR}&nbsp;</th>
+ <th>&nbsp;{L_POST_TIME}&nbsp;</th>
+ <th width="5%">&nbsp;{L_SELECT}&nbsp;</th>
+ </tr>
+ <!-- BEGIN unapproved -->
+ <tr>
+ <td class="row1" width="15%" valign="top"><span class="gen"><!-- IF unapproved.U_FORUM --><a href="{unapproved.U_FORUM}">{unapproved.FORUM_NAME}</a><!-- ELSE -->{unapproved.FORUM_NAME}<!-- ENDIF --></span><!-- IF unapproved.U_MCP_FORUM --><br /><span class="gensmall">[ <a href="{unapproved.U_MCP_FORUM}">{L_MODERATE}</a> ]</span><!-- ENDIF --></td>
+ <td class="row2" valign="top"><span class="gen"><a href="{unapproved.U_TOPIC}">{unapproved.TOPIC_TITLE}</a></span><br /><span class="gensmall">[ <a href="{unapproved.U_MCP_TOPIC}">{L_MODERATE}</a> ]</span></td>
+ <td class="row1" valign="top"><span class="gen">{unapproved.SUBJECT}</span><br /><span class="gensmall">[ <a href="{unapproved.U_POST_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td>
+ <td class="row2" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gen">{unapproved.AUTHOR_FULL}</span></td>
+ <td class="row1" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gensmall">{unapproved.POST_TIME}</span></td>
+ <td class="row2" align="center"><input type="checkbox" class="radio" name="post_id_list[]" value="{unapproved.POST_ID}" /></td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="6" align="center"><span class="gen">{L_UNAPPROVED_POSTS_ZERO_TOTAL}</span></td>
+ </tr>
+ <!-- END unapproved -->
+ <!-- IF S_HAS_UNAPPROVED_POSTS -->
+ <tr>
+ <td class="row3" colspan="6"><span class="gensmall">{L_UNAPPROVED_TOTAL}</span></td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td class="cat" colspan="6" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="action[approve]" value="{L_APPROVE}" />&nbsp;&nbsp;<input class="btnlite" type="submit" name="action[disapprove]" value="{L_DISAPPROVE}" /></td>
+ </tr>
+ </table>
+ {S_FORM_TOKEN}
+ </form>
+
+ <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
+ <tr>
+ <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="gensmall"><a href="#" onclick="marklist('mcp_queue', '', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp_queue', '', false); return false;">{L_UNMARK_ALL}</a></b></td>
+ </tr>
+ </table>
+
+ <br clear="all" /><br />
+<!-- ENDIF -->
+
+<!-- IF S_SHOW_REPORTS -->
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="row3" colspan="5" align="center"><b class="gen">{L_LATEST_REPORTED}</b></td>
+ </tr>
+ <tr>
+ <th>&nbsp;{L_FORUM}&nbsp;</th>
+ <th>&nbsp;{L_TOPIC}&nbsp;</th>
+ <th>&nbsp;{L_SUBJECT}&nbsp;</th>
+ <th>&nbsp;{L_REPORTER}&nbsp;</th>
+ <th>&nbsp;{L_REPORT_TIME}&nbsp;</th>
+ </tr>
+ <!-- BEGIN report -->
+ <tr>
+ <td class="row1" width="15%" valign="top"><span class="gen"><!-- IF report.U_FORUM --><a href="{report.U_FORUM}">{report.FORUM_NAME}</a><!-- ELSE -->{report.FORUM_NAME}<!-- ENDIF --></span><!-- IF report.U_MCP_FORUM --><br /><span class="gensmall">[ <a href="{report.U_MCP_FORUM}">{L_MODERATE}</a> ]</span><!-- ENDIF --></td>
+ <td class="row2" valign="top"><span class="gen"><a href="{report.U_TOPIC}">{report.TOPIC_TITLE}</a></span><br /><span class="gensmall">[ <a href="{report.U_MCP_TOPIC}">{L_MODERATE}</a> ]</span></td>
+ <td class="row1" valign="top"><span class="gen">{report.SUBJECT}</span><br /><span class="gensmall">[ <a href="{report.U_POST_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td>
+ <td class="row2" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gen">{report.REPORTER_FULL}</span></td>
+ <td class="row1" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gensmall">{report.REPORT_TIME}</span></td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="5" align="center"><span class="gen">{L_REPORTS_ZERO_TOTAL}</span></td>
+ </tr>
+ <!-- END report -->
+ <!-- IF S_HAS_REPORTS -->
+ <tr>
+ <td class="row3" colspan="5"><span class="gensmall">{L_REPORTS_TOTAL}</span></td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+
+ <br clear="all" /><br />
+<!-- ENDIF -->
+
+<!-- IF S_SHOW_PM_REPORTS -->
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="row3" colspan="6" align="center"><b class="gen">{L_LATEST_REPORTED_PMS}</b></td>
+ </tr>
+ <tr>
+ <th>&nbsp;{L_PM_SUBJECT}&nbsp;</th>
+ <th>&nbsp;{L_PM_FROM}&nbsp;</th>
+ <th>&nbsp;{L_TO} &amp; {L_BCC}&nbsp;</th>
+ <th>&nbsp;{L_SENT_AT}&nbsp;</th>
+ <th>&nbsp;{L_REPORTER}&nbsp;</th>
+ <th>&nbsp;{L_REPORT_TIME}&nbsp;</th>
+ </tr>
+ <!-- BEGIN pm_report -->
+ <tr>
+ <td class="row1" valign="top"><span class="gen">{pm_report.PM_SUBJECT}</span><br /><span class="gensmall">[ <a href="{pm_report.U_PM_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td>
+ <td class="row2" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gen">{pm_report.PM_AUTHOR_FULL}</span></td>
+ <td class="row1" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gen">{pm_report.RECIPIENTS}</span></td>
+ <td class="row2" align="center" width="10%" nowrap="nowrap" valign="top"><span class="gensmall">{pm_report.PM_TIME}</span></td>
+ <td class="row1" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gen">{pm_report.REPORTER_FULL}</span></td>
+ <td class="row2" align="center" width="10%" nowrap="nowrap" valign="top"><span class="gensmall">{pm_report.REPORT_TIME}</span></td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="6" align="center"><span class="gen">{L_PM_REPORTS_ZERO_TOTAL}</span></td>
+ </tr>
+ <!-- END pm_report -->
+ <!-- IF S_HAS_PM_REPORTS -->
+ <tr>
+ <td class="row3" colspan="6"><span class="gensmall">{L_PM_REPORTS_TOTAL}</span></td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+
+ <br clear="all" /><br />
+<!-- ENDIF -->
+
+<!-- IF S_SHOW_LOGS -->
+ <table class="tablebg" width="100%" cellspacing="1" cellpadding="4" border="0" align="{S_CONTENT_FLOW_END}">
+ <tr>
+ <td class="row3" colspan="5" align="center"><b class="gen">{L_LATEST_LOGS}</b></td>
+ </tr>
+ <tr>
+ <th width="15%" nowrap="nowrap">{L_USERNAME}</th>
+ <th width="12%" nowrap="nowrap">{L_IP}</th>
+ <th width="45%" nowrap="nowrap">{L_ACTION}</th>
+ <th nowrap="nowrap"></th>
+ <th width="18%" nowrap="nowrap">{L_TIME}</th>
+ </tr>
+ <!-- BEGIN log -->
+ <tr>
+ <td class="row1" nowrap="nowrap"><span class="gen">{log.USERNAME}</span></td>
+ <td class="row1" align="center" nowrap="nowrap"><span class="gen">{log.IP}</span></td>
+ <td class="row1"><span class="genmed">{log.ACTION}</span></td>
+ <td class="row1" align="center" nowrap="nowrap"><span class="gensmall"><!-- IF log.U_VIEW_TOPIC --><a href="{log.U_VIEW_TOPIC}">{L_VIEW_TOPIC}</a><!-- IF log.U_VIEWLOGS --> | <!-- ENDIF --><!-- ENDIF --><!-- IF log.U_VIEWLOGS --><a href="{log.U_VIEWLOGS}">{L_VIEW_TOPIC_LOGS}</a><!-- ENDIF --></span></td>
+ <td class="row1" align="center" nowrap="nowrap"><span class="gensmall">{log.TIME}</span></td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="5" align="center"><span class="gen">{L_NO_ENTRIES}</span></td>
+ </tr>
+ <!-- END log -->
+ </table>
+
+ <br clear="all" />
+<!-- ENDIF -->
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_header.html b/phpBB/styles/subsilver2/template/mcp_header.html
new file mode 100644
index 0000000000..f107732234
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_header.html
@@ -0,0 +1,79 @@
+<!-- INCLUDE overall_header.html -->
+
+<div id="pageheader">
+ <!-- IF U_MCP -->
+ <p class="linkmcp">
+ [ <a href="{U_MCP}">{L_MCP}</a><!-- IF U_MCP_FORUM --> | <a href="{U_MCP_FORUM}">{L_MODERATE_FORUM}</a><!-- ENDIF -->
+ <!-- IF U_MCP_TOPIC --> | <a href="{U_MCP_TOPIC}">{L_MODERATE_TOPIC}</a><!-- ENDIF -->
+ <!-- IF U_MCP_POST --> | <a href="{U_MCP_POST}">{L_MODERATE_POST}</a><!-- ENDIF --> ]
+ </p>
+ <!-- ENDIF -->
+
+ <!-- IF TOPIC_TITLE or FORUM_NAME -->
+ <h2><!-- IF TOPIC_TITLE --><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- ELSE --><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- ENDIF --></h2>
+ <!-- ENDIF -->
+</div>
+
+<br clear="all" />
+
+<div id="pagecontent">
+
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td width="20%" valign="top">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th>{L_OPTIONS}</th>
+ </tr>
+ <!-- BEGIN l_block1 -->
+ <tr>
+ <!-- IF l_block1.S_SELECTED -->
+ <td class="row1"><b class="nav">{l_block1.L_TITLE}</b>
+
+ <ul class="nav" style="margin: 0; padding: 0; list-style-type: none; line-height: 175%;">
+ <!-- BEGIN l_block2 -->
+ <li>&#187; <!-- IF l_block1.l_block2.S_SELECTED --><b>{l_block1.l_block2.L_TITLE}</b><!-- ELSE --><a href="{l_block1.l_block2.U_TITLE}">{l_block1.l_block2.L_TITLE}</a><!-- ENDIF --></li>
+ <!-- END l_block2 -->
+ </ul>
+ <!-- ELSE -->
+ <td class="row2" nowrap="nowrap" onmouseover="this.className='row1'" onmouseout="this.className='row2'" onclick="location.href=this.firstChild.href;"><a class="nav" href="{l_block1.U_TITLE}">{l_block1.L_TITLE}</a>
+ <!-- ENDIF -->
+ </td>
+ </tr>
+ <!-- END l_block1 -->
+ </table>
+
+ </td>
+ <td><img src="images/spacer.gif" width="4" alt="" /></td>
+ <td width="80%" valign="top">
+
+ <!-- IF MESSAGE -->
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th>{L_MESSAGE}</th>
+ </tr>
+ <tr>
+ <td class="row1" align="center"><br /><span class="gen">{MESSAGE}<br /><br /><!-- BEGIN return_links -->{return_links.MESSAGE_LINK}<br /><br /><!-- END return_links --></span></td>
+ </tr>
+ </table>
+
+ <br />
+ <!-- ENDIF -->
+
+ <!-- IF CONFIRM_MESSAGE -->
+ <form name="confirm" method="post" action="{S_CONFIRM_ACTION}">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th>{L_PLEASE_CONFIRM}</th>
+ </tr>
+ <tr>
+ <td class="row1" align="center"><span class="gen"><br />{CONFIRM_MESSAGE}<br /><br />{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="confirm" value="{L_YES}" />&nbsp;&nbsp;<input class="btnlite" type="submit" name="cancel" value="{L_NO}" /><br /><br /></span></td>
+ </tr>
+ </table>
+
+ </form>
+
+ <br />
+ <!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/mcp_jumpbox.html b/phpBB/styles/subsilver2/template/mcp_jumpbox.html
new file mode 100644
index 0000000000..14856596f0
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_jumpbox.html
@@ -0,0 +1,18 @@
+<!-- Note: no longer in use... -->
+
+<form name="jumpbox" method="post" action="{S_JUMPBOX_ACTION}">
+
+ <span class="gensmall">{L_JUMP_TO}:</span>&nbsp;<select name="f" onChange="if(this.options[this.selectedIndex].value != -1 && this.options[this.selectedIndex].value != document.jumpbox.current_f.value){ document.forms['jumpbox'].submit() }">
+
+<!-- IF S_ENABLE_SELECT_ALL -->
+ <option value="0">{L_ALL_FORUMS}</option>
+<!-- ELSE -->
+ <option value="-1">{L_SELECT_FORUM}</option>
+<!-- ENDIF -->
+
+<!-- BEGIN options -->
+ <option value="{options.VALUE}"<!-- IF options.VALUE eq -1 --> class="disabled-option"<!-- ENDIF -->{options.SELECTED}/>{options.TEXT}</option>
+<!-- BEGINELSE -->
+<!-- END options -->
+</select>&nbsp;<input type="hidden" name="current_f" value="{S_CURRENT_FORUM}" /><input name="jumpbox" class="btnlite" type="submit" value="{L_GO}" onclick="if(document.jumpbox.f.value == -1){return false;}" />
+</form>
diff --git a/phpBB/styles/subsilver2/template/mcp_logs.html b/phpBB/styles/subsilver2/template/mcp_logs.html
new file mode 100644
index 0000000000..6b78df3e5e
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_logs.html
@@ -0,0 +1,46 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form method="post" name="mcp" action="{U_POST_ACTION}">
+
+<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
+<tr>
+ <th>{L_USERNAME}</th>
+ <th>{L_IP}</th>
+ <th>{L_TIME}</th>
+ <th>{L_ACTION}</th>
+ <!-- IF S_CLEAR_ALLOWED --><th>{L_MARK}</th><!-- ENDIF -->
+</tr>
+<!-- IF S_LOGS -->
+
+ <!-- BEGIN log -->
+ <!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td class="genmed">{log.USERNAME}</td>
+ <td class="genmed" style="text-align: center;">{log.IP}</td>
+ <td class="genmed" style="text-align: center;">{log.DATE}</td>
+ <td class="genmed">{log.ACTION}<br />{log.DATA}</td>
+ <!-- IF S_CLEAR_ALLOWED --><td width="5%" align="center"><input type="checkbox" class="radio" name="mark[]" value="{log.ID}" /></td><!-- ENDIF -->
+ </tr>
+ <!-- END log -->
+ <tr align="center">
+ <td class="row3" colspan="<!-- IF S_CLEAR_ALLOWED -->5<!-- ELSE -->4<!-- ENDIF -->"><span class="gensmall">{L_SEARCH_KEYWORDS}:</span> <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" /></td>
+ </tr>
+ <tr align="center">
+ <td class="row3" colspan="<!-- IF S_CLEAR_ALLOWED -->5<!-- ELSE -->4<!-- ENDIF -->"><span class="gensmall">{L_DISPLAY_LOG}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></td>
+ </tr>
+ <!-- IF S_CLEAR_ALLOWED -->
+ <tr>
+ <td class="cat" colspan="5" align="center"><input class="btnlite" type="submit" name="action[del_all]" value="{L_DELETE_ALL}" />&nbsp; <input class="btnlite" type="submit" name="action[del_marked]" value="{L_DELETE_MARKED}" /></td>
+ </tr>
+ <!-- ENDIF -->
+<!-- ELSE -->
+ <tr>
+ <td class="row1" colspan="<!-- IF S_CLEAR_ALLOWED -->5<!-- ELSE -->4<!-- ENDIF -->" align="center"><span class="gen">{L_NO_ENTRIES}</span></td>
+ </tr>
+<!-- ENDIF -->
+</table>
+{S_FORM_TOKEN}
+</form>
+
+<br clear="all" /><br />
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_message.html b/phpBB/styles/subsilver2/template/mcp_message.html
new file mode 100644
index 0000000000..7645e5dd81
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_message.html
@@ -0,0 +1,14 @@
+<!-- INCLUDE mcp_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
+<tr>
+ <th><b>{MESSAGE_TITLE}</b></th>
+</tr>
+<tr>
+ <td class="row1" align="center"><br /><span class="gen">{MESSAGE_TEXT}</span><br /><br /></td>
+</tr>
+</table>
+
+<br clear="all" />
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_move.html b/phpBB/styles/subsilver2/template/mcp_move.html
new file mode 100644
index 0000000000..db7a6e7241
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_move.html
@@ -0,0 +1,43 @@
+<!-- INCLUDE overall_header.html -->
+
+<div id="pagecontent">
+
+ <form name="confirm" action="{S_CONFIRM_ACTION}" method="post">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th>{MESSAGE_TITLE}</th>
+ </tr>
+ <tr>
+ <td class="row1" align="center">
+ <!-- IF ADDITIONAL_MSG -->
+ <span class="gen error">{ADDITIONAL_MSG}</span><br />
+ <!-- ENDIF -->
+ <!-- IF S_FORUM_SELECT -->
+ <span class="gen"><br />{L_SELECT_DESTINATION_FORUM}&nbsp;&nbsp;</span>
+ <select name="to_forum_id">{S_FORUM_SELECT}</select><br />
+ <!-- IF S_CAN_LEAVE_SHADOW -->
+ <input type="checkbox" class="radio" name="move_leave_shadow" checked="checked" /><span class="gen">{L_LEAVE_SHADOW}</span><br />
+ <!-- ENDIF -->
+ <br />{S_HIDDEN_FIELDS}<span class="gen">{MESSAGE_TEXT}</span><br /><br />
+ <input type="submit" name="confirm" value="{YES_VALUE}" class="btnmain" />&nbsp;&nbsp;<input type="submit" name="cancel" value="{L_NO}" class="btnlite" />
+ <!-- ELSE -->
+ <span class="gen">{L_NO_DESTINATION_FORUM}</span><br /><br />
+ {S_HIDDEN_FIELDS}
+ <input type="submit" name="cancel" value="{L_CANCEL}" class="btnlite" />
+ <!-- ENDIF -->
+ </td>
+ </tr>
+ </table>
+ {S_FORM_TOKEN}
+ </form>
+
+</div>
+
+<br clear="all" />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<br clear="all" />
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_notes_front.html b/phpBB/styles/subsilver2/template/mcp_notes_front.html
new file mode 100644
index 0000000000..17f389f7f3
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_notes_front.html
@@ -0,0 +1,22 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form method="post" name="mcp" action="{U_POST_ACTION}">
+
+<table class="tablebg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
+<tr>
+ <th colspan="2"align="center">{L_SELECT_USER}</th>
+</tr>
+<tr>
+ <td class="row1" width="40%"><b class="gen">{L_FIND_USERNAME}: </b><br /><span class="gensmall">[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span></td>
+ <td class="row2"><input type="text" class="post" name="username" size="20" /></td>
+</tr>
+<tr>
+ <td class="cat" colspan="2" align="center"><input type="submit" name="submituser" value="{L_SUBMIT}" class="btnmain" /></td>
+</tr>
+</table>
+{S_FORM_TOKEN}
+</form>
+
+<br clear="all" /><br />
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_notes_user.html b/phpBB/styles/subsilver2/template/mcp_notes_user.html
new file mode 100644
index 0000000000..522c19fa05
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_notes_user.html
@@ -0,0 +1,125 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form method="post" name="mcp" action="{U_POST_ACTION}">
+
+<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
+<tr>
+ <th colspan="2" align="center">{USERNAME}</th>
+</tr>
+<tr>
+ <td class="row1" align="center">
+ <table cellspacing="1" cellpadding="2" border="0">
+ <tr>
+ <td class="gen" align="center"><b>{USERNAME_FULL}</b></td>
+ </tr>
+ <!-- IF RANK_TITLE -->
+ <tr>
+ <td class="postdetails" align="center">{RANK_TITLE}</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF RANK_IMG -->
+ <tr>
+ <td align="center">{RANK_IMG}</td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td align="center"><!-- IF AVATAR_IMG -->{AVATAR_IMG}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF --></td>
+ </tr>
+ </table>
+ </td>
+ <td class="row1">
+ <table width="100%" cellspacing="1" cellpadding="2" border="0">
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_JOINED}: </td>
+ <td width="100%"><b class="gen">{JOINED}</b></td>
+ </tr>
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_TOTAL_POSTS}: </td>
+ <td><b class="gen">{POSTS}</b></td>
+ </tr>
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_WARNINGS}: </td>
+ <td><b class="gen">{WARNINGS}</b></td>
+ </tr>
+ </table>
+ </td>
+</tr>
+</table>
+
+<br />
+
+<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
+<tr>
+ <th colspan="5" align="center">{L_FEEDBACK}</th>
+</tr>
+<!-- IF S_USER_NOTES -->
+
+ <tr align="center">
+ <td colspan="5" class="row3"><span class="gensmall">{L_SEARCH_KEYWORDS}:</span> <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" /></td>
+ </tr>
+ <tr align="center">
+ <td colspan="5" class="row3"><span class="gensmall">{L_DISPLAY_LOG}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}:</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></td>
+ </tr>
+ <tr>
+ <th>{L_REPORT_BY}</th>
+ <th>{L_IP}</th>
+ <th>{L_TIME}</th>
+ <th>{L_ACTION}</th>
+ <th><!-- IF S_CLEAR_ALLOWED -->{L_MARK}<!-- ENDIF --></th>
+ </tr>
+
+ <!-- BEGIN usernotes -->
+ <!-- IF usernotes.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td class="gen">{usernotes.REPORT_BY}</td>
+ <td style="text-align: center;">{usernotes.IP}</td>
+ <td style="text-align: center;">{usernotes.REPORT_AT}</td>
+ <td class="gen">
+ {usernotes.ACTION}
+ <!-- IF usernotes.DATA --><br />&#187; <span class="gensmall">[ {usernotes.DATA} ]</span><!-- ENDIF -->
+ </td>
+ <td style="text-align: center;"><!-- IF S_CLEAR_ALLOWED --><input type="checkbox" class="radio" name="marknote[]" value="{usernotes.ID}" /><!-- ENDIF --></td>
+ </tr>
+ <!-- END usernotes -->
+
+ <!-- IF S_CLEAR_ALLOWED -->
+ <tr>
+ <td class="cat" colspan="5" align="center"><input class="btnlite" type="submit" name="action[del_all]" value="{L_DELETE_ALL}" />&nbsp; <input class="btnlite" type="submit" name="action[del_marked]" value="{L_DELETE_MARKED}" /></td>
+ </tr>
+ <!-- ENDIF -->
+
+<!-- ELSE -->
+ <tr>
+ <td class="row1" colspan="2" align="center"><span class="gen">{L_NO_FEEDBACK}</span></td>
+ </tr>
+<!-- ENDIF -->
+</table>
+
+<br clear="all" />
+
+<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
+<tr>
+ <th colspan="2" align="center">{L_ADD_FEEDBACK}</th>
+</tr>
+<tr>
+ <td class="row3" align="center" colspan="2"><span class="genmed">{L_ADD_FEEDBACK_EXPLAIN}</span></td>
+</tr>
+<tr>
+ <td colspan="2" class="row1" align="center"><textarea name="usernote" rows="10" cols="76"></textarea></td>
+</tr>
+<tr>
+ <td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="action[add_feedback]" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" /></td>
+</tr>
+</table>
+
+<table width="100%" cellspacing="0" cellpadding="0">
+<tr>
+ <td class="pagination">{PAGE_NUMBER} [ {TOTAL_REPORTS} ]</td>
+ <td align="{S_CONTENT_FLOW_END}"><span class="pagination"><!-- INCLUDE pagination.html --></span></td>
+</tr>
+</table>
+{S_FORM_TOKEN}
+</form>
+
+<br clear="all" /><br />
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_post.html b/phpBB/styles/subsilver2/template/mcp_post.html
new file mode 100644
index 0000000000..ecf4558b45
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_post.html
@@ -0,0 +1,206 @@
+<!-- INCLUDE mcp_header.html -->
+
+<!-- IF S_MCP_REPORT -->
+ <form method="post" name="mcp_report" action="{S_CLOSE_ACTION}">
+
+ <table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
+ <tr>
+ <th colspan="2" align="center"><!-- IF S_PM -->{L_PM_REPORT_DETAILS}<!-- ELSE -->{L_REPORT_DETAILS}<!-- ENDIF --></th>
+ </tr>
+ <tr>
+ <td class="row1"><b class="gen">{L_REPORT_REASON}: </b></td>
+ <td class="row2"><span class="gen">{REPORT_REASON_TITLE} &raquo; {REPORT_REASON_DESCRIPTION}</span></td>
+ </tr>
+ <tr>
+ <td class="row1" width="20%"><b class="gen">{L_REPORTER}: </b></td>
+ <td class="row2" width="80%"><span class="gen"<!-- IF REPORTER_COLOUR --> style="font-weight: bold; color: {REPORTER_COLOUR};"<!-- ENDIF -->>{REPORTER_NAME}</span> &nbsp; <span class="gen">[ <!-- IF U_VIEW_REPORTER_PROFILE --><a href="{U_VIEW_REPORTER_PROFILE}">{L_READ_PROFILE}</a><!-- ENDIF --><!-- IF S_USER_NOTES --><!-- IF U_VIEW_REPORTER_PROFILE --> | <!-- ENDIF --><a href="{U_MCP_REPORTER_NOTES}">{L_VIEW_NOTES}</a> | <a href="{U_MCP_WARN_REPORTER}">{L_WARN_USER}</a><!-- ENDIF --> ]</span></td>
+ </tr>
+ <tr>
+ <td class="row1"><b class="gen">{L_REPORTED}: </b></td>
+ <td class="row2"><span class="postdetails">{REPORT_DATE}</span></td>
+ </tr>
+ <!-- IF REPORT_TEXT -->
+ <tr>
+ <th colspan="2" align="center">{L_MORE_INFO}</th>
+ </tr>
+ <tr>
+ <td class="row1" colspan="2"><div class="gen" style="overflow: auto; width: 100%; height: 80pt; border: 1px;">{REPORT_TEXT}</div></td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td class="cat" align="center" colspan="2"><!-- IF S_POST_REPORTED --><input class="btnmain" type="submit" value="{L_CLOSE_REPORT}" name="action[close]" /><!-- ELSE -->{L_REPORT_CLOSED}<!-- ENDIF --> &nbsp; <input class="btnlite" type="submit" value="{L_DELETE_REPORT}" name="action[delete]" /></td>
+ </tr>
+ </table>
+
+ <input type="hidden" name="report_id_list[]" value="{REPORT_ID}" />
+ {S_FORM_TOKEN}
+ </form>
+
+ <br clear="all"/>
+<!-- ENDIF -->
+
+<!-- IF S_MCP_QUEUE --><form method="post" name="mcp_approve" action="{U_APPROVE_ACTION}"><!-- ELSE --><form method="post" name="mcp_report_details" action="{S_CLOSE_ACTION}"><!-- ENDIF -->
+
+<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
+<tr>
+ <th colspan="2" align="center"><!-- IF S_PM -->{L_PM}<!-- ELSE -->{L_POST_DETAILS}<!-- ENDIF --></th>
+</tr>
+<tr>
+ <td class="row3" colspan="2" align="center"><span class="gensmall"><!-- IF S_MCP_QUEUE -->{RETURN_QUEUE} | {RETURN_TOPIC_SIMPLE} | {RETURN_POST}<!-- ELSEIF S_MCP_REPORT -->{RETURN_REPORTS}<!-- IF not S_PM --> | <a href="{U_VIEW_POST}">{L_VIEW_POST}</a> | <a href="{U_VIEW_TOPIC}">{L_VIEW_TOPIC}</a> | <a href="{U_VIEW_FORUM}">{L_VIEW_FORUM}</a><!-- ENDIF --><!-- ELSE -->{RETURN_TOPIC}<!-- ENDIF --></span></td>
+</tr>
+<tr>
+ <td class="row1"><b class="gen"><!-- IF S_PM -->{L_PM_SUBJECT}<!-- ELSE -->{L_POST_SUBJECT}<!-- ENDIF -->: </b></td>
+ <td class="row2"><span class="gen">{POST_SUBJECT}</span> <!-- IF S_POST_UNAPPROVED --><span class="postapprove">{UNAPPROVED_IMG} <a href="{U_MCP_APPROVE}">{L_POST_UNAPPROVED}</a></span> <!-- ENDIF --> <!-- IF S_POST_REPORTED and not S_MCP_REPORT --><span class="postreported">{REPORTED_IMG} <a href="{U_MCP_REPORT}">{L_POST_REPORTED}</a></span><!-- ENDIF --></td>
+</tr>
+<tr>
+ <td class="row1" width="20%"><b class="gen"><!-- IF S_PM -->{L_PM_FROM}<!-- ELSE -->{L_POSTER}<!-- ENDIF -->: </b></td>
+ <td class="row2" width="80%"><span class="gen"<!-- IF POST_AUTHOR_COLOUR --> style="font-weight: bold; color: {POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{POST_AUTHOR}</span><span class="gen"> &nbsp; [ <!-- IF U_POST_AUTHOR --><a href="{U_POST_AUTHOR}">{L_READ_PROFILE}</a><!-- ENDIF --><!-- IF S_USER_NOTES --><!-- IF U_POST_AUTHOR --> | <!-- ENDIF --><a href="{U_MCP_USER_NOTES}">{L_VIEW_NOTES}</a> <!-- IF U_MCP_WARN_USER -->| <a href="{U_MCP_WARN_USER}">{L_WARN_USER}</a><!-- ENDIF --><!-- ENDIF --> ]</span></td>
+</tr>
+<!-- IF S_CAN_VIEWIP -->
+ <tr>
+ <td class="row1"><b class="gen">{L_THIS_POST_IP}: </b></td>
+ <td class="row2"><span class="gen">
+ <!-- IF U_WHOIS -->
+ <a href="{U_WHOIS}"><!-- IF POST_IPADDR -->{POST_IPADDR}<!-- ELSE -->{POST_IP}<!-- ENDIF --></a> (<!-- IF POST_IPADDR -->{POST_IP}<!-- ELSE --><a href="{U_LOOKUP_IP}">{L_LOOKUP_IP}</a><!-- ENDIF -->)
+ <!-- ELSE -->
+ <!-- IF POST_IPADDR -->{POST_IPADDR} ({POST_IP})<!-- ELSE -->{POST_IP}<!-- IF U_LOOKUP_IP --> (<a href="{U_LOOKUP_IP}">{L_LOOKUP_IP}</a>)<!-- ENDIF --><!-- ENDIF -->
+ <!-- ENDIF -->
+ </span></td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <td class="row1"><b class="gen"><!-- IF S_PM -->{L_SENT_AT}<!-- ELSE -->{L_POSTED}<!-- ENDIF -->: </b></td>
+ <td class="row2"><span class="postdetails">{POST_DATE}</span></td>
+</tr>
+<!-- IF S_TO_RECIPIENT -->
+ <tr>
+ <td class="row1" nowrap="nowrap" width="150"><b class="gen">{L_TO}:</b></td>
+ <td class="row2 gen">
+ <!-- BEGIN to_recipient -->
+ <!-- IF to_recipient.IS_GROUP --><span class="sep"><a href="{to_recipient.U_VIEW}">{to_recipient.NAME}</a></span><!-- ELSE -->{to_recipient.NAME_FULL}&nbsp;<!-- ENDIF -->
+ <!-- END to_recipient -->
+ </td>
+ </tr>
+<!-- ENDIF -->
+
+<!-- IF S_BCC_RECIPIENT -->
+ <tr>
+ <td class="row1" nowrap="nowrap" width="150"><b class="gen">{L_BCC}:</b></td>
+ <td class="row2 gen">
+ <!-- BEGIN bcc_recipient -->
+ <!-- IF bcc_recipient.IS_GROUP --><span class="sep"><a href="{bcc_recipient.U_VIEW}">{bcc_recipient.NAME}</a></span><!-- ELSE -->{bcc_recipient.NAME_FULL}&nbsp;<!-- ENDIF -->
+ <!-- END bcc_recipient -->
+ </td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <th colspan="2" align="center">{L_PREVIEW}</th>
+</tr>
+<tr>
+ <td class="row1" colspan="2">
+ <!-- IF U_EDIT --><div class="gen" style="float: {S_CONTENT_FLOW_END};"><a href="{U_EDIT}">{EDIT_IMG}</a></div><!-- ENDIF -->
+
+ <div class="postbody">{POST_PREVIEW}</div>
+
+ <!-- IF S_HAS_ATTACHMENTS -->
+ <br clear="all" /><br />
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
+ </tr>
+ <!-- BEGIN attachment -->
+ <tr>
+ <!-- IF attachment.S_ROW_COUNT is even --><td class="row2"><!-- ELSE --><td class="row1"><!-- ENDIF -->{attachment.DISPLAY_ATTACHMENT}</td>
+ </tr>
+ <!-- END attachment -->
+ </table>
+ <!-- ENDIF -->
+
+ </td>
+</tr>
+<!-- IF S_POST_UNAPPROVED and S_MCP_QUEUE -->
+ <tr>
+ <td class="cat" align="center" colspan="2"><input class="btnmain" type="submit" value="{L_APPROVE}" name="action[approve]" /> &nbsp; <input class="btnlite" type="submit" value="{L_DISAPPROVE}" name="action[disapprove]" /></td>
+ </tr>
+ <input type="hidden" name="post_id_list[]" value="{POST_ID}" />
+<!-- ENDIF -->
+</table>
+{S_FORM_TOKEN}
+</form>
+
+<!-- IF S_MCP_QUEUE -->
+ <br clear="all" />
+
+ <!-- IF S_TOPIC_REVIEW --><!-- INCLUDE posting_topic_review.html --><!-- ENDIF -->
+<!-- ELSEIF S_MCP_REPORT -->
+ <br clear="all" />
+
+ <!-- IF S_TOPIC_REVIEW --><!-- INCLUDE posting_topic_review.html --><!-- ENDIF -->
+<!-- ELSE -->
+ <!-- IF S_CAN_LOCK_POST or S_CAN_DELETE_POST or S_CAN_CHGPOSTER -->
+ <br /><a name="mod"></a>
+
+ <table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
+ <tr>
+ <th colspan="2" align="center">{L_MOD_OPTIONS}</th>
+ </tr>
+ <!-- IF S_CAN_CHGPOSTER -->
+ <tr>
+ <td class="row1" valign="top"><b class="gen">{L_CHANGE_POSTER}</b></td>
+ <td class="row2"><form method="post" name="mcp_chgposter" action="{U_POST_ACTION}"><input class="post" type="text" name="username" value="" /> <input class="btnmain" type="submit" value="{L_CONFIRM}" name="action[chgposter]" /><br /><span class="gensmall">[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span><!-- IF S_USER_SELECT --><br /><select name="u">{S_USER_SELECT}</select> <input type="submit" class="btnmain" name="action[chgposter_ip]" value="{L_CONFIRM}" /><!-- ENDIF -->{S_FORM_TOKEN}</form></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF S_CAN_LOCK_POST or S_CAN_DELETE_POST -->
+ <tr>
+ <td class="row1" valign="top"><b class="gen">{L_MOD_OPTIONS}</b></td>
+ <td class="row2"><form method="post" name="mcp" action="{U_MCP_ACTION}"><select name="action"><!-- IF S_CAN_LOCK_POST --><!-- IF S_POST_LOCKED --><option value="unlock_post">{L_UNLOCK_POST} [{L_UNLOCK_POST_EXPLAIN}]</option><!-- ELSE --><option value="lock_post">{L_LOCK_POST} [{L_LOCK_POST_EXPLAIN}]</option><!-- ENDIF --><!-- ENDIF --><!-- IF S_CAN_DELETE_POST --><option value="delete_post">{L_DELETE_POST}</option><!-- ENDIF --></select> <input class="btnmain" type="submit" value="{L_SUBMIT}" /> {S_FORM_TOKEN}</form></td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+ <!-- ENDIF -->
+
+ <!-- IF S_CAN_VIEWIP -->
+ <br /><a name="ip"></a>
+
+ <table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
+ <tr>
+ <th colspan="2" align="center">{L_IP_INFO}</th>
+ </tr>
+ <tr>
+ <td colspan="2" class="cat"><b class="gen">{L_OTHER_USERS}</b></td>
+ </tr>
+ <!-- BEGIN userrow -->
+ <!-- IF userrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td><span class="gen"><!-- IF userrow.U_PROFILE --><a href="{userrow.U_PROFILE}">{userrow.USERNAME}</a><!-- ELSE -->{userrow.USERNAME}<!-- ENDIF --> [ {userrow.NUM_POSTS} {userrow.L_POST_S} ]</span></td>
+ <td align="center"><a href="{userrow.U_SEARCHPOSTS}">{SEARCH_IMG}</a></td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr class="row1">
+ <td colspan="2" align="center"><span class="gen">{L_NO_MATCHES_FOUND}</span></td>
+ </tr>
+ <!-- END userrow -->
+ <tr>
+ <td class="cat"><b class="gen">{L_IPS_POSTED_FROM}</b></td>
+ <td class="cat" width="10%" nowrap="nowrap"><!-- IF U_LOOKUP_ALL --><span class="gen">[ <a href="{U_LOOKUP_ALL}">{L_LOOKUP_ALL}</a> ]</span><!-- ENDIF --></td>
+ </tr>
+ <!-- BEGIN iprow -->
+ <!-- IF iprow.S_ROW_COUNT is even -->
+ <tr class="row1">
+ <!-- ELSE -->
+ <tr class="row2">
+ <!-- ENDIF -->
+ <td><span class="gen"><!-- IF iprow.HOSTNAME --><a href="{iprow.U_WHOIS}">{iprow.HOSTNAME}</a> ({iprow.IP})<!-- ELSE --><a href="{iprow.U_WHOIS}">{iprow.IP}</a><!-- ENDIF --> [ {iprow.NUM_POSTS} {iprow.L_POST_S} ]</span></td>
+ <td align="center"><!-- IF iprow.U_LOOKUP_IP --><span class="gen">[ <a href="{iprow.U_LOOKUP_IP}">{L_LOOKUP_IP}</a> ]</span><!-- ENDIF --></td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr class="row1">
+ <td colspan="2" align="center"><span class="gen">{L_NO_MATCHES_FOUND}</span></td>
+ </tr>
+ <!-- END iprow -->
+ </table>
+ <!-- ENDIF -->
+
+<!-- ENDIF -->
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_queue.html b/phpBB/styles/subsilver2/template/mcp_queue.html
new file mode 100644
index 0000000000..4def047e51
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_queue.html
@@ -0,0 +1,46 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form name="mcp" id="mcp" method="post" action="{S_MCP_ACTION}">
+
+<table width="100%" class="tablebg" cellspacing="1" cellpadding="4" border="0">
+<tr>
+ <th colspan="4" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th>
+</tr>
+<tr>
+ <td colspan="4" class="cat" align="center"><span class="gensmall">{L_DISPLAY_ITEMS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<span class="gensmall">{L_FORUM}</span> <select name="f">{S_FORUM_OPTIONS}</select> &nbsp; <!-- IF TOPIC_ID --><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" />&nbsp; <b>{L_ONLY_TOPIC}</b> &nbsp; <!-- ENDIF --><input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td>
+</tr>
+<tr>
+ <th>&nbsp;<!-- IF S_TOPICS -->{L_TOPIC}<!-- ELSE -->{L_POST}<!-- ENDIF -->&nbsp;</th>
+ <th>&nbsp;{L_AUTHOR}&nbsp;</th>
+ <th>&nbsp;{L_POST_TIME}&nbsp;</th>
+ <th width="5%">&nbsp;{L_SELECT}&nbsp;</th>
+</tr>
+<!-- BEGIN postrow -->
+
+ <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="padding: 4px;"><p class="topictitle"><a href="{postrow.U_VIEWPOST}">{postrow.POST_SUBJECT}</a></p>
+ <span class="gensmall"><!-- IF postrow.U_VIEWFORUM -->{L_FORUM}: <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a><!-- ELSE -->{postrow.FORUM_NAME}<!-- ENDIF --></span></td>
+ <td style="padding: 4px;" align="{S_CONTENT_FLOW_BEGIN}" valign="top" nowrap="nowrap"><span class="gen">{postrow.POST_AUTHOR_FULL}</span><br />
+ <span class="gensmall">[ <a href="{postrow.U_VIEW_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td>
+ <td class="postdetails" style="padding: 4px;" align="{S_CONTENT_FLOW_BEGIN}" valign="top" nowrap="nowrap">{postrow.POST_TIME}</td>
+ <td align="center"><input type="checkbox" class="radio" name="post_id_list[]" value="{postrow.POST_ID}" /></td>
+ </tr>
+<!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="4" height="30" align="center" valign="middle"><span class="gen"><!-- IF S_TOPICS -->{L_NO_TOPICS_QUEUE}<!-- ELSE -->{L_UNAPPROVED_POSTS_ZERO_TOTAL}<!-- ENDIF --></span></td>
+ </tr>
+<!-- END postrow -->
+<tr>
+ <td class="cat" colspan="4" align="center"><input class="btnmain" type="submit" name="action[approve]" value="{L_APPROVE}" />&nbsp;&nbsp;<input class="btnlite" type="submit" name="action[disapprove]" value="{L_DISAPPROVE}" /></td>
+</tr>
+</table>
+{S_FORM_TOKEN}
+</form>
+
+<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
+<tr>
+ <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="gensmall"><a href="#" onclick="marklist('mcp', '', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', '', false); return false;">{L_UNMARK_ALL}</a></b></td>
+</tr>
+</table>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_reports.html b/phpBB/styles/subsilver2/template/mcp_reports.html
new file mode 100644
index 0000000000..1b6a3b82b6
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_reports.html
@@ -0,0 +1,67 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form name="mcp" id="mcp" method="post" action="{S_MCP_ACTION}">
+
+<table width="100%" class="tablebg" cellspacing="1" cellpadding="4" border="0">
+<tr>
+ <th colspan="5" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th>
+</tr>
+<tr>
+ <td colspan="5" class="cat" align="center"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}<!-- IF not S_PM -->&nbsp;<span class="gensmall">{L_FORUM}</span> <select name="f">{S_FORUM_OPTIONS}</select> &nbsp; <!-- IF TOPIC_ID --><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" />&nbsp; <b>{L_ONLY_TOPIC}</b> &nbsp; <!-- ENDIF --><!-- ENDIF --><input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td>
+</tr>
+<tr>
+ <!-- IF S_PM -->
+ <th>&nbsp;{L_PM}&nbsp;</th>
+ <th>&nbsp;{L_TO} &amp; {L_BCC}&nbsp;</th>
+ <!-- ELSE -->
+ <th>&nbsp;{L_POST}&nbsp;</th>
+ <th>&nbsp;{L_AUTHOR}&nbsp;</th>
+ <!-- ENDIF -->
+ <th>&nbsp;{L_REPORTER}&nbsp;</th>
+ <th>&nbsp;{L_REPORT_TIME}&nbsp;</th>
+ <th width="5%">&nbsp;{L_SELECT}&nbsp;</th>
+</tr>
+<!-- BEGIN postrow -->
+
+ <!-- IF postrow.S_ROW_ is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <!-- IF S_PM -->
+ <td style="padding: 4px;"><p class="topictitle"><a href="{postrow.U_VIEW_DETAILS}">{postrow.PM_SUBJECT}</a></p>
+ <span class="gensmall">{L_PM_FROM}: {postrow.PM_AUTHOR_FULL}</span></td>
+ <td style="padding: 4px;" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><span class="gen">{postrow.RECIPIENTS}</span><br />
+ <span class="gensmall">{L_SENT_AT}: {postrow.PM_TIME}</span></td>
+ <!-- ELSE -->
+ <td style="padding: 4px;"><p class="topictitle"><a href="{postrow.U_VIEWPOST}">{postrow.POST_SUBJECT}</a></p>
+ <span class="gensmall"><!-- IF postrow.U_VIEWFORUM -->{L_FORUM}: <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a><!-- ELSE -->{postrow.FORUM_NAME}<!-- ENDIF --></span></td>
+ <td style="padding: 4px;" align="{S_CONTENT_FLOW_BEGIN}" valign="top" nowrap="nowrap"><span class="gen">{postrow.POST_AUTHOR_FULL}</span><br />
+ <span class="gensmall">{postrow.POST_TIME}</span></td>
+ <!-- ENDIF -->
+ <td style="padding: 4px;" align="{S_CONTENT_FLOW_BEGIN}" valign="top" nowrap="nowrap"><span class="gen">{postrow.REPORTER_FULL}</span></td>
+ <td style="padding: 4px;" align="{S_CONTENT_FLOW_BEGIN}" valign="top" nowrap="nowrap"><span class="gen">{postrow.REPORT_TIME}</span><br />
+ <span class="gensmall">[ <a href="{postrow.U_VIEW_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td>
+ <td align="center"><input type="checkbox" class="radio" name="report_id_list[]" value="{postrow.REPORT_ID}" /></td>
+ </tr>
+<!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="5" height="30" align="center" valign="middle"><span class="gen">{L_NO_POSTS}</span></td>
+ </tr>
+<!-- END postrow -->
+<tr>
+ <td class="cat" colspan="5" align="center">
+ <!-- IF S_CLOSED -->
+ <input class="btnmain" type="submit" value="{L_DELETE_REPORTS}" name="action[delete]" />
+ <!-- ELSE -->
+ <input class="btnmain" type="submit" name="action[close]" value="{L_CLOSE_REPORTS}" /> &nbsp; <input class="btnlite" type="submit" value="{L_DELETE_REPORTS}" name="action[delete]" />
+ <!-- ENDIF -->
+ </td>
+</tr>
+</table>
+{S_FORM_TOKEN}
+</form>
+
+<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
+<tr>
+ <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="gensmall"><a href="#" onclick="marklist('mcp', '', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', '', false); return false;">{L_UNMARK_ALL}</a></b></td>
+</tr>
+</table>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_topic.html b/phpBB/styles/subsilver2/template/mcp_topic.html
new file mode 100644
index 0000000000..12c0f73b97
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_topic.html
@@ -0,0 +1,151 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form name="mcp" id="mcp" method="post" action="{S_MCP_ACTION}">
+
+<table class="tablebg" width="100%" cellspacing="1">
+<!-- IF S_CAN_SPLIT -->
+ <tr>
+ <th colspan="3" nowrap="nowrap">{L_SPLIT_TOPIC}</th>
+ </tr>
+ <tr>
+ <td class="row2" colspan="3" align="center"><span class="gensmall">{L_SPLIT_TOPIC_EXPLAIN}</span></td>
+ </tr>
+ <tr>
+ <td class="row1" nowrap="nowrap"><span class="gen">{L_SPLIT_SUBJECT}</span></td>
+ <td class="row2" colspan="2"><input class="post" style="width: 350px" type="text" size="35" maxlength="64" name="subject" value="{SPLIT_SUBJECT}" /></td>
+ </tr>
+ <tr>
+ <td class="row1" nowrap="nowrap"><span class="gen">{L_SPLIT_FORUM}</span></td>
+ <td class="row2" colspan="2"><select name="to_forum_id">{S_FORUM_SELECT}</select></td>
+ </tr>
+
+ <!-- IF S_SHOW_TOPIC_ICONS -->
+ <tr>
+ <td class="row1"><span class="gen">{L_TOPIC_ICON}</span></td>
+ <td class="row2" colspan="2">
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td><span class="genmed nowrap"><input type="radio" class="radio" name="icon" value="0"<!-- IF not S_TOPIC_ICON --> checked="checked"<!-- ENDIF --> />{L_NO_TOPIC_ICON}</span> <!-- BEGIN topic_icon --><span class="nowrap"><input type="radio" class="radio" name="icon" value="{topic_icon.ICON_ID}"<!-- IF topic_icon.S_CHECKED --> checked="checked"<!-- ENDIF --> /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" hspace="2" vspace="2" /></span> <!-- END topic_icon --></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <!-- ENDIF -->
+<!-- ENDIF -->
+
+<!-- IF S_CAN_MERGE -->
+ <tr>
+ <th colspan="3" nowrap="nowrap">{L_MERGE_TOPIC}</th>
+ </tr>
+ <tr>
+ <td class="row2" colspan="3" align="center"><span class="gensmall">{L_MERGE_TOPIC_EXPLAIN}</span></td>
+ </tr>
+ <tr>
+ <td class="row1" nowrap="nowrap"><span class="gen">{L_MERGE_TOPIC_ID}</span></td>
+ <td class="row2" colspan="2"><input class="post" type="text" size="6" name="to_topic_id" value="{TO_TOPIC_ID}" /> <a href="{U_SELECT_TOPIC}">{L_SELECT_TOPIC}</a></td>
+ </tr>
+ <!-- IF TO_TOPIC_INFO -->
+ <tr>
+ <td class="row3" colspan="3" align="center"><b class="gen">{TO_TOPIC_INFO}</b></td>
+ </tr>
+ <!-- ENDIF -->
+<!-- ENDIF -->
+<tr>
+ <th colspan="3" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th>
+</tr>
+<tr>
+ <td class="row1" nowrap="nowrap"><span class="gen">{L_POSTS_PER_PAGE}</span><br /><span class="gensmall">{L_POSTS_PER_PAGE_EXPLAIN}</span></td>
+ <td class="row2" colspan="2"><input class="post" type="text" name="posts_per_page" size="6" value="{POSTS_PER_PAGE}" /></td>
+</tr>
+<tr>
+ <td class="cat" colspan="3" align="center"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td>
+</tr>
+<tr>
+ <th nowrap="nowrap" colspan="3">{L_TOPIC_REVIEW}: {TOPIC_TITLE}</th>
+</tr>
+<tr>
+ <td class="row3" colspan="3" align="center"><span class="gensmall">{RETURN_TOPIC}</span></td>
+</tr>
+<!-- BEGIN postrow -->
+
+ <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td align="center"><b class="postauthor">{postrow.POST_AUTHOR_FULL}</b></td>
+ <td width="100%">
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr valign="top">
+ <td class="gensmall" nowrap="nowrap">&nbsp;<b>{L_POST_SUBJECT}:</b>&nbsp;</td>
+ <td class="gensmall" width="100%">{postrow.POST_SUBJECT}</td>
+ </tr>
+ </table>
+ </td>
+ <td width="5%" align="center"><a href="{postrow.U_POST_DETAILS}">{INFO_IMG}</a></td>
+ </tr>
+
+ <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td width="100%" valign="top" colspan="2">
+ <table width="100%" cellspacing="0" cellpadding="2" border="0">
+ <tr>
+ <td valign="top">
+ <div class="postbody">{postrow.MESSAGE}</div>
+ <!-- IF postrow.S_HAS_ATTACHMENTS -->
+ <br clear="all" /><br />
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
+ </tr>
+ <!-- BEGIN attachment -->
+ <tr>
+ <!-- IF postrow.attachment.S_ROW_COUNT is even --><td class="row2"><!-- ELSE --><td class="row1"><!-- ENDIF -->{postrow.attachment.DISPLAY_ATTACHMENT}</td>
+ </tr>
+ <!-- END attachment -->
+ </table>
+ <!-- ENDIF -->
+
+ </td>
+ </tr>
+ <tr>
+ <td valign="bottom">
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr valign="middle">
+ <td width="100%">
+ <!-- IF postrow.S_POST_UNAPPROVED and postrow.U_MCP_APPROVE --><span class="postapprove">{UNAPPROVED_IMG} <a href="{postrow.U_MCP_APPROVE}">{L_POST_UNAPPROVED}</a></span><br /><!-- ENDIF -->
+ <!-- IF postrow.S_POST_REPORTED and postrow.U_MCP_REPORT --><span class="postreported">{REPORTED_IMG} <a href="{postrow.U_MCP_REPORT}">{L_POST_REPORTED}</a></span><!-- ENDIF -->
+ </td>
+ <td width="10" nowrap="nowrap">{postrow.MINI_POST_IMG}</td>
+ <td class="gensmall" nowrap="nowrap"><b>{L_POSTED}:</b> {postrow.POST_DATE}</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td width="5%" align="center"><input type="checkbox" class="radio" name="post_id_list[]" value="{postrow.POST_ID}"<!-- IF postrow.S_CHECKED --> checked="checked"<!-- ENDIF --> /></td>
+ </tr>
+ <tr>
+ <td class="row3" colspan="3" height="1"><img src="images/spacer.gif" width="1" height="1" alt="" /></td>
+ </tr>
+<!-- END postrow -->
+<tr>
+ <td class="cat" colspan="3" align="center"><select name="action"><option value="" selected="selected">{L_SELECT_ACTION}</option>
+ <!-- IF S_CAN_APPROVE --><option value="approve">{L_APPROVE_POSTS}</option><!-- ENDIF -->
+ <!-- IF S_CAN_LOCK --><option value="lock_post">{L_LOCK_POST_POSTS} [ {L_LOCK_POST_EXPLAIN} ]</option><option value="unlock_post">{L_UNLOCK_POST_POSTS}</option><!-- ENDIF -->
+ <!-- IF S_CAN_DELETE --><option value="delete_post">{L_DELETE_POSTS}</option><!-- ENDIF -->
+ <!-- IF S_CAN_MERGE --><option value="merge_posts"<!-- IF ACTION eq 'merge' --> selected="selected"<!-- ENDIF -->>{L_MERGE_POSTS}</option><!-- ENDIF -->
+ <!-- IF S_CAN_SPLIT --><option value="split_all"<!-- IF ACTION eq 'split' --> selected="selected"<!-- ENDIF -->>{L_SPLIT_POSTS}</option><option value="split_beyond">{L_SPLIT_AFTER}</option><!-- ENDIF -->
+ </select>&nbsp;<input class="btnmain" type="submit" name="mcp_topic_submit" value="{L_SUBMIT}" /></td>
+</tr>
+</table>
+{S_HIDDEN_FIELDS}
+{S_FORM_TOKEN}
+</form>
+
+<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
+<tr>
+ <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="gensmall"><a href="#" onclick="marklist('mcp', '', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', '', false); return false;">{L_UNMARK_ALL}</a></b></td>
+</tr>
+</table>
+
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_viewlogs.html b/phpBB/styles/subsilver2/template/mcp_viewlogs.html
new file mode 100644
index 0000000000..b6431e4d51
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_viewlogs.html
@@ -0,0 +1,52 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form method="post" name="mcp" action="{S_MCP_ACTION}">
+
+<table class="tablebg" width="100%" cellspacing="1" cellpadding="2" border="0">
+<tr>
+ <th colspan="<!-- IF S_TOPIC_ID -->4<!-- ELSE -->5<!-- ENDIF -->" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th>
+</tr>
+<tr>
+ <td colspan="<!-- IF S_TOPIC_ID -->4<!-- ELSE -->5<!-- ENDIF -->" class="cat" align="center"><span class="gensmall">{L_DISPLAY_LOG}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /></span></td>
+</tr>
+<tr>
+ <th width="15%" nowrap="nowrap">{L_USERNAME}</th>
+ <th width="12%" nowrap="nowrap">{L_IP}</th>
+ <th width="18%" nowrap="nowrap">{L_TIME}</th>
+ <th width="45%" nowrap="nowrap">{L_ACTION}</th>
+ <!-- IF not S_TOPIC_ID -->
+ <th width="8%" nowrap="nowrap"></th>
+ <!-- ENDIF -->
+</tr>
+<!-- IF S_TOPIC_ID -->
+ <tr>
+ <td class="row3" colspan="5"><span class="gensmall">{L_LOGS_CURRENT_TOPIC} <a href="{U_VIEW_TOPIC}"><b>{TOPIC_NAME}</b></a></span></td>
+ </tr>
+<!-- ENDIF -->
+<!-- BEGIN log -->
+ <tr>
+ <td class="row1" nowrap="nowrap"><span class="gen">{log.USERNAME}</span></td>
+ <td class="row1" align="center" nowrap="nowrap"><span class="gen">{log.IP}</span></td>
+ <td class="row1" align="center" nowrap="nowrap"><span class="gensmall">{log.TIME}</span></td>
+ <td class="row1"><span class="gen">{log.ACTION}</span></td>
+ <!-- IF not S_TOPIC_ID -->
+ <td class="row1" align="center" nowrap="nowrap"><span class="gensmall"><!-- IF log.U_VIEW_TOPIC --><a href="{log.U_VIEW_TOPIC}">{L_VIEW_TOPIC}</a><!-- IF log.U_VIEWLOGS --> | <!-- ENDIF --><!-- ENDIF --><!-- IF log.U_VIEWLOGS --><a href="{log.U_VIEWLOGS}">{L_VIEW_TOPIC_LOGS}</a><!-- ENDIF --></span></td>
+ <!-- ENDIF -->
+ </tr>
+<!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="<!-- IF S_TOPIC_ID -->4<!-- ELSE -->5<!-- ENDIF -->" align="center"><span class="gen">{L_NO_ENTRIES}</span></td>
+ </tr>
+<!-- END log -->
+</table>
+{S_FORM_TOKEN}
+</form>
+
+<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
+<tr>
+ <td class="nav" align="{S_CONTENT_FLOW_BEGIN}" valign="middle">{PAGE_NUMBER}</td>
+ <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
+</tr>
+</table>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_warn_front.html b/phpBB/styles/subsilver2/template/mcp_warn_front.html
new file mode 100644
index 0000000000..78673b690e
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_warn_front.html
@@ -0,0 +1,74 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form method="post" name="mcp" action="{U_POST_ACTION}">
+
+<table class="tablebg" width="100%" cellspacing="1" border="0" align="center">
+<tr>
+ <th colspan="2"align="center">{L_SELECT_USER}</th>
+</tr>
+<tr>
+ <td class="row1" width="40%"><b class="gen">{L_FIND_USERNAME}: </b><br /><span class="gensmall">[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span></td>
+ <td class="row2"><input type="text" class="post" name="username" size="20" /></td>
+</tr>
+<tr>
+ <td class="cat" colspan="2" align="center"><input type="submit" name="submituser" value="{L_SUBMIT}" class="btnmain" /></td>
+</tr>
+</table>
+{S_FORM_TOKEN}
+</form>
+
+<br clear="all" /><br />
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <td class="row3" colspan="4" align="center"><b class="gen">{L_MOST_WARNINGS}</b></td>
+</tr>
+<tr>
+ <th>&nbsp;{L_USERNAME}&nbsp;</th>
+ <th>&nbsp;{L_WARNINGS}&nbsp;</th>
+ <th>&nbsp;{L_LATEST_WARNING_TIME}&nbsp;</th>
+ <th>&nbsp;</th>
+</tr>
+<!-- BEGIN highest -->
+ <tr>
+ <td class="row1" width="15%" valign="top"><span class="gen">{highest.USERNAME_FULL}</span></td>
+ <td class="row2" width="15%" valign="top"><span class="gen">{highest.WARNINGS}</span></td>
+ <td class="row1" width="15%" valign="top"><span class="gen">{highest.WARNING_TIME}</span></td>
+ <td class="row2" width="15%" valign="top"><span class="gen"><a href="{highest.U_NOTES}">{L_VIEW_NOTES}</a></span></td>
+ </tr>
+<!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="4" align="center"><span class="gen">{L_WARNINGS_ZERO_TOTAL}</span></td>
+ </tr>
+<!-- END highest -->
+</table>
+
+<br clear="all" /><br />
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <td class="row3" colspan="4" align="center"><b class="gen">{L_LATEST_WARNINGS}</b></td>
+</tr>
+<tr>
+ <th>&nbsp;{L_USERNAME}&nbsp;</th>
+ <th>&nbsp;{L_TIME}&nbsp;</th>
+ <th>&nbsp;{L_TOTAL_WARNINGS}&nbsp;</th>
+ <th>&nbsp;</th>
+</tr>
+<!-- BEGIN latest -->
+ <tr>
+ <td class="row1" width="15%" valign="top"><span class="gen">{latest.USERNAME_FULL}</span></td>
+ <td class="row2" width="15%" valign="top"><span class="gen">{latest.WARNING_TIME}</span></td>
+ <td class="row1" width="15%" valign="top"><span class="gen">{latest.WARNINGS}</span></td>
+ <td class="row2" width="15%" valign="top"><span class="gen"><a href="{latest.U_NOTES}">{L_VIEW_NOTES}</a></span></td>
+ </tr>
+<!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="4" align="center"><span class="gen">{L_WARNINGS_ZERO_TOTAL}</span></td>
+ </tr>
+<!-- END latest -->
+</table>
+
+<br clear="all" /><br />
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_warn_list.html b/phpBB/styles/subsilver2/template/mcp_warn_list.html
new file mode 100644
index 0000000000..078bbc0b34
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_warn_list.html
@@ -0,0 +1,43 @@
+<!-- INCLUDE mcp_header.html -->
+
+<form method="post" name="mcp" action="{U_POST_ACTION}">
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <td class="row3" colspan="4" align="center"><b class="gen">{L_WARNED_USERS}</b></td>
+</tr>
+<tr>
+ <th>&nbsp;{L_USERNAME}&nbsp;</th>
+ <th>&nbsp;{L_WARNINGS}&nbsp;</th>
+ <th>&nbsp;{L_LATEST_WARNING_TIME}&nbsp;</th>
+ <th>&nbsp;</th>
+</tr>
+<!-- BEGIN user -->
+ <tr>
+ <td class="row1" width="15%" valign="top"><span class="gen">{user.USERNAME_FULL}</span></td>
+ <td class="row2" width="15%" valign="top"><span class="gen">{user.WARNINGS}</span></td>
+ <td class="row1" width="15%" valign="top"><span class="gen">{user.WARNING_TIME}</span></td>
+ <td class="row2" width="15%" valign="top"><span class="gen"><a href="{user.U_NOTES}">{L_VIEW_NOTES}</a></span></td>
+ </tr>
+<!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="4" align="center"><span class="gen">{L_WARNINGS_ZERO_TOTAL}</span></td>
+ </tr>
+<!-- END user -->
+<tr align="center">
+ <td class="row3" colspan="4"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></td>
+</tr>
+</table>
+
+<table width="100%" cellspacing="0" cellpadding="0">
+<tr>
+ <td class="pagination">{PAGE_NUMBER} [ {TOTAL_USERS} ]</td>
+ <td align="{S_CONTENT_FLOW_END}"><span class="pagination"><!-- INCLUDE pagination.html --></span></td>
+</tr>
+</table>
+{S_FORM_TOKEN}
+</form>
+
+<br clear="all" /><br />
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_warn_post.html b/phpBB/styles/subsilver2/template/mcp_warn_post.html
new file mode 100644
index 0000000000..ef0595e48e
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_warn_post.html
@@ -0,0 +1,62 @@
+<!-- INCLUDE mcp_header.html -->
+
+<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
+<tr>
+ <th colspan="2" align="center">{L_POST}</th>
+</tr>
+<tr>
+ <td class="row1" align="center">
+ <table cellspacing="1" cellpadding="2" border="0">
+ <tr>
+ <td class="gen" align="center"><!-- IF USER_COLOR --><b style="color: #{USER_COLOR}"><!-- ELSE --><b><!-- ENDIF -->{USERNAME}</b></td>
+ </tr>
+ <!-- IF RANK_TITLE -->
+ <tr>
+ <td class="postdetails" align="center">{RANK_TITLE}</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF RANK_IMG -->
+ <tr>
+ <td align="center">{RANK_IMG}</td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td align="center"><!-- IF AVATAR_IMG -->{AVATAR_IMG}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF --></td>
+ </tr>
+ </table>
+ </td>
+ <td class="row1">
+ <span class="gen">{POST}</span>
+ </td>
+</tr>
+</table>
+
+<br clear="all" /><br />
+
+<form method="post" name="mcp" action="{U_POST_ACTION}">
+
+<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
+<tr>
+ <th align="center">{L_ADD_WARNING}</th>
+</tr>
+<tr>
+ <td class="row3" align="center"><span class="genmed">{L_ADD_WARNING_EXPLAIN}</span></td>
+</tr>
+<tr>
+ <td class="row1" align="center"><textarea name="warning" rows="10" cols="76">{L_WARNING_POST_DEFAULT}</textarea></td>
+</tr>
+<!-- IF S_CAN_NOTIFY -->
+<tr>
+ <td class="row1" align="center"><input type="checkbox" class="radio" name="notify_user" checked="checked" /><span class="genmed">{L_NOTIFY_USER_WARN}</span></td>
+</tr>
+<!-- ENDIF -->
+<tr>
+ <td class="cat" align="center"><input class="btnmain" type="submit" name="action[add_warning]" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" /></td>
+</tr>
+</table>
+{S_FORM_TOKEN}
+</form>
+
+<br clear="all" /><br />
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_warn_user.html b/phpBB/styles/subsilver2/template/mcp_warn_user.html
new file mode 100644
index 0000000000..4bf6cabad3
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_warn_user.html
@@ -0,0 +1,75 @@
+<!-- INCLUDE mcp_header.html -->
+
+<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
+<tr>
+ <th colspan="2" align="center">{USERNAME}</th>
+</tr>
+<tr>
+ <td class="row1" align="center">
+ <table cellspacing="1" cellpadding="2" border="0">
+ <tr>
+ <td class="gen" align="center"><b>{USERNAME_FULL}</b></td>
+ </tr>
+ <!-- IF RANK_TITLE -->
+ <tr>
+ <td class="postdetails" align="center">{RANK_TITLE}</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF RANK_IMG -->
+ <tr>
+ <td align="center">{RANK_IMG}</td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td align="center"><!-- IF AVATAR_IMG -->{AVATAR_IMG}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF --></td>
+ </tr>
+ </table>
+ </td>
+ <td class="row1">
+ <table width="100%" cellspacing="1" cellpadding="2" border="0">
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_JOINED}: </td>
+ <td width="100%"><b class="gen">{JOINED}</b></td>
+ </tr>
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_TOTAL_POSTS}: </td>
+ <td><b class="gen">{POSTS}</b></td>
+ </tr>
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_WARNINGS}: </td>
+ <td><b class="gen">{WARNINGS}</b></td>
+ </tr>
+ </table>
+ </td>
+</tr>
+</table>
+
+<br clear="all" /><br />
+
+<form method="post" name="mcp" action="{U_POST_ACTION}">
+
+<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
+<tr>
+ <th align="center">{L_ADD_WARNING}</th>
+</tr>
+<tr>
+ <td class="row3" align="center"><span class="genmed">{L_ADD_WARNING_EXPLAIN}</span></td>
+</tr>
+<tr>
+ <td class="row1" align="center"><textarea name="warning" rows="10" cols="76"></textarea></td>
+</tr>
+<!-- IF S_CAN_NOTIFY -->
+<tr>
+ <td class="row1" align="center"><input type="checkbox" class="radio" name="notify_user" checked="checked" /><span class="genmed">{L_NOTIFY_USER_WARN}</span></td>
+</tr>
+<!-- ENDIF -->
+<tr>
+ <td class="cat" align="center"><input class="btnmain" type="submit" name="action[add_warning]" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" /></td>
+</tr>
+</table>
+{S_FORM_TOKEN}
+</form>
+
+<br clear="all" /><br />
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_whois.html b/phpBB/styles/subsilver2/template/mcp_whois.html
new file mode 100644
index 0000000000..54b93eec69
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/mcp_whois.html
@@ -0,0 +1,15 @@
+<!-- INCLUDE mcp_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th>{L_WHOIS}</th>
+</tr>
+<tr>
+ <td class="row3" align="center"><span class="gensmall">{RETURN_POST}</span></td>
+</tr>
+<tr>
+ <td class="row1"><pre>{WHOIS}</pre></td>
+</tr>
+</table>
+
+<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/memberlist_body.html b/phpBB/styles/subsilver2/template/memberlist_body.html
new file mode 100644
index 0000000000..cb7a7b20c7
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/memberlist_body.html
@@ -0,0 +1,116 @@
+<!-- IF S_IN_SEARCH_POPUP -->
+ <!-- INCLUDE simple_header.html -->
+<!-- ELSE -->
+ <!-- INCLUDE overall_header.html -->
+<!-- ENDIF -->
+
+<!-- IF S_SEARCH_USER -->
+ <!-- INCLUDE memberlist_search.html -->
+<!-- ENDIF -->
+
+<!-- IF S_SHOW_GROUP --><!-- INCLUDE memberlist_group.html --><!-- ENDIF -->
+
+<!-- IF not S_SHOW_GROUP -->
+ <form method="post" name="charsearch" action="{S_MODE_ACTION}">
+ <table width="100%" cellspacing="1">
+ <tr>
+ <td align="{S_CONTENT_FLOW_BEGIN}"><span class="genmed">{L_USERNAME_BEGINS_WITH}: </span><select name="first_char" onchange="this.form.submit();">{S_CHAR_OPTIONS}</select>&nbsp;<input type="submit" name="char" value="{L_DISPLAY}" class="btnlite" /></td>
+ <!-- IF U_FIND_MEMBER and not S_SEARCH_USER -->
+ <td class="genmed" align="{S_CONTENT_FLOW_END}"><a href="{U_FIND_MEMBER}">{L_FIND_USERNAME}</a></td>
+ <!-- ELSEIF S_SEARCH_USER and U_HIDE_FIND_MEMBER and not S_IN_SEARCH_POPUP -->
+ <td class="genmed" align="{S_CONTENT_FLOW_END}"><a href="{U_HIDE_FIND_MEMBER}">{L_HIDE_MEMBER_SEARCH}</a></td>
+ <!-- ENDIF -->
+ </tr>
+ </table>
+ {S_FORM_TOKEN}
+ </form>
+<!-- ENDIF -->
+
+<!-- IF S_IN_SEARCH_POPUP -->
+ <form method="post" name="results" action="{S_MODE_ACTION}" onsubmit="insert_marked(this.user);return false">
+<!-- ELSE -->
+ <form method="post" action="{S_MODE_ACTION}">
+<!-- ENDIF -->
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th nowrap="nowrap">#</th>
+ <th nowrap="nowrap" width="25%" align="{S_CONTENT_FLOW_BEGIN}"><a href="{U_SORT_USERNAME}">{L_USERNAME}</a></th>
+ <th nowrap="nowrap" width="15%"><a href="{U_SORT_JOINED}">{L_JOINED}</a></th>
+ <th nowrap="nowrap" width="10%"><a href="{U_SORT_POSTS}">{L_POSTS}</a></th>
+ <th nowrap="nowrap" width="15%"><a href="{U_SORT_RANK}">{L_RANK}</a></th>
+ <th nowrap="nowrap" width="11%">{L_SEND_MESSAGE}</th>
+ <th nowrap="nowrap" width="11%"><a href="{U_SORT_EMAIL}">{L_EMAIL}</a></th>
+ <th nowrap="nowrap" width="11%"><a href="{U_SORT_WEBSITE}">{L_WEBSITE}</a></th>
+ <!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><th width="2%" nowrap="nowrap">{L_MARK}</th><!-- ENDIF -->
+</tr>
+<!-- BEGIN memberrow -->
+
+ <!-- IF S_SHOW_GROUP -->
+ <!-- IF memberrow.S_FIRST_ROW and memberrow.S_GROUP_LEADER -->
+ <tr class="row3">
+ <td colspan="8"><b class="gensmall">{L_GROUP_LEADER}</b></td>
+ </tr>
+ <!-- ELSEIF not memberrow.S_GROUP_LEADER and not $S_MEMBER_HEADER -->
+ <tr class="row3">
+ <td colspan="8"><b class="gensmall">{L_GROUP_MEMBERS}</b></td>
+ </tr>
+ <!-- DEFINE $S_MEMBER_HEADER = 1 -->
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+
+ <!-- IF memberrow.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --> <tr class="row1"><!-- ENDIF -->
+
+ <td class="gen" align="center">&nbsp;{memberrow.ROW_NUMBER}&nbsp;</td>
+ <td class="genmed" align="{S_CONTENT_FLOW_BEGIN}">{memberrow.USERNAME_FULL}<!-- IF S_SELECT_SINGLE --> [&nbsp;<a href="#" onclick="insert_single('{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a>&nbsp;]<!-- ENDIF --></td>
+ <td class="genmed" align="center" nowrap="nowrap">&nbsp;{memberrow.JOINED}&nbsp;</td>
+ <td class="gen" align="center">{memberrow.POSTS}</td>
+ <td class="gen" align="center"><!-- IF memberrow.RANK_IMG -->{memberrow.RANK_IMG}<!-- ELSE -->{memberrow.RANK_TITLE}<!-- ENDIF --></td>
+ <td class="gen" align="center">&nbsp;<!-- IF memberrow.U_PM --><a href="{memberrow.U_PM}">{PM_IMG}</a><!-- ENDIF -->&nbsp;</td>
+ <td class="gen" align="center">&nbsp;<!-- IF memberrow.U_EMAIL --><a href="{memberrow.U_EMAIL}">{EMAIL_IMG}</a><!-- ENDIF -->&nbsp;</td>
+ <td class="gen" align="center">&nbsp;<!-- IF memberrow.U_WWW --><a href="{memberrow.U_WWW}">{WWW_IMG}</a><!-- ENDIF -->&nbsp;</td>
+ <!-- IF memberrow.S_PROFILE_FIELD1 -->
+ <!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
+ <td class="gen" align="center">&nbsp;{memberrow.PROFILE_FIELD1_VALUE}</td>
+ <!-- ENDIF -->
+ <!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><td align="center"><input type="checkbox" class="radio" name="user" value="{memberrow.USERNAME}" /></td><!-- ENDIF -->
+ </tr>
+
+<!-- BEGINELSE -->
+
+ <tr>
+ <td class="row1" colspan="<!-- IF S_IN_SEARCH_POPUP -->9<!-- ELSE -->8<!-- ENDIF -->" align="center">
+ <span class="gen"><!-- IF S_SHOW_GROUP -->{L_NO_GROUP_MEMBERS}<!-- ELSE -->{L_NO_MEMBERS}<!-- ENDIF --></span>
+ </td>
+ </tr>
+
+<!-- END memberrow -->
+
+<tr>
+ <td class="cat" colspan="<!-- IF S_IN_SEARCH_POPUP -->9<!-- ELSE -->8<!-- ENDIF -->" align="center"><!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><input class="btnlite" type="submit" value="{L_SELECT_MARKED}" /><!-- ELSE --><span class="gensmall">{L_SELECT_SORT_METHOD}:</span>&nbsp;<select name="sk">{S_MODE_SELECT}</select>&nbsp; <span class="gensmall">{L_ORDER}</span>&nbsp;<select name="sd">{S_ORDER_SELECT}</select>&nbsp; <input type="submit" name="submit" value="{L_SUBMIT}" class="btnlite" /><!-- ENDIF --></td>
+</tr>
+</table>
+{S_FORM_TOKEN}
+
+</form>
+
+<table width="100%" cellspacing="0" cellpadding="0">
+<tr>
+ <td class="pagination">{PAGE_NUMBER} [ {TOTAL_USERS} ]</td>
+ <td align="{S_CONTENT_FLOW_END}"><!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><b class="nav"><a href="#" onclick="marklist('results', 'user', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('results', 'user', false); return false;">{L_UNMARK_ALL}</a></b><br /><!-- ENDIF --><span class="pagination"><!-- INCLUDE pagination.html --></span></td>
+</tr>
+</table>
+
+
+
+<!-- IF S_IN_SEARCH_POPUP -->
+ <!-- INCLUDE simple_footer.html -->
+<!-- ELSE -->
+ <br clear="all" />
+
+ <!-- INCLUDE breadcrumbs.html -->
+
+ <br clear="all" />
+
+ <div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
+ <!-- INCLUDE overall_footer.html -->
+<!-- ENDIF --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/memberlist_email.html b/phpBB/styles/subsilver2/template/memberlist_email.html
new file mode 100644
index 0000000000..976ac1ad89
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/memberlist_email.html
@@ -0,0 +1,73 @@
+<!-- INCLUDE overall_header.html -->
+
+<div id="pagecontent">
+
+ <form action="{S_POST_ACTION}" method="post" name="postform">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th colspan="2">{L_SEND_EMAIL_USER} {USERNAME}</th>
+ </tr>
+ <!-- IF ERROR_MESSAGE -->
+ <tr>
+ <td class="row3" colspan="2" align="center"><span class="error">{ERROR_MESSAGE}</span></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF S_SEND_USER -->
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_RECIPIENT}</b></td>
+ <td class="row2" width="65%"><b class="genmed">{USERNAME}</b></td>
+ </tr>
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_SUBJECT}</b></td>
+ <td class="row2"><input class="post" type="text" name="subject" size="50" tabindex="2" value="{SUBJECT}" /></td>
+ </tr>
+ <!-- ELSE -->
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_EMAIL_ADDRESS}</b></td>
+ <td class="row2"><input class="post" type="text" name="email" size="50" maxlength="100" value="{EMAIL}" /></td>
+ </tr>
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_REAL_NAME}</b></td>
+ <td class="row2"><input class="post" type="text" name="name" size="50" value="{NAME}" /></td>
+ </tr>
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_DEST_LANG}</b><br /><span class="gensmall">{L_DEST_LANG_EXPLAIN}</span></td>
+ <td class="row2"><select name="lang">{S_LANG_OPTIONS}</select></td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td class="row1" valign="top"><b class="genmed">{L_MESSAGE_BODY}</b><br /><span class="gensmall">{L_EMAIL_BODY_EXPLAIN}</span></td>
+ <td class="row2"><textarea class="post" name="message" rows="15" cols="76" tabindex="3">{MESSAGE}</textarea></td>
+ </tr>
+ <tr>
+ <td class="row1" valign="top"><span class="gen"><b>{L_OPTIONS}</b></span></td>
+ <td class="row2">
+ <table cellspacing="0" cellpadding="1" border="0">
+ <tr>
+ <td><input type="checkbox" class="radio" name="cc_email" value="1" checked="checked" /></td>
+ <td class="gen">{L_CC_EMAIL}</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="cat" colspan="2" align="center"><input type="submit" tabindex="6" name="submit" class="btnmain" value="{L_SEND_EMAIL}" /></td>
+ </tr>
+ </table>
+
+ {S_FORM_TOKEN}
+
+ </form>
+
+</div>
+
+<br clear="all" />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<br clear="all" />
+
+<div style="float: {S_CONTENT_FLOW_END};"><!-- INCLUDE jumpbox.html --></div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/memberlist_group.html b/phpBB/styles/subsilver2/template/memberlist_group.html
new file mode 100644
index 0000000000..650868f810
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/memberlist_group.html
@@ -0,0 +1,17 @@
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="3">{L_GROUP_INFORMATION}</th>
+</tr>
+<tr>
+ <td class="row1" width="20%"><b class="genmed">{L_GROUP_NAME}:</b></td>
+ <td class="row2"><b class="gen"<!-- IF GROUP_COLOR --> style="color:#{GROUP_COLOR}"<!-- ENDIF -->>{GROUP_NAME}</b></td>
+<!-- IF AVATAR_IMG or RANK_IMG or GROUP_RANK or U_PM -->
+ <td class="row1" width="33%" rowspan="2" align="center"><!-- IF AVATAR_IMG -->{AVATAR_IMG}<br /><!-- ENDIF --><!-- IF RANK_IMG -->{RANK_IMG}<!-- ENDIF --><!-- IF GROUP_RANK --><span class="gensmall">{GROUP_RANK}</span><br /><br /><!-- ENDIF --><!-- IF U_PM --><a href="{U_PM}">{PM_IMG}</a><!-- ENDIF --></td>
+<!-- ENDIF -->
+</tr>
+<tr>
+ <td class="row1" width="20%"><b class="genmed">{L_GROUP_DESC}:</b></td>
+ <td class="row2"><span class="gen">{GROUP_DESC}</span><p class="forumdesc">{GROUP_TYPE}</p></td>
+</tr>
+</table>
diff --git a/phpBB/styles/subsilver2/template/memberlist_im.html b/phpBB/styles/subsilver2/template/memberlist_im.html
new file mode 100644
index 0000000000..e8d86128c7
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/memberlist_im.html
@@ -0,0 +1,139 @@
+<!-- INCLUDE simple_header.html -->
+
+<br clear="all" />
+
+<!-- MSNM info from http://www.cdolive.net/ - doesn't seem to work with MSN Messenger -->
+
+<form method="post" action="{S_IM_ACTION}">
+ <table class="tablebg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
+ <tr>
+ <th colspan="2">{L_SEND_IM}</th>
+ </tr>
+ <tr>
+ <td class="row3" colspan="2"><span class="gensmall">{L_SEND_IM_EXPLAIN}</span></td>
+ </tr>
+ <tr>
+ <td class="row1"><b class="genmed">{L_IM_RECIPIENT}: </b></td>
+ <td class="row2"><span class="gen"><b>{USERNAME}</b><!-- IF S_SEND_ICQ or S_SEND_AIM or S_SEND_MSNM or S_NO_SEND_JABBER --> [ {IM_CONTACT} ]<!-- ENDIF --></span> <!-- IF PRESENCE_IMG -->{PRESENCE_IMG}<!-- ENDIF --></td>
+ </tr>
+
+ <!-- IF S_SEND_AIM -->
+ <tr>
+ <td class="row1" colspan="2" align="center"><br /><a class="gen" href="{U_AIM_CONTACT}">{L_IM_ADD_CONTACT}</a><br /><a class="gen" href="{U_AIM_MESSAGE}">{L_IM_SEND_MESSAGE}</a><br /><br /><a class="gensmall" href="http://www.aim.com/download.adp">{L_IM_DOWNLOAD_APP}</a> | <a class="gensmall" href="http://aimexpress.oscar.aol.com/aimexpress/launch.adp?Brand=AIM">{L_IM_AIM_EXPRESS}</a> </td>
+ </tr>
+ <tr>
+ <td class="cat" colspan="2" align="center">&nbsp;</td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF S_SEND_MSNM -->
+ <tr>
+ <td class="row1" colspan="2" align="center">
+ <object classid="clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28" codetype="application/x-oleobject" id="objMessengerApp" width="0" height="0"></object>
+ <script type="text/javascript">
+ // <![CDATA[
+ var app = document.getElementById('objMessengerApp');
+
+ /**
+ * Check whether the browser supports this and whether MSNM is connected
+ */
+ function msn_supported()
+ {
+ // Does the browser support the MSNM object?
+ if (app.MyStatus)
+ {
+ // Is MSNM connected?
+ if (app.MyStatus == 1)
+ {
+ alert('{LA_IM_MSNM_CONNECT}');
+ return false;
+ }
+ }
+ else
+ {
+ alert('{LA_IM_MSNM_BROWSER}');
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Add to your contact list
+ */
+ function add_contact(address)
+ {
+ if (msn_supported())
+ {
+ // Could return an error while MSNM is connecting, don't want that
+ try
+ {
+ app.AddContact(0, address);
+ }
+ catch (e)
+ {
+ return;
+ }
+ }
+ }
+
+ /**
+ * Write IM to contact
+ */
+ function im_contact(address)
+ {
+ if (msn_supported())
+ {
+ // Could return an error while MSNM is connecting, don't want that
+ try
+ {
+ app.InstantMessage(address);
+ }
+ catch (e)
+ {
+ return;
+ }
+ }
+ }
+ // ]]>
+ </script>
+
+ <a class="gen" href="#" onclick="add_contact('{A_IM_CONTACT}'); return false;">{L_IM_ADD_CONTACT}</a><br /><a class="gen" href="#" onclick="im_contact('{A_IM_CONTACT}'); return false;">{L_IM_SEND_MESSAGE}</a>
+ </td>
+ </tr>
+ <tr>
+ <td class="cat" colspan="2" align="center">&nbsp;</td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF S_SEND_JABBER -->
+ <tr>
+ <td class="row1"><b class="genmed">{L_IM_MESSAGE}: </b></td>
+ <td class="row2"><textarea class="post" name="message" rows="5" cols="45"></textarea></td>
+ </tr>
+ <tr>
+ <td class="cat" colspan="2" align="center"><input class="btnmain" name="submit" type="submit" value="{L_IM_SEND}" /></td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF S_NO_SEND_JABBER -->
+ <tr>
+ <td class="row1" colspan="2"><span class="genmed">{L_IM_NO_JABBER}</span></td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF S_SENT_JABBER -->
+ <tr>
+ <td class="row1" colspan="2" align="center"><span class="gen">{L_IM_SENT_JABBER}</span></td>
+ </tr>
+ <tr>
+ <td class="cat" colspan="2" align="center"></td>
+ </tr>
+ <!-- ENDIF -->
+
+ </table>
+{S_FORM_TOKEN}
+</form>
+
+<a class="nav" href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>
+
+<!-- INCLUDE simple_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/memberlist_leaders.html b/phpBB/styles/subsilver2/template/memberlist_leaders.html
new file mode 100644
index 0000000000..ba6dbde617
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/memberlist_leaders.html
@@ -0,0 +1,71 @@
+<!-- INCLUDE overall_header.html -->
+
+<form method="post" action="{S_MODE_ACTION}">
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th nowrap="nowrap" width="20%">{L_USERNAME}</th>
+ <th nowrap="nowrap" width="25%">{L_FORUMS}</th>
+ <th nowrap="nowrap" width="20%">{L_PRIMARY_GROUP}</th>
+ <th nowrap="nowrap" width="15%">{L_RANK}</th>
+ <th nowrap="nowrap" width="11%">{L_SEND_MESSAGE}</th>
+</tr>
+<tr class="row3">
+ <td colspan="5"><b class="gensmall">{L_ADMINISTRATORS}</b></td>
+</tr>
+<!-- BEGIN admin -->
+ <!-- IF admin.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --><tr class="row1"><!-- ENDIF -->
+
+ <td class="gen" align="center"><strong>{admin.USERNAME_FULL}</strong></td>
+ <td class="gensmall" align="center">&nbsp;</td>
+ <td class="gensmall" align="center" nowrap="nowrap">&nbsp;
+ <!-- IF admin.U_GROUP -->
+ <a<!-- IF admin.GROUP_COLOR --> style="font-weight: bold; color:#{admin.GROUP_COLOR}"<!-- ENDIF --> href="{admin.U_GROUP}">{admin.GROUP_NAME}</a>
+ <!-- ELSE -->
+ {admin.GROUP_NAME}
+ <!-- ENDIF -->
+ &nbsp;</td>
+ <td class="gen" align="center"><!-- IF admin.RANK_IMG -->{admin.RANK_IMG}<!-- ELSE -->{admin.RANK_TITLE}<!-- ENDIF --></td>
+ <td class="gen" align="center">&nbsp;<!-- IF admin.U_PM --><a href="{admin.U_PM}">{PM_IMG}</a><!-- ENDIF -->&nbsp;</td>
+</tr>
+<!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="5" align="center"><span class="gen">{L_NO_ADMINISTRATORS}</span></td>
+ </tr>
+<!-- END admin -->
+<tr class="row3">
+ <td colspan="5"><b class="gensmall">{L_MODERATORS}</b></td>
+</tr>
+<!-- BEGIN mod -->
+ <!-- IF mod.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --><tr class="row1"><!-- ENDIF -->
+
+ <td class="gen" align="center"><strong>{mod.USERNAME_FULL}</strong></td>
+ <td align="center"><!-- IF not mod.FORUMS -->{L_ALL_FORUMS}<!-- ELSE --><select style="width: 200px;">{mod.FORUMS}</select><!-- ENDIF -->&nbsp;</td>
+ <td class="gensmall" align="center" nowrap="nowrap">&nbsp;
+ <!-- IF mod.U_GROUP -->
+ <a<!-- IF mod.GROUP_COLOR --> style="font-weight: bold; color:#{mod.GROUP_COLOR}"<!-- ENDIF --> href="{mod.U_GROUP}">{mod.GROUP_NAME}</a>
+ <!-- ELSE -->
+ {mod.GROUP_NAME}
+ <!-- ENDIF -->
+ &nbsp;</td>
+ <td class="gen" align="center"><!-- IF mod.RANK_IMG -->{mod.RANK_IMG}<!-- ELSE -->{mod.RANK_TITLE}<!-- ENDIF --></td>
+ <td class="gen" align="center">&nbsp;<!-- IF mod.U_PM --><a href="{mod.U_PM}">{PM_IMG}</a><!-- ENDIF -->&nbsp;</td>
+</tr>
+<!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="5" align="center"><span class="gen">{L_NO_MODERATORS}</span></td>
+ </tr>
+<!-- END mod -->
+</table>
+
+</form>
+
+<br clear="all" />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<br clear="all" />
+
+<div style="float: {S_CONTENT_FLOW_END};"><!-- INCLUDE jumpbox.html --></div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/memberlist_search.html b/phpBB/styles/subsilver2/template/memberlist_search.html
new file mode 100644
index 0000000000..96ffad00d6
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/memberlist_search.html
@@ -0,0 +1,143 @@
+<!-- You should retain this javascript in your own template! -->
+
+<!-- IF S_IN_SEARCH_POPUP -->
+ <script type="text/javascript">
+ // <![CDATA[
+ function insert_user(user)
+ {
+ opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value = ( opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value.length && opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.type == "textarea" ) ? opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value + "\n" + user : user;
+ }
+
+ function insert_marked(users)
+ {
+ if (typeof(users.length) == "undefined")
+ {
+ if (users.checked)
+ {
+ insert_user(users.value);
+ }
+ }
+ else if (users.length > 0)
+ {
+ for (i = 0; i < users.length; i++)
+ {
+ if (users[i].checked)
+ {
+ insert_user(users[i].value);
+ }
+ }
+ }
+
+ self.close();
+ }
+
+ function insert_single(user)
+ {
+ opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value = user;
+ self.close();
+ }
+
+ /**
+ * Mark/unmark checklist
+ * id = ID of parent container, name = name prefix, state = state [true/false]
+ */
+ function marklist(id, name, state)
+ {
+ var parent = document.getElementById(id);
+ if (!parent)
+ {
+ eval('parent = document.' + id);
+ }
+
+ if (!parent)
+ {
+ return;
+ }
+
+ var rb = parent.getElementsByTagName('input');
+
+ for (var r = 0; r < rb.length; r++)
+ {
+ if (rb[r].name.substr(0, name.length) == name)
+ {
+ rb[r].checked = state;
+ }
+ }
+ }
+ // ]]>
+ </script>
+<!-- ENDIF -->
+
+<form method="post" action="{S_MODE_ACTION}" name="search">
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="4">{L_FIND_USERNAME}</th>
+</tr>
+<tr>
+ <td class="row3" colspan="4"><span class="gensmall">{L_FIND_USERNAME_EXPLAIN}</span></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_USERNAME}:</b></td>
+ <td class="row2"><input class="post" type="text" name="username" value="{USERNAME}" /></td>
+ <td class="row1"><b class="genmed">{L_ICQ}:</b></td>
+ <td class="row2"><input class="post" type="text" name="icq" value="{ICQ}" /></td>
+</tr>
+<tr>
+<!-- IF S_EMAIL_SEARCH_ALLOWED -->
+ <td class="row1"><b class="genmed">{L_EMAIL}:</b></td>
+ <td class="row2"><input class="post" type="text" name="email" value="{EMAIL}" /></td>
+<!-- ELSE -->
+ <td colspan="2" class="row1">&nbsp;</td>
+<!-- ENDIF -->
+ <td class="row1"><b class="genmed">{L_AIM}:</b></td>
+ <td class="row2"><input class="post" type="text" name="aim" value="{AIM}" /></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_JOINED}:</b></td>
+ <td class="row2"><select name="joined_select">{S_JOINED_TIME_OPTIONS}</select> <input class="post" type="text" name="joined" value="{JOINED}" /></td>
+ <td class="row1"><b class="genmed">{L_YIM}:</b></td>
+ <td class="row2"><input class="post" type="text" name="yahoo" value="{YAHOO}" /></td>
+</tr>
+<tr>
+<!-- IF S_VIEWONLINE -->
+ <td class="row1"><b class="genmed">{L_LAST_ACTIVE}:</b></td>
+ <td class="row2"><select name="active_select">{S_ACTIVE_TIME_OPTIONS}</select> <input class="post" type="text" name="active" value="{ACTIVE}" /></td>
+<!-- ELSE -->
+ <td colspan="2" class="row1">&nbsp;</td>
+<!-- ENDIF -->
+ <td class="row1"><b class="genmed">{L_MSNM}:</b></td>
+ <td class="row2"><input class="post" type="text" name="msn" value="{MSNM}" /></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_POSTS}:</b></td>
+ <td class="row2"><select name="count_select">{S_COUNT_OPTIONS}</select> <input class="post" type="text" name="count" value="{COUNT}" /></td>
+ <td class="row1"><b class="genmed">{L_JABBER}:</b></td>
+ <td class="row2"><input class="post" type="text" name="jabber" value="{JABBER}" /></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_SORT_BY}:</b></td>
+ <td class="row2" nowrap="nowrap"><select name="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select>&nbsp;</td>
+<!-- IF S_IP_SEARCH_ALLOWED -->
+ <td class="row1"><b class="genmed">{L_POST_IP}:</b></td>
+ <td class="row2"><input class="post" type="text" name="ip" value="{IP}" /></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_GROUP}:</b></td>
+ <td class="row2" nowrap="nowrap"><select name="search_group_id">{S_GROUP_SELECT}</select></td>
+ <td class="row1">&nbsp;</td>
+ <td class="row2">&nbsp;</td>
+</tr>
+<!-- ELSE -->
+ <td class="row1"><b class="genmed">{L_GROUP}:</b></td>
+ <td class="row2" nowrap="nowrap"><select name="search_group_id">{S_GROUP_SELECT}</select></td>
+</tr>
+<!-- ENDIF -->
+<tr>
+ <td class="cat" colspan="4" align="center"><input class="btnmain" type="submit" name="submit" value="{L_SEARCH}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" /></td>
+</tr>
+</table>
+{S_FORM_TOKEN}
+</form>
+
+<br clear="all" />
diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html
new file mode 100644
index 0000000000..9ef2b85878
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/memberlist_view.html
@@ -0,0 +1,207 @@
+<!-- INCLUDE overall_header.html -->
+
+<div id="pagecontent">
+
+ <form method="post" action="{S_PROFILE_ACTION}">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th colspan="2" nowrap="nowrap">{L_VIEWING_PROFILE}</th>
+ </tr>
+ <tr>
+ <td class="cat" width="40%" align="center"><h4>{L_USER_PRESENCE}</h4></td>
+ <td class="cat" width="60%" align="center"><h4>{L_USER_FORUM}</h4></td>
+ </tr>
+ <tr>
+ <td class="row1" align="center">
+
+ <table cellspacing="1" cellpadding="2" border="0">
+ <!-- IF S_USER_INACTIVE -->
+ <tr>
+ <td align="center" style="color: red;"><b class="gen">{L_USER_IS_INACTIVE}</b><br />{L_INACTIVE_REASON}: {USER_INACTIVE_REASON}<br /><br /></td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td align="center"><!-- IF USER_COLOR --><b class="gen" style="color: {USER_COLOR}"><!-- ELSE --><b class="gen"><!-- ENDIF -->{USERNAME}</b><!-- IF U_USER_BAN --><span class="genmed"> [ <a href="{U_USER_BAN}">{L_USER_BAN}</a> ]</span><!-- ENDIF --><!-- IF U_USER_ADMIN --><span class="genmed"> [ <a href="{U_USER_ADMIN}">{L_USER_ADMIN}</a> ]</span><!-- ENDIF --></td>
+ </tr>
+ <!-- IF RANK_TITLE -->
+ <tr>
+ <td class="postdetails" align="center">{RANK_TITLE}</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF RANK_IMG -->
+ <tr>
+ <td align="center">{RANK_IMG}</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF AVATAR_IMG -->
+ <tr>
+ <td align="center">{AVATAR_IMG}</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF ONLINE_IMG -->
+ <tr>
+ <td align="center">{ONLINE_IMG}</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF U_SWITCH_PERMISSIONS -->
+ <tr>
+ <td class="genmed" align="center">[ <a href="{U_SWITCH_PERMISSIONS}">{L_USE_PERMISSIONS}</a> ]</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF S_USER_LOGGED_IN and S_ZEBRA -->
+ <tr>
+ <td class="genmed" align="center">[
+ <!-- IF U_REMOVE_FRIEND -->
+ <a href="{U_REMOVE_FRIEND}">{L_REMOVE_FRIEND}</a>
+ <!-- ELSEIF U_REMOVE_FOE -->
+ <a href="{U_REMOVE_FOE}">{L_REMOVE_FOE}</a>
+ <!-- ELSE -->
+ <!-- IF U_ADD_FRIEND --><a href="{U_ADD_FRIEND}">{L_ADD_FRIEND}</a><!-- ENDIF --><!-- IF U_ADD_FOE --><!-- IF U_ADD_FRIEND --> | <!-- ENDIF --><a href="{U_ADD_FOE}">{L_ADD_FOE}</a><!-- ENDIF -->
+ <!-- ENDIF -->
+ ]</td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+ </td>
+ <td class="row1">
+ <table width="100%" cellspacing="1" cellpadding="2" border="0">
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_JOINED}: </td>
+ <td width="100%"><b class="gen">{JOINED}</b></td>
+ </tr>
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_VISITED}: </td>
+ <td width="100%"><b class="gen">{VISITED}</b></td>
+ </tr>
+ <!-- IF S_WARNINGS -->
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_WARNINGS}: </td>
+ <td width="100%"><b class="gen">{WARNINGS}</b><!-- IF U_NOTES or U_WARN --><br /><span class="genmed"> [ <!-- IF U_NOTES --><a href="{U_NOTES}">{L_VIEW_NOTES}</a><!-- ENDIF --> <!-- IF U_WARN --><!-- IF U_NOTES --> | <!-- ENDIF --><a href="{U_WARN}">{L_WARN_USER}</a><!-- ENDIF --> ]</span><!-- ENDIF --></td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_TOTAL_POSTS}: </td>
+ <td><b class="gen">{POSTS}</b><span class="genmed"><!-- IF POSTS_PCT --><br />[{POSTS_PCT} / {POSTS_DAY}]<!-- ENDIF -->
+ <!-- IF POSTS_IN_QUEUE and U_MCP_QUEUE --><br />[<a href="{U_MCP_QUEUE}">{L_POSTS_IN_QUEUE}</a>]<!-- ELSEIF POSTS_IN_QUEUE --><br />[{L_POSTS_IN_QUEUE}]<!-- ENDIF -->
+ <!-- IF S_DISPLAY_SEARCH --><br /><a href="{U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a><!-- ENDIF --></span></td>
+ </tr>
+ <!-- IF S_SHOW_ACTIVITY -->
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_ACTIVE_IN_FORUM}: </td>
+ <td><!-- IF ACTIVE_FORUM --><b><a class="gen" href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></b><br /><span class="genmed">[ {ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
+ </tr>
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_ACTIVE_IN_TOPIC}: </td>
+ <td><!-- IF ACTIVE_TOPIC --><b><a class="gen" href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></b><br /><span class="genmed">[ {ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="cat" align="center"><h4>{L_CONTACT_USER}</h4></td>
+ <td class="cat" align="center"><h4>{L_ABOUT_USER}</h4></td>
+ </tr>
+ <tr>
+ <td class="row1">
+ <table width="100%" cellspacing="1" cellpadding="2" border="0">
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_EMAIL_ADDRESS}: </td>
+ <td width="100%"><!-- IF U_EMAIL --><a href="{U_EMAIL}">{EMAIL_IMG}</a><!-- ENDIF --></td>
+ </tr>
+ <!-- IF U_PM -->
+ <tr>
+ <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_PM}: </td>
+ <td><a href="{U_PM}">{PM_IMG}</a></td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_MSNM}: </td>
+ <td><!-- IF U_MSN --><a href="{U_MSN}" onclick="popup(this.href, 550, 320); return false">{MSN_IMG}</a><!-- ELSEIF USER_MSN -->{USER_MSN}<!-- ENDIF --></td>
+ </tr>
+ <tr>
+ <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_YIM}: </td>
+ <td><!-- IF U_YIM --><a href="{U_YIM}" onclick="popup(this.href, 780, 550); return false">{YIM_IMG}</a><!-- ELSEIF USER_YIM -->{USER_YIM}<!-- ENDIF --></td>
+ </tr>
+ <tr>
+ <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_AIM}: </td>
+ <td><!-- IF U_AIM --><a href="{U_AIM}" onclick="popup(this.href, 550, 320); return false">{AIM_IMG}</a><!-- ELSEIF USER_AIM -->{USER_AIM}<!-- ENDIF --></td>
+ </tr>
+ <tr>
+ <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_ICQ}: </td>
+ <td><!-- IF U_ICQ --><a href="{U_ICQ}" onclick="popup(this.href, 550, 320); return false">{ICQ_IMG}</a><!-- ELSEIF USER_ICQ -->{USER_ICQ}<!-- ENDIF --></td>
+ </tr>
+ <tr>
+ <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_JABBER}: </td>
+ <td><!-- IF U_JABBER --><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false">{JABBER_IMG}</a><!-- ELSEIF USER_JABBER -->{USER_JABBER_IMG}<!-- ENDIF --></td>
+ </tr>
+ </table>
+ </td>
+ <td class="row1">
+ <table cellspacing="1" cellpadding="2" border="0">
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_USERGROUPS}: </td>
+ <td><select name="g">{S_GROUP_OPTIONS}</select> <input class="btnlite" type="submit" name="submit" value="{L_GO}" /></td>
+ </tr>
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_LOCATION}: </td>
+ <td><!-- IF LOCATION --><b class="genmed">{LOCATION}</b><!-- ENDIF --></td>
+ </tr>
+ <!-- IF AGE -->
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_AGE}: </td>
+ <td><b class="genmed"><!-- IF AGE -->{AGE}<!-- ELSE --> - <!-- ENDIF --></b></td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_OCCUPATION}: </td>
+ <td><!-- IF OCCUPATION --><b class="genmed">{OCCUPATION}</b><!-- ENDIF --></td>
+ </tr>
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_INTERESTS}: </td>
+ <td><!-- IF INTERESTS --><b class="genmed">{INTERESTS}</b><!-- ENDIF --></td>
+ </tr>
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_WEBSITE}: </td>
+ <td><!-- IF U_WWW --><b><a class="genmed" href="{U_WWW}">{U_WWW}</a></b><!-- ENDIF --></td>
+ </tr>
+ <!-- IF S_PROFILE_FIELD1 -->
+ <!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{PROFILE_FIELD1_NAME}: </td>
+ <td><b class="genmed">{PROFILE_FIELD1_VALUE}</b></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- BEGIN custom_fields -->
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{custom_fields.PROFILE_FIELD_NAME}: </td>
+ <td><b class="genmed">{custom_fields.PROFILE_FIELD_VALUE}</b></td>
+ </tr>
+ <!-- END custom_fields -->
+ </table>
+ </td>
+ </tr>
+ <!-- IF SIGNATURE -->
+ <tr>
+ <td class="cat" colspan="2" align="center"><h4>{L_SIGNATURE}</h4></td>
+ </tr>
+ <tr>
+ <td class="row1" colspan="2"><div class="postbody" style="padding: 10px;">{SIGNATURE}</div></td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+
+ </form>
+
+</div>
+
+<br clear="all" />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<br clear="all" />
+
+<div style="float: {S_CONTENT_FLOW_END};"><!-- INCLUDE jumpbox.html --></div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/message_body.html b/phpBB/styles/subsilver2/template/message_body.html
new file mode 100644
index 0000000000..f61a3e6365
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/message_body.html
@@ -0,0 +1,16 @@
+<!-- INCLUDE overall_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th>{MESSAGE_TITLE}</th>
+</tr>
+<tr>
+ <td class="row1" align="center"><br /><p class="gen">{MESSAGE_TEXT}</p><br /></td>
+</tr>
+</table>
+
+<br clear="all" />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/overall_footer.html b/phpBB/styles/subsilver2/template/overall_footer.html
new file mode 100644
index 0000000000..64201ff2b9
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/overall_footer.html
@@ -0,0 +1,23 @@
+ <!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF -->
+</div>
+
+<!--
+ We request you retain the full copyright notice below including the link to www.phpbb.com.
+ This not only gives respect to the large amount of time given freely by the developers
+ but also helps build interest, traffic and use of phpBB3. If you (honestly) cannot retain
+ the full copyright we ask you at least leave in place the "Powered by phpBB" line, with
+ "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our
+ forums may be affected.
+
+ The phpBB Group : 2006
+//-->
+
+<div id="wrapfooter">
+ <!-- IF U_ACP --><span class="gensmall">[ <a href="{U_ACP}">{L_ACP}</a> ]</span><br /><br /><!-- ENDIF -->
+ <span class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a> &copy; 2000, 2002, 2005, 2007 phpBB Group
+ <!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
+ <!-- IF DEBUG_OUTPUT --><br /><bdo dir="ltr">[ {DEBUG_OUTPUT} ]</bdo><!-- ENDIF --></span>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html
new file mode 100644
index 0000000000..5972073011
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/overall_header.html
@@ -0,0 +1,213 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
+<meta http-equiv="content-language" content="{S_USER_LANG}" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="imagetoolbar" content="no" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
+<meta name="keywords" content="" />
+<meta name="description" content="" />
+<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
+{META}
+<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
+
+<!-- IF S_ENABLE_FEEDS -->
+ <link rel="alternate" type="application/atom+xml" title="{L_FEED} - {SITENAME}" href="{U_FEED}" />
+ <!-- IF S_ENABLE_FEEDS_NEWS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_NEWS}" href="{U_FEED}?mode=news" /><!-- ENDIF -->
+ <!-- IF S_ENABLE_FEEDS_FORUMS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_ALL_FORUMS}" href="{U_FEED}?mode=forums" /><!-- ENDIF -->
+ <!-- IF S_ENABLE_FEEDS_TOPICS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_ALL_TOPICS}" href="{U_FEED}?mode=topics" /><!-- ENDIF -->
+ <!-- IF S_ENABLE_FEEDS_FORUM and S_FORUM_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FORUM} - {FORUM_NAME}" href="{U_FEED}?f={S_FORUM_ID}" /><!-- ENDIF -->
+ <!-- IF S_ENABLE_FEEDS_TOPIC and S_TOPIC_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_TOPIC} - {TOPIC_TITLE}" href="{U_FEED}?f={S_FORUM_ID}&amp;t={S_TOPIC_ID}" /><!-- ENDIF -->
+<!-- ENDIF -->
+
+<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />
+
+<script type="text/javascript">
+// <![CDATA[
+<!-- IF S_USER_PM_POPUP -->
+ if ({S_NEW_PM})
+ {
+ popup('{UA_POPUP_PM}', 400, 225, '_phpbbprivmsg');
+ }
+<!-- ENDIF -->
+
+function popup(url, width, height, name)
+{
+ if (!name)
+ {
+ name = '_popup';
+ }
+
+ window.open(url.replace(/&amp;/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes,width=' + width);
+ return false;
+}
+
+function jumpto()
+{
+ var page = prompt('{LA_JUMP_PAGE}:', '{ON_PAGE}');
+ var per_page = '{PER_PAGE}';
+ var base_url = '{A_BASE_URL}';
+
+ if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
+ {
+ if (base_url.indexOf('?') == -1)
+ {
+ document.location.href = base_url + '?start=' + ((page - 1) * per_page);
+ }
+ else
+ {
+ document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + ((page - 1) * per_page);
+ }
+ }
+}
+
+/**
+* Find a member
+*/
+function find_username(url)
+{
+ popup(url, 760, 570, '_usersearch');
+ return false;
+}
+
+/**
+* Mark/unmark checklist
+* id = ID of parent container, name = name prefix, state = state [true/false]
+*/
+function marklist(id, name, state)
+{
+ var parent = document.getElementById(id);
+ if (!parent)
+ {
+ eval('parent = document.' + id);
+ }
+
+ if (!parent)
+ {
+ return;
+ }
+
+ var rb = parent.getElementsByTagName('input');
+
+ for (var r = 0; r < rb.length; r++)
+ {
+ if (rb[r].name.substr(0, name.length) == name)
+ {
+ rb[r].checked = state;
+ }
+ }
+}
+
+<!-- IF ._file -->
+
+ /**
+ * Play quicktime file by determining it's width/height
+ * from the displayed rectangle area
+ *
+ * Only defined if there is a file block present.
+ */
+ function play_qt_file(obj)
+ {
+ var rectangle = obj.GetRectangle();
+
+ if (rectangle)
+ {
+ rectangle = rectangle.split(',')
+ var x1 = parseInt(rectangle[0]);
+ var x2 = parseInt(rectangle[2]);
+ var y1 = parseInt(rectangle[1]);
+ var y2 = parseInt(rectangle[3]);
+
+ var width = (x1 < 0) ? (x1 * -1) + x2 : x2 - x1;
+ var height = (y1 < 0) ? (y1 * -1) + y2 : y2 - y1;
+ }
+ else
+ {
+ var width = 200;
+ var height = 0;
+ }
+
+ obj.width = width;
+ obj.height = height + 16;
+
+ obj.SetControllerVisible(true);
+
+ obj.Play();
+ }
+<!-- ENDIF -->
+
+// ]]>
+</script>
+</head>
+<body class="{S_CONTENT_DIRECTION}">
+
+<a name="top"></a>
+
+<div id="wrapheader">
+
+ <div id="logodesc">
+ <table width="100%" cellspacing="0">
+ <tr>
+ <td><a href="{U_INDEX}">{SITE_LOGO_IMG}</a></td>
+ <td width="100%" align="center"><h1>{SITENAME}</h1><span class="gen">{SITE_DESCRIPTION}</span></td>
+ </tr>
+ </table>
+ </div>
+
+ <div id="menubar">
+ <table width="100%" cellspacing="0">
+ <tr>
+ <td class="genmed">
+ <!-- IF not S_IS_BOT --><a href="{U_LOGIN_LOGOUT}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_LOGIN_LOGOUT}</a>&nbsp;<!-- ENDIF -->
+ <!-- IF U_RESTORE_PERMISSIONS --> &nbsp;<a href="{U_RESTORE_PERMISSIONS}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_RESTORE_PERMISSIONS}</a><!-- ENDIF -->
+ <!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN --> &nbsp;<span style="color: red;">{L_BOARD_DISABLED}</span><!-- ENDIF -->
+ <!-- IF not S_IS_BOT -->
+ <!-- IF S_USER_LOGGED_IN -->
+ <!-- IF S_DISPLAY_PM --> &nbsp;<a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="*" /> {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a><!-- ENDIF -->
+ <!-- ELSEIF S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) --> &nbsp;<a href="{U_REGISTER}"><img src="{T_THEME_PATH}/images/icon_mini_register.gif" width="12" height="13" alt="*" /> {L_REGISTER}</a>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+ </td>
+ <td class="genmed" align="{S_CONTENT_FLOW_END}">
+ <a href="{U_FAQ}"><img src="{T_THEME_PATH}/images/icon_mini_faq.gif" width="12" height="13" alt="*" /> {L_FAQ}</a>
+ <!-- IF S_DISPLAY_SEARCH -->&nbsp; &nbsp;<a href="{U_SEARCH}"><img src="{T_THEME_PATH}/images/icon_mini_search.gif" width="12" height="13" alt="*" /> {L_SEARCH}</a><!-- ENDIF -->
+ <!-- IF not S_IS_BOT -->
+ <!-- IF S_DISPLAY_MEMBERLIST -->&nbsp; &nbsp;<a href="{U_MEMBERLIST}"><img src="{T_THEME_PATH}/images/icon_mini_members.gif" width="12" height="13" alt="*" /> {L_MEMBERLIST}</a><!-- ENDIF -->
+ <!-- IF S_USER_LOGGED_IN -->&nbsp; &nbsp;<a href="{U_PROFILE}"><img src="{T_THEME_PATH}/images/icon_mini_profile.gif" width="12" height="13" alt="*" /> {L_PROFILE}</a><!-- ENDIF -->
+ <!-- ENDIF -->
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <div id="datebar">
+ <table width="100%" cellspacing="0">
+ <tr>
+ <td class="gensmall"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ENDIF --></td>
+ <td class="gensmall" align="{S_CONTENT_FLOW_END}">{CURRENT_TIME}<br /></td>
+ </tr>
+ </table>
+ </div>
+
+</div>
+
+<div id="wrapcentre">
+
+ <!-- IF S_DISPLAY_SEARCH -->
+ <p class="searchbar">
+ <span style="float: {S_CONTENT_FLOW_BEGIN};"><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a> | <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></span>
+ <!-- IF S_USER_LOGGED_IN -->
+ <span style="float: {S_CONTENT_FLOW_END};"><a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a> | <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a> | <a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a></span>
+ <!-- ENDIF -->
+ </p>
+ <!-- ENDIF -->
+
+ <br style="clear: both;" />
+
+ <!-- INCLUDE breadcrumbs.html -->
+
+ <br />
diff --git a/phpBB/styles/subsilver2/template/pagination.html b/phpBB/styles/subsilver2/template/pagination.html
new file mode 100644
index 0000000000..bf9c854d9a
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/pagination.html
@@ -0,0 +1 @@
+<!-- IF PAGINATION --><b><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a> <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}">{L_PREVIOUS}</a>&nbsp;&nbsp;<!-- ENDIF -->{PAGINATION}<!-- IF NEXT_PAGE --> &nbsp;<a href="{NEXT_PAGE}">{L_NEXT}</a><!-- ENDIF --></b><!-- ENDIF --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/posting_attach_body.html b/phpBB/styles/subsilver2/template/posting_attach_body.html
new file mode 100644
index 0000000000..8c70e4c831
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/posting_attach_body.html
@@ -0,0 +1,83 @@
+<tr>
+ <th colspan="2">
+ <script type="text/javascript">
+ // <![CDATA[
+ /**
+ * Show upload progress bar
+ */
+ function popup_progress_bar()
+ {
+ close_waitscreen = 0;
+ // no scrollbars
+ popup('{UA_PROGRESS_BAR}', 400, 200, '_upload');
+ }
+ // ]]>
+ </script>
+
+ <!-- IF S_CLOSE_PROGRESS_WINDOW -->
+ <script type="text/javascript">
+ // <![CDATA[
+ close_waitscreen = 1;
+ // ]]>
+ </script>
+ <!-- ENDIF -->
+
+ {L_ADD_ATTACHMENT}
+ </th>
+</tr>
+<tr>
+ <td class="row3" colspan="2"><span class="gensmall">{L_ADD_ATTACHMENT_EXPLAIN}</span></td>
+</tr>
+
+<tr>
+ <td class="row1"><b class="genmed">{L_FILENAME}</b></td>
+ <td class="row2"><input type="file" name="fileupload" size="40" maxlength="{FILESIZE}" value="" class="btnfile" /></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_FILE_COMMENT}</b></td>
+ <td class="row2">
+ <table border="0" cellspacing="0" cellpadding="2">
+ <tr>
+ <td><textarea class="post" name="filecomment" rows="3" cols="35">{FILE_COMMENT}</textarea>&nbsp;</td>
+ <td valign="top">
+ <table border="0" cellspacing="4" cellpadding="0">
+ <tr>
+ <td><input class="btnlite" type="submit" style="width:150px" name="add_file" value="{L_ADD_FILE}" onclick="popup_progress_bar();" /></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+<!-- IF S_HAS_ATTACHMENTS -->
+ <tr>
+ <th colspan="2">{L_POSTED_ATTACHMENTS}</th>
+ </tr>
+
+ <!-- BEGIN attach_row -->
+ <tr>
+ <td class="row1"><b class="genmed">{L_FILENAME}</b></td>
+ <td class="row2"><a class="genmed" href="{attach_row.U_VIEW_ATTACHMENT}" target="_blank">{attach_row.FILENAME}</a></td>
+ </tr>
+ <tr>
+ <td class="row1"><b class="genmed">{L_FILE_COMMENT}</b></td>
+ <td class="row2">{attach_row.S_HIDDEN}
+ <table border="0" cellspacing="0" cellpadding="2">
+ <tr>
+ <td><textarea class="post" name="comment_list[{attach_row.ASSOC_INDEX}]" rows="3" cols="35" wrap="virtual">{attach_row.FILE_COMMENT}</textarea>&nbsp;</td>
+ <td valign="top">
+ <table border="0" cellspacing="4" cellpadding="0">
+ <tr>
+ <td><input class="btnlite" type="submit" style="width:150px" name="delete_file[{attach_row.ASSOC_INDEX}]" value="{L_DELETE_FILE}" /></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <!-- END attach_row -->
+
+<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/posting_body.html b/phpBB/styles/subsilver2/template/posting_body.html
new file mode 100644
index 0000000000..963e6fe966
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/posting_body.html
@@ -0,0 +1,413 @@
+<!-- IF S_PRIVMSGS -->
+ <!-- INCLUDE ucp_header.html -->
+<!-- ELSE -->
+ <!-- INCLUDE overall_header.html -->
+<!-- ENDIF -->
+
+<!-- IF S_FORUM_RULES -->
+ <div class="forumrules">
+ <!-- IF U_FORUM_RULES -->
+ <h3>{L_FORUM_RULES}</h3><br />
+ <a href="{U_FORUM_RULES}"><b>{L_FORUM_RULES_LINK}</b></a>
+ <!-- ELSE -->
+ <h3>{L_FORUM_RULES}</h3><br />
+ {FORUM_RULES}
+ <!-- ENDIF -->
+ </div>
+
+ <br clear="all" />
+<!-- ENDIF -->
+
+<!-- IF not S_PRIVMSGS -->
+ <div id="pageheader">
+ <h2><!-- IF TOPIC_TITLE --><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- ELSE --><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- ENDIF --></h2>
+
+ <!-- IF MODERATORS -->
+ <p class="moderators">{L_MODERATORS}: {MODERATORS}</p>
+ <!-- ENDIF -->
+ <!-- IF U_MCP -->
+ <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
+ <!-- ENDIF -->
+ </div>
+
+ <br clear="all" /><br />
+<!-- ENDIF -->
+
+<!-- IF not S_SHOW_PM_BOX -->
+ <form action="{S_POST_ACTION}" method="post" name="postform"{S_FORM_ENCTYPE}>
+<!-- ENDIF -->
+
+<!-- IF S_DRAFT_LOADED -->
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th align="center">{L_INFORMATION}</th>
+ </tr>
+ <tr>
+ <td class="row1" align="center"><span class="gen"><!-- IF S_PRIVMSGS -->{L_DRAFT_LOADED_PM}<!-- ELSE -->{L_DRAFT_LOADED}<!-- ENDIF --></span></td>
+ </tr>
+ </table>
+
+ <br clear="all" />
+<!-- ENDIF -->
+
+<!-- IF S_SHOW_DRAFTS -->
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th colspan="3" align="center">{L_LOAD_DRAFT}</th>
+ </tr>
+ <tr>
+ <td class="row1" colspan="3" align="center"><span class="gen">{L_LOAD_DRAFT_EXPLAIN}</span></td>
+ </tr>
+ <tr>
+ <th>{L_SAVE_DATE}</th>
+ <th>{L_DRAFT_TITLE}</th>
+ <th>{L_OPTIONS}</th>
+ </tr>
+ <!-- BEGIN draftrow -->
+
+ <!-- IF draftrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td class="postdetails" style="padding: 4px;">{draftrow.DATE}</td>
+ <td style="padding: 4px;"><b class="gen">{draftrow.DRAFT_SUBJECT}</b>
+ <!-- IF draftrow.S_LINK_TOPIC --><br /><span class="gensmall">{L_TOPIC}: <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a></span>
+ <!-- ELSEIF draftrow.S_LINK_FORUM --><br /><span class="gensmall">{L_FORUM}: <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a></span>
+ <!-- ELSEIF draftrow.S_LINK_PM --><br /><span class="gensmall">{L_PRIVATE_MESSAGE}</span>
+ <!-- ELSE --><br /><span class="gensmall">{L_NO_TOPIC_FORUM}</span><!-- ENDIF -->
+ </td>
+ <td style="padding: 4px;" align="center"><span class="gen"><a href="{draftrow.U_INSERT}">{L_LOAD_DRAFT}</a></span></td>
+ </tr>
+ <!-- END draftrow -->
+ </table>
+
+ <br clear="all" />
+<!-- ENDIF -->
+
+
+<!-- IF S_POST_REVIEW --><!-- INCLUDE posting_review.html --><!-- ENDIF -->
+<!-- IF S_DISPLAY_PREVIEW --><!-- INCLUDE posting_preview.html --><!-- ENDIF -->
+
+
+<!-- IF not S_PRIVMSGS and S_UNGLOBALISE -->
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th>{L_MOVE}</th>
+ </tr>
+ <tr>
+ <td class="spacer" colspan="2"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
+ </tr>
+ <tr>
+ <td class="row2" align="center"><span class="gen">{L_UNGLOBALISE_EXPLAIN}<br /><br />{L_SELECT_DESTINATION_FORUM}&nbsp;&nbsp;</span><select name="to_forum_id">{S_FORUM_SELECT}</select><br /><br /><input class="btnmain" type="submit" name="post" value="{L_CONFIRM}" />&nbsp;&nbsp; <input class="btnlite" type="submit" name="cancel_unglobalise" value="{L_CANCEL}" /></td>
+ </tr>
+ </table>
+
+ <br clear="all" />
+<!-- ENDIF -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="2"><b>{L_POST_A}</b></th>
+</tr>
+
+<!-- IF ERROR -->
+ <tr>
+ <td class="row2" colspan="2" align="center"><span class="genmed error">{ERROR}</span></td>
+ </tr>
+<!-- ENDIF -->
+
+<!-- IF S_DELETE_ALLOWED -->
+ <tr>
+ <td class="row1"><b class="genmed">{L_DELETE_POST}:</b></td>
+ <td class="row2"><input type="checkbox" class="radio" name="delete" /> <span class="gensmall">[ {L_DELETE_POST_WARN} ]</span></td>
+ </tr>
+<!-- ENDIF -->
+
+<!-- IF S_SHOW_TOPIC_ICONS or S_SHOW_PM_ICONS -->
+ <tr>
+ <td class="row1"><b class="genmed">{L_ICON}:</b></td>
+ <td class="row2">
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td><input type="radio" class="radio" name="icon" value="0"{S_NO_ICON_CHECKED} /><span class="genmed"><!-- IF S_SHOW_TOPIC_ICONS -->{L_NO_TOPIC_ICON}<!-- ELSE -->{L_NO_PM_ICON}<!-- ENDIF --></span> <!-- BEGIN topic_icon --><span style="white-space: nowrap;"><input type="radio" class="radio" name="icon" value="{topic_icon.ICON_ID}"{topic_icon.S_ICON_CHECKED} /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" hspace="2" vspace="2" /></span> <!-- END topic_icon --></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+<!-- ENDIF -->
+
+<!-- IF not S_PRIVMSGS and S_DISPLAY_USERNAME -->
+ <tr>
+ <td class="row1"><b class="genmed">{L_USERNAME}:</b></td>
+ <td class="row2"><input class="post" type="text" tabindex="1" name="username" size="25" value="{USERNAME}" /></td>
+ </tr>
+<!-- ENDIF -->
+
+<!-- IF S_PRIVMSGS -->
+ <tr>
+ <td class="row1"><b class="genmed">{L_TO}:</b></td>
+ <td class="row2">
+ {S_HIDDEN_ADDRESS_FIELD}
+ <!-- BEGIN to_recipient -->
+ <span style="display: block; float: {S_CONTENT_FLOW_BEGIN};" class="nowrap genmed"><strong>
+ <!-- IF to_recipient.IS_GROUP --><a href="{to_recipient.U_VIEW}"><span class="sep">{to_recipient.NAME}</span></a><!-- ELSE -->{to_recipient.NAME_FULL}<!-- ENDIF --></strong>&nbsp;<!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="{L_REMOVE}" />&nbsp;<!-- ENDIF -->
+ </span>
+ <!-- BEGINELSE -->
+ <span class="genmed">{L_NO_TO_RECIPIENT}</span>
+ <!-- END to_recipient -->
+ </td>
+ </tr>
+ <!-- IF S_ALLOW_MASS_PM -->
+ <tr>
+ <td class="row1"><b class="genmed">{L_BCC}:</b></td>
+ <td class="row2">
+ <!-- BEGIN bcc_recipient -->
+ <span class="genmed nowrap"><strong>
+ <!-- IF bcc_recipient.IS_GROUP --><a href="{bcc_recipient.U_VIEW}"><span class="sep">{bcc_recipient.NAME}</span></a><!-- ELSE -->{bcc_recipient.NAME_FULL}<!-- ENDIF --></strong>&nbsp;<!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{bcc_recipient.TYPE}[{bcc_recipient.UG_ID}]" value="{L_REMOVE}" />&nbsp;<!-- ENDIF -->
+ </span>
+ <!-- BEGINELSE -->
+ <span class="genmed">{L_NO_BCC_RECIPIENT}</span>
+ <!-- END bcc_recipient -->
+ </td>
+ </tr>
+ <!-- ENDIF -->
+<!-- ENDIF -->
+
+<tr>
+ <td class="row1" width="22%"><b class="genmed">{L_SUBJECT}:</b></td>
+ <td class="row2" width="78%"><input class="post" style="width:450px" type="text" name="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}" /></td>
+</tr>
+<tr>
+ <td class="row1" valign="top"><b class="genmed">{L_MESSAGE_BODY}:</b><br /><span class="gensmall">{L_MESSAGE_BODY_EXPLAIN}&nbsp;</span><br /><br />
+ <!-- IF S_SMILIES_ALLOWED -->
+ <table width="100%" cellspacing="5" cellpadding="0" border="0" align="center">
+ <tr>
+ <td class="gensmall" align="center"><b>{L_SMILIES}</b></td>
+ </tr>
+ <tr>
+ <td align="center">
+ <!-- BEGIN smiley -->
+ <a href="#" onclick="insert_text('{smiley.A_SMILEY_CODE}', true); return false;" style="line-height: 20px;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" hspace="2" vspace="2" /></a>
+ <!-- END smiley -->
+ </td>
+ </tr>
+
+ <!-- IF S_SHOW_SMILEY_LINK -->
+ <tr>
+ <td align="center"><a class="nav" href="{U_MORE_SMILIES}" onclick="popup(this.href, 300, 350, '_phpbbsmilies'); return false;">{L_MORE_SMILIES}</a></td>
+ </tr>
+ <!-- ENDIF -->
+
+ </table>
+ <!-- ENDIF -->
+ </td>
+ <td class="row2" valign="top">
+ <script type="text/javascript">
+ // <![CDATA[
+ var form_name = 'postform';
+ var text_name = 'message';
+ // ]]>
+ </script>
+
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <!-- INCLUDE posting_buttons.html -->
+ <tr>
+ <td valign="top" style="width: 100%;"><textarea name="message" rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" style="width: 98%;">{MESSAGE}</textarea></td>
+ <!-- IF S_BBCODE_ALLOWED -->
+ <td width="80" align="center" valign="top">
+ <script type="text/javascript">
+ // <![CDATA[
+ colorPalette('v', 7, 6)
+ // ]]>
+ </script>
+ </td>
+ <!-- ENDIF -->
+ </tr>
+ </table>
+ </td>
+</tr>
+
+<!-- IF S_INLINE_ATTACHMENT_OPTIONS -->
+ <tr>
+ <td class="row1"><b class="genmed">{L_ATTACHMENTS}:</b></td>
+ <td class="row2"><select name="attachments">{S_INLINE_ATTACHMENT_OPTIONS}</select>&nbsp;<input type="button" class="btnbbcode" accesskey="a" value="{L_PLACE_INLINE}" name="attachinline" onclick="attach_form = document.forms[form_name].elements['attachments']; attach_inline(attach_form.value, attach_form.options[attach_form.selectedIndex].text);" onmouseover="helpline('a')" onmouseout="helpline('tip')" />
+ </td>
+ </tr>
+<!-- ENDIF -->
+
+<tr>
+ <td class="row1" valign="top"><b class="genmed">{L_OPTIONS}:</b><br />
+ <table cellspacing="2" cellpadding="0" border="0">
+ <tr>
+ <td class="gensmall">{BBCODE_STATUS}</td>
+ </tr>
+ <!-- IF S_BBCODE_ALLOWED -->
+ <tr>
+ <td class="gensmall">{IMG_STATUS}</td>
+ </tr>
+ <tr>
+ <td class="gensmall">{FLASH_STATUS}</td>
+ </tr>
+ <tr>
+ <td class="gensmall">{URL_STATUS}</td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td class="gensmall">{SMILIES_STATUS}</td>
+ </tr>
+ </table>
+ </td>
+ <td class="row2">
+ <table cellpadding="1">
+ <!-- IF S_BBCODE_ALLOWED -->
+ <tr>
+ <td><input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} /></td>
+ <td class="gen">{L_DISABLE_BBCODE}</td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF S_SMILIES_ALLOWED -->
+ <tr>
+ <td><input type="checkbox" class="radio" name="disable_smilies"{S_SMILIES_CHECKED} /></td>
+ <td class="gen">{L_DISABLE_SMILIES}</td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF S_LINKS_ALLOWED -->
+ <tr>
+ <td><input type="checkbox" class="radio" name="disable_magic_url"{S_MAGIC_URL_CHECKED} /></td>
+ <td class="gen">{L_DISABLE_MAGIC_URL}</td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF S_SIG_ALLOWED -->
+ <tr>
+ <td><input type="checkbox" class="radio" name="attach_sig"{S_SIGNATURE_CHECKED} /></td>
+ <td class="gen">{L_ATTACH_SIG}</td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF S_NOTIFY_ALLOWED -->
+ <tr>
+ <td><input type="checkbox" class="radio" name="notify"{S_NOTIFY_CHECKED} /></td>
+ <td class="gen">{L_NOTIFY_REPLY}</td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF not S_PRIVMSGS -->
+ <!-- IF S_LOCK_TOPIC_ALLOWED -->
+ <tr>
+ <td><input type="checkbox" class="radio" name="lock_topic"{S_LOCK_TOPIC_CHECKED} /></td>
+ <td class="gen">{L_LOCK_TOPIC}</td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF S_LOCK_POST_ALLOWED -->
+ <tr>
+ <td><input type="checkbox" class="radio" name="lock_post"{S_LOCK_POST_CHECKED} /></td>
+ <td class="gen">{L_LOCK_POST} [{L_LOCK_POST_EXPLAIN}]</td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF S_TYPE_TOGGLE -->
+ <tr>
+ <td>&nbsp;</td>
+ <td class="gen"><!-- IF S_EDIT_POST -->{L_CHANGE_TOPIC_TO}<!-- ELSE -->{L_POST_TOPIC_AS}<!-- ENDIF -->: <!-- BEGIN topic_type --><input type="radio" class="radio" name="topic_type" value="{topic_type.VALUE}"{topic_type.S_CHECKED} />{topic_type.L_TOPIC_TYPE}&nbsp;&nbsp;<!-- END topic_type --></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+ </table>
+ </td>
+</tr>
+
+<!-- IF S_TOPIC_TYPE_ANNOUNCE or S_TOPIC_TYPE_STICKY -->
+ <tr>
+ <td class="row1"><b class="genmed">{L_STICK_TOPIC_FOR}:</b><br /><span class="gensmall">{L_STICKY_ANNOUNCE_TIME_LIMIT}</span></td>
+ <td class="row2"><input class="post" type="text" name="topic_time_limit" size="3" maxlength="3" value="{TOPIC_TIME_LIMIT}" />&nbsp;<b class="gen">{L_DAYS}</b> <span class="gensmall">{L_STICK_TOPIC_FOR_EXPLAIN}</span></td>
+ </tr>
+<!-- ENDIF -->
+
+<!-- IF S_EDIT_REASON -->
+ <tr>
+ <td class="row1" valign="top"><b class="genmed">{L_EDIT_REASON}:</b></td>
+ <td class="row2"><input class="post" type="text" name="edit_reason" size="50" value="{EDIT_REASON}" /></td>
+ </tr>
+<!-- ENDIF -->
+
+ <!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
+ <!-- INCLUDE {CAPTCHA_TEMPLATE} -->
+ <!-- ENDIF -->
+
+
+<!-- IF S_SHOW_ATTACH_BOX or S_SHOW_POLL_BOX -->
+ <tr>
+ <td class="cat" colspan="2" align="center">
+ <input class="btnlite" type="submit" tabindex="5" name="preview" value="{L_PREVIEW}" />
+ &nbsp; <input class="btnmain" type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" />
+ <!-- IF S_SAVE_ALLOWED -->&nbsp; <input class="btnlite" type="submit" accesskey="k" tabindex="7" name="save" value="{L_SAVE}" /><!-- ENDIF -->
+ <!-- IF S_HAS_DRAFTS -->&nbsp; <input class="btnlite" type="submit" accesskey="d" tabindex="8" name="load" value="{L_LOAD}" /><!-- ENDIF -->
+ &nbsp; <input class="btnlite" type="submit" accesskey="c" tabindex="9" name="cancel" value="{L_CANCEL}" />
+ </td>
+ </tr>
+
+ <!-- IF S_SHOW_ATTACH_BOX --><!-- INCLUDE posting_attach_body.html --><!-- ENDIF -->
+
+ <!-- IF S_SHOW_POLL_BOX -->
+ <!-- INCLUDE posting_poll_body.html -->
+ <!-- ELSEIF S_POLL_DELETE -->
+ <tr>
+ <td class="row1"><span class="genmed"><b>{L_POLL_DELETE}:</b></span></td>
+ <td class="row2"><input type="checkbox" class="radio" name="poll_delete" /></td>
+ </tr>
+ <!-- ENDIF -->
+<!-- ENDIF -->
+
+<tr>
+ <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}
+ <input class="btnlite" type="submit" tabindex="10" name="preview" value="{L_PREVIEW}" />
+ &nbsp; <input class="btnmain" type="submit" accesskey="s" tabindex="11" name="post" value="{L_SUBMIT}" />
+ <!-- IF not S_SHOW_ATTACH_BOX and not S_SHOW_POLL_BOX -->
+ <!-- IF S_SAVE_ALLOWED -->&nbsp; <input class="btnlite" type="submit" accesskey="k" tabindex="12" name="save" value="{L_SAVE}" /><!-- ENDIF -->
+ <!-- IF S_HAS_DRAFTS -->&nbsp; <input class="btnlite" type="submit" accesskey="d" tabindex="13" name="load" value="{L_LOAD}" /><!-- ENDIF -->
+ <!-- ENDIF -->
+ &nbsp; <input class="btnlite" type="submit" accesskey="c" tabindex="14" name="cancel" value="{L_CANCEL}" />
+ </td>
+</tr>
+</table>
+<!-- IF not S_PRIVMSGS -->
+ {S_FORM_TOKEN}
+ </form>
+<!-- ENDIF -->
+<br clear="all" />
+
+<!-- IF S_DISPLAY_REVIEW --><!-- INCLUDE posting_topic_review.html --><!-- ENDIF -->
+<!-- IF S_DISPLAY_HISTORY --><!-- INCLUDE ucp_pm_history.html --><!-- ENDIF -->
+
+<!-- IF S_PRIVMSGS -->
+ <!-- INCLUDE ucp_footer.html -->
+<!-- ELSE -->
+
+ <!-- INCLUDE breadcrumbs.html -->
+
+
+ <!-- IF S_DISPLAY_ONLINE_LIST -->
+ <br clear="all" />
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="cat"><h4>{L_WHO_IS_ONLINE}</h4></td>
+ </tr>
+ <tr>
+ <td class="row1"><span class="gensmall">{LOGGED_IN_USER_LIST}</span></td>
+ </tr>
+ </table>
+ <!-- ENDIF -->
+
+ <br clear="all" />
+
+ <table width="100%" cellspacing="1">
+ <tr>
+ <td align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></td>
+ </tr>
+ </table>
+
+ <!-- INCLUDE overall_footer.html -->
+<!-- ENDIF --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/posting_buttons.html b/phpBB/styles/subsilver2/template/posting_buttons.html
new file mode 100644
index 0000000000..0aab79b7aa
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/posting_buttons.html
@@ -0,0 +1,87 @@
+<tr valign="middle" align="{S_CONTENT_FLOW_BEGIN}">
+ <td colspan="2">
+ <script type="text/javascript">
+ // <![CDATA[
+
+ // Define the bbCode tags
+ var bbcode = new Array();
+ var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
+ var imageTag = false;
+
+ // Helpline messages
+ var help_line = {
+ b: '{LA_BBCODE_B_HELP}',
+ i: '{LA_BBCODE_I_HELP}',
+ u: '{LA_BBCODE_U_HELP}',
+ q: '{LA_BBCODE_Q_HELP}',
+ c: '{LA_BBCODE_C_HELP}',
+ l: '{LA_BBCODE_L_HELP}',
+ o: '{LA_BBCODE_O_HELP}',
+ p: '{LA_BBCODE_P_HELP}',
+ w: '{LA_BBCODE_W_HELP}',
+ s: '{LA_BBCODE_S_HELP}',
+ f: '{LA_BBCODE_F_HELP}',
+ e: '{LA_BBCODE_E_HELP}',
+ d: '{LA_BBCODE_D_HELP}',
+ t: '{LA_BBCODE_T_HELP}',
+ tip: '{L_STYLES_TIP}'
+ <!-- BEGIN custom_tags -->
+ ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}'
+ <!-- END custom_tags -->
+ }
+
+ // ]]>
+ </script>
+ <script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
+
+<!-- IF S_BBCODE_ALLOWED -->
+ <input type="button" class="btnbbcode" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" />
+ <input type="button" class="btnbbcode" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" />
+ <input type="button" class="btnbbcode" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" />
+ <!-- IF S_BBCODE_QUOTE -->
+ <input type="button" class="btnbbcode" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" />
+ <!-- ENDIF -->
+ <input type="button" class="btnbbcode" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" />
+ <input type="button" class="btnbbcode" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" />
+ <input type="button" class="btnbbcode" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" />
+ <input type="button" class="btnbbcode" accesskey="t" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" />
+ <!-- IF S_BBCODE_IMG -->
+ <input type="button" class="btnbbcode" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" />
+ <!-- ENDIF -->
+ <!-- IF S_LINKS_ALLOWED -->
+ <input type="button" class="btnbbcode" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" />
+ <!-- ENDIF -->
+ <!-- IF S_BBCODE_FLASH -->
+ <input type="button" class="btnbbcode" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" />
+ <!-- ENDIF -->
+ <span class="genmed nowrap">{L_FONT_SIZE}: <select class="gensmall" name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')" onmouseout="helpline('tip')">
+ <option value="50">{L_FONT_TINY}</option>
+ <option value="85">{L_FONT_SMALL}</option>
+ <option value="100" selected="selected">{L_FONT_NORMAL}</option>
+ <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 150 -->
+ <option value="150">{L_FONT_LARGE}</option>
+ <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 200 -->
+ <option value="200">{L_FONT_HUGE}</option>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+ </select></span>
+<!-- ENDIF -->
+ </td>
+</tr>
+<!-- IF S_BBCODE_ALLOWED and .custom_tags -->
+ <tr valign="middle" align="{S_CONTENT_FLOW_BEGIN}">
+ <td colspan="2">
+ <!-- BEGIN custom_tags -->
+ <input type="button" class="btnbbcode" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' --> onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')"<!-- ENDIF --> />
+ <!-- END custom_tags -->
+ </td>
+ </tr>
+<!-- ENDIF -->
+<!-- IF S_BBCODE_ALLOWED -->
+<tr>
+ <td<!-- IF $S_SIGNATURE or S_EDIT_DRAFT --> colspan="2"<!-- ENDIF -->><input type="text" readonly="readonly" name="helpbox" style="width:100%" class="helpline" value="{L_STYLES_TIP}" /></td>
+ <!-- IF not $S_SIGNATURE and not S_EDIT_DRAFT -->
+ <td class="genmed" align="center">{L_FONT_COLOR}</td>
+ <!-- ENDIF -->
+</tr>
+<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/posting_poll_body.html b/phpBB/styles/subsilver2/template/posting_poll_body.html
new file mode 100644
index 0000000000..3a523182f7
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/posting_poll_body.html
@@ -0,0 +1,36 @@
+
+<tr>
+ <th colspan="2">{L_ADD_POLL}</th>
+</tr>
+<tr>
+ <td class="row3" colspan="2"><span class="gensmall">{L_ADD_POLL_EXPLAIN}</span></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_POLL_QUESTION}:</b></td>
+ <td class="row2"><input class="post" type="text" name="poll_title" size="50" maxlength="255" value="{POLL_TITLE}" /></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_POLL_OPTIONS}:</b><br /><span class="gensmall">{L_POLL_OPTIONS_EXPLAIN}</span></td>
+ <td class="row2"><textarea style="width:450px" name="poll_option_text" rows="5" cols="35">{POLL_OPTIONS}</textarea></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_POLL_MAX_OPTIONS}:</b><br /><span class="gensmall">{L_POLL_MAX_OPTIONS_EXPLAIN}</span></td>
+ <td class="row2"><input class="post" type="text" name="poll_max_options" size="3" maxlength="3" value="{POLL_MAX_OPTIONS}" /></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_POLL_FOR}:</b></td>
+ <td class="row2"><input class="post" type="text" name="poll_length" size="3" maxlength="3" value="{POLL_LENGTH}" />&nbsp;<b class="gen">{L_DAYS}</b> <span class="gensmall">{L_POLL_FOR_EXPLAIN}</span></td>
+</tr>
+<!-- IF S_POLL_VOTE_CHANGE -->
+ <tr>
+ <td class="row1"><b class="genmed">{L_POLL_VOTE_CHANGE}:</b><br /><span class="gensmall">{L_POLL_VOTE_CHANGE_EXPLAIN}</span></td>
+ <td class="row2"><input type="checkbox" class="radio" name="poll_vote_change"{VOTE_CHANGE_CHECKED} /></td>
+ </tr>
+<!-- ENDIF -->
+
+<!-- IF S_POLL_DELETE -->
+ <tr>
+ <td class="row1"><b class="genmed">{L_POLL_DELETE}:</b></td>
+ <td class="row2"><input type="checkbox" class="radio" name="poll_delete"<!-- IF S_POLL_DELETE_CHECKED --> checked="checked"<!-- ENDIF --> /></td>
+ </tr>
+<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/posting_preview.html b/phpBB/styles/subsilver2/template/posting_preview.html
new file mode 100644
index 0000000000..b990428f36
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/posting_preview.html
@@ -0,0 +1,70 @@
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th>{L_PREVIEW}</th>
+</tr>
+<tr>
+ <td class="row1">{MINI_POST_IMG}<span class="postdetails">{L_POSTED}: {POST_DATE} &nbsp;&nbsp;&nbsp; {L_POST_SUBJECT}: {PREVIEW_SUBJECT}</span></td>
+</tr>
+<!-- IF S_HAS_POLL_OPTIONS -->
+ <tr>
+ <td class="row2" colspan="2" align="center"><br clear="all" />
+ <table cellspacing="0" cellpadding="4" border="0" align="center">
+ <tr>
+ <td align="center"><span class="gen"><b>{POLL_QUESTION}</b></span><br /><span class="gensmall">{L_POLL_LENGTH}</span></td>
+ </tr>
+ <tr>
+ <td align="center">
+ <table cellspacing="0" cellpadding="2" border="0">
+ <!-- BEGIN poll_option -->
+ <tr>
+ <td>
+ <!-- IF S_IS_MULTI_CHOICE -->
+ <input type="checkbox" class="radio" name="vote_id" value="" />
+ <!-- ELSE -->
+ <input type="radio" class="radio" name="vote_id" value="" />
+ <!-- ENDIF -->
+ </td>
+ <td><span class="gen">{poll_option.POLL_OPTION_CAPTION}</span></td>
+ </tr>
+ <!-- END poll_option -->
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td align="center"><span class="gensmall">{L_MAX_VOTES}</span></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <td class="row1">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><div class="postbody">{PREVIEW_MESSAGE}</div>
+ <!-- IF .attachment -->
+ <br clear="all" /><br />
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
+ </tr>
+ <!-- BEGIN attachment -->
+ <tr>
+ <td class="row2">{attachment.DISPLAY_ATTACHMENT}</td>
+ </tr>
+ <!-- END attachment -->
+ </table>
+ <!-- ENDIF -->
+ <!-- IF PREVIEW_SIGNATURE --><span class="postbody"><br />_________________<br />{PREVIEW_SIGNATURE}</span><!-- ENDIF --></td>
+ </tr>
+ </table>
+ </td>
+</tr>
+<tr>
+ <td class="spacer"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
+</tr>
+</table>
+
+<br clear="all" />
diff --git a/phpBB/styles/subsilver2/template/posting_progress_bar.html b/phpBB/styles/subsilver2/template/posting_progress_bar.html
new file mode 100644
index 0000000000..f9decc506b
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/posting_progress_bar.html
@@ -0,0 +1,44 @@
+<!-- INCLUDE simple_header.html -->
+<script type="text/javascript">
+// <![CDATA[
+ /**
+ * Close upload popup
+ */
+ function close_popup()
+ {
+ if (opener != null)
+ {
+ if (opener.close_waitscreen != null)
+ {
+ if (opener.close_waitscreen == 1)
+ {
+ opener.close_waitscreen = 0;
+ self.close();
+ return 0;
+ }
+ }
+ }
+ setTimeout("close_popup()", 1000);
+ return 0;
+ }
+// ]]>
+</script>
+
+<table width="100%" border="0" cellspacing="0" cellpadding="10">
+<tr>
+ <td>
+ <table width="100%" border="0" cellspacing="1" cellpadding="4">
+ <tr>
+ <td valign="top" class="row1" align="center"><br /><span class="genmed">{L_UPLOAD_IN_PROGRESS}</span><br /><br /><div style="align:center">{PROGRESS_BAR}</div><br /><br /><span class="genmed"><a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a></span><br /><br /></td>
+ </tr>
+ </table>
+ </td>
+</tr>
+</table>
+
+<script type="text/javascript">
+// <![CDATA[
+ close_popup();
+// ]]>
+</script>
+<!-- INCLUDE simple_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/posting_review.html b/phpBB/styles/subsilver2/template/posting_review.html
new file mode 100644
index 0000000000..13e895e95a
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/posting_review.html
@@ -0,0 +1,99 @@
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th align="center">{L_POST_REVIEW}</th>
+</tr>
+<tr>
+ <td class="row1" align="center"><span class="gen">{L_POST_REVIEW_EXPLAIN}</span></td>
+</tr>
+<tr>
+ <td class="spacer"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
+</tr>
+<tr>
+ <td class="row1">
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th width="22%">{L_AUTHOR}</th>
+ <th>{L_MESSAGE}</th>
+ </tr>
+ <!-- BEGIN post_review_row -->
+
+ <!-- IF post_review_row.S_ROW_COUNT is even --> <tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <!-- IF post_review_row.S_IGNORE_POST -->
+ <td colspan="2">{post_review_row.L_IGNORE_POST}</td>
+ <!-- ELSE -->
+
+ <td rowspan="2" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><a id="pr{post_review_row.POST_ID}"></a>
+ <table width="150" cellspacing="0" cellpadding="4" border="0">
+ <tr>
+ <td align="center"><b class="postauthor">{post_review_row.POST_AUTHOR_FULL}</b></td>
+ </tr>
+ </table>
+ </td>
+ <td width="100%">
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td>&nbsp;</td>
+ <td class="gensmall" valign="middle" nowrap="nowrap"><b>{L_POST_SUBJECT}:</b>&nbsp;</td>
+ <td class="gensmall" width="100%" valign="middle">{post_review_row.POST_SUBJECT}</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <!-- IF post_review_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td valign="top">
+ <table width="100%" cellspacing="0">
+ <tr>
+ <td valign="top">
+ <table width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td><div class="postbody">{post_review_row.MESSAGE}</div>
+
+ <!-- IF post_review_row.S_HAS_ATTACHMENTS -->
+ <br clear="all" /><br />
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
+ </tr>
+ <!-- BEGIN attachment -->
+ <tr>
+ <!-- IF post_review_row.attachment.S_ROW_COUNT is even --><td class="row2"><!-- ELSE --><td class="row1"><!-- ENDIF -->{post_review_row.attachment.DISPLAY_ATTACHMENT}</td>
+ </tr>
+ <!-- END attachment -->
+ </table>
+ <!-- ENDIF -->
+
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr valign="middle">
+ <td width="100%">&nbsp;</td>
+ <td width="10" nowrap="nowrap"><!-- IF S_IS_BOT -->{post_review_row.MINI_POST_IMG}<!-- ELSE --><a href="{post_review_row.U_MINI_POST}">{post_review_row.MINI_POST_IMG}</a><!-- ENDIF --></td>
+ <td class="gensmall" nowrap="nowrap"><b>{L_POSTED}:</b> {post_review_row.POST_DATE}</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <!-- ENDIF -->
+ </tr>
+ <tr>
+ <td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
+ </tr>
+ <!-- END post_review_row -->
+ </table>
+ </td>
+</tr>
+</table>
+
+<br clear="all" /> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/posting_smilies.html b/phpBB/styles/subsilver2/template/posting_smilies.html
new file mode 100644
index 0000000000..2586530e55
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/posting_smilies.html
@@ -0,0 +1,25 @@
+<!-- INCLUDE simple_header.html -->
+
+<script type="text/javascript">
+// <![CDATA[
+ var form_name = 'postform';
+ var text_name = 'message';
+// ]]>
+</script>
+<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
+
+<table width="100%" cellspacing="1" cellpadding="4" border="0">
+<tr>
+ <td>
+ <table class="tablebg" width="95%" cellspacing="1" cellpadding="4" border="0">
+ <tr>
+ <th>{L_SMILIES}</th>
+ </tr>
+ <tr>
+ <td class="row1" align="center" valign="middle"><!-- BEGIN smiley --> <a href="#" onclick="initInsertions(); insert_text('{smiley.A_SMILEY_CODE}', true, true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" hspace="2" vspace="2" /></a> <!-- END smiley --><br />{PAGINATION}<br /><a class="nav" href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a></td>
+ </tr>
+ </table>
+ </td>
+</tr>
+</table>
+<!-- INCLUDE simple_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/posting_topic_review.html b/phpBB/styles/subsilver2/template/posting_topic_review.html
new file mode 100644
index 0000000000..d1af72b522
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/posting_topic_review.html
@@ -0,0 +1,98 @@
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th align="center">{L_TOPIC_REVIEW} - {TOPIC_TITLE}</th>
+</tr>
+<tr>
+ <td class="row1"><div style="overflow: auto; width: 100%; height: 300px;">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th width="22%">{L_AUTHOR}</th>
+ <th>{L_MESSAGE}</th>
+ </tr>
+ <!-- BEGIN topic_review_row -->
+
+ <!-- IF topic_review_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <!-- IF topic_review_row.S_IGNORE_POST -->
+ <td colspan="2">{topic_review_row.L_IGNORE_POST}</td>
+ <!-- ELSE -->
+ <td rowspan="2" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><a id="pr{topic_review_row.POST_ID}"></a>
+ <table width="150" cellspacing="0">
+ <tr>
+ <td align="center"><b class="postauthor"<!-- IF topic_review_row.POST_AUTHOR_COLOUR --> style="color: {topic_review_row.POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{topic_review_row.POST_AUTHOR}</b></td>
+ </tr>
+ </table>
+ </td>
+ <td width="100%">
+ <table width="100%" cellspacing="0">
+ <tr>
+ <td>&nbsp;</td>
+ <td class="gensmall" valign="middle" nowrap="nowrap"><b>{L_POST_SUBJECT}:</b>&nbsp;</td>
+ <td class="gensmall" width="100%" valign="middle">{topic_review_row.POST_SUBJECT}</td>
+ <td valign="top" nowrap="nowrap">&nbsp;<!-- IF topic_review_row.POSTER_QUOTE and topic_review_row.DECODED_MESSAGE --><a href="#" onclick="addquote({topic_review_row.POST_ID},'{topic_review_row.POSTER_QUOTE}'); return false;">{QUOTE_IMG}</a><!-- ENDIF --></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <!-- IF topic_review_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td valign="top">
+ <table width="100%" cellspacing="0">
+ <tr>
+ <td valign="top">
+ <table width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td>
+ <div class="postbody">{topic_review_row.MESSAGE}</div>
+
+ <!-- IF topic_review_row.S_HAS_ATTACHMENTS -->
+ <br clear="all" /><br />
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
+ </tr>
+ <!-- BEGIN attachment -->
+ <tr>
+ <!-- IF topic_review_row.attachment.S_ROW_COUNT is even --><td class="row2"><!-- ELSE --><td class="row1"><!-- ENDIF -->{topic_review_row.attachment.DISPLAY_ATTACHMENT}</td>
+ </tr>
+ <!-- END attachment -->
+ </table>
+ <!-- ENDIF -->
+
+ <!-- IF topic_review_row.POSTER_QUOTE and topic_review_row.DECODED_MESSAGE -->
+ <div id="message_{topic_review_row.POST_ID}" style="display: none;">{topic_review_row.DECODED_MESSAGE}</div>
+ <!-- ENDIF -->
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table width="100%" cellspacing="0">
+ <tr valign="middle">
+ <td width="100%" align="{S_CONTENT_FLOW_BEGIN}"><span class="gensmall"><!-- IF topic_review_row.U_MCP_DETAILS -->[ <a href="{topic_review_row.U_MCP_DETAILS}">{L_POST_DETAILS}</a> ]<!-- ENDIF --></span></td>
+ <td width="10" nowrap="nowrap"><!-- IF S_IS_BOT -->{topic_review_row.MINI_POST_IMG}<!-- ELSE --><a href="{topic_review_row.U_MINI_POST}">{topic_review_row.MINI_POST_IMG}</a><!-- ENDIF --></td>
+ <td class="gensmall" nowrap="nowrap"><b>{L_POSTED}:</b> {topic_review_row.POST_DATE}</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <!-- ENDIF -->
+ </tr>
+ <tr>
+ <td class="spacer" colspan="2"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
+ </tr>
+ <!-- END topic_review_row -->
+ </table>
+ </div></td>
+</tr>
+</table>
+
+<br clear="all" /> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/quickreply_editor.html b/phpBB/styles/subsilver2/template/quickreply_editor.html
new file mode 100644
index 0000000000..704c6e1306
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/quickreply_editor.html
@@ -0,0 +1,27 @@
+<form method="post" action="{U_QR_ACTION}">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th align="center" colspan="2">{L_QUICKREPLY}</th>
+ </tr>
+ <tr>
+ <td class="row1" width="22%"><b class="genmed">{L_SUBJECT}:</b></td>
+ <td class="row2" width="78%"><input class="post" style="width:450px" type="text" name="subject" size="45" maxlength="64" tabindex="2" value="{SUBJECT}" /></td>
+ </tr>
+ <tr>
+ <td class="row1" width="22%"><b class="genmed">{L_MESSAGE}:</b></td>
+ <td class="row2" valign="top" align="left" width="78%"><textarea name="message" rows="7" cols="76" tabindex="3" style="width: 98%;"></textarea> </td>
+ </tr>
+ <tr>
+ <td class="cat" colspan="2" align="center">
+ <input class="btnmain" type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" />&nbsp;
+ <input class="btnlite" type="submit" accesskey="f" tabindex="7" name="full_editor" value="{L_FULL_EDITOR}" />
+
+ {S_FORM_TOKEN}
+ {QR_HIDDEN_FIELDS}
+ </td>
+ </tr>
+ </table>
+
+</form>
+<br clear="all" /> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/report_body.html b/phpBB/styles/subsilver2/template/report_body.html
new file mode 100644
index 0000000000..7cd7d1040f
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/report_body.html
@@ -0,0 +1,41 @@
+<!-- INCLUDE overall_header.html -->
+
+<form method="post" id="report" action="{S_REPORT_ACTION}">
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="2"><!-- IF S_REPORT_POST -->{L_REPORT_POST}<!-- ELSE -->{L_REPORT_MESSAGE}<!-- ENDIF --></th>
+</tr>
+<tr>
+ <td class="row3" colspan="2"><span class="gensmall"><!-- IF S_REPORT_POST -->{L_REPORT_POST_EXPLAIN}<!-- ELSE -->{L_REPORT_MESSAGE_EXPLAIN}<!-- ENDIF --></span></td>
+</tr>
+<tr>
+ <td class="row1" width="22%"><b class="gen">{L_REASON}:</b></td>
+ <td class="row2" width="78%"><select name="reason_id">
+ <!-- BEGIN reason --><option value="{reason.ID}"<!-- IF reason.S_SELECTED --> selected="selected"<!-- ENDIF -->>{reason.TITLE} &raquo; {reason.DESCRIPTION}</option><!-- END reason -->
+ </select></td>
+</tr>
+<!-- IF S_CAN_NOTIFY -->
+ <tr>
+ <td class="row1"><span class="gen"><b>{L_REPORT_NOTIFY}:</b></span><br /><span class="gensmall">{L_REPORT_NOTIFY_EXPLAIN}</span></td>
+ <td class="row2"><span class="gen"><input type="radio" class="radio" name="notify" value="1"<!-- IF S_NOTIFY --> checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" class="radio" name="notify" value="0"<!-- IF not S_NOTIFY --> checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</span></td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <td class="row1" valign="top"><span class="gen"><b>{L_MORE_INFO}:</b></span><br /><span class="gensmall">{L_CAN_LEAVE_BLANK}</span></td>
+ <td class="row2"><textarea class="post" name="report_text" rows="10" cols="50">{REPORT_TEXT}</textarea></td>
+</tr>
+<tr>
+ <td class="cat" colspan="2" align="center"><input type="submit" name="submit" class="btnmain" value="{L_SUBMIT}" />&nbsp;<input type="submit" name="cancel" class="btnlite" value="{L_CANCEL}" /></td>
+</tr>
+</table>
+{S_FORM_TOKEN}
+</form>
+
+<br clear="all" />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<div style="float: {S_CONTENT_FLOW_END};"><!-- INCLUDE jumpbox.html --></div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/search_body.html b/phpBB/styles/subsilver2/template/search_body.html
new file mode 100644
index 0000000000..a0ec30e9ba
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/search_body.html
@@ -0,0 +1,78 @@
+<!-- INCLUDE overall_header.html -->
+
+<div id="pagecontent">
+
+ <form method="get" action="{S_SEARCH_ACTION}">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th colspan="4">{L_SEARCH_QUERY}</th>
+ </tr>
+ <tr>
+ <td class="row1" colspan="2" width="50%"><b class="genmed">{L_SEARCH_KEYWORDS}: </b><br /><span class="gensmall">{L_SEARCH_KEYWORDS_EXPLAIN}</span></td>
+ <td class="row2" colspan="2" valign="top"><input type="text" style="width: 300px" class="post" name="keywords" size="30" /><br /><input type="radio" class="radio" name="terms" value="all" checked="checked" /> <span class="genmed">{L_SEARCH_ALL_TERMS}</span><br /><input type="radio" class="radio" name="terms" value="any" /> <span class="genmed">{L_SEARCH_ANY_TERMS}</span></td>
+ </tr>
+ <tr>
+ <td class="row1" colspan="2"><b class="genmed">{L_SEARCH_AUTHOR}:</b><br /><span class="gensmall">{L_SEARCH_AUTHOR_EXPLAIN}</span></td>
+ <td class="row2" colspan="2" valign="middle"><input type="text" style="width: 300px" class="post" name="author" size="30" /></td>
+ </tr>
+ <tr>
+ <td class="row1" colspan="2"><b class="genmed">{L_SEARCH_FORUMS}: </b><br /><span class="gensmall">{L_SEARCH_FORUMS_EXPLAIN}</span></td>
+ <td class="row2" colspan="2"><select name="fid[]" multiple="multiple" size="5">{S_FORUM_OPTIONS}</select></td>
+ </tr>
+ <tr>
+ <th colspan="4">{L_SEARCH_OPTIONS}</th>
+ </tr>
+ <tr>
+ <td class="row1" width="25%" nowrap="nowrap"><b class="genmed">{L_SEARCH_SUBFORUMS}: </b></td>
+ <td class="row2" width="25%" nowrap="nowrap"><input type="radio" class="radio" name="sc" value="1" checked="checked" /> <span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="sc" value="0" /> <span class="genmed">{L_NO}</span></td>
+ <td class="row1" width="25%" nowrap="nowrap"><b class="genmed">{L_SEARCH_WITHIN}: </b></td>
+ <td class="row2" width="25%" nowrap="nowrap"><input type="radio" class="radio" name="sf" value="all" checked="checked" /> <span class="genmed">{L_SEARCH_TITLE_MSG}</span><br /><input type="radio" class="radio" name="sf" value="msgonly" /> <span class="genmed">{L_SEARCH_MSG_ONLY}</span> <br /><input type="radio" class="radio" name="sf" value="titleonly" /> <span class="genmed">{L_SEARCH_TITLE_ONLY}</span> <br /><input type="radio" class="radio" name="sf" value="firstpost" /> <span class="genmed">{L_SEARCH_FIRST_POST}</span></td>
+ </tr>
+ <tr>
+ <td class="row1"><b class="genmed">{L_RESULT_SORT}: </b></td>
+ <td class="row2" nowrap="nowrap">{S_SELECT_SORT_KEY}<br /><input type="radio" class="radio" name="sd" value="a" /> <span class="genmed">{L_SORT_ASCENDING}</span><br /><input type="radio" class="radio" name="sd" value="d" checked="checked" /> <span class="genmed">{L_SORT_DESCENDING}</span></td>
+ <td class="row1" nowrap="nowrap"><b class="genmed">{L_DISPLAY_RESULTS}: </b></td>
+ <td class="row2" nowrap="nowrap"><input type="radio" class="radio" name="sr" value="posts" checked="checked" /> <span class="genmed">{L_POSTS}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="sr" value="topics" /> <span class="genmed">{L_TOPICS}</span></td>
+ </tr>
+ <tr>
+ <td class="row1" width="25%"><b class="genmed">{L_RESULT_DAYS}: </b></td>
+ <td class="row2" width="25%" nowrap="nowrap">{S_SELECT_SORT_DAYS}</td>
+ <td class="row1" nowrap="nowrap"><b class="genmed">{L_RETURN_FIRST}: </b></td>
+ <td class="row2" nowrap="nowrap"><select name="ch">{S_CHARACTER_OPTIONS}</select> <span class="genmed">{L_POST_CHARACTERS}</span></td>
+ </tr>
+ <tr>
+ <td class="cat" colspan="4" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" name="submit" type="submit" value="{L_SEARCH}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" /></td>
+ </tr>
+ </table>
+
+ </form>
+
+ <br clear="all" />
+
+ <!-- IF .recentsearch -->
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th colspan="2">{L_RECENT_SEARCHES}</th>
+ </tr>
+ <!-- BEGIN recentsearch -->
+ <!-- IF recentsearch.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --><tr class="row1"><!-- ENDIF -->
+
+ <td class="genmed" style="padding: 4px;" width="70%"><a href="{recentsearch.U_KEYWORDS}">{recentsearch.KEYWORDS}</a></td>
+ <td class="genmed" style="padding: 4px;" width="30%" align="center">{recentsearch.TIME}</td>
+ </tr>
+ <!-- END recentsearch -->
+ </table>
+
+ <br clear="all" />
+ <!-- ENDIF -->
+
+ </div>
+
+ <!-- INCLUDE breadcrumbs.html -->
+
+ <br clear="all" />
+
+ <div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/search_results.html b/phpBB/styles/subsilver2/template/search_results.html
new file mode 100644
index 0000000000..a6c30f97b2
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/search_results.html
@@ -0,0 +1,146 @@
+<!-- INCLUDE overall_header.html -->
+
+<form method="post" action="{S_SEARCH_ACTION}">
+
+<table width="100%" cellspacing="1">
+<tr>
+ <td colspan="2"><span class="titles"><!-- IF SEARCH_TITLE -->{SEARCH_TITLE}<!-- ELSE -->{SEARCH_MATCHES}<!-- ENDIF --></span><br /></td>
+</tr>
+<tr>
+ <td class="genmed"><!-- IF SEARCH_TOPIC -->{L_SEARCHED_TOPIC}: <a href="{U_SEARCH_TOPIC}"><b>{SEARCH_TOPIC}</b></a><br /><!-- ENDIF --><!-- IF SEARCH_WORDS -->{L_SEARCHED_FOR}: <a href="{U_SEARCH_WORDS}"><b>{SEARCH_WORDS}</b></a><!-- ENDIF --><!-- IF IGNORED_WORDS --> {L_IGNORED_TERMS}: <b>{IGNORED_WORDS}</b><!-- ENDIF --></td>
+ <td align="{S_CONTENT_FLOW_END}"><!-- IF SEARCH_IN_RESULTS --><span class="genmed">{L_SEARCH_IN_RESULTS}: </span><input class="post" type="text" name="add_keywords" value="" /> <input class="btnlite" type="submit" name="submit" value="{L_GO}" /><!-- ENDIF --></td>
+</tr>
+</table>
+
+<br clear="all" />
+
+<!-- IF S_SHOW_TOPICS -->
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th width="4%" nowrap="nowrap">&nbsp;</th>
+ <th colspan="2" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
+ <th nowrap="nowrap">&nbsp;{L_AUTHOR}&nbsp;</th>
+ <th nowrap="nowrap">&nbsp;{L_REPLIES}&nbsp;</th>
+ <th nowrap="nowrap">&nbsp;{L_VIEWS}&nbsp;</th>
+ <th nowrap="nowrap">&nbsp;{L_LAST_POST}&nbsp;</th>
+ </tr>
+ <!-- BEGIN searchresults -->
+ <tr valign="middle">
+ <td class="row1" width="25" align="center">{searchresults.TOPIC_FOLDER_IMG}</td>
+ <td class="row1" width="25" align="center">
+ <!-- IF searchresults.TOPIC_ICON_IMG -->
+ <img src="{T_ICONS_PATH}{searchresults.TOPIC_ICON_IMG}" width="{searchresults.TOPIC_ICON_IMG_WIDTH}" height="{searchresults.TOPIC_ICON_IMG_HEIGHT}" alt="" title="" />
+ <!-- ENDIF -->
+ </td>
+ <td class="row1">
+ <!-- IF searchresults.S_UNREAD_TOPIC --><a href="{searchresults.U_NEWEST_POST}">{NEWEST_POST_IMG}</a><!-- ENDIF -->
+ {searchresults.ATTACH_ICON_IMG} <a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a>
+ <!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED -->
+ <a href="{searchresults.U_MCP_QUEUE}">{searchresults.UNAPPROVED_IMG}</a>&nbsp;
+ <!-- ENDIF -->
+ <!-- IF searchresults.S_TOPIC_REPORTED -->
+ <a href="{searchresults.U_MCP_REPORT}">{REPORTED_IMG}</a>&nbsp;
+ <!-- ENDIF -->
+ <!-- IF searchresults.PAGINATION -->
+ <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {searchresults.PAGINATION} ] </p>
+ <!-- ENDIF -->
+ <!-- IF searchresults.S_TOPIC_GLOBAL -->
+ <p class="gensmall">{L_GLOBAL}</p>
+ <!-- ELSE -->
+ <p class="gensmall">{L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a></p>
+ <!-- ENDIF -->
+ </td>
+ <td class="row2" width="100" align="center"><p class="topicauthor">{searchresults.TOPIC_AUTHOR_FULL}</p></td>
+ <td class="row1" width="50" align="center"><p class="topicdetails">{searchresults.TOPIC_REPLIES}</p></td>
+ <td class="row2" width="50" align="center"><p class="topicdetails">{searchresults.TOPIC_VIEWS}</p></td>
+ <td class="row1" width="120" align="center">
+ <p class="topicdetails">{searchresults.LAST_POST_TIME}</p>
+ <p class="topicdetails">{searchresults.LAST_POST_AUTHOR_FULL}
+ <a href="{searchresults.U_LAST_POST}">{LAST_POST_IMG}</a>
+ </p>
+ </td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr valign="middle">
+ <td colspan="7" class="row3" align="center">{L_NO_SEARCH_RESULTS}</td>
+ </tr>
+ <!-- END searchresults -->
+ <tr>
+ <td class="cat" colspan="7" valign="middle" align="center"><!-- IF S_SELECT_SORT_DAYS or S_SELECT_SORT_KEY --><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS}<!-- IF S_SELECT_SORT_KEY -->&nbsp;<span class="gensmall">{L_SORT_BY}:</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}<!-- ENDIF -->&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /><!-- ENDIF --></td>
+ </tr>
+ </table>
+
+<!-- ELSE -->
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th width="150" nowrap="nowrap">{L_AUTHOR}</th>
+ <th width="100%" nowrap="nowrap">{L_MESSAGE}</th>
+ </tr>
+
+ <!-- BEGIN searchresults -->
+ <tr class="row2">
+ <!-- IF searchresults.S_IGNORE_POST -->
+ <td class="gensmall" colspan="2" height="25" align="center">{searchresults.L_IGNORE_POST}</td>
+ <!-- ELSE -->
+ <td colspan="2" height="25"><p class="topictitle"><a name="p{searchresults.POST_ID}" id="p{searchresults.POST_ID}"></a>&nbsp;<!-- IF searchresults.FORUM_TITLE -->{L_FORUM}: <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a><!-- ELSE -->{L_GLOBAL}<!-- ENDIF --> &nbsp; {L_TOPIC}: <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a> </p></td>
+ </tr>
+ <tr class="row1">
+ <td width="150" align="center" valign="middle"><b class="postauthor">{searchresults.POST_AUTHOR_FULL}</b></td>
+ <td height="25">
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td class="gensmall">
+ <div style="float: {S_CONTENT_FLOW_BEGIN};">
+ <!-- IF searchresults.POST_SUBJECT neq "" -->
+ &nbsp;<b>{L_POST_SUBJECT}:</b> <a href="{searchresults.U_VIEW_POST}">{searchresults.POST_SUBJECT}</a>
+ <!-- ELSE -->
+ [ <a href="{searchresults.U_VIEW_POST}">{L_JUMP_TO_POST}</a> ]
+ <!-- ENDIF -->
+ </div>
+ <div style="float: {S_CONTENT_FLOW_END};"><b>{L_POSTED}:</b> {searchresults.POST_DATE}&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr class="row1">
+ <td width="150" align="center" valign="top"><br /><span class="postdetails">{L_REPLIES}: <b>{searchresults.TOPIC_REPLIES}</b><br />{L_VIEWS}: <b>{searchresults.TOPIC_VIEWS}</b></span><br /><br /></td>
+ <td valign="top">
+ <table width="100%" cellspacing="5">
+ <tr>
+ <td class="postbody">{searchresults.MESSAGE}</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <td class="spacer" colspan="2"><img src="images/spacer.gif" height="1" alt="" /></td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr valign="middle">
+ <td colspan="2" class="row3" align="center">{L_NO_SEARCH_RESULTS}</td>
+ </tr>
+ <!-- END searchresults -->
+ <tr>
+ <td class="cat" colspan="2" align="center"><!-- IF S_SELECT_SORT_KEY --><span class="gensmall">{L_SORT_BY}:</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /><!-- ENDIF --></td>
+ </tr>
+ </table>
+<!-- ENDIF -->
+
+</form>
+
+<div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};"><span class="nav">{PAGE_NUMBER}</span> [ {SEARCH_MATCHES} ]</div>
+<div class="nav" style="float: {S_CONTENT_FLOW_END};"><!-- INCLUDE pagination.html --></div>
+
+<br clear="all" /><br />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<br clear="all" />
+
+<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/searchbox.html b/phpBB/styles/subsilver2/template/searchbox.html
new file mode 100644
index 0000000000..cb0bb5ba73
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/searchbox.html
@@ -0,0 +1 @@
+<form method="post" name="search" action="{S_SEARCHBOX_ACTION}"><span class="gensmall">{L_SEARCH_FOR}:</span> <input class="post" type="text" name="keywords" size="20" /> <input class="btnlite" type="submit" value="{L_GO}" /></form>
diff --git a/phpBB/styles/subsilver2/template/simple_footer.html b/phpBB/styles/subsilver2/template/simple_footer.html
new file mode 100644
index 0000000000..c8b69dd5ad
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/simple_footer.html
@@ -0,0 +1,20 @@
+
+</div>
+
+<!--
+ We request you retain the full copyright notice below including the link to www.phpbb.com.
+ This not only gives respect to the large amount of time given freely by the developers
+ but also helps build interest, traffic and use of phpBB3. If you (honestly) cannot retain
+ the full copyright we ask you at least leave in place the "Powered by phpBB" line, with
+ "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our
+ forums may be affected.
+
+ The phpBB Group : 2006
+//-->
+
+<div id="wrapfooter">
+ <span class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a> &copy; 2000, 2002, 2005, 2007 phpBB Group</span>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/simple_header.html b/phpBB/styles/subsilver2/template/simple_header.html
new file mode 100644
index 0000000000..bcef9a7059
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/simple_header.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
+<meta http-equiv="content-language" content="{S_USER_LANG}" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="imagetoolbar" content="no" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
+<meta name="keywords" content="" />
+<meta name="description" content="" />
+{META}
+<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
+
+<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />
+</head>
+
+<body class="{S_CONTENT_DIRECTION}">
+<a name="top"></a>
+<div id="wrapcentre"> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/template.cfg b/phpBB/styles/subsilver2/template/template.cfg
new file mode 100644
index 0000000000..106eae28e6
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/template.cfg
@@ -0,0 +1,23 @@
+#
+# phpBB Template Configuration File
+#
+# @package phpBB3
+# @copyright (c) 2005 phpBB Group
+# @license http://opensource.org/licenses/gpl-license.php GNU Public License
+#
+#
+# At the left is the name, please do not change this
+# At the right the value is entered
+# For on/off options the valid values are on, off, 1, 0, true and false
+#
+# Values get trimmed, if you want to add a space in front or at the end of
+# the value, then enclose the value with single or double quotes.
+# Single and double quotes do not need to be escaped.
+#
+#
+
+# General Information about this template
+name = subsilver2
+copyright = &copy; phpBB Group, 2003
+version = 3.0.6
+
diff --git a/phpBB/styles/subsilver2/template/ucp_agreement.html b/phpBB/styles/subsilver2/template/ucp_agreement.html
new file mode 100644
index 0000000000..d5420f66a6
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_agreement.html
@@ -0,0 +1,84 @@
+<!-- INCLUDE overall_header.html -->
+
+<!-- IF S_SHOW_COPPA or S_REGISTRATION -->
+
+<!-- IF S_LANG_OPTIONS -->
+<script type="text/javascript">
+// <![CDATA[
+ /**
+ * Change language
+ */
+ function change_language(lang_iso)
+ {
+ document.forms['register'].change_lang.value = lang_iso;
+ document.forms['register'].submit();
+ }
+
+// ]]>
+</script>
+
+ <form method="post" action="{S_UCP_ACTION}" id="register">
+ <table width="100%" cellspacing="0">
+ <tr>
+ <td class="gensmall" align="{S_CONTENT_FLOW_END}">{L_LANGUAGE}: <select name="lang" id="lang" onchange="change_language(this.value); return false;" title="{L_LANGUAGE}">{S_LANG_OPTIONS}</select></td>
+ </tr>
+ </table>
+ {S_HIDDEN_FIELDS}
+ </form>
+<!-- ENDIF -->
+
+ <form method="post" action="{S_UCP_ACTION}">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th height="25">{SITENAME} - {L_REGISTRATION}</th>
+ </tr>
+ <tr>
+ <td class="row1" align="center">
+ <table width="90%" cellspacing="2" cellpadding="2" border="0" align="center">
+ <tr>
+ <!-- IF S_SHOW_COPPA -->
+ <td class="gen" align="center"><br />{L_COPPA_BIRTHDAY}<br /><br /><a href="{U_COPPA_NO}">{L_COPPA_NO}</a> :: <a href="{U_COPPA_YES}">{L_COPPA_YES}</a><br /><br /></td>
+ <!-- ELSE -->
+ <td>
+ <span class="genmed"><br />{L_TERMS_OF_USE}<br /><br /></span>
+ <div align="center">
+ <input class="btnlite" type="submit" id="agreed" name="agreed" value="{L_AGREE}" /><br /><br />
+ <input class="btnlite" type="submit" name="not_agreed" value="{L_NOT_AGREE}" />
+ </div>
+ </td>
+ <!-- ENDIF -->
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ </form>
+
+<!-- ELSEIF S_AGREEMENT -->
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th height="25">{SITENAME} - {AGREEMENT_TITLE}</th>
+ </tr>
+ <tr>
+ <td class="row1" align="center">
+ <table width="90%" cellspacing="2" cellpadding="2" border="0" align="center">
+ <tr>
+ <td>
+ <span class="genmed"><br />{AGREEMENT_TEXT}<br /><br /></span>
+ <div align="center">
+ <a href="{U_BACK}">{L_BACK}</a>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_attachments.html b/phpBB/styles/subsilver2/template/ucp_attachments.html
new file mode 100644
index 0000000000..35dcd33ac4
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_attachments.html
@@ -0,0 +1,58 @@
+<!-- INCLUDE ucp_header.html -->
+
+<!-- IF S_ATTACHMENT_ROWS -->
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th nowrap="nowrap">#</th>
+ <th nowrap="nowrap" width="15%"><a href="{U_SORT_FILENAME}">{L_FILENAME}</a></th>
+ <th nowrap="nowrap" width="5%"><a href="{U_SORT_POST_TIME}">{L_POST_TIME}</a></th>
+ <th nowrap="nowrap" width="5%"><a href="{U_SORT_FILESIZE}">{L_FILESIZE}</a></th>
+ <th nowrap="nowrap" width="5%"><a href="{U_SORT_DOWNLOADS}">{L_DOWNLOADS}</a></th>
+ <th width="2%" nowrap="nowrap">{L_DELETE}</th>
+ </tr>
+ <!-- IF TOTAL_ATTACHMENTS -->
+ <tr>
+ <td class="row3" colspan="6">
+ <table width="100%" cellspacing="1">
+ <tr>
+ <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
+ <td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_ATTACHMENTS} ]&nbsp;</td>
+ <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- BEGIN attachrow -->
+ <!-- IF attachrow.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --><tr class="row1"><!-- ENDIF -->
+
+ <td class="genmed" style="padding: 4px;" align="center" width="2%">&nbsp;{attachrow.ROW_NUMBER}&nbsp;</td>
+ <td style="padding: 4px;"><a class="gen" href="{attachrow.U_VIEW_ATTACHMENT}">{attachrow.FILENAME}</a><br /><span class="gensmall"><!-- IF attachrow.S_IN_MESSAGE --><b>{L_PM}: </b><!-- ELSE --><b>{L_TOPIC}: </b><!-- ENDIF --><a href="{attachrow.U_VIEW_TOPIC}">{attachrow.TOPIC_TITLE}</a></span></td>
+ <td class="gensmall" style="padding: 4px;" align="center" valign="middle" nowrap="nowrap">&nbsp;{attachrow.POST_TIME}&nbsp;</td>
+ <td class="genmed" style="padding: 4px;" align="center" valign="middle" nowrap="nowrap">{attachrow.SIZE}</td>
+ <td class="genmed" style="padding: 4px;" align="center">{attachrow.DOWNLOAD_COUNT}</td>
+ <td style="padding: 4px;" align="center" valign="middle"><input type="checkbox" class="radio" name="attachment[{attachrow.ATTACH_ID}]" value="1" /></td>
+ </tr>
+ <!-- END attachrow -->
+ <tr>
+ <td class="cat" colspan="6"><div style="float: {S_CONTENT_FLOW_BEGIN};"><span class="gensmall">{L_SORT_BY}: </span><select name="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select>&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_SORT}" /></div><div style="float: {S_CONTENT_FLOW_END};"><input class="btnlite" type="submit" name="delete" value="{L_DELETE_MARKED}" />&nbsp;</div></td>
+ </tr>
+ </table>
+
+ <div style="float: {S_CONTENT_FLOW_END};"><b class="gensmall"><a href="#" onclick="marklist('ucp', 'attachment', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('ucp', 'attachment', false); return false;">{L_UNMARK_ALL}</a></b></div>
+
+<!-- ELSE -->
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th>{L_TITLE}</th>
+ </tr>
+ <tr class="row1">
+ <td align="center"><b class="genmed">{L_UCP_NO_ATTACHMENTS}</b></td>
+ </tr>
+ </table>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_footer.html b/phpBB/styles/subsilver2/template/ucp_footer.html
new file mode 100644
index 0000000000..1681fe3849
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_footer.html
@@ -0,0 +1,13 @@
+
+ <!-- IF not S_PRIVMSGS or S_SHOW_DRAFTS --> {S_FORM_TOKEN}</form><!-- ENDIF --></td>
+</tr>
+</table>
+<!-- IF (S_SHOW_PM_BOX or S_EDIT_POST) and S_POST_ACTION -->{S_FORM_TOKEN}</form><!-- ENDIF -->
+
+<br clear="all" />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_groups_manage.html b/phpBB/styles/subsilver2/template/ucp_groups_manage.html
new file mode 100644
index 0000000000..51e60c8b69
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_groups_manage.html
@@ -0,0 +1,257 @@
+<!-- INCLUDE ucp_header.html -->
+
+<!-- IF S_EDIT -->
+
+ <!-- IF S_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th colspan="2">{L_USERGROUPS}</th>
+ </tr>
+ <tr>
+ <td class="row1" colspan="2"><span class="genmed">{L_GROUPS_EXPLAIN}</span></td>
+ </tr>
+
+ <tr>
+ <th colspan="2">{L_GROUP_DETAILS}</th>
+ </tr>
+ <tr>
+ <td class="row1" width="35%"><label<!-- IF not S_SPECIAL_GROUP --> for="group_name"<!-- ENDIF -->>{L_GROUP_NAME}:</label></td>
+ <td class="row2"><!-- IF S_SPECIAL_GROUP --><b<!-- IF GROUP_COLOUR --> style="color: #{GROUP_COLOUR};"<!-- ENDIF -->>{GROUP_NAME}</b><!-- ENDIF --><input name="group_name" type="<!-- IF S_SPECIAL_GROUP -->hidden<!-- ELSE -->text<!-- ENDIF -->" id="group_name" value="{GROUP_INTERNAL_NAME}" /></td>
+ </tr>
+ <tr>
+ <td class="row1" width="35%"><label for="group_desc">{L_GROUP_DESC}:</label></td>
+ <td class="row2"><textarea id="group_desc" name="group_desc" rows="5" cols="45">{GROUP_DESC}</textarea>
+ <br /><input type="checkbox" class="radio" name="desc_parse_bbcode"<!-- IF S_DESC_BBCODE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_BBCODE} &nbsp; <input type="checkbox" class="radio" name="desc_parse_smilies"<!-- IF S_DESC_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES} &nbsp; <input type="checkbox" class="radio" name="desc_parse_urls"<!-- IF S_DESC_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS}
+ </td>
+ </tr>
+ <!-- IF not S_SPECIAL_GROUP -->
+ <tr>
+ <td class="row1" width="35%"><label for="group_type">{L_GROUP_TYPE}:</label><br /><span>{L_GROUP_TYPE_EXPLAIN}</span></td>
+ <td class="row2">
+ <input name="group_type" type="radio" class="radio" id="group_type" value="{GROUP_TYPE_FREE}"{GROUP_FREE} /> {L_GROUP_OPEN} &nbsp;
+ <input name="group_type" type="radio" class="radio" value="{GROUP_TYPE_OPEN}"{GROUP_OPEN} /> {L_GROUP_REQUEST} &nbsp;
+ <input name="group_type" type="radio" class="radio" value="{GROUP_TYPE_CLOSED}"{GROUP_CLOSED} /> {L_GROUP_CLOSED} &nbsp;
+ <input name="group_type" type="radio" class="radio" value="{GROUP_TYPE_HIDDEN}"{GROUP_HIDDEN} /> {L_GROUP_HIDDEN}
+ </td>
+ </tr>
+ <!-- ELSE -->
+ <tr style="display:none;"><td><input name="group_type" type="hidden" value="{GROUP_TYPE_SPECIAL}" /></td></tr>
+ <!-- ENDIF -->
+
+ <tr>
+ <th colspan="2">{L_GROUP_SETTINGS_SAVE}</th>
+ </tr>
+ <tr>
+ <td class="row1" width="35%"><label for="group_colour">{L_GROUP_COLOR}:</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></td>
+ <td class="row2"><input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" />&nbsp;&nbsp;<span>[ <a href="{U_SWATCH}" onclick="popup(this.href, 636, 150, '_swatch'); return false;">{L_COLOUR_SWATCH}</a> ]</span></td>
+ </tr>
+ <tr>
+ <td class="row1" width="35%"><label for="group_rank">{L_GROUP_RANK}:</label></td>
+ <td class="row2"><select name="group_rank" id="group_rank">{S_RANK_OPTIONS}</select></td>
+ </tr>
+ <tr>
+ <th colspan="2">{L_GROUP_AVATAR}</th>
+ </tr>
+ <tr>
+ <td class="row1" width="35%"><label>{L_CURRENT_IMAGE}:</label><br /><span>{L_AVATAR_EXPLAIN}</span></td>
+ <td class="row2">{AVATAR_IMAGE}<br /><br /><input type="checkbox" class="radio" name="delete" />&nbsp;<span>{L_DELETE_AVATAR}</span></td>
+ </tr>
+ <!-- IF not S_IN_AVATAR_GALLERY -->
+ <!-- IF S_UPLOAD_AVATAR_FILE -->
+ <tr>
+ <td class="row1" width="35%"><label for="uploadfile">{L_UPLOAD_AVATAR_FILE}:</label></td>
+ <td class="row2"><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_MAX_FILESIZE}" /><input type="file" id="uploadfile" name="uploadfile" /></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF S_UPLOAD_AVATAR_URL -->
+ <tr>
+ <td class="row1" width="35%"><label for="uploadurl">{L_UPLOAD_AVATAR_URL}:</label><br /><span>{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></td>
+ <td class="row2"><input name="uploadurl" type="text" id="uploadurl" value="" /></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF S_LINK_AVATAR -->
+ <tr>
+ <td class="row1" width="35%"><label for="remotelink">{L_LINK_REMOTE_AVATAR}:</label><br /><span>{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></td>
+ <td class="row2"><input name="remotelink" type="text" id="remotelink" value="" /></td>
+ </tr>
+ <tr>
+ <td class="row1" width="35%"><label for="width">{L_LINK_REMOTE_SIZE}:</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></td>
+ <td class="row2"><input name="width" type="text" id="width" size="3" value="{AVATAR_WIDTH}" /> <span>px X </span> <input type="text" name="height" size="3" value="{AVATAR_HEIGHT}" /> <span>px</span></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF S_DISPLAY_GALLERY -->
+ <tr>
+ <td class="row1" width="35%"><label>{L_AVATAR_GALLERY}:</label></td>
+ <td class="row2"><input class="btnmain" type="submit" name="display_gallery" value="{L_DISPLAY_GALLERY}" /></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- ELSE -->
+
+ <tr>
+ <th colspan="2">{L_AVATAR_GALLERY}</th>
+ </tr>
+ <tr>
+ <td class="row1" width="35%"><label for="category">{L_AVATAR_CATEGORY}:</label></td>
+ <td class="row2"><select name="category" id="category">{S_CAT_OPTIONS}</select>&nbsp;<input class="btnmain" type="submit" value="{L_GO}" name="display_gallery" /></td>
+ </tr>
+ <tr>
+ <td class="row1" width="35%">
+ <table cellspacing="1">
+ <!-- BEGIN avatar_row -->
+ <tr>
+ <!-- BEGIN avatar_column -->
+ <td class="row1" style="text-align: center;"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" alt="{avatar_row.avatar_column.AVATAR_NAME}" title="{avatar_row.avatar_column.AVATAR_NAME}" /></td>
+ <!-- END avatar_column -->
+ </tr>
+ <tr>
+ <!-- BEGIN avatar_option_column -->
+ <td class="row2" style="text-align: center;"><input type="radio" class="radio" name="avatar_select" value="{avatar_row.avatar_option_column.S_OPTIONS_AVATAR}" /></td>
+ <!-- END avatar_option_column -->
+ </tr>
+ <!-- END avatar_row -->
+ </table>
+ </td>
+ <td class="row2"><input class="btnmain" type="submit" name="cancel" value="{L_CANCEL}" /></td>
+ </tr>
+
+ <!-- ENDIF -->
+
+ <tr>
+ <td class="cat" colspan="2" align="center"><input class="btnlite" type="submit" id="submit" name="update" value="{L_SUBMIT}" />&nbsp;
+ <input class="btnmain" type="reset" id="reset" name="reset" value="{L_RESET}" /></td>
+ </tr>
+ </table>
+
+<!-- ELSEIF S_LIST -->
+
+ <h1>{L_GROUP_MEMBERS}</h1>
+
+ <p>{L_GROUP_MEMBERS_EXPLAIN}</p>
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th>{L_USERNAME}</th>
+ <th>{L_GROUP_DEFAULT}</th>
+ <th>{L_JOINED}</th>
+ <th>{L_POSTS}</th>
+ <th>{L_MARK}</th>
+ </tr>
+
+ <tr>
+ <td class="row3" colspan="5"><b>{L_GROUP_LEAD}</b></td>
+ </tr>
+ <!-- BEGIN leader -->
+ <!-- IF leader.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td>{leader.USERNAME_FULL}</td>
+ <td style="text-align: center;"><!-- IF leader.S_GROUP_DEFAULT -->{L_YES}<!-- ELSE -->{L_NO}<!-- ENDIF --></td>
+ <td style="text-align: center;">{leader.JOINED}</td>
+ <td style="text-align: center;">{leader.USER_POSTS}</td>
+ <td style="text-align: center;"></td>
+ </tr>
+ <!-- END leader -->
+
+ <!-- BEGIN member -->
+ <!-- IF member.S_PENDING -->
+ <tr>
+ <td class="row3" colspan="5"><b>{L_GROUP_PENDING}</b></td>
+ </tr>
+ <!-- ELSEIF member.S_APPROVED -->
+ <tr>
+ <td class="row3" colspan="5"><b>{L_GROUP_APPROVED}</b></td>
+ </tr>
+ <!-- ELSE -->
+ <!-- IF member.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td>{member.USERNAME_FULL}</td>
+ <td style="text-align: center;"><!-- IF member.S_GROUP_DEFAULT -->{L_YES}<!-- ELSE -->{L_NO}<!-- ENDIF --></td>
+ <td style="text-align: center;">{member.JOINED}</td>
+ <td style="text-align: center;">{member.USER_POSTS}</td>
+ <td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{member.USER_ID}" /></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="5" style="text-align: center;">{L_GROUPS_NO_MEMBERS}</td>
+ </tr>
+ <!-- END member -->
+ <tr>
+ <td class="cat" colspan="5" align="center"><div style="float: {S_CONTENT_FLOW_END};"><span class="small"><a href="#" onclick="marklist('ucp', 'mark', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('ucp', 'mark', false); return false;">{L_UNMARK_ALL}</a></span></div><div style="float: {S_CONTENT_FLOW_BEGIN};"><select name="action"><option class="sep" value="">{L_SELECT_OPTION}</option>{S_ACTION_OPTIONS}</select> <input class="btnmain" type="submit" name="update" value="{L_SUBMIT}" /></div></td>
+ </tr>
+ </table>
+
+ <div class="pagination" style="float: {S_CONTENT_FLOW_BEGIN};">
+ <!-- IF PAGINATION -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {S_ON_PAGE}
+ <!-- ENDIF -->
+ </div>
+
+ <br />
+ <br />
+
+ <h1>{L_ADD_USERS}</h1>
+
+ <p>{L_ADD_USERS_UCP_EXPLAIN}</p>
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th colspan="2">{L_ADD_USERS}</th>
+ </tr>
+ <tr>
+ <td class="row1"><label for="default">{L_USER_GROUP_DEFAULT}:</label><br /><span>{L_USER_GROUP_DEFAULT_EXPLAIN}</span></td>
+ <td class="row2"><input name="default" type="radio" class="radio" value="1" /> {L_YES} &nbsp; <input name="default" type="radio" class="radio" id="default" value="0" checked="checked" /> {L_NO}</td>
+ </tr>
+ <tr>
+ <td class="row1"><label for="usernames">{L_USERNAME}:</label><br /><span>{L_USERNAMES_EXPLAIN}</span></td>
+ <td class="row2"><textarea id="usernames" name="usernames" cols="40" rows="5"></textarea><br />[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</td>
+ </tr>
+ <tr>
+ <td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="addusers" value="{L_SUBMIT}" /></td>
+ </tr>
+ </table>
+
+<!-- ELSE -->
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th colspan="3">{L_USERGROUPS}</th>
+ </tr>
+ <tr>
+ <td class="row1" colspan="3"><span class="genmed">{L_GROUPS_EXPLAIN}</span></td>
+ </tr>
+
+ <tr>
+ <th>{L_GROUP_DETAILS}</th>
+ <th colspan="2">{L_OPTIONS}</th>
+ </tr>
+ <tr>
+ <td class="row3" colspan="3"><b class="gensmall">{L_GROUP_LEADER}</b></td>
+ </tr>
+ <!-- BEGIN leader -->
+ <!-- IF leader.S_ROW_COUNT is odd --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td><b class="genmed"<!-- IF leader.GROUP_COLOUR --> style="color: #{leader.GROUP_COLOUR};"<!-- ENDIF -->>{leader.GROUP_NAME}</b><!-- IF leader.GROUP_DESC --><p class="forumdesc">{leader.GROUP_DESC}</p><!-- ENDIF --></td>
+ <td style="text-align: center;"><a href="{leader.U_EDIT}">{L_EDIT}</a></td>
+ <td style="text-align: center;"><a href="{leader.U_LIST}">{L_GROUP_LIST}</a></td>
+
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td class="row2" align="center" colspan="3"><b class="genmed">{L_NO_LEADERS}</b></td>
+ </tr>
+ <!-- END leader -->
+
+ <tr>
+ <td class="cat" align="{S_CONTENT_FLOW_END}" colspan="3">&nbsp;</td>
+ </tr>
+ </table>
+
+<!-- ENDIF -->
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_groups_membership.html b/phpBB/styles/subsilver2/template/ucp_groups_membership.html
new file mode 100644
index 0000000000..b92dabc967
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_groups_membership.html
@@ -0,0 +1,93 @@
+<!-- INCLUDE ucp_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="3">{L_USERGROUPS}</th>
+</tr>
+<tr>
+ <td class="row1" colspan="3"><span class="genmed">{L_GROUPS_EXPLAIN}</span></td>
+</tr>
+
+<tr>
+ <th colspan="2">{L_GROUP_DETAILS}</th>
+ <th>{L_SELECT}</th>
+</tr>
+
+<!-- BEGIN leader -->
+ <!-- IF leader.S_FIRST_ROW -->
+ <tr>
+ <td class="row3" colspan="3"><b class="gensmall">{L_GROUP_LEADER}</b></td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF leader.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td width="6%" align="center" nowrap="nowrap"><!-- IF S_CHANGE_DEFAULT --><input type="radio" class="radio" name="default"<!-- IF leader.S_GROUP_DEFAULT --> checked="checked"<!-- ENDIF --> value="{leader.GROUP_ID}" /><!-- ENDIF --></td>
+ <td>
+ <b class="genmed"><a href="{leader.U_VIEW_GROUP}"<!-- IF leader.GROUP_COLOUR --> style="color: #{leader.GROUP_COLOUR};"<!-- ENDIF -->>{leader.GROUP_NAME}</a></b>
+ <!-- IF leader.GROUP_DESC --><br /><span class="genmed">{leader.GROUP_DESC}</span><!-- ENDIF -->
+ <!-- IF not leader.GROUP_SPECIAL --><br /><i class="gensmall">{leader.GROUP_STATUS}</i><!-- ENDIF -->
+ </td>
+ <td width="6%" align="center" nowrap="nowrap"><!-- IF not leader.GROUP_SPECIAL --><input type="radio" class="radio" name="selected" value="{leader.GROUP_ID}" /><!-- ENDIF --></td>
+ </tr>
+<!-- END leader -->
+
+<!-- BEGIN member -->
+ <!-- IF member.S_FIRST_ROW -->
+ <tr>
+ <td class="row3" colspan="3"><b class="gensmall">{L_GROUP_MEMBER}</b></td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF member.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td width="6%" align="center" nowrap="nowrap"><!-- IF S_CHANGE_DEFAULT --><input type="radio" class="radio" name="default"<!-- IF member.S_GROUP_DEFAULT --> checked="checked"<!-- ENDIF --> value="{member.GROUP_ID}" /><!-- ENDIF --></td>
+ <td>
+ <b class="genmed"><a href="{member.U_VIEW_GROUP}"<!-- IF member.GROUP_COLOUR --> style="color: #{member.GROUP_COLOUR};"<!-- ENDIF -->>{member.GROUP_NAME}</a></b>
+ <!-- IF member.GROUP_DESC --><br /><span class="genmed">{member.GROUP_DESC}</span><!-- ENDIF -->
+ <!-- IF not member.GROUP_SPECIAL --><br /><i class="gensmall">{member.GROUP_STATUS}</i><!-- ENDIF -->
+ </td>
+ <td width="6%" align="center" nowrap="nowrap"><!-- IF not member.GROUP_SPECIAL --><input type="radio" class="radio" name="selected" value="{member.GROUP_ID}" /><!-- ENDIF --></td>
+ </tr>
+<!-- END member -->
+
+<!-- BEGIN pending -->
+ <!-- IF pending.S_FIRST_ROW -->
+ <tr>
+ <td class="row3" colspan="3"><b class="gensmall">{L_GROUP_PENDING}</b></td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF pending.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td width="6%" align="center" nowrap="nowrap">&nbsp;</td>
+ <td>
+ <b class="genmed"><a href="{pending.U_VIEW_GROUP}"<!-- IF pending.GROUP_COLOUR --> style="color: #{pending.GROUP_COLOUR};"<!-- ENDIF -->>{pending.GROUP_NAME}</a></b>
+ <!-- IF pending.GROUP_DESC --><br /><span class="genmed">{pending.GROUP_DESC}</span><!-- ENDIF -->
+ <!-- IF not pending.GROUP_SPECIAL --><br /><i class="gensmall">{pending.GROUP_STATUS}</i><!-- ENDIF -->
+ </td>
+ <td width="6%" align="center" nowrap="nowrap"><!-- IF not pending.GROUP_SPECIAL --><input type="radio" class="radio" name="selected" value="{pending.GROUP_ID}" /><!-- ENDIF --></td>
+ </tr>
+<!-- END pending -->
+
+<!-- BEGIN nonmember -->
+ <!-- IF nonmember.S_FIRST_ROW -->
+ <tr>
+ <td class="row3" colspan="3"><b class="gensmall">{L_GROUP_NONMEMBER}</b></td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF nonmember.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td width="6%" align="center" nowrap="nowrap">&nbsp;</td>
+ <td>
+ <b class="genmed"><a href="{nonmember.U_VIEW_GROUP}"<!-- IF nonmember.GROUP_COLOUR --> style="color: #{nonmember.GROUP_COLOUR};"<!-- ENDIF -->>{nonmember.GROUP_NAME}</a></b>
+ <!-- IF nonmember.GROUP_DESC --><br /><span class="genmed">{nonmember.GROUP_DESC}</span><!-- ENDIF -->
+ <!-- IF not nonmember.GROUP_SPECIAL --><br /><i class="gensmall">{nonmember.GROUP_STATUS}</i><!-- ENDIF -->
+ </td>
+ <td width="6%" align="center" nowrap="nowrap"><!-- IF nonmember.S_CAN_JOIN --><input type="radio" class="radio" name="selected" value="{nonmember.GROUP_ID}" /><!-- ENDIF --></td>
+ </tr>
+<!-- END nonmember -->
+
+<tr>
+ <td class="cat" colspan="3"><!-- IF S_CHANGE_DEFAULT --><div style="float: {S_CONTENT_FLOW_BEGIN};"><input class="btnlite" type="submit" name="change_default" value="{L_CHANGE_DEFAULT_GROUP}" /></div><!-- ENDIF --><div style="float: {S_CONTENT_FLOW_END};"><span class="genmed">{L_SELECT}: </span><select name="action"><option value="join">{L_JOIN_SELECTED}</option><option value="resign">{L_RESIGN_SELECTED}</option><option value="demote">{L_DEMOTE_SELECTED}</option></select>&nbsp;<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;</div></td>
+</tr>
+</table>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_header.html b/phpBB/styles/subsilver2/template/ucp_header.html
new file mode 100644
index 0000000000..ea64dcb299
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_header.html
@@ -0,0 +1,163 @@
+<!-- INCLUDE overall_header.html -->
+
+
+<!-- IF S_SHOW_PM_BOX and S_POST_ACTION -->
+ <form action="{S_POST_ACTION}" method="post" name="postform"{S_FORM_ENCTYPE}>
+<!-- ENDIF -->
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
+<tr>
+ <td width="20%" valign="top">
+
+<!-- IF S_SHOW_PM_BOX and S_POST_ACTION -->
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th>{L_PM_TO}</th>
+ </tr>
+ <!-- IF not S_ALLOW_MASS_PM -->
+ <tr>
+ <td class="row1"><b class="genmed">{L_USERNAME}:</b><br />[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</td>
+ </tr>
+
+ <tr>
+ <td class="row2"><input class="post" type="text" name="username_list" size="20" value="" />&nbsp;<input class="post" type="submit" name="add_to" value="{L_ADD}" /></td>
+ </tr>
+ <!-- ELSE -->
+ <tr>
+ <td class="row1"><b class="genmed">{L_USERNAMES}:</b></td>
+ </tr>
+ <tr>
+ <td class="row2"><textarea name="username_list" rows="5" cols="22"></textarea><br />
+ [ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]
+ </td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF S_GROUP_OPTIONS -->
+ <tr>
+ <td class="row1"><b class="genmed">{L_USERGROUPS}:</b></td>
+ </tr>
+ <tr>
+ <td class="row2"><select name="group_list[]" multiple="multiple" size="5" style="width:150px">{S_GROUP_OPTIONS}</select></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF S_ALLOW_MASS_PM -->
+ <tr>
+ <td class="row1"><div style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<input class="post" type="submit" name="add_bcc" value="{L_ADD_BCC}" />&nbsp;</div><div style="float: {S_CONTENT_FLOW_END};">&nbsp;<input class="post" type="submit" name="add_to" value="{L_ADD_TO}" />&nbsp;</div></td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+ <div style="padding: 2px;"></div>
+<!-- ENDIF -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th>{L_OPTIONS}</th>
+</tr>
+
+<!-- BEGIN l_block1 -->
+ <tr>
+ <!-- IF l_block1.S_SELECTED -->
+ <td class="row1"><b class="nav">{l_block1.L_TITLE}</b>
+
+ <!-- IF S_PRIVMSGS -->
+
+ <!-- the ! at the beginning of the loop name forces the loop to be not a nested one of l_block1 (it gets parsed separately) -->
+ <!-- BEGIN !folder -->
+ <!-- IF folder.S_FIRST_ROW -->
+ <ul class="nav" style="margin: 0; padding: 0; list-style-type: none; line-height: 175%;">
+ <!-- ENDIF -->
+
+ <!-- IF folder.S_CUR_FOLDER -->
+ <li class="row2" style="padding: 1px 0;">&#187; <a href="{folder.U_FOLDER}">{folder.FOLDER_NAME}<!-- IF folder.S_UNREAD_MESSAGES --> ({folder.UNREAD_MESSAGES})<!-- ENDIF --></a></li>
+ <!-- ELSE -->
+ <li>&#187; <a href="{folder.U_FOLDER}">{folder.FOLDER_NAME}<!-- IF folder.S_UNREAD_MESSAGES --> ({folder.UNREAD_MESSAGES})<!-- ENDIF --></a></li>
+ <!-- ENDIF -->
+
+ <!-- IF folder.S_LAST_ROW -->
+ </ul>
+ <hr />
+ <!-- ENDIF -->
+ <!-- END !folder -->
+
+ <!-- ENDIF -->
+
+ <ul class="nav" style="margin: 0; padding: 0; list-style-type: none; line-height: 175%;">
+ <!-- BEGIN l_block2 -->
+ <li>&#187; <!-- IF l_block1.l_block2.S_SELECTED --><b>{l_block1.l_block2.L_TITLE}</b><!-- ELSE --><a href="{l_block1.l_block2.U_TITLE}">{l_block1.l_block2.L_TITLE}</a><!-- ENDIF --></li>
+ <!-- END l_block2 -->
+ </ul>
+ <!-- ELSE -->
+ <td class="row2" nowrap="nowrap" onmouseover="this.className='row1'" onmouseout="this.className='row2'" onclick="location.href=this.firstChild.href;"><a class="nav" href="{l_block1.U_TITLE}">{l_block1.L_TITLE}</a>
+ <!-- ENDIF -->
+ </td>
+ </tr>
+<!-- END l_block1 -->
+</table>
+
+<div style="padding: 2px;"></div>
+
+<!-- IF S_SHOW_COLOUR_LEGEND -->
+ <table class="tablebg" width="100%" cellspacing="1" cellpadding="0">
+ <tr>
+ <th colspan="2">{L_MESSAGE_COLOURS}</th>
+ </tr>
+ <!-- BEGIN pm_colour_info -->
+ <tr>
+ <!-- IF not pm_colour_info.IMG -->
+ <td class="row1 {pm_colour_info.CLASS}" width="5"><img src="images/spacer.gif" width="5" alt="{pm_colour_info.LANG}" /></td>
+ <!-- ELSE -->
+ <td class="row1" width="25" align="center">{pm_colour_info.IMG}</td>
+ <!-- ENDIF -->
+ <td class="row1"><span class="genmed">{pm_colour_info.LANG}</span></td>
+ </tr>
+ <!-- END pm_colour_info -->
+ </table>
+
+ <div style="padding: 2px;"></div>
+<!-- ENDIF -->
+
+<!-- IF S_ZEBRA_ENABLED and S_ZEBRA_FRIENDS_ENABLED -->
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th>{L_FRIENDS}</th>
+ </tr>
+ <tr>
+ <td class="row1" align="center">
+
+ <b class="genmed" style="color:green">{L_FRIENDS_ONLINE}</b>
+
+ <ul class="nav" style="margin: 0; padding: 0; list-style-type: none; line-height: 175%;">
+ <!-- BEGIN friends_online -->
+ <li>{friends_online.USERNAME_FULL}
+ <!-- IF S_SHOW_PM_BOX -->
+ &nbsp;[ <input class="post" style="font-size: 90%;" type="submit" name="add_to[{friends_online.USER_ID}]" value="{L_ADD}" /> ]
+ <!-- ENDIF -->
+ </li>
+ <!-- BEGINELSE -->
+ <li>{L_NO_FRIENDS_ONLINE}</li>
+ <!-- END friends_online -->
+ </ul>
+
+ <hr />
+
+ <b class="genmed" style="color:red">{L_FRIENDS_OFFLINE}</b>
+
+ <ul class="nav" style="margin: 0; padding: 0; list-style-type: none; line-height: 175%;">
+ <!-- BEGIN friends_offline -->
+ <li>{friends_offline.USERNAME_FULL}
+ <!-- IF S_SHOW_PM_BOX -->
+ &nbsp;[ <input class="post" style="font-size: 90%;" type="submit" name="add_to[{friends_offline.USER_ID}]" value="{L_ADD}" /> ]
+ <!-- ENDIF -->
+ </li>
+ <!-- BEGINELSE -->
+ <li>{L_NO_FRIENDS_OFFLINE}</li>
+ <!-- END friends_offline -->
+ </ul>
+
+ </td>
+ </tr>
+ </table>
+<!-- ENDIF -->
+
+</td>
+<td><img src="images/spacer.gif" width="4" alt="" /></td>
+<td width="80%" valign="top"><!-- IF not S_PRIVMSGS or S_SHOW_DRAFTS --><form name="ucp" id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}><!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html b/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html
new file mode 100644
index 0000000000..191e25c297
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html
@@ -0,0 +1,77 @@
+<!-- INCLUDE ucp_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="4">{L_UCP}</th>
+</tr>
+<tr>
+ <td class="row1" colspan="4" align="center"><span class="genmed">{L_BOOKMARKS_EXPLAIN}</span></td>
+</tr>
+<!-- IF .topicrow -->
+<tr>
+ <th colspan="4">{L_BOOKMARKS}</th>
+</tr>
+<!-- ENDIF -->
+
+<!-- IF S_NO_DISPLAY_BOOKMARKS -->
+ <tr class="row1">
+ <td colspan="4" align="center"><b class="genmed">{L_BOOKMARKS_DISABLED}</b></td>
+ </tr>
+<!-- ELSE -->
+
+ <!-- IF TOTAL_TOPICS -->
+ <tr>
+ <td class="row3" colspan="4">
+ <table width="100%" cellspacing="1">
+ <tr>
+ <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
+ <td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_TOPICS} ]&nbsp;</td>
+ <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- BEGIN topicrow -->
+
+ <!-- IF topicrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="padding: 4px;" width="20" align="center" valign="middle">{topicrow.TOPIC_FOLDER_IMG}</td>
+ <!-- IF topicrow.S_DELETED_TOPIC -->
+ <td class="postdetails" style="padding: 4px" width="100%" colspan="2">{L_DELETED_TOPIC}</td>
+ <!-- ELSE -->
+ <td style="padding: 4px;" width="100%" valign="top">
+ <p class="topictitle"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></p>
+ <!-- IF topicrow.S_GLOBAL_TOPIC --><span class="gensmall">{L_GLOBAL_ANNOUNCEMENT}</span><!-- ELSE --><span class="gensmall"><b>{L_FORUM}: </b><a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a></span><!-- ENDIF -->
+ <!-- IF topicrow.PAGINATION -->
+ <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ] </p>
+ <!-- ENDIF -->
+ </td>
+ <td style="padding: 4px;" align="{S_CONTENT_FLOW_BEGIN}" valign="top" nowrap="nowrap">
+ <p class="topicdetails">{topicrow.LAST_POST_TIME}</p>
+ <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
+ <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a>
+ </p>
+ </td>
+ <!-- ENDIF -->
+ <td style="padding: 4px;"> <input type="checkbox" class="radio" name="t[{topicrow.TOPIC_ID}]" /> </td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr class="row1">
+ <td colspan="4" align="center"><b class="genmed">{L_NO_BOOKMARKS}</b></td>
+ </tr>
+ <!-- END topicrow -->
+
+ <!-- IF .topicrow -->
+ <tr>
+ <td class="cat" colspan="5" align="{S_CONTENT_FLOW_END}"><input class="btnlite" type="submit" name="unbookmark" value="{L_REMOVE_BOOKMARK_MARKED}" />&nbsp;</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+</table>
+
+<!-- IF not S_NO_DISPLAY_BOOKMARKS and .topicrow -->
+ <div class="gensmall" style="float: {S_CONTENT_FLOW_END}; padding-top: 2px;"><b><a href="#" onclick="marklist('ucp', 't', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('ucp', 't', false); return false;">{L_UNMARK_ALL}</a></b></div>
+<!-- ENDIF -->
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_main_drafts.html b/phpBB/styles/subsilver2/template/ucp_main_drafts.html
new file mode 100644
index 0000000000..e61c253b04
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_main_drafts.html
@@ -0,0 +1,101 @@
+<!-- INCLUDE ucp_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="4">{L_UCP}</th>
+</tr>
+<tr>
+ <td class="row1" colspan="4" align="center"><span class="genmed">{L_DRAFTS_EXPLAIN}</span></td>
+</tr>
+
+<!-- IF ERROR -->
+ <tr>
+ <td class="row1" colspan="2" align="center"><span class="genmed error">{ERROR}</span></td>
+ </tr>
+<!-- ENDIF -->
+
+<!-- IF not S_EDIT_DRAFT -->
+
+ <!-- IF S_DRAFT_ROWS -->
+ <tr>
+ <th>{L_SAVE_DATE}</th>
+ <th>{L_DRAFT_TITLE}</th>
+ <th>{L_OPTIONS}</th>
+ <th>{L_DELETE}</th>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- BEGIN draftrow -->
+
+ <!-- IF draftrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td class="postdetails" style="padding: 4px;" nowrap="nowrap">{draftrow.DATE}</td>
+ <td style="padding: 4px;" valign="top" width="100%">
+ <p class="topictitle">{draftrow.DRAFT_SUBJECT}</p>
+ <!-- IF draftrow.S_LINK_TOPIC --><span class="gensmall">{L_TOPIC}: <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a></span>
+ <!-- ELSEIF draftrow.S_LINK_FORUM --><span class="gensmall">{L_FORUM}: <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a></span>
+ <!-- ELSEIF draftrow.S_LINK_PM --><span class="gensmall">{L_PRIVATE_MESSAGE}</span>
+ <!-- ELSE --><span class="gensmall">{L_NO_TOPIC_FORUM}</span><!-- ENDIF -->
+ </td>
+ <td style="padding: 4px;" align="center" nowrap="nowrap"><span class="genmed"><!-- IF draftrow.U_INSERT --><a href="{draftrow.U_INSERT}">{L_LOAD_DRAFT}</a><br /><!-- ENDIF --><a href="{draftrow.U_VIEW_EDIT}">{L_VIEW_EDIT}</a></span></td>
+ <td style="padding: 4px;" align="center"><input type="checkbox" class="radio" name="d[{draftrow.DRAFT_ID}]" /></td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="4" align="center"><b class="genmed">{L_NO_SAVED_DRAFTS}</b></td>
+ </tr>
+ <!-- END draftrow -->
+
+ <!-- IF S_DRAFT_ROWS -->
+ <tr>
+ <td class="cat" colspan="4" align="{S_CONTENT_FLOW_END}"><input class="btnlite" type="submit" name="delete" value="{L_DELETE_MARKED}" />&nbsp;</td>
+ </tr>
+ <!-- ENDIF -->
+
+<!-- ELSEIF S_EDIT_DRAFT -->
+ <tr>
+ <td class="row1" width="22%"><b class="genmed">{L_SUBJECT}:</b></td>
+ <td class="row2"><input class="post" style="width:450px" type="text" name="subject" size="45" maxlength="64" tabindex="2" value="{DRAFT_SUBJECT}" /></td>
+ </tr>
+ <tr>
+ <td class="row1" width="22%"><b class="genmed">{L_MESSAGE}: </b><br /><span class="gensmall">{L_EDIT_DRAFT_EXPLAIN}</span></td>
+ <td class="row2">
+ <script type="text/javascript">
+ // <![CDATA[
+ var form_name = 'ucp';
+ var text_name = 'message';
+ // ]]>
+ </script>
+ <table cellspacing="0" cellpadding="2" border="0">
+ <!-- INCLUDE posting_buttons.html -->
+ <tr>
+ <td colspan="9"><textarea class="post" name="message" rows="10" cols="70" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();">{DRAFT_MESSAGE}</textarea></td>
+ </tr>
+ <tr>
+ <td colspan="9">
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr>
+ <td align="{S_CONTENT_FLOW_BEGIN}">
+ <script type="text/javascript">
+ // <![CDATA[
+ colorPalette('h', 6, 5)
+ // ]]>
+ </script>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr class="row1">
+ <td colspan="9" align="{S_CONTENT_FLOW_BEGIN}"><p class="topictitle"><a href="{S_UCP_ACTION}">{L_BACK_TO_DRAFTS}</a></p></td>
+ </tr>
+ <tr>
+ <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
+ </tr>
+<!-- ENDIF -->
+</table>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_main_front.html b/phpBB/styles/subsilver2/template/ucp_main_front.html
new file mode 100644
index 0000000000..fdef0bd949
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_main_front.html
@@ -0,0 +1,72 @@
+<!-- INCLUDE ucp_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="3">{L_UCP}</th>
+</tr>
+<tr>
+ <td class="row1" colspan="3" align="center"><p class="genmed">{L_UCP_WELCOME}</p></td>
+</tr>
+<tr>
+ <th colspan="3">{L_IMPORTANT_NEWS}</th>
+</tr>
+
+<!-- BEGIN topicrow -->
+
+ <!-- IF topicrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td class="row1" width="25" align="center">{topicrow.TOPIC_FOLDER_IMG}</td>
+ <td class="row1" width="100%">
+ <p class="topictitle"><!-- IF topicrow.S_UNREAD --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></p><p class="gensmall">{topicrow.GOTO_PAGE}</p>
+ </td>
+ <td class="row1" width="120" align="center" nowrap="nowrap">
+ <p class="topicdetails">{topicrow.LAST_POST_TIME}</p>
+ <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
+ <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a>
+ </p>
+ </td>
+ </tr>
+<!-- BEGINELSE -->
+ <tr class="row1">
+ <td align="center" colspan="3"><b class="gen">{L_NO_IMPORTANT_NEWS}</b></td>
+ </tr>
+<!-- END topicrow -->
+
+<tr>
+ <th colspan="3">{L_YOUR_DETAILS}</th>
+</tr>
+<tr>
+ <td class="row1" colspan="3">
+ <table width="100%" cellspacing="1" cellpadding="4">
+ <tr>
+ <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="genmed">{L_JOINED}: </b></td>
+ <td width="100%"><b class="gen">{JOINED}</b></td>
+ </tr>
+ <tr>
+ <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="genmed">{L_TOTAL_POSTS}: </b></td>
+ <td><!-- IF POSTS_PCT --><b class="gen">{POSTS}</b><br /><span class="genmed">[{POSTS_PCT} / {POSTS_DAY}]<!-- IF S_DISPLAY_SEARCH --><br /><a href="{U_SEARCH_SELF}">{L_SEARCH_YOUR_POSTS}</a><!-- ENDIF --></span><!-- ELSE --><b class="gen">{POSTS}<b><!-- ENDIF --></td>
+ </tr>
+ <!-- IF S_SHOW_ACTIVITY -->
+ <tr>
+ <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="genmed">{L_ACTIVE_IN_FORUM}: </b></td>
+ <td><!-- IF ACTIVE_FORUM --><b><a class="gen" href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></b><br /><span class="genmed">[ {ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
+ </tr>
+ <tr>
+ <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="genmed">{L_ACTIVE_IN_TOPIC}: </b></td>
+ <td><!-- IF ACTIVE_TOPIC --><b><a class="gen" href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></b><br /><span class="genmed">[ {ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF WARNINGS -->
+ <tr>
+ <td align="{S_CONTENT_FLOW_END}" valign="middle" nowrap="nowrap"><b class="genmed">{L_YOUR_WARNINGS}: </b></td>
+ <td class="genmed">{WARNING_IMG} [ <b>{WARNINGS}</b> ]</td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+ </td>
+</tr>
+<tr>
+ <td class="cat" colspan="3">&nbsp;</td>
+</tr>
+</table>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_main_subscribed.html b/phpBB/styles/subsilver2/template/ucp_main_subscribed.html
new file mode 100644
index 0000000000..9335d01f12
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_main_subscribed.html
@@ -0,0 +1,84 @@
+<!-- INCLUDE ucp_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="4">{L_UCP}</th>
+</tr>
+<tr>
+ <td class="row1" colspan="4" align="center"><span class="genmed">{L_WATCHED_EXPLAIN}</span></td>
+</tr>
+<!-- IF S_FORUM_NOTIFY -->
+ <tr>
+ <th colspan="4">{L_WATCHED_FORUMS}</th>
+ </tr>
+
+ <!-- BEGIN forumrow -->
+
+ <!-- IF forumrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="padding: 4px;" width="20" align="center" valign="middle">{forumrow.FORUM_FOLDER_IMG}</td>
+ <td style="padding: 4px;" width="100%"><p class="topictitle"><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a></p></td>
+ <td class="gensmall" style="padding: 4px;" align="center" valign="middle" nowrap="nowrap"><!-- IF forumrow.LAST_POST_TIME -->{forumrow.LAST_POST_TIME}<br />{forumrow.LAST_POST_AUTHOR_FULL} <a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a><!-- ELSE -->{L_NO_POSTS}<!-- ENDIF --></td>
+ <td style="padding: 4px;"> <input type="checkbox" class="radio" name="f[{forumrow.FORUM_ID}]" /> </td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr class="row1">
+ <td colspan="4" align="center"><b class="genmed">{L_NO_WATCHED_FORUMS}</b></td>
+ </tr>
+ <!-- END forumrow -->
+<!-- ENDIF -->
+<!-- IF S_TOPIC_NOTIFY -->
+ <tr>
+ <th colspan="4">{L_WATCHED_TOPICS}</th>
+ </tr>
+
+ <!-- IF TOTAL_TOPICS -->
+ <tr>
+ <td class="row3" colspan="4">
+ <table width="100%" cellspacing="1">
+ <tr>
+ <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
+ <td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_TOPICS} ]&nbsp;</td>
+ <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- BEGIN topicrow -->
+
+ <!-- IF topicrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="padding: 4px;" width="20" align="center" valign="middle">{topicrow.TOPIC_FOLDER_IMG}</td>
+ <td style="padding: 4px;" width="100%" valign="top">
+ <p class="topictitle"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></p>
+ <!-- IF topicrow.S_GLOBAL_TOPIC --><span class="gensmall">{L_GLOBAL_ANNOUNCEMENT}</span><!-- ELSE --><span class="gensmall"><b>{L_FORUM}: </b><a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a></span><!-- ENDIF -->
+ <!-- IF topicrow.PAGINATION -->
+ <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ] </p>
+ <!-- ENDIF -->
+ </td>
+ <td style="padding: 4px;" align="{S_CONTENT_FLOW_BEGIN}" valign="top" nowrap="nowrap">
+ <p class="topicdetails">{topicrow.LAST_POST_TIME}</p>
+ <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
+ <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a>
+ </p>
+ </td>
+ <td style="padding: 4px;"> <input type="checkbox" class="radio" name="t[{topicrow.TOPIC_ID}]" /> </td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr class="row1">
+ <td colspan="4" align="center"><b class="genmed">{L_NO_WATCHED_TOPICS}</b></td>
+ </tr>
+ <!-- END topicrow -->
+<!-- ENDIF -->
+
+<!-- IF .topicrow or .forumrow -->
+<tr>
+ <td class="cat" colspan="4" align="{S_CONTENT_FLOW_END}"><input class="btnlite" type="submit" name="unwatch" value="{L_UNWATCH_MARKED}" />&nbsp;</td>
+</tr>
+<!-- ENDIF -->
+</table>
+<!-- IF .topicrow or .forumrow -->
+<div class="gensmall" style="float: {S_CONTENT_FLOW_END}; padding-top: 2px;"><b><a href="#" onclick="marklist('ucp', 't', true); marklist('ucp', 'f', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('ucp', 't', false);marklist('ucp', 'f', false); return false;">{L_UNMARK_ALL}</a></b></div>
+<!-- ENDIF -->
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_history.html b/phpBB/styles/subsilver2/template/ucp_pm_history.html
new file mode 100644
index 0000000000..cb87d1892a
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_pm_history.html
@@ -0,0 +1,68 @@
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th align="center">{L_MESSAGE_HISTORY} - {HISTORY_TITLE}</th>
+</tr>
+<tr>
+ <td class="row1"><div style="overflow: auto; width: 100%; height: 300px;">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th width="22%">{L_AUTHOR}</th>
+ <th>{L_MESSAGE}</th>
+ </tr>
+ <!-- BEGIN history_row -->
+ <!-- IF history_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td rowspan="2" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><a name="{history_row.MSG_ID}"></a>
+ <table width="150" cellspacing="0">
+ <tr>
+ <td align="center" colspan="2"><span class="postauthor">{history_row.MESSAGE_AUTHOR_FULL}</span></td>
+ </tr>
+ </table>
+ </td>
+ <td width="100%"<!-- IF history_row.S_CURRENT_MSG --> style="background-color:lightblue"<!-- ENDIF -->>
+ <div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};"><b>{L_PM_SUBJECT}:</b>&nbsp;{history_row.SUBJECT}</div><div class="gensmall" style="float: {S_CONTENT_FLOW_END};"><b>{L_FOLDER}:</b>&nbsp;{history_row.FOLDER}</div>
+ </td>
+ </tr>
+
+ <!-- IF history_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td valign="top">
+ <table width="100%" cellspacing="0">
+ <tr>
+ <td valign="top">
+ <table width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td><div class="postbody">{history_row.MESSAGE}</div><div id="message_{history_row.MSG_ID}" style="display: none;">{history_row.DECODED_MESSAGE}</div></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table width="100%" cellspacing="0">
+ <tr valign="middle">
+ <td width="100%">&nbsp;</td>
+ <td width="10" nowrap="nowrap">{history_row.MINI_POST_IMG}</td>
+ <td class="gensmall" nowrap="nowrap"><b>{L_SENT_AT}:</b> {history_row.SENT_DATE}</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <!-- IF history_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td class="gensmall"><a href="{history_row.U_VIEW_MESSAGE}">{L_VIEW_PM}</a></td>
+ <td><div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF history_row.U_PROFILE --><a href="{history_row.U_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF history_row.U_EMAIL --><a href="{history_row.U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF -->&nbsp;</div> <div class="gensmall" style="float: {S_CONTENT_FLOW_END};"><!-- IF history_row.U_QUOTE or history_row.MESSAGE_AUTHOR_QUOTE --><a <!-- IF history_row.U_QUOTE -->href="{history_row.U_QUOTE}"<!-- ELSE -->href="#" onclick="addquote({history_row.MSG_ID}, '{history_row.MESSAGE_AUTHOR_QUOTE}'); return false;"<!-- ENDIF -->>{QUOTE_IMG}</a> <!-- ENDIF --> <!-- IF history_row.U_POST_REPLY_PM --><a href="{history_row.U_POST_REPLY_PM}">{REPLY_IMG}</a><!-- ENDIF -->&nbsp;</div></td>
+ </tr>
+ <tr>
+ <td class="spacer" colspan="2"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
+ </tr>
+ <!-- END history_row -->
+ </table>
+ </div></td>
+</tr>
+</table>
+
+<br clear="all" />
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html b/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html
new file mode 100644
index 0000000000..314d03caf3
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html
@@ -0,0 +1,46 @@
+
+<!-- IF not S_VIEW_MESSAGE -->
+ {S_FORM_TOKEN}
+ </form>
+<!-- ENDIF -->
+
+<table class="tablebg" width="100%" cellspacing="1" cellpadding="0">
+<tr>
+ <td class="row1">
+ <table border="0" cellspacing="0" cellpadding="0" width="100%">
+ <tr>
+ <td align="{S_CONTENT_FLOW_BEGIN}"><!-- INCLUDE pagination.html -->
+ <!-- IF S_VIEW_MESSAGE -->
+ <span class="gensmall">
+ <!-- IF U_PRINT_PM --><a href="{U_PRINT_PM}" title="{L_PRINT_PM}">{L_PRINT_PM}</a><!-- IF U_FORWARD_PM --> | <!-- ENDIF --><!-- ENDIF -->
+ <!-- IF U_FORWARD_PM --><a href="{U_FORWARD_PM}" title="{L_FORWARD_PM}">{L_FORWARD_PM}</a><!-- ENDIF -->
+ </span>
+ <!-- ENDIF -->
+ </td>
+ <td align="{S_CONTENT_FLOW_END}" nowrap="nowrap">
+ <!-- IF S_VIEW_MESSAGE -->
+ <!-- IF not S_SPECIAL_FOLDER -->
+ <form name="movepm" method="post" action="{S_PM_ACTION}" style="margin:0px">
+ <input type="hidden" name="marked_msg_id[]" value="{MSG_ID}" />
+ <input type="hidden" name="cur_folder_id" value="{CUR_FOLDER_ID}" />
+ <input type="hidden" name="p" value="{MSG_ID}" />
+ <select name="dest_folder">{S_TO_FOLDER_OPTIONS}</select>&nbsp;<input class="btnlite" type="submit" name="move_pm" value="{L_MOVE_TO_FOLDER}" />
+ {S_FORM_TOKEN}
+ </form>
+ <!-- ENDIF -->
+ <!-- ELSE -->
+ <form name="sortmsg" method="post" action="{S_PM_ACTION}" style="margin:0px">
+ <span class="gensmall">{L_DISPLAY_MESSAGES}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="btnlite" type="submit" name="sort" value="{L_GO}" />
+ {S_FORM_TOKEN}
+ </form>
+ <!-- ENDIF -->
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+</table>
+
+<!-- IF not S_VIEW_MESSAGE -->
+ <div style="float: {S_CONTENT_FLOW_END};"><b class="gensmall"><a href="#" onclick="marklist('viewfolder', 'marked_msg_id', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('viewfolder', 'marked_msg_id', false); return false;">{L_UNMARK_ALL}</a></b></div>
+<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_message_header.html b/phpBB/styles/subsilver2/template/ucp_pm_message_header.html
new file mode 100644
index 0000000000..370fa673dd
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_pm_message_header.html
@@ -0,0 +1,34 @@
+
+<table class="tablebg" width="100%" cellspacing="1" cellpadding="0">
+<tr>
+ <td class="row1">
+ <table border="0" cellspacing="0" cellpadding="0" width="100%">
+ <tr>
+ <td align="{S_CONTENT_FLOW_BEGIN}">
+ <!-- IF TOTAL_MESSAGES -->
+ <table width="100%" cellspacing="1">
+ <tr>
+ <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
+ <!-- IF FOLDER_MAX_MESSAGES neq 0 -->
+ <td class="gensmall" nowrap="nowrap" width="100%">&nbsp;[ <b>{FOLDER_CUR_MESSAGES}</b>/{FOLDER_MAX_MESSAGES} {L_MESSAGES} ({FOLDER_PERCENT}%) ]&nbsp;</td>
+ <!-- ELSE -->
+ <td class="gensmall" nowrap="nowrap" width="100%">&nbsp;[ <b>{FOLDER_CUR_MESSAGES}</b> {L_MESSAGES} ]&nbsp;</td>
+ <!-- ENDIF -->
+ </tr>
+ </table>
+ <!-- ENDIF -->
+
+ <!-- IF S_VIEW_MESSAGE -->
+ <span class="gensmall">
+ <!-- IF S_DISPLAY_HISTORY -->
+ <!-- IF U_VIEW_PREVIOUS_HISTORY --><a href="{U_VIEW_PREVIOUS_HISTORY}">{L_VIEW_PREVIOUS_HISTORY}</a> | <!-- ENDIF --><!-- IF U_VIEW_NEXT_HISTORY --><a href="{U_VIEW_NEXT_HISTORY}">{L_VIEW_NEXT_HISTORY}</a> | <!-- ENDIF -->
+ <!-- ENDIF --><a href="{U_PREVIOUS_PM}">{L_VIEW_PREVIOUS_PM}</a> | <a href="{U_NEXT_PM}">{L_VIEW_NEXT_PM}</a>&nbsp;
+ </span>
+ <!-- ENDIF -->
+ </td>
+ <td align="{S_CONTENT_FLOW_END}"><!-- INCLUDE pagination.html --></td>
+ </tr>
+ </table>
+ </td>
+</tr>
+</table>
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_options.html b/phpBB/styles/subsilver2/template/ucp_pm_options.html
new file mode 100644
index 0000000000..3ff18d8c15
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_pm_options.html
@@ -0,0 +1,192 @@
+<!-- INCLUDE ucp_header.html -->
+
+<!-- IF ERROR_MESSAGE or NOTIFICATION_MESSAGE -->
+ <table border="0" cellspacing="0" cellpadding="0" width="100%">
+ <tr>
+ <td class="row3" align="center">
+ <!-- IF ERROR_MESSAGE --><span class="genmed error">{ERROR_MESSAGE}</span><!-- ENDIF -->
+ <!-- IF NOTIFICATION_MESSAGE --><span class="genmed error">{NOTIFICATION_MESSAGE}</span><!-- ENDIF -->
+ </td>
+ </tr>
+ </table>
+ <div style="padding: 2px;"></div>
+<!-- ENDIF -->
+
+<form name="ucp" method="post" action="{S_UCP_ACTION}">
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="3">{L_ADD_NEW_RULE}</th>
+</tr>
+<!-- IF S_CHECK_DEFINED -->
+ <tr>
+ <td class="row1" width="50" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><b class="gen">{L_IF}:</b></td>
+ <td class="row2" align="center" valign="top"><!-- IF S_CHECK_SELECT --><select name="check_option">{S_CHECK_OPTIONS}</select><!-- ELSE --><b class="gen">{CHECK_CURRENT}</b><input type="hidden" name="check_option" value="{CHECK_OPTION}" /><!-- ENDIF --></td>
+ <td class="row1" width="50" align="{S_CONTENT_FLOW_END}" valign="top"><!-- IF S_CHECK_SELECT --><input type="submit" name="next" value="{L_NEXT_STEP}" class="btnlite" /><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
+ </tr>
+<!-- ENDIF -->
+<!-- IF S_RULE_DEFINED -->
+ <tr>
+ <td class="row1" width="50" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><!-- IF S_RULE_SELECT --><input type="submit" name="back[rule]" value="{L_PREVIOUS_STEP}" class="btnlite" /><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
+ <td class="row2" align="center" valign="top"><!-- IF S_RULE_SELECT --><select name="rule_option">{S_RULE_OPTIONS}</select><!-- ELSE --><b class="gen">{RULE_CURRENT}</b><input type="hidden" name="rule_option" value="{RULE_OPTION}" /><!-- ENDIF --></td>
+ <td class="row1" width="50" align="{S_CONTENT_FLOW_END}" valign="top"><!-- IF S_RULE_SELECT --><input type="submit" name="next" value="{L_NEXT_STEP}" class="btnlite" /><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
+ </tr>
+<!-- ENDIF -->
+
+<!-- IF S_COND_DEFINED -->
+ <!-- IF S_COND_SELECT or COND_CURRENT -->
+ <tr>
+ <td class="row1" width="50" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><!-- IF S_COND_SELECT --><input type="submit" name="back[cond]" value="{L_PREVIOUS_STEP}" class="btnlite" /><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
+ <td class="row2" align="center" valign="top">
+ <!-- IF S_COND_SELECT -->
+ <!-- IF S_TEXT_CONDITION -->
+ <input type="text" name="rule_string" value="{CURRENT_STRING}" size="30" maxlength="250" class="post" />
+ <!-- ELSEIF S_USER_CONDITION -->
+ <input type="text" class="post" name="rule_string" value="{CURRENT_STRING}" size="20" />&nbsp;<span class="gensmall">[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span>
+ <!-- ELSEIF S_GROUP_CONDITION -->
+ <input type="hidden" name="rule_string" value="{CURRENT_STRING}" /><!-- IF S_GROUP_OPTIONS --><select name="rule_group_id">{S_GROUP_OPTIONS}</select><!-- ELSE -->{L_NO_GROUPS}<!-- ENDIF -->
+ <!-- ENDIF -->
+ <!-- ELSE -->
+ <b class="gen">{COND_CURRENT}</b>
+ <input type="hidden" name="rule_string" value="{CURRENT_STRING}" /><input type="hidden" name="rule_user_id" value="{CURRENT_USER_ID}" /><input type="hidden" name="rule_group_id" value="{CURRENT_GROUP_ID}" />
+ <!-- ENDIF -->
+ </td>
+ <td class="row1" width="50" align="{S_CONTENT_FLOW_END}" valign="top"><!-- IF S_COND_SELECT --><input type="submit" name="next" value="{L_NEXT_STEP}" class="btnlite" /><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
+ </tr>
+ <!-- ENDIF -->
+ <input type="hidden" name="cond_option" value="{COND_OPTION}" />
+<!-- ENDIF -->
+
+<!-- IF NONE_CONDITION --><input type="hidden" name="cond_option" value="none" /><!-- ENDIF -->
+
+<!-- IF S_ACTION_DEFINED -->
+ <tr>
+ <td class="row1" width="50" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><!-- IF S_ACTION_SELECT --><input type="submit" name="back[action]" value="{L_PREVIOUS_STEP}" class="btnlite" /><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
+ <td class="row2" align="center" valign="top"><!-- IF S_ACTION_SELECT --><select name="action_option">{S_ACTION_OPTIONS}</select><!-- ELSE --><b class="gen">{ACTION_CURRENT}</b><input type="hidden" name="action_option" value="{ACTION_OPTION}" /><!-- ENDIF --></td>
+ <td class="row1" width="50" align="{S_CONTENT_FLOW_END}" valign="top"><!-- IF S_ACTION_SELECT --><input type="submit" name="add_rule" value="{L_ADD_RULE}" class="btnlite" /><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
+ </tr>
+<!-- ENDIF -->
+</table>
+
+<div style="padding: 2px;"></div>
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="6">{L_DEFINED_RULES}</th>
+</tr>
+<!-- BEGIN rule -->
+ <tr>
+ <td class="row1" width="25" align="center"><span class="gen">#{rule.COUNT}</span></td>
+ <td class="row2" width="120"><span class="gen"><strong>{L_IF}</strong> {rule.CHECK}</span></td>
+ <td class="row1" width="120"><span class="gen">{rule.RULE}</span></td>
+ <td class="row2" width="120"><span class="gen"><!-- IF rule.STRING -->{rule.STRING}<!-- ENDIF --></span></td>
+ <td class="row1"><span class="gen">{rule.ACTION}<!-- IF rule.FOLDER --> -&gt; {rule.FOLDER}<!-- ENDIF --></span></td>
+ <td class="row2" width="25"><input type="submit" name="delete_rule[{rule.RULE_ID}]" value="{L_DELETE_RULE}" class="btnlite" /></td>
+ </tr>
+<!-- BEGINELSE -->
+ <tr>
+ <td colspan="6" class="row3" align="center"><span class="gen">{L_NO_RULES_DEFINED}</span></td>
+ </tr>
+<!-- END rule -->
+</table>
+
+<div style="padding: 2px;"></div>
+
+<!-- IF S_FOLDER_OPTIONS -->
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th colspan="2">{L_RENAME_FOLDER}</th>
+ </tr>
+ <tr>
+ <td class="row1" width="200"><b class="gen">{L_RENAME_FOLDER}: </b></td>
+ <td class="row1"><select name="rename_folder_id">{S_FOLDER_OPTIONS}</select></td>
+ </tr>
+ <tr>
+ <td class="row1" width="200"><b class="gen">{L_NEW_FOLDER_NAME}: </b></td>
+ <td class="row1"><input type="text" class="post" name="new_folder_name" size="30" maxlength="30" /></td>
+ </tr>
+ <tr>
+ <td class="row1" align="{S_CONTENT_FLOW_END}" colspan="2"><input class="btnlite" style="width:150px" type="submit" name="rename_folder" value="{L_RENAME}" /></td>
+ </tr>
+ </table>
+
+ <div style="padding: 2px;"></div>
+<!-- ENDIF -->
+
+<!-- IF not S_MAX_FOLDER_ZERO -->
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="2">{L_ADD_FOLDER}</th>
+</tr>
+<!-- IF S_MAX_FOLDER_REACHED -->
+ <tr>
+ <td colspan="2">{L_MAX_FOLDER_REACHED}</td>
+ </tr>
+<!-- ELSE -->
+ <tr>
+ <td class="row1" width="200"><b class="gen">{L_ADD_FOLDER}: </b></td>
+ <td class="row1"><input type="text" class="post" name="foldername" size="30" maxlength="30" /></td>
+ </tr>
+ <tr>
+ <td class="row1" align="{S_CONTENT_FLOW_END}" colspan="2"><input class="btnlite" style="width:150px" type="submit" name="addfolder" value="{L_ADD}" /></td>
+ </tr>
+<!-- ENDIF -->
+</table>
+<!-- ENDIF -->
+
+<div style="padding: 2px;"></div>
+
+<!-- IF S_FOLDER_OPTIONS -->
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th colspan="3">{L_REMOVE_FOLDER}</th>
+ </tr>
+ <tr>
+ <td class="row1" width="200"><b class="gen">{L_REMOVE_FOLDER}: </b></td>
+ <td class="row1"><select name="remove_folder_id">{S_FOLDER_OPTIONS}</select></td>
+ <td class="row1"><b class="genmed">{L_AND}</b></td>
+ </tr>
+ <tr>
+ <td class="row2" width="200">&nbsp;</td>
+ <td class="row2" colspan="2"><input type="radio" class="radio" name="remove_action" value="1" checked="checked" />&nbsp;<span class="genmed">{L_MOVE_DELETED_MESSAGES_TO} </span>&nbsp;<select name="move_to">{S_TO_FOLDER_OPTIONS}</select></td>
+ </tr>
+ <tr>
+ <td class="row2" width="200">&nbsp;</td>
+ <td class="row2" colspan="2"><input type="radio" class="radio" name="remove_action" value="2" />&nbsp;<span class="genmed">{L_DELETE_MESSAGES_IN_FOLDER}</span></td>
+ </tr>
+ <tr>
+ <td class="row2" width="200">&nbsp;</td>
+ <td class="row2" colspan="2" align="{S_CONTENT_FLOW_END}"><input class="btnlite" style="width:150px" type="submit" name="remove_folder" value="{L_REMOVE}" /></td>
+ </tr>
+ </table>
+
+ <div style="padding: 2px;"></div>
+<!-- ENDIF -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="2">{L_FOLDER_OPTIONS}</th>
+</tr>
+<tr>
+ <td class="row1" width="200"><span><b class="genmed">{L_IF_FOLDER_FULL}: </b></span></td>
+ <td class="row1"><input type="radio" class="radio" name="full_action" value="1"{S_DELETE_CHECKED} />&nbsp;<span class="genmed">{L_DELETE_OLDEST_MESSAGES}</span></td>
+</tr>
+<tr>
+ <td class="row1" width="200">&nbsp;</td>
+ <td class="row1"><input type="radio" class="radio" name="full_action" value="2"{S_MOVE_CHECKED} />&nbsp;<span class="genmed">{L_MOVE_TO_FOLDER}: </span><select name="full_move_to">{S_FULL_FOLDER_OPTIONS}</select></td>
+</tr>
+<tr>
+ <td class="row1" width="200">&nbsp;</td>
+ <td class="row1"><input type="radio" class="radio" name="full_action" value="3"{S_HOLD_CHECKED} />&nbsp;<span class="genmed">{L_HOLD_NEW_MESSAGES}</span></td>
+</tr>
+<tr>
+ <td class="row2" width="200"><b class="genmed">{L_DEFAULT_ACTION}: </b><br /><span class="gensmall">{L_DEFAULT_ACTION_EXPLAIN}</span></td>
+ <td class="row2"><span class="genmed">{DEFAULT_ACTION}</span></td>
+</tr>
+<tr>
+ <td class="row1" colspan="2" align="{S_CONTENT_FLOW_END}"><input class="btnlite" style="width:150px" type="submit" name="fullfolder" value="{L_CHANGE}" /></td>
+</tr>
+</table>
+{S_FORM_TOKEN}
+</form>
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_popup.html b/phpBB/styles/subsilver2/template/ucp_pm_popup.html
new file mode 100644
index 0000000000..68816b88a8
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_pm_popup.html
@@ -0,0 +1,37 @@
+<!-- INCLUDE simple_header.html -->
+
+<script type="text/javascript">
+// <![CDATA[
+/**
+* Jump to inbox
+*/
+function jump_to_inbox(url)
+{
+ opener.document.location.href = url.replace(/&amp;/g, '&');
+ window.close();
+}
+// ]]>
+</script>
+
+<table width="100%" border="0" cellspacing="0" cellpadding="10">
+<tr>
+ <td>
+ <table width="100%" border="0" cellspacing="1" cellpadding="4" class="tablebg">
+ <tr class="row1">
+ <td valign="top" align="center">
+ <br /><span class="gen">
+ <!-- IF S_NOT_LOGGED_IN -->
+ {L_LOGIN_CHECK_PM}
+ <!-- ELSE -->
+ {MESSAGE}<br /><br />{CLICK_TO_VIEW}
+ <!-- ENDIF -->
+ </span>
+ <br /><br /><span class="genmed"><a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a></span><br /><br />
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+</table>
+
+<!-- INCLUDE simple_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html b/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html
new file mode 100644
index 0000000000..1663502865
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html
@@ -0,0 +1,128 @@
+<!-- INCLUDE ucp_header.html -->
+
+<div id="pagecontent">
+
+<!-- IF not PROMPT -->
+ <!-- INCLUDE ucp_pm_message_header.html -->
+<!-- ENDIF -->
+
+<div style="padding: 2px;"></div>
+
+<!-- IF S_PM_ICONS -->
+ <!-- DEFINE $COLSPAN = 6 -->
+<!-- ELSE -->
+ <!-- DEFINE $COLSPAN = 5 -->
+<!-- ENDIF -->
+
+<form name="viewfolder" method="post" action="{S_PM_ACTION}" style="margin:0px">
+
+<!-- IF PROMPT -->
+ <table class="tablebg" width="100%" cellspacing="1" cellpadding="0" border="0">
+ <tr>
+ <th colspan="2" valign="middle">{L_OPTIONS}</th>
+ </tr>
+ <tr>
+ <td class="row1" width="35%">{L_DELIMITER}: </td>
+ <td class="row2"><input class="post" type="text" name="delimiter" value="," /></td>
+ </tr>
+ <tr>
+ <td class="row1" width="35%">{L_ENCLOSURE}: </td>
+ <td class="row2"><input class="post" type="text" name="enclosure" value="&#034;" /></td>
+ </tr>
+ <tr>
+ <td class="cat" colspan="2" align="center"><input type="hidden" name="export_option" value="CSV" /><input class="btnmain" type="submit" name="submit_export" value="{L_EXPORT_FOLDER}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="Reset" name="reset" /></td>
+ </tr>
+ </table>
+ {S_FORM_TOKEN}
+
+</form>
+<!-- ELSE -->
+
+ <table class="tablebg" width="100%" cellspacing="1" cellpadding="0" border="0">
+ <!-- IF NUM_NOT_MOVED or NUM_REMOVED -->
+ <tr>
+ <td class="row3" colspan="{$COLSPAN}" align="center"><span class="gen">
+ <!-- IF NUM_REMOVED -->
+ {RULE_REMOVED_MESSAGES}
+ <!-- IF NUM_NOT_MOVED --><br /><!-- ENDIF -->
+ <!-- ENDIF -->
+ <!-- IF NUM_NOT_MOVED -->
+ {NOT_MOVED_MESSAGES}<br />{RELEASE_MESSAGE_INFO}
+ <!-- ENDIF -->
+ </span></td>
+ </tr>
+ <!-- ENDIF -->
+ <tr>
+ <th colspan="<!-- IF S_PM_ICONS -->3<!-- ELSE -->2<!-- ENDIF -->">&nbsp;{L_SUBJECT}&nbsp;</th>
+ <th>&nbsp;<!-- IF S_SHOW_RECIPIENTS -->{L_RECIPIENTS}<!-- ELSE -->{L_AUTHOR}<!-- ENDIF -->&nbsp;</th>
+ <th>&nbsp;{L_SENT_AT}&nbsp;</th>
+ <th>&nbsp;{L_MARK}&nbsp;</th>
+ </tr>
+
+ <!-- BEGIN messagerow -->
+ <tr>
+ <td class="row1" width="25" align="center" nowrap="nowrap">{messagerow.FOLDER_IMG}</td>
+ <!-- IF S_PM_ICONS -->
+ <td class="row1" width="25" align="center">{messagerow.PM_ICON_IMG}</td>
+ <!-- ENDIF -->
+
+ <!-- IF messagerow.S_PM_DELETED --><td class="row3"><!-- ELSE --><td class="row1"><!-- ENDIF -->
+ <!-- IF not messagerow.PM_IMG and messagerow.PM_CLASS -->
+ <span class="{messagerow.PM_CLASS}" style="float: {S_CONTENT_FLOW_BEGIN};"><img src="images/spacer.gif" width="10" height="10" alt="" /></span>&nbsp;
+ <!-- ELSEIF messagerow.PM_IMG -->
+ {messagerow.PM_IMG}&nbsp;
+ <!-- ENDIF -->
+
+ <span class="topictitle">
+ {messagerow.ATTACH_ICON_IMG}
+ <!-- IF messagerow.S_PM_DELETED -->
+ {L_MESSAGE_REMOVED_FROM_OUTBOX}<br />
+ <a href="{messagerow.U_REMOVE_PM}" style="float: {S_CONTENT_FLOW_END};">{L_DELETE_MESSAGE}</a>
+ <!-- ELSE -->
+ <a href="{messagerow.U_VIEW_PM}">{messagerow.SUBJECT}</a>
+ <!-- ENDIF -->
+ <!-- IF messagerow.S_AUTHOR_DELETED -->
+ <br /><em class="gensmall">{L_PM_FROM_REMOVED_AUTHOR}</em>
+ <!-- ENDIF -->
+ </span></td>
+
+ <td class="row1" width="100" align="center"><p class="topicauthor"><!-- IF S_SHOW_RECIPIENTS -->{messagerow.RECIPIENTS}<!-- ELSE -->{messagerow.MESSAGE_AUTHOR_FULL}<!-- ENDIF --></p></td>
+ <td class="row1" width="120" align="center"><p class="topicdetails">{messagerow.SENT_TIME}</p></td>
+ <td class="row1" width="20" align="center"><p class="topicdetails"><input type="checkbox" class="radio" name="marked_msg_id[]" value="{messagerow.MESSAGE_ID}" /></p></td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="{$COLSPAN}" height="30" align="center" valign="middle"><span class="gen">
+ <!-- IF S_COMPOSE_PM_VIEW and S_NO_AUTH_SEND_MESSAGE -->
+ <!-- IF S_USER_NEW -->{L_USER_NEW_PERMISSION_DISALLOWED}<!-- ELSE -->{L_NO_AUTH_SEND_MESSAGE}<!-- ENDIF -->
+ <!-- ELSE -->
+ {L_NO_MESSAGES}
+ <!-- ENDIF -->
+ </span></td>
+ </tr>
+ <!-- END messagerow -->
+</table>
+
+<input type="hidden" name="cur_folder_id" value="{CUR_FOLDER_ID}" />
+
+<table border="0" cellspacing="0" cellpadding="0" width="100%">
+<tr>
+ <td class="cat">
+<!-- IF .messagerow -->
+ <div style="float: {S_CONTENT_FLOW_BEGIN};"><select name="export_option"><option value="CSV">{L_EXPORT_AS_CSV}</option><option value="CSV_EXCEL">{L_EXPORT_AS_CSV_EXCEL}</option><option value="XML">{L_EXPORT_AS_XML}</option></select>&nbsp;<input class="btnlite" type="submit" name="submit_export" value="{L_EXPORT_FOLDER}" /></div>
+ <div style="float: {S_CONTENT_FLOW_END};"><select name="mark_option">{S_MARK_OPTIONS}{S_MOVE_MARKED_OPTIONS}</select>&nbsp;<input class="btnlite" type="submit" name="submit_mark" value="{L_GO}" />&nbsp;</div>
+<!-- ENDIF -->
+ </td>
+</tr>
+</table>
+
+<div style="padding: 2px;"></div>
+<!-- INCLUDE ucp_pm_message_footer.html -->
+
+<!-- ENDIF -->
+
+<br clear="all" />
+
+</div>
+
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html b/phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html
new file mode 100644
index 0000000000..4971506a6d
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html
@@ -0,0 +1,124 @@
+<!-- INCLUDE ucp_header.html -->
+
+<div id="pagecontent">
+
+<!-- INCLUDE ucp_pm_message_header.html -->
+<div style="padding: 2px;"></div>
+
+<table class="tablebg" width="100%" cellspacing="1" cellpadding="4">
+
+<tr class="row1">
+ <td class="genmed" nowrap="nowrap" width="150"><b>{L_PM_SUBJECT}:</b></td>
+ <td class="gen">{SUBJECT}</td>
+</tr>
+
+<tr class="row1">
+ <td class="genmed" nowrap="nowrap" width="150"><b>{L_PM_FROM}:</b></td>
+ <td class="gen">{MESSAGE_AUTHOR_FULL}</td>
+</tr>
+
+<tr class="row1">
+ <td class="genmed" nowrap="nowrap" width="150"><b>{L_SENT_AT}:</b></td>
+ <td class="gen">{SENT_DATE}</td>
+</tr>
+
+<!-- IF S_TO_RECIPIENT -->
+ <tr class="row1">
+ <td class="genmed" nowrap="nowrap" width="150"><b>{L_TO}:</b></td>
+ <td class="gen">
+ <!-- BEGIN to_recipient -->
+ <!-- IF to_recipient.IS_GROUP --><span class="sep"><a href="{to_recipient.U_VIEW}">{to_recipient.NAME}</a></span><!-- ELSE -->{to_recipient.NAME_FULL}&nbsp;<!-- ENDIF -->
+ <!-- END to_recipient -->
+ </td>
+ </tr>
+<!-- ENDIF -->
+
+<!-- IF S_BCC_RECIPIENT -->
+ <tr class="row1">
+ <td class="genmed" nowrap="nowrap" width="150"><b>{L_BCC}:</b></td>
+ <td class="gen">
+ <!-- BEGIN bcc_recipient -->
+ <!-- IF bcc_recipient.IS_GROUP --><span class="sep"><a href="{bcc_recipient.U_VIEW}">{bcc_recipient.NAME}</a></span><!-- ELSE -->{bcc_recipient.NAME_FULL}&nbsp;<!-- ENDIF -->
+ <!-- END bcc_recipient -->
+ </td>
+ </tr>
+<!-- ENDIF -->
+</table>
+
+<div style="padding: 2px;"></div>
+
+<table class="tablebg" width="100%" cellspacing="1" cellpadding="0">
+
+<tr>
+ <th nowrap="nowrap">{L_MESSAGE}</th>
+</tr>
+
+<tr>
+ <td class="spacer" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
+</tr>
+
+<tr class="row1">
+ <td valign="top">
+ <table width="100%" cellspacing="5">
+ <tr>
+ <td>
+ <div class="postbody">{MESSAGE}</div>
+
+ <!-- IF S_HAS_ATTACHMENTS -->
+ <br clear="all" /><br />
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
+ </tr>
+ <!-- BEGIN attachment -->
+ <tr>
+ <td class="row2">{attachment.DISPLAY_ATTACHMENT}</td>
+ </tr>
+ <!-- END attachment -->
+ </table>
+ <!-- ENDIF -->
+
+ <!-- IF S_DISPLAY_NOTICE -->
+ <span class="gensmall error"><br /><br />{L_DOWNLOAD_NOTICE}</span>
+ <!-- ENDIF -->
+ <!-- IF SIGNATURE -->
+ <span class="postbody"><br />_________________<br />{SIGNATURE}</span>
+ <!-- ENDIF -->
+ <!-- IF EDITED_MESSAGE -->
+ <span class="gensmall">{EDITED_MESSAGE}</span>
+ <!-- ENDIF -->
+
+ <!-- IF not S_HAS_ATTACHMENTS --><br clear="all" /><br /><!-- ENDIF -->
+
+ <table width="100%" cellspacing="0">
+ <tr valign="middle">
+ <td class="gensmall" align="{S_CONTENT_FLOW_END}"> <!-- IF U_REPORT --><a href="{U_REPORT}">{REPORT_IMG}</a> <!-- ENDIF --><!-- IF U_DELETE --><a href="{U_DELETE}">{DELETE_IMG}</a> <!-- ENDIF --></td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+<tr class="row1">
+ <td><div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF U_MESSAGE_AUTHOR --><a href="{U_MESSAGE_AUTHOR}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF U_EMAIL --><a href="{U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF -->&nbsp;</div> <div class="gensmall" style="float: {S_CONTENT_FLOW_END};"><!-- IF U_EDIT --><a href="{U_EDIT}">{EDIT_IMG}</a> <!-- ENDIF --> <!-- IF U_QUOTE --><a href="{U_QUOTE}">{QUOTE_IMG}</a> <!-- ENDIF --> <!-- IF U_POST_REPLY_PM --><a href="{U_POST_REPLY_PM}">{REPLY_IMG}</a><!-- ENDIF -->&nbsp;</div></td>
+</tr>
+
+<tr>
+ <td class="spacer" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
+</tr>
+</table>
+
+<div style="padding: 2px;"></div>
+<!-- INCLUDE ucp_pm_message_footer.html -->
+
+<br clear="all" />
+
+</div>
+
+<!-- IF S_DISPLAY_HISTORY --><!-- INCLUDE ucp_pm_history.html --><!-- ENDIF -->
+
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html b/phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html
new file mode 100644
index 0000000000..7963d76765
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<meta http-equiv="Content-Language" content="{S_USER_LANG}">
+<title>{SITENAME} :: {PAGE_TITLE}</title>
+
+<style type="text/css">
+<!--
+
+body {
+ font-family: Verdana,serif;
+ font-size: 10pt;
+}
+
+td {
+ font-family: Verdana,serif;
+ font-size: 10pt;
+ line-height: 150%;
+}
+
+.code,
+.quote {
+ font-size: smaller;
+ border: black solid 1px;
+}
+
+.forum {
+ font-family: Arial,Helvetica,sans-serif;
+ font-weight: bold;
+ font-size: 18pt;
+}
+
+.topic {
+ font-family: Arial,Helvetica,sans-serif;
+ font-size: 14pt;
+ font-weight: bold;
+}
+
+.gensmall {
+ font-size: 8pt;
+}
+
+hr {
+ color: #888;
+ height: 3px;
+ border-style: solid;
+}
+
+hr.sep {
+ color: #aaa;
+ height: 1px;
+ border-style: dashed;
+}
+//-->
+</style>
+
+</head>
+<body>
+
+<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
+<tr>
+ <td colspan="2" align="center"><span class="Forum">{SITENAME}</span><br /><span class="gensmall">{L_PRIVATE_MESSAGING}</a></span></td>
+</tr>
+<tr>
+ <td colspan="2"><br /></td>
+</tr>
+<tr>
+ <td><span class="topic">{SUBJECT}</span><br /></td>
+ <td align="{S_CONTENT_FLOW_END}" valign="bottom"><span class="gensmall">{PAGE_NUMBER}</span></td>
+</tr>
+</table>
+
+<hr width="85%" />
+
+<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
+<tr>
+ <td width="10%" nowrap="nowrap">{L_PM_FROM}:&nbsp;</td>
+ <td><b>{MESSAGE_AUTHOR}</b> [ {SENT_DATE} ]</td>
+</tr>
+
+<!-- IF S_TO_RECIPIENT -->
+ <tr>
+ <td width="10%" nowrap="nowrap">{L_TO}:</td>
+ <td>
+ <!-- BEGIN to_recipient -->
+ <!-- IF to_recipient.COLOUR --><span style="color:{to_recipient.COLOUR}"><!-- ELSE --><span<!-- IF to_recipient.IS_GROUP --> class="sep"<!-- ENDIF -->><!-- ENDIF -->{to_recipient.NAME}</span>&nbsp;
+ <!-- END to_recipient -->
+ </td>
+ </tr>
+<!-- ENDIF -->
+
+<!-- IF S_BCC_RECIPIENT -->
+ <tr>
+ <td width="10%" nowrap="nowrap">{L_BCC}:</td>
+ <td>
+ <!-- BEGIN bcc_recipient -->
+ <!-- IF bcc_recipient.COLOUR --><span style="color:{bcc_recipient.COLOUR}"><!-- ELSE --><span<!-- IF bcc_recipient.IS_GROUP --> class="sep"<!-- ENDIF -->><!-- ENDIF -->{bcc_recipient.NAME}</span>&nbsp;
+ <!-- END bcc_recipient -->
+ </td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <td colspan="2"><hr class="sep" />{MESSAGE}</td>
+</tr>
+</table>
+
+<hr width="85%" />
+<!--
+ We request you retain the full copyright notice below including the link to www.phpbb.com.
+ This not only gives respect to the large amount of time given freely by the developers
+ but also helps build interest, traffic and use of phpBB3. If you (honestly) cannot retain
+ the full copyright we ask you at least leave in place the "Powered by phpBB" line. If you
+ refuse to include even this then support on our forums may be affected.
+
+ The phpBB Group : 2006
+// -->
+
+<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
+<tr>
+ <td><span class="gensmall">{PAGE_NUMBER}</span></td>
+ <td align="{S_CONTENT_FLOW_END}"><span class="gensmall">{S_TIMEZONE}</span></td>
+</tr>
+<tr>
+ <td colspan="2" align="center"><span class="gensmall">Powered by phpBB &copy; 2000, 2002, 2005, 2007 phpBB Group<br />http://www.phpbb.com/</span></td>
+</tr>
+</table>
+
+</body>
+</html>
diff --git a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
new file mode 100644
index 0000000000..e2266b7d38
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
@@ -0,0 +1,98 @@
+<!-- INCLUDE ucp_header.html -->
+
+<script type="text/javascript">
+// <![CDATA[
+ /**
+ * Set display of page element
+ * s[-1,0,1] = hide,toggle display,show
+ */
+ function dE(n,s)
+ {
+ var e = document.getElementById(n);
+ if (!s)
+ {
+ s = (e.style.display == '') ? -1 : 1;
+ }
+ e.style.display = (s == 1) ? 'block' : 'none';
+ }
+
+ var default_dateformat = '{A_DEFAULT_DATEFORMAT}';
+// ]]>
+</script>
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="2" valign="middle">{L_TITLE}</th>
+</tr>
+<!-- IF ERROR -->
+ <tr>
+ <td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_SHOW_EMAIL}:</b></td>
+ <td class="row2"><input type="radio" class="radio" name="viewemail" value="1"<!-- IF S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="viewemail" value="0"<!-- IF not S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_ADMIN_EMAIL}:</b></td>
+ <td class="row2"><input type="radio" class="radio" name="massemail" value="1"<!-- IF S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="massemail" value="0"<!-- IF not S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_ALLOW_PM}:</b><br /><span class="gensmall">{L_ALLOW_PM_EXPLAIN}</span></td>
+ <td class="row2"><input type="radio" class="radio" name="allowpm" value="1"<!-- IF S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="allowpm" value="0"<!-- IF not S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
+</tr>
+<!-- IF S_CAN_HIDE_ONLINE -->
+ <tr>
+ <td class="row1" width="50%"><b class="genmed">{L_HIDE_ONLINE}:</b><br /><span class="gensmall">{L_HIDE_ONLINE_EXPLAIN}</span></td>
+ <td class="row2"><input type="radio" class="radio" name="hideonline" value="1"<!-- IF S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="hideonline" value="0"<!-- IF not S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
+ </tr>
+<!-- ENDIF -->
+<!-- IF S_SELECT_NOTIFY -->
+ <tr>
+ <td class="row1" width="50%"><b class="genmed">{L_NOTIFY_METHOD}:</b><br /><span class="gensmall">{L_NOTIFY_METHOD_EXPLAIN}</span></td>
+ <td class="row2"><input type="radio" class="radio" name="notifymethod" value="0"<!-- IF S_NOTIFY_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NOTIFY_METHOD_EMAIL}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="notifymethod" value="1"<!-- IF S_NOTIFY_IM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NOTIFY_METHOD_IM}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="notifymethod" value="2"<!-- IF S_NOTIFY_BOTH --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NOTIFY_METHOD_BOTH}</span></td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_NOTIFY_ON_PM}:</b></td>
+ <td class="row2"><input type="radio" class="radio" name="notifypm" value="1"<!-- IF S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="notifypm" value="0"<!-- IF not S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_POPUP_ON_PM}:</b></td>
+ <td class="row2"><input type="radio" class="radio" name="popuppm" value="1"<!-- IF S_POPUP_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="popuppm" value="0"<!-- IF not S_POPUP_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_BOARD_LANGUAGE}:</b></td>
+ <td class="row2"><select name="lang">{S_LANG_OPTIONS}</select></td>
+</tr>
+<!-- IF S_STYLE_OPTIONS -->
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_BOARD_STYLE}:</b></td>
+ <td class="row2"><select name="style">{S_STYLE_OPTIONS}</select></td>
+</tr>
+<!-- ENDIF -->
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_BOARD_TIMEZONE}:</b></td>
+ <td class="row2">
+ <select id="tz" name="tz">{S_TZ_OPTIONS}</select>
+ </td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_BOARD_DST}:</b></td>
+ <td class="row2"><input type="radio" class="radio" name="dst" value="1"<!-- IF S_DST --> checked="checked"<!-- ENDIF --> /> <span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="dst" value="0"<!-- IF not S_DST --> checked="checked"<!-- ENDIF --> /> <span class="genmed">{L_NO}</span></td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_BOARD_DATE_FORMAT}:</b><br /><span class="gensmall">{L_BOARD_DATE_FORMAT_EXPLAIN}</span></td>
+ <td class="row2">
+ <select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">
+ {S_DATEFORMAT_OPTIONS}
+ </select>
+ <div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" class="post" style="margin-top: 3px;" /></div>
+ </td>
+</tr>
+<tr>
+ <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
+</tr>
+</table>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_prefs_post.html b/phpBB/styles/subsilver2/template/ucp_prefs_post.html
new file mode 100644
index 0000000000..edf0070baa
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_prefs_post.html
@@ -0,0 +1,33 @@
+<!-- INCLUDE ucp_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="2" valign="middle">{L_TITLE}</th>
+</tr>
+<!-- IF ERROR -->
+ <tr>
+ <td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_DEFAULT_BBCODE}:</b></td>
+ <td class="row2"><input type="radio" class="radio" name="bbcode" value="1"<!-- IF S_BBCODE --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="bbcode" value="0"<!-- IF not S_BBCODE --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_DEFAULT_SMILIES}:</b></td>
+ <td class="row2"><input type="radio" class="radio" name="smilies" value="1"<!-- IF S_SMILIES --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="smilies" value="0"<!-- IF not S_SMILIES --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_DEFAULT_ADD_SIG}:</b></td>
+ <td class="row2"><input type="radio" class="radio" name="sig" value="1"<!-- IF S_SIG --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="sig" value="0"<!-- IF not S_SIG --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_DEFAULT_NOTIFY}:</b></td>
+ <td class="row2"><input type="radio" class="radio" name="notify" value="1"<!-- IF S_NOTIFY --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="notify" value="0"<!-- IF not S_NOTIFY --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
+</tr>
+<tr>
+ <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
+</tr>
+</table>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_prefs_view.html b/phpBB/styles/subsilver2/template/ucp_prefs_view.html
new file mode 100644
index 0000000000..b97bcfde00
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_prefs_view.html
@@ -0,0 +1,73 @@
+<!-- INCLUDE ucp_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="2" valign="middle">{L_TITLE}</th>
+</tr>
+<!-- IF ERROR -->
+ <tr>
+ <td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_IMAGES}:</b></td>
+ <td class="row2"><input type="radio" class="radio" name="images" value="1"<!-- IF S_IMAGES --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="images" value="0"<!-- IF not S_IMAGES --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_FLASH}:</b></td>
+ <td class="row2"><input type="radio" class="radio" name="flash" value="1"<!-- IF S_FLASH --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="flash" value="0"<!-- IF not S_FLASH --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_SMILIES}:</b></td>
+ <td class="row2"><input type="radio" class="radio" name="smilies" value="1"<!-- IF S_SMILIES --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="smilies" value="0"<!-- IF not S_SMILIES --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_SIGS}:</b></td>
+ <td class="row2"><input type="radio" class="radio" name="sigs" value="1"<!-- IF S_SIGS --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="sigs" value="0"<!-- IF not S_SIGS --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_AVATARS}:</b></td>
+ <td class="row2"><input type="radio" class="radio" name="avatars" value="1"<!-- IF S_AVATARS --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="avatars" value="0"<!-- IF not S_AVATARS --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
+</tr>
+<!-- IF S_CHANGE_CENSORS -->
+ <tr>
+ <td class="row1" width="50%"><b class="genmed">{L_DISABLE_CENSORS}:</b></td>
+ <td class="row2"><input type="radio" class="radio" name="wordcensor" value="1"<!-- IF S_DISABLE_CENSORS --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="wordcensor" value="0"<!-- IF not S_DISABLE_CENSORS --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <td colspan="2" class="spacer"></td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_TOPICS_DAYS}:</b></td>
+ <td class="row2">{S_TOPIC_SORT_DAYS}</td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_TOPICS_KEY}:</b></td>
+ <td class="row2">{S_TOPIC_SORT_KEY}</td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_TOPICS_DIR}:</b></td>
+ <td class="row2">{S_TOPIC_SORT_DIR}</td>
+</tr>
+<tr>
+ <td colspan="2" class="spacer"></td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_POSTS_DAYS}:</b></td>
+ <td class="row2">{S_POST_SORT_DAYS}</td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_POSTS_KEY}:</b></td>
+ <td class="row2">{S_POST_SORT_KEY}</td>
+</tr>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_POSTS_DIR}:</b></td>
+ <td class="row2">{S_POST_SORT_DIR}</td>
+</tr>
+<tr>
+ <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
+</tr>
+</table>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_profile_avatar.html b/phpBB/styles/subsilver2/template/ucp_profile_avatar.html
new file mode 100644
index 0000000000..c981b8df75
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_profile_avatar.html
@@ -0,0 +1,87 @@
+<!-- INCLUDE ucp_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="2" valign="middle">{L_TITLE}</th>
+</tr>
+<!-- IF ERROR -->
+ <tr>
+ <td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <td class="row1" width="35%"><b class="genmed">{L_CURRENT_IMAGE}: </b><br /><span class="gensmall">{L_AVATAR_EXPLAIN}</span></td>
+ <td class="row2" align="center"><br />
+ <!-- IF AVATAR -->{AVATAR}<br /><br /><input type="checkbox" class="radio" name="delete" />&nbsp;<span class="gensmall">{L_DELETE_AVATAR}</span>
+ <!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" />
+ <!-- ENDIF --></td>
+</tr>
+<!-- IF not S_AVATARS_ENABLED -->
+ <tr>
+ <td class="row3" colspan="2" align="center">{L_AVATAR_FEATURES_DISABLED}</td>
+ </tr>
+<!-- ENDIF -->
+<!-- IF S_UPLOAD_AVATAR_FILE -->
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_UPLOAD_AVATAR_FILE}: </b></td>
+ <td class="row2"><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" /><input class="post" type="file" name="uploadfile" /></td>
+ </tr>
+<!-- ENDIF -->
+<!-- IF S_UPLOAD_AVATAR_URL -->
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_UPLOAD_AVATAR_URL}: </b><br /><span class="gensmall">{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></td>
+ <td class="row2"><input class="post" type="text" name="uploadurl" size="40" value="{AVATAR_URL}" /></td>
+ </tr>
+<!-- ENDIF -->
+<!-- IF S_LINK_AVATAR -->
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_LINK_REMOTE_AVATAR}: </b><br /><span class="gensmall">{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></td>
+ <td class="row2"><input class="post" type="text" name="remotelink" size="40" value="{AVATAR_REMOTE}" /></td>
+ </tr>
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_LINK_REMOTE_SIZE}: </b><br /><span class="gensmall">{L_LINK_REMOTE_SIZE_EXPLAIN}</span></td>
+ <td class="row2"><input class="post" type="text" name="width" size="3" value="{AVATAR_WIDTH}" /> <span class="gen">px X </span> <input class="post" type="text" name="height" size="3" value="{AVATAR_HEIGHT}" /> <span class="gen">px</span></td>
+ </tr>
+<!-- ENDIF -->
+<!-- IF S_DISPLAY_GALLERY -->
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_AVATAR_GALLERY}: </b></td>
+ <td class="row2"><strong><a href="{U_GALLERY}">{L_DISPLAY_GALLERY}</a></strong></td>
+ </tr>
+<!-- ENDIF -->
+
+<!-- IF S_IN_AVATAR_GALLERY -->
+ <tr>
+ <th colspan="2">{L_AVATAR_GALLERY}</th>
+ </tr>
+ <tr>
+ <td class="cat" colspan="2" align="center" valign="middle"><span class="genmed">{L_AVATAR_CATEGORY}: </span><select name="category">{S_CAT_OPTIONS}</select>&nbsp; <input class="btnlite" tabindex="0" type="submit" value="{L_GO}" name="display_gallery" /></td>
+ </tr>
+ <tr>
+ <td class="row1" colspan="2" align="center">
+ <table cellspacing="1" cellpadding="4" border="0">
+ <!-- BEGIN avatar_row -->
+ <tr>
+ <!-- BEGIN avatar_column -->
+ <td class="row1" align="center"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" alt="{avatar_row.avatar_column.AVATAR_NAME}" title="{avatar_row.avatar_column.AVATAR_NAME}" /></td>
+ <!-- END avatar_column -->
+ </tr>
+ <tr>
+ <!-- BEGIN avatar_option_column -->
+ <td class="row2" align="center"><input type="radio" class="radio" name="avatar_select" value="{avatar_row.avatar_option_column.S_OPTIONS_AVATAR}" /></td>
+ <!-- END avatar_option_column -->
+ </tr>
+ <!-- END avatar_row -->
+ </table>
+ </td>
+ </tr>
+<!-- ENDIF -->
+
+<!-- IF S_DISPLAY_GALLERY or S_IN_AVATAR_GALLERY or S_LINK_AVATAR or S_UPLOAD_AVATAR_URL or S_UPLOAD_AVATAR_FILE or AVATAR -->
+ <tr>
+ <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<!-- IF S_IN_AVATAR_GALLERY --><input class="btnlite" type="submit" name="cancel" value="{L_CANCEL}" /><!-- ELSE --><input class="btnlite" type="reset" value="{L_RESET}" name="reset" /><!-- ENDIF --></td>
+ </tr>
+<!-- ENDIF -->
+</table>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html
new file mode 100644
index 0000000000..c08b873834
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html
@@ -0,0 +1,72 @@
+<!-- INCLUDE ucp_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="2" valign="middle">{L_TITLE}</th>
+</tr>
+<!-- IF ERROR -->
+ <tr>
+ <td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <td class="row1" colspan="2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td>
+</tr>
+<tr>
+ <td class="row1" width="35%"><b class="genmed">{L_UCP_ICQ}: </b></td>
+ <td class="row2"><input class="post" type="text" name="icq" size="30" maxlength="15" value="{ICQ}" /></td>
+</tr>
+<tr>
+ <td class="row1" width="35%"><b class="genmed">{L_UCP_AIM}: </b></td>
+ <td class="row2"><input class="post" type="text" name="aim" size="30" maxlength="255" value="{AIM}" /></td>
+</tr>
+<tr>
+ <td class="row1" width="35%"><b class="genmed">{L_UCP_MSNM}: </b></td>
+ <td class="row2"><input class="post" type="text" name="msn" size="30" maxlength="255" value="{MSN}" /></td>
+</tr>
+<tr>
+ <td class="row1" width="35%"><b class="genmed">{L_UCP_YIM}: </b></td>
+ <td class="row2"><input class="post" type="text" name="yim" size="30" maxlength="255" value="{YIM}" /></td>
+</tr>
+<tr>
+ <td class="row1" width="35%"><b class="genmed">{L_UCP_JABBER}: </b></td>
+ <td class="row2"><input class="post" type="text" name="jabber" size="30" maxlength="255" value="{JABBER}" /></td>
+</tr>
+<tr>
+ <td class="row1" width="35%"><b class="genmed">{L_WEBSITE}: </b></td>
+ <td class="row2"><input class="post" type="text" name="website" size="30" maxlength="255" value="{WEBSITE}" /></td>
+</tr>
+<tr>
+ <td class="row1" width="35%"><b class="genmed">{L_LOCATION}: </b></td>
+ <td class="row2"><input class="post" type="text" name="location" size="30" maxlength="100" value="{LOCATION}" /></td>
+</tr>
+<tr>
+ <td class="row1" width="35%"><b class="genmed">{L_OCCUPATION}: </b></td>
+ <td class="row2"><textarea class="post" name="occupation" rows="3" cols="30">{OCCUPATION}</textarea></td>
+</tr>
+<tr>
+ <td class="row1" width="35%"><b class="genmed">{L_INTERESTS}: </b></td>
+ <td class="row2"><textarea class="post" name="interests" rows="3" cols="30">{INTERESTS}</textarea></td>
+</tr>
+<!-- IF S_BIRTHDAYS_ENABLED -->
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_BIRTHDAY}: </b><br /><span class="gensmall">{L_BIRTHDAY_EXPLAIN}</span></td>
+ <td class="row2"><span class="genmed">{L_DAY}:</span> <select name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> <span class="genmed">{L_MONTH}:</span> <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> <span class="genmed">{L_YEAR}:</span> <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></td>
+ </tr>
+<!-- ENDIF -->
+<!-- BEGIN profile_fields -->
+ <tr>
+ <td class="row1" width="35%">
+ <b class="genmed">{profile_fields.LANG_NAME}: </b>
+ <!-- IF profile_fields.S_REQUIRED --><b>*</b><!-- ENDIF -->
+ <!-- IF profile_fields.LANG_EXPLAIN --><br /><span class="gensmall">{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF -->
+ </td>
+ <td class="row2">{profile_fields.FIELD}<!-- IF profile_fields.ERROR --><br /><span class="gensmall error">{profile_fields.ERROR}</span><!-- ENDIF --></td>
+ </tr>
+<!-- END profile_fields -->
+<tr>
+ <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
+</tr>
+</table>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html b/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html
new file mode 100644
index 0000000000..78fb5a9628
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html
@@ -0,0 +1,53 @@
+<!-- INCLUDE ucp_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="2" valign="middle">{L_TITLE}</th>
+</tr>
+<!-- IF S_FORCE_PASSWORD -->
+ <tr>
+ <td class="row3" colspan="2" align="center"><span class="gensmall">{L_FORCE_PASSWORD_EXPLAIN}</span></td>
+ </tr>
+<!-- ENDIF -->
+<!-- IF ERROR -->
+ <tr>
+ <td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <td class="row1" width="35%"><b class="genmed">{L_USERNAME}: </b><br /><span class="gensmall">{L_USERNAME_EXPLAIN}</span></td>
+ <td class="row2"><!-- IF S_CHANGE_USERNAME --><input type="text" class="post" name="username" size="30" value="{USERNAME}" /><!-- ELSE --><b class="gen">{USERNAME}</b><!-- ENDIF --></td>
+</tr>
+<tr>
+ <td class="row1" width="35%"><b class="genmed">{L_EMAIL_ADDRESS}: </b></td>
+ <td class="row2"><!-- IF S_CHANGE_EMAIL --><input type="text" class="post" name="email" size="30" maxlength="100" value="{EMAIL}" /><!-- ELSE --><b class="gen">{EMAIL}</b><!-- ENDIF --></td>
+</tr>
+<!-- IF S_CHANGE_EMAIL -->
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_CONFIRM_EMAIL}: </b><br /><span class="gensmall">{L_CONFIRM_EMAIL_EXPLAIN}</span></td>
+ <td class="row2"><input type="text" class="post" name="email_confirm" size="30" maxlength="100" value="{CONFIRM_EMAIL}" /></td>
+ </tr>
+<!-- ENDIF -->
+<!-- IF S_CHANGE_PASSWORD -->
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_NEW_PASSWORD}: </b><br /><span class="gensmall">{L_CHANGE_PASSWORD_EXPLAIN}</span></td>
+ <td class="row2"><input type="password" class="post" name="new_password" size="30" maxlength="255" value="{NEW_PASSWORD}" /></td>
+ </tr>
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_CONFIRM_PASSWORD}: </b><br /><span class="gensmall">{L_CONFIRM_PASSWORD_EXPLAIN}</span></td>
+ <td class="row2"><input type="password" class="post" name="password_confirm" size="30" maxlength="255" value="{PASSWORD_CONFIRM}" /></td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <th colspan="2">{L_CONFIRM_CHANGES}</th>
+</tr>
+<tr>
+ <td class="row1" width="35%"><b class="genmed">{L_CURRENT_PASSWORD}: </b><br /><span class="gensmall">{L_CURRENT_PASSWORD_EXPLAIN}</span></td>
+ <td class="row2"><input type="password" class="post" name="cur_password" size="30" maxlength="255" value="{CUR_PASSWORD}" /></td>
+</tr>
+<tr>
+ <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
+</tr>
+</table>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_profile_signature.html b/phpBB/styles/subsilver2/template/ucp_profile_signature.html
new file mode 100644
index 0000000000..2b396ea0df
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_profile_signature.html
@@ -0,0 +1,110 @@
+<!-- INCLUDE ucp_header.html -->
+
+<!-- DEFINE $S_SIGNATURE = 1 -->
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="2">{L_TITLE}</th>
+</tr>
+<tr>
+ <td colspan="2" class="row1">{L_SIGNATURE_EXPLAIN}</td>
+</tr>
+
+<!-- IF ERROR -->
+ <tr>
+ <td class="row3" colspan="2" align="center"><span class="genmed error">{ERROR}</span></td>
+ </tr>
+<!-- ENDIF -->
+
+<tr>
+ <td colspan="2" class="row2">
+ <script type="text/javascript">
+ // <![CDATA[
+ var form_name = 'ucp';
+ var text_name = 'signature';
+ // ]]>
+ </script>
+
+ <table cellspacing="0" cellpadding="2" border="0" width="99%">
+ <!-- INCLUDE posting_buttons.html -->
+ <tr>
+ <td colspan="2"><textarea class="post" name="signature" rows="10" cols="76" style="width: 90%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();">{SIGNATURE}</textarea></td>
+ </tr>
+ <!-- IF S_BBCODE_ALLOWED -->
+ <tr>
+ <td colspan="2">
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr>
+ <td align="{S_CONTENT_FLOW_BEGIN}">
+ <script type="text/javascript">
+ // <![CDATA[
+ colorPalette('h', 6, 5)
+ // ]]>
+ </script>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+ </td>
+</tr>
+<tr>
+ <td class="row1" valign="top"><b class="genmed">{L_OPTIONS}</b><br />
+ <table cellspacing="2" cellpadding="0" border="0">
+ <tr>
+ <td class="gensmall">{BBCODE_STATUS}</td>
+ </tr>
+ <tr>
+ <td class="gensmall">{IMG_STATUS}</td>
+ </tr>
+ <tr>
+ <td class="gensmall">{FLASH_STATUS}</td>
+ </tr>
+ <tr>
+ <td class="gensmall">{URL_STATUS}</td>
+ </tr>
+ <tr>
+ <td class="gensmall">{SMILIES_STATUS}</td>
+ </tr>
+ </table>
+ </td>
+ <td class="row2" valign="top">
+ <table cellspacing="0" cellpadding="1" border="0">
+ <!-- IF S_BBCODE_ALLOWED -->
+ <tr>
+ <td><input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} /></td>
+ <td class="gen">{L_DISABLE_BBCODE}</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF S_SMILIES_ALLOWED -->
+ <tr>
+ <td><input type="checkbox" class="radio" name="disable_smilies"{S_SMILIES_CHECKED} /></td>
+ <td class="gen">{L_DISABLE_SMILIES}</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF S_LINKS_ALLOWED -->
+ <tr>
+ <td><input type="checkbox" class="radio" name="disable_magic_url"{S_MAGIC_URL_CHECKED} /></td>
+ <td class="gen">{L_DISABLE_MAGIC_URL}</td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+ </td>
+</tr>
+
+<!-- IF SIGNATURE_PREVIEW -->
+ <tr>
+ <th colspan="2" valign="middle">{L_SIGNATURE_PREVIEW}</th>
+ </tr>
+ <tr>
+ <td class="row1" colspan="2"><div class="postbody" style="padding: 6px;">{SIGNATURE_PREVIEW}</div></td>
+ </tr>
+<!-- ENDIF -->
+
+<tr>
+ <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnlite" type="submit" name="preview" value="{L_PREVIEW}" />&nbsp;&nbsp;<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
+</tr>
+</table>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_register.html b/phpBB/styles/subsilver2/template/ucp_register.html
new file mode 100644
index 0000000000..ebcdf2d76b
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_register.html
@@ -0,0 +1,101 @@
+<!-- INCLUDE overall_header.html -->
+
+<script type="text/javascript">
+// <![CDATA[
+ /**
+ * Change language
+ */
+ function change_language(lang_iso)
+ {
+ document.forms['register'].change_lang.value = lang_iso;
+ document.forms['register'].submit.click();
+ }
+
+// ]]>
+</script>
+
+<form name="register" method="post" action="{S_UCP_ACTION}">
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="2" valign="middle">{L_REGISTRATION}</th>
+</tr>
+
+<!-- IF ERROR -->
+ <tr>
+ <td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
+ </tr>
+<!-- ENDIF -->
+
+<!-- IF L_REG_COND -->
+ <tr>
+ <td class="row2" colspan="2"><span class="gensmall">{L_REG_COND}</span></td>
+ </tr>
+<!-- ENDIF -->
+
+<tr>
+ <td class="row1" width="38%"><b class="genmed">{L_USERNAME}: </b><br /><span class="gensmall">{L_USERNAME_EXPLAIN}</span></td>
+ <td class="row2"><input class="post" type="text" name="username" size="25" value="{USERNAME}" /></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_EMAIL_ADDRESS}: </b></td>
+ <td class="row2"><input class="post" type="text" name="email" size="25" maxlength="100" value="{EMAIL}" /></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_CONFIRM_EMAIL}: </b></td>
+ <td class="row2"><input class="post" type="text" name="email_confirm" size="25" maxlength="100" value="{EMAIL_CONFIRM}" /></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_PASSWORD}: </b><br /><span class="gensmall">{L_PASSWORD_EXPLAIN}</span></td>
+ <td class="row2"><input class="post" type="password" name="new_password" size="25" value="{PASSWORD}" /></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_CONFIRM_PASSWORD}: </b></td>
+ <td class="row2"><input class="post" type="password" name="password_confirm" size="25" value="{PASSWORD_CONFIRM}" /></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_LANGUAGE}: </b></td>
+ <td class="row2"><select name="lang" onchange="change_language(this.value); return false;">{S_LANG_OPTIONS}</select></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_TIMEZONE}: </b></td>
+ <td class="row2"><select name="tz">{S_TZ_OPTIONS}</select></td>
+</tr>
+<!-- IF .profile_fields -->
+ <tr>
+ <td class="row2" colspan="2"><span class="gensmall">{L_ITEMS_REQUIRED}</span></td>
+ </tr>
+<!-- BEGIN profile_fields -->
+ <tr>
+ <td class="row1" width="35%">
+ <b class="genmed">{profile_fields.LANG_NAME}: </b>
+ <!-- IF profile_fields.S_REQUIRED --><b>*</b><!-- ENDIF -->
+ <!-- IF profile_fields.LANG_EXPLAIN --><br /><span class="gensmall">{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF -->
+ </td>
+ <td class="row2">{profile_fields.FIELD}<!-- IF profile_fields.ERROR --><br /><span class="gensmall error">{profile_fields.ERROR}</span><!-- ENDIF --></td>
+ </tr>
+
+<!-- END profile_fields -->
+<!-- ENDIF -->
+
+ <!-- IF CAPTCHA_TEMPLATE -->
+ <!-- INCLUDE {CAPTCHA_TEMPLATE} -->
+ <!-- ENDIF -->
+
+<!-- IF S_COPPA -->
+ <tr>
+ <th colspan="2" valign="middle">{L_COPPA_COMPLIANCE}</th>
+ </tr>
+ <tr>
+ <td class="row3" colspan="2"><span class="gensmall">{L_COPPA_EXPLAIN}</span></td>
+ </tr>
+<!-- ENDIF -->
+
+<tr>
+ <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" id="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
+</tr>
+</table>
+{S_FORM_TOKEN}
+</form>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_remind.html b/phpBB/styles/subsilver2/template/ucp_remind.html
new file mode 100644
index 0000000000..b14fbe8305
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_remind.html
@@ -0,0 +1,28 @@
+<!-- INCLUDE overall_header.html -->
+
+<div align="center">
+
+<form action="{S_PROFILE_ACTION}" method="post">
+
+<table class="tablebg" width="50%" cellspacing="1" cellpadding="4" border="0">
+<tr>
+ <th colspan="2">{L_SEND_PASSWORD}</th>
+</tr>
+<tr>
+ <td class="row1" width="38%"><b class="genmed">{L_USERNAME}: </b></td>
+ <td class="row2"><input type="text" class="post" name="username" size="25" value="{USERNAME}" /></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_EMAIL_ADDRESS}: </b><br /><span class="gensmall">{L_EMAIL_REMIND}</span></td>
+ <td class="row2"><input type="text" class="post" name="email" size="25" maxlength="100" value="{EMAIL}" /></td>
+</tr>
+<tr>
+ <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}" class="btnmain" />&nbsp;&nbsp;<input type="reset" value="{L_RESET}" name="reset" class="btnlite" /></td>
+</tr>
+</table>
+{S_FORM_TOKEN}
+</form>
+
+</div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_resend.html b/phpBB/styles/subsilver2/template/ucp_resend.html
new file mode 100644
index 0000000000..3a39f904aa
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_resend.html
@@ -0,0 +1,29 @@
+<!-- INCLUDE overall_header.html -->
+
+<div align="center">
+
+<form action="{S_PROFILE_ACTION}" method="post">
+
+<table class="tablebg" width="50%" cellspacing="1" cellpadding="4" border="0">
+<tr>
+ <th colspan="2">{L_UCP_RESEND}</th>
+</tr>
+<tr>
+ <td class="row1" width="38%"><b class="genmed">{L_USERNAME}: </b></td>
+ <td class="row2"><input type="text" class="post" name="username" size="25" value="{USERNAME}" /></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_EMAIL_ADDRESS}: </b><br /><span class="gensmall">{L_EMAIL_REMIND}</span></td>
+ <td class="row2"><input type="text" class="post" name="email" size="25" maxlength="100" value="{EMAIL}" /></td>
+</tr>
+<tr>
+ <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}" class="btnmain" />&nbsp;&nbsp;<input type="reset" value="{L_RESET}" name="reset" class="btnlite" /></td>
+</tr>
+</table>
+{S_FORM_TOKEN}
+
+</form>
+
+</div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_zebra_foes.html b/phpBB/styles/subsilver2/template/ucp_zebra_foes.html
new file mode 100644
index 0000000000..89be18ccc1
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_zebra_foes.html
@@ -0,0 +1,28 @@
+<!-- INCLUDE ucp_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="2" valign="middle">{L_TITLE}</th>
+</tr>
+<tr>
+ <td class="row3" colspan="2"><span class="gensmall">{L_FOES_EXPLAIN}</span></td>
+</tr>
+<!-- IF ERROR -->
+ <tr>
+ <td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <td class="row1" width="40%"><b class="genmed">{L_YOUR_FOES}:</b><br /><span class="gensmall">{L_YOUR_FOES_EXPLAIN}</span></td>
+ <td class="row2" align="center"><!-- IF S_USERNAME_OPTIONS --><select name="usernames[]" multiple="multiple" size="5">{S_USERNAME_OPTIONS}</select><!-- ELSE --><b class="genmed">{L_NO_FOES}</b><!-- ENDIF --></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_ADD_FOES}:</b><br /><span class="gensmall">{L_ADD_FOES_EXPLAIN} [ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span></td>
+ <td class="row2" align="center"><textarea name="add" rows="5" cols="30">{USERNAMES}</textarea><br /></td>
+</tr>
+<tr>
+ <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
+</tr>
+</table>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_zebra_friends.html b/phpBB/styles/subsilver2/template/ucp_zebra_friends.html
new file mode 100644
index 0000000000..2abea04b8f
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_zebra_friends.html
@@ -0,0 +1,28 @@
+<!-- INCLUDE ucp_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="2" valign="middle">{L_TITLE}</th>
+</tr>
+<tr>
+ <td class="row3" colspan="2"><span class="gensmall">{L_FRIENDS_EXPLAIN}</span></td>
+</tr>
+<!-- IF ERROR -->
+ <tr>
+ <td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
+ </tr>
+<!-- ENDIF -->
+<tr>
+ <td class="row1" width="40%"><b class="genmed">{L_YOUR_FRIENDS}:</b><br /><span class="gensmall">{L_YOUR_FRIENDS_EXPLAIN}</span></td>
+ <td class="row2" align="center"><!-- IF S_USERNAME_OPTIONS --><select name="usernames[]" multiple="multiple" size="5">{S_USERNAME_OPTIONS}</select><!-- ELSE --><b class="genmed">{L_NO_FRIENDS}</b><!-- ENDIF --></td>
+</tr>
+<tr>
+ <td class="row1"><b class="genmed">{L_ADD_FRIENDS}:</b><br /><span class="gensmall">{L_ADD_FRIENDS_EXPLAIN} [ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span></td>
+ <td class="row2" align="center"><textarea name="add" rows="5" cols="30">{USERNAMES}</textarea><br /></td>
+</tr>
+<tr>
+ <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
+</tr>
+</table>
+
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html
new file mode 100644
index 0000000000..f0b2699471
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/viewforum_body.html
@@ -0,0 +1,329 @@
+<!-- INCLUDE overall_header.html -->
+
+<!-- IF S_FORUM_RULES -->
+ <div class="forumrules">
+ <!-- IF U_FORUM_RULES -->
+ <h3>{L_FORUM_RULES}</h3><br />
+ <a href="{U_FORUM_RULES}"><b>{L_FORUM_RULES_LINK}</b></a>
+ <!-- ELSE -->
+ <h3>{L_FORUM_RULES}</h3><br />
+ {FORUM_RULES}
+ <!-- ENDIF -->
+ </div>
+
+ <br clear="all" />
+<!-- ENDIF -->
+
+<!-- IF S_DISPLAY_ACTIVE -->
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="cat" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->"><span class="nav">{L_ACTIVE_TOPICS}</span></td>
+ </tr>
+
+ <tr>
+ <!-- IF S_TOPIC_ICONS -->
+ <th colspan="3">&nbsp;{L_TOPICS}&nbsp;</th>
+ <!-- ELSE -->
+ <th colspan="2">&nbsp;{L_TOPICS}&nbsp;</th>
+ <!-- ENDIF -->
+ <th>&nbsp;{L_AUTHOR}&nbsp;</th>
+ <th>&nbsp;{L_REPLIES}&nbsp;</th>
+ <th>&nbsp;{L_VIEWS}&nbsp;</th>
+ <th>&nbsp;{L_LAST_POST}&nbsp;</th>
+ </tr>
+
+ <!-- BEGIN topicrow -->
+
+ <tr>
+ <td class="row1" width="25" align="center">{topicrow.TOPIC_FOLDER_IMG}</td>
+ <!-- IF S_TOPIC_ICONS -->
+ <td class="row1" width="25" align="center"><!-- IF topicrow.TOPIC_ICON_IMG --><img src="{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}" width="{topicrow.TOPIC_ICON_IMG_WIDTH}" height="{topicrow.TOPIC_ICON_IMG_HEIGHT}" alt="" title="" /><!-- ENDIF --></td>
+ <!-- ENDIF -->
+ <td class="row1">
+ <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a><!-- ENDIF -->
+ {topicrow.ATTACH_ICON_IMG} <!-- IF topicrow.S_HAS_POLL or topicrow.S_TOPIC_MOVED --><b>{topicrow.TOPIC_TYPE}</b> <!-- ENDIF --><a title="{L_POSTED}: {topicrow.FIRST_POST_TIME}" href="{topicrow.U_VIEW_TOPIC}"class="topictitle">{topicrow.TOPIC_TITLE}</a>
+ <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
+ <a href="{topicrow.U_MCP_QUEUE}">{UNAPPROVED_IMG}</a>&nbsp;
+ <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_REPORTED -->
+ <a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a>&nbsp;
+ <!-- ENDIF -->
+ <!-- IF topicrow.PAGINATION -->
+ <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ] </p>
+ <!-- ENDIF -->
+ </td>
+ <td class="row2" width="130" align="center"><p class="topicauthor">{topicrow.TOPIC_AUTHOR_FULL}</p></td>
+ <td class="row1" width="50" align="center"><p class="topicdetails">{topicrow.REPLIES}</p></td>
+ <td class="row2" width="50" align="center"><p class="topicdetails">{topicrow.VIEWS}</p></td>
+ <td class="row1" width="140" align="center">
+ <p class="topicdetails" style="white-space: nowrap;">{topicrow.LAST_POST_TIME}</p>
+ <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
+ <!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a><!-- ENDIF -->
+ </p>
+ </td>
+ </tr>
+
+ <!-- BEGINELSE -->
+
+ <tr>
+ <!-- IF S_TOPIC_ICONS -->
+ <td class="row1" colspan="7" height="30" align="center" valign="middle"><span class="gen"><!-- IF not S_SORT_DAYS -->{L_NO_TOPICS}<!-- ELSE -->{L_NO_TOPICS_TIME_FRAME}<!-- ENDIF --></span></td>
+ <!-- ELSE -->
+ <td class="row1" colspan="6" height="30" align="center" valign="middle"><span class="gen"><!-- IF not S_SORT_DAYS -->{L_NO_TOPICS}<!-- ELSE -->{L_NO_TOPICS_TIME_FRAME}<!-- ENDIF --></span></td>
+ <!-- ENDIF -->
+ </tr>
+ <!-- END topicrow -->
+
+ <tr align="center">
+ <td class="cat" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->">&nbsp;</td>
+ </tr>
+ </table>
+
+ <br clear="all" />
+<!-- ENDIF -->
+
+<!-- IF S_HAS_SUBFORUM -->
+ <!-- INCLUDE forumlist_body.html -->
+ <br clear="all" />
+<!-- ENDIF -->
+
+<!-- IF S_IS_POSTABLE or S_NO_READ_ACCESS -->
+ <div id="pageheader">
+ <h2><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>
+
+ <!-- IF MODERATORS -->
+ <p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->: {MODERATORS}</p>
+ <!-- ENDIF -->
+ <!-- IF U_MCP -->
+ <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
+ <!-- ENDIF -->
+ </div>
+
+ <br clear="all" /><br />
+<!-- ENDIF -->
+
+<div id="pagecontent">
+
+<!-- IF S_NO_READ_ACCESS -->
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="row1" height="30" align="center" valign="middle"><span class="gen">{L_NO_READ_ACCESS}</span></td>
+ </tr>
+ </table>
+
+ <!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
+
+ <br /><br />
+
+ <form method="post" action="{S_LOGIN_ACTION}">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="cat"><h4><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></h4></td>
+ </tr>
+ <tr>
+ <td class="row1" align="center"><span class="genmed">{L_USERNAME}:</span> <input class="post" type="text" name="username" size="10" />&nbsp; <span class="genmed">{L_PASSWORD}:</span> <input class="post" type="password" name="password" size="10" /><!-- IF S_AUTOLOGIN_ENABLED -->&nbsp; <span class="gensmall">{L_LOG_ME_IN}</span> <input type="checkbox" class="radio" name="autologin" /><!-- ENDIF -->&nbsp; <input type="submit" class="btnmain" name="login" value="{L_LOGIN}" /></td>
+ </tr>
+ </table>
+
+ </form>
+
+ <!-- ENDIF -->
+
+ <br clear="all" />
+<!-- ENDIF -->
+
+ <!-- IF S_DISPLAY_POST_INFO or TOTAL_TOPICS -->
+ <table width="100%" cellspacing="1">
+ <tr>
+ <!-- IF S_DISPLAY_POST_INFO and not S_IS_BOT -->
+ <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle"><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a></td>
+ <!-- ENDIF -->
+ <!-- IF TOTAL_TOPICS -->
+ <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
+ <td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_TOPICS} ]&nbsp;</td>
+ <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
+ <!-- ENDIF -->
+ </tr>
+ </table>
+ <!-- ENDIF -->
+
+ <!-- IF not S_DISPLAY_ACTIVE and (S_IS_POSTABLE or .topicrow) -->
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="cat" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->">
+ <table width="100%" cellspacing="0">
+ <tr class="nav">
+ <td valign="middle">&nbsp;<!-- IF S_WATCH_FORUM_LINK and not S_IS_BOT --><a href="{S_WATCH_FORUM_LINK}">{S_WATCH_FORUM_TITLE}</a><!-- ENDIF --></td>
+ <td align="{S_CONTENT_FLOW_END}" valign="middle"><!-- IF not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}">{L_MARK_TOPICS_READ}</a><!-- ENDIF -->&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <!-- IF S_TOPIC_ICONS -->
+ <th colspan="3">&nbsp;{L_TOPICS}&nbsp;</th>
+ <!-- ELSE -->
+ <th colspan="2">&nbsp;{L_TOPICS}&nbsp;</th>
+ <!-- ENDIF -->
+ <th>&nbsp;{L_AUTHOR}&nbsp;</th>
+ <th>&nbsp;{L_REPLIES}&nbsp;</th>
+ <th>&nbsp;{L_VIEWS}&nbsp;</th>
+ <th>&nbsp;{L_LAST_POST}&nbsp;</th>
+ </tr>
+
+ <!-- BEGIN topicrow -->
+
+ <!-- IF topicrow.S_TOPIC_TYPE_SWITCH eq 1 -->
+ <tr>
+ <td class="row3" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->"><b class="gensmall">{L_ANNOUNCEMENTS}</b></td>
+ </tr>
+ <!-- ELSEIF topicrow.S_TOPIC_TYPE_SWITCH eq 0 -->
+ <tr>
+ <td class="row3" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->"><b class="gensmall">{L_TOPICS}</b></td>
+ </tr>
+ <!-- ENDIF -->
+
+ <tr>
+ <td class="row1" width="25" align="center">{topicrow.TOPIC_FOLDER_IMG}</td>
+ <!-- IF S_TOPIC_ICONS -->
+ <td class="row1" width="25" align="center"><!-- IF topicrow.TOPIC_ICON_IMG --><img src="{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}" width="{topicrow.TOPIC_ICON_IMG_WIDTH}" height="{topicrow.TOPIC_ICON_IMG_HEIGHT}" alt="" title="" /><!-- ENDIF --></td>
+ <!-- ENDIF -->
+ <td class="row1">
+ <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a><!-- ENDIF -->
+ {topicrow.ATTACH_ICON_IMG} <!-- IF topicrow.S_HAS_POLL or topicrow.S_TOPIC_MOVED --><b>{topicrow.TOPIC_TYPE}</b> <!-- ENDIF --><a title="{L_POSTED}: {topicrow.FIRST_POST_TIME}" href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
+ <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
+ <a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a>&nbsp;
+ <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_REPORTED -->
+ <a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a>&nbsp;
+ <!-- ENDIF -->
+ <!-- IF topicrow.PAGINATION -->
+ <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ] </p>
+ <!-- ENDIF -->
+ </td>
+ <td class="row2" width="130" align="center"><p class="topicauthor">{topicrow.TOPIC_AUTHOR_FULL}</p></td>
+ <td class="row1" width="50" align="center"><p class="topicdetails">{topicrow.REPLIES}</p></td>
+ <td class="row2" width="50" align="center"><p class="topicdetails">{topicrow.VIEWS}</p></td>
+ <td class="row1" width="140" align="center">
+ <p class="topicdetails" style="white-space: nowrap;">{topicrow.LAST_POST_TIME}</p>
+ <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
+ <!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a><!-- ENDIF -->
+ </p>
+ </td>
+ </tr>
+
+ <!-- BEGINELSE -->
+ <!-- IF S_IS_POSTABLE -->
+ <tr>
+ <!-- IF S_TOPIC_ICONS -->
+ <td class="row1" colspan="7" height="30" align="center" valign="middle"><span class="gen"><!-- IF not S_SORT_DAYS -->{L_NO_TOPICS}<!-- ELSE -->{L_NO_TOPICS_TIME_FRAME}<!-- ENDIF --></span></td>
+ <!-- ELSE -->
+ <td class="row1" colspan="6" height="30" align="center" valign="middle"><span class="gen"><!-- IF not S_SORT_DAYS -->{L_NO_TOPICS}<!-- ELSE -->{L_NO_TOPICS_TIME_FRAME}<!-- ENDIF --></span></td>
+ <!-- ENDIF -->
+ </tr>
+ <!-- ENDIF -->
+ <!-- END topicrow -->
+
+ <!-- IF not S_IS_BOT -->
+ <tr align="center">
+ <!-- IF S_TOPIC_ICONS -->
+ <td class="cat" colspan="7">
+ <!-- ELSE -->
+ <td class="cat" colspan="6">
+ <!-- ENDIF -->
+ <form method="post" action="{S_FORUM_ACTION}"><span class="gensmall">{L_DISPLAY_TOPICS}:</span>&nbsp;{S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /></form>
+ </td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+ <!-- ENDIF -->
+
+ <!-- IF S_DISPLAY_POST_INFO or TOTAL_TOPICS -->
+ <table width="100%" cellspacing="1">
+ <tr>
+ <!-- IF S_DISPLAY_POST_INFO and not S_IS_BOT -->
+ <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle"><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a></td>
+ <!-- ENDIF -->
+ <!-- IF TOTAL_TOPICS -->
+ <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
+ <td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_TOPICS} ]&nbsp;</td>
+ <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
+ <!-- ENDIF -->
+ </tr>
+ </table>
+ <!-- ENDIF -->
+
+ <br clear="all" />
+</div>
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<!-- IF S_DISPLAY_ONLINE_LIST -->
+ <br clear="all" />
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="cat"><h4>{L_WHO_IS_ONLINE}</h4></td>
+ </tr>
+ <tr>
+ <td class="row1"><p class="gensmall">{LOGGED_IN_USER_LIST}</p></td>
+ </tr>
+ </table>
+<!-- ENDIF -->
+
+<!-- IF S_DISPLAY_POST_INFO -->
+ <br clear="all" />
+
+ <table width="100%" cellspacing="0">
+ <tr>
+ <td align="{S_CONTENT_FLOW_BEGIN}" valign="top">
+ <table cellspacing="3" cellpadding="0" border="0">
+ <tr>
+ <td width="20" style="text-align: center;">{FOLDER_NEW_IMG}</td>
+ <td class="gensmall">{L_NEW_POSTS}</td>
+ <td>&nbsp;&nbsp;</td>
+ <td width="20" style="text-align: center;">{FOLDER_IMG}</td>
+ <td class="gensmall">{L_NO_NEW_POSTS}</td>
+ <td>&nbsp;&nbsp;</td>
+ <td width="20" style="text-align: center;">{FOLDER_ANNOUNCE_IMG}</td>
+ <td class="gensmall">{L_ICON_ANNOUNCEMENT}</td>
+ </tr>
+ <tr>
+ <td style="text-align: center;">{FOLDER_HOT_NEW_IMG}</td>
+ <td class="gensmall">{L_NEW_POSTS_HOT}</td>
+ <td>&nbsp;&nbsp;</td>
+ <td style="text-align: center;">{FOLDER_HOT_IMG}</td>
+ <td class="gensmall">{L_NO_NEW_POSTS_HOT}</td>
+ <td>&nbsp;&nbsp;</td>
+ <td style="text-align: center;">{FOLDER_STICKY_IMG}</td>
+ <td class="gensmall">{L_ICON_STICKY}</td>
+ </tr>
+ <tr>
+ <td style="text-align: center;">{FOLDER_LOCKED_NEW_IMG}</td>
+ <td class="gensmall">{L_NEW_POSTS_LOCKED}</td>
+ <td>&nbsp;&nbsp;</td>
+ <td style="text-align: center;">{FOLDER_LOCKED_IMG}</td>
+ <td class="gensmall">{L_NO_NEW_POSTS_LOCKED}</td>
+ <td>&nbsp;&nbsp;</td>
+ <td style="text-align: center;">{FOLDER_MOVED_IMG}</td>
+ <td class="gensmall">{L_TOPIC_MOVED}</td>
+ </tr>
+ </table>
+ </td>
+ <td align="{S_CONTENT_FLOW_END}"><span class="gensmall"><!-- BEGIN rules -->{rules.RULE}<br /><!-- END rules --></span></td>
+ </tr>
+ </table>
+<!-- ENDIF -->
+
+<br clear="all" />
+
+<table width="100%" cellspacing="0">
+<tr>
+ <td><!-- IF S_DISPLAY_SEARCHBOX --><!-- INCLUDE searchbox.html --><!-- ENDIF --></td>
+ <td align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></td>
+</tr>
+</table>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/viewonline_body.html b/phpBB/styles/subsilver2/template/viewonline_body.html
new file mode 100644
index 0000000000..1fcab016b6
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/viewonline_body.html
@@ -0,0 +1,57 @@
+<!-- INCLUDE overall_header.html -->
+
+<h4>{TOTAL_REGISTERED_USERS_ONLINE}</h4>
+<h4>{TOTAL_GUEST_USERS_ONLINE}<!-- IF S_SWITCH_GUEST_DISPLAY --> [ <a href="{U_SWITCH_GUEST_DISPLAY}">{L_SWITCH_GUEST_DISPLAY}</a> ]<!-- ENDIF --></h4>
+<br />
+
+<!-- IF PAGINATION -->
+ <table width="100%" cellspacing="1">
+ <tr>
+ <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
+ <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><b><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a> <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}">{L_PREVIOUS}</a>&nbsp;&nbsp;<!-- ENDIF -->{PAGINATION}<!-- IF NEXT_PAGE -->&nbsp;&nbsp;<a href="{NEXT_PAGE}">{L_NEXT}</a><!-- ENDIF --></b></td>
+ </tr>
+ </table>
+<!-- ENDIF -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th width="40%"><a href="{U_SORT_USERNAME}">{L_USERNAME}</a></th>
+ <th width="20%"><a href="{U_SORT_UPDATED}">{L_LAST_UPDATED}</a></th>
+ <th width="40%"><a href="{U_SORT_LOCATION}">{L_FORUM_LOCATION}</a></th>
+</tr>
+<!-- BEGIN user_row -->
+ <tr>
+ <td class="row1"><p class="gen">{user_row.USERNAME_FULL}</p><!-- IF user_row.USER_IP --><p class="gensmall">{L_IP}: <a href="{user_row.U_USER_IP}">{user_row.USER_IP}</a> &#187; <a href="{user_row.U_WHOIS}" onclick="popup(this.href, 750, 500); return false;">{L_WHOIS}</a></p><!-- ENDIF -->
+ <!-- IF user_row.USER_BROWSER -->{user_row.USER_BROWSER}<!-- ENDIF --></td>
+ <td class="row2" align="center" nowrap="nowrap"><p class="genmed">&nbsp;{user_row.LASTUPDATE}</p></td>
+ <td class="row1"><p class="genmed"><a href="{user_row.U_FORUM_LOCATION}">{user_row.FORUM_LOCATION}</a></p></td>
+ </tr>
+<!-- END user_row -->
+
+<!-- IF LEGEND -->
+ <tr>
+ <td class="row1" colspan="3"><b class="gensmall">{L_LEGEND} :: {LEGEND}</b></td>
+ </tr>
+<!-- ENDIF -->
+</table>
+
+<!-- IF PAGINATION -->
+ <table width="100%" cellspacing="1">
+ <tr>
+ <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
+ <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><b><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a> <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}">{L_PREVIOUS}</a>&nbsp;&nbsp;<!-- ENDIF -->{PAGINATION}<!-- IF NEXT_PAGE -->&nbsp;&nbsp;<a href="{NEXT_PAGE}">{L_NEXT}</a><!-- ENDIF --></b></td>
+ </tr>
+ </table>
+<!-- ENDIF -->
+
+<div class="gensmall" align="{S_CONTENT_FLOW_END}">{L_ONLINE_EXPLAIN}</div>
+
+<br clear="all" />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<br clear="all" />
+
+<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/viewonline_whois.html b/phpBB/styles/subsilver2/template/viewonline_whois.html
new file mode 100644
index 0000000000..033d848ac4
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/viewonline_whois.html
@@ -0,0 +1,12 @@
+<!-- INCLUDE simple_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th>{L_WHOIS}</th>
+</tr>
+<tr>
+ <td class="row1"><pre>{WHOIS}</pre><br /><a class="nav" href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a></td>
+</tr>
+</table>
+
+<!-- INCLUDE simple_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html
new file mode 100644
index 0000000000..8f01c64c0e
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/viewtopic_body.html
@@ -0,0 +1,364 @@
+<!-- INCLUDE overall_header.html -->
+
+<!-- IF S_FORUM_RULES -->
+ <div class="forumrules">
+ <!-- IF U_FORUM_RULES -->
+ <h3>{L_FORUM_RULES}</h3><br />
+ <a href="{U_FORUM_RULES}"><b>{L_FORUM_RULES_LINK}</b></a>
+ <!-- ELSE -->
+ <h3>{L_FORUM_RULES}</h3><br />
+ {FORUM_RULES}
+ <!-- ENDIF -->
+ </div>
+
+ <br clear="all" />
+<!-- ENDIF -->
+
+<div id="pageheader">
+ <h2><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
+
+<!-- IF MODERATORS -->
+ <p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->: {MODERATORS}</p>
+<!-- ENDIF -->
+<!-- IF U_MCP -->
+ <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
+<!-- ENDIF -->
+</div>
+
+<br clear="all" /><br />
+
+<div id="pagecontent">
+
+ <table width="100%" cellspacing="1">
+ <tr>
+ <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap">
+ <!-- IF not S_IS_BOT -->
+ <!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a>&nbsp;<!-- ENDIF -->
+ <!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a><!-- ENDIF -->
+ <!-- ENDIF -->
+ </td>
+ <!-- IF TOTAL_POSTS -->
+ <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
+ <td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_POSTS} ]&nbsp;</td>
+ <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
+ <!-- ENDIF -->
+ </tr>
+ </table>
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="cat">
+ <table width="100%" cellspacing="0">
+ <tr>
+ <td class="nav" nowrap="nowrap">&nbsp;
+ <!-- IF not S_IS_BOT -->
+ <!-- IF U_WATCH_TOPIC --><a href="{U_WATCH_TOPIC}" title="{L_WATCH_TOPIC}">{L_WATCH_TOPIC}</a><!-- IF U_PRINT_TOPIC or U_EMAIL_TOPIC or U_BUMP_TOPIC or U_BOOKMARK_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
+ <!-- IF U_BOOKMARK_TOPIC --><a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}">{L_BOOKMARK_TOPIC}</a><!-- IF U_PRINT_TOPIC or U_EMAIL_TOPIC or U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
+ <!-- IF U_PRINT_TOPIC --><a href="{U_PRINT_TOPIC}" title="{L_PRINT_TOPIC}">{L_PRINT_TOPIC}</a><!-- IF U_EMAIL_TOPIC or U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
+ <!-- IF U_EMAIL_TOPIC --><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}">{L_EMAIL_TOPIC}</a><!-- IF U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
+ <!-- IF U_BUMP_TOPIC --><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}">{L_BUMP_TOPIC}</a><!-- ENDIF -->
+ <!-- ENDIF -->
+ </td>
+ <td class="nav" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a><!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --> | <a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a><!-- ENDIF --> | <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+<!-- IF S_HAS_POLL -->
+ <tr>
+ <td class="row2" colspan="2" align="center"><br clear="all" />
+
+ <form method="post" action="{S_POLL_ACTION}">
+
+ <table cellspacing="0" cellpadding="4" border="0" align="center">
+ <tr>
+ <td align="center"><span class="gen"><b>{POLL_QUESTION}</b></span><br /><span class="gensmall">{L_POLL_LENGTH}</span></td>
+ </tr>
+ <tr>
+ <td align="{S_CONTENT_FLOW_BEGIN}">
+ <table cellspacing="0" cellpadding="2" border="0">
+ <!-- BEGIN poll_option -->
+ <tr>
+ <!-- IF S_CAN_VOTE -->
+ <td>
+ <!-- IF S_IS_MULTI_CHOICE -->
+ <input type="checkbox" class="radio" name="vote_id[]" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> />
+ <!-- ELSE -->
+ <input type="radio" class="radio" name="vote_id[]" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> />
+ <!-- ENDIF -->
+ </td>
+ <!-- ENDIF -->
+ <td><span class="gen">{poll_option.POLL_OPTION_CAPTION}</span></td>
+ <!-- IF S_DISPLAY_RESULTS -->
+ <td dir="ltr">{POLL_LEFT_CAP_IMG}{poll_option.POLL_OPTION_IMG}{POLL_RIGHT_CAP_IMG}</td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}"><b>&nbsp;{poll_option.POLL_OPTION_PERCENT}&nbsp;</b></td>
+ <td class="gen" align="center">[ {poll_option.POLL_OPTION_RESULT} ]</td>
+ <!-- IF poll_option.POLL_OPTION_VOTED -->
+ <td class="gensmall" valign="top"><b title="{L_POLL_VOTED_OPTION}">x</b></td>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+ </tr>
+ <!-- END poll_option -->
+ </table>
+ </td>
+ </tr>
+ <!-- IF S_CAN_VOTE -->
+ <tr>
+ <td align="center"><span class="gensmall">{L_MAX_VOTES}</span><br /><br /><input type="submit" name="update" value="{L_SUBMIT_VOTE}" class="btnlite" /></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF S_DISPLAY_RESULTS -->
+ <tr>
+ <td class="gensmall" colspan="4" align="center"><b>{L_TOTAL_VOTES} : {TOTAL_VOTES}</b></td>
+ </tr>
+ <!-- ELSE -->
+ <tr>
+ <td align="center"><span class="gensmall"><b><a href="{U_VIEW_RESULTS}">{L_VIEW_RESULTS}</a></b></span></td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ </form>
+
+ </td>
+ </tr>
+<!-- ENDIF -->
+ </table>
+
+<!-- BEGIN postrow -->
+ <table class="tablebg" width="100%" cellspacing="1">
+ <!-- IF postrow.S_FIRST_ROW -->
+ <tr>
+ <th>{L_AUTHOR}</th>
+ <th>{L_MESSAGE}</th>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <!-- IF postrow.S_IGNORE_POST -->
+ <td class="gensmall" colspan="2" height="25" align="center"><!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a>{postrow.L_IGNORE_POST}</td>
+ <!-- ELSE -->
+
+ <td align="center" valign="middle">
+ <!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a>
+ <b class="postauthor"<!-- IF postrow.POST_AUTHOR_COLOUR --> style="color: {postrow.POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{postrow.POST_AUTHOR}</b>
+ </td>
+ <td width="100%" height="25">
+ <table width="100%" cellspacing="0">
+ <tr>
+ <!-- IF postrow.POST_ICON_IMG -->
+ <td><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="" title="" /></td>
+ <!-- ENDIF -->
+ <td class="gensmall" width="100%"><div style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<b>{L_POST_SUBJECT}:</b> {postrow.POST_SUBJECT}</div><div style="float: {S_CONTENT_FLOW_END};"><!-- IF S_IS_BOT -->{postrow.MINI_POST_IMG}<!-- ELSE --><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a><!-- ENDIF --><b>{L_POSTED}:</b> {postrow.POST_DATE}&nbsp;</div></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td valign="top" class="profile">
+ <table cellspacing="4" align="center" width="150">
+ <!-- IF postrow.ONLINE_IMG -->
+ <tr>
+ <td>{postrow.ONLINE_IMG}</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF postrow.RANK_TITLE -->
+ <tr>
+ <td class="postdetails">{postrow.RANK_TITLE}</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF postrow.RANK_IMG -->
+ <tr>
+ <td>{postrow.RANK_IMG}</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF postrow.POSTER_AVATAR -->
+ <tr>
+ <td>{postrow.POSTER_AVATAR}</td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF not (postrow.ONLINE_IMG or postrow.RANK_TITLE or postrow.RANK_IMG or postrow.POSTER_AVATAR) -->
+ <tr>
+ <td></td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+
+ <span class="postdetails">
+ <!-- IF postrow.POSTER_JOINED --><br /><b>{L_JOINED}:</b> {postrow.POSTER_JOINED}<!-- ENDIF -->
+ <!-- IF postrow.POSTER_POSTS != '' --><br /><b>{L_POSTS}:</b> {postrow.POSTER_POSTS}<!-- ENDIF -->
+ <!-- IF postrow.POSTER_FROM --><br /><b>{L_LOCATION}:</b> {postrow.POSTER_FROM}<!-- ENDIF -->
+
+ <!-- IF postrow.S_PROFILE_FIELD1 -->
+ <!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
+ <br /><b>{postrow.PROFILE_FIELD1_NAME}:</b> {postrow.PROFILE_FIELD1_VALUE}
+ <!-- ENDIF -->
+
+ <!-- BEGIN custom_fields -->
+ <br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
+ <!-- END custom_fields -->
+ </span>
+
+ </td>
+ <td valign="top">
+ <table width="100%" cellspacing="5">
+ <tr>
+ <td>
+ <!-- IF postrow.S_POST_UNAPPROVED or postrow.S_POST_REPORTED -->
+ <table width="100%" cellspacing="0">
+ <tr>
+ <td class="gensmall"><!-- IF postrow.S_POST_UNAPPROVED --><span class="postapprove">{UNAPPROVED_IMG} <a href="{postrow.U_MCP_APPROVE}">{L_POST_UNAPPROVED}</a></span><br /> <!-- ENDIF --> <!-- IF postrow.S_POST_REPORTED --><span class="postreported">{REPORTED_IMG} <a href="{postrow.U_MCP_REPORT}">{L_POST_REPORTED}</a></span><!-- ENDIF --></td>
+ </tr>
+ </table>
+
+ <br clear="all" />
+ <!-- ENDIF -->
+
+ <div class="postbody">{postrow.MESSAGE}</div>
+
+ <!-- IF postrow.S_HAS_ATTACHMENTS -->
+ <br clear="all" /><br />
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
+ </tr>
+ <!-- BEGIN attachment -->
+ <tr>
+ <!-- IF postrow.attachment.S_ROW_COUNT is even --><td class="row2"><!-- ELSE --><td class="row1"><!-- ENDIF -->{postrow.attachment.DISPLAY_ATTACHMENT}</td>
+ </tr>
+ <!-- END attachment -->
+ </table>
+ <!-- ENDIF -->
+
+ <!-- IF postrow.S_DISPLAY_NOTICE -->
+ <span class="gensmall error"><br /><br />{L_DOWNLOAD_NOTICE}</span>
+ <!-- ENDIF -->
+ <!-- IF postrow.SIGNATURE -->
+ <span class="postbody"><br />_________________<br />{postrow.SIGNATURE}</span>
+ <!-- ENDIF -->
+
+ <!-- IF postrow.EDITED_MESSAGE or postrow.EDIT_REASON -->
+ <!-- IF postrow.EDIT_REASON -->
+ <br /><br />
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="row3"><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td>
+ </tr>
+ <tr>
+ <td class="row2"><span class="genmed">{postrow.EDIT_REASON}</span></td>
+ </tr>
+ </table>
+ <!-- ELSE -->
+ <br /><br />
+ <span class="gensmall">{postrow.EDITED_MESSAGE}</span>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+
+ <!-- IF postrow.BUMPED_MESSAGE -->
+ <span class="gensmall"><br /><br />{postrow.BUMPED_MESSAGE}</span>
+ <!-- ENDIF -->
+
+ <!-- IF not postrow.S_HAS_ATTACHMENTS --><br clear="all" /><br /><!-- ENDIF -->
+
+ <table width="100%" cellspacing="0">
+ <tr valign="middle">
+ <td class="gensmall" align="{S_CONTENT_FLOW_END}">
+ <!-- IF not S_IS_BOT -->
+ <!-- IF postrow.U_REPORT --><a href="{postrow.U_REPORT}">{REPORT_IMG}</a> <!-- ENDIF -->
+ <!-- IF postrow.U_INFO --><a href="{postrow.U_INFO}">{INFO_IMG}</a> <!-- ENDIF -->
+ <!-- IF postrow.U_WARN --><a href="{postrow.U_WARN}">{WARN_IMG}</a> <!-- ENDIF -->
+ <!-- IF postrow.U_DELETE --><a href="{postrow.U_DELETE}">{DELETE_IMG}</a> <!-- ENDIF -->
+ <!-- ENDIF -->
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+
+ <td class="profile"><strong><a href="#wrapheader">{L_BACK_TO_TOP}</a></strong></td>
+ <td><div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF postrow.U_POST_AUTHOR --><a href="{postrow.U_POST_AUTHOR}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_PM --><a href="{postrow.U_PM}">{PM_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_EMAIL --><a href="{postrow.U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF -->&nbsp;</div> <div class="gensmall" style="float: {S_CONTENT_FLOW_END};"><!-- IF not S_IS_BOT --><!-- IF postrow.U_EDIT --><a href="{postrow.U_EDIT}">{EDIT_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_QUOTE --><a href="{postrow.U_QUOTE}">{QUOTE_IMG}</a> <!-- ENDIF --> <!-- ENDIF -->&nbsp;</div></td>
+ <!-- ENDIF -->
+ </tr>
+
+ <tr>
+ <td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
+ </tr>
+ </table>
+<!-- END postrow -->
+
+ <!-- IF not S_IS_BOT -->
+ <table width="100%" cellspacing="1" class="tablebg">
+ <tr align="center">
+ <td class="cat"><form name="viewtopic" method="post" action="{S_TOPIC_ACTION}"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></form></td>
+ </tr>
+ </table>
+ <!-- ENDIF -->
+
+ <table width="100%" cellspacing="1">
+ <tr>
+ <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap">
+ <!-- IF not S_IS_BOT -->
+ <!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a>&nbsp;<!-- ENDIF -->
+ <!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a><!-- ENDIF -->
+ <!-- ENDIF -->
+ </td>
+ <!-- IF TOTAL_POSTS -->
+ <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
+ <td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_POSTS} ]&nbsp;</td>
+ <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
+ <!-- ENDIF -->
+ </tr>
+ </table>
+
+</div>
+
+<div id="pagefooter"></div>
+
+<br clear="all" />
+<!-- IF S_QUICK_REPLY -->
+<!-- INCLUDE quickreply_editor.html -->
+<!-- ENDIF -->
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<!-- IF S_DISPLAY_ONLINE_LIST -->
+ <br clear="all" />
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="cat"><h4>{L_WHO_IS_ONLINE}</h4></td>
+ </tr>
+ <tr>
+ <td class="row1"><p class="gensmall">{LOGGED_IN_USER_LIST}</p></td>
+ </tr>
+ </table>
+<!-- ENDIF -->
+
+<br clear="all" />
+
+<table width="100%" cellspacing="1">
+<tr>
+ <td width="40%" valign="top" nowrap="nowrap" align="{S_CONTENT_FLOW_BEGIN}"><!-- IF S_TOPIC_MOD --><form method="post" action="{S_MOD_ACTION}"><span class="gensmall">{L_QUICK_MOD}:</span> {S_TOPIC_MOD} <input class="btnlite" type="submit" value="{L_GO}" /></form><!-- ENDIF --></td>
+ <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><span class="gensmall"><!-- BEGIN rules -->{rules.RULE}<br /><!-- END rules --></span></td>
+</tr>
+</table>
+
+<br clear="all" />
+
+<table width="100%" cellspacing="0">
+<tr>
+ <td><!-- IF S_DISPLAY_SEARCHBOX --><!-- INCLUDE searchbox.html --><!-- ENDIF --></td>
+ <td align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></td>
+</tr>
+</table>
+
+<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/viewtopic_print.html b/phpBB/styles/subsilver2/template/viewtopic_print.html
new file mode 100644
index 0000000000..e1521c00a7
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/viewtopic_print.html
@@ -0,0 +1,145 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<meta http-equiv="Content-Language" content="{S_USER_LANG}">
+<title>{SITENAME} :: {PAGE_TITLE}</title>
+
+<style type="text/css">
+<!--
+
+body {
+ font-family: Verdana,serif;
+ font-size: 10pt;
+}
+
+img {
+ border: 0;
+}
+
+td {
+ font-family: Verdana,serif;
+ font-size: 10pt;
+ line-height: 150%;
+}
+
+.code, .codecontent,
+.quote, .quotecontent {
+ margin: 0 5px 0 5px;
+ padding: 5px;
+ font-size: smaller;
+ border: black solid 1px;
+}
+
+.quotetitle {
+ color: black;
+ display : block;
+ font-weight: bold;
+}
+
+.forum {
+ font-family: Arial,Helvetica,sans-serif;
+ font-weight: bold;
+ font-size: 18pt;
+}
+
+.topic {
+ font-family: Arial,Helvetica,sans-serif;
+ font-size: 14pt;
+ font-weight: bold;
+}
+
+.gensmall {
+ font-size: 8pt;
+}
+
+hr {
+ color: #888;
+ height: 3px;
+ border-style: solid;
+}
+
+hr.sep {
+ color: #aaa;
+ height: 1px;
+ border-style: dashed;
+}
+//-->
+</style>
+
+</head>
+<body>
+
+<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
+<tr>
+ <td colspan="2" align="center"><span class="Forum">{SITENAME}</span><br /><span class="gensmall"><a href="{U_FORUM}">{U_FORUM}</a></span></td>
+</tr>
+<tr>
+ <td colspan="2"><br /></td>
+</tr>
+<tr>
+ <td><span class="topic">{TOPIC_TITLE}</span><br /><span class="gensmall"><a href="{U_TOPIC}">{U_TOPIC}</a></span></td>
+ <td align="{S_CONTENT_FLOW_END}" valign="bottom"><span class="gensmall">{PAGE_NUMBER}</span></td>
+</tr>
+</table>
+
+<!-- BEGIN postrow -->
+
+ <hr width="85%" />
+
+ <table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
+ <tr>
+ <td width="10%" nowrap="nowrap">{L_AUTHOR}:&nbsp;</td>
+ <td><b<!-- IF postrow.POST_AUTHOR_COLOUR --> style="color: {postrow.POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{postrow.POST_AUTHOR}</b> [ {postrow.POST_DATE} ]</td>
+ </tr>
+ <tr>
+ <td width="10%" nowrap="nowrap">{L_POST_SUBJECT}:&nbsp;</td>
+ <td><b>{postrow.POST_SUBJECT}</b></td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr class="sep" />{postrow.MESSAGE}
+
+ <!-- IF postrow.S_HAS_ATTACHMENTS -->
+ <br clear="all" /><br />
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td><b class="genmed">{L_ATTACHMENTS}: </b></td>
+ </tr>
+ <!-- BEGIN attachment -->
+ <tr>
+ <td>{postrow.attachment.DISPLAY_ATTACHMENT}</td>
+ </tr>
+ <!-- END attachment -->
+ </table>
+ <!-- ENDIF -->
+
+ </td>
+ </tr>
+ </table>
+<!-- END postrow -->
+
+<hr width="85%" />
+<!--
+ We request you retain the full copyright notice below including the link to www.phpbb.com.
+ This not only gives respect to the large amount of time given freely by the developers
+ but also helps build interest, traffic and use of phpBB3. If you (honestly) cannot retain
+ the full copyright we ask you at least leave in place the "Powered by phpBB" line. If you
+ refuse to include even this then support on our forums may be affected.
+
+ The phpBB Group : 2006
+// -->
+
+<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
+<tr>
+ <td><span class="gensmall">{PAGE_NUMBER}</span></td>
+ <td align="{S_CONTENT_FLOW_END}"><span class="gensmall">{S_TIMEZONE}</span></td>
+</tr>
+<tr>
+ <td colspan="2" align="center"><span class="gensmall">Powered by phpBB &copy; 2000, 2002, 2005, 2007 phpBB Group<br />http://www.phpbb.com/</span></td>
+</tr>
+</table>
+
+</body>
+</html> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/theme/images/background.gif b/phpBB/styles/subsilver2/theme/images/background.gif
new file mode 100644
index 0000000000..5c731e4fc2
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/background.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/cellpic.gif b/phpBB/styles/subsilver2/theme/images/cellpic.gif
new file mode 100644
index 0000000000..47457ef5f7
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/cellpic.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/cellpic1.gif b/phpBB/styles/subsilver2/theme/images/cellpic1.gif
new file mode 100644
index 0000000000..715b8d4aa8
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/cellpic1.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/cellpic2.jpg b/phpBB/styles/subsilver2/theme/images/cellpic2.jpg
new file mode 100644
index 0000000000..a0ca7e89d3
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/cellpic2.jpg
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/cellpic2_rtl.jpg b/phpBB/styles/subsilver2/theme/images/cellpic2_rtl.jpg
new file mode 100644
index 0000000000..201e063725
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/cellpic2_rtl.jpg
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/cellpic3.gif b/phpBB/styles/subsilver2/theme/images/cellpic3.gif
new file mode 100644
index 0000000000..ecf70e1fd1
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/cellpic3.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/created_by.jpg b/phpBB/styles/subsilver2/theme/images/created_by.jpg
new file mode 100644
index 0000000000..f27472781e
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/created_by.jpg
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/icon_mini_faq.gif b/phpBB/styles/subsilver2/theme/images/icon_mini_faq.gif
new file mode 100644
index 0000000000..fc50e7ca30
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/icon_mini_faq.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/icon_mini_groups.gif b/phpBB/styles/subsilver2/theme/images/icon_mini_groups.gif
new file mode 100644
index 0000000000..a4d1c7bb70
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/icon_mini_groups.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/icon_mini_login.gif b/phpBB/styles/subsilver2/theme/images/icon_mini_login.gif
new file mode 100644
index 0000000000..c7590a423f
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/icon_mini_login.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/icon_mini_members.gif b/phpBB/styles/subsilver2/theme/images/icon_mini_members.gif
new file mode 100644
index 0000000000..d636089b38
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/icon_mini_members.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/icon_mini_message.gif b/phpBB/styles/subsilver2/theme/images/icon_mini_message.gif
new file mode 100644
index 0000000000..b8aea1eafb
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/icon_mini_message.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/icon_mini_profile.gif b/phpBB/styles/subsilver2/theme/images/icon_mini_profile.gif
new file mode 100644
index 0000000000..1ec7c649e9
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/icon_mini_profile.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/icon_mini_register.gif b/phpBB/styles/subsilver2/theme/images/icon_mini_register.gif
new file mode 100644
index 0000000000..b49ac31ec9
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/icon_mini_register.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/icon_mini_search.gif b/phpBB/styles/subsilver2/theme/images/icon_mini_search.gif
new file mode 100644
index 0000000000..2bd1a648c0
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/icon_mini_search.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/index.htm b/phpBB/styles/subsilver2/theme/images/index.htm
new file mode 100644
index 0000000000..29531416fe
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/index.htm
@@ -0,0 +1,16 @@
+<html>
+<head>
+<title>subSilver created by subBlue Design</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td align="center" valign="middle"><a href="http://www.subblue.com/" target="_new"><img src="created_by.jpg" width="400" height="300" alt="Created by subBlue Design" /></a></td>
+ </tr>
+</table>
+
+</body>
+</html> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/theme/images/no_avatar.gif b/phpBB/styles/subsilver2/theme/images/no_avatar.gif
new file mode 100644
index 0000000000..80539c8c71
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/no_avatar.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/spacer.gif b/phpBB/styles/subsilver2/theme/images/spacer.gif
new file mode 100644
index 0000000000..5bfd67a2d6
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/spacer.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/whosonline.gif b/phpBB/styles/subsilver2/theme/images/whosonline.gif
new file mode 100644
index 0000000000..b450927432
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/whosonline.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/stylesheet.css b/phpBB/styles/subsilver2/theme/stylesheet.css
new file mode 100644
index 0000000000..ab19231595
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/stylesheet.css
@@ -0,0 +1,663 @@
+/* phpBB 3.0 Style Sheet
+ --------------------------------------------------------------
+ Style name: subsilver2
+ Based on style: subSilver (the default phpBB 2 style)
+ Original author: subBlue ( http://www.subBlue.com/ )
+ Modified by: psoTFX and the phpBB team ( http://www.phpbb.com )
+
+ This is an alternative style for phpBB3 for those wishing to stay with
+ the familiar subSilver style of phpBB version 2.x
+
+ Copyright 2006 phpBB Group ( http://www.phpbb.com/ )
+ --------------------------------------------------------------
+*/
+
+/* Layout
+ ------------ */
+* {
+ /* Reset browsers default margin, padding and font sizes */
+ margin: 0;
+ padding: 0;
+}
+
+html {
+ font-size: 100%;
+}
+
+body {
+ /* Text-Sizing with ems: http://www.clagnut.com/blog/348/ */
+ font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
+ color: #323D4F;
+ background-color: #FFFFFF;
+ font-size: 62.5%; /* This sets the default font size to be equivalent to 10px */
+ margin: 0;
+}
+
+#wrapheader {
+ height: auto !important;
+ padding: 0;
+}
+
+#wrapcentre {
+ margin: 15px 25px 0 25px;
+}
+
+#wrapfooter {
+ text-align: center;
+ clear: both;
+}
+
+#wrapnav {
+ width: 100%;
+ margin: 0;
+ background-color: #ECECEC;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #A9B8C2;
+}
+
+#logodesc {
+ background-color: #C1CAD2;
+ background-image: url('./images/background.gif');
+ background-repeat: repeat-x;
+ background-position: center bottom;
+ padding: 0 25px 15px 25px;
+}
+
+#menubar {
+ margin: 0 25px;
+}
+
+#datebar {
+ margin: 10px 25px 0 25px;
+}
+
+#findbar {
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ border: 0;
+}
+
+.forumrules {
+ background-color: #F9CC79;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #BB9860;
+ padding: 4px;
+ font-weight: normal;
+ font-size: 1.1em;
+ font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
+}
+
+.forumrules h3 {
+ color: red;
+}
+
+#pageheader { }
+#pagecontent { }
+#pagefooter { }
+
+#poll { }
+#postrow { }
+#postdata { }
+
+
+/* Text
+ --------------------- */
+h1 {
+ color: black;
+ font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
+ font-weight: bold;
+ font-size: 1.8em;
+ text-decoration: none;
+}
+
+h2 {
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 1.5em;
+ text-decoration: none;
+ line-height: 120%;
+}
+
+h3 {
+ font-size: 1.3em;
+ font-weight: bold;
+ font-family: Arial, Helvetica, sans-serif;
+ line-height: 120%;
+}
+
+h4 {
+ margin: 0;
+ font-size: 1.1em;
+ font-weight: bold;
+}
+
+p {
+ font-size: 1.1em;
+}
+
+p.moderators {
+ margin: 0;
+ float: left;
+ color: black;
+ font-weight: bold;
+}
+
+.rtl p.moderators {
+ float: right;
+}
+
+p.linkmcp {
+ margin: 0;
+ float: right;
+ white-space: nowrap;
+}
+
+.rtl p.linkmcp {
+ float: left;
+}
+
+p.breadcrumbs {
+ margin: 0;
+ float: left;
+ color: black;
+ font-weight: bold;
+ white-space: normal;
+ font-size: 1em;
+}
+
+.rtl p.breadcrumbs {
+ float: right;
+}
+
+p.datetime {
+ margin: 0;
+ float: right;
+ white-space: nowrap;
+ font-size: 1em;
+}
+
+.rtl p.datetime {
+ float: left;
+}
+
+p.searchbar {
+ padding: 2px 0;
+ white-space: nowrap;
+}
+
+p.searchbarreg {
+ margin: 0;
+ float: right;
+ white-space: nowrap;
+}
+
+.rtl p.searchbarreg {
+ float: left;
+}
+
+p.forumdesc {
+ padding-bottom: 4px;
+}
+
+p.topicauthor {
+ margin: 1px 0;
+}
+
+p.topicdetails {
+ margin: 1px 0;
+}
+
+.postreported, .postreported a:visited, .postreported a:hover, .postreported a:link, .postreported a:active {
+ margin: 1px 0;
+ color: red;
+ font-weight:bold;
+}
+
+.postapprove, .postapprove a:visited, .postapprove a:hover, .postapprove a:link, .postapprove a:active {
+ color: green;
+ font-weight:bold;
+}
+
+.postapprove img, .postreported img {
+ vertical-align: bottom;
+ padding-top: 5px;
+}
+
+.postauthor {
+ color: #000000;
+}
+
+.postdetails {
+ color: #000000;
+}
+
+.postbody {
+ font-size: 1.3em;
+ line-height: 1.4em;
+ font-family: "Lucida Grande", "Trebuchet MS", Helvetica, Arial, sans-serif;
+}
+
+.postbody li, ol, ul {
+ margin: 0 0 0 1.5em;
+}
+
+.rtl .postbody li, .rtl ol, .rtl ul {
+ margin: 0 1.5em 0 0;
+}
+
+.posthilit {
+ background-color: yellow;
+}
+
+.nav {
+ margin: 0;
+ color: black;
+ font-weight: bold;
+}
+
+.pagination {
+ padding: 4px;
+ color: black;
+ font-size: 1em;
+ font-weight: bold;
+}
+
+.cattitle {
+
+}
+
+.gen {
+ margin: 1px 1px;
+ font-size: 1.2em;
+}
+
+.genmed {
+ margin: 1px 1px;
+ font-size: 1.1em;
+}
+
+.gensmall {
+ margin: 1px 1px;
+ font-size: 1em;
+}
+
+.copyright {
+ color: #444;
+ font-weight: normal;
+ font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
+}
+
+.titles {
+ font-family: "Lucida Grande", Helvetica, Arial, sans-serif;
+ font-weight: bold;
+ font-size: 1.3em;
+ text-decoration: none;
+}
+
+.error {
+ color: red;
+}
+
+
+/* Tables
+ ------------ */
+th {
+ color: #FFA34F;
+ font-size: 1.1em;
+ font-weight: bold;
+ background-color: #006699;
+ background-image: url('./images/cellpic3.gif');
+ white-space: nowrap;
+ padding: 7px 5px;
+}
+
+td {
+ padding: 2px;
+}
+td.profile {
+ padding: 4px;
+}
+
+.tablebg {
+ background-color: #A9B8C2;
+}
+
+.catdiv {
+ height: 28px;
+ margin: 0;
+ padding: 0;
+ border: 0;
+ background: white url('./images/cellpic2.jpg') repeat-y scroll top left;
+}
+.rtl .catdiv {
+ background: white url('./images/cellpic2_rtl.jpg') repeat-y scroll top right;
+}
+
+.cat {
+ height: 28px;
+ margin: 0;
+ padding: 0;
+ border: 0;
+ background-color: #C7D0D7;
+ background-image: url('./images/cellpic1.gif');
+ text-indent: 4px;
+}
+
+.row1 {
+ background-color: #ECECEC;
+ padding: 4px;
+}
+
+.row2 {
+ background-color: #DCE1E5;
+ padding: 4px;
+}
+
+.row3 {
+ background-color: #C0C8D0;
+ padding: 4px;
+}
+
+.spacer {
+ background-color: #D1D7DC;
+}
+
+hr {
+ height: 1px;
+ border-width: 0;
+ background-color: #D1D7DC;
+ color: #D1D7DC;
+}
+
+.legend {
+ text-align:center;
+ margin: 0 auto;
+}
+
+/* Links
+ ------------ */
+a:link {
+ color: #006597;
+ text-decoration: none;
+}
+
+a:active,
+a:visited {
+ color: #005784;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #D46400;
+ text-decoration: underline;
+}
+
+a.forumlink {
+ color: #069;
+ font-weight: bold;
+ font-family: "Lucida Grande", Helvetica, Arial, sans-serif;
+ font-size: 1.2em;
+}
+
+a.topictitle {
+ margin: 1px 0;
+ font-family: "Lucida Grande", Helvetica, Arial, sans-serif;
+ font-weight: bold;
+ font-size: 1.2em;
+}
+
+a.topictitle:visited {
+ color: #5493B4;
+ text-decoration: none;
+}
+
+th a,
+th a:visited {
+ color: #FFA34F !important;
+ text-decoration: none;
+}
+
+th a:hover {
+ text-decoration: underline;
+}
+
+
+/* Form Elements
+ ------------ */
+form {
+ margin: 0;
+ padding: 0;
+ border: 0;
+}
+
+input {
+ color: #333333;
+ font-family: "Lucida Grande", Verdana, Helvetica, sans-serif;
+ font-size: 1.1em;
+ font-weight: normal;
+ padding: 1px;
+ border: 1px solid #A9B8C2;
+ background-color: #FAFAFA;
+}
+
+textarea {
+ background-color: #FAFAFA;
+ color: #333333;
+ font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
+ font-size: 1.3em;
+ line-height: 1.4em;
+ font-weight: normal;
+ border: 1px solid #A9B8C2;
+ padding: 2px;
+}
+
+select {
+ color: #333333;
+ background-color: #FAFAFA;
+ font-family: "Lucida Grande", Verdana, Helvetica, sans-serif;
+ font-size: 1.1em;
+ font-weight: normal;
+ border: 1px solid #A9B8C2;
+ padding: 1px;
+}
+
+option {
+ padding: 0 1em 0 0;
+}
+
+option.disabled-option {
+ color: graytext;
+}
+
+.rtl option {
+ padding: 0 0 0 1em;
+}
+
+input.radio {
+ border: none;
+ background-color: transparent;
+}
+
+.post {
+ background-color: white;
+ border-style: solid;
+ border-width: 1px;
+}
+
+.btnbbcode {
+ color: #000000;
+ font-weight: normal;
+ font-size: 1.1em;
+ font-family: "Lucida Grande", Verdana, Helvetica, sans-serif;
+ background-color: #EFEFEF;
+ border: 1px solid #666666;
+}
+
+.btnmain {
+ font-weight: bold;
+ background-color: #ECECEC;
+ border: 1px solid #A9B8C2;
+ cursor: pointer;
+ padding: 1px 5px;
+ font-size: 1.1em;
+}
+
+.btnlite {
+ font-weight: normal;
+ background-color: #ECECEC;
+ border: 1px solid #A9B8C2;
+ cursor: pointer;
+ padding: 1px 5px;
+ font-size: 1.1em;
+}
+
+.btnfile {
+ font-weight: normal;
+ background-color: #ECECEC;
+ border: 1px solid #A9B8C2;
+ padding: 1px 5px;
+ font-size: 1.1em;
+}
+
+.helpline {
+ background-color: #DEE3E7;
+ border-style: none;
+}
+
+
+/* BBCode
+ ------------ */
+.quotetitle, .attachtitle {
+ margin: 10px 5px 0 5px;
+ padding: 4px;
+ border-width: 1px 1px 0 1px;
+ border-style: solid;
+ border-color: #A9B8C2;
+ color: #333333;
+ background-color: #A9B8C2;
+ font-size: 0.85em;
+ font-weight: bold;
+}
+
+.quotetitle .quotetitle {
+ font-size: 1em;
+}
+
+.quotecontent, .attachcontent {
+ margin: 0 5px 10px 5px;
+ padding: 5px;
+ border-color: #A9B8C2;
+ border-width: 0 1px 1px 1px;
+ border-style: solid;
+ font-weight: normal;
+ font-size: 1em;
+ line-height: 1.4em;
+ font-family: "Lucida Grande", "Trebuchet MS", Helvetica, Arial, sans-serif;
+ background-color: #FAFAFA;
+ color: #4B5C77;
+}
+
+.attachcontent {
+ font-size: 0.85em;
+}
+
+.codetitle {
+ margin: 10px 5px 0 5px;
+ padding: 2px 4px;
+ border-width: 1px 1px 0 1px;
+ border-style: solid;
+ border-color: #A9B8C2;
+ color: #333333;
+ background-color: #A9B8C2;
+ font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
+ font-size: 0.8em;
+}
+
+.codecontent {
+ direction: ltr;
+ margin: 0 5px 10px 5px;
+ padding: 5px;
+ border-color: #A9B8C2;
+ border-width: 0 1px 1px 1px;
+ border-style: solid;
+ font-weight: normal;
+ color: #006600;
+ font-size: 0.85em;
+ font-family: Monaco, 'Courier New', monospace;
+ background-color: #FAFAFA;
+}
+
+.syntaxbg {
+ color: #FFFFFF;
+}
+
+.syntaxcomment {
+ color: #FF8000;
+}
+
+.syntaxdefault {
+ color: #0000BB;
+}
+
+.syntaxhtml {
+ color: #000000;
+}
+
+.syntaxkeyword {
+ color: #007700;
+}
+
+.syntaxstring {
+ color: #DD0000;
+}
+
+
+/* Private messages
+ ------------------ */
+.pm_marked_colour {
+ background-color: #000000;
+}
+
+.pm_replied_colour {
+ background-color: #A9B8C2;
+}
+
+.pm_friend_colour {
+ background-color: #007700;
+}
+
+.pm_foe_colour {
+ background-color: #DD0000;
+}
+
+
+/* Misc
+ ------------ */
+img {
+ border: none;
+}
+
+.sep {
+ color: black;
+ background-color: #FFA34F;
+}
+
+table.colortable td {
+ padding: 0;
+}
+
+pre {
+ font-size: 1.1em;
+ font-family: Monaco, 'Courier New', monospace;
+}
+
+.nowrap {
+ white-space: nowrap;
+}
+
+.username-coloured {
+ font-weight: bold;
+} \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/theme/theme.cfg b/phpBB/styles/subsilver2/theme/theme.cfg
new file mode 100644
index 0000000000..57b7fa8c63
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/theme.cfg
@@ -0,0 +1,35 @@
+#
+# phpBB Theme Configuration File
+#
+# @package phpBB3
+# @copyright (c) 2005 phpBB Group
+# @license http://opensource.org/licenses/gpl-license.php GNU Public License
+#
+#
+# At the left is the name, please do not change this
+# At the right the value is entered
+# For on/off options the valid values are on, off, 1, 0, true and false
+#
+# Values get trimmed, if you want to add a space in front or at the end of
+# the value, then enclose the value with single or double quotes.
+# Single and double quotes do not need to be escaped.
+#
+# Available and used values:
+# parse_css_file
+#
+
+# General Information about this theme
+name = subsilver2
+copyright = &copy; phpBB Group, 2003
+version = 3.0.6
+
+# Some configuration options
+
+#
+# You have to turn this option on if you want to use the
+# path template variables ({T_IMAGESET_PATH} for example) within
+# your css file.
+# This is mostly the case if you want to use language specific
+# images within your css file.
+#
+parse_css_file = off
diff --git a/phpBB/ucp.php b/phpBB/ucp.php
new file mode 100644
index 0000000000..994fe064a1
--- /dev/null
+++ b/phpBB/ucp.php
@@ -0,0 +1,349 @@
+<?php
+/**
+*
+* @package ucp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+require($phpbb_root_path . 'common.' . $phpEx);
+require($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+require($phpbb_root_path . 'includes/functions_module.' . $phpEx);
+
+// Basic parameter data
+$id = request_var('i', '');
+$mode = request_var('mode', '');
+
+if ($mode == 'login' || $mode == 'logout' || $mode == 'confirm')
+{
+ define('IN_LOGIN', true);
+}
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup('ucp');
+
+// Setting a variable to let the style designer know where he is...
+$template->assign_var('S_IN_UCP', true);
+
+$module = new p_master();
+$default = false;
+
+// Basic "global" modes
+switch ($mode)
+{
+ case 'activate':
+ $module->load('ucp', 'activate');
+ $module->display($user->lang['UCP_ACTIVATE']);
+
+ redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
+ break;
+
+ case 'resend_act':
+ $module->load('ucp', 'resend');
+ $module->display($user->lang['UCP_RESEND']);
+ break;
+
+ case 'sendpassword':
+ $module->load('ucp', 'remind');
+ $module->display($user->lang['UCP_REMIND']);
+ break;
+
+ case 'register':
+ if ($user->data['is_registered'] || isset($_REQUEST['not_agreed']))
+ {
+ redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
+ }
+
+ $module->load('ucp', 'register');
+ $module->display($user->lang['REGISTER']);
+ break;
+
+ case 'confirm':
+ $module->load('ucp', 'confirm');
+ break;
+
+ case 'login':
+ if ($user->data['is_registered'])
+ {
+ redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
+ }
+
+ login_box(request_var('redirect', "index.$phpEx"));
+ break;
+
+ case 'logout':
+ if ($user->data['user_id'] != ANONYMOUS && isset($_GET['sid']) && !is_array($_GET['sid']) && $_GET['sid'] === $user->session_id)
+ {
+ $user->session_kill();
+ $user->session_begin();
+ $message = $user->lang['LOGOUT_REDIRECT'];
+ }
+ else
+ {
+ $message = ($user->data['user_id'] == ANONYMOUS) ? $user->lang['LOGOUT_REDIRECT'] : $user->lang['LOGOUT_FAILED'];
+ }
+ meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
+
+ $message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a> ');
+ trigger_error($message);
+
+ break;
+
+ case 'terms':
+ case 'privacy':
+
+ $message = ($mode == 'terms') ? 'TERMS_OF_USE_CONTENT' : 'PRIVACY_POLICY';
+ $title = ($mode == 'terms') ? 'TERMS_USE' : 'PRIVACY';
+
+ if (empty($user->lang[$message]))
+ {
+ if ($user->data['is_registered'])
+ {
+ redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
+ }
+
+ login_box();
+ }
+
+ $template->set_filenames(array(
+ 'body' => 'ucp_agreement.html')
+ );
+
+ // Disable online list
+ page_header($user->lang[$title], false);
+
+ $template->assign_vars(array(
+ 'S_AGREEMENT' => true,
+ 'AGREEMENT_TITLE' => $user->lang[$title],
+ 'AGREEMENT_TEXT' => sprintf($user->lang[$message], $config['sitename'], generate_board_url()),
+ 'U_BACK' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
+ 'L_BACK' => $user->lang['BACK_TO_LOGIN'],
+ ));
+
+ page_footer();
+
+ break;
+
+ case 'delete_cookies':
+
+ // Delete Cookies with dynamic names (do NOT delete poll cookies)
+ if (confirm_box(true))
+ {
+ $set_time = time() - 31536000;
+
+ foreach ($_COOKIE as $cookie_name => $cookie_data)
+ {
+ // Only delete board cookies, no other ones...
+ if (strpos($cookie_name, $config['cookie_name'] . '_') !== 0)
+ {
+ continue;
+ }
+
+ $cookie_name = str_replace($config['cookie_name'] . '_', '', $cookie_name);
+
+ // Polls are stored as {cookie_name}_poll_{topic_id}, cookie_name_ got removed, therefore checking for poll_
+ if (strpos($cookie_name, 'poll_') !== 0)
+ {
+ $user->set_cookie($cookie_name, '', $set_time);
+ }
+ }
+
+ $user->set_cookie('track', '', $set_time);
+ $user->set_cookie('u', '', $set_time);
+ $user->set_cookie('k', '', $set_time);
+ $user->set_cookie('sid', '', $set_time);
+
+ // We destroy the session here, the user will be logged out nevertheless
+ $user->session_kill();
+ $user->session_begin();
+
+ meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
+
+ $message = $user->lang['COOKIES_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
+ trigger_error($message);
+ }
+ else
+ {
+ confirm_box(false, 'DELETE_COOKIES', '');
+ }
+
+ redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
+
+ break;
+
+ case 'switch_perm':
+
+ $user_id = request_var('u', 0);
+
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . (int) $user_id;
+ $result = $db->sql_query($sql);
+ $user_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$auth->acl_get('a_switchperm') || !$user_row || $user_id == $user->data['user_id'] || !check_link_hash(request_var('hash', ''), 'switchperm'))
+ {
+ redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
+ }
+
+ include($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
+
+ $auth_admin = new auth_admin();
+ if (!$auth_admin->ghost_permissions($user_id, $user->data['user_id']))
+ {
+ redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
+ }
+
+ add_log('admin', 'LOG_ACL_TRANSFER_PERMISSIONS', $user_row['username']);
+
+ $message = sprintf($user->lang['PERMISSIONS_TRANSFERRED'], $user_row['username']) . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
+ trigger_error($message);
+
+ break;
+
+ case 'restore_perm':
+
+ if (!$user->data['user_perm_from'] || !$auth->acl_get('a_switchperm'))
+ {
+ redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
+ }
+
+ $auth->acl_cache($user->data);
+
+ $sql = 'SELECT username
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . $user->data['user_perm_from'];
+ $result = $db->sql_query($sql);
+ $username = $db->sql_fetchfield('username');
+ $db->sql_freeresult($result);
+
+ add_log('admin', 'LOG_ACL_RESTORE_PERMISSIONS', $username);
+
+ $message = $user->lang['PERMISSIONS_RESTORED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
+ trigger_error($message);
+
+ break;
+
+ default:
+ $default = true;
+ break;
+}
+
+// We use this approach because it does not impose large code changes
+if (!$default)
+{
+ return true;
+}
+
+// Only registered users can go beyond this point
+if (!$user->data['is_registered'])
+{
+ if ($user->data['is_bot'])
+ {
+ redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
+ }
+
+ login_box('', $user->lang['LOGIN_EXPLAIN_UCP']);
+}
+
+// Instantiate module system and generate list of available modules
+$module->list_modules('ucp');
+
+// Check if the zebra module is set
+if ($module->is_active('zebra', 'friends'))
+{
+ // Output listing of friends online
+ $update_time = $config['load_online_time'] * 60;
+
+ $sql = $db->sql_build_query('SELECT_DISTINCT', array(
+ 'SELECT' => 'u.user_id, u.username, u.username_clean, u.user_colour, MAX(s.session_time) as online_time, MIN(s.session_viewonline) AS viewonline',
+
+ 'FROM' => array(
+ USERS_TABLE => 'u',
+ ZEBRA_TABLE => 'z'
+ ),
+
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(SESSIONS_TABLE => 's'),
+ 'ON' => 's.session_user_id = z.zebra_id'
+ )
+ ),
+
+ 'WHERE' => 'z.user_id = ' . $user->data['user_id'] . '
+ AND z.friend = 1
+ AND u.user_id = z.zebra_id',
+
+ 'GROUP_BY' => 'z.zebra_id, u.user_id, u.username_clean, u.user_colour, u.username',
+
+ 'ORDER_BY' => 'u.username_clean ASC',
+ ));
+
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $which = (time() - $update_time < $row['online_time'] && ($row['viewonline'] || $auth->acl_get('u_viewonline'))) ? 'online' : 'offline';
+
+ $template->assign_block_vars("friends_{$which}", array(
+ 'USER_ID' => $row['user_id'],
+
+ 'U_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USER_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']))
+ );
+ }
+ $db->sql_freeresult($result);
+}
+
+// Do not display subscribed topics/forums if not allowed
+if (!$config['allow_topic_notify'] && !$config['allow_forum_notify'])
+{
+ $module->set_display('main', 'subscribed', false);
+}
+
+// Select the active module
+$module->set_active($id, $mode);
+
+// Load and execute the relevant module
+$module->load_active();
+
+// Assign data to the template engine for the list of modules
+$module->assign_tpl_vars(append_sid("{$phpbb_root_path}ucp.$phpEx"));
+
+// Generate the page, do not display/query online list
+$module->display($module->get_page_title(), false);
+
+/**
+* Function for assigning a template var if the zebra module got included
+*/
+function _module_zebra($mode, &$module_row)
+{
+ global $template;
+
+ $template->assign_var('S_ZEBRA_ENABLED', true);
+
+ if ($mode == 'friends')
+ {
+ $template->assign_var('S_ZEBRA_FRIENDS_ENABLED', true);
+ }
+
+ if ($mode == 'foes')
+ {
+ $template->assign_var('S_ZEBRA_FOES_ENABLED', true);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
new file mode 100644
index 0000000000..95c142d865
--- /dev/null
+++ b/phpBB/viewforum.php
@@ -0,0 +1,703 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+
+// Start session
+$user->session_begin();
+$auth->acl($user->data);
+
+// Start initial var setup
+$forum_id = request_var('f', 0);
+$mark_read = request_var('mark', '');
+$start = request_var('start', 0);
+
+$default_sort_days = (!empty($user->data['user_topic_show_days'])) ? $user->data['user_topic_show_days'] : 0;
+$default_sort_key = (!empty($user->data['user_topic_sortby_type'])) ? $user->data['user_topic_sortby_type'] : 't';
+$default_sort_dir = (!empty($user->data['user_topic_sortby_dir'])) ? $user->data['user_topic_sortby_dir'] : 'd';
+
+$sort_days = request_var('st', $default_sort_days);
+$sort_key = request_var('sk', $default_sort_key);
+$sort_dir = request_var('sd', $default_sort_dir);
+
+// Check if the user has actually sent a forum ID with his/her request
+// If not give them a nice error page.
+if (!$forum_id)
+{
+ trigger_error('NO_FORUM');
+}
+
+$sql_from = FORUMS_TABLE . ' f';
+$lastread_select = '';
+
+// Grab appropriate forum data
+if ($config['load_db_lastread'] && $user->data['is_registered'])
+{
+ $sql_from .= ' LEFT JOIN ' . FORUMS_TRACK_TABLE . ' ft ON (ft.user_id = ' . $user->data['user_id'] . '
+ AND ft.forum_id = f.forum_id)';
+ $lastread_select .= ', ft.mark_time';
+}
+
+if ($user->data['is_registered'])
+{
+ $sql_from .= ' LEFT JOIN ' . FORUMS_WATCH_TABLE . ' fw ON (fw.forum_id = f.forum_id AND fw.user_id = ' . $user->data['user_id'] . ')';
+ $lastread_select .= ', fw.notify_status';
+}
+
+$sql = "SELECT f.* $lastread_select
+ FROM $sql_from
+ WHERE f.forum_id = $forum_id";
+$result = $db->sql_query($sql);
+$forum_data = $db->sql_fetchrow($result);
+$db->sql_freeresult($result);
+
+if (!$forum_data)
+{
+ trigger_error('NO_FORUM');
+}
+
+
+// Configure style, language, etc.
+$user->setup('viewforum', $forum_data['forum_style']);
+
+// Redirect to login upon emailed notification links
+if (isset($_GET['e']) && !$user->data['is_registered'])
+{
+ login_box('', $user->lang['LOGIN_NOTIFY_FORUM']);
+}
+
+// Permissions check
+if (!$auth->acl_gets('f_list', 'f_read', $forum_id) || ($forum_data['forum_type'] == FORUM_LINK && $forum_data['forum_link'] && !$auth->acl_get('f_read', $forum_id)))
+{
+ if ($user->data['user_id'] != ANONYMOUS)
+ {
+ trigger_error('SORRY_AUTH_READ');
+ }
+
+ login_box('', $user->lang['LOGIN_VIEWFORUM']);
+}
+
+// Forum is passworded ... check whether access has been granted to this
+// user this session, if not show login box
+if ($forum_data['forum_password'])
+{
+ login_forum_box($forum_data);
+}
+
+// Is this forum a link? ... User got here either because the
+// number of clicks is being tracked or they guessed the id
+if ($forum_data['forum_type'] == FORUM_LINK && $forum_data['forum_link'])
+{
+ // Does it have click tracking enabled?
+ if ($forum_data['forum_flags'] & FORUM_FLAG_LINK_TRACK)
+ {
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET forum_posts = forum_posts + 1
+ WHERE forum_id = ' . $forum_id;
+ $db->sql_query($sql);
+ }
+
+ // We redirect to the url. The third parameter indicates that external redirects are allowed.
+ redirect($forum_data['forum_link'], false, true);
+ return;
+}
+
+// Build navigation links
+generate_forum_nav($forum_data);
+
+// Forum Rules
+if ($auth->acl_get('f_read', $forum_id))
+{
+ generate_forum_rules($forum_data);
+}
+
+// Do we have subforums?
+$active_forum_ary = $moderators = array();
+
+if ($forum_data['left_id'] != $forum_data['right_id'] - 1)
+{
+ list($active_forum_ary, $moderators) = display_forums($forum_data, $config['load_moderators'], $config['load_moderators']);
+}
+else
+{
+ $template->assign_var('S_HAS_SUBFORUM', false);
+ if ($config['load_moderators'])
+ {
+ get_moderators($moderators, $forum_id);
+ }
+}
+
+// Dump out the page header and load viewforum template
+page_header($user->lang['VIEW_FORUM'] . ' - ' . $forum_data['forum_name'], true, $forum_id);
+
+$template->set_filenames(array(
+ 'body' => 'viewforum_body.html')
+);
+
+make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"), $forum_id);
+
+$template->assign_vars(array(
+ 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&amp;start=$start"),
+));
+
+// Not postable forum or showing active topics?
+if (!($forum_data['forum_type'] == FORUM_POST || (($forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS) && $forum_data['forum_type'] == FORUM_CAT)))
+{
+ page_footer();
+}
+
+// Ok, if someone has only list-access, we only display the forum list.
+// We also make this circumstance available to the template in case we want to display a notice. ;)
+if (!$auth->acl_get('f_read', $forum_id))
+{
+ $template->assign_vars(array(
+ 'S_NO_READ_ACCESS' => true,
+ ));
+
+ page_footer();
+}
+
+// Handle marking posts
+if ($mark_read == 'topics')
+{
+ $token = request_var('hash', '');
+ if (check_link_hash($token, 'global'))
+ {
+ // Add 0 to forums array to mark global announcements correctly
+ markread('topics', array($forum_id, 0));
+ }
+ $redirect_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id);
+ meta_refresh(3, $redirect_url);
+
+ trigger_error($user->lang['TOPICS_MARKED'] . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect_url . '">', '</a>'));
+}
+
+// Is a forum specific topic count required?
+if ($forum_data['forum_topics_per_page'])
+{
+ $config['topics_per_page'] = $forum_data['forum_topics_per_page'];
+}
+
+// Do the forum Prune thang - cron type job ...
+if ($forum_data['prune_next'] < time() && $forum_data['enable_prune'])
+{
+ $template->assign_var('RUN_CRON_TASK', '<img src="' . append_sid($phpbb_root_path . 'cron.' . $phpEx, 'cron_type=prune_forum&amp;f=' . $forum_id) . '" alt="cron" width="1" height="1" />');
+}
+
+// Forum rules and subscription info
+$s_watching_forum = array(
+ 'link' => '',
+ 'title' => '',
+ 'is_watching' => false,
+);
+
+if (($config['email_enable'] || $config['jab_enable']) && $config['allow_forum_notify'] && $forum_data['forum_type'] == FORUM_POST && $auth->acl_get('f_subscribe', $forum_id))
+{
+ $notify_status = (isset($forum_data['notify_status'])) ? $forum_data['notify_status'] : NULL;
+ watch_topic_forum('forum', $s_watching_forum, $user->data['user_id'], $forum_id, 0, $notify_status);
+}
+
+$s_forum_rules = '';
+gen_forum_auth_level('forum', $forum_id, $forum_data['forum_status']);
+
+// Topic ordering options
+$limit_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+
+$sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']);
+$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views');
+
+$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
+gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param, $default_sort_days, $default_sort_key, $default_sort_dir);
+
+// Limit topics to certain time frame, obtain correct topic count
+// global announcements must not be counted, normal announcements have to
+// be counted, as forum_topics(_real) includes them
+if ($sort_days)
+{
+ $min_post_time = time() - ($sort_days * 86400);
+
+ $sql = 'SELECT COUNT(topic_id) AS num_topics
+ FROM ' . TOPICS_TABLE . "
+ WHERE forum_id = $forum_id
+ AND ((topic_type <> " . POST_GLOBAL . " AND topic_last_post_time >= $min_post_time)
+ OR topic_type = " . POST_ANNOUNCE . ")
+ " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND topic_approved = 1');
+ $result = $db->sql_query($sql);
+ $topics_count = (int) $db->sql_fetchfield('num_topics');
+ $db->sql_freeresult($result);
+
+ if (isset($_POST['sort']))
+ {
+ $start = 0;
+ }
+ $sql_limit_time = "AND t.topic_last_post_time >= $min_post_time";
+
+ // Make sure we have information about day selection ready
+ $template->assign_var('S_SORT_DAYS', true);
+}
+else
+{
+ $topics_count = ($auth->acl_get('m_approve', $forum_id)) ? $forum_data['forum_topics_real'] : $forum_data['forum_topics'];
+ $sql_limit_time = '';
+}
+
+// Make sure $start is set to the last page if it exceeds the amount
+if ($start < 0 || $start > $topics_count)
+{
+ $start = ($start < 0) ? 0 : floor(($topics_count - 1) / $config['topics_per_page']) * $config['topics_per_page'];
+}
+
+// Basic pagewide vars
+$post_alt = ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->lang['FORUM_LOCKED'] : $user->lang['POST_NEW_TOPIC'];
+
+// Display active topics?
+$s_display_active = ($forum_data['forum_type'] == FORUM_CAT && ($forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS)) ? true : false;
+
+$template->assign_vars(array(
+ 'MODERATORS' => (!empty($moderators[$forum_id])) ? implode(', ', $moderators[$forum_id]) : '',
+
+ 'POST_IMG' => ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->img('button_topic_locked', $post_alt) : $user->img('button_topic_new', $post_alt),
+ 'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
+ 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
+ 'FOLDER_IMG' => $user->img('topic_read', 'NO_NEW_POSTS'),
+ 'FOLDER_NEW_IMG' => $user->img('topic_unread', 'NEW_POSTS'),
+ 'FOLDER_HOT_IMG' => $user->img('topic_read_hot', 'NO_NEW_POSTS_HOT'),
+ 'FOLDER_HOT_NEW_IMG' => $user->img('topic_unread_hot', 'NEW_POSTS_HOT'),
+ 'FOLDER_LOCKED_IMG' => $user->img('topic_read_locked', 'NO_NEW_POSTS_LOCKED'),
+ 'FOLDER_LOCKED_NEW_IMG' => $user->img('topic_unread_locked', 'NEW_POSTS_LOCKED'),
+ 'FOLDER_STICKY_IMG' => $user->img('sticky_read', 'POST_STICKY'),
+ 'FOLDER_STICKY_NEW_IMG' => $user->img('sticky_unread', 'POST_STICKY'),
+ 'FOLDER_ANNOUNCE_IMG' => $user->img('announce_read', 'POST_ANNOUNCEMENT'),
+ 'FOLDER_ANNOUNCE_NEW_IMG' => $user->img('announce_unread', 'POST_ANNOUNCEMENT'),
+ 'FOLDER_MOVED_IMG' => $user->img('topic_moved', 'TOPIC_MOVED'),
+ 'REPORTED_IMG' => $user->img('icon_topic_reported', 'TOPIC_REPORTED'),
+ 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPIC_UNAPPROVED'),
+ 'GOTO_PAGE_IMG' => $user->img('icon_post_target', 'GOTO_PAGE'),
+
+ 'L_NO_TOPICS' => ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->lang['POST_FORUM_LOCKED'] : $user->lang['NO_TOPICS'],
+
+ 'S_DISPLAY_POST_INFO' => ($forum_data['forum_type'] == FORUM_POST && ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS)) ? true : false,
+
+ 'S_IS_POSTABLE' => ($forum_data['forum_type'] == FORUM_POST) ? true : false,
+ 'S_USER_CAN_POST' => ($auth->acl_get('f_post', $forum_id)) ? true : false,
+ 'S_DISPLAY_ACTIVE' => $s_display_active,
+ 'S_SELECT_SORT_DIR' => $s_sort_dir,
+ 'S_SELECT_SORT_KEY' => $s_sort_key,
+ 'S_SELECT_SORT_DAYS' => $s_limit_days,
+ 'S_TOPIC_ICONS' => ($s_display_active && sizeof($active_forum_ary)) ? max($active_forum_ary['enable_icons']) : (($forum_data['enable_icons']) ? true : false),
+ 'S_WATCH_FORUM_LINK' => $s_watching_forum['link'],
+ 'S_WATCH_FORUM_TITLE' => $s_watching_forum['title'],
+ 'S_WATCHING_FORUM' => $s_watching_forum['is_watching'],
+ 'S_FORUM_ACTION' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&amp;start=$start"),
+ 'S_DISPLAY_SEARCHBOX' => ($auth->acl_get('u_search') && $auth->acl_get('f_search', $forum_id) && $config['load_search']) ? true : false,
+ 'S_SEARCHBOX_ACTION' => append_sid("{$phpbb_root_path}search.$phpEx", 'fid[]=' . $forum_id),
+ 'S_SINGLE_MODERATOR' => (!empty($moderators[$forum_id]) && sizeof($moderators[$forum_id]) > 1) ? false : true,
+ 'S_IS_LOCKED' => ($forum_data['forum_status'] == ITEM_LOCKED) ? true : false,
+ 'S_VIEWFORUM' => true,
+
+ 'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&amp;i=main&amp;mode=forum_view", true, $user->session_id) : '',
+ 'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=post&amp;f=' . $forum_id) : '',
+ 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : '') . "&amp;start=$start"),
+ 'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&amp;f=$forum_id&amp;mark=topics") : '',
+));
+
+// Grab icons
+$icons = $cache->obtain_icons();
+
+// Grab all topic data
+$rowset = $announcement_list = $topic_list = $global_announce_list = array();
+
+$sql_array = array(
+ 'SELECT' => 't.*',
+ 'FROM' => array(
+ TOPICS_TABLE => 't'
+ ),
+ 'LEFT_JOIN' => array(),
+);
+
+$sql_approved = ($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1';
+
+if ($user->data['is_registered'])
+{
+ if ($config['load_db_track'])
+ {
+ $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_POSTED_TABLE => 'tp'), 'ON' => 'tp.topic_id = t.topic_id AND tp.user_id = ' . $user->data['user_id']);
+ $sql_array['SELECT'] .= ', tp.topic_posted';
+ }
+
+ if ($config['load_db_lastread'])
+ {
+ $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_TRACK_TABLE => 'tt'), 'ON' => 'tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id']);
+ $sql_array['SELECT'] .= ', tt.mark_time';
+
+ if ($s_display_active && sizeof($active_forum_ary))
+ {
+ $sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TRACK_TABLE => 'ft'), 'ON' => 'ft.forum_id = t.forum_id AND ft.user_id = ' . $user->data['user_id']);
+ $sql_array['SELECT'] .= ', ft.mark_time AS forum_mark_time';
+ }
+ }
+}
+
+if ($forum_data['forum_type'] == FORUM_POST)
+{
+ // Obtain announcements ... removed sort ordering, sort by time in all cases
+ $sql = $db->sql_build_query('SELECT', array(
+ 'SELECT' => $sql_array['SELECT'],
+ 'FROM' => $sql_array['FROM'],
+ 'LEFT_JOIN' => $sql_array['LEFT_JOIN'],
+
+ 'WHERE' => 't.forum_id IN (' . $forum_id . ', 0)
+ AND t.topic_type IN (' . POST_ANNOUNCE . ', ' . POST_GLOBAL . ')',
+
+ 'ORDER_BY' => 't.topic_time DESC',
+ ));
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $rowset[$row['topic_id']] = $row;
+ $announcement_list[] = $row['topic_id'];
+
+ if ($row['topic_type'] == POST_GLOBAL)
+ {
+ $global_announce_list[$row['topic_id']] = true;
+ }
+ else
+ {
+ $topics_count--;
+ }
+ }
+ $db->sql_freeresult($result);
+}
+
+// If the user is trying to reach late pages, start searching from the end
+$store_reverse = false;
+$sql_limit = $config['topics_per_page'];
+if ($start > $topics_count / 2)
+{
+ $store_reverse = true;
+
+ if ($start + $config['topics_per_page'] > $topics_count)
+ {
+ $sql_limit = min($config['topics_per_page'], max(1, $topics_count - $start));
+ }
+
+ // Select the sort order
+ $sql_sort_order = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'ASC' : 'DESC');
+ $sql_start = max(0, $topics_count - $sql_limit - $start);
+}
+else
+{
+ // Select the sort order
+ $sql_sort_order = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
+ $sql_start = $start;
+}
+
+if ($forum_data['forum_type'] == FORUM_POST || !sizeof($active_forum_ary))
+{
+ $sql_where = 't.forum_id = ' . $forum_id;
+}
+else if (empty($active_forum_ary['exclude_forum_id']))
+{
+ $sql_where = $db->sql_in_set('t.forum_id', $active_forum_ary['forum_id']);
+}
+else
+{
+ $get_forum_ids = array_diff($active_forum_ary['forum_id'], $active_forum_ary['exclude_forum_id']);
+ $sql_where = (sizeof($get_forum_ids)) ? $db->sql_in_set('t.forum_id', $get_forum_ids) : 't.forum_id = ' . $forum_id;
+}
+
+// Grab just the sorted topic ids
+$sql = 'SELECT t.topic_id
+ FROM ' . TOPICS_TABLE . " t
+ WHERE $sql_where
+ AND t.topic_type IN (" . POST_NORMAL . ', ' . POST_STICKY . ")
+ $sql_approved
+ $sql_limit_time
+ ORDER BY t.topic_type " . ((!$store_reverse) ? 'DESC' : 'ASC') . ', ' . $sql_sort_order;
+$result = $db->sql_query_limit($sql, $sql_limit, $sql_start);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ $topic_list[] = (int) $row['topic_id'];
+}
+$db->sql_freeresult($result);
+
+// For storing shadow topics
+$shadow_topic_list = array();
+
+if (sizeof($topic_list))
+{
+ // SQL array for obtaining topics/stickies
+ $sql_array = array(
+ 'SELECT' => $sql_array['SELECT'],
+ 'FROM' => $sql_array['FROM'],
+ 'LEFT_JOIN' => $sql_array['LEFT_JOIN'],
+
+ 'WHERE' => $db->sql_in_set('t.topic_id', $topic_list),
+ );
+
+ // If store_reverse, then first obtain topics, then stickies, else the other way around...
+ // Funnily enough you typically save one query if going from the last page to the middle (store_reverse) because
+ // the number of stickies are not known
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['topic_status'] == ITEM_MOVED)
+ {
+ $shadow_topic_list[$row['topic_moved_id']] = $row['topic_id'];
+ }
+
+ $rowset[$row['topic_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+}
+
+// If we have some shadow topics, update the rowset to reflect their topic information
+if (sizeof($shadow_topic_list))
+{
+ $sql = 'SELECT *
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', array_keys($shadow_topic_list));
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $orig_topic_id = $shadow_topic_list[$row['topic_id']];
+
+ // If the shadow topic is already listed within the rowset (happens for active topics for example), then do not include it...
+ if (isset($rowset[$row['topic_id']]))
+ {
+ // We need to remove any trace regarding this topic. :)
+ unset($rowset[$orig_topic_id]);
+ unset($topic_list[array_search($orig_topic_id, $topic_list)]);
+ $topics_count--;
+
+ continue;
+ }
+
+ // Do not include those topics the user has no permission to access
+ if (!$auth->acl_get('f_read', $row['forum_id']))
+ {
+ // We need to remove any trace regarding this topic. :)
+ unset($rowset[$orig_topic_id]);
+ unset($topic_list[array_search($orig_topic_id, $topic_list)]);
+ $topics_count--;
+
+ continue;
+ }
+
+ // We want to retain some values
+ $row = array_merge($row, array(
+ 'topic_moved_id' => $rowset[$orig_topic_id]['topic_moved_id'],
+ 'topic_status' => $rowset[$orig_topic_id]['topic_status'],
+ 'topic_type' => $rowset[$orig_topic_id]['topic_type'],
+ ));
+
+ // Shadow topics are never reported
+ $row['topic_reported'] = 0;
+
+ $rowset[$orig_topic_id] = $row;
+ }
+ $db->sql_freeresult($result);
+}
+unset($shadow_topic_list);
+
+// Ok, adjust topics count for active topics list
+if ($s_display_active)
+{
+ $topics_count = 1;
+}
+
+$template->assign_vars(array(
+ 'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : '')), $topics_count, $config['topics_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start),
+ 'TOTAL_TOPICS' => ($s_display_active) ? false : (($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count)))
+);
+
+$topic_list = ($store_reverse) ? array_merge($announcement_list, array_reverse($topic_list)) : array_merge($announcement_list, $topic_list);
+$topic_tracking_info = $tracking_topics = array();
+
+// Okay, lets dump out the page ...
+if (sizeof($topic_list))
+{
+ $mark_forum_read = true;
+ $mark_time_forum = 0;
+
+ // Active topics?
+ if ($s_display_active && sizeof($active_forum_ary))
+ {
+ // Generate topic forum list...
+ $topic_forum_list = array();
+ foreach ($rowset as $t_id => $row)
+ {
+ $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread'] && $user->data['is_registered'] && isset($row['forum_mark_time'])) ? $row['forum_mark_time'] : 0;
+ $topic_forum_list[$row['forum_id']]['topics'][] = $t_id;
+ }
+
+ if ($config['load_db_lastread'] && $user->data['is_registered'])
+ {
+ foreach ($topic_forum_list as $f_id => $topic_row)
+ {
+ $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']), false);
+ }
+ }
+ else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ foreach ($topic_forum_list as $f_id => $topic_row)
+ {
+ $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics'], false);
+ }
+ }
+
+ unset($topic_forum_list);
+ }
+ else
+ {
+ if ($config['load_db_lastread'] && $user->data['is_registered'])
+ {
+ $topic_tracking_info = get_topic_tracking($forum_id, $topic_list, $rowset, array($forum_id => $forum_data['mark_time']), $global_announce_list);
+ $mark_time_forum = (!empty($forum_data['mark_time'])) ? $forum_data['mark_time'] : $user->data['user_lastmark'];
+ }
+ else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ $topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_list, $global_announce_list);
+
+ if (!$user->data['is_registered'])
+ {
+ $user->data['user_lastmark'] = (isset($tracking_topics['l'])) ? (int) (base_convert($tracking_topics['l'], 36, 10) + $config['board_startdate']) : 0;
+ }
+ $mark_time_forum = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate']) : $user->data['user_lastmark'];
+ }
+ }
+
+ $s_type_switch = 0;
+ foreach ($topic_list as $topic_id)
+ {
+ $row = &$rowset[$topic_id];
+
+ // This will allow the style designer to output a different header
+ // or even separate the list of announcements from sticky and normal topics
+ $s_type_switch_test = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0;
+
+ // Replies
+ $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
+
+ if ($row['topic_status'] == ITEM_MOVED)
+ {
+ $topic_id = $row['topic_moved_id'];
+ $unread_topic = false;
+ }
+ else
+ {
+ $unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
+ }
+
+ // Get folder img, topic status/type related information
+ $folder_img = $folder_alt = $topic_type = '';
+ topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type);
+
+ // Generate all the URIs ...
+ $view_topic_url_params = 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . '&amp;t=' . $topic_id;
+ $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);
+
+ $topic_unapproved = (!$row['topic_approved'] && $auth->acl_get('m_approve', (($row['forum_id']) ? $row['forum_id'] : $forum_id))) ? true : false;
+ $posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', (($row['forum_id']) ? $row['forum_id'] : $forum_id))) ? true : false;
+ $u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&amp;t=$topic_id", true, $user->session_id) : '';
+
+ // Send vars to template
+ $template->assign_block_vars('topicrow', array(
+ 'FORUM_ID' => $forum_id,
+ 'TOPIC_ID' => $topic_id,
+ 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
+ 'LAST_POST_SUBJECT' => censor_text($row['topic_last_post_subject']),
+ 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
+ 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
+ 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+
+ 'PAGINATION' => topic_generate_pagination($replies, $view_topic_url),
+ 'REPLIES' => $replies,
+ 'VIEWS' => $row['topic_views'],
+ 'TOPIC_TITLE' => censor_text($row['topic_title']),
+ 'TOPIC_TYPE' => $topic_type,
+
+ 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
+ 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
+ 'TOPIC_FOLDER_IMG_ALT' => $user->lang[$folder_alt],
+ 'TOPIC_FOLDER_IMG_WIDTH'=> $user->img($folder_img, '', false, '', 'width'),
+ 'TOPIC_FOLDER_IMG_HEIGHT' => $user->img($folder_img, '', false, '', 'height'),
+
+ 'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
+ 'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
+ 'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
+ 'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? $user->img('icon_topic_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '',
+
+ 'S_TOPIC_TYPE' => $row['topic_type'],
+ 'S_USER_POSTED' => (isset($row['topic_posted']) && $row['topic_posted']) ? true : false,
+ 'S_UNREAD_TOPIC' => $unread_topic,
+ 'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_get('m_report', $forum_id)) ? true : false,
+ 'S_TOPIC_UNAPPROVED' => $topic_unapproved,
+ 'S_POSTS_UNAPPROVED' => $posts_unapproved,
+ 'S_HAS_POLL' => ($row['poll_start']) ? true : false,
+ 'S_POST_ANNOUNCE' => ($row['topic_type'] == POST_ANNOUNCE) ? true : false,
+ 'S_POST_GLOBAL' => ($row['topic_type'] == POST_GLOBAL) ? true : false,
+ 'S_POST_STICKY' => ($row['topic_type'] == POST_STICKY) ? true : false,
+ 'S_TOPIC_LOCKED' => ($row['topic_status'] == ITEM_LOCKED) ? true : false,
+ 'S_TOPIC_MOVED' => ($row['topic_status'] == ITEM_MOVED) ? true : false,
+
+ 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&amp;view=unread') . '#unread',
+ 'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&amp;p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
+ 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'U_VIEW_TOPIC' => $view_topic_url,
+ 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=reports&amp;f=' . $forum_id . '&amp;t=' . $topic_id, true, $user->session_id),
+ 'U_MCP_QUEUE' => $u_mcp_queue,
+
+ 'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test)
+ );
+
+ $s_type_switch = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0;
+
+ if ($unread_topic)
+ {
+ $mark_forum_read = false;
+ }
+
+ unset($rowset[$topic_id]);
+ }
+}
+
+// This is rather a fudge but it's the best I can think of without requiring information
+// on all topics (as we do in 2.0.x). It looks for unread or new topics, if it doesn't find
+// any it updates the forum last read cookie. This requires that the user visit the forum
+// after reading a topic
+if ($forum_data['forum_type'] == FORUM_POST && sizeof($topic_list) && $mark_forum_read)
+{
+ update_forum_tracking_info($forum_id, $forum_data['forum_last_post_time'], false, $mark_time_forum);
+}
+
+page_footer();
+
+?> \ No newline at end of file
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php
new file mode 100644
index 0000000000..5eb2894441
--- /dev/null
+++ b/phpBB/viewonline.php
@@ -0,0 +1,445 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup('memberlist');
+
+// Get and set some variables
+$mode = request_var('mode', '');
+$session_id = request_var('s', '');
+$start = request_var('start', 0);
+$sort_key = request_var('sk', 'b');
+$sort_dir = request_var('sd', 'd');
+$show_guests= ($config['load_online_guests']) ? request_var('sg', 0) : 0;
+
+// Can this user view profiles/memberlist?
+if (!$auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
+{
+ if ($user->data['user_id'] != ANONYMOUS)
+ {
+ trigger_error('NO_VIEW_USERS');
+ }
+
+ login_box('', $user->lang['LOGIN_EXPLAIN_VIEWONLINE']);
+}
+
+$sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_JOINED'], 'c' => $user->lang['SORT_LOCATION']);
+$sort_key_sql = array('a' => 'u.username_clean', 'b' => 's.session_time', 'c' => 's.session_page');
+
+// Sorting and order
+if (!isset($sort_key_text[$sort_key]))
+{
+ $sort_key = 'b';
+}
+
+$order_by = $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
+
+// Whois requested
+if ($mode == 'whois' && $auth->acl_get('a_') && $session_id)
+{
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ $sql = 'SELECT u.user_id, u.username, u.user_type, s.session_ip
+ FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . " s
+ WHERE s.session_id = '" . $db->sql_escape($session_id) . "'
+ AND u.user_id = s.session_user_id";
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $template->assign_var('WHOIS', user_ipwhois($row['session_ip']));
+ }
+ $db->sql_freeresult($result);
+
+ // Output the page
+ page_header($user->lang['WHO_IS_ONLINE']);
+
+ $template->set_filenames(array(
+ 'body' => 'viewonline_whois.html')
+ );
+ make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
+
+ page_footer();
+}
+
+// Forum info
+$sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id
+ FROM ' . FORUMS_TABLE . '
+ ORDER BY left_id ASC';
+$result = $db->sql_query($sql, 600);
+
+$forum_data = array();
+while ($row = $db->sql_fetchrow($result))
+{
+ $forum_data[$row['forum_id']] = $row;
+}
+$db->sql_freeresult($result);
+
+$guest_counter = 0;
+
+// Get number of online guests (if we do not display them)
+if (!$show_guests)
+{
+ switch ($db->sql_layer)
+ {
+ case 'sqlite':
+ $sql = 'SELECT COUNT(session_ip) as num_guests
+ FROM (
+ SELECT DISTINCT session_ip
+ FROM ' . SESSIONS_TABLE . '
+ WHERE session_user_id = ' . ANONYMOUS . '
+ AND session_time >= ' . (time() - ($config['load_online_time'] * 60)) .
+ ')';
+ break;
+
+ default:
+ $sql = 'SELECT COUNT(DISTINCT session_ip) as num_guests
+ FROM ' . SESSIONS_TABLE . '
+ WHERE session_user_id = ' . ANONYMOUS . '
+ AND session_time >= ' . (time() - ($config['load_online_time'] * 60));
+ break;
+ }
+ $result = $db->sql_query($sql);
+ $guest_counter = (int) $db->sql_fetchfield('num_guests');
+ $db->sql_freeresult($result);
+}
+
+// Get user list
+$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_type, u.user_colour, s.session_id, s.session_time, s.session_page, s.session_ip, s.session_browser, s.session_viewonline, s.session_forum_id
+ FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . ' s
+ WHERE u.user_id = s.session_user_id
+ AND s.session_time >= ' . (time() - ($config['load_online_time'] * 60)) .
+ ((!$show_guests) ? ' AND s.session_user_id <> ' . ANONYMOUS : '') . '
+ ORDER BY ' . $order_by;
+$result = $db->sql_query($sql);
+
+$prev_id = $prev_ip = $user_list = array();
+$logged_visible_online = $logged_hidden_online = $counter = 0;
+
+while ($row = $db->sql_fetchrow($result))
+{
+ if ($row['user_id'] != ANONYMOUS && !isset($prev_id[$row['user_id']]))
+ {
+ $view_online = $s_user_hidden = false;
+ $user_colour = ($row['user_colour']) ? ' style="color:#' . $row['user_colour'] . '" class="username-coloured"' : '';
+
+ $username_full = ($row['user_type'] != USER_IGNORE) ? get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']) : '<span' . $user_colour . '>' . $row['username'] . '</span>';
+
+ if (!$row['session_viewonline'])
+ {
+ $view_online = ($auth->acl_get('u_viewonline')) ? true : false;
+ $logged_hidden_online++;
+
+ $username_full = '<em>' . $username_full . '</em>';
+ $s_user_hidden = true;
+ }
+ else
+ {
+ $view_online = true;
+ $logged_visible_online++;
+ }
+
+ $prev_id[$row['user_id']] = 1;
+
+ if ($view_online)
+ {
+ $counter++;
+ }
+
+ if (!$view_online || $counter > $start + $config['topics_per_page'] || $counter <= $start)
+ {
+ continue;
+ }
+ }
+ else if ($show_guests && $row['user_id'] == ANONYMOUS && !isset($prev_ip[$row['session_ip']]))
+ {
+ $prev_ip[$row['session_ip']] = 1;
+ $guest_counter++;
+ $counter++;
+
+ if ($counter > $start + $config['topics_per_page'] || $counter <= $start)
+ {
+ continue;
+ }
+
+ $s_user_hidden = false;
+ $username_full = get_username_string('full', $row['user_id'], $user->lang['GUEST']);
+ }
+ else
+ {
+ continue;
+ }
+
+ preg_match('#^([a-z0-9/_-]+)#i', $row['session_page'], $on_page);
+ if (!sizeof($on_page))
+ {
+ $on_page[1] = '';
+ }
+
+ switch ($on_page[1])
+ {
+ case 'index':
+ $location = $user->lang['INDEX'];
+ $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
+ break;
+
+ case 'adm/index':
+ $location = $user->lang['ACP'];
+ $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
+ break;
+
+ case 'posting':
+ case 'viewforum':
+ case 'viewtopic':
+ $forum_id = $row['session_forum_id'];
+
+ if ($forum_id && $auth->acl_get('f_list', $forum_id))
+ {
+ $location = '';
+ $location_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id);
+
+ if ($forum_data[$forum_id]['forum_type'] == FORUM_LINK)
+ {
+ $location = sprintf($user->lang['READING_LINK'], $forum_data[$forum_id]['forum_name']);
+ break;
+ }
+
+ switch ($on_page[1])
+ {
+ case 'posting':
+ preg_match('#mode=([a-z]+)#', $row['session_page'], $on_page);
+ $posting_mode = (!empty($on_page[1])) ? $on_page[1] : '';
+
+ switch ($posting_mode)
+ {
+ case 'reply':
+ case 'quote':
+ $location = sprintf($user->lang['REPLYING_MESSAGE'], $forum_data[$forum_id]['forum_name']);
+ break;
+
+ default:
+ $location = sprintf($user->lang['POSTING_MESSAGE'], $forum_data[$forum_id]['forum_name']);
+ break;
+ }
+ break;
+
+ case 'viewtopic':
+ $location = sprintf($user->lang['READING_TOPIC'], $forum_data[$forum_id]['forum_name']);
+ break;
+
+ case 'viewforum':
+ $location = sprintf($user->lang['READING_FORUM'], $forum_data[$forum_id]['forum_name']);
+ break;
+ }
+ }
+ else
+ {
+ $location = $user->lang['INDEX'];
+ $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
+ }
+ break;
+
+ case 'search':
+ $location = $user->lang['SEARCHING_FORUMS'];
+ $location_url = append_sid("{$phpbb_root_path}search.$phpEx");
+ break;
+
+ case 'faq':
+ $location = $user->lang['VIEWING_FAQ'];
+ $location_url = append_sid("{$phpbb_root_path}faq.$phpEx");
+ break;
+
+ case 'viewonline':
+ $location = $user->lang['VIEWING_ONLINE'];
+ $location_url = append_sid("{$phpbb_root_path}viewonline.$phpEx");
+ break;
+
+ case 'memberlist':
+ $location = (strpos($row['session_page'], 'mode=viewprofile') !== false) ? $user->lang['VIEWING_MEMBER_PROFILE'] : $user->lang['VIEWING_MEMBERS'];
+ $location_url = append_sid("{$phpbb_root_path}memberlist.$phpEx");
+ break;
+
+ case 'mcp':
+ $location = $user->lang['VIEWING_MCP'];
+ $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
+ break;
+
+ case 'ucp':
+ $location = $user->lang['VIEWING_UCP'];
+
+ // Grab some common modules
+ $url_params = array(
+ 'mode=register' => 'VIEWING_REGISTER',
+ 'i=pm&mode=compose' => 'POSTING_PRIVATE_MESSAGE',
+ 'i=pm&' => 'VIEWING_PRIVATE_MESSAGES',
+ 'i=profile&' => 'CHANGING_PROFILE',
+ 'i=prefs&' => 'CHANGING_PREFERENCES',
+ );
+
+ foreach ($url_params as $param => $lang)
+ {
+ if (strpos($row['session_page'], $param) !== false)
+ {
+ $location = $user->lang[$lang];
+ break;
+ }
+ }
+
+ $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
+ break;
+
+ case 'download/file':
+ $location = $user->lang['DOWNLOADING_FILE'];
+ $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
+ break;
+
+ case 'report':
+ $location = $user->lang['REPORTING_POST'];
+ $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
+ break;
+
+ default:
+ $location = $user->lang['INDEX'];
+ $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
+ break;
+ }
+
+ $template->assign_block_vars('user_row', array(
+ 'USERNAME' => $row['username'],
+ 'USERNAME_COLOUR' => $row['user_colour'],
+ 'USERNAME_FULL' => $username_full,
+ 'LASTUPDATE' => $user->format_date($row['session_time']),
+ 'FORUM_LOCATION' => $location,
+ 'USER_IP' => ($auth->acl_get('a_')) ? (($mode == 'lookup' && $session_id == $row['session_id']) ? gethostbyaddr($row['session_ip']) : $row['session_ip']) : '',
+ 'USER_BROWSER' => ($auth->acl_get('a_user')) ? $row['session_browser'] : '',
+
+ 'U_USER_PROFILE' => ($row['user_type'] != USER_IGNORE) ? get_username_string('profile', $row['user_id'], '') : '',
+ 'U_USER_IP' => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'mode=lookup' . (($mode != 'lookup' || $row['session_id'] != $session_id) ? '&amp;s=' . $row['session_id'] : '') . "&amp;sg=$show_guests&amp;start=$start&amp;sk=$sort_key&amp;sd=$sort_dir"),
+ 'U_WHOIS' => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'mode=whois&amp;s=' . $row['session_id']),
+ 'U_FORUM_LOCATION' => $location_url,
+
+ 'S_USER_HIDDEN' => $s_user_hidden,
+ 'S_GUEST' => ($row['user_id'] == ANONYMOUS) ? true : false,
+ 'S_USER_TYPE' => $row['user_type'],
+ ));
+}
+$db->sql_freeresult($result);
+unset($prev_id, $prev_ip);
+
+// Generate reg/hidden/guest online text
+$vars_online = array(
+ 'REG' => array('logged_visible_online', 'l_r_user_s'),
+ 'HIDDEN'=> array('logged_hidden_online', 'l_h_user_s'),
+ 'GUEST' => array('guest_counter', 'l_g_user_s')
+);
+
+foreach ($vars_online as $l_prefix => $var_ary)
+{
+ switch ($$var_ary[0])
+ {
+ case 0:
+ $$var_ary[1] = $user->lang[$l_prefix . '_USERS_ZERO_ONLINE'];
+ break;
+
+ case 1:
+ $$var_ary[1] = $user->lang[$l_prefix . '_USER_ONLINE'];
+ break;
+
+ default:
+ $$var_ary[1] = $user->lang[$l_prefix . '_USERS_ONLINE'];
+ break;
+ }
+}
+unset($vars_online);
+
+$pagination = generate_pagination(append_sid("{$phpbb_root_path}viewonline.$phpEx", "sg=$show_guests&amp;sk=$sort_key&amp;sd=$sort_dir"), $counter, $config['topics_per_page'], $start);
+
+// Grab group details for legend display
+if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
+{
+ $sql = 'SELECT group_id, group_name, group_colour, group_type
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_legend = 1
+ ORDER BY group_name ASC';
+}
+else
+{
+ $sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
+ FROM ' . GROUPS_TABLE . ' g
+ LEFT JOIN ' . USER_GROUP_TABLE . ' ug
+ ON (
+ g.group_id = ug.group_id
+ AND ug.user_id = ' . $user->data['user_id'] . '
+ AND ug.user_pending = 0
+ )
+ WHERE g.group_legend = 1
+ AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
+ ORDER BY g.group_name ASC';
+}
+$result = $db->sql_query($sql);
+
+$legend = '';
+while ($row = $db->sql_fetchrow($result))
+{
+ if ($row['group_name'] == 'BOTS')
+ {
+ $legend .= (($legend != '') ? ', ' : '') . '<span style="color:#' . $row['group_colour'] . '">' . $user->lang['G_BOTS'] . '</span>';
+ }
+ else
+ {
+ $legend .= (($legend != '') ? ', ' : '') . '<a style="color:#' . $row['group_colour'] . '" href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
+ }
+}
+$db->sql_freeresult($result);
+
+// Refreshing the page every 60 seconds...
+meta_refresh(60, append_sid("{$phpbb_root_path}viewonline.$phpEx", "sg=$show_guests&amp;sk=$sort_key&amp;sd=$sort_dir&amp;start=$start"));
+
+// Send data to template
+$template->assign_vars(array(
+ 'TOTAL_REGISTERED_USERS_ONLINE' => sprintf($l_r_user_s, $logged_visible_online) . sprintf($l_h_user_s, $logged_hidden_online),
+ 'TOTAL_GUEST_USERS_ONLINE' => sprintf($l_g_user_s, $guest_counter),
+ 'LEGEND' => $legend,
+ 'PAGINATION' => $pagination,
+ 'PAGE_NUMBER' => on_page($counter, $config['topics_per_page'], $start),
+
+ 'U_SORT_USERNAME' => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'sk=a&amp;sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a') . '&amp;sg=' . ((int) $show_guests)),
+ 'U_SORT_UPDATED' => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'sk=b&amp;sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a') . '&amp;sg=' . ((int) $show_guests)),
+ 'U_SORT_LOCATION' => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'sk=c&amp;sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a') . '&amp;sg=' . ((int) $show_guests)),
+
+ 'U_SWITCH_GUEST_DISPLAY' => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'sg=' . ((int) !$show_guests)),
+ 'L_SWITCH_GUEST_DISPLAY' => ($show_guests) ? $user->lang['HIDE_GUESTS'] : $user->lang['DISPLAY_GUESTS'],
+ 'S_SWITCH_GUEST_DISPLAY' => ($config['load_online_guests']) ? true : false)
+);
+
+// We do not need to load the who is online box here. ;)
+$config['load_online'] = false;
+
+// Output the page
+page_header($user->lang['WHO_IS_ONLINE']);
+
+$template->set_filenames(array(
+ 'body' => 'viewonline_body.html')
+);
+make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
+
+page_footer();
+
+?> \ No newline at end of file
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
new file mode 100644
index 0000000000..7fb954017d
--- /dev/null
+++ b/phpBB/viewtopic.php
@@ -0,0 +1,1739 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+
+// Initial var setup
+$forum_id = request_var('f', 0);
+$topic_id = request_var('t', 0);
+$post_id = request_var('p', 0);
+$voted_id = request_var('vote_id', array('' => 0));
+
+$voted_id = (sizeof($voted_id) > 1) ? array_unique($voted_id) : $voted_id;
+
+
+$start = request_var('start', 0);
+$view = request_var('view', '');
+
+$default_sort_days = (!empty($user->data['user_post_show_days'])) ? $user->data['user_post_show_days'] : 0;
+$default_sort_key = (!empty($user->data['user_post_sortby_type'])) ? $user->data['user_post_sortby_type'] : 't';
+$default_sort_dir = (!empty($user->data['user_post_sortby_dir'])) ? $user->data['user_post_sortby_dir'] : 'a';
+
+$sort_days = request_var('st', $default_sort_days);
+$sort_key = request_var('sk', $default_sort_key);
+$sort_dir = request_var('sd', $default_sort_dir);
+
+$update = request_var('update', false);
+
+$s_can_vote = false;
+/**
+* @todo normalize?
+*/
+$hilit_words = request_var('hilit', '', true);
+
+// Do we have a topic or post id?
+if (!$topic_id && !$post_id)
+{
+ trigger_error('NO_TOPIC');
+}
+
+// Find topic id if user requested a newer or older topic
+if ($view && !$post_id)
+{
+ if (!$forum_id)
+ {
+ $sql = 'SELECT forum_id
+ FROM ' . TOPICS_TABLE . "
+ WHERE topic_id = $topic_id";
+ $result = $db->sql_query($sql);
+ $forum_id = (int) $db->sql_fetchfield('forum_id');
+ $db->sql_freeresult($result);
+
+ if (!$forum_id)
+ {
+ trigger_error('NO_TOPIC');
+ }
+ }
+
+ if ($view == 'unread')
+ {
+ // Get topic tracking info
+ $topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_id);
+
+ $topic_last_read = (isset($topic_tracking_info[$topic_id])) ? $topic_tracking_info[$topic_id] : 0;
+
+ $sql = 'SELECT post_id, topic_id, forum_id
+ FROM ' . POSTS_TABLE . "
+ WHERE topic_id = $topic_id
+ " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND post_approved = 1') . "
+ AND post_time > $topic_last_read
+ AND forum_id = $forum_id
+ ORDER BY post_time ASC";
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ $sql = 'SELECT topic_last_post_id as post_id, topic_id, forum_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_id = ' . $topic_id;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+
+ if (!$row)
+ {
+ // Setup user environment so we can process lang string
+ $user->setup('viewtopic');
+
+ trigger_error('NO_TOPIC');
+ }
+
+ $post_id = $row['post_id'];
+ $topic_id = $row['topic_id'];
+ }
+ else if ($view == 'next' || $view == 'previous')
+ {
+ $sql_condition = ($view == 'next') ? '>' : '<';
+ $sql_ordering = ($view == 'next') ? 'ASC' : 'DESC';
+
+ $sql = 'SELECT forum_id, topic_last_post_time
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_id = ' . $topic_id;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ $user->setup('viewtopic');
+ // OK, the topic doesn't exist. This error message is not helpful, but technically correct.
+ trigger_error(($view == 'next') ? 'NO_NEWER_TOPICS' : 'NO_OLDER_TOPICS');
+ }
+ else
+ {
+ $sql = 'SELECT topic_id, forum_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE forum_id = ' . $row['forum_id'] . "
+ AND topic_moved_id = 0
+ AND topic_last_post_time $sql_condition {$row['topic_last_post_time']}
+ " . (($auth->acl_get('m_approve', $row['forum_id'])) ? '' : 'AND topic_approved = 1') . "
+ ORDER BY topic_last_post_time $sql_ordering";
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ $user->setup('viewtopic');
+ trigger_error(($view == 'next') ? 'NO_NEWER_TOPICS' : 'NO_OLDER_TOPICS');
+ }
+ else
+ {
+ $topic_id = $row['topic_id'];
+
+ // Check for global announcement correctness?
+ if (!$row['forum_id'] && !$forum_id)
+ {
+ trigger_error('NO_TOPIC');
+ }
+ else if ($row['forum_id'])
+ {
+ $forum_id = $row['forum_id'];
+ }
+ }
+ }
+ }
+
+ // Check for global announcement correctness?
+ if ((!isset($row) || !$row['forum_id']) && !$forum_id)
+ {
+ trigger_error('NO_TOPIC');
+ }
+ else if (isset($row) && $row['forum_id'])
+ {
+ $forum_id = $row['forum_id'];
+ }
+}
+
+// This rather complex gaggle of code handles querying for topics but
+// also allows for direct linking to a post (and the calculation of which
+// page the post is on and the correct display of viewtopic)
+$sql_array = array(
+ 'SELECT' => 't.*, f.*',
+
+ 'FROM' => array(FORUMS_TABLE => 'f'),
+);
+
+// The FROM-Order is quite important here, else t.* columns can not be correctly bound.
+if ($post_id)
+{
+ $sql_array['SELECT'] .= ', p.post_approved';
+ $sql_array['FROM'][POSTS_TABLE] = 'p';
+}
+
+// Topics table need to be the last in the chain
+$sql_array['FROM'][TOPICS_TABLE] = 't';
+
+if ($user->data['is_registered'])
+{
+ $sql_array['SELECT'] .= ', tw.notify_status';
+ $sql_array['LEFT_JOIN'] = array();
+
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(TOPICS_WATCH_TABLE => 'tw'),
+ 'ON' => 'tw.user_id = ' . $user->data['user_id'] . ' AND t.topic_id = tw.topic_id'
+ );
+
+ if ($config['allow_bookmarks'])
+ {
+ $sql_array['SELECT'] .= ', bm.topic_id as bookmarked';
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(BOOKMARKS_TABLE => 'bm'),
+ 'ON' => 'bm.user_id = ' . $user->data['user_id'] . ' AND t.topic_id = bm.topic_id'
+ );
+ }
+
+ if ($config['load_db_lastread'])
+ {
+ $sql_array['SELECT'] .= ', tt.mark_time, ft.mark_time as forum_mark_time';
+
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(TOPICS_TRACK_TABLE => 'tt'),
+ 'ON' => 'tt.user_id = ' . $user->data['user_id'] . ' AND t.topic_id = tt.topic_id'
+ );
+
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
+ 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND t.forum_id = ft.forum_id'
+ );
+ }
+}
+
+if (!$post_id)
+{
+ $sql_array['WHERE'] = "t.topic_id = $topic_id";
+}
+else
+{
+ $sql_array['WHERE'] = "p.post_id = $post_id AND t.topic_id = p.topic_id";
+}
+
+$sql_array['WHERE'] .= ' AND (f.forum_id = t.forum_id';
+
+if (!$forum_id)
+{
+ // If it is a global announcement make sure to set the forum id to a postable forum
+ $sql_array['WHERE'] .= ' OR (t.topic_type = ' . POST_GLOBAL . '
+ AND f.forum_type = ' . FORUM_POST . ')';
+}
+else
+{
+ $sql_array['WHERE'] .= ' OR (t.topic_type = ' . POST_GLOBAL . "
+ AND f.forum_id = $forum_id)";
+}
+
+$sql_array['WHERE'] .= ')';
+
+// Join to forum table on topic forum_id unless topic forum_id is zero
+// whereupon we join on the forum_id passed as a parameter ... this
+// is done so navigation, forum name, etc. remain consistent with where
+// user clicked to view a global topic
+$sql = $db->sql_build_query('SELECT', $sql_array);
+$result = $db->sql_query($sql);
+$topic_data = $db->sql_fetchrow($result);
+$db->sql_freeresult($result);
+
+// link to unapproved post or incorrect link
+if (!$topic_data)
+{
+ // If post_id was submitted, we try at least to display the topic as a last resort...
+ if ($post_id && $topic_id)
+ {
+ redirect(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id" . (($forum_id) ? "&amp;f=$forum_id" : '')));
+ }
+
+ trigger_error('NO_TOPIC');
+}
+
+$forum_id = (int) $topic_data['forum_id'];
+// This is for determining where we are (page)
+if ($post_id)
+{
+ // are we where we are supposed to be?
+ if (!$topic_data['post_approved'] && !$auth->acl_get('m_approve', $topic_data['forum_id']))
+ {
+ // If post_id was submitted, we try at least to display the topic as a last resort...
+ if ($topic_id)
+ {
+ redirect(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id" . (($forum_id) ? "&amp;f=$forum_id" : '')));
+ }
+
+ trigger_error('NO_TOPIC');
+ }
+ if ($post_id == $topic_data['topic_first_post_id'] || $post_id == $topic_data['topic_last_post_id'])
+ {
+ $check_sort = ($post_id == $topic_data['topic_first_post_id']) ? 'd' : 'a';
+
+ if ($sort_dir == $check_sort)
+ {
+ $topic_data['prev_posts'] = ($auth->acl_get('m_approve', $forum_id)) ? $topic_data['topic_replies_real'] : $topic_data['topic_replies'];
+ }
+ else
+ {
+ $topic_data['prev_posts'] = 0;
+ }
+ }
+ else
+ {
+ $sql = 'SELECT COUNT(p1.post_id) AS prev_posts
+ FROM ' . POSTS_TABLE . ' p1, ' . POSTS_TABLE . " p2
+ WHERE p1.topic_id = {$topic_data['topic_id']}
+ AND p2.post_id = {$post_id}
+ " . ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND p1.post_approved = 1' : '') . '
+ AND ' . (($sort_dir == 'd') ? 'p1.post_time >= p2.post_time' : 'p1.post_time <= p2.post_time');
+
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $topic_data['prev_posts'] = $row['prev_posts'] - 1;
+ }
+}
+
+$topic_id = (int) $topic_data['topic_id'];
+//
+$topic_replies = ($auth->acl_get('m_approve', $forum_id)) ? $topic_data['topic_replies_real'] : $topic_data['topic_replies'];
+
+// Check sticky/announcement time limit
+if (($topic_data['topic_type'] == POST_STICKY || $topic_data['topic_type'] == POST_ANNOUNCE) && $topic_data['topic_time_limit'] && ($topic_data['topic_time'] + $topic_data['topic_time_limit']) < time())
+{
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_type = ' . POST_NORMAL . ', topic_time_limit = 0
+ WHERE topic_id = ' . $topic_id;
+ $db->sql_query($sql);
+
+ $topic_data['topic_type'] = POST_NORMAL;
+ $topic_data['topic_time_limit'] = 0;
+}
+
+// Setup look and feel
+$user->setup('viewtopic', $topic_data['forum_style']);
+
+if (!$topic_data['topic_approved'] && !$auth->acl_get('m_approve', $forum_id))
+{
+ trigger_error('NO_TOPIC');
+}
+
+// Start auth check
+if (!$auth->acl_get('f_read', $forum_id))
+{
+ if ($user->data['user_id'] != ANONYMOUS)
+ {
+ trigger_error('SORRY_AUTH_READ');
+ }
+
+ login_box('', $user->lang['LOGIN_VIEWFORUM']);
+}
+
+// Forum is passworded ... check whether access has been granted to this
+// user this session, if not show login box
+if ($topic_data['forum_password'])
+{
+ login_forum_box($topic_data);
+}
+
+// Redirect to login or to the correct post upon emailed notification links
+if (isset($_GET['e']))
+{
+ $jump_to = request_var('e', 0);
+
+ $redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id");
+
+ if ($user->data['user_id'] == ANONYMOUS)
+ {
+ login_box($redirect_url . "&amp;p=$post_id&amp;e=$jump_to", $user->lang['LOGIN_NOTIFY_TOPIC']);
+ }
+
+ if ($jump_to > 0)
+ {
+ // We direct the already logged in user to the correct post...
+ redirect($redirect_url . ((!$post_id) ? "&amp;p=$jump_to" : "&amp;p=$post_id") . "#p$jump_to");
+ }
+}
+
+// What is start equal to?
+if ($post_id)
+{
+ $start = floor(($topic_data['prev_posts']) / $config['posts_per_page']) * $config['posts_per_page'];
+}
+
+// Get topic tracking info
+if (!isset($topic_tracking_info))
+{
+ $topic_tracking_info = array();
+
+ // Get topic tracking info
+ if ($config['load_db_lastread'] && $user->data['is_registered'])
+ {
+ $tmp_topic_data = array($topic_id => $topic_data);
+ $topic_tracking_info = get_topic_tracking($forum_id, $topic_id, $tmp_topic_data, array($forum_id => $topic_data['forum_mark_time']));
+ unset($tmp_topic_data);
+ }
+ else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ $topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_id);
+ }
+}
+
+// Post ordering options
+$limit_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+
+$sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']);
+$sort_by_sql = array('a' => array('u.username_clean', 'p.post_id'), 't' => 'p.post_time', 's' => array('p.post_subject', 'p.post_id'));
+$join_user_sql = array('a' => true, 't' => false, 's' => false);
+
+$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
+
+gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param, $default_sort_days, $default_sort_key, $default_sort_dir);
+
+// Obtain correct post count and ordering SQL if user has
+// requested anything different
+if ($sort_days)
+{
+ $min_post_time = time() - ($sort_days * 86400);
+
+ $sql = 'SELECT COUNT(post_id) AS num_posts
+ FROM ' . POSTS_TABLE . "
+ WHERE topic_id = $topic_id
+ AND post_time >= $min_post_time
+ " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND post_approved = 1');
+ $result = $db->sql_query($sql);
+ $total_posts = (int) $db->sql_fetchfield('num_posts');
+ $db->sql_freeresult($result);
+
+ $limit_posts_time = "AND p.post_time >= $min_post_time ";
+
+ if (isset($_POST['sort']))
+ {
+ $start = 0;
+ }
+}
+else
+{
+ $total_posts = $topic_replies + 1;
+ $limit_posts_time = '';
+}
+
+// Was a highlight request part of the URI?
+$highlight_match = $highlight = '';
+if ($hilit_words)
+{
+ foreach (explode(' ', trim($hilit_words)) as $word)
+ {
+ if (trim($word))
+ {
+ $word = str_replace('\*', '\w+?', preg_quote($word, '#'));
+ $word = preg_replace('#(^|\s)\\\\w\*\?(\s|$)#', '$1\w+?$2', $word);
+ $highlight_match .= (($highlight_match != '') ? '|' : '') . $word;
+ }
+ }
+
+ $highlight = urlencode($hilit_words);
+}
+
+// Make sure $start is set to the last page if it exceeds the amount
+if ($start < 0 || $start >= $total_posts)
+{
+ $start = ($start < 0) ? 0 : floor(($total_posts - 1) / $config['posts_per_page']) * $config['posts_per_page'];
+}
+
+// General Viewtopic URL for return links
+$viewtopic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;start=$start" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : '') . (($highlight_match) ? "&amp;hilit=$highlight" : ''));
+
+// Are we watching this topic?
+$s_watching_topic = array(
+ 'link' => '',
+ 'title' => '',
+ 'is_watching' => false,
+);
+
+if (($config['email_enable'] || $config['jab_enable']) && $config['allow_topic_notify'] && $user->data['is_registered'])
+{
+ watch_topic_forum('topic', $s_watching_topic, $user->data['user_id'], $forum_id, $topic_id, $topic_data['notify_status'], $start);
+
+ // Reset forum notification if forum notify is set
+ if ($config['allow_forum_notify'] && $auth->acl_get('f_subscribe', $forum_id))
+ {
+ $s_watching_forum = $s_watching_topic;
+ watch_topic_forum('forum', $s_watching_forum, $user->data['user_id'], $forum_id, 0);
+ }
+}
+
+// Bookmarks
+if ($config['allow_bookmarks'] && $user->data['is_registered'] && request_var('bookmark', 0))
+{
+ if (check_link_hash(request_var('hash', ''), "topic_$topic_id"))
+ {
+ if (!$topic_data['bookmarked'])
+ {
+ $sql = 'INSERT INTO ' . BOOKMARKS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'user_id' => $user->data['user_id'],
+ 'topic_id' => $topic_id,
+ ));
+ $db->sql_query($sql);
+ }
+ else
+ {
+ $sql = 'DELETE FROM ' . BOOKMARKS_TABLE . "
+ WHERE user_id = {$user->data['user_id']}
+ AND topic_id = $topic_id";
+ $db->sql_query($sql);
+ }
+ $message = (($topic_data['bookmarked']) ? $user->lang['BOOKMARK_REMOVED'] : $user->lang['BOOKMARK_ADDED']) . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $viewtopic_url . '">', '</a>');
+ }
+ else
+ {
+ $message = $user->lang['BOOKMARK_ERR'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $viewtopic_url . '">', '</a>');
+ }
+ meta_refresh(3, $viewtopic_url);
+
+ trigger_error($message);
+}
+
+// Grab ranks
+$ranks = $cache->obtain_ranks();
+
+// Grab icons
+$icons = $cache->obtain_icons();
+
+// Grab extensions
+$extensions = array();
+if ($topic_data['topic_attachment'])
+{
+ $extensions = $cache->obtain_attach_extensions($forum_id);
+}
+
+// Forum rules listing
+$s_forum_rules = '';
+gen_forum_auth_level('topic', $forum_id, $topic_data['forum_status']);
+
+// Quick mod tools
+$allow_change_type = ($auth->acl_get('m_', $forum_id) || ($user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'])) ? true : false;
+
+$topic_mod = '';
+$topic_mod .= ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'] && $topic_data['topic_status'] == ITEM_UNLOCKED)) ? (($topic_data['topic_status'] == ITEM_UNLOCKED) ? '<option value="lock">' . $user->lang['LOCK_TOPIC'] . '</option>' : '<option value="unlock">' . $user->lang['UNLOCK_TOPIC'] . '</option>') : '';
+$topic_mod .= ($auth->acl_get('m_delete', $forum_id)) ? '<option value="delete_topic">' . $user->lang['DELETE_TOPIC'] . '</option>' : '';
+$topic_mod .= ($auth->acl_get('m_move', $forum_id) && $topic_data['topic_status'] != ITEM_MOVED) ? '<option value="move">' . $user->lang['MOVE_TOPIC'] . '</option>' : '';
+$topic_mod .= ($auth->acl_get('m_split', $forum_id)) ? '<option value="split">' . $user->lang['SPLIT_TOPIC'] . '</option>' : '';
+$topic_mod .= ($auth->acl_get('m_merge', $forum_id)) ? '<option value="merge">' . $user->lang['MERGE_POSTS'] . '</option>' : '';
+$topic_mod .= ($auth->acl_get('m_merge', $forum_id)) ? '<option value="merge_topic">' . $user->lang['MERGE_TOPIC'] . '</option>' : '';
+$topic_mod .= ($auth->acl_get('m_move', $forum_id)) ? '<option value="fork">' . $user->lang['FORK_TOPIC'] . '</option>' : '';
+$topic_mod .= ($allow_change_type && $auth->acl_gets('f_sticky', 'f_announce', $forum_id) && $topic_data['topic_type'] != POST_NORMAL) ? '<option value="make_normal">' . $user->lang['MAKE_NORMAL'] . '</option>' : '';
+$topic_mod .= ($allow_change_type && $auth->acl_get('f_sticky', $forum_id) && $topic_data['topic_type'] != POST_STICKY) ? '<option value="make_sticky">' . $user->lang['MAKE_STICKY'] . '</option>' : '';
+$topic_mod .= ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_ANNOUNCE) ? '<option value="make_announce">' . $user->lang['MAKE_ANNOUNCE'] . '</option>' : '';
+$topic_mod .= ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_GLOBAL) ? '<option value="make_global">' . $user->lang['MAKE_GLOBAL'] . '</option>' : '';
+$topic_mod .= ($auth->acl_get('m_', $forum_id)) ? '<option value="topic_logs">' . $user->lang['VIEW_TOPIC_LOGS'] . '</option>' : '';
+
+// If we've got a hightlight set pass it on to pagination.
+$pagination = generate_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : '') . (($highlight_match) ? "&amp;hilit=$highlight" : '')), $total_posts, $config['posts_per_page'], $start);
+
+// Navigation links
+generate_forum_nav($topic_data);
+
+// Forum Rules
+generate_forum_rules($topic_data);
+
+// Moderators
+$forum_moderators = array();
+if ($config['load_moderators'])
+{
+ get_moderators($forum_moderators, $forum_id);
+}
+
+// This is only used for print view so ...
+$server_path = (!$view) ? $phpbb_root_path : generate_board_url() . '/';
+
+// Replace naughty words in title
+$topic_data['topic_title'] = censor_text($topic_data['topic_title']);
+
+// Send vars to template
+$template->assign_vars(array(
+ 'FORUM_ID' => $forum_id,
+ 'FORUM_NAME' => $topic_data['forum_name'],
+ 'FORUM_DESC' => generate_text_for_display($topic_data['forum_desc'], $topic_data['forum_desc_uid'], $topic_data['forum_desc_bitfield'], $topic_data['forum_desc_options']),
+ 'TOPIC_ID' => $topic_id,
+ 'TOPIC_TITLE' => $topic_data['topic_title'],
+ 'TOPIC_POSTER' => $topic_data['topic_poster'],
+
+ 'TOPIC_AUTHOR_FULL' => get_username_string('full', $topic_data['topic_poster'], $topic_data['topic_first_poster_name'], $topic_data['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $topic_data['topic_poster'], $topic_data['topic_first_poster_name'], $topic_data['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR' => get_username_string('username', $topic_data['topic_poster'], $topic_data['topic_first_poster_name'], $topic_data['topic_first_poster_colour']),
+
+ 'PAGINATION' => $pagination,
+ 'PAGE_NUMBER' => on_page($total_posts, $config['posts_per_page'], $start),
+ 'TOTAL_POSTS' => ($total_posts == 1) ? $user->lang['VIEW_TOPIC_POST'] : sprintf($user->lang['VIEW_TOPIC_POSTS'], $total_posts),
+ 'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&amp;mode=topic_view&amp;f=$forum_id&amp;t=$topic_id&amp;start=$start" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : ''), true, $user->session_id) : '',
+ 'MODERATORS' => (isset($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id])) ? implode(', ', $forum_moderators[$forum_id]) : '',
+
+ 'POST_IMG' => ($topic_data['forum_status'] == ITEM_LOCKED) ? $user->img('button_topic_locked', 'FORUM_LOCKED') : $user->img('button_topic_new', 'POST_NEW_TOPIC'),
+ 'QUOTE_IMG' => $user->img('icon_post_quote', 'REPLY_WITH_QUOTE'),
+ 'REPLY_IMG' => ($topic_data['forum_status'] == ITEM_LOCKED || $topic_data['topic_status'] == ITEM_LOCKED) ? $user->img('button_topic_locked', 'TOPIC_LOCKED') : $user->img('button_topic_reply', 'REPLY_TO_TOPIC'),
+ 'EDIT_IMG' => $user->img('icon_post_edit', 'EDIT_POST'),
+ 'DELETE_IMG' => $user->img('icon_post_delete', 'DELETE_POST'),
+ 'INFO_IMG' => $user->img('icon_post_info', 'VIEW_INFO'),
+ 'PROFILE_IMG' => $user->img('icon_user_profile', 'READ_PROFILE'),
+ 'SEARCH_IMG' => $user->img('icon_user_search', 'SEARCH_USER_POSTS'),
+ 'PM_IMG' => $user->img('icon_contact_pm', 'SEND_PRIVATE_MESSAGE'),
+ 'EMAIL_IMG' => $user->img('icon_contact_email', 'SEND_EMAIL'),
+ 'WWW_IMG' => $user->img('icon_contact_www', 'VISIT_WEBSITE'),
+ 'ICQ_IMG' => $user->img('icon_contact_icq', 'ICQ'),
+ 'AIM_IMG' => $user->img('icon_contact_aim', 'AIM'),
+ 'MSN_IMG' => $user->img('icon_contact_msnm', 'MSNM'),
+ 'YIM_IMG' => $user->img('icon_contact_yahoo', 'YIM'),
+ 'JABBER_IMG' => $user->img('icon_contact_jabber', 'JABBER') ,
+ 'REPORT_IMG' => $user->img('icon_post_report', 'REPORT_POST'),
+ 'REPORTED_IMG' => $user->img('icon_topic_reported', 'POST_REPORTED'),
+ 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'POST_UNAPPROVED'),
+ 'WARN_IMG' => $user->img('icon_user_warn', 'WARN_USER'),
+
+ 'S_IS_LOCKED' => ($topic_data['topic_status'] == ITEM_UNLOCKED && $topic_data['forum_status'] == ITEM_UNLOCKED) ? false : true,
+ 'S_SELECT_SORT_DIR' => $s_sort_dir,
+ 'S_SELECT_SORT_KEY' => $s_sort_key,
+ 'S_SELECT_SORT_DAYS' => $s_limit_days,
+ 'S_SINGLE_MODERATOR' => (!empty($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id]) > 1) ? false : true,
+ 'S_TOPIC_ACTION' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;start=$start"),
+ 'S_TOPIC_MOD' => ($topic_mod != '') ? '<select name="action" id="quick-mod-select">' . $topic_mod . '</select>' : '',
+ 'S_MOD_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;start=$start&amp;quickmod=1&amp;redirect=" . urlencode(str_replace('&amp;', '&', $viewtopic_url)), true, $user->session_id),
+
+ 'S_VIEWTOPIC' => true,
+ 'S_DISPLAY_SEARCHBOX' => ($auth->acl_get('u_search') && $auth->acl_get('f_search', $forum_id) && $config['load_search']) ? true : false,
+ 'S_SEARCHBOX_ACTION' => append_sid("{$phpbb_root_path}search.$phpEx", 't=' . $topic_id),
+
+ 'S_DISPLAY_POST_INFO' => ($topic_data['forum_type'] == FORUM_POST && ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS)) ? true : false,
+ 'S_DISPLAY_REPLY_INFO' => ($topic_data['forum_type'] == FORUM_POST && ($auth->acl_get('f_reply', $forum_id) || $user->data['user_id'] == ANONYMOUS)) ? true : false,
+ 'S_ENABLE_FEEDS_TOPIC' => ($config['feed_topic'] && !phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $topic_data['forum_options'])) ? true : false,
+
+ 'U_TOPIC' => "{$server_path}viewtopic.$phpEx?f=$forum_id&amp;t=$topic_id",
+ 'U_FORUM' => $server_path,
+ 'U_VIEW_TOPIC' => $viewtopic_url,
+ 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
+ 'U_VIEW_OLDER_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=previous"),
+ 'U_VIEW_NEWER_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=next"),
+ 'U_PRINT_TOPIC' => ($auth->acl_get('f_print', $forum_id)) ? $viewtopic_url . '&amp;view=print' : '',
+ 'U_EMAIL_TOPIC' => ($auth->acl_get('f_email', $forum_id) && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=email&amp;t=$topic_id") : '',
+
+ 'U_WATCH_TOPIC' => $s_watching_topic['link'],
+ 'L_WATCH_TOPIC' => $s_watching_topic['title'],
+ 'S_WATCHING_TOPIC' => $s_watching_topic['is_watching'],
+
+ 'U_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks']) ? $viewtopic_url . '&amp;bookmark=1&amp;hash=' . generate_link_hash("topic_$topic_id") : '',
+ 'L_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks'] && $topic_data['bookmarked']) ? $user->lang['BOOKMARK_TOPIC_REMOVE'] : $user->lang['BOOKMARK_TOPIC'],
+
+ 'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=post&amp;f=$forum_id") : '',
+ 'U_POST_REPLY_TOPIC' => ($auth->acl_get('f_reply', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=reply&amp;f=$forum_id&amp;t=$topic_id") : '',
+ 'U_BUMP_TOPIC' => (bump_topic_allowed($forum_id, $topic_data['topic_bumped'], $topic_data['topic_last_post_time'], $topic_data['topic_poster'], $topic_data['topic_last_poster_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=bump&amp;f=$forum_id&amp;t=$topic_id&amp;hash=" . generate_link_hash("topic_$topic_id")) : '')
+);
+
+// Does this topic contain a poll?
+if (!empty($topic_data['poll_start']))
+{
+ $sql = 'SELECT o.*, p.bbcode_bitfield, p.bbcode_uid
+ FROM ' . POLL_OPTIONS_TABLE . ' o, ' . POSTS_TABLE . " p
+ WHERE o.topic_id = $topic_id
+ AND p.post_id = {$topic_data['topic_first_post_id']}
+ AND p.topic_id = o.topic_id
+ ORDER BY o.poll_option_id";
+ $result = $db->sql_query($sql);
+
+ $poll_info = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $poll_info[] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ $cur_voted_id = array();
+ if ($user->data['is_registered'])
+ {
+ $sql = 'SELECT poll_option_id
+ FROM ' . POLL_VOTES_TABLE . '
+ WHERE topic_id = ' . $topic_id . '
+ AND vote_user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $cur_voted_id[] = $row['poll_option_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ // Cookie based guest tracking ... I don't like this but hum ho
+ // it's oft requested. This relies on "nice" users who don't feel
+ // the need to delete cookies to mess with results.
+ if (isset($_COOKIE[$config['cookie_name'] . '_poll_' . $topic_id]))
+ {
+ $cur_voted_id = explode(',', $_COOKIE[$config['cookie_name'] . '_poll_' . $topic_id]);
+ $cur_voted_id = array_map('intval', $cur_voted_id);
+ }
+ }
+
+ // Can not vote at all if no vote permission
+ $s_can_vote = ($auth->acl_get('f_vote', $forum_id) &&
+ (($topic_data['poll_length'] != 0 && $topic_data['poll_start'] + $topic_data['poll_length'] > time()) || $topic_data['poll_length'] == 0) &&
+ $topic_data['topic_status'] != ITEM_LOCKED &&
+ $topic_data['forum_status'] != ITEM_LOCKED &&
+ (!sizeof($cur_voted_id) ||
+ ($auth->acl_get('f_votechg', $forum_id) && $topic_data['poll_vote_change']))) ? true : false;
+ $s_display_results = (!$s_can_vote || ($s_can_vote && sizeof($cur_voted_id)) || $view == 'viewpoll') ? true : false;
+
+ if ($update && $s_can_vote)
+ {
+
+ if (!sizeof($voted_id) || sizeof($voted_id) > $topic_data['poll_max_options'] || in_array(VOTE_CONVERTED, $cur_voted_id) || !check_form_key('posting'))
+ {
+ $redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;start=$start");
+
+ meta_refresh(5, $redirect_url);
+ if (!sizeof($voted_id))
+ {
+ $message = 'NO_VOTE_OPTION';
+ }
+ else if (sizeof($voted_id) > $topic_data['poll_max_options'])
+ {
+ $message = 'TOO_MANY_VOTE_OPTIONS';
+ }
+ else if (in_array(VOTE_CONVERTED, $cur_voted_id))
+ {
+ $message = 'VOTE_CONVERTED';
+ }
+ else
+ {
+ $message = 'FORM_INVALID';
+ }
+
+ $message = $user->lang[$message] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>');
+ trigger_error($message);
+ }
+
+ foreach ($voted_id as $option)
+ {
+ if (in_array($option, $cur_voted_id))
+ {
+ continue;
+ }
+
+ $sql = 'UPDATE ' . POLL_OPTIONS_TABLE . '
+ SET poll_option_total = poll_option_total + 1
+ WHERE poll_option_id = ' . (int) $option . '
+ AND topic_id = ' . (int) $topic_id;
+ $db->sql_query($sql);
+
+ if ($user->data['is_registered'])
+ {
+ $sql_ary = array(
+ 'topic_id' => (int) $topic_id,
+ 'poll_option_id' => (int) $option,
+ 'vote_user_id' => (int) $user->data['user_id'],
+ 'vote_user_ip' => (string) $user->ip,
+ );
+
+ $sql = 'INSERT INTO ' . POLL_VOTES_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
+ $db->sql_query($sql);
+ }
+ }
+
+ foreach ($cur_voted_id as $option)
+ {
+ if (!in_array($option, $voted_id))
+ {
+ $sql = 'UPDATE ' . POLL_OPTIONS_TABLE . '
+ SET poll_option_total = poll_option_total - 1
+ WHERE poll_option_id = ' . (int) $option . '
+ AND topic_id = ' . (int) $topic_id;
+ $db->sql_query($sql);
+
+ if ($user->data['is_registered'])
+ {
+ $sql = 'DELETE FROM ' . POLL_VOTES_TABLE . '
+ WHERE topic_id = ' . (int) $topic_id . '
+ AND poll_option_id = ' . (int) $option . '
+ AND vote_user_id = ' . (int) $user->data['user_id'];
+ $db->sql_query($sql);
+ }
+ }
+ }
+
+ if ($user->data['user_id'] == ANONYMOUS && !$user->data['is_bot'])
+ {
+ $user->set_cookie('poll_' . $topic_id, implode(',', $voted_id), time() + 31536000);
+ }
+
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET poll_last_vote = ' . time() . "
+ WHERE topic_id = $topic_id";
+ //, topic_last_post_time = ' . time() . " -- for bumping topics with new votes, ignore for now
+ $db->sql_query($sql);
+
+ $redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;start=$start");
+
+ meta_refresh(5, $redirect_url);
+ trigger_error($user->lang['VOTE_SUBMITTED'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>'));
+ }
+
+ $poll_total = 0;
+ foreach ($poll_info as $poll_option)
+ {
+ $poll_total += $poll_option['poll_option_total'];
+ }
+
+ if ($poll_info[0]['bbcode_bitfield'])
+ {
+ $poll_bbcode = new bbcode();
+ }
+ else
+ {
+ $poll_bbcode = false;
+ }
+
+ for ($i = 0, $size = sizeof($poll_info); $i < $size; $i++)
+ {
+ $poll_info[$i]['poll_option_text'] = censor_text($poll_info[$i]['poll_option_text']);
+
+ if ($poll_bbcode !== false)
+ {
+ $poll_bbcode->bbcode_second_pass($poll_info[$i]['poll_option_text'], $poll_info[$i]['bbcode_uid'], $poll_option['bbcode_bitfield']);
+ }
+
+ $poll_info[$i]['poll_option_text'] = bbcode_nl2br($poll_info[$i]['poll_option_text']);
+ $poll_info[$i]['poll_option_text'] = smiley_text($poll_info[$i]['poll_option_text']);
+ }
+
+ $topic_data['poll_title'] = censor_text($topic_data['poll_title']);
+
+ if ($poll_bbcode !== false)
+ {
+ $poll_bbcode->bbcode_second_pass($topic_data['poll_title'], $poll_info[0]['bbcode_uid'], $poll_info[0]['bbcode_bitfield']);
+ }
+
+ $topic_data['poll_title'] = bbcode_nl2br($topic_data['poll_title']);
+ $topic_data['poll_title'] = smiley_text($topic_data['poll_title']);
+
+ unset($poll_bbcode);
+
+ foreach ($poll_info as $poll_option)
+ {
+ $option_pct = ($poll_total > 0) ? $poll_option['poll_option_total'] / $poll_total : 0;
+ $option_pct_txt = sprintf("%.1d%%", round($option_pct * 100));
+
+ $template->assign_block_vars('poll_option', array(
+ 'POLL_OPTION_ID' => $poll_option['poll_option_id'],
+ 'POLL_OPTION_CAPTION' => $poll_option['poll_option_text'],
+ 'POLL_OPTION_RESULT' => $poll_option['poll_option_total'],
+ 'POLL_OPTION_PERCENT' => $option_pct_txt,
+ 'POLL_OPTION_PCT' => round($option_pct * 100),
+ 'POLL_OPTION_IMG' => $user->img('poll_center', $option_pct_txt, round($option_pct * 250)),
+ 'POLL_OPTION_VOTED' => (in_array($poll_option['poll_option_id'], $cur_voted_id)) ? true : false)
+ );
+ }
+
+ $poll_end = $topic_data['poll_length'] + $topic_data['poll_start'];
+
+ $template->assign_vars(array(
+ 'POLL_QUESTION' => $topic_data['poll_title'],
+ 'TOTAL_VOTES' => $poll_total,
+ 'POLL_LEFT_CAP_IMG' => $user->img('poll_left'),
+ 'POLL_RIGHT_CAP_IMG'=> $user->img('poll_right'),
+
+ 'L_MAX_VOTES' => ($topic_data['poll_max_options'] == 1) ? $user->lang['MAX_OPTION_SELECT'] : sprintf($user->lang['MAX_OPTIONS_SELECT'], $topic_data['poll_max_options']),
+ 'L_POLL_LENGTH' => ($topic_data['poll_length']) ? sprintf($user->lang[($poll_end > time()) ? 'POLL_RUN_TILL' : 'POLL_ENDED_AT'], $user->format_date($poll_end)) : '',
+
+ 'S_HAS_POLL' => true,
+ 'S_CAN_VOTE' => $s_can_vote,
+ 'S_DISPLAY_RESULTS' => $s_display_results,
+ 'S_IS_MULTI_CHOICE' => ($topic_data['poll_max_options'] > 1) ? true : false,
+ 'S_POLL_ACTION' => $viewtopic_url,
+
+ 'U_VIEW_RESULTS' => $viewtopic_url . '&amp;view=viewpoll')
+ );
+
+ unset($poll_end, $poll_info, $voted_id);
+}
+
+// If the user is trying to reach the second half of the topic, fetch it starting from the end
+$store_reverse = false;
+$sql_limit = $config['posts_per_page'];
+$sql_sort_order = $direction = '';
+
+if ($start > $total_posts / 2)
+{
+ $store_reverse = true;
+
+ if ($start + $config['posts_per_page'] > $total_posts)
+ {
+ $sql_limit = min($config['posts_per_page'], max(1, $total_posts - $start));
+ }
+
+ // Select the sort order
+ $direction = (($sort_dir == 'd') ? 'ASC' : 'DESC');
+ $sql_start = max(0, $total_posts - $sql_limit - $start);
+}
+else
+{
+ // Select the sort order
+ $direction = (($sort_dir == 'd') ? 'DESC' : 'ASC');
+ $sql_start = $start;
+}
+
+if (is_array($sort_by_sql[$sort_key]))
+{
+ $sql_sort_order = implode(' ' . $direction . ', ', $sort_by_sql[$sort_key]) . ' ' . $direction;
+}
+else
+{
+ $sql_sort_order = $sort_by_sql[$sort_key] . ' ' . $direction;
+}
+
+// Container for user details, only process once
+$post_list = $user_cache = $id_cache = $attachments = $attach_list = $rowset = $update_count = $post_edit_list = array();
+$has_attachments = $display_notice = false;
+$bbcode_bitfield = '';
+$i = $i_total = 0;
+
+// Go ahead and pull all data for this topic
+$sql = 'SELECT p.post_id
+ FROM ' . POSTS_TABLE . ' p' . (($join_user_sql[$sort_key]) ? ', ' . USERS_TABLE . ' u': '') . "
+ WHERE p.topic_id = $topic_id
+ " . ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND p.post_approved = 1' : '') . "
+ " . (($join_user_sql[$sort_key]) ? 'AND u.user_id = p.poster_id': '') . "
+ $limit_posts_time
+ ORDER BY $sql_sort_order";
+$result = $db->sql_query_limit($sql, $sql_limit, $sql_start);
+
+$i = ($store_reverse) ? $sql_limit - 1 : 0;
+while ($row = $db->sql_fetchrow($result))
+{
+ $post_list[$i] = (int) $row['post_id'];
+ ($store_reverse) ? $i-- : $i++;
+}
+$db->sql_freeresult($result);
+
+if (!sizeof($post_list))
+{
+ if ($sort_days)
+ {
+ trigger_error('NO_POSTS_TIME_FRAME');
+ }
+ else
+ {
+ trigger_error('NO_TOPIC');
+ }
+}
+
+// Holding maximum post time for marking topic read
+// We need to grab it because we do reverse ordering sometimes
+$max_post_time = 0;
+
+$sql = $db->sql_build_query('SELECT', array(
+ 'SELECT' => 'u.*, z.friend, z.foe, p.*',
+
+ 'FROM' => array(
+ USERS_TABLE => 'u',
+ POSTS_TABLE => 'p',
+ ),
+
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(ZEBRA_TABLE => 'z'),
+ 'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id'
+ )
+ ),
+
+ 'WHERE' => $db->sql_in_set('p.post_id', $post_list) . '
+ AND u.user_id = p.poster_id'
+));
+
+$result = $db->sql_query($sql);
+
+$now = getdate(time() + $user->timezone + $user->dst - date('Z'));
+
+// Posts are stored in the $rowset array while $attach_list, $user_cache
+// and the global bbcode_bitfield are built
+while ($row = $db->sql_fetchrow($result))
+{
+ // Set max_post_time
+ if ($row['post_time'] > $max_post_time)
+ {
+ $max_post_time = $row['post_time'];
+ }
+
+ $poster_id = (int) $row['poster_id'];
+
+ // Does post have an attachment? If so, add it to the list
+ if ($row['post_attachment'] && $config['allow_attachments'])
+ {
+ $attach_list[] = (int) $row['post_id'];
+
+ if ($row['post_approved'])
+ {
+ $has_attachments = true;
+ }
+ }
+
+ $rowset[$row['post_id']] = array(
+ 'hide_post' => ($row['foe'] && ($view != 'show' || $post_id != $row['post_id'])) ? true : false,
+
+ 'post_id' => $row['post_id'],
+ 'post_time' => $row['post_time'],
+ 'user_id' => $row['user_id'],
+ 'username' => $row['username'],
+ 'user_colour' => $row['user_colour'],
+ 'topic_id' => $row['topic_id'],
+ 'forum_id' => $row['forum_id'],
+ 'post_subject' => $row['post_subject'],
+ 'post_edit_count' => $row['post_edit_count'],
+ 'post_edit_time' => $row['post_edit_time'],
+ 'post_edit_reason' => $row['post_edit_reason'],
+ 'post_edit_user' => $row['post_edit_user'],
+ 'post_edit_locked' => $row['post_edit_locked'],
+
+ // Make sure the icon actually exists
+ 'icon_id' => (isset($icons[$row['icon_id']]['img'], $icons[$row['icon_id']]['height'], $icons[$row['icon_id']]['width'])) ? $row['icon_id'] : 0,
+ 'post_attachment' => $row['post_attachment'],
+ 'post_approved' => $row['post_approved'],
+ 'post_reported' => $row['post_reported'],
+ 'post_username' => $row['post_username'],
+ 'post_text' => $row['post_text'],
+ 'bbcode_uid' => $row['bbcode_uid'],
+ 'bbcode_bitfield' => $row['bbcode_bitfield'],
+ 'enable_smilies' => $row['enable_smilies'],
+ 'enable_sig' => $row['enable_sig'],
+ 'friend' => $row['friend'],
+ 'foe' => $row['foe'],
+ );
+
+ // Define the global bbcode bitfield, will be used to load bbcodes
+ $bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
+
+ // Is a signature attached? Are we going to display it?
+ if ($row['enable_sig'] && $config['allow_sig'] && $user->optionget('viewsigs'))
+ {
+ $bbcode_bitfield = $bbcode_bitfield | base64_decode($row['user_sig_bbcode_bitfield']);
+ }
+
+ // Cache various user specific data ... so we don't have to recompute
+ // this each time the same user appears on this page
+ if (!isset($user_cache[$poster_id]))
+ {
+ if ($poster_id == ANONYMOUS)
+ {
+ $user_cache[$poster_id] = array(
+ 'joined' => '',
+ 'posts' => '',
+ 'from' => '',
+
+ 'sig' => '',
+ 'sig_bbcode_uid' => '',
+ 'sig_bbcode_bitfield' => '',
+
+ 'online' => false,
+ 'avatar' => ($user->optionget('viewavatars')) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'], $row['user_avatar_height']) : '',
+ 'rank_title' => '',
+ 'rank_image' => '',
+ 'rank_image_src' => '',
+ 'sig' => '',
+ 'profile' => '',
+ 'pm' => '',
+ 'email' => '',
+ 'www' => '',
+ 'icq_status_img' => '',
+ 'icq' => '',
+ 'aim' => '',
+ 'msn' => '',
+ 'yim' => '',
+ 'jabber' => '',
+ 'search' => '',
+ 'age' => '',
+
+ 'username' => $row['username'],
+ 'user_colour' => $row['user_colour'],
+
+ 'warnings' => 0,
+ 'allow_pm' => 0,
+ );
+
+ get_user_rank($row['user_rank'], false, $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);
+ }
+ else
+ {
+ $user_sig = '';
+
+ // We add the signature to every posters entry because enable_sig is post dependant
+ if ($row['user_sig'] && $config['allow_sig'] && $user->optionget('viewsigs'))
+ {
+ $user_sig = $row['user_sig'];
+ }
+
+ $id_cache[] = $poster_id;
+
+ $user_cache[$poster_id] = array(
+ 'joined' => $user->format_date($row['user_regdate']),
+ 'posts' => $row['user_posts'],
+ 'warnings' => (isset($row['user_warnings'])) ? $row['user_warnings'] : 0,
+ 'from' => (!empty($row['user_from'])) ? $row['user_from'] : '',
+
+ 'sig' => $user_sig,
+ 'sig_bbcode_uid' => (!empty($row['user_sig_bbcode_uid'])) ? $row['user_sig_bbcode_uid'] : '',
+ 'sig_bbcode_bitfield' => (!empty($row['user_sig_bbcode_bitfield'])) ? $row['user_sig_bbcode_bitfield'] : '',
+
+ 'viewonline' => $row['user_allow_viewonline'],
+ 'allow_pm' => $row['user_allow_pm'],
+
+ 'avatar' => ($user->optionget('viewavatars')) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'], $row['user_avatar_height']) : '',
+ 'age' => '',
+
+ 'rank_title' => '',
+ 'rank_image' => '',
+ 'rank_image_src' => '',
+
+ 'username' => $row['username'],
+ 'user_colour' => $row['user_colour'],
+
+ 'online' => false,
+ 'profile' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&amp;u=$poster_id"),
+ 'www' => $row['user_website'],
+ 'aim' => ($row['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&amp;action=aim&amp;u=$poster_id") : '',
+ 'msn' => ($row['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&amp;action=msnm&amp;u=$poster_id") : '',
+ 'yim' => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row['user_yim']) . '&amp;.src=pg' : '',
+ 'jabber' => ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&amp;action=jabber&amp;u=$poster_id") : '',
+ 'search' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$poster_id&amp;sr=posts") : '',
+
+ 'author_full' => get_username_string('full', $poster_id, $row['username'], $row['user_colour']),
+ 'author_colour' => get_username_string('colour', $poster_id, $row['username'], $row['user_colour']),
+ 'author_username' => get_username_string('username', $poster_id, $row['username'], $row['user_colour']),
+ 'author_profile' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour']),
+ );
+
+ get_user_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);
+
+ if (!empty($row['user_allow_viewemail']) || $auth->acl_get('a_email'))
+ {
+ $user_cache[$poster_id]['email'] = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=email&amp;u=$poster_id") : (($config['board_hide_emails'] && !$auth->acl_get('a_email')) ? '' : 'mailto:' . $row['user_email']);
+ }
+ else
+ {
+ $user_cache[$poster_id]['email'] = '';
+ }
+
+ if (!empty($row['user_icq']))
+ {
+ $user_cache[$poster_id]['icq'] = 'http://www.icq.com/people/webmsg.php?to=' . $row['user_icq'];
+ $user_cache[$poster_id]['icq_status_img'] = '<img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&amp;img=5" width="18" height="18" alt="" />';
+ }
+ else
+ {
+ $user_cache[$poster_id]['icq_status_img'] = '';
+ $user_cache[$poster_id]['icq'] = '';
+ }
+
+ if ($config['allow_birthdays'] && !empty($row['user_birthday']))
+ {
+ list($bday_day, $bday_month, $bday_year) = array_map('intval', explode('-', $row['user_birthday']));
+
+ if ($bday_year)
+ {
+ $diff = $now['mon'] - $bday_month;
+ if ($diff == 0)
+ {
+ $diff = ($now['mday'] - $bday_day < 0) ? 1 : 0;
+ }
+ else
+ {
+ $diff = ($diff < 0) ? 1 : 0;
+ }
+
+ $user_cache[$poster_id]['age'] = (int) ($now['year'] - $bday_year - $diff);
+ }
+ }
+ }
+ }
+}
+$db->sql_freeresult($result);
+
+// Load custom profile fields
+if ($config['load_cpf_viewtopic'])
+{
+ if (!class_exists('custom_profile'))
+ {
+ include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
+ }
+ $cp = new custom_profile();
+
+ // Grab all profile fields from users in id cache for later use - similar to the poster cache
+ $profile_fields_tmp = $cp->generate_profile_fields_template('grab', $id_cache);
+
+ // filter out fields not to be displayed on viewtopic. Yes, it's a hack, but this shouldn't break any MODs.
+ $profile_fields_cache = array();
+ foreach ($profile_fields_tmp as $profile_user_id => $profile_fields)
+ {
+ $profile_fields_cache[$profile_user_id] = array();
+ foreach ($profile_fields as $used_ident => $profile_field)
+ {
+ if ($profile_field['data']['field_show_on_vt'])
+ {
+ $profile_fields_cache[$profile_user_id][$used_ident] = $profile_field;
+ }
+ }
+ }
+ unset($profile_fields_tmp);
+}
+
+// Generate online information for user
+if ($config['load_onlinetrack'] && sizeof($id_cache))
+{
+ $sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
+ FROM ' . SESSIONS_TABLE . '
+ WHERE ' . $db->sql_in_set('session_user_id', $id_cache) . '
+ GROUP BY session_user_id';
+ $result = $db->sql_query($sql);
+
+ $update_time = $config['load_online_time'] * 60;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $user_cache[$row['session_user_id']]['online'] = (time() - $update_time < $row['online_time'] && (($row['viewonline']) || $auth->acl_get('u_viewonline'))) ? true : false;
+ }
+ $db->sql_freeresult($result);
+}
+unset($id_cache);
+
+// Pull attachment data
+if (sizeof($attach_list))
+{
+ if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id))
+ {
+ $sql = 'SELECT *
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('post_msg_id', $attach_list) . '
+ AND in_message = 0
+ ORDER BY filetime DESC, post_msg_id ASC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $attachments[$row['post_msg_id']][] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ // No attachments exist, but post table thinks they do so go ahead and reset post_attach flags
+ if (!sizeof($attachments))
+ {
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET post_attachment = 0
+ WHERE ' . $db->sql_in_set('post_id', $attach_list);
+ $db->sql_query($sql);
+
+ // We need to update the topic indicator too if the complete topic is now without an attachment
+ if (sizeof($rowset) != $total_posts)
+ {
+ // Not all posts are displayed so we query the db to find if there's any attachment for this topic
+ $sql = 'SELECT a.post_msg_id as post_id
+ FROM ' . ATTACHMENTS_TABLE . ' a, ' . POSTS_TABLE . " p
+ WHERE p.topic_id = $topic_id
+ AND p.post_approved = 1
+ AND p.topic_id = a.topic_id";
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . "
+ SET topic_attachment = 0
+ WHERE topic_id = $topic_id";
+ $db->sql_query($sql);
+ }
+ }
+ else
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . "
+ SET topic_attachment = 0
+ WHERE topic_id = $topic_id";
+ $db->sql_query($sql);
+ }
+ }
+ else if ($has_attachments && !$topic_data['topic_attachment'])
+ {
+ // Topic has approved attachments but its flag is wrong
+ $sql = 'UPDATE ' . TOPICS_TABLE . "
+ SET topic_attachment = 1
+ WHERE topic_id = $topic_id";
+ $db->sql_query($sql);
+
+ $topic_data['topic_attachment'] = 1;
+ }
+ }
+ else
+ {
+ $display_notice = true;
+ }
+}
+
+// Instantiate BBCode if need be
+if ($bbcode_bitfield !== '')
+{
+ $bbcode = new bbcode(base64_encode($bbcode_bitfield));
+}
+
+$i_total = sizeof($rowset) - 1;
+$prev_post_id = '';
+
+$template->assign_vars(array(
+ 'S_NUM_POSTS' => sizeof($post_list))
+);
+
+// Output the posts
+$first_unread = $post_unread = false;
+for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
+{
+ // A non-existing rowset only happens if there was no user present for the entered poster_id
+ // This could be a broken posts table.
+ if (!isset($rowset[$post_list[$i]]))
+ {
+ continue;
+ }
+
+ $row =& $rowset[$post_list[$i]];
+ $poster_id = $row['user_id'];
+
+ // End signature parsing, only if needed
+ if ($user_cache[$poster_id]['sig'] && $row['enable_sig'] && empty($user_cache[$poster_id]['sig_parsed']))
+ {
+ $user_cache[$poster_id]['sig'] = censor_text($user_cache[$poster_id]['sig']);
+
+ if ($user_cache[$poster_id]['sig_bbcode_bitfield'])
+ {
+ $bbcode->bbcode_second_pass($user_cache[$poster_id]['sig'], $user_cache[$poster_id]['sig_bbcode_uid'], $user_cache[$poster_id]['sig_bbcode_bitfield']);
+ }
+
+ $user_cache[$poster_id]['sig'] = bbcode_nl2br($user_cache[$poster_id]['sig']);
+ $user_cache[$poster_id]['sig'] = smiley_text($user_cache[$poster_id]['sig']);
+ $user_cache[$poster_id]['sig_parsed'] = true;
+ }
+
+ // Parse the message and subject
+ $message = censor_text($row['post_text']);
+
+ // Second parse bbcode here
+ if ($row['bbcode_bitfield'])
+ {
+ $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
+ }
+
+ $message = bbcode_nl2br($message);
+ $message = smiley_text($message);
+
+ if (!empty($attachments[$row['post_id']]))
+ {
+ parse_attachments($forum_id, $message, $attachments[$row['post_id']], $update_count);
+ }
+
+ // Replace naughty words such as farty pants
+ $row['post_subject'] = censor_text($row['post_subject']);
+
+ // Highlight active words (primarily for search)
+ if ($highlight_match)
+ {
+ $message = preg_replace('#(?!<.*)(?<!\w)(' . $highlight_match . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">\1</span>', $message);
+ $row['post_subject'] = preg_replace('#(?!<.*)(?<!\w)(' . $highlight_match . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">\1</span>', $row['post_subject']);
+ }
+
+ // Editing information
+ if (($row['post_edit_count'] && $config['display_last_edited']) || $row['post_edit_reason'])
+ {
+ // Get usernames for all following posts if not already stored
+ if (!sizeof($post_edit_list) && ($row['post_edit_reason'] || ($row['post_edit_user'] && !isset($user_cache[$row['post_edit_user']]))))
+ {
+ // Remove all post_ids already parsed (we do not have to check them)
+ $post_storage_list = (!$store_reverse) ? array_slice($post_list, $i) : array_slice(array_reverse($post_list), $i);
+
+ $sql = 'SELECT DISTINCT u.user_id, u.username, u.user_colour
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
+ WHERE ' . $db->sql_in_set('p.post_id', $post_storage_list) . '
+ AND p.post_edit_count <> 0
+ AND p.post_edit_user <> 0
+ AND p.post_edit_user = u.user_id';
+ $result2 = $db->sql_query($sql);
+ while ($user_edit_row = $db->sql_fetchrow($result2))
+ {
+ $post_edit_list[$user_edit_row['user_id']] = $user_edit_row;
+ }
+ $db->sql_freeresult($result2);
+
+ unset($post_storage_list);
+ }
+
+ $l_edit_time_total = ($row['post_edit_count'] == 1) ? $user->lang['EDITED_TIME_TOTAL'] : $user->lang['EDITED_TIMES_TOTAL'];
+
+ if ($row['post_edit_reason'])
+ {
+ // User having edited the post also being the post author?
+ if (!$row['post_edit_user'] || $row['post_edit_user'] == $poster_id)
+ {
+ $display_username = get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']);
+ }
+ else
+ {
+ $display_username = get_username_string('full', $row['post_edit_user'], $post_edit_list[$row['post_edit_user']]['username'], $post_edit_list[$row['post_edit_user']]['user_colour']);
+ }
+
+ $l_edited_by = sprintf($l_edit_time_total, $display_username, $user->format_date($row['post_edit_time'], false, true), $row['post_edit_count']);
+ }
+ else
+ {
+ if ($row['post_edit_user'] && !isset($user_cache[$row['post_edit_user']]))
+ {
+ $user_cache[$row['post_edit_user']] = $post_edit_list[$row['post_edit_user']];
+ }
+
+ // User having edited the post also being the post author?
+ if (!$row['post_edit_user'] || $row['post_edit_user'] == $poster_id)
+ {
+ $display_username = get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']);
+ }
+ else
+ {
+ $display_username = get_username_string('full', $row['post_edit_user'], $user_cache[$row['post_edit_user']]['username'], $user_cache[$row['post_edit_user']]['user_colour']);
+ }
+
+ $l_edited_by = sprintf($l_edit_time_total, $display_username, $user->format_date($row['post_edit_time'], false, true), $row['post_edit_count']);
+ }
+ }
+ else
+ {
+ $l_edited_by = '';
+ }
+
+ // Bump information
+ if ($topic_data['topic_bumped'] && $row['post_id'] == $topic_data['topic_last_post_id'] && isset($user_cache[$topic_data['topic_bumper']]) )
+ {
+ // It is safe to grab the username from the user cache array, we are at the last
+ // post and only the topic poster and last poster are allowed to bump.
+ // Admins and mods are bound to the above rules too...
+ $l_bumped_by = sprintf($user->lang['BUMPED_BY'], $user_cache[$topic_data['topic_bumper']]['username'], $user->format_date($topic_data['topic_last_post_time'], false, true));
+ }
+ else
+ {
+ $l_bumped_by = '';
+ }
+
+ $cp_row = array();
+
+ //
+ if ($config['load_cpf_viewtopic'])
+ {
+ $cp_row = (isset($profile_fields_cache[$poster_id])) ? $cp->generate_profile_fields_template('show', false, $profile_fields_cache[$poster_id]) : array();
+ }
+
+ $post_unread = (isset($topic_tracking_info[$topic_id]) && $row['post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
+
+ $s_first_unread = false;
+ if (!$first_unread && $post_unread)
+ {
+ $s_first_unread = $first_unread = true;
+ }
+
+ $edit_allowed = ($user->data['is_registered'] && ($auth->acl_get('m_edit', $forum_id) || (
+ $user->data['user_id'] == $poster_id &&
+ $auth->acl_get('f_edit', $forum_id) &&
+ !$row['post_edit_locked'] &&
+ ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])
+ )));
+
+ $delete_allowed = ($user->data['is_registered'] && ($auth->acl_get('m_delete', $forum_id) || (
+ $user->data['user_id'] == $poster_id &&
+ $auth->acl_get('f_delete', $forum_id) &&
+ $topic_data['topic_last_post_id'] == $row['post_id'] &&
+ ($row['post_time'] > time() - ($config['delete_time'] * 60) || !$config['delete_time']) &&
+ // we do not want to allow removal of the last post if a moderator locked it!
+ !$row['post_edit_locked']
+ )));
+
+ //
+ $postrow = array(
+ 'POST_AUTHOR_FULL' => ($poster_id != ANONYMOUS) ? $user_cache[$poster_id]['author_full'] : get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR_COLOUR' => ($poster_id != ANONYMOUS) ? $user_cache[$poster_id]['author_colour'] : get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
+ 'POST_AUTHOR' => ($poster_id != ANONYMOUS) ? $user_cache[$poster_id]['author_username'] : get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
+ 'U_POST_AUTHOR' => ($poster_id != ANONYMOUS) ? $user_cache[$poster_id]['author_profile'] : get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
+
+ 'RANK_TITLE' => $user_cache[$poster_id]['rank_title'],
+ 'RANK_IMG' => $user_cache[$poster_id]['rank_image'],
+ 'RANK_IMG_SRC' => $user_cache[$poster_id]['rank_image_src'],
+ 'POSTER_JOINED' => $user_cache[$poster_id]['joined'],
+ 'POSTER_POSTS' => $user_cache[$poster_id]['posts'],
+ 'POSTER_FROM' => $user_cache[$poster_id]['from'],
+ 'POSTER_AVATAR' => $user_cache[$poster_id]['avatar'],
+ 'POSTER_WARNINGS' => $user_cache[$poster_id]['warnings'],
+ 'POSTER_AGE' => $user_cache[$poster_id]['age'],
+
+ 'POST_DATE' => $user->format_date($row['post_time'], false, ($view == 'print') ? true : false),
+ 'POST_SUBJECT' => $row['post_subject'],
+ 'MESSAGE' => $message,
+ 'SIGNATURE' => ($row['enable_sig']) ? $user_cache[$poster_id]['sig'] : '',
+ 'EDITED_MESSAGE' => $l_edited_by,
+ 'EDIT_REASON' => $row['post_edit_reason'],
+ 'BUMPED_MESSAGE' => $l_bumped_by,
+
+ 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'NEW_POST') : $user->img('icon_post_target', 'POST'),
+ 'POST_ICON_IMG' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['img'] : '',
+ 'POST_ICON_IMG_WIDTH' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['width'] : '',
+ 'POST_ICON_IMG_HEIGHT' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['height'] : '',
+ 'ICQ_STATUS_IMG' => $user_cache[$poster_id]['icq_status_img'],
+ 'ONLINE_IMG' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? '' : (($user_cache[$poster_id]['online']) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
+ 'S_ONLINE' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? false : (($user_cache[$poster_id]['online']) ? true : false),
+
+ 'U_EDIT' => ($edit_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&amp;f=$forum_id&amp;p={$row['post_id']}") : '',
+ 'U_QUOTE' => ($auth->acl_get('f_reply', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=quote&amp;f=$forum_id&amp;p={$row['post_id']}") : '',
+ 'U_INFO' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&amp;mode=post_details&amp;f=$forum_id&amp;p=" . $row['post_id'], true, $user->session_id) : '',
+ 'U_DELETE' => ($delete_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=delete&amp;f=$forum_id&amp;p={$row['post_id']}") : '',
+
+ 'U_PROFILE' => $user_cache[$poster_id]['profile'],
+ 'U_SEARCH' => $user_cache[$poster_id]['search'],
+ 'U_PM' => ($poster_id != ANONYMOUS && $config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_cache[$poster_id]['allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;action=quotepost&amp;p=' . $row['post_id']) : '',
+ 'U_EMAIL' => $user_cache[$poster_id]['email'],
+ 'U_WWW' => $user_cache[$poster_id]['www'],
+ 'U_ICQ' => $user_cache[$poster_id]['icq'],
+ 'U_AIM' => $user_cache[$poster_id]['aim'],
+ 'U_MSN' => $user_cache[$poster_id]['msn'],
+ 'U_YIM' => $user_cache[$poster_id]['yim'],
+ 'U_JABBER' => $user_cache[$poster_id]['jabber'],
+
+ 'U_REPORT' => ($auth->acl_get('f_report', $forum_id)) ? append_sid("{$phpbb_root_path}report.$phpEx", 'f=' . $forum_id . '&amp;p=' . $row['post_id']) : '',
+ 'U_MCP_REPORT' => ($auth->acl_get('m_report', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $forum_id . '&amp;p=' . $row['post_id'], true, $user->session_id) : '',
+ 'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $forum_id . '&amp;p=' . $row['post_id'], true, $user->session_id) : '',
+ 'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . (($topic_data['topic_type'] == POST_GLOBAL) ? '&amp;f=' . $forum_id : '') . '#p' . $row['post_id'],
+ 'U_NEXT_POST_ID' => ($i < $i_total && isset($rowset[$post_list[$i + 1]])) ? $rowset[$post_list[$i + 1]]['post_id'] : '',
+ 'U_PREV_POST_ID' => $prev_post_id,
+ 'U_NOTES' => ($auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $poster_id, true, $user->session_id) : '',
+ 'U_WARN' => ($auth->acl_get('m_warn') && $poster_id != $user->data['user_id'] && $poster_id != ANONYMOUS) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_post&amp;f=' . $forum_id . '&amp;p=' . $row['post_id'], true, $user->session_id) : '',
+
+ 'POST_ID' => $row['post_id'],
+ 'POSTER_ID' => $poster_id,
+
+ 'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
+ 'S_POST_UNAPPROVED' => ($row['post_approved']) ? false : true,
+ 'S_POST_REPORTED' => ($row['post_reported'] && $auth->acl_get('m_report', $forum_id)) ? true : false,
+ 'S_DISPLAY_NOTICE' => $display_notice && $row['post_attachment'],
+ 'S_FRIEND' => ($row['friend']) ? true : false,
+ 'S_UNREAD_POST' => $post_unread,
+ 'S_FIRST_UNREAD' => $s_first_unread,
+ 'S_CUSTOM_FIELDS' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false,
+ 'S_TOPIC_POSTER' => ($topic_data['topic_poster'] == $poster_id) ? true : false,
+
+ 'S_IGNORE_POST' => ($row['hide_post']) ? true : false,
+ 'L_IGNORE_POST' => ($row['hide_post']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), '<a href="' . $viewtopic_url . "&amp;p={$row['post_id']}&amp;view=show#p{$row['post_id']}" . '">', '</a>') : '',
+ );
+
+ if (isset($cp_row['row']) && sizeof($cp_row['row']))
+ {
+ $postrow = array_merge($postrow, $cp_row['row']);
+ }
+
+ // Dump vars into template
+ $template->assign_block_vars('postrow', $postrow);
+
+ if (!empty($cp_row['blockrow']))
+ {
+ foreach ($cp_row['blockrow'] as $field_data)
+ {
+ $template->assign_block_vars('postrow.custom_fields', $field_data);
+ }
+ }
+
+ // Display not already displayed Attachments for this post, we already parsed them. ;)
+ if (!empty($attachments[$row['post_id']]))
+ {
+ foreach ($attachments[$row['post_id']] as $attachment)
+ {
+ $template->assign_block_vars('postrow.attachment', array(
+ 'DISPLAY_ATTACHMENT' => $attachment)
+ );
+ }
+ }
+
+ $prev_post_id = $row['post_id'];
+
+ unset($rowset[$post_list[$i]]);
+ unset($attachments[$row['post_id']]);
+}
+unset($rowset, $user_cache);
+
+// Update topic view and if necessary attachment view counters ... but only for humans and if this is the first 'page view'
+if (isset($user->data['session_page']) && !$user->data['is_bot'] && (strpos($user->data['session_page'], '&t=' . $topic_id) === false || isset($user->data['session_created'])))
+{
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_views = topic_views + 1, topic_last_view_time = ' . time() . "
+ WHERE topic_id = $topic_id";
+ $db->sql_query($sql);
+
+ // Update the attachment download counts
+ if (sizeof($update_count))
+ {
+ $sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
+ SET download_count = download_count + 1
+ WHERE ' . $db->sql_in_set('attach_id', array_unique($update_count));
+ $db->sql_query($sql);
+ }
+}
+
+// Get last post time for all global announcements
+// to keep proper forums tracking
+if ($topic_data['topic_type'] == POST_GLOBAL)
+{
+ $sql = 'SELECT topic_last_post_time as forum_last_post_time
+ FROM ' . TOPICS_TABLE . '
+ WHERE forum_id = 0
+ ORDER BY topic_last_post_time DESC';
+ $result = $db->sql_query_limit($sql, 1);
+ $topic_data['forum_last_post_time'] = (int) $db->sql_fetchfield('forum_last_post_time');
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT mark_time as forum_mark_time
+ FROM ' . FORUMS_TRACK_TABLE . '
+ WHERE forum_id = 0
+ AND user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+ $topic_data['forum_mark_time'] = (int) $db->sql_fetchfield('forum_mark_time');
+ $db->sql_freeresult($result);
+}
+
+// Only mark topic if it's currently unread. Also make sure we do not set topic tracking back if earlier pages are viewed.
+if (isset($topic_tracking_info[$topic_id]) && $topic_data['topic_last_post_time'] > $topic_tracking_info[$topic_id] && $max_post_time > $topic_tracking_info[$topic_id])
+{
+ markread('topic', (($topic_data['topic_type'] == POST_GLOBAL) ? 0 : $forum_id), $topic_id, $max_post_time);
+
+ // Update forum info
+ $all_marked_read = update_forum_tracking_info((($topic_data['topic_type'] == POST_GLOBAL) ? 0 : $forum_id), $topic_data['forum_last_post_time'], (isset($topic_data['forum_mark_time'])) ? $topic_data['forum_mark_time'] : false, false);
+}
+else
+{
+ $all_marked_read = true;
+}
+
+// If there are absolutely no more unread posts in this forum and unread posts shown, we can savely show the #unread link
+if ($all_marked_read)
+{
+ if ($post_unread)
+ {
+ $template->assign_vars(array(
+ 'U_VIEW_UNREAD_POST' => '#unread',
+ ));
+ }
+ else if (isset($topic_tracking_info[$topic_id]) && $topic_data['topic_last_post_time'] > $topic_tracking_info[$topic_id])
+ {
+ $template->assign_vars(array(
+ 'U_VIEW_UNREAD_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
+ ));
+ }
+}
+else if (!$all_marked_read)
+{
+ $last_page = ((floor($start / $config['posts_per_page']) + 1) == max(ceil($total_posts / $config['posts_per_page']), 1)) ? true : false;
+
+ // What can happen is that we are at the last displayed page. If so, we also display the #unread link based in $post_unread
+ if ($last_page && $post_unread)
+ {
+ $template->assign_vars(array(
+ 'U_VIEW_UNREAD_POST' => '#unread',
+ ));
+ }
+ else if (!$last_page)
+ {
+ $template->assign_vars(array(
+ 'U_VIEW_UNREAD_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
+ ));
+ }
+}
+
+// let's set up quick_reply
+$s_allowed_reply = ((!$auth->acl_get('f_reply', $forum_id) || ($topic_data['forum_status'] == ITEM_LOCKED) || ($topic_data['topic_status'] == ITEM_LOCKED)) && !$auth->acl_get('m_edit', $forum_id)) ? false : true;
+$s_quick_reply = $s_allowed_reply && $user->data['is_registered'] && $config['allow_quick_reply'] && ($topic_data['forum_flags'] & FORUM_FLAG_QUICK_REPLY);
+
+if ($s_can_vote || $s_quick_reply)
+{
+ add_form_key('posting');
+
+ if ($s_quick_reply)
+ {
+ $s_attach_sig = $config['allow_sig'] && $user->optionget('attachsig') && $auth->acl_get('f_sigs', $forum_id) && $auth->acl_get('u_sig');
+ $s_smilies = $config['allow_smilies'] && $user->optionget('smilies') && $auth->acl_get('f_smilies', $forum_id);
+ $s_bbcode = $config['allow_bbcode'] && $user->optionget('bbcode') && $auth->acl_get('f_bbcode', $forum_id);
+ $s_notify = $config['allow_topic_notify'] && $user->data['user_notify'];
+
+ $qr_hidden_fields = array(
+ 'topic_cur_post_id' => (int) $topic_data['topic_last_post_id'],
+ 'lastclick' => (int) time(),
+ 'topic_id' => (int) $topic_data['topic_id'],
+ 'forum_id' => (int) $forum_id,
+ );
+
+ // Originally we use checkboxes and check with isset(), so we only provide them if they would be checked
+ (!$s_bbcode) ? $qr_hidden_fields['disable_bbcode'] = 1 : true;
+ (!$s_smilies) ? $qr_hidden_fields['disable_smilies'] = 1 : true;
+ (!$config['allow_post_links']) ? $qr_hidden_fields['disable_magic_url'] = 1 : true;
+ ($s_attach_sig) ? $qr_hidden_fields['attach_sig'] = 1 : true;
+ ($s_notify) ? $qr_hidden_fields['notify'] = 1 : true;
+ ($topic_data['topic_status'] == ITEM_LOCKED) ? $qr_hidden_fields['lock_topic'] = 1 : true;
+
+ $template->assign_vars(array(
+ 'S_QUICK_REPLY' => true,
+ 'U_QR_ACTION' => append_sid("{$phpbb_root_path}posting.$phpEx", "mode=reply&amp;f=$forum_id&amp;t=$topic_id"),
+ 'QR_HIDDEN_FIELDS' => build_hidden_fields($qr_hidden_fields),
+ 'SUBJECT' => 'Re: ' . censor_text($topic_data['topic_title']),
+ ));
+ }
+}
+// now I have the urge to wash my hands :(
+
+
+// We overwrite $_REQUEST['f'] if there is no forum specified
+// to be able to display the correct online list.
+// One downside is that the user currently viewing this topic/post is not taken into account.
+if (empty($_REQUEST['f']))
+{
+ $_REQUEST['f'] = $forum_id;
+}
+
+// Output the page
+page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title'], true, $forum_id);
+
+$template->set_filenames(array(
+ 'body' => ($view == 'print') ? 'viewtopic_print.html' : 'viewtopic_body.html')
+);
+make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"), $forum_id);
+
+page_footer();
+
+?> \ No newline at end of file